@sanity/ui 3.0.0-static.0 → 3.0.0-static.1
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/_chunks-cjs/buildCommand.js +1387 -681
- package/dist/_chunks-cjs/buildCommand.js.map +1 -1
- package/dist/cli.js +4 -2
- package/dist/cli.js.map +1 -1
- package/dist/css.d.mts +131 -12
- package/dist/css.d.ts +131 -12
- package/dist/css.esm.js +1450 -791
- package/dist/css.esm.js.map +1 -1
- package/dist/css.js +1449 -790
- package/dist/css.js.map +1 -1
- package/dist/css.mjs +1450 -791
- package/dist/css.mjs.map +1 -1
- package/dist/index.d.mts +84 -76
- package/dist/index.d.ts +84 -76
- package/dist/index.esm.js +2734 -3146
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +2733 -3145
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2734 -3146
- package/dist/index.mjs.map +1 -1
- package/dist/sanity-theme.css +1 -1
- package/dist/system.css +1590 -1158
- package/dist/theme.esm.js +1565 -452
- package/dist/theme.esm.js.map +1 -1
- package/dist/theme.js +1599 -484
- package/dist/theme.js.map +1 -1
- package/dist/theme.mjs +1565 -452
- package/dist/theme.mjs.map +1 -1
- package/package.json +22 -22
- package/src/core/__workshop__/constants.ts +14 -5
- package/src/core/__workshop__/fontsPlugin.tsx +1 -1
- package/src/core/_compat/index.ts +2 -0
- package/src/core/{styles → _compat/styles}/box/boxStyle.ts +1 -1
- package/src/core/{styles → _compat/styles}/box/types.ts +1 -1
- package/src/core/{styles → _compat/styles}/card/_cardColorStyle.ts +2 -2
- package/src/core/{styles → _compat/styles}/flex/flexItemStyle.ts +1 -1
- package/src/core/{styles → _compat/styles}/font/types.ts +1 -1
- package/src/core/{styles → _compat/styles}/grid/types.ts +1 -1
- package/src/core/{styles → _compat/styles}/helpers.ts +1 -1
- package/src/core/{styles → _compat/styles}/input/textInputStyle.ts +2 -2
- package/src/core/{styles → _compat/styles}/radius/types.ts +1 -1
- package/src/core/{styles → _compat/styles}/shadow/shadowStyle.ts +1 -1
- package/src/core/components/autocomplete/__workshop__/custom.tsx +5 -4
- package/src/core/components/autocomplete/__workshop__/example.tsx +3 -2
- package/src/core/components/autocomplete/autocomplete.tsx +5 -5
- package/src/core/components/dialog/__workshop__/panes.tsx +1 -1
- package/src/core/components/dialog/__workshop__/props.tsx +2 -0
- package/src/core/components/dialog/dialog.tsx +1 -5
- package/src/core/components/hotkeys/hotkeys.tsx +1 -1
- package/src/core/components/menu/menu.tsx +8 -10
- package/src/core/components/menu/menuDivider.tsx +16 -0
- package/src/core/components/menu/menuGroup.tsx +2 -8
- package/src/core/components/menu/menuItem.tsx +1 -1
- package/src/core/components/skeleton/skeleton.tsx +14 -20
- package/src/core/components/skeleton/textSkeleton.tsx +72 -48
- package/src/core/components/tab/tab.tsx +0 -1
- package/src/core/components/tab/tabList.tsx +4 -21
- package/src/core/components/tab/tabPanel.tsx +1 -0
- package/src/core/components/toast/toast.tsx +27 -14
- package/src/core/components/toast/toastProvider.tsx +4 -13
- package/src/core/components/tree/tree.tsx +1 -2
- package/src/core/components/tree/treeGroup.tsx +4 -1
- package/src/core/components/tree/treeItem.tsx +11 -15
- package/src/core/hooks/useArrayProp.ts +1 -1
- package/src/core/index.ts +0 -1
- package/src/core/lib/styled/members.ts +2 -2
- package/src/core/primitives/avatar/avatar.tsx +0 -21
- package/src/core/primitives/avatar/avatarCounter.tsx +1 -1
- package/src/core/primitives/avatar/avatarStack.tsx +1 -1
- package/src/core/primitives/avatar/styles.ts +2 -2
- package/src/core/primitives/box/box.tsx +4 -1
- package/src/core/primitives/button/__workshop__/props.tsx +2 -1
- package/src/core/primitives/button/__workshop__/sanityUploadButton.tsx +1 -1
- package/src/core/primitives/button/__workshop__/stacked.tsx +2 -1
- package/src/core/primitives/button/__workshop__/styled1.tsx +1 -1
- package/src/core/primitives/button/__workshop__/styled2.tsx +1 -1
- package/src/core/primitives/button/styles.ts +3 -3
- package/src/core/primitives/card/__workshop__/props.tsx +2 -2
- package/src/core/primitives/card/__workshop__/selected.tsx +1 -1
- package/src/core/primitives/card/__workshop__/styled.tsx +1 -1
- package/src/core/primitives/card/card.tsx +7 -10
- package/src/core/primitives/code/code.tsx +2 -4
- package/src/core/primitives/container/styles.ts +1 -1
- package/src/core/primitives/flex/__workshop__/example.tsx +1 -1
- package/src/core/primitives/flex/flex.tsx +1 -13
- package/src/core/primitives/grid/grid.tsx +5 -19
- package/src/core/primitives/heading/heading.tsx +8 -25
- package/src/core/primitives/heading/styles.ts +1 -1
- package/src/core/primitives/inline/inline.tsx +3 -12
- package/src/core/primitives/inline/styles.ts +1 -1
- package/src/core/primitives/label/label.tsx +4 -9
- package/src/core/primitives/label/styles.ts +1 -1
- package/src/core/primitives/popover/__workshop__/PlainStory.tsx +2 -2
- package/src/core/primitives/popover/__workshop__/TestStory.tsx +2 -1
- package/src/core/primitives/popover/popover.tsx +1 -1
- package/src/core/primitives/popover/popoverCard.tsx +1 -1
- package/src/core/primitives/radio/radio.tsx +1 -1
- package/src/core/primitives/radio/styles.ts +2 -2
- package/src/core/primitives/select/select.tsx +1 -1
- package/src/core/primitives/select/styles.ts +3 -3
- package/src/core/primitives/spinner/__workshop__/Props.tsx +2 -1
- package/src/core/primitives/spinner/animatedSpinnerIcon.tsx +16 -0
- package/src/core/primitives/spinner/spinner.tsx +2 -2
- package/src/core/primitives/stack/styles.ts +1 -1
- package/src/core/primitives/switch/styles.ts +2 -2
- package/src/core/primitives/text/__workshop__/colored.tsx +1 -1
- package/src/core/primitives/text/styles.ts +1 -1
- package/src/core/primitives/text/text.tsx +1 -4
- package/src/core/primitives/textArea/__workshop__/plain.tsx +2 -2
- package/src/core/primitives/textArea/textArea.tsx +3 -3
- package/src/core/primitives/textInput/__workshop__/plain.tsx +3 -2
- package/src/core/primitives/textInput/textInput.tsx +16 -83
- package/src/core/primitives/tooltip/tooltipCard.tsx +5 -5
- package/src/core/primitives/types.ts +1 -0
- package/src/core/theme/__workshop__/build/Root.tsx +1 -1
- package/src/core/theme/__workshop__/build/story.tsx +2 -4
- package/src/core/theme/themeProvider.tsx +1 -1
- package/src/core/types/box.ts +22 -16
- package/src/core/types/grid.ts +17 -12
- package/src/core/types/text.ts +7 -4
- package/src/core/utils/elementQuery/__workshop__/customMedia.tsx +1 -1
- package/src/core/utils/layer/layer.tsx +2 -2
- package/src/core/utils/virtualList/virtualList.tsx +1 -1
- package/src/css/compile/{comileRules.ts → compileRules.ts} +2 -5
- package/src/css/compile/compileSystem.ts +1 -1
- package/src/css/compile/compileTheme.ts +4 -1
- package/src/css/components/breadcrumbs/rules.ts +18 -0
- package/src/css/components/menu/index.ts +1 -0
- package/src/css/components/menu/menu.ts +5 -0
- package/src/css/components/menu/rules.ts +10 -0
- package/src/css/components/skeleton/index.ts +2 -0
- package/src/css/components/skeleton/rules.ts +106 -0
- package/src/css/components/skeleton/skeleton.ts +31 -0
- package/src/css/components/skeleton/types.ts +24 -0
- package/src/css/components/toast/rules.ts +68 -0
- package/src/css/components/tree/rules.ts +115 -0
- package/src/css/index.ts +4 -0
- package/src/css/primitives/box/box.ts +5 -1
- package/src/css/primitives/box/types.ts +7 -8
- package/src/css/primitives/card/rules.ts +161 -13
- package/src/css/primitives/checkbox/__styles.ts +115 -113
- package/src/css/primitives/selectable/__style.ts +117 -115
- package/src/css/primitives/spinner/rules.ts +5 -7
- package/src/css/primitives/spinner/spinner.ts +4 -0
- package/src/css/primitives/textInput/index.ts +1 -0
- package/src/css/primitives/textInput/rules.ts +159 -64
- package/src/css/primitives/textInput/textInput.ts +11 -3
- package/src/css/primitives/textInput/types.ts +8 -0
- package/src/css/rules.ts +16 -38
- package/src/css/styles/font/font.ts +7 -2
- package/src/css/styles/font/rules.ts +23 -0
- package/src/css/styles/font/types.ts +6 -0
- package/src/css/styles/gap/rules.ts +6 -6
- package/src/css/styles/grid/grid.ts +13 -0
- package/src/css/styles/grid/index.ts +2 -0
- package/src/css/styles/grid/rules.ts +112 -1
- package/src/css/styles/grid/types.ts +29 -0
- package/src/css/styles/margin/rules.ts +58 -54
- package/src/css/styles/outline/rules.ts +7 -0
- package/src/css/styles/overflow/index.ts +2 -0
- package/src/css/styles/overflow/overflow.ts +11 -0
- package/src/css/styles/overflow/types.ts +11 -0
- package/src/css/styles/padding/rules.ts +50 -48
- package/src/css/types.ts +36 -1
- package/src/css/varNames.ts +1 -1
- package/src/css/vars.ts +86 -0
- package/dist/_chunks-cjs/getTheme_v2.js +0 -316
- package/dist/_chunks-cjs/getTheme_v2.js.map +0 -1
- package/dist/_chunks-es/getTheme_v2.mjs +0 -317
- package/dist/_chunks-es/getTheme_v2.mjs.map +0 -1
- package/dist/_legacy/getTheme_v2.esm.js +0 -317
- package/dist/_legacy/getTheme_v2.esm.js.map +0 -1
- package/src/core/components/autocomplete/autocomplete.styles.tsx +0 -38
- package/src/core/components/breadcrumbs/breadcrumbs.styles.ts +0 -17
- package/src/core/components/menu/menuDivider.ts +0 -13
- package/src/core/components/skeleton/styles.ts +0 -50
- package/src/core/components/toast/styles.ts +0 -61
- package/src/core/components/tree/style.ts +0 -104
- package/src/core/primitives/card/styles.ts +0 -146
- /package/src/core/{styles → _compat/styles}/border/borderStyle.ts +0 -0
- /package/src/core/{styles → _compat/styles}/border/index.ts +0 -0
- /package/src/core/{styles → _compat/styles}/border/types.ts +0 -0
- /package/src/core/{styles → _compat/styles}/box/index.ts +0 -0
- /package/src/core/{styles → _compat/styles}/card/index.ts +0 -0
- /package/src/core/{styles → _compat/styles}/flex/flexStyle.ts +0 -0
- /package/src/core/{styles → _compat/styles}/flex/index.ts +0 -0
- /package/src/core/{styles → _compat/styles}/flex/types.ts +0 -0
- /package/src/core/{styles → _compat/styles}/focusRing/index.ts +0 -0
- /package/src/core/{styles → _compat/styles}/font/codeFontStyle.ts +0 -0
- /package/src/core/{styles → _compat/styles}/font/headingFontStyle.ts +0 -0
- /package/src/core/{styles → _compat/styles}/font/index.ts +0 -0
- /package/src/core/{styles → _compat/styles}/font/labelFontStyle.ts +0 -0
- /package/src/core/{styles → _compat/styles}/font/responsiveFont.ts +0 -0
- /package/src/core/{styles → _compat/styles}/font/textAlignStyle.ts +0 -0
- /package/src/core/{styles → _compat/styles}/font/textFontStyle.ts +0 -0
- /package/src/core/{styles → _compat/styles}/grid/gridItemStyle.ts +0 -0
- /package/src/core/{styles → _compat/styles}/grid/gridStyle.ts +0 -0
- /package/src/core/{styles → _compat/styles}/grid/index.ts +0 -0
- /package/src/core/{styles → _compat/styles}/index.ts +0 -0
- /package/src/core/{styles → _compat/styles}/input/index.ts +0 -0
- /package/src/core/{styles → _compat/styles}/input/responsiveInputPaddingStyle.ts +0 -0
- /package/src/core/{styles → _compat/styles}/internal.ts +0 -0
- /package/src/core/{styles → _compat/styles}/margin/index.ts +0 -0
- /package/src/core/{styles → _compat/styles}/margin/marginStyle.ts +0 -0
- /package/src/core/{styles → _compat/styles}/margin/marginsStyle.test.ts +0 -0
- /package/src/core/{styles → _compat/styles}/margin/types.ts +0 -0
- /package/src/core/{styles → _compat/styles}/padding/index.ts +0 -0
- /package/src/core/{styles → _compat/styles}/padding/paddingStyle.test.ts +0 -0
- /package/src/core/{styles → _compat/styles}/padding/paddingStyle.ts +0 -0
- /package/src/core/{styles → _compat/styles}/padding/types.ts +0 -0
- /package/src/core/{styles → _compat/styles}/radius/index.ts +0 -0
- /package/src/core/{styles → _compat/styles}/radius/radiusStyle.ts +0 -0
- /package/src/core/{styles → _compat/styles}/shadow/index.ts +0 -0
- /package/src/core/{styles → _compat/styles}/shadow/types.ts +0 -0
- /package/src/core/{styles → _compat/styles}/types.ts +0 -0
- /package/src/core/{_compat.ts → _compat/types.ts} +0 -0
|
@@ -70,31 +70,133 @@ const breadcrumbsRules = {
|
|
|
70
70
|
"dialog-footer": {
|
|
71
71
|
zIndex: 3
|
|
72
72
|
}
|
|
73
|
+
}, menuRules = {
|
|
74
|
+
"menu-divider": {
|
|
75
|
+
height: "1px",
|
|
76
|
+
border: 0,
|
|
77
|
+
backgroundColor: "var(--card-border-color)",
|
|
78
|
+
margin: 0
|
|
79
|
+
}
|
|
73
80
|
};
|
|
74
81
|
function responsiveRules(className, props) {
|
|
75
82
|
return {
|
|
76
83
|
[className]: props,
|
|
77
84
|
[`_1:${className}`]: {
|
|
78
|
-
"@media": {
|
|
85
|
+
"@media": {
|
|
86
|
+
"screen and (min-width: 360px)": props
|
|
87
|
+
}
|
|
79
88
|
},
|
|
80
89
|
[`_2:${className}`]: {
|
|
81
|
-
"@media": {
|
|
90
|
+
"@media": {
|
|
91
|
+
"screen and (min-width: 600px)": props
|
|
92
|
+
}
|
|
82
93
|
},
|
|
83
94
|
[`_3:${className}`]: {
|
|
84
|
-
"@media": {
|
|
95
|
+
"@media": {
|
|
96
|
+
"screen and (min-width: 900px)": props
|
|
97
|
+
}
|
|
85
98
|
},
|
|
86
99
|
[`_4:${className}`]: {
|
|
87
|
-
"@media": {
|
|
100
|
+
"@media": {
|
|
101
|
+
"screen and (min-width: 1200px)": props
|
|
102
|
+
}
|
|
88
103
|
},
|
|
89
104
|
[`_5:${className}`]: {
|
|
90
|
-
"@media": {
|
|
105
|
+
"@media": {
|
|
106
|
+
"screen and (min-width: 1800px)": props
|
|
107
|
+
}
|
|
91
108
|
},
|
|
92
109
|
[`_6:${className}`]: {
|
|
93
|
-
"@media": {
|
|
110
|
+
"@media": {
|
|
111
|
+
"screen and (min-width: 2400px)": props
|
|
112
|
+
}
|
|
94
113
|
}
|
|
95
114
|
};
|
|
96
115
|
}
|
|
97
|
-
const
|
|
116
|
+
const skeletonRules = {
|
|
117
|
+
skeleton: {
|
|
118
|
+
backgroundColor: "var(--card-skeleton-from-color)",
|
|
119
|
+
backgroundPosition: "100%",
|
|
120
|
+
backgroundSize: "200% 100%",
|
|
121
|
+
backgroundAttachment: "fixed",
|
|
122
|
+
opacity: 0,
|
|
123
|
+
transition: "opacity 200ms ease-in",
|
|
124
|
+
"@keyframes": {
|
|
125
|
+
"skeleton-pulse": {
|
|
126
|
+
"0%": {
|
|
127
|
+
backgroundPosition: "100%"
|
|
128
|
+
},
|
|
129
|
+
"100%": {
|
|
130
|
+
backgroundPosition: "-100%"
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
"@nest": {
|
|
135
|
+
"&[data-animated]": {
|
|
136
|
+
backgroundImage: `linear-gradient(
|
|
137
|
+
to right,
|
|
138
|
+
var(--card-skeleton-from-color),
|
|
139
|
+
var(--card-skeleton-to-color),
|
|
140
|
+
var(--card-skeleton-from-color),
|
|
141
|
+
var(--card-skeleton-from-color),
|
|
142
|
+
var(--card-skeleton-from-color)
|
|
143
|
+
)`,
|
|
144
|
+
animationName: "skeleton-pulse",
|
|
145
|
+
animationTimingFunction: "ease-in-out",
|
|
146
|
+
animationIterationCount: "infinite",
|
|
147
|
+
animationDuration: "2000ms"
|
|
148
|
+
},
|
|
149
|
+
"&[data-visible]": {
|
|
150
|
+
opacity: 1
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
"@media": {
|
|
154
|
+
"screen and (prefers-reduced-motion: no-preference)": {
|
|
155
|
+
backgroundColor: "var(--card-skeleton-from-color)"
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
"font-skeleton": {
|
|
160
|
+
height: "calc(var(--font-skeleton-line-height) - var(--font-skeleton-ascender-height) - var(--font-skeleton-descender-height))"
|
|
161
|
+
},
|
|
162
|
+
// ...responsiveRules('text-skeleton-0', {
|
|
163
|
+
// '--font-skeleton-line-height': 'var(--font-text-0-line-height)',
|
|
164
|
+
// '--font-skeleton-ascender-height': 'var(--font-text-0-ascender-height)',
|
|
165
|
+
// '--font-skeleton-descender-height': 'var(--font-text-0-descender-height)',
|
|
166
|
+
// }),
|
|
167
|
+
...theme.FONT_CODE_SIZE.reduce((acc, size) => ({
|
|
168
|
+
...acc,
|
|
169
|
+
...responsiveRules(`code-skeleton-${size}`, {
|
|
170
|
+
"--font-skeleton-line-height": `var(--font-code-${size}-line-height)`,
|
|
171
|
+
"--font-skeleton-ascender-height": `var(--font-code-${size}-ascender-height)`,
|
|
172
|
+
"--font-skeleton-descender-height": `var(--font-code-${size}-descender-height)`
|
|
173
|
+
})
|
|
174
|
+
}), {}),
|
|
175
|
+
...theme.FONT_HEADING_SIZE.reduce((acc, size) => ({
|
|
176
|
+
...acc,
|
|
177
|
+
...responsiveRules(`heading-skeleton-${size}`, {
|
|
178
|
+
"--font-skeleton-line-height": `var(--font-heading-${size}-line-height)`,
|
|
179
|
+
"--font-skeleton-ascender-height": `var(--font-heading-${size}-ascender-height)`,
|
|
180
|
+
"--font-skeleton-descender-height": `var(--font-heading-${size}-descender-height)`
|
|
181
|
+
})
|
|
182
|
+
}), {}),
|
|
183
|
+
...theme.FONT_LABEL_SIZE.reduce((acc, size) => ({
|
|
184
|
+
...acc,
|
|
185
|
+
...responsiveRules(`label-skeleton-${size}`, {
|
|
186
|
+
"--font-skeleton-line-height": `var(--font-label-${size}-line-height)`,
|
|
187
|
+
"--font-skeleton-ascender-height": `var(--font-label-${size}-ascender-height)`,
|
|
188
|
+
"--font-skeleton-descender-height": `var(--font-label-${size}-descender-height)`
|
|
189
|
+
})
|
|
190
|
+
}), {}),
|
|
191
|
+
...theme.FONT_TEXT_SIZE.reduce((acc, size) => ({
|
|
192
|
+
...acc,
|
|
193
|
+
...responsiveRules(`text-skeleton-${size}`, {
|
|
194
|
+
"--font-skeleton-line-height": `var(--font-text-${size}-line-height)`,
|
|
195
|
+
"--font-skeleton-ascender-height": `var(--font-text-${size}-ascender-height)`,
|
|
196
|
+
"--font-skeleton-descender-height": `var(--font-text-${size}-descender-height)`
|
|
197
|
+
})
|
|
198
|
+
}), {})
|
|
199
|
+
}, avatarRules = {
|
|
98
200
|
avatar: {
|
|
99
201
|
backgroundColor: "var(--avatar-bg-color)",
|
|
100
202
|
position: "relative",
|
|
@@ -254,20 +356,56 @@ const avatarRules = {
|
|
|
254
356
|
}, varNames = {
|
|
255
357
|
color: {
|
|
256
358
|
dark: {
|
|
257
|
-
transparent: buildColorCardVarNames({
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
359
|
+
transparent: buildColorCardVarNames({
|
|
360
|
+
scheme: "dark",
|
|
361
|
+
tone: "transparent"
|
|
362
|
+
}),
|
|
363
|
+
default: buildColorCardVarNames({
|
|
364
|
+
scheme: "dark",
|
|
365
|
+
tone: "default"
|
|
366
|
+
}),
|
|
367
|
+
primary: buildColorCardVarNames({
|
|
368
|
+
scheme: "dark",
|
|
369
|
+
tone: "primary"
|
|
370
|
+
}),
|
|
371
|
+
positive: buildColorCardVarNames({
|
|
372
|
+
scheme: "dark",
|
|
373
|
+
tone: "positive"
|
|
374
|
+
}),
|
|
375
|
+
caution: buildColorCardVarNames({
|
|
376
|
+
scheme: "dark",
|
|
377
|
+
tone: "caution"
|
|
378
|
+
}),
|
|
379
|
+
critical: buildColorCardVarNames({
|
|
380
|
+
scheme: "dark",
|
|
381
|
+
tone: "critical"
|
|
382
|
+
})
|
|
263
383
|
},
|
|
264
384
|
light: {
|
|
265
|
-
transparent: buildColorCardVarNames({
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
385
|
+
transparent: buildColorCardVarNames({
|
|
386
|
+
scheme: "light",
|
|
387
|
+
tone: "transparent"
|
|
388
|
+
}),
|
|
389
|
+
default: buildColorCardVarNames({
|
|
390
|
+
scheme: "light",
|
|
391
|
+
tone: "default"
|
|
392
|
+
}),
|
|
393
|
+
primary: buildColorCardVarNames({
|
|
394
|
+
scheme: "light",
|
|
395
|
+
tone: "primary"
|
|
396
|
+
}),
|
|
397
|
+
positive: buildColorCardVarNames({
|
|
398
|
+
scheme: "light",
|
|
399
|
+
tone: "positive"
|
|
400
|
+
}),
|
|
401
|
+
caution: buildColorCardVarNames({
|
|
402
|
+
scheme: "light",
|
|
403
|
+
tone: "caution"
|
|
404
|
+
}),
|
|
405
|
+
critical: buildColorCardVarNames({
|
|
406
|
+
scheme: "light",
|
|
407
|
+
tone: "critical"
|
|
408
|
+
})
|
|
271
409
|
},
|
|
272
410
|
//
|
|
273
411
|
accent: {
|
|
@@ -422,12 +560,13 @@ const avatarRules = {
|
|
|
422
560
|
width: "--avatar-focus-ring-width"
|
|
423
561
|
}
|
|
424
562
|
},
|
|
425
|
-
space: Object.fromEntries(
|
|
426
|
-
theme.SPACE.map((space) => [space, `--space-${space}`])
|
|
427
|
-
)
|
|
563
|
+
space: Object.fromEntries(theme.SPACE.map((space) => [space, `--space-${String(space).replace(".", "_")}`]))
|
|
428
564
|
};
|
|
429
565
|
function buildColorCardVarNames(props) {
|
|
430
|
-
const {
|
|
566
|
+
const {
|
|
567
|
+
scheme,
|
|
568
|
+
tone
|
|
569
|
+
} = props, prefix = `--color-${scheme}-${tone}`;
|
|
431
570
|
return {
|
|
432
571
|
accent: {
|
|
433
572
|
fg: `${prefix}-accent-fg`
|
|
@@ -514,16 +653,56 @@ function buildColorCardVarNames(props) {
|
|
|
514
653
|
icon: `${prefix}-icon`,
|
|
515
654
|
input: {
|
|
516
655
|
default: {
|
|
517
|
-
enabled: buildColorInputStateVarNames({
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
656
|
+
enabled: buildColorInputStateVarNames({
|
|
657
|
+
mode: "default",
|
|
658
|
+
scheme,
|
|
659
|
+
state: "enabled",
|
|
660
|
+
tone
|
|
661
|
+
}),
|
|
662
|
+
hovered: buildColorInputStateVarNames({
|
|
663
|
+
mode: "default",
|
|
664
|
+
scheme,
|
|
665
|
+
state: "hovered",
|
|
666
|
+
tone
|
|
667
|
+
}),
|
|
668
|
+
readOnly: buildColorInputStateVarNames({
|
|
669
|
+
mode: "default",
|
|
670
|
+
scheme,
|
|
671
|
+
state: "readOnly",
|
|
672
|
+
tone
|
|
673
|
+
}),
|
|
674
|
+
disabled: buildColorInputStateVarNames({
|
|
675
|
+
mode: "default",
|
|
676
|
+
scheme,
|
|
677
|
+
state: "disabled",
|
|
678
|
+
tone
|
|
679
|
+
})
|
|
521
680
|
},
|
|
522
681
|
invalid: {
|
|
523
|
-
enabled: buildColorInputStateVarNames({
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
682
|
+
enabled: buildColorInputStateVarNames({
|
|
683
|
+
mode: "invalid",
|
|
684
|
+
scheme,
|
|
685
|
+
state: "enabled",
|
|
686
|
+
tone
|
|
687
|
+
}),
|
|
688
|
+
hovered: buildColorInputStateVarNames({
|
|
689
|
+
mode: "invalid",
|
|
690
|
+
scheme,
|
|
691
|
+
state: "hovered",
|
|
692
|
+
tone
|
|
693
|
+
}),
|
|
694
|
+
readOnly: buildColorInputStateVarNames({
|
|
695
|
+
mode: "invalid",
|
|
696
|
+
scheme,
|
|
697
|
+
state: "readOnly",
|
|
698
|
+
tone
|
|
699
|
+
}),
|
|
700
|
+
disabled: buildColorInputStateVarNames({
|
|
701
|
+
mode: "invalid",
|
|
702
|
+
scheme,
|
|
703
|
+
state: "disabled",
|
|
704
|
+
tone
|
|
705
|
+
})
|
|
527
706
|
}
|
|
528
707
|
},
|
|
529
708
|
kbd: {
|
|
@@ -589,7 +768,12 @@ function buildColorCardVarNames(props) {
|
|
|
589
768
|
};
|
|
590
769
|
}
|
|
591
770
|
function buildColorInputStateVarNames(props) {
|
|
592
|
-
const {
|
|
771
|
+
const {
|
|
772
|
+
mode,
|
|
773
|
+
scheme,
|
|
774
|
+
state,
|
|
775
|
+
tone
|
|
776
|
+
} = props, prefix = `--color-${scheme}-${tone}-input-${mode}-${state}`;
|
|
593
777
|
return {
|
|
594
778
|
bg: `${prefix}-bg`,
|
|
595
779
|
border: `${prefix}-border`,
|
|
@@ -604,11 +788,17 @@ const vars = {
|
|
|
604
788
|
color: {
|
|
605
789
|
dark: theme.THEME_COLOR_CARD_TONES.reduce((acc, tone) => ({
|
|
606
790
|
...acc,
|
|
607
|
-
[tone]: buildColorCardVars({
|
|
791
|
+
[tone]: buildColorCardVars({
|
|
792
|
+
scheme: "dark",
|
|
793
|
+
tone
|
|
794
|
+
})
|
|
608
795
|
}), {}),
|
|
609
796
|
light: theme.THEME_COLOR_CARD_TONES.reduce((acc, tone) => ({
|
|
610
797
|
...acc,
|
|
611
|
-
[tone]: buildColorCardVars({
|
|
798
|
+
[tone]: buildColorCardVars({
|
|
799
|
+
scheme: "light",
|
|
800
|
+
tone
|
|
801
|
+
})
|
|
612
802
|
}), {}),
|
|
613
803
|
accent: {
|
|
614
804
|
fg: "var(--color-accent-fg)"
|
|
@@ -725,12 +915,71 @@ const vars = {
|
|
|
725
915
|
variable: "var(--color-syntax-variable)"
|
|
726
916
|
}
|
|
727
917
|
},
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
918
|
+
font: {
|
|
919
|
+
code: {
|
|
920
|
+
family: "var(--font-code-family)",
|
|
921
|
+
sizes: theme.FONT_CODE_SIZE.reduce((acc, size) => ({
|
|
922
|
+
...acc,
|
|
923
|
+
[size]: {
|
|
924
|
+
fontSize: `var(--font-code-${size}-size)`,
|
|
925
|
+
ascenderHeight: `var(--font-code-${size}-ascender-height)`,
|
|
926
|
+
descenderHeight: `var(--font-code-${size}-descender-height)`,
|
|
927
|
+
lineHeight: `var(--font-code-${size}-line-height)`,
|
|
928
|
+
letterSpacing: `var(--font-code-${size}-letter-spacing)`,
|
|
929
|
+
iconSize: `var(--font-code-${size}-icon-size)`
|
|
930
|
+
}
|
|
931
|
+
}), {})
|
|
932
|
+
},
|
|
933
|
+
heading: {
|
|
934
|
+
family: "var(--font-heading-family)",
|
|
935
|
+
sizes: theme.FONT_HEADING_SIZE.reduce((acc, size) => ({
|
|
936
|
+
...acc,
|
|
937
|
+
[size]: {
|
|
938
|
+
fontSize: `var(--font-code-${size}-size)`,
|
|
939
|
+
ascenderHeight: `var(--font-code-${size}-ascender-height)`,
|
|
940
|
+
descenderHeight: `var(--font-code-${size}-descender-height)`,
|
|
941
|
+
lineHeight: `var(--font-code-${size}-line-height)`,
|
|
942
|
+
letterSpacing: `var(--font-code-${size}-letter-spacing)`,
|
|
943
|
+
iconSize: `var(--font-code-${size}-icon-size)`
|
|
944
|
+
}
|
|
945
|
+
}), {})
|
|
946
|
+
},
|
|
947
|
+
label: {
|
|
948
|
+
family: "var(--font-label-family)",
|
|
949
|
+
sizes: theme.FONT_CODE_SIZE.reduce((acc, size) => ({
|
|
950
|
+
...acc,
|
|
951
|
+
[size]: {
|
|
952
|
+
fontSize: `var(--font-code-${size}-size)`,
|
|
953
|
+
ascenderHeight: `var(--font-code-${size}-ascender-height)`,
|
|
954
|
+
descenderHeight: `var(--font-code-${size}-descender-height)`,
|
|
955
|
+
lineHeight: `var(--font-code-${size}-line-height)`,
|
|
956
|
+
letterSpacing: `var(--font-code-${size}-letter-spacing)`,
|
|
957
|
+
iconSize: `var(--font-code-${size}-icon-size)`
|
|
958
|
+
}
|
|
959
|
+
}), {})
|
|
960
|
+
},
|
|
961
|
+
text: {
|
|
962
|
+
family: "var(--font-text-family)",
|
|
963
|
+
sizes: theme.FONT_TEXT_SIZE.reduce((acc, size) => ({
|
|
964
|
+
...acc,
|
|
965
|
+
[size]: {
|
|
966
|
+
fontSize: `var(--font-code-${size}-size)`,
|
|
967
|
+
ascenderHeight: `var(--font-code-${size}-ascender-height)`,
|
|
968
|
+
descenderHeight: `var(--font-code-${size}-descender-height)`,
|
|
969
|
+
lineHeight: `var(--font-code-${size}-line-height)`,
|
|
970
|
+
letterSpacing: `var(--font-code-${size}-letter-spacing)`,
|
|
971
|
+
iconSize: `var(--font-code-${size}-icon-size)`
|
|
972
|
+
}
|
|
973
|
+
}), {})
|
|
974
|
+
}
|
|
975
|
+
},
|
|
976
|
+
space: Object.fromEntries(theme.SPACE.map((space) => [space, `var(${varNames.space[space]})`]))
|
|
731
977
|
};
|
|
732
978
|
function buildColorCardVars(props) {
|
|
733
|
-
const {
|
|
979
|
+
const {
|
|
980
|
+
scheme,
|
|
981
|
+
tone
|
|
982
|
+
} = props, prefix = `--color-${scheme}-${tone}`;
|
|
734
983
|
return {
|
|
735
984
|
accent: {
|
|
736
985
|
fg: `var(${prefix}-accent-fg)`
|
|
@@ -771,7 +1020,12 @@ function buildColorCardVars(props) {
|
|
|
771
1020
|
[mode]: {
|
|
772
1021
|
...theme.THEME_COLOR_INPUT_STATES.reduce((acc2, state) => ({
|
|
773
1022
|
...acc2,
|
|
774
|
-
[state]: buildColorInputStateVars({
|
|
1023
|
+
[state]: buildColorInputStateVars({
|
|
1024
|
+
mode,
|
|
1025
|
+
scheme,
|
|
1026
|
+
state,
|
|
1027
|
+
tone
|
|
1028
|
+
})
|
|
775
1029
|
}), {})
|
|
776
1030
|
}
|
|
777
1031
|
}), {})
|
|
@@ -839,7 +1093,12 @@ function buildColorCardVars(props) {
|
|
|
839
1093
|
};
|
|
840
1094
|
}
|
|
841
1095
|
function buildColorInputStateVars(props) {
|
|
842
|
-
const {
|
|
1096
|
+
const {
|
|
1097
|
+
mode,
|
|
1098
|
+
scheme,
|
|
1099
|
+
state,
|
|
1100
|
+
tone
|
|
1101
|
+
} = props, prefix = `--color-${scheme}-${tone}-input-${mode}-${state}`;
|
|
843
1102
|
return {
|
|
844
1103
|
bg: `var(${prefix}-bg)`,
|
|
845
1104
|
border: `var(${prefix}-border)`,
|
|
@@ -856,18 +1115,15 @@ const badgeRules = {
|
|
|
856
1115
|
color: vars.color.badge.fg,
|
|
857
1116
|
verticalAlign: "top"
|
|
858
1117
|
},
|
|
859
|
-
...theme.THEME_COLOR_STATE_TONES.reduce(
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
[
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
}),
|
|
869
|
-
{}
|
|
870
|
-
)
|
|
1118
|
+
...theme.THEME_COLOR_STATE_TONES.reduce((acc, tone) => ({
|
|
1119
|
+
...acc,
|
|
1120
|
+
[`badge-${tone}`]: {
|
|
1121
|
+
[varNames.color.badge.bg]: vars.color.badge[tone].bg,
|
|
1122
|
+
[varNames.color.badge.dot]: vars.color.badge[tone].dot,
|
|
1123
|
+
[varNames.color.badge.fg]: vars.color.badge[tone].fg,
|
|
1124
|
+
[varNames.color.badge.icon]: vars.color.badge[tone].icon
|
|
1125
|
+
}
|
|
1126
|
+
}), {})
|
|
871
1127
|
}, boxRules = {
|
|
872
1128
|
box: {
|
|
873
1129
|
minWidth: 0,
|
|
@@ -972,20 +1228,17 @@ const badgeRules = {
|
|
|
972
1228
|
"--card-shadow-ambient-color": "var(--color-shadow-ambient)",
|
|
973
1229
|
"--card-skeleton-from-color": "var(--color-skeleton-from)",
|
|
974
1230
|
"--card-skeleton-to-color": "var(--color-skeleton-to)",
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
'--card-bg-image': checkered
|
|
981
|
-
? `repeating-conic-gradient(${color.bg} 0% 25%, ${color.muted.bg} 0% 50%)`
|
|
982
|
-
: undefined,
|
|
983
|
-
|
|
984
|
-
'--card-bg2-color': color.muted.bg,
|
|
985
|
-
'--card-link-color': color.link.fg,
|
|
986
|
-
'--card-hairline-soft-color': color.border,
|
|
987
|
-
'--card-hairline-hard-color': color.border, */
|
|
1231
|
+
"--card-bg2-color": "var(--color-muted-bg)",
|
|
1232
|
+
"--card-link-color": "var(--color-link-fg)",
|
|
1233
|
+
"--card-hairline-soft-color": "var(--color-border)",
|
|
1234
|
+
"--card-hairline-hard-color": "var(--color-border)",
|
|
988
1235
|
"@nest": {
|
|
1236
|
+
"&[data-checkered]": {
|
|
1237
|
+
"--card-bg-image": "repeating-conic-gradient(var(--color-bg) 0% 25%, var(--color-muted-bg) 0% 50%)",
|
|
1238
|
+
backgroundSize: "var(--space-3) var(--space-3)",
|
|
1239
|
+
backgroundPosition: "50% 50%",
|
|
1240
|
+
backgroundImage: "var(--card-bg-image)"
|
|
1241
|
+
},
|
|
989
1242
|
'&[data-as="button"]': {
|
|
990
1243
|
WebkitFontSmoothing: "inherit",
|
|
991
1244
|
appearance: "none",
|
|
@@ -1366,7 +1619,9 @@ const badgeRules = {
|
|
|
1366
1619
|
}
|
|
1367
1620
|
}
|
|
1368
1621
|
}, spinnerRules = {
|
|
1369
|
-
spinner: {
|
|
1622
|
+
spinner: {},
|
|
1623
|
+
"animated-spinner-icon": {
|
|
1624
|
+
animation: "spinner-rotate 500ms linear infinite",
|
|
1370
1625
|
"@keyframes": {
|
|
1371
1626
|
"spinner-rotate": {
|
|
1372
1627
|
from: {
|
|
@@ -1376,11 +1631,6 @@ const badgeRules = {
|
|
|
1376
1631
|
transform: "rotate(360deg)"
|
|
1377
1632
|
}
|
|
1378
1633
|
}
|
|
1379
|
-
},
|
|
1380
|
-
"@nest": {
|
|
1381
|
-
"& > span > svg": {
|
|
1382
|
-
animation: "spinner-rotate 500ms linear infinite"
|
|
1383
|
-
}
|
|
1384
1634
|
}
|
|
1385
1635
|
}
|
|
1386
1636
|
}, switchRules = {
|
|
@@ -1572,68 +1822,89 @@ const badgeRules = {
|
|
|
1572
1822
|
//
|
|
1573
1823
|
}, textInputRules = {
|
|
1574
1824
|
"text-input": {
|
|
1575
|
-
|
|
1825
|
+
"--font-family": vars.font.text.family
|
|
1576
1826
|
},
|
|
1577
|
-
|
|
1827
|
+
...theme.SPACE.reduce((acc, space) => ({
|
|
1828
|
+
...acc,
|
|
1829
|
+
...responsiveRules(`text-input-p-${space}`.replace(".", "_"), {
|
|
1830
|
+
"--padding-top": `calc(${vars.space[space]} - var(--font-ascender-height))`,
|
|
1831
|
+
"--padding-right": vars.space[space],
|
|
1832
|
+
"--padding-bottom": `calc(${vars.space[space]} - var(--font-descender-height))`,
|
|
1833
|
+
"--padding-left": vars.space[space]
|
|
1834
|
+
})
|
|
1835
|
+
}), {}),
|
|
1836
|
+
...theme.FONT_TEXT_SIZE.reduce((acc, size) => ({
|
|
1837
|
+
...acc,
|
|
1838
|
+
...responsiveRules(`text-input-${size}`, {
|
|
1839
|
+
"--font-size": vars.font.text.sizes[size].fontSize,
|
|
1840
|
+
"--font-line-height": vars.font.text.sizes[size].lineHeight,
|
|
1841
|
+
"--font-letter-spacing": vars.font.text.sizes[size].letterSpacing,
|
|
1842
|
+
"--font-ascender-height": vars.font.text.sizes[size].ascenderHeight,
|
|
1843
|
+
"--font-descender-height": vars.font.text.sizes[size].descenderHeight
|
|
1844
|
+
})
|
|
1845
|
+
}), {}),
|
|
1846
|
+
"text-input-element": {
|
|
1847
|
+
appearance: "none",
|
|
1848
|
+
background: "none",
|
|
1849
|
+
border: 0,
|
|
1850
|
+
borderRadius: 0,
|
|
1851
|
+
outline: "none",
|
|
1852
|
+
width: "100%",
|
|
1853
|
+
boxSizing: "border-box",
|
|
1854
|
+
fontFamily: "var(--font-family)",
|
|
1855
|
+
fontSize: "var(--font-size)",
|
|
1856
|
+
fontWeight: "var(--font-weight)",
|
|
1857
|
+
lineHeight: "var(--font-line-height)",
|
|
1858
|
+
letterSpacing: "var(--font-letter-spacing)",
|
|
1859
|
+
margin: 0,
|
|
1860
|
+
position: "relative",
|
|
1861
|
+
zIndex: 1,
|
|
1862
|
+
display: "block",
|
|
1863
|
+
color: "var(--input-fg-color)",
|
|
1864
|
+
paddingTop: "var(--padding-top)",
|
|
1865
|
+
paddingRight: "var(--padding-right)",
|
|
1866
|
+
paddingBottom: "var(--padding-bottom)",
|
|
1867
|
+
paddingLeft: "var(--padding-left)",
|
|
1868
|
+
"--input-fg-color": "var(--color-input-default-enabled-fg)",
|
|
1578
1869
|
"@nest": {
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
position: "relative",
|
|
1593
|
-
zIndex: 1,
|
|
1594
|
-
display: "block",
|
|
1595
|
-
color: "var(--input-fg-color)",
|
|
1596
|
-
"@nest": {
|
|
1597
|
-
// NOTE: This is a hack to disable Chrome’s autofill styles
|
|
1598
|
-
"&:-webkit-autofill, &:-webkit-autofill:hover, &:-webkit-autofill:focus, &:-webkit-autofill:active": {
|
|
1599
|
-
WebkitTextFillColor: "var(--input-fg-color) !important",
|
|
1600
|
-
transition: "background-color 5000s",
|
|
1601
|
-
transitionDelay: "86400s"
|
|
1602
|
-
// 24h
|
|
1603
|
-
}
|
|
1604
|
-
// /* &:is(textarea) */
|
|
1605
|
-
// &[data-as='textarea'] {
|
|
1606
|
-
// resize: none;
|
|
1607
|
-
// }
|
|
1608
|
-
// &::placeholder {
|
|
1609
|
-
// color: var(--input-placeholder-color);
|
|
1610
|
-
// }
|
|
1611
|
-
// &[data-scheme='${$scheme}'][data-tone='${$tone}'] {
|
|
1612
|
-
// /* --input-fg-color: ${color.input.default.enabled.fg}; */
|
|
1613
|
-
// /* --input-placeholder-color: ${color.input.default.enabled.placeholder}; */
|
|
1614
|
-
// /* enabled */
|
|
1615
|
-
// &:not(:invalid):not(:disabled):not(:read-only) {
|
|
1616
|
-
// /* --input-fg-color: ${color.input.default.enabled.fg}; */
|
|
1617
|
-
// /* --input-placeholder-color: ${color.input.default.enabled.placeholder}; */
|
|
1618
|
-
// }
|
|
1619
|
-
// /* disabled */
|
|
1620
|
-
// &:not(:invalid):disabled {
|
|
1621
|
-
// /* --input-fg-color: ${color.input.default.disabled.fg}; */
|
|
1622
|
-
// /* --input-placeholder-color: ${color.input.default.disabled.placeholder}; */
|
|
1623
|
-
// }
|
|
1624
|
-
// /* invalid */
|
|
1625
|
-
// &:invalid {
|
|
1626
|
-
// /* --input-fg-color: ${color.input.invalid.enabled.fg}; */
|
|
1627
|
-
// /* --input-placeholder-color: ${color.input.invalid.enabled.placeholder}; */
|
|
1628
|
-
// }
|
|
1629
|
-
// /* readOnly */
|
|
1630
|
-
// &:read-only {
|
|
1631
|
-
// /* --input-fg-color: ${color.input.default.readOnly.fg}; */
|
|
1632
|
-
// /* --input-placeholder-color: ${color.input.default.readOnly.placeholder}; */
|
|
1633
|
-
// }
|
|
1634
|
-
// }
|
|
1635
|
-
}
|
|
1870
|
+
// NOTE: This is a hack to disable Chrome’s autofill styles
|
|
1871
|
+
"&:-webkit-autofill, &:-webkit-autofill:hover, &:-webkit-autofill:focus, &:-webkit-autofill:active": {
|
|
1872
|
+
WebkitTextFillColor: "var(--input-fg-color) !important",
|
|
1873
|
+
transition: "background-color 5000s",
|
|
1874
|
+
transitionDelay: "86400s"
|
|
1875
|
+
// 24h
|
|
1876
|
+
},
|
|
1877
|
+
/* &:is(textarea) */
|
|
1878
|
+
// '&[data-as="textarea"]': {
|
|
1879
|
+
// resize: 'none',
|
|
1880
|
+
// },
|
|
1881
|
+
"&::placeholder": {
|
|
1882
|
+
color: "var(--input-placeholder-color)"
|
|
1636
1883
|
}
|
|
1884
|
+
// &[data-scheme='${$scheme}'][data-tone='${$tone}'] {
|
|
1885
|
+
// /* --input-fg-color: ${color.input.default.enabled.fg}; */
|
|
1886
|
+
// /* --input-placeholder-color: ${color.input.default.enabled.placeholder}; */
|
|
1887
|
+
// /* enabled */
|
|
1888
|
+
// &:not(:invalid):not(:disabled):not(:read-only) {
|
|
1889
|
+
// /* --input-fg-color: ${color.input.default.enabled.fg}; */
|
|
1890
|
+
// /* --input-placeholder-color: ${color.input.default.enabled.placeholder}; */
|
|
1891
|
+
// }
|
|
1892
|
+
// /* disabled */
|
|
1893
|
+
// &:not(:invalid):disabled {
|
|
1894
|
+
// /* --input-fg-color: ${color.input.default.disabled.fg}; */
|
|
1895
|
+
// /* --input-placeholder-color: ${color.input.default.disabled.placeholder}; */
|
|
1896
|
+
// }
|
|
1897
|
+
// /* invalid */
|
|
1898
|
+
// &:invalid {
|
|
1899
|
+
// /* --input-fg-color: ${color.input.invalid.enabled.fg}; */
|
|
1900
|
+
// /* --input-placeholder-color: ${color.input.invalid.enabled.placeholder}; */
|
|
1901
|
+
// }
|
|
1902
|
+
// /* readOnly */
|
|
1903
|
+
// &:read-only {
|
|
1904
|
+
// /* --input-fg-color: ${color.input.default.readOnly.fg}; */
|
|
1905
|
+
// /* --input-placeholder-color: ${color.input.default.readOnly.placeholder}; */
|
|
1906
|
+
// }
|
|
1907
|
+
// }
|
|
1637
1908
|
}
|
|
1638
1909
|
},
|
|
1639
1910
|
"text-input-prefix": {
|
|
@@ -1647,8 +1918,8 @@ const badgeRules = {
|
|
|
1647
1918
|
}
|
|
1648
1919
|
},
|
|
1649
1920
|
"text-input-suffix": {
|
|
1650
|
-
|
|
1651
|
-
|
|
1921
|
+
borderTopLeftRadius: 0,
|
|
1922
|
+
borderBottomLeftRadius: 0,
|
|
1652
1923
|
"@nest": {
|
|
1653
1924
|
"& > span": {
|
|
1654
1925
|
display: "block",
|
|
@@ -1657,7 +1928,7 @@ const badgeRules = {
|
|
|
1657
1928
|
}
|
|
1658
1929
|
},
|
|
1659
1930
|
"text-input-presentation": {
|
|
1660
|
-
"--input-box-shadow": "
|
|
1931
|
+
"--input-box-shadow": "inset 0 0 0 1px var(--input-border-color)",
|
|
1661
1932
|
position: "absolute",
|
|
1662
1933
|
top: 0,
|
|
1663
1934
|
left: 0,
|
|
@@ -1666,8 +1937,9 @@ const badgeRules = {
|
|
|
1666
1937
|
display: "block",
|
|
1667
1938
|
pointerEvents: "none",
|
|
1668
1939
|
zIndex: 0,
|
|
1669
|
-
backgroundColor: "var(--
|
|
1670
|
-
boxShadow: "var(--input-box-shadow)"
|
|
1940
|
+
backgroundColor: "var(--input-bg-color)",
|
|
1941
|
+
boxShadow: "var(--input-box-shadow)",
|
|
1942
|
+
"--input-border-color": "var(--color-input-default-enabled-border)"
|
|
1671
1943
|
// border-top-left-radius: ${$hasPrefix ? 0 : undefined};
|
|
1672
1944
|
// border-bottom-left-radius: ${$hasPrefix ? 0 : undefined};
|
|
1673
1945
|
// border-top-right-radius: ${$hasSuffix ? 0 : undefined};
|
|
@@ -1769,42 +2041,114 @@ const badgeRules = {
|
|
|
1769
2041
|
}, tokenRules = {
|
|
1770
2042
|
token: {
|
|
1771
2043
|
"@nest": {
|
|
1772
|
-
"&.atrule": {
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
"&.
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
"&.
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
"&.
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
"&.
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
"&.
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
"&.
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
"&.
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
"&.
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
"&.
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
"&.
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
"&.
|
|
1806
|
-
|
|
1807
|
-
|
|
2044
|
+
"&.atrule": {
|
|
2045
|
+
color: vars.color.syntax.atrule
|
|
2046
|
+
},
|
|
2047
|
+
"&.attr-name": {
|
|
2048
|
+
color: vars.color.syntax.attrName
|
|
2049
|
+
},
|
|
2050
|
+
"&.attr-value": {
|
|
2051
|
+
color: vars.color.syntax.attrValue
|
|
2052
|
+
},
|
|
2053
|
+
"&.attribute": {
|
|
2054
|
+
color: vars.color.syntax.attribute
|
|
2055
|
+
},
|
|
2056
|
+
"&.boolean": {
|
|
2057
|
+
color: vars.color.syntax.boolean
|
|
2058
|
+
},
|
|
2059
|
+
"&.builtin": {
|
|
2060
|
+
color: vars.color.syntax.builtin
|
|
2061
|
+
},
|
|
2062
|
+
"&.cdata": {
|
|
2063
|
+
color: vars.color.syntax.cdata
|
|
2064
|
+
},
|
|
2065
|
+
"&.char": {
|
|
2066
|
+
color: vars.color.syntax.char
|
|
2067
|
+
},
|
|
2068
|
+
"&.class": {
|
|
2069
|
+
color: vars.color.syntax.class
|
|
2070
|
+
},
|
|
2071
|
+
"&.class-name": {
|
|
2072
|
+
color: vars.color.syntax.className
|
|
2073
|
+
},
|
|
2074
|
+
"&.comment": {
|
|
2075
|
+
color: vars.color.syntax.comment
|
|
2076
|
+
},
|
|
2077
|
+
"&.constant": {
|
|
2078
|
+
color: vars.color.syntax.constant
|
|
2079
|
+
},
|
|
2080
|
+
"&.deleted": {
|
|
2081
|
+
color: vars.color.syntax.deleted
|
|
2082
|
+
},
|
|
2083
|
+
"&.doctype": {
|
|
2084
|
+
color: vars.color.syntax.doctype
|
|
2085
|
+
},
|
|
2086
|
+
"&.entity": {
|
|
2087
|
+
color: vars.color.syntax.entity
|
|
2088
|
+
},
|
|
2089
|
+
"&.function": {
|
|
2090
|
+
color: vars.color.syntax.function
|
|
2091
|
+
},
|
|
2092
|
+
"&.hexcode": {
|
|
2093
|
+
color: vars.color.syntax.hexcode
|
|
2094
|
+
},
|
|
2095
|
+
"&.id": {
|
|
2096
|
+
color: vars.color.syntax.id
|
|
2097
|
+
},
|
|
2098
|
+
"&.important": {
|
|
2099
|
+
color: vars.color.syntax.important
|
|
2100
|
+
},
|
|
2101
|
+
"&.inserted": {
|
|
2102
|
+
color: vars.color.syntax.inserted
|
|
2103
|
+
},
|
|
2104
|
+
"&.keyword": {
|
|
2105
|
+
color: vars.color.syntax.keyword
|
|
2106
|
+
},
|
|
2107
|
+
"&.number": {
|
|
2108
|
+
color: vars.color.syntax.number
|
|
2109
|
+
},
|
|
2110
|
+
"&.operator": {
|
|
2111
|
+
color: vars.color.syntax.operator
|
|
2112
|
+
},
|
|
2113
|
+
"&.prolog": {
|
|
2114
|
+
color: vars.color.syntax.prolog
|
|
2115
|
+
},
|
|
2116
|
+
"&.property": {
|
|
2117
|
+
color: vars.color.syntax.property
|
|
2118
|
+
},
|
|
2119
|
+
"&.pseudo-class": {
|
|
2120
|
+
color: vars.color.syntax.pseudoClass
|
|
2121
|
+
},
|
|
2122
|
+
"&.pseudo-element": {
|
|
2123
|
+
color: vars.color.syntax.pseudoElement
|
|
2124
|
+
},
|
|
2125
|
+
"&.punctuation": {
|
|
2126
|
+
color: vars.color.syntax.punctuation
|
|
2127
|
+
},
|
|
2128
|
+
"&.regex": {
|
|
2129
|
+
color: vars.color.syntax.regex
|
|
2130
|
+
},
|
|
2131
|
+
"&.selector": {
|
|
2132
|
+
color: vars.color.syntax.selector
|
|
2133
|
+
},
|
|
2134
|
+
"&.string": {
|
|
2135
|
+
color: vars.color.syntax.string
|
|
2136
|
+
},
|
|
2137
|
+
"&.symbol": {
|
|
2138
|
+
color: vars.color.syntax.symbol
|
|
2139
|
+
},
|
|
2140
|
+
"&.tag": {
|
|
2141
|
+
color: vars.color.syntax.tag
|
|
2142
|
+
},
|
|
2143
|
+
"&.unit": {
|
|
2144
|
+
color: vars.color.syntax.unit
|
|
2145
|
+
},
|
|
2146
|
+
"&.url": {
|
|
2147
|
+
color: vars.color.syntax.url
|
|
2148
|
+
},
|
|
2149
|
+
"&.variable": {
|
|
2150
|
+
color: vars.color.syntax.variable
|
|
2151
|
+
}
|
|
1808
2152
|
}
|
|
1809
2153
|
}
|
|
1810
2154
|
}, tooltipRules = {
|
|
@@ -1890,32 +2234,76 @@ const badgeRules = {
|
|
|
1890
2234
|
})
|
|
1891
2235
|
}, flexRules = {
|
|
1892
2236
|
// direction
|
|
1893
|
-
...responsiveRules("row", {
|
|
1894
|
-
|
|
2237
|
+
...responsiveRules("row", {
|
|
2238
|
+
flexDirection: "row"
|
|
2239
|
+
}),
|
|
2240
|
+
...responsiveRules("column", {
|
|
2241
|
+
flexDirection: "column"
|
|
2242
|
+
}),
|
|
1895
2243
|
// align
|
|
1896
|
-
...responsiveRules("align-flex-start", {
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
...responsiveRules("align-
|
|
1900
|
-
|
|
2244
|
+
...responsiveRules("align-flex-start", {
|
|
2245
|
+
alignItems: "flex-start"
|
|
2246
|
+
}),
|
|
2247
|
+
...responsiveRules("align-flex-end", {
|
|
2248
|
+
alignItems: "end"
|
|
2249
|
+
}),
|
|
2250
|
+
...responsiveRules("align-center", {
|
|
2251
|
+
alignItems: "center"
|
|
2252
|
+
}),
|
|
2253
|
+
...responsiveRules("align-stretch", {
|
|
2254
|
+
alignItems: "stretch"
|
|
2255
|
+
}),
|
|
2256
|
+
...responsiveRules("align-baseline", {
|
|
2257
|
+
alignItems: "baseline"
|
|
2258
|
+
}),
|
|
1901
2259
|
// justify
|
|
1902
|
-
...responsiveRules("justify-flex-start", {
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
...responsiveRules("justify-
|
|
1906
|
-
|
|
1907
|
-
|
|
2260
|
+
...responsiveRules("justify-flex-start", {
|
|
2261
|
+
justifyContent: "flex-start"
|
|
2262
|
+
}),
|
|
2263
|
+
...responsiveRules("justify-flex-end", {
|
|
2264
|
+
justifyContent: "flex-end"
|
|
2265
|
+
}),
|
|
2266
|
+
...responsiveRules("justify-center", {
|
|
2267
|
+
justifyContent: "center"
|
|
2268
|
+
}),
|
|
2269
|
+
...responsiveRules("justify-between", {
|
|
2270
|
+
justifyContent: "space-between"
|
|
2271
|
+
}),
|
|
2272
|
+
...responsiveRules("justify-around", {
|
|
2273
|
+
justifyContent: "space-around"
|
|
2274
|
+
}),
|
|
2275
|
+
...responsiveRules("justify-evenly", {
|
|
2276
|
+
justifyContent: "space-evenly"
|
|
2277
|
+
}),
|
|
1908
2278
|
// wrap
|
|
1909
|
-
...responsiveRules("wrap-nowrap", {
|
|
1910
|
-
|
|
1911
|
-
|
|
2279
|
+
...responsiveRules("wrap-nowrap", {
|
|
2280
|
+
flexWrap: "nowrap"
|
|
2281
|
+
}),
|
|
2282
|
+
...responsiveRules("wrap-wrap", {
|
|
2283
|
+
flexWrap: "wrap"
|
|
2284
|
+
}),
|
|
2285
|
+
...responsiveRules("wrap-reverse", {
|
|
2286
|
+
flexWrap: "wrap-reverse"
|
|
2287
|
+
})
|
|
1912
2288
|
}, flexItemRules = {
|
|
1913
|
-
...responsiveRules("flex-none", {
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
...responsiveRules("flex-
|
|
1917
|
-
|
|
1918
|
-
|
|
2289
|
+
...responsiveRules("flex-none", {
|
|
2290
|
+
flex: "none"
|
|
2291
|
+
}),
|
|
2292
|
+
...responsiveRules("flex-1", {
|
|
2293
|
+
flex: 1
|
|
2294
|
+
}),
|
|
2295
|
+
...responsiveRules("flex-2", {
|
|
2296
|
+
flex: 2
|
|
2297
|
+
}),
|
|
2298
|
+
...responsiveRules("flex-3", {
|
|
2299
|
+
flex: 3
|
|
2300
|
+
}),
|
|
2301
|
+
...responsiveRules("flex-4", {
|
|
2302
|
+
flex: 4
|
|
2303
|
+
}),
|
|
2304
|
+
...responsiveRules("flex-5", {
|
|
2305
|
+
flex: 5
|
|
2306
|
+
})
|
|
1919
2307
|
}, fontRules = {
|
|
1920
2308
|
font: {
|
|
1921
2309
|
position: "relative",
|
|
@@ -1971,172 +2359,451 @@ const badgeRules = {
|
|
|
1971
2359
|
},
|
|
1972
2360
|
"font-bold": {
|
|
1973
2361
|
"--font-weight": "var(--font-weight-bold)"
|
|
1974
|
-
}
|
|
2362
|
+
},
|
|
2363
|
+
// align
|
|
2364
|
+
...responsiveRules("text-align-initial", {
|
|
2365
|
+
textAlign: "initial"
|
|
2366
|
+
}),
|
|
2367
|
+
...responsiveRules("text-align-left", {
|
|
2368
|
+
textAlign: "left"
|
|
2369
|
+
}),
|
|
2370
|
+
...responsiveRules("text-align-center", {
|
|
2371
|
+
textAlign: "center"
|
|
2372
|
+
}),
|
|
2373
|
+
...responsiveRules("text-align-right", {
|
|
2374
|
+
textAlign: "right"
|
|
2375
|
+
}),
|
|
2376
|
+
...responsiveRules("text-align-justify", {
|
|
2377
|
+
textAlign: "justify"
|
|
2378
|
+
})
|
|
1975
2379
|
}, gapRules = {
|
|
1976
2380
|
...theme.SPACE.reduce((acc, space) => ({
|
|
1977
2381
|
...acc,
|
|
1978
|
-
...responsiveRules(`g-${space}
|
|
1979
|
-
gap:
|
|
2382
|
+
...responsiveRules(`g-${space}`.replace(".", "_"), {
|
|
2383
|
+
gap: vars.space[space]
|
|
1980
2384
|
})
|
|
1981
2385
|
}), {}),
|
|
1982
2386
|
...theme.SPACE.reduce((acc, space) => ({
|
|
1983
2387
|
...acc,
|
|
1984
|
-
...responsiveRules(`gx-${space}
|
|
1985
|
-
columnGap:
|
|
2388
|
+
...responsiveRules(`gx-${space}`.replace(".", "_"), {
|
|
2389
|
+
columnGap: vars.space[space]
|
|
1986
2390
|
})
|
|
1987
2391
|
}), {}),
|
|
1988
2392
|
...theme.SPACE.reduce((acc, space) => ({
|
|
1989
2393
|
...acc,
|
|
1990
|
-
...responsiveRules(`gy-${space}
|
|
1991
|
-
rowGap:
|
|
2394
|
+
...responsiveRules(`gy-${space}`.replace(".", "_"), {
|
|
2395
|
+
rowGap: vars.space[space]
|
|
1992
2396
|
})
|
|
1993
2397
|
}), {})
|
|
1994
2398
|
}, gridRules = {
|
|
1995
2399
|
// autoCols
|
|
1996
|
-
...responsiveRules("auto-cols-auto", {
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
...responsiveRules("auto-cols-
|
|
2400
|
+
...responsiveRules("auto-cols-auto", {
|
|
2401
|
+
gridAutoColumns: "auto"
|
|
2402
|
+
}),
|
|
2403
|
+
...responsiveRules("auto-cols-min", {
|
|
2404
|
+
gridAutoColumns: "min"
|
|
2405
|
+
}),
|
|
2406
|
+
...responsiveRules("auto-cols-max", {
|
|
2407
|
+
gridAutoColumns: "max"
|
|
2408
|
+
}),
|
|
2409
|
+
...responsiveRules("auto-cols-fr", {
|
|
2410
|
+
gridAutoColumns: "fr"
|
|
2411
|
+
}),
|
|
2000
2412
|
// autoFlow
|
|
2001
|
-
...responsiveRules("auto-flow-row", {
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
...responsiveRules("auto-flow-column
|
|
2413
|
+
...responsiveRules("auto-flow-row", {
|
|
2414
|
+
gridAutoFlow: "row"
|
|
2415
|
+
}),
|
|
2416
|
+
...responsiveRules("auto-flow-column", {
|
|
2417
|
+
gridAutoFlow: "column"
|
|
2418
|
+
}),
|
|
2419
|
+
...responsiveRules("auto-flow-row-dense", {
|
|
2420
|
+
gridAutoFlow: "row dense"
|
|
2421
|
+
}),
|
|
2422
|
+
...responsiveRules("auto-flow-column-dense", {
|
|
2423
|
+
gridAutoFlow: "column dense"
|
|
2424
|
+
}),
|
|
2005
2425
|
// autoRows
|
|
2006
|
-
...responsiveRules("auto-rows-auto", {
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2426
|
+
...responsiveRules("auto-rows-auto", {
|
|
2427
|
+
gridAutoRows: "auto"
|
|
2428
|
+
}),
|
|
2429
|
+
...responsiveRules("auto-rows-min", {
|
|
2430
|
+
gridAutoRows: "min-content"
|
|
2431
|
+
}),
|
|
2432
|
+
...responsiveRules("auto-rows-max", {
|
|
2433
|
+
gridAutoRows: "max-content"
|
|
2434
|
+
}),
|
|
2435
|
+
...responsiveRules("auto-rows-fr", {
|
|
2436
|
+
gridAutoRows: "minmax(0, 1fr)"
|
|
2437
|
+
}),
|
|
2010
2438
|
// columns
|
|
2011
|
-
...responsiveRules("columns-1", {
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
...responsiveRules("columns-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
...responsiveRules("columns-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
...responsiveRules("columns-
|
|
2021
|
-
|
|
2439
|
+
...responsiveRules("columns-1", {
|
|
2440
|
+
gridTemplateColumns: "repeat(1, 1fr)"
|
|
2441
|
+
}),
|
|
2442
|
+
...responsiveRules("columns-2", {
|
|
2443
|
+
gridTemplateColumns: "repeat(2, 1fr)"
|
|
2444
|
+
}),
|
|
2445
|
+
...responsiveRules("columns-3", {
|
|
2446
|
+
gridTemplateColumns: "repeat(3, 1fr)"
|
|
2447
|
+
}),
|
|
2448
|
+
...responsiveRules("columns-4", {
|
|
2449
|
+
gridTemplateColumns: "repeat(4, 1fr)"
|
|
2450
|
+
}),
|
|
2451
|
+
...responsiveRules("columns-5", {
|
|
2452
|
+
gridTemplateColumns: "repeat(5, 1fr)"
|
|
2453
|
+
}),
|
|
2454
|
+
...responsiveRules("columns-6", {
|
|
2455
|
+
gridTemplateColumns: "repeat(6, 1fr)"
|
|
2456
|
+
}),
|
|
2457
|
+
...responsiveRules("columns-7", {
|
|
2458
|
+
gridTemplateColumns: "repeat(7, 1fr)"
|
|
2459
|
+
}),
|
|
2460
|
+
...responsiveRules("columns-8", {
|
|
2461
|
+
gridTemplateColumns: "repeat(8, 1fr)"
|
|
2462
|
+
}),
|
|
2463
|
+
...responsiveRules("columns-9", {
|
|
2464
|
+
gridTemplateColumns: "repeat(9, 1fr)"
|
|
2465
|
+
}),
|
|
2466
|
+
...responsiveRules("columns-10", {
|
|
2467
|
+
gridTemplateColumns: "repeat(10, 1fr)"
|
|
2468
|
+
}),
|
|
2469
|
+
...responsiveRules("columns-12", {
|
|
2470
|
+
gridTemplateColumns: "repeat(12, 1fr)"
|
|
2471
|
+
}),
|
|
2472
|
+
// rows
|
|
2473
|
+
...responsiveRules("rows-1", {
|
|
2474
|
+
gridTemplateRows: "repeat(1, 1fr)"
|
|
2475
|
+
}),
|
|
2476
|
+
...responsiveRules("rows-2", {
|
|
2477
|
+
gridTemplateRows: "repeat(2, 1fr)"
|
|
2478
|
+
}),
|
|
2479
|
+
...responsiveRules("rows-3", {
|
|
2480
|
+
gridTemplateRows: "repeat(3, 1fr)"
|
|
2481
|
+
}),
|
|
2482
|
+
...responsiveRules("rows-4", {
|
|
2483
|
+
gridTemplateRows: "repeat(4, 1fr)"
|
|
2484
|
+
}),
|
|
2485
|
+
...responsiveRules("rows-5", {
|
|
2486
|
+
gridTemplateRows: "repeat(5, 1fr)"
|
|
2487
|
+
}),
|
|
2488
|
+
...responsiveRules("rows-6", {
|
|
2489
|
+
gridTemplateRows: "repeat(6, 1fr)"
|
|
2490
|
+
}),
|
|
2491
|
+
...responsiveRules("rows-7", {
|
|
2492
|
+
gridTemplateRows: "repeat(7, 1fr)"
|
|
2493
|
+
}),
|
|
2494
|
+
...responsiveRules("rows-8", {
|
|
2495
|
+
gridTemplateRows: "repeat(8, 1fr)"
|
|
2496
|
+
}),
|
|
2497
|
+
...responsiveRules("rows-9", {
|
|
2498
|
+
gridTemplateRows: "repeat(9, 1fr)"
|
|
2499
|
+
}),
|
|
2500
|
+
...responsiveRules("rows-10", {
|
|
2501
|
+
gridTemplateRows: "repeat(10, 1fr)"
|
|
2502
|
+
}),
|
|
2503
|
+
...responsiveRules("rows-12", {
|
|
2504
|
+
gridTemplateRows: "repeat(12, 1fr)"
|
|
2505
|
+
})
|
|
2022
2506
|
}, gridItemRules = {
|
|
2023
2507
|
// column
|
|
2024
|
-
...responsiveRules("col-auto", {
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
...responsiveRules("col-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
...responsiveRules("col-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
...responsiveRules("col-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
...responsiveRules("col-
|
|
2037
|
-
|
|
2508
|
+
...responsiveRules("col-auto", {
|
|
2509
|
+
gridColumn: "span 1 / span 1"
|
|
2510
|
+
}),
|
|
2511
|
+
...responsiveRules("col-full", {
|
|
2512
|
+
gridColumn: "1 / -1"
|
|
2513
|
+
}),
|
|
2514
|
+
...responsiveRules("col-1", {
|
|
2515
|
+
gridColumn: "span 1 / span 1"
|
|
2516
|
+
}),
|
|
2517
|
+
...responsiveRules("col-2", {
|
|
2518
|
+
gridColumn: "span 2 / span 2"
|
|
2519
|
+
}),
|
|
2520
|
+
...responsiveRules("col-3", {
|
|
2521
|
+
gridColumn: "span 3 / span 3"
|
|
2522
|
+
}),
|
|
2523
|
+
...responsiveRules("col-4", {
|
|
2524
|
+
gridColumn: "span 4 / span 4"
|
|
2525
|
+
}),
|
|
2526
|
+
...responsiveRules("col-5", {
|
|
2527
|
+
gridColumn: "span 5 / span 5"
|
|
2528
|
+
}),
|
|
2529
|
+
...responsiveRules("col-6", {
|
|
2530
|
+
gridColumn: "span 6 / span 6"
|
|
2531
|
+
}),
|
|
2532
|
+
...responsiveRules("col-7", {
|
|
2533
|
+
gridColumn: "span 7 / span 7"
|
|
2534
|
+
}),
|
|
2535
|
+
...responsiveRules("col-8", {
|
|
2536
|
+
gridColumn: "span 8 / span 8"
|
|
2537
|
+
}),
|
|
2538
|
+
...responsiveRules("col-9", {
|
|
2539
|
+
gridColumn: "span 9 / span 9"
|
|
2540
|
+
}),
|
|
2541
|
+
...responsiveRules("col-10", {
|
|
2542
|
+
gridColumn: "span 10 / span 10"
|
|
2543
|
+
}),
|
|
2544
|
+
...responsiveRules("col-11", {
|
|
2545
|
+
gridColumn: "span 11 / span 11"
|
|
2546
|
+
}),
|
|
2547
|
+
...responsiveRules("col-12", {
|
|
2548
|
+
gridColumn: "span 12 / span 12"
|
|
2549
|
+
}),
|
|
2038
2550
|
// columnStart
|
|
2039
|
-
...responsiveRules("col-start-auto", {
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
...responsiveRules("col-start-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
...responsiveRules("col-start-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
...responsiveRules("col-start-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
...responsiveRules("col-start-
|
|
2551
|
+
...responsiveRules("col-start-auto", {
|
|
2552
|
+
gridColumnStart: "auto"
|
|
2553
|
+
}),
|
|
2554
|
+
...responsiveRules("col-start-1", {
|
|
2555
|
+
gridColumnStart: "1"
|
|
2556
|
+
}),
|
|
2557
|
+
...responsiveRules("col-start-2", {
|
|
2558
|
+
gridColumnStart: "2"
|
|
2559
|
+
}),
|
|
2560
|
+
...responsiveRules("col-start-3", {
|
|
2561
|
+
gridColumnStart: "3"
|
|
2562
|
+
}),
|
|
2563
|
+
...responsiveRules("col-start-4", {
|
|
2564
|
+
gridColumnStart: "4"
|
|
2565
|
+
}),
|
|
2566
|
+
...responsiveRules("col-start-5", {
|
|
2567
|
+
gridColumnStart: "5"
|
|
2568
|
+
}),
|
|
2569
|
+
...responsiveRules("col-start-6", {
|
|
2570
|
+
gridColumnStart: "6"
|
|
2571
|
+
}),
|
|
2572
|
+
...responsiveRules("col-start-7", {
|
|
2573
|
+
gridColumnStart: "7"
|
|
2574
|
+
}),
|
|
2575
|
+
...responsiveRules("col-start-8", {
|
|
2576
|
+
gridColumnStart: "8"
|
|
2577
|
+
}),
|
|
2578
|
+
...responsiveRules("col-start-9", {
|
|
2579
|
+
gridColumnStart: "9"
|
|
2580
|
+
}),
|
|
2581
|
+
...responsiveRules("col-start-10", {
|
|
2582
|
+
gridColumnStart: "10"
|
|
2583
|
+
}),
|
|
2584
|
+
...responsiveRules("col-start-11", {
|
|
2585
|
+
gridColumnStart: "11"
|
|
2586
|
+
}),
|
|
2587
|
+
...responsiveRules("col-start-12", {
|
|
2588
|
+
gridColumnStart: "12"
|
|
2589
|
+
}),
|
|
2052
2590
|
// columnEnd
|
|
2053
|
-
...responsiveRules("col-end-auto", {
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
...responsiveRules("col-end-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
...responsiveRules("col-end-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
...responsiveRules("col-end-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
...responsiveRules("col-end-
|
|
2591
|
+
...responsiveRules("col-end-auto", {
|
|
2592
|
+
gridColumnEnd: "auto"
|
|
2593
|
+
}),
|
|
2594
|
+
...responsiveRules("col-end-1", {
|
|
2595
|
+
gridColumnEnd: "1"
|
|
2596
|
+
}),
|
|
2597
|
+
...responsiveRules("col-end-2", {
|
|
2598
|
+
gridColumnEnd: "2"
|
|
2599
|
+
}),
|
|
2600
|
+
...responsiveRules("col-end-3", {
|
|
2601
|
+
gridColumnEnd: "3"
|
|
2602
|
+
}),
|
|
2603
|
+
...responsiveRules("col-end-4", {
|
|
2604
|
+
gridColumnEnd: "4"
|
|
2605
|
+
}),
|
|
2606
|
+
...responsiveRules("col-end-5", {
|
|
2607
|
+
gridColumnEnd: "5"
|
|
2608
|
+
}),
|
|
2609
|
+
...responsiveRules("col-end-6", {
|
|
2610
|
+
gridColumnEnd: "6"
|
|
2611
|
+
}),
|
|
2612
|
+
...responsiveRules("col-end-7", {
|
|
2613
|
+
gridColumnEnd: "7"
|
|
2614
|
+
}),
|
|
2615
|
+
...responsiveRules("col-end-8", {
|
|
2616
|
+
gridColumnEnd: "8"
|
|
2617
|
+
}),
|
|
2618
|
+
...responsiveRules("col-end-9", {
|
|
2619
|
+
gridColumnEnd: "9"
|
|
2620
|
+
}),
|
|
2621
|
+
...responsiveRules("col-end-10", {
|
|
2622
|
+
gridColumnEnd: "10"
|
|
2623
|
+
}),
|
|
2624
|
+
...responsiveRules("col-end-11", {
|
|
2625
|
+
gridColumnEnd: "11"
|
|
2626
|
+
}),
|
|
2627
|
+
...responsiveRules("col-end-12", {
|
|
2628
|
+
gridColumnEnd: "12"
|
|
2629
|
+
}),
|
|
2066
2630
|
// row
|
|
2067
|
-
...responsiveRules("row-auto", {
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
...responsiveRules("row-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
...responsiveRules("row-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
...responsiveRules("row-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
...responsiveRules("row-
|
|
2080
|
-
|
|
2631
|
+
...responsiveRules("row-auto", {
|
|
2632
|
+
gridRow: "span 1 / span 1"
|
|
2633
|
+
}),
|
|
2634
|
+
...responsiveRules("row-full", {
|
|
2635
|
+
gridRow: "1 / -1"
|
|
2636
|
+
}),
|
|
2637
|
+
...responsiveRules("row-1", {
|
|
2638
|
+
gridRow: "span 1 / span 1"
|
|
2639
|
+
}),
|
|
2640
|
+
...responsiveRules("row-2", {
|
|
2641
|
+
gridRow: "span 2 / span 2"
|
|
2642
|
+
}),
|
|
2643
|
+
...responsiveRules("row-3", {
|
|
2644
|
+
gridRow: "span 3 / span 3"
|
|
2645
|
+
}),
|
|
2646
|
+
...responsiveRules("row-4", {
|
|
2647
|
+
gridRow: "span 4 / span 4"
|
|
2648
|
+
}),
|
|
2649
|
+
...responsiveRules("row-5", {
|
|
2650
|
+
gridRow: "span 5 / span 5"
|
|
2651
|
+
}),
|
|
2652
|
+
...responsiveRules("row-6", {
|
|
2653
|
+
gridRow: "span 6 / span 6"
|
|
2654
|
+
}),
|
|
2655
|
+
...responsiveRules("row-7", {
|
|
2656
|
+
gridRow: "span 7 / span 7"
|
|
2657
|
+
}),
|
|
2658
|
+
...responsiveRules("row-8", {
|
|
2659
|
+
gridRow: "span 8 / span 8"
|
|
2660
|
+
}),
|
|
2661
|
+
...responsiveRules("row-9", {
|
|
2662
|
+
gridRow: "span 9 / span 9"
|
|
2663
|
+
}),
|
|
2664
|
+
...responsiveRules("row-10", {
|
|
2665
|
+
gridRow: "span 10 / span 10"
|
|
2666
|
+
}),
|
|
2667
|
+
...responsiveRules("row-11", {
|
|
2668
|
+
gridRow: "span 11 / span 11"
|
|
2669
|
+
}),
|
|
2670
|
+
...responsiveRules("row-12", {
|
|
2671
|
+
gridRow: "span 12 / span 12"
|
|
2672
|
+
}),
|
|
2081
2673
|
// rowStart
|
|
2082
|
-
...responsiveRules("row-start-auto", {
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
...responsiveRules("row-start-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
...responsiveRules("row-start-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
...responsiveRules("row-start-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
...responsiveRules("row-start-
|
|
2674
|
+
...responsiveRules("row-start-auto", {
|
|
2675
|
+
gridRowStart: "auto"
|
|
2676
|
+
}),
|
|
2677
|
+
...responsiveRules("row-start-1", {
|
|
2678
|
+
gridRowStart: "1"
|
|
2679
|
+
}),
|
|
2680
|
+
...responsiveRules("row-start-2", {
|
|
2681
|
+
gridRowStart: "2"
|
|
2682
|
+
}),
|
|
2683
|
+
...responsiveRules("row-start-3", {
|
|
2684
|
+
gridRowStart: "3"
|
|
2685
|
+
}),
|
|
2686
|
+
...responsiveRules("row-start-4", {
|
|
2687
|
+
gridRowStart: "4"
|
|
2688
|
+
}),
|
|
2689
|
+
...responsiveRules("row-start-5", {
|
|
2690
|
+
gridRowStart: "5"
|
|
2691
|
+
}),
|
|
2692
|
+
...responsiveRules("row-start-6", {
|
|
2693
|
+
gridRowStart: "6"
|
|
2694
|
+
}),
|
|
2695
|
+
...responsiveRules("row-start-7", {
|
|
2696
|
+
gridRowStart: "7"
|
|
2697
|
+
}),
|
|
2698
|
+
...responsiveRules("row-start-8", {
|
|
2699
|
+
gridRowStart: "8"
|
|
2700
|
+
}),
|
|
2701
|
+
...responsiveRules("row-start-9", {
|
|
2702
|
+
gridRowStart: "9"
|
|
2703
|
+
}),
|
|
2704
|
+
...responsiveRules("row-start-10", {
|
|
2705
|
+
gridRowStart: "10"
|
|
2706
|
+
}),
|
|
2707
|
+
...responsiveRules("row-start-11", {
|
|
2708
|
+
gridRowStart: "11"
|
|
2709
|
+
}),
|
|
2710
|
+
...responsiveRules("row-start-12", {
|
|
2711
|
+
gridRowStart: "12"
|
|
2712
|
+
}),
|
|
2095
2713
|
// rowEnd
|
|
2096
|
-
...responsiveRules("row-end-auto", {
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
...responsiveRules("row-end-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
...responsiveRules("row-end-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
...responsiveRules("row-end-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
...responsiveRules("row-end-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
...responsiveRules("
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
...responsiveRules(
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
...responsiveRules(
|
|
2118
|
-
|
|
2119
|
-
|
|
2714
|
+
...responsiveRules("row-end-auto", {
|
|
2715
|
+
gridRowEnd: "auto"
|
|
2716
|
+
}),
|
|
2717
|
+
...responsiveRules("row-end-1", {
|
|
2718
|
+
gridRowEnd: "1"
|
|
2719
|
+
}),
|
|
2720
|
+
...responsiveRules("row-end-2", {
|
|
2721
|
+
gridRowEnd: "2"
|
|
2722
|
+
}),
|
|
2723
|
+
...responsiveRules("row-end-3", {
|
|
2724
|
+
gridRowEnd: "3"
|
|
2725
|
+
}),
|
|
2726
|
+
...responsiveRules("row-end-4", {
|
|
2727
|
+
gridRowEnd: "4"
|
|
2728
|
+
}),
|
|
2729
|
+
...responsiveRules("row-end-5", {
|
|
2730
|
+
gridRowEnd: "5"
|
|
2731
|
+
}),
|
|
2732
|
+
...responsiveRules("row-end-6", {
|
|
2733
|
+
gridRowEnd: "6"
|
|
2734
|
+
}),
|
|
2735
|
+
...responsiveRules("row-end-7", {
|
|
2736
|
+
gridRowEnd: "7"
|
|
2737
|
+
}),
|
|
2738
|
+
...responsiveRules("row-end-8", {
|
|
2739
|
+
gridRowEnd: "8"
|
|
2740
|
+
}),
|
|
2741
|
+
...responsiveRules("row-end-9", {
|
|
2742
|
+
gridRowEnd: "9"
|
|
2743
|
+
}),
|
|
2744
|
+
...responsiveRules("row-end-10", {
|
|
2745
|
+
gridRowEnd: "10"
|
|
2746
|
+
}),
|
|
2747
|
+
...responsiveRules("row-end-11", {
|
|
2748
|
+
gridRowEnd: "11"
|
|
2749
|
+
}),
|
|
2750
|
+
...responsiveRules("row-end-12", {
|
|
2751
|
+
gridRowEnd: "12"
|
|
2120
2752
|
})
|
|
2121
|
-
}
|
|
2122
|
-
...
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2753
|
+
}, heightRules = {
|
|
2754
|
+
...responsiveRules("h-fill", {
|
|
2755
|
+
height: "100%"
|
|
2756
|
+
}),
|
|
2757
|
+
...responsiveRules("h-stretch", {
|
|
2758
|
+
height: "stretch"
|
|
2126
2759
|
})
|
|
2127
|
-
}
|
|
2128
|
-
|
|
2129
|
-
...
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
})
|
|
2134
|
-
|
|
2135
|
-
...
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2760
|
+
}, marginRules = {
|
|
2761
|
+
// NOTE: order matters
|
|
2762
|
+
...theme.SPACE.reduce((acc, space) => ({
|
|
2763
|
+
...acc,
|
|
2764
|
+
...responsiveRules(`m-${space}`.replace(".", "_"), {
|
|
2765
|
+
margin: vars.space[space]
|
|
2766
|
+
})
|
|
2767
|
+
}), {}),
|
|
2768
|
+
...theme.SPACE.reduce((acc, space) => ({
|
|
2769
|
+
...acc,
|
|
2770
|
+
...responsiveRules(`mx-${space}`.replace(".", "_"), {
|
|
2771
|
+
marginLeft: vars.space[space],
|
|
2772
|
+
marginRight: vars.space[space]
|
|
2773
|
+
})
|
|
2774
|
+
}), {}),
|
|
2775
|
+
...theme.SPACE.reduce((acc, space) => ({
|
|
2776
|
+
...acc,
|
|
2777
|
+
...responsiveRules(`my-${space}`.replace(".", "_"), {
|
|
2778
|
+
marginTop: vars.space[space],
|
|
2779
|
+
marginBottom: vars.space[space]
|
|
2780
|
+
})
|
|
2781
|
+
}), {}),
|
|
2782
|
+
...theme.SPACE.reduce((acc, space) => ({
|
|
2783
|
+
...acc,
|
|
2784
|
+
...responsiveRules(`mt-${space}`.replace(".", "_"), {
|
|
2785
|
+
marginTop: vars.space[space]
|
|
2786
|
+
})
|
|
2787
|
+
}), {}),
|
|
2788
|
+
...theme.SPACE.reduce((acc, space) => ({
|
|
2789
|
+
...acc,
|
|
2790
|
+
...responsiveRules(`mr-${space}`.replace(".", "_"), {
|
|
2791
|
+
marginRight: vars.space[space]
|
|
2792
|
+
})
|
|
2793
|
+
}), {}),
|
|
2794
|
+
...theme.SPACE.reduce((acc, space) => ({
|
|
2795
|
+
...acc,
|
|
2796
|
+
...responsiveRules(`mb-${space}`.replace(".", "_"), {
|
|
2797
|
+
marginBottom: vars.space[space]
|
|
2798
|
+
})
|
|
2799
|
+
}), {}),
|
|
2800
|
+
...theme.SPACE.reduce((acc, space) => ({
|
|
2801
|
+
...acc,
|
|
2802
|
+
...responsiveRules(`ml-${space}`.replace(".", "_"), {
|
|
2803
|
+
marginLeft: vars.space[space]
|
|
2804
|
+
})
|
|
2805
|
+
}), {})
|
|
2806
|
+
}, maxWidthRules = {
|
|
2140
2807
|
...responsiveRules("max-w-0", {
|
|
2141
2808
|
maxWidth: "var(--container-0)"
|
|
2142
2809
|
}),
|
|
@@ -2161,39 +2828,69 @@ const badgeRules = {
|
|
|
2161
2828
|
...responsiveRules("max-w-fill", {
|
|
2162
2829
|
maxWidth: "100%"
|
|
2163
2830
|
})
|
|
2831
|
+
}, outlineRules = {
|
|
2832
|
+
"outline-none": {
|
|
2833
|
+
outline: "none"
|
|
2834
|
+
}
|
|
2164
2835
|
}, overflowRules = {
|
|
2165
|
-
...responsiveRules("overflow-visible", {
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
...responsiveRules("overflow-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
...responsiveRules(
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
...responsiveRules(
|
|
2175
|
-
|
|
2176
|
-
paddingRight: vars.space[space]
|
|
2177
|
-
})
|
|
2178
|
-
}), {}), paddingYRules = theme.SPACE.reduce((acc, space) => ({
|
|
2179
|
-
...acc,
|
|
2180
|
-
...responsiveRules(`py-${space}`, {
|
|
2181
|
-
paddingTop: vars.space[space],
|
|
2182
|
-
paddingBottom: vars.space[space]
|
|
2836
|
+
...responsiveRules("overflow-visible", {
|
|
2837
|
+
overflow: "visible"
|
|
2838
|
+
}),
|
|
2839
|
+
...responsiveRules("overflow-hidden", {
|
|
2840
|
+
overflow: "hidden"
|
|
2841
|
+
}),
|
|
2842
|
+
...responsiveRules("overflow-scroll", {
|
|
2843
|
+
overflow: "scroll"
|
|
2844
|
+
}),
|
|
2845
|
+
...responsiveRules("overflow-auto", {
|
|
2846
|
+
overflow: "auto"
|
|
2183
2847
|
})
|
|
2184
|
-
}
|
|
2185
|
-
...acc,
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
}), {}),
|
|
2191
|
-
...acc,
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
})
|
|
2848
|
+
}, paddingRules = {
|
|
2849
|
+
...theme.SPACE.reduce((acc, space) => ({
|
|
2850
|
+
...acc,
|
|
2851
|
+
...responsiveRules(`p-${space}`.replace(".", "_"), {
|
|
2852
|
+
padding: vars.space[space]
|
|
2853
|
+
})
|
|
2854
|
+
}), {}),
|
|
2855
|
+
...theme.SPACE.reduce((acc, space) => ({
|
|
2856
|
+
...acc,
|
|
2857
|
+
...responsiveRules(`px-${space}`.replace(".", "_"), {
|
|
2858
|
+
paddingLeft: vars.space[space],
|
|
2859
|
+
paddingRight: vars.space[space]
|
|
2860
|
+
})
|
|
2861
|
+
}), {}),
|
|
2862
|
+
...theme.SPACE.reduce((acc, space) => ({
|
|
2863
|
+
...acc,
|
|
2864
|
+
...responsiveRules(`py-${space}`.replace(".", "_"), {
|
|
2865
|
+
paddingTop: vars.space[space],
|
|
2866
|
+
paddingBottom: vars.space[space]
|
|
2867
|
+
})
|
|
2868
|
+
}), {}),
|
|
2869
|
+
...theme.SPACE.reduce((acc, space) => ({
|
|
2870
|
+
...acc,
|
|
2871
|
+
...responsiveRules(`pt-${space}`.replace(".", "_"), {
|
|
2872
|
+
paddingTop: vars.space[space]
|
|
2873
|
+
})
|
|
2874
|
+
}), {}),
|
|
2875
|
+
...theme.SPACE.reduce((acc, space) => ({
|
|
2876
|
+
...acc,
|
|
2877
|
+
...responsiveRules(`pr-${space}`.replace(".", "_"), {
|
|
2878
|
+
paddingRight: vars.space[space]
|
|
2879
|
+
})
|
|
2880
|
+
}), {}),
|
|
2881
|
+
...theme.SPACE.reduce((acc, space) => ({
|
|
2882
|
+
...acc,
|
|
2883
|
+
...responsiveRules(`pb-${space}`.replace(".", "_"), {
|
|
2884
|
+
paddingBottom: vars.space[space]
|
|
2885
|
+
})
|
|
2886
|
+
}), {}),
|
|
2887
|
+
...theme.SPACE.reduce((acc, space) => ({
|
|
2888
|
+
...acc,
|
|
2889
|
+
...responsiveRules(`pl-${space}`.replace(".", "_"), {
|
|
2890
|
+
paddingLeft: vars.space[space]
|
|
2891
|
+
})
|
|
2892
|
+
}), {})
|
|
2893
|
+
}, pointerEventsRules = {
|
|
2197
2894
|
"pointer-events-none": {
|
|
2198
2895
|
pointerEvents: "none"
|
|
2199
2896
|
},
|
|
@@ -2223,89 +2920,69 @@ const badgeRules = {
|
|
|
2223
2920
|
bottom: 0
|
|
2224
2921
|
})
|
|
2225
2922
|
}, radiusRules = {
|
|
2226
|
-
...responsiveRules("r-0", {
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
...responsiveRules("r-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
...responsiveRules("r-
|
|
2233
|
-
|
|
2923
|
+
...responsiveRules("r-0", {
|
|
2924
|
+
borderRadius: "var(--radius-0)"
|
|
2925
|
+
}),
|
|
2926
|
+
...responsiveRules("r-1", {
|
|
2927
|
+
borderRadius: "var(--radius-1)"
|
|
2928
|
+
}),
|
|
2929
|
+
...responsiveRules("r-2", {
|
|
2930
|
+
borderRadius: "var(--radius-2)"
|
|
2931
|
+
}),
|
|
2932
|
+
...responsiveRules("r-3", {
|
|
2933
|
+
borderRadius: "var(--radius-3)"
|
|
2934
|
+
}),
|
|
2935
|
+
...responsiveRules("r-4", {
|
|
2936
|
+
borderRadius: "var(--radius-4)"
|
|
2937
|
+
}),
|
|
2938
|
+
...responsiveRules("r-5", {
|
|
2939
|
+
borderRadius: "var(--radius-5)"
|
|
2940
|
+
}),
|
|
2941
|
+
...responsiveRules("r-6", {
|
|
2942
|
+
borderRadius: "var(--radius-6)"
|
|
2943
|
+
}),
|
|
2944
|
+
...responsiveRules("r-round", {
|
|
2945
|
+
borderRadius: "9999px"
|
|
2946
|
+
})
|
|
2234
2947
|
}, shadowRules = {
|
|
2235
2948
|
...responsiveRules("shadow-0", {
|
|
2236
2949
|
boxShadow: "none"
|
|
2237
2950
|
}),
|
|
2238
2951
|
...responsiveRules("shadow-1", {
|
|
2239
|
-
boxShadow: [
|
|
2240
|
-
"var(--card-shadow-outline) var(--color-shadow-outline)",
|
|
2241
|
-
"var(--shadow-1-umbra) var(--color-shadow-umbra)",
|
|
2242
|
-
"var(--shadow-1-penumbra) var(--color-shadow-penumbra)",
|
|
2243
|
-
"var(--shadow-1-ambient) var(--color-shadow-ambient)"
|
|
2244
|
-
].join(", ")
|
|
2952
|
+
boxShadow: ["var(--card-shadow-outline) var(--color-shadow-outline)", "var(--shadow-1-umbra) var(--color-shadow-umbra)", "var(--shadow-1-penumbra) var(--color-shadow-penumbra)", "var(--shadow-1-ambient) var(--color-shadow-ambient)"].join(", ")
|
|
2245
2953
|
}),
|
|
2246
2954
|
...responsiveRules("shadow-2", {
|
|
2247
|
-
boxShadow: [
|
|
2248
|
-
"var(--card-shadow-outline) var(--color-shadow-outline)",
|
|
2249
|
-
"var(--shadow-2-umbra) var(--color-shadow-umbra)",
|
|
2250
|
-
"var(--shadow-2-penumbra) var(--color-shadow-penumbra)",
|
|
2251
|
-
"var(--shadow-2-ambient) var(--color-shadow-ambient)"
|
|
2252
|
-
].join(", ")
|
|
2955
|
+
boxShadow: ["var(--card-shadow-outline) var(--color-shadow-outline)", "var(--shadow-2-umbra) var(--color-shadow-umbra)", "var(--shadow-2-penumbra) var(--color-shadow-penumbra)", "var(--shadow-2-ambient) var(--color-shadow-ambient)"].join(", ")
|
|
2253
2956
|
}),
|
|
2254
2957
|
...responsiveRules("shadow-3", {
|
|
2255
|
-
boxShadow: [
|
|
2256
|
-
"var(--card-shadow-outline) var(--color-shadow-outline)",
|
|
2257
|
-
"var(--shadow-3-umbra) var(--color-shadow-umbra)",
|
|
2258
|
-
"var(--shadow-3-penumbra) var(--color-shadow-penumbra)",
|
|
2259
|
-
"var(--shadow-3-ambient) var(--color-shadow-ambient)"
|
|
2260
|
-
].join(", ")
|
|
2958
|
+
boxShadow: ["var(--card-shadow-outline) var(--color-shadow-outline)", "var(--shadow-3-umbra) var(--color-shadow-umbra)", "var(--shadow-3-penumbra) var(--color-shadow-penumbra)", "var(--shadow-3-ambient) var(--color-shadow-ambient)"].join(", ")
|
|
2261
2959
|
}),
|
|
2262
2960
|
...responsiveRules("shadow-4", {
|
|
2263
|
-
boxShadow: [
|
|
2264
|
-
"var(--card-shadow-outline) var(--color-shadow-outline)",
|
|
2265
|
-
"var(--shadow-4-umbra) var(--color-shadow-umbra)",
|
|
2266
|
-
"var(--shadow-4-penumbra) var(--color-shadow-penumbra)",
|
|
2267
|
-
"var(--shadow-4-ambient) var(--color-shadow-ambient)"
|
|
2268
|
-
].join(", ")
|
|
2961
|
+
boxShadow: ["var(--card-shadow-outline) var(--color-shadow-outline)", "var(--shadow-4-umbra) var(--color-shadow-umbra)", "var(--shadow-4-penumbra) var(--color-shadow-penumbra)", "var(--shadow-4-ambient) var(--color-shadow-ambient)"].join(", ")
|
|
2269
2962
|
}),
|
|
2270
2963
|
...responsiveRules("shadow-5", {
|
|
2271
|
-
boxShadow: [
|
|
2272
|
-
"var(--card-shadow-outline) var(--color-shadow-outline)",
|
|
2273
|
-
"var(--shadow-5-umbra) var(--color-shadow-umbra)",
|
|
2274
|
-
"var(--shadow-5-penumbra) var(--color-shadow-penumbra)",
|
|
2275
|
-
"var(--shadow-5-ambient) var(--color-shadow-ambient)"
|
|
2276
|
-
].join(", ")
|
|
2964
|
+
boxShadow: ["var(--card-shadow-outline) var(--color-shadow-outline)", "var(--shadow-5-umbra) var(--color-shadow-umbra)", "var(--shadow-5-penumbra) var(--color-shadow-penumbra)", "var(--shadow-5-ambient) var(--color-shadow-ambient)"].join(", ")
|
|
2277
2965
|
})
|
|
2278
2966
|
}, widthRules = {
|
|
2279
2967
|
"w-fill": {
|
|
2280
2968
|
width: ["-moz-available", "-webkit-fill-available", "stretch"]
|
|
2281
2969
|
}
|
|
2282
2970
|
}, rules = {
|
|
2283
|
-
//
|
|
2971
|
+
// styles
|
|
2972
|
+
...borderRules,
|
|
2284
2973
|
...displayRules,
|
|
2285
|
-
...flexRules,
|
|
2286
2974
|
...flexItemRules,
|
|
2287
|
-
...
|
|
2288
|
-
...borderRules,
|
|
2289
|
-
...paddingRules,
|
|
2290
|
-
...paddingXRules,
|
|
2291
|
-
...paddingYRules,
|
|
2292
|
-
...paddingTopRules,
|
|
2293
|
-
...paddingRightRules,
|
|
2294
|
-
...paddingBottomRules,
|
|
2295
|
-
...paddingLeftRules,
|
|
2296
|
-
...pointerEventsRules,
|
|
2297
|
-
...marginRules,
|
|
2298
|
-
...marginXRules,
|
|
2299
|
-
...marginYRules,
|
|
2300
|
-
...marginTopRules,
|
|
2301
|
-
...marginRightRules,
|
|
2302
|
-
...marginBottomRules,
|
|
2303
|
-
...marginLeftRules,
|
|
2975
|
+
...flexRules,
|
|
2304
2976
|
...fontRules,
|
|
2305
2977
|
...gapRules,
|
|
2978
|
+
...gridItemRules,
|
|
2306
2979
|
...gridRules,
|
|
2307
2980
|
...heightRules,
|
|
2981
|
+
...marginRules,
|
|
2982
|
+
...outlineRules,
|
|
2308
2983
|
...overflowRules,
|
|
2984
|
+
...paddingRules,
|
|
2985
|
+
...pointerEventsRules,
|
|
2309
2986
|
...positionRules,
|
|
2310
2987
|
...radiusRules,
|
|
2311
2988
|
...shadowRules,
|
|
@@ -2329,14 +3006,16 @@ const badgeRules = {
|
|
|
2329
3006
|
...selectableRules,
|
|
2330
3007
|
...spinnerRules,
|
|
2331
3008
|
...switchRules,
|
|
2332
|
-
...textRules,
|
|
2333
3009
|
...textAreaRules,
|
|
2334
3010
|
...textInputRules,
|
|
3011
|
+
...textRules,
|
|
2335
3012
|
...tokenRules,
|
|
2336
3013
|
...tooltipRules,
|
|
2337
3014
|
// components
|
|
2338
3015
|
...breadcrumbsRules,
|
|
2339
|
-
...dialogRules
|
|
3016
|
+
...dialogRules,
|
|
3017
|
+
...menuRules,
|
|
3018
|
+
...skeletonRules
|
|
2340
3019
|
};
|
|
2341
3020
|
function compileRule(selector, props) {
|
|
2342
3021
|
return compileProperties(selector, props) + compileNestedRules(selector, props["@nest"]);
|
|
@@ -2389,12 +3068,11 @@ function compileRules(rules2) {
|
|
|
2389
3068
|
let keyframesCss = `@keyframes ${name} {
|
|
2390
3069
|
`;
|
|
2391
3070
|
for (const [key, props] of Object.entries(value))
|
|
2392
|
-
keyframesCss += ` ${key}
|
|
2393
|
-
`, keyframesCss += compileRule("", props).replace(/\n/g, `
|
|
3071
|
+
keyframesCss += ` ${key}`, keyframesCss += compileRule("", props).replace(/\n/g, `
|
|
2394
3072
|
`) + `
|
|
2395
|
-
`, keyframesCss += ` }
|
|
2396
3073
|
`;
|
|
2397
|
-
keyframesCss += `
|
|
3074
|
+
keyframesCss += `
|
|
3075
|
+
}
|
|
2398
3076
|
`, css += keyframesCss;
|
|
2399
3077
|
}
|
|
2400
3078
|
for (const [query, queryRules] of Object.entries(mediaQueries))
|
|
@@ -2430,263 +3108,287 @@ function countThemeEntries(obj) {
|
|
|
2430
3108
|
function compileTheme(theme2) {
|
|
2431
3109
|
for (const [key, val] of Object.entries(theme2.color.light.default))
|
|
2432
3110
|
(isRecord(val) || isArray(val)) && console.log(key, countThemeEntries(val));
|
|
2433
|
-
return [
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
|
|
3111
|
+
return [compileRule(":root", {
|
|
3112
|
+
[varNames.avatar.focusRing.offset]: px(theme2.avatar.focusRing.offset),
|
|
3113
|
+
[varNames.avatar.focusRing.width]: px(theme2.avatar.focusRing.width),
|
|
3114
|
+
// [varNames.avatar.size[0].distance]: px(theme.avatar.size[0].distance),
|
|
3115
|
+
// [varNames.avatar.size[0].size]: px(theme.avatar.size[0].size),
|
|
3116
|
+
"--avatar-0-distance": px(theme2.avatar.sizes[0].distance),
|
|
3117
|
+
"--avatar-0-size": px(theme2.avatar.sizes[0].size),
|
|
3118
|
+
"--avatar-1-distance": px(theme2.avatar.sizes[1].distance),
|
|
3119
|
+
"--avatar-1-size": px(theme2.avatar.sizes[1].size),
|
|
3120
|
+
"--avatar-2-distance": px(theme2.avatar.sizes[2].distance),
|
|
3121
|
+
"--avatar-2-size": px(theme2.avatar.sizes[2].size),
|
|
3122
|
+
"--avatar-3-distance": px(theme2.avatar.sizes[3].distance),
|
|
3123
|
+
"--avatar-3-size": px(theme2.avatar.sizes[3].size),
|
|
3124
|
+
"--button-border-width": px(theme2.button.border.width),
|
|
3125
|
+
"--button-focus-ring-offset": px(theme2.button.focusRing.offset),
|
|
3126
|
+
"--button-focus-ring-width": px(theme2.button.focusRing.width),
|
|
3127
|
+
"--button-text-weight": `${theme2.button.textWeight}`,
|
|
3128
|
+
"--card-border-width": px(theme2.card.border.width),
|
|
3129
|
+
"--card-focus-ring-offset": px(theme2.card.focusRing.offset),
|
|
3130
|
+
"--card-focus-ring-width": px(theme2.card.focusRing.width),
|
|
3131
|
+
"--card-shadow-outline": `0 0 0 ${px(theme2.card.shadow.outline)}`,
|
|
3132
|
+
"--font-code-family": theme2.font.code.family,
|
|
3133
|
+
"--font-code-weight-regular": `${theme2.font.code.weights.regular}`,
|
|
3134
|
+
"--font-code-weight-medium": `${theme2.font.code.weights.medium}`,
|
|
3135
|
+
"--font-code-weight-semibold": `${theme2.font.code.weights.semibold}`,
|
|
3136
|
+
"--font-code-weight-bold": `${theme2.font.code.weights.bold}`,
|
|
3137
|
+
"--font-code-0-size": rem(theme2.font.code.sizes[0].fontSize),
|
|
3138
|
+
"--font-code-0-line-height": rem(theme2.font.code.sizes[0].lineHeight),
|
|
3139
|
+
"--font-code-0-ascender-height": px(theme2.font.code.sizes[0].ascenderHeight),
|
|
3140
|
+
"--font-code-0-descender-height": px(theme2.font.code.sizes[0].descenderHeight),
|
|
3141
|
+
"--font-code-0-letter-spacing": px(theme2.font.code.sizes[0].letterSpacing),
|
|
3142
|
+
"--font-code-0-icon-size": px(theme2.font.code.sizes[0].iconSize),
|
|
3143
|
+
"--font-code-1-size": rem(theme2.font.code.sizes[1].fontSize),
|
|
3144
|
+
"--font-code-1-line-height": px(theme2.font.code.sizes[1].lineHeight),
|
|
3145
|
+
"--font-code-1-ascender-height": px(theme2.font.code.sizes[1].ascenderHeight),
|
|
3146
|
+
"--font-code-1-descender-height": px(theme2.font.code.sizes[1].descenderHeight),
|
|
3147
|
+
"--font-code-1-letter-spacing": px(theme2.font.code.sizes[1].letterSpacing),
|
|
3148
|
+
"--font-code-1-icon-size": px(theme2.font.code.sizes[1].iconSize),
|
|
3149
|
+
"--font-code-2-size": rem(theme2.font.code.sizes[2].fontSize),
|
|
3150
|
+
"--font-code-2-line-height": rem(theme2.font.code.sizes[2].lineHeight),
|
|
3151
|
+
"--font-code-2-ascender-height": px(theme2.font.code.sizes[2].ascenderHeight),
|
|
3152
|
+
"--font-code-2-descender-height": px(theme2.font.code.sizes[2].descenderHeight),
|
|
3153
|
+
"--font-code-2-letter-spacing": px(theme2.font.code.sizes[2].letterSpacing),
|
|
3154
|
+
"--font-code-2-icon-size": px(theme2.font.code.sizes[2].iconSize),
|
|
3155
|
+
"--font-code-3-size": rem(theme2.font.code.sizes[3].fontSize),
|
|
3156
|
+
"--font-code-3-line-height": rem(theme2.font.code.sizes[3].lineHeight),
|
|
3157
|
+
"--font-code-3-ascender-height": px(theme2.font.code.sizes[3].ascenderHeight),
|
|
3158
|
+
"--font-code-3-descender-height": px(theme2.font.code.sizes[3].descenderHeight),
|
|
3159
|
+
"--font-code-3-letter-spacing": px(theme2.font.code.sizes[3].letterSpacing),
|
|
3160
|
+
"--font-code-3-icon-size": px(theme2.font.code.sizes[3].iconSize),
|
|
3161
|
+
"--font-code-4-size": rem(theme2.font.code.sizes[4].fontSize),
|
|
3162
|
+
"--font-code-4-line-height": rem(theme2.font.code.sizes[4].lineHeight),
|
|
3163
|
+
"--font-code-4-ascender-height": px(theme2.font.code.sizes[4].ascenderHeight),
|
|
3164
|
+
"--font-code-4-descender-height": px(theme2.font.code.sizes[4].descenderHeight),
|
|
3165
|
+
"--font-code-4-letter-spacing": px(theme2.font.code.sizes[4].letterSpacing),
|
|
3166
|
+
"--font-code-4-icon-size": px(theme2.font.code.sizes[4].iconSize),
|
|
3167
|
+
"--font-heading-family": theme2.font.heading.family,
|
|
3168
|
+
"--font-heading-weight-regular": `${theme2.font.heading.weights.regular}`,
|
|
3169
|
+
"--font-heading-weight-medium": `${theme2.font.heading.weights.medium}`,
|
|
3170
|
+
"--font-heading-weight-semibold": `${theme2.font.heading.weights.semibold}`,
|
|
3171
|
+
"--font-heading-weight-bold": `${theme2.font.heading.weights.bold}`,
|
|
3172
|
+
"--font-heading-0-size": rem(theme2.font.heading.sizes[0].fontSize),
|
|
3173
|
+
"--font-heading-0-line-height": rem(theme2.font.heading.sizes[0].lineHeight),
|
|
3174
|
+
"--font-heading-0-ascender-height": px(theme2.font.heading.sizes[0].ascenderHeight),
|
|
3175
|
+
"--font-heading-0-descender-height": px(theme2.font.heading.sizes[0].descenderHeight),
|
|
3176
|
+
"--font-heading-0-letter-spacing": px(theme2.font.heading.sizes[0].letterSpacing),
|
|
3177
|
+
"--font-heading-0-icon-size": px(theme2.font.heading.sizes[0].iconSize),
|
|
3178
|
+
"--font-heading-1-size": rem(theme2.font.heading.sizes[1].fontSize),
|
|
3179
|
+
"--font-heading-1-line-height": rem(theme2.font.heading.sizes[1].lineHeight),
|
|
3180
|
+
"--font-heading-1-ascender-height": px(theme2.font.heading.sizes[1].ascenderHeight),
|
|
3181
|
+
"--font-heading-1-descender-height": px(theme2.font.heading.sizes[1].descenderHeight),
|
|
3182
|
+
"--font-heading-1-letter-spacing": px(theme2.font.heading.sizes[1].letterSpacing),
|
|
3183
|
+
"--font-heading-1-icon-size": px(theme2.font.heading.sizes[1].iconSize),
|
|
3184
|
+
"--font-heading-2-size": rem(theme2.font.heading.sizes[2].fontSize),
|
|
3185
|
+
"--font-heading-2-line-height": rem(theme2.font.heading.sizes[2].lineHeight),
|
|
3186
|
+
"--font-heading-2-ascender-height": px(theme2.font.heading.sizes[2].ascenderHeight),
|
|
3187
|
+
"--font-heading-2-descender-height": px(theme2.font.heading.sizes[2].descenderHeight),
|
|
3188
|
+
"--font-heading-2-letter-spacing": px(theme2.font.heading.sizes[2].letterSpacing),
|
|
3189
|
+
"--font-heading-2-icon-size": px(theme2.font.heading.sizes[2].iconSize),
|
|
3190
|
+
"--font-heading-3-size": rem(theme2.font.heading.sizes[3].fontSize),
|
|
3191
|
+
"--font-heading-3-line-height": rem(theme2.font.heading.sizes[3].lineHeight),
|
|
3192
|
+
"--font-heading-3-ascender-height": px(theme2.font.heading.sizes[3].ascenderHeight),
|
|
3193
|
+
"--font-heading-3-descender-height": px(theme2.font.heading.sizes[3].descenderHeight),
|
|
3194
|
+
"--font-heading-3-letter-spacing": px(theme2.font.heading.sizes[3].letterSpacing),
|
|
3195
|
+
"--font-heading-3-icon-size": px(theme2.font.heading.sizes[3].iconSize),
|
|
3196
|
+
"--font-heading-4-size": rem(theme2.font.heading.sizes[4].fontSize),
|
|
3197
|
+
"--font-heading-4-line-height": rem(theme2.font.heading.sizes[4].lineHeight),
|
|
3198
|
+
"--font-heading-4-ascender-height": px(theme2.font.heading.sizes[4].ascenderHeight),
|
|
3199
|
+
"--font-heading-4-descender-height": px(theme2.font.heading.sizes[4].descenderHeight),
|
|
3200
|
+
"--font-heading-4-letter-spacing": px(theme2.font.heading.sizes[4].letterSpacing),
|
|
3201
|
+
"--font-heading-4-icon-size": px(theme2.font.heading.sizes[4].iconSize),
|
|
3202
|
+
"--font-heading-5-size": rem(theme2.font.heading.sizes[5].fontSize),
|
|
3203
|
+
"--font-heading-5-line-height": rem(theme2.font.heading.sizes[5].lineHeight),
|
|
3204
|
+
"--font-heading-5-ascender-height": px(theme2.font.heading.sizes[5].ascenderHeight),
|
|
3205
|
+
"--font-heading-5-descender-height": px(theme2.font.heading.sizes[5].descenderHeight),
|
|
3206
|
+
"--font-heading-5-letter-spacing": px(theme2.font.heading.sizes[5].letterSpacing),
|
|
3207
|
+
"--font-heading-5-icon-size": px(theme2.font.heading.sizes[5].iconSize),
|
|
3208
|
+
"--font-label-family": theme2.font.label.family,
|
|
3209
|
+
"--font-label-weight-regular": `${theme2.font.label.weights.regular}`,
|
|
3210
|
+
"--font-label-weight-medium": `${theme2.font.label.weights.medium}`,
|
|
3211
|
+
"--font-label-weight-semibold": `${theme2.font.label.weights.semibold}`,
|
|
3212
|
+
"--font-label-weight-bold": `${theme2.font.label.weights.bold}`,
|
|
3213
|
+
"--font-label-0-size": rem(theme2.font.label.sizes[0].fontSize),
|
|
3214
|
+
"--font-label-0-line-height": rem(theme2.font.label.sizes[0].lineHeight),
|
|
3215
|
+
"--font-label-0-ascender-height": px(theme2.font.label.sizes[0].ascenderHeight),
|
|
3216
|
+
"--font-label-0-descender-height": px(theme2.font.label.sizes[0].descenderHeight),
|
|
3217
|
+
"--font-label-0-letter-spacing": px(theme2.font.label.sizes[0].letterSpacing),
|
|
3218
|
+
"--font-label-0-icon-size": px(theme2.font.label.sizes[0].iconSize),
|
|
3219
|
+
"--font-label-1-size": rem(theme2.font.label.sizes[1].fontSize),
|
|
3220
|
+
"--font-label-1-line-height": rem(theme2.font.label.sizes[1].lineHeight),
|
|
3221
|
+
"--font-label-1-ascender-height": px(theme2.font.label.sizes[1].ascenderHeight),
|
|
3222
|
+
"--font-label-1-descender-height": px(theme2.font.label.sizes[1].descenderHeight),
|
|
3223
|
+
"--font-label-1-letter-spacing": px(theme2.font.label.sizes[1].letterSpacing),
|
|
3224
|
+
"--font-label-1-icon-size": px(theme2.font.label.sizes[1].iconSize),
|
|
3225
|
+
"--font-label-2-size": rem(theme2.font.label.sizes[2].fontSize),
|
|
3226
|
+
"--font-label-2-line-height": rem(theme2.font.label.sizes[2].lineHeight),
|
|
3227
|
+
"--font-label-2-ascender-height": px(theme2.font.label.sizes[2].ascenderHeight),
|
|
3228
|
+
"--font-label-2-descender-height": px(theme2.font.label.sizes[2].descenderHeight),
|
|
3229
|
+
"--font-label-2-letter-spacing": px(theme2.font.label.sizes[2].letterSpacing),
|
|
3230
|
+
"--font-label-2-icon-size": px(theme2.font.label.sizes[2].iconSize),
|
|
3231
|
+
"--font-label-3-size": rem(theme2.font.label.sizes[3].fontSize),
|
|
3232
|
+
"--font-label-3-line-height": rem(theme2.font.label.sizes[3].lineHeight),
|
|
3233
|
+
"--font-label-3-ascender-height": px(theme2.font.label.sizes[3].ascenderHeight),
|
|
3234
|
+
"--font-label-3-descender-height": px(theme2.font.label.sizes[3].descenderHeight),
|
|
3235
|
+
"--font-label-3-letter-spacing": px(theme2.font.label.sizes[3].letterSpacing),
|
|
3236
|
+
"--font-label-3-icon-size": px(theme2.font.label.sizes[3].iconSize),
|
|
3237
|
+
"--font-label-4-size": rem(theme2.font.label.sizes[4].fontSize),
|
|
3238
|
+
"--font-label-4-line-height": rem(theme2.font.label.sizes[4].lineHeight),
|
|
3239
|
+
"--font-label-4-ascender-height": px(theme2.font.label.sizes[4].ascenderHeight),
|
|
3240
|
+
"--font-label-4-descender-height": px(theme2.font.label.sizes[4].descenderHeight),
|
|
3241
|
+
"--font-label-4-letter-spacing": px(theme2.font.label.sizes[4].letterSpacing),
|
|
3242
|
+
"--font-label-4-icon-size": px(theme2.font.label.sizes[4].iconSize),
|
|
3243
|
+
"--font-label-5-size": rem(theme2.font.label.sizes[5].fontSize),
|
|
3244
|
+
"--font-label-5-line-height": rem(theme2.font.label.sizes[5].lineHeight),
|
|
3245
|
+
"--font-label-5-ascender-height": px(theme2.font.label.sizes[5].ascenderHeight),
|
|
3246
|
+
"--font-label-5-descender-height": px(theme2.font.label.sizes[5].descenderHeight),
|
|
3247
|
+
"--font-label-5-letter-spacing": px(theme2.font.label.sizes[5].letterSpacing),
|
|
3248
|
+
"--font-label-5-icon-size": px(theme2.font.label.sizes[5].iconSize),
|
|
3249
|
+
"--font-text-family": theme2.font.text.family,
|
|
3250
|
+
"--font-text-weight-regular": `${theme2.font.text.weights.regular}`,
|
|
3251
|
+
"--font-text-weight-medium": `${theme2.font.text.weights.medium}`,
|
|
3252
|
+
"--font-text-weight-semibold": `${theme2.font.text.weights.semibold}`,
|
|
3253
|
+
"--font-text-weight-bold": `${theme2.font.text.weights.bold}`,
|
|
3254
|
+
"--font-text-0-size": rem(theme2.font.text.sizes[0].fontSize),
|
|
3255
|
+
"--font-text-0-line-height": rem(theme2.font.text.sizes[0].lineHeight),
|
|
3256
|
+
"--font-text-0-ascender-height": px(theme2.font.text.sizes[0].ascenderHeight),
|
|
3257
|
+
"--font-text-0-descender-height": px(theme2.font.text.sizes[0].descenderHeight),
|
|
3258
|
+
"--font-text-0-letter-spacing": px(theme2.font.text.sizes[0].letterSpacing),
|
|
3259
|
+
"--font-text-0-icon-size": px(theme2.font.text.sizes[0].iconSize),
|
|
3260
|
+
"--font-text-1-size": rem(theme2.font.text.sizes[1].fontSize),
|
|
3261
|
+
"--font-text-1-line-height": rem(theme2.font.text.sizes[1].lineHeight),
|
|
3262
|
+
"--font-text-1-ascender-height": px(theme2.font.text.sizes[1].ascenderHeight),
|
|
3263
|
+
"--font-text-1-descender-height": px(theme2.font.text.sizes[1].descenderHeight),
|
|
3264
|
+
"--font-text-1-letter-spacing": px(theme2.font.text.sizes[1].letterSpacing),
|
|
3265
|
+
"--font-text-1-icon-size": px(theme2.font.text.sizes[1].iconSize),
|
|
3266
|
+
"--font-text-2-size": rem(theme2.font.text.sizes[2].fontSize),
|
|
3267
|
+
"--font-text-2-line-height": rem(theme2.font.text.sizes[2].lineHeight),
|
|
3268
|
+
"--font-text-2-ascender-height": px(theme2.font.text.sizes[2].ascenderHeight),
|
|
3269
|
+
"--font-text-2-descender-height": px(theme2.font.text.sizes[2].descenderHeight),
|
|
3270
|
+
"--font-text-2-letter-spacing": px(theme2.font.text.sizes[2].letterSpacing),
|
|
3271
|
+
"--font-text-2-icon-size": px(theme2.font.text.sizes[2].iconSize),
|
|
3272
|
+
"--font-text-3-size": rem(theme2.font.text.sizes[3].fontSize),
|
|
3273
|
+
"--font-text-3-line-height": rem(theme2.font.text.sizes[3].lineHeight),
|
|
3274
|
+
"--font-text-3-ascender-height": px(theme2.font.text.sizes[3].ascenderHeight),
|
|
3275
|
+
"--font-text-3-descender-height": px(theme2.font.text.sizes[3].descenderHeight),
|
|
3276
|
+
"--font-text-3-letter-spacing": px(theme2.font.text.sizes[3].letterSpacing),
|
|
3277
|
+
"--font-text-3-icon-size": px(theme2.font.text.sizes[3].iconSize),
|
|
3278
|
+
"--font-text-4-size": rem(theme2.font.text.sizes[4].fontSize),
|
|
3279
|
+
"--font-text-4-line-height": rem(theme2.font.text.sizes[4].lineHeight),
|
|
3280
|
+
"--font-text-4-ascender-height": px(theme2.font.text.sizes[4].ascenderHeight),
|
|
3281
|
+
"--font-text-4-descender-height": px(theme2.font.text.sizes[4].descenderHeight),
|
|
3282
|
+
"--font-text-4-letter-spacing": px(theme2.font.text.sizes[4].letterSpacing),
|
|
3283
|
+
"--font-text-4-icon-size": px(theme2.font.text.sizes[4].iconSize),
|
|
3284
|
+
"--input-border-width": px(theme2.input.border.width),
|
|
3285
|
+
"--input-checkbox-focus-ring-offset": px(theme2.input.checkbox.focusRing.offset),
|
|
3286
|
+
"--input-checkbox-focus-ring-width": px(theme2.input.checkbox.focusRing.width),
|
|
3287
|
+
"--input-checkbox-size": px(theme2.input.checkbox.size),
|
|
3288
|
+
"--input-radio-focus-ring-offset": px(theme2.input.radio.focusRing.offset),
|
|
3289
|
+
"--input-radio-focus-ring-width": px(theme2.input.radio.focusRing.width),
|
|
3290
|
+
"--input-radio-mark-size": px(theme2.input.radio.markSize),
|
|
3291
|
+
"--input-radio-size": px(theme2.input.radio.size),
|
|
3292
|
+
"--input-select-focus-ring-offset": px(theme2.input.select.focusRing.offset),
|
|
3293
|
+
"--input-select-focus-ring-width": px(theme2.input.select.focusRing.width),
|
|
3294
|
+
"--input-switch-focus-ring-offset": px(theme2.input.switch.focusRing.offset),
|
|
3295
|
+
"--input-switch-focus-ring-width": px(theme2.input.switch.focusRing.width),
|
|
3296
|
+
"--input-switch-width": px(theme2.input.switch.width),
|
|
3297
|
+
"--input-switch-height": px(theme2.input.switch.height),
|
|
3298
|
+
"--input-switch-padding": px(theme2.input.switch.padding),
|
|
3299
|
+
"--input-switch-transition-duration-ms": px(theme2.input.switch.transitionDurationMs),
|
|
3300
|
+
"--input-switch-transition-timing-function": theme2.input.switch.transitionTimingFunction,
|
|
3301
|
+
"--input-text-focus-ring-offset": px(theme2.input.text.focusRing.offset),
|
|
3302
|
+
"--input-text-focus-ring-width": px(theme2.input.text.focusRing.width),
|
|
3303
|
+
"--container-0": px(theme2.container[0]),
|
|
3304
|
+
"--container-1": px(theme2.container[1]),
|
|
3305
|
+
"--container-2": px(theme2.container[2]),
|
|
3306
|
+
"--container-3": px(theme2.container[3]),
|
|
3307
|
+
"--container-4": px(theme2.container[4]),
|
|
3308
|
+
"--container-5": px(theme2.container[5]),
|
|
3309
|
+
"--radius-0": px(theme2.radius[0]),
|
|
3310
|
+
"--radius-1": px(theme2.radius[1]),
|
|
3311
|
+
"--radius-2": px(theme2.radius[2]),
|
|
3312
|
+
"--radius-3": px(theme2.radius[3]),
|
|
3313
|
+
"--radius-4": px(theme2.radius[4]),
|
|
3314
|
+
"--radius-5": px(theme2.radius[5]),
|
|
3315
|
+
"--radius-6": px(theme2.radius[6]),
|
|
3316
|
+
[varNames.space[0]]: rem(theme2.space[0]),
|
|
3317
|
+
[varNames.space[0.5]]: `calc(${rem(theme2.space[1])} / 2)`,
|
|
3318
|
+
[varNames.space[1]]: rem(theme2.space[1]),
|
|
3319
|
+
[varNames.space[2]]: rem(theme2.space[2]),
|
|
3320
|
+
[varNames.space[3]]: rem(theme2.space[3]),
|
|
3321
|
+
[varNames.space[4]]: rem(theme2.space[4]),
|
|
3322
|
+
[varNames.space[5]]: rem(theme2.space[5]),
|
|
3323
|
+
[varNames.space[6]]: rem(theme2.space[6]),
|
|
3324
|
+
[varNames.space[7]]: rem(theme2.space[7]),
|
|
3325
|
+
[varNames.space[8]]: rem(theme2.space[8]),
|
|
3326
|
+
[varNames.space[9]]: rem(theme2.space[9]),
|
|
3327
|
+
"--shadow-0-umbra": toBoxShadow(theme2.shadow[0]?.umbra),
|
|
3328
|
+
//`${theme.shadow[0]?.umbra || 'none'}`,
|
|
3329
|
+
"--shadow-0-penumbra": toBoxShadow(theme2.shadow[0]?.penumbra),
|
|
3330
|
+
"--shadow-0-ambient": toBoxShadow(theme2.shadow[0]?.ambient),
|
|
3331
|
+
"--shadow-1-umbra": toBoxShadow(theme2.shadow[1]?.umbra),
|
|
3332
|
+
"--shadow-1-penumbra": toBoxShadow(theme2.shadow[1]?.penumbra),
|
|
3333
|
+
"--shadow-1-ambient": toBoxShadow(theme2.shadow[1]?.ambient),
|
|
3334
|
+
"--shadow-2-umbra": toBoxShadow(theme2.shadow[2]?.umbra),
|
|
3335
|
+
"--shadow-2-penumbra": toBoxShadow(theme2.shadow[2]?.penumbra),
|
|
3336
|
+
"--shadow-2-ambient": toBoxShadow(theme2.shadow[2]?.ambient),
|
|
3337
|
+
"--shadow-3-umbra": toBoxShadow(theme2.shadow[3]?.umbra),
|
|
3338
|
+
"--shadow-3-penumbra": toBoxShadow(theme2.shadow[3]?.penumbra),
|
|
3339
|
+
"--shadow-3-ambient": toBoxShadow(theme2.shadow[3]?.ambient),
|
|
3340
|
+
"--shadow-4-umbra": toBoxShadow(theme2.shadow[4]?.umbra),
|
|
3341
|
+
"--shadow-4-penumbra": toBoxShadow(theme2.shadow[4]?.penumbra),
|
|
3342
|
+
"--shadow-4-ambient": toBoxShadow(theme2.shadow[4]?.ambient),
|
|
3343
|
+
"--shadow-5-umbra": toBoxShadow(theme2.shadow[5]?.umbra),
|
|
3344
|
+
"--shadow-5-penumbra": toBoxShadow(theme2.shadow[5]?.penumbra),
|
|
3345
|
+
"--shadow-5-ambient": toBoxShadow(theme2.shadow[5]?.ambient),
|
|
3346
|
+
...Object.fromEntries(getThemeEntries(theme2.color, ["color"]))
|
|
3347
|
+
}), compileCardCss({
|
|
3348
|
+
scheme: "dark",
|
|
3349
|
+
tone: "transparent"
|
|
3350
|
+
}), compileCardCss({
|
|
3351
|
+
scheme: "dark",
|
|
3352
|
+
tone: "default"
|
|
3353
|
+
}), compileCardCss({
|
|
3354
|
+
scheme: "dark",
|
|
3355
|
+
tone: "primary"
|
|
3356
|
+
}), compileCardCss({
|
|
3357
|
+
scheme: "dark",
|
|
3358
|
+
tone: "positive"
|
|
3359
|
+
}), compileCardCss({
|
|
3360
|
+
scheme: "dark",
|
|
3361
|
+
tone: "caution"
|
|
3362
|
+
}), compileCardCss({
|
|
3363
|
+
scheme: "dark",
|
|
3364
|
+
tone: "critical"
|
|
3365
|
+
}), compileCardCss({
|
|
3366
|
+
scheme: "light",
|
|
3367
|
+
tone: "transparent"
|
|
3368
|
+
}), compileCardCss({
|
|
3369
|
+
scheme: "light",
|
|
3370
|
+
tone: "default"
|
|
3371
|
+
}), compileCardCss({
|
|
3372
|
+
scheme: "light",
|
|
3373
|
+
tone: "primary"
|
|
3374
|
+
}), compileCardCss({
|
|
3375
|
+
scheme: "light",
|
|
3376
|
+
tone: "positive"
|
|
3377
|
+
}), compileCardCss({
|
|
3378
|
+
scheme: "light",
|
|
3379
|
+
tone: "caution"
|
|
3380
|
+
}), compileCardCss({
|
|
3381
|
+
scheme: "light",
|
|
3382
|
+
tone: "critical"
|
|
3383
|
+
})].join(`
|
|
2685
3384
|
|
|
2686
3385
|
`);
|
|
2687
3386
|
}
|
|
2688
3387
|
function compileCardCss(props) {
|
|
2689
|
-
const {
|
|
3388
|
+
const {
|
|
3389
|
+
scheme,
|
|
3390
|
+
tone
|
|
3391
|
+
} = props, cardVars = vars.color[scheme][tone];
|
|
2690
3392
|
return compileRule(`.card[data-scheme="${scheme}"][data-tone="${tone}"]`, {
|
|
2691
3393
|
"--color-accent-fg": cardVars.accent.fg,
|
|
2692
3394
|
...theme.THEME_COLOR_AVATAR_COLORS.reduce((acc, color) => ({
|
|
@@ -2822,11 +3524,15 @@ function isArray(value) {
|
|
|
2822
3524
|
}
|
|
2823
3525
|
async function buildSystem(outDir) {
|
|
2824
3526
|
const css = compileSystem();
|
|
2825
|
-
await fs__default.default.mkdir(outDir, {
|
|
3527
|
+
await fs__default.default.mkdir(outDir, {
|
|
3528
|
+
recursive: !0
|
|
3529
|
+
}), await fs__default.default.writeFile(path__default.default.resolve(outDir, "system.css"), css, "utf-8"), console.log("- system.css");
|
|
2826
3530
|
}
|
|
2827
3531
|
async function buildTheme(outDir) {
|
|
2828
3532
|
const css = compileTheme(theme.buildTheme().v2);
|
|
2829
|
-
await fs__default.default.mkdir(outDir, {
|
|
3533
|
+
await fs__default.default.mkdir(outDir, {
|
|
3534
|
+
recursive: !0
|
|
3535
|
+
}), await fs__default.default.writeFile(path__default.default.resolve(outDir, "sanity-theme.css"), css, "utf-8"), console.log("- sanity-theme.css");
|
|
2830
3536
|
}
|
|
2831
3537
|
async function buildCommand(options) {
|
|
2832
3538
|
const cwd = options.cwd ?? process.cwd(), outDir = options.outDir ?? path__default.default.resolve(cwd, "dist");
|