@yahoo/uds 3.117.5 → 3.117.6
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/styles/styler.d.cts +24 -24
- package/dist/styles/styler.d.ts +24 -24
- package/dist/tailwind/dist/css/generate.helpers.cjs +7 -0
- package/dist/tailwind/dist/css/generate.helpers.js +7 -1
- package/dist/tailwind/dist/css/generate.helpers.js.map +1 -1
- package/dist/tailwind/dist/css/runner.cjs +2 -6
- package/dist/tailwind/dist/css/runner.js +2 -6
- package/dist/tailwind/dist/css/runner.js.map +1 -1
- package/dist/tailwind/dist/icons/src/safelist.cjs +27 -0
- package/dist/tailwind/dist/icons/src/safelist.js +27 -0
- package/dist/tailwind/dist/icons/src/safelist.js.map +1 -0
- package/dist/uds/generated/componentData.cjs +965 -965
- package/dist/uds/generated/componentData.js +965 -965
- package/generated/componentData.json +1312 -1312
- package/package.json +1 -1
package/dist/styles/styler.d.cts
CHANGED
|
@@ -23,8 +23,8 @@ declare const getStylesInternal: (props?: ({
|
|
|
23
23
|
bottomsheetVariantRoot?: "default" | undefined;
|
|
24
24
|
buttonSizeIcon?: "xs" | "sm" | "md" | "lg" | "default" | undefined;
|
|
25
25
|
buttonSizeRoot?: "xs" | "sm" | "md" | "lg" | "default" | undefined;
|
|
26
|
-
buttonVariantIcon?: "primary" | "secondary" | "
|
|
27
|
-
buttonVariantRoot?: "primary" | "secondary" | "
|
|
26
|
+
buttonVariantIcon?: "primary" | "secondary" | "brand" | "alert" | "positive" | "warning" | "info" | "brand-secondary" | "alert-secondary" | "positive-secondary" | "warning-secondary" | "info-secondary" | "tertiary" | "default" | "alert-tertiary" | "brand-tertiary" | "contrast-high" | "contrast-low" | "contrast-medium" | "info-tertiary" | "positive-tertiary" | "warning-tertiary" | undefined;
|
|
27
|
+
buttonVariantRoot?: "primary" | "secondary" | "brand" | "alert" | "positive" | "warning" | "info" | "brand-secondary" | "alert-secondary" | "positive-secondary" | "warning-secondary" | "info-secondary" | "tertiary" | "default" | "alert-tertiary" | "brand-tertiary" | "contrast-high" | "contrast-low" | "contrast-medium" | "info-tertiary" | "positive-tertiary" | "warning-tertiary" | undefined;
|
|
28
28
|
checkboxSizeCheckbox?: "sm" | "md" | "default" | undefined;
|
|
29
29
|
checkboxSizeRoot?: "sm" | "md" | "default" | undefined;
|
|
30
30
|
checkboxVariantCheckbox?: "primary" | "secondary" | "alert" | "alert-secondary" | "default" | undefined;
|
|
@@ -154,14 +154,14 @@ declare const getStylesInternal: (props?: ({
|
|
|
154
154
|
tooltipVariantIcon?: "default" | undefined;
|
|
155
155
|
tooltipVariantRoot?: "default" | undefined;
|
|
156
156
|
tooltipVariantSvg?: "default" | undefined;
|
|
157
|
-
color?: "primary" | "secondary" | "
|
|
158
|
-
placeholderColor?: "primary" | "secondary" | "
|
|
157
|
+
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;
|
|
158
|
+
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;
|
|
159
159
|
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;
|
|
160
160
|
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;
|
|
161
|
-
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" | "
|
|
161
|
+
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" | "light" | "bold" | "extralight" | "regular" | "semibold" | "extrabold" | undefined;
|
|
162
162
|
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;
|
|
163
163
|
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;
|
|
164
|
-
textAlign?: "
|
|
164
|
+
textAlign?: "start" | "end" | "center" | "justify" | undefined;
|
|
165
165
|
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;
|
|
166
166
|
spacing?: "0" | "1" | "2" | "3" | "4" | "5" | "px" | "0.5" | "1.5" | "2.5" | "3.5" | "4.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;
|
|
167
167
|
spacingHorizontal?: "0" | "1" | "2" | "3" | "4" | "5" | "px" | "0.5" | "1.5" | "2.5" | "3.5" | "4.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;
|
|
@@ -180,49 +180,49 @@ declare const getStylesInternal: (props?: ({
|
|
|
180
180
|
columnGap?: "0" | "1" | "2" | "3" | "4" | "5" | "px" | "0.5" | "1.5" | "2.5" | "3.5" | "4.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;
|
|
181
181
|
rowGap?: "0" | "1" | "2" | "3" | "4" | "5" | "px" | "0.5" | "1.5" | "2.5" | "3.5" | "4.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;
|
|
182
182
|
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;
|
|
183
|
-
borderColor?: "primary" | "secondary" | "
|
|
184
|
-
borderStartColor?: "primary" | "secondary" | "
|
|
185
|
-
borderEndColor?: "primary" | "secondary" | "
|
|
186
|
-
borderBottomColor?: "primary" | "secondary" | "
|
|
187
|
-
borderTopColor?: "primary" | "secondary" | "
|
|
183
|
+
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;
|
|
184
|
+
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;
|
|
185
|
+
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;
|
|
186
|
+
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;
|
|
187
|
+
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;
|
|
188
188
|
borderRadius?: "none" | "xs" | "sm" | "md" | "lg" | "xl" | "full" | undefined;
|
|
189
189
|
borderTopStartRadius?: "none" | "xs" | "sm" | "md" | "lg" | "xl" | "full" | undefined;
|
|
190
190
|
borderTopEndRadius?: "none" | "xs" | "sm" | "md" | "lg" | "xl" | "full" | undefined;
|
|
191
191
|
borderBottomStartRadius?: "none" | "xs" | "sm" | "md" | "lg" | "xl" | "full" | undefined;
|
|
192
192
|
borderBottomEndRadius?: "none" | "xs" | "sm" | "md" | "lg" | "xl" | "full" | undefined;
|
|
193
|
-
borderWidth?: "
|
|
194
|
-
borderVerticalWidth?: "
|
|
195
|
-
borderHorizontalWidth?: "
|
|
196
|
-
borderStartWidth?: "
|
|
197
|
-
borderEndWidth?: "
|
|
198
|
-
borderTopWidth?: "
|
|
199
|
-
borderBottomWidth?: "
|
|
193
|
+
borderWidth?: "elevation-0" | "elevation-1" | "elevation-2" | "elevation-3" | "elevation-4" | "elevation-5" | "none" | "thin" | "medium" | "thick" | undefined;
|
|
194
|
+
borderVerticalWidth?: "elevation-0" | "elevation-1" | "elevation-2" | "elevation-3" | "elevation-4" | "elevation-5" | "none" | "thin" | "medium" | "thick" | undefined;
|
|
195
|
+
borderHorizontalWidth?: "elevation-0" | "elevation-1" | "elevation-2" | "elevation-3" | "elevation-4" | "elevation-5" | "none" | "thin" | "medium" | "thick" | undefined;
|
|
196
|
+
borderStartWidth?: "elevation-0" | "elevation-1" | "elevation-2" | "elevation-3" | "elevation-4" | "elevation-5" | "none" | "thin" | "medium" | "thick" | undefined;
|
|
197
|
+
borderEndWidth?: "elevation-0" | "elevation-1" | "elevation-2" | "elevation-3" | "elevation-4" | "elevation-5" | "none" | "thin" | "medium" | "thick" | undefined;
|
|
198
|
+
borderTopWidth?: "elevation-0" | "elevation-1" | "elevation-2" | "elevation-3" | "elevation-4" | "elevation-5" | "none" | "thin" | "medium" | "thick" | undefined;
|
|
199
|
+
borderBottomWidth?: "elevation-0" | "elevation-1" | "elevation-2" | "elevation-3" | "elevation-4" | "elevation-5" | "none" | "thin" | "medium" | "thick" | undefined;
|
|
200
200
|
avatarSize?: "xs" | "sm" | "md" | "lg" | "xl" | undefined;
|
|
201
201
|
iconSize?: "xs" | "sm" | "md" | "lg" | undefined;
|
|
202
202
|
alignContent?: "center" | "flex-start" | "flex-end" | "stretch" | "space-between" | "space-around" | undefined;
|
|
203
203
|
alignItems?: "center" | "flex-start" | "flex-end" | "stretch" | "baseline" | undefined;
|
|
204
|
-
alignSelf?: "center" | "
|
|
205
|
-
flex?: "
|
|
204
|
+
alignSelf?: "center" | "flex-start" | "flex-end" | "stretch" | "baseline" | "auto" | undefined;
|
|
205
|
+
flex?: "1" | "none" | "auto" | "initial" | undefined;
|
|
206
206
|
flexDirection?: "row" | "column" | "row-reverse" | "column-reverse" | undefined;
|
|
207
207
|
flexGrow?: "0" | "1" | "2" | "3" | undefined;
|
|
208
208
|
flexShrink?: "0" | "1" | undefined;
|
|
209
209
|
flexWrap?: "wrap" | "nowrap" | "wrap-reverse" | undefined;
|
|
210
210
|
justifyContent?: "center" | "flex-start" | "flex-end" | "space-between" | "space-around" | "space-evenly" | undefined;
|
|
211
211
|
flexBasis?: "min-content" | undefined;
|
|
212
|
-
display?: "
|
|
212
|
+
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;
|
|
213
213
|
overflow?: "hidden" | "auto" | "clip" | "visible" | "scroll" | undefined;
|
|
214
214
|
overflowX?: "hidden" | "auto" | "clip" | "visible" | "scroll" | undefined;
|
|
215
215
|
overflowY?: "hidden" | "auto" | "clip" | "visible" | "scroll" | undefined;
|
|
216
216
|
position?: "static" | "fixed" | "absolute" | "relative" | "sticky" | undefined;
|
|
217
|
-
contentFit?: "
|
|
217
|
+
contentFit?: "none" | "fill" | "cover" | "contain" | "scale-down" | undefined;
|
|
218
218
|
colorMode?: "light" | "dark" | undefined;
|
|
219
219
|
scaleMode?: "small" | "medium" | "xSmall" | "large" | "xLarge" | "xxLarge" | "xxxLarge" | undefined;
|
|
220
220
|
width?: "full" | "fit" | "screen" | undefined;
|
|
221
221
|
height?: "full" | "fit" | "screen" | undefined;
|
|
222
|
-
dropShadow?: "
|
|
222
|
+
dropShadow?: "elevation-0" | "elevation-1" | "elevation-2" | "elevation-3" | "elevation-4" | "elevation-5" | "none" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | undefined;
|
|
223
223
|
insetShadow?: "none" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "xs-invert" | "sm-invert" | "md-invert" | "lg-invert" | "xl-invert" | "2xl-invert" | undefined;
|
|
224
224
|
nestedBorderRadiusSize?: "none" | "xs" | "sm" | "md" | "lg" | "xl" | "full" | undefined;
|
|
225
|
-
nestedBorderRadiusWidth?: "
|
|
225
|
+
nestedBorderRadiusWidth?: "elevation-0" | "elevation-1" | "elevation-2" | "elevation-3" | "elevation-4" | "elevation-5" | "none" | "thin" | "medium" | "thick" | undefined;
|
|
226
226
|
nestedBorderRadiusSpacing?: "0" | "1" | "2" | "3" | "4" | "5" | "px" | "0.5" | "1.5" | "2.5" | "3.5" | "4.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
|
nestedBorderRadius?: boolean | "first" | "last" | undefined;
|
|
228
228
|
} & {
|
package/dist/styles/styler.d.ts
CHANGED
|
@@ -23,8 +23,8 @@ declare const getStylesInternal: (props?: ({
|
|
|
23
23
|
bottomsheetVariantRoot?: "default" | undefined;
|
|
24
24
|
buttonSizeIcon?: "xs" | "sm" | "md" | "lg" | "default" | undefined;
|
|
25
25
|
buttonSizeRoot?: "xs" | "sm" | "md" | "lg" | "default" | undefined;
|
|
26
|
-
buttonVariantIcon?: "primary" | "secondary" | "
|
|
27
|
-
buttonVariantRoot?: "primary" | "secondary" | "
|
|
26
|
+
buttonVariantIcon?: "primary" | "secondary" | "brand" | "alert" | "positive" | "warning" | "info" | "brand-secondary" | "alert-secondary" | "positive-secondary" | "warning-secondary" | "info-secondary" | "tertiary" | "default" | "alert-tertiary" | "brand-tertiary" | "contrast-high" | "contrast-low" | "contrast-medium" | "info-tertiary" | "positive-tertiary" | "warning-tertiary" | undefined;
|
|
27
|
+
buttonVariantRoot?: "primary" | "secondary" | "brand" | "alert" | "positive" | "warning" | "info" | "brand-secondary" | "alert-secondary" | "positive-secondary" | "warning-secondary" | "info-secondary" | "tertiary" | "default" | "alert-tertiary" | "brand-tertiary" | "contrast-high" | "contrast-low" | "contrast-medium" | "info-tertiary" | "positive-tertiary" | "warning-tertiary" | undefined;
|
|
28
28
|
checkboxSizeCheckbox?: "sm" | "md" | "default" | undefined;
|
|
29
29
|
checkboxSizeRoot?: "sm" | "md" | "default" | undefined;
|
|
30
30
|
checkboxVariantCheckbox?: "primary" | "secondary" | "alert" | "alert-secondary" | "default" | undefined;
|
|
@@ -154,14 +154,14 @@ declare const getStylesInternal: (props?: ({
|
|
|
154
154
|
tooltipVariantIcon?: "default" | undefined;
|
|
155
155
|
tooltipVariantRoot?: "default" | undefined;
|
|
156
156
|
tooltipVariantSvg?: "default" | undefined;
|
|
157
|
-
color?: "primary" | "secondary" | "
|
|
158
|
-
placeholderColor?: "primary" | "secondary" | "
|
|
157
|
+
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;
|
|
158
|
+
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;
|
|
159
159
|
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;
|
|
160
160
|
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;
|
|
161
|
-
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" | "
|
|
161
|
+
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" | "light" | "bold" | "extralight" | "regular" | "semibold" | "extrabold" | undefined;
|
|
162
162
|
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;
|
|
163
163
|
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;
|
|
164
|
-
textAlign?: "
|
|
164
|
+
textAlign?: "start" | "end" | "center" | "justify" | undefined;
|
|
165
165
|
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;
|
|
166
166
|
spacing?: "0" | "1" | "2" | "3" | "4" | "5" | "px" | "0.5" | "1.5" | "2.5" | "3.5" | "4.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;
|
|
167
167
|
spacingHorizontal?: "0" | "1" | "2" | "3" | "4" | "5" | "px" | "0.5" | "1.5" | "2.5" | "3.5" | "4.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;
|
|
@@ -180,49 +180,49 @@ declare const getStylesInternal: (props?: ({
|
|
|
180
180
|
columnGap?: "0" | "1" | "2" | "3" | "4" | "5" | "px" | "0.5" | "1.5" | "2.5" | "3.5" | "4.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;
|
|
181
181
|
rowGap?: "0" | "1" | "2" | "3" | "4" | "5" | "px" | "0.5" | "1.5" | "2.5" | "3.5" | "4.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;
|
|
182
182
|
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;
|
|
183
|
-
borderColor?: "primary" | "secondary" | "
|
|
184
|
-
borderStartColor?: "primary" | "secondary" | "
|
|
185
|
-
borderEndColor?: "primary" | "secondary" | "
|
|
186
|
-
borderBottomColor?: "primary" | "secondary" | "
|
|
187
|
-
borderTopColor?: "primary" | "secondary" | "
|
|
183
|
+
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;
|
|
184
|
+
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;
|
|
185
|
+
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;
|
|
186
|
+
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;
|
|
187
|
+
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;
|
|
188
188
|
borderRadius?: "none" | "xs" | "sm" | "md" | "lg" | "xl" | "full" | undefined;
|
|
189
189
|
borderTopStartRadius?: "none" | "xs" | "sm" | "md" | "lg" | "xl" | "full" | undefined;
|
|
190
190
|
borderTopEndRadius?: "none" | "xs" | "sm" | "md" | "lg" | "xl" | "full" | undefined;
|
|
191
191
|
borderBottomStartRadius?: "none" | "xs" | "sm" | "md" | "lg" | "xl" | "full" | undefined;
|
|
192
192
|
borderBottomEndRadius?: "none" | "xs" | "sm" | "md" | "lg" | "xl" | "full" | undefined;
|
|
193
|
-
borderWidth?: "
|
|
194
|
-
borderVerticalWidth?: "
|
|
195
|
-
borderHorizontalWidth?: "
|
|
196
|
-
borderStartWidth?: "
|
|
197
|
-
borderEndWidth?: "
|
|
198
|
-
borderTopWidth?: "
|
|
199
|
-
borderBottomWidth?: "
|
|
193
|
+
borderWidth?: "elevation-0" | "elevation-1" | "elevation-2" | "elevation-3" | "elevation-4" | "elevation-5" | "none" | "thin" | "medium" | "thick" | undefined;
|
|
194
|
+
borderVerticalWidth?: "elevation-0" | "elevation-1" | "elevation-2" | "elevation-3" | "elevation-4" | "elevation-5" | "none" | "thin" | "medium" | "thick" | undefined;
|
|
195
|
+
borderHorizontalWidth?: "elevation-0" | "elevation-1" | "elevation-2" | "elevation-3" | "elevation-4" | "elevation-5" | "none" | "thin" | "medium" | "thick" | undefined;
|
|
196
|
+
borderStartWidth?: "elevation-0" | "elevation-1" | "elevation-2" | "elevation-3" | "elevation-4" | "elevation-5" | "none" | "thin" | "medium" | "thick" | undefined;
|
|
197
|
+
borderEndWidth?: "elevation-0" | "elevation-1" | "elevation-2" | "elevation-3" | "elevation-4" | "elevation-5" | "none" | "thin" | "medium" | "thick" | undefined;
|
|
198
|
+
borderTopWidth?: "elevation-0" | "elevation-1" | "elevation-2" | "elevation-3" | "elevation-4" | "elevation-5" | "none" | "thin" | "medium" | "thick" | undefined;
|
|
199
|
+
borderBottomWidth?: "elevation-0" | "elevation-1" | "elevation-2" | "elevation-3" | "elevation-4" | "elevation-5" | "none" | "thin" | "medium" | "thick" | undefined;
|
|
200
200
|
avatarSize?: "xs" | "sm" | "md" | "lg" | "xl" | undefined;
|
|
201
201
|
iconSize?: "xs" | "sm" | "md" | "lg" | undefined;
|
|
202
202
|
alignContent?: "center" | "flex-start" | "flex-end" | "stretch" | "space-between" | "space-around" | undefined;
|
|
203
203
|
alignItems?: "center" | "flex-start" | "flex-end" | "stretch" | "baseline" | undefined;
|
|
204
|
-
alignSelf?: "center" | "
|
|
205
|
-
flex?: "
|
|
204
|
+
alignSelf?: "center" | "flex-start" | "flex-end" | "stretch" | "baseline" | "auto" | undefined;
|
|
205
|
+
flex?: "1" | "none" | "auto" | "initial" | undefined;
|
|
206
206
|
flexDirection?: "row" | "column" | "row-reverse" | "column-reverse" | undefined;
|
|
207
207
|
flexGrow?: "0" | "1" | "2" | "3" | undefined;
|
|
208
208
|
flexShrink?: "0" | "1" | undefined;
|
|
209
209
|
flexWrap?: "wrap" | "nowrap" | "wrap-reverse" | undefined;
|
|
210
210
|
justifyContent?: "center" | "flex-start" | "flex-end" | "space-between" | "space-around" | "space-evenly" | undefined;
|
|
211
211
|
flexBasis?: "min-content" | undefined;
|
|
212
|
-
display?: "
|
|
212
|
+
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;
|
|
213
213
|
overflow?: "hidden" | "auto" | "clip" | "visible" | "scroll" | undefined;
|
|
214
214
|
overflowX?: "hidden" | "auto" | "clip" | "visible" | "scroll" | undefined;
|
|
215
215
|
overflowY?: "hidden" | "auto" | "clip" | "visible" | "scroll" | undefined;
|
|
216
216
|
position?: "static" | "fixed" | "absolute" | "relative" | "sticky" | undefined;
|
|
217
|
-
contentFit?: "
|
|
217
|
+
contentFit?: "none" | "fill" | "cover" | "contain" | "scale-down" | undefined;
|
|
218
218
|
colorMode?: "light" | "dark" | undefined;
|
|
219
219
|
scaleMode?: "small" | "medium" | "xSmall" | "large" | "xLarge" | "xxLarge" | "xxxLarge" | undefined;
|
|
220
220
|
width?: "full" | "fit" | "screen" | undefined;
|
|
221
221
|
height?: "full" | "fit" | "screen" | undefined;
|
|
222
|
-
dropShadow?: "
|
|
222
|
+
dropShadow?: "elevation-0" | "elevation-1" | "elevation-2" | "elevation-3" | "elevation-4" | "elevation-5" | "none" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | undefined;
|
|
223
223
|
insetShadow?: "none" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "xs-invert" | "sm-invert" | "md-invert" | "lg-invert" | "xl-invert" | "2xl-invert" | undefined;
|
|
224
224
|
nestedBorderRadiusSize?: "none" | "xs" | "sm" | "md" | "lg" | "xl" | "full" | undefined;
|
|
225
|
-
nestedBorderRadiusWidth?: "
|
|
225
|
+
nestedBorderRadiusWidth?: "elevation-0" | "elevation-1" | "elevation-2" | "elevation-3" | "elevation-4" | "elevation-5" | "none" | "thin" | "medium" | "thick" | undefined;
|
|
226
226
|
nestedBorderRadiusSpacing?: "0" | "1" | "2" | "3" | "4" | "5" | "px" | "0.5" | "1.5" | "2.5" | "3.5" | "4.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
|
nestedBorderRadius?: boolean | "first" | "last" | undefined;
|
|
228
228
|
} & {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/*! © 2026 Yahoo, Inc. UDS Tailwind and Purger v0.0.0-development */
|
|
2
2
|
const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
|
|
3
3
|
const require_entryPoints = require('../utils/entryPoints.cjs');
|
|
4
|
+
const require_safelist = require('../icons/src/safelist.cjs');
|
|
4
5
|
const require_plugin = require('../plugin.cjs');
|
|
5
6
|
const require_optimizeCSS = require('../utils/optimizeCSS.cjs');
|
|
6
7
|
const require_postcssPreserveVars = require('../utils/postcssPreserveVars.cjs');
|
|
@@ -20,6 +21,11 @@ let tailwindcss = require("tailwindcss");
|
|
|
20
21
|
tailwindcss = require_runtime.__toESM(tailwindcss);
|
|
21
22
|
|
|
22
23
|
//#region src/css/generate.helpers.ts
|
|
24
|
+
const getPruneVarSafelist = (cssOptions) => {
|
|
25
|
+
const pruneVars = cssOptions?.optimization?.pruneVars;
|
|
26
|
+
const configuredSafelist = pruneVars && typeof pruneVars === "object" ? pruneVars.safelist ?? [] : [];
|
|
27
|
+
return [...require_safelist.iconPruneVarsSafelist, ...configuredSafelist];
|
|
28
|
+
};
|
|
23
29
|
const getCssFeatureFlags = (cssOptions) => {
|
|
24
30
|
const optimizationConfig = cssOptions?.optimization;
|
|
25
31
|
const shouldOptimize = optimizationConfig?.enabled !== false;
|
|
@@ -115,5 +121,6 @@ exports.applyScopedColorModeFix = applyScopedColorModeFix;
|
|
|
115
121
|
exports.buildPostcssPlugins = buildPostcssPlugins;
|
|
116
122
|
exports.createTailwindPlugin = createTailwindPlugin;
|
|
117
123
|
exports.getCssFeatureFlags = getCssFeatureFlags;
|
|
124
|
+
exports.getPruneVarSafelist = getPruneVarSafelist;
|
|
118
125
|
exports.optimizeGeneratedCss = optimizeGeneratedCss;
|
|
119
126
|
exports.printSimpleModeStats = printSimpleModeStats;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/*! © 2026 Yahoo, Inc. UDS Tailwind and Purger v0.0.0-development */
|
|
2
2
|
import { hasAllowedEntryFileExtension } from "../utils/entryPoints.js";
|
|
3
|
+
import { iconPruneVarsSafelist } from "../icons/src/safelist.js";
|
|
3
4
|
import { tailwindPlugin } from "../plugin.js";
|
|
4
5
|
import { optimizeCSS } from "../utils/optimizeCSS.js";
|
|
5
6
|
import { preserveVars, preserveVarsCleanup } from "../utils/postcssPreserveVars.js";
|
|
@@ -13,6 +14,11 @@ import postcssScope from "postcss-scope";
|
|
|
13
14
|
import tailwindcss from "tailwindcss";
|
|
14
15
|
|
|
15
16
|
//#region src/css/generate.helpers.ts
|
|
17
|
+
const getPruneVarSafelist = (cssOptions) => {
|
|
18
|
+
const pruneVars = cssOptions?.optimization?.pruneVars;
|
|
19
|
+
const configuredSafelist = pruneVars && typeof pruneVars === "object" ? pruneVars.safelist ?? [] : [];
|
|
20
|
+
return [...iconPruneVarsSafelist, ...configuredSafelist];
|
|
21
|
+
};
|
|
16
22
|
const getCssFeatureFlags = (cssOptions) => {
|
|
17
23
|
const optimizationConfig = cssOptions?.optimization;
|
|
18
24
|
const shouldOptimize = optimizationConfig?.enabled !== false;
|
|
@@ -104,5 +110,5 @@ const printSimpleModeStats = (options) => {
|
|
|
104
110
|
};
|
|
105
111
|
|
|
106
112
|
//#endregion
|
|
107
|
-
export { applyScopedColorModeFix, buildPostcssPlugins, createTailwindPlugin, getCssFeatureFlags, optimizeGeneratedCss, printSimpleModeStats };
|
|
113
|
+
export { applyScopedColorModeFix, buildPostcssPlugins, createTailwindPlugin, getCssFeatureFlags, getPruneVarSafelist, optimizeGeneratedCss, printSimpleModeStats };
|
|
108
114
|
//# sourceMappingURL=generate.helpers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate.helpers.js","names":[],"sources":["../../src/css/generate.helpers.ts"],"sourcesContent":["import path from 'node:path';\n\nimport type { UniversalTokensConfig } from '@yahoo/uds-config';\nimport autoprefixer from 'autoprefixer';\nimport postcss from 'postcss';\n// @ts-expect-error - no types\nimport pruneVar from 'postcss-prune-var';\nimport postcssScope from 'postcss-scope';\nimport tailwindcss from 'tailwindcss';\nimport type { SafelistConfig } from 'tailwindcss/types/config';\n\nimport { tailwindPlugin } from '../tailwind/tailwindPlugin';\nimport { hasAllowedEntryFileExtension } from '../utils/entryPoints';\nimport type { OptimizeCSSOptions } from '../utils/optimizeCSS';\nimport { optimizeCSS } from '../utils/optimizeCSS';\nimport { preserveVars, preserveVarsCleanup } from '../utils/postcssPreserveVars';\nimport { fixScopedColorModeSelectorsPlugin } from './postcss';\nimport type { UDSCSSOptimizationOptions, UDSCSSVarSafelistPattern } from './theme';\nimport { formatBytes } from './utils';\n\ntype CssOptimizationOptions = UDSCSSOptimizationOptions;\n\ntype CssOptionsLike = {\n preflight?: boolean;\n fontFaceDeclarations?: boolean;\n optimization?: CssOptimizationOptions;\n};\n\ntype CssFeatureFlags = {\n enablePreflight: boolean;\n enableFontFaceDeclarations: boolean;\n shouldOptimize: boolean;\n shouldPruneVars: boolean;\n};\n\nconst getPruneVarSafelist = (cssOptions?: CssOptionsLike): UDSCSSVarSafelistPattern[] => {\n const pruneVars = cssOptions?.optimization?.pruneVars;\n\n if (!pruneVars || typeof pruneVars !== 'object') {\n return [];\n }\n\n return pruneVars.safelist ?? [];\n};\n\nconst getCssFeatureFlags = (cssOptions?: CssOptionsLike): CssFeatureFlags => {\n const optimizationConfig = cssOptions?.optimization;\n const shouldOptimize = optimizationConfig?.enabled !== false;\n const pruneVars = optimizationConfig?.pruneVars;\n\n return {\n enablePreflight: cssOptions?.preflight !== false,\n enableFontFaceDeclarations: cssOptions?.fontFaceDeclarations !== false,\n shouldOptimize,\n shouldPruneVars: shouldOptimize && pruneVars !== false,\n };\n};\n\nconst getContentGlobs = (contentDir: string | string[]): string[] => {\n const contentDirs = Array.isArray(contentDir) ? contentDir : [contentDir];\n\n return contentDirs.map((dir) =>\n hasAllowedEntryFileExtension(dir) ? dir : path.join(dir, '**/*.{js,jsx,ts,tsx}'),\n );\n};\n\nconst getRawContentEntries = (rawContents: string[]): Array<{ raw: string; extension: 'html' }> =>\n rawContents.map((rawContent) => ({ raw: rawContent, extension: 'html' }));\n\nconst createTailwindPlugin = (options: {\n contentDir: string | string[];\n rawContents?: string[];\n safelist: SafelistConfig[];\n config: UniversalTokensConfig;\n enablePreflight: boolean;\n enableFontFaceDeclarations: boolean;\n}): postcss.AcceptedPlugin => {\n const plugin = tailwindcss({\n content: [\n ...getContentGlobs(options.contentDir),\n ...getRawContentEntries(options.rawContents ?? []),\n ],\n safelist: options.safelist,\n corePlugins: { preflight: options.enablePreflight },\n plugins: [\n tailwindPlugin({\n config: options.config,\n disableFontFaceDeclarations: !options.enableFontFaceDeclarations,\n ignorePluginSafelists: true,\n }),\n ],\n });\n\n return plugin as postcss.AcceptedPlugin;\n};\n\nconst getPruneVarPlugins = (\n safeVarPrefixes: UDSCSSVarSafelistPattern[],\n): postcss.AcceptedPlugin[] => {\n if (safeVarPrefixes.length === 0) {\n return [pruneVar() as postcss.AcceptedPlugin];\n }\n\n return [\n preserveVars({ preserve: safeVarPrefixes }) as postcss.AcceptedPlugin,\n pruneVar() as postcss.AcceptedPlugin,\n preserveVarsCleanup() as postcss.AcceptedPlugin,\n ];\n};\n\nconst buildPostcssPlugins = (options: {\n tailwindPlugin: postcss.AcceptedPlugin;\n shouldPruneVars: boolean;\n safeVarPrefixes: UDSCSSVarSafelistPattern[];\n scopeClass?: string;\n}): postcss.AcceptedPlugin[] => {\n const plugins: postcss.AcceptedPlugin[] = [options.tailwindPlugin, autoprefixer()];\n\n if (options.shouldPruneVars) {\n plugins.push(...getPruneVarPlugins(options.safeVarPrefixes));\n }\n\n if (options.scopeClass) {\n plugins.push(postcssScope(options.scopeClass) as postcss.AcceptedPlugin);\n }\n\n return plugins;\n};\n\nconst applyScopedColorModeFix = async (css: string, scopeClass?: string): Promise<string> => {\n if (!scopeClass) {\n return css;\n }\n\n const fixResult = await postcss([fixScopedColorModeSelectorsPlugin(scopeClass)]).process(css, {\n from: undefined,\n });\n\n return fixResult.css;\n};\n\nconst optimizeGeneratedCss = async (options: {\n css: string;\n shouldOptimize: boolean;\n optimizationConfig?: CssOptimizationOptions;\n referenceCss?: string;\n scopeClass?: string;\n}): Promise<{\n css: string;\n optimizationStats?: {\n originalSize: number;\n originalSizeGzip: number;\n fontFacesRemoved: number;\n emptyRulesRemoved: number;\n validationErrors: string[];\n };\n}> => {\n if (!options.shouldOptimize) {\n return { css: options.css };\n }\n\n const optimizationOptions: OptimizeCSSOptions = {\n removeUnusedFonts: options.optimizationConfig?.removeUnusedFonts,\n removeEmptyRules: options.optimizationConfig?.removeEmptyRules,\n aggregateDuplicateSelectors: options.optimizationConfig?.aggregateDuplicateSelectors,\n referenceCss: options.referenceCss,\n scopeClass: options.scopeClass,\n };\n\n const optimized = await optimizeCSS(options.css, optimizationOptions);\n return {\n css: optimized.css,\n optimizationStats: {\n originalSize: optimized.stats.originalSize,\n originalSizeGzip: optimized.stats.originalSizeGzip,\n fontFacesRemoved: optimized.stats.fontFacesRemoved,\n emptyRulesRemoved: optimized.stats.emptyRulesRemoved,\n validationErrors: optimized.validation.errors,\n },\n };\n};\n\nconst printSimpleModeStats = (options: {\n outputPath: string;\n totalFilesScanned: number;\n classCount: number;\n sizeBytes: number;\n sizeGzipBytes: number;\n duration: number;\n scope?: string;\n optimizationStats?: {\n originalSizeGzip: number;\n fontFacesRemoved: number;\n emptyRulesRemoved: number;\n validationErrors: string[];\n };\n print: (value: string) => void;\n magenta: (value: string) => string;\n cyan: (value: string) => string;\n yellow: (value: string) => string;\n}): void => {\n const { print, magenta, cyan, yellow } = options;\n\n print('');\n print(`${magenta('Output:')} ${cyan(options.outputPath)}`);\n print(`${magenta('Stats:')}`);\n print(` Files scanned: ${options.totalFilesScanned}`);\n print(` Classes: ${options.classCount}`);\n print(\n ` Size: ${formatBytes(options.sizeBytes)} (${formatBytes(options.sizeGzipBytes)} gzipped)`,\n );\n\n const optimizationStats = options.optimizationStats;\n if (optimizationStats) {\n const savedBytesGzip = optimizationStats.originalSizeGzip - options.sizeGzipBytes;\n if (savedBytesGzip > 0) {\n print(\n ` Optimized: saved ${formatBytes(savedBytesGzip)} gzip (${optimizationStats.fontFacesRemoved} unused @font-face, ${optimizationStats.emptyRulesRemoved} empty rules removed)`,\n );\n }\n\n if (optimizationStats.validationErrors.length > 0) {\n print(` ${yellow('Validation warnings:')}`);\n optimizationStats.validationErrors.forEach((error) => print(` ${yellow('•')} ${error}`));\n }\n }\n\n print(` Time: ${options.duration}ms`);\n if (options.scope) {\n print(` Scope: ${cyan(options.scope)}`);\n }\n};\n\nexport {\n applyScopedColorModeFix,\n buildPostcssPlugins,\n createTailwindPlugin,\n getContentGlobs,\n getCssFeatureFlags,\n getPruneVarSafelist,\n optimizeGeneratedCss,\n printSimpleModeStats,\n};\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"generate.helpers.js","names":[],"sources":["../../src/css/generate.helpers.ts"],"sourcesContent":["import path from 'node:path';\n\nimport type { UniversalTokensConfig } from '@yahoo/uds-config';\nimport autoprefixer from 'autoprefixer';\nimport postcss from 'postcss';\n// @ts-expect-error - no types\nimport pruneVar from 'postcss-prune-var';\nimport postcssScope from 'postcss-scope';\nimport tailwindcss from 'tailwindcss';\nimport type { SafelistConfig } from 'tailwindcss/types/config';\n\n// eslint-disable-next-line import/no-relative-packages\nimport { iconPruneVarsSafelist } from '../../../icons/src/safelist';\nimport { tailwindPlugin } from '../tailwind/tailwindPlugin';\nimport { hasAllowedEntryFileExtension } from '../utils/entryPoints';\nimport type { OptimizeCSSOptions } from '../utils/optimizeCSS';\nimport { optimizeCSS } from '../utils/optimizeCSS';\nimport { preserveVars, preserveVarsCleanup } from '../utils/postcssPreserveVars';\nimport { fixScopedColorModeSelectorsPlugin } from './postcss';\nimport type { UDSCSSOptimizationOptions, UDSCSSVarSafelistPattern } from './theme';\nimport { formatBytes } from './utils';\n\ntype CssOptimizationOptions = UDSCSSOptimizationOptions;\n\ntype CssOptionsLike = {\n preflight?: boolean;\n fontFaceDeclarations?: boolean;\n optimization?: CssOptimizationOptions;\n};\n\ntype CssFeatureFlags = {\n enablePreflight: boolean;\n enableFontFaceDeclarations: boolean;\n shouldOptimize: boolean;\n shouldPruneVars: boolean;\n};\n\nconst getPruneVarSafelist = (cssOptions?: CssOptionsLike): UDSCSSVarSafelistPattern[] => {\n const pruneVars = cssOptions?.optimization?.pruneVars;\n const configuredSafelist =\n pruneVars && typeof pruneVars === 'object' ? (pruneVars.safelist ?? []) : [];\n\n return [...iconPruneVarsSafelist, ...configuredSafelist];\n};\n\nconst getCssFeatureFlags = (cssOptions?: CssOptionsLike): CssFeatureFlags => {\n const optimizationConfig = cssOptions?.optimization;\n const shouldOptimize = optimizationConfig?.enabled !== false;\n const pruneVars = optimizationConfig?.pruneVars;\n\n return {\n enablePreflight: cssOptions?.preflight !== false,\n enableFontFaceDeclarations: cssOptions?.fontFaceDeclarations !== false,\n shouldOptimize,\n shouldPruneVars: shouldOptimize && pruneVars !== false,\n };\n};\n\nconst getContentGlobs = (contentDir: string | string[]): string[] => {\n const contentDirs = Array.isArray(contentDir) ? contentDir : [contentDir];\n\n return contentDirs.map((dir) =>\n hasAllowedEntryFileExtension(dir) ? dir : path.join(dir, '**/*.{js,jsx,ts,tsx}'),\n );\n};\n\nconst getRawContentEntries = (rawContents: string[]): Array<{ raw: string; extension: 'html' }> =>\n rawContents.map((rawContent) => ({ raw: rawContent, extension: 'html' }));\n\nconst createTailwindPlugin = (options: {\n contentDir: string | string[];\n rawContents?: string[];\n safelist: SafelistConfig[];\n config: UniversalTokensConfig;\n enablePreflight: boolean;\n enableFontFaceDeclarations: boolean;\n}): postcss.AcceptedPlugin => {\n const plugin = tailwindcss({\n content: [\n ...getContentGlobs(options.contentDir),\n ...getRawContentEntries(options.rawContents ?? []),\n ],\n safelist: options.safelist,\n corePlugins: { preflight: options.enablePreflight },\n plugins: [\n tailwindPlugin({\n config: options.config,\n disableFontFaceDeclarations: !options.enableFontFaceDeclarations,\n ignorePluginSafelists: true,\n }),\n ],\n });\n\n return plugin as postcss.AcceptedPlugin;\n};\n\nconst getPruneVarPlugins = (\n safeVarPrefixes: UDSCSSVarSafelistPattern[],\n): postcss.AcceptedPlugin[] => {\n if (safeVarPrefixes.length === 0) {\n return [pruneVar() as postcss.AcceptedPlugin];\n }\n\n return [\n preserveVars({ preserve: safeVarPrefixes }) as postcss.AcceptedPlugin,\n pruneVar() as postcss.AcceptedPlugin,\n preserveVarsCleanup() as postcss.AcceptedPlugin,\n ];\n};\n\nconst buildPostcssPlugins = (options: {\n tailwindPlugin: postcss.AcceptedPlugin;\n shouldPruneVars: boolean;\n safeVarPrefixes: UDSCSSVarSafelistPattern[];\n scopeClass?: string;\n}): postcss.AcceptedPlugin[] => {\n const plugins: postcss.AcceptedPlugin[] = [options.tailwindPlugin, autoprefixer()];\n\n if (options.shouldPruneVars) {\n plugins.push(...getPruneVarPlugins(options.safeVarPrefixes));\n }\n\n if (options.scopeClass) {\n plugins.push(postcssScope(options.scopeClass) as postcss.AcceptedPlugin);\n }\n\n return plugins;\n};\n\nconst applyScopedColorModeFix = async (css: string, scopeClass?: string): Promise<string> => {\n if (!scopeClass) {\n return css;\n }\n\n const fixResult = await postcss([fixScopedColorModeSelectorsPlugin(scopeClass)]).process(css, {\n from: undefined,\n });\n\n return fixResult.css;\n};\n\nconst optimizeGeneratedCss = async (options: {\n css: string;\n shouldOptimize: boolean;\n optimizationConfig?: CssOptimizationOptions;\n referenceCss?: string;\n scopeClass?: string;\n}): Promise<{\n css: string;\n optimizationStats?: {\n originalSize: number;\n originalSizeGzip: number;\n fontFacesRemoved: number;\n emptyRulesRemoved: number;\n validationErrors: string[];\n };\n}> => {\n if (!options.shouldOptimize) {\n return { css: options.css };\n }\n\n const optimizationOptions: OptimizeCSSOptions = {\n removeUnusedFonts: options.optimizationConfig?.removeUnusedFonts,\n removeEmptyRules: options.optimizationConfig?.removeEmptyRules,\n aggregateDuplicateSelectors: options.optimizationConfig?.aggregateDuplicateSelectors,\n referenceCss: options.referenceCss,\n scopeClass: options.scopeClass,\n };\n\n const optimized = await optimizeCSS(options.css, optimizationOptions);\n return {\n css: optimized.css,\n optimizationStats: {\n originalSize: optimized.stats.originalSize,\n originalSizeGzip: optimized.stats.originalSizeGzip,\n fontFacesRemoved: optimized.stats.fontFacesRemoved,\n emptyRulesRemoved: optimized.stats.emptyRulesRemoved,\n validationErrors: optimized.validation.errors,\n },\n };\n};\n\nconst printSimpleModeStats = (options: {\n outputPath: string;\n totalFilesScanned: number;\n classCount: number;\n sizeBytes: number;\n sizeGzipBytes: number;\n duration: number;\n scope?: string;\n optimizationStats?: {\n originalSizeGzip: number;\n fontFacesRemoved: number;\n emptyRulesRemoved: number;\n validationErrors: string[];\n };\n print: (value: string) => void;\n magenta: (value: string) => string;\n cyan: (value: string) => string;\n yellow: (value: string) => string;\n}): void => {\n const { print, magenta, cyan, yellow } = options;\n\n print('');\n print(`${magenta('Output:')} ${cyan(options.outputPath)}`);\n print(`${magenta('Stats:')}`);\n print(` Files scanned: ${options.totalFilesScanned}`);\n print(` Classes: ${options.classCount}`);\n print(\n ` Size: ${formatBytes(options.sizeBytes)} (${formatBytes(options.sizeGzipBytes)} gzipped)`,\n );\n\n const optimizationStats = options.optimizationStats;\n if (optimizationStats) {\n const savedBytesGzip = optimizationStats.originalSizeGzip - options.sizeGzipBytes;\n if (savedBytesGzip > 0) {\n print(\n ` Optimized: saved ${formatBytes(savedBytesGzip)} gzip (${optimizationStats.fontFacesRemoved} unused @font-face, ${optimizationStats.emptyRulesRemoved} empty rules removed)`,\n );\n }\n\n if (optimizationStats.validationErrors.length > 0) {\n print(` ${yellow('Validation warnings:')}`);\n optimizationStats.validationErrors.forEach((error) => print(` ${yellow('•')} ${error}`));\n }\n }\n\n print(` Time: ${options.duration}ms`);\n if (options.scope) {\n print(` Scope: ${cyan(options.scope)}`);\n }\n};\n\nexport {\n applyScopedColorModeFix,\n buildPostcssPlugins,\n createTailwindPlugin,\n getContentGlobs,\n getCssFeatureFlags,\n getPruneVarSafelist,\n optimizeGeneratedCss,\n printSimpleModeStats,\n};\n"],"mappings":"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"}
|
|
@@ -9,6 +9,7 @@ const require_nodeUtils = require('./nodeUtils.cjs');
|
|
|
9
9
|
const require_index = require('../config/dist/index.cjs');
|
|
10
10
|
const require_safelist = require('../purger/optimized/utils/safelist.cjs');
|
|
11
11
|
const require_utils = require('./utils.cjs');
|
|
12
|
+
const require_generate_helpers = require('./generate.helpers.cjs');
|
|
12
13
|
const require_generate = require('./generate.cjs');
|
|
13
14
|
const require_runner_helpers = require('./runner.helpers.cjs');
|
|
14
15
|
let node_fs = require("node:fs");
|
|
@@ -55,11 +56,6 @@ const createDebouncedAction = (action, delayMs) => {
|
|
|
55
56
|
debounceTimer = setTimeout(action, delayMs);
|
|
56
57
|
};
|
|
57
58
|
};
|
|
58
|
-
const getPruneVarSafelist = (themeConfig) => {
|
|
59
|
-
const pruneVars = themeConfig.css?.optimization?.pruneVars;
|
|
60
|
-
if (!pruneVars || typeof pruneVars !== "object") return [];
|
|
61
|
-
return pruneVars.safelist ?? [];
|
|
62
|
-
};
|
|
63
59
|
const createQueuedRegenerator = (options) => {
|
|
64
60
|
let isGenerating = false;
|
|
65
61
|
let pendingRegenerate = false;
|
|
@@ -240,7 +236,7 @@ const runThemeMode = async (options, context) => {
|
|
|
240
236
|
safeVarPrefixes: [
|
|
241
237
|
...require_utils.getMotionVarPrefixes(context.componentData, allMotionComponents),
|
|
242
238
|
...require_utils.getConfigurableCssVariables(),
|
|
243
|
-
...getPruneVarSafelist(themeConfig)
|
|
239
|
+
...require_generate_helpers.getPruneVarSafelist(themeConfig.css)
|
|
244
240
|
]
|
|
245
241
|
});
|
|
246
242
|
const outputDir = node_path.default.dirname(outputPath);
|
|
@@ -8,6 +8,7 @@ import { findPackageSourceDir, loadConfigFile, scanDirectoriesForSafelist, scanD
|
|
|
8
8
|
import { defaultTokensConfig } from "../config/dist/index.js";
|
|
9
9
|
import { deduplicateSafelist, getThemeAndScaleClasses } from "../purger/optimized/utils/safelist.js";
|
|
10
10
|
import { extractVariantDefaults, formatBytes, getConfigurableCssVariables, getMotionVarPrefixes } from "./utils.js";
|
|
11
|
+
import { getPruneVarSafelist } from "./generate.helpers.js";
|
|
11
12
|
import { generateCSS, generateSimpleModeCSS } from "./generate.js";
|
|
12
13
|
import { getMainCssSummaryMessage, getWatchDirectoryGroups } from "./runner.helpers.js";
|
|
13
14
|
import fs from "node:fs";
|
|
@@ -52,11 +53,6 @@ const createDebouncedAction = (action, delayMs) => {
|
|
|
52
53
|
debounceTimer = setTimeout(action, delayMs);
|
|
53
54
|
};
|
|
54
55
|
};
|
|
55
|
-
const getPruneVarSafelist = (themeConfig) => {
|
|
56
|
-
const pruneVars = themeConfig.css?.optimization?.pruneVars;
|
|
57
|
-
if (!pruneVars || typeof pruneVars !== "object") return [];
|
|
58
|
-
return pruneVars.safelist ?? [];
|
|
59
|
-
};
|
|
60
56
|
const createQueuedRegenerator = (options) => {
|
|
61
57
|
let isGenerating = false;
|
|
62
58
|
let pendingRegenerate = false;
|
|
@@ -237,7 +233,7 @@ const runThemeMode = async (options, context) => {
|
|
|
237
233
|
safeVarPrefixes: [
|
|
238
234
|
...getMotionVarPrefixes(context.componentData, allMotionComponents),
|
|
239
235
|
...getConfigurableCssVariables(),
|
|
240
|
-
...getPruneVarSafelist(themeConfig)
|
|
236
|
+
...getPruneVarSafelist(themeConfig.css)
|
|
241
237
|
]
|
|
242
238
|
});
|
|
243
239
|
const outputDir = path.dirname(outputPath);
|