@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.
Files changed (49) hide show
  1. package/dist/automated-config/dist/generated/autoVariants.cjs +6 -0
  2. package/dist/automated-config/dist/generated/autoVariants.d.cts +2 -2
  3. package/dist/automated-config/dist/generated/autoVariants.d.ts +2 -2
  4. package/dist/automated-config/dist/generated/autoVariants.js +6 -0
  5. package/dist/automated-config/dist/generated/generatedConfigs.cjs +39 -0
  6. package/dist/automated-config/dist/generated/generatedConfigs.d.cts +33 -3
  7. package/dist/automated-config/dist/generated/generatedConfigs.d.ts +33 -3
  8. package/dist/automated-config/dist/generated/generatedConfigs.js +39 -0
  9. package/dist/automated-config/dist/generated/universalTokensConfigAuto.cjs +585 -0
  10. package/dist/automated-config/dist/generated/universalTokensConfigAuto.js +585 -0
  11. package/dist/automated-config/dist/properties.cjs +2 -5
  12. package/dist/automated-config/dist/properties.js +2 -5
  13. package/dist/automated-config/dist/utils/getConfigVariantProperties.d.cts +2 -2
  14. package/dist/automated-config/dist/utils/getConfigVariantProperties.d.ts +2 -2
  15. package/dist/automated-config/dist/utils/index.cjs +17 -2
  16. package/dist/automated-config/dist/utils/index.js +17 -2
  17. package/dist/components/client/Button.cjs +1 -0
  18. package/dist/components/client/Button.d.cts +1 -0
  19. package/dist/components/client/Button.d.ts +1 -0
  20. package/dist/components/client/Button.js +1 -0
  21. package/dist/components/client/Chip/ChipBase.cjs +1 -1
  22. package/dist/components/client/Chip/ChipBase.js +1 -1
  23. package/dist/components/client/Chip/ChipButton.cjs +1 -1
  24. package/dist/components/client/Chip/ChipButton.js +2 -2
  25. package/dist/components/client/Chip/ChipLink.cjs +2 -2
  26. package/dist/components/client/Chip/ChipLink.js +3 -3
  27. package/dist/components/client/Chip/ChipToggle.cjs +1 -1
  28. package/dist/components/client/Chip/ChipToggle.js +2 -2
  29. package/dist/config/dist/index.cjs +586 -1
  30. package/dist/config/dist/index.js +586 -1
  31. package/dist/fixtures/dist/index.cjs +3 -0
  32. package/dist/fixtures/dist/index.js +3 -0
  33. package/dist/styles/styler.d.cts +32 -32
  34. package/dist/styles/styler.d.ts +32 -32
  35. package/dist/styles/variants.d.cts +6 -0
  36. package/dist/styles/variants.d.ts +6 -0
  37. package/dist/tailwind/dist/tailwind/utils/getFontStyles.d.cts +1 -1
  38. package/dist/tailwind/dist/tailwind/utils/getFontStyles.d.ts +1 -1
  39. package/dist/tailwind/dist/tailwind/utils/getShadowStyles.d.cts +4 -4
  40. package/dist/tailwind/dist/tailwind/utils/getShadowStyles.d.ts +4 -4
  41. package/dist/types/dist/index.d.cts +2 -1
  42. package/dist/types/dist/index.d.ts +2 -1
  43. package/dist/uds/generated/componentData.cjs +1184 -1186
  44. package/dist/uds/generated/componentData.js +1184 -1186
  45. package/dist/uds/generated/tailwindPurge.cjs +1 -1
  46. package/dist/uds/generated/tailwindPurge.js +1 -1
  47. package/dist/uds/package.cjs +4 -4
  48. package/dist/uds/package.js +4 -4
  49. 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
- if (componentName === "button" || componentName === "iconbutton") {
398
- for (const className in styles) if (className.includes("-root")) styles[className] = applyBoxShadowBorder(styles[className]);
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
- if (componentName === "button" || componentName === "iconbutton") {
394
- for (const className in styles) if (className.includes("-root")) styles[className] = applyBoxShadowBorder(styles[className]);
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
  }
@@ -103,6 +103,7 @@ const defaultSizeIconClass = require_generateDefaultClassName.generateDefaultCla
103
103
  * }
104
104
  * ```
105
105
  *
106
+ *
106
107
  * @usage
107
108
  * Buttons should be used to clearly indicate and initiate actions that users can take.
108
109
  *
@@ -65,6 +65,7 @@ interface ButtonProps extends HtmlButtonProps, UniversalButtonProps {}
65
65
  * }
66
66
  * ```
67
67
  *
68
+ *
68
69
  * @usage
69
70
  * Buttons should be used to clearly indicate and initiate actions that users can take.
70
71
  *
@@ -65,6 +65,7 @@ interface ButtonProps extends HtmlButtonProps, UniversalButtonProps {}
65
65
  * }
66
66
  * ```
67
67
  *
68
+ *
68
69
  * @usage
69
70
  * Buttons should be used to clearly indicate and initiate actions that users can take.
70
71
  *
@@ -100,6 +100,7 @@ const defaultSizeIconClass = generateDefaultClassName("button", "size", "icon");
100
100
  * }
101
101
  * ```
102
102
  *
103
+ *
103
104
  * @usage
104
105
  * Buttons should be used to clearly indicate and initiate actions that users can take.
105
106
  *
@@ -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", "focus-visible:-outline-offset-2", "uds-ring", cssAnimationDuration, "transition-[background-color,outline-color,box-shadow]", className)
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", "focus-visible:-outline-offset-2", "uds-ring", cssAnimationDuration, "transition-[background-color,outline-color,box-shadow]", className)
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
  }), [