@sk-web-gui/core 0.1.41 → 0.1.43
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/LICENSE +21 -21
- package/README.md +5 -5
- package/dist/cjs/colors.js +140 -0
- package/dist/cjs/colors.js.map +1 -0
- package/dist/cjs/components/accordion.js +86 -0
- package/dist/cjs/components/accordion.js.map +1 -0
- package/dist/cjs/components/alert.js +71 -0
- package/dist/cjs/components/alert.js.map +1 -0
- package/dist/cjs/components/avatar.js +78 -0
- package/dist/cjs/components/avatar.js.map +1 -0
- package/dist/cjs/components/badge.js +53 -0
- package/dist/cjs/components/badge.js.map +1 -0
- package/dist/cjs/components/breadcrumb.js +23 -0
- package/dist/cjs/components/breadcrumb.js.map +1 -0
- package/dist/cjs/components/button-group.js +50 -0
- package/dist/cjs/components/button-group.js.map +1 -0
- package/dist/cjs/components/button.js +154 -0
- package/dist/cjs/components/button.js.map +1 -0
- package/dist/cjs/components/calendar.js +76 -0
- package/dist/cjs/components/calendar.js.map +1 -0
- package/dist/cjs/components/card.js +59 -0
- package/dist/cjs/components/card.js.map +1 -0
- package/dist/cjs/components/checkbox.js +92 -0
- package/dist/cjs/components/checkbox.js.map +1 -0
- package/dist/cjs/components/code.js +21 -0
- package/dist/cjs/components/code.js.map +1 -0
- package/dist/cjs/components/cookie-consent.js +35 -0
- package/dist/cjs/components/cookie-consent.js.map +1 -0
- package/dist/cjs/components/divider.js +24 -0
- package/dist/cjs/components/divider.js.map +1 -0
- package/dist/cjs/components/dot.js +70 -0
- package/dist/cjs/components/dot.js.map +1 -0
- package/dist/cjs/components/footer.js +39 -0
- package/dist/cjs/components/footer.js.map +1 -0
- package/dist/cjs/components/forms.js +225 -0
- package/dist/cjs/components/forms.js.map +1 -0
- package/dist/cjs/components/header.js +34 -0
- package/dist/cjs/components/header.js.map +1 -0
- package/dist/cjs/components/icon-button.js +17 -0
- package/dist/cjs/components/icon-button.js.map +1 -0
- package/dist/cjs/components/icon.js +20 -0
- package/dist/cjs/components/icon.js.map +1 -0
- package/dist/cjs/components/kbd.js +21 -0
- package/dist/cjs/components/kbd.js.map +1 -0
- package/dist/cjs/components/link.js +29 -0
- package/dist/cjs/components/link.js.map +1 -0
- package/dist/cjs/components/message.js +63 -0
- package/dist/cjs/components/message.js.map +1 -0
- package/dist/cjs/components/modal.js +35 -0
- package/dist/cjs/components/modal.js.map +1 -0
- package/dist/cjs/components/notification.js +58 -0
- package/dist/cjs/components/notification.js.map +1 -0
- package/dist/cjs/components/pagination.js +66 -0
- package/dist/cjs/components/pagination.js.map +1 -0
- package/dist/cjs/components/radio.js +95 -0
- package/dist/cjs/components/radio.js.map +1 -0
- package/dist/cjs/components/switch.js +107 -0
- package/dist/cjs/components/switch.js.map +1 -0
- package/dist/cjs/components/table.js +23 -0
- package/dist/cjs/components/table.js.map +1 -0
- package/dist/cjs/components/tag.js +88 -0
- package/dist/cjs/components/tag.js.map +1 -0
- package/dist/cjs/components/types.js +10 -0
- package/dist/cjs/components/types.js.map +1 -0
- package/dist/cjs/components/user-menu.js +33 -0
- package/dist/cjs/components/user-menu.js.map +1 -0
- package/dist/cjs/components/zebratable.js +70 -0
- package/dist/cjs/components/zebratable.js.map +1 -0
- package/dist/cjs/index.js +282 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/with-opacity.js +15 -0
- package/dist/cjs/with-opacity.js.map +1 -0
- package/dist/esm/colors.js +137 -0
- package/dist/esm/colors.js.map +1 -0
- package/dist/esm/components/accordion.js +76 -0
- package/dist/esm/components/accordion.js.map +1 -0
- package/dist/esm/components/alert.js +67 -0
- package/dist/esm/components/alert.js.map +1 -0
- package/dist/esm/components/avatar.js +68 -0
- package/dist/esm/components/avatar.js.map +1 -0
- package/dist/esm/components/badge.js +48 -0
- package/dist/esm/components/badge.js.map +1 -0
- package/dist/esm/components/breadcrumb.js +13 -0
- package/dist/esm/components/breadcrumb.js.map +1 -0
- package/dist/esm/components/button-group.js +40 -0
- package/dist/esm/components/button-group.js.map +1 -0
- package/dist/esm/components/button.js +197 -0
- package/dist/esm/components/button.js.map +1 -0
- package/dist/esm/components/calendar.js +66 -0
- package/dist/esm/components/calendar.js.map +1 -0
- package/dist/esm/components/card.js +49 -0
- package/dist/esm/components/card.js.map +1 -0
- package/dist/esm/components/checkbox.js +110 -0
- package/dist/esm/components/checkbox.js.map +1 -0
- package/dist/esm/components/code.js +11 -0
- package/dist/esm/components/code.js.map +1 -0
- package/dist/esm/components/cookie-consent.js +25 -0
- package/dist/esm/components/cookie-consent.js.map +1 -0
- package/dist/esm/components/divider.js +14 -0
- package/dist/esm/components/divider.js.map +1 -0
- package/dist/esm/components/dot.js +61 -0
- package/dist/esm/components/dot.js.map +1 -0
- package/dist/esm/components/footer.js +29 -0
- package/dist/esm/components/footer.js.map +1 -0
- package/dist/esm/components/forms.js +217 -0
- package/dist/esm/components/forms.js.map +1 -0
- package/dist/esm/components/header.js +29 -0
- package/dist/esm/components/header.js.map +1 -0
- package/dist/esm/components/icon-button.js +7 -0
- package/dist/esm/components/icon-button.js.map +1 -0
- package/dist/esm/components/icon.js +10 -0
- package/dist/esm/components/icon.js.map +1 -0
- package/dist/esm/components/kbd.js +11 -0
- package/dist/esm/components/kbd.js.map +1 -0
- package/dist/esm/components/link.js +19 -0
- package/dist/esm/components/link.js.map +1 -0
- package/dist/esm/components/message.js +53 -0
- package/dist/esm/components/message.js.map +1 -0
- package/dist/esm/components/modal.js +25 -0
- package/dist/esm/components/modal.js.map +1 -0
- package/dist/esm/components/notification.js +48 -0
- package/dist/esm/components/notification.js.map +1 -0
- package/dist/esm/components/pagination.js +56 -0
- package/dist/esm/components/pagination.js.map +1 -0
- package/dist/esm/components/radio.js +88 -0
- package/dist/esm/components/radio.js.map +1 -0
- package/dist/esm/components/switch.js +98 -0
- package/dist/esm/components/switch.js.map +1 -0
- package/dist/esm/components/table.js +13 -0
- package/dist/esm/components/table.js.map +1 -0
- package/dist/esm/components/tag.js +84 -0
- package/dist/esm/components/tag.js.map +1 -0
- package/dist/esm/components/types.js +3 -0
- package/dist/esm/components/types.js.map +1 -0
- package/dist/esm/components/user-menu.js +23 -0
- package/dist/esm/components/user-menu.js.map +1 -0
- package/dist/esm/components/zebratable.js +60 -0
- package/dist/esm/components/zebratable.js.map +1 -0
- package/dist/esm/index.js +327 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/with-opacity.js +10 -0
- package/dist/esm/with-opacity.js.map +1 -0
- package/dist/types/accordion/index.d.ts +1 -0
- package/dist/types/accordion/src/accordion.d.ts +17 -0
- package/dist/types/accordion/src/index.d.ts +1 -0
- package/dist/types/accordion/src/styles.d.ts +1 -0
- package/dist/types/accordion/stories/accordion.stories.d.ts +40 -0
- package/dist/types/alert/index.d.ts +1 -0
- package/dist/types/alert/src/alert.d.ts +15 -0
- package/dist/types/alert/src/index.d.ts +8 -0
- package/dist/types/alert/src/styles.d.ts +2 -0
- package/dist/types/breadcrumb/index.d.ts +1 -0
- package/dist/types/breadcrumb/src/breadcrumb.d.ts +34 -0
- package/dist/types/breadcrumb/src/index.d.ts +10 -0
- package/dist/types/breadcrumb/stories/breadcrumb.stories.d.ts +28 -0
- package/dist/types/button/index.d.ts +1 -0
- package/dist/types/button/src/button-group.d.ts +20 -0
- package/dist/types/button/src/button.d.ts +21 -0
- package/dist/types/button/src/icon-button.d.ts +17 -0
- package/dist/types/button/src/index.d.ts +10 -0
- package/dist/types/button/src/styles.d.ts +1 -0
- package/dist/types/button/stories/announcement.d.ts +6 -0
- package/dist/types/button/stories/button-group.stories.d.ts +14 -0
- package/dist/types/button/stories/button.stories.d.ts +127 -0
- package/dist/types/button/stories/icon-button.stories.d.ts +16 -0
- package/dist/types/card/index.d.ts +1 -0
- package/dist/types/card/src/card.d.ts +38 -0
- package/dist/types/card/src/index.d.ts +1 -0
- package/dist/types/card/src/styles.d.ts +1 -0
- package/dist/types/card/stories/card.stories.d.ts +56 -0
- package/dist/types/checkbox/index.d.ts +1 -0
- package/dist/types/checkbox/src/checkbox-group.d.ts +36 -0
- package/dist/types/checkbox/src/checkbox.d.ts +46 -0
- package/dist/types/checkbox/src/index.d.ts +9 -0
- package/dist/types/checkbox/src/styles.d.ts +2 -0
- package/dist/types/checkbox/stories/checkbox.stories.d.ts +103 -0
- package/dist/types/cookie-consent/index.d.ts +1 -0
- package/dist/types/cookie-consent/src/cookie-consent.d.ts +37 -0
- package/dist/types/cookie-consent/src/index.d.ts +1 -0
- package/dist/types/cookie-consent/src/styles.d.ts +1 -0
- package/dist/types/core/src/colors.d.ts +1 -0
- package/dist/types/core/src/components/accordion.d.ts +3 -0
- package/dist/types/core/src/components/alert.d.ts +3 -0
- package/dist/types/core/src/components/avatar.d.ts +3 -0
- package/dist/types/core/src/components/badge.d.ts +3 -0
- package/dist/types/core/src/components/breadcrumb.d.ts +3 -0
- package/dist/types/core/src/components/button-group.d.ts +3 -0
- package/dist/types/core/src/components/button.d.ts +3 -0
- package/dist/types/core/src/components/calendar.d.ts +3 -0
- package/dist/types/core/src/components/card.d.ts +3 -0
- package/dist/types/core/src/components/checkbox.d.ts +3 -0
- package/dist/types/core/src/components/code.d.ts +3 -0
- package/dist/types/core/src/components/cookie-consent.d.ts +3 -0
- package/dist/types/core/src/components/divider.d.ts +3 -0
- package/dist/types/core/src/components/dot.d.ts +3 -0
- package/dist/types/core/src/components/footer.d.ts +3 -0
- package/dist/types/core/src/components/forms.d.ts +3 -0
- package/dist/types/core/src/components/header.d.ts +3 -0
- package/dist/types/core/src/components/icon-button.d.ts +3 -0
- package/dist/types/core/src/components/icon.d.ts +3 -0
- package/dist/types/core/src/components/kbd.d.ts +3 -0
- package/dist/types/core/src/components/link.d.ts +3 -0
- package/dist/types/core/src/components/message.d.ts +3 -0
- package/dist/types/core/src/components/modal.d.ts +3 -0
- package/dist/types/core/src/components/notification.d.ts +3 -0
- package/dist/types/core/src/components/pagination.d.ts +3 -0
- package/dist/types/core/src/components/radio.d.ts +3 -0
- package/dist/types/core/src/components/switch.d.ts +3 -0
- package/dist/types/core/src/components/table.d.ts +3 -0
- package/dist/types/core/src/components/tag.d.ts +3 -0
- package/dist/types/core/src/components/types.d.ts +5 -0
- package/dist/types/core/src/components/user-menu.d.ts +3 -0
- package/dist/types/core/src/components/zebratable.d.ts +3 -0
- package/dist/types/core/src/index.d.ts +1 -0
- package/dist/types/core/src/with-opacity.d.ts +3 -0
- package/dist/types/divider/index.d.ts +1 -0
- package/dist/types/divider/src/divider.d.ts +9 -0
- package/dist/types/divider/src/index.d.ts +1 -0
- package/dist/types/divider/stories/divider.stories.d.ts +33 -0
- package/dist/types/dot/index.d.ts +1 -0
- package/dist/types/dot/src/dot.d.ts +12 -0
- package/dist/types/dot/src/index.d.ts +1 -0
- package/dist/types/dot/src/styles.d.ts +1 -0
- package/dist/types/dot/stories/dot.stories.d.ts +15 -0
- package/dist/types/footer/index.d.ts +1 -0
- package/dist/types/footer/src/footer.d.ts +11 -0
- package/dist/types/footer/src/index.d.ts +1 -0
- package/dist/types/footer/stories/footer.stories.d.ts +95 -0
- package/dist/types/forms/index.d.ts +1 -0
- package/dist/types/forms/src/calendar/index.d.ts +12 -0
- package/dist/types/forms/src/calendar/styles.d.ts +1 -0
- package/dist/types/forms/src/form-control/index.d.ts +27 -0
- package/dist/types/forms/src/form-error-message/index.d.ts +9 -0
- package/dist/types/forms/src/form-helper-text/index.d.ts +9 -0
- package/dist/types/forms/src/form-label/index.d.ts +13 -0
- package/dist/types/forms/src/index.d.ts +8 -0
- package/dist/types/forms/src/input/index.d.ts +15 -0
- package/dist/types/forms/src/input/input.d.ts +30 -0
- package/dist/types/forms/src/input/styles.d.ts +1 -0
- package/dist/types/forms/src/input-addon/index.d.ts +13 -0
- package/dist/types/forms/src/input-element/index.d.ts +15 -0
- package/dist/types/forms/src/input-group/index.d.ts +11 -0
- package/dist/types/forms/src/select/index.d.ts +6 -0
- package/dist/types/forms/src/select/styles.d.ts +1 -0
- package/dist/types/forms/src/textarea/index.d.ts +13 -0
- package/dist/types/forms/stories/calendar.stories.d.ts +58 -0
- package/dist/types/forms/stories/check.d.ts +6 -0
- package/dist/types/forms/stories/form-control.stories.d.ts +16 -0
- package/dist/types/forms/stories/input.stories.d.ts +32 -0
- package/dist/types/forms/stories/select.stories.d.ts +118 -0
- package/dist/types/forms/stories/textarea.stories.d.ts +23 -0
- package/dist/types/header/index.d.ts +1 -0
- package/dist/types/header/src/header.d.ts +13 -0
- package/dist/types/header/src/index.d.ts +1 -0
- package/dist/types/header/stories/header.stories.d.ts +118 -0
- package/dist/types/icon/index.d.ts +1 -0
- package/dist/types/icon/src/core.d.ts +10 -0
- package/dist/types/icon/src/icon.d.ts +14 -0
- package/dist/types/icon/src/index.d.ts +2 -0
- package/dist/types/icon/stories/icon.stories.d.ts +12 -0
- package/dist/types/image/index.d.ts +1 -0
- package/dist/types/image/src/image.d.ts +28 -0
- package/dist/types/image/src/index.d.ts +2 -0
- package/dist/types/image/src/use-image.d.ts +52 -0
- package/dist/types/image/stories/image.stories.d.ts +12 -0
- package/dist/types/link/index.d.ts +1 -0
- package/dist/types/link/src/index.d.ts +1 -0
- package/dist/types/link/src/link.d.ts +12 -0
- package/dist/types/link/stories/link.stories.d.ts +46 -0
- package/dist/types/message/index.d.ts +1 -0
- package/dist/types/message/src/index.d.ts +1 -0
- package/dist/types/message/src/message.d.ts +2 -0
- package/dist/types/message/stories/message.stories.d.ts +11 -0
- package/dist/types/notification/index.d.ts +1 -0
- package/dist/types/notification/src/index.d.ts +1 -0
- package/dist/types/notification/src/notification.d.ts +5 -0
- package/dist/types/notification/stories/notification.stories.d.ts +11 -0
- package/dist/types/pagination/index.d.ts +1 -0
- package/dist/types/pagination/src/index.d.ts +1 -0
- package/dist/types/pagination/src/pagination.d.ts +11 -0
- package/dist/types/pagination/src/styles.d.ts +1 -0
- package/dist/types/pagination/stories/pagination.stories.d.ts +75 -0
- package/dist/types/radio/index.d.ts +1 -0
- package/dist/types/radio/src/index.d.ts +9 -0
- package/dist/types/radio/src/radio-group.d.ts +41 -0
- package/dist/types/radio/src/radio.d.ts +45 -0
- package/dist/types/radio/src/styles.d.ts +2 -0
- package/dist/types/radio/stories/radio-group.stories.d.ts +75 -0
- package/dist/types/radio/stories/radio.stories.d.ts +104 -0
- package/dist/types/react/index.d.ts +1 -0
- package/dist/types/react/src/index.d.ts +26 -0
- package/dist/types/spinner/index.d.ts +1 -0
- package/dist/types/spinner/src/index.d.ts +1 -0
- package/dist/types/spinner/src/spinner.d.ts +8 -0
- package/dist/types/spinner/src/styles.d.ts +2 -0
- package/dist/types/spinner/stories/spinner.stories.d.ts +13 -0
- package/dist/types/switch/index.d.ts +1 -0
- package/dist/types/switch/src/index.d.ts +1 -0
- package/dist/types/switch/src/styles.d.ts +2 -0
- package/dist/types/switch/src/switch.d.ts +42 -0
- package/dist/types/switch/stories/switch.stories.d.ts +76 -0
- package/dist/types/table/index.d.ts +1 -0
- package/dist/types/table/src/index.d.ts +1 -0
- package/dist/types/table/src/styles.d.ts +1 -0
- package/dist/types/table/src/zebratable.d.ts +33 -0
- package/dist/types/table/stories/zebratable.stories.d.ts +69 -0
- package/dist/types/tag/index.d.ts +1 -0
- package/dist/types/tag/src/index.d.ts +1 -0
- package/dist/types/tag/src/styles.d.ts +1 -0
- package/dist/types/tag/src/tag.d.ts +13 -0
- package/dist/types/tag/stories/tag.stories.d.ts +86 -0
- package/dist/types/theme/index.d.ts +1 -0
- package/dist/types/theme/src/colors.d.ts +272 -0
- package/dist/types/theme/src/create-memo-class.d.ts +1 -0
- package/dist/types/theme/src/create-theme-vars/calc.d.ts +19 -0
- package/dist/types/theme/src/create-theme-vars/create-theme-vars.d.ts +9 -0
- package/dist/types/theme/src/create-theme-vars/css-var.d.ts +7 -0
- package/dist/types/theme/src/create-theme-vars/index.d.ts +4 -0
- package/dist/types/theme/src/create-theme-vars/theme-tokens.d.ts +10 -0
- package/dist/types/theme/src/create-theme-vars/to-css-var.d.ts +2 -0
- package/dist/types/theme/src/default-theme.d.ts +4 -0
- package/dist/types/theme/src/gui-provider.d.ts +16 -0
- package/dist/types/theme/src/index.d.ts +6 -0
- package/dist/types/theme/src/types.d.ts +56 -0
- package/dist/types/theme/src/use-safe-effect.d.ts +2 -0
- package/dist/types/theme/src/utils.d.ts +1 -0
- package/dist/types/toast/index.d.ts +1 -0
- package/dist/types/toast/src/index.d.ts +1 -0
- package/dist/types/toast/src/toast.d.ts +62 -0
- package/dist/types/toasted-notes/index.d.ts +1 -0
- package/dist/types/toasted-notes/src/Alert.d.ts +8 -0
- package/dist/types/toasted-notes/src/Message.d.ts +26 -0
- package/dist/types/toasted-notes/src/Positions.d.ts +9 -0
- package/dist/types/toasted-notes/src/Toast.d.ts +13 -0
- package/dist/types/toasted-notes/src/ToastManager.d.ts +45 -0
- package/dist/types/toasted-notes/src/index.d.ts +4 -0
- package/dist/types/toasted-notes/src/useTimeout.d.ts +3 -0
- package/dist/types/user-menu/index.d.ts +1 -0
- package/dist/types/user-menu/src/index.d.ts +6 -0
- package/dist/types/user-menu/src/styles.d.ts +1 -0
- package/dist/types/user-menu/src/user-menu.d.ts +21 -0
- package/dist/types/user-menu/stories/announcement.d.ts +6 -0
- package/dist/types/user-menu/stories/user-menu.stories.d.ts +5 -0
- package/dist/types/utils/index.d.ts +1 -0
- package/dist/types/utils/src/assertion.d.ts +4 -0
- package/dist/types/utils/src/children.d.ts +8 -0
- package/dist/types/utils/src/color.d.ts +9 -0
- package/dist/types/utils/src/index.d.ts +10 -0
- package/dist/types/utils/src/object.d.ts +6 -0
- package/dist/types/utils/src/refs.d.ts +5 -0
- package/dist/types/utils/src/slug.d.ts +1 -0
- package/dist/types/utils/src/types.d.ts +13 -0
- package/dist/types/utils/src/walk-object.d.ts +5 -0
- package/dist/types/visually-hidden/index.d.ts +1 -0
- package/dist/types/visually-hidden/src/index.d.ts +32 -0
- package/package.json +2 -2
- package/src/colors.js +145 -145
- package/src/components/accordion.js +89 -89
- package/src/components/alert.js +98 -98
- package/src/components/avatar.js +85 -85
- package/src/components/badge.js +60 -60
- package/src/components/breadcrumb.js +13 -13
- package/src/components/button-group.js +46 -46
- package/src/components/button.js +304 -304
- package/src/components/calendar.js +82 -82
- package/src/components/card.js +54 -54
- package/src/components/checkbox.js +127 -127
- package/src/components/code.js +9 -9
- package/src/components/cookie-consent.js +30 -30
- package/src/components/divider.js +12 -12
- package/src/components/dot.js +84 -84
- package/src/components/dropdown-filter.js +72 -72
- package/src/components/footer.js +42 -42
- package/src/components/forms.js +256 -256
- package/src/components/header.js +35 -35
- package/src/components/icon-button.js +5 -5
- package/src/components/icon.js +9 -9
- package/src/components/kbd.js +9 -9
- package/src/components/link.js +20 -20
- package/src/components/message.js +62 -62
- package/src/components/modal.js +30 -30
- package/src/components/notification.js +56 -56
- package/src/components/pagination.js +69 -69
- package/src/components/radio.js +104 -104
- package/src/components/search-bar.js +45 -44
- package/src/components/side-menu.js +167 -185
- package/src/components/switch.js +119 -119
- package/src/components/tab-menu.js +44 -44
- package/src/components/table.js +13 -13
- package/src/components/tag.js +97 -97
- package/src/components/user-menu.js +23 -23
- package/src/components/zebratable.js +77 -77
- package/src/index.js +272 -272
- package/src/with-opacity.js +6 -6
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Meta } from '@storybook/react';
|
|
3
|
+
import { ZebraTableProps } from '../src/zebratable';
|
|
4
|
+
declare const _default: Meta<import("@storybook/react").Args>;
|
|
5
|
+
export default _default;
|
|
6
|
+
export declare const Template: {
|
|
7
|
+
(args: ZebraTableProps): JSX.Element;
|
|
8
|
+
argTypes: {
|
|
9
|
+
captionTitle: {
|
|
10
|
+
type: {
|
|
11
|
+
name: string;
|
|
12
|
+
required: boolean;
|
|
13
|
+
};
|
|
14
|
+
description: string;
|
|
15
|
+
table: {
|
|
16
|
+
defaultValue: {
|
|
17
|
+
summary: string;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
control: string;
|
|
21
|
+
defaultValue: string;
|
|
22
|
+
};
|
|
23
|
+
captionBody: {
|
|
24
|
+
type: {
|
|
25
|
+
name: string;
|
|
26
|
+
required: boolean;
|
|
27
|
+
};
|
|
28
|
+
description: string;
|
|
29
|
+
table: {
|
|
30
|
+
defaultValue: {
|
|
31
|
+
summary: string;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
control: string;
|
|
35
|
+
defaultValue: string;
|
|
36
|
+
};
|
|
37
|
+
summary: {
|
|
38
|
+
type: {
|
|
39
|
+
name: string;
|
|
40
|
+
required: boolean;
|
|
41
|
+
};
|
|
42
|
+
description: string;
|
|
43
|
+
table: {
|
|
44
|
+
defaultValue: {
|
|
45
|
+
summary: string;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
control: string;
|
|
49
|
+
defaultValue: string;
|
|
50
|
+
};
|
|
51
|
+
tableSortable: {
|
|
52
|
+
type: {
|
|
53
|
+
name: string;
|
|
54
|
+
required: boolean;
|
|
55
|
+
};
|
|
56
|
+
description: string;
|
|
57
|
+
table: {
|
|
58
|
+
defaultValue: {
|
|
59
|
+
summary: string;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
control: string;
|
|
63
|
+
defaultValue: string;
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
story: {
|
|
67
|
+
name: string;
|
|
68
|
+
};
|
|
69
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './src';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './tag';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useTagClass: (args?: any) => string;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { DefaultProps } from '@sk-web-gui/theme';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
export interface TagProps extends DefaultProps {
|
|
4
|
+
/** Controls tag appearance */
|
|
5
|
+
variant?: 'outline' | 'solid' | 'light';
|
|
6
|
+
href?: string;
|
|
7
|
+
useDeleteButton?: boolean;
|
|
8
|
+
deleteAriaLabel?: string;
|
|
9
|
+
size?: 'sm' | 'md' | 'lg';
|
|
10
|
+
deleteCallback?: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
11
|
+
children?: React.ReactNode;
|
|
12
|
+
}
|
|
13
|
+
export declare const Tag: React.ForwardRefExoticComponent<TagProps & React.RefAttributes<React.LegacyRef<HTMLElement>>>;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Meta } from '@storybook/react';
|
|
3
|
+
import { TagProps } from '../src';
|
|
4
|
+
declare const _default: Meta<import("@storybook/react").Args>;
|
|
5
|
+
export default _default;
|
|
6
|
+
export declare const Template: {
|
|
7
|
+
({ ...args }: TagProps): JSX.Element;
|
|
8
|
+
argTypes: {
|
|
9
|
+
variant: {
|
|
10
|
+
type: {
|
|
11
|
+
name: string;
|
|
12
|
+
required: boolean;
|
|
13
|
+
};
|
|
14
|
+
description: string;
|
|
15
|
+
table: {
|
|
16
|
+
defaultValue: {
|
|
17
|
+
summary: string;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
options: string[];
|
|
21
|
+
control: string;
|
|
22
|
+
defaultValue: string;
|
|
23
|
+
};
|
|
24
|
+
size: {
|
|
25
|
+
type: {
|
|
26
|
+
name: string;
|
|
27
|
+
required: boolean;
|
|
28
|
+
};
|
|
29
|
+
description: string;
|
|
30
|
+
table: {
|
|
31
|
+
defaultValue: {
|
|
32
|
+
summary: string;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
options: string[];
|
|
36
|
+
control: string;
|
|
37
|
+
defaultValue: string;
|
|
38
|
+
};
|
|
39
|
+
useDeleteButton: {
|
|
40
|
+
type: {
|
|
41
|
+
name: string;
|
|
42
|
+
required: boolean;
|
|
43
|
+
};
|
|
44
|
+
description: string;
|
|
45
|
+
table: {
|
|
46
|
+
defaultValue: {
|
|
47
|
+
summary: boolean;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
options: boolean[];
|
|
51
|
+
control: string;
|
|
52
|
+
defaultValue: boolean;
|
|
53
|
+
};
|
|
54
|
+
deleteAriaLabel: {
|
|
55
|
+
type: {
|
|
56
|
+
name: string;
|
|
57
|
+
required: boolean;
|
|
58
|
+
};
|
|
59
|
+
description: string;
|
|
60
|
+
table: {
|
|
61
|
+
defaultValue: {
|
|
62
|
+
summary: string;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
control: string;
|
|
66
|
+
defaultValue: string;
|
|
67
|
+
};
|
|
68
|
+
href: {
|
|
69
|
+
type: {
|
|
70
|
+
name: string;
|
|
71
|
+
required: boolean;
|
|
72
|
+
};
|
|
73
|
+
description: string;
|
|
74
|
+
table: {
|
|
75
|
+
defaultValue: {
|
|
76
|
+
summary: string;
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
control: string;
|
|
80
|
+
defaultValue: string;
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
export declare const Outline: () => JSX.Element;
|
|
85
|
+
export declare const Solid: () => JSX.Element;
|
|
86
|
+
export declare const Light: () => JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './src';
|
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
export declare const _colors: {
|
|
2
|
+
black: {
|
|
3
|
+
DEFAULT: string;
|
|
4
|
+
dark: string;
|
|
5
|
+
light: string;
|
|
6
|
+
active: string;
|
|
7
|
+
};
|
|
8
|
+
gray: {
|
|
9
|
+
DEFAULT: string;
|
|
10
|
+
dark: string;
|
|
11
|
+
light: string;
|
|
12
|
+
active: string;
|
|
13
|
+
};
|
|
14
|
+
'gray-light': {
|
|
15
|
+
DEFAULT: string;
|
|
16
|
+
dark: string;
|
|
17
|
+
light: string;
|
|
18
|
+
active: string;
|
|
19
|
+
};
|
|
20
|
+
'gray-lighter': {
|
|
21
|
+
DEFAULT: string;
|
|
22
|
+
dark: string;
|
|
23
|
+
light: string;
|
|
24
|
+
active: string;
|
|
25
|
+
};
|
|
26
|
+
'gray-stroke': {
|
|
27
|
+
DEFAULT: string;
|
|
28
|
+
dark: string;
|
|
29
|
+
light: string;
|
|
30
|
+
active: string;
|
|
31
|
+
};
|
|
32
|
+
'gray-middle': {
|
|
33
|
+
DEFAULT: string;
|
|
34
|
+
dark: string;
|
|
35
|
+
light: string;
|
|
36
|
+
active: string;
|
|
37
|
+
};
|
|
38
|
+
white: {
|
|
39
|
+
DEFAULT: string;
|
|
40
|
+
dark: string;
|
|
41
|
+
light: string;
|
|
42
|
+
active: string;
|
|
43
|
+
};
|
|
44
|
+
vattjom: {
|
|
45
|
+
DEFAULT: string;
|
|
46
|
+
dark: string;
|
|
47
|
+
light: string;
|
|
48
|
+
active: string;
|
|
49
|
+
};
|
|
50
|
+
gronsta: {
|
|
51
|
+
DEFAULT: string;
|
|
52
|
+
dark: string;
|
|
53
|
+
light: string;
|
|
54
|
+
active: string;
|
|
55
|
+
};
|
|
56
|
+
bjornstigen: {
|
|
57
|
+
DEFAULT: string;
|
|
58
|
+
dark: string;
|
|
59
|
+
light: string;
|
|
60
|
+
active: string;
|
|
61
|
+
};
|
|
62
|
+
juniskar: {
|
|
63
|
+
DEFAULT: string;
|
|
64
|
+
dark: string;
|
|
65
|
+
light: string;
|
|
66
|
+
active: string;
|
|
67
|
+
};
|
|
68
|
+
svartvik: {
|
|
69
|
+
DEFAULT: string;
|
|
70
|
+
dark: string;
|
|
71
|
+
light: string;
|
|
72
|
+
active: string;
|
|
73
|
+
'50': string;
|
|
74
|
+
'100': string;
|
|
75
|
+
'200': string;
|
|
76
|
+
'300': string;
|
|
77
|
+
'400': string;
|
|
78
|
+
'500': string;
|
|
79
|
+
'600': string;
|
|
80
|
+
'700': string;
|
|
81
|
+
'800': string;
|
|
82
|
+
'900': string;
|
|
83
|
+
};
|
|
84
|
+
red: {
|
|
85
|
+
DEFAULT: string;
|
|
86
|
+
dark: string;
|
|
87
|
+
light: string;
|
|
88
|
+
active: string;
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
export declare const colors: {
|
|
92
|
+
primary: {
|
|
93
|
+
DEFAULT: string;
|
|
94
|
+
dark: string;
|
|
95
|
+
light: string;
|
|
96
|
+
active: string;
|
|
97
|
+
50: string;
|
|
98
|
+
100: string;
|
|
99
|
+
200: string;
|
|
100
|
+
300: string;
|
|
101
|
+
400: string;
|
|
102
|
+
500: string;
|
|
103
|
+
600: string;
|
|
104
|
+
700: string;
|
|
105
|
+
800: string;
|
|
106
|
+
900: string;
|
|
107
|
+
};
|
|
108
|
+
secondary: {
|
|
109
|
+
DEFAULT: string;
|
|
110
|
+
dark: string;
|
|
111
|
+
light: string;
|
|
112
|
+
active: string;
|
|
113
|
+
50: string;
|
|
114
|
+
100: string;
|
|
115
|
+
200: string;
|
|
116
|
+
300: string;
|
|
117
|
+
400: string;
|
|
118
|
+
500: string;
|
|
119
|
+
600: string;
|
|
120
|
+
700: string;
|
|
121
|
+
800: string;
|
|
122
|
+
900: string;
|
|
123
|
+
};
|
|
124
|
+
neutral: {
|
|
125
|
+
DEFAULT: string;
|
|
126
|
+
dark: string;
|
|
127
|
+
light: string;
|
|
128
|
+
active: string;
|
|
129
|
+
50: string;
|
|
130
|
+
100: string;
|
|
131
|
+
200: string;
|
|
132
|
+
300: string;
|
|
133
|
+
400: string;
|
|
134
|
+
500: string;
|
|
135
|
+
600: string;
|
|
136
|
+
700: string;
|
|
137
|
+
800: string;
|
|
138
|
+
900: string;
|
|
139
|
+
};
|
|
140
|
+
hover: {
|
|
141
|
+
DEFAULT: string;
|
|
142
|
+
dark: string;
|
|
143
|
+
light: string;
|
|
144
|
+
active: string;
|
|
145
|
+
};
|
|
146
|
+
background: {
|
|
147
|
+
one: string;
|
|
148
|
+
two: string;
|
|
149
|
+
three: string;
|
|
150
|
+
};
|
|
151
|
+
heading: {
|
|
152
|
+
DEFAULT: string;
|
|
153
|
+
two: string;
|
|
154
|
+
three: string;
|
|
155
|
+
};
|
|
156
|
+
body: {
|
|
157
|
+
DEFAULT: string;
|
|
158
|
+
two: string;
|
|
159
|
+
};
|
|
160
|
+
info: {
|
|
161
|
+
DEFAULT: string;
|
|
162
|
+
dark: string;
|
|
163
|
+
light: string;
|
|
164
|
+
active: string;
|
|
165
|
+
};
|
|
166
|
+
success: {
|
|
167
|
+
DEFAULT: string;
|
|
168
|
+
dark: string;
|
|
169
|
+
light: string;
|
|
170
|
+
active: string;
|
|
171
|
+
};
|
|
172
|
+
warning: {
|
|
173
|
+
DEFAULT: string;
|
|
174
|
+
dark: string;
|
|
175
|
+
light: string;
|
|
176
|
+
active: string;
|
|
177
|
+
};
|
|
178
|
+
error: {
|
|
179
|
+
DEFAULT: string;
|
|
180
|
+
dark: string;
|
|
181
|
+
light: string;
|
|
182
|
+
active: string;
|
|
183
|
+
};
|
|
184
|
+
black: {
|
|
185
|
+
DEFAULT: string;
|
|
186
|
+
dark: string;
|
|
187
|
+
light: string;
|
|
188
|
+
active: string;
|
|
189
|
+
};
|
|
190
|
+
gray: {
|
|
191
|
+
DEFAULT: string;
|
|
192
|
+
dark: string;
|
|
193
|
+
light: string;
|
|
194
|
+
active: string;
|
|
195
|
+
};
|
|
196
|
+
'gray-light': {
|
|
197
|
+
DEFAULT: string;
|
|
198
|
+
dark: string;
|
|
199
|
+
light: string;
|
|
200
|
+
active: string;
|
|
201
|
+
};
|
|
202
|
+
'gray-lighter': {
|
|
203
|
+
DEFAULT: string;
|
|
204
|
+
dark: string;
|
|
205
|
+
light: string;
|
|
206
|
+
active: string;
|
|
207
|
+
};
|
|
208
|
+
'gray-stroke': {
|
|
209
|
+
DEFAULT: string;
|
|
210
|
+
dark: string;
|
|
211
|
+
light: string;
|
|
212
|
+
active: string;
|
|
213
|
+
};
|
|
214
|
+
'gray-middle': {
|
|
215
|
+
DEFAULT: string;
|
|
216
|
+
dark: string;
|
|
217
|
+
light: string;
|
|
218
|
+
active: string;
|
|
219
|
+
};
|
|
220
|
+
white: {
|
|
221
|
+
DEFAULT: string;
|
|
222
|
+
dark: string;
|
|
223
|
+
light: string;
|
|
224
|
+
active: string;
|
|
225
|
+
};
|
|
226
|
+
vattjom: {
|
|
227
|
+
DEFAULT: string;
|
|
228
|
+
dark: string;
|
|
229
|
+
light: string;
|
|
230
|
+
active: string;
|
|
231
|
+
};
|
|
232
|
+
gronsta: {
|
|
233
|
+
DEFAULT: string;
|
|
234
|
+
dark: string;
|
|
235
|
+
light: string;
|
|
236
|
+
active: string;
|
|
237
|
+
};
|
|
238
|
+
bjornstigen: {
|
|
239
|
+
DEFAULT: string;
|
|
240
|
+
dark: string;
|
|
241
|
+
light: string;
|
|
242
|
+
active: string;
|
|
243
|
+
};
|
|
244
|
+
juniskar: {
|
|
245
|
+
DEFAULT: string;
|
|
246
|
+
dark: string;
|
|
247
|
+
light: string;
|
|
248
|
+
active: string;
|
|
249
|
+
};
|
|
250
|
+
svartvik: {
|
|
251
|
+
DEFAULT: string;
|
|
252
|
+
dark: string;
|
|
253
|
+
light: string;
|
|
254
|
+
active: string;
|
|
255
|
+
'50': string;
|
|
256
|
+
'100': string;
|
|
257
|
+
'200': string;
|
|
258
|
+
'300': string;
|
|
259
|
+
'400': string;
|
|
260
|
+
'500': string;
|
|
261
|
+
'600': string;
|
|
262
|
+
'700': string;
|
|
263
|
+
'800': string;
|
|
264
|
+
'900': string;
|
|
265
|
+
};
|
|
266
|
+
red: {
|
|
267
|
+
DEFAULT: string;
|
|
268
|
+
dark: string;
|
|
269
|
+
light: string;
|
|
270
|
+
active: string;
|
|
271
|
+
};
|
|
272
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function createMemoClass(func: (props: any) => string): (args?: any) => string;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare type Operand = string | number | {
|
|
2
|
+
reference: string;
|
|
3
|
+
};
|
|
4
|
+
interface CalcChain {
|
|
5
|
+
add: (...operands: Array<Operand>) => CalcChain;
|
|
6
|
+
subtract: (...operands: Array<Operand>) => CalcChain;
|
|
7
|
+
multiply: (...operands: Array<Operand>) => CalcChain;
|
|
8
|
+
divide: (...operands: Array<Operand>) => CalcChain;
|
|
9
|
+
negate: () => CalcChain;
|
|
10
|
+
toString: () => string;
|
|
11
|
+
}
|
|
12
|
+
export declare const calc: ((x: Operand) => CalcChain) & {
|
|
13
|
+
add: (...operands: Array<Operand>) => string;
|
|
14
|
+
subtract: (...operands: Array<Operand>) => string;
|
|
15
|
+
multiply: (...operands: Array<Operand>) => string;
|
|
16
|
+
divide: (...operands: Array<Operand>) => string;
|
|
17
|
+
negate: (x: Operand) => string;
|
|
18
|
+
};
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Dict } from '@sk-web-gui/utils';
|
|
2
|
+
export interface CreateThemeVarsOptions {
|
|
3
|
+
cssVarPrefix?: string;
|
|
4
|
+
}
|
|
5
|
+
export interface ThemeVars {
|
|
6
|
+
cssVars: Dict;
|
|
7
|
+
cssMap: Dict;
|
|
8
|
+
}
|
|
9
|
+
export declare function createThemeVars(target: Dict, options: CreateThemeVarsOptions): ThemeVars;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare function addPrefix(value: string, prefix?: string): string;
|
|
2
|
+
export declare function toVarReference(name: string, fallback?: string): string;
|
|
3
|
+
export declare function toVarDefinition(value: string, prefix?: string): string;
|
|
4
|
+
export declare function cssVar(name: string, fallback?: string, cssVarPrefix?: string): {
|
|
5
|
+
variable: string;
|
|
6
|
+
reference: string;
|
|
7
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Dict } from '@sk-web-gui/utils';
|
|
2
|
+
declare const tokens: readonly ["colors", "cursor", "rounded"];
|
|
3
|
+
export declare type ThemeScale = typeof tokens[number] | 'transition.duration' | 'transition.property' | 'transition.easing';
|
|
4
|
+
export declare function extractTokens(theme: Dict): {
|
|
5
|
+
[x: string]: any;
|
|
6
|
+
};
|
|
7
|
+
export declare function omitVars(rawTheme: Dict): {
|
|
8
|
+
[x: string]: any;
|
|
9
|
+
};
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { WithCSSVar, Dict } from '@sk-web-gui/utils';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { GuiTheme, GuiThemeOverride } from './types';
|
|
4
|
+
declare type DictGuiTheme = Dict;
|
|
5
|
+
export declare const GuiContext: React.Context<{
|
|
6
|
+
theme: WithCSSVar<DictGuiTheme>;
|
|
7
|
+
} | undefined>;
|
|
8
|
+
export interface GuiProviderProps {
|
|
9
|
+
children: React.ReactNode;
|
|
10
|
+
theme?: GuiTheme;
|
|
11
|
+
colorScheme?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare function GuiProvider({ theme, colorScheme, children }: GuiProviderProps): JSX.Element;
|
|
14
|
+
export declare function useGui<T extends object = Dict>(): WithCSSVar<T>;
|
|
15
|
+
export declare function extendTheme(themeOverride: GuiThemeOverride): GuiTheme;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { DeepPartial } from '@sk-web-gui/utils';
|
|
2
|
+
export declare type RecursiveProperty<Nested = string | number> = RecursiveObject<Nested> | Nested;
|
|
3
|
+
export interface RecursiveObject<Nested = string | number> {
|
|
4
|
+
[property: string]: RecursiveProperty<Nested>;
|
|
5
|
+
}
|
|
6
|
+
export interface ColorHues {
|
|
7
|
+
50: string;
|
|
8
|
+
100: string;
|
|
9
|
+
200: string;
|
|
10
|
+
300: string;
|
|
11
|
+
400: string;
|
|
12
|
+
500: string;
|
|
13
|
+
600: string;
|
|
14
|
+
700: string;
|
|
15
|
+
800: string;
|
|
16
|
+
900: string;
|
|
17
|
+
}
|
|
18
|
+
export interface Color {
|
|
19
|
+
DEFAULT: string;
|
|
20
|
+
light: string;
|
|
21
|
+
dark: string;
|
|
22
|
+
active: string;
|
|
23
|
+
}
|
|
24
|
+
export declare type Colors = RecursiveObject<Record<string, Partial<ColorHues>> | string>;
|
|
25
|
+
export interface ColorScheme {
|
|
26
|
+
id: string;
|
|
27
|
+
type: 'light' | 'dark';
|
|
28
|
+
colors: {
|
|
29
|
+
bg: {
|
|
30
|
+
base: string;
|
|
31
|
+
fill: string;
|
|
32
|
+
};
|
|
33
|
+
text: {
|
|
34
|
+
foreground: string;
|
|
35
|
+
muted: string;
|
|
36
|
+
};
|
|
37
|
+
severity?: {
|
|
38
|
+
error: Color;
|
|
39
|
+
warning: Color;
|
|
40
|
+
info: Color;
|
|
41
|
+
};
|
|
42
|
+
primary: Color;
|
|
43
|
+
secondary: Color;
|
|
44
|
+
neutral: ColorHues;
|
|
45
|
+
} & Colors;
|
|
46
|
+
}
|
|
47
|
+
export interface GuiTheme {
|
|
48
|
+
readonly cursor: 'default' | 'pointer';
|
|
49
|
+
readonly rounded: string;
|
|
50
|
+
readonly colorSchemes: Record<string, ColorScheme>;
|
|
51
|
+
readonly config: Record<string, unknown>;
|
|
52
|
+
}
|
|
53
|
+
export interface DefaultProps {
|
|
54
|
+
className?: string;
|
|
55
|
+
}
|
|
56
|
+
export declare type GuiThemeOverride = DeepPartial<GuiTheme>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const isBrowser: boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './src';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './toast';
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { Position } from '@sk-web-gui/toasted-notes';
|
|
2
|
+
import { DefaultProps } from '@sk-web-gui/theme';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
interface IToast extends DefaultProps {
|
|
5
|
+
/**
|
|
6
|
+
* The title of the toast.
|
|
7
|
+
*/
|
|
8
|
+
title?: string;
|
|
9
|
+
/**
|
|
10
|
+
* If `true` adds a close button to the toast.
|
|
11
|
+
*/
|
|
12
|
+
closeable?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Callback function to close the toast.
|
|
15
|
+
*/
|
|
16
|
+
onClose?: () => void;
|
|
17
|
+
/**
|
|
18
|
+
* Callback function to undo the toast.
|
|
19
|
+
*/
|
|
20
|
+
onUndo?: () => void;
|
|
21
|
+
/**
|
|
22
|
+
* The description of the toast
|
|
23
|
+
*/
|
|
24
|
+
description?: string;
|
|
25
|
+
/**
|
|
26
|
+
* The undo text of the toast
|
|
27
|
+
*/
|
|
28
|
+
undoText?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Duration before dismiss in milliseconds, or `null` to never dismiss.
|
|
31
|
+
*/
|
|
32
|
+
duration?: number | null;
|
|
33
|
+
/**
|
|
34
|
+
* One of toasted-notes positions.
|
|
35
|
+
*/
|
|
36
|
+
position?: keyof typeof Position;
|
|
37
|
+
/**
|
|
38
|
+
* The message of the toast
|
|
39
|
+
*/
|
|
40
|
+
message?: string;
|
|
41
|
+
/**
|
|
42
|
+
* The status of the toast
|
|
43
|
+
*/
|
|
44
|
+
status?: 'info' | 'success' | 'error' | 'warning';
|
|
45
|
+
/**
|
|
46
|
+
* Custom icon
|
|
47
|
+
*/
|
|
48
|
+
icon?: React.ElementType;
|
|
49
|
+
/**
|
|
50
|
+
* Custom close icon
|
|
51
|
+
*/
|
|
52
|
+
closeIcon?: React.ElementType;
|
|
53
|
+
}
|
|
54
|
+
interface RenderOption {
|
|
55
|
+
render?: (props: {
|
|
56
|
+
onClose: (id: string) => void;
|
|
57
|
+
id: string;
|
|
58
|
+
}) => React.ReactNode;
|
|
59
|
+
}
|
|
60
|
+
export declare type useToastOptions = IToast & RenderOption;
|
|
61
|
+
export declare function createToast(Comp: React.ElementType): () => ({ position, duration, render, ...rest }: useToastOptions) => any;
|
|
62
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './src';
|