@sk-web-gui/core 0.1.36 → 0.1.38

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 (359) hide show
  1. package/dist/cjs/colors.js +140 -0
  2. package/dist/cjs/colors.js.map +1 -0
  3. package/dist/cjs/components/accordion.js +86 -0
  4. package/dist/cjs/components/accordion.js.map +1 -0
  5. package/dist/cjs/components/alert.js +71 -0
  6. package/dist/cjs/components/alert.js.map +1 -0
  7. package/dist/cjs/components/avatar.js +78 -0
  8. package/dist/cjs/components/avatar.js.map +1 -0
  9. package/dist/cjs/components/badge.js +53 -0
  10. package/dist/cjs/components/badge.js.map +1 -0
  11. package/dist/cjs/components/breadcrumb.js +23 -0
  12. package/dist/cjs/components/breadcrumb.js.map +1 -0
  13. package/dist/cjs/components/button-group.js +50 -0
  14. package/dist/cjs/components/button-group.js.map +1 -0
  15. package/dist/cjs/components/button.js +154 -0
  16. package/dist/cjs/components/button.js.map +1 -0
  17. package/dist/cjs/components/calendar.js +76 -0
  18. package/dist/cjs/components/calendar.js.map +1 -0
  19. package/dist/cjs/components/card.js +59 -0
  20. package/dist/cjs/components/card.js.map +1 -0
  21. package/dist/cjs/components/checkbox.js +92 -0
  22. package/dist/cjs/components/checkbox.js.map +1 -0
  23. package/dist/cjs/components/code.js +21 -0
  24. package/dist/cjs/components/code.js.map +1 -0
  25. package/dist/cjs/components/cookie-consent.js +35 -0
  26. package/dist/cjs/components/cookie-consent.js.map +1 -0
  27. package/dist/cjs/components/divider.js +24 -0
  28. package/dist/cjs/components/divider.js.map +1 -0
  29. package/dist/cjs/components/dot.js +70 -0
  30. package/dist/cjs/components/dot.js.map +1 -0
  31. package/dist/cjs/components/footer.js +39 -0
  32. package/dist/cjs/components/footer.js.map +1 -0
  33. package/dist/cjs/components/forms.js +225 -0
  34. package/dist/cjs/components/forms.js.map +1 -0
  35. package/dist/cjs/components/header.js +34 -0
  36. package/dist/cjs/components/header.js.map +1 -0
  37. package/dist/cjs/components/icon-button.js +17 -0
  38. package/dist/cjs/components/icon-button.js.map +1 -0
  39. package/dist/cjs/components/icon.js +20 -0
  40. package/dist/cjs/components/icon.js.map +1 -0
  41. package/dist/cjs/components/kbd.js +21 -0
  42. package/dist/cjs/components/kbd.js.map +1 -0
  43. package/dist/cjs/components/link.js +29 -0
  44. package/dist/cjs/components/link.js.map +1 -0
  45. package/dist/cjs/components/message.js +63 -0
  46. package/dist/cjs/components/message.js.map +1 -0
  47. package/dist/cjs/components/modal.js +35 -0
  48. package/dist/cjs/components/modal.js.map +1 -0
  49. package/dist/cjs/components/notification.js +58 -0
  50. package/dist/cjs/components/notification.js.map +1 -0
  51. package/dist/cjs/components/pagination.js +66 -0
  52. package/dist/cjs/components/pagination.js.map +1 -0
  53. package/dist/cjs/components/radio.js +95 -0
  54. package/dist/cjs/components/radio.js.map +1 -0
  55. package/dist/cjs/components/switch.js +107 -0
  56. package/dist/cjs/components/switch.js.map +1 -0
  57. package/dist/cjs/components/table.js +23 -0
  58. package/dist/cjs/components/table.js.map +1 -0
  59. package/dist/cjs/components/tag.js +88 -0
  60. package/dist/cjs/components/tag.js.map +1 -0
  61. package/dist/cjs/components/types.js +10 -0
  62. package/dist/cjs/components/types.js.map +1 -0
  63. package/dist/cjs/components/user-menu.js +33 -0
  64. package/dist/cjs/components/user-menu.js.map +1 -0
  65. package/dist/cjs/components/zebratable.js +70 -0
  66. package/dist/cjs/components/zebratable.js.map +1 -0
  67. package/dist/cjs/index.js +282 -0
  68. package/dist/cjs/index.js.map +1 -0
  69. package/dist/cjs/with-opacity.js +15 -0
  70. package/dist/cjs/with-opacity.js.map +1 -0
  71. package/dist/esm/colors.js +137 -0
  72. package/dist/esm/colors.js.map +1 -0
  73. package/dist/esm/components/accordion.js +76 -0
  74. package/dist/esm/components/accordion.js.map +1 -0
  75. package/dist/esm/components/alert.js +67 -0
  76. package/dist/esm/components/alert.js.map +1 -0
  77. package/dist/esm/components/avatar.js +68 -0
  78. package/dist/esm/components/avatar.js.map +1 -0
  79. package/dist/esm/components/badge.js +48 -0
  80. package/dist/esm/components/badge.js.map +1 -0
  81. package/dist/esm/components/breadcrumb.js +13 -0
  82. package/dist/esm/components/breadcrumb.js.map +1 -0
  83. package/dist/esm/components/button-group.js +40 -0
  84. package/dist/esm/components/button-group.js.map +1 -0
  85. package/dist/esm/components/button.js +197 -0
  86. package/dist/esm/components/button.js.map +1 -0
  87. package/dist/esm/components/calendar.js +66 -0
  88. package/dist/esm/components/calendar.js.map +1 -0
  89. package/dist/esm/components/card.js +49 -0
  90. package/dist/esm/components/card.js.map +1 -0
  91. package/dist/esm/components/checkbox.js +110 -0
  92. package/dist/esm/components/checkbox.js.map +1 -0
  93. package/dist/esm/components/code.js +11 -0
  94. package/dist/esm/components/code.js.map +1 -0
  95. package/dist/esm/components/cookie-consent.js +25 -0
  96. package/dist/esm/components/cookie-consent.js.map +1 -0
  97. package/dist/esm/components/divider.js +14 -0
  98. package/dist/esm/components/divider.js.map +1 -0
  99. package/dist/esm/components/dot.js +61 -0
  100. package/dist/esm/components/dot.js.map +1 -0
  101. package/dist/esm/components/footer.js +29 -0
  102. package/dist/esm/components/footer.js.map +1 -0
  103. package/dist/esm/components/forms.js +217 -0
  104. package/dist/esm/components/forms.js.map +1 -0
  105. package/dist/esm/components/header.js +29 -0
  106. package/dist/esm/components/header.js.map +1 -0
  107. package/dist/esm/components/icon-button.js +7 -0
  108. package/dist/esm/components/icon-button.js.map +1 -0
  109. package/dist/esm/components/icon.js +10 -0
  110. package/dist/esm/components/icon.js.map +1 -0
  111. package/dist/esm/components/kbd.js +11 -0
  112. package/dist/esm/components/kbd.js.map +1 -0
  113. package/dist/esm/components/link.js +19 -0
  114. package/dist/esm/components/link.js.map +1 -0
  115. package/dist/esm/components/message.js +53 -0
  116. package/dist/esm/components/message.js.map +1 -0
  117. package/dist/esm/components/modal.js +25 -0
  118. package/dist/esm/components/modal.js.map +1 -0
  119. package/dist/esm/components/notification.js +48 -0
  120. package/dist/esm/components/notification.js.map +1 -0
  121. package/dist/esm/components/pagination.js +56 -0
  122. package/dist/esm/components/pagination.js.map +1 -0
  123. package/dist/esm/components/radio.js +88 -0
  124. package/dist/esm/components/radio.js.map +1 -0
  125. package/dist/esm/components/switch.js +98 -0
  126. package/dist/esm/components/switch.js.map +1 -0
  127. package/dist/esm/components/table.js +13 -0
  128. package/dist/esm/components/table.js.map +1 -0
  129. package/dist/esm/components/tag.js +84 -0
  130. package/dist/esm/components/tag.js.map +1 -0
  131. package/dist/esm/components/types.js +3 -0
  132. package/dist/esm/components/types.js.map +1 -0
  133. package/dist/esm/components/user-menu.js +23 -0
  134. package/dist/esm/components/user-menu.js.map +1 -0
  135. package/dist/esm/components/zebratable.js +60 -0
  136. package/dist/esm/components/zebratable.js.map +1 -0
  137. package/dist/esm/index.js +327 -0
  138. package/dist/esm/index.js.map +1 -0
  139. package/dist/esm/with-opacity.js +10 -0
  140. package/dist/esm/with-opacity.js.map +1 -0
  141. package/dist/types/accordion/index.d.ts +1 -0
  142. package/dist/types/accordion/src/accordion.d.ts +17 -0
  143. package/dist/types/accordion/src/index.d.ts +1 -0
  144. package/dist/types/accordion/src/styles.d.ts +1 -0
  145. package/dist/types/accordion/stories/accordion.stories.d.ts +40 -0
  146. package/dist/types/alert/index.d.ts +1 -0
  147. package/dist/types/alert/src/alert.d.ts +15 -0
  148. package/dist/types/alert/src/index.d.ts +8 -0
  149. package/dist/types/alert/src/styles.d.ts +2 -0
  150. package/dist/types/breadcrumb/index.d.ts +1 -0
  151. package/dist/types/breadcrumb/src/breadcrumb.d.ts +34 -0
  152. package/dist/types/breadcrumb/src/index.d.ts +10 -0
  153. package/dist/types/breadcrumb/stories/breadcrumb.stories.d.ts +28 -0
  154. package/dist/types/button/index.d.ts +1 -0
  155. package/dist/types/button/src/button-group.d.ts +20 -0
  156. package/dist/types/button/src/button.d.ts +21 -0
  157. package/dist/types/button/src/icon-button.d.ts +17 -0
  158. package/dist/types/button/src/index.d.ts +10 -0
  159. package/dist/types/button/src/styles.d.ts +1 -0
  160. package/dist/types/button/stories/announcement.d.ts +6 -0
  161. package/dist/types/button/stories/button-group.stories.d.ts +14 -0
  162. package/dist/types/button/stories/button.stories.d.ts +127 -0
  163. package/dist/types/button/stories/icon-button.stories.d.ts +16 -0
  164. package/dist/types/card/index.d.ts +1 -0
  165. package/dist/types/card/src/card.d.ts +38 -0
  166. package/dist/types/card/src/index.d.ts +1 -0
  167. package/dist/types/card/src/styles.d.ts +1 -0
  168. package/dist/types/card/stories/card.stories.d.ts +56 -0
  169. package/dist/types/checkbox/index.d.ts +1 -0
  170. package/dist/types/checkbox/src/checkbox-group.d.ts +36 -0
  171. package/dist/types/checkbox/src/checkbox.d.ts +46 -0
  172. package/dist/types/checkbox/src/index.d.ts +9 -0
  173. package/dist/types/checkbox/src/styles.d.ts +2 -0
  174. package/dist/types/checkbox/stories/checkbox.stories.d.ts +103 -0
  175. package/dist/types/cookie-consent/index.d.ts +1 -0
  176. package/dist/types/cookie-consent/src/cookie-consent.d.ts +37 -0
  177. package/dist/types/cookie-consent/src/index.d.ts +1 -0
  178. package/dist/types/cookie-consent/src/styles.d.ts +1 -0
  179. package/dist/types/core/src/colors.d.ts +1 -0
  180. package/dist/types/core/src/components/accordion.d.ts +3 -0
  181. package/dist/types/core/src/components/alert.d.ts +3 -0
  182. package/dist/types/core/src/components/avatar.d.ts +3 -0
  183. package/dist/types/core/src/components/badge.d.ts +3 -0
  184. package/dist/types/core/src/components/breadcrumb.d.ts +3 -0
  185. package/dist/types/core/src/components/button-group.d.ts +3 -0
  186. package/dist/types/core/src/components/button.d.ts +3 -0
  187. package/dist/types/core/src/components/calendar.d.ts +3 -0
  188. package/dist/types/core/src/components/card.d.ts +3 -0
  189. package/dist/types/core/src/components/checkbox.d.ts +3 -0
  190. package/dist/types/core/src/components/code.d.ts +3 -0
  191. package/dist/types/core/src/components/cookie-consent.d.ts +3 -0
  192. package/dist/types/core/src/components/divider.d.ts +3 -0
  193. package/dist/types/core/src/components/dot.d.ts +3 -0
  194. package/dist/types/core/src/components/footer.d.ts +3 -0
  195. package/dist/types/core/src/components/forms.d.ts +3 -0
  196. package/dist/types/core/src/components/header.d.ts +3 -0
  197. package/dist/types/core/src/components/icon-button.d.ts +3 -0
  198. package/dist/types/core/src/components/icon.d.ts +3 -0
  199. package/dist/types/core/src/components/kbd.d.ts +3 -0
  200. package/dist/types/core/src/components/link.d.ts +3 -0
  201. package/dist/types/core/src/components/message.d.ts +3 -0
  202. package/dist/types/core/src/components/modal.d.ts +3 -0
  203. package/dist/types/core/src/components/notification.d.ts +3 -0
  204. package/dist/types/core/src/components/pagination.d.ts +3 -0
  205. package/dist/types/core/src/components/radio.d.ts +3 -0
  206. package/dist/types/core/src/components/switch.d.ts +3 -0
  207. package/dist/types/core/src/components/table.d.ts +3 -0
  208. package/dist/types/core/src/components/tag.d.ts +3 -0
  209. package/dist/types/core/src/components/types.d.ts +5 -0
  210. package/dist/types/core/src/components/user-menu.d.ts +3 -0
  211. package/dist/types/core/src/components/zebratable.d.ts +3 -0
  212. package/dist/types/core/src/index.d.ts +1 -0
  213. package/dist/types/core/src/with-opacity.d.ts +3 -0
  214. package/dist/types/divider/index.d.ts +1 -0
  215. package/dist/types/divider/src/divider.d.ts +9 -0
  216. package/dist/types/divider/src/index.d.ts +1 -0
  217. package/dist/types/divider/stories/divider.stories.d.ts +33 -0
  218. package/dist/types/dot/index.d.ts +1 -0
  219. package/dist/types/dot/src/dot.d.ts +12 -0
  220. package/dist/types/dot/src/index.d.ts +1 -0
  221. package/dist/types/dot/src/styles.d.ts +1 -0
  222. package/dist/types/dot/stories/dot.stories.d.ts +15 -0
  223. package/dist/types/footer/index.d.ts +1 -0
  224. package/dist/types/footer/src/footer.d.ts +11 -0
  225. package/dist/types/footer/src/index.d.ts +1 -0
  226. package/dist/types/footer/stories/footer.stories.d.ts +95 -0
  227. package/dist/types/forms/index.d.ts +1 -0
  228. package/dist/types/forms/src/calendar/index.d.ts +12 -0
  229. package/dist/types/forms/src/calendar/styles.d.ts +1 -0
  230. package/dist/types/forms/src/form-control/index.d.ts +27 -0
  231. package/dist/types/forms/src/form-error-message/index.d.ts +9 -0
  232. package/dist/types/forms/src/form-helper-text/index.d.ts +9 -0
  233. package/dist/types/forms/src/form-label/index.d.ts +13 -0
  234. package/dist/types/forms/src/index.d.ts +8 -0
  235. package/dist/types/forms/src/input/index.d.ts +15 -0
  236. package/dist/types/forms/src/input/input.d.ts +30 -0
  237. package/dist/types/forms/src/input/styles.d.ts +1 -0
  238. package/dist/types/forms/src/input-addon/index.d.ts +13 -0
  239. package/dist/types/forms/src/input-element/index.d.ts +15 -0
  240. package/dist/types/forms/src/input-group/index.d.ts +11 -0
  241. package/dist/types/forms/src/select/index.d.ts +6 -0
  242. package/dist/types/forms/src/select/styles.d.ts +1 -0
  243. package/dist/types/forms/src/textarea/index.d.ts +13 -0
  244. package/dist/types/forms/stories/calendar.stories.d.ts +58 -0
  245. package/dist/types/forms/stories/check.d.ts +6 -0
  246. package/dist/types/forms/stories/form-control.stories.d.ts +16 -0
  247. package/dist/types/forms/stories/input.stories.d.ts +32 -0
  248. package/dist/types/forms/stories/select.stories.d.ts +118 -0
  249. package/dist/types/forms/stories/textarea.stories.d.ts +23 -0
  250. package/dist/types/header/index.d.ts +1 -0
  251. package/dist/types/header/src/header.d.ts +13 -0
  252. package/dist/types/header/src/index.d.ts +1 -0
  253. package/dist/types/header/stories/header.stories.d.ts +118 -0
  254. package/dist/types/icon/index.d.ts +1 -0
  255. package/dist/types/icon/src/core.d.ts +10 -0
  256. package/dist/types/icon/src/icon.d.ts +14 -0
  257. package/dist/types/icon/src/index.d.ts +2 -0
  258. package/dist/types/icon/stories/icon.stories.d.ts +12 -0
  259. package/dist/types/image/index.d.ts +1 -0
  260. package/dist/types/image/src/image.d.ts +28 -0
  261. package/dist/types/image/src/index.d.ts +2 -0
  262. package/dist/types/image/src/use-image.d.ts +52 -0
  263. package/dist/types/image/stories/image.stories.d.ts +12 -0
  264. package/dist/types/link/index.d.ts +1 -0
  265. package/dist/types/link/src/index.d.ts +1 -0
  266. package/dist/types/link/src/link.d.ts +12 -0
  267. package/dist/types/link/stories/link.stories.d.ts +46 -0
  268. package/dist/types/message/index.d.ts +1 -0
  269. package/dist/types/message/src/index.d.ts +1 -0
  270. package/dist/types/message/src/message.d.ts +2 -0
  271. package/dist/types/message/stories/message.stories.d.ts +11 -0
  272. package/dist/types/notification/index.d.ts +1 -0
  273. package/dist/types/notification/src/index.d.ts +1 -0
  274. package/dist/types/notification/src/notification.d.ts +5 -0
  275. package/dist/types/notification/stories/notification.stories.d.ts +11 -0
  276. package/dist/types/pagination/index.d.ts +1 -0
  277. package/dist/types/pagination/src/index.d.ts +1 -0
  278. package/dist/types/pagination/src/pagination.d.ts +11 -0
  279. package/dist/types/pagination/src/styles.d.ts +1 -0
  280. package/dist/types/pagination/stories/pagination.stories.d.ts +75 -0
  281. package/dist/types/radio/index.d.ts +1 -0
  282. package/dist/types/radio/src/index.d.ts +9 -0
  283. package/dist/types/radio/src/radio-group.d.ts +41 -0
  284. package/dist/types/radio/src/radio.d.ts +45 -0
  285. package/dist/types/radio/src/styles.d.ts +2 -0
  286. package/dist/types/radio/stories/radio-group.stories.d.ts +75 -0
  287. package/dist/types/radio/stories/radio.stories.d.ts +104 -0
  288. package/dist/types/react/index.d.ts +1 -0
  289. package/dist/types/react/src/index.d.ts +26 -0
  290. package/dist/types/spinner/index.d.ts +1 -0
  291. package/dist/types/spinner/src/index.d.ts +1 -0
  292. package/dist/types/spinner/src/spinner.d.ts +8 -0
  293. package/dist/types/spinner/src/styles.d.ts +2 -0
  294. package/dist/types/spinner/stories/spinner.stories.d.ts +13 -0
  295. package/dist/types/switch/index.d.ts +1 -0
  296. package/dist/types/switch/src/index.d.ts +1 -0
  297. package/dist/types/switch/src/styles.d.ts +2 -0
  298. package/dist/types/switch/src/switch.d.ts +42 -0
  299. package/dist/types/switch/stories/switch.stories.d.ts +76 -0
  300. package/dist/types/table/index.d.ts +1 -0
  301. package/dist/types/table/src/index.d.ts +1 -0
  302. package/dist/types/table/src/styles.d.ts +1 -0
  303. package/dist/types/table/src/zebratable.d.ts +33 -0
  304. package/dist/types/table/stories/zebratable.stories.d.ts +69 -0
  305. package/dist/types/tag/index.d.ts +1 -0
  306. package/dist/types/tag/src/index.d.ts +1 -0
  307. package/dist/types/tag/src/styles.d.ts +1 -0
  308. package/dist/types/tag/src/tag.d.ts +13 -0
  309. package/dist/types/tag/stories/tag.stories.d.ts +86 -0
  310. package/dist/types/theme/index.d.ts +1 -0
  311. package/dist/types/theme/src/colors.d.ts +272 -0
  312. package/dist/types/theme/src/create-memo-class.d.ts +1 -0
  313. package/dist/types/theme/src/create-theme-vars/calc.d.ts +19 -0
  314. package/dist/types/theme/src/create-theme-vars/create-theme-vars.d.ts +9 -0
  315. package/dist/types/theme/src/create-theme-vars/css-var.d.ts +7 -0
  316. package/dist/types/theme/src/create-theme-vars/index.d.ts +4 -0
  317. package/dist/types/theme/src/create-theme-vars/theme-tokens.d.ts +10 -0
  318. package/dist/types/theme/src/create-theme-vars/to-css-var.d.ts +2 -0
  319. package/dist/types/theme/src/default-theme.d.ts +4 -0
  320. package/dist/types/theme/src/gui-provider.d.ts +16 -0
  321. package/dist/types/theme/src/index.d.ts +6 -0
  322. package/dist/types/theme/src/types.d.ts +56 -0
  323. package/dist/types/theme/src/use-safe-effect.d.ts +2 -0
  324. package/dist/types/theme/src/utils.d.ts +1 -0
  325. package/dist/types/toast/index.d.ts +1 -0
  326. package/dist/types/toast/src/index.d.ts +1 -0
  327. package/dist/types/toast/src/toast.d.ts +62 -0
  328. package/dist/types/toasted-notes/index.d.ts +1 -0
  329. package/dist/types/toasted-notes/src/Alert.d.ts +8 -0
  330. package/dist/types/toasted-notes/src/Message.d.ts +26 -0
  331. package/dist/types/toasted-notes/src/Positions.d.ts +9 -0
  332. package/dist/types/toasted-notes/src/Toast.d.ts +13 -0
  333. package/dist/types/toasted-notes/src/ToastManager.d.ts +45 -0
  334. package/dist/types/toasted-notes/src/index.d.ts +4 -0
  335. package/dist/types/toasted-notes/src/useTimeout.d.ts +3 -0
  336. package/dist/types/user-menu/index.d.ts +1 -0
  337. package/dist/types/user-menu/src/index.d.ts +6 -0
  338. package/dist/types/user-menu/src/styles.d.ts +1 -0
  339. package/dist/types/user-menu/src/user-menu.d.ts +21 -0
  340. package/dist/types/user-menu/stories/announcement.d.ts +6 -0
  341. package/dist/types/user-menu/stories/user-menu.stories.d.ts +5 -0
  342. package/dist/types/utils/index.d.ts +1 -0
  343. package/dist/types/utils/src/assertion.d.ts +4 -0
  344. package/dist/types/utils/src/children.d.ts +8 -0
  345. package/dist/types/utils/src/color.d.ts +9 -0
  346. package/dist/types/utils/src/index.d.ts +10 -0
  347. package/dist/types/utils/src/object.d.ts +6 -0
  348. package/dist/types/utils/src/refs.d.ts +5 -0
  349. package/dist/types/utils/src/slug.d.ts +1 -0
  350. package/dist/types/utils/src/types.d.ts +13 -0
  351. package/dist/types/utils/src/walk-object.d.ts +5 -0
  352. package/dist/types/visually-hidden/index.d.ts +1 -0
  353. package/dist/types/visually-hidden/src/index.d.ts +32 -0
  354. package/package.json +2 -2
  355. package/src/components/dropdown-filter.js +73 -0
  356. package/src/components/menu.js +171 -0
  357. package/src/components/search-bar.js +45 -0
  358. package/src/components/tab-menu.js +37 -0
  359. package/src/index.js +12 -4
@@ -0,0 +1,26 @@
1
+ import * as React from 'react';
2
+ import POSITIONS from './Positions';
3
+ interface MessageCallback {
4
+ id: string;
5
+ onClose: () => void;
6
+ }
7
+ export declare type MessageType = 'default' | 'success' | 'error';
8
+ export declare type PositionsType = keyof typeof POSITIONS;
9
+ export declare type MessageProp = React.ReactNode | ((callback: MessageCallback) => React.ReactNode) | string;
10
+ export interface MessageOptions {
11
+ id: string;
12
+ duration: number | null;
13
+ type: MessageType;
14
+ onRequestRemove: () => void;
15
+ onRequestClose: () => void;
16
+ showing: boolean;
17
+ position: PositionsType;
18
+ }
19
+ interface Props extends MessageOptions {
20
+ message: MessageProp;
21
+ zIndex?: number;
22
+ requestClose?: boolean;
23
+ position: PositionsType;
24
+ }
25
+ export declare const Message: ({ id, message, position, onRequestRemove, requestClose, duration }: Props) => JSX.Element;
26
+ export {};
@@ -0,0 +1,9 @@
1
+ declare const POSITIONS: {
2
+ top: string;
3
+ 'top-left': string;
4
+ 'top-right': string;
5
+ bottom: string;
6
+ 'bottom-left': string;
7
+ 'bottom-right': string;
8
+ };
9
+ export default POSITIONS;
@@ -0,0 +1,13 @@
1
+ import { MessageOptionalOptions } from './ToastManager';
2
+ import { MessageProp, PositionsType } from './Message';
3
+ declare class Toaster {
4
+ createNotification?: Function;
5
+ removeAll?: Function;
6
+ closeToast?: Function;
7
+ constructor();
8
+ closeAll: () => void;
9
+ bindNotify: (fn: Function, removeAll: Function, closeToast: Function) => void;
10
+ notify: (message: MessageProp, options?: MessageOptionalOptions) => any;
11
+ close: (id: number, position: PositionsType) => void;
12
+ }
13
+ export default Toaster;
@@ -0,0 +1,45 @@
1
+ import * as React from 'react';
2
+ import { PositionsType, MessageType, MessageOptions, MessageProp } from './Message';
3
+ interface Props {
4
+ notify: (fn: Function, closeAll: Function, close: Function) => void;
5
+ }
6
+ export interface MessageOptionalOptions {
7
+ type?: MessageType;
8
+ duration?: number | null;
9
+ position?: PositionsType;
10
+ }
11
+ interface ToastArgs extends MessageOptions {
12
+ message: MessageProp;
13
+ }
14
+ declare type State = {
15
+ top: Array<ToastArgs>;
16
+ 'top-left': Array<ToastArgs>;
17
+ 'top-right': Array<ToastArgs>;
18
+ 'bottom-left': Array<ToastArgs>;
19
+ bottom: Array<ToastArgs>;
20
+ 'bottom-right': Array<ToastArgs>;
21
+ };
22
+ export default class ToastManager extends React.Component<Props, State> {
23
+ static idCounter: number;
24
+ state: State;
25
+ constructor(props: Props);
26
+ notify: (message: MessageProp, options: MessageOptionalOptions) => {
27
+ id: number;
28
+ position: "top" | "bottom" | "top-left" | "top-right" | "bottom-left" | "bottom-right";
29
+ };
30
+ closeAll: () => void;
31
+ createToastState: (message: MessageProp, options: MessageOptionalOptions) => {
32
+ id: number;
33
+ message: MessageProp;
34
+ position: "top" | "bottom" | "top-left" | "top-right" | "bottom-left" | "bottom-right";
35
+ showing: boolean;
36
+ duration: number | null;
37
+ onRequestRemove: () => void;
38
+ type: MessageType | undefined;
39
+ };
40
+ closeToast: (id: string, position: PositionsType) => void;
41
+ removeToast: (id: string, position: PositionsType) => void;
42
+ getStyle: (position: PositionsType) => React.CSSProperties;
43
+ render(): JSX.Element[];
44
+ }
45
+ export {};
@@ -0,0 +1,4 @@
1
+ import Toaster from './Toast';
2
+ declare const toaster: Toaster;
3
+ export { default as Position } from './Positions';
4
+ export { toaster };
@@ -0,0 +1,3 @@
1
+ declare type Callback = () => void;
2
+ export declare function useTimeout(callback: Callback, delay: number | null): void;
3
+ export {};
@@ -0,0 +1 @@
1
+ export * from './src';
@@ -0,0 +1,6 @@
1
+ import * as React from 'react';
2
+ import { UserMenuProps } from './user-menu';
3
+ declare type UserMenu = React.ForwardRefExoticComponent<UserMenuProps & React.RefAttributes<HTMLDivElement>>;
4
+ declare const UserMenu: UserMenu;
5
+ export type { UserMenuProps };
6
+ export { UserMenu };
@@ -0,0 +1 @@
1
+ export declare const useUserMenuClass: (args?: any) => string;
@@ -0,0 +1,21 @@
1
+ import { DefaultProps } from '@sk-web-gui/theme';
2
+ import * as React from 'react';
3
+ export interface MenuItemGroup {
4
+ label: string;
5
+ showLabel: boolean;
6
+ showOnDesktop: boolean;
7
+ showOnMobile: boolean;
8
+ elements: {
9
+ label: string;
10
+ element: (active: boolean) => JSX.Element;
11
+ }[];
12
+ }
13
+ interface IUserMenuProps extends DefaultProps {
14
+ menuTitle: string;
15
+ menuSubTitle: string;
16
+ }
17
+ export interface UserMenuProps extends React.HTMLAttributes<HTMLDivElement>, IUserMenuProps {
18
+ menuGroups: MenuItemGroup[];
19
+ }
20
+ export declare const UserMenu: React.ForwardRefExoticComponent<UserMenuProps & React.RefAttributes<HTMLDivElement>>;
21
+ export {};
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ export declare const Announcement: ({ color, size, ...rest }: {
3
+ [x: string]: any;
4
+ color?: string | undefined;
5
+ size?: number | undefined;
6
+ }) => JSX.Element;
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ import { Meta } from '@storybook/react';
3
+ declare const _default: Meta<import("@storybook/react").Args>;
4
+ export default _default;
5
+ export declare const Basic: () => JSX.Element;
@@ -0,0 +1 @@
1
+ export * from './src';
@@ -0,0 +1,4 @@
1
+ import { Dict } from './types';
2
+ export declare function isArray<T>(value: any): value is Array<T>;
3
+ export declare function isObject(value: any): value is Dict;
4
+ export declare const __DEV__: boolean;
@@ -0,0 +1,8 @@
1
+ import * as React from 'react';
2
+ /**
3
+ * Gets only the valid children of a component,
4
+ * and ignores any nullish or falsy child.
5
+ *
6
+ * @param children the children
7
+ */
8
+ export declare function getValidChildren(children: React.ReactNode): React.ReactElement<any, string | React.JSXElementConstructor<any>>[];
@@ -0,0 +1,9 @@
1
+ import type { Color } from 'color-string';
2
+ export declare function hsl2rgb(h: number, s: number, l: number): [number, number, number];
3
+ export declare function hwb2rgb(h: number, w: number, b: number): [number, number, number];
4
+ export declare function toRGBA(color: string): Color | undefined;
5
+ export declare function toRGB(color: string): number[] | undefined;
6
+ export declare function toColor(colorStr: string): {
7
+ color: string;
8
+ opacity: string;
9
+ };
@@ -0,0 +1,10 @@
1
+ import cx from 'clsx';
2
+ export * from './types';
3
+ export * from './color';
4
+ export * from './assertion';
5
+ export * from './walk-object';
6
+ export * from './object';
7
+ export * from './children';
8
+ export * from './refs';
9
+ export * from './slug';
10
+ export { cx };
@@ -0,0 +1,6 @@
1
+ import type { Dict } from './types';
2
+ export declare function omit<T extends Dict, K extends keyof T>(object: T, keys: K[]): Omit<T, K>;
3
+ export declare function pick<T extends Dict, K extends keyof T>(object: T, keys: K[]): { [P in K]: T[P]; };
4
+ export declare function deepmerge<T1, T2>(target: Partial<T1>, source: Partial<T2>, options?: {
5
+ clone: boolean;
6
+ }): Partial<T1>;
@@ -0,0 +1,5 @@
1
+ import * as React from 'react';
2
+ declare type ReactRef<T> = React.Ref<T> | React.RefObject<T> | React.MutableRefObject<T>;
3
+ export declare function setRef<T = any>(ref: ReactRef<T> | undefined, value: T): void;
4
+ export declare function useForkRef<T = any>(refA: ReactRef<T> | undefined, refB: ReactRef<T> | undefined): ((refValue: T) => void) | null;
5
+ export {};
@@ -0,0 +1 @@
1
+ export declare const toSlug: (str: string) => string;
@@ -0,0 +1,13 @@
1
+ export declare type Dict<T = any> = Record<string, T>;
2
+ export declare type CSSMap = Dict<{
3
+ value: string;
4
+ var: string;
5
+ varRef: string;
6
+ }>;
7
+ export declare type WithCSSVar<T> = T & {
8
+ __cssVars: Dict;
9
+ __cssMap: CSSMap;
10
+ };
11
+ export declare type DeepPartial<T> = {
12
+ [P in keyof T]?: DeepPartial<T[P]>;
13
+ };
@@ -0,0 +1,5 @@
1
+ export declare type WalkObjectPredicate<Leaf = unknown> = (value: unknown, path: string[]) => Leaf;
2
+ export declare type MappedLeavesObject<Obj, LeafType> = {
3
+ [Prop in keyof Obj]: Obj[Prop] extends Array<any> ? MappedLeavesObject<Obj[Prop][number], LeafType>[] : Obj[Prop] extends object ? MappedLeavesObject<Obj[Prop], LeafType> : LeafType;
4
+ };
5
+ export declare function walkObject<Target, LeafType>(target: Target, predicate: WalkObjectPredicate<LeafType>): MappedLeavesObject<Target, ReturnType<WalkObjectPredicate<LeafType>>>;
@@ -0,0 +1 @@
1
+ export * from './src';
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Welcome to @reach/visually-hidden!
3
+ *
4
+ * Provides text for screen readers that is visually hidden.
5
+ * It is the logical opposite of the `aria-hidden` attribute.
6
+ *
7
+ * @see https://snook.ca/archives/html_and_css/hiding-content-for-accessibility
8
+ * @see https://a11yproject.com/posts/how-to-hide-content/
9
+ * @see Docs https://reach.tech/visually-hidden
10
+ * @see Source https://github.com/reach/reach-ui/tree/main/packages/visually-hidden
11
+ */
12
+ import * as React from 'react';
13
+ /**
14
+ * VisuallyHidden
15
+ *
16
+ * Provides text for screen readers that is visually hidden.
17
+ * It is the logical opposite of the `aria-hidden` attribute.
18
+ */
19
+ declare const VisuallyHidden: React.ForwardRefExoticComponent<VisuallyHiddenProps & React.RefAttributes<HTMLElement>>;
20
+ /**
21
+ * @see Docs https://reach.tech/visually-hidden#visuallyhidden-props
22
+ */
23
+ interface VisuallyHiddenProps extends React.InputHTMLAttributes<HTMLInputElement> {
24
+ /**
25
+ * @see Docs https://reach.tech/visually-hidden#visuallyhidden-children
26
+ */
27
+ children?: React.ReactNode;
28
+ as?: React.ElementType;
29
+ }
30
+ export type { VisuallyHiddenProps };
31
+ export { VisuallyHidden };
32
+ export default VisuallyHidden;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sk-web-gui/core",
3
- "version": "0.1.36",
3
+ "version": "0.1.38",
4
4
  "license": "MIT",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -31,5 +31,5 @@
31
31
  "postcss-import": "^14.0.2",
32
32
  "tailwindcss": "^2.2.4"
33
33
  },
34
- "gitHead": "80e01b53645bbd5e24bb9d61dae4f18b54920e6d"
34
+ "gitHead": "b01dc14993c6053602b39cc6d081e3670b0d5aad"
35
35
  }
@@ -0,0 +1,73 @@
1
+ module.exports = DropdownFilter = () => ({
2
+ ".DropdownFilter": {
3
+ position: "relative",
4
+ height: 44,
5
+ border: "1px solid #939393",
6
+ maxWidth: 291,
7
+ display: "flex",
8
+ background: "#fff",
9
+ borderRadius: 2,
10
+
11
+ ".dropdown-button": {
12
+ justifyContent: "space-between",
13
+ display: "flex",
14
+ flexGrow: 1,
15
+ alignItems: "center",
16
+ padding: "0 1rem",
17
+
18
+ ".arrow-icon": {
19
+ transform: "rotate(180deg)",
20
+
21
+ "&.open": {
22
+ transform: "rotate(0)"
23
+ }
24
+ }
25
+ },
26
+
27
+ ".fitler-container": {
28
+ position: "absolute",
29
+ top: "100%",
30
+ left: "-1px",
31
+ index: 10,
32
+ width: "calc(100% + 2px)",
33
+ background: "#fff",
34
+ border: "1px solid #939393",
35
+ padding: "1rem",
36
+ borderRadius: 2,
37
+
38
+ ".filter-controls": {
39
+ display: "flex",
40
+ justifyContent: "flex-end",
41
+ padding: "0 1rem",
42
+ paddingBottom: 12,
43
+
44
+ "button": {
45
+ marginLeft: "1rem",
46
+ textDecoration: "underline"
47
+ }
48
+ },
49
+
50
+ ".FilterItem": {
51
+ height: 48,
52
+ display: "flex",
53
+ justifyContent: "space-between",
54
+ alignItems: "center",
55
+ borderBottom: "1px solid #939393",
56
+ padding: "0 1rem",
57
+
58
+ "&.disabled": {
59
+ color: "#939393"
60
+ },
61
+
62
+ "&:first-of-type": {
63
+ borderTop: "1px solid #939393",
64
+ },
65
+
66
+ "&:last-child": {
67
+ borderBottom: "none",
68
+ }
69
+ }
70
+ }
71
+ }
72
+ });
73
+
@@ -0,0 +1,171 @@
1
+ module.exports = Menu = () => ({
2
+ ".Menu": {
3
+ width: "440px",
4
+ border: "1px solid #939393",
5
+ borderRadius: "2px",
6
+ overflow: "hidden",
7
+
8
+ ".menu-header": {
9
+ padding: "3rem 1rem 1.8rem",
10
+ backgroundColor: "#005595",
11
+ padding: "2rem 1rem",
12
+
13
+ "label": {
14
+ fontSize: "20px",
15
+ fontWeight: 700,
16
+ color: "#fff"
17
+ },
18
+
19
+ ".label-header": {
20
+ display: "flex",
21
+ alignItems: "center",
22
+
23
+
24
+ "span": {
25
+ marginLeft: "auto"
26
+ }
27
+ },
28
+
29
+ ".select-header": {
30
+ paddingBottom: "6rem",
31
+
32
+ "label": {
33
+ marginBottom: "10px",
34
+ display: "block"
35
+ }
36
+ }
37
+ },
38
+
39
+
40
+ ".MenuItem": {
41
+ borderTop: "1px solid #939393",
42
+ transition: "500ms ease",
43
+
44
+ ".wrapper": {
45
+ minHeight: "64px",
46
+ display: "flex",
47
+ alignItems: "center",
48
+
49
+ "a, button": {
50
+ all: "unset",
51
+ cursor: "pointer",
52
+ width: "100%",
53
+ height: "100%",
54
+ display: "flex",
55
+ verticalAlign: "middle",
56
+ alignItems: "center",
57
+ paddingRight: '15px'
58
+ },
59
+
60
+ "&.lvl-1, &.lvl-2, &.lvl-3, &.lvl-4, &.lvl-5, &.lvl-6, &.lvl-7, &.lvl-8, &.lvl-9, &.lvl-10": {
61
+ minHeight: "56px",
62
+ },
63
+
64
+ "&.open": {
65
+ boxShadow: "inset 6px 0 0 0 #005595",
66
+ },
67
+
68
+ "&.lvl-0": {
69
+ backgroundColor: "#fff",
70
+ "> a, > button": {
71
+ paddingLeft: "1rem"
72
+ }
73
+ },
74
+
75
+ "&.lvl-1": {
76
+ backgroundColor: "#F9F9F9",
77
+ "> a, > button": {
78
+ paddingLeft: "2rem"
79
+ }
80
+ },
81
+
82
+ "&.lvl-2": {
83
+ backgroundColor: "#ECECEC",
84
+ "> a, > button": {
85
+ paddingLeft: "3rem"
86
+ }
87
+ },
88
+
89
+ "&.lvl-3": {
90
+ backgroundColor: "#ECECEC",
91
+ "> a, > button": {
92
+ paddingLeft: "4rem"
93
+ }
94
+ },
95
+
96
+ "&.lvl-4": {
97
+ backgroundColor: "#ECECEC",
98
+ "> a, > button": {
99
+ paddingLeft: "5rem"
100
+ }
101
+ },
102
+
103
+ "&.lvl-5": {
104
+ backgroundColor: "#ECECEC",
105
+ "> a, > button": {
106
+ paddingLeft: "6rem"
107
+ }
108
+ },
109
+
110
+ "&.lvl-6": {
111
+ backgroundColor: "#ECECEC",
112
+ "> a, > button": {
113
+ paddingLeft: "7rem"
114
+ }
115
+ },
116
+
117
+ "&.lvl-7": {
118
+ backgroundColor: "#ECECEC",
119
+ "> a, > button": {
120
+ paddingLeft: "8rem"
121
+ }
122
+ },
123
+
124
+ "&.lvl-8": {
125
+ backgroundColor: "#ECECEC",
126
+ "> a, > button": {
127
+ paddingLeft: "9rem"
128
+ }
129
+ },
130
+
131
+ "&.lvl-9": {
132
+ backgroundColor: "#ECECEC",
133
+ "> a, > button": {
134
+ paddingLeft: "10rem"
135
+ }
136
+ },
137
+
138
+ "&.lvl-10": {
139
+ backgroundColor: "#ECECEC",
140
+ "> a, > button": {
141
+ paddingLeft: "11rem"
142
+ }
143
+ },
144
+
145
+ "label": {
146
+
147
+ },
148
+
149
+ ".expand": {
150
+ width: "50px",
151
+ height: "64px",
152
+ display: "flex",
153
+ justifyContent: "center",
154
+ alignItems: "center",
155
+ marginLeft: "auto",
156
+ padding: 0,
157
+
158
+ "span": {
159
+ display: "flex",
160
+ justifyContent: "center",
161
+ alignItems: "center",
162
+ borderLeft: "1px solid",
163
+ height: '24px',
164
+ width: '45px'
165
+ }
166
+ }
167
+ }
168
+ }
169
+ },
170
+ });
171
+
@@ -0,0 +1,45 @@
1
+ module.exports = SearchBar = () => ({
2
+ ".SearchBar": {
3
+ position: "relative",
4
+ border: "1px solid #939393",
5
+ borderRadius: 200,
6
+ overflow: "hidden",
7
+ height: 44,
8
+
9
+ "input": {
10
+ border: "none",
11
+ position: "absolute",
12
+ top: 0,
13
+ left: 0,
14
+ flexGrow: 1,
15
+ width: "100%",
16
+ height: "inherit",
17
+ fontFamily: "Arial",
18
+ fontStyle: "normal",
19
+ fontWeight: 400,
20
+ fontSize: 14,
21
+ lineHeight: 20,
22
+ color: "#4B4B4B",
23
+ padding: "0px 44px 0px 16px"
24
+ },
25
+
26
+ ".search-icon": {
27
+ border: "none",
28
+ display: "flex",
29
+ height: 42,
30
+ width: 44,
31
+ justifyContent: "center",
32
+ alignItems: "center",
33
+ position: "absolute",
34
+ top: 0,
35
+ right: 0,
36
+
37
+ "svg.small": {
38
+ height: 13,
39
+ width: 13
40
+ }
41
+ }
42
+
43
+ }
44
+ })
45
+
@@ -0,0 +1,37 @@
1
+ module.exports = TabMenu = () => ({
2
+ ".TabMenu": {
3
+
4
+ ".tab-wrapper": {
5
+ display: "flex",
6
+ flexDirection: "row"
7
+ },
8
+
9
+ ".TabItem": {
10
+ all: 'unset',
11
+ height: 65,
12
+ display: "flex",
13
+ padding: "0 1rem",
14
+ marginRight: "5rem",
15
+ alignItems: "center",
16
+ position: "relative",
17
+
18
+ "&.active::after": {
19
+ content: '""',
20
+ display: "block",
21
+ position: "absolute",
22
+ width: "100%",
23
+ height: 6,
24
+ background: "#005595",
25
+ top: "100%",
26
+ left: 0,
27
+ }
28
+ },
29
+
30
+ ".underline": {
31
+ width: "100%",
32
+ height: 6,
33
+ background: "#F4F4F4"
34
+ }
35
+ },
36
+ });
37
+
package/src/index.js CHANGED
@@ -30,13 +30,19 @@ const Modal = require('./components/modal');
30
30
  const CookieConsent = require('./components/cookie-consent');
31
31
  const Divider = require('./components/divider');
32
32
 
33
+ const Menu = require('./components/menu');
34
+ const TabMenu = require('./components/tab-menu');
33
35
  const UserMenu = require('./components/user-menu');
34
36
 
37
+ const DropdownFilter = require('./components/dropdown-filter');
38
+
35
39
  const Tag = require('./components/tag');
36
40
  const Pagination = require('./components/pagination');
37
41
  const Footer = require('./components/footer');
38
42
  const Header = require('./components/header');
39
43
 
44
+ const SearchBar = require('./components/search-bar');
45
+
40
46
  const components = [
41
47
  Alert,
42
48
  Breadcrumb,
@@ -63,7 +69,13 @@ const components = [
63
69
  Card,
64
70
  Divider,
65
71
 
72
+ Menu,
73
+ TabMenu,
66
74
  UserMenu,
75
+
76
+ DropdownFilter,
77
+
78
+ SearchBar,
67
79
 
68
80
  Tag,
69
81
  Pagination,
@@ -122,10 +134,6 @@ module.exports = plugin.withOptions(
122
134
  '.text-content': {
123
135
  '@apply max-w-[80rem]': {},
124
136
 
125
- '.ingress': {
126
- '@apply text-xl leading-[1.5]': {},
127
- },
128
-
129
137
  h1: {
130
138
  '@apply mb-md': {},
131
139