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