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