@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,112 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { useEffect, useState, useSyncExternalStore } from "react";
|
|
4
|
+
import { Platform, View } from "react-native";
|
|
5
|
+
import { DEFAULT_PORTAL_HOST } from "./portal.constants.js";
|
|
6
|
+
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
7
|
+
const store = {
|
|
8
|
+
map: new Map().set(DEFAULT_PORTAL_HOST, new Map()),
|
|
9
|
+
listeners: new Set()
|
|
10
|
+
};
|
|
11
|
+
function emit() {
|
|
12
|
+
for (const cb of store.listeners) cb();
|
|
13
|
+
}
|
|
14
|
+
function getSnapshot() {
|
|
15
|
+
return store.map;
|
|
16
|
+
}
|
|
17
|
+
function subscribe(cb) {
|
|
18
|
+
store.listeners.add(cb);
|
|
19
|
+
return () => {
|
|
20
|
+
store.listeners.delete(cb);
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
function updatePortal(hostName, name, children) {
|
|
24
|
+
const next = new Map(store.map);
|
|
25
|
+
const portal = next.get(hostName) ?? new Map();
|
|
26
|
+
portal.set(name, children);
|
|
27
|
+
next.set(hostName, portal);
|
|
28
|
+
store.map = next;
|
|
29
|
+
emit();
|
|
30
|
+
}
|
|
31
|
+
function removePortal(hostName, name) {
|
|
32
|
+
const next = new Map(store.map);
|
|
33
|
+
const portal = next.get(hostName) ?? new Map();
|
|
34
|
+
portal.delete(name);
|
|
35
|
+
next.set(hostName, portal);
|
|
36
|
+
store.map = next;
|
|
37
|
+
emit();
|
|
38
|
+
}
|
|
39
|
+
function NativePortalHost({
|
|
40
|
+
name = DEFAULT_PORTAL_HOST,
|
|
41
|
+
container
|
|
42
|
+
}) {
|
|
43
|
+
const map = useSyncExternalStore(subscribe, getSnapshot, getSnapshot);
|
|
44
|
+
const portalMap = map.get(name) ?? new Map();
|
|
45
|
+
if (portalMap.size === 0) return null;
|
|
46
|
+
const Container = Platform.select({
|
|
47
|
+
default: props => /*#__PURE__*/_jsx(View, {
|
|
48
|
+
...props,
|
|
49
|
+
style: {
|
|
50
|
+
position: "absolute",
|
|
51
|
+
top: 0,
|
|
52
|
+
left: 0,
|
|
53
|
+
right: 0,
|
|
54
|
+
bottom: 0,
|
|
55
|
+
elevation: 999,
|
|
56
|
+
zIndex: 999,
|
|
57
|
+
pointerEvents: "box-none"
|
|
58
|
+
}
|
|
59
|
+
}),
|
|
60
|
+
ios: container?.ios,
|
|
61
|
+
android: container?.android
|
|
62
|
+
});
|
|
63
|
+
return /*#__PURE__*/_jsx(Container, {
|
|
64
|
+
children: Array.from(portalMap.values())
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
function WebPortalHost() {
|
|
68
|
+
return /*#__PURE__*/_jsx(_Fragment, {});
|
|
69
|
+
}
|
|
70
|
+
export const PortalHost = Platform.select({
|
|
71
|
+
default: NativePortalHost,
|
|
72
|
+
web: WebPortalHost
|
|
73
|
+
});
|
|
74
|
+
function NativePortal({
|
|
75
|
+
name,
|
|
76
|
+
hostName = DEFAULT_PORTAL_HOST,
|
|
77
|
+
children
|
|
78
|
+
}) {
|
|
79
|
+
useEffect(() => {
|
|
80
|
+
updatePortal(hostName, name, children);
|
|
81
|
+
}, [hostName, name, children]);
|
|
82
|
+
useEffect(() => {
|
|
83
|
+
return () => {
|
|
84
|
+
removePortal(hostName, name);
|
|
85
|
+
};
|
|
86
|
+
}, [hostName, name]);
|
|
87
|
+
return /*#__PURE__*/_jsx(_Fragment, {});
|
|
88
|
+
}
|
|
89
|
+
function WebPortal({
|
|
90
|
+
name,
|
|
91
|
+
hostName = DEFAULT_PORTAL_HOST,
|
|
92
|
+
children
|
|
93
|
+
}) {
|
|
94
|
+
const [] = useState(() => {
|
|
95
|
+
let container = document.getElementById(hostName);
|
|
96
|
+
if (!container) {
|
|
97
|
+
container = document.createElement("div");
|
|
98
|
+
container.id = hostName;
|
|
99
|
+
document.body.appendChild(container);
|
|
100
|
+
}
|
|
101
|
+
return container;
|
|
102
|
+
});
|
|
103
|
+
const createPortal = require("react-dom").createPortal;
|
|
104
|
+
return /*#__PURE__*/_jsx(_Fragment, {
|
|
105
|
+
children: createPortal(children, document.body, name)
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
export const Portal = Platform.select({
|
|
109
|
+
default: NativePortal,
|
|
110
|
+
web: WebPortal
|
|
111
|
+
});
|
|
112
|
+
//# sourceMappingURL=portal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useEffect","useState","useSyncExternalStore","Platform","View","DEFAULT_PORTAL_HOST","jsx","_jsx","Fragment","_Fragment","store","map","Map","set","listeners","Set","emit","cb","getSnapshot","subscribe","add","delete","updatePortal","hostName","name","children","next","portal","get","removePortal","NativePortalHost","container","portalMap","size","Container","select","default","props","style","position","top","left","right","bottom","elevation","zIndex","pointerEvents","ios","android","Array","from","values","WebPortalHost","PortalHost","web","NativePortal","WebPortal","document","getElementById","createElement","id","body","appendChild","createPortal","require","Portal"],"sourceRoot":"../../../../src","sources":["primitives/portal/portal.tsx"],"mappings":";;AAAA,SAASA,SAAS,EAAEC,QAAQ,EAAEC,oBAAoB,QAAQ,OAAO;AACjE,SAASC,QAAQ,EAAEC,IAAI,QAAQ,cAAc;AAC7C,SAASC,mBAAmB,QAAgD,uBAAoB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,QAAA,IAAAC,SAAA;AAUjG,MAAMC,KAAkB,GAAG;EACzBC,GAAG,EAAE,IAAIC,GAAG,CAAoB,CAAC,CAACC,GAAG,CAACR,mBAAmB,EAAE,IAAIO,GAAG,CAA0B,CAAC,CAAC;EAC9FE,SAAS,EAAE,IAAIC,GAAG,CAAC;AACrB,CAAC;AAED,SAASC,IAAIA,CAAA,EAAG;EACd,KAAK,MAAMC,EAAE,IAAIP,KAAK,CAACI,SAAS,EAAEG,EAAE,CAAC,CAAC;AACxC;AAEA,SAASC,WAAWA,CAAA,EAAG;EACrB,OAAOR,KAAK,CAACC,GAAG;AAClB;AAEA,SAASQ,SAASA,CAACF,EAAc,EAAE;EACjCP,KAAK,CAACI,SAAS,CAACM,GAAG,CAACH,EAAE,CAAC;EACvB,OAAO,MAAM;IACXP,KAAK,CAACI,SAAS,CAACO,MAAM,CAACJ,EAAE,CAAC;EAC5B,CAAC;AACH;AAEA,SAASK,YAAYA,CAACC,QAAgB,EAAEC,IAAY,EAAEC,QAAyB,EAAE;EAC/E,MAAMC,IAAI,GAAG,IAAId,GAAG,CAACF,KAAK,CAACC,GAAG,CAAC;EAC/B,MAAMgB,MAAM,GAAGD,IAAI,CAACE,GAAG,CAACL,QAAQ,CAAC,IAAI,IAAIX,GAAG,CAA0B,CAAC;EACvEe,MAAM,CAACd,GAAG,CAACW,IAAI,EAAEC,QAAQ,CAAC;EAC1BC,IAAI,CAACb,GAAG,CAACU,QAAQ,EAAEI,MAAM,CAAC;EAC1BjB,KAAK,CAACC,GAAG,GAAGe,IAAI;EAChBV,IAAI,CAAC,CAAC;AACR;AAEA,SAASa,YAAYA,CAACN,QAAgB,EAAEC,IAAY,EAAE;EACpD,MAAME,IAAI,GAAG,IAAId,GAAG,CAACF,KAAK,CAACC,GAAG,CAAC;EAC/B,MAAMgB,MAAM,GAAGD,IAAI,CAACE,GAAG,CAACL,QAAQ,CAAC,IAAI,IAAIX,GAAG,CAA0B,CAAC;EACvEe,MAAM,CAACN,MAAM,CAACG,IAAI,CAAC;EACnBE,IAAI,CAACb,GAAG,CAACU,QAAQ,EAAEI,MAAM,CAAC;EAC1BjB,KAAK,CAACC,GAAG,GAAGe,IAAI;EAChBV,IAAI,CAAC,CAAC;AACR;AAEA,SAASc,gBAAgBA,CAAC;EAAEN,IAAI,GAAGnB,mBAAmB;EAAE0B;AAA2B,CAAC,EAAE;EACpF,MAAMpB,GAAG,GAAGT,oBAAoB,CAACiB,SAAS,EAAED,WAAW,EAAEA,WAAW,CAAC;EACrE,MAAMc,SAAS,GAAGrB,GAAG,CAACiB,GAAG,CAACJ,IAAI,CAAC,IAAI,IAAIZ,GAAG,CAA0B,CAAC;EACrE,IAAIoB,SAAS,CAACC,IAAI,KAAK,CAAC,EAAE,OAAO,IAAI;EAErC,MAAMC,SAAS,GAAG/B,QAAQ,CAACgC,MAAM,CAAC;IAChCC,OAAO,EAAGC,KAA8B,iBACtC9B,IAAA,CAACH,IAAI;MAAA,GACCiC,KAAK;MACTC,KAAK,EAAE;QACLC,QAAQ,EAAE,UAAU;QACpBC,GAAG,EAAE,CAAC;QACNC,IAAI,EAAE,CAAC;QACPC,KAAK,EAAE,CAAC;QACRC,MAAM,EAAE,CAAC;QACTC,SAAS,EAAE,GAAG;QACdC,MAAM,EAAE,GAAG;QACXC,aAAa,EAAE;MACjB;IAAE,CACH,CACF;IACDC,GAAG,EAAEhB,SAAS,EAAEgB,GAAG;IACnBC,OAAO,EAAEjB,SAAS,EAAEiB;EACtB,CAAC,CAAC;EAEF,oBAAOzC,IAAA,CAAC2B,SAAS;IAAAT,QAAA,EAAEwB,KAAK,CAACC,IAAI,CAAClB,SAAS,CAACmB,MAAM,CAAC,CAAC;EAAC,CAAY,CAAC;AAChE;AAEA,SAASC,aAAaA,CAAA,EAAG;EACvB,oBAAO7C,IAAA,CAAAE,SAAA,IAAI,CAAC;AACd;AAEA,OAAO,MAAM4C,UAAU,GAAGlD,QAAQ,CAACgC,MAAM,CAAC;EACxCC,OAAO,EAAEN,gBAAgB;EACzBwB,GAAG,EAAEF;AACP,CAAC,CAAC;AAEF,SAASG,YAAYA,CAAC;EAAE/B,IAAI;EAAED,QAAQ,GAAGlB,mBAAmB;EAAEoB;AAAsB,CAAC,EAAE;EACrFzB,SAAS,CAAC,MAAM;IACdsB,YAAY,CAACC,QAAQ,EAAEC,IAAI,EAAEC,QAAQ,CAAC;EACxC,CAAC,EAAE,CAACF,QAAQ,EAAEC,IAAI,EAAEC,QAAQ,CAAC,CAAC;EAE9BzB,SAAS,CAAC,MAAM;IACd,OAAO,MAAM;MACX6B,YAAY,CAACN,QAAQ,EAAEC,IAAI,CAAC;IAC9B,CAAC;EACH,CAAC,EAAE,CAACD,QAAQ,EAAEC,IAAI,CAAC,CAAC;EAEpB,oBAAOjB,IAAA,CAAAE,SAAA,IAAI,CAAC;AACd;AAEA,SAAS+C,SAASA,CAAC;EAAEhC,IAAI;EAAED,QAAQ,GAAGlB,mBAAmB;EAAEoB;AAAsB,CAAC,EAAE;EAClF,MAAM,EAAE,GAAGxB,QAAQ,CAAC,MAAM;IACxB,IAAI8B,SAAS,GAAG0B,QAAQ,CAACC,cAAc,CAACnC,QAAQ,CAAC;IAEjD,IAAI,CAACQ,SAAS,EAAE;MACdA,SAAS,GAAG0B,QAAQ,CAACE,aAAa,CAAC,KAAK,CAAC;MACzC5B,SAAS,CAAC6B,EAAE,GAAGrC,QAAQ;MACvBkC,QAAQ,CAACI,IAAI,CAACC,WAAW,CAAC/B,SAAS,CAAC;IACtC;IACA,OAAOA,SAAS;EAClB,CAAC,CAAC;EAEF,MAAMgC,YAAY,GAAGC,OAAO,CAAC,WAAW,CAAC,CAACD,YAAuD;EAEjG,oBAAOxD,IAAA,CAAAE,SAAA;IAAAgB,QAAA,EAAGsC,YAAY,CAACtC,QAAQ,EAAEgC,QAAQ,CAACI,IAAI,EAAErC,IAAI;EAAC,CAAG,CAAC;AAC3D;AAEA,OAAO,MAAMyC,MAAM,GAAG9D,QAAQ,CAACgC,MAAM,CAAC;EACpCC,OAAO,EAAEmB,YAAY;EACrBD,GAAG,EAAEE;AACP,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { createContext, useContext } from "react";
|
|
4
|
+
export const SelectContext = /*#__PURE__*/createContext(undefined);
|
|
5
|
+
export const useSelect = () => {
|
|
6
|
+
const context = useContext(SelectContext);
|
|
7
|
+
if (!context) {
|
|
8
|
+
throw new Error("useSelect must be used within a SelectProvider");
|
|
9
|
+
}
|
|
10
|
+
return context;
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createContext","useContext","SelectContext","undefined","useSelect","context","Error"],"sourceRoot":"../../../../src","sources":["primitives/select/context.ts"],"mappings":";;AAAA,SAASA,aAAa,EAAiBC,UAAU,QAAQ,OAAO;AAsBhE,OAAO,MAAMC,aAAa,gBAAGF,aAAa,CAA4BG,SAAS,CAAC;AAEhF,OAAO,MAAMC,SAAS,GAAGA,CAAA,KAAM;EAC7B,MAAMC,OAAO,GAAGJ,UAAU,CAACC,aAAa,CAAC;EACzC,IAAI,CAACG,OAAO,EAAE;IACZ,MAAM,IAAIC,KAAK,CAAC,gDAAgD,CAAC;EACnE;EACA,OAAOD,OAAO;AAChB,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { SelectRoot } from "./select-root.js";
|
|
4
|
+
import { SelectTrigger } from "./select-trigger.js";
|
|
5
|
+
import { SelectValue } from "./select-value.js";
|
|
6
|
+
import { SelectPortal } from "./select-portal.js";
|
|
7
|
+
import { SelectOverlay } from "./select-overlay.js";
|
|
8
|
+
import { SelectContent } from "./select-content.js";
|
|
9
|
+
import { SelectOption } from "./select-option.js";
|
|
10
|
+
export const SelectPrimitive = {
|
|
11
|
+
Root: SelectRoot,
|
|
12
|
+
Trigger: SelectTrigger,
|
|
13
|
+
Value: SelectValue,
|
|
14
|
+
Portal: SelectPortal,
|
|
15
|
+
Overlay: SelectOverlay,
|
|
16
|
+
Content: SelectContent,
|
|
17
|
+
Option: SelectOption
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["SelectRoot","SelectTrigger","SelectValue","SelectPortal","SelectOverlay","SelectContent","SelectOption","SelectPrimitive","Root","Trigger","Value","Portal","Overlay","Content","Option"],"sourceRoot":"../../../../src","sources":["primitives/select/index.ts"],"mappings":";;AAAA,SAASA,UAAU,QAAQ,kBAAe;AAC1C,SAASC,aAAa,QAAQ,qBAAkB;AAChD,SAASC,WAAW,QAAQ,mBAAgB;AAC5C,SAASC,YAAY,QAAQ,oBAAiB;AAC9C,SAASC,aAAa,QAAQ,qBAAkB;AAChD,SAASC,aAAa,QAAQ,qBAAkB;AAChD,SAASC,YAAY,QAAQ,oBAAiB;AAE9C,OAAO,MAAMC,eAAe,GAAG;EAC7BC,IAAI,EAAER,UAAU;EAChBS,OAAO,EAAER,aAAa;EACtBS,KAAK,EAAER,WAAW;EAClBS,MAAM,EAAER,YAAY;EACpBS,OAAO,EAAER,aAAa;EACtBS,OAAO,EAAER,aAAa;EACtBS,MAAM,EAAER;AACV,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { calculateComposedStyles } from "@/utils/calculate-styles";
|
|
4
|
+
import React from "react";
|
|
5
|
+
import { View } from "react-native";
|
|
6
|
+
import { useSelect } from "./context.js";
|
|
7
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
+
export function SelectContent(props) {
|
|
9
|
+
const select = useSelect();
|
|
10
|
+
const composedStyles = calculateComposedStyles(select.styles, select.state, "content", props.style);
|
|
11
|
+
const Component = props.render ?? View;
|
|
12
|
+
return /*#__PURE__*/_jsx(Component, {
|
|
13
|
+
style: [composedStyles, {
|
|
14
|
+
position: "absolute",
|
|
15
|
+
top: select.triggerLayout?.y + select.triggerLayout?.height,
|
|
16
|
+
left: select.triggerLayout?.x,
|
|
17
|
+
width: select.triggerLayout?.width
|
|
18
|
+
}],
|
|
19
|
+
children: props.children
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=select-content.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["calculateComposedStyles","React","View","useSelect","jsx","_jsx","SelectContent","props","select","composedStyles","styles","state","style","Component","render","position","top","triggerLayout","y","height","left","x","width","children"],"sourceRoot":"../../../../src","sources":["primitives/select/select-content.tsx"],"mappings":";;AAAA,SAASA,uBAAuB,QAAQ,0BAA0B;AAClE,OAAOC,KAAK,MAAM,OAAO;AACzB,SAAyBC,IAAI,QAAwB,cAAc;AACnE,SAASC,SAAS,QAAQ,cAAW;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAUtC,OAAO,SAASC,aAAaA,CAACC,KAAyB,EAAE;EACvD,MAAMC,MAAM,GAAGL,SAAS,CAAC,CAAC;EAC1B,MAAMM,cAAc,GAAGT,uBAAuB,CAACQ,MAAM,CAACE,MAAM,EAAEF,MAAM,CAACG,KAAK,EAAE,SAAS,EAAEJ,KAAK,CAACK,KAAK,CAAC;EAEnG,MAAMC,SAAS,GAAGN,KAAK,CAACO,MAAM,IAAIZ,IAAI;EACtC,oBACEG,IAAA,CAACQ,SAAS;IACRD,KAAK,EAAE,CACLH,cAAc,EACd;MACEM,QAAQ,EAAE,UAAU;MACpBC,GAAG,EAAER,MAAM,CAACS,aAAa,EAAEC,CAAC,GAAIV,MAAM,CAACS,aAAa,EAAEE,MAAO;MAC7DC,IAAI,EAAEZ,MAAM,CAACS,aAAa,EAAEI,CAAE;MAC9BC,KAAK,EAAEd,MAAM,CAACS,aAAa,EAAEK;IAC/B,CAAC,CACD;IAAAC,QAAA,EAEDhB,KAAK,CAACgB;EAAQ,CACN,CAAC;AAEhB","ignoreList":[]}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { calculateComposedStyles } from "@/utils/calculate-styles";
|
|
4
|
+
import { useEffect, useState } from "react";
|
|
5
|
+
import { Text } from "react-native";
|
|
6
|
+
import { useSelect } from "./context.js";
|
|
7
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
+
const calculateState = (selectState, hovered, selected) => {
|
|
9
|
+
if (selectState === "disabled") {
|
|
10
|
+
return "disabled";
|
|
11
|
+
}
|
|
12
|
+
if (selected) {
|
|
13
|
+
return "selected";
|
|
14
|
+
}
|
|
15
|
+
if (hovered) {
|
|
16
|
+
return "hovered";
|
|
17
|
+
}
|
|
18
|
+
return "default";
|
|
19
|
+
};
|
|
20
|
+
export function SelectOption(props) {
|
|
21
|
+
const [isHovered, setIsHovered] = useState(false);
|
|
22
|
+
const select = useSelect();
|
|
23
|
+
const isSelected = select.value === props.value;
|
|
24
|
+
const optionState = calculateState(select.state, isHovered, isSelected);
|
|
25
|
+
const composedStyles = calculateComposedStyles(select.styles, optionState, "option", props.style);
|
|
26
|
+
useEffect(() => {
|
|
27
|
+
select.setOptions(prev => {
|
|
28
|
+
if (prev.find(option => option.value === props.value)) {
|
|
29
|
+
return prev;
|
|
30
|
+
}
|
|
31
|
+
return [...prev, {
|
|
32
|
+
value: props.value,
|
|
33
|
+
label: props.children
|
|
34
|
+
}];
|
|
35
|
+
});
|
|
36
|
+
}, [props.value, props.children]);
|
|
37
|
+
const Component = props.render ?? Text;
|
|
38
|
+
return /*#__PURE__*/_jsx(Component, {
|
|
39
|
+
value: props.value,
|
|
40
|
+
onPress: () => {
|
|
41
|
+
select.onChange?.(props.value);
|
|
42
|
+
select.setIsOpen(false);
|
|
43
|
+
},
|
|
44
|
+
onMouseEnter: () => setIsHovered(true),
|
|
45
|
+
onMouseLeave: () => setIsHovered(false),
|
|
46
|
+
style: composedStyles,
|
|
47
|
+
children: props.children
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=select-option.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["calculateComposedStyles","useEffect","useState","Text","useSelect","jsx","_jsx","calculateState","selectState","hovered","selected","SelectOption","props","isHovered","setIsHovered","select","isSelected","value","optionState","state","composedStyles","styles","style","setOptions","prev","find","option","label","children","Component","render","onPress","onChange","setIsOpen","onMouseEnter","onMouseLeave"],"sourceRoot":"../../../../src","sources":["primitives/select/select-option.tsx"],"mappings":";;AAAA,SAASA,uBAAuB,QAAQ,0BAA0B;AAClE,SAASC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAC3C,SAAyBC,IAAI,QAAwB,cAAc;AACnE,SAASC,SAAS,QAAQ,cAAW;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAetC,MAAMC,cAAc,GAAGA,CAACC,WAAwB,EAAEC,OAAgB,EAAEC,QAAiB,KAAwB;EAC3G,IAAIF,WAAW,KAAK,UAAU,EAAE;IAC9B,OAAO,UAAU;EACnB;EACA,IAAIE,QAAQ,EAAE;IACZ,OAAO,UAAU;EACnB;EACA,IAAID,OAAO,EAAE;IACX,OAAO,SAAS;EAClB;EACA,OAAO,SAAS;AAClB,CAAC;AAED,OAAO,SAASE,YAAYA,CAACC,KAAwB,EAAE;EACrD,MAAM,CAACC,SAAS,EAAEC,YAAY,CAAC,GAAGZ,QAAQ,CAAC,KAAK,CAAC;EACjD,MAAMa,MAAM,GAAGX,SAAS,CAAC,CAAC;EAC1B,MAAMY,UAAU,GAAGD,MAAM,CAACE,KAAK,KAAKL,KAAK,CAACK,KAAK;EAE/C,MAAMC,WAAW,GAAGX,cAAc,CAACQ,MAAM,CAACI,KAAK,EAAEN,SAAS,EAAEG,UAAU,CAAC;EACvE,MAAMI,cAAc,GAAGpB,uBAAuB,CAACe,MAAM,CAACM,MAAM,EAAEH,WAAW,EAAE,QAAQ,EAAEN,KAAK,CAACU,KAAK,CAAC;EAEjGrB,SAAS,CAAC,MAAM;IACdc,MAAM,CAACQ,UAAU,CAAEC,IAAI,IAAK;MAC1B,IAAIA,IAAI,CAACC,IAAI,CAAEC,MAAM,IAAKA,MAAM,CAACT,KAAK,KAAKL,KAAK,CAACK,KAAK,CAAC,EAAE;QACvD,OAAOO,IAAI;MACb;MACA,OAAO,CAAC,GAAGA,IAAI,EAAE;QAAEP,KAAK,EAAEL,KAAK,CAACK,KAAK;QAAEU,KAAK,EAAEf,KAAK,CAACgB;MAAS,CAAC,CAAC;IACjE,CAAC,CAAC;EACJ,CAAC,EAAE,CAAChB,KAAK,CAACK,KAAK,EAAEL,KAAK,CAACgB,QAAQ,CAAC,CAAC;EAEjC,MAAMC,SAAS,GAAGjB,KAAK,CAACkB,MAAM,IAAI3B,IAAI;EACtC,oBACEG,IAAA,CAACuB,SAAS;IACRZ,KAAK,EAAEL,KAAK,CAACK,KAAM;IACnBc,OAAO,EAAEA,CAAA,KAAM;MACbhB,MAAM,CAACiB,QAAQ,GAAGpB,KAAK,CAACK,KAAK,CAAC;MAC9BF,MAAM,CAACkB,SAAS,CAAC,KAAK,CAAC;IACzB,CAAE;IACFC,YAAY,EAAEA,CAAA,KAAMpB,YAAY,CAAC,IAAI,CAAE;IACvCqB,YAAY,EAAEA,CAAA,KAAMrB,YAAY,CAAC,KAAK,CAAE;IACxCQ,KAAK,EAAEF,cAAe;IAAAQ,QAAA,EAErBhB,KAAK,CAACgB;EAAQ,CACN,CAAC;AAEhB","ignoreList":[]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { calculateComposedStyles } from "@/utils/calculate-styles";
|
|
4
|
+
import React from "react";
|
|
5
|
+
import { Pressable, StyleSheet } from "react-native";
|
|
6
|
+
import { useSelect } from "./context.js";
|
|
7
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
+
export function SelectOverlay(props) {
|
|
9
|
+
const select = useSelect();
|
|
10
|
+
const composedStyles = calculateComposedStyles(select.styles, select.state, "overlay", props.style);
|
|
11
|
+
const Component = props.render ?? Pressable;
|
|
12
|
+
return /*#__PURE__*/_jsx(Component, {
|
|
13
|
+
onPress: () => {
|
|
14
|
+
select.setIsOpen(false);
|
|
15
|
+
},
|
|
16
|
+
style: [StyleSheet.absoluteFill, composedStyles],
|
|
17
|
+
children: props.children
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=select-overlay.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["calculateComposedStyles","React","Pressable","StyleSheet","useSelect","jsx","_jsx","SelectOverlay","props","select","composedStyles","styles","state","style","Component","render","onPress","setIsOpen","absoluteFill","children"],"sourceRoot":"../../../../src","sources":["primitives/select/select-overlay.tsx"],"mappings":";;AAAA,SAASA,uBAAuB,QAAQ,0BAA0B;AAClE,OAAOC,KAAK,MAAM,OAAO;AACzB,SAASC,SAAS,EAAkBC,UAAU,QAAwB,cAAc;AACpF,SAASC,SAAS,QAAQ,cAAW;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAYtC,OAAO,SAASC,aAAaA,CAACC,KAAyB,EAAE;EACvD,MAAMC,MAAM,GAAGL,SAAS,CAAC,CAAC;EAE1B,MAAMM,cAAc,GAAGV,uBAAuB,CAACS,MAAM,CAACE,MAAM,EAAEF,MAAM,CAACG,KAAK,EAAE,SAAS,EAAEJ,KAAK,CAACK,KAAK,CAAC;EAEnG,MAAMC,SAAS,GAAGN,KAAK,CAACO,MAAM,IAAIb,SAAS;EAC3C,oBACEI,IAAA,CAACQ,SAAS;IACRE,OAAO,EAAEA,CAAA,KAAM;MACbP,MAAM,CAACQ,SAAS,CAAC,KAAK,CAAC;IACzB,CAAE;IACFJ,KAAK,EAAE,CAACV,UAAU,CAACe,YAAY,EAAER,cAAc,CAAE;IAAAS,QAAA,EAEhDX,KAAK,CAACW;EAAQ,CACN,CAAC;AAEhB","ignoreList":[]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React, { useEffect } from "react";
|
|
4
|
+
import { Portal } from "../portal/index.js";
|
|
5
|
+
import { useSelect, SelectContext } from "./context.js";
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
export function SelectPortal(props) {
|
|
8
|
+
const select = useSelect();
|
|
9
|
+
useEffect(() => {
|
|
10
|
+
return () => {
|
|
11
|
+
select.setOptions([]);
|
|
12
|
+
};
|
|
13
|
+
}, []);
|
|
14
|
+
if (!select.isOpen) {
|
|
15
|
+
return null;
|
|
16
|
+
}
|
|
17
|
+
return /*#__PURE__*/_jsx(Portal, {
|
|
18
|
+
name: "select-portal",
|
|
19
|
+
children: /*#__PURE__*/_jsx(SelectContext.Provider, {
|
|
20
|
+
value: select,
|
|
21
|
+
children: props.children
|
|
22
|
+
})
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=select-portal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useEffect","Portal","useSelect","SelectContext","jsx","_jsx","SelectPortal","props","select","setOptions","isOpen","name","children","Provider","value"],"sourceRoot":"../../../../src","sources":["primitives/select/select-portal.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,SAAS,QAAQ,OAAO;AACxC,SAASC,MAAM,QAAQ,oBAAW;AAClC,SAASC,SAAS,EAAEC,aAAa,QAAQ,cAAW;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAMrD,OAAO,SAASC,YAAYA,CAACC,KAAwB,EAAE;EACrD,MAAMC,MAAM,GAAGN,SAAS,CAAC,CAAC;EAE1BF,SAAS,CAAC,MAAM;IACd,OAAO,MAAM;MACXQ,MAAM,CAACC,UAAU,CAAC,EAAE,CAAC;IACvB,CAAC;EACH,CAAC,EAAE,EAAE,CAAC;EAEN,IAAI,CAACD,MAAM,CAACE,MAAM,EAAE;IAClB,OAAO,IAAI;EACb;EAEA,oBACEL,IAAA,CAACJ,MAAM;IAACU,IAAI,EAAC,eAAe;IAAAC,QAAA,eAC1BP,IAAA,CAACF,aAAa,CAACU,QAAQ;MAACC,KAAK,EAAEN,MAAO;MAAAI,QAAA,EAAEL,KAAK,CAACK;IAAQ,CAAyB;EAAC,CAC1E,CAAC;AAEb","ignoreList":[]}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { calculateComposedStyles } from "@/utils/calculate-styles";
|
|
4
|
+
import React, { useState } from "react";
|
|
5
|
+
import { View } from "react-native";
|
|
6
|
+
import { SelectContext } from "./context.js";
|
|
7
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
+
const calculateState = props => {
|
|
9
|
+
if (props.isDisabled) {
|
|
10
|
+
return "disabled";
|
|
11
|
+
}
|
|
12
|
+
return "default";
|
|
13
|
+
};
|
|
14
|
+
export function SelectRoot(props) {
|
|
15
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
16
|
+
const [triggerLayout, setTriggerLayout] = useState(null);
|
|
17
|
+
const [options, setOptions] = useState([]);
|
|
18
|
+
const state = calculateState(props);
|
|
19
|
+
const composedStyles = calculateComposedStyles(props.styles, state, "root", props.style);
|
|
20
|
+
const Component = props.render ?? View;
|
|
21
|
+
return /*#__PURE__*/_jsx(SelectContext.Provider, {
|
|
22
|
+
value: {
|
|
23
|
+
value: props.value,
|
|
24
|
+
onChange: props.onChange,
|
|
25
|
+
placeholder: props.placeholder,
|
|
26
|
+
isOpen,
|
|
27
|
+
setIsOpen,
|
|
28
|
+
triggerLayout,
|
|
29
|
+
setTriggerLayout,
|
|
30
|
+
options,
|
|
31
|
+
setOptions,
|
|
32
|
+
state,
|
|
33
|
+
isDisabled: props.isDisabled ?? false,
|
|
34
|
+
styles: props.styles ?? null
|
|
35
|
+
},
|
|
36
|
+
children: /*#__PURE__*/_jsx(Component, {
|
|
37
|
+
style: composedStyles,
|
|
38
|
+
children: props.children
|
|
39
|
+
})
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=select-root.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["calculateComposedStyles","React","useState","View","SelectContext","jsx","_jsx","calculateState","props","isDisabled","SelectRoot","isOpen","setIsOpen","triggerLayout","setTriggerLayout","options","setOptions","state","composedStyles","styles","style","Component","render","Provider","value","onChange","placeholder","children"],"sourceRoot":"../../../../src","sources":["primitives/select/select-root.tsx"],"mappings":";;AAAA,SAASA,uBAAuB,QAAQ,0BAA0B;AAClE,OAAOC,KAAK,IAAIC,QAAQ,QAAQ,OAAO;AACvC,SAA+CC,IAAI,QAAwB,cAAc;AACzF,SAASC,aAAa,QAAQ,cAAW;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAwB1C,MAAMC,cAAc,GAAIC,KAAsB,IAAkB;EAC9D,IAAIA,KAAK,CAACC,UAAU,EAAE;IACpB,OAAO,UAAU;EACnB;EACA,OAAO,SAAS;AAClB,CAAC;AAED,OAAO,SAASC,UAAUA,CAACF,KAAsB,EAAE;EACjD,MAAM,CAACG,MAAM,EAAEC,SAAS,CAAC,GAAGV,QAAQ,CAAC,KAAK,CAAC;EAC3C,MAAM,CAACW,aAAa,EAAEC,gBAAgB,CAAC,GAAGZ,QAAQ,CAAyB,IAAI,CAAC;EAChF,MAAM,CAACa,OAAO,EAAEC,UAAU,CAAC,GAAGd,QAAQ,CAAsB,EAAE,CAAC;EAE/D,MAAMe,KAAK,GAAGV,cAAc,CAACC,KAAK,CAAC;EACnC,MAAMU,cAAc,GAAGlB,uBAAuB,CAACQ,KAAK,CAACW,MAAM,EAAEF,KAAK,EAAE,MAAM,EAAET,KAAK,CAACY,KAAK,CAAC;EAExF,MAAMC,SAAS,GAAGb,KAAK,CAACc,MAAM,IAAInB,IAAI;EACtC,oBACEG,IAAA,CAACF,aAAa,CAACmB,QAAQ;IACrBC,KAAK,EAAE;MACLA,KAAK,EAAEhB,KAAK,CAACgB,KAAK;MAClBC,QAAQ,EAAEjB,KAAK,CAACiB,QAAQ;MACxBC,WAAW,EAAElB,KAAK,CAACkB,WAAW;MAC9Bf,MAAM;MACNC,SAAS;MACTC,aAAa;MACbC,gBAAgB;MAChBC,OAAO;MACPC,UAAU;MACVC,KAAK;MACLR,UAAU,EAAED,KAAK,CAACC,UAAU,IAAI,KAAK;MACrCU,MAAM,EAAEX,KAAK,CAACW,MAAM,IAAI;IAC1B,CAAE;IAAAQ,QAAA,eAEFrB,IAAA,CAACe,SAAS;MAACD,KAAK,EAAEF,cAAe;MAAAS,QAAA,EAAEnB,KAAK,CAACmB;IAAQ,CAAY;EAAC,CACxC,CAAC;AAE7B","ignoreList":[]}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { calculateComposedStyles } from "@/utils/calculate-styles";
|
|
4
|
+
import { normalizeLayout } from "@/utils/normalize-layout";
|
|
5
|
+
import React from "react";
|
|
6
|
+
import { Pressable } from "react-native";
|
|
7
|
+
import { useSelect } from "./context.js";
|
|
8
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
|
+
export function SelectTrigger(props) {
|
|
10
|
+
const select = useSelect();
|
|
11
|
+
const composedStyles = calculateComposedStyles(select.styles, select.state, "trigger", props.style);
|
|
12
|
+
const Component = props.render ?? Pressable;
|
|
13
|
+
return /*#__PURE__*/_jsx(Component, {
|
|
14
|
+
onPress: () => {
|
|
15
|
+
select.setIsOpen(prev => !prev);
|
|
16
|
+
},
|
|
17
|
+
onLayout: e => {
|
|
18
|
+
const layout = normalizeLayout(e.nativeEvent.layout);
|
|
19
|
+
select.setTriggerLayout(layout);
|
|
20
|
+
},
|
|
21
|
+
disabled: select.isDisabled,
|
|
22
|
+
style: composedStyles,
|
|
23
|
+
children: props.children
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=select-trigger.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["calculateComposedStyles","normalizeLayout","React","Pressable","useSelect","jsx","_jsx","SelectTrigger","props","select","composedStyles","styles","state","style","Component","render","onPress","setIsOpen","prev","onLayout","e","layout","nativeEvent","setTriggerLayout","disabled","isDisabled","children"],"sourceRoot":"../../../../src","sources":["primitives/select/select-trigger.tsx"],"mappings":";;AAAA,SAASA,uBAAuB,QAAQ,0BAA0B;AAClE,SAASC,eAAe,QAAQ,0BAA0B;AAC1D,OAAOC,KAAK,MAAM,OAAO;AACzB,SAASC,SAAS,QAAwC,cAAc;AACxE,SAASC,SAAS,QAAQ,cAAW;AAAC,SAAAC,GAAA,IAAAC,IAAA;AActC,OAAO,SAASC,aAAaA,CAACC,KAAyB,EAAE;EACvD,MAAMC,MAAM,GAAGL,SAAS,CAAC,CAAC;EAC1B,MAAMM,cAAc,GAAGV,uBAAuB,CAACS,MAAM,CAACE,MAAM,EAAEF,MAAM,CAACG,KAAK,EAAE,SAAS,EAAEJ,KAAK,CAACK,KAAK,CAAC;EACnG,MAAMC,SAAS,GAAGN,KAAK,CAACO,MAAM,IAAIZ,SAAS;EAC3C,oBACEG,IAAA,CAACQ,SAAS;IACRE,OAAO,EAAEA,CAAA,KAAM;MACbP,MAAM,CAACQ,SAAS,CAAEC,IAAI,IAAK,CAACA,IAAI,CAAC;IACnC,CAAE;IACFC,QAAQ,EAAGC,CAAC,IAAK;MACf,MAAMC,MAAM,GAAGpB,eAAe,CAACmB,CAAC,CAACE,WAAW,CAACD,MAAM,CAAC;MACpDZ,MAAM,CAACc,gBAAgB,CAACF,MAAM,CAAC;IACjC,CAAE;IACFG,QAAQ,EAAEf,MAAM,CAACgB,UAAW;IAC5BZ,KAAK,EAAEH,cAAe;IAAAgB,QAAA,EAErBlB,KAAK,CAACkB;EAAQ,CACN,CAAC;AAEhB","ignoreList":[]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { calculateComposedStyles } from "@/utils/calculate-styles";
|
|
4
|
+
import React from "react";
|
|
5
|
+
import { Text } from "react-native";
|
|
6
|
+
import { useSelect } from "./context.js";
|
|
7
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
+
export function SelectValue(props) {
|
|
9
|
+
const select = useSelect();
|
|
10
|
+
const selectedOption = select.options.find(option => option.value === select.value);
|
|
11
|
+
const selectedOptionLabel = selectedOption?.label;
|
|
12
|
+
const composedStyles = calculateComposedStyles(select.styles, select.state, selectedOptionLabel ? "value" : "placeholder", props.style);
|
|
13
|
+
const Component = props.render ?? Text;
|
|
14
|
+
return /*#__PURE__*/_jsx(Component, {
|
|
15
|
+
style: composedStyles,
|
|
16
|
+
children: selectedOption?.label ?? select.placeholder
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=select-value.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["calculateComposedStyles","React","Text","useSelect","jsx","_jsx","SelectValue","props","select","selectedOption","options","find","option","value","selectedOptionLabel","label","composedStyles","styles","state","style","Component","render","children","placeholder"],"sourceRoot":"../../../../src","sources":["primitives/select/select-value.tsx"],"mappings":";;AAAA,SAASA,uBAAuB,QAAQ,0BAA0B;AAClE,OAAOC,KAAK,MAAM,OAAO;AACzB,SAAyBC,IAAI,QAAwB,cAAc;AACnE,SAASC,SAAS,QAAQ,cAAW;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAQtC,OAAO,SAASC,WAAWA,CAACC,KAAuB,EAAE;EACnD,MAAMC,MAAM,GAAGL,SAAS,CAAC,CAAC;EAE1B,MAAMM,cAAc,GAAGD,MAAM,CAACE,OAAO,CAACC,IAAI,CAAEC,MAAM,IAAKA,MAAM,CAACC,KAAK,KAAKL,MAAM,CAACK,KAAK,CAAC;EACrF,MAAMC,mBAAmB,GAAGL,cAAc,EAAEM,KAAK;EAEjD,MAAMC,cAAc,GAAGhB,uBAAuB,CAACQ,MAAM,CAACS,MAAM,EAAET,MAAM,CAACU,KAAK,EAAEJ,mBAAmB,GAAG,OAAO,GAAG,aAAa,EAAEP,KAAK,CAACY,KAAK,CAAC;EACvI,MAAMC,SAAS,GAAGb,KAAK,CAACc,MAAM,IAAInB,IAAI;EACtC,oBAAOG,IAAA,CAACe,SAAS;IAACD,KAAK,EAAEH,cAAe;IAAAM,QAAA,EAAEb,cAAc,EAAEM,KAAK,IAAIP,MAAM,CAACe;EAAW,CAAY,CAAC;AACpG","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["primitives/select/types.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["primitives/textarea/index.ts"],"mappings":";;AAAA,cAAc,eAAY","ignoreList":[]}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { useState } from "react";
|
|
4
|
+
import { TextInput } from "react-native";
|
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
+
const calculateState = (props, isFocused) => {
|
|
7
|
+
if (props.isDisabled) {
|
|
8
|
+
return "disabled";
|
|
9
|
+
}
|
|
10
|
+
if (isFocused) {
|
|
11
|
+
return "focused";
|
|
12
|
+
}
|
|
13
|
+
return "default";
|
|
14
|
+
};
|
|
15
|
+
export function TextareaPrimitive(props) {
|
|
16
|
+
const [isFocused, setIsFocused] = useState(false);
|
|
17
|
+
const state = calculateState(props, isFocused);
|
|
18
|
+
const composedStyles = [props.styles?.default?.style, props.styles?.[state]?.style, props.style];
|
|
19
|
+
const composedProps = {
|
|
20
|
+
...props.styles?.default,
|
|
21
|
+
...props.styles?.[state],
|
|
22
|
+
...props
|
|
23
|
+
};
|
|
24
|
+
const Component = props.render ?? TextInput;
|
|
25
|
+
return /*#__PURE__*/_jsx(Component, {
|
|
26
|
+
...composedProps,
|
|
27
|
+
multiline: true,
|
|
28
|
+
onChange: undefined,
|
|
29
|
+
onChangeText: props.onChange,
|
|
30
|
+
onFocus: e => {
|
|
31
|
+
setIsFocused(true);
|
|
32
|
+
props.onFocus?.(e);
|
|
33
|
+
},
|
|
34
|
+
onBlur: e => {
|
|
35
|
+
setIsFocused(false);
|
|
36
|
+
props.onBlur?.(e);
|
|
37
|
+
},
|
|
38
|
+
readOnly: props.isDisabled || props.readOnly,
|
|
39
|
+
style: composedStyles
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=textarea.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useState","TextInput","jsx","_jsx","calculateState","props","isFocused","isDisabled","TextareaPrimitive","setIsFocused","state","composedStyles","styles","default","style","composedProps","Component","render","multiline","onChange","undefined","onChangeText","onFocus","e","onBlur","readOnly"],"sourceRoot":"../../../../src","sources":["primitives/textarea/textarea.tsx"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,OAAO;AAChC,SAASC,SAAS,QAA6B,cAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAe9D,MAAMC,cAAc,GAAGA,CAACC,KAA6B,EAAEC,SAAkB,KAAoB;EAC3F,IAAID,KAAK,CAACE,UAAU,EAAE;IACpB,OAAO,UAAU;EACnB;EACA,IAAID,SAAS,EAAE;IACb,OAAO,SAAS;EAClB;EACA,OAAO,SAAS;AAClB,CAAC;AAED,OAAO,SAASE,iBAAiBA,CAACH,KAA6B,EAAE;EAC/D,MAAM,CAACC,SAAS,EAAEG,YAAY,CAAC,GAAGT,QAAQ,CAAC,KAAK,CAAC;EACjD,MAAMU,KAAK,GAAGN,cAAc,CAACC,KAAK,EAAEC,SAAS,CAAC;EAE9C,MAAMK,cAAc,GAAG,CAACN,KAAK,CAACO,MAAM,EAAEC,OAAO,EAAEC,KAAK,EAAET,KAAK,CAACO,MAAM,GAAGF,KAAK,CAAC,EAAEI,KAAK,EAAET,KAAK,CAACS,KAAK,CAAC;EAChG,MAAMC,aAAa,GAAG;IACpB,GAAGV,KAAK,CAACO,MAAM,EAAEC,OAAO;IACxB,GAAGR,KAAK,CAACO,MAAM,GAAGF,KAAK,CAAC;IACxB,GAAGL;EACL,CAAC;EACD,MAAMW,SAAS,GAAGX,KAAK,CAACY,MAAM,IAAIhB,SAAS;EAC3C,oBACEE,IAAA,CAACa,SAAS;IAAA,GACJD,aAAa;IACjBG,SAAS;IACTC,QAAQ,EAAEC,SAAU;IACpBC,YAAY,EAAEhB,KAAK,CAACc,QAAS;IAC7BG,OAAO,EAAGC,CAAC,IAAK;MACdd,YAAY,CAAC,IAAI,CAAC;MAClBJ,KAAK,CAACiB,OAAO,GAAGC,CAAC,CAAC;IACpB,CAAE;IACFC,MAAM,EAAGD,CAAC,IAAK;MACbd,YAAY,CAAC,KAAK,CAAC;MACnBJ,KAAK,CAACmB,MAAM,GAAGD,CAAC,CAAC;IACnB,CAAE;IACFE,QAAQ,EAAEpB,KAAK,CAACE,UAAU,IAAIF,KAAK,CAACoB,QAAS;IAC7CX,KAAK,EAAEH;EAAe,CACvB,CAAC;AAEN","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["primitives/textarea/types.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { createContext, useContext } from "react";
|
|
4
|
+
export const ToastContext = /*#__PURE__*/createContext(undefined);
|
|
5
|
+
export const useToast = () => {
|
|
6
|
+
const context = useContext(ToastContext);
|
|
7
|
+
if (!context) {
|
|
8
|
+
throw new Error("useToast must be used within a ToastProvider");
|
|
9
|
+
}
|
|
10
|
+
return context;
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createContext","useContext","ToastContext","undefined","useToast","context","Error"],"sourceRoot":"../../../../src","sources":["primitives/toast/context.ts"],"mappings":";;AAAA,SAASA,aAAa,EAAEC,UAAU,QAAQ,OAAO;AAOjD,OAAO,MAAMC,YAAY,gBAAGF,aAAa,CAA2BG,SAAS,CAAC;AAE9E,OAAO,MAAMC,QAAQ,GAAGA,CAAA,KAAM;EAC5B,MAAMC,OAAO,GAAGJ,UAAU,CAACC,YAAY,CAAC;EACxC,IAAI,CAACG,OAAO,EAAE;IACZ,MAAM,IAAIC,KAAK,CAAC,8CAA8C,CAAC;EACjE;EACA,OAAOD,OAAO;AAChB,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { ToastRoot } from "./toast-root.js";
|
|
4
|
+
import { ToastTitle } from "./toast-title.js";
|
|
5
|
+
import { ToastDescription } from "./toast-description.js";
|
|
6
|
+
export const ToastPrimitive = {
|
|
7
|
+
Root: ToastRoot,
|
|
8
|
+
Title: ToastTitle,
|
|
9
|
+
Description: ToastDescription
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["ToastRoot","ToastTitle","ToastDescription","ToastPrimitive","Root","Title","Description"],"sourceRoot":"../../../../src","sources":["primitives/toast/index.ts"],"mappings":";;AAAA,SAASA,SAAS,QAAQ,iBAAc;AACxC,SAASC,UAAU,QAAQ,kBAAe;AAC1C,SAASC,gBAAgB,QAAQ,wBAAqB;AAEtD,OAAO,MAAMC,cAAc,GAAG;EAC5BC,IAAI,EAAEJ,SAAS;EACfK,KAAK,EAAEJ,UAAU;EACjBK,WAAW,EAAEJ;AACf,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { Text } from "react-native";
|
|
5
|
+
import { useToast } from "./context.js";
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
export function ToastDescription(props) {
|
|
8
|
+
const toast = useToast();
|
|
9
|
+
const composedStyle = [toast.styles?.description, props.style];
|
|
10
|
+
const Component = props.render ?? Text;
|
|
11
|
+
return /*#__PURE__*/_jsx(Component, {
|
|
12
|
+
...props,
|
|
13
|
+
style: composedStyle
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=toast-description.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","Text","useToast","jsx","_jsx","ToastDescription","props","toast","composedStyle","styles","description","style","Component","render"],"sourceRoot":"../../../../src","sources":["primitives/toast/toast-description.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAyBC,IAAI,QAAwB,cAAc;AACnE,SAASC,QAAQ,QAAQ,cAAW;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAUrC,OAAO,SAASC,gBAAgBA,CAACC,KAA4B,EAAE;EAC7D,MAAMC,KAAK,GAAGL,QAAQ,CAAC,CAAC;EAExB,MAAMM,aAAa,GAAG,CAACD,KAAK,CAACE,MAAM,EAAEC,WAAW,EAAEJ,KAAK,CAACK,KAAK,CAAC;EAE9D,MAAMC,SAAS,GAAGN,KAAK,CAACO,MAAM,IAAIZ,IAAI;EACtC,oBAAOG,IAAA,CAACQ,SAAS;IAAA,GAAKN,KAAK;IAAEK,KAAK,EAAEH;EAAc,CAAE,CAAC;AACvD","ignoreList":[]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { View } from "react-native";
|
|
5
|
+
import { ToastContext } from "./context.js";
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
export function ToastRoot(props) {
|
|
8
|
+
const composedStyle = [props.styles?.root, props.style];
|
|
9
|
+
const Component = props.render ?? View;
|
|
10
|
+
return /*#__PURE__*/_jsx(ToastContext.Provider, {
|
|
11
|
+
value: {
|
|
12
|
+
styles: props.styles
|
|
13
|
+
},
|
|
14
|
+
children: /*#__PURE__*/_jsx(Component, {
|
|
15
|
+
...props,
|
|
16
|
+
style: composedStyle
|
|
17
|
+
})
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=toast-root.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","View","ToastContext","jsx","_jsx","ToastRoot","props","composedStyle","styles","root","style","Component","render","Provider","value","children"],"sourceRoot":"../../../../src","sources":["primitives/toast/toast-root.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAyBC,IAAI,QAAwB,cAAc;AACnE,SAASC,YAAY,QAAQ,cAAW;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAYzC,OAAO,SAASC,SAASA,CAACC,KAAqB,EAAE;EAC/C,MAAMC,aAAa,GAAG,CAACD,KAAK,CAACE,MAAM,EAAEC,IAAI,EAAEH,KAAK,CAACI,KAAK,CAAC;EAEvD,MAAMC,SAAS,GAAGL,KAAK,CAACM,MAAM,IAAIX,IAAI;EACtC,oBACEG,IAAA,CAACF,YAAY,CAACW,QAAQ;IACpBC,KAAK,EAAE;MACLN,MAAM,EAAEF,KAAK,CAACE;IAChB,CAAE;IAAAO,QAAA,eAEFX,IAAA,CAACO,SAAS;MAAA,GAAKL,KAAK;MAAEI,KAAK,EAAEH;IAAc,CAAE;EAAC,CACzB,CAAC;AAE5B","ignoreList":[]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { Text } from "react-native";
|
|
5
|
+
import { useToast } from "./context.js";
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
export function ToastTitle(props) {
|
|
8
|
+
const toast = useToast();
|
|
9
|
+
const composedStyle = [toast.styles?.title, props.style];
|
|
10
|
+
const Component = props.render ?? Text;
|
|
11
|
+
return /*#__PURE__*/_jsx(Component, {
|
|
12
|
+
...props,
|
|
13
|
+
style: composedStyle
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=toast-title.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","Text","useToast","jsx","_jsx","ToastTitle","props","toast","composedStyle","styles","title","style","Component","render"],"sourceRoot":"../../../../src","sources":["primitives/toast/toast-title.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAyBC,IAAI,QAAwB,cAAc;AACnE,SAASC,QAAQ,QAAQ,cAAW;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAUrC,OAAO,SAASC,UAAUA,CAACC,KAAsB,EAAE;EACjD,MAAMC,KAAK,GAAGL,QAAQ,CAAC,CAAC;EAExB,MAAMM,aAAa,GAAG,CAACD,KAAK,CAACE,MAAM,EAAEC,KAAK,EAAEJ,KAAK,CAACK,KAAK,CAAC;EAExD,MAAMC,SAAS,GAAGN,KAAK,CAACO,MAAM,IAAIZ,IAAI;EACtC,oBAAOG,IAAA,CAACQ,SAAS;IAAA,GAAKN,KAAK;IAAEK,KAAK,EAAEH;EAAc,CAAE,CAAC;AACvD","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["primitives/toast/types.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["themes/adapters/index.ts"],"mappings":";;AAAA,cAAc,uBAAoB","ignoreList":[]}
|