@yahoo/uds 3.157.0 → 3.158.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 (220) hide show
  1. package/dist/automated-config/dist/generated/autoVariants.cjs +26 -0
  2. package/dist/automated-config/dist/generated/autoVariants.d.cts +17 -0
  3. package/dist/automated-config/dist/generated/autoVariants.d.ts +17 -0
  4. package/dist/automated-config/dist/generated/autoVariants.js +26 -0
  5. package/dist/automated-config/dist/generated/generatedConfigs.cjs +3287 -596
  6. package/dist/automated-config/dist/generated/generatedConfigs.d.cts +350 -12
  7. package/dist/automated-config/dist/generated/generatedConfigs.d.ts +350 -12
  8. package/dist/automated-config/dist/generated/generatedConfigs.js +3285 -597
  9. package/dist/automated-config/dist/generated/universalTokensConfigAuto.cjs +276 -45
  10. package/dist/automated-config/dist/generated/universalTokensConfigAuto.d.cts +8 -2
  11. package/dist/automated-config/dist/generated/universalTokensConfigAuto.d.ts +8 -2
  12. package/dist/automated-config/dist/generated/universalTokensConfigAuto.js +276 -45
  13. package/dist/automated-config/dist/properties.cjs +8 -1
  14. package/dist/automated-config/dist/properties.d.cts +8 -0
  15. package/dist/automated-config/dist/properties.d.ts +8 -0
  16. package/dist/automated-config/dist/properties.js +8 -1
  17. package/dist/automated-config/dist/types/ComponentConfig.d.cts +3 -1
  18. package/dist/automated-config/dist/types/ComponentConfig.d.ts +3 -1
  19. package/dist/automated-config/dist/utils/buildConfigSchema.cjs +48 -33
  20. package/dist/automated-config/dist/utils/buildConfigSchema.d.cts +14 -4
  21. package/dist/automated-config/dist/utils/buildConfigSchema.d.ts +14 -4
  22. package/dist/automated-config/dist/utils/buildConfigSchema.js +49 -34
  23. package/dist/automated-config/dist/utils/componentStatePseudoStates.cjs +4 -0
  24. package/dist/automated-config/dist/utils/componentStatePseudoStates.js +4 -1
  25. package/dist/automated-config/dist/utils/getButtonControlHeight.cjs +129 -0
  26. package/dist/automated-config/dist/utils/getButtonControlHeight.d.cts +133 -0
  27. package/dist/automated-config/dist/utils/getButtonControlHeight.d.ts +133 -0
  28. package/dist/automated-config/dist/utils/getButtonControlHeight.js +122 -0
  29. package/dist/automated-config/dist/utils/getButtonControlHeightPx.cjs +114 -0
  30. package/dist/automated-config/dist/utils/getButtonControlHeightPx.d.cts +78 -0
  31. package/dist/automated-config/dist/utils/getButtonControlHeightPx.d.ts +78 -0
  32. package/dist/automated-config/dist/utils/getButtonControlHeightPx.js +108 -0
  33. package/dist/automated-config/dist/utils/getConfigVariantProperties.d.cts +2 -2
  34. package/dist/automated-config/dist/utils/getConfigVariantProperties.d.ts +2 -2
  35. package/dist/automated-config/dist/utils/getConfigVariantPseudoStates.cjs +5 -2
  36. package/dist/automated-config/dist/utils/getConfigVariantPseudoStates.js +6 -3
  37. package/dist/automated-config/dist/utils/iconButtonMatchButtonHeight.cjs +110 -0
  38. package/dist/automated-config/dist/utils/iconButtonMatchButtonHeight.d.cts +19 -0
  39. package/dist/automated-config/dist/utils/iconButtonMatchButtonHeight.d.ts +19 -0
  40. package/dist/automated-config/dist/utils/iconButtonMatchButtonHeight.js +108 -0
  41. package/dist/automated-config/dist/utils/index.cjs +106 -33
  42. package/dist/automated-config/dist/utils/index.d.cts +16 -4
  43. package/dist/automated-config/dist/utils/index.d.ts +16 -4
  44. package/dist/automated-config/dist/utils/index.js +107 -34
  45. package/dist/automated-config/dist/utils/isConfiguratorPropertyVisible.cjs +15 -0
  46. package/dist/automated-config/dist/utils/isConfiguratorPropertyVisible.d.cts +20 -0
  47. package/dist/automated-config/dist/utils/isConfiguratorPropertyVisible.d.ts +20 -0
  48. package/dist/automated-config/dist/utils/isConfiguratorPropertyVisible.js +15 -0
  49. package/dist/automated-config/dist/utils/pseudoStateSelectors.cjs +6 -3
  50. package/dist/automated-config/dist/utils/pseudoStateSelectors.d.cts +1 -1
  51. package/dist/automated-config/dist/utils/pseudoStateSelectors.d.ts +1 -1
  52. package/dist/automated-config/dist/utils/pseudoStateSelectors.js +6 -3
  53. package/dist/components/client/Button.cjs +3 -3
  54. package/dist/components/client/Button.js +3 -3
  55. package/dist/components/client/Input/Input.cjs +1 -1
  56. package/dist/components/client/Input/Input.js +1 -1
  57. package/dist/components/client/Menu/Menu.Item.cjs +1 -0
  58. package/dist/components/client/Menu/Menu.Item.js +1 -0
  59. package/dist/components/client/Select/Select.cjs +179 -0
  60. package/dist/components/client/Select/Select.d.cts +55 -0
  61. package/dist/components/client/Select/Select.d.ts +56 -0
  62. package/dist/components/client/Select/Select.js +176 -0
  63. package/dist/components/client/Select/SelectContent.cjs +75 -0
  64. package/dist/components/client/Select/SelectContent.d.cts +44 -0
  65. package/dist/components/client/Select/SelectContent.d.ts +45 -0
  66. package/dist/components/client/Select/SelectContent.js +73 -0
  67. package/dist/components/client/Select/SelectDivider.cjs +63 -0
  68. package/dist/components/client/Select/SelectDivider.d.cts +44 -0
  69. package/dist/components/client/Select/SelectDivider.d.ts +45 -0
  70. package/dist/components/client/Select/SelectDivider.js +61 -0
  71. package/dist/components/client/Select/SelectHelpText.cjs +51 -0
  72. package/dist/components/client/Select/SelectHelpText.d.cts +27 -0
  73. package/dist/components/client/Select/SelectHelpText.d.ts +28 -0
  74. package/dist/components/client/Select/SelectHelpText.js +48 -0
  75. package/dist/components/client/Select/SelectItem.cjs +172 -0
  76. package/dist/components/client/Select/SelectItem.d.cts +29 -0
  77. package/dist/components/client/Select/SelectItem.d.ts +30 -0
  78. package/dist/components/client/Select/SelectItem.js +170 -0
  79. package/dist/components/client/Select/SelectTrigger.cjs +138 -0
  80. package/dist/components/client/Select/SelectTrigger.d.cts +27 -0
  81. package/dist/components/client/Select/SelectTrigger.d.ts +28 -0
  82. package/dist/components/client/Select/SelectTrigger.js +136 -0
  83. package/dist/components/client/Select/SelectValue.cjs +28 -0
  84. package/dist/components/client/Select/SelectValue.d.cts +19 -0
  85. package/dist/components/client/Select/SelectValue.d.ts +20 -0
  86. package/dist/components/client/Select/SelectValue.js +26 -0
  87. package/dist/components/client/Select/index.cjs +11 -0
  88. package/dist/components/client/Select/index.d.cts +6 -0
  89. package/dist/components/client/Select/index.d.ts +7 -0
  90. package/dist/components/client/Select/index.js +7 -0
  91. package/dist/components/client/Select/selectContext.cjs +20 -0
  92. package/dist/components/client/Select/selectContext.d.cts +23 -0
  93. package/dist/components/client/Select/selectContext.d.ts +24 -0
  94. package/dist/components/client/Select/selectContext.js +16 -0
  95. package/dist/components/client/Select/selectFieldStyles.cjs +85 -0
  96. package/dist/components/client/Select/selectFieldStyles.d.cts +37 -0
  97. package/dist/components/client/Select/selectFieldStyles.d.ts +38 -0
  98. package/dist/components/client/Select/selectFieldStyles.js +75 -0
  99. package/dist/components/client/index.cjs +8 -0
  100. package/dist/components/client/index.d.cts +5 -1
  101. package/dist/components/client/index.d.ts +5 -1
  102. package/dist/components/client/index.js +5 -1
  103. package/dist/components/index.cjs +8 -0
  104. package/dist/components/index.d.cts +5 -1
  105. package/dist/components/index.d.ts +5 -1
  106. package/dist/components/index.js +5 -1
  107. package/dist/config/dist/index.cjs +383 -73
  108. package/dist/config/dist/index.js +383 -73
  109. package/dist/css/dist/css/utils.cjs +3 -0
  110. package/dist/css/dist/css/utils.js +3 -0
  111. package/dist/css/dist/packages/automated-config/dist/properties.cjs +8 -1
  112. package/dist/css/dist/packages/automated-config/dist/properties.js +8 -1
  113. package/dist/css/dist/packages/config/dist/index.cjs +383 -73
  114. package/dist/css/dist/packages/config/dist/index.js +383 -73
  115. package/dist/css-tokens/dist/index.cjs +2 -0
  116. package/dist/css-tokens/dist/index.d.cts +2 -1
  117. package/dist/css-tokens/dist/index.d.ts +2 -1
  118. package/dist/css-tokens/dist/index.js +2 -1
  119. package/dist/index.cjs +34 -0
  120. package/dist/index.d.cts +12 -4
  121. package/dist/index.d.ts +12 -4
  122. package/dist/index.js +11 -3
  123. package/dist/styles/styler.d.cts +29 -12
  124. package/dist/styles/styler.d.ts +29 -12
  125. package/dist/styles/variants.d.cts +54 -0
  126. package/dist/styles/variants.d.ts +54 -0
  127. package/dist/tailwind/utils/index.cjs +3 -0
  128. package/dist/tailwind/utils/index.d.cts +2 -1
  129. package/dist/tailwind/utils/index.d.ts +2 -1
  130. package/dist/tailwind/utils/index.js +2 -1
  131. package/dist/tailwind-internal/dist/base/addColorModeVars.cjs +1 -1
  132. package/dist/tailwind-internal/dist/base/addColorModeVars.js +1 -1
  133. package/dist/tailwind-internal/dist/base/addColorModeVarsV2.cjs +1 -1
  134. package/dist/tailwind-internal/dist/base/addColorModeVarsV2.js +1 -1
  135. package/dist/tailwind-internal/dist/components/getFocusRingStyles.cjs +74 -6
  136. package/dist/tailwind-internal/dist/components/getFocusRingStyles.d.cts +14 -0
  137. package/dist/tailwind-internal/dist/components/getFocusRingStyles.d.ts +14 -0
  138. package/dist/tailwind-internal/dist/components/getFocusRingStyles.js +74 -7
  139. package/dist/tailwind-internal/dist/components/getResponsiveTextStyles.cjs +1 -1
  140. package/dist/tailwind-internal/dist/components/getResponsiveTextStyles.js +1 -1
  141. package/dist/tailwind-internal/dist/index.d.cts +1 -0
  142. package/dist/tailwind-internal/dist/index.d.ts +1 -0
  143. package/dist/tailwind-internal/dist/packages/automated-config/dist/generated/generatedConfigs.cjs +3287 -596
  144. package/dist/tailwind-internal/dist/packages/automated-config/dist/generated/generatedConfigs.js +3285 -597
  145. package/dist/tailwind-internal/dist/packages/automated-config/dist/properties.cjs +8 -1
  146. package/dist/tailwind-internal/dist/packages/automated-config/dist/properties.js +8 -1
  147. package/dist/tailwind-internal/dist/packages/automated-config/dist/utils/componentStatePseudoStates.cjs +4 -0
  148. package/dist/tailwind-internal/dist/packages/automated-config/dist/utils/componentStatePseudoStates.js +4 -1
  149. package/dist/tailwind-internal/dist/packages/automated-config/dist/utils/getButtonControlHeight.cjs +126 -0
  150. package/dist/tailwind-internal/dist/packages/automated-config/dist/utils/getButtonControlHeight.js +123 -0
  151. package/dist/tailwind-internal/dist/packages/automated-config/dist/utils/iconButtonMatchButtonHeight.cjs +20 -0
  152. package/dist/tailwind-internal/dist/packages/automated-config/dist/utils/iconButtonMatchButtonHeight.js +20 -0
  153. package/dist/tailwind-internal/dist/packages/automated-config/dist/utils/index.cjs +103 -33
  154. package/dist/tailwind-internal/dist/packages/automated-config/dist/utils/index.js +104 -34
  155. package/dist/tailwind-internal/dist/packages/automated-config/dist/utils/pseudoStateSelectors.cjs +6 -3
  156. package/dist/tailwind-internal/dist/packages/automated-config/dist/utils/pseudoStateSelectors.js +6 -3
  157. package/dist/tailwind-internal/dist/packages/config/dist/index.cjs +383 -73
  158. package/dist/tailwind-internal/dist/packages/config/dist/index.js +383 -73
  159. package/dist/tailwind-internal/dist/packages/css-tokens/dist/index.cjs +12 -10
  160. package/dist/tailwind-internal/dist/packages/css-tokens/dist/index.js +3 -2
  161. package/dist/tailwind-internal/dist/plugins/a11y.cjs +6 -2
  162. package/dist/tailwind-internal/dist/plugins/a11y.js +6 -2
  163. package/dist/tailwind-internal/dist/plugins/blurBgFallback.cjs +1 -1
  164. package/dist/tailwind-internal/dist/plugins/blurBgFallback.js +1 -1
  165. package/dist/tailwind-internal/dist/plugins/borderRadius.cjs +1 -1
  166. package/dist/tailwind-internal/dist/plugins/borderRadius.js +1 -1
  167. package/dist/tailwind-internal/dist/plugins/borderWidth.cjs +1 -1
  168. package/dist/tailwind-internal/dist/plugins/borderWidth.js +1 -1
  169. package/dist/tailwind-internal/dist/plugins/colors.cjs +2 -2
  170. package/dist/tailwind-internal/dist/plugins/colors.js +2 -2
  171. package/dist/tailwind-internal/dist/plugins/components.cjs +5 -2
  172. package/dist/tailwind-internal/dist/plugins/components.js +6 -3
  173. package/dist/tailwind-internal/dist/plugins/elevation.cjs +1 -1
  174. package/dist/tailwind-internal/dist/plugins/elevation.js +1 -1
  175. package/dist/tailwind-internal/dist/plugins/shadows.cjs +1 -1
  176. package/dist/tailwind-internal/dist/plugins/shadows.js +1 -1
  177. package/dist/tailwind-internal/dist/plugins/typography.cjs +2 -2
  178. package/dist/tailwind-internal/dist/plugins/typography.js +2 -2
  179. package/dist/tailwind-internal/dist/utils/getElevationStyles.cjs +1 -1
  180. package/dist/tailwind-internal/dist/utils/getElevationStyles.js +1 -1
  181. package/dist/tailwind-internal/dist/utils/getFontStyles.cjs +1 -1
  182. package/dist/tailwind-internal/dist/utils/getFontStyles.js +1 -1
  183. package/dist/tailwind-internal/dist/utils/getMotionStyles.cjs +1 -1
  184. package/dist/tailwind-internal/dist/utils/getMotionStyles.js +1 -1
  185. package/dist/tailwind-internal/dist/utils/getShadowPresetValues.cjs +1 -1
  186. package/dist/tailwind-internal/dist/utils/getShadowPresetValues.js +1 -1
  187. package/dist/tailwind-internal/dist/utils/getShadowStyles.cjs +1 -1
  188. package/dist/tailwind-internal/dist/utils/getShadowStyles.js +1 -1
  189. package/dist/tailwind-internal/dist/utils/parseTokens.cjs +2 -2
  190. package/dist/tailwind-internal/dist/utils/parseTokens.js +2 -2
  191. package/dist/tokens/automation/configs/index.cjs +3 -0
  192. package/dist/tokens/automation/configs/index.d.cts +2 -2
  193. package/dist/tokens/automation/configs/index.d.ts +2 -2
  194. package/dist/tokens/automation/configs/index.js +2 -2
  195. package/dist/tokens/automation/index.cjs +25 -0
  196. package/dist/tokens/automation/index.d.cts +6 -2
  197. package/dist/tokens/automation/index.d.ts +6 -2
  198. package/dist/tokens/automation/index.js +6 -2
  199. package/dist/tokens/consts/cssTokens.cjs +1 -0
  200. package/dist/tokens/consts/cssTokens.d.cts +2 -2
  201. package/dist/tokens/consts/cssTokens.d.ts +2 -2
  202. package/dist/tokens/consts/cssTokens.js +2 -2
  203. package/dist/tokens/index.cjs +26 -0
  204. package/dist/tokens/index.d.cts +8 -4
  205. package/dist/tokens/index.d.ts +8 -4
  206. package/dist/tokens/index.js +7 -3
  207. package/dist/tokens/types.d.cts +2 -2
  208. package/dist/tokens/types.d.ts +2 -2
  209. package/dist/types/dist/index.d.cts +36 -1
  210. package/dist/types/dist/index.d.ts +36 -1
  211. package/dist/uds/generated/componentData.cjs +718 -308
  212. package/dist/uds/generated/componentData.js +718 -308
  213. package/dist/uds/generated/migrationSchemaVersion.cjs +1 -1
  214. package/dist/uds/generated/migrationSchemaVersion.js +1 -1
  215. package/dist/uds/generated/tailwindPurge.cjs +1501 -315
  216. package/dist/uds/generated/tailwindPurge.js +1501 -315
  217. package/generated/componentData.json +897 -398
  218. package/generated/migrationSchemaVersion.ts +1 -1
  219. package/generated/tailwindPurge.ts +4 -4
  220. package/package.json +1 -1
@@ -0,0 +1,179 @@
1
+ /*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
2
+ "use client";
3
+ "use client";
4
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
5
+ const require_runtime = require("../../../_virtual/_rolldown/runtime.cjs");
6
+ const require_styles_styler = require("../../../styles/styler.cjs");
7
+ const require_components_Box = require("../../Box.cjs");
8
+ const require_components_VStack = require("../../VStack.cjs");
9
+ const require_components_client_SpringMotionConfig = require("../SpringMotionConfig.cjs");
10
+ const require_components_client_Select_selectContext = require("./selectContext.cjs");
11
+ const require_components_client_Select_selectFieldStyles = require("./selectFieldStyles.cjs");
12
+ const require_components_client_Select_SelectHelpText = require("./SelectHelpText.cjs");
13
+ const require_components_client_Select_SelectTrigger = require("./SelectTrigger.cjs");
14
+ let react = require("react");
15
+ let react_jsx_runtime = require("react/jsx-runtime");
16
+ let lodash_isFunction_js = require("lodash/isFunction.js");
17
+ lodash_isFunction_js = require_runtime.__toESM(lodash_isFunction_js);
18
+ let _ariakit_react = require("@ariakit/react");
19
+ //#region src/components/client/Select/Select.tsx
20
+ const SelectRoot = (0, react.forwardRef)(function SelectRoot({ children, label, helpText, helperTextIcon, placeholder, name, size = "md", disabled, required, hasError, readOnly, width = "full", reduceMotion: forceReduceMotion, startIcon, endIcon, className, style, slotProps }, ref) {
21
+ const value = (0, _ariakit_react.useStoreState)((0, _ariakit_react.useSelectContext)(), "value");
22
+ const hasValue = value != null && value !== "";
23
+ const hasHelpText = Boolean(helpText || helperTextIcon);
24
+ const uid = `uds-select-${(0, react.useId)()}`;
25
+ const helpTextId = hasHelpText ? `${uid}-help-text` : void 0;
26
+ const triggerWrapperRef = (0, react.useRef)(null);
27
+ const contextValue = (0, react.useMemo)(() => ({
28
+ size,
29
+ disabled,
30
+ readOnly,
31
+ required,
32
+ hasError,
33
+ width,
34
+ reduceMotion: forceReduceMotion,
35
+ uid,
36
+ helpTextId,
37
+ triggerWrapperRef
38
+ }), [
39
+ size,
40
+ disabled,
41
+ readOnly,
42
+ required,
43
+ hasError,
44
+ width,
45
+ forceReduceMotion,
46
+ uid,
47
+ helpTextId
48
+ ]);
49
+ const { className: rootSlotClassName, ...rootSlotProps } = slotProps?.root ?? {};
50
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_client_Select_selectContext.SelectFieldContext.Provider, {
51
+ value: contextValue,
52
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_components_VStack.VStack, {
53
+ width,
54
+ className: require_styles_styler.cx(require_components_client_Select_selectFieldStyles.getSelectRootClassName({
55
+ size,
56
+ hasValue,
57
+ disabled,
58
+ className
59
+ }), rootSlotClassName),
60
+ style,
61
+ ...rootSlotProps,
62
+ children: [
63
+ label && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_components_Box.Box, {
64
+ spacingBottom: "2",
65
+ columnGap: "0.5",
66
+ alignItems: "flex-end",
67
+ className: require_components_client_Select_selectFieldStyles.getSelectLabelClassName(size, hasValue),
68
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("label", {
69
+ htmlFor: uid,
70
+ ...slotProps?.label,
71
+ children: (0, lodash_isFunction_js.default)(label) ? label() : label
72
+ }), required && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
73
+ className: require_components_client_Select_selectFieldStyles.getSelectLabelRequiredClassName(hasValue),
74
+ children: "*"
75
+ })]
76
+ }),
77
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_client_Select_SelectTrigger.SelectTrigger, {
78
+ ref,
79
+ placeholder,
80
+ name,
81
+ startIcon,
82
+ endIcon,
83
+ disabled,
84
+ slotProps: slotProps?.trigger
85
+ }),
86
+ hasHelpText && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_client_Select_SelectHelpText.SelectHelpText, {
87
+ helpText,
88
+ helperTextIcon,
89
+ slotProps: {
90
+ helperText: slotProps?.helperText,
91
+ helperTextIcon: slotProps?.helperTextIcon
92
+ }
93
+ }),
94
+ children
95
+ ]
96
+ })
97
+ });
98
+ });
99
+ SelectRoot.displayName = "SelectRoot";
100
+ /**
101
+ * **⚙️ A composable Select component**
102
+ *
103
+ * @componentType Client component
104
+ *
105
+ * @description
106
+ * Select lets users pick one value from a list. Compose with `SelectContent` and
107
+ * `SelectItem`, similar to `Tabs` with `TabList` and `Tab`.
108
+ *
109
+ * @example
110
+ * ```tsx
111
+ * 'use client';
112
+ * import { Select, SelectContent, SelectItem } from '@yahoo/uds';
113
+ *
114
+ * <Select label="Country" placeholder="Select a country" defaultValue="us">
115
+ * <SelectContent>
116
+ * <SelectItem value="us">United States</SelectItem>
117
+ * <SelectItem value="ca">Canada</SelectItem>
118
+ * </SelectContent>
119
+ * </Select>
120
+ * ```
121
+ */
122
+ const Select = (0, react.forwardRef)(function Select({ children, label, helpText, helperTextIcon, placeholder, name, size, disabled, required, hasError, readOnly, width, reduceMotion, startIcon, endIcon, className, style, slotProps, defaultValue = "", value, setValue: setValueProp, onChange, open: openProp, defaultOpen, setOpen: setOpenProp, ...providerProps }, ref) {
123
+ const setValue = setValueProp ?? onChange;
124
+ const isOpenControlled = openProp !== void 0;
125
+ const [uncontrolledOpen, setUncontrolledOpen] = (0, react.useState)(defaultOpen ?? false);
126
+ const open = isOpenControlled ? openProp : uncontrolledOpen;
127
+ const handleSetOpen = (0, react.useCallback)((nextOpen) => {
128
+ if (readOnly && isOpenControlled) return;
129
+ if (nextOpen && (readOnly || disabled)) return;
130
+ if (!isOpenControlled) setUncontrolledOpen(nextOpen);
131
+ setOpenProp?.(nextOpen);
132
+ }, [
133
+ disabled,
134
+ isOpenControlled,
135
+ readOnly,
136
+ setOpenProp
137
+ ]);
138
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_client_SpringMotionConfig.SpringMotionConfig, {
139
+ reducedMotion: "user",
140
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_ariakit_react.SelectProvider, {
141
+ ...value !== void 0 ? {
142
+ ...providerProps,
143
+ value,
144
+ setValue,
145
+ open,
146
+ setOpen: handleSetOpen
147
+ } : {
148
+ ...providerProps,
149
+ defaultValue,
150
+ open,
151
+ setOpen: handleSetOpen
152
+ },
153
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectRoot, {
154
+ ref,
155
+ label,
156
+ helpText,
157
+ helperTextIcon,
158
+ placeholder,
159
+ name,
160
+ size,
161
+ disabled,
162
+ required,
163
+ hasError,
164
+ readOnly,
165
+ width,
166
+ reduceMotion,
167
+ startIcon,
168
+ endIcon,
169
+ className,
170
+ style,
171
+ slotProps,
172
+ children
173
+ })
174
+ })
175
+ });
176
+ });
177
+ Select.displayName = "Select";
178
+ //#endregion
179
+ exports.Select = Select;
@@ -0,0 +1,55 @@
1
+
2
+ import { UniversalSelectProps } from "../../../types/dist/index.cjs";
3
+ import { IconPropsWithSVGProps } from "../../../tokens/types.cjs";
4
+ import { SelectTriggerProps } from "./SelectTrigger.cjs";
5
+ import * as _$react from "react";
6
+ import { SelectProviderProps } from "@ariakit/react";
7
+
8
+ //#region src/components/client/Select/Select.d.ts
9
+ type DataAttributes = {
10
+ [name: `data-${string}`]: string;
11
+ };
12
+ interface SelectProps extends Pick<UniversalSelectProps, 'label' | 'disabled' | 'required' | 'helpText' | 'helperTextIcon' | 'hasError' | 'size' | 'startIcon' | 'endIcon' | 'reduceMotion' | 'readOnly' | 'width'>, Omit<SelectProviderProps, 'children' | 'setValue'> {
13
+ children?: React.ReactNode;
14
+ /** Placeholder text shown when no value is selected. */
15
+ placeholder?: string;
16
+ /** Native form field name. Renders a hidden `<select>` for form submission. */
17
+ name?: string;
18
+ className?: string;
19
+ style?: React.CSSProperties;
20
+ /** Called when the selected value changes. Alias for Ariakit `setValue`. */
21
+ onChange?: (value: string) => void;
22
+ setValue?: SelectProviderProps['setValue'];
23
+ slotProps?: {
24
+ root?: Partial<React.HTMLAttributes<HTMLDivElement> & DataAttributes>;
25
+ label?: Partial<React.LabelHTMLAttributes<HTMLLabelElement> & DataAttributes>;
26
+ trigger?: SelectTriggerProps['slotProps'];
27
+ helperText?: Partial<React.HTMLAttributes<HTMLSpanElement> & DataAttributes>;
28
+ helperTextIcon?: Partial<IconPropsWithSVGProps & DataAttributes>;
29
+ };
30
+ }
31
+ /**
32
+ * **⚙️ A composable Select component**
33
+ *
34
+ * @componentType Client component
35
+ *
36
+ * @description
37
+ * Select lets users pick one value from a list. Compose with `SelectContent` and
38
+ * `SelectItem`, similar to `Tabs` with `TabList` and `Tab`.
39
+ *
40
+ * @example
41
+ * ```tsx
42
+ * 'use client';
43
+ * import { Select, SelectContent, SelectItem } from '@yahoo/uds';
44
+ *
45
+ * <Select label="Country" placeholder="Select a country" defaultValue="us">
46
+ * <SelectContent>
47
+ * <SelectItem value="us">United States</SelectItem>
48
+ * <SelectItem value="ca">Canada</SelectItem>
49
+ * </SelectContent>
50
+ * </Select>
51
+ * ```
52
+ */
53
+ declare const Select: _$react.ForwardRefExoticComponent<SelectProps & _$react.RefAttributes<HTMLButtonElement>>;
54
+ //#endregion
55
+ export { Select, type SelectProps };
@@ -0,0 +1,56 @@
1
+
2
+ "use client";
3
+ import { UniversalSelectProps } from "../../../types/dist/index.js";
4
+ import { IconPropsWithSVGProps } from "../../../tokens/types.js";
5
+ import { SelectTriggerProps } from "./SelectTrigger.js";
6
+ import * as _$react from "react";
7
+ import { SelectProviderProps } from "@ariakit/react";
8
+
9
+ //#region src/components/client/Select/Select.d.ts
10
+ type DataAttributes = {
11
+ [name: `data-${string}`]: string;
12
+ };
13
+ interface SelectProps extends Pick<UniversalSelectProps, 'label' | 'disabled' | 'required' | 'helpText' | 'helperTextIcon' | 'hasError' | 'size' | 'startIcon' | 'endIcon' | 'reduceMotion' | 'readOnly' | 'width'>, Omit<SelectProviderProps, 'children' | 'setValue'> {
14
+ children?: React.ReactNode;
15
+ /** Placeholder text shown when no value is selected. */
16
+ placeholder?: string;
17
+ /** Native form field name. Renders a hidden `<select>` for form submission. */
18
+ name?: string;
19
+ className?: string;
20
+ style?: React.CSSProperties;
21
+ /** Called when the selected value changes. Alias for Ariakit `setValue`. */
22
+ onChange?: (value: string) => void;
23
+ setValue?: SelectProviderProps['setValue'];
24
+ slotProps?: {
25
+ root?: Partial<React.HTMLAttributes<HTMLDivElement> & DataAttributes>;
26
+ label?: Partial<React.LabelHTMLAttributes<HTMLLabelElement> & DataAttributes>;
27
+ trigger?: SelectTriggerProps['slotProps'];
28
+ helperText?: Partial<React.HTMLAttributes<HTMLSpanElement> & DataAttributes>;
29
+ helperTextIcon?: Partial<IconPropsWithSVGProps & DataAttributes>;
30
+ };
31
+ }
32
+ /**
33
+ * **⚙️ A composable Select component**
34
+ *
35
+ * @componentType Client component
36
+ *
37
+ * @description
38
+ * Select lets users pick one value from a list. Compose with `SelectContent` and
39
+ * `SelectItem`, similar to `Tabs` with `TabList` and `Tab`.
40
+ *
41
+ * @example
42
+ * ```tsx
43
+ * 'use client';
44
+ * import { Select, SelectContent, SelectItem } from '@yahoo/uds';
45
+ *
46
+ * <Select label="Country" placeholder="Select a country" defaultValue="us">
47
+ * <SelectContent>
48
+ * <SelectItem value="us">United States</SelectItem>
49
+ * <SelectItem value="ca">Canada</SelectItem>
50
+ * </SelectContent>
51
+ * </Select>
52
+ * ```
53
+ */
54
+ declare const Select: _$react.ForwardRefExoticComponent<SelectProps & _$react.RefAttributes<HTMLButtonElement>>;
55
+ //#endregion
56
+ export { Select, type SelectProps };
@@ -0,0 +1,176 @@
1
+ /*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
2
+ "use client";
3
+ "use client";
4
+ import { cx } from "../../../styles/styler.js";
5
+ import { Box } from "../../Box.js";
6
+ import { VStack } from "../../VStack.js";
7
+ import { SpringMotionConfig } from "../SpringMotionConfig.js";
8
+ import { SelectFieldContext } from "./selectContext.js";
9
+ import { getSelectLabelClassName, getSelectLabelRequiredClassName, getSelectRootClassName } from "./selectFieldStyles.js";
10
+ import { SelectHelpText } from "./SelectHelpText.js";
11
+ import { SelectTrigger } from "./SelectTrigger.js";
12
+ import { forwardRef, useCallback, useId, useMemo, useRef, useState } from "react";
13
+ import { jsx, jsxs } from "react/jsx-runtime";
14
+ import { isFunction } from "lodash-es";
15
+ import { SelectProvider, useSelectContext, useStoreState } from "@ariakit/react";
16
+ //#region src/components/client/Select/Select.tsx
17
+ const SelectRoot = forwardRef(function SelectRoot({ children, label, helpText, helperTextIcon, placeholder, name, size = "md", disabled, required, hasError, readOnly, width = "full", reduceMotion: forceReduceMotion, startIcon, endIcon, className, style, slotProps }, ref) {
18
+ const value = useStoreState(useSelectContext(), "value");
19
+ const hasValue = value != null && value !== "";
20
+ const hasHelpText = Boolean(helpText || helperTextIcon);
21
+ const uid = `uds-select-${useId()}`;
22
+ const helpTextId = hasHelpText ? `${uid}-help-text` : void 0;
23
+ const triggerWrapperRef = useRef(null);
24
+ const contextValue = useMemo(() => ({
25
+ size,
26
+ disabled,
27
+ readOnly,
28
+ required,
29
+ hasError,
30
+ width,
31
+ reduceMotion: forceReduceMotion,
32
+ uid,
33
+ helpTextId,
34
+ triggerWrapperRef
35
+ }), [
36
+ size,
37
+ disabled,
38
+ readOnly,
39
+ required,
40
+ hasError,
41
+ width,
42
+ forceReduceMotion,
43
+ uid,
44
+ helpTextId
45
+ ]);
46
+ const { className: rootSlotClassName, ...rootSlotProps } = slotProps?.root ?? {};
47
+ return /* @__PURE__ */ jsx(SelectFieldContext.Provider, {
48
+ value: contextValue,
49
+ children: /* @__PURE__ */ jsxs(VStack, {
50
+ width,
51
+ className: cx(getSelectRootClassName({
52
+ size,
53
+ hasValue,
54
+ disabled,
55
+ className
56
+ }), rootSlotClassName),
57
+ style,
58
+ ...rootSlotProps,
59
+ children: [
60
+ label && /* @__PURE__ */ jsxs(Box, {
61
+ spacingBottom: "2",
62
+ columnGap: "0.5",
63
+ alignItems: "flex-end",
64
+ className: getSelectLabelClassName(size, hasValue),
65
+ children: [/* @__PURE__ */ jsx("label", {
66
+ htmlFor: uid,
67
+ ...slotProps?.label,
68
+ children: isFunction(label) ? label() : label
69
+ }), required && /* @__PURE__ */ jsx("span", {
70
+ className: getSelectLabelRequiredClassName(hasValue),
71
+ children: "*"
72
+ })]
73
+ }),
74
+ /* @__PURE__ */ jsx(SelectTrigger, {
75
+ ref,
76
+ placeholder,
77
+ name,
78
+ startIcon,
79
+ endIcon,
80
+ disabled,
81
+ slotProps: slotProps?.trigger
82
+ }),
83
+ hasHelpText && /* @__PURE__ */ jsx(SelectHelpText, {
84
+ helpText,
85
+ helperTextIcon,
86
+ slotProps: {
87
+ helperText: slotProps?.helperText,
88
+ helperTextIcon: slotProps?.helperTextIcon
89
+ }
90
+ }),
91
+ children
92
+ ]
93
+ })
94
+ });
95
+ });
96
+ SelectRoot.displayName = "SelectRoot";
97
+ /**
98
+ * **⚙️ A composable Select component**
99
+ *
100
+ * @componentType Client component
101
+ *
102
+ * @description
103
+ * Select lets users pick one value from a list. Compose with `SelectContent` and
104
+ * `SelectItem`, similar to `Tabs` with `TabList` and `Tab`.
105
+ *
106
+ * @example
107
+ * ```tsx
108
+ * 'use client';
109
+ * import { Select, SelectContent, SelectItem } from '@yahoo/uds';
110
+ *
111
+ * <Select label="Country" placeholder="Select a country" defaultValue="us">
112
+ * <SelectContent>
113
+ * <SelectItem value="us">United States</SelectItem>
114
+ * <SelectItem value="ca">Canada</SelectItem>
115
+ * </SelectContent>
116
+ * </Select>
117
+ * ```
118
+ */
119
+ const Select = forwardRef(function Select({ children, label, helpText, helperTextIcon, placeholder, name, size, disabled, required, hasError, readOnly, width, reduceMotion, startIcon, endIcon, className, style, slotProps, defaultValue = "", value, setValue: setValueProp, onChange, open: openProp, defaultOpen, setOpen: setOpenProp, ...providerProps }, ref) {
120
+ const setValue = setValueProp ?? onChange;
121
+ const isOpenControlled = openProp !== void 0;
122
+ const [uncontrolledOpen, setUncontrolledOpen] = useState(defaultOpen ?? false);
123
+ const open = isOpenControlled ? openProp : uncontrolledOpen;
124
+ const handleSetOpen = useCallback((nextOpen) => {
125
+ if (readOnly && isOpenControlled) return;
126
+ if (nextOpen && (readOnly || disabled)) return;
127
+ if (!isOpenControlled) setUncontrolledOpen(nextOpen);
128
+ setOpenProp?.(nextOpen);
129
+ }, [
130
+ disabled,
131
+ isOpenControlled,
132
+ readOnly,
133
+ setOpenProp
134
+ ]);
135
+ return /* @__PURE__ */ jsx(SpringMotionConfig, {
136
+ reducedMotion: "user",
137
+ children: /* @__PURE__ */ jsx(SelectProvider, {
138
+ ...value !== void 0 ? {
139
+ ...providerProps,
140
+ value,
141
+ setValue,
142
+ open,
143
+ setOpen: handleSetOpen
144
+ } : {
145
+ ...providerProps,
146
+ defaultValue,
147
+ open,
148
+ setOpen: handleSetOpen
149
+ },
150
+ children: /* @__PURE__ */ jsx(SelectRoot, {
151
+ ref,
152
+ label,
153
+ helpText,
154
+ helperTextIcon,
155
+ placeholder,
156
+ name,
157
+ size,
158
+ disabled,
159
+ required,
160
+ hasError,
161
+ readOnly,
162
+ width,
163
+ reduceMotion,
164
+ startIcon,
165
+ endIcon,
166
+ className,
167
+ style,
168
+ slotProps,
169
+ children
170
+ })
171
+ })
172
+ });
173
+ });
174
+ Select.displayName = "Select";
175
+ //#endregion
176
+ export { Select };
@@ -0,0 +1,75 @@
1
+ /*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
2
+ "use client";
3
+ "use client";
4
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
5
+ require("../../../_virtual/_rolldown/runtime.cjs");
6
+ const require_styles_styler = require("../../../styles/styler.cjs");
7
+ const require_components_VStack = require("../../VStack.cjs");
8
+ const require_utils_getUnscaledAnchorRect = require("../../../utils/getUnscaledAnchorRect.cjs");
9
+ const require_components_client_Select_selectContext = require("./selectContext.cjs");
10
+ let react = require("react");
11
+ let react_jsx_runtime = require("react/jsx-runtime");
12
+ let _ariakit_react = require("@ariakit/react");
13
+ //#region src/components/client/Select/SelectContent.tsx
14
+ /**
15
+ * **▾ Select content panel**
16
+ *
17
+ * @componentType Client component
18
+ *
19
+ * @description
20
+ * The floating listbox container. Renders Ariakit `SelectPopover` with UDS
21
+ * styling.
22
+ */
23
+ const SelectContent = (0, react.forwardRef)(function SelectContent({ children, className, size = "default", variant = "default", slotProps, gutter = 4, sameWidth = true, portal = true, unmountOnHide = false, keepOpenOnInteractOutside = false, maxHeight = 240, disableAutoBorderRadius, nestedBorderRadius = !disableAutoBorderRadius, nestedBorderRadiusSize, nestedBorderRadiusSpacing, nestedBorderRadiusWidth, ...props }, ref) {
24
+ const { className: rootClassName, style: rootStyle, ...rootSlotProps } = slotProps?.root ?? {};
25
+ const resolvedMaxHeight = typeof maxHeight === "number" ? `${maxHeight}px` : maxHeight;
26
+ const select = (0, _ariakit_react.useSelectContext)();
27
+ const { triggerWrapperRef } = require_components_client_Select_selectContext.useSelectFieldContext();
28
+ const mounted = (0, _ariakit_react.useStoreState)(select, "mounted");
29
+ const hasResetActiveItemRef = (0, react.useRef)(false);
30
+ const getAnchorRect = (0, react.useCallback)((anchor) => {
31
+ const wrapper = triggerWrapperRef.current;
32
+ if (wrapper) return require_utils_getUnscaledAnchorRect.getUnscaledAnchorRect(wrapper);
33
+ return require_utils_getUnscaledAnchorRect.getUnscaledAnchorRect(anchor);
34
+ }, [triggerWrapperRef]);
35
+ (0, react.useLayoutEffect)(() => {
36
+ if (!select) return;
37
+ if (mounted && !hasResetActiveItemRef.current) {
38
+ select.setActiveId(null);
39
+ hasResetActiveItemRef.current = true;
40
+ }
41
+ if (!mounted) hasResetActiveItemRef.current = false;
42
+ }, [mounted, select]);
43
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_ariakit_react.SelectPopover, {
44
+ ref,
45
+ render: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_VStack.VStack, {
46
+ elevation: "3",
47
+ overflow: "auto",
48
+ borderRadius: "md",
49
+ nestedBorderRadius,
50
+ nestedBorderRadiusSize,
51
+ nestedBorderRadiusSpacing,
52
+ nestedBorderRadiusWidth,
53
+ ...rootSlotProps,
54
+ style: {
55
+ maxHeight: resolvedMaxHeight,
56
+ ...rootStyle
57
+ },
58
+ className: require_styles_styler.cx(require_styles_styler.getStyles({
59
+ selectcontentSizeRoot: size,
60
+ selectcontentVariantRoot: variant
61
+ }), "z-50", "focus:outline-none", className, rootClassName),
62
+ children
63
+ }),
64
+ ...props,
65
+ gutter,
66
+ sameWidth,
67
+ getAnchorRect,
68
+ portal,
69
+ unmountOnHide,
70
+ hideOnInteractOutside: !keepOpenOnInteractOutside
71
+ });
72
+ });
73
+ SelectContent.displayName = "SelectContent";
74
+ //#endregion
75
+ exports.SelectContent = SelectContent;
@@ -0,0 +1,44 @@
1
+
2
+ import { VStackProps } from "../../VStack.cjs";
3
+ import * as _$react from "react";
4
+ import { PropsWithChildren } from "react";
5
+ import { SelectPopoverProps } from "@ariakit/react";
6
+
7
+ //#region src/components/client/Select/SelectContent.d.ts
8
+ type DataAttributes = {
9
+ [name: `data-${string}`]: string;
10
+ };
11
+ interface SelectContentProps extends PropsWithChildren, Omit<SelectPopoverProps, 'render' | 'hideOnInteractOutside'>, Pick<VStackProps, 'nestedBorderRadius' | 'nestedBorderRadiusSize' | 'nestedBorderRadiusSpacing' | 'nestedBorderRadiusWidth'> {
12
+ size?: 'default';
13
+ variant?: 'default';
14
+ /** When true, the panel stays open when the user clicks or focuses outside. */
15
+ keepOpenOnInteractOutside?: boolean;
16
+ /**
17
+ * Maximum height of the options list. Accepts a number in pixels or a string in
18
+ * CSS units.
19
+ *
20
+ * @default 240
21
+ */
22
+ maxHeight?: string | number;
23
+ /** UDS handles nested border radius for the first and last item for you to prevent clipping and visual jank.
24
+ * If you need to disable this, set this prop to true.
25
+ *
26
+ * @link https://github.com/yahoo-uds/uds/blob/main/packages/uds/src/tailwind/utils/getNestedBorderRadiusUtilities.ts
27
+ **/
28
+ disableAutoBorderRadius?: boolean;
29
+ slotProps?: {
30
+ root?: Partial<VStackProps & DataAttributes>;
31
+ };
32
+ }
33
+ /**
34
+ * **▾ Select content panel**
35
+ *
36
+ * @componentType Client component
37
+ *
38
+ * @description
39
+ * The floating listbox container. Renders Ariakit `SelectPopover` with UDS
40
+ * styling.
41
+ */
42
+ declare const SelectContent: _$react.ForwardRefExoticComponent<Omit<SelectContentProps, "ref"> & _$react.RefAttributes<HTMLDivElement>>;
43
+ //#endregion
44
+ export { SelectContent, type SelectContentProps };
@@ -0,0 +1,45 @@
1
+
2
+ "use client";
3
+ import { VStackProps } from "../../VStack.js";
4
+ import * as _$react from "react";
5
+ import { PropsWithChildren } from "react";
6
+ import { SelectPopoverProps } from "@ariakit/react";
7
+
8
+ //#region src/components/client/Select/SelectContent.d.ts
9
+ type DataAttributes = {
10
+ [name: `data-${string}`]: string;
11
+ };
12
+ interface SelectContentProps extends PropsWithChildren, Omit<SelectPopoverProps, 'render' | 'hideOnInteractOutside'>, Pick<VStackProps, 'nestedBorderRadius' | 'nestedBorderRadiusSize' | 'nestedBorderRadiusSpacing' | 'nestedBorderRadiusWidth'> {
13
+ size?: 'default';
14
+ variant?: 'default';
15
+ /** When true, the panel stays open when the user clicks or focuses outside. */
16
+ keepOpenOnInteractOutside?: boolean;
17
+ /**
18
+ * Maximum height of the options list. Accepts a number in pixels or a string in
19
+ * CSS units.
20
+ *
21
+ * @default 240
22
+ */
23
+ maxHeight?: string | number;
24
+ /** UDS handles nested border radius for the first and last item for you to prevent clipping and visual jank.
25
+ * If you need to disable this, set this prop to true.
26
+ *
27
+ * @link https://github.com/yahoo-uds/uds/blob/main/packages/uds/src/tailwind/utils/getNestedBorderRadiusUtilities.ts
28
+ **/
29
+ disableAutoBorderRadius?: boolean;
30
+ slotProps?: {
31
+ root?: Partial<VStackProps & DataAttributes>;
32
+ };
33
+ }
34
+ /**
35
+ * **▾ Select content panel**
36
+ *
37
+ * @componentType Client component
38
+ *
39
+ * @description
40
+ * The floating listbox container. Renders Ariakit `SelectPopover` with UDS
41
+ * styling.
42
+ */
43
+ declare const SelectContent: _$react.ForwardRefExoticComponent<Omit<SelectContentProps, "ref"> & _$react.RefAttributes<HTMLDivElement>>;
44
+ //#endregion
45
+ export { SelectContent, type SelectContentProps };