@yahoo/uds 0.5.5 → 0.5.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. package/dist/{Image.native-WgvzTGso.d.ts → Image.native-CIafNow6.d.cts} +2 -2
  2. package/dist/{Image.native-B1tvIZc5.d.cts → Image.native-Cbv-erHz.d.ts} +2 -2
  3. package/dist/{VStack-BbNBxVhv.d.ts → VStack-DTK919lo.d.ts} +79 -28
  4. package/dist/{VStack-Lg_bEcbW.d.cts → VStack-DnjkTYdB.d.cts} +79 -28
  5. package/dist/experimental/index.cjs +4 -4
  6. package/dist/experimental/index.d.cts +41 -12
  7. package/dist/experimental/index.d.ts +41 -12
  8. package/dist/experimental/index.js +3 -3
  9. package/dist/experimental/index.native.cjs +1 -1
  10. package/dist/experimental/index.native.d.cts +4 -4
  11. package/dist/experimental/index.native.d.ts +4 -4
  12. package/dist/experimental/index.native.js +1 -1
  13. package/dist/fixtures.cjs +6 -6
  14. package/dist/fixtures.d.ts +13 -13
  15. package/dist/fixtures.js +6 -6
  16. package/dist/index.cjs +2 -2
  17. package/dist/index.d.cts +37 -21
  18. package/dist/index.d.ts +37 -21
  19. package/dist/index.js +3 -3
  20. package/dist/{index.native-4R8ZV05r.d.ts → index.native-B7lxeKHq.d.ts} +1 -1
  21. package/dist/{index.native-CMLeS7py.d.cts → index.native-y03H93Or.d.cts} +1 -1
  22. package/dist/index.native.cjs +1 -1
  23. package/dist/index.native.d.cts +13 -64
  24. package/dist/index.native.d.ts +13 -64
  25. package/dist/index.native.js +1 -1
  26. package/dist/metafile-cjs.json +1 -1
  27. package/dist/metafile-esm.json +1 -1
  28. package/dist/tailwind/plugin.cjs +1 -1
  29. package/dist/tailwind/plugin.d.cts +1 -1
  30. package/dist/tailwind/plugin.d.ts +1 -1
  31. package/dist/tailwind/plugin.js +2 -2
  32. package/dist/tailwind/purger.cjs +2 -2
  33. package/dist/tailwind/purger.js +2 -2
  34. package/dist/tailwind/tsMorph.cjs +1 -1
  35. package/dist/tailwind/tsMorph.js +3 -3
  36. package/dist/tokens/index.cjs +1 -1
  37. package/dist/tokens/index.d.cts +8 -62
  38. package/dist/tokens/index.d.ts +8 -62
  39. package/dist/tokens/index.js +2 -2
  40. package/dist/tokens/index.native.cjs +1 -1
  41. package/dist/tokens/index.native.d.cts +2 -2
  42. package/dist/tokens/index.native.d.ts +2 -2
  43. package/dist/tokens/index.native.js +1 -1
  44. package/dist/tokens/parseTokens.cjs +1 -1
  45. package/dist/tokens/parseTokens.d.cts +1 -1
  46. package/dist/tokens/parseTokens.d.ts +1 -1
  47. package/dist/tokens/parseTokens.js +1 -1
  48. package/dist/{types-BevSfblh.d.cts → types-BB7LBOmj.d.cts} +60 -15
  49. package/dist/{types-BevSfblh.d.ts → types-BB7LBOmj.d.ts} +60 -15
  50. package/dist/{types-b1Ey4J4B.d.cts → types-DDJJDimt.d.cts} +60 -15
  51. package/dist/{types-b1Ey4J4B.d.ts → types-DDJJDimt.d.ts} +60 -15
  52. package/package.json +1 -1
@@ -54,14 +54,16 @@ type FontFamilyConfig = Record<TextVariant, FontFamilyGlobalAlias>;
54
54
  type FontWeightConfig = Record<TextVariant, FontWeightDescriptive>;
55
55
  type LineHeightConfig = Record<TextVariant, LineHeight>;
56
56
  type ConfigurableTextProperty = 'fontFamily' | 'fontSize' | 'fontWeight' | 'lineHeight' | 'textTransform';
57
- type AvatarSize = 's' | 'm' | 'l';
57
+ type TShirtSize = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'full';
58
+ type TShirtSizeCommon = Extract<TShirtSize, 'sm' | 'md' | 'lg'>;
59
+ type AvatarSize = TShirtSizeCommon;
58
60
  type AvatarSizeConfig = Record<AvatarSize, number>;
59
61
  type AvatarShape = BorderRadius;
60
- type IconSize = 'sm' | 'md' | 'lg';
62
+ type IconSize = TShirtSizeCommon;
61
63
  type IconSizeConfig = Record<IconSize, number>;
62
64
  type SpacingAlias = '0' | 'px' | '0.5' | '1' | '1.5' | '2' | '2.5' | '3' | '3.5' | '4' | '5' | '6' | '7' | '8' | '9' | '10' | '11' | '12' | '14' | '16' | '20' | '24' | '28' | '32' | '36' | '40' | '44' | '48' | '52' | '56' | '60' | '64' | '72' | '80' | '96';
63
65
  type SpacingConfig = Record<SpacingAlias, number>;
64
- type BorderRadius = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'full';
66
+ type BorderRadius = TShirtSize;
65
67
  type BorderRadiusConfig = Record<BorderRadius, number>;
66
68
  type BorderWidth = 'none' | 'thin' | 'medium' | 'thick';
67
69
  type BorderWidthConfig = Record<BorderWidth, number>;
@@ -97,10 +99,61 @@ type ScaleConfig = {
97
99
  textTransform: TextTransformConfig;
98
100
  };
99
101
  type ScaleModeConfig = Record<ScaleMode, ScaleConfig>;
102
+ type ButtonSpectrumColor = {
103
+ type: 'spectrum';
104
+ value: SpectrumColor;
105
+ };
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 = {
116
+ type: 'palette';
117
+ value: BackgroundColor;
118
+ };
119
+ type ButtonForegroundPaletteColor = {
120
+ type: 'palette';
121
+ value: ForegroundColor;
122
+ };
123
+ type ButtonBorderPaletteColor = {
124
+ type: 'palette';
125
+ 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
+ }
148
+ interface ButtonConfig {
149
+ sizes: Record<TShirtSizeCommon, ButtonSizeConfig>;
150
+ variants: Record<'primary' | 'secondary' | 'tertiary', ButtonVariantConfig>;
151
+ }
100
152
  type UniversalTokensConfig = {
101
153
  colorMode: ColorModeConfig;
102
154
  scaleMode: ScaleModeConfig;
103
155
  fontFamily: FontFamilyGlobalConfig;
156
+ buttons?: ButtonConfig;
104
157
  };
105
158
  type PlatformMode = 'web' | 'ios' | 'android';
106
159
  type ColorMode = 'light' | 'dark';
@@ -151,14 +204,6 @@ interface BorderStyleProps {
151
204
  borderBottomEndRadius?: BorderRadius;
152
205
  /** Adds a custom border color from the palette */
153
206
  borderColor?: LineColor;
154
- /** Border color on active. */
155
- borderColorOnActive?: LineColor;
156
- /** Border color on focus. */
157
- borderColorOnFocus?: LineColor;
158
- /** Border color on checked. */
159
- borderColorOnChecked?: LineColor;
160
- /** Border color on hover. */
161
- borderColorOnHover?: LineColor;
162
207
  /** Start border color */
163
208
  borderStartColor?: LineColor;
164
209
  /** End border color */
@@ -311,12 +356,12 @@ interface UniversalPressableProps extends UniversalBoxProps {
311
356
  onPress?: () => void;
312
357
  }
313
358
  type ButtonVariant = CorePaletteAlias | `${CorePaletteAlias}-outline` | `${CorePaletteAlias}-ghost` | 'primary-ghost' | 'primary-outline' | 'secondary';
314
- type ButtonSize = 's' | 'm' | 'l';
359
+ type ButtonSize = TShirtSizeCommon;
315
360
  interface UniversalIconButtonProps {
316
361
  /** The variant of the button. */
317
362
  variant?: ButtonVariant;
318
363
  /** The size of the button. */
319
- size?: ButtonSize;
364
+ size?: UniversalIconProps['size'];
320
365
  /** Icon to render from the icons package. */
321
366
  name: SvgIcon;
322
367
  /** Color for the icon. */
@@ -330,7 +375,7 @@ interface UniversalButtonProps {
330
375
  variant?: ButtonVariant;
331
376
  /**
332
377
  * The size of the button
333
- * @default 'm'
378
+ * @default 'md'
334
379
  */
335
380
  size?: ButtonSize;
336
381
  /** The name of the icon to be displayed at the start of the button. */
@@ -370,4 +415,4 @@ interface UniversalTextInputProps {
370
415
  spacingHorizontal?: SpacingAlias;
371
416
  }
372
417
 
373
- export { type FlexAlignItems as $, type AvatarSizeConfig as A, type BorderRadiusConfig as B, type ColorModeForApp as C, type BackgroundStyleProps as D, type BorderRadius as E, type FontFamilyConfig as F, type BorderStyleProps as G, type BorderWidth as H, type IconSizeConfig as I, type BoxShadowConfig as J, type ButtonSize as K, type LineHeightConfig as L, type Modes as M, type ButtonVariant as N, type ColorModeConfig as O, type ColorsConfig as P, type ConfigurableTextProperty as Q, type CorePalette as R, type ScaleModeForApp as S, type TextTransformConfig as T, type UniversalAvatarProps as U, type CorePaletteAlias as V, type CustomSizingStyleProps as W, type DataAttribute as X, type Display as Y, type Flex as Z, type FlexAlignContent as _, type UniversalButtonProps as a, type FlexAlignSelf as a0, type FlexBasis as a1, type FlexDirection as a2, type FlexGrow as a3, type FlexJustifyContent as a4, type FlexShrink as a5, type FlexStyleProps as a6, type FlexWrap as a7, type FontFamilyGlobalAlias as a8, type FontSize as a9, type ScaleModeConfig as aA, type SpacingAlias as aB, type SpacingConfig as aC, type SpacingStyleProps as aD, type SpectrumColor as aE, type SpectrumConfig as aF, type StateStyleProps as aG, type TextStyleProps as aH, type TextTransform as aI, type TextVariant as aJ, type TransitionDelay as aK, type TransitionDuration as aL, type TransitionTiming as aM, type UniversalTextInputProps as aN, type FontWeightDescriptive as aa, type FontWeightNumeric as ab, type ForegroundColor as ac, type ForegroundPalette as ad, type ForegroundPaletteAlias as ae, type HighContrastMode as af, type Hue as ag, type HueStep as ah, type IconSize as ai, type ImageStyleProps as aj, type LayoutStyleProps as ak, type LetterSpacing as al, type LineClampAlias as am, type LineColor as an, type LineHeight as ao, type LinePalette as ap, type LinePaletteAlias as aq, type Overflow as ar, type Palette as as, type PaletteConfig as at, type PaletteType as au, type PaletteValue as av, type PlatformMode as aw, type Position as ax, type RegionMode as ay, type ScaleConfig 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 BorderWidthConfig as m, type FontSizeConfig as n, type FontWeightConfig as o, type FontFamilyGlobalConfig as p, alwaysPalette as q, type AlwaysPalette as r, type AlwaysPaletteAlias as s, type Animation as t, type AriaAttribute as u, type AvatarShape as v, type AvatarSize as w, type BackgroundColor as x, type BackgroundPalette as y, type BackgroundPaletteAlias as z };
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 };
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.5",
4
+ "version": "0.5.7",
5
5
  "type": "module",
6
6
  "bin": {
7
7
  "uds": "./cli/uds-cli"