@sk-web-gui/core 0.1.92 → 1.0.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.
Files changed (278) hide show
  1. package/dist/cjs/base.js +21 -40
  2. package/dist/cjs/base.js.map +1 -1
  3. package/dist/cjs/colors.js +629 -123
  4. package/dist/cjs/colors.js.map +1 -1
  5. package/dist/cjs/components/accordion.js +52 -141
  6. package/dist/cjs/components/accordion.js.map +1 -1
  7. package/dist/cjs/components/alert-banner.js +1 -1
  8. package/dist/cjs/components/alert-banner.js.map +1 -1
  9. package/dist/cjs/components/alert.js +6 -6
  10. package/dist/cjs/components/alert.js.map +1 -1
  11. package/dist/cjs/components/avatar.js +28 -63
  12. package/dist/cjs/components/avatar.js.map +1 -1
  13. package/dist/cjs/components/badge.js +21 -165
  14. package/dist/cjs/components/badge.js.map +1 -1
  15. package/dist/cjs/components/breadcrumb.js +15 -3
  16. package/dist/cjs/components/breadcrumb.js.map +1 -1
  17. package/dist/cjs/components/button-group.js +20 -33
  18. package/dist/cjs/components/button-group.js.map +1 -1
  19. package/dist/cjs/components/button.js +178 -151
  20. package/dist/cjs/components/button.js.map +1 -1
  21. package/dist/cjs/components/calendar.js +1 -1
  22. package/dist/cjs/components/calendar.js.map +1 -1
  23. package/dist/cjs/components/card.js +200 -39
  24. package/dist/cjs/components/card.js.map +1 -1
  25. package/dist/cjs/components/checkbox.js +97 -70
  26. package/dist/cjs/components/checkbox.js.map +1 -1
  27. package/dist/cjs/components/combobox.js +67 -0
  28. package/dist/cjs/components/combobox.js.map +1 -0
  29. package/dist/cjs/components/comments.js.map +1 -1
  30. package/dist/cjs/components/cookie-consent.js +25 -8
  31. package/dist/cjs/components/cookie-consent.js.map +1 -1
  32. package/dist/cjs/components/dialog.js +2 -9
  33. package/dist/cjs/components/dialog.js.map +1 -1
  34. package/dist/cjs/components/divider.js +43 -5
  35. package/dist/cjs/components/divider.js.map +1 -1
  36. package/dist/cjs/components/dot.js +3 -3
  37. package/dist/cjs/components/dot.js.map +1 -1
  38. package/dist/cjs/components/filter.js +17 -0
  39. package/dist/cjs/components/filter.js.map +1 -0
  40. package/dist/cjs/components/footer.js +22 -22
  41. package/dist/cjs/components/footer.js.map +1 -1
  42. package/dist/cjs/components/form-control.js +8 -0
  43. package/dist/cjs/components/form-control.js.map +1 -0
  44. package/dist/cjs/components/forms.js +13 -283
  45. package/dist/cjs/components/forms.js.map +1 -1
  46. package/dist/cjs/components/header.js +28 -17
  47. package/dist/cjs/components/header.js.map +1 -1
  48. package/dist/cjs/components/icon.js +52 -7
  49. package/dist/cjs/components/icon.js.map +1 -1
  50. package/dist/cjs/components/input.js +227 -0
  51. package/dist/cjs/components/input.js.map +1 -0
  52. package/dist/cjs/components/kbd.js +2 -2
  53. package/dist/cjs/components/kbd.js.map +1 -1
  54. package/dist/cjs/components/label.js +26 -0
  55. package/dist/cjs/components/label.js.map +1 -0
  56. package/dist/cjs/components/link.js +35 -12
  57. package/dist/cjs/components/link.js.map +1 -1
  58. package/dist/cjs/components/list.js +56 -0
  59. package/dist/cjs/components/list.js.map +1 -0
  60. package/dist/cjs/components/logo.js +50 -0
  61. package/dist/cjs/components/logo.js.map +1 -0
  62. package/dist/cjs/components/menu-vertical.js +234 -0
  63. package/dist/cjs/components/menu-vertical.js.map +1 -0
  64. package/dist/cjs/components/menubar.js +44 -0
  65. package/dist/cjs/components/menubar.js.map +1 -0
  66. package/dist/cjs/components/modal.js +34 -14
  67. package/dist/cjs/components/modal.js.map +1 -1
  68. package/dist/cjs/components/notification.js +2 -2
  69. package/dist/cjs/components/notification.js.map +1 -1
  70. package/dist/cjs/components/pagination.js +50 -29
  71. package/dist/cjs/components/pagination.js.map +1 -1
  72. package/dist/cjs/components/popup-menu.js +108 -0
  73. package/dist/cjs/components/popup-menu.js.map +1 -0
  74. package/dist/cjs/components/progress-bar.js +23 -0
  75. package/dist/cjs/components/progress-bar.js.map +1 -0
  76. package/dist/cjs/components/progress-stepper.js +53 -0
  77. package/dist/cjs/components/progress-stepper.js.map +1 -0
  78. package/dist/cjs/components/radio.js +113 -64
  79. package/dist/cjs/components/radio.js.map +1 -1
  80. package/dist/cjs/components/search-field.js +23 -0
  81. package/dist/cjs/components/search-field.js.map +1 -0
  82. package/dist/cjs/components/select.js +190 -0
  83. package/dist/cjs/components/select.js.map +1 -0
  84. package/dist/cjs/components/side-menu.js +7 -7
  85. package/dist/cjs/components/side-menu.js.map +1 -1
  86. package/dist/cjs/components/snackbar.js +33 -0
  87. package/dist/cjs/components/snackbar.js.map +1 -0
  88. package/dist/cjs/components/spinner.js +19 -0
  89. package/dist/cjs/components/spinner.js.map +1 -0
  90. package/dist/cjs/components/switch.js +46 -75
  91. package/dist/cjs/components/switch.js.map +1 -1
  92. package/dist/cjs/components/tab-menu.js.map +1 -1
  93. package/dist/cjs/components/tabs.js +1 -1
  94. package/dist/cjs/components/tabs.js.map +1 -1
  95. package/dist/cjs/components/tag.js +4 -4
  96. package/dist/cjs/components/tag.js.map +1 -1
  97. package/dist/cjs/components/tooltip.js +61 -0
  98. package/dist/cjs/components/tooltip.js.map +1 -0
  99. package/dist/cjs/components/user-menu.js +7 -50
  100. package/dist/cjs/components/user-menu.js.map +1 -1
  101. package/dist/cjs/components/zebratable.js +89 -34
  102. package/dist/cjs/components/zebratable.js.map +1 -1
  103. package/dist/cjs/index.js.map +1 -1
  104. package/dist/cjs/plugin.js +19 -8
  105. package/dist/cjs/plugin.js.map +1 -1
  106. package/dist/cjs/theme.js +83 -37
  107. package/dist/cjs/theme.js.map +1 -1
  108. package/dist/cjs/units.js +250 -0
  109. package/dist/cjs/units.js.map +1 -0
  110. package/dist/esm/base.js +21 -40
  111. package/dist/esm/base.js.map +1 -1
  112. package/dist/esm/colors.js +629 -123
  113. package/dist/esm/colors.js.map +1 -1
  114. package/dist/esm/components/accordion.js +52 -141
  115. package/dist/esm/components/accordion.js.map +1 -1
  116. package/dist/esm/components/alert-banner.js +1 -1
  117. package/dist/esm/components/alert-banner.js.map +1 -1
  118. package/dist/esm/components/alert.js +5 -11
  119. package/dist/esm/components/alert.js.map +1 -1
  120. package/dist/esm/components/avatar.js +32 -63
  121. package/dist/esm/components/avatar.js.map +1 -1
  122. package/dist/esm/components/badge.js +27 -172
  123. package/dist/esm/components/badge.js.map +1 -1
  124. package/dist/esm/components/breadcrumb.js +19 -2
  125. package/dist/esm/components/breadcrumb.js.map +1 -1
  126. package/dist/esm/components/button-group.js +20 -33
  127. package/dist/esm/components/button-group.js.map +1 -1
  128. package/dist/esm/components/button.js +185 -200
  129. package/dist/esm/components/button.js.map +1 -1
  130. package/dist/esm/components/calendar.js +1 -1
  131. package/dist/esm/components/calendar.js.map +1 -1
  132. package/dist/esm/components/card.js +233 -39
  133. package/dist/esm/components/card.js.map +1 -1
  134. package/dist/esm/components/checkbox.js +83 -93
  135. package/dist/esm/components/checkbox.js.map +1 -1
  136. package/dist/esm/components/combobox.js +65 -0
  137. package/dist/esm/components/combobox.js.map +1 -0
  138. package/dist/esm/components/comments.js.map +1 -1
  139. package/dist/esm/components/cookie-consent.js +25 -8
  140. package/dist/esm/components/cookie-consent.js.map +1 -1
  141. package/dist/esm/components/dialog.js +2 -9
  142. package/dist/esm/components/dialog.js.map +1 -1
  143. package/dist/esm/components/divider.js +43 -5
  144. package/dist/esm/components/divider.js.map +1 -1
  145. package/dist/esm/components/dot.js +3 -4
  146. package/dist/esm/components/dot.js.map +1 -1
  147. package/dist/esm/components/filter.js +15 -0
  148. package/dist/esm/components/filter.js.map +1 -0
  149. package/dist/esm/components/footer.js +22 -24
  150. package/dist/esm/components/footer.js.map +1 -1
  151. package/dist/esm/components/form-control.js +6 -0
  152. package/dist/esm/components/form-control.js.map +1 -0
  153. package/dist/esm/components/forms.js +15 -289
  154. package/dist/esm/components/forms.js.map +1 -1
  155. package/dist/esm/components/header.js +22 -18
  156. package/dist/esm/components/header.js.map +1 -1
  157. package/dist/esm/components/icon.js +57 -7
  158. package/dist/esm/components/icon.js.map +1 -1
  159. package/dist/esm/components/input.js +225 -0
  160. package/dist/esm/components/input.js.map +1 -0
  161. package/dist/esm/components/kbd.js +2 -2
  162. package/dist/esm/components/kbd.js.map +1 -1
  163. package/dist/esm/components/label.js +30 -0
  164. package/dist/esm/components/label.js.map +1 -0
  165. package/dist/esm/components/link.js +35 -12
  166. package/dist/esm/components/link.js.map +1 -1
  167. package/dist/esm/components/list.js +54 -0
  168. package/dist/esm/components/list.js.map +1 -0
  169. package/dist/esm/components/logo.js +48 -0
  170. package/dist/esm/components/logo.js.map +1 -0
  171. package/dist/esm/components/menu-vertical.js +228 -0
  172. package/dist/esm/components/menu-vertical.js.map +1 -0
  173. package/dist/esm/components/menubar.js +49 -0
  174. package/dist/esm/components/menubar.js.map +1 -0
  175. package/dist/esm/components/modal.js +34 -14
  176. package/dist/esm/components/modal.js.map +1 -1
  177. package/dist/esm/components/notification.js +2 -2
  178. package/dist/esm/components/notification.js.map +1 -1
  179. package/dist/esm/components/pagination.js +50 -29
  180. package/dist/esm/components/pagination.js.map +1 -1
  181. package/dist/esm/components/popup-menu.js +106 -0
  182. package/dist/esm/components/popup-menu.js.map +1 -0
  183. package/dist/esm/components/progress-bar.js +25 -0
  184. package/dist/esm/components/progress-bar.js.map +1 -0
  185. package/dist/esm/components/progress-stepper.js +51 -0
  186. package/dist/esm/components/progress-stepper.js.map +1 -0
  187. package/dist/esm/components/radio.js +113 -68
  188. package/dist/esm/components/radio.js.map +1 -1
  189. package/dist/esm/components/search-field.js +21 -0
  190. package/dist/esm/components/search-field.js.map +1 -0
  191. package/dist/esm/components/select.js +188 -0
  192. package/dist/esm/components/select.js.map +1 -0
  193. package/dist/esm/components/side-menu.js +7 -7
  194. package/dist/esm/components/side-menu.js.map +1 -1
  195. package/dist/esm/components/snackbar.js +31 -0
  196. package/dist/esm/components/snackbar.js.map +1 -0
  197. package/dist/esm/components/spinner.js +18 -0
  198. package/dist/esm/components/spinner.js.map +1 -0
  199. package/dist/esm/components/switch.js +53 -80
  200. package/dist/esm/components/switch.js.map +1 -1
  201. package/dist/esm/components/tab-menu.js.map +1 -1
  202. package/dist/esm/components/tabs.js +1 -1
  203. package/dist/esm/components/tabs.js.map +1 -1
  204. package/dist/esm/components/tag.js +4 -4
  205. package/dist/esm/components/tag.js.map +1 -1
  206. package/dist/esm/components/tooltip.js +59 -0
  207. package/dist/esm/components/tooltip.js.map +1 -0
  208. package/dist/esm/components/user-menu.js +7 -50
  209. package/dist/esm/components/user-menu.js.map +1 -1
  210. package/dist/esm/components/zebratable.js +89 -34
  211. package/dist/esm/components/zebratable.js.map +1 -1
  212. package/dist/esm/index.js.map +1 -1
  213. package/dist/esm/plugin.js +19 -8
  214. package/dist/esm/plugin.js.map +1 -1
  215. package/dist/esm/theme.js +85 -37
  216. package/dist/esm/theme.js.map +1 -1
  217. package/dist/esm/units.js +250 -0
  218. package/dist/esm/units.js.map +1 -0
  219. package/package.json +5 -5
  220. package/src/base.js +28 -28
  221. package/src/colors.js +631 -132
  222. package/src/components/accordion.js +53 -161
  223. package/src/components/alert-banner.js +1 -2
  224. package/src/components/alert.js +5 -13
  225. package/src/components/avatar.js +36 -82
  226. package/src/components/badge.js +33 -200
  227. package/src/components/breadcrumb.js +22 -2
  228. package/src/components/button-group.js +17 -32
  229. package/src/components/button.js +197 -212
  230. package/src/components/card.js +273 -34
  231. package/src/components/checkbox.js +95 -93
  232. package/src/components/combobox.js +66 -0
  233. package/src/components/comments.js +37 -37
  234. package/src/components/cookie-consent.js +24 -9
  235. package/src/components/dialog.js +2 -9
  236. package/src/components/divider.js +45 -5
  237. package/src/components/dot.js +3 -4
  238. package/src/components/filter.js +16 -0
  239. package/src/components/footer.js +20 -33
  240. package/src/components/forms.js +14 -360
  241. package/src/components/header.js +21 -21
  242. package/src/components/icon.js +75 -6
  243. package/src/components/input.js +244 -0
  244. package/src/components/kbd.js +1 -1
  245. package/src/components/label.js +37 -0
  246. package/src/components/link.js +38 -12
  247. package/src/components/list.js +61 -0
  248. package/src/components/logo.js +48 -0
  249. package/src/components/menu-vertical.js +293 -0
  250. package/src/components/menubar.js +56 -0
  251. package/src/components/modal.js +35 -18
  252. package/src/components/notification.js +2 -2
  253. package/src/components/pagination.js +54 -31
  254. package/src/components/popup-menu.js +111 -0
  255. package/src/components/progress-bar.js +31 -0
  256. package/src/components/progress-stepper.js +50 -0
  257. package/src/components/radio.js +114 -80
  258. package/src/components/search-field.js +20 -0
  259. package/src/components/select.js +203 -0
  260. package/src/components/side-menu.js +7 -7
  261. package/src/components/snackbar.js +34 -0
  262. package/src/components/spinner.js +23 -0
  263. package/src/components/switch.js +54 -88
  264. package/src/components/tab-menu.js +58 -58
  265. package/src/components/tabs.js +64 -64
  266. package/src/components/tooltip.js +64 -0
  267. package/src/components/user-menu.js +7 -59
  268. package/src/components/zebratable.js +92 -41
  269. package/src/index.js +8 -8
  270. package/src/plugin.js +142 -120
  271. package/src/theme.js +158 -84
  272. package/src/units.js +212 -0
  273. package/src/components/calendar.js +0 -78
  274. package/src/components/message.js +0 -60
  275. package/src/components/profile-picture.js +0 -14
  276. package/src/components/profile.js +0 -33
  277. package/src/components/search-bar.js +0 -5
  278. package/src/components/tag.js +0 -96
@@ -1,5 +1,5 @@
1
1
  module.exports = Breadcrumb = () => ({
2
- '.breadcrumb': {
2
+ '.sk-breadcrumb': {
3
3
  '@apply text-body relative': {},
4
4
 
5
5
  '&-item': {
@@ -7,7 +7,27 @@ module.exports = Breadcrumb = () => ({
7
7
  },
8
8
 
9
9
  '&-separator': {
10
- '@apply mx-2': {},
10
+ '@apply mx-6': {},
11
+ },
12
+ },
13
+
14
+ '.sk-breadcrumb-item': {
15
+ span: {
16
+ '&[aria-current="page"]': {
17
+ '@apply font-bold': {},
18
+ },
19
+ },
20
+
21
+ [`&[data-color="primary"]`]: {
22
+ 'a.sk-link': {
23
+ [`@apply text-secondary`]: {},
24
+ },
25
+ },
26
+
27
+ [`&[data-color="vattjom"]`]: {
28
+ 'a.sk-link': {
29
+ [`@apply text-vattjom-text-primary`]: {},
30
+ },
11
31
  },
12
32
  },
13
33
  });
@@ -1,45 +1,30 @@
1
- // TODO: how it works with prefix?
2
1
  module.exports = ButtonGroup = () => ({
3
- '.btn-group': {
4
- '@apply inline-block': {},
2
+ '.sk-btn-group': {
3
+ '@apply inline-flex items-center': {},
5
4
 
6
- '&.btn-group-attached': {
7
- '> .btn-icon': {
8
- boxSizing: 'content-box',
9
- },
10
- '> *:first-of-type:not(:last-of-type)': {
11
- borderTopRightRadius: '0px',
12
- borderBottomRightRadius: '0px',
13
- },
14
-
15
- '> *:not(:first-of-type):not(:last-of-type)': {
16
- borderRadius: '0px',
17
- },
5
+ '&.sk-btn-group-attached': {
6
+ '@apply rounded-groups': {},
7
+ '@apply bg-tertiary-surface': {},
8
+ '@apply py-6 px-12': {},
18
9
 
19
- '> *:not(:first-of-type):last-of-type': {
20
- borderTopLeftRadius: '0px',
21
- borderBottomLeftRadius: '0px',
10
+ '> *': {
11
+ '@apply bg-transparent': {},
22
12
  },
23
13
 
24
- '> .btn-solid:not(:last-child), > .btn-outline:not(:last-child)': {
25
- borderRightWidth: '0px',
14
+ '.sk-btn[data-icon="true"] .sk-icon': {
15
+ '@apply bg-transparent text-dark-secondary': {},
26
16
  },
27
17
 
28
- '> .btn-solid:hover, > .btn-outline:hover': {
29
- borderRightWidth: '1px',
30
- },
31
-
32
- '> *:not(:last-of-type):hover + .btn-solid, > *:not(:last-of-type):hover + .btn-outline': {
33
- borderLeftWidth: '0px',
18
+ '.sk-icon': {
19
+ '@apply p-0 w-fit h-fit': {},
34
20
  },
21
+ },
35
22
 
36
- '> .btn-solid:focus, > .btn-outline:focus': {
37
- zIndex: '1px',
38
- borderRightWidth: '1px',
39
- },
23
+ '&-divider': {
24
+ '@apply grow bg-tertiary-surface px-6': {},
40
25
 
41
- '> *:not(:last-of-type):focus + .btn-solid, > *:not(:last-of-type):focus + .btn-outline': {
42
- borderLeftWidth: '0px',
26
+ hr: {
27
+ '@apply h-[2rem]': {},
43
28
  },
44
29
  },
45
30
  },
@@ -1,187 +1,143 @@
1
- function buttonSolid(colors) {
1
+ function buttonPrimary(colors) {
2
2
  return {
3
- '&-solid': {
4
- //"@apply text-": {},
5
- '@apply font-semibold border border-gray-stroke': {},
6
- '@apply text-body bg-white': {},
3
+ '&-primary': {
4
+ '@apply text-light-primary': {},
7
5
  /* hover */
8
- '@apply hover:text-white hover:bg-hover hover:border-primary-active': {},
9
- /* keyboard active */
10
- '&.active': {
11
- '@apply text-white bg-hover border-primary-active': {},
12
- /* dark */
13
- '@apply dark:border-hover dark:bg-neutral-600': {},
14
- },
15
- /* focus */
16
- '@apply focus-visible:z-base': {},
17
- '@apply focus-visible:border-primary': {},
18
- '@apply focus-visible:ring-4 focus-visible:ring-black': {},
19
- /* active */
20
- '@apply active:bg-hover active:text-white': {},
21
-
22
- /* dark mode */
23
- '@apply dark:border-neutral-600': {},
24
- '@apply dark:text-neutral-100 dark:bg-neutral-700': {},
25
- /* dark hover */
26
- '@apply dark:hover:border-hover dark:hover:bg-neutral-600': {},
27
- /* dark focus */
28
- '@apply dark:focus-visible:border-primary-500': {},
29
- /* dark active */
30
- '@apply dark:active:bg-neutral-900 dark:active:border-neutral-600': {},
6
+ '@apply hover:bg-primary-surface-hover': {},
31
7
 
32
8
  ...colors.reduce(
33
9
  (styles, color) => ({
34
10
  ...styles,
35
11
  [`&[data-color="${color}"]`]: {
36
- //[`@apply border-${color}`]: {},
37
- [`@apply text-white bg-${color}`]: {},
12
+ [`@apply bg-${color}-surface-primary text-${color}-text-secondary`]: {},
38
13
  // hover
39
- [`@apply hover:text-white hover:bg-${color}-active`]: {},
14
+ [`@apply hover:bg-${color}-surface-primary-hover hover:text-light-primary`]: {},
40
15
  // keyboard active
41
16
  '&.active': {
42
- [`@apply text-white bg-${color}-active`]: {},
17
+ [`@apply bg-${color}-surface-primary-hover`]: {},
43
18
  },
19
+ [`@apply active:bg-${color}-surface-primary-hover`]: {},
44
20
 
45
- [`@apply active:text-white active:bg-${color}-active`]: {},
46
- [`@apply focus-visible:ring-4 focus-visible:ring-black`]: {},
47
-
48
- // focus
49
- //[`@apply focus-visible:bg-${color}-700`]: {},
50
- //[`@apply focus-visible:border-${color}-500`]: {},
51
- //[`@apply focus-visible:ring-${color}-500`]: {},
52
- // active
53
- //[`@apply active:bg-${color}-600`]: {},
54
- // dark mode
55
- //[`@apply dark:border-${color}-500`]: {},
56
- //[`@apply dark:bg-${color}-600`]: {},
57
- // dark hover
58
- //[`@apply dark:hover:border-${color}-400 dark:hover:bg-${color}-500`]: {},
59
- // dark focus
60
- //[`@apply dark:focus-visible:border-${color}-500`]: {},
61
- //[`@apply dark:focus-visible:ring-${color}-500`]: {},
62
- // dark active
63
- //[`@apply dark:active:bg-${color}-800 dark:active:border-${color}-600`]: {},
21
+ '&[data-inverted="true"]': {
22
+ '@apply text-inverted-light-primary': {},
23
+ [`@apply bg-inverted-${color}-surface-primary text-inverted-${color}-text-secondary`]: {},
24
+ // hover
25
+ [`@apply hover:bg-inverted-${color}-surface-primary-hover hover:text-inverted-light-primary`]: {},
26
+ // keyboard active
27
+ '&.active': {
28
+ [`@apply bg-inverted-${color}-surface-primary-hover`]: {},
29
+ },
30
+ [`@apply active:bg-inverted-${color}-surface-primary-hover`]: {},
31
+ },
64
32
  },
65
33
  }),
66
34
  {}
67
35
  ),
68
36
 
69
37
  "&[data-color='primary']": {
70
- '@apply border-primary hover:border-primary-active': {},
38
+ '@apply bg-primary-surface': {},
39
+ '@apply hover:bg-primary-surface-hover': {},
71
40
  '&.active': {
72
- '@apply border-primary-active': {},
41
+ '@apply bg-primary-surface-hover': {},
73
42
  },
74
- },
43
+ [`@apply active:bg-primary-surface-hover`]: {},
75
44
 
76
- '&.btn': {
77
- '&-disabled, &[aria-disabled="true"]': {
78
- '@apply disabled:border-gray-stroke border-gray-stroke hover:border-gray-stroke': {},
45
+ '&[data-inverted="true"]': {
46
+ '@apply text-inverted-light-primary': {},
47
+ '@apply bg-inverted-primary-surface': {},
48
+ '@apply hover:bg-inverted-primary-surface-hover': {},
79
49
  '&.active': {
80
- '@apply border-gray-stroke': {},
50
+ '@apply bg-inverted-primary-surface-hover': {},
81
51
  },
52
+ [`@apply active:bg-inverted-primary-surface-hover`]: {},
82
53
  },
83
54
  },
84
55
  },
85
56
  };
86
57
  }
87
-
88
- function buttonOutline(colors) {
58
+ function buttonSecondary() {
89
59
  return {
90
- '&-outline': {
91
- '@apply font-semibold border border-gray-stroke': {},
92
- '@apply text-body bg-transparent': {},
60
+ '&-secondary': {
61
+ '@apply border-secondary-outline': {},
62
+ '@apply text-dark-secondary': {},
63
+ '@apply bg-secondary-surface': {},
93
64
  /* hover */
94
- '@apply hover:text-white hover:bg-primary-active hover:border-primary-active': {},
95
- /* keyboard active */
96
- '&.active': {
97
- '@apply text-white bg-primary-active border-primary-active': {},
98
- /* dark keyboard active */
99
- '@apply dark:border-neutral-300 dark:bg-neutral-700': {},
100
- },
65
+ '@apply hover:border-secondary-outline-hover': {},
66
+ '@apply hover:bg-secondary-surface-hover': {},
101
67
  /* focus */
102
- '@apply focus-visible:z-base': {},
103
- '@apply focus-visible:border-primary-500': {},
104
- '@apply focus-visible:ring-4 focus-visible:ring-primary-500': {},
105
- /* active */
106
- '@apply active:bg-neutral-200': {},
107
- /* dark mode */
108
- '@apply dark:border-neutral-600': {},
109
- '@apply dark:text-neutral-100 dark:bg-transparent': {},
110
- /* dark hover */
111
- '@apply dark:hover:border-neutral-300 dark:hover:bg-neutral-700': {},
112
- /* dark focus */
113
- '@apply dark:focus-visible:border-primary-500': {},
114
- /* dark active */
115
- '@apply dark:active:bg-neutral-600 dark:active:border-neutral-600': {},
68
+ '@apply focus-visible:border-background-content': {},
116
69
 
117
- ...colors.reduce(
118
- (styles, color) => ({
119
- ...styles,
120
- [`&[data-color="${color}"]`]: {
121
- [`@apply border-current`]: {},
122
- [`@apply text-${color}-600 bg-transparent`]: {},
123
- /* hover */
124
- [`@apply hover:text-white hover:bg-${color}-active hover:border-${color}-active`]: {},
125
- /* keyboard active */
126
- '&.active': {
127
- [`@apply text-white bg-${color}-active border-${color}-active`]: {},
70
+ // State
71
+ '&.sk-btn-disabled, &[aria-disabled="true"]': {
72
+ '@apply disabled:bg-secondary-surface-disabled bg-secondary-surface-disabled disabled:border-transparent border-transparent !important':
73
+ {},
74
+ },
128
75
 
129
- /* dark keyboard active */
130
- [`@apply dark:bg-${color}-200`]: {},
131
- [`@apply dark:bg-opacity-15`]: {},
132
- },
133
- /* focus */
134
- [`@apply focus-visible:border-${color}-500`]: {},
135
- [`@apply focus-visible:ring-${color}-500`]: {},
136
- /* active */
137
- [`@apply active:bg-${color}-100`]: {},
138
- /* dark mode */
139
- [`@apply dark:border-${color}-200`]: {},
140
- [`@apply dark:text-${color}-200 dark:bg-transparent`]: {},
141
- [`@apply dark:border-${color}-300`]: {},
142
- /* dark hover */
143
- [`@apply dark:hover:bg-${color}-200`]: {},
144
- [`@apply dark:hover:bg-opacity-15`]: {},
145
- /* dark focus */
146
- [`@apply dark:focus-visible:border-${color}-500`]: {},
147
- [`@apply dark:focus-visible:ring-${color}-500`]: {},
148
- /* dark active */
149
- [`@apply dark:active:bg-${color}-200`]: {},
150
- [`@apply dark:active:bg-opacity-25`]: {},
151
- },
152
- }),
153
- {}
154
- ),
76
+ '&[data-inverted="true"]': {
77
+ '@apply border-inverted-secondary-outline': {},
78
+ '@apply text-inverted-dark-secondary': {},
79
+ '@apply bg-inverted-secondary-surface': {},
80
+ /* hover */
81
+ '@apply hover:border-inverted-secondary-outline-hover': {},
82
+ '@apply hover:bg-inverted-secondary-surface-hover': {},
83
+ /* focus */
84
+ '@apply focus-visible:border-inverted-background-content': {},
155
85
 
156
- '&.btn': {
157
- '&-disabled, &[aria-disabled="true"]': {
158
- '@apply disabled:border-gray-stroke border-gray-stroke hover:border-gray-stroke': {},
159
- '&.active': {
160
- '@apply border-gray-stroke': {},
161
- },
86
+ // State
87
+ '&.sk-btn-disabled, &[aria-disabled="true"]': {
88
+ '@apply disabled:bg-inverted-secondary-surface-disabled bg-inverted-secondary-surface-disabled disabled:border-transparent border-transparent !important':
89
+ {},
162
90
  },
163
91
  },
164
92
  },
165
93
  };
166
94
  }
167
95
 
168
- function buttonGhost(colors) {
96
+ function buttonTertiary() {
97
+ return {
98
+ '&-tertiary': {
99
+ '@apply text-dark-secondary': {},
100
+ '@apply bg-tertiary-surface': {},
101
+ /* hover */
102
+ '@apply hover:bg-tertiary-surface-hover': {},
103
+
104
+ // State
105
+ '&.sk-btn-disabled, &[aria-disabled="true"]': {
106
+ '@apply disabled:bg-tertiary-surface-disabled bg-tertiary-surface-disabled disabled:border-transparent border-transparent !important':
107
+ {},
108
+ },
109
+
110
+ '&[data-inverted="true"]': {
111
+ '@apply text-inverted-dark-secondary': {},
112
+ '@apply bg-inverted-tertiary-surface': {},
113
+ /* hover */
114
+ '@apply hover:bg-inverted-tertiary-surface-hover': {},
115
+ '&.sk-btn-disabled, &[aria-disabled="true"]': {
116
+ '@apply disabled:bg-inverted-tertiary-surface-disabled bg-inverted-tertiary-surface-disabled disabled:border-transparent border-transparent !important':
117
+ {},
118
+ },
119
+ },
120
+ },
121
+ };
122
+ }
123
+ function buttonGhost() {
169
124
  return {
170
125
  '&-ghost': {
171
- /* focus */
172
- '@apply focus-visible:z-base': {},
173
- '@apply focus-visible:ring-4 focus-visible:ring-primary-500': {},
126
+ '@apply text-dark-secondary': {},
127
+ '@apply bg-transparent': {},
128
+ '@apply border-transparent': {},
129
+ /* hover */
130
+ '@apply hover:bg-transparent': {},
131
+ '@apply hover:border-transparent': {},
174
132
 
175
- ...colors.reduce(
176
- (styles, color) => ({
177
- ...styles,
178
- [`&[data-color="${color}"]`]: {
179
- /* focus */
180
- [`@apply focus-visible:ring-${color}-500`]: {},
181
- },
182
- }),
183
- {}
184
- ),
133
+ // State
134
+ '&.sk-btn-disabled, &[aria-disabled="true"]': {
135
+ '@apply disabled:bg-transparent bg-transparent disabled:border-transparent border-transparent !important': {},
136
+ },
137
+
138
+ '&[data-inverted="true"]': {
139
+ '@apply text-inverted-dark-secondary': {},
140
+ },
185
141
  },
186
142
  };
187
143
  }
@@ -193,7 +149,6 @@ function buttonLink(colors) {
193
149
  '&.active': {
194
150
  '@apply underline': {},
195
151
  },
196
- '@apply focus-visible:z-base focus-visible:ring-4 focus-visible:ring-primary-500': {},
197
152
  // dark colors
198
153
  '@apply dark:text-neutral-200': {},
199
154
  '@apply dark:active:text-neutral-500': {},
@@ -202,11 +157,8 @@ function buttonLink(colors) {
202
157
  (styles, color) => ({
203
158
  ...styles,
204
159
  [`&[data-color="${color}"]`]: {
205
- [`@apply text-${color}-600 active:text-${color}-700`]: {},
206
- [`@apply focus-visible:ring-${color}-500`]: {},
160
+ [`@apply text-${color}-text active:text-${color}-text`]: {},
207
161
  // dark colors
208
- [`@apply dark:text-${color}-200`]: {},
209
- [`@apply dark:active:text-${color}-500`]: {},
210
162
  },
211
163
  }),
212
164
  {}
@@ -216,107 +168,140 @@ function buttonLink(colors) {
216
168
  }
217
169
 
218
170
  module.exports = Button = (colors) => ({
219
- '.btn': {
171
+ '.sk-btn': {
172
+ '@apply box-border': {},
173
+ '@apply border-2 border-transparent': {},
174
+ '@apply cursor-pointer': {},
220
175
  '@apply relative': {},
221
176
  '@apply m-0': {},
222
- '@apply px-[3.2rem]': {},
223
- '@apply py-0': {},
224
- '@apply rounded-[0.4rem] inline-flex items-center justify-center flex-shrink-0 align-middle': {},
225
- '@apply font-medium leading-tight': {},
177
+ '@apply px-24 py-8 gap-8': {},
178
+ '@apply inline-flex items-center justify-center flex-shrink-0 align-middle': {},
179
+ '@apply rounded-button': {},
226
180
  transitionProperty: 'background-color, border-color, color, fill, stroke, box-shadow',
227
181
  '@apply duration-75 ease-out': {},
228
- '@apply outline-none appearance-none cursor-base select-none whitespace-nowrap': {},
182
+ '@apply outline-none appearance-none select-none whitespace-nowrap': {},
229
183
  '@apply focus-visible:outline-none': {},
184
+ '@apply focus-visible:ring': {},
230
185
 
231
186
  "&[data-rounded='true']": {
232
- borderRadius: '3.2rem',
187
+ '@apply rounded-circular': {},
233
188
  },
234
189
 
235
190
  // sizing
236
191
  '&-sm': {
237
- '@apply text-xs': {},
238
- minHeight: '4rem',
239
- maxHeight: '4rem',
192
+ '@apply text-label-small': {},
193
+ '@apply px-14 py-8 gap-6': {},
194
+ '@apply max-h-[3.2rem] h-[3.2rem]': {},
195
+ '@apply rounded-button-sm': {},
196
+ svg: {
197
+ '@apply h-[1.6rem] w-[1.6rem]': {},
198
+ },
240
199
  },
241
200
 
242
201
  '&-md': {
243
- '@apply text-sm': {},
244
- minHeight: '4.4rem',
245
- maxHeight: '4.4rem',
202
+ '@apply text-label-medium': {},
203
+ '@apply px-18 py-8 gap-8': {},
204
+ '@apply max-h-[4rem] h-[4rem]': {},
205
+ '@apply rounded-button-md': {},
206
+ svg: {
207
+ '@apply h-[1.8rem] w-[1.8rem]': {},
208
+ },
246
209
  },
247
210
 
248
211
  '&-lg': {
249
- '@apply text-base': {},
250
- minHeight: '4.8rem',
251
- maxHeight: '4.8rem',
252
- },
253
- '&-fit-content': {
254
- '@apply p-0': {},
255
- fontSize: 'inherit',
212
+ '@apply text-label-large': {},
213
+ '@apply px-24 py-8 gap-8': {},
214
+ '@apply max-h-[4.8rem] h-[4.8rem]': {},
215
+ '@apply rounded-button-lg': {},
216
+ svg: {
217
+ '@apply h-[2rem] w-[2rem]': {},
218
+ },
256
219
  },
257
220
 
258
221
  // State
259
-
260
222
  '&-disabled, &[aria-disabled="true"]': {
261
- '@apply shadow-none disabled:shadow-none disabled:cursor-not-allowed cursor-not-allowed': {},
262
- '@apply disabled:text-gray text-gray disabled:bg-gray-light bg-gray-light !important': {},
263
- },
264
- '.MuiSvgIcon-root': {
265
- fontSize: '1.5em',
266
- width: '1em',
267
- height: '1em',
223
+ '@apply shadow-none disabled:shadow-none disabled:cursor-default cursor-default': {},
224
+ '@apply disabled:text-dark-disabled text-dark-disabled disabled:bg-primary-surface-disabled bg-primary-surface-disabled disabled:border-transparent border-transparent !important':
225
+ {},
226
+ '&[data-inverted="true"]': {
227
+ '@apply disabled:text-inverted-dark-disabled text-inverted-dark-disabled disabled:bg-inverted-primary-surface-disabled bg-inverted-primary-surface-disabled disabled:border-transparent border-transparent !important':
228
+ {},
229
+ },
268
230
  },
269
231
 
270
232
  // variants
271
- ...buttonSolid(colors),
272
- ...buttonOutline(colors),
273
- ...buttonGhost(colors),
233
+ ...buttonPrimary(colors),
234
+ ...buttonSecondary(),
235
+ ...buttonTertiary(),
236
+ ...buttonGhost(),
274
237
  ...buttonLink(colors),
275
- },
276
- '.btn-has-icon': {
277
- '&-left': {
278
- '@apply h-full flex items-center justify-center': {},
279
238
 
280
- '.MuiSvgIcon-root': {
281
- '@apply mr-sm': {},
239
+ '.btn-has-icon': {
240
+ '&-left': {
241
+ '@apply h-full flex items-center justify-center -ml-2': {},
242
+ '.sk-icon': {
243
+ '@apply bg-transparent': {},
244
+ color: 'currentColor',
245
+ },
282
246
  },
283
- },
284
- '&-right': {
285
- '@apply h-full flex items-center justify-center': {},
286
-
287
- '.MuiSvgIcon-root': {
288
- '@apply ml-sm': {},
247
+ '&-right': {
248
+ '@apply h-full flex items-center justify-center -mr-2': {},
249
+ '.sk-icon': {
250
+ '@apply bg-transparent': {},
251
+ color: 'currentColor',
252
+ },
289
253
  },
290
254
  },
291
- },
292
- '[data-icon=true]': {
293
- '@apply p-0': {},
294
- "&[data-rounded='true']": {
295
- '@apply rounded-full': {},
255
+ '&-lg .btn-has-icon-left': {
256
+ '@apply -ml-4': {},
296
257
  },
297
- '&.btn-sm': {
298
- minWidth: '4rem',
299
- maxWidth: '4rem',
258
+ '&-lg .btn-has-icon-right': {
259
+ '@apply -mr-4': {},
300
260
  },
261
+ '&[data-icon=true]': {
262
+ '@apply p-0': {},
301
263
 
302
- '&.btn-md': {
303
- minWidth: '4.4rem',
304
- maxWidth: '4.4rem',
305
- },
264
+ '.sk-icon': {
265
+ '@apply bg-transparent': {},
266
+ color: 'currentColor',
267
+ },
306
268
 
307
- '&.btn-lg': {
308
- minWidth: '4.8rem',
309
- maxWidth: '4.8rem',
310
- },
311
- '.btn-has-icon': {
312
- '&-left': {
313
- '.MuiSvgIcon-root': {
314
- '@apply mr-0': {},
269
+ "&[data-rounded='true']": {
270
+ '@apply rounded-full': {},
271
+ },
272
+
273
+ '&.sk-btn-sm': {
274
+ minWidth: '3.2rem',
275
+ width: '3.2rem',
276
+ maxWidth: '3.2rem',
277
+ svg: {
278
+ '@apply h-[2rem] w-[2rem]': {},
315
279
  },
316
280
  },
317
- '&-right': {
318
- '.MuiSvgIcon-root': {
319
- '@apply ml-0': {},
281
+
282
+ '&.sk-btn-md': {
283
+ minWidth: '4rem',
284
+ width: '4rem',
285
+ maxWidth: '4rem',
286
+ svg: {
287
+ '@apply h-[2rem] w-[2rem]': {},
288
+ },
289
+ },
290
+
291
+ '&.sk-btn-lg': {
292
+ minWidth: '4.8rem',
293
+ width: '4.8rem',
294
+ maxWidth: '4.8rem',
295
+ svg: {
296
+ '@apply h-[2.4rem] w-[2.4rem]': {},
297
+ },
298
+ },
299
+ '.btn-has-icon': {
300
+ '&-left': {
301
+ '@apply m-0': {},
302
+ },
303
+ '&-right': {
304
+ '@apply m-0': {},
320
305
  },
321
306
  },
322
307
  },