@quan-erp/shared-ui 1.0.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 +90 -0
- package/dist/common/common.d.ts +2 -0
- package/dist/components/blocks/editor-00/editor.d.ts +8 -0
- package/dist/components/blocks/editor-00/nodes.d.ts +3 -0
- package/dist/components/blocks/editor-00/plugins.d.ts +2 -0
- package/dist/components/custom/confirm-dialog.d.ts +15 -0
- package/dist/components/custom/dashboard.d.ts +22 -0
- package/dist/components/custom/data-table/cursor-based-pagination.d.ts +9 -0
- package/dist/components/custom/data-table/data-table-bulk-action-menu.d.ts +9 -0
- package/dist/components/custom/data-table/data-table-bulk-export.d.ts +8 -0
- package/dist/components/custom/data-table/data-table-column-header.d.ts +9 -0
- package/dist/components/custom/data-table/data-table-grid.d.ts +21 -0
- package/dist/components/custom/data-table/data-table-group-by.types.d.ts +11 -0
- package/dist/components/custom/data-table/data-table-helper.d.ts +2 -0
- package/dist/components/custom/data-table/data-table-list-view.d.ts +13 -0
- package/dist/components/custom/data-table/data-table-page-size.d.ts +11 -0
- package/dist/components/custom/data-table/data-table-pagination.d.ts +9 -0
- package/dist/components/custom/data-table/data-table-toolbar.d.ts +26 -0
- package/dist/components/custom/data-table/data-table-util.d.ts +7 -0
- package/dist/components/custom/data-table/data-table-view-fallback.d.ts +2 -0
- package/dist/components/custom/data-table/data-table-view-options.d.ts +17 -0
- package/dist/components/custom/data-table/data-table-view-preferences.d.ts +22 -0
- package/dist/components/custom/data-table/data-table-view-preferences.storage.d.ts +15 -0
- package/dist/components/custom/data-table/data-table-wrapper.d.ts +51 -0
- package/dist/components/custom/data-table/data-table.d.ts +47 -0
- package/dist/components/custom/data-table/export.d.ts +22 -0
- package/dist/components/custom/data-table/group-table-rows.d.ts +3 -0
- package/dist/components/custom/data-table/types.d.ts +17 -0
- package/dist/components/custom/data-table/use-data-table-page-size.d.ts +41 -0
- package/dist/components/custom/document-title.d.ts +4 -0
- package/dist/components/custom/empty-screen.d.ts +8 -0
- package/dist/components/custom/error-screen.d.ts +9 -0
- package/dist/components/custom/floating-action-btn.d.ts +39 -0
- package/dist/components/custom/index.d.ts +20 -0
- package/dist/components/custom/loading-screen.d.ts +7 -0
- package/dist/components/custom/menu-tab.d.ts +17 -0
- package/dist/components/custom/page.d.ts +35 -0
- package/dist/components/custom/plugin-theme.d.ts +8 -0
- package/dist/components/custom/portal.d.ts +4 -0
- package/dist/components/custom/protected-page.d.ts +26 -0
- package/dist/components/custom/pull-to-refresh.d.ts +16 -0
- package/dist/components/custom/render-in-view.d.ts +12 -0
- package/dist/components/custom/responsive-dialog.d.ts +47 -0
- package/dist/components/custom/safearea.d.ts +5 -0
- package/dist/components/custom/scrollable.d.ts +17 -0
- package/dist/components/custom/search-and-filter-suite.d.ts +16 -0
- package/dist/components/custom/setting.d.ts +30 -0
- package/dist/components/custom/submenu-hub.d.ts +17 -0
- package/dist/components/editor/editor-ui/content-editable.d.ts +9 -0
- package/dist/components/editor/themes/editor-theme.d.ts +3 -0
- package/dist/components/ui/accordion.d.ts +8 -0
- package/dist/components/ui/alert-dialog.d.ts +19 -0
- package/dist/components/ui/alert.d.ts +9 -0
- package/dist/components/ui/avatar.d.ts +7 -0
- package/dist/components/ui/badge.d.ts +10 -0
- package/dist/components/ui/breadcrumb.d.ts +20 -0
- package/dist/components/ui/button-group.d.ts +12 -0
- package/dist/components/ui/button.d.ts +11 -0
- package/dist/components/ui/calendar.d.ts +12 -0
- package/dist/components/ui/card.d.ts +10 -0
- package/dist/components/ui/carousel.d.ts +29 -0
- package/dist/components/ui/chart.d.ts +63 -0
- package/dist/components/ui/checkbox.d.ts +5 -0
- package/dist/components/ui/collapsible.d.ts +6 -0
- package/dist/components/ui/command.d.ts +81 -0
- package/dist/components/ui/context-menu.d.ts +28 -0
- package/dist/components/ui/dialog.d.ts +16 -0
- package/dist/components/ui/drawer.d.ts +23 -0
- package/dist/components/ui/dropdown-menu.d.ts +28 -0
- package/dist/components/ui/field.d.ts +25 -0
- package/dist/components/ui/form.d.ts +26 -0
- package/dist/components/ui/hover-card.d.ts +7 -0
- package/dist/components/ui/index.d.ts +54 -0
- package/dist/components/ui/input-group.d.ts +17 -0
- package/dist/components/ui/input-otp.d.ts +35 -0
- package/dist/components/ui/input.d.ts +10 -0
- package/dist/components/ui/item.d.ts +24 -0
- package/dist/components/ui/kbd.d.ts +4 -0
- package/dist/components/ui/label.d.ts +5 -0
- package/dist/components/ui/menubar.d.ts +29 -0
- package/dist/components/ui/navigation-menu.d.ts +13 -0
- package/dist/components/ui/pagination.d.ts +28 -0
- package/dist/components/ui/popover.d.ts +8 -0
- package/dist/components/ui/progress.d.ts +5 -0
- package/dist/components/ui/radio-group.d.ts +6 -0
- package/dist/components/ui/resizable.d.ts +24 -0
- package/dist/components/ui/scroll-area.d.ts +6 -0
- package/dist/components/ui/select.d.ts +14 -0
- package/dist/components/ui/separator.d.ts +5 -0
- package/dist/components/ui/sheet.d.ts +16 -0
- package/dist/components/ui/sidebar.d.ts +71 -0
- package/dist/components/ui/skeleton.d.ts +3 -0
- package/dist/components/ui/slider.d.ts +12 -0
- package/dist/components/ui/sonner.d.ts +6 -0
- package/dist/components/ui/spinner.d.ts +9 -0
- package/dist/components/ui/switch.d.ts +11 -0
- package/dist/components/ui/table.d.ts +14 -0
- package/dist/components/ui/tabs.d.ts +16 -0
- package/dist/components/ui/textarea.d.ts +10 -0
- package/dist/components/ui/time-picker.d.ts +13 -0
- package/dist/components/ui/toggle-group.d.ts +13 -0
- package/dist/components/ui/toggle.d.ts +10 -0
- package/dist/components/ui/tooltip.d.ts +8 -0
- package/dist/es/common/common.js +4 -0
- package/dist/es/components/blocks/editor-00/editor.js +49 -0
- package/dist/es/components/blocks/editor-00/nodes.js +6 -0
- package/dist/es/components/blocks/editor-00/plugins.js +23 -0
- package/dist/es/components/custom/confirm-dialog.js +34 -0
- package/dist/es/components/custom/dashboard.js +86 -0
- package/dist/es/components/custom/data-table/cursor-based-pagination.js +123 -0
- package/dist/es/components/custom/data-table/data-table-bulk-action-menu.js +112 -0
- package/dist/es/components/custom/data-table/data-table-bulk-export.js +76 -0
- package/dist/es/components/custom/data-table/data-table-column-header.js +102 -0
- package/dist/es/components/custom/data-table/data-table-grid.js +234 -0
- package/dist/es/components/custom/data-table/data-table-helper.js +8 -0
- package/dist/es/components/custom/data-table/data-table-list-view.js +121 -0
- package/dist/es/components/custom/data-table/data-table-page-size.js +49 -0
- package/dist/es/components/custom/data-table/data-table-pagination.js +156 -0
- package/dist/es/components/custom/data-table/data-table-toolbar.js +149 -0
- package/dist/es/components/custom/data-table/data-table-util.js +31 -0
- package/dist/es/components/custom/data-table/data-table-view-fallback.js +7 -0
- package/dist/es/components/custom/data-table/data-table-view-options.js +311 -0
- package/dist/es/components/custom/data-table/data-table-view-preferences.js +71 -0
- package/dist/es/components/custom/data-table/data-table-view-preferences.storage.js +115 -0
- package/dist/es/components/custom/data-table/data-table.js +425 -0
- package/dist/es/components/custom/data-table/group-table-rows.js +16 -0
- package/dist/es/components/custom/data-table/use-data-table-page-size.js +155 -0
- package/dist/es/components/custom/empty-screen.js +28 -0
- package/dist/es/components/custom/error-screen.js +84 -0
- package/dist/es/components/custom/floating-action-btn.js +200 -0
- package/dist/es/components/custom/loading-screen.js +26 -0
- package/dist/es/components/custom/menu-tab.js +45 -0
- package/dist/es/components/custom/page.js +105 -0
- package/dist/es/components/custom/plugin-theme.js +13 -0
- package/dist/es/components/custom/portal.js +13 -0
- package/dist/es/components/custom/protected-page.js +74 -0
- package/dist/es/components/custom/pull-to-refresh.js +378 -0
- package/dist/es/components/custom/render-in-view.js +35 -0
- package/dist/es/components/custom/responsive-dialog.js +163 -0
- package/dist/es/components/custom/safearea.js +8 -0
- package/dist/es/components/custom/scrollable.js +96 -0
- package/dist/es/components/custom/setting.js +39 -0
- package/dist/es/components/editor/editor-ui/content-editable.js +26 -0
- package/dist/es/components/editor/themes/editor-theme.js +119 -0
- package/dist/es/components/ui/accordion.js +47 -0
- package/dist/es/components/ui/alert-dialog.js +178 -0
- package/dist/es/components/ui/alert.js +51 -0
- package/dist/es/components/ui/avatar.js +42 -0
- package/dist/es/components/ui/badge.js +27 -0
- package/dist/es/components/ui/breadcrumb.js +93 -0
- package/dist/es/components/ui/button-group.js +76 -0
- package/dist/es/components/ui/button.js +57 -0
- package/dist/es/components/ui/calendar.js +402 -0
- package/dist/es/components/ui/card.js +91 -0
- package/dist/es/components/ui/carousel.js +194 -0
- package/dist/es/components/ui/chart.js +239 -0
- package/dist/es/components/ui/checkbox.js +27 -0
- package/dist/es/components/ui/collapsible.js +9 -0
- package/dist/es/components/ui/command.js +115 -0
- package/dist/es/components/ui/context-menu.js +153 -0
- package/dist/es/components/ui/dialog.js +137 -0
- package/dist/es/components/ui/drawer.js +107 -0
- package/dist/es/components/ui/dropdown-menu.js +152 -0
- package/dist/es/components/ui/field.js +226 -0
- package/dist/es/components/ui/form.js +109 -0
- package/dist/es/components/ui/hover-card.js +25 -0
- package/dist/es/components/ui/input-group.js +155 -0
- package/dist/es/components/ui/input-otp.js +49 -0
- package/dist/es/components/ui/input.js +37 -0
- package/dist/es/components/ui/item.js +188 -0
- package/dist/es/components/ui/kbd.js +31 -0
- package/dist/es/components/ui/label.js +23 -0
- package/dist/es/components/ui/menubar.js +202 -0
- package/dist/es/components/ui/navigation-menu.js +107 -0
- package/dist/es/components/ui/pagination.js +101 -0
- package/dist/es/components/ui/popover.js +27 -0
- package/dist/es/components/ui/progress.js +26 -0
- package/dist/es/components/ui/radio-group.js +35 -0
- package/dist/es/components/ui/resizable.js +38 -0
- package/dist/es/components/ui/scroll-area.js +38 -0
- package/dist/es/components/ui/select.js +124 -0
- package/dist/es/components/ui/separator.js +27 -0
- package/dist/es/components/ui/sheet.js +129 -0
- package/dist/es/components/ui/sidebar.js +604 -0
- package/dist/es/components/ui/skeleton.js +17 -0
- package/dist/es/components/ui/slider.js +62 -0
- package/dist/es/components/ui/sonner.js +26 -0
- package/dist/es/components/ui/spinner.js +34 -0
- package/dist/es/components/ui/switch.js +54 -0
- package/dist/es/components/ui/table.js +90 -0
- package/dist/es/components/ui/tabs.js +84 -0
- package/dist/es/components/ui/textarea.js +32 -0
- package/dist/es/components/ui/time-picker.js +199 -0
- package/dist/es/components/ui/toggle-group.js +43 -0
- package/dist/es/components/ui/toggle.js +44 -0
- package/dist/es/components/ui/tooltip.js +56 -0
- package/dist/es/hooks/use-debounce-value.js +16 -0
- package/dist/es/hooks/use-is-inview.js +25 -0
- package/dist/es/hooks/use-mobile-back-dialog.js +34 -0
- package/dist/es/hooks/use-mobile.js +43 -0
- package/dist/es/hooks/use-mounted.js +14 -0
- package/dist/es/hooks/use-scroll-direction.js +26 -0
- package/dist/es/hooks/use-user-hand-behavior.js +20 -0
- package/dist/es/index.d.ts +2 -0
- package/dist/es/index.js +487 -0
- package/dist/es/lib/utils.js +8 -0
- package/dist/es/locale/locale.js +87 -0
- package/dist/es/node_modules/@tanstack/react-table/build/lib/index.js +93 -0
- package/dist/es/node_modules/@tanstack/table-core/build/lib/index.js +2737 -0
- package/dist/es/shared-ui/node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.js +85 -0
- package/dist/es/shared-ui/node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.js +49 -0
- package/dist/es/shared-ui/node_modules/framer-motion/dist/es/components/AnimatePresence/index.js +86 -0
- package/dist/es/shared-ui/node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.js +19 -0
- package/dist/es/shared-ui/node_modules/framer-motion/dist/es/components/AnimatePresence/utils.js +14 -0
- package/dist/es/shared-ui/node_modules/framer-motion/dist/es/context/LayoutGroupContext.js +5 -0
- package/dist/es/shared-ui/node_modules/framer-motion/dist/es/context/LazyContext.js +5 -0
- package/dist/es/shared-ui/node_modules/framer-motion/dist/es/context/MotionConfigContext.js +9 -0
- package/dist/es/shared-ui/node_modules/framer-motion/dist/es/context/MotionContext/create.js +13 -0
- package/dist/es/shared-ui/node_modules/framer-motion/dist/es/context/MotionContext/index.js +5 -0
- package/dist/es/shared-ui/node_modules/framer-motion/dist/es/context/MotionContext/utils.js +15 -0
- package/dist/es/shared-ui/node_modules/framer-motion/dist/es/context/PresenceContext.js +5 -0
- package/dist/es/shared-ui/node_modules/framer-motion/dist/es/context/SwitchLayoutGroupContext.js +5 -0
- package/dist/es/shared-ui/node_modules/framer-motion/dist/es/events/add-pointer-event.js +8 -0
- package/dist/es/shared-ui/node_modules/framer-motion/dist/es/events/event-info.js +14 -0
- package/dist/es/shared-ui/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.js +432 -0
- package/dist/es/shared-ui/node_modules/framer-motion/dist/es/gestures/drag/index.js +38 -0
- package/dist/es/shared-ui/node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.js +93 -0
- package/dist/es/shared-ui/node_modules/framer-motion/dist/es/gestures/focus.js +35 -0
- package/dist/es/shared-ui/node_modules/framer-motion/dist/es/gestures/hover.js +31 -0
- package/dist/es/shared-ui/node_modules/framer-motion/dist/es/gestures/pan/PanSession.js +215 -0
- package/dist/es/shared-ui/node_modules/framer-motion/dist/es/gestures/pan/index.js +50 -0
- package/dist/es/shared-ui/node_modules/framer-motion/dist/es/gestures/press.js +38 -0
- package/dist/es/shared-ui/node_modules/framer-motion/dist/es/motion/features/animation/exit.js +60 -0
- package/dist/es/shared-ui/node_modules/framer-motion/dist/es/motion/features/animation/index.js +40 -0
- package/dist/es/shared-ui/node_modules/framer-motion/dist/es/motion/features/animations.js +13 -0
- package/dist/es/shared-ui/node_modules/framer-motion/dist/es/motion/features/definitions.js +42 -0
- package/dist/es/shared-ui/node_modules/framer-motion/dist/es/motion/features/drag.js +17 -0
- package/dist/es/shared-ui/node_modules/framer-motion/dist/es/motion/features/gestures.js +21 -0
- package/dist/es/shared-ui/node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.js +111 -0
- package/dist/es/shared-ui/node_modules/framer-motion/dist/es/motion/features/layout.js +11 -0
- package/dist/es/shared-ui/node_modules/framer-motion/dist/es/motion/features/load-features.js +15 -0
- package/dist/es/shared-ui/node_modules/framer-motion/dist/es/motion/features/viewport/index.js +64 -0
- package/dist/es/shared-ui/node_modules/framer-motion/dist/es/motion/features/viewport/observers.js +33 -0
- package/dist/es/shared-ui/node_modules/framer-motion/dist/es/motion/index.js +69 -0
- package/dist/es/shared-ui/node_modules/framer-motion/dist/es/motion/utils/symbol.js +4 -0
- package/dist/es/shared-ui/node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.js +35 -0
- package/dist/es/shared-ui/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.js +106 -0
- package/dist/es/shared-ui/node_modules/framer-motion/dist/es/motion/utils/use-visual-state.js +66 -0
- package/dist/es/shared-ui/node_modules/framer-motion/dist/es/motion/utils/valid-prop.js +39 -0
- package/dist/es/shared-ui/node_modules/framer-motion/dist/es/render/components/create-proxy.js +35 -0
- package/dist/es/shared-ui/node_modules/framer-motion/dist/es/render/components/motion/feature-bundle.js +13 -0
- package/dist/es/shared-ui/node_modules/framer-motion/dist/es/render/components/motion/proxy.js +7 -0
- package/dist/es/shared-ui/node_modules/framer-motion/dist/es/render/dom/create-visual-element.js +13 -0
- package/dist/es/shared-ui/node_modules/framer-motion/dist/es/render/dom/use-render.js +21 -0
- package/dist/es/shared-ui/node_modules/framer-motion/dist/es/render/dom/utils/filter-props.js +31 -0
- package/dist/es/shared-ui/node_modules/framer-motion/dist/es/render/dom/utils/is-svg-component.js +29 -0
- package/dist/es/shared-ui/node_modules/framer-motion/dist/es/render/html/use-html-visual-state.js +10 -0
- package/dist/es/shared-ui/node_modules/framer-motion/dist/es/render/html/use-props.js +44 -0
- package/dist/es/shared-ui/node_modules/framer-motion/dist/es/render/html/utils/create-render-state.js +9 -0
- package/dist/es/shared-ui/node_modules/framer-motion/dist/es/render/svg/lowercase-elements.js +30 -0
- package/dist/es/shared-ui/node_modules/framer-motion/dist/es/render/svg/use-props.js +24 -0
- package/dist/es/shared-ui/node_modules/framer-motion/dist/es/render/svg/use-svg-visual-state.js +10 -0
- package/dist/es/shared-ui/node_modules/framer-motion/dist/es/render/svg/utils/create-render-state.js +8 -0
- package/dist/es/shared-ui/node_modules/framer-motion/dist/es/utils/distance.js +10 -0
- package/dist/es/shared-ui/node_modules/framer-motion/dist/es/utils/get-context-window.js +6 -0
- package/dist/es/shared-ui/node_modules/framer-motion/dist/es/utils/is-browser.js +4 -0
- package/dist/es/shared-ui/node_modules/framer-motion/dist/es/utils/is-ref-object.js +6 -0
- package/dist/es/shared-ui/node_modules/framer-motion/dist/es/utils/use-composed-ref.js +38 -0
- package/dist/es/shared-ui/node_modules/framer-motion/dist/es/utils/use-constant.js +11 -0
- package/dist/es/shared-ui/node_modules/framer-motion/dist/es/utils/use-isomorphic-effect.js +6 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.js +153 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/JSAnimation.js +294 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/NativeAnimation.js +160 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/NativeAnimationExtended.js +51 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/animate/single-value.js +11 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/drivers/frame.js +17 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/generators/inertia.js +67 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/generators/keyframes.js +37 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/generators/spring.js +246 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/generators/utils/calc-duration.js +15 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/generators/utils/create-generator-easing.js +16 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/generators/utils/is-generator.js +6 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/generators/utils/velocity.js +9 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/interfaces/motion-value.js +69 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-target.js +78 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-variant.js +36 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/interfaces/visual-element.js +22 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.js +107 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/keyframes/KeyframesResolver.js +131 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/keyframes/get-final.js +10 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/keyframes/offsets/default.js +9 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/keyframes/offsets/fill.js +12 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/keyframes/offsets/time.js +6 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/keyframes/utils/fill-wildcards.js +8 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/keyframes/utils/is-none.js +13 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/keyframes/utils/make-none-animatable.js +22 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/keyframes/utils/unit-conversion.js +43 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/optimized-appear/data-id.js +7 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/optimized-appear/get-appear-id.js +7 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/utils/WithPromise.js +27 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/utils/calc-child-stagger.js +10 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/utils/can-animate.js +31 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/utils/css-variables-conversion.js +31 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/utils/default-transitions.js +33 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/utils/get-value-transition.js +11 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/utils/is-animatable.js +16 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/utils/is-css-variable.js +20 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/utils/is-transition-defined.js +22 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/utils/make-animation-instant.js +7 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/utils/replace-transition-type.js +18 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/utils/resolve-transition.js +10 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/waapi/easing/cubic-bezier.js +4 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/waapi/easing/map-easing.js +21 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/waapi/easing/supported.js +15 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/waapi/start-waapi-animation.js +26 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/waapi/supports/waapi.js +36 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/waapi/utils/accelerated-values.js +12 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/waapi/utils/apply-generator.js +14 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/waapi/utils/is-browser-color.js +12 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/waapi/utils/linear.js +11 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/animation/waapi/utils/unsupported-easing.js +19 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/events/add-dom-event.js +7 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/frameloop/batcher.js +67 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/frameloop/frame.js +9 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/frameloop/microtask.js +5 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/frameloop/order.js +21 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/frameloop/render-step.js +64 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/frameloop/sync-time.js +21 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/gestures/drag/state/is-active.js +11 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/gestures/drag/state/set-active.js +25 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/gestures/hover.js +62 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/gestures/press/index.js +62 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/gestures/press/utils/is-keyboard-accessible.js +18 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/gestures/press/utils/keyboard.js +32 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/gestures/press/utils/state.js +4 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/gestures/utils/is-node-or-child.js +12 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/gestures/utils/is-primary-pointer.js +10 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/gestures/utils/setup.js +15 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/projection/animation/mix-values.js +60 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/projection/geometry/conversion.js +26 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/projection/geometry/copy.js +19 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/projection/geometry/delta-apply.js +86 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/projection/geometry/delta-calc.js +57 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/projection/geometry/delta-remove.js +40 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/projection/geometry/models.js +21 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/projection/geometry/utils.js +34 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/projection/node/DocumentProjectionNode.js +13 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/projection/node/HTMLProjectionNode.js +28 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/projection/node/create-projection-node.js +1124 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/projection/node/state.js +15 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/projection/shared/stack.js +83 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/projection/styles/scale-border-radius.js +26 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/projection/styles/scale-box-shadow.js +25 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/projection/styles/scale-correction.js +21 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/projection/styles/transform.js +38 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/projection/utils/compare-by-depth.js +4 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/projection/utils/each-axis.js +6 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/projection/utils/flat-tree.js +24 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/projection/utils/has-transform.js +20 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/projection/utils/measure.js +18 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/render/Feature.js +11 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/render/VisualElement.js +426 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/render/dom/DOMVisualElement.js +37 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/render/dom/is-css-var.js +4 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/render/dom/parse-transform.js +83 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/render/dom/style-set.js +7 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/render/dom/utils/camel-to-dash.js +6 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/render/html/HTMLVisualElement.js +40 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/render/html/utils/build-styles.js +42 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/render/html/utils/build-transform.js +53 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/render/html/utils/render.js +14 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/render/html/utils/scrape-motion-values.js +18 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/render/store.js +4 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/render/svg/SVGVisualElement.js +45 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/render/svg/utils/build-attrs.js +59 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/render/svg/utils/camel-case-attrs.js +28 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/render/svg/utils/is-svg-tag.js +4 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/render/svg/utils/path.js +17 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/render/svg/utils/render.js +12 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/render/svg/utils/scrape-motion-values.js +16 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/render/utils/animation-state.js +223 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/render/utils/get-variant-context.js +26 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/render/utils/is-animation-controls.js +6 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/render/utils/is-controlling-variants.js +13 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/render/utils/is-forced-motion-value.js +9 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/render/utils/is-keyframes-target.js +6 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/render/utils/is-variant-label.js +6 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/render/utils/keys-position.js +13 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/render/utils/keys-transform.js +24 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/render/utils/motion-values.js +33 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/render/utils/reduced-motion/index.js +20 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/render/utils/reduced-motion/state.js +6 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/render/utils/resolve-dynamic-variants.js +8 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/render/utils/resolve-variants.js +25 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/render/utils/setters.js +25 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/render/utils/shallow-compare.js +15 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/render/utils/variant-props.js +14 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/resize/handle-element.js +61 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/resize/handle-window.js +31 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/resize/index.js +8 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/utils/delay.js +17 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/utils/interpolate.js +53 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/utils/is-html-element.js +7 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/utils/is-svg-element.js +7 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/utils/is-svg-svg-element.js +7 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/utils/mix/color.js +44 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/utils/mix/complex.js +83 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/utils/mix/immediate.js +6 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/utils/mix/index.js +12 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/utils/mix/number.js +6 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/utils/mix/visibility.js +12 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/utils/resolve-elements.js +16 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/utils/supports/flags.js +4 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/utils/supports/linear-easing.js +12 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/utils/supports/memo.js +9 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/utils/supports/scroll-timeline.js +5 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/value/index.js +286 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/value/types/auto.js +7 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/value/types/color/hex.js +37 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/value/types/color/hsla-to-rgba.js +39 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/value/types/color/hsla.js +14 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/value/types/color/index.js +26 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/value/types/color/rgba.js +18 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/value/types/color/utils.js +21 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/value/types/complex/filter.js +27 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/value/types/complex/index.js +91 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/value/types/complex/mask.js +12 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/value/types/dimensions.js +10 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/value/types/int.js +8 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/value/types/maps/defaults.js +28 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/value/types/maps/number.js +70 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/value/types/maps/transform.js +37 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/value/types/numbers/index.js +19 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/value/types/numbers/units.js +23 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/value/types/test.js +4 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/value/types/utils/animatable-none.js +14 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/value/types/utils/color-regex.js +4 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/value/types/utils/find.js +9 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/value/types/utils/float-regex.js +4 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/value/types/utils/get-as-type.js +6 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/value/types/utils/is-nullish.js +6 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/value/types/utils/sanitize.js +4 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/value/types/utils/single-color-regex.js +4 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/value/utils/is-motion-value.js +4 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/value/utils/resolve-motion-value.js +7 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/value/will-change/add-will-change.js +15 -0
- package/dist/es/shared-ui/node_modules/motion-dom/dist/es/value/will-change/is.js +7 -0
- package/dist/es/shared-ui/node_modules/motion-utils/dist/es/array.js +13 -0
- package/dist/es/shared-ui/node_modules/motion-utils/dist/es/clamp.js +10 -0
- package/dist/es/shared-ui/node_modules/motion-utils/dist/es/easing/anticipate.js +5 -0
- package/dist/es/shared-ui/node_modules/motion-utils/dist/es/easing/back.js +11 -0
- package/dist/es/shared-ui/node_modules/motion-utils/dist/es/easing/circ.js +10 -0
- package/dist/es/shared-ui/node_modules/motion-utils/dist/es/easing/cubic-bezier.js +29 -0
- package/dist/es/shared-ui/node_modules/motion-utils/dist/es/easing/ease.js +9 -0
- package/dist/es/shared-ui/node_modules/motion-utils/dist/es/easing/modifiers/mirror.js +4 -0
- package/dist/es/shared-ui/node_modules/motion-utils/dist/es/easing/modifiers/reverse.js +4 -0
- package/dist/es/shared-ui/node_modules/motion-utils/dist/es/easing/utils/is-bezier-definition.js +4 -0
- package/dist/es/shared-ui/node_modules/motion-utils/dist/es/easing/utils/is-easing-array.js +6 -0
- package/dist/es/shared-ui/node_modules/motion-utils/dist/es/easing/utils/map.js +38 -0
- package/dist/es/shared-ui/node_modules/motion-utils/dist/es/errors.js +21 -0
- package/dist/es/shared-ui/node_modules/motion-utils/dist/es/format-error-message.js +6 -0
- package/dist/es/shared-ui/node_modules/motion-utils/dist/es/global-config.js +4 -0
- package/dist/es/shared-ui/node_modules/motion-utils/dist/es/is-numerical-string.js +4 -0
- package/dist/es/shared-ui/node_modules/motion-utils/dist/es/is-object.js +4 -0
- package/dist/es/shared-ui/node_modules/motion-utils/dist/es/is-zero-value-string.js +4 -0
- package/dist/es/shared-ui/node_modules/motion-utils/dist/es/memo.js +12 -0
- package/dist/es/shared-ui/node_modules/motion-utils/dist/es/noop.js +4 -0
- package/dist/es/shared-ui/node_modules/motion-utils/dist/es/pipe.js +4 -0
- package/dist/es/shared-ui/node_modules/motion-utils/dist/es/progress.js +7 -0
- package/dist/es/shared-ui/node_modules/motion-utils/dist/es/subscription-manager.js +32 -0
- package/dist/es/shared-ui/node_modules/motion-utils/dist/es/time-conversion.js +6 -0
- package/dist/es/shared-ui/node_modules/motion-utils/dist/es/velocity-per-second.js +4 -0
- package/dist/es/shared-ui/node_modules/motion-utils/dist/es/warn-once.js +11 -0
- package/dist/es/shared-ui.css +95 -0
- package/dist/hooks/index.d.ts +8 -0
- package/dist/hooks/use-debounce-value.d.ts +2 -0
- package/dist/hooks/use-inview.d.ts +7 -0
- package/dist/hooks/use-is-inview.d.ts +7 -0
- package/dist/hooks/use-mobile-back-dialog.d.ts +6 -0
- package/dist/hooks/use-mobile.d.ts +9 -0
- package/dist/hooks/use-mounted.d.ts +2 -0
- package/dist/hooks/use-scroll-direction.d.ts +3 -0
- package/dist/hooks/use-user-hand-behavior.d.ts +7 -0
- package/dist/index.d.ts +13 -0
- package/dist/lib/index.d.ts +2 -0
- package/dist/lib/utils.d.ts +3 -0
- package/dist/locale/index.d.ts +2 -0
- package/dist/locale/locale.d.ts +26 -0
- package/package.json +118 -0
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
4
|
+
import { MoreHorizontal, ChevronRight } from "lucide-react";
|
|
5
|
+
import { cn } from "../../lib/utils.js";
|
|
6
|
+
const Breadcrumb = React.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsx("nav", { ref, "aria-label": "breadcrumb", ...props }));
|
|
7
|
+
Breadcrumb.displayName = "Breadcrumb";
|
|
8
|
+
const BreadcrumbList = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
9
|
+
"ol",
|
|
10
|
+
{
|
|
11
|
+
ref,
|
|
12
|
+
className: cn(
|
|
13
|
+
"shared:flex shared:flex-wrap shared:items-center shared:gap-1.5 shared:break-words shared:text-sm shared:text-muted-foreground shared:sm:gap-2.5",
|
|
14
|
+
className
|
|
15
|
+
),
|
|
16
|
+
...props
|
|
17
|
+
}
|
|
18
|
+
));
|
|
19
|
+
BreadcrumbList.displayName = "BreadcrumbList";
|
|
20
|
+
const BreadcrumbItem = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
21
|
+
"li",
|
|
22
|
+
{
|
|
23
|
+
ref,
|
|
24
|
+
className: cn("shared:inline-flex shared:items-center shared:gap-1.5", className),
|
|
25
|
+
...props
|
|
26
|
+
}
|
|
27
|
+
));
|
|
28
|
+
BreadcrumbItem.displayName = "BreadcrumbItem";
|
|
29
|
+
const BreadcrumbLink = React.forwardRef(({ asChild, className, ...props }, ref) => {
|
|
30
|
+
const Comp = asChild ? Slot : "a";
|
|
31
|
+
return /* @__PURE__ */ jsx(
|
|
32
|
+
Comp,
|
|
33
|
+
{
|
|
34
|
+
ref,
|
|
35
|
+
className: cn("shared:transition-colors shared:hover:text-foreground", className),
|
|
36
|
+
...props
|
|
37
|
+
}
|
|
38
|
+
);
|
|
39
|
+
});
|
|
40
|
+
BreadcrumbLink.displayName = "BreadcrumbLink";
|
|
41
|
+
const BreadcrumbPage = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
42
|
+
"span",
|
|
43
|
+
{
|
|
44
|
+
ref,
|
|
45
|
+
role: "link",
|
|
46
|
+
"aria-disabled": "true",
|
|
47
|
+
"aria-current": "page",
|
|
48
|
+
className: cn("shared:font-normal shared:text-foreground", className),
|
|
49
|
+
...props
|
|
50
|
+
}
|
|
51
|
+
));
|
|
52
|
+
BreadcrumbPage.displayName = "BreadcrumbPage";
|
|
53
|
+
const BreadcrumbSeparator = ({
|
|
54
|
+
children,
|
|
55
|
+
className,
|
|
56
|
+
...props
|
|
57
|
+
}) => /* @__PURE__ */ jsx(
|
|
58
|
+
"li",
|
|
59
|
+
{
|
|
60
|
+
role: "presentation",
|
|
61
|
+
"aria-hidden": "true",
|
|
62
|
+
className: cn("shared:[&>svg]:w-3.5 shared:[&>svg]:h-3.5", className),
|
|
63
|
+
...props,
|
|
64
|
+
children: children ?? /* @__PURE__ */ jsx(ChevronRight, {})
|
|
65
|
+
}
|
|
66
|
+
);
|
|
67
|
+
BreadcrumbSeparator.displayName = "BreadcrumbSeparator";
|
|
68
|
+
const BreadcrumbEllipsis = ({
|
|
69
|
+
className,
|
|
70
|
+
...props
|
|
71
|
+
}) => /* @__PURE__ */ jsxs(
|
|
72
|
+
"span",
|
|
73
|
+
{
|
|
74
|
+
role: "presentation",
|
|
75
|
+
"aria-hidden": "true",
|
|
76
|
+
className: cn("shared:flex shared:h-9 shared:w-9 shared:items-center shared:justify-center", className),
|
|
77
|
+
...props,
|
|
78
|
+
children: [
|
|
79
|
+
/* @__PURE__ */ jsx(MoreHorizontal, { className: "shared:h-4 shared:w-4" }),
|
|
80
|
+
/* @__PURE__ */ jsx("span", { className: "shared:sr-only", children: "More" })
|
|
81
|
+
]
|
|
82
|
+
}
|
|
83
|
+
);
|
|
84
|
+
BreadcrumbEllipsis.displayName = "BreadcrumbElipssis";
|
|
85
|
+
export {
|
|
86
|
+
Breadcrumb,
|
|
87
|
+
BreadcrumbEllipsis,
|
|
88
|
+
BreadcrumbItem,
|
|
89
|
+
BreadcrumbLink,
|
|
90
|
+
BreadcrumbList,
|
|
91
|
+
BreadcrumbPage,
|
|
92
|
+
BreadcrumbSeparator
|
|
93
|
+
};
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
3
|
+
import { cva } from "class-variance-authority";
|
|
4
|
+
import { cn } from "../../lib/utils.js";
|
|
5
|
+
import { Separator } from "./separator.js";
|
|
6
|
+
const buttonGroupVariants = cva(
|
|
7
|
+
"shared:flex shared:w-fit shared:items-stretch has-[>shared:[data-slot=button-group]]:gap-2 [&>shared:*]:focus-visible:relative [&>shared:*]:focus-visible:z-10 has-[select[aria-hidden=true]:last-child]:[&>shared:[data-slot=select-trigger]:last-of-type]:rounded-r-md [&>[data-slot=select-trigger]:not([class*='w-'])shared:]:w-fit shared:[&>input]:flex-1",
|
|
8
|
+
{
|
|
9
|
+
variants: {
|
|
10
|
+
orientation: {
|
|
11
|
+
horizontal: "shared:[&>*:not(:first-child)]:rounded-l-none shared:[&>*:not(:first-child)]:border-l-0 shared:[&>*:not(:last-child)]:rounded-r-none",
|
|
12
|
+
vertical: "shared:flex-col shared:[&>*:not(:first-child)]:rounded-t-none shared:[&>*:not(:first-child)]:border-t-0 shared:[&>*:not(:last-child)]:rounded-b-none"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
defaultVariants: {
|
|
16
|
+
orientation: "horizontal"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
function ButtonGroup({
|
|
21
|
+
className,
|
|
22
|
+
orientation,
|
|
23
|
+
...props
|
|
24
|
+
}) {
|
|
25
|
+
return /* @__PURE__ */ jsx(
|
|
26
|
+
"div",
|
|
27
|
+
{
|
|
28
|
+
role: "group",
|
|
29
|
+
"data-slot": "button-group",
|
|
30
|
+
"data-orientation": orientation,
|
|
31
|
+
className: cn(buttonGroupVariants({ orientation }), className),
|
|
32
|
+
...props
|
|
33
|
+
}
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
function ButtonGroupText({
|
|
37
|
+
className,
|
|
38
|
+
asChild = false,
|
|
39
|
+
...props
|
|
40
|
+
}) {
|
|
41
|
+
const Comp = asChild ? Slot : "div";
|
|
42
|
+
return /* @__PURE__ */ jsx(
|
|
43
|
+
Comp,
|
|
44
|
+
{
|
|
45
|
+
className: cn(
|
|
46
|
+
"shared:bg-muted shared:shadow-xs shared:flex shared:items-center shared:gap-2 shared:rounded-md shared:border shared:px-4 shared:text-sm shared:font-medium shared:[&_svg:not([class*='size-'])]:size-4 shared:[&_svg]:pointer-events-none",
|
|
47
|
+
className
|
|
48
|
+
),
|
|
49
|
+
...props
|
|
50
|
+
}
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
function ButtonGroupSeparator({
|
|
54
|
+
className,
|
|
55
|
+
orientation = "vertical",
|
|
56
|
+
...props
|
|
57
|
+
}) {
|
|
58
|
+
return /* @__PURE__ */ jsx(
|
|
59
|
+
Separator,
|
|
60
|
+
{
|
|
61
|
+
"data-slot": "button-group-separator",
|
|
62
|
+
orientation,
|
|
63
|
+
className: cn(
|
|
64
|
+
"shared:bg-input shared:relative !shared:m-0 shared:self-stretch shared:data-[orientation=vertical]:h-auto",
|
|
65
|
+
className
|
|
66
|
+
),
|
|
67
|
+
...props
|
|
68
|
+
}
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
export {
|
|
72
|
+
ButtonGroup,
|
|
73
|
+
ButtonGroupSeparator,
|
|
74
|
+
ButtonGroupText,
|
|
75
|
+
buttonGroupVariants
|
|
76
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
4
|
+
import { cva } from "class-variance-authority";
|
|
5
|
+
import { cn } from "../../lib/utils.js";
|
|
6
|
+
const buttonVariants = cva(
|
|
7
|
+
"shared:inline-flex shared:items-center shared:justify-center shared:gap-2 shared:whitespace-nowrap shared:cupertino-corner shared:rounded-full shared:text-md shared:md:text-sm shared:font-medium shared:transition-all shared:cursor-pointer shared:disabled:cursor-not-allowed shared:disabled:pointer-events-none shared:disabled:opacity-50 shared:[&_svg]:pointer-events-none shared:[&_svg:not([class*='size-'])]:size-4 shared:shrink-0 shared:[&_svg]:shrink-0 shared:outline-none shared:focus-visible:border-ring shared:focus-visible:ring-ring/50 shared:focus-visible:ring-[3px] shared:aria-invalid:ring-destructive/20 shared:dark:aria-invalid:ring-destructive/40 shared:aria-invalid:border-destructive",
|
|
8
|
+
{
|
|
9
|
+
variants: {
|
|
10
|
+
variant: {
|
|
11
|
+
default: "shared:bg-primary shared:text-white shared:hover:bg-primary/90",
|
|
12
|
+
default2: "shared:bg-primary/10 shared:text-primary shared:hover:bg-primary/30 shared:font-bold",
|
|
13
|
+
destructive: "shared:bg-destructive shared:text-white shared:hover:bg-destructive/90 shared:focus-visible:ring-destructive/20 shared:dark:focus-visible:ring-destructive/40 shared:dark:bg-destructive/60",
|
|
14
|
+
destructive2: "shared:bg-destructive/10 shared:text-destructive shared:hover:bg-destructive/30 shared:font-bold",
|
|
15
|
+
outline: "shared:border shared:border-primary shared:text-primary shared:bg-background shared:shadow-xs shared:hover:bg-accent shared:hover:text-accent-foreground shared:dark:bg-input/30 shared:dark:border-input shared:dark:hover:bg-input/50",
|
|
16
|
+
secondary: "shared:bg-secondary shared:text-secondary-foreground shared:hover:bg-secondary/80",
|
|
17
|
+
ghost: "shared:hover:bg-accent shared:hover:text-accent-foreground shared:dark:hover:bg-accent/50",
|
|
18
|
+
link: "shared:text-primary shared:underline-offset-4 shared:hover:underline",
|
|
19
|
+
input: "shared:file:text-foreground shared:placeholder:text-muted-foreground shared:selection:bg-primary shared:selection:text-primary-foreground shared:dark:bg-input/30 shared:border-input shared:h-12 shared:md:h-9 shared:px-4 shared:md:px-2 shared:md:py-1 shared:w-full shared:min-w-0 shared:cupertino-corner shared:border shared:bg-transparent shared:px-3 shared:py-1 shared:text-base shared:shadow-xs shared:transition-[color,box-shadow] shared:outline-none shared:file:inline-flex shared:file:h-7 shared:file:border-0 shared:file:bg-transparent shared:file:text-sm shared:file:font-medium shared:disabled:pointer-events-none shared:disabled:cursor-not-allowed shared:disabled:opacity-50 shared:md:text-sm shared:focus-visible:border-ring shared:focus-visible:ring-ring/50 shared:focus-visible:ring-[3px] shared:aria-invalid:ring-destructive/20 shared:dark:aria-invalid:ring-destructive/40 shared:aria-invalid:border-destructive shared:items-flex shared:justify-start",
|
|
20
|
+
select: "shared:file:text-foreground shared:placeholder:text-muted-foreground shared:selection:bg-primary shared:selection:text-primary-foreground shared:dark:bg-input/30 shared:border-input shared:h-12 shared:md:h-9 shared:px-4 shared:md:px-2 shared:md:py-1 shared:w-full shared:min-w-0 shared:cupertino-corner shared:border shared:bg-transparent shared:px-3 shared:py-1 shared:text-base shared:shadow-xs shared:transition-[color,box-shadow] shared:outline-none shared:file:inline-flex shared:file:h-7 shared:file:border-0 shared:file:bg-transparent shared:file:text-sm shared:file:font-medium shared:disabled:pointer-events-none shared:disabled:cursor-not-allowed shared:disabled:opacity-50 shared:md:text-sm shared:focus-visible:border-ring shared:focus-visible:ring-ring/50 shared:focus-visible:ring-[3px] shared:aria-invalid:ring-destructive/20 shared:dark:aria-invalid:ring-destructive/40 shared:aria-invalid:border-destructive shared:items-flex shared:justify-between"
|
|
21
|
+
},
|
|
22
|
+
size: {
|
|
23
|
+
default: "shared:h-12 shared:md:h-9 shared:px-4 shared:md:px-2 shared:md:py-1 shared:has-[>svg]:px-3",
|
|
24
|
+
sm: "shared:h-8 shared:px-2 shared:gap-1.5 shared:px-3 shared:has-[>svg]:px-2.5",
|
|
25
|
+
lg: "shared:h-12 shared:px-6 shared:py-3 shared:md:h-9 shared:md:px-4 shared:md:py-2 shared:has-[>svg]:px-3",
|
|
26
|
+
icon: "shared:size-12 shared:md:size-9",
|
|
27
|
+
"icon-sm": "shared:size-8",
|
|
28
|
+
"icon-lg": "shared:size-10"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
defaultVariants: {
|
|
32
|
+
variant: "default",
|
|
33
|
+
size: "default"
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
);
|
|
37
|
+
function Button({
|
|
38
|
+
className,
|
|
39
|
+
variant,
|
|
40
|
+
size,
|
|
41
|
+
asChild = false,
|
|
42
|
+
...props
|
|
43
|
+
}) {
|
|
44
|
+
const Comp = asChild ? Slot : "button";
|
|
45
|
+
return /* @__PURE__ */ jsx(
|
|
46
|
+
Comp,
|
|
47
|
+
{
|
|
48
|
+
"data-slot": "button",
|
|
49
|
+
className: cn(buttonVariants({ variant, size, className })),
|
|
50
|
+
...props
|
|
51
|
+
}
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
export {
|
|
55
|
+
Button,
|
|
56
|
+
buttonVariants
|
|
57
|
+
};
|
|
@@ -0,0 +1,402 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { ChevronLeftIcon, ChevronRightIcon, ChevronDownIcon } from "lucide-react";
|
|
4
|
+
import { getDefaultClassNames, DayPicker } from "react-day-picker";
|
|
5
|
+
import { cn } from "../../lib/utils.js";
|
|
6
|
+
import { Button, buttonVariants } from "./button.js";
|
|
7
|
+
import { Popover, PopoverTrigger, PopoverContent } from "./popover.js";
|
|
8
|
+
import { Drawer, DrawerTrigger, DrawerContent, DrawerFooter, DrawerClose } from "./drawer.js";
|
|
9
|
+
import "./select.js";
|
|
10
|
+
import { useMediaQuery } from "../../hooks/use-mobile.js";
|
|
11
|
+
import { useMobileBackDialog } from "../../hooks/use-mobile-back-dialog.js";
|
|
12
|
+
import "@quan-erp/shared-frontend-core";
|
|
13
|
+
import { Calendar as Calendar$1 } from "@icon-park/react";
|
|
14
|
+
function Calendar({
|
|
15
|
+
className,
|
|
16
|
+
classNames,
|
|
17
|
+
showOutsideDays = true,
|
|
18
|
+
captionLayout = "label",
|
|
19
|
+
buttonVariant = "ghost",
|
|
20
|
+
formatters,
|
|
21
|
+
components,
|
|
22
|
+
type = "raw",
|
|
23
|
+
trigger,
|
|
24
|
+
label,
|
|
25
|
+
...props
|
|
26
|
+
}) {
|
|
27
|
+
const defaultClassNames = getDefaultClassNames();
|
|
28
|
+
const isMobile = useMediaQuery();
|
|
29
|
+
const [open, setOpen] = React.useState(false);
|
|
30
|
+
const isDrawer = type === "drawer" || type === "automatic" && isMobile;
|
|
31
|
+
const [internalMonth, setInternalMonth] = React.useState(props.defaultMonth || props.month || /* @__PURE__ */ new Date());
|
|
32
|
+
useMobileBackDialog({
|
|
33
|
+
open,
|
|
34
|
+
enable: open && isDrawer,
|
|
35
|
+
onOpenChange: setOpen
|
|
36
|
+
});
|
|
37
|
+
React.useEffect(() => {
|
|
38
|
+
if (props.month) {
|
|
39
|
+
setInternalMonth(props.month);
|
|
40
|
+
}
|
|
41
|
+
}, [props.month]);
|
|
42
|
+
const [showMonthYearPicker, setShowMonthYearPicker] = React.useState(false);
|
|
43
|
+
const selectedMonthRef = React.useRef(null);
|
|
44
|
+
const selectedYearRef = React.useRef(null);
|
|
45
|
+
const internalMonthRef = React.useRef(internalMonth);
|
|
46
|
+
internalMonthRef.current = internalMonth;
|
|
47
|
+
const scrollTimeoutMonthRef = React.useRef(void 0);
|
|
48
|
+
const scrollTimeoutYearRef = React.useRef(void 0);
|
|
49
|
+
const handleScroll = (e, type2, timeoutRef) => {
|
|
50
|
+
const container = e.currentTarget;
|
|
51
|
+
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
52
|
+
timeoutRef.current = setTimeout(() => {
|
|
53
|
+
const children = Array.from(container.children);
|
|
54
|
+
const center = container.scrollTop + container.clientHeight / 2;
|
|
55
|
+
let closest = null;
|
|
56
|
+
let minDiff = Infinity;
|
|
57
|
+
for (const child of children) {
|
|
58
|
+
if (child.tagName !== "BUTTON") continue;
|
|
59
|
+
const htmlChild = child;
|
|
60
|
+
const childCenter = htmlChild.offsetTop + htmlChild.offsetHeight / 2;
|
|
61
|
+
const diff = Math.abs(childCenter - center);
|
|
62
|
+
if (diff < minDiff) {
|
|
63
|
+
minDiff = diff;
|
|
64
|
+
closest = htmlChild;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
if (closest) {
|
|
68
|
+
const val = parseInt(closest.getAttribute(`data-${type2}`) || "0", 10);
|
|
69
|
+
const newDate = new Date(internalMonthRef.current);
|
|
70
|
+
if (type2 === "month") {
|
|
71
|
+
if (newDate.getMonth() !== val) {
|
|
72
|
+
newDate.setMonth(val);
|
|
73
|
+
handleMonthChange(newDate);
|
|
74
|
+
}
|
|
75
|
+
} else {
|
|
76
|
+
if (newDate.getFullYear() !== val) {
|
|
77
|
+
newDate.setFullYear(val);
|
|
78
|
+
handleMonthChange(newDate);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}, 100);
|
|
83
|
+
};
|
|
84
|
+
React.useEffect(() => {
|
|
85
|
+
if (showMonthYearPicker) {
|
|
86
|
+
setTimeout(() => {
|
|
87
|
+
selectedMonthRef.current?.scrollIntoView({ block: "center", behavior: "smooth" });
|
|
88
|
+
selectedYearRef.current?.scrollIntoView({ block: "center", behavior: "smooth" });
|
|
89
|
+
}, 10);
|
|
90
|
+
}
|
|
91
|
+
}, [showMonthYearPicker]);
|
|
92
|
+
const startYear = props.startMonth?.getFullYear() || 1970;
|
|
93
|
+
const endYear = props.endMonth?.getFullYear() || 2050;
|
|
94
|
+
const years = React.useMemo(() => Array.from({ length: endYear - startYear + 1 }, (_, i) => startYear + i), [startYear, endYear]);
|
|
95
|
+
const months = React.useMemo(() => Array.from({ length: 12 }, (_, i) => {
|
|
96
|
+
const d = /* @__PURE__ */ new Date();
|
|
97
|
+
d.setMonth(i);
|
|
98
|
+
return d.toLocaleString("default", { month: "long" });
|
|
99
|
+
}), []);
|
|
100
|
+
const handleMonthChange = (newMonth) => {
|
|
101
|
+
setInternalMonth(newMonth);
|
|
102
|
+
props.onMonthChange?.(newMonth);
|
|
103
|
+
};
|
|
104
|
+
const handleTodayClick = () => {
|
|
105
|
+
const today = /* @__PURE__ */ new Date();
|
|
106
|
+
setInternalMonth(today);
|
|
107
|
+
props.onMonthChange?.(today);
|
|
108
|
+
if (props.mode === "single" && props.onSelect) {
|
|
109
|
+
props.onSelect(today, today, { selected: false }, {});
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
const CalendarContent = /* @__PURE__ */ jsxs("div", { className: "shared:flex shared:flex-col shared:gap-2 shared:w-full shared:overflow-hidden shared:md:h-[26.5rem] shared:h-[31.5rem] shared:md:mt-0 shared:mt-5", children: [
|
|
113
|
+
showMonthYearPicker ? /* @__PURE__ */ jsxs("div", { className: "shared:relative shared:flex shared:gap-2 shared:md:h-[23rem] shared:h-[26.5rem] shared:p-2 shared:w-full shared:md:w-[var(--radix-popover-trigger-width)]", children: [
|
|
114
|
+
/* @__PURE__ */ jsx("div", { className: "shared:absolute shared:top-0 shared:inset-x-0 shared:h-16 shared:bg-gradient-to-b shared:from-popover shared:from-[40%] shared:to-transparent shared:pointer-events-none shared:z-10" }),
|
|
115
|
+
/* @__PURE__ */ jsx("div", { className: "shared:absolute shared:bottom-0 shared:inset-x-0 shared:h-16 shared:bg-gradient-to-t shared:from-popover shared:from-[40%] shared:to-transparent shared:pointer-events-none shared:z-10" }),
|
|
116
|
+
/* @__PURE__ */ jsxs(
|
|
117
|
+
"div",
|
|
118
|
+
{
|
|
119
|
+
className: "shared:relative shared:flex-1 shared:overflow-y-auto shared:overscroll-contain shared:h-full shared:flex shared:flex-col shared:gap-1 shared:snap-y shared:snap-mandatory hide-scrollbar",
|
|
120
|
+
onScroll: (e) => handleScroll(e, "month", scrollTimeoutMonthRef),
|
|
121
|
+
onWheel: (e) => e.stopPropagation(),
|
|
122
|
+
onTouchMove: (e) => e.stopPropagation(),
|
|
123
|
+
children: [
|
|
124
|
+
/* @__PURE__ */ jsx("div", { className: "shared:h-[calc(50%-1rem)] shared:shrink-0 shared:pointer-events-none" }),
|
|
125
|
+
months.map((month, i) => {
|
|
126
|
+
const isSelected = internalMonth.getMonth() === i;
|
|
127
|
+
return /* @__PURE__ */ jsx(
|
|
128
|
+
Button,
|
|
129
|
+
{
|
|
130
|
+
"data-month": i,
|
|
131
|
+
ref: isSelected ? selectedMonthRef : null,
|
|
132
|
+
variant: isSelected ? "default" : "ghost",
|
|
133
|
+
className: "shared:w-full shared:justify-center shared:snap-center",
|
|
134
|
+
onClick: (e) => {
|
|
135
|
+
const newDate = new Date(internalMonth);
|
|
136
|
+
newDate.setMonth(i);
|
|
137
|
+
handleMonthChange(newDate);
|
|
138
|
+
e.currentTarget.scrollIntoView({ block: "center", behavior: "smooth" });
|
|
139
|
+
},
|
|
140
|
+
children: month
|
|
141
|
+
},
|
|
142
|
+
month
|
|
143
|
+
);
|
|
144
|
+
}),
|
|
145
|
+
/* @__PURE__ */ jsx("div", { className: "shared:h-[calc(50%-1rem)] shared:shrink-0 shared:pointer-events-none" })
|
|
146
|
+
]
|
|
147
|
+
}
|
|
148
|
+
),
|
|
149
|
+
/* @__PURE__ */ jsxs(
|
|
150
|
+
"div",
|
|
151
|
+
{
|
|
152
|
+
className: "shared:relative shared:flex-1 shared:overflow-y-auto shared:overscroll-contain shared:flex shared:flex-col shared:gap-1 shared:snap-y shared:snap-mandatory hide-scrollbar",
|
|
153
|
+
onScroll: (e) => handleScroll(e, "year", scrollTimeoutYearRef),
|
|
154
|
+
onWheel: (e) => e.stopPropagation(),
|
|
155
|
+
onTouchMove: (e) => e.stopPropagation(),
|
|
156
|
+
children: [
|
|
157
|
+
/* @__PURE__ */ jsx("div", { className: "shared:h-[calc(50%-1rem)] shared:shrink-0 shared:pointer-events-none" }),
|
|
158
|
+
years.map((year) => {
|
|
159
|
+
const isSelected = internalMonth.getFullYear() === year;
|
|
160
|
+
return /* @__PURE__ */ jsx(
|
|
161
|
+
Button,
|
|
162
|
+
{
|
|
163
|
+
"data-year": year,
|
|
164
|
+
ref: isSelected ? selectedYearRef : null,
|
|
165
|
+
variant: isSelected ? "default" : "ghost",
|
|
166
|
+
className: "shared:w-full shared:justify-center shared:snap-center",
|
|
167
|
+
onClick: (e) => {
|
|
168
|
+
const newDate = new Date(internalMonth);
|
|
169
|
+
newDate.setFullYear(year);
|
|
170
|
+
handleMonthChange(newDate);
|
|
171
|
+
e.currentTarget.scrollIntoView({ block: "center", behavior: "smooth" });
|
|
172
|
+
},
|
|
173
|
+
children: year
|
|
174
|
+
},
|
|
175
|
+
year
|
|
176
|
+
);
|
|
177
|
+
}),
|
|
178
|
+
/* @__PURE__ */ jsx("div", { className: "shared:h-[calc(50%-1rem)] shared:shrink-0 shared:pointer-events-none" })
|
|
179
|
+
]
|
|
180
|
+
}
|
|
181
|
+
)
|
|
182
|
+
] }) : /* @__PURE__ */ jsx(
|
|
183
|
+
DayPicker,
|
|
184
|
+
{
|
|
185
|
+
month: internalMonth,
|
|
186
|
+
onMonthChange: handleMonthChange,
|
|
187
|
+
showOutsideDays,
|
|
188
|
+
fixedWeeks: showOutsideDays,
|
|
189
|
+
className: cn(
|
|
190
|
+
"shared:w-full shared:group/calendar shared:p-0 shared:md:p-3 shared:[--cell-size:2rem] shared:[[data-slot=card-content]_&]:bg-transparent shared:[[data-slot=popover-content]_&]:bg-transparent calendar",
|
|
191
|
+
String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,
|
|
192
|
+
String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,
|
|
193
|
+
className
|
|
194
|
+
),
|
|
195
|
+
captionLayout: "label",
|
|
196
|
+
formatters: {
|
|
197
|
+
formatMonthDropdown: (date) => date.toLocaleString("default", { month: "short" }),
|
|
198
|
+
...formatters
|
|
199
|
+
},
|
|
200
|
+
classNames: {
|
|
201
|
+
root: cn("shared:p-2 shared:pb-0", isDrawer ? "shared:w-full shared:[&_.calendar]:w-full shared:p-0 shared:md:h-[20rem]" : "shared:w-fit", defaultClassNames.root),
|
|
202
|
+
months: cn(
|
|
203
|
+
"shared:relative shared:flex shared:flex-col shared:gap-4 shared:md:flex-row",
|
|
204
|
+
defaultClassNames.months
|
|
205
|
+
),
|
|
206
|
+
month: cn("shared:flex shared:w-full shared:flex-col shared:gap-4", defaultClassNames.month),
|
|
207
|
+
nav: cn(
|
|
208
|
+
"shared:absolute shared:inset-x-0 shared:top-0 shared:flex shared:w-full shared:items-center shared:justify-between shared:gap-1 shared:pointer-events-none",
|
|
209
|
+
defaultClassNames.nav
|
|
210
|
+
),
|
|
211
|
+
button_previous: cn(
|
|
212
|
+
buttonVariants({ variant: buttonVariant }),
|
|
213
|
+
"shared:h-[var(--cell-size)] shared:w-[var(--cell-size)] shared:select-none shared:p-0 shared:aria-disabled:opacity-50 shared:pointer-events-auto",
|
|
214
|
+
defaultClassNames.button_previous
|
|
215
|
+
),
|
|
216
|
+
button_next: cn(
|
|
217
|
+
buttonVariants({ variant: buttonVariant }),
|
|
218
|
+
"shared:h-[var(--cell-size)] shared:w-[var(--cell-size)] shared:select-none shared:p-0 shared:aria-disabled:opacity-50 shared:pointer-events-auto",
|
|
219
|
+
defaultClassNames.button_next
|
|
220
|
+
),
|
|
221
|
+
month_caption: cn(
|
|
222
|
+
"shared:flex shared:h-[var(--cell-size)] shared:w-full shared:items-center shared:justify-center shared:px-[var(--cell-size)]",
|
|
223
|
+
defaultClassNames.month_caption
|
|
224
|
+
),
|
|
225
|
+
dropdowns: cn(
|
|
226
|
+
"shared:flex shared:h-[var(--cell-size)] shared:w-full shared:items-center shared:justify-center shared:gap-1.5 shared:text-sm shared:font-medium",
|
|
227
|
+
defaultClassNames.dropdowns
|
|
228
|
+
),
|
|
229
|
+
dropdown_root: cn(
|
|
230
|
+
"shared:has-focus:border-ring shared:border-input shared:shadow-xs shared:has-focus:ring-ring/50 shared:has-focus:ring-[3px] shared:relative shared:rounded-md shared:border",
|
|
231
|
+
defaultClassNames.dropdown_root
|
|
232
|
+
),
|
|
233
|
+
dropdown: cn(
|
|
234
|
+
"shared:bg-popover shared:absolute shared:inset-0 shared:opacity-0",
|
|
235
|
+
defaultClassNames.dropdown
|
|
236
|
+
),
|
|
237
|
+
caption_label: cn(
|
|
238
|
+
"shared:select-none shared:font-medium",
|
|
239
|
+
captionLayout === "label" ? "shared:text-sm" : "shared:[&>svg]:text-muted-foreground shared:flex shared:h-8 shared:items-center shared:gap-1 shared:rounded-md shared:pl-2 shared:pr-1 shared:text-sm shared:[&>svg]:size-3.5",
|
|
240
|
+
defaultClassNames.caption_label
|
|
241
|
+
),
|
|
242
|
+
table: "shared:w-full shared:border-collapse",
|
|
243
|
+
weekdays: cn("shared:flex", defaultClassNames.weekdays),
|
|
244
|
+
weekday: cn(
|
|
245
|
+
"shared:text-muted-foreground shared:flex-1 shared:select-none shared:rounded-md shared:text-[0.8rem] shared:font-normal",
|
|
246
|
+
defaultClassNames.weekday
|
|
247
|
+
),
|
|
248
|
+
week: cn("shared:mt-2 shared:flex shared:w-full", defaultClassNames.week),
|
|
249
|
+
week_number_header: cn(
|
|
250
|
+
"shared:w-[var(--cell-size)] shared:select-none",
|
|
251
|
+
defaultClassNames.week_number_header
|
|
252
|
+
),
|
|
253
|
+
week_number: cn(
|
|
254
|
+
"shared:text-muted-foreground shared:select-none shared:text-[0.8rem]",
|
|
255
|
+
defaultClassNames.week_number
|
|
256
|
+
),
|
|
257
|
+
day: cn(
|
|
258
|
+
"shared:group/day shared:relative shared:flex shared:items-center shared:justify-center shared:aspect-square shared:h-full shared:w-full shared:text-md shared:md:text-base shared:select-none shared:p-0 shared:text-center shared:[&:first-child[data-selected=true]_button]:rounded-l-full shared:[&:last-child[data-selected=true]_button]:rounded-r-full",
|
|
259
|
+
defaultClassNames.day
|
|
260
|
+
),
|
|
261
|
+
range_start: cn(
|
|
262
|
+
"shared:bg-accent shared:rounded-l-full",
|
|
263
|
+
defaultClassNames.range_start
|
|
264
|
+
),
|
|
265
|
+
range_middle: cn("shared:rounded-none", defaultClassNames.range_middle),
|
|
266
|
+
range_end: cn("shared:bg-accent shared:rounded-r-full", defaultClassNames.range_end),
|
|
267
|
+
today: cn(
|
|
268
|
+
"shared:bg-red-500 shared:text-white shared:text-center shared:rounded-full shared:[&:not([data-selected=true])_button:hover]:bg-red-600 shared:[&:not([data-selected=true])_button:hover]:text-white shared:data-[selected=true]:bg-transparent",
|
|
269
|
+
defaultClassNames.today
|
|
270
|
+
),
|
|
271
|
+
outside: cn(
|
|
272
|
+
"shared:text-muted-foreground shared:aria-selected:text-muted-foreground",
|
|
273
|
+
defaultClassNames.outside
|
|
274
|
+
),
|
|
275
|
+
disabled: cn(
|
|
276
|
+
"shared:text-muted-foreground shared:opacity-50",
|
|
277
|
+
defaultClassNames.disabled
|
|
278
|
+
),
|
|
279
|
+
hidden: cn("shared:invisible", defaultClassNames.hidden),
|
|
280
|
+
...classNames
|
|
281
|
+
},
|
|
282
|
+
components: {
|
|
283
|
+
CaptionLabel: (props2) => {
|
|
284
|
+
return /* @__PURE__ */ jsxs(
|
|
285
|
+
Button,
|
|
286
|
+
{
|
|
287
|
+
variant: "secondary",
|
|
288
|
+
size: "default",
|
|
289
|
+
className: "shared:text-sm shared:font-medium shared:hover:bg-accent shared:hover:text-accent-foreground",
|
|
290
|
+
onClick: () => setShowMonthYearPicker((prev) => !prev),
|
|
291
|
+
children: [
|
|
292
|
+
internalMonth.toLocaleString("default", { month: "long" }),
|
|
293
|
+
" ",
|
|
294
|
+
internalMonth.getFullYear()
|
|
295
|
+
]
|
|
296
|
+
}
|
|
297
|
+
);
|
|
298
|
+
},
|
|
299
|
+
Root: ({ className: className2, rootRef, ...props2 }) => {
|
|
300
|
+
return /* @__PURE__ */ jsx(
|
|
301
|
+
"div",
|
|
302
|
+
{
|
|
303
|
+
"data-slot": "calendar",
|
|
304
|
+
ref: rootRef,
|
|
305
|
+
className: cn(className2),
|
|
306
|
+
...props2
|
|
307
|
+
}
|
|
308
|
+
);
|
|
309
|
+
},
|
|
310
|
+
Chevron: ({ className: className2, orientation, ...props2 }) => {
|
|
311
|
+
if (orientation === "left") {
|
|
312
|
+
return /* @__PURE__ */ jsx(ChevronLeftIcon, { className: cn("shared:size-10 shared:p-2 shared:bg-muted/50 shared:rounded-full", className2), ...props2 });
|
|
313
|
+
}
|
|
314
|
+
if (orientation === "right") {
|
|
315
|
+
return /* @__PURE__ */ jsx(
|
|
316
|
+
ChevronRightIcon,
|
|
317
|
+
{
|
|
318
|
+
className: cn("shared:size-10 shared:p-2 shared:bg-muted/50 shared:rounded-full", className2),
|
|
319
|
+
...props2
|
|
320
|
+
}
|
|
321
|
+
);
|
|
322
|
+
}
|
|
323
|
+
return /* @__PURE__ */ jsx(ChevronDownIcon, { className: cn("shared:size-4", className2), ...props2 });
|
|
324
|
+
},
|
|
325
|
+
DayButton: CalendarDayButton,
|
|
326
|
+
WeekNumber: ({ children, ...props2 }) => {
|
|
327
|
+
return /* @__PURE__ */ jsx("td", { ...props2, children: /* @__PURE__ */ jsx("div", { className: "shared:flex shared:size-[var(--cell-size)] shared:items-center shared:justify-center shared:text-center", children }) });
|
|
328
|
+
},
|
|
329
|
+
...components
|
|
330
|
+
},
|
|
331
|
+
...props
|
|
332
|
+
}
|
|
333
|
+
),
|
|
334
|
+
/* @__PURE__ */ jsx("div", { className: "shared:px-2 shared:pb-2 shared:mt-[-4px] shared:min-h-min shared:flex shared:justify-end", children: showMonthYearPicker ? /* @__PURE__ */ jsx(
|
|
335
|
+
Button,
|
|
336
|
+
{
|
|
337
|
+
variant: "default2",
|
|
338
|
+
onClick: () => setShowMonthYearPicker(false),
|
|
339
|
+
children: "Done"
|
|
340
|
+
}
|
|
341
|
+
) : /* @__PURE__ */ jsx(
|
|
342
|
+
Button,
|
|
343
|
+
{
|
|
344
|
+
variant: "default2",
|
|
345
|
+
onClick: handleTodayClick,
|
|
346
|
+
children: "Today"
|
|
347
|
+
}
|
|
348
|
+
) })
|
|
349
|
+
] });
|
|
350
|
+
if (type === "raw") return CalendarContent;
|
|
351
|
+
if (isDrawer) {
|
|
352
|
+
return /* @__PURE__ */ jsxs(Drawer, { open, onOpenChange: setOpen, shouldScaleBackground: false, children: [
|
|
353
|
+
/* @__PURE__ */ jsx(DrawerTrigger, { asChild: true, children: trigger || /* @__PURE__ */ jsxs(Button, { type: "button", variant: "input", children: [
|
|
354
|
+
label,
|
|
355
|
+
/* @__PURE__ */ jsx(Calendar$1, { theme: "outline", size: "19", fill: "#000000" })
|
|
356
|
+
] }) }),
|
|
357
|
+
/* @__PURE__ */ jsxs(DrawerContent, { className: "shared:p-2 shared:flex shared:flex-col shared:justify-center shared:items-center", children: [
|
|
358
|
+
CalendarContent,
|
|
359
|
+
/* @__PURE__ */ jsx(DrawerFooter, { className: "shared:w-full shared:pt-0 shared:max-w-sm shared:px-0 shared:pb-0", children: /* @__PURE__ */ jsx(DrawerClose, { asChild: true, children: /* @__PURE__ */ jsx(Button, { variant: "secondary", size: "lg", className: "shared:w-full", children: "Close" }) }) })
|
|
360
|
+
] })
|
|
361
|
+
] });
|
|
362
|
+
}
|
|
363
|
+
return /* @__PURE__ */ jsxs(Popover, { children: [
|
|
364
|
+
/* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: trigger }),
|
|
365
|
+
/* @__PURE__ */ jsx(PopoverContent, { className: "shared:w-auto shared:p-0", align: "start", children: CalendarContent })
|
|
366
|
+
] });
|
|
367
|
+
}
|
|
368
|
+
function CalendarDayButton({
|
|
369
|
+
className,
|
|
370
|
+
day,
|
|
371
|
+
modifiers,
|
|
372
|
+
...props
|
|
373
|
+
}) {
|
|
374
|
+
const defaultClassNames = getDefaultClassNames();
|
|
375
|
+
const ref = React.useRef(null);
|
|
376
|
+
React.useEffect(() => {
|
|
377
|
+
if (modifiers.focused) ref.current?.focus();
|
|
378
|
+
}, [modifiers.focused]);
|
|
379
|
+
return /* @__PURE__ */ jsx(
|
|
380
|
+
Button,
|
|
381
|
+
{
|
|
382
|
+
ref,
|
|
383
|
+
variant: "ghost",
|
|
384
|
+
size: "icon",
|
|
385
|
+
"data-day": day.date.toLocaleDateString(),
|
|
386
|
+
"data-selected-single": modifiers.selected && !modifiers.range_start && !modifiers.range_end && !modifiers.range_middle,
|
|
387
|
+
"data-range-start": modifiers.range_start,
|
|
388
|
+
"data-range-end": modifiers.range_end,
|
|
389
|
+
"data-range-middle": modifiers.range_middle,
|
|
390
|
+
className: cn(
|
|
391
|
+
"shared:rounded-full shared:cupertino-corner shared:data-[selected-single=true]:bg-primary shared:data-[selected-single=true]:text-primary-foreground shared:data-[range-middle=true]:bg-accent shared:data-[range-middle=true]:text-accent-foreground shared:data-[range-start=true]:bg-primary shared:data-[range-start=true]:text-primary-foreground shared:data-[range-end=true]:bg-primary shared:data-[range-end=true]:text-primary-foreground shared:focus-visible:border-ring shared:focus-visible:ring-ring/50 shared:flex shared:items-center shared:justify-center shared:aspect-square shared:h-12 shared:md:h-9 shared:min-w-[--cell-size] shared:flex-col shared:gap-1 shared:font-normal shared:leading-none shared:data-[range-end=true]:rounded-full shared:data-[range-end=true]:cupertino-corner shared:data-[range-middle=true]:rounded-none shared:data-[range-start=true]:rounded-full shared:data-[range-start=true]:cupertino-corner shared:focus-visible:relative shared:focus-visible:z-10 shared:focus-visible:ring-[3px] shared:[&>span]:text-xs shared:[&>span]:opacity-70 shared:hover:text-black shared:data-[selected-single=true]:hover:text-primary-foreground shared:data-[selected-single=true]:hover:bg-primary shared:data-[range-start=true]:hover:text-primary-foreground shared:data-[range-start=true]:hover:bg-primary shared:data-[range-end=true]:hover:text-primary-foreground shared:data-[range-end=true]:hover:bg-primary",
|
|
392
|
+
defaultClassNames.day,
|
|
393
|
+
className
|
|
394
|
+
),
|
|
395
|
+
...props
|
|
396
|
+
}
|
|
397
|
+
);
|
|
398
|
+
}
|
|
399
|
+
export {
|
|
400
|
+
Calendar,
|
|
401
|
+
CalendarDayButton
|
|
402
|
+
};
|