winduum 1.2.0 → 2.0.0-next.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/package.json +4 -4
- package/plugin/index.cjs +13 -7
- package/plugin/index.js +63 -12
- package/plugin/utilities/common.js +4 -4
- package/plugin/utilities/dot.js +1 -2
- package/src/base/config/font.css +22 -9
- package/src/base/config/rounded.css +12 -12
- package/src/base/config/transition.css +14 -14
- package/src/base/config/z.css +5 -5
- package/src/base/config.css +0 -1
- package/src/base/defaults.css +9 -11
- package/src/base/keyframes.css +12 -0
- package/src/base/reset.css +2 -7
- package/src/base/theme/dark-rgb.css +1 -1
- package/src/base/theme/dark.css +1 -1
- package/src/base/theme/default-rgb.css +6 -6
- package/src/base/theme/default.css +6 -6
- package/src/components/badge/bordered.css +16 -0
- package/src/components/badge/circle.css +5 -0
- package/src/components/badge/default-props.css +8 -0
- package/src/components/badge/default.css +26 -0
- package/src/components/badge/lg.css +3 -0
- package/src/components/badge/muted.css +4 -0
- package/src/components/badge/sm.css +4 -0
- package/src/components/badge/square.css +4 -0
- package/src/components/breadcrumb/default-props.css +3 -3
- package/src/components/breadcrumb/default.css +5 -5
- package/src/components/button/bordered.css +19 -0
- package/src/components/button/circle.css +6 -0
- package/src/components/button/default.css +63 -0
- package/src/components/button/fill.css +6 -0
- package/src/components/button/ghosted.css +14 -0
- package/src/{ui/btn → components/button}/index.css +2 -7
- package/src/components/button/interactive.css +56 -0
- package/src/components/button/lg.css +4 -0
- package/src/components/button/muted.css +14 -0
- package/src/components/button/props/default.css +11 -0
- package/src/components/button/props/interactive.css +9 -0
- package/src/components/button/raised.css +6 -0
- package/src/components/button/readme.md +46 -0
- package/src/components/button/sm.css +4 -0
- package/src/components/button/square.css +5 -0
- package/src/components/card/default-props.css +2 -2
- package/src/components/card/default.css +4 -4
- package/src/components/carousel/content.css +1 -1
- package/src/components/carousel/default.css +1 -1
- package/src/components/check/default-props.css +13 -0
- package/src/components/check/default.css +74 -0
- package/src/components/check/interactive-props.css +3 -0
- package/src/components/check/interactive.css +50 -0
- package/src/components/check/invalid.css +8 -0
- package/src/components/color/default-props.css +11 -0
- package/src/{ui → components}/color/default.css +14 -14
- package/src/components/color/interactive-props.css +3 -0
- package/src/{ui → components}/color/interactive.css +5 -5
- package/src/components/compare/default.css +13 -13
- package/src/components/compare/index.js +2 -2
- package/src/components/control/color-props.css +5 -0
- package/src/components/control/color.css +24 -0
- package/src/components/control/default-props.css +16 -0
- package/src/components/control/default.css +77 -0
- package/src/components/control/file.css +25 -0
- package/src/components/control/floating-interactive.css +13 -0
- package/src/components/control/floating-props.css +4 -0
- package/src/{ui → components}/control/floating.css +5 -5
- package/src/components/control/icon-props.css +4 -0
- package/src/components/control/icon.css +32 -0
- package/src/components/control/interactive-props.css +3 -0
- package/src/components/control/interactive.css +19 -0
- package/src/components/control/invalid.css +10 -0
- package/src/{ui → components}/control/select-multiple.css +2 -2
- package/src/components/control/select-props.css +4 -0
- package/src/components/control/select.css +23 -0
- package/src/components/dialog/content-props.css +3 -3
- package/src/components/dialog/content.css +5 -5
- package/src/components/dialog/default-props.css +4 -4
- package/src/components/dialog/default.css +11 -12
- package/src/components/dialog/index.d.ts +3 -18
- package/src/components/dialog/index.js +21 -80
- package/src/components/drawer/content-props.css +4 -4
- package/src/components/drawer/content.css +3 -3
- package/src/components/drawer/default-props.css +1 -1
- package/src/components/drawer/default.css +3 -3
- package/src/components/drawer/index.js +2 -2
- package/src/components/field/default.css +3 -3
- package/src/components/form/index.js +4 -4
- package/src/{ui → components}/group/default.css +11 -11
- package/src/{ui → components}/group/vertical.css +2 -2
- package/src/components/heading/default-props.css +6 -0
- package/src/components/heading/default.css +8 -0
- package/src/components/heading/lg.css +3 -0
- package/src/components/heading/sm.css +3 -0
- package/src/{ui → components}/image/avatar.css +3 -3
- package/src/{ui → components}/image/default.css +1 -1
- package/src/components/index.css +20 -0
- package/src/components/info/default-props.css +4 -0
- package/src/components/info/default.css +8 -0
- package/src/components/label/default-props.css +4 -0
- package/src/components/label/default.css +8 -0
- package/src/components/link/default-props.css +4 -0
- package/src/components/link/default.css +8 -0
- package/src/components/link/interactive-props.css +5 -0
- package/src/components/link/interactive.css +16 -0
- package/src/components/notice/default-props.css +8 -0
- package/src/components/notice/default.css +25 -0
- package/src/components/pagination/default.css +1 -1
- package/src/components/popover/content-props.css +6 -6
- package/src/components/popover/content.css +12 -12
- package/src/components/popover/default.css +1 -1
- package/src/components/progress/default-props.css +4 -0
- package/src/{ui → components}/progress/default.css +9 -9
- package/src/components/progress/lg.css +3 -0
- package/src/{ui → components}/progress/meter.css +1 -1
- package/src/components/progress/sm.css +3 -0
- package/src/components/range/default-props.css +10 -0
- package/src/components/range/default.css +101 -0
- package/src/{ui → components}/range/index.js +2 -2
- package/src/components/range/multi.css +22 -0
- package/src/{ui → components}/range/vertical.css +2 -2
- package/src/components/rating/default-props.css +5 -0
- package/src/{ui → components}/rating/default.css +6 -6
- package/src/{ui → components}/rating/invalid.css +2 -2
- package/src/components/switch/default-props.css +17 -0
- package/src/components/switch/default.css +46 -0
- package/src/components/switch/interactive-props.css +3 -0
- package/src/components/switch/interactive.css +39 -0
- package/src/components/switch/invalid.css +6 -0
- package/src/components/table/default-props.css +6 -6
- package/src/components/table/default.css +8 -8
- package/src/components/table/interactive-props.css +2 -2
- package/src/components/table/interactive.css +11 -11
- package/src/components/tabs/default.css +2 -2
- package/src/components/text/default-props.css +9 -0
- package/src/components/text/default.css +193 -0
- package/src/components/title/default-props.css +5 -0
- package/src/components/title/default.css +8 -0
- package/src/components/title/lg.css +3 -0
- package/src/components/title/sm.css +3 -0
- package/src/components/toast/content-props.css +5 -5
- package/src/components/toast/content.css +12 -12
- package/src/components/toast/default-props.css +2 -2
- package/src/components/toast/default.css +5 -5
- package/src/components/toaster/default-props.css +2 -2
- package/src/components/toaster/default.css +4 -4
- package/src/components/toaster/index.js +6 -6
- package/src/components/tooltip/default-props.css +10 -10
- package/src/components/tooltip/default.css +14 -14
- package/src/main.css +0 -1
- package/src/utilities/common.css +2 -6
- package/src/utilities/container/default.css +3 -4
- package/src/utilities/container/index.css +1 -1
- package/src/utilities/divider.css +2 -3
- package/src/utilities/ripple/index.css +1 -3
- package/src/utilities/skeleton/index.css +1 -1
- package/src/utilities/skeleton/props/default.css +5 -0
- package/src/utilities/swap/default.css +4 -4
- package/src/utilities/underline.css +3 -3
- package/types/index.d.ts +4 -19
- package/types/index.d.ts.map +3 -8
- package/plugin/utilities/flex.js +0 -12
- package/src/base/config/text.css +0 -15
- package/src/ui/badge/bordered.css +0 -16
- package/src/ui/badge/circle.css +0 -5
- package/src/ui/badge/default-props.css +0 -8
- package/src/ui/badge/default.css +0 -26
- package/src/ui/badge/lg.css +0 -3
- package/src/ui/badge/muted.css +0 -4
- package/src/ui/badge/sm.css +0 -4
- package/src/ui/badge/square.css +0 -4
- package/src/ui/btn/bordered.css +0 -21
- package/src/ui/btn/circle.css +0 -6
- package/src/ui/btn/default-props.css +0 -10
- package/src/ui/btn/default.css +0 -49
- package/src/ui/btn/fill.css +0 -6
- package/src/ui/btn/ghosted.css +0 -9
- package/src/ui/btn/gradient-bordered.css +0 -24
- package/src/ui/btn/gradient.css +0 -10
- package/src/ui/btn/interactive-props.css +0 -9
- package/src/ui/btn/interactive.css +0 -53
- package/src/ui/btn/lg.css +0 -4
- package/src/ui/btn/loading-props.css +0 -4
- package/src/ui/btn/loading.css +0 -24
- package/src/ui/btn/muted.css +0 -9
- package/src/ui/btn/raised.css +0 -7
- package/src/ui/btn/readme.md +0 -51
- package/src/ui/btn/sm.css +0 -4
- package/src/ui/btn/square.css +0 -5
- package/src/ui/btn/wide.css +0 -3
- package/src/ui/check/default-props.css +0 -13
- package/src/ui/check/default.css +0 -74
- package/src/ui/check/interactive-props.css +0 -3
- package/src/ui/check/interactive.css +0 -50
- package/src/ui/check/invalid.css +0 -8
- package/src/ui/color/default-props.css +0 -11
- package/src/ui/color/interactive-props.css +0 -3
- package/src/ui/control/color-props.css +0 -5
- package/src/ui/control/color.css +0 -24
- package/src/ui/control/default-props.css +0 -16
- package/src/ui/control/default.css +0 -77
- package/src/ui/control/file.css +0 -25
- package/src/ui/control/floating-interactive.css +0 -13
- package/src/ui/control/floating-props.css +0 -4
- package/src/ui/control/icon-props.css +0 -4
- package/src/ui/control/icon.css +0 -32
- package/src/ui/control/interactive-props.css +0 -3
- package/src/ui/control/interactive.css +0 -19
- package/src/ui/control/invalid.css +0 -10
- package/src/ui/control/select-props.css +0 -4
- package/src/ui/control/select.css +0 -23
- package/src/ui/heading/default-props.css +0 -6
- package/src/ui/heading/default.css +0 -8
- package/src/ui/heading/lg.css +0 -3
- package/src/ui/heading/sm.css +0 -3
- package/src/ui/index.css +0 -18
- package/src/ui/info/default-props.css +0 -4
- package/src/ui/info/default.css +0 -8
- package/src/ui/label/default-props.css +0 -4
- package/src/ui/label/default.css +0 -8
- package/src/ui/link/default-props.css +0 -4
- package/src/ui/link/default.css +0 -8
- package/src/ui/link/interactive-props.css +0 -5
- package/src/ui/link/interactive.css +0 -16
- package/src/ui/notice/default-props.css +0 -8
- package/src/ui/notice/default.css +0 -25
- package/src/ui/progress/default-props.css +0 -4
- package/src/ui/progress/lg.css +0 -3
- package/src/ui/progress/sm.css +0 -3
- package/src/ui/range/default-props.css +0 -10
- package/src/ui/range/default.css +0 -101
- package/src/ui/range/multi.css +0 -22
- package/src/ui/rating/default-props.css +0 -5
- package/src/ui/switch/default-props.css +0 -17
- package/src/ui/switch/default.css +0 -46
- package/src/ui/switch/interactive-props.css +0 -3
- package/src/ui/switch/interactive.css +0 -39
- package/src/ui/switch/invalid.css +0 -6
- package/src/ui/text/default-props.css +0 -9
- package/src/ui/text/default.css +0 -193
- package/src/ui/title/default-props.css +0 -5
- package/src/ui/title/default.css +0 -8
- package/src/ui/title/lg.css +0 -3
- package/src/ui/title/sm.css +0 -3
- package/src/utilities/skeleton/default-props.css +0 -5
- /package/src/{ui → components}/badge/index.css +0 -0
- /package/src/{ui → components}/badge/readme.md +0 -0
- /package/src/{ui → components}/check/index.css +0 -0
- /package/src/{ui → components}/check/readme.md +0 -0
- /package/src/{ui → components}/color/index.css +0 -0
- /package/src/{ui → components}/color/readme.md +0 -0
- /package/src/{ui → components}/control/index.css +0 -0
- /package/src/{ui → components}/control/readme.md +0 -0
- /package/src/{ui → components}/group/index.css +0 -0
- /package/src/{ui → components}/group/readme.md +0 -0
- /package/src/{ui → components}/heading/index.css +0 -0
- /package/src/{ui → components}/heading/readme.md +0 -0
- /package/src/{ui → components}/image/index.css +0 -0
- /package/src/{ui → components}/image/readme.md +0 -0
- /package/src/{ui → components}/info/index.css +0 -0
- /package/src/{ui → components}/info/readme.md +0 -0
- /package/src/{ui → components}/label/index.css +0 -0
- /package/src/{ui → components}/label/readme.md +0 -0
- /package/src/{ui → components}/link/index.css +0 -0
- /package/src/{ui → components}/link/readme.md +0 -0
- /package/src/{ui → components}/notice/index.css +0 -0
- /package/src/{ui → components}/notice/readme.md +0 -0
- /package/src/{ui → components}/progress/index.css +0 -0
- /package/src/{ui → components}/progress/readme.md +0 -0
- /package/src/{ui → components}/range/index.css +0 -0
- /package/src/{ui → components}/range/index.d.ts +0 -0
- /package/src/{ui → components}/range/readme.md +0 -0
- /package/src/{ui → components}/rating/index.css +0 -0
- /package/src/{ui → components}/rating/readme.md +0 -0
- /package/src/{ui → components}/switch/index.css +0 -0
- /package/src/{ui → components}/switch/readme.md +0 -0
- /package/src/{ui → components}/text/index.css +0 -0
- /package/src/{ui → components}/text/readme.md +0 -0
- /package/src/{ui → components}/title/index.css +0 -0
- /package/src/{ui → components}/title/readme.md +0 -0
- /package/src/utilities/container/{default-props.css → props/default.css} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "winduum",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0-next.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"types": "types/index.d.ts",
|
|
6
6
|
"main": "plugin/index.cjs",
|
|
@@ -96,9 +96,9 @@
|
|
|
96
96
|
"default": "./src/components/popover/index.js",
|
|
97
97
|
"types": "./src/components/popover/index.d.ts"
|
|
98
98
|
},
|
|
99
|
-
"./src/
|
|
100
|
-
"default": "./src/
|
|
101
|
-
"types": "./src/
|
|
99
|
+
"./src/components/range": {
|
|
100
|
+
"default": "./src/components/range/index.js",
|
|
101
|
+
"types": "./src/components/range/index.d.ts"
|
|
102
102
|
},
|
|
103
103
|
"./src/utilities/ripple": {
|
|
104
104
|
"default": "./src/utilities/ripple/index.js",
|
package/plugin/index.cjs
CHANGED
|
@@ -28,7 +28,9 @@ var DotUtility = {
|
|
|
28
28
|
height: '0.625rem',
|
|
29
29
|
borderRadius: 'var(--rounded-full)',
|
|
30
30
|
backgroundColor: 'color-mix(in srgb, var(--color-accent) calc(var(--tw-bg-opacity) * 100%), transparent)',
|
|
31
|
-
flexShrink: '0'
|
|
31
|
+
flexShrink: '0',
|
|
32
|
+
justifyContent: 'center',
|
|
33
|
+
alignItems: 'center'
|
|
32
34
|
}
|
|
33
35
|
};
|
|
34
36
|
|
|
@@ -124,20 +126,24 @@ const textColor = ({ value, corePlugins }, settings) => {
|
|
|
124
126
|
* @param {[]} colors
|
|
125
127
|
* @param {boolean} colorMix
|
|
126
128
|
* @param {boolean} rgb
|
|
127
|
-
* @returns {
|
|
129
|
+
* @returns {Object}
|
|
128
130
|
*/
|
|
129
131
|
const tailwindColors = (colors = [], colorMix = true, rgb = false) => {
|
|
132
|
+
const result = {
|
|
133
|
+
current: 'color-mix(in var(--space), currentcolor calc(<alpha-value> * 100%), transparent)'
|
|
134
|
+
};
|
|
135
|
+
|
|
130
136
|
colors.forEach(name => {
|
|
131
137
|
if (rgb) {
|
|
132
|
-
|
|
138
|
+
result[name + '-rgb'] = `rgb(var(--color-${name}-rgb) / <alpha-value>)`;
|
|
133
139
|
}
|
|
134
140
|
|
|
135
|
-
|
|
141
|
+
result[name] = colorMix
|
|
136
142
|
? `color-mix(in var(--space), var(--color-${name}) calc(<alpha-value> * 100%), transparent)`
|
|
137
143
|
: `rgb(var(--color-${name}) / <alpha-value>)`;
|
|
138
144
|
});
|
|
139
145
|
|
|
140
|
-
return
|
|
146
|
+
return result
|
|
141
147
|
};
|
|
142
148
|
|
|
143
149
|
/**
|
|
@@ -210,7 +216,7 @@ const defaultConfig = {
|
|
|
210
216
|
'warning', 'error', 'info', 'success', 'light', 'dark',
|
|
211
217
|
'main', 'main-primary', 'main-secondary', 'main-tertiary',
|
|
212
218
|
'body', 'body-primary', 'body-secondary', 'body-tertiary',
|
|
213
|
-
'primary-foreground', 'accent-foreground',
|
|
219
|
+
'primary-foreground', 'accent-foreground',
|
|
214
220
|
'warning-foreground', 'error-foreground', 'info-foreground', 'success-foreground', 'light-foreground', 'dark-foreground',
|
|
215
221
|
'main-foreground', 'main-primary-foreground', 'main-secondary-foreground', 'main-tertiary-foreground',
|
|
216
222
|
'body-foreground', 'body-primary-foreground', 'body-secondary-foreground', 'body-tertiary-foreground'
|
|
@@ -222,7 +228,7 @@ const defaultConfig = {
|
|
|
222
228
|
fontSize: ['xs', 'sm', 'base', 'md', 'lg', 'xl', '2xl', '3xl', '3xl', '4xl', '5xl', '6xl', '7xl', '7xl', '8xl', '9xl'],
|
|
223
229
|
spacing: ['xs', 'sm', 'md', 'lg', 'xl', '2xl', '3xl', '4xl', '5xl', '6xl'],
|
|
224
230
|
borderRadius: ['xs', 'sm', 'base', 'md', 'lg', 'xl', '2xl', '3xl', '4xl', '5xl', '6xl', 'full'],
|
|
225
|
-
animations: ['
|
|
231
|
+
animations: ['ripple', 'spin', 'move-indeterminate'],
|
|
226
232
|
mask: ['check', 'radio', 'angle-up', 'angle-down'],
|
|
227
233
|
screens: {
|
|
228
234
|
xs: '22.5em',
|
package/plugin/index.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import plugin from 'tailwindcss/plugin'
|
|
2
2
|
import flattenColorPalette from 'tailwindcss/src/util/flattenColorPalette'
|
|
3
|
-
import FlexUtility from './utilities/flex.js'
|
|
4
3
|
import DotUtility from './utilities/dot.js'
|
|
5
4
|
import divideGap from './utilities/divide-gap.js'
|
|
6
5
|
import { accentColor, textColor } from './utilities/color.js'
|
|
@@ -24,7 +23,60 @@ export const defaultConfig = {
|
|
|
24
23
|
fontWeight: ['light', 'normal', 'medium', 'semibold', 'bold', 'extrabold'],
|
|
25
24
|
ease: ['linear', 'in', 'out', 'in-out'],
|
|
26
25
|
zIndex: ['10', '20', '30', '40', '50', '60'],
|
|
27
|
-
fontSize: [
|
|
26
|
+
fontSize: [
|
|
27
|
+
{
|
|
28
|
+
value: 'xs',
|
|
29
|
+
initial: '0.75rem'
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
value: 'sm',
|
|
33
|
+
initial: '0.875rem'
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
value: 'base',
|
|
37
|
+
initial: '1rem'
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
value: 'lg',
|
|
41
|
+
initial: '1.125rem'
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
value: 'xl',
|
|
45
|
+
initial: '1.25rem'
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
value: '2xl',
|
|
49
|
+
initial: '1.5rem'
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
value: '3xl',
|
|
53
|
+
initial: '1.875rem'
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
value: '4xl',
|
|
57
|
+
initial: '2.25rem'
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
value: '5xl',
|
|
61
|
+
initial: '3rem'
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
value: '6xl',
|
|
65
|
+
initial: '3.75rem'
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
value: '7xl',
|
|
69
|
+
initial: '4.5rem'
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
value: '8xl',
|
|
73
|
+
initial: '6rem'
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
value: '9xl',
|
|
77
|
+
initial: '8rem'
|
|
78
|
+
}
|
|
79
|
+
],
|
|
28
80
|
spacing: ['xs', 'sm', 'md', 'lg', 'xl', '2xl', '3xl', '4xl', '5xl', '6xl'],
|
|
29
81
|
borderRadius: ['xs', 'sm', 'base', 'md', 'lg', 'xl', '2xl', '3xl', '4xl', '5xl', '6xl', 'full'],
|
|
30
82
|
animations: ['ripple', 'spin', 'move-indeterminate'],
|
|
@@ -79,7 +131,6 @@ export const createPlugin = (userConfig = {}) => {
|
|
|
79
131
|
addComponents(tailwindPropertyUtilities('mask', userConfig.mask))
|
|
80
132
|
addComponents(divideGap({ theme, e }))
|
|
81
133
|
addComponents({
|
|
82
|
-
...FlexUtility,
|
|
83
134
|
...DotUtility
|
|
84
135
|
})
|
|
85
136
|
}, {
|
|
@@ -91,23 +142,23 @@ export const createPlugin = (userConfig = {}) => {
|
|
|
91
142
|
theme: {
|
|
92
143
|
extend: {
|
|
93
144
|
transitionProperty: {
|
|
94
|
-
DEFAULT: 'var(--transition)'
|
|
145
|
+
DEFAULT: 'var(--default-transition-property)'
|
|
95
146
|
},
|
|
96
147
|
transitionDuration: {
|
|
97
|
-
DEFAULT: 'var(--duration)'
|
|
148
|
+
DEFAULT: 'var(--default-transition-duration)'
|
|
98
149
|
},
|
|
99
|
-
transitionTimingFunction: tailwindVariables('
|
|
150
|
+
transitionTimingFunction: tailwindVariables('transition-timing-function', userConfig.ease),
|
|
100
151
|
colors: tailwindColors(userConfig.colors, settings.colorMix, settings.rgb),
|
|
101
|
-
fontSize: tailwindVariablesFont('
|
|
102
|
-
fontFamily: tailwindVariables('font', userConfig.fontFamily),
|
|
103
|
-
fontWeight: tailwindVariables('font', userConfig.fontWeight),
|
|
104
|
-
zIndex: tailwindVariables('z', userConfig.zIndex, {
|
|
152
|
+
fontSize: tailwindVariablesFont('font-size', userConfig.fontSize),
|
|
153
|
+
fontFamily: tailwindVariables('font-family', userConfig.fontFamily),
|
|
154
|
+
fontWeight: tailwindVariables('font-weight', userConfig.fontWeight),
|
|
155
|
+
zIndex: tailwindVariables('z-index', userConfig.zIndex, {
|
|
105
156
|
0: 0,
|
|
106
157
|
auto: 'auto'
|
|
107
158
|
}),
|
|
108
159
|
spacing: tailwindVariables('spacing', userConfig.spacing),
|
|
109
|
-
borderRadius: tailwindVariables('
|
|
110
|
-
DEFAULT: 'var(--
|
|
160
|
+
borderRadius: tailwindVariables('radius', userConfig.borderRadius, {
|
|
161
|
+
DEFAULT: 'var(--radius)'
|
|
111
162
|
}),
|
|
112
163
|
screens: userConfig.screens
|
|
113
164
|
}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
export const tailwindColors = (colors = [], colorMix = true, rgb = false) => {
|
|
8
8
|
const result = {
|
|
9
|
-
current: 'color-mix(in var(--space), currentcolor calc(<alpha-value> * 100%), transparent)'
|
|
9
|
+
current: 'color-mix(in var(--default-color-space), currentcolor calc(<alpha-value> * 100%), transparent)'
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
colors.forEach(name => {
|
|
@@ -15,7 +15,7 @@ export const tailwindColors = (colors = [], colorMix = true, rgb = false) => {
|
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
result[name] = colorMix
|
|
18
|
-
? `color-mix(in var(--space), var(--color-${name}) calc(<alpha-value> * 100%), transparent)`
|
|
18
|
+
? `color-mix(in var(--default-color-space), var(--color-${name}) calc(<alpha-value> * 100%), transparent)`
|
|
19
19
|
: `rgb(var(--color-${name}) / <alpha-value>)`
|
|
20
20
|
})
|
|
21
21
|
|
|
@@ -43,8 +43,8 @@ export const tailwindVariables = (type, variables = [], values = {}) => {
|
|
|
43
43
|
* @returns {Object}
|
|
44
44
|
*/
|
|
45
45
|
export const tailwindVariablesFont = (type, variables = [], values = {}) => {
|
|
46
|
-
variables.forEach(
|
|
47
|
-
values[
|
|
46
|
+
variables.forEach(({ value, initial }) => {
|
|
47
|
+
values[value] = [`var(--${type}-${value}, ${initial})`, `calc(var(--${type}-${value}) + 0.5rem)`]
|
|
48
48
|
})
|
|
49
49
|
|
|
50
50
|
return values
|
package/plugin/utilities/dot.js
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
export default {
|
|
2
2
|
'.dot': {
|
|
3
|
-
'--tw-bg-opacity': '1',
|
|
4
3
|
display: 'inline-flex',
|
|
5
4
|
width: '0.625rem',
|
|
6
5
|
height: '0.625rem',
|
|
7
6
|
borderRadius: 'var(--rounded-full)',
|
|
8
|
-
backgroundColor: 'color-mix(in
|
|
7
|
+
backgroundColor: 'color-mix(in var(--default-color-space), var(--color-accent) 100%, transparent)',
|
|
9
8
|
flexShrink: '0',
|
|
10
9
|
justifyContent: 'center',
|
|
11
10
|
alignItems: 'center'
|
package/src/base/config/font.css
CHANGED
|
@@ -1,11 +1,24 @@
|
|
|
1
1
|
:root, :host {
|
|
2
|
-
--font-
|
|
3
|
-
--font-primary: var(--font-
|
|
4
|
-
--font-secondary: var(--font-
|
|
5
|
-
--font-bold: 700;
|
|
6
|
-
--font-semibold: 600;
|
|
7
|
-
--font-medium: 500;
|
|
8
|
-
--font-normal: 400;
|
|
9
|
-
--font-light: 300;
|
|
10
|
-
--font-thin: 200;
|
|
2
|
+
--default-font-family: ui-sans-serif, system-ui, -apple-system, "BlinkMacSystemFont", "Segoe UI", "Roboto", "Helvetica Neue", "Arial", "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
|
3
|
+
--font-family-primary: var(--default-font-family);
|
|
4
|
+
--font-family-secondary: var(--default-font-family);
|
|
5
|
+
--font-weight-bold: 700;
|
|
6
|
+
--font-weight-semibold: 600;
|
|
7
|
+
--font-weight-medium: 500;
|
|
8
|
+
--font-weight-normal: 400;
|
|
9
|
+
--font-weight-light: 300;
|
|
10
|
+
--font-weight-thin: 200;
|
|
11
|
+
--font-size-xs: 0.75rem;
|
|
12
|
+
--font-size-sm: 0.875rem;
|
|
13
|
+
--font-size-base: 1rem;
|
|
14
|
+
--font-size-lg: 1.125rem;
|
|
15
|
+
--font-size-xl: 1.25rem;
|
|
16
|
+
--font-size-2xl: 1.5rem;
|
|
17
|
+
--font-size-3xl: 1.875rem;
|
|
18
|
+
--font-size-4xl: 2.25rem;
|
|
19
|
+
--font-size-5xl: 3rem;
|
|
20
|
+
--font-size-6xl: 3.75rem;
|
|
21
|
+
--font-size-7xl: 4.5rem;
|
|
22
|
+
--font-size-8xl: 6rem;
|
|
23
|
+
--font-size-9xl: 8rem;
|
|
11
24
|
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
:root, :host {
|
|
2
|
-
--
|
|
3
|
-
--
|
|
4
|
-
--
|
|
5
|
-
--
|
|
6
|
-
--
|
|
7
|
-
--
|
|
8
|
-
--
|
|
9
|
-
--
|
|
10
|
-
--
|
|
11
|
-
--
|
|
12
|
-
--
|
|
13
|
-
--
|
|
2
|
+
--radius: var(--radius-xl);
|
|
3
|
+
--radius-xs: 0.125rem;
|
|
4
|
+
--radius-sm: 0.25rem;
|
|
5
|
+
--radius-md: 0.375rem;
|
|
6
|
+
--radius-lg: 0.5rem;
|
|
7
|
+
--radius-xl: 0.75rem;
|
|
8
|
+
--radius-2xl: 1rem;
|
|
9
|
+
--radius-3xl: 1.5rem;
|
|
10
|
+
--radius-4xl: 2rem;
|
|
11
|
+
--radius-5xl: 2.5rem;
|
|
12
|
+
--radius-6xl: 3rem;
|
|
13
|
+
--radius-full: calc(infinity * 1px);
|
|
14
14
|
}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
:root, :host {
|
|
2
|
-
--transition:
|
|
3
|
-
--transition-
|
|
4
|
-
--transition-
|
|
5
|
-
--transition-
|
|
6
|
-
--transition-
|
|
7
|
-
--transition-
|
|
8
|
-
--transition-
|
|
9
|
-
--transition-
|
|
10
|
-
--
|
|
11
|
-
--
|
|
12
|
-
--
|
|
13
|
-
--
|
|
14
|
-
--
|
|
2
|
+
--default-transition-duration: 150ms;
|
|
3
|
+
--default-transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, outline-color, outline-offset, visibility;
|
|
4
|
+
--transition-timing-function-linear: linear;
|
|
5
|
+
--transition-timing-function-in: cubic-bezier(0.4, 0, 1, 1);
|
|
6
|
+
--transition-timing-function-out: cubic-bezier(0, 0, 0.2, 1);
|
|
7
|
+
--transition-timing-function-in-out: cubic-bezier(0.4, 0, 0.2, 1);
|
|
8
|
+
--transition-all: all var(--default-transition-duration) var(--transition-timing-function-in-out);
|
|
9
|
+
--transition-color: color var(--default-transition-duration) var(--transition-timing-function-in-out);
|
|
10
|
+
--transition-background: background var(--default-transition-duration) var(--transition-timing-function-in-out);
|
|
11
|
+
--transition-opacity: opacity var(--default-transition-duration) var(--transition-timing-function-in-out);
|
|
12
|
+
--transition-transform: transform var(--default-transition-duration) var(--transition-timing-function-in-out);
|
|
13
|
+
--transition-border: border-color var(--default-transition-duration) var(--transition-timing-function-in-out);
|
|
14
|
+
--transition-shadow: box-shadow var(--default-transition-duration) var(--transition-timing-function-in-out);
|
|
15
15
|
|
|
16
16
|
@media (prefers-reduced-motion) {
|
|
17
|
-
--duration: 0;
|
|
17
|
+
--default-transition-duration: 0;
|
|
18
18
|
}
|
|
19
19
|
}
|
package/src/base/config/z.css
CHANGED
package/src/base/config.css
CHANGED
package/src/base/defaults.css
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
::selection {
|
|
12
|
-
color: var(--color-
|
|
12
|
+
color: var(--color-primary-foreground);
|
|
13
13
|
background-color: var(--color-primary);
|
|
14
14
|
}
|
|
15
15
|
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
:where([type="radio"]:enabled),
|
|
23
23
|
:where(summary:not([aria-disabled="true"])),
|
|
24
24
|
:where([role="button"]:not([aria-disabled="true"])) {
|
|
25
|
-
cursor: var(--cursor, pointer);
|
|
25
|
+
cursor: var(--cursor-pointer, pointer);
|
|
26
26
|
user-select: none;
|
|
27
27
|
}
|
|
28
28
|
|
|
@@ -35,31 +35,29 @@
|
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
:where(hr) {
|
|
38
|
-
--
|
|
39
|
-
|
|
40
|
-
border-block-start: 1px solid color-mix(in var(--space), currentColor calc(var(--tw-border-opacity) * 100%), transparent);
|
|
41
|
-
border-radius: var(--rounded);
|
|
38
|
+
background-color: color-mix(in var(--default-color-space), currentColor 100%, transparent);
|
|
39
|
+
block-size: 1px;
|
|
42
40
|
width: 100%;
|
|
43
41
|
}
|
|
44
42
|
|
|
45
43
|
:where(code) {
|
|
46
44
|
padding: var(--spacing-xs) var(--spacing-sm);
|
|
47
45
|
background: var(--color-body-secondary);
|
|
48
|
-
border-radius: var(--
|
|
46
|
+
border-radius: var(--radius-sm);
|
|
49
47
|
color: var(--color-accent);
|
|
50
48
|
}
|
|
51
49
|
|
|
52
50
|
:where(kbd) {
|
|
53
51
|
padding: var(--spacing-xs) var(--spacing-sm);
|
|
54
52
|
background: var(--color-body-secondary);
|
|
55
|
-
border-radius: var(--
|
|
53
|
+
border-radius: var(--radius-sm);
|
|
56
54
|
border: 1px solid var(--color-body-tertiary);
|
|
57
55
|
}
|
|
58
56
|
|
|
59
57
|
:where(html) {
|
|
60
|
-
color-scheme: var(--scheme);
|
|
61
|
-
font-family: var(--font-primary);
|
|
62
|
-
font-weight: var(--font-normal);
|
|
58
|
+
color-scheme: var(--default-color-scheme);
|
|
59
|
+
font-family: var(--font-family-primary);
|
|
60
|
+
font-weight: var(--font-weight-normal);
|
|
63
61
|
block-size: 100%;
|
|
64
62
|
line-height: 1.5;
|
|
65
63
|
text-size-adjust: 100%;
|
package/src/base/keyframes.css
CHANGED
package/src/base/reset.css
CHANGED
|
@@ -44,7 +44,8 @@
|
|
|
44
44
|
:where(tr),
|
|
45
45
|
:where(ul),
|
|
46
46
|
:where(progress),
|
|
47
|
-
:where(meter)
|
|
47
|
+
:where(meter),
|
|
48
|
+
:where([popover]) {
|
|
48
49
|
all: unset;
|
|
49
50
|
display: revert;
|
|
50
51
|
}
|
|
@@ -181,9 +182,3 @@ Prevent 'sub' and 'sup' elements from affecting the line height in all browsers.
|
|
|
181
182
|
::-webkit-details-marker {
|
|
182
183
|
display: none;
|
|
183
184
|
}
|
|
184
|
-
|
|
185
|
-
/* Fix popover default colors */
|
|
186
|
-
:where([popover]) {
|
|
187
|
-
background-color: inherit;
|
|
188
|
-
color: inherit;
|
|
189
|
-
}
|
package/src/base/theme/dark.css
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
:root, :host {
|
|
2
|
-
--space: sRGB;
|
|
3
|
-
--scheme: light;
|
|
2
|
+
--default-color-space: sRGB;
|
|
3
|
+
--default-color-scheme: light;
|
|
4
4
|
--color-current: rgb(var(--color-current-rgb));
|
|
5
5
|
--color-current-foreground: rgb(var(--color-current-foreground-rgb));
|
|
6
6
|
--color-accent: rgb(var(--color-accent-rgb));
|
|
@@ -10,13 +10,13 @@
|
|
|
10
10
|
--color-main: var(--color-main-primary);
|
|
11
11
|
--color-main-foreground: rgb(var(--color-main-foreground-rgb));
|
|
12
12
|
--color-main-primary: rgb(var(--color-main-rgb));
|
|
13
|
-
--color-main-secondary: color-mix(in var(--space), var(--color-main) 75%, var(--color-main-foreground));
|
|
14
|
-
--color-main-tertiary: color-mix(in var(--space), var(--color-main) 50%, var(--color-main-foreground));
|
|
13
|
+
--color-main-secondary: color-mix(in var(--default-color-space), var(--color-main) 75%, var(--color-main-foreground));
|
|
14
|
+
--color-main-tertiary: color-mix(in var(--default-color-space), var(--color-main) 50%, var(--color-main-foreground));
|
|
15
15
|
--color-body: var(--color-body-primary);
|
|
16
16
|
--color-body-foreground: rgb(var(--color-body-foreground-rgb));
|
|
17
17
|
--color-body-primary: rgb(var(--color-body-rgb));
|
|
18
|
-
--color-body-secondary: color-mix(in var(--space), var(--color-body) 95%, var(--color-body-foreground));
|
|
19
|
-
--color-body-tertiary: color-mix(in var(--space), var(--color-body) 90%, var(--color-body-foreground));
|
|
18
|
+
--color-body-secondary: color-mix(in var(--default-color-space), var(--color-body) 95%, var(--color-body-foreground));
|
|
19
|
+
--color-body-tertiary: color-mix(in var(--default-color-space), var(--color-body) 90%, var(--color-body-foreground));
|
|
20
20
|
--color-light: rgb(var(--color-light-rgb));
|
|
21
21
|
--color-light-foreground: rgb(var(--color-light-foreground-rgb));
|
|
22
22
|
--color-dark: rgb(var(--color-dark-rgb));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
:root, :host {
|
|
2
|
-
--space: sRGB;
|
|
3
|
-
--scheme: light;
|
|
2
|
+
--default-color-space: sRGB;
|
|
3
|
+
--default-color-scheme: light;
|
|
4
4
|
--color-accent: var(--color-primary);
|
|
5
5
|
--color-accent-foreground: var(--color-primary-foreground);
|
|
6
6
|
--color-primary: #3b82f6; /* color.blue.500 */
|
|
@@ -8,13 +8,13 @@
|
|
|
8
8
|
--color-main: #171717; /* color.neutral.900 */
|
|
9
9
|
--color-main-foreground: var(--color-body);
|
|
10
10
|
--color-main-primary: var(--color-main);
|
|
11
|
-
--color-main-secondary: color-mix(in var(--space), var(--color-main) 75%, var(--color-main-foreground));
|
|
12
|
-
--color-main-tertiary: color-mix(in var(--space), var(--color-main) 50%, var(--color-main-foreground));
|
|
11
|
+
--color-main-secondary: color-mix(in var(--default-color-space), var(--color-main) 75%, var(--color-main-foreground));
|
|
12
|
+
--color-main-tertiary: color-mix(in var(--default-color-space), var(--color-main) 50%, var(--color-main-foreground));
|
|
13
13
|
--color-body: #fff; /* color.white */
|
|
14
14
|
--color-body-foreground: var(--color-main);
|
|
15
15
|
--color-body-primary: var(--color-body);
|
|
16
|
-
--color-body-secondary: color-mix(in var(--space), var(--color-body) 95%, var(--color-body-foreground));
|
|
17
|
-
--color-body-tertiary: color-mix(in var(--space), var(--color-body) 90%, var(--color-body-foreground));
|
|
16
|
+
--color-body-secondary: color-mix(in var(--default-color-space), var(--color-body) 95%, var(--color-body-foreground));
|
|
17
|
+
--color-body-tertiary: color-mix(in var(--default-color-space), var(--color-body) 90%, var(--color-body-foreground));
|
|
18
18
|
--color-light: #fff; /* color.white */
|
|
19
19
|
--color-light-foreground: var(--color-dark);
|
|
20
20
|
--color-dark: #171717; /* color.neutral.900 */
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
.badge {
|
|
2
|
+
&:where(.bordered) {
|
|
3
|
+
--badge-border-color: var(--color-accent);
|
|
4
|
+
--badge-border-width: 1px;
|
|
5
|
+
--tw-border-opacity: 1;
|
|
6
|
+
--tw-border-mix: transparent;
|
|
7
|
+
|
|
8
|
+
border: var(--badge-border-width) solid color-mix(in var(--default-color-space), var(--badge-border-color) calc(var(--tw-border-opacity) * 100%), var(--tw-border-mix));
|
|
9
|
+
padding-inline: calc(var(--badge-px) - var(--badge-border-width));
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
&:is(.bordered) {
|
|
13
|
+
--badge-color: var(--color-accent);
|
|
14
|
+
--tw-bg-opacity: 0;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
.badge {
|
|
2
|
+
--badge-bg: var(--color-accent);
|
|
3
|
+
--badge-color: var(--color-accent-foreground);
|
|
4
|
+
--tw-bg-opacity: 1;
|
|
5
|
+
--tw-text-opacity: 1;
|
|
6
|
+
--tw-bg-mix: transparent;
|
|
7
|
+
--tw-text-mix: transparent;
|
|
8
|
+
|
|
9
|
+
width: var(--badge-width);
|
|
10
|
+
height: var(--badge-height);
|
|
11
|
+
padding: var(--badge-py) var(--badge-px);
|
|
12
|
+
border-radius: var(--badge-border-radius);
|
|
13
|
+
font-family: var(--badge-font-family);
|
|
14
|
+
font-weight: var(--badge-font-weight);
|
|
15
|
+
font-size: var(--badge-font-size);
|
|
16
|
+
letter-spacing: var(--badge-letter-spacing);
|
|
17
|
+
background-color: color-mix(in var(--default-color-space), var(--badge-bg) calc(var(--tw-bg-opacity) * 100%), var(--tw-bg-mix));
|
|
18
|
+
color: color-mix(in var(--default-color-space), var(--badge-color) calc(var(--tw-text-opacity) * 100%), var(--tw-text-mix));
|
|
19
|
+
gap: var(--badge-gap);
|
|
20
|
+
display: inline-flex;
|
|
21
|
+
text-align: center;
|
|
22
|
+
align-items: center;
|
|
23
|
+
justify-content: center;
|
|
24
|
+
line-height: 1;
|
|
25
|
+
flex-shrink: 0;
|
|
26
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
:root, :host {
|
|
2
|
-
--
|
|
3
|
-
--
|
|
4
|
-
--
|
|
2
|
+
--breadcrumb-marker-size: 0.875rem;
|
|
3
|
+
--breadcrumb-marker: var(--mask-chevron-right);
|
|
4
|
+
--breadcrumb-gap: var(--spacing-xs);
|
|
5
5
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
.
|
|
1
|
+
.breadcrumb {
|
|
2
2
|
> :where(ul, ol) {
|
|
3
3
|
&, > li {
|
|
4
4
|
display: flex;
|
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
> li {
|
|
9
9
|
&:not(:last-child)::after {
|
|
10
10
|
content: "";
|
|
11
|
-
mask: var(--
|
|
11
|
+
mask: var(--breadcrumb-marker);
|
|
12
12
|
background-color: currentColor;
|
|
13
|
-
margin-inline: var(--
|
|
14
|
-
width: var(--
|
|
15
|
-
height: var(--
|
|
13
|
+
margin-inline: var(--breadcrumb-gap);
|
|
14
|
+
width: var(--breadcrumb-marker-size);
|
|
15
|
+
height: var(--breadcrumb-marker-size);
|
|
16
16
|
flex-shrink: 0;
|
|
17
17
|
}
|
|
18
18
|
}
|