@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,1176 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var React$2 = require('react');
|
|
6
|
+
var Fuse = require('fuse.js');
|
|
7
|
+
var styled = require('styled-components');
|
|
8
|
+
|
|
9
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
10
|
+
|
|
11
|
+
var React__default$1 = /*#__PURE__*/_interopDefaultLegacy(React$2);
|
|
12
|
+
var Fuse__default = /*#__PURE__*/_interopDefaultLegacy(Fuse);
|
|
13
|
+
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
14
|
+
|
|
15
|
+
function _arrayLikeToArray(r, a) {
|
|
16
|
+
(null == a || a > r.length) && (a = r.length);
|
|
17
|
+
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
18
|
+
return n;
|
|
19
|
+
}
|
|
20
|
+
function _arrayWithHoles(r) {
|
|
21
|
+
if (Array.isArray(r)) return r;
|
|
22
|
+
}
|
|
23
|
+
function _defineProperty(e, r, t) {
|
|
24
|
+
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
25
|
+
value: t,
|
|
26
|
+
enumerable: !0,
|
|
27
|
+
configurable: !0,
|
|
28
|
+
writable: !0
|
|
29
|
+
}) : e[r] = t, e;
|
|
30
|
+
}
|
|
31
|
+
function _extends() {
|
|
32
|
+
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
33
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
34
|
+
var t = arguments[e];
|
|
35
|
+
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
36
|
+
}
|
|
37
|
+
return n;
|
|
38
|
+
}, _extends.apply(null, arguments);
|
|
39
|
+
}
|
|
40
|
+
function _iterableToArrayLimit(r, l) {
|
|
41
|
+
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
42
|
+
if (null != t) {
|
|
43
|
+
var e,
|
|
44
|
+
n,
|
|
45
|
+
i,
|
|
46
|
+
u,
|
|
47
|
+
a = [],
|
|
48
|
+
f = !0,
|
|
49
|
+
o = !1;
|
|
50
|
+
try {
|
|
51
|
+
if (i = (t = t.call(r)).next, 0 === l) {
|
|
52
|
+
if (Object(t) !== t) return;
|
|
53
|
+
f = !1;
|
|
54
|
+
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
|
55
|
+
} catch (r) {
|
|
56
|
+
o = !0, n = r;
|
|
57
|
+
} finally {
|
|
58
|
+
try {
|
|
59
|
+
if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
|
|
60
|
+
} finally {
|
|
61
|
+
if (o) throw n;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
return a;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
function _nonIterableRest() {
|
|
68
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
69
|
+
}
|
|
70
|
+
function ownKeys(e, r) {
|
|
71
|
+
var t = Object.keys(e);
|
|
72
|
+
if (Object.getOwnPropertySymbols) {
|
|
73
|
+
var o = Object.getOwnPropertySymbols(e);
|
|
74
|
+
r && (o = o.filter(function (r) {
|
|
75
|
+
return Object.getOwnPropertyDescriptor(e, r).enumerable;
|
|
76
|
+
})), t.push.apply(t, o);
|
|
77
|
+
}
|
|
78
|
+
return t;
|
|
79
|
+
}
|
|
80
|
+
function _objectSpread2(e) {
|
|
81
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
82
|
+
var t = null != arguments[r] ? arguments[r] : {};
|
|
83
|
+
r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
|
|
84
|
+
_defineProperty(e, r, t[r]);
|
|
85
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
|
|
86
|
+
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
return e;
|
|
90
|
+
}
|
|
91
|
+
function _slicedToArray(r, e) {
|
|
92
|
+
return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
|
|
93
|
+
}
|
|
94
|
+
function _taggedTemplateLiteral(e, t) {
|
|
95
|
+
return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, {
|
|
96
|
+
raw: {
|
|
97
|
+
value: Object.freeze(t)
|
|
98
|
+
}
|
|
99
|
+
}));
|
|
100
|
+
}
|
|
101
|
+
function _toPrimitive(t, r) {
|
|
102
|
+
if ("object" != typeof t || !t) return t;
|
|
103
|
+
var e = t[Symbol.toPrimitive];
|
|
104
|
+
if (void 0 !== e) {
|
|
105
|
+
var i = e.call(t, r || "default");
|
|
106
|
+
if ("object" != typeof i) return i;
|
|
107
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
108
|
+
}
|
|
109
|
+
return ("string" === r ? String : Number)(t);
|
|
110
|
+
}
|
|
111
|
+
function _toPropertyKey(t) {
|
|
112
|
+
var i = _toPrimitive(t, "string");
|
|
113
|
+
return "symbol" == typeof i ? i : i + "";
|
|
114
|
+
}
|
|
115
|
+
function _unsupportedIterableToArray(r, a) {
|
|
116
|
+
if (r) {
|
|
117
|
+
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
118
|
+
var t = {}.toString.call(r).slice(8, -1);
|
|
119
|
+
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;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
var index = {};
|
|
124
|
+
|
|
125
|
+
var React$1 = React__default$1["default"];
|
|
126
|
+
|
|
127
|
+
function _interopDefaultLegacy$1 (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
128
|
+
|
|
129
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy$1(React$1);
|
|
130
|
+
|
|
131
|
+
/*
|
|
132
|
+
Based on Glamor's sheet
|
|
133
|
+
https://github.com/threepointone/glamor/blob/667b480d31b3721a905021b26e1290ce92ca2879/src/sheet.js
|
|
134
|
+
*/ function _defineProperties(target, props) {
|
|
135
|
+
for(var i = 0; i < props.length; i++){
|
|
136
|
+
var descriptor = props[i];
|
|
137
|
+
descriptor.enumerable = descriptor.enumerable || false;
|
|
138
|
+
descriptor.configurable = true;
|
|
139
|
+
if ("value" in descriptor) descriptor.writable = true;
|
|
140
|
+
Object.defineProperty(target, descriptor.key, descriptor);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
function _createClass(Constructor, protoProps, staticProps) {
|
|
144
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
145
|
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
146
|
+
return Constructor;
|
|
147
|
+
}
|
|
148
|
+
var isProd = typeof process !== "undefined" && process.env && process.env.NODE_ENV === "production";
|
|
149
|
+
var isString = function(o) {
|
|
150
|
+
return Object.prototype.toString.call(o) === "[object String]";
|
|
151
|
+
};
|
|
152
|
+
var StyleSheet = /*#__PURE__*/ function() {
|
|
153
|
+
function StyleSheet(param) {
|
|
154
|
+
var ref = param === void 0 ? {} : param, _name = ref.name, name = _name === void 0 ? "stylesheet" : _name, _optimizeForSpeed = ref.optimizeForSpeed, optimizeForSpeed = _optimizeForSpeed === void 0 ? isProd : _optimizeForSpeed;
|
|
155
|
+
invariant$1(isString(name), "`name` must be a string");
|
|
156
|
+
this._name = name;
|
|
157
|
+
this._deletedRulePlaceholder = "#" + name + "-deleted-rule____{}";
|
|
158
|
+
invariant$1(typeof optimizeForSpeed === "boolean", "`optimizeForSpeed` must be a boolean");
|
|
159
|
+
this._optimizeForSpeed = optimizeForSpeed;
|
|
160
|
+
this._serverSheet = undefined;
|
|
161
|
+
this._tags = [];
|
|
162
|
+
this._injected = false;
|
|
163
|
+
this._rulesCount = 0;
|
|
164
|
+
var node = typeof window !== "undefined" && document.querySelector('meta[property="csp-nonce"]');
|
|
165
|
+
this._nonce = node ? node.getAttribute("content") : null;
|
|
166
|
+
}
|
|
167
|
+
var _proto = StyleSheet.prototype;
|
|
168
|
+
_proto.setOptimizeForSpeed = function setOptimizeForSpeed(bool) {
|
|
169
|
+
invariant$1(typeof bool === "boolean", "`setOptimizeForSpeed` accepts a boolean");
|
|
170
|
+
invariant$1(this._rulesCount === 0, "optimizeForSpeed cannot be when rules have already been inserted");
|
|
171
|
+
this.flush();
|
|
172
|
+
this._optimizeForSpeed = bool;
|
|
173
|
+
this.inject();
|
|
174
|
+
};
|
|
175
|
+
_proto.isOptimizeForSpeed = function isOptimizeForSpeed() {
|
|
176
|
+
return this._optimizeForSpeed;
|
|
177
|
+
};
|
|
178
|
+
_proto.inject = function inject() {
|
|
179
|
+
var _this = this;
|
|
180
|
+
invariant$1(!this._injected, "sheet already injected");
|
|
181
|
+
this._injected = true;
|
|
182
|
+
if (typeof window !== "undefined" && this._optimizeForSpeed) {
|
|
183
|
+
this._tags[0] = this.makeStyleTag(this._name);
|
|
184
|
+
this._optimizeForSpeed = "insertRule" in this.getSheet();
|
|
185
|
+
if (!this._optimizeForSpeed) {
|
|
186
|
+
if (!isProd) {
|
|
187
|
+
console.warn("StyleSheet: optimizeForSpeed mode not supported falling back to standard mode.");
|
|
188
|
+
}
|
|
189
|
+
this.flush();
|
|
190
|
+
this._injected = true;
|
|
191
|
+
}
|
|
192
|
+
return;
|
|
193
|
+
}
|
|
194
|
+
this._serverSheet = {
|
|
195
|
+
cssRules: [],
|
|
196
|
+
insertRule: function(rule, index) {
|
|
197
|
+
if (typeof index === "number") {
|
|
198
|
+
_this._serverSheet.cssRules[index] = {
|
|
199
|
+
cssText: rule
|
|
200
|
+
};
|
|
201
|
+
} else {
|
|
202
|
+
_this._serverSheet.cssRules.push({
|
|
203
|
+
cssText: rule
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
return index;
|
|
207
|
+
},
|
|
208
|
+
deleteRule: function(index) {
|
|
209
|
+
_this._serverSheet.cssRules[index] = null;
|
|
210
|
+
}
|
|
211
|
+
};
|
|
212
|
+
};
|
|
213
|
+
_proto.getSheetForTag = function getSheetForTag(tag) {
|
|
214
|
+
if (tag.sheet) {
|
|
215
|
+
return tag.sheet;
|
|
216
|
+
}
|
|
217
|
+
// this weirdness brought to you by firefox
|
|
218
|
+
for(var i = 0; i < document.styleSheets.length; i++){
|
|
219
|
+
if (document.styleSheets[i].ownerNode === tag) {
|
|
220
|
+
return document.styleSheets[i];
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
};
|
|
224
|
+
_proto.getSheet = function getSheet() {
|
|
225
|
+
return this.getSheetForTag(this._tags[this._tags.length - 1]);
|
|
226
|
+
};
|
|
227
|
+
_proto.insertRule = function insertRule(rule, index) {
|
|
228
|
+
invariant$1(isString(rule), "`insertRule` accepts only strings");
|
|
229
|
+
if (typeof window === "undefined") {
|
|
230
|
+
if (typeof index !== "number") {
|
|
231
|
+
index = this._serverSheet.cssRules.length;
|
|
232
|
+
}
|
|
233
|
+
this._serverSheet.insertRule(rule, index);
|
|
234
|
+
return this._rulesCount++;
|
|
235
|
+
}
|
|
236
|
+
if (this._optimizeForSpeed) {
|
|
237
|
+
var sheet = this.getSheet();
|
|
238
|
+
if (typeof index !== "number") {
|
|
239
|
+
index = sheet.cssRules.length;
|
|
240
|
+
}
|
|
241
|
+
// this weirdness for perf, and chrome's weird bug
|
|
242
|
+
// https://stackoverflow.com/questions/20007992/chrome-suddenly-stopped-accepting-insertrule
|
|
243
|
+
try {
|
|
244
|
+
sheet.insertRule(rule, index);
|
|
245
|
+
} catch (error) {
|
|
246
|
+
if (!isProd) {
|
|
247
|
+
console.warn("StyleSheet: illegal rule: \n\n" + rule + "\n\nSee https://stackoverflow.com/q/20007992 for more info");
|
|
248
|
+
}
|
|
249
|
+
return -1;
|
|
250
|
+
}
|
|
251
|
+
} else {
|
|
252
|
+
var insertionPoint = this._tags[index];
|
|
253
|
+
this._tags.push(this.makeStyleTag(this._name, rule, insertionPoint));
|
|
254
|
+
}
|
|
255
|
+
return this._rulesCount++;
|
|
256
|
+
};
|
|
257
|
+
_proto.replaceRule = function replaceRule(index, rule) {
|
|
258
|
+
if (this._optimizeForSpeed || typeof window === "undefined") {
|
|
259
|
+
var sheet = typeof window !== "undefined" ? this.getSheet() : this._serverSheet;
|
|
260
|
+
if (!rule.trim()) {
|
|
261
|
+
rule = this._deletedRulePlaceholder;
|
|
262
|
+
}
|
|
263
|
+
if (!sheet.cssRules[index]) {
|
|
264
|
+
// @TBD Should we throw an error?
|
|
265
|
+
return index;
|
|
266
|
+
}
|
|
267
|
+
sheet.deleteRule(index);
|
|
268
|
+
try {
|
|
269
|
+
sheet.insertRule(rule, index);
|
|
270
|
+
} catch (error) {
|
|
271
|
+
if (!isProd) {
|
|
272
|
+
console.warn("StyleSheet: illegal rule: \n\n" + rule + "\n\nSee https://stackoverflow.com/q/20007992 for more info");
|
|
273
|
+
}
|
|
274
|
+
// In order to preserve the indices we insert a deleteRulePlaceholder
|
|
275
|
+
sheet.insertRule(this._deletedRulePlaceholder, index);
|
|
276
|
+
}
|
|
277
|
+
} else {
|
|
278
|
+
var tag = this._tags[index];
|
|
279
|
+
invariant$1(tag, "old rule at index `" + index + "` not found");
|
|
280
|
+
tag.textContent = rule;
|
|
281
|
+
}
|
|
282
|
+
return index;
|
|
283
|
+
};
|
|
284
|
+
_proto.deleteRule = function deleteRule(index) {
|
|
285
|
+
if (typeof window === "undefined") {
|
|
286
|
+
this._serverSheet.deleteRule(index);
|
|
287
|
+
return;
|
|
288
|
+
}
|
|
289
|
+
if (this._optimizeForSpeed) {
|
|
290
|
+
this.replaceRule(index, "");
|
|
291
|
+
} else {
|
|
292
|
+
var tag = this._tags[index];
|
|
293
|
+
invariant$1(tag, "rule at index `" + index + "` not found");
|
|
294
|
+
tag.parentNode.removeChild(tag);
|
|
295
|
+
this._tags[index] = null;
|
|
296
|
+
}
|
|
297
|
+
};
|
|
298
|
+
_proto.flush = function flush() {
|
|
299
|
+
this._injected = false;
|
|
300
|
+
this._rulesCount = 0;
|
|
301
|
+
if (typeof window !== "undefined") {
|
|
302
|
+
this._tags.forEach(function(tag) {
|
|
303
|
+
return tag && tag.parentNode.removeChild(tag);
|
|
304
|
+
});
|
|
305
|
+
this._tags = [];
|
|
306
|
+
} else {
|
|
307
|
+
// simpler on server
|
|
308
|
+
this._serverSheet.cssRules = [];
|
|
309
|
+
}
|
|
310
|
+
};
|
|
311
|
+
_proto.cssRules = function cssRules() {
|
|
312
|
+
var _this = this;
|
|
313
|
+
if (typeof window === "undefined") {
|
|
314
|
+
return this._serverSheet.cssRules;
|
|
315
|
+
}
|
|
316
|
+
return this._tags.reduce(function(rules, tag) {
|
|
317
|
+
if (tag) {
|
|
318
|
+
rules = rules.concat(Array.prototype.map.call(_this.getSheetForTag(tag).cssRules, function(rule) {
|
|
319
|
+
return rule.cssText === _this._deletedRulePlaceholder ? null : rule;
|
|
320
|
+
}));
|
|
321
|
+
} else {
|
|
322
|
+
rules.push(null);
|
|
323
|
+
}
|
|
324
|
+
return rules;
|
|
325
|
+
}, []);
|
|
326
|
+
};
|
|
327
|
+
_proto.makeStyleTag = function makeStyleTag(name, cssString, relativeToTag) {
|
|
328
|
+
if (cssString) {
|
|
329
|
+
invariant$1(isString(cssString), "makeStyleTag accepts only strings as second parameter");
|
|
330
|
+
}
|
|
331
|
+
var tag = document.createElement("style");
|
|
332
|
+
if (this._nonce) tag.setAttribute("nonce", this._nonce);
|
|
333
|
+
tag.type = "text/css";
|
|
334
|
+
tag.setAttribute("data-" + name, "");
|
|
335
|
+
if (cssString) {
|
|
336
|
+
tag.appendChild(document.createTextNode(cssString));
|
|
337
|
+
}
|
|
338
|
+
var head = document.head || document.getElementsByTagName("head")[0];
|
|
339
|
+
if (relativeToTag) {
|
|
340
|
+
head.insertBefore(tag, relativeToTag);
|
|
341
|
+
} else {
|
|
342
|
+
head.appendChild(tag);
|
|
343
|
+
}
|
|
344
|
+
return tag;
|
|
345
|
+
};
|
|
346
|
+
_createClass(StyleSheet, [
|
|
347
|
+
{
|
|
348
|
+
key: "length",
|
|
349
|
+
get: function get() {
|
|
350
|
+
return this._rulesCount;
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
]);
|
|
354
|
+
return StyleSheet;
|
|
355
|
+
}();
|
|
356
|
+
function invariant$1(condition, message) {
|
|
357
|
+
if (!condition) {
|
|
358
|
+
throw new Error("StyleSheet: " + message + ".");
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
function hash(str) {
|
|
363
|
+
var _$hash = 5381, i = str.length;
|
|
364
|
+
while(i){
|
|
365
|
+
_$hash = _$hash * 33 ^ str.charCodeAt(--i);
|
|
366
|
+
}
|
|
367
|
+
/* JavaScript does bitwise operations (like XOR, above) on 32-bit signed
|
|
368
|
+
* integers. Since we want the results to be always positive, convert the
|
|
369
|
+
* signed int to an unsigned by doing an unsigned bitshift. */ return _$hash >>> 0;
|
|
370
|
+
}
|
|
371
|
+
var stringHash = hash;
|
|
372
|
+
|
|
373
|
+
var sanitize = function(rule) {
|
|
374
|
+
return rule.replace(/\/style/gi, "\\/style");
|
|
375
|
+
};
|
|
376
|
+
var cache = {};
|
|
377
|
+
/**
|
|
378
|
+
* computeId
|
|
379
|
+
*
|
|
380
|
+
* Compute and memoize a jsx id from a basedId and optionally props.
|
|
381
|
+
*/ function computeId(baseId, props) {
|
|
382
|
+
if (!props) {
|
|
383
|
+
return "jsx-" + baseId;
|
|
384
|
+
}
|
|
385
|
+
var propsToString = String(props);
|
|
386
|
+
var key = baseId + propsToString;
|
|
387
|
+
if (!cache[key]) {
|
|
388
|
+
cache[key] = "jsx-" + stringHash(baseId + "-" + propsToString);
|
|
389
|
+
}
|
|
390
|
+
return cache[key];
|
|
391
|
+
}
|
|
392
|
+
/**
|
|
393
|
+
* computeSelector
|
|
394
|
+
*
|
|
395
|
+
* Compute and memoize dynamic selectors.
|
|
396
|
+
*/ function computeSelector(id, css) {
|
|
397
|
+
var selectoPlaceholderRegexp = /__jsx-style-dynamic-selector/g;
|
|
398
|
+
// Sanitize SSR-ed CSS.
|
|
399
|
+
// Client side code doesn't need to be sanitized since we use
|
|
400
|
+
// document.createTextNode (dev) and the CSSOM api sheet.insertRule (prod).
|
|
401
|
+
if (typeof window === "undefined") {
|
|
402
|
+
css = sanitize(css);
|
|
403
|
+
}
|
|
404
|
+
var idcss = id + css;
|
|
405
|
+
if (!cache[idcss]) {
|
|
406
|
+
cache[idcss] = css.replace(selectoPlaceholderRegexp, id);
|
|
407
|
+
}
|
|
408
|
+
return cache[idcss];
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
function mapRulesToStyle(cssRules, options) {
|
|
412
|
+
if (options === void 0) options = {};
|
|
413
|
+
return cssRules.map(function(args) {
|
|
414
|
+
var id = args[0];
|
|
415
|
+
var css = args[1];
|
|
416
|
+
return /*#__PURE__*/ React__default["default"].createElement("style", {
|
|
417
|
+
id: "__" + id,
|
|
418
|
+
// Avoid warnings upon render with a key
|
|
419
|
+
key: "__" + id,
|
|
420
|
+
nonce: options.nonce ? options.nonce : undefined,
|
|
421
|
+
dangerouslySetInnerHTML: {
|
|
422
|
+
__html: css
|
|
423
|
+
}
|
|
424
|
+
});
|
|
425
|
+
});
|
|
426
|
+
}
|
|
427
|
+
var StyleSheetRegistry = /*#__PURE__*/ function() {
|
|
428
|
+
function StyleSheetRegistry(param) {
|
|
429
|
+
var ref = param === void 0 ? {} : param, _styleSheet = ref.styleSheet, styleSheet = _styleSheet === void 0 ? null : _styleSheet, _optimizeForSpeed = ref.optimizeForSpeed, optimizeForSpeed = _optimizeForSpeed === void 0 ? false : _optimizeForSpeed;
|
|
430
|
+
this._sheet = styleSheet || new StyleSheet({
|
|
431
|
+
name: "styled-jsx",
|
|
432
|
+
optimizeForSpeed: optimizeForSpeed
|
|
433
|
+
});
|
|
434
|
+
this._sheet.inject();
|
|
435
|
+
if (styleSheet && typeof optimizeForSpeed === "boolean") {
|
|
436
|
+
this._sheet.setOptimizeForSpeed(optimizeForSpeed);
|
|
437
|
+
this._optimizeForSpeed = this._sheet.isOptimizeForSpeed();
|
|
438
|
+
}
|
|
439
|
+
this._fromServer = undefined;
|
|
440
|
+
this._indices = {};
|
|
441
|
+
this._instancesCounts = {};
|
|
442
|
+
}
|
|
443
|
+
var _proto = StyleSheetRegistry.prototype;
|
|
444
|
+
_proto.add = function add(props) {
|
|
445
|
+
var _this = this;
|
|
446
|
+
if (undefined === this._optimizeForSpeed) {
|
|
447
|
+
this._optimizeForSpeed = Array.isArray(props.children);
|
|
448
|
+
this._sheet.setOptimizeForSpeed(this._optimizeForSpeed);
|
|
449
|
+
this._optimizeForSpeed = this._sheet.isOptimizeForSpeed();
|
|
450
|
+
}
|
|
451
|
+
if (typeof window !== "undefined" && !this._fromServer) {
|
|
452
|
+
this._fromServer = this.selectFromServer();
|
|
453
|
+
this._instancesCounts = Object.keys(this._fromServer).reduce(function(acc, tagName) {
|
|
454
|
+
acc[tagName] = 0;
|
|
455
|
+
return acc;
|
|
456
|
+
}, {});
|
|
457
|
+
}
|
|
458
|
+
var ref = this.getIdAndRules(props), styleId = ref.styleId, rules = ref.rules;
|
|
459
|
+
// Deduping: just increase the instances count.
|
|
460
|
+
if (styleId in this._instancesCounts) {
|
|
461
|
+
this._instancesCounts[styleId] += 1;
|
|
462
|
+
return;
|
|
463
|
+
}
|
|
464
|
+
var indices = rules.map(function(rule) {
|
|
465
|
+
return _this._sheet.insertRule(rule);
|
|
466
|
+
})// Filter out invalid rules
|
|
467
|
+
.filter(function(index) {
|
|
468
|
+
return index !== -1;
|
|
469
|
+
});
|
|
470
|
+
this._indices[styleId] = indices;
|
|
471
|
+
this._instancesCounts[styleId] = 1;
|
|
472
|
+
};
|
|
473
|
+
_proto.remove = function remove(props) {
|
|
474
|
+
var _this = this;
|
|
475
|
+
var styleId = this.getIdAndRules(props).styleId;
|
|
476
|
+
invariant(styleId in this._instancesCounts, "styleId: `" + styleId + "` not found");
|
|
477
|
+
this._instancesCounts[styleId] -= 1;
|
|
478
|
+
if (this._instancesCounts[styleId] < 1) {
|
|
479
|
+
var tagFromServer = this._fromServer && this._fromServer[styleId];
|
|
480
|
+
if (tagFromServer) {
|
|
481
|
+
tagFromServer.parentNode.removeChild(tagFromServer);
|
|
482
|
+
delete this._fromServer[styleId];
|
|
483
|
+
} else {
|
|
484
|
+
this._indices[styleId].forEach(function(index) {
|
|
485
|
+
return _this._sheet.deleteRule(index);
|
|
486
|
+
});
|
|
487
|
+
delete this._indices[styleId];
|
|
488
|
+
}
|
|
489
|
+
delete this._instancesCounts[styleId];
|
|
490
|
+
}
|
|
491
|
+
};
|
|
492
|
+
_proto.update = function update(props, nextProps) {
|
|
493
|
+
this.add(nextProps);
|
|
494
|
+
this.remove(props);
|
|
495
|
+
};
|
|
496
|
+
_proto.flush = function flush() {
|
|
497
|
+
this._sheet.flush();
|
|
498
|
+
this._sheet.inject();
|
|
499
|
+
this._fromServer = undefined;
|
|
500
|
+
this._indices = {};
|
|
501
|
+
this._instancesCounts = {};
|
|
502
|
+
};
|
|
503
|
+
_proto.cssRules = function cssRules() {
|
|
504
|
+
var _this = this;
|
|
505
|
+
var fromServer = this._fromServer ? Object.keys(this._fromServer).map(function(styleId) {
|
|
506
|
+
return [
|
|
507
|
+
styleId,
|
|
508
|
+
_this._fromServer[styleId]
|
|
509
|
+
];
|
|
510
|
+
}) : [];
|
|
511
|
+
var cssRules = this._sheet.cssRules();
|
|
512
|
+
return fromServer.concat(Object.keys(this._indices).map(function(styleId) {
|
|
513
|
+
return [
|
|
514
|
+
styleId,
|
|
515
|
+
_this._indices[styleId].map(function(index) {
|
|
516
|
+
return cssRules[index].cssText;
|
|
517
|
+
}).join(_this._optimizeForSpeed ? "" : "\n")
|
|
518
|
+
];
|
|
519
|
+
})// filter out empty rules
|
|
520
|
+
.filter(function(rule) {
|
|
521
|
+
return Boolean(rule[1]);
|
|
522
|
+
}));
|
|
523
|
+
};
|
|
524
|
+
_proto.styles = function styles(options) {
|
|
525
|
+
return mapRulesToStyle(this.cssRules(), options);
|
|
526
|
+
};
|
|
527
|
+
_proto.getIdAndRules = function getIdAndRules(props) {
|
|
528
|
+
var css = props.children, dynamic = props.dynamic, id = props.id;
|
|
529
|
+
if (dynamic) {
|
|
530
|
+
var styleId = computeId(id, dynamic);
|
|
531
|
+
return {
|
|
532
|
+
styleId: styleId,
|
|
533
|
+
rules: Array.isArray(css) ? css.map(function(rule) {
|
|
534
|
+
return computeSelector(styleId, rule);
|
|
535
|
+
}) : [
|
|
536
|
+
computeSelector(styleId, css)
|
|
537
|
+
]
|
|
538
|
+
};
|
|
539
|
+
}
|
|
540
|
+
return {
|
|
541
|
+
styleId: computeId(id),
|
|
542
|
+
rules: Array.isArray(css) ? css : [
|
|
543
|
+
css
|
|
544
|
+
]
|
|
545
|
+
};
|
|
546
|
+
};
|
|
547
|
+
/**
|
|
548
|
+
* selectFromServer
|
|
549
|
+
*
|
|
550
|
+
* Collects style tags from the document with id __jsx-XXX
|
|
551
|
+
*/ _proto.selectFromServer = function selectFromServer() {
|
|
552
|
+
var elements = Array.prototype.slice.call(document.querySelectorAll('[id^="__jsx-"]'));
|
|
553
|
+
return elements.reduce(function(acc, element) {
|
|
554
|
+
var id = element.id.slice(2);
|
|
555
|
+
acc[id] = element;
|
|
556
|
+
return acc;
|
|
557
|
+
}, {});
|
|
558
|
+
};
|
|
559
|
+
return StyleSheetRegistry;
|
|
560
|
+
}();
|
|
561
|
+
function invariant(condition, message) {
|
|
562
|
+
if (!condition) {
|
|
563
|
+
throw new Error("StyleSheetRegistry: " + message + ".");
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
var StyleSheetContext = /*#__PURE__*/ React$1.createContext(null);
|
|
567
|
+
StyleSheetContext.displayName = "StyleSheetContext";
|
|
568
|
+
function createStyleRegistry() {
|
|
569
|
+
return new StyleSheetRegistry();
|
|
570
|
+
}
|
|
571
|
+
function StyleRegistry(param) {
|
|
572
|
+
var configuredRegistry = param.registry, children = param.children;
|
|
573
|
+
var rootRegistry = React$1.useContext(StyleSheetContext);
|
|
574
|
+
var ref = React$1.useState(function() {
|
|
575
|
+
return rootRegistry || configuredRegistry || createStyleRegistry();
|
|
576
|
+
}), registry = ref[0];
|
|
577
|
+
return /*#__PURE__*/ React__default["default"].createElement(StyleSheetContext.Provider, {
|
|
578
|
+
value: registry
|
|
579
|
+
}, children);
|
|
580
|
+
}
|
|
581
|
+
function useStyleRegistry() {
|
|
582
|
+
return React$1.useContext(StyleSheetContext);
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
// Opt-into the new `useInsertionEffect` API in React 18, fallback to `useLayoutEffect`.
|
|
586
|
+
// https://github.com/reactwg/react-18/discussions/110
|
|
587
|
+
var useInsertionEffect = React__default["default"].useInsertionEffect || React__default["default"].useLayoutEffect;
|
|
588
|
+
var defaultRegistry = typeof window !== "undefined" ? createStyleRegistry() : undefined;
|
|
589
|
+
function JSXStyle(props) {
|
|
590
|
+
var registry = defaultRegistry ? defaultRegistry : useStyleRegistry();
|
|
591
|
+
// If `registry` does not exist, we do nothing here.
|
|
592
|
+
if (!registry) {
|
|
593
|
+
return null;
|
|
594
|
+
}
|
|
595
|
+
if (typeof window === "undefined") {
|
|
596
|
+
registry.add(props);
|
|
597
|
+
return null;
|
|
598
|
+
}
|
|
599
|
+
useInsertionEffect(function() {
|
|
600
|
+
registry.add(props);
|
|
601
|
+
return function() {
|
|
602
|
+
registry.remove(props);
|
|
603
|
+
};
|
|
604
|
+
// props.children can be string[], will be striped since id is identical
|
|
605
|
+
}, [
|
|
606
|
+
props.id,
|
|
607
|
+
String(props.dynamic)
|
|
608
|
+
]);
|
|
609
|
+
return null;
|
|
610
|
+
}
|
|
611
|
+
JSXStyle.dynamic = function(info) {
|
|
612
|
+
return info.map(function(tagInfo) {
|
|
613
|
+
var baseId = tagInfo[0];
|
|
614
|
+
var props = tagInfo[1];
|
|
615
|
+
return computeId(baseId, props);
|
|
616
|
+
}).join(" ");
|
|
617
|
+
};
|
|
618
|
+
|
|
619
|
+
index.StyleRegistry = StyleRegistry;
|
|
620
|
+
index.createStyleRegistry = createStyleRegistry;
|
|
621
|
+
index.style = JSXStyle;
|
|
622
|
+
index.useStyleRegistry = useStyleRegistry;
|
|
623
|
+
|
|
624
|
+
var style = index.style;
|
|
625
|
+
|
|
626
|
+
var _JSXStyle = style;
|
|
627
|
+
|
|
628
|
+
var defaultTheme = {
|
|
629
|
+
height: '44px',
|
|
630
|
+
border: '1px solid #dfe1e5',
|
|
631
|
+
borderRadius: '24px',
|
|
632
|
+
backgroundColor: 'white',
|
|
633
|
+
boxShadow: 'rgba(32, 33, 36, 0.28) 0px 1px 6px 0px',
|
|
634
|
+
hoverBackgroundColor: '#eee',
|
|
635
|
+
color: '#212121',
|
|
636
|
+
fontSize: '16px',
|
|
637
|
+
fontFamily: 'Arial',
|
|
638
|
+
iconColor: 'grey',
|
|
639
|
+
lineColor: 'rgb(232, 234, 237)',
|
|
640
|
+
placeholderColor: 'grey',
|
|
641
|
+
zIndex: 0,
|
|
642
|
+
clearIconMargin: '3px 14px 0 0',
|
|
643
|
+
searchIconMargin: '0 0 0 16px'
|
|
644
|
+
};
|
|
645
|
+
var defaultFuseOptions = {
|
|
646
|
+
shouldSort: true,
|
|
647
|
+
threshold: 0.6,
|
|
648
|
+
location: 0,
|
|
649
|
+
distance: 100,
|
|
650
|
+
minMatchCharLength: 1,
|
|
651
|
+
keys: ['name']
|
|
652
|
+
};
|
|
653
|
+
|
|
654
|
+
function debounce(func, wait, immediate) {
|
|
655
|
+
var timeout;
|
|
656
|
+
return function () {
|
|
657
|
+
var context = this;
|
|
658
|
+
var args = arguments;
|
|
659
|
+
var later = function later() {
|
|
660
|
+
timeout = null;
|
|
661
|
+
if (!immediate) func.apply(context, args);
|
|
662
|
+
};
|
|
663
|
+
if (immediate && !timeout) func.apply(context, args);
|
|
664
|
+
timeout && clearTimeout(timeout);
|
|
665
|
+
timeout = setTimeout(later, wait);
|
|
666
|
+
};
|
|
667
|
+
}
|
|
668
|
+
|
|
669
|
+
var _templateObject$3;
|
|
670
|
+
var SearchIcon = function SearchIcon(_ref) {
|
|
671
|
+
var showIcon = _ref.showIcon;
|
|
672
|
+
if (!showIcon) {
|
|
673
|
+
return null;
|
|
674
|
+
}
|
|
675
|
+
return /*#__PURE__*/React.createElement(StyledSearchIcon, {
|
|
676
|
+
className: "search-icon",
|
|
677
|
+
width: 20,
|
|
678
|
+
height: 20,
|
|
679
|
+
focusable: "false",
|
|
680
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
681
|
+
viewBox: "0 0 24 24"
|
|
682
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
683
|
+
d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"
|
|
684
|
+
}));
|
|
685
|
+
};
|
|
686
|
+
var StyledSearchIcon = styled__default["default"].svg(_templateObject$3 || (_templateObject$3 = _taggedTemplateLiteral(["\n flex-shrink: 0;\n margin: ", ";\n fill: ", ";\n"])), function (props) {
|
|
687
|
+
return props.theme.searchIconMargin;
|
|
688
|
+
}, function (props) {
|
|
689
|
+
return props.theme.iconColor;
|
|
690
|
+
});
|
|
691
|
+
|
|
692
|
+
var _templateObject$2;
|
|
693
|
+
function Results(_ref) {
|
|
694
|
+
var _ref$results = _ref.results,
|
|
695
|
+
results = _ref$results === void 0 ? [] : _ref$results,
|
|
696
|
+
onClick = _ref.onClick,
|
|
697
|
+
setSearchString = _ref.setSearchString,
|
|
698
|
+
showIcon = _ref.showIcon,
|
|
699
|
+
maxResults = _ref.maxResults,
|
|
700
|
+
_ref$resultStringKeyN = _ref.resultStringKeyName,
|
|
701
|
+
resultStringKeyName = _ref$resultStringKeyN === void 0 ? 'name' : _ref$resultStringKeyN,
|
|
702
|
+
highlightedItem = _ref.highlightedItem,
|
|
703
|
+
setHighlightedItem = _ref.setHighlightedItem,
|
|
704
|
+
formatResult = _ref.formatResult,
|
|
705
|
+
_ref$showNoResultsFla = _ref.showNoResultsFlag,
|
|
706
|
+
showNoResultsFlag = _ref$showNoResultsFla === void 0 ? true : _ref$showNoResultsFla,
|
|
707
|
+
_ref$showNoResultsTex = _ref.showNoResultsText,
|
|
708
|
+
showNoResultsText = _ref$showNoResultsTex === void 0 ? 'No results' : _ref$showNoResultsTex;
|
|
709
|
+
var formatResultWithKey = formatResult ? formatResult : function (item) {
|
|
710
|
+
return item[resultStringKeyName];
|
|
711
|
+
};
|
|
712
|
+
var handleClick = function handleClick(result) {
|
|
713
|
+
onClick(result);
|
|
714
|
+
setSearchString(result[resultStringKeyName]);
|
|
715
|
+
};
|
|
716
|
+
var handleMouseDown = function handleMouseDown(_ref2) {
|
|
717
|
+
var event = _ref2.event,
|
|
718
|
+
result = _ref2.result;
|
|
719
|
+
if (event.button === 0) {
|
|
720
|
+
event.preventDefault();
|
|
721
|
+
handleClick(result);
|
|
722
|
+
}
|
|
723
|
+
};
|
|
724
|
+
if (showNoResultsFlag) {
|
|
725
|
+
return /*#__PURE__*/React.createElement(ResultsWrapper, null, /*#__PURE__*/React.createElement("li", {
|
|
726
|
+
"data-test": "no-results-message"
|
|
727
|
+
}, /*#__PURE__*/React.createElement(SearchIcon, {
|
|
728
|
+
showIcon: showIcon
|
|
729
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
730
|
+
className: "ellipsis"
|
|
731
|
+
}, showNoResultsText)));
|
|
732
|
+
}
|
|
733
|
+
if ((results === null || results === void 0 ? void 0 : results.length) <= 0 && !showNoResultsFlag) {
|
|
734
|
+
return null;
|
|
735
|
+
}
|
|
736
|
+
return /*#__PURE__*/React.createElement(ResultsWrapper, null, results.slice(0, maxResults).map(function (result, index) {
|
|
737
|
+
return /*#__PURE__*/React.createElement("li", {
|
|
738
|
+
className: highlightedItem === index ? 'selected' : '',
|
|
739
|
+
onMouseEnter: function onMouseEnter() {
|
|
740
|
+
return setHighlightedItem({
|
|
741
|
+
index: index
|
|
742
|
+
});
|
|
743
|
+
},
|
|
744
|
+
"data-test": "result",
|
|
745
|
+
key: "rsa-result-".concat(result.id),
|
|
746
|
+
onMouseDown: function onMouseDown(event) {
|
|
747
|
+
return handleMouseDown({
|
|
748
|
+
event: event,
|
|
749
|
+
result: result
|
|
750
|
+
});
|
|
751
|
+
},
|
|
752
|
+
onClick: function onClick() {
|
|
753
|
+
return handleClick(result);
|
|
754
|
+
}
|
|
755
|
+
}, /*#__PURE__*/React.createElement(SearchIcon, {
|
|
756
|
+
showIcon: showIcon
|
|
757
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
758
|
+
className: "ellipsis",
|
|
759
|
+
title: result[resultStringKeyName]
|
|
760
|
+
}, formatResultWithKey(result)));
|
|
761
|
+
}));
|
|
762
|
+
}
|
|
763
|
+
var ResultsWrapper = function ResultsWrapper(_ref3) {
|
|
764
|
+
var children = _ref3.children;
|
|
765
|
+
return /*#__PURE__*/React.createElement(StyledResults, null, /*#__PURE__*/React.createElement("div", {
|
|
766
|
+
className: "line"
|
|
767
|
+
}), /*#__PURE__*/React.createElement("ul", null, children));
|
|
768
|
+
};
|
|
769
|
+
var StyledResults = styled__default["default"].div(_templateObject$2 || (_templateObject$2 = _taggedTemplateLiteral(["\n > div.line {\n border-top-color: ", ";\n border-top-style: solid;\n border-top-width: 1px;\n\n margin-bottom: 0px;\n margin-left: 14px;\n margin-right: 20px;\n margin-top: 0px;\n\n padding-bottom: 4px;\n }\n\n > ul {\n list-style-type: none;\n margin: 0;\n padding: 0px 0 16px 0;\n max-height: ", ";\n\n > li {\n display: flex;\n align-items: center;\n padding: 4px 0 4px 0;\n\n > div {\n margin-left: 13px;\n }\n }\n }\n\n .ellipsis {\n text-align: left;\n width: 100%;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n .selected {\n background-color: ", ";\n }\n"])), function (props) {
|
|
770
|
+
return props.theme.lineColor;
|
|
771
|
+
}, function (props) {
|
|
772
|
+
return props.theme.maxHeight;
|
|
773
|
+
}, function (props) {
|
|
774
|
+
return props.theme.hoverBackgroundColor;
|
|
775
|
+
});
|
|
776
|
+
|
|
777
|
+
var _templateObject$1;
|
|
778
|
+
var ClearIcon = function ClearIcon(_ref) {
|
|
779
|
+
var showClear = _ref.showClear,
|
|
780
|
+
setSearchString = _ref.setSearchString,
|
|
781
|
+
searchString = _ref.searchString,
|
|
782
|
+
setFocus = _ref.setFocus,
|
|
783
|
+
onClear = _ref.onClear;
|
|
784
|
+
var handleClearSearchString = function handleClearSearchString() {
|
|
785
|
+
setSearchString({
|
|
786
|
+
target: {
|
|
787
|
+
value: ''
|
|
788
|
+
}
|
|
789
|
+
});
|
|
790
|
+
setFocus();
|
|
791
|
+
onClear();
|
|
792
|
+
};
|
|
793
|
+
if (!showClear) {
|
|
794
|
+
return null;
|
|
795
|
+
}
|
|
796
|
+
if (!searchString || (searchString === null || searchString === void 0 ? void 0 : searchString.length) <= 0) {
|
|
797
|
+
return null;
|
|
798
|
+
}
|
|
799
|
+
return /*#__PURE__*/React.createElement(StyledClearIcon, {
|
|
800
|
+
className: "clear-icon",
|
|
801
|
+
onClick: handleClearSearchString
|
|
802
|
+
}, /*#__PURE__*/React.createElement("svg", {
|
|
803
|
+
width: 20,
|
|
804
|
+
height: 20,
|
|
805
|
+
focusable: "false",
|
|
806
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
807
|
+
viewBox: "0 0 24 24"
|
|
808
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
809
|
+
d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.58 12 5 17.58 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"
|
|
810
|
+
})));
|
|
811
|
+
};
|
|
812
|
+
var StyledClearIcon = styled__default["default"].div(_templateObject$1 || (_templateObject$1 = _taggedTemplateLiteral(["\n margin: ", ";\n\n &:hover {\n cursor: pointer;\n }\n\n > svg {\n fill: ", ";\n }\n"])), function (props) {
|
|
813
|
+
return props.theme.clearIconMargin;
|
|
814
|
+
}, function (props) {
|
|
815
|
+
return props.theme.iconColor;
|
|
816
|
+
});
|
|
817
|
+
|
|
818
|
+
var _templateObject;
|
|
819
|
+
function SearchInput(_ref) {
|
|
820
|
+
var searchString = _ref.searchString,
|
|
821
|
+
setSearchString = _ref.setSearchString,
|
|
822
|
+
setHighlightedItem = _ref.setHighlightedItem,
|
|
823
|
+
eraseResults = _ref.eraseResults,
|
|
824
|
+
autoFocus = _ref.autoFocus,
|
|
825
|
+
onFocus = _ref.onFocus,
|
|
826
|
+
onClear = _ref.onClear,
|
|
827
|
+
placeholder = _ref.placeholder,
|
|
828
|
+
_ref$showIcon = _ref.showIcon,
|
|
829
|
+
showIcon = _ref$showIcon === void 0 ? true : _ref$showIcon,
|
|
830
|
+
_ref$showClear = _ref.showClear,
|
|
831
|
+
showClear = _ref$showClear === void 0 ? true : _ref$showClear,
|
|
832
|
+
maxLength = _ref.maxLength;
|
|
833
|
+
var ref = React$2.useRef(null);
|
|
834
|
+
var manualFocus = true;
|
|
835
|
+
var setFocus = function setFocus() {
|
|
836
|
+
manualFocus = false;
|
|
837
|
+
(ref === null || ref === void 0 ? void 0 : ref.current) && ref.current.focus();
|
|
838
|
+
manualFocus = true;
|
|
839
|
+
};
|
|
840
|
+
var handleOnFocus = function handleOnFocus(event) {
|
|
841
|
+
manualFocus && onFocus(event);
|
|
842
|
+
};
|
|
843
|
+
var maxLengthProperty = maxLength ? {
|
|
844
|
+
maxLength: maxLength
|
|
845
|
+
} : {};
|
|
846
|
+
return /*#__PURE__*/React.createElement(StyledSearchInput, null, /*#__PURE__*/React.createElement(SearchIcon, {
|
|
847
|
+
showIcon: showIcon
|
|
848
|
+
}), /*#__PURE__*/React.createElement("input", _extends({
|
|
849
|
+
type: "text",
|
|
850
|
+
ref: ref,
|
|
851
|
+
spellCheck: false,
|
|
852
|
+
value: searchString,
|
|
853
|
+
onChange: setSearchString,
|
|
854
|
+
onFocus: handleOnFocus,
|
|
855
|
+
placeholder: placeholder,
|
|
856
|
+
autoFocus: autoFocus,
|
|
857
|
+
onBlur: function onBlur() {
|
|
858
|
+
return eraseResults();
|
|
859
|
+
},
|
|
860
|
+
onKeyDown: function onKeyDown(event) {
|
|
861
|
+
return setHighlightedItem({
|
|
862
|
+
event: event
|
|
863
|
+
});
|
|
864
|
+
},
|
|
865
|
+
"data-test": "search-input"
|
|
866
|
+
}, maxLengthProperty)), /*#__PURE__*/React.createElement(ClearIcon, {
|
|
867
|
+
showClear: showClear,
|
|
868
|
+
setSearchString: setSearchString,
|
|
869
|
+
searchString: searchString,
|
|
870
|
+
onClear: onClear,
|
|
871
|
+
setFocus: setFocus
|
|
872
|
+
}));
|
|
873
|
+
}
|
|
874
|
+
var StyledSearchInput = styled__default["default"].div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n min-height: ", ";\n width: 100%;\n\n display: flex;\n align-items: center;\n\n > input {\n width: 100%;\n\n padding: 0 0 0 13px;\n\n border: none;\n outline: none;\n\n background-color: rgba(0, 0, 0, 0);\n font-size: inherit;\n font-family: inherit;\n\n color: ", ";\n\n ::placeholder {\n color: ", ";\n opacity: 1;\n\n :-ms-input-placeholder {\n color: ", ";\n }\n\n ::-ms-input-placeholder {\n color: ", ";\n }\n }\n }\n"])), function (props) {
|
|
875
|
+
return props.theme.height;
|
|
876
|
+
}, function (props) {
|
|
877
|
+
return props.theme.color;
|
|
878
|
+
}, function (props) {
|
|
879
|
+
return props.theme.placeholderColor;
|
|
880
|
+
}, function (props) {
|
|
881
|
+
return props.theme.placeholderColor;
|
|
882
|
+
}, function (props) {
|
|
883
|
+
return props.theme.placeholderColor;
|
|
884
|
+
});
|
|
885
|
+
|
|
886
|
+
var DEFAULT_INPUT_DEBOUNCE = 200;
|
|
887
|
+
var MAX_RESULTS = 10;
|
|
888
|
+
function ReactSearchAutocomplete(_ref) {
|
|
889
|
+
var _ref$items = _ref.items,
|
|
890
|
+
items = _ref$items === void 0 ? [] : _ref$items,
|
|
891
|
+
_ref$fuseOptions = _ref.fuseOptions,
|
|
892
|
+
fuseOptions = _ref$fuseOptions === void 0 ? defaultFuseOptions : _ref$fuseOptions,
|
|
893
|
+
_ref$inputDebounce = _ref.inputDebounce,
|
|
894
|
+
inputDebounce = _ref$inputDebounce === void 0 ? DEFAULT_INPUT_DEBOUNCE : _ref$inputDebounce,
|
|
895
|
+
_ref$onSearch = _ref.onSearch,
|
|
896
|
+
onSearch = _ref$onSearch === void 0 ? function () {} : _ref$onSearch,
|
|
897
|
+
_ref$onHover = _ref.onHover,
|
|
898
|
+
onHover = _ref$onHover === void 0 ? function () {} : _ref$onHover,
|
|
899
|
+
_ref$onSelect = _ref.onSelect,
|
|
900
|
+
onSelect = _ref$onSelect === void 0 ? function () {} : _ref$onSelect,
|
|
901
|
+
_ref$onFocus = _ref.onFocus,
|
|
902
|
+
onFocus = _ref$onFocus === void 0 ? function () {} : _ref$onFocus,
|
|
903
|
+
_ref$onClear = _ref.onClear,
|
|
904
|
+
onClear = _ref$onClear === void 0 ? function () {} : _ref$onClear,
|
|
905
|
+
_ref$showIcon = _ref.showIcon,
|
|
906
|
+
showIcon = _ref$showIcon === void 0 ? true : _ref$showIcon,
|
|
907
|
+
_ref$showClear = _ref.showClear,
|
|
908
|
+
showClear = _ref$showClear === void 0 ? true : _ref$showClear,
|
|
909
|
+
_ref$maxResults = _ref.maxResults,
|
|
910
|
+
maxResults = _ref$maxResults === void 0 ? MAX_RESULTS : _ref$maxResults,
|
|
911
|
+
_ref$placeholder = _ref.placeholder,
|
|
912
|
+
placeholder = _ref$placeholder === void 0 ? '' : _ref$placeholder,
|
|
913
|
+
_ref$autoFocus = _ref.autoFocus,
|
|
914
|
+
autoFocus = _ref$autoFocus === void 0 ? false : _ref$autoFocus,
|
|
915
|
+
_ref$styling = _ref.styling,
|
|
916
|
+
styling = _ref$styling === void 0 ? {} : _ref$styling,
|
|
917
|
+
_ref$resultStringKeyN = _ref.resultStringKeyName,
|
|
918
|
+
resultStringKeyName = _ref$resultStringKeyN === void 0 ? 'name' : _ref$resultStringKeyN,
|
|
919
|
+
_ref$inputSearchStrin = _ref.inputSearchString,
|
|
920
|
+
inputSearchString = _ref$inputSearchStrin === void 0 ? '' : _ref$inputSearchStrin,
|
|
921
|
+
formatResult = _ref.formatResult,
|
|
922
|
+
_ref$showNoResults = _ref.showNoResults,
|
|
923
|
+
showNoResults = _ref$showNoResults === void 0 ? true : _ref$showNoResults,
|
|
924
|
+
_ref$showNoResultsTex = _ref.showNoResultsText,
|
|
925
|
+
showNoResultsText = _ref$showNoResultsTex === void 0 ? 'No results' : _ref$showNoResultsTex,
|
|
926
|
+
_ref$showItemsOnFocus = _ref.showItemsOnFocus,
|
|
927
|
+
showItemsOnFocus = _ref$showItemsOnFocus === void 0 ? false : _ref$showItemsOnFocus,
|
|
928
|
+
_ref$maxLength = _ref.maxLength,
|
|
929
|
+
maxLength = _ref$maxLength === void 0 ? 0 : _ref$maxLength;
|
|
930
|
+
_ref.className;
|
|
931
|
+
_objectSpread2(_objectSpread2({}, defaultTheme), styling);
|
|
932
|
+
var options = _objectSpread2(_objectSpread2({}, defaultFuseOptions), fuseOptions);
|
|
933
|
+
var fuse = new Fuse__default["default"](items, options);
|
|
934
|
+
fuse.setCollection(items);
|
|
935
|
+
var _useState = React$2.useState(inputSearchString),
|
|
936
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
937
|
+
searchString = _useState2[0],
|
|
938
|
+
setSearchString = _useState2[1];
|
|
939
|
+
var _useState3 = React$2.useState([]),
|
|
940
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
941
|
+
results = _useState4[0],
|
|
942
|
+
setResults = _useState4[1];
|
|
943
|
+
var _useState5 = React$2.useState(-1),
|
|
944
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
945
|
+
highlightedItem = _useState6[0],
|
|
946
|
+
setHighlightedItem = _useState6[1];
|
|
947
|
+
var _useState7 = React$2.useState(false),
|
|
948
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
949
|
+
isSearchComplete = _useState8[0],
|
|
950
|
+
setIsSearchComplete = _useState8[1];
|
|
951
|
+
var _useState9 = React$2.useState(false),
|
|
952
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
953
|
+
isTyping = _useState10[0],
|
|
954
|
+
setIsTyping = _useState10[1];
|
|
955
|
+
var _useState11 = React$2.useState(false),
|
|
956
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
957
|
+
showNoResultsFlag = _useState12[0],
|
|
958
|
+
setShowNoResultsFlag = _useState12[1];
|
|
959
|
+
var _useState13 = React$2.useState(false),
|
|
960
|
+
_useState14 = _slicedToArray(_useState13, 2),
|
|
961
|
+
hasFocus = _useState14[0],
|
|
962
|
+
setHasFocus = _useState14[1];
|
|
963
|
+
React$2.useEffect(function () {
|
|
964
|
+
setSearchString(inputSearchString);
|
|
965
|
+
var timeoutId = setTimeout(function () {
|
|
966
|
+
return setResults(fuseResults(inputSearchString));
|
|
967
|
+
}, 0);
|
|
968
|
+
return function () {
|
|
969
|
+
return clearTimeout(timeoutId);
|
|
970
|
+
};
|
|
971
|
+
}, [inputSearchString]);
|
|
972
|
+
React$2.useEffect(function () {
|
|
973
|
+
(searchString === null || searchString === void 0 ? void 0 : searchString.length) > 0 && results && (results === null || results === void 0 ? void 0 : results.length) > 0 && setResults(fuseResults(searchString));
|
|
974
|
+
}, [items]);
|
|
975
|
+
React$2.useEffect(function () {
|
|
976
|
+
if (showNoResults && searchString.length > 0 && !isTyping && results.length === 0 && !isSearchComplete) {
|
|
977
|
+
setShowNoResultsFlag(true);
|
|
978
|
+
} else {
|
|
979
|
+
setShowNoResultsFlag(false);
|
|
980
|
+
}
|
|
981
|
+
}, [isTyping, showNoResults, isSearchComplete, searchString, results]);
|
|
982
|
+
React$2.useEffect(function () {
|
|
983
|
+
if (showItemsOnFocus && results.length === 0 && searchString.length === 0 && hasFocus) {
|
|
984
|
+
setResults(items.slice(0, maxResults));
|
|
985
|
+
}
|
|
986
|
+
}, [showItemsOnFocus, results, searchString, hasFocus]);
|
|
987
|
+
React$2.useEffect(function () {
|
|
988
|
+
var handleDocumentClick = function handleDocumentClick() {
|
|
989
|
+
eraseResults();
|
|
990
|
+
setHasFocus(false);
|
|
991
|
+
};
|
|
992
|
+
document.addEventListener('click', handleDocumentClick);
|
|
993
|
+
return function () {
|
|
994
|
+
return document.removeEventListener('click', handleDocumentClick);
|
|
995
|
+
};
|
|
996
|
+
}, []);
|
|
997
|
+
var handleOnFocus = function handleOnFocus(event) {
|
|
998
|
+
onFocus(event);
|
|
999
|
+
setHasFocus(true);
|
|
1000
|
+
};
|
|
1001
|
+
var callOnSearch = function callOnSearch(keyword) {
|
|
1002
|
+
var newResults = [];
|
|
1003
|
+
(keyword === null || keyword === void 0 ? void 0 : keyword.length) > 0 && (newResults = fuseResults(keyword));
|
|
1004
|
+
setResults(newResults);
|
|
1005
|
+
onSearch(keyword, newResults);
|
|
1006
|
+
setIsTyping(false);
|
|
1007
|
+
};
|
|
1008
|
+
var handleOnSearch = React__default$1["default"].useCallback(inputDebounce > 0 ? debounce(function (keyword) {
|
|
1009
|
+
return callOnSearch(keyword);
|
|
1010
|
+
}, inputDebounce) : function (keyword) {
|
|
1011
|
+
return callOnSearch(keyword);
|
|
1012
|
+
}, [items]);
|
|
1013
|
+
var handleOnClick = function handleOnClick(result) {
|
|
1014
|
+
eraseResults();
|
|
1015
|
+
onSelect(result);
|
|
1016
|
+
setSearchString(result[resultStringKeyName]);
|
|
1017
|
+
setHighlightedItem(0);
|
|
1018
|
+
};
|
|
1019
|
+
var fuseResults = function fuseResults(keyword) {
|
|
1020
|
+
return fuse.search(keyword, {
|
|
1021
|
+
limit: maxResults
|
|
1022
|
+
}).map(function (result) {
|
|
1023
|
+
return _objectSpread2({}, result.item);
|
|
1024
|
+
}).slice(0, maxResults);
|
|
1025
|
+
};
|
|
1026
|
+
var handleSetSearchString = function handleSetSearchString(_ref2) {
|
|
1027
|
+
var target = _ref2.target;
|
|
1028
|
+
var keyword = target.value;
|
|
1029
|
+
setSearchString(keyword);
|
|
1030
|
+
handleOnSearch(keyword);
|
|
1031
|
+
setIsTyping(true);
|
|
1032
|
+
if (isSearchComplete) {
|
|
1033
|
+
setIsSearchComplete(false);
|
|
1034
|
+
}
|
|
1035
|
+
};
|
|
1036
|
+
var eraseResults = function eraseResults() {
|
|
1037
|
+
setResults([]);
|
|
1038
|
+
setIsSearchComplete(true);
|
|
1039
|
+
};
|
|
1040
|
+
var handleSetHighlightedItem = function handleSetHighlightedItem(_ref3) {
|
|
1041
|
+
var index = _ref3.index,
|
|
1042
|
+
event = _ref3.event;
|
|
1043
|
+
var itemIndex = -1;
|
|
1044
|
+
var setValues = function setValues(index) {
|
|
1045
|
+
setHighlightedItem(index);
|
|
1046
|
+
(results === null || results === void 0 ? void 0 : results[index]) && onHover(results[index]);
|
|
1047
|
+
};
|
|
1048
|
+
if (index !== undefined) {
|
|
1049
|
+
setHighlightedItem(index);
|
|
1050
|
+
(results === null || results === void 0 ? void 0 : results[index]) && onHover(results[index]);
|
|
1051
|
+
} else if (event) {
|
|
1052
|
+
switch (event.key) {
|
|
1053
|
+
case 'Enter':
|
|
1054
|
+
if (results.length > 0 && results[highlightedItem]) {
|
|
1055
|
+
event.preventDefault();
|
|
1056
|
+
onSelect(results[highlightedItem]);
|
|
1057
|
+
setSearchString(results[highlightedItem][resultStringKeyName]);
|
|
1058
|
+
onSearch(results[highlightedItem][resultStringKeyName], results);
|
|
1059
|
+
} else {
|
|
1060
|
+
onSearch(searchString, results);
|
|
1061
|
+
}
|
|
1062
|
+
setHighlightedItem(-1);
|
|
1063
|
+
eraseResults();
|
|
1064
|
+
break;
|
|
1065
|
+
case 'ArrowUp':
|
|
1066
|
+
event.preventDefault();
|
|
1067
|
+
itemIndex = highlightedItem > -1 ? highlightedItem - 1 : results.length - 1;
|
|
1068
|
+
setValues(itemIndex);
|
|
1069
|
+
break;
|
|
1070
|
+
case 'ArrowDown':
|
|
1071
|
+
event.preventDefault();
|
|
1072
|
+
itemIndex = highlightedItem < results.length - 1 ? highlightedItem + 1 : -1;
|
|
1073
|
+
setValues(itemIndex);
|
|
1074
|
+
break;
|
|
1075
|
+
}
|
|
1076
|
+
}
|
|
1077
|
+
};
|
|
1078
|
+
return /*#__PURE__*/React__default$1["default"].createElement("div", {
|
|
1079
|
+
className: _JSXStyle.dynamic([["3512916558", [function (props) {
|
|
1080
|
+
return parseInt(props.theme.height) + 2 + 'px';
|
|
1081
|
+
}, function (props) {
|
|
1082
|
+
return props.theme.border;
|
|
1083
|
+
}, function (props) {
|
|
1084
|
+
return props.theme.borderRadius;
|
|
1085
|
+
}, function (props) {
|
|
1086
|
+
return props.theme.backgroundColor;
|
|
1087
|
+
}, function (props) {
|
|
1088
|
+
return props.theme.color;
|
|
1089
|
+
}, function (props) {
|
|
1090
|
+
return props.theme.fontSize;
|
|
1091
|
+
}, function (props) {
|
|
1092
|
+
return props.theme.fontFamily;
|
|
1093
|
+
}, function (props) {
|
|
1094
|
+
return props.theme.zIndex;
|
|
1095
|
+
}, function (props) {
|
|
1096
|
+
return props.theme.boxShadow;
|
|
1097
|
+
}, function (props) {
|
|
1098
|
+
return props.theme.boxShadow;
|
|
1099
|
+
}, function (props) {
|
|
1100
|
+
return props.theme.boxShadow;
|
|
1101
|
+
}]]]) + " " + "search-bar-wrapper"
|
|
1102
|
+
}, /*#__PURE__*/React__default$1["default"].createElement(SearchInput, {
|
|
1103
|
+
searchString: searchString,
|
|
1104
|
+
setSearchString: handleSetSearchString,
|
|
1105
|
+
eraseResults: eraseResults,
|
|
1106
|
+
autoFocus: autoFocus,
|
|
1107
|
+
onFocus: handleOnFocus,
|
|
1108
|
+
onClear: onClear,
|
|
1109
|
+
placeholder: placeholder,
|
|
1110
|
+
showIcon: showIcon,
|
|
1111
|
+
showClear: showClear,
|
|
1112
|
+
setHighlightedItem: handleSetHighlightedItem,
|
|
1113
|
+
maxLength: maxLength
|
|
1114
|
+
}), /*#__PURE__*/React__default$1["default"].createElement(Results, {
|
|
1115
|
+
results: results,
|
|
1116
|
+
onClick: handleOnClick,
|
|
1117
|
+
setSearchString: setSearchString,
|
|
1118
|
+
showIcon: showIcon,
|
|
1119
|
+
maxResults: maxResults,
|
|
1120
|
+
resultStringKeyName: resultStringKeyName,
|
|
1121
|
+
formatResult: formatResult,
|
|
1122
|
+
highlightedItem: highlightedItem,
|
|
1123
|
+
setHighlightedItem: handleSetHighlightedItem,
|
|
1124
|
+
showNoResultsFlag: showNoResultsFlag,
|
|
1125
|
+
showNoResultsText: showNoResultsText
|
|
1126
|
+
}), /*#__PURE__*/React__default$1["default"].createElement(_JSXStyle, {
|
|
1127
|
+
id: "3512916558",
|
|
1128
|
+
dynamic: [function (props) {
|
|
1129
|
+
return parseInt(props.theme.height) + 2 + 'px';
|
|
1130
|
+
}, function (props) {
|
|
1131
|
+
return props.theme.border;
|
|
1132
|
+
}, function (props) {
|
|
1133
|
+
return props.theme.borderRadius;
|
|
1134
|
+
}, function (props) {
|
|
1135
|
+
return props.theme.backgroundColor;
|
|
1136
|
+
}, function (props) {
|
|
1137
|
+
return props.theme.color;
|
|
1138
|
+
}, function (props) {
|
|
1139
|
+
return props.theme.fontSize;
|
|
1140
|
+
}, function (props) {
|
|
1141
|
+
return props.theme.fontFamily;
|
|
1142
|
+
}, function (props) {
|
|
1143
|
+
return props.theme.zIndex;
|
|
1144
|
+
}, function (props) {
|
|
1145
|
+
return props.theme.boxShadow;
|
|
1146
|
+
}, function (props) {
|
|
1147
|
+
return props.theme.boxShadow;
|
|
1148
|
+
}, function (props) {
|
|
1149
|
+
return props.theme.boxShadow;
|
|
1150
|
+
}]
|
|
1151
|
+
}, ".__jsx-style-dynamic-selector{position:relative;height:".concat(function (props) {
|
|
1152
|
+
return parseInt(props.theme.height) + 2 + 'px';
|
|
1153
|
+
}, ";}.search-bar-wrapper.__jsx-style-dynamic-selector{position:absolute;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;width:100%;border:").concat(function (props) {
|
|
1154
|
+
return props.theme.border;
|
|
1155
|
+
}, ";border-radius:").concat(function (props) {
|
|
1156
|
+
return props.theme.borderRadius;
|
|
1157
|
+
}, ";background-color:").concat(function (props) {
|
|
1158
|
+
return props.theme.backgroundColor;
|
|
1159
|
+
}, ";color:").concat(function (props) {
|
|
1160
|
+
return props.theme.color;
|
|
1161
|
+
}, ";font-size:").concat(function (props) {
|
|
1162
|
+
return props.theme.fontSize;
|
|
1163
|
+
}, ";font-family:").concat(function (props) {
|
|
1164
|
+
return props.theme.fontFamily;
|
|
1165
|
+
}, ";z-index:").concat(function (props) {
|
|
1166
|
+
return props.theme.zIndex;
|
|
1167
|
+
}, ";}.search-bar-wrapper.__jsx-style-dynamic-selector:hover{box-shadow:").concat(function (props) {
|
|
1168
|
+
return props.theme.boxShadow;
|
|
1169
|
+
}, ";}.search-bar-wrapper.__jsx-style-dynamic-selector:active{box-shadow:").concat(function (props) {
|
|
1170
|
+
return props.theme.boxShadow;
|
|
1171
|
+
}, ";}.search-bar-wrapper.__jsx-style-dynamic-selector:focus-within{box-shadow:").concat(function (props) {
|
|
1172
|
+
return props.theme.boxShadow;
|
|
1173
|
+
}, ";}")));
|
|
1174
|
+
}
|
|
1175
|
+
|
|
1176
|
+
exports["default"] = ReactSearchAutocomplete;
|