@yahoo/uds 3.125.1 → 3.127.0
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/autoVariants.cjs +60 -0
- package/dist/automated-config/dist/generated/autoVariants.d.cts +14 -0
- package/dist/automated-config/dist/generated/autoVariants.d.ts +14 -0
- package/dist/automated-config/dist/generated/autoVariants.js +60 -0
- package/dist/automated-config/dist/generated/generatedConfigs.cjs +5169 -495
- package/dist/automated-config/dist/generated/generatedConfigs.d.cts +526 -1
- package/dist/automated-config/dist/generated/generatedConfigs.d.ts +526 -1
- package/dist/automated-config/dist/generated/generatedConfigs.js +5167 -496
- package/dist/automated-config/dist/generated/universalTokensConfigAuto.cjs +2558 -1490
- package/dist/automated-config/dist/generated/universalTokensConfigAuto.d.cts +4 -1
- package/dist/automated-config/dist/generated/universalTokensConfigAuto.d.ts +4 -1
- package/dist/automated-config/dist/generated/universalTokensConfigAuto.js +2558 -1490
- package/dist/automated-config/dist/properties.cjs +12 -0
- package/dist/automated-config/dist/properties.d.cts +4 -0
- package/dist/automated-config/dist/properties.d.ts +4 -0
- package/dist/automated-config/dist/properties.js +12 -0
- package/dist/automated-config/dist/utils/getConfigVariantProperties.d.cts +2 -2
- package/dist/automated-config/dist/utils/getConfigVariantProperties.d.ts +2 -2
- package/dist/automated-config/dist/utils/index.cjs +103 -6
- package/dist/automated-config/dist/utils/index.js +103 -6
- package/dist/components/Banner/Banner.cjs +167 -0
- package/dist/components/Banner/Banner.d.cts +56 -0
- package/dist/components/Banner/Banner.d.ts +56 -0
- package/dist/components/Banner/Banner.js +165 -0
- package/dist/components/Banner/BannerContent.cjs +20 -0
- package/dist/components/Banner/BannerContent.d.cts +13 -0
- package/dist/components/Banner/BannerContent.d.ts +13 -0
- package/dist/components/Banner/BannerContent.js +18 -0
- package/dist/components/Banner/BannerDescription.cjs +47 -0
- package/dist/components/Banner/BannerDescription.d.cts +36 -0
- package/dist/components/Banner/BannerDescription.d.ts +36 -0
- package/dist/components/Banner/BannerDescription.js +45 -0
- package/dist/components/Banner/BannerTitle.cjs +42 -0
- package/dist/components/Banner/BannerTitle.d.cts +34 -0
- package/dist/components/Banner/BannerTitle.d.ts +34 -0
- package/dist/components/Banner/BannerTitle.js +40 -0
- package/dist/components/Banner/index.cjs +11 -0
- package/dist/components/Banner/index.d.cts +6 -0
- package/dist/components/Banner/index.d.ts +6 -0
- package/dist/components/Banner/index.js +7 -0
- package/dist/components/Banner/utils.cjs +56 -0
- package/dist/components/Banner/utils.d.cts +26 -0
- package/dist/components/Banner/utils.d.ts +26 -0
- package/dist/components/Banner/utils.js +52 -0
- package/dist/components/Divider/DividerCore.cjs +1 -1
- package/dist/components/Divider/DividerCore.js +1 -1
- package/dist/components/client/Avatar/AvatarIcon.cjs +2 -2
- package/dist/components/client/Avatar/AvatarIcon.js +2 -2
- package/dist/components/client/Avatar/AvatarText.cjs +1 -1
- package/dist/components/client/Avatar/AvatarText.js +1 -1
- package/dist/components/client/Badge.cjs +1 -1
- package/dist/components/client/Badge.js +1 -1
- package/dist/components/client/BottomSheet/BottomSheetHeader.cjs +1 -1
- package/dist/components/client/BottomSheet/BottomSheetHeader.js +1 -1
- package/dist/components/client/Button.cjs +1 -1
- package/dist/components/client/Button.js +1 -1
- package/dist/components/client/Checkbox.cjs +2 -2
- package/dist/components/client/Checkbox.js +2 -2
- package/dist/components/client/Chip/ChipBase.cjs +2 -2
- package/dist/components/client/Chip/ChipBase.js +2 -2
- package/dist/components/client/Chip/ChipDismissible.cjs +2 -2
- package/dist/components/client/Chip/ChipDismissible.js +2 -2
- package/dist/components/client/IconButton.cjs +1 -1
- package/dist/components/client/IconButton.js +1 -1
- package/dist/components/client/Input/Input.cjs +1 -1
- package/dist/components/client/Input/Input.js +1 -1
- package/dist/components/client/Input/InputHelpTextInternal.cjs +1 -1
- package/dist/components/client/Input/InputHelpTextInternal.js +1 -1
- package/dist/components/client/Menu/Menu.ItemBase.cjs +2 -2
- package/dist/components/client/Menu/Menu.ItemBase.js +2 -2
- package/dist/components/client/Menu/Menu.ItemCheckbox.cjs +1 -1
- 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/Menu/Menu.ItemCheckbox.js +1 -1
- package/dist/components/client/Popover/PopoverContent.cjs +3 -3
- package/dist/components/client/Popover/PopoverContent.js +3 -3
- package/dist/components/client/Popover/UDSPopoverConfigProvider.d.cts +1 -1
- package/dist/components/client/Popover/UDSPopoverConfigProvider.d.ts +1 -1
- package/dist/components/client/Switch.cjs +1 -1
- package/dist/components/client/Switch.js +1 -1
- package/dist/components/client/Tabs/Tab.cjs +80 -0
- package/dist/components/client/Tabs/Tab.d.cts +20 -0
- package/dist/components/client/Tabs/Tab.d.ts +21 -0
- package/dist/components/client/Tabs/Tab.js +78 -0
- package/dist/components/client/Tabs/TabList.cjs +132 -0
- package/dist/components/client/Tabs/TabList.d.cts +9 -0
- package/dist/components/client/Tabs/TabList.d.ts +10 -0
- package/dist/components/client/Tabs/TabList.js +130 -0
- package/dist/components/client/Tabs/TabPanel.cjs +22 -0
- package/dist/components/client/Tabs/TabPanel.d.cts +9 -0
- package/dist/components/client/Tabs/TabPanel.d.ts +10 -0
- package/dist/components/client/Tabs/TabPanel.js +20 -0
- package/dist/components/client/Tabs/Tabs.cjs +53 -0
- package/dist/components/client/Tabs/Tabs.d.cts +45 -0
- package/dist/components/client/Tabs/Tabs.d.ts +46 -0
- package/dist/components/client/Tabs/Tabs.js +51 -0
- package/dist/components/client/Tabs/index.cjs +12 -0
- package/dist/components/client/Tabs/index.d.cts +7 -0
- package/dist/components/client/Tabs/index.d.ts +8 -0
- package/dist/components/client/Tabs/index.js +8 -0
- package/dist/components/client/Tabs/tabsContext.cjs +18 -0
- package/dist/components/client/Tabs/tabsContext.d.cts +15 -0
- package/dist/components/client/Tabs/tabsContext.d.ts +16 -0
- package/dist/components/client/Tabs/tabsContext.js +15 -0
- package/dist/components/client/Toast/Toast.cjs +3 -3
- package/dist/components/client/Toast/Toast.js +3 -3
- package/dist/components/client/Toast/UDSToastConfigProvider.d.cts +5 -5
- package/dist/components/client/Toast/UDSToastConfigProvider.d.ts +5 -5
- package/dist/components/client/Tooltip/TooltipContent.cjs +2 -2
- package/dist/components/client/Tooltip/TooltipContent.js +2 -2
- package/dist/components/client/index.cjs +9 -1
- package/dist/components/client/index.d.cts +7 -1
- package/dist/components/client/index.d.ts +7 -1
- package/dist/components/client/index.js +6 -2
- package/dist/components/experimental/Spinner.cjs +1 -1
- package/dist/components/experimental/Spinner.js +1 -1
- package/dist/components/experimental/Table.cjs +1 -1
- package/dist/components/experimental/Table.js +1 -1
- package/dist/components/experimental/client/Accordion.cjs +4 -4
- package/dist/components/experimental/client/Accordion.js +4 -4
- package/dist/components/experimental/client/Modal.cjs +2 -2
- package/dist/components/experimental/client/Modal.js +2 -2
- package/dist/components/experimental/client/SegmentedControl.cjs +3 -3
- package/dist/components/experimental/client/SegmentedControl.js +3 -3
- package/dist/components/experimental/client/SwitchV2.cjs +1 -1
- package/dist/components/experimental/client/SwitchV2.js +1 -1
- package/dist/components/experimental/client/index.cjs +0 -5
- package/dist/components/experimental/client/index.d.cts +1 -2
- package/dist/components/experimental/client/index.d.ts +1 -2
- package/dist/components/experimental/client/index.js +1 -2
- package/dist/components/experimental/index.cjs +0 -9
- package/dist/components/experimental/index.d.cts +1 -2
- package/dist/components/experimental/index.d.ts +1 -2
- package/dist/components/experimental/index.js +1 -6
- package/dist/components/index.cjs +27 -3
- package/dist/components/index.d.cts +11 -1
- package/dist/components/index.d.ts +11 -1
- package/dist/components/index.js +20 -4
- package/dist/config/dist/index.cjs +1496 -339
- package/dist/config/dist/index.js +1496 -339
- package/dist/index.cjs +22 -3
- package/dist/index.d.cts +12 -3
- package/dist/index.d.ts +12 -3
- package/dist/index.js +13 -5
- package/dist/styles/styler.d.cts +107 -93
- package/dist/styles/styler.d.ts +107 -93
- package/dist/styles/variants.d.cts +74 -0
- package/dist/styles/variants.d.ts +74 -0
- package/dist/tailwind/dist/automated-config/dist/generated/autoVariants.cjs +60 -0
- package/dist/tailwind/dist/automated-config/dist/generated/autoVariants.js +60 -0
- package/dist/tailwind/dist/automated-config/dist/generated/autoVariants.js.map +1 -1
- package/dist/tailwind/dist/automated-config/dist/generated/generatedConfigs.cjs +5169 -495
- package/dist/tailwind/dist/automated-config/dist/generated/generatedConfigs.js +5167 -496
- package/dist/tailwind/dist/automated-config/dist/generated/generatedConfigs.js.map +1 -1
- package/dist/tailwind/dist/automated-config/dist/properties.cjs +12 -0
- package/dist/tailwind/dist/automated-config/dist/properties.js +12 -0
- package/dist/tailwind/dist/automated-config/dist/properties.js.map +1 -1
- package/dist/tailwind/dist/automated-config/dist/utils/index.cjs +103 -6
- package/dist/tailwind/dist/automated-config/dist/utils/index.js +103 -6
- package/dist/tailwind/dist/automated-config/dist/utils/index.js.map +1 -1
- package/dist/tailwind/dist/config/dist/index.cjs +1496 -339
- package/dist/tailwind/dist/config/dist/index.js +1496 -339
- package/dist/tailwind/dist/config/dist/index.js.map +1 -1
- package/dist/tailwind/dist/css/utils.cjs +3 -1
- package/dist/tailwind/dist/css/utils.js +3 -1
- package/dist/tailwind/dist/css/utils.js.map +1 -1
- package/dist/tailwind/dist/purger/optimized/utils/componentAnalyzer.cjs +36 -2
- package/dist/tailwind/dist/purger/optimized/utils/componentAnalyzer.js +36 -2
- package/dist/tailwind/dist/purger/optimized/utils/componentAnalyzer.js.map +1 -1
- package/dist/tailwind/dist/tailwind/plugins/components.cjs +3 -0
- package/dist/tailwind/dist/tailwind/plugins/components.js +4 -1
- package/dist/tailwind/dist/tailwind/plugins/components.js.map +1 -1
- package/dist/tailwind/dist/tailwind/utils/getShadowStyles.d.cts +4 -4
- package/dist/tailwind/dist/tailwind/utils/getShadowStyles.d.ts +4 -4
- package/dist/tailwind/dist/types/dist/index.d.cts.map +1 -1
- package/dist/tailwind/dist/types/dist/index.d.ts.map +1 -1
- package/dist/tokens/automation/configs/index.cjs +3 -0
- package/dist/tokens/automation/configs/index.d.cts +2 -2
- package/dist/tokens/automation/configs/index.d.ts +2 -2
- package/dist/tokens/automation/configs/index.js +2 -2
- package/dist/tokens/automation/index.cjs +3 -0
- package/dist/tokens/automation/index.d.cts +2 -2
- package/dist/tokens/automation/index.d.ts +2 -2
- package/dist/tokens/automation/index.js +2 -2
- package/dist/tokens/index.cjs +3 -0
- package/dist/tokens/index.d.cts +3 -3
- package/dist/tokens/index.d.ts +3 -3
- package/dist/tokens/index.js +2 -2
- package/dist/tokens/types.d.cts +2 -2
- package/dist/tokens/types.d.ts +2 -2
- package/dist/types/dist/index.d.cts +70 -1
- package/dist/types/dist/index.d.ts +70 -1
- package/dist/uds/generated/componentData.cjs +1030 -774
- package/dist/uds/generated/componentData.js +893 -679
- package/dist/uds/generated/tailwindPurge.cjs +41 -43
- package/dist/uds/generated/tailwindPurge.js +41 -43
- package/generated/componentData.json +1693 -1432
- package/generated/tailwindPurge.ts +4 -4
- package/package.json +1 -1
- package/dist/components/experimental/client/Tabs.cjs +0 -76
- package/dist/components/experimental/client/Tabs.d.cts +0 -31
- package/dist/components/experimental/client/Tabs.d.ts +0 -32
- package/dist/components/experimental/client/Tabs.js +0 -71
|
@@ -155,6 +155,11 @@ const strokeWidth = {
|
|
|
155
155
|
name: "strokeWidth",
|
|
156
156
|
cssProperties: "stroke-width"
|
|
157
157
|
};
|
|
158
|
+
const underlineWidth = {
|
|
159
|
+
...borderWidth,
|
|
160
|
+
name: "underlineWidth",
|
|
161
|
+
cssProperties: "border-bottom-width"
|
|
162
|
+
};
|
|
158
163
|
const borderColor = {
|
|
159
164
|
name: "borderColor",
|
|
160
165
|
cssProperties: "border-color",
|
|
@@ -175,6 +180,11 @@ const stroke = {
|
|
|
175
180
|
name: "stroke",
|
|
176
181
|
cssProperties: "stroke"
|
|
177
182
|
};
|
|
183
|
+
const underlineColor = {
|
|
184
|
+
...borderColor,
|
|
185
|
+
name: "underlineColor",
|
|
186
|
+
cssProperties: "border-bottom-color"
|
|
187
|
+
};
|
|
178
188
|
const outlineWidth = {
|
|
179
189
|
name: "outlineWidth",
|
|
180
190
|
cssProperties: "outline-width",
|
|
@@ -328,10 +338,12 @@ const opacity = {
|
|
|
328
338
|
const publicProperties = {
|
|
329
339
|
backgroundColor,
|
|
330
340
|
borderWidth,
|
|
341
|
+
underlineWidth,
|
|
331
342
|
strokeWidth,
|
|
332
343
|
borderRadius,
|
|
333
344
|
borderRadiusVar,
|
|
334
345
|
borderColor,
|
|
346
|
+
underlineColor,
|
|
335
347
|
stroke,
|
|
336
348
|
buttonSize: {
|
|
337
349
|
name: "buttonSize",
|
|
@@ -155,6 +155,11 @@ const strokeWidth = {
|
|
|
155
155
|
name: "strokeWidth",
|
|
156
156
|
cssProperties: "stroke-width"
|
|
157
157
|
};
|
|
158
|
+
const underlineWidth = {
|
|
159
|
+
...borderWidth,
|
|
160
|
+
name: "underlineWidth",
|
|
161
|
+
cssProperties: "border-bottom-width"
|
|
162
|
+
};
|
|
158
163
|
const borderColor = {
|
|
159
164
|
name: "borderColor",
|
|
160
165
|
cssProperties: "border-color",
|
|
@@ -175,6 +180,11 @@ const stroke = {
|
|
|
175
180
|
name: "stroke",
|
|
176
181
|
cssProperties: "stroke"
|
|
177
182
|
};
|
|
183
|
+
const underlineColor = {
|
|
184
|
+
...borderColor,
|
|
185
|
+
name: "underlineColor",
|
|
186
|
+
cssProperties: "border-bottom-color"
|
|
187
|
+
};
|
|
178
188
|
const outlineWidth = {
|
|
179
189
|
name: "outlineWidth",
|
|
180
190
|
cssProperties: "outline-width",
|
|
@@ -328,10 +338,12 @@ const opacity = {
|
|
|
328
338
|
const publicProperties = {
|
|
329
339
|
backgroundColor,
|
|
330
340
|
borderWidth,
|
|
341
|
+
underlineWidth,
|
|
331
342
|
strokeWidth,
|
|
332
343
|
borderRadius,
|
|
333
344
|
borderRadiusVar,
|
|
334
345
|
borderColor,
|
|
346
|
+
underlineColor,
|
|
335
347
|
stroke,
|
|
336
348
|
buttonSize: {
|
|
337
349
|
name: "buttonSize",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"properties.js","names":[],"sources":["../../../../automated-config/dist/properties.js"],"sourcesContent":["/*! © 2026 Yahoo, Inc. UDS Default Config v0.0.0-development */\nimport { assertUnreachable } from \"./utils/assertUnreachable.js\";\nimport { mapTextVariantFixtureToValue } from \"./mapTextVariantFixtureToValue.js\";\nimport { mapColorFixtureToValue } from \"./utils/mapColorFixtureToValue.js\";\nimport { BACKGROUND_BLUR_COLOR_PREFIX, BACKGROUND_BLUR_FALLBACK_COLOR_PREFIX, BORDER_RADIUS_PREFIX, BUTTON_SCALE_EFFECT, DROP_SHADOW_PREFIX, getShadowLayerValue, textVariantsSafe } from \"@yahoo/uds-css-tokens\";\nimport { SCALE_EFFECTS } from \"@yahoo/uds-motion-tokens\";\n\n//#region src/properties.ts\nconst isInputWrapperCtx = (context) => {\n\treturn context.componentName === \"input\" && context.layer === \"inputWrapper\";\n};\nconst hexToRgb = (hex) => {\n\thex = hex.replace(\"#\", \"\");\n\tif (hex.length === 3) hex = hex.split(\"\").map((char) => char + char).join(\"\");\n\treturn `${parseInt(hex.substring(0, 2), 16)} ${parseInt(hex.substring(2, 4), 16)} ${parseInt(hex.substring(4, 6), 16)}`;\n};\nconst backgroundColor = {\n\tname: \"backgroundColor\",\n\tcssProperties: \"background-color\",\n\ttwThemePath: () => {\n\t\treturn ``;\n\t},\n\tpossibleFixtures: [\n\t\t\"backgroundPaletteColors\",\n\t\t\"spectrumColors\",\n\t\t\"alwaysPaletteAliases\",\n\t\t\"elevationAliases\"\n\t],\n\tcustomValueRenderer: ({ value, type }, schema, theme) => {\n\t\tif (type === \"elevationAliases\") return `var(--uds-background-color-${value})`;\n\t\treturn theme(mapColorFixtureToValue(type, value));\n\t}\n};\nconst color = {\n\tname: \"color\",\n\tcssProperties: \"color\",\n\ttwThemePath: mapColorFixtureToValue,\n\tpossibleFixtures: [\n\t\t\"alwaysPaletteAliases\",\n\t\t\"spectrumColors\",\n\t\t\"foregroundPaletteColors\"\n\t]\n};\nconst fontSize = {\n\tname: \"fontSize\",\n\tcssProperties: \"font-size\",\n\ttwThemePath: mapTextVariantFixtureToValue(\"fontSize\"),\n\tpossibleFixtures: [\"textVariants\"]\n};\nconst fontVariationSettings = {\n\tname: \"fontVariationSettings\",\n\tcssProperties: \"font-variation-settings\",\n\ttwThemePath: () => {\n\t\treturn ``;\n\t},\n\tpossibleFixtures: [\"textVariants\"],\n\tcustomValueRenderer: (schemaValue) => {\n\t\tconst { value: rawValue } = schemaValue;\n\t\tconst value = textVariantsSafe(rawValue);\n\t\treturn `\"wght\" var(--uds-font-weight-${value}), \"slnt\" var(--uds-font-slant-${value}), \"ital\" var(--uds-font-slant-${value}), \"wdth\" var(--uds-font-width-${value})`;\n\t}\n};\nconst fontWeight = {\n\tname: \"fontWeight\",\n\tcssProperties: \"font-weight\",\n\ttwThemePath: mapTextVariantFixtureToValue(\"fontWeight\"),\n\tpossibleFixtures: [\"textVariants\"]\n};\nconst fontFamily = {\n\tname: \"fontFamily\",\n\tcssProperties: \"font-family\",\n\ttwThemePath: mapTextVariantFixtureToValue(\"fontFamily\"),\n\tpossibleFixtures: [\"textVariants\"]\n};\nconst textTransform = {\n\tname: \"textTransform\",\n\tcssProperties: \"text-transform\",\n\ttwThemePath: mapTextVariantFixtureToValue(\"textTransform\"),\n\tpossibleFixtures: [\"textVariants\"]\n};\nconst lineHeight = {\n\tname: \"lineHeight\",\n\tcssProperties: \"line-height\",\n\ttwThemePath: mapTextVariantFixtureToValue(\"lineHeight\"),\n\tpossibleFixtures: [\"textVariants\"]\n};\nconst letterSpacing = {\n\tname: \"letterSpacing\",\n\tcssProperties: \"letter-spacing\",\n\ttwThemePath: mapTextVariantFixtureToValue(\"letterSpacing\"),\n\tpossibleFixtures: [\"textVariants\"]\n};\nconst textVariant = {\n\tname: \"textVariant\",\n\tcssProperties: [],\n\ttwThemePath: () => {\n\t\treturn ``;\n\t},\n\tpossibleFixtures: [\"textVariants\"],\n\textendedProperties: [\n\t\t\"fontSize\",\n\t\t\"fontWeight\",\n\t\t\"fontFamily\",\n\t\t\"lineHeight\",\n\t\t\"textTransform\",\n\t\t\"fontVariationSettings\",\n\t\t\"letterSpacing\"\n\t]\n};\nconst textDecorationLine = {\n\tname: \"textDecorationLine\",\n\tcssProperties: \"text-decoration-line\",\n\tpossibleFixtures: [\"textDecorationLines\"],\n\ttwThemePath: () => {\n\t\treturn ``;\n\t},\n\tcustomValueRenderer: (schemaValue) => {\n\t\treturn String(schemaValue.value);\n\t}\n};\nconst gap = {\n\tname: \"gap\",\n\tcssProperties: \"gap\",\n\ttwThemePath: (fixtureType, value) => fixtureType === \"spacingAliases\" ? `spacing[${value}]` : \"\",\n\tpossibleFixtures: [\"spacingAliases\"]\n};\nconst borderWidth = {\n\tname: \"borderWidth\",\n\tcssProperties: \"border-width\",\n\ttwThemePath: (fixtureType, value) => {\n\t\tswitch (fixtureType) {\n\t\t\tcase \"borderWidths\":\n\t\t\tcase \"elevationAliases\": return `udsBorderWidth[${value}]`;\n\t\t\tcase \"spacingAliases\": return `spacing[${value}]`;\n\t\t}\n\t\treturn assertUnreachable(fixtureType);\n\t},\n\tpossibleFixtures: [\n\t\t\"borderWidths\",\n\t\t\"spacingAliases\",\n\t\t\"elevationAliases\"\n\t],\n\textendedProperties: (context) => {\n\t\tif (isInputWrapperCtx(context)) return [\n\t\t\t\"outlineWidth\",\n\t\t\t\"insetOutlineOffset\",\n\t\t\t\"solidOutline\"\n\t\t];\n\t\treturn false;\n\t}\n};\nconst strokeWidth = {\n\t...borderWidth,\n\tname: \"strokeWidth\",\n\tcssProperties: \"stroke-width\"\n};\nconst borderColor = {\n\tname: \"borderColor\",\n\tcssProperties: \"border-color\",\n\ttwThemePath: mapColorFixtureToValue,\n\tpossibleFixtures: [\n\t\t\"alwaysPaletteAliases\",\n\t\t\"spectrumColors\",\n\t\t\"linePaletteColors\",\n\t\t\"elevationAliases\"\n\t],\n\textendedProperties: (context) => {\n\t\tif (isInputWrapperCtx(context)) return [\"outlineColor\"];\n\t\treturn false;\n\t}\n};\nconst stroke = {\n\t...borderColor,\n\tname: \"stroke\",\n\tcssProperties: \"stroke\"\n};\nconst outlineWidth = {\n\tname: \"outlineWidth\",\n\tcssProperties: \"outline-width\",\n\ttwThemePath: (type, value) => type === \"borderWidths\" ? `udsBorderWidth[${value}]` : `spacing[${value}]`,\n\tpossibleFixtures: [\"borderWidths\", \"spacingAliases\"]\n};\nconst solidOutline = {\n\tname: \"solidOutline\",\n\tcssProperties: \"outline-style\",\n\ttwThemePath: () => \"\",\n\tcustomValueRenderer: () => \"solid\",\n\tpossibleFixtures: []\n};\nconst insetOutlineOffset = {\n\tname: \"insetOutlineOffset\",\n\tcssProperties: \"outline-offset\",\n\ttwThemePath: () => \"\",\n\tcustomValueRenderer: ({ value, type }, schema, theme) => {\n\t\treturn `calc(-1 * ${type === \"borderWidths\" ? theme(`udsBorderWidth[${value}]`) : theme(`spacing[${value}]`)})`;\n\t},\n\tpossibleFixtures: [\"borderWidths\", \"spacingAliases\"]\n};\nconst outlineColor = {\n\tname: \"outlineColor\",\n\tcssProperties: \"outline-color\",\n\ttwThemePath: mapColorFixtureToValue,\n\tpossibleFixtures: [\n\t\t\"alwaysPaletteAliases\",\n\t\t\"spectrumColors\",\n\t\t\"linePaletteColors\"\n\t]\n};\nconst borderRadius = {\n\tname: \"borderRadius\",\n\tcssProperties: \"border-radius\",\n\ttwThemePath: (_, value) => `udsBorderRadius.${value}`,\n\tpossibleFixtures: [\"borderRadii\"]\n};\nconst borderRadiusVar = {\n\t...borderRadius,\n\tname: \"borderRadiusVar\",\n\tcssProperties: `--${BORDER_RADIUS_PREFIX}`\n};\nconst spacing = {\n\tname: \"spacing\",\n\tcssProperties: \"padding\",\n\ttwThemePath: (_, value) => `spacing[${value}]`,\n\tpossibleFixtures: [\"spacingAliases\"]\n};\nconst spacingHorizontal = {\n\tname: \"spacingHorizontal\",\n\tcssProperties: [\"padding-right\", \"padding-left\"],\n\ttwThemePath: (_, value) => `spacing[${value}]`,\n\tpossibleFixtures: [\"spacingAliases\"]\n};\nconst spacingVertical = {\n\tname: \"spacingVertical\",\n\tcssProperties: [\"padding-top\", \"padding-bottom\"],\n\ttwThemePath: (_, value) => `spacing[${value}]`,\n\tpossibleFixtures: [\"spacingAliases\"]\n};\nconst horizontalMargin = {\n\tname: \"horizontalMargin\",\n\tcssProperties: [\"margin-left\", \"margin-right\"],\n\ttwThemePath: (_, value) => `spacing[${value}]`,\n\tpossibleFixtures: [\"spacingAliases\"]\n};\nconst bottomMargin = {\n\tname: \"bottomMargin\",\n\tcssProperties: \"margin-bottom\",\n\ttwThemePath: (_, value) => `spacing[${value}]`,\n\tpossibleFixtures: [\"spacingAliases\"]\n};\nconst height = {\n\tname: \"height\",\n\tcssProperties: \"height\",\n\ttwThemePath: (_, value) => {\n\t\treturn `height[${value}]`;\n\t},\n\tpossibleFixtures: [\"spacingAliases\"]\n};\nconst width = {\n\tname: \"width\",\n\tcssProperties: \"width\",\n\ttwThemePath: (_, value) => {\n\t\treturn `width[${value}]`;\n\t},\n\tpossibleFixtures: [\"spacingAliases\"]\n};\nconst shadow = {\n\tname: \"drop shadow\",\n\tcssProperties: \"box-shadow\",\n\ttwThemePath: () => {\n\t\treturn ``;\n\t},\n\tconcatenate: true,\n\tcustomValueRenderer: (schemaValue) => {\n\t\tconst shadowType = \"drop\";\n\t\tconst noneValue = \"0 0 0 transparent\";\n\t\tif (schemaValue.valueType === \"alias\") {\n\t\t\tconst noneValue = \"0 0 0 transparent\";\n\t\t\tif (schemaValue.value === \"none\") return noneValue;\n\t\t\tif (schemaValue.value !== \"custom\") return `var(--uds-${shadowType}-shadow-${schemaValue.value})`;\n\t\t} else if (schemaValue.valueType === \"custom\") return schemaValue.value.map((preset, index) => getShadowLayerValue({\n\t\t\tpreset,\n\t\t\tshadowType,\n\t\t\tprefix: index > 0 ? `${index + 1}` : void 0\n\t\t}))?.join(\", \") || noneValue;\n\t\tthrow new Error(\"Invalid valueType\");\n\t},\n\tpossibleFixtures: [\n\t\t\"shadowVariants\",\n\t\t\"shadowVariantConfig\",\n\t\t\"elevationAliases\"\n\t]\n};\nconst insetShadow = {\n\tname: \"inset shadow\",\n\tcssProperties: \"box-shadow\",\n\ttwThemePath: () => {\n\t\treturn ``;\n\t},\n\tconcatenate: true,\n\tcustomValueRenderer: (schemaValue) => {\n\t\tconst shadowType = \"inset\";\n\t\tconst noneValue = \"0 0 0 transparent\";\n\t\tif (schemaValue.valueType === \"alias\") {\n\t\t\tconst noneValue = \"0 0 0 transparent\";\n\t\t\tif (schemaValue.value === \"none\") return noneValue;\n\t\t\tif (schemaValue.value !== \"custom\") return `var(--uds-${shadowType}-shadow-${schemaValue.value})`;\n\t\t} else if (schemaValue.valueType === \"custom\") return schemaValue.value.map((preset, index) => getShadowLayerValue({\n\t\t\tpreset,\n\t\t\tshadowType,\n\t\t\tprefix: index > 0 ? `${index + 1}` : void 0\n\t\t}))?.join(\", \") || noneValue;\n\t\tthrow new Error(\"Invalid valueType\");\n\t},\n\tpossibleFixtures: [\"shadowVariantsWithInvert\"]\n};\nconst shadowVar = {\n\t...shadow,\n\tname: \"shadowVar\",\n\tcssProperties: `--${DROP_SHADOW_PREFIX}`\n};\nconst opacity = {\n\tname: \"opacity\",\n\tcssProperties: \"opacity\",\n\ttwThemePath: (_, value) => `opacity[${value}]`,\n\tpossibleFixtures: [\"opacitySteps\"]\n};\nconst publicProperties = {\n\tbackgroundColor,\n\tborderWidth,\n\tstrokeWidth,\n\tborderRadius,\n\tborderRadiusVar,\n\tborderColor,\n\tstroke,\n\tbuttonSize: {\n\t\tname: \"buttonSize\",\n\t\tcssProperties: \"--uds-button-size\",\n\t\tpossibleFixtures: [\"buttonSizes\"],\n\t\ttwThemePath: () => {\n\t\t\treturn ``;\n\t\t},\n\t\tcustomValueRenderer: (schemaValue) => {\n\t\t\treturn String(schemaValue.value);\n\t\t}\n\t},\n\tbuttonVariant: {\n\t\tname: \"buttonVariant\",\n\t\tcssProperties: \"--uds-button-variant\",\n\t\tpossibleFixtures: [\"buttonVariantsFlat\"],\n\t\ttwThemePath: () => {\n\t\t\treturn ``;\n\t\t},\n\t\tcustomValueRenderer: (schemaValue) => {\n\t\t\treturn String(schemaValue.value);\n\t\t}\n\t},\n\tfontFamily,\n\tfontSize,\n\tfontVariationSettings,\n\tlineHeight,\n\ttextTransform,\n\tletterSpacing,\n\tgap,\n\tcolor,\n\topacity,\n\tfillOpacity: {\n\t\tname: \"fillOpacity\",\n\t\tcssProperties: \"fill-opacity\",\n\t\ttwThemePath: (_, value) => `opacity[${value}]`,\n\t\tpossibleFixtures: [\"opacitySteps\"]\n\t},\n\tfontWeight,\n\ticonSize: {\n\t\tname: \"iconSize\",\n\t\tcssProperties: [\"width\", \"height\"],\n\t\ttwThemePath: (_, value) => `sizing.icon.${value}`,\n\t\tpossibleFixtures: [\"iconSizes\"]\n\t},\n\tspacing,\n\ticonVariant: {\n\t\tname: \"iconVariant\",\n\t\tcssProperties: \"--uds-icon-variant\",\n\t\tpossibleFixtures: [\"iconVariants\"],\n\t\ttwThemePath: () => {\n\t\t\treturn ``;\n\t\t},\n\t\tcustomValueRenderer: (schemaValue) => {\n\t\t\treturn String(schemaValue.value);\n\t\t}\n\t},\n\thorizontalMargin,\n\tbottomMargin,\n\tspacingHorizontal,\n\tspacingVertical,\n\ttextVariant,\n\ttextDecorationLine,\n\tshadow,\n\tshadowVar,\n\tinsetShadow,\n\theight,\n\twidth,\n\tscaleEffect: {\n\t\tname: \"scaleEffect\",\n\t\tcssProperties: BUTTON_SCALE_EFFECT,\n\t\tpossibleFixtures: [\"scaleEffects\"],\n\t\ttwThemePath: () => {\n\t\t\treturn ``;\n\t\t},\n\t\tcustomValueRenderer: (schemaValue) => {\n\t\t\tconst value = schemaValue.value;\n\t\t\tconst stringValue = String(value);\n\t\t\treturn String(SCALE_EFFECTS[stringValue] ?? SCALE_EFFECTS.none);\n\t\t}\n\t},\n\tbackdropBlur: {\n\t\tname: \"backdropBlur\",\n\t\tpossibleFixtures: [\"positiveIntegers\"],\n\t\tcssProperties: \"--uds-backdrop-blur\",\n\t\ttwThemePath: () => {\n\t\t\treturn ``;\n\t\t},\n\t\tcustomValueRenderer: (schemaValue, schema, _theme, originalPropertyDefinition) => {\n\t\t\tif (originalPropertyDefinition && originalPropertyDefinition.layerReference) {\n\t\t\t\tconst { variablePath, propertyName } = originalPropertyDefinition.layerReference;\n\t\t\t\tconst property = schema.variables[variablePath][propertyName].rest;\n\t\t\t\tif (property.type === \"elevationAliases\") return `var(--uds-background-blur-radius-${property.value})`;\n\t\t\t}\n\t\t\treturn `blur(${schemaValue.value}px)`;\n\t\t}\n\t},\n\tblurBackgroundColor: {\n\t\t...backgroundColor,\n\t\tname: \"blurBackgroundColor\",\n\t\tcssProperties: `--${BACKGROUND_BLUR_COLOR_PREFIX}`\n\t},\n\tblurBackgroundColorFallback: {\n\t\t...backgroundColor,\n\t\tname: \"blurBackgroundColorFallback\",\n\t\tcssProperties: `--${BACKGROUND_BLUR_FALLBACK_COLOR_PREFIX}`\n\t},\n\tscrimBackgroundColor: {\n\t\tname: \"scrimBackgroundColor\",\n\t\tcssProperties: \"--uds-scrim-background-color\",\n\t\ttwThemePath: () => {\n\t\t\treturn ``;\n\t\t},\n\t\tpossibleFixtures: [\n\t\t\t\"backgroundPaletteColors\",\n\t\t\t\"spectrumColors\",\n\t\t\t\"alwaysPaletteAliases\"\n\t\t],\n\t\tcustomValueRenderer: ({ value, type }, schema, theme) => {\n\t\t\tconst resolved = theme(mapColorFixtureToValue(type, value));\n\t\t\tif (resolved.startsWith(\"#\")) return hexToRgb(resolved) ?? resolved;\n\t\t\tif (resolved.startsWith(\"rgb(\") && resolved.endsWith(\")\")) return resolved.slice(4, -1);\n\t\t\treturn resolved;\n\t\t}\n\t},\n\tscrimOpacity: {\n\t\t...opacity,\n\t\tname: \"scrimOpacity\",\n\t\tcssProperties: \"--uds-scrim-opacity\",\n\t\ttwThemePath: () => \"\",\n\t\tcustomValueRenderer: ({ value }) => `${String(value)}%`\n\t}\n};\nconst internalProperties = {\n\toutlineWidth,\n\toutlineColor,\n\tinsetOutlineOffset,\n\tsolidOutline\n};\nconst configurableProperties = {\n\t...publicProperties,\n\t...internalProperties\n};\n\n//#endregion\nexport { configurableProperties };\n//# sourceMappingURL=properties.js.map"],"mappings":";;;;;;;;;AAQA,MAAM,qBAAqB,YAAY;AACtC,QAAO,QAAQ,kBAAkB,WAAW,QAAQ,UAAU;;AAE/D,MAAM,YAAY,QAAQ;AACzB,OAAM,IAAI,QAAQ,KAAK,GAAG;AAC1B,KAAI,IAAI,WAAW,EAAG,OAAM,IAAI,MAAM,GAAG,CAAC,KAAK,SAAS,OAAO,KAAK,CAAC,KAAK,GAAG;AAC7E,QAAO,GAAG,SAAS,IAAI,UAAU,GAAG,EAAE,EAAE,GAAG,CAAC,GAAG,SAAS,IAAI,UAAU,GAAG,EAAE,EAAE,GAAG,CAAC,GAAG,SAAS,IAAI,UAAU,GAAG,EAAE,EAAE,GAAG;;AAEtH,MAAM,kBAAkB;CACvB,MAAM;CACN,eAAe;CACf,mBAAmB;AAClB,SAAO;;CAER,kBAAkB;EACjB;EACA;EACA;EACA;EACA;CACD,sBAAsB,EAAE,OAAO,QAAQ,QAAQ,UAAU;AACxD,MAAI,SAAS,mBAAoB,QAAO,8BAA8B,MAAM;AAC5E,SAAO,MAAM,uBAAuB,MAAM,MAAM,CAAC;;CAElD;AACD,MAAM,QAAQ;CACb,MAAM;CACN,eAAe;CACf,aAAa;CACb,kBAAkB;EACjB;EACA;EACA;EACA;CACD;AACD,MAAM,WAAW;CAChB,MAAM;CACN,eAAe;CACf,aAAa,6BAA6B,WAAW;CACrD,kBAAkB,CAAC,eAAe;CAClC;AACD,MAAM,wBAAwB;CAC7B,MAAM;CACN,eAAe;CACf,mBAAmB;AAClB,SAAO;;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f,mBAAmB;AAClB,UAAO;;EAER,kBAAkB;GACjB;GACA;GACA;GACA;EACD,sBAAsB,EAAE,OAAO,QAAQ,QAAQ,UAAU;GACxD,MAAM,WAAW,MAAM,uBAAuB,MAAM,MAAM,CAAC;AAC3D,OAAI,SAAS,WAAW,IAAI,CAAE,QAAO,SAAS,SAAS,IAAI;AAC3D,OAAI,SAAS,WAAW,OAAO,IAAI,SAAS,SAAS,IAAI,CAAE,QAAO,SAAS,MAAM,GAAG,GAAG;AACvF,UAAO;;EAER;CACD,cAAc;EACb,GAAG;EACH,MAAM;EACN,eAAe;EACf,mBAAmB;EACnB,sBAAsB,EAAE,YAAY,GAAG,OAAO,MAAM,CAAC;EACrD;CACD;AACD,MAAM,qBAAqB;CAC1B;CACA;CACA;CACA;CACA;AACD,MAAM,yBAAyB;CAC9B,GAAG;CACH,GAAG;CACH"}
|
|
1
|
+
{"version":3,"file":"properties.js","names":[],"sources":["../../../../automated-config/dist/properties.js"],"sourcesContent":["/*! © 2026 Yahoo, Inc. UDS Default Config v0.0.0-development */\nimport { assertUnreachable } from \"./utils/assertUnreachable.js\";\nimport { mapTextVariantFixtureToValue } from \"./mapTextVariantFixtureToValue.js\";\nimport { mapColorFixtureToValue } from \"./utils/mapColorFixtureToValue.js\";\nimport { BACKGROUND_BLUR_COLOR_PREFIX, BACKGROUND_BLUR_FALLBACK_COLOR_PREFIX, BORDER_RADIUS_PREFIX, BUTTON_SCALE_EFFECT, DROP_SHADOW_PREFIX, getShadowLayerValue, textVariantsSafe } from \"@yahoo/uds-css-tokens\";\nimport { SCALE_EFFECTS } from \"@yahoo/uds-motion-tokens\";\n\n//#region src/properties.ts\nconst isInputWrapperCtx = (context) => {\n\treturn context.componentName === \"input\" && context.layer === \"inputWrapper\";\n};\nconst hexToRgb = (hex) => {\n\thex = hex.replace(\"#\", \"\");\n\tif (hex.length === 3) hex = hex.split(\"\").map((char) => char + char).join(\"\");\n\treturn `${parseInt(hex.substring(0, 2), 16)} ${parseInt(hex.substring(2, 4), 16)} ${parseInt(hex.substring(4, 6), 16)}`;\n};\nconst backgroundColor = {\n\tname: \"backgroundColor\",\n\tcssProperties: \"background-color\",\n\ttwThemePath: () => {\n\t\treturn ``;\n\t},\n\tpossibleFixtures: [\n\t\t\"backgroundPaletteColors\",\n\t\t\"spectrumColors\",\n\t\t\"alwaysPaletteAliases\",\n\t\t\"elevationAliases\"\n\t],\n\tcustomValueRenderer: ({ value, type }, schema, theme) => {\n\t\tif (type === \"elevationAliases\") return `var(--uds-background-color-${value})`;\n\t\treturn theme(mapColorFixtureToValue(type, value));\n\t}\n};\nconst color = {\n\tname: \"color\",\n\tcssProperties: \"color\",\n\ttwThemePath: mapColorFixtureToValue,\n\tpossibleFixtures: [\n\t\t\"alwaysPaletteAliases\",\n\t\t\"spectrumColors\",\n\t\t\"foregroundPaletteColors\"\n\t]\n};\nconst fontSize = {\n\tname: \"fontSize\",\n\tcssProperties: \"font-size\",\n\ttwThemePath: mapTextVariantFixtureToValue(\"fontSize\"),\n\tpossibleFixtures: [\"textVariants\"]\n};\nconst fontVariationSettings = {\n\tname: \"fontVariationSettings\",\n\tcssProperties: \"font-variation-settings\",\n\ttwThemePath: () => {\n\t\treturn ``;\n\t},\n\tpossibleFixtures: [\"textVariants\"],\n\tcustomValueRenderer: (schemaValue) => {\n\t\tconst { value: rawValue } = schemaValue;\n\t\tconst value = textVariantsSafe(rawValue);\n\t\treturn `\"wght\" var(--uds-font-weight-${value}), \"slnt\" var(--uds-font-slant-${value}), \"ital\" var(--uds-font-slant-${value}), \"wdth\" var(--uds-font-width-${value})`;\n\t}\n};\nconst fontWeight = {\n\tname: \"fontWeight\",\n\tcssProperties: \"font-weight\",\n\ttwThemePath: mapTextVariantFixtureToValue(\"fontWeight\"),\n\tpossibleFixtures: [\"textVariants\"]\n};\nconst fontFamily = {\n\tname: \"fontFamily\",\n\tcssProperties: \"font-family\",\n\ttwThemePath: mapTextVariantFixtureToValue(\"fontFamily\"),\n\tpossibleFixtures: [\"textVariants\"]\n};\nconst textTransform = {\n\tname: \"textTransform\",\n\tcssProperties: \"text-transform\",\n\ttwThemePath: mapTextVariantFixtureToValue(\"textTransform\"),\n\tpossibleFixtures: [\"textVariants\"]\n};\nconst lineHeight = {\n\tname: \"lineHeight\",\n\tcssProperties: \"line-height\",\n\ttwThemePath: mapTextVariantFixtureToValue(\"lineHeight\"),\n\tpossibleFixtures: [\"textVariants\"]\n};\nconst letterSpacing = {\n\tname: \"letterSpacing\",\n\tcssProperties: \"letter-spacing\",\n\ttwThemePath: mapTextVariantFixtureToValue(\"letterSpacing\"),\n\tpossibleFixtures: [\"textVariants\"]\n};\nconst textVariant = {\n\tname: \"textVariant\",\n\tcssProperties: [],\n\ttwThemePath: () => {\n\t\treturn ``;\n\t},\n\tpossibleFixtures: [\"textVariants\"],\n\textendedProperties: [\n\t\t\"fontSize\",\n\t\t\"fontWeight\",\n\t\t\"fontFamily\",\n\t\t\"lineHeight\",\n\t\t\"textTransform\",\n\t\t\"fontVariationSettings\",\n\t\t\"letterSpacing\"\n\t]\n};\nconst textDecorationLine = {\n\tname: \"textDecorationLine\",\n\tcssProperties: \"text-decoration-line\",\n\tpossibleFixtures: [\"textDecorationLines\"],\n\ttwThemePath: () => {\n\t\treturn ``;\n\t},\n\tcustomValueRenderer: (schemaValue) => {\n\t\treturn String(schemaValue.value);\n\t}\n};\nconst gap = {\n\tname: \"gap\",\n\tcssProperties: \"gap\",\n\ttwThemePath: (fixtureType, value) => fixtureType === \"spacingAliases\" ? `spacing[${value}]` : \"\",\n\tpossibleFixtures: [\"spacingAliases\"]\n};\nconst borderWidth = {\n\tname: \"borderWidth\",\n\tcssProperties: \"border-width\",\n\ttwThemePath: (fixtureType, value) => {\n\t\tswitch (fixtureType) {\n\t\t\tcase \"borderWidths\":\n\t\t\tcase \"elevationAliases\": return `udsBorderWidth[${value}]`;\n\t\t\tcase \"spacingAliases\": return `spacing[${value}]`;\n\t\t}\n\t\treturn assertUnreachable(fixtureType);\n\t},\n\tpossibleFixtures: [\n\t\t\"borderWidths\",\n\t\t\"spacingAliases\",\n\t\t\"elevationAliases\"\n\t],\n\textendedProperties: (context) => {\n\t\tif (isInputWrapperCtx(context)) return [\n\t\t\t\"outlineWidth\",\n\t\t\t\"insetOutlineOffset\",\n\t\t\t\"solidOutline\"\n\t\t];\n\t\treturn false;\n\t}\n};\nconst strokeWidth = {\n\t...borderWidth,\n\tname: \"strokeWidth\",\n\tcssProperties: \"stroke-width\"\n};\nconst underlineWidth = {\n\t...borderWidth,\n\tname: \"underlineWidth\",\n\tcssProperties: \"border-bottom-width\"\n};\nconst borderColor = {\n\tname: \"borderColor\",\n\tcssProperties: \"border-color\",\n\ttwThemePath: mapColorFixtureToValue,\n\tpossibleFixtures: [\n\t\t\"alwaysPaletteAliases\",\n\t\t\"spectrumColors\",\n\t\t\"linePaletteColors\",\n\t\t\"elevationAliases\"\n\t],\n\textendedProperties: (context) => {\n\t\tif (isInputWrapperCtx(context)) return [\"outlineColor\"];\n\t\treturn false;\n\t}\n};\nconst stroke = {\n\t...borderColor,\n\tname: \"stroke\",\n\tcssProperties: \"stroke\"\n};\nconst underlineColor = {\n\t...borderColor,\n\tname: \"underlineColor\",\n\tcssProperties: \"border-bottom-color\"\n};\nconst outlineWidth = {\n\tname: \"outlineWidth\",\n\tcssProperties: \"outline-width\",\n\ttwThemePath: (type, value) => type === \"borderWidths\" ? `udsBorderWidth[${value}]` : `spacing[${value}]`,\n\tpossibleFixtures: [\"borderWidths\", \"spacingAliases\"]\n};\nconst solidOutline = {\n\tname: \"solidOutline\",\n\tcssProperties: \"outline-style\",\n\ttwThemePath: () => \"\",\n\tcustomValueRenderer: () => \"solid\",\n\tpossibleFixtures: []\n};\nconst insetOutlineOffset = {\n\tname: \"insetOutlineOffset\",\n\tcssProperties: \"outline-offset\",\n\ttwThemePath: () => \"\",\n\tcustomValueRenderer: ({ value, type }, schema, theme) => {\n\t\treturn `calc(-1 * ${type === \"borderWidths\" ? theme(`udsBorderWidth[${value}]`) : theme(`spacing[${value}]`)})`;\n\t},\n\tpossibleFixtures: [\"borderWidths\", \"spacingAliases\"]\n};\nconst outlineColor = {\n\tname: \"outlineColor\",\n\tcssProperties: \"outline-color\",\n\ttwThemePath: mapColorFixtureToValue,\n\tpossibleFixtures: [\n\t\t\"alwaysPaletteAliases\",\n\t\t\"spectrumColors\",\n\t\t\"linePaletteColors\"\n\t]\n};\nconst borderRadius = {\n\tname: \"borderRadius\",\n\tcssProperties: \"border-radius\",\n\ttwThemePath: (_, value) => `udsBorderRadius.${value}`,\n\tpossibleFixtures: [\"borderRadii\"]\n};\nconst borderRadiusVar = {\n\t...borderRadius,\n\tname: \"borderRadiusVar\",\n\tcssProperties: `--${BORDER_RADIUS_PREFIX}`\n};\nconst spacing = {\n\tname: \"spacing\",\n\tcssProperties: \"padding\",\n\ttwThemePath: (_, value) => `spacing[${value}]`,\n\tpossibleFixtures: [\"spacingAliases\"]\n};\nconst spacingHorizontal = {\n\tname: \"spacingHorizontal\",\n\tcssProperties: [\"padding-right\", \"padding-left\"],\n\ttwThemePath: (_, value) => `spacing[${value}]`,\n\tpossibleFixtures: [\"spacingAliases\"]\n};\nconst spacingVertical = {\n\tname: \"spacingVertical\",\n\tcssProperties: [\"padding-top\", \"padding-bottom\"],\n\ttwThemePath: (_, value) => `spacing[${value}]`,\n\tpossibleFixtures: [\"spacingAliases\"]\n};\nconst horizontalMargin = {\n\tname: \"horizontalMargin\",\n\tcssProperties: [\"margin-left\", \"margin-right\"],\n\ttwThemePath: (_, value) => `spacing[${value}]`,\n\tpossibleFixtures: [\"spacingAliases\"]\n};\nconst bottomMargin = {\n\tname: \"bottomMargin\",\n\tcssProperties: \"margin-bottom\",\n\ttwThemePath: (_, value) => `spacing[${value}]`,\n\tpossibleFixtures: [\"spacingAliases\"]\n};\nconst height = {\n\tname: \"height\",\n\tcssProperties: \"height\",\n\ttwThemePath: (_, value) => {\n\t\treturn `height[${value}]`;\n\t},\n\tpossibleFixtures: [\"spacingAliases\"]\n};\nconst width = {\n\tname: \"width\",\n\tcssProperties: \"width\",\n\ttwThemePath: (_, value) => {\n\t\treturn `width[${value}]`;\n\t},\n\tpossibleFixtures: [\"spacingAliases\"]\n};\nconst shadow = {\n\tname: \"drop shadow\",\n\tcssProperties: \"box-shadow\",\n\ttwThemePath: () => {\n\t\treturn ``;\n\t},\n\tconcatenate: true,\n\tcustomValueRenderer: (schemaValue) => {\n\t\tconst shadowType = \"drop\";\n\t\tconst noneValue = \"0 0 0 transparent\";\n\t\tif (schemaValue.valueType === \"alias\") {\n\t\t\tconst noneValue = \"0 0 0 transparent\";\n\t\t\tif (schemaValue.value === \"none\") return noneValue;\n\t\t\tif (schemaValue.value !== \"custom\") return `var(--uds-${shadowType}-shadow-${schemaValue.value})`;\n\t\t} else if (schemaValue.valueType === \"custom\") return schemaValue.value.map((preset, index) => getShadowLayerValue({\n\t\t\tpreset,\n\t\t\tshadowType,\n\t\t\tprefix: index > 0 ? `${index + 1}` : void 0\n\t\t}))?.join(\", \") || noneValue;\n\t\tthrow new Error(\"Invalid valueType\");\n\t},\n\tpossibleFixtures: [\n\t\t\"shadowVariants\",\n\t\t\"shadowVariantConfig\",\n\t\t\"elevationAliases\"\n\t]\n};\nconst insetShadow = {\n\tname: \"inset shadow\",\n\tcssProperties: \"box-shadow\",\n\ttwThemePath: () => {\n\t\treturn ``;\n\t},\n\tconcatenate: true,\n\tcustomValueRenderer: (schemaValue) => {\n\t\tconst shadowType = \"inset\";\n\t\tconst noneValue = \"0 0 0 transparent\";\n\t\tif (schemaValue.valueType === \"alias\") {\n\t\t\tconst noneValue = \"0 0 0 transparent\";\n\t\t\tif (schemaValue.value === \"none\") return noneValue;\n\t\t\tif (schemaValue.value !== \"custom\") return `var(--uds-${shadowType}-shadow-${schemaValue.value})`;\n\t\t} else if (schemaValue.valueType === \"custom\") return schemaValue.value.map((preset, index) => getShadowLayerValue({\n\t\t\tpreset,\n\t\t\tshadowType,\n\t\t\tprefix: index > 0 ? `${index + 1}` : void 0\n\t\t}))?.join(\", \") || noneValue;\n\t\tthrow new Error(\"Invalid valueType\");\n\t},\n\tpossibleFixtures: [\"shadowVariantsWithInvert\"]\n};\nconst shadowVar = {\n\t...shadow,\n\tname: \"shadowVar\",\n\tcssProperties: `--${DROP_SHADOW_PREFIX}`\n};\nconst opacity = {\n\tname: \"opacity\",\n\tcssProperties: \"opacity\",\n\ttwThemePath: (_, value) => `opacity[${value}]`,\n\tpossibleFixtures: [\"opacitySteps\"]\n};\nconst publicProperties = {\n\tbackgroundColor,\n\tborderWidth,\n\tunderlineWidth,\n\tstrokeWidth,\n\tborderRadius,\n\tborderRadiusVar,\n\tborderColor,\n\tunderlineColor,\n\tstroke,\n\tbuttonSize: {\n\t\tname: \"buttonSize\",\n\t\tcssProperties: \"--uds-button-size\",\n\t\tpossibleFixtures: [\"buttonSizes\"],\n\t\ttwThemePath: () => {\n\t\t\treturn ``;\n\t\t},\n\t\tcustomValueRenderer: (schemaValue) => {\n\t\t\treturn String(schemaValue.value);\n\t\t}\n\t},\n\tbuttonVariant: {\n\t\tname: \"buttonVariant\",\n\t\tcssProperties: \"--uds-button-variant\",\n\t\tpossibleFixtures: [\"buttonVariantsFlat\"],\n\t\ttwThemePath: () => {\n\t\t\treturn ``;\n\t\t},\n\t\tcustomValueRenderer: (schemaValue) => {\n\t\t\treturn String(schemaValue.value);\n\t\t}\n\t},\n\tfontFamily,\n\tfontSize,\n\tfontVariationSettings,\n\tlineHeight,\n\ttextTransform,\n\tletterSpacing,\n\tgap,\n\tcolor,\n\topacity,\n\tfillOpacity: {\n\t\tname: \"fillOpacity\",\n\t\tcssProperties: \"fill-opacity\",\n\t\ttwThemePath: (_, value) => `opacity[${value}]`,\n\t\tpossibleFixtures: [\"opacitySteps\"]\n\t},\n\tfontWeight,\n\ticonSize: {\n\t\tname: \"iconSize\",\n\t\tcssProperties: [\"width\", \"height\"],\n\t\ttwThemePath: (_, value) => `sizing.icon.${value}`,\n\t\tpossibleFixtures: [\"iconSizes\"]\n\t},\n\tspacing,\n\ticonVariant: {\n\t\tname: \"iconVariant\",\n\t\tcssProperties: \"--uds-icon-variant\",\n\t\tpossibleFixtures: [\"iconVariants\"],\n\t\ttwThemePath: () => {\n\t\t\treturn ``;\n\t\t},\n\t\tcustomValueRenderer: (schemaValue) => {\n\t\t\treturn String(schemaValue.value);\n\t\t}\n\t},\n\thorizontalMargin,\n\tbottomMargin,\n\tspacingHorizontal,\n\tspacingVertical,\n\ttextVariant,\n\ttextDecorationLine,\n\tshadow,\n\tshadowVar,\n\tinsetShadow,\n\theight,\n\twidth,\n\tscaleEffect: {\n\t\tname: \"scaleEffect\",\n\t\tcssProperties: BUTTON_SCALE_EFFECT,\n\t\tpossibleFixtures: [\"scaleEffects\"],\n\t\ttwThemePath: () => {\n\t\t\treturn ``;\n\t\t},\n\t\tcustomValueRenderer: (schemaValue) => {\n\t\t\tconst value = schemaValue.value;\n\t\t\tconst stringValue = String(value);\n\t\t\treturn String(SCALE_EFFECTS[stringValue] ?? SCALE_EFFECTS.none);\n\t\t}\n\t},\n\tbackdropBlur: {\n\t\tname: \"backdropBlur\",\n\t\tpossibleFixtures: [\"positiveIntegers\"],\n\t\tcssProperties: \"--uds-backdrop-blur\",\n\t\ttwThemePath: () => {\n\t\t\treturn ``;\n\t\t},\n\t\tcustomValueRenderer: (schemaValue, schema, _theme, originalPropertyDefinition) => {\n\t\t\tif (originalPropertyDefinition && originalPropertyDefinition.layerReference) {\n\t\t\t\tconst { variablePath, propertyName } = originalPropertyDefinition.layerReference;\n\t\t\t\tconst property = schema.variables[variablePath][propertyName].rest;\n\t\t\t\tif (property.type === \"elevationAliases\") return `var(--uds-background-blur-radius-${property.value})`;\n\t\t\t}\n\t\t\treturn `blur(${schemaValue.value}px)`;\n\t\t}\n\t},\n\tblurBackgroundColor: {\n\t\t...backgroundColor,\n\t\tname: \"blurBackgroundColor\",\n\t\tcssProperties: `--${BACKGROUND_BLUR_COLOR_PREFIX}`\n\t},\n\tblurBackgroundColorFallback: {\n\t\t...backgroundColor,\n\t\tname: \"blurBackgroundColorFallback\",\n\t\tcssProperties: `--${BACKGROUND_BLUR_FALLBACK_COLOR_PREFIX}`\n\t},\n\tscrimBackgroundColor: {\n\t\tname: \"scrimBackgroundColor\",\n\t\tcssProperties: \"--uds-scrim-background-color\",\n\t\ttwThemePath: () => {\n\t\t\treturn ``;\n\t\t},\n\t\tpossibleFixtures: [\n\t\t\t\"backgroundPaletteColors\",\n\t\t\t\"spectrumColors\",\n\t\t\t\"alwaysPaletteAliases\"\n\t\t],\n\t\tcustomValueRenderer: ({ value, type }, schema, theme) => {\n\t\t\tconst resolved = theme(mapColorFixtureToValue(type, value));\n\t\t\tif (resolved.startsWith(\"#\")) return hexToRgb(resolved) ?? resolved;\n\t\t\tif (resolved.startsWith(\"rgb(\") && resolved.endsWith(\")\")) return resolved.slice(4, -1);\n\t\t\treturn resolved;\n\t\t}\n\t},\n\tscrimOpacity: {\n\t\t...opacity,\n\t\tname: \"scrimOpacity\",\n\t\tcssProperties: \"--uds-scrim-opacity\",\n\t\ttwThemePath: () => \"\",\n\t\tcustomValueRenderer: ({ value }) => `${String(value)}%`\n\t}\n};\nconst internalProperties = {\n\toutlineWidth,\n\toutlineColor,\n\tinsetOutlineOffset,\n\tsolidOutline\n};\nconst configurableProperties = {\n\t...publicProperties,\n\t...internalProperties\n};\n\n//#endregion\nexport { configurableProperties };\n//# sourceMappingURL=properties.js.map"],"mappings":";;;;;;;;;AAQA,MAAM,qBAAqB,YAAY;AACtC,QAAO,QAAQ,kBAAkB,WAAW,QAAQ,UAAU;;AAE/D,MAAM,YAAY,QAAQ;AACzB,OAAM,IAAI,QAAQ,KAAK,GAAG;AAC1B,KAAI,IAAI,WAAW,EAAG,OAAM,IAAI,MAAM,GAAG,CAAC,KAAK,SAAS,OAAO,KAAK,CAAC,KAAK,GAAG;AAC7E,QAAO,GAAG,SAAS,IAAI,UAAU,GAAG,EAAE,EAAE,GAAG,CAAC,GAA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AM,yBAAyB;CAC9B,GAAG;CACH,GAAG;CACH"}
|
|
@@ -14,6 +14,16 @@ const CSS_LINE_HEIGHT = "line-height";
|
|
|
14
14
|
const CSS_BORDER_WIDTH = "border-width";
|
|
15
15
|
const CSS_BORDER_COLOR = "border-color";
|
|
16
16
|
const CSS_BOX_SHADOW = "box-shadow";
|
|
17
|
+
const CSS_BORDER_TOP_WIDTH = "border-top-width";
|
|
18
|
+
const CSS_BORDER_RIGHT_WIDTH = "border-right-width";
|
|
19
|
+
const CSS_BORDER_BOTTOM_WIDTH = "border-bottom-width";
|
|
20
|
+
const CSS_BORDER_LEFT_WIDTH = "border-left-width";
|
|
21
|
+
const CSS_BORDER_TOP_COLOR = "border-top-color";
|
|
22
|
+
const CSS_BORDER_RIGHT_COLOR = "border-right-color";
|
|
23
|
+
const CSS_BORDER_BOTTOM_COLOR = "border-bottom-color";
|
|
24
|
+
const CSS_BORDER_LEFT_COLOR = "border-left-color";
|
|
25
|
+
const CSS_TAB_UNDERLINE_WIDTH = "--uds-tab-underline-width";
|
|
26
|
+
const CSS_TAB_UNDERLINE_COLOR = "--uds-tab-underline-color";
|
|
17
27
|
function deepMerge(target, source) {
|
|
18
28
|
return (0, lodash_es.mergeWith)({}, target, source);
|
|
19
29
|
}
|
|
@@ -29,6 +39,14 @@ const COMPONENTS_WITH_SHADOW_BORDERS = [
|
|
|
29
39
|
{
|
|
30
40
|
componentName: "chip",
|
|
31
41
|
layer: "root"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
componentName: "tab",
|
|
45
|
+
layer: "root"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
componentName: "tabs",
|
|
49
|
+
layer: "root"
|
|
32
50
|
}
|
|
33
51
|
];
|
|
34
52
|
/**
|
|
@@ -89,19 +107,48 @@ function getButtonLineHeightWithIconMinimum({ lineHeight, schema, iconLayerKey,
|
|
|
89
107
|
* @example
|
|
90
108
|
* Input: { border-width: '2px', border-color: 'red', box-shadow: '0 2px 4px rgba(0,0,0,0.1)' }
|
|
91
109
|
* Output: { box-shadow: 'inset 0 0 0 2px red, 0 2px 4px rgba(0,0,0,0.1)' }
|
|
110
|
+
* Renders borders using inset box-shadows instead of CSS border widths.
|
|
111
|
+
* This preserves visual borders without affecting layout dimensions.
|
|
92
112
|
*/
|
|
93
113
|
function applyBoxShadowBorder(classStyles) {
|
|
94
|
-
const borderWidth = classStyles[CSS_BORDER_WIDTH];
|
|
95
|
-
const borderColor = classStyles[CSS_BORDER_COLOR];
|
|
96
|
-
if (!borderWidth || !borderColor) return classStyles;
|
|
97
114
|
const stripImportant = (value) => value.replace(/\s*!important\s*$/, "");
|
|
98
115
|
const hasImportant = (value) => value?.includes("!important") ?? false;
|
|
99
|
-
const
|
|
100
|
-
const
|
|
116
|
+
const isZeroWidth = (value) => !value || /^(0|0px|0rem|0em|0%)$/i.test(stripImportant(value).trim());
|
|
117
|
+
const negateLength = (value) => {
|
|
118
|
+
const normalized = stripImportant(value).trim();
|
|
119
|
+
if (/^(0|0px|0rem|0em|0%)$/i.test(normalized)) return "0";
|
|
120
|
+
return `calc(${normalized} * -1)`;
|
|
121
|
+
};
|
|
122
|
+
const borderWidth = classStyles[CSS_BORDER_WIDTH];
|
|
123
|
+
const borderColor = classStyles[CSS_BORDER_COLOR];
|
|
124
|
+
const topWidth = classStyles[CSS_BORDER_TOP_WIDTH] ?? borderWidth;
|
|
125
|
+
const rightWidth = classStyles[CSS_BORDER_RIGHT_WIDTH] ?? borderWidth;
|
|
126
|
+
const bottomWidth = classStyles[CSS_BORDER_BOTTOM_WIDTH] ?? borderWidth;
|
|
127
|
+
const leftWidth = classStyles[CSS_BORDER_LEFT_WIDTH] ?? borderWidth;
|
|
128
|
+
const topColor = classStyles[CSS_BORDER_TOP_COLOR] ?? borderColor;
|
|
129
|
+
const rightColor = classStyles[CSS_BORDER_RIGHT_COLOR] ?? borderColor;
|
|
130
|
+
const bottomColor = classStyles[CSS_BORDER_BOTTOM_COLOR] ?? borderColor;
|
|
131
|
+
const leftColor = classStyles[CSS_BORDER_LEFT_COLOR] ?? borderColor;
|
|
132
|
+
const borderLayers = [];
|
|
133
|
+
if (!isZeroWidth(topWidth) && topColor) borderLayers.push(`inset 0 ${stripImportant(topWidth)} 0 0 ${stripImportant(topColor)}`);
|
|
134
|
+
if (!isZeroWidth(rightWidth) && rightColor) borderLayers.push(`inset ${negateLength(rightWidth)} 0 0 0 ${stripImportant(rightColor)}`);
|
|
135
|
+
if (!isZeroWidth(bottomWidth) && bottomColor) borderLayers.push(`inset 0 ${negateLength(bottomWidth)} 0 0 ${stripImportant(bottomColor)}`);
|
|
136
|
+
if (!isZeroWidth(leftWidth) && leftColor) borderLayers.push(`inset ${stripImportant(leftWidth)} 0 0 0 ${stripImportant(leftColor)}`);
|
|
137
|
+
if (borderLayers.length === 0) return classStyles;
|
|
138
|
+
const layers = [...borderLayers, classStyles[CSS_BOX_SHADOW] && stripImportant(classStyles[CSS_BOX_SHADOW])].filter(Boolean);
|
|
139
|
+
const needsImportant = hasImportant(topWidth) || hasImportant(rightWidth) || hasImportant(bottomWidth) || hasImportant(leftWidth) || hasImportant(topColor) || hasImportant(rightColor) || hasImportant(bottomColor) || hasImportant(leftColor) || hasImportant(borderWidth) || hasImportant(borderColor) || hasImportant(classStyles[CSS_BOX_SHADOW]);
|
|
101
140
|
const newStyles = { ...classStyles };
|
|
102
141
|
newStyles[CSS_BOX_SHADOW] = layers.join(", ") + (needsImportant ? " !important" : "");
|
|
103
142
|
delete newStyles[CSS_BORDER_WIDTH];
|
|
104
143
|
delete newStyles[CSS_BORDER_COLOR];
|
|
144
|
+
delete newStyles[CSS_BORDER_TOP_WIDTH];
|
|
145
|
+
delete newStyles[CSS_BORDER_RIGHT_WIDTH];
|
|
146
|
+
delete newStyles[CSS_BORDER_BOTTOM_WIDTH];
|
|
147
|
+
delete newStyles[CSS_BORDER_LEFT_WIDTH];
|
|
148
|
+
delete newStyles[CSS_BORDER_TOP_COLOR];
|
|
149
|
+
delete newStyles[CSS_BORDER_RIGHT_COLOR];
|
|
150
|
+
delete newStyles[CSS_BORDER_BOTTOM_COLOR];
|
|
151
|
+
delete newStyles[CSS_BORDER_LEFT_COLOR];
|
|
105
152
|
return newStyles;
|
|
106
153
|
}
|
|
107
154
|
function generateClassName({ componentName, subComponentName, variantKey, variantValue, componentStateKey, componentStateValue, layer, layerOptionalPseudoSelector }) {
|
|
@@ -256,6 +303,43 @@ function generateDeclaration({ componentName, subComponentName, variantKey, vari
|
|
|
256
303
|
});
|
|
257
304
|
}
|
|
258
305
|
}
|
|
306
|
+
if ((componentName === "tabs" || componentName === "tab") && layer === "root") {
|
|
307
|
+
const schemaVariablesForKey = schema?.variables?.[schemaKey];
|
|
308
|
+
if (propertyKey === "borderWidth" && schemaVariablesForKey?.underlineWidth) {
|
|
309
|
+
const borderWidth = cssDeclarations[CSS_BORDER_WIDTH];
|
|
310
|
+
if (borderWidth) {
|
|
311
|
+
cssDeclarations[CSS_BORDER_TOP_WIDTH] = borderWidth;
|
|
312
|
+
cssDeclarations[CSS_BORDER_RIGHT_WIDTH] = borderWidth;
|
|
313
|
+
cssDeclarations[CSS_BORDER_BOTTOM_WIDTH] = borderWidth;
|
|
314
|
+
cssDeclarations[CSS_BORDER_LEFT_WIDTH] = borderWidth;
|
|
315
|
+
delete cssDeclarations[CSS_BORDER_WIDTH];
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
if (propertyKey === "borderColor" && schemaVariablesForKey?.underlineColor) {
|
|
319
|
+
const borderColor = cssDeclarations[CSS_BORDER_COLOR];
|
|
320
|
+
if (borderColor) {
|
|
321
|
+
cssDeclarations[CSS_BORDER_TOP_COLOR] = borderColor;
|
|
322
|
+
cssDeclarations[CSS_BORDER_RIGHT_COLOR] = borderColor;
|
|
323
|
+
cssDeclarations[CSS_BORDER_BOTTOM_COLOR] = borderColor;
|
|
324
|
+
cssDeclarations[CSS_BORDER_LEFT_COLOR] = borderColor;
|
|
325
|
+
delete cssDeclarations[CSS_BORDER_COLOR];
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
if (propertyKey === "underlineWidth") {
|
|
329
|
+
const underlineWidth = cssDeclarations[CSS_BORDER_BOTTOM_WIDTH];
|
|
330
|
+
if (underlineWidth) {
|
|
331
|
+
cssDeclarations[CSS_TAB_UNDERLINE_WIDTH] = underlineWidth;
|
|
332
|
+
delete cssDeclarations[CSS_BORDER_BOTTOM_WIDTH];
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
if (propertyKey === "underlineColor") {
|
|
336
|
+
const underlineColor = cssDeclarations[CSS_BORDER_BOTTOM_COLOR];
|
|
337
|
+
if (underlineColor) {
|
|
338
|
+
cssDeclarations[CSS_TAB_UNDERLINE_COLOR] = underlineColor;
|
|
339
|
+
delete cssDeclarations[CSS_BORDER_BOTTOM_COLOR];
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
}
|
|
259
343
|
if (!styles[fullClassName]) styles[fullClassName] = {
|
|
260
344
|
...cssDeclarations,
|
|
261
345
|
...styles[fullClassName]
|
|
@@ -397,7 +481,20 @@ function generateConfigStyles(config, schema, theme, previewOptions) {
|
|
|
397
481
|
*/
|
|
398
482
|
const toApply = COMPONENTS_WITH_SHADOW_BORDERS.find((c) => c.componentName === componentName);
|
|
399
483
|
if (toApply) {
|
|
400
|
-
for (const className in styles) if (className.includes(`-${toApply.layer}`.toLowerCase()))
|
|
484
|
+
for (const className in styles) if (className.includes(`-${toApply.layer}`.toLowerCase())) {
|
|
485
|
+
const raw = styles[className];
|
|
486
|
+
if (toApply.componentName === "tab") {
|
|
487
|
+
const tabUnderlineWidth = raw[CSS_TAB_UNDERLINE_WIDTH];
|
|
488
|
+
const tabUnderlineColor = raw[CSS_TAB_UNDERLINE_COLOR];
|
|
489
|
+
const withoutTabUnderline = { ...raw };
|
|
490
|
+
delete withoutTabUnderline[CSS_TAB_UNDERLINE_WIDTH];
|
|
491
|
+
delete withoutTabUnderline[CSS_TAB_UNDERLINE_COLOR];
|
|
492
|
+
const merged = applyBoxShadowBorder(withoutTabUnderline);
|
|
493
|
+
if (tabUnderlineWidth !== void 0) merged[CSS_TAB_UNDERLINE_WIDTH] = tabUnderlineWidth;
|
|
494
|
+
if (tabUnderlineColor !== void 0) merged[CSS_TAB_UNDERLINE_COLOR] = tabUnderlineColor;
|
|
495
|
+
styles[className] = merged;
|
|
496
|
+
} else styles[className] = applyBoxShadowBorder(raw);
|
|
497
|
+
}
|
|
401
498
|
}
|
|
402
499
|
return styles;
|
|
403
500
|
}
|
|
@@ -13,6 +13,16 @@ const CSS_LINE_HEIGHT = "line-height";
|
|
|
13
13
|
const CSS_BORDER_WIDTH = "border-width";
|
|
14
14
|
const CSS_BORDER_COLOR = "border-color";
|
|
15
15
|
const CSS_BOX_SHADOW = "box-shadow";
|
|
16
|
+
const CSS_BORDER_TOP_WIDTH = "border-top-width";
|
|
17
|
+
const CSS_BORDER_RIGHT_WIDTH = "border-right-width";
|
|
18
|
+
const CSS_BORDER_BOTTOM_WIDTH = "border-bottom-width";
|
|
19
|
+
const CSS_BORDER_LEFT_WIDTH = "border-left-width";
|
|
20
|
+
const CSS_BORDER_TOP_COLOR = "border-top-color";
|
|
21
|
+
const CSS_BORDER_RIGHT_COLOR = "border-right-color";
|
|
22
|
+
const CSS_BORDER_BOTTOM_COLOR = "border-bottom-color";
|
|
23
|
+
const CSS_BORDER_LEFT_COLOR = "border-left-color";
|
|
24
|
+
const CSS_TAB_UNDERLINE_WIDTH = "--uds-tab-underline-width";
|
|
25
|
+
const CSS_TAB_UNDERLINE_COLOR = "--uds-tab-underline-color";
|
|
16
26
|
function deepMerge(target, source) {
|
|
17
27
|
return mergeWith({}, target, source);
|
|
18
28
|
}
|
|
@@ -28,6 +38,14 @@ const COMPONENTS_WITH_SHADOW_BORDERS = [
|
|
|
28
38
|
{
|
|
29
39
|
componentName: "chip",
|
|
30
40
|
layer: "root"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
componentName: "tab",
|
|
44
|
+
layer: "root"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
componentName: "tabs",
|
|
48
|
+
layer: "root"
|
|
31
49
|
}
|
|
32
50
|
];
|
|
33
51
|
/**
|
|
@@ -88,19 +106,48 @@ function getButtonLineHeightWithIconMinimum({ lineHeight, schema, iconLayerKey,
|
|
|
88
106
|
* @example
|
|
89
107
|
* Input: { border-width: '2px', border-color: 'red', box-shadow: '0 2px 4px rgba(0,0,0,0.1)' }
|
|
90
108
|
* Output: { box-shadow: 'inset 0 0 0 2px red, 0 2px 4px rgba(0,0,0,0.1)' }
|
|
109
|
+
* Renders borders using inset box-shadows instead of CSS border widths.
|
|
110
|
+
* This preserves visual borders without affecting layout dimensions.
|
|
91
111
|
*/
|
|
92
112
|
function applyBoxShadowBorder(classStyles) {
|
|
93
|
-
const borderWidth = classStyles[CSS_BORDER_WIDTH];
|
|
94
|
-
const borderColor = classStyles[CSS_BORDER_COLOR];
|
|
95
|
-
if (!borderWidth || !borderColor) return classStyles;
|
|
96
113
|
const stripImportant = (value) => value.replace(/\s*!important\s*$/, "");
|
|
97
114
|
const hasImportant = (value) => value?.includes("!important") ?? false;
|
|
98
|
-
const
|
|
99
|
-
const
|
|
115
|
+
const isZeroWidth = (value) => !value || /^(0|0px|0rem|0em|0%)$/i.test(stripImportant(value).trim());
|
|
116
|
+
const negateLength = (value) => {
|
|
117
|
+
const normalized = stripImportant(value).trim();
|
|
118
|
+
if (/^(0|0px|0rem|0em|0%)$/i.test(normalized)) return "0";
|
|
119
|
+
return `calc(${normalized} * -1)`;
|
|
120
|
+
};
|
|
121
|
+
const borderWidth = classStyles[CSS_BORDER_WIDTH];
|
|
122
|
+
const borderColor = classStyles[CSS_BORDER_COLOR];
|
|
123
|
+
const topWidth = classStyles[CSS_BORDER_TOP_WIDTH] ?? borderWidth;
|
|
124
|
+
const rightWidth = classStyles[CSS_BORDER_RIGHT_WIDTH] ?? borderWidth;
|
|
125
|
+
const bottomWidth = classStyles[CSS_BORDER_BOTTOM_WIDTH] ?? borderWidth;
|
|
126
|
+
const leftWidth = classStyles[CSS_BORDER_LEFT_WIDTH] ?? borderWidth;
|
|
127
|
+
const topColor = classStyles[CSS_BORDER_TOP_COLOR] ?? borderColor;
|
|
128
|
+
const rightColor = classStyles[CSS_BORDER_RIGHT_COLOR] ?? borderColor;
|
|
129
|
+
const bottomColor = classStyles[CSS_BORDER_BOTTOM_COLOR] ?? borderColor;
|
|
130
|
+
const leftColor = classStyles[CSS_BORDER_LEFT_COLOR] ?? borderColor;
|
|
131
|
+
const borderLayers = [];
|
|
132
|
+
if (!isZeroWidth(topWidth) && topColor) borderLayers.push(`inset 0 ${stripImportant(topWidth)} 0 0 ${stripImportant(topColor)}`);
|
|
133
|
+
if (!isZeroWidth(rightWidth) && rightColor) borderLayers.push(`inset ${negateLength(rightWidth)} 0 0 0 ${stripImportant(rightColor)}`);
|
|
134
|
+
if (!isZeroWidth(bottomWidth) && bottomColor) borderLayers.push(`inset 0 ${negateLength(bottomWidth)} 0 0 ${stripImportant(bottomColor)}`);
|
|
135
|
+
if (!isZeroWidth(leftWidth) && leftColor) borderLayers.push(`inset ${stripImportant(leftWidth)} 0 0 0 ${stripImportant(leftColor)}`);
|
|
136
|
+
if (borderLayers.length === 0) return classStyles;
|
|
137
|
+
const layers = [...borderLayers, classStyles[CSS_BOX_SHADOW] && stripImportant(classStyles[CSS_BOX_SHADOW])].filter(Boolean);
|
|
138
|
+
const needsImportant = hasImportant(topWidth) || hasImportant(rightWidth) || hasImportant(bottomWidth) || hasImportant(leftWidth) || hasImportant(topColor) || hasImportant(rightColor) || hasImportant(bottomColor) || hasImportant(leftColor) || hasImportant(borderWidth) || hasImportant(borderColor) || hasImportant(classStyles[CSS_BOX_SHADOW]);
|
|
100
139
|
const newStyles = { ...classStyles };
|
|
101
140
|
newStyles[CSS_BOX_SHADOW] = layers.join(", ") + (needsImportant ? " !important" : "");
|
|
102
141
|
delete newStyles[CSS_BORDER_WIDTH];
|
|
103
142
|
delete newStyles[CSS_BORDER_COLOR];
|
|
143
|
+
delete newStyles[CSS_BORDER_TOP_WIDTH];
|
|
144
|
+
delete newStyles[CSS_BORDER_RIGHT_WIDTH];
|
|
145
|
+
delete newStyles[CSS_BORDER_BOTTOM_WIDTH];
|
|
146
|
+
delete newStyles[CSS_BORDER_LEFT_WIDTH];
|
|
147
|
+
delete newStyles[CSS_BORDER_TOP_COLOR];
|
|
148
|
+
delete newStyles[CSS_BORDER_RIGHT_COLOR];
|
|
149
|
+
delete newStyles[CSS_BORDER_BOTTOM_COLOR];
|
|
150
|
+
delete newStyles[CSS_BORDER_LEFT_COLOR];
|
|
104
151
|
return newStyles;
|
|
105
152
|
}
|
|
106
153
|
function generateClassName({ componentName, subComponentName, variantKey, variantValue, componentStateKey, componentStateValue, layer, layerOptionalPseudoSelector }) {
|
|
@@ -255,6 +302,43 @@ function generateDeclaration({ componentName, subComponentName, variantKey, vari
|
|
|
255
302
|
});
|
|
256
303
|
}
|
|
257
304
|
}
|
|
305
|
+
if ((componentName === "tabs" || componentName === "tab") && layer === "root") {
|
|
306
|
+
const schemaVariablesForKey = schema?.variables?.[schemaKey];
|
|
307
|
+
if (propertyKey === "borderWidth" && schemaVariablesForKey?.underlineWidth) {
|
|
308
|
+
const borderWidth = cssDeclarations[CSS_BORDER_WIDTH];
|
|
309
|
+
if (borderWidth) {
|
|
310
|
+
cssDeclarations[CSS_BORDER_TOP_WIDTH] = borderWidth;
|
|
311
|
+
cssDeclarations[CSS_BORDER_RIGHT_WIDTH] = borderWidth;
|
|
312
|
+
cssDeclarations[CSS_BORDER_BOTTOM_WIDTH] = borderWidth;
|
|
313
|
+
cssDeclarations[CSS_BORDER_LEFT_WIDTH] = borderWidth;
|
|
314
|
+
delete cssDeclarations[CSS_BORDER_WIDTH];
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
if (propertyKey === "borderColor" && schemaVariablesForKey?.underlineColor) {
|
|
318
|
+
const borderColor = cssDeclarations[CSS_BORDER_COLOR];
|
|
319
|
+
if (borderColor) {
|
|
320
|
+
cssDeclarations[CSS_BORDER_TOP_COLOR] = borderColor;
|
|
321
|
+
cssDeclarations[CSS_BORDER_RIGHT_COLOR] = borderColor;
|
|
322
|
+
cssDeclarations[CSS_BORDER_BOTTOM_COLOR] = borderColor;
|
|
323
|
+
cssDeclarations[CSS_BORDER_LEFT_COLOR] = borderColor;
|
|
324
|
+
delete cssDeclarations[CSS_BORDER_COLOR];
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
if (propertyKey === "underlineWidth") {
|
|
328
|
+
const underlineWidth = cssDeclarations[CSS_BORDER_BOTTOM_WIDTH];
|
|
329
|
+
if (underlineWidth) {
|
|
330
|
+
cssDeclarations[CSS_TAB_UNDERLINE_WIDTH] = underlineWidth;
|
|
331
|
+
delete cssDeclarations[CSS_BORDER_BOTTOM_WIDTH];
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
if (propertyKey === "underlineColor") {
|
|
335
|
+
const underlineColor = cssDeclarations[CSS_BORDER_BOTTOM_COLOR];
|
|
336
|
+
if (underlineColor) {
|
|
337
|
+
cssDeclarations[CSS_TAB_UNDERLINE_COLOR] = underlineColor;
|
|
338
|
+
delete cssDeclarations[CSS_BORDER_BOTTOM_COLOR];
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
}
|
|
258
342
|
if (!styles[fullClassName]) styles[fullClassName] = {
|
|
259
343
|
...cssDeclarations,
|
|
260
344
|
...styles[fullClassName]
|
|
@@ -396,7 +480,20 @@ function generateConfigStyles(config, schema, theme, previewOptions) {
|
|
|
396
480
|
*/
|
|
397
481
|
const toApply = COMPONENTS_WITH_SHADOW_BORDERS.find((c) => c.componentName === componentName);
|
|
398
482
|
if (toApply) {
|
|
399
|
-
for (const className in styles) if (className.includes(`-${toApply.layer}`.toLowerCase()))
|
|
483
|
+
for (const className in styles) if (className.includes(`-${toApply.layer}`.toLowerCase())) {
|
|
484
|
+
const raw = styles[className];
|
|
485
|
+
if (toApply.componentName === "tab") {
|
|
486
|
+
const tabUnderlineWidth = raw[CSS_TAB_UNDERLINE_WIDTH];
|
|
487
|
+
const tabUnderlineColor = raw[CSS_TAB_UNDERLINE_COLOR];
|
|
488
|
+
const withoutTabUnderline = { ...raw };
|
|
489
|
+
delete withoutTabUnderline[CSS_TAB_UNDERLINE_WIDTH];
|
|
490
|
+
delete withoutTabUnderline[CSS_TAB_UNDERLINE_COLOR];
|
|
491
|
+
const merged = applyBoxShadowBorder(withoutTabUnderline);
|
|
492
|
+
if (tabUnderlineWidth !== void 0) merged[CSS_TAB_UNDERLINE_WIDTH] = tabUnderlineWidth;
|
|
493
|
+
if (tabUnderlineColor !== void 0) merged[CSS_TAB_UNDERLINE_COLOR] = tabUnderlineColor;
|
|
494
|
+
styles[className] = merged;
|
|
495
|
+
} else styles[className] = applyBoxShadowBorder(raw);
|
|
496
|
+
}
|
|
400
497
|
}
|
|
401
498
|
return styles;
|
|
402
499
|
}
|