@yahoo/uds 2.11.0 → 3.0.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 (115) hide show
  1. package/cli/ButtonFile2.mock.tsx +11 -0
  2. package/cli/bin/uds-darwin-arm64-baseline +0 -0
  3. package/cli/bin/uds-linux-arm64 +0 -0
  4. package/cli/bin/uds-linux-x64-baseline +0 -0
  5. package/cli/cli.ts +1 -1
  6. package/cli/codemods/addCommentAboveComponents.ts +9 -3
  7. package/cli/codemods/flattenButtonVariant.ts +143 -0
  8. package/cli/codemods/utils/index.ts +1 -1
  9. package/cli/commands/codemod/flattenButtonVariant.ts +16 -0
  10. package/cli/commands/expo/_setup.ts +1 -0
  11. package/cli/commands/sync.ts +3 -0
  12. package/cli/preload.ts +1 -0
  13. package/cli/tailwindcss.d.ts +2 -0
  14. package/cli/tsconfig.json +30 -8
  15. package/cli/utils/auth.ts +1 -0
  16. package/cli/utils/configWorker.ts +11 -3
  17. package/cli/utils/purgeCSS.ts +21 -9
  18. package/cli/utils/setupConfigWorker.ts +2 -2
  19. package/cli/utils/sortKeys.ts +5 -0
  20. package/cli/utils/types.ts +3 -1
  21. package/dist/{Text-UCDorZDD.d.cts → Text-yeQcITg9.d.cts} +30 -69
  22. package/dist/{Text-UCDorZDD.d.ts → Text-yeQcITg9.d.ts} +30 -69
  23. package/dist/VStack-CJs5afN8.d.ts +145 -0
  24. package/dist/VStack-GpQHE4xQ.d.cts +145 -0
  25. package/dist/chunk-4G4TBHHL.js +2 -0
  26. package/dist/chunk-6CVEYTLQ.js +2 -0
  27. package/dist/chunk-6XNKVFUM.cjs +2 -0
  28. package/dist/chunk-AFPPCX7S.js +2 -0
  29. package/dist/chunk-BNLUH23E.cjs +1 -0
  30. package/dist/chunk-EWJ3J526.js +2 -0
  31. package/dist/chunk-FOX6Q5GR.cjs +1 -0
  32. package/dist/chunk-HTL6WRXY.cjs +1 -0
  33. package/dist/chunk-J7PUOUXC.cjs +1 -0
  34. package/dist/chunk-N3FKHXEJ.js +2 -0
  35. package/dist/chunk-NUEZVMWZ.cjs +1 -0
  36. package/dist/chunk-O26JIFUR.cjs +3 -0
  37. package/dist/chunk-S5UKKXRV.js +2 -0
  38. package/dist/chunk-WCB4EHGZ.js +3 -0
  39. package/dist/client/index.cjs +2 -2
  40. package/dist/client/index.d.cts +913 -21
  41. package/dist/client/index.d.ts +913 -21
  42. package/dist/client/index.js +3 -3
  43. package/dist/experimental/client/index.cjs +2 -2
  44. package/dist/experimental/client/index.d.cts +14 -49
  45. package/dist/experimental/client/index.d.ts +14 -49
  46. package/dist/experimental/client/index.js +2 -2
  47. package/dist/experimental/index.cjs +2 -2
  48. package/dist/experimental/index.d.cts +4 -55
  49. package/dist/experimental/index.d.ts +4 -55
  50. package/dist/experimental/index.js +1 -1
  51. package/dist/fixtures.cjs +1546 -55
  52. package/dist/fixtures.d.cts +33 -14
  53. package/dist/fixtures.d.ts +33 -14
  54. package/dist/fixtures.js +1519 -49
  55. package/dist/index-CU_UPAew.d.ts +202 -0
  56. package/dist/index-DUFUMc1S.d.cts +202 -0
  57. package/dist/index.cjs +1 -1
  58. package/dist/index.d.cts +245 -128
  59. package/dist/index.d.ts +245 -128
  60. package/dist/index.js +1 -1
  61. package/dist/metafile-cjs.json +1 -1
  62. package/dist/metafile-esm.json +1 -1
  63. package/dist/tailwind/plugin.cjs +1 -2
  64. package/dist/tailwind/plugin.d.cts +19 -5
  65. package/dist/tailwind/plugin.d.ts +19 -5
  66. package/dist/tailwind/plugin.js +2 -2
  67. package/dist/tailwind/purger.cjs +1 -1
  68. package/dist/tailwind/purger.js +2 -2
  69. package/dist/tailwind/tsMorph.cjs +1 -1
  70. package/dist/tailwind/tsMorph.js +1 -1
  71. package/dist/tailwind/utils.cjs +1 -1
  72. package/dist/tailwind/utils.d.cts +80 -28
  73. package/dist/tailwind/utils.d.ts +80 -28
  74. package/dist/tailwind/utils.js +1 -1
  75. package/dist/tokens/automation/configs.cjs +1 -0
  76. package/dist/tokens/automation/configs.d.cts +110 -0
  77. package/dist/tokens/automation/configs.d.ts +110 -0
  78. package/dist/tokens/automation/configs.js +1 -0
  79. package/dist/tokens/automation/properties.cjs +1 -0
  80. package/dist/tokens/automation/properties.d.cts +7 -0
  81. package/dist/tokens/automation/properties.d.ts +7 -0
  82. package/dist/tokens/automation/properties.js +1 -0
  83. package/dist/tokens/index.cjs +1 -1
  84. package/dist/tokens/index.d.cts +9355 -15
  85. package/dist/tokens/index.d.ts +9355 -15
  86. package/dist/tokens/index.js +1 -1
  87. package/dist/tokens/parseTokens.cjs +1 -1
  88. package/dist/tokens/parseTokens.d.cts +7 -23
  89. package/dist/tokens/parseTokens.d.ts +7 -23
  90. package/dist/tokens/parseTokens.js +1 -1
  91. package/dist/types-d2CfR7zp.d.cts +10245 -0
  92. package/dist/types-d2CfR7zp.d.ts +10245 -0
  93. package/package.json +15 -2
  94. package/dist/chunk-3G7IRLGN.js +0 -2
  95. package/dist/chunk-5WBROFT5.cjs +0 -1
  96. package/dist/chunk-6453EQCC.cjs +0 -1
  97. package/dist/chunk-7QHJ6LHA.js +0 -1
  98. package/dist/chunk-EYFQOFYW.cjs +0 -1
  99. package/dist/chunk-FWF2C6TL.cjs +0 -1
  100. package/dist/chunk-FYVGDNGL.js +0 -2
  101. package/dist/chunk-GIJ2FHY5.cjs +0 -1
  102. package/dist/chunk-GL5JI7EX.cjs +0 -2
  103. package/dist/chunk-MOUM7BAW.js +0 -2
  104. package/dist/chunk-PE2P7J44.js +0 -2
  105. package/dist/chunk-RXSJCGB3.cjs +0 -1
  106. package/dist/chunk-SUASN3GG.js +0 -2
  107. package/dist/chunk-U2K4DT7E.js +0 -3
  108. package/dist/chunk-VPR62GYQ.js +0 -2
  109. package/dist/chunk-WJ55DEUW.cjs +0 -2
  110. package/dist/chunk-X6F5UEQ5.js +0 -2
  111. package/dist/chunk-XZCEFUNX.cjs +0 -2
  112. package/dist/types-DPT0rst4.d.cts +0 -991
  113. package/dist/types-DPT0rst4.d.ts +0 -991
  114. /package/dist/{motionFeatures-HQUM526D.cjs → motionFeatures-6LIGGXPL.cjs} +0 -0
  115. /package/dist/{motionFeatures-PRT45UQH.js → motionFeatures-SJISLQ4M.js} +0 -0
@@ -1,4 +1,4 @@
1
- import { ReactNode, PropsWithChildren, Ref } from 'react';
1
+ import { PropsWithChildren, ReactNode, Ref } from 'react';
2
2
  import { SvgIcon, IconSize, IconVariant } from '@yahoo/uds-icons/types';
3
3
 
4
4
  declare const alwaysPalette: {
@@ -8,22 +8,25 @@ declare const alwaysPalette: {
8
8
  current: string;
9
9
  };
10
10
 
11
- type CorePaletteAlias = 'brand' | 'accent' | 'alert' | 'positive' | 'warning';
12
- type BackgroundPaletteAlias = 'primary' | 'secondary';
13
- type ForegroundPaletteAlias = 'primary' | 'secondary' | 'tertiary' | 'muted' | 'on-color';
14
- type LinePaletteAlias = 'primary' | 'secondary' | 'tertiary' | 'muted';
11
+ type SharedPrimaryPaletteAlias = 'brand' | 'alert' | 'positive' | 'warning' | 'info';
12
+ type SharedSecondaryPaletteAlias = `${SharedPrimaryPaletteAlias}-secondary`;
13
+ type SharedPaletteAlias = SharedPrimaryPaletteAlias | SharedSecondaryPaletteAlias;
14
+ type DeprecatedAccentAlias = 'accent';
15
+ type BackgroundPaletteAlias = 'primary' | 'secondary' | DeprecatedAccentAlias | SharedPaletteAlias;
16
+ type ForegroundPaletteAlias = 'primary' | 'secondary' | 'tertiary' | 'muted' | 'on-color' | DeprecatedAccentAlias | SharedPaletteAlias;
17
+ type LinePaletteAlias = 'primary' | 'secondary' | 'tertiary' | 'muted' | DeprecatedAccentAlias | SharedPaletteAlias;
15
18
  type AlwaysPalette = typeof alwaysPalette;
16
19
  type AlwaysPaletteAlias = keyof AlwaysPalette;
17
- type ForegroundColor = CorePaletteAlias | ForegroundPaletteAlias | AlwaysPaletteAlias;
18
- type LineColor = CorePaletteAlias | LinePaletteAlias | AlwaysPaletteAlias;
19
- type BackgroundColor = CorePaletteAlias | BackgroundPaletteAlias | AlwaysPaletteAlias;
20
- type TextVariant = 'display1' | 'display2' | 'display3' | 'title1' | 'title2' | 'title3' | 'title4' | 'headline1' | 'body1' | 'label1' | 'label2' | 'caption1' | 'caption2' | 'legal1';
20
+ type ForegroundColor = ForegroundPaletteAlias | AlwaysPaletteAlias;
21
+ type LineColor = LinePaletteAlias | AlwaysPaletteAlias;
22
+ type BackgroundColor = BackgroundPaletteAlias | AlwaysPaletteAlias;
23
+ type ShadowVariant = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
24
+ type ShadowVariantInvert = `${Exclude<ShadowVariant, 'none'>}-invert`;
25
+ type TextVariant = 'display1' | 'display2' | 'display3' | 'title1' | 'title2' | 'title3' | 'title4' | 'headline1' | 'body1' | 'label1' | 'label2' | 'label3' | 'label4' | 'caption1' | 'caption2' | 'legal1';
21
26
  type FontAlias = 'sans' | 'sans-alt' | 'serif' | 'serif-alt' | 'mono';
22
27
  type FontWeightDescriptive = 'thin' | 'extralight' | 'light' | 'regular' | 'medium' | 'semibold' | 'bold' | 'extrabold' | 'black';
23
28
  type TextTransform = 'none' | 'uppercase' | 'lowercase' | 'capitalize';
24
29
  type TShirtSize = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'full';
25
- type TShirtSizeCommon = Extract<TShirtSize, 'sm' | 'md' | 'lg'>;
26
- type AvatarSize = TShirtSizeCommon;
27
30
  type SpacingAlias = '0' | 'px' | '0.5' | '1' | '1.5' | '2' | '2.5' | '3' | '3.5' | '4' | '5' | '6' | '7' | '8' | '9' | '10' | '11' | '12' | '14' | '16' | '20' | '24' | '28' | '32' | '36' | '40' | '44' | '48' | '52' | '56' | '60' | '64' | '72' | '80' | '96';
28
31
  type BorderRadius = TShirtSize;
29
32
  type BorderWidth = 'none' | 'thin' | 'medium' | 'thick';
@@ -40,12 +43,6 @@ type FlexBasis = 'min-content';
40
43
  type Display = 'block' | 'inline-block' | 'inline' | 'flex' | 'inline-flex' | 'table' | 'inline-table' | 'table-caption' | 'table-cell' | 'table-column' | 'table-column-group' | 'table-footer-group' | 'table-header-group' | 'table-row-group' | 'table-row' | 'flow-root' | 'grid' | 'contents';
41
44
  type Overflow = 'auto' | 'hidden' | 'clip' | 'visible' | 'scroll';
42
45
  type Position = 'static' | 'fixed' | 'absolute' | 'relative' | 'sticky';
43
- type ImageStyleProps = {
44
- /**
45
- * Determines how the image should be resized to fit its container.
46
- */
47
- contentFit?: 'cover' | 'contain' | 'fill' | 'none' | 'scale-down';
48
- };
49
46
  interface BorderStyleProps {
50
47
  /** Add a border radius to all corners of the box. */
51
48
  borderRadius?: BorderRadius;
@@ -82,6 +79,12 @@ interface BorderStyleProps {
82
79
  /** Sets the width of the bottom border of an element. */
83
80
  borderBottomWidth?: BorderWidth;
84
81
  }
82
+ interface ShadowStyleProps {
83
+ /** Sets the variant of the shadow. */
84
+ dropShadow?: ShadowVariant;
85
+ /** Sets the variant of the inset shadow. */
86
+ insetShadow?: ShadowVariant | ShadowVariantInvert;
87
+ }
85
88
  interface LayoutStyleProps {
86
89
  /** Sets whether an element is treated as a block or inline box and the layout used for its children, such as flow layout, grid or flex. */
87
90
  display?: Display;
@@ -178,7 +181,7 @@ interface SizeStyleProps {
178
181
  /** Sets the height of an element. */
179
182
  height?: 'full' | 'fit' | 'screen';
180
183
  }
181
- interface UniversalBoxProps extends PropsWithChildren, BackgroundStyleProps, BorderStyleProps, FlexStyleProps, LayoutStyleProps, SpacingStyleProps, SizeStyleProps {
184
+ interface UniversalBoxProps extends PropsWithChildren, BackgroundStyleProps, BorderStyleProps, FlexStyleProps, LayoutStyleProps, SpacingStyleProps, SizeStyleProps, ShadowStyleProps {
182
185
  /**
183
186
  * When asChild is set to true, the component's child will be cloned and passed
184
187
  * the props and behavior required to make it functional.
@@ -205,66 +208,24 @@ interface UniversalIconProps {
205
208
  /** Color of the icon. */
206
209
  color?: ForegroundColor;
207
210
  }
208
- interface UniversalImageProps extends Omit<UniversalBoxProps, 'width' | 'height'>, ImageStyleProps {
209
- /** The source URL of the image. */
210
- src: string;
211
- /** Provides fallback (alternate) text to display when the image specified by the Image element is not loaded. */
212
- alt?: string;
213
- /** Width of the image in px. */
214
- width?: number;
215
- /** Height of the image in pixel. */
216
- height?: number;
217
- }
218
- interface UniversalAvatarProps extends UniversalImageProps {
219
- /** The size of the Avatar. */
220
- size?: AvatarSize;
221
- /** The shape of the Avatar. */
222
- shape?: BorderRadius;
223
- }
224
- interface UniversalTextInputProps {
225
- disabled?: boolean;
226
- required?: boolean;
227
- backgroundColor?: BackgroundColor;
228
- borderColor?: LineColor;
229
- borderWidth?: BorderWidth;
230
- borderRadius?: BorderRadius;
231
- color?: ForegroundColor;
232
- fontSize?: TextVariant;
233
- placeholderColor?: ForegroundColor;
234
- spacingVertical?: SpacingAlias;
235
- spacingHorizontal?: SpacingAlias;
236
- }
237
- type DividerVariant = 'primary' | 'secondary' | 'tertiary' | 'muted';
238
- interface UniversalDividerProps {
239
- /**
240
- * Use a pre-defined variant.
241
- * @default 'primary'
242
- */
243
- variant?: DividerVariant;
244
- /**
245
- * Set to true to scale the divider vertically.
246
- */
247
- vertical?: boolean;
248
- /** Override thickness of the divider set by the variant. */
249
- thickness?: BorderWidth;
250
- /** Override color of the divider set by the variant. */
251
- color?: LineColor;
252
- /** When there are children, where are they placed?
253
- * @default 'middle'
254
- */
255
- contentPosition?: 'start' | 'middle' | 'end';
211
+ type SVGElementProps = Omit<React.HTMLAttributes<SVGSVGElement>, 'color'>;
212
+ interface IconPropsWithSVGProps extends UniversalIconProps, SVGElementProps {
256
213
  }
257
214
 
258
215
  type DivProps = React.HTMLAttributes<HTMLDivElement>;
259
216
  interface BoxProps extends UniversalBoxProps, DivProps {
260
217
  }
261
218
 
262
- type TextElementTagName = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'p' | 'strong' | 'span' | 'label' | 'li';
219
+ type TextElementTagName = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'p' | 'strong' | 'span' | 'label' | 'li' | 'sup';
220
+ type ColorWithInherit = Exclude<UniversalTextProps['color'], undefined> | 'inherit';
221
+ type VariantWithInherit = Exclude<UniversalTextProps['variant'], undefined> | 'inherit';
263
222
  type TextProps<TagName extends TextElementTagName = TextElementTagName> = {
264
223
  /** Ref passed to the inner container. */
265
224
  ref?: Ref<HTMLElement>;
266
225
  /** Changes the HTML tag used to render text. Uses the most appropriate semantic tag based on the text style variant. */
267
226
  as?: TagName;
268
- } & JSX.IntrinsicElements[TagName] & UniversalTextProps;
227
+ variant?: VariantWithInherit;
228
+ color?: ColorWithInherit;
229
+ } & JSX.IntrinsicElements[TagName] & Omit<UniversalTextProps, 'variant' | 'color'>;
269
230
 
270
- export type { BoxProps as B, DivProps as D, Overflow as O, SpacingStyleProps as S, TextProps as T, UniversalAvatarProps as U, UniversalStackProps as a, UniversalDividerProps as b, UniversalTextProps as c, UniversalIconProps as d, UniversalTextInputProps as e };
231
+ export type { BoxProps as B, DivProps as D, IconPropsWithSVGProps as I, Overflow as O, TextProps as T, UniversalTextProps as U, UniversalStackProps as a };
@@ -0,0 +1,145 @@
1
+ import * as react from 'react';
2
+ import { e as UniversalBoxProps, f as UniversalStackProps, g as UniversalDividerProps, h as UniversalInputProps } from './types-d2CfR7zp.js';
3
+ import { HTMLMotionProps } from 'motion/react';
4
+
5
+ type DivProps = React.HTMLAttributes<HTMLDivElement>;
6
+ interface BoxProps extends UniversalBoxProps, DivProps {
7
+ }
8
+ /**
9
+ * **📦 A layout component that can be used to compose other components**
10
+ *
11
+ * @description
12
+ * The most simple component we ship - a div. But with all the power of the UDS design system.
13
+ * By default, `Box` is a flexbox container. When working with vertical or horizontal layouts,
14
+ * consider using [VStack](./v-stack) or [HStack](./h-stack) respectively.
15
+ *
16
+ * @example
17
+ * ```tsx
18
+ * import { Box } from '@yahoo/uds';
19
+ *
20
+ * <Box backgroundColor="primary" spacing="6">
21
+ * Any kind of content can go here!
22
+ * </Box>
23
+ * ```
24
+ *
25
+ * @usage
26
+ * - If you need to div-like container to apply padding, shapes, or other styling.
27
+ * - If you're creating card components.
28
+ *
29
+ * @see The {@link https://uds.build/docs/components/box Box Docs} for more info
30
+ *
31
+ * @related [HStack](https://uds.build/docs/components/h-stack), [VStack](https://uds.build/docs/components/v-stack)
32
+ */
33
+ declare const Box: react.ForwardRefExoticComponent<BoxProps & react.RefAttributes<HTMLDivElement>>;
34
+
35
+ type VariantWithInherit = Exclude<UniversalDividerProps['variant'], undefined> | 'inherit';
36
+ interface DividerProps extends Omit<BoxProps, 'color' | 'borderColor' | 'borderWidth'>, Omit<UniversalStackProps, 'separator' | 'asChild'>, Omit<UniversalDividerProps, 'variant'> {
37
+ variant?: VariantWithInherit;
38
+ layerClassNames?: {
39
+ root?: string;
40
+ text?: string;
41
+ line?: string;
42
+ };
43
+ }
44
+ /**
45
+ * **📦 A divider component that can be used to visually separate components**
46
+ *
47
+ * @description
48
+ * The Divider component is a visual element used to separate content and create clear groupings within a layout. It helps establish hierarchy, improve readability, and guide users through sections of an interface. Dividers can appear as horizontal or vertical lines and are commonly used between related content blocks, within menus, or in dense UI areas to reduce visual clutter.
49
+ *
50
+ * @example
51
+ * ```tsx
52
+ * import { Divider } from '@yahoo/uds';
53
+ *
54
+ * // Default primary horizontal divider. Similar to <hr />
55
+ * <Divider />
56
+ *
57
+ * // A vertical divider.
58
+ * <Divider vertical />
59
+ *
60
+ * // A horizontal divider with the secondary styling.
61
+ * <Divider variant="secondary" />
62
+ *
63
+ * // A vertical divider with the tertiary styling.
64
+ * <Divider vertical variant="tertiary" />
65
+ * ```
66
+ *
67
+ * @usage
68
+ * - Visually separating parts of a page. Usually used in conjuction with [HStack](./h-stack) or [VStack](./v-stack).
69
+ *
70
+ * @see The {@link https://uds.build/docs/components/divider Divider Docs} for more info
71
+ *
72
+ * @related [Box](https://uds.build/docs/components/box), [HStack](https://uds.build/docs/components/h-stack), [VStack](https://uds.build/docs/components/v-stack)
73
+ */
74
+ declare const Divider: react.ForwardRefExoticComponent<DividerProps & react.RefAttributes<HTMLDivElement>>;
75
+
76
+ type HtmlInputProps = React.InputHTMLAttributes<HTMLInputElement> & HTMLMotionProps<'input'>;
77
+ type NativeInputProps = Omit<HtmlInputProps, 'height' | 'size' | 'width' | 'color' | 'required'>;
78
+ interface InputProps extends NativeInputProps, UniversalInputProps {
79
+ /** The type of the input element. Reduced set of options from the HTML input type attribute.
80
+ * @default 'text'
81
+ */
82
+ type?: Exclude<NativeInputProps['type'], 'button' | 'checkbox' | 'color' | 'file' | 'radio' | 'range' | 'reset' | 'submit' | 'search'>;
83
+ }
84
+ /**
85
+ * **📦 An input that allows users to enter text and collect data.**
86
+ *
87
+ * @componentType Client component
88
+ *
89
+ * @description
90
+ * An input field is a component that takes text typed into it. It can also serve as a way to display a selection and trigger a dropdown menu. Inputs are interactive elements that users can click, tap, or otherwise engage with to collect data and open dropdowns, or both.
91
+ *
92
+ * @see
93
+ * Check out the {@link https://uds.build/docs/components/input Input Docs} for more info
94
+ *
95
+ * @usage
96
+ * - Forms: For collecting data like names, emails, passwords, etc. (e.g., sign-up, login, or contact forms).
97
+ * - Search Bars: Allowing users to enter search queries to find content.
98
+ * - Filters/Settings: When users need to specify preferences, like selecting a date or adjusting a number value.
99
+ * - Feedback/Comments: Letting users leave reviews, comments, or feedback.
100
+ *
101
+ * @example
102
+ * ```tsx
103
+ * 'use client';
104
+ * import { Input } from "@yahoo/uds";
105
+ *
106
+ * <Input label="Name" placeholder="Enter your name" required />
107
+ *```
108
+ *
109
+ * @related [Checkbox](https://uds.build/docs/components/checkbox), [Radio](https://uds.build/docs/components/radio).
110
+ **/
111
+ declare const Input: react.ForwardRefExoticComponent<Omit<InputProps, "ref"> & react.RefAttributes<HTMLInputElement>>;
112
+
113
+ type VStackProps = UniversalStackProps & DivProps;
114
+ /**
115
+ * **🥞 A layout component that arranges its children in rows using flexbox**
116
+ *
117
+ * @description
118
+ * VStack is a layout component that arranges its children in rows using [flexbox](https://developer.mozilla.org/en-US/docs/Learn/CSS/CSS_layout/Flexbox)
119
+ * and can be used to compose larger layouts. VStack is similar to [Box](./box) but provides additional features like a `gap` property to
120
+ * add spacing between children.
121
+ *
122
+ * @example
123
+ * ```tsx
124
+ * import { VStack, Text } from '@yahoo/uds';
125
+ *
126
+ * <VStack gap="6">
127
+ * <Text variant="body1" color="primary">First</Text>
128
+ * <Text variant="body1" color="primary">Second</Text>
129
+ * <Text variant="body1" color="primary">Third</Text>
130
+ * </VStack>
131
+ * ```
132
+ *
133
+ * @usage
134
+ * - Create a column of items, optionally with gaps between.
135
+ * - Create rows that are sized to their content (height only). By default each child will fill the width of the VStack.
136
+ * - Create rows that fill the available space within the parent container.
137
+ * - Create rows of proportionate size to each other (also known as a ratio-based layout).
138
+ *
139
+ * @see The {@link https://uds.build/docs/components/v-stack VStack Docs} for more info
140
+ *
141
+ * @related [Box](https://uds.build/docs/components/box), [HStack](https://uds.build/docs/components/h-stack)
142
+ **/
143
+ declare const VStack: react.ForwardRefExoticComponent<UniversalStackProps & DivProps & react.RefAttributes<HTMLDivElement>>;
144
+
145
+ export { Box as B, type DivProps as D, type InputProps as I, VStack as V, type BoxProps as a, Divider as b, type DividerProps as c, type VStackProps as d, Input as e };
@@ -0,0 +1,145 @@
1
+ import * as react from 'react';
2
+ import { e as UniversalBoxProps, f as UniversalStackProps, g as UniversalDividerProps, h as UniversalInputProps } from './types-d2CfR7zp.cjs';
3
+ import { HTMLMotionProps } from 'motion/react';
4
+
5
+ type DivProps = React.HTMLAttributes<HTMLDivElement>;
6
+ interface BoxProps extends UniversalBoxProps, DivProps {
7
+ }
8
+ /**
9
+ * **📦 A layout component that can be used to compose other components**
10
+ *
11
+ * @description
12
+ * The most simple component we ship - a div. But with all the power of the UDS design system.
13
+ * By default, `Box` is a flexbox container. When working with vertical or horizontal layouts,
14
+ * consider using [VStack](./v-stack) or [HStack](./h-stack) respectively.
15
+ *
16
+ * @example
17
+ * ```tsx
18
+ * import { Box } from '@yahoo/uds';
19
+ *
20
+ * <Box backgroundColor="primary" spacing="6">
21
+ * Any kind of content can go here!
22
+ * </Box>
23
+ * ```
24
+ *
25
+ * @usage
26
+ * - If you need to div-like container to apply padding, shapes, or other styling.
27
+ * - If you're creating card components.
28
+ *
29
+ * @see The {@link https://uds.build/docs/components/box Box Docs} for more info
30
+ *
31
+ * @related [HStack](https://uds.build/docs/components/h-stack), [VStack](https://uds.build/docs/components/v-stack)
32
+ */
33
+ declare const Box: react.ForwardRefExoticComponent<BoxProps & react.RefAttributes<HTMLDivElement>>;
34
+
35
+ type VariantWithInherit = Exclude<UniversalDividerProps['variant'], undefined> | 'inherit';
36
+ interface DividerProps extends Omit<BoxProps, 'color' | 'borderColor' | 'borderWidth'>, Omit<UniversalStackProps, 'separator' | 'asChild'>, Omit<UniversalDividerProps, 'variant'> {
37
+ variant?: VariantWithInherit;
38
+ layerClassNames?: {
39
+ root?: string;
40
+ text?: string;
41
+ line?: string;
42
+ };
43
+ }
44
+ /**
45
+ * **📦 A divider component that can be used to visually separate components**
46
+ *
47
+ * @description
48
+ * The Divider component is a visual element used to separate content and create clear groupings within a layout. It helps establish hierarchy, improve readability, and guide users through sections of an interface. Dividers can appear as horizontal or vertical lines and are commonly used between related content blocks, within menus, or in dense UI areas to reduce visual clutter.
49
+ *
50
+ * @example
51
+ * ```tsx
52
+ * import { Divider } from '@yahoo/uds';
53
+ *
54
+ * // Default primary horizontal divider. Similar to <hr />
55
+ * <Divider />
56
+ *
57
+ * // A vertical divider.
58
+ * <Divider vertical />
59
+ *
60
+ * // A horizontal divider with the secondary styling.
61
+ * <Divider variant="secondary" />
62
+ *
63
+ * // A vertical divider with the tertiary styling.
64
+ * <Divider vertical variant="tertiary" />
65
+ * ```
66
+ *
67
+ * @usage
68
+ * - Visually separating parts of a page. Usually used in conjuction with [HStack](./h-stack) or [VStack](./v-stack).
69
+ *
70
+ * @see The {@link https://uds.build/docs/components/divider Divider Docs} for more info
71
+ *
72
+ * @related [Box](https://uds.build/docs/components/box), [HStack](https://uds.build/docs/components/h-stack), [VStack](https://uds.build/docs/components/v-stack)
73
+ */
74
+ declare const Divider: react.ForwardRefExoticComponent<DividerProps & react.RefAttributes<HTMLDivElement>>;
75
+
76
+ type HtmlInputProps = React.InputHTMLAttributes<HTMLInputElement> & HTMLMotionProps<'input'>;
77
+ type NativeInputProps = Omit<HtmlInputProps, 'height' | 'size' | 'width' | 'color' | 'required'>;
78
+ interface InputProps extends NativeInputProps, UniversalInputProps {
79
+ /** The type of the input element. Reduced set of options from the HTML input type attribute.
80
+ * @default 'text'
81
+ */
82
+ type?: Exclude<NativeInputProps['type'], 'button' | 'checkbox' | 'color' | 'file' | 'radio' | 'range' | 'reset' | 'submit' | 'search'>;
83
+ }
84
+ /**
85
+ * **📦 An input that allows users to enter text and collect data.**
86
+ *
87
+ * @componentType Client component
88
+ *
89
+ * @description
90
+ * An input field is a component that takes text typed into it. It can also serve as a way to display a selection and trigger a dropdown menu. Inputs are interactive elements that users can click, tap, or otherwise engage with to collect data and open dropdowns, or both.
91
+ *
92
+ * @see
93
+ * Check out the {@link https://uds.build/docs/components/input Input Docs} for more info
94
+ *
95
+ * @usage
96
+ * - Forms: For collecting data like names, emails, passwords, etc. (e.g., sign-up, login, or contact forms).
97
+ * - Search Bars: Allowing users to enter search queries to find content.
98
+ * - Filters/Settings: When users need to specify preferences, like selecting a date or adjusting a number value.
99
+ * - Feedback/Comments: Letting users leave reviews, comments, or feedback.
100
+ *
101
+ * @example
102
+ * ```tsx
103
+ * 'use client';
104
+ * import { Input } from "@yahoo/uds";
105
+ *
106
+ * <Input label="Name" placeholder="Enter your name" required />
107
+ *```
108
+ *
109
+ * @related [Checkbox](https://uds.build/docs/components/checkbox), [Radio](https://uds.build/docs/components/radio).
110
+ **/
111
+ declare const Input: react.ForwardRefExoticComponent<Omit<InputProps, "ref"> & react.RefAttributes<HTMLInputElement>>;
112
+
113
+ type VStackProps = UniversalStackProps & DivProps;
114
+ /**
115
+ * **🥞 A layout component that arranges its children in rows using flexbox**
116
+ *
117
+ * @description
118
+ * VStack is a layout component that arranges its children in rows using [flexbox](https://developer.mozilla.org/en-US/docs/Learn/CSS/CSS_layout/Flexbox)
119
+ * and can be used to compose larger layouts. VStack is similar to [Box](./box) but provides additional features like a `gap` property to
120
+ * add spacing between children.
121
+ *
122
+ * @example
123
+ * ```tsx
124
+ * import { VStack, Text } from '@yahoo/uds';
125
+ *
126
+ * <VStack gap="6">
127
+ * <Text variant="body1" color="primary">First</Text>
128
+ * <Text variant="body1" color="primary">Second</Text>
129
+ * <Text variant="body1" color="primary">Third</Text>
130
+ * </VStack>
131
+ * ```
132
+ *
133
+ * @usage
134
+ * - Create a column of items, optionally with gaps between.
135
+ * - Create rows that are sized to their content (height only). By default each child will fill the width of the VStack.
136
+ * - Create rows that fill the available space within the parent container.
137
+ * - Create rows of proportionate size to each other (also known as a ratio-based layout).
138
+ *
139
+ * @see The {@link https://uds.build/docs/components/v-stack VStack Docs} for more info
140
+ *
141
+ * @related [Box](https://uds.build/docs/components/box), [HStack](https://uds.build/docs/components/h-stack)
142
+ **/
143
+ declare const VStack: react.ForwardRefExoticComponent<UniversalStackProps & DivProps & react.RefAttributes<HTMLDivElement>>;
144
+
145
+ export { Box as B, type DivProps as D, type InputProps as I, VStack as V, type BoxProps as a, Divider as b, type DividerProps as c, type VStackProps as d, Input as e };
@@ -0,0 +1,2 @@
1
+ /*! © 2025 Yahoo, Inc. UDS v0.0.0-development */
2
+ var o="uds",t=`${o}-avatar-size`,e=`${o}-border-radius`,n=`${o}-border-width`,d=`${o}-font`,s=`${o}-font-size`,i=`${o}-font-weight`,r=`${o}-font-slant`,a=`${o}-font-width`,l=`${o}-icon-size`,$=`${o}-line-height`,b=`${o}-motion`,c=`${o}-spectrum-color`,u=`${o}-text-transform`,f=`${o}-color-mode-dark`,h=`${o}-color-mode-light`,m=`${o}-scale-mode-xsmall`,g=`${o}-scale-mode-small`,p=`${o}-scale-mode-medium`,x=`${o}-scale-mode-large`,w=`${o}-scale-mode-xlarge`,v=`${o}-scale-mode-xxlarge`,z=`${o}-scale-mode-xxxlarge`,S=h,W=x,k={borderRadius:`--${o}-button-border-radius`,borderWidth:`--${o}-button-border-width`,color:`--${o}-button-color`,backgroundColor:`--${o}-button-background-color`,borderColor:`--${o}-button-border-color`,padding:`--${o}-button-padding`,columnGap:`--${o}-button-gap`,fontFamily:`--${o}-button-font`,fontWeight:`--${o}-button-font-weight`,fontWidth:`--${o}-button-font-width`,fontSlant:`--${o}-button-font-slant`,fontSize:`--${o}-button-font-size`,lineHeight:`--${o}-button-line-height`,textTransform:`--${o}-button-text-transform`,iconSize:`--${o}-button-icon-size`,dropShadow:`--${o}-button-shadow`,insetShadow:`--${o}-button-inset-shadow`,effects:{scale:{rest:`--${o}-button-effects-scale--rest`,hover:`--${o}-button-effects-scale--hover`,pressed:`--${o}-button-effects-scale--pressed`}}},C={padding:`--${o}-icon-button-padding`,iconSize:`--${o}-icon-button-icon-size`},y={hover:":hover:not([disabled])",pressed:":active:not([disabled])",disabled:":disabled",focused:":focus-visible",focusedWithin:":has(:focus-visible)",notDisabled:":not(:disabled)"};export{t as AVATAR_SIZE_PREFIX,e as BORDER_RADIUS_PREFIX,n as BORDER_WIDTH_PREFIX,k as BUTTON_CSS_VAR_MAP,f as DARK_COLOR_MODE_CLASSNAME,S as DEFAULT_COLOR_MODE_CLASSNAME,W as DEFAULT_SCALE_MODE_CLASSNAME,d as FONT_FAMILY_PREFIX,s as FONT_SIZE_PREFIX,r as FONT_SLANT_PREFIX,i as FONT_WEIGHT_PREFIX,a as FONT_WIDTH_PREFIX,C as ICON_BUTTON_CSS_VAR_MAP,l as ICON_SIZE_PREFIX,x as LARGE_SCALE_MODE_CLASSNAME,h as LIGHT_COLOR_MODE_CLASSNAME,$ as LINE_HEIGHT_PREFIX,p as MEDIUM_SCALE_MODE_CLASSNAME,b as MOTION_PREFIX,y as PSEUDO_STYLE_SELECTOR_MAP,g as SMALL_SCALE_MODE_CLASSNAME,c as SPECTRUM_COLOR_PREFIX,u as TEXT_TRANSFORM_PREFIX,o as UDS_PREFIX,w as XLARGE_SCALE_MODE_CLASSNAME,m as XSMALL_SCALE_MODE_CLASSNAME,v as XXLARGE_SCALE_MODE_CLASSNAME,z as XXXLARGE_SCALE_MODE_CLASSNAME};