@yahoo/uds 0.5.11 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cli/README.md +17 -11
- package/cli/bin/uds-darwin-arm64-baseline +0 -0
- package/cli/bin/uds-darwin-x64 +0 -0
- package/cli/bin/uds-linux-arm64 +0 -0
- package/cli/bin/uds-linux-x64-baseline +0 -0
- package/cli/bin/uds-windows-x64-baseline.exe +0 -0
- package/cli/cli.ts +1 -0
- package/cli/consts.ts +1 -7
- package/cli/preload.ts +1 -1
- package/cli/uds-cli +1 -7
- package/cli/utils/configWorker.ts +58 -31
- package/cli/utils/purgeCSS.ts +1 -4
- package/cli/utils/setupConfigWorker.ts +13 -12
- package/dist/{Image.native-BxsXWBqp.d.ts → Image.native-BTcdQraV.d.ts} +2 -2
- package/dist/{Image.native-DBoB1LOc.d.cts → Image.native-D6qA03vT.d.ts} +2 -2
- package/dist/Image.native-D96MZTYD.d.cts +39 -0
- package/dist/Image.native-DX2YWGZD.d.ts +39 -0
- package/dist/Image.native-M8D2Y2sv.d.cts +39 -0
- package/dist/Image.native-QRZjcXm7.d.ts +39 -0
- package/dist/Image.native-f8x4GPuV.d.cts +39 -0
- package/dist/Image.native-mHTDIRbL.d.cts +39 -0
- package/dist/chunk-2C7RDVXS.js +3 -0
- package/dist/chunk-2JQBQOM6.cjs +4 -0
- package/dist/chunk-47ZDV5TW.js +3 -0
- package/dist/chunk-4EJ6WK3H.cjs +2 -0
- package/dist/chunk-55JFYGC7.js +3 -0
- package/dist/chunk-5DFU4PSC.cjs +2 -0
- package/dist/chunk-5LDKFAU4.cjs +2 -0
- package/dist/chunk-5MYSY56L.js +2 -0
- package/dist/chunk-5UHMAJB4.js +2 -0
- package/dist/chunk-5YEIGJJN.js +3 -0
- package/dist/chunk-6G2JWFC3.js +4 -0
- package/dist/chunk-6QLTGUJB.cjs +2 -0
- package/dist/chunk-77JE2H36.js +2 -0
- package/dist/chunk-7A7DDMD7.cjs +2 -0
- package/dist/chunk-7BKASJ4D.cjs +3 -0
- package/dist/chunk-7ICJCQTV.cjs +4 -0
- package/dist/chunk-7OODVPL6.cjs +2 -0
- package/dist/chunk-7SJRCGTP.js +3 -0
- package/dist/chunk-AKOUDLRN.cjs +2 -0
- package/dist/chunk-AV442FHA.js +3 -0
- package/dist/chunk-AY4XUL7M.cjs +3 -0
- package/dist/chunk-B7X77UTF.cjs +3 -0
- package/dist/chunk-BIYOCTWR.js +3 -0
- package/dist/chunk-BNBFA73B.js +4 -0
- package/dist/chunk-BQB5NUKC.cjs +3 -0
- package/dist/chunk-CBSKS4K5.cjs +2 -0
- package/dist/chunk-CE5ROFEK.cjs +3 -0
- package/dist/chunk-CNSDQ4UJ.cjs +4 -0
- package/dist/chunk-CNY6ADXP.js +3 -0
- package/dist/chunk-D24YMS3F.cjs +2 -0
- package/dist/chunk-D3NVRUYG.cjs +4 -0
- package/dist/chunk-D5GE4WP4.cjs +2 -0
- package/dist/chunk-DIOVB5EV.js +3 -0
- package/dist/chunk-E53NU2VM.js +2 -0
- package/dist/chunk-E5X2STIU.js +2 -0
- package/dist/chunk-E6BTI63P.cjs +2 -0
- package/dist/chunk-E7QYUBHG.js +3 -0
- package/dist/chunk-EFYCREMN.js +3 -0
- package/dist/chunk-EMPQR5VI.js +3 -0
- package/dist/chunk-ET6WP7R7.js +2 -0
- package/dist/chunk-EXHCIY4P.cjs +2 -0
- package/dist/chunk-F56AWN2Z.js +3 -0
- package/dist/chunk-FMWP4OJR.js +2 -0
- package/dist/chunk-G7GQQIM5.js +3 -0
- package/dist/chunk-GVBZYWK6.js +4 -0
- package/dist/chunk-H2RSKIJ4.cjs +2 -0
- package/dist/chunk-HF5DHYIT.cjs +2 -0
- package/dist/chunk-HFHRMJKN.cjs +2 -0
- package/dist/chunk-HR7JPJLN.cjs +2 -0
- package/dist/chunk-HTDED6CG.js +3 -0
- package/dist/chunk-HUYXQPM5.cjs +3 -0
- package/dist/chunk-HY56NZEJ.js +3 -0
- package/dist/chunk-I2ENXXSN.js +2 -0
- package/dist/chunk-ITYNB2GX.js +3 -0
- package/dist/chunk-IVJD6N6G.cjs +2 -0
- package/dist/chunk-JVQ7PW3M.js +3 -0
- package/dist/chunk-KH3WJY4K.js +4 -0
- package/dist/chunk-KIDADDGN.js +4 -0
- package/dist/chunk-KTATHDMS.js +3 -0
- package/dist/chunk-L7K4GFJK.cjs +3 -0
- package/dist/chunk-L7X6ZDMI.js +3 -0
- package/dist/chunk-LF6V2NFN.cjs +3 -0
- package/dist/chunk-LRJNSHQA.cjs +2 -0
- package/dist/chunk-MIEZCJHO.cjs +2 -0
- package/dist/chunk-MPK4ZX4R.js +3 -0
- package/dist/chunk-MPP74SLP.js +2 -0
- package/dist/chunk-N3LPKXTZ.cjs +3 -0
- package/dist/chunk-ND64MB7X.js +2 -0
- package/dist/chunk-NSPDKMNR.cjs +2 -0
- package/dist/chunk-O6FFTCHY.js +3 -0
- package/dist/chunk-OAYQHFZC.cjs +3 -0
- package/dist/chunk-OG5MIFO6.js +3 -0
- package/dist/chunk-OH7FOQCA.js +3 -0
- package/dist/chunk-OHOQVW2M.js +3 -0
- package/dist/chunk-OXDRC7K7.cjs +3 -0
- package/dist/chunk-PKL3JLWF.js +2 -0
- package/dist/chunk-PSZZ5NTF.cjs +2 -0
- package/dist/chunk-QAVZFB5J.cjs +3 -0
- package/dist/chunk-QENB6W4I.cjs +4 -0
- package/dist/chunk-QFPKRD7L.js +3 -0
- package/dist/chunk-QGADB35M.js +4 -0
- package/dist/chunk-RFY7RXSM.js +3 -0
- package/dist/chunk-RL274CM3.cjs +2 -0
- package/dist/chunk-RT46SXH4.cjs +2 -0
- package/dist/chunk-S37OVJTV.js +2 -0
- package/dist/chunk-SGN6JN5F.cjs +2 -0
- package/dist/chunk-TKOGPWM4.cjs +2 -0
- package/dist/chunk-TM36S4YW.cjs +2 -0
- package/dist/chunk-TO7LE2BM.js +3 -0
- package/dist/chunk-UI4NLXDH.cjs +2 -0
- package/dist/chunk-UWZYIALE.js +3 -0
- package/dist/chunk-VCELYR7Q.cjs +3 -0
- package/dist/chunk-VEIAMHP4.js +2 -0
- package/dist/chunk-VF7WOINA.cjs +2 -0
- package/dist/chunk-VG5VAHYR.cjs +3 -0
- package/dist/chunk-VHK4FEXK.cjs +4 -0
- package/dist/chunk-WEJOZLMZ.js +2 -0
- package/dist/chunk-WJBYPKLH.cjs +3 -0
- package/dist/chunk-WKHVRU4K.js +3 -0
- package/dist/chunk-WR7BWGMO.cjs +2 -0
- package/dist/chunk-WRJEEPKK.cjs +2 -0
- package/dist/chunk-X5VBG5D7.js +3 -0
- package/dist/chunk-XELIMPNH.cjs +4 -0
- package/dist/chunk-YACR35TD.js +4 -0
- package/dist/chunk-YUYEO5DZ.cjs +2 -0
- package/dist/chunk-ZDKN5LRE.js +3 -0
- package/dist/chunk-ZFYJXGZM.cjs +2 -0
- package/dist/chunk-ZMPSBRKW.js +2 -0
- package/dist/client/index.cjs +4 -0
- package/dist/client/index.d.cts +96 -0
- package/dist/client/index.d.ts +96 -0
- package/dist/client/index.js +6 -0
- package/dist/experimental/index.cjs +3 -3
- package/dist/experimental/index.d.cts +296 -100
- package/dist/experimental/index.d.ts +296 -100
- package/dist/experimental/index.js +3 -3
- package/dist/experimental/index.native.cjs +3 -1
- package/dist/experimental/index.native.d.cts +6 -5
- package/dist/experimental/index.native.d.ts +6 -5
- package/dist/experimental/index.native.js +3 -1
- package/dist/fixtures.cjs +252 -35
- package/dist/fixtures.d.ts +31 -14
- package/dist/fixtures.js +230 -31
- package/dist/index.cjs +1 -2
- package/dist/index.d.cts +201 -27
- package/dist/index.d.ts +201 -27
- package/dist/index.js +2 -3
- package/dist/index.native.cjs +3 -1
- package/dist/index.native.d.cts +52 -147
- package/dist/index.native.d.ts +52 -147
- package/dist/index.native.js +2 -1
- package/dist/metafile-cjs.json +1 -1
- package/dist/metafile-esm.json +1 -1
- package/dist/motionFeatures-AEY3XSQX.js +1 -0
- package/dist/motionFeatures-GFOZDTZE.js +1 -0
- package/dist/motionFeatures-H5RRG7RP.js +1 -0
- package/dist/motionFeatures-NR4MMJ3L.cjs +1 -0
- package/dist/motionFeatures-WFC6MN64.cjs +1 -0
- package/dist/motionFeatures-WUDKXXR7.js +1 -0
- package/dist/motionFeatures-XXMSSBUB.cjs +1 -0
- package/dist/motionFeatures-ZAB6OWON.cjs +1 -0
- package/dist/styles/toast.css +3 -1
- package/dist/styles/toast.d.cts +2 -0
- package/dist/styles/toast.d.ts +2 -0
- package/dist/tailwind/plugin.cjs +3 -1
- package/dist/tailwind/plugin.d.cts +28 -5
- package/dist/tailwind/plugin.d.ts +28 -5
- package/dist/tailwind/plugin.js +3 -3
- package/dist/tailwind/purger.cjs +2 -2
- package/dist/tailwind/purger.js +3 -3
- package/dist/tailwind/tsMorph.cjs +3 -1
- package/dist/tailwind/tsMorph.d.cts +1 -4
- package/dist/tailwind/tsMorph.d.ts +1 -4
- package/dist/tailwind/tsMorph.js +2 -3
- package/dist/tailwind/utils.cjs +1 -0
- package/dist/tailwind/utils.d.cts +98 -0
- package/dist/tailwind/utils.d.ts +98 -0
- package/dist/tailwind/utils.js +1 -0
- package/dist/tokens/index.cjs +1 -2
- package/dist/tokens/index.d.cts +41 -362
- package/dist/tokens/index.d.ts +41 -362
- package/dist/tokens/index.js +1 -2
- package/dist/tokens/index.native.cjs +3 -1
- package/dist/tokens/index.native.d.cts +24 -2
- package/dist/tokens/index.native.d.ts +24 -2
- package/dist/tokens/index.native.js +3 -1
- package/dist/tokens/parseTokens.cjs +1 -2
- package/dist/tokens/parseTokens.d.cts +7 -20
- package/dist/tokens/parseTokens.d.ts +7 -20
- package/dist/tokens/parseTokens.js +1 -2
- package/dist/types-BVfWAIpr.d.cts +909 -0
- package/dist/types-BVfWAIpr.d.ts +909 -0
- package/dist/types-Bi1Q20iy.d.cts +951 -0
- package/dist/types-Bi1Q20iy.d.ts +951 -0
- package/dist/types-BkcFcA6N.d.cts +909 -0
- package/dist/types-BkcFcA6N.d.ts +909 -0
- package/dist/types-C4OR1S9X.d.cts +951 -0
- package/dist/types-C4OR1S9X.d.ts +951 -0
- package/dist/types-C7KJV1b1.d.cts +943 -0
- package/dist/types-C7KJV1b1.d.ts +943 -0
- package/dist/types-DVTR9ROz.d.cts +942 -0
- package/dist/types-DVTR9ROz.d.ts +942 -0
- package/dist/types-JTm5E7im.d.cts +943 -0
- package/dist/types-JTm5E7im.d.ts +943 -0
- package/dist/types-uSRlDJAd.d.cts +942 -0
- package/dist/types-uSRlDJAd.d.ts +942 -0
- package/package.json +13 -1
- package/dist/VStack-BFIFJUVx.d.cts +0 -177
- package/dist/VStack-zgq0Zq3N.d.ts +0 -177
- package/dist/index.native-Gbm66c6M.d.ts +0 -317
- package/dist/index.native-OW5d35eT.d.cts +0 -317
- package/dist/styles/globals.css +0 -1
- package/dist/types-BofdnBTe.d.cts +0 -436
- package/dist/types-BofdnBTe.d.ts +0 -436
- package/dist/types-CLPge83Y.d.cts +0 -436
- package/dist/types-CLPge83Y.d.ts +0 -436
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@yahoo/uds",
|
3
3
|
"description": "Yahoo Universal System",
|
4
|
-
"version": "0.
|
4
|
+
"version": "1.0.0",
|
5
5
|
"type": "module",
|
6
6
|
"bin": {
|
7
7
|
"uds": "./cli/uds-cli"
|
@@ -29,6 +29,16 @@
|
|
29
29
|
"default": "./dist/index.cjs"
|
30
30
|
}
|
31
31
|
},
|
32
|
+
"./client": {
|
33
|
+
"import": {
|
34
|
+
"types": "./dist/client/index.d.ts",
|
35
|
+
"default": "./dist/client/index.js"
|
36
|
+
},
|
37
|
+
"require": {
|
38
|
+
"types": "./dist/client/index.d.cts",
|
39
|
+
"default": "./dist/client/index.cjs"
|
40
|
+
}
|
41
|
+
},
|
32
42
|
"./experimental": {
|
33
43
|
"react-native": {
|
34
44
|
"types": "./dist/experimental/index.native.d.ts",
|
@@ -127,9 +137,11 @@
|
|
127
137
|
"@ariakit/react": "^0.4.5",
|
128
138
|
"bluebun": "^0.0.34",
|
129
139
|
"clsx": "^2.1.0",
|
140
|
+
"framer-motion": "^11.3.28",
|
130
141
|
"lodash-es": "^4.17.21",
|
131
142
|
"prompts": "^2.4.2",
|
132
143
|
"react-toastify": "^10.0.5",
|
144
|
+
"semver": "^7.6.2",
|
133
145
|
"tailwind-merge": "^2.3.0",
|
134
146
|
"ts-morph": "^23.0.0"
|
135
147
|
},
|
@@ -1,177 +0,0 @@
|
|
1
|
-
import * as react from 'react';
|
2
|
-
import { Ref } from 'react';
|
3
|
-
import { aY as UniversalBoxProps, a$ as UniversalIconProps, b0 as UniversalPressableProps, b2 as UniversalTextProps, g as UniversalStackProps } from './types-BofdnBTe.cjs';
|
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 http://yo/uds/docs/components/box Box Docs} for more info
|
30
|
-
*
|
31
|
-
* @related [HStack](./HStack.tsx) and [VStack](./VStack.tsx)
|
32
|
-
*/
|
33
|
-
declare const Box: react.ForwardRefExoticComponent<BoxProps & react.RefAttributes<HTMLDivElement>>;
|
34
|
-
|
35
|
-
type SVGElementProps = Omit<React.HTMLAttributes<SVGSVGElement>, 'color'>;
|
36
|
-
interface IconProps extends UniversalIconProps, SVGElementProps {
|
37
|
-
}
|
38
|
-
/**
|
39
|
-
* **🎨 A component for displaying icons**
|
40
|
-
*
|
41
|
-
* @description
|
42
|
-
* Icons are small symbols for actions or other items. They are available in
|
43
|
-
* three different sizes: `sm`, `md`, and `lg`. Each size also supports an
|
44
|
-
* outline and fill variant. Icons can be colored using the `color` prop.
|
45
|
-
*
|
46
|
-
* The component is available in the `@yahoo/uds` package but is meant to be used
|
47
|
-
* with the assets in `@yahoo/uds-icons`. You will need both packages to use icons.
|
48
|
-
* A separate package provides modularity from the core library, better
|
49
|
-
* versioning strategies, and tree shakeability.
|
50
|
-
*
|
51
|
-
* @example
|
52
|
-
* ```tsx
|
53
|
-
* import { Icon } from '@yahoo/uds';
|
54
|
-
* import { AddFolder } from '@yahoo/uds-icons';
|
55
|
-
*
|
56
|
-
* <Icon name={AddFolder} variant="fill" size="sm" />
|
57
|
-
* ```
|
58
|
-
*
|
59
|
-
* @usage
|
60
|
-
* - If you need to display an icon.
|
61
|
-
*
|
62
|
-
* @see The {@link http://yo/uds/docs/components/icon Icon Docs} for more info
|
63
|
-
*
|
64
|
-
* @related [IconButton](./IconButton.tsx)
|
65
|
-
*/
|
66
|
-
declare const Icon: react.ForwardRefExoticComponent<IconProps & react.RefAttributes<SVGSVGElement>>;
|
67
|
-
|
68
|
-
type HtmlButtonProps = Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'color' | 'name'>;
|
69
|
-
interface PressableProps extends UniversalPressableProps, HtmlButtonProps {
|
70
|
-
}
|
71
|
-
/**
|
72
|
-
* **🖲️ A primitive component for creating button interactions with accessibility support**
|
73
|
-
*
|
74
|
-
* @description
|
75
|
-
* The Pressable component is a primitive component that can be used
|
76
|
-
* to create button interactions with accessibility support. It can be used
|
77
|
-
* to trigger an action, such as submitting a form, navigating to a new page,
|
78
|
-
* or adding interactivity to a section or card.
|
79
|
-
*
|
80
|
-
* @example
|
81
|
-
* ```tsx
|
82
|
-
* import { Pressable } from '@yahoo/uds';
|
83
|
-
*
|
84
|
-
* <Pressable
|
85
|
-
* backgroundColor="secondary"
|
86
|
-
* borderWidth="thin"
|
87
|
-
* borderColor="primary"
|
88
|
-
* borderRadius="lg"
|
89
|
-
* onPress={() => console.log('Pressed!')}
|
90
|
-
* >
|
91
|
-
* <Text variant="body1" color="primary" spacingHorizontal="7" spacingVertical="5">Click me...</Text>
|
92
|
-
* </Pressable>
|
93
|
-
* ```
|
94
|
-
*
|
95
|
-
* @usage
|
96
|
-
* - If you need to add interactivity to a section or card.
|
97
|
-
* - If you need a highly customized version of [Button](./button)
|
98
|
-
*
|
99
|
-
* @see The {@link http://yo/uds/docs/components/pressable Pressable Docs} for more info
|
100
|
-
*
|
101
|
-
* @related [Button](./Button.tsx) and [IconButton](./IconButton.tsx)
|
102
|
-
*
|
103
|
-
*/
|
104
|
-
declare const Pressable: react.ForwardRefExoticComponent<PressableProps & react.RefAttributes<HTMLButtonElement>>;
|
105
|
-
|
106
|
-
type TextElementTagName = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'p' | 'strong' | 'span' | 'label' | 'li';
|
107
|
-
type TextProps = UniversalTextProps & {
|
108
|
-
/** Ref passed to the inner container. */
|
109
|
-
ref?: Ref<HTMLElement>;
|
110
|
-
/** Changes the HTML tag used to render text. Uses the most appropriate semantic tag based on the text style variant. */
|
111
|
-
as?: TextElementTagName;
|
112
|
-
} & Omit<JSX.IntrinsicElements[TextElementTagName], 'color'>;
|
113
|
-
/**
|
114
|
-
* **💬 A text element that can be used to display text**
|
115
|
-
*
|
116
|
-
* @description
|
117
|
-
* By default, the `Text` component uses text primary color and selects the
|
118
|
-
* correct font, weight, and leading. It also choices appropriate semantic
|
119
|
-
* HTML element based on the `variant` prop. For example, `body1` will use a
|
120
|
-
* `<p>` tag, `title1` uses an `<h1>`, etc. This behavior can be overridden
|
121
|
-
* with the `as` prop.
|
122
|
-
*
|
123
|
-
*
|
124
|
-
* @example
|
125
|
-
* ```tsx
|
126
|
-
* import { Text } from '@yahoo/uds';
|
127
|
-
*
|
128
|
-
* <Text variant="body1" color="primary">
|
129
|
-
* Text goes here
|
130
|
-
* </Text>
|
131
|
-
* ```
|
132
|
-
*
|
133
|
-
* @usage
|
134
|
-
* - Use `Text` to display text in your app.
|
135
|
-
* - Use `variant` to change the size and weight of the text.
|
136
|
-
* - Use `color` to change the color of the text.
|
137
|
-
* - Use `as` to change the HTML tag used to render the text.
|
138
|
-
*
|
139
|
-
* @see The {@link http://yo/uds/docs/components/text Text Docs} for more info
|
140
|
-
*
|
141
|
-
* @related [Button](./Button.tsx) and [Pressable](./Pressable.tsx)
|
142
|
-
*/
|
143
|
-
declare const Text: react.ForwardRefExoticComponent<Omit<TextProps, "ref"> & react.RefAttributes<HTMLElement>>;
|
144
|
-
|
145
|
-
type VStackProps = UniversalStackProps & DivProps;
|
146
|
-
/**
|
147
|
-
* **🥞 A layout component that arranges its children in rows using flexbox**
|
148
|
-
*
|
149
|
-
* @description
|
150
|
-
* 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)
|
151
|
-
* and can be used to compose larger layouts. VStack is similar to [Box](./box) but provides additional features like a `gap` property to
|
152
|
-
* add spacing between children.
|
153
|
-
*
|
154
|
-
* @example
|
155
|
-
* ```tsx
|
156
|
-
* import { VStack, Text } from '@yahoo/uds';
|
157
|
-
*
|
158
|
-
* <VStack gap="6">
|
159
|
-
* <Text variant="body1" color="primary">First</Text>
|
160
|
-
* <Text variant="body1" color="primary">Second</Text>
|
161
|
-
* <Text variant="body1" color="primary">Third</Text>
|
162
|
-
* </VStack>
|
163
|
-
* ```
|
164
|
-
*
|
165
|
-
* @usage
|
166
|
-
* - Create a column of items, optionally with gaps between.
|
167
|
-
* - Create rows that are sized to their content (height only). By default each child will fill the width of the VStack.
|
168
|
-
* - Create rows that fill the available space within the parent container.
|
169
|
-
* - Create rows of proportionate size to each other (also known as a ratio-based layout).
|
170
|
-
*
|
171
|
-
* @see The {@link http://yo/uds/docs/components/v-stack VStack Docs} for more info
|
172
|
-
*
|
173
|
-
* @related [Box](./Box.tsx) and [HStack](./HStack.tsx)
|
174
|
-
**/
|
175
|
-
declare const VStack: react.ForwardRefExoticComponent<UniversalStackProps & DivProps & react.RefAttributes<HTMLDivElement>>;
|
176
|
-
|
177
|
-
export { Box as B, type DivProps as D, Icon as I, Pressable as P, Text as T, VStack as V, type BoxProps as a, type IconProps as b, type PressableProps as c, type TextProps as d, type VStackProps as e };
|
@@ -1,177 +0,0 @@
|
|
1
|
-
import * as react from 'react';
|
2
|
-
import { Ref } from 'react';
|
3
|
-
import { aY as UniversalBoxProps, a$ as UniversalIconProps, b0 as UniversalPressableProps, b2 as UniversalTextProps, g as UniversalStackProps } from './types-BofdnBTe.js';
|
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 http://yo/uds/docs/components/box Box Docs} for more info
|
30
|
-
*
|
31
|
-
* @related [HStack](./HStack.tsx) and [VStack](./VStack.tsx)
|
32
|
-
*/
|
33
|
-
declare const Box: react.ForwardRefExoticComponent<BoxProps & react.RefAttributes<HTMLDivElement>>;
|
34
|
-
|
35
|
-
type SVGElementProps = Omit<React.HTMLAttributes<SVGSVGElement>, 'color'>;
|
36
|
-
interface IconProps extends UniversalIconProps, SVGElementProps {
|
37
|
-
}
|
38
|
-
/**
|
39
|
-
* **🎨 A component for displaying icons**
|
40
|
-
*
|
41
|
-
* @description
|
42
|
-
* Icons are small symbols for actions or other items. They are available in
|
43
|
-
* three different sizes: `sm`, `md`, and `lg`. Each size also supports an
|
44
|
-
* outline and fill variant. Icons can be colored using the `color` prop.
|
45
|
-
*
|
46
|
-
* The component is available in the `@yahoo/uds` package but is meant to be used
|
47
|
-
* with the assets in `@yahoo/uds-icons`. You will need both packages to use icons.
|
48
|
-
* A separate package provides modularity from the core library, better
|
49
|
-
* versioning strategies, and tree shakeability.
|
50
|
-
*
|
51
|
-
* @example
|
52
|
-
* ```tsx
|
53
|
-
* import { Icon } from '@yahoo/uds';
|
54
|
-
* import { AddFolder } from '@yahoo/uds-icons';
|
55
|
-
*
|
56
|
-
* <Icon name={AddFolder} variant="fill" size="sm" />
|
57
|
-
* ```
|
58
|
-
*
|
59
|
-
* @usage
|
60
|
-
* - If you need to display an icon.
|
61
|
-
*
|
62
|
-
* @see The {@link http://yo/uds/docs/components/icon Icon Docs} for more info
|
63
|
-
*
|
64
|
-
* @related [IconButton](./IconButton.tsx)
|
65
|
-
*/
|
66
|
-
declare const Icon: react.ForwardRefExoticComponent<IconProps & react.RefAttributes<SVGSVGElement>>;
|
67
|
-
|
68
|
-
type HtmlButtonProps = Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'color' | 'name'>;
|
69
|
-
interface PressableProps extends UniversalPressableProps, HtmlButtonProps {
|
70
|
-
}
|
71
|
-
/**
|
72
|
-
* **🖲️ A primitive component for creating button interactions with accessibility support**
|
73
|
-
*
|
74
|
-
* @description
|
75
|
-
* The Pressable component is a primitive component that can be used
|
76
|
-
* to create button interactions with accessibility support. It can be used
|
77
|
-
* to trigger an action, such as submitting a form, navigating to a new page,
|
78
|
-
* or adding interactivity to a section or card.
|
79
|
-
*
|
80
|
-
* @example
|
81
|
-
* ```tsx
|
82
|
-
* import { Pressable } from '@yahoo/uds';
|
83
|
-
*
|
84
|
-
* <Pressable
|
85
|
-
* backgroundColor="secondary"
|
86
|
-
* borderWidth="thin"
|
87
|
-
* borderColor="primary"
|
88
|
-
* borderRadius="lg"
|
89
|
-
* onPress={() => console.log('Pressed!')}
|
90
|
-
* >
|
91
|
-
* <Text variant="body1" color="primary" spacingHorizontal="7" spacingVertical="5">Click me...</Text>
|
92
|
-
* </Pressable>
|
93
|
-
* ```
|
94
|
-
*
|
95
|
-
* @usage
|
96
|
-
* - If you need to add interactivity to a section or card.
|
97
|
-
* - If you need a highly customized version of [Button](./button)
|
98
|
-
*
|
99
|
-
* @see The {@link http://yo/uds/docs/components/pressable Pressable Docs} for more info
|
100
|
-
*
|
101
|
-
* @related [Button](./Button.tsx) and [IconButton](./IconButton.tsx)
|
102
|
-
*
|
103
|
-
*/
|
104
|
-
declare const Pressable: react.ForwardRefExoticComponent<PressableProps & react.RefAttributes<HTMLButtonElement>>;
|
105
|
-
|
106
|
-
type TextElementTagName = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'p' | 'strong' | 'span' | 'label' | 'li';
|
107
|
-
type TextProps = UniversalTextProps & {
|
108
|
-
/** Ref passed to the inner container. */
|
109
|
-
ref?: Ref<HTMLElement>;
|
110
|
-
/** Changes the HTML tag used to render text. Uses the most appropriate semantic tag based on the text style variant. */
|
111
|
-
as?: TextElementTagName;
|
112
|
-
} & Omit<JSX.IntrinsicElements[TextElementTagName], 'color'>;
|
113
|
-
/**
|
114
|
-
* **💬 A text element that can be used to display text**
|
115
|
-
*
|
116
|
-
* @description
|
117
|
-
* By default, the `Text` component uses text primary color and selects the
|
118
|
-
* correct font, weight, and leading. It also choices appropriate semantic
|
119
|
-
* HTML element based on the `variant` prop. For example, `body1` will use a
|
120
|
-
* `<p>` tag, `title1` uses an `<h1>`, etc. This behavior can be overridden
|
121
|
-
* with the `as` prop.
|
122
|
-
*
|
123
|
-
*
|
124
|
-
* @example
|
125
|
-
* ```tsx
|
126
|
-
* import { Text } from '@yahoo/uds';
|
127
|
-
*
|
128
|
-
* <Text variant="body1" color="primary">
|
129
|
-
* Text goes here
|
130
|
-
* </Text>
|
131
|
-
* ```
|
132
|
-
*
|
133
|
-
* @usage
|
134
|
-
* - Use `Text` to display text in your app.
|
135
|
-
* - Use `variant` to change the size and weight of the text.
|
136
|
-
* - Use `color` to change the color of the text.
|
137
|
-
* - Use `as` to change the HTML tag used to render the text.
|
138
|
-
*
|
139
|
-
* @see The {@link http://yo/uds/docs/components/text Text Docs} for more info
|
140
|
-
*
|
141
|
-
* @related [Button](./Button.tsx) and [Pressable](./Pressable.tsx)
|
142
|
-
*/
|
143
|
-
declare const Text: react.ForwardRefExoticComponent<Omit<TextProps, "ref"> & react.RefAttributes<HTMLElement>>;
|
144
|
-
|
145
|
-
type VStackProps = UniversalStackProps & DivProps;
|
146
|
-
/**
|
147
|
-
* **🥞 A layout component that arranges its children in rows using flexbox**
|
148
|
-
*
|
149
|
-
* @description
|
150
|
-
* 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)
|
151
|
-
* and can be used to compose larger layouts. VStack is similar to [Box](./box) but provides additional features like a `gap` property to
|
152
|
-
* add spacing between children.
|
153
|
-
*
|
154
|
-
* @example
|
155
|
-
* ```tsx
|
156
|
-
* import { VStack, Text } from '@yahoo/uds';
|
157
|
-
*
|
158
|
-
* <VStack gap="6">
|
159
|
-
* <Text variant="body1" color="primary">First</Text>
|
160
|
-
* <Text variant="body1" color="primary">Second</Text>
|
161
|
-
* <Text variant="body1" color="primary">Third</Text>
|
162
|
-
* </VStack>
|
163
|
-
* ```
|
164
|
-
*
|
165
|
-
* @usage
|
166
|
-
* - Create a column of items, optionally with gaps between.
|
167
|
-
* - Create rows that are sized to their content (height only). By default each child will fill the width of the VStack.
|
168
|
-
* - Create rows that fill the available space within the parent container.
|
169
|
-
* - Create rows of proportionate size to each other (also known as a ratio-based layout).
|
170
|
-
*
|
171
|
-
* @see The {@link http://yo/uds/docs/components/v-stack VStack Docs} for more info
|
172
|
-
*
|
173
|
-
* @related [Box](./Box.tsx) and [HStack](./HStack.tsx)
|
174
|
-
**/
|
175
|
-
declare const VStack: react.ForwardRefExoticComponent<UniversalStackProps & DivProps & react.RefAttributes<HTMLDivElement>>;
|
176
|
-
|
177
|
-
export { Box as B, type DivProps as D, Icon as I, Pressable as P, Text as T, VStack as V, type BoxProps as a, type IconProps as b, type PressableProps as c, type TextProps as d, type VStackProps as e };
|