@yahoo/uds 0.5.6 → 0.5.7
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/{Image.native-t6JVy3qi.d.cts → Image.native-CIafNow6.d.cts} +1 -1
- package/dist/{Image.native-B7g_JqfQ.d.ts → Image.native-Cbv-erHz.d.ts} +1 -1
- package/dist/{VStack-BA1lcm0p.d.ts → VStack-DTK919lo.d.ts} +1 -1
- package/dist/{VStack-DoQaz7yf.d.cts → VStack-DnjkTYdB.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 +4 -4
- package/dist/experimental/index.native.d.ts +4 -4
- package/dist/experimental/index.native.js +1 -1
- package/dist/fixtures.cjs +6 -6
- package/dist/fixtures.d.ts +13 -13
- package/dist/fixtures.js +6 -6
- package/dist/index.cjs +2 -2
- package/dist/index.d.cts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +3 -3
- package/dist/{index.native-Cl1NmAGq.d.ts → index.native-B7lxeKHq.d.ts} +1 -1
- package/dist/{index.native-axhnucpt.d.cts → index.native-y03H93Or.d.cts} +1 -1
- package/dist/index.native.cjs +1 -1
- package/dist/index.native.d.cts +13 -8
- package/dist/index.native.d.ts +13 -8
- 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 +1 -1
- package/dist/tailwind/plugin.d.ts +1 -1
- package/dist/tailwind/plugin.js +2 -2
- package/dist/tailwind/purger.cjs +1 -1
- package/dist/tailwind/purger.js +1 -1
- 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 +8 -6
- package/dist/tokens/index.d.ts +8 -6
- 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 +1 -1
- package/dist/tokens/parseTokens.d.ts +1 -1
- package/dist/tokens/parseTokens.js +1 -1
- package/dist/{types-Dg9w4-q2.d.cts → types-BB7LBOmj.d.cts} +60 -7
- package/dist/{types-Dg9w4-q2.d.ts → types-BB7LBOmj.d.ts} +60 -7
- package/dist/{types-yd5VT3UG.d.cts → types-DDJJDimt.d.cts} +60 -7
- package/dist/{types-yd5VT3UG.d.ts → types-DDJJDimt.d.ts} +60 -7
- 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
|
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 =
|
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 =
|
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';
|
@@ -303,12 +356,12 @@ interface UniversalPressableProps extends UniversalBoxProps {
|
|
303
356
|
onPress?: () => void;
|
304
357
|
}
|
305
358
|
type ButtonVariant = CorePaletteAlias | `${CorePaletteAlias}-outline` | `${CorePaletteAlias}-ghost` | 'primary-ghost' | 'primary-outline' | 'secondary';
|
306
|
-
type ButtonSize =
|
359
|
+
type ButtonSize = TShirtSizeCommon;
|
307
360
|
interface UniversalIconButtonProps {
|
308
361
|
/** The variant of the button. */
|
309
362
|
variant?: ButtonVariant;
|
310
363
|
/** The size of the button. */
|
311
|
-
size?:
|
364
|
+
size?: UniversalIconProps['size'];
|
312
365
|
/** Icon to render from the icons package. */
|
313
366
|
name: SvgIcon;
|
314
367
|
/** Color for the icon. */
|
@@ -322,7 +375,7 @@ interface UniversalButtonProps {
|
|
322
375
|
variant?: ButtonVariant;
|
323
376
|
/**
|
324
377
|
* The size of the button
|
325
|
-
* @default '
|
378
|
+
* @default 'md'
|
326
379
|
*/
|
327
380
|
size?: ButtonSize;
|
328
381
|
/** The name of the icon to be displayed at the start of the button. */
|
@@ -362,4 +415,4 @@ interface UniversalTextInputProps {
|
|
362
415
|
spacingHorizontal?: SpacingAlias;
|
363
416
|
}
|
364
417
|
|
365
|
-
export { type
|
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 };
|
@@ -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
|
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 =
|
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 =
|
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';
|
@@ -303,12 +356,12 @@ interface UniversalPressableProps extends UniversalBoxProps {
|
|
303
356
|
onPress?: () => void;
|
304
357
|
}
|
305
358
|
type ButtonVariant = CorePaletteAlias | `${CorePaletteAlias}-outline` | `${CorePaletteAlias}-ghost` | 'primary-ghost' | 'primary-outline' | 'secondary';
|
306
|
-
type ButtonSize =
|
359
|
+
type ButtonSize = TShirtSizeCommon;
|
307
360
|
interface UniversalIconButtonProps {
|
308
361
|
/** The variant of the button. */
|
309
362
|
variant?: ButtonVariant;
|
310
363
|
/** The size of the button. */
|
311
|
-
size?:
|
364
|
+
size?: UniversalIconProps['size'];
|
312
365
|
/** Icon to render from the icons package. */
|
313
366
|
name: SvgIcon;
|
314
367
|
/** Color for the icon. */
|
@@ -322,7 +375,7 @@ interface UniversalButtonProps {
|
|
322
375
|
variant?: ButtonVariant;
|
323
376
|
/**
|
324
377
|
* The size of the button
|
325
|
-
* @default '
|
378
|
+
* @default 'md'
|
326
379
|
*/
|
327
380
|
size?: ButtonSize;
|
328
381
|
/** The name of the icon to be displayed at the start of the button. */
|
@@ -362,4 +415,4 @@ interface UniversalTextInputProps {
|
|
362
415
|
spacingHorizontal?: SpacingAlias;
|
363
416
|
}
|
364
417
|
|
365
|
-
export { type
|
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 };
|
@@ -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
|
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 =
|
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 =
|
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';
|
@@ -303,12 +356,12 @@ interface UniversalPressableProps extends UniversalBoxProps {
|
|
303
356
|
onPress?: () => void;
|
304
357
|
}
|
305
358
|
type ButtonVariant = CorePaletteAlias | `${CorePaletteAlias}-outline` | `${CorePaletteAlias}-ghost` | 'primary-ghost' | 'primary-outline' | 'secondary';
|
306
|
-
type ButtonSize =
|
359
|
+
type ButtonSize = TShirtSizeCommon;
|
307
360
|
interface UniversalIconButtonProps {
|
308
361
|
/** The variant of the button. */
|
309
362
|
variant?: ButtonVariant;
|
310
363
|
/** The size of the button. */
|
311
|
-
size?:
|
364
|
+
size?: UniversalIconProps['size'];
|
312
365
|
/** Icon to render from the icons package. */
|
313
366
|
name: SvgIcon;
|
314
367
|
/** Color for the icon. */
|
@@ -322,7 +375,7 @@ interface UniversalButtonProps {
|
|
322
375
|
variant?: ButtonVariant;
|
323
376
|
/**
|
324
377
|
* The size of the button
|
325
|
-
* @default '
|
378
|
+
* @default 'md'
|
326
379
|
*/
|
327
380
|
size?: ButtonSize;
|
328
381
|
/** The name of the icon to be displayed at the start of the button. */
|
@@ -362,4 +415,4 @@ interface UniversalTextInputProps {
|
|
362
415
|
spacingHorizontal?: SpacingAlias;
|
363
416
|
}
|
364
417
|
|
365
|
-
export { type
|
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 };
|
@@ -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
|
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 =
|
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 =
|
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';
|
@@ -303,12 +356,12 @@ interface UniversalPressableProps extends UniversalBoxProps {
|
|
303
356
|
onPress?: () => void;
|
304
357
|
}
|
305
358
|
type ButtonVariant = CorePaletteAlias | `${CorePaletteAlias}-outline` | `${CorePaletteAlias}-ghost` | 'primary-ghost' | 'primary-outline' | 'secondary';
|
306
|
-
type ButtonSize =
|
359
|
+
type ButtonSize = TShirtSizeCommon;
|
307
360
|
interface UniversalIconButtonProps {
|
308
361
|
/** The variant of the button. */
|
309
362
|
variant?: ButtonVariant;
|
310
363
|
/** The size of the button. */
|
311
|
-
size?:
|
364
|
+
size?: UniversalIconProps['size'];
|
312
365
|
/** Icon to render from the icons package. */
|
313
366
|
name: SvgIcon;
|
314
367
|
/** Color for the icon. */
|
@@ -322,7 +375,7 @@ interface UniversalButtonProps {
|
|
322
375
|
variant?: ButtonVariant;
|
323
376
|
/**
|
324
377
|
* The size of the button
|
325
|
-
* @default '
|
378
|
+
* @default 'md'
|
326
379
|
*/
|
327
380
|
size?: ButtonSize;
|
328
381
|
/** The name of the icon to be displayed at the start of the button. */
|
@@ -362,4 +415,4 @@ interface UniversalTextInputProps {
|
|
362
415
|
spacingHorizontal?: SpacingAlias;
|
363
416
|
}
|
364
417
|
|
365
|
-
export { type
|
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 };
|