@yahoo/uds 0.5.9 → 0.5.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. package/cli/bin/uds-darwin-arm64-baseline +0 -0
  2. package/cli/bin/uds-linux-x64-baseline +0 -0
  3. package/cli/cli.ts +24 -4
  4. package/cli/exec.ts +3 -1
  5. package/cli/uds-cli +3 -1
  6. package/dist/{Image.native-DZW5ek69.d.ts → Image.native-BxsXWBqp.d.ts} +1 -1
  7. package/dist/{Image.native-BhqVvnKU.d.cts → Image.native-DBoB1LOc.d.cts} +1 -1
  8. package/dist/{VStack-C6VjEoRP.d.cts → VStack-BFIFJUVx.d.cts} +1 -1
  9. package/dist/{VStack-BohShRVo.d.ts → VStack-zgq0Zq3N.d.ts} +1 -1
  10. package/dist/experimental/index.cjs +1 -1
  11. package/dist/experimental/index.d.cts +2 -2
  12. package/dist/experimental/index.d.ts +2 -2
  13. package/dist/experimental/index.js +1 -1
  14. package/dist/experimental/index.native.cjs +1 -1
  15. package/dist/experimental/index.native.d.cts +3 -3
  16. package/dist/experimental/index.native.d.ts +3 -3
  17. package/dist/experimental/index.native.js +1 -1
  18. package/dist/fixtures.cjs +26 -1
  19. package/dist/fixtures.d.ts +6 -2
  20. package/dist/fixtures.js +22 -1
  21. package/dist/index.cjs +1 -1
  22. package/dist/index.d.cts +4 -4
  23. package/dist/index.d.ts +4 -4
  24. package/dist/index.js +2 -2
  25. package/dist/{index.native-uBCD4Hr4.d.ts → index.native-Gbm66c6M.d.ts} +1 -1
  26. package/dist/{index.native-dtcAO8DN.d.cts → index.native-OW5d35eT.d.cts} +1 -1
  27. package/dist/index.native.cjs +1 -1
  28. package/dist/index.native.d.cts +5 -4
  29. package/dist/index.native.d.ts +5 -4
  30. package/dist/index.native.js +1 -1
  31. package/dist/metafile-cjs.json +1 -1
  32. package/dist/metafile-esm.json +1 -1
  33. package/dist/tailwind/plugin.cjs +1 -1
  34. package/dist/tailwind/plugin.d.cts +1 -1
  35. package/dist/tailwind/plugin.d.ts +1 -1
  36. package/dist/tailwind/plugin.js +3 -3
  37. package/dist/tailwind/purger.cjs +2 -2
  38. package/dist/tailwind/purger.js +3 -3
  39. package/dist/tailwind/tsMorph.js +1 -1
  40. package/dist/tokens/index.cjs +1 -1
  41. package/dist/tokens/index.d.cts +3 -2
  42. package/dist/tokens/index.d.ts +3 -2
  43. package/dist/tokens/index.js +2 -2
  44. package/dist/tokens/index.native.cjs +1 -1
  45. package/dist/tokens/index.native.d.cts +2 -2
  46. package/dist/tokens/index.native.d.ts +2 -2
  47. package/dist/tokens/index.native.js +1 -1
  48. package/dist/tokens/parseTokens.cjs +1 -1
  49. package/dist/tokens/parseTokens.d.cts +2 -2
  50. package/dist/tokens/parseTokens.d.ts +2 -2
  51. package/dist/tokens/parseTokens.js +1 -1
  52. package/dist/{types-BE7_GGFX.d.cts → types-BofdnBTe.d.cts} +41 -30
  53. package/dist/{types-BE7_GGFX.d.ts → types-BofdnBTe.d.ts} +41 -30
  54. package/dist/{types-D0b0TPQ4.d.cts → types-CLPge83Y.d.cts} +41 -30
  55. package/dist/{types-D0b0TPQ4.d.ts → types-CLPge83Y.d.ts} +41 -30
  56. package/package.json +1 -5
  57. package/cli/bin/uds-darwin-x64 +0 -0
  58. package/cli/bin/uds-linux-arm64 +0 -0
  59. package/cli/bin/uds-windows-x64-baseline.exe +0 -0
@@ -36,6 +36,11 @@ type AlwaysPaletteAlias = keyof AlwaysPalette;
36
36
  type ForegroundColor = CorePaletteAlias | ForegroundPaletteAlias | AlwaysPaletteAlias;
37
37
  type LineColor = CorePaletteAlias | LinePaletteAlias | AlwaysPaletteAlias;
38
38
  type BackgroundColor = CorePaletteAlias | BackgroundPaletteAlias | AlwaysPaletteAlias;
39
+ type PropertyToPaletteAliasMap = {
40
+ backgroundColor: BackgroundColor;
41
+ borderColor: LineColor;
42
+ color: ForegroundColor;
43
+ };
39
44
  type TextVariant = 'display1' | 'display2' | 'display3' | 'title1' | 'title2' | 'title3' | 'title4' | 'headline1' | 'body1' | 'label1' | 'label2' | 'caption1' | 'caption2' | 'legal1';
40
45
  type FontFamilyGlobalAlias = 'icons' | 'sans' | 'sans-beta' | 'sans-condensed' | 'serif-text' | 'serif-display';
41
46
  type FontFamilyGlobalConfig = Record<FontFamilyGlobalAlias, {
@@ -100,27 +105,43 @@ type ScaleConfig = {
100
105
  textTransform: TextTransformConfig;
101
106
  };
102
107
  type ScaleModeConfig = Record<ScaleMode, ScaleConfig>;
103
- type ButtonSpectrumColor = {
104
- type: 'spectrum';
105
- value: SpectrumColor;
106
- };
107
108
  type ButtonSize = TShirtSizeCommon;
108
109
  type ButtonCategory = CorePaletteAlias;
109
110
  type ButtonVariant2 = 'primary' | 'secondary' | 'tertiary';
110
- type ButtonState = 'rest' | 'hover' | 'pressed';
111
+ type ButtonState = 'hover' | 'pressed';
111
112
  type ButtonKind = 'fill' | 'outline' | 'ghost';
112
- type ButtonBackgroundColor = {
113
- type: 'palette';
114
- value: BackgroundColor;
115
- } | ButtonSpectrumColor;
116
- type ButtonForegroundColor = {
117
- type: 'palette';
118
- value: ForegroundColor;
119
- } | ButtonSpectrumColor;
120
- type ButtonBorderColor = {
113
+ type ButtonColorEffect = 'lighten' | 'darken' | 'none' | 'custom';
114
+ type ButtonColorProperty = 'backgroundColor' | 'borderColor' | 'color';
115
+ type ButtonColorEffectConfig = {
116
+ options: ButtonColorEffect[];
117
+ value: ButtonColorEffect;
118
+ };
119
+ type ButtonSpecrtumColor = {
120
+ type: 'spectrum';
121
+ value: SpectrumColor;
122
+ };
123
+ type ButtonPaletteColor<T> = {
121
124
  type: 'palette';
122
- value: LineColor;
123
- } | ButtonSpectrumColor;
125
+ value: T;
126
+ };
127
+ type ButtonColorConfig<Property extends ButtonColorProperty> = ButtonPaletteColor<PropertyToPaletteAliasMap[Property]> | ButtonSpecrtumColor;
128
+ type ButtonColorPropertyConfig = {
129
+ backgroundColor: ButtonColorConfig<'backgroundColor'>;
130
+ borderColor: ButtonColorConfig<'borderColor'>;
131
+ color: ButtonColorConfig<'color'>;
132
+ };
133
+ type ButtonBaseConfig = {
134
+ borderWidth: BorderWidth;
135
+ borderRadius: BorderRadius;
136
+ } & ButtonColorPropertyConfig;
137
+ type ButtonStateConfig = {
138
+ [state in ButtonState]: ButtonColorPropertyConfig;
139
+ };
140
+ type ButtonStateEffectConfig = {
141
+ [state in ButtonState]: {
142
+ [property in ButtonColorProperty]: ButtonColorEffectConfig;
143
+ };
144
+ };
124
145
  interface ButtonConfig {
125
146
  defaults: {
126
147
  category: ButtonCategory;
@@ -140,19 +161,9 @@ interface ButtonConfig {
140
161
  [category in ButtonCategory]: {
141
162
  [variant in ButtonVariant2]: {
142
163
  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
- };
164
+ base: ButtonBaseConfig;
165
+ effect: ButtonStateEffectConfig;
166
+ state: ButtonStateConfig;
156
167
  };
157
168
  };
158
169
  };
@@ -422,4 +433,4 @@ interface UniversalTextInputProps {
422
433
  spacingHorizontal?: SpacingAlias;
423
434
  }
424
435
 
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 };
436
+ export { type ButtonStateConfig 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 ButtonBaseConfig as N, type ButtonCategory as O, type ButtonColorConfig as P, type ButtonColorEffect as Q, type ButtonColorEffectConfig as R, type ScaleModeForApp as S, type TextTransformConfig as T, type UniversalAvatarProps as U, type ButtonColorProperty as V, type ButtonColorPropertyConfig as W, type ButtonKind as X, type ButtonSize as Y, type ButtonSpecrtumColor as Z, type ButtonState as _, type UniversalButtonProps as a, type TransitionTiming as a$, type ButtonStateEffectConfig as a0, type ButtonVariant as a1, type ButtonVariant2 as a2, type ColorModeConfig as a3, type ColorsConfig as a4, type ConfigurableTextProperty as a5, type CorePalette as a6, type CorePaletteAlias as a7, type CustomSizingStyleProps as a8, type DataAttribute as a9, type LineClampAlias as aA, type LineColor as aB, type LineHeight as aC, type LinePalette as aD, type LinePaletteAlias as aE, type Overflow as aF, type Palette as aG, type PaletteConfig as aH, type PaletteType as aI, type PaletteValue as aJ, type PlatformMode as aK, type Position as aL, type PropertyToPaletteAliasMap as aM, type RegionMode as aN, type ScaleConfig as aO, type ScaleModeConfig as aP, type SpacingAlias as aQ, type SpacingConfig as aR, type SpacingStyleProps as aS, type SpectrumColor as aT, type SpectrumConfig as aU, type StateStyleProps as aV, type TextStyleProps as aW, type TextTransform as aX, type TextVariant as aY, type TransitionDelay as aZ, type TransitionDuration as a_, type Display as aa, type Flex as ab, type FlexAlignContent as ac, type FlexAlignItems as ad, type FlexAlignSelf as ae, type FlexBasis as af, type FlexDirection as ag, type FlexGrow as ah, type FlexJustifyContent as ai, type FlexShrink as aj, type FlexStyleProps as ak, type FlexWrap as al, type FontFamilyGlobalAlias as am, type FontSize as an, type FontWeightDescriptive as ao, type FontWeightNumeric as ap, type ForegroundColor as aq, type ForegroundPalette as ar, type ForegroundPaletteAlias as as, type HighContrastMode as at, type Hue as au, type HueStep as av, type IconSize as aw, type ImageStyleProps as ax, type LayoutStyleProps as ay, type LetterSpacing as az, type UniversalPressableProps as b, type TShirtSize as b0, type TShirtSizeCommon as b1, type UniversalTextInputProps as b2, 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.9",
4
+ "version": "0.5.10",
5
5
  "type": "module",
6
6
  "bin": {
7
7
  "uds": "./cli/uds-cli"
@@ -102,14 +102,11 @@
102
102
  "scripts": {
103
103
  "build": "bun run ./scripts/prebuild.ts && tsup && bun run ./scripts/postbuild.ts",
104
104
  "build:cli": "bun ./cli/compile.ts",
105
- "build:css": "tailwindcss --input ./src/tailwind/uds.css --output ./generated/uds.css --config ./src/tailwind/tailwind.config.ts",
106
105
  "build:fixtures": "bun run ./scripts/buildFixtures.ts",
107
- "build:fontcss": "bun run ./scripts/generateFontCSS.ts --output ./generated/fonts.css",
108
106
  "build:purgeCSSData": "bun run ./scripts/generatePurgeCSSData.ts",
109
107
  "clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist && rm -rf .coverage",
110
108
  "dev": "concurrently bun:dev:*",
111
109
  "dev:fixtures": "bun run ./scripts/buildFixtures.ts --watch",
112
- "dev:fontcss": "bun run --watch --clear-screen=false ./scripts/generateFontCSS.ts --output ./generated/fonts.css",
113
110
  "dev:purgeCSSData": "bun run ./scripts/generatePurgeCSSData.ts --watch",
114
111
  "dev:ts": "tsup --watch",
115
112
  "lint": "ESLINT_USE_FLAT_CONFIG=true eslint -c eslint.config.mjs .",
@@ -146,7 +143,6 @@
146
143
  "chalk": "^5.3.0",
147
144
  "concurrently": "^8.2.2",
148
145
  "postcss": "^8.4.38",
149
- "shared": "0.0.7",
150
146
  "tailwindcss": "^3.4.3",
151
147
  "terser": "^5.30.4",
152
148
  "tsconfig": "0.0.1",
Binary file
Binary file