winduum 1.2.1 → 2.0.0-next.10
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/main.css +1 -1
- package/dist/tailwind.css +1 -1
- package/package.json +15 -15
- package/plugin/index.cjs +81 -43
- package/plugin/index.js +73 -22
- package/plugin/utilities/common.js +4 -4
- package/plugin/utilities/dot.js +4 -5
- package/src/base/breakpoints.css +10 -10
- 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 +10 -12
- package/src/base/keyframes.css +13 -1
- 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 +6 -0
- package/src/components/badge/circle.css +5 -0
- package/src/components/badge/default.css +42 -0
- package/src/{ui → components}/badge/index.css +1 -1
- package/src/components/badge/lg.css +3 -0
- package/src/components/badge/muted.css +4 -0
- package/src/components/badge/props/default.css +9 -0
- package/src/components/badge/readme.md +37 -0
- package/src/components/badge/sm.css +4 -0
- package/src/components/badge/square.css +4 -0
- package/src/components/breadcrumb/default.css +7 -7
- package/src/components/breadcrumb/index.css +1 -1
- package/src/components/breadcrumb/props/default.css +5 -0
- package/src/components/breadcrumb/readme.md +1 -1
- 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.css +4 -6
- package/src/components/card/index.css +1 -1
- package/src/components/card/props/default.css +6 -0
- package/src/components/card/readme.md +1 -1
- package/src/components/carousel/content.css +2 -2
- package/src/components/carousel/default.css +1 -1
- package/src/components/carousel/index.d.ts +3 -3
- package/src/components/carousel/index.js +13 -11
- package/src/components/check/default.css +67 -0
- package/src/{ui/switch → components/check}/index.css +1 -1
- package/src/components/check/interactive.css +56 -0
- package/src/components/check/invalid.css +9 -0
- package/src/components/check/props/default.css +13 -0
- package/src/{ui/color → components/check}/readme.md +8 -9
- package/src/components/color/default.css +36 -0
- package/src/components/color/index.css +3 -0
- package/src/components/color/interactive.css +36 -0
- package/src/components/color/props/default.css +7 -0
- package/src/{ui/title → components/color}/readme.md +7 -8
- package/src/components/compare/default.css +17 -18
- package/src/components/compare/index.js +2 -2
- package/src/components/control/color.css +24 -0
- package/src/components/control/default.css +74 -0
- package/src/components/control/file.css +27 -0
- package/src/components/control/floating-interactive.css +13 -0
- package/src/components/control/floating.css +36 -0
- package/src/components/control/icon.css +32 -0
- package/src/{ui → components}/control/index.css +5 -6
- package/src/components/control/interactive.css +19 -0
- package/src/components/control/invalid.css +10 -0
- package/src/components/control/props/color.css +5 -0
- package/src/components/control/props/default.css +16 -0
- package/src/components/control/props/floating.css +4 -0
- package/src/components/control/props/icon.css +4 -0
- package/src/components/control/props/select.css +4 -0
- package/src/components/control/readme.md +43 -0
- package/src/{ui → components}/control/select-multiple.css +2 -2
- package/src/components/control/select.css +23 -0
- package/src/components/dialog/content.css +7 -7
- package/src/components/dialog/default.css +14 -12
- package/src/components/dialog/index.css +2 -2
- package/src/components/dialog/index.d.ts +4 -19
- package/src/components/dialog/index.js +24 -83
- package/src/components/dialog/props/content.css +5 -0
- package/src/components/dialog/props/default.css +6 -0
- package/src/components/dialog/readme.md +2 -2
- package/src/components/drawer/content.css +4 -4
- package/src/components/drawer/default.css +9 -6
- package/src/components/drawer/index.css +2 -2
- package/src/components/drawer/index.js +3 -3
- package/src/components/drawer/props/content.css +7 -0
- package/src/components/drawer/props/default.css +3 -0
- package/src/components/drawer/readme.md +2 -2
- package/src/components/field/default.css +6 -6
- package/src/components/form/index.js +5 -5
- package/src/components/group/default.css +42 -0
- package/src/{ui → components}/group/readme.md +6 -6
- package/src/{ui → components}/group/vertical.css +2 -2
- package/src/components/heading/default.css +8 -0
- package/src/{ui → components}/heading/index.css +1 -1
- package/src/components/heading/lg.css +3 -0
- package/src/components/heading/props/default.css +6 -0
- package/src/{ui/check → components/heading}/readme.md +8 -9
- package/src/components/heading/sm.css +3 -0
- package/src/{ui → components}/image/avatar.css +3 -3
- package/src/{ui → components}/image/default.css +2 -2
- package/src/{ui/notice → components/image}/readme.md +6 -6
- package/src/components/index.css +18 -0
- package/src/components/info/default.css +8 -0
- package/src/components/info/index.css +2 -0
- package/src/components/info/props/default.css +4 -0
- package/src/{ui/rating → components/info}/readme.md +6 -7
- package/src/components/label/default.css +8 -0
- package/src/components/label/index.css +2 -0
- package/src/components/label/props/default.css +4 -0
- package/src/{ui → components}/label/readme.md +6 -6
- package/src/components/link/default.css +8 -0
- package/src/components/link/index.css +3 -0
- package/src/components/link/interactive.css +9 -0
- package/src/components/link/props/default.css +4 -0
- package/src/{ui → components}/link/readme.md +7 -7
- package/src/components/notice/default.css +21 -0
- package/src/components/notice/index.css +2 -0
- package/src/components/notice/props/default.css +8 -0
- package/src/{ui/image → components/notice}/readme.md +6 -6
- package/src/components/pagination/default.css +2 -2
- package/src/components/popover/content.css +18 -19
- package/src/components/popover/default.css +1 -1
- package/src/components/popover/index.css +1 -1
- package/src/components/popover/index.d.ts +5 -1
- package/src/components/popover/index.js +11 -9
- package/src/components/popover/props/content.css +8 -0
- package/src/components/popover/readme.md +1 -1
- package/src/components/progress/default.css +46 -0
- package/src/{ui → components}/progress/index.css +1 -1
- package/src/components/progress/lg.css +3 -0
- package/src/{ui → components}/progress/meter.css +7 -7
- package/src/components/progress/props/default.css +6 -0
- package/src/components/progress/readme.md +33 -0
- package/src/components/progress/sm.css +3 -0
- package/src/components/range/default.css +99 -0
- package/src/{ui → components}/range/index.css +1 -1
- package/src/{ui → components}/range/index.js +2 -2
- package/src/components/range/multi.css +22 -0
- package/src/components/range/props/default.css +9 -0
- package/src/{ui → components}/range/readme.md +8 -8
- package/src/{ui → components}/range/vertical.css +3 -3
- package/src/{ui → components}/rating/default.css +11 -11
- package/src/{ui → components}/rating/index.css +1 -1
- package/src/components/rating/invalid.css +5 -0
- package/src/components/rating/props/default.css +8 -0
- package/src/components/rating/readme.md +31 -0
- package/src/components/switch/default.css +43 -0
- package/src/{ui/check → components/switch}/index.css +1 -2
- package/src/components/switch/interactive.css +43 -0
- package/src/components/switch/invalid.css +6 -0
- package/src/components/switch/props/default.css +17 -0
- package/src/{ui/progress → components/switch}/readme.md +8 -9
- package/src/components/table/default.css +11 -11
- package/src/components/table/index.css +1 -2
- package/src/components/table/interactive.css +14 -14
- package/src/components/table/props/default.css +8 -0
- package/src/components/table/readme.md +1 -2
- package/src/components/tabs/index.css +1 -1
- package/src/components/tabs/list.css +8 -0
- package/src/components/tabs/readme.md +1 -1
- package/src/components/text/default.css +223 -0
- package/src/components/text/index.css +2 -0
- package/src/components/text/props/default.css +9 -0
- package/src/{ui/info → components/text}/readme.md +6 -6
- package/src/components/title/default.css +8 -0
- package/src/{ui → components}/title/index.css +1 -1
- package/src/components/title/lg.css +3 -0
- package/src/components/title/props/default.css +5 -0
- package/src/{ui/heading → components/title}/readme.md +9 -8
- package/src/components/title/sm.css +3 -0
- package/src/components/toast/content.css +16 -15
- package/src/components/toast/default.css +8 -8
- package/src/components/toast/index.css +2 -2
- package/src/components/toast/props/content.css +7 -0
- package/src/components/toast/props/default.css +4 -0
- package/src/components/toast/readme.md +2 -2
- package/src/components/toaster/default.css +4 -4
- package/src/components/toaster/index.css +1 -1
- package/src/components/toaster/index.js +8 -8
- package/src/components/toaster/props/default.css +4 -0
- package/src/components/toaster/readme.md +1 -1
- package/src/components/tooltip/default.css +15 -15
- package/src/components/tooltip/index.css +1 -1
- package/src/components/tooltip/props/default.css +12 -0
- package/src/components/tooltip/readme.md +2 -2
- package/src/main.css +0 -1
- package/src/test.css +7 -0
- 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 +13 -4
- package/src/utilities/ripple/index.css +9 -6
- package/src/utilities/skeleton/default.css +8 -1
- package/src/utilities/skeleton/index.css +1 -1
- package/src/utilities/skeleton/props/default.css +5 -0
- package/src/utilities/swap/default.css +6 -6
- package/src/utilities/underline.css +3 -3
- package/types/index.d.ts +39 -24
- 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/components/breadcrumb/default-props.css +0 -5
- package/src/components/card/default-props.css +0 -4
- package/src/components/dialog/content-props.css +0 -5
- package/src/components/dialog/default-props.css +0 -6
- package/src/components/drawer/content-props.css +0 -6
- package/src/components/drawer/default-props.css +0 -3
- package/src/components/popover/content-props.css +0 -8
- package/src/components/table/default-props.css +0 -8
- package/src/components/table/interactive-props.css +0 -4
- package/src/components/tabs/default.css +0 -8
- package/src/components/toast/content-props.css +0 -7
- package/src/components/toast/default-props.css +0 -4
- package/src/components/toaster/default-props.css +0 -4
- package/src/components/tooltip/default-props.css +0 -12
- 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/readme.md +0 -37
- 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/default.css +0 -48
- package/src/ui/color/index.css +0 -4
- package/src/ui/color/interactive-props.css +0 -3
- package/src/ui/color/interactive.css +0 -30
- 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/floating.css +0 -36
- 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/readme.md +0 -44
- package/src/ui/control/select-props.css +0 -4
- package/src/ui/control/select.css +0 -23
- package/src/ui/group/default.css +0 -42
- 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/info/index.css +0 -2
- package/src/ui/label/default-props.css +0 -4
- package/src/ui/label/default.css +0 -8
- package/src/ui/label/index.css +0 -2
- package/src/ui/link/default-props.css +0 -4
- package/src/ui/link/default.css +0 -8
- package/src/ui/link/index.css +0 -4
- 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/notice/index.css +0 -2
- package/src/ui/progress/default-props.css +0 -4
- package/src/ui/progress/default.css +0 -47
- 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/rating/invalid.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/switch/readme.md +0 -32
- package/src/ui/text/default-props.css +0 -9
- package/src/ui/text/default.css +0 -193
- package/src/ui/text/index.css +0 -2
- package/src/ui/text/readme.md +0 -30
- 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}/group/index.css +0 -0
- /package/src/{ui → components}/image/index.css +0 -0
- /package/src/{ui → components}/range/index.d.ts +0 -0
- /package/src/utilities/container/{default-props.css → props/default.css} +0 -0
|
@@ -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,42 @@
|
|
|
1
|
+
.x-badge {
|
|
2
|
+
--x-badge-background-color: var(--color-accent);
|
|
3
|
+
--x-badge-border-color: var(--color-accent);
|
|
4
|
+
--x-badge-color: var(--color-accent-foreground);
|
|
5
|
+
|
|
6
|
+
inline-size: var(--x-badge-width);
|
|
7
|
+
block-size: var(--x-badge-height);
|
|
8
|
+
padding: var(--x-badge-padding-block) var(--x-badge-padding-inline);
|
|
9
|
+
padding-inline: calc(var(--x-badge-padding-inline) - var(--x-badge-border-width));
|
|
10
|
+
border-radius: var(--x-badge-border-radius);
|
|
11
|
+
font-family: var(--x-badge-font-family);
|
|
12
|
+
font-weight: var(--x-badge-font-weight);
|
|
13
|
+
font-size: var(--x-badge-font-size);
|
|
14
|
+
letter-spacing: var(--x-badge-letter-spacing);
|
|
15
|
+
background-color:
|
|
16
|
+
color-mix(
|
|
17
|
+
in var(--x-badge-background-color-space, srgb),
|
|
18
|
+
var(--x-badge-background-color) var(--x-badge-background-color-opacity, 100%),
|
|
19
|
+
var(--x-badge-background-color-mix, transparent)
|
|
20
|
+
);
|
|
21
|
+
color:
|
|
22
|
+
color-mix(
|
|
23
|
+
in var(--x-badge-color-space, srgb),
|
|
24
|
+
var(--x-badge-color) var(--x-badge-color-opacity, 100%),
|
|
25
|
+
var(--x-badge-color-mix, transparent)
|
|
26
|
+
);
|
|
27
|
+
border:
|
|
28
|
+
var(--x-badge-border-width)
|
|
29
|
+
solid
|
|
30
|
+
color-mix(
|
|
31
|
+
in var(--x-badge-border-color-space, srgb),
|
|
32
|
+
var(--x-badge-border-color) var(--x-badge-border-color-opacity, 100%),
|
|
33
|
+
var(--x-badge-border-color-mix, transparent)
|
|
34
|
+
);
|
|
35
|
+
gap: var(--x-badge-gap);
|
|
36
|
+
display: inline-flex;
|
|
37
|
+
text-align: center;
|
|
38
|
+
align-items: center;
|
|
39
|
+
justify-content: center;
|
|
40
|
+
line-height: 1;
|
|
41
|
+
flex-shrink: 0;
|
|
42
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
:root, :host {
|
|
2
|
+
--x-badge-border-width: 0px;
|
|
3
|
+
--x-badge-border-radius: var(--radius-lg);
|
|
4
|
+
--x-badge-font-size: var(--font-size-xs);
|
|
5
|
+
--x-badge-gap: var(--spacing-xs);
|
|
6
|
+
--x-badge-height: 1.5rem;
|
|
7
|
+
--x-badge-padding-block: 0;
|
|
8
|
+
--x-badge-padding-inline: 0.5rem;
|
|
9
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# [Badge](https://winduum.dev/docs/components/badge.html)
|
|
2
|
+
|
|
3
|
+
## Installation
|
|
4
|
+
```shell
|
|
5
|
+
npm i winduum
|
|
6
|
+
```
|
|
7
|
+
Learn more how to set up Winduum [here](https://winduum.dev/docs/).
|
|
8
|
+
Include CSS either globally or to your component _([you can't use TailwindCSS layers in per-component CSS](https://tailwindcss.com/docs/adding-custom-styles#layers-and-per-component-css))_
|
|
9
|
+
|
|
10
|
+
```css
|
|
11
|
+
@import "winduum/src/components/badge/index.css" layer(components);
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
or modular (you can use your own props or CSS)
|
|
15
|
+
|
|
16
|
+
```css
|
|
17
|
+
@import "winduum/src/components/badge/props/default.css" layer(components);
|
|
18
|
+
@import "winduum/src/components/badge/default.css" layer(components);
|
|
19
|
+
@import "winduum/src/components/badge/sm.css" layer(components);
|
|
20
|
+
@import "winduum/src/components/badge/lg.css" layer(components);
|
|
21
|
+
@import "winduum/src/components/badge/bordered.css" layer(components);
|
|
22
|
+
@import "winduum/src/components/badge/muted.css" layer(components);
|
|
23
|
+
@import "winduum/src/components/badge/square.css" layer(components);
|
|
24
|
+
@import "winduum/src/components/badge/circle.css" layer(components);
|
|
25
|
+
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### Local imports
|
|
29
|
+
By default, imports are directly from `npm` so you can leverage updates.
|
|
30
|
+
You can also copy and paste the code from this directory to your project and remap the imports to local.
|
|
31
|
+
|
|
32
|
+
```css
|
|
33
|
+
@import "@/components/badge/assets/index.css" layer(components);
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### Docs
|
|
37
|
+
Visit [docs](https://winduum.dev/docs/components/badge.html) to learn more about usage examples.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
.
|
|
1
|
+
.x-breadcrumb {
|
|
2
2
|
> :where(ul, ol) {
|
|
3
3
|
&, > li {
|
|
4
4
|
display: flex;
|
|
@@ -7,13 +7,13 @@
|
|
|
7
7
|
|
|
8
8
|
> li {
|
|
9
9
|
&:not(:last-child)::after {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
height: var(--c-breadcrumb-marker-size);
|
|
10
|
+
mask: var(--x-breadcrumb-marker);
|
|
11
|
+
background-color: var(--x-breadcrumb-marker-background-color, currentColor);
|
|
12
|
+
margin-inline: var(--x-breadcrumb-gap);
|
|
13
|
+
inline-size: var(--x-breadcrumb-marker-size);
|
|
14
|
+
block-size: var(--x-breadcrumb-marker-size);
|
|
16
15
|
flex-shrink: 0;
|
|
16
|
+
content: "";
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
}
|
|
@@ -14,8 +14,8 @@ Include CSS either globally or to your component _([you can't use TailwindCSS la
|
|
|
14
14
|
or modular (you can use your own props or CSS)
|
|
15
15
|
|
|
16
16
|
```css
|
|
17
|
+
@import "winduum/src/components/breadcrumb/props/default.css" layer(components);
|
|
17
18
|
@import "winduum/src/components/breadcrumb/default.css" layer(components);
|
|
18
|
-
@import "winduum/src/components/breadcrumb/default-props.css" layer(components);
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
### Local imports
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
.x-button:is(.bordered) {
|
|
2
|
+
--x-button-disabled-background-color-opacity: 0%;
|
|
3
|
+
--x-button-disabled-background-color-mix: transparent;
|
|
4
|
+
--x-button-disabled-border-color-opacity: 30%;
|
|
5
|
+
--x-button-disabled-color: var(--color-accent);
|
|
6
|
+
--x-button-active-background-color-opacity: 20%;
|
|
7
|
+
--x-button-active-background-color-mix: transparent;
|
|
8
|
+
--x-button-active-border-color-opacity: 30%;
|
|
9
|
+
--x-button-active-color: var(--color-accent);
|
|
10
|
+
--x-button-hover-background-color-opacity: 10%;
|
|
11
|
+
--x-button-hover-background-color-mix: transparent;
|
|
12
|
+
--x-button-hover-border-color-opacity: 30%;
|
|
13
|
+
--x-button-hover-color: var(--color-accent);
|
|
14
|
+
--x-button-focus-outline-offset: 0px;
|
|
15
|
+
--x-button-border-width: 1px;
|
|
16
|
+
--x-button-border-color-opacity: 30%;
|
|
17
|
+
--x-button-background-color-opacity: 0%;
|
|
18
|
+
--x-button-color: var(--color-accent);
|
|
19
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
.x-button {
|
|
2
|
+
--x-button-background-color: var(--color-accent);
|
|
3
|
+
--x-button-border-color: var(--color-accent);
|
|
4
|
+
--x-button-color: var(--color-accent-foreground);
|
|
5
|
+
|
|
6
|
+
inline-size: var(--x-button-width);
|
|
7
|
+
block-size: var(--x-button-height);
|
|
8
|
+
padding: var(--x-button-padding-block) var(--x-button-padding-inline);
|
|
9
|
+
padding-inline: calc(var(--x-button-padding-inline) - var(--x-button-border-width));
|
|
10
|
+
border-radius: var(--x-button-border-radius);
|
|
11
|
+
font-family: var(--x-button-font-family);
|
|
12
|
+
font-size: var(--x-button-font-size);
|
|
13
|
+
font-weight: var(--x-button-font-weight);
|
|
14
|
+
letter-spacing: var(--x-button-letter-spacing);
|
|
15
|
+
background-color:
|
|
16
|
+
color-mix(
|
|
17
|
+
in var(--x-button-background-color-space, srgb),
|
|
18
|
+
var(--x-button-background-color) var(--x-button-background-color-opacity, 100%),
|
|
19
|
+
var(--x-button-background-color-mix, transparent)
|
|
20
|
+
);
|
|
21
|
+
color:
|
|
22
|
+
color-mix(
|
|
23
|
+
in var(--x-button-color-space, srgb),
|
|
24
|
+
var(--x-button-color) var(--x-button-color-opacity, 100%),
|
|
25
|
+
var(--x-button-color-mix, transparent)
|
|
26
|
+
);
|
|
27
|
+
border:
|
|
28
|
+
var(--x-button-border-width)
|
|
29
|
+
solid
|
|
30
|
+
color-mix(
|
|
31
|
+
in var(--x-button-border-color-space, srgb),
|
|
32
|
+
var(--x-button-border-color) var(--x-button-border-color-opacity, 100%),
|
|
33
|
+
var(--x-button-border-color-mix, transparent)
|
|
34
|
+
);
|
|
35
|
+
outline:
|
|
36
|
+
var(--x-button-outline-width)
|
|
37
|
+
solid
|
|
38
|
+
color-mix(
|
|
39
|
+
in var(--x-button-outline-color-space, srgb),
|
|
40
|
+
var(--x-button-outline-color, transparent) var(--x-button-outline-color-opacity, 100%),
|
|
41
|
+
var(--x-button-outline-color-mix, transparent)
|
|
42
|
+
);
|
|
43
|
+
outline-offset: var(--x-button-outline-offset);
|
|
44
|
+
gap: var(--x-button-gap);
|
|
45
|
+
user-select: none;
|
|
46
|
+
overflow: clip;
|
|
47
|
+
display: inline-flex;
|
|
48
|
+
text-align: center;
|
|
49
|
+
align-items: center;
|
|
50
|
+
justify-content: center;
|
|
51
|
+
position: relative;
|
|
52
|
+
line-height: 1;
|
|
53
|
+
flex-shrink: 0;
|
|
54
|
+
z-index: 0;
|
|
55
|
+
|
|
56
|
+
:where(*) {
|
|
57
|
+
pointer-events: none;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
&:where(input)::after {
|
|
61
|
+
content: attr(aria-label);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
.x-button:is(.ghosted) {
|
|
2
|
+
--x-button-disabled-background-color-opacity: 0%;
|
|
3
|
+
--x-button-disabled-background-color-mix: transparent;
|
|
4
|
+
--x-button-disabled-color: var(--color-accent);
|
|
5
|
+
--x-button-active-background-color-opacity: 20%;
|
|
6
|
+
--x-button-active-background-color-mix: transparent;
|
|
7
|
+
--x-button-active-color: var(--color-accent);
|
|
8
|
+
--x-button-hover-background-color-opacity: 10%;
|
|
9
|
+
--x-button-hover-background-color-mix: transparent;
|
|
10
|
+
--x-button-hover-color: var(--color-accent);
|
|
11
|
+
--x-button-focus-outline-offset: -2px;
|
|
12
|
+
--x-button-color: var(--color-accent);
|
|
13
|
+
--x-button-background-color-opacity: 0%;
|
|
14
|
+
}
|
|
@@ -1,16 +1,11 @@
|
|
|
1
|
+
@import "props/default.css";
|
|
2
|
+
@import "props/interactive.css";
|
|
1
3
|
@import "default.css";
|
|
2
|
-
@import "default-props.css";
|
|
3
4
|
@import "interactive.css";
|
|
4
|
-
@import "interactive-props.css";
|
|
5
5
|
@import "sm.css";
|
|
6
6
|
@import "lg.css";
|
|
7
|
-
@import "loading.css";
|
|
8
|
-
@import "loading-props.css";
|
|
9
|
-
@import "wide.css";
|
|
10
7
|
@import "bordered.css";
|
|
11
8
|
@import "ghosted.css";
|
|
12
|
-
@import "gradient.css";
|
|
13
|
-
@import "gradient-bordered.css";
|
|
14
9
|
@import "muted.css";
|
|
15
10
|
@import "raised.css";
|
|
16
11
|
@import "fill.css";
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
.x-button {
|
|
2
|
+
transition-property: var(--default-transition-property);
|
|
3
|
+
transition-timing-function: var(--transition-timing-function-in-out);
|
|
4
|
+
transition-duration: var(--default-transition-duration);
|
|
5
|
+
|
|
6
|
+
&:where(.accent-primary),
|
|
7
|
+
&:where(.accent-body),
|
|
8
|
+
&:where(.accent-light),
|
|
9
|
+
&:where(.accent-dark) {
|
|
10
|
+
--x-button-hover-background-color-mix: var(--color-accent-foreground);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
&:is(button, input, label, :any-link, [role="button"]) {
|
|
14
|
+
&:hover {
|
|
15
|
+
--x-button-background-color: var(--x-button-hover-background-color, var(--color-accent));
|
|
16
|
+
--x-button-background-color-mix: var(--x-button-hover-background-color-mix);
|
|
17
|
+
--x-button-background-color-opacity: var(--x-button-hover-background-color-opacity);
|
|
18
|
+
--x-button-border-color: var(--x-button-hover-border-color, var(--color-accent));
|
|
19
|
+
--x-button-border-color-mix: var(--x-button-hover-border-color-mix, transparent);
|
|
20
|
+
--x-button-border-color-opacity: var(--x-button-hover-border-color-opacity, 100%);
|
|
21
|
+
--x-button-color: var(--x-button-hover-color, var(--color-accent-foreground));
|
|
22
|
+
--x-button-color-mix: var(--x-button-hover-color-mix, transparent);
|
|
23
|
+
--x-button-color-opacity: var(--x-button-hover-color-opacity, 100%);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&:focus {
|
|
27
|
+
--x-button-outline-offset: var(--x-button-focus-outline-offset);
|
|
28
|
+
--x-button-outline-color: var(--x-button-focus-outline-color, var(--color-accent));
|
|
29
|
+
--x-button-outline-color-opacity: var(--x-button-focus-outline-color-opacity);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&:active, &:checked, &.active {
|
|
33
|
+
--x-button-background-color: var(--x-button-hover-background-color, var(--color-accent));
|
|
34
|
+
--x-button-background-color-mix: var(--x-button-active-background-color-mix);
|
|
35
|
+
--x-button-background-color-opacity: var(--x-button-active-background-color-opacity);
|
|
36
|
+
--x-button-border-color: var(--x-button-active-border-color, var(--color-accent));
|
|
37
|
+
--x-button-border-color-mix: var(--x-button-active-border-color-mix, transparent);
|
|
38
|
+
--x-button-border-color-opacity: var(--x-button-active-border-color-opacity, 100%);
|
|
39
|
+
--x-button-color: var(--x-button-active-color, var(--color-accent-foreground));
|
|
40
|
+
--x-button-color-mix: var(--x-button-active-color-mix, transparent);
|
|
41
|
+
--x-button-color-opacity: var(--x-button-active-color-opacity, 100%);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&:disabled {
|
|
45
|
+
--x-button-background-color: var(--x-button-disabled-background-color, var(--color-accent));
|
|
46
|
+
--x-button-background-color-mix: var(--x-button-disabled-background-color-mix, transparent);
|
|
47
|
+
--x-button-background-color-opacity: var(--x-button-disabled-background-color-opacity, 50%);
|
|
48
|
+
--x-button-border-color: var(--x-button-disabled-border-color, var(--color-accent));
|
|
49
|
+
--x-button-border-color-mix: var(--x-button-disabled-border-color-mix, transparent);
|
|
50
|
+
--x-button-border-color-opacity: var(--x-button-disabled-border-color-opacity, 50%);
|
|
51
|
+
--x-button-color: var(--x-button-disabled-color, var(--color-accent-foreground));
|
|
52
|
+
--x-button-color-mix: var(--x-button-disabled-color-mix, transparent);
|
|
53
|
+
--x-button-color-opacity: var(--x-button-disabled-color-opacity, 50%);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
.x-button:is(.muted) {
|
|
2
|
+
--x-button-disabled-background-color-opacity: 5%;
|
|
3
|
+
--x-button-disabled-background-color-mix: transparent;
|
|
4
|
+
--x-button-disabled-color: var(--color-accent);
|
|
5
|
+
--x-button-active-background-color-opacity: 30%;
|
|
6
|
+
--x-button-active-background-color-mix: transparent;
|
|
7
|
+
--x-button-active-color: var(--color-accent);
|
|
8
|
+
--x-button-hover-background-color-opacity: 20%;
|
|
9
|
+
--x-button-hover-background-color-mix: transparent;
|
|
10
|
+
--x-button-hover-color: var(--color-accent);
|
|
11
|
+
--x-button-focus-outline-offset: -2px;
|
|
12
|
+
--x-button-color: var(--color-accent);
|
|
13
|
+
--x-button-background-color-opacity: 10%;
|
|
14
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
:root, :host {
|
|
2
|
+
--x-button-outline-width: 2px;
|
|
3
|
+
--x-button-border-width: 0px;
|
|
4
|
+
--x-button-border-radius: var(--radius);
|
|
5
|
+
--x-button-font-size: var(--font-size-sm);
|
|
6
|
+
--x-button-font-weight: var(--font-weight-medium);
|
|
7
|
+
--x-button-gap: var(--spacing-sm);
|
|
8
|
+
--x-button-height: 2.25rem;
|
|
9
|
+
--x-button-padding-block: 0.375rem;
|
|
10
|
+
--x-button-padding-inline: 0.75rem;
|
|
11
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
:root, :host {
|
|
2
|
+
--x-button-hover-background-color-mix: var(--color-dark);
|
|
3
|
+
--x-button-hover-background-color-opacity: 80%;
|
|
4
|
+
--x-button-focus-outline-offset: 2px;
|
|
5
|
+
--x-button-focus-outline-color-opacity: 50%;
|
|
6
|
+
--x-button-active-background-color-mix: var(--color-dark);
|
|
7
|
+
--x-button-active-background-color-opacity: 90%;
|
|
8
|
+
--x-button-disabled-background-color-opacity: 75%;
|
|
9
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# [Button](https://winduum.dev/docs/components/button.html)
|
|
2
|
+
|
|
3
|
+
## Installation
|
|
4
|
+
```shell
|
|
5
|
+
npm i winduum
|
|
6
|
+
```
|
|
7
|
+
Learn more how to set up Winduum [here](https://winduum.dev/docs/).
|
|
8
|
+
Include CSS either globally or to your component _([you can't use TailwindCSS layers in per-component CSS](https://tailwindcss.com/docs/adding-custom-styles#layers-and-per-component-css))_
|
|
9
|
+
|
|
10
|
+
```css
|
|
11
|
+
@import "winduum/src/button/index.css" layer(components);
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
or modular (you can use your own props or CSS)
|
|
15
|
+
|
|
16
|
+
```css
|
|
17
|
+
@import "winduum/src/button/props/default.css" layer(components);
|
|
18
|
+
@import "winduum/src/button/props/interactive.css" layer(components);
|
|
19
|
+
@import "winduum/src/button/default.css" layer(components);
|
|
20
|
+
@import "winduum/src/button/interactive.css" layer(components);
|
|
21
|
+
@import "winduum/src/button/sm.css" layer(components);
|
|
22
|
+
@import "winduum/src/button/lg.css" layer(components);
|
|
23
|
+
@import "winduum/src/button/bordered.css" layer(components);
|
|
24
|
+
@import "winduum/src/button/ghosted.css" layer(components);
|
|
25
|
+
@import "winduum/src/button/fill.css" layer(components);
|
|
26
|
+
@import "winduum/src/button/muted.css" layer(components);
|
|
27
|
+
@import "winduum/src/button/raised.css" layer(components);
|
|
28
|
+
@import "winduum/src/button/square.css" layer(components);
|
|
29
|
+
@import "winduum/src/button/circle.css" layer(components);
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
### Local imports
|
|
34
|
+
By default, imports are directly from `npm` so you can leverage updates.
|
|
35
|
+
You can also copy and paste the code from this directory to your project and remap the imports to local.
|
|
36
|
+
|
|
37
|
+
```css
|
|
38
|
+
@import "@/components/button/assets/index.css" layer(components);
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Docs
|
|
42
|
+
Visit [docs](https://winduum.dev/docs/components/button.html) to learn more about usage examples.
|
|
43
|
+
|
|
44
|
+
### Frameworks
|
|
45
|
+
* [winduum/winduum-vue](https://github.com/winduum/winduum-vue/blob/main/src/button)
|
|
46
|
+
* [winduum/winduum-react](https://github.com/winduum/winduum-react/blob/main/src/button)
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
.
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
border-radius: var(--rounded-2xl);
|
|
6
|
-
padding: var(--c-card-p);
|
|
1
|
+
.x-card {
|
|
2
|
+
background-color: var(--x-card-background-color);
|
|
3
|
+
border-radius: var(--x-card-border-radius);
|
|
4
|
+
padding: var(--x-card-padding-block) var(--x-card-padding-inline);
|
|
7
5
|
display: flex;
|
|
8
6
|
flex-direction: column;
|
|
9
7
|
}
|
|
@@ -14,8 +14,8 @@ Include CSS either globally or to your component _([you can't use TailwindCSS la
|
|
|
14
14
|
or modular (you can use your own props or CSS)
|
|
15
15
|
|
|
16
16
|
```css
|
|
17
|
+
@import "winduum/src/components/card/props/default.css" layer(components);
|
|
17
18
|
@import "winduum/src/components/card/default.css" layer(components);
|
|
18
|
-
@import "winduum/src/components/card/default-props.css" layer(components);
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
### Local imports
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
.
|
|
1
|
+
.x-carousel-content {
|
|
2
2
|
display: flex;
|
|
3
3
|
overflow: auto;
|
|
4
4
|
user-select: none;
|
|
5
5
|
scrollbar-width: none;
|
|
6
6
|
-webkit-overflow-scrolling: touch;
|
|
7
|
-
overscroll-behavior-x: none;
|
|
8
7
|
position: relative;
|
|
9
8
|
scroll-behavior: smooth;
|
|
10
9
|
scroll-snap-type: x mandatory;
|
|
@@ -22,6 +21,7 @@
|
|
|
22
21
|
}
|
|
23
22
|
}
|
|
24
23
|
|
|
24
|
+
/* TODO grabbing */
|
|
25
25
|
&:is(.grabbing) {
|
|
26
26
|
&, & * {
|
|
27
27
|
cursor: grabbing;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export interface ObserveCarouselOptions {
|
|
2
|
-
|
|
2
|
+
visibleAttribute?: string
|
|
3
3
|
observerOptions?: {
|
|
4
4
|
rootMargin?: string
|
|
5
5
|
threshold?: number | number[]
|
|
@@ -9,7 +9,7 @@ export interface ObserveCarouselOptions {
|
|
|
9
9
|
export interface PaginationCarouselOptions {
|
|
10
10
|
element?: HTMLElement | Element
|
|
11
11
|
itemContent?: string
|
|
12
|
-
|
|
12
|
+
activeAttribute?: string
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
export interface ScrollCarouselOptions {
|
|
@@ -26,7 +26,7 @@ export interface AutoplayCarouselOptions {
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
export interface DragCarouselOptions {
|
|
29
|
-
|
|
29
|
+
activeAttribute?: string
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
export function scrollPrev(element: HTMLElement | Element): void
|