@sparrowengg/twigs-mobile 0.0.3 → 0.1.0
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/README.md +206 -0
- package/lib/commonjs/alert/alert.js +1 -0
- package/lib/commonjs/alert/constants.js +1 -0
- package/lib/commonjs/alert/helpers.js +1 -0
- package/lib/commonjs/alert/icons.js +1 -0
- package/lib/commonjs/alert/index.js +1 -0
- package/lib/commonjs/alert/styles.js +1 -0
- package/lib/commonjs/alert/types.js +1 -0
- package/lib/commonjs/avatar/avatar-group.constants.js +1 -0
- package/lib/commonjs/avatar/avatar-group.helpers.js +1 -0
- package/lib/commonjs/avatar/avatar-group.js +1 -0
- package/lib/commonjs/avatar/avatar-group.styles.js +1 -0
- package/lib/commonjs/avatar/avatar-group.types.js +1 -0
- package/lib/commonjs/avatar/avatar.js +1 -0
- package/lib/commonjs/avatar/constants.js +1 -0
- package/lib/commonjs/avatar/helpers.js +1 -0
- package/lib/commonjs/avatar/index.js +1 -0
- package/lib/commonjs/avatar/styles.js +1 -0
- package/lib/commonjs/avatar/types.js +1 -0
- package/lib/commonjs/badge/badge.js +1 -0
- package/lib/commonjs/badge/constants.js +1 -0
- package/lib/commonjs/badge/helpers.js +1 -0
- package/lib/commonjs/badge/index.js +1 -0
- package/lib/commonjs/badge/styles.js +1 -0
- package/lib/commonjs/badge/types.js +1 -0
- package/lib/commonjs/bottom-sheet/bottom-sheet-header.js +1 -0
- package/lib/commonjs/bottom-sheet/bottom-sheet-modal.js +1 -0
- package/lib/commonjs/bottom-sheet/bottom-sheet.js +1 -0
- package/lib/commonjs/bottom-sheet/constants.js +1 -0
- package/lib/commonjs/bottom-sheet/index.js +1 -0
- package/lib/commonjs/bottom-sheet/styles.js +1 -0
- package/lib/commonjs/bottom-sheet/types.js +1 -0
- package/lib/commonjs/box/box.js +1 -0
- package/lib/commonjs/box/index.js +1 -0
- package/lib/commonjs/box/types.js +1 -0
- package/lib/commonjs/button/button.js +1 -0
- package/lib/commonjs/button/constants.js +1 -0
- package/lib/commonjs/button/helpers.js +1 -0
- package/lib/commonjs/button/index.js +1 -0
- package/lib/commonjs/button/styles.js +1 -0
- package/lib/commonjs/button/types.js +1 -0
- package/lib/commonjs/checkbox/checkbox.js +1 -0
- package/lib/commonjs/checkbox/constants.js +1 -0
- package/lib/commonjs/checkbox/icons.js +1 -0
- package/lib/commonjs/checkbox/index.js +1 -0
- package/lib/commonjs/checkbox/styles.js +1 -0
- package/lib/commonjs/checkbox/types.js +1 -0
- package/lib/commonjs/chip/chip.js +1 -0
- package/lib/commonjs/chip/constants.js +1 -0
- package/lib/commonjs/chip/helpers.js +1 -0
- package/lib/commonjs/chip/index.js +1 -0
- package/lib/commonjs/chip/styles.js +1 -0
- package/lib/commonjs/chip/types.js +1 -0
- package/lib/commonjs/context/index.js +1 -0
- package/lib/commonjs/context/theme-context.js +1 -0
- package/lib/commonjs/flex/flex.js +1 -0
- package/lib/commonjs/flex/index.js +1 -0
- package/lib/commonjs/flex/types.js +1 -0
- package/lib/commonjs/icon-button/constants.js +1 -0
- package/lib/commonjs/icon-button/helpers.js +1 -0
- package/lib/commonjs/icon-button/icon-button.js +1 -0
- package/lib/commonjs/icon-button/index.js +1 -0
- package/lib/commonjs/icon-button/types.js +1 -0
- package/lib/commonjs/index.js +1 -0
- package/lib/commonjs/link-button/constants.js +1 -0
- package/lib/commonjs/link-button/helpers.js +1 -0
- package/lib/commonjs/link-button/index.js +1 -0
- package/lib/commonjs/link-button/link-button.js +1 -0
- package/lib/commonjs/link-button/types.js +1 -0
- package/lib/commonjs/loader/circle-loader.js +1 -0
- package/lib/commonjs/loader/constants.js +1 -0
- package/lib/commonjs/loader/helpers.js +1 -0
- package/lib/commonjs/loader/index.js +1 -0
- package/lib/commonjs/loader/line-loader.js +1 -0
- package/lib/commonjs/loader/types.js +1 -0
- package/lib/commonjs/modal/constants.js +1 -0
- package/lib/commonjs/modal/helpers.js +1 -0
- package/lib/commonjs/modal/index.js +1 -0
- package/lib/commonjs/modal/modal-body.js +1 -0
- package/lib/commonjs/modal/modal-content.js +1 -0
- package/lib/commonjs/modal/modal-description.js +1 -0
- package/lib/commonjs/modal/modal-footer.js +1 -0
- package/lib/commonjs/modal/modal-header.js +1 -0
- package/lib/commonjs/modal/modal-title.js +1 -0
- package/lib/commonjs/modal/modal.js +1 -0
- package/lib/commonjs/modal/styles.js +1 -0
- package/lib/commonjs/modal/types.js +1 -0
- package/lib/commonjs/radio/constants.js +1 -0
- package/lib/commonjs/radio/index.js +1 -0
- package/lib/commonjs/radio/radio.js +1 -0
- package/lib/commonjs/radio/styles.js +1 -0
- package/lib/commonjs/radio/types.js +1 -0
- package/lib/commonjs/segmented-button/constants.js +1 -0
- package/lib/commonjs/segmented-button/helpers.js +1 -0
- package/lib/commonjs/segmented-button/index.js +1 -0
- package/lib/commonjs/segmented-button/segmented-button.js +1 -0
- package/lib/commonjs/segmented-button/styles.js +1 -0
- package/lib/commonjs/segmented-button/types.js +1 -0
- package/lib/commonjs/separator/index.js +1 -0
- package/lib/commonjs/separator/separator.js +1 -0
- package/lib/commonjs/separator/types.js +1 -0
- package/lib/commonjs/switch/constants.js +1 -0
- package/lib/commonjs/switch/index.js +1 -0
- package/lib/commonjs/switch/styles.js +1 -0
- package/lib/commonjs/switch/switch.js +1 -0
- package/lib/commonjs/switch/types.js +1 -0
- package/lib/commonjs/text/index.js +1 -0
- package/lib/commonjs/text/text.js +1 -0
- package/lib/commonjs/text/types.js +1 -0
- package/lib/commonjs/text-input/constants.js +1 -0
- package/lib/commonjs/text-input/index.js +1 -0
- package/lib/commonjs/text-input/styles.js +1 -0
- package/lib/commonjs/text-input/text-input.js +1 -0
- package/lib/commonjs/text-input/types.js +1 -0
- package/lib/commonjs/theme/default-theme.js +1 -0
- package/lib/commonjs/theme/index.js +1 -0
- package/lib/commonjs/toast/constants.js +1 -0
- package/lib/commonjs/toast/helpers.js +1 -0
- package/lib/commonjs/toast/icons.js +1 -0
- package/lib/commonjs/toast/index.js +1 -0
- package/lib/commonjs/toast/styles.js +1 -0
- package/lib/commonjs/toast/toast-container.js +1 -0
- package/lib/commonjs/toast/toast-content.js +1 -0
- package/lib/commonjs/toast/toast-item.js +1 -0
- package/lib/commonjs/toast/toast-provider.js +1 -0
- package/lib/commonjs/toast/toast.js +1 -0
- package/lib/commonjs/toast/types.js +1 -0
- package/lib/commonjs/toast/use-toast.js +1 -0
- package/lib/commonjs/tooltip/constants.js +1 -0
- package/lib/commonjs/tooltip/helpers.js +1 -0
- package/lib/commonjs/tooltip/index.js +1 -0
- package/lib/commonjs/tooltip/styles.js +1 -0
- package/lib/commonjs/tooltip/tooltip.js +1 -0
- package/lib/commonjs/tooltip/types.js +1 -0
- package/lib/commonjs/utils/index.js +1 -0
- package/lib/module/alert/alert.js +1 -0
- package/lib/module/alert/constants.js +1 -0
- package/lib/module/alert/helpers.js +1 -0
- package/lib/module/alert/icons.js +1 -0
- package/lib/module/alert/index.js +1 -0
- package/lib/module/alert/styles.js +1 -0
- package/lib/module/alert/types.js +1 -0
- package/lib/module/avatar/avatar-group.constants.js +1 -0
- package/lib/module/avatar/avatar-group.helpers.js +1 -0
- package/lib/module/avatar/avatar-group.js +1 -0
- package/lib/module/avatar/avatar-group.styles.js +1 -0
- package/lib/module/avatar/avatar-group.types.js +1 -0
- package/lib/module/avatar/avatar.js +1 -0
- package/lib/module/avatar/constants.js +1 -0
- package/lib/module/avatar/helpers.js +1 -0
- package/lib/module/avatar/index.js +1 -0
- package/lib/module/avatar/styles.js +1 -0
- package/lib/module/avatar/types.js +1 -0
- package/lib/module/badge/badge.js +1 -0
- package/lib/module/badge/constants.js +1 -0
- package/lib/module/badge/helpers.js +1 -0
- package/lib/module/badge/index.js +1 -0
- package/lib/module/badge/styles.js +1 -0
- package/lib/module/badge/types.js +1 -0
- package/lib/module/bottom-sheet/bottom-sheet-header.js +1 -0
- package/lib/module/bottom-sheet/bottom-sheet-modal.js +1 -0
- package/lib/module/bottom-sheet/bottom-sheet.js +1 -0
- package/lib/module/bottom-sheet/constants.js +1 -0
- package/lib/module/bottom-sheet/index.js +1 -0
- package/lib/module/bottom-sheet/styles.js +1 -0
- package/lib/module/bottom-sheet/types.js +1 -0
- package/lib/module/box/box.js +1 -0
- package/lib/module/box/index.js +1 -0
- package/lib/module/box/types.js +1 -0
- package/lib/module/button/button.js +1 -0
- package/lib/module/button/constants.js +1 -0
- package/lib/module/button/helpers.js +1 -0
- package/lib/module/button/index.js +1 -0
- package/lib/module/button/styles.js +1 -0
- package/lib/module/button/types.js +1 -0
- package/lib/module/checkbox/checkbox.js +1 -0
- package/lib/module/checkbox/constants.js +1 -0
- package/lib/module/checkbox/icons.js +1 -0
- package/lib/module/checkbox/index.js +1 -0
- package/lib/module/checkbox/styles.js +1 -0
- package/lib/module/checkbox/types.js +1 -0
- package/lib/module/chip/chip.js +1 -0
- package/lib/module/chip/constants.js +1 -0
- package/lib/module/chip/helpers.js +1 -0
- package/lib/module/chip/index.js +1 -0
- package/lib/module/chip/styles.js +1 -0
- package/lib/module/chip/types.js +1 -0
- package/lib/module/context/index.js +1 -0
- package/lib/module/context/theme-context.js +1 -0
- package/lib/module/flex/flex.js +1 -0
- package/lib/module/flex/index.js +1 -0
- package/lib/module/flex/types.js +1 -0
- package/lib/module/icon-button/constants.js +1 -0
- package/lib/module/icon-button/helpers.js +1 -0
- package/lib/module/icon-button/icon-button.js +1 -0
- package/lib/module/icon-button/index.js +1 -0
- package/lib/module/icon-button/types.js +1 -0
- package/lib/module/index.js +1 -0
- package/lib/module/link-button/constants.js +1 -0
- package/lib/module/link-button/helpers.js +1 -0
- package/lib/module/link-button/index.js +1 -0
- package/lib/module/link-button/link-button.js +1 -0
- package/lib/module/link-button/types.js +1 -0
- package/lib/module/loader/circle-loader.js +1 -0
- package/lib/module/loader/constants.js +1 -0
- package/lib/module/loader/helpers.js +1 -0
- package/lib/module/loader/index.js +1 -0
- package/lib/module/loader/line-loader.js +1 -0
- package/lib/module/loader/types.js +1 -0
- package/lib/module/modal/constants.js +1 -0
- package/lib/module/modal/helpers.js +1 -0
- package/lib/module/modal/index.js +1 -0
- package/lib/module/modal/modal-body.js +1 -0
- package/lib/module/modal/modal-content.js +1 -0
- package/lib/module/modal/modal-description.js +1 -0
- package/lib/module/modal/modal-footer.js +1 -0
- package/lib/module/modal/modal-header.js +1 -0
- package/lib/module/modal/modal-title.js +1 -0
- package/lib/module/modal/modal.js +1 -0
- package/lib/module/modal/styles.js +1 -0
- package/lib/module/modal/types.js +1 -0
- package/lib/module/radio/constants.js +1 -0
- package/lib/module/radio/index.js +1 -0
- package/lib/module/radio/radio.js +1 -0
- package/lib/module/radio/styles.js +1 -0
- package/lib/module/radio/types.js +1 -0
- package/lib/module/segmented-button/constants.js +1 -0
- package/lib/module/segmented-button/helpers.js +1 -0
- package/lib/module/segmented-button/index.js +1 -0
- package/lib/module/segmented-button/segmented-button.js +1 -0
- package/lib/module/segmented-button/styles.js +1 -0
- package/lib/module/segmented-button/types.js +1 -0
- package/lib/module/separator/index.js +1 -0
- package/lib/module/separator/separator.js +1 -0
- package/lib/module/separator/types.js +1 -0
- package/lib/module/switch/constants.js +1 -0
- package/lib/module/switch/index.js +1 -0
- package/lib/module/switch/styles.js +1 -0
- package/lib/module/switch/switch.js +1 -0
- package/lib/module/switch/types.js +1 -0
- package/lib/module/text/index.js +1 -0
- package/lib/module/text/text.js +1 -0
- package/lib/module/text/types.js +1 -0
- package/lib/module/text-input/constants.js +1 -0
- package/lib/module/text-input/index.js +1 -0
- package/lib/module/text-input/styles.js +1 -0
- package/lib/module/text-input/text-input.js +1 -0
- package/lib/module/text-input/types.js +1 -0
- package/lib/module/theme/default-theme.js +1 -0
- package/lib/module/theme/index.js +1 -0
- package/lib/module/toast/constants.js +1 -0
- package/lib/module/toast/helpers.js +1 -0
- package/lib/module/toast/icons.js +1 -0
- package/lib/module/toast/index.js +1 -0
- package/lib/module/toast/styles.js +1 -0
- package/lib/module/toast/toast-container.js +1 -0
- package/lib/module/toast/toast-content.js +1 -0
- package/lib/module/toast/toast-item.js +1 -0
- package/lib/module/toast/toast-provider.js +1 -0
- package/lib/module/toast/toast.js +1 -0
- package/lib/module/toast/types.js +1 -0
- package/lib/module/toast/use-toast.js +1 -0
- package/lib/module/tooltip/constants.js +1 -0
- package/lib/module/tooltip/helpers.js +1 -0
- package/lib/module/tooltip/index.js +1 -0
- package/lib/module/tooltip/styles.js +1 -0
- package/lib/module/tooltip/tooltip.js +1 -0
- package/lib/module/tooltip/types.js +1 -0
- package/lib/module/utils/index.js +1 -0
- package/lib/typescript/alert/alert.d.ts +6 -0
- package/lib/typescript/alert/constants.d.ts +18 -0
- package/lib/typescript/alert/helpers.d.ts +7 -0
- package/lib/typescript/alert/icons.d.ts +25 -0
- package/lib/typescript/alert/index.d.ts +3 -0
- package/lib/typescript/alert/styles.d.ts +25 -0
- package/lib/typescript/alert/types.d.ts +20 -0
- package/lib/typescript/avatar/avatar-group.constants.d.ts +18 -0
- package/lib/typescript/avatar/avatar-group.d.ts +6 -0
- package/lib/typescript/avatar/avatar-group.helpers.d.ts +12 -0
- package/lib/typescript/avatar/avatar-group.styles.d.ts +20 -0
- package/lib/typescript/avatar/avatar-group.types.d.ts +18 -0
- package/lib/typescript/avatar/avatar.d.ts +6 -0
- package/lib/typescript/avatar/constants.d.ts +10 -0
- package/lib/typescript/avatar/helpers.d.ts +6 -0
- package/lib/typescript/avatar/index.d.ts +5 -0
- package/lib/typescript/avatar/styles.d.ts +9 -0
- package/lib/typescript/avatar/types.d.ts +27 -0
- package/lib/typescript/badge/badge.d.ts +6 -0
- package/lib/typescript/badge/constants.d.ts +21 -0
- package/lib/typescript/badge/helpers.d.ts +9 -0
- package/lib/typescript/badge/index.d.ts +3 -0
- package/lib/typescript/badge/styles.d.ts +19 -0
- package/lib/typescript/badge/types.d.ts +24 -0
- package/lib/typescript/bottom-sheet/bottom-sheet-header.d.ts +4 -0
- package/lib/typescript/bottom-sheet/bottom-sheet-modal.d.ts +6 -0
- package/lib/typescript/bottom-sheet/bottom-sheet.d.ts +5 -0
- package/lib/typescript/bottom-sheet/constants.d.ts +10 -0
- package/lib/typescript/bottom-sheet/index.d.ts +7 -0
- package/lib/typescript/bottom-sheet/styles.d.ts +11 -0
- package/lib/typescript/bottom-sheet/types.d.ts +35 -0
- package/lib/typescript/box/box.d.ts +6 -0
- package/lib/typescript/box/index.d.ts +3 -0
- package/lib/typescript/box/types.d.ts +8 -0
- package/lib/typescript/button/button.d.ts +9 -0
- package/lib/typescript/button/constants.d.ts +30 -0
- package/lib/typescript/button/helpers.d.ts +39 -0
- package/lib/typescript/button/index.d.ts +3 -0
- package/lib/typescript/button/styles.d.ts +12 -0
- package/lib/typescript/button/types.d.ts +38 -0
- package/lib/typescript/checkbox/checkbox.d.ts +6 -0
- package/lib/typescript/checkbox/constants.d.ts +10 -0
- package/lib/typescript/checkbox/icons.d.ts +9 -0
- package/lib/typescript/checkbox/index.d.ts +3 -0
- package/lib/typescript/checkbox/styles.d.ts +25 -0
- package/lib/typescript/checkbox/types.d.ts +25 -0
- package/lib/typescript/chip/chip.d.ts +6 -0
- package/lib/typescript/chip/constants.d.ts +31 -0
- package/lib/typescript/chip/helpers.d.ts +11 -0
- package/lib/typescript/chip/index.d.ts +3 -0
- package/lib/typescript/chip/styles.d.ts +22 -0
- package/lib/typescript/chip/types.d.ts +31 -0
- package/lib/typescript/context/index.d.ts +2 -0
- package/lib/typescript/context/theme-context.d.ts +17 -0
- package/lib/typescript/flex/flex.d.ts +6 -0
- package/lib/typescript/flex/index.d.ts +3 -0
- package/lib/typescript/flex/types.d.ts +22 -0
- package/lib/typescript/icon-button/constants.d.ts +20 -0
- package/lib/typescript/icon-button/helpers.d.ts +13 -0
- package/lib/typescript/icon-button/icon-button.d.ts +6 -0
- package/lib/typescript/icon-button/index.d.ts +3 -0
- package/lib/typescript/icon-button/types.d.ts +31 -0
- package/lib/typescript/index.d.ts +49 -0
- package/lib/typescript/link-button/constants.d.ts +22 -0
- package/lib/typescript/link-button/helpers.d.ts +12 -0
- package/lib/typescript/link-button/index.d.ts +3 -0
- package/lib/typescript/link-button/link-button.d.ts +9 -0
- package/lib/typescript/link-button/types.d.ts +25 -0
- package/lib/typescript/loader/circle-loader.d.ts +6 -0
- package/lib/typescript/loader/constants.d.ts +8 -0
- package/lib/typescript/loader/helpers.d.ts +9 -0
- package/lib/typescript/loader/index.d.ts +4 -0
- package/lib/typescript/loader/line-loader.d.ts +6 -0
- package/lib/typescript/loader/types.d.ts +19 -0
- package/lib/typescript/modal/constants.d.ts +26 -0
- package/lib/typescript/modal/helpers.d.ts +8 -0
- package/lib/typescript/modal/index.d.ts +9 -0
- package/lib/typescript/modal/modal-body.d.ts +9 -0
- package/lib/typescript/modal/modal-content.d.ts +9 -0
- package/lib/typescript/modal/modal-description.d.ts +7 -0
- package/lib/typescript/modal/modal-footer.d.ts +9 -0
- package/lib/typescript/modal/modal-header.d.ts +9 -0
- package/lib/typescript/modal/modal-title.d.ts +7 -0
- package/lib/typescript/modal/modal.d.ts +12 -0
- package/lib/typescript/modal/styles.d.ts +38 -0
- package/lib/typescript/modal/types.d.ts +89 -0
- package/lib/typescript/radio/constants.d.ts +9 -0
- package/lib/typescript/radio/index.d.ts +3 -0
- package/lib/typescript/radio/radio.d.ts +6 -0
- package/lib/typescript/radio/styles.d.ts +24 -0
- package/lib/typescript/radio/types.d.ts +23 -0
- package/lib/typescript/segmented-button/constants.d.ts +21 -0
- package/lib/typescript/segmented-button/helpers.d.ts +8 -0
- package/lib/typescript/segmented-button/index.d.ts +3 -0
- package/lib/typescript/segmented-button/segmented-button.d.ts +6 -0
- package/lib/typescript/segmented-button/styles.d.ts +24 -0
- package/lib/typescript/segmented-button/types.d.ts +30 -0
- package/lib/typescript/separator/index.d.ts +3 -0
- package/lib/typescript/separator/separator.d.ts +6 -0
- package/lib/typescript/separator/types.d.ts +25 -0
- package/lib/typescript/switch/constants.d.ts +17 -0
- package/lib/typescript/switch/index.d.ts +3 -0
- package/lib/typescript/switch/styles.d.ts +12 -0
- package/lib/typescript/switch/switch.d.ts +6 -0
- package/lib/typescript/switch/types.d.ts +23 -0
- package/lib/typescript/text/index.d.ts +3 -0
- package/lib/typescript/text/text.d.ts +6 -0
- package/lib/typescript/text/types.d.ts +39 -0
- package/lib/typescript/text-input/constants.d.ts +13 -0
- package/lib/typescript/text-input/index.d.ts +3 -0
- package/lib/typescript/text-input/styles.d.ts +57 -0
- package/lib/typescript/text-input/text-input.d.ts +6 -0
- package/lib/typescript/text-input/types.d.ts +57 -0
- package/lib/typescript/theme/default-theme.d.ts +209 -0
- package/lib/typescript/theme/index.d.ts +4 -0
- package/lib/typescript/toast/constants.d.ts +42 -0
- package/lib/typescript/toast/helpers.d.ts +16 -0
- package/lib/typescript/toast/icons.d.ts +10 -0
- package/lib/typescript/toast/index.d.ts +5 -0
- package/lib/typescript/toast/styles.d.ts +47 -0
- package/lib/typescript/toast/toast-container.d.ts +4 -0
- package/lib/typescript/toast/toast-content.d.ts +8 -0
- package/lib/typescript/toast/toast-item.d.ts +4 -0
- package/lib/typescript/toast/toast-provider.d.ts +13 -0
- package/lib/typescript/toast/toast.d.ts +2 -0
- package/lib/typescript/toast/types.d.ts +123 -0
- package/lib/typescript/toast/use-toast.d.ts +56 -0
- package/lib/typescript/tooltip/constants.d.ts +20 -0
- package/lib/typescript/tooltip/helpers.d.ts +31 -0
- package/lib/typescript/tooltip/index.d.ts +3 -0
- package/lib/typescript/tooltip/styles.d.ts +24 -0
- package/lib/typescript/tooltip/tooltip.d.ts +6 -0
- package/lib/typescript/tooltip/types.d.ts +39 -0
- package/lib/typescript/utils/index.d.ts +91 -0
- package/package.json +134 -27
- package/dist/commonjs/Box/box.js +0 -83
- package/dist/commonjs/Box/box.js.map +0 -1
- package/dist/commonjs/Box/index.js +0 -17
- package/dist/commonjs/Box/index.js.map +0 -1
- package/dist/commonjs/ThemeProvider/TwigsThemeProvider.js +0 -20
- package/dist/commonjs/ThemeProvider/TwigsThemeProvider.js.map +0 -1
- package/dist/commonjs/ThemeProvider/index.js +0 -17
- package/dist/commonjs/ThemeProvider/index.js.map +0 -1
- package/dist/commonjs/config/theme.js +0 -201
- package/dist/commonjs/config/theme.js.map +0 -1
- package/dist/commonjs/index.js +0 -28
- package/dist/commonjs/index.js.map +0 -1
- package/dist/commonjs/utils/index.js +0 -2
- package/dist/commonjs/utils/index.js.map +0 -1
- package/dist/module/Box/box.js +0 -77
- package/dist/module/Box/box.js.map +0 -1
- package/dist/module/Box/index.js +0 -4
- package/dist/module/Box/index.js.map +0 -1
- package/dist/module/ThemeProvider/TwigsThemeProvider.js +0 -14
- package/dist/module/ThemeProvider/TwigsThemeProvider.js.map +0 -1
- package/dist/module/ThemeProvider/index.js +0 -4
- package/dist/module/ThemeProvider/index.js.map +0 -1
- package/dist/module/config/theme.js +0 -197
- package/dist/module/config/theme.js.map +0 -1
- package/dist/module/index.js +0 -5
- package/dist/module/index.js.map +0 -1
- package/dist/module/utils/index.js +0 -2
- package/dist/module/utils/index.js.map +0 -1
- package/dist/types/Box/box.d.ts +0 -23
- package/dist/types/Box/box.d.ts.map +0 -1
- package/dist/types/Box/index.d.ts +0 -2
- package/dist/types/Box/index.d.ts.map +0 -1
- package/dist/types/ThemeProvider/TwigsThemeProvider.d.ts +0 -8
- package/dist/types/ThemeProvider/TwigsThemeProvider.d.ts.map +0 -1
- package/dist/types/ThemeProvider/index.d.ts +0 -2
- package/dist/types/ThemeProvider/index.d.ts.map +0 -1
- package/dist/types/config/theme.d.ts +0 -195
- package/dist/types/config/theme.d.ts.map +0 -1
- package/dist/types/index.d.ts +0 -3
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/utils/index.d.ts +0 -1
- package/dist/types/utils/index.d.ts.map +0 -1
- package/src/Box/box.tsx +0 -82
- package/src/Box/index.tsx +0 -1
- package/src/ThemeProvider/TwigsThemeProvider.tsx +0 -13
- package/src/ThemeProvider/index.ts +0 -1
- package/src/config/theme.ts +0 -195
- package/src/index.ts +0 -2
- package/src/utils/index.ts +0 -0
- /package/{dist → lib}/commonjs/package.json +0 -0
- /package/{dist → lib}/module/package.json +0 -0
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
export interface ThemeColors {
|
|
2
|
+
primary: string;
|
|
3
|
+
secondary: string;
|
|
4
|
+
accent50: string;
|
|
5
|
+
accent100: string;
|
|
6
|
+
accent200: string;
|
|
7
|
+
accent300: string;
|
|
8
|
+
accent400: string;
|
|
9
|
+
accent500: string;
|
|
10
|
+
accent600: string;
|
|
11
|
+
accent700: string;
|
|
12
|
+
accent800: string;
|
|
13
|
+
accent900: string;
|
|
14
|
+
primary50: string;
|
|
15
|
+
primary100: string;
|
|
16
|
+
primary200: string;
|
|
17
|
+
primary300: string;
|
|
18
|
+
primary400: string;
|
|
19
|
+
primary500: string;
|
|
20
|
+
primary600: string;
|
|
21
|
+
primary700: string;
|
|
22
|
+
primary800: string;
|
|
23
|
+
primary900: string;
|
|
24
|
+
warning50: string;
|
|
25
|
+
warning100: string;
|
|
26
|
+
warning200: string;
|
|
27
|
+
warning300: string;
|
|
28
|
+
warning400: string;
|
|
29
|
+
warning500: string;
|
|
30
|
+
warning600: string;
|
|
31
|
+
warning700: string;
|
|
32
|
+
warning800: string;
|
|
33
|
+
warning900: string;
|
|
34
|
+
highlight50: string;
|
|
35
|
+
highlight100: string;
|
|
36
|
+
highlight200: string;
|
|
37
|
+
highlight300: string;
|
|
38
|
+
highlight400: string;
|
|
39
|
+
highlight500: string;
|
|
40
|
+
highlight600: string;
|
|
41
|
+
highlight700: string;
|
|
42
|
+
highlight800: string;
|
|
43
|
+
highlight900: string;
|
|
44
|
+
positive50: string;
|
|
45
|
+
positive100: string;
|
|
46
|
+
positive200: string;
|
|
47
|
+
positive300: string;
|
|
48
|
+
positive400: string;
|
|
49
|
+
positive500: string;
|
|
50
|
+
positive600: string;
|
|
51
|
+
positive700: string;
|
|
52
|
+
positive800: string;
|
|
53
|
+
positive900: string;
|
|
54
|
+
secondary50: string;
|
|
55
|
+
secondary100: string;
|
|
56
|
+
secondary200: string;
|
|
57
|
+
secondary300: string;
|
|
58
|
+
secondary400: string;
|
|
59
|
+
secondary500: string;
|
|
60
|
+
secondary600: string;
|
|
61
|
+
secondary700: string;
|
|
62
|
+
secondary800: string;
|
|
63
|
+
secondary900: string;
|
|
64
|
+
negative50: string;
|
|
65
|
+
negative100: string;
|
|
66
|
+
negative200: string;
|
|
67
|
+
negative300: string;
|
|
68
|
+
negative400: string;
|
|
69
|
+
negative500: string;
|
|
70
|
+
negative600: string;
|
|
71
|
+
negative700: string;
|
|
72
|
+
negative800: string;
|
|
73
|
+
negative900: string;
|
|
74
|
+
neutral50: string;
|
|
75
|
+
neutral100: string;
|
|
76
|
+
neutral200: string;
|
|
77
|
+
neutral300: string;
|
|
78
|
+
neutral400: string;
|
|
79
|
+
neutral500: string;
|
|
80
|
+
neutral600: string;
|
|
81
|
+
neutral700: string;
|
|
82
|
+
neutral800: string;
|
|
83
|
+
neutral900: string;
|
|
84
|
+
black50: string;
|
|
85
|
+
black100: string;
|
|
86
|
+
black200: string;
|
|
87
|
+
black300: string;
|
|
88
|
+
black400: string;
|
|
89
|
+
black500: string;
|
|
90
|
+
black600: string;
|
|
91
|
+
black700: string;
|
|
92
|
+
black800: string;
|
|
93
|
+
black900: string;
|
|
94
|
+
white50: string;
|
|
95
|
+
white100: string;
|
|
96
|
+
white200: string;
|
|
97
|
+
white300: string;
|
|
98
|
+
white400: string;
|
|
99
|
+
white500: string;
|
|
100
|
+
white600: string;
|
|
101
|
+
white700: string;
|
|
102
|
+
white800: string;
|
|
103
|
+
white900: string;
|
|
104
|
+
}
|
|
105
|
+
/** Space tokens in dp (density-independent pixels). Key is a scale number. */
|
|
106
|
+
export interface ThemeSpace {
|
|
107
|
+
[key: string]: number;
|
|
108
|
+
}
|
|
109
|
+
/** Font size tokens in dp. */
|
|
110
|
+
export interface ThemeFontSizes {
|
|
111
|
+
xxs: number;
|
|
112
|
+
xs: number;
|
|
113
|
+
sm: number;
|
|
114
|
+
md: number;
|
|
115
|
+
lg: number;
|
|
116
|
+
xl: number;
|
|
117
|
+
'2xl': number;
|
|
118
|
+
'3xl': number;
|
|
119
|
+
'4xl': number;
|
|
120
|
+
'5xl': number;
|
|
121
|
+
}
|
|
122
|
+
/** Font family tokens. */
|
|
123
|
+
export interface ThemeFonts {
|
|
124
|
+
regular: string;
|
|
125
|
+
medium: string;
|
|
126
|
+
bold: string;
|
|
127
|
+
}
|
|
128
|
+
/** Font weight tokens (React Native expects string values). */
|
|
129
|
+
export interface ThemeFontWeights {
|
|
130
|
+
[key: string]: string;
|
|
131
|
+
}
|
|
132
|
+
/** Line height tokens in dp. */
|
|
133
|
+
export interface ThemeLineHeights {
|
|
134
|
+
xxs: number;
|
|
135
|
+
xs: number;
|
|
136
|
+
sm: number;
|
|
137
|
+
md: number;
|
|
138
|
+
lg: number;
|
|
139
|
+
xl: number;
|
|
140
|
+
'2xl': number;
|
|
141
|
+
'3xl': number;
|
|
142
|
+
'4xl': number;
|
|
143
|
+
}
|
|
144
|
+
/** Letter spacing tokens in dp. */
|
|
145
|
+
export interface ThemeLetterSpacings {
|
|
146
|
+
[key: string]: number;
|
|
147
|
+
}
|
|
148
|
+
/** Component size tokens in dp. */
|
|
149
|
+
export interface ThemeSizes {
|
|
150
|
+
[key: string]: number;
|
|
151
|
+
}
|
|
152
|
+
/** Border width tokens in dp. */
|
|
153
|
+
export interface ThemeBorderWidths {
|
|
154
|
+
xs: number;
|
|
155
|
+
sm: number;
|
|
156
|
+
md: number;
|
|
157
|
+
lg: number;
|
|
158
|
+
xl: number;
|
|
159
|
+
}
|
|
160
|
+
/** Border style tokens. */
|
|
161
|
+
export interface ThemeBorderStyles {
|
|
162
|
+
[key: string]: string;
|
|
163
|
+
}
|
|
164
|
+
/** Border radius tokens in dp. `round` and `pill` use 9999. */
|
|
165
|
+
export interface ThemeRadii {
|
|
166
|
+
none: number;
|
|
167
|
+
xs: number;
|
|
168
|
+
sm: number;
|
|
169
|
+
md: number;
|
|
170
|
+
lg: number;
|
|
171
|
+
xl: number;
|
|
172
|
+
'2xl': number;
|
|
173
|
+
'3xl': number;
|
|
174
|
+
'4xl': number;
|
|
175
|
+
round: number;
|
|
176
|
+
pill: number;
|
|
177
|
+
}
|
|
178
|
+
/** Shadow tokens (React Native shadow objects serialised as strings). */
|
|
179
|
+
export interface ThemeShadows {
|
|
180
|
+
[key: string]: string;
|
|
181
|
+
}
|
|
182
|
+
/** Z-index tokens. */
|
|
183
|
+
export interface ThemeZIndices {
|
|
184
|
+
[key: string]: number;
|
|
185
|
+
}
|
|
186
|
+
/** Transition duration tokens in milliseconds. */
|
|
187
|
+
export interface ThemeTransitions {
|
|
188
|
+
[key: string]: number;
|
|
189
|
+
}
|
|
190
|
+
/** Complete theme object consumed by all Twigs components via `useTheme()`. */
|
|
191
|
+
export interface TwigsTheme {
|
|
192
|
+
colors: ThemeColors;
|
|
193
|
+
space: ThemeSpace;
|
|
194
|
+
fontSizes: ThemeFontSizes;
|
|
195
|
+
fonts: ThemeFonts;
|
|
196
|
+
fontWeights: ThemeFontWeights;
|
|
197
|
+
lineHeights: ThemeLineHeights;
|
|
198
|
+
letterSpacings: ThemeLetterSpacings;
|
|
199
|
+
sizes: ThemeSizes;
|
|
200
|
+
borderWidths: ThemeBorderWidths;
|
|
201
|
+
borderStyles: ThemeBorderStyles;
|
|
202
|
+
radii: ThemeRadii;
|
|
203
|
+
shadows: ThemeShadows;
|
|
204
|
+
zIndices: ThemeZIndices;
|
|
205
|
+
transitions: ThemeTransitions;
|
|
206
|
+
}
|
|
207
|
+
/** Default theme values. All dimension tokens are React Native dp numbers. */
|
|
208
|
+
export declare const defaultTheme: TwigsTheme;
|
|
209
|
+
//# sourceMappingURL=default-theme.d.ts.map
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { defaultTheme } from './default-theme';
|
|
2
|
+
export { defaultTheme as theme } from './default-theme';
|
|
3
|
+
export type { TwigsTheme, ThemeColors, ThemeSpace, ThemeFontSizes, ThemeFonts, ThemeFontWeights, ThemeLineHeights, ThemeLetterSpacings, ThemeSizes, ThemeBorderWidths, ThemeBorderStyles, ThemeRadii, ThemeShadows, ThemeZIndices, ThemeTransitions, } from './default-theme';
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { ToastVariant, ToastPosition } from './types';
|
|
2
|
+
interface VariantColorConfig {
|
|
3
|
+
background: string;
|
|
4
|
+
text: string;
|
|
5
|
+
icon: string;
|
|
6
|
+
actionText: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const VARIANT_COLORS: Record<ToastVariant, VariantColorConfig>;
|
|
9
|
+
export declare const TOAST_ICON_SIZE = 24;
|
|
10
|
+
export declare const TOAST_BORDER_RADIUS = 8;
|
|
11
|
+
export declare const TOAST_PADDING_HORIZONTAL = 16;
|
|
12
|
+
export declare const TOAST_PADDING_VERTICAL = 12;
|
|
13
|
+
export declare const TOAST_CONTAINER_GAP = 16;
|
|
14
|
+
export declare const TOAST_CONTENT_GAP = 8;
|
|
15
|
+
export declare const TOAST_MAX_WIDTH = 400;
|
|
16
|
+
export declare const TOAST_MIN_HEIGHT = 48;
|
|
17
|
+
export declare const TOAST_TITLE_FONT_SIZE = 14;
|
|
18
|
+
export declare const TOAST_TITLE_LINE_HEIGHT = 20;
|
|
19
|
+
export declare const TOAST_DESCRIPTION_FONT_SIZE = 12;
|
|
20
|
+
export declare const TOAST_DESCRIPTION_LINE_HEIGHT = 16;
|
|
21
|
+
export declare const DEFAULT_VARIANT: ToastVariant;
|
|
22
|
+
export declare const DEFAULT_DURATION = 4000;
|
|
23
|
+
export declare const DEFAULT_POSITION: ToastPosition;
|
|
24
|
+
export declare const DEFAULT_MAX_TOASTS = 3;
|
|
25
|
+
export declare const DEFAULT_GAP = 8;
|
|
26
|
+
export declare const DEFAULT_OFFSET = 40;
|
|
27
|
+
export declare const ANIMATION_DURATION = 300;
|
|
28
|
+
export declare const SWIPE_THRESHOLD = 24;
|
|
29
|
+
export declare const SWIPE_ELASTIC_RESISTANCE = 0.4;
|
|
30
|
+
export declare const SWIPE_DISMISS_OFFSET = -300;
|
|
31
|
+
export declare const ENTRY_SPRING_CONFIG: {
|
|
32
|
+
damping: number;
|
|
33
|
+
stiffness: number;
|
|
34
|
+
mass: number;
|
|
35
|
+
};
|
|
36
|
+
export declare const PAN_ACTIVE_OFFSET_Y: [number, number];
|
|
37
|
+
export declare const PAN_FAIL_OFFSET_X: [number, number];
|
|
38
|
+
export declare const POSITION_STYLES: Record<ToastPosition, {
|
|
39
|
+
vertical: 'top' | 'bottom';
|
|
40
|
+
}>;
|
|
41
|
+
export {};
|
|
42
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ViewStyle, TextStyle } from 'react-native';
|
|
2
|
+
import type { TwigsTheme } from '../theme';
|
|
3
|
+
import type { ToastVariant, ToastPosition } from './types';
|
|
4
|
+
export declare function generateToastId(): string;
|
|
5
|
+
export declare function getVariantContainerStyles(theme: TwigsTheme, variant: ToastVariant): ViewStyle;
|
|
6
|
+
export declare function getIconColor(theme: TwigsTheme, variant: ToastVariant): string;
|
|
7
|
+
export declare function getBackgroundColor(theme: TwigsTheme, variant: ToastVariant): string;
|
|
8
|
+
export declare function getTitleStyles(theme: TwigsTheme, variant: ToastVariant): TextStyle;
|
|
9
|
+
export declare function getDescriptionStyles(theme: TwigsTheme, variant: ToastVariant): TextStyle;
|
|
10
|
+
/**
|
|
11
|
+
* Applies elastic resistance to a swipe distance (Reanimated worklet).
|
|
12
|
+
* Returns a dampened value that decreases progressively as distance grows.
|
|
13
|
+
*/
|
|
14
|
+
export declare function elasticResistance(distance: number): number;
|
|
15
|
+
export declare function getPositionContainerStyle(position: ToastPosition, offset: number): ViewStyle;
|
|
16
|
+
//# sourceMappingURL=helpers.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ToastIconProps, ToastInfoIconProps } from './types';
|
|
3
|
+
/** Filled check-circle icon for success/default variants. */
|
|
4
|
+
export declare const CheckCircleFilledIcon: ({ size, color }: ToastIconProps) => React.JSX.Element;
|
|
5
|
+
/** Filled alert-triangle icon for error variant. */
|
|
6
|
+
export declare const AlertFilledIcon: ({ size, color }: ToastIconProps) => React.JSX.Element;
|
|
7
|
+
/** Filled info-circle icon with inner cutout color for the "i" glyph. */
|
|
8
|
+
export declare const InfoCircleFilledIcon: ({ size, color, innerColor }: ToastInfoIconProps) => React.JSX.Element;
|
|
9
|
+
export declare const VARIANT_ICONS: Record<string, React.FC<ToastIconProps>>;
|
|
10
|
+
//# sourceMappingURL=icons.d.ts.map
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { ToastProvider } from './toast-provider';
|
|
2
|
+
export { toast } from './toast';
|
|
3
|
+
export { useToast } from './use-toast';
|
|
4
|
+
export type { ToastOptions, ToastProviderProps, ToastVariant, ToastPosition, ToastState, ToastContextType, ToastItemProps, ToastContainerProps, ToastContentProps, ToastIconProps, ToastInfoIconProps, UseToastReturn, } from './types';
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
export declare const styles: {
|
|
2
|
+
overlay: {
|
|
3
|
+
position: "absolute";
|
|
4
|
+
left: 0;
|
|
5
|
+
right: 0;
|
|
6
|
+
top: 0;
|
|
7
|
+
bottom: 0;
|
|
8
|
+
};
|
|
9
|
+
gestureRoot: {
|
|
10
|
+
flex: number;
|
|
11
|
+
};
|
|
12
|
+
stackContainer: {
|
|
13
|
+
width: "100%";
|
|
14
|
+
};
|
|
15
|
+
toastWrapper: {
|
|
16
|
+
width: "100%";
|
|
17
|
+
alignItems: "center";
|
|
18
|
+
};
|
|
19
|
+
container: {
|
|
20
|
+
flexDirection: "row";
|
|
21
|
+
alignItems: "center";
|
|
22
|
+
};
|
|
23
|
+
contentSection: {
|
|
24
|
+
flexDirection: "row";
|
|
25
|
+
flex: number;
|
|
26
|
+
alignItems: "center";
|
|
27
|
+
gap: number;
|
|
28
|
+
};
|
|
29
|
+
iconContainer: {
|
|
30
|
+
alignItems: "center";
|
|
31
|
+
justifyContent: "center";
|
|
32
|
+
};
|
|
33
|
+
textContainer: {
|
|
34
|
+
flex: number;
|
|
35
|
+
};
|
|
36
|
+
title: {
|
|
37
|
+
flexShrink: number;
|
|
38
|
+
};
|
|
39
|
+
description: {
|
|
40
|
+
flexShrink: number;
|
|
41
|
+
};
|
|
42
|
+
actionContainer: {
|
|
43
|
+
alignItems: "center";
|
|
44
|
+
justifyContent: "center";
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ToastContentProps } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Visual content renderer for a single toast. Consumed by ToastItem.
|
|
5
|
+
* Not exported from the public API — consumers interact via toast() and ToastProvider.
|
|
6
|
+
*/
|
|
7
|
+
export declare const ToastContent: ({ title, description, variant: variantProp, icon, action }: ToastContentProps) => React.JSX.Element;
|
|
8
|
+
//# sourceMappingURL=toast-content.d.ts.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ToastProviderProps } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Provides toast infrastructure for the app. Must be placed inside TwigsProvider
|
|
5
|
+
* so toast renderers can access the theme.
|
|
6
|
+
*
|
|
7
|
+
* Manages the toast queue and renders stacked toast containers per position.
|
|
8
|
+
*/
|
|
9
|
+
export declare const ToastProvider: {
|
|
10
|
+
({ children, defaultPosition, defaultDuration, maxToasts, gap, offset, }: ToastProviderProps): React.JSX.Element;
|
|
11
|
+
displayName: string;
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=toast-provider.d.ts.map
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import type { ReactElement, ReactNode } from 'react';
|
|
2
|
+
/** Toast variant determines the visual appearance and default icon */
|
|
3
|
+
export type ToastVariant = 'default' | 'secondary' | 'success' | 'error' | 'warning' | 'loading';
|
|
4
|
+
/** Toast display position */
|
|
5
|
+
export type ToastPosition = 'top-center' | 'bottom-center';
|
|
6
|
+
/** Options for the imperative toast() function */
|
|
7
|
+
export interface ToastOptions {
|
|
8
|
+
/** Unique identifier — auto-generated if omitted, pass to update an existing toast */
|
|
9
|
+
id?: string;
|
|
10
|
+
/** Primary text shown in the toast */
|
|
11
|
+
title: string;
|
|
12
|
+
/** Secondary text below the title */
|
|
13
|
+
description?: string;
|
|
14
|
+
/** Visual variant that controls colors and default icon */
|
|
15
|
+
variant?: ToastVariant;
|
|
16
|
+
/** Custom icon element — overrides the default variant icon */
|
|
17
|
+
icon?: ReactElement;
|
|
18
|
+
/** Action element rendered on the right side (e.g. LinkButton, IconButton) */
|
|
19
|
+
action?: ReactElement;
|
|
20
|
+
/** Auto-dismiss duration in milliseconds (Infinity for no auto-dismiss) */
|
|
21
|
+
duration?: number;
|
|
22
|
+
/** Display position */
|
|
23
|
+
position?: ToastPosition;
|
|
24
|
+
/** Callback when the toast body is pressed */
|
|
25
|
+
onPress?: () => void;
|
|
26
|
+
/** Callback when the toast becomes visible */
|
|
27
|
+
onShow?: () => void;
|
|
28
|
+
/** Callback when the toast is dismissed */
|
|
29
|
+
onDismiss?: () => void;
|
|
30
|
+
}
|
|
31
|
+
/** Internal toast state tracked by the provider */
|
|
32
|
+
export interface ToastState extends Required<Omit<ToastOptions, 'icon' | 'action' | 'onPress' | 'onShow' | 'onDismiss'>> {
|
|
33
|
+
id: string;
|
|
34
|
+
icon: ReactElement | null;
|
|
35
|
+
action: ReactElement | null;
|
|
36
|
+
createdAt: number;
|
|
37
|
+
onPress?: () => void;
|
|
38
|
+
onShow?: () => void;
|
|
39
|
+
onDismiss?: () => void;
|
|
40
|
+
}
|
|
41
|
+
/** Props for the ToastProvider component */
|
|
42
|
+
export interface ToastProviderProps {
|
|
43
|
+
children: ReactNode;
|
|
44
|
+
/** Default position for all toasts */
|
|
45
|
+
defaultPosition?: ToastPosition;
|
|
46
|
+
/** Default auto-dismiss duration in milliseconds */
|
|
47
|
+
defaultDuration?: number;
|
|
48
|
+
/** Maximum number of visible toasts per position */
|
|
49
|
+
maxToasts?: number;
|
|
50
|
+
/** Gap between stacked toasts in dp */
|
|
51
|
+
gap?: number;
|
|
52
|
+
/** Offset from the screen edge in dp */
|
|
53
|
+
offset?: number;
|
|
54
|
+
}
|
|
55
|
+
/** Context type for toast operations */
|
|
56
|
+
export interface ToastContextType {
|
|
57
|
+
add: (options: ToastOptions) => {
|
|
58
|
+
id: string;
|
|
59
|
+
dismiss: () => void;
|
|
60
|
+
};
|
|
61
|
+
dismiss: (id?: string) => void;
|
|
62
|
+
update: (id: string, options: Partial<ToastOptions>) => void;
|
|
63
|
+
toasts: ToastState[];
|
|
64
|
+
}
|
|
65
|
+
/** Props for individual ToastItem component */
|
|
66
|
+
export interface ToastItemProps extends ToastState {
|
|
67
|
+
onRemove: (id: string) => void;
|
|
68
|
+
}
|
|
69
|
+
/** Props for the ToastContainer and PositionedStack */
|
|
70
|
+
export interface ToastContainerProps {
|
|
71
|
+
toasts: ToastState[];
|
|
72
|
+
position: ToastPosition;
|
|
73
|
+
offset: number;
|
|
74
|
+
gap: number;
|
|
75
|
+
onRemove: (id: string) => void;
|
|
76
|
+
}
|
|
77
|
+
/** Props for the ToastContent visual renderer */
|
|
78
|
+
export interface ToastContentProps {
|
|
79
|
+
title: string;
|
|
80
|
+
description?: string;
|
|
81
|
+
variant?: ToastVariant;
|
|
82
|
+
icon?: ReactElement | null;
|
|
83
|
+
action?: ReactElement | null;
|
|
84
|
+
}
|
|
85
|
+
/** Props for toast SVG icons */
|
|
86
|
+
export interface ToastIconProps {
|
|
87
|
+
size: number;
|
|
88
|
+
color: string;
|
|
89
|
+
}
|
|
90
|
+
/** Props for the info-circle icon with inner cutout color */
|
|
91
|
+
export interface ToastInfoIconProps extends ToastIconProps {
|
|
92
|
+
innerColor: string;
|
|
93
|
+
}
|
|
94
|
+
/** Return type of the useToast hook */
|
|
95
|
+
export interface UseToastReturn {
|
|
96
|
+
show: (options: ToastOptions) => {
|
|
97
|
+
id: string;
|
|
98
|
+
dismiss: () => void;
|
|
99
|
+
};
|
|
100
|
+
secondary: (arg: string | Omit<ToastOptions, 'variant'>) => {
|
|
101
|
+
id: string;
|
|
102
|
+
dismiss: () => void;
|
|
103
|
+
};
|
|
104
|
+
success: (arg: string | Omit<ToastOptions, 'variant'>) => {
|
|
105
|
+
id: string;
|
|
106
|
+
dismiss: () => void;
|
|
107
|
+
};
|
|
108
|
+
error: (arg: string | Omit<ToastOptions, 'variant'>) => {
|
|
109
|
+
id: string;
|
|
110
|
+
dismiss: () => void;
|
|
111
|
+
};
|
|
112
|
+
warning: (arg: string | Omit<ToastOptions, 'variant'>) => {
|
|
113
|
+
id: string;
|
|
114
|
+
dismiss: () => void;
|
|
115
|
+
};
|
|
116
|
+
loading: (arg: string | Omit<ToastOptions, 'variant'>) => {
|
|
117
|
+
id: string;
|
|
118
|
+
dismiss: () => void;
|
|
119
|
+
};
|
|
120
|
+
dismiss: (id?: string) => void;
|
|
121
|
+
update: (id: string, options: Partial<ToastOptions>) => void;
|
|
122
|
+
}
|
|
123
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { ToastOptions, ToastContextType, UseToastReturn } from './types';
|
|
2
|
+
export declare const ToastContext: import("react").Context<ToastContextType | null>;
|
|
3
|
+
/** Returns the toast context — throws if called outside ToastProvider. */
|
|
4
|
+
export declare function useToastContext(): ToastContextType;
|
|
5
|
+
type ShorthandArg = string | Omit<ToastOptions, 'variant'>;
|
|
6
|
+
/** React hook providing the full toast API — must be used inside ToastProvider */
|
|
7
|
+
export declare function useToast(): UseToastReturn;
|
|
8
|
+
declare let globalAdd: ToastContextType['add'] | null;
|
|
9
|
+
declare let globalDismiss: ToastContextType['dismiss'] | null;
|
|
10
|
+
declare let globalUpdate: ToastContextType['update'] | null;
|
|
11
|
+
/** Registers global toast handlers — called internally by ToastProvider on mount. */
|
|
12
|
+
export declare function setGlobalToastHandlers(add: typeof globalAdd, dismiss: typeof globalDismiss, update: typeof globalUpdate): void;
|
|
13
|
+
declare function showToast(options: ToastOptions): {
|
|
14
|
+
id: string;
|
|
15
|
+
dismiss: () => void;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Imperative toast API — works inside and outside React components.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* toast({ title: 'Hello', variant: 'success' });
|
|
22
|
+
* toast.secondary('Info');
|
|
23
|
+
* toast.success('Saved!');
|
|
24
|
+
* toast.error('Failed!');
|
|
25
|
+
* toast.warning('Careful');
|
|
26
|
+
* toast.loading('Processing...');
|
|
27
|
+
* toast.dismiss();
|
|
28
|
+
* toast.dismiss(id);
|
|
29
|
+
* toast.update(id, { title: 'Updated!' });
|
|
30
|
+
*/
|
|
31
|
+
export declare const toast: typeof showToast & {
|
|
32
|
+
secondary: (arg: ShorthandArg) => {
|
|
33
|
+
id: string;
|
|
34
|
+
dismiss: () => void;
|
|
35
|
+
};
|
|
36
|
+
success: (arg: ShorthandArg) => {
|
|
37
|
+
id: string;
|
|
38
|
+
dismiss: () => void;
|
|
39
|
+
};
|
|
40
|
+
error: (arg: ShorthandArg) => {
|
|
41
|
+
id: string;
|
|
42
|
+
dismiss: () => void;
|
|
43
|
+
};
|
|
44
|
+
warning: (arg: ShorthandArg) => {
|
|
45
|
+
id: string;
|
|
46
|
+
dismiss: () => void;
|
|
47
|
+
};
|
|
48
|
+
loading: (arg: ShorthandArg) => {
|
|
49
|
+
id: string;
|
|
50
|
+
dismiss: () => void;
|
|
51
|
+
};
|
|
52
|
+
dismiss: (id?: string) => void | undefined;
|
|
53
|
+
update: (id: string, options: Partial<ToastOptions>) => void | undefined;
|
|
54
|
+
};
|
|
55
|
+
export {};
|
|
56
|
+
//# sourceMappingURL=use-toast.d.ts.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { TooltipSide } from './types';
|
|
2
|
+
export declare const TOOLTIP_CONFIG: {
|
|
3
|
+
paddingHorizontal: number;
|
|
4
|
+
paddingVertical: number;
|
|
5
|
+
fontSize: number;
|
|
6
|
+
fontFamily: "medium";
|
|
7
|
+
lineHeight: number;
|
|
8
|
+
borderRadius: number;
|
|
9
|
+
maxWidth: number;
|
|
10
|
+
};
|
|
11
|
+
export declare const ARROW_SIZE: {
|
|
12
|
+
width: number;
|
|
13
|
+
height: number;
|
|
14
|
+
};
|
|
15
|
+
/** Arrow inset from tooltip edge for start/end alignments (Figma: 8dp). */
|
|
16
|
+
export declare const ARROW_EDGE_OFFSET = 8;
|
|
17
|
+
export declare const DEFAULT_SIDE: TooltipSide;
|
|
18
|
+
export declare const DEFAULT_SIDE_OFFSET = 6;
|
|
19
|
+
export declare const ANIMATION_DURATION = 150;
|
|
20
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { Placement } from '@floating-ui/react-native';
|
|
2
|
+
import type { TextStyle, ViewStyle } from 'react-native';
|
|
3
|
+
import type { TwigsTheme } from '../theme';
|
|
4
|
+
import type { TooltipSide, TooltipAlign } from './types';
|
|
5
|
+
export declare function toPlacement(side: TooltipSide, align: TooltipAlign): Placement;
|
|
6
|
+
/**
|
|
7
|
+
* Calculates the cross-axis shift needed for the tooltip's arrow to point at the trigger's center,
|
|
8
|
+
* used for left/right sides with start/end alignment.
|
|
9
|
+
*/
|
|
10
|
+
export declare function getCrossAxisOffset(side: TooltipSide, align: TooltipAlign, refSize: number): number;
|
|
11
|
+
export declare function getContentStyles(theme: TwigsTheme): ViewStyle;
|
|
12
|
+
export declare function getTextStyles(theme: TwigsTheme): TextStyle;
|
|
13
|
+
export declare function getArrowPath(side: TooltipSide): string;
|
|
14
|
+
/** Swaps width/height for left/right sides since the arrow rotates 90°. */
|
|
15
|
+
export declare function getArrowDimensions(side: TooltipSide): {
|
|
16
|
+
width: number;
|
|
17
|
+
height: number;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* For `center` alignment, uses floating-ui's computed coordinate.
|
|
21
|
+
* For `start`/`end`, pins the arrow at `ARROW_EDGE_OFFSET` from the
|
|
22
|
+
* corresponding tooltip edge (Figma spec: 8dp).
|
|
23
|
+
*/
|
|
24
|
+
export declare function getArrowPositionStyle(side: TooltipSide, align: TooltipAlign, arrowDims: {
|
|
25
|
+
width: number;
|
|
26
|
+
height: number;
|
|
27
|
+
}, arrowMiddleware: {
|
|
28
|
+
x?: number;
|
|
29
|
+
y?: number;
|
|
30
|
+
} | undefined): ViewStyle;
|
|
31
|
+
//# sourceMappingURL=helpers.d.ts.map
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export declare const styles: {
|
|
2
|
+
overlay: {
|
|
3
|
+
zIndex: number;
|
|
4
|
+
position: "absolute";
|
|
5
|
+
left: 0;
|
|
6
|
+
right: 0;
|
|
7
|
+
top: 0;
|
|
8
|
+
bottom: 0;
|
|
9
|
+
};
|
|
10
|
+
backdropPressable: {
|
|
11
|
+
position: "absolute";
|
|
12
|
+
left: 0;
|
|
13
|
+
right: 0;
|
|
14
|
+
top: 0;
|
|
15
|
+
bottom: 0;
|
|
16
|
+
};
|
|
17
|
+
contentWrapper: {
|
|
18
|
+
position: "absolute";
|
|
19
|
+
};
|
|
20
|
+
arrowContainer: {
|
|
21
|
+
position: "absolute";
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { View } from 'react-native';
|
|
3
|
+
import type { TooltipProps } from './types';
|
|
4
|
+
/** Floating content bubble anchored to a trigger element with arrow pointer. */
|
|
5
|
+
export declare const Tooltip: React.ForwardRefExoticComponent<TooltipProps & React.RefAttributes<View>>;
|
|
6
|
+
//# sourceMappingURL=tooltip.d.ts.map
|