@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,102 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
|
+
var _excluded = ["children"];
|
|
6
|
+
import React, { forwardRef } from 'react';
|
|
7
|
+
import { ScaleContext } from './scale-context';
|
|
8
|
+
import useTheme from '../use-theme';
|
|
9
|
+
import { isCSSNumberValue } from '../utils/collections';
|
|
10
|
+
import { generateGetAllScaleProps, generateGetScaleProps } from './utils';
|
|
11
|
+
var reduceScaleCoefficient = function reduceScaleCoefficient(scale) {
|
|
12
|
+
if (scale === 1) return scale;
|
|
13
|
+
var diff = Math.abs((scale - 1) / 2);
|
|
14
|
+
return scale > 1 ? 1 + diff : 1 - diff;
|
|
15
|
+
};
|
|
16
|
+
var withScale = function withScale(Render) {
|
|
17
|
+
var ScaleFC = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
18
|
+
var _ref2, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9, _ref10, _ref11, _ref12, _ref13, _ref14, _ref15, _ref16, _ref17, _ref18, _ref19, _ref20, _ref21, _ref22, _ref23, _ref24, _ref25, _ref26, _ref27, _ref28, _ref29, _ref30, _ref31, _ref32, _ref33;
|
|
19
|
+
var children = _ref.children,
|
|
20
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
21
|
+
var _useTheme = useTheme(),
|
|
22
|
+
layout = _useTheme.layout;
|
|
23
|
+
var paddingLeft = props.paddingLeft,
|
|
24
|
+
pl = props.pl,
|
|
25
|
+
paddingRight = props.paddingRight,
|
|
26
|
+
pr = props.pr,
|
|
27
|
+
paddingTop = props.paddingTop,
|
|
28
|
+
pt = props.pt,
|
|
29
|
+
paddingBottom = props.paddingBottom,
|
|
30
|
+
pb = props.pb,
|
|
31
|
+
marginTop = props.marginTop,
|
|
32
|
+
mt = props.mt,
|
|
33
|
+
marginRight = props.marginRight,
|
|
34
|
+
mr = props.mr,
|
|
35
|
+
marginBottom = props.marginBottom,
|
|
36
|
+
mb = props.mb,
|
|
37
|
+
marginLeft = props.marginLeft,
|
|
38
|
+
ml = props.ml,
|
|
39
|
+
px = props.px,
|
|
40
|
+
py = props.py,
|
|
41
|
+
mx = props.mx,
|
|
42
|
+
my = props.my,
|
|
43
|
+
width = props.width,
|
|
44
|
+
height = props.height,
|
|
45
|
+
font = props.font,
|
|
46
|
+
w = props.w,
|
|
47
|
+
h = props.h,
|
|
48
|
+
margin = props.margin,
|
|
49
|
+
padding = props.padding,
|
|
50
|
+
_props$unit = props.unit,
|
|
51
|
+
unit = _props$unit === void 0 ? layout.unit : _props$unit,
|
|
52
|
+
_props$scale = props.scale,
|
|
53
|
+
scale = _props$scale === void 0 ? 1 : _props$scale;
|
|
54
|
+
var makeScaleHandler = function makeScaleHandler(attrValue) {
|
|
55
|
+
return function (scale1x, defaultValue) {
|
|
56
|
+
// 0 means disable scale and the default value is 0
|
|
57
|
+
if (scale1x === 0) {
|
|
58
|
+
scale1x = 1;
|
|
59
|
+
defaultValue = defaultValue || 0;
|
|
60
|
+
}
|
|
61
|
+
var factor = reduceScaleCoefficient(scale) * scale1x;
|
|
62
|
+
if (typeof attrValue === 'undefined') {
|
|
63
|
+
if (typeof defaultValue !== 'undefined') return "".concat(defaultValue);
|
|
64
|
+
return "calc(".concat(factor, " * ").concat(unit, ")");
|
|
65
|
+
}
|
|
66
|
+
if (!isCSSNumberValue(attrValue)) return "".concat(attrValue);
|
|
67
|
+
var customFactor = factor * Number(attrValue);
|
|
68
|
+
return "calc(".concat(customFactor, " * ").concat(unit, ")");
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
var value = {
|
|
72
|
+
unit: unit,
|
|
73
|
+
SCALES: {
|
|
74
|
+
pt: makeScaleHandler((_ref2 = (_ref3 = paddingTop !== null && paddingTop !== void 0 ? paddingTop : pt) !== null && _ref3 !== void 0 ? _ref3 : py) !== null && _ref2 !== void 0 ? _ref2 : padding),
|
|
75
|
+
pr: makeScaleHandler((_ref4 = (_ref5 = paddingRight !== null && paddingRight !== void 0 ? paddingRight : pr) !== null && _ref5 !== void 0 ? _ref5 : px) !== null && _ref4 !== void 0 ? _ref4 : padding),
|
|
76
|
+
pb: makeScaleHandler((_ref6 = (_ref7 = paddingBottom !== null && paddingBottom !== void 0 ? paddingBottom : pb) !== null && _ref7 !== void 0 ? _ref7 : py) !== null && _ref6 !== void 0 ? _ref6 : padding),
|
|
77
|
+
pl: makeScaleHandler((_ref8 = (_ref9 = paddingLeft !== null && paddingLeft !== void 0 ? paddingLeft : pl) !== null && _ref9 !== void 0 ? _ref9 : px) !== null && _ref8 !== void 0 ? _ref8 : padding),
|
|
78
|
+
px: makeScaleHandler((_ref10 = (_ref11 = (_ref12 = (_ref13 = px !== null && px !== void 0 ? px : paddingLeft) !== null && _ref13 !== void 0 ? _ref13 : paddingRight) !== null && _ref12 !== void 0 ? _ref12 : pl) !== null && _ref11 !== void 0 ? _ref11 : pr) !== null && _ref10 !== void 0 ? _ref10 : padding),
|
|
79
|
+
py: makeScaleHandler((_ref14 = (_ref15 = (_ref16 = (_ref17 = py !== null && py !== void 0 ? py : paddingTop) !== null && _ref17 !== void 0 ? _ref17 : paddingBottom) !== null && _ref16 !== void 0 ? _ref16 : pt) !== null && _ref15 !== void 0 ? _ref15 : pb) !== null && _ref14 !== void 0 ? _ref14 : padding),
|
|
80
|
+
mt: makeScaleHandler((_ref18 = (_ref19 = marginTop !== null && marginTop !== void 0 ? marginTop : mt) !== null && _ref19 !== void 0 ? _ref19 : my) !== null && _ref18 !== void 0 ? _ref18 : margin),
|
|
81
|
+
mr: makeScaleHandler((_ref20 = (_ref21 = marginRight !== null && marginRight !== void 0 ? marginRight : mr) !== null && _ref21 !== void 0 ? _ref21 : mx) !== null && _ref20 !== void 0 ? _ref20 : margin),
|
|
82
|
+
mb: makeScaleHandler((_ref22 = (_ref23 = marginBottom !== null && marginBottom !== void 0 ? marginBottom : mb) !== null && _ref23 !== void 0 ? _ref23 : my) !== null && _ref22 !== void 0 ? _ref22 : margin),
|
|
83
|
+
ml: makeScaleHandler((_ref24 = (_ref25 = marginLeft !== null && marginLeft !== void 0 ? marginLeft : ml) !== null && _ref25 !== void 0 ? _ref25 : mx) !== null && _ref24 !== void 0 ? _ref24 : margin),
|
|
84
|
+
mx: makeScaleHandler((_ref26 = (_ref27 = (_ref28 = (_ref29 = mx !== null && mx !== void 0 ? mx : marginLeft) !== null && _ref29 !== void 0 ? _ref29 : marginRight) !== null && _ref28 !== void 0 ? _ref28 : ml) !== null && _ref27 !== void 0 ? _ref27 : mr) !== null && _ref26 !== void 0 ? _ref26 : margin),
|
|
85
|
+
my: makeScaleHandler((_ref30 = (_ref31 = (_ref32 = (_ref33 = my !== null && my !== void 0 ? my : marginTop) !== null && _ref33 !== void 0 ? _ref33 : marginBottom) !== null && _ref32 !== void 0 ? _ref32 : mt) !== null && _ref31 !== void 0 ? _ref31 : mb) !== null && _ref30 !== void 0 ? _ref30 : margin),
|
|
86
|
+
width: makeScaleHandler(width !== null && width !== void 0 ? width : w),
|
|
87
|
+
height: makeScaleHandler(height !== null && height !== void 0 ? height : h),
|
|
88
|
+
font: makeScaleHandler(font)
|
|
89
|
+
},
|
|
90
|
+
getScaleProps: generateGetScaleProps(props),
|
|
91
|
+
getAllScaleProps: generateGetAllScaleProps(props)
|
|
92
|
+
};
|
|
93
|
+
return /*#__PURE__*/React.createElement(ScaleContext.Provider, {
|
|
94
|
+
value: value
|
|
95
|
+
}, /*#__PURE__*/React.createElement(Render, _extends({}, props, {
|
|
96
|
+
ref: ref
|
|
97
|
+
}), children));
|
|
98
|
+
});
|
|
99
|
+
ScaleFC.displayName = "Scale".concat(Render.displayName || 'Wrapper');
|
|
100
|
+
return ScaleFC;
|
|
101
|
+
};
|
|
102
|
+
export default withScale;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Dispatch, MutableRefObject, SetStateAction } from 'react';
|
|
2
|
+
declare const useTabs: (initialValue: string) => {
|
|
3
|
+
state: string;
|
|
4
|
+
setState: Dispatch<SetStateAction<string>>;
|
|
5
|
+
currentRef: MutableRefObject<string>;
|
|
6
|
+
bindings: {
|
|
7
|
+
value: string;
|
|
8
|
+
onChange: (val: string) => void;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export default useTabs;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
2
|
+
import useCurrentState from '../utils/use-current-state';
|
|
3
|
+
var useTabs = function useTabs(initialValue) {
|
|
4
|
+
var _useCurrentState = useCurrentState(initialValue),
|
|
5
|
+
_useCurrentState2 = _slicedToArray(_useCurrentState, 3),
|
|
6
|
+
state = _useCurrentState2[0],
|
|
7
|
+
setState = _useCurrentState2[1],
|
|
8
|
+
currentRef = _useCurrentState2[2];
|
|
9
|
+
return {
|
|
10
|
+
state: state,
|
|
11
|
+
setState: setState,
|
|
12
|
+
currentRef: currentRef,
|
|
13
|
+
bindings: {
|
|
14
|
+
value: state,
|
|
15
|
+
onChange: function onChange(val) {
|
|
16
|
+
setState(val);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
export default useTabs;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import Themes from '../themes';
|
|
5
|
+
var defaultTheme = Themes.getPresetStaticTheme();
|
|
6
|
+
export var ThemeContext = /*#__PURE__*/React.createContext(defaultTheme);
|
|
7
|
+
export var useTheme = function useTheme() {
|
|
8
|
+
return React.useContext(ThemeContext);
|
|
9
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Toast } from "./use-toast";
|
|
2
|
+
import { HUIThemesPalette } from "../themes";
|
|
3
|
+
import { NormalTypes } from "../utils/prop-types";
|
|
4
|
+
export declare const makeToastActions: (actions: Toast['actions'], cancelHandle: () => void) => JSX.Element[] | null;
|
|
5
|
+
export declare const getColors: (palette: HUIThemesPalette, type?: NormalTypes) => {
|
|
6
|
+
bgColor: string;
|
|
7
|
+
color: string;
|
|
8
|
+
};
|
|
9
|
+
declare const toastPlacement: ["topLeft", "topRight", "bottomLeft", "bottomRight"];
|
|
10
|
+
export type ToastPlacement = typeof toastPlacement[number];
|
|
11
|
+
export declare const isTopPlacement: (placement: ToastPlacement) => boolean;
|
|
12
|
+
export declare const isLeftPlacement: (placement: ToastPlacement) => boolean;
|
|
13
|
+
export declare const getTranslateByPlacement: (placement: ToastPlacement) => {
|
|
14
|
+
enter: string;
|
|
15
|
+
leave: string;
|
|
16
|
+
};
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Button from '../button';
|
|
3
|
+
import { tuple } from '../utils/prop-types';
|
|
4
|
+
export var makeToastActions = function makeToastActions(actions, cancelHandle) {
|
|
5
|
+
var handler = function handler(event, userHandler) {
|
|
6
|
+
userHandler && userHandler(event, cancelHandle);
|
|
7
|
+
};
|
|
8
|
+
if (!actions || !actions.length) return null;
|
|
9
|
+
return actions.map(function (action, index) {
|
|
10
|
+
return /*#__PURE__*/React.createElement(Button, {
|
|
11
|
+
auto: true,
|
|
12
|
+
scale: 1 / 3,
|
|
13
|
+
font: "13px",
|
|
14
|
+
type: action.passive ? 'default' : 'secondary',
|
|
15
|
+
key: "action-".concat(index),
|
|
16
|
+
onClick: function onClick(event) {
|
|
17
|
+
return handler(event, action.handler);
|
|
18
|
+
}
|
|
19
|
+
}, action.name);
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
export var getColors = function getColors(palette, type) {
|
|
23
|
+
var colors = {
|
|
24
|
+
"default": palette.background,
|
|
25
|
+
secondary: palette.secondary,
|
|
26
|
+
success: palette.success,
|
|
27
|
+
warning: palette.warning,
|
|
28
|
+
error: palette.error
|
|
29
|
+
};
|
|
30
|
+
var isDefault = !type || type === 'default';
|
|
31
|
+
if (isDefault) return {
|
|
32
|
+
bgColor: colors["default"],
|
|
33
|
+
color: palette.foreground
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Prevent main color change in special types.
|
|
37
|
+
* The color will only follow the theme when it is in the default type.
|
|
38
|
+
*/
|
|
39
|
+
return {
|
|
40
|
+
bgColor: colors[type],
|
|
41
|
+
color: 'white'
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
var toastPlacement = tuple('topLeft', 'topRight', 'bottomLeft', 'bottomRight');
|
|
45
|
+
export var isTopPlacement = function isTopPlacement(placement) {
|
|
46
|
+
return "".concat(placement).toLowerCase().startsWith('top');
|
|
47
|
+
};
|
|
48
|
+
export var isLeftPlacement = function isLeftPlacement(placement) {
|
|
49
|
+
return "".concat(placement).toLowerCase().endsWith('left');
|
|
50
|
+
};
|
|
51
|
+
export var getTranslateByPlacement = function getTranslateByPlacement(placement) {
|
|
52
|
+
var translateInByPlacement = {
|
|
53
|
+
topLeft: 'translate(-60px, -60px)',
|
|
54
|
+
topRight: 'translate(60px, -60px)',
|
|
55
|
+
bottomLeft: 'translate(-60px, 60px)',
|
|
56
|
+
bottomRight: 'translate(60px, 60px)'
|
|
57
|
+
};
|
|
58
|
+
var translateOutByPlacement = {
|
|
59
|
+
topLeft: 'translate(-50px, 15px) scale(0.85)',
|
|
60
|
+
topRight: 'translate(50px, 15px) scale(0.85)',
|
|
61
|
+
bottomLeft: 'translate(-50px, -15px) scale(0.85)',
|
|
62
|
+
bottomRight: 'translate(50px, -15px) scale(0.85)'
|
|
63
|
+
};
|
|
64
|
+
return {
|
|
65
|
+
enter: translateInByPlacement[placement],
|
|
66
|
+
leave: translateOutByPlacement[placement]
|
|
67
|
+
};
|
|
68
|
+
};
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
5
|
+
import _JSXStyle from "../styled-jsx.es.js";
|
|
6
|
+
import React, { useEffect, useMemo } from 'react';
|
|
7
|
+
import { createPortal } from 'react-dom';
|
|
8
|
+
import usePortal from '../utils/use-portal';
|
|
9
|
+
import useTheme from '../use-theme';
|
|
10
|
+
import { useHUIContext } from '../utils/use-hd-ui-context';
|
|
11
|
+
import ToastItem from './toast-item';
|
|
12
|
+
import useClasses from '../use-classes';
|
|
13
|
+
import { isLeftPlacement, isTopPlacement } from './helpers';
|
|
14
|
+
import useCurrentState from '../utils/use-current-state';
|
|
15
|
+
var ToastContainer = function ToastContainer() {
|
|
16
|
+
var theme = useTheme();
|
|
17
|
+
var portal = usePortal('toast');
|
|
18
|
+
var _useCurrentState = useCurrentState(false),
|
|
19
|
+
_useCurrentState2 = _slicedToArray(_useCurrentState, 3),
|
|
20
|
+
setHovering = _useCurrentState2[1],
|
|
21
|
+
hoveringRef = _useCurrentState2[2];
|
|
22
|
+
var _useHUIContext = useHUIContext(),
|
|
23
|
+
toasts = _useHUIContext.toasts,
|
|
24
|
+
updateToasts = _useHUIContext.updateToasts,
|
|
25
|
+
toastLayout = _useHUIContext.toastLayout,
|
|
26
|
+
lastUpdateToastId = _useHUIContext.lastUpdateToastId;
|
|
27
|
+
var memoizedLayout = useMemo(function () {
|
|
28
|
+
return toastLayout;
|
|
29
|
+
}, [toastLayout]);
|
|
30
|
+
var toastElements = useMemo(function () {
|
|
31
|
+
return toasts.map(function (toast) {
|
|
32
|
+
return /*#__PURE__*/React.createElement(ToastItem, {
|
|
33
|
+
toast: toast,
|
|
34
|
+
layout: memoizedLayout,
|
|
35
|
+
key: toast._internalIdent
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
}, [toasts, memoizedLayout]);
|
|
39
|
+
var classNames = useMemo(function () {
|
|
40
|
+
return useClasses('toasts', {
|
|
41
|
+
top: isTopPlacement(toastLayout.placement),
|
|
42
|
+
left: isLeftPlacement(toastLayout.placement)
|
|
43
|
+
});
|
|
44
|
+
}, [memoizedLayout]);
|
|
45
|
+
var hoverHandler = function hoverHandler(isHovering) {
|
|
46
|
+
setHovering(isHovering);
|
|
47
|
+
if (isHovering) {
|
|
48
|
+
return updateToasts(function (last) {
|
|
49
|
+
return last.map(function (toast) {
|
|
50
|
+
if (!toast.visible) return toast;
|
|
51
|
+
toast._timeout && window.clearTimeout(toast._timeout);
|
|
52
|
+
return _extends({}, toast, {
|
|
53
|
+
timeout: null
|
|
54
|
+
});
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
updateToasts(function (last) {
|
|
59
|
+
return last.map(function (toast, index) {
|
|
60
|
+
if (!toast.visible) return toast;
|
|
61
|
+
toast._timeout && window.clearTimeout(toast._timeout);
|
|
62
|
+
return _extends({}, toast, {
|
|
63
|
+
_timeout: function () {
|
|
64
|
+
var timer = window.setTimeout(function () {
|
|
65
|
+
toast.cancel();
|
|
66
|
+
window.clearTimeout(timer);
|
|
67
|
+
}, toast.delay + index * 100);
|
|
68
|
+
return timer;
|
|
69
|
+
}()
|
|
70
|
+
});
|
|
71
|
+
});
|
|
72
|
+
});
|
|
73
|
+
};
|
|
74
|
+
useEffect(function () {
|
|
75
|
+
var index = toasts.findIndex(function (r) {
|
|
76
|
+
return r._internalIdent === lastUpdateToastId;
|
|
77
|
+
});
|
|
78
|
+
var toast = toasts[index];
|
|
79
|
+
if (!toast || toast.visible || !hoveringRef.current) return;
|
|
80
|
+
var hasVisible = toasts.find(function (r, i) {
|
|
81
|
+
return i < index && r.visible;
|
|
82
|
+
});
|
|
83
|
+
if (hasVisible || !hoveringRef.current) return;
|
|
84
|
+
hoverHandler(false);
|
|
85
|
+
}, [toasts, lastUpdateToastId]);
|
|
86
|
+
useEffect(function () {
|
|
87
|
+
var timeout = null;
|
|
88
|
+
var timer = window.setInterval(function () {
|
|
89
|
+
if (toasts.length === 0) return;
|
|
90
|
+
timeout = window.setTimeout(function () {
|
|
91
|
+
var allInvisible = !toasts.find(function (r) {
|
|
92
|
+
return r.visible;
|
|
93
|
+
});
|
|
94
|
+
allInvisible && updateToasts(function () {
|
|
95
|
+
return [];
|
|
96
|
+
});
|
|
97
|
+
timeout && clearTimeout(timeout);
|
|
98
|
+
}, 350);
|
|
99
|
+
}, 5000);
|
|
100
|
+
return function () {
|
|
101
|
+
timer && clearInterval(timer);
|
|
102
|
+
timeout && clearTimeout(timeout);
|
|
103
|
+
};
|
|
104
|
+
}, [toasts]);
|
|
105
|
+
if (!portal) return null;
|
|
106
|
+
if (!toasts || toasts.length === 0) return null;
|
|
107
|
+
return /*#__PURE__*/createPortal( /*#__PURE__*/React.createElement("div", {
|
|
108
|
+
onMouseEnter: function onMouseEnter() {
|
|
109
|
+
return hoverHandler(true);
|
|
110
|
+
},
|
|
111
|
+
onMouseLeave: function onMouseLeave() {
|
|
112
|
+
return hoverHandler(false);
|
|
113
|
+
},
|
|
114
|
+
className: _JSXStyle.dynamic([["622610754", [theme.layout.gap, theme.layout.gap, theme.layout.gap, theme.layout.gap]]]) + " " + (classNames || "")
|
|
115
|
+
}, toastElements, /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
116
|
+
id: "622610754",
|
|
117
|
+
dynamic: [theme.layout.gap, theme.layout.gap, theme.layout.gap, theme.layout.gap]
|
|
118
|
+
}, ".toasts.__jsx-style-dynamic-selector{position:fixed;width:auto;max-width:100%;right:".concat(theme.layout.gap, ";bottom:").concat(theme.layout.gap, ";z-index:2000;-webkit-transition:all 400ms ease;transition:all 400ms ease;box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}.top.__jsx-style-dynamic-selector{bottom:unset;-webkit-flex-direction:column-reverse;-ms-flex-direction:column-reverse;flex-direction:column-reverse;top:").concat(theme.layout.gap, ";}.left.__jsx-style-dynamic-selector{right:unset;left:").concat(theme.layout.gap, ";}"))), portal);
|
|
119
|
+
};
|
|
120
|
+
export default ToastContainer;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import _JSXStyle from "../styled-jsx.es.js";
|
|
2
|
+
import React, { useMemo } from 'react';
|
|
3
|
+
import useTheme from '../use-theme';
|
|
4
|
+
import CssTransition from '../shared/css-transition';
|
|
5
|
+
import { makeToastActions, getColors, getTranslateByPlacement } from './helpers';
|
|
6
|
+
var ToastItem = /*#__PURE__*/React.memo(function (_ref) {
|
|
7
|
+
var toast = _ref.toast,
|
|
8
|
+
layout = _ref.layout;
|
|
9
|
+
var theme = useTheme();
|
|
10
|
+
var _useMemo = useMemo(function () {
|
|
11
|
+
return getColors(theme.palette, toast.type);
|
|
12
|
+
}, [theme.palette, toast.type]),
|
|
13
|
+
color = _useMemo.color,
|
|
14
|
+
bgColor = _useMemo.bgColor;
|
|
15
|
+
var isReactNode = typeof toast.text !== 'string';
|
|
16
|
+
var padding = layout.padding,
|
|
17
|
+
margin = layout.margin,
|
|
18
|
+
maxHeight = layout.maxHeight,
|
|
19
|
+
maxWidth = layout.maxWidth,
|
|
20
|
+
width = layout.width,
|
|
21
|
+
placement = layout.placement;
|
|
22
|
+
var _useMemo2 = useMemo(function () {
|
|
23
|
+
return getTranslateByPlacement(placement);
|
|
24
|
+
}, [placement]),
|
|
25
|
+
enter = _useMemo2.enter,
|
|
26
|
+
leave = _useMemo2.leave;
|
|
27
|
+
return /*#__PURE__*/React.createElement(CssTransition, {
|
|
28
|
+
name: "toast",
|
|
29
|
+
visible: toast.visible,
|
|
30
|
+
clearTime: 350
|
|
31
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
32
|
+
key: toast.id,
|
|
33
|
+
className: _JSXStyle.dynamic([["1407001838", [width, maxWidth, maxHeight, theme.palette.foreground, bgColor, color, theme.layout.radius, theme.expressiveness.shadowSmall, theme.layout.gapHalf, enter, margin, padding, margin, padding, leave]]]) + " " + "toast"
|
|
34
|
+
}, isReactNode ? toast.text : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
35
|
+
className: _JSXStyle.dynamic([["1407001838", [width, maxWidth, maxHeight, theme.palette.foreground, bgColor, color, theme.layout.radius, theme.expressiveness.shadowSmall, theme.layout.gapHalf, enter, margin, padding, margin, padding, leave]]]) + " " + "message"
|
|
36
|
+
}, toast.text), /*#__PURE__*/React.createElement("div", {
|
|
37
|
+
className: _JSXStyle.dynamic([["1407001838", [width, maxWidth, maxHeight, theme.palette.foreground, bgColor, color, theme.layout.radius, theme.expressiveness.shadowSmall, theme.layout.gapHalf, enter, margin, padding, margin, padding, leave]]]) + " " + "action"
|
|
38
|
+
}, makeToastActions(toast.actions, toast.cancel))), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
39
|
+
id: "1407001838",
|
|
40
|
+
dynamic: [width, maxWidth, maxHeight, theme.palette.foreground, bgColor, color, theme.layout.radius, theme.expressiveness.shadowSmall, theme.layout.gapHalf, enter, margin, padding, margin, padding, leave]
|
|
41
|
+
}, ".toast.__jsx-style-dynamic-selector{width:".concat(width, ";max-width:").concat(maxWidth, ";max-height:").concat(maxHeight, ";display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:").concat(theme.palette.foreground, ";background-color:").concat(bgColor, ";color:").concat(color, ";border:0;border-radius:").concat(theme.layout.radius, ";opacity:1;box-shadow:").concat(theme.expressiveness.shadowSmall, ";-webkit-transition:all 350ms cubic-bezier(0.1,0.2,0.1,1);transition:all 350ms cubic-bezier(0.1,0.2,0.1,1);overflow:hidden;}.message.__jsx-style-dynamic-selector{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;height:100%;font-size:0.875em;display:-webkit-box;word-break:break-all;padding-right:").concat(theme.layout.gapHalf, ";overflow:hidden;max-height:100%;text-overflow:ellipsis;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-height:1.1rem;}.toast-enter.__jsx-style-dynamic-selector{opacity:0;height:0;padding:0;margin:0;-webkit-transform:").concat(enter, ";-ms-transform:").concat(enter, ";transform:").concat(enter, ";}.toast-enter-active.__jsx-style-dynamic-selector{opacity:1;height:auto;margin:").concat(margin, ";padding:").concat(padding, ";-webkit-transform:translate(0,0);-ms-transform:translate(0,0);transform:translate(0,0);}.toast-leave.__jsx-style-dynamic-selector{opacity:1;-webkit-transform:translate(0,0);-ms-transform:translate(0,0);transform:translate(0,0);height:auto;margin:").concat(margin, ";padding:").concat(padding, ";}.toast-leave-active.__jsx-style-dynamic-selector{opacity:0;-webkit-transform:").concat(leave, ";-ms-transform:").concat(leave, ";transform:").concat(leave, ";}"))));
|
|
42
|
+
});
|
|
43
|
+
export default ToastItem;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import React, { CSSProperties } from 'react';
|
|
2
|
+
import type { NormalTypes } from "../utils/prop-types";
|
|
3
|
+
import { ToastPlacement } from "./helpers";
|
|
4
|
+
export interface ToastAction {
|
|
5
|
+
name: string;
|
|
6
|
+
handler: (event: React.MouseEvent<HTMLButtonElement>, cancel: () => void) => void;
|
|
7
|
+
passive?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export type ToastTypes = NormalTypes;
|
|
10
|
+
export type ToastLayout = {
|
|
11
|
+
padding?: CSSProperties['padding'];
|
|
12
|
+
margin?: CSSProperties['margin'];
|
|
13
|
+
width?: CSSProperties['width'];
|
|
14
|
+
maxWidth?: CSSProperties['maxWidth'];
|
|
15
|
+
maxHeight?: CSSProperties['maxHeight'];
|
|
16
|
+
placement?: ToastPlacement;
|
|
17
|
+
};
|
|
18
|
+
export interface ToastInput {
|
|
19
|
+
text: string | React.ReactNode;
|
|
20
|
+
type?: ToastTypes;
|
|
21
|
+
id?: string;
|
|
22
|
+
delay?: number;
|
|
23
|
+
actions?: Array<ToastAction>;
|
|
24
|
+
}
|
|
25
|
+
export type ToastInstance = {
|
|
26
|
+
visible: boolean;
|
|
27
|
+
cancel: () => void;
|
|
28
|
+
_timeout: null | number;
|
|
29
|
+
_internalIdent: string;
|
|
30
|
+
};
|
|
31
|
+
export type Toast = Required<ToastInput> & ToastInstance;
|
|
32
|
+
export type ToastHooksResult = {
|
|
33
|
+
toasts: Array<Toast>;
|
|
34
|
+
setToast: (toast: ToastInput) => void;
|
|
35
|
+
removeAll: () => void;
|
|
36
|
+
findToastOneByID: (ident: string) => Toast | undefined;
|
|
37
|
+
removeToastOneByID: (ident: string) => void;
|
|
38
|
+
};
|
|
39
|
+
declare const useToasts: (layout?: ToastLayout) => ToastHooksResult;
|
|
40
|
+
export default useToasts;
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
4
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
5
|
+
import { useEffect } from 'react';
|
|
6
|
+
import { defaultToastLayout, useHUIContext } from '../utils/use-hd-ui-context';
|
|
7
|
+
import { getId } from '../utils/collections';
|
|
8
|
+
var defaultToast = {
|
|
9
|
+
delay: 2000,
|
|
10
|
+
type: 'default'
|
|
11
|
+
};
|
|
12
|
+
var useToasts = function useToasts(layout) {
|
|
13
|
+
var _useHUIContext = useHUIContext(),
|
|
14
|
+
updateToasts = _useHUIContext.updateToasts,
|
|
15
|
+
toasts = _useHUIContext.toasts,
|
|
16
|
+
updateToastLayout = _useHUIContext.updateToastLayout,
|
|
17
|
+
updateLastToastId = _useHUIContext.updateLastToastId;
|
|
18
|
+
useEffect(function () {
|
|
19
|
+
if (!layout) return;
|
|
20
|
+
updateToastLayout(function () {
|
|
21
|
+
return layout ? _extends({}, defaultToastLayout, layout) : defaultToastLayout;
|
|
22
|
+
});
|
|
23
|
+
}, []);
|
|
24
|
+
var _cancel = function cancel(internalId) {
|
|
25
|
+
updateToasts(function (currentToasts) {
|
|
26
|
+
return currentToasts.map(function (item) {
|
|
27
|
+
if (item._internalIdent !== internalId) return item;
|
|
28
|
+
return _extends({}, item, {
|
|
29
|
+
visible: false
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
updateLastToastId(function () {
|
|
34
|
+
return internalId;
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
var removeAll = function removeAll() {
|
|
38
|
+
updateToasts(function (last) {
|
|
39
|
+
return last.map(function (toast) {
|
|
40
|
+
return _extends({}, toast, {
|
|
41
|
+
visible: false
|
|
42
|
+
});
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
};
|
|
46
|
+
var findToastOneByID = function findToastOneByID(id) {
|
|
47
|
+
return toasts.find(function (t) {
|
|
48
|
+
return t.id === id;
|
|
49
|
+
});
|
|
50
|
+
};
|
|
51
|
+
var removeToastOneByID = function removeToastOneByID(id) {
|
|
52
|
+
updateToasts(function (last) {
|
|
53
|
+
return last.map(function (toast) {
|
|
54
|
+
if (toast.id !== id) return toast;
|
|
55
|
+
return _extends({}, toast, {
|
|
56
|
+
visible: false
|
|
57
|
+
});
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
};
|
|
61
|
+
var setToast = function setToast(toast) {
|
|
62
|
+
var internalIdent = "toast-".concat(getId());
|
|
63
|
+
var delay = toast.delay || defaultToast.delay;
|
|
64
|
+
if (toast.id) {
|
|
65
|
+
var hasIdent = toasts.find(function (t) {
|
|
66
|
+
return t.id === toast.id;
|
|
67
|
+
});
|
|
68
|
+
if (hasIdent) {
|
|
69
|
+
throw new Error('Toast: Already have the same key: "ident"');
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
updateToasts(function (last) {
|
|
73
|
+
var newToast = {
|
|
74
|
+
delay: delay,
|
|
75
|
+
text: toast.text,
|
|
76
|
+
visible: true,
|
|
77
|
+
type: toast.type || defaultToast.type,
|
|
78
|
+
id: toast.id || internalIdent,
|
|
79
|
+
actions: toast.actions || [],
|
|
80
|
+
_internalIdent: internalIdent,
|
|
81
|
+
_timeout: window.setTimeout(function () {
|
|
82
|
+
_cancel(internalIdent);
|
|
83
|
+
if (newToast._timeout) {
|
|
84
|
+
window.clearTimeout(newToast._timeout);
|
|
85
|
+
newToast._timeout = null;
|
|
86
|
+
}
|
|
87
|
+
}, delay),
|
|
88
|
+
cancel: function cancel() {
|
|
89
|
+
return _cancel(internalIdent);
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
return [].concat(_toConsumableArray(last), [newToast]);
|
|
93
|
+
});
|
|
94
|
+
};
|
|
95
|
+
return {
|
|
96
|
+
toasts: toasts,
|
|
97
|
+
setToast: setToast,
|
|
98
|
+
removeAll: removeAll,
|
|
99
|
+
findToastOneByID: findToastOneByID,
|
|
100
|
+
removeToastOneByID: removeToastOneByID
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
export default useToasts;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface Props {
|
|
3
|
+
href?: string;
|
|
4
|
+
className?: string;
|
|
5
|
+
}
|
|
6
|
+
type NativeAttrs = Omit<React.AnchorHTMLAttributes<any>, keyof Props>;
|
|
7
|
+
export type UserLinkProps = Props & NativeAttrs;
|
|
8
|
+
declare const UserLink: React.ForwardRefExoticComponent<Props & NativeAttrs & {
|
|
9
|
+
children?: React.ReactNode;
|
|
10
|
+
} & React.RefAttributes<HTMLAnchorElement>>;
|
|
11
|
+
export default UserLink;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["href", "className", "children"];
|
|
4
|
+
import _JSXStyle from "../styled-jsx.es.js";
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import Link from '../link';
|
|
7
|
+
var UserLink = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
8
|
+
var href = _ref.href,
|
|
9
|
+
_ref$className = _ref.className,
|
|
10
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
11
|
+
children = _ref.children,
|
|
12
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
13
|
+
return /*#__PURE__*/React.createElement("div", _extends({}, props, {
|
|
14
|
+
className: "jsx-3263947648" + " " + (props && props.className != null && props.className || className || "")
|
|
15
|
+
}), /*#__PURE__*/React.createElement(Link, {
|
|
16
|
+
ref: ref,
|
|
17
|
+
href: href,
|
|
18
|
+
showColor: true,
|
|
19
|
+
target: "_blank",
|
|
20
|
+
rel: "noopener"
|
|
21
|
+
}, children), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
22
|
+
id: "3263947648"
|
|
23
|
+
}, "div.jsx-3263947648 a:hover{opacity:0.7;}"));
|
|
24
|
+
});
|
|
25
|
+
UserLink.displayName = 'UserLink';
|
|
26
|
+
export default UserLink;
|