@yahoo/uds 0.5.7 → 0.5.9
Sign up to get free protection for your applications and to get access to all the features.
- package/cli/README.md +1 -0
- 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 +6 -0
- package/cli/commands/purge.ts +6 -2
- package/cli/compile.ts +35 -0
- package/cli/consts.ts +9 -0
- package/cli/exec.ts +34 -0
- package/cli/tsconfig.json +1 -0
- package/cli/uds-cli +32 -6
- package/cli/utils/configWorker.ts +2 -0
- package/cli/utils/purgeCSS.test.ts +2 -1
- package/cli/utils/purgeCSS.ts +31 -11
- package/cli/utils/setupConfigWorker.ts +12 -1
- package/dist/{Image.native-CIafNow6.d.cts → Image.native-BhqVvnKU.d.cts} +1 -1
- package/dist/{Image.native-Cbv-erHz.d.ts → Image.native-DZW5ek69.d.ts} +1 -1
- package/dist/{VStack-DTK919lo.d.ts → VStack-BohShRVo.d.ts} +1 -1
- package/dist/{VStack-DnjkTYdB.d.cts → VStack-C6VjEoRP.d.cts} +1 -1
- package/dist/experimental/index.cjs +4 -4
- package/dist/experimental/index.d.cts +2 -2
- package/dist/experimental/index.d.ts +2 -2
- package/dist/experimental/index.js +3 -3
- package/dist/experimental/index.native.cjs +1 -1
- package/dist/experimental/index.native.d.cts +3 -3
- package/dist/experimental/index.native.d.ts +3 -3
- package/dist/experimental/index.native.js +1 -1
- package/dist/fixtures.cjs +2 -1
- package/dist/fixtures.d.ts +5 -5
- package/dist/fixtures.js +2 -1
- package/dist/index.cjs +2 -2
- package/dist/index.d.cts +16 -13
- package/dist/index.d.ts +16 -13
- package/dist/index.js +3 -3
- package/dist/index.native-dtcAO8DN.d.cts +317 -0
- package/dist/index.native-uBCD4Hr4.d.ts +317 -0
- package/dist/index.native.cjs +1 -1
- package/dist/index.native.d.cts +60 -9
- package/dist/index.native.d.ts +60 -9
- package/dist/index.native.js +1 -1
- package/dist/metafile-cjs.json +1 -1
- package/dist/metafile-esm.json +1 -1
- package/dist/tailwind/plugin.cjs +1 -1
- package/dist/tailwind/plugin.d.cts +3 -3
- package/dist/tailwind/plugin.d.ts +3 -3
- package/dist/tailwind/plugin.js +3 -3
- package/dist/tailwind/purger.cjs +2 -2
- package/dist/tailwind/purger.js +2 -2
- package/dist/tailwind/tsMorph.cjs +1 -1
- package/dist/tailwind/tsMorph.js +2 -2
- package/dist/tokens/index.cjs +1 -1
- package/dist/tokens/index.d.cts +358 -5
- package/dist/tokens/index.d.ts +358 -5
- package/dist/tokens/index.js +2 -2
- package/dist/tokens/index.native.cjs +1 -1
- package/dist/tokens/index.native.d.cts +2 -2
- package/dist/tokens/index.native.d.ts +2 -2
- package/dist/tokens/index.native.js +1 -1
- package/dist/tokens/parseTokens.cjs +1 -1
- package/dist/tokens/parseTokens.d.cts +4 -4
- package/dist/tokens/parseTokens.d.ts +4 -4
- package/dist/tokens/parseTokens.js +1 -1
- package/dist/{types-BB7LBOmj.d.cts → types-BE7_GGFX.d.cts} +48 -41
- package/dist/{types-BB7LBOmj.d.ts → types-BE7_GGFX.d.ts} +48 -41
- package/dist/{types-DDJJDimt.d.cts → types-D0b0TPQ4.d.cts} +48 -41
- package/dist/{types-DDJJDimt.d.ts → types-D0b0TPQ4.d.ts} +48 -41
- package/package.json +199 -198
- package/dist/index.native-B7lxeKHq.d.ts +0 -15
- package/dist/index.native-y03H93Or.d.cts +0 -15
@@ -1,4 +1,4 @@
|
|
1
|
-
import { U as UniversalTokensConfig, C as ColorMode, S as ScaleMode, a as ColorsConfig, H as Hue, b as HueStep,
|
1
|
+
import { U as UniversalTokensConfig, C as ColorMode, S as ScaleMode, a as ColorsConfig, H as Hue, b as HueStep, B as BackgroundPaletteAlias, c as CorePaletteAlias, F as ForegroundPaletteAlias, L as LinePaletteAlias, d as FontWeightConfig, e as FontWeightNumeric, f as FontFamilyGlobalConfig } from '../types-D0b0TPQ4.cjs';
|
2
2
|
import 'react';
|
3
3
|
|
4
4
|
declare function transformColors(colors: ColorsConfig): {
|
@@ -7,8 +7,8 @@ declare function transformColors(colors: ColorsConfig): {
|
|
7
7
|
tailwindConfig: {
|
8
8
|
spectrum: Record<Hue, Record<HueStep, string>>;
|
9
9
|
palette: {
|
10
|
-
core: Record<CorePaletteAlias, string>;
|
11
10
|
background: Record<BackgroundPaletteAlias, string>;
|
11
|
+
core: Record<CorePaletteAlias, string>;
|
12
12
|
foreground: Record<ForegroundPaletteAlias, string>;
|
13
13
|
line: Record<LinePaletteAlias, string>;
|
14
14
|
};
|
@@ -18,15 +18,15 @@ declare function transformFontWeight(config: FontWeightConfig): {
|
|
18
18
|
_vars: Record<string, string>;
|
19
19
|
_raw: FontWeightConfig;
|
20
20
|
tailwindConfig: {
|
21
|
-
medium: FontWeightNumeric;
|
22
21
|
thin: FontWeightNumeric;
|
22
|
+
medium: FontWeightNumeric;
|
23
23
|
black: FontWeightNumeric;
|
24
24
|
light: FontWeightNumeric;
|
25
25
|
extralight: FontWeightNumeric;
|
26
|
+
regular: FontWeightNumeric;
|
26
27
|
semibold: FontWeightNumeric;
|
27
28
|
bold: FontWeightNumeric;
|
28
29
|
extrabold: FontWeightNumeric;
|
29
|
-
regular: FontWeightNumeric;
|
30
30
|
};
|
31
31
|
};
|
32
32
|
declare function transformString<T extends Record<string, string>>(prefix: string, config: T, transformValue?: (value: string) => string): {
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { U as UniversalTokensConfig, C as ColorMode, S as ScaleMode, a as ColorsConfig, H as Hue, b as HueStep,
|
1
|
+
import { U as UniversalTokensConfig, C as ColorMode, S as ScaleMode, a as ColorsConfig, H as Hue, b as HueStep, B as BackgroundPaletteAlias, c as CorePaletteAlias, F as ForegroundPaletteAlias, L as LinePaletteAlias, d as FontWeightConfig, e as FontWeightNumeric, f as FontFamilyGlobalConfig } from '../types-D0b0TPQ4.js';
|
2
2
|
import 'react';
|
3
3
|
|
4
4
|
declare function transformColors(colors: ColorsConfig): {
|
@@ -7,8 +7,8 @@ declare function transformColors(colors: ColorsConfig): {
|
|
7
7
|
tailwindConfig: {
|
8
8
|
spectrum: Record<Hue, Record<HueStep, string>>;
|
9
9
|
palette: {
|
10
|
-
core: Record<CorePaletteAlias, string>;
|
11
10
|
background: Record<BackgroundPaletteAlias, string>;
|
11
|
+
core: Record<CorePaletteAlias, string>;
|
12
12
|
foreground: Record<ForegroundPaletteAlias, string>;
|
13
13
|
line: Record<LinePaletteAlias, string>;
|
14
14
|
};
|
@@ -18,15 +18,15 @@ declare function transformFontWeight(config: FontWeightConfig): {
|
|
18
18
|
_vars: Record<string, string>;
|
19
19
|
_raw: FontWeightConfig;
|
20
20
|
tailwindConfig: {
|
21
|
-
medium: FontWeightNumeric;
|
22
21
|
thin: FontWeightNumeric;
|
22
|
+
medium: FontWeightNumeric;
|
23
23
|
black: FontWeightNumeric;
|
24
24
|
light: FontWeightNumeric;
|
25
25
|
extralight: FontWeightNumeric;
|
26
|
+
regular: FontWeightNumeric;
|
26
27
|
semibold: FontWeightNumeric;
|
27
28
|
bold: FontWeightNumeric;
|
28
29
|
extrabold: FontWeightNumeric;
|
29
|
-
regular: FontWeightNumeric;
|
30
30
|
};
|
31
31
|
};
|
32
32
|
declare function transformString<T extends Record<string, string>>(prefix: string, config: T, transformValue?: (value: string) => string): {
|
@@ -1,2 +1,2 @@
|
|
1
|
-
/*! © 2024 Yahoo, Inc. UDS v0.5.
|
1
|
+
/*! © 2024 Yahoo, Inc. UDS v0.5.9 */
|
2
2
|
var t={thin:"100",extralight:"200",light:"300",regular:"400",medium:"500",semibold:"600",bold:"700",extrabold:"800",black:"900"},r="uds",o=`${r}-spectrum-color`,e=`${r}-font`,n=`${r}-icon-size`,i=`${r}-avatar-size`,a=`${r}-border-radius`,s=`${r}-border-width`,c=`${r}-font-size`,f=`${r}-line-height`,$=`${r}-font-weight`,l=`${r}-text-transform`;function u(t){return Object.entries(t)}function d(t,r){return Object.keys(t).reduce(((o,e,n)=>(o[e]=r(t[e],e,n),o)),{})}function g(t){const{palette:e,spectrum:n}=t,i={},a={spectrum:{},palette:{}};for(const[t,r]of u(n))for(const[e,n]of u(r)){const r=`--${o}-${`${t}-${e}`}`;a.spectrum[t]||(a.spectrum[t]={}),a.spectrum[t][e]=`rgb(var(${r}))`,i[r]=n}return u(e).forEach((([t,e])=>{for(const[n,{hue:s,step:c,opacity:f}]of Object.entries(e)){t in a.palette||(a.palette[t]={});const e=`--${r}-${t}-color-${n}`;i[e]=`var(--${o}-${s}-${c})`,a.palette[t][n]=f?`rgb(var(${e}) / ${f})`:`rgb(var(${e}))`}})),{_vars:i,_raw:t,tailwindConfig:a}}function v(r){const o={},e={};for(const[n,i="regular"]of u(r)){const r=`--${$}-${n}`,a=t[i];o[r]=a,e[n]=`var(${r})`}return{_vars:o,_raw:r,tailwindConfig:{...t,...e}}}function b(t,r,o){const e={},n={};for(const[i,a]of u(r)){const r=`--${t}-${i}`,s=o?o(a):a;e[r]=s,n[i]=`var(${r})`}return{_vars:e,_raw:r,tailwindConfig:n}}function h(t,r){if(!r)return{_vars:{},_raw:{},tailwindConfig:{}};const o={},e={};for(const[n,i]of u(r)){const r=`--${t}-${n}`,a=`${i}px`;o[r]=a,e[n]=`var(${r})`}return{_vars:o,_raw:r,tailwindConfig:e}}function m(t){return d(t,((t,r)=>{const{fallbacks:o=[]}=t??{};return[`var(--${e}-${r})`,...o]}))}function p(t){const{colorMode:r,scaleMode:o,fontFamily:$}=t;return{...t,colorMode:{light:g(r.light),dark:g(r.dark)},scaleMode:d(o,(({borderRadius:t,borderWidth:r,fontSize:o,lineHeight:$,fontFamily:u,fontWeight:d,textTransform:g,avatarSizes:m,iconSizes:p})=>({fontFamily:b(e,u,(t=>`var(--${e}-${t})`)),fontSize:h(c,o),fontWeight:v(d),lineHeight:h(f,$),textTransform:b(l,g),borderRadius:h(a,t),borderWidth:h(s,r),avatarSizes:h(i,m),iconSizes:h(n,p)}))),fontFamily:m($)}}export{p as parseTokens};
|
@@ -8,6 +8,7 @@ declare const alwaysPalette: {
|
|
8
8
|
white: string;
|
9
9
|
black: string;
|
10
10
|
transparent: string;
|
11
|
+
current: string;
|
11
12
|
};
|
12
13
|
|
13
14
|
type PaletteType = keyof PaletteConfig;
|
@@ -103,57 +104,64 @@ type ButtonSpectrumColor = {
|
|
103
104
|
type: 'spectrum';
|
104
105
|
value: SpectrumColor;
|
105
106
|
};
|
106
|
-
type
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
hueStep: HueStep;
|
113
|
-
};
|
114
|
-
};
|
115
|
-
type ButtonBackgroundPaletteColor = {
|
107
|
+
type ButtonSize = TShirtSizeCommon;
|
108
|
+
type ButtonCategory = CorePaletteAlias;
|
109
|
+
type ButtonVariant2 = 'primary' | 'secondary' | 'tertiary';
|
110
|
+
type ButtonState = 'rest' | 'hover' | 'pressed';
|
111
|
+
type ButtonKind = 'fill' | 'outline' | 'ghost';
|
112
|
+
type ButtonBackgroundColor = {
|
116
113
|
type: 'palette';
|
117
114
|
value: BackgroundColor;
|
118
|
-
};
|
119
|
-
type
|
115
|
+
} | ButtonSpectrumColor;
|
116
|
+
type ButtonForegroundColor = {
|
120
117
|
type: 'palette';
|
121
118
|
value: ForegroundColor;
|
122
|
-
};
|
123
|
-
type
|
119
|
+
} | ButtonSpectrumColor;
|
120
|
+
type ButtonBorderColor = {
|
124
121
|
type: 'palette';
|
125
122
|
value: LineColor;
|
126
|
-
};
|
127
|
-
interface ButtonStateConfig {
|
128
|
-
backgroundColor?: ButtonSpectrumColor | ButtonBackgroundPaletteColor | ButtonComputedColor;
|
129
|
-
foregroundColor: ButtonSpectrumColor | ButtonForegroundPaletteColor | ButtonComputedColor;
|
130
|
-
borderColor?: ButtonSpectrumColor | ButtonBorderPaletteColor | ButtonComputedColor;
|
131
|
-
}
|
132
|
-
interface ButtonVariantConfig {
|
133
|
-
kind: 'fill' | 'outline' | 'ghost';
|
134
|
-
borderWidth: BorderWidth;
|
135
|
-
rest: ButtonStateConfig;
|
136
|
-
hover: ButtonStateConfig;
|
137
|
-
pressed: ButtonStateConfig;
|
138
|
-
disabled: ButtonStateConfig;
|
139
|
-
}
|
140
|
-
interface ButtonSizeConfig {
|
141
|
-
spacingHorizontal: SpacingAlias;
|
142
|
-
spacingVertical: SpacingAlias;
|
143
|
-
gap: SpacingAlias;
|
144
|
-
iconSize: IconSize;
|
145
|
-
textStyle: TextVariant;
|
146
|
-
shape: BorderRadius;
|
147
|
-
}
|
123
|
+
} | ButtonSpectrumColor;
|
148
124
|
interface ButtonConfig {
|
149
|
-
|
150
|
-
|
125
|
+
defaults: {
|
126
|
+
category: ButtonCategory;
|
127
|
+
variant: ButtonVariant2;
|
128
|
+
size: ButtonSize;
|
129
|
+
};
|
130
|
+
size: {
|
131
|
+
[size in ButtonSize]: {
|
132
|
+
spacingHorizontal: SpacingAlias;
|
133
|
+
spacingVertical: SpacingAlias;
|
134
|
+
gap: SpacingAlias;
|
135
|
+
iconSize: IconSize;
|
136
|
+
textVariant: TextVariant;
|
137
|
+
};
|
138
|
+
};
|
139
|
+
category: {
|
140
|
+
[category in ButtonCategory]: {
|
141
|
+
[variant in ButtonVariant2]: {
|
142
|
+
kind: ButtonKind;
|
143
|
+
state: {
|
144
|
+
[state in ButtonState]: state extends 'rest' ? {
|
145
|
+
borderWidth: BorderWidth;
|
146
|
+
borderRadius: BorderRadius;
|
147
|
+
backgroundColor: ButtonBackgroundColor;
|
148
|
+
color: ButtonForegroundColor;
|
149
|
+
borderColor: ButtonBorderColor;
|
150
|
+
} : {
|
151
|
+
backgroundColor: ButtonBackgroundColor;
|
152
|
+
color: ButtonForegroundColor;
|
153
|
+
borderColor: ButtonBorderColor;
|
154
|
+
};
|
155
|
+
};
|
156
|
+
};
|
157
|
+
};
|
158
|
+
};
|
151
159
|
}
|
152
160
|
type UniversalTokensConfig = {
|
153
161
|
colorMode: ColorModeConfig;
|
154
162
|
scaleMode: ScaleModeConfig;
|
155
163
|
fontFamily: FontFamilyGlobalConfig;
|
156
|
-
|
164
|
+
button?: ButtonConfig;
|
157
165
|
};
|
158
166
|
type PlatformMode = 'web' | 'ios' | 'android';
|
159
167
|
type ColorMode = 'light' | 'dark';
|
@@ -356,7 +364,6 @@ interface UniversalPressableProps extends UniversalBoxProps {
|
|
356
364
|
onPress?: () => void;
|
357
365
|
}
|
358
366
|
type ButtonVariant = CorePaletteAlias | `${CorePaletteAlias}-outline` | `${CorePaletteAlias}-ghost` | 'primary-ghost' | 'primary-outline' | 'secondary';
|
359
|
-
type ButtonSize = TShirtSizeCommon;
|
360
367
|
interface UniversalIconButtonProps {
|
361
368
|
/** The variant of the button. */
|
362
369
|
variant?: ButtonVariant;
|
@@ -415,4 +422,4 @@ interface UniversalTextInputProps {
|
|
415
422
|
spacingHorizontal?: SpacingAlias;
|
416
423
|
}
|
417
424
|
|
418
|
-
export { type
|
425
|
+
export { type DataAttribute as $, type AvatarSizeConfig as A, type ButtonConfig as B, type ColorModeForApp as C, type BackgroundPaletteAlias as D, type BackgroundStyleProps as E, type FontFamilyConfig as F, type BorderRadius as G, type BorderStyleProps as H, type IconSizeConfig as I, type BorderWidth as J, type BoxShadowConfig as K, type LineHeightConfig as L, type Modes as M, type ButtonCategory as N, type ButtonSize as O, type ButtonState as P, type ButtonVariant as Q, type ButtonVariant2 as R, type ScaleModeForApp as S, type TextTransformConfig as T, type UniversalAvatarProps as U, type ColorModeConfig as V, type ColorsConfig as W, type ConfigurableTextProperty as X, type CorePalette as Y, type CorePaletteAlias as Z, type CustomSizingStyleProps as _, type UniversalButtonProps as a, type Display as a0, type Flex as a1, type FlexAlignContent as a2, type FlexAlignItems as a3, type FlexAlignSelf as a4, type FlexBasis as a5, type FlexDirection as a6, type FlexGrow as a7, type FlexJustifyContent as a8, type FlexShrink as a9, type PlatformMode as aA, type Position as aB, type RegionMode as aC, type ScaleConfig as aD, type ScaleModeConfig as aE, type SpacingAlias as aF, type SpacingConfig as aG, type SpacingStyleProps as aH, type SpectrumColor as aI, type SpectrumConfig as aJ, type StateStyleProps as aK, type TextStyleProps as aL, type TextTransform as aM, type TextVariant as aN, type TransitionDelay as aO, type TransitionDuration as aP, type TransitionTiming as aQ, type TShirtSize as aR, type TShirtSizeCommon as aS, type UniversalTextInputProps as aT, type FlexStyleProps as aa, type FlexWrap as ab, type FontFamilyGlobalAlias as ac, type FontSize as ad, type FontWeightDescriptive as ae, type FontWeightNumeric as af, type ForegroundColor as ag, type ForegroundPalette as ah, type ForegroundPaletteAlias as ai, type HighContrastMode as aj, type Hue as ak, type HueStep as al, type IconSize as am, type ImageStyleProps as an, type LayoutStyleProps as ao, type LetterSpacing as ap, type LineClampAlias as aq, type LineColor as ar, type LineHeight as as, type LinePalette as at, type LinePaletteAlias as au, type Overflow as av, type Palette as aw, type PaletteConfig as ax, type PaletteType as ay, type PaletteValue as az, type UniversalPressableProps as b, type UniversalIconButtonProps as c, type UniversalImageProps as d, type UniversalBoxProps as e, type UniversalStackProps as f, type UniversalTextProps as g, type UniversalIconProps as h, type ColorMode as i, type ScaleMode as j, type UniversalTokensConfig as k, type StyleProps as l, type BorderRadiusConfig as m, type BorderWidthConfig as n, type FontSizeConfig as o, type FontWeightConfig as p, type FontFamilyGlobalConfig as q, alwaysPalette as r, type AlwaysPalette as s, type AlwaysPaletteAlias as t, type Animation as u, type AriaAttribute as v, type AvatarShape as w, type AvatarSize as x, type BackgroundColor as y, type BackgroundPalette as z };
|
@@ -8,6 +8,7 @@ declare const alwaysPalette: {
|
|
8
8
|
white: string;
|
9
9
|
black: string;
|
10
10
|
transparent: string;
|
11
|
+
current: string;
|
11
12
|
};
|
12
13
|
|
13
14
|
type PaletteType = keyof PaletteConfig;
|
@@ -103,57 +104,64 @@ type ButtonSpectrumColor = {
|
|
103
104
|
type: 'spectrum';
|
104
105
|
value: SpectrumColor;
|
105
106
|
};
|
106
|
-
type
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
hueStep: HueStep;
|
113
|
-
};
|
114
|
-
};
|
115
|
-
type ButtonBackgroundPaletteColor = {
|
107
|
+
type ButtonSize = TShirtSizeCommon;
|
108
|
+
type ButtonCategory = CorePaletteAlias;
|
109
|
+
type ButtonVariant2 = 'primary' | 'secondary' | 'tertiary';
|
110
|
+
type ButtonState = 'rest' | 'hover' | 'pressed';
|
111
|
+
type ButtonKind = 'fill' | 'outline' | 'ghost';
|
112
|
+
type ButtonBackgroundColor = {
|
116
113
|
type: 'palette';
|
117
114
|
value: BackgroundColor;
|
118
|
-
};
|
119
|
-
type
|
115
|
+
} | ButtonSpectrumColor;
|
116
|
+
type ButtonForegroundColor = {
|
120
117
|
type: 'palette';
|
121
118
|
value: ForegroundColor;
|
122
|
-
};
|
123
|
-
type
|
119
|
+
} | ButtonSpectrumColor;
|
120
|
+
type ButtonBorderColor = {
|
124
121
|
type: 'palette';
|
125
122
|
value: LineColor;
|
126
|
-
};
|
127
|
-
interface ButtonStateConfig {
|
128
|
-
backgroundColor?: ButtonSpectrumColor | ButtonBackgroundPaletteColor | ButtonComputedColor;
|
129
|
-
foregroundColor: ButtonSpectrumColor | ButtonForegroundPaletteColor | ButtonComputedColor;
|
130
|
-
borderColor?: ButtonSpectrumColor | ButtonBorderPaletteColor | ButtonComputedColor;
|
131
|
-
}
|
132
|
-
interface ButtonVariantConfig {
|
133
|
-
kind: 'fill' | 'outline' | 'ghost';
|
134
|
-
borderWidth: BorderWidth;
|
135
|
-
rest: ButtonStateConfig;
|
136
|
-
hover: ButtonStateConfig;
|
137
|
-
pressed: ButtonStateConfig;
|
138
|
-
disabled: ButtonStateConfig;
|
139
|
-
}
|
140
|
-
interface ButtonSizeConfig {
|
141
|
-
spacingHorizontal: SpacingAlias;
|
142
|
-
spacingVertical: SpacingAlias;
|
143
|
-
gap: SpacingAlias;
|
144
|
-
iconSize: IconSize;
|
145
|
-
textStyle: TextVariant;
|
146
|
-
shape: BorderRadius;
|
147
|
-
}
|
123
|
+
} | ButtonSpectrumColor;
|
148
124
|
interface ButtonConfig {
|
149
|
-
|
150
|
-
|
125
|
+
defaults: {
|
126
|
+
category: ButtonCategory;
|
127
|
+
variant: ButtonVariant2;
|
128
|
+
size: ButtonSize;
|
129
|
+
};
|
130
|
+
size: {
|
131
|
+
[size in ButtonSize]: {
|
132
|
+
spacingHorizontal: SpacingAlias;
|
133
|
+
spacingVertical: SpacingAlias;
|
134
|
+
gap: SpacingAlias;
|
135
|
+
iconSize: IconSize;
|
136
|
+
textVariant: TextVariant;
|
137
|
+
};
|
138
|
+
};
|
139
|
+
category: {
|
140
|
+
[category in ButtonCategory]: {
|
141
|
+
[variant in ButtonVariant2]: {
|
142
|
+
kind: ButtonKind;
|
143
|
+
state: {
|
144
|
+
[state in ButtonState]: state extends 'rest' ? {
|
145
|
+
borderWidth: BorderWidth;
|
146
|
+
borderRadius: BorderRadius;
|
147
|
+
backgroundColor: ButtonBackgroundColor;
|
148
|
+
color: ButtonForegroundColor;
|
149
|
+
borderColor: ButtonBorderColor;
|
150
|
+
} : {
|
151
|
+
backgroundColor: ButtonBackgroundColor;
|
152
|
+
color: ButtonForegroundColor;
|
153
|
+
borderColor: ButtonBorderColor;
|
154
|
+
};
|
155
|
+
};
|
156
|
+
};
|
157
|
+
};
|
158
|
+
};
|
151
159
|
}
|
152
160
|
type UniversalTokensConfig = {
|
153
161
|
colorMode: ColorModeConfig;
|
154
162
|
scaleMode: ScaleModeConfig;
|
155
163
|
fontFamily: FontFamilyGlobalConfig;
|
156
|
-
|
164
|
+
button?: ButtonConfig;
|
157
165
|
};
|
158
166
|
type PlatformMode = 'web' | 'ios' | 'android';
|
159
167
|
type ColorMode = 'light' | 'dark';
|
@@ -356,7 +364,6 @@ interface UniversalPressableProps extends UniversalBoxProps {
|
|
356
364
|
onPress?: () => void;
|
357
365
|
}
|
358
366
|
type ButtonVariant = CorePaletteAlias | `${CorePaletteAlias}-outline` | `${CorePaletteAlias}-ghost` | 'primary-ghost' | 'primary-outline' | 'secondary';
|
359
|
-
type ButtonSize = TShirtSizeCommon;
|
360
367
|
interface UniversalIconButtonProps {
|
361
368
|
/** The variant of the button. */
|
362
369
|
variant?: ButtonVariant;
|
@@ -415,4 +422,4 @@ interface UniversalTextInputProps {
|
|
415
422
|
spacingHorizontal?: SpacingAlias;
|
416
423
|
}
|
417
424
|
|
418
|
-
export { type
|
425
|
+
export { type DataAttribute as $, type AvatarSizeConfig as A, type ButtonConfig as B, type ColorModeForApp as C, type BackgroundPaletteAlias as D, type BackgroundStyleProps as E, type FontFamilyConfig as F, type BorderRadius as G, type BorderStyleProps as H, type IconSizeConfig as I, type BorderWidth as J, type BoxShadowConfig as K, type LineHeightConfig as L, type Modes as M, type ButtonCategory as N, type ButtonSize as O, type ButtonState as P, type ButtonVariant as Q, type ButtonVariant2 as R, type ScaleModeForApp as S, type TextTransformConfig as T, type UniversalAvatarProps as U, type ColorModeConfig as V, type ColorsConfig as W, type ConfigurableTextProperty as X, type CorePalette as Y, type CorePaletteAlias as Z, type CustomSizingStyleProps as _, type UniversalButtonProps as a, type Display as a0, type Flex as a1, type FlexAlignContent as a2, type FlexAlignItems as a3, type FlexAlignSelf as a4, type FlexBasis as a5, type FlexDirection as a6, type FlexGrow as a7, type FlexJustifyContent as a8, type FlexShrink as a9, type PlatformMode as aA, type Position as aB, type RegionMode as aC, type ScaleConfig as aD, type ScaleModeConfig as aE, type SpacingAlias as aF, type SpacingConfig as aG, type SpacingStyleProps as aH, type SpectrumColor as aI, type SpectrumConfig as aJ, type StateStyleProps as aK, type TextStyleProps as aL, type TextTransform as aM, type TextVariant as aN, type TransitionDelay as aO, type TransitionDuration as aP, type TransitionTiming as aQ, type TShirtSize as aR, type TShirtSizeCommon as aS, type UniversalTextInputProps as aT, type FlexStyleProps as aa, type FlexWrap as ab, type FontFamilyGlobalAlias as ac, type FontSize as ad, type FontWeightDescriptive as ae, type FontWeightNumeric as af, type ForegroundColor as ag, type ForegroundPalette as ah, type ForegroundPaletteAlias as ai, type HighContrastMode as aj, type Hue as ak, type HueStep as al, type IconSize as am, type ImageStyleProps as an, type LayoutStyleProps as ao, type LetterSpacing as ap, type LineClampAlias as aq, type LineColor as ar, type LineHeight as as, type LinePalette as at, type LinePaletteAlias as au, type Overflow as av, type Palette as aw, type PaletteConfig as ax, type PaletteType as ay, type PaletteValue as az, type UniversalPressableProps as b, type UniversalIconButtonProps as c, type UniversalImageProps as d, type UniversalBoxProps as e, type UniversalStackProps as f, type UniversalTextProps as g, type UniversalIconProps as h, type ColorMode as i, type ScaleMode as j, type UniversalTokensConfig as k, type StyleProps as l, type BorderRadiusConfig as m, type BorderWidthConfig as n, type FontSizeConfig as o, type FontWeightConfig as p, type FontFamilyGlobalConfig as q, alwaysPalette as r, type AlwaysPalette as s, type AlwaysPaletteAlias as t, type Animation as u, type AriaAttribute as v, type AvatarShape as w, type AvatarSize as x, type BackgroundColor as y, type BackgroundPalette as z };
|
@@ -8,6 +8,7 @@ declare const alwaysPalette: {
|
|
8
8
|
white: string;
|
9
9
|
black: string;
|
10
10
|
transparent: string;
|
11
|
+
current: string;
|
11
12
|
};
|
12
13
|
|
13
14
|
type PaletteType = keyof PaletteConfig;
|
@@ -103,57 +104,64 @@ type ButtonSpectrumColor = {
|
|
103
104
|
type: 'spectrum';
|
104
105
|
value: SpectrumColor;
|
105
106
|
};
|
106
|
-
type
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
hueStep: HueStep;
|
113
|
-
};
|
114
|
-
};
|
115
|
-
type ButtonBackgroundPaletteColor = {
|
107
|
+
type ButtonSize = TShirtSizeCommon;
|
108
|
+
type ButtonCategory = CorePaletteAlias;
|
109
|
+
type ButtonVariant2 = 'primary' | 'secondary' | 'tertiary';
|
110
|
+
type ButtonState = 'rest' | 'hover' | 'pressed';
|
111
|
+
type ButtonKind = 'fill' | 'outline' | 'ghost';
|
112
|
+
type ButtonBackgroundColor = {
|
116
113
|
type: 'palette';
|
117
114
|
value: BackgroundColor;
|
118
|
-
};
|
119
|
-
type
|
115
|
+
} | ButtonSpectrumColor;
|
116
|
+
type ButtonForegroundColor = {
|
120
117
|
type: 'palette';
|
121
118
|
value: ForegroundColor;
|
122
|
-
};
|
123
|
-
type
|
119
|
+
} | ButtonSpectrumColor;
|
120
|
+
type ButtonBorderColor = {
|
124
121
|
type: 'palette';
|
125
122
|
value: LineColor;
|
126
|
-
};
|
127
|
-
interface ButtonStateConfig {
|
128
|
-
backgroundColor?: ButtonSpectrumColor | ButtonBackgroundPaletteColor | ButtonComputedColor;
|
129
|
-
foregroundColor: ButtonSpectrumColor | ButtonForegroundPaletteColor | ButtonComputedColor;
|
130
|
-
borderColor?: ButtonSpectrumColor | ButtonBorderPaletteColor | ButtonComputedColor;
|
131
|
-
}
|
132
|
-
interface ButtonVariantConfig {
|
133
|
-
kind: 'fill' | 'outline' | 'ghost';
|
134
|
-
borderWidth: BorderWidth;
|
135
|
-
rest: ButtonStateConfig;
|
136
|
-
hover: ButtonStateConfig;
|
137
|
-
pressed: ButtonStateConfig;
|
138
|
-
disabled: ButtonStateConfig;
|
139
|
-
}
|
140
|
-
interface ButtonSizeConfig {
|
141
|
-
spacingHorizontal: SpacingAlias;
|
142
|
-
spacingVertical: SpacingAlias;
|
143
|
-
gap: SpacingAlias;
|
144
|
-
iconSize: IconSize;
|
145
|
-
textStyle: TextVariant;
|
146
|
-
shape: BorderRadius;
|
147
|
-
}
|
123
|
+
} | ButtonSpectrumColor;
|
148
124
|
interface ButtonConfig {
|
149
|
-
|
150
|
-
|
125
|
+
defaults: {
|
126
|
+
category: ButtonCategory;
|
127
|
+
variant: ButtonVariant2;
|
128
|
+
size: ButtonSize;
|
129
|
+
};
|
130
|
+
size: {
|
131
|
+
[size in ButtonSize]: {
|
132
|
+
spacingHorizontal: SpacingAlias;
|
133
|
+
spacingVertical: SpacingAlias;
|
134
|
+
gap: SpacingAlias;
|
135
|
+
iconSize: IconSize;
|
136
|
+
textVariant: TextVariant;
|
137
|
+
};
|
138
|
+
};
|
139
|
+
category: {
|
140
|
+
[category in ButtonCategory]: {
|
141
|
+
[variant in ButtonVariant2]: {
|
142
|
+
kind: ButtonKind;
|
143
|
+
state: {
|
144
|
+
[state in ButtonState]: state extends 'rest' ? {
|
145
|
+
borderWidth: BorderWidth;
|
146
|
+
borderRadius: BorderRadius;
|
147
|
+
backgroundColor: ButtonBackgroundColor;
|
148
|
+
color: ButtonForegroundColor;
|
149
|
+
borderColor: ButtonBorderColor;
|
150
|
+
} : {
|
151
|
+
backgroundColor: ButtonBackgroundColor;
|
152
|
+
color: ButtonForegroundColor;
|
153
|
+
borderColor: ButtonBorderColor;
|
154
|
+
};
|
155
|
+
};
|
156
|
+
};
|
157
|
+
};
|
158
|
+
};
|
151
159
|
}
|
152
160
|
type UniversalTokensConfig = {
|
153
161
|
colorMode: ColorModeConfig;
|
154
162
|
scaleMode: ScaleModeConfig;
|
155
163
|
fontFamily: FontFamilyGlobalConfig;
|
156
|
-
|
164
|
+
button?: ButtonConfig;
|
157
165
|
};
|
158
166
|
type PlatformMode = 'web' | 'ios' | 'android';
|
159
167
|
type ColorMode = 'light' | 'dark';
|
@@ -356,7 +364,6 @@ interface UniversalPressableProps extends UniversalBoxProps {
|
|
356
364
|
onPress?: () => void;
|
357
365
|
}
|
358
366
|
type ButtonVariant = CorePaletteAlias | `${CorePaletteAlias}-outline` | `${CorePaletteAlias}-ghost` | 'primary-ghost' | 'primary-outline' | 'secondary';
|
359
|
-
type ButtonSize = TShirtSizeCommon;
|
360
367
|
interface UniversalIconButtonProps {
|
361
368
|
/** The variant of the button. */
|
362
369
|
variant?: ButtonVariant;
|
@@ -415,4 +422,4 @@ interface UniversalTextInputProps {
|
|
415
422
|
spacingHorizontal?: SpacingAlias;
|
416
423
|
}
|
417
424
|
|
418
|
-
export { type
|
425
|
+
export { type FlexShrink as $, type AlwaysPalette as A, type BackgroundPaletteAlias as B, type ColorMode as C, type ButtonSize as D, type ButtonState as E, type ForegroundPaletteAlias as F, type ButtonVariant as G, type Hue as H, type ButtonVariant2 as I, type ColorModeConfig as J, type ColorModeForApp as K, type LinePaletteAlias as L, type ConfigurableTextProperty as M, type CorePalette as N, type CustomSizingStyleProps as O, type DataAttribute as P, type Display as Q, type Flex as R, type ScaleMode as S, type FlexAlignContent as T, type UniversalTokensConfig as U, type FlexAlignItems as V, type FlexAlignSelf as W, type FlexBasis as X, type FlexDirection as Y, type FlexGrow as Z, type FlexJustifyContent as _, type ColorsConfig as a, type FlexStyleProps as a0, type FlexWrap as a1, type FontFamilyConfig as a2, type FontFamilyGlobalAlias as a3, type FontSize as a4, type FontSizeConfig as a5, type FontWeightDescriptive as a6, type ForegroundColor as a7, type ForegroundPalette as a8, type HighContrastMode as a9, type SpectrumConfig as aA, type StateStyleProps as aB, type StyleProps as aC, type TextStyleProps as aD, type TextTransform as aE, type TextTransformConfig as aF, type TextVariant as aG, type TransitionDelay as aH, type TransitionDuration as aI, type TransitionTiming as aJ, type TShirtSize as aK, type TShirtSizeCommon as aL, type UniversalAvatarProps as aM, type UniversalBoxProps as aN, type UniversalButtonProps as aO, type UniversalIconButtonProps as aP, type UniversalIconProps as aQ, type UniversalPressableProps as aR, type UniversalTextInputProps as aS, type UniversalTextProps as aT, type IconSize as aa, type IconSizeConfig as ab, type ImageStyleProps as ac, type LayoutStyleProps as ad, type LetterSpacing as ae, type LineClampAlias as af, type LineColor as ag, type LineHeight as ah, type LineHeightConfig as ai, type LinePalette as aj, type Modes as ak, type Overflow as al, type Palette as am, type PaletteConfig as an, type PaletteType as ao, type PaletteValue as ap, type PlatformMode as aq, type Position as ar, type RegionMode as as, type ScaleConfig as at, type ScaleModeConfig as au, type ScaleModeForApp as av, type SpacingAlias as aw, type SpacingConfig as ax, type SpacingStyleProps as ay, type SpectrumColor as az, type HueStep as b, type CorePaletteAlias as c, type FontWeightConfig as d, type FontWeightNumeric as e, type FontFamilyGlobalConfig as f, type UniversalStackProps as g, type UniversalImageProps as h, alwaysPalette as i, type AlwaysPaletteAlias as j, type Animation as k, type AriaAttribute as l, type AvatarShape as m, type AvatarSize as n, type AvatarSizeConfig as o, type BackgroundColor as p, type BackgroundPalette as q, type BackgroundStyleProps as r, type BorderRadius as s, type BorderRadiusConfig as t, type BorderStyleProps as u, type BorderWidth as v, type BorderWidthConfig as w, type BoxShadowConfig as x, type ButtonCategory as y, type ButtonConfig as z };
|
@@ -8,6 +8,7 @@ declare const alwaysPalette: {
|
|
8
8
|
white: string;
|
9
9
|
black: string;
|
10
10
|
transparent: string;
|
11
|
+
current: string;
|
11
12
|
};
|
12
13
|
|
13
14
|
type PaletteType = keyof PaletteConfig;
|
@@ -103,57 +104,64 @@ type ButtonSpectrumColor = {
|
|
103
104
|
type: 'spectrum';
|
104
105
|
value: SpectrumColor;
|
105
106
|
};
|
106
|
-
type
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
hueStep: HueStep;
|
113
|
-
};
|
114
|
-
};
|
115
|
-
type ButtonBackgroundPaletteColor = {
|
107
|
+
type ButtonSize = TShirtSizeCommon;
|
108
|
+
type ButtonCategory = CorePaletteAlias;
|
109
|
+
type ButtonVariant2 = 'primary' | 'secondary' | 'tertiary';
|
110
|
+
type ButtonState = 'rest' | 'hover' | 'pressed';
|
111
|
+
type ButtonKind = 'fill' | 'outline' | 'ghost';
|
112
|
+
type ButtonBackgroundColor = {
|
116
113
|
type: 'palette';
|
117
114
|
value: BackgroundColor;
|
118
|
-
};
|
119
|
-
type
|
115
|
+
} | ButtonSpectrumColor;
|
116
|
+
type ButtonForegroundColor = {
|
120
117
|
type: 'palette';
|
121
118
|
value: ForegroundColor;
|
122
|
-
};
|
123
|
-
type
|
119
|
+
} | ButtonSpectrumColor;
|
120
|
+
type ButtonBorderColor = {
|
124
121
|
type: 'palette';
|
125
122
|
value: LineColor;
|
126
|
-
};
|
127
|
-
interface ButtonStateConfig {
|
128
|
-
backgroundColor?: ButtonSpectrumColor | ButtonBackgroundPaletteColor | ButtonComputedColor;
|
129
|
-
foregroundColor: ButtonSpectrumColor | ButtonForegroundPaletteColor | ButtonComputedColor;
|
130
|
-
borderColor?: ButtonSpectrumColor | ButtonBorderPaletteColor | ButtonComputedColor;
|
131
|
-
}
|
132
|
-
interface ButtonVariantConfig {
|
133
|
-
kind: 'fill' | 'outline' | 'ghost';
|
134
|
-
borderWidth: BorderWidth;
|
135
|
-
rest: ButtonStateConfig;
|
136
|
-
hover: ButtonStateConfig;
|
137
|
-
pressed: ButtonStateConfig;
|
138
|
-
disabled: ButtonStateConfig;
|
139
|
-
}
|
140
|
-
interface ButtonSizeConfig {
|
141
|
-
spacingHorizontal: SpacingAlias;
|
142
|
-
spacingVertical: SpacingAlias;
|
143
|
-
gap: SpacingAlias;
|
144
|
-
iconSize: IconSize;
|
145
|
-
textStyle: TextVariant;
|
146
|
-
shape: BorderRadius;
|
147
|
-
}
|
123
|
+
} | ButtonSpectrumColor;
|
148
124
|
interface ButtonConfig {
|
149
|
-
|
150
|
-
|
125
|
+
defaults: {
|
126
|
+
category: ButtonCategory;
|
127
|
+
variant: ButtonVariant2;
|
128
|
+
size: ButtonSize;
|
129
|
+
};
|
130
|
+
size: {
|
131
|
+
[size in ButtonSize]: {
|
132
|
+
spacingHorizontal: SpacingAlias;
|
133
|
+
spacingVertical: SpacingAlias;
|
134
|
+
gap: SpacingAlias;
|
135
|
+
iconSize: IconSize;
|
136
|
+
textVariant: TextVariant;
|
137
|
+
};
|
138
|
+
};
|
139
|
+
category: {
|
140
|
+
[category in ButtonCategory]: {
|
141
|
+
[variant in ButtonVariant2]: {
|
142
|
+
kind: ButtonKind;
|
143
|
+
state: {
|
144
|
+
[state in ButtonState]: state extends 'rest' ? {
|
145
|
+
borderWidth: BorderWidth;
|
146
|
+
borderRadius: BorderRadius;
|
147
|
+
backgroundColor: ButtonBackgroundColor;
|
148
|
+
color: ButtonForegroundColor;
|
149
|
+
borderColor: ButtonBorderColor;
|
150
|
+
} : {
|
151
|
+
backgroundColor: ButtonBackgroundColor;
|
152
|
+
color: ButtonForegroundColor;
|
153
|
+
borderColor: ButtonBorderColor;
|
154
|
+
};
|
155
|
+
};
|
156
|
+
};
|
157
|
+
};
|
158
|
+
};
|
151
159
|
}
|
152
160
|
type UniversalTokensConfig = {
|
153
161
|
colorMode: ColorModeConfig;
|
154
162
|
scaleMode: ScaleModeConfig;
|
155
163
|
fontFamily: FontFamilyGlobalConfig;
|
156
|
-
|
164
|
+
button?: ButtonConfig;
|
157
165
|
};
|
158
166
|
type PlatformMode = 'web' | 'ios' | 'android';
|
159
167
|
type ColorMode = 'light' | 'dark';
|
@@ -356,7 +364,6 @@ interface UniversalPressableProps extends UniversalBoxProps {
|
|
356
364
|
onPress?: () => void;
|
357
365
|
}
|
358
366
|
type ButtonVariant = CorePaletteAlias | `${CorePaletteAlias}-outline` | `${CorePaletteAlias}-ghost` | 'primary-ghost' | 'primary-outline' | 'secondary';
|
359
|
-
type ButtonSize = TShirtSizeCommon;
|
360
367
|
interface UniversalIconButtonProps {
|
361
368
|
/** The variant of the button. */
|
362
369
|
variant?: ButtonVariant;
|
@@ -415,4 +422,4 @@ interface UniversalTextInputProps {
|
|
415
422
|
spacingHorizontal?: SpacingAlias;
|
416
423
|
}
|
417
424
|
|
418
|
-
export { type
|
425
|
+
export { type FlexShrink as $, type AlwaysPalette as A, type BackgroundPaletteAlias as B, type ColorMode as C, type ButtonSize as D, type ButtonState as E, type ForegroundPaletteAlias as F, type ButtonVariant as G, type Hue as H, type ButtonVariant2 as I, type ColorModeConfig as J, type ColorModeForApp as K, type LinePaletteAlias as L, type ConfigurableTextProperty as M, type CorePalette as N, type CustomSizingStyleProps as O, type DataAttribute as P, type Display as Q, type Flex as R, type ScaleMode as S, type FlexAlignContent as T, type UniversalTokensConfig as U, type FlexAlignItems as V, type FlexAlignSelf as W, type FlexBasis as X, type FlexDirection as Y, type FlexGrow as Z, type FlexJustifyContent as _, type ColorsConfig as a, type FlexStyleProps as a0, type FlexWrap as a1, type FontFamilyConfig as a2, type FontFamilyGlobalAlias as a3, type FontSize as a4, type FontSizeConfig as a5, type FontWeightDescriptive as a6, type ForegroundColor as a7, type ForegroundPalette as a8, type HighContrastMode as a9, type SpectrumConfig as aA, type StateStyleProps as aB, type StyleProps as aC, type TextStyleProps as aD, type TextTransform as aE, type TextTransformConfig as aF, type TextVariant as aG, type TransitionDelay as aH, type TransitionDuration as aI, type TransitionTiming as aJ, type TShirtSize as aK, type TShirtSizeCommon as aL, type UniversalAvatarProps as aM, type UniversalBoxProps as aN, type UniversalButtonProps as aO, type UniversalIconButtonProps as aP, type UniversalIconProps as aQ, type UniversalPressableProps as aR, type UniversalTextInputProps as aS, type UniversalTextProps as aT, type IconSize as aa, type IconSizeConfig as ab, type ImageStyleProps as ac, type LayoutStyleProps as ad, type LetterSpacing as ae, type LineClampAlias as af, type LineColor as ag, type LineHeight as ah, type LineHeightConfig as ai, type LinePalette as aj, type Modes as ak, type Overflow as al, type Palette as am, type PaletteConfig as an, type PaletteType as ao, type PaletteValue as ap, type PlatformMode as aq, type Position as ar, type RegionMode as as, type ScaleConfig as at, type ScaleModeConfig as au, type ScaleModeForApp as av, type SpacingAlias as aw, type SpacingConfig as ax, type SpacingStyleProps as ay, type SpectrumColor as az, type HueStep as b, type CorePaletteAlias as c, type FontWeightConfig as d, type FontWeightNumeric as e, type FontFamilyGlobalConfig as f, type UniversalStackProps as g, type UniversalImageProps as h, alwaysPalette as i, type AlwaysPaletteAlias as j, type Animation as k, type AriaAttribute as l, type AvatarShape as m, type AvatarSize as n, type AvatarSizeConfig as o, type BackgroundColor as p, type BackgroundPalette as q, type BackgroundStyleProps as r, type BorderRadius as s, type BorderRadiusConfig as t, type BorderStyleProps as u, type BorderWidth as v, type BorderWidthConfig as w, type BoxShadowConfig as x, type ButtonCategory as y, type ButtonConfig as z };
|