@yahoo/uds 3.131.0 → 3.132.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 (101) hide show
  1. package/dist/components/Banner/Banner.cjs +5 -2
  2. package/dist/components/Banner/Banner.d.cts +9 -0
  3. package/dist/components/Banner/Banner.d.ts +9 -0
  4. package/dist/components/Banner/Banner.js +5 -2
  5. package/dist/components/Divider/Divider.d.cts +2 -2
  6. package/dist/components/Divider/Divider.d.ts +2 -2
  7. package/dist/components/Divider/DividerCore.cjs +17 -10
  8. package/dist/components/Divider/DividerCore.d.cts +10 -4
  9. package/dist/components/Divider/DividerCore.d.ts +10 -4
  10. package/dist/components/Divider/DividerCore.js +17 -10
  11. package/dist/components/Divider/DividerInternal.cjs +15 -11
  12. package/dist/components/Divider/DividerInternal.js +15 -11
  13. package/dist/components/Link.cjs +13 -6
  14. package/dist/components/Link.d.cts +10 -0
  15. package/dist/components/Link.d.ts +10 -0
  16. package/dist/components/Link.js +13 -6
  17. package/dist/components/client/Badge.cjs +10 -4
  18. package/dist/components/client/Badge.d.cts +12 -1
  19. package/dist/components/client/Badge.d.ts +12 -1
  20. package/dist/components/client/Badge.js +10 -4
  21. package/dist/components/client/Button.cjs +20 -9
  22. package/dist/components/client/Button.d.cts +12 -1
  23. package/dist/components/client/Button.d.ts +12 -1
  24. package/dist/components/client/Button.js +20 -9
  25. package/dist/components/client/Checkbox.cjs +14 -6
  26. package/dist/components/client/Checkbox.d.cts +9 -4
  27. package/dist/components/client/Checkbox.d.ts +9 -4
  28. package/dist/components/client/Checkbox.js +14 -6
  29. package/dist/components/client/Chip/Chip.d.cts +1 -1
  30. package/dist/components/client/Chip/Chip.d.ts +1 -1
  31. package/dist/components/client/IconButton.cjs +4 -2
  32. package/dist/components/client/IconButton.d.cts +10 -2
  33. package/dist/components/client/IconButton.d.ts +10 -2
  34. package/dist/components/client/IconButton.js +4 -2
  35. package/dist/components/client/Input/Input.cjs +8 -2
  36. package/dist/components/client/Input/Input.d.cts +3 -0
  37. package/dist/components/client/Input/Input.d.ts +3 -0
  38. package/dist/components/client/Input/Input.js +8 -2
  39. package/dist/components/client/Input/InputHelpTextInternal.cjs +16 -6
  40. package/dist/components/client/Input/InputHelpTextInternal.d.cts +10 -0
  41. package/dist/components/client/Input/InputHelpTextInternal.d.ts +10 -0
  42. package/dist/components/client/Input/InputHelpTextInternal.js +16 -6
  43. package/dist/components/client/Menu/Menu.Content.cjs +2 -1
  44. package/dist/components/client/Menu/Menu.Content.d.cts +7 -0
  45. package/dist/components/client/Menu/Menu.Content.d.ts +7 -0
  46. package/dist/components/client/Menu/Menu.Content.js +2 -1
  47. package/dist/components/client/Menu/Menu.Divider.cjs +8 -10
  48. package/dist/components/client/Menu/Menu.Divider.js +8 -10
  49. package/dist/components/client/Menu/Menu.Item.cjs +23 -14
  50. package/dist/components/client/Menu/Menu.Item.d.cts +11 -0
  51. package/dist/components/client/Menu/Menu.Item.d.ts +11 -0
  52. package/dist/components/client/Menu/Menu.Item.js +24 -15
  53. package/dist/components/client/Menu/Menu.ItemBase.cjs +17 -9
  54. package/dist/components/client/Menu/Menu.ItemBase.d.cts +9 -5
  55. package/dist/components/client/Menu/Menu.ItemBase.d.ts +9 -5
  56. package/dist/components/client/Menu/Menu.ItemBase.js +17 -9
  57. package/dist/components/client/Menu/Menu.ItemCheckbox.cjs +10 -10
  58. package/dist/components/client/Menu/Menu.ItemCheckbox.d.cts +1 -1
  59. package/dist/components/client/Menu/Menu.ItemCheckbox.d.ts +1 -1
  60. package/dist/components/client/Menu/Menu.ItemCheckbox.js +10 -10
  61. package/dist/components/client/Popover/PopoverContent.cjs +4 -1
  62. package/dist/components/client/Popover/PopoverContent.d.cts +3 -0
  63. package/dist/components/client/Popover/PopoverContent.d.ts +3 -0
  64. package/dist/components/client/Popover/PopoverContent.js +4 -1
  65. package/dist/components/client/Radio/Radio.cjs +18 -15
  66. package/dist/components/client/Radio/Radio.d.cts +9 -4
  67. package/dist/components/client/Radio/Radio.d.ts +9 -4
  68. package/dist/components/client/Radio/Radio.js +18 -15
  69. package/dist/components/client/Switch.cjs +14 -6
  70. package/dist/components/client/Switch.d.cts +9 -5
  71. package/dist/components/client/Switch.d.ts +9 -5
  72. package/dist/components/client/Switch.js +14 -6
  73. package/dist/components/client/Tabs/Tab.cjs +11 -5
  74. package/dist/components/client/Tabs/Tab.d.cts +14 -3
  75. package/dist/components/client/Tabs/Tab.d.ts +14 -3
  76. package/dist/components/client/Tabs/Tab.js +11 -5
  77. package/dist/components/client/Toast/UDSToastConfigProvider.d.cts +1 -1
  78. package/dist/components/client/Toast/UDSToastConfigProvider.d.ts +1 -1
  79. package/dist/components/client/Tooltip/TooltipContent.cjs +9 -3
  80. package/dist/components/client/Tooltip/TooltipContent.d.cts +14 -2
  81. package/dist/components/client/Tooltip/TooltipContent.d.ts +14 -2
  82. package/dist/components/client/Tooltip/TooltipContent.js +9 -3
  83. package/dist/components/experimental/client/SwitchV2.cjs +14 -6
  84. package/dist/components/experimental/client/SwitchV2.d.cts +9 -5
  85. package/dist/components/experimental/client/SwitchV2.d.ts +9 -5
  86. package/dist/components/experimental/client/SwitchV2.js +14 -6
  87. package/dist/components/index.d.cts +1 -1
  88. package/dist/components/index.d.ts +1 -1
  89. package/dist/index.d.cts +1 -1
  90. package/dist/index.d.ts +1 -1
  91. package/dist/styles/styler.d.cts +67 -67
  92. package/dist/styles/styler.d.ts +67 -67
  93. package/dist/types/dist/index.d.cts +3 -3
  94. package/dist/types/dist/index.d.ts +3 -3
  95. package/dist/uds/generated/componentData.cjs +1443 -1440
  96. package/dist/uds/generated/componentData.js +1443 -1440
  97. package/dist/uds/generated/tailwindPurge.cjs +73 -73
  98. package/dist/uds/generated/tailwindPurge.js +73 -73
  99. package/generated/componentData.json +2046 -2037
  100. package/generated/tailwindPurge.ts +1 -1
  101. package/package.json +1 -1
@@ -75,7 +75,7 @@ function bindActionVariants(actions, bannerVariant) {
75
75
  *
76
76
  * @related [Badge](https://uds.build/docs/components/badge), [Toast](https://uds.build/docs/components/toast)
77
77
  **/
78
- const Banner = (0, react.forwardRef)(function Banner({ variant = "primary", size = "default", startIcon, title, description, onDismiss, dismissAriaLabel = "Dismiss", className, children, ...rest }, ref) {
78
+ const Banner = (0, react.forwardRef)(function Banner({ variant = "primary", size = "default", startIcon, title, description, onDismiss, dismissAriaLabel = "Dismiss", className, children, slotProps, ...rest }, ref) {
79
79
  const hasTitle = !!(typeof title === "string" ? title.trim() : title);
80
80
  const hasDescription = !!(typeof description === "string" ? description.trim() : description);
81
81
  const rootStyles = require_styles_styler.getStyles({
@@ -133,6 +133,7 @@ const Banner = (0, react.forwardRef)(function Banner({ variant = "primary", size
133
133
  onClick: onDismiss,
134
134
  className: dismissContainerStyles,
135
135
  "data-testid": "banner-dismiss",
136
+ ...slotProps?.dismiss,
136
137
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_IconSlot.IconSlot, {
137
138
  icon: _yahoo_uds_icons.Cross,
138
139
  iconProps: {
@@ -150,13 +151,15 @@ const Banner = (0, react.forwardRef)(function Banner({ variant = "primary", size
150
151
  icon: startIcon,
151
152
  iconProps: { color: "inherit" },
152
153
  className: require_styles_styler.cx(iconStyles, "shrink-0"),
153
- "data-testid": "banner-start-icon"
154
+ "data-testid": "banner-start-icon",
155
+ ...slotProps?.startIcon
154
156
  }),
155
157
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
156
158
  className: require_styles_styler.cx("flex flex-1 min-w-0 flex-col items-start gap-[inherit] uds-sm:flex-row", hasTitle !== hasDescription && "uds-sm:items-center"),
157
159
  children: [contentArea, hasActions && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
158
160
  className: "flex self-stretch flex-row items-center gap-1.5 uds-sm:self-center uds-sm:shrink-0",
159
161
  "data-testid": "banner-actions",
162
+ ...slotProps?.actions,
160
163
  children: actions
161
164
  })]
162
165
  }),
@@ -5,9 +5,18 @@ import * as react from "react";
5
5
 
6
6
  //#region src/components/Banner/Banner.d.ts
7
7
  type HtmlDivProps = Omit<React.HTMLAttributes<HTMLDivElement>, 'title'>;
8
+ type DataAttributes = {
9
+ [name: `data-${string}`]: string;
10
+ };
8
11
  interface BannerProps extends HtmlDivProps, UniversalBannerProps {
9
12
  /** Accessible label for the dismiss button. @default "Dismiss" */
10
13
  dismissAriaLabel?: string;
14
+ /** Props to be passed into various slots within the component. */
15
+ slotProps?: {
16
+ startIcon?: DataAttributes;
17
+ actions?: DataAttributes;
18
+ dismiss?: DataAttributes;
19
+ };
11
20
  }
12
21
  /**
13
22
  * **An inline notification banner for contextual messages with optional actions.**
@@ -5,9 +5,18 @@ import * as react from "react";
5
5
 
6
6
  //#region src/components/Banner/Banner.d.ts
7
7
  type HtmlDivProps = Omit<React.HTMLAttributes<HTMLDivElement>, 'title'>;
8
+ type DataAttributes = {
9
+ [name: `data-${string}`]: string;
10
+ };
8
11
  interface BannerProps extends HtmlDivProps, UniversalBannerProps {
9
12
  /** Accessible label for the dismiss button. @default "Dismiss" */
10
13
  dismissAriaLabel?: string;
14
+ /** Props to be passed into various slots within the component. */
15
+ slotProps?: {
16
+ startIcon?: DataAttributes;
17
+ actions?: DataAttributes;
18
+ dismiss?: DataAttributes;
19
+ };
11
20
  }
12
21
  /**
13
22
  * **An inline notification banner for contextual messages with optional actions.**
@@ -73,7 +73,7 @@ function bindActionVariants(actions, bannerVariant) {
73
73
  *
74
74
  * @related [Badge](https://uds.build/docs/components/badge), [Toast](https://uds.build/docs/components/toast)
75
75
  **/
76
- const Banner = forwardRef(function Banner({ variant = "primary", size = "default", startIcon, title, description, onDismiss, dismissAriaLabel = "Dismiss", className, children, ...rest }, ref) {
76
+ const Banner = forwardRef(function Banner({ variant = "primary", size = "default", startIcon, title, description, onDismiss, dismissAriaLabel = "Dismiss", className, children, slotProps, ...rest }, ref) {
77
77
  const hasTitle = !!(typeof title === "string" ? title.trim() : title);
78
78
  const hasDescription = !!(typeof description === "string" ? description.trim() : description);
79
79
  const rootStyles = getStyles({
@@ -131,6 +131,7 @@ const Banner = forwardRef(function Banner({ variant = "primary", size = "default
131
131
  onClick: onDismiss,
132
132
  className: dismissContainerStyles,
133
133
  "data-testid": "banner-dismiss",
134
+ ...slotProps?.dismiss,
134
135
  children: /* @__PURE__ */ jsx(IconSlot, {
135
136
  icon: Cross,
136
137
  iconProps: {
@@ -148,13 +149,15 @@ const Banner = forwardRef(function Banner({ variant = "primary", size = "default
148
149
  icon: startIcon,
149
150
  iconProps: { color: "inherit" },
150
151
  className: cx(iconStyles, "shrink-0"),
151
- "data-testid": "banner-start-icon"
152
+ "data-testid": "banner-start-icon",
153
+ ...slotProps?.startIcon
152
154
  }),
153
155
  /* @__PURE__ */ jsxs("div", {
154
156
  className: cx("flex flex-1 min-w-0 flex-col items-start gap-[inherit] uds-sm:flex-row", hasTitle !== hasDescription && "uds-sm:items-center"),
155
157
  children: [contentArea, hasActions && /* @__PURE__ */ jsx("div", {
156
158
  className: "flex self-stretch flex-row items-center gap-1.5 uds-sm:self-center uds-sm:shrink-0",
157
159
  "data-testid": "banner-actions",
160
+ ...slotProps?.actions,
158
161
  children: actions
159
162
  })]
160
163
  }),
@@ -3,7 +3,7 @@ import { DividerInternalProps } from "./DividerInternal.cjs";
3
3
  import * as react from "react";
4
4
 
5
5
  //#region src/components/Divider/Divider.d.ts
6
- type DividerProps = Omit<DividerInternalProps, 'layerClassNames'>;
6
+ type DividerProps = DividerInternalProps;
7
7
  /**
8
8
  * **📦 A divider component that can be used to visually separate components**
9
9
  *
@@ -34,6 +34,6 @@ type DividerProps = Omit<DividerInternalProps, 'layerClassNames'>;
34
34
  *
35
35
  * @related [Box](https://uds.build/docs/components/box), [HStack](https://uds.build/docs/components/h-stack), [VStack](https://uds.build/docs/components/v-stack)
36
36
  */
37
- declare const Divider: react.ForwardRefExoticComponent<DividerProps & react.RefAttributes<HTMLDivElement>>;
37
+ declare const Divider: react.ForwardRefExoticComponent<DividerInternalProps & react.RefAttributes<HTMLDivElement>>;
38
38
  //#endregion
39
39
  export { Divider, type DividerProps };
@@ -3,7 +3,7 @@ import { DividerInternalProps } from "./DividerInternal.js";
3
3
  import * as react from "react";
4
4
 
5
5
  //#region src/components/Divider/Divider.d.ts
6
- type DividerProps = Omit<DividerInternalProps, 'layerClassNames'>;
6
+ type DividerProps = DividerInternalProps;
7
7
  /**
8
8
  * **📦 A divider component that can be used to visually separate components**
9
9
  *
@@ -34,6 +34,6 @@ type DividerProps = Omit<DividerInternalProps, 'layerClassNames'>;
34
34
  *
35
35
  * @related [Box](https://uds.build/docs/components/box), [HStack](https://uds.build/docs/components/h-stack), [VStack](https://uds.build/docs/components/v-stack)
36
36
  */
37
- declare const Divider: react.ForwardRefExoticComponent<DividerProps & react.RefAttributes<HTMLDivElement>>;
37
+ declare const Divider: react.ForwardRefExoticComponent<DividerInternalProps & react.RefAttributes<HTMLDivElement>>;
38
38
  //#endregion
39
39
  export { Divider, type DividerProps };
@@ -14,19 +14,22 @@ const ORIENTATION_WIDTH_MAP = {
14
14
  horizontal: "w-full",
15
15
  vertical: ""
16
16
  };
17
- const DividerCore = (0, react.forwardRef)(function Divider({ vertical = false, contentPosition = "center", className, layerClassNames, children, ...boxProps }, ref) {
17
+ const DividerCore = (0, react.forwardRef)(function Divider({ vertical = false, contentPosition = "center", className, slotProps, children, ...boxProps }, ref) {
18
18
  const direction = vertical ? "vertical" : "horizontal";
19
19
  const InternalComponent = vertical ? require_components_VStack.VStack : require_components_HStack.HStack;
20
+ const { className: rootClassName, ...rootSlotProps } = slotProps?.root ?? {};
21
+ const { className: labelClassName, ...labelSlotProps } = slotProps?.label ?? {};
22
+ const { className: lineClassName, ...lineSlotProps } = slotProps?.line ?? {};
20
23
  const classNames = (0, react.useMemo)(() => ({
21
- root: require_styles_styler.cx(ORIENTATION_WIDTH_MAP[direction], className, layerClassNames?.root),
22
- label: require_styles_styler.cx(layerClassNames?.text),
23
- line: layerClassNames?.line
24
+ root: require_styles_styler.cx(ORIENTATION_WIDTH_MAP[direction], className, rootClassName),
25
+ label: labelClassName,
26
+ line: lineClassName
24
27
  }), [
25
28
  className,
26
29
  direction,
27
- layerClassNames?.root,
28
- layerClassNames?.text,
29
- layerClassNames?.line
30
+ rootClassName,
31
+ labelClassName,
32
+ lineClassName
30
33
  ]);
31
34
  const lineStyle = (0, react.useMemo)(() => direction === "vertical" ? {
32
35
  borderTopWidth: 0,
@@ -39,8 +42,9 @@ const DividerCore = (0, react.forwardRef)(function Divider({ vertical = false, c
39
42
  }, [direction]);
40
43
  const Line = () => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_Box.Box, {
41
44
  flex: "1",
42
- className: classNames.line,
43
- style: lineStyle
45
+ className: require_styles_styler.cx(classNames.line, lineClassName),
46
+ style: lineStyle,
47
+ ...lineSlotProps
44
48
  });
45
49
  if (children) return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(InternalComponent, {
46
50
  flex: "1",
@@ -48,6 +52,7 @@ const DividerCore = (0, react.forwardRef)(function Divider({ vertical = false, c
48
52
  className: classNames.root,
49
53
  ref,
50
54
  ...boxProps,
55
+ ...rootSlotProps,
51
56
  children: [
52
57
  contentPosition !== "start" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Line, {}),
53
58
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_Box.Box, {
@@ -56,7 +61,8 @@ const DividerCore = (0, react.forwardRef)(function Divider({ vertical = false, c
56
61
  as: "span",
57
62
  color: "inherit",
58
63
  variant: "inherit",
59
- className: classNames.label,
64
+ className: require_styles_styler.cx(classNames.label, labelClassName),
65
+ ...labelSlotProps,
60
66
  children
61
67
  })
62
68
  }),
@@ -69,6 +75,7 @@ const DividerCore = (0, react.forwardRef)(function Divider({ vertical = false, c
69
75
  className: classNames.root,
70
76
  ref,
71
77
  ...boxProps,
78
+ ...rootSlotProps,
72
79
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Line, {})
73
80
  });
74
81
  });
@@ -2,14 +2,20 @@
2
2
  import { UniversalDividerProps, UniversalStackProps } from "../../types/dist/index.cjs";
3
3
  import "../../tokens/types.cjs";
4
4
  import { BoxProps } from "../Box.cjs";
5
+ import { Text } from "../Text.cjs";
5
6
  import * as react from "react";
7
+ import { ComponentProps, HTMLAttributes } from "react";
6
8
 
7
9
  //#region src/components/Divider/DividerCore.d.ts
10
+ type DataAttributes = {
11
+ [name: `data-${string}`]: string;
12
+ };
8
13
  interface DividerCoreProps extends Omit<BoxProps, 'color' | 'borderColor' | 'borderWidth'>, Omit<UniversalStackProps, 'separator' | 'asChild'>, Omit<UniversalDividerProps, 'variant'> {
9
- layerClassNames?: {
10
- root?: string;
11
- text?: string;
12
- line?: string;
14
+ /** Props to be passed into various slots within the component. */
15
+ slotProps?: {
16
+ root?: Partial<HTMLAttributes<HTMLDivElement> & DataAttributes>;
17
+ label?: Partial<ComponentProps<typeof Text> & DataAttributes>;
18
+ line?: Partial<HTMLAttributes<HTMLDivElement> & DataAttributes>;
13
19
  };
14
20
  }
15
21
  declare const DividerCore: react.ForwardRefExoticComponent<DividerCoreProps & react.RefAttributes<HTMLDivElement>>;
@@ -2,14 +2,20 @@
2
2
  import { UniversalDividerProps, UniversalStackProps } from "../../types/dist/index.js";
3
3
  import "../../tokens/types.js";
4
4
  import { BoxProps } from "../Box.js";
5
+ import { Text } from "../Text.js";
5
6
  import * as react from "react";
7
+ import { ComponentProps, HTMLAttributes } from "react";
6
8
 
7
9
  //#region src/components/Divider/DividerCore.d.ts
10
+ type DataAttributes = {
11
+ [name: `data-${string}`]: string;
12
+ };
8
13
  interface DividerCoreProps extends Omit<BoxProps, 'color' | 'borderColor' | 'borderWidth'>, Omit<UniversalStackProps, 'separator' | 'asChild'>, Omit<UniversalDividerProps, 'variant'> {
9
- layerClassNames?: {
10
- root?: string;
11
- text?: string;
12
- line?: string;
14
+ /** Props to be passed into various slots within the component. */
15
+ slotProps?: {
16
+ root?: Partial<HTMLAttributes<HTMLDivElement> & DataAttributes>;
17
+ label?: Partial<ComponentProps<typeof Text> & DataAttributes>;
18
+ line?: Partial<HTMLAttributes<HTMLDivElement> & DataAttributes>;
13
19
  };
14
20
  }
15
21
  declare const DividerCore: react.ForwardRefExoticComponent<DividerCoreProps & react.RefAttributes<HTMLDivElement>>;
@@ -12,19 +12,22 @@ const ORIENTATION_WIDTH_MAP = {
12
12
  horizontal: "w-full",
13
13
  vertical: ""
14
14
  };
15
- const DividerCore = forwardRef(function Divider({ vertical = false, contentPosition = "center", className, layerClassNames, children, ...boxProps }, ref) {
15
+ const DividerCore = forwardRef(function Divider({ vertical = false, contentPosition = "center", className, slotProps, children, ...boxProps }, ref) {
16
16
  const direction = vertical ? "vertical" : "horizontal";
17
17
  const InternalComponent = vertical ? VStack : HStack;
18
+ const { className: rootClassName, ...rootSlotProps } = slotProps?.root ?? {};
19
+ const { className: labelClassName, ...labelSlotProps } = slotProps?.label ?? {};
20
+ const { className: lineClassName, ...lineSlotProps } = slotProps?.line ?? {};
18
21
  const classNames = useMemo(() => ({
19
- root: cx(ORIENTATION_WIDTH_MAP[direction], className, layerClassNames?.root),
20
- label: cx(layerClassNames?.text),
21
- line: layerClassNames?.line
22
+ root: cx(ORIENTATION_WIDTH_MAP[direction], className, rootClassName),
23
+ label: labelClassName,
24
+ line: lineClassName
22
25
  }), [
23
26
  className,
24
27
  direction,
25
- layerClassNames?.root,
26
- layerClassNames?.text,
27
- layerClassNames?.line
28
+ rootClassName,
29
+ labelClassName,
30
+ lineClassName
28
31
  ]);
29
32
  const lineStyle = useMemo(() => direction === "vertical" ? {
30
33
  borderTopWidth: 0,
@@ -37,8 +40,9 @@ const DividerCore = forwardRef(function Divider({ vertical = false, contentPosit
37
40
  }, [direction]);
38
41
  const Line = () => /* @__PURE__ */ jsx(Box, {
39
42
  flex: "1",
40
- className: classNames.line,
41
- style: lineStyle
43
+ className: cx(classNames.line, lineClassName),
44
+ style: lineStyle,
45
+ ...lineSlotProps
42
46
  });
43
47
  if (children) return /* @__PURE__ */ jsxs(InternalComponent, {
44
48
  flex: "1",
@@ -46,6 +50,7 @@ const DividerCore = forwardRef(function Divider({ vertical = false, contentPosit
46
50
  className: classNames.root,
47
51
  ref,
48
52
  ...boxProps,
53
+ ...rootSlotProps,
49
54
  children: [
50
55
  contentPosition !== "start" && /* @__PURE__ */ jsx(Line, {}),
51
56
  /* @__PURE__ */ jsx(Box, {
@@ -54,7 +59,8 @@ const DividerCore = forwardRef(function Divider({ vertical = false, contentPosit
54
59
  as: "span",
55
60
  color: "inherit",
56
61
  variant: "inherit",
57
- className: classNames.label,
62
+ className: cx(classNames.label, labelClassName),
63
+ ...labelSlotProps,
58
64
  children
59
65
  })
60
66
  }),
@@ -67,6 +73,7 @@ const DividerCore = forwardRef(function Divider({ vertical = false, contentPosit
67
73
  className: classNames.root,
68
74
  ref,
69
75
  ...boxProps,
76
+ ...rootSlotProps,
70
77
  children: /* @__PURE__ */ jsx(Line, {})
71
78
  });
72
79
  });
@@ -7,19 +7,23 @@ let react = require("react");
7
7
  let react_jsx_runtime = require("react/jsx-runtime");
8
8
 
9
9
  //#region src/components/Divider/DividerInternal.tsx
10
- const DividerInternal = (0, react.forwardRef)(function Divider({ variant = "primary", layerClassNames, ...props }, ref) {
10
+ const DividerInternal = (0, react.forwardRef)(function Divider({ variant = "primary", slotProps, ...props }, ref) {
11
11
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_Divider_DividerCore.DividerCore, {
12
12
  ref,
13
- layerClassNames: (0, react.useMemo)(() => ({
14
- root: require_styles_styler.cx(variant !== "inherit" && require_styles_styler.getStyles({ dividerVariantRoot: variant }), layerClassNames?.root),
15
- text: require_styles_styler.cx(variant !== "inherit" ? require_styles_styler.getStyles({ dividerVariantLabel: variant }) : void 0, layerClassNames?.text),
16
- line: require_styles_styler.cx(variant !== "inherit" && require_styles_styler.getStyles({ dividerVariantLine: variant }), layerClassNames?.line)
17
- }), [
18
- layerClassNames?.line,
19
- layerClassNames?.root,
20
- layerClassNames?.text,
21
- variant
22
- ]),
13
+ slotProps: (0, react.useMemo)(() => ({
14
+ root: {
15
+ ...slotProps?.root,
16
+ className: require_styles_styler.cx(variant !== "inherit" && require_styles_styler.getStyles({ dividerVariantRoot: variant }), slotProps?.root?.className)
17
+ },
18
+ label: {
19
+ ...slotProps?.label,
20
+ className: require_styles_styler.cx(variant !== "inherit" ? require_styles_styler.getStyles({ dividerVariantLabel: variant }) : void 0, slotProps?.label?.className)
21
+ },
22
+ line: {
23
+ ...slotProps?.line,
24
+ className: require_styles_styler.cx(variant !== "inherit" && require_styles_styler.getStyles({ dividerVariantLine: variant }), slotProps?.line?.className)
25
+ }
26
+ }), [slotProps, variant]),
23
27
  ...props
24
28
  });
25
29
  });
@@ -5,19 +5,23 @@ import { forwardRef, useMemo } from "react";
5
5
  import { jsx } from "react/jsx-runtime";
6
6
 
7
7
  //#region src/components/Divider/DividerInternal.tsx
8
- const DividerInternal = forwardRef(function Divider({ variant = "primary", layerClassNames, ...props }, ref) {
8
+ const DividerInternal = forwardRef(function Divider({ variant = "primary", slotProps, ...props }, ref) {
9
9
  return /* @__PURE__ */ jsx(DividerCore, {
10
10
  ref,
11
- layerClassNames: useMemo(() => ({
12
- root: cx(variant !== "inherit" && getStyles({ dividerVariantRoot: variant }), layerClassNames?.root),
13
- text: cx(variant !== "inherit" ? getStyles({ dividerVariantLabel: variant }) : void 0, layerClassNames?.text),
14
- line: cx(variant !== "inherit" && getStyles({ dividerVariantLine: variant }), layerClassNames?.line)
15
- }), [
16
- layerClassNames?.line,
17
- layerClassNames?.root,
18
- layerClassNames?.text,
19
- variant
20
- ]),
11
+ slotProps: useMemo(() => ({
12
+ root: {
13
+ ...slotProps?.root,
14
+ className: cx(variant !== "inherit" && getStyles({ dividerVariantRoot: variant }), slotProps?.root?.className)
15
+ },
16
+ label: {
17
+ ...slotProps?.label,
18
+ className: cx(variant !== "inherit" ? getStyles({ dividerVariantLabel: variant }) : void 0, slotProps?.label?.className)
19
+ },
20
+ line: {
21
+ ...slotProps?.line,
22
+ className: cx(variant !== "inherit" && getStyles({ dividerVariantLine: variant }), slotProps?.line?.className)
23
+ }
24
+ }), [slotProps, variant]),
21
25
  ...props
22
26
  });
23
27
  });
@@ -35,7 +35,9 @@ let react_jsx_runtime = require("react/jsx-runtime");
35
35
  * <Link href="https://yahoo.com" target="_blank" endIcon={LinkIcon} />
36
36
  *```
37
37
  **/
38
- const Link = (0, react.forwardRef)(function Input({ variant = "primary", textVariant, startIcon, endIcon, alwaysUnderline = false, children, className, ...anchorProps }, ref) {
38
+ const Link = (0, react.forwardRef)(function Input({ variant = "primary", textVariant, startIcon, endIcon, alwaysUnderline = false, children, className, slotProps, ...anchorProps }, ref) {
39
+ const { className: startIconClassName, ...startIconSlotProps } = slotProps?.startIcon ?? {};
40
+ const { className: endIconClassName, ...endIconSlotProps } = slotProps?.endIcon ?? {};
39
41
  const shouldSizeRelativeToContainingText = !textVariant;
40
42
  const rootClasses = (0, react.useMemo)(() => {
41
43
  return require_styles_styler.getStyles({
@@ -78,17 +80,22 @@ const Link = (0, react.forwardRef)(function Input({ variant = "primary", textVar
78
80
  ...anchorProps,
79
81
  children: [
80
82
  startIcon && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_IconSlot.IconSlot, {
81
- className: iconStartStyles,
83
+ className: require_styles_styler.cx(iconStartStyles, startIconClassName),
82
84
  icon: startIcon,
83
85
  iconProps,
84
- "data-testid": "start-icon"
86
+ "data-testid": "start-icon",
87
+ ...startIconSlotProps
85
88
  }),
86
- children,
89
+ slotProps?.text ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
90
+ ...slotProps.text,
91
+ children
92
+ }) : children,
87
93
  endIcon && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_IconSlot.IconSlot, {
88
- className: iconEndStyles,
94
+ className: require_styles_styler.cx(iconEndStyles, endIconClassName),
89
95
  icon: endIcon,
90
96
  iconProps,
91
- "data-testid": "end-icon"
97
+ "data-testid": "end-icon",
98
+ ...endIconSlotProps
92
99
  })
93
100
  ]
94
101
  });
@@ -1,15 +1,25 @@
1
1
 
2
2
  import { UniversalLinkProps } from "../types/dist/index.cjs";
3
+ import { IconPropsWithSVGProps } from "../tokens/types.cjs";
3
4
  import "../tokens/index.cjs";
4
5
  import * as react from "react";
5
6
 
6
7
  //#region src/components/Link.d.ts
7
8
  type HTMLAnchorProps = React.AnchorHTMLAttributes<HTMLAnchorElement>;
9
+ type DataAttributes = {
10
+ [name: `data-${string}`]: string;
11
+ };
8
12
  interface LinkProps extends HTMLAnchorProps, UniversalLinkProps {
9
13
  /** The link's destination. */
10
14
  href?: string;
11
15
  /** Anchor rel property. @default "noopener" **/
12
16
  rel?: string;
17
+ /** Props to be passed into various slots within the component. */
18
+ slotProps?: {
19
+ startIcon?: Partial<IconPropsWithSVGProps & DataAttributes>;
20
+ endIcon?: Partial<IconPropsWithSVGProps & DataAttributes>;
21
+ text?: Partial<React.HTMLAttributes<HTMLSpanElement> & DataAttributes>;
22
+ };
13
23
  }
14
24
  /**
15
25
  * A Link provides navigation or actionable functionality by linking users to
@@ -1,15 +1,25 @@
1
1
 
2
2
  import { UniversalLinkProps } from "../types/dist/index.js";
3
+ import { IconPropsWithSVGProps } from "../tokens/types.js";
3
4
  import "../tokens/index.js";
4
5
  import * as react from "react";
5
6
 
6
7
  //#region src/components/Link.d.ts
7
8
  type HTMLAnchorProps = React.AnchorHTMLAttributes<HTMLAnchorElement>;
9
+ type DataAttributes = {
10
+ [name: `data-${string}`]: string;
11
+ };
8
12
  interface LinkProps extends HTMLAnchorProps, UniversalLinkProps {
9
13
  /** The link's destination. */
10
14
  href?: string;
11
15
  /** Anchor rel property. @default "noopener" **/
12
16
  rel?: string;
17
+ /** Props to be passed into various slots within the component. */
18
+ slotProps?: {
19
+ startIcon?: Partial<IconPropsWithSVGProps & DataAttributes>;
20
+ endIcon?: Partial<IconPropsWithSVGProps & DataAttributes>;
21
+ text?: Partial<React.HTMLAttributes<HTMLSpanElement> & DataAttributes>;
22
+ };
13
23
  }
14
24
  /**
15
25
  * A Link provides navigation or actionable functionality by linking users to
@@ -33,7 +33,9 @@ import { jsx, jsxs } from "react/jsx-runtime";
33
33
  * <Link href="https://yahoo.com" target="_blank" endIcon={LinkIcon} />
34
34
  *```
35
35
  **/
36
- const Link = forwardRef(function Input({ variant = "primary", textVariant, startIcon, endIcon, alwaysUnderline = false, children, className, ...anchorProps }, ref) {
36
+ const Link = forwardRef(function Input({ variant = "primary", textVariant, startIcon, endIcon, alwaysUnderline = false, children, className, slotProps, ...anchorProps }, ref) {
37
+ const { className: startIconClassName, ...startIconSlotProps } = slotProps?.startIcon ?? {};
38
+ const { className: endIconClassName, ...endIconSlotProps } = slotProps?.endIcon ?? {};
37
39
  const shouldSizeRelativeToContainingText = !textVariant;
38
40
  const rootClasses = useMemo(() => {
39
41
  return getStyles({
@@ -76,17 +78,22 @@ const Link = forwardRef(function Input({ variant = "primary", textVariant, start
76
78
  ...anchorProps,
77
79
  children: [
78
80
  startIcon && /* @__PURE__ */ jsx(IconSlot, {
79
- className: iconStartStyles,
81
+ className: cx(iconStartStyles, startIconClassName),
80
82
  icon: startIcon,
81
83
  iconProps,
82
- "data-testid": "start-icon"
84
+ "data-testid": "start-icon",
85
+ ...startIconSlotProps
83
86
  }),
84
- children,
87
+ slotProps?.text ? /* @__PURE__ */ jsx("span", {
88
+ ...slotProps.text,
89
+ children
90
+ }) : children,
85
91
  endIcon && /* @__PURE__ */ jsx(IconSlot, {
86
- className: iconEndStyles,
92
+ className: cx(iconEndStyles, endIconClassName),
87
93
  icon: endIcon,
88
94
  iconProps,
89
- "data-testid": "end-icon"
95
+ "data-testid": "end-icon",
96
+ ...endIconSlotProps
90
97
  })
91
98
  ]
92
99
  });
@@ -40,7 +40,10 @@ const MAX_WIDTH_DEFAULT = 200;
40
40
  *
41
41
  * @related [Chip](https://uds.build/docs/components/chip).
42
42
  **/
43
- const Badge = (0, react.forwardRef)(function Badge({ variant = "primary", size = "md", minWidth, maxWidth = MAX_WIDTH_DEFAULT, startIcon, endIcon, backgroundColor, color, iconColor, borderColor, children, className, ...rest }, ref) {
43
+ const Badge = (0, react.forwardRef)(function Badge({ variant = "primary", size = "md", minWidth, maxWidth = MAX_WIDTH_DEFAULT, startIcon, endIcon, backgroundColor, color, iconColor, borderColor, children, className, slotProps, ...rest }, ref) {
44
+ const { className: startIconClassName, ...startIconSlotProps } = slotProps?.startIcon ?? {};
45
+ const { className: endIconClassName, ...endIconSlotProps } = slotProps?.endIcon ?? {};
46
+ const { className: textClassName, ...textSlotProps } = slotProps?.text ?? {};
44
47
  const rootStyles = require_styles_styler.getStyles({
45
48
  badgeSizeRoot: size,
46
49
  badgeVariantRoot: variant,
@@ -86,17 +89,20 @@ const Badge = (0, react.forwardRef)(function Badge({ variant = "primary", size =
86
89
  icon: startIcon,
87
90
  iconProps,
88
91
  "data-testid": "start-icon",
89
- className: iconStyles
92
+ className: require_styles_styler.cx(iconStyles, startIconClassName),
93
+ ...startIconSlotProps
90
94
  }),
91
95
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
92
- className: "flex-1 truncate whitespace-nowrap text-center",
96
+ className: require_styles_styler.cx("flex-1 truncate whitespace-nowrap text-center", textClassName),
97
+ ...textSlotProps,
93
98
  children
94
99
  }),
95
100
  endIcon && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_IconSlot.IconSlot, {
96
101
  icon: endIcon,
97
102
  iconProps,
98
103
  "data-testid": "end-icon",
99
- className: iconStyles
104
+ className: require_styles_styler.cx(iconStyles, endIconClassName),
105
+ ...endIconSlotProps
100
106
  })
101
107
  ]
102
108
  });
@@ -1,11 +1,22 @@
1
1
 
2
2
  import { UniversalBadgeProps } from "../../types/dist/index.cjs";
3
3
  import "../../tokens/index.cjs";
4
+ import { IconSlotProps } from "../IconSlot.cjs";
4
5
  import React from "react";
5
6
 
6
7
  //#region src/components/client/Badge.d.ts
7
8
  type HtmlDivProps = React.HTMLAttributes<HTMLDivElement>;
8
- interface BadgeProps extends HtmlDivProps, UniversalBadgeProps {}
9
+ type DataAttributes = {
10
+ [name: `data-${string}`]: string;
11
+ };
12
+ interface BadgeProps extends HtmlDivProps, UniversalBadgeProps {
13
+ /** Props to be passed into various slots within the component. */
14
+ slotProps?: {
15
+ startIcon?: Partial<IconSlotProps & DataAttributes>;
16
+ endIcon?: Partial<IconSlotProps & DataAttributes>;
17
+ text?: Partial<React.HTMLAttributes<HTMLSpanElement> & DataAttributes>;
18
+ };
19
+ }
9
20
  /**
10
21
  * **⚙️️ A badge.
11
22
  *
@@ -2,11 +2,22 @@
2
2
  "use client";
3
3
  import { UniversalBadgeProps } from "../../types/dist/index.js";
4
4
  import "../../tokens/index.js";
5
+ import { IconSlotProps } from "../IconSlot.js";
5
6
  import React from "react";
6
7
 
7
8
  //#region src/components/client/Badge.d.ts
8
9
  type HtmlDivProps = React.HTMLAttributes<HTMLDivElement>;
9
- interface BadgeProps extends HtmlDivProps, UniversalBadgeProps {}
10
+ type DataAttributes = {
11
+ [name: `data-${string}`]: string;
12
+ };
13
+ interface BadgeProps extends HtmlDivProps, UniversalBadgeProps {
14
+ /** Props to be passed into various slots within the component. */
15
+ slotProps?: {
16
+ startIcon?: Partial<IconSlotProps & DataAttributes>;
17
+ endIcon?: Partial<IconSlotProps & DataAttributes>;
18
+ text?: Partial<React.HTMLAttributes<HTMLSpanElement> & DataAttributes>;
19
+ };
20
+ }
10
21
  /**
11
22
  * **⚙️️ A badge.
12
23
  *