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,25 +1,30 @@
|
|
|
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
|
|
|
@@ -28,33 +33,33 @@ $rightOffset: calc((((25px + 4px) / 2) - 1px) * -1);
|
|
|
28
33
|
}
|
|
29
34
|
|
|
30
35
|
&.stroke li::before {
|
|
31
|
-
background
|
|
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
50
|
li {
|
|
46
|
-
|
|
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
|
|
|
@@ -65,7 +70,7 @@ $rightOffset: calc((((25px + 4px) / 2) - 1px) * -1);
|
|
|
65
70
|
}
|
|
66
71
|
|
|
67
72
|
&.centered li:nth-child(odd) {
|
|
68
|
-
|
|
73
|
+
@include typography(right);
|
|
69
74
|
}
|
|
70
75
|
}
|
|
71
76
|
}
|
|
@@ -1,31 +1,29 @@
|
|
|
1
|
-
@
|
|
1
|
+
@use '../../scss/config.scss' as *;
|
|
2
2
|
|
|
3
3
|
.item {
|
|
4
|
-
position
|
|
5
|
-
|
|
4
|
+
@include position(relative);
|
|
5
|
+
@include typography(md);
|
|
6
|
+
@include spacing(m0);
|
|
6
7
|
|
|
7
8
|
&::before {
|
|
9
|
+
@include position(absolute, t-5px);
|
|
10
|
+
@include size(25px);
|
|
11
|
+
@include border-radius(max);
|
|
12
|
+
@include background(var(--w-timeline-color));
|
|
13
|
+
@include typography(sm);
|
|
14
|
+
@include layout(inline-flex, center);
|
|
15
|
+
@include border(2px, primary-70);
|
|
16
|
+
|
|
8
17
|
content: counter(item, var(--w-timeline-counter));
|
|
9
18
|
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
19
|
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
20
|
margin-left: -40px;
|
|
23
21
|
}
|
|
24
22
|
|
|
25
23
|
.title {
|
|
24
|
+
@include typography(bold, default);
|
|
25
|
+
@include spacing(mb-sm);
|
|
26
|
+
|
|
26
27
|
display: block;
|
|
27
|
-
margin-bottom: 10px;
|
|
28
|
-
font-family: Bold;
|
|
29
|
-
font-size: 18px;
|
|
30
28
|
}
|
|
31
29
|
}
|
|
@@ -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
|
|
package/icons.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
declare module 'webcoreui/icons' {
|
|
2
|
+
export const alert: string
|
|
3
|
+
export const arrowDown: string
|
|
4
|
+
export const check: string
|
|
5
|
+
export const circleCheck: string
|
|
6
|
+
export const github: string
|
|
7
|
+
export const info: string
|
|
8
|
+
export const moon: string
|
|
9
|
+
export const sun: string
|
|
10
|
+
export const warning: string
|
|
11
|
+
}
|
package/icons.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { default as alert } from './icons/alert.svg?raw'
|
|
2
|
+
export { default as arrowDown } from './icons/arrow-down.svg?raw'
|
|
3
|
+
export { default as check } from './icons/check.svg?raw'
|
|
4
|
+
export { default as circleCheck } from './icons/circle-check.svg?raw'
|
|
5
|
+
export { default as github } from './icons/github.svg?raw'
|
|
6
|
+
export { default as info } from './icons/info.svg?raw'
|
|
7
|
+
export { default as moon } from './icons/moon.svg?raw'
|
|
8
|
+
export { default as sun } from './icons/sun.svg?raw'
|
|
9
|
+
export { default as warning } from './icons/warning.svg?raw'
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "webcoreui",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0
|
|
4
|
+
"version": "0.1.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"dev": "astro dev",
|
|
7
7
|
"build": "astro check && astro build",
|
|
@@ -36,6 +36,8 @@
|
|
|
36
36
|
"utils",
|
|
37
37
|
"astro.d.ts",
|
|
38
38
|
"astro.js",
|
|
39
|
+
"icons.d.ts",
|
|
40
|
+
"icons.js",
|
|
39
41
|
"svelte.d.ts",
|
|
40
42
|
"svelte.js",
|
|
41
43
|
"react.d.ts",
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
$colorPalette: (
|
|
2
|
+
'primary': var(--w-color-primary),
|
|
3
|
+
'primary-10': var(--w-color-primary-10),
|
|
4
|
+
'primary-20': var(--w-color-primary-20),
|
|
5
|
+
'primary-30': var(--w-color-primary-30),
|
|
6
|
+
'primary-40': var(--w-color-primary-40),
|
|
7
|
+
'primary-50': var(--w-color-primary-50),
|
|
8
|
+
'primary-60': var(--w-color-primary-60),
|
|
9
|
+
'primary-70': var(--w-color-primary-70),
|
|
10
|
+
|
|
11
|
+
'info': var(--w-color-info),
|
|
12
|
+
'info-accent': var(--w-color-info-accent),
|
|
13
|
+
'info-fg': var(--w-color-info-fg),
|
|
14
|
+
'success': var(--w-color-success),
|
|
15
|
+
'success-accent': var(--w-color-success-accent),
|
|
16
|
+
'success-fg': var(--w-color-success-fg),
|
|
17
|
+
'warning': var(--w-color-warning),
|
|
18
|
+
'warning-accent': var(--w-color-warning-accent),
|
|
19
|
+
'warning-fg': var(--w-color-warning-fg),
|
|
20
|
+
'alert': var(--w-color-alert),
|
|
21
|
+
'alert-accent': var(--w-color-alert-accent),
|
|
22
|
+
'alert-fg': var(--w-color-alert-fg),
|
|
23
|
+
) !default;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
$overflowValues: auto,
|
|
2
|
+
hidden,
|
|
3
|
+
overlay,
|
|
4
|
+
scroll,
|
|
5
|
+
visible !default;
|
|
6
|
+
|
|
7
|
+
$displayValues: inline,
|
|
8
|
+
block,
|
|
9
|
+
contents,
|
|
10
|
+
flex,
|
|
11
|
+
flow,
|
|
12
|
+
flow-root,
|
|
13
|
+
grid,
|
|
14
|
+
inline-block,
|
|
15
|
+
inline-flex,
|
|
16
|
+
inline-grid,
|
|
17
|
+
inline-table,
|
|
18
|
+
list-item,
|
|
19
|
+
run-in,
|
|
20
|
+
table,
|
|
21
|
+
table-caption,
|
|
22
|
+
table-column-group,
|
|
23
|
+
table-header-group,
|
|
24
|
+
table-footer-group,
|
|
25
|
+
table-row-group,
|
|
26
|
+
table-cell,
|
|
27
|
+
table-column,
|
|
28
|
+
table-row,
|
|
29
|
+
none !default;
|
|
30
|
+
|
|
31
|
+
$positionValues: absolute,
|
|
32
|
+
fixed,
|
|
33
|
+
relative,
|
|
34
|
+
static,
|
|
35
|
+
sticky !default;
|
|
36
|
+
|
|
37
|
+
$flexDirectionValues: row
|
|
38
|
+
column
|
|
39
|
+
row-reverse
|
|
40
|
+
column-reverse !default;
|
|
41
|
+
|
|
42
|
+
$flexWrapValues: wrap
|
|
43
|
+
nowrap
|
|
44
|
+
wrap-reverse !default;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
$breakpoints: (
|
|
2
|
+
'xs': 600px,
|
|
3
|
+
'sm': 800px,
|
|
4
|
+
'md': 1024px,
|
|
5
|
+
'lg': 1200px
|
|
6
|
+
) !default;
|
|
7
|
+
|
|
8
|
+
$layers: (
|
|
9
|
+
'bg': -1,
|
|
10
|
+
'default': 0,
|
|
11
|
+
'fg': 1,
|
|
12
|
+
'overlay': 2,
|
|
13
|
+
'popup': 3,
|
|
14
|
+
'top': 98,
|
|
15
|
+
'header': 99,
|
|
16
|
+
'modal': 100
|
|
17
|
+
) !default;
|
|
18
|
+
|
|
19
|
+
$radius: (
|
|
20
|
+
'none': 0,
|
|
21
|
+
'sm': var(--w-sm-radius),
|
|
22
|
+
'md': var(--w-md-radius),
|
|
23
|
+
'lg': var(--w-lg-radius),
|
|
24
|
+
'xl': var(--w-xl-radius),
|
|
25
|
+
'max': 100%
|
|
26
|
+
) !default;
|
|
27
|
+
|
|
28
|
+
$spacing: (
|
|
29
|
+
'none': 0,
|
|
30
|
+
'xxs': 2px,
|
|
31
|
+
'xs': 5px,
|
|
32
|
+
'sm': 10px,
|
|
33
|
+
'md': 15px,
|
|
34
|
+
'default': 20px,
|
|
35
|
+
'lg': 25px,
|
|
36
|
+
'xl': 30px,
|
|
37
|
+
'2xl': 35px,
|
|
38
|
+
'3xl': 40px,
|
|
39
|
+
'4xl': 45px,
|
|
40
|
+
'5xl': 50px
|
|
41
|
+
) !default;
|