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,30 +1,30 @@
|
|
|
1
|
-
.
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
transition: all var(--
|
|
1
|
+
.x-toast {
|
|
2
|
+
inline-size: min(100%, var(--x-toast-inline-size));
|
|
3
|
+
block-size: var(--x-toast-block-size);
|
|
4
|
+
transition: all var(--x-toast-transition-duration) var(--x-toast-transition-timing-function, var(--transition-timing-function-in-out));
|
|
5
5
|
position: relative;
|
|
6
6
|
pointer-events: auto;
|
|
7
7
|
display: flex;
|
|
8
8
|
flex-direction: column;
|
|
9
9
|
visibility: hidden;
|
|
10
|
-
opacity: 0
|
|
10
|
+
opacity: 0%;
|
|
11
11
|
|
|
12
12
|
.flex-col-reverse & {
|
|
13
13
|
justify-content: flex-end;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
&.in {
|
|
17
|
-
margin-block: var(--
|
|
17
|
+
margin-block: var(--x-toaster-margin-block);
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
&.in:where(:nth-last-child(-n+3)) {
|
|
21
21
|
visibility: visible;
|
|
22
|
-
opacity:
|
|
22
|
+
opacity: 100%;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
&.out {
|
|
26
26
|
visibility: hidden;
|
|
27
|
-
opacity: 0
|
|
27
|
+
opacity: 0%;
|
|
28
28
|
height: 0;
|
|
29
29
|
margin-block: 0;
|
|
30
30
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
:root, :host {
|
|
2
|
+
--x-toast-content-border-radius: var(--radius-2xl);
|
|
3
|
+
--x-toast-content-padding-block: var(--spacing-md);
|
|
4
|
+
--x-toast-content-padding-inline: var(--spacing-lg);
|
|
5
|
+
--x-toast-content-gap: var(--spacing-xl);
|
|
6
|
+
--x-toast-content-background-color: var(--color-body-primary);
|
|
7
|
+
}
|
|
@@ -17,9 +17,9 @@ Include CSS either globally or to your component _([you can't use TailwindCSS la
|
|
|
17
17
|
or modular (you can use your own props or CSS)
|
|
18
18
|
|
|
19
19
|
```css
|
|
20
|
-
@import "winduum/src/components/toast/default
|
|
20
|
+
@import "winduum/src/components/toast/props/default.css" layer(components);
|
|
21
|
+
@import "winduum/src/components/toast/props/content.css" layer(components);
|
|
21
22
|
@import "winduum/src/components/toast/default.css" layer(components);
|
|
22
|
-
@import "winduum/src/components/toast/content-props.css" layer(components);
|
|
23
23
|
@import "winduum/src/components/toast/content.css" layer(components);
|
|
24
24
|
```
|
|
25
25
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
.
|
|
2
|
-
z-index: var(--z-50);
|
|
3
|
-
padding: var(--
|
|
4
|
-
margin-block: calc(var(--
|
|
1
|
+
.x-toaster {
|
|
2
|
+
z-index: var(--x-toaster-z-index, var(--z-index-50));
|
|
3
|
+
padding: var(--x-toaster-padding);
|
|
4
|
+
margin-block: calc(var(--x-toaster-margin-block) * -1);
|
|
5
5
|
position: fixed;
|
|
6
6
|
inset: 0;
|
|
7
7
|
pointer-events: none;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
@import "default
|
|
1
|
+
@import "props/default.css";
|
|
2
2
|
@import "default.css";
|
|
@@ -8,7 +8,7 @@ import { animationsFinished, nextRepaint } from '../../common.js'
|
|
|
8
8
|
export const closeToast = async (element, options = {}) => {
|
|
9
9
|
options = {
|
|
10
10
|
hiddenClass: 'out',
|
|
11
|
-
heightProperty: '--
|
|
11
|
+
heightProperty: '--x-toast-block-size',
|
|
12
12
|
...options
|
|
13
13
|
}
|
|
14
14
|
|
|
@@ -36,7 +36,7 @@ export const showToast = async (element, options = {}) => {
|
|
|
36
36
|
options = {
|
|
37
37
|
visibleClass: 'in',
|
|
38
38
|
autoHide: null,
|
|
39
|
-
heightProperty: '--
|
|
39
|
+
heightProperty: '--x-toast-block-size',
|
|
40
40
|
close: {},
|
|
41
41
|
...options
|
|
42
42
|
}
|
|
@@ -65,8 +65,8 @@ export const insertToaster = async (element, options = {}) => {
|
|
|
65
65
|
...options
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
-
if (!document.querySelector('.
|
|
69
|
-
element.insertAdjacentHTML('beforeend', `<ol class="
|
|
68
|
+
if (!document.querySelector('.x-toaster')) {
|
|
69
|
+
element.insertAdjacentHTML('beforeend', `<ol class="x-toaster ${options.classes}"></ol>`)
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
|
|
@@ -87,12 +87,12 @@ export const insertToast = async (element, options = {}) => {
|
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
element.insertAdjacentHTML('beforeend', `
|
|
90
|
-
<li class="
|
|
91
|
-
<div class="
|
|
90
|
+
<li class="x-toast ${options.classes}" role="status" aria-live="assertive" aria-atomic="true">
|
|
91
|
+
<div class="x-toast-content">
|
|
92
92
|
${options.start}
|
|
93
93
|
<div class="flex-col">
|
|
94
|
-
<div class="
|
|
95
|
-
<div class="
|
|
94
|
+
<div class="x-title">${options.title}</div>
|
|
95
|
+
<div class="x-text">${options.text}</div>
|
|
96
96
|
</div>
|
|
97
97
|
${options.end}
|
|
98
98
|
</div>
|
|
@@ -14,7 +14,7 @@ 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/toaster/default
|
|
17
|
+
@import "winduum/src/components/toaster/props/default.css" layer(components);
|
|
18
18
|
@import "winduum/src/components/toaster/default.css" layer(components);
|
|
19
19
|
```
|
|
20
20
|
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
.
|
|
1
|
+
.x-tooltip {
|
|
2
2
|
position: relative;
|
|
3
3
|
display: inline-block;
|
|
4
4
|
|
|
5
5
|
&::before {
|
|
6
6
|
--tw-content: attr(aria-label);
|
|
7
7
|
|
|
8
|
+
background-color: var(--x-tooltip-background-color);
|
|
9
|
+
color: var(--x-tooltip-color);
|
|
10
|
+
border-radius: var(--x-tooltip-border-radius);
|
|
11
|
+
font-size: var(--x-tooltip-font-size);
|
|
12
|
+
padding: var(--x-tooltip-padding-block) var(--x-tooltip-padding-inline);
|
|
13
|
+
z-index: var(--x-tooltip-z-index, var(--z-index-20));
|
|
14
|
+
transition-property: var(--default-transition-property);
|
|
15
|
+
transition-timing-function: var(--transition-timing-function-in-out);
|
|
16
|
+
transition-duration: var(--default-transition-duration);
|
|
8
17
|
content: var(--tw-content);
|
|
9
18
|
opacity: var(--tw-opacity);
|
|
10
19
|
visibility: var(--tw-visibility);
|
|
11
20
|
transform:
|
|
12
21
|
translate(var(--tw-translate-x), var(--tw-translate-y))
|
|
13
22
|
scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
|
14
|
-
transition-property: var(--transition);
|
|
15
|
-
transition-timing-function: var(--ease-in-out);
|
|
16
|
-
transition-duration: var(--duration);
|
|
17
23
|
will-change: transform;
|
|
18
|
-
|
|
19
|
-
color: var(--c-tooltip-color);
|
|
20
|
-
border-radius: var(--c-tooltip-border-radius);
|
|
21
|
-
font-size: var(--c-tooltip-font-size);
|
|
22
|
-
padding: var(--c-tooltip-py) var(--c-tooltip-px);
|
|
23
|
-
z-index: var(--z-20);
|
|
24
|
-
width: max-content;
|
|
24
|
+
inline-size: max-content;
|
|
25
25
|
position: absolute;
|
|
26
26
|
pointer-events: none;
|
|
27
27
|
}
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
&::before {
|
|
31
31
|
--tw-translate-x: -50%;
|
|
32
32
|
|
|
33
|
-
margin-block: var(--
|
|
33
|
+
margin-block: var(--x-tooltip-margin-block);
|
|
34
34
|
inset-inline-start: 50%;
|
|
35
35
|
}
|
|
36
36
|
}
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
&::before {
|
|
40
40
|
--tw-translate-y: -50%;
|
|
41
41
|
|
|
42
|
-
margin-inline: var(--
|
|
42
|
+
margin-inline: var(--x-tooltip-margin-inline);
|
|
43
43
|
inset-block-start: 50%;
|
|
44
44
|
}
|
|
45
45
|
}
|
|
@@ -73,8 +73,8 @@
|
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
&:not(:hover, :focus)::before {
|
|
76
|
-
--tw-scale-x: var(--
|
|
77
|
-
--tw-scale-y: var(--
|
|
76
|
+
--tw-scale-x: var(--x-tooltip-scale-x);
|
|
77
|
+
--tw-scale-y: var(--x-tooltip-scale-y);
|
|
78
78
|
--tw-opacity: 0;
|
|
79
79
|
--tw-visibility: hidden;
|
|
80
80
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
@import "default
|
|
1
|
+
@import "props/default.css";
|
|
2
2
|
@import "default.css";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
:root, :host {
|
|
2
|
+
--x-tooltip-background-color: var(--color-main);
|
|
3
|
+
--x-tooltip-color: var(--color-main-foreground);
|
|
4
|
+
--x-tooltip-border-radius: var(--radius-md);
|
|
5
|
+
--x-tooltip-font-size: var(--font-size-sm);
|
|
6
|
+
--x-tooltip-padding-block: var(--spacing-xs);
|
|
7
|
+
--x-tooltip-padding-inline: var(--spacing-sm);
|
|
8
|
+
--x-tooltip-margin-block: var(--spacing-xs);
|
|
9
|
+
--x-tooltip-margin-inline: var(--spacing-xs);
|
|
10
|
+
--x-tooltip-scale-x: 0.75;
|
|
11
|
+
--x-tooltip-scale-y: 0.75;
|
|
12
|
+
}
|
|
@@ -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/tooltip/props/default.css" layer(components);
|
|
17
18
|
@import "winduum/src/components/tooltip/default.css" layer(components);
|
|
18
|
-
@import "winduum/src/components/tooltip/default-props.css" layer(components);
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
### Local imports
|
|
@@ -23,7 +23,7 @@ By default, imports are directly from `npm` so you can leverage updates.
|
|
|
23
23
|
You can also copy and paste the code from this directory to your project and remap the imports to local.
|
|
24
24
|
|
|
25
25
|
```css
|
|
26
|
-
@import "@/components/
|
|
26
|
+
@import "@/components/tooltip/assets/index.css" layer(components);
|
|
27
27
|
```
|
|
28
28
|
|
|
29
29
|
### Docs
|
package/src/main.css
CHANGED
package/src/test.css
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
@import "base/index.css";
|
|
2
|
+
@import "components/index.css" layer(components);
|
|
3
|
+
@import "utilities/index.css" layer(components);
|
|
4
|
+
@import "tailwindcss/base.css";
|
|
5
|
+
@import "tailwindcss/components.css";
|
|
6
|
+
@import "tailwindcss/utilities.css";
|
|
7
|
+
@import "tailwindcss/variants.css";
|
package/src/utilities/common.css
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
.grid-cols-container {
|
|
2
|
-
display: grid;
|
|
3
2
|
grid-template-columns:
|
|
4
3
|
[container-full-start] minmax(var(--container-padding), 1fr)
|
|
5
4
|
[container-lg-start] minmax(0, calc((var(--container-lg-width) - var(--container-width)) / 2))
|
|
6
5
|
[container-start] min(100% - (var(--container-padding) * 2), var(--container-width)) [container-end]
|
|
7
6
|
minmax(0, calc((var(--container-lg-width) - var(--container-width)) / 2)) [container-lg-end]
|
|
8
7
|
minmax(var(--container-padding), 1fr) [container-full-end];
|
|
9
|
-
}
|
|
10
8
|
|
|
11
|
-
:where(
|
|
12
|
-
|
|
9
|
+
& > :where(*) {
|
|
10
|
+
grid-column: container;
|
|
11
|
+
}
|
|
13
12
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
@import "default.css";
|
|
2
|
-
@import "default
|
|
2
|
+
@import "props/default.css";
|
|
@@ -1,25 +1,34 @@
|
|
|
1
1
|
.divider {
|
|
2
2
|
--color-accent: currentColor;
|
|
3
|
-
--tw-border-opacity: 0.15;
|
|
4
3
|
|
|
5
4
|
display: flex;
|
|
6
5
|
align-items: center;
|
|
7
6
|
align-self: stretch;
|
|
8
7
|
|
|
9
8
|
&:where(:not(:empty)) {
|
|
10
|
-
gap: var(--spacing-md);
|
|
9
|
+
gap: var(--divider-gap, var(--spacing-md));
|
|
11
10
|
}
|
|
12
11
|
|
|
13
12
|
&::before, &::after {
|
|
14
13
|
content: "";
|
|
15
14
|
flex-grow: 1;
|
|
16
|
-
border-block-start:
|
|
15
|
+
border-block-start:
|
|
16
|
+
1px solid color-mix(
|
|
17
|
+
in var(--divider-border-block-color-space, srgb),
|
|
18
|
+
var(--divider-border-block-color, var(--color-accent)) var(--divider-border-block-color-opacity, 15%),
|
|
19
|
+
var(--divider-border-block-color-mix, transparent)
|
|
20
|
+
);
|
|
17
21
|
}
|
|
18
22
|
|
|
19
23
|
&:where(.flex-col) {
|
|
20
24
|
&::before, &::after {
|
|
21
25
|
border-block-start: 0;
|
|
22
|
-
border-inline-start:
|
|
26
|
+
border-inline-start:
|
|
27
|
+
1px solid color-mix(
|
|
28
|
+
in var(--divider-border-inline-color-space, srgb),
|
|
29
|
+
var(--divider-border-inline-color, var(--color-accent)) var(--divider-border-inline-color-opacity, 15%),
|
|
30
|
+
var(--divider-border-inline-color-mix, transparent)
|
|
31
|
+
);
|
|
23
32
|
}
|
|
24
33
|
}
|
|
25
34
|
}
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
.ripple {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
background-color:
|
|
2
|
+
inline-size: var(--ripple-size, 2rem);
|
|
3
|
+
block-size: var(--ripple-size, 2rem);
|
|
4
|
+
background-color:
|
|
5
|
+
color-mix(
|
|
6
|
+
in var(--ripple-background-color-space, srgb),
|
|
7
|
+
var(--ripple-background-color, currentColor) var(--ripple-background-color-opacity, 40%),
|
|
8
|
+
var(--ripple-background-color-mix, transparent)
|
|
9
|
+
);
|
|
10
|
+
animation-duration: var(--ripple-animation-duration, 1s);
|
|
5
11
|
position: absolute;
|
|
6
12
|
border-radius: 50%;
|
|
7
13
|
transform: scale(0);
|
|
8
|
-
animation-duration: 1s;
|
|
9
14
|
pointer-events: none;
|
|
10
|
-
width: 2rem;
|
|
11
|
-
height: 2rem;
|
|
12
15
|
}
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
.skeleton {
|
|
2
|
-
background:
|
|
2
|
+
background:
|
|
3
|
+
linear-gradient(
|
|
4
|
+
to right,
|
|
5
|
+
var(--skeleton-gradient-from),
|
|
6
|
+
var(--skeleton-gradient-to),
|
|
7
|
+
var(--skeleton-gradient-to),
|
|
8
|
+
var(--skeleton-gradient-from)
|
|
9
|
+
);
|
|
3
10
|
opacity: var(--skeleton-opacity);
|
|
4
11
|
transition: var(--transition-opacity);
|
|
5
12
|
animation: move-indeterminate 1.5s linear infinite;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
@import "default.css";
|
|
2
|
-
@import "default
|
|
2
|
+
@import "props/default.css";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
.swap {
|
|
2
|
+
cursor: var(--cursor-pointer, pointer);
|
|
2
3
|
display: inline-grid;
|
|
3
|
-
cursor: var(--cursor, pointer);
|
|
4
4
|
|
|
5
5
|
> :where(*) {
|
|
6
|
-
transition-property: var(--transition);
|
|
7
|
-
transition-timing-function: var(--
|
|
8
|
-
transition-duration: var(--duration);
|
|
6
|
+
transition-property: var(--default-transition-property);
|
|
7
|
+
transition-timing-function: var(--transition-timing-function-in-out);
|
|
8
|
+
transition-duration: var(--default-transition-duration);
|
|
9
9
|
grid-area: 1/-1;
|
|
10
|
-
opacity: 0
|
|
10
|
+
opacity: 0%;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
> [aria-hidden="false"],
|
|
@@ -15,6 +15,6 @@
|
|
|
15
15
|
input:indeterminate ~ :where(*:nth-last-child(2)),
|
|
16
16
|
input:checked ~ :where(*:last-child) {
|
|
17
17
|
transform: none;
|
|
18
|
-
opacity:
|
|
18
|
+
opacity: 100%;
|
|
19
19
|
}
|
|
20
20
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
.underline {
|
|
2
|
-
text-underline-offset: var(--
|
|
2
|
+
text-underline-offset: var(--default-underline-offset, 0.125em);
|
|
3
3
|
}
|
|
4
4
|
|
|
5
5
|
.underline-transparent {
|
|
6
6
|
&:where(:any-link, button:enabled, [role="button"]) {
|
|
7
|
-
transition: all var(--duration) var(--
|
|
7
|
+
transition: all var(--default-transition-duration) var(--transition-timing-function-in-out);
|
|
8
8
|
|
|
9
9
|
&:not(:hover, :focus-visible) {
|
|
10
|
-
text-underline-offset: var(--
|
|
10
|
+
text-underline-offset: var(--default-underline-transparent-offset, -0.25em);
|
|
11
11
|
text-decoration-color: transparent;
|
|
12
12
|
}
|
|
13
13
|
}
|
package/types/index.d.ts
CHANGED
|
@@ -23,11 +23,13 @@ declare module 'winduum' {
|
|
|
23
23
|
export const defaultConfig: PluginOptions
|
|
24
24
|
|
|
25
25
|
export default function createPlugin(userConfig?: PluginOptions): Plugin
|
|
26
|
+
|
|
27
|
+
export {};
|
|
26
28
|
}
|
|
27
29
|
|
|
28
30
|
declare module 'winduum/src/components/carousel' {
|
|
29
31
|
export interface ObserveCarouselOptions {
|
|
30
|
-
|
|
32
|
+
visibleAttribute?: string
|
|
31
33
|
observerOptions?: {
|
|
32
34
|
rootMargin?: string
|
|
33
35
|
threshold?: number | number[]
|
|
@@ -37,7 +39,7 @@ declare module 'winduum/src/components/carousel' {
|
|
|
37
39
|
export interface PaginationCarouselOptions {
|
|
38
40
|
element?: HTMLElement | Element
|
|
39
41
|
itemContent?: string
|
|
40
|
-
|
|
42
|
+
activeAttribute?: string
|
|
41
43
|
}
|
|
42
44
|
|
|
43
45
|
export interface ScrollCarouselOptions {
|
|
@@ -54,7 +56,7 @@ declare module 'winduum/src/components/carousel' {
|
|
|
54
56
|
}
|
|
55
57
|
|
|
56
58
|
export interface DragCarouselOptions {
|
|
57
|
-
|
|
59
|
+
activeAttribute?: string
|
|
58
60
|
}
|
|
59
61
|
|
|
60
62
|
export function scrollPrev(element: HTMLElement | Element): void
|
|
@@ -66,6 +68,8 @@ declare module 'winduum/src/components/carousel' {
|
|
|
66
68
|
export function paginationCarousel(element: HTMLElement | Element, options?: PaginationCarouselOptions): void
|
|
67
69
|
export function autoplayCarousel(element: HTMLElement | Element, options?: AutoplayCarouselOptions): void
|
|
68
70
|
export function dragCarousel(element: HTMLElement | Element, options?: DragCarouselOptions): void
|
|
71
|
+
|
|
72
|
+
export {};
|
|
69
73
|
}
|
|
70
74
|
|
|
71
75
|
declare module 'winduum/src/components/compare' {
|
|
@@ -77,6 +81,8 @@ declare module 'winduum/src/components/compare' {
|
|
|
77
81
|
export function setPosition(event: Event, options?: SetPositionOptions): void
|
|
78
82
|
export function setKeyboardStep(event: KeyboardEvent, step?: string): void
|
|
79
83
|
export function setMouseStep(event: MouseEvent, step?: string): void
|
|
84
|
+
|
|
85
|
+
export {};
|
|
80
86
|
}
|
|
81
87
|
|
|
82
88
|
declare module 'winduum/src/components/details' {
|
|
@@ -89,35 +95,24 @@ declare module 'winduum/src/components/details' {
|
|
|
89
95
|
export function showDetails(selector: HTMLInputElement | HTMLElement, options?: DefaultOptions): Promise<void>
|
|
90
96
|
export function closeDetails(selector: HTMLInputElement | HTMLElement, options?: DefaultOptions): Promise<void>
|
|
91
97
|
export function toggleDetails(selector: HTMLInputElement | HTMLElement, options?: DefaultOptions): Promise<void>
|
|
98
|
+
|
|
99
|
+
export {};
|
|
92
100
|
}
|
|
93
101
|
|
|
94
102
|
declare module 'winduum/src/components/dialog' {
|
|
95
103
|
export interface DefaultOptions {
|
|
96
104
|
remove?: boolean | null
|
|
97
105
|
closable?: boolean | null
|
|
98
|
-
|
|
106
|
+
openAttribute?: string
|
|
107
|
+
closedAttribute?: string
|
|
99
108
|
scrollbarWidthProperty?: string
|
|
100
109
|
}
|
|
101
110
|
|
|
102
|
-
export interface InsertDialogOptions {
|
|
103
|
-
selector?: string | null
|
|
104
|
-
class?: string | null
|
|
105
|
-
append?: boolean | null
|
|
106
|
-
show?: DefaultOptions
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
export interface FetchDialogOptions {
|
|
110
|
-
url: string
|
|
111
|
-
insert?: InsertDialogOptions
|
|
112
|
-
}
|
|
113
|
-
|
|
114
111
|
export const defaultOptions: DefaultOptions
|
|
115
|
-
export function
|
|
116
|
-
export function
|
|
117
|
-
|
|
118
|
-
export
|
|
119
|
-
export function insertDialog(content: string, options?: InsertDialogOptions): Promise<void>
|
|
120
|
-
export function fetchDialog({ url, insert }: FetchDialogOptions): Promise<void>
|
|
112
|
+
export function showDialog(element: HTMLDialogElement | HTMLElement, options?: DefaultOptions): Promise<void>
|
|
113
|
+
export function closeDialog(element: HTMLDialogElement | HTMLElement, options?: DefaultOptions): Promise<void>
|
|
114
|
+
|
|
115
|
+
export {};
|
|
121
116
|
}
|
|
122
117
|
|
|
123
118
|
declare module 'winduum/src/components/drawer' {
|
|
@@ -134,6 +129,8 @@ declare module 'winduum/src/components/drawer' {
|
|
|
134
129
|
export function showDrawer(element: HTMLElement | Element, distance?: number, direction?: 'left' | 'top'): void
|
|
135
130
|
export function closeDrawer(element: HTMLElement | Element, distance?: number, direction?: 'left' | 'top'): void
|
|
136
131
|
export function scrollDrawer(element: HTMLElement | Element, options?: ScrollDrawerOptions): void
|
|
132
|
+
|
|
133
|
+
export {};
|
|
137
134
|
}
|
|
138
135
|
|
|
139
136
|
declare module 'winduum/src/components/form' {
|
|
@@ -163,6 +160,8 @@ declare module 'winduum/src/components/form' {
|
|
|
163
160
|
|
|
164
161
|
export function validateForm(event: Event | SubmitEvent, options?: ValidateFormOptions): void
|
|
165
162
|
export function validateField(element: HTMLElement | SubmitEvent, options?: ValidateFieldOptions): void
|
|
163
|
+
|
|
164
|
+
export {};
|
|
166
165
|
}
|
|
167
166
|
|
|
168
167
|
declare module 'winduum/src/components/tabs' {
|
|
@@ -172,6 +171,8 @@ declare module 'winduum/src/components/tabs' {
|
|
|
172
171
|
}
|
|
173
172
|
|
|
174
173
|
export function toggleTab(element: HTMLElement | Element, options?: ToggleTabOptions): void
|
|
174
|
+
|
|
175
|
+
export {};
|
|
175
176
|
}
|
|
176
177
|
|
|
177
178
|
declare module 'winduum/src/components/toaster' {
|
|
@@ -205,12 +206,14 @@ declare module 'winduum/src/components/toaster' {
|
|
|
205
206
|
export function insertToaster(element: HTMLElement, options?: InsertToasterOptions): Promise<void>
|
|
206
207
|
export function insertToast(element: HTMLElement, options?: InsertToastOptions): Promise<void>
|
|
207
208
|
export function closeToaster(element: HTMLElement, options?: CloseToastOptions): Promise<void>
|
|
209
|
+
|
|
210
|
+
export {};
|
|
208
211
|
}
|
|
209
212
|
|
|
210
213
|
declare module 'winduum/src/components/popover' {
|
|
211
214
|
import type { FlipOptions, Middleware, OffsetOptions, Placement, ShiftOptions } from '@floating-ui/dom';
|
|
212
215
|
export interface ShowPopoverOptions {
|
|
213
|
-
|
|
216
|
+
openAttribute?: string
|
|
214
217
|
compute?: boolean
|
|
215
218
|
placement?: Placement
|
|
216
219
|
middleware?: Array<Middleware | null | undefined | false>
|
|
@@ -219,12 +222,18 @@ declare module 'winduum/src/components/popover' {
|
|
|
219
222
|
shift?: ShiftOptions
|
|
220
223
|
}
|
|
221
224
|
|
|
225
|
+
export interface HidePopoverOptions {
|
|
226
|
+
openAttribute?: string
|
|
227
|
+
}
|
|
228
|
+
|
|
222
229
|
export function showPopover(element: HTMLElement | Element, options?: ShowPopoverOptions): Promise<void>
|
|
223
230
|
export function hidePopover(element: HTMLElement | Element): Promise<void>
|
|
224
231
|
export function togglePopover(element: HTMLElement | Element, options?: ShowPopoverOptions): Promise<void>
|
|
232
|
+
|
|
233
|
+
export {};
|
|
225
234
|
}
|
|
226
235
|
|
|
227
|
-
declare module 'winduum/src/
|
|
236
|
+
declare module 'winduum/src/components/range' {
|
|
228
237
|
export interface SetTrackPropertyOptions {
|
|
229
238
|
element: HTMLElement | Element
|
|
230
239
|
value: string
|
|
@@ -244,14 +253,20 @@ declare module 'winduum/src/ui/range' {
|
|
|
244
253
|
export function setTrackProperty(options: SetTrackPropertyOptions, track: 'start' | 'end'): void
|
|
245
254
|
export function setValue(element: HTMLInputElement, options?: SetValueOptions): void
|
|
246
255
|
export function setOutputValue(element: HTMLInputElement, outputElement: HTMLOutputElement | Element, options?: SetOutputOptions): void
|
|
256
|
+
|
|
257
|
+
export {};
|
|
247
258
|
}
|
|
248
259
|
|
|
249
260
|
declare module 'winduum/src/utilities/ripple' {
|
|
250
261
|
export function showRipple(event: MouseEvent, element?: HTMLElement): void
|
|
262
|
+
|
|
263
|
+
export {};
|
|
251
264
|
}
|
|
252
265
|
|
|
253
266
|
declare module 'winduum/src/utilities/swap' {
|
|
254
267
|
export function toggleSwap(element: HTMLElement): void
|
|
268
|
+
|
|
269
|
+
export {};
|
|
255
270
|
}
|
|
256
271
|
|
|
257
272
|
//# sourceMappingURL=index.d.ts.map
|