winduum 1.2.1 → 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.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
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
.button {
|
|
2
|
+
--button-background-color: var(--color-accent);
|
|
3
|
+
--button-border-color: var(--color-accent);
|
|
4
|
+
--button-color: var(--color-accent-foreground);
|
|
5
|
+
|
|
6
|
+
inline-size: var(--button-width);
|
|
7
|
+
block-size: var(--button-height);
|
|
8
|
+
padding: var(--button-padding-block) var(--button-padding-inline);
|
|
9
|
+
padding-inline: calc(var(--button-padding-inline) - var(--button-border-width));
|
|
10
|
+
border-radius: var(--button-border-radius);
|
|
11
|
+
font-family: var(--button-font-family);
|
|
12
|
+
font-size: var(--button-font-size);
|
|
13
|
+
font-weight: var(--button-font-weight);
|
|
14
|
+
letter-spacing: var(--button-letter-spacing);
|
|
15
|
+
background-color:
|
|
16
|
+
color-mix(
|
|
17
|
+
in var(--button-background-color-space, srgb),
|
|
18
|
+
var(--button-background-color) var(--button-background-color-opacity, 100%),
|
|
19
|
+
var(--button-background-color-mix, transparent)
|
|
20
|
+
);
|
|
21
|
+
color:
|
|
22
|
+
color-mix(
|
|
23
|
+
in var(--button-color-space, srgb),
|
|
24
|
+
var(--button-color) var(--button-color-opacity, 100%),
|
|
25
|
+
var(--button-color-mix, transparent)
|
|
26
|
+
);
|
|
27
|
+
border:
|
|
28
|
+
var(--button-border-width)
|
|
29
|
+
solid
|
|
30
|
+
color-mix(
|
|
31
|
+
in var(--button-border-color-space, srgb),
|
|
32
|
+
var(--button-border-color) var(--button-border-color-opacity, 100%),
|
|
33
|
+
var(--button-border-color-mix, transparent)
|
|
34
|
+
);
|
|
35
|
+
outline:
|
|
36
|
+
var(--button-outline-width)
|
|
37
|
+
solid
|
|
38
|
+
color-mix(
|
|
39
|
+
in var(--button-outline-color-space, srgb),
|
|
40
|
+
var(--button-outline-color, transparent) var(--button-outline-color-opacity, 100%),
|
|
41
|
+
var(--button-outline-color-mix, transparent)
|
|
42
|
+
);
|
|
43
|
+
outline-offset: var(--button-outline-offset);
|
|
44
|
+
gap: var(--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
|
+
.button:is(.ghosted) {
|
|
2
|
+
--button-disabled-background-color-opacity: 0%;
|
|
3
|
+
--button-disabled-background-color-mix: transparent;
|
|
4
|
+
--button-disabled-color: var(--color-accent);
|
|
5
|
+
--button-active-background-color-opacity: 20%;
|
|
6
|
+
--button-active-background-color-mix: transparent;
|
|
7
|
+
--button-active-color: var(--color-accent);
|
|
8
|
+
--button-hover-background-color-opacity: 10%;
|
|
9
|
+
--button-hover-background-color-mix: transparent;
|
|
10
|
+
--button-hover-color: var(--color-accent);
|
|
11
|
+
--button-focus-outline-offset: -2px;
|
|
12
|
+
--button-color: var(--color-accent);
|
|
13
|
+
--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
|
+
.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
|
+
--button-hover-background-color-mix: var(--color-accent-foreground);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
&:is(button, input, :any-link, [role="button"]) {
|
|
14
|
+
&:hover {
|
|
15
|
+
--button-background-color: var(--button-hover-background-color, var(--color-accent));
|
|
16
|
+
--button-background-color-mix: var(--button-hover-background-color-mix);
|
|
17
|
+
--button-background-color-opacity: var(--button-hover-background-color-opacity);
|
|
18
|
+
--button-border-color: var(--button-hover-border-color, var(--color-accent));
|
|
19
|
+
--button-border-color-mix: var(--button-hover-border-color-mix, transparent);
|
|
20
|
+
--button-border-color-opacity: var(--button-hover-border-color-opacity, 100%);
|
|
21
|
+
--button-color: var(--button-hover-color, var(--color-accent-foreground));
|
|
22
|
+
--button-color-mix: var(--button-hover-color-mix, transparent);
|
|
23
|
+
--button-color-opacity: var(--button-hover-color-opacity, 100%);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&:focus {
|
|
27
|
+
--button-outline-offset: var(--button-focus-outline-offset);
|
|
28
|
+
--button-outline-color: var(--button-focus-outline-color, var(--color-accent));
|
|
29
|
+
--button-outline-color-opacity: var(--button-focus-outline-color-opacity);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&:active, &:checked, &[data-active] {
|
|
33
|
+
--button-background-color: var(--button-hover-background-color, var(--color-accent));
|
|
34
|
+
--button-background-color-mix: var(--button-active-background-color-mix);
|
|
35
|
+
--button-background-color-opacity: var(--button-active-background-color-opacity);
|
|
36
|
+
--button-border-color: var(--button-active-border-color, var(--color-accent));
|
|
37
|
+
--button-border-color-mix: var(--button-active-border-color-mix, transparent);
|
|
38
|
+
--button-border-color-opacity: var(--button-active-border-color-opacity, 100%);
|
|
39
|
+
--button-color: var(--button-active-color, var(--color-accent-foreground));
|
|
40
|
+
--button-color-mix: var(--button-active-color-mix, transparent);
|
|
41
|
+
--button-color-opacity: var(--button-active-color-opacity, 100%);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&:disabled {
|
|
45
|
+
--button-background-color: var(--button-disabled-background-color, var(--color-accent));
|
|
46
|
+
--button-background-color-mix: var(--button-disabled-background-color-mix, transparent);
|
|
47
|
+
--button-background-color-opacity: var(--button-disabled-background-color-opacity, 50%);
|
|
48
|
+
--button-border-color: var(--button-disabled-border-color, var(--color-accent));
|
|
49
|
+
--button-border-color-mix: var(--button-disabled-border-color-mix, transparent);
|
|
50
|
+
--button-border-color-opacity: var(--button-disabled-border-color-opacity, 50%);
|
|
51
|
+
--button-color: var(--button-disabled-color, var(--color-accent-foreground));
|
|
52
|
+
--button-color-mix: var(--button-disabled-color-mix, transparent);
|
|
53
|
+
--button-color-opacity: var(--button-disabled-color-opacity, 50%);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
.button:is(.muted) {
|
|
2
|
+
--button-disabled-background-color-opacity: 5%;
|
|
3
|
+
--button-disabled-background-color-mix: transparent;
|
|
4
|
+
--button-disabled-color: var(--color-accent);
|
|
5
|
+
--button-active-background-color-opacity: 30%;
|
|
6
|
+
--button-active-background-color-mix: transparent;
|
|
7
|
+
--button-active-color: var(--color-accent);
|
|
8
|
+
--button-hover-background-color-opacity: 20%;
|
|
9
|
+
--button-hover-background-color-mix: transparent;
|
|
10
|
+
--button-hover-color: var(--color-accent);
|
|
11
|
+
--button-focus-outline-offset: -2px;
|
|
12
|
+
--button-color: var(--color-accent);
|
|
13
|
+
--button-background-color-opacity: 10%;
|
|
14
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
:root, :host {
|
|
2
|
+
--button-outline-width: 2px;
|
|
3
|
+
--button-border-width: 0px;
|
|
4
|
+
--button-border-radius: var(--radius);
|
|
5
|
+
--button-font-size: var(--font-size-sm);
|
|
6
|
+
--button-font-weight: var(--font-weight-medium);
|
|
7
|
+
--button-gap: var(--spacing-sm);
|
|
8
|
+
--button-height: 2.25rem;
|
|
9
|
+
--button-padding-block: 0.375rem;
|
|
10
|
+
--button-padding-inline: 0.75rem;
|
|
11
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
:root, :host {
|
|
2
|
+
--button-hover-background-color-mix: var(--color-dark);
|
|
3
|
+
--button-hover-background-color-opacity: 80%;
|
|
4
|
+
--button-focus-outline-offset: 2px;
|
|
5
|
+
--button-focus-outline-color-opacity: 50%;
|
|
6
|
+
--button-active-background-color-mix: var(--color-dark);
|
|
7
|
+
--button-active-background-color-opacity: 90%;
|
|
8
|
+
--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/default.css" layer(components);
|
|
18
|
+
@import "winduum/src/button/props/default.css" layer(components);
|
|
19
|
+
@import "winduum/src/button/interactive.css" layer(components);
|
|
20
|
+
@import "winduum/src/button/props/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,9 @@
|
|
|
1
|
-
.
|
|
2
|
-
--
|
|
1
|
+
.card {
|
|
2
|
+
--card-p: var(--card-py) var(--card-px);
|
|
3
3
|
|
|
4
4
|
background-color: var(--color-body-primary);
|
|
5
|
-
border-radius: var(--
|
|
6
|
-
padding: var(--
|
|
5
|
+
border-radius: var(--radius-2xl);
|
|
6
|
+
padding: var(--card-p);
|
|
7
7
|
display: flex;
|
|
8
8
|
flex-direction: column;
|
|
9
9
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
:root, :host {
|
|
2
|
+
--check-size: 1.25rem;
|
|
3
|
+
--check-icon-size: 1.125rem;
|
|
4
|
+
--check-icon: var(--mask-check);
|
|
5
|
+
--check-gap: var(--spacing-md);
|
|
6
|
+
--check-font-size: var(--font-size-sm);
|
|
7
|
+
--check-line-height: calc(1em + 0.25rem);
|
|
8
|
+
--check-border-radius: var(--radius-md);
|
|
9
|
+
--check-border-width: 1px;
|
|
10
|
+
--check-bg: currentColor;
|
|
11
|
+
--check-border-color: currentColor;
|
|
12
|
+
--check-outline-width: 3px;
|
|
13
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
.check {
|
|
2
|
+
--check-outline-color: var(--color-accent);
|
|
3
|
+
--check-icon-color: var(--color-accent-foreground);
|
|
4
|
+
|
|
5
|
+
font-weight: var(--check-font-weight);
|
|
6
|
+
font-size: var(--check-font-size);
|
|
7
|
+
line-height: var(--check-line-height);
|
|
8
|
+
letter-spacing: var(--check-letter-spacing);
|
|
9
|
+
gap: var(--check-gap);
|
|
10
|
+
display: inline-flex;
|
|
11
|
+
text-wrap: pretty;
|
|
12
|
+
|
|
13
|
+
&:has([type="radio"]) {
|
|
14
|
+
--check-icon: var(--mask-radio);
|
|
15
|
+
--check-border-radius: 50%;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
:where(a) {
|
|
19
|
+
color: var(--color-accent);
|
|
20
|
+
text-decoration: underline;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
:where(input) {
|
|
24
|
+
--tw-border-opacity: 0.2;
|
|
25
|
+
--tw-border-mix: transparent;
|
|
26
|
+
--tw-outline-opacity: 0;
|
|
27
|
+
--tw-outline-mix: transparent;
|
|
28
|
+
--tw-bg-opacity: 0;
|
|
29
|
+
--tw-bg-mix: transparent;
|
|
30
|
+
|
|
31
|
+
width: var(--check-size);
|
|
32
|
+
height: var(--check-size);
|
|
33
|
+
border-radius: var(--check-border-radius);
|
|
34
|
+
background-color: color-mix(in var(--default-color-space), var(--check-bg) calc(var(--tw-bg-opacity) * 100%), var(--tw-bg-mix));
|
|
35
|
+
border:
|
|
36
|
+
var(--check-border-width) solid
|
|
37
|
+
color-mix(
|
|
38
|
+
in var(--default-color-space),
|
|
39
|
+
var(--check-border-color) calc(var(--tw-border-opacity) * 100%),
|
|
40
|
+
var(--tw-border-mix)
|
|
41
|
+
);
|
|
42
|
+
outline:
|
|
43
|
+
var(--check-outline-width) solid
|
|
44
|
+
color-mix(
|
|
45
|
+
in var(--default-color-space),
|
|
46
|
+
var(--check-outline-color) calc(var(--tw-outline-opacity) * 100%),
|
|
47
|
+
var(--tw-outline-mix)
|
|
48
|
+
);
|
|
49
|
+
outline-offset: var(--check-outline-offset);
|
|
50
|
+
display: flex;
|
|
51
|
+
flex-shrink: 0;
|
|
52
|
+
|
|
53
|
+
&::before {
|
|
54
|
+
width: var(--check-icon-size);
|
|
55
|
+
height: var(--check-icon-size);
|
|
56
|
+
color: var(--check-icon-color);
|
|
57
|
+
mask: var(--check-icon);
|
|
58
|
+
transition: inherit;
|
|
59
|
+
content: "";
|
|
60
|
+
background-color: currentColor;
|
|
61
|
+
opacity: 0;
|
|
62
|
+
transform: scale(0);
|
|
63
|
+
will-change: transform;
|
|
64
|
+
margin: auto;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
&:where(:required) {
|
|
68
|
+
+ *::after {
|
|
69
|
+
color: var(--color-error);
|
|
70
|
+
content: " *";
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
.check {
|
|
2
|
+
--check-hover-border-color: var(--color-accent);
|
|
3
|
+
--check-hover-bg: var(--color-accent);
|
|
4
|
+
--check-checked-bg: var(--color-accent);
|
|
5
|
+
--check-focus-border-color: var(--color-accent);
|
|
6
|
+
|
|
7
|
+
:where(input) {
|
|
8
|
+
transition-property: var(--default-transition-property);
|
|
9
|
+
transition-timing-function: var(--transition-timing-function-in-out);
|
|
10
|
+
transition-duration: var(--default-transition-duration);
|
|
11
|
+
|
|
12
|
+
&:enabled {
|
|
13
|
+
&:is(:hover, :focus-visible) {
|
|
14
|
+
--check-border-color: var(--check-hover-border-color);
|
|
15
|
+
--check-bg: var(--check-hover-bg);
|
|
16
|
+
--tw-border-opacity: var(--check-hover-border-opacity, 0.75);
|
|
17
|
+
--tw-bg-opacity: var(--check-hover-bg-opacity, 0.1);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
&:focus {
|
|
21
|
+
--check-border-color: var(--check-focus-border-color);
|
|
22
|
+
--check-outline-offset: var(--check-focus-outline-offset);
|
|
23
|
+
--tw-border-opacity: var(--check-focus-border-opacity, 0.75);
|
|
24
|
+
--tw-outline-opacity: var(--check-focus-outline-opacity, 0.2);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
&:disabled {
|
|
29
|
+
--tw-bg-opacity: var(--check-disabled-bg-opacity, 0.15);
|
|
30
|
+
|
|
31
|
+
cursor: not-allowed;
|
|
32
|
+
opacity: var(--check-disabled-opacity);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&:where([type="checkbox"]):indeterminate {
|
|
36
|
+
--check-icon: var(--mask-indeterminate);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&:is(:checked, [type="checkbox"]:indeterminate) {
|
|
40
|
+
--check-bg: var(--check-checked-bg);
|
|
41
|
+
--tw-bg-opacity: 1;
|
|
42
|
+
--tw-border-opacity: 0;
|
|
43
|
+
|
|
44
|
+
&::before {
|
|
45
|
+
opacity: 1;
|
|
46
|
+
transform: scale(1);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
:root, :host {
|
|
2
|
+
--color-primary: currentColor;
|
|
3
|
+
--color-secondary: transparent;
|
|
4
|
+
--color-size: 1.75rem;
|
|
5
|
+
--color-p: var(--spacing-xs);
|
|
6
|
+
--color-border-width: 2px;
|
|
7
|
+
--color-border-color: currentColor;
|
|
8
|
+
--color-border-radius: var(--radius-full);
|
|
9
|
+
--color-outline-width: 3px;
|
|
10
|
+
--color-outline-color: var(--color-border-color);
|
|
11
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
.
|
|
1
|
+
.color {
|
|
2
2
|
display: inline-flex;
|
|
3
3
|
|
|
4
4
|
:where(input) {
|
|
@@ -7,25 +7,25 @@
|
|
|
7
7
|
--tw-outline-opacity: 0;
|
|
8
8
|
--tw-outline-mix: transparent;
|
|
9
9
|
|
|
10
|
-
width: var(--
|
|
11
|
-
height: var(--
|
|
12
|
-
padding: var(--
|
|
13
|
-
border-radius: var(--
|
|
10
|
+
width: var(--color-size);
|
|
11
|
+
height: var(--color-size);
|
|
12
|
+
padding: var(--color-p);
|
|
13
|
+
border-radius: var(--color-border-radius);
|
|
14
14
|
border:
|
|
15
|
-
var(--
|
|
15
|
+
var(--color-border-width) solid
|
|
16
16
|
color-mix(
|
|
17
|
-
in var(--space),
|
|
18
|
-
var(--
|
|
17
|
+
in var(--default-color-space),
|
|
18
|
+
var(--color-border-color) calc(var(--tw-border-opacity) * 100%),
|
|
19
19
|
var(--tw-border-mix)
|
|
20
20
|
);
|
|
21
21
|
outline:
|
|
22
|
-
var(--
|
|
22
|
+
var(--color-outline-width) solid
|
|
23
23
|
color-mix(
|
|
24
|
-
in var(--space),
|
|
25
|
-
var(--
|
|
24
|
+
in var(--default-color-space),
|
|
25
|
+
var(--color-outline-color) calc(var(--tw-outline-opacity) * 100%),
|
|
26
26
|
var(--tw-outline-mix)
|
|
27
27
|
);
|
|
28
|
-
outline-offset: var(--
|
|
28
|
+
outline-offset: var(--check-outline-offset);
|
|
29
29
|
display: inline-grid;
|
|
30
30
|
|
|
31
31
|
&::before, &::after {
|
|
@@ -36,12 +36,12 @@
|
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
&::before {
|
|
39
|
-
background-color: var(--
|
|
39
|
+
background-color: var(--color-primary);
|
|
40
40
|
border-color: inherit;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
&::after {
|
|
44
|
-
background-color: var(--
|
|
44
|
+
background-color: var(--color-secondary);
|
|
45
45
|
clip-path: polygon(100% 0, 100% 100%, 0 100%);
|
|
46
46
|
}
|
|
47
47
|
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
.
|
|
1
|
+
.color {
|
|
2
2
|
:where(input) {
|
|
3
|
-
transition-property: var(--transition);
|
|
4
|
-
transition-timing-function: var(--
|
|
5
|
-
transition-duration: var(--duration);
|
|
3
|
+
transition-property: var(--default-transition-property);
|
|
4
|
+
transition-timing-function: var(--transition-timing-function-in-out);
|
|
5
|
+
transition-duration: var(--default-transition-duration);
|
|
6
6
|
|
|
7
7
|
&:where(:disabled) {
|
|
8
8
|
cursor: not-allowed;
|
|
9
9
|
|
|
10
10
|
&::before, &::after {
|
|
11
|
-
opacity: var(--
|
|
11
|
+
opacity: var(--color-disabled-opacity);
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
.
|
|
2
|
-
--
|
|
3
|
-
--
|
|
1
|
+
.compare {
|
|
2
|
+
--compare-position: 50%;
|
|
3
|
+
--compare-clip-path: polygon(0% 0, var(--compare-position) 0%, var(--compare-position) 100%, 0 100%);
|
|
4
4
|
|
|
5
5
|
display: grid;
|
|
6
6
|
overflow: hidden;
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
|
|
16
16
|
&::before {
|
|
17
17
|
background-color: var(--color-accent);
|
|
18
|
-
inset-inline-start: var(--
|
|
18
|
+
inset-inline-start: var(--compare-position);
|
|
19
19
|
inline-size: 1px;
|
|
20
20
|
content: "";
|
|
21
21
|
}
|
|
@@ -26,14 +26,14 @@
|
|
|
26
26
|
opacity: 0;
|
|
27
27
|
|
|
28
28
|
&:is(:focus-visible, :active) {
|
|
29
|
-
~ .
|
|
30
|
-
--tw-bg-mix: var(--
|
|
29
|
+
~ .button {
|
|
30
|
+
--tw-bg-mix: var(--button-hover-bg-mix, var(--color-dark));
|
|
31
31
|
--tw-bg-opacity: 0.8;
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
&:focus-visible ~ .
|
|
36
|
-
--
|
|
35
|
+
&:focus-visible ~ .button {
|
|
36
|
+
--button-outline-offset: 2px;
|
|
37
37
|
--tw-outline-opacity: 0.5;
|
|
38
38
|
}
|
|
39
39
|
|
|
@@ -42,13 +42,13 @@
|
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
> :where(.
|
|
46
|
-
inset-inline-start: var(--
|
|
47
|
-
margin-inline-start: calc(var(--
|
|
45
|
+
> :where(.button) {
|
|
46
|
+
inset-inline-start: var(--compare-position);
|
|
47
|
+
margin-inline-start: calc(var(--button-width) / 2 * -1);
|
|
48
48
|
margin-block: auto;
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
> :where(.
|
|
51
|
+
> :where(.image) {
|
|
52
52
|
display: grid;
|
|
53
53
|
z-index: 0;
|
|
54
54
|
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
grid-area: 1/1;
|
|
59
59
|
|
|
60
60
|
&:first-child {
|
|
61
|
-
clip-path: var(--
|
|
61
|
+
clip-path: var(--compare-clip-path);
|
|
62
62
|
position: relative;
|
|
63
63
|
}
|
|
64
64
|
}
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
*/
|
|
6
6
|
export const setPosition = ({ currentTarget }, options = {}) => {
|
|
7
7
|
const { selector, positionProperty } = {
|
|
8
|
-
selector: '.
|
|
9
|
-
positionProperty: '--
|
|
8
|
+
selector: '.compare',
|
|
9
|
+
positionProperty: '--compare-position',
|
|
10
10
|
...options
|
|
11
11
|
}
|
|
12
12
|
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
.control {
|
|
2
|
+
> :where(input) {
|
|
3
|
+
&::-webkit-color-swatch-wrapper {
|
|
4
|
+
width: var(--control-color-swatch-width);
|
|
5
|
+
height: var(--control-color-swatch-height);
|
|
6
|
+
padding: 0;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
&::-moz-color-swatch {
|
|
10
|
+
width: var(--control-color-swatch-width);
|
|
11
|
+
height: var(--control-color-swatch-height);
|
|
12
|
+
border-radius: var(--control-color-swatch-border-radius);
|
|
13
|
+
margin: 0;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
&::-webkit-color-swatch {
|
|
17
|
+
border-radius: var(--control-color-swatch-border-radius);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
&[type="color"] ~ label {
|
|
21
|
+
margin-inline-start: calc(var(--control-px) + var(--control-color-swatch-width));
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|