@helpdice/ui 1.0.1 → 1.0.2

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 (1008) hide show
  1. package/dist/auto-complete/auto-complete-context.d.ts +10 -0
  2. package/dist/auto-complete/auto-complete-dropdown.d.ts +12 -0
  3. package/dist/auto-complete/auto-complete-empty.d.ts +8 -0
  4. package/dist/auto-complete/auto-complete-item.d.ts +8 -0
  5. package/dist/auto-complete/auto-complete-searching.d.ts +38 -0
  6. package/dist/auto-complete/auto-complete.d.ts +32 -0
  7. package/dist/auto-complete/index.d.ts +13 -0
  8. package/dist/auto-complete/index.js +2334 -0
  9. package/dist/avatar/avatar-group.d.ts +43 -0
  10. package/dist/avatar/avatar.d.ts +43 -0
  11. package/dist/avatar/index.d.ts +9 -0
  12. package/dist/avatar/index.js +1192 -0
  13. package/dist/badge/badge-anchor.d.ts +11 -0
  14. package/dist/badge/badge.d.ts +46 -0
  15. package/dist/badge/index.d.ts +9 -0
  16. package/dist/badge/index.js +1290 -0
  17. package/dist/breadcrumbs/breadcrumbs-item.d.ts +15 -0
  18. package/dist/breadcrumbs/breadcrumbs-separator.d.ts +42 -0
  19. package/dist/breadcrumbs/breadcrumbs.d.ts +43 -0
  20. package/dist/breadcrumbs/index.d.ts +12 -0
  21. package/dist/breadcrumbs/index.js +1366 -0
  22. package/dist/button/button-icon.d.ts +10 -0
  23. package/dist/button/button-loading.d.ts +6 -0
  24. package/dist/button/button.d.ts +55 -0
  25. package/dist/button/button.drip.d.ts +10 -0
  26. package/dist/button/index.d.ts +4 -0
  27. package/dist/button/index.js +1679 -0
  28. package/dist/button/styles.d.ts +18 -0
  29. package/dist/button/utils.d.ts +8 -0
  30. package/dist/button-dropdown/button-dropdown-context.d.ts +10 -0
  31. package/dist/button-dropdown/button-dropdown-item.d.ts +13 -0
  32. package/dist/button-dropdown/button-dropdown.d.ts +49 -0
  33. package/dist/button-dropdown/icon.d.ts +7 -0
  34. package/dist/button-dropdown/index.d.ts +9 -0
  35. package/dist/button-dropdown/index.js +1474 -0
  36. package/dist/button-dropdown/styles.d.ts +11 -0
  37. package/dist/button-group/button-group-context.d.ts +10 -0
  38. package/dist/button-group/button-group.d.ts +47 -0
  39. package/dist/button-group/index.d.ts +4 -0
  40. package/dist/button-group/index.js +1183 -0
  41. package/dist/capacity/capacity.d.ts +43 -0
  42. package/dist/capacity/index.d.ts +3 -0
  43. package/dist/capacity/index.js +1186 -0
  44. package/dist/card/card-content.d.ts +42 -0
  45. package/dist/card/card-footer.d.ts +43 -0
  46. package/dist/card/card.d.ts +46 -0
  47. package/dist/card/index.d.ts +15 -0
  48. package/dist/card/index.js +1637 -0
  49. package/dist/card/styles.d.ts +8 -0
  50. package/dist/cart/index.d.ts +72 -0
  51. package/dist/cart/useLocalStorage.d.ts +1 -0
  52. package/dist/checkbox/checkbox-context.d.ts +9 -0
  53. package/dist/checkbox/checkbox-group.d.ts +45 -0
  54. package/dist/checkbox/checkbox.d.ts +57 -0
  55. package/dist/checkbox/checkbox.icon.d.ts +9 -0
  56. package/dist/checkbox/index.d.ts +9 -0
  57. package/dist/checkbox/index.js +1410 -0
  58. package/dist/checkbox/styles.d.ts +7 -0
  59. package/dist/code/code.d.ts +45 -0
  60. package/dist/code/index.d.ts +3 -0
  61. package/dist/code/index.js +1205 -0
  62. package/dist/code-block/index.d.ts +10 -0
  63. package/dist/col/index.js +567 -0
  64. package/dist/collapse/collapse-context.d.ts +7 -0
  65. package/dist/collapse/collapse-group.d.ts +43 -0
  66. package/dist/collapse/collapse-icon.d.ts +6 -0
  67. package/dist/collapse/collapse.d.ts +47 -0
  68. package/dist/collapse/index.d.ts +9 -0
  69. package/dist/collapse/index.js +1513 -0
  70. package/dist/css-baseline/css-baseline.d.ts +11 -0
  71. package/dist/css-baseline/index.d.ts +1 -0
  72. package/dist/css-baseline/index.js +839 -0
  73. package/dist/description/description.d.ts +42 -0
  74. package/dist/description/index.d.ts +3 -0
  75. package/dist/description/index.js +1149 -0
  76. package/dist/display/display.d.ts +44 -0
  77. package/dist/display/index.d.ts +3 -0
  78. package/dist/display/index.js +1153 -0
  79. package/dist/divider/divider.d.ts +46 -0
  80. package/dist/divider/index.d.ts +4 -0
  81. package/dist/divider/index.js +1172 -0
  82. package/dist/dot/dot.d.ts +45 -0
  83. package/dist/dot/index.d.ts +3 -0
  84. package/dist/dot/index.js +1159 -0
  85. package/dist/drawer/drawer-wrapper.d.ts +10 -0
  86. package/dist/drawer/drawer.d.ts +15 -0
  87. package/dist/drawer/helper.d.ts +9 -0
  88. package/dist/drawer/index.d.ts +13 -0
  89. package/dist/drawer/index.js +1839 -0
  90. package/dist/fieldset/fieldset-content.d.ts +42 -0
  91. package/dist/fieldset/fieldset-context.d.ts +12 -0
  92. package/dist/fieldset/fieldset-footer.d.ts +42 -0
  93. package/dist/fieldset/fieldset-group.d.ts +44 -0
  94. package/dist/fieldset/fieldset-subtitle.d.ts +8 -0
  95. package/dist/fieldset/fieldset-title.d.ts +8 -0
  96. package/dist/fieldset/fieldset.d.ts +46 -0
  97. package/dist/fieldset/index.d.ts +22 -0
  98. package/dist/fieldset/index.js +1444 -0
  99. package/dist/form/ErrorMessage.d.ts +17 -0
  100. package/dist/form/Field.d.ts +53 -0
  101. package/dist/form/FormWrapper.d.ts +62 -0
  102. package/dist/form/FormikContext.d.ts +6 -0
  103. package/dist/form/connect.d.ts +12 -0
  104. package/dist/form/constants.d.ts +1 -0
  105. package/dist/form/index.d.ts +9 -0
  106. package/dist/form/types.d.ts +249 -0
  107. package/dist/form/utils.d.ts +68 -0
  108. package/dist/form/withFormik.d.ts +68 -0
  109. package/dist/grid/basic-item.d.ts +19 -0
  110. package/dist/grid/grid-container.d.ts +299 -0
  111. package/dist/grid/grid-types.d.ts +11 -0
  112. package/dist/grid/grid.d.ts +296 -0
  113. package/dist/grid/index.d.ts +11 -0
  114. package/dist/grid/index.js +1262 -0
  115. package/dist/image/helpers.d.ts +2 -0
  116. package/dist/image/image-browser-https-icon.d.ts +3 -0
  117. package/dist/image/image-browser.d.ts +47 -0
  118. package/dist/image/image.d.ts +43 -0
  119. package/dist/image/image.skeleton.d.ts +7 -0
  120. package/dist/image/index.d.ts +9 -0
  121. package/dist/image/index.js +1470 -0
  122. package/dist/image/styles.d.ts +9 -0
  123. package/dist/index.d.ts +130 -0
  124. package/dist/index.js +34412 -0
  125. package/dist/input/index.d.ts +13 -0
  126. package/dist/input/index.js +1629 -0
  127. package/dist/input/input-block-label.d.ts +5 -0
  128. package/dist/input/input-icon-clear.d.ts +8 -0
  129. package/dist/input/input-icon.d.ts +8 -0
  130. package/dist/input/input-label.d.ts +6 -0
  131. package/dist/input/input-props.d.ts +29 -0
  132. package/dist/input/input.d.ts +38 -0
  133. package/dist/input/password-icon.d.ts +6 -0
  134. package/dist/input/password.d.ts +51 -0
  135. package/dist/input/styles.d.ts +8 -0
  136. package/dist/keyboard/index.d.ts +3 -0
  137. package/dist/keyboard/index.js +1127 -0
  138. package/dist/keyboard/keyboard.d.ts +46 -0
  139. package/dist/link/icon.d.ts +4 -0
  140. package/dist/link/index.d.ts +3 -0
  141. package/dist/link/index.js +1260 -0
  142. package/dist/link/link.d.ts +45 -0
  143. package/dist/loading/index.d.ts +3 -0
  144. package/dist/loading/index.js +1170 -0
  145. package/dist/loading/loading.d.ts +47 -0
  146. package/dist/login-with/LoginSocialAmazon/index.d.ts +19 -0
  147. package/dist/login-with/LoginSocialApple/index.d.ts +14 -0
  148. package/dist/login-with/LoginSocialFacebook/index.d.ts +26 -0
  149. package/dist/login-with/LoginSocialGithub/index.d.ts +21 -0
  150. package/dist/login-with/LoginSocialGoogle/index.d.ts +25 -0
  151. package/dist/login-with/LoginSocialInstagram/index.d.ts +22 -0
  152. package/dist/login-with/LoginSocialLinkedin/index.d.ts +20 -0
  153. package/dist/login-with/LoginSocialMicrosoft/index.d.ts +24 -0
  154. package/dist/login-with/LoginSocialPinterest/index.d.ts +19 -0
  155. package/dist/login-with/LoginSocialTiktok/index.d.ts +16 -0
  156. package/dist/login-with/LoginSocialTwitter/index.d.ts +20 -0
  157. package/dist/login-with/index.d.ts +18 -0
  158. package/dist/modal/index.d.ts +18 -0
  159. package/dist/modal/index.js +2440 -0
  160. package/dist/modal/modal-action.d.ts +46 -0
  161. package/dist/modal/modal-actions.d.ts +5 -0
  162. package/dist/modal/modal-content.d.ts +42 -0
  163. package/dist/modal/modal-context.d.ts +6 -0
  164. package/dist/modal/modal-subtitle.d.ts +42 -0
  165. package/dist/modal/modal-title.d.ts +42 -0
  166. package/dist/modal/modal-wrapper.d.ts +8 -0
  167. package/dist/modal/modal.d.ts +50 -0
  168. package/dist/note/index.d.ts +3 -0
  169. package/dist/note/index.js +1177 -0
  170. package/dist/note/note.d.ts +48 -0
  171. package/dist/page/index.d.ts +16 -0
  172. package/dist/page/index.js +1313 -0
  173. package/dist/page/page-content.d.ts +42 -0
  174. package/dist/page/page-footer.d.ts +42 -0
  175. package/dist/page/page-header.d.ts +43 -0
  176. package/dist/page/page.d.ts +51 -0
  177. package/dist/pagination/index.d.ts +12 -0
  178. package/dist/pagination/index.js +1563 -0
  179. package/dist/pagination/pagination-context.d.ts +11 -0
  180. package/dist/pagination/pagination-ellipsis.d.ts +7 -0
  181. package/dist/pagination/pagination-item.d.ts +10 -0
  182. package/dist/pagination/pagination-next.d.ts +4 -0
  183. package/dist/pagination/pagination-pages.d.ts +9 -0
  184. package/dist/pagination/pagination-previous.d.ts +4 -0
  185. package/dist/pagination/pagination.d.ts +47 -0
  186. package/dist/popover/index.d.ts +10 -0
  187. package/dist/popover/index.js +1849 -0
  188. package/dist/popover/popover-context.d.ts +7 -0
  189. package/dist/popover/popover-item.d.ts +45 -0
  190. package/dist/popover/popover.d.ts +52 -0
  191. package/dist/progress/index.d.ts +3 -0
  192. package/dist/progress/index.js +1208 -0
  193. package/dist/progress/progress.d.ts +51 -0
  194. package/dist/radio/index.d.ts +13 -0
  195. package/dist/radio/index.js +1392 -0
  196. package/dist/radio/radio-context.d.ts +9 -0
  197. package/dist/radio/radio-description.d.ts +42 -0
  198. package/dist/radio/radio-group.d.ts +47 -0
  199. package/dist/radio/radio.d.ts +58 -0
  200. package/dist/radio/styles.d.ts +8 -0
  201. package/dist/rating/index.d.ts +3 -0
  202. package/dist/rating/index.js +1297 -0
  203. package/dist/rating/rating-icon.d.ts +3 -0
  204. package/dist/rating/rating.d.ts +54 -0
  205. package/dist/row/index.js +895 -0
  206. package/dist/search-bar/index.js +1176 -0
  207. package/dist/select/index.d.ts +9 -0
  208. package/dist/select/index.js +2125 -0
  209. package/dist/select/select-context.d.ts +11 -0
  210. package/dist/select/select-dropdown.d.ts +14 -0
  211. package/dist/select/select-icon-clear.d.ts +6 -0
  212. package/dist/select/select-icon.d.ts +3 -0
  213. package/dist/select/select-input.d.ts +8 -0
  214. package/dist/select/select-multiple-value.d.ts +7 -0
  215. package/dist/select/select-option.d.ts +47 -0
  216. package/dist/select/select.d.ts +62 -0
  217. package/dist/select/styles.d.ts +9 -0
  218. package/dist/shared/backdrop.d.ts +14 -0
  219. package/dist/shared/css-transition.d.ts +12 -0
  220. package/dist/shared/dropdown.d.ts +9 -0
  221. package/dist/shared/ellipsis.d.ts +6 -0
  222. package/dist/shared/expand.d.ts +7 -0
  223. package/dist/shared/highlight.d.ts +13 -0
  224. package/dist/skeleton/index.d.ts +14 -0
  225. package/dist/slider/index.d.ts +3 -0
  226. package/dist/slider/index.js +1461 -0
  227. package/dist/slider/slider-dot.d.ts +12 -0
  228. package/dist/slider/slider-mark.d.ts +10 -0
  229. package/dist/slider/slider.d.ts +54 -0
  230. package/dist/slider/styles.d.ts +6 -0
  231. package/dist/snippet/index.d.ts +4 -0
  232. package/dist/snippet/index.js +1547 -0
  233. package/dist/snippet/snippet-icon.d.ts +3 -0
  234. package/dist/snippet/snippet.d.ts +51 -0
  235. package/dist/snippet/styles.d.ts +8 -0
  236. package/dist/spacer/index.d.ts +3 -0
  237. package/dist/spacer/index.js +1109 -0
  238. package/dist/spacer/spacer.d.ts +41 -0
  239. package/dist/spinner/index.d.ts +3 -0
  240. package/dist/spinner/index.js +1166 -0
  241. package/dist/spinner/spinner.d.ts +40 -0
  242. package/dist/styled-jsx.cjs.js +748 -0
  243. package/dist/table/index.d.ts +5 -0
  244. package/dist/table/index.js +1486 -0
  245. package/dist/table/table-body.d.ts +18 -0
  246. package/dist/table/table-cell.d.ts +18 -0
  247. package/dist/table/table-column.d.ts +14 -0
  248. package/dist/table/table-context.d.ts +8 -0
  249. package/dist/table/table-head.d.ts +14 -0
  250. package/dist/table/table-types.d.ts +14 -0
  251. package/dist/table/table.d.ts +57 -0
  252. package/dist/tabs/index.d.ts +9 -0
  253. package/dist/tabs/index.js +1488 -0
  254. package/dist/tabs/tabs-context.d.ts +21 -0
  255. package/dist/tabs/tabs-item.d.ts +44 -0
  256. package/dist/tabs/tabs.d.ts +54 -0
  257. package/dist/tag/index.d.ts +3 -0
  258. package/dist/tag/index.js +1155 -0
  259. package/dist/tag/tag.d.ts +51 -0
  260. package/dist/text/child.d.ts +11 -0
  261. package/dist/text/index.d.ts +3 -0
  262. package/dist/text/index.js +1251 -0
  263. package/dist/text/text.d.ts +59 -0
  264. package/dist/textarea/index.d.ts +3 -0
  265. package/dist/textarea/index.js +1298 -0
  266. package/dist/textarea/textarea.d.ts +54 -0
  267. package/dist/themes/index.d.ts +4 -0
  268. package/dist/themes/index.js +302 -0
  269. package/dist/themes/presets/dark.d.ts +8 -0
  270. package/dist/themes/presets/default.d.ts +8 -0
  271. package/dist/themes/presets/index.d.ts +90 -0
  272. package/dist/themes/presets/shared.d.ts +4 -0
  273. package/dist/themes/themes.d.ts +18 -0
  274. package/dist/toggle/index.d.ts +3 -0
  275. package/dist/toggle/index.js +1245 -0
  276. package/dist/toggle/styles.d.ts +6 -0
  277. package/dist/toggle/toggle.d.ts +60 -0
  278. package/dist/tooltip/helper.d.ts +10 -0
  279. package/dist/tooltip/index.d.ts +3 -0
  280. package/dist/tooltip/index.js +1709 -0
  281. package/dist/tooltip/placement.d.ts +29 -0
  282. package/dist/tooltip/styles.d.ts +7 -0
  283. package/dist/tooltip/tooltip-content.d.ts +18 -0
  284. package/dist/tooltip/tooltip-icon.d.ts +8 -0
  285. package/dist/tooltip/tooltip.d.ts +59 -0
  286. package/dist/tree/index.d.ts +10 -0
  287. package/dist/tree/index.js +1410 -0
  288. package/dist/tree/tree-context.d.ts +8 -0
  289. package/dist/tree/tree-file-icon.d.ts +8 -0
  290. package/dist/tree/tree-file.d.ts +12 -0
  291. package/dist/tree/tree-folder-icon.d.ts +8 -0
  292. package/dist/tree/tree-folder.d.ts +12 -0
  293. package/dist/tree/tree-help.d.ts +4 -0
  294. package/dist/tree/tree-indents.d.ts +6 -0
  295. package/dist/tree/tree-status-icon.d.ts +9 -0
  296. package/dist/tree/tree.d.ts +18 -0
  297. package/dist/ui-provider/index.d.ts +3 -0
  298. package/dist/ui-provider/index.js +2155 -0
  299. package/dist/ui-provider/theme-provider.d.ts +8 -0
  300. package/dist/ui-provider/ui-provider.d.ts +8 -0
  301. package/dist/use-all-themes/all-themes-context.d.ts +7 -0
  302. package/dist/use-all-themes/index.d.ts +3 -0
  303. package/dist/use-all-themes/index.js +318 -0
  304. package/dist/use-body-scroll/index.d.ts +3 -0
  305. package/dist/use-body-scroll/index.js +158 -0
  306. package/dist/use-body-scroll/use-body-scroll.d.ts +11 -0
  307. package/dist/use-classes/index.d.ts +2 -0
  308. package/dist/use-classes/index.js +47 -0
  309. package/dist/use-classes/use-classes.d.ts +4 -0
  310. package/dist/use-click-away/index.d.ts +2 -0
  311. package/dist/use-click-away/index.js +26 -0
  312. package/dist/use-click-away/use-click-away.d.ts +4 -0
  313. package/dist/use-clipboard/index.d.ts +3 -0
  314. package/dist/use-clipboard/index.js +158 -0
  315. package/dist/use-clipboard/use-clipboard.d.ts +8 -0
  316. package/dist/use-current-state/index.d.ts +2 -0
  317. package/dist/use-current-state/index.js +76 -0
  318. package/dist/use-current-state/use-current-state.d.ts +4 -0
  319. package/dist/use-input/index.d.ts +3 -0
  320. package/dist/use-input/index.js +112 -0
  321. package/dist/use-input/use-input.d.ts +13 -0
  322. package/dist/use-keyboard/codes.d.ts +92 -0
  323. package/dist/use-keyboard/helper.d.ts +3 -0
  324. package/dist/use-keyboard/index.d.ts +5 -0
  325. package/dist/use-keyboard/index.js +203 -0
  326. package/dist/use-keyboard/use-keyboard.d.ts +22 -0
  327. package/dist/use-media-query/index.d.ts +3 -0
  328. package/dist/use-media-query/index.js +455 -0
  329. package/dist/use-media-query/use-media-query.d.ts +12 -0
  330. package/dist/use-modal/index.d.ts +3 -0
  331. package/dist/use-modal/index.js +97 -0
  332. package/dist/use-modal/use-modal.d.ts +10 -0
  333. package/dist/use-scale/index.d.ts +6 -0
  334. package/dist/use-scale/index.js +592 -0
  335. package/dist/use-scale/scale-context.d.ts +50 -0
  336. package/dist/use-scale/utils.d.ts +68 -0
  337. package/dist/use-scale/with-scale.d.ts +35 -0
  338. package/dist/use-tabs/index.d.ts +2 -0
  339. package/dist/use-tabs/index.js +96 -0
  340. package/dist/use-tabs/use-tabs.d.ts +11 -0
  341. package/dist/use-theme/index.d.ts +2 -0
  342. package/dist/use-theme/index.js +316 -0
  343. package/dist/use-theme/theme-context.d.ts +4 -0
  344. package/dist/use-toasts/helpers.d.ts +17 -0
  345. package/dist/use-toasts/index.d.ts +3 -0
  346. package/dist/use-toasts/index.js +207 -0
  347. package/dist/use-toasts/toast-container.d.ts +3 -0
  348. package/dist/use-toasts/toast-item.d.ts +8 -0
  349. package/dist/use-toasts/use-toast.d.ts +40 -0
  350. package/dist/user/index.d.ts +8 -0
  351. package/dist/user/index.js +1392 -0
  352. package/dist/user/user-link.d.ts +11 -0
  353. package/dist/user/user.d.ts +46 -0
  354. package/dist/utils/calculations.d.ts +10 -0
  355. package/dist/utils/collections.d.ts +15 -0
  356. package/dist/utils/color.d.ts +2 -0
  357. package/dist/utils/layouts.d.ts +20 -0
  358. package/dist/utils/prop-types.d.ts +19 -0
  359. package/dist/utils/types.d.ts +3 -0
  360. package/dist/utils/use-body-scroll.d.ts +2 -0
  361. package/dist/utils/use-click-anywhere.d.ts +2 -0
  362. package/dist/utils/use-click-away.d.ts +2 -0
  363. package/dist/utils/use-clipboard.d.ts +2 -0
  364. package/dist/utils/use-current-state.d.ts +2 -0
  365. package/dist/utils/use-dom-observer.d.ts +3 -0
  366. package/dist/utils/use-drag.d.ts +8 -0
  367. package/dist/utils/use-hd-ui-context.d.ts +16 -0
  368. package/dist/utils/use-portal.d.ts +2 -0
  369. package/dist/utils/use-previous.d.ts +2 -0
  370. package/dist/utils/use-real-shape.d.ts +9 -0
  371. package/dist/utils/use-resize.d.ts +2 -0
  372. package/dist/utils/use-ssr.d.ts +6 -0
  373. package/dist/utils/use-warning.d.ts +2 -0
  374. package/esm/auto-complete/auto-complete-context.d.ts +10 -0
  375. package/esm/auto-complete/auto-complete-context.js +8 -0
  376. package/esm/auto-complete/auto-complete-dropdown.d.ts +12 -0
  377. package/esm/auto-complete/auto-complete-dropdown.js +43 -0
  378. package/esm/auto-complete/auto-complete-empty.d.ts +8 -0
  379. package/esm/auto-complete/auto-complete-empty.js +15 -0
  380. package/esm/auto-complete/auto-complete-item.d.ts +8 -0
  381. package/esm/auto-complete/auto-complete-item.js +45 -0
  382. package/esm/auto-complete/auto-complete-searching.d.ts +38 -0
  383. package/esm/auto-complete/auto-complete-searching.js +25 -0
  384. package/esm/auto-complete/auto-complete.d.ts +32 -0
  385. package/esm/auto-complete/auto-complete.js +197 -0
  386. package/esm/auto-complete/index.d.ts +13 -0
  387. package/esm/auto-complete/index.js +11 -0
  388. package/esm/avatar/avatar-group.d.ts +43 -0
  389. package/esm/avatar/avatar-group.js +25 -0
  390. package/esm/avatar/avatar.d.ts +43 -0
  391. package/esm/avatar/avatar.js +54 -0
  392. package/esm/avatar/index.d.ts +9 -0
  393. package/esm/avatar/index.js +6 -0
  394. package/esm/badge/badge-anchor.d.ts +11 -0
  395. package/esm/badge/badge-anchor.js +64 -0
  396. package/esm/badge/badge.d.ts +46 -0
  397. package/esm/badge/badge.js +50 -0
  398. package/esm/badge/index.d.ts +9 -0
  399. package/esm/badge/index.js +6 -0
  400. package/esm/breadcrumbs/breadcrumbs-item.d.ts +15 -0
  401. package/esm/breadcrumbs/breadcrumbs-item.js +43 -0
  402. package/esm/breadcrumbs/breadcrumbs-separator.d.ts +42 -0
  403. package/esm/breadcrumbs/breadcrumbs-separator.js +21 -0
  404. package/esm/breadcrumbs/breadcrumbs.d.ts +43 -0
  405. package/esm/breadcrumbs/breadcrumbs.js +41 -0
  406. package/esm/breadcrumbs/index.d.ts +12 -0
  407. package/esm/breadcrumbs/index.js +8 -0
  408. package/esm/button/button-icon.d.ts +10 -0
  409. package/esm/button/button-icon.js +26 -0
  410. package/esm/button/button-loading.d.ts +6 -0
  411. package/esm/button/button-loading.js +15 -0
  412. package/esm/button/button.d.ts +55 -0
  413. package/esm/button/button.drip.d.ts +10 -0
  414. package/esm/button/button.drip.js +58 -0
  415. package/esm/button/button.js +132 -0
  416. package/esm/button/index.d.ts +4 -0
  417. package/esm/button/index.js +4 -0
  418. package/esm/button/styles.d.ts +18 -0
  419. package/esm/button/styles.js +188 -0
  420. package/esm/button/utils.d.ts +8 -0
  421. package/esm/button/utils.js +40 -0
  422. package/esm/button-dropdown/button-dropdown-context.d.ts +10 -0
  423. package/esm/button-dropdown/button-dropdown-context.js +11 -0
  424. package/esm/button-dropdown/button-dropdown-item.d.ts +13 -0
  425. package/esm/button-dropdown/button-dropdown-item.js +47 -0
  426. package/esm/button-dropdown/button-dropdown.d.ts +49 -0
  427. package/esm/button-dropdown/button-dropdown.js +105 -0
  428. package/esm/button-dropdown/icon.d.ts +7 -0
  429. package/esm/button-dropdown/icon.js +28 -0
  430. package/esm/button-dropdown/index.d.ts +9 -0
  431. package/esm/button-dropdown/index.js +6 -0
  432. package/esm/button-dropdown/styles.d.ts +11 -0
  433. package/esm/button-dropdown/styles.js +46 -0
  434. package/esm/button-group/button-group-context.d.ts +10 -0
  435. package/esm/button-group/button-group-context.js +9 -0
  436. package/esm/button-group/button-group.d.ts +47 -0
  437. package/esm/button-group/button-group.js +63 -0
  438. package/esm/button-group/index.d.ts +4 -0
  439. package/esm/button-group/index.js +4 -0
  440. package/esm/capacity/capacity.d.ts +43 -0
  441. package/esm/capacity/capacity.js +46 -0
  442. package/esm/capacity/index.d.ts +3 -0
  443. package/esm/capacity/index.js +4 -0
  444. package/esm/card/card-content.d.ts +42 -0
  445. package/esm/card/card-content.js +24 -0
  446. package/esm/card/card-footer.d.ts +43 -0
  447. package/esm/card/card-footer.js +31 -0
  448. package/esm/card/card.d.ts +46 -0
  449. package/esm/card/card.js +57 -0
  450. package/esm/card/index.d.ts +15 -0
  451. package/esm/card/index.js +10 -0
  452. package/esm/card/styles.d.ts +8 -0
  453. package/esm/card/styles.js +53 -0
  454. package/esm/cart/index.d.ts +72 -0
  455. package/esm/cart/index.js +266 -0
  456. package/esm/cart/useLocalStorage.d.ts +1 -0
  457. package/esm/cart/useLocalStorage.js +28 -0
  458. package/esm/checkbox/checkbox-context.d.ts +9 -0
  459. package/esm/checkbox/checkbox-context.js +10 -0
  460. package/esm/checkbox/checkbox-group.d.ts +45 -0
  461. package/esm/checkbox/checkbox-group.js +64 -0
  462. package/esm/checkbox/checkbox.d.ts +57 -0
  463. package/esm/checkbox/checkbox.icon.d.ts +9 -0
  464. package/esm/checkbox/checkbox.icon.js +46 -0
  465. package/esm/checkbox/checkbox.js +103 -0
  466. package/esm/checkbox/index.d.ts +9 -0
  467. package/esm/checkbox/index.js +6 -0
  468. package/esm/checkbox/styles.d.ts +7 -0
  469. package/esm/checkbox/styles.js +27 -0
  470. package/esm/code/code.d.ts +45 -0
  471. package/esm/code/code.js +51 -0
  472. package/esm/code/index.d.ts +3 -0
  473. package/esm/code/index.js +4 -0
  474. package/esm/code-block/index.d.ts +10 -0
  475. package/esm/code-block/index.js +28 -0
  476. package/esm/col/col.js +26 -0
  477. package/esm/col/index.js +4 -0
  478. package/esm/collapse/collapse-context.d.ts +7 -0
  479. package/esm/collapse/collapse-context.js +8 -0
  480. package/esm/collapse/collapse-group.d.ts +43 -0
  481. package/esm/collapse/collapse-group.js +68 -0
  482. package/esm/collapse/collapse-icon.d.ts +6 -0
  483. package/esm/collapse/collapse-icon.js +26 -0
  484. package/esm/collapse/collapse.d.ts +47 -0
  485. package/esm/collapse/collapse.js +83 -0
  486. package/esm/collapse/index.d.ts +9 -0
  487. package/esm/collapse/index.js +6 -0
  488. package/esm/css-baseline/css-baseline.d.ts +11 -0
  489. package/esm/css-baseline/css-baseline.js +24 -0
  490. package/esm/css-baseline/index.d.ts +1 -0
  491. package/esm/css-baseline/index.js +3 -0
  492. package/esm/description/description.d.ts +42 -0
  493. package/esm/description/description.js +34 -0
  494. package/esm/description/index.d.ts +3 -0
  495. package/esm/description/index.js +4 -0
  496. package/esm/display/display.d.ts +44 -0
  497. package/esm/display/display.js +38 -0
  498. package/esm/display/index.d.ts +3 -0
  499. package/esm/display/index.js +4 -0
  500. package/esm/divider/divider.d.ts +46 -0
  501. package/esm/divider/divider.js +57 -0
  502. package/esm/divider/index.d.ts +4 -0
  503. package/esm/divider/index.js +4 -0
  504. package/esm/dot/dot.d.ts +45 -0
  505. package/esm/dot/dot.js +44 -0
  506. package/esm/dot/index.d.ts +3 -0
  507. package/esm/dot/index.js +4 -0
  508. package/esm/drawer/drawer-wrapper.d.ts +10 -0
  509. package/esm/drawer/drawer-wrapper.js +80 -0
  510. package/esm/drawer/drawer.d.ts +15 -0
  511. package/esm/drawer/drawer.js +73 -0
  512. package/esm/drawer/helper.d.ts +9 -0
  513. package/esm/drawer/helper.js +27 -0
  514. package/esm/drawer/index.d.ts +13 -0
  515. package/esm/drawer/index.js +10 -0
  516. package/esm/fieldset/fieldset-content.d.ts +42 -0
  517. package/esm/fieldset/fieldset-content.js +25 -0
  518. package/esm/fieldset/fieldset-context.d.ts +12 -0
  519. package/esm/fieldset/fieldset-context.js +9 -0
  520. package/esm/fieldset/fieldset-footer.d.ts +42 -0
  521. package/esm/fieldset/fieldset-footer.js +25 -0
  522. package/esm/fieldset/fieldset-group.d.ts +44 -0
  523. package/esm/fieldset/fieldset-group.js +79 -0
  524. package/esm/fieldset/fieldset-subtitle.d.ts +8 -0
  525. package/esm/fieldset/fieldset-subtitle.js +18 -0
  526. package/esm/fieldset/fieldset-title.d.ts +8 -0
  527. package/esm/fieldset/fieldset-title.js +20 -0
  528. package/esm/fieldset/fieldset.d.ts +46 -0
  529. package/esm/fieldset/fieldset.js +84 -0
  530. package/esm/fieldset/index.d.ts +22 -0
  531. package/esm/fieldset/index.js +15 -0
  532. package/esm/form/ErrorMessage.d.ts +17 -0
  533. package/esm/form/ErrorMessage.js +45 -0
  534. package/esm/form/FastField.js +147 -0
  535. package/esm/form/Field.d.ts +53 -0
  536. package/esm/form/Field.js +137 -0
  537. package/esm/form/FieldArray.js +281 -0
  538. package/esm/form/Form.js +23 -0
  539. package/esm/form/FormWrapper.d.ts +62 -0
  540. package/esm/form/FormWrapper.js +977 -0
  541. package/esm/form/FormikContext.d.ts +6 -0
  542. package/esm/form/FormikContext.js +11 -0
  543. package/esm/form/connect.d.ts +12 -0
  544. package/esm/form/connect.js +30 -0
  545. package/esm/form/constants.d.ts +1 -0
  546. package/esm/form/constants.js +1 -0
  547. package/esm/form/index.d.ts +9 -0
  548. package/esm/form/index.js +15 -0
  549. package/esm/form/types.d.ts +249 -0
  550. package/esm/form/types.js +1 -0
  551. package/esm/form/utils.d.ts +68 -0
  552. package/esm/form/utils.js +179 -0
  553. package/esm/form/withFormik.d.ts +68 -0
  554. package/esm/form/withFormik.js +107 -0
  555. package/esm/formik-native/src/index.js +12 -0
  556. package/esm/formik-native/test/blah.test.js +5 -0
  557. package/esm/grid/basic-item.d.ts +19 -0
  558. package/esm/grid/basic-item.js +87 -0
  559. package/esm/grid/grid-container.d.ts +299 -0
  560. package/esm/grid/grid-container.js +40 -0
  561. package/esm/grid/grid-types.d.ts +11 -0
  562. package/esm/grid/grid-types.js +8 -0
  563. package/esm/grid/grid.d.ts +296 -0
  564. package/esm/grid/grid.js +34 -0
  565. package/esm/grid/index.d.ts +11 -0
  566. package/esm/grid/index.js +6 -0
  567. package/esm/image/helpers.d.ts +2 -0
  568. package/esm/image/helpers.js +14 -0
  569. package/esm/image/image-browser-https-icon.d.ts +3 -0
  570. package/esm/image/image-browser-https-icon.js +21 -0
  571. package/esm/image/image-browser.d.ts +47 -0
  572. package/esm/image/image-browser.js +80 -0
  573. package/esm/image/image.d.ts +43 -0
  574. package/esm/image/image.js +82 -0
  575. package/esm/image/image.skeleton.d.ts +7 -0
  576. package/esm/image/image.skeleton.js +20 -0
  577. package/esm/image/index.d.ts +9 -0
  578. package/esm/image/index.js +4 -0
  579. package/esm/image/styles.d.ts +9 -0
  580. package/esm/image/styles.js +15 -0
  581. package/esm/index.d.ts +130 -0
  582. package/esm/index.js +78 -0
  583. package/esm/input/index.d.ts +13 -0
  584. package/esm/input/index.js +8 -0
  585. package/esm/input/input-block-label.d.ts +5 -0
  586. package/esm/input/input-block-label.js +16 -0
  587. package/esm/input/input-icon-clear.d.ts +8 -0
  588. package/esm/input/input-icon-clear.js +43 -0
  589. package/esm/input/input-icon.d.ts +8 -0
  590. package/esm/input/input-icon.js +18 -0
  591. package/esm/input/input-label.d.ts +6 -0
  592. package/esm/input/input-label.js +16 -0
  593. package/esm/input/input-props.d.ts +29 -0
  594. package/esm/input/input-props.js +1 -0
  595. package/esm/input/input.d.ts +38 -0
  596. package/esm/input/input.js +184 -0
  597. package/esm/input/password-icon.d.ts +6 -0
  598. package/esm/input/password-icon.js +28 -0
  599. package/esm/input/password.d.ts +51 -0
  600. package/esm/input/password.js +54 -0
  601. package/esm/input/styles.d.ts +8 -0
  602. package/esm/input/styles.js +31 -0
  603. package/esm/keyboard/index.d.ts +3 -0
  604. package/esm/keyboard/index.js +4 -0
  605. package/esm/keyboard/keyboard.d.ts +46 -0
  606. package/esm/keyboard/keyboard.js +43 -0
  607. package/esm/link/icon.d.ts +4 -0
  608. package/esm/link/icon.js +30 -0
  609. package/esm/link/index.d.ts +3 -0
  610. package/esm/link/index.js +2 -0
  611. package/esm/link/link.d.ts +45 -0
  612. package/esm/link/link.js +47 -0
  613. package/esm/loading/index.d.ts +3 -0
  614. package/esm/loading/index.js +2 -0
  615. package/esm/loading/loading.d.ts +47 -0
  616. package/esm/loading/loading.js +55 -0
  617. package/esm/login-with/LoginSocialAmazon/index.d.ts +19 -0
  618. package/esm/login-with/LoginSocialAmazon/index.js +142 -0
  619. package/esm/login-with/LoginSocialApple/index.d.ts +14 -0
  620. package/esm/login-with/LoginSocialApple/index.js +141 -0
  621. package/esm/login-with/LoginSocialFacebook/index.d.ts +26 -0
  622. package/esm/login-with/LoginSocialFacebook/index.js +148 -0
  623. package/esm/login-with/LoginSocialGithub/index.d.ts +21 -0
  624. package/esm/login-with/LoginSocialGithub/index.js +163 -0
  625. package/esm/login-with/LoginSocialGoogle/index.d.ts +25 -0
  626. package/esm/login-with/LoginSocialGoogle/index.js +206 -0
  627. package/esm/login-with/LoginSocialInstagram/index.d.ts +22 -0
  628. package/esm/login-with/LoginSocialInstagram/index.js +145 -0
  629. package/esm/login-with/LoginSocialLinkedin/index.d.ts +20 -0
  630. package/esm/login-with/LoginSocialLinkedin/index.js +151 -0
  631. package/esm/login-with/LoginSocialMicrosoft/index.d.ts +24 -0
  632. package/esm/login-with/LoginSocialMicrosoft/index.js +154 -0
  633. package/esm/login-with/LoginSocialPinterest/index.d.ts +19 -0
  634. package/esm/login-with/LoginSocialPinterest/index.js +171 -0
  635. package/esm/login-with/LoginSocialTiktok/index.d.ts +16 -0
  636. package/esm/login-with/LoginSocialTiktok/index.js +152 -0
  637. package/esm/login-with/LoginSocialTwitter/index.d.ts +20 -0
  638. package/esm/login-with/LoginSocialTwitter/index.js +177 -0
  639. package/esm/login-with/helper/signature.js +142 -0
  640. package/esm/login-with/index.d.ts +18 -0
  641. package/esm/login-with/index.js +11 -0
  642. package/esm/modal/index.d.ts +18 -0
  643. package/esm/modal/index.js +10 -0
  644. package/esm/modal/modal-action.d.ts +46 -0
  645. package/esm/modal/modal-action.js +69 -0
  646. package/esm/modal/modal-actions.d.ts +5 -0
  647. package/esm/modal/modal-actions.js +36 -0
  648. package/esm/modal/modal-content.d.ts +42 -0
  649. package/esm/modal/modal-content.js +24 -0
  650. package/esm/modal/modal-context.d.ts +6 -0
  651. package/esm/modal/modal-context.js +6 -0
  652. package/esm/modal/modal-subtitle.d.ts +42 -0
  653. package/esm/modal/modal-subtitle.js +25 -0
  654. package/esm/modal/modal-title.d.ts +42 -0
  655. package/esm/modal/modal-title.js +25 -0
  656. package/esm/modal/modal-wrapper.d.ts +8 -0
  657. package/esm/modal/modal-wrapper.js +74 -0
  658. package/esm/modal/modal.d.ts +50 -0
  659. package/esm/modal/modal.js +94 -0
  660. package/esm/note/index.d.ts +3 -0
  661. package/esm/note/index.js +2 -0
  662. package/esm/note/note.d.ts +48 -0
  663. package/esm/note/note.js +62 -0
  664. package/esm/page/index.d.ts +16 -0
  665. package/esm/page/index.js +9 -0
  666. package/esm/page/page-content.d.ts +42 -0
  667. package/esm/page/page-content.js +23 -0
  668. package/esm/page/page-footer.d.ts +42 -0
  669. package/esm/page/page-footer.js +21 -0
  670. package/esm/page/page-header.d.ts +43 -0
  671. package/esm/page/page-header.js +29 -0
  672. package/esm/page/page.d.ts +51 -0
  673. package/esm/page/page.js +80 -0
  674. package/esm/pagination/index.d.ts +12 -0
  675. package/esm/pagination/index.js +6 -0
  676. package/esm/pagination/pagination-context.d.ts +11 -0
  677. package/esm/pagination/pagination-context.js +8 -0
  678. package/esm/pagination/pagination-ellipsis.d.ts +7 -0
  679. package/esm/pagination/pagination-ellipsis.js +69 -0
  680. package/esm/pagination/pagination-item.d.ts +10 -0
  681. package/esm/pagination/pagination-item.js +43 -0
  682. package/esm/pagination/pagination-next.d.ts +4 -0
  683. package/esm/pagination/pagination-next.js +21 -0
  684. package/esm/pagination/pagination-pages.d.ts +9 -0
  685. package/esm/pagination/pagination-pages.js +86 -0
  686. package/esm/pagination/pagination-previous.d.ts +4 -0
  687. package/esm/pagination/pagination-previous.js +21 -0
  688. package/esm/pagination/pagination.d.ts +47 -0
  689. package/esm/pagination/pagination.js +96 -0
  690. package/esm/popover/index.d.ts +10 -0
  691. package/esm/popover/index.js +7 -0
  692. package/esm/popover/popover-context.d.ts +7 -0
  693. package/esm/popover/popover-context.js +9 -0
  694. package/esm/popover/popover-item.d.ts +45 -0
  695. package/esm/popover/popover-item.js +55 -0
  696. package/esm/popover/popover.d.ts +52 -0
  697. package/esm/popover/popover.js +86 -0
  698. package/esm/progress/index.d.ts +3 -0
  699. package/esm/progress/index.js +2 -0
  700. package/esm/progress/progress.d.ts +51 -0
  701. package/esm/progress/progress.js +68 -0
  702. package/esm/radio/index.d.ts +13 -0
  703. package/esm/radio/index.js +7 -0
  704. package/esm/radio/radio-context.d.ts +9 -0
  705. package/esm/radio/radio-context.js +9 -0
  706. package/esm/radio/radio-description.d.ts +42 -0
  707. package/esm/radio/radio-description.js +25 -0
  708. package/esm/radio/radio-group.d.ts +47 -0
  709. package/esm/radio/radio-group.js +57 -0
  710. package/esm/radio/radio.d.ts +58 -0
  711. package/esm/radio/radio.js +109 -0
  712. package/esm/radio/styles.d.ts +8 -0
  713. package/esm/radio/styles.js +31 -0
  714. package/esm/rating/index.d.ts +3 -0
  715. package/esm/rating/index.js +2 -0
  716. package/esm/rating/rating-icon.d.ts +3 -0
  717. package/esm/rating/rating-icon.js +18 -0
  718. package/esm/rating/rating.d.ts +54 -0
  719. package/esm/rating/rating.js +101 -0
  720. package/esm/row/index.js +2 -0
  721. package/esm/row/row.js +51 -0
  722. package/esm/search-bar/components/ClearIcon.js +42 -0
  723. package/esm/search-bar/components/Results.js +87 -0
  724. package/esm/search-bar/components/SearchIcon.js +24 -0
  725. package/esm/search-bar/components/SearchInput.js +75 -0
  726. package/esm/search-bar/components/index.js +302 -0
  727. package/esm/search-bar/config/config.js +26 -0
  728. package/esm/search-bar/index.js +2 -0
  729. package/esm/search-bar/utils/utils.js +14 -0
  730. package/esm/select/index.d.ts +9 -0
  731. package/esm/select/index.js +4 -0
  732. package/esm/select/select-context.d.ts +11 -0
  733. package/esm/select/select-context.js +9 -0
  734. package/esm/select/select-dropdown.d.ts +14 -0
  735. package/esm/select/select-dropdown.js +41 -0
  736. package/esm/select/select-icon-clear.d.ts +6 -0
  737. package/esm/select/select-icon-clear.js +37 -0
  738. package/esm/select/select-icon.d.ts +3 -0
  739. package/esm/select/select-icon.js +21 -0
  740. package/esm/select/select-input.d.ts +8 -0
  741. package/esm/select/select-input.js +35 -0
  742. package/esm/select/select-multiple-value.d.ts +7 -0
  743. package/esm/select/select-multiple-value.js +21 -0
  744. package/esm/select/select-option.d.ts +47 -0
  745. package/esm/select/select-option.js +86 -0
  746. package/esm/select/select.d.ts +62 -0
  747. package/esm/select/select.js +211 -0
  748. package/esm/select/styles.d.ts +9 -0
  749. package/esm/select/styles.js +36 -0
  750. package/esm/shared/backdrop.d.ts +14 -0
  751. package/esm/shared/backdrop.js +66 -0
  752. package/esm/shared/css-transition.d.ts +12 -0
  753. package/esm/shared/css-transition.js +65 -0
  754. package/esm/shared/dropdown.d.ts +9 -0
  755. package/esm/shared/dropdown.js +99 -0
  756. package/esm/shared/ellipsis.d.ts +6 -0
  757. package/esm/shared/ellipsis.js +13 -0
  758. package/esm/shared/expand.d.ts +7 -0
  759. package/esm/shared/expand.js +86 -0
  760. package/esm/shared/highlight.d.ts +13 -0
  761. package/esm/shared/highlight.js +46 -0
  762. package/esm/skeleton/index.d.ts +14 -0
  763. package/esm/skeleton/index.js +48 -0
  764. package/esm/slider/index.d.ts +3 -0
  765. package/esm/slider/index.js +2 -0
  766. package/esm/slider/slider-dot.d.ts +12 -0
  767. package/esm/slider/slider-dot.js +27 -0
  768. package/esm/slider/slider-mark.d.ts +10 -0
  769. package/esm/slider/slider-mark.js +35 -0
  770. package/esm/slider/slider.d.ts +54 -0
  771. package/esm/slider/slider.js +146 -0
  772. package/esm/slider/styles.d.ts +6 -0
  773. package/esm/slider/styles.js +21 -0
  774. package/esm/snippet/index.d.ts +4 -0
  775. package/esm/snippet/index.js +2 -0
  776. package/esm/snippet/snippet-icon.d.ts +3 -0
  777. package/esm/snippet/snippet-icon.js +25 -0
  778. package/esm/snippet/snippet.d.ts +51 -0
  779. package/esm/snippet/snippet.js +93 -0
  780. package/esm/snippet/styles.d.ts +8 -0
  781. package/esm/snippet/styles.js +48 -0
  782. package/esm/spacer/index.d.ts +3 -0
  783. package/esm/spacer/index.js +2 -0
  784. package/esm/spacer/spacer.d.ts +41 -0
  785. package/esm/spacer/spacer.js +24 -0
  786. package/esm/spinner/index.d.ts +3 -0
  787. package/esm/spinner/index.js +2 -0
  788. package/esm/spinner/spinner.d.ts +40 -0
  789. package/esm/spinner/spinner.js +40 -0
  790. package/esm/styled-jsx-server.es.js +5 -0
  791. package/esm/styled-jsx.es.js +737 -0
  792. package/esm/table/index.d.ts +5 -0
  793. package/esm/table/index.js +2 -0
  794. package/esm/table/table-body.d.ts +18 -0
  795. package/esm/table/table-body.js +45 -0
  796. package/esm/table/table-cell.d.ts +18 -0
  797. package/esm/table/table-cell.js +25 -0
  798. package/esm/table/table-column.d.ts +14 -0
  799. package/esm/table/table-column.js +33 -0
  800. package/esm/table/table-context.d.ts +8 -0
  801. package/esm/table/table-context.js +9 -0
  802. package/esm/table/table-head.d.ts +14 -0
  803. package/esm/table/table-head.js +51 -0
  804. package/esm/table/table-types.d.ts +14 -0
  805. package/esm/table/table-types.js +1 -0
  806. package/esm/table/table.d.ts +57 -0
  807. package/esm/table/table.js +104 -0
  808. package/esm/tabs/index.d.ts +9 -0
  809. package/esm/tabs/index.js +7 -0
  810. package/esm/tabs/tabs-context.d.ts +21 -0
  811. package/esm/tabs/tabs-context.js +8 -0
  812. package/esm/tabs/tabs-item.d.ts +44 -0
  813. package/esm/tabs/tabs-item.js +71 -0
  814. package/esm/tabs/tabs.d.ts +54 -0
  815. package/esm/tabs/tabs.js +138 -0
  816. package/esm/tag/index.d.ts +3 -0
  817. package/esm/tag/index.js +4 -0
  818. package/esm/tag/tag.d.ts +51 -0
  819. package/esm/tag/tag.js +71 -0
  820. package/esm/text/child.d.ts +11 -0
  821. package/esm/text/child.js +70 -0
  822. package/esm/text/index.d.ts +3 -0
  823. package/esm/text/index.js +4 -0
  824. package/esm/text/text.d.ts +59 -0
  825. package/esm/text/text.js +103 -0
  826. package/esm/textarea/index.d.ts +3 -0
  827. package/esm/textarea/index.js +2 -0
  828. package/esm/textarea/textarea.d.ts +54 -0
  829. package/esm/textarea/textarea.js +105 -0
  830. package/esm/themes/index.d.ts +4 -0
  831. package/esm/themes/index.js +2 -0
  832. package/esm/themes/presets/dark.d.ts +8 -0
  833. package/esm/themes/presets/dark.js +64 -0
  834. package/esm/themes/presets/default.d.ts +8 -0
  835. package/esm/themes/presets/default.js +64 -0
  836. package/esm/themes/presets/index.d.ts +90 -0
  837. package/esm/themes/presets/index.js +1 -0
  838. package/esm/themes/presets/shared.d.ts +4 -0
  839. package/esm/themes/presets/shared.js +42 -0
  840. package/esm/themes/themes.d.ts +18 -0
  841. package/esm/themes/themes.js +76 -0
  842. package/esm/toggle/index.d.ts +3 -0
  843. package/esm/toggle/index.js +2 -0
  844. package/esm/toggle/styles.d.ts +6 -0
  845. package/esm/toggle/styles.js +21 -0
  846. package/esm/toggle/toggle.d.ts +60 -0
  847. package/esm/toggle/toggle.js +76 -0
  848. package/esm/tooltip/__test__/index.test.js +168 -0
  849. package/esm/tooltip/helper.d.ts +10 -0
  850. package/esm/tooltip/helper.js +21 -0
  851. package/esm/tooltip/index.d.ts +3 -0
  852. package/esm/tooltip/index.js +2 -0
  853. package/esm/tooltip/placement.d.ts +29 -0
  854. package/esm/tooltip/placement.js +160 -0
  855. package/esm/tooltip/styles.d.ts +7 -0
  856. package/esm/tooltip/styles.js +16 -0
  857. package/esm/tooltip/tooltip-content.d.ts +18 -0
  858. package/esm/tooltip/tooltip-content.js +75 -0
  859. package/esm/tooltip/tooltip-icon.d.ts +8 -0
  860. package/esm/tooltip/tooltip-icon.js +28 -0
  861. package/esm/tooltip/tooltip.d.ts +59 -0
  862. package/esm/tooltip/tooltip.js +120 -0
  863. package/esm/tree/index.d.ts +10 -0
  864. package/esm/tree/index.js +6 -0
  865. package/esm/tree/tree-context.d.ts +8 -0
  866. package/esm/tree/tree-context.js +9 -0
  867. package/esm/tree/tree-file-icon.d.ts +8 -0
  868. package/esm/tree/tree-file-icon.js +34 -0
  869. package/esm/tree/tree-file.d.ts +12 -0
  870. package/esm/tree/tree-file.js +52 -0
  871. package/esm/tree/tree-folder-icon.d.ts +8 -0
  872. package/esm/tree/tree-folder-icon.js +31 -0
  873. package/esm/tree/tree-folder.d.ts +12 -0
  874. package/esm/tree/tree-folder.js +81 -0
  875. package/esm/tree/tree-help.d.ts +4 -0
  876. package/esm/tree/tree-help.js +16 -0
  877. package/esm/tree/tree-indents.d.ts +6 -0
  878. package/esm/tree/tree-indents.js +22 -0
  879. package/esm/tree/tree-status-icon.d.ts +9 -0
  880. package/esm/tree/tree-status-icon.js +44 -0
  881. package/esm/tree/tree.d.ts +18 -0
  882. package/esm/tree/tree.js +62 -0
  883. package/esm/ui-provider/index.d.ts +3 -0
  884. package/esm/ui-provider/index.js +2 -0
  885. package/esm/ui-provider/theme-provider.d.ts +8 -0
  886. package/esm/ui-provider/theme-provider.js +45 -0
  887. package/esm/ui-provider/ui-provider.d.ts +8 -0
  888. package/esm/ui-provider/ui-provider.js +55 -0
  889. package/esm/use-all-themes/all-themes-context.d.ts +7 -0
  890. package/esm/use-all-themes/all-themes-context.js +9 -0
  891. package/esm/use-all-themes/index.d.ts +3 -0
  892. package/esm/use-all-themes/index.js +2 -0
  893. package/esm/use-body-scroll/index.d.ts +3 -0
  894. package/esm/use-body-scroll/index.js +2 -0
  895. package/esm/use-body-scroll/use-body-scroll.d.ts +11 -0
  896. package/esm/use-body-scroll/use-body-scroll.js +63 -0
  897. package/esm/use-classes/index.d.ts +2 -0
  898. package/esm/use-classes/index.js +2 -0
  899. package/esm/use-classes/use-classes.d.ts +4 -0
  900. package/esm/use-classes/use-classes.js +32 -0
  901. package/esm/use-click-away/index.d.ts +2 -0
  902. package/esm/use-click-away/index.js +2 -0
  903. package/esm/use-click-away/use-click-away.d.ts +4 -0
  904. package/esm/use-click-away/use-click-away.js +21 -0
  905. package/esm/use-clipboard/index.d.ts +3 -0
  906. package/esm/use-clipboard/index.js +2 -0
  907. package/esm/use-clipboard/use-clipboard.d.ts +8 -0
  908. package/esm/use-clipboard/use-clipboard.js +39 -0
  909. package/esm/use-current-state/index.d.ts +2 -0
  910. package/esm/use-current-state/index.js +2 -0
  911. package/esm/use-current-state/use-current-state.d.ts +4 -0
  912. package/esm/use-current-state/use-current-state.js +23 -0
  913. package/esm/use-input/index.d.ts +3 -0
  914. package/esm/use-input/index.js +2 -0
  915. package/esm/use-input/use-input.d.ts +13 -0
  916. package/esm/use-input/use-input.js +29 -0
  917. package/esm/use-keyboard/codes.d.ts +92 -0
  918. package/esm/use-keyboard/codes.js +95 -0
  919. package/esm/use-keyboard/helper.d.ts +3 -0
  920. package/esm/use-keyboard/helper.js +26 -0
  921. package/esm/use-keyboard/index.d.ts +5 -0
  922. package/esm/use-keyboard/index.js +4 -0
  923. package/esm/use-keyboard/use-keyboard.d.ts +22 -0
  924. package/esm/use-keyboard/use-keyboard.js +70 -0
  925. package/esm/use-media-query/index.d.ts +3 -0
  926. package/esm/use-media-query/index.js +2 -0
  927. package/esm/use-media-query/use-media-query.d.ts +12 -0
  928. package/esm/use-media-query/use-media-query.js +81 -0
  929. package/esm/use-modal/index.d.ts +3 -0
  930. package/esm/use-modal/index.js +2 -0
  931. package/esm/use-modal/use-modal.d.ts +10 -0
  932. package/esm/use-modal/use-modal.js +22 -0
  933. package/esm/use-scale/index.d.ts +6 -0
  934. package/esm/use-scale/index.js +8 -0
  935. package/esm/use-scale/scale-context.d.ts +50 -0
  936. package/esm/use-scale/scale-context.js +37 -0
  937. package/esm/use-scale/utils.d.ts +68 -0
  938. package/esm/use-scale/utils.js +49 -0
  939. package/esm/use-scale/with-scale.d.ts +35 -0
  940. package/esm/use-scale/with-scale.js +102 -0
  941. package/esm/use-tabs/index.d.ts +2 -0
  942. package/esm/use-tabs/index.js +2 -0
  943. package/esm/use-tabs/use-tabs.d.ts +11 -0
  944. package/esm/use-tabs/use-tabs.js +21 -0
  945. package/esm/use-theme/index.d.ts +2 -0
  946. package/esm/use-theme/index.js +2 -0
  947. package/esm/use-theme/theme-context.d.ts +4 -0
  948. package/esm/use-theme/theme-context.js +9 -0
  949. package/esm/use-toasts/helpers.d.ts +17 -0
  950. package/esm/use-toasts/helpers.js +68 -0
  951. package/esm/use-toasts/index.d.ts +3 -0
  952. package/esm/use-toasts/index.js +2 -0
  953. package/esm/use-toasts/toast-container.d.ts +3 -0
  954. package/esm/use-toasts/toast-container.js +120 -0
  955. package/esm/use-toasts/toast-item.d.ts +8 -0
  956. package/esm/use-toasts/toast-item.js +43 -0
  957. package/esm/use-toasts/use-toast.d.ts +40 -0
  958. package/esm/use-toasts/use-toast.js +103 -0
  959. package/esm/user/index.d.ts +8 -0
  960. package/esm/user/index.js +4 -0
  961. package/esm/user/user-link.d.ts +11 -0
  962. package/esm/user/user-link.js +26 -0
  963. package/esm/user/user.d.ts +46 -0
  964. package/esm/user/user.js +44 -0
  965. package/esm/utils/calculations.d.ts +10 -0
  966. package/esm/utils/calculations.js +27 -0
  967. package/esm/utils/collections.d.ts +15 -0
  968. package/esm/utils/collections.js +126 -0
  969. package/esm/utils/color.d.ts +2 -0
  970. package/esm/utils/color.js +35 -0
  971. package/esm/utils/layouts.d.ts +20 -0
  972. package/esm/utils/layouts.js +73 -0
  973. package/esm/utils/prop-types.d.ts +19 -0
  974. package/esm/utils/prop-types.js +20 -0
  975. package/esm/utils/types.d.ts +3 -0
  976. package/esm/utils/types.js +1 -0
  977. package/esm/utils/use-body-scroll.d.ts +2 -0
  978. package/esm/utils/use-body-scroll.js +2 -0
  979. package/esm/utils/use-click-anywhere.d.ts +2 -0
  980. package/esm/utils/use-click-anywhere.js +15 -0
  981. package/esm/utils/use-click-away.d.ts +2 -0
  982. package/esm/utils/use-click-away.js +2 -0
  983. package/esm/utils/use-clipboard.d.ts +2 -0
  984. package/esm/utils/use-clipboard.js +2 -0
  985. package/esm/utils/use-context-state/create-geist-context.js +50 -0
  986. package/esm/utils/use-context-state/use-context-state.js +40 -0
  987. package/esm/utils/use-current-state.d.ts +2 -0
  988. package/esm/utils/use-current-state.js +2 -0
  989. package/esm/utils/use-default-props.js +17 -0
  990. package/esm/utils/use-dom-observer.d.ts +3 -0
  991. package/esm/utils/use-dom-observer.js +26 -0
  992. package/esm/utils/use-drag.d.ts +8 -0
  993. package/esm/utils/use-drag.js +66 -0
  994. package/esm/utils/use-hd-ui-context.d.ts +16 -0
  995. package/esm/utils/use-hd-ui-context.js +27 -0
  996. package/esm/utils/use-portal.d.ts +2 -0
  997. package/esm/utils/use-portal.js +34 -0
  998. package/esm/utils/use-previous.d.ts +2 -0
  999. package/esm/utils/use-previous.js +11 -0
  1000. package/esm/utils/use-real-shape.d.ts +9 -0
  1001. package/esm/utils/use-real-shape.js +47 -0
  1002. package/esm/utils/use-resize.d.ts +2 -0
  1003. package/esm/utils/use-resize.js +19 -0
  1004. package/esm/utils/use-ssr.d.ts +6 -0
  1005. package/esm/utils/use-ssr.js +19 -0
  1006. package/esm/utils/use-warning.d.ts +2 -0
  1007. package/esm/utils/use-warning.js +13 -0
  1008. package/package.json +1 -1
@@ -0,0 +1,2155 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var React$1 = require('react');
6
+ var reactDom = require('react-dom');
7
+
8
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
9
+
10
+ var React__default$1 = /*#__PURE__*/_interopDefaultLegacy(React$1);
11
+
12
+ function _arrayLikeToArray(r, a) {
13
+ (null == a || a > r.length) && (a = r.length);
14
+ for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
15
+ return n;
16
+ }
17
+ function _arrayWithHoles(r) {
18
+ if (Array.isArray(r)) return r;
19
+ }
20
+ function _createForOfIteratorHelper(r, e) {
21
+ var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
22
+ if (!t) {
23
+ if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) {
24
+ t && (r = t);
25
+ var n = 0,
26
+ F = function () {};
27
+ return {
28
+ s: F,
29
+ n: function () {
30
+ return n >= r.length ? {
31
+ done: !0
32
+ } : {
33
+ done: !1,
34
+ value: r[n++]
35
+ };
36
+ },
37
+ e: function (r) {
38
+ throw r;
39
+ },
40
+ f: F
41
+ };
42
+ }
43
+ throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
44
+ }
45
+ var o,
46
+ a = !0,
47
+ u = !1;
48
+ return {
49
+ s: function () {
50
+ t = t.call(r);
51
+ },
52
+ n: function () {
53
+ var r = t.next();
54
+ return a = r.done, r;
55
+ },
56
+ e: function (r) {
57
+ u = !0, o = r;
58
+ },
59
+ f: function () {
60
+ try {
61
+ a || null == t.return || t.return();
62
+ } finally {
63
+ if (u) throw o;
64
+ }
65
+ }
66
+ };
67
+ }
68
+ function _defineProperty(e, r, t) {
69
+ return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
70
+ value: t,
71
+ enumerable: !0,
72
+ configurable: !0,
73
+ writable: !0
74
+ }) : e[r] = t, e;
75
+ }
76
+ function _extends() {
77
+ return _extends = Object.assign ? Object.assign.bind() : function (n) {
78
+ for (var e = 1; e < arguments.length; e++) {
79
+ var t = arguments[e];
80
+ for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
81
+ }
82
+ return n;
83
+ }, _extends.apply(null, arguments);
84
+ }
85
+ function _iterableToArrayLimit(r, l) {
86
+ var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
87
+ if (null != t) {
88
+ var e,
89
+ n,
90
+ i,
91
+ u,
92
+ a = [],
93
+ f = !0,
94
+ o = !1;
95
+ try {
96
+ if (i = (t = t.call(r)).next, 0 === l) {
97
+ if (Object(t) !== t) return;
98
+ f = !1;
99
+ } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
100
+ } catch (r) {
101
+ o = !0, n = r;
102
+ } finally {
103
+ try {
104
+ if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
105
+ } finally {
106
+ if (o) throw n;
107
+ }
108
+ }
109
+ return a;
110
+ }
111
+ }
112
+ function _nonIterableRest() {
113
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
114
+ }
115
+ function ownKeys(e, r) {
116
+ var t = Object.keys(e);
117
+ if (Object.getOwnPropertySymbols) {
118
+ var o = Object.getOwnPropertySymbols(e);
119
+ r && (o = o.filter(function (r) {
120
+ return Object.getOwnPropertyDescriptor(e, r).enumerable;
121
+ })), t.push.apply(t, o);
122
+ }
123
+ return t;
124
+ }
125
+ function _objectSpread2(e) {
126
+ for (var r = 1; r < arguments.length; r++) {
127
+ var t = null != arguments[r] ? arguments[r] : {};
128
+ r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
129
+ _defineProperty(e, r, t[r]);
130
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
131
+ Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
132
+ });
133
+ }
134
+ return e;
135
+ }
136
+ function _objectWithoutProperties(e, t) {
137
+ if (null == e) return {};
138
+ var o,
139
+ r,
140
+ i = _objectWithoutPropertiesLoose(e, t);
141
+ if (Object.getOwnPropertySymbols) {
142
+ var n = Object.getOwnPropertySymbols(e);
143
+ for (r = 0; r < n.length; r++) o = n[r], t.indexOf(o) >= 0 || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
144
+ }
145
+ return i;
146
+ }
147
+ function _objectWithoutPropertiesLoose(r, e) {
148
+ if (null == r) return {};
149
+ var t = {};
150
+ for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
151
+ if (e.indexOf(n) >= 0) continue;
152
+ t[n] = r[n];
153
+ }
154
+ return t;
155
+ }
156
+ function _slicedToArray(r, e) {
157
+ return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
158
+ }
159
+ function _toPrimitive(t, r) {
160
+ if ("object" != typeof t || !t) return t;
161
+ var e = t[Symbol.toPrimitive];
162
+ if (void 0 !== e) {
163
+ var i = e.call(t, r || "default");
164
+ if ("object" != typeof i) return i;
165
+ throw new TypeError("@@toPrimitive must return a primitive value.");
166
+ }
167
+ return ("string" === r ? String : Number)(t);
168
+ }
169
+ function _toPropertyKey(t) {
170
+ var i = _toPrimitive(t, "string");
171
+ return "symbol" == typeof i ? i : i + "";
172
+ }
173
+ function _typeof(o) {
174
+ "@babel/helpers - typeof";
175
+
176
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
177
+ return typeof o;
178
+ } : function (o) {
179
+ return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
180
+ }, _typeof(o);
181
+ }
182
+ function _unsupportedIterableToArray(r, a) {
183
+ if (r) {
184
+ if ("string" == typeof r) return _arrayLikeToArray(r, a);
185
+ var t = {}.toString.call(r).slice(8, -1);
186
+ return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
187
+ }
188
+ }
189
+
190
+ var defaultToastLayout = {
191
+ padding: '12px 16px',
192
+ margin: '8px 0',
193
+ width: '420px',
194
+ maxWidth: '90vw',
195
+ maxHeight: '75px',
196
+ placement: 'bottomRight'
197
+ };
198
+ var defaultParams = {
199
+ toasts: [],
200
+ toastLayout: defaultToastLayout,
201
+ updateToastLayout: function updateToastLayout(t) {
202
+ return t;
203
+ },
204
+ updateToasts: function updateToasts(t) {
205
+ return t;
206
+ },
207
+ lastUpdateToastId: null,
208
+ updateLastToastId: function updateLastToastId() {
209
+ return null;
210
+ }
211
+ };
212
+ var HUIContent = /*#__PURE__*/React__default$1["default"].createContext(defaultParams);
213
+ var useHUIContext = function useHUIContext() {
214
+ return React__default$1["default"].useContext(HUIContent);
215
+ };
216
+
217
+ var defaultFont = {
218
+ sans: '"Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif',
219
+ mono: 'Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace',
220
+ prism: 'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,"Liberation Mono", "Courier New", monospace'
221
+ };
222
+ var defaultBreakpoints = {
223
+ xs: {
224
+ min: '0',
225
+ max: '650px'
226
+ },
227
+ sm: {
228
+ min: '650px',
229
+ max: '900px'
230
+ },
231
+ md: {
232
+ min: '900px',
233
+ max: '1280px'
234
+ },
235
+ lg: {
236
+ min: '1280px',
237
+ max: '1920px'
238
+ },
239
+ xl: {
240
+ min: '1920px',
241
+ max: '10000px'
242
+ }
243
+ };
244
+ var defaultLayout = {
245
+ gap: '16pt',
246
+ gapNegative: '-16pt',
247
+ gapHalf: '8pt',
248
+ gapHalfNegative: '-8pt',
249
+ gapQuarter: '4pt',
250
+ gapQuarterNegative: '-4pt',
251
+ pageMargin: '16pt',
252
+ pageWidth: '750pt',
253
+ pageWidthWithMargin: '782pt',
254
+ breakpointMobile: defaultBreakpoints.xs.max,
255
+ breakpointTablet: defaultBreakpoints.sm.max,
256
+ radius: '6px',
257
+ unit: '16px'
258
+ };
259
+
260
+ var palette$1 = {
261
+ accents_1: '#fafafa',
262
+ accents_2: '#eaeaea',
263
+ accents_3: '#999',
264
+ accents_4: '#888',
265
+ accents_5: '#666',
266
+ accents_6: '#444',
267
+ accents_7: '#333',
268
+ accents_8: '#111',
269
+ background: '#fff',
270
+ foreground: '#000',
271
+ selection: '#79ffe1',
272
+ secondary: '#666',
273
+ code: '#f81ce5',
274
+ border: '#eaeaea',
275
+ error: '#e00',
276
+ errorLight: '#ff1a1a',
277
+ errorLighter: '#f7d4d6',
278
+ errorDark: '#c50000',
279
+ success: '#0070f3',
280
+ successLight: '#3291ff',
281
+ successLighter: '#d3e5ff',
282
+ successDark: '#0761d1',
283
+ warning: '#f5a623',
284
+ warningLight: '#f7b955',
285
+ warningLighter: '#ffefcf',
286
+ warningDark: '#ab570a',
287
+ cyan: '#50e3c2',
288
+ cyanLighter: '#aaffec',
289
+ cyanLight: '#79ffe1',
290
+ cyanDark: '#29bc9b',
291
+ violet: '#7928ca',
292
+ violetLighter: '#e3d7fc',
293
+ violetLight: '#8a63d2',
294
+ violetDark: '#4c2889',
295
+ purple: '#f81ce5',
296
+ alert: '#ff0080',
297
+ magenta: '#eb367f',
298
+ link: '#0070f3'
299
+ };
300
+ var expressiveness$1 = {
301
+ linkStyle: 'none',
302
+ linkHoverStyle: 'none',
303
+ dropdownBoxShadow: '0 4px 4px 0 rgba(0, 0, 0, 0.02)',
304
+ scrollerStart: 'rgba(255, 255, 255, 1)',
305
+ scrollerEnd: 'rgba(255, 255, 255, 0)',
306
+ shadowSmall: '0 5px 10px rgba(0, 0, 0, 0.12)',
307
+ shadowMedium: '0 8px 30px rgba(0, 0, 0, 0.12)',
308
+ shadowLarge: '0 30px 60px rgba(0, 0, 0, 0.12)',
309
+ portalOpacity: 0.25
310
+ };
311
+ var font$1 = defaultFont;
312
+ var breakpoints$1 = defaultBreakpoints;
313
+ var layout$1 = defaultLayout;
314
+ var themes$1 = {
315
+ type: 'light',
316
+ font: font$1,
317
+ layout: layout$1,
318
+ palette: palette$1,
319
+ breakpoints: breakpoints$1,
320
+ expressiveness: expressiveness$1
321
+ };
322
+ var lightTheme = themes$1;
323
+
324
+ var palette = {
325
+ accents_1: '#111',
326
+ accents_2: '#333',
327
+ accents_3: '#444',
328
+ accents_4: '#666',
329
+ accents_5: '#888',
330
+ accents_6: '#999',
331
+ accents_7: '#eaeaea',
332
+ accents_8: '#fafafa',
333
+ background: '#000',
334
+ foreground: '#fff',
335
+ selection: '#f81ce5',
336
+ secondary: '#888',
337
+ code: '#79ffe1',
338
+ border: '#333',
339
+ error: '#e00',
340
+ errorLighter: '#f7d4d6',
341
+ errorLight: '#ff1a1a',
342
+ errorDark: '#c50000',
343
+ success: '#0070f3',
344
+ successLighter: '#d3e5ff',
345
+ successLight: '#3291ff',
346
+ successDark: '#0761d1',
347
+ warning: '#f5a623',
348
+ warningLighter: '#ffefcf',
349
+ warningLight: '#f7b955',
350
+ warningDark: '#ab570a',
351
+ cyan: '#50e3c2',
352
+ cyanLighter: '#aaffec',
353
+ cyanLight: '#79ffe1',
354
+ cyanDark: '#29bc9b',
355
+ violet: '#7928ca',
356
+ violetLighter: '#e3d7fc',
357
+ violetLight: '#8a63d2',
358
+ violetDark: '#4c2889',
359
+ purple: '#f81ce5',
360
+ alert: '#ff0080',
361
+ magenta: '#eb367f',
362
+ link: '#3291ff'
363
+ };
364
+ var expressiveness = {
365
+ linkStyle: 'none',
366
+ linkHoverStyle: 'none',
367
+ dropdownBoxShadow: '0 0 0 1px #333',
368
+ scrollerStart: 'rgba(255, 255, 255, 1)',
369
+ scrollerEnd: 'rgba(255, 255, 255, 0)',
370
+ shadowSmall: '0 0 0 1px #333',
371
+ shadowMedium: '0 0 0 1px #333',
372
+ shadowLarge: '0 0 0 1px #333',
373
+ portalOpacity: 0.75
374
+ };
375
+ var font = defaultFont;
376
+ var breakpoints = defaultBreakpoints;
377
+ var layout = defaultLayout;
378
+ var themes = {
379
+ type: 'dark',
380
+ font: font,
381
+ layout: layout,
382
+ palette: palette,
383
+ breakpoints: breakpoints,
384
+ expressiveness: expressiveness
385
+ };
386
+ var darkTheme = themes;
387
+
388
+ var isObject = function isObject(target) {
389
+ return target && _typeof(target) === 'object';
390
+ };
391
+ var deepDuplicable = function deepDuplicable(source, target) {
392
+ if (!isObject(target) || !isObject(source)) return source;
393
+ var sourceKeys = Object.keys(source);
394
+ var result = {};
395
+ for (var _i = 0, _sourceKeys = sourceKeys; _i < _sourceKeys.length; _i++) {
396
+ var key = _sourceKeys[_i];
397
+ var sourceValue = source[key];
398
+ var targetValue = target[key];
399
+ if (Array.isArray(sourceValue) && Array.isArray(targetValue)) {
400
+ result[key] = targetValue.concat(sourceValue);
401
+ } else if (isObject(sourceValue) && isObject(targetValue)) {
402
+ result[key] = deepDuplicable(sourceValue, _objectSpread2({}, targetValue));
403
+ } else if (targetValue) {
404
+ result[key] = targetValue;
405
+ } else {
406
+ result[key] = sourceValue;
407
+ }
408
+ }
409
+ return result;
410
+ };
411
+ var getPresets = function getPresets() {
412
+ return [lightTheme, darkTheme];
413
+ };
414
+ var getPresetStaticTheme = function getPresetStaticTheme() {
415
+ return lightTheme;
416
+ };
417
+ var isAvailableThemeType = function isAvailableThemeType(type) {
418
+ if (!type) return false;
419
+ var presetThemes = getPresets();
420
+ var hasType = presetThemes.find(function (theme) {
421
+ return theme.type === type;
422
+ });
423
+ return !hasType;
424
+ };
425
+ var isPresetTheme = function isPresetTheme(themeOrType) {
426
+ if (!themeOrType) return false;
427
+ var isType = typeof themeOrType === 'string';
428
+ var type = isType ? themeOrType : themeOrType.type;
429
+ return !isAvailableThemeType(type);
430
+ };
431
+ var hasUserCustomTheme = function hasUserCustomTheme() {
432
+ var themes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
433
+ return !!themes.find(function (item) {
434
+ return isAvailableThemeType(item.type);
435
+ });
436
+ };
437
+ var create = function create(base, custom) {
438
+ if (!isAvailableThemeType(custom.type)) {
439
+ throw new Error('Duplicate or unavailable theme type');
440
+ }
441
+ return deepDuplicable(base, custom);
442
+ };
443
+ var createFromDark = function createFromDark(custom) {
444
+ return create(darkTheme, custom);
445
+ };
446
+ var createFromLight = function createFromLight(custom) {
447
+ return create(lightTheme, custom);
448
+ };
449
+ var Themes = {
450
+ isPresetTheme: isPresetTheme,
451
+ isAvailableThemeType: isAvailableThemeType,
452
+ hasUserCustomTheme: hasUserCustomTheme,
453
+ getPresets: getPresets,
454
+ getPresetStaticTheme: getPresetStaticTheme,
455
+ create: create,
456
+ createFromDark: createFromDark,
457
+ createFromLight: createFromLight
458
+ };
459
+ var Themes$1 = Themes;
460
+
461
+ var defaultTheme = Themes$1.getPresetStaticTheme();
462
+ var ThemeContext = /*#__PURE__*/React__default$1["default"].createContext(defaultTheme);
463
+ var useTheme$1 = function useTheme() {
464
+ return React__default$1["default"].useContext(ThemeContext);
465
+ };
466
+
467
+ var defaultAllThemesConfig = {
468
+ themes: Themes$1.getPresets()
469
+ };
470
+ var AllThemesContext = /*#__PURE__*/React__default$1["default"].createContext(defaultAllThemesConfig);
471
+
472
+ var ThemeProvider = function ThemeProvider(_ref) {
473
+ var children = _ref.children,
474
+ themeType = _ref.themeType,
475
+ _ref$themes = _ref.themes,
476
+ themes = _ref$themes === void 0 ? [] : _ref$themes;
477
+ var _useState = React$1.useState({
478
+ themes: Themes$1.getPresets()
479
+ }),
480
+ _useState2 = _slicedToArray(_useState, 2),
481
+ allThemes = _useState2[0],
482
+ setAllThemes = _useState2[1];
483
+ var currentTheme = React$1.useMemo(function () {
484
+ var theme = allThemes.themes.find(function (item) {
485
+ return item.type === themeType;
486
+ });
487
+ if (theme) return theme;
488
+ return Themes$1.getPresetStaticTheme();
489
+ }, [allThemes, themeType]);
490
+ React$1.useEffect(function () {
491
+ if (!(themes !== null && themes !== void 0 && themes.length)) return;
492
+ setAllThemes(function (last) {
493
+ var safeThemes = themes.filter(function (item) {
494
+ return Themes$1.isAvailableThemeType(item.type);
495
+ });
496
+ var nextThemes = Themes$1.getPresets().concat(safeThemes);
497
+ return _objectSpread2(_objectSpread2({}, last), {}, {
498
+ themes: nextThemes
499
+ });
500
+ });
501
+ }, [themes]);
502
+ return /*#__PURE__*/React__default$1["default"].createElement(AllThemesContext.Provider, {
503
+ value: allThemes
504
+ }, /*#__PURE__*/React__default$1["default"].createElement(ThemeContext.Provider, {
505
+ value: currentTheme
506
+ }, children));
507
+ };
508
+ var ThemeProvider$1 = ThemeProvider;
509
+
510
+ var useCurrentState = function useCurrentState(initialState) {
511
+ var _useState = React$1.useState(function () {
512
+ return typeof initialState === 'function' ? initialState() : initialState;
513
+ }),
514
+ _useState2 = _slicedToArray(_useState, 2),
515
+ state = _useState2[0],
516
+ setState = _useState2[1];
517
+ var ref = React$1.useRef(initialState);
518
+ React$1.useEffect(function () {
519
+ ref.current = state;
520
+ }, [state]);
521
+ var setValue = function setValue(val) {
522
+ var result = typeof val === 'function' ? val(ref.current) : val;
523
+ ref.current = result;
524
+ setState(result);
525
+ };
526
+ return [state, setValue, ref];
527
+ };
528
+ var useCurrentState$1 = useCurrentState;
529
+
530
+ var index = {};
531
+
532
+ var React = React__default$1["default"];
533
+
534
+ function _interopDefaultLegacy$1 (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
535
+
536
+ var React__default = /*#__PURE__*/_interopDefaultLegacy$1(React);
537
+
538
+ /*
539
+ Based on Glamor's sheet
540
+ https://github.com/threepointone/glamor/blob/667b480d31b3721a905021b26e1290ce92ca2879/src/sheet.js
541
+ */ function _defineProperties(target, props) {
542
+ for(var i = 0; i < props.length; i++){
543
+ var descriptor = props[i];
544
+ descriptor.enumerable = descriptor.enumerable || false;
545
+ descriptor.configurable = true;
546
+ if ("value" in descriptor) descriptor.writable = true;
547
+ Object.defineProperty(target, descriptor.key, descriptor);
548
+ }
549
+ }
550
+ function _createClass(Constructor, protoProps, staticProps) {
551
+ if (protoProps) _defineProperties(Constructor.prototype, protoProps);
552
+ if (staticProps) _defineProperties(Constructor, staticProps);
553
+ return Constructor;
554
+ }
555
+ var isProd = typeof process !== "undefined" && process.env && process.env.NODE_ENV === "production";
556
+ var isString = function(o) {
557
+ return Object.prototype.toString.call(o) === "[object String]";
558
+ };
559
+ var StyleSheet = /*#__PURE__*/ function() {
560
+ function StyleSheet(param) {
561
+ var ref = param === void 0 ? {} : param, _name = ref.name, name = _name === void 0 ? "stylesheet" : _name, _optimizeForSpeed = ref.optimizeForSpeed, optimizeForSpeed = _optimizeForSpeed === void 0 ? isProd : _optimizeForSpeed;
562
+ invariant$1(isString(name), "`name` must be a string");
563
+ this._name = name;
564
+ this._deletedRulePlaceholder = "#" + name + "-deleted-rule____{}";
565
+ invariant$1(typeof optimizeForSpeed === "boolean", "`optimizeForSpeed` must be a boolean");
566
+ this._optimizeForSpeed = optimizeForSpeed;
567
+ this._serverSheet = undefined;
568
+ this._tags = [];
569
+ this._injected = false;
570
+ this._rulesCount = 0;
571
+ var node = typeof window !== "undefined" && document.querySelector('meta[property="csp-nonce"]');
572
+ this._nonce = node ? node.getAttribute("content") : null;
573
+ }
574
+ var _proto = StyleSheet.prototype;
575
+ _proto.setOptimizeForSpeed = function setOptimizeForSpeed(bool) {
576
+ invariant$1(typeof bool === "boolean", "`setOptimizeForSpeed` accepts a boolean");
577
+ invariant$1(this._rulesCount === 0, "optimizeForSpeed cannot be when rules have already been inserted");
578
+ this.flush();
579
+ this._optimizeForSpeed = bool;
580
+ this.inject();
581
+ };
582
+ _proto.isOptimizeForSpeed = function isOptimizeForSpeed() {
583
+ return this._optimizeForSpeed;
584
+ };
585
+ _proto.inject = function inject() {
586
+ var _this = this;
587
+ invariant$1(!this._injected, "sheet already injected");
588
+ this._injected = true;
589
+ if (typeof window !== "undefined" && this._optimizeForSpeed) {
590
+ this._tags[0] = this.makeStyleTag(this._name);
591
+ this._optimizeForSpeed = "insertRule" in this.getSheet();
592
+ if (!this._optimizeForSpeed) {
593
+ if (!isProd) {
594
+ console.warn("StyleSheet: optimizeForSpeed mode not supported falling back to standard mode.");
595
+ }
596
+ this.flush();
597
+ this._injected = true;
598
+ }
599
+ return;
600
+ }
601
+ this._serverSheet = {
602
+ cssRules: [],
603
+ insertRule: function(rule, index) {
604
+ if (typeof index === "number") {
605
+ _this._serverSheet.cssRules[index] = {
606
+ cssText: rule
607
+ };
608
+ } else {
609
+ _this._serverSheet.cssRules.push({
610
+ cssText: rule
611
+ });
612
+ }
613
+ return index;
614
+ },
615
+ deleteRule: function(index) {
616
+ _this._serverSheet.cssRules[index] = null;
617
+ }
618
+ };
619
+ };
620
+ _proto.getSheetForTag = function getSheetForTag(tag) {
621
+ if (tag.sheet) {
622
+ return tag.sheet;
623
+ }
624
+ // this weirdness brought to you by firefox
625
+ for(var i = 0; i < document.styleSheets.length; i++){
626
+ if (document.styleSheets[i].ownerNode === tag) {
627
+ return document.styleSheets[i];
628
+ }
629
+ }
630
+ };
631
+ _proto.getSheet = function getSheet() {
632
+ return this.getSheetForTag(this._tags[this._tags.length - 1]);
633
+ };
634
+ _proto.insertRule = function insertRule(rule, index) {
635
+ invariant$1(isString(rule), "`insertRule` accepts only strings");
636
+ if (typeof window === "undefined") {
637
+ if (typeof index !== "number") {
638
+ index = this._serverSheet.cssRules.length;
639
+ }
640
+ this._serverSheet.insertRule(rule, index);
641
+ return this._rulesCount++;
642
+ }
643
+ if (this._optimizeForSpeed) {
644
+ var sheet = this.getSheet();
645
+ if (typeof index !== "number") {
646
+ index = sheet.cssRules.length;
647
+ }
648
+ // this weirdness for perf, and chrome's weird bug
649
+ // https://stackoverflow.com/questions/20007992/chrome-suddenly-stopped-accepting-insertrule
650
+ try {
651
+ sheet.insertRule(rule, index);
652
+ } catch (error) {
653
+ if (!isProd) {
654
+ console.warn("StyleSheet: illegal rule: \n\n" + rule + "\n\nSee https://stackoverflow.com/q/20007992 for more info");
655
+ }
656
+ return -1;
657
+ }
658
+ } else {
659
+ var insertionPoint = this._tags[index];
660
+ this._tags.push(this.makeStyleTag(this._name, rule, insertionPoint));
661
+ }
662
+ return this._rulesCount++;
663
+ };
664
+ _proto.replaceRule = function replaceRule(index, rule) {
665
+ if (this._optimizeForSpeed || typeof window === "undefined") {
666
+ var sheet = typeof window !== "undefined" ? this.getSheet() : this._serverSheet;
667
+ if (!rule.trim()) {
668
+ rule = this._deletedRulePlaceholder;
669
+ }
670
+ if (!sheet.cssRules[index]) {
671
+ // @TBD Should we throw an error?
672
+ return index;
673
+ }
674
+ sheet.deleteRule(index);
675
+ try {
676
+ sheet.insertRule(rule, index);
677
+ } catch (error) {
678
+ if (!isProd) {
679
+ console.warn("StyleSheet: illegal rule: \n\n" + rule + "\n\nSee https://stackoverflow.com/q/20007992 for more info");
680
+ }
681
+ // In order to preserve the indices we insert a deleteRulePlaceholder
682
+ sheet.insertRule(this._deletedRulePlaceholder, index);
683
+ }
684
+ } else {
685
+ var tag = this._tags[index];
686
+ invariant$1(tag, "old rule at index `" + index + "` not found");
687
+ tag.textContent = rule;
688
+ }
689
+ return index;
690
+ };
691
+ _proto.deleteRule = function deleteRule(index) {
692
+ if (typeof window === "undefined") {
693
+ this._serverSheet.deleteRule(index);
694
+ return;
695
+ }
696
+ if (this._optimizeForSpeed) {
697
+ this.replaceRule(index, "");
698
+ } else {
699
+ var tag = this._tags[index];
700
+ invariant$1(tag, "rule at index `" + index + "` not found");
701
+ tag.parentNode.removeChild(tag);
702
+ this._tags[index] = null;
703
+ }
704
+ };
705
+ _proto.flush = function flush() {
706
+ this._injected = false;
707
+ this._rulesCount = 0;
708
+ if (typeof window !== "undefined") {
709
+ this._tags.forEach(function(tag) {
710
+ return tag && tag.parentNode.removeChild(tag);
711
+ });
712
+ this._tags = [];
713
+ } else {
714
+ // simpler on server
715
+ this._serverSheet.cssRules = [];
716
+ }
717
+ };
718
+ _proto.cssRules = function cssRules() {
719
+ var _this = this;
720
+ if (typeof window === "undefined") {
721
+ return this._serverSheet.cssRules;
722
+ }
723
+ return this._tags.reduce(function(rules, tag) {
724
+ if (tag) {
725
+ rules = rules.concat(Array.prototype.map.call(_this.getSheetForTag(tag).cssRules, function(rule) {
726
+ return rule.cssText === _this._deletedRulePlaceholder ? null : rule;
727
+ }));
728
+ } else {
729
+ rules.push(null);
730
+ }
731
+ return rules;
732
+ }, []);
733
+ };
734
+ _proto.makeStyleTag = function makeStyleTag(name, cssString, relativeToTag) {
735
+ if (cssString) {
736
+ invariant$1(isString(cssString), "makeStyleTag accepts only strings as second parameter");
737
+ }
738
+ var tag = document.createElement("style");
739
+ if (this._nonce) tag.setAttribute("nonce", this._nonce);
740
+ tag.type = "text/css";
741
+ tag.setAttribute("data-" + name, "");
742
+ if (cssString) {
743
+ tag.appendChild(document.createTextNode(cssString));
744
+ }
745
+ var head = document.head || document.getElementsByTagName("head")[0];
746
+ if (relativeToTag) {
747
+ head.insertBefore(tag, relativeToTag);
748
+ } else {
749
+ head.appendChild(tag);
750
+ }
751
+ return tag;
752
+ };
753
+ _createClass(StyleSheet, [
754
+ {
755
+ key: "length",
756
+ get: function get() {
757
+ return this._rulesCount;
758
+ }
759
+ }
760
+ ]);
761
+ return StyleSheet;
762
+ }();
763
+ function invariant$1(condition, message) {
764
+ if (!condition) {
765
+ throw new Error("StyleSheet: " + message + ".");
766
+ }
767
+ }
768
+
769
+ function hash(str) {
770
+ var _$hash = 5381, i = str.length;
771
+ while(i){
772
+ _$hash = _$hash * 33 ^ str.charCodeAt(--i);
773
+ }
774
+ /* JavaScript does bitwise operations (like XOR, above) on 32-bit signed
775
+ * integers. Since we want the results to be always positive, convert the
776
+ * signed int to an unsigned by doing an unsigned bitshift. */ return _$hash >>> 0;
777
+ }
778
+ var stringHash = hash;
779
+
780
+ var sanitize = function(rule) {
781
+ return rule.replace(/\/style/gi, "\\/style");
782
+ };
783
+ var cache = {};
784
+ /**
785
+ * computeId
786
+ *
787
+ * Compute and memoize a jsx id from a basedId and optionally props.
788
+ */ function computeId(baseId, props) {
789
+ if (!props) {
790
+ return "jsx-" + baseId;
791
+ }
792
+ var propsToString = String(props);
793
+ var key = baseId + propsToString;
794
+ if (!cache[key]) {
795
+ cache[key] = "jsx-" + stringHash(baseId + "-" + propsToString);
796
+ }
797
+ return cache[key];
798
+ }
799
+ /**
800
+ * computeSelector
801
+ *
802
+ * Compute and memoize dynamic selectors.
803
+ */ function computeSelector(id, css) {
804
+ var selectoPlaceholderRegexp = /__jsx-style-dynamic-selector/g;
805
+ // Sanitize SSR-ed CSS.
806
+ // Client side code doesn't need to be sanitized since we use
807
+ // document.createTextNode (dev) and the CSSOM api sheet.insertRule (prod).
808
+ if (typeof window === "undefined") {
809
+ css = sanitize(css);
810
+ }
811
+ var idcss = id + css;
812
+ if (!cache[idcss]) {
813
+ cache[idcss] = css.replace(selectoPlaceholderRegexp, id);
814
+ }
815
+ return cache[idcss];
816
+ }
817
+
818
+ function mapRulesToStyle(cssRules, options) {
819
+ if (options === void 0) options = {};
820
+ return cssRules.map(function(args) {
821
+ var id = args[0];
822
+ var css = args[1];
823
+ return /*#__PURE__*/ React__default["default"].createElement("style", {
824
+ id: "__" + id,
825
+ // Avoid warnings upon render with a key
826
+ key: "__" + id,
827
+ nonce: options.nonce ? options.nonce : undefined,
828
+ dangerouslySetInnerHTML: {
829
+ __html: css
830
+ }
831
+ });
832
+ });
833
+ }
834
+ var StyleSheetRegistry = /*#__PURE__*/ function() {
835
+ function StyleSheetRegistry(param) {
836
+ var ref = param === void 0 ? {} : param, _styleSheet = ref.styleSheet, styleSheet = _styleSheet === void 0 ? null : _styleSheet, _optimizeForSpeed = ref.optimizeForSpeed, optimizeForSpeed = _optimizeForSpeed === void 0 ? false : _optimizeForSpeed;
837
+ this._sheet = styleSheet || new StyleSheet({
838
+ name: "styled-jsx",
839
+ optimizeForSpeed: optimizeForSpeed
840
+ });
841
+ this._sheet.inject();
842
+ if (styleSheet && typeof optimizeForSpeed === "boolean") {
843
+ this._sheet.setOptimizeForSpeed(optimizeForSpeed);
844
+ this._optimizeForSpeed = this._sheet.isOptimizeForSpeed();
845
+ }
846
+ this._fromServer = undefined;
847
+ this._indices = {};
848
+ this._instancesCounts = {};
849
+ }
850
+ var _proto = StyleSheetRegistry.prototype;
851
+ _proto.add = function add(props) {
852
+ var _this = this;
853
+ if (undefined === this._optimizeForSpeed) {
854
+ this._optimizeForSpeed = Array.isArray(props.children);
855
+ this._sheet.setOptimizeForSpeed(this._optimizeForSpeed);
856
+ this._optimizeForSpeed = this._sheet.isOptimizeForSpeed();
857
+ }
858
+ if (typeof window !== "undefined" && !this._fromServer) {
859
+ this._fromServer = this.selectFromServer();
860
+ this._instancesCounts = Object.keys(this._fromServer).reduce(function(acc, tagName) {
861
+ acc[tagName] = 0;
862
+ return acc;
863
+ }, {});
864
+ }
865
+ var ref = this.getIdAndRules(props), styleId = ref.styleId, rules = ref.rules;
866
+ // Deduping: just increase the instances count.
867
+ if (styleId in this._instancesCounts) {
868
+ this._instancesCounts[styleId] += 1;
869
+ return;
870
+ }
871
+ var indices = rules.map(function(rule) {
872
+ return _this._sheet.insertRule(rule);
873
+ })// Filter out invalid rules
874
+ .filter(function(index) {
875
+ return index !== -1;
876
+ });
877
+ this._indices[styleId] = indices;
878
+ this._instancesCounts[styleId] = 1;
879
+ };
880
+ _proto.remove = function remove(props) {
881
+ var _this = this;
882
+ var styleId = this.getIdAndRules(props).styleId;
883
+ invariant(styleId in this._instancesCounts, "styleId: `" + styleId + "` not found");
884
+ this._instancesCounts[styleId] -= 1;
885
+ if (this._instancesCounts[styleId] < 1) {
886
+ var tagFromServer = this._fromServer && this._fromServer[styleId];
887
+ if (tagFromServer) {
888
+ tagFromServer.parentNode.removeChild(tagFromServer);
889
+ delete this._fromServer[styleId];
890
+ } else {
891
+ this._indices[styleId].forEach(function(index) {
892
+ return _this._sheet.deleteRule(index);
893
+ });
894
+ delete this._indices[styleId];
895
+ }
896
+ delete this._instancesCounts[styleId];
897
+ }
898
+ };
899
+ _proto.update = function update(props, nextProps) {
900
+ this.add(nextProps);
901
+ this.remove(props);
902
+ };
903
+ _proto.flush = function flush() {
904
+ this._sheet.flush();
905
+ this._sheet.inject();
906
+ this._fromServer = undefined;
907
+ this._indices = {};
908
+ this._instancesCounts = {};
909
+ };
910
+ _proto.cssRules = function cssRules() {
911
+ var _this = this;
912
+ var fromServer = this._fromServer ? Object.keys(this._fromServer).map(function(styleId) {
913
+ return [
914
+ styleId,
915
+ _this._fromServer[styleId]
916
+ ];
917
+ }) : [];
918
+ var cssRules = this._sheet.cssRules();
919
+ return fromServer.concat(Object.keys(this._indices).map(function(styleId) {
920
+ return [
921
+ styleId,
922
+ _this._indices[styleId].map(function(index) {
923
+ return cssRules[index].cssText;
924
+ }).join(_this._optimizeForSpeed ? "" : "\n")
925
+ ];
926
+ })// filter out empty rules
927
+ .filter(function(rule) {
928
+ return Boolean(rule[1]);
929
+ }));
930
+ };
931
+ _proto.styles = function styles(options) {
932
+ return mapRulesToStyle(this.cssRules(), options);
933
+ };
934
+ _proto.getIdAndRules = function getIdAndRules(props) {
935
+ var css = props.children, dynamic = props.dynamic, id = props.id;
936
+ if (dynamic) {
937
+ var styleId = computeId(id, dynamic);
938
+ return {
939
+ styleId: styleId,
940
+ rules: Array.isArray(css) ? css.map(function(rule) {
941
+ return computeSelector(styleId, rule);
942
+ }) : [
943
+ computeSelector(styleId, css)
944
+ ]
945
+ };
946
+ }
947
+ return {
948
+ styleId: computeId(id),
949
+ rules: Array.isArray(css) ? css : [
950
+ css
951
+ ]
952
+ };
953
+ };
954
+ /**
955
+ * selectFromServer
956
+ *
957
+ * Collects style tags from the document with id __jsx-XXX
958
+ */ _proto.selectFromServer = function selectFromServer() {
959
+ var elements = Array.prototype.slice.call(document.querySelectorAll('[id^="__jsx-"]'));
960
+ return elements.reduce(function(acc, element) {
961
+ var id = element.id.slice(2);
962
+ acc[id] = element;
963
+ return acc;
964
+ }, {});
965
+ };
966
+ return StyleSheetRegistry;
967
+ }();
968
+ function invariant(condition, message) {
969
+ if (!condition) {
970
+ throw new Error("StyleSheetRegistry: " + message + ".");
971
+ }
972
+ }
973
+ var StyleSheetContext = /*#__PURE__*/ React.createContext(null);
974
+ StyleSheetContext.displayName = "StyleSheetContext";
975
+ function createStyleRegistry() {
976
+ return new StyleSheetRegistry();
977
+ }
978
+ function StyleRegistry(param) {
979
+ var configuredRegistry = param.registry, children = param.children;
980
+ var rootRegistry = React.useContext(StyleSheetContext);
981
+ var ref = React.useState(function() {
982
+ return rootRegistry || configuredRegistry || createStyleRegistry();
983
+ }), registry = ref[0];
984
+ return /*#__PURE__*/ React__default["default"].createElement(StyleSheetContext.Provider, {
985
+ value: registry
986
+ }, children);
987
+ }
988
+ function useStyleRegistry() {
989
+ return React.useContext(StyleSheetContext);
990
+ }
991
+
992
+ // Opt-into the new `useInsertionEffect` API in React 18, fallback to `useLayoutEffect`.
993
+ // https://github.com/reactwg/react-18/discussions/110
994
+ var useInsertionEffect = React__default["default"].useInsertionEffect || React__default["default"].useLayoutEffect;
995
+ var defaultRegistry = typeof window !== "undefined" ? createStyleRegistry() : undefined;
996
+ function JSXStyle(props) {
997
+ var registry = defaultRegistry ? defaultRegistry : useStyleRegistry();
998
+ // If `registry` does not exist, we do nothing here.
999
+ if (!registry) {
1000
+ return null;
1001
+ }
1002
+ if (typeof window === "undefined") {
1003
+ registry.add(props);
1004
+ return null;
1005
+ }
1006
+ useInsertionEffect(function() {
1007
+ registry.add(props);
1008
+ return function() {
1009
+ registry.remove(props);
1010
+ };
1011
+ // props.children can be string[], will be striped since id is identical
1012
+ }, [
1013
+ props.id,
1014
+ String(props.dynamic)
1015
+ ]);
1016
+ return null;
1017
+ }
1018
+ JSXStyle.dynamic = function(info) {
1019
+ return info.map(function(tagInfo) {
1020
+ var baseId = tagInfo[0];
1021
+ var props = tagInfo[1];
1022
+ return computeId(baseId, props);
1023
+ }).join(" ");
1024
+ };
1025
+
1026
+ index.StyleRegistry = StyleRegistry;
1027
+ index.createStyleRegistry = createStyleRegistry;
1028
+ index.style = JSXStyle;
1029
+ index.useStyleRegistry = useStyleRegistry;
1030
+
1031
+ var style = index.style;
1032
+
1033
+ var getId = function getId() {
1034
+ return Math.random().toString(32).slice(2, 10);
1035
+ };
1036
+ var isBrowser = function isBrowser() {
1037
+ return Boolean(typeof window !== 'undefined' && window.document && window.document.createElement);
1038
+ };
1039
+ var isCSSNumberValue = function isCSSNumberValue(value) {
1040
+ return value !== undefined && !Number.isNaN(+value);
1041
+ };
1042
+
1043
+ var useSSR = function useSSR() {
1044
+ var _useState = React$1.useState(false),
1045
+ _useState2 = _slicedToArray(_useState, 2),
1046
+ browser = _useState2[0],
1047
+ setBrowser = _useState2[1];
1048
+ React$1.useEffect(function () {
1049
+ setBrowser(isBrowser());
1050
+ }, []);
1051
+ return {
1052
+ isBrowser: browser,
1053
+ isServer: !browser
1054
+ };
1055
+ };
1056
+ var useSSR$1 = useSSR;
1057
+
1058
+ var createElement = function createElement(id) {
1059
+ var el = document.createElement('div');
1060
+ el.setAttribute('id', id);
1061
+ return el;
1062
+ };
1063
+ var usePortal = function usePortal() {
1064
+ var selectId = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getId();
1065
+ var getContainer = arguments.length > 1 ? arguments[1] : undefined;
1066
+ var id = "geist-ui-".concat(selectId);
1067
+ var _useSSR = useSSR$1(),
1068
+ isBrowser = _useSSR.isBrowser;
1069
+ var _useState = React$1.useState(isBrowser ? createElement(id) : null),
1070
+ _useState2 = _slicedToArray(_useState, 2),
1071
+ elSnapshot = _useState2[0],
1072
+ setElSnapshot = _useState2[1];
1073
+ React$1.useEffect(function () {
1074
+ var customContainer = getContainer ? getContainer() : null;
1075
+ var parentElement = customContainer || document.body;
1076
+ var hasElement = parentElement.querySelector("#".concat(id));
1077
+ var el = hasElement || createElement(id);
1078
+ if (!hasElement) {
1079
+ parentElement.appendChild(el);
1080
+ }
1081
+ setElSnapshot(el);
1082
+ }, []);
1083
+ return elSnapshot;
1084
+ };
1085
+ var usePortal$1 = usePortal;
1086
+
1087
+ var useTheme = useTheme$1;
1088
+
1089
+ var _excluded$4 = ["children", "className", "visible", "enterTime", "leaveTime", "clearTime", "name"];
1090
+ var CssTransition = function CssTransition(_ref) {
1091
+ var children = _ref.children,
1092
+ _ref$className = _ref.className,
1093
+ className = _ref$className === void 0 ? '' : _ref$className,
1094
+ _ref$visible = _ref.visible,
1095
+ visible = _ref$visible === void 0 ? false : _ref$visible,
1096
+ _ref$enterTime = _ref.enterTime,
1097
+ enterTime = _ref$enterTime === void 0 ? 60 : _ref$enterTime,
1098
+ _ref$leaveTime = _ref.leaveTime,
1099
+ leaveTime = _ref$leaveTime === void 0 ? 60 : _ref$leaveTime,
1100
+ _ref$clearTime = _ref.clearTime,
1101
+ clearTime = _ref$clearTime === void 0 ? 60 : _ref$clearTime,
1102
+ _ref$name = _ref.name,
1103
+ name = _ref$name === void 0 ? 'transition' : _ref$name,
1104
+ props = _objectWithoutProperties(_ref, _excluded$4);
1105
+ var _useState = React$1.useState(''),
1106
+ _useState2 = _slicedToArray(_useState, 2),
1107
+ classes = _useState2[0],
1108
+ setClasses = _useState2[1];
1109
+ var _useState3 = React$1.useState(visible),
1110
+ _useState4 = _slicedToArray(_useState3, 2),
1111
+ renderable = _useState4[0],
1112
+ setRenderable = _useState4[1];
1113
+ React$1.useEffect(function () {
1114
+ var statusClassName = visible ? 'enter' : 'leave';
1115
+ var time = visible ? enterTime : leaveTime;
1116
+ if (visible && !renderable) {
1117
+ setRenderable(true);
1118
+ }
1119
+ setClasses("".concat(name, "-").concat(statusClassName));
1120
+
1121
+ // set class to active
1122
+ var timer = setTimeout(function () {
1123
+ setClasses("".concat(name, "-").concat(statusClassName, " ").concat(name, "-").concat(statusClassName, "-active"));
1124
+ clearTimeout(timer);
1125
+ }, time);
1126
+
1127
+ // remove classess when animation over
1128
+ var clearClassesTimer = setTimeout(function () {
1129
+ if (!visible) {
1130
+ setClasses('');
1131
+ setRenderable(false);
1132
+ }
1133
+ clearTimeout(clearClassesTimer);
1134
+ }, time + clearTime);
1135
+ return function () {
1136
+ clearTimeout(timer);
1137
+ clearTimeout(clearClassesTimer);
1138
+ };
1139
+ }, [visible, renderable]);
1140
+ if (! /*#__PURE__*/React__default$1["default"].isValidElement(children) || !renderable) return null;
1141
+ var propsTransition = _objectSpread2(_objectSpread2({}, props), {}, {
1142
+ className: "".concat(children.props.className, " ").concat(className, " ").concat(classes)
1143
+ });
1144
+ return /*#__PURE__*/React__default$1["default"].cloneElement(children, propsTransition);
1145
+ };
1146
+ CssTransition.displayName = 'CssTransition';
1147
+ var CssTransition$1 = CssTransition;
1148
+
1149
+ var ScalePropKeys = ['width', 'height', 'padding', 'margin', 'w', 'h', 'paddingLeft', 'paddingRight', 'paddingTop', 'paddingBottom', 'pl', 'pr', 'pt', 'pb', 'marginLeft', 'marginRight', 'marginTop', 'marginBottom', 'ml', 'mr', 'mt', 'mb', 'px', 'py', 'mx', 'my', 'font', 'unit', 'scale'];
1150
+ var defaultDynamicLayoutPipe = function defaultDynamicLayoutPipe(scale1x) {
1151
+ return "".concat(scale1x);
1152
+ };
1153
+ var defaultContext$1 = {
1154
+ getScaleProps: function getScaleProps() {
1155
+ return undefined;
1156
+ },
1157
+ getAllScaleProps: function getAllScaleProps() {
1158
+ return {};
1159
+ },
1160
+ SCALES: {
1161
+ pl: defaultDynamicLayoutPipe,
1162
+ pr: defaultDynamicLayoutPipe,
1163
+ pb: defaultDynamicLayoutPipe,
1164
+ pt: defaultDynamicLayoutPipe,
1165
+ px: defaultDynamicLayoutPipe,
1166
+ py: defaultDynamicLayoutPipe,
1167
+ mb: defaultDynamicLayoutPipe,
1168
+ ml: defaultDynamicLayoutPipe,
1169
+ mr: defaultDynamicLayoutPipe,
1170
+ mt: defaultDynamicLayoutPipe,
1171
+ mx: defaultDynamicLayoutPipe,
1172
+ my: defaultDynamicLayoutPipe,
1173
+ width: defaultDynamicLayoutPipe,
1174
+ height: defaultDynamicLayoutPipe,
1175
+ font: defaultDynamicLayoutPipe
1176
+ },
1177
+ unit: '16px'
1178
+ };
1179
+ var ScaleContext = /*#__PURE__*/React__default$1["default"].createContext(defaultContext$1);
1180
+ var useScale$1 = function useScale() {
1181
+ return React__default$1["default"].useContext(ScaleContext);
1182
+ };
1183
+
1184
+ var generateGetScaleProps = function generateGetScaleProps(props) {
1185
+ var getScaleProps = function getScaleProps(keyOrKeys) {
1186
+ if (!Array.isArray(keyOrKeys)) return props[keyOrKeys];
1187
+ var value = undefined;
1188
+ var _iterator = _createForOfIteratorHelper(keyOrKeys),
1189
+ _step;
1190
+ try {
1191
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
1192
+ var key = _step.value;
1193
+ var currentValue = props[key];
1194
+ if (typeof currentValue !== 'undefined') {
1195
+ value = currentValue;
1196
+ }
1197
+ }
1198
+ } catch (err) {
1199
+ _iterator.e(err);
1200
+ } finally {
1201
+ _iterator.f();
1202
+ }
1203
+ return value;
1204
+ };
1205
+ return getScaleProps;
1206
+ };
1207
+ var generateGetAllScaleProps = function generateGetAllScaleProps(props) {
1208
+ var getAllScaleProps = function getAllScaleProps() {
1209
+ var scaleProps = {};
1210
+ var _iterator2 = _createForOfIteratorHelper(ScalePropKeys),
1211
+ _step2;
1212
+ try {
1213
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
1214
+ var key = _step2.value;
1215
+ var value = props[key];
1216
+ if (typeof value !== 'undefined') {
1217
+ scaleProps[key] = value;
1218
+ }
1219
+ }
1220
+ } catch (err) {
1221
+ _iterator2.e(err);
1222
+ } finally {
1223
+ _iterator2.f();
1224
+ }
1225
+ return scaleProps;
1226
+ };
1227
+ return getAllScaleProps;
1228
+ };
1229
+
1230
+ var _excluded$3 = ["children"];
1231
+ var reduceScaleCoefficient = function reduceScaleCoefficient(scale) {
1232
+ if (scale === 1) return scale;
1233
+ var diff = Math.abs((scale - 1) / 2);
1234
+ return scale > 1 ? 1 + diff : 1 - diff;
1235
+ };
1236
+ var withScale = function withScale(Render) {
1237
+ var ScaleFC = /*#__PURE__*/React$1.forwardRef(function (_ref, ref) {
1238
+ var _ref2, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9, _ref10, _ref11, _ref12, _ref13, _ref14, _ref15, _ref16, _ref17, _ref18, _ref19, _ref20, _ref21, _ref22, _ref23, _ref24, _ref25, _ref26, _ref27, _ref28, _ref29, _ref30, _ref31, _ref32, _ref33;
1239
+ var children = _ref.children,
1240
+ props = _objectWithoutProperties(_ref, _excluded$3);
1241
+ var _useTheme = useTheme(),
1242
+ layout = _useTheme.layout;
1243
+ var paddingLeft = props.paddingLeft,
1244
+ pl = props.pl,
1245
+ paddingRight = props.paddingRight,
1246
+ pr = props.pr,
1247
+ paddingTop = props.paddingTop,
1248
+ pt = props.pt,
1249
+ paddingBottom = props.paddingBottom,
1250
+ pb = props.pb,
1251
+ marginTop = props.marginTop,
1252
+ mt = props.mt,
1253
+ marginRight = props.marginRight,
1254
+ mr = props.mr,
1255
+ marginBottom = props.marginBottom,
1256
+ mb = props.mb,
1257
+ marginLeft = props.marginLeft,
1258
+ ml = props.ml,
1259
+ px = props.px,
1260
+ py = props.py,
1261
+ mx = props.mx,
1262
+ my = props.my,
1263
+ width = props.width,
1264
+ height = props.height,
1265
+ font = props.font,
1266
+ w = props.w,
1267
+ h = props.h,
1268
+ margin = props.margin,
1269
+ padding = props.padding,
1270
+ _props$unit = props.unit,
1271
+ unit = _props$unit === void 0 ? layout.unit : _props$unit,
1272
+ _props$scale = props.scale,
1273
+ scale = _props$scale === void 0 ? 1 : _props$scale;
1274
+ var makeScaleHandler = function makeScaleHandler(attrValue) {
1275
+ return function (scale1x, defaultValue) {
1276
+ // 0 means disable scale and the default value is 0
1277
+ if (scale1x === 0) {
1278
+ scale1x = 1;
1279
+ defaultValue = defaultValue || 0;
1280
+ }
1281
+ var factor = reduceScaleCoefficient(scale) * scale1x;
1282
+ if (typeof attrValue === 'undefined') {
1283
+ if (typeof defaultValue !== 'undefined') return "".concat(defaultValue);
1284
+ return "calc(".concat(factor, " * ").concat(unit, ")");
1285
+ }
1286
+ if (!isCSSNumberValue(attrValue)) return "".concat(attrValue);
1287
+ var customFactor = factor * Number(attrValue);
1288
+ return "calc(".concat(customFactor, " * ").concat(unit, ")");
1289
+ };
1290
+ };
1291
+ var value = {
1292
+ unit: unit,
1293
+ SCALES: {
1294
+ pt: makeScaleHandler((_ref2 = (_ref3 = paddingTop !== null && paddingTop !== void 0 ? paddingTop : pt) !== null && _ref3 !== void 0 ? _ref3 : py) !== null && _ref2 !== void 0 ? _ref2 : padding),
1295
+ pr: makeScaleHandler((_ref4 = (_ref5 = paddingRight !== null && paddingRight !== void 0 ? paddingRight : pr) !== null && _ref5 !== void 0 ? _ref5 : px) !== null && _ref4 !== void 0 ? _ref4 : padding),
1296
+ pb: makeScaleHandler((_ref6 = (_ref7 = paddingBottom !== null && paddingBottom !== void 0 ? paddingBottom : pb) !== null && _ref7 !== void 0 ? _ref7 : py) !== null && _ref6 !== void 0 ? _ref6 : padding),
1297
+ pl: makeScaleHandler((_ref8 = (_ref9 = paddingLeft !== null && paddingLeft !== void 0 ? paddingLeft : pl) !== null && _ref9 !== void 0 ? _ref9 : px) !== null && _ref8 !== void 0 ? _ref8 : padding),
1298
+ px: makeScaleHandler((_ref10 = (_ref11 = (_ref12 = (_ref13 = px !== null && px !== void 0 ? px : paddingLeft) !== null && _ref13 !== void 0 ? _ref13 : paddingRight) !== null && _ref12 !== void 0 ? _ref12 : pl) !== null && _ref11 !== void 0 ? _ref11 : pr) !== null && _ref10 !== void 0 ? _ref10 : padding),
1299
+ py: makeScaleHandler((_ref14 = (_ref15 = (_ref16 = (_ref17 = py !== null && py !== void 0 ? py : paddingTop) !== null && _ref17 !== void 0 ? _ref17 : paddingBottom) !== null && _ref16 !== void 0 ? _ref16 : pt) !== null && _ref15 !== void 0 ? _ref15 : pb) !== null && _ref14 !== void 0 ? _ref14 : padding),
1300
+ mt: makeScaleHandler((_ref18 = (_ref19 = marginTop !== null && marginTop !== void 0 ? marginTop : mt) !== null && _ref19 !== void 0 ? _ref19 : my) !== null && _ref18 !== void 0 ? _ref18 : margin),
1301
+ mr: makeScaleHandler((_ref20 = (_ref21 = marginRight !== null && marginRight !== void 0 ? marginRight : mr) !== null && _ref21 !== void 0 ? _ref21 : mx) !== null && _ref20 !== void 0 ? _ref20 : margin),
1302
+ mb: makeScaleHandler((_ref22 = (_ref23 = marginBottom !== null && marginBottom !== void 0 ? marginBottom : mb) !== null && _ref23 !== void 0 ? _ref23 : my) !== null && _ref22 !== void 0 ? _ref22 : margin),
1303
+ ml: makeScaleHandler((_ref24 = (_ref25 = marginLeft !== null && marginLeft !== void 0 ? marginLeft : ml) !== null && _ref25 !== void 0 ? _ref25 : mx) !== null && _ref24 !== void 0 ? _ref24 : margin),
1304
+ mx: makeScaleHandler((_ref26 = (_ref27 = (_ref28 = (_ref29 = mx !== null && mx !== void 0 ? mx : marginLeft) !== null && _ref29 !== void 0 ? _ref29 : marginRight) !== null && _ref28 !== void 0 ? _ref28 : ml) !== null && _ref27 !== void 0 ? _ref27 : mr) !== null && _ref26 !== void 0 ? _ref26 : margin),
1305
+ my: makeScaleHandler((_ref30 = (_ref31 = (_ref32 = (_ref33 = my !== null && my !== void 0 ? my : marginTop) !== null && _ref33 !== void 0 ? _ref33 : marginBottom) !== null && _ref32 !== void 0 ? _ref32 : mt) !== null && _ref31 !== void 0 ? _ref31 : mb) !== null && _ref30 !== void 0 ? _ref30 : margin),
1306
+ width: makeScaleHandler(width !== null && width !== void 0 ? width : w),
1307
+ height: makeScaleHandler(height !== null && height !== void 0 ? height : h),
1308
+ font: makeScaleHandler(font)
1309
+ },
1310
+ getScaleProps: generateGetScaleProps(props),
1311
+ getAllScaleProps: generateGetAllScaleProps(props)
1312
+ };
1313
+ return /*#__PURE__*/React__default$1["default"].createElement(ScaleContext.Provider, {
1314
+ value: value
1315
+ }, /*#__PURE__*/React__default$1["default"].createElement(Render, _extends({}, props, {
1316
+ ref: ref
1317
+ }), children));
1318
+ });
1319
+ ScaleFC.displayName = "Scale".concat(Render.displayName || 'Wrapper');
1320
+ return ScaleFC;
1321
+ };
1322
+ var withScale$1 = withScale;
1323
+
1324
+ var useScale = useScale$1;
1325
+
1326
+ var ButtonDrip = function ButtonDrip(_ref) {
1327
+ var _ref$x = _ref.x,
1328
+ x = _ref$x === void 0 ? 0 : _ref$x,
1329
+ _ref$y = _ref.y,
1330
+ y = _ref$y === void 0 ? 0 : _ref$y,
1331
+ color = _ref.color,
1332
+ onCompleted = _ref.onCompleted;
1333
+ var dripRef = React$1.useRef(null);
1334
+ /* istanbul ignore next */
1335
+ var top = Number.isNaN(+y) ? 0 : y - 10;
1336
+ /* istanbul ignore next */
1337
+ var left = Number.isNaN(+x) ? 0 : x - 10;
1338
+ React$1.useEffect(function () {
1339
+ /* istanbul ignore next */
1340
+ if (!dripRef.current) return;
1341
+ dripRef.current.addEventListener('animationend', onCompleted);
1342
+ return function () {
1343
+ /* istanbul ignore next */
1344
+ if (!dripRef.current) return;
1345
+ dripRef.current.removeEventListener('animationend', onCompleted);
1346
+ };
1347
+ });
1348
+ return /*#__PURE__*/React__default$1["default"].createElement("div", {
1349
+ ref: dripRef,
1350
+ className: "jsx-3424889537" + " " + "drip"
1351
+ }, /*#__PURE__*/React__default$1["default"].createElement("svg", {
1352
+ width: "20",
1353
+ height: "20",
1354
+ viewBox: "0 0 20 20",
1355
+ style: {
1356
+ top: top,
1357
+ left: left
1358
+ },
1359
+ className: "jsx-3424889537"
1360
+ }, /*#__PURE__*/React__default$1["default"].createElement("g", {
1361
+ stroke: "none",
1362
+ strokeWidth: "1",
1363
+ fill: "none",
1364
+ fillRule: "evenodd",
1365
+ className: "jsx-3424889537"
1366
+ }, /*#__PURE__*/React__default$1["default"].createElement("g", {
1367
+ fill: color,
1368
+ className: "jsx-3424889537"
1369
+ }, /*#__PURE__*/React__default$1["default"].createElement("rect", {
1370
+ width: "100%",
1371
+ height: "100%",
1372
+ rx: "10",
1373
+ className: "jsx-3424889537"
1374
+ })))), /*#__PURE__*/React__default$1["default"].createElement(style, {
1375
+ id: "3424889537"
1376
+ }, ".drip.jsx-3424889537{position:absolute;left:0;right:0;top:0;bottom:0;}svg.jsx-3424889537{position:absolute;-webkit-animation:350ms ease-in expand-jsx-3424889537;animation:350ms ease-in expand-jsx-3424889537;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;width:1rem;height:1rem;}@-webkit-keyframes expand-jsx-3424889537{0%{opacity:0;-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1);}30%{opacity:1;}80%{opacity:0.5;}100%{-webkit-transform:scale(28);-ms-transform:scale(28);transform:scale(28);opacity:0;}}@keyframes expand-jsx-3424889537{0%{opacity:0;-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1);}30%{opacity:1;}80%{opacity:0.5;}100%{-webkit-transform:scale(28);-ms-transform:scale(28);transform:scale(28);opacity:0;}}"));
1377
+ };
1378
+ ButtonDrip.displayName = 'ButtonDrip';
1379
+ var ButtonDrip$1 = ButtonDrip;
1380
+
1381
+ var classObjectToString = function classObjectToString(className) {
1382
+ var keys = Object.keys(className);
1383
+ var len = keys.length;
1384
+ var str = '';
1385
+ for (var index = 0; index < len; index++) {
1386
+ var key = keys[index];
1387
+ var val = className[keys[index]];
1388
+ if (!val) continue;
1389
+ str = str ? "".concat(str, " ").concat(String(key)) : String(key);
1390
+ }
1391
+ return str;
1392
+ };
1393
+ var isObjectClassName = function isObjectClassName(value) {
1394
+ return _typeof(value) === 'object' && !Array.isArray(value);
1395
+ };
1396
+ var useClasses = function useClasses() {
1397
+ var len = arguments.length;
1398
+ var classes = '';
1399
+ if (len === 0) return classes;
1400
+ for (var index = 0; index < len; index++) {
1401
+ var val = index < 0 || arguments.length <= index ? undefined : arguments[index];
1402
+ if (!val) continue;
1403
+ if (isObjectClassName(val)) {
1404
+ classes += " ".concat(classObjectToString(val));
1405
+ } else {
1406
+ classes += " ".concat(String(val).trim());
1407
+ }
1408
+ }
1409
+ return classes.trim();
1410
+ };
1411
+ var useClasses$1 = useClasses;
1412
+
1413
+ var _excluded$2 = ["children", "type", "color", "className", "spaceRatio"];
1414
+ var getIconBgColor = function getIconBgColor(type, palette, color) {
1415
+ var colors = {
1416
+ "default": palette.accents_6,
1417
+ secondary: palette.secondary,
1418
+ success: palette.success,
1419
+ warning: palette.warning,
1420
+ error: palette.error
1421
+ };
1422
+ return color ? color : colors[type];
1423
+ };
1424
+ var LoadingComponent = function LoadingComponent(_ref) {
1425
+ var children = _ref.children,
1426
+ _ref$type = _ref.type,
1427
+ type = _ref$type === void 0 ? 'default' : _ref$type,
1428
+ color = _ref.color,
1429
+ _ref$className = _ref.className,
1430
+ className = _ref$className === void 0 ? '' : _ref$className,
1431
+ _ref$spaceRatio = _ref.spaceRatio,
1432
+ spaceRatio = _ref$spaceRatio === void 0 ? 1 : _ref$spaceRatio,
1433
+ props = _objectWithoutProperties(_ref, _excluded$2);
1434
+ var theme = useTheme();
1435
+ var _useScale = useScale(),
1436
+ SCALES = _useScale.SCALES;
1437
+ var classes = useClasses$1('loading-container', className);
1438
+ var bgColor = React$1.useMemo(function () {
1439
+ return getIconBgColor(type, theme.palette, color);
1440
+ }, [type, theme.palette, color]);
1441
+ return /*#__PURE__*/React__default$1["default"].createElement("div", _extends({}, props, {
1442
+ className: style.dynamic([["2201634259", [SCALES.font(1), SCALES.width(1, '100%'), SCALES.height(1, '100%'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), theme.palette.accents_5, bgColor, spaceRatio]]]) + " " + (props && props.className != null && props.className || classes || "")
1443
+ }), /*#__PURE__*/React__default$1["default"].createElement("span", {
1444
+ className: style.dynamic([["2201634259", [SCALES.font(1), SCALES.width(1, '100%'), SCALES.height(1, '100%'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), theme.palette.accents_5, bgColor, spaceRatio]]]) + " " + "loading"
1445
+ }, children && /*#__PURE__*/React__default$1["default"].createElement("label", {
1446
+ className: style.dynamic([["2201634259", [SCALES.font(1), SCALES.width(1, '100%'), SCALES.height(1, '100%'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), theme.palette.accents_5, bgColor, spaceRatio]]])
1447
+ }, children), /*#__PURE__*/React__default$1["default"].createElement("i", {
1448
+ className: style.dynamic([["2201634259", [SCALES.font(1), SCALES.width(1, '100%'), SCALES.height(1, '100%'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), theme.palette.accents_5, bgColor, spaceRatio]]])
1449
+ }), /*#__PURE__*/React__default$1["default"].createElement("i", {
1450
+ className: style.dynamic([["2201634259", [SCALES.font(1), SCALES.width(1, '100%'), SCALES.height(1, '100%'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), theme.palette.accents_5, bgColor, spaceRatio]]])
1451
+ }), /*#__PURE__*/React__default$1["default"].createElement("i", {
1452
+ className: style.dynamic([["2201634259", [SCALES.font(1), SCALES.width(1, '100%'), SCALES.height(1, '100%'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), theme.palette.accents_5, bgColor, spaceRatio]]])
1453
+ })), /*#__PURE__*/React__default$1["default"].createElement(style, {
1454
+ id: "2201634259",
1455
+ dynamic: [SCALES.font(1), SCALES.width(1, '100%'), SCALES.height(1, '100%'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), theme.palette.accents_5, bgColor, spaceRatio]
1456
+ }, ".loading-container.__jsx-style-dynamic-selector{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;position:relative;font-size:".concat(SCALES.font(1), ";width:").concat(SCALES.width(1, '100%'), ";height:").concat(SCALES.height(1, '100%'), ";min-height:1em;padding:").concat(SCALES.pt(0), " ").concat(SCALES.pr(0), " ").concat(SCALES.pb(0), " ").concat(SCALES.pl(0), ";margin:").concat(SCALES.mt(0), " ").concat(SCALES.mr(0), " ").concat(SCALES.mb(0), " ").concat(SCALES.ml(0), ";}label.__jsx-style-dynamic-selector{margin-right:0.5em;color:").concat(theme.palette.accents_5, ";line-height:1;}label.__jsx-style-dynamic-selector *{margin:0;}.loading.__jsx-style-dynamic-selector{position:absolute;top:50%;left:50%;width:100%;height:100%;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:transparent;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}i.__jsx-style-dynamic-selector{width:0.25em;height:0.25em;border-radius:50%;background-color:").concat(bgColor, ";margin:0 calc(0.25em / 2 * ").concat(spaceRatio, ");display:inline-block;-webkit-animation:loading-blink-__jsx-style-dynamic-selector 1.4s infinite both;animation:loading-blink-__jsx-style-dynamic-selector 1.4s infinite both;}i.__jsx-style-dynamic-selector:nth-child(2){-webkit-animation-delay:0.2s;animation-delay:0.2s;}i.__jsx-style-dynamic-selector:nth-child(3){-webkit-animation-delay:0.4s;animation-delay:0.4s;}@-webkit-keyframes loading-blink-__jsx-style-dynamic-selector{0%{opacity:0.2;}20%{opacity:1;}100%{opacity:0.2;}}@keyframes loading-blink-__jsx-style-dynamic-selector{0%{opacity:0.2;}20%{opacity:1;}100%{opacity:0.2;}}")));
1457
+ };
1458
+ LoadingComponent.displayName = 'Loading';
1459
+ var Loading = withScale$1(LoadingComponent);
1460
+ var Loading$1 = Loading;
1461
+
1462
+ var ButtonLoading = function ButtonLoading(_ref) {
1463
+ var color = _ref.color;
1464
+ return /*#__PURE__*/React__default$1["default"].createElement("div", {
1465
+ className: "jsx-3416748964" + " " + "btn-loading"
1466
+ }, /*#__PURE__*/React__default$1["default"].createElement(Loading$1, {
1467
+ color: color
1468
+ }), /*#__PURE__*/React__default$1["default"].createElement(style, {
1469
+ id: "3416748964"
1470
+ }, ".btn-loading.jsx-3416748964{position:absolute;top:0;left:0;right:0;bottom:0;z-index:2;background-color:var(--geist-ui-button-bg);}"));
1471
+ };
1472
+ ButtonLoading.displayName = 'GeistButtonLoading';
1473
+ var ButtonLoading$1 = ButtonLoading;
1474
+
1475
+ var _excluded$1 = ["isRight", "isSingle", "children", "className"];
1476
+ var ButtonIcon = function ButtonIcon(_ref) {
1477
+ var _ref$isRight = _ref.isRight,
1478
+ isRight = _ref$isRight === void 0 ? false : _ref$isRight,
1479
+ isSingle = _ref.isSingle,
1480
+ children = _ref.children,
1481
+ _ref$className = _ref.className,
1482
+ className = _ref$className === void 0 ? '' : _ref$className,
1483
+ props = _objectWithoutProperties(_ref, _excluded$1);
1484
+ var classes = useClasses$1('icon', {
1485
+ right: isRight,
1486
+ single: isSingle
1487
+ }, className);
1488
+ return /*#__PURE__*/React__default$1["default"].createElement("span", _extends({}, props, {
1489
+ className: "jsx-643337184" + " " + (props && props.className != null && props.className || classes || "")
1490
+ }), children, /*#__PURE__*/React__default$1["default"].createElement(style, {
1491
+ id: "643337184"
1492
+ }, ".icon.jsx-643337184{position:absolute;left:var(--geist-ui-button-icon-padding);right:auto;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:var(--geist-ui-button-color);z-index:1;}.right.jsx-643337184{right:var(--geist-ui-button-icon-padding);left:auto;}.icon.jsx-643337184 svg{background:transparent;height:calc(var(--geist-ui-button-height) / 2.35);width:calc(var(--geist-ui-button-height) / 2.35);}.single.jsx-643337184{position:static;-webkit-transform:none;-ms-transform:none;transform:none;}"));
1493
+ };
1494
+ ButtonIcon.displayName = 'ButtonIcon';
1495
+ var ButtonIcon$1 = ButtonIcon;
1496
+
1497
+ var getButtonChildrenWithIcon = function getButtonChildrenWithIcon(auto, children, icons) {
1498
+ var icon = icons.icon,
1499
+ iconRight = icons.iconRight;
1500
+ var hasIcon = icon || iconRight;
1501
+ var isRight = Boolean(iconRight);
1502
+ var paddingForAutoMode = auto ? "calc(var(--geist-ui-button-height) / 2 + var(--geist-ui-button-icon-padding) * .5)" : 0;
1503
+ var classes = useClasses$1('text', isRight ? 'right' : 'left');
1504
+ if (!hasIcon) return /*#__PURE__*/React__default$1["default"].createElement("div", {
1505
+ className: "text"
1506
+ }, children);
1507
+ if (React__default$1["default"].Children.count(children) === 0) {
1508
+ return /*#__PURE__*/React__default$1["default"].createElement(ButtonIcon$1, {
1509
+ isRight: isRight,
1510
+ isSingle: true
1511
+ }, hasIcon);
1512
+ }
1513
+ return /*#__PURE__*/React__default$1["default"].createElement(React__default$1["default"].Fragment, null, /*#__PURE__*/React__default$1["default"].createElement(ButtonIcon$1, {
1514
+ isRight: isRight
1515
+ }, hasIcon), /*#__PURE__*/React__default$1["default"].createElement("div", {
1516
+ className: style.dynamic([["3568181479", [paddingForAutoMode, paddingForAutoMode]]]) + " " + (classes || "")
1517
+ }, children, /*#__PURE__*/React__default$1["default"].createElement(style, {
1518
+ id: "3568181479",
1519
+ dynamic: [paddingForAutoMode, paddingForAutoMode]
1520
+ }, ".left.__jsx-style-dynamic-selector{padding-left:".concat(paddingForAutoMode, ";}.right.__jsx-style-dynamic-selector{padding-right:").concat(paddingForAutoMode, ";}"))));
1521
+ };
1522
+ var filterPropsWithGroup = function filterPropsWithGroup(props, config) {
1523
+ if (!config.isButtonGroup) return props;
1524
+ return _objectSpread2(_objectSpread2({}, props), {}, {
1525
+ auto: true,
1526
+ shadow: false,
1527
+ ghost: config.ghost || props.ghost,
1528
+ type: config.type || props.type,
1529
+ disabled: config.disabled || props.disabled
1530
+ });
1531
+ };
1532
+
1533
+ var defaultContext = {
1534
+ isButtonGroup: false,
1535
+ disabled: false
1536
+ };
1537
+ var ButtonGroupContext = /*#__PURE__*/React__default$1["default"].createContext(defaultContext);
1538
+ var useButtonGroupContext = function useButtonGroupContext() {
1539
+ return React__default$1["default"].useContext(ButtonGroupContext);
1540
+ };
1541
+
1542
+ var hexToRgb = function hexToRgb(color) {
1543
+ var fullReg = /^#?([a-f\d])([a-f\d])([a-f\d])$/i;
1544
+ var full = color.replace(fullReg, function (_, r, g, b) {
1545
+ return "".concat(r).concat(r).concat(g).concat(g).concat(b).concat(b);
1546
+ });
1547
+ var values = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(full);
1548
+ if (!values) {
1549
+ throw new Error("Geist UI: Unsupported ".concat(color, " color."));
1550
+ }
1551
+ return [Number.parseInt(values[1], 16), Number.parseInt(values[2], 16), Number.parseInt(values[3], 16)];
1552
+ };
1553
+ var colorToRgbValues = function colorToRgbValues(color) {
1554
+ if (color.charAt(0) === '#') return hexToRgb(color);
1555
+ var safeColor = color.replace(/ /g, '');
1556
+ var colorType = color.substr(0, 4);
1557
+ var regArray = safeColor.match(/\((.+)\)/);
1558
+ if (!colorType.startsWith('rgb') || !regArray) {
1559
+ console.log(color);
1560
+ throw new Error("Geist UI: Only support [\"RGB\", \"RGBA\", \"HEX\"] color.");
1561
+ }
1562
+ return regArray[1].split(',').map(function (str) {
1563
+ return Number.parseFloat(str);
1564
+ });
1565
+ };
1566
+ var addColorAlpha = function addColorAlpha(color, alpha) {
1567
+ if (!/^#|rgb|RGB/.test(color)) return color;
1568
+ var _colorToRgbValues = colorToRgbValues(color),
1569
+ _colorToRgbValues2 = _slicedToArray(_colorToRgbValues, 3),
1570
+ r = _colorToRgbValues2[0],
1571
+ g = _colorToRgbValues2[1],
1572
+ b = _colorToRgbValues2[2];
1573
+ var safeAlpha = alpha > 1 ? 1 : alpha < 0 ? 0 : alpha;
1574
+ return "rgba(".concat(r, ", ").concat(g, ", ").concat(b, ", ").concat(safeAlpha, ")");
1575
+ };
1576
+
1577
+ var getButtonGhostColors = function getButtonGhostColors(palette, type) {
1578
+ var colors = {
1579
+ secondary: {
1580
+ bg: palette.background,
1581
+ border: palette.foreground,
1582
+ color: palette.foreground
1583
+ },
1584
+ success: {
1585
+ bg: palette.background,
1586
+ border: palette.success,
1587
+ color: palette.success
1588
+ },
1589
+ warning: {
1590
+ bg: palette.background,
1591
+ border: palette.warning,
1592
+ color: palette.warning
1593
+ },
1594
+ error: {
1595
+ bg: palette.background,
1596
+ border: palette.error,
1597
+ color: palette.error
1598
+ }
1599
+ };
1600
+ return colors[type] || null;
1601
+ };
1602
+ var getButtonColors = function getButtonColors(palette, props) {
1603
+ var type = props.type,
1604
+ disabled = props.disabled,
1605
+ ghost = props.ghost;
1606
+ var colors = {
1607
+ "default": {
1608
+ bg: palette.background,
1609
+ border: palette.border,
1610
+ color: palette.accents_5
1611
+ },
1612
+ secondary: {
1613
+ bg: palette.foreground,
1614
+ border: palette.foreground,
1615
+ color: palette.background
1616
+ },
1617
+ success: {
1618
+ bg: palette.success,
1619
+ border: palette.success,
1620
+ color: '#fff'
1621
+ },
1622
+ warning: {
1623
+ bg: palette.warning,
1624
+ border: palette.warning,
1625
+ color: '#fff'
1626
+ },
1627
+ error: {
1628
+ bg: palette.error,
1629
+ border: palette.error,
1630
+ color: '#fff'
1631
+ },
1632
+ abort: {
1633
+ bg: 'transparent',
1634
+ border: 'transparent',
1635
+ color: palette.accents_5
1636
+ }
1637
+ };
1638
+ if (disabled) return {
1639
+ bg: palette.accents_1,
1640
+ border: palette.accents_2,
1641
+ color: '#ccc'
1642
+ };
1643
+
1644
+ /**
1645
+ * The '-light' type is the same color as the common type,
1646
+ * only hover's color is different.
1647
+ * e.g.
1648
+ * Color['success'] === Color['success-light']
1649
+ * Color['warning'] === Color['warning-light']
1650
+ */
1651
+ var withoutLightType = type === null || type === void 0 ? void 0 : type.replace('-light', '');
1652
+ var defaultColor = colors["default"];
1653
+ if (ghost) return getButtonGhostColors(palette, withoutLightType) || defaultColor;
1654
+ return colors[withoutLightType] || defaultColor;
1655
+ };
1656
+ var getButtonGhostHoverColors = function getButtonGhostHoverColors(palette, type) {
1657
+ var colors = {
1658
+ secondary: {
1659
+ bg: palette.foreground,
1660
+ border: palette.background,
1661
+ color: palette.background
1662
+ },
1663
+ success: {
1664
+ bg: palette.success,
1665
+ border: palette.background,
1666
+ color: 'white'
1667
+ },
1668
+ warning: {
1669
+ bg: palette.warning,
1670
+ border: palette.background,
1671
+ color: 'white'
1672
+ },
1673
+ error: {
1674
+ bg: palette.error,
1675
+ border: palette.background,
1676
+ color: 'white'
1677
+ }
1678
+ };
1679
+ var withoutLightType = type.replace('-light', '');
1680
+ return colors[withoutLightType] || null;
1681
+ };
1682
+ var getButtonHoverColors = function getButtonHoverColors(palette, props) {
1683
+ var type = props.type,
1684
+ disabled = props.disabled,
1685
+ loading = props.loading,
1686
+ shadow = props.shadow,
1687
+ ghost = props.ghost;
1688
+ var defaultColor = getButtonColors(palette, props);
1689
+ var alphaBackground = addColorAlpha(defaultColor.bg, 0.85);
1690
+ var colors = {
1691
+ "default": {
1692
+ bg: palette.background,
1693
+ border: palette.foreground
1694
+ },
1695
+ secondary: {
1696
+ bg: palette.background,
1697
+ border: palette.foreground
1698
+ },
1699
+ success: {
1700
+ bg: palette.background,
1701
+ border: palette.success
1702
+ },
1703
+ warning: {
1704
+ bg: palette.background,
1705
+ border: palette.warning
1706
+ },
1707
+ error: {
1708
+ bg: palette.background,
1709
+ border: palette.error
1710
+ },
1711
+ abort: {
1712
+ bg: 'transparent',
1713
+ border: 'transparent',
1714
+ color: palette.accents_5
1715
+ },
1716
+ 'secondary-light': _objectSpread2(_objectSpread2({}, defaultColor), {}, {
1717
+ bg: alphaBackground
1718
+ }),
1719
+ 'success-light': _objectSpread2(_objectSpread2({}, defaultColor), {}, {
1720
+ bg: alphaBackground
1721
+ }),
1722
+ 'warning-light': _objectSpread2(_objectSpread2({}, defaultColor), {}, {
1723
+ bg: alphaBackground
1724
+ }),
1725
+ 'error-light': _objectSpread2(_objectSpread2({}, defaultColor), {}, {
1726
+ bg: alphaBackground
1727
+ })
1728
+ };
1729
+ if (disabled) return {
1730
+ bg: palette.accents_1,
1731
+ border: palette.accents_2,
1732
+ color: '#ccc'
1733
+ };
1734
+ if (loading) return _objectSpread2(_objectSpread2({}, defaultColor), {}, {
1735
+ color: 'transparent'
1736
+ });
1737
+ if (shadow) return defaultColor;
1738
+ var hoverColor = (ghost ? getButtonGhostHoverColors(palette, type) : colors[type]) || colors["default"];
1739
+ return _objectSpread2(_objectSpread2({}, hoverColor), {}, {
1740
+ color: hoverColor.color || hoverColor.border
1741
+ });
1742
+ };
1743
+ var getButtonCursor = function getButtonCursor(disabled, loading) {
1744
+ if (disabled) return {
1745
+ cursor: 'not-allowed',
1746
+ events: 'auto'
1747
+ };
1748
+ if (loading) return {
1749
+ cursor: 'default',
1750
+ events: 'none'
1751
+ };
1752
+ return {
1753
+ cursor: 'pointer',
1754
+ events: 'auto'
1755
+ };
1756
+ };
1757
+ var getButtonDripColor = function getButtonDripColor(palette, props) {
1758
+ var type = props.type;
1759
+ var isLightHover = type ? type.endsWith('light') : false;
1760
+ var hoverColors = getButtonHoverColors(palette, props);
1761
+ return isLightHover ? addColorAlpha(hoverColors.bg, 0.65) : addColorAlpha(palette.accents_2, 0.65);
1762
+ };
1763
+
1764
+ var _excluded = ["children", "disabled", "type", "loading", "shadow", "ghost", "effect", "onClick", "auto", "icon", "htmlType", "iconRight", "className", "crossOrigin"];
1765
+ var ButtonComponent = /*#__PURE__*/React__default$1["default"].forwardRef(function (btnProps, ref) {
1766
+ var theme = useTheme();
1767
+ var _useScale = useScale(),
1768
+ SCALES = _useScale.SCALES;
1769
+ var buttonRef = React$1.useRef(null);
1770
+ React$1.useImperativeHandle(ref, function () {
1771
+ return buttonRef.current;
1772
+ });
1773
+ var _useState = React$1.useState(false),
1774
+ _useState2 = _slicedToArray(_useState, 2),
1775
+ dripShow = _useState2[0],
1776
+ setDripShow = _useState2[1];
1777
+ var _useState3 = React$1.useState(0),
1778
+ _useState4 = _slicedToArray(_useState3, 2),
1779
+ dripX = _useState4[0],
1780
+ setDripX = _useState4[1];
1781
+ var _useState5 = React$1.useState(0),
1782
+ _useState6 = _slicedToArray(_useState5, 2),
1783
+ dripY = _useState6[0],
1784
+ setDripY = _useState6[1];
1785
+ var groupConfig = useButtonGroupContext();
1786
+ var filteredProps = filterPropsWithGroup(btnProps, groupConfig);
1787
+ /* eslint-disable @typescript-eslint/no-unused-vars */
1788
+ var children = filteredProps.children,
1789
+ _filteredProps$disabl = filteredProps.disabled,
1790
+ disabled = _filteredProps$disabl === void 0 ? false : _filteredProps$disabl;
1791
+ filteredProps.type;
1792
+ var _filteredProps$loadin = filteredProps.loading,
1793
+ loading = _filteredProps$loadin === void 0 ? false : _filteredProps$loadin,
1794
+ _filteredProps$shadow = filteredProps.shadow,
1795
+ shadow = _filteredProps$shadow === void 0 ? false : _filteredProps$shadow,
1796
+ _filteredProps$ghost = filteredProps.ghost,
1797
+ ghost = _filteredProps$ghost === void 0 ? false : _filteredProps$ghost,
1798
+ _filteredProps$effect = filteredProps.effect,
1799
+ effect = _filteredProps$effect === void 0 ? true : _filteredProps$effect,
1800
+ onClick = filteredProps.onClick,
1801
+ _filteredProps$auto = filteredProps.auto,
1802
+ auto = _filteredProps$auto === void 0 ? false : _filteredProps$auto,
1803
+ icon = filteredProps.icon,
1804
+ _filteredProps$htmlTy = filteredProps.htmlType,
1805
+ htmlType = _filteredProps$htmlTy === void 0 ? 'button' : _filteredProps$htmlTy,
1806
+ iconRight = filteredProps.iconRight,
1807
+ _filteredProps$classN = filteredProps.className,
1808
+ className = _filteredProps$classN === void 0 ? '' : _filteredProps$classN;
1809
+ filteredProps.crossOrigin;
1810
+ var props = _objectWithoutProperties(filteredProps, _excluded);
1811
+ /* eslint-enable @typescript-eslint/no-unused-vars */
1812
+
1813
+ var _useMemo = React$1.useMemo(function () {
1814
+ return getButtonColors(theme.palette, filteredProps);
1815
+ }, [theme.palette, filteredProps]),
1816
+ bg = _useMemo.bg,
1817
+ border = _useMemo.border,
1818
+ color = _useMemo.color;
1819
+ var hover = React$1.useMemo(function () {
1820
+ return getButtonHoverColors(theme.palette, filteredProps);
1821
+ }, [theme.palette, filteredProps]);
1822
+ var _useMemo2 = React$1.useMemo(function () {
1823
+ return getButtonCursor(disabled, loading);
1824
+ }, [disabled, loading]),
1825
+ cursor = _useMemo2.cursor,
1826
+ events = _useMemo2.events;
1827
+ var dripColor = React$1.useMemo(function () {
1828
+ return getButtonDripColor(theme.palette, filteredProps);
1829
+ }, [theme.palette, filteredProps]);
1830
+
1831
+ /* istanbul ignore next */
1832
+ var dripCompletedHandle = function dripCompletedHandle() {
1833
+ setDripShow(false);
1834
+ setDripX(0);
1835
+ setDripY(0);
1836
+ };
1837
+ var clickHandler = function clickHandler(event) {
1838
+ if (disabled || loading) return;
1839
+ var showDrip = !shadow && !ghost && effect;
1840
+ /* istanbul ignore next */
1841
+ if (showDrip && buttonRef.current) {
1842
+ var rect = buttonRef.current.getBoundingClientRect();
1843
+ setDripShow(true);
1844
+ setDripX(event.clientX - rect.left);
1845
+ setDripY(event.clientY - rect.top);
1846
+ }
1847
+ onClick && onClick(event);
1848
+ };
1849
+ var childrenWithIcon = React$1.useMemo(function () {
1850
+ return getButtonChildrenWithIcon(auto, children, {
1851
+ icon: icon,
1852
+ iconRight: iconRight
1853
+ });
1854
+ }, [auto, children, icon, iconRight]);
1855
+ var paddingLeft = auto ? SCALES.pl(1.15) : SCALES.pl(1.375),
1856
+ paddingRight = auto ? SCALES.pr(1.15) : SCALES.pr(1.375);
1857
+ return /*#__PURE__*/React__default$1["default"].createElement("button", _extends({
1858
+ ref: buttonRef,
1859
+ type: htmlType,
1860
+ disabled: disabled,
1861
+ onClick: clickHandler
1862
+ }, props, {
1863
+ className: style.dynamic([["86551275", [SCALES.height(2.5), theme.layout.radius, SCALES.font(0.875), color, bg, border, cursor, events, shadow ? theme.expressiveness.shadowSmall : 'none', SCALES.pl(0.727), SCALES.height(2.5), color, bg, auto ? 'min-content' : SCALES.width(10.5), auto ? 'auto' : 'initial', SCALES.height(2.5), SCALES.pt(0), paddingRight, SCALES.pb(0), paddingLeft, SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), hover.color, hover.color, hover.bg, hover.border, cursor, events, shadow ? theme.expressiveness.shadowMedium : 'none', shadow ? '-1px' : '0px']]]) + " " + (props && props.className != null && props.className || useClasses$1('btn', className) || "")
1864
+ }), loading && /*#__PURE__*/React__default$1["default"].createElement(ButtonLoading$1, {
1865
+ color: color
1866
+ }), childrenWithIcon, dripShow && /*#__PURE__*/React__default$1["default"].createElement(ButtonDrip$1, {
1867
+ x: dripX,
1868
+ y: dripY,
1869
+ color: dripColor,
1870
+ onCompleted: dripCompletedHandle
1871
+ }), /*#__PURE__*/React__default$1["default"].createElement(style, {
1872
+ id: "86551275",
1873
+ dynamic: [SCALES.height(2.5), theme.layout.radius, SCALES.font(0.875), color, bg, border, cursor, events, shadow ? theme.expressiveness.shadowSmall : 'none', SCALES.pl(0.727), SCALES.height(2.5), color, bg, auto ? 'min-content' : SCALES.width(10.5), auto ? 'auto' : 'initial', SCALES.height(2.5), SCALES.pt(0), paddingRight, SCALES.pb(0), paddingLeft, SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), hover.color, hover.color, hover.bg, hover.border, cursor, events, shadow ? theme.expressiveness.shadowMedium : 'none', shadow ? '-1px' : '0px']
1874
+ }, ".btn.__jsx-style-dynamic-selector{box-sizing:border-box;display:inline-block;line-height:".concat(SCALES.height(2.5), ";border-radius:").concat(theme.layout.radius, ";font-weight:400;font-size:").concat(SCALES.font(0.875), ";-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;outline:none;text-transform:capitalize;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;text-align:center;white-space:nowrap;-webkit-transition:background-color 200ms ease 0ms,box-shadow 200ms ease 0ms, border 200ms ease 0ms,color 200ms ease 0ms;transition:background-color 200ms ease 0ms,box-shadow 200ms ease 0ms, border 200ms ease 0ms,color 200ms ease 0ms;position:relative;overflow:hidden;color:").concat(color, ";background-color:").concat(bg, ";border:1px solid ").concat(border, ";cursor:").concat(cursor, ";pointer-events:").concat(events, ";box-shadow:").concat(shadow ? theme.expressiveness.shadowSmall : 'none', ";--geist-ui-button-icon-padding:").concat(SCALES.pl(0.727), ";--geist-ui-button-height:").concat(SCALES.height(2.5), ";--geist-ui-button-color:").concat(color, ";--geist-ui-button-bg:").concat(bg, ";min-width:").concat(auto ? 'min-content' : SCALES.width(10.5), ";width:").concat(auto ? 'auto' : 'initial', ";height:").concat(SCALES.height(2.5), ";padding:").concat(SCALES.pt(0), " ").concat(paddingRight, " ").concat(SCALES.pb(0), " ").concat(paddingLeft, ";margin:").concat(SCALES.mt(0), " ").concat(SCALES.mr(0), " ").concat(SCALES.mb(0), " ").concat(SCALES.ml(0), ";}.btn.__jsx-style-dynamic-selector:hover,.btn.__jsx-style-dynamic-selector:focus{color:").concat(hover.color, ";--geist-ui-button-color:").concat(hover.color, ";background-color:").concat(hover.bg, ";border-color:").concat(hover.border, ";cursor:").concat(cursor, ";pointer-events:").concat(events, ";box-shadow:").concat(shadow ? theme.expressiveness.shadowMedium : 'none', ";-webkit-transform:translate3d(0px,").concat(shadow ? '-1px' : '0px', ",0px);-ms-transform:translate3d(0px,").concat(shadow ? '-1px' : '0px', ",0px);transform:translate3d(0px,").concat(shadow ? '-1px' : '0px', ",0px);}.btn.__jsx-style-dynamic-selector .text{position:relative;z-index:1;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;text-align:center;line-height:inherit;top:-1px;}.btn.__jsx-style-dynamic-selector .text p,.btn.__jsx-style-dynamic-selector .text pre,.btn.__jsx-style-dynamic-selector .text div{margin:0;}")));
1875
+ });
1876
+ ButtonComponent.displayName = 'Button';
1877
+ var Button = withScale$1(ButtonComponent);
1878
+ var Button$1 = Button;
1879
+
1880
+ var tuple = function tuple() {
1881
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
1882
+ args[_key] = arguments[_key];
1883
+ }
1884
+ return args;
1885
+ };
1886
+ tuple('default', 'secondary', 'success', 'warning', 'error', 'abort', 'secondary-light', 'success-light', 'warning-light', 'error-light');
1887
+ tuple('default', 'secondary', 'success', 'warning', 'error');
1888
+ tuple('default', 'secondary', 'success', 'warning', 'error', 'dark', 'lite');
1889
+ tuple('default', 'secondary', 'success', 'warning', 'error', 'dark', 'lite', 'alert', 'purple', 'violet', 'cyan');
1890
+ tuple('default', 'silent', 'prevent');
1891
+ tuple('hover', 'click');
1892
+ tuple('top', 'topStart', 'topEnd', 'left', 'leftStart', 'leftEnd', 'bottom', 'bottomStart', 'bottomEnd', 'right', 'rightStart', 'rightEnd');
1893
+ tuple('start', 'center', 'end', 'left', 'right');
1894
+
1895
+ var makeToastActions = function makeToastActions(actions, cancelHandle) {
1896
+ var handler = function handler(event, userHandler) {
1897
+ userHandler && userHandler(event, cancelHandle);
1898
+ };
1899
+ if (!actions || !actions.length) return null;
1900
+ return actions.map(function (action, index) {
1901
+ return /*#__PURE__*/React__default$1["default"].createElement(Button$1, {
1902
+ auto: true,
1903
+ scale: 1 / 3,
1904
+ font: "13px",
1905
+ type: action.passive ? 'default' : 'secondary',
1906
+ key: "action-".concat(index),
1907
+ onClick: function onClick(event) {
1908
+ return handler(event, action.handler);
1909
+ }
1910
+ }, action.name);
1911
+ });
1912
+ };
1913
+ var getColors = function getColors(palette, type) {
1914
+ var colors = {
1915
+ "default": palette.background,
1916
+ secondary: palette.secondary,
1917
+ success: palette.success,
1918
+ warning: palette.warning,
1919
+ error: palette.error
1920
+ };
1921
+ var isDefault = !type || type === 'default';
1922
+ if (isDefault) return {
1923
+ bgColor: colors["default"],
1924
+ color: palette.foreground
1925
+ };
1926
+ /**
1927
+ * Prevent main color change in special types.
1928
+ * The color will only follow the theme when it is in the default type.
1929
+ */
1930
+ return {
1931
+ bgColor: colors[type],
1932
+ color: 'white'
1933
+ };
1934
+ };
1935
+ tuple('topLeft', 'topRight', 'bottomLeft', 'bottomRight');
1936
+ var isTopPlacement = function isTopPlacement(placement) {
1937
+ return "".concat(placement).toLowerCase().startsWith('top');
1938
+ };
1939
+ var isLeftPlacement = function isLeftPlacement(placement) {
1940
+ return "".concat(placement).toLowerCase().endsWith('left');
1941
+ };
1942
+ var getTranslateByPlacement = function getTranslateByPlacement(placement) {
1943
+ var translateInByPlacement = {
1944
+ topLeft: 'translate(-60px, -60px)',
1945
+ topRight: 'translate(60px, -60px)',
1946
+ bottomLeft: 'translate(-60px, 60px)',
1947
+ bottomRight: 'translate(60px, 60px)'
1948
+ };
1949
+ var translateOutByPlacement = {
1950
+ topLeft: 'translate(-50px, 15px) scale(0.85)',
1951
+ topRight: 'translate(50px, 15px) scale(0.85)',
1952
+ bottomLeft: 'translate(-50px, -15px) scale(0.85)',
1953
+ bottomRight: 'translate(50px, -15px) scale(0.85)'
1954
+ };
1955
+ return {
1956
+ enter: translateInByPlacement[placement],
1957
+ leave: translateOutByPlacement[placement]
1958
+ };
1959
+ };
1960
+
1961
+ var ToastItem = /*#__PURE__*/React__default$1["default"].memo(function (_ref) {
1962
+ var toast = _ref.toast,
1963
+ layout = _ref.layout;
1964
+ var theme = useTheme();
1965
+ var _useMemo = React$1.useMemo(function () {
1966
+ return getColors(theme.palette, toast.type);
1967
+ }, [theme.palette, toast.type]),
1968
+ color = _useMemo.color,
1969
+ bgColor = _useMemo.bgColor;
1970
+ var isReactNode = typeof toast.text !== 'string';
1971
+ var padding = layout.padding,
1972
+ margin = layout.margin,
1973
+ maxHeight = layout.maxHeight,
1974
+ maxWidth = layout.maxWidth,
1975
+ width = layout.width,
1976
+ placement = layout.placement;
1977
+ var _useMemo2 = React$1.useMemo(function () {
1978
+ return getTranslateByPlacement(placement);
1979
+ }, [placement]),
1980
+ enter = _useMemo2.enter,
1981
+ leave = _useMemo2.leave;
1982
+ return /*#__PURE__*/React__default$1["default"].createElement(CssTransition$1, {
1983
+ name: "toast",
1984
+ visible: toast.visible,
1985
+ clearTime: 350
1986
+ }, /*#__PURE__*/React__default$1["default"].createElement("div", {
1987
+ key: toast.id,
1988
+ className: style.dynamic([["1407001838", [width, maxWidth, maxHeight, theme.palette.foreground, bgColor, color, theme.layout.radius, theme.expressiveness.shadowSmall, theme.layout.gapHalf, enter, margin, padding, margin, padding, leave]]]) + " " + "toast"
1989
+ }, isReactNode ? toast.text : /*#__PURE__*/React__default$1["default"].createElement(React__default$1["default"].Fragment, null, /*#__PURE__*/React__default$1["default"].createElement("div", {
1990
+ className: style.dynamic([["1407001838", [width, maxWidth, maxHeight, theme.palette.foreground, bgColor, color, theme.layout.radius, theme.expressiveness.shadowSmall, theme.layout.gapHalf, enter, margin, padding, margin, padding, leave]]]) + " " + "message"
1991
+ }, toast.text), /*#__PURE__*/React__default$1["default"].createElement("div", {
1992
+ className: style.dynamic([["1407001838", [width, maxWidth, maxHeight, theme.palette.foreground, bgColor, color, theme.layout.radius, theme.expressiveness.shadowSmall, theme.layout.gapHalf, enter, margin, padding, margin, padding, leave]]]) + " " + "action"
1993
+ }, makeToastActions(toast.actions, toast.cancel))), /*#__PURE__*/React__default$1["default"].createElement(style, {
1994
+ id: "1407001838",
1995
+ dynamic: [width, maxWidth, maxHeight, theme.palette.foreground, bgColor, color, theme.layout.radius, theme.expressiveness.shadowSmall, theme.layout.gapHalf, enter, margin, padding, margin, padding, leave]
1996
+ }, ".toast.__jsx-style-dynamic-selector{width:".concat(width, ";max-width:").concat(maxWidth, ";max-height:").concat(maxHeight, ";display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:").concat(theme.palette.foreground, ";background-color:").concat(bgColor, ";color:").concat(color, ";border:0;border-radius:").concat(theme.layout.radius, ";opacity:1;box-shadow:").concat(theme.expressiveness.shadowSmall, ";-webkit-transition:all 350ms cubic-bezier(0.1,0.2,0.1,1);transition:all 350ms cubic-bezier(0.1,0.2,0.1,1);overflow:hidden;}.message.__jsx-style-dynamic-selector{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;height:100%;font-size:0.875em;display:-webkit-box;word-break:break-all;padding-right:").concat(theme.layout.gapHalf, ";overflow:hidden;max-height:100%;text-overflow:ellipsis;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-height:1.1rem;}.toast-enter.__jsx-style-dynamic-selector{opacity:0;height:0;padding:0;margin:0;-webkit-transform:").concat(enter, ";-ms-transform:").concat(enter, ";transform:").concat(enter, ";}.toast-enter-active.__jsx-style-dynamic-selector{opacity:1;height:auto;margin:").concat(margin, ";padding:").concat(padding, ";-webkit-transform:translate(0,0);-ms-transform:translate(0,0);transform:translate(0,0);}.toast-leave.__jsx-style-dynamic-selector{opacity:1;-webkit-transform:translate(0,0);-ms-transform:translate(0,0);transform:translate(0,0);height:auto;margin:").concat(margin, ";padding:").concat(padding, ";}.toast-leave-active.__jsx-style-dynamic-selector{opacity:0;-webkit-transform:").concat(leave, ";-ms-transform:").concat(leave, ";transform:").concat(leave, ";}"))));
1997
+ });
1998
+ var ToastItem$1 = ToastItem;
1999
+
2000
+ var ToastContainer = function ToastContainer() {
2001
+ var theme = useTheme();
2002
+ var portal = usePortal$1('toast');
2003
+ var _useCurrentState = useCurrentState$1(false),
2004
+ _useCurrentState2 = _slicedToArray(_useCurrentState, 3),
2005
+ setHovering = _useCurrentState2[1],
2006
+ hoveringRef = _useCurrentState2[2];
2007
+ var _useHUIContext = useHUIContext(),
2008
+ toasts = _useHUIContext.toasts,
2009
+ updateToasts = _useHUIContext.updateToasts,
2010
+ toastLayout = _useHUIContext.toastLayout,
2011
+ lastUpdateToastId = _useHUIContext.lastUpdateToastId;
2012
+ var memoizedLayout = React$1.useMemo(function () {
2013
+ return toastLayout;
2014
+ }, [toastLayout]);
2015
+ var toastElements = React$1.useMemo(function () {
2016
+ return toasts.map(function (toast) {
2017
+ return /*#__PURE__*/React__default$1["default"].createElement(ToastItem$1, {
2018
+ toast: toast,
2019
+ layout: memoizedLayout,
2020
+ key: toast._internalIdent
2021
+ });
2022
+ });
2023
+ }, [toasts, memoizedLayout]);
2024
+ var classNames = React$1.useMemo(function () {
2025
+ return useClasses$1('toasts', {
2026
+ top: isTopPlacement(toastLayout.placement),
2027
+ left: isLeftPlacement(toastLayout.placement)
2028
+ });
2029
+ }, [memoizedLayout]);
2030
+ var hoverHandler = function hoverHandler(isHovering) {
2031
+ setHovering(isHovering);
2032
+ if (isHovering) {
2033
+ return updateToasts(function (last) {
2034
+ return last.map(function (toast) {
2035
+ if (!toast.visible) return toast;
2036
+ toast._timeout && window.clearTimeout(toast._timeout);
2037
+ return _objectSpread2(_objectSpread2({}, toast), {}, {
2038
+ timeout: null
2039
+ });
2040
+ });
2041
+ });
2042
+ }
2043
+ updateToasts(function (last) {
2044
+ return last.map(function (toast, index) {
2045
+ if (!toast.visible) return toast;
2046
+ toast._timeout && window.clearTimeout(toast._timeout);
2047
+ return _objectSpread2(_objectSpread2({}, toast), {}, {
2048
+ _timeout: function () {
2049
+ var timer = window.setTimeout(function () {
2050
+ toast.cancel();
2051
+ window.clearTimeout(timer);
2052
+ }, toast.delay + index * 100);
2053
+ return timer;
2054
+ }()
2055
+ });
2056
+ });
2057
+ });
2058
+ };
2059
+ React$1.useEffect(function () {
2060
+ var index = toasts.findIndex(function (r) {
2061
+ return r._internalIdent === lastUpdateToastId;
2062
+ });
2063
+ var toast = toasts[index];
2064
+ if (!toast || toast.visible || !hoveringRef.current) return;
2065
+ var hasVisible = toasts.find(function (r, i) {
2066
+ return i < index && r.visible;
2067
+ });
2068
+ if (hasVisible || !hoveringRef.current) return;
2069
+ hoverHandler(false);
2070
+ }, [toasts, lastUpdateToastId]);
2071
+ React$1.useEffect(function () {
2072
+ var timeout = null;
2073
+ var timer = window.setInterval(function () {
2074
+ if (toasts.length === 0) return;
2075
+ timeout = window.setTimeout(function () {
2076
+ var allInvisible = !toasts.find(function (r) {
2077
+ return r.visible;
2078
+ });
2079
+ allInvisible && updateToasts(function () {
2080
+ return [];
2081
+ });
2082
+ timeout && clearTimeout(timeout);
2083
+ }, 350);
2084
+ }, 5000);
2085
+ return function () {
2086
+ timer && clearInterval(timer);
2087
+ timeout && clearTimeout(timeout);
2088
+ };
2089
+ }, [toasts]);
2090
+ if (!portal) return null;
2091
+ if (!toasts || toasts.length === 0) return null;
2092
+ return /*#__PURE__*/reactDom.createPortal( /*#__PURE__*/React__default$1["default"].createElement("div", {
2093
+ onMouseEnter: function onMouseEnter() {
2094
+ return hoverHandler(true);
2095
+ },
2096
+ onMouseLeave: function onMouseLeave() {
2097
+ return hoverHandler(false);
2098
+ },
2099
+ className: style.dynamic([["622610754", [theme.layout.gap, theme.layout.gap, theme.layout.gap, theme.layout.gap]]]) + " " + (classNames || "")
2100
+ }, toastElements, /*#__PURE__*/React__default$1["default"].createElement(style, {
2101
+ id: "622610754",
2102
+ dynamic: [theme.layout.gap, theme.layout.gap, theme.layout.gap, theme.layout.gap]
2103
+ }, ".toasts.__jsx-style-dynamic-selector{position:fixed;width:auto;max-width:100%;right:".concat(theme.layout.gap, ";bottom:").concat(theme.layout.gap, ";z-index:2000;-webkit-transition:all 400ms ease;transition:all 400ms ease;box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}.top.__jsx-style-dynamic-selector{bottom:unset;-webkit-flex-direction:column-reverse;-ms-flex-direction:column-reverse;flex-direction:column-reverse;top:").concat(theme.layout.gap, ";}.left.__jsx-style-dynamic-selector{right:unset;left:").concat(theme.layout.gap, ";}"))), portal);
2104
+ };
2105
+ var ToastContainer$1 = ToastContainer;
2106
+
2107
+ var HuiProvider = function HuiProvider(_ref) {
2108
+ var themes = _ref.themes,
2109
+ themeType = _ref.themeType,
2110
+ children = _ref.children;
2111
+ var _useState = React$1.useState(null),
2112
+ _useState2 = _slicedToArray(_useState, 2),
2113
+ lastUpdateToastId = _useState2[0],
2114
+ setLastUpdateToastId = _useState2[1];
2115
+ var _useCurrentState = useCurrentState$1([]),
2116
+ _useCurrentState2 = _slicedToArray(_useCurrentState, 3),
2117
+ toasts = _useCurrentState2[0],
2118
+ setToasts = _useCurrentState2[1],
2119
+ toastsRef = _useCurrentState2[2];
2120
+ var _useCurrentState3 = useCurrentState$1(defaultToastLayout),
2121
+ _useCurrentState4 = _slicedToArray(_useCurrentState3, 3),
2122
+ toastLayout = _useCurrentState4[0],
2123
+ setToastLayout = _useCurrentState4[1],
2124
+ toastLayoutRef = _useCurrentState4[2];
2125
+ var updateToasts = function updateToasts(fn) {
2126
+ var nextToasts = fn(toastsRef.current);
2127
+ setToasts(nextToasts);
2128
+ };
2129
+ var updateToastLayout = function updateToastLayout(fn) {
2130
+ var nextLayout = fn(toastLayoutRef.current);
2131
+ setToastLayout(nextLayout);
2132
+ };
2133
+ var updateLastToastId = function updateLastToastId(fn) {
2134
+ setLastUpdateToastId(fn());
2135
+ };
2136
+ var initialValue = React$1.useMemo(function () {
2137
+ return {
2138
+ toasts: toasts,
2139
+ toastLayout: toastLayout,
2140
+ updateToasts: updateToasts,
2141
+ lastUpdateToastId: lastUpdateToastId,
2142
+ updateToastLayout: updateToastLayout,
2143
+ updateLastToastId: updateLastToastId
2144
+ };
2145
+ }, [toasts, toastLayout, lastUpdateToastId]);
2146
+ return /*#__PURE__*/React__default$1["default"].createElement(HUIContent.Provider, {
2147
+ value: initialValue
2148
+ }, /*#__PURE__*/React__default$1["default"].createElement(ThemeProvider$1, {
2149
+ themes: themes,
2150
+ themeType: themeType
2151
+ }, children, /*#__PURE__*/React__default$1["default"].createElement(ToastContainer$1, null)));
2152
+ };
2153
+ var HuiProvider$1 = HuiProvider;
2154
+
2155
+ exports["default"] = HuiProvider$1;