@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,188 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import { addColorAlpha } from '../utils/color';
|
|
3
|
+
export var getButtonGhostColors = function getButtonGhostColors(palette, type) {
|
|
4
|
+
var colors = {
|
|
5
|
+
secondary: {
|
|
6
|
+
bg: palette.background,
|
|
7
|
+
border: palette.foreground,
|
|
8
|
+
color: palette.foreground
|
|
9
|
+
},
|
|
10
|
+
success: {
|
|
11
|
+
bg: palette.background,
|
|
12
|
+
border: palette.success,
|
|
13
|
+
color: palette.success
|
|
14
|
+
},
|
|
15
|
+
warning: {
|
|
16
|
+
bg: palette.background,
|
|
17
|
+
border: palette.warning,
|
|
18
|
+
color: palette.warning
|
|
19
|
+
},
|
|
20
|
+
error: {
|
|
21
|
+
bg: palette.background,
|
|
22
|
+
border: palette.error,
|
|
23
|
+
color: palette.error
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
return colors[type] || null;
|
|
27
|
+
};
|
|
28
|
+
export var getButtonColors = function getButtonColors(palette, props) {
|
|
29
|
+
var type = props.type,
|
|
30
|
+
disabled = props.disabled,
|
|
31
|
+
ghost = props.ghost;
|
|
32
|
+
var colors = {
|
|
33
|
+
"default": {
|
|
34
|
+
bg: palette.background,
|
|
35
|
+
border: palette.border,
|
|
36
|
+
color: palette.accents_5
|
|
37
|
+
},
|
|
38
|
+
secondary: {
|
|
39
|
+
bg: palette.foreground,
|
|
40
|
+
border: palette.foreground,
|
|
41
|
+
color: palette.background
|
|
42
|
+
},
|
|
43
|
+
success: {
|
|
44
|
+
bg: palette.success,
|
|
45
|
+
border: palette.success,
|
|
46
|
+
color: '#fff'
|
|
47
|
+
},
|
|
48
|
+
warning: {
|
|
49
|
+
bg: palette.warning,
|
|
50
|
+
border: palette.warning,
|
|
51
|
+
color: '#fff'
|
|
52
|
+
},
|
|
53
|
+
error: {
|
|
54
|
+
bg: palette.error,
|
|
55
|
+
border: palette.error,
|
|
56
|
+
color: '#fff'
|
|
57
|
+
},
|
|
58
|
+
abort: {
|
|
59
|
+
bg: 'transparent',
|
|
60
|
+
border: 'transparent',
|
|
61
|
+
color: palette.accents_5
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
if (disabled) return {
|
|
65
|
+
bg: palette.accents_1,
|
|
66
|
+
border: palette.accents_2,
|
|
67
|
+
color: '#ccc'
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* The '-light' type is the same color as the common type,
|
|
72
|
+
* only hover's color is different.
|
|
73
|
+
* e.g.
|
|
74
|
+
* Color['success'] === Color['success-light']
|
|
75
|
+
* Color['warning'] === Color['warning-light']
|
|
76
|
+
*/
|
|
77
|
+
var withoutLightType = type === null || type === void 0 ? void 0 : type.replace('-light', '');
|
|
78
|
+
var defaultColor = colors["default"];
|
|
79
|
+
if (ghost) return getButtonGhostColors(palette, withoutLightType) || defaultColor;
|
|
80
|
+
return colors[withoutLightType] || defaultColor;
|
|
81
|
+
};
|
|
82
|
+
export var getButtonGhostHoverColors = function getButtonGhostHoverColors(palette, type) {
|
|
83
|
+
var colors = {
|
|
84
|
+
secondary: {
|
|
85
|
+
bg: palette.foreground,
|
|
86
|
+
border: palette.background,
|
|
87
|
+
color: palette.background
|
|
88
|
+
},
|
|
89
|
+
success: {
|
|
90
|
+
bg: palette.success,
|
|
91
|
+
border: palette.background,
|
|
92
|
+
color: 'white'
|
|
93
|
+
},
|
|
94
|
+
warning: {
|
|
95
|
+
bg: palette.warning,
|
|
96
|
+
border: palette.background,
|
|
97
|
+
color: 'white'
|
|
98
|
+
},
|
|
99
|
+
error: {
|
|
100
|
+
bg: palette.error,
|
|
101
|
+
border: palette.background,
|
|
102
|
+
color: 'white'
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
var withoutLightType = type.replace('-light', '');
|
|
106
|
+
return colors[withoutLightType] || null;
|
|
107
|
+
};
|
|
108
|
+
export var getButtonHoverColors = function getButtonHoverColors(palette, props) {
|
|
109
|
+
var type = props.type,
|
|
110
|
+
disabled = props.disabled,
|
|
111
|
+
loading = props.loading,
|
|
112
|
+
shadow = props.shadow,
|
|
113
|
+
ghost = props.ghost;
|
|
114
|
+
var defaultColor = getButtonColors(palette, props);
|
|
115
|
+
var alphaBackground = addColorAlpha(defaultColor.bg, 0.85);
|
|
116
|
+
var colors = {
|
|
117
|
+
"default": {
|
|
118
|
+
bg: palette.background,
|
|
119
|
+
border: palette.foreground
|
|
120
|
+
},
|
|
121
|
+
secondary: {
|
|
122
|
+
bg: palette.background,
|
|
123
|
+
border: palette.foreground
|
|
124
|
+
},
|
|
125
|
+
success: {
|
|
126
|
+
bg: palette.background,
|
|
127
|
+
border: palette.success
|
|
128
|
+
},
|
|
129
|
+
warning: {
|
|
130
|
+
bg: palette.background,
|
|
131
|
+
border: palette.warning
|
|
132
|
+
},
|
|
133
|
+
error: {
|
|
134
|
+
bg: palette.background,
|
|
135
|
+
border: palette.error
|
|
136
|
+
},
|
|
137
|
+
abort: {
|
|
138
|
+
bg: 'transparent',
|
|
139
|
+
border: 'transparent',
|
|
140
|
+
color: palette.accents_5
|
|
141
|
+
},
|
|
142
|
+
'secondary-light': _extends({}, defaultColor, {
|
|
143
|
+
bg: alphaBackground
|
|
144
|
+
}),
|
|
145
|
+
'success-light': _extends({}, defaultColor, {
|
|
146
|
+
bg: alphaBackground
|
|
147
|
+
}),
|
|
148
|
+
'warning-light': _extends({}, defaultColor, {
|
|
149
|
+
bg: alphaBackground
|
|
150
|
+
}),
|
|
151
|
+
'error-light': _extends({}, defaultColor, {
|
|
152
|
+
bg: alphaBackground
|
|
153
|
+
})
|
|
154
|
+
};
|
|
155
|
+
if (disabled) return {
|
|
156
|
+
bg: palette.accents_1,
|
|
157
|
+
border: palette.accents_2,
|
|
158
|
+
color: '#ccc'
|
|
159
|
+
};
|
|
160
|
+
if (loading) return _extends({}, defaultColor, {
|
|
161
|
+
color: 'transparent'
|
|
162
|
+
});
|
|
163
|
+
if (shadow) return defaultColor;
|
|
164
|
+
var hoverColor = (ghost ? getButtonGhostHoverColors(palette, type) : colors[type]) || colors["default"];
|
|
165
|
+
return _extends({}, hoverColor, {
|
|
166
|
+
color: hoverColor.color || hoverColor.border
|
|
167
|
+
});
|
|
168
|
+
};
|
|
169
|
+
export var getButtonCursor = function getButtonCursor(disabled, loading) {
|
|
170
|
+
if (disabled) return {
|
|
171
|
+
cursor: 'not-allowed',
|
|
172
|
+
events: 'auto'
|
|
173
|
+
};
|
|
174
|
+
if (loading) return {
|
|
175
|
+
cursor: 'default',
|
|
176
|
+
events: 'none'
|
|
177
|
+
};
|
|
178
|
+
return {
|
|
179
|
+
cursor: 'pointer',
|
|
180
|
+
events: 'auto'
|
|
181
|
+
};
|
|
182
|
+
};
|
|
183
|
+
export var getButtonDripColor = function getButtonDripColor(palette, props) {
|
|
184
|
+
var type = props.type;
|
|
185
|
+
var isLightHover = type ? type.endsWith('light') : false;
|
|
186
|
+
var hoverColors = getButtonHoverColors(palette, props);
|
|
187
|
+
return isLightHover ? addColorAlpha(hoverColors.bg, 0.65) : addColorAlpha(palette.accents_2, 0.65);
|
|
188
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
import { ButtonProps } from "./button";
|
|
3
|
+
import { ButtonGroupConfig } from "../button-group/button-group-context";
|
|
4
|
+
export declare const getButtonChildrenWithIcon: (auto: boolean, children: ReactNode, icons: {
|
|
5
|
+
icon?: React.ReactNode;
|
|
6
|
+
iconRight?: React.ReactNode;
|
|
7
|
+
}) => JSX.Element;
|
|
8
|
+
export declare const filterPropsWithGroup: <T extends React.PropsWithChildren<ButtonProps>>(props: T, config: ButtonGroupConfig) => T;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import _JSXStyle from "../styled-jsx.es.js";
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import ButtonIcon from './button-icon';
|
|
5
|
+
import useClasses from '../use-classes';
|
|
6
|
+
export var getButtonChildrenWithIcon = function getButtonChildrenWithIcon(auto, children, icons) {
|
|
7
|
+
var icon = icons.icon,
|
|
8
|
+
iconRight = icons.iconRight;
|
|
9
|
+
var hasIcon = icon || iconRight;
|
|
10
|
+
var isRight = Boolean(iconRight);
|
|
11
|
+
var paddingForAutoMode = auto ? "calc(var(--geist-ui-button-height) / 2 + var(--geist-ui-button-icon-padding) * .5)" : 0;
|
|
12
|
+
var classes = useClasses('text', isRight ? 'right' : 'left');
|
|
13
|
+
if (!hasIcon) return /*#__PURE__*/React.createElement("div", {
|
|
14
|
+
className: "text"
|
|
15
|
+
}, children);
|
|
16
|
+
if (React.Children.count(children) === 0) {
|
|
17
|
+
return /*#__PURE__*/React.createElement(ButtonIcon, {
|
|
18
|
+
isRight: isRight,
|
|
19
|
+
isSingle: true
|
|
20
|
+
}, hasIcon);
|
|
21
|
+
}
|
|
22
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ButtonIcon, {
|
|
23
|
+
isRight: isRight
|
|
24
|
+
}, hasIcon), /*#__PURE__*/React.createElement("div", {
|
|
25
|
+
className: _JSXStyle.dynamic([["3568181479", [paddingForAutoMode, paddingForAutoMode]]]) + " " + (classes || "")
|
|
26
|
+
}, children, /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
27
|
+
id: "3568181479",
|
|
28
|
+
dynamic: [paddingForAutoMode, paddingForAutoMode]
|
|
29
|
+
}, ".left.__jsx-style-dynamic-selector{padding-left:".concat(paddingForAutoMode, ";}.right.__jsx-style-dynamic-selector{padding-right:").concat(paddingForAutoMode, ";}"))));
|
|
30
|
+
};
|
|
31
|
+
export var filterPropsWithGroup = function filterPropsWithGroup(props, config) {
|
|
32
|
+
if (!config.isButtonGroup) return props;
|
|
33
|
+
return _extends({}, props, {
|
|
34
|
+
auto: true,
|
|
35
|
+
shadow: false,
|
|
36
|
+
ghost: config.ghost || props.ghost,
|
|
37
|
+
type: config.type || props.type,
|
|
38
|
+
disabled: config.disabled || props.disabled
|
|
39
|
+
});
|
|
40
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { NormalTypes } from "../utils/prop-types";
|
|
3
|
+
export interface ButtonDropdownConfig {
|
|
4
|
+
type?: NormalTypes;
|
|
5
|
+
auto?: boolean;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
loading?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare const ButtonDropdownContext: React.Context<ButtonDropdownConfig>;
|
|
10
|
+
export declare const useButtonDropdown: () => ButtonDropdownConfig;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
var defaultContext = {
|
|
3
|
+
type: 'default',
|
|
4
|
+
auto: false,
|
|
5
|
+
disabled: false,
|
|
6
|
+
loading: false
|
|
7
|
+
};
|
|
8
|
+
export var ButtonDropdownContext = /*#__PURE__*/React.createContext(defaultContext);
|
|
9
|
+
export var useButtonDropdown = function useButtonDropdown() {
|
|
10
|
+
return React.useContext(ButtonDropdownContext);
|
|
11
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { NormalTypes } from "../utils/prop-types";
|
|
3
|
+
export type ButtonDropdownItemTypes = NormalTypes;
|
|
4
|
+
interface Props {
|
|
5
|
+
main?: boolean;
|
|
6
|
+
type?: ButtonDropdownItemTypes;
|
|
7
|
+
onClick?: React.MouseEventHandler<HTMLElement>;
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
type NativeAttrs = Omit<React.ButtonHTMLAttributes<any>, keyof Props>;
|
|
11
|
+
export type ButtonDropdownItemProps = Props & NativeAttrs;
|
|
12
|
+
declare const ButtonDropdownItem: React.FC<React.PropsWithChildren<ButtonDropdownItemProps>>;
|
|
13
|
+
export default ButtonDropdownItem;
|
|
@@ -0,0 +1,47 @@
|
|
|
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", "onClick", "className", "main", "type"];
|
|
6
|
+
import _JSXStyle from "../styled-jsx.es.js";
|
|
7
|
+
import React, { useMemo } from 'react';
|
|
8
|
+
import useTheme from '../use-theme';
|
|
9
|
+
import { getColor } from './styles';
|
|
10
|
+
import { useButtonDropdown } from './button-dropdown-context';
|
|
11
|
+
import Loading from '../loading';
|
|
12
|
+
var ButtonDropdownItem = function ButtonDropdownItem(_ref) {
|
|
13
|
+
var children = _ref.children,
|
|
14
|
+
_ref$onClick = _ref.onClick,
|
|
15
|
+
onClick = _ref$onClick === void 0 ? function () {} : _ref$onClick,
|
|
16
|
+
_ref$className = _ref.className,
|
|
17
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
18
|
+
_ref$main = _ref.main,
|
|
19
|
+
main = _ref$main === void 0 ? false : _ref$main,
|
|
20
|
+
selfType = _ref.type,
|
|
21
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
22
|
+
var theme = useTheme();
|
|
23
|
+
var _useButtonDropdown = useButtonDropdown(),
|
|
24
|
+
parentType = _useButtonDropdown.type,
|
|
25
|
+
disabled = _useButtonDropdown.disabled,
|
|
26
|
+
loading = _useButtonDropdown.loading;
|
|
27
|
+
var type = main ? parentType : selfType;
|
|
28
|
+
var colors = getColor(theme.palette, type, disabled);
|
|
29
|
+
var clickHandler = function clickHandler(event) {
|
|
30
|
+
if (disabled || loading) return;
|
|
31
|
+
onClick && onClick(event);
|
|
32
|
+
};
|
|
33
|
+
var cursor = useMemo(function () {
|
|
34
|
+
if (loading) return 'default';
|
|
35
|
+
return disabled ? 'not-allowed' : 'pointer';
|
|
36
|
+
}, [loading, disabled]);
|
|
37
|
+
return /*#__PURE__*/React.createElement("button", _extends({
|
|
38
|
+
onClick: clickHandler
|
|
39
|
+
}, props, {
|
|
40
|
+
className: _JSXStyle.dynamic([["772098729", [cursor, colors.bgColor, colors.color, colors.hoverBorder, colors.hoverBgColor]]]) + " " + (props && props.className != null && props.className || className || "")
|
|
41
|
+
}), loading ? /*#__PURE__*/React.createElement(Loading, null) : children, /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
42
|
+
id: "772098729",
|
|
43
|
+
dynamic: [cursor, colors.bgColor, colors.color, colors.hoverBorder, colors.hoverBgColor]
|
|
44
|
+
}, "button.__jsx-style-dynamic-selector{position:relative;-webkit-appearance:button;text-rendering:auto;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-flex:1;-ms-flex:1;flex:1;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;vertical-align:middle;text-align:center;cursor:".concat(cursor, ";box-sizing:border-box;margin:0;border:none;background-color:").concat(colors.bgColor, ";color:").concat(colors.color, ";width:100%;height:var(--geist-ui-dropdown-height);min-width:var(--geist-ui-dropdown-min-width);padding:var(--geist-ui-dropdown-padding);font-size:var(--geist-ui-dropdown-font-size);}button.__jsx-style-dynamic-selector:hover{border-color:").concat(colors.hoverBorder, ";background-color:").concat(colors.hoverBgColor, ";}")));
|
|
45
|
+
};
|
|
46
|
+
ButtonDropdownItem.displayName = 'ButtonDropdownItem';
|
|
47
|
+
export default ButtonDropdownItem;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { NormalTypes } from "../utils/prop-types";
|
|
3
|
+
export type ButtonDropdownTypes = NormalTypes;
|
|
4
|
+
interface Props {
|
|
5
|
+
type?: ButtonDropdownTypes;
|
|
6
|
+
auto?: boolean;
|
|
7
|
+
loading?: boolean;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
className?: string;
|
|
10
|
+
icon?: React.ReactNode;
|
|
11
|
+
}
|
|
12
|
+
type NativeAttrs = Omit<React.HTMLAttributes<any>, keyof Props>;
|
|
13
|
+
export type ButtonDropdownProps = Props & NativeAttrs;
|
|
14
|
+
declare const ButtonDropdown: React.ForwardRefExoticComponent<Props & NativeAttrs & {
|
|
15
|
+
children?: React.ReactNode;
|
|
16
|
+
} & {
|
|
17
|
+
width?: string | number | undefined;
|
|
18
|
+
height?: string | number | undefined;
|
|
19
|
+
padding?: string | number | undefined;
|
|
20
|
+
margin?: string | number | undefined;
|
|
21
|
+
w?: string | number | undefined;
|
|
22
|
+
h?: string | number | undefined;
|
|
23
|
+
paddingLeft?: string | number | undefined;
|
|
24
|
+
paddingRight?: string | number | undefined;
|
|
25
|
+
paddingTop?: string | number | undefined;
|
|
26
|
+
paddingBottom?: string | number | undefined;
|
|
27
|
+
pl?: string | number | undefined;
|
|
28
|
+
pr?: string | number | undefined;
|
|
29
|
+
pt?: string | number | undefined;
|
|
30
|
+
pb?: string | number | undefined;
|
|
31
|
+
marginLeft?: string | number | undefined;
|
|
32
|
+
marginRight?: string | number | undefined;
|
|
33
|
+
marginTop?: string | number | undefined;
|
|
34
|
+
marginBottom?: string | number | undefined;
|
|
35
|
+
ml?: string | number | undefined;
|
|
36
|
+
mr?: string | number | undefined;
|
|
37
|
+
mt?: string | number | undefined;
|
|
38
|
+
mb?: string | number | undefined;
|
|
39
|
+
px?: string | number | undefined;
|
|
40
|
+
py?: string | number | undefined;
|
|
41
|
+
mx?: string | number | undefined;
|
|
42
|
+
my?: string | number | undefined;
|
|
43
|
+
font?: string | number | undefined;
|
|
44
|
+
unit?: string | undefined;
|
|
45
|
+
scale?: number | undefined;
|
|
46
|
+
children?: any;
|
|
47
|
+
className?: string | undefined;
|
|
48
|
+
} & React.InputHTMLAttributes<any> & React.RefAttributes<unknown>>;
|
|
49
|
+
export default ButtonDropdown;
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
5
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
6
|
+
var _excluded = ["children", "type", "auto", "className", "disabled", "loading", "icon"];
|
|
7
|
+
import _JSXStyle from "../styled-jsx.es.js";
|
|
8
|
+
import React, { useCallback, useMemo, useRef, useState } from 'react';
|
|
9
|
+
import useTheme from '../use-theme';
|
|
10
|
+
import useClickAway from '../utils/use-click-away';
|
|
11
|
+
import { getColor } from './styles';
|
|
12
|
+
import ButtonDropdownIcon from './icon';
|
|
13
|
+
import ButtonDropdownItem from './button-dropdown-item';
|
|
14
|
+
import { ButtonDropdownContext } from './button-dropdown-context';
|
|
15
|
+
import { pickChild, pickChildByProps } from '../utils/collections';
|
|
16
|
+
import useScale, { withScale } from '../use-scale';
|
|
17
|
+
import useClasses from '../use-classes';
|
|
18
|
+
var stopPropagation = function stopPropagation(event) {
|
|
19
|
+
event.stopPropagation();
|
|
20
|
+
event.nativeEvent.stopImmediatePropagation();
|
|
21
|
+
};
|
|
22
|
+
var ButtonDropdownComponent = function ButtonDropdownComponent(_ref) {
|
|
23
|
+
var children = _ref.children,
|
|
24
|
+
_ref$type = _ref.type,
|
|
25
|
+
type = _ref$type === void 0 ? 'default' : _ref$type,
|
|
26
|
+
_ref$auto = _ref.auto,
|
|
27
|
+
auto = _ref$auto === void 0 ? false : _ref$auto,
|
|
28
|
+
_ref$className = _ref.className,
|
|
29
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
30
|
+
_ref$disabled = _ref.disabled,
|
|
31
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
32
|
+
_ref$loading = _ref.loading,
|
|
33
|
+
loading = _ref$loading === void 0 ? false : _ref$loading,
|
|
34
|
+
icon = _ref.icon,
|
|
35
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
36
|
+
var _useScale = useScale(),
|
|
37
|
+
SCALES = _useScale.SCALES;
|
|
38
|
+
var ref = useRef(null);
|
|
39
|
+
var theme = useTheme();
|
|
40
|
+
var colors = getColor(theme.palette, type);
|
|
41
|
+
var itemChildren = pickChild(children, ButtonDropdownItem)[1];
|
|
42
|
+
var _pickChildByProps = pickChildByProps(itemChildren, 'main', true),
|
|
43
|
+
_pickChildByProps2 = _slicedToArray(_pickChildByProps, 2),
|
|
44
|
+
itemChildrenWithoutMain = _pickChildByProps2[0],
|
|
45
|
+
mainItemChildren = _pickChildByProps2[1];
|
|
46
|
+
var _useState = useState(false),
|
|
47
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
48
|
+
visible = _useState2[0],
|
|
49
|
+
setVisible = _useState2[1];
|
|
50
|
+
var clickHandler = useCallback(function (event) {
|
|
51
|
+
event.preventDefault();
|
|
52
|
+
stopPropagation(event);
|
|
53
|
+
if (disabled || loading) return;
|
|
54
|
+
setVisible(!visible);
|
|
55
|
+
}, [visible]);
|
|
56
|
+
var initialValue = {
|
|
57
|
+
type: type,
|
|
58
|
+
auto: auto,
|
|
59
|
+
disabled: disabled,
|
|
60
|
+
loading: loading
|
|
61
|
+
};
|
|
62
|
+
var bgColor = useMemo(function () {
|
|
63
|
+
if (disabled || loading) return theme.palette.accents_1;
|
|
64
|
+
return visible ? colors.hoverBgColor : colors.bgColor;
|
|
65
|
+
}, [visible, colors, theme.palette]);
|
|
66
|
+
var paddingLeft = auto ? SCALES.pl(1.15) : SCALES.pl(1.375),
|
|
67
|
+
paddingRight = auto ? SCALES.pr(1.15) : SCALES.pr(1.375);
|
|
68
|
+
useClickAway(ref, function () {
|
|
69
|
+
return setVisible(false);
|
|
70
|
+
});
|
|
71
|
+
return /*#__PURE__*/React.createElement(ButtonDropdownContext.Provider, {
|
|
72
|
+
value: initialValue
|
|
73
|
+
}, /*#__PURE__*/React.createElement("div", _extends({
|
|
74
|
+
ref: ref,
|
|
75
|
+
onClick: stopPropagation
|
|
76
|
+
}, props, {
|
|
77
|
+
className: _JSXStyle.dynamic([["1706659335", [theme.palette.border, theme.layout.radius, SCALES.height(2.5), auto ? 'min-content' : SCALES.width(10.5), SCALES.pt(0), paddingRight, SCALES.pb(0), paddingLeft, SCALES.font(0.875), theme.layout.radius, theme.layout.radius, theme.layout.radius, theme.layout.radius, SCALES.height(2.5), colors.color, bgColor, SCALES.height(2.5), colors.borderLeftColor, disabled || loading ? 'not-allowed' : 'pointer', colors.hoverBorder, colors.hoverBgColor, theme.layout.radius, theme.expressiveness.shadowLarge, theme.layout.gapHalf, theme.palette.background, theme.layout.radius, theme.layout.radius, theme.layout.radius, theme.layout.radius]]]) + " " + (props && props.className != null && props.className || useClasses('btn-dropdown', className) || "")
|
|
78
|
+
}), mainItemChildren, /*#__PURE__*/React.createElement("details", {
|
|
79
|
+
open: visible,
|
|
80
|
+
className: _JSXStyle.dynamic([["1706659335", [theme.palette.border, theme.layout.radius, SCALES.height(2.5), auto ? 'min-content' : SCALES.width(10.5), SCALES.pt(0), paddingRight, SCALES.pb(0), paddingLeft, SCALES.font(0.875), theme.layout.radius, theme.layout.radius, theme.layout.radius, theme.layout.radius, SCALES.height(2.5), colors.color, bgColor, SCALES.height(2.5), colors.borderLeftColor, disabled || loading ? 'not-allowed' : 'pointer', colors.hoverBorder, colors.hoverBgColor, theme.layout.radius, theme.expressiveness.shadowLarge, theme.layout.gapHalf, theme.palette.background, theme.layout.radius, theme.layout.radius, theme.layout.radius, theme.layout.radius]]])
|
|
81
|
+
}, /*#__PURE__*/React.createElement("summary", {
|
|
82
|
+
onClick: clickHandler,
|
|
83
|
+
className: _JSXStyle.dynamic([["1706659335", [theme.palette.border, theme.layout.radius, SCALES.height(2.5), auto ? 'min-content' : SCALES.width(10.5), SCALES.pt(0), paddingRight, SCALES.pb(0), paddingLeft, SCALES.font(0.875), theme.layout.radius, theme.layout.radius, theme.layout.radius, theme.layout.radius, SCALES.height(2.5), colors.color, bgColor, SCALES.height(2.5), colors.borderLeftColor, disabled || loading ? 'not-allowed' : 'pointer', colors.hoverBorder, colors.hoverBgColor, theme.layout.radius, theme.expressiveness.shadowLarge, theme.layout.gapHalf, theme.palette.background, theme.layout.radius, theme.layout.radius, theme.layout.radius, theme.layout.radius]]])
|
|
84
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
85
|
+
className: _JSXStyle.dynamic([["1706659335", [theme.palette.border, theme.layout.radius, SCALES.height(2.5), auto ? 'min-content' : SCALES.width(10.5), SCALES.pt(0), paddingRight, SCALES.pb(0), paddingLeft, SCALES.font(0.875), theme.layout.radius, theme.layout.radius, theme.layout.radius, theme.layout.radius, SCALES.height(2.5), colors.color, bgColor, SCALES.height(2.5), colors.borderLeftColor, disabled || loading ? 'not-allowed' : 'pointer', colors.hoverBorder, colors.hoverBgColor, theme.layout.radius, theme.expressiveness.shadowLarge, theme.layout.gapHalf, theme.palette.background, theme.layout.radius, theme.layout.radius, theme.layout.radius, theme.layout.radius]]]) + " " + "dropdown-box"
|
|
86
|
+
}, icon ? /*#__PURE__*/React.createElement("span", {
|
|
87
|
+
style: {
|
|
88
|
+
color: colors.color,
|
|
89
|
+
height: SCALES.height(2.5),
|
|
90
|
+
width: SCALES.height(2.5)
|
|
91
|
+
},
|
|
92
|
+
className: _JSXStyle.dynamic([["1706659335", [theme.palette.border, theme.layout.radius, SCALES.height(2.5), auto ? 'min-content' : SCALES.width(10.5), SCALES.pt(0), paddingRight, SCALES.pb(0), paddingLeft, SCALES.font(0.875), theme.layout.radius, theme.layout.radius, theme.layout.radius, theme.layout.radius, SCALES.height(2.5), colors.color, bgColor, SCALES.height(2.5), colors.borderLeftColor, disabled || loading ? 'not-allowed' : 'pointer', colors.hoverBorder, colors.hoverBgColor, theme.layout.radius, theme.expressiveness.shadowLarge, theme.layout.gapHalf, theme.palette.background, theme.layout.radius, theme.layout.radius, theme.layout.radius, theme.layout.radius]]]) + " " + "dropdown-icon"
|
|
93
|
+
}, icon) : /*#__PURE__*/React.createElement(ButtonDropdownIcon, {
|
|
94
|
+
color: colors.color,
|
|
95
|
+
height: SCALES.height(2.5)
|
|
96
|
+
}))), /*#__PURE__*/React.createElement("div", {
|
|
97
|
+
className: _JSXStyle.dynamic([["1706659335", [theme.palette.border, theme.layout.radius, SCALES.height(2.5), auto ? 'min-content' : SCALES.width(10.5), SCALES.pt(0), paddingRight, SCALES.pb(0), paddingLeft, SCALES.font(0.875), theme.layout.radius, theme.layout.radius, theme.layout.radius, theme.layout.radius, SCALES.height(2.5), colors.color, bgColor, SCALES.height(2.5), colors.borderLeftColor, disabled || loading ? 'not-allowed' : 'pointer', colors.hoverBorder, colors.hoverBgColor, theme.layout.radius, theme.expressiveness.shadowLarge, theme.layout.gapHalf, theme.palette.background, theme.layout.radius, theme.layout.radius, theme.layout.radius, theme.layout.radius]]]) + " " + "content"
|
|
98
|
+
}, itemChildrenWithoutMain)), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
99
|
+
id: "1706659335",
|
|
100
|
+
dynamic: [theme.palette.border, theme.layout.radius, SCALES.height(2.5), auto ? 'min-content' : SCALES.width(10.5), SCALES.pt(0), paddingRight, SCALES.pb(0), paddingLeft, SCALES.font(0.875), theme.layout.radius, theme.layout.radius, theme.layout.radius, theme.layout.radius, SCALES.height(2.5), colors.color, bgColor, SCALES.height(2.5), colors.borderLeftColor, disabled || loading ? 'not-allowed' : 'pointer', colors.hoverBorder, colors.hoverBgColor, theme.layout.radius, theme.expressiveness.shadowLarge, theme.layout.gapHalf, theme.palette.background, theme.layout.radius, theme.layout.radius, theme.layout.radius, theme.layout.radius]
|
|
101
|
+
}, ".btn-dropdown.__jsx-style-dynamic-selector{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;position:relative;box-sizing:border-box;border:1px solid ".concat(theme.palette.border, ";border-radius:").concat(theme.layout.radius, ";--geist-ui-dropdown-height:").concat(SCALES.height(2.5), ";--geist-ui-dropdown-min-width:").concat(auto ? 'min-content' : SCALES.width(10.5), ";--geist-ui-dropdown-padding:").concat(SCALES.pt(0), " ").concat(paddingRight, " ").concat(SCALES.pb(0), " ").concat(paddingLeft, ";--geist-ui-dropdown-font-size:").concat(SCALES.font(0.875), ";}.btn-dropdown.__jsx-style-dynamic-selector>button{border-top-left-radius:").concat(theme.layout.radius, ";border-bottom-left-radius:").concat(theme.layout.radius, ";}details.__jsx-style-dynamic-selector{border-top-right-radius:").concat(theme.layout.radius, ";border-bottom-right-radius:").concat(theme.layout.radius, ";overflow:hidden;}.dropdown-box.__jsx-style-dynamic-selector{height:").concat(SCALES.height(2.5), ";display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;width:auto;}summary.__jsx-style-dynamic-selector{box-sizing:border-box;-webkit-tap-highlight-color:transparent;list-style:none;outline:none;color:").concat(colors.color, ";background-color:").concat(bgColor, ";height:").concat(SCALES.height(2.5), ";border-left:1px solid ").concat(colors.borderLeftColor, ";cursor:").concat(disabled || loading ? 'not-allowed' : 'pointer', ";display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;width:auto;padding:0 1px;-webkit-transition:background 0.2s ease 0s,border-color 0.2s ease 0s;transition:background 0.2s ease 0s,border-color 0.2s ease 0s;}summary.__jsx-style-dynamic-selector:hover{border-color:").concat(colors.hoverBorder, ";background-color:").concat(colors.hoverBgColor, ";}.content.__jsx-style-dynamic-selector{position:absolute;right:0;left:0;z-index:90;width:100%;border-radius:").concat(theme.layout.radius, ";box-shadow:").concat(theme.expressiveness.shadowLarge, ";-webkit-transform:translateY(").concat(theme.layout.gapHalf, ");-ms-transform:translateY(").concat(theme.layout.gapHalf, ");transform:translateY(").concat(theme.layout.gapHalf, ");background-color:").concat(theme.palette.background, ";}.content.__jsx-style-dynamic-selector>button:first-of-type{border-top-left-radius:").concat(theme.layout.radius, ";border-top-right-radius:").concat(theme.layout.radius, ";}.content.__jsx-style-dynamic-selector>button:last-of-type{border-bottom-left-radius:").concat(theme.layout.radius, ";border-bottom-right-radius:").concat(theme.layout.radius, ";}.dropdown-icon.__jsx-style-dynamic-selector{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-transform:scale(0.6);-ms-transform:scale(0.6);transform:scale(0.6);}"))));
|
|
102
|
+
};
|
|
103
|
+
ButtonDropdownComponent.displayName = 'ButtonDropdown';
|
|
104
|
+
var ButtonDropdown = withScale(ButtonDropdownComponent);
|
|
105
|
+
export default ButtonDropdown;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import _JSXStyle from "../styled-jsx.es.js";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
var ButtonDropdownIcon = function ButtonDropdownIcon(_ref) {
|
|
4
|
+
var color = _ref.color,
|
|
5
|
+
height = _ref.height;
|
|
6
|
+
return /*#__PURE__*/React.createElement("svg", {
|
|
7
|
+
stroke: color,
|
|
8
|
+
style: {
|
|
9
|
+
color: color
|
|
10
|
+
},
|
|
11
|
+
viewBox: "0 0 24 24",
|
|
12
|
+
width: height,
|
|
13
|
+
height: height,
|
|
14
|
+
strokeWidth: "1",
|
|
15
|
+
strokeLinecap: "round",
|
|
16
|
+
strokeLinejoin: "round",
|
|
17
|
+
fill: "none",
|
|
18
|
+
shapeRendering: "geometricPrecision",
|
|
19
|
+
className: "jsx-3359574434"
|
|
20
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
21
|
+
d: "M6 9l6 6 6-6",
|
|
22
|
+
className: "jsx-3359574434"
|
|
23
|
+
}), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
24
|
+
id: "3359574434"
|
|
25
|
+
}, "svg.jsx-3359574434{-webkit-transform:scale(0.6);-ms-transform:scale(0.6);transform:scale(0.6);}"));
|
|
26
|
+
};
|
|
27
|
+
ButtonDropdownIcon.displayName = 'GeistButtonDropdownIcon';
|
|
28
|
+
export default ButtonDropdownIcon;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import ButtonDropdown from "./button-dropdown";
|
|
2
|
+
import ButtonDropdownItem from "./button-dropdown-item";
|
|
3
|
+
type ButtonDropdownType = typeof ButtonDropdown & {
|
|
4
|
+
Item: typeof ButtonDropdownItem;
|
|
5
|
+
};
|
|
6
|
+
export type { ButtonDropdownProps, ButtonDropdownTypes } from "./button-dropdown";
|
|
7
|
+
export type { ButtonDropdownItemProps, ButtonDropdownItemTypes, } from "./button-dropdown-item";
|
|
8
|
+
declare const _default: ButtonDropdownType;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { HUIThemesPalette } from "../themes/presets";
|
|
2
|
+
import { NormalTypes } from "../utils/prop-types";
|
|
3
|
+
type ButtonDropdownColors = {
|
|
4
|
+
color: string;
|
|
5
|
+
bgColor: string;
|
|
6
|
+
hoverBgColor: string;
|
|
7
|
+
hoverBorder: string;
|
|
8
|
+
borderLeftColor: string;
|
|
9
|
+
};
|
|
10
|
+
export declare const getColor: (palette: HUIThemesPalette, type: NormalTypes | undefined, disabled?: boolean) => ButtonDropdownColors;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
export var getColor = function getColor(palette, type) {
|
|
3
|
+
var disabled = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
4
|
+
var colors = {
|
|
5
|
+
"default": {
|
|
6
|
+
color: palette.accents_5,
|
|
7
|
+
bgColor: palette.background,
|
|
8
|
+
borderLeftColor: palette.accents_2,
|
|
9
|
+
hoverBgColor: palette.accents_1,
|
|
10
|
+
hoverBorder: palette.accents_2
|
|
11
|
+
},
|
|
12
|
+
secondary: {
|
|
13
|
+
color: palette.background,
|
|
14
|
+
bgColor: palette.foreground,
|
|
15
|
+
borderLeftColor: palette.accents_7,
|
|
16
|
+
hoverBgColor: palette.accents_7,
|
|
17
|
+
hoverBorder: palette.accents_7
|
|
18
|
+
},
|
|
19
|
+
success: {
|
|
20
|
+
color: palette.background,
|
|
21
|
+
bgColor: palette.success,
|
|
22
|
+
borderLeftColor: palette.successDark,
|
|
23
|
+
hoverBgColor: palette.successDark,
|
|
24
|
+
hoverBorder: palette.successDark
|
|
25
|
+
},
|
|
26
|
+
warning: {
|
|
27
|
+
color: palette.background,
|
|
28
|
+
bgColor: palette.warning,
|
|
29
|
+
borderLeftColor: palette.warningDark,
|
|
30
|
+
hoverBgColor: palette.warningDark,
|
|
31
|
+
hoverBorder: palette.warningDark
|
|
32
|
+
},
|
|
33
|
+
error: {
|
|
34
|
+
color: palette.background,
|
|
35
|
+
bgColor: palette.error,
|
|
36
|
+
borderLeftColor: palette.errorDark,
|
|
37
|
+
hoverBgColor: palette.errorDark,
|
|
38
|
+
hoverBorder: palette.errorDark
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
if (disabled) return _extends({}, colors["default"], {
|
|
42
|
+
bgColor: palette.accents_1,
|
|
43
|
+
color: palette.accents_4
|
|
44
|
+
});
|
|
45
|
+
return type ? colors[type] : colors["default"];
|
|
46
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ButtonTypes } from "../utils/prop-types";
|
|
3
|
+
export interface ButtonGroupConfig {
|
|
4
|
+
type?: ButtonTypes;
|
|
5
|
+
ghost?: boolean;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
isButtonGroup: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare const ButtonGroupContext: React.Context<ButtonGroupConfig>;
|
|
10
|
+
export declare const useButtonGroupContext: () => ButtonGroupConfig;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
var defaultContext = {
|
|
3
|
+
isButtonGroup: false,
|
|
4
|
+
disabled: false
|
|
5
|
+
};
|
|
6
|
+
export var ButtonGroupContext = /*#__PURE__*/React.createContext(defaultContext);
|
|
7
|
+
export var useButtonGroupContext = function useButtonGroupContext() {
|
|
8
|
+
return React.useContext(ButtonGroupContext);
|
|
9
|
+
};
|