@yahoo/uds 3.145.0-beta.2 → 3.145.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/automated-config/dist/generated/generatedConfigs.cjs +2 -2
- package/dist/automated-config/dist/generated/generatedConfigs.d.cts +2 -2
- package/dist/automated-config/dist/generated/generatedConfigs.d.ts +2 -2
- package/dist/automated-config/dist/generated/generatedConfigs.js +2 -2
- package/dist/automated-config/dist/utils/getConfigVariantProperties.d.cts +2 -2
- package/dist/automated-config/dist/utils/getConfigVariantProperties.d.ts +2 -2
- package/dist/components/client/Menu/Menu.ItemCheckbox.d.cts +1 -1
- package/dist/components/client/Menu/Menu.ItemCheckbox.d.ts +1 -1
- package/dist/components/client/Popover/UDSPopoverConfigProvider.d.cts +1 -1
- package/dist/components/client/Popover/UDSPopoverConfigProvider.d.ts +1 -1
- package/dist/components/client/Toast/UDSToastConfigProvider.d.cts +1 -1
- package/dist/components/client/Toast/UDSToastConfigProvider.d.ts +1 -1
- package/dist/css/dist/css/generate.helpers.cjs +1 -5
- package/dist/css/dist/css/generate.helpers.js +1 -5
- package/dist/styles/styler.d.cts +40 -40
- package/dist/styles/styler.d.ts +40 -40
- package/dist/tailwind-internal/dist/packages/automated-config/dist/generated/generatedConfigs.cjs +2 -2
- package/dist/tailwind-internal/dist/packages/automated-config/dist/generated/generatedConfigs.js +2 -2
- package/dist/tailwind-internal/dist/utils/getShadowStyles.d.cts +2 -2
- package/dist/tailwind-internal/dist/utils/getShadowStyles.d.ts +2 -2
- package/dist/tailwind-internal/dist/utils/parseTokens.cjs +9 -3
- package/dist/tailwind-internal/dist/utils/parseTokens.js +9 -3
- package/dist/uds/generated/componentData.cjs +1679 -1679
- package/dist/uds/generated/componentData.js +1679 -1679
- package/generated/componentData.json +2165 -2165
- package/package.json +1 -1
|
@@ -16,6 +16,9 @@ function shouldIncludeOpacity(opacity) {
|
|
|
16
16
|
const parsedOpacity = parseInt(opacity, 10);
|
|
17
17
|
return !isNaN(parsedOpacity) && parsedOpacity !== 100;
|
|
18
18
|
}
|
|
19
|
+
function formatColorVarWithOpacity(name, opacity) {
|
|
20
|
+
return shouldIncludeOpacity(opacity) ? `rgb(var(${name}) / ${opacity}%)` : `rgb(var(${name}))`;
|
|
21
|
+
}
|
|
19
22
|
function resolveFocusRingColor(color) {
|
|
20
23
|
switch (color.type) {
|
|
21
24
|
case "spectrum": return `rgb(var(--${SPECTRUM_COLOR_PREFIX}-${color.value.hue}-${color.value.step}))`;
|
|
@@ -43,7 +46,7 @@ function transformColors(colors, elevationPresets, focusRingConfig) {
|
|
|
43
46
|
const name = `--uds-${paletteType}-color-${paletteKey}`;
|
|
44
47
|
rootVars[name] = `var(--${SPECTRUM_COLOR_PREFIX}-${hue}-${step})`;
|
|
45
48
|
const opacityValue = opacity !== void 0 ? parseOpacityStep(opacity) : void 0;
|
|
46
|
-
tailwindConfig.palette[paletteType][paletteKey] =
|
|
49
|
+
tailwindConfig.palette[paletteType][paletteKey] = formatColorVarWithOpacity(name, opacityValue);
|
|
47
50
|
}
|
|
48
51
|
});
|
|
49
52
|
entries(elevationPresets).forEach(([level, elevationPreset]) => {
|
|
@@ -63,9 +66,12 @@ function transformColors(colors, elevationPresets, focusRingConfig) {
|
|
|
63
66
|
case "spectrum":
|
|
64
67
|
rootVars[name] = `rgb(var(--${SPECTRUM_COLOR_PREFIX}-${elevationPreset[key].value.hue}-${elevationPreset[key].value.step}))`;
|
|
65
68
|
break;
|
|
66
|
-
case "line":
|
|
67
|
-
|
|
69
|
+
case "line": {
|
|
70
|
+
const lineColor = palette.line[elevationPreset[key].value];
|
|
71
|
+
const opacityValue = lineColor.opacity !== void 0 ? parseOpacityStep(lineColor.opacity) : void 0;
|
|
72
|
+
rootVars[name] = formatColorVarWithOpacity(`--${LINE_COLOR_PREFIX}-${elevationPreset[key].value}`, opacityValue);
|
|
68
73
|
break;
|
|
74
|
+
}
|
|
69
75
|
}
|
|
70
76
|
}
|
|
71
77
|
if (key === "borderWidth") {
|