@yahoo/uds 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cli/README.md +2 -8
- package/cli/bunfig.toml +3 -0
- package/cli/commands/expo/_setup.ts +1 -0
- package/cli/commands/expo/build.ts +1 -1
- package/cli/commands/expo/launch.ts +1 -1
- package/cli/commands/purge.ts +1 -1
- package/cli/commands/sync.ts +16 -4
- package/cli/commands/uds.ts +4 -1
- package/cli/commands/version.ts +1 -1
- package/cli/preload.ts +42 -0
- package/cli/utils/configWorker.ts +30 -11
- package/cli/utils/getCommandHelp.ts +22 -13
- package/cli/utils/purgeCSS.test.ts +139 -0
- package/cli/utils/purgeCSS.ts +72 -8
- package/cli/utils/setupConfigWorker.ts +8 -38
- package/cli/utils/types.ts +5 -2
- package/dist/{Image.native-tkOXN29I.d.ts → Image.native-C6kOWgnf.d.ts} +1 -1
- package/dist/{Image.native-jCNIrPZD.d.cts → Image.native-VeXt5aeI.d.cts} +1 -1
- package/dist/VStack-BSD9TbBd.d.cts +114 -0
- package/dist/VStack-Dk3-8IyU.d.ts +114 -0
- package/dist/experimental/index.cjs +1 -1
- package/dist/experimental/index.d.cts +5 -4
- package/dist/experimental/index.d.ts +5 -4
- package/dist/experimental/index.js +1 -1
- package/dist/experimental/index.native.cjs +1 -1
- package/dist/experimental/index.native.d.cts +3 -3
- package/dist/experimental/index.native.d.ts +3 -3
- package/dist/experimental/index.native.js +1 -1
- package/dist/fixtures/index.cjs +1 -1
- package/dist/fixtures/index.d.cts +15 -1
- package/dist/fixtures/index.d.ts +15 -1
- package/dist/fixtures/index.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +133 -184
- package/dist/index.d.ts +133 -184
- package/dist/index.js +1 -1
- package/dist/{index.native-xVHqKK0u.d.ts → index.native-CisPq4BI.d.ts} +1 -1
- package/dist/{index.native--Dm3KDDS.d.cts → index.native-DJlx-bfM.d.cts} +1 -1
- package/dist/index.native.cjs +1 -1
- package/dist/index.native.d.cts +5 -5
- package/dist/index.native.d.ts +5 -5
- package/dist/index.native.js +1 -1
- package/dist/tailwindPlugin.cjs +1 -1
- package/dist/tailwindPlugin.d.cts +1 -1
- package/dist/tailwindPlugin.d.ts +1 -1
- package/dist/tailwindPlugin.js +1 -1
- package/dist/tailwindPurge/utils.cjs +1 -0
- package/dist/tailwindPurge/utils.d.cts +25 -0
- package/dist/tailwindPurge/utils.d.ts +25 -0
- package/dist/tailwindPurge/utils.js +1 -0
- package/dist/tailwindPurge.cjs +1 -1
- package/dist/tailwindPurge.d.cts +5 -1
- package/dist/tailwindPurge.d.ts +5 -1
- package/dist/tailwindPurge.js +1 -1
- package/dist/tokens/index.cjs +1 -1
- package/dist/tokens/index.d.cts +2 -2
- package/dist/tokens/index.d.ts +2 -2
- package/dist/tokens/index.js +1 -1
- 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/tokens/parseTokens.native.d.cts +1 -1
- package/dist/tokens/parseTokens.native.d.ts +1 -1
- package/dist/{types-7oEBWtMQ.d.cts → types-CzJpH_Oi.d.cts} +2 -2
- package/dist/{types-7oEBWtMQ.d.ts → types-CzJpH_Oi.d.ts} +2 -2
- package/package.json +18 -2
- package/dist/Pressable-2kgXQNVs.d.cts +0 -55
- package/dist/Pressable-LIDkIIAF.d.ts +0 -55
- /package/dist/{types-J4DLS6Xj.d.cts → types-FO65RM-W.d.cts} +0 -0
- /package/dist/{types-J4DLS6Xj.d.ts → types-FO65RM-W.d.ts} +0 -0
@@ -69,7 +69,7 @@ type AlwaysPaletteAlias = keyof AlwaysPalette;
|
|
69
69
|
type ForegroundColor = CorePaletteAlias | ForegroundPaletteAlias | AlwaysPaletteAlias;
|
70
70
|
type LineColor = CorePaletteAlias | LinePaletteAlias | AlwaysPaletteAlias;
|
71
71
|
type BackgroundColor = CorePaletteAlias | BackgroundPaletteAlias | BackgroundWashPaletteAlias | ElevationPaletteAlias | AlwaysPaletteAlias;
|
72
|
-
type TextVariant = 'display1' | 'title1' | 'title2' | 'title3' | 'title4' | 'headline1' | 'body1' | 'label1' | 'label2' | 'caption1' | 'caption2' | 'legal1';
|
72
|
+
type TextVariant = 'display1' | 'display2' | 'display3' | 'title1' | 'title2' | 'title3' | 'title4' | 'headline1' | 'body1' | 'label1' | 'label2' | 'caption1' | 'caption2' | 'legal1';
|
73
73
|
type FontFamilyGlobalAlias = 'icons' | 'sans' | 'sans-beta' | 'sans-condensed' | 'serif-text' | 'serif-display';
|
74
74
|
type FontFamilyGlobalConfig = Record<FontFamilyGlobalAlias, {
|
75
75
|
fallbacks: string[];
|
@@ -481,4 +481,4 @@ interface UniversalTextInputProps {
|
|
481
481
|
spacingHorizontal?: SpacingAlias;
|
482
482
|
}
|
483
483
|
|
484
|
-
export { type Display as $, type AlwaysPalette as A, type BackgroundPalette as B, type ColorMode as C, type BackgroundColor as D, type ElevationConfig as E, type ForegroundPalette as F, type BackgroundPaletteAlias as G, type Hue as H, type BackgroundStyleProps as I, type BackgroundWashPaletteAlias as J, type BorderRadius as K, type LinePalette as L, type BorderRadiusConfig as M, type BorderStyleProps as N, type BorderWidth as O, type PaletteValue as P, type BorderWidthConfig as Q, type BoxShadowConfig as R, type ScaleMode as S, type ButtonSize as T, type UniversalTokensConfig as U, type ButtonVariant as V, type ColorModeForApp as W, type ConfigurableTextProperty as X, type CorePaletteAlias as Y, type CustomSizingStyleProps as Z, type DataAttribute as _, type ColorsConfig as a, type TransitionTiming as a$, type ElevationPaletteAlias as a0, type Flex as a1, type FlexAlignContent as a2, type FlexAlignItems as a3, type FlexAlignSelf as a4, type FlexBasis as a5, type FlexDirection as a6, type FlexGrow as a7, type FlexJustifyContent as a8, type FlexShrink as a9, type Modes as aA, type Opacity as aB, type OpacityStyleProps as aC, type Overflow as aD, type Palette as aE, type PaletteConfig as aF, type PaletteType as aG, type PlatformMode as aH, type Position as aI, type RegionMode as aJ, type ScaleConfig as aK, type ScaleModeConfig as aL, type ScaleModeForApp as aM, type SizingStyleProps as aN, type SpacingAlias as aO, type SpacingConfig as aP, type SpacingStyleProps as aQ, type SpectrumColor as aR, type SpectrumConfig as aS, type StateStyleProps as aT, type StyleProps as aU, type TextStyleProps as aV, type TextTransform as aW, type TextTransformConfig as aX, type TextVariant as aY, type TransitionDelay as aZ, type TransitionDuration as a_, type FlexStyleProps as aa, type FlexWrap as ab, type FontFamilyConfig as ac, type FontFamilyGlobalAlias as ad, type FontSize as ae, type FontSizeConfig as af, type FontWeightDescriptive as ag, type ForegroundColor as ah, type ForegroundPaletteAlias as ai, type Height as aj, type HighContrastMode as ak, type IconName as al, type IconSize as am, type IconSizeConfig as an, type ImageStyleProps as ao, type LayoutStyleProps as ap, type LetterSpacing as aq, type LineClampAlias as ar, type LineColor as as, type LineHeight as at, type LineHeightConfig as au, type LinePaletteAlias as av, type MaxHeight as aw, type MaxWidth as ax, type MinHeight as ay, type MinWidth as az, type HueStep as b, type UniversalTextInputProps as b0, type Width as b1, type ZIndex as b2, type ZIndexConfig as b3, type CorePalette as c, type BackgroundWashPalette as d, type FontWeightConfig as e, type FontWeightNumeric as f, type Elevation as g, type FontFamilyGlobalConfig as h, type
|
484
|
+
export { type Display as $, type AlwaysPalette as A, type BackgroundPalette as B, type ColorMode as C, type BackgroundColor as D, type ElevationConfig as E, type ForegroundPalette as F, type BackgroundPaletteAlias as G, type Hue as H, type BackgroundStyleProps as I, type BackgroundWashPaletteAlias as J, type BorderRadius as K, type LinePalette as L, type BorderRadiusConfig as M, type BorderStyleProps as N, type BorderWidth as O, type PaletteValue as P, type BorderWidthConfig as Q, type BoxShadowConfig as R, type ScaleMode as S, type ButtonSize as T, type UniversalTokensConfig as U, type ButtonVariant as V, type ColorModeForApp as W, type ConfigurableTextProperty as X, type CorePaletteAlias as Y, type CustomSizingStyleProps as Z, type DataAttribute as _, type ColorsConfig as a, type TransitionTiming as a$, type ElevationPaletteAlias as a0, type Flex as a1, type FlexAlignContent as a2, type FlexAlignItems as a3, type FlexAlignSelf as a4, type FlexBasis as a5, type FlexDirection as a6, type FlexGrow as a7, type FlexJustifyContent as a8, type FlexShrink as a9, type Modes as aA, type Opacity as aB, type OpacityStyleProps as aC, type Overflow as aD, type Palette as aE, type PaletteConfig as aF, type PaletteType as aG, type PlatformMode as aH, type Position as aI, type RegionMode as aJ, type ScaleConfig as aK, type ScaleModeConfig as aL, type ScaleModeForApp as aM, type SizingStyleProps as aN, type SpacingAlias as aO, type SpacingConfig as aP, type SpacingStyleProps as aQ, type SpectrumColor as aR, type SpectrumConfig as aS, type StateStyleProps as aT, type StyleProps as aU, type TextStyleProps as aV, type TextTransform as aW, type TextTransformConfig as aX, type TextVariant as aY, type TransitionDelay as aZ, type TransitionDuration as a_, type FlexStyleProps as aa, type FlexWrap as ab, type FontFamilyConfig as ac, type FontFamilyGlobalAlias as ad, type FontSize as ae, type FontSizeConfig as af, type FontWeightDescriptive as ag, type ForegroundColor as ah, type ForegroundPaletteAlias as ai, type Height as aj, type HighContrastMode as ak, type IconName as al, type IconSize as am, type IconSizeConfig as an, type ImageStyleProps as ao, type LayoutStyleProps as ap, type LetterSpacing as aq, type LineClampAlias as ar, type LineColor as as, type LineHeight as at, type LineHeightConfig as au, type LinePaletteAlias as av, type MaxHeight as aw, type MaxWidth as ax, type MinHeight as ay, type MinWidth as az, type HueStep as b, type UniversalTextInputProps as b0, type Width as b1, type ZIndex as b2, type ZIndexConfig as b3, type CorePalette as c, type BackgroundWashPalette as d, type FontWeightConfig as e, type FontWeightNumeric as f, type Elevation as g, type FontFamilyGlobalConfig as h, type UniversalAvatarProps as i, type UniversalButtonProps as j, type UniversalBoxProps as k, type UniversalPressableProps as l, type UniversalStackProps as m, type UniversalIconButtonProps as n, type UniversalImageProps as o, type UniversalIconProps as p, type UniversalTextProps as q, alwaysPalette as r, type AlwaysPaletteAlias as s, type Animation as t, type AriaAttribute as u, type AspectRatio as v, type AspectRatioConfig as w, type AvatarShape as x, type AvatarSize as y, type AvatarSizeConfig 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.
|
4
|
+
"version": "0.3.0",
|
5
5
|
"type": "module",
|
6
6
|
"bin": {
|
7
7
|
"uds": "./cli/uds-cli"
|
@@ -64,6 +64,16 @@
|
|
64
64
|
"default": "./dist/tailwindPurge.cjs"
|
65
65
|
}
|
66
66
|
},
|
67
|
+
"./tailwindPurge/utils": {
|
68
|
+
"import": {
|
69
|
+
"types": "./dist/tailwindPurge/utils.d.ts",
|
70
|
+
"default": "./dist/tailwindPurge/utils.js"
|
71
|
+
},
|
72
|
+
"require": {
|
73
|
+
"types": "./dist/tailwindPurge/utils.cjs",
|
74
|
+
"default": "./dist/tailwindPurge/utils.cjs"
|
75
|
+
}
|
76
|
+
},
|
67
77
|
"./fixtures": {
|
68
78
|
"import": {
|
69
79
|
"types": "./dist/fixtures/index.d.ts",
|
@@ -124,6 +134,9 @@
|
|
124
134
|
"lint": "ESLINT_USE_FLAT_CONFIG=true eslint -c eslint.config.mjs .",
|
125
135
|
"lint:pkg": "bun publint",
|
126
136
|
"test": "vitest run",
|
137
|
+
"test:bun": "bun run test:bun:scripts && bun run test:bun:cli",
|
138
|
+
"test:bun:cli": "cd ./cli && bun test",
|
139
|
+
"test:bun:scripts": "cd ./scripts && bun test",
|
127
140
|
"test:coverage": "vitest run --coverage",
|
128
141
|
"test:ui": "vitest --ui --coverage",
|
129
142
|
"test:watch": "vitest",
|
@@ -134,7 +147,6 @@
|
|
134
147
|
},
|
135
148
|
"dependencies": {
|
136
149
|
"@ariakit/react": "^0.4.0",
|
137
|
-
"@expo/eas-json": "^7.1.0",
|
138
150
|
"bluebun": "0.0.34",
|
139
151
|
"clsx": "^2.1.0",
|
140
152
|
"fast-glob": "^3.3.2",
|
@@ -143,11 +155,15 @@
|
|
143
155
|
"ts-morph": "^21.0.1"
|
144
156
|
},
|
145
157
|
"devDependencies": {
|
158
|
+
"@fullhuman/postcss-purgecss": "^5.0.0",
|
146
159
|
"@types/react": "^18.2.48",
|
147
160
|
"@types/react-dom": "^18.2.18",
|
161
|
+
"autoprefixer": "^10.4.17",
|
148
162
|
"chalk": "^5.3.0",
|
149
163
|
"concurrently": "^8.2.2",
|
164
|
+
"postcss": "^8.4.35",
|
150
165
|
"shared": "workspace:*",
|
166
|
+
"tailwindcss": "^3.4.1",
|
151
167
|
"tsconfig": "workspace:*",
|
152
168
|
"tsup": "^8.0.1"
|
153
169
|
},
|
@@ -1,55 +0,0 @@
|
|
1
|
-
import * as react from 'react';
|
2
|
-
import { i as UniversalBoxProps, j as UniversalPressableProps } from './types-7oEBWtMQ.cjs';
|
3
|
-
|
4
|
-
type DivProps = React.HTMLAttributes<HTMLDivElement>;
|
5
|
-
interface BoxProps extends UniversalBoxProps, DivProps {
|
6
|
-
}
|
7
|
-
/**
|
8
|
-
* A layout primitive that can be used to compose other components.
|
9
|
-
* @example
|
10
|
-
```tsx
|
11
|
-
import { Box } from "@yahoo/uds"
|
12
|
-
|
13
|
-
export function Demo() {
|
14
|
-
return (
|
15
|
-
<Box
|
16
|
-
bordered
|
17
|
-
backgroundColor="primary"
|
18
|
-
borderRadius="md"
|
19
|
-
spacing='6'
|
20
|
-
>
|
21
|
-
Any kind of content can go here!
|
22
|
-
</Box>
|
23
|
-
)
|
24
|
-
}
|
25
|
-
```
|
26
|
-
*/
|
27
|
-
declare const Box: react.ForwardRefExoticComponent<BoxProps & react.RefAttributes<HTMLDivElement>>;
|
28
|
-
|
29
|
-
type HtmlButtonProps = Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'color' | 'name'>;
|
30
|
-
interface PressableProps extends UniversalPressableProps, HtmlButtonProps {
|
31
|
-
}
|
32
|
-
/**
|
33
|
-
* Provides press interactions with accessibility support.
|
34
|
-
* @example
|
35
|
-
```tsx
|
36
|
-
import { Pressable, Text } from "@yahoo/uds"
|
37
|
-
|
38
|
-
export function Demo() {
|
39
|
-
return (
|
40
|
-
<Pressable
|
41
|
-
onClick={console.log}
|
42
|
-
backgroundColor="secondary"
|
43
|
-
bordered
|
44
|
-
borderColor="primary"
|
45
|
-
borderRadius="lg"
|
46
|
-
>
|
47
|
-
<Text variant="body1" spacingHorizontal="7" spacingVertical="5">Click me...</Text>
|
48
|
-
</Pressable>
|
49
|
-
)
|
50
|
-
}
|
51
|
-
```
|
52
|
-
*/
|
53
|
-
declare const Pressable: react.ForwardRefExoticComponent<PressableProps & react.RefAttributes<HTMLButtonElement>>;
|
54
|
-
|
55
|
-
export { Box as B, type DivProps as D, Pressable as P, type BoxProps as a, type PressableProps as b };
|
@@ -1,55 +0,0 @@
|
|
1
|
-
import * as react from 'react';
|
2
|
-
import { i as UniversalBoxProps, j as UniversalPressableProps } from './types-7oEBWtMQ.js';
|
3
|
-
|
4
|
-
type DivProps = React.HTMLAttributes<HTMLDivElement>;
|
5
|
-
interface BoxProps extends UniversalBoxProps, DivProps {
|
6
|
-
}
|
7
|
-
/**
|
8
|
-
* A layout primitive that can be used to compose other components.
|
9
|
-
* @example
|
10
|
-
```tsx
|
11
|
-
import { Box } from "@yahoo/uds"
|
12
|
-
|
13
|
-
export function Demo() {
|
14
|
-
return (
|
15
|
-
<Box
|
16
|
-
bordered
|
17
|
-
backgroundColor="primary"
|
18
|
-
borderRadius="md"
|
19
|
-
spacing='6'
|
20
|
-
>
|
21
|
-
Any kind of content can go here!
|
22
|
-
</Box>
|
23
|
-
)
|
24
|
-
}
|
25
|
-
```
|
26
|
-
*/
|
27
|
-
declare const Box: react.ForwardRefExoticComponent<BoxProps & react.RefAttributes<HTMLDivElement>>;
|
28
|
-
|
29
|
-
type HtmlButtonProps = Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'color' | 'name'>;
|
30
|
-
interface PressableProps extends UniversalPressableProps, HtmlButtonProps {
|
31
|
-
}
|
32
|
-
/**
|
33
|
-
* Provides press interactions with accessibility support.
|
34
|
-
* @example
|
35
|
-
```tsx
|
36
|
-
import { Pressable, Text } from "@yahoo/uds"
|
37
|
-
|
38
|
-
export function Demo() {
|
39
|
-
return (
|
40
|
-
<Pressable
|
41
|
-
onClick={console.log}
|
42
|
-
backgroundColor="secondary"
|
43
|
-
bordered
|
44
|
-
borderColor="primary"
|
45
|
-
borderRadius="lg"
|
46
|
-
>
|
47
|
-
<Text variant="body1" spacingHorizontal="7" spacingVertical="5">Click me...</Text>
|
48
|
-
</Pressable>
|
49
|
-
)
|
50
|
-
}
|
51
|
-
```
|
52
|
-
*/
|
53
|
-
declare const Pressable: react.ForwardRefExoticComponent<PressableProps & react.RefAttributes<HTMLButtonElement>>;
|
54
|
-
|
55
|
-
export { Box as B, type DivProps as D, Pressable as P, type BoxProps as a, type PressableProps as b };
|
File without changes
|
File without changes
|