@yahoo/uds 3.41.0-beta.1 → 3.41.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.
- package/dist/Box-CIpeMJQ7.d.cts +34 -0
- package/dist/Box-CsVRrRDn.d.ts +34 -0
- package/dist/Pressable-BLpoRoJ0.d.ts +44 -0
- package/dist/Pressable-C-ni2dkO.d.cts +44 -0
- package/dist/Text-B8DBsO1c.d.cts +139 -0
- package/dist/Text-BS22RqVk.d.ts +139 -0
- package/dist/VStack-DUYPy1bE.d.cts +83 -0
- package/dist/VStack-DVv1b724.d.ts +83 -0
- package/dist/chunk-54KLTT2G.cjs +2 -0
- package/dist/chunk-7HJZOCXN.js +1 -0
- package/dist/chunk-BRUA62LK.js +2 -0
- package/dist/chunk-BWENZ6PA.js +2 -0
- package/dist/chunk-ELYY2QWM.cjs +1 -0
- package/dist/chunk-GJCDWRR6.cjs +1 -0
- package/dist/chunk-HK3EDM7I.cjs +1 -0
- package/dist/chunk-IDW7LALS.js +2 -0
- package/dist/chunk-JGPAJLQM.js +3 -0
- package/dist/chunk-JS37UUOY.cjs +1 -0
- package/dist/chunk-KFXLVMFU.cjs +1 -0
- package/dist/chunk-MHBYBGCL.js +2 -0
- package/dist/chunk-P32WR56G.cjs +1 -0
- package/dist/chunk-SVYKOXB4.cjs +1 -0
- package/dist/chunk-TJ3N7GMT.js +1 -0
- package/dist/chunk-TTFCIMMV.js +2 -0
- package/dist/chunk-WMRVS6LY.cjs +2 -0
- package/dist/chunk-YCHCTTY5.js +2 -0
- package/dist/index-B8yhu644.d.cts +245 -0
- package/dist/index-CmWpT4Nf.d.ts +245 -0
- package/dist/metafile-cjs.json +1 -1
- package/dist/metafile-esm.json +1 -1
- package/dist/tailwind/plugin.cjs +1 -1
- package/dist/tailwind/plugin.js +1 -1
- package/dist/types-C8XrtPU1.d.cts +10588 -0
- package/dist/types-C8XrtPU1.d.ts +10588 -0
- package/package.json +1 -1
@@ -0,0 +1,34 @@
|
|
1
|
+
import * as react from 'react';
|
2
|
+
import { a as UniversalBoxProps } from './types-C8XrtPU1.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 };
|
@@ -0,0 +1,34 @@
|
|
1
|
+
import * as react from 'react';
|
2
|
+
import { a as UniversalBoxProps } from './types-C8XrtPU1.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,44 @@
|
|
1
|
+
import * as react from 'react';
|
2
|
+
import { U as UniversalPressableProps } from './types-C8XrtPU1.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 };
|
@@ -0,0 +1,44 @@
|
|
1
|
+
import * as react from 'react';
|
2
|
+
import { U as UniversalPressableProps } from './types-C8XrtPU1.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 };
|
@@ -0,0 +1,139 @@
|
|
1
|
+
import * as react from 'react';
|
2
|
+
import { InputHTMLAttributes, Ref } from 'react';
|
3
|
+
import { l as UniversalInputProps, m as IconPropsWithSVGProps, n as UniversalTextProps } from './types-C8XrtPU1.cjs';
|
4
|
+
import { HTMLMotionProps } from 'motion/react';
|
5
|
+
import { B as BoxProps } from './Box-CIpeMJQ7.cjs';
|
6
|
+
|
7
|
+
type HtmlInputProps = React.InputHTMLAttributes<HTMLInputElement> & HTMLMotionProps<'input'>;
|
8
|
+
type NativeInputProps = Omit<HtmlInputProps, 'height' | 'size' | 'width' | 'color' | 'required'>;
|
9
|
+
type DataAttributes = {
|
10
|
+
[name: `data-${string}`]: string;
|
11
|
+
};
|
12
|
+
interface InputProps extends NativeInputProps, UniversalInputProps {
|
13
|
+
/** The type of the input element. Reduced set of options from the HTML input type attribute.
|
14
|
+
* @default 'text'
|
15
|
+
*/
|
16
|
+
type?: Exclude<NativeInputProps['type'], 'button' | 'checkbox' | 'color' | 'file' | 'radio' | 'range' | 'reset' | 'submit' | 'search'>;
|
17
|
+
/** Props to be passed into various slots within the component. */
|
18
|
+
slotProps?: {
|
19
|
+
input?: Partial<InputHTMLAttributes<HTMLInputElement> & DataAttributes>;
|
20
|
+
inputWrapper?: Partial<BoxProps & DataAttributes>;
|
21
|
+
startIcon?: Partial<IconPropsWithSVGProps & DataAttributes>;
|
22
|
+
endIcon?: Partial<IconPropsWithSVGProps & DataAttributes>;
|
23
|
+
};
|
24
|
+
}
|
25
|
+
/**
|
26
|
+
* **📦 An input that allows users to enter text and collect data.**
|
27
|
+
*
|
28
|
+
* @componentType Client component
|
29
|
+
*
|
30
|
+
* @description
|
31
|
+
* 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.
|
32
|
+
*
|
33
|
+
* @see
|
34
|
+
* Check out the {@link https://uds.build/docs/components/input Input Docs} for more info
|
35
|
+
*
|
36
|
+
* @usage
|
37
|
+
* - Forms: For collecting data like names, emails, passwords, etc. (e.g., sign-up, login, or contact forms).
|
38
|
+
* - Search Bars: Allowing users to enter search queries to find content.
|
39
|
+
* - Filters/Settings: When users need to specify preferences, like selecting a date or adjusting a number value.
|
40
|
+
* - Feedback/Comments: Letting users leave reviews, comments, or feedback.
|
41
|
+
*
|
42
|
+
* @example
|
43
|
+
* ```tsx
|
44
|
+
* 'use client';
|
45
|
+
* import { Input } from "@yahoo/uds";
|
46
|
+
*
|
47
|
+
* <Input label="Name" placeholder="Enter your name" required />
|
48
|
+
*```
|
49
|
+
*
|
50
|
+
* @related [Checkbox](https://uds.build/docs/components/checkbox), [Radio](https://uds.build/docs/components/radio).
|
51
|
+
**/
|
52
|
+
declare const Input: react.ForwardRefExoticComponent<Omit<InputProps, "ref"> & react.RefAttributes<HTMLInputElement>>;
|
53
|
+
|
54
|
+
type TextElementTagName = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'p' | 'strong' | 'span' | 'label' | 'li' | 'sup';
|
55
|
+
type ColorWithInherit = Exclude<UniversalTextProps['color'], undefined> | 'inherit';
|
56
|
+
type VariantWithInherit = Exclude<UniversalTextProps['variant'], undefined> | 'inherit';
|
57
|
+
type TextProps<TagName extends TextElementTagName = TextElementTagName> = {
|
58
|
+
/** Ref passed to the inner container. */
|
59
|
+
ref?: Ref<HTMLElement>;
|
60
|
+
/** Changes the HTML tag used to render text. Uses the most appropriate semantic tag based on the text style variant. */
|
61
|
+
as?: TagName;
|
62
|
+
variant?: VariantWithInherit;
|
63
|
+
color?: ColorWithInherit;
|
64
|
+
} & JSX.IntrinsicElements[TagName] & Omit<UniversalTextProps, 'variant' | 'color'>;
|
65
|
+
/**
|
66
|
+
* **💬 A text element that can be used to display text**
|
67
|
+
*
|
68
|
+
* @description
|
69
|
+
* By default, the `Text` component uses text primary color and selects the
|
70
|
+
* correct font, weight, and leading. It also choices appropriate semantic
|
71
|
+
* HTML element based on the `variant` prop. For example, `body1` will use a
|
72
|
+
* `<p>` tag, `title1` uses an `<h1>`, etc. This behavior can be overridden
|
73
|
+
* with the `as` prop.
|
74
|
+
*
|
75
|
+
*
|
76
|
+
* @example
|
77
|
+
* ```tsx
|
78
|
+
* import { Text } from '@yahoo/uds';
|
79
|
+
*
|
80
|
+
* <Text variant="body1" color="primary">
|
81
|
+
* Text goes here
|
82
|
+
* </Text>
|
83
|
+
* ```
|
84
|
+
*
|
85
|
+
* @usage
|
86
|
+
* - Use `Text` to display text in your app.
|
87
|
+
* - Use `variant` to change the size and weight of the text.
|
88
|
+
* - Use `color` to change the color of the text.
|
89
|
+
* - Use `as` to change the HTML tag used to render the text.
|
90
|
+
*
|
91
|
+
* @see The {@link https://uds.build/docs/components/text Text Docs} for more info
|
92
|
+
*
|
93
|
+
* @related [ResponsiveText](https://uds.build/docs/components/responsive-text)
|
94
|
+
*/
|
95
|
+
declare const Text: react.ForwardRefExoticComponent<(Omit<{
|
96
|
+
/** Ref passed to the inner container. */
|
97
|
+
ref?: Ref<HTMLElement>;
|
98
|
+
/** Changes the HTML tag used to render text. Uses the most appropriate semantic tag based on the text style variant. */
|
99
|
+
as?: TextElementTagName | undefined;
|
100
|
+
variant?: VariantWithInherit;
|
101
|
+
color?: ColorWithInherit;
|
102
|
+
} & react.ClassAttributes<HTMLElement> & react.HTMLAttributes<HTMLElement> & Omit<UniversalTextProps, "color" | "variant">, "ref"> | Omit<{
|
103
|
+
/** Ref passed to the inner container. */
|
104
|
+
ref?: Ref<HTMLElement>;
|
105
|
+
/** Changes the HTML tag used to render text. Uses the most appropriate semantic tag based on the text style variant. */
|
106
|
+
as?: TextElementTagName | undefined;
|
107
|
+
variant?: VariantWithInherit;
|
108
|
+
color?: ColorWithInherit;
|
109
|
+
} & react.ClassAttributes<HTMLHeadingElement> & react.HTMLAttributes<HTMLHeadingElement> & Omit<UniversalTextProps, "color" | "variant">, "ref"> | Omit<{
|
110
|
+
/** Ref passed to the inner container. */
|
111
|
+
ref?: Ref<HTMLElement>;
|
112
|
+
/** Changes the HTML tag used to render text. Uses the most appropriate semantic tag based on the text style variant. */
|
113
|
+
as?: TextElementTagName | undefined;
|
114
|
+
variant?: VariantWithInherit;
|
115
|
+
color?: ColorWithInherit;
|
116
|
+
} & react.ClassAttributes<HTMLLabelElement> & react.LabelHTMLAttributes<HTMLLabelElement> & Omit<UniversalTextProps, "color" | "variant">, "ref"> | Omit<{
|
117
|
+
/** Ref passed to the inner container. */
|
118
|
+
ref?: Ref<HTMLElement>;
|
119
|
+
/** Changes the HTML tag used to render text. Uses the most appropriate semantic tag based on the text style variant. */
|
120
|
+
as?: TextElementTagName | undefined;
|
121
|
+
variant?: VariantWithInherit;
|
122
|
+
color?: ColorWithInherit;
|
123
|
+
} & react.ClassAttributes<HTMLLIElement> & react.LiHTMLAttributes<HTMLLIElement> & Omit<UniversalTextProps, "color" | "variant">, "ref"> | Omit<{
|
124
|
+
/** Ref passed to the inner container. */
|
125
|
+
ref?: Ref<HTMLElement>;
|
126
|
+
/** Changes the HTML tag used to render text. Uses the most appropriate semantic tag based on the text style variant. */
|
127
|
+
as?: TextElementTagName | undefined;
|
128
|
+
variant?: VariantWithInherit;
|
129
|
+
color?: ColorWithInherit;
|
130
|
+
} & react.ClassAttributes<HTMLParagraphElement> & react.HTMLAttributes<HTMLParagraphElement> & Omit<UniversalTextProps, "color" | "variant">, "ref"> | Omit<{
|
131
|
+
/** Ref passed to the inner container. */
|
132
|
+
ref?: Ref<HTMLElement>;
|
133
|
+
/** Changes the HTML tag used to render text. Uses the most appropriate semantic tag based on the text style variant. */
|
134
|
+
as?: TextElementTagName | undefined;
|
135
|
+
variant?: VariantWithInherit;
|
136
|
+
color?: ColorWithInherit;
|
137
|
+
} & react.ClassAttributes<HTMLSpanElement> & react.HTMLAttributes<HTMLSpanElement> & Omit<UniversalTextProps, "color" | "variant">, "ref">) & react.RefAttributes<HTMLElement>>;
|
138
|
+
|
139
|
+
export { type InputProps as I, type TextProps as T, Text as a, Input as b };
|
@@ -0,0 +1,139 @@
|
|
1
|
+
import * as react from 'react';
|
2
|
+
import { InputHTMLAttributes, Ref } from 'react';
|
3
|
+
import { l as UniversalInputProps, m as IconPropsWithSVGProps, n as UniversalTextProps } from './types-C8XrtPU1.js';
|
4
|
+
import { HTMLMotionProps } from 'motion/react';
|
5
|
+
import { B as BoxProps } from './Box-CsVRrRDn.js';
|
6
|
+
|
7
|
+
type HtmlInputProps = React.InputHTMLAttributes<HTMLInputElement> & HTMLMotionProps<'input'>;
|
8
|
+
type NativeInputProps = Omit<HtmlInputProps, 'height' | 'size' | 'width' | 'color' | 'required'>;
|
9
|
+
type DataAttributes = {
|
10
|
+
[name: `data-${string}`]: string;
|
11
|
+
};
|
12
|
+
interface InputProps extends NativeInputProps, UniversalInputProps {
|
13
|
+
/** The type of the input element. Reduced set of options from the HTML input type attribute.
|
14
|
+
* @default 'text'
|
15
|
+
*/
|
16
|
+
type?: Exclude<NativeInputProps['type'], 'button' | 'checkbox' | 'color' | 'file' | 'radio' | 'range' | 'reset' | 'submit' | 'search'>;
|
17
|
+
/** Props to be passed into various slots within the component. */
|
18
|
+
slotProps?: {
|
19
|
+
input?: Partial<InputHTMLAttributes<HTMLInputElement> & DataAttributes>;
|
20
|
+
inputWrapper?: Partial<BoxProps & DataAttributes>;
|
21
|
+
startIcon?: Partial<IconPropsWithSVGProps & DataAttributes>;
|
22
|
+
endIcon?: Partial<IconPropsWithSVGProps & DataAttributes>;
|
23
|
+
};
|
24
|
+
}
|
25
|
+
/**
|
26
|
+
* **📦 An input that allows users to enter text and collect data.**
|
27
|
+
*
|
28
|
+
* @componentType Client component
|
29
|
+
*
|
30
|
+
* @description
|
31
|
+
* 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.
|
32
|
+
*
|
33
|
+
* @see
|
34
|
+
* Check out the {@link https://uds.build/docs/components/input Input Docs} for more info
|
35
|
+
*
|
36
|
+
* @usage
|
37
|
+
* - Forms: For collecting data like names, emails, passwords, etc. (e.g., sign-up, login, or contact forms).
|
38
|
+
* - Search Bars: Allowing users to enter search queries to find content.
|
39
|
+
* - Filters/Settings: When users need to specify preferences, like selecting a date or adjusting a number value.
|
40
|
+
* - Feedback/Comments: Letting users leave reviews, comments, or feedback.
|
41
|
+
*
|
42
|
+
* @example
|
43
|
+
* ```tsx
|
44
|
+
* 'use client';
|
45
|
+
* import { Input } from "@yahoo/uds";
|
46
|
+
*
|
47
|
+
* <Input label="Name" placeholder="Enter your name" required />
|
48
|
+
*```
|
49
|
+
*
|
50
|
+
* @related [Checkbox](https://uds.build/docs/components/checkbox), [Radio](https://uds.build/docs/components/radio).
|
51
|
+
**/
|
52
|
+
declare const Input: react.ForwardRefExoticComponent<Omit<InputProps, "ref"> & react.RefAttributes<HTMLInputElement>>;
|
53
|
+
|
54
|
+
type TextElementTagName = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'p' | 'strong' | 'span' | 'label' | 'li' | 'sup';
|
55
|
+
type ColorWithInherit = Exclude<UniversalTextProps['color'], undefined> | 'inherit';
|
56
|
+
type VariantWithInherit = Exclude<UniversalTextProps['variant'], undefined> | 'inherit';
|
57
|
+
type TextProps<TagName extends TextElementTagName = TextElementTagName> = {
|
58
|
+
/** Ref passed to the inner container. */
|
59
|
+
ref?: Ref<HTMLElement>;
|
60
|
+
/** Changes the HTML tag used to render text. Uses the most appropriate semantic tag based on the text style variant. */
|
61
|
+
as?: TagName;
|
62
|
+
variant?: VariantWithInherit;
|
63
|
+
color?: ColorWithInherit;
|
64
|
+
} & JSX.IntrinsicElements[TagName] & Omit<UniversalTextProps, 'variant' | 'color'>;
|
65
|
+
/**
|
66
|
+
* **💬 A text element that can be used to display text**
|
67
|
+
*
|
68
|
+
* @description
|
69
|
+
* By default, the `Text` component uses text primary color and selects the
|
70
|
+
* correct font, weight, and leading. It also choices appropriate semantic
|
71
|
+
* HTML element based on the `variant` prop. For example, `body1` will use a
|
72
|
+
* `<p>` tag, `title1` uses an `<h1>`, etc. This behavior can be overridden
|
73
|
+
* with the `as` prop.
|
74
|
+
*
|
75
|
+
*
|
76
|
+
* @example
|
77
|
+
* ```tsx
|
78
|
+
* import { Text } from '@yahoo/uds';
|
79
|
+
*
|
80
|
+
* <Text variant="body1" color="primary">
|
81
|
+
* Text goes here
|
82
|
+
* </Text>
|
83
|
+
* ```
|
84
|
+
*
|
85
|
+
* @usage
|
86
|
+
* - Use `Text` to display text in your app.
|
87
|
+
* - Use `variant` to change the size and weight of the text.
|
88
|
+
* - Use `color` to change the color of the text.
|
89
|
+
* - Use `as` to change the HTML tag used to render the text.
|
90
|
+
*
|
91
|
+
* @see The {@link https://uds.build/docs/components/text Text Docs} for more info
|
92
|
+
*
|
93
|
+
* @related [ResponsiveText](https://uds.build/docs/components/responsive-text)
|
94
|
+
*/
|
95
|
+
declare const Text: react.ForwardRefExoticComponent<(Omit<{
|
96
|
+
/** Ref passed to the inner container. */
|
97
|
+
ref?: Ref<HTMLElement>;
|
98
|
+
/** Changes the HTML tag used to render text. Uses the most appropriate semantic tag based on the text style variant. */
|
99
|
+
as?: TextElementTagName | undefined;
|
100
|
+
variant?: VariantWithInherit;
|
101
|
+
color?: ColorWithInherit;
|
102
|
+
} & react.ClassAttributes<HTMLElement> & react.HTMLAttributes<HTMLElement> & Omit<UniversalTextProps, "color" | "variant">, "ref"> | Omit<{
|
103
|
+
/** Ref passed to the inner container. */
|
104
|
+
ref?: Ref<HTMLElement>;
|
105
|
+
/** Changes the HTML tag used to render text. Uses the most appropriate semantic tag based on the text style variant. */
|
106
|
+
as?: TextElementTagName | undefined;
|
107
|
+
variant?: VariantWithInherit;
|
108
|
+
color?: ColorWithInherit;
|
109
|
+
} & react.ClassAttributes<HTMLHeadingElement> & react.HTMLAttributes<HTMLHeadingElement> & Omit<UniversalTextProps, "color" | "variant">, "ref"> | Omit<{
|
110
|
+
/** Ref passed to the inner container. */
|
111
|
+
ref?: Ref<HTMLElement>;
|
112
|
+
/** Changes the HTML tag used to render text. Uses the most appropriate semantic tag based on the text style variant. */
|
113
|
+
as?: TextElementTagName | undefined;
|
114
|
+
variant?: VariantWithInherit;
|
115
|
+
color?: ColorWithInherit;
|
116
|
+
} & react.ClassAttributes<HTMLLabelElement> & react.LabelHTMLAttributes<HTMLLabelElement> & Omit<UniversalTextProps, "color" | "variant">, "ref"> | Omit<{
|
117
|
+
/** Ref passed to the inner container. */
|
118
|
+
ref?: Ref<HTMLElement>;
|
119
|
+
/** Changes the HTML tag used to render text. Uses the most appropriate semantic tag based on the text style variant. */
|
120
|
+
as?: TextElementTagName | undefined;
|
121
|
+
variant?: VariantWithInherit;
|
122
|
+
color?: ColorWithInherit;
|
123
|
+
} & react.ClassAttributes<HTMLLIElement> & react.LiHTMLAttributes<HTMLLIElement> & Omit<UniversalTextProps, "color" | "variant">, "ref"> | Omit<{
|
124
|
+
/** Ref passed to the inner container. */
|
125
|
+
ref?: Ref<HTMLElement>;
|
126
|
+
/** Changes the HTML tag used to render text. Uses the most appropriate semantic tag based on the text style variant. */
|
127
|
+
as?: TextElementTagName | undefined;
|
128
|
+
variant?: VariantWithInherit;
|
129
|
+
color?: ColorWithInherit;
|
130
|
+
} & react.ClassAttributes<HTMLParagraphElement> & react.HTMLAttributes<HTMLParagraphElement> & Omit<UniversalTextProps, "color" | "variant">, "ref"> | Omit<{
|
131
|
+
/** Ref passed to the inner container. */
|
132
|
+
ref?: Ref<HTMLElement>;
|
133
|
+
/** Changes the HTML tag used to render text. Uses the most appropriate semantic tag based on the text style variant. */
|
134
|
+
as?: TextElementTagName | undefined;
|
135
|
+
variant?: VariantWithInherit;
|
136
|
+
color?: ColorWithInherit;
|
137
|
+
} & react.ClassAttributes<HTMLSpanElement> & react.HTMLAttributes<HTMLSpanElement> & Omit<UniversalTextProps, "color" | "variant">, "ref">) & react.RefAttributes<HTMLElement>>;
|
138
|
+
|
139
|
+
export { type InputProps as I, type TextProps as T, Text as a, Input as b };
|
@@ -0,0 +1,83 @@
|
|
1
|
+
import * as react from 'react';
|
2
|
+
import { p as UniversalStackProps, q as UniversalDividerProps } from './types-C8XrtPU1.cjs';
|
3
|
+
import { B as BoxProps, D as DivProps } from './Box-CIpeMJQ7.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 };
|
@@ -0,0 +1,83 @@
|
|
1
|
+
import * as react from 'react';
|
2
|
+
import { p as UniversalStackProps, q as UniversalDividerProps } from './types-C8XrtPU1.js';
|
3
|
+
import { B as BoxProps, D as DivProps } from './Box-CsVRrRDn.js';
|
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 };
|
@@ -0,0 +1,2 @@
|
|
1
|
+
"use strict";var o=require("./chunk-P32WR56G.cjs"),r=require("./chunk-QLXJH36U.cjs"),e=require("@yahoo/uds/fixtures"),t=require("@yahoo/uds/flags"),n=require("clsx"),i=require("imurmurhash"),a=require("tailwind-merge"),s=require("react"),l=require("react/jsx-runtime");function d(o){return o&&o.__esModule?o:{default:o}}var c=d(i);/*! © 2025 Yahoo, Inc. UDS v0.0.0-development */function f(o){return"boolean"==typeof o?`${o}`:0===o?"0":o}function p(o){const r=Object.create(null),e=Object.keys(o);for(let t=0,n=e.length;t<n;t++){const n=e[t];void 0!==o[n]&&(r[n]=o[n])}return r}var u=a.extendTailwindMerge({extend:{theme:{borderColor:e.lineColors,borderWidth:e.borderWidths,borderRadius:e.borderRadii}},override:{classGroups:{"text-color":[{text:[...e.foregroundColors,...e.spectrumColors]}],"bg-color":[{bg:e.backgroundColors}],"font-family":[{font:["icons",...e.textVariants]}],leading:[{leading:e.textVariants}]},conflictingClassGroups:{}}}),b=(...o)=>{const r=n.clsx(o);return u(r)},h=o=>r=>{if(!o?.variants)return b(o?.base,r?.className);const{variants:e,defaultVariants:t}=o,n=Object.keys(e).map(o=>{const n=r?.[o],i=t?.[o],a=f(n)||f(i);return e[o][a]}),i={...t,...r&&p(r)},a=o?.compoundVariants?.reduce((o,{className:r,...e})=>Object.entries(e).every(([o,r])=>i[o]===r)?b(o,r):o,"");return b(o?.base,n,a,r?.className)},m=h({variants:o.variants}),g=new Map,x=o=>{const{useGetStylesCache:r}=t.getFeatureFlags();if(r){const r=function(o){const r=Object.create(null),e=Object.keys(o).sort();for(let t=0,n=e.length;t<n;t++){const n=e[t];r[n]=o[n]}return r}(p(o)),e=(new c.default).hash(JSON.stringify(r)).result();if(g.has(e))return g.get(e);const t=m(r);return g.set(e,t),t}return m(o)};function S(...o){return r=>o.forEach(o=>function(o,r){"function"==typeof o?o(r):null!=o&&(o.current=r)}(o,r))}function C(){const o=s.forwardRef((o,e)=>{const{children:n,...i}=o,a=s.Children.toArray(n),d=a.find(t);if(d){const o=d.props.children,t=a.map(r=>r===d?s.Children.count(o)>1?s.Children.only(null):s.isValidElement(o)?o.props.children:null:r);return l.jsx(r,{...i,ref:e,children:s.isValidElement(o)?s.cloneElement(o,void 0,t):null})}return l.jsx(r,{...i,ref:e,children:n})});o.displayName="Slot";const r=s.forwardRef((o,r)=>{const{children:e,...t}=o;return s.isValidElement(e)?s.cloneElement(e,{...n(t,e.props),ref:r?S(r,e.ref):e.ref}):s.Children.count(e)>1?s.Children.only(null):null});r.displayName="SlotClone";const e=({children:o})=>o;function t(o){return s.isValidElement(o)&&o.type===e}function n(o,r){const e={...r};for(const t in r){const n=o[t],i=r[t];/^on[A-Z]/.test(t)?n&&i?e[t]=(...o)=>{i(...o),n(...o)}:n&&(e[t]=n):"style"===t&&(e[t]={...n,...i})}return{...o,...e}}return o}var w=C(),y=s.forwardRef(function({asChild:o,as:r="div",className:e,backgroundColor:t,borderRadius:n,borderTopStartRadius:i,borderTopEndRadius:a,borderBottomStartRadius:s,borderBottomEndRadius:d,borderColor:c,borderStartColor:f,borderEndColor:p,borderTopColor:u,borderBottomColor:b,borderWidth:h,borderVerticalWidth:m,borderHorizontalWidth:g,borderStartWidth:S,borderEndWidth:C,borderTopWidth:y,borderBottomWidth:v,alignContent:W,alignItems:E,alignSelf:B,flex:T,flexDirection:R,flexGrow:N,flexShrink:V,flexWrap:j,justifyContent:z,flexBasis:G,display:H="flex",overflow:k,overflowX:q,overflowY:I,position:O,spacing:_,spacingHorizontal:F,spacingVertical:X,spacingBottom:A,spacingEnd:D,spacingStart:M,spacingTop:Y,offset:$,offsetVertical:J,offsetHorizontal:P,offsetBottom:L,offsetEnd:Q,offsetStart:U,offsetTop:Z,columnGap:K,rowGap:oo,width:ro,height:eo,dropShadow:to,insetShadow:no,...io},ao){const so=x({backgroundColor:t,borderRadius:n,borderTopStartRadius:i,borderTopEndRadius:a,borderBottomStartRadius:s,borderBottomEndRadius:d,borderColor:c,borderStartColor:f,borderEndColor:p,borderTopColor:u,borderBottomColor:b,borderWidth:h,borderVerticalWidth:m,borderHorizontalWidth:g,borderStartWidth:S,borderEndWidth:C,borderTopWidth:y,borderBottomWidth:v,alignContent:W,alignItems:E,alignSelf:B,flex:T,flexDirection:R,flexGrow:N,flexShrink:V,flexWrap:j,justifyContent:z,flexBasis:G,display:H,overflow:k,overflowX:q,overflowY:I,position:O,spacing:_,spacingHorizontal:F,spacingVertical:X,spacingBottom:A,spacingEnd:D,spacingStart:M,spacingTop:Y,offset:$,offsetVertical:J,offsetHorizontal:P,offsetBottom:L,offsetEnd:Q,offsetStart:U,offsetTop:Z,columnGap:K,rowGap:oo,width:ro,height:eo,dropShadow:to,insetShadow:no,className:e}),lo=o?w:r;return l.jsx(lo,{className:so,ref:ao,...io})});y.displayName="Box";var v=C(),W={display1:"h1",display2:"h1",display3:"h1",title1:"h1",title2:"h2",title3:"h3",title4:"h4",headline1:"h5",body1:"p",label1:"p",label2:"p",label3:"p",label4:"p",caption1:"p",caption2:"p",legal1:"p",ui1:"span",ui2:"span",ui3:"span",ui4:"span",ui5:"span",ui6:"span",inherit:"p"},E=s.forwardRef(function({className:o,asChild:r,color:e="primary",variant:t="body1",as:n=W[t],fontFamily:i,fontSize:a,fontWeight:s,lineHeight:d,textTransform:c,textAlign:f,backgroundColor:p,borderRadius:u,borderTopStartRadius:b,borderTopEndRadius:h,borderBottomStartRadius:m,borderBottomEndRadius:g,borderColor:S,borderStartColor:C,borderEndColor:w,borderTopColor:y,borderBottomColor:E,borderWidth:B,borderVerticalWidth:T,borderHorizontalWidth:R,borderStartWidth:N,borderEndWidth:V,borderTopWidth:j,borderBottomWidth:z,alignContent:G,alignItems:H,alignSelf:k,flex:q,flexDirection:I,flexGrow:O,flexShrink:_,flexWrap:F,justifyContent:X,flexBasis:A,display:D,overflow:M,overflowX:Y,overflowY:$,position:J,spacing:P,spacingHorizontal:L,spacingVertical:Q,spacingBottom:U,spacingEnd:Z,spacingStart:K,spacingTop:oo,offset:ro,offsetVertical:eo,offsetHorizontal:to,offsetBottom:no,offsetEnd:io,offsetStart:ao,offsetTop:so,columnGap:lo,rowGap:co,...fo},po){const uo={...e&&"inherit"!==e?{color:e}:{},...t&&"inherit"!==t?{fontFamily:i??t,fontSize:a??t,fontWeight:s??t,lineHeight:d??t,textTransform:c??t}:{},textAlign:f},bo=x({className:o,...uo,backgroundColor:p,borderRadius:u,borderTopStartRadius:b,borderTopEndRadius:h,borderBottomStartRadius:m,borderBottomEndRadius:g,borderColor:S,borderStartColor:C,borderEndColor:w,borderTopColor:y,borderBottomColor:E,borderWidth:B,borderVerticalWidth:T,borderHorizontalWidth:R,borderStartWidth:N,borderEndWidth:V,borderTopWidth:j,borderBottomWidth:z,alignContent:G,alignItems:H,alignSelf:k,flex:q,flexDirection:I,flexGrow:O,flexShrink:_,flexWrap:F,justifyContent:X,flexBasis:A,display:D,overflow:M,overflowX:Y,overflowY:$,position:J,spacing:P,spacingHorizontal:L,spacingVertical:Q,spacingBottom:U,spacingEnd:Z,spacingStart:K,spacingTop:oo,offset:ro,offsetVertical:eo,offsetHorizontal:to,offsetBottom:no,offsetEnd:io,offsetStart:ao,offsetTop:so,columnGap:lo,rowGap:co}),ho=r?v:n;return l.jsx(ho,{className:bo,ref:po,...fo})});E.displayName="Text";var B={xs:12,sm:16,md:24,lg:32},T=s.forwardRef(function({name:o,size:r="md",variant:e="outline",color:t="primary",className:n,...i},a){const s=o.metadata?.variants??[],d=s.includes(e)?e:s[0]??"fill",c="multicolor"===d,f=x({flex:"none",color:c?void 0:t,className:b(n,!c&&"[&_path]:fill-current")}),p=B[r];return l.jsx("svg",{ref:a,xmlns:"http://www.w3.org/2000/svg",width:p,height:p,viewBox:`0 0 ${p} ${p}`,"aria-hidden":"true",focusable:"false",className:f,...i,children:l.jsx(o,{size:r,variant:d})})});T.displayName="Icon";var R=r.__toESM(o.require_isFunction(),1),N=s.memo(function({icon:o,iconProps:r,className:e,...t}){if(!o)return null;const{className:n,...i}=r||{},a=b(e,n),d=o;if(d.metadata?.isSvgIcon)return l.jsx(T,{name:d,...i,...t,className:a});if((0,R.default)(o)){const e=o(r||{}),n=e?.props.className;return s.isValidElement(e)&&s.cloneElement(e,{...t,className:b(a,n)})}return s.isValidElement(o)&&s.cloneElement(o,{...i,...o.props,...t,className:b(a,o.props.className)})});N.displayName="IconSlot",
|
2
|
+
/*! © 2025 Yahoo, Inc. UDS v0.0.0-development */exports.Box=y,exports.Icon=T,exports.IconSlot=N,exports.Text=E,exports.createSlot=C,exports.cva=h,exports.cx=b,exports.getStyles=x;
|
@@ -0,0 +1 @@
|
|
1
|
+
import{VStack as e,HStack as r}from"./chunk-BRUA62LK.js";import{cx as t,Box as i,Text as o,getStyles as a}from"./chunk-JGPAJLQM.js";import{forwardRef as n,useMemo as l}from"react";import{jsxs as s,jsx as d}from"react/jsx-runtime";/*! © 2025 Yahoo, Inc. UDS v0.0.0-development */var c={horizontal:"w-full",vertical:""},m=n(function({vertical:a=!1,contentPosition:n="center",className:m,layerClassNames:h,children:f,...v},x){const p=a?"vertical":"horizontal",N=a?e:r,b=l(()=>({root:t(c[p],m,h?.root),label:t(h?.text),line:h?.line}),[m,p,h?.root,h?.text,h?.line]),u=l(()=>"vertical"===p?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:0}:{borderLeftWidth:0,borderRightWidth:0,borderBottomWidth:0},[p]),y=()=>d(i,{flex:"1",className:b.line,style:u});return f?s(N,{flex:"1",alignItems:"center",className:b.root,ref:x,...v,children:["start"!==n&&d(y,{}),d(i,{flex:"none",children:d(o,{color:"inherit",variant:"inherit",className:b.label,children:f})}),"end"!==n&&d(y,{})]}):d(i,{display:"flex",flex:"none",className:b.root,ref:x,...v,children:d(y,{})})});m.displayName="DividerCore";var h=n(function({variant:e="primary",layerClassNames:r,...i},o){const n=l(()=>({root:t("inherit"!==e&&a({dividerVariantRoot:e}),r?.root),text:t("inherit"!==e?a({dividerVariantLabel:e}):void 0,r?.text),line:t("inherit"!==e&&a({dividerVariantLine:e}),r?.line)}),[r?.line,r?.root,r?.text,e]);return d(m,{ref:o,layerClassNames:n,...i})});h.displayName="DividerInternal";export{h as DividerInternal};
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import{Box as r}from"./chunk-JGPAJLQM.js";import{require_isFunction as e}from"./chunk-IDW7LALS.js";import{__toESM as t}from"./chunk-GF4A6TFM.js";import{forwardRef as o,Children as a,cloneElement as n,isValidElement as c}from"react";import{jsx as p}from"react/jsx-runtime";/*! © 2025 Yahoo, Inc. UDS v0.0.0-development */
|
2
|
+
var i=t(e(),1),l=(r,e)=>((r,e)=>{const t=(0,i.default)(e)?e:()=>e;return r.flatMap((r,e)=>0!==e?[t(e),r]:[r])})(a.toArray(r),r=>{const t=(0,i.default)(e)?e(r):e;return c(t)?n(t,{...t.props,key:t.key??`interspersed-${r}`}):null}),m=o(function({gap:e,children:t,separator:o,...a},n){return p(r,{ref:n,flexDirection:"row",rowGap:e,columnGap:e,...a,children:o?l(t,o):t})});m.displayName="HStack";var u=o(function({gap:e,children:t,separator:o,...a},n){return p(r,{ref:n,flexDirection:"column",columnGap:e,rowGap:e,...a,children:o?l(t,o):t})});u.displayName="VStack";export{m as HStack,u as VStack};
|