@korsolutions/ui 0.0.29 → 0.0.30
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/babel.config.js +12 -0
- package/bob.config.js +13 -0
- package/dist/module/components/avatar/avatar.js +21 -0
- package/dist/module/components/avatar/avatar.js.map +1 -0
- package/dist/module/components/avatar/variants/default.js +33 -0
- package/dist/module/components/avatar/variants/default.js.map +1 -0
- package/dist/module/components/avatar/variants/index.js +7 -0
- package/dist/module/components/avatar/variants/index.js.map +1 -0
- package/dist/module/components/badge/badge.js +23 -0
- package/dist/module/components/badge/badge.js.map +1 -0
- package/dist/module/components/badge/variants/default.js +30 -0
- package/dist/module/components/badge/variants/default.js.map +1 -0
- package/dist/module/components/badge/variants/index.js +9 -0
- package/dist/module/components/badge/variants/index.js.map +1 -0
- package/dist/module/components/badge/variants/secondary.js +30 -0
- package/dist/module/components/badge/variants/secondary.js.map +1 -0
- package/dist/module/components/button/button.js +23 -0
- package/dist/module/components/button/button.js.map +1 -0
- package/dist/module/components/button/variants/default.js +62 -0
- package/dist/module/components/button/variants/default.js.map +1 -0
- package/dist/module/components/button/variants/index.js +9 -0
- package/dist/module/components/button/variants/index.js.map +1 -0
- package/dist/module/components/button/variants/secondary.js +62 -0
- package/dist/module/components/button/variants/secondary.js.map +1 -0
- package/dist/module/components/calendar/calendar.js +29 -0
- package/dist/module/components/calendar/calendar.js.map +1 -0
- package/dist/module/components/calendar/index.js +4 -0
- package/dist/module/components/calendar/index.js.map +1 -0
- package/dist/module/components/calendar/variants/default.js +131 -0
- package/dist/module/components/calendar/variants/default.js.map +1 -0
- package/dist/module/components/calendar/variants/index.js +7 -0
- package/dist/module/components/calendar/variants/index.js.map +1 -0
- package/dist/module/components/card/card.js +21 -0
- package/dist/module/components/card/card.js.map +1 -0
- package/dist/module/components/card/variants/default.js +42 -0
- package/dist/module/components/card/variants/default.js.map +1 -0
- package/dist/module/components/card/variants/index.js +7 -0
- package/dist/module/components/card/variants/index.js.map +1 -0
- package/dist/module/components/dropdown-menu/dropdown-menu.js +34 -0
- package/dist/module/components/dropdown-menu/dropdown-menu.js.map +1 -0
- package/dist/module/components/dropdown-menu/variants/default.js +47 -0
- package/dist/module/components/dropdown-menu/variants/default.js.map +1 -0
- package/dist/module/components/dropdown-menu/variants/index.js +7 -0
- package/dist/module/components/dropdown-menu/variants/index.js.map +1 -0
- package/dist/module/components/empty/empty.js +21 -0
- package/dist/module/components/empty/empty.js.map +1 -0
- package/dist/module/components/empty/variants/default.js +38 -0
- package/dist/module/components/empty/variants/default.js.map +1 -0
- package/dist/module/components/empty/variants/index.js +7 -0
- package/dist/module/components/empty/variants/index.js.map +1 -0
- package/dist/module/components/field/field.js +22 -0
- package/dist/module/components/field/field.js.map +1 -0
- package/dist/module/components/field/variants/default.js +32 -0
- package/dist/module/components/field/variants/default.js.map +1 -0
- package/dist/module/components/field/variants/index.js +7 -0
- package/dist/module/components/field/variants/index.js.map +1 -0
- package/dist/module/components/index.js +18 -0
- package/dist/module/components/index.js.map +1 -0
- package/dist/module/components/input/index.js +5 -0
- package/dist/module/components/input/index.js.map +1 -0
- package/dist/module/components/input/input.js +15 -0
- package/dist/module/components/input/input.js.map +1 -0
- package/dist/module/components/input/numeric-input.js +57 -0
- package/dist/module/components/input/numeric-input.js.map +1 -0
- package/dist/module/components/input/variants/default.js +41 -0
- package/dist/module/components/input/variants/default.js.map +1 -0
- package/dist/module/components/input/variants/index.js +7 -0
- package/dist/module/components/input/variants/index.js.map +1 -0
- package/dist/module/components/link/link.js +25 -0
- package/dist/module/components/link/link.js.map +1 -0
- package/dist/module/components/link/variants/default.js +18 -0
- package/dist/module/components/link/variants/default.js.map +1 -0
- package/dist/module/components/link/variants/index.js +7 -0
- package/dist/module/components/link/variants/index.js.map +1 -0
- package/dist/module/components/popover/popover.js +39 -0
- package/dist/module/components/popover/popover.js.map +1 -0
- package/dist/module/components/popover/variants/default.js +30 -0
- package/dist/module/components/popover/variants/default.js.map +1 -0
- package/dist/module/components/popover/variants/index.js +9 -0
- package/dist/module/components/popover/variants/index.js.map +1 -0
- package/dist/module/components/popover/variants/unstyled.js +12 -0
- package/dist/module/components/popover/variants/unstyled.js.map +1 -0
- package/dist/module/components/select/select.js +25 -0
- package/dist/module/components/select/select.js.map +1 -0
- package/dist/module/components/select/variants/default.js +85 -0
- package/dist/module/components/select/variants/default.js.map +1 -0
- package/dist/module/components/select/variants/index.js +7 -0
- package/dist/module/components/select/variants/index.js.map +1 -0
- package/dist/module/components/textarea/textarea.js +15 -0
- package/dist/module/components/textarea/textarea.js.map +1 -0
- package/dist/module/components/textarea/variants/default.js +42 -0
- package/dist/module/components/textarea/variants/default.js.map +1 -0
- package/dist/module/components/textarea/variants/index.js +7 -0
- package/dist/module/components/textarea/variants/index.js.map +1 -0
- package/dist/module/components/toast/index.js +9 -0
- package/dist/module/components/toast/index.js.map +1 -0
- package/dist/module/components/toast/toast-manager.js +78 -0
- package/dist/module/components/toast/toast-manager.js.map +1 -0
- package/dist/module/components/toast/toast.js +19 -0
- package/dist/module/components/toast/toast.js.map +1 -0
- package/dist/module/components/toast/variants/danger.js +35 -0
- package/dist/module/components/toast/variants/danger.js.map +1 -0
- package/dist/module/components/toast/variants/default.js +34 -0
- package/dist/module/components/toast/variants/default.js.map +1 -0
- package/dist/module/components/toast/variants/index.js +11 -0
- package/dist/module/components/toast/variants/index.js.map +1 -0
- package/dist/module/components/toast/variants/success.js +35 -0
- package/dist/module/components/toast/variants/success.js.map +1 -0
- package/dist/module/components/typography/typography.js +15 -0
- package/dist/module/components/typography/typography.js.map +1 -0
- package/dist/module/components/typography/variants/body-lg.js +17 -0
- package/dist/module/components/typography/variants/body-lg.js.map +1 -0
- package/dist/module/components/typography/variants/body-md.js +17 -0
- package/dist/module/components/typography/variants/body-md.js.map +1 -0
- package/dist/module/components/typography/variants/body-sm.js +17 -0
- package/dist/module/components/typography/variants/body-sm.js.map +1 -0
- package/dist/module/components/typography/variants/heading-lg.js +18 -0
- package/dist/module/components/typography/variants/heading-lg.js.map +1 -0
- package/dist/module/components/typography/variants/heading-md.js +18 -0
- package/dist/module/components/typography/variants/heading-md.js.map +1 -0
- package/dist/module/components/typography/variants/heading-sm.js +18 -0
- package/dist/module/components/typography/variants/heading-sm.js.map +1 -0
- package/dist/module/components/typography/variants/index.js +17 -0
- package/dist/module/components/typography/variants/index.js.map +1 -0
- package/dist/module/hooks/index.js +7 -0
- package/dist/module/hooks/index.js.map +1 -0
- package/dist/module/hooks/use-currency-mask.js +101 -0
- package/dist/module/hooks/use-currency-mask.js.map +1 -0
- package/dist/module/hooks/use-numeric-mask.js +154 -0
- package/dist/module/hooks/use-numeric-mask.js.map +1 -0
- package/dist/module/hooks/use-relative-position.js +155 -0
- package/dist/module/hooks/use-relative-position.js.map +1 -0
- package/dist/module/hooks/use-screen-size.js +30 -0
- package/dist/module/hooks/use-screen-size.js.map +1 -0
- package/dist/module/index.js +20 -0
- package/dist/module/index.js.map +1 -0
- package/dist/module/package.json +1 -0
- package/dist/module/primitives/avatar/avatar-fallback.js +16 -0
- package/dist/module/primitives/avatar/avatar-fallback.js.map +1 -0
- package/dist/module/primitives/avatar/avatar-image.js +16 -0
- package/dist/module/primitives/avatar/avatar-image.js.map +1 -0
- package/dist/module/primitives/avatar/avatar-root.js +20 -0
- package/dist/module/primitives/avatar/avatar-root.js.map +1 -0
- package/dist/module/primitives/avatar/context.js +12 -0
- package/dist/module/primitives/avatar/context.js.map +1 -0
- package/dist/module/primitives/avatar/index.js +11 -0
- package/dist/module/primitives/avatar/index.js.map +1 -0
- package/dist/module/primitives/avatar/types.js +4 -0
- package/dist/module/primitives/avatar/types.js.map +1 -0
- package/dist/module/primitives/badge/badge-label.js +17 -0
- package/dist/module/primitives/badge/badge-label.js.map +1 -0
- package/dist/module/primitives/badge/badge-root.js +22 -0
- package/dist/module/primitives/badge/badge-root.js.map +1 -0
- package/dist/module/primitives/badge/context.js +12 -0
- package/dist/module/primitives/badge/context.js.map +1 -0
- package/dist/module/primitives/badge/index.js +9 -0
- package/dist/module/primitives/badge/index.js.map +1 -0
- package/dist/module/primitives/badge/types.js +4 -0
- package/dist/module/primitives/badge/types.js.map +1 -0
- package/dist/module/primitives/button/button-context.js +12 -0
- package/dist/module/primitives/button/button-context.js.map +1 -0
- package/dist/module/primitives/button/button-label.js +17 -0
- package/dist/module/primitives/button/button-label.js.map +1 -0
- package/dist/module/primitives/button/button-root.js +38 -0
- package/dist/module/primitives/button/button-root.js.map +1 -0
- package/dist/module/primitives/button/button-spinner.js +15 -0
- package/dist/module/primitives/button/button-spinner.js.map +1 -0
- package/dist/module/primitives/button/index.js +12 -0
- package/dist/module/primitives/button/index.js.map +1 -0
- package/dist/module/primitives/button/types.js +4 -0
- package/dist/module/primitives/button/types.js.map +1 -0
- package/dist/module/primitives/calendar/calendar-day.js +45 -0
- package/dist/module/primitives/calendar/calendar-day.js.map +1 -0
- package/dist/module/primitives/calendar/calendar-header.js +23 -0
- package/dist/module/primitives/calendar/calendar-header.js.map +1 -0
- package/dist/module/primitives/calendar/calendar-nav-button.js +61 -0
- package/dist/module/primitives/calendar/calendar-nav-button.js.map +1 -0
- package/dist/module/primitives/calendar/calendar-root.js +38 -0
- package/dist/module/primitives/calendar/calendar-root.js.map +1 -0
- package/dist/module/primitives/calendar/calendar-title.js +26 -0
- package/dist/module/primitives/calendar/calendar-title.js.map +1 -0
- package/dist/module/primitives/calendar/calendar-week-labels.js +36 -0
- package/dist/module/primitives/calendar/calendar-week-labels.js.map +1 -0
- package/dist/module/primitives/calendar/calendar-weeks.js +48 -0
- package/dist/module/primitives/calendar/calendar-weeks.js.map +1 -0
- package/dist/module/primitives/calendar/context.js +12 -0
- package/dist/module/primitives/calendar/context.js.map +1 -0
- package/dist/module/primitives/calendar/index.js +19 -0
- package/dist/module/primitives/calendar/index.js.map +1 -0
- package/dist/module/primitives/calendar/types.js +4 -0
- package/dist/module/primitives/calendar/types.js.map +1 -0
- package/dist/module/primitives/card/card-body.js +17 -0
- package/dist/module/primitives/card/card-body.js.map +1 -0
- package/dist/module/primitives/card/card-footer.js +17 -0
- package/dist/module/primitives/card/card-footer.js.map +1 -0
- package/dist/module/primitives/card/card-header.js +17 -0
- package/dist/module/primitives/card/card-header.js.map +1 -0
- package/dist/module/primitives/card/card-root.js +22 -0
- package/dist/module/primitives/card/card-root.js.map +1 -0
- package/dist/module/primitives/card/card-title.js +17 -0
- package/dist/module/primitives/card/card-title.js.map +1 -0
- package/dist/module/primitives/card/context.js +12 -0
- package/dist/module/primitives/card/context.js.map +1 -0
- package/dist/module/primitives/card/index.js +15 -0
- package/dist/module/primitives/card/index.js.map +1 -0
- package/dist/module/primitives/card/types.js +4 -0
- package/dist/module/primitives/card/types.js.map +1 -0
- package/dist/module/primitives/dropdown-menu/context.js +12 -0
- package/dist/module/primitives/dropdown-menu/context.js.map +1 -0
- package/dist/module/primitives/dropdown-menu/dropdown-menu-button.js +32 -0
- package/dist/module/primitives/dropdown-menu/dropdown-menu-button.js.map +1 -0
- package/dist/module/primitives/dropdown-menu/dropdown-menu-content.js +29 -0
- package/dist/module/primitives/dropdown-menu/dropdown-menu-content.js.map +1 -0
- package/dist/module/primitives/dropdown-menu/dropdown-menu-divider.js +16 -0
- package/dist/module/primitives/dropdown-menu/dropdown-menu-divider.js.map +1 -0
- package/dist/module/primitives/dropdown-menu/dropdown-menu-overlay.js +19 -0
- package/dist/module/primitives/dropdown-menu/dropdown-menu-overlay.js.map +1 -0
- package/dist/module/primitives/dropdown-menu/dropdown-menu-portal.js +20 -0
- package/dist/module/primitives/dropdown-menu/dropdown-menu-portal.js.map +1 -0
- package/dist/module/primitives/dropdown-menu/dropdown-menu-root.js +24 -0
- package/dist/module/primitives/dropdown-menu/dropdown-menu-root.js.map +1 -0
- package/dist/module/primitives/dropdown-menu/dropdown-menu-trigger.js +36 -0
- package/dist/module/primitives/dropdown-menu/dropdown-menu-trigger.js.map +1 -0
- package/dist/module/primitives/dropdown-menu/index.js +19 -0
- package/dist/module/primitives/dropdown-menu/index.js.map +1 -0
- package/dist/module/primitives/dropdown-menu/types.js +4 -0
- package/dist/module/primitives/dropdown-menu/types.js.map +1 -0
- package/dist/module/primitives/empty/context.js +12 -0
- package/dist/module/primitives/empty/context.js.map +1 -0
- package/dist/module/primitives/empty/empty-description.js +16 -0
- package/dist/module/primitives/empty/empty-description.js.map +1 -0
- package/dist/module/primitives/empty/empty-media.js +16 -0
- package/dist/module/primitives/empty/empty-media.js.map +1 -0
- package/dist/module/primitives/empty/empty-root.js +20 -0
- package/dist/module/primitives/empty/empty-root.js.map +1 -0
- package/dist/module/primitives/empty/empty-title.js +16 -0
- package/dist/module/primitives/empty/empty-title.js.map +1 -0
- package/dist/module/primitives/empty/index.js +13 -0
- package/dist/module/primitives/empty/index.js.map +1 -0
- package/dist/module/primitives/empty/types.js +4 -0
- package/dist/module/primitives/empty/types.js.map +1 -0
- package/dist/module/primitives/field/context.js +15 -0
- package/dist/module/primitives/field/context.js.map +1 -0
- package/dist/module/primitives/field/field-description.js +15 -0
- package/dist/module/primitives/field/field-description.js.map +1 -0
- package/dist/module/primitives/field/field-error.js +15 -0
- package/dist/module/primitives/field/field-error.js.map +1 -0
- package/dist/module/primitives/field/field-label.js +16 -0
- package/dist/module/primitives/field/field-label.js.map +1 -0
- package/dist/module/primitives/field/field-root.js +22 -0
- package/dist/module/primitives/field/field-root.js.map +1 -0
- package/dist/module/primitives/field/index.js +13 -0
- package/dist/module/primitives/field/index.js.map +1 -0
- package/dist/module/primitives/field/types.js +4 -0
- package/dist/module/primitives/field/types.js.map +1 -0
- package/dist/module/primitives/index.js +17 -0
- package/dist/module/primitives/index.js.map +1 -0
- package/dist/module/primitives/input/index.js +4 -0
- package/dist/module/primitives/input/index.js.map +1 -0
- package/dist/module/primitives/input/input.js +46 -0
- package/dist/module/primitives/input/input.js.map +1 -0
- package/dist/module/primitives/input/types.js +4 -0
- package/dist/module/primitives/input/types.js.map +1 -0
- package/dist/module/primitives/popover/context.js +12 -0
- package/dist/module/primitives/popover/context.js.map +1 -0
- package/dist/module/primitives/popover/index.js +18 -0
- package/dist/module/primitives/popover/index.js.map +1 -0
- package/dist/module/primitives/popover/popover-close.js +19 -0
- package/dist/module/primitives/popover/popover-close.js.map +1 -0
- package/dist/module/primitives/popover/popover-content.js +30 -0
- package/dist/module/primitives/popover/popover-content.js.map +1 -0
- package/dist/module/primitives/popover/popover-overlay.js +27 -0
- package/dist/module/primitives/popover/popover-overlay.js.map +1 -0
- package/dist/module/primitives/popover/popover-portal.js +20 -0
- package/dist/module/primitives/popover/popover-portal.js.map +1 -0
- package/dist/module/primitives/popover/popover-root.js +24 -0
- package/dist/module/primitives/popover/popover-root.js.map +1 -0
- package/dist/module/primitives/popover/popover-trigger.js +36 -0
- package/dist/module/primitives/popover/popover-trigger.js.map +1 -0
- package/dist/module/primitives/popover/types.js +4 -0
- package/dist/module/primitives/popover/types.js.map +1 -0
- package/dist/module/primitives/portal/index.js +5 -0
- package/dist/module/primitives/portal/index.js.map +1 -0
- package/dist/module/primitives/portal/portal.constants.js +4 -0
- package/dist/module/primitives/portal/portal.constants.js.map +1 -0
- package/dist/module/primitives/portal/portal.js +112 -0
- package/dist/module/primitives/portal/portal.js.map +1 -0
- package/dist/module/primitives/select/context.js +12 -0
- package/dist/module/primitives/select/context.js.map +1 -0
- package/dist/module/primitives/select/index.js +19 -0
- package/dist/module/primitives/select/index.js.map +1 -0
- package/dist/module/primitives/select/select-content.js +22 -0
- package/dist/module/primitives/select/select-content.js.map +1 -0
- package/dist/module/primitives/select/select-option.js +50 -0
- package/dist/module/primitives/select/select-option.js.map +1 -0
- package/dist/module/primitives/select/select-overlay.js +20 -0
- package/dist/module/primitives/select/select-overlay.js.map +1 -0
- package/dist/module/primitives/select/select-portal.js +25 -0
- package/dist/module/primitives/select/select-portal.js.map +1 -0
- package/dist/module/primitives/select/select-root.js +42 -0
- package/dist/module/primitives/select/select-root.js.map +1 -0
- package/dist/module/primitives/select/select-trigger.js +26 -0
- package/dist/module/primitives/select/select-trigger.js.map +1 -0
- package/dist/module/primitives/select/select-value.js +19 -0
- package/dist/module/primitives/select/select-value.js.map +1 -0
- package/dist/module/primitives/select/types.js +4 -0
- package/dist/module/primitives/select/types.js.map +1 -0
- package/dist/module/primitives/textarea/index.js +4 -0
- package/dist/module/primitives/textarea/index.js.map +1 -0
- package/dist/module/primitives/textarea/textarea.js +42 -0
- package/dist/module/primitives/textarea/textarea.js.map +1 -0
- package/dist/module/primitives/textarea/types.js +4 -0
- package/dist/module/primitives/textarea/types.js.map +1 -0
- package/dist/module/primitives/toast/context.js +12 -0
- package/dist/module/primitives/toast/context.js.map +1 -0
- package/dist/module/primitives/toast/index.js +11 -0
- package/dist/module/primitives/toast/index.js.map +1 -0
- package/dist/module/primitives/toast/toast-description.js +16 -0
- package/dist/module/primitives/toast/toast-description.js.map +1 -0
- package/dist/module/primitives/toast/toast-root.js +20 -0
- package/dist/module/primitives/toast/toast-root.js.map +1 -0
- package/dist/module/primitives/toast/toast-title.js +16 -0
- package/dist/module/primitives/toast/toast-title.js.map +1 -0
- package/dist/module/primitives/toast/types.js +4 -0
- package/dist/module/primitives/toast/types.js.map +1 -0
- package/dist/module/themes/adapters/index.js +4 -0
- package/dist/module/themes/adapters/index.js.map +1 -0
- package/dist/module/themes/adapters/react-navigation.js +52 -0
- package/dist/module/themes/adapters/react-navigation.js.map +1 -0
- package/dist/module/themes/default/colors.js +35 -0
- package/dist/module/themes/default/colors.js.map +1 -0
- package/dist/module/themes/default/index.js +14 -0
- package/dist/module/themes/default/index.js.map +1 -0
- package/dist/module/themes/index.js +6 -0
- package/dist/module/themes/index.js.map +1 -0
- package/dist/module/themes/provider.js +41 -0
- package/dist/module/themes/provider.js.map +1 -0
- package/dist/module/themes/themes.js +7 -0
- package/dist/module/themes/themes.js.map +1 -0
- package/dist/module/themes/types.js +2 -0
- package/dist/module/themes/types.js.map +1 -0
- package/dist/module/types/element.types.js +4 -0
- package/dist/module/types/element.types.js.map +1 -0
- package/dist/module/utils/calculate-styles.js +17 -0
- package/dist/module/utils/calculate-styles.js.map +1 -0
- package/dist/module/utils/date-utils.js +95 -0
- package/dist/module/utils/date-utils.js.map +1 -0
- package/dist/module/utils/hsla-utils.js +33 -0
- package/dist/module/utils/hsla-utils.js.map +1 -0
- package/dist/module/utils/normalize-layout.js +16 -0
- package/dist/module/utils/normalize-layout.js.map +1 -0
- package/dist/module/utils/use-themed-styles.js +14 -0
- package/dist/module/utils/use-themed-styles.js.map +1 -0
- package/dist/typescript/babel.config.d.ts +10 -0
- package/dist/typescript/babel.config.d.ts.map +1 -0
- package/dist/typescript/bob.config.d.ts +6 -0
- package/dist/typescript/bob.config.d.ts.map +1 -0
- package/dist/typescript/package.json +1 -0
- package/dist/typescript/src/components/avatar/avatar.d.ts +10 -0
- package/dist/typescript/src/components/avatar/avatar.d.ts.map +1 -0
- package/dist/typescript/src/components/avatar/variants/default.d.ts +3 -0
- package/dist/typescript/src/components/avatar/variants/default.d.ts.map +1 -0
- package/dist/typescript/src/components/avatar/variants/index.d.ts +5 -0
- package/dist/typescript/src/components/avatar/variants/index.d.ts.map +1 -0
- package/dist/typescript/src/components/badge/badge.d.ts +10 -0
- package/dist/typescript/src/components/badge/badge.d.ts.map +1 -0
- package/dist/typescript/src/components/badge/variants/default.d.ts +3 -0
- package/dist/typescript/src/components/badge/variants/default.d.ts.map +1 -0
- package/dist/typescript/src/components/badge/variants/index.d.ts +5 -0
- package/dist/typescript/src/components/badge/variants/index.d.ts.map +1 -0
- package/dist/typescript/src/components/badge/variants/secondary.d.ts +3 -0
- package/dist/typescript/src/components/badge/variants/secondary.d.ts.map +1 -0
- package/dist/typescript/src/components/button/button.d.ts +14 -0
- package/dist/typescript/src/components/button/button.d.ts.map +1 -0
- package/dist/typescript/src/components/button/variants/default.d.ts +3 -0
- package/dist/typescript/src/components/button/variants/default.d.ts.map +1 -0
- package/dist/typescript/src/components/button/variants/index.d.ts +5 -0
- package/dist/typescript/src/components/button/variants/index.d.ts.map +1 -0
- package/dist/typescript/src/components/button/variants/secondary.d.ts +3 -0
- package/dist/typescript/src/components/button/variants/secondary.d.ts.map +1 -0
- package/dist/typescript/src/components/calendar/calendar.d.ts +14 -0
- package/dist/typescript/src/components/calendar/calendar.d.ts.map +1 -0
- package/dist/typescript/src/components/calendar/index.d.ts +2 -0
- package/dist/typescript/src/components/calendar/index.d.ts.map +1 -0
- package/dist/typescript/src/components/calendar/variants/default.d.ts +3 -0
- package/dist/typescript/src/components/calendar/variants/default.d.ts.map +1 -0
- package/dist/typescript/src/components/calendar/variants/index.d.ts +4 -0
- package/dist/typescript/src/components/calendar/variants/index.d.ts.map +1 -0
- package/dist/typescript/src/components/card/card.d.ts +10 -0
- package/dist/typescript/src/components/card/card.d.ts.map +1 -0
- package/dist/typescript/src/components/card/variants/default.d.ts +3 -0
- package/dist/typescript/src/components/card/variants/default.d.ts.map +1 -0
- package/dist/typescript/src/components/card/variants/index.d.ts +5 -0
- package/dist/typescript/src/components/card/variants/index.d.ts.map +1 -0
- package/dist/typescript/src/components/dropdown-menu/dropdown-menu.d.ts +18 -0
- package/dist/typescript/src/components/dropdown-menu/dropdown-menu.d.ts.map +1 -0
- package/dist/typescript/src/components/dropdown-menu/variants/default.d.ts +3 -0
- package/dist/typescript/src/components/dropdown-menu/variants/default.d.ts.map +1 -0
- package/dist/typescript/src/components/dropdown-menu/variants/index.d.ts +4 -0
- package/dist/typescript/src/components/dropdown-menu/variants/index.d.ts.map +1 -0
- package/dist/typescript/src/components/empty/empty.d.ts +11 -0
- package/dist/typescript/src/components/empty/empty.d.ts.map +1 -0
- package/dist/typescript/src/components/empty/variants/default.d.ts +3 -0
- package/dist/typescript/src/components/empty/variants/default.d.ts.map +1 -0
- package/dist/typescript/src/components/empty/variants/index.d.ts +5 -0
- package/dist/typescript/src/components/empty/variants/index.d.ts.map +1 -0
- package/dist/typescript/src/components/field/field.d.ts +12 -0
- package/dist/typescript/src/components/field/field.d.ts.map +1 -0
- package/dist/typescript/src/components/field/variants/default.d.ts +3 -0
- package/dist/typescript/src/components/field/variants/default.d.ts.map +1 -0
- package/dist/typescript/src/components/field/variants/index.d.ts +4 -0
- package/dist/typescript/src/components/field/variants/index.d.ts.map +1 -0
- package/dist/typescript/src/components/index.d.ts +16 -0
- package/dist/typescript/src/components/index.d.ts.map +1 -0
- package/dist/typescript/src/components/input/index.d.ts +3 -0
- package/dist/typescript/src/components/input/index.d.ts.map +1 -0
- package/dist/typescript/src/components/input/input.d.ts +9 -0
- package/dist/typescript/src/components/input/input.d.ts.map +1 -0
- package/dist/typescript/src/components/input/numeric-input.d.ts +17 -0
- package/dist/typescript/src/components/input/numeric-input.d.ts.map +1 -0
- package/dist/typescript/src/components/input/variants/default.d.ts +3 -0
- package/dist/typescript/src/components/input/variants/default.d.ts.map +1 -0
- package/dist/typescript/src/components/input/variants/index.d.ts +5 -0
- package/dist/typescript/src/components/input/variants/index.d.ts.map +1 -0
- package/dist/typescript/src/components/link/link.d.ts +9 -0
- package/dist/typescript/src/components/link/link.d.ts.map +1 -0
- package/dist/typescript/src/components/link/variants/default.d.ts +3 -0
- package/dist/typescript/src/components/link/variants/default.d.ts.map +1 -0
- package/dist/typescript/src/components/link/variants/index.d.ts +5 -0
- package/dist/typescript/src/components/link/variants/index.d.ts.map +1 -0
- package/dist/typescript/src/components/popover/popover.d.ts +16 -0
- package/dist/typescript/src/components/popover/popover.d.ts.map +1 -0
- package/dist/typescript/src/components/popover/variants/default.d.ts +3 -0
- package/dist/typescript/src/components/popover/variants/default.d.ts.map +1 -0
- package/dist/typescript/src/components/popover/variants/index.d.ts +5 -0
- package/dist/typescript/src/components/popover/variants/index.d.ts.map +1 -0
- package/dist/typescript/src/components/popover/variants/unstyled.d.ts +3 -0
- package/dist/typescript/src/components/popover/variants/unstyled.d.ts.map +1 -0
- package/dist/typescript/src/components/select/select.d.ts +13 -0
- package/dist/typescript/src/components/select/select.d.ts.map +1 -0
- package/dist/typescript/src/components/select/variants/default.d.ts +3 -0
- package/dist/typescript/src/components/select/variants/default.d.ts.map +1 -0
- package/dist/typescript/src/components/select/variants/index.d.ts +5 -0
- package/dist/typescript/src/components/select/variants/index.d.ts.map +1 -0
- package/dist/typescript/src/components/textarea/textarea.d.ts +9 -0
- package/dist/typescript/src/components/textarea/textarea.d.ts.map +1 -0
- package/dist/typescript/src/components/textarea/variants/default.d.ts +3 -0
- package/dist/typescript/src/components/textarea/variants/default.d.ts.map +1 -0
- package/dist/typescript/src/components/textarea/variants/index.d.ts +5 -0
- package/dist/typescript/src/components/textarea/variants/index.d.ts.map +1 -0
- package/dist/typescript/src/components/toast/index.d.ts +6 -0
- package/dist/typescript/src/components/toast/index.d.ts.map +1 -0
- package/dist/typescript/src/components/toast/toast-manager.d.ts +19 -0
- package/dist/typescript/src/components/toast/toast-manager.d.ts.map +1 -0
- package/dist/typescript/src/components/toast/toast.d.ts +10 -0
- package/dist/typescript/src/components/toast/toast.d.ts.map +1 -0
- package/dist/typescript/src/components/toast/variants/danger.d.ts +3 -0
- package/dist/typescript/src/components/toast/variants/danger.d.ts.map +1 -0
- package/dist/typescript/src/components/toast/variants/default.d.ts +3 -0
- package/dist/typescript/src/components/toast/variants/default.d.ts.map +1 -0
- package/dist/typescript/src/components/toast/variants/index.d.ts +6 -0
- package/dist/typescript/src/components/toast/variants/index.d.ts.map +1 -0
- package/dist/typescript/src/components/toast/variants/success.d.ts +3 -0
- package/dist/typescript/src/components/toast/variants/success.d.ts.map +1 -0
- package/dist/typescript/src/components/typography/typography.d.ts +8 -0
- package/dist/typescript/src/components/typography/typography.d.ts.map +1 -0
- package/dist/typescript/src/components/typography/variants/body-lg.d.ts +3 -0
- package/dist/typescript/src/components/typography/variants/body-lg.d.ts.map +1 -0
- package/dist/typescript/src/components/typography/variants/body-md.d.ts +3 -0
- package/dist/typescript/src/components/typography/variants/body-md.d.ts.map +1 -0
- package/dist/typescript/src/components/typography/variants/body-sm.d.ts +3 -0
- package/dist/typescript/src/components/typography/variants/body-sm.d.ts.map +1 -0
- package/dist/typescript/src/components/typography/variants/heading-lg.d.ts +3 -0
- package/dist/typescript/src/components/typography/variants/heading-lg.d.ts.map +1 -0
- package/dist/typescript/src/components/typography/variants/heading-md.d.ts +3 -0
- package/dist/typescript/src/components/typography/variants/heading-md.d.ts.map +1 -0
- package/dist/typescript/src/components/typography/variants/heading-sm.d.ts +3 -0
- package/dist/typescript/src/components/typography/variants/heading-sm.d.ts.map +1 -0
- package/dist/typescript/src/components/typography/variants/index.d.ts +15 -0
- package/dist/typescript/src/components/typography/variants/index.d.ts.map +1 -0
- package/dist/typescript/src/hooks/index.d.ts +5 -0
- package/dist/typescript/src/hooks/index.d.ts.map +1 -0
- package/dist/typescript/src/hooks/use-currency-mask.d.ts +19 -0
- package/dist/typescript/src/hooks/use-currency-mask.d.ts.map +1 -0
- package/dist/typescript/src/hooks/use-numeric-mask.d.ts +22 -0
- package/dist/typescript/src/hooks/use-numeric-mask.d.ts.map +1 -0
- package/dist/typescript/src/hooks/use-relative-position.d.ts +50 -0
- package/dist/typescript/src/hooks/use-relative-position.d.ts.map +1 -0
- package/dist/typescript/src/hooks/use-screen-size.d.ts +22 -0
- package/dist/typescript/src/hooks/use-screen-size.d.ts.map +1 -0
- package/dist/typescript/src/index.d.ts +10 -0
- package/dist/typescript/src/index.d.ts.map +1 -0
- package/dist/typescript/src/primitives/avatar/avatar-fallback.d.ts +9 -0
- package/dist/typescript/src/primitives/avatar/avatar-fallback.d.ts.map +1 -0
- package/dist/typescript/src/primitives/avatar/avatar-image.d.ts +10 -0
- package/dist/typescript/src/primitives/avatar/avatar-image.d.ts.map +1 -0
- package/dist/typescript/src/primitives/avatar/avatar-root.d.ts +11 -0
- package/dist/typescript/src/primitives/avatar/avatar-root.d.ts.map +1 -0
- package/dist/typescript/src/primitives/avatar/context.d.ts +7 -0
- package/dist/typescript/src/primitives/avatar/context.d.ts.map +1 -0
- package/dist/typescript/src/primitives/avatar/index.d.ts +13 -0
- package/dist/typescript/src/primitives/avatar/index.d.ts.map +1 -0
- package/dist/typescript/src/primitives/avatar/types.d.ts +9 -0
- package/dist/typescript/src/primitives/avatar/types.d.ts.map +1 -0
- package/dist/typescript/src/primitives/badge/badge-label.d.ts +9 -0
- package/dist/typescript/src/primitives/badge/badge-label.d.ts.map +1 -0
- package/dist/typescript/src/primitives/badge/badge-root.d.ts +11 -0
- package/dist/typescript/src/primitives/badge/badge-root.d.ts.map +1 -0
- package/dist/typescript/src/primitives/badge/context.d.ts +8 -0
- package/dist/typescript/src/primitives/badge/context.d.ts.map +1 -0
- package/dist/typescript/src/primitives/badge/index.d.ts +10 -0
- package/dist/typescript/src/primitives/badge/index.d.ts.map +1 -0
- package/dist/typescript/src/primitives/badge/types.d.ts +8 -0
- package/dist/typescript/src/primitives/badge/types.d.ts.map +1 -0
- package/dist/typescript/src/primitives/button/button-context.d.ts +9 -0
- package/dist/typescript/src/primitives/button/button-context.d.ts.map +1 -0
- package/dist/typescript/src/primitives/button/button-label.d.ts +9 -0
- package/dist/typescript/src/primitives/button/button-label.d.ts.map +1 -0
- package/dist/typescript/src/primitives/button/button-root.d.ts +13 -0
- package/dist/typescript/src/primitives/button/button-root.d.ts.map +1 -0
- package/dist/typescript/src/primitives/button/button-spinner.d.ts +8 -0
- package/dist/typescript/src/primitives/button/button-spinner.d.ts.map +1 -0
- package/dist/typescript/src/primitives/button/index.d.ts +12 -0
- package/dist/typescript/src/primitives/button/index.d.ts.map +1 -0
- package/dist/typescript/src/primitives/button/types.d.ts +9 -0
- package/dist/typescript/src/primitives/button/types.d.ts.map +1 -0
- package/dist/typescript/src/primitives/calendar/calendar-day.d.ts +10 -0
- package/dist/typescript/src/primitives/calendar/calendar-day.d.ts.map +1 -0
- package/dist/typescript/src/primitives/calendar/calendar-header.d.ts +8 -0
- package/dist/typescript/src/primitives/calendar/calendar-header.d.ts.map +1 -0
- package/dist/typescript/src/primitives/calendar/calendar-nav-button.d.ts +10 -0
- package/dist/typescript/src/primitives/calendar/calendar-nav-button.d.ts.map +1 -0
- package/dist/typescript/src/primitives/calendar/calendar-root.d.ts +15 -0
- package/dist/typescript/src/primitives/calendar/calendar-root.d.ts.map +1 -0
- package/dist/typescript/src/primitives/calendar/calendar-title.d.ts +9 -0
- package/dist/typescript/src/primitives/calendar/calendar-title.d.ts.map +1 -0
- package/dist/typescript/src/primitives/calendar/calendar-week-labels.d.ts +12 -0
- package/dist/typescript/src/primitives/calendar/calendar-week-labels.d.ts.map +1 -0
- package/dist/typescript/src/primitives/calendar/calendar-weeks.d.ts +11 -0
- package/dist/typescript/src/primitives/calendar/calendar-weeks.d.ts.map +1 -0
- package/dist/typescript/src/primitives/calendar/context.d.ts +14 -0
- package/dist/typescript/src/primitives/calendar/context.d.ts.map +1 -0
- package/dist/typescript/src/primitives/calendar/index.d.ts +25 -0
- package/dist/typescript/src/primitives/calendar/index.d.ts.map +1 -0
- package/dist/typescript/src/primitives/calendar/types.d.ts +37 -0
- package/dist/typescript/src/primitives/calendar/types.d.ts.map +1 -0
- package/dist/typescript/src/primitives/card/card-body.d.ts +9 -0
- package/dist/typescript/src/primitives/card/card-body.d.ts.map +1 -0
- package/dist/typescript/src/primitives/card/card-footer.d.ts +9 -0
- package/dist/typescript/src/primitives/card/card-footer.d.ts.map +1 -0
- package/dist/typescript/src/primitives/card/card-header.d.ts +9 -0
- package/dist/typescript/src/primitives/card/card-header.d.ts.map +1 -0
- package/dist/typescript/src/primitives/card/card-root.d.ts +11 -0
- package/dist/typescript/src/primitives/card/card-root.d.ts.map +1 -0
- package/dist/typescript/src/primitives/card/card-title.d.ts +9 -0
- package/dist/typescript/src/primitives/card/card-title.d.ts.map +1 -0
- package/dist/typescript/src/primitives/card/context.d.ts +8 -0
- package/dist/typescript/src/primitives/card/context.d.ts.map +1 -0
- package/dist/typescript/src/primitives/card/index.d.ts +19 -0
- package/dist/typescript/src/primitives/card/index.d.ts.map +1 -0
- package/dist/typescript/src/primitives/card/types.d.ts +14 -0
- package/dist/typescript/src/primitives/card/types.d.ts.map +1 -0
- package/dist/typescript/src/primitives/dropdown-menu/context.d.ts +16 -0
- package/dist/typescript/src/primitives/dropdown-menu/context.d.ts.map +1 -0
- package/dist/typescript/src/primitives/dropdown-menu/dropdown-menu-button.d.ts +12 -0
- package/dist/typescript/src/primitives/dropdown-menu/dropdown-menu-button.d.ts.map +1 -0
- package/dist/typescript/src/primitives/dropdown-menu/dropdown-menu-content.d.ts +9 -0
- package/dist/typescript/src/primitives/dropdown-menu/dropdown-menu-content.d.ts.map +1 -0
- package/dist/typescript/src/primitives/dropdown-menu/dropdown-menu-divider.d.ts +8 -0
- package/dist/typescript/src/primitives/dropdown-menu/dropdown-menu-divider.d.ts.map +1 -0
- package/dist/typescript/src/primitives/dropdown-menu/dropdown-menu-overlay.d.ts +9 -0
- package/dist/typescript/src/primitives/dropdown-menu/dropdown-menu-overlay.d.ts.map +1 -0
- package/dist/typescript/src/primitives/dropdown-menu/dropdown-menu-portal.d.ts +6 -0
- package/dist/typescript/src/primitives/dropdown-menu/dropdown-menu-portal.d.ts.map +1 -0
- package/dist/typescript/src/primitives/dropdown-menu/dropdown-menu-root.d.ts +9 -0
- package/dist/typescript/src/primitives/dropdown-menu/dropdown-menu-root.d.ts.map +1 -0
- package/dist/typescript/src/primitives/dropdown-menu/dropdown-menu-trigger.d.ts +12 -0
- package/dist/typescript/src/primitives/dropdown-menu/dropdown-menu-trigger.d.ts.map +1 -0
- package/dist/typescript/src/primitives/dropdown-menu/index.d.ts +24 -0
- package/dist/typescript/src/primitives/dropdown-menu/index.d.ts.map +1 -0
- package/dist/typescript/src/primitives/dropdown-menu/types.d.ts +12 -0
- package/dist/typescript/src/primitives/dropdown-menu/types.d.ts.map +1 -0
- package/dist/typescript/src/primitives/empty/context.d.ts +7 -0
- package/dist/typescript/src/primitives/empty/context.d.ts.map +1 -0
- package/dist/typescript/src/primitives/empty/empty-description.d.ts +9 -0
- package/dist/typescript/src/primitives/empty/empty-description.d.ts.map +1 -0
- package/dist/typescript/src/primitives/empty/empty-media.d.ts +9 -0
- package/dist/typescript/src/primitives/empty/empty-media.d.ts.map +1 -0
- package/dist/typescript/src/primitives/empty/empty-root.d.ts +11 -0
- package/dist/typescript/src/primitives/empty/empty-root.d.ts.map +1 -0
- package/dist/typescript/src/primitives/empty/empty-title.d.ts +9 -0
- package/dist/typescript/src/primitives/empty/empty-title.d.ts.map +1 -0
- package/dist/typescript/src/primitives/empty/index.d.ts +16 -0
- package/dist/typescript/src/primitives/empty/index.d.ts.map +1 -0
- package/dist/typescript/src/primitives/empty/types.d.ts +11 -0
- package/dist/typescript/src/primitives/empty/types.d.ts.map +1 -0
- package/dist/typescript/src/primitives/field/context.d.ts +9 -0
- package/dist/typescript/src/primitives/field/context.d.ts.map +1 -0
- package/dist/typescript/src/primitives/field/field-description.d.ts +9 -0
- package/dist/typescript/src/primitives/field/field-description.d.ts.map +1 -0
- package/dist/typescript/src/primitives/field/field-error.d.ts +9 -0
- package/dist/typescript/src/primitives/field/field-error.d.ts.map +1 -0
- package/dist/typescript/src/primitives/field/field-label.d.ts +10 -0
- package/dist/typescript/src/primitives/field/field-label.d.ts.map +1 -0
- package/dist/typescript/src/primitives/field/field-root.d.ts +11 -0
- package/dist/typescript/src/primitives/field/field-root.d.ts.map +1 -0
- package/dist/typescript/src/primitives/field/index.d.ts +16 -0
- package/dist/typescript/src/primitives/field/index.d.ts.map +1 -0
- package/dist/typescript/src/primitives/field/types.d.ts +11 -0
- package/dist/typescript/src/primitives/field/types.d.ts.map +1 -0
- package/dist/typescript/src/primitives/index.d.ts +15 -0
- package/dist/typescript/src/primitives/index.d.ts.map +1 -0
- package/dist/typescript/src/primitives/input/index.d.ts +3 -0
- package/dist/typescript/src/primitives/input/index.d.ts.map +1 -0
- package/dist/typescript/src/primitives/input/input.d.ts +14 -0
- package/dist/typescript/src/primitives/input/input.d.ts.map +1 -0
- package/dist/typescript/src/primitives/input/types.d.ts +4 -0
- package/dist/typescript/src/primitives/input/types.d.ts.map +1 -0
- package/dist/typescript/src/primitives/popover/context.d.ts +16 -0
- package/dist/typescript/src/primitives/popover/context.d.ts.map +1 -0
- package/dist/typescript/src/primitives/popover/index.d.ts +22 -0
- package/dist/typescript/src/primitives/popover/index.d.ts.map +1 -0
- package/dist/typescript/src/primitives/popover/popover-close.d.ts +10 -0
- package/dist/typescript/src/primitives/popover/popover-close.d.ts.map +1 -0
- package/dist/typescript/src/primitives/popover/popover-content.d.ts +9 -0
- package/dist/typescript/src/primitives/popover/popover-content.d.ts.map +1 -0
- package/dist/typescript/src/primitives/popover/popover-overlay.d.ts +10 -0
- package/dist/typescript/src/primitives/popover/popover-overlay.d.ts.map +1 -0
- package/dist/typescript/src/primitives/popover/popover-portal.d.ts +6 -0
- package/dist/typescript/src/primitives/popover/popover-portal.d.ts.map +1 -0
- package/dist/typescript/src/primitives/popover/popover-root.d.ts +9 -0
- package/dist/typescript/src/primitives/popover/popover-root.d.ts.map +1 -0
- package/dist/typescript/src/primitives/popover/popover-trigger.d.ts +12 -0
- package/dist/typescript/src/primitives/popover/popover-trigger.d.ts.map +1 -0
- package/dist/typescript/src/primitives/popover/types.d.ts +7 -0
- package/dist/typescript/src/primitives/popover/types.d.ts.map +1 -0
- package/dist/typescript/src/primitives/portal/index.d.ts +3 -0
- package/dist/typescript/src/primitives/portal/index.d.ts.map +1 -0
- package/dist/typescript/src/primitives/portal/portal.constants.d.ts +14 -0
- package/dist/typescript/src/primitives/portal/portal.constants.d.ts.map +1 -0
- package/dist/typescript/src/primitives/portal/portal.d.ts +7 -0
- package/dist/typescript/src/primitives/portal/portal.d.ts.map +1 -0
- package/dist/typescript/src/primitives/select/context.d.ts +20 -0
- package/dist/typescript/src/primitives/select/context.d.ts.map +1 -0
- package/dist/typescript/src/primitives/select/index.d.ts +25 -0
- package/dist/typescript/src/primitives/select/index.d.ts.map +1 -0
- package/dist/typescript/src/primitives/select/select-content.d.ts +9 -0
- package/dist/typescript/src/primitives/select/select-content.d.ts.map +1 -0
- package/dist/typescript/src/primitives/select/select-option.d.ts +11 -0
- package/dist/typescript/src/primitives/select/select-option.d.ts.map +1 -0
- package/dist/typescript/src/primitives/select/select-overlay.d.ts +10 -0
- package/dist/typescript/src/primitives/select/select-overlay.d.ts.map +1 -0
- package/dist/typescript/src/primitives/select/select-portal.d.ts +6 -0
- package/dist/typescript/src/primitives/select/select-portal.d.ts.map +1 -0
- package/dist/typescript/src/primitives/select/select-root.d.ts +21 -0
- package/dist/typescript/src/primitives/select/select-root.d.ts.map +1 -0
- package/dist/typescript/src/primitives/select/select-trigger.d.ts +13 -0
- package/dist/typescript/src/primitives/select/select-trigger.d.ts.map +1 -0
- package/dist/typescript/src/primitives/select/select-value.d.ts +8 -0
- package/dist/typescript/src/primitives/select/select-value.d.ts.map +1 -0
- package/dist/typescript/src/primitives/select/types.d.ts +22 -0
- package/dist/typescript/src/primitives/select/types.d.ts.map +1 -0
- package/dist/typescript/src/primitives/textarea/index.d.ts +3 -0
- package/dist/typescript/src/primitives/textarea/index.d.ts.map +1 -0
- package/dist/typescript/src/primitives/textarea/textarea.d.ts +12 -0
- package/dist/typescript/src/primitives/textarea/textarea.d.ts.map +1 -0
- package/dist/typescript/src/primitives/textarea/types.d.ts +4 -0
- package/dist/typescript/src/primitives/textarea/types.d.ts.map +1 -0
- package/dist/typescript/src/primitives/toast/context.d.ts +7 -0
- package/dist/typescript/src/primitives/toast/context.d.ts.map +1 -0
- package/dist/typescript/src/primitives/toast/index.d.ts +13 -0
- package/dist/typescript/src/primitives/toast/index.d.ts.map +1 -0
- package/dist/typescript/src/primitives/toast/toast-description.d.ts +9 -0
- package/dist/typescript/src/primitives/toast/toast-description.d.ts.map +1 -0
- package/dist/typescript/src/primitives/toast/toast-root.d.ts +11 -0
- package/dist/typescript/src/primitives/toast/toast-root.d.ts.map +1 -0
- package/dist/typescript/src/primitives/toast/toast-title.d.ts +9 -0
- package/dist/typescript/src/primitives/toast/toast-title.d.ts.map +1 -0
- package/dist/typescript/src/primitives/toast/types.d.ts +9 -0
- package/dist/typescript/src/primitives/toast/types.d.ts.map +1 -0
- package/dist/typescript/src/themes/adapters/index.d.ts +2 -0
- package/dist/typescript/src/themes/adapters/index.d.ts.map +1 -0
- package/dist/typescript/src/themes/adapters/react-navigation.d.ts +3 -0
- package/dist/typescript/src/themes/adapters/react-navigation.d.ts.map +1 -0
- package/dist/typescript/src/themes/default/colors.d.ts +4 -0
- package/dist/typescript/src/themes/default/colors.d.ts.map +1 -0
- package/dist/typescript/src/themes/default/index.d.ts +3 -0
- package/dist/typescript/src/themes/default/index.d.ts.map +1 -0
- package/dist/typescript/src/themes/index.d.ts +4 -0
- package/dist/typescript/src/themes/index.d.ts.map +1 -0
- package/dist/typescript/src/themes/provider.d.ts +18 -0
- package/dist/typescript/src/themes/provider.d.ts.map +1 -0
- package/dist/typescript/src/themes/themes.d.ts +3 -0
- package/dist/typescript/src/themes/themes.d.ts.map +1 -0
- package/dist/typescript/src/themes/types.d.ts +32 -0
- package/dist/typescript/src/themes/types.d.ts.map +1 -0
- package/dist/typescript/src/types/element.types.d.ts +4 -0
- package/dist/typescript/src/types/element.types.d.ts.map +1 -0
- package/dist/typescript/src/utils/calculate-styles.d.ts +2 -0
- package/dist/typescript/src/utils/calculate-styles.d.ts.map +1 -0
- package/dist/typescript/src/utils/date-utils.d.ts +19 -0
- package/dist/typescript/src/utils/date-utils.d.ts.map +1 -0
- package/dist/typescript/src/utils/hsla-utils.d.ts +5 -0
- package/dist/typescript/src/utils/hsla-utils.d.ts.map +1 -0
- package/dist/typescript/src/utils/normalize-layout.d.ts +8 -0
- package/dist/typescript/src/utils/normalize-layout.d.ts.map +1 -0
- package/dist/typescript/src/utils/use-themed-styles.d.ts +11 -0
- package/dist/typescript/src/utils/use-themed-styles.d.ts.map +1 -0
- package/package.json +31 -32
- package/src/components/avatar/avatar.tsx +1 -1
- package/src/components/avatar/variants/default.tsx +1 -1
- package/src/components/badge/variants/default.tsx +1 -1
- package/src/components/badge/variants/secondary.tsx +1 -1
- package/src/components/button/button.tsx +1 -1
- package/src/components/button/variants/default.tsx +1 -1
- package/src/components/button/variants/secondary.tsx +1 -1
- package/src/components/calendar/calendar.tsx +1 -1
- package/src/components/calendar/variants/default.tsx +1 -1
- package/src/components/card/variants/default.tsx +1 -1
- package/src/components/dropdown-menu/dropdown-menu.tsx +3 -1
- package/src/components/dropdown-menu/variants/default.tsx +1 -1
- package/src/components/empty/variants/default.tsx +1 -1
- package/src/components/field/variants/default.tsx +1 -1
- package/src/components/input/input.tsx +1 -1
- package/src/components/input/numeric-input.tsx +2 -2
- package/src/components/input/variants/default.tsx +1 -1
- package/src/components/link/link.tsx +1 -1
- package/src/components/link/variants/default.tsx +1 -1
- package/src/components/popover/popover.tsx +4 -5
- package/src/components/popover/variants/default.tsx +2 -1
- package/src/components/popover/variants/unstyled.tsx +1 -1
- package/src/components/select/select.tsx +1 -1
- package/src/components/select/variants/default.tsx +1 -1
- package/src/components/textarea/textarea.tsx +1 -1
- package/src/components/textarea/variants/default.tsx +1 -1
- package/src/components/toast/variants/danger.tsx +1 -1
- package/src/components/toast/variants/default.tsx +1 -1
- package/src/components/toast/variants/success.tsx +1 -1
- package/src/components/typography/typography.tsx +1 -1
- package/src/components/typography/variants/body-lg.tsx +1 -1
- package/src/components/typography/variants/body-md.tsx +1 -1
- package/src/components/typography/variants/body-sm.tsx +1 -1
- package/src/components/typography/variants/heading-lg.tsx +1 -1
- package/src/components/typography/variants/heading-md.tsx +1 -1
- package/src/components/typography/variants/heading-sm.tsx +1 -1
- package/src/index.tsx +3 -3
- package/src/primitives/avatar/avatar-fallback.tsx +1 -1
- package/src/primitives/avatar/avatar-image.tsx +1 -1
- package/src/primitives/avatar/avatar-root.tsx +2 -2
- package/src/primitives/avatar/context.ts +1 -1
- package/src/primitives/avatar/types.ts +3 -3
- package/src/primitives/badge/badge-label.tsx +2 -2
- package/src/primitives/badge/badge-root.tsx +3 -3
- package/src/primitives/badge/context.ts +1 -1
- package/src/primitives/badge/types.ts +2 -2
- package/src/primitives/button/button-context.tsx +1 -1
- package/src/primitives/button/button-label.tsx +2 -2
- package/src/primitives/button/button-root.tsx +2 -2
- package/src/primitives/button/button-spinner.tsx +2 -2
- package/src/primitives/button/types.ts +2 -2
- package/src/primitives/calendar/calendar-day.tsx +3 -3
- package/src/primitives/calendar/calendar-header.tsx +1 -1
- package/src/primitives/calendar/calendar-nav-button.tsx +2 -2
- package/src/primitives/calendar/calendar-root.tsx +2 -2
- package/src/primitives/calendar/calendar-title.tsx +1 -1
- package/src/primitives/calendar/calendar-week-labels.tsx +1 -1
- package/src/primitives/calendar/calendar-weeks.tsx +3 -3
- package/src/primitives/calendar/context.ts +1 -1
- package/src/primitives/calendar/types.ts +7 -7
- package/src/primitives/card/card-body.tsx +2 -2
- package/src/primitives/card/card-footer.tsx +2 -2
- package/src/primitives/card/card-header.tsx +2 -2
- package/src/primitives/card/card-root.tsx +3 -3
- package/src/primitives/card/card-title.tsx +2 -2
- package/src/primitives/card/context.ts +1 -1
- package/src/primitives/card/types.ts +5 -5
- package/src/primitives/dropdown-menu/context.ts +4 -4
- package/src/primitives/dropdown-menu/dropdown-menu-button.tsx +2 -2
- package/src/primitives/dropdown-menu/dropdown-menu-content.tsx +2 -2
- package/src/primitives/dropdown-menu/dropdown-menu-divider.tsx +1 -1
- package/src/primitives/dropdown-menu/dropdown-menu-overlay.tsx +1 -1
- package/src/primitives/dropdown-menu/dropdown-menu-root.tsx +3 -3
- package/src/primitives/dropdown-menu/dropdown-menu-trigger.tsx +6 -5
- package/src/primitives/dropdown-menu/types.ts +4 -4
- package/src/primitives/empty/context.ts +1 -1
- package/src/primitives/empty/empty-description.tsx +1 -1
- package/src/primitives/empty/empty-media.tsx +1 -1
- package/src/primitives/empty/empty-root.tsx +2 -2
- package/src/primitives/empty/empty-title.tsx +1 -1
- package/src/primitives/empty/types.ts +4 -4
- package/src/primitives/field/context.ts +1 -1
- package/src/primitives/field/field-description.tsx +1 -1
- package/src/primitives/field/field-error.tsx +1 -1
- package/src/primitives/field/field-label.tsx +1 -1
- package/src/primitives/field/field-root.tsx +2 -2
- package/src/primitives/field/types.ts +4 -4
- package/src/primitives/input/input.tsx +6 -5
- package/src/primitives/input/types.ts +1 -1
- package/src/primitives/popover/context.ts +4 -4
- package/src/primitives/popover/popover-close.tsx +1 -1
- package/src/primitives/popover/popover-content.tsx +2 -1
- package/src/primitives/popover/popover-overlay.tsx +3 -6
- package/src/primitives/popover/popover-root.tsx +3 -3
- package/src/primitives/popover/popover-trigger.tsx +5 -4
- package/src/primitives/popover/types.ts +2 -2
- package/src/primitives/portal/portal.tsx +6 -5
- package/src/primitives/select/context.ts +3 -3
- package/src/primitives/select/select-content.tsx +2 -2
- package/src/primitives/select/select-option.tsx +3 -3
- package/src/primitives/select/select-overlay.tsx +2 -2
- package/src/primitives/select/select-root.tsx +3 -3
- package/src/primitives/select/select-trigger.tsx +3 -3
- package/src/primitives/select/select-value.tsx +2 -2
- package/src/primitives/select/types.ts +6 -6
- package/src/primitives/textarea/textarea.tsx +2 -2
- package/src/primitives/textarea/types.ts +1 -1
- package/src/primitives/toast/context.ts +1 -1
- package/src/primitives/toast/toast-description.tsx +1 -1
- package/src/primitives/toast/toast-root.tsx +2 -2
- package/src/primitives/toast/toast-title.tsx +1 -1
- package/src/primitives/toast/types.ts +3 -3
- package/src/themes/adapters/react-navigation.ts +2 -1
- package/src/themes/default/colors.ts +1 -1
- package/src/themes/default/index.ts +1 -1
- package/src/themes/provider.tsx +5 -5
- package/src/themes/themes.ts +1 -1
- package/src/types/element.types.ts +4 -0
- package/src/utils/hsla-utils.ts +6 -9
- package/src/utils/normalize-layout.ts +5 -4
- package/src/utils/use-themed-styles.ts +1 -1
- package/tsconfig.json +22 -3
- package/dist/components/index.d.mts +0 -315
- package/dist/components/index.mjs +0 -978
- package/dist/hooks/index.d.mts +0 -47
- package/dist/hooks/index.mjs +0 -103
- package/dist/index-j_OCsdsx.d.mts +0 -704
- package/dist/index.d.mts +0 -65
- package/dist/index.mjs +0 -16
- package/dist/portal.constants-ClRV24_C.d.mts +0 -16
- package/dist/primitives/index.d.mts +0 -4
- package/dist/primitives/index.mjs +0 -4
- package/dist/primitives-8eataXpJ.mjs +0 -1437
- package/dist/toast-manager-q0YV3t3j.mjs +0 -321
- package/dist/use-numeric-mask-BQlz1Pus.mjs +0 -113
- package/dist/use-numeric-mask-D4zqPOnE.d.mts +0 -33
- package/dist/use-relative-position-BTKEyT1F.mjs +0 -106
- package/dist/use-relative-position-DBzhrBU7.d.mts +0 -61
- package/src/utils/get-ref-layout.ts +0 -16
- package/tsdown.config.ts +0 -8
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { useThemedStyles } from "@/utils/use-themed-styles";
|
|
4
|
+
export function useTextVariantHeadingLg() {
|
|
5
|
+
return useThemedStyles(({
|
|
6
|
+
colors,
|
|
7
|
+
fontFamily,
|
|
8
|
+
letterSpacing,
|
|
9
|
+
fontSize
|
|
10
|
+
}) => ({
|
|
11
|
+
color: colors.foreground,
|
|
12
|
+
fontSize: fontSize * 1.5,
|
|
13
|
+
fontFamily,
|
|
14
|
+
letterSpacing,
|
|
15
|
+
fontWeight: "600"
|
|
16
|
+
}));
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=heading-lg.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useThemedStyles","useTextVariantHeadingLg","colors","fontFamily","letterSpacing","fontSize","color","foreground","fontWeight"],"sourceRoot":"../../../../../src","sources":["components/typography/variants/heading-lg.tsx"],"mappings":";;AAAA,SAASA,eAAe,QAAQ,2BAA2B;AAG3D,OAAO,SAASC,uBAAuBA,CAAA,EAAc;EACnD,OAAOD,eAAe,CACpB,CAAC;IAAEE,MAAM;IAAEC,UAAU;IAAEC,aAAa;IAAEC;EAAS,CAAC,MAAiB;IAC/DC,KAAK,EAAEJ,MAAM,CAACK,UAAU;IACxBF,QAAQ,EAAEA,QAAQ,GAAG,GAAG;IACxBF,UAAU;IACVC,aAAa;IACbI,UAAU,EAAE;EACd,CAAC,CACH,CAAC;AACH","ignoreList":[]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { useThemedStyles } from "@/utils/use-themed-styles";
|
|
4
|
+
export function useTextVariantHeadingMd() {
|
|
5
|
+
return useThemedStyles(({
|
|
6
|
+
colors,
|
|
7
|
+
fontFamily,
|
|
8
|
+
letterSpacing,
|
|
9
|
+
fontSize
|
|
10
|
+
}) => ({
|
|
11
|
+
color: colors.foreground,
|
|
12
|
+
fontSize: fontSize * 1.25,
|
|
13
|
+
fontFamily,
|
|
14
|
+
letterSpacing,
|
|
15
|
+
fontWeight: "600"
|
|
16
|
+
}));
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=heading-md.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useThemedStyles","useTextVariantHeadingMd","colors","fontFamily","letterSpacing","fontSize","color","foreground","fontWeight"],"sourceRoot":"../../../../../src","sources":["components/typography/variants/heading-md.tsx"],"mappings":";;AAAA,SAASA,eAAe,QAAQ,2BAA2B;AAG3D,OAAO,SAASC,uBAAuBA,CAAA,EAAc;EACnD,OAAOD,eAAe,CACpB,CAAC;IAAEE,MAAM;IAAEC,UAAU;IAAEC,aAAa;IAAEC;EAAS,CAAC,MAAiB;IAC/DC,KAAK,EAAEJ,MAAM,CAACK,UAAU;IACxBF,QAAQ,EAAEA,QAAQ,GAAG,IAAI;IACzBF,UAAU;IACVC,aAAa;IACbI,UAAU,EAAE;EACd,CAAC,CACH,CAAC;AACH","ignoreList":[]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { useThemedStyles } from "@/utils/use-themed-styles";
|
|
4
|
+
export function useTextVariantHeadingSm() {
|
|
5
|
+
return useThemedStyles(({
|
|
6
|
+
colors,
|
|
7
|
+
fontFamily,
|
|
8
|
+
letterSpacing,
|
|
9
|
+
fontSize
|
|
10
|
+
}) => ({
|
|
11
|
+
color: colors.foreground,
|
|
12
|
+
fontSize,
|
|
13
|
+
fontFamily,
|
|
14
|
+
letterSpacing,
|
|
15
|
+
fontWeight: "600"
|
|
16
|
+
}));
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=heading-sm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useThemedStyles","useTextVariantHeadingSm","colors","fontFamily","letterSpacing","fontSize","color","foreground","fontWeight"],"sourceRoot":"../../../../../src","sources":["components/typography/variants/heading-sm.tsx"],"mappings":";;AAAA,SAASA,eAAe,QAAQ,2BAA2B;AAG3D,OAAO,SAASC,uBAAuBA,CAAA,EAAc;EACnD,OAAOD,eAAe,CACpB,CAAC;IAAEE,MAAM;IAAEC,UAAU;IAAEC,aAAa;IAAEC;EAAS,CAAC,MAAiB;IAC/DC,KAAK,EAAEJ,MAAM,CAACK,UAAU;IACxBF,QAAQ;IACRF,UAAU;IACVC,aAAa;IACbI,UAAU,EAAE;EACd,CAAC,CACH,CAAC;AACH","ignoreList":[]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { useTextVariantBodyLg } from "./body-lg.js";
|
|
4
|
+
import { useTextVariantBodyMd } from "./body-md.js";
|
|
5
|
+
import { useTextVariantBodySm } from "./body-sm.js";
|
|
6
|
+
import { useTextVariantHeadingLg } from "./heading-lg.js";
|
|
7
|
+
import { useTextVariantHeadingMd } from "./heading-md.js";
|
|
8
|
+
import { useTextVariantHeadingSm } from "./heading-sm.js";
|
|
9
|
+
export const TypographyVariants = {
|
|
10
|
+
["body-sm"]: useTextVariantBodySm,
|
|
11
|
+
["body-md"]: useTextVariantBodyMd,
|
|
12
|
+
["body-lg"]: useTextVariantBodyLg,
|
|
13
|
+
["heading-sm"]: useTextVariantHeadingSm,
|
|
14
|
+
["heading-md"]: useTextVariantHeadingMd,
|
|
15
|
+
["heading-lg"]: useTextVariantHeadingLg
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useTextVariantBodyLg","useTextVariantBodyMd","useTextVariantBodySm","useTextVariantHeadingLg","useTextVariantHeadingMd","useTextVariantHeadingSm","TypographyVariants"],"sourceRoot":"../../../../../src","sources":["components/typography/variants/index.ts"],"mappings":";;AAAA,SAASA,oBAAoB,QAAQ,cAAW;AAChD,SAASC,oBAAoB,QAAQ,cAAW;AAChD,SAASC,oBAAoB,QAAQ,cAAW;AAChD,SAASC,uBAAuB,QAAQ,iBAAc;AACtD,SAASC,uBAAuB,QAAQ,iBAAc;AACtD,SAASC,uBAAuB,QAAQ,iBAAc;AAEtD,OAAO,MAAMC,kBAAkB,GAAG;EAChC,CAAC,SAAS,GAAGJ,oBAAoB;EACjC,CAAC,SAAS,GAAGD,oBAAoB;EACjC,CAAC,SAAS,GAAGD,oBAAoB;EACjC,CAAC,YAAY,GAAGK,uBAAuB;EACvC,CAAC,YAAY,GAAGD,uBAAuB;EACvC,CAAC,YAAY,GAAGD;AAClB,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["hooks/index.ts"],"mappings":";;AAAA,cAAc,sBAAmB;AACjC,cAAc,wBAAqB;AACnC,cAAc,uBAAoB;AAClC,cAAc,4BAAyB","ignoreList":[]}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { useState, useCallback } from "react";
|
|
4
|
+
export function useCurrencyMask({
|
|
5
|
+
locale = "en-US",
|
|
6
|
+
currency = "USD",
|
|
7
|
+
precision = 2,
|
|
8
|
+
min,
|
|
9
|
+
max,
|
|
10
|
+
onValueChange
|
|
11
|
+
} = {}) {
|
|
12
|
+
const [numericValue, setNumericValue] = useState(null);
|
|
13
|
+
const [displayValue, setDisplayValue] = useState("");
|
|
14
|
+
const [isFocused, setIsFocused] = useState(false);
|
|
15
|
+
const formatCurrency = useCallback(num => {
|
|
16
|
+
if (num === null || isNaN(num)) return "";
|
|
17
|
+
return new Intl.NumberFormat(locale, {
|
|
18
|
+
style: "currency",
|
|
19
|
+
currency,
|
|
20
|
+
minimumFractionDigits: precision,
|
|
21
|
+
maximumFractionDigits: precision
|
|
22
|
+
}).format(num);
|
|
23
|
+
}, [locale, currency, precision]);
|
|
24
|
+
const parseCurrency = useCallback(text => {
|
|
25
|
+
// Remove currency symbols, spaces, and thousand separators
|
|
26
|
+
const cleaned = text.replace(/[^\d.-]/g, "");
|
|
27
|
+
const parsed = parseFloat(cleaned);
|
|
28
|
+
if (isNaN(parsed) || cleaned === "") return null;
|
|
29
|
+
|
|
30
|
+
// Apply min/max constraints
|
|
31
|
+
let constrained = parsed;
|
|
32
|
+
if (min !== undefined && constrained < min) constrained = min;
|
|
33
|
+
if (max !== undefined && constrained > max) constrained = max;
|
|
34
|
+
return constrained;
|
|
35
|
+
}, [min, max]);
|
|
36
|
+
const handleChangeText = useCallback(text => {
|
|
37
|
+
// When focused, validate decimal precision before allowing input
|
|
38
|
+
if (isFocused) {
|
|
39
|
+
// Remove currency symbols and thousand separators to get raw input
|
|
40
|
+
const cleaned = text.replace(/[^\d.-]/g, "");
|
|
41
|
+
|
|
42
|
+
// Check if input has a decimal point
|
|
43
|
+
const decimalIndex = cleaned.indexOf(".");
|
|
44
|
+
if (decimalIndex !== -1) {
|
|
45
|
+
const decimalPart = cleaned.substring(decimalIndex + 1);
|
|
46
|
+
|
|
47
|
+
// Prevent typing more decimals than allowed precision
|
|
48
|
+
if (decimalPart.length > precision) {
|
|
49
|
+
return; // Don't update state if exceeds precision
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// Also prevent multiple decimal points
|
|
54
|
+
const decimalCount = (cleaned.match(/\./g) || []).length;
|
|
55
|
+
if (decimalCount > 1) {
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
setDisplayValue(text);
|
|
60
|
+
const value = parseCurrency(text);
|
|
61
|
+
setNumericValue(value);
|
|
62
|
+
onValueChange?.(value);
|
|
63
|
+
}, [parseCurrency, onValueChange, isFocused, precision]);
|
|
64
|
+
const handleBlur = useCallback(() => {
|
|
65
|
+
setIsFocused(false);
|
|
66
|
+
if (numericValue !== null) {
|
|
67
|
+
setDisplayValue(formatCurrency(numericValue));
|
|
68
|
+
} else {
|
|
69
|
+
setDisplayValue("");
|
|
70
|
+
}
|
|
71
|
+
}, [numericValue, formatCurrency]);
|
|
72
|
+
const handleFocus = useCallback(() => {
|
|
73
|
+
setIsFocused(true);
|
|
74
|
+
if (numericValue !== null) {
|
|
75
|
+
setDisplayValue(numericValue.toString());
|
|
76
|
+
}
|
|
77
|
+
}, [numericValue]);
|
|
78
|
+
const setValue = useCallback(value => {
|
|
79
|
+
setNumericValue(value);
|
|
80
|
+
if (value !== null) {
|
|
81
|
+
if (isFocused) {
|
|
82
|
+
setDisplayValue(value.toString());
|
|
83
|
+
} else {
|
|
84
|
+
setDisplayValue(formatCurrency(value));
|
|
85
|
+
}
|
|
86
|
+
} else {
|
|
87
|
+
setDisplayValue("");
|
|
88
|
+
}
|
|
89
|
+
onValueChange?.(value);
|
|
90
|
+
}, [isFocused, formatCurrency, onValueChange]);
|
|
91
|
+
return {
|
|
92
|
+
value: displayValue,
|
|
93
|
+
numericValue,
|
|
94
|
+
onChangeText: handleChangeText,
|
|
95
|
+
onBlur: handleBlur,
|
|
96
|
+
onFocus: handleFocus,
|
|
97
|
+
keyboardType: "decimal-pad",
|
|
98
|
+
setValue
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
//# sourceMappingURL=use-currency-mask.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useState","useCallback","useCurrencyMask","locale","currency","precision","min","max","onValueChange","numericValue","setNumericValue","displayValue","setDisplayValue","isFocused","setIsFocused","formatCurrency","num","isNaN","Intl","NumberFormat","style","minimumFractionDigits","maximumFractionDigits","format","parseCurrency","text","cleaned","replace","parsed","parseFloat","constrained","undefined","handleChangeText","decimalIndex","indexOf","decimalPart","substring","length","decimalCount","match","value","handleBlur","handleFocus","toString","setValue","onChangeText","onBlur","onFocus","keyboardType"],"sourceRoot":"../../../src","sources":["hooks/use-currency-mask.ts"],"mappings":";;AAAA,SAASA,QAAQ,EAAEC,WAAW,QAAQ,OAAO;AAqB7C,OAAO,SAASC,eAAeA,CAAC;EAC9BC,MAAM,GAAG,OAAO;EAChBC,QAAQ,GAAG,KAAK;EAChBC,SAAS,GAAG,CAAC;EACbC,GAAG;EACHC,GAAG;EACHC;AACsB,CAAC,GAAG,CAAC,CAAC,EAAyB;EACrD,MAAM,CAACC,YAAY,EAAEC,eAAe,CAAC,GAAGV,QAAQ,CAAgB,IAAI,CAAC;EACrE,MAAM,CAACW,YAAY,EAAEC,eAAe,CAAC,GAAGZ,QAAQ,CAAC,EAAE,CAAC;EACpD,MAAM,CAACa,SAAS,EAAEC,YAAY,CAAC,GAAGd,QAAQ,CAAC,KAAK,CAAC;EAEjD,MAAMe,cAAc,GAAGd,WAAW,CAC/Be,GAAkB,IAAa;IAC9B,IAAIA,GAAG,KAAK,IAAI,IAAIC,KAAK,CAACD,GAAG,CAAC,EAAE,OAAO,EAAE;IAEzC,OAAO,IAAIE,IAAI,CAACC,YAAY,CAAChB,MAAM,EAAE;MACnCiB,KAAK,EAAE,UAAU;MACjBhB,QAAQ;MACRiB,qBAAqB,EAAEhB,SAAS;MAChCiB,qBAAqB,EAAEjB;IACzB,CAAC,CAAC,CAACkB,MAAM,CAACP,GAAG,CAAC;EAChB,CAAC,EACD,CAACb,MAAM,EAAEC,QAAQ,EAAEC,SAAS,CAC9B,CAAC;EAED,MAAMmB,aAAa,GAAGvB,WAAW,CAC9BwB,IAAY,IAAoB;IAC/B;IACA,MAAMC,OAAO,GAAGD,IAAI,CAACE,OAAO,CAAC,UAAU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
2
|
+
|
|
3
|
+
import { useState, useCallback } from "react";
|
|
4
|
+
export function useNumericMask({
|
|
5
|
+
format = "decimal",
|
|
6
|
+
locale = "en-US",
|
|
7
|
+
currency = "USD",
|
|
8
|
+
precision = 2,
|
|
9
|
+
min,
|
|
10
|
+
max,
|
|
11
|
+
allowNegative = true,
|
|
12
|
+
onChange
|
|
13
|
+
} = {}) {
|
|
14
|
+
const [numericValue, setNumericValue] = useState(null);
|
|
15
|
+
const [displayValue, setDisplayValue] = useState("");
|
|
16
|
+
const [isFocused, setIsFocused] = useState(false);
|
|
17
|
+
|
|
18
|
+
// Determine actual precision based on format
|
|
19
|
+
const effectivePrecision = format === "integer" ? 0 : precision;
|
|
20
|
+
const formatValue = useCallback(num => {
|
|
21
|
+
if (num === null || isNaN(num)) return "";
|
|
22
|
+
switch (format) {
|
|
23
|
+
case "currency":
|
|
24
|
+
return new Intl.NumberFormat(locale, {
|
|
25
|
+
style: "currency",
|
|
26
|
+
currency,
|
|
27
|
+
minimumFractionDigits: effectivePrecision,
|
|
28
|
+
maximumFractionDigits: effectivePrecision
|
|
29
|
+
}).format(num);
|
|
30
|
+
case "percentage":
|
|
31
|
+
return new Intl.NumberFormat(locale, {
|
|
32
|
+
style: "percent",
|
|
33
|
+
minimumFractionDigits: effectivePrecision,
|
|
34
|
+
maximumFractionDigits: effectivePrecision
|
|
35
|
+
}).format(num / 100);
|
|
36
|
+
case "integer":
|
|
37
|
+
return new Intl.NumberFormat(locale, {
|
|
38
|
+
minimumFractionDigits: 0,
|
|
39
|
+
maximumFractionDigits: 0
|
|
40
|
+
}).format(num);
|
|
41
|
+
case "decimal":
|
|
42
|
+
default:
|
|
43
|
+
return new Intl.NumberFormat(locale, {
|
|
44
|
+
minimumFractionDigits: effectivePrecision,
|
|
45
|
+
maximumFractionDigits: effectivePrecision
|
|
46
|
+
}).format(num);
|
|
47
|
+
}
|
|
48
|
+
}, [format, locale, currency, effectivePrecision]);
|
|
49
|
+
const parseValue = useCallback(text => {
|
|
50
|
+
// Remove currency symbols, spaces, thousand separators, and percentage signs
|
|
51
|
+
let cleaned = text.replace(/[^\d.-]/g, "");
|
|
52
|
+
|
|
53
|
+
// Handle negative sign
|
|
54
|
+
if (!allowNegative) {
|
|
55
|
+
cleaned = cleaned.replace(/-/g, "");
|
|
56
|
+
}
|
|
57
|
+
const parsed = parseFloat(cleaned);
|
|
58
|
+
if (isNaN(parsed) || cleaned === "" || cleaned === "-") return null;
|
|
59
|
+
|
|
60
|
+
// Apply min/max constraints
|
|
61
|
+
let constrained = parsed;
|
|
62
|
+
if (min !== undefined && constrained < min) constrained = min;
|
|
63
|
+
if (max !== undefined && constrained > max) constrained = max;
|
|
64
|
+
return constrained;
|
|
65
|
+
}, [min, max, allowNegative]);
|
|
66
|
+
const handleChangeText = useCallback(text => {
|
|
67
|
+
// When focused, validate input before allowing it
|
|
68
|
+
if (isFocused) {
|
|
69
|
+
// Remove formatting characters to get raw input
|
|
70
|
+
let cleaned = text.replace(/[^\d.-]/g, "");
|
|
71
|
+
|
|
72
|
+
// Validate negative sign
|
|
73
|
+
if (!allowNegative && cleaned.includes("-")) {
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// Ensure negative sign is only at the start
|
|
78
|
+
if (allowNegative) {
|
|
79
|
+
const negativeCount = (cleaned.match(/-/g) || []).length;
|
|
80
|
+
if (negativeCount > 1 || cleaned.includes("-") && cleaned.indexOf("-") !== 0) {
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// Check decimal precision (skip for integer format)
|
|
86
|
+
if (effectivePrecision >= 0) {
|
|
87
|
+
const decimalIndex = cleaned.indexOf(".");
|
|
88
|
+
if (decimalIndex !== -1) {
|
|
89
|
+
const decimalPart = cleaned.substring(decimalIndex + 1);
|
|
90
|
+
|
|
91
|
+
// Prevent typing more decimals than allowed precision
|
|
92
|
+
if (decimalPart.length > effectivePrecision) {
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
// Prevent multiple decimal points
|
|
98
|
+
const decimalCount = (cleaned.match(/\./g) || []).length;
|
|
99
|
+
if (decimalCount > 1) {
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
// Prevent decimal point for integer format
|
|
104
|
+
if (format === "integer" && cleaned.includes(".")) {
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
setDisplayValue(text);
|
|
110
|
+
const value = parseValue(text);
|
|
111
|
+
setNumericValue(value);
|
|
112
|
+
onChange?.(value);
|
|
113
|
+
}, [parseValue, onChange, isFocused, effectivePrecision, allowNegative, format]);
|
|
114
|
+
const handleBlur = useCallback(() => {
|
|
115
|
+
setIsFocused(false);
|
|
116
|
+
if (numericValue !== null) {
|
|
117
|
+
setDisplayValue(formatValue(numericValue));
|
|
118
|
+
} else {
|
|
119
|
+
setDisplayValue("");
|
|
120
|
+
}
|
|
121
|
+
}, [numericValue, formatValue]);
|
|
122
|
+
const handleFocus = useCallback(() => {
|
|
123
|
+
setIsFocused(true);
|
|
124
|
+
if (numericValue !== null) {
|
|
125
|
+
setDisplayValue(numericValue.toString());
|
|
126
|
+
}
|
|
127
|
+
}, [numericValue]);
|
|
128
|
+
const setValue = useCallback(value => {
|
|
129
|
+
setNumericValue(value);
|
|
130
|
+
if (value !== null) {
|
|
131
|
+
if (isFocused) {
|
|
132
|
+
setDisplayValue(value.toString());
|
|
133
|
+
} else {
|
|
134
|
+
setDisplayValue(formatValue(value));
|
|
135
|
+
}
|
|
136
|
+
} else {
|
|
137
|
+
setDisplayValue("");
|
|
138
|
+
}
|
|
139
|
+
onChange?.(value);
|
|
140
|
+
}, [isFocused, formatValue, onChange]);
|
|
141
|
+
|
|
142
|
+
// Determine keyboard type based on format
|
|
143
|
+
const keyboardType = format === "integer" ? allowNegative ? "numeric" : "number-pad" : "decimal-pad";
|
|
144
|
+
return {
|
|
145
|
+
value: displayValue,
|
|
146
|
+
numericValue,
|
|
147
|
+
onChangeText: handleChangeText,
|
|
148
|
+
onBlur: handleBlur,
|
|
149
|
+
onFocus: handleFocus,
|
|
150
|
+
keyboardType,
|
|
151
|
+
setValue
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
//# sourceMappingURL=use-numeric-mask.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useState","useCallback","useNumericMask","format","locale","currency","precision","min","max","allowNegative","onChange","numericValue","setNumericValue","displayValue","setDisplayValue","isFocused","setIsFocused","effectivePrecision","formatValue","num","isNaN","Intl","NumberFormat","style","minimumFractionDigits","maximumFractionDigits","parseValue","text","cleaned","replace","parsed","parseFloat","constrained","undefined","handleChangeText","includes","negativeCount","match","length","indexOf","decimalIndex","decimalPart","substring","decimalCount","value","handleBlur","handleFocus","toString","setValue","keyboardType","onChangeText","onBlur","onFocus"],"sourceRoot":"../../../src","sources":["hooks/use-numeric-mask.ts"],"mappings":";;AAAA,SAASA,QAAQ,EAAEC,WAAW,QAAQ,OAAO;AAyB7C,OAAO,SAASC,cAAcA,CAAC;EAC7BC,MAAM,GAAG,SAAS;EAClBC,MAAM,GAAG,OAAO;EAChBC,QAAQ,GAAG,KAAK;EAChBC,SAAS,GAAG,CAAC;EACbC,GAAG;EACHC,GAAG;EACHC,aAAa,GAAG,IAAI;EACpBC;AACqB,CAAC,GAAG,CAAC,CAAC,EAAwB;EACnD,MAAM,CAACC,YAAY,EAAEC,eAAe,CAAC,GAAGZ,QAAQ,CAAgB,IAAI,CAAC;EACrE,MAAM,CAACa,YAAY,EAAEC,eAAe,CAAC,GAAGd,QAAQ,CAAC,EAAE,CAAC;EACpD,MAAM,CAACe,SAAS,EAAEC,YAAY,CAAC,GAAGhB,QAAQ,CAAC,KAAK,CAAC;;EAEjD;EACA,MAAMiB,kBAAkB,GAAGd,MAAM,KAAK,SAAS,GAAG,CAAC,GAAGG,SAAS;EAE/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xBhC,eAAe,CAACgC,KAAK,CAAC;IACtB,IAAIA,KAAK,KAAK,IAAI,EAAE;MAClB,IAAI7B,SAAS,EAAE;QACbD,eAAe,CAAC8B,KAAK,CAACG,QAAQ,CAAC,CAAC,CAAC;MACnC,CAAC,MAAM;QACLjC,eAAe,CAACI,WAAW,CAAC0B,KAAK,CAAC,CAAC;MACrC;IACF,CAAC,MAAM;MACL9B,eAAe,CAAC,EAAE,CAAC;IACrB;IACAJ,QAAQ,GAAGkC,KAAK,CAAC;EACnB,CAAC,EACD,CAAC7B,SAAS,EAAEG,WAAW,EAAER,QAAQ,CACnC,CAAC;;EAED;EACA,MAAMuC,YAAY,GAAG9C,MAAM,KAAK,SAAS,GAAIM,aAAa,GAAI,SAAS,GAAc,YAAsB,GAAK,aAAuB;EAEvI,OAAO;IACLmC,KAAK,EAAE/B,YAAY;IACnBF,YAAY;IACZuC,YAAY,EAAEhB,gBAAgB;IAC9BiB,MAAM,EAAEN,UAAU;IAClBO,OAAO,EAAEN,WAAW;IACpBG,YAAY;IACZD;EACF,CAAC;AACH","ignoreList":[]}
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { useWindowDimensions } from "react-native";
|
|
5
|
+
export function useRelativePosition({
|
|
6
|
+
align,
|
|
7
|
+
avoidCollisions,
|
|
8
|
+
triggerPosition,
|
|
9
|
+
contentLayout,
|
|
10
|
+
alignOffset,
|
|
11
|
+
insets,
|
|
12
|
+
sideOffset,
|
|
13
|
+
side
|
|
14
|
+
}) {
|
|
15
|
+
const dimensions = useWindowDimensions();
|
|
16
|
+
return React.useMemo(() => {
|
|
17
|
+
if (!triggerPosition || !contentLayout) {
|
|
18
|
+
return {
|
|
19
|
+
position: "absolute",
|
|
20
|
+
opacity: 0,
|
|
21
|
+
top: dimensions.height,
|
|
22
|
+
zIndex: -9999999
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
return getContentStyle({
|
|
26
|
+
align,
|
|
27
|
+
avoidCollisions,
|
|
28
|
+
contentLayout,
|
|
29
|
+
side,
|
|
30
|
+
triggerPosition,
|
|
31
|
+
alignOffset,
|
|
32
|
+
insets,
|
|
33
|
+
sideOffset,
|
|
34
|
+
dimensions
|
|
35
|
+
});
|
|
36
|
+
}, [align, avoidCollisions, side, alignOffset, insets, triggerPosition, contentLayout, dimensions.width, dimensions.height]);
|
|
37
|
+
}
|
|
38
|
+
export const DEFAULT_LAYOUT = {
|
|
39
|
+
x: 0,
|
|
40
|
+
y: 0,
|
|
41
|
+
width: 0,
|
|
42
|
+
height: 0
|
|
43
|
+
};
|
|
44
|
+
export const DEFAULT_POSITION = {
|
|
45
|
+
height: 0,
|
|
46
|
+
width: 0,
|
|
47
|
+
pageX: 0,
|
|
48
|
+
pageY: 0
|
|
49
|
+
};
|
|
50
|
+
function getSidePosition({
|
|
51
|
+
side,
|
|
52
|
+
triggerPosition,
|
|
53
|
+
contentLayout,
|
|
54
|
+
sideOffset,
|
|
55
|
+
insets,
|
|
56
|
+
avoidCollisions,
|
|
57
|
+
dimensions
|
|
58
|
+
}) {
|
|
59
|
+
const insetTop = insets?.top ?? 0;
|
|
60
|
+
const insetBottom = insets?.bottom ?? 0;
|
|
61
|
+
const positionTop = triggerPosition?.pageY - sideOffset - contentLayout.height;
|
|
62
|
+
const positionBottom = triggerPosition.pageY + triggerPosition.height + sideOffset;
|
|
63
|
+
if (!avoidCollisions) {
|
|
64
|
+
return {
|
|
65
|
+
top: side === "top" ? positionTop : positionBottom
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
if (side === "top") {
|
|
69
|
+
return {
|
|
70
|
+
top: Math.min(Math.max(insetTop, positionTop), dimensions.height - insetBottom - contentLayout.height)
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
return {
|
|
74
|
+
top: Math.min(dimensions.height - insetBottom - contentLayout.height, positionBottom)
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
function getAlignPosition({
|
|
78
|
+
align,
|
|
79
|
+
avoidCollisions,
|
|
80
|
+
contentLayout,
|
|
81
|
+
triggerPosition,
|
|
82
|
+
alignOffset,
|
|
83
|
+
insets,
|
|
84
|
+
dimensions
|
|
85
|
+
}) {
|
|
86
|
+
const insetLeft = insets?.left ?? 0;
|
|
87
|
+
const insetRight = insets?.right ?? 0;
|
|
88
|
+
const maxContentWidth = dimensions.width - insetLeft - insetRight;
|
|
89
|
+
const contentWidth = Math.min(contentLayout.width, maxContentWidth);
|
|
90
|
+
let left = getLeftPosition(align, triggerPosition.pageX, triggerPosition.width, contentWidth, alignOffset, insetLeft, insetRight, dimensions);
|
|
91
|
+
if (avoidCollisions) {
|
|
92
|
+
const doesCollide = left < insetLeft || left + contentWidth > dimensions.width - insetRight;
|
|
93
|
+
if (doesCollide) {
|
|
94
|
+
const spaceLeft = left - insetLeft;
|
|
95
|
+
const spaceRight = dimensions.width - insetRight - (left + contentWidth);
|
|
96
|
+
if (spaceLeft > spaceRight && spaceLeft >= contentWidth) {
|
|
97
|
+
left = insetLeft;
|
|
98
|
+
} else if (spaceRight >= contentWidth) {
|
|
99
|
+
left = dimensions.width - insetRight - contentWidth;
|
|
100
|
+
} else {
|
|
101
|
+
const centeredPosition = Math.max(insetLeft, (dimensions.width - contentWidth - insetRight) / 2);
|
|
102
|
+
left = centeredPosition;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
return {
|
|
107
|
+
left,
|
|
108
|
+
maxWidth: maxContentWidth
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
function getLeftPosition(align, triggerPageX, triggerWidth, contentWidth, alignOffset, insetLeft, insetRight, dimensions) {
|
|
112
|
+
let left = 0;
|
|
113
|
+
if (align === "start") {
|
|
114
|
+
left = triggerPageX;
|
|
115
|
+
}
|
|
116
|
+
if (align === "center") {
|
|
117
|
+
left = triggerPageX + triggerWidth / 2 - contentWidth / 2;
|
|
118
|
+
}
|
|
119
|
+
if (align === "end") {
|
|
120
|
+
left = triggerPageX + triggerWidth - contentWidth;
|
|
121
|
+
}
|
|
122
|
+
return Math.max(insetLeft, Math.min(left + alignOffset, dimensions.width - contentWidth - insetRight));
|
|
123
|
+
}
|
|
124
|
+
function getContentStyle({
|
|
125
|
+
align,
|
|
126
|
+
avoidCollisions,
|
|
127
|
+
contentLayout,
|
|
128
|
+
side,
|
|
129
|
+
triggerPosition,
|
|
130
|
+
alignOffset,
|
|
131
|
+
insets,
|
|
132
|
+
sideOffset,
|
|
133
|
+
dimensions
|
|
134
|
+
}) {
|
|
135
|
+
return Object.assign({
|
|
136
|
+
position: "absolute"
|
|
137
|
+
}, getSidePosition({
|
|
138
|
+
side,
|
|
139
|
+
triggerPosition,
|
|
140
|
+
contentLayout,
|
|
141
|
+
sideOffset,
|
|
142
|
+
insets,
|
|
143
|
+
avoidCollisions,
|
|
144
|
+
dimensions
|
|
145
|
+
}), getAlignPosition({
|
|
146
|
+
align,
|
|
147
|
+
avoidCollisions,
|
|
148
|
+
triggerPosition,
|
|
149
|
+
contentLayout,
|
|
150
|
+
alignOffset,
|
|
151
|
+
insets,
|
|
152
|
+
dimensions
|
|
153
|
+
}));
|
|
154
|
+
}
|
|
155
|
+
//# sourceMappingURL=use-relative-position.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useWindowDimensions","useRelativePosition","align","avoidCollisions","triggerPosition","contentLayout","alignOffset","insets","sideOffset","side","dimensions","useMemo","position","opacity","top","height","zIndex","getContentStyle","width","DEFAULT_LAYOUT","x","y","DEFAULT_POSITION","pageX","pageY","getSidePosition","insetTop","insetBottom","bottom","positionTop","positionBottom","Math","min","max","getAlignPosition","insetLeft","left","insetRight","right","maxContentWidth","contentWidth","getLeftPosition","doesCollide","spaceLeft","spaceRight","centeredPosition","maxWidth","triggerPageX","triggerWidth","Object","assign"],"sourceRoot":"../../../src","sources":["hooks/use-relative-position.ts"],"mappings":";;AAAA,OAAO,KA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GAAGW,YAAY,GAAGC,YAAY,GAAG,CAAC,GAAGR,YAAY,GAAG,CAAC;EAC3D;EACA,IAAItC,KAAK,KAAK,KAAK,EAAE;IACnBkC,IAAI,GAAGW,YAAY,GAAGC,YAAY,GAAGR,YAAY;EACnD;EACA,OAAOT,IAAI,CAACE,GAAG,CAACE,SAAS,EAAEJ,IAAI,CAACC,GAAG,CAACI,IAAI,GAAG9B,WAAW,EAAEI,UAAU,CAACQ,KAAK,GAAGsB,YAAY,GAAGH,UAAU,CAAC,CAAC;AACxG;AAIA,SAASpB,eAAeA,CAAC;EACvBf,KAAK;EACLC,eAAe;EACfE,aAAa;EACbI,IAAI;EACJL,eAAe;EACfE,WAAW;EACXC,MAAM;EACNC,UAAU;EACVE;AACmB,CAAC,EAAE;EACtB,OAAOuC,MAAM,CAACC,MAAM,CAClB;IAAEtC,QAAQ,EAAE;EAAW,CAAC,EACxBa,eAAe,CAAC;IACdhB,IAAI;IACJL,eAAe;IACfC,aAAa;IACbG,UAAU;IACVD,MAAM;IACNJ,eAAe;IACfO;EACF,CAAC,CAAC,EACFwB,gBAAgB,CAAC;IACfhC,KAAK;IACLC,eAAe;IACfC,eAAe;IACfC,aAAa;IACbC,WAAW;IACXC,MAAM;IACNG;EACF,CAAC,CACH,CAAC;AACH","ignoreList":[]}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { useWindowDimensions } from "react-native";
|
|
4
|
+
export function useScreenSize() {
|
|
5
|
+
const windowDimensions = useWindowDimensions();
|
|
6
|
+
const size = windowDimensions.width < 768 ? "mobile" : windowDimensions.width < 1024 ? "tablet" : "desktop";
|
|
7
|
+
return {
|
|
8
|
+
size,
|
|
9
|
+
width: windowDimensions.width,
|
|
10
|
+
height: windowDimensions.height,
|
|
11
|
+
isMobile: size === "mobile",
|
|
12
|
+
isTablet: size === "tablet",
|
|
13
|
+
isDesktop: size === "desktop",
|
|
14
|
+
select: specifics => {
|
|
15
|
+
const {
|
|
16
|
+
mobile,
|
|
17
|
+
tablet,
|
|
18
|
+
desktop
|
|
19
|
+
} = specifics;
|
|
20
|
+
if (size === "mobile" && mobile !== undefined) return mobile;
|
|
21
|
+
if (size === "tablet" && tablet !== undefined) return tablet;
|
|
22
|
+
if (size === "desktop" && desktop !== undefined) return desktop;
|
|
23
|
+
if (!("default" in specifics)) {
|
|
24
|
+
throw new Error(`Utils.$screenSize.select: No value specified for current screen size: ${size}`);
|
|
25
|
+
}
|
|
26
|
+
return specifics.default;
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=use-screen-size.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useWindowDimensions","useScreenSize","windowDimensions","size","width","height","isMobile","isTablet","isDesktop","select","specifics","mobile","tablet","desktop","undefined","Error","default"],"sourceRoot":"../../../src","sources":["hooks/use-screen-size.ts"],"mappings":";;AAAA,SAASA,mBAAmB,QAAQ,cAAc;AAgBlD,OAAO,SAASC,aAAaA,CAAA,EAAa;EACxC,MAAMC,gBAAgB,GAAGF,mBAAmB,CAAC,CAAC;EAE9C,MAAMG,IAAgB,GAAGD,gBAAgB,CAACE,KAAK,GAAG,GAAG,GAAG,QAAQ,GAAGF,gBAAgB,CAACE,KAAK,GAAG,IAAI,GAAG,QAAQ,GAAG,SAAS;EAEvH,OAAO;IACLD,IAAI;IACJC,KAAK,EAAEF,gBAAgB,CAACE,KAAK;IAC7BC,MAAM,EAAEH,gBAAgB,CAACG,MAAM;IAC/BC,QAAQ,EAAEH,IAAI,KAAK,QAAQ;IAC3BI,QAAQ,EAAEJ,IAAI,KAAK,QAAQ;IAC3BK,SAAS,EAAEL,IAAI,KAAK,SAAS;IAC7BM,MAAM,EAAGC,SAAS,IAAK;MACrB,MAAM;QAAEC,MAAM;QAAEC,MAAM;QAAEC;MAAQ,CAAC,GAAGH,SAAS;MAE7C,IAAIP,IAAI,KAAK,QAAQ,IAAIQ,MAAM,KAAKG,SAAS,EAAE,OAAOH,MAAM;MAC5D,IAAIR,IAAI,KAAK,QAAQ,IAAIS,MAAM,KAAKE,SAAS,EAAE,OAAOF,MAAM;MAC5D,IAAIT,IAAI,KAAK,SAAS,IAAIU,OAAO,KAAKC,SAAS,EAAE,OAAOD,OAAO;MAC/D,IAAI,EAAE,SAAS,IAAIH,SAAS,CAAC,EAAE;QAC7B,MAAM,IAAIK,KAAK,CAAC,yEAAyEZ,IAAI,EAAE,CAAC;MAClG;MACA,OAAOO,SAAS,CAACM,OAAO;IAC1B;EACF,CAAC;AACH","ignoreList":[]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { ThemeProvider } from "@/themes";
|
|
4
|
+
import { ToastContainer } from "./components/toast/toast-manager.js";
|
|
5
|
+
import { PortalHost } from "./primitives/portal/index.js";
|
|
6
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
|
+
export const UniversalUIProvider = ({
|
|
8
|
+
children,
|
|
9
|
+
portalContainer
|
|
10
|
+
}) => {
|
|
11
|
+
return /*#__PURE__*/_jsxs(ThemeProvider, {
|
|
12
|
+
children: [/*#__PURE__*/_jsx(ToastContainer, {}), children, /*#__PURE__*/_jsx(PortalHost, {
|
|
13
|
+
container: portalContainer
|
|
14
|
+
})]
|
|
15
|
+
});
|
|
16
|
+
};
|
|
17
|
+
export * from "./themes/adapters/index.js";
|
|
18
|
+
export { useTheme } from "./themes/provider.js";
|
|
19
|
+
export * from "./themes/types.js";
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["ThemeProvider","ToastContainer","PortalHost","jsx","_jsx","jsxs","_jsxs","UniversalUIProvider","children","portalContainer","container","useTheme"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;AAAA,SAASA,aAAa,QAAQ,UAAU;AACxC,SAASC,cAAc,QAAQ,qCAAkC;AACjE,SAASC,UAAU,QAAQ,8BAAqB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AASjD,OAAO,MAAMC,mBAAmB,GAAGA,CAAC;EAAEC,QAAQ;EAAEC;AAA+B,CAAC,KAAK;EACnF,oBACEH,KAAA,CAACN,aAAa;IAAAQ,QAAA,gBACZJ,IAAA,CAACH,cAAc,IAAE,CAAC,EACjBO,QAAQ,eACTJ,IAAA,CAACF,UAAU;MAACQ,SAAS,EAAED;IAAgB,CAAE,CAAC;EAAA,CAC7B,CAAC;AAEpB,CAAC;AAED,cAAc,4BAAmB;AACjC,SAASE,QAAQ,QAAQ,sBAAmB;AAC5C,cAAc,mBAAgB","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"type":"module"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { View } from "react-native";
|
|
5
|
+
import { useAvatar } from "./context.js";
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
export function AvatarFallback(props) {
|
|
8
|
+
const avatar = useAvatar();
|
|
9
|
+
const composedStyles = [avatar.styles?.fallback, props.style];
|
|
10
|
+
const Component = props.render ?? View;
|
|
11
|
+
return /*#__PURE__*/_jsx(Component, {
|
|
12
|
+
...props,
|
|
13
|
+
style: composedStyles
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=avatar-fallback.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","View","useAvatar","jsx","_jsx","AvatarFallback","props","avatar","composedStyles","styles","fallback","style","Component","render"],"sourceRoot":"../../../../src","sources":["primitives/avatar/avatar-fallback.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAyCC,IAAI,QAAQ,cAAc;AACnE,SAASC,SAAS,QAAQ,cAAW;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAQtC,OAAO,SAASC,cAAcA,CAACC,KAA0B,EAAE;EACzD,MAAMC,MAAM,GAAGL,SAAS,CAAC,CAAC;EAC1B,MAAMM,cAAc,GAAG,CAACD,MAAM,CAACE,MAAM,EAAEC,QAAQ,EAAEJ,KAAK,CAACK,KAAK,CAAC;EAC7D,MAAMC,SAAS,GAAGN,KAAK,CAACO,MAAM,IAAIZ,IAAI;EACtC,oBAAOG,IAAA,CAACQ,SAAS;IAAA,GAAKN,KAAK;IAAEK,KAAK,EAAEH;EAAe,CAAE,CAAC;AACxD","ignoreList":[]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { Image } from "react-native";
|
|
5
|
+
import { useAvatar } from "./context.js";
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
export function AvatarImage(props) {
|
|
8
|
+
const avatar = useAvatar();
|
|
9
|
+
const composedStyles = [avatar.styles?.image, props.style];
|
|
10
|
+
const Component = props.render ?? Image;
|
|
11
|
+
return /*#__PURE__*/_jsx(Component, {
|
|
12
|
+
...props,
|
|
13
|
+
style: composedStyles
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=avatar-image.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","Image","useAvatar","jsx","_jsx","AvatarImage","props","avatar","composedStyles","styles","image","style","Component","render"],"sourceRoot":"../../../../src","sources":["primitives/avatar/avatar-image.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,KAAK,QAA2D,cAAc;AACvF,SAASC,SAAS,QAAQ,cAAW;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAStC,OAAO,SAASC,WAAWA,CAACC,KAAuB,EAAE;EACnD,MAAMC,MAAM,GAAGL,SAAS,CAAC,CAAC;EAC1B,MAAMM,cAAc,GAAG,CAACD,MAAM,CAACE,MAAM,EAAEC,KAAK,EAAEJ,KAAK,CAACK,KAAK,CAAC;EAC1D,MAAMC,SAAS,GAAGN,KAAK,CAACO,MAAM,IAAIZ,KAAK;EACvC,oBAAOG,IAAA,CAACQ,SAAS;IAAA,GAAKN,KAAK;IAAEK,KAAK,EAAEH;EAAe,CAAE,CAAC;AACxD","ignoreList":[]}
|