@sk-web-gui/core 0.1.37 → 0.1.39
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/LICENSE +21 -21
- package/README.md +5 -5
- package/package.json +2 -2
- package/src/colors.js +145 -145
- package/src/components/accordion.js +89 -89
- package/src/components/alert.js +98 -98
- package/src/components/avatar.js +85 -85
- package/src/components/badge.js +60 -60
- package/src/components/breadcrumb.js +13 -13
- package/src/components/button-group.js +46 -46
- package/src/components/button.js +304 -304
- package/src/components/calendar.js +82 -82
- package/src/components/card.js +54 -54
- package/src/components/checkbox.js +127 -127
- package/src/components/code.js +9 -9
- package/src/components/cookie-consent.js +30 -30
- package/src/components/divider.js +12 -12
- package/src/components/dot.js +84 -84
- package/src/components/dropdown-filter.js +72 -72
- package/src/components/footer.js +42 -42
- package/src/components/forms.js +256 -256
- package/src/components/header.js +35 -35
- package/src/components/icon-button.js +5 -5
- package/src/components/icon.js +9 -9
- package/src/components/kbd.js +9 -9
- package/src/components/link.js +20 -20
- package/src/components/message.js +62 -62
- package/src/components/modal.js +30 -30
- package/src/components/notification.js +56 -56
- package/src/components/pagination.js +69 -69
- package/src/components/radio.js +104 -104
- package/src/components/search-bar.js +44 -44
- package/src/components/side-menu.js +186 -0
- package/src/components/switch.js +119 -119
- package/src/components/tab-menu.js +36 -36
- package/src/components/table.js +13 -13
- package/src/components/tag.js +97 -97
- package/src/components/user-menu.js +23 -23
- package/src/components/zebratable.js +77 -77
- package/src/index.js +272 -272
- package/src/with-opacity.js +6 -6
- package/src/components/menu.js +0 -171
|
@@ -1,82 +1,82 @@
|
|
|
1
|
-
module.exports = Calendar = () => ({
|
|
2
|
-
// Month row
|
|
3
|
-
'.MuiCalendarPicker-root > div:first-of-type': {
|
|
4
|
-
'@apply ml-2 -mr-2 px-10': {},
|
|
5
|
-
},
|
|
6
|
-
|
|
7
|
-
// Month
|
|
8
|
-
'.MuiCalendarPicker-root > div:first-of-type > div': {
|
|
9
|
-
'@apply font-bold text-base text-body': {},
|
|
10
|
-
},
|
|
11
|
-
|
|
12
|
-
// Arrow switchers
|
|
13
|
-
'.MuiCalendarPicker-root > div:first-of-type .MuiButtonBase-root .MuiSvgIcon-root': {
|
|
14
|
-
'@apply text-body text-lg': {},
|
|
15
|
-
},
|
|
16
|
-
'.MuiCalendarPicker-root > div:first-of-type .MuiButtonBase-root': {
|
|
17
|
-
'@apply border-solid border border-transparent focus:text-transparent hover:text-transparent focus:bg-transparent hover:bg-transparent focus:border-primary hover:border-primary':
|
|
18
|
-
{},
|
|
19
|
-
},
|
|
20
|
-
'.MuiCalendarPicker-root > div:first-of-type .MuiButtonBase-root': {
|
|
21
|
-
'@apply border-solid border border-transparent focus:text-transparent hover:text-transparent focus:bg-transparent hover:bg-transparent focus:border-primary hover:border-primary':
|
|
22
|
-
{},
|
|
23
|
-
},
|
|
24
|
-
// Arrow spacer
|
|
25
|
-
'.MuiCalendarPicker-root .MuiPickersArrowSwitcher-spacer': {
|
|
26
|
-
'@apply w-11': {},
|
|
27
|
-
},
|
|
28
|
-
// Disabled arrow
|
|
29
|
-
'.MuiCalendarPicker-root > div:first-of-type .MuiButtonBase-root[disabled] .MuiSvgIcon-root': {
|
|
30
|
-
'@apply text-gray-stroke': {},
|
|
31
|
-
},
|
|
32
|
-
|
|
33
|
-
// Weekdays
|
|
34
|
-
'.MuiCalendarPicker-root div > div:first-of-type > .MuiTypography-root': {
|
|
35
|
-
'@apply font-bold text-body text-base': {},
|
|
36
|
-
},
|
|
37
|
-
|
|
38
|
-
// Days-Grid
|
|
39
|
-
'.MuiCalendarPicker-root > div:last-of-type > div:last-of-type': {
|
|
40
|
-
'@apply min-h-min pb-6': {},
|
|
41
|
-
},
|
|
42
|
-
|
|
43
|
-
// Day picking
|
|
44
|
-
'.MuiCalendarPicker-root .MuiPickersDay-root': {
|
|
45
|
-
'@apply text-base': {},
|
|
46
|
-
},
|
|
47
|
-
'.MuiCalendarPicker-root .Mui-disabled': {
|
|
48
|
-
'@apply text-gray-stroke': {},
|
|
49
|
-
},
|
|
50
|
-
|
|
51
|
-
// Day picked
|
|
52
|
-
'.MuiCalendarPicker-root .MuiButtonBase-root.MuiPickersDay-root.Mui-selected': {
|
|
53
|
-
'@apply bg-background-one text-body focus-visible:bg-background-one hover:bg-background-one focus:bg-background-one':
|
|
54
|
-
{},
|
|
55
|
-
},
|
|
56
|
-
|
|
57
|
-
// Day hovered
|
|
58
|
-
'.MuiCalendarPicker-root .MuiPickersDay-root, .MuiCalendarPicker-root .MuiPickersDay-root.MuiPickersDay-today': {
|
|
59
|
-
'@apply border-primary border-solid focus-visible:border hover:bg-transparent focus:bg-transparent hover:border':
|
|
60
|
-
{},
|
|
61
|
-
},
|
|
62
|
-
|
|
63
|
-
// today
|
|
64
|
-
'.MuiCalendarPicker-root .MuiPickersDay-root.MuiPickersDay-today': {
|
|
65
|
-
'@apply border-0 hover:border': {},
|
|
66
|
-
},
|
|
67
|
-
|
|
68
|
-
'.calendar': {
|
|
69
|
-
// Input field
|
|
70
|
-
'.datepicker-input': {
|
|
71
|
-
'@apply relative': {},
|
|
72
|
-
},
|
|
73
|
-
|
|
74
|
-
'.datepicker-input input': {
|
|
75
|
-
'@apply pl-20 cursor-pointer': {},
|
|
76
|
-
},
|
|
77
|
-
|
|
78
|
-
'.datepicker-input-icon': {
|
|
79
|
-
'@apply pointer-events-none absolute m-6 top-0 left-0 text-xl fill-body': {},
|
|
80
|
-
},
|
|
81
|
-
},
|
|
82
|
-
});
|
|
1
|
+
module.exports = Calendar = () => ({
|
|
2
|
+
// Month row
|
|
3
|
+
'.MuiCalendarPicker-root > div:first-of-type': {
|
|
4
|
+
'@apply ml-2 -mr-2 px-10': {},
|
|
5
|
+
},
|
|
6
|
+
|
|
7
|
+
// Month
|
|
8
|
+
'.MuiCalendarPicker-root > div:first-of-type > div': {
|
|
9
|
+
'@apply font-bold text-base text-body': {},
|
|
10
|
+
},
|
|
11
|
+
|
|
12
|
+
// Arrow switchers
|
|
13
|
+
'.MuiCalendarPicker-root > div:first-of-type .MuiButtonBase-root .MuiSvgIcon-root': {
|
|
14
|
+
'@apply text-body text-lg': {},
|
|
15
|
+
},
|
|
16
|
+
'.MuiCalendarPicker-root > div:first-of-type .MuiButtonBase-root': {
|
|
17
|
+
'@apply border-solid border border-transparent focus:text-transparent hover:text-transparent focus:bg-transparent hover:bg-transparent focus:border-primary hover:border-primary':
|
|
18
|
+
{},
|
|
19
|
+
},
|
|
20
|
+
'.MuiCalendarPicker-root > div:first-of-type .MuiButtonBase-root': {
|
|
21
|
+
'@apply border-solid border border-transparent focus:text-transparent hover:text-transparent focus:bg-transparent hover:bg-transparent focus:border-primary hover:border-primary':
|
|
22
|
+
{},
|
|
23
|
+
},
|
|
24
|
+
// Arrow spacer
|
|
25
|
+
'.MuiCalendarPicker-root .MuiPickersArrowSwitcher-spacer': {
|
|
26
|
+
'@apply w-11': {},
|
|
27
|
+
},
|
|
28
|
+
// Disabled arrow
|
|
29
|
+
'.MuiCalendarPicker-root > div:first-of-type .MuiButtonBase-root[disabled] .MuiSvgIcon-root': {
|
|
30
|
+
'@apply text-gray-stroke': {},
|
|
31
|
+
},
|
|
32
|
+
|
|
33
|
+
// Weekdays
|
|
34
|
+
'.MuiCalendarPicker-root div > div:first-of-type > .MuiTypography-root': {
|
|
35
|
+
'@apply font-bold text-body text-base': {},
|
|
36
|
+
},
|
|
37
|
+
|
|
38
|
+
// Days-Grid
|
|
39
|
+
'.MuiCalendarPicker-root > div:last-of-type > div:last-of-type': {
|
|
40
|
+
'@apply min-h-min pb-6': {},
|
|
41
|
+
},
|
|
42
|
+
|
|
43
|
+
// Day picking
|
|
44
|
+
'.MuiCalendarPicker-root .MuiPickersDay-root': {
|
|
45
|
+
'@apply text-base': {},
|
|
46
|
+
},
|
|
47
|
+
'.MuiCalendarPicker-root .Mui-disabled': {
|
|
48
|
+
'@apply text-gray-stroke': {},
|
|
49
|
+
},
|
|
50
|
+
|
|
51
|
+
// Day picked
|
|
52
|
+
'.MuiCalendarPicker-root .MuiButtonBase-root.MuiPickersDay-root.Mui-selected': {
|
|
53
|
+
'@apply bg-background-one text-body focus-visible:bg-background-one hover:bg-background-one focus:bg-background-one':
|
|
54
|
+
{},
|
|
55
|
+
},
|
|
56
|
+
|
|
57
|
+
// Day hovered
|
|
58
|
+
'.MuiCalendarPicker-root .MuiPickersDay-root, .MuiCalendarPicker-root .MuiPickersDay-root.MuiPickersDay-today': {
|
|
59
|
+
'@apply border-primary border-solid focus-visible:border hover:bg-transparent focus:bg-transparent hover:border':
|
|
60
|
+
{},
|
|
61
|
+
},
|
|
62
|
+
|
|
63
|
+
// today
|
|
64
|
+
'.MuiCalendarPicker-root .MuiPickersDay-root.MuiPickersDay-today': {
|
|
65
|
+
'@apply border-0 hover:border': {},
|
|
66
|
+
},
|
|
67
|
+
|
|
68
|
+
'.calendar': {
|
|
69
|
+
// Input field
|
|
70
|
+
'.datepicker-input': {
|
|
71
|
+
'@apply relative': {},
|
|
72
|
+
},
|
|
73
|
+
|
|
74
|
+
'.datepicker-input input': {
|
|
75
|
+
'@apply pl-20 cursor-pointer': {},
|
|
76
|
+
},
|
|
77
|
+
|
|
78
|
+
'.datepicker-input-icon': {
|
|
79
|
+
'@apply pointer-events-none absolute m-6 top-0 left-0 text-xl fill-body': {},
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
});
|
package/src/components/card.js
CHANGED
|
@@ -1,54 +1,54 @@
|
|
|
1
|
-
module.exports = Card = () => ({
|
|
2
|
-
'.avatar': {
|
|
3
|
-
'@apply bg-primary-light text-primary rounded-full p-4': {},
|
|
4
|
-
},
|
|
5
|
-
|
|
6
|
-
'.card-list': {
|
|
7
|
-
'@apply grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-10': {},
|
|
8
|
-
//"@apply text-center": {},
|
|
9
|
-
//"@apply justify-center items-center": {},
|
|
10
|
-
},
|
|
11
|
-
|
|
12
|
-
'.card': {
|
|
13
|
-
'@apply p-lg rounded shadow-lg bg-white relative': {},
|
|
14
|
-
'@apply p-0': {},
|
|
15
|
-
//padding: "2.4rem",
|
|
16
|
-
|
|
17
|
-
// clickable
|
|
18
|
-
'&-clickable': {
|
|
19
|
-
// Hover
|
|
20
|
-
'@apply hover:shadow-xl hover:cursor-pointer': {},
|
|
21
|
-
},
|
|
22
|
-
|
|
23
|
-
// "@apply bg-neutral-200 border border-neutral-100 text-body": {},
|
|
24
|
-
// dark
|
|
25
|
-
//"@apply dark:bg-neutral-700 dark:border-neutral-600 dark:text-neutral-300": {},
|
|
26
|
-
},
|
|
27
|
-
'.card-outlined': {
|
|
28
|
-
'@apply border-2 border-gray-stroke': {},
|
|
29
|
-
},
|
|
30
|
-
'.card-border-top': {
|
|
31
|
-
'@apply border-t-4 border-t-primary': {},
|
|
32
|
-
},
|
|
33
|
-
|
|
34
|
-
'.card-body': {
|
|
35
|
-
'@apply text-body p-8': {},
|
|
36
|
-
},
|
|
37
|
-
|
|
38
|
-
'.card-image': {
|
|
39
|
-
'@apply object-cover': {},
|
|
40
|
-
width: '100%',
|
|
41
|
-
height: '250px',
|
|
42
|
-
},
|
|
43
|
-
|
|
44
|
-
'.card-link': {
|
|
45
|
-
'&::after': {
|
|
46
|
-
content: "''",
|
|
47
|
-
position: 'absolute',
|
|
48
|
-
left: '0',
|
|
49
|
-
top: '0',
|
|
50
|
-
right: '0',
|
|
51
|
-
bottom: '0',
|
|
52
|
-
},
|
|
53
|
-
},
|
|
54
|
-
});
|
|
1
|
+
module.exports = Card = () => ({
|
|
2
|
+
'.avatar': {
|
|
3
|
+
'@apply bg-primary-light text-primary rounded-full p-4': {},
|
|
4
|
+
},
|
|
5
|
+
|
|
6
|
+
'.card-list': {
|
|
7
|
+
'@apply grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-10': {},
|
|
8
|
+
//"@apply text-center": {},
|
|
9
|
+
//"@apply justify-center items-center": {},
|
|
10
|
+
},
|
|
11
|
+
|
|
12
|
+
'.card': {
|
|
13
|
+
'@apply p-lg rounded shadow-lg bg-white relative': {},
|
|
14
|
+
'@apply p-0': {},
|
|
15
|
+
//padding: "2.4rem",
|
|
16
|
+
|
|
17
|
+
// clickable
|
|
18
|
+
'&-clickable': {
|
|
19
|
+
// Hover
|
|
20
|
+
'@apply hover:shadow-xl hover:cursor-pointer': {},
|
|
21
|
+
},
|
|
22
|
+
|
|
23
|
+
// "@apply bg-neutral-200 border border-neutral-100 text-body": {},
|
|
24
|
+
// dark
|
|
25
|
+
//"@apply dark:bg-neutral-700 dark:border-neutral-600 dark:text-neutral-300": {},
|
|
26
|
+
},
|
|
27
|
+
'.card-outlined': {
|
|
28
|
+
'@apply border-2 border-gray-stroke': {},
|
|
29
|
+
},
|
|
30
|
+
'.card-border-top': {
|
|
31
|
+
'@apply border-t-4 border-t-primary': {},
|
|
32
|
+
},
|
|
33
|
+
|
|
34
|
+
'.card-body': {
|
|
35
|
+
'@apply text-body p-8': {},
|
|
36
|
+
},
|
|
37
|
+
|
|
38
|
+
'.card-image': {
|
|
39
|
+
'@apply object-cover': {},
|
|
40
|
+
width: '100%',
|
|
41
|
+
height: '250px',
|
|
42
|
+
},
|
|
43
|
+
|
|
44
|
+
'.card-link': {
|
|
45
|
+
'&::after': {
|
|
46
|
+
content: "''",
|
|
47
|
+
position: 'absolute',
|
|
48
|
+
left: '0',
|
|
49
|
+
top: '0',
|
|
50
|
+
right: '0',
|
|
51
|
+
bottom: '0',
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
});
|
|
@@ -1,127 +1,127 @@
|
|
|
1
|
-
const svgToDataUri = require('mini-svg-data-uri');
|
|
2
|
-
|
|
3
|
-
module.exports = Checkbox = (colors, theme) => ({
|
|
4
|
-
'.form-checkbox': {
|
|
5
|
-
//"@apply rounded shadow-sm": {},
|
|
6
|
-
backgroundColor: 'inherit',
|
|
7
|
-
'@apply border-gray-stroke focus:bg-white': {},
|
|
8
|
-
|
|
9
|
-
'&[aria-invalid=true]': {
|
|
10
|
-
'--tw-border-opacity': '1',
|
|
11
|
-
borderColor: 'rgba(220, 38, 38, var(--tw-border-opacity))',
|
|
12
|
-
},
|
|
13
|
-
'&[aria-invalid=true]:hover': {
|
|
14
|
-
'--tw-border-opacity': '1',
|
|
15
|
-
'border-color': 'rgba(220, 38, 38, var(--tw-border-opacity))',
|
|
16
|
-
},
|
|
17
|
-
// dark colors
|
|
18
|
-
'@apply dark:border-neutral-400': {},
|
|
19
|
-
'.dark &[aria-invalid=true]': {
|
|
20
|
-
'--tw-border-opacity': '1',
|
|
21
|
-
borderColor: 'rgba(248, 113, 113, var(--tw-border-opacity))',
|
|
22
|
-
},
|
|
23
|
-
'.dark &[aria-invalid=true]:hover': {
|
|
24
|
-
'--tw-border-opacity': '1',
|
|
25
|
-
borderColor: 'rgba(248, 113, 113, var(--tw-border-opacity))',
|
|
26
|
-
},
|
|
27
|
-
|
|
28
|
-
'@media (prefers-color-scheme: dark)': {
|
|
29
|
-
'&[aria-invalid=true]': {
|
|
30
|
-
'--tw-border-opacity': '1',
|
|
31
|
-
borderColor: 'rgba(220, 38, 38, var(--tw-border-opacity))',
|
|
32
|
-
},
|
|
33
|
-
'&[aria-invalid=true]:hover': {
|
|
34
|
-
'--tw-border-opacity': '1',
|
|
35
|
-
'border-color': 'rgba(220, 38, 38, var(--tw-border-opacity))',
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
|
|
39
|
-
'&:checked': {
|
|
40
|
-
'@apply text-white bg-white border-primary': {},
|
|
41
|
-
[`@apply focus-visible:border-primary focus-visible:ring-primary`]: {},
|
|
42
|
-
|
|
43
|
-
backgroundImage: `url("${svgToDataUri(
|
|
44
|
-
`<svg viewBox="0 0 16 16" fill="#005595" xmlns="http://www.w3.org/2000/svg"><path d="M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z"/></svg>`
|
|
45
|
-
)}")`,
|
|
46
|
-
//borderColor: "transparent",
|
|
47
|
-
},
|
|
48
|
-
|
|
49
|
-
[`&[data-color="primary"]`]: {
|
|
50
|
-
//[`@apply text-primary`]: {},
|
|
51
|
-
// dark
|
|
52
|
-
//[`@apply dark:text-primary`]: {},
|
|
53
|
-
//[`@apply dark:focus-visible:border-primary-400 dark:focus-visible:ring-primary-400`]: {},
|
|
54
|
-
},
|
|
55
|
-
|
|
56
|
-
// Fix focus stylign
|
|
57
|
-
'&:checked:hover, &:checked:focus': {
|
|
58
|
-
'@apply bg-white border-primary': {},
|
|
59
|
-
},
|
|
60
|
-
|
|
61
|
-
// colors
|
|
62
|
-
/*...colors.reduce(
|
|
63
|
-
(styles, color) => ({
|
|
64
|
-
...styles,
|
|
65
|
-
[`&[data-color="${color}"]`]: {
|
|
66
|
-
[`@apply text-${color}`]: {},
|
|
67
|
-
[`@apply focus-visible:border-${color} focus-visible:ring-${color}`]: {},
|
|
68
|
-
backgroundImage: `url("${svgToDataUri(
|
|
69
|
-
`<svg viewBox="0 0 16 16" fill="${theme(`colors.primary_raw.DEFAULT`)}" xmlns="http://www.w3.org/2000/svg"><path d="M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z"/></svg>`
|
|
70
|
-
)}")`,
|
|
71
|
-
// dark
|
|
72
|
-
[`@apply dark:text-${color}`]: {},
|
|
73
|
-
[`@apply dark:focus-visible:border-${color}-400 dark:focus-visible:ring-${color}-400`]: {},
|
|
74
|
-
},
|
|
75
|
-
}),
|
|
76
|
-
{}
|
|
77
|
-
),*/
|
|
78
|
-
|
|
79
|
-
'@apply dark:focus-visible:ring-offset-neutral-900': {},
|
|
80
|
-
|
|
81
|
-
// sizing
|
|
82
|
-
'&-sm': {
|
|
83
|
-
width: '1.4rem',
|
|
84
|
-
height: '1.4rem',
|
|
85
|
-
},
|
|
86
|
-
|
|
87
|
-
'&-md': {
|
|
88
|
-
width: '1.6rem',
|
|
89
|
-
height: '1.6rem',
|
|
90
|
-
//"@apply w-4 h-4": {},
|
|
91
|
-
},
|
|
92
|
-
|
|
93
|
-
'&-lg': {
|
|
94
|
-
width: '1.8rem',
|
|
95
|
-
height: '1.8rem',
|
|
96
|
-
},
|
|
97
|
-
|
|
98
|
-
// disabled
|
|
99
|
-
'&-disabled': {
|
|
100
|
-
backgroundColor: '#ECECEC',
|
|
101
|
-
//"@apply disabled:bg-gray-stroke": {},
|
|
102
|
-
//"@apply disabled:shadow-none disabled:border-neutral-300 disabled:bg-neutral-300 disabled:hover:text-neutral-300": {},
|
|
103
|
-
//"@apply dark:disabled:border-transparent dark:disabled:bg-white/20 dark:disabled:hover:text-white/20": {},
|
|
104
|
-
},
|
|
105
|
-
|
|
106
|
-
// label
|
|
107
|
-
'&-label': {
|
|
108
|
-
'@apply text-body select-none text-sm': {},
|
|
109
|
-
marginLeft: '0.8rem',
|
|
110
|
-
//"@apply text-black": {},
|
|
111
|
-
// dark colors
|
|
112
|
-
'@apply dark:text-neutral-100': {},
|
|
113
|
-
|
|
114
|
-
'&-sm': {
|
|
115
|
-
'@apply text-xs': {},
|
|
116
|
-
},
|
|
117
|
-
|
|
118
|
-
'&-md': {
|
|
119
|
-
'@apply text-sm': {},
|
|
120
|
-
},
|
|
121
|
-
|
|
122
|
-
'&-lg': {
|
|
123
|
-
'@apply text-base': {},
|
|
124
|
-
},
|
|
125
|
-
},
|
|
126
|
-
},
|
|
127
|
-
});
|
|
1
|
+
const svgToDataUri = require('mini-svg-data-uri');
|
|
2
|
+
|
|
3
|
+
module.exports = Checkbox = (colors, theme) => ({
|
|
4
|
+
'.form-checkbox': {
|
|
5
|
+
//"@apply rounded shadow-sm": {},
|
|
6
|
+
backgroundColor: 'inherit',
|
|
7
|
+
'@apply border-gray-stroke focus:bg-white': {},
|
|
8
|
+
|
|
9
|
+
'&[aria-invalid=true]': {
|
|
10
|
+
'--tw-border-opacity': '1',
|
|
11
|
+
borderColor: 'rgba(220, 38, 38, var(--tw-border-opacity))',
|
|
12
|
+
},
|
|
13
|
+
'&[aria-invalid=true]:hover': {
|
|
14
|
+
'--tw-border-opacity': '1',
|
|
15
|
+
'border-color': 'rgba(220, 38, 38, var(--tw-border-opacity))',
|
|
16
|
+
},
|
|
17
|
+
// dark colors
|
|
18
|
+
'@apply dark:border-neutral-400': {},
|
|
19
|
+
'.dark &[aria-invalid=true]': {
|
|
20
|
+
'--tw-border-opacity': '1',
|
|
21
|
+
borderColor: 'rgba(248, 113, 113, var(--tw-border-opacity))',
|
|
22
|
+
},
|
|
23
|
+
'.dark &[aria-invalid=true]:hover': {
|
|
24
|
+
'--tw-border-opacity': '1',
|
|
25
|
+
borderColor: 'rgba(248, 113, 113, var(--tw-border-opacity))',
|
|
26
|
+
},
|
|
27
|
+
|
|
28
|
+
'@media (prefers-color-scheme: dark)': {
|
|
29
|
+
'&[aria-invalid=true]': {
|
|
30
|
+
'--tw-border-opacity': '1',
|
|
31
|
+
borderColor: 'rgba(220, 38, 38, var(--tw-border-opacity))',
|
|
32
|
+
},
|
|
33
|
+
'&[aria-invalid=true]:hover': {
|
|
34
|
+
'--tw-border-opacity': '1',
|
|
35
|
+
'border-color': 'rgba(220, 38, 38, var(--tw-border-opacity))',
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
|
|
39
|
+
'&:checked': {
|
|
40
|
+
'@apply text-white bg-white border-primary': {},
|
|
41
|
+
[`@apply focus-visible:border-primary focus-visible:ring-primary`]: {},
|
|
42
|
+
|
|
43
|
+
backgroundImage: `url("${svgToDataUri(
|
|
44
|
+
`<svg viewBox="0 0 16 16" fill="#005595" xmlns="http://www.w3.org/2000/svg"><path d="M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z"/></svg>`
|
|
45
|
+
)}")`,
|
|
46
|
+
//borderColor: "transparent",
|
|
47
|
+
},
|
|
48
|
+
|
|
49
|
+
[`&[data-color="primary"]`]: {
|
|
50
|
+
//[`@apply text-primary`]: {},
|
|
51
|
+
// dark
|
|
52
|
+
//[`@apply dark:text-primary`]: {},
|
|
53
|
+
//[`@apply dark:focus-visible:border-primary-400 dark:focus-visible:ring-primary-400`]: {},
|
|
54
|
+
},
|
|
55
|
+
|
|
56
|
+
// Fix focus stylign
|
|
57
|
+
'&:checked:hover, &:checked:focus': {
|
|
58
|
+
'@apply bg-white border-primary': {},
|
|
59
|
+
},
|
|
60
|
+
|
|
61
|
+
// colors
|
|
62
|
+
/*...colors.reduce(
|
|
63
|
+
(styles, color) => ({
|
|
64
|
+
...styles,
|
|
65
|
+
[`&[data-color="${color}"]`]: {
|
|
66
|
+
[`@apply text-${color}`]: {},
|
|
67
|
+
[`@apply focus-visible:border-${color} focus-visible:ring-${color}`]: {},
|
|
68
|
+
backgroundImage: `url("${svgToDataUri(
|
|
69
|
+
`<svg viewBox="0 0 16 16" fill="${theme(`colors.primary_raw.DEFAULT`)}" xmlns="http://www.w3.org/2000/svg"><path d="M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z"/></svg>`
|
|
70
|
+
)}")`,
|
|
71
|
+
// dark
|
|
72
|
+
[`@apply dark:text-${color}`]: {},
|
|
73
|
+
[`@apply dark:focus-visible:border-${color}-400 dark:focus-visible:ring-${color}-400`]: {},
|
|
74
|
+
},
|
|
75
|
+
}),
|
|
76
|
+
{}
|
|
77
|
+
),*/
|
|
78
|
+
|
|
79
|
+
'@apply dark:focus-visible:ring-offset-neutral-900': {},
|
|
80
|
+
|
|
81
|
+
// sizing
|
|
82
|
+
'&-sm': {
|
|
83
|
+
width: '1.4rem',
|
|
84
|
+
height: '1.4rem',
|
|
85
|
+
},
|
|
86
|
+
|
|
87
|
+
'&-md': {
|
|
88
|
+
width: '1.6rem',
|
|
89
|
+
height: '1.6rem',
|
|
90
|
+
//"@apply w-4 h-4": {},
|
|
91
|
+
},
|
|
92
|
+
|
|
93
|
+
'&-lg': {
|
|
94
|
+
width: '1.8rem',
|
|
95
|
+
height: '1.8rem',
|
|
96
|
+
},
|
|
97
|
+
|
|
98
|
+
// disabled
|
|
99
|
+
'&-disabled': {
|
|
100
|
+
backgroundColor: '#ECECEC',
|
|
101
|
+
//"@apply disabled:bg-gray-stroke": {},
|
|
102
|
+
//"@apply disabled:shadow-none disabled:border-neutral-300 disabled:bg-neutral-300 disabled:hover:text-neutral-300": {},
|
|
103
|
+
//"@apply dark:disabled:border-transparent dark:disabled:bg-white/20 dark:disabled:hover:text-white/20": {},
|
|
104
|
+
},
|
|
105
|
+
|
|
106
|
+
// label
|
|
107
|
+
'&-label': {
|
|
108
|
+
'@apply text-body select-none text-sm': {},
|
|
109
|
+
marginLeft: '0.8rem',
|
|
110
|
+
//"@apply text-black": {},
|
|
111
|
+
// dark colors
|
|
112
|
+
'@apply dark:text-neutral-100': {},
|
|
113
|
+
|
|
114
|
+
'&-sm': {
|
|
115
|
+
'@apply text-xs': {},
|
|
116
|
+
},
|
|
117
|
+
|
|
118
|
+
'&-md': {
|
|
119
|
+
'@apply text-sm': {},
|
|
120
|
+
},
|
|
121
|
+
|
|
122
|
+
'&-lg': {
|
|
123
|
+
'@apply text-base': {},
|
|
124
|
+
},
|
|
125
|
+
},
|
|
126
|
+
},
|
|
127
|
+
});
|
package/src/components/code.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
module.exports = Code = () => ({
|
|
2
|
-
'.code': {
|
|
3
|
-
'@apply inline-flex justify-center items-center capitalize text-xs rounded-sm font-mono break-all': {},
|
|
4
|
-
'@apply bg-neutral-200 border border-neutral-100 text-body': {},
|
|
5
|
-
// dark
|
|
6
|
-
'@apply dark:bg-neutral-700 dark:border-neutral-600 dark:text-neutral-300': {},
|
|
7
|
-
padding: '2px 3px 1px',
|
|
8
|
-
},
|
|
9
|
-
});
|
|
1
|
+
module.exports = Code = () => ({
|
|
2
|
+
'.code': {
|
|
3
|
+
'@apply inline-flex justify-center items-center capitalize text-xs rounded-sm font-mono break-all': {},
|
|
4
|
+
'@apply bg-neutral-200 border border-neutral-100 text-body': {},
|
|
5
|
+
// dark
|
|
6
|
+
'@apply dark:bg-neutral-700 dark:border-neutral-600 dark:text-neutral-300': {},
|
|
7
|
+
padding: '2px 3px 1px',
|
|
8
|
+
},
|
|
9
|
+
});
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
module.exports = CookieConsent = () => ({
|
|
2
|
-
'.cookie-consent': {
|
|
3
|
-
'@apply min-w-full fixed flex justify-center z-10 bottom-0 left-0 right-0 bg-white': {},
|
|
4
|
-
|
|
5
|
-
'&-close-btn': {
|
|
6
|
-
'@apply cursor-pointer hover:text-primary-active absolute right-8 top-6 border border-transparent focus-visible:border-black flex self-center':
|
|
7
|
-
{},
|
|
8
|
-
|
|
9
|
-
'&-icon': {
|
|
10
|
-
'@apply !text-2xl': {},
|
|
11
|
-
},
|
|
12
|
-
},
|
|
13
|
-
|
|
14
|
-
'&-content-wrapper': {
|
|
15
|
-
'@apply flex flex-col container py-12 px-4 bg-white relative': {},
|
|
16
|
-
},
|
|
17
|
-
|
|
18
|
-
'&-title': {
|
|
19
|
-
'@apply text-2xl leading-2xl mb-1 mt-4 break-words': {},
|
|
20
|
-
},
|
|
21
|
-
|
|
22
|
-
'&-description': {
|
|
23
|
-
'@apply text-base leading-base mb-8': {},
|
|
24
|
-
},
|
|
25
|
-
|
|
26
|
-
'&-btn-wrapper': {
|
|
27
|
-
'@apply flex flex-col space-y-4 lg:block lg:space-y-0 lg:space-x-4': {},
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
});
|
|
1
|
+
module.exports = CookieConsent = () => ({
|
|
2
|
+
'.cookie-consent': {
|
|
3
|
+
'@apply min-w-full fixed flex justify-center z-10 bottom-0 left-0 right-0 bg-white': {},
|
|
4
|
+
|
|
5
|
+
'&-close-btn': {
|
|
6
|
+
'@apply cursor-pointer hover:text-primary-active absolute right-8 top-6 border border-transparent focus-visible:border-black flex self-center':
|
|
7
|
+
{},
|
|
8
|
+
|
|
9
|
+
'&-icon': {
|
|
10
|
+
'@apply !text-2xl': {},
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
|
|
14
|
+
'&-content-wrapper': {
|
|
15
|
+
'@apply flex flex-col container py-12 px-4 bg-white relative': {},
|
|
16
|
+
},
|
|
17
|
+
|
|
18
|
+
'&-title': {
|
|
19
|
+
'@apply text-2xl leading-2xl mb-1 mt-4 break-words': {},
|
|
20
|
+
},
|
|
21
|
+
|
|
22
|
+
'&-description': {
|
|
23
|
+
'@apply text-base leading-base mb-8': {},
|
|
24
|
+
},
|
|
25
|
+
|
|
26
|
+
'&-btn-wrapper': {
|
|
27
|
+
'@apply flex flex-col space-y-4 lg:block lg:space-y-0 lg:space-x-4': {},
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
});
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
module.exports = Divider = () => ({
|
|
2
|
-
'.divider': {
|
|
3
|
-
'@apply border-0 border-gray-stroke': {},
|
|
4
|
-
//borderColor: "inherit",
|
|
5
|
-
'&-vertical': {
|
|
6
|
-
'@apply border-l border-solid h-auto mx-2': {},
|
|
7
|
-
},
|
|
8
|
-
'&-horizontal': {
|
|
9
|
-
'@apply border-b border-solid w-auto my-2': {},
|
|
10
|
-
},
|
|
11
|
-
},
|
|
12
|
-
});
|
|
1
|
+
module.exports = Divider = () => ({
|
|
2
|
+
'.divider': {
|
|
3
|
+
'@apply border-0 border-gray-stroke': {},
|
|
4
|
+
//borderColor: "inherit",
|
|
5
|
+
'&-vertical': {
|
|
6
|
+
'@apply border-l border-solid h-auto mx-2': {},
|
|
7
|
+
},
|
|
8
|
+
'&-horizontal': {
|
|
9
|
+
'@apply border-b border-solid w-auto my-2': {},
|
|
10
|
+
},
|
|
11
|
+
},
|
|
12
|
+
});
|