@yahoo/uds 0.5.10 → 1.0.0-beta.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/tsconfig.json +20 -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-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-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-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-BQB5NUKC.cjs +3 -0
- package/dist/chunk-CBSKS4K5.cjs +2 -0
- package/dist/chunk-CE5ROFEK.cjs +3 -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-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-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-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-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-L7K4GFJK.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-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-OHOQVW2M.js +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-QGADB35M.js +4 -0
- package/dist/chunk-RFY7RXSM.js +3 -0
- package/dist/chunk-RL274CM3.cjs +2 -0
- package/dist/chunk-S37OVJTV.js +2 -0
- package/dist/chunk-TKOGPWM4.cjs +2 -0
- package/dist/chunk-TM36S4YW.cjs +2 -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-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-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 +94 -0
- package/dist/client/index.d.ts +94 -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-BkcFcA6N.d.cts +909 -0
- package/dist/types-BkcFcA6N.d.ts +909 -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 +207 -195
- 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/dist/index.d.cts
CHANGED
@@ -1,11 +1,41 @@
|
|
1
|
-
import { D as DivProps } from './VStack-BFIFJUVx.cjs';
|
2
|
-
export { B as Box, a as BoxProps, I as Icon, b as IconProps, P as Pressable, c as PressableProps, T as Text, d as TextProps, V as VStack, e as VStackProps } from './VStack-BFIFJUVx.cjs';
|
3
1
|
import * as react from 'react';
|
4
|
-
import { Dispatch, SetStateAction } from 'react';
|
5
|
-
import {
|
6
|
-
export { A as AlwaysPalette,
|
2
|
+
import { Ref, Dispatch, SetStateAction } from 'react';
|
3
|
+
import { p as UniversalBoxProps, q as UniversalStackProps, r as UniversalIconProps, s as UniversalImageProps, t as UniversalPressableProps, u as UniversalTextProps } from './types-JTm5E7im.cjs';
|
4
|
+
export { A as AVATAR_SIZE_PREFIX, a4 as AlwaysPalette, a5 as AlwaysPaletteAlias, a6 as Animation, a7 as AriaAttribute, a8 as AvatarShape, a9 as AvatarSize, aa as AvatarSizeConfig, x as BORDER_RADIUS_PREFIX, y as BORDER_WIDTH_PREFIX, a0 as BUTTON_CSS_VAR_MAP, ab as BackgroundColor, ac as BackgroundPalette, ad as BackgroundPaletteAlias, ae as BackgroundStyleProps, af as BorderRadius, ag as BorderRadiusConfig, ah as BorderStyleProps, ai as BorderWidth, aj as BorderWidthConfig, ak as BoxShadowConfig, al as ButtonBaseConfig, h as ButtonClassMap, am as ButtonClassName, an as ButtonColorConfig, ao as ButtonColorEffect, ap as ButtonColorEffectConfig, i as ButtonColorProperty, j as ButtonColorPropertyConfig, B as ButtonConfig, aq as ButtonKind, ar as ButtonMotionEffect, as as ButtonMotionProperty, at as ButtonMotionPropertyConfig, au as ButtonPalette, av as ButtonPaletteColor, aw as ButtonPaletteConfig, ax as ButtonSize, ay as ButtonSizeConfig, az as ButtonSizeProperty, aA as ButtonSpectrumColor, aB as ButtonState, aC as ButtonStateConfig, aD as ButtonStateEffectConfig, aE as ButtonVariant, aF as ButtonVariantConfig, C as ColorMode, aG as ColorModeConfig, aH as ColorModeForApp, a as ColorsConfig, aI as CorePalette, aJ as CorePaletteAlias, aK as CustomSizingStyleProps, N as DARK_COLOR_MODE_CLASSNAME, _ as DEFAULT_COLOR_MODE_CLASSNAME, $ as DEFAULT_SCALE_MODE_CLASSNAME, aL as DataAttribute, aM as Display, a3 as FONT_DECLARATIONS_MAP, z as FONT_FAMILY_PREFIX, D as FONT_SIZE_PREFIX, E as FONT_WEIGHT_PREFIX, aN as Flex, aO as FlexAlignContent, aP as FlexAlignItems, aQ as FlexAlignSelf, aR as FlexBasis, aS as FlexDirection, aT as FlexGrow, aU as FlexJustifyContent, aV as FlexShrink, aW as FlexStyleProps, aX as FlexWrap, aY as FontAlias, m as FontConfig, aZ as FontCssVar, l as FontDeclarationConfig, a_ as FontFamilyCDNUrl, a$ as FontFamilyConfig, k as FontID, b0 as FontSize, b1 as FontSizeConfig, b2 as FontType, F as FontWeightConfig, b3 as FontWeightDescriptive, d as FontWeightNumeric, b4 as ForegroundColor, b5 as ForegroundPalette, b6 as ForegroundPaletteAlias, b7 as HighContrastMode, H as Hue, b as HueStep, a1 as ICON_BUTTON_CSS_VAR_MAP, G as ICON_SIZE_PREFIX, I as IconButtonClassMap, b8 as IconButtonClassName, b9 as IconButtonConfig, ba as IconButtonDefaultsConfig, bb as IconButtonSize, bc as IconSize, bd as IconSizeConfig, be as IconVariant, bf as ImageStyleProps, V as LARGE_SCALE_MODE_CLASSNAME, O as LIGHT_COLOR_MODE_CLASSNAME, L as LINE_HEIGHT_PREFIX, bg as LayoutStyleProps, bh as LetterSpacing, bi as LineClampAlias, bj as LineColor, bk as LineHeight, bl as LineHeightConfig, bm as LinePalette, bn as LinePaletteAlias, R as MEDIUM_SCALE_MODE_CLASSNAME, J as MOTION_PREFIX, bo as Modes, o as MotionConfig, bp as MotionCssVar, bq as MotionSpringConfig, n as MotionSpringConfigOptions, M as MotionVariant, g as MotionVariantSpeed, br as MotionVariantValues, bs as Overflow, a2 as PSEUDO_STYLE_SELECTOR_MAP, bt as Palette, c as PaletteConfig, P as PaletteType, bu as PaletteValue, bv as PlatformMode, bw as Position, bx as PropertyToPaletteAliasMap, by as RegionMode, Q as SMALL_SCALE_MODE_CLASSNAME, K as SPECTRUM_COLOR_PREFIX, bz as ScaleConfig, bA as ScaleEffectMap, S as ScaleMode, bB as ScaleModeConfig, bC as ScaleModeForApp, bD as SpacingAlias, bE as SpacingConfig, bF as SpacingStyleProps, bG as SpectrumColor, bH as SpectrumConfig, bI as StateStyleProps, bJ as StyleProps, T as TEXT_TRANSFORM_PREFIX, bS as TShirtSize, bT as TShirtSizeCommon, bK as TextProperty, bL as TextStyleProps, bM as TextTransform, bN as TextTransformConfig, bO as TextVariant, bP as TransitionDelay, bQ as TransitionDuration, bR as TransitionTiming, w as UDS_PREFIX, bU as UdsCssVar, bV as UniversalAvatarProps, e as UniversalButtonProps, f as UniversalIconButtonProps, bW as UniversalTextInputProps, U as UniversalTokensConfig, W as XLARGE_SCALE_MODE_CLASSNAME, X as XSMALL_SCALE_MODE_CLASSNAME, Y as XXLARGE_SCALE_MODE_CLASSNAME, Z as XXXLARGE_SCALE_MODE_CLASSNAME, v as alwaysPalette } from './types-JTm5E7im.cjs';
|
7
5
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
8
|
-
export {
|
6
|
+
export { Button, ButtonProps, IconButton, IconButtonProps, SpringMotionConfig, SpringMotionConfigProps } from '@yahoo/uds/client';
|
7
|
+
export { Combination, CombinationsConfig, DEFAULT_COLOR_MODE, DEFAULT_COLOR_MODE_FOR_APP, DEFAULT_HIGH_CONTRAST_MODE, DEFAULT_REGION_MODE, DEFAULT_SCALE_MODE, DEFAULT_SCALE_MODE_FOR_APP, button, defaultTokensConfig, entries, fontWeightMap, fromEntries, generateConfigCombinations, getDefaultButtonBaseMap, mapValues, variants } from './tokens/index.cjs';
|
8
|
+
import 'framer-motion';
|
9
|
+
|
10
|
+
type DivProps = React.HTMLAttributes<HTMLDivElement>;
|
11
|
+
interface BoxProps extends UniversalBoxProps, DivProps {
|
12
|
+
}
|
13
|
+
/**
|
14
|
+
* **📦 A layout component that can be used to compose other components**
|
15
|
+
*
|
16
|
+
* @description
|
17
|
+
* The most simple component we ship - a div. But with all the power of the UDS design system.
|
18
|
+
* By default, `Box` is a flexbox container. When working with vertical or horizontal layouts,
|
19
|
+
* consider using [VStack](./v-stack) or [HStack](./h-stack) respectively.
|
20
|
+
*
|
21
|
+
* @example
|
22
|
+
* ```tsx
|
23
|
+
* import { Box } from '@yahoo/uds';
|
24
|
+
*
|
25
|
+
* <Box backgroundColor="primary" spacing="6">
|
26
|
+
* Any kind of content can go here!
|
27
|
+
* </Box>
|
28
|
+
* ```
|
29
|
+
*
|
30
|
+
* @usage
|
31
|
+
* - If you need to div-like container to apply padding, shapes, or other styling.
|
32
|
+
* - If you're creating card components.
|
33
|
+
*
|
34
|
+
* @see The {@link http://yo/uds/docs/components/box Box Docs} for more info
|
35
|
+
*
|
36
|
+
* @related [HStack](http://yo/uds/docs/components/h-stack), [VStack](http://yo/uds/docs/components/v-stack)
|
37
|
+
*/
|
38
|
+
declare const Box: react.ForwardRefExoticComponent<BoxProps & react.RefAttributes<HTMLDivElement>>;
|
9
39
|
|
10
40
|
interface HStackProps extends UniversalStackProps, DivProps {
|
11
41
|
}
|
@@ -36,10 +66,44 @@ interface HStackProps extends UniversalStackProps, DivProps {
|
|
36
66
|
*
|
37
67
|
* @see The {@link http://yo/uds/docs/components/h-stack HStack Docs} for more info
|
38
68
|
*
|
39
|
-
* @related [Box](
|
69
|
+
* @related [Box](http://yo/uds/docs/components/box), [VStack](http://yo/uds/docs/components/v-stack)
|
40
70
|
**/
|
41
71
|
declare const HStack: react.ForwardRefExoticComponent<HStackProps & react.RefAttributes<HTMLDivElement>>;
|
42
72
|
|
73
|
+
type SVGElementProps = Omit<React.HTMLAttributes<SVGSVGElement>, 'color'>;
|
74
|
+
interface IconProps extends UniversalIconProps, SVGElementProps {
|
75
|
+
}
|
76
|
+
/**
|
77
|
+
* **🎨 A component for displaying icons**
|
78
|
+
*
|
79
|
+
* @description
|
80
|
+
* [Iconography](http://yo/uds/docs/core-concepts/icons) contains small symbols for actions or
|
81
|
+
* other items. They are available in three different sizes: `sm`, `md`, and
|
82
|
+
* `lg`. Each size also supports an outline and fill variant. Icons can be
|
83
|
+
* colored using the `color` prop.
|
84
|
+
*
|
85
|
+
* The component is available in the `@yahoo/uds` package but is meant to be used
|
86
|
+
* with the assets in `@yahoo/uds-icons`. You will need both packages to use icons.
|
87
|
+
* A separate package provides modularity from the core library, better
|
88
|
+
* versioning strategies, and tree shakeability.
|
89
|
+
*
|
90
|
+
* @example
|
91
|
+
* ```tsx
|
92
|
+
* import { Icon } from '@yahoo/uds';
|
93
|
+
* import { AddFolder } from '@yahoo/uds-icons';
|
94
|
+
*
|
95
|
+
* <Icon name={AddFolder} variant="fill" size="sm" />
|
96
|
+
* ```
|
97
|
+
*
|
98
|
+
* @usage
|
99
|
+
* - If you need to display an icon.
|
100
|
+
*
|
101
|
+
* @see The {@link http://yo/uds/docs/components/icon Icon Docs} for more info
|
102
|
+
*
|
103
|
+
* @related [IconButton](http://yo/uds/docs/components/icon-button)
|
104
|
+
*/
|
105
|
+
declare const Icon: react.ForwardRefExoticComponent<IconProps & react.RefAttributes<SVGSVGElement>>;
|
106
|
+
|
43
107
|
type NativeImageProps = Omit<React.ImgHTMLAttributes<HTMLImageElement>, 'size' | 'color' | 'height' | 'width' | 'alt' | 'src'>;
|
44
108
|
interface ImageProps extends NativeImageProps, UniversalImageProps {
|
45
109
|
}
|
@@ -64,10 +128,119 @@ interface ImageProps extends NativeImageProps, UniversalImageProps {
|
|
64
128
|
*
|
65
129
|
* @see The {@link http://yo/uds/docs/components/image Image Docs} for more info
|
66
130
|
*
|
67
|
-
* @related [Box](
|
131
|
+
* @related [Box](http://yo/uds/docs/components/box)
|
68
132
|
*/
|
69
133
|
declare function Image({ width: imageWidth, height: imageHeight, src, alt, contentFit, backgroundColor, borderRadius, borderTopStartRadius, borderTopEndRadius, borderBottomStartRadius, borderBottomEndRadius, borderColor, borderStartColor, borderEndColor, borderTopColor, borderBottomColor, borderWidth, borderVerticalWidth, borderHorizontalWidth, borderStartWidth, borderEndWidth, borderTopWidth, borderBottomWidth, alignContent, alignItems, alignSelf, flex, flexDirection, flexGrow, flexShrink, flexWrap, justifyContent, flexBasis, display, overflow, overflowX, overflowY, position, spacing, spacingHorizontal, spacingVertical, spacingBottom, spacingEnd, spacingStart, spacingTop, offset, offsetVertical, offsetHorizontal, offsetBottom, offsetEnd, offsetStart, offsetTop, columnGap, rowGap, ...props }: ImageProps): react_jsx_runtime.JSX.Element;
|
70
134
|
|
135
|
+
type HtmlButtonProps = Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'color' | 'name'>;
|
136
|
+
interface PressableProps extends UniversalPressableProps, HtmlButtonProps {
|
137
|
+
}
|
138
|
+
/**
|
139
|
+
* **🖲️ A primitive component for creating button interactions with accessibility support**
|
140
|
+
*
|
141
|
+
* @description
|
142
|
+
* The Pressable component is a primitive component that can be used
|
143
|
+
* to create button interactions with accessibility support. It can be used
|
144
|
+
* to trigger an action, such as submitting a form, navigating to a new page,
|
145
|
+
* or adding interactivity to a section or card.
|
146
|
+
*
|
147
|
+
* @example
|
148
|
+
* ```tsx
|
149
|
+
* import { Pressable } from '@yahoo/uds';
|
150
|
+
*
|
151
|
+
* <Pressable
|
152
|
+
* backgroundColor="secondary"
|
153
|
+
* borderWidth="thin"
|
154
|
+
* borderColor="primary"
|
155
|
+
* borderRadius="lg"
|
156
|
+
* onPress={() => console.log('Pressed!')}
|
157
|
+
* >
|
158
|
+
* <Text variant="body1" color="primary" spacingHorizontal="7" spacingVertical="5">Click me...</Text>
|
159
|
+
* </Pressable>
|
160
|
+
* ```
|
161
|
+
*
|
162
|
+
* @usage
|
163
|
+
* - If you need to add interactivity to a section or card.
|
164
|
+
* - If you need a highly customized version of [Button](./button)
|
165
|
+
*
|
166
|
+
* @see The {@link http://yo/uds/docs/components/pressable Pressable Docs} for more info
|
167
|
+
*
|
168
|
+
* @related [Button](http://yo/uds/docs/components/button), [IconButton](http://yo/uds/docs/components/icon-button)
|
169
|
+
*
|
170
|
+
*/
|
171
|
+
declare const Pressable: react.ForwardRefExoticComponent<PressableProps & react.RefAttributes<HTMLButtonElement>>;
|
172
|
+
|
173
|
+
type TextElementTagName = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'p' | 'strong' | 'span' | 'label' | 'li';
|
174
|
+
type TextProps = UniversalTextProps & {
|
175
|
+
/** Ref passed to the inner container. */
|
176
|
+
ref?: Ref<HTMLElement>;
|
177
|
+
/** Changes the HTML tag used to render text. Uses the most appropriate semantic tag based on the text style variant. */
|
178
|
+
as?: TextElementTagName;
|
179
|
+
} & Omit<JSX.IntrinsicElements[TextElementTagName], 'color'>;
|
180
|
+
/**
|
181
|
+
* **💬 A text element that can be used to display text**
|
182
|
+
*
|
183
|
+
* @description
|
184
|
+
* By default, the `Text` component uses text primary color and selects the
|
185
|
+
* correct font, weight, and leading. It also choices appropriate semantic
|
186
|
+
* HTML element based on the `variant` prop. For example, `body1` will use a
|
187
|
+
* `<p>` tag, `title1` uses an `<h1>`, etc. This behavior can be overridden
|
188
|
+
* with the `as` prop.
|
189
|
+
*
|
190
|
+
*
|
191
|
+
* @example
|
192
|
+
* ```tsx
|
193
|
+
* import { Text } from '@yahoo/uds';
|
194
|
+
*
|
195
|
+
* <Text variant="body1" color="primary">
|
196
|
+
* Text goes here
|
197
|
+
* </Text>
|
198
|
+
* ```
|
199
|
+
*
|
200
|
+
* @usage
|
201
|
+
* - Use `Text` to display text in your app.
|
202
|
+
* - Use `variant` to change the size and weight of the text.
|
203
|
+
* - Use `color` to change the color of the text.
|
204
|
+
* - Use `as` to change the HTML tag used to render the text.
|
205
|
+
*
|
206
|
+
* @see The {@link http://yo/uds/docs/components/text Text Docs} for more info
|
207
|
+
*
|
208
|
+
* @related [Button](http://yo/uds/docs/components/button) and [Pressable](http://yo/uds/docs/components/pressable)
|
209
|
+
*/
|
210
|
+
declare const Text: react.ForwardRefExoticComponent<Omit<TextProps, "ref"> & react.RefAttributes<HTMLElement>>;
|
211
|
+
|
212
|
+
type VStackProps = UniversalStackProps & DivProps;
|
213
|
+
/**
|
214
|
+
* **🥞 A layout component that arranges its children in rows using flexbox**
|
215
|
+
*
|
216
|
+
* @description
|
217
|
+
* 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)
|
218
|
+
* and can be used to compose larger layouts. VStack is similar to [Box](./box) but provides additional features like a `gap` property to
|
219
|
+
* add spacing between children.
|
220
|
+
*
|
221
|
+
* @example
|
222
|
+
* ```tsx
|
223
|
+
* import { VStack, Text } from '@yahoo/uds';
|
224
|
+
*
|
225
|
+
* <VStack gap="6">
|
226
|
+
* <Text variant="body1" color="primary">First</Text>
|
227
|
+
* <Text variant="body1" color="primary">Second</Text>
|
228
|
+
* <Text variant="body1" color="primary">Third</Text>
|
229
|
+
* </VStack>
|
230
|
+
* ```
|
231
|
+
*
|
232
|
+
* @usage
|
233
|
+
* - Create a column of items, optionally with gaps between.
|
234
|
+
* - Create rows that are sized to their content (height only). By default each child will fill the width of the VStack.
|
235
|
+
* - Create rows that fill the available space within the parent container.
|
236
|
+
* - Create rows of proportionate size to each other (also known as a ratio-based layout).
|
237
|
+
*
|
238
|
+
* @see The {@link http://yo/uds/docs/components/v-stack VStack Docs} for more info
|
239
|
+
*
|
240
|
+
* @related [Box](http://yo/uds/docs/components/box), [HStack](http://yo/uds/docs/components/h-stack)
|
241
|
+
**/
|
242
|
+
declare const VStack: react.ForwardRefExoticComponent<UniversalStackProps & DivProps & react.RefAttributes<HTMLDivElement>>;
|
243
|
+
|
71
244
|
type StringToBoolean<T> = T extends 'true' | 'false' ? boolean : T;
|
72
245
|
type CvaStyleValue<T> = T | CvaStyleArray<T> | Record<string, unknown> | null | boolean | undefined;
|
73
246
|
type CvaStyleArray<T> = CvaStyleValue<T>[];
|
@@ -104,13 +277,13 @@ interface CX<T> {
|
|
104
277
|
declare const cx: CX<string>;
|
105
278
|
declare const cva: CVA<string>;
|
106
279
|
declare const getStyles: (props?: ({
|
107
|
-
color?: "
|
108
|
-
placeholderColor?: "
|
109
|
-
fontFamily?: "
|
280
|
+
color?: "brand" | "accent" | "alert" | "positive" | "warning" | "primary" | "secondary" | "tertiary" | "muted" | "on-color" | "transparent" | "white" | "black" | "current" | undefined;
|
281
|
+
placeholderColor?: "brand" | "accent" | "alert" | "positive" | "warning" | "primary" | "secondary" | "tertiary" | "muted" | "on-color" | "transparent" | "white" | "black" | "current" | undefined;
|
282
|
+
fontFamily?: "serif" | "sans" | "mono" | "display1" | "display2" | "display3" | "title1" | "title2" | "title3" | "title4" | "headline1" | "body1" | "label1" | "label2" | "caption1" | "caption2" | "legal1" | "sans-alt" | "serif-alt" | undefined;
|
110
283
|
fontSize?: "display1" | "display2" | "display3" | "title1" | "title2" | "title3" | "title4" | "headline1" | "body1" | "label1" | "label2" | "caption1" | "caption2" | "legal1" | undefined;
|
111
284
|
fontWeight?: "black" | "display1" | "display2" | "display3" | "title1" | "title2" | "title3" | "title4" | "headline1" | "body1" | "label1" | "label2" | "caption1" | "caption2" | "legal1" | "thin" | "extralight" | "light" | "regular" | "medium" | "semibold" | "bold" | "extrabold" | undefined;
|
112
285
|
lineHeight?: "display1" | "display2" | "display3" | "title1" | "title2" | "title3" | "title4" | "headline1" | "body1" | "label1" | "label2" | "caption1" | "caption2" | "legal1" | undefined;
|
113
|
-
textAlign?: "center" | "
|
286
|
+
textAlign?: "center" | "end" | "start" | "justify" | undefined;
|
114
287
|
textTransform?: "display1" | "display2" | "display3" | "title1" | "title2" | "title3" | "title4" | "headline1" | "body1" | "label1" | "label2" | "caption1" | "caption2" | "legal1" | "none" | "uppercase" | "lowercase" | "capitalize" | undefined;
|
115
288
|
spacing?: "9" | "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "10" | "11" | "12" | "14" | "px" | "0.5" | "1.5" | "2.5" | "3.5" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "72" | "80" | "96" | undefined;
|
116
289
|
spacingHorizontal?: "9" | "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "10" | "11" | "12" | "14" | "px" | "0.5" | "1.5" | "2.5" | "3.5" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "72" | "80" | "96" | undefined;
|
@@ -128,12 +301,12 @@ declare const getStyles: (props?: ({
|
|
128
301
|
offsetTop?: "9" | "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "10" | "11" | "12" | "14" | "px" | "0.5" | "1.5" | "2.5" | "3.5" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "72" | "80" | "96" | undefined;
|
129
302
|
columnGap?: "9" | "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "10" | "11" | "12" | "14" | "px" | "0.5" | "1.5" | "2.5" | "3.5" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "72" | "80" | "96" | undefined;
|
130
303
|
rowGap?: "9" | "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "10" | "11" | "12" | "14" | "px" | "0.5" | "1.5" | "2.5" | "3.5" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "72" | "80" | "96" | undefined;
|
131
|
-
backgroundColor?: "
|
132
|
-
borderColor?: "
|
133
|
-
borderStartColor?: "
|
134
|
-
borderEndColor?: "
|
135
|
-
borderBottomColor?: "
|
136
|
-
borderTopColor?: "
|
304
|
+
backgroundColor?: "brand" | "accent" | "alert" | "positive" | "warning" | "primary" | "secondary" | "transparent" | "white" | "black" | "current" | undefined;
|
305
|
+
borderColor?: "brand" | "accent" | "alert" | "positive" | "warning" | "primary" | "secondary" | "tertiary" | "muted" | "transparent" | "white" | "black" | "current" | undefined;
|
306
|
+
borderStartColor?: "brand" | "accent" | "alert" | "positive" | "warning" | "primary" | "secondary" | "tertiary" | "muted" | "transparent" | "white" | "black" | "current" | undefined;
|
307
|
+
borderEndColor?: "brand" | "accent" | "alert" | "positive" | "warning" | "primary" | "secondary" | "tertiary" | "muted" | "transparent" | "white" | "black" | "current" | undefined;
|
308
|
+
borderBottomColor?: "brand" | "accent" | "alert" | "positive" | "warning" | "primary" | "secondary" | "tertiary" | "muted" | "transparent" | "white" | "black" | "current" | undefined;
|
309
|
+
borderTopColor?: "brand" | "accent" | "alert" | "positive" | "warning" | "primary" | "secondary" | "tertiary" | "muted" | "transparent" | "white" | "black" | "current" | undefined;
|
137
310
|
borderRadius?: "none" | "xs" | "sm" | "md" | "lg" | "xl" | "full" | undefined;
|
138
311
|
borderTopStartRadius?: "none" | "xs" | "sm" | "md" | "lg" | "xl" | "full" | undefined;
|
139
312
|
borderTopEndRadius?: "none" | "xs" | "sm" | "md" | "lg" | "xl" | "full" | undefined;
|
@@ -148,17 +321,17 @@ declare const getStyles: (props?: ({
|
|
148
321
|
borderBottomWidth?: "thin" | "medium" | "none" | "thick" | undefined;
|
149
322
|
avatarSize?: "sm" | "md" | "lg" | undefined;
|
150
323
|
iconSize?: "sm" | "md" | "lg" | undefined;
|
151
|
-
alignContent?: "
|
152
|
-
alignItems?: "
|
153
|
-
alignSelf?: "
|
154
|
-
flex?: "1" | "none" | "
|
324
|
+
alignContent?: "center" | "flex-end" | "flex-start" | "stretch" | "space-between" | "space-around" | undefined;
|
325
|
+
alignItems?: "center" | "flex-end" | "flex-start" | "baseline" | "stretch" | undefined;
|
326
|
+
alignSelf?: "center" | "flex-end" | "flex-start" | "baseline" | "stretch" | "auto" | undefined;
|
327
|
+
flex?: "1" | "none" | "initial" | "auto" | undefined;
|
155
328
|
flexDirection?: "row" | "column" | "row-reverse" | "column-reverse" | undefined;
|
156
329
|
flexGrow?: "0" | "1" | "2" | "3" | undefined;
|
157
330
|
flexShrink?: "0" | "1" | undefined;
|
158
|
-
flexWrap?: "
|
159
|
-
justifyContent?: "
|
331
|
+
flexWrap?: "nowrap" | "wrap" | "wrap-reverse" | undefined;
|
332
|
+
justifyContent?: "center" | "flex-end" | "flex-start" | "space-between" | "space-around" | "space-evenly" | undefined;
|
160
333
|
flexBasis?: "min-content" | undefined;
|
161
|
-
display?: "block" | "inline
|
334
|
+
display?: "block" | "inline" | "flex" | "flow-root" | "grid" | "table" | "table-caption" | "table-cell" | "table-column" | "table-column-group" | "table-footer-group" | "table-header-group" | "table-row" | "table-row-group" | "inline-block" | "inline-flex" | "inline-table" | "contents" | undefined;
|
162
335
|
overflow?: "hidden" | "auto" | "clip" | "visible" | "scroll" | undefined;
|
163
336
|
overflowX?: "hidden" | "auto" | "clip" | "visible" | "scroll" | undefined;
|
164
337
|
overflowY?: "hidden" | "auto" | "clip" | "visible" | "scroll" | undefined;
|
@@ -166,13 +339,14 @@ declare const getStyles: (props?: ({
|
|
166
339
|
contentFit?: "none" | "fill" | "cover" | "contain" | "scale-down" | undefined;
|
167
340
|
colorMode?: "light" | "dark" | undefined;
|
168
341
|
scaleMode?: "medium" | "xSmall" | "small" | "large" | "xLarge" | "xxLarge" | "xxxLarge" | undefined;
|
169
|
-
|
342
|
+
buttonPalette?: "brand" | "accent" | "alert" | "positive" | "warning" | undefined;
|
170
343
|
buttonVariant?: "primary" | "secondary" | "tertiary" | undefined;
|
171
344
|
buttonSize?: "sm" | "md" | "lg" | undefined;
|
345
|
+
iconButtonSize?: "xs" | "sm" | "md" | "lg" | "xl" | undefined;
|
172
346
|
} & {
|
173
347
|
className?: string | undefined;
|
174
348
|
}) | undefined) => string;
|
175
349
|
|
176
350
|
type SetState<T> = Dispatch<SetStateAction<T>>;
|
177
351
|
|
178
|
-
export { HStack, type HStackProps, Image, type ImageProps, type SetState, UniversalImageProps, UniversalStackProps, cva, cx, getStyles };
|
352
|
+
export { Box, type BoxProps, HStack, type HStackProps, Icon, type IconProps, Image, type ImageProps, Pressable, type PressableProps, type SetState, Text, type TextProps, UniversalBoxProps, UniversalIconProps, UniversalImageProps, UniversalPressableProps, UniversalStackProps, UniversalTextProps, VStack, type VStackProps, cva, cx, getStyles };
|