@yahoo/uds 0.5.7 → 0.5.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (56) hide show
  1. package/cli/utils/purgeCSS.test.ts +1 -0
  2. package/cli/utils/setupConfigWorker.ts +12 -1
  3. package/dist/{Image.native-CIafNow6.d.cts → Image.native-No-SNzS_.d.cts} +1 -1
  4. package/dist/{Image.native-Cbv-erHz.d.ts → Image.native-taa2jsQc.d.ts} +1 -1
  5. package/dist/{VStack-DnjkTYdB.d.cts → VStack-B4TMNdfk.d.cts} +1 -1
  6. package/dist/{VStack-DTK919lo.d.ts → VStack-pgMJmuKn.d.ts} +1 -1
  7. package/dist/experimental/index.cjs +3 -3
  8. package/dist/experimental/index.d.cts +2 -2
  9. package/dist/experimental/index.d.ts +2 -2
  10. package/dist/experimental/index.js +3 -3
  11. package/dist/experimental/index.native.cjs +1 -1
  12. package/dist/experimental/index.native.d.cts +3 -3
  13. package/dist/experimental/index.native.d.ts +3 -3
  14. package/dist/experimental/index.native.js +1 -1
  15. package/dist/fixtures.cjs +2 -1
  16. package/dist/fixtures.d.ts +5 -5
  17. package/dist/fixtures.js +2 -1
  18. package/dist/index.cjs +2 -2
  19. package/dist/index.d.cts +16 -13
  20. package/dist/index.d.ts +16 -13
  21. package/dist/index.js +3 -3
  22. package/dist/index.native-BzvT-a_y.d.ts +317 -0
  23. package/dist/index.native-WZqIALTD.d.cts +317 -0
  24. package/dist/index.native.cjs +1 -1
  25. package/dist/index.native.d.cts +34 -9
  26. package/dist/index.native.d.ts +34 -9
  27. package/dist/index.native.js +1 -1
  28. package/dist/metafile-cjs.json +1 -1
  29. package/dist/metafile-esm.json +1 -1
  30. package/dist/tailwind/plugin.cjs +1 -1
  31. package/dist/tailwind/plugin.d.cts +3 -3
  32. package/dist/tailwind/plugin.d.ts +3 -3
  33. package/dist/tailwind/plugin.js +3 -3
  34. package/dist/tailwind/purger.cjs +2 -2
  35. package/dist/tailwind/purger.js +2 -2
  36. package/dist/tailwind/tsMorph.cjs +1 -1
  37. package/dist/tailwind/tsMorph.js +2 -2
  38. package/dist/tokens/index.cjs +1 -1
  39. package/dist/tokens/index.d.cts +332 -5
  40. package/dist/tokens/index.d.ts +332 -5
  41. package/dist/tokens/index.js +2 -2
  42. package/dist/tokens/index.native.cjs +1 -1
  43. package/dist/tokens/index.native.d.cts +2 -2
  44. package/dist/tokens/index.native.d.ts +2 -2
  45. package/dist/tokens/index.native.js +1 -1
  46. package/dist/tokens/parseTokens.cjs +1 -1
  47. package/dist/tokens/parseTokens.d.cts +4 -4
  48. package/dist/tokens/parseTokens.d.ts +4 -4
  49. package/dist/tokens/parseTokens.js +1 -1
  50. package/dist/{types-BB7LBOmj.d.cts → types-CHw8YXrX.d.cts} +48 -41
  51. package/dist/{types-BB7LBOmj.d.ts → types-CHw8YXrX.d.ts} +48 -41
  52. package/dist/{types-DDJJDimt.d.cts → types-FhFpiSwO.d.cts} +48 -41
  53. package/dist/{types-DDJJDimt.d.ts → types-FhFpiSwO.d.ts} +48 -41
  54. package/package.json +1 -1
  55. package/dist/index.native-B7lxeKHq.d.ts +0 -15
  56. 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, c as CorePaletteAlias, B as BackgroundPaletteAlias, F as ForegroundPaletteAlias, L as LinePaletteAlias, d as FontWeightConfig, e as FontWeightNumeric, f as FontFamilyGlobalConfig } from '../types-BB7LBOmj.cjs';
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-FhFpiSwO.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, c as CorePaletteAlias, B as BackgroundPaletteAlias, F as ForegroundPaletteAlias, L as LinePaletteAlias, d as FontWeightConfig, e as FontWeightNumeric, f as FontFamilyGlobalConfig } from '../types-BB7LBOmj.js';
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-FhFpiSwO.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.7 */
1
+ /*! © 2024 Yahoo, Inc. UDS v0.5.8 */
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 ButtonComputedColor = {
107
- type: 'computed';
108
- value: `${string} ${string} ${string}`;
109
- meta: {
110
- effect: 'lighten' | 'darken';
111
- hue: Hue;
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 ButtonForegroundPaletteColor = {
115
+ } | ButtonSpectrumColor;
116
+ type ButtonForegroundColor = {
120
117
  type: 'palette';
121
118
  value: ForegroundColor;
122
- };
123
- type ButtonBorderPaletteColor = {
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
- sizes: Record<TShirtSizeCommon, ButtonSizeConfig>;
150
- variants: Record<'primary' | 'secondary' | 'tertiary', ButtonVariantConfig>;
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
- buttons?: ButtonConfig;
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 FontFamilyConfig as $, type AlwaysPalette as A, type BackgroundPaletteAlias as B, type ColorMode as C, type ButtonVariant as D, type ColorModeConfig as E, type ForegroundPaletteAlias as F, type ColorModeForApp as G, type Hue as H, type ConfigurableTextProperty as I, type CorePalette as J, type CustomSizingStyleProps as K, type LinePaletteAlias as L, type DataAttribute as M, type Display as N, type Flex as O, type FlexAlignContent as P, type FlexAlignItems as Q, type FlexAlignSelf as R, type ScaleMode as S, type FlexBasis as T, type UniversalTokensConfig as U, type FlexDirection as V, type FlexGrow as W, type FlexJustifyContent as X, type FlexShrink as Y, type FlexStyleProps as Z, type FlexWrap as _, type ColorsConfig as a, type FontFamilyGlobalAlias as a0, type FontSize as a1, type FontSizeConfig as a2, type FontWeightDescriptive as a3, type ForegroundColor as a4, type ForegroundPalette as a5, type HighContrastMode as a6, type IconSize as a7, type IconSizeConfig as a8, type ImageStyleProps as a9, type TextStyleProps as aA, type TextTransform as aB, type TextTransformConfig as aC, type TextVariant as aD, type TransitionDelay as aE, type TransitionDuration as aF, type TransitionTiming as aG, type TShirtSize as aH, type TShirtSizeCommon as aI, type UniversalAvatarProps as aJ, type UniversalBoxProps as aK, type UniversalButtonProps as aL, type UniversalIconButtonProps as aM, type UniversalIconProps as aN, type UniversalPressableProps as aO, type UniversalTextInputProps as aP, type UniversalTextProps as aQ, type LayoutStyleProps as aa, type LetterSpacing as ab, type LineClampAlias as ac, type LineColor as ad, type LineHeight as ae, type LineHeightConfig as af, type LinePalette as ag, type Modes as ah, type Overflow as ai, type Palette as aj, type PaletteConfig as ak, type PaletteType as al, type PaletteValue as am, type PlatformMode as an, type Position as ao, type RegionMode as ap, type ScaleConfig as aq, type ScaleModeConfig as ar, type ScaleModeForApp as as, type SpacingAlias as at, type SpacingConfig as au, type SpacingStyleProps as av, type SpectrumColor as aw, type SpectrumConfig as ax, type StateStyleProps as ay, type StyleProps 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 ButtonConfig as y, type ButtonSize as z };
425
+ export { type Display 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 ButtonVariant as P, type ButtonVariant2 as Q, type ColorModeConfig as R, type ScaleModeForApp as S, type TextTransformConfig as T, type UniversalAvatarProps as U, type ColorsConfig as V, type ConfigurableTextProperty as W, type CorePalette as X, type CorePaletteAlias as Y, type CustomSizingStyleProps as Z, type DataAttribute as _, type UniversalButtonProps as a, type Flex as a0, type FlexAlignContent as a1, type FlexAlignItems as a2, type FlexAlignSelf as a3, type FlexBasis as a4, type FlexDirection as a5, type FlexGrow as a6, type FlexJustifyContent as a7, type FlexShrink as a8, type FlexStyleProps as a9, type Position as aA, type RegionMode as aB, type ScaleConfig as aC, type ScaleModeConfig as aD, type SpacingAlias as aE, type SpacingConfig as aF, type SpacingStyleProps as aG, type SpectrumColor as aH, type SpectrumConfig as aI, type StateStyleProps as aJ, type TextStyleProps as aK, type TextTransform as aL, type TextVariant as aM, type TransitionDelay as aN, type TransitionDuration as aO, type TransitionTiming as aP, type TShirtSize as aQ, type TShirtSizeCommon as aR, type UniversalTextInputProps as aS, type FlexWrap as aa, type FontFamilyGlobalAlias as ab, type FontSize as ac, type FontWeightDescriptive as ad, type FontWeightNumeric as ae, type ForegroundColor as af, type ForegroundPalette as ag, type ForegroundPaletteAlias as ah, type HighContrastMode as ai, type Hue as aj, type HueStep as ak, type IconSize as al, type ImageStyleProps as am, type LayoutStyleProps as an, type LetterSpacing as ao, type LineClampAlias as ap, type LineColor as aq, type LineHeight as ar, type LinePalette as as, type LinePaletteAlias as at, type Overflow as au, type Palette as av, type PaletteConfig as aw, type PaletteType as ax, type PaletteValue as ay, type PlatformMode 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 ButtonComputedColor = {
107
- type: 'computed';
108
- value: `${string} ${string} ${string}`;
109
- meta: {
110
- effect: 'lighten' | 'darken';
111
- hue: Hue;
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 ButtonForegroundPaletteColor = {
115
+ } | ButtonSpectrumColor;
116
+ type ButtonForegroundColor = {
120
117
  type: 'palette';
121
118
  value: ForegroundColor;
122
- };
123
- type ButtonBorderPaletteColor = {
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
- sizes: Record<TShirtSizeCommon, ButtonSizeConfig>;
150
- variants: Record<'primary' | 'secondary' | 'tertiary', ButtonVariantConfig>;
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
- buttons?: ButtonConfig;
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 FontFamilyConfig as $, type AlwaysPalette as A, type BackgroundPaletteAlias as B, type ColorMode as C, type ButtonVariant as D, type ColorModeConfig as E, type ForegroundPaletteAlias as F, type ColorModeForApp as G, type Hue as H, type ConfigurableTextProperty as I, type CorePalette as J, type CustomSizingStyleProps as K, type LinePaletteAlias as L, type DataAttribute as M, type Display as N, type Flex as O, type FlexAlignContent as P, type FlexAlignItems as Q, type FlexAlignSelf as R, type ScaleMode as S, type FlexBasis as T, type UniversalTokensConfig as U, type FlexDirection as V, type FlexGrow as W, type FlexJustifyContent as X, type FlexShrink as Y, type FlexStyleProps as Z, type FlexWrap as _, type ColorsConfig as a, type FontFamilyGlobalAlias as a0, type FontSize as a1, type FontSizeConfig as a2, type FontWeightDescriptive as a3, type ForegroundColor as a4, type ForegroundPalette as a5, type HighContrastMode as a6, type IconSize as a7, type IconSizeConfig as a8, type ImageStyleProps as a9, type TextStyleProps as aA, type TextTransform as aB, type TextTransformConfig as aC, type TextVariant as aD, type TransitionDelay as aE, type TransitionDuration as aF, type TransitionTiming as aG, type TShirtSize as aH, type TShirtSizeCommon as aI, type UniversalAvatarProps as aJ, type UniversalBoxProps as aK, type UniversalButtonProps as aL, type UniversalIconButtonProps as aM, type UniversalIconProps as aN, type UniversalPressableProps as aO, type UniversalTextInputProps as aP, type UniversalTextProps as aQ, type LayoutStyleProps as aa, type LetterSpacing as ab, type LineClampAlias as ac, type LineColor as ad, type LineHeight as ae, type LineHeightConfig as af, type LinePalette as ag, type Modes as ah, type Overflow as ai, type Palette as aj, type PaletteConfig as ak, type PaletteType as al, type PaletteValue as am, type PlatformMode as an, type Position as ao, type RegionMode as ap, type ScaleConfig as aq, type ScaleModeConfig as ar, type ScaleModeForApp as as, type SpacingAlias as at, type SpacingConfig as au, type SpacingStyleProps as av, type SpectrumColor as aw, type SpectrumConfig as ax, type StateStyleProps as ay, type StyleProps 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 ButtonConfig as y, type ButtonSize as z };
425
+ export { type Display 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 ButtonVariant as P, type ButtonVariant2 as Q, type ColorModeConfig as R, type ScaleModeForApp as S, type TextTransformConfig as T, type UniversalAvatarProps as U, type ColorsConfig as V, type ConfigurableTextProperty as W, type CorePalette as X, type CorePaletteAlias as Y, type CustomSizingStyleProps as Z, type DataAttribute as _, type UniversalButtonProps as a, type Flex as a0, type FlexAlignContent as a1, type FlexAlignItems as a2, type FlexAlignSelf as a3, type FlexBasis as a4, type FlexDirection as a5, type FlexGrow as a6, type FlexJustifyContent as a7, type FlexShrink as a8, type FlexStyleProps as a9, type Position as aA, type RegionMode as aB, type ScaleConfig as aC, type ScaleModeConfig as aD, type SpacingAlias as aE, type SpacingConfig as aF, type SpacingStyleProps as aG, type SpectrumColor as aH, type SpectrumConfig as aI, type StateStyleProps as aJ, type TextStyleProps as aK, type TextTransform as aL, type TextVariant as aM, type TransitionDelay as aN, type TransitionDuration as aO, type TransitionTiming as aP, type TShirtSize as aQ, type TShirtSizeCommon as aR, type UniversalTextInputProps as aS, type FlexWrap as aa, type FontFamilyGlobalAlias as ab, type FontSize as ac, type FontWeightDescriptive as ad, type FontWeightNumeric as ae, type ForegroundColor as af, type ForegroundPalette as ag, type ForegroundPaletteAlias as ah, type HighContrastMode as ai, type Hue as aj, type HueStep as ak, type IconSize as al, type ImageStyleProps as am, type LayoutStyleProps as an, type LetterSpacing as ao, type LineClampAlias as ap, type LineColor as aq, type LineHeight as ar, type LinePalette as as, type LinePaletteAlias as at, type Overflow as au, type Palette as av, type PaletteConfig as aw, type PaletteType as ax, type PaletteValue as ay, type PlatformMode 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 ButtonComputedColor = {
107
- type: 'computed';
108
- value: `${string} ${string} ${string}`;
109
- meta: {
110
- effect: 'lighten' | 'darken';
111
- hue: Hue;
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 ButtonForegroundPaletteColor = {
115
+ } | ButtonSpectrumColor;
116
+ type ButtonForegroundColor = {
120
117
  type: 'palette';
121
118
  value: ForegroundColor;
122
- };
123
- type ButtonBorderPaletteColor = {
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
- sizes: Record<TShirtSizeCommon, ButtonSizeConfig>;
150
- variants: Record<'primary' | 'secondary' | 'tertiary', ButtonVariantConfig>;
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
- buttons?: ButtonConfig;
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 FlexAlignContent 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 ButtonSize as N, type ButtonVariant as O, type ColorModeConfig as P, type ColorsConfig as Q, type ConfigurableTextProperty as R, type ScaleModeForApp as S, type TextTransformConfig as T, type UniversalAvatarProps as U, type CorePalette as V, type CorePaletteAlias as W, type CustomSizingStyleProps as X, type DataAttribute as Y, type Display as Z, type Flex as _, type UniversalButtonProps as a, type FlexAlignItems as a0, type FlexAlignSelf as a1, type FlexBasis as a2, type FlexDirection as a3, type FlexGrow as a4, type FlexJustifyContent as a5, type FlexShrink as a6, type FlexStyleProps as a7, type FlexWrap as a8, type FontFamilyGlobalAlias as a9, type ScaleConfig as aA, type ScaleModeConfig as aB, type SpacingAlias as aC, type SpacingConfig as aD, type SpacingStyleProps as aE, type SpectrumColor as aF, type SpectrumConfig as aG, type StateStyleProps as aH, type TextStyleProps as aI, type TextTransform as aJ, type TextVariant as aK, type TransitionDelay as aL, type TransitionDuration as aM, type TransitionTiming as aN, type TShirtSize as aO, type TShirtSizeCommon as aP, type UniversalTextInputProps as aQ, type FontSize as aa, type FontWeightDescriptive as ab, type FontWeightNumeric as ac, type ForegroundColor as ad, type ForegroundPalette as ae, type ForegroundPaletteAlias as af, type HighContrastMode as ag, type Hue as ah, type HueStep as ai, type IconSize as aj, type ImageStyleProps as ak, type LayoutStyleProps as al, type LetterSpacing as am, type LineClampAlias as an, type LineColor as ao, type LineHeight as ap, type LinePalette as aq, type LinePaletteAlias as ar, type Overflow as as, type Palette as at, type PaletteConfig as au, type PaletteType as av, type PaletteValue as aw, type PlatformMode as ax, type Position as ay, type RegionMode 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 };
425
+ export { type FlexStyleProps as $, type AlwaysPalette as A, type BackgroundPaletteAlias as B, type ColorMode as C, type ButtonSize as D, type ButtonVariant as E, type ForegroundPaletteAlias as F, type ButtonVariant2 as G, type Hue as H, type ColorModeConfig as I, type ColorModeForApp as J, type ConfigurableTextProperty as K, type LinePaletteAlias as L, type CorePalette as M, type CustomSizingStyleProps as N, type DataAttribute as O, type Display as P, type Flex as Q, type FlexAlignContent as R, type ScaleMode as S, type FlexAlignItems as T, type UniversalTokensConfig as U, type FlexAlignSelf as V, type FlexBasis as W, type FlexDirection as X, type FlexGrow as Y, type FlexJustifyContent as Z, type FlexShrink as _, type ColorsConfig as a, type FlexWrap as a0, type FontFamilyConfig as a1, type FontFamilyGlobalAlias as a2, type FontSize as a3, type FontSizeConfig as a4, type FontWeightDescriptive as a5, type ForegroundColor as a6, type ForegroundPalette as a7, type HighContrastMode as a8, type IconSize as a9, type StateStyleProps as aA, type StyleProps as aB, type TextStyleProps as aC, type TextTransform as aD, type TextTransformConfig as aE, type TextVariant as aF, type TransitionDelay as aG, type TransitionDuration as aH, type TransitionTiming as aI, type TShirtSize as aJ, type TShirtSizeCommon as aK, type UniversalAvatarProps as aL, type UniversalBoxProps as aM, type UniversalButtonProps as aN, type UniversalIconButtonProps as aO, type UniversalIconProps as aP, type UniversalPressableProps as aQ, type UniversalTextInputProps as aR, type UniversalTextProps as aS, type IconSizeConfig as aa, type ImageStyleProps as ab, type LayoutStyleProps as ac, type LetterSpacing as ad, type LineClampAlias as ae, type LineColor as af, type LineHeight as ag, type LineHeightConfig as ah, type LinePalette as ai, type Modes as aj, type Overflow as ak, type Palette as al, type PaletteConfig as am, type PaletteType as an, type PaletteValue as ao, type PlatformMode as ap, type Position as aq, type RegionMode as ar, type ScaleConfig as as, type ScaleModeConfig as at, type ScaleModeForApp as au, type SpacingAlias as av, type SpacingConfig as aw, type SpacingStyleProps as ax, type SpectrumColor as ay, type SpectrumConfig 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 ButtonComputedColor = {
107
- type: 'computed';
108
- value: `${string} ${string} ${string}`;
109
- meta: {
110
- effect: 'lighten' | 'darken';
111
- hue: Hue;
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 ButtonForegroundPaletteColor = {
115
+ } | ButtonSpectrumColor;
116
+ type ButtonForegroundColor = {
120
117
  type: 'palette';
121
118
  value: ForegroundColor;
122
- };
123
- type ButtonBorderPaletteColor = {
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
- sizes: Record<TShirtSizeCommon, ButtonSizeConfig>;
150
- variants: Record<'primary' | 'secondary' | 'tertiary', ButtonVariantConfig>;
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
- buttons?: ButtonConfig;
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 FlexAlignContent 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 ButtonSize as N, type ButtonVariant as O, type ColorModeConfig as P, type ColorsConfig as Q, type ConfigurableTextProperty as R, type ScaleModeForApp as S, type TextTransformConfig as T, type UniversalAvatarProps as U, type CorePalette as V, type CorePaletteAlias as W, type CustomSizingStyleProps as X, type DataAttribute as Y, type Display as Z, type Flex as _, type UniversalButtonProps as a, type FlexAlignItems as a0, type FlexAlignSelf as a1, type FlexBasis as a2, type FlexDirection as a3, type FlexGrow as a4, type FlexJustifyContent as a5, type FlexShrink as a6, type FlexStyleProps as a7, type FlexWrap as a8, type FontFamilyGlobalAlias as a9, type ScaleConfig as aA, type ScaleModeConfig as aB, type SpacingAlias as aC, type SpacingConfig as aD, type SpacingStyleProps as aE, type SpectrumColor as aF, type SpectrumConfig as aG, type StateStyleProps as aH, type TextStyleProps as aI, type TextTransform as aJ, type TextVariant as aK, type TransitionDelay as aL, type TransitionDuration as aM, type TransitionTiming as aN, type TShirtSize as aO, type TShirtSizeCommon as aP, type UniversalTextInputProps as aQ, type FontSize as aa, type FontWeightDescriptive as ab, type FontWeightNumeric as ac, type ForegroundColor as ad, type ForegroundPalette as ae, type ForegroundPaletteAlias as af, type HighContrastMode as ag, type Hue as ah, type HueStep as ai, type IconSize as aj, type ImageStyleProps as ak, type LayoutStyleProps as al, type LetterSpacing as am, type LineClampAlias as an, type LineColor as ao, type LineHeight as ap, type LinePalette as aq, type LinePaletteAlias as ar, type Overflow as as, type Palette as at, type PaletteConfig as au, type PaletteType as av, type PaletteValue as aw, type PlatformMode as ax, type Position as ay, type RegionMode 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 };
425
+ export { type FlexStyleProps as $, type AlwaysPalette as A, type BackgroundPaletteAlias as B, type ColorMode as C, type ButtonSize as D, type ButtonVariant as E, type ForegroundPaletteAlias as F, type ButtonVariant2 as G, type Hue as H, type ColorModeConfig as I, type ColorModeForApp as J, type ConfigurableTextProperty as K, type LinePaletteAlias as L, type CorePalette as M, type CustomSizingStyleProps as N, type DataAttribute as O, type Display as P, type Flex as Q, type FlexAlignContent as R, type ScaleMode as S, type FlexAlignItems as T, type UniversalTokensConfig as U, type FlexAlignSelf as V, type FlexBasis as W, type FlexDirection as X, type FlexGrow as Y, type FlexJustifyContent as Z, type FlexShrink as _, type ColorsConfig as a, type FlexWrap as a0, type FontFamilyConfig as a1, type FontFamilyGlobalAlias as a2, type FontSize as a3, type FontSizeConfig as a4, type FontWeightDescriptive as a5, type ForegroundColor as a6, type ForegroundPalette as a7, type HighContrastMode as a8, type IconSize as a9, type StateStyleProps as aA, type StyleProps as aB, type TextStyleProps as aC, type TextTransform as aD, type TextTransformConfig as aE, type TextVariant as aF, type TransitionDelay as aG, type TransitionDuration as aH, type TransitionTiming as aI, type TShirtSize as aJ, type TShirtSizeCommon as aK, type UniversalAvatarProps as aL, type UniversalBoxProps as aM, type UniversalButtonProps as aN, type UniversalIconButtonProps as aO, type UniversalIconProps as aP, type UniversalPressableProps as aQ, type UniversalTextInputProps as aR, type UniversalTextProps as aS, type IconSizeConfig as aa, type ImageStyleProps as ab, type LayoutStyleProps as ac, type LetterSpacing as ad, type LineClampAlias as ae, type LineColor as af, type LineHeight as ag, type LineHeightConfig as ah, type LinePalette as ai, type Modes as aj, type Overflow as ak, type Palette as al, type PaletteConfig as am, type PaletteType as an, type PaletteValue as ao, type PlatformMode as ap, type Position as aq, type RegionMode as ar, type ScaleConfig as as, type ScaleModeConfig as at, type ScaleModeForApp as au, type SpacingAlias as av, type SpacingConfig as aw, type SpacingStyleProps as ax, type SpectrumColor as ay, type SpectrumConfig 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 };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@yahoo/uds",
3
3
  "description": "Yahoo Universal System",
4
- "version": "0.5.7",
4
+ "version": "0.5.8",
5
5
  "type": "module",
6
6
  "bin": {
7
7
  "uds": "./cli/uds-cli"