Skip to content

Commit dfa78a5

Browse files
authored
chore: refactor FixedHero overlay auto tint implementation (#156)
1 parent b200779 commit dfa78a5

16 files changed

Lines changed: 126 additions & 85 deletions

File tree

apps/csk-marketing-site/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@uniformdev/csk-marketing-site",
3-
"version": "6.0.94",
3+
"version": "6.0.95",
44
"private": true,
55
"engines": {
66
"yarn": "please-use-npm",

apps/csk-storybook/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@uniformdev/csk-storybook",
3-
"version": "6.0.94",
3+
"version": "6.0.95",
44
"description": "CSK vNext Storybook is an interactive Storybook build showcasing components from the CSK vNext component starter kit. It provides detailed documentation, live previews, and testing capabilities for easy integration into your projects.",
55
"main": "index.js",
66
"scripts": {

apps/csk-storybook/src/canvasMock/components/fixedHero.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,5 @@ export const getFixedHeroContent = (variant?: string): FixedHeroParameters => ({
2828
contentAlignment: DemoHeroContentAlignment.Center,
2929
fullHeight: false,
3030
textColor: !variant ? 'text-secondary' : 'text-primary',
31-
enableOverlayAutoTint: true,
31+
overlayAutoTint: '0.4',
3232
});

apps/csk-storybook/src/stories/canvas/components/FixedHero.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ const argTypes: Partial<ArgTypes<FixedHeroParameters>> = {
4949
...addPrefix({ text: buttonText }, 'primaryButton'),
5050
contentAlignment: { control: 'select', options: ['left', 'center', 'right'] },
5151
textColor: color,
52-
enableOverlayAutoTint: { control: 'boolean' },
52+
overlayAutoTint: { control: { type: 'number', min: 0, max: 1, step: 0.1 } },
5353
height,
5454
};
5555

apps/csk/content/component/fixedHero.yaml

Lines changed: 34 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ parameters:
7070
- contentAlignment
7171
- height
7272
- textColor
73+
- overlayAutoTint
7374
- enableOverlayAutoTint
7475
- id: contentAlignment
7576
name: Content Alignment
@@ -106,13 +107,31 @@ parameters:
106107
typeConfig:
107108
allowColors: []
108109
selectedGroup: text
109-
- id: enableOverlayAutoTint
110-
name: Enable Overlay Auto Tint
111-
type: checkbox
110+
- id: overlayAutoTint
111+
name: Overlay Auto Tint
112+
type: dex-slider-control-parameter
112113
helpText: >-
113-
Automatically generates a 30% transparent overlay from the title color.
114-
This applies only when the component is in its default variant.
115-
typeConfig: null
114+
Generates a high-contrast overlay based on the text color with adjustable
115+
opacity. Applies only when the component is in its default variant.
116+
typeConfig:
117+
step: 1
118+
type: custom
119+
units: px
120+
options:
121+
- key: 0%
122+
value: '0'
123+
- key: 20%
124+
value: '0.2'
125+
- key: 40%
126+
value: '0.4'
127+
- key: 60%
128+
value: '0.6'
129+
- key: 80%
130+
value: '0.8'
131+
- key: 100%
132+
value: '1'
133+
maxValue: 10
134+
minValue: 0
116135
- id: 855b7e83-5dfc-448c-b9a6-f59060c1637b
117136
name: Deprecated
118137
type: group
@@ -124,6 +143,7 @@ parameters:
124143
- descriptionColor
125144
- fitHeight
126145
- fullHeight
146+
- enableOverlayAutoTint
127147
- id: eyebrowTitleColor
128148
name: Eyebrow Text Color (Deprecated)
129149
type: dex-color-palette-parameter
@@ -161,6 +181,13 @@ parameters:
161181
name: Full Height (Deprecated)
162182
type: checkbox
163183
typeConfig: null
184+
- id: enableOverlayAutoTint
185+
name: Enable Overlay Auto Tint (Deprecated)
186+
type: checkbox
187+
helpText: >-
188+
Automatically generates a 30% transparent overlay from the title color.
189+
This applies only when the component is in its default variant.
190+
typeConfig: null
164191
categoryId: f22b05f0-c4bf-4158-8ebc-4856e4d453af
165192
previewImageUrl: >-
166193
https://res.cloudinary.com/uniform-demos/image/upload/csk-v-next/baseline/preview-images/hero-fixed.jpg
@@ -169,7 +196,7 @@ slots: []
169196
titleParameter: displayName
170197
canBeComposition: false
171198
created: '2025-01-29T10:47:01.402162+00:00'
172-
updated: '2025-06-23T10:30:12.456625+00:00'
199+
updated: '2025-06-23T11:28:59.000319+00:00'
173200
variants:
174201
- id: columns
175202
name: Columns

apps/csk/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@uniformdev/component-starter-kit",
3-
"version": "6.0.94",
3+
"version": "6.0.95",
44
"private": true,
55
"engines": {
66
"yarn": "please-use-npm",

package-lock.json

Lines changed: 11 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "csk-packages",
3-
"version": "6.0.94",
3+
"version": "6.0.95",
44
"private": true,
55
"scripts": {
66
"build": "turbo build",

packages/csk-cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@uniformdev/csk-cli",
3-
"version": "6.0.94",
3+
"version": "6.0.95",
44
"description": "Command-line interface (CLI) tool designed to streamline the development workflow within Uniform projects. It provides commands for pulling additional data and generating components based on Canvas data",
55
"license": "SEE LICENSE IN LICENSE.txt",
66
"engines": {

packages/csk-components/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@uniformdev/csk-components",
3-
"version": "6.0.94",
3+
"version": "6.0.95",
44
"description": "Components Starter Kit that provides a set of basic components for building websites within a Uniform project",
55
"license": "SEE LICENSE IN LICENSE.txt",
66
"engines": {

0 commit comments

Comments
 (0)