@yahoo/uds 3.160.0 → 3.162.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 (107) hide show
  1. package/dist/components/client/BottomSheet/BottomSheet.cjs +2 -2
  2. package/dist/components/client/BottomSheet/BottomSheet.js +2 -2
  3. package/dist/components/client/Button/Button.cjs +2 -1
  4. package/dist/components/client/Button/Button.js +3 -2
  5. package/dist/components/client/Checkbox/Checkbox.cjs +118 -0
  6. package/dist/components/client/{Checkbox.d.cts → Checkbox/Checkbox.d.cts} +5 -18
  7. package/dist/components/client/{Checkbox.d.ts → Checkbox/Checkbox.d.ts} +5 -18
  8. package/dist/components/client/Checkbox/Checkbox.js +113 -0
  9. package/dist/components/client/Checkbox/CheckboxBase.cjs +141 -0
  10. package/dist/components/client/Checkbox/CheckboxBase.d.cts +48 -0
  11. package/dist/components/client/Checkbox/CheckboxBase.d.ts +49 -0
  12. package/dist/components/client/Checkbox/CheckboxBase.js +138 -0
  13. package/dist/components/client/Checkbox/checkboxConstants.cjs +23 -0
  14. package/dist/components/client/Checkbox/checkboxConstants.d.cts +25 -0
  15. package/dist/components/client/Checkbox/checkboxConstants.d.ts +26 -0
  16. package/dist/components/client/Checkbox/checkboxConstants.js +17 -0
  17. package/dist/components/client/Checkbox/index.cjs +10 -0
  18. package/dist/components/client/Checkbox/index.d.cts +6 -0
  19. package/dist/components/client/Checkbox/index.d.ts +7 -0
  20. package/dist/components/client/Checkbox/index.js +6 -0
  21. package/dist/components/client/Checkbox/types.cjs +2 -0
  22. package/dist/components/client/Checkbox/types.d.cts +22 -0
  23. package/dist/components/client/Checkbox/types.d.ts +23 -0
  24. package/dist/components/client/Checkbox/types.js +2 -0
  25. package/dist/components/client/Chip/ChipBase.cjs +2 -2
  26. package/dist/components/client/Chip/ChipBase.js +2 -2
  27. package/dist/components/client/IconButton/IconButton.cjs +2 -1
  28. package/dist/components/client/IconButton/IconButton.js +3 -2
  29. package/dist/components/client/Input/Input.cjs +2 -2
  30. package/dist/components/client/Input/Input.js +2 -2
  31. package/dist/components/client/Menu/Menu.ItemCheckbox.d.cts +1 -1
  32. package/dist/components/client/Menu/Menu.ItemCheckbox.d.ts +1 -1
  33. package/dist/components/client/Modal/ManagedModal.cjs +2 -2
  34. package/dist/components/client/Modal/ManagedModal.js +2 -2
  35. package/dist/components/client/Modal/Modal.cjs +2 -2
  36. package/dist/components/client/Modal/Modal.js +2 -2
  37. package/dist/components/client/Popover/Popover.cjs +2 -2
  38. package/dist/components/client/Popover/Popover.js +2 -2
  39. package/dist/components/client/Popover/UDSPopoverConfigProvider.d.cts +1 -1
  40. package/dist/components/client/Popover/UDSPopoverConfigProvider.d.ts +1 -1
  41. package/dist/components/client/Radio/Radio.cjs +69 -165
  42. package/dist/components/client/Radio/Radio.d.cts +4 -17
  43. package/dist/components/client/Radio/Radio.d.ts +4 -17
  44. package/dist/components/client/Radio/Radio.js +69 -165
  45. package/dist/components/client/Radio/RadioBase.cjs +133 -0
  46. package/dist/components/client/Radio/RadioBase.d.cts +45 -0
  47. package/dist/components/client/Radio/RadioBase.d.ts +46 -0
  48. package/dist/components/client/Radio/RadioBase.js +130 -0
  49. package/dist/components/client/Radio/radioConstants.cjs +14 -0
  50. package/dist/components/client/Radio/radioConstants.d.cts +8 -0
  51. package/dist/components/client/Radio/radioConstants.d.ts +9 -0
  52. package/dist/components/client/Radio/radioConstants.js +11 -0
  53. package/dist/components/client/Radio/types.cjs +2 -0
  54. package/dist/components/client/Radio/types.d.cts +20 -0
  55. package/dist/components/client/Radio/types.d.ts +21 -0
  56. package/dist/components/client/Radio/types.js +2 -0
  57. package/dist/components/client/Switch/Switch.cjs +1 -1
  58. package/dist/components/client/Switch/Switch.js +1 -1
  59. package/dist/components/client/Tabs/TabList.cjs +2 -2
  60. package/dist/components/client/Tabs/TabList.js +2 -2
  61. package/dist/components/client/Toast/Toast.cjs +2 -2
  62. package/dist/components/client/Toast/Toast.js +2 -2
  63. package/dist/components/client/index.cjs +2 -2
  64. package/dist/components/client/index.d.cts +1 -1
  65. package/dist/components/client/index.d.ts +1 -1
  66. package/dist/components/client/index.js +1 -1
  67. package/dist/components/index.cjs +2 -2
  68. package/dist/components/index.d.cts +1 -1
  69. package/dist/components/index.d.ts +1 -1
  70. package/dist/components/index.js +1 -1
  71. package/dist/css-animation/Checkbox/Checkbox.cjs +75 -0
  72. package/dist/css-animation/Checkbox/Checkbox.d.cts +22 -0
  73. package/dist/css-animation/Checkbox/Checkbox.d.ts +23 -0
  74. package/dist/css-animation/Checkbox/Checkbox.js +72 -0
  75. package/dist/css-animation/Checkbox/index.cjs +5 -0
  76. package/dist/css-animation/Checkbox/index.d.cts +3 -0
  77. package/dist/css-animation/Checkbox/index.d.ts +4 -0
  78. package/dist/css-animation/Checkbox/index.js +4 -0
  79. package/dist/css-animation/Radio/Radio.cjs +92 -0
  80. package/dist/css-animation/Radio/Radio.d.cts +22 -0
  81. package/dist/css-animation/Radio/Radio.d.ts +23 -0
  82. package/dist/css-animation/Radio/Radio.js +89 -0
  83. package/dist/css-animation/Radio/index.cjs +5 -0
  84. package/dist/css-animation/Radio/index.d.cts +3 -0
  85. package/dist/css-animation/Radio/index.d.ts +4 -0
  86. package/dist/css-animation/Radio/index.js +4 -0
  87. package/dist/css-animation/index.cjs +4 -0
  88. package/dist/css-animation/index.d.cts +3 -1
  89. package/dist/css-animation/index.d.ts +3 -1
  90. package/dist/css-animation/index.js +3 -1
  91. package/dist/hooks/usePrefersReducedMotion.cjs +27 -15
  92. package/dist/hooks/usePrefersReducedMotion.js +28 -16
  93. package/dist/index.cjs +2 -2
  94. package/dist/index.d.cts +1 -1
  95. package/dist/index.d.ts +1 -1
  96. package/dist/index.js +1 -1
  97. package/dist/styles/styler.d.cts +45 -45
  98. package/dist/styles/styler.d.ts +45 -45
  99. package/dist/uds/generated/componentData.cjs +2540 -2490
  100. package/dist/uds/generated/componentData.js +2540 -2490
  101. package/dist/uds/generated/tailwindPurge.cjs +12 -12
  102. package/dist/uds/generated/tailwindPurge.js +12 -12
  103. package/generated/componentData.json +3258 -3169
  104. package/generated/tailwindPurge.ts +2 -2
  105. package/package.json +1 -1
  106. package/dist/components/client/Checkbox.cjs +0 -223
  107. package/dist/components/client/Checkbox.js +0 -218
@@ -0,0 +1,133 @@
1
+ /*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
2
+ "use client";
3
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
+ const require_runtime = require("../../../_virtual/_rolldown/runtime.cjs");
5
+ const require_styles_styler = require("../../../styles/styler.cjs");
6
+ const require_components_FormLabel = require("../../FormLabel.cjs");
7
+ const require_components_client_Radio_radioConstants = require("./radioConstants.cjs");
8
+ const require_components_client_Radio_useRadioGroup = require("./useRadioGroup.cjs");
9
+ let react = require("react");
10
+ react = require_runtime.__toESM(react);
11
+ let react_jsx_runtime = require("react/jsx-runtime");
12
+ //#region src/components/client/Radio/RadioBase.tsx
13
+ const RadioBase = (0, react.forwardRef)(function RadioBase({ id, name: nameProp, label, labelPosition = "start", variant: variantProp = "primary", size = "md", reduceMotion: _reduceMotion, value: valueProp = "", checked: checkedProp, defaultChecked, disabled, hasError, onChange, onFocus, onBlur, className, style, slotProps, cssAnimationDuration, enableInteractionTracking = false, renderRoot, renderIndicator, ...radioProps }, parentRef) {
14
+ const generatedId = (0, react.useId)();
15
+ const uid = id ?? `uds-radio-${generatedId}`;
16
+ const rootSlotProps = slotProps?.root ?? {};
17
+ const radioSlotProps = slotProps?.radio ?? {};
18
+ const radioIconSlotProps = slotProps?.radioIcon ?? {};
19
+ const labelSlotProps = slotProps?.label ?? {};
20
+ const innerRef = (0, react.useRef)(null);
21
+ /**
22
+ * State
23
+ */
24
+ const { name, isControlled, checked, setGroupValue } = require_components_client_Radio_useRadioGroup.useRadioGroup({
25
+ name: nameProp,
26
+ value: valueProp,
27
+ checked: checkedProp,
28
+ defaultChecked
29
+ });
30
+ const [isHovered, setIsHovered] = (0, react.useState)(false);
31
+ const [isPressed, setIsPressed] = (0, react.useState)(false);
32
+ /**
33
+ * Derived values
34
+ */
35
+ const variant = (0, react.useMemo)(() => hasError ? require_components_client_Radio_radioConstants.VARIANT_ERROR_MAP[variantProp] : variantProp, [hasError, variantProp]);
36
+ const showHoverEffect = enableInteractionTracking && !disabled && isHovered;
37
+ const showPressedEffect = enableInteractionTracking && !disabled && !checked && isPressed;
38
+ /**
39
+ * Handlers
40
+ */
41
+ const handleOnChange = (0, react.useCallback)((e) => {
42
+ setGroupValue(e.target.value);
43
+ onChange?.(e);
44
+ }, [onChange, setGroupValue]);
45
+ const handleFocus = (0, react.useCallback)((e) => {
46
+ onFocus?.(e);
47
+ }, [onFocus]);
48
+ const handleBlur = (0, react.useCallback)((e) => {
49
+ onBlur?.(e);
50
+ }, [onBlur]);
51
+ const handleHoverStart = (0, react.useCallback)(() => {
52
+ if (enableInteractionTracking) setIsHovered(true);
53
+ }, [enableInteractionTracking]);
54
+ const handleHoverEnd = (0, react.useCallback)(() => {
55
+ if (enableInteractionTracking) setIsHovered(false);
56
+ }, [enableInteractionTracking]);
57
+ const handleTapStart = (0, react.useCallback)(() => {
58
+ if (enableInteractionTracking) setIsPressed(true);
59
+ }, [enableInteractionTracking]);
60
+ const handleTapEnd = (0, react.useCallback)(() => {
61
+ if (enableInteractionTracking) setIsPressed(false);
62
+ }, [enableInteractionTracking]);
63
+ const classNames = {
64
+ root: require_styles_styler.getStyles({
65
+ radioSizeRoot: size,
66
+ radioVariantValueRoot: checked ? "checked" : "unchecked",
67
+ radioVariantRoot: variant,
68
+ display: "flex",
69
+ flexDirection: labelPosition === "start" ? "row" : "row-reverse",
70
+ alignItems: "center",
71
+ className: require_styles_styler.cx([{
72
+ "cursor-pointer": !disabled,
73
+ "cursor-default": disabled,
74
+ "opacity-50": disabled
75
+ }, className])
76
+ }),
77
+ htmlRadio: require_styles_styler.cx("cursor-[inherit]", "absolute", "opacity-0", "top-1/2", "left-1/2", "w-[calc(100%+2px)]", "h-[calc(100%+2px)]", "transform", "translate-x-[-50%]", "translate-y-[-50%]"),
78
+ label: require_styles_styler.cx(labelPosition === "start" ? "text-start" : "text-end")
79
+ };
80
+ const input = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
81
+ type: "radio",
82
+ tabIndex: 0,
83
+ ...radioProps,
84
+ ref: (ref) => {
85
+ innerRef.current = ref;
86
+ if (typeof parentRef === "function") parentRef(ref);
87
+ else if (parentRef !== null) parentRef.current = ref;
88
+ },
89
+ onFocus: handleFocus,
90
+ onBlur: handleBlur,
91
+ id: uid,
92
+ name,
93
+ value: valueProp,
94
+ disabled,
95
+ "aria-invalid": hasError,
96
+ onChange: handleOnChange,
97
+ ...isControlled ? { checked } : { defaultChecked },
98
+ className: classNames.htmlRadio
99
+ });
100
+ return renderRoot({
101
+ className: classNames.root,
102
+ style,
103
+ rootSlotProps,
104
+ hasLabel: Boolean(label),
105
+ isPressed,
106
+ onHoverStart: handleHoverStart,
107
+ onHoverEnd: handleHoverEnd,
108
+ onTapStart: handleTapStart,
109
+ onTapEnd: handleTapEnd,
110
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [renderIndicator({
111
+ size,
112
+ variant,
113
+ checked: Boolean(checked),
114
+ disabled,
115
+ showHoverEffect,
116
+ showPressedEffect,
117
+ cssAnimationDuration,
118
+ radioSlotProps,
119
+ radioIconSlotProps,
120
+ children: input
121
+ }), label && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_FormLabel.FormLabel, {
122
+ as: "div",
123
+ variant: "inherit",
124
+ color: "inherit",
125
+ label,
126
+ className: classNames.label,
127
+ ...labelSlotProps
128
+ })] })
129
+ });
130
+ });
131
+ RadioBase.displayName = "RadioBase";
132
+ //#endregion
133
+ exports.RadioBase = RadioBase;
@@ -0,0 +1,45 @@
1
+
2
+ import { RadioVariant } from "../../../types/dist/index.cjs";
3
+ import { DataAttributes, RadioProps } from "./types.cjs";
4
+ import React, { CSSProperties, ReactNode } from "react";
5
+
6
+ //#region src/components/client/Radio/RadioBase.d.ts
7
+ type ResolvedRadioVariant = RadioVariant | 'alert' | 'alert-secondary';
8
+ type RenderRootArgs = {
9
+ className: string;
10
+ style?: CSSProperties;
11
+ rootSlotProps: DataAttributes;
12
+ hasLabel: boolean;
13
+ isPressed: boolean;
14
+ onHoverStart: () => void;
15
+ onHoverEnd: () => void;
16
+ onTapStart: () => void;
17
+ onTapEnd: () => void;
18
+ children: ReactNode;
19
+ };
20
+ type RenderIndicatorArgs = {
21
+ size: NonNullable<RadioProps['size']>;
22
+ variant: ResolvedRadioVariant;
23
+ checked: boolean;
24
+ disabled?: boolean;
25
+ showHoverEffect: boolean;
26
+ showPressedEffect: boolean;
27
+ cssAnimationDuration: string;
28
+ radioSlotProps: DataAttributes;
29
+ radioIconSlotProps: DataAttributes;
30
+ children: ReactNode;
31
+ };
32
+ type RadioBaseProps = RadioProps & {
33
+ cssAnimationDuration: string;
34
+ enableInteractionTracking?: boolean;
35
+ renderRoot: (args: RenderRootArgs) => ReactNode;
36
+ renderIndicator: (args: RenderIndicatorArgs) => ReactNode;
37
+ };
38
+ declare const RadioBase: React.ForwardRefExoticComponent<RadioProps & {
39
+ cssAnimationDuration: string;
40
+ enableInteractionTracking?: boolean;
41
+ renderRoot: (args: RenderRootArgs) => ReactNode;
42
+ renderIndicator: (args: RenderIndicatorArgs) => ReactNode;
43
+ } & React.RefAttributes<HTMLInputElement>>;
44
+ //#endregion
45
+ export { RadioBase, type RadioBaseProps, type RenderIndicatorArgs, type RenderRootArgs, type ResolvedRadioVariant };
@@ -0,0 +1,46 @@
1
+
2
+ "use client";
3
+ import { RadioVariant } from "../../../types/dist/index.js";
4
+ import { DataAttributes, RadioProps } from "./types.js";
5
+ import React, { CSSProperties, ReactNode } from "react";
6
+
7
+ //#region src/components/client/Radio/RadioBase.d.ts
8
+ type ResolvedRadioVariant = RadioVariant | 'alert' | 'alert-secondary';
9
+ type RenderRootArgs = {
10
+ className: string;
11
+ style?: CSSProperties;
12
+ rootSlotProps: DataAttributes;
13
+ hasLabel: boolean;
14
+ isPressed: boolean;
15
+ onHoverStart: () => void;
16
+ onHoverEnd: () => void;
17
+ onTapStart: () => void;
18
+ onTapEnd: () => void;
19
+ children: ReactNode;
20
+ };
21
+ type RenderIndicatorArgs = {
22
+ size: NonNullable<RadioProps['size']>;
23
+ variant: ResolvedRadioVariant;
24
+ checked: boolean;
25
+ disabled?: boolean;
26
+ showHoverEffect: boolean;
27
+ showPressedEffect: boolean;
28
+ cssAnimationDuration: string;
29
+ radioSlotProps: DataAttributes;
30
+ radioIconSlotProps: DataAttributes;
31
+ children: ReactNode;
32
+ };
33
+ type RadioBaseProps = RadioProps & {
34
+ cssAnimationDuration: string;
35
+ enableInteractionTracking?: boolean;
36
+ renderRoot: (args: RenderRootArgs) => ReactNode;
37
+ renderIndicator: (args: RenderIndicatorArgs) => ReactNode;
38
+ };
39
+ declare const RadioBase: React.ForwardRefExoticComponent<RadioProps & {
40
+ cssAnimationDuration: string;
41
+ enableInteractionTracking?: boolean;
42
+ renderRoot: (args: RenderRootArgs) => ReactNode;
43
+ renderIndicator: (args: RenderIndicatorArgs) => ReactNode;
44
+ } & React.RefAttributes<HTMLInputElement>>;
45
+ //#endregion
46
+ export { RadioBase, type RadioBaseProps, type RenderIndicatorArgs, type RenderRootArgs, type ResolvedRadioVariant };
@@ -0,0 +1,130 @@
1
+ /*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
2
+ "use client";
3
+ import { cx, getStyles } from "../../../styles/styler.js";
4
+ import { FormLabel } from "../../FormLabel.js";
5
+ import { VARIANT_ERROR_MAP } from "./radioConstants.js";
6
+ import { useRadioGroup } from "./useRadioGroup.js";
7
+ import { forwardRef, useCallback, useId, useMemo, useRef, useState } from "react";
8
+ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
9
+ //#region src/components/client/Radio/RadioBase.tsx
10
+ const RadioBase = forwardRef(function RadioBase({ id, name: nameProp, label, labelPosition = "start", variant: variantProp = "primary", size = "md", reduceMotion: _reduceMotion, value: valueProp = "", checked: checkedProp, defaultChecked, disabled, hasError, onChange, onFocus, onBlur, className, style, slotProps, cssAnimationDuration, enableInteractionTracking = false, renderRoot, renderIndicator, ...radioProps }, parentRef) {
11
+ const generatedId = useId();
12
+ const uid = id ?? `uds-radio-${generatedId}`;
13
+ const rootSlotProps = slotProps?.root ?? {};
14
+ const radioSlotProps = slotProps?.radio ?? {};
15
+ const radioIconSlotProps = slotProps?.radioIcon ?? {};
16
+ const labelSlotProps = slotProps?.label ?? {};
17
+ const innerRef = useRef(null);
18
+ /**
19
+ * State
20
+ */
21
+ const { name, isControlled, checked, setGroupValue } = useRadioGroup({
22
+ name: nameProp,
23
+ value: valueProp,
24
+ checked: checkedProp,
25
+ defaultChecked
26
+ });
27
+ const [isHovered, setIsHovered] = useState(false);
28
+ const [isPressed, setIsPressed] = useState(false);
29
+ /**
30
+ * Derived values
31
+ */
32
+ const variant = useMemo(() => hasError ? VARIANT_ERROR_MAP[variantProp] : variantProp, [hasError, variantProp]);
33
+ const showHoverEffect = enableInteractionTracking && !disabled && isHovered;
34
+ const showPressedEffect = enableInteractionTracking && !disabled && !checked && isPressed;
35
+ /**
36
+ * Handlers
37
+ */
38
+ const handleOnChange = useCallback((e) => {
39
+ setGroupValue(e.target.value);
40
+ onChange?.(e);
41
+ }, [onChange, setGroupValue]);
42
+ const handleFocus = useCallback((e) => {
43
+ onFocus?.(e);
44
+ }, [onFocus]);
45
+ const handleBlur = useCallback((e) => {
46
+ onBlur?.(e);
47
+ }, [onBlur]);
48
+ const handleHoverStart = useCallback(() => {
49
+ if (enableInteractionTracking) setIsHovered(true);
50
+ }, [enableInteractionTracking]);
51
+ const handleHoverEnd = useCallback(() => {
52
+ if (enableInteractionTracking) setIsHovered(false);
53
+ }, [enableInteractionTracking]);
54
+ const handleTapStart = useCallback(() => {
55
+ if (enableInteractionTracking) setIsPressed(true);
56
+ }, [enableInteractionTracking]);
57
+ const handleTapEnd = useCallback(() => {
58
+ if (enableInteractionTracking) setIsPressed(false);
59
+ }, [enableInteractionTracking]);
60
+ const classNames = {
61
+ root: getStyles({
62
+ radioSizeRoot: size,
63
+ radioVariantValueRoot: checked ? "checked" : "unchecked",
64
+ radioVariantRoot: variant,
65
+ display: "flex",
66
+ flexDirection: labelPosition === "start" ? "row" : "row-reverse",
67
+ alignItems: "center",
68
+ className: cx([{
69
+ "cursor-pointer": !disabled,
70
+ "cursor-default": disabled,
71
+ "opacity-50": disabled
72
+ }, className])
73
+ }),
74
+ htmlRadio: cx("cursor-[inherit]", "absolute", "opacity-0", "top-1/2", "left-1/2", "w-[calc(100%+2px)]", "h-[calc(100%+2px)]", "transform", "translate-x-[-50%]", "translate-y-[-50%]"),
75
+ label: cx(labelPosition === "start" ? "text-start" : "text-end")
76
+ };
77
+ const input = /* @__PURE__ */ jsx("input", {
78
+ type: "radio",
79
+ tabIndex: 0,
80
+ ...radioProps,
81
+ ref: (ref) => {
82
+ innerRef.current = ref;
83
+ if (typeof parentRef === "function") parentRef(ref);
84
+ else if (parentRef !== null) parentRef.current = ref;
85
+ },
86
+ onFocus: handleFocus,
87
+ onBlur: handleBlur,
88
+ id: uid,
89
+ name,
90
+ value: valueProp,
91
+ disabled,
92
+ "aria-invalid": hasError,
93
+ onChange: handleOnChange,
94
+ ...isControlled ? { checked } : { defaultChecked },
95
+ className: classNames.htmlRadio
96
+ });
97
+ return renderRoot({
98
+ className: classNames.root,
99
+ style,
100
+ rootSlotProps,
101
+ hasLabel: Boolean(label),
102
+ isPressed,
103
+ onHoverStart: handleHoverStart,
104
+ onHoverEnd: handleHoverEnd,
105
+ onTapStart: handleTapStart,
106
+ onTapEnd: handleTapEnd,
107
+ children: /* @__PURE__ */ jsxs(Fragment$1, { children: [renderIndicator({
108
+ size,
109
+ variant,
110
+ checked: Boolean(checked),
111
+ disabled,
112
+ showHoverEffect,
113
+ showPressedEffect,
114
+ cssAnimationDuration,
115
+ radioSlotProps,
116
+ radioIconSlotProps,
117
+ children: input
118
+ }), label && /* @__PURE__ */ jsx(FormLabel, {
119
+ as: "div",
120
+ variant: "inherit",
121
+ color: "inherit",
122
+ label,
123
+ className: classNames.label,
124
+ ...labelSlotProps
125
+ })] })
126
+ });
127
+ });
128
+ RadioBase.displayName = "RadioBase";
129
+ //#endregion
130
+ export { RadioBase };
@@ -0,0 +1,14 @@
1
+ /*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
2
+ "use client";
3
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
+ //#region src/components/client/Radio/radioConstants.ts
5
+ const RADIO_VARIANTS = ["primary", "secondary"];
6
+ const RADIO_SIZES = ["sm", "md"];
7
+ const VARIANT_ERROR_MAP = {
8
+ primary: "alert",
9
+ secondary: "alert-secondary"
10
+ };
11
+ //#endregion
12
+ exports.RADIO_SIZES = RADIO_SIZES;
13
+ exports.RADIO_VARIANTS = RADIO_VARIANTS;
14
+ exports.VARIANT_ERROR_MAP = VARIANT_ERROR_MAP;
@@ -0,0 +1,8 @@
1
+
2
+ import { RadioSize, RadioVariant } from "../../../types/dist/index.cjs";
3
+ //#region src/components/client/Radio/radioConstants.d.ts
4
+ declare const RADIO_VARIANTS: RadioVariant[];
5
+ declare const RADIO_SIZES: RadioSize[];
6
+ declare const VARIANT_ERROR_MAP: Record<RadioVariant, 'alert' | 'alert-secondary'>;
7
+ //#endregion
8
+ export { RADIO_SIZES, RADIO_VARIANTS, VARIANT_ERROR_MAP };
@@ -0,0 +1,9 @@
1
+
2
+ "use client";
3
+ import { RadioSize, RadioVariant } from "../../../types/dist/index.js";
4
+ //#region src/components/client/Radio/radioConstants.d.ts
5
+ declare const RADIO_VARIANTS: RadioVariant[];
6
+ declare const RADIO_SIZES: RadioSize[];
7
+ declare const VARIANT_ERROR_MAP: Record<RadioVariant, 'alert' | 'alert-secondary'>;
8
+ //#endregion
9
+ export { RADIO_SIZES, RADIO_VARIANTS, VARIANT_ERROR_MAP };
@@ -0,0 +1,11 @@
1
+ /*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
2
+ "use client";
3
+ //#region src/components/client/Radio/radioConstants.ts
4
+ const RADIO_VARIANTS = ["primary", "secondary"];
5
+ const RADIO_SIZES = ["sm", "md"];
6
+ const VARIANT_ERROR_MAP = {
7
+ primary: "alert",
8
+ secondary: "alert-secondary"
9
+ };
10
+ //#endregion
11
+ export { RADIO_SIZES, RADIO_VARIANTS, VARIANT_ERROR_MAP };
@@ -0,0 +1,2 @@
1
+ /*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
2
+ "use client";
@@ -0,0 +1,20 @@
1
+
2
+ import { UniversalRadioProps } from "../../../types/dist/index.cjs";
3
+ import React from "react";
4
+
5
+ //#region src/components/client/Radio/types.d.ts
6
+ type DataAttributes = {
7
+ [name: `data-${string}`]: string;
8
+ };
9
+ type NativeInputProps = Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type' | 'checked' | 'value' | 'size' | 'height' | 'width' | 'color' | 'required'>;
10
+ interface RadioProps extends NativeInputProps, UniversalRadioProps {
11
+ /** Props to be passed into various slots within the component. */
12
+ slotProps?: {
13
+ root?: DataAttributes;
14
+ radio?: DataAttributes;
15
+ radioIcon?: DataAttributes;
16
+ label?: DataAttributes;
17
+ };
18
+ }
19
+ //#endregion
20
+ export { type DataAttributes, type NativeInputProps, type RadioProps };
@@ -0,0 +1,21 @@
1
+
2
+ "use client";
3
+ import { UniversalRadioProps } from "../../../types/dist/index.js";
4
+ import React from "react";
5
+
6
+ //#region src/components/client/Radio/types.d.ts
7
+ type DataAttributes = {
8
+ [name: `data-${string}`]: string;
9
+ };
10
+ type NativeInputProps = Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type' | 'checked' | 'value' | 'size' | 'height' | 'width' | 'color' | 'required'>;
11
+ interface RadioProps extends NativeInputProps, UniversalRadioProps {
12
+ /** Props to be passed into various slots within the component. */
13
+ slotProps?: {
14
+ root?: DataAttributes;
15
+ radio?: DataAttributes;
16
+ radioIcon?: DataAttributes;
17
+ label?: DataAttributes;
18
+ };
19
+ }
20
+ //#endregion
21
+ export { type DataAttributes, type NativeInputProps, type RadioProps };
@@ -0,0 +1,2 @@
1
+ /*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
2
+ "use client";
@@ -5,8 +5,8 @@ const require_runtime = require("../../../_virtual/_rolldown/runtime.cjs");
5
5
  const require_styles_styler = require("../../../styles/styler.cjs");
6
6
  const require_components_IconSlot = require("../../IconSlot.cjs");
7
7
  const require_components_Box = require("../../Box.cjs");
8
- const require_components_client_SpringMotionConfig = require("../SpringMotionConfig.cjs");
9
8
  const require_hooks_usePrefersReducedMotion = require("../../../hooks/usePrefersReducedMotion.cjs");
9
+ const require_components_client_SpringMotionConfig = require("../SpringMotionConfig.cjs");
10
10
  const require_components_client_Switch_SwitchBase = require("./SwitchBase.cjs");
11
11
  let react = require("react");
12
12
  react = require_runtime.__toESM(react);
@@ -3,8 +3,8 @@
3
3
  import { cx, getStyles } from "../../../styles/styler.js";
4
4
  import { IconSlot } from "../../IconSlot.js";
5
5
  import { Box } from "../../Box.js";
6
- import { SpringMotionConfig } from "../SpringMotionConfig.js";
7
6
  import { usePrefersReducedMotion } from "../../../hooks/usePrefersReducedMotion.js";
7
+ import { SpringMotionConfig } from "../SpringMotionConfig.js";
8
8
  import { SwitchBase } from "./SwitchBase.js";
9
9
  import { forwardRef } from "react";
10
10
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -3,11 +3,11 @@
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
4
  require("../../../_virtual/_rolldown/runtime.cjs");
5
5
  const require_styles_styler = require("../../../styles/styler.cjs");
6
+ const require_hooks_usePrefersReducedMotion = require("../../../hooks/usePrefersReducedMotion.cjs");
6
7
  const require_components_client_Tabs_tabsContext = require("./tabsContext.cjs");
7
8
  let react = require("react");
8
9
  let react_jsx_runtime = require("react/jsx-runtime");
9
10
  let _ariakit_react = require("@ariakit/react");
10
- let motion_react = require("motion/react");
11
11
  //#region src/components/client/Tabs/TabList.tsx
12
12
  /** Matches {@link Tab} per-tab underline (token CSS variables on the indicator root). */
13
13
  const tabRootUnderlineClassName = require_styles_styler.cx("pointer-events-none absolute bottom-0 left-0 right-0", "h-[var(--uds-tab-underline-width,0px)] bg-[var(--uds-tab-underline-color,transparent)]", "transition-[height,background-color] duration-[240ms] ease-[cubic-bezier(0.2,0,0,1)]");
@@ -21,7 +21,7 @@ const TabList = (0, react.forwardRef)(function TabList({ children, scrollable, c
21
21
  const listRef = (0, react.useRef)(null);
22
22
  const indicatorRef = (0, react.useRef)(null);
23
23
  const skipNextTransitionRef = (0, react.useRef)(true);
24
- const reducedMotion = (0, motion_react.useReducedMotion)();
24
+ const reducedMotion = require_hooks_usePrefersReducedMotion.usePrefersReducedMotion();
25
25
  const applyIndicator = (0, react.useCallback)(() => {
26
26
  const listEl = listRef.current;
27
27
  const indicatorEl = indicatorRef.current;
@@ -1,11 +1,11 @@
1
1
  /*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
2
2
  "use client";
3
3
  import { cx, getStyles } from "../../../styles/styler.js";
4
+ import { usePrefersReducedMotion } from "../../../hooks/usePrefersReducedMotion.js";
4
5
  import { useTabsContext } from "./tabsContext.js";
5
6
  import { forwardRef, useCallback, useLayoutEffect, useRef } from "react";
6
7
  import { jsx, jsxs } from "react/jsx-runtime";
7
8
  import { TabList as TabList$1, useStoreState, useTabContext } from "@ariakit/react";
8
- import { useReducedMotion } from "motion/react";
9
9
  //#region src/components/client/Tabs/TabList.tsx
10
10
  /** Matches {@link Tab} per-tab underline (token CSS variables on the indicator root). */
11
11
  const tabRootUnderlineClassName = cx("pointer-events-none absolute bottom-0 left-0 right-0", "h-[var(--uds-tab-underline-width,0px)] bg-[var(--uds-tab-underline-color,transparent)]", "transition-[height,background-color] duration-[240ms] ease-[cubic-bezier(0.2,0,0,1)]");
@@ -19,7 +19,7 @@ const TabList = forwardRef(function TabList({ children, scrollable, className, .
19
19
  const listRef = useRef(null);
20
20
  const indicatorRef = useRef(null);
21
21
  const skipNextTransitionRef = useRef(true);
22
- const reducedMotion = useReducedMotion();
22
+ const reducedMotion = usePrefersReducedMotion();
23
23
  const applyIndicator = useCallback(() => {
24
24
  const listEl = listRef.current;
25
25
  const indicatorEl = indicatorRef.current;
@@ -6,12 +6,12 @@ const require_styles_styler = require("../../../styles/styler.cjs");
6
6
  const require_components_client_Pressable = require("../Pressable.cjs");
7
7
  const require_components_IconSlot = require("../../IconSlot.cjs");
8
8
  const require_components_Text = require("../../Text.cjs");
9
+ const require_hooks_usePrefersReducedMotion = require("../../../hooks/usePrefersReducedMotion.cjs");
9
10
  const require_components_client_Button_Button = require("../Button/Button.cjs");
10
11
  const require_components_client_Toast_UDSToastConfigProvider = require("./UDSToastConfigProvider.cjs");
11
12
  const require_components_client_Toast_ToastContainer = require("./ToastContainer.cjs");
12
13
  let _yahoo_uds_icons = require("@yahoo/uds-icons");
13
14
  let react_jsx_runtime = require("react/jsx-runtime");
14
- let motion_react = require("motion/react");
15
15
  //#region src/components/client/Toast/Toast.tsx
16
16
  const iconMap = {
17
17
  loading: _yahoo_uds_icons.Progress,
@@ -48,7 +48,7 @@ const Toast = ({ message, onClickCloseButton, size: sizeProp, variant: variantPr
48
48
  const { className: startIconClassName, ...startIconProps } = slotProps?.startIcon ?? {};
49
49
  const { className: closeIconContainerClassName, ...closeIconContainerProps } = slotProps?.closeIconContainer ?? {};
50
50
  const { className: closeIconClassName, ...closeIconProps } = slotProps?.closeIcon ?? {};
51
- const reducedMotion = (0, motion_react.useReducedMotion)() || forceReduceMotion;
51
+ const reducedMotion = require_hooks_usePrefersReducedMotion.usePrefersReducedMotion() || forceReduceMotion;
52
52
  const handleClose = () => {
53
53
  closeToast?.();
54
54
  onClickCloseButton?.(id);
@@ -4,12 +4,12 @@ import { cx, getStyles } from "../../../styles/styler.js";
4
4
  import { Pressable } from "../Pressable.js";
5
5
  import { IconSlot } from "../../IconSlot.js";
6
6
  import { Text } from "../../Text.js";
7
+ import { usePrefersReducedMotion } from "../../../hooks/usePrefersReducedMotion.js";
7
8
  import { Button } from "../Button/Button.js";
8
9
  import { useToastConfig } from "./UDSToastConfigProvider.js";
9
10
  import { ToastContainer } from "./ToastContainer.js";
10
11
  import { CheckCircle, Cross, Error, Info, Progress, Warning } from "@yahoo/uds-icons";
11
12
  import { jsx, jsxs } from "react/jsx-runtime";
12
- import { useReducedMotion } from "motion/react";
13
13
  //#region src/components/client/Toast/Toast.tsx
14
14
  const iconMap = {
15
15
  loading: Progress,
@@ -46,7 +46,7 @@ const Toast = ({ message, onClickCloseButton, size: sizeProp, variant: variantPr
46
46
  const { className: startIconClassName, ...startIconProps } = slotProps?.startIcon ?? {};
47
47
  const { className: closeIconContainerClassName, ...closeIconContainerProps } = slotProps?.closeIconContainer ?? {};
48
48
  const { className: closeIconClassName, ...closeIconProps } = slotProps?.closeIcon ?? {};
49
- const reducedMotion = useReducedMotion() || forceReduceMotion;
49
+ const reducedMotion = usePrefersReducedMotion() || forceReduceMotion;
50
50
  const handleClose = () => {
51
51
  closeToast?.();
52
52
  onClickCloseButton?.(id);
@@ -17,7 +17,7 @@ const require_components_client_BottomSheet_BottomSheetProvider = require("./Bot
17
17
  const require_components_client_BottomSheet_BottomSheetTrigger = require("./BottomSheet/BottomSheetTrigger.cjs");
18
18
  const require_components_client_SpringMotionConfig = require("./SpringMotionConfig.cjs");
19
19
  const require_components_client_Button_Button = require("./Button/Button.cjs");
20
- const require_components_client_Checkbox = require("./Checkbox.cjs");
20
+ const require_components_client_Checkbox_Checkbox = require("./Checkbox/Checkbox.cjs");
21
21
  const require_components_client_Chip_ChipButton = require("./Chip/ChipButton.cjs");
22
22
  const require_components_client_Chip_ChipDismissible = require("./Chip/ChipDismissible.cjs");
23
23
  const require_components_client_Chip_ChipLink = require("./Chip/ChipLink.cjs");
@@ -84,7 +84,7 @@ exports.BottomSheetHeader = require_components_client_BottomSheet_BottomSheetHea
84
84
  exports.BottomSheetProvider = require_components_client_BottomSheet_BottomSheetProvider.BottomSheetProvider;
85
85
  exports.BottomSheetTrigger = require_components_client_BottomSheet_BottomSheetTrigger.BottomSheetTrigger;
86
86
  exports.Button = require_components_client_Button_Button.Button;
87
- exports.Checkbox = require_components_client_Checkbox.Checkbox;
87
+ exports.Checkbox = require_components_client_Checkbox_Checkbox.Checkbox;
88
88
  exports.Chip = require_components_client_Chip_Chip.Chip;
89
89
  exports.ChipButton = require_components_client_Chip_ChipButton.ChipButton;
90
90
  exports.ChipDismissible = require_components_client_Chip_ChipDismissible.ChipDismissible;
@@ -15,7 +15,7 @@ import { BottomSheetProvider, BottomSheetProviderProps } from "./BottomSheet/Bot
15
15
  import { BottomSheetTrigger, BottomSheetTriggerProps } from "./BottomSheet/BottomSheetTrigger.cjs";
16
16
  import { UDSBottomSheetConfigProvider, UDSBottomSheetConfigProviderProps } from "./BottomSheet/UDSBottomSheetConfigProvider.cjs";
17
17
  import { Button, ButtonProps } from "./Button/Button.cjs";
18
- import { Checkbox, CheckboxProps } from "./Checkbox.cjs";
18
+ import { Checkbox, CheckboxProps } from "./Checkbox/Checkbox.cjs";
19
19
  import { Chip, ChipProps } from "./Chip/Chip.cjs";
20
20
  import { ChipButton, ChipButtonProps } from "./Chip/ChipButton.cjs";
21
21
  import { ChipDismissible, ChipDismissibleProps } from "./Chip/ChipDismissible.cjs";
@@ -16,7 +16,7 @@ import { BottomSheetProvider, BottomSheetProviderProps } from "./BottomSheet/Bot
16
16
  import { BottomSheetTrigger, BottomSheetTriggerProps } from "./BottomSheet/BottomSheetTrigger.js";
17
17
  import { UDSBottomSheetConfigProvider, UDSBottomSheetConfigProviderProps } from "./BottomSheet/UDSBottomSheetConfigProvider.js";
18
18
  import { Button, ButtonProps } from "./Button/Button.js";
19
- import { Checkbox, CheckboxProps } from "./Checkbox.js";
19
+ import { Checkbox, CheckboxProps } from "./Checkbox/Checkbox.js";
20
20
  import { Chip, ChipProps } from "./Chip/Chip.js";
21
21
  import { ChipButton, ChipButtonProps } from "./Chip/ChipButton.js";
22
22
  import { ChipDismissible, ChipDismissibleProps } from "./Chip/ChipDismissible.js";
@@ -16,7 +16,7 @@ import { BottomSheetProvider } from "./BottomSheet/BottomSheetProvider.js";
16
16
  import { BottomSheetTrigger } from "./BottomSheet/BottomSheetTrigger.js";
17
17
  import { SpringMotionConfig } from "./SpringMotionConfig.js";
18
18
  import { Button } from "./Button/Button.js";
19
- import { Checkbox } from "./Checkbox.js";
19
+ import { Checkbox } from "./Checkbox/Checkbox.js";
20
20
  import { ChipButton } from "./Chip/ChipButton.js";
21
21
  import { ChipDismissible } from "./Chip/ChipDismissible.js";
22
22
  import { ChipLink } from "./Chip/ChipLink.js";
@@ -31,7 +31,7 @@ const require_components_client_BottomSheet_BottomSheetProvider = require("./cli
31
31
  const require_components_client_BottomSheet_BottomSheetTrigger = require("./client/BottomSheet/BottomSheetTrigger.cjs");
32
32
  const require_components_client_SpringMotionConfig = require("./client/SpringMotionConfig.cjs");
33
33
  const require_components_client_Button_Button = require("./client/Button/Button.cjs");
34
- const require_components_client_Checkbox = require("./client/Checkbox.cjs");
34
+ const require_components_client_Checkbox_Checkbox = require("./client/Checkbox/Checkbox.cjs");
35
35
  const require_components_client_Chip_ChipButton = require("./client/Chip/ChipButton.cjs");
36
36
  const require_components_client_Chip_ChipDismissible = require("./client/Chip/ChipDismissible.cjs");
37
37
  const require_components_client_Chip_ChipLink = require("./client/Chip/ChipLink.cjs");
@@ -103,7 +103,7 @@ exports.BottomSheetProvider = require_components_client_BottomSheet_BottomSheetP
103
103
  exports.BottomSheetTrigger = require_components_client_BottomSheet_BottomSheetTrigger.BottomSheetTrigger;
104
104
  exports.Box = require_components_Box.Box;
105
105
  exports.Button = require_components_client_Button_Button.Button;
106
- exports.Checkbox = require_components_client_Checkbox.Checkbox;
106
+ exports.Checkbox = require_components_client_Checkbox_Checkbox.Checkbox;
107
107
  exports.Chip = require_components_client_Chip_Chip.Chip;
108
108
  exports.ChipButton = require_components_client_Chip_ChipButton.ChipButton;
109
109
  exports.ChipDismissible = require_components_client_Chip_ChipDismissible.ChipDismissible;
@@ -30,7 +30,7 @@ import { BottomSheetHeader, BottomSheetHeaderProps } from "./client/BottomSheet/
30
30
  import { BottomSheetProvider, BottomSheetProviderProps } from "./client/BottomSheet/BottomSheetProvider.cjs";
31
31
  import { BottomSheetTrigger, BottomSheetTriggerProps } from "./client/BottomSheet/BottomSheetTrigger.cjs";
32
32
  import { Button, ButtonProps } from "./client/Button/Button.cjs";
33
- import { Checkbox, CheckboxProps } from "./client/Checkbox.cjs";
33
+ import { Checkbox, CheckboxProps } from "./client/Checkbox/Checkbox.cjs";
34
34
  import { Chip, ChipProps } from "./client/Chip/Chip.cjs";
35
35
  import { ChipButton, ChipButtonProps } from "./client/Chip/ChipButton.cjs";
36
36
  import { ChipDismissible, ChipDismissibleProps } from "./client/Chip/ChipDismissible.cjs";