@yahoo/uds 3.105.1 → 3.107.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 +6 -0
- package/dist/automated-config/dist/generated/autoVariants.d.cts +2 -2
- package/dist/automated-config/dist/generated/autoVariants.d.ts +2 -2
- package/dist/automated-config/dist/generated/autoVariants.js +6 -0
- package/dist/automated-config/dist/generated/generatedConfigs.cjs +39 -0
- package/dist/automated-config/dist/generated/generatedConfigs.d.cts +33 -3
- package/dist/automated-config/dist/generated/generatedConfigs.d.ts +33 -3
- package/dist/automated-config/dist/generated/generatedConfigs.js +39 -0
- package/dist/automated-config/dist/generated/universalTokensConfigAuto.cjs +585 -0
- package/dist/automated-config/dist/generated/universalTokensConfigAuto.js +585 -0
- package/dist/automated-config/dist/properties.cjs +2 -5
- package/dist/automated-config/dist/properties.js +2 -5
- 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 +17 -2
- package/dist/automated-config/dist/utils/index.js +17 -2
- package/dist/components/client/Button.cjs +1 -0
- package/dist/components/client/Button.d.cts +1 -0
- package/dist/components/client/Button.d.ts +1 -0
- package/dist/components/client/Button.js +1 -0
- package/dist/components/client/Chip/ChipBase.cjs +1 -1
- package/dist/components/client/Chip/ChipBase.js +1 -1
- package/dist/components/client/Chip/ChipButton.cjs +1 -1
- package/dist/components/client/Chip/ChipButton.js +2 -2
- package/dist/components/client/Chip/ChipLink.cjs +2 -2
- package/dist/components/client/Chip/ChipLink.js +3 -3
- package/dist/components/client/Chip/ChipToggle.cjs +1 -1
- package/dist/components/client/Chip/ChipToggle.js +2 -2
- package/dist/config/dist/index.cjs +586 -1
- package/dist/config/dist/index.js +586 -1
- package/dist/fixtures/dist/index.cjs +3 -0
- package/dist/fixtures/dist/index.js +3 -0
- package/dist/styles/styler.d.cts +32 -32
- package/dist/styles/styler.d.ts +32 -32
- package/dist/styles/variants.d.cts +6 -0
- package/dist/styles/variants.d.ts +6 -0
- package/dist/tailwind/dist/tailwind/utils/getFontStyles.d.cts +1 -1
- package/dist/tailwind/dist/tailwind/utils/getFontStyles.d.ts +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/types/dist/index.d.cts +2 -1
- package/dist/types/dist/index.d.ts +2 -1
- package/dist/uds/generated/componentData.cjs +1184 -1186
- package/dist/uds/generated/componentData.js +1184 -1186
- package/dist/uds/generated/tailwindPurge.cjs +1 -1
- package/dist/uds/generated/tailwindPurge.js +1 -1
- package/dist/uds/package.cjs +4 -4
- package/dist/uds/package.js +4 -4
- package/package.json +5 -5
|
@@ -30,6 +30,20 @@ const CSS_BOX_SHADOW = "box-shadow";
|
|
|
30
30
|
function deepMerge(target, source) {
|
|
31
31
|
return (0, lodash_mergeWith_js.default)({}, target, source);
|
|
32
32
|
}
|
|
33
|
+
const COMPONENTS_WITH_SHADOW_BORDERS = [
|
|
34
|
+
{
|
|
35
|
+
componentName: "button",
|
|
36
|
+
layer: "root"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
componentName: "iconbutton",
|
|
40
|
+
layer: "root"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
componentName: "chip",
|
|
44
|
+
layer: "root"
|
|
45
|
+
}
|
|
46
|
+
];
|
|
33
47
|
/**
|
|
34
48
|
* Map our "states" to pseudo-classes (hover => :hover, pressed => :active, etc.).
|
|
35
49
|
* Adjust or extend as needed.
|
|
@@ -394,8 +408,9 @@ function generateConfigStyles(config, schema, theme, previewOptions) {
|
|
|
394
408
|
* Post-process button/iconbutton styles to force box-shadow for borders.
|
|
395
409
|
* This runs AFTER all properties have been processed and merged.
|
|
396
410
|
*/
|
|
397
|
-
|
|
398
|
-
|
|
411
|
+
const toApply = COMPONENTS_WITH_SHADOW_BORDERS.find((c) => c.componentName === componentName);
|
|
412
|
+
if (toApply) {
|
|
413
|
+
for (const className in styles) if (className.includes(`-${toApply.layer}`.toLowerCase())) styles[className] = applyBoxShadowBorder(styles[className]);
|
|
399
414
|
}
|
|
400
415
|
return styles;
|
|
401
416
|
}
|
|
@@ -26,6 +26,20 @@ const CSS_BOX_SHADOW = "box-shadow";
|
|
|
26
26
|
function deepMerge(target, source) {
|
|
27
27
|
return mergeWith({}, target, source);
|
|
28
28
|
}
|
|
29
|
+
const COMPONENTS_WITH_SHADOW_BORDERS = [
|
|
30
|
+
{
|
|
31
|
+
componentName: "button",
|
|
32
|
+
layer: "root"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
componentName: "iconbutton",
|
|
36
|
+
layer: "root"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
componentName: "chip",
|
|
40
|
+
layer: "root"
|
|
41
|
+
}
|
|
42
|
+
];
|
|
29
43
|
/**
|
|
30
44
|
* Map our "states" to pseudo-classes (hover => :hover, pressed => :active, etc.).
|
|
31
45
|
* Adjust or extend as needed.
|
|
@@ -390,8 +404,9 @@ function generateConfigStyles(config, schema, theme, previewOptions) {
|
|
|
390
404
|
* Post-process button/iconbutton styles to force box-shadow for borders.
|
|
391
405
|
* This runs AFTER all properties have been processed and merged.
|
|
392
406
|
*/
|
|
393
|
-
|
|
394
|
-
|
|
407
|
+
const toApply = COMPONENTS_WITH_SHADOW_BORDERS.find((c) => c.componentName === componentName);
|
|
408
|
+
if (toApply) {
|
|
409
|
+
for (const className in styles) if (className.includes(`-${toApply.layer}`.toLowerCase())) styles[className] = applyBoxShadowBorder(styles[className]);
|
|
395
410
|
}
|
|
396
411
|
return styles;
|
|
397
412
|
}
|
|
@@ -30,7 +30,7 @@ const ChipBase = (0, react.forwardRef)(function ChipBase({ size = SIZE_DEFAULT,
|
|
|
30
30
|
"pointer-events-none": disabled,
|
|
31
31
|
"cursor-default": disabled,
|
|
32
32
|
"opacity-50": disabled
|
|
33
|
-
}, "inline-flex", "items-center",
|
|
33
|
+
}, "inline-flex", "items-center", cssAnimationDuration, "transition-[background-color,outline-color,box-shadow]", className)
|
|
34
34
|
}),
|
|
35
35
|
text: require_styles_styler.cx("truncate", "whitespace-nowrap", "text-center", "flex-1", textClassName),
|
|
36
36
|
icon: require_styles_styler.getStyles({ chipSizeIcon: size })
|
|
@@ -27,7 +27,7 @@ const ChipBase = forwardRef(function ChipBase({ size = SIZE_DEFAULT, minWidth, m
|
|
|
27
27
|
"pointer-events-none": disabled,
|
|
28
28
|
"cursor-default": disabled,
|
|
29
29
|
"opacity-50": disabled
|
|
30
|
-
}, "inline-flex", "items-center",
|
|
30
|
+
}, "inline-flex", "items-center", cssAnimationDuration, "transition-[background-color,outline-color,box-shadow]", className)
|
|
31
31
|
}),
|
|
32
32
|
text: cx("truncate", "whitespace-nowrap", "text-center", "flex-1", textClassName),
|
|
33
33
|
icon: getStyles({ chipSizeIcon: size })
|
|
@@ -14,7 +14,7 @@ const ChipButton = (0, react.forwardRef)(function ChipButton({ variant = require
|
|
|
14
14
|
const classNames = (0, react.useMemo)(() => ({
|
|
15
15
|
root: require_styles_styler.getStyles({
|
|
16
16
|
chipLinkVariantRoot: variant,
|
|
17
|
-
className
|
|
17
|
+
className: require_styles_styler.cx("uds-ring", className)
|
|
18
18
|
}),
|
|
19
19
|
icon: require_styles_styler.getStyles({ chipLinkVariantIcon: variant })
|
|
20
20
|
}), [className, variant]);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
|
|
3
|
-
import { getStyles } from "../../../styles/styler.js";
|
|
3
|
+
import { cx, getStyles } from "../../../styles/styler.js";
|
|
4
4
|
import { mergeSlotProps } from "../../../utils/mergeSlotProps.js";
|
|
5
5
|
import { ChipBase, VARIANT_DEFAULT } from "./ChipBase.js";
|
|
6
6
|
import React, { forwardRef, useMemo } from "react";
|
|
@@ -11,7 +11,7 @@ const ChipButton = forwardRef(function ChipButton({ variant = VARIANT_DEFAULT, s
|
|
|
11
11
|
const classNames = useMemo(() => ({
|
|
12
12
|
root: getStyles({
|
|
13
13
|
chipLinkVariantRoot: variant,
|
|
14
|
-
className
|
|
14
|
+
className: cx("uds-ring", className)
|
|
15
15
|
}),
|
|
16
16
|
icon: getStyles({ chipLinkVariantIcon: variant })
|
|
17
17
|
}), [className, variant]);
|
|
@@ -14,7 +14,7 @@ const ChipLink = (0, react.forwardRef)(function ChipLink({ variant = require_com
|
|
|
14
14
|
const classNames = (0, react.useMemo)(() => ({
|
|
15
15
|
root: require_styles_styler.getStyles({
|
|
16
16
|
chipLinkVariantRoot: variant,
|
|
17
|
-
className
|
|
17
|
+
className: require_styles_styler.cx("uds-ring", className)
|
|
18
18
|
}),
|
|
19
19
|
icon: require_styles_styler.getStyles({ chipLinkVariantIcon: variant })
|
|
20
20
|
}), [className, variant]);
|
|
@@ -28,7 +28,7 @@ const ChipLink = (0, react.forwardRef)(function ChipLink({ variant = require_com
|
|
|
28
28
|
disabled,
|
|
29
29
|
className: classNames.root,
|
|
30
30
|
slotProps: mergedSlotProps,
|
|
31
|
-
tabIndex: 0,
|
|
31
|
+
tabIndex: disabled ? -1 : 0,
|
|
32
32
|
...rest,
|
|
33
33
|
href: disabled ? void 0 : href
|
|
34
34
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
|
|
3
|
-
import { getStyles } from "../../../styles/styler.js";
|
|
3
|
+
import { cx, getStyles } from "../../../styles/styler.js";
|
|
4
4
|
import { mergeSlotProps } from "../../../utils/mergeSlotProps.js";
|
|
5
5
|
import { ChipBase, VARIANT_DEFAULT } from "./ChipBase.js";
|
|
6
6
|
import React, { forwardRef, useMemo } from "react";
|
|
@@ -11,7 +11,7 @@ const ChipLink = forwardRef(function ChipLink({ variant = VARIANT_DEFAULT, href,
|
|
|
11
11
|
const classNames = useMemo(() => ({
|
|
12
12
|
root: getStyles({
|
|
13
13
|
chipLinkVariantRoot: variant,
|
|
14
|
-
className
|
|
14
|
+
className: cx("uds-ring", className)
|
|
15
15
|
}),
|
|
16
16
|
icon: getStyles({ chipLinkVariantIcon: variant })
|
|
17
17
|
}), [className, variant]);
|
|
@@ -25,7 +25,7 @@ const ChipLink = forwardRef(function ChipLink({ variant = VARIANT_DEFAULT, href,
|
|
|
25
25
|
disabled,
|
|
26
26
|
className: classNames.root,
|
|
27
27
|
slotProps: mergedSlotProps,
|
|
28
|
-
tabIndex: 0,
|
|
28
|
+
tabIndex: disabled ? -1 : 0,
|
|
29
29
|
...rest,
|
|
30
30
|
href: disabled ? void 0 : href
|
|
31
31
|
});
|
|
@@ -15,7 +15,7 @@ const ChipToggle = (0, react.forwardRef)(function ChipToggle({ isToggled = false
|
|
|
15
15
|
root: require_styles_styler.getStyles({
|
|
16
16
|
chipToggleVariantRoot: variant,
|
|
17
17
|
chipToggleVariantActiveRoot: isToggled ? "on" : "off",
|
|
18
|
-
className
|
|
18
|
+
className: require_styles_styler.cx("uds-ring", className)
|
|
19
19
|
}),
|
|
20
20
|
icon: require_styles_styler.getStyles({ chipToggleVariantIcon: variant })
|
|
21
21
|
}), [
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
|
|
3
|
-
import { getStyles } from "../../../styles/styler.js";
|
|
3
|
+
import { cx, getStyles } from "../../../styles/styler.js";
|
|
4
4
|
import { mergeSlotProps } from "../../../utils/mergeSlotProps.js";
|
|
5
5
|
import { ChipBase, VARIANT_DEFAULT } from "./ChipBase.js";
|
|
6
6
|
import React, { forwardRef, useCallback, useMemo } from "react";
|
|
@@ -12,7 +12,7 @@ const ChipToggle = forwardRef(function ChipToggle({ isToggled = false, onToggle,
|
|
|
12
12
|
root: getStyles({
|
|
13
13
|
chipToggleVariantRoot: variant,
|
|
14
14
|
chipToggleVariantActiveRoot: isToggled ? "on" : "off",
|
|
15
|
-
className
|
|
15
|
+
className: cx("uds-ring", className)
|
|
16
16
|
}),
|
|
17
17
|
icon: getStyles({ chipToggleVariantIcon: variant })
|
|
18
18
|
}), [
|