@yahoo/uds 3.48.0 → 3.49.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 (76) hide show
  1. package/cli/FlattenButtonVariant.mock.tsx +17 -0
  2. package/dist/{Box-MHJ0-0M3.d.ts → Box-Crrq6i4h.d.ts} +1 -1
  3. package/dist/{Box-BFRDyWaq.d.cts → Box-D3tacR6r.d.cts} +1 -1
  4. package/dist/Box-DSlj_nk4.d.ts +34 -0
  5. package/dist/Box-DpyU-coK.d.cts +34 -0
  6. package/dist/{Pressable-DVLHV--n.d.ts → Pressable-B6BLEH9a.d.ts} +1 -1
  7. package/dist/Pressable-B_tUxlD9.d.ts +44 -0
  8. package/dist/{Pressable-GdByxoJg.d.cts → Pressable-C1Csw_As.d.cts} +1 -1
  9. package/dist/Pressable-CSl68bNG.d.cts +44 -0
  10. package/dist/{Text-Buzrh-6W.d.cts → Text-BAHkYEiK.d.cts} +18 -2
  11. package/dist/{Text-Buzrh-6W.d.ts → Text-BAHkYEiK.d.ts} +18 -2
  12. package/dist/{Text-IGbWWF7a.d.ts → Text-BE_L9lP2.d.ts} +1 -1
  13. package/dist/{Text-Bq5NiVYm.d.cts → Text-CsOioZGs.d.cts} +1 -1
  14. package/dist/Text-CvY2JUUX.d.ts +88 -0
  15. package/dist/Text-DkshZZiK.d.cts +88 -0
  16. package/dist/{VStack-UmkAYRN1.d.cts → VStack-BkfbZYlc.d.cts} +2 -2
  17. package/dist/VStack-C33dVmTS.d.cts +83 -0
  18. package/dist/{VStack-CppUZHJL.d.ts → VStack-C5UmhjZX.d.ts} +2 -2
  19. package/dist/VStack-CJJ81YBr.d.ts +83 -0
  20. package/dist/chunk-3XMORCA6.cjs +1 -0
  21. package/dist/chunk-42TM364I.cjs +1 -0
  22. package/dist/chunk-4SWOQUGX.cjs +1 -0
  23. package/dist/chunk-53KBVJPZ.cjs +2 -0
  24. package/dist/chunk-6IIFFVGC.js +1 -0
  25. package/dist/chunk-6OLYHKI2.js +2 -0
  26. package/dist/chunk-7IYNK6VF.js +3 -0
  27. package/dist/chunk-D4G2CCD4.js +2 -0
  28. package/dist/chunk-D7XPTBPO.js +2 -0
  29. package/dist/chunk-HPXOQ4QK.js +1 -0
  30. package/dist/chunk-JD7PX7BB.cjs +2 -0
  31. package/dist/chunk-K7DHGT5F.cjs +1 -0
  32. package/dist/chunk-MEM4DBEJ.cjs +1 -0
  33. package/dist/chunk-ND5BLCNY.js +2 -0
  34. package/dist/chunk-O4TV6UVI.cjs +1 -0
  35. package/dist/chunk-QCLXCOEJ.js +2 -0
  36. package/dist/chunk-W7AQRGI5.cjs +1 -0
  37. package/dist/chunk-XWRSYGZJ.js +2 -0
  38. package/dist/client/Menu.d.cts +4 -4
  39. package/dist/client/Menu.d.ts +4 -4
  40. package/dist/client/index.d.cts +4 -4
  41. package/dist/client/index.d.ts +4 -4
  42. package/dist/defaultTokensConfig.d.cts +2 -2
  43. package/dist/defaultTokensConfig.d.ts +2 -2
  44. package/dist/experimental/client/SwitchV2.cjs +1 -0
  45. package/dist/experimental/client/SwitchV2.d.cts +1 -1
  46. package/dist/experimental/client/SwitchV2.d.ts +1 -1
  47. package/dist/experimental/client/SwitchV2.js +0 -1
  48. package/dist/experimental/client/index.d.cts +1 -1
  49. package/dist/experimental/client/index.d.ts +1 -1
  50. package/dist/experimental/index.d.cts +1 -1
  51. package/dist/experimental/index.d.ts +1 -1
  52. package/dist/{index-BnkxCwiE.d.cts → index-B7ouHsYr.d.cts} +1 -1
  53. package/dist/index-CaoWyj2K.d.cts +245 -0
  54. package/dist/index-CsCxUL1M.d.ts +245 -0
  55. package/dist/{index-DPrPpHqT.d.ts → index-cfPq3YHj.d.ts} +1 -1
  56. package/dist/index.d.cts +7 -7
  57. package/dist/index.d.ts +7 -7
  58. package/dist/metafile-cjs.json +1 -1
  59. package/dist/metafile-esm.json +1 -1
  60. package/dist/tailwind/plugin.d.cts +1 -1
  61. package/dist/tailwind/plugin.d.ts +1 -1
  62. package/dist/tailwind/utils.d.cts +1 -1
  63. package/dist/tailwind/utils.d.ts +1 -1
  64. package/dist/tokens/automation/configs.d.cts +2 -2
  65. package/dist/tokens/automation/configs.d.ts +2 -2
  66. package/dist/tokens/automation/properties.d.cts +2 -2
  67. package/dist/tokens/automation/properties.d.ts +2 -2
  68. package/dist/tokens/index.d.cts +4 -4
  69. package/dist/tokens/index.d.ts +4 -4
  70. package/dist/tokens/parseTokens.d.cts +1 -1
  71. package/dist/tokens/parseTokens.d.ts +1 -1
  72. package/dist/{types-Da_DnBJy.d.cts → types-Cx4ERyM0.d.cts} +18 -2
  73. package/dist/{types-Da_DnBJy.d.ts → types-Cx4ERyM0.d.ts} +18 -2
  74. package/dist/types-wpDRhNL7.d.cts +10605 -0
  75. package/dist/types-wpDRhNL7.d.ts +10605 -0
  76. package/package.json +1 -1
@@ -0,0 +1,17 @@
1
+ import { Button, HStack, IconButton } from '@yahoo/uds';
2
+ import { Cross } from '@yahoo/uds-icons';
3
+
4
+ export const PageA = () => {
5
+ return (
6
+ <HStack>
7
+ <Button variant="brand-secondary">Click me</Button><IconButton name={Cross} />
8
+ <Button variant="primary">Click me</Button><IconButton name={Cross} variant="primary" />
9
+ <Button variant="secondary">Click me</Button><IconButton name={Cross} variant="brand" />
10
+ <Button variant="warning-tertiary">Click me</Button><IconButton name={Cross} variant="brand-tertiary" />
11
+ <Button>Click me</Button><IconButton name={Cross} />
12
+ <Button variant="tertiary">Click me</Button><IconButton name={Cross} variant="brand-tertiary" />
13
+ <Button variant="secondary">Click me</Button><IconButton name={Cross} variant="secondary" />
14
+ <Button variant="tertiary">Click me</Button><IconButton name={Cross} variant="tertiary" />
15
+ </HStack>
16
+ );
17
+ }
@@ -1,5 +1,5 @@
1
1
  import * as react from 'react';
2
- import { b as UniversalBoxProps } from './types-Da_DnBJy.js';
2
+ import { b as UniversalBoxProps } from './types-wpDRhNL7.js';
3
3
 
4
4
  type DivProps = React.HTMLAttributes<HTMLDivElement>;
5
5
  interface BoxProps extends UniversalBoxProps, DivProps {
@@ -1,5 +1,5 @@
1
1
  import * as react from 'react';
2
- import { b as UniversalBoxProps } from './types-Da_DnBJy.cjs';
2
+ import { b as UniversalBoxProps } from './types-wpDRhNL7.cjs';
3
3
 
4
4
  type DivProps = React.HTMLAttributes<HTMLDivElement>;
5
5
  interface BoxProps extends UniversalBoxProps, DivProps {
@@ -0,0 +1,34 @@
1
+ import * as react from 'react';
2
+ import { b as UniversalBoxProps } from './types-Cx4ERyM0.js';
3
+
4
+ type DivProps = React.HTMLAttributes<HTMLDivElement>;
5
+ interface BoxProps extends UniversalBoxProps, DivProps {
6
+ }
7
+ /**
8
+ * **📦 A layout component that can be used to compose other components**
9
+ *
10
+ * @description
11
+ * The most simple component we ship - a div. But with all the power of the UDS design system.
12
+ * By default, `Box` is a flexbox container. When working with vertical or horizontal layouts,
13
+ * consider using [VStack](./v-stack) or [HStack](./h-stack) respectively.
14
+ *
15
+ * @example
16
+ * ```tsx
17
+ * import { Box } from '@yahoo/uds';
18
+ *
19
+ * <Box backgroundColor="primary" spacing="6">
20
+ * Any kind of content can go here!
21
+ * </Box>
22
+ * ```
23
+ *
24
+ * @usage
25
+ * - If you need to div-like container to apply padding, shapes, or other styling.
26
+ * - If you're creating card components.
27
+ *
28
+ * @see The {@link https://uds.build/docs/components/box Box Docs} for more info
29
+ *
30
+ * @related [HStack](https://uds.build/docs/components/h-stack), [VStack](https://uds.build/docs/components/v-stack)
31
+ */
32
+ declare const Box: react.ForwardRefExoticComponent<BoxProps & react.RefAttributes<HTMLDivElement>>;
33
+
34
+ export { type BoxProps as B, type DivProps as D, Box as a };
@@ -0,0 +1,34 @@
1
+ import * as react from 'react';
2
+ import { b as UniversalBoxProps } from './types-Cx4ERyM0.cjs';
3
+
4
+ type DivProps = React.HTMLAttributes<HTMLDivElement>;
5
+ interface BoxProps extends UniversalBoxProps, DivProps {
6
+ }
7
+ /**
8
+ * **📦 A layout component that can be used to compose other components**
9
+ *
10
+ * @description
11
+ * The most simple component we ship - a div. But with all the power of the UDS design system.
12
+ * By default, `Box` is a flexbox container. When working with vertical or horizontal layouts,
13
+ * consider using [VStack](./v-stack) or [HStack](./h-stack) respectively.
14
+ *
15
+ * @example
16
+ * ```tsx
17
+ * import { Box } from '@yahoo/uds';
18
+ *
19
+ * <Box backgroundColor="primary" spacing="6">
20
+ * Any kind of content can go here!
21
+ * </Box>
22
+ * ```
23
+ *
24
+ * @usage
25
+ * - If you need to div-like container to apply padding, shapes, or other styling.
26
+ * - If you're creating card components.
27
+ *
28
+ * @see The {@link https://uds.build/docs/components/box Box Docs} for more info
29
+ *
30
+ * @related [HStack](https://uds.build/docs/components/h-stack), [VStack](https://uds.build/docs/components/v-stack)
31
+ */
32
+ declare const Box: react.ForwardRefExoticComponent<BoxProps & react.RefAttributes<HTMLDivElement>>;
33
+
34
+ export { type BoxProps as B, type DivProps as D, Box as a };
@@ -1,5 +1,5 @@
1
1
  import * as react from 'react';
2
- import { a as UniversalPressableProps } from './types-Da_DnBJy.js';
2
+ import { a as UniversalPressableProps } from './types-Cx4ERyM0.js';
3
3
 
4
4
  type HtmlButtonProps = Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'color' | 'name'>;
5
5
  interface PressableProps extends UniversalPressableProps, HtmlButtonProps {
@@ -0,0 +1,44 @@
1
+ import * as react from 'react';
2
+ import { a as UniversalPressableProps } from './types-wpDRhNL7.js';
3
+
4
+ type HtmlButtonProps = Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'color' | 'name'>;
5
+ interface PressableProps extends UniversalPressableProps, HtmlButtonProps {
6
+ }
7
+ /**
8
+ * **🖲️ A primitive component for creating button interactions with accessibility support**
9
+ *
10
+ * @componentType Client component
11
+ *
12
+ * @description
13
+ * The Pressable component is a primitive component that can be used
14
+ * to create button interactions with accessibility support. It can be used
15
+ * to trigger an action, such as submitting a form, navigating to a new page,
16
+ * or adding interactivity to a section or card.
17
+ *
18
+ * @example
19
+ * ```tsx
20
+ * import { Pressable } from '@yahoo/uds';
21
+ *
22
+ * <Pressable
23
+ * backgroundColor="secondary"
24
+ * borderWidth="thin"
25
+ * borderColor="primary"
26
+ * borderRadius="lg"
27
+ * onPress={() => console.log('Pressed!')}
28
+ * >
29
+ * <Text variant="body1" color="primary" spacingHorizontal="7" spacingVertical="5">Click me...</Text>
30
+ * </Pressable>
31
+ * ```
32
+ *
33
+ * @usage
34
+ * - If you need to add interactivity to a section or card.
35
+ * - If you need a highly customized version of [Button](./button)
36
+ *
37
+ * @see The {@link https://uds.build/docs/components/pressable Pressable Docs} for more info
38
+ *
39
+ * @related [Button](https://uds.build/docs/components/button), [IconButton](https://uds.build/docs/components/icon-button)
40
+ *
41
+ */
42
+ declare const Pressable: react.ForwardRefExoticComponent<PressableProps & react.RefAttributes<HTMLButtonElement>>;
43
+
44
+ export { type PressableProps as P, Pressable as a };
@@ -1,5 +1,5 @@
1
1
  import * as react from 'react';
2
- import { a as UniversalPressableProps } from './types-Da_DnBJy.cjs';
2
+ import { a as UniversalPressableProps } from './types-wpDRhNL7.cjs';
3
3
 
4
4
  type HtmlButtonProps = Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'color' | 'name'>;
5
5
  interface PressableProps extends UniversalPressableProps, HtmlButtonProps {
@@ -0,0 +1,44 @@
1
+ import * as react from 'react';
2
+ import { a as UniversalPressableProps } from './types-Cx4ERyM0.cjs';
3
+
4
+ type HtmlButtonProps = Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'color' | 'name'>;
5
+ interface PressableProps extends UniversalPressableProps, HtmlButtonProps {
6
+ }
7
+ /**
8
+ * **🖲️ A primitive component for creating button interactions with accessibility support**
9
+ *
10
+ * @componentType Client component
11
+ *
12
+ * @description
13
+ * The Pressable component is a primitive component that can be used
14
+ * to create button interactions with accessibility support. It can be used
15
+ * to trigger an action, such as submitting a form, navigating to a new page,
16
+ * or adding interactivity to a section or card.
17
+ *
18
+ * @example
19
+ * ```tsx
20
+ * import { Pressable } from '@yahoo/uds';
21
+ *
22
+ * <Pressable
23
+ * backgroundColor="secondary"
24
+ * borderWidth="thin"
25
+ * borderColor="primary"
26
+ * borderRadius="lg"
27
+ * onPress={() => console.log('Pressed!')}
28
+ * >
29
+ * <Text variant="body1" color="primary" spacingHorizontal="7" spacingVertical="5">Click me...</Text>
30
+ * </Pressable>
31
+ * ```
32
+ *
33
+ * @usage
34
+ * - If you need to add interactivity to a section or card.
35
+ * - If you need a highly customized version of [Button](./button)
36
+ *
37
+ * @see The {@link https://uds.build/docs/components/pressable Pressable Docs} for more info
38
+ *
39
+ * @related [Button](https://uds.build/docs/components/button), [IconButton](https://uds.build/docs/components/icon-button)
40
+ *
41
+ */
42
+ declare const Pressable: react.ForwardRefExoticComponent<PressableProps & react.RefAttributes<HTMLButtonElement>>;
43
+
44
+ export { type PressableProps as P, Pressable as a };
@@ -1,4 +1,4 @@
1
- import { PropsWithChildren, ElementType, ReactNode, Ref } from 'react';
1
+ import { PropsWithChildren, ElementType, ReactNode, ReactElement, Ref } from 'react';
2
2
  import { SvgIcon, IconSize, IconVariant } from '@yahoo/uds-icons/types';
3
3
 
4
4
  declare const alwaysPalette: {
@@ -216,7 +216,23 @@ type SVGElementProps = Omit<React.HTMLAttributes<SVGSVGElement>, 'color'>;
216
216
  interface IconPropsWithSVGProps extends UniversalIconProps, SVGElementProps {
217
217
  }
218
218
  type IconSlotRenderProps = Omit<IconPropsWithSVGProps, 'name'>;
219
- type UniversalIconSlot = SvgIcon | ReactNode | ((iconProps: IconSlotRenderProps) => ReactNode);
219
+ /**
220
+ * We are changing the slot prop from ReactNode to ReactElement to avoid
221
+ * confusing and useless options like number and string, however,
222
+ * there are cases where folks are using null/undefined to dynamically opt-out
223
+ * of rendering the icon. We want to still allow that.
224
+ */
225
+ type BackwardsCompatibleReactElement = null | undefined | ReactElement;
226
+ /**
227
+ * Used anywhere we offer an icon which can be customized.
228
+ *
229
+ * Passing an SvgIcon is the happy path.
230
+ *
231
+ * @example
232
+ * import { Calendar } from "@yahoo/uds-icons"
233
+ * <IconSlot icon={Calendar} />
234
+ */
235
+ type UniversalIconSlot = SvgIcon | BackwardsCompatibleReactElement | ((iconProps: IconSlotRenderProps) => BackwardsCompatibleReactElement);
220
236
  type SwitchSize = 'sm' | 'md';
221
237
  interface UniversalSwitchProps {
222
238
  /**
@@ -1,4 +1,4 @@
1
- import { PropsWithChildren, ElementType, ReactNode, Ref } from 'react';
1
+ import { PropsWithChildren, ElementType, ReactNode, ReactElement, Ref } from 'react';
2
2
  import { SvgIcon, IconSize, IconVariant } from '@yahoo/uds-icons/types';
3
3
 
4
4
  declare const alwaysPalette: {
@@ -216,7 +216,23 @@ type SVGElementProps = Omit<React.HTMLAttributes<SVGSVGElement>, 'color'>;
216
216
  interface IconPropsWithSVGProps extends UniversalIconProps, SVGElementProps {
217
217
  }
218
218
  type IconSlotRenderProps = Omit<IconPropsWithSVGProps, 'name'>;
219
- type UniversalIconSlot = SvgIcon | ReactNode | ((iconProps: IconSlotRenderProps) => ReactNode);
219
+ /**
220
+ * We are changing the slot prop from ReactNode to ReactElement to avoid
221
+ * confusing and useless options like number and string, however,
222
+ * there are cases where folks are using null/undefined to dynamically opt-out
223
+ * of rendering the icon. We want to still allow that.
224
+ */
225
+ type BackwardsCompatibleReactElement = null | undefined | ReactElement;
226
+ /**
227
+ * Used anywhere we offer an icon which can be customized.
228
+ *
229
+ * Passing an SvgIcon is the happy path.
230
+ *
231
+ * @example
232
+ * import { Calendar } from "@yahoo/uds-icons"
233
+ * <IconSlot icon={Calendar} />
234
+ */
235
+ type UniversalIconSlot = SvgIcon | BackwardsCompatibleReactElement | ((iconProps: IconSlotRenderProps) => BackwardsCompatibleReactElement);
220
236
  type SwitchSize = 'sm' | 'md';
221
237
  interface UniversalSwitchProps {
222
238
  /**
@@ -1,6 +1,6 @@
1
1
  import * as react from 'react';
2
2
  import { Ref } from 'react';
3
- import { U as UniversalTextProps } from './types-Da_DnBJy.js';
3
+ import { U as UniversalTextProps } from './types-Cx4ERyM0.js';
4
4
 
5
5
  type TextElementTagName = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'p' | 'strong' | 'span' | 'label' | 'li' | 'sup';
6
6
  type ColorWithInherit = Exclude<UniversalTextProps['color'], undefined> | 'inherit';
@@ -1,6 +1,6 @@
1
1
  import * as react from 'react';
2
2
  import { Ref } from 'react';
3
- import { U as UniversalTextProps } from './types-Da_DnBJy.cjs';
3
+ import { U as UniversalTextProps } from './types-wpDRhNL7.cjs';
4
4
 
5
5
  type TextElementTagName = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'p' | 'strong' | 'span' | 'label' | 'li' | 'sup';
6
6
  type ColorWithInherit = Exclude<UniversalTextProps['color'], undefined> | 'inherit';
@@ -0,0 +1,88 @@
1
+ import * as react from 'react';
2
+ import { Ref } from 'react';
3
+ import { U as UniversalTextProps } from './types-wpDRhNL7.js';
4
+
5
+ type TextElementTagName = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'p' | 'strong' | 'span' | 'label' | 'li' | 'sup';
6
+ type ColorWithInherit = Exclude<UniversalTextProps['color'], undefined> | 'inherit';
7
+ type VariantWithInherit = Exclude<UniversalTextProps['variant'], undefined> | 'inherit';
8
+ type TextProps<TagName extends TextElementTagName = TextElementTagName> = {
9
+ /** Ref passed to the inner container. */
10
+ ref?: Ref<HTMLElement>;
11
+ /** Changes the HTML tag used to render text. Uses the most appropriate semantic tag based on the text style variant. */
12
+ as?: TagName;
13
+ variant?: VariantWithInherit;
14
+ color?: ColorWithInherit;
15
+ } & JSX.IntrinsicElements[TagName] & Omit<UniversalTextProps, 'variant' | 'color'>;
16
+ /**
17
+ * **💬 A text element that can be used to display text**
18
+ *
19
+ * @description
20
+ * By default, the `Text` component uses text primary color and selects the
21
+ * correct font, weight, and leading. It also choices appropriate semantic
22
+ * HTML element based on the `variant` prop. For example, `body1` will use a
23
+ * `<p>` tag, `title1` uses an `<h1>`, etc. This behavior can be overridden
24
+ * with the `as` prop.
25
+ *
26
+ *
27
+ * @example
28
+ * ```tsx
29
+ * import { Text } from '@yahoo/uds';
30
+ *
31
+ * <Text variant="body1" color="primary">
32
+ * Text goes here
33
+ * </Text>
34
+ * ```
35
+ *
36
+ * @usage
37
+ * - Use `Text` to display text in your app.
38
+ * - Use `variant` to change the size and weight of the text.
39
+ * - Use `color` to change the color of the text.
40
+ * - Use `as` to change the HTML tag used to render the text.
41
+ *
42
+ * @see The {@link https://uds.build/docs/components/text Text Docs} for more info
43
+ */
44
+ declare const Text: react.ForwardRefExoticComponent<(Omit<{
45
+ /** Ref passed to the inner container. */
46
+ ref?: Ref<HTMLElement>;
47
+ /** Changes the HTML tag used to render text. Uses the most appropriate semantic tag based on the text style variant. */
48
+ as?: TextElementTagName | undefined;
49
+ variant?: VariantWithInherit;
50
+ color?: ColorWithInherit;
51
+ } & react.ClassAttributes<HTMLElement> & react.HTMLAttributes<HTMLElement> & Omit<UniversalTextProps, "color" | "variant">, "ref"> | Omit<{
52
+ /** Ref passed to the inner container. */
53
+ ref?: Ref<HTMLElement>;
54
+ /** Changes the HTML tag used to render text. Uses the most appropriate semantic tag based on the text style variant. */
55
+ as?: TextElementTagName | undefined;
56
+ variant?: VariantWithInherit;
57
+ color?: ColorWithInherit;
58
+ } & react.ClassAttributes<HTMLHeadingElement> & react.HTMLAttributes<HTMLHeadingElement> & Omit<UniversalTextProps, "color" | "variant">, "ref"> | Omit<{
59
+ /** Ref passed to the inner container. */
60
+ ref?: Ref<HTMLElement>;
61
+ /** Changes the HTML tag used to render text. Uses the most appropriate semantic tag based on the text style variant. */
62
+ as?: TextElementTagName | undefined;
63
+ variant?: VariantWithInherit;
64
+ color?: ColorWithInherit;
65
+ } & react.ClassAttributes<HTMLLabelElement> & react.LabelHTMLAttributes<HTMLLabelElement> & Omit<UniversalTextProps, "color" | "variant">, "ref"> | Omit<{
66
+ /** Ref passed to the inner container. */
67
+ ref?: Ref<HTMLElement>;
68
+ /** Changes the HTML tag used to render text. Uses the most appropriate semantic tag based on the text style variant. */
69
+ as?: TextElementTagName | undefined;
70
+ variant?: VariantWithInherit;
71
+ color?: ColorWithInherit;
72
+ } & react.ClassAttributes<HTMLLIElement> & react.LiHTMLAttributes<HTMLLIElement> & Omit<UniversalTextProps, "color" | "variant">, "ref"> | Omit<{
73
+ /** Ref passed to the inner container. */
74
+ ref?: Ref<HTMLElement>;
75
+ /** Changes the HTML tag used to render text. Uses the most appropriate semantic tag based on the text style variant. */
76
+ as?: TextElementTagName | undefined;
77
+ variant?: VariantWithInherit;
78
+ color?: ColorWithInherit;
79
+ } & react.ClassAttributes<HTMLParagraphElement> & react.HTMLAttributes<HTMLParagraphElement> & Omit<UniversalTextProps, "color" | "variant">, "ref"> | Omit<{
80
+ /** Ref passed to the inner container. */
81
+ ref?: Ref<HTMLElement>;
82
+ /** Changes the HTML tag used to render text. Uses the most appropriate semantic tag based on the text style variant. */
83
+ as?: TextElementTagName | undefined;
84
+ variant?: VariantWithInherit;
85
+ color?: ColorWithInherit;
86
+ } & react.ClassAttributes<HTMLSpanElement> & react.HTMLAttributes<HTMLSpanElement> & Omit<UniversalTextProps, "color" | "variant">, "ref">) & react.RefAttributes<HTMLElement>>;
87
+
88
+ export { Text as T, type TextProps as a };
@@ -0,0 +1,88 @@
1
+ import * as react from 'react';
2
+ import { Ref } from 'react';
3
+ import { U as UniversalTextProps } from './types-Cx4ERyM0.cjs';
4
+
5
+ type TextElementTagName = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'p' | 'strong' | 'span' | 'label' | 'li' | 'sup';
6
+ type ColorWithInherit = Exclude<UniversalTextProps['color'], undefined> | 'inherit';
7
+ type VariantWithInherit = Exclude<UniversalTextProps['variant'], undefined> | 'inherit';
8
+ type TextProps<TagName extends TextElementTagName = TextElementTagName> = {
9
+ /** Ref passed to the inner container. */
10
+ ref?: Ref<HTMLElement>;
11
+ /** Changes the HTML tag used to render text. Uses the most appropriate semantic tag based on the text style variant. */
12
+ as?: TagName;
13
+ variant?: VariantWithInherit;
14
+ color?: ColorWithInherit;
15
+ } & JSX.IntrinsicElements[TagName] & Omit<UniversalTextProps, 'variant' | 'color'>;
16
+ /**
17
+ * **💬 A text element that can be used to display text**
18
+ *
19
+ * @description
20
+ * By default, the `Text` component uses text primary color and selects the
21
+ * correct font, weight, and leading. It also choices appropriate semantic
22
+ * HTML element based on the `variant` prop. For example, `body1` will use a
23
+ * `<p>` tag, `title1` uses an `<h1>`, etc. This behavior can be overridden
24
+ * with the `as` prop.
25
+ *
26
+ *
27
+ * @example
28
+ * ```tsx
29
+ * import { Text } from '@yahoo/uds';
30
+ *
31
+ * <Text variant="body1" color="primary">
32
+ * Text goes here
33
+ * </Text>
34
+ * ```
35
+ *
36
+ * @usage
37
+ * - Use `Text` to display text in your app.
38
+ * - Use `variant` to change the size and weight of the text.
39
+ * - Use `color` to change the color of the text.
40
+ * - Use `as` to change the HTML tag used to render the text.
41
+ *
42
+ * @see The {@link https://uds.build/docs/components/text Text Docs} for more info
43
+ */
44
+ declare const Text: react.ForwardRefExoticComponent<(Omit<{
45
+ /** Ref passed to the inner container. */
46
+ ref?: Ref<HTMLElement>;
47
+ /** Changes the HTML tag used to render text. Uses the most appropriate semantic tag based on the text style variant. */
48
+ as?: TextElementTagName | undefined;
49
+ variant?: VariantWithInherit;
50
+ color?: ColorWithInherit;
51
+ } & react.ClassAttributes<HTMLElement> & react.HTMLAttributes<HTMLElement> & Omit<UniversalTextProps, "color" | "variant">, "ref"> | Omit<{
52
+ /** Ref passed to the inner container. */
53
+ ref?: Ref<HTMLElement>;
54
+ /** Changes the HTML tag used to render text. Uses the most appropriate semantic tag based on the text style variant. */
55
+ as?: TextElementTagName | undefined;
56
+ variant?: VariantWithInherit;
57
+ color?: ColorWithInherit;
58
+ } & react.ClassAttributes<HTMLHeadingElement> & react.HTMLAttributes<HTMLHeadingElement> & Omit<UniversalTextProps, "color" | "variant">, "ref"> | Omit<{
59
+ /** Ref passed to the inner container. */
60
+ ref?: Ref<HTMLElement>;
61
+ /** Changes the HTML tag used to render text. Uses the most appropriate semantic tag based on the text style variant. */
62
+ as?: TextElementTagName | undefined;
63
+ variant?: VariantWithInherit;
64
+ color?: ColorWithInherit;
65
+ } & react.ClassAttributes<HTMLLabelElement> & react.LabelHTMLAttributes<HTMLLabelElement> & Omit<UniversalTextProps, "color" | "variant">, "ref"> | Omit<{
66
+ /** Ref passed to the inner container. */
67
+ ref?: Ref<HTMLElement>;
68
+ /** Changes the HTML tag used to render text. Uses the most appropriate semantic tag based on the text style variant. */
69
+ as?: TextElementTagName | undefined;
70
+ variant?: VariantWithInherit;
71
+ color?: ColorWithInherit;
72
+ } & react.ClassAttributes<HTMLLIElement> & react.LiHTMLAttributes<HTMLLIElement> & Omit<UniversalTextProps, "color" | "variant">, "ref"> | Omit<{
73
+ /** Ref passed to the inner container. */
74
+ ref?: Ref<HTMLElement>;
75
+ /** Changes the HTML tag used to render text. Uses the most appropriate semantic tag based on the text style variant. */
76
+ as?: TextElementTagName | undefined;
77
+ variant?: VariantWithInherit;
78
+ color?: ColorWithInherit;
79
+ } & react.ClassAttributes<HTMLParagraphElement> & react.HTMLAttributes<HTMLParagraphElement> & Omit<UniversalTextProps, "color" | "variant">, "ref"> | Omit<{
80
+ /** Ref passed to the inner container. */
81
+ ref?: Ref<HTMLElement>;
82
+ /** Changes the HTML tag used to render text. Uses the most appropriate semantic tag based on the text style variant. */
83
+ as?: TextElementTagName | undefined;
84
+ variant?: VariantWithInherit;
85
+ color?: ColorWithInherit;
86
+ } & react.ClassAttributes<HTMLSpanElement> & react.HTMLAttributes<HTMLSpanElement> & Omit<UniversalTextProps, "color" | "variant">, "ref">) & react.RefAttributes<HTMLElement>>;
87
+
88
+ export { Text as T, type TextProps as a };
@@ -1,6 +1,6 @@
1
1
  import * as react from 'react';
2
- import { n as UniversalStackProps, o as UniversalDividerProps } from './types-Da_DnBJy.cjs';
3
- import { B as BoxProps, D as DivProps } from './Box-BFRDyWaq.cjs';
2
+ import { n as UniversalStackProps, o as UniversalDividerProps } from './types-Cx4ERyM0.cjs';
3
+ import { B as BoxProps, D as DivProps } from './Box-DpyU-coK.cjs';
4
4
 
5
5
  interface DividerCoreProps extends Omit<BoxProps, 'color' | 'borderColor' | 'borderWidth'>, Omit<UniversalStackProps, 'separator' | 'asChild'>, Omit<UniversalDividerProps, 'variant'> {
6
6
  layerClassNames?: {
@@ -0,0 +1,83 @@
1
+ import * as react from 'react';
2
+ import { n as UniversalStackProps, o as UniversalDividerProps } from './types-wpDRhNL7.cjs';
3
+ import { B as BoxProps, D as DivProps } from './Box-D3tacR6r.cjs';
4
+
5
+ interface DividerCoreProps extends Omit<BoxProps, 'color' | 'borderColor' | 'borderWidth'>, Omit<UniversalStackProps, 'separator' | 'asChild'>, Omit<UniversalDividerProps, 'variant'> {
6
+ layerClassNames?: {
7
+ root?: string;
8
+ text?: string;
9
+ line?: string;
10
+ };
11
+ }
12
+
13
+ type VariantWithInherit = Exclude<UniversalDividerProps['variant'], undefined> | 'inherit';
14
+ interface DividerInternalProps extends DividerCoreProps {
15
+ variant?: VariantWithInherit;
16
+ }
17
+
18
+ type DividerProps = Omit<DividerInternalProps, 'layerClassNames'>;
19
+ /**
20
+ * **📦 A divider component that can be used to visually separate components**
21
+ *
22
+ * @description
23
+ * 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.
24
+ *
25
+ * @example
26
+ * ```tsx
27
+ * import { Divider } from '@yahoo/uds';
28
+ *
29
+ * // Default primary horizontal divider. Similar to <hr />
30
+ * <Divider />
31
+ *
32
+ * // A vertical divider.
33
+ * <Divider vertical />
34
+ *
35
+ * // A horizontal divider with the secondary styling.
36
+ * <Divider variant="secondary" />
37
+ *
38
+ * // A vertical divider with the tertiary styling.
39
+ * <Divider vertical variant="tertiary" />
40
+ * ```
41
+ *
42
+ * @usage
43
+ * - Visually separating parts of a page. Usually used in conjuction with [HStack](./h-stack) or [VStack](./v-stack).
44
+ *
45
+ * @see The {@link https://uds.build/docs/components/divider Divider Docs} for more info
46
+ *
47
+ * @related [Box](https://uds.build/docs/components/box), [HStack](https://uds.build/docs/components/h-stack), [VStack](https://uds.build/docs/components/v-stack)
48
+ */
49
+ declare const Divider: react.ForwardRefExoticComponent<DividerProps & react.RefAttributes<HTMLDivElement>>;
50
+
51
+ type VStackProps = UniversalStackProps & DivProps;
52
+ /**
53
+ * **🥞 A layout component that arranges its children in rows using flexbox**
54
+ *
55
+ * @description
56
+ * 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)
57
+ * and can be used to compose larger layouts. VStack is similar to [Box](./box) but provides additional features like a `gap` property to
58
+ * add spacing between children.
59
+ *
60
+ * @example
61
+ * ```tsx
62
+ * import { VStack, Text } from '@yahoo/uds';
63
+ *
64
+ * <VStack gap="6">
65
+ * <Text variant="body1" color="primary">First</Text>
66
+ * <Text variant="body1" color="primary">Second</Text>
67
+ * <Text variant="body1" color="primary">Third</Text>
68
+ * </VStack>
69
+ * ```
70
+ *
71
+ * @usage
72
+ * - Create a column of items, optionally with gaps between.
73
+ * - Create rows that are sized to their content (height only). By default each child will fill the width of the VStack.
74
+ * - Create rows that fill the available space within the parent container.
75
+ * - Create rows of proportionate size to each other (also known as a ratio-based layout).
76
+ *
77
+ * @see The {@link https://uds.build/docs/components/v-stack VStack Docs} for more info
78
+ *
79
+ * @related [Box](https://uds.build/docs/components/box), [HStack](https://uds.build/docs/components/h-stack)
80
+ **/
81
+ declare const VStack: react.ForwardRefExoticComponent<UniversalStackProps & DivProps & react.RefAttributes<HTMLDivElement>>;
82
+
83
+ export { type DividerProps as D, type VStackProps as V, Divider as a, VStack as b };
@@ -1,6 +1,6 @@
1
1
  import * as react from 'react';
2
- import { n as UniversalStackProps, o as UniversalDividerProps } from './types-Da_DnBJy.js';
3
- import { B as BoxProps, D as DivProps } from './Box-MHJ0-0M3.js';
2
+ import { n as UniversalStackProps, o as UniversalDividerProps } from './types-Cx4ERyM0.js';
3
+ import { B as BoxProps, D as DivProps } from './Box-DSlj_nk4.js';
4
4
 
5
5
  interface DividerCoreProps extends Omit<BoxProps, 'color' | 'borderColor' | 'borderWidth'>, Omit<UniversalStackProps, 'separator' | 'asChild'>, Omit<UniversalDividerProps, 'variant'> {
6
6
  layerClassNames?: {