winduum 2.0.0-next.1 → 2.0.0-next.2
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 +12 -12
- package/plugin/index.js +10 -10
- package/plugin/utilities/dot.js +2 -2
- package/src/base/breakpoints.css +10 -10
- package/src/base/keyframes.css +3 -3
- package/src/components/badge/bordered.css +5 -15
- package/src/components/badge/circle.css +4 -4
- package/src/components/badge/default.css +34 -18
- package/src/components/badge/index.css +1 -1
- package/src/components/badge/lg.css +2 -2
- package/src/components/badge/muted.css +3 -3
- package/src/components/badge/props/default.css +9 -0
- package/src/components/badge/readme.md +12 -12
- package/src/components/badge/sm.css +3 -3
- package/src/components/badge/square.css +3 -3
- 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 +18 -18
- package/src/components/button/circle.css +5 -5
- package/src/components/button/default.css +29 -29
- package/src/components/button/fill.css +5 -5
- package/src/components/button/ghosted.css +13 -13
- package/src/components/button/interactive.css +32 -32
- package/src/components/button/lg.css +3 -3
- package/src/components/button/muted.css +13 -13
- package/src/components/button/props/default.css +9 -9
- package/src/components/button/props/interactive.css +7 -7
- package/src/components/button/raised.css +5 -5
- package/src/components/button/readme.md +2 -2
- package/src/components/button/sm.css +3 -3
- package/src/components/button/square.css +4 -4
- 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/check/default.css +34 -41
- package/src/components/check/index.css +1 -2
- package/src/components/check/interactive.css +31 -25
- package/src/components/check/invalid.css +7 -6
- package/src/components/check/props/default.css +13 -0
- package/src/components/check/readme.md +8 -9
- package/src/components/color/default.css +13 -25
- package/src/components/color/index.css +1 -2
- package/src/components/color/interactive.css +18 -12
- package/src/components/color/props/default.css +7 -0
- package/src/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 +8 -8
- package/src/components/control/default.css +36 -39
- package/src/components/control/file.css +14 -12
- package/src/components/control/floating-interactive.css +5 -5
- package/src/components/control/floating.css +7 -7
- package/src/components/control/icon.css +8 -8
- package/src/components/control/index.css +5 -6
- package/src/components/control/interactive.css +9 -9
- package/src/components/control/invalid.css +7 -7
- 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 +19 -20
- package/src/components/control/select-multiple.css +2 -2
- package/src/components/control/select.css +8 -8
- package/src/components/dialog/content.css +6 -6
- package/src/components/dialog/default.css +11 -8
- package/src/components/dialog/index.css +2 -2
- package/src/components/dialog/index.js +3 -3
- 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 +8 -5
- 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 +11 -11
- package/src/components/group/readme.md +6 -6
- package/src/components/group/vertical.css +2 -2
- package/src/components/heading/default.css +6 -6
- package/src/components/heading/index.css +1 -1
- package/src/components/heading/lg.css +2 -2
- package/src/components/heading/props/default.css +6 -0
- package/src/components/heading/readme.md +8 -8
- package/src/components/heading/sm.css +2 -2
- package/src/components/image/avatar.css +1 -1
- package/src/components/image/default.css +1 -1
- package/src/components/image/readme.md +6 -6
- package/src/components/index.css +0 -2
- package/src/components/info/default.css +6 -6
- package/src/components/info/index.css +1 -1
- package/src/components/info/props/default.css +4 -0
- package/src/components/info/readme.md +6 -6
- package/src/components/label/default.css +6 -6
- package/src/components/label/index.css +1 -1
- package/src/components/label/props/default.css +4 -0
- package/src/components/label/readme.md +6 -6
- package/src/components/link/default.css +6 -6
- package/src/components/link/index.css +1 -2
- package/src/components/link/interactive.css +3 -10
- package/src/components/link/props/default.css +4 -0
- package/src/components/link/readme.md +7 -7
- package/src/components/notice/default.css +16 -20
- package/src/components/notice/index.css +1 -1
- package/src/components/notice/props/default.css +8 -0
- package/src/components/notice/readme.md +6 -6
- package/src/components/pagination/default.css +2 -2
- package/src/components/popover/content.css +14 -15
- package/src/components/popover/default.css +1 -1
- package/src/components/popover/index.css +1 -1
- package/src/components/popover/props/content.css +8 -0
- package/src/components/popover/readme.md +1 -1
- package/src/components/progress/default.css +15 -16
- package/src/components/progress/index.css +1 -1
- package/src/components/progress/lg.css +2 -2
- package/src/components/progress/meter.css +7 -7
- package/src/components/progress/props/default.css +6 -0
- package/src/components/progress/readme.md +9 -9
- package/src/components/progress/sm.css +2 -2
- package/src/components/range/default.css +47 -49
- package/src/components/range/index.css +1 -1
- package/src/components/range/index.js +2 -2
- package/src/components/range/multi.css +6 -6
- package/src/components/range/props/default.css +9 -0
- package/src/components/range/readme.md +8 -8
- package/src/components/range/vertical.css +3 -3
- package/src/components/rating/default.css +11 -11
- package/src/components/rating/index.css +1 -1
- package/src/components/rating/invalid.css +3 -3
- package/src/components/rating/props/default.css +8 -0
- package/src/components/rating/readme.md +7 -7
- package/src/components/switch/default.css +23 -26
- package/src/components/switch/index.css +1 -1
- package/src/components/switch/interactive.css +13 -9
- package/src/components/switch/invalid.css +4 -4
- package/src/components/switch/props/default.css +17 -0
- package/src/components/switch/readme.md +8 -8
- 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/default.css +6 -6
- package/src/components/text/default.css +102 -72
- package/src/components/text/index.css +1 -1
- package/src/components/text/props/default.css +9 -0
- package/src/components/text/readme.md +6 -6
- package/src/components/title/default.css +6 -6
- package/src/components/title/index.css +1 -1
- package/src/components/title/lg.css +2 -2
- package/src/components/title/props/default.css +5 -0
- package/src/components/title/readme.md +8 -8
- package/src/components/title/sm.css +2 -2
- 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/utilities/divider.css +13 -3
- package/src/utilities/ripple/index.css +9 -4
- package/src/utilities/skeleton/default.css +8 -1
- package/src/utilities/skeleton/props/default.css +3 -3
- package/src/utilities/swap/default.css +3 -3
- package/src/components/badge/default-props.css +0 -8
- package/src/components/breadcrumb/default-props.css +0 -5
- package/src/components/card/default-props.css +0 -4
- package/src/components/check/default-props.css +0 -13
- package/src/components/check/interactive-props.css +0 -3
- package/src/components/color/default-props.css +0 -11
- package/src/components/color/interactive-props.css +0 -3
- package/src/components/control/color-props.css +0 -5
- package/src/components/control/default-props.css +0 -16
- package/src/components/control/floating-props.css +0 -4
- package/src/components/control/icon-props.css +0 -4
- package/src/components/control/interactive-props.css +0 -3
- package/src/components/control/select-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/heading/default-props.css +0 -6
- package/src/components/info/default-props.css +0 -4
- package/src/components/label/default-props.css +0 -4
- package/src/components/link/default-props.css +0 -4
- package/src/components/link/interactive-props.css +0 -5
- package/src/components/notice/default-props.css +0 -8
- package/src/components/popover/content-props.css +0 -8
- package/src/components/progress/default-props.css +0 -4
- package/src/components/range/default-props.css +0 -10
- package/src/components/rating/default-props.css +0 -5
- package/src/components/switch/default-props.css +0 -17
- package/src/components/switch/interactive-props.css +0 -3
- package/src/components/table/default-props.css +0 -8
- package/src/components/table/interactive-props.css +0 -4
- package/src/components/text/default-props.css +0 -9
- package/src/components/title/default-props.css +0 -5
- 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
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
.compare {
|
|
2
|
-
--compare-position: 50%;
|
|
3
|
-
--compare-clip-path: polygon(0% 0, var(--compare-position) 0%, var(--compare-position) 100%, 0 100%);
|
|
1
|
+
.x-compare {
|
|
2
|
+
--x-compare-position: 50%;
|
|
3
|
+
--x-compare-clip-path: polygon(0% 0, var(--x-compare-position) 0%, var(--x-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(--compare-position);
|
|
18
|
+
inset-inline-start: var(--x-compare-position);
|
|
19
19
|
inline-size: 1px;
|
|
20
20
|
content: "";
|
|
21
21
|
}
|
|
@@ -23,18 +23,17 @@
|
|
|
23
23
|
> :where(input) {
|
|
24
24
|
pointer-events: auto;
|
|
25
25
|
cursor: grab;
|
|
26
|
-
opacity: 0
|
|
26
|
+
opacity: 0%;
|
|
27
27
|
|
|
28
|
-
&:
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
--tw-bg-opacity: 0.8;
|
|
32
|
-
}
|
|
28
|
+
&:active ~ .x-button {
|
|
29
|
+
--x-button-background-color-mix: var(--x-button-active-background-color-mix, var(--color-dark));
|
|
30
|
+
--x-button-background-color-opacity: var(--x-button-active-background-color-opacity, 80%);
|
|
33
31
|
}
|
|
34
32
|
|
|
35
|
-
&:focus-visible ~ .button {
|
|
36
|
-
--button-outline-
|
|
37
|
-
--
|
|
33
|
+
&:focus-visible ~ .x-button {
|
|
34
|
+
--x-button-outline-color: var(--x-button-focus-outline-color, var(--color-accent));
|
|
35
|
+
--x-button-outline-offset: var(--x-button-focus-outline-offset, 2px);
|
|
36
|
+
--x-button-outline-color-opacity: var(--x-button-focus-outline-opacity, 50%);
|
|
38
37
|
}
|
|
39
38
|
|
|
40
39
|
&:active {
|
|
@@ -42,13 +41,13 @@
|
|
|
42
41
|
}
|
|
43
42
|
}
|
|
44
43
|
|
|
45
|
-
> :where(.button) {
|
|
46
|
-
inset-inline-start: var(--compare-position);
|
|
47
|
-
margin-inline-start: calc(var(--button-width) / 2 * -1);
|
|
44
|
+
> :where(.x-button) {
|
|
45
|
+
inset-inline-start: var(--x-compare-position);
|
|
46
|
+
margin-inline-start: calc(var(--x-button-width) / 2 * -1);
|
|
48
47
|
margin-block: auto;
|
|
49
48
|
}
|
|
50
49
|
|
|
51
|
-
> :where(.image) {
|
|
50
|
+
> :where(.x-image) {
|
|
52
51
|
display: grid;
|
|
53
52
|
z-index: 0;
|
|
54
53
|
|
|
@@ -58,7 +57,7 @@
|
|
|
58
57
|
grid-area: 1/1;
|
|
59
58
|
|
|
60
59
|
&:first-child {
|
|
61
|
-
clip-path: var(--compare-clip-path);
|
|
60
|
+
clip-path: var(--x-compare-clip-path);
|
|
62
61
|
position: relative;
|
|
63
62
|
}
|
|
64
63
|
}
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
*/
|
|
6
6
|
export const setPosition = ({ currentTarget }, options = {}) => {
|
|
7
7
|
const { selector, positionProperty } = {
|
|
8
|
-
selector: '.compare',
|
|
9
|
-
positionProperty: '--compare-position',
|
|
8
|
+
selector: '.x-compare',
|
|
9
|
+
positionProperty: '--x-compare-position',
|
|
10
10
|
...options
|
|
11
11
|
}
|
|
12
12
|
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
.control {
|
|
1
|
+
.x-control {
|
|
2
2
|
> :where(input) {
|
|
3
3
|
&::-webkit-color-swatch-wrapper {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
inline-size: var(--x-control-color-swatch-width);
|
|
5
|
+
block-size: var(--x-control-color-swatch-height);
|
|
6
6
|
padding: 0;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
&::-moz-color-swatch {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
border-radius: var(--control-color-swatch-border-radius);
|
|
10
|
+
inline-size: var(--x-control-color-swatch-width);
|
|
11
|
+
block-size: var(--x-control-color-swatch-height);
|
|
12
|
+
border-radius: var(--x-control-color-swatch-border-radius);
|
|
13
13
|
margin: 0;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
&::-webkit-color-swatch {
|
|
17
|
-
border-radius: var(--control-color-swatch-border-radius);
|
|
17
|
+
border-radius: var(--x-control-color-swatch-border-radius);
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
&[type="color"] ~ label {
|
|
21
|
-
margin-inline-start: calc(var(--control-
|
|
21
|
+
margin-inline-start: calc(var(--x-control-padding-inline) + var(--x-control-color-swatch-width));
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
}
|
|
@@ -1,57 +1,54 @@
|
|
|
1
|
-
.control {
|
|
2
|
-
--control-outline-color: var(--color-accent);
|
|
3
|
-
--tw-bg-opacity: 1;
|
|
4
|
-
--tw-bg-mix: transparent;
|
|
5
|
-
--tw-border-opacity: 0.15;
|
|
6
|
-
--tw-border-mix: transparent;
|
|
7
|
-
--tw-outline-opacity: 0;
|
|
8
|
-
--tw-outline-mix: transparent;
|
|
9
|
-
|
|
1
|
+
.x-control {
|
|
10
2
|
display: grid;
|
|
11
|
-
block-size: var(--control-height);
|
|
12
|
-
font-family: var(--control-font-family);
|
|
13
|
-
font-weight: var(--control-font-weight);
|
|
14
|
-
font-size: var(--control-font-size);
|
|
15
|
-
letter-spacing: var(--control-letter-spacing);
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
3
|
+
block-size: var(--x-control-height);
|
|
4
|
+
font-family: var(--x-control-font-family);
|
|
5
|
+
font-weight: var(--x-control-font-weight);
|
|
6
|
+
font-size: var(--x-control-font-size);
|
|
7
|
+
letter-spacing: var(--x-control-letter-spacing);
|
|
8
|
+
color: var(--x-control-color);
|
|
9
|
+
border-radius: var(--x-control-border-radius);
|
|
10
|
+
background-color:
|
|
11
|
+
color-mix(
|
|
12
|
+
in var(--x-control-background-color-space, srgb),
|
|
13
|
+
var(--x-control-background-color) var(--x-control-background-color-opacity, 100%),
|
|
14
|
+
var(--x-control-background-color-mix, transparent)
|
|
15
|
+
);
|
|
19
16
|
border:
|
|
20
|
-
var(--control-border-width) solid
|
|
17
|
+
var(--x-control-border-width) solid
|
|
21
18
|
color-mix(
|
|
22
|
-
in var(--
|
|
23
|
-
var(--control-border-color)
|
|
24
|
-
var(--
|
|
19
|
+
in var(--x-control-border-color-space, srgb),
|
|
20
|
+
var(--x-control-border-color) var(--x-control-border-color-opacity, 15%),
|
|
21
|
+
var(--x-control-border-color-mix, transparent)
|
|
25
22
|
);
|
|
26
23
|
outline:
|
|
27
|
-
var(--control-outline-width) solid
|
|
24
|
+
var(--x-control-outline-width) solid
|
|
28
25
|
color-mix(
|
|
29
|
-
in var(--
|
|
30
|
-
var(--control-outline-color)
|
|
31
|
-
var(--
|
|
26
|
+
in var(--x-control-outline-color-space, srgb),
|
|
27
|
+
var(--x-control-outline-color, var(--color-accent)) var(--x-control-outline-color-opacity, 0%),
|
|
28
|
+
var(--x-control-outline-color-mix, transparent)
|
|
32
29
|
);
|
|
33
|
-
outline-offset: var(--control-outline-offset);
|
|
30
|
+
outline-offset: var(--x-control-outline-offset);
|
|
34
31
|
grid-template:
|
|
35
|
-
[control-start] calc(var(--control-
|
|
36
|
-
[control-
|
|
37
|
-
calc(var(--control-
|
|
38
|
-
[control-start] var(--control-
|
|
39
|
-
[control-
|
|
40
|
-
var(--control-
|
|
32
|
+
[x-control-start] calc(var(--x-control-padding-block) - var(--x-control-border-width))
|
|
33
|
+
[x-control-padding] 1fr
|
|
34
|
+
calc(var(--x-control-padding-block) - var(--x-control-border-width)) [x-control-end] /
|
|
35
|
+
[x-control-start] var(--x-control-padding-inline)
|
|
36
|
+
[x-control-padding] 1fr
|
|
37
|
+
var(--x-control-padding-inline) [x-control-end];
|
|
41
38
|
|
|
42
39
|
&:has(textarea) {
|
|
43
40
|
height: auto;
|
|
44
41
|
}
|
|
45
42
|
|
|
46
43
|
> :where(*) {
|
|
47
|
-
grid-area: control-
|
|
44
|
+
grid-area: x-control-padding;
|
|
48
45
|
align-self: center;
|
|
49
46
|
}
|
|
50
47
|
|
|
51
48
|
> :where(input, textarea, select) {
|
|
52
|
-
padding-block: var(--control-
|
|
53
|
-
padding-inline: calc(var(--control-
|
|
54
|
-
grid-area: control;
|
|
49
|
+
padding-block: var(--x-control-padding-block);
|
|
50
|
+
padding-inline: calc(var(--x-control-padding-inline) + var(--x-control-padding-inline-start, 0px)) calc(var(--x-control-padding-inline) + var(--x-control-padding-inline-end, 0px));
|
|
51
|
+
grid-area: x-control;
|
|
55
52
|
text-overflow: ellipsis;
|
|
56
53
|
overflow: clip;
|
|
57
54
|
align-self: stretch;
|
|
@@ -65,13 +62,13 @@
|
|
|
65
62
|
|
|
66
63
|
> :where(input, textarea) {
|
|
67
64
|
&::placeholder {
|
|
68
|
-
color: var(--control-placeholder-color);
|
|
69
|
-
opacity: var(--control-placeholder-opacity);
|
|
65
|
+
color: var(--x-control-placeholder-color);
|
|
66
|
+
opacity: var(--x-control-placeholder-opacity);
|
|
70
67
|
}
|
|
71
68
|
}
|
|
72
69
|
|
|
73
70
|
> :where(textarea) {
|
|
74
|
-
min-block-size: var(--control-height-textarea);
|
|
71
|
+
min-block-size: var(--x-control-height-textarea);
|
|
75
72
|
resize: vertical;
|
|
76
73
|
}
|
|
77
74
|
}
|
|
@@ -1,25 +1,27 @@
|
|
|
1
|
-
.control:where(:has([type="file"])) {
|
|
1
|
+
.x-control:where(:has([type="file"])) {
|
|
2
2
|
overflow: clip;
|
|
3
3
|
|
|
4
4
|
> :where([type="file"]) {
|
|
5
|
-
--color-accent: currentColor;
|
|
6
|
-
--tw-bg-opacity: 0.15;
|
|
7
|
-
|
|
8
5
|
&::file-selector-button {
|
|
9
6
|
all: unset;
|
|
10
|
-
background-color:
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
7
|
+
background-color:
|
|
8
|
+
color-mix(
|
|
9
|
+
in var(--x-control-file-background-color-space, srgb),
|
|
10
|
+
var(--x-control-file-background-color, currentColor) var(--x-control-file-background-color-opacity, 15%),
|
|
11
|
+
var(--x-control-file-background-color-mix, transparent)
|
|
12
|
+
);
|
|
13
|
+
block-size: calc(var(--x-control-height) - var(--x-control-border-width) * 2);
|
|
14
|
+
padding-inline: var(--x-control-padding-inline);
|
|
15
|
+
margin-inline: calc(var(--x-control-padding-inline) * -1) var(--x-control-padding-inline);
|
|
16
|
+
margin-block-start: calc(var(--x-control-padding-block) * -1);
|
|
17
|
+
border-start-end-radius: var(--x-control-border-radius);
|
|
18
|
+
border-end-end-radius: var(--x-control-border-radius);
|
|
17
19
|
transition: var(--transition-background);
|
|
18
20
|
cursor: pointer;
|
|
19
21
|
}
|
|
20
22
|
|
|
21
23
|
&:is(:hover, :focus) {
|
|
22
|
-
--
|
|
24
|
+
--x-control-file-background-color-opacity: 20%;
|
|
23
25
|
}
|
|
24
26
|
}
|
|
25
27
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
.control:where(:has(:not([type="color"]) ~ label)) {
|
|
2
|
-
--control-label-focus-opacity:
|
|
3
|
-
--control-placeholder-color: transparent;
|
|
1
|
+
.x-control:where(:has(:not([type="color"]) ~ label)) {
|
|
2
|
+
--x-control-label-focus-opacity: 50%;
|
|
3
|
+
--x-control-placeholder-color: transparent;
|
|
4
4
|
|
|
5
5
|
> :where(input, textarea, select) {
|
|
6
6
|
&:is(:focus, :not(:placeholder-shown)) {
|
|
7
7
|
~ label {
|
|
8
|
-
transform: translateY(calc(var(--control-label-translate-y) * -1)) scale(var(--control-label-scale));
|
|
9
|
-
opacity: var(--control-label-focus-opacity);
|
|
8
|
+
transform: translateY(calc(var(--x-control-label-translate-y) * -1)) scale(var(--x-control-label-scale));
|
|
9
|
+
opacity: var(--x-control-label-focus-opacity);
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
12
|
}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
.control:where(:has(:not([type="color"]) ~ label)) {
|
|
1
|
+
.x-control:where(:has(:not([type="color"]) ~ label)) {
|
|
2
2
|
> :where(label) {
|
|
3
|
-
margin-inline: var(--control-
|
|
3
|
+
margin-inline: var(--x-control-padding-inline-start, 0) var(--x-control-padding-inline-end, 0);
|
|
4
|
+
transition: var(--transition-transform), var(--transition-color), var(--transition-opacity);
|
|
4
5
|
pointer-events: none;
|
|
5
6
|
transform-origin: 0 50%;
|
|
6
7
|
white-space: nowrap;
|
|
7
8
|
text-overflow: ellipsis;
|
|
8
9
|
overflow: clip;
|
|
9
10
|
will-change: transform;
|
|
10
|
-
transition: var(--transition-transform), var(--transition-color), var(--transition-opacity);
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
> :where(textarea) {
|
|
14
|
-
padding-block-start: calc(var(--control-
|
|
14
|
+
padding-block-start: calc(var(--x-control-padding-block) + var(--x-control-label-translate-y) * var(--x-control-label-scale));
|
|
15
15
|
|
|
16
16
|
+ :where(label) {
|
|
17
17
|
align-self: start;
|
|
@@ -19,18 +19,18 @@
|
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
> :where(input, select) {
|
|
22
|
-
padding-block: calc(var(--control-
|
|
22
|
+
padding-block: calc(var(--x-control-padding-block) + var(--x-control-label-translate-y) * var(--x-control-label-scale)) calc(var(--x-control-padding-block) - var(--x-control-label-translate-y) * var(--x-control-label-scale));
|
|
23
23
|
|
|
24
24
|
&::-webkit-calendar-picker-indicator,
|
|
25
25
|
&::-webkit-search-cancel-button,
|
|
26
26
|
&::-webkit-outer-spin-button,
|
|
27
27
|
&::-webkit-inner-spin-button {
|
|
28
|
-
transform: translateY(calc(var(--control-label-translate-y) * var(--control-label-scale) * -1));
|
|
28
|
+
transform: translateY(calc(var(--x-control-label-translate-y) * var(--x-control-label-scale) * -1));
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
&:where(:has(:required)) :where(label)::after {
|
|
33
|
-
color: var(--color-error);
|
|
33
|
+
color: var(--x-control-required-color, var(--color-error));
|
|
34
34
|
content: " *";
|
|
35
35
|
}
|
|
36
36
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
.control {
|
|
2
|
-
--control-
|
|
3
|
-
--control-
|
|
1
|
+
.x-control {
|
|
2
|
+
--x-control-start: calc(var(--x-control-icon-count-start, 1) * (var(--x-control-icon-size) + var(--x-control-icon-gap)) - var(--x-control-icon-gap));
|
|
3
|
+
--x-control-end: calc(var(--x-control-icon-count-end, 1) * (var(--x-control-icon-size) + var(--x-control-icon-gap)) - var(--x-control-icon-gap));
|
|
4
4
|
|
|
5
5
|
&:has(textarea) {
|
|
6
6
|
:where(.me-auto), :where(.ms-auto) {
|
|
@@ -9,23 +9,23 @@
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
&:has(.me-auto) {
|
|
12
|
-
--control-
|
|
12
|
+
--x-control-padding-inline-start: calc(var(--x-control-start) + var(--x-control-padding-inline));
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
&:has(.ms-auto) {
|
|
16
|
-
--control-
|
|
16
|
+
--x-control-padding-inline-end: calc(var(--x-control-end) + var(--x-control-padding-inline));
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
&:has(.me-auto > *:nth-child(2)) {
|
|
20
|
-
--control-icon-count-
|
|
20
|
+
--x-control-icon-count-start: 2;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
&:has(.ms-auto > *:nth-child(2)) {
|
|
24
|
-
--control-icon-count-
|
|
24
|
+
--x-control-icon-count-end: 2;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
:where(.me-auto), :where(.ms-auto) {
|
|
28
|
-
gap: var(--control-icon-gap);
|
|
28
|
+
gap: var(--x-control-icon-gap);
|
|
29
29
|
display: flex;
|
|
30
30
|
align-items: center;
|
|
31
31
|
}
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
@import "default
|
|
1
|
+
@import "props/default.css";
|
|
2
|
+
@import "props/color.css";
|
|
3
|
+
@import "props/icon.css";
|
|
4
|
+
@import "props/floating.css";
|
|
5
|
+
@import "props/select.css";
|
|
2
6
|
@import "default.css";
|
|
3
7
|
@import "interactive.css";
|
|
4
|
-
@import "interactive-props.css";
|
|
5
8
|
@import "invalid.css";
|
|
6
|
-
@import "color-props.css";
|
|
7
9
|
@import "color.css";
|
|
8
10
|
@import "icon.css";
|
|
9
|
-
@import "icon-props.css";
|
|
10
11
|
@import "file.css";
|
|
11
|
-
@import "floating-props.css";
|
|
12
12
|
@import "floating.css";
|
|
13
13
|
@import "floating-interactive.css";
|
|
14
|
-
@import "select-props.css";
|
|
15
14
|
@import "select.css";
|
|
16
15
|
@import "select-multiple.css";
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
.control {
|
|
2
|
-
--control-focus-border-color: var(--color-accent);
|
|
3
|
-
|
|
1
|
+
.x-control {
|
|
4
2
|
transition-property: var(--default-transition-property);
|
|
5
3
|
transition-timing-function: var(--transition-timing-function-in-out);
|
|
6
4
|
transition-duration: var(--default-transition-duration);
|
|
7
5
|
|
|
8
6
|
&:focus-within {
|
|
9
|
-
--control-border-color: var(--control-focus-border-color);
|
|
10
|
-
--control-
|
|
11
|
-
--
|
|
12
|
-
--
|
|
7
|
+
--x-control-border-color: var(--x-control-focus-border-color, var(--color-accent));
|
|
8
|
+
--x-control-border-color-opacity: var(--x-control-focus-border-color-opacity, 100%);
|
|
9
|
+
--x-control-outline-offset: var(--x-control-focus-outline-offset);
|
|
10
|
+
--x-control-outline-color-opacity: var(--x-control-focus-outline-color-opacity, 20%);
|
|
13
11
|
}
|
|
14
12
|
|
|
15
13
|
&.disabled, &:has(:where(input, textarea, select):disabled) {
|
|
16
|
-
--control-
|
|
17
|
-
--
|
|
14
|
+
--x-control-background-color: var(--x-control-disabled-background-color, currentColor);
|
|
15
|
+
--x-control-background-color-opacity: var(--x-control-disabled-background-color-opacity, 5%);
|
|
16
|
+
--x-control-border-color: var(--x-control-disabled-border-color, currentColor);
|
|
17
|
+
--x-control-border-color-opacity: var(--x-control-disabled-border-color-opacity);
|
|
18
18
|
}
|
|
19
19
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
.control {
|
|
1
|
+
.x-control {
|
|
2
2
|
&.invalid, &:has(:user-invalid), .validated &:has(:invalid) {
|
|
3
|
-
--control-
|
|
4
|
-
--control-
|
|
5
|
-
--control-color: var(--control-invalid-color, var(--color-error));
|
|
6
|
-
--control-
|
|
7
|
-
--
|
|
8
|
-
--
|
|
3
|
+
--x-control-background-color: var(--x-control-invalid-background-color, var(--color-error));
|
|
4
|
+
--x-control-background-color-opacity: var(--x-control-invalid-background-color-opacity, 10%);
|
|
5
|
+
--x-control-border-color: var(--x-control-invalid-border-color, var(--color-error));
|
|
6
|
+
--x-control-border-color-opacity: var(--x-control-invalid-border-color-opacity, 100%);
|
|
7
|
+
--x-control-outline-color: var(--x-control-invalid-outline-color, var(--color-error));
|
|
8
|
+
--x-control-color: var(--x-control-invalid-color, var(--color-error));
|
|
9
9
|
}
|
|
10
10
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
:root, :host {
|
|
2
|
+
--x-control-height: 3rem;
|
|
3
|
+
--x-control-height-textarea: 8rem;
|
|
4
|
+
--x-control-padding-inline: 0.75rem;
|
|
5
|
+
--x-control-padding-block: 0.75rem;
|
|
6
|
+
--x-control-border-width: 1px;
|
|
7
|
+
--x-control-border-radius: var(--radius);
|
|
8
|
+
--x-control-border-color: currentColor;
|
|
9
|
+
--x-control-font-weight: var(--font-weight-medium);
|
|
10
|
+
--x-control-font-size: var(--font-size-sm);
|
|
11
|
+
--x-control-background-color: transparent;
|
|
12
|
+
--x-control-color: currentColor;
|
|
13
|
+
--x-control-outline-width: 3px;
|
|
14
|
+
--x-control-placeholder-color: currentColor;
|
|
15
|
+
--x-control-placeholder-opacity: 50%;
|
|
16
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# [Control](https://winduum.dev/docs/
|
|
1
|
+
# [Control](https://winduum.dev/docs/components/control.html)
|
|
2
2
|
|
|
3
3
|
## Installation
|
|
4
4
|
```shell
|
|
@@ -8,28 +8,27 @@ Learn more how to set up Winduum [here](https://winduum.dev/docs/).
|
|
|
8
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
9
|
|
|
10
10
|
```css
|
|
11
|
-
@import "winduum/src/
|
|
11
|
+
@import "winduum/src/components/control/index.css" layer(components);
|
|
12
12
|
```
|
|
13
13
|
|
|
14
14
|
or modular (you can use your own props or CSS)
|
|
15
15
|
|
|
16
16
|
```css
|
|
17
|
-
@import "winduum/src/
|
|
18
|
-
@import "winduum/src/
|
|
19
|
-
@import "winduum/src/
|
|
20
|
-
@import "winduum/src/
|
|
21
|
-
@import "winduum/src/
|
|
22
|
-
@import "winduum/src/
|
|
23
|
-
@import "winduum/src/
|
|
24
|
-
@import "winduum/src/
|
|
25
|
-
@import "winduum/src/
|
|
26
|
-
@import "winduum/src/
|
|
27
|
-
@import "winduum/src/
|
|
28
|
-
@import "winduum/src/
|
|
29
|
-
@import "winduum/src/
|
|
30
|
-
@import "winduum/src/
|
|
31
|
-
@import "winduum/src/
|
|
32
|
-
@import "winduum/src/ui/control/select-multiple.css" layer(components);
|
|
17
|
+
@import "winduum/src/components/control/props/default.css" layer(components);
|
|
18
|
+
@import "winduum/src/components/control/props/color.css" layer(components);
|
|
19
|
+
@import "winduum/src/components/control/props/icon.css" layer(components);
|
|
20
|
+
@import "winduum/src/components/control/props/floating.css" layer(components);
|
|
21
|
+
@import "winduum/src/components/control/props/select.css" layer(components);
|
|
22
|
+
@import "winduum/src/components/control/default.css" layer(components);
|
|
23
|
+
@import "winduum/src/components/control/interactive.css" layer(components);
|
|
24
|
+
@import "winduum/src/components/control/invalid.css" layer(components);
|
|
25
|
+
@import "winduum/src/components/control/color.css" layer(components);
|
|
26
|
+
@import "winduum/src/components/control/icon.css" layer(components);
|
|
27
|
+
@import "winduum/src/components/control/file.css" layer(components);
|
|
28
|
+
@import "winduum/src/components/control/floating.css" layer(components);
|
|
29
|
+
@import "winduum/src/components/control/floating-interactive.css" layer(components);
|
|
30
|
+
@import "winduum/src/components/control/select.css" layer(components);
|
|
31
|
+
@import "winduum/src/components/control/select-multiple.css" layer(components);
|
|
33
32
|
```
|
|
34
33
|
|
|
35
34
|
### Local imports
|
|
@@ -37,8 +36,8 @@ By default, imports are directly from `npm` so you can leverage updates.
|
|
|
37
36
|
You can also copy and paste the code from this directory to your project and remap the imports to local.
|
|
38
37
|
|
|
39
38
|
```css
|
|
40
|
-
@import "@/components/
|
|
39
|
+
@import "@/components/control/assets/index.css" layer(components);
|
|
41
40
|
```
|
|
42
41
|
|
|
43
42
|
### Docs
|
|
44
|
-
Visit [docs](https://winduum.dev/docs/
|
|
43
|
+
Visit [docs](https://winduum.dev/docs/components/control.html) to learn more about usage examples.
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
.control:has(select:not([multiple])) {
|
|
2
|
-
--control-
|
|
1
|
+
.x-control:has(select:not([multiple])) {
|
|
2
|
+
--x-control-padding-inline-end: calc(var(--x-control-end) + var(--x-control-padding-inline) + var(--x-control-select-icon-margin-inline-end));
|
|
3
3
|
|
|
4
4
|
&:has(.ms-auto) {
|
|
5
|
-
--control-icon-count-
|
|
5
|
+
--x-control-icon-count-end: 2;
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
&::after {
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
inline-size: var(--x-control-select-icon-size);
|
|
10
|
+
block-size: var(--x-control-select-icon-size);
|
|
11
11
|
mask: var(--mask-angle-down);
|
|
12
|
-
margin-inline: auto var(--control-select-icon-
|
|
13
|
-
grid-area: control-
|
|
12
|
+
margin-inline: auto var(--x-control-select-icon-margin-inline-end);
|
|
13
|
+
grid-area: x-control-padding;
|
|
14
14
|
background-color: currentColor;
|
|
15
15
|
pointer-events: none;
|
|
16
16
|
align-self: center;
|
|
@@ -18,6 +18,6 @@
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
:where(.ms-auto) {
|
|
21
|
-
margin-inline-end: var(--control-select-icon-size);
|
|
21
|
+
margin-inline-end: var(--x-control-select-icon-size);
|
|
22
22
|
}
|
|
23
23
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
.dialog-content {
|
|
2
|
-
background-color: var(--color-body-primary);
|
|
3
|
-
border-radius: var(--radius-3xl);
|
|
4
|
-
padding: var(--dialog-content-
|
|
5
|
-
inline-size: min(100%, var(--dialog-content-
|
|
1
|
+
.x-dialog-content {
|
|
2
|
+
background-color: var(--x-dialog-content-background-color, var(--color-body-primary));
|
|
3
|
+
border-radius: var(--x-dialog-content-border-radius, var(--radius-3xl));
|
|
4
|
+
padding: var(--x-dialog-content-padding-block) var(--x-dialog-content-padding-inline);
|
|
5
|
+
inline-size: min(100%, var(--x-dialog-content-inline-size));
|
|
6
6
|
transition: var(--transition-transform), var(--transition-opacity);
|
|
7
7
|
margin: auto;
|
|
8
8
|
|
|
9
9
|
:where(dialog:not(.open)) & {
|
|
10
10
|
transform: translateY(-2rem);
|
|
11
|
-
opacity: 0
|
|
11
|
+
opacity: 0%;
|
|
12
12
|
}
|
|
13
13
|
}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
.dialog {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
.x-dialog {
|
|
2
|
+
z-index: var(--x-dialog-z-index, var(--z-index-30));
|
|
3
|
+
padding: var(--x-dialog-padding-block) var(--x-dialog-padding-inline);
|
|
4
|
+
background-color:
|
|
5
|
+
color-mix(
|
|
6
|
+
in var(--x-dialog-background-color-space, srgb),
|
|
7
|
+
var(--x-dialog-background-color) var(--x-dialog-background-color-opacity),
|
|
8
|
+
var(--x-dialog-background-color-mix, transparent)
|
|
9
|
+
);
|
|
7
10
|
transition: var(--transition-background);
|
|
8
11
|
display: flex;
|
|
9
12
|
position: fixed;
|
|
@@ -21,8 +24,8 @@
|
|
|
21
24
|
}
|
|
22
25
|
}
|
|
23
26
|
|
|
24
|
-
html:has(.dialog[open]) {
|
|
25
|
-
padding-inline-end: var(--scrollbar-width);
|
|
27
|
+
html:has(.x-dialog[open]) {
|
|
28
|
+
padding-inline-end: var(--default-scrollbar-width);
|
|
26
29
|
scrollbar-width: none;
|
|
27
30
|
|
|
28
31
|
&::-webkit-scrollbar {
|