@korsolutions/ui 0.0.84 → 0.0.86
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/AGENTS.md +3 -3
- package/dist/module/components/alert/components/alert-description.js.map +1 -1
- package/dist/module/components/alert/components/alert-icon.js.map +1 -1
- package/dist/module/components/alert/components/alert-root.js +7 -3
- package/dist/module/components/alert/components/alert-root.js.map +1 -1
- package/dist/module/components/alert-dialog/async-alert-dialog.js.map +1 -1
- package/dist/module/components/alert-dialog/components/alert-dialog-root.js +7 -3
- package/dist/module/components/alert-dialog/components/alert-dialog-root.js.map +1 -1
- package/dist/module/components/alert-dialog/variants/default.js +93 -85
- package/dist/module/components/alert-dialog/variants/default.js.map +1 -1
- package/dist/module/components/avatar/components/avatar-image.js.map +1 -1
- package/dist/module/components/avatar/components/avatar-root.js +7 -3
- package/dist/module/components/avatar/components/avatar-root.js.map +1 -1
- package/dist/module/components/badge/badge.js +11 -4
- package/dist/module/components/badge/badge.js.map +1 -1
- package/dist/module/components/button/button.js +7 -3
- package/dist/module/components/button/button.js.map +1 -1
- package/dist/module/components/button/variants/default.js +48 -44
- package/dist/module/components/button/variants/default.js.map +1 -1
- package/dist/module/components/button/variants/ghost.js +64 -60
- package/dist/module/components/button/variants/ghost.js.map +1 -1
- package/dist/module/components/button/variants/secondary.js +66 -62
- package/dist/module/components/button/variants/secondary.js.map +1 -1
- package/dist/module/components/calendar/calendar/calendar-root.js +6 -2
- package/dist/module/components/calendar/calendar/calendar-root.js.map +1 -1
- package/dist/module/components/calendar/calendar/calendar-weeks.js +6 -9
- package/dist/module/components/calendar/calendar/calendar-weeks.js.map +1 -1
- package/dist/module/components/calendar/shared/calendar-context.js.map +1 -1
- package/dist/module/components/calendar/shared/calendar-day.js.map +1 -1
- package/dist/module/components/calendar/shared/calendar-header.js.map +1 -1
- package/dist/module/components/calendar/shared/calendar-nav-buttons.js +4 -4
- package/dist/module/components/calendar/shared/calendar-nav-buttons.js.map +1 -1
- package/dist/module/components/calendar/shared/calendar-title.js.map +1 -1
- package/dist/module/components/calendar/shared/calendar-week-labels.js.map +1 -1
- package/dist/module/components/calendar/timeline/calendar-timeline.js.map +1 -1
- package/dist/module/components/calendar/week-calendar/week-calendar.js +4 -4
- package/dist/module/components/calendar/week-calendar/week-calendar.js.map +1 -1
- package/dist/module/components/card/card-root.js +6 -3
- package/dist/module/components/card/card-root.js.map +1 -1
- package/dist/module/components/checkbox/components/checkbox-root.js +7 -3
- package/dist/module/components/checkbox/components/checkbox-root.js.map +1 -1
- package/dist/module/components/combobox/components/combobox-content.js.map +1 -1
- package/dist/module/components/combobox/components/combobox-option.js.map +1 -1
- package/dist/module/components/combobox/components/combobox-overlay.js.map +1 -1
- package/dist/module/components/combobox/components/combobox-portal.js.map +1 -1
- package/dist/module/components/combobox/components/combobox-root.js +8 -4
- package/dist/module/components/combobox/components/combobox-root.js.map +1 -1
- package/dist/module/components/combobox/components/combobox-trigger.js.map +1 -1
- package/dist/module/components/combobox/context.js.map +1 -1
- package/dist/module/components/combobox/variants/default.js +91 -88
- package/dist/module/components/combobox/variants/default.js.map +1 -1
- package/dist/module/components/empty/components/empty-root.js +6 -2
- package/dist/module/components/empty/components/empty-root.js.map +1 -1
- package/dist/module/components/field/components/field-label.js.map +1 -1
- package/dist/module/components/field/components/field-root.js +6 -2
- package/dist/module/components/field/components/field-root.js.map +1 -1
- package/dist/module/components/icon/icon.js.map +1 -1
- package/dist/module/components/icon-button/icon-button.js +10 -7
- package/dist/module/components/icon-button/icon-button.js.map +1 -1
- package/dist/module/components/icon-button/variants/default.js +31 -24
- package/dist/module/components/icon-button/variants/default.js.map +1 -1
- package/dist/module/components/icon-button/variants/ghost.js +32 -25
- package/dist/module/components/icon-button/variants/ghost.js.map +1 -1
- package/dist/module/components/icon-button/variants/secondary.js +34 -27
- package/dist/module/components/icon-button/variants/secondary.js.map +1 -1
- package/dist/module/components/index.js +1 -0
- package/dist/module/components/index.js.map +1 -1
- package/dist/module/components/input/input.js +8 -4
- package/dist/module/components/input/input.js.map +1 -1
- package/dist/module/components/input/numeric-input.js +0 -1
- package/dist/module/components/input/numeric-input.js.map +1 -1
- package/dist/module/components/input/variants/default.js +39 -37
- package/dist/module/components/input/variants/default.js.map +1 -1
- package/dist/module/components/input/variants/secondary.js +39 -37
- package/dist/module/components/input/variants/secondary.js.map +1 -1
- package/dist/module/components/menu/components/menu-checkbox-item.js.map +1 -1
- package/dist/module/components/menu/components/menu-item.js.map +1 -1
- package/dist/module/components/menu/components/menu-overlay.js.map +1 -1
- package/dist/module/components/menu/components/menu-radio-group.js.map +1 -1
- package/dist/module/components/menu/components/menu-radio-item.js.map +1 -1
- package/dist/module/components/menu/components/menu-root.js +6 -2
- package/dist/module/components/menu/components/menu-root.js.map +1 -1
- package/dist/module/components/menu/components/menu-selection-indicator.js +3 -3
- package/dist/module/components/menu/components/menu-selection-indicator.js.map +1 -1
- package/dist/module/components/menu/components/menu-trigger.js.map +1 -1
- package/dist/module/components/menu/context.js.map +1 -1
- package/dist/module/components/phone-input/components/country-picker.js.map +1 -1
- package/dist/module/components/phone-input/components/phone-input-root.js +9 -4
- package/dist/module/components/phone-input/components/phone-input-root.js.map +1 -1
- package/dist/module/components/phone-input/components/phone-input.js.map +1 -1
- package/dist/module/components/phone-input/context.js.map +1 -1
- package/dist/module/components/phone-input/variants/default.js +115 -112
- package/dist/module/components/phone-input/variants/default.js.map +1 -1
- package/dist/module/components/popover/components/popover-overlay.js.map +1 -1
- package/dist/module/components/popover/components/popover-root.js +6 -2
- package/dist/module/components/popover/components/popover-root.js.map +1 -1
- package/dist/module/components/popover/components/popover-trigger.js.map +1 -1
- package/dist/module/components/portal/portal.js.map +1 -1
- package/dist/module/components/progress/components/progress-indicator.js.map +1 -1
- package/dist/module/components/progress/components/progress-root.js +6 -3
- package/dist/module/components/progress/components/progress-root.js.map +1 -1
- package/dist/module/components/radio-group/components/radio-group-item.js.map +1 -1
- package/dist/module/components/radio-group/components/radio-group-root.js +7 -3
- package/dist/module/components/radio-group/components/radio-group-root.js.map +1 -1
- package/dist/module/components/select/components/select-content.js.map +1 -1
- package/dist/module/components/select/components/select-option.js.map +1 -1
- package/dist/module/components/select/components/select-overlay.js.map +1 -1
- package/dist/module/components/select/components/select-portal.js.map +1 -1
- package/dist/module/components/select/components/select-root.js +8 -5
- package/dist/module/components/select/components/select-root.js.map +1 -1
- package/dist/module/components/select/components/select-trigger.js.map +1 -1
- package/dist/module/components/select/variants/default.js +75 -73
- package/dist/module/components/select/variants/default.js.map +1 -1
- package/dist/module/components/separator/separator.js +5 -1
- package/dist/module/components/separator/separator.js.map +1 -1
- package/dist/module/components/spinner/spinner.js +7 -3
- package/dist/module/components/spinner/spinner.js.map +1 -1
- package/dist/module/components/table/context.js +12 -0
- package/dist/module/components/table/context.js.map +1 -0
- package/dist/module/components/table/index.js +17 -0
- package/dist/module/components/table/index.js.map +1 -0
- package/dist/module/components/table/table-body.js +17 -0
- package/dist/module/components/table/table-body.js.map +1 -0
- package/dist/module/components/table/table-cell.js +17 -0
- package/dist/module/components/table/table-cell.js.map +1 -0
- package/dist/module/components/table/table-head.js +17 -0
- package/dist/module/components/table/table-head.js.map +1 -0
- package/dist/module/components/table/table-header.js +17 -0
- package/dist/module/components/table/table-header.js.map +1 -0
- package/dist/module/components/table/table-root.js +27 -0
- package/dist/module/components/table/table-root.js.map +1 -0
- package/dist/module/components/table/table-row.js +17 -0
- package/dist/module/components/table/table-row.js.map +1 -0
- package/dist/module/components/table/types.js +4 -0
- package/dist/module/components/table/types.js.map +1 -0
- package/dist/module/components/table/variants/default.js +48 -0
- package/dist/module/components/table/variants/default.js.map +1 -0
- package/dist/module/components/table/variants/index.js +7 -0
- package/dist/module/components/table/variants/index.js.map +1 -0
- package/dist/module/components/tabs/components/tabs-item.js.map +1 -1
- package/dist/module/components/tabs/components/tabs-root.js +7 -3
- package/dist/module/components/tabs/components/tabs-root.js.map +1 -1
- package/dist/module/components/textarea/textarea.js +7 -3
- package/dist/module/components/textarea/textarea.js.map +1 -1
- package/dist/module/components/toast/components/toast-icon.js.map +1 -1
- package/dist/module/components/toast/components/toast-root.js +6 -2
- package/dist/module/components/toast/components/toast-root.js.map +1 -1
- package/dist/module/components/toast/manager.js +3 -3
- package/dist/module/components/toast/manager.js.map +1 -1
- package/dist/module/components/touchable/touchable.js +5 -1
- package/dist/module/components/touchable/touchable.js.map +1 -1
- package/dist/module/hooks/use-color-scheme.js.map +1 -1
- package/dist/module/hooks/use-is-react-navigation-modal.js.map +1 -1
- package/dist/module/hooks/use-numeric-mask.js.map +1 -1
- package/dist/module/hooks/use-phone-mask.js.map +1 -1
- package/dist/module/hooks/use-relative-position.js.map +1 -1
- package/dist/module/hooks/use-screen-size.js.map +1 -1
- package/dist/module/index.js +1 -1
- package/dist/module/index.js.map +1 -1
- package/dist/module/themes/default/index.js +1 -0
- package/dist/module/themes/default/index.js.map +1 -1
- package/dist/module/themes/index.js +2 -2
- package/dist/module/themes/index.js.map +1 -1
- package/dist/module/themes/provider.js +6 -1
- package/dist/module/themes/provider.js.map +1 -1
- package/dist/module/themes/types.js +2 -0
- package/dist/module/themes/utils.js +2 -1
- package/dist/module/themes/utils.js.map +1 -1
- package/dist/module/utils/calculate-styles.js +26 -0
- package/dist/module/utils/calculate-styles.js.map +1 -1
- package/dist/module/utils/date-utils.js.map +1 -1
- package/dist/module/utils/input-utils.js.map +1 -1
- package/dist/module/utils/normalize-layout.js.map +1 -1
- package/dist/module/utils/size-scale.js +42 -0
- package/dist/module/utils/size-scale.js.map +1 -0
- package/dist/module/utils/use-themed-styles.js +4 -1
- package/dist/module/utils/use-themed-styles.js.map +1 -1
- package/dist/typescript/src/components/alert/components/alert-description.d.ts.map +1 -1
- package/dist/typescript/src/components/alert/components/alert-icon.d.ts.map +1 -1
- package/dist/typescript/src/components/alert/components/alert-root.d.ts +1 -1
- package/dist/typescript/src/components/alert/components/alert-root.d.ts.map +1 -1
- package/dist/typescript/src/components/alert-dialog/async-alert-dialog.d.ts.map +1 -1
- package/dist/typescript/src/components/alert-dialog/components/alert-dialog-root.d.ts +2 -0
- package/dist/typescript/src/components/alert-dialog/components/alert-dialog-root.d.ts.map +1 -1
- package/dist/typescript/src/components/alert-dialog/variants/default.d.ts +3 -2
- package/dist/typescript/src/components/alert-dialog/variants/default.d.ts.map +1 -1
- package/dist/typescript/src/components/alert-dialog/variants/index.d.ts +1 -1
- package/dist/typescript/src/components/avatar/components/avatar-image.d.ts.map +1 -1
- package/dist/typescript/src/components/avatar/components/avatar-root.d.ts.map +1 -1
- package/dist/typescript/src/components/badge/badge.d.ts.map +1 -1
- package/dist/typescript/src/components/button/button.d.ts +2 -0
- package/dist/typescript/src/components/button/button.d.ts.map +1 -1
- package/dist/typescript/src/components/button/types.d.ts.map +1 -1
- package/dist/typescript/src/components/button/variants/default.d.ts +2 -1
- package/dist/typescript/src/components/button/variants/default.d.ts.map +1 -1
- package/dist/typescript/src/components/button/variants/ghost.d.ts +2 -1
- package/dist/typescript/src/components/button/variants/ghost.d.ts.map +1 -1
- package/dist/typescript/src/components/button/variants/index.d.ts +3 -3
- package/dist/typescript/src/components/button/variants/secondary.d.ts +2 -1
- package/dist/typescript/src/components/button/variants/secondary.d.ts.map +1 -1
- package/dist/typescript/src/components/calendar/calendar/calendar-root.d.ts.map +1 -1
- package/dist/typescript/src/components/calendar/calendar/calendar-weeks.d.ts.map +1 -1
- package/dist/typescript/src/components/calendar/index.d.ts +1 -1
- package/dist/typescript/src/components/calendar/index.d.ts.map +1 -1
- package/dist/typescript/src/components/calendar/shared/calendar-context.d.ts.map +1 -1
- package/dist/typescript/src/components/calendar/shared/calendar-day.d.ts.map +1 -1
- package/dist/typescript/src/components/calendar/shared/calendar-header.d.ts.map +1 -1
- package/dist/typescript/src/components/calendar/shared/calendar-nav-buttons.d.ts.map +1 -1
- package/dist/typescript/src/components/calendar/shared/calendar-title.d.ts.map +1 -1
- package/dist/typescript/src/components/calendar/shared/calendar-week-labels.d.ts.map +1 -1
- package/dist/typescript/src/components/calendar/shared/types.d.ts.map +1 -1
- package/dist/typescript/src/components/calendar/timeline/calendar-timeline.d.ts.map +1 -1
- package/dist/typescript/src/components/calendar/timeline/index.d.ts +1 -1
- package/dist/typescript/src/components/calendar/timeline/index.d.ts.map +1 -1
- package/dist/typescript/src/components/calendar/week-calendar/week-calendar.d.ts.map +1 -1
- package/dist/typescript/src/components/card/card-root.d.ts +1 -1
- package/dist/typescript/src/components/card/card-root.d.ts.map +1 -1
- package/dist/typescript/src/components/checkbox/components/checkbox-root.d.ts.map +1 -1
- package/dist/typescript/src/components/combobox/components/combobox-content.d.ts.map +1 -1
- package/dist/typescript/src/components/combobox/components/combobox-option.d.ts.map +1 -1
- package/dist/typescript/src/components/combobox/components/combobox-overlay.d.ts.map +1 -1
- package/dist/typescript/src/components/combobox/components/combobox-portal.d.ts.map +1 -1
- package/dist/typescript/src/components/combobox/components/combobox-root.d.ts +2 -0
- package/dist/typescript/src/components/combobox/components/combobox-root.d.ts.map +1 -1
- package/dist/typescript/src/components/combobox/components/combobox-trigger.d.ts.map +1 -1
- package/dist/typescript/src/components/combobox/context.d.ts.map +1 -1
- package/dist/typescript/src/components/combobox/variants/default.d.ts +2 -1
- package/dist/typescript/src/components/combobox/variants/default.d.ts.map +1 -1
- package/dist/typescript/src/components/empty/components/empty-root.d.ts.map +1 -1
- package/dist/typescript/src/components/field/components/field-label.d.ts.map +1 -1
- package/dist/typescript/src/components/field/components/field-root.d.ts.map +1 -1
- package/dist/typescript/src/components/icon/icon.d.ts.map +1 -1
- package/dist/typescript/src/components/icon-button/icon-button.d.ts +2 -1
- package/dist/typescript/src/components/icon-button/icon-button.d.ts.map +1 -1
- package/dist/typescript/src/components/icon-button/variants/default.d.ts +2 -1
- package/dist/typescript/src/components/icon-button/variants/default.d.ts.map +1 -1
- package/dist/typescript/src/components/icon-button/variants/ghost.d.ts +2 -1
- package/dist/typescript/src/components/icon-button/variants/ghost.d.ts.map +1 -1
- package/dist/typescript/src/components/icon-button/variants/index.d.ts +3 -3
- package/dist/typescript/src/components/icon-button/variants/secondary.d.ts +2 -1
- package/dist/typescript/src/components/icon-button/variants/secondary.d.ts.map +1 -1
- package/dist/typescript/src/components/index.d.ts +1 -0
- package/dist/typescript/src/components/index.d.ts.map +1 -1
- package/dist/typescript/src/components/input/input.d.ts +2 -0
- package/dist/typescript/src/components/input/input.d.ts.map +1 -1
- package/dist/typescript/src/components/input/numeric-input.d.ts +1 -1
- package/dist/typescript/src/components/input/numeric-input.d.ts.map +1 -1
- package/dist/typescript/src/components/input/variants/default.d.ts +2 -1
- package/dist/typescript/src/components/input/variants/default.d.ts.map +1 -1
- package/dist/typescript/src/components/input/variants/secondary.d.ts +3 -2
- package/dist/typescript/src/components/input/variants/secondary.d.ts.map +1 -1
- package/dist/typescript/src/components/menu/components/menu-checkbox-item.d.ts.map +1 -1
- package/dist/typescript/src/components/menu/components/menu-item.d.ts.map +1 -1
- package/dist/typescript/src/components/menu/components/menu-overlay.d.ts.map +1 -1
- package/dist/typescript/src/components/menu/components/menu-radio-group.d.ts.map +1 -1
- package/dist/typescript/src/components/menu/components/menu-radio-item.d.ts.map +1 -1
- package/dist/typescript/src/components/menu/components/menu-root.d.ts.map +1 -1
- package/dist/typescript/src/components/menu/components/menu-selection-indicator.d.ts +1 -1
- package/dist/typescript/src/components/menu/components/menu-selection-indicator.d.ts.map +1 -1
- package/dist/typescript/src/components/menu/components/menu-trigger.d.ts.map +1 -1
- package/dist/typescript/src/components/menu/context.d.ts.map +1 -1
- package/dist/typescript/src/components/menu/types.d.ts.map +1 -1
- package/dist/typescript/src/components/phone-input/components/country-picker.d.ts.map +1 -1
- package/dist/typescript/src/components/phone-input/components/phone-input-root.d.ts +3 -1
- package/dist/typescript/src/components/phone-input/components/phone-input-root.d.ts.map +1 -1
- package/dist/typescript/src/components/phone-input/components/phone-input.d.ts +1 -1
- package/dist/typescript/src/components/phone-input/components/phone-input.d.ts.map +1 -1
- package/dist/typescript/src/components/phone-input/context.d.ts.map +1 -1
- package/dist/typescript/src/components/phone-input/types.d.ts.map +1 -1
- package/dist/typescript/src/components/phone-input/variants/default.d.ts +2 -1
- package/dist/typescript/src/components/phone-input/variants/default.d.ts.map +1 -1
- package/dist/typescript/src/components/popover/components/popover-overlay.d.ts.map +1 -1
- package/dist/typescript/src/components/popover/components/popover-root.d.ts.map +1 -1
- package/dist/typescript/src/components/popover/components/popover-trigger.d.ts.map +1 -1
- package/dist/typescript/src/components/portal/portal.d.ts +2 -2
- package/dist/typescript/src/components/portal/portal.d.ts.map +1 -1
- package/dist/typescript/src/components/progress/components/progress-indicator.d.ts.map +1 -1
- package/dist/typescript/src/components/progress/components/progress-root.d.ts.map +1 -1
- package/dist/typescript/src/components/radio-group/components/radio-group-item.d.ts.map +1 -1
- package/dist/typescript/src/components/radio-group/components/radio-group-root.d.ts.map +1 -1
- package/dist/typescript/src/components/select/components/select-content.d.ts.map +1 -1
- package/dist/typescript/src/components/select/components/select-option.d.ts.map +1 -1
- package/dist/typescript/src/components/select/components/select-overlay.d.ts.map +1 -1
- package/dist/typescript/src/components/select/components/select-portal.d.ts.map +1 -1
- package/dist/typescript/src/components/select/components/select-root.d.ts +2 -0
- package/dist/typescript/src/components/select/components/select-root.d.ts.map +1 -1
- package/dist/typescript/src/components/select/components/select-trigger.d.ts.map +1 -1
- package/dist/typescript/src/components/select/variants/default.d.ts +3 -2
- package/dist/typescript/src/components/select/variants/default.d.ts.map +1 -1
- package/dist/typescript/src/components/separator/separator.d.ts.map +1 -1
- package/dist/typescript/src/components/spinner/spinner.d.ts.map +1 -1
- package/dist/typescript/src/components/table/context.d.ts +8 -0
- package/dist/typescript/src/components/table/context.d.ts.map +1 -0
- package/dist/typescript/src/components/table/index.d.ts +22 -0
- package/dist/typescript/src/components/table/index.d.ts.map +1 -0
- package/dist/typescript/src/components/table/table-body.d.ts +9 -0
- package/dist/typescript/src/components/table/table-body.d.ts.map +1 -0
- package/dist/typescript/src/components/table/table-cell.d.ts +9 -0
- package/dist/typescript/src/components/table/table-cell.d.ts.map +1 -0
- package/dist/typescript/src/components/table/table-head.d.ts +9 -0
- package/dist/typescript/src/components/table/table-head.d.ts.map +1 -0
- package/dist/typescript/src/components/table/table-header.d.ts +9 -0
- package/dist/typescript/src/components/table/table-header.d.ts.map +1 -0
- package/dist/typescript/src/components/table/table-root.d.ts +11 -0
- package/dist/typescript/src/components/table/table-root.d.ts.map +1 -0
- package/dist/typescript/src/components/table/table-row.d.ts +9 -0
- package/dist/typescript/src/components/table/table-row.d.ts.map +1 -0
- package/dist/typescript/src/components/table/types.d.ts +16 -0
- package/dist/typescript/src/components/table/types.d.ts.map +1 -0
- package/dist/typescript/src/components/table/variants/default.d.ts +3 -0
- package/dist/typescript/src/components/table/variants/default.d.ts.map +1 -0
- package/dist/typescript/src/components/table/variants/index.d.ts +5 -0
- package/dist/typescript/src/components/table/variants/index.d.ts.map +1 -0
- package/dist/typescript/src/components/tabs/components/tabs-item.d.ts.map +1 -1
- package/dist/typescript/src/components/tabs/components/tabs-root.d.ts.map +1 -1
- package/dist/typescript/src/components/textarea/textarea.d.ts.map +1 -1
- package/dist/typescript/src/components/toast/components/toast-icon.d.ts.map +1 -1
- package/dist/typescript/src/components/toast/components/toast-root.d.ts.map +1 -1
- package/dist/typescript/src/components/toast/manager.d.ts.map +1 -1
- package/dist/typescript/src/components/touchable/touchable.d.ts.map +1 -1
- package/dist/typescript/src/hooks/use-color-scheme.d.ts.map +1 -1
- package/dist/typescript/src/hooks/use-is-react-navigation-modal.d.ts.map +1 -1
- package/dist/typescript/src/hooks/use-numeric-mask.d.ts.map +1 -1
- package/dist/typescript/src/hooks/use-phone-mask.d.ts.map +1 -1
- package/dist/typescript/src/hooks/use-relative-position.d.ts.map +1 -1
- package/dist/typescript/src/hooks/use-screen-size.d.ts.map +1 -1
- package/dist/typescript/src/index.d.ts +5 -2
- package/dist/typescript/src/index.d.ts.map +1 -1
- package/dist/typescript/src/themes/default/index.d.ts.map +1 -1
- package/dist/typescript/src/themes/index.d.ts +2 -2
- package/dist/typescript/src/themes/index.d.ts.map +1 -1
- package/dist/typescript/src/themes/provider.d.ts +3 -19
- package/dist/typescript/src/themes/provider.d.ts.map +1 -1
- package/dist/typescript/src/themes/types.d.ts +124 -0
- package/dist/typescript/src/themes/types.d.ts.map +1 -1
- package/dist/typescript/src/themes/utils.d.ts.map +1 -1
- package/dist/typescript/src/utils/calculate-styles.d.ts +1 -0
- package/dist/typescript/src/utils/calculate-styles.d.ts.map +1 -1
- package/dist/typescript/src/utils/date-utils.d.ts.map +1 -1
- package/dist/typescript/src/utils/input-utils.d.ts.map +1 -1
- package/dist/typescript/src/utils/normalize-layout.d.ts.map +1 -1
- package/dist/typescript/src/utils/size-scale.d.ts +20 -0
- package/dist/typescript/src/utils/size-scale.d.ts.map +1 -0
- package/dist/typescript/src/utils/use-themed-styles.d.ts +5 -0
- package/dist/typescript/src/utils/use-themed-styles.d.ts.map +1 -1
- package/package.json +9 -8
- package/src/components/alert/components/alert-description.tsx +1 -3
- package/src/components/alert/components/alert-icon.tsx +4 -1
- package/src/components/alert/components/alert-root.tsx +9 -4
- package/src/components/alert-dialog/async-alert-dialog.tsx +6 -25
- package/src/components/alert-dialog/components/alert-dialog-root.tsx +10 -3
- package/src/components/alert-dialog/variants/default.tsx +88 -79
- package/src/components/avatar/components/avatar-image.tsx +1 -6
- package/src/components/avatar/components/avatar-root.tsx +8 -3
- package/src/components/badge/badge.tsx +10 -12
- package/src/components/button/button.tsx +13 -23
- package/src/components/button/types.ts +1 -5
- package/src/components/button/variants/default.tsx +14 -10
- package/src/components/button/variants/ghost.tsx +14 -10
- package/src/components/button/variants/secondary.tsx +14 -10
- package/src/components/calendar/calendar/calendar-root.tsx +6 -2
- package/src/components/calendar/calendar/calendar-weeks.tsx +7 -13
- package/src/components/calendar/index.ts +1 -5
- package/src/components/calendar/shared/calendar-context.ts +2 -6
- package/src/components/calendar/shared/calendar-day.tsx +4 -12
- package/src/components/calendar/shared/calendar-header.tsx +1 -6
- package/src/components/calendar/shared/calendar-nav-buttons.tsx +9 -28
- package/src/components/calendar/shared/calendar-title.tsx +1 -6
- package/src/components/calendar/shared/calendar-week-labels.tsx +1 -7
- package/src/components/calendar/shared/types.ts +1 -6
- package/src/components/calendar/timeline/calendar-timeline.tsx +3 -9
- package/src/components/calendar/timeline/index.ts +1 -4
- package/src/components/calendar/week-calendar/week-calendar.tsx +10 -25
- package/src/components/card/card-root.tsx +8 -4
- package/src/components/checkbox/components/checkbox-root.tsx +13 -4
- package/src/components/combobox/components/combobox-content.tsx +2 -11
- package/src/components/combobox/components/combobox-option.tsx +1 -2
- package/src/components/combobox/components/combobox-overlay.tsx +1 -6
- package/src/components/combobox/components/combobox-portal.tsx +1 -3
- package/src/components/combobox/components/combobox-root.tsx +23 -24
- package/src/components/combobox/components/combobox-trigger.tsx +2 -7
- package/src/components/combobox/context.ts +1 -3
- package/src/components/combobox/variants/default.tsx +17 -14
- package/src/components/empty/components/empty-root.tsx +7 -2
- package/src/components/field/components/field-label.tsx +3 -1
- package/src/components/field/components/field-root.tsx +7 -2
- package/src/components/icon/icon.tsx +1 -4
- package/src/components/icon-button/icon-button.tsx +16 -15
- package/src/components/icon-button/variants/default.tsx +12 -6
- package/src/components/icon-button/variants/ghost.tsx +12 -6
- package/src/components/icon-button/variants/secondary.tsx +12 -6
- package/src/components/index.ts +1 -0
- package/src/components/input/input.tsx +11 -5
- package/src/components/input/numeric-input.tsx +2 -9
- package/src/components/input/variants/default.tsx +11 -9
- package/src/components/input/variants/secondary.tsx +12 -10
- package/src/components/menu/components/menu-checkbox-item.tsx +2 -9
- package/src/components/menu/components/menu-item.tsx +2 -10
- package/src/components/menu/components/menu-overlay.tsx +1 -6
- package/src/components/menu/components/menu-radio-group.tsx +1 -5
- package/src/components/menu/components/menu-radio-item.tsx +1 -5
- package/src/components/menu/components/menu-root.tsx +10 -2
- package/src/components/menu/components/menu-selection-indicator.tsx +4 -6
- package/src/components/menu/components/menu-trigger.tsx +32 -34
- package/src/components/menu/context.ts +3 -3
- package/src/components/menu/types.ts +1 -5
- package/src/components/phone-input/components/country-picker.tsx +6 -21
- package/src/components/phone-input/components/phone-input-root.tsx +14 -9
- package/src/components/phone-input/components/phone-input.tsx +5 -20
- package/src/components/phone-input/context.ts +1 -3
- package/src/components/phone-input/types.ts +2 -6
- package/src/components/phone-input/variants/default.tsx +21 -18
- package/src/components/popover/components/popover-overlay.tsx +7 -1
- package/src/components/popover/components/popover-root.tsx +10 -2
- package/src/components/popover/components/popover-trigger.tsx +1 -4
- package/src/components/portal/portal.tsx +6 -26
- package/src/components/progress/components/progress-indicator.tsx +13 -2
- package/src/components/progress/components/progress-root.tsx +6 -3
- package/src/components/radio-group/components/radio-group-item.tsx +1 -5
- package/src/components/radio-group/components/radio-group-root.tsx +7 -3
- package/src/components/select/components/select-content.tsx +1 -5
- package/src/components/select/components/select-option.tsx +5 -1
- package/src/components/select/components/select-overlay.tsx +6 -1
- package/src/components/select/components/select-portal.tsx +1 -3
- package/src/components/select/components/select-root.tsx +10 -5
- package/src/components/select/components/select-trigger.tsx +3 -13
- package/src/components/select/variants/default.tsx +16 -14
- package/src/components/separator/separator.tsx +5 -1
- package/src/components/spinner/spinner.tsx +8 -9
- package/src/components/table/context.ts +17 -0
- package/src/components/table/index.ts +23 -0
- package/src/components/table/table-body.tsx +20 -0
- package/src/components/table/table-cell.tsx +20 -0
- package/src/components/table/table-head.tsx +20 -0
- package/src/components/table/table-header.tsx +20 -0
- package/src/components/table/table-root.tsx +35 -0
- package/src/components/table/table-row.tsx +20 -0
- package/src/components/table/types.ts +17 -0
- package/src/components/table/variants/default.tsx +46 -0
- package/src/components/table/variants/index.ts +5 -0
- package/src/components/tabs/components/tabs-item.tsx +5 -25
- package/src/components/tabs/components/tabs-root.tsx +9 -10
- package/src/components/textarea/textarea.tsx +7 -3
- package/src/components/toast/components/toast-icon.tsx +2 -8
- package/src/components/toast/components/toast-root.tsx +6 -2
- package/src/components/toast/manager.tsx +4 -6
- package/src/components/touchable/touchable.tsx +7 -7
- package/src/hooks/use-color-scheme.ts +1 -4
- package/src/hooks/use-currency-mask.ts +4 -4
- package/src/hooks/use-is-react-navigation-modal.ts +4 -13
- package/src/hooks/use-numeric-mask.ts +10 -5
- package/src/hooks/use-phone-mask.ts +6 -18
- package/src/hooks/use-relative-position.ts +8 -24
- package/src/hooks/use-screen-size.ts +8 -3
- package/src/index.tsx +5 -6
- package/src/themes/default/index.ts +1 -0
- package/src/themes/index.ts +2 -2
- package/src/themes/provider.tsx +10 -25
- package/src/themes/types.ts +126 -0
- package/src/themes/utils.ts +1 -0
- package/src/utils/calculate-styles.ts +42 -2
- package/src/utils/date-utils.ts +23 -3
- package/src/utils/input-utils.ts +1 -4
- package/src/utils/normalize-layout.ts +3 -1
- package/src/utils/size-scale.ts +45 -0
- package/src/utils/use-themed-styles.ts +10 -10
- package/tsconfig.json +5 -15
|
@@ -2,73 +2,77 @@
|
|
|
2
2
|
|
|
3
3
|
import { hslaSetRelativeLightness } from "../../../utils/hsla-utils.js";
|
|
4
4
|
import { useThemedStyles } from "../../../utils/use-themed-styles.js";
|
|
5
|
-
export const useButtonVariantGhost =
|
|
5
|
+
export const useButtonVariantGhost = size => {
|
|
6
6
|
return useThemedStyles(({
|
|
7
7
|
colors,
|
|
8
8
|
radius,
|
|
9
9
|
fontFamily,
|
|
10
|
-
|
|
11
|
-
}) =>
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
10
|
+
sizeScale
|
|
11
|
+
}) => {
|
|
12
|
+
const sizeStyles = sizeScale(size);
|
|
13
|
+
return {
|
|
14
|
+
root: {
|
|
15
|
+
default: {
|
|
16
|
+
flexDirection: "row",
|
|
17
|
+
height: sizeStyles.height,
|
|
18
|
+
paddingHorizontal: sizeStyles.paddingHorizontal,
|
|
19
|
+
borderRadius: radius,
|
|
20
|
+
gap: sizeStyles.gap,
|
|
21
|
+
alignItems: "center",
|
|
22
|
+
justifyContent: "center",
|
|
23
|
+
backgroundColor: "transparent",
|
|
24
|
+
cursor: "pointer"
|
|
25
|
+
},
|
|
26
|
+
disabled: {
|
|
27
|
+
opacity: 0.5,
|
|
28
|
+
cursor: "not-allowed"
|
|
29
|
+
},
|
|
30
|
+
loading: {
|
|
31
|
+
opacity: 0.5,
|
|
32
|
+
cursor: "wait"
|
|
33
|
+
},
|
|
34
|
+
hovered: {
|
|
35
|
+
backgroundColor: hslaSetRelativeLightness(colors.secondary, -1)
|
|
36
|
+
}
|
|
23
37
|
},
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
38
|
+
text: {
|
|
39
|
+
default: {
|
|
40
|
+
color: colors.foreground,
|
|
41
|
+
fontSize: sizeStyles.fontSize,
|
|
42
|
+
fontFamily
|
|
43
|
+
},
|
|
44
|
+
disabled: {
|
|
45
|
+
color: colors.mutedForeground
|
|
46
|
+
},
|
|
47
|
+
loading: {
|
|
48
|
+
color: colors.mutedForeground
|
|
49
|
+
}
|
|
27
50
|
},
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
51
|
+
icon: {
|
|
52
|
+
default: {
|
|
53
|
+
color: colors.foreground,
|
|
54
|
+
size: sizeStyles.iconSize,
|
|
55
|
+
strokeWidth: sizeStyles.strokeWidth
|
|
56
|
+
},
|
|
57
|
+
disabled: {
|
|
58
|
+
color: colors.mutedForeground
|
|
59
|
+
},
|
|
60
|
+
loading: {
|
|
61
|
+
color: colors.mutedForeground
|
|
62
|
+
}
|
|
31
63
|
},
|
|
32
|
-
|
|
33
|
-
|
|
64
|
+
spinner: {
|
|
65
|
+
default: {
|
|
66
|
+
color: colors.foreground
|
|
67
|
+
},
|
|
68
|
+
disabled: {
|
|
69
|
+
color: colors.mutedForeground
|
|
70
|
+
},
|
|
71
|
+
loading: {
|
|
72
|
+
color: colors.mutedForeground
|
|
73
|
+
}
|
|
34
74
|
}
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
default: {
|
|
38
|
-
color: colors.foreground,
|
|
39
|
-
fontSize,
|
|
40
|
-
fontFamily
|
|
41
|
-
},
|
|
42
|
-
disabled: {
|
|
43
|
-
color: colors.mutedForeground
|
|
44
|
-
},
|
|
45
|
-
loading: {
|
|
46
|
-
color: colors.mutedForeground
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
icon: {
|
|
50
|
-
default: {
|
|
51
|
-
color: colors.foreground,
|
|
52
|
-
size: fontSize
|
|
53
|
-
},
|
|
54
|
-
disabled: {
|
|
55
|
-
color: colors.mutedForeground
|
|
56
|
-
},
|
|
57
|
-
loading: {
|
|
58
|
-
color: colors.mutedForeground
|
|
59
|
-
}
|
|
60
|
-
},
|
|
61
|
-
spinner: {
|
|
62
|
-
default: {
|
|
63
|
-
color: colors.foreground
|
|
64
|
-
},
|
|
65
|
-
disabled: {
|
|
66
|
-
color: colors.mutedForeground
|
|
67
|
-
},
|
|
68
|
-
loading: {
|
|
69
|
-
color: colors.mutedForeground
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
}));
|
|
75
|
+
};
|
|
76
|
+
});
|
|
73
77
|
};
|
|
74
78
|
//# sourceMappingURL=ghost.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["hslaSetRelativeLightness","useThemedStyles","useButtonVariantGhost","colors","radius","fontFamily","
|
|
1
|
+
{"version":3,"names":["hslaSetRelativeLightness","useThemedStyles","useButtonVariantGhost","size","colors","radius","fontFamily","sizeScale","sizeStyles","root","default","flexDirection","height","paddingHorizontal","borderRadius","gap","alignItems","justifyContent","backgroundColor","cursor","disabled","opacity","loading","hovered","secondary","text","color","foreground","fontSize","mutedForeground","icon","iconSize","strokeWidth","spinner"],"sourceRoot":"../../../../../src","sources":["components/button/variants/ghost.tsx"],"mappings":";;AACA,SAASA,wBAAwB,QAAQ,8BAA2B;AAEpE,SAASC,eAAe,QAAQ,qC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QAAQ,EAAE;UACRM,KAAK,EAAEtB,MAAM,CAACyB;QAChB,CAAC;QACDP,OAAO,EAAE;UACPI,KAAK,EAAEtB,MAAM,CAACyB;QAChB;MACF,CAAC;MACDI,OAAO,EAAE;QACPvB,OAAO,EAAE;UACPgB,KAAK,EAAEtB,MAAM,CAACuB;QAChB,CAAC;QACDP,QAAQ,EAAE;UACRM,KAAK,EAAEtB,MAAM,CAACyB;QAChB,CAAC;QACDP,OAAO,EAAE;UACPI,KAAK,EAAEtB,MAAM,CAACyB;QAChB;MACF;IACF,CAAC;EACH,CAAC,CAAC;AACJ,CAAC","ignoreList":[]}
|
|
@@ -2,75 +2,79 @@
|
|
|
2
2
|
|
|
3
3
|
import { hslaSetRelativeLightness } from "../../../utils/hsla-utils.js";
|
|
4
4
|
import { useThemedStyles } from "../../../utils/use-themed-styles.js";
|
|
5
|
-
export const useButtonVariantSecondary =
|
|
5
|
+
export const useButtonVariantSecondary = size => {
|
|
6
6
|
return useThemedStyles(({
|
|
7
7
|
colors,
|
|
8
8
|
radius,
|
|
9
9
|
fontFamily,
|
|
10
|
-
|
|
11
|
-
}) =>
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
10
|
+
sizeScale
|
|
11
|
+
}) => {
|
|
12
|
+
const sizeStyles = sizeScale(size);
|
|
13
|
+
return {
|
|
14
|
+
root: {
|
|
15
|
+
default: {
|
|
16
|
+
flexDirection: "row",
|
|
17
|
+
height: sizeStyles.height,
|
|
18
|
+
paddingHorizontal: sizeStyles.paddingHorizontal,
|
|
19
|
+
borderRadius: radius,
|
|
20
|
+
gap: sizeStyles.gap,
|
|
21
|
+
alignItems: "center",
|
|
22
|
+
justifyContent: "center",
|
|
23
|
+
borderWidth: 1,
|
|
24
|
+
borderColor: colors.border,
|
|
25
|
+
backgroundColor: colors.secondary,
|
|
26
|
+
cursor: "pointer"
|
|
27
|
+
},
|
|
28
|
+
disabled: {
|
|
29
|
+
opacity: 0.5,
|
|
30
|
+
cursor: "not-allowed"
|
|
31
|
+
},
|
|
32
|
+
loading: {
|
|
33
|
+
opacity: 0.5,
|
|
34
|
+
cursor: "wait"
|
|
35
|
+
},
|
|
36
|
+
hovered: {
|
|
37
|
+
backgroundColor: hslaSetRelativeLightness(colors.secondary, -1)
|
|
38
|
+
}
|
|
25
39
|
},
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
40
|
+
text: {
|
|
41
|
+
default: {
|
|
42
|
+
color: colors.secondaryForeground,
|
|
43
|
+
fontSize: sizeStyles.fontSize,
|
|
44
|
+
fontFamily
|
|
45
|
+
},
|
|
46
|
+
disabled: {
|
|
47
|
+
color: colors.mutedForeground
|
|
48
|
+
},
|
|
49
|
+
loading: {
|
|
50
|
+
color: colors.mutedForeground
|
|
51
|
+
}
|
|
29
52
|
},
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
53
|
+
icon: {
|
|
54
|
+
default: {
|
|
55
|
+
color: colors.secondaryForeground,
|
|
56
|
+
size: sizeStyles.iconSize,
|
|
57
|
+
strokeWidth: sizeStyles.strokeWidth
|
|
58
|
+
},
|
|
59
|
+
disabled: {
|
|
60
|
+
color: colors.mutedForeground
|
|
61
|
+
},
|
|
62
|
+
loading: {
|
|
63
|
+
color: colors.mutedForeground
|
|
64
|
+
}
|
|
33
65
|
},
|
|
34
|
-
|
|
35
|
-
|
|
66
|
+
spinner: {
|
|
67
|
+
default: {
|
|
68
|
+
color: colors.secondaryForeground
|
|
69
|
+
},
|
|
70
|
+
disabled: {
|
|
71
|
+
color: colors.mutedForeground
|
|
72
|
+
},
|
|
73
|
+
loading: {
|
|
74
|
+
color: colors.mutedForeground
|
|
75
|
+
}
|
|
36
76
|
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
default: {
|
|
40
|
-
color: colors.secondaryForeground,
|
|
41
|
-
fontSize,
|
|
42
|
-
fontFamily
|
|
43
|
-
},
|
|
44
|
-
disabled: {
|
|
45
|
-
color: colors.mutedForeground
|
|
46
|
-
},
|
|
47
|
-
loading: {
|
|
48
|
-
color: colors.mutedForeground
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
|
-
icon: {
|
|
52
|
-
default: {
|
|
53
|
-
color: colors.secondaryForeground,
|
|
54
|
-
size: fontSize
|
|
55
|
-
},
|
|
56
|
-
disabled: {
|
|
57
|
-
color: colors.mutedForeground
|
|
58
|
-
},
|
|
59
|
-
loading: {
|
|
60
|
-
color: colors.mutedForeground
|
|
61
|
-
}
|
|
62
|
-
},
|
|
63
|
-
spinner: {
|
|
64
|
-
default: {
|
|
65
|
-
color: colors.secondaryForeground
|
|
66
|
-
},
|
|
67
|
-
disabled: {
|
|
68
|
-
color: colors.mutedForeground
|
|
69
|
-
},
|
|
70
|
-
loading: {
|
|
71
|
-
color: colors.mutedForeground
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
}));
|
|
77
|
+
};
|
|
78
|
+
});
|
|
75
79
|
};
|
|
76
80
|
//# sourceMappingURL=secondary.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["hslaSetRelativeLightness","useThemedStyles","useButtonVariantSecondary","colors","radius","fontFamily","
|
|
1
|
+
{"version":3,"names":["hslaSetRelativeLightness","useThemedStyles","useButtonVariantSecondary","size","colors","radius","fontFamily","sizeScale","sizeStyles","root","default","flexDirection","height","paddingHorizontal","borderRadius","gap","alignItems","justifyContent","borderWidth","borderColor","border","backgroundColor","secondary","cursor","disabled","opacity","loading","hovered","text","color","secondaryForeground","fontSize","mutedForeground","icon","iconSize","strokeWidth","spinner"],"sourceRoot":"../../../../../src","sources":["components/button/variants/secondary.tsx"],"mappings":";;AACA,SAASA,wBAAwB,QAAQ,8BAA2B;AAEpE,SAASC,eAAe,QAAQ,qCAAkC;AAGlE,OAAO,MAAMC,yBAAy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AAQ;UACzBC,WAAW,EAAE3B,UAAU,CAAC2B;QAC1B,CAAC;QACDX,QAAQ,EAAE;UACRK,KAAK,EAAEzB,MAAM,CAAC4B;QAChB,CAAC;QACDN,OAAO,EAAE;UACPG,KAAK,EAAEzB,MAAM,CAAC4B;QAChB;MACF,CAAC;MACDI,OAAO,EAAE;QACP1B,OAAO,EAAE;UACPmB,KAAK,EAAEzB,MAAM,CAAC0B;QAChB,CAAC;QACDN,QAAQ,EAAE;UACRK,KAAK,EAAEzB,MAAM,CAAC4B;QAChB,CAAC;QACDN,OAAO,EAAE;UACPG,KAAK,EAAEzB,MAAM,CAAC4B;QAChB;MACF;IACF,CAAC;EACH,CAAC,CAAC;AACJ,CAAC","ignoreList":[]}
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
import React, { useCallback, useMemo, useState } from "react";
|
|
4
4
|
import { View } from "react-native";
|
|
5
|
+
import { useComponentConfig } from "../../../themes/provider.js";
|
|
6
|
+
import { mergeStyles } from "../../../utils/calculate-styles.js";
|
|
5
7
|
import { addMonths, subMonths } from "../../../utils/date-utils.js";
|
|
6
8
|
import { CalendarContext } from "../shared/calendar-context.js";
|
|
7
9
|
import { CalendarVariants } from "./variants/index.js";
|
|
@@ -18,6 +20,8 @@ export function CalendarRoot(props) {
|
|
|
18
20
|
style
|
|
19
21
|
} = props;
|
|
20
22
|
const variantStyles = CalendarVariants[props.variant || "default"]();
|
|
23
|
+
const componentConfig = useComponentConfig("calendar");
|
|
24
|
+
const mergedStyles = mergeStyles(variantStyles, componentConfig?.styles);
|
|
21
25
|
const [currentMonth, setCurrentMonth] = useState(defaultMonth);
|
|
22
26
|
const goToPrev = useCallback(() => {
|
|
23
27
|
setCurrentMonth(prev => subMonths(prev, 1));
|
|
@@ -33,7 +37,7 @@ export function CalendarRoot(props) {
|
|
|
33
37
|
if (!maxDate) return false;
|
|
34
38
|
return addMonths(currentMonth, 1) > maxDate;
|
|
35
39
|
}, [currentMonth, maxDate]);
|
|
36
|
-
const containerStyle = [
|
|
40
|
+
const containerStyle = [mergedStyles.root, style];
|
|
37
41
|
return /*#__PURE__*/_jsx(CalendarContext.Provider, {
|
|
38
42
|
value: {
|
|
39
43
|
value,
|
|
@@ -43,7 +47,7 @@ export function CalendarRoot(props) {
|
|
|
43
47
|
goToNext,
|
|
44
48
|
isPrevDisabled,
|
|
45
49
|
isNextDisabled,
|
|
46
|
-
styles:
|
|
50
|
+
styles: mergedStyles,
|
|
47
51
|
minDate,
|
|
48
52
|
maxDate,
|
|
49
53
|
markedDates
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useCallback","useMemo","useState","View","addMonths","subMonths","CalendarContext","CalendarVariants","jsx","_jsx","CalendarRoot","props","children","value","onChange","defaultMonth","Date","minDate","maxDate","markedDates","style","variantStyles","variant","currentMonth","setCurrentMonth","goToPrev","prev","goToNext","isPrevDisabled","isNextDisabled","containerStyle","root","Provider"
|
|
1
|
+
{"version":3,"names":["React","useCallback","useMemo","useState","View","useComponentConfig","mergeStyles","addMonths","subMonths","CalendarContext","CalendarVariants","jsx","_jsx","CalendarRoot","props","children","value","onChange","defaultMonth","Date","minDate","maxDate","markedDates","style","variantStyles","variant","componentConfig","mergedStyles","styles","currentMonth","setCurrentMonth","goToPrev","prev","goToNext","isPrevDisabled","isNextDisabled","containerStyle","root","Provider"],"sourceRoot":"../../../../../src","sources":["components/calendar/calendar/calendar-root.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,WAAW,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,OAAO;AAC7D,SAASC,IAAI,QAAwC,cAAc;AACnE,SAASC,kBAAkB,QAAQ,6BAA0B;AAC7D,SAASC,WAAW,QAAQ,oCAAiC;AAC7D,SAASC,SAAS,EAAEC,SAAS,QAAQ,8BAA2B;AAChE,SAASC,eAAe,QAAQ,+BAA4B;AAC5D,SAASC,gBAAgB,QAAQ,qBAAY;AAAC,SAAAC,GAAA,IAAAC,IAAA;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,CAAC,CAAC;EAE3B,MAAMe,cAAc,GAAG,CAACT,YAAY,CAACU,IAAI,EAAEd,KAAK,CAAC;EAEjD,oBACEX,IAAA,CAACH,eAAe,CAAC6B,QAAQ;IACvBtB,KAAK,EAAE;MACLA,KAAK;MACLC,QAAQ;MACRY,YAAY;MACZE,QAAQ;MACRE,QAAQ;MACRC,cAAc;MACdC,cAAc;MACdP,MAAM,EAAED,YAAY;MACpBP,OAAO;MACPC,OAAO;MACPC;IACF,CAAE;IAAAP,QAAA,eAEFH,IAAA,CAACR,IAAI;MAACmB,KAAK,EAAEa,cAAe;MAAArB,QAAA,EAAEA;IAAQ,CAAO;EAAC,CACtB,CAAC;AAE/B","ignoreList":[]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import React from "react";
|
|
4
|
-
import { View } from "react-native";
|
|
4
|
+
import { StyleSheet, View } from "react-native";
|
|
5
5
|
import { getWeekDays, getWeeksInMonth } from "../../../utils/date-utils.js";
|
|
6
6
|
import { useCalendarContext } from "../shared/calendar-context.js";
|
|
7
7
|
import { CalendarDay } from "../shared/calendar-day.js";
|
|
@@ -11,20 +11,17 @@ function CalendarWeek(props) {
|
|
|
11
11
|
style,
|
|
12
12
|
...viewProps
|
|
13
13
|
} = props;
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
const calStyles = styles;
|
|
19
|
-
const days = getWeekDays(currentMonth.getMonth(), currentMonth.getFullYear(), props.index);
|
|
20
|
-
const composedStyle = [calStyles?.week, style];
|
|
14
|
+
const calendar = useCalendarContext();
|
|
15
|
+
const calendarStyles = calendar.styles;
|
|
16
|
+
const days = getWeekDays(calendar.currentMonth.getMonth(), calendar.currentMonth.getFullYear(), props.index);
|
|
17
|
+
const composedStyle = StyleSheet.flatten([calendarStyles?.week, style]);
|
|
21
18
|
return /*#__PURE__*/_jsx(View, {
|
|
22
19
|
...viewProps,
|
|
23
20
|
style: composedStyle,
|
|
24
21
|
children: days.map((day, index) => {
|
|
25
22
|
if (!day) {
|
|
26
23
|
return /*#__PURE__*/_jsx(View, {
|
|
27
|
-
style:
|
|
24
|
+
style: calendarStyles?.dayButton?.default
|
|
28
25
|
}, index);
|
|
29
26
|
}
|
|
30
27
|
return /*#__PURE__*/_jsx(CalendarDay, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","getWeekDays","getWeeksInMonth","useCalendarContext","CalendarDay","jsx","_jsx","CalendarWeek","props","style","viewProps","
|
|
1
|
+
{"version":3,"names":["React","StyleSheet","View","getWeekDays","getWeeksInMonth","useCalendarContext","CalendarDay","jsx","_jsx","CalendarWeek","props","style","viewProps","calendar","calendarStyles","styles","days","currentMonth","getMonth","getFullYear","index","composedStyle","flatten","week","children","map","day","dayButton","default","date","CalendarWeeks","calStyles","weeks","Array","from","length","_"],"sourceRoot":"../../../../../src","sources":["components/calendar/calendar/calendar-weeks.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,EAAEC,IAAI,QAAwD,cAAc;AAC/F,SAASC,WAAW,EAAEC,eAAe,QAAQ,8BAA2B;AACxE,SAASC,kBAAkB,QAAQ,+BAA4B;AAC/D,SAASC,WAAW,QAAQ,2BAAwB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAQrD,SAASC,YAAYA,CAACC,KAAwB,EAAE;EAC9C,MAAM;IAAEC,KAAK;IAAE,GAAGC;EAAU,CAAC,GAAGF,KAAK;EACrC,MAAMG,QAAQ,GAAGR,kBAAkB,CAAC,CAAC;EACrC,MAAMS,cAAc,GAAGD,QAAQ,CAACE,MAAwB;EACxD,MAAMC,IAAI,GAAGb,WAAW,CACtBU,QAAQ,CAACI,YAAY,CAACC,QAAQ,CAAC,CAAC,EAChCL,QAAQ,CAACI,YAAY,CAACE,WAAW,CAAC,CAAC,EACnCT,KAAK,CAACU,KACR,CAAC;EAED,MAAMC,aAAa,GAAGpB,UAAU,CAACqB,OAAO,CAAC,CAACR,cAAc,EAAES,IAAI,EAAEZ,KAAK,CAAC,CAAC;EACvE,oBACEH,IAAA,CAACN,IAAI;IAAA,GAAKU,SAAS;IAAED,KAAK,EAAEU,aAAc;IAAAG,QAAA,EACvCR,IAAI,CAACS,GAAG,CAAC,CAACC,GAAG,EAAEN,KAAK,KAAK;MACxB,IAAI,CAACM,GAAG,EAAE;QACR,oBAAOlB,IAAA,CAACN,IAAI;UAAaS,KAAK,EAAEG,cAAc,EAAEa,SAAS,EAAEC;QAAQ,GAAjDR,KAAmD,CAAC;MACxE;MACA,oBAAOZ,IAAA,CAACF,WAAW;QAAauB,IAAI,EAAEH;MAAI,GAAjBN,KAAmB,CAAC;IAC/C,CAAC;EAAC,CACE,CAAC;AAEX;AAMA,OAAO,SAASU,aAAaA,CAACpB,KAAyB,EAAE;EACvD,MAAM;IAAEO,YAAY;IAAEF;EAAO,CAAC,GAAGV,kBAAkB,CAAC,CAAC;EACrD,MAAM0B,SAAS,GAAGhB,MAAwB;EAE1C,MAAMiB,KAAK,GAAG5B,eAAe,CAACa,YAAY,CAAC;EAE3C,MAAMI,aAAa,GAAG,CAACU,SAAS,EAAEC,KAAK,EAAEtB,KAAK,CAACC,KAAK,CAAC;EAErD,oBACEH,IAAA,CAACN,IAAI;IAACS,KAAK,EAAEU,aAAc;IAAAG,QAAA,EACxBS,KAAK,CAACC,IAAI,CAAC;MAAEC,MAAM,EAAEH;IAAM,CAAC,CAAC,CAACP,GAAG,CAAC,CAACW,CAAC,EAAEhB,KAAK,KAAK;MAC/C,oBAAOZ,IAAA,CAACC,YAAY;QAAaW,KAAK,EAAEA;MAAM,GAApBA,KAAsB,CAAC;IACnD,CAAC;EAAC,CACE,CAAC;AAEX","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","CalendarContext","createContext","undefined","useCalendarContext","context","useContext","Error"],"sourceRoot":"../../../../../src","sources":["components/calendar/shared/calendar-context.ts"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AAsBzB,OAAO,MAAMC,eAAe,gBAAGD,KAAK,CAACE,aAAa,
|
|
1
|
+
{"version":3,"names":["React","CalendarContext","createContext","undefined","useCalendarContext","context","useContext","Error"],"sourceRoot":"../../../../../src","sources":["components/calendar/shared/calendar-context.ts"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AAsBzB,OAAO,MAAMC,eAAe,gBAAGD,KAAK,CAACE,aAAa,CAAmCC,SAAS,CAAC;AAE/F,OAAO,MAAMC,kBAAkB,GAAGA,CAAA,KAAM;EACtC,MAAMC,OAAO,GAAGL,KAAK,CAACM,UAAU,CAACL,eAAe,CAAC;EACjD,IAAI,CAACI,OAAO,EAAE;IACZ,MAAM,IAAIE,KAAK,CAAC,yEAAyE,CAAC;EAC5F;EACA,OAAOF,OAAO;AAChB,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useMemo","useState","Pressable","Text","View","formatDate","isDateAfter","isDateBefore","isDateSameDay","isDateToday","useCalendarContext","jsx","_jsx","jsxs","_jsxs","calculateState","date","selected","isDisabled","isHovered","CalendarDay","props","calendar","setIsHovered","minDate","maxDate","isMarked","markedDates","some","d","state","value","handlePress","onChange","composedStyle","styles","dayButton","default","style","composedTextStyle","dayText","textStyle","onPress","onHoverIn","onHoverOut","disabled","children","dayMarker"],"sourceRoot":"../../../../../src","sources":["components/calendar/shared/calendar-day.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,OAAO,EAAEC,QAAQ,QAAQ,OAAO;AAChD,SACEC,SAAS,EACTC,IAAI,EACJC,IAAI,QAIC,cAAc;AACrB,SACEC,UAAU,EACVC,WAAW,EACXC,YAAY,EACZC,aAAa,EACbC,WAAW,QACN,8BAA2B;AAClC,SAASC,kBAAkB,QAAQ,uBAAoB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAWxD,MAAMC,cAAc,GAAGA,CACrBC,IAAU,EACVC,QAAiC,EACjCC,UAAmB,EACnBC,SAAkB,KACG;EACrB,IAAID,UAAU,EAAE,OAAO,UAAU;EACjC,IAAID,QAAQ,IAAIT,aAAa,CAACQ,IAAI,EAAEC,QAAQ,CAAC,EAAE,OAAO,UAAU;EAChE,IAAIR,WAAW,CAACO,IAAI,CAAC,EAAE,OAAO,OAAO;EACrC,IAAIG,SAAS,EAAE,OAAO,SAAS;EAC/B,OAAO,SAAS;AAClB,CAAC;AAED,OAAO,SAASC,WAAWA,CAACC,KAAuB,EAAE;EACnD,MAAMC,QAAQ,GAAGZ,kBAAkB,CAAC,CAAC;EACrC,MAAM,CAACS,SAAS,EAAEI,YAAY,CAAC,GAAGtB,QAAQ,CAAC,KAAK,CAAC;EAEjD,MAAMiB,UAAU,GAAGlB,OAAO,CAAC,MAAM;IAC/B,IAAIsB,QAAQ,CAACE,OAAO,IAAIjB,YAAY,CAACc,KAAK,CAACL,IAAI,EAAEM,QAAQ,CAACE,OAAO,CAAC,
|
|
1
|
+
{"version":3,"names":["React","useMemo","useState","Pressable","Text","View","formatDate","isDateAfter","isDateBefore","isDateSameDay","isDateToday","useCalendarContext","jsx","_jsx","jsxs","_jsxs","calculateState","date","selected","isDisabled","isHovered","CalendarDay","props","calendar","setIsHovered","minDate","maxDate","isMarked","markedDates","some","d","state","value","handlePress","onChange","composedStyle","styles","dayButton","default","style","composedTextStyle","dayText","textStyle","onPress","onHoverIn","onHoverOut","disabled","children","dayMarker"],"sourceRoot":"../../../../../src","sources":["components/calendar/shared/calendar-day.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,OAAO,EAAEC,QAAQ,QAAQ,OAAO;AAChD,SACEC,SAAS,EACTC,IAAI,EACJC,IAAI,QAIC,cAAc;AACrB,SACEC,UAAU,EACVC,WAAW,EACXC,YAAY,EACZC,aAAa,EACbC,WAAW,QACN,8BAA2B;AAClC,SAASC,kBAAkB,QAAQ,uBAAoB;AAAC,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AAS,CAAC;EAE/E,MAAMa,WAAW,GAAGA,CAAA,KAAM;IACxB,IAAId,UAAU,IAAI,CAACI,QAAQ,CAACW,QAAQ,EAAE;IACtCX,QAAQ,CAACW,QAAQ,CAACZ,KAAK,CAACL,IAAI,CAAC;EAC/B,CAAC;EAED,MAAMkB,aAAa,GAAG,CACpBZ,QAAQ,CAACa,MAAM,EAAEC,SAAS,EAAEC,OAAO,EACnCf,QAAQ,CAACa,MAAM,EAAEC,SAAS,GAAGN,KAAK,CAAC,EACnCT,KAAK,CAACiB,KAAK,CACZ;EACD,MAAMC,iBAAiB,GAAG,CACxBjB,QAAQ,CAACa,MAAM,EAAEK,OAAO,EAAEH,OAAO,EACjCf,QAAQ,CAACa,MAAM,EAAEK,OAAO,GAAGV,KAAK,CAAC,EACjCT,KAAK,CAACoB,SAAS,CAChB;EAED,oBACE3B,KAAA,CAACZ,SAAS;IACRwC,OAAO,EAAEV,WAAY;IACrBW,SAAS,EAAEA,CAAA,KAAMpB,YAAY,CAAC,IAAI,CAAE;IACpCqB,UAAU,EAAEA,CAAA,KAAMrB,YAAY,CAAC,KAAK,CAAE;IACtCsB,QAAQ,EAAE3B,UAAW;IACrBoB,KAAK,EAAEJ,aAAc;IAAAY,QAAA,gBAErBlC,IAAA,CAACT,IAAI;MAACmC,KAAK,EAAEC,iBAAkB;MAAAO,QAAA,EAAEzC,UAAU,CAACgB,KAAK,CAACL,IAAI,EAAE,GAAG;IAAC,CAAO,CAAC,EACnEU,QAAQ,iBAAId,IAAA,CAACR,IAAI;MAACkC,KAAK,EAAEhB,QAAQ,CAACa,MAAM,EAAEY;IAAU,CAAE,CAAC;EAAA,CAC/C,CAAC;AAEhB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","useCalendarContext","jsx","_jsx","CalendarHeader","props","children","style","viewProps","styles","headerStyle","header"],"sourceRoot":"../../../../../src","sources":["components/calendar/shared/calendar-header.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,
|
|
1
|
+
{"version":3,"names":["React","View","useCalendarContext","jsx","_jsx","CalendarHeader","props","children","style","viewProps","styles","headerStyle","header"],"sourceRoot":"../../../../../src","sources":["components/calendar/shared/calendar-header.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAwD,cAAc;AACnF,SAASC,kBAAkB,QAAQ,uBAAoB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAOxD,OAAO,SAASC,cAAcA,CAACC,KAA0B,EAAE;EACzD,MAAM;IAAEC,QAAQ;IAAEC,KAAK;IAAE,GAAGC;EAAU,CAAC,GAAGH,KAAK;EAC/C,MAAM;IAAEI;EAAO,CAAC,GAAGR,kBAAkB,CAAC,CAAC;EAEvC,MAAMS,WAAW,GAAG,CAACD,MAAM,EAAEE,MAAM,EAAEJ,KAAK,CAAC;EAE3C,oBACEJ,IAAA,CAACH,IAAI;IAAA,GAAKQ,SAAS;IAAED,KAAK,EAAEG,WAAY;IAAAJ,QAAA,EACrCA;EAAQ,CACL,CAAC;AAEX","ignoreList":[]}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import React, { useState } from "react";
|
|
4
4
|
import { Pressable, StyleSheet, Text, View } from "react-native";
|
|
5
|
-
import {
|
|
5
|
+
import { useComponentConfig } from "../../../themes/provider.js";
|
|
6
6
|
import { useCalendarContext } from "./calendar-context.js";
|
|
7
7
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
8
|
const calculateState = (isDisabled, isHovered) => {
|
|
@@ -21,9 +21,9 @@ export function CalendarNavButtons(props) {
|
|
|
21
21
|
isNextDisabled,
|
|
22
22
|
styles
|
|
23
23
|
} = useCalendarContext();
|
|
24
|
-
const config =
|
|
25
|
-
const PrevIcon = config?.
|
|
26
|
-
const NextIcon = config?.
|
|
24
|
+
const config = useComponentConfig("calendar");
|
|
25
|
+
const PrevIcon = config?.prevIcon;
|
|
26
|
+
const NextIcon = config?.nextIcon;
|
|
27
27
|
const [prevHovered, setPrevHovered] = useState(false);
|
|
28
28
|
const [nextHovered, setNextHovered] = useState(false);
|
|
29
29
|
const prevState = calculateState(isPrevDisabled, prevHovered);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useState","Pressable","StyleSheet","Text","View","
|
|
1
|
+
{"version":3,"names":["React","useState","Pressable","StyleSheet","Text","View","useComponentConfig","useCalendarContext","jsx","_jsx","jsxs","_jsxs","calculateState","isDisabled","isHovered","CalendarNavButtons","props","style","goToPrev","goToNext","isPrevDisabled","isNextDisabled","styles","config","PrevIcon","prevIcon","NextIcon","nextIcon","prevHovered","setPrevHovered","nextHovered","setNextHovered","prevState","nextState","prevIconProps","flatten","navButtonIcon","default","nextIconProps","composedStyle","navButtons","children","onPress","onHoverIn","onHoverOut","disabled","navButton"],"sourceRoot":"../../../../../src","sources":["components/calendar/shared/calendar-nav-buttons.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,QAAQ,QAAQ,OAAO;AACvC,SAASC,SAAS,EAAEC,UAAU,EAAEC,IAAI,EAAEC,IAAI,QAAwC,cAAc;AAChG,SAASC,kBAAkB,QAAQ,6BAA0B;AAC7D,SAASC,kBAAkB,QAAQ,uBAAoB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAOxD,MAAMC,cAAc,GAAGA,CAACC,UAAmB,EAAEC,SAAkB,KAA6B;EAC1F,IAAID,UAAU,EAAE,OAAO,UAAU;EACjC,IAAIC,SAAS,EAAE,OAAO,SAAS;EAC/B,OAAO,SAAS;AAClB,CAAC;AAED,OAAO,SAASC,kBAAkBA,CAACC,KAA8B,EAAE;EACjE,MAAM;IAAEC;EAAM,CAAC,GAAGD,KAAK;EACvB,MAAM;IAAEE,QAAQ;IAAEC,QAAQ;IAAEC,cAAc;IAAEC,cAAc;IAAEC;EAAO,CAAC,GAAGf,kBAAkB,CAAC,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EjB,QAAQ,gBAAGf,IAAA,CAACe,QAAQ;QAAA,GAAKU;MAAa,CAAG,CAAC,gBAAGzB,IAAA,CAACL,IAAI;QAACa,KAAK,EAAEiB,aAAa,EAAEjB,KAAM;QAAAwB,QAAA,EAAC;MAAC,CAAM;IAAC,CAChF,CAAC,eACZhC,IAAA,CAACP,SAAS;MACRwC,OAAO,EAAEvB,QAAS;MAClBwB,SAAS,EAAEA,CAAA,KAAMZ,cAAc,CAAC,IAAI,CAAE;MACtCa,UAAU,EAAEA,CAAA,KAAMb,cAAc,CAAC,KAAK,CAAE;MACxCc,QAAQ,EAAExB,cAAe;MACzBJ,KAAK,EAAE,CAACK,MAAM,EAAEwB,SAAS,EAAET,OAAO,EAAEf,MAAM,EAAEwB,SAAS,GAAGb,SAAS,CAAC,CAAE;MAAAQ,QAAA,EAEnEf,QAAQ,gBAAGjB,IAAA,CAACiB,QAAQ;QAAA,GAAKY;MAAa,CAAG,CAAC,gBAAG7B,IAAA,CAACL,IAAI;QAACa,KAAK,EAAEqB,aAAa,EAAErB,KAAM;QAAAwB,QAAA,EAAC;MAAC,CAAM;IAAC,CAChF,CAAC;EAAA,CACR,CAAC;AAEX","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Text","formatDate","useCalendarContext","jsx","_jsx","CalendarTitle","props","children","style","formatStr","textProps","currentMonth","styles","titleStyle","headerTitle"],"sourceRoot":"../../../../../src","sources":["components/calendar/shared/calendar-title.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,
|
|
1
|
+
{"version":3,"names":["React","Text","formatDate","useCalendarContext","jsx","_jsx","CalendarTitle","props","children","style","formatStr","textProps","currentMonth","styles","titleStyle","headerTitle"],"sourceRoot":"../../../../../src","sources":["components/calendar/shared/calendar-title.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAwD,cAAc;AACnF,SAASC,UAAU,QAAQ,8BAA2B;AACtD,SAASC,kBAAkB,QAAQ,uBAAoB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAQxD,OAAO,SAASC,aAAaA,CAACC,KAAyB,EAAE;EACvD,MAAM;IAAEC,QAAQ;IAAEC,KAAK;IAAEC,SAAS,GAAG,WAAW;IAAE,GAAGC;EAAU,CAAC,GAAGJ,KAAK;EACxE,MAAM;IAAEK,YAAY;IAAEC;EAAO,CAAC,GAAGV,kBAAkB,CAAC,CAAC;EAErD,MAAMW,UAAU,GAAG,CAACD,MAAM,EAAEE,WAAW,EAAEN,KAAK,CAAC;EAE/C,oBACEJ,IAAA,CAACJ,IAAI;IAAA,GAAKU,SAAS;IAAEF,KAAK,EAAEK,UAAW;IAAAN,QAAA,EACpCA,QAAQ,IAAIN,UAAU,CAACU,YAAY,EAAEF,SAAS;EAAC,CAC5C,CAAC;AAEX","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Text","View","useCalendarContext","jsx","_jsx","CalendarWeekLabel","props","styles","composedStyle","weekLabel","style","numberOfLines","children","DEFAULT_WEEK_DAYS","CalendarWeekLabels","weekDays","weekLabels","map","day","index"],"sourceRoot":"../../../../../src","sources":["components/calendar/shared/calendar-week-labels.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,
|
|
1
|
+
{"version":3,"names":["React","Text","View","useCalendarContext","jsx","_jsx","CalendarWeekLabel","props","styles","composedStyle","weekLabel","style","numberOfLines","children","DEFAULT_WEEK_DAYS","CalendarWeekLabels","weekDays","weekLabels","map","day","index"],"sourceRoot":"../../../../../src","sources":["components/calendar/shared/calendar-week-labels.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,QAAwD,cAAc;AACzF,SAASC,kBAAkB,QAAQ,uBAAoB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAOxD,SAASC,iBAAiBA,CAACC,KAA6B,EAAE;EACxD,MAAM;IAAEC;EAAO,CAAC,GAAGL,kBAAkB,CAAC,CAAC;EAEvC,MAAMM,aAAa,GAAG,CAACD,MAAM,EAAEE,SAAS,EAAEH,KAAK,CAACI,KAAK,CAAC;EAEtD,oBACEN,IAAA,CAACJ,IAAI;IAACW,aAAa,EAAE,CAAE;IAACD,KAAK,EAAEF,aAAc;IAAAI,QAAA,EAC1CN,KAAK,CAACM;EAAQ,CACX,CAAC;AAEX;AAQA,MAAMC,iBAAiB,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;AAEpE,OAAO,SAASC,kBAAkBA,CAACR,KAA8B,EAAE;EACjE,MAAM;IAAES,QAAQ,GAAGF,iBAAiB;IAAEH;EAAM,CAAC,GAAGJ,KAAK;EACrD,MAAM;IAAEC;EAAO,CAAC,GAAGL,kBAAkB,CAAC,CAAC;EAEvC,MAAMM,aAAa,GAAG,CAACD,MAAM,EAAES,UAAU,EAAEN,KAAK,CAAC;EAEjD,oBACEN,IAAA,CAACH,IAAI;IAACS,KAAK,EAAEF,aAAc;IAAAI,QAAA,EACxBG,QAAQ,CAACE,GAAG,CAAC,CAACC,GAAG,EAAEC,KAAK,kBACvBf,IAAA,CAACC,iBAAiB;MAAaK,KAAK,EAAEH,MAAM,EAAEE,SAAU;MAAAG,QAAA,EACrDM;IAAG,GADkBC,KAEL,CACpB;EAAC,CACE,CAAC;AAEX","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useMemo","ScrollView","Text","View","isDateSameDay","TimelineVariants","jsx","_jsx","jsxs","_jsxs","HOUR_HEIGHT","formatHour","hour","getMinutesFromStartOfDay","date","getHours","getMinutes","groupOverlappingEvents","events","getStart","getEnd","sorted","sort","a","b","getTime","groups","event","placed","eStart","eEnd","group","overlaps","some","g","gStart","gEnd","push","CalendarTimeline","props","startHour","endHour","keyExtractor","renderEvent","style","variantStyles","variant","hours","arr","i","allEvents","dayEvents","filter","eventGroups","now","Date","isToday","currentTimePosition","container","showsVerticalScrollIndicator","children","timeline","timeColumn","map","timeSlot","timeText","eventsColumn","hourLine","position","left","right","top","flexDirection","alignItems","zIndex","currentTimeDot","currentTimeLineBar","startMinutes","endMinutes","duration","height","indexInGroup","indexOf","totalInGroup","length","eventWidth","layout","Math","max","width"],"sourceRoot":"../../../../../src","sources":["components/calendar/timeline/calendar-timeline.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,OAAO,QAAQ,OAAO;AACtC,SAASC,UAAU,EAAEC,IAAI,EAAEC,IAAI,QAAwC,cAAc;AACrF,SAASC,aAAa,QAAQ,8BAA2B;AACzD,SAASC,gBAAgB,QAAQ,qBAAY;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAE9C,MAAMC,WAAW,GAAG,EAAE;AAEtB,SAASC,UAAUA,CAACC,IAAY,EAAU;EACxC,IAAIA,IAAI,KAAK,CAAC,EAAE,OAAO,OAAO;EAC9B,IAAIA,IAAI,GAAG,EAAE,EAAE,OAAO,GAAGA,IAAI,KAAK;EAClC,IAAIA,IAAI,KAAK,EAAE,EAAE,OAAO,OAAO;EAC/B,OAAO,GAAGA,IAAI,GAAG,EAAE,KAAK;AAC1B;AAEA,SAASC,wBAAwBA,CAACC,IAAU,EAAU;EACpD,OAAOA,IAAI,CAACC,QAAQ,CAAC,CAAC,GAAG,EAAE,GAAGD,IAAI,CAACE,UAAU,CAAC,CAAC;AACjD;AAsBA,SAASC,sBAAsBA,CAC7BC,MAAW,EACXC,QAAwB,EACxBC,MAAsB,EACf;EACP,MAAMC,MAAM,GAAG,CAAC,GAAGH,MAAM,CAAC,CAACI,IAAI,
|
|
1
|
+
{"version":3,"names":["React","useMemo","ScrollView","Text","View","isDateSameDay","TimelineVariants","jsx","_jsx","jsxs","_jsxs","HOUR_HEIGHT","formatHour","hour","getMinutesFromStartOfDay","date","getHours","getMinutes","groupOverlappingEvents","events","getStart","getEnd","sorted","sort","a","b","getTime","groups","event","placed","eStart","eEnd","group","overlaps","some","g","gStart","gEnd","push","CalendarTimeline","props","startHour","endHour","keyExtractor","renderEvent","style","variantStyles","variant","hours","arr","i","allEvents","dayEvents","filter","eventGroups","now","Date","isToday","currentTimePosition","container","showsVerticalScrollIndicator","children","timeline","timeColumn","map","timeSlot","timeText","eventsColumn","hourLine","position","left","right","top","flexDirection","alignItems","zIndex","currentTimeDot","currentTimeLineBar","startMinutes","endMinutes","duration","height","indexInGroup","indexOf","totalInGroup","length","eventWidth","layout","Math","max","width"],"sourceRoot":"../../../../../src","sources":["components/calendar/timeline/calendar-timeline.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,OAAO,QAAQ,OAAO;AACtC,SAASC,UAAU,EAAEC,IAAI,EAAEC,IAAI,QAAwC,cAAc;AACrF,SAASC,aAAa,QAAQ,8BAA2B;AACzD,SAASC,gBAAgB,QAAQ,qBAAY;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAE9C,MAAMC,WAAW,GAAG,EAAE;AAEtB,SAASC,UAAUA,CAACC,IAAY,EAAU;EACxC,IAAIA,IAAI,KAAK,CAAC,EAAE,OAAO,OAAO;EAC9B,IAAIA,IAAI,GAAG,EAAE,EAAE,OAAO,GAAGA,IAAI,KAAK;EAClC,IAAIA,IAAI,KAAK,EAAE,EAAE,OAAO,OAAO;EAC/B,OAAO,GAAGA,IAAI,GAAG,EAAE,KAAK;AAC1B;AAEA,SAASC,wBAAwBA,CAACC,IAAU,EAAU;EACpD,OAAOA,IAAI,CAACC,QAAQ,CAAC,CAAC,GAAG,EAAE,GAAGD,IAAI,CAACE,UAAU,CAAC,CAAC;AACjD;AAsBA,SAASC,sBAAsBA,CAC7BC,MAAW,EACXC,QAAwB,EACxBC,MAAsB,EACf;EACP,MAAMC,MAAM,GAAG,CAAC,GAAGH,MAAM,CAAC,CAACI,IAAI,CAAC,CAACC,C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ACG,CAAC;AAEjB","ignoreList":[]}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import React, { useCallback, useMemo, useRef, useState } from "react";
|
|
4
4
|
import { Platform, Pressable, ScrollView, StyleSheet, Text, View } from "react-native";
|
|
5
|
-
import {
|
|
5
|
+
import { useComponentConfig } from "../../../themes/provider.js";
|
|
6
6
|
import { addWeeks, endOfWeek, formatDate, getWeekDates, isDateAfter, isDateBefore, startOfWeek, subWeeks } from "../../../utils/date-utils.js";
|
|
7
7
|
import { CalendarContext } from "../shared/calendar-context.js";
|
|
8
8
|
import { CalendarDay } from "../shared/calendar-day.js";
|
|
@@ -26,9 +26,9 @@ export function WeekCalendar(props) {
|
|
|
26
26
|
style
|
|
27
27
|
} = props;
|
|
28
28
|
const styles = WeekCalendarVariants[props.variant || "default"]();
|
|
29
|
-
const config =
|
|
30
|
-
const PrevIcon = config?.
|
|
31
|
-
const NextIcon = config?.
|
|
29
|
+
const config = useComponentConfig("calendar");
|
|
30
|
+
const PrevIcon = config?.prevIcon;
|
|
31
|
+
const NextIcon = config?.nextIcon;
|
|
32
32
|
const [currentWeekStart, setCurrentWeekStart] = useState(startOfWeek(defaultWeek));
|
|
33
33
|
const [containerWidth, setContainerWidth] = useState(0);
|
|
34
34
|
const scrollRef = useRef(null);
|