@yahoo/uds 3.3.3 → 3.4.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 (59) hide show
  1. package/cli/PropsToClass.mock.tsx +14 -0
  2. package/dist/{VStack-Bh7ftAOg.d.ts → VStack-D01lhpy-.d.ts} +1 -1
  3. package/dist/{VStack-BwpcIbVt.d.cts → VStack-D4Meu5hQ.d.cts} +1 -1
  4. package/dist/chunk-2TV7YHJM.js +2 -0
  5. package/dist/{chunk-ZXWBFBET.cjs → chunk-CFUZ4XFX.cjs} +1 -1
  6. package/dist/client/index.cjs +1 -1
  7. package/dist/client/index.d.cts +11 -3
  8. package/dist/client/index.d.ts +11 -3
  9. package/dist/client/index.js +3 -3
  10. package/dist/experimental/client/index.cjs +1 -1
  11. package/dist/experimental/client/index.js +1 -1
  12. package/dist/{index-nHs3qZik.d.ts → index-C0qfnFCa.d.ts} +1 -1
  13. package/dist/{index-DDOlujNi.d.cts → index-DDlRCX51.d.cts} +1 -1
  14. package/dist/index.cjs +1 -1
  15. package/dist/index.d.cts +5 -5
  16. package/dist/index.d.ts +5 -5
  17. package/dist/index.js +1 -1
  18. package/dist/metafile-cjs.json +1 -1
  19. package/dist/metafile-esm.json +1 -1
  20. package/dist/tailwind/plugin.cjs +1 -1
  21. package/dist/tailwind/plugin.d.cts +1 -1
  22. package/dist/tailwind/plugin.d.ts +1 -1
  23. package/dist/tailwind/plugin.js +2 -2
  24. package/dist/tailwind/purger.cjs +1 -1
  25. package/dist/tailwind/purger.js +2 -2
  26. package/dist/tailwind/utils.cjs +1 -1
  27. package/dist/tailwind/utils.d.cts +5 -1
  28. package/dist/tailwind/utils.d.ts +5 -1
  29. package/dist/tailwind/utils.js +1 -1
  30. package/dist/tokens/automation/configs.cjs +1 -1
  31. package/dist/tokens/automation/configs.d.cts +2 -2
  32. package/dist/tokens/automation/configs.d.ts +2 -2
  33. package/dist/tokens/automation/configs.js +1 -1
  34. package/dist/tokens/automation/properties.cjs +1 -1
  35. package/dist/tokens/automation/properties.d.cts +2 -2
  36. package/dist/tokens/automation/properties.d.ts +2 -2
  37. package/dist/tokens/automation/properties.js +1 -1
  38. package/dist/tokens/index.cjs +1 -1
  39. package/dist/tokens/index.d.cts +4 -4
  40. package/dist/tokens/index.d.ts +4 -4
  41. package/dist/tokens/index.js +1 -1
  42. package/dist/tokens/parseTokens.d.cts +1 -1
  43. package/dist/tokens/parseTokens.d.ts +1 -1
  44. package/dist/{types-Dbgbylmg.d.cts → types-Dul9W1L-.d.cts} +1783 -1766
  45. package/dist/{types-BudqjfL9.d.ts → types-Dul9W1L-.d.ts} +18 -1
  46. package/package.json +1 -1
  47. package/dist/VStack-nWg63Lkd.d.ts +0 -145
  48. package/dist/VStack-nhxCYGiT.d.cts +0 -145
  49. package/dist/chunk-2QYCYBXH.cjs +0 -2
  50. package/dist/chunk-3HJAKD7X.cjs +0 -3
  51. package/dist/chunk-ADXQI4EF.js +0 -2
  52. package/dist/chunk-HBZLHJEI.js +0 -2
  53. package/dist/chunk-MMCNHKJJ.js +0 -2
  54. package/dist/chunk-PLGFYRZJ.js +0 -3
  55. package/dist/chunk-YTMZSL6D.cjs +0 -1
  56. package/dist/index-DNEw8o0u.d.cts +0 -208
  57. package/dist/index-DNM2tLv-.d.ts +0 -208
  58. package/dist/types-BudqjfL9.d.cts +0 -10245
  59. package/dist/types-Dbgbylmg.d.ts +0 -10245
@@ -9928,7 +9928,7 @@ interface UniversalDividerProps {
9928
9928
  */
9929
9929
  vertical?: boolean;
9930
9930
  /** When there are children, where are they placed?
9931
- * @default 'middle'
9931
+ * @default 'center'
9932
9932
  */
9933
9933
  contentPosition?: 'start' | 'center' | 'end';
9934
9934
  }
@@ -9974,6 +9974,11 @@ interface UniversalCheckboxProps {
9974
9974
  * Disables animations when true.
9975
9975
  */
9976
9976
  reduceMotion?: boolean;
9977
+ /**
9978
+ * On which side of the input is the label displayed.
9979
+ * @default 'start'
9980
+ */
9981
+ labelPosition?: 'start' | 'end';
9977
9982
  }
9978
9983
  type RadioValue = boolean;
9979
9984
  type RadioVariant = 'primary' | 'secondary';
@@ -10012,6 +10017,11 @@ interface UniversalRadioProps {
10012
10017
  * Disables animations when true.
10013
10018
  */
10014
10019
  reduceMotion?: boolean;
10020
+ /**
10021
+ * On which side of the input is the label displayed.
10022
+ * @default 'start'
10023
+ */
10024
+ labelPosition?: 'start' | 'end';
10015
10025
  }
10016
10026
  interface UniversalRadioGroupProps {
10017
10027
  /**
@@ -10063,6 +10073,11 @@ interface UniversalSwitchProps {
10063
10073
  * Disables animations when true.
10064
10074
  */
10065
10075
  reduceMotion?: boolean;
10076
+ /**
10077
+ * On which side of the input is the label displayed.
10078
+ * @default 'start'
10079
+ */
10080
+ labelPosition?: 'start' | 'end';
10066
10081
  }
10067
10082
  type ChipVariant = 'primary' | 'secondary' | 'brand' | 'brand-secondary';
10068
10083
  type ChipSize = 'sm' | 'md';
@@ -10099,6 +10114,8 @@ interface UniversalChipBaseProps extends PropsWithChildren {
10099
10114
  as?: ElementType;
10100
10115
  /** If true, forces reduced motion. Otherwise, respects the user's setting. */
10101
10116
  reduceMotion?: boolean;
10117
+ /** Whether the chip is disabled. @default false */
10118
+ disabled?: boolean;
10102
10119
  /** Internal overrides for downstream components. */
10103
10120
  layerClassNames?: {
10104
10121
  root?: string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@yahoo/uds",
3
3
  "description": "Yahoo Universal System",
4
- "version": "3.3.3",
4
+ "version": "3.4.0",
5
5
  "type": "module",
6
6
  "bin": {
7
7
  "uds": "./cli/uds-cli"
@@ -1,145 +0,0 @@
1
- import * as react from 'react';
2
- import { e as UniversalBoxProps, f as UniversalStackProps, g as UniversalDividerProps, h as UniversalInputProps } from './types-Dbgbylmg.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 };
@@ -1,145 +0,0 @@
1
- import * as react from 'react';
2
- import { e as UniversalBoxProps, f as UniversalStackProps, g as UniversalDividerProps, h as UniversalInputProps } from './types-BudqjfL9.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 };