@yahoo/uds 2.0.0 → 2.1.1
Sign up to get free protection for your applications and to get access to all the features.
- package/cli/README.md +50 -0
- package/cli/bin/uds-darwin-arm64-baseline +0 -0
- package/cli/bin/uds-linux-arm64 +0 -0
- package/cli/bin/uds-linux-x64-baseline +0 -0
- package/cli/cli.ts +21 -4
- package/cli/commands/codemod/codemod.ts +12 -9
- package/cli/commands/codemod/sizingProps.ts +1 -1
- package/cli/commands/login.ts +30 -0
- package/cli/commands/logout.ts +27 -0
- package/cli/commands/purge.ts +3 -1
- package/cli/commands/sync.ts +2 -0
- package/cli/commands/uds.ts +6 -1
- package/cli/commands/version.ts +2 -0
- package/cli/compile.ts +8 -9
- package/cli/consts.ts +5 -1
- package/cli/env.d.ts +5 -0
- package/cli/exec.ts +1 -1
- package/cli/preload.ts +17 -0
- package/cli/tsconfig.json +4 -4
- package/cli/uds-cli +6 -2
- package/cli/utils/analytics.ts +26 -0
- package/cli/utils/auth.ts +338 -0
- package/cli/utils/client_secrets.json +23 -0
- package/cli/utils/client_secrets.json.enc +0 -0
- package/cli/utils/configWorker.ts +3 -2
- package/cli/utils/getDirChoices.ts +0 -1
- package/cli/utils/secrets.ts +40 -0
- package/dist/analytics/server.cjs +1 -0
- package/dist/analytics/server.d.cts +1 -0
- package/dist/analytics/server.d.ts +1 -0
- package/dist/analytics/server.js +1 -0
- package/dist/chunk-3PK6DOFO.js +3 -0
- package/dist/chunk-5WBROFT5.cjs +1 -0
- package/dist/chunk-DCXVARRB.cjs +1 -0
- package/dist/chunk-DMMTEAJW.cjs +2 -0
- package/dist/chunk-EYFQOFYW.cjs +1 -0
- package/dist/chunk-FWF2C6TL.cjs +1 -0
- package/dist/chunk-GIJ2FHY5.cjs +1 -0
- package/dist/chunk-IUL5ZI4O.js +2 -0
- package/dist/chunk-JGIKFUBH.cjs +2 -0
- package/dist/chunk-P5B5IOMM.js +2 -0
- package/dist/chunk-PE2P7J44.js +2 -0
- package/dist/chunk-PFT3UA6K.cjs +2 -0
- package/dist/chunk-SUASN3GG.js +2 -0
- package/dist/chunk-VPR62GYQ.js +2 -0
- package/dist/chunk-X6F5UEQ5.js +2 -0
- package/dist/chunk-YM5TKITI.js +2 -0
- package/dist/chunk-YUHY3FXT.cjs +1 -0
- package/dist/chunk-ZV62SW5G.js +1 -0
- package/dist/client/index.cjs +3 -0
- package/dist/client/index.d.cts +97 -0
- package/dist/client/index.d.ts +97 -0
- package/dist/client/index.js +4 -0
- package/dist/experimental/index.cjs +2 -0
- package/dist/experimental/index.d.cts +469 -0
- package/dist/experimental/index.d.ts +469 -0
- package/dist/experimental/index.js +2 -0
- package/dist/fixtures.cjs +1506 -0
- package/dist/fixtures.d.cts +94 -0
- package/dist/fixtures.d.ts +94 -0
- package/dist/fixtures.js +1449 -0
- package/dist/flags.cjs +1 -0
- package/dist/flags.d.cts +17 -0
- package/dist/flags.d.ts +17 -0
- package/dist/flags.js +2 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.cts +385 -0
- package/dist/index.d.ts +385 -0
- package/dist/index.js +1 -0
- package/dist/metafile-cjs.json +1 -0
- package/dist/metafile-esm.json +1 -0
- package/dist/motionFeatures-I76FFCTS.js +1 -0
- package/dist/motionFeatures-P3FQL2KP.cjs +1 -0
- package/dist/styles/toast.css +1 -0
- package/dist/styles/toast.d.cts +2 -0
- package/dist/styles/toast.d.ts +2 -0
- package/dist/tailwind/plugin.cjs +2 -0
- package/dist/tailwind/plugin.d.cts +60 -0
- package/dist/tailwind/plugin.d.ts +60 -0
- package/dist/tailwind/plugin.js +2 -0
- package/dist/tailwind/purger.cjs +5 -0
- package/dist/tailwind/purger.d.cts +17 -0
- package/dist/tailwind/purger.d.ts +17 -0
- package/dist/tailwind/purger.js +6 -0
- package/dist/tailwind/tsMorph.cjs +1 -0
- package/dist/tailwind/tsMorph.d.cts +31 -0
- package/dist/tailwind/tsMorph.d.ts +31 -0
- package/dist/tailwind/tsMorph.js +1 -0
- package/dist/tailwind/utils.cjs +1 -0
- package/dist/tailwind/utils.d.cts +99 -0
- package/dist/tailwind/utils.d.ts +99 -0
- package/dist/tailwind/utils.js +1 -0
- package/dist/tokens/index.cjs +1 -0
- package/dist/tokens/index.d.cts +1127 -0
- package/dist/tokens/index.d.ts +1127 -0
- package/dist/tokens/index.js +1 -0
- package/dist/tokens/parseTokens.cjs +1 -0
- package/dist/tokens/parseTokens.d.cts +59 -0
- package/dist/tokens/parseTokens.d.ts +59 -0
- package/dist/tokens/parseTokens.js +1 -0
- package/dist/types-Pyccco5Q.d.cts +949 -0
- package/dist/types-Pyccco5Q.d.ts +949 -0
- package/fonts/mobile.cjs +1 -1
- package/package.json +49 -22
- package/cli/codemods/propsToClass.test.tsx +0 -97
- package/cli/utils/purgeCSS.test.ts +0 -210
@@ -0,0 +1,99 @@
|
|
1
|
+
import { M as MotionVariant, g as MotionVariantSpeed, k as MotionSpringConfigOptions, l as MotionConfig, m as FontID, n as FontDeclarationConfig, o as FontConfig } from '../types-Pyccco5Q.js';
|
2
|
+
import * as tailwindcss_types_config from 'tailwindcss/types/config';
|
3
|
+
import { WebTokens } from '../tokens/parseTokens.js';
|
4
|
+
import '@yahoo/uds-icons/types';
|
5
|
+
import 'framer-motion';
|
6
|
+
import 'react';
|
7
|
+
|
8
|
+
interface GetMotionVarParams {
|
9
|
+
variant: MotionVariant;
|
10
|
+
speed: MotionVariantSpeed;
|
11
|
+
control: MotionSpringConfigOptions;
|
12
|
+
}
|
13
|
+
declare function getMotionVar({ variant, speed, control }: GetMotionVarParams): string;
|
14
|
+
/**
|
15
|
+
* Return CSS variables object based on the motion config.
|
16
|
+
* i.e. { --uds-motion-damped-1--damping: '20.585796264350424' }
|
17
|
+
*
|
18
|
+
* @example
|
19
|
+
* // 1. Use return value in style prop of an html element to assign motion variables at runtime
|
20
|
+
*
|
21
|
+
* const motionVars = getMotionStyles(motionConfig);
|
22
|
+
* <body style={motionVars}> {...} </body>
|
23
|
+
*
|
24
|
+
* // 2. Generate CSS at build time in tailwind plugin via Tailwind's addBase or addComponent.
|
25
|
+
*
|
26
|
+
* const motionVars = getMotionStyles(motionConfig);
|
27
|
+
* addBase({ ':root': motionVars });
|
28
|
+
*
|
29
|
+
*/
|
30
|
+
declare function getMotionStyles(motionConfig: MotionConfig): Record<"--uds-motion-damped-1-damping" | "--uds-motion-damped-1-stiffness" | "--uds-motion-damped-2-damping" | "--uds-motion-damped-2-stiffness" | "--uds-motion-damped-3-damping" | "--uds-motion-damped-3-stiffness" | "--uds-motion-damped-4-damping" | "--uds-motion-damped-4-stiffness" | "--uds-motion-smooth-1-damping" | "--uds-motion-smooth-1-stiffness" | "--uds-motion-smooth-2-damping" | "--uds-motion-smooth-2-stiffness" | "--uds-motion-smooth-3-damping" | "--uds-motion-smooth-3-stiffness" | "--uds-motion-smooth-4-damping" | "--uds-motion-smooth-4-stiffness" | "--uds-motion-subtle-1-damping" | "--uds-motion-subtle-1-stiffness" | "--uds-motion-subtle-2-damping" | "--uds-motion-subtle-2-stiffness" | "--uds-motion-subtle-3-damping" | "--uds-motion-subtle-3-stiffness" | "--uds-motion-subtle-4-damping" | "--uds-motion-subtle-4-stiffness" | "--uds-motion-bouncy-1-damping" | "--uds-motion-bouncy-1-stiffness" | "--uds-motion-bouncy-2-damping" | "--uds-motion-bouncy-2-stiffness" | "--uds-motion-bouncy-3-damping" | "--uds-motion-bouncy-3-stiffness" | "--uds-motion-bouncy-4-damping" | "--uds-motion-bouncy-4-stiffness" | "--uds-motion-veryBouncy-1-damping" | "--uds-motion-veryBouncy-1-stiffness" | "--uds-motion-veryBouncy-2-damping" | "--uds-motion-veryBouncy-2-stiffness" | "--uds-motion-veryBouncy-3-damping" | "--uds-motion-veryBouncy-3-stiffness" | "--uds-motion-veryBouncy-4-damping" | "--uds-motion-veryBouncy-4-stiffness", string>;
|
31
|
+
|
32
|
+
interface AddFontsPluginOptions {
|
33
|
+
fontIds: FontID[];
|
34
|
+
}
|
35
|
+
declare const addFontsPlugin: {
|
36
|
+
(options: AddFontsPluginOptions): {
|
37
|
+
handler: tailwindcss_types_config.PluginCreator;
|
38
|
+
config?: Partial<tailwindcss_types_config.Config>;
|
39
|
+
};
|
40
|
+
__isOptionsFunction: true;
|
41
|
+
};
|
42
|
+
|
43
|
+
declare function getColorModeStyles(tokens: WebTokens): {
|
44
|
+
light: {
|
45
|
+
colorScheme: string;
|
46
|
+
};
|
47
|
+
dark: {
|
48
|
+
colorScheme: string;
|
49
|
+
};
|
50
|
+
};
|
51
|
+
|
52
|
+
/**
|
53
|
+
* Get all font face declarations for a given set of font IDs.
|
54
|
+
*/
|
55
|
+
declare function getFontFaceDeclarations(fontIds: FontID[]): FontDeclarationConfig[];
|
56
|
+
|
57
|
+
/**
|
58
|
+
* Return CSS variables object based on font config.
|
59
|
+
* i.e. { --font-xyz: '"Font Family 1", "Font Family 2", sans-serif' }
|
60
|
+
*
|
61
|
+
* @example
|
62
|
+
* // 1. Use return value in style prop of an html element to assign font variables at runtime
|
63
|
+
*
|
64
|
+
* const fontVars = getFontStyles(fontConfig);
|
65
|
+
* <body style={fontVars}> {...} </body>
|
66
|
+
*
|
67
|
+
* // 2. Generate CSS at build time in tailwind plugin via Tailwind's addBase or addComponent.
|
68
|
+
*
|
69
|
+
* const fontVars = getFontStyles(fontConfig);
|
70
|
+
* addBase({ ':root': fontVars });
|
71
|
+
*
|
72
|
+
*/
|
73
|
+
declare function getFontStyles(fontConfig: FontConfig): Record<"--uds-font-sans" | "--uds-font-sans-alt" | "--uds-font-serif" | "--uds-font-serif-alt" | "--uds-font-mono", string>;
|
74
|
+
|
75
|
+
declare function getScaleModeStyles(tokens: WebTokens): {
|
76
|
+
xSmall: {
|
77
|
+
[x: string]: string;
|
78
|
+
};
|
79
|
+
small: {
|
80
|
+
[x: string]: string;
|
81
|
+
};
|
82
|
+
medium: {
|
83
|
+
[x: string]: string;
|
84
|
+
};
|
85
|
+
large: {
|
86
|
+
[x: string]: string;
|
87
|
+
};
|
88
|
+
xLarge: {
|
89
|
+
[x: string]: string;
|
90
|
+
};
|
91
|
+
xxLarge: {
|
92
|
+
[x: string]: string;
|
93
|
+
};
|
94
|
+
xxxLarge: {
|
95
|
+
[x: string]: string;
|
96
|
+
};
|
97
|
+
};
|
98
|
+
|
99
|
+
export { type AddFontsPluginOptions, type GetMotionVarParams, addFontsPlugin, getColorModeStyles, getFontFaceDeclarations, getFontStyles, getMotionStyles, getMotionVar, getScaleModeStyles };
|
@@ -0,0 +1 @@
|
|
1
|
+
export{addFontsPlugin,getColorModeStyles,getFontFaceDeclarations,getFontStyles,getScaleModeStyles}from"../chunk-YM5TKITI.js";export{getMotionStyles,getMotionVar}from"../chunk-ZV62SW5G.js";
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";var e=require("../chunk-DMMTEAJW.cjs"),t=require("../chunk-DCXVARRB.cjs"),r=require("../chunk-GIJ2FHY5.cjs"),n=require("../chunk-5WBROFT5.cjs");Object.defineProperty(exports,"DEFAULT_COLOR_MODE",{enumerable:!0,get:function(){return e.DEFAULT_COLOR_MODE}}),Object.defineProperty(exports,"DEFAULT_COLOR_MODE_FOR_APP",{enumerable:!0,get:function(){return e.DEFAULT_COLOR_MODE_FOR_APP}}),Object.defineProperty(exports,"DEFAULT_HIGH_CONTRAST_MODE",{enumerable:!0,get:function(){return e.DEFAULT_HIGH_CONTRAST_MODE}}),Object.defineProperty(exports,"DEFAULT_REGION_MODE",{enumerable:!0,get:function(){return e.DEFAULT_REGION_MODE}}),Object.defineProperty(exports,"DEFAULT_SCALE_MODE",{enumerable:!0,get:function(){return e.DEFAULT_SCALE_MODE}}),Object.defineProperty(exports,"DEFAULT_SCALE_MODE_FOR_APP",{enumerable:!0,get:function(){return e.DEFAULT_SCALE_MODE_FOR_APP}}),Object.defineProperty(exports,"FONT_DECLARATIONS_MAP",{enumerable:!0,get:function(){return e.FONT_DECLARATIONS_MAP}}),Object.defineProperty(exports,"alwaysPalette",{enumerable:!0,get:function(){return e.alwaysPalette}}),Object.defineProperty(exports,"button",{enumerable:!0,get:function(){return e.button}}),Object.defineProperty(exports,"defaultTokensConfig",{enumerable:!0,get:function(){return e.defaultTokensConfig}}),Object.defineProperty(exports,"fromEntries",{enumerable:!0,get:function(){return e.fromEntries}}),Object.defineProperty(exports,"generateConfigCombinations",{enumerable:!0,get:function(){return e.generateConfigCombinations}}),Object.defineProperty(exports,"getDefaultButtonBaseMap",{enumerable:!0,get:function(){return e.getDefaultButtonBaseMap}}),Object.defineProperty(exports,"variants",{enumerable:!0,get:function(){return t.variants}}),Object.defineProperty(exports,"entries",{enumerable:!0,get:function(){return r.entries}}),Object.defineProperty(exports,"fontWeightMap",{enumerable:!0,get:function(){return r.fontWeightMap}}),Object.defineProperty(exports,"mapValues",{enumerable:!0,get:function(){return r.mapValues}}),Object.defineProperty(exports,"AVATAR_SIZE_PREFIX",{enumerable:!0,get:function(){return n.AVATAR_SIZE_PREFIX}}),Object.defineProperty(exports,"BORDER_RADIUS_PREFIX",{enumerable:!0,get:function(){return n.BORDER_RADIUS_PREFIX}}),Object.defineProperty(exports,"BORDER_WIDTH_PREFIX",{enumerable:!0,get:function(){return n.BORDER_WIDTH_PREFIX}}),Object.defineProperty(exports,"BUTTON_CSS_VAR_MAP",{enumerable:!0,get:function(){return n.BUTTON_CSS_VAR_MAP}}),Object.defineProperty(exports,"DARK_COLOR_MODE_CLASSNAME",{enumerable:!0,get:function(){return n.DARK_COLOR_MODE_CLASSNAME}}),Object.defineProperty(exports,"DEFAULT_COLOR_MODE_CLASSNAME",{enumerable:!0,get:function(){return n.DEFAULT_COLOR_MODE_CLASSNAME}}),Object.defineProperty(exports,"DEFAULT_SCALE_MODE_CLASSNAME",{enumerable:!0,get:function(){return n.DEFAULT_SCALE_MODE_CLASSNAME}}),Object.defineProperty(exports,"FONT_FAMILY_PREFIX",{enumerable:!0,get:function(){return n.FONT_FAMILY_PREFIX}}),Object.defineProperty(exports,"FONT_SIZE_PREFIX",{enumerable:!0,get:function(){return n.FONT_SIZE_PREFIX}}),Object.defineProperty(exports,"FONT_WEIGHT_PREFIX",{enumerable:!0,get:function(){return n.FONT_WEIGHT_PREFIX}}),Object.defineProperty(exports,"ICON_BUTTON_CSS_VAR_MAP",{enumerable:!0,get:function(){return n.ICON_BUTTON_CSS_VAR_MAP}}),Object.defineProperty(exports,"ICON_SIZE_PREFIX",{enumerable:!0,get:function(){return n.ICON_SIZE_PREFIX}}),Object.defineProperty(exports,"LARGE_SCALE_MODE_CLASSNAME",{enumerable:!0,get:function(){return n.LARGE_SCALE_MODE_CLASSNAME}}),Object.defineProperty(exports,"LIGHT_COLOR_MODE_CLASSNAME",{enumerable:!0,get:function(){return n.LIGHT_COLOR_MODE_CLASSNAME}}),Object.defineProperty(exports,"LINE_HEIGHT_PREFIX",{enumerable:!0,get:function(){return n.LINE_HEIGHT_PREFIX}}),Object.defineProperty(exports,"MEDIUM_SCALE_MODE_CLASSNAME",{enumerable:!0,get:function(){return n.MEDIUM_SCALE_MODE_CLASSNAME}}),Object.defineProperty(exports,"MOTION_PREFIX",{enumerable:!0,get:function(){return n.MOTION_PREFIX}}),Object.defineProperty(exports,"PSEUDO_STYLE_SELECTOR_MAP",{enumerable:!0,get:function(){return n.PSEUDO_STYLE_SELECTOR_MAP}}),Object.defineProperty(exports,"SMALL_SCALE_MODE_CLASSNAME",{enumerable:!0,get:function(){return n.SMALL_SCALE_MODE_CLASSNAME}}),Object.defineProperty(exports,"SPECTRUM_COLOR_PREFIX",{enumerable:!0,get:function(){return n.SPECTRUM_COLOR_PREFIX}}),Object.defineProperty(exports,"TEXT_TRANSFORM_PREFIX",{enumerable:!0,get:function(){return n.TEXT_TRANSFORM_PREFIX}}),Object.defineProperty(exports,"UDS_PREFIX",{enumerable:!0,get:function(){return n.UDS_PREFIX}}),Object.defineProperty(exports,"XLARGE_SCALE_MODE_CLASSNAME",{enumerable:!0,get:function(){return n.XLARGE_SCALE_MODE_CLASSNAME}}),Object.defineProperty(exports,"XSMALL_SCALE_MODE_CLASSNAME",{enumerable:!0,get:function(){return n.XSMALL_SCALE_MODE_CLASSNAME}}),Object.defineProperty(exports,"XXLARGE_SCALE_MODE_CLASSNAME",{enumerable:!0,get:function(){return n.XXLARGE_SCALE_MODE_CLASSNAME}}),Object.defineProperty(exports,"XXXLARGE_SCALE_MODE_CLASSNAME",{enumerable:!0,get:function(){return n.XXXLARGE_SCALE_MODE_CLASSNAME}});
|