webcoreui 0.0.12 → 0.1.0
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/README.md +10 -5
- package/components/Accordion/accordion.module.scss +21 -27
- package/components/Alert/alert.module.scss +18 -21
- package/components/Avatar/avatar.module.scss +9 -6
- package/components/Badge/badge.module.scss +31 -34
- package/components/Button/Button.astro +0 -2
- package/components/Button/Button.svelte +0 -2
- package/components/Button/Button.tsx +0 -2
- package/components/Button/button.module.scss +32 -39
- package/components/Button/button.ts +0 -1
- package/components/Card/card.module.scss +20 -15
- package/components/Checkbox/checkbox.module.scss +27 -41
- package/components/Icon/Icon.astro +2 -2
- package/components/Input/input.module.scss +28 -36
- package/components/Menu/menu.module.scss +141 -144
- package/components/Progress/progress.module.scss +26 -22
- package/components/Radio/radio.module.scss +33 -41
- package/components/Rating/rating.module.scss +15 -8
- package/components/Spinner/spinner.module.scss +11 -2
- package/components/Switch/switch.module.scss +28 -30
- package/components/Table/table.module.scss +13 -17
- package/components/Tabs/Tabs.astro +0 -1
- package/components/Tabs/tabs.module.scss +40 -48
- package/components/ThemeSwitcher/themeswitcher.module.scss +28 -26
- package/components/Timeline/timeline.module.scss +24 -19
- package/components/TimelineItem/timelineitem.module.scss +15 -17
- package/components/Toast/toast.module.scss +10 -14
- package/components/Toast/toast.ts +6 -1
- package/icons.d.ts +11 -0
- package/icons.js +9 -0
- package/package.json +3 -1
- package/scss/config/color-palette.scss +23 -0
- package/scss/config/css-values.scss +44 -0
- package/scss/config/layout.scss +41 -0
- package/scss/config/mixins.scss +395 -9
- package/scss/config/typography.scss +66 -0
- package/scss/config.scss +6 -1
- package/scss/global/elements.scss +21 -1
- package/scss/global/scrollbar.scss +12 -9
- package/scss/global/theme.scss +2 -2
- package/scss/global/tooltip.scss +40 -35
- package/scss/global/utility.scss +4 -4
- package/scss/global.scss +0 -1
- package/scss/resets.scss +62 -9
- package/scss/setup.scss +12 -39
- package/utils/toast.ts +3 -2
|
@@ -1,26 +1,20 @@
|
|
|
1
|
-
@
|
|
1
|
+
@use '../../scss/config.scss' as *;
|
|
2
|
+
|
|
3
|
+
body {
|
|
4
|
+
--w-checkbox-color: var(--w-color-primary);
|
|
5
|
+
}
|
|
2
6
|
|
|
3
7
|
.checkbox {
|
|
8
|
+
@include layout(inline-flex, sm);
|
|
9
|
+
@include typography(md, hmd);
|
|
10
|
+
|
|
4
11
|
cursor: pointer;
|
|
5
|
-
display: inline-flex;
|
|
6
|
-
align-items: center;
|
|
7
|
-
gap: 10px;
|
|
8
|
-
font-size: 16px;
|
|
9
|
-
line-height: 1.5;
|
|
10
12
|
|
|
11
13
|
&.col {
|
|
12
|
-
|
|
13
|
-
align-items: flex-start;
|
|
14
|
-
justify-content: flex-start;
|
|
15
|
-
gap: 0;
|
|
14
|
+
@include layout(column, h-start, v-start, none);
|
|
16
15
|
|
|
17
16
|
.wrapper {
|
|
18
|
-
|
|
19
|
-
gap: 10px;
|
|
20
|
-
|
|
21
|
-
.check {
|
|
22
|
-
margin-top: 5px;
|
|
23
|
-
}
|
|
17
|
+
@include layout(flex, sm);
|
|
24
18
|
}
|
|
25
19
|
}
|
|
26
20
|
|
|
@@ -28,56 +22,48 @@
|
|
|
28
22
|
display: none;
|
|
29
23
|
|
|
30
24
|
&:checked + span {
|
|
31
|
-
background
|
|
25
|
+
@include background(var(--w-checkbox-color));
|
|
32
26
|
|
|
33
27
|
svg {
|
|
34
|
-
position
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
28
|
+
@include position(absolute, center);
|
|
29
|
+
@include typography(primary-50);
|
|
30
|
+
@include size(10px);
|
|
31
|
+
|
|
38
32
|
display: block;
|
|
39
|
-
color: var(--w-color-primary-50);
|
|
40
|
-
width: 10px;
|
|
41
|
-
height: 10px;
|
|
42
33
|
}
|
|
43
34
|
}
|
|
44
35
|
|
|
45
36
|
&:disabled + span {
|
|
46
|
-
background
|
|
47
|
-
border
|
|
37
|
+
@include background(primary-40);
|
|
38
|
+
@include border(primary-40);
|
|
48
39
|
cursor: no-drop;
|
|
49
40
|
}
|
|
50
41
|
}
|
|
51
42
|
|
|
52
|
-
a {
|
|
53
|
-
text-decoration: underline;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
43
|
.check {
|
|
44
|
+
@include size(15px);
|
|
45
|
+
@include position(relative);
|
|
46
|
+
@include border-radius(sm);
|
|
47
|
+
@include spacing(mt-xs);
|
|
48
|
+
|
|
57
49
|
display: inline-block;
|
|
58
|
-
width: 15px;
|
|
59
|
-
height: 15px;
|
|
60
50
|
min-width: 15px;
|
|
61
51
|
border: 1px solid var(--w-checkbox-color);
|
|
62
|
-
border-radius: 2px;
|
|
63
|
-
position: relative;
|
|
64
52
|
|
|
65
53
|
svg {
|
|
66
|
-
|
|
54
|
+
@include visibility(none);
|
|
67
55
|
}
|
|
68
56
|
}
|
|
69
57
|
|
|
70
58
|
.text {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
color: var(--w-color-primary-20);
|
|
59
|
+
@include spacing(ml-lg);
|
|
60
|
+
@include typography(sm, primary-20);
|
|
74
61
|
|
|
75
62
|
a {
|
|
76
|
-
@include
|
|
77
|
-
color: var(--w-color-primary-20);
|
|
63
|
+
@include typography(primary-20);
|
|
78
64
|
|
|
79
65
|
&:hover {
|
|
80
|
-
|
|
66
|
+
@include typography(primary);
|
|
81
67
|
}
|
|
82
68
|
}
|
|
83
69
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
import type { IconProps } from './icon'
|
|
3
|
+
import iconMap from './map'
|
|
3
4
|
|
|
4
5
|
interface Props extends IconProps {}
|
|
5
6
|
|
|
@@ -9,8 +10,7 @@ const {
|
|
|
9
10
|
color
|
|
10
11
|
} = Astro.props
|
|
11
12
|
|
|
12
|
-
const
|
|
13
|
-
const icon = markup
|
|
13
|
+
const icon = iconMap[type as keyof typeof iconMap]
|
|
14
14
|
.replace('width="24"', `width=${size}`)
|
|
15
15
|
.replace('height="24"', color
|
|
16
16
|
? `height=${size} color=${color}`
|
|
@@ -1,87 +1,79 @@
|
|
|
1
|
-
@
|
|
1
|
+
@use '../../scss/config.scss' as *;
|
|
2
2
|
|
|
3
3
|
.input {
|
|
4
|
-
border-radius
|
|
5
|
-
|
|
6
|
-
border
|
|
7
|
-
background
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
width: 100%;
|
|
4
|
+
@include border-radius(sm);
|
|
5
|
+
@include spacing(py-xs, px-sm);
|
|
6
|
+
@include border(primary-50);
|
|
7
|
+
@include background(transparent);
|
|
8
|
+
@include typography(regular, primary, hlg);
|
|
9
|
+
@include size('w100%');
|
|
10
|
+
|
|
12
11
|
color-scheme: var(--w-color-scheme);
|
|
13
12
|
|
|
14
13
|
&[disabled] {
|
|
14
|
+
@include typography(primary-30);
|
|
15
15
|
cursor: no-drop;
|
|
16
|
-
color: var(--w-color-primary-30);
|
|
17
16
|
}
|
|
18
17
|
|
|
19
18
|
&::file-selector-button {
|
|
20
|
-
background
|
|
21
|
-
border
|
|
22
|
-
|
|
19
|
+
@include background(transparent);
|
|
20
|
+
@include border(0);
|
|
21
|
+
@include typography(primary);
|
|
23
22
|
}
|
|
24
23
|
|
|
25
24
|
&::placeholder {
|
|
26
|
-
|
|
25
|
+
@include typography(primary-30);
|
|
27
26
|
}
|
|
28
27
|
|
|
29
28
|
&[type="color"] {
|
|
30
|
-
|
|
29
|
+
@include spacing(p0);
|
|
31
30
|
}
|
|
32
31
|
|
|
33
32
|
&.info {
|
|
34
|
-
border
|
|
33
|
+
@include border(info);
|
|
35
34
|
}
|
|
36
35
|
|
|
37
36
|
&.success {
|
|
38
|
-
border
|
|
37
|
+
@include border(success);
|
|
39
38
|
}
|
|
40
39
|
|
|
41
40
|
&.warning {
|
|
42
|
-
border
|
|
41
|
+
@include border(warning);
|
|
43
42
|
}
|
|
44
43
|
|
|
45
44
|
&.alert {
|
|
46
|
-
border
|
|
45
|
+
@include border(alert);
|
|
47
46
|
}
|
|
48
47
|
|
|
49
48
|
&.fill {
|
|
50
|
-
background
|
|
49
|
+
@include background(primary-50);
|
|
51
50
|
}
|
|
52
51
|
}
|
|
53
52
|
|
|
54
53
|
.input-label {
|
|
55
|
-
|
|
56
|
-
flex-direction: column;
|
|
54
|
+
@include layout(flex, column);
|
|
57
55
|
|
|
58
56
|
.label {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
margin-bottom: 5px;
|
|
57
|
+
@include typography(md, primary-20);
|
|
58
|
+
@include spacing(mb-xs);
|
|
62
59
|
}
|
|
63
60
|
|
|
64
61
|
.wrapper {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
align-items: center;
|
|
68
|
-
position: relative;
|
|
62
|
+
@include layout(flex, v-center, sm);
|
|
63
|
+
@include position(relative);
|
|
69
64
|
|
|
70
65
|
input {
|
|
71
66
|
padding-left: 40px;
|
|
72
67
|
}
|
|
73
68
|
|
|
74
69
|
svg {
|
|
75
|
-
position
|
|
76
|
-
|
|
77
|
-
width: 20px;
|
|
78
|
-
height: 20px;
|
|
70
|
+
@include position(absolute, l10px);
|
|
71
|
+
@include size(20px);
|
|
79
72
|
}
|
|
80
73
|
}
|
|
81
74
|
|
|
82
75
|
.subtext {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
margin-top: 5px;
|
|
76
|
+
@include typography(sm, primary-30);
|
|
77
|
+
@include spacing(mt-xs);
|
|
86
78
|
}
|
|
87
79
|
}
|
|
@@ -1,144 +1,141 @@
|
|
|
1
|
-
@
|
|
2
|
-
|
|
3
|
-
.menu {
|
|
4
|
-
background
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
border
|
|
8
|
-
position
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
.meat:
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
@include
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
background
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
&:nth-child(
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
&:last-child {
|
|
113
|
-
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
.container {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
}
|
|
1
|
+
@use '../../scss/config.scss' as *;
|
|
2
|
+
|
|
3
|
+
.menu {
|
|
4
|
+
@include background(primary-70);
|
|
5
|
+
@include spacing(p-md);
|
|
6
|
+
@include typography(md);
|
|
7
|
+
@include border(bottom, primary-50);
|
|
8
|
+
@include position(sticky, t0);
|
|
9
|
+
@include layer(header);
|
|
10
|
+
|
|
11
|
+
&[data-active="true"] {
|
|
12
|
+
.hamburger {
|
|
13
|
+
box-shadow: 0 0 0 1000px var(--w-color-primary-70);
|
|
14
|
+
|
|
15
|
+
.meat:first-child,
|
|
16
|
+
.meat:last-child {
|
|
17
|
+
@include visibility(0);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.meat:first-child {
|
|
21
|
+
transform: translateY(20px) scale(0);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.meat:last-child {
|
|
25
|
+
transform: translateY(-20px) scale(0);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.meat:nth-child(2) {
|
|
29
|
+
transform: rotate(45deg);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.meat:nth-child(3) {
|
|
33
|
+
transform: rotate(-45deg);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
ul {
|
|
38
|
+
@include transition(opacity);
|
|
39
|
+
@include visibility(1);
|
|
40
|
+
@include layer(header);
|
|
41
|
+
pointer-events: all;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.wrapper {
|
|
46
|
+
@include layout(flex, v-center, default);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
a {
|
|
50
|
+
@include typography(none);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
img,
|
|
54
|
+
svg {
|
|
55
|
+
display: block;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
ul {
|
|
59
|
+
@include spacing(0);
|
|
60
|
+
@include layout(flex, default, column);
|
|
61
|
+
@include position(fixed, t20px, l20px);
|
|
62
|
+
@include visibility(0);
|
|
63
|
+
@include typography(normal);
|
|
64
|
+
|
|
65
|
+
list-style-type: none;
|
|
66
|
+
pointer-events: none;
|
|
67
|
+
|
|
68
|
+
li {
|
|
69
|
+
@include spacing(m0);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
a {
|
|
73
|
+
@include typography(primary-20);
|
|
74
|
+
|
|
75
|
+
&:hover {
|
|
76
|
+
@include typography(primary);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.hamburger {
|
|
82
|
+
@include transition(box-shadow);
|
|
83
|
+
@include position(relative);
|
|
84
|
+
@include size(w30px, h20px);
|
|
85
|
+
@include border-radius(max);
|
|
86
|
+
@include spacing(p0);
|
|
87
|
+
@include border(0);
|
|
88
|
+
@include background(transparent);
|
|
89
|
+
@include layer(top);
|
|
90
|
+
|
|
91
|
+
box-shadow: 0 0 0 0 var(--w-color-primary-70);
|
|
92
|
+
cursor: pointer;
|
|
93
|
+
|
|
94
|
+
.meat {
|
|
95
|
+
@include transition();
|
|
96
|
+
@include size('w100%', h2px);
|
|
97
|
+
@include position(absolute);
|
|
98
|
+
@include background(primary);
|
|
99
|
+
@include border-radius(md);
|
|
100
|
+
|
|
101
|
+
display: block;
|
|
102
|
+
|
|
103
|
+
&:first-child {
|
|
104
|
+
@include position(t0);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
&:nth-child(2),
|
|
108
|
+
&:nth-child(3) {
|
|
109
|
+
@include position(v-center);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
&:last-child {
|
|
113
|
+
@include position(b0);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.container {
|
|
120
|
+
@include layout(flex, v-center, default, h-between, wrap);
|
|
121
|
+
@include spacing(auto-none, px-default);
|
|
122
|
+
|
|
123
|
+
max-width: 1200px;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
@include media('sm') {
|
|
127
|
+
.menu {
|
|
128
|
+
.hamburger {
|
|
129
|
+
@include visibility(none);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
ul {
|
|
133
|
+
@include position(static);
|
|
134
|
+
@include visibility(1);
|
|
135
|
+
@include layout(row);
|
|
136
|
+
|
|
137
|
+
pointer-events: all;
|
|
138
|
+
transform: none;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
@@ -1,35 +1,40 @@
|
|
|
1
|
-
@
|
|
1
|
+
@use '../../scss/config.scss' as *;
|
|
2
|
+
|
|
3
|
+
body {
|
|
4
|
+
--w-progress-color: var(--w-color-primary);
|
|
5
|
+
--w-progress-background: var(--w-color-primary-50);
|
|
6
|
+
--w-progress-stripe-light: var(--w-color-primary);
|
|
7
|
+
--w-progress-stripe-dark: var(--w-color-primary-10);
|
|
8
|
+
}
|
|
2
9
|
|
|
3
10
|
.w-progress {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
11
|
+
@include size('w100%', h10px);
|
|
12
|
+
@include border-radius(xl);
|
|
13
|
+
@include visibility(hidden);
|
|
14
|
+
@include typography(bold, xxs);
|
|
15
|
+
@include background(var(--w-progress-background));
|
|
16
|
+
|
|
9
17
|
color: var(--w-progress-background);
|
|
10
|
-
font-family: Bold;
|
|
11
|
-
font-size: 10px;
|
|
12
18
|
|
|
13
19
|
&.medium {
|
|
14
|
-
|
|
15
|
-
|
|
20
|
+
@include size(h15px);
|
|
21
|
+
@include typography(xs);
|
|
16
22
|
}
|
|
17
23
|
|
|
18
24
|
&.large {
|
|
19
|
-
|
|
20
|
-
|
|
25
|
+
@include size(h20px);
|
|
26
|
+
@include typography(sm);
|
|
21
27
|
}
|
|
22
28
|
|
|
23
29
|
&.square {
|
|
24
|
-
border-radius
|
|
30
|
+
@include border-radius(sm);
|
|
25
31
|
|
|
26
32
|
.progress {
|
|
27
|
-
border-radius
|
|
33
|
+
@include border-radius(sm);
|
|
28
34
|
}
|
|
29
35
|
}
|
|
30
36
|
|
|
31
37
|
&.striped {
|
|
32
|
-
|
|
33
38
|
.progress {
|
|
34
39
|
background-size: 10px 10px;
|
|
35
40
|
background-image: linear-gradient(
|
|
@@ -54,13 +59,12 @@
|
|
|
54
59
|
}
|
|
55
60
|
|
|
56
61
|
.progress {
|
|
57
|
-
@include
|
|
62
|
+
@include transition(width);
|
|
63
|
+
@include size('h100%');
|
|
64
|
+
@include border-radius(xl);
|
|
65
|
+
@include layout(flex, center);
|
|
66
|
+
@include background(var(--w-progress-color));
|
|
67
|
+
|
|
58
68
|
width: var(--w-progress-width);
|
|
59
|
-
height: 100%;
|
|
60
|
-
background: var(--w-progress-color);
|
|
61
|
-
border-radius: 20px;
|
|
62
|
-
display: flex;
|
|
63
|
-
align-items: center;
|
|
64
|
-
justify-content: center;
|
|
65
69
|
}
|
|
66
70
|
}
|