@sk-web-gui/core 1.0.2 → 1.0.3
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/cjs/components/header.js +5 -1
- package/dist/cjs/components/header.js.map +1 -1
- package/dist/cjs/components/zebratable.js +13 -4
- package/dist/cjs/components/zebratable.js.map +1 -1
- package/dist/esm/components/header.js +5 -1
- package/dist/esm/components/header.js.map +1 -1
- package/dist/esm/components/zebratable.js +13 -4
- package/dist/esm/components/zebratable.js.map +1 -1
- package/dist/types/base.d.ts +52 -0
- package/dist/types/colors.d.ts +883 -0
- package/dist/types/components/accordion.d.ts +97 -0
- package/dist/types/components/alert-banner.d.ts +24 -0
- package/dist/types/components/alert.d.ts +10 -0
- package/dist/types/components/avatar.d.ts +4 -0
- package/dist/types/components/badge.d.ts +4 -0
- package/dist/types/components/breadcrumb.d.ts +29 -0
- package/dist/types/components/button-group.d.ts +26 -0
- package/dist/types/components/button.d.ts +172 -0
- package/dist/types/components/card.d.ts +56 -0
- package/dist/types/components/checkbox.d.ts +106 -0
- package/dist/types/components/code.d.ts +9 -0
- package/dist/types/components/combobox.d.ts +65 -0
- package/dist/types/components/comments.d.ts +30 -0
- package/dist/types/components/context-menu.d.ts +39 -0
- package/dist/types/components/cookie-consent.d.ts +36 -0
- package/dist/types/components/dialog.d.ts +6 -0
- package/dist/types/components/divider.d.ts +51 -0
- package/dist/types/components/dot.d.ts +35 -0
- package/dist/types/components/dropdown-filter.d.ts +58 -0
- package/dist/types/components/filter.d.ts +15 -0
- package/dist/types/components/footer.d.ts +28 -0
- package/dist/types/components/forms.d.ts +25 -0
- package/dist/types/components/header.d.ts +29 -0
- package/dist/types/components/icon.d.ts +4 -0
- package/dist/types/components/input.d.ts +207 -0
- package/dist/types/components/kbd.d.ts +8 -0
- package/dist/types/components/label.d.ts +4 -0
- package/dist/types/components/link.d.ts +44 -0
- package/dist/types/components/list.d.ts +53 -0
- package/dist/types/components/logo.d.ts +49 -0
- package/dist/types/components/menu-vertical.d.ts +219 -0
- package/dist/types/components/menubar.d.ts +12 -0
- package/dist/types/components/modal.d.ts +42 -0
- package/dist/types/components/notification.d.ts +48 -0
- package/dist/types/components/pagination.d.ts +101 -0
- package/dist/types/components/popup-menu.d.ts +106 -0
- package/dist/types/components/progress-bar.d.ts +4 -0
- package/dist/types/components/progress-stepper.d.ts +51 -0
- package/dist/types/components/radio.d.ts +126 -0
- package/dist/types/components/search-field.d.ts +21 -0
- package/dist/types/components/select.d.ts +142 -0
- package/dist/types/components/side-menu.d.ts +219 -0
- package/dist/types/components/snackbar.d.ts +31 -0
- package/dist/types/components/spinner.d.ts +4 -0
- package/dist/types/components/switch.d.ts +65 -0
- package/dist/types/components/tab-menu.d.ts +57 -0
- package/dist/types/components/table.d.ts +12 -0
- package/dist/types/components/tabs.d.ts +64 -0
- package/dist/types/components/tooltip.d.ts +54 -0
- package/dist/types/components/user-menu.d.ts +14 -0
- package/dist/types/components/zebratable.d.ts +135 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/plugin.d.ts +8 -0
- package/dist/types/preset.d.ts +13 -0
- package/dist/types/theme.d.ts +1719 -0
- package/dist/types/units.d.ts +247 -0
- package/dist/types/with-opacity.d.ts +4 -0
- package/package.json +14 -6
- package/dist/cjs/components/calendar.js +0 -67
- package/dist/cjs/components/calendar.js.map +0 -1
- package/dist/cjs/components/form-control.js +0 -8
- package/dist/cjs/components/form-control.js.map +0 -1
- package/dist/cjs/components/message.js +0 -52
- package/dist/cjs/components/message.js.map +0 -1
- package/dist/cjs/components/profile-picture.js +0 -15
- package/dist/cjs/components/profile-picture.js.map +0 -1
- package/dist/cjs/components/profile.js +0 -34
- package/dist/cjs/components/profile.js.map +0 -1
- package/dist/cjs/components/search-bar.js +0 -8
- package/dist/cjs/components/search-bar.js.map +0 -1
- package/dist/cjs/components/tag.js +0 -72
- package/dist/cjs/components/tag.js.map +0 -1
- package/dist/esm/components/calendar.js +0 -65
- package/dist/esm/components/calendar.js.map +0 -1
- package/dist/esm/components/form-control.js +0 -6
- package/dist/esm/components/form-control.js.map +0 -1
- package/dist/esm/components/message.js +0 -50
- package/dist/esm/components/message.js.map +0 -1
- package/dist/esm/components/profile-picture.js +0 -13
- package/dist/esm/components/profile-picture.js.map +0 -1
- package/dist/esm/components/profile.js +0 -32
- package/dist/esm/components/profile.js.map +0 -1
- package/dist/esm/components/search-bar.js +0 -6
- package/dist/esm/components/search-bar.js.map +0 -1
- package/dist/esm/components/tag.js +0 -79
- package/dist/esm/components/tag.js.map +0 -1
- package/src/base.js +0 -47
- package/src/colors.js +0 -645
- package/src/components/accordion.js +0 -103
- package/src/components/alert-banner.js +0 -29
- package/src/components/alert.js +0 -90
- package/src/components/avatar.js +0 -39
- package/src/components/badge.js +0 -41
- package/src/components/breadcrumb.js +0 -33
- package/src/components/button-group.js +0 -31
- package/src/components/button.js +0 -309
- package/src/components/card.js +0 -293
- package/src/components/checkbox.js +0 -136
- package/src/components/code.js +0 -9
- package/src/components/combobox.js +0 -66
- package/src/components/comments.js +0 -38
- package/src/components/context-menu.js +0 -49
- package/src/components/cookie-consent.js +0 -45
- package/src/components/dialog.js +0 -5
- package/src/components/divider.js +0 -52
- package/src/components/dot.js +0 -83
- package/src/components/dropdown-filter.js +0 -66
- package/src/components/filter.js +0 -16
- package/src/components/footer.js +0 -29
- package/src/components/forms.js +0 -27
- package/src/components/header.js +0 -28
- package/src/components/icon.js +0 -78
- package/src/components/input.js +0 -244
- package/src/components/kbd.js +0 -9
- package/src/components/label.js +0 -37
- package/src/components/link.js +0 -53
- package/src/components/list.js +0 -61
- package/src/components/logo.js +0 -49
- package/src/components/menu-vertical.js +0 -293
- package/src/components/menubar.js +0 -56
- package/src/components/modal.js +0 -47
- package/src/components/notification.js +0 -56
- package/src/components/pagination.js +0 -116
- package/src/components/popup-menu.js +0 -111
- package/src/components/progress-bar.js +0 -31
- package/src/components/progress-stepper.js +0 -50
- package/src/components/radio.js +0 -138
- package/src/components/search-field.js +0 -20
- package/src/components/select.js +0 -203
- package/src/components/side-menu.js +0 -272
- package/src/components/snackbar.js +0 -34
- package/src/components/spinner.js +0 -23
- package/src/components/switch.js +0 -85
- package/src/components/tab-menu.js +0 -58
- package/src/components/table.js +0 -13
- package/src/components/tabs.js +0 -64
- package/src/components/tooltip.js +0 -64
- package/src/components/user-menu.js +0 -13
- package/src/components/zebratable.js +0 -140
- package/src/index.js +0 -8
- package/src/plugin.js +0 -142
- package/src/preset.js +0 -5
- package/src/theme.js +0 -158
- package/src/units.js +0 -212
- package/src/with-opacity.js +0 -6
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
module.exports = PopupMenu = () => ({
|
|
2
|
-
'.sk-popup-menu-items': {
|
|
3
|
-
'&[data-position="left"]': {
|
|
4
|
-
'@apply mt-0 mr-8 right-[100%]': {},
|
|
5
|
-
'&[data-align="end"]': {
|
|
6
|
-
'@apply bottom-0': {},
|
|
7
|
-
},
|
|
8
|
-
'&[data-align="start"]': {
|
|
9
|
-
'@apply top-0': {},
|
|
10
|
-
},
|
|
11
|
-
},
|
|
12
|
-
'&[data-position="right"]': {
|
|
13
|
-
'@apply mt-0 ml-8 left-[100%]': {},
|
|
14
|
-
'&[data-align="end"]': {
|
|
15
|
-
'@apply bottom-0': {},
|
|
16
|
-
},
|
|
17
|
-
'&[data-align="start"]': {
|
|
18
|
-
'@apply top-0': {},
|
|
19
|
-
},
|
|
20
|
-
},
|
|
21
|
-
'&[data-position="over"]': {
|
|
22
|
-
'@apply mt-0 mb-8 bottom-[100%]': {},
|
|
23
|
-
'&[data-align="end"]': {
|
|
24
|
-
'@apply right-0': {},
|
|
25
|
-
},
|
|
26
|
-
'&[data-align="start"]': {
|
|
27
|
-
'@apply left-0': {},
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
'&[data-position="under"]': {
|
|
31
|
-
'&[data-align="end"]': {
|
|
32
|
-
'@apply right-0': {},
|
|
33
|
-
},
|
|
34
|
-
'&[data-align="start"]': {
|
|
35
|
-
'@apply left-0': {},
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
'@apply absolute flex flex-col justify-start items-start mt-8': {},
|
|
39
|
-
'@apply w-max': {},
|
|
40
|
-
'@apply rounded-utility': {},
|
|
41
|
-
'@apply bg-background-100': {},
|
|
42
|
-
'@apply z-10': {},
|
|
43
|
-
'@apply p-8 gap-4': {},
|
|
44
|
-
'@apply shadow-100': {},
|
|
45
|
-
'@apply border-0': {},
|
|
46
|
-
'@apply focus-within:border-0': {},
|
|
47
|
-
'@apply focus:outline-0 focus-visible:outline-0 focus-visible:ring': {},
|
|
48
|
-
|
|
49
|
-
'.sk-popup-menu-item': {
|
|
50
|
-
'@apply w-full': {},
|
|
51
|
-
'@apply h-[4rem]': {},
|
|
52
|
-
'@apply min-h-[4rem]': {},
|
|
53
|
-
'@apply bg-transparent hover:bg-primitives-gray-200': {},
|
|
54
|
-
'@apply dark:hover:bg-primitives-overlay-lighten-1': {},
|
|
55
|
-
'@apply cursor-pointer': {},
|
|
56
|
-
'@apply flex flex-row shrink-0': {},
|
|
57
|
-
'@apply pl-8 pr-32 py-4 gap-12': {},
|
|
58
|
-
|
|
59
|
-
'@apply rounded-utility': {},
|
|
60
|
-
'@apply text-body font-normal': {},
|
|
61
|
-
'&.active, &:active': {
|
|
62
|
-
'@apply bg-primitives-gray-200': {},
|
|
63
|
-
'@apply dark:bg-primitives-overlay-lighten-1': {},
|
|
64
|
-
},
|
|
65
|
-
svg: {
|
|
66
|
-
'@apply w-[2rem] h-[2rem]': {},
|
|
67
|
-
},
|
|
68
|
-
|
|
69
|
-
'@apply justify-start': {},
|
|
70
|
-
|
|
71
|
-
'@apply border-0': {},
|
|
72
|
-
'@apply items-center': {},
|
|
73
|
-
'@apply no-underline': {},
|
|
74
|
-
},
|
|
75
|
-
'&-group': {
|
|
76
|
-
'@apply w-full flex flex-col border-b-1 border-divider pb-4 gap-4': {},
|
|
77
|
-
'&:first-child': {
|
|
78
|
-
'@apply pt-0': {},
|
|
79
|
-
},
|
|
80
|
-
'&:last-child': {
|
|
81
|
-
'@apply border-0 pb-0': {},
|
|
82
|
-
},
|
|
83
|
-
'> *': {
|
|
84
|
-
'@apply pl-8 pr-32 py-4 gap-12': {},
|
|
85
|
-
},
|
|
86
|
-
},
|
|
87
|
-
'&-sm': {
|
|
88
|
-
'@apply p-8 gap-6': {},
|
|
89
|
-
|
|
90
|
-
'.sk-popup-menu-item': {
|
|
91
|
-
'@apply h-[3.2rem]': {},
|
|
92
|
-
'@apply min-h-[3.2rem]': {},
|
|
93
|
-
'@apply gap-10 pl-8 pr-24 py-4': {},
|
|
94
|
-
|
|
95
|
-
'@apply text-small': {},
|
|
96
|
-
'&-group': {
|
|
97
|
-
'@apply gap-6 pb-6': {},
|
|
98
|
-
'> *': {
|
|
99
|
-
'@apply gap-10 pl-8 pr-24 py-4': {},
|
|
100
|
-
},
|
|
101
|
-
},
|
|
102
|
-
svg: {
|
|
103
|
-
'@apply w-[1.8rem] h-[1.8rem]': {},
|
|
104
|
-
},
|
|
105
|
-
},
|
|
106
|
-
},
|
|
107
|
-
'&.right': {
|
|
108
|
-
'@apply right-0': {},
|
|
109
|
-
},
|
|
110
|
-
},
|
|
111
|
-
});
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
module.exports = ProgressBar = (colors) => ({
|
|
2
|
-
'.sk-progress-bar': {
|
|
3
|
-
'@apply flex h-[.4rem] rounded-circular bg-background-color-mixin-2': {},
|
|
4
|
-
|
|
5
|
-
'&-fill': {
|
|
6
|
-
'@apply rounded-circular': {},
|
|
7
|
-
},
|
|
8
|
-
|
|
9
|
-
...colors.reduce(
|
|
10
|
-
(styles, color) => ({
|
|
11
|
-
...styles,
|
|
12
|
-
[`&[data-color="${color}"]`]: {
|
|
13
|
-
'.sk-progress-bar-fill': {
|
|
14
|
-
[`@apply bg-${color}-surface-primary`]: {},
|
|
15
|
-
},
|
|
16
|
-
|
|
17
|
-
'&[data-accent="true"]': {
|
|
18
|
-
[`@apply bg-inverted-${color}-surface-primary`]: {},
|
|
19
|
-
},
|
|
20
|
-
},
|
|
21
|
-
}),
|
|
22
|
-
{}
|
|
23
|
-
),
|
|
24
|
-
|
|
25
|
-
"&[data-color='tertiary']": {
|
|
26
|
-
'.sk-progress-bar-fill': {
|
|
27
|
-
[`@apply bg-primary-surface`]: {},
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
},
|
|
31
|
-
});
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
module.exports = ProgressStepper = () => ({
|
|
2
|
-
'.sk-progress-stepper': {
|
|
3
|
-
'@apply flex justify-between': {},
|
|
4
|
-
hr: {
|
|
5
|
-
'@apply w-full mt-[1.9rem]': {},
|
|
6
|
-
},
|
|
7
|
-
'&-step': {
|
|
8
|
-
'@apply flex flex-col items-center': {},
|
|
9
|
-
'@apply gap-4': {},
|
|
10
|
-
'@apply w-auto': {},
|
|
11
|
-
'@apply shrink-0': {},
|
|
12
|
-
'@apply text-base leading-base text-dark-primary font-normal': {},
|
|
13
|
-
svg: {
|
|
14
|
-
'@apply w-20 h-20': {},
|
|
15
|
-
},
|
|
16
|
-
'&-wrapper': {
|
|
17
|
-
'@apply flex flex-row shrink w-full gap-4': {},
|
|
18
|
-
hr: {
|
|
19
|
-
'@apply w-full grow shrink mt-[1.9rem]': {},
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
|
-
'&-box': {
|
|
23
|
-
'@apply box-border': {},
|
|
24
|
-
'@apply shrink-0': {},
|
|
25
|
-
'@apply h-[4rem] w-[4rem]': {},
|
|
26
|
-
'@apply bg-secondary-surface': {},
|
|
27
|
-
'@apply flex justify-center items-center': {},
|
|
28
|
-
'@apply text-label-medium': {},
|
|
29
|
-
'@apply border-2 border-secondary-outline': {},
|
|
30
|
-
'@apply text-dark-secondary': {},
|
|
31
|
-
'@apply rounded-button-sm md:rounded-button-md xl:rounded-button-lg': {},
|
|
32
|
-
},
|
|
33
|
-
'&[data-progress="current"]': {
|
|
34
|
-
'@apply font-bold': {},
|
|
35
|
-
'.sk-progress-stepper-step-box': {
|
|
36
|
-
'@apply border-vattjom-surface-primary': {},
|
|
37
|
-
'@apply bg-vattjom-surface-primary': {},
|
|
38
|
-
'@apply text-vattjom-text-secondary': {},
|
|
39
|
-
},
|
|
40
|
-
},
|
|
41
|
-
'&[data-progress="done"]': {
|
|
42
|
-
'.sk-progress-stepper-step-box': {
|
|
43
|
-
'@apply border-success-surface-primary': {},
|
|
44
|
-
'@apply bg-success-surface-primary': {},
|
|
45
|
-
'@apply text-success-text-secondary': {},
|
|
46
|
-
},
|
|
47
|
-
},
|
|
48
|
-
},
|
|
49
|
-
},
|
|
50
|
-
});
|
package/src/components/radio.js
DELETED
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
module.exports = Radio = () => ({
|
|
2
|
-
'.sk-form-radio': {
|
|
3
|
-
backgroundImage: 'none',
|
|
4
|
-
|
|
5
|
-
'@apply relative': {},
|
|
6
|
-
'@apply box-border': {},
|
|
7
|
-
'@apply bg-primitives-overlay-lighten-10': {},
|
|
8
|
-
'@apply dark:bg-primitives-overlay-darken-6': {},
|
|
9
|
-
'@apply border-1': {},
|
|
10
|
-
'@apply border-primitives-overlay-darken-6': {},
|
|
11
|
-
'@apply dark:border-primitives-overlay-lighten-6': {},
|
|
12
|
-
'@apply m-0': {},
|
|
13
|
-
'@apply h-24 w-24': {},
|
|
14
|
-
|
|
15
|
-
//Hover
|
|
16
|
-
'@apply hover:after:content-[""]': {},
|
|
17
|
-
'@apply hover:border-primitives-overlay-darken-8': {},
|
|
18
|
-
'@apply hover:dark:border-primitives-overlay-lighten-4': {},
|
|
19
|
-
'&::after': {
|
|
20
|
-
'@apply absolute': {},
|
|
21
|
-
'@apply rounded-full': {},
|
|
22
|
-
'@apply bg-dark-placeholder': {},
|
|
23
|
-
'@apply m-[0.5rem]': {},
|
|
24
|
-
'@apply top-0 left-0 bottom-0 right-0': {},
|
|
25
|
-
},
|
|
26
|
-
|
|
27
|
-
//Focus
|
|
28
|
-
'@apply focus-visible:ring': {},
|
|
29
|
-
'@apply focus-visible:bg-background-content': {},
|
|
30
|
-
'@apply focus-visible:border-background-content': {},
|
|
31
|
-
'@apply focus-visible:hover:border-background-content': {},
|
|
32
|
-
|
|
33
|
-
//Invalid
|
|
34
|
-
'&[aria-invalid="true"]': {
|
|
35
|
-
'@apply border-2': {},
|
|
36
|
-
'@apply border-error-surface-primary': {},
|
|
37
|
-
'@apply hover:border-2': {},
|
|
38
|
-
'@apply hover:border-error-surface-primary': {},
|
|
39
|
-
},
|
|
40
|
-
|
|
41
|
-
//Checked
|
|
42
|
-
'&:checked, &[checked="true"]': {
|
|
43
|
-
'@apply bg-primitives-overlay-lighten-10': {},
|
|
44
|
-
'@apply dark:bg-primitives-overlay-darken-6': {},
|
|
45
|
-
'@apply hover:bg-primitives-overlay-lighten-10': {},
|
|
46
|
-
'@apply hover:dark:bg-primitives-overlay-darken-6': {},
|
|
47
|
-
'@apply focus:bg-primitives-overlay-lighten-10': {},
|
|
48
|
-
'@apply focus:dark:bg-primitives-overlay-darken-6': {},
|
|
49
|
-
'@apply text-primitives-overlay-lighten-10': {},
|
|
50
|
-
'@apply dark:text-primitives-overlay-darken-6': {},
|
|
51
|
-
'@apply hover:text-primitives-overlay-lighten-10': {},
|
|
52
|
-
'@apply hover:dark:text-primitives-overlay-darken-6': {},
|
|
53
|
-
'@apply focus:text-primitives-overlay-lighten-10': {},
|
|
54
|
-
'@apply focus:dark:text-primitives-overlay-darken-6': {},
|
|
55
|
-
'@apply border-primitives-overlay-darken-6': {},
|
|
56
|
-
'@apply focus:border-primitives-overlay-darken-6': {},
|
|
57
|
-
'@apply dark:border-primitives-overlay-lighten-6': {},
|
|
58
|
-
'@apply hover:border-primitives-overlay-darken-8': {},
|
|
59
|
-
'@apply hover:dark:border-primitives-overlay-lighten-4': {},
|
|
60
|
-
'@apply focus:outline-0': {},
|
|
61
|
-
'@apply focus:ring-0 focus:ring-offset-0': {},
|
|
62
|
-
'@apply focus-visible:ring': {},
|
|
63
|
-
'@apply focus-visible:border-transparent': {},
|
|
64
|
-
'@apply after:content-[""]': {},
|
|
65
|
-
'&[aria-invalid="true"]': {
|
|
66
|
-
'@apply border-2': {},
|
|
67
|
-
'@apply border-error-surface-primary': {},
|
|
68
|
-
'@apply hover:border-2': {},
|
|
69
|
-
'@apply hover:border-error-surface-primary': {},
|
|
70
|
-
},
|
|
71
|
-
'&::after': {
|
|
72
|
-
'@apply bg-dark-primary': {},
|
|
73
|
-
},
|
|
74
|
-
},
|
|
75
|
-
|
|
76
|
-
'&:active': {
|
|
77
|
-
'@apply ring-0 ring-offset-0': {},
|
|
78
|
-
},
|
|
79
|
-
|
|
80
|
-
//Disabled
|
|
81
|
-
'&:disabled, &[disabled="true"]': {
|
|
82
|
-
'@apply border-primitives-overlay-darken-3': {},
|
|
83
|
-
'@apply dark:border-primitives-overlay-lighten-3': {},
|
|
84
|
-
'@apply hover:border-primitives-overlay-darken-3': {},
|
|
85
|
-
'@apply hover:dark:border-primitives-overlay-lighten-3': {},
|
|
86
|
-
'@apply bg-background-200': {},
|
|
87
|
-
'@apply hover:bg-background-200': {},
|
|
88
|
-
'@apply cursor-not-allowed': {},
|
|
89
|
-
'&:not(:checked):not([checked="true"]):after': {
|
|
90
|
-
'@apply hidden': {},
|
|
91
|
-
},
|
|
92
|
-
'&:checked, &[checked="true"]': {
|
|
93
|
-
'&::after': {
|
|
94
|
-
'@apply bg-dark-disabled': {},
|
|
95
|
-
},
|
|
96
|
-
},
|
|
97
|
-
},
|
|
98
|
-
|
|
99
|
-
'&-label': {
|
|
100
|
-
'@apply inline-flex align-top items-center': {},
|
|
101
|
-
'@apply font-normal': {},
|
|
102
|
-
'@apply p-2': {},
|
|
103
|
-
'&-sm': {
|
|
104
|
-
'@apply text-small': {},
|
|
105
|
-
'@apply h-[2.8rem]': {},
|
|
106
|
-
'@apply gap-10': {},
|
|
107
|
-
},
|
|
108
|
-
'&-md': {
|
|
109
|
-
'@apply text-base': {},
|
|
110
|
-
'@apply h-[2.8rem]': {},
|
|
111
|
-
'@apply gap-10': {},
|
|
112
|
-
},
|
|
113
|
-
'&-lg': {
|
|
114
|
-
'@apply text-large': {},
|
|
115
|
-
'@apply h-[3rem]': {},
|
|
116
|
-
'@apply gap-12': {},
|
|
117
|
-
},
|
|
118
|
-
'&[data-disabled="true"]': {
|
|
119
|
-
'@apply text-dark-disabled': {},
|
|
120
|
-
},
|
|
121
|
-
},
|
|
122
|
-
'&-group': {
|
|
123
|
-
'@apply flex flex-row': {},
|
|
124
|
-
'&[data-direction="column"]': {
|
|
125
|
-
'@apply flex-col': {},
|
|
126
|
-
},
|
|
127
|
-
'&-sm': {
|
|
128
|
-
'@apply gap-12': {},
|
|
129
|
-
},
|
|
130
|
-
'&-md': {
|
|
131
|
-
'@apply gap-16': {},
|
|
132
|
-
},
|
|
133
|
-
'&-lg': {
|
|
134
|
-
'@apply gap-16': {},
|
|
135
|
-
},
|
|
136
|
-
},
|
|
137
|
-
},
|
|
138
|
-
});
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
module.exports = SearchField = () => ({
|
|
2
|
-
'.sk-search-field': {
|
|
3
|
-
'&-md': {
|
|
4
|
-
'.sk-search-field-icon': {
|
|
5
|
-
'@apply w-[2rem] h-[2rem]': {},
|
|
6
|
-
svg: {
|
|
7
|
-
'@apply w-[2rem] h-[2rem]': {},
|
|
8
|
-
},
|
|
9
|
-
},
|
|
10
|
-
},
|
|
11
|
-
'&-lg': {
|
|
12
|
-
'.sk-search-field-icon': {
|
|
13
|
-
'@apply w-[2.2rem] h-[2.2rem]': {},
|
|
14
|
-
svg: {
|
|
15
|
-
'@apply w-[2.2rem] h-[2.2rem]': {},
|
|
16
|
-
},
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
});
|
package/src/components/select.js
DELETED
|
@@ -1,203 +0,0 @@
|
|
|
1
|
-
function chevronDown(color) {
|
|
2
|
-
//TODO: This wont work with CSS variables. The colors are set here and wont work with themes
|
|
3
|
-
return `<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='${color}' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='m6 9 6 6 6-6' /></svg>`;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
function tertiary() {
|
|
7
|
-
return {
|
|
8
|
-
'&-tertiary': {
|
|
9
|
-
'@apply border-2': {},
|
|
10
|
-
|
|
11
|
-
'@apply bg-tertiary-surface': {},
|
|
12
|
-
'@apply hover:bg-tertiary-surface-hover': {},
|
|
13
|
-
'@apply border-transparent': {},
|
|
14
|
-
|
|
15
|
-
'&.sk-form-select-sm': {
|
|
16
|
-
//Padding - border width
|
|
17
|
-
'@apply pl-12': {},
|
|
18
|
-
//Background position - border width
|
|
19
|
-
'@apply bg-right-8': {},
|
|
20
|
-
|
|
21
|
-
//Padding + icon width - border width
|
|
22
|
-
'@apply pr-[3.2rem]': {},
|
|
23
|
-
},
|
|
24
|
-
'&.sk-form-select-md': {
|
|
25
|
-
//Padding - border width
|
|
26
|
-
'@apply pl-16': {},
|
|
27
|
-
//Background position - border width
|
|
28
|
-
'@apply bg-right-12': {},
|
|
29
|
-
//Padding + icon width - border width
|
|
30
|
-
'@apply pr-[4.2rem]': {},
|
|
31
|
-
},
|
|
32
|
-
'&.sk-form-select-lg': {
|
|
33
|
-
//Padding - border width
|
|
34
|
-
'@apply pl-18': {},
|
|
35
|
-
//Background position - border width
|
|
36
|
-
'@apply bg-right-16': {},
|
|
37
|
-
//Padding + icon width - border width
|
|
38
|
-
'@apply pr-[4.8rem]': {},
|
|
39
|
-
},
|
|
40
|
-
//Disabled
|
|
41
|
-
'&[aria-disabled="true"]': {
|
|
42
|
-
'@apply bg-tertiary-surface-disabled': {},
|
|
43
|
-
},
|
|
44
|
-
},
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
function primary() {
|
|
49
|
-
return {
|
|
50
|
-
'&-primary': {
|
|
51
|
-
'@apply border-1': {},
|
|
52
|
-
'@apply border-primitives-overlay-darken-6': {},
|
|
53
|
-
'@apply dark:border-primitives-overlay-lighten-6': {},
|
|
54
|
-
'@apply hover:border-primitives-overlay-darken-8': {},
|
|
55
|
-
'@apply dark:hover:border-primitives-overlay-lighten-4': {},
|
|
56
|
-
'@apply bg-primitives-overlay-lighten-10': {},
|
|
57
|
-
'@apply dark:bg-primitives-overlay-darken-6': {},
|
|
58
|
-
'@apply hover:bg-primitives-overlay-lighten-10': {},
|
|
59
|
-
'@apply dark:hover:bg-primitives-overlay-darken-6': {},
|
|
60
|
-
|
|
61
|
-
'&.sk-form-select-sm': {
|
|
62
|
-
//Padding - border width
|
|
63
|
-
'@apply pl-[1.3rem]': {},
|
|
64
|
-
//Background position - border width
|
|
65
|
-
'@apply bg-[center_right_0.9rem]': {},
|
|
66
|
-
//Padding + icon width - border width
|
|
67
|
-
'@apply pr-[3.3rem]': {},
|
|
68
|
-
|
|
69
|
-
'&[aria-invalid="true"]': {
|
|
70
|
-
//Padding - border width
|
|
71
|
-
'@apply pl-12': {},
|
|
72
|
-
//Background position - border width
|
|
73
|
-
'@apply bg-right-8': {},
|
|
74
|
-
//Padding + icon width - border width
|
|
75
|
-
'@apply pr-[3.2rem]': {},
|
|
76
|
-
},
|
|
77
|
-
},
|
|
78
|
-
'&.sk-form-select-md': {
|
|
79
|
-
//Padding - border width
|
|
80
|
-
'@apply pl-[1.7rem]': {},
|
|
81
|
-
//Background position - border width
|
|
82
|
-
'@apply bg-[center_right_1.3rem]': {},
|
|
83
|
-
//Padding + icon width - border width
|
|
84
|
-
'@apply pr-[4.3rem]': {},
|
|
85
|
-
|
|
86
|
-
'&[aria-invalid="true"]': {
|
|
87
|
-
//Padding - border width
|
|
88
|
-
'@apply pl-16': {},
|
|
89
|
-
//Background position - border width
|
|
90
|
-
'@apply bg-right-12': {},
|
|
91
|
-
//Padding + icon width - border width
|
|
92
|
-
'@apply pr-[4.2rem]': {},
|
|
93
|
-
},
|
|
94
|
-
},
|
|
95
|
-
'&.sk-form-select-lg': {
|
|
96
|
-
//Padding - border width
|
|
97
|
-
'@apply pl-[1.9rem]': {},
|
|
98
|
-
//Background position - border width
|
|
99
|
-
'@apply bg-[center_right_1.7rem]': {},
|
|
100
|
-
//Padding + icon width - border width
|
|
101
|
-
'@apply pr-[4.9rem]': {},
|
|
102
|
-
|
|
103
|
-
'&[aria-invalid="true"]': {
|
|
104
|
-
//Padding - border width
|
|
105
|
-
'@apply pl-18': {},
|
|
106
|
-
//Background position - border width
|
|
107
|
-
'@apply bg-right-16': {},
|
|
108
|
-
//Padding + icon width - border width
|
|
109
|
-
'@apply pr-[4.8rem]': {},
|
|
110
|
-
},
|
|
111
|
-
},
|
|
112
|
-
//Disabled
|
|
113
|
-
'&[aria-disabled="true"]': {
|
|
114
|
-
'@apply bg-primitives-overlay-darken-1': {},
|
|
115
|
-
'@apply dark:bg-primitives-overlay-lighten-1': {},
|
|
116
|
-
'@apply border-primitives-overlay-darken-3': {},
|
|
117
|
-
'@apply dark:border-primitives-overlay-lighten-3': {},
|
|
118
|
-
'@apply hover:border-primitives-overlay-darken-3': {},
|
|
119
|
-
'@apply dark:hover:border-primitives-overlay-lighten-3': {},
|
|
120
|
-
},
|
|
121
|
-
},
|
|
122
|
-
};
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
module.exports = Select = () => ({
|
|
126
|
-
'.sk-form-select': {
|
|
127
|
-
'@apply h-fit': {},
|
|
128
|
-
'@apply w-fit': {},
|
|
129
|
-
'@apply box-border': {},
|
|
130
|
-
'@apply focus:border-transparent': {},
|
|
131
|
-
'@apply rounded-button': {},
|
|
132
|
-
'@apply text-dark-secondary': {},
|
|
133
|
-
'@apply placeholder:text-dark-secondary': {},
|
|
134
|
-
'@apply hover:placeholder:text-dark-primary': {},
|
|
135
|
-
'@apply focus:placeholder:text-dark-primary': {},
|
|
136
|
-
'@apply hover:text-dark-primary': {},
|
|
137
|
-
'@apply focus:text-dark-primary': {},
|
|
138
|
-
'@apply py-6': {},
|
|
139
|
-
'@apply focus:ring focus:ring-ring focus:ring-offset': {},
|
|
140
|
-
'@apply focus:outline-0': {},
|
|
141
|
-
|
|
142
|
-
backgroundImage: [`url("data:image/svg+xml;utf-8,${chevronDown('rgb(68,68,80)')}")`],
|
|
143
|
-
'&:hover, &:focus': {
|
|
144
|
-
backgroundImage: [`url("data:image/svg+xml;utf-8,${chevronDown('rgb(28,28,40)')}")`],
|
|
145
|
-
},
|
|
146
|
-
|
|
147
|
-
...tertiary(),
|
|
148
|
-
...primary(),
|
|
149
|
-
|
|
150
|
-
//Droprown
|
|
151
|
-
'*': {
|
|
152
|
-
'@apply bg-background-content': {},
|
|
153
|
-
},
|
|
154
|
-
|
|
155
|
-
//Invalid
|
|
156
|
-
'&[aria-invalid="true"]': {
|
|
157
|
-
'@apply border-2 border-error-surface-primary': {},
|
|
158
|
-
},
|
|
159
|
-
|
|
160
|
-
//Disabled
|
|
161
|
-
'&[aria-disabled="true"]': {
|
|
162
|
-
'@apply opacity-100': {},
|
|
163
|
-
'@apply text-dark-disabled': {},
|
|
164
|
-
'@apply placeholder:text-dark-disabled': {},
|
|
165
|
-
'@apply bg-tertiary-surface-disabled': {},
|
|
166
|
-
backgroundImage: [`url("data:image/svg+xml;utf-8,${chevronDown('rgba(28,28,40, 0.5)')}")`],
|
|
167
|
-
},
|
|
168
|
-
|
|
169
|
-
'&-sm': {
|
|
170
|
-
'@apply h-[3.2rem]': {},
|
|
171
|
-
'@apply text-label-small': {},
|
|
172
|
-
'@apply rounded-button-sm': {},
|
|
173
|
-
'*': {
|
|
174
|
-
'@apply text-input-small': {},
|
|
175
|
-
},
|
|
176
|
-
},
|
|
177
|
-
'&-md': {
|
|
178
|
-
'@apply h-[4rem]': {},
|
|
179
|
-
'@apply text-label-medium': {},
|
|
180
|
-
'@apply rounded-button-md': {},
|
|
181
|
-
'*': {
|
|
182
|
-
'@apply text-input-medium': {},
|
|
183
|
-
},
|
|
184
|
-
},
|
|
185
|
-
'&-lg': {
|
|
186
|
-
'@apply h-[4.8rem]': {},
|
|
187
|
-
'@apply text-label-large': {},
|
|
188
|
-
'@apply rounded-button-lg': {},
|
|
189
|
-
'*': {
|
|
190
|
-
'@apply text-input-large': {},
|
|
191
|
-
},
|
|
192
|
-
},
|
|
193
|
-
},
|
|
194
|
-
'.dark .sk-form-select': {
|
|
195
|
-
backgroundImage: [`url("data:image/svg+xml;utf-8,${chevronDown('rgb(229,229,229)')}")`],
|
|
196
|
-
'&:hover, &:focus': {
|
|
197
|
-
backgroundImage: [`url("data:image/svg+xml;utf-8,${chevronDown('rgb(255,255,255)')}")`],
|
|
198
|
-
},
|
|
199
|
-
'&[aria-disabled="true"]': {
|
|
200
|
-
backgroundImage: [`url("data:image/svg+xml;utf-8,${chevronDown('rgba(255,255,255, 0.64)')}")`],
|
|
201
|
-
},
|
|
202
|
-
},
|
|
203
|
-
});
|