webcoreui 0.0.12 → 0.2.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 +39 -6
- package/astro.d.ts +4 -0
- package/astro.js +4 -0
- package/components/Accordion/accordion.module.scss +20 -27
- package/components/Alert/alert.module.scss +19 -22
- 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 +1 -2
- package/components/Card/card.module.scss +19 -15
- package/components/Checkbox/checkbox.module.scss +27 -41
- package/components/Icon/Icon.astro +2 -2
- package/components/Icon/map.ts +2 -0
- package/components/Input/input.module.scss +28 -36
- package/components/Menu/Menu.astro +7 -3
- package/components/Menu/Menu.svelte +11 -3
- package/components/Menu/Menu.tsx +7 -1
- package/components/Menu/menu.module.scss +144 -144
- package/components/Menu/menu.ts +1 -0
- package/components/Modal/Modal.astro +70 -0
- package/components/Modal/Modal.svelte +71 -0
- package/components/Modal/Modal.tsx +76 -0
- package/components/Modal/modal.module.scss +103 -0
- package/components/Modal/modal.ts +18 -0
- package/components/Progress/progress.module.scss +26 -22
- package/components/Radio/radio.module.scss +32 -41
- package/components/Rating/Rating.astro +2 -2
- package/components/Rating/Rating.svelte +2 -2
- package/components/Rating/Rating.tsx +2 -2
- package/components/Rating/rating.module.scss +15 -8
- package/components/Slider/Slider.astro +44 -0
- package/components/Slider/Slider.svelte +42 -0
- package/components/Slider/Slider.tsx +48 -0
- package/components/Slider/slider.module.scss +68 -0
- package/components/Slider/slider.ts +20 -0
- package/components/Spinner/spinner.module.scss +11 -2
- package/components/Switch/switch.module.scss +28 -30
- package/components/Table/Table.astro +6 -1
- package/components/Table/Table.svelte +3 -1
- package/components/Table/Table.tsx +7 -1
- package/components/Table/table.module.scss +23 -17
- package/components/Table/table.ts +1 -0
- package/components/Tabs/Tabs.astro +0 -1
- package/components/Tabs/tabs.module.scss +45 -48
- package/components/ThemeSwitcher/ThemeSwitcher.astro +1 -0
- package/components/ThemeSwitcher/ThemeSwitcher.svelte +2 -1
- package/components/ThemeSwitcher/ThemeSwitcher.tsx +2 -1
- package/components/ThemeSwitcher/themeswitcher.module.scss +28 -26
- package/components/Timeline/timeline.module.scss +28 -23
- package/components/TimelineItem/TimelineItem.tsx +1 -6
- package/components/TimelineItem/timelineitem.module.scss +14 -17
- package/components/TimelineItem/timelineitem.ts +5 -0
- package/components/Toast/toast.module.scss +10 -14
- package/components/Toast/toast.ts +6 -1
- package/icons/close.svg +3 -0
- package/icons.d.ts +12 -0
- package/icons.js +10 -0
- package/index.js +2 -0
- package/package.json +3 -1
- package/react.d.ts +6 -2
- package/react.js +4 -0
- package/scss/config/color-palette.scss +24 -0
- package/scss/config/css-values.scss +44 -0
- package/scss/config/layout.scss +41 -0
- package/scss/config/mixins.scss +392 -9
- package/scss/config/typography.scss +65 -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 +73 -40
- package/scss/global/tooltip.scss +42 -35
- package/scss/global/utility.scss +79 -61
- package/scss/global.scss +0 -1
- package/scss/resets.scss +67 -9
- package/scss/setup.scss +14 -41
- package/svelte.d.ts +4 -0
- package/svelte.js +4 -0
- package/utils/interpolate.ts +23 -0
- package/utils/modal.ts +59 -0
- package/utils/toast.ts +3 -2
|
@@ -12,6 +12,7 @@ const Table = ({
|
|
|
12
12
|
striped,
|
|
13
13
|
offsetStripe,
|
|
14
14
|
compact,
|
|
15
|
+
maxHeight,
|
|
15
16
|
className
|
|
16
17
|
}: TableProps) => {
|
|
17
18
|
const classes = classNames([
|
|
@@ -20,11 +21,16 @@ const Table = ({
|
|
|
20
21
|
striped && styles[`striped-${striped}s`],
|
|
21
22
|
offsetStripe && styles.offset,
|
|
22
23
|
compact && styles.compact,
|
|
24
|
+
maxHeight && styles.scroll,
|
|
23
25
|
className
|
|
24
26
|
])
|
|
25
27
|
|
|
28
|
+
const styleVariables = {
|
|
29
|
+
...(maxHeight && { 'max-height': maxHeight })
|
|
30
|
+
} as React.CSSProperties
|
|
31
|
+
|
|
26
32
|
return (
|
|
27
|
-
<div className={classes}>
|
|
33
|
+
<div className={classes} style={styleVariables}>
|
|
28
34
|
<table>
|
|
29
35
|
{headings?.length && (
|
|
30
36
|
<thead>
|
|
@@ -1,38 +1,34 @@
|
|
|
1
|
-
@
|
|
1
|
+
@use '../../scss/config.scss' as *;
|
|
2
2
|
|
|
3
3
|
.table {
|
|
4
|
-
|
|
4
|
+
@include visibility(auto);
|
|
5
5
|
|
|
6
6
|
table {
|
|
7
|
-
|
|
7
|
+
@include size('w100%');
|
|
8
|
+
@include typography(left);
|
|
9
|
+
|
|
8
10
|
border-collapse: collapse;
|
|
9
|
-
text-align: left;
|
|
10
|
-
font-size: 16px;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
thead,
|
|
14
14
|
tfoot {
|
|
15
|
-
|
|
15
|
+
@include typography(bold);
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
th,
|
|
19
19
|
td {
|
|
20
|
-
|
|
20
|
+
@include spacing(py-xs, px-sm);
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
thead,
|
|
24
24
|
tr {
|
|
25
|
-
border
|
|
25
|
+
@include border(bottom, primary-50);
|
|
26
26
|
|
|
27
27
|
&:last-child {
|
|
28
|
-
border
|
|
28
|
+
@include border(bottom, 0);
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
a {
|
|
33
|
-
text-decoration: underline;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
32
|
tfoot,
|
|
37
33
|
&.hover tr:hover,
|
|
38
34
|
&.striped-rows tbody tr:nth-child(odd),
|
|
@@ -40,25 +36,35 @@
|
|
|
40
36
|
&.striped-columns td:nth-child(odd),
|
|
41
37
|
&.striped-columns.offset td:nth-child(even),
|
|
42
38
|
&.hover.striped-rows.offset tbody tr:nth-child(odd):hover {
|
|
43
|
-
background
|
|
39
|
+
@include background(primary-60);
|
|
44
40
|
}
|
|
45
41
|
|
|
46
42
|
&.striped-rows tr,
|
|
47
43
|
&.striped-columns tr,
|
|
48
44
|
&.striped-columns thead {
|
|
49
|
-
border
|
|
45
|
+
@include border(bottom, 0);
|
|
50
46
|
}
|
|
51
47
|
|
|
52
48
|
&.striped-rows.offset tbody tr:nth-child(odd),
|
|
53
49
|
&.striped-rows.offset tfoot,
|
|
54
50
|
&.striped-columns.offset td:nth-child(odd),
|
|
55
51
|
&.striped-columns tfoot {
|
|
56
|
-
background
|
|
52
|
+
@include background(transparent);
|
|
57
53
|
}
|
|
58
54
|
|
|
59
55
|
&.compact {
|
|
60
56
|
th, td {
|
|
61
|
-
|
|
57
|
+
@include spacing(py-xxs, px-sm);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
&.scroll {
|
|
62
|
+
@include spacing(pr-sm);
|
|
63
|
+
|
|
64
|
+
thead {
|
|
65
|
+
@include position(sticky, t0);
|
|
66
|
+
@include background(primary-70);
|
|
67
|
+
box-shadow: 0 .5px 0 var(--w-color-primary-50);
|
|
62
68
|
}
|
|
63
69
|
}
|
|
64
70
|
}
|
|
@@ -1,60 +1,63 @@
|
|
|
1
|
-
@
|
|
1
|
+
@use '../../scss/config.scss' as *;
|
|
2
2
|
|
|
3
3
|
.tabs {
|
|
4
4
|
&.boxed .items,
|
|
5
5
|
&.outline .items {
|
|
6
|
-
background
|
|
7
|
-
border-radius
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
@include background(primary-50);
|
|
7
|
+
@include border-radius(md);
|
|
8
|
+
@include spacing(p-xs);
|
|
9
|
+
@include size(wmax-content);
|
|
10
|
+
@include border(0);
|
|
10
11
|
|
|
11
12
|
button {
|
|
12
|
-
@include
|
|
13
|
-
border-radius
|
|
14
|
-
|
|
13
|
+
@include transition();
|
|
14
|
+
@include border-radius(md);
|
|
15
|
+
@include spacing(p-sm);
|
|
15
16
|
|
|
16
17
|
&[data-active="true"] {
|
|
17
|
-
border
|
|
18
|
-
background
|
|
18
|
+
@include border(0);
|
|
19
|
+
@include background(primary-70);
|
|
19
20
|
padding-bottom: 10px;
|
|
20
21
|
}
|
|
21
22
|
}
|
|
22
23
|
}
|
|
23
24
|
|
|
24
25
|
&.outline .items {
|
|
25
|
-
background
|
|
26
|
-
border
|
|
26
|
+
@include background(transparent);
|
|
27
|
+
@include border(primary-50);
|
|
27
28
|
|
|
28
29
|
button {
|
|
29
30
|
margin-bottom: 0;
|
|
30
31
|
|
|
31
32
|
&[data-active="true"] {
|
|
32
|
-
background
|
|
33
|
+
@include background(primary-50);
|
|
33
34
|
}
|
|
34
35
|
}
|
|
35
36
|
}
|
|
36
37
|
|
|
37
38
|
&.even .items button {
|
|
39
|
+
@include layout(h-center);
|
|
38
40
|
flex: 1;
|
|
39
|
-
justify-content: center;
|
|
40
41
|
}
|
|
41
42
|
|
|
42
43
|
&.vertical {
|
|
43
|
-
|
|
44
|
-
gap: 20px;
|
|
44
|
+
@include layout(flex, default);
|
|
45
45
|
|
|
46
46
|
&.boxed .items button,
|
|
47
47
|
&.outline .items button {
|
|
48
|
-
border
|
|
48
|
+
@include border(bottom, 0);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
&:not(.outline) .items {
|
|
52
|
+
@include border(0);
|
|
49
53
|
}
|
|
50
54
|
|
|
51
55
|
.items {
|
|
52
|
-
|
|
53
|
-
gap: 5px;
|
|
56
|
+
@include layout(column, xs);
|
|
54
57
|
|
|
55
58
|
button {
|
|
56
|
-
|
|
57
|
-
border
|
|
59
|
+
@include spacing(p-sm);
|
|
60
|
+
@include border(2px, bottom, primary-50);
|
|
58
61
|
|
|
59
62
|
&[data-active="true"] {
|
|
60
63
|
padding-bottom: 10px;
|
|
@@ -63,71 +66,65 @@
|
|
|
63
66
|
}
|
|
64
67
|
|
|
65
68
|
.content {
|
|
66
|
-
|
|
69
|
+
@include spacing(m0);
|
|
67
70
|
}
|
|
68
71
|
}
|
|
69
72
|
|
|
70
73
|
.wrapper {
|
|
71
|
-
|
|
74
|
+
@include visibility(auto);
|
|
72
75
|
}
|
|
73
76
|
|
|
74
77
|
.items {
|
|
75
|
-
border
|
|
76
|
-
|
|
77
|
-
gap: 10px;
|
|
78
|
+
@include border(2px, bottom, primary-50);
|
|
79
|
+
@include layout(flex, sm);
|
|
78
80
|
|
|
79
81
|
button {
|
|
80
|
-
@include
|
|
81
|
-
background
|
|
82
|
+
@include transition(color);
|
|
83
|
+
@include background(transparent);
|
|
84
|
+
@include typography(default, primary-20);
|
|
85
|
+
@include border(0);
|
|
86
|
+
@include spacing(p-md);
|
|
87
|
+
@include layout(flex, v-center, sm);
|
|
88
|
+
|
|
82
89
|
cursor: pointer;
|
|
83
|
-
color: var(--w-color-primary);
|
|
84
|
-
border: 0;
|
|
85
|
-
font-size: 16px;
|
|
86
|
-
padding: 0;
|
|
87
|
-
margin-bottom: -2px;
|
|
88
|
-
padding: 15px 15px;
|
|
89
|
-
color: var(--w-color-primary-20);
|
|
90
|
-
display: flex;
|
|
91
|
-
align-items: center;
|
|
92
|
-
gap: 10px;
|
|
93
90
|
flex-shrink: 0;
|
|
94
91
|
|
|
95
92
|
svg {
|
|
93
|
+
@include size(20px);
|
|
96
94
|
pointer-events: none;
|
|
97
|
-
width: 20px;
|
|
98
|
-
height: 20px;
|
|
99
95
|
}
|
|
100
96
|
|
|
101
97
|
&[disabled] {
|
|
102
|
-
|
|
98
|
+
@include typography(primary-30);
|
|
103
99
|
cursor: no-drop;
|
|
104
100
|
}
|
|
105
101
|
|
|
106
102
|
&[data-active="true"] {
|
|
107
|
-
|
|
108
|
-
border
|
|
103
|
+
@include typography(primary);
|
|
104
|
+
@include border(2px, bottom, primary);
|
|
105
|
+
|
|
109
106
|
padding-bottom: 13px;
|
|
110
107
|
}
|
|
111
108
|
}
|
|
112
109
|
}
|
|
113
110
|
|
|
114
111
|
.content {
|
|
115
|
-
|
|
112
|
+
@include spacing(mt-default);
|
|
116
113
|
}
|
|
117
114
|
|
|
118
115
|
[data-tab] {
|
|
119
|
-
|
|
116
|
+
@include visibility(none);
|
|
120
117
|
|
|
121
118
|
&[data-active="true"] {
|
|
122
|
-
|
|
119
|
+
@include visibility(block);
|
|
123
120
|
}
|
|
124
121
|
}
|
|
125
122
|
}
|
|
126
123
|
|
|
127
|
-
@include
|
|
124
|
+
@include media('xs') {
|
|
128
125
|
.tabs {
|
|
129
126
|
&.even .items {
|
|
130
|
-
|
|
127
|
+
@include size(wauto);
|
|
131
128
|
}
|
|
132
129
|
}
|
|
133
130
|
}
|
|
@@ -61,9 +61,10 @@
|
|
|
61
61
|
>
|
|
62
62
|
{#each Object.keys(themes) as theme, index}
|
|
63
63
|
<button
|
|
64
|
+
on:click={() => setTheme(toggle ? index : themes[theme])}
|
|
64
65
|
style={!useIcons ? `background:${theme};` : undefined}
|
|
65
66
|
data-active={currentTheme === themes[theme]}
|
|
66
|
-
|
|
67
|
+
aria-label={themes[theme]}
|
|
67
68
|
class={classNames([
|
|
68
69
|
styles.switch,
|
|
69
70
|
useIcons && styles.icons
|
|
@@ -70,8 +70,9 @@ const ThemeSwitcher = ({
|
|
|
70
70
|
{Object.keys(themes as {}).map((theme, index) => (
|
|
71
71
|
<button
|
|
72
72
|
key={index}
|
|
73
|
-
data-active={currentTheme === themes[theme]}
|
|
74
73
|
onClick={() => setTheme(toggle ? index : themes[theme])}
|
|
74
|
+
data-active={currentTheme === themes[theme]}
|
|
75
|
+
aria-label={themes[theme]}
|
|
75
76
|
style={!useIcons ? { background: theme } : undefined}
|
|
76
77
|
className={classNames([
|
|
77
78
|
styles.switch,
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
@
|
|
1
|
+
@use '../../scss/config.scss' as *;
|
|
2
|
+
|
|
3
|
+
body {
|
|
4
|
+
--w-theme-switcher-size: 20px;
|
|
5
|
+
}
|
|
2
6
|
|
|
3
7
|
.switcher {
|
|
4
|
-
|
|
5
|
-
gap: 10px;
|
|
8
|
+
@include layout(flex, sm);
|
|
6
9
|
|
|
7
10
|
&.toggle {
|
|
8
|
-
position
|
|
11
|
+
@include position(relative);
|
|
9
12
|
width: var(--w-theme-switcher-size);
|
|
10
13
|
height: var(--w-theme-switcher-size);
|
|
11
14
|
|
|
@@ -13,37 +16,38 @@
|
|
|
13
16
|
position: absolute;
|
|
14
17
|
|
|
15
18
|
&:first-child {
|
|
16
|
-
|
|
19
|
+
@include layer(overlay);
|
|
17
20
|
}
|
|
18
21
|
|
|
19
22
|
&:nth-child(2) {
|
|
20
|
-
|
|
23
|
+
@include layer(fg);
|
|
21
24
|
}
|
|
22
25
|
|
|
23
26
|
&[data-active="true"] {
|
|
24
|
-
|
|
27
|
+
@include layer(popup);
|
|
25
28
|
}
|
|
26
29
|
}
|
|
27
30
|
}
|
|
28
31
|
}
|
|
29
32
|
|
|
30
33
|
.switch {
|
|
34
|
+
@include border(0);
|
|
35
|
+
@include border-radius(max);
|
|
36
|
+
@include position(relative);
|
|
37
|
+
|
|
31
38
|
width: var(--w-theme-switcher-size);
|
|
32
39
|
height: var(--w-theme-switcher-size);
|
|
33
|
-
border-radius: 100%;
|
|
34
40
|
cursor: pointer;
|
|
35
|
-
position: relative;
|
|
36
|
-
border: 0;
|
|
37
41
|
|
|
38
42
|
&.icons {
|
|
39
|
-
@include
|
|
40
|
-
|
|
41
|
-
background
|
|
42
|
-
|
|
43
|
-
|
|
43
|
+
@include transition(opacity);
|
|
44
|
+
@include typography(primary);
|
|
45
|
+
@include background(transparent);
|
|
46
|
+
@include spacing(p0);
|
|
47
|
+
@include visibility(0);
|
|
44
48
|
|
|
45
49
|
&[data-active="true"] {
|
|
46
|
-
|
|
50
|
+
@include visibility(1);
|
|
47
51
|
}
|
|
48
52
|
|
|
49
53
|
svg, img {
|
|
@@ -54,20 +58,18 @@
|
|
|
54
58
|
}
|
|
55
59
|
|
|
56
60
|
&:not(.icons)::after {
|
|
57
|
-
@include
|
|
61
|
+
@include position(absolute, center);
|
|
62
|
+
@include border(primary);
|
|
63
|
+
@include border-radius(max);
|
|
64
|
+
@include layer(bg);
|
|
65
|
+
@include transition();
|
|
66
|
+
@include size(0);
|
|
67
|
+
|
|
58
68
|
content: '';
|
|
59
|
-
position: absolute;
|
|
60
|
-
top: 50%;
|
|
61
|
-
left: 50%;
|
|
62
|
-
transform: translate(-50%, -50%);
|
|
63
|
-
border: 1px solid var(--w-color-primary);
|
|
64
|
-
border-radius: 100%;
|
|
65
|
-
width: 0;
|
|
66
|
-
height: 0;
|
|
67
|
-
z-index: -1;
|
|
68
69
|
}
|
|
69
70
|
|
|
70
71
|
&[data-active="true"]::after {
|
|
72
|
+
@include layer(default);
|
|
71
73
|
width: calc(var(--w-theme-switcher-size) + 5px);
|
|
72
74
|
height: calc(var(--w-theme-switcher-size) + 5px);
|
|
73
75
|
}
|
|
@@ -1,60 +1,65 @@
|
|
|
1
|
-
@
|
|
1
|
+
@use '../../scss/config.scss' as *;
|
|
2
2
|
|
|
3
3
|
// (circle width + border * 2) / 2 - line width
|
|
4
4
|
$leftOffset: calc(((25px + 4px) / 2) - 1px);
|
|
5
5
|
$rightOffset: calc((((25px + 4px) / 2) - 1px) * -1);
|
|
6
6
|
|
|
7
|
+
body {
|
|
8
|
+
--w-timeline-color: var(--w-color-primary-50);
|
|
9
|
+
--w-timeline-text-color: var(--w-color-primary);
|
|
10
|
+
--w-timeline-counter: decimal;
|
|
11
|
+
}
|
|
12
|
+
|
|
7
13
|
.timeline {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
14
|
+
@include layout(flex, default, column);
|
|
15
|
+
@include spacing(pl-3xl, m0);
|
|
16
|
+
@include position(relative);
|
|
17
|
+
@include typography(normal);
|
|
18
|
+
|
|
13
19
|
list-style-type: none;
|
|
14
20
|
counter-reset: item;
|
|
15
|
-
position: relative;
|
|
16
21
|
|
|
17
22
|
&::before {
|
|
18
|
-
position
|
|
23
|
+
@include position(absolute);
|
|
24
|
+
@include size(w2px, 'h100%');
|
|
25
|
+
@include background(var(--w-timeline-color));
|
|
26
|
+
|
|
19
27
|
content: '';
|
|
20
|
-
width: 2px;
|
|
21
|
-
background: var(--w-timeline-color);
|
|
22
|
-
height: 100%;
|
|
23
28
|
left: $leftOffset
|
|
24
29
|
}
|
|
25
30
|
|
|
26
|
-
&.fill li::before {
|
|
31
|
+
&.fill > li::before {
|
|
27
32
|
content: '';
|
|
28
33
|
}
|
|
29
34
|
|
|
30
|
-
&.stroke li::before {
|
|
31
|
-
background
|
|
35
|
+
&.stroke > li::before {
|
|
36
|
+
@include background(primary-70);
|
|
32
37
|
border: 2px solid var(--w-timeline-color);
|
|
33
38
|
}
|
|
34
39
|
}
|
|
35
40
|
|
|
36
|
-
@include
|
|
41
|
+
@include media('xs') {
|
|
37
42
|
.timeline {
|
|
38
43
|
&.alternate {
|
|
39
|
-
|
|
44
|
+
@include spacing(p0);
|
|
40
45
|
|
|
41
46
|
&::before {
|
|
42
47
|
left: calc(50% - 1px);
|
|
43
48
|
}
|
|
44
49
|
|
|
45
|
-
li {
|
|
46
|
-
|
|
50
|
+
> li {
|
|
51
|
+
@include size('w50%');
|
|
47
52
|
|
|
48
53
|
&:nth-child(odd) {
|
|
49
|
-
|
|
54
|
+
@include spacing(pr-3xl);
|
|
50
55
|
}
|
|
51
56
|
|
|
52
57
|
&:nth-child(even) {
|
|
58
|
+
@include spacing(pl-3xl);
|
|
53
59
|
align-self: flex-end;
|
|
54
|
-
padding-left: 40px;
|
|
55
60
|
|
|
56
61
|
&::before {
|
|
57
|
-
|
|
62
|
+
@include position(l25px);
|
|
58
63
|
}
|
|
59
64
|
}
|
|
60
65
|
|
|
@@ -64,8 +69,8 @@ $rightOffset: calc((((25px + 4px) / 2) - 1px) * -1);
|
|
|
64
69
|
}
|
|
65
70
|
}
|
|
66
71
|
|
|
67
|
-
&.centered li:nth-child(odd) {
|
|
68
|
-
|
|
72
|
+
&.centered > li:nth-child(odd) {
|
|
73
|
+
@include typography(right);
|
|
69
74
|
}
|
|
70
75
|
}
|
|
71
76
|
}
|
|
@@ -1,14 +1,9 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import type {
|
|
2
|
+
import type { ReactTimelineItemProps } from './timelineitem'
|
|
3
3
|
|
|
4
4
|
import styles from './timelineitem.module.scss'
|
|
5
5
|
import { classNames } from '../../utils/classNames'
|
|
6
6
|
|
|
7
|
-
type ReactTimelineItemProps = {
|
|
8
|
-
TitleTag?: keyof JSX.IntrinsicElements
|
|
9
|
-
children: React.ReactNode
|
|
10
|
-
} & Omit<TimelineItemProps, 'titleTag'>
|
|
11
|
-
|
|
12
7
|
const TimelineItem = ({
|
|
13
8
|
title,
|
|
14
9
|
TitleTag = 'span',
|
|
@@ -1,31 +1,28 @@
|
|
|
1
|
-
@
|
|
1
|
+
@use '../../scss/config.scss' as *;
|
|
2
2
|
|
|
3
3
|
.item {
|
|
4
|
-
position
|
|
5
|
-
|
|
4
|
+
@include position(relative);
|
|
5
|
+
@include spacing(m0);
|
|
6
6
|
|
|
7
7
|
&::before {
|
|
8
|
+
@include position(absolute, t-5px);
|
|
9
|
+
@include size(25px);
|
|
10
|
+
@include border-radius(max);
|
|
11
|
+
@include background(var(--w-timeline-color));
|
|
12
|
+
@include typography(md);
|
|
13
|
+
@include layout(inline-flex, center);
|
|
14
|
+
@include border(2px, primary-70);
|
|
15
|
+
|
|
8
16
|
content: counter(item, var(--w-timeline-counter));
|
|
9
17
|
counter-increment: item;
|
|
10
|
-
position: absolute;
|
|
11
|
-
top: -5px;
|
|
12
|
-
width: 25px;
|
|
13
|
-
height: 25px;
|
|
14
|
-
border-radius: 100%;
|
|
15
|
-
background: var(--w-timeline-color);
|
|
16
18
|
color: var(--w-timeline-text-color);
|
|
17
|
-
font-size: 14px;
|
|
18
|
-
display: inline-flex;
|
|
19
|
-
align-items: center;
|
|
20
|
-
justify-content: center;
|
|
21
|
-
border: 2px solid var(--w-color-primary-70);
|
|
22
19
|
margin-left: -40px;
|
|
23
20
|
}
|
|
24
21
|
|
|
25
22
|
.title {
|
|
23
|
+
@include typography(bold, lg);
|
|
24
|
+
@include spacing(mb-sm);
|
|
25
|
+
|
|
26
26
|
display: block;
|
|
27
|
-
margin-bottom: 10px;
|
|
28
|
-
font-family: Bold;
|
|
29
|
-
font-size: 18px;
|
|
30
27
|
}
|
|
31
28
|
}
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
@
|
|
1
|
+
@use '../../scss/config.scss' as *;
|
|
2
2
|
|
|
3
3
|
.toast {
|
|
4
|
-
background
|
|
5
|
-
position
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
@include background(primary-70);
|
|
5
|
+
@include position(fixed, r20px, b20px);
|
|
6
|
+
@include layer(header);
|
|
7
|
+
|
|
8
8
|
transform: translateY(calc(100% + 25px));
|
|
9
|
-
z-index: 99;
|
|
10
9
|
|
|
11
10
|
&[data-show] {
|
|
12
|
-
@include
|
|
11
|
+
@include transition(transform);
|
|
13
12
|
}
|
|
14
13
|
|
|
15
14
|
&[data-show="true"] {
|
|
@@ -18,15 +17,15 @@
|
|
|
18
17
|
|
|
19
18
|
&[data-position="bottom-left"],
|
|
20
19
|
&[data-position="top-left"] {
|
|
20
|
+
@include position(l20px);
|
|
21
21
|
right: auto;
|
|
22
|
-
left: 20px;
|
|
23
22
|
}
|
|
24
23
|
|
|
25
24
|
&[data-position="top-left"],
|
|
26
25
|
&[data-position="top-right"],
|
|
27
26
|
&[data-position="top-full"] {
|
|
27
|
+
@include position(t20px);
|
|
28
28
|
bottom: auto;
|
|
29
|
-
top: 20px;
|
|
30
29
|
transform: translateY(calc(-100% - 25px));
|
|
31
30
|
|
|
32
31
|
&[data-show="true"] {
|
|
@@ -34,11 +33,8 @@
|
|
|
34
33
|
}
|
|
35
34
|
}
|
|
36
35
|
|
|
37
|
-
&[data-position="bottom-full"]
|
|
38
|
-
left: 20px;
|
|
39
|
-
}
|
|
40
|
-
|
|
36
|
+
&[data-position="bottom-full"],
|
|
41
37
|
&[data-position="top-full"] {
|
|
42
|
-
|
|
38
|
+
@include position(l20px);
|
|
43
39
|
}
|
|
44
40
|
}
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import type { AlertProps, ReactAlertProps } from '../Alert/alert'
|
|
2
2
|
|
|
3
3
|
export type ToastProps = {
|
|
4
|
-
position?: 'bottom-left'
|
|
4
|
+
position?: 'bottom-left'
|
|
5
|
+
| 'top-left'
|
|
6
|
+
| 'top-right'
|
|
7
|
+
| 'bottom-full'
|
|
8
|
+
| 'top-full'
|
|
9
|
+
| null
|
|
5
10
|
[key: string]: any
|
|
6
11
|
} & AlertProps
|
|
7
12
|
|