@infonomic/uikit 6.8.1 → 6.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +183 -19
- package/dist/components/accordion/accordion.js +11 -11
- package/dist/components/accordion/accordion.module.css +11 -1
- package/dist/components/accordion/accordion_module.css +3 -1
- package/dist/components/avatar/avatar.js +5 -5
- package/dist/components/avatar/avatar.module.css +9 -4
- package/dist/components/avatar/avatar_module.css +3 -1
- package/dist/components/badge/badge.d.ts +1 -1
- package/dist/components/badge/badge.js +2 -2
- package/dist/components/badge/badge.module.css +9 -4
- package/dist/components/badge/badge_module.css +3 -1
- package/dist/components/button/button-group.d.ts +1 -1
- package/dist/components/button/button-group.js +2 -2
- package/dist/components/button/button-group.module.css +11 -1
- package/dist/components/button/button-group_module.css +4 -2
- package/dist/components/button/button.js +2 -2
- package/dist/components/button/button.module.css +9 -4
- package/dist/components/button/button_module.css +3 -1
- package/dist/components/button/combo-button.d.ts +1 -1
- package/dist/components/button/combo-button.js +8 -8
- package/dist/components/button/combo-button.module.css +11 -1
- package/dist/components/button/combo-button_module.css +3 -1
- package/dist/components/button/control-buttons.js +4 -4
- package/dist/components/button/control-buttons.module.css +11 -1
- package/dist/components/button/control-buttons_module.css +3 -1
- package/dist/components/button/copy-button.js +3 -3
- package/dist/components/button/copy-button.module.css +9 -4
- package/dist/components/button/copy-button_module.css +3 -1
- package/dist/components/button/icon-button.js +2 -2
- package/dist/components/button/index.d.ts +5 -5
- package/dist/components/card/card.js +7 -7
- package/dist/components/card/card.module.css +9 -4
- package/dist/components/card/card_module.css +3 -1
- package/dist/components/chips/chip.js +6 -6
- package/dist/components/chips/chip.module.css +9 -4
- package/dist/components/chips/chip_module.css +3 -1
- package/dist/components/container/container.js +2 -2
- package/dist/components/container/container.module.css +9 -4
- package/dist/components/container/container_module.css +6 -4
- package/dist/components/dropdown/dropdown.js +20 -20
- package/dist/components/dropdown/dropdown.module.css +9 -4
- package/dist/components/dropdown/dropdown_module.css +3 -1
- package/dist/components/hamburger/hamburger.js +4 -4
- package/dist/components/hamburger/hamburger.module.css +9 -4
- package/dist/components/hamburger/hamburger_module.css +3 -1
- package/dist/components/inputs/autocomplete.js +10 -10
- package/dist/components/inputs/autocomplete.module.css +9 -4
- package/dist/components/inputs/autocomplete_module.css +3 -1
- package/dist/components/inputs/calendar.js +24 -24
- package/dist/components/inputs/calendar.module.css +9 -4
- package/dist/components/inputs/calendar_module.css +4 -2
- package/dist/components/inputs/checkbox-group.js +2 -2
- package/dist/components/inputs/checkbox-group.module.css +9 -4
- package/dist/components/inputs/checkbox-group_module.css +3 -1
- package/dist/components/inputs/checkbox.js +6 -6
- package/dist/components/inputs/checkbox.module.css +9 -4
- package/dist/components/inputs/checkbox_module.css +3 -1
- package/dist/components/inputs/error-text.js +2 -2
- package/dist/components/inputs/error-text.module.css +9 -4
- package/dist/components/inputs/error-text_module.css +3 -1
- package/dist/components/inputs/help-text.js +2 -2
- package/dist/components/inputs/help-text.module.css +9 -4
- package/dist/components/inputs/help-text_module.css +3 -1
- package/dist/components/inputs/input-adornment.js +2 -2
- package/dist/components/inputs/input-adornment.module.css +9 -4
- package/dist/components/inputs/input-adornment_module.css +3 -1
- package/dist/components/inputs/input-password.d.ts +18 -2
- package/dist/components/inputs/input-password.d.ts.map +1 -1
- package/dist/components/inputs/input-password.js +19 -11
- package/dist/components/inputs/input-password.module.css +55 -0
- package/dist/components/inputs/input-password.module.js +5 -0
- package/dist/components/inputs/input-password_module.css +25 -0
- package/dist/components/inputs/input.d.ts +1 -1
- package/dist/components/inputs/input.js +6 -6
- package/dist/components/inputs/input.module.css +9 -4
- package/dist/components/inputs/input_module.css +3 -1
- package/dist/components/inputs/label.js +2 -2
- package/dist/components/inputs/label.module.css +9 -4
- package/dist/components/inputs/label_module.css +3 -1
- package/dist/components/inputs/radio-group.d.ts +1 -1
- package/dist/components/inputs/radio-group.js +3 -3
- package/dist/components/inputs/radio-group.module.css +9 -4
- package/dist/components/inputs/radio-group_module.css +3 -1
- package/dist/components/inputs/select.js +6 -6
- package/dist/components/inputs/select.module.css +9 -4
- package/dist/components/inputs/select_module.css +3 -1
- package/dist/components/inputs/text-area.js +3 -3
- package/dist/components/inputs/text-area.module.css +9 -4
- package/dist/components/inputs/text-area_module.css +3 -1
- package/dist/components/notifications/alert.js +11 -11
- package/dist/components/notifications/alert.module.css +9 -4
- package/dist/components/notifications/alert_module.css +4 -2
- package/dist/components/notifications/toast.js +8 -8
- package/dist/components/notifications/toast.module.css +9 -4
- package/dist/components/notifications/toast_module.css +5 -3
- package/dist/components/pager/ellipses.js +2 -2
- package/dist/components/pager/first-button.d.ts +1 -1
- package/dist/components/pager/first-button.js +2 -2
- package/dist/components/pager/hooks/usePagination.d.ts +1 -1
- package/dist/components/pager/last-button.d.ts +1 -1
- package/dist/components/pager/last-button.js +2 -2
- package/dist/components/pager/next-button.d.ts +1 -1
- package/dist/components/pager/next-button.js +2 -2
- package/dist/components/pager/number-button.d.ts +1 -1
- package/dist/components/pager/number-button.js +3 -3
- package/dist/components/pager/pagination.d.ts +7 -7
- package/dist/components/pager/pagination.js +3 -3
- package/dist/components/pager/pagination.module.css +9 -4
- package/dist/components/pager/pagination_module.css +4 -2
- package/dist/components/pager/previous-button.d.ts +1 -1
- package/dist/components/pager/previous-button.js +2 -2
- package/dist/components/scroll-area/scroll-area.js +8 -8
- package/dist/components/scroll-area/scroll-area.module.css +9 -4
- package/dist/components/scroll-area/scroll-area_module.css +3 -1
- package/dist/components/scroll-to-top/scroll-to-top.js +2 -2
- package/dist/components/scroll-to-top/scroll-to-top.module.css +9 -3
- package/dist/components/scroll-to-top/scroll-to-top_module.css +4 -2
- package/dist/components/section/section.js +2 -2
- package/dist/components/section/section.module.css +9 -4
- package/dist/components/section/section_module.css +3 -1
- package/dist/components/shimmer/shimmer.js +4 -4
- package/dist/components/shimmer/shimmer.module.css +9 -4
- package/dist/components/shimmer/shimmer_module.css +3 -1
- package/dist/components/table/table.js +10 -10
- package/dist/components/table/table.module.css +9 -4
- package/dist/components/table/table_module.css +3 -1
- package/dist/components/tabs/tabs.js +5 -5
- package/dist/components/tabs/tabs.module.css +9 -4
- package/dist/components/tabs/tabs_module.css +3 -1
- package/dist/components/tooltip/tooltip.js +3 -3
- package/dist/components/tooltip/tooltip.module.css +9 -4
- package/dist/components/tooltip/tooltip_module.css +3 -1
- package/dist/css-layers.d.ts +23 -0
- package/dist/css-layers.d.ts.map +1 -0
- package/dist/css-layers.js +14 -0
- package/dist/icons/activity-icon.js +3 -3
- package/dist/icons/ai-icon.js +3 -3
- package/dist/icons/calendar-icon.js +3 -3
- package/dist/icons/check-icon.js +3 -3
- package/dist/icons/chevron-down-icon.js +3 -3
- package/dist/icons/chevron-left-double-icon.js +3 -3
- package/dist/icons/chevron-left-icon.js +3 -3
- package/dist/icons/chevron-right-double-icon.js +3 -3
- package/dist/icons/chevron-right-icon.js +3 -3
- package/dist/icons/chevron-up-icon.js +3 -3
- package/dist/icons/chevrons-up-down.js +3 -3
- package/dist/icons/close-icon.js +3 -3
- package/dist/icons/copy-icon.js +3 -3
- package/dist/icons/danger-icon.js +3 -3
- package/dist/icons/dashboard-icon.js +3 -3
- package/dist/icons/delete-icon.js +3 -3
- package/dist/icons/document-icon.js +3 -3
- package/dist/icons/download-icon.js +3 -3
- package/dist/icons/edit-icon.js +3 -3
- package/dist/icons/ellipsis-icon.js +3 -3
- package/dist/icons/email-icon.js +3 -3
- package/dist/icons/external-link-icon.js +3 -3
- package/dist/icons/eye-closed-icon.js +3 -3
- package/dist/icons/eye-open-icon.js +3 -3
- package/dist/icons/github-icon.js +3 -3
- package/dist/icons/globe-icon.js +3 -3
- package/dist/icons/google-icon.js +2 -2
- package/dist/icons/gripper-vertical-icon.js +3 -3
- package/dist/icons/history-icon.js +3 -3
- package/dist/icons/home-icon.js +3 -3
- package/dist/icons/icon-element.js +2 -2
- package/dist/icons/icons.module.css +11 -1
- package/dist/icons/icons_module.css +3 -1
- package/dist/icons/info-icon.js +3 -3
- package/dist/icons/infonomic-icon.js +3 -3
- package/dist/icons/light-icon.js +3 -3
- package/dist/icons/location-pin-icon.js +3 -3
- package/dist/icons/markdown-icon.js +3 -3
- package/dist/icons/moon-icon.js +3 -3
- package/dist/icons/plus-icon.js +3 -3
- package/dist/icons/primary-icon.js +3 -3
- package/dist/icons/refresh-icon.js +3 -3
- package/dist/icons/return-icon.js +3 -3
- package/dist/icons/roles-icon.js +3 -3
- package/dist/icons/search-icon.js +3 -3
- package/dist/icons/search-menu-icon.js +3 -3
- package/dist/icons/settings-gear-icon.js +3 -3
- package/dist/icons/settings-sliders-icon.js +3 -3
- package/dist/icons/sign-out-icon.js +3 -3
- package/dist/icons/stop-icon.js +3 -3
- package/dist/icons/stopwatch-icon.d.ts +1 -1
- package/dist/icons/stopwatch-icon.js +3 -3
- package/dist/icons/success-icon.js +3 -3
- package/dist/icons/user-icon.js +3 -3
- package/dist/icons/users-icon.js +3 -3
- package/dist/icons/wallet-icon.js +3 -3
- package/dist/icons/warning-icon.js +3 -3
- package/dist/icons/x-icon.js +3 -3
- package/dist/loaders/ellipses.js +3 -3
- package/dist/loaders/ellipses.module.css +9 -4
- package/dist/loaders/ellipses_module.css +3 -1
- package/dist/loaders/ring.js +3 -3
- package/dist/loaders/ring.module.css +9 -4
- package/dist/loaders/ring_module.css +3 -1
- package/dist/loaders/spinner.js +4 -4
- package/dist/loaders/spinner.module.css +9 -4
- package/dist/loaders/spinner_module.css +3 -1
- package/dist/react.d.ts +14 -14
- package/dist/styles/components-vanilla.css +1 -1
- package/dist/styles/reset.css +1 -1
- package/dist/styles/styles.css +1 -1
- package/dist/styles/typography.css +1 -1
- package/dist/widgets/datepicker/datepicker.d.ts +42 -1
- package/dist/widgets/datepicker/datepicker.d.ts.map +1 -1
- package/dist/widgets/datepicker/datepicker.js +46 -16
- package/dist/widgets/datepicker/datepicker.module.css +21 -2
- package/dist/widgets/datepicker/datepicker.module.js +1 -0
- package/dist/widgets/datepicker/datepicker_module.css +7 -2
- package/dist/widgets/drawer/drawer-container.js +2 -2
- package/dist/widgets/drawer/drawer-content.js +2 -2
- package/dist/widgets/drawer/drawer-header.js +2 -2
- package/dist/widgets/drawer/drawer-top-actions.js +2 -2
- package/dist/widgets/drawer/drawer.d.ts +4 -4
- package/dist/widgets/drawer/drawer.js +3 -3
- package/dist/widgets/drawer/drawer.module.css +11 -1
- package/dist/widgets/drawer/drawer_module.css +4 -2
- package/dist/widgets/modal/modal-actions.js +2 -2
- package/dist/widgets/modal/modal-container.js +2 -2
- package/dist/widgets/modal/modal-content.js +2 -2
- package/dist/widgets/modal/modal-context.d.ts +20 -0
- package/dist/widgets/modal/modal-context.d.ts.map +1 -0
- package/dist/widgets/modal/modal-context.js +4 -0
- package/dist/widgets/modal/modal-header.d.ts +1 -1
- package/dist/widgets/modal/modal-header.d.ts.map +1 -1
- package/dist/widgets/modal/modal-header.js +25 -3
- package/dist/widgets/modal/modal.d.ts +13 -8
- package/dist/widgets/modal/modal.d.ts.map +1 -1
- package/dist/widgets/modal/modal.js +11 -7
- package/dist/widgets/modal/modal.module.css +11 -1
- package/dist/widgets/modal/modal_module.css +5 -3
- package/dist/widgets/timeline/timeline.js +8 -8
- package/dist/widgets/timeline/timeline.module.css +9 -4
- package/dist/widgets/timeline/timeline_module.css +3 -1
- package/package.json +46 -33
- package/src/components/accordion/accordion.module.css +11 -1
- package/src/components/accordion/accordion.tsx +1 -1
- package/src/components/avatar/avatar.module.css +9 -4
- package/src/components/avatar/avatar.tsx +1 -1
- package/src/components/badge/badge.module.css +9 -4
- package/src/components/badge/badge.tsx +1 -1
- package/src/components/button/button-group.module.css +11 -1
- package/src/components/button/button-group.tsx +1 -1
- package/src/components/button/button.module.css +9 -4
- package/src/components/button/button.tsx +1 -1
- package/src/components/button/combo-button.module.css +11 -1
- package/src/components/button/combo-button.tsx +1 -1
- package/src/components/button/control-buttons.module.css +11 -1
- package/src/components/button/control-buttons.tsx +1 -1
- package/src/components/button/copy-button.module.css +9 -4
- package/src/components/button/copy-button.tsx +1 -1
- package/src/components/button/icon-button.tsx +1 -1
- package/src/components/card/card.module.css +9 -4
- package/src/components/card/card.tsx +1 -1
- package/src/components/chips/chip.module.css +9 -4
- package/src/components/chips/chip.tsx +1 -1
- package/src/components/container/container.module.css +9 -4
- package/src/components/container/container.tsx +1 -1
- package/src/components/dropdown/dropdown.module.css +9 -4
- package/src/components/dropdown/dropdown.tsx +1 -1
- package/src/components/hamburger/hamburger.module.css +9 -4
- package/src/components/hamburger/hamburger.tsx +1 -1
- package/src/components/inputs/autocomplete.module.css +9 -4
- package/src/components/inputs/autocomplete.tsx +1 -1
- package/src/components/inputs/calendar.module.css +9 -4
- package/src/components/inputs/calendar.tsx +1 -1
- package/src/components/inputs/checkbox-group.module.css +9 -4
- package/src/components/inputs/checkbox-group.tsx +1 -1
- package/src/components/inputs/checkbox.module.css +9 -4
- package/src/components/inputs/checkbox.tsx +1 -1
- package/src/components/inputs/error-text.module.css +9 -4
- package/src/components/inputs/error-text.tsx +1 -1
- package/src/components/inputs/help-text.module.css +9 -4
- package/src/components/inputs/help-text.tsx +1 -1
- package/src/components/inputs/input-adornment.module.css +9 -4
- package/src/components/inputs/input-adornment.tsx +1 -1
- package/src/components/inputs/input-password.module.css +55 -0
- package/src/components/inputs/input-password.tsx +49 -7
- package/src/components/inputs/input.module.css +9 -4
- package/src/components/inputs/input.tsx +1 -1
- package/src/components/inputs/label.module.css +9 -4
- package/src/components/inputs/label.tsx +1 -1
- package/src/components/inputs/radio-group.module.css +9 -4
- package/src/components/inputs/radio-group.tsx +1 -1
- package/src/components/inputs/select.module.css +9 -4
- package/src/components/inputs/select.tsx +1 -1
- package/src/components/inputs/text-area.module.css +9 -4
- package/src/components/inputs/text-area.tsx +1 -1
- package/src/components/notifications/alert.module.css +9 -4
- package/src/components/notifications/alert.tsx +1 -1
- package/src/components/notifications/toast.module.css +9 -4
- package/src/components/notifications/toast.tsx +1 -1
- package/src/components/pager/ellipses.tsx +1 -1
- package/src/components/pager/first-button.tsx +1 -1
- package/src/components/pager/last-button.tsx +1 -1
- package/src/components/pager/next-button.tsx +1 -1
- package/src/components/pager/number-button.tsx +1 -1
- package/src/components/pager/pagination.module.css +9 -4
- package/src/components/pager/pagination.tsx +1 -1
- package/src/components/pager/previous-button.tsx +1 -1
- package/src/components/scroll-area/scroll-area.module.css +9 -4
- package/src/components/scroll-area/scroll-area.tsx +1 -1
- package/src/components/scroll-to-top/scroll-to-top.module.css +9 -3
- package/src/components/scroll-to-top/scroll-to-top.tsx +1 -1
- package/src/components/section/section.module.css +9 -4
- package/src/components/section/section.tsx +1 -1
- package/src/components/shimmer/shimmer.module.css +9 -4
- package/src/components/shimmer/shimmer.tsx +1 -1
- package/src/components/table/table.module.css +9 -4
- package/src/components/table/table.tsx +1 -1
- package/src/components/tabs/tabs.module.css +9 -4
- package/src/components/tabs/tabs.tsx +1 -1
- package/src/components/tooltip/tooltip.module.css +9 -4
- package/src/components/tooltip/tooltip.tsx +1 -1
- package/src/css-layers.ts +34 -0
- package/src/icons/activity-icon.tsx +1 -1
- package/src/icons/ai-icon.tsx +1 -1
- package/src/icons/calendar-icon.tsx +1 -1
- package/src/icons/check-icon.tsx +1 -1
- package/src/icons/chevron-down-icon.tsx +1 -1
- package/src/icons/chevron-left-double-icon.tsx +1 -1
- package/src/icons/chevron-left-icon.tsx +1 -1
- package/src/icons/chevron-right-double-icon.tsx +1 -1
- package/src/icons/chevron-right-icon.tsx +1 -1
- package/src/icons/chevron-up-icon.tsx +1 -1
- package/src/icons/chevrons-up-down.tsx +1 -1
- package/src/icons/close-icon.tsx +1 -1
- package/src/icons/copy-icon.tsx +1 -1
- package/src/icons/danger-icon.tsx +1 -1
- package/src/icons/dashboard-icon.tsx +1 -1
- package/src/icons/delete-icon.tsx +1 -1
- package/src/icons/document-icon.tsx +1 -1
- package/src/icons/download-icon.tsx +1 -1
- package/src/icons/edit-icon.tsx +1 -1
- package/src/icons/ellipsis-icon.tsx +1 -1
- package/src/icons/email-icon.tsx +1 -1
- package/src/icons/external-link-icon.tsx +1 -1
- package/src/icons/eye-closed-icon.tsx +1 -1
- package/src/icons/eye-open-icon.tsx +1 -1
- package/src/icons/github-icon.tsx +1 -1
- package/src/icons/globe-icon.tsx +1 -1
- package/src/icons/google-icon.tsx +1 -1
- package/src/icons/gripper-vertical-icon.tsx +1 -1
- package/src/icons/history-icon.tsx +1 -1
- package/src/icons/home-icon.tsx +1 -1
- package/src/icons/icon-element.tsx +1 -1
- package/src/icons/icons.module.css +11 -1
- package/src/icons/info-icon.tsx +1 -1
- package/src/icons/infonomic-icon.tsx +1 -1
- package/src/icons/light-icon.tsx +1 -1
- package/src/icons/location-pin-icon.tsx +1 -1
- package/src/icons/markdown-icon.tsx +1 -1
- package/src/icons/moon-icon.tsx +1 -1
- package/src/icons/plus-icon.tsx +1 -1
- package/src/icons/primary-icon.tsx +1 -1
- package/src/icons/refresh-icon.tsx +1 -1
- package/src/icons/return-icon.tsx +1 -1
- package/src/icons/roles-icon.tsx +1 -1
- package/src/icons/search-icon.tsx +1 -1
- package/src/icons/search-menu-icon.tsx +1 -1
- package/src/icons/settings-gear-icon.tsx +1 -1
- package/src/icons/settings-sliders-icon.tsx +1 -1
- package/src/icons/sign-out-icon.tsx +1 -1
- package/src/icons/stop-icon.tsx +1 -1
- package/src/icons/stopwatch-icon.tsx +1 -1
- package/src/icons/success-icon.tsx +1 -1
- package/src/icons/user-icon.tsx +1 -1
- package/src/icons/users-icon.tsx +1 -1
- package/src/icons/wallet-icon.tsx +1 -1
- package/src/icons/warning-icon.tsx +1 -1
- package/src/icons/x-icon.tsx +1 -1
- package/src/loaders/ellipses.module.css +9 -4
- package/src/loaders/ellipses.tsx +1 -1
- package/src/loaders/ring.module.css +9 -4
- package/src/loaders/ring.tsx +1 -1
- package/src/loaders/spinner.module.css +9 -4
- package/src/loaders/spinner.tsx +1 -1
- package/src/styles/base/animations.css +12 -0
- package/src/styles/base/base.css +12 -0
- package/src/styles/base/borders.css +12 -0
- package/src/styles/base/breakpoints.css +12 -0
- package/src/styles/base/colors.css +12 -0
- package/src/styles/base/opacity.css +12 -0
- package/src/styles/base/shadows.css +12 -0
- package/src/styles/base/size.css +12 -0
- package/src/styles/base/spacing.css +12 -0
- package/src/styles/base/transitions.css +12 -0
- package/src/styles/base/typography.css +12 -0
- package/src/styles/base/z-index.css +12 -0
- package/src/styles/components/components.css +12 -0
- package/src/styles/components/fade-in-lift.css +27 -13
- package/src/styles/components/hamburger.css +11 -6
- package/src/styles/components/loaders.css +168 -154
- package/src/styles/functional/README.md +18 -18
- package/src/styles/functional/borders.css +12 -0
- package/src/styles/functional/colors.css +12 -0
- package/src/styles/functional/functional.css +12 -0
- package/src/styles/functional/grid-flex.css +12 -0
- package/src/styles/functional/shadcn-compat.css +12 -0
- package/src/styles/functional/surfaces.css +12 -0
- package/src/styles/functional/typography.css +12 -0
- package/src/styles/local-fonts.css +12 -0
- package/src/styles/reset.css +18 -0
- package/src/styles/styles.css +9 -4
- package/src/styles/theme/autofill.css +12 -0
- package/src/styles/theme/defaults.css +12 -0
- package/src/styles/theme/scrollers.css +12 -0
- package/src/styles/theme/theme.css +12 -0
- package/src/styles/typography/fonts.css +12 -0
- package/src/styles/typography/prose.css +12 -0
- package/src/styles/typography.css +12 -0
- package/src/styles/utils/scroll-layout-shift.css +12 -0
- package/src/styles/utils/utility-classes.css +12 -0
- package/src/styles/utils/utils.css +12 -0
- package/src/widgets/datepicker/datepicker.module.css +21 -2
- package/src/widgets/datepicker/datepicker.tsx +98 -5
- package/src/widgets/drawer/drawer-container.tsx +1 -1
- package/src/widgets/drawer/drawer-content.tsx +1 -1
- package/src/widgets/drawer/drawer-header.tsx +1 -1
- package/src/widgets/drawer/drawer-top-actions.tsx +1 -1
- package/src/widgets/drawer/drawer.module.css +11 -1
- package/src/widgets/drawer/drawer.tsx +1 -1
- package/src/widgets/modal/modal-actions.tsx +1 -1
- package/src/widgets/modal/modal-container.tsx +1 -1
- package/src/widgets/modal/modal-content.tsx +1 -1
- package/src/widgets/modal/modal-context.ts +23 -0
- package/src/widgets/modal/modal-header.tsx +30 -3
- package/src/widgets/modal/modal.module.css +11 -1
- package/src/widgets/modal/modal.tsx +16 -7
- package/src/widgets/timeline/timeline.module.css +9 -4
- package/src/widgets/timeline/timeline.tsx +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer infonomic-typography{:root{--font-sans:"Inter", ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-display:"Roboto", ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-serif:"Merriweather", Georgia, Cambria, "Times New Roman", Times, serif;--font-mono:"Source Code Pro", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace}.sans{font-family:var(--font-sans)}.serif{font-family:var(--font-serif)}.mono{font-family:var(--font-mono)}.display{font-family:var(--font-display)}:root{--prose-body:var(--gray-900);--prose-headings:var(--gray-900);--prose-lead:#4b5563;--prose-links:var(--accent-950);--prose-counters:#6b7280;--prose-bullets:#d1d5db;--prose-hr:#e5e7eb;--prose-quotes:var(--accent-700);--prose-quote-borders:var(--accent-700);--prose-captions:#6b7280;--prose-kbd:#111827;--prose-kbd-shadows:17 24 39;--prose-code:#1e293b;--prose-code-background:#efefef;--prose-code-borders:#ccc;--prose-pre-code:#e5e7eb;--prose-pre-background:#1f2937;--prose-invert-body:var(--gray-50);--prose-invert-headings:var(--gray-50);--prose-invert-lead:#9ca3af;--prose-invert-links:var(--accent-500);--prose-invert-counters:#9ca3af;--prose-invert-bullets:#4b5563;--prose-invert-hr:#374151;--prose-invert-quotes:var(--accent-400);--prose-invert-quote-borders:var(--accent-400);--prose-invert-captions:#9ca3af;--prose-invert-kbd:#fff;--prose-invert-kbd-shadows:255 255 255;--prose-invert-code:#f1f5f9;--prose-invert-code-background:#222;--prose-invert-code-borders:#333;--prose-invert-pre-code:#d1d5db;--prose-invert-pre-background:#161d27;--prose-invert-th-borders:#4b5563;--prose-invert-td-borders:#374151}.dark{--prose-body:var(--prose-invert-body);--prose-headings:var(--prose-invert-headings);--prose-lead:var(--prose-invert-lead);--prose-links:var(--prose-invert-links);--prose-counters:var(--prose-invert-counters);--prose-bullets:var(--prose-invert-bullets);--prose-hr:var(--prose-invert-hr);--prose-quotes:var(--prose-invert-quotes);--prose-quote-borders:var(--prose-invert-quote-borders);--prose-captions:var(--prose-invert-captions);--prose-kbd:var(--prose-invert-kbd);--prose-kbd-shadows:var(--prose-invert-kbd-shadows);--prose-code:var(--prose-invert-code);--prose-code-background:var(--prose-invert-code-background);--prose-code-borders:var(--prose-invert-code-borders);--prose-pre-code:var(--prose-invert-pre-code);--prose-pre-background:var(--prose-invert-pre-background)}.not-dark{--prose-body:var(--gray-900);--prose-headings:var(--gray-900);--prose-lead:#4b5563;--prose-links:var(--accent-950);--prose-counters:#6b7280;--prose-bullets:#d1d5db;--prose-hr:#e5e7eb;--prose-quotes:var(--accent-700);--prose-quote-borders:var(--accent-700);--prose-captions:#6b7280;--prose-kbd:#111827;--prose-kbd-shadows:17 24 39;--prose-code:#1e293b;--prose-code-background:#efefef;--prose-code-borders:#ccc;--prose-pre-code:#e5e7eb;--prose-pre-background:#1f2937}html{color:var(--prose-body);font-size:1rem}html .not-dark{color:var(--prose-body)}article,.editor-text,.break-long-words{overflow-wrap:anywhere}article,.dynamic-text{font-size:1.25rem;line-height:1.6}@media screen and (width>=48rem){article,.dynamic-text{font-size:1.125rem;line-height:1.64}}.prose{& h1,& h2,& h3,& h4,& h5{color:var(--prose-headings)}}.prose :where(h1):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:1rem;font-size:2.5rem;font-weight:600;line-height:1.125}.prose :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.5rem;margin-bottom:.75rem;font-size:2rem;font-weight:600;line-height:1.2}.prose :where(h3):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25rem;margin-bottom:.75rem;font-size:1.75rem;font-weight:600;line-height:1.1}.prose :where(h4):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25rem;margin-bottom:.65rem;font-size:1.55rem;font-weight:600;line-height:1.1}.prose :where(p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}.prose-lg :where(p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em;font-size:1.125rem;line-height:1.64}.prose-xl :where(p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em;font-size:1.25rem;line-height:1.6}.prose :where([class~=lead]):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--prose-lead);margin-top:1.2em;margin-bottom:1.2em;font-size:1.25em;line-height:1.4}.prose :where(a):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--prose-links);font-weight:500;text-decoration:underline}.prose :where(strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--prose-bold);font-weight:500}.prose :where(a strong):not(:where([class~=not-prose],[class~=not-prose] *)),.prose :where(blockquote strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em;padding-inline-start:1.625em;list-style-type:decimal}.prose :where(ol[type=A]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}.prose :where(ol[type=a]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}.prose :where(ol[type=A s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}.prose :where(ol[type=a s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}.prose :where(ol[type=I]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}.prose :where(ol[type=i]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}.prose :where(ol[type=I s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}.prose :where(ol[type=i s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}.prose :where(ol[type="1"]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:decimal}.prose :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em;padding-inline-start:1.625em;list-style-type:disc}.prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{color:var(--prose-counters);font-weight:400}.prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{color:var(--prose-bullets)}.prose :where(dt):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--prose-headings);margin-top:1.25em;font-weight:500}.prose :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)){border-color:var(--prose-hr);border-top-width:1px;margin-top:3em;margin-bottom:3em}.prose :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--prose-quotes);quotes:none;border-inline-start-width:.25rem;border-inline-start-color:var(--prose-quote-borders);margin-top:1.3rem;margin-bottom:1.3rem;margin-right:2rem;padding-inline-start:1rem;font-size:1.2em;font-style:normal;font-weight:600;line-height:1.3}@media (width>=48rem){.prose :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:1.2em;line-height:1.3}}.prose :where(blockquote p:first-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:open-quote}.prose :where(blockquote p:last-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:close-quote}.prose :where(img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(picture):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em;display:block}.prose :where(video):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--prose-kbd);box-shadow:0 0 0 1px rgb(var(--prose-kbd-shadows) / 10%), 0 3px 0 rgb(var(--prose-kbd-shadows) / 10%);padding-top:.1875em;padding-inline-end:.375em;padding-bottom:.1875em;border-radius:.3125rem;padding-inline-start:.375em;font-family:inherit;font-size:.875em;font-weight:500}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--prose-code);background-color:var(--prose-code-background);border-color:var(--prose-code-borders);border-width:1px;border-radius:.25rem;padding:.125rem .375rem;font-size:.875em;font-weight:400}.prose :where(pre):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--prose-pre-code);background-color:var(--prose-pre-background);padding-top:.857143em;padding-inline-end:1.14286em;padding-bottom:.857143em;border-radius:.375rem;margin-top:1.71429em;margin-bottom:1.71429em;padding-inline-start:1.14286em;font-weight:400;line-height:1.71429;overflow-x:auto}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)){background-color:initial;font-weight:inherit;color:inherit;font-family:inherit;font-size:1em;line-height:inherit;padding:0;border-width:0;border-radius:0;padding:0}html,.font-sans{font-family:var(--font-sans)}.font-display{font-family:var(--font-display)}.font-serif{font-family:var(--font-serif)}.font-mono{font-family:var(--font-mono)}}
|
|
1
|
+
@layer base,infonomic-base,theme,infonomic-theme,infonomic-functional;@layer infonomic-typography{:root{--font-sans:"Inter", ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-display:"Roboto", ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-serif:"Merriweather", Georgia, Cambria, "Times New Roman", Times, serif;--font-mono:"Source Code Pro", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace}.sans{font-family:var(--font-sans)}.serif{font-family:var(--font-serif)}.mono{font-family:var(--font-mono)}.display{font-family:var(--font-display)}:root{--prose-body:var(--gray-900);--prose-headings:var(--gray-900);--prose-lead:#4b5563;--prose-links:var(--accent-950);--prose-counters:#6b7280;--prose-bullets:#d1d5db;--prose-hr:#e5e7eb;--prose-quotes:var(--accent-700);--prose-quote-borders:var(--accent-700);--prose-captions:#6b7280;--prose-kbd:#111827;--prose-kbd-shadows:17 24 39;--prose-code:#1e293b;--prose-code-background:#efefef;--prose-code-borders:#ccc;--prose-pre-code:#e5e7eb;--prose-pre-background:#1f2937;--prose-invert-body:var(--gray-50);--prose-invert-headings:var(--gray-50);--prose-invert-lead:#9ca3af;--prose-invert-links:var(--accent-500);--prose-invert-counters:#9ca3af;--prose-invert-bullets:#4b5563;--prose-invert-hr:#374151;--prose-invert-quotes:var(--accent-400);--prose-invert-quote-borders:var(--accent-400);--prose-invert-captions:#9ca3af;--prose-invert-kbd:#fff;--prose-invert-kbd-shadows:255 255 255;--prose-invert-code:#f1f5f9;--prose-invert-code-background:#222;--prose-invert-code-borders:#333;--prose-invert-pre-code:#d1d5db;--prose-invert-pre-background:#161d27;--prose-invert-th-borders:#4b5563;--prose-invert-td-borders:#374151}.dark{--prose-body:var(--prose-invert-body);--prose-headings:var(--prose-invert-headings);--prose-lead:var(--prose-invert-lead);--prose-links:var(--prose-invert-links);--prose-counters:var(--prose-invert-counters);--prose-bullets:var(--prose-invert-bullets);--prose-hr:var(--prose-invert-hr);--prose-quotes:var(--prose-invert-quotes);--prose-quote-borders:var(--prose-invert-quote-borders);--prose-captions:var(--prose-invert-captions);--prose-kbd:var(--prose-invert-kbd);--prose-kbd-shadows:var(--prose-invert-kbd-shadows);--prose-code:var(--prose-invert-code);--prose-code-background:var(--prose-invert-code-background);--prose-code-borders:var(--prose-invert-code-borders);--prose-pre-code:var(--prose-invert-pre-code);--prose-pre-background:var(--prose-invert-pre-background)}.not-dark{--prose-body:var(--gray-900);--prose-headings:var(--gray-900);--prose-lead:#4b5563;--prose-links:var(--accent-950);--prose-counters:#6b7280;--prose-bullets:#d1d5db;--prose-hr:#e5e7eb;--prose-quotes:var(--accent-700);--prose-quote-borders:var(--accent-700);--prose-captions:#6b7280;--prose-kbd:#111827;--prose-kbd-shadows:17 24 39;--prose-code:#1e293b;--prose-code-background:#efefef;--prose-code-borders:#ccc;--prose-pre-code:#e5e7eb;--prose-pre-background:#1f2937}html{color:var(--prose-body);font-size:1rem}html .not-dark{color:var(--prose-body)}article,.editor-text,.break-long-words{overflow-wrap:anywhere}article,.dynamic-text{font-size:1.25rem;line-height:1.6}@media screen and (width>=48rem){article,.dynamic-text{font-size:1.125rem;line-height:1.64}}.prose{& h1,& h2,& h3,& h4,& h5{color:var(--prose-headings)}}.prose :where(h1):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:1rem;font-size:2.5rem;font-weight:600;line-height:1.125}.prose :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.5rem;margin-bottom:.75rem;font-size:2rem;font-weight:600;line-height:1.2}.prose :where(h3):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25rem;margin-bottom:.75rem;font-size:1.75rem;font-weight:600;line-height:1.1}.prose :where(h4):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25rem;margin-bottom:.65rem;font-size:1.55rem;font-weight:600;line-height:1.1}.prose :where(p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}.prose-lg :where(p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em;font-size:1.125rem;line-height:1.64}.prose-xl :where(p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em;font-size:1.25rem;line-height:1.6}.prose :where([class~=lead]):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--prose-lead);margin-top:1.2em;margin-bottom:1.2em;font-size:1.25em;line-height:1.4}.prose :where(a):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--prose-links);font-weight:500;text-decoration:underline}.prose :where(strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--prose-bold);font-weight:500}.prose :where(a strong):not(:where([class~=not-prose],[class~=not-prose] *)),.prose :where(blockquote strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em;padding-inline-start:1.625em;list-style-type:decimal}.prose :where(ol[type=A]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}.prose :where(ol[type=a]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}.prose :where(ol[type=A s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}.prose :where(ol[type=a s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}.prose :where(ol[type=I]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}.prose :where(ol[type=i]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}.prose :where(ol[type=I s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}.prose :where(ol[type=i s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}.prose :where(ol[type="1"]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:decimal}.prose :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em;padding-inline-start:1.625em;list-style-type:disc}.prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{color:var(--prose-counters);font-weight:400}.prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{color:var(--prose-bullets)}.prose :where(dt):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--prose-headings);margin-top:1.25em;font-weight:500}.prose :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)){border-color:var(--prose-hr);border-top-width:1px;margin-top:3em;margin-bottom:3em}.prose :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--prose-quotes);quotes:none;border-inline-start-width:.25rem;border-inline-start-color:var(--prose-quote-borders);margin-top:1.3rem;margin-bottom:1.3rem;margin-right:2rem;padding-inline-start:1rem;font-size:1.2em;font-style:normal;font-weight:600;line-height:1.3}@media (width>=48rem){.prose :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:1.2em;line-height:1.3}}.prose :where(blockquote p:first-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:open-quote}.prose :where(blockquote p:last-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:close-quote}.prose :where(img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(picture):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em;display:block}.prose :where(video):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--prose-kbd);box-shadow:0 0 0 1px rgb(var(--prose-kbd-shadows) / 10%), 0 3px 0 rgb(var(--prose-kbd-shadows) / 10%);padding-top:.1875em;padding-inline-end:.375em;padding-bottom:.1875em;border-radius:.3125rem;padding-inline-start:.375em;font-family:inherit;font-size:.875em;font-weight:500}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--prose-code);background-color:var(--prose-code-background);border-color:var(--prose-code-borders);border-width:1px;border-radius:.25rem;padding:.125rem .375rem;font-size:.875em;font-weight:400}.prose :where(pre):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--prose-pre-code);background-color:var(--prose-pre-background);padding-top:.857143em;padding-inline-end:1.14286em;padding-bottom:.857143em;border-radius:.375rem;margin-top:1.71429em;margin-bottom:1.71429em;padding-inline-start:1.14286em;font-weight:400;line-height:1.71429;overflow-x:auto}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)){background-color:initial;font-weight:inherit;color:inherit;font-family:inherit;font-size:1em;line-height:inherit;padding:0;border-width:0;border-radius:0;padding:0}html,.font-sans{font-family:var(--font-sans)}.font-display{font-family:var(--font-display)}.font-serif{font-family:var(--font-serif)}.font-mono{font-family:var(--font-mono)}}@layer components,infonomic-components,overrides,infonomic-utilities,utilities;
|
|
@@ -6,6 +6,23 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import type React from 'react';
|
|
8
8
|
import type { Intent, Size, Variant } from '../../components/inputs/@types/input.js';
|
|
9
|
+
/**
|
|
10
|
+
* The selection as the editor made it: a calendar day and a clock reading,
|
|
11
|
+
* with no instant attached.
|
|
12
|
+
*
|
|
13
|
+
* `onDateChange` reports a `Date`, which is an instant, and building one from a
|
|
14
|
+
* wall time goes through `setHours` — so on the two days a year the clocks
|
|
15
|
+
* change, the instant is not the time that was picked. A spring-forward 02:30
|
|
16
|
+
* comes back as 03:30, and an ambiguous autumn 01:30 silently resolves to the
|
|
17
|
+
* earlier of its two instants. Callers that must reject or disambiguate those
|
|
18
|
+
* cases need the wall time itself, which is what this carries.
|
|
19
|
+
*/
|
|
20
|
+
export interface DatePickerWallTime {
|
|
21
|
+
/** Calendar day as `YYYY-MM-DD`. */
|
|
22
|
+
date: string;
|
|
23
|
+
/** Clock reading as `HH:mm`, 24-hour. */
|
|
24
|
+
time: string;
|
|
25
|
+
}
|
|
9
26
|
export interface DatePickerProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
10
27
|
id: string;
|
|
11
28
|
name: string;
|
|
@@ -13,6 +30,23 @@ export interface DatePickerProps extends React.InputHTMLAttributes<HTMLInputElem
|
|
|
13
30
|
required?: boolean;
|
|
14
31
|
initialValue?: Date | null;
|
|
15
32
|
mode?: 'date' | 'datetime';
|
|
33
|
+
/**
|
|
34
|
+
* Earliest selectable day. Days before it are disabled in the calendar and
|
|
35
|
+
* the month navigation will not go back past its month.
|
|
36
|
+
*
|
|
37
|
+
* Day granularity only — the day containing `minDate` stays selectable in
|
|
38
|
+
* full, and in `datetime` mode every slot in the time list remains offered.
|
|
39
|
+
* A caller that needs a cutoff finer than a day has to enforce it itself.
|
|
40
|
+
*/
|
|
41
|
+
minDate?: Date;
|
|
42
|
+
/**
|
|
43
|
+
* Latest selectable day, the mirror of `minDate`: days after it are disabled
|
|
44
|
+
* and the month navigation will not go forward past its month. Takes
|
|
45
|
+
* precedence over `yearsInFuture`, which otherwise sets the upper bound.
|
|
46
|
+
*
|
|
47
|
+
* Day granularity only, on the same terms as `minDate`.
|
|
48
|
+
*/
|
|
49
|
+
maxDate?: Date;
|
|
16
50
|
yearsInFuture?: number;
|
|
17
51
|
yearsInPast?: number;
|
|
18
52
|
variant?: Variant;
|
|
@@ -28,11 +62,18 @@ export interface DatePickerProps extends React.InputHTMLAttributes<HTMLInputElem
|
|
|
28
62
|
ariaLabelForClear?: string;
|
|
29
63
|
onClear?: () => void;
|
|
30
64
|
onDateChange?: (value: Date | null) => void;
|
|
65
|
+
/**
|
|
66
|
+
* Fired alongside `onDateChange` with the day and clock reading the editor
|
|
67
|
+
* actually selected, before any instant is derived from them. Optional and
|
|
68
|
+
* additive — callers that are happy with the `Date` can ignore it entirely.
|
|
69
|
+
* Reports `null` when the selection is cleared.
|
|
70
|
+
*/
|
|
71
|
+
onWallTimeChange?: (wall: DatePickerWallTime | null) => void;
|
|
31
72
|
validatorFn?: (value: Date) => {
|
|
32
73
|
valid: boolean;
|
|
33
74
|
value: Date;
|
|
34
75
|
};
|
|
35
76
|
placeHolderText?: string;
|
|
36
77
|
}
|
|
37
|
-
export declare function DatePicker({ id, name, label, required, initialValue, mode, yearsInFuture, yearsInPast, variant, intent, inputSize, inputClassName, inputWrapperClassName, containerClassName, contentClassName, onClear, onDateChange, validatorFn, helpText, errorText, placeHolderText, ariaLabelForSearch, ariaLabelForClear, ...rest }: DatePickerProps): React.JSX.Element;
|
|
78
|
+
export declare function DatePicker({ id, name, label, required, initialValue, mode, minDate, maxDate, yearsInFuture, yearsInPast, variant, intent, inputSize, inputClassName, inputWrapperClassName, containerClassName, contentClassName, onClear, onDateChange, onWallTimeChange, validatorFn, helpText, errorText, placeHolderText, ariaLabelForSearch, ariaLabelForClear, ...rest }: DatePickerProps): React.JSX.Element;
|
|
38
79
|
//# sourceMappingURL=datepicker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"datepicker.d.ts","sourceRoot":"","sources":["../../../src/widgets/datepicker/datepicker.tsx"],"names":[],"mappings":"AAEA;;;;;GAKG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAgB9B,OAAO,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,yCAAyC,CAAA;AAEpF,MAAM,WAAW,eAAgB,SAAQ,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC;IAClF,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,YAAY,CAAC,EAAE,IAAI,GAAG,IAAI,CAAA;IAC1B,IAAI,CAAC,EAAE,MAAM,GAAG,UAAU,CAAA;IAC1B,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,SAAS,CAAC,EAAE,IAAI,CAAA;IAChB,qBAAqB,CAAC,EAAE,MAAM,CAAA;IAC9B,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,IAAI,GAAG,IAAI,KAAK,IAAI,CAAA;IAC3C,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,IAAI,KAAK;QAC7B,KAAK,EAAE,OAAO,CAAA;QACd,KAAK,EAAE,IAAI,CAAA;KACZ,CAAA;IACD,eAAe,CAAC,EAAE,MAAM,CAAA;CACzB;AAED,wBAAgB,UAAU,CAAC,EACzB,EAAE,EACF,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,YAAY,EACZ,IAAiB,EACjB,aAAiB,EACjB,WAAgB,EAChB,OAAO,EACP,MAAM,EACN,SAAS,EACT,cAAc,EACd,qBAAqB,EACrB,kBAAkB,EAClB,gBAAgB,EAChB,OAAkB,EAClB,YAAuB,EACvB,WAAW,EACX,QAAQ,EACR,SAAS,EACT,eAAoB,EACpB,kBAA2B,EAC3B,iBAA2B,EAC3B,GAAG,IAAI,EACR,EAAE,eAAe,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,
|
|
1
|
+
{"version":3,"file":"datepicker.d.ts","sourceRoot":"","sources":["../../../src/widgets/datepicker/datepicker.tsx"],"names":[],"mappings":"AAEA;;;;;GAKG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAgB9B,OAAO,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,yCAAyC,CAAA;AAEpF;;;;;;;;;;GAUG;AACH,MAAM,WAAW,kBAAkB;IACjC,oCAAoC;IACpC,IAAI,EAAE,MAAM,CAAA;IACZ,yCAAyC;IACzC,IAAI,EAAE,MAAM,CAAA;CACb;AAED,MAAM,WAAW,eAAgB,SAAQ,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC;IAClF,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,YAAY,CAAC,EAAE,IAAI,GAAG,IAAI,CAAA;IAC1B,IAAI,CAAC,EAAE,MAAM,GAAG,UAAU,CAAA;IAC1B;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,IAAI,CAAA;IACd;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,IAAI,CAAA;IACd,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,SAAS,CAAC,EAAE,IAAI,CAAA;IAChB,qBAAqB,CAAC,EAAE,MAAM,CAAA;IAC9B,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,IAAI,GAAG,IAAI,KAAK,IAAI,CAAA;IAC3C;;;;;OAKG;IACH,gBAAgB,CAAC,EAAE,CAAC,IAAI,EAAE,kBAAkB,GAAG,IAAI,KAAK,IAAI,CAAA;IAC5D,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,IAAI,KAAK;QAC7B,KAAK,EAAE,OAAO,CAAA;QACd,KAAK,EAAE,IAAI,CAAA;KACZ,CAAA;IACD,eAAe,CAAC,EAAE,MAAM,CAAA;CACzB;AAED,wBAAgB,UAAU,CAAC,EACzB,EAAE,EACF,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,YAAY,EACZ,IAAiB,EACjB,OAAO,EACP,OAAO,EACP,aAAiB,EACjB,WAAgB,EAChB,OAAO,EACP,MAAM,EACN,SAAS,EACT,cAAc,EACd,qBAAqB,EACrB,kBAAkB,EAClB,gBAAgB,EAChB,OAAkB,EAClB,YAAuB,EACvB,gBAAgB,EAChB,WAAW,EACX,QAAQ,EACR,SAAS,EACT,eAAoB,EACpB,kBAA2B,EAC3B,iBAA2B,EAC3B,GAAG,IAAI,EACR,EAAE,eAAe,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAiUrC"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { useEffect, useRef, useState } from "react";
|
|
4
4
|
import { Popover } from "@base-ui/react/popover";
|
|
5
|
-
import
|
|
5
|
+
import clsx from "clsx";
|
|
6
6
|
import { format } from "date-fns";
|
|
7
7
|
import { Button } from "../../components/button/button.js";
|
|
8
8
|
import { IconButton } from "../../components/button/icon-button.js";
|
|
@@ -13,14 +13,14 @@ import { ScrollArea } from "../../components/scroll-area/scroll-area.js";
|
|
|
13
13
|
import { CalendarIcon } from "../../icons/calendar-icon.js";
|
|
14
14
|
import { CloseIcon } from "../../icons/close-icon.js";
|
|
15
15
|
import datepicker_module from "./datepicker.module.js";
|
|
16
|
-
function DatePicker({ id, name, label, required, initialValue, mode = 'datetime', yearsInFuture = 1, yearsInPast = 10, variant, intent, inputSize, inputClassName, inputWrapperClassName, containerClassName, contentClassName, onClear = ()=>{}, onDateChange = ()=>{}, validatorFn, helpText, errorText, placeHolderText = '', ariaLabelForSearch = 'date', ariaLabelForClear = 'clear', ...rest }) {
|
|
16
|
+
function DatePicker({ id, name, label, required, initialValue, mode = 'datetime', minDate, maxDate, yearsInFuture = 1, yearsInPast = 10, variant, intent, inputSize, inputClassName, inputWrapperClassName, containerClassName, contentClassName, onClear = ()=>{}, onDateChange = ()=>{}, onWallTimeChange, validatorFn, helpText, errorText, placeHolderText = '', ariaLabelForSearch = 'date', ariaLabelForClear = 'clear', ...rest }) {
|
|
17
17
|
const [isOpen, setIsOpen] = useState(false);
|
|
18
|
-
const [time, setTime] = useState('08:00');
|
|
19
18
|
const [date, setDate] = useState(()=>{
|
|
20
19
|
if (initialValue) return initialValue;
|
|
21
20
|
if (null == initialValue && true === required) return new Date();
|
|
22
21
|
return null;
|
|
23
22
|
});
|
|
23
|
+
const [time, setTime] = useState(()=>null != date ? format(date, 'HH:mm') : '08:00');
|
|
24
24
|
const [month, setMonth] = useState(date);
|
|
25
25
|
const calendarRef = useRef(null);
|
|
26
26
|
const inputRef = useRef(null);
|
|
@@ -29,11 +29,31 @@ function DatePicker({ id, name, label, required, initialValue, mode = 'datetime'
|
|
|
29
29
|
if (inputRef?.current != null) inputRef.current.value = '';
|
|
30
30
|
setDate(null);
|
|
31
31
|
onDateChange(null);
|
|
32
|
+
emitWallTime(null, time);
|
|
32
33
|
onClear();
|
|
33
34
|
};
|
|
34
35
|
const handleOnDateChange = (value)=>{
|
|
35
36
|
if (null != onDateChange && 'function' == typeof onDateChange) onDateChange(value);
|
|
36
37
|
};
|
|
38
|
+
const emitWallTime = (day, clock)=>{
|
|
39
|
+
if (null == onWallTimeChange) return;
|
|
40
|
+
onWallTimeChange(null == day ? null : {
|
|
41
|
+
date: format(day, 'yyyy-MM-dd'),
|
|
42
|
+
time: clock
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
const disabledDays = [
|
|
46
|
+
...null == minDate ? [] : [
|
|
47
|
+
{
|
|
48
|
+
before: minDate
|
|
49
|
+
}
|
|
50
|
+
],
|
|
51
|
+
...null == maxDate ? [] : [
|
|
52
|
+
{
|
|
53
|
+
after: maxDate
|
|
54
|
+
}
|
|
55
|
+
]
|
|
56
|
+
];
|
|
37
57
|
const handleOnKeyDown = (e)=>{
|
|
38
58
|
if ('ArrowDown' === e.key) {
|
|
39
59
|
e.preventDefault();
|
|
@@ -44,10 +64,11 @@ function DatePicker({ id, name, label, required, initialValue, mode = 'datetime'
|
|
|
44
64
|
if (null == initialValue && null != date && true === required && false === hasInitialized.current) {
|
|
45
65
|
hasInitialized.current = true;
|
|
46
66
|
onDateChange(date);
|
|
67
|
+
emitWallTime(date, time);
|
|
47
68
|
}
|
|
48
69
|
});
|
|
49
70
|
return /*#__PURE__*/ jsxs("div", {
|
|
50
|
-
className:
|
|
71
|
+
className: clsx('infonomic-datepicker-container', datepicker_module.container, containerClassName),
|
|
51
72
|
children: [
|
|
52
73
|
/*#__PURE__*/ jsx("div", {
|
|
53
74
|
style: {
|
|
@@ -65,8 +86,8 @@ function DatePicker({ id, name, label, required, initialValue, mode = 'datetime'
|
|
|
65
86
|
intent: intent,
|
|
66
87
|
inputSize: inputSize,
|
|
67
88
|
ref: inputRef,
|
|
68
|
-
className:
|
|
69
|
-
inputWrapperClassName:
|
|
89
|
+
className: clsx('infonomic-datepicker-input', datepicker_module.input, inputClassName),
|
|
90
|
+
inputWrapperClassName: clsx('infonomic-datepicker-input-wrapper', datepicker_module["input-wrapper"], inputWrapperClassName),
|
|
70
91
|
onKeyDown: handleOnKeyDown,
|
|
71
92
|
onClick: (e)=>{
|
|
72
93
|
e.preventDefault();
|
|
@@ -134,11 +155,12 @@ function DatePicker({ id, name, label, required, initialValue, mode = 'datetime'
|
|
|
134
155
|
/*#__PURE__*/ jsx(Popover.Portal, {
|
|
135
156
|
children: /*#__PURE__*/ jsx(Popover.Positioner, {
|
|
136
157
|
sideOffset: 5,
|
|
158
|
+
className: clsx('infonomic-datepicker-positioner', datepicker_module.positioner),
|
|
137
159
|
children: /*#__PURE__*/ jsxs(Popover.Popup, {
|
|
138
|
-
className:
|
|
160
|
+
className: clsx('infonomic-datepicker-content', datepicker_module.content, contentClassName),
|
|
139
161
|
children: [
|
|
140
162
|
/*#__PURE__*/ jsxs("div", {
|
|
141
|
-
className:
|
|
163
|
+
className: clsx('infonomic-datepicker-content-components', datepicker_module["content-components"]),
|
|
142
164
|
children: [
|
|
143
165
|
/*#__PURE__*/ jsx("div", {
|
|
144
166
|
ref: calendarRef,
|
|
@@ -151,15 +173,18 @@ function DatePicker({ id, name, label, required, initialValue, mode = 'datetime'
|
|
|
151
173
|
onMonthChange: setMonth,
|
|
152
174
|
onSelect: (selectedDate)=>{
|
|
153
175
|
if (selectedDate) {
|
|
176
|
+
const day = new Date(selectedDate.getTime());
|
|
154
177
|
const [hours, minutes] = time.split(':');
|
|
155
178
|
selectedDate.setHours(Number.parseInt(hours, 10), Number.parseInt(minutes, 10));
|
|
156
179
|
setDate(selectedDate);
|
|
157
180
|
setMonth(selectedDate);
|
|
158
181
|
handleOnDateChange(selectedDate);
|
|
182
|
+
emitWallTime(day, time);
|
|
159
183
|
}
|
|
160
184
|
},
|
|
161
|
-
|
|
162
|
-
|
|
185
|
+
disabled: disabledDays.length > 0 ? disabledDays : void 0,
|
|
186
|
+
startMonth: minDate ?? new Date(new Date().getFullYear() - yearsInPast, 0),
|
|
187
|
+
endMonth: maxDate ?? new Date(new Date().getFullYear() + yearsInFuture, 0)
|
|
163
188
|
})
|
|
164
189
|
}),
|
|
165
190
|
'datetime' === mode && /*#__PURE__*/ jsx("div", {
|
|
@@ -185,6 +210,7 @@ function DatePicker({ id, name, label, required, initialValue, mode = 'datetime'
|
|
|
185
210
|
newDate.setHours(Number.parseInt(hour, 10), Number.parseInt(minute, 10), 0);
|
|
186
211
|
setDate(newDate);
|
|
187
212
|
handleOnDateChange(newDate);
|
|
213
|
+
emitWallTime(date, timeValue);
|
|
188
214
|
}
|
|
189
215
|
},
|
|
190
216
|
children: timeValue
|
|
@@ -196,25 +222,28 @@ function DatePicker({ id, name, label, required, initialValue, mode = 'datetime'
|
|
|
196
222
|
]
|
|
197
223
|
}),
|
|
198
224
|
/*#__PURE__*/ jsxs("div", {
|
|
199
|
-
className:
|
|
225
|
+
className: clsx('infonomic-datepicker-status-and-actions', datepicker_module["status-and-actions"]),
|
|
200
226
|
children: [
|
|
201
227
|
/*#__PURE__*/ jsx("div", {
|
|
202
|
-
className:
|
|
228
|
+
className: clsx('infonomic-datepicker-content-status', datepicker_module["content-status"]),
|
|
203
229
|
children: date ? format(date, 'datetime' === mode ? 'PPPp' : 'PPP') : 'No date selected'
|
|
204
230
|
}),
|
|
205
231
|
/*#__PURE__*/ jsxs("div", {
|
|
206
|
-
className:
|
|
232
|
+
className: clsx('infonomic-datepicker-content-actions', datepicker_module["content-actions"]),
|
|
207
233
|
children: [
|
|
208
234
|
/*#__PURE__*/ jsx("div", {
|
|
209
235
|
children: /*#__PURE__*/ jsx(Button, {
|
|
210
236
|
variant: "outlined",
|
|
211
237
|
size: "sm",
|
|
212
|
-
className:
|
|
238
|
+
className: clsx('infonomic-datepicker-content-actions-button', datepicker_module["content-actions-button"]),
|
|
213
239
|
onClick: ()=>{
|
|
214
240
|
const today = new Date();
|
|
241
|
+
const clock = format(today, 'HH:mm');
|
|
215
242
|
setDate(today);
|
|
216
243
|
setMonth(today);
|
|
244
|
+
setTime(clock);
|
|
217
245
|
handleOnDateChange(today);
|
|
246
|
+
emitWallTime(today, clock);
|
|
218
247
|
},
|
|
219
248
|
children: "Today"
|
|
220
249
|
})
|
|
@@ -228,7 +257,7 @@ function DatePicker({ id, name, label, required, initialValue, mode = 'datetime'
|
|
|
228
257
|
/*#__PURE__*/ jsx(Button, {
|
|
229
258
|
size: "sm",
|
|
230
259
|
intent: "noeffect",
|
|
231
|
-
className:
|
|
260
|
+
className: clsx('infonomic-datepicker-content-actions-button', datepicker_module["content-actions-button"]),
|
|
232
261
|
onClick: ()=>{
|
|
233
262
|
setIsOpen(false);
|
|
234
263
|
},
|
|
@@ -237,10 +266,11 @@ function DatePicker({ id, name, label, required, initialValue, mode = 'datetime'
|
|
|
237
266
|
/*#__PURE__*/ jsx(Button, {
|
|
238
267
|
variant: "outlined",
|
|
239
268
|
size: "sm",
|
|
240
|
-
className:
|
|
269
|
+
className: clsx('infonomic-datepicker-content-actions-button', datepicker_module["content-actions-button"]),
|
|
241
270
|
onClick: ()=>{
|
|
242
271
|
setIsOpen(false);
|
|
243
272
|
handleOnDateChange(date);
|
|
273
|
+
emitWallTime(date, time);
|
|
244
274
|
},
|
|
245
275
|
children: "Select"
|
|
246
276
|
})
|
|
@@ -1,4 +1,14 @@
|
|
|
1
|
-
@layer
|
|
1
|
+
@layer base,
|
|
2
|
+
infonomic-base,
|
|
3
|
+
theme,
|
|
4
|
+
infonomic-theme,
|
|
5
|
+
infonomic-functional,
|
|
6
|
+
infonomic-typography,
|
|
7
|
+
components,
|
|
8
|
+
infonomic-components,
|
|
9
|
+
overrides,
|
|
10
|
+
infonomic-utilities,
|
|
11
|
+
utilities;
|
|
2
12
|
|
|
3
13
|
@layer infonomic-components {
|
|
4
14
|
.container,
|
|
@@ -13,10 +23,19 @@
|
|
|
13
23
|
width: 100%;
|
|
14
24
|
}
|
|
15
25
|
|
|
26
|
+
/* Base UI's Positioner is the absolutely-positioned element, so it is the
|
|
27
|
+
one that can take part in z-index stacking. The Popup inside it is
|
|
28
|
+
`position: static`, where a z-index is inert — which is why the calendar
|
|
29
|
+
lost to any positioned ancestor above it in the tree, most visibly by
|
|
30
|
+
rendering behind a Modal. */
|
|
31
|
+
.positioner,
|
|
32
|
+
:global(.infonomic-datepicker-positioner) {
|
|
33
|
+
z-index: 50;
|
|
34
|
+
}
|
|
35
|
+
|
|
16
36
|
.content,
|
|
17
37
|
:global(.infonomic-datepicker-content) {
|
|
18
38
|
width: 100%;
|
|
19
|
-
z-index: 50;
|
|
20
39
|
border-radius: 4px;
|
|
21
40
|
padding-top: var(--spacing-16);
|
|
22
41
|
padding-bottom: var(--spacing-8);
|
|
@@ -4,6 +4,7 @@ const datepicker_module = {
|
|
|
4
4
|
input: "input-SaODq9",
|
|
5
5
|
"input-wrapper": "input-wrapper-qwAckv",
|
|
6
6
|
inputWrapper: "input-wrapper-qwAckv",
|
|
7
|
+
positioner: "positioner-l698qq",
|
|
7
8
|
content: "content-UK9iLF",
|
|
8
9
|
slideDownAndFade: "slideDownAndFade-dohHTE",
|
|
9
10
|
slideLeftAndFade: "slideLeftAndFade-ugM6Hs",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@layer infonomic-base, infonomic-
|
|
1
|
+
@layer base, infonomic-base, theme, infonomic-theme, infonomic-functional, infonomic-typography, components;
|
|
2
2
|
|
|
3
3
|
@layer infonomic-components {
|
|
4
4
|
:is(.container-u5_VUp, .infonomic-datepicker-container) {
|
|
@@ -9,8 +9,11 @@
|
|
|
9
9
|
width: 100%;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
:is(.
|
|
12
|
+
:is(.positioner-l698qq, .infonomic-datepicker-positioner) {
|
|
13
13
|
z-index: 50;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
:is(.content-UK9iLF, .infonomic-datepicker-content) {
|
|
14
17
|
width: 100%;
|
|
15
18
|
padding-top: var(--spacing-16);
|
|
16
19
|
padding-bottom: var(--spacing-8);
|
|
@@ -186,3 +189,5 @@
|
|
|
186
189
|
}
|
|
187
190
|
}
|
|
188
191
|
|
|
192
|
+
@layer overrides, infonomic-utilities, utilities;
|
|
193
|
+
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import
|
|
3
|
+
import clsx from "clsx";
|
|
4
4
|
import drawer_module from "./drawer.module.js";
|
|
5
5
|
function DrawerContainer({ ref, children, className, ...rest }) {
|
|
6
6
|
return /*#__PURE__*/ jsx("div", {
|
|
7
7
|
ref: ref,
|
|
8
|
-
className:
|
|
8
|
+
className: clsx('infonomic-drawer-container', drawer_module["drawer-container"], className),
|
|
9
9
|
...rest,
|
|
10
10
|
children: children
|
|
11
11
|
});
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import
|
|
3
|
+
import clsx from "clsx";
|
|
4
4
|
import drawer_module from "./drawer.module.js";
|
|
5
5
|
function DrawerContent({ ref, children, className, ...rest }) {
|
|
6
6
|
return /*#__PURE__*/ jsx("div", {
|
|
7
7
|
ref: ref,
|
|
8
8
|
...rest,
|
|
9
|
-
className:
|
|
9
|
+
className: clsx('infonomic-drawer-content', drawer_module["drawer-content"], className),
|
|
10
10
|
children: children
|
|
11
11
|
});
|
|
12
12
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import
|
|
3
|
+
import clsx from "clsx";
|
|
4
4
|
import drawer_module from "./drawer.module.js";
|
|
5
5
|
const drawer_header_DrawerHeader = function({ ref, children, className, ...rest }) {
|
|
6
|
-
const classes =
|
|
6
|
+
const classes = clsx('infonomic-drawer-header', drawer_module["drawer-header"], className);
|
|
7
7
|
return /*#__PURE__*/ jsx("div", {
|
|
8
8
|
style: {
|
|
9
9
|
overflowWrap: 'anywhere'
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import
|
|
3
|
+
import clsx from "clsx";
|
|
4
4
|
import drawer_module from "./drawer.module.js";
|
|
5
5
|
const DrawerTopActions = function({ ref, children, className, ...rest }) {
|
|
6
|
-
const classes =
|
|
6
|
+
const classes = clsx('infonomic-drawer-top-actions', drawer_module["drawer-top-actions"], className);
|
|
7
7
|
return /*#__PURE__*/ jsx("div", {
|
|
8
8
|
style: {
|
|
9
9
|
whiteSpace: 'nowrap'
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
-
import { DrawerContainer } from './drawer-container';
|
|
3
|
-
import { DrawerContent } from './drawer-content';
|
|
4
|
-
import { DrawerHeader } from './drawer-header';
|
|
5
|
-
import { DrawerTopActions } from './drawer-top-actions';
|
|
2
|
+
import { DrawerContainer } from './drawer-container.js';
|
|
3
|
+
import { DrawerContent } from './drawer-content.js';
|
|
4
|
+
import { DrawerHeader } from './drawer-header.js';
|
|
5
|
+
import { DrawerTopActions } from './drawer-top-actions.js';
|
|
6
6
|
export interface DrawerProps {
|
|
7
7
|
id: string;
|
|
8
8
|
isOpen: boolean;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { useEffect } from "react";
|
|
4
4
|
import { Drawer } from "@base-ui/react/drawer";
|
|
5
|
-
import
|
|
5
|
+
import clsx from "clsx";
|
|
6
6
|
import drawer_module from "./drawer.module.js";
|
|
7
7
|
import { DrawerContainer } from "./drawer-container.js";
|
|
8
8
|
import { DrawerContent } from "./drawer-content.js";
|
|
@@ -35,13 +35,13 @@ const drawer_Drawer = ({ id, isOpen, onDismiss, closeOnOverlayClick, children, w
|
|
|
35
35
|
children: /*#__PURE__*/ jsxs(Drawer.Portal, {
|
|
36
36
|
children: [
|
|
37
37
|
/*#__PURE__*/ jsx(Drawer.Backdrop, {
|
|
38
|
-
className:
|
|
38
|
+
className: clsx('infonomic-drawer-backdrop', drawer_module.backdrop),
|
|
39
39
|
style: hasTopOffset ? {
|
|
40
40
|
top: topOffset
|
|
41
41
|
} : void 0
|
|
42
42
|
}),
|
|
43
43
|
/*#__PURE__*/ jsx(Drawer.Popup, {
|
|
44
|
-
className:
|
|
44
|
+
className: clsx('infonomic-drawer-wrapper', drawer_module["drawer-wrapper"], typedStyles[`drawer-${width}`], typedStyles[`drawer-depth-${depth.toString()}`], className),
|
|
45
45
|
style: hasTopOffset ? {
|
|
46
46
|
top: topOffset
|
|
47
47
|
} : void 0,
|
|
@@ -1,4 +1,14 @@
|
|
|
1
|
-
@layer
|
|
1
|
+
@layer base,
|
|
2
|
+
infonomic-base,
|
|
3
|
+
theme,
|
|
4
|
+
infonomic-theme,
|
|
5
|
+
infonomic-functional,
|
|
6
|
+
infonomic-typography,
|
|
7
|
+
components,
|
|
8
|
+
infonomic-components,
|
|
9
|
+
overrides,
|
|
10
|
+
infonomic-utilities,
|
|
11
|
+
utilities;
|
|
2
12
|
|
|
3
13
|
@layer infonomic-components {
|
|
4
14
|
/* Backdrop overlay (replaces previous Overlay component) */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@layer infonomic-base, infonomic-
|
|
1
|
+
@layer base, infonomic-base, theme, infonomic-theme, infonomic-functional, infonomic-typography, components;
|
|
2
2
|
|
|
3
3
|
@layer infonomic-components {
|
|
4
4
|
:is(.backdrop-Ga1s55, .infonomic-drawer-backdrop) {
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
width: 86%;
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
-
@media (
|
|
77
|
+
@media (width >= 48rem) {
|
|
78
78
|
.drawer-depth-0-VYE9YM.drawer-medium-ZFbdby {
|
|
79
79
|
width: 600px;
|
|
80
80
|
}
|
|
@@ -127,3 +127,5 @@
|
|
|
127
127
|
}
|
|
128
128
|
}
|
|
129
129
|
|
|
130
|
+
@layer overrides, infonomic-utilities, utilities;
|
|
131
|
+
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import
|
|
3
|
+
import clsx from "clsx";
|
|
4
4
|
import modal_module from "./modal.module.js";
|
|
5
5
|
const modal_actions_ModalActions = function({ ref, children, className, ...rest }) {
|
|
6
6
|
return /*#__PURE__*/ jsx("div", {
|
|
7
7
|
ref: ref,
|
|
8
8
|
...rest,
|
|
9
|
-
className:
|
|
9
|
+
className: clsx('infonomic-modal-actions', modal_module["modal-actions"], className),
|
|
10
10
|
children: children
|
|
11
11
|
});
|
|
12
12
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import
|
|
3
|
+
import clsx from "clsx";
|
|
4
4
|
import modal_module from "./modal.module.js";
|
|
5
5
|
const modal_container_ModalContainer = function({ ref, children, className, ...rest }) {
|
|
6
6
|
return /*#__PURE__*/ jsx("div", {
|
|
7
7
|
ref: ref,
|
|
8
|
-
className:
|
|
8
|
+
className: clsx('infonomic-modal-container', modal_module["modal-container"], className),
|
|
9
9
|
...rest,
|
|
10
10
|
children: children
|
|
11
11
|
});
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import
|
|
3
|
+
import clsx from "clsx";
|
|
4
4
|
import modal_module from "./modal.module.js";
|
|
5
5
|
const modal_content_ModalContent = function({ ref, children, className, ...rest }) {
|
|
6
6
|
return /*#__PURE__*/ jsx("div", {
|
|
7
7
|
ref: ref,
|
|
8
8
|
...rest,
|
|
9
|
-
className:
|
|
9
|
+
className: clsx('infonomic-modal-content', modal_module["modal-content"], className),
|
|
10
10
|
children: children
|
|
11
11
|
});
|
|
12
12
|
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared between `Modal` and its slots. Lives in its own module because
|
|
3
|
+
* `Modal` renders `Modal.Header` while `Modal.Header` needs the context —
|
|
4
|
+
* importing it from `modal.tsx` would make the two modules circular.
|
|
5
|
+
*/
|
|
6
|
+
export declare const ModalContext: import("react").Context<{
|
|
7
|
+
onDismiss?: () => void;
|
|
8
|
+
/**
|
|
9
|
+
* Id the dialog points `aria-labelledby` at. `Modal.Header` puts it on the
|
|
10
|
+
* heading it finds among its children, which is what gives the dialog its
|
|
11
|
+
* accessible name — without it a screen reader announces the modal as an
|
|
12
|
+
* unnamed "dialog".
|
|
13
|
+
*
|
|
14
|
+
* A dangling reference degrades safely: name computation ignores an
|
|
15
|
+
* `aria-labelledby` that resolves to nothing and falls through, so a modal
|
|
16
|
+
* with no header is no worse off than before.
|
|
17
|
+
*/
|
|
18
|
+
headingId?: string;
|
|
19
|
+
}>;
|
|
20
|
+
//# sourceMappingURL=modal-context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modal-context.d.ts","sourceRoot":"","sources":["../../../src/widgets/modal/modal-context.ts"],"names":[],"mappings":"AAIA;;;;GAIG;AACH,eAAO,MAAM,YAAY;gBACX,MAAM,IAAI;IACtB;;;;;;;;;OASG;gBACS,MAAM;EACd,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modal-header.d.ts","sourceRoot":"","sources":["../../../src/widgets/modal/modal-header.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,
|
|
1
|
+
{"version":3,"file":"modal-header.d.ts","sourceRoot":"","sources":["../../../src/widgets/modal/modal-header.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAQ9B,KAAK,yBAAyB,GAAG,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAA;AACnE,MAAM,WAAW,gBAAiB,SAAQ,yBAAyB;IACjE,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AA0BD,eAAO,MAAM,WAAW,0CAKrB,gBAAgB,GAAG;IACpB,GAAG,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAAA;CACtC,sBAQA,CAAA"}
|