@yahoo/uds 3.162.0 → 3.162.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/commands/purge.cjs +8 -1
- package/dist/cli/commands/purge.helpers.cjs +7 -0
- package/dist/cli/commands/purge.helpers.d.cts +3 -0
- package/dist/cli/commands/purge.helpers.d.ts +3 -0
- package/dist/cli/commands/purge.helpers.js +7 -0
- package/dist/cli/commands/purge.js +8 -1
- package/dist/components/client/Menu/Menu.ItemCheckbox.d.cts +1 -1
- package/dist/components/client/Menu/Menu.ItemCheckbox.d.ts +1 -1
- package/dist/components/client/Popover/UDSPopoverConfigProvider.d.cts +1 -1
- package/dist/components/client/Popover/UDSPopoverConfigProvider.d.ts +1 -1
- package/dist/components/client/Switch/Switch.cjs +5 -2
- package/dist/components/client/Switch/Switch.js +5 -2
- package/dist/components/client/Switch/switchStyles.cjs +2 -2
- package/dist/components/client/Switch/switchStyles.js +2 -2
- package/dist/css/dist/commands/css.cjs +2 -0
- package/dist/css/dist/commands/css.helpers.cjs +2 -0
- package/dist/css/dist/commands/css.helpers.js +2 -0
- package/dist/css/dist/commands/css.js +2 -0
- package/dist/css/dist/css/nodeUtils.cjs +28 -11
- package/dist/css/dist/css/nodeUtils.js +29 -12
- package/dist/css/dist/css/runner.cjs +8 -3
- package/dist/css/dist/css/runner.js +8 -3
- package/dist/css/dist/css/theme.d.cts +16 -0
- package/dist/css/dist/css/theme.d.ts +16 -0
- package/dist/css/dist/css/workerPool.cjs +2 -1
- package/dist/css/dist/css/workerPool.js +2 -1
- package/dist/css/dist/purger/optimized/ast/expressions.cjs +104 -11
- package/dist/css/dist/purger/optimized/ast/expressions.js +104 -11
- package/dist/css/dist/purger/optimized/ast/jsx.cjs +74 -0
- package/dist/css/dist/purger/optimized/ast/jsx.js +73 -0
- package/dist/css/dist/purger/optimized/ast/props.cjs +47 -0
- package/dist/css/dist/purger/optimized/ast/props.js +46 -0
- package/dist/css/dist/purger/optimized/ast/spread.cjs +87 -0
- package/dist/css/dist/purger/optimized/ast/spread.js +86 -0
- package/dist/css/dist/purger/optimized/purge.cjs +14 -8
- package/dist/css/dist/purger/optimized/purge.js +15 -9
- package/dist/css/dist/purger/optimized/purgeFromCode.cjs +176 -18
- package/dist/css/dist/purger/optimized/purgeFromCode.js +176 -19
- package/dist/css/dist/purger/optimized/utils/files.cjs +22 -2
- package/dist/css/dist/purger/optimized/utils/files.js +21 -3
- package/dist/hooks/useRtl.cjs +4 -8
- package/dist/hooks/useRtl.js +4 -8
- package/dist/styles/styler.d.cts +25 -25
- package/dist/styles/styler.d.ts +25 -25
- package/dist/uds/generated/componentData.cjs +2555 -2553
- package/dist/uds/generated/componentData.js +2555 -2553
- package/dist/uds/generated/tailwindPurge.cjs +1 -1
- package/dist/uds/generated/tailwindPurge.js +1 -1
- package/generated/componentData.json +3340 -3338
- package/generated/tailwindPurge.ts +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
|
|
2
2
|
import { isPerfEnabled } from "../../css/perf.js";
|
|
3
3
|
import { extractStringLiterals } from "./ast/expressions.js";
|
|
4
|
+
import { getParentComponentInfo } from "./ast/jsx.js";
|
|
5
|
+
import { resolveSpreadFromUsages } from "./ast/spread.js";
|
|
4
6
|
import { Node, Project, SyntaxKind } from "ts-morph";
|
|
5
7
|
//#region ../css/dist/purger/optimized/purgeFromCode.mjs
|
|
6
8
|
/*! © 2026 Yahoo, Inc. UDS CSS v0.0.0-development */
|
|
@@ -70,10 +72,10 @@ const normalizeComponentName = (name) => {
|
|
|
70
72
|
return name.replace(/\W/g, "").toLowerCase();
|
|
71
73
|
};
|
|
72
74
|
/**
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
+
* All autoVariants group keys belonging to a component (by normalized name
|
|
76
|
+
* prefix, e.g. Button -> buttonVariantRoot, buttonSizeIcon, ...).
|
|
75
77
|
*/
|
|
76
|
-
const
|
|
78
|
+
const getComponentAutoVariantKeys = (componentName) => {
|
|
77
79
|
if (!autoVariantsCache) return [];
|
|
78
80
|
const segments = componentName.match(/[A-Z][a-z0-9]*/g) ?? [];
|
|
79
81
|
const candidates = new Set([normalizeComponentName(componentName)]);
|
|
@@ -81,12 +83,19 @@ const getAutoVariantKeysForProp = (componentName, propName) => {
|
|
|
81
83
|
const partial = segments.slice(0, i).join("");
|
|
82
84
|
candidates.add(normalizeComponentName(partial));
|
|
83
85
|
});
|
|
84
|
-
const propLower = propName.toLowerCase();
|
|
85
86
|
return Object.keys(autoVariantsCache).filter((key) => {
|
|
86
87
|
const keyLower = key.toLowerCase();
|
|
87
|
-
return Array.from(candidates).some((candidate) => keyLower.startsWith(candidate)
|
|
88
|
+
return Array.from(candidates).some((candidate) => keyLower.startsWith(candidate));
|
|
88
89
|
});
|
|
89
90
|
};
|
|
91
|
+
/**
|
|
92
|
+
* Fallback: infer prop -> variant key mapping from autoVariants when the
|
|
93
|
+
* generated component data misses it (e.g., helpers like buildAvatarRootClasses).
|
|
94
|
+
*/
|
|
95
|
+
const getAutoVariantKeysForProp = (componentName, propName) => {
|
|
96
|
+
const propLower = propName.toLowerCase();
|
|
97
|
+
return getComponentAutoVariantKeys(componentName).filter((key) => key.toLowerCase().includes(propLower));
|
|
98
|
+
};
|
|
90
99
|
const getVariantKeysForProp = (componentInfo, propName) => {
|
|
91
100
|
const keys = new Set(componentInfo.propToVariantKeys?.[propName] ?? []);
|
|
92
101
|
getAutoVariantKeysForProp(componentInfo.name, propName).forEach((inferred) => keys.add(inferred));
|
|
@@ -168,19 +177,30 @@ const purgeFromCodeOptimized = async (code, options) => {
|
|
|
168
177
|
timeMs: 0,
|
|
169
178
|
classesGenerated: 0,
|
|
170
179
|
spreadsTraced: 0,
|
|
180
|
+
spreadsUnresolved: 0,
|
|
171
181
|
expressionsResolved: 0
|
|
172
|
-
}
|
|
182
|
+
},
|
|
183
|
+
unresolvedWrapperSpreads: []
|
|
173
184
|
};
|
|
174
185
|
const projectCreateStart = performance.now();
|
|
175
|
-
const
|
|
186
|
+
const project = new Project({ useInMemoryFileSystem: true });
|
|
187
|
+
const sourceFile = project.createSourceFile(options.filePath ?? "input.tsx", code, { overwrite: true });
|
|
176
188
|
const projectCreateMs = performance.now() - projectCreateStart;
|
|
177
189
|
const stats = {
|
|
178
190
|
filesScanned: 1,
|
|
179
191
|
timeMs: 0,
|
|
180
192
|
classesGenerated: 0,
|
|
181
193
|
spreadsTraced: 0,
|
|
194
|
+
spreadsUnresolved: 0,
|
|
182
195
|
expressionsResolved: 0
|
|
183
196
|
};
|
|
197
|
+
const purgeContext = {
|
|
198
|
+
project,
|
|
199
|
+
componentUsageCache: /* @__PURE__ */ new Map(),
|
|
200
|
+
spreadCache: /* @__PURE__ */ new Map(),
|
|
201
|
+
udsImportingFiles: /* @__PURE__ */ new Set(),
|
|
202
|
+
stats
|
|
203
|
+
};
|
|
184
204
|
const importParseStart = performance.now();
|
|
185
205
|
const imports = [];
|
|
186
206
|
sourceFile.getImportDeclarations().forEach((importDecl) => {
|
|
@@ -191,6 +211,8 @@ const purgeFromCodeOptimized = async (code, options) => {
|
|
|
191
211
|
const importParseMs = performance.now() - importParseStart;
|
|
192
212
|
const componentProps = /* @__PURE__ */ new Map();
|
|
193
213
|
const componentUnresolvedSpreadProps = /* @__PURE__ */ new Map();
|
|
214
|
+
const componentsWithUnknownSpreads = /* @__PURE__ */ new Set();
|
|
215
|
+
const unresolvedWrapperSpreads = [];
|
|
194
216
|
const referencedComponents = /* @__PURE__ */ new Set();
|
|
195
217
|
const getStylesExtractStart = performance.now();
|
|
196
218
|
const getStylesProps = extractGetStylesCalls(sourceFile, stats, variants);
|
|
@@ -203,7 +225,8 @@ const purgeFromCodeOptimized = async (code, options) => {
|
|
|
203
225
|
referencedComponents.add(componentName);
|
|
204
226
|
const propsMap = componentProps.get(componentName) ?? /* @__PURE__ */ new Map();
|
|
205
227
|
const unresolvedSpreadProps = componentUnresolvedSpreadProps.get(componentName) ?? /* @__PURE__ */ new Set();
|
|
206
|
-
extractPropsFromReference(reference, stats, sourceFile
|
|
228
|
+
const { props, unknownSpreadWrappers } = extractPropsFromReference(reference, stats, sourceFile, purgeContext);
|
|
229
|
+
props.forEach(({ propName, values, fromSpread }) => {
|
|
207
230
|
if (values.length > 0) {
|
|
208
231
|
const existing = propsMap.get(propName) ?? /* @__PURE__ */ new Set();
|
|
209
232
|
values.forEach((val) => existing.add(val));
|
|
@@ -212,6 +235,13 @@ const purgeFromCodeOptimized = async (code, options) => {
|
|
|
212
235
|
}
|
|
213
236
|
if (fromSpread) unresolvedSpreadProps.add(propName);
|
|
214
237
|
});
|
|
238
|
+
unknownSpreadWrappers.forEach((wrapperName) => {
|
|
239
|
+
if (wrapperName) unresolvedWrapperSpreads.push({
|
|
240
|
+
wrapperName,
|
|
241
|
+
targetComponent: componentName
|
|
242
|
+
});
|
|
243
|
+
if (!wrapperName || !options.deferWrapperSpreadResolution) componentsWithUnknownSpreads.add(componentName);
|
|
244
|
+
});
|
|
215
245
|
componentProps.set(componentName, propsMap);
|
|
216
246
|
componentUnresolvedSpreadProps.set(componentName, unresolvedSpreadProps);
|
|
217
247
|
});
|
|
@@ -241,6 +271,7 @@ const purgeFromCodeOptimized = async (code, options) => {
|
|
|
241
271
|
allComponents.forEach((componentInfo) => {
|
|
242
272
|
const userProps = componentProps.get(componentInfo.name) ?? /* @__PURE__ */ new Map();
|
|
243
273
|
const unresolvedSpreadProps = componentUnresolvedSpreadProps.get(componentInfo.name) ?? /* @__PURE__ */ new Set();
|
|
274
|
+
if (componentsWithUnknownSpreads.has(componentInfo.name)) collectUnknownSpreadClasses(componentInfo, variants, safelist);
|
|
244
275
|
Object.entries(componentInfo.defaultProps).forEach(([propName, propValue]) => {
|
|
245
276
|
if (userProps.has(propName)) return;
|
|
246
277
|
const variantGroup = variants[propName];
|
|
@@ -366,7 +397,8 @@ const purgeFromCodeOptimized = async (code, options) => {
|
|
|
366
397
|
safelist: finalSafelist,
|
|
367
398
|
imports,
|
|
368
399
|
components: [...seenComponents],
|
|
369
|
-
stats
|
|
400
|
+
stats,
|
|
401
|
+
unresolvedWrapperSpreads
|
|
370
402
|
};
|
|
371
403
|
};
|
|
372
404
|
/**
|
|
@@ -399,9 +431,16 @@ const findComponentReferences = (sourceFile, componentName, jsxElementsCache) =>
|
|
|
399
431
|
};
|
|
400
432
|
/**
|
|
401
433
|
* Extract props from a JSX reference.
|
|
434
|
+
*
|
|
435
|
+
* Spread resolution order (UDS-2557):
|
|
436
|
+
* 1. Same-file const object (`traceSpreadInFile`)
|
|
437
|
+
* 2. Wrapper call sites within the project (`resolveSpreadFromUsages`)
|
|
438
|
+
* 3. Otherwise the spread is unknown: reported via `unknownSpreadWrappers` so the
|
|
439
|
+
* caller can over-include variant classes and emit cross-file metadata.
|
|
402
440
|
*/
|
|
403
|
-
const extractPropsFromReference = (reference, stats, sourceFile) => {
|
|
441
|
+
const extractPropsFromReference = (reference, stats, sourceFile, purgeContext) => {
|
|
404
442
|
const props = [];
|
|
443
|
+
const unknownSpreadWrappers = [];
|
|
405
444
|
reference.getAttributes().forEach((attr) => {
|
|
406
445
|
if (attr.asKind(SyntaxKind.JsxAttribute)) {
|
|
407
446
|
const jsxAttr = attr.asKindOrThrow(SyntaxKind.JsxAttribute);
|
|
@@ -426,17 +465,40 @@ const extractPropsFromReference = (reference, stats, sourceFile) => {
|
|
|
426
465
|
});
|
|
427
466
|
}
|
|
428
467
|
if (attr.asKind(SyntaxKind.JsxSpreadAttribute)) {
|
|
429
|
-
|
|
430
|
-
traceSpreadInFile(
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
468
|
+
const spreadName = attr.asKindOrThrow(SyntaxKind.JsxSpreadAttribute).getExpression().getText();
|
|
469
|
+
const resolvedSpreadProps = traceSpreadInFile(spreadName, sourceFile);
|
|
470
|
+
if (resolvedSpreadProps.length > 0) {
|
|
471
|
+
stats.spreadsTraced++;
|
|
472
|
+
resolvedSpreadProps.forEach(([propName, values]) => {
|
|
473
|
+
props.push({
|
|
474
|
+
propName,
|
|
475
|
+
values,
|
|
476
|
+
fromSpread: true
|
|
477
|
+
});
|
|
435
478
|
});
|
|
436
|
-
|
|
479
|
+
return;
|
|
480
|
+
}
|
|
481
|
+
const usageResolved = resolveSpreadFromUsages(reference, spreadName, purgeContext);
|
|
482
|
+
if (usageResolved) {
|
|
483
|
+
usageResolved.forEach((values, propName) => {
|
|
484
|
+
props.push({
|
|
485
|
+
propName,
|
|
486
|
+
values,
|
|
487
|
+
fromSpread: true
|
|
488
|
+
});
|
|
489
|
+
});
|
|
490
|
+
return;
|
|
491
|
+
}
|
|
492
|
+
stats.spreadsUnresolved++;
|
|
493
|
+
const parentInfo = getParentComponentInfo(reference);
|
|
494
|
+
const isWrapperParamSpread = parentInfo && (parentInfo.spreadRestIdentifier === spreadName || parentInfo.paramIdentifier === spreadName);
|
|
495
|
+
unknownSpreadWrappers.push(isWrapperParamSpread ? parentInfo.componentName : void 0);
|
|
437
496
|
}
|
|
438
497
|
});
|
|
439
|
-
return
|
|
498
|
+
return {
|
|
499
|
+
props,
|
|
500
|
+
unknownSpreadWrappers
|
|
501
|
+
};
|
|
440
502
|
};
|
|
441
503
|
/**
|
|
442
504
|
* Trace spread props to their source within the same file.
|
|
@@ -513,5 +575,100 @@ const extractGetStylesCalls = (sourceFile, stats, variants) => {
|
|
|
513
575
|
});
|
|
514
576
|
return props;
|
|
515
577
|
};
|
|
578
|
+
/**
|
|
579
|
+
* Over-include every variant-prop class for a component (and its internal deps).
|
|
580
|
+
* Used when a spread's props are unknown: any variant prop could flow through it,
|
|
581
|
+
* so accuracy demands including all of them (UDS-2557).
|
|
582
|
+
*/
|
|
583
|
+
const collectUnknownSpreadClasses = (componentInfo, variants, safelist) => {
|
|
584
|
+
getComponentWithDeps(componentInfo.name).forEach((comp) => {
|
|
585
|
+
Object.keys(comp.propToVariantKeys ?? {}).forEach((propName) => {
|
|
586
|
+
addVariantGroupClasses(variants[propName] ?? autoVariantsCache?.[propName], safelist);
|
|
587
|
+
getVariantKeysForProp(comp, propName).forEach((variantKey) => {
|
|
588
|
+
addVariantGroupClasses(variants[variantKey] ?? autoVariantsCache?.[variantKey], safelist);
|
|
589
|
+
});
|
|
590
|
+
});
|
|
591
|
+
getComponentAutoVariantKeys(comp.name).forEach((variantKey) => {
|
|
592
|
+
addVariantGroupClasses(autoVariantsCache?.[variantKey], safelist);
|
|
593
|
+
});
|
|
594
|
+
});
|
|
595
|
+
};
|
|
596
|
+
/**
|
|
597
|
+
* Cross-file pass for UDS-2557: resolve wrapper rest-spread props from wrapper
|
|
598
|
+
* call sites found in other scanned files.
|
|
599
|
+
*
|
|
600
|
+
* `purgeFromCodeOptimized` analyzes one file at a time, so when a consumer
|
|
601
|
+
* wrapper (e.g. an i13n wrapper) spreads its props onto a UDS component, the
|
|
602
|
+
* wrapper's call sites usually live in other files. Aggregators pass the
|
|
603
|
+
* unresolved wrapper spreads plus the raw source of every scanned file; this
|
|
604
|
+
* parses only the files that mention a wrapper and maps the explicit prop
|
|
605
|
+
* values at each call site to the target UDS component's classes.
|
|
606
|
+
*
|
|
607
|
+
* Must be called after at least one `purgeFromCodeOptimized` run so the
|
|
608
|
+
* module-level component/autoVariants caches are populated.
|
|
609
|
+
*/
|
|
610
|
+
const resolveWrapperSpreadSafelist = (wrapperSpreads, sources, variants) => {
|
|
611
|
+
if (wrapperSpreads.length === 0) return [];
|
|
612
|
+
const targetsByWrapper = /* @__PURE__ */ new Map();
|
|
613
|
+
wrapperSpreads.forEach(({ wrapperName, targetComponent }) => {
|
|
614
|
+
const targets = targetsByWrapper.get(wrapperName) ?? /* @__PURE__ */ new Set();
|
|
615
|
+
targets.add(targetComponent);
|
|
616
|
+
targetsByWrapper.set(wrapperName, targets);
|
|
617
|
+
});
|
|
618
|
+
const wrapperNames = [...targetsByWrapper.keys()];
|
|
619
|
+
const usageProps = /* @__PURE__ */ new Map();
|
|
620
|
+
sources.filter((code) => wrapperNames.some((name) => code.includes(`<${name}`))).forEach((code) => {
|
|
621
|
+
new Project({ useInMemoryFileSystem: true }).createSourceFile("wrapper-usage.tsx", code, { overwrite: true }).getDescendants().forEach((node) => {
|
|
622
|
+
if (!Node.isJsxOpeningElement(node) && !Node.isJsxSelfClosingElement(node)) return;
|
|
623
|
+
const tagName = node.getTagNameNode().getText();
|
|
624
|
+
if (!targetsByWrapper.has(tagName)) return;
|
|
625
|
+
const propsMap = usageProps.get(tagName) ?? /* @__PURE__ */ new Map();
|
|
626
|
+
node.getAttributes().forEach((attr) => {
|
|
627
|
+
const jsxAttr = attr.asKind(SyntaxKind.JsxAttribute);
|
|
628
|
+
if (!jsxAttr) return;
|
|
629
|
+
const propName = jsxAttr.getNameNode().getText();
|
|
630
|
+
const values = [];
|
|
631
|
+
const initializer = jsxAttr.getInitializer();
|
|
632
|
+
if (initializer && Node.isStringLiteral(initializer)) values.push(initializer.getLiteralText());
|
|
633
|
+
else if (initializer && Node.isJsxExpression(initializer)) {
|
|
634
|
+
const expression = initializer.getExpression();
|
|
635
|
+
if (expression) values.push(...extractStringLiterals(expression));
|
|
636
|
+
}
|
|
637
|
+
if (values.length === 0) return;
|
|
638
|
+
const existing = propsMap.get(propName) ?? /* @__PURE__ */ new Set();
|
|
639
|
+
values.forEach((value) => existing.add(value));
|
|
640
|
+
propsMap.set(propName, existing);
|
|
641
|
+
});
|
|
642
|
+
usageProps.set(tagName, propsMap);
|
|
643
|
+
});
|
|
644
|
+
});
|
|
645
|
+
const safelist = [];
|
|
646
|
+
const pushClass = (variantGroup, value) => {
|
|
647
|
+
const cls = variantGroup?.[value];
|
|
648
|
+
if (cls) safelist.push(cls.replaceAll("\\", ""));
|
|
649
|
+
};
|
|
650
|
+
targetsByWrapper.forEach((targets, wrapperName) => {
|
|
651
|
+
const propsMap = usageProps.get(wrapperName);
|
|
652
|
+
targets.forEach((targetComponent) => {
|
|
653
|
+
const componentInfo = resolveComponentInfo(targetComponent);
|
|
654
|
+
if (!componentInfo) return;
|
|
655
|
+
if (!propsMap || propsMap.size === 0) {
|
|
656
|
+
collectUnknownSpreadClasses(componentInfo, variants, safelist);
|
|
657
|
+
return;
|
|
658
|
+
}
|
|
659
|
+
propsMap.forEach((values, propName) => {
|
|
660
|
+
const variantGroup = variants[propName];
|
|
661
|
+
values.forEach((value) => pushClass(variantGroup, value));
|
|
662
|
+
getComponentWithDeps(componentInfo.name).forEach((comp) => {
|
|
663
|
+
getVariantKeysForProp(comp, propName).forEach((variantKey) => {
|
|
664
|
+
const mappedVariantGroup = variants[variantKey] ?? autoVariantsCache?.[variantKey];
|
|
665
|
+
values.forEach((value) => pushClass(mappedVariantGroup, value));
|
|
666
|
+
});
|
|
667
|
+
});
|
|
668
|
+
});
|
|
669
|
+
});
|
|
670
|
+
});
|
|
671
|
+
return safelist;
|
|
672
|
+
};
|
|
516
673
|
//#endregion
|
|
517
|
-
export { purgeFromCodeOptimized };
|
|
674
|
+
export { purgeFromCodeOptimized, resolveWrapperSpreadSafelist };
|
|
@@ -6,17 +6,35 @@ fast_glob = require_runtime.__toESM(fast_glob, 1);
|
|
|
6
6
|
//#region ../css/dist/purger/optimized/utils/files.mjs
|
|
7
7
|
/*! © 2026 Yahoo, Inc. UDS CSS v0.0.0-development */
|
|
8
8
|
/**
|
|
9
|
+
* Files that never ship in an app bundle (UDS-2557 over-safelisting fix):
|
|
10
|
+
* scanning them safelists classes the app never renders — e.g. a Storybook-only
|
|
11
|
+
* cheatsheet added ~39% dead classes to the Yahoo News safelist.
|
|
12
|
+
*/
|
|
13
|
+
const TEST_FILE_IGNORE_GLOBS = [
|
|
14
|
+
"**/*.test.*",
|
|
15
|
+
"**/*.spec.*",
|
|
16
|
+
"**/__tests__/**",
|
|
17
|
+
"**/__mocks__/**"
|
|
18
|
+
];
|
|
19
|
+
const STORY_FILE_IGNORE_GLOBS = ["**/*.stories.*"];
|
|
20
|
+
const DEV_FILE_IGNORE_GLOBS = [...TEST_FILE_IGNORE_GLOBS, ...STORY_FILE_IGNORE_GLOBS];
|
|
21
|
+
/**
|
|
9
22
|
* Scan a directory for JSX/TSX files
|
|
10
23
|
*/
|
|
11
|
-
const scanForFiles = async (entry) => {
|
|
24
|
+
const scanForFiles = async (entry, ignoreDevFiles = true, extraIgnore = []) => {
|
|
12
25
|
const workspaceDir = process.env.PWD ?? process.cwd();
|
|
26
|
+
const ignore = [
|
|
27
|
+
"**/node_modules/**",
|
|
28
|
+
...ignoreDevFiles ? DEV_FILE_IGNORE_GLOBS : [],
|
|
29
|
+
...extraIgnore
|
|
30
|
+
];
|
|
13
31
|
try {
|
|
14
32
|
const fileGroups = await Promise.all(require_entryPoints.resolveEntryPaths(entry, workspaceDir, require_entryPoints.DEFAULT_ENTRY).map((entryPath) => {
|
|
15
33
|
if (entryPath.kind === "file") return [entryPath.absolutePath];
|
|
16
34
|
return (0, fast_glob.default)("**/*.{jsx,tsx}", {
|
|
17
35
|
cwd: entryPath.absolutePath,
|
|
18
36
|
absolute: true,
|
|
19
|
-
ignore
|
|
37
|
+
ignore
|
|
20
38
|
});
|
|
21
39
|
}));
|
|
22
40
|
return [...new Set(fileGroups.flat())];
|
|
@@ -25,4 +43,6 @@ const scanForFiles = async (entry) => {
|
|
|
25
43
|
}
|
|
26
44
|
};
|
|
27
45
|
//#endregion
|
|
46
|
+
exports.DEV_FILE_IGNORE_GLOBS = DEV_FILE_IGNORE_GLOBS;
|
|
47
|
+
exports.TEST_FILE_IGNORE_GLOBS = TEST_FILE_IGNORE_GLOBS;
|
|
28
48
|
exports.scanForFiles = scanForFiles;
|
|
@@ -4,17 +4,35 @@ import fg from "fast-glob";
|
|
|
4
4
|
//#region ../css/dist/purger/optimized/utils/files.mjs
|
|
5
5
|
/*! © 2026 Yahoo, Inc. UDS CSS v0.0.0-development */
|
|
6
6
|
/**
|
|
7
|
+
* Files that never ship in an app bundle (UDS-2557 over-safelisting fix):
|
|
8
|
+
* scanning them safelists classes the app never renders — e.g. a Storybook-only
|
|
9
|
+
* cheatsheet added ~39% dead classes to the Yahoo News safelist.
|
|
10
|
+
*/
|
|
11
|
+
const TEST_FILE_IGNORE_GLOBS = [
|
|
12
|
+
"**/*.test.*",
|
|
13
|
+
"**/*.spec.*",
|
|
14
|
+
"**/__tests__/**",
|
|
15
|
+
"**/__mocks__/**"
|
|
16
|
+
];
|
|
17
|
+
const STORY_FILE_IGNORE_GLOBS = ["**/*.stories.*"];
|
|
18
|
+
const DEV_FILE_IGNORE_GLOBS = [...TEST_FILE_IGNORE_GLOBS, ...STORY_FILE_IGNORE_GLOBS];
|
|
19
|
+
/**
|
|
7
20
|
* Scan a directory for JSX/TSX files
|
|
8
21
|
*/
|
|
9
|
-
const scanForFiles = async (entry) => {
|
|
22
|
+
const scanForFiles = async (entry, ignoreDevFiles = true, extraIgnore = []) => {
|
|
10
23
|
const workspaceDir = process.env.PWD ?? process.cwd();
|
|
24
|
+
const ignore = [
|
|
25
|
+
"**/node_modules/**",
|
|
26
|
+
...ignoreDevFiles ? DEV_FILE_IGNORE_GLOBS : [],
|
|
27
|
+
...extraIgnore
|
|
28
|
+
];
|
|
11
29
|
try {
|
|
12
30
|
const fileGroups = await Promise.all(resolveEntryPaths(entry, workspaceDir, DEFAULT_ENTRY).map((entryPath) => {
|
|
13
31
|
if (entryPath.kind === "file") return [entryPath.absolutePath];
|
|
14
32
|
return fg("**/*.{jsx,tsx}", {
|
|
15
33
|
cwd: entryPath.absolutePath,
|
|
16
34
|
absolute: true,
|
|
17
|
-
ignore
|
|
35
|
+
ignore
|
|
18
36
|
});
|
|
19
37
|
}));
|
|
20
38
|
return [...new Set(fileGroups.flat())];
|
|
@@ -23,4 +41,4 @@ const scanForFiles = async (entry) => {
|
|
|
23
41
|
}
|
|
24
42
|
};
|
|
25
43
|
//#endregion
|
|
26
|
-
export { scanForFiles };
|
|
44
|
+
export { DEV_FILE_IGNORE_GLOBS, TEST_FILE_IGNORE_GLOBS, scanForFiles };
|
package/dist/hooks/useRtl.cjs
CHANGED
|
@@ -28,18 +28,14 @@ const createDirectionObserver = (callback) => {
|
|
|
28
28
|
* @default reads from document direction
|
|
29
29
|
*/
|
|
30
30
|
const useRtl = (options) => {
|
|
31
|
-
const [
|
|
31
|
+
const [detectedRtl, setDetectedRtl] = (0, react.useState)(getDocumentDirection);
|
|
32
32
|
(0, react.useEffect)(() => {
|
|
33
|
-
if (options?.explicit) {
|
|
34
|
-
setIsRtl(options.explicit);
|
|
35
|
-
return;
|
|
36
|
-
}
|
|
37
33
|
const observer = createDirectionObserver(() => {
|
|
38
|
-
|
|
34
|
+
setDetectedRtl(getDocumentDirection());
|
|
39
35
|
});
|
|
40
36
|
return () => observer.disconnect();
|
|
41
|
-
}, [
|
|
42
|
-
return
|
|
37
|
+
}, []);
|
|
38
|
+
return options?.explicit ?? detectedRtl;
|
|
43
39
|
};
|
|
44
40
|
//#endregion
|
|
45
41
|
exports.createDirectionObserver = createDirectionObserver;
|
package/dist/hooks/useRtl.js
CHANGED
|
@@ -26,18 +26,14 @@ const createDirectionObserver = (callback) => {
|
|
|
26
26
|
* @default reads from document direction
|
|
27
27
|
*/
|
|
28
28
|
const useRtl = (options) => {
|
|
29
|
-
const [
|
|
29
|
+
const [detectedRtl, setDetectedRtl] = useState(getDocumentDirection);
|
|
30
30
|
useEffect(() => {
|
|
31
|
-
if (options?.explicit) {
|
|
32
|
-
setIsRtl(options.explicit);
|
|
33
|
-
return;
|
|
34
|
-
}
|
|
35
31
|
const observer = createDirectionObserver(() => {
|
|
36
|
-
|
|
32
|
+
setDetectedRtl(getDocumentDirection());
|
|
37
33
|
});
|
|
38
34
|
return () => observer.disconnect();
|
|
39
|
-
}, [
|
|
40
|
-
return
|
|
35
|
+
}, []);
|
|
36
|
+
return options?.explicit ?? detectedRtl;
|
|
41
37
|
};
|
|
42
38
|
//#endregion
|
|
43
39
|
export { createDirectionObserver, getDocumentDirection, useRtl };
|
package/dist/styles/styler.d.cts
CHANGED
|
@@ -33,8 +33,8 @@ declare const getStylesInternal: (props?: ({
|
|
|
33
33
|
bottomsheetVariantRoot?: "default" | undefined;
|
|
34
34
|
buttonSizeIcon?: "xs" | "sm" | "md" | "lg" | "default" | undefined;
|
|
35
35
|
buttonSizeRoot?: "xs" | "sm" | "md" | "lg" | "default" | undefined;
|
|
36
|
-
buttonVariantIcon?: "primary" | "secondary" | "
|
|
37
|
-
buttonVariantRoot?: "primary" | "secondary" | "
|
|
36
|
+
buttonVariantIcon?: "primary" | "secondary" | "brand" | "alert" | "positive" | "warning" | "info" | "brand-secondary" | "alert-secondary" | "positive-secondary" | "warning-secondary" | "info-secondary" | "tertiary" | "default" | "contrast-high" | "contrast-medium" | "contrast-low" | "brand-tertiary" | "alert-tertiary" | "positive-tertiary" | "warning-tertiary" | "info-tertiary" | undefined;
|
|
37
|
+
buttonVariantRoot?: "primary" | "secondary" | "brand" | "alert" | "positive" | "warning" | "info" | "brand-secondary" | "alert-secondary" | "positive-secondary" | "warning-secondary" | "info-secondary" | "tertiary" | "default" | "contrast-high" | "contrast-medium" | "contrast-low" | "brand-tertiary" | "alert-tertiary" | "positive-tertiary" | "warning-tertiary" | "info-tertiary" | undefined;
|
|
38
38
|
checkboxSizeCheckbox?: "sm" | "md" | "default" | undefined;
|
|
39
39
|
checkboxSizeRoot?: "sm" | "md" | "default" | undefined;
|
|
40
40
|
checkboxVariantCheckbox?: "primary" | "secondary" | "alert" | "alert-secondary" | "default" | undefined;
|
|
@@ -214,14 +214,14 @@ declare const getStylesInternal: (props?: ({
|
|
|
214
214
|
tooltipVariantIcon?: "default" | undefined;
|
|
215
215
|
tooltipVariantRoot?: "default" | undefined;
|
|
216
216
|
tooltipVariantSvg?: "default" | undefined;
|
|
217
|
-
color?: "primary" | "secondary" | "
|
|
218
|
-
placeholderColor?: "primary" | "secondary" | "
|
|
217
|
+
color?: "primary" | "secondary" | "accent" | "brand" | "alert" | "positive" | "warning" | "info" | "brand-secondary" | "alert-secondary" | "positive-secondary" | "warning-secondary" | "info-secondary" | "white" | "black" | "transparent" | "current" | "always/white" | "always/black" | "always/transparent" | "always/current" | "always/brand" | "always/accent" | "tertiary" | "muted" | "on-color" | undefined;
|
|
218
|
+
placeholderColor?: "primary" | "secondary" | "accent" | "brand" | "alert" | "positive" | "warning" | "info" | "brand-secondary" | "alert-secondary" | "positive-secondary" | "warning-secondary" | "info-secondary" | "white" | "black" | "transparent" | "current" | "always/white" | "always/black" | "always/transparent" | "always/current" | "always/brand" | "always/accent" | "tertiary" | "muted" | "on-color" | undefined;
|
|
219
219
|
fontFamily?: "display1" | "display2" | "display3" | "title1" | "title2" | "title3" | "title4" | "headline1" | "body1" | "label1" | "label2" | "label3" | "label4" | "caption1" | "caption2" | "legal1" | "ui1" | "ui2" | "ui3" | "ui4" | "ui5" | "ui6" | "display1/emphasized" | "display2/emphasized" | "display3/emphasized" | "title1/emphasized" | "title2/emphasized" | "title3/emphasized" | "title4/emphasized" | "headline1/emphasized" | "body1/emphasized" | "label1/emphasized" | "label2/emphasized" | "label3/emphasized" | "label4/emphasized" | "caption1/emphasized" | "caption2/emphasized" | "legal1/emphasized" | "ui1/emphasized" | "ui2/emphasized" | "ui3/emphasized" | "ui4/emphasized" | "ui5/emphasized" | "ui6/emphasized" | "sans" | "sans-alt" | "serif" | "serif-alt" | "mono" | undefined;
|
|
220
220
|
fontSize?: "display1" | "display2" | "display3" | "title1" | "title2" | "title3" | "title4" | "headline1" | "body1" | "label1" | "label2" | "label3" | "label4" | "caption1" | "caption2" | "legal1" | "ui1" | "ui2" | "ui3" | "ui4" | "ui5" | "ui6" | "display1/emphasized" | "display2/emphasized" | "display3/emphasized" | "title1/emphasized" | "title2/emphasized" | "title3/emphasized" | "title4/emphasized" | "headline1/emphasized" | "body1/emphasized" | "label1/emphasized" | "label2/emphasized" | "label3/emphasized" | "label4/emphasized" | "caption1/emphasized" | "caption2/emphasized" | "legal1/emphasized" | "ui1/emphasized" | "ui2/emphasized" | "ui3/emphasized" | "ui4/emphasized" | "ui5/emphasized" | "ui6/emphasized" | undefined;
|
|
221
|
-
fontWeight?: "black" | "thin" | "medium" | "display1" | "display2" | "display3" | "title1" | "title2" | "title3" | "title4" | "headline1" | "body1" | "label1" | "label2" | "label3" | "label4" | "caption1" | "caption2" | "legal1" | "ui1" | "ui2" | "ui3" | "ui4" | "ui5" | "ui6" | "
|
|
221
|
+
fontWeight?: "black" | "thin" | "medium" | "display1" | "display2" | "display3" | "title1" | "title2" | "title3" | "title4" | "headline1" | "body1" | "label1" | "label2" | "label3" | "label4" | "caption1" | "caption2" | "legal1" | "ui1" | "ui2" | "ui3" | "ui4" | "ui5" | "ui6" | "display1/emphasized" | "display2/emphasized" | "display3/emphasized" | "title1/emphasized" | "title2/emphasized" | "title3/emphasized" | "title4/emphasized" | "headline1/emphasized" | "body1/emphasized" | "label1/emphasized" | "label2/emphasized" | "label3/emphasized" | "label4/emphasized" | "caption1/emphasized" | "caption2/emphasized" | "legal1/emphasized" | "ui1/emphasized" | "ui2/emphasized" | "ui3/emphasized" | "ui4/emphasized" | "ui5/emphasized" | "ui6/emphasized" | "bold" | "extralight" | "light" | "regular" | "semibold" | "extrabold" | undefined;
|
|
222
222
|
lineHeight?: "display1" | "display2" | "display3" | "title1" | "title2" | "title3" | "title4" | "headline1" | "body1" | "label1" | "label2" | "label3" | "label4" | "caption1" | "caption2" | "legal1" | "ui1" | "ui2" | "ui3" | "ui4" | "ui5" | "ui6" | "display1/emphasized" | "display2/emphasized" | "display3/emphasized" | "title1/emphasized" | "title2/emphasized" | "title3/emphasized" | "title4/emphasized" | "headline1/emphasized" | "body1/emphasized" | "label1/emphasized" | "label2/emphasized" | "label3/emphasized" | "label4/emphasized" | "caption1/emphasized" | "caption2/emphasized" | "legal1/emphasized" | "ui1/emphasized" | "ui2/emphasized" | "ui3/emphasized" | "ui4/emphasized" | "ui5/emphasized" | "ui6/emphasized" | undefined;
|
|
223
223
|
letterSpacing?: "display1" | "display2" | "display3" | "title1" | "title2" | "title3" | "title4" | "headline1" | "body1" | "label1" | "label2" | "label3" | "label4" | "caption1" | "caption2" | "legal1" | "ui1" | "ui2" | "ui3" | "ui4" | "ui5" | "ui6" | "display1/emphasized" | "display2/emphasized" | "display3/emphasized" | "title1/emphasized" | "title2/emphasized" | "title3/emphasized" | "title4/emphasized" | "headline1/emphasized" | "body1/emphasized" | "label1/emphasized" | "label2/emphasized" | "label3/emphasized" | "label4/emphasized" | "caption1/emphasized" | "caption2/emphasized" | "legal1/emphasized" | "ui1/emphasized" | "ui2/emphasized" | "ui3/emphasized" | "ui4/emphasized" | "ui5/emphasized" | "ui6/emphasized" | undefined;
|
|
224
|
-
textAlign?: "center" | "
|
|
224
|
+
textAlign?: "center" | "end" | "justify" | "start" | undefined;
|
|
225
225
|
textTransform?: "none" | "display1" | "display2" | "display3" | "title1" | "title2" | "title3" | "title4" | "headline1" | "body1" | "label1" | "label2" | "label3" | "label4" | "caption1" | "caption2" | "legal1" | "ui1" | "ui2" | "ui3" | "ui4" | "ui5" | "ui6" | "display1/emphasized" | "display2/emphasized" | "display3/emphasized" | "title1/emphasized" | "title2/emphasized" | "title3/emphasized" | "title4/emphasized" | "headline1/emphasized" | "body1/emphasized" | "label1/emphasized" | "label2/emphasized" | "label3/emphasized" | "label4/emphasized" | "caption1/emphasized" | "caption2/emphasized" | "legal1/emphasized" | "ui1/emphasized" | "ui2/emphasized" | "ui3/emphasized" | "ui4/emphasized" | "ui5/emphasized" | "ui6/emphasized" | "uppercase" | "lowercase" | "capitalize" | undefined;
|
|
226
226
|
spacing?: "0" | "px" | "0.5" | "1" | "1.5" | "2" | "2.5" | "3" | "3.5" | "4" | "4.5" | "5" | "5.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" | undefined;
|
|
227
227
|
spacingHorizontal?: "0" | "px" | "0.5" | "1" | "1.5" | "2" | "2.5" | "3" | "3.5" | "4" | "4.5" | "5" | "5.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" | undefined;
|
|
@@ -240,49 +240,49 @@ declare const getStylesInternal: (props?: ({
|
|
|
240
240
|
columnGap?: "0" | "px" | "0.5" | "1" | "1.5" | "2" | "2.5" | "3" | "3.5" | "4" | "4.5" | "5" | "5.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" | undefined;
|
|
241
241
|
rowGap?: "0" | "px" | "0.5" | "1" | "1.5" | "2" | "2.5" | "3" | "3.5" | "4" | "4.5" | "5" | "5.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" | undefined;
|
|
242
242
|
backgroundColor?: "primary" | "secondary" | "accent" | "brand" | "alert" | "positive" | "warning" | "info" | "brand-secondary" | "alert-secondary" | "positive-secondary" | "warning-secondary" | "info-secondary" | "white" | "black" | "transparent" | "current" | "always/white" | "always/black" | "always/transparent" | "always/current" | "always/brand" | "always/accent" | "elevation-0" | "elevation-1" | "elevation-2" | "elevation-3" | "elevation-4" | "elevation-5" | undefined;
|
|
243
|
-
borderColor?: "primary" | "secondary" | "
|
|
244
|
-
borderStartColor?: "primary" | "secondary" | "
|
|
245
|
-
borderEndColor?: "primary" | "secondary" | "
|
|
246
|
-
borderBottomColor?: "primary" | "secondary" | "
|
|
247
|
-
borderTopColor?: "primary" | "secondary" | "
|
|
243
|
+
borderColor?: "primary" | "secondary" | "accent" | "brand" | "alert" | "positive" | "warning" | "info" | "brand-secondary" | "alert-secondary" | "positive-secondary" | "warning-secondary" | "info-secondary" | "white" | "black" | "transparent" | "current" | "always/white" | "always/black" | "always/transparent" | "always/current" | "always/brand" | "always/accent" | "elevation-0" | "elevation-1" | "elevation-2" | "elevation-3" | "elevation-4" | "elevation-5" | "tertiary" | "muted" | undefined;
|
|
244
|
+
borderStartColor?: "primary" | "secondary" | "accent" | "brand" | "alert" | "positive" | "warning" | "info" | "brand-secondary" | "alert-secondary" | "positive-secondary" | "warning-secondary" | "info-secondary" | "white" | "black" | "transparent" | "current" | "always/white" | "always/black" | "always/transparent" | "always/current" | "always/brand" | "always/accent" | "elevation-0" | "elevation-1" | "elevation-2" | "elevation-3" | "elevation-4" | "elevation-5" | "tertiary" | "muted" | undefined;
|
|
245
|
+
borderEndColor?: "primary" | "secondary" | "accent" | "brand" | "alert" | "positive" | "warning" | "info" | "brand-secondary" | "alert-secondary" | "positive-secondary" | "warning-secondary" | "info-secondary" | "white" | "black" | "transparent" | "current" | "always/white" | "always/black" | "always/transparent" | "always/current" | "always/brand" | "always/accent" | "elevation-0" | "elevation-1" | "elevation-2" | "elevation-3" | "elevation-4" | "elevation-5" | "tertiary" | "muted" | undefined;
|
|
246
|
+
borderBottomColor?: "primary" | "secondary" | "accent" | "brand" | "alert" | "positive" | "warning" | "info" | "brand-secondary" | "alert-secondary" | "positive-secondary" | "warning-secondary" | "info-secondary" | "white" | "black" | "transparent" | "current" | "always/white" | "always/black" | "always/transparent" | "always/current" | "always/brand" | "always/accent" | "elevation-0" | "elevation-1" | "elevation-2" | "elevation-3" | "elevation-4" | "elevation-5" | "tertiary" | "muted" | undefined;
|
|
247
|
+
borderTopColor?: "primary" | "secondary" | "accent" | "brand" | "alert" | "positive" | "warning" | "info" | "brand-secondary" | "alert-secondary" | "positive-secondary" | "warning-secondary" | "info-secondary" | "white" | "black" | "transparent" | "current" | "always/white" | "always/black" | "always/transparent" | "always/current" | "always/brand" | "always/accent" | "elevation-0" | "elevation-1" | "elevation-2" | "elevation-3" | "elevation-4" | "elevation-5" | "tertiary" | "muted" | undefined;
|
|
248
248
|
borderRadius?: "none" | "xs" | "sm" | "md" | "lg" | "xl" | "full" | undefined;
|
|
249
249
|
borderTopStartRadius?: "none" | "xs" | "sm" | "md" | "lg" | "xl" | "full" | undefined;
|
|
250
250
|
borderTopEndRadius?: "none" | "xs" | "sm" | "md" | "lg" | "xl" | "full" | undefined;
|
|
251
251
|
borderBottomStartRadius?: "none" | "xs" | "sm" | "md" | "lg" | "xl" | "full" | undefined;
|
|
252
252
|
borderBottomEndRadius?: "none" | "xs" | "sm" | "md" | "lg" | "xl" | "full" | undefined;
|
|
253
|
-
borderWidth?: "
|
|
254
|
-
borderVerticalWidth?: "
|
|
255
|
-
borderHorizontalWidth?: "
|
|
256
|
-
borderStartWidth?: "
|
|
257
|
-
borderEndWidth?: "
|
|
258
|
-
borderTopWidth?: "
|
|
259
|
-
borderBottomWidth?: "
|
|
253
|
+
borderWidth?: "elevation-0" | "elevation-1" | "elevation-2" | "elevation-3" | "elevation-4" | "elevation-5" | "none" | "thin" | "medium" | "thick" | undefined;
|
|
254
|
+
borderVerticalWidth?: "elevation-0" | "elevation-1" | "elevation-2" | "elevation-3" | "elevation-4" | "elevation-5" | "none" | "thin" | "medium" | "thick" | undefined;
|
|
255
|
+
borderHorizontalWidth?: "elevation-0" | "elevation-1" | "elevation-2" | "elevation-3" | "elevation-4" | "elevation-5" | "none" | "thin" | "medium" | "thick" | undefined;
|
|
256
|
+
borderStartWidth?: "elevation-0" | "elevation-1" | "elevation-2" | "elevation-3" | "elevation-4" | "elevation-5" | "none" | "thin" | "medium" | "thick" | undefined;
|
|
257
|
+
borderEndWidth?: "elevation-0" | "elevation-1" | "elevation-2" | "elevation-3" | "elevation-4" | "elevation-5" | "none" | "thin" | "medium" | "thick" | undefined;
|
|
258
|
+
borderTopWidth?: "elevation-0" | "elevation-1" | "elevation-2" | "elevation-3" | "elevation-4" | "elevation-5" | "none" | "thin" | "medium" | "thick" | undefined;
|
|
259
|
+
borderBottomWidth?: "elevation-0" | "elevation-1" | "elevation-2" | "elevation-3" | "elevation-4" | "elevation-5" | "none" | "thin" | "medium" | "thick" | undefined;
|
|
260
260
|
avatarSize?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "2xs" | "3xl" | undefined;
|
|
261
261
|
iconSize?: "xs" | "sm" | "md" | "lg" | undefined;
|
|
262
262
|
alignContent?: "center" | "flex-start" | "flex-end" | "stretch" | "space-between" | "space-around" | undefined;
|
|
263
263
|
alignItems?: "center" | "flex-start" | "flex-end" | "stretch" | "baseline" | undefined;
|
|
264
|
-
alignSelf?: "center" | "
|
|
265
|
-
flex?: "
|
|
264
|
+
alignSelf?: "center" | "flex-start" | "flex-end" | "stretch" | "baseline" | "auto" | undefined;
|
|
265
|
+
flex?: "1" | "none" | "auto" | "initial" | undefined;
|
|
266
266
|
flexDirection?: "row" | "column" | "row-reverse" | "column-reverse" | undefined;
|
|
267
267
|
flexGrow?: "0" | "1" | "2" | "3" | undefined;
|
|
268
268
|
flexShrink?: "0" | "1" | undefined;
|
|
269
269
|
flexWrap?: "wrap" | "nowrap" | "wrap-reverse" | undefined;
|
|
270
270
|
justifyContent?: "center" | "flex-start" | "flex-end" | "space-between" | "space-around" | "space-evenly" | undefined;
|
|
271
271
|
flexBasis?: "min-content" | undefined;
|
|
272
|
-
display?: "
|
|
272
|
+
display?: "flex" | "table" | "none" | "block" | "inline-block" | "inline" | "inline-flex" | "inline-table" | "table-caption" | "table-cell" | "table-column" | "table-column-group" | "table-footer-group" | "table-header-group" | "table-row-group" | "table-row" | "flow-root" | "grid" | "contents" | undefined;
|
|
273
273
|
overflow?: "hidden" | "auto" | "clip" | "visible" | "scroll" | undefined;
|
|
274
274
|
overflowX?: "hidden" | "auto" | "clip" | "visible" | "scroll" | undefined;
|
|
275
275
|
overflowY?: "hidden" | "auto" | "clip" | "visible" | "scroll" | undefined;
|
|
276
276
|
position?: "static" | "fixed" | "absolute" | "relative" | "sticky" | undefined;
|
|
277
|
-
contentFit?: "
|
|
277
|
+
contentFit?: "none" | "fill" | "cover" | "contain" | "scale-down" | undefined;
|
|
278
278
|
colorMode?: "light" | "dark" | undefined;
|
|
279
279
|
scaleMode?: "small" | "medium" | "xSmall" | "large" | "xLarge" | "xxLarge" | "xxxLarge" | undefined;
|
|
280
280
|
width?: "full" | "fit" | "screen" | undefined;
|
|
281
281
|
height?: "full" | "fit" | "screen" | undefined;
|
|
282
|
-
dropShadow?: "
|
|
283
|
-
insetShadow?: "
|
|
282
|
+
dropShadow?: "elevation-0" | "elevation-1" | "elevation-2" | "elevation-3" | "elevation-4" | "elevation-5" | "none" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | undefined;
|
|
283
|
+
insetShadow?: "elevation-0" | "elevation-1" | "elevation-2" | "elevation-3" | "elevation-4" | "elevation-5" | "none" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "xs-invert" | "sm-invert" | "md-invert" | "lg-invert" | "xl-invert" | "2xl-invert" | undefined;
|
|
284
284
|
nestedBorderRadiusSize?: "none" | "xs" | "sm" | "md" | "lg" | "xl" | "full" | undefined;
|
|
285
|
-
nestedBorderRadiusWidth?: "
|
|
285
|
+
nestedBorderRadiusWidth?: "elevation-0" | "elevation-1" | "elevation-2" | "elevation-3" | "elevation-4" | "elevation-5" | "none" | "thin" | "medium" | "thick" | undefined;
|
|
286
286
|
nestedBorderRadiusSpacing?: "0" | "px" | "0.5" | "1" | "1.5" | "2" | "2.5" | "3" | "3.5" | "4" | "4.5" | "5" | "5.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" | undefined;
|
|
287
287
|
nestedBorderRadius?: boolean | "first" | "last" | undefined;
|
|
288
288
|
} & {
|