@yahoo/uds 2.0.0 → 2.1.1
Sign up to get free protection for your applications and to get access to all the features.
- package/cli/README.md +50 -0
- package/cli/bin/uds-darwin-arm64-baseline +0 -0
- package/cli/bin/uds-linux-arm64 +0 -0
- package/cli/bin/uds-linux-x64-baseline +0 -0
- package/cli/cli.ts +21 -4
- package/cli/commands/codemod/codemod.ts +12 -9
- package/cli/commands/codemod/sizingProps.ts +1 -1
- package/cli/commands/login.ts +30 -0
- package/cli/commands/logout.ts +27 -0
- package/cli/commands/purge.ts +3 -1
- package/cli/commands/sync.ts +2 -0
- package/cli/commands/uds.ts +6 -1
- package/cli/commands/version.ts +2 -0
- package/cli/compile.ts +8 -9
- package/cli/consts.ts +5 -1
- package/cli/env.d.ts +5 -0
- package/cli/exec.ts +1 -1
- package/cli/preload.ts +17 -0
- package/cli/tsconfig.json +4 -4
- package/cli/uds-cli +6 -2
- package/cli/utils/analytics.ts +26 -0
- package/cli/utils/auth.ts +338 -0
- package/cli/utils/client_secrets.json +23 -0
- package/cli/utils/client_secrets.json.enc +0 -0
- package/cli/utils/configWorker.ts +3 -2
- package/cli/utils/getDirChoices.ts +0 -1
- package/cli/utils/secrets.ts +40 -0
- package/dist/analytics/server.cjs +1 -0
- package/dist/analytics/server.d.cts +1 -0
- package/dist/analytics/server.d.ts +1 -0
- package/dist/analytics/server.js +1 -0
- package/dist/chunk-3PK6DOFO.js +3 -0
- package/dist/chunk-5WBROFT5.cjs +1 -0
- package/dist/chunk-DCXVARRB.cjs +1 -0
- package/dist/chunk-DMMTEAJW.cjs +2 -0
- package/dist/chunk-EYFQOFYW.cjs +1 -0
- package/dist/chunk-FWF2C6TL.cjs +1 -0
- package/dist/chunk-GIJ2FHY5.cjs +1 -0
- package/dist/chunk-IUL5ZI4O.js +2 -0
- package/dist/chunk-JGIKFUBH.cjs +2 -0
- package/dist/chunk-P5B5IOMM.js +2 -0
- package/dist/chunk-PE2P7J44.js +2 -0
- package/dist/chunk-PFT3UA6K.cjs +2 -0
- package/dist/chunk-SUASN3GG.js +2 -0
- package/dist/chunk-VPR62GYQ.js +2 -0
- package/dist/chunk-X6F5UEQ5.js +2 -0
- package/dist/chunk-YM5TKITI.js +2 -0
- package/dist/chunk-YUHY3FXT.cjs +1 -0
- package/dist/chunk-ZV62SW5G.js +1 -0
- package/dist/client/index.cjs +3 -0
- package/dist/client/index.d.cts +97 -0
- package/dist/client/index.d.ts +97 -0
- package/dist/client/index.js +4 -0
- package/dist/experimental/index.cjs +2 -0
- package/dist/experimental/index.d.cts +469 -0
- package/dist/experimental/index.d.ts +469 -0
- package/dist/experimental/index.js +2 -0
- package/dist/fixtures.cjs +1506 -0
- package/dist/fixtures.d.cts +94 -0
- package/dist/fixtures.d.ts +94 -0
- package/dist/fixtures.js +1449 -0
- package/dist/flags.cjs +1 -0
- package/dist/flags.d.cts +17 -0
- package/dist/flags.d.ts +17 -0
- package/dist/flags.js +2 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.cts +385 -0
- package/dist/index.d.ts +385 -0
- package/dist/index.js +1 -0
- package/dist/metafile-cjs.json +1 -0
- package/dist/metafile-esm.json +1 -0
- package/dist/motionFeatures-I76FFCTS.js +1 -0
- package/dist/motionFeatures-P3FQL2KP.cjs +1 -0
- package/dist/styles/toast.css +1 -0
- package/dist/styles/toast.d.cts +2 -0
- package/dist/styles/toast.d.ts +2 -0
- package/dist/tailwind/plugin.cjs +2 -0
- package/dist/tailwind/plugin.d.cts +60 -0
- package/dist/tailwind/plugin.d.ts +60 -0
- package/dist/tailwind/plugin.js +2 -0
- package/dist/tailwind/purger.cjs +5 -0
- package/dist/tailwind/purger.d.cts +17 -0
- package/dist/tailwind/purger.d.ts +17 -0
- package/dist/tailwind/purger.js +6 -0
- package/dist/tailwind/tsMorph.cjs +1 -0
- package/dist/tailwind/tsMorph.d.cts +31 -0
- package/dist/tailwind/tsMorph.d.ts +31 -0
- package/dist/tailwind/tsMorph.js +1 -0
- package/dist/tailwind/utils.cjs +1 -0
- package/dist/tailwind/utils.d.cts +99 -0
- package/dist/tailwind/utils.d.ts +99 -0
- package/dist/tailwind/utils.js +1 -0
- package/dist/tokens/index.cjs +1 -0
- package/dist/tokens/index.d.cts +1127 -0
- package/dist/tokens/index.d.ts +1127 -0
- package/dist/tokens/index.js +1 -0
- package/dist/tokens/parseTokens.cjs +1 -0
- package/dist/tokens/parseTokens.d.cts +59 -0
- package/dist/tokens/parseTokens.d.ts +59 -0
- package/dist/tokens/parseTokens.js +1 -0
- package/dist/types-Pyccco5Q.d.cts +949 -0
- package/dist/types-Pyccco5Q.d.ts +949 -0
- package/fonts/mobile.cjs +1 -1
- package/package.json +49 -22
- package/cli/codemods/propsToClass.test.tsx +0 -97
- package/cli/utils/purgeCSS.test.ts +0 -210
package/dist/flags.cjs
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";/*! © 2025 Yahoo, Inc. UDS v0.0.0-development */var e={useGetStylesCache:!!("undefined"!=typeof process)&&"true"===process.env.NEXT_PUBLIC_UDS_FEATURE_USE_STYLE_CACHE};exports.getFeatureFlags=()=>e,exports.updateFeatureFlags=s=>e={...e,...s};
|
package/dist/flags.d.cts
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
interface FeatureFlags {
|
2
|
+
/**
|
3
|
+
* Setting to true enables a specialized cache for calls to getStyle(),
|
4
|
+
* which can improve performance of component render times.
|
5
|
+
* @default false
|
6
|
+
**/
|
7
|
+
useGetStylesCache?: boolean;
|
8
|
+
}
|
9
|
+
/**
|
10
|
+
* Sets/overrides feature flags
|
11
|
+
* @param flags Flag overrides
|
12
|
+
* @returns Updated feature flags
|
13
|
+
*/
|
14
|
+
declare const updateFeatureFlags: (flags: Partial<FeatureFlags>) => FeatureFlags;
|
15
|
+
declare const getFeatureFlags: () => FeatureFlags;
|
16
|
+
|
17
|
+
export { type FeatureFlags, getFeatureFlags, updateFeatureFlags };
|
package/dist/flags.d.ts
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
interface FeatureFlags {
|
2
|
+
/**
|
3
|
+
* Setting to true enables a specialized cache for calls to getStyle(),
|
4
|
+
* which can improve performance of component render times.
|
5
|
+
* @default false
|
6
|
+
**/
|
7
|
+
useGetStylesCache?: boolean;
|
8
|
+
}
|
9
|
+
/**
|
10
|
+
* Sets/overrides feature flags
|
11
|
+
* @param flags Flag overrides
|
12
|
+
* @returns Updated feature flags
|
13
|
+
*/
|
14
|
+
declare const updateFeatureFlags: (flags: Partial<FeatureFlags>) => FeatureFlags;
|
15
|
+
declare const getFeatureFlags: () => FeatureFlags;
|
16
|
+
|
17
|
+
export { type FeatureFlags, getFeatureFlags, updateFeatureFlags };
|
package/dist/flags.js
ADDED
package/dist/index.cjs
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";var e=require("./chunk-JGIKFUBH.cjs"),r=require("./chunk-DMMTEAJW.cjs"),t=require("./chunk-DCXVARRB.cjs"),o=require("./chunk-GIJ2FHY5.cjs"),n=require("./chunk-5WBROFT5.cjs"),i=require("react"),a=require("react/jsx-runtime"),d=require("@yahoo/uds/client"),f=e.createSlot(),l=i.forwardRef((function({asChild:r,className:t,backgroundColor:o,borderRadius:n,borderTopStartRadius:i,borderTopEndRadius:d,borderBottomStartRadius:l,borderBottomEndRadius:s,borderColor:p,borderStartColor:c,borderEndColor:u,borderTopColor:b,borderBottomColor:E,borderWidth:S,borderVerticalWidth:g,borderHorizontalWidth:_,borderStartWidth:O,borderEndWidth:C,borderTopWidth:m,borderBottomWidth:A,alignContent:R,alignItems:x,alignSelf:T,flex:P,flexDirection:L,flexGrow:h,flexShrink:M,flexWrap:y,justifyContent:D,flexBasis:B,display:W="flex",overflow:I,overflowX:j,overflowY:F,position:N,spacing:w,spacingHorizontal:X,spacingVertical:G,spacingBottom:H,spacingEnd:V,spacingStart:v,spacingTop:U,offset:k,offsetVertical:z,offsetHorizontal:Y,offsetBottom:q,offsetEnd:Z,offsetStart:J,offsetTop:K,columnGap:Q,rowGap:$,...ee},re){const te=e.getStyles({backgroundColor:o,borderRadius:n,borderTopStartRadius:i,borderTopEndRadius:d,borderBottomStartRadius:l,borderBottomEndRadius:s,borderColor:p,borderStartColor:c,borderEndColor:u,borderTopColor:b,borderBottomColor:E,borderWidth:S,borderVerticalWidth:g,borderHorizontalWidth:_,borderStartWidth:O,borderEndWidth:C,borderTopWidth:m,borderBottomWidth:A,alignContent:R,alignItems:x,alignSelf:T,flex:P,flexDirection:L,flexGrow:h,flexShrink:M,flexWrap:y,justifyContent:D,flexBasis:B,display:W,overflow:I,overflowX:j,overflowY:F,position:N,spacing:w,spacingHorizontal:X,spacingVertical:G,spacingBottom:H,spacingEnd:V,spacingStart:v,spacingTop:U,offset:k,offsetVertical:z,offsetHorizontal:Y,offsetBottom:q,offsetEnd:Z,offsetStart:J,offsetTop:K,columnGap:Q,rowGap:$,className:t}),oe=r?f:"div";return a.jsx(oe,{className:te,ref:re,...ee})})),s=i.forwardRef((function({gap:e,...r},t){return a.jsx(l,{ref:t,flexDirection:"row",rowGap:e,columnGap:e,...r})}));/*! © 2025 Yahoo, Inc. UDS v0.0.0-development */var p=e.createSlot(),c=i.forwardRef((function({className:r,asChild:t,onPress:o,onClick:n=o,backgroundColor:i,borderRadius:d,borderTopStartRadius:f,borderTopEndRadius:l,borderBottomStartRadius:s,borderBottomEndRadius:c,borderColor:u,borderStartColor:b,borderEndColor:E,borderTopColor:S,borderBottomColor:g,borderWidth:_,borderVerticalWidth:O,borderHorizontalWidth:C,borderStartWidth:m,borderEndWidth:A,borderTopWidth:R,borderBottomWidth:x,alignContent:T,alignItems:P,alignSelf:L,flex:h,flexDirection:M,flexGrow:y,flexShrink:D,flexWrap:B,justifyContent:W,flexBasis:I,display:j,overflow:F,overflowX:N,overflowY:w,position:X,spacing:G,spacingHorizontal:H,spacingVertical:V,spacingBottom:v,spacingEnd:U,spacingStart:k,spacingTop:z,offset:Y,offsetVertical:q,offsetHorizontal:Z,offsetBottom:J,offsetEnd:K,offsetStart:Q,offsetTop:$,columnGap:ee,rowGap:re,...te},oe){const ne=e.getStyles({backgroundColor:i,borderRadius:d,borderTopStartRadius:f,borderTopEndRadius:l,borderBottomStartRadius:s,borderBottomEndRadius:c,borderColor:u,borderStartColor:b,borderEndColor:E,borderTopColor:S,borderBottomColor:g,borderWidth:_,borderVerticalWidth:O,borderHorizontalWidth:C,borderStartWidth:m,borderEndWidth:A,borderTopWidth:R,borderBottomWidth:x,alignContent:T,alignItems:P,alignSelf:L,flex:h,flexDirection:M,flexGrow:y,flexShrink:D,flexWrap:B,justifyContent:W,flexBasis:I,display:j,overflow:F,overflowX:N,overflowY:w,position:X,spacing:G,spacingHorizontal:H,spacingVertical:V,spacingBottom:v,spacingEnd:U,spacingStart:k,spacingTop:z,offset:Y,offsetVertical:q,offsetHorizontal:Z,offsetBottom:J,offsetEnd:K,offsetStart:Q,offsetTop:$,columnGap:ee,rowGap:re,className:r}),ie=t?p:"button";return a.jsx(ie,{className:ne,ref:oe,onClick:n,...te})})),u=e.createSlot(),b={display1:"h1",display2:"h1",display3:"h1",title1:"h1",title2:"h2",title3:"h3",title4:"h4",headline1:"h5",body1:"p",label1:"p",label2:"p",caption1:"p",caption2:"p",legal1:"p"},E=i.forwardRef((function({className:r,asChild:t,color:o="primary",variant:n="body1",as:i=b[n],fontSize:d=n,fontFamily:f=n,fontWeight:l=n,lineHeight:s=n,textTransform:p=n,textAlign:c,backgroundColor:E,borderRadius:S,borderTopStartRadius:g,borderTopEndRadius:_,borderBottomStartRadius:O,borderBottomEndRadius:C,borderColor:m,borderStartColor:A,borderEndColor:R,borderTopColor:x,borderBottomColor:T,borderWidth:P,borderVerticalWidth:L,borderHorizontalWidth:h,borderStartWidth:M,borderEndWidth:y,borderTopWidth:D,borderBottomWidth:B,alignContent:W,alignItems:I,alignSelf:j,flex:F,flexDirection:N,flexGrow:w,flexShrink:X,flexWrap:G,justifyContent:H,flexBasis:V,display:v,overflow:U,overflowX:k,overflowY:z,position:Y,spacing:q,spacingHorizontal:Z,spacingVertical:J,spacingBottom:K,spacingEnd:Q,spacingStart:$,spacingTop:ee,offset:re,offsetVertical:te,offsetHorizontal:oe,offsetBottom:ne,offsetEnd:ie,offsetStart:ae,offsetTop:de,columnGap:fe,rowGap:le,...se},pe){const ce=e.getStyles({className:r,color:o,fontFamily:f,fontSize:d,fontWeight:l,lineHeight:s,textTransform:p,textAlign:c,backgroundColor:E,borderRadius:S,borderTopStartRadius:g,borderTopEndRadius:_,borderBottomStartRadius:O,borderBottomEndRadius:C,borderColor:m,borderStartColor:A,borderEndColor:R,borderTopColor:x,borderBottomColor:T,borderWidth:P,borderVerticalWidth:L,borderHorizontalWidth:h,borderStartWidth:M,borderEndWidth:y,borderTopWidth:D,borderBottomWidth:B,alignContent:W,alignItems:I,alignSelf:j,flex:F,flexDirection:N,flexGrow:w,flexShrink:X,flexWrap:G,justifyContent:H,flexBasis:V,display:v,overflow:U,overflowX:k,overflowY:z,position:Y,spacing:q,spacingHorizontal:Z,spacingVertical:J,spacingBottom:K,spacingEnd:Q,spacingStart:$,spacingTop:ee,offset:re,offsetVertical:te,offsetHorizontal:oe,offsetBottom:ne,offsetEnd:ie,offsetStart:ae,offsetTop:de,columnGap:fe,rowGap:le}),ue=t?u:i;return a.jsx(ue,{className:ce,ref:pe,...se})})),S=i.forwardRef((function({gap:e,...r},t){return a.jsx(l,{ref:t,flexDirection:"column",columnGap:e,rowGap:e,...r})}));Object.defineProperty(exports,"Icon",{enumerable:!0,get:function(){return e.Icon}}),Object.defineProperty(exports,"cva",{enumerable:!0,get:function(){return e.cva}}),Object.defineProperty(exports,"cx",{enumerable:!0,get:function(){return e.cx}}),Object.defineProperty(exports,"getStyles",{enumerable:!0,get:function(){return e.getStyles}}),Object.defineProperty(exports,"DEFAULT_COLOR_MODE",{enumerable:!0,get:function(){return r.DEFAULT_COLOR_MODE}}),Object.defineProperty(exports,"DEFAULT_COLOR_MODE_FOR_APP",{enumerable:!0,get:function(){return r.DEFAULT_COLOR_MODE_FOR_APP}}),Object.defineProperty(exports,"DEFAULT_HIGH_CONTRAST_MODE",{enumerable:!0,get:function(){return r.DEFAULT_HIGH_CONTRAST_MODE}}),Object.defineProperty(exports,"DEFAULT_REGION_MODE",{enumerable:!0,get:function(){return r.DEFAULT_REGION_MODE}}),Object.defineProperty(exports,"DEFAULT_SCALE_MODE",{enumerable:!0,get:function(){return r.DEFAULT_SCALE_MODE}}),Object.defineProperty(exports,"DEFAULT_SCALE_MODE_FOR_APP",{enumerable:!0,get:function(){return r.DEFAULT_SCALE_MODE_FOR_APP}}),Object.defineProperty(exports,"FONT_DECLARATIONS_MAP",{enumerable:!0,get:function(){return r.FONT_DECLARATIONS_MAP}}),Object.defineProperty(exports,"alwaysPalette",{enumerable:!0,get:function(){return r.alwaysPalette}}),Object.defineProperty(exports,"button",{enumerable:!0,get:function(){return r.button}}),Object.defineProperty(exports,"defaultTokensConfig",{enumerable:!0,get:function(){return r.defaultTokensConfig}}),Object.defineProperty(exports,"fromEntries",{enumerable:!0,get:function(){return r.fromEntries}}),Object.defineProperty(exports,"generateConfigCombinations",{enumerable:!0,get:function(){return r.generateConfigCombinations}}),Object.defineProperty(exports,"getDefaultButtonBaseMap",{enumerable:!0,get:function(){return r.getDefaultButtonBaseMap}}),Object.defineProperty(exports,"variants",{enumerable:!0,get:function(){return t.variants}}),Object.defineProperty(exports,"entries",{enumerable:!0,get:function(){return o.entries}}),Object.defineProperty(exports,"fontWeightMap",{enumerable:!0,get:function(){return o.fontWeightMap}}),Object.defineProperty(exports,"mapValues",{enumerable:!0,get:function(){return o.mapValues}}),Object.defineProperty(exports,"AVATAR_SIZE_PREFIX",{enumerable:!0,get:function(){return n.AVATAR_SIZE_PREFIX}}),Object.defineProperty(exports,"BORDER_RADIUS_PREFIX",{enumerable:!0,get:function(){return n.BORDER_RADIUS_PREFIX}}),Object.defineProperty(exports,"BORDER_WIDTH_PREFIX",{enumerable:!0,get:function(){return n.BORDER_WIDTH_PREFIX}}),Object.defineProperty(exports,"BUTTON_CSS_VAR_MAP",{enumerable:!0,get:function(){return n.BUTTON_CSS_VAR_MAP}}),Object.defineProperty(exports,"DARK_COLOR_MODE_CLASSNAME",{enumerable:!0,get:function(){return n.DARK_COLOR_MODE_CLASSNAME}}),Object.defineProperty(exports,"DEFAULT_COLOR_MODE_CLASSNAME",{enumerable:!0,get:function(){return n.DEFAULT_COLOR_MODE_CLASSNAME}}),Object.defineProperty(exports,"DEFAULT_SCALE_MODE_CLASSNAME",{enumerable:!0,get:function(){return n.DEFAULT_SCALE_MODE_CLASSNAME}}),Object.defineProperty(exports,"FONT_FAMILY_PREFIX",{enumerable:!0,get:function(){return n.FONT_FAMILY_PREFIX}}),Object.defineProperty(exports,"FONT_SIZE_PREFIX",{enumerable:!0,get:function(){return n.FONT_SIZE_PREFIX}}),Object.defineProperty(exports,"FONT_WEIGHT_PREFIX",{enumerable:!0,get:function(){return n.FONT_WEIGHT_PREFIX}}),Object.defineProperty(exports,"ICON_BUTTON_CSS_VAR_MAP",{enumerable:!0,get:function(){return n.ICON_BUTTON_CSS_VAR_MAP}}),Object.defineProperty(exports,"ICON_SIZE_PREFIX",{enumerable:!0,get:function(){return n.ICON_SIZE_PREFIX}}),Object.defineProperty(exports,"LARGE_SCALE_MODE_CLASSNAME",{enumerable:!0,get:function(){return n.LARGE_SCALE_MODE_CLASSNAME}}),Object.defineProperty(exports,"LIGHT_COLOR_MODE_CLASSNAME",{enumerable:!0,get:function(){return n.LIGHT_COLOR_MODE_CLASSNAME}}),Object.defineProperty(exports,"LINE_HEIGHT_PREFIX",{enumerable:!0,get:function(){return n.LINE_HEIGHT_PREFIX}}),Object.defineProperty(exports,"MEDIUM_SCALE_MODE_CLASSNAME",{enumerable:!0,get:function(){return n.MEDIUM_SCALE_MODE_CLASSNAME}}),Object.defineProperty(exports,"MOTION_PREFIX",{enumerable:!0,get:function(){return n.MOTION_PREFIX}}),Object.defineProperty(exports,"PSEUDO_STYLE_SELECTOR_MAP",{enumerable:!0,get:function(){return n.PSEUDO_STYLE_SELECTOR_MAP}}),Object.defineProperty(exports,"SMALL_SCALE_MODE_CLASSNAME",{enumerable:!0,get:function(){return n.SMALL_SCALE_MODE_CLASSNAME}}),Object.defineProperty(exports,"SPECTRUM_COLOR_PREFIX",{enumerable:!0,get:function(){return n.SPECTRUM_COLOR_PREFIX}}),Object.defineProperty(exports,"TEXT_TRANSFORM_PREFIX",{enumerable:!0,get:function(){return n.TEXT_TRANSFORM_PREFIX}}),Object.defineProperty(exports,"UDS_PREFIX",{enumerable:!0,get:function(){return n.UDS_PREFIX}}),Object.defineProperty(exports,"XLARGE_SCALE_MODE_CLASSNAME",{enumerable:!0,get:function(){return n.XLARGE_SCALE_MODE_CLASSNAME}}),Object.defineProperty(exports,"XSMALL_SCALE_MODE_CLASSNAME",{enumerable:!0,get:function(){return n.XSMALL_SCALE_MODE_CLASSNAME}}),Object.defineProperty(exports,"XXLARGE_SCALE_MODE_CLASSNAME",{enumerable:!0,get:function(){return n.XXLARGE_SCALE_MODE_CLASSNAME}}),Object.defineProperty(exports,"XXXLARGE_SCALE_MODE_CLASSNAME",{enumerable:!0,get:function(){return n.XXXLARGE_SCALE_MODE_CLASSNAME}}),Object.defineProperty(exports,"Button",{enumerable:!0,get:function(){return d.Button}}),Object.defineProperty(exports,"IconButton",{enumerable:!0,get:function(){return d.IconButton}}),Object.defineProperty(exports,"SpringMotionConfig",{enumerable:!0,get:function(){return d.SpringMotionConfig}}),exports.Box=l,exports.HStack=s,exports.Image=function({width:r,height:t,src:o,alt:n,contentFit:i,backgroundColor:d,borderRadius:f,borderTopStartRadius:l,borderTopEndRadius:s,borderBottomStartRadius:p,borderBottomEndRadius:c,borderColor:u,borderStartColor:b,borderEndColor:E,borderTopColor:S,borderBottomColor:g,borderWidth:_,borderVerticalWidth:O,borderHorizontalWidth:C,borderStartWidth:m,borderEndWidth:A,borderTopWidth:R,borderBottomWidth:x,alignContent:T,alignItems:P,alignSelf:L,flex:h,flexDirection:M,flexGrow:y,flexShrink:D,flexWrap:B,justifyContent:W,flexBasis:I,display:j,overflow:F,overflowX:N,overflowY:w,position:X,spacing:G,spacingHorizontal:H,spacingVertical:V,spacingBottom:v,spacingEnd:U,spacingStart:k,spacingTop:z,offset:Y,offsetVertical:q,offsetHorizontal:Z,offsetBottom:J,offsetEnd:K,offsetStart:Q,offsetTop:$,columnGap:ee,rowGap:re,...te}){const oe=e.getStyles({contentFit:i,backgroundColor:d,borderRadius:f,borderTopStartRadius:l,borderTopEndRadius:s,borderBottomStartRadius:p,borderBottomEndRadius:c,borderColor:u,borderStartColor:b,borderEndColor:E,borderTopColor:S,borderBottomColor:g,borderWidth:_,borderVerticalWidth:O,borderHorizontalWidth:C,borderStartWidth:m,borderEndWidth:A,borderTopWidth:R,borderBottomWidth:x,alignContent:T,alignItems:P,alignSelf:L,flex:h,flexDirection:M,flexGrow:y,flexShrink:D,flexWrap:B,justifyContent:W,flexBasis:I,display:j,overflow:F,overflowX:N,overflowY:w,position:X,spacing:G,spacingHorizontal:H,spacingVertical:V,spacingBottom:v,spacingEnd:U,spacingStart:k,spacingTop:z,offset:Y,offsetVertical:q,offsetHorizontal:Z,offsetBottom:J,offsetEnd:K,offsetStart:Q,offsetTop:$,columnGap:ee,rowGap:re});return a.jsx("img",{src:o,alt:n,className:oe,style:{objectPosition:"left",width:r,height:t},...te})},exports.Pressable=c,exports.Text=E,exports.VStack=S;
|
package/dist/index.d.cts
ADDED
@@ -0,0 +1,385 @@
|
|
1
|
+
import * as react from 'react';
|
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-Pyccco5Q.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, o as FontConfig, aZ as FontCssVar, n as FontDeclarationConfig, a_ as FontFamilyCDNUrl, a$ as FontFamilyConfig, m 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 IconSizeConfig, bd as ImageStyleProps, V as LARGE_SCALE_MODE_CLASSNAME, O as LIGHT_COLOR_MODE_CLASSNAME, L as LINE_HEIGHT_PREFIX, be as LayoutStyleProps, bf as LetterSpacing, bg as LineClampAlias, bh as LineColor, bi as LineHeight, bj as LineHeightConfig, bk as LinePalette, bl as LinePaletteAlias, R as MEDIUM_SCALE_MODE_CLASSNAME, J as MOTION_PREFIX, bm as Modes, l as MotionConfig, bn as MotionCssVar, bo as MotionSpringConfig, k as MotionSpringConfigOptions, M as MotionVariant, g as MotionVariantSpeed, bp as MotionVariantValues, bq as Overflow, a2 as PSEUDO_STYLE_SELECTOR_MAP, br as Palette, c as PaletteConfig, P as PaletteType, bs as PaletteValue, bt as PlatformMode, bu as Position, bv as PropertyToPaletteAliasMap, bw as RegionMode, Q as SMALL_SCALE_MODE_CLASSNAME, K as SPECTRUM_COLOR_PREFIX, bx as ScaleConfig, by as ScaleEffectMap, S as ScaleMode, bz as ScaleModeConfig, bA as ScaleModeForApp, bB as SpacingAlias, bC as SpacingConfig, bD as SpacingStyleProps, bE as SpectrumColor, bF as SpectrumConfig, bG as StateStyleProps, bH as StyleProps, T as TEXT_TRANSFORM_PREFIX, bQ as TShirtSize, bR as TShirtSizeCommon, bI as TextProperty, bJ as TextStyleProps, bK as TextTransform, bL as TextTransformConfig, bM as TextVariant, bN as TransitionDelay, bO as TransitionDuration, bP as TransitionTiming, w as UDS_PREFIX, bS as UdsCssVar, bT as UniversalAvatarProps, e as UniversalButtonProps, f as UniversalIconButtonProps, bU 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-Pyccco5Q.cjs';
|
5
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
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
|
+
export { IconSize, IconVariant } from '@yahoo/uds-icons/types';
|
9
|
+
import 'framer-motion';
|
10
|
+
|
11
|
+
type DivProps = React.HTMLAttributes<HTMLDivElement>;
|
12
|
+
interface BoxProps extends UniversalBoxProps, DivProps {
|
13
|
+
}
|
14
|
+
/**
|
15
|
+
* **📦 A layout component that can be used to compose other components**
|
16
|
+
*
|
17
|
+
* @description
|
18
|
+
* The most simple component we ship - a div. But with all the power of the UDS design system.
|
19
|
+
* By default, `Box` is a flexbox container. When working with vertical or horizontal layouts,
|
20
|
+
* consider using [VStack](./v-stack) or [HStack](./h-stack) respectively.
|
21
|
+
*
|
22
|
+
* @example
|
23
|
+
* ```tsx
|
24
|
+
* import { Box } from '@yahoo/uds';
|
25
|
+
*
|
26
|
+
* <Box backgroundColor="primary" spacing="6">
|
27
|
+
* Any kind of content can go here!
|
28
|
+
* </Box>
|
29
|
+
* ```
|
30
|
+
*
|
31
|
+
* @usage
|
32
|
+
* - If you need to div-like container to apply padding, shapes, or other styling.
|
33
|
+
* - If you're creating card components.
|
34
|
+
*
|
35
|
+
* @see The {@link https://uds.build/docs/components/box Box Docs} for more info
|
36
|
+
*
|
37
|
+
* @related [HStack](https://uds.build/docs/components/h-stack), [VStack](https://uds.build/docs/components/v-stack)
|
38
|
+
*/
|
39
|
+
declare const Box: react.ForwardRefExoticComponent<BoxProps & react.RefAttributes<HTMLDivElement>>;
|
40
|
+
|
41
|
+
interface HStackProps extends UniversalStackProps, DivProps {
|
42
|
+
}
|
43
|
+
/**
|
44
|
+
* **📏 A layout component that arranges its children in columns using flexbox**
|
45
|
+
*
|
46
|
+
* @description
|
47
|
+
* HStack is a layout primitive that arranges its children in a columns [flexbox](https://developer.mozilla.org/en-US/docs/Learn/CSS/CSS_layout/Flexbox)
|
48
|
+
* and can be used to compose larger layouts. HStack is similar to [Box](./box) but provides additional features like a `gap` property to
|
49
|
+
* add spacing between children.
|
50
|
+
*
|
51
|
+
* @example
|
52
|
+
* ```tsx
|
53
|
+
* import { HStack, Text } from '@yahoo/uds';
|
54
|
+
|
55
|
+
* <HStack gap="6">
|
56
|
+
* <Text variant="body1" color="primary">First</Text>
|
57
|
+
* <Text variant="body1" color="primary">Second</Text>
|
58
|
+
* <Text variant="body1" color="primary">Third</Text>
|
59
|
+
* </HStack>
|
60
|
+
* ```
|
61
|
+
*
|
62
|
+
* @usage
|
63
|
+
* - Create a row of items, optionally with gaps between items.
|
64
|
+
* - Create columns that are sized to their content.
|
65
|
+
* - Create columns that fill the available space within the parent container.
|
66
|
+
* - Create columns of proportionate size to each other (also known as a ratio-based layout).
|
67
|
+
*
|
68
|
+
* @see The {@link https://uds.build/docs/components/h-stack HStack Docs} for more info
|
69
|
+
*
|
70
|
+
* @related [Box](https://uds.build/docs/components/box), [VStack](https://uds.build/docs/components/v-stack)
|
71
|
+
**/
|
72
|
+
declare const HStack: react.ForwardRefExoticComponent<HStackProps & react.RefAttributes<HTMLDivElement>>;
|
73
|
+
|
74
|
+
type SVGElementProps = Omit<React.HTMLAttributes<SVGSVGElement>, 'color'>;
|
75
|
+
interface IconProps extends UniversalIconProps, SVGElementProps {
|
76
|
+
}
|
77
|
+
/**
|
78
|
+
* **🎨 A component for displaying icons**
|
79
|
+
*
|
80
|
+
* @description
|
81
|
+
* [Iconography](https://uds.build/docs/core-concepts/icons) contains small symbols for actions or
|
82
|
+
* other items. They are available in three different sizes: `sm`, `md`, and
|
83
|
+
* `lg`. Each size also supports an outline and fill variant. Icons can be
|
84
|
+
* colored using the `color` prop.
|
85
|
+
*
|
86
|
+
* The component is available in the `@yahoo/uds` package but is meant to be used
|
87
|
+
* with the assets in `@yahoo/uds-icons`. You will need both packages to use icons.
|
88
|
+
* A separate package provides modularity from the core library, better
|
89
|
+
* versioning strategies, and tree shakeability.
|
90
|
+
*
|
91
|
+
* @example
|
92
|
+
* ```tsx
|
93
|
+
* import { Icon } from '@yahoo/uds';
|
94
|
+
* import { AddFolder } from '@yahoo/uds-icons';
|
95
|
+
*
|
96
|
+
* <Icon name={AddFolder} variant="fill" size="sm" />
|
97
|
+
* ```
|
98
|
+
*
|
99
|
+
* @usage
|
100
|
+
* - If you need to display an icon.
|
101
|
+
*
|
102
|
+
* @see The {@link https://uds.build/docs/components/icon Icon Docs} for more info
|
103
|
+
*
|
104
|
+
* @related [IconButton](https://uds.build/docs/components/icon-button)
|
105
|
+
*/
|
106
|
+
declare const Icon: react.ForwardRefExoticComponent<IconProps & react.RefAttributes<SVGSVGElement>>;
|
107
|
+
|
108
|
+
type NativeImageProps = Omit<React.ImgHTMLAttributes<HTMLImageElement>, 'size' | 'color' | 'height' | 'width' | 'alt' | 'src'>;
|
109
|
+
interface ImageProps extends NativeImageProps, UniversalImageProps {
|
110
|
+
}
|
111
|
+
/**
|
112
|
+
* **📸 A component for displaying images**
|
113
|
+
*
|
114
|
+
* @description
|
115
|
+
* Wrapper for the image element. In the future, may provide additional
|
116
|
+
* functionality for handling fallbacks, dark mode, lazy loading, shimmers.
|
117
|
+
*
|
118
|
+
* @example
|
119
|
+
* ```tsx
|
120
|
+
* import { Image } from '@yahoo/uds';
|
121
|
+
*
|
122
|
+
* <Image src="/images/profile.png" width={580} height={334} />;
|
123
|
+
* ```
|
124
|
+
*
|
125
|
+
* @usage
|
126
|
+
* - Use the `Image` component to display images.
|
127
|
+
* - Use `width` and `height` props to set the size of the image.
|
128
|
+
* - Image extends the HTMLImageElement, as well as the uds `Box` component and supports all of their props.
|
129
|
+
*
|
130
|
+
* @see The {@link https://uds.build/docs/components/image Image Docs} for more info
|
131
|
+
*
|
132
|
+
* @related [Box](https://uds.build/docs/components/box)
|
133
|
+
*/
|
134
|
+
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;
|
135
|
+
|
136
|
+
type HtmlButtonProps = Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'color' | 'name'>;
|
137
|
+
interface PressableProps extends UniversalPressableProps, HtmlButtonProps {
|
138
|
+
}
|
139
|
+
/**
|
140
|
+
* **🖲️ A primitive component for creating button interactions with accessibility support**
|
141
|
+
*
|
142
|
+
* @description
|
143
|
+
* The Pressable component is a primitive component that can be used
|
144
|
+
* to create button interactions with accessibility support. It can be used
|
145
|
+
* to trigger an action, such as submitting a form, navigating to a new page,
|
146
|
+
* or adding interactivity to a section or card.
|
147
|
+
*
|
148
|
+
* @example
|
149
|
+
* ```tsx
|
150
|
+
* import { Pressable } from '@yahoo/uds';
|
151
|
+
*
|
152
|
+
* <Pressable
|
153
|
+
* backgroundColor="secondary"
|
154
|
+
* borderWidth="thin"
|
155
|
+
* borderColor="primary"
|
156
|
+
* borderRadius="lg"
|
157
|
+
* onPress={() => console.log('Pressed!')}
|
158
|
+
* >
|
159
|
+
* <Text variant="body1" color="primary" spacingHorizontal="7" spacingVertical="5">Click me...</Text>
|
160
|
+
* </Pressable>
|
161
|
+
* ```
|
162
|
+
*
|
163
|
+
* @usage
|
164
|
+
* - If you need to add interactivity to a section or card.
|
165
|
+
* - If you need a highly customized version of [Button](./button)
|
166
|
+
*
|
167
|
+
* @see The {@link https://uds.build/docs/components/pressable Pressable Docs} for more info
|
168
|
+
*
|
169
|
+
* @related [Button](https://uds.build/docs/components/button), [IconButton](https://uds.build/docs/components/icon-button)
|
170
|
+
*
|
171
|
+
*/
|
172
|
+
declare const Pressable: react.ForwardRefExoticComponent<PressableProps & react.RefAttributes<HTMLButtonElement>>;
|
173
|
+
|
174
|
+
type TextElementTagName = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'p' | 'strong' | 'span' | 'label' | 'li';
|
175
|
+
type TextProps<TagName extends TextElementTagName = TextElementTagName> = {
|
176
|
+
/** Ref passed to the inner container. */
|
177
|
+
ref?: Ref<HTMLElement>;
|
178
|
+
/** Changes the HTML tag used to render text. Uses the most appropriate semantic tag based on the text style variant. */
|
179
|
+
as?: TagName;
|
180
|
+
} & JSX.IntrinsicElements[TagName] & UniversalTextProps;
|
181
|
+
/**
|
182
|
+
* **💬 A text element that can be used to display text**
|
183
|
+
*
|
184
|
+
* @description
|
185
|
+
* By default, the `Text` component uses text primary color and selects the
|
186
|
+
* correct font, weight, and leading. It also choices appropriate semantic
|
187
|
+
* HTML element based on the `variant` prop. For example, `body1` will use a
|
188
|
+
* `<p>` tag, `title1` uses an `<h1>`, etc. This behavior can be overridden
|
189
|
+
* with the `as` prop.
|
190
|
+
*
|
191
|
+
*
|
192
|
+
* @example
|
193
|
+
* ```tsx
|
194
|
+
* import { Text } from '@yahoo/uds';
|
195
|
+
*
|
196
|
+
* <Text variant="body1" color="primary">
|
197
|
+
* Text goes here
|
198
|
+
* </Text>
|
199
|
+
* ```
|
200
|
+
*
|
201
|
+
* @usage
|
202
|
+
* - Use `Text` to display text in your app.
|
203
|
+
* - Use `variant` to change the size and weight of the text.
|
204
|
+
* - Use `color` to change the color of the text.
|
205
|
+
* - Use `as` to change the HTML tag used to render the text.
|
206
|
+
*
|
207
|
+
* @see The {@link https://uds.build/docs/components/text Text Docs} for more info
|
208
|
+
*
|
209
|
+
* @related [Button](https://uds.build/docs/components/button) and [Pressable](https://uds.build/docs/components/pressable)
|
210
|
+
*/
|
211
|
+
declare const Text: react.ForwardRefExoticComponent<(Omit<{
|
212
|
+
/** Ref passed to the inner container. */
|
213
|
+
ref?: Ref<HTMLElement>;
|
214
|
+
/** Changes the HTML tag used to render text. Uses the most appropriate semantic tag based on the text style variant. */
|
215
|
+
as?: TextElementTagName | undefined;
|
216
|
+
} & react.ClassAttributes<HTMLElement> & react.HTMLAttributes<HTMLElement> & UniversalTextProps, "ref"> | Omit<{
|
217
|
+
/** Ref passed to the inner container. */
|
218
|
+
ref?: Ref<HTMLElement>;
|
219
|
+
/** Changes the HTML tag used to render text. Uses the most appropriate semantic tag based on the text style variant. */
|
220
|
+
as?: TextElementTagName | undefined;
|
221
|
+
} & react.ClassAttributes<HTMLParagraphElement> & react.HTMLAttributes<HTMLParagraphElement> & UniversalTextProps, "ref"> | Omit<{
|
222
|
+
/** Ref passed to the inner container. */
|
223
|
+
ref?: Ref<HTMLElement>;
|
224
|
+
/** Changes the HTML tag used to render text. Uses the most appropriate semantic tag based on the text style variant. */
|
225
|
+
as?: TextElementTagName | undefined;
|
226
|
+
} & react.ClassAttributes<HTMLHeadingElement> & react.HTMLAttributes<HTMLHeadingElement> & UniversalTextProps, "ref"> | Omit<{
|
227
|
+
/** Ref passed to the inner container. */
|
228
|
+
ref?: Ref<HTMLElement>;
|
229
|
+
/** Changes the HTML tag used to render text. Uses the most appropriate semantic tag based on the text style variant. */
|
230
|
+
as?: TextElementTagName | undefined;
|
231
|
+
} & react.ClassAttributes<HTMLLabelElement> & react.LabelHTMLAttributes<HTMLLabelElement> & UniversalTextProps, "ref"> | Omit<{
|
232
|
+
/** Ref passed to the inner container. */
|
233
|
+
ref?: Ref<HTMLElement>;
|
234
|
+
/** Changes the HTML tag used to render text. Uses the most appropriate semantic tag based on the text style variant. */
|
235
|
+
as?: TextElementTagName | undefined;
|
236
|
+
} & react.ClassAttributes<HTMLLIElement> & react.LiHTMLAttributes<HTMLLIElement> & UniversalTextProps, "ref"> | Omit<{
|
237
|
+
/** Ref passed to the inner container. */
|
238
|
+
ref?: Ref<HTMLElement>;
|
239
|
+
/** Changes the HTML tag used to render text. Uses the most appropriate semantic tag based on the text style variant. */
|
240
|
+
as?: TextElementTagName | undefined;
|
241
|
+
} & react.ClassAttributes<HTMLSpanElement> & react.HTMLAttributes<HTMLSpanElement> & UniversalTextProps, "ref">) & react.RefAttributes<HTMLElement>>;
|
242
|
+
|
243
|
+
type VStackProps = UniversalStackProps & DivProps;
|
244
|
+
/**
|
245
|
+
* **🥞 A layout component that arranges its children in rows using flexbox**
|
246
|
+
*
|
247
|
+
* @description
|
248
|
+
* 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)
|
249
|
+
* and can be used to compose larger layouts. VStack is similar to [Box](./box) but provides additional features like a `gap` property to
|
250
|
+
* add spacing between children.
|
251
|
+
*
|
252
|
+
* @example
|
253
|
+
* ```tsx
|
254
|
+
* import { VStack, Text } from '@yahoo/uds';
|
255
|
+
*
|
256
|
+
* <VStack gap="6">
|
257
|
+
* <Text variant="body1" color="primary">First</Text>
|
258
|
+
* <Text variant="body1" color="primary">Second</Text>
|
259
|
+
* <Text variant="body1" color="primary">Third</Text>
|
260
|
+
* </VStack>
|
261
|
+
* ```
|
262
|
+
*
|
263
|
+
* @usage
|
264
|
+
* - Create a column of items, optionally with gaps between.
|
265
|
+
* - Create rows that are sized to their content (height only). By default each child will fill the width of the VStack.
|
266
|
+
* - Create rows that fill the available space within the parent container.
|
267
|
+
* - Create rows of proportionate size to each other (also known as a ratio-based layout).
|
268
|
+
*
|
269
|
+
* @see The {@link https://uds.build/docs/components/v-stack VStack Docs} for more info
|
270
|
+
*
|
271
|
+
* @related [Box](https://uds.build/docs/components/box), [HStack](https://uds.build/docs/components/h-stack)
|
272
|
+
**/
|
273
|
+
declare const VStack: react.ForwardRefExoticComponent<UniversalStackProps & DivProps & react.RefAttributes<HTMLDivElement>>;
|
274
|
+
|
275
|
+
type StringToBoolean<T> = T extends 'true' | 'false' ? boolean : T;
|
276
|
+
type CvaStyleValue<T> = T | CvaStyleArray<T> | Record<string, unknown> | null | boolean | undefined;
|
277
|
+
type CvaStyleArray<T> = CvaStyleValue<T>[];
|
278
|
+
type CVAVariantSchema<T, V extends CVAVariantShape<T>> = {
|
279
|
+
[Variant in keyof V]?: StringToBoolean<keyof V[Variant]> | undefined;
|
280
|
+
};
|
281
|
+
type CVAVariantShape<T> = Record<string, Record<string, T>>;
|
282
|
+
type CVAStyleProp<T> = T extends string ? {
|
283
|
+
className?: T;
|
284
|
+
} : {
|
285
|
+
style?: T;
|
286
|
+
};
|
287
|
+
type CVAConfigBase<T> = {
|
288
|
+
base?: T | null;
|
289
|
+
};
|
290
|
+
interface CVA<T> {
|
291
|
+
<V extends CVAVariantShape<T>>(config: V extends CVAVariantShape<T> ? CVAConfigBase<T> & {
|
292
|
+
base?: T;
|
293
|
+
variants?: V;
|
294
|
+
compoundVariants?: (V extends CVAVariantShape<T> ? (CVAVariantSchema<T, V> | {
|
295
|
+
[Variant in keyof V]?: StringToBoolean<keyof V[Variant]> | undefined;
|
296
|
+
}) & CVAStyleProp<T> : CVAStyleProp<T>)[];
|
297
|
+
defaultVariants?: CVAVariantSchema<T, V>;
|
298
|
+
} : CVAConfigBase<T> & {
|
299
|
+
variants?: never;
|
300
|
+
compoundVariants?: never;
|
301
|
+
defaultVariants?: never;
|
302
|
+
}): (props?: V extends CVAVariantShape<T> ? CVAVariantSchema<T, V> & CVAStyleProp<T> : CVAStyleProp<T>) => T;
|
303
|
+
}
|
304
|
+
interface CX<T> {
|
305
|
+
(...inputs: CvaStyleValue<T>[]): T;
|
306
|
+
}
|
307
|
+
|
308
|
+
declare const cx: CX<string>;
|
309
|
+
declare const cva: CVA<string>;
|
310
|
+
declare const getStylesInternal: (props?: ({
|
311
|
+
color?: "brand" | "accent" | "alert" | "positive" | "warning" | "primary" | "secondary" | "tertiary" | "muted" | "on-color" | "transparent" | "white" | "black" | "current" | undefined;
|
312
|
+
placeholderColor?: "brand" | "accent" | "alert" | "positive" | "warning" | "primary" | "secondary" | "tertiary" | "muted" | "on-color" | "transparent" | "white" | "black" | "current" | undefined;
|
313
|
+
fontFamily?: "serif" | "sans" | "mono" | "display1" | "display2" | "display3" | "title1" | "title2" | "title3" | "title4" | "headline1" | "body1" | "label1" | "label2" | "caption1" | "caption2" | "legal1" | "sans-alt" | "serif-alt" | undefined;
|
314
|
+
fontSize?: "display1" | "display2" | "display3" | "title1" | "title2" | "title3" | "title4" | "headline1" | "body1" | "label1" | "label2" | "caption1" | "caption2" | "legal1" | undefined;
|
315
|
+
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;
|
316
|
+
lineHeight?: "display1" | "display2" | "display3" | "title1" | "title2" | "title3" | "title4" | "headline1" | "body1" | "label1" | "label2" | "caption1" | "caption2" | "legal1" | undefined;
|
317
|
+
textAlign?: "center" | "end" | "start" | "justify" | undefined;
|
318
|
+
textTransform?: "display1" | "display2" | "display3" | "title1" | "title2" | "title3" | "title4" | "headline1" | "body1" | "label1" | "label2" | "caption1" | "caption2" | "legal1" | "none" | "uppercase" | "lowercase" | "capitalize" | undefined;
|
319
|
+
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;
|
320
|
+
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;
|
321
|
+
spacingVertical?: "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;
|
322
|
+
spacingBottom?: "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;
|
323
|
+
spacingEnd?: "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;
|
324
|
+
spacingStart?: "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;
|
325
|
+
spacingTop?: "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;
|
326
|
+
offset?: "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;
|
327
|
+
offsetVertical?: "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;
|
328
|
+
offsetHorizontal?: "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;
|
329
|
+
offsetBottom?: "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;
|
330
|
+
offsetEnd?: "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;
|
331
|
+
offsetStart?: "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;
|
332
|
+
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;
|
333
|
+
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;
|
334
|
+
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;
|
335
|
+
backgroundColor?: "brand" | "accent" | "alert" | "positive" | "warning" | "primary" | "secondary" | "transparent" | "white" | "black" | "current" | undefined;
|
336
|
+
borderColor?: "brand" | "accent" | "alert" | "positive" | "warning" | "primary" | "secondary" | "tertiary" | "muted" | "transparent" | "white" | "black" | "current" | undefined;
|
337
|
+
borderStartColor?: "brand" | "accent" | "alert" | "positive" | "warning" | "primary" | "secondary" | "tertiary" | "muted" | "transparent" | "white" | "black" | "current" | undefined;
|
338
|
+
borderEndColor?: "brand" | "accent" | "alert" | "positive" | "warning" | "primary" | "secondary" | "tertiary" | "muted" | "transparent" | "white" | "black" | "current" | undefined;
|
339
|
+
borderBottomColor?: "brand" | "accent" | "alert" | "positive" | "warning" | "primary" | "secondary" | "tertiary" | "muted" | "transparent" | "white" | "black" | "current" | undefined;
|
340
|
+
borderTopColor?: "brand" | "accent" | "alert" | "positive" | "warning" | "primary" | "secondary" | "tertiary" | "muted" | "transparent" | "white" | "black" | "current" | undefined;
|
341
|
+
borderRadius?: "none" | "xs" | "sm" | "md" | "lg" | "xl" | "full" | undefined;
|
342
|
+
borderTopStartRadius?: "none" | "xs" | "sm" | "md" | "lg" | "xl" | "full" | undefined;
|
343
|
+
borderTopEndRadius?: "none" | "xs" | "sm" | "md" | "lg" | "xl" | "full" | undefined;
|
344
|
+
borderBottomStartRadius?: "none" | "xs" | "sm" | "md" | "lg" | "xl" | "full" | undefined;
|
345
|
+
borderBottomEndRadius?: "none" | "xs" | "sm" | "md" | "lg" | "xl" | "full" | undefined;
|
346
|
+
borderWidth?: "thin" | "medium" | "none" | "thick" | undefined;
|
347
|
+
borderVerticalWidth?: "thin" | "medium" | "none" | "thick" | undefined;
|
348
|
+
borderHorizontalWidth?: "thin" | "medium" | "none" | "thick" | undefined;
|
349
|
+
borderStartWidth?: "thin" | "medium" | "none" | "thick" | undefined;
|
350
|
+
borderEndWidth?: "thin" | "medium" | "none" | "thick" | undefined;
|
351
|
+
borderTopWidth?: "thin" | "medium" | "none" | "thick" | undefined;
|
352
|
+
borderBottomWidth?: "thin" | "medium" | "none" | "thick" | undefined;
|
353
|
+
avatarSize?: "sm" | "md" | "lg" | undefined;
|
354
|
+
iconSize?: "sm" | "md" | "lg" | undefined;
|
355
|
+
alignContent?: "center" | "flex-end" | "flex-start" | "stretch" | "space-between" | "space-around" | undefined;
|
356
|
+
alignItems?: "center" | "flex-end" | "flex-start" | "baseline" | "stretch" | undefined;
|
357
|
+
alignSelf?: "center" | "flex-end" | "flex-start" | "baseline" | "stretch" | "auto" | undefined;
|
358
|
+
flex?: "1" | "none" | "initial" | "auto" | undefined;
|
359
|
+
flexDirection?: "row" | "column" | "row-reverse" | "column-reverse" | undefined;
|
360
|
+
flexGrow?: "0" | "1" | "2" | "3" | undefined;
|
361
|
+
flexShrink?: "0" | "1" | undefined;
|
362
|
+
flexWrap?: "nowrap" | "wrap" | "wrap-reverse" | undefined;
|
363
|
+
justifyContent?: "center" | "flex-end" | "flex-start" | "space-between" | "space-around" | "space-evenly" | undefined;
|
364
|
+
flexBasis?: "min-content" | undefined;
|
365
|
+
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;
|
366
|
+
overflow?: "hidden" | "auto" | "clip" | "visible" | "scroll" | undefined;
|
367
|
+
overflowX?: "hidden" | "auto" | "clip" | "visible" | "scroll" | undefined;
|
368
|
+
overflowY?: "hidden" | "auto" | "clip" | "visible" | "scroll" | undefined;
|
369
|
+
position?: "static" | "fixed" | "absolute" | "relative" | "sticky" | undefined;
|
370
|
+
contentFit?: "none" | "fill" | "cover" | "contain" | "scale-down" | undefined;
|
371
|
+
colorMode?: "light" | "dark" | undefined;
|
372
|
+
scaleMode?: "medium" | "xSmall" | "small" | "large" | "xLarge" | "xxLarge" | "xxxLarge" | undefined;
|
373
|
+
buttonPalette?: "brand" | "accent" | "alert" | "positive" | "warning" | undefined;
|
374
|
+
buttonVariant?: "primary" | "secondary" | "tertiary" | undefined;
|
375
|
+
buttonSize?: "sm" | "md" | "lg" | undefined;
|
376
|
+
iconButtonSize?: "xs" | "sm" | "md" | "lg" | "xl" | undefined;
|
377
|
+
} & {
|
378
|
+
className?: string | undefined;
|
379
|
+
}) | undefined) => string;
|
380
|
+
type GetStylesInternalProps = Parameters<typeof getStylesInternal>[0];
|
381
|
+
declare const getStyles: (props: GetStylesInternalProps) => string;
|
382
|
+
|
383
|
+
type SetState<T> = Dispatch<SetStateAction<T>>;
|
384
|
+
|
385
|
+
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 };
|