@hyddenlabs/hydn-ui 0.3.0-alpha.99 → 0.3.1
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 +46 -29
- package/dist/components/branding/google-logo.d.ts +14 -0
- package/dist/components/branding/google-logo.d.ts.map +1 -0
- package/dist/components/branding/google-logo.js +49 -0
- package/dist/components/branding/google-logo.js.map +1 -0
- package/dist/components/branding/hydden-logo.d.ts +14 -0
- package/dist/components/branding/hydden-logo.d.ts.map +1 -0
- package/dist/components/branding/hydden-logo.js +8 -0
- package/dist/components/branding/hydden-logo.js.map +1 -0
- package/dist/components/branding/microsoft-logo.d.ts +14 -0
- package/dist/components/branding/microsoft-logo.d.ts.map +1 -0
- package/dist/components/branding/microsoft-logo.js +25 -0
- package/dist/components/branding/microsoft-logo.js.map +1 -0
- package/dist/components/data-display/avatar/avatar.d.ts +24 -0
- package/dist/components/data-display/avatar/avatar.d.ts.map +1 -0
- package/dist/components/data-display/avatar/avatar.js +25 -0
- package/dist/components/data-display/avatar/avatar.js.map +1 -0
- package/dist/components/data-display/avatar/index.d.ts +3 -0
- package/dist/components/data-display/avatar/index.d.ts.map +1 -0
- package/dist/components/data-display/badge/badge.d.ts +24 -0
- package/dist/components/data-display/badge/badge.d.ts.map +1 -0
- package/dist/components/data-display/badge/badge.js +27 -0
- package/dist/components/data-display/badge/badge.js.map +1 -0
- package/dist/components/data-display/badge/index.d.ts +5 -0
- package/dist/components/data-display/badge/index.d.ts.map +1 -0
- package/dist/components/data-display/badge/status-label.d.ts +25 -0
- package/dist/components/data-display/badge/status-label.d.ts.map +1 -0
- package/dist/components/data-display/badge/status-label.js +63 -0
- package/dist/components/data-display/badge/status-label.js.map +1 -0
- package/dist/components/data-display/chip/chip.d.ts +42 -0
- package/dist/components/data-display/chip/chip.d.ts.map +1 -0
- package/dist/components/data-display/chip/chip.js +79 -0
- package/dist/components/data-display/chip/chip.js.map +1 -0
- package/dist/components/data-display/chip/index.d.ts +3 -0
- package/dist/components/data-display/chip/index.d.ts.map +1 -0
- package/dist/components/data-display/code-block/code-block.d.ts +17 -0
- package/dist/components/data-display/code-block/code-block.d.ts.map +1 -0
- package/dist/components/data-display/code-block/code-block.js +34 -0
- package/dist/components/data-display/code-block/code-block.js.map +1 -0
- package/dist/components/data-display/data-table/data-table.d.ts +226 -0
- package/dist/components/data-display/data-table/data-table.d.ts.map +1 -0
- package/dist/components/data-display/data-table/data-table.js +404 -0
- package/dist/components/data-display/data-table/data-table.js.map +1 -0
- package/dist/components/data-display/data-table/index.d.ts +5 -0
- package/dist/components/data-display/data-table/index.d.ts.map +1 -0
- package/dist/components/data-display/data-table/use-table.d.ts +42 -0
- package/dist/components/data-display/data-table/use-table.d.ts.map +1 -0
- package/dist/components/data-display/data-table/use-table.js +120 -0
- package/dist/components/data-display/data-table/use-table.js.map +1 -0
- package/dist/components/data-display/empty-state/empty-state.d.ts +8 -0
- package/dist/components/data-display/empty-state/empty-state.d.ts.map +1 -0
- package/dist/components/data-display/empty-state/empty-state.js +17 -0
- package/dist/components/data-display/empty-state/empty-state.js.map +1 -0
- package/dist/components/data-display/empty-state/index.d.ts +3 -0
- package/dist/components/data-display/empty-state/index.d.ts.map +1 -0
- package/dist/components/data-display/list/index.d.ts +3 -0
- package/dist/components/data-display/list/index.d.ts.map +1 -0
- package/dist/components/data-display/list/list.d.ts +31 -0
- package/dist/components/data-display/list/list.d.ts.map +1 -0
- package/dist/components/data-display/list/list.js +16 -0
- package/dist/components/data-display/list/list.js.map +1 -0
- package/dist/components/data-display/table/index.d.ts +3 -0
- package/dist/components/data-display/table/index.d.ts.map +1 -0
- package/dist/components/data-display/table/table.d.ts +101 -0
- package/dist/components/data-display/table/table.d.ts.map +1 -0
- package/dist/components/data-display/table/table.js +98 -0
- package/dist/components/data-display/table/table.js.map +1 -0
- package/dist/components/data-display/timeline/index.d.ts +3 -0
- package/dist/components/data-display/timeline/index.d.ts.map +1 -0
- package/dist/components/data-display/timeline/timeline.d.ts +57 -0
- package/dist/components/data-display/timeline/timeline.d.ts.map +1 -0
- package/dist/components/data-display/timeline/timeline.js +52 -0
- package/dist/components/data-display/timeline/timeline.js.map +1 -0
- package/dist/components/feedback/alert/alert.d.ts +27 -0
- package/dist/components/feedback/alert/alert.d.ts.map +1 -0
- package/dist/components/feedback/alert/alert.js +86 -0
- package/dist/components/feedback/alert/alert.js.map +1 -0
- package/dist/components/feedback/alert/index.d.ts +3 -0
- package/dist/components/feedback/alert/index.d.ts.map +1 -0
- package/dist/components/feedback/dialog/delete-dialog.d.ts +41 -0
- package/dist/components/feedback/dialog/delete-dialog.d.ts.map +1 -0
- package/dist/components/feedback/dialog/delete-dialog.js +52 -0
- package/dist/components/feedback/dialog/delete-dialog.js.map +1 -0
- package/dist/components/feedback/dialog/dialog.d.ts +24 -0
- package/dist/components/feedback/dialog/dialog.d.ts.map +1 -0
- package/dist/components/feedback/dialog/dialog.js +15 -0
- package/dist/components/feedback/dialog/dialog.js.map +1 -0
- package/dist/components/feedback/dialog/index.d.ts +5 -0
- package/dist/components/feedback/dialog/index.d.ts.map +1 -0
- package/dist/components/feedback/error-page/error-400.d.ts +22 -0
- package/dist/components/feedback/error-page/error-400.d.ts.map +1 -0
- package/dist/components/feedback/error-page/error-400.js +28 -0
- package/dist/components/feedback/error-page/error-400.js.map +1 -0
- package/dist/components/feedback/error-page/error-401.d.ts +26 -0
- package/dist/components/feedback/error-page/error-401.d.ts.map +1 -0
- package/dist/components/feedback/error-page/error-401.js +33 -0
- package/dist/components/feedback/error-page/error-401.js.map +1 -0
- package/dist/components/feedback/error-page/error-403.d.ts +26 -0
- package/dist/components/feedback/error-page/error-403.d.ts.map +1 -0
- package/dist/components/feedback/error-page/error-403.js +33 -0
- package/dist/components/feedback/error-page/error-403.js.map +1 -0
- package/dist/components/feedback/error-page/error-404.d.ts +26 -0
- package/dist/components/feedback/error-page/error-404.d.ts.map +1 -0
- package/dist/components/feedback/error-page/error-404.js +33 -0
- package/dist/components/feedback/error-page/error-404.js.map +1 -0
- package/dist/components/feedback/error-page/index.d.ts +9 -0
- package/dist/components/feedback/error-page/index.d.ts.map +1 -0
- package/dist/components/feedback/loading-container/index.d.ts +3 -0
- package/dist/components/feedback/loading-container/index.d.ts.map +1 -0
- package/dist/components/feedback/loading-container/loading-container.d.ts +16 -0
- package/dist/components/feedback/loading-container/loading-container.d.ts.map +1 -0
- package/dist/components/feedback/loading-container/loading-container.js +28 -0
- package/dist/components/feedback/loading-container/loading-container.js.map +1 -0
- package/dist/components/feedback/modal/index.d.ts +3 -0
- package/dist/components/feedback/modal/index.d.ts.map +1 -0
- package/dist/components/feedback/modal/modal.d.ts +33 -0
- package/dist/components/feedback/modal/modal.d.ts.map +1 -0
- package/dist/components/feedback/modal/modal.js +88 -0
- package/dist/components/feedback/modal/modal.js.map +1 -0
- package/dist/components/feedback/overlay/useOverlay.d.ts +24 -0
- package/dist/components/feedback/overlay/useOverlay.d.ts.map +1 -0
- package/dist/components/feedback/overlay/useOverlay.js +119 -0
- package/dist/components/feedback/overlay/useOverlay.js.map +1 -0
- package/dist/components/feedback/popover/index.d.ts +3 -0
- package/dist/components/feedback/popover/index.d.ts.map +1 -0
- package/dist/components/feedback/popover/popover.d.ts +25 -0
- package/dist/components/feedback/popover/popover.d.ts.map +1 -0
- package/dist/components/feedback/popover/popover.js +118 -0
- package/dist/components/feedback/popover/popover.js.map +1 -0
- package/dist/components/feedback/progress-bar/index.d.ts +3 -0
- package/dist/components/feedback/progress-bar/index.d.ts.map +1 -0
- package/dist/components/feedback/progress-bar/progress-bar.d.ts +22 -0
- package/dist/components/feedback/progress-bar/progress-bar.d.ts.map +1 -0
- package/dist/components/feedback/progress-bar/progress-bar.js +27 -0
- package/dist/components/feedback/progress-bar/progress-bar.js.map +1 -0
- package/dist/components/feedback/skeleton/index.d.ts +3 -0
- package/dist/components/feedback/skeleton/index.d.ts.map +1 -0
- package/dist/components/feedback/skeleton/skeleton.d.ts +19 -0
- package/dist/components/feedback/skeleton/skeleton.d.ts.map +1 -0
- package/dist/components/feedback/skeleton/skeleton.js +28 -0
- package/dist/components/feedback/skeleton/skeleton.js.map +1 -0
- package/dist/components/feedback/smooth-transition/index.d.ts +3 -0
- package/dist/components/feedback/smooth-transition/index.d.ts.map +1 -0
- package/dist/components/feedback/smooth-transition/smooth-transition.d.ts +68 -0
- package/dist/components/feedback/smooth-transition/smooth-transition.d.ts.map +1 -0
- package/dist/components/feedback/smooth-transition/smooth-transition.js +89 -0
- package/dist/components/feedback/smooth-transition/smooth-transition.js.map +1 -0
- package/dist/components/feedback/spinner/index.d.ts +3 -0
- package/dist/components/feedback/spinner/index.d.ts.map +1 -0
- package/dist/components/feedback/spinner/spinner.d.ts +21 -0
- package/dist/components/feedback/spinner/spinner.d.ts.map +1 -0
- package/dist/components/feedback/spinner/spinner.js +27 -0
- package/dist/components/feedback/spinner/spinner.js.map +1 -0
- package/dist/components/feedback/toast/index.d.ts +3 -0
- package/dist/components/feedback/toast/index.d.ts.map +1 -0
- package/dist/components/feedback/toast/toast.d.ts +23 -0
- package/dist/components/feedback/toast/toast.d.ts.map +1 -0
- package/dist/components/feedback/toast/toast.js +45 -0
- package/dist/components/feedback/toast/toast.js.map +1 -0
- package/dist/components/feedback/tooltip/index.d.ts +3 -0
- package/dist/components/feedback/tooltip/index.d.ts.map +1 -0
- package/dist/components/feedback/tooltip/tooltip.d.ts +39 -0
- package/dist/components/feedback/tooltip/tooltip.d.ts.map +1 -0
- package/dist/components/feedback/tooltip/tooltip.js +129 -0
- package/dist/components/feedback/tooltip/tooltip.js.map +1 -0
- package/dist/components/forms/button/button-with-icon.d.ts +18 -0
- package/dist/components/forms/button/button-with-icon.d.ts.map +1 -0
- package/dist/components/forms/button/button-with-icon.js +15 -0
- package/dist/components/forms/button/button-with-icon.js.map +1 -0
- package/dist/components/forms/button/button.d.ts +66 -0
- package/dist/components/forms/button/button.d.ts.map +1 -0
- package/dist/components/forms/button/button.examples.d.ts +73 -0
- package/dist/components/forms/button/button.examples.d.ts.map +1 -0
- package/dist/components/forms/button/button.js +118 -0
- package/dist/components/forms/button/button.js.map +1 -0
- package/dist/components/forms/button/icon-button.d.ts +23 -0
- package/dist/components/forms/button/icon-button.d.ts.map +1 -0
- package/dist/components/forms/button/icon-button.js +85 -0
- package/dist/components/forms/button/icon-button.js.map +1 -0
- package/dist/components/forms/button/index.d.ts +10 -0
- package/dist/components/forms/button/index.d.ts.map +1 -0
- package/dist/components/forms/button/inline-button.d.ts +45 -0
- package/dist/components/forms/button/inline-button.d.ts.map +1 -0
- package/dist/components/forms/button/inline-button.js +59 -0
- package/dist/components/forms/button/inline-button.js.map +1 -0
- package/dist/components/forms/button-group/button-group.d.ts +20 -0
- package/dist/components/forms/button-group/button-group.d.ts.map +1 -0
- package/dist/components/forms/button-group/button-group.js +24 -0
- package/dist/components/forms/button-group/button-group.js.map +1 -0
- package/dist/components/forms/button-group/index.d.ts +3 -0
- package/dist/components/forms/button-group/index.d.ts.map +1 -0
- package/dist/components/forms/calendar/calendar.d.ts +37 -0
- package/dist/components/forms/calendar/calendar.d.ts.map +1 -0
- package/dist/components/forms/calendar/calendar.js +131 -0
- package/dist/components/forms/calendar/calendar.js.map +1 -0
- package/dist/components/forms/calendar/index.d.ts +3 -0
- package/dist/components/forms/calendar/index.d.ts.map +1 -0
- package/dist/components/forms/checkbox/checkbox.d.ts +31 -0
- package/dist/components/forms/checkbox/checkbox.d.ts.map +1 -0
- package/dist/components/forms/checkbox/checkbox.js +39 -0
- package/dist/components/forms/checkbox/checkbox.js.map +1 -0
- package/dist/components/forms/checkbox/index.d.ts +3 -0
- package/dist/components/forms/checkbox/index.d.ts.map +1 -0
- package/dist/components/forms/code/code.d.ts +32 -0
- package/dist/components/forms/code/code.d.ts.map +1 -0
- package/dist/components/forms/code/code.js +31 -0
- package/dist/components/forms/code/code.js.map +1 -0
- package/dist/components/forms/code/index.d.ts +1 -0
- package/dist/components/forms/code/index.d.ts.map +1 -0
- package/dist/components/forms/date-picker/date-picker.d.ts +72 -0
- package/dist/components/forms/date-picker/date-picker.d.ts.map +1 -0
- package/dist/components/forms/date-picker/date-picker.js +173 -0
- package/dist/components/forms/date-picker/date-picker.js.map +1 -0
- package/dist/components/forms/date-picker/index.d.ts +3 -0
- package/dist/components/forms/date-picker/index.d.ts.map +1 -0
- package/dist/components/forms/editable-text/editable-text.d.ts +59 -0
- package/dist/components/forms/editable-text/editable-text.d.ts.map +1 -0
- package/dist/components/forms/editable-text/editable-text.js +188 -0
- package/dist/components/forms/editable-text/editable-text.js.map +1 -0
- package/dist/components/forms/editable-text/index.d.ts +3 -0
- package/dist/components/forms/editable-text/index.d.ts.map +1 -0
- package/dist/components/forms/fieldset/fieldset.d.ts +46 -0
- package/dist/components/forms/fieldset/fieldset.d.ts.map +1 -0
- package/dist/components/forms/fieldset/fieldset.js +40 -0
- package/dist/components/forms/fieldset/fieldset.js.map +1 -0
- package/dist/components/forms/fieldset/index.d.ts +3 -0
- package/dist/components/forms/fieldset/index.d.ts.map +1 -0
- package/dist/components/forms/form/form-example.d.ts +11 -0
- package/dist/components/forms/form/form-example.d.ts.map +1 -0
- package/dist/components/forms/form/form.d.ts +44 -0
- package/dist/components/forms/form/form.d.ts.map +1 -0
- package/dist/components/forms/form/form.js +39 -0
- package/dist/components/forms/form/form.js.map +1 -0
- package/dist/components/forms/form/index.d.ts +3 -0
- package/dist/components/forms/form/index.d.ts.map +1 -0
- package/dist/components/forms/form-checkbox/form-checkbox.d.ts +27 -0
- package/dist/components/forms/form-checkbox/form-checkbox.d.ts.map +1 -0
- package/dist/components/forms/form-checkbox/form-checkbox.js +58 -0
- package/dist/components/forms/form-checkbox/form-checkbox.js.map +1 -0
- package/dist/components/forms/form-checkbox/index.d.ts +3 -0
- package/dist/components/forms/form-checkbox/index.d.ts.map +1 -0
- package/dist/components/forms/form-checkbox-group/form-checkbox-group.d.ts +40 -0
- package/dist/components/forms/form-checkbox-group/form-checkbox-group.d.ts.map +1 -0
- package/dist/components/forms/form-checkbox-group/form-checkbox-group.js +74 -0
- package/dist/components/forms/form-checkbox-group/form-checkbox-group.js.map +1 -0
- package/dist/components/forms/form-field/form-field.d.ts +53 -0
- package/dist/components/forms/form-field/form-field.d.ts.map +1 -0
- package/dist/components/forms/form-field/form-field.js +56 -0
- package/dist/components/forms/form-field/form-field.js.map +1 -0
- package/dist/components/forms/form-field/index.d.ts +3 -0
- package/dist/components/forms/form-field/index.d.ts.map +1 -0
- package/dist/components/forms/form-input/form-input.d.ts +60 -0
- package/dist/components/forms/form-input/form-input.d.ts.map +1 -0
- package/dist/components/forms/form-input/form-input.js +53 -0
- package/dist/components/forms/form-input/form-input.js.map +1 -0
- package/dist/components/forms/form-select/form-select.d.ts +32 -0
- package/dist/components/forms/form-select/form-select.d.ts.map +1 -0
- package/dist/components/forms/form-select/form-select.js +34 -0
- package/dist/components/forms/form-select/form-select.js.map +1 -0
- package/dist/components/forms/form-textarea/form-textarea.d.ts +31 -0
- package/dist/components/forms/form-textarea/form-textarea.d.ts.map +1 -0
- package/dist/components/forms/form-textarea/form-textarea.js +34 -0
- package/dist/components/forms/form-textarea/form-textarea.js.map +1 -0
- package/dist/components/forms/input/index.d.ts +3 -0
- package/dist/components/forms/input/index.d.ts.map +1 -0
- package/dist/components/forms/input/input.d.ts +71 -0
- package/dist/components/forms/input/input.d.ts.map +1 -0
- package/dist/components/forms/input/input.js +64 -0
- package/dist/components/forms/input/input.js.map +1 -0
- package/dist/components/forms/input-group/index.d.ts +3 -0
- package/dist/components/forms/input-group/index.d.ts.map +1 -0
- package/dist/components/forms/input-group/input-group.d.ts +43 -0
- package/dist/components/forms/input-group/input-group.d.ts.map +1 -0
- package/dist/components/forms/input-group/input-group.js +55 -0
- package/dist/components/forms/input-group/input-group.js.map +1 -0
- package/dist/components/forms/multi-select/index.d.ts +3 -0
- package/dist/components/forms/multi-select/index.d.ts.map +1 -0
- package/dist/components/forms/multi-select/multi-select.d.ts +75 -0
- package/dist/components/forms/multi-select/multi-select.d.ts.map +1 -0
- package/dist/components/forms/multi-select/multi-select.js +259 -0
- package/dist/components/forms/multi-select/multi-select.js.map +1 -0
- package/dist/components/forms/radio/index.d.ts +3 -0
- package/dist/components/forms/radio/index.d.ts.map +1 -0
- package/dist/components/forms/radio/radio.d.ts +31 -0
- package/dist/components/forms/radio/radio.d.ts.map +1 -0
- package/dist/components/forms/radio/radio.js +74 -0
- package/dist/components/forms/radio/radio.js.map +1 -0
- package/dist/components/forms/radio-group/index.d.ts +3 -0
- package/dist/components/forms/radio-group/index.d.ts.map +1 -0
- package/dist/components/forms/radio-group/radio-group.d.ts +32 -0
- package/dist/components/forms/radio-group/radio-group.d.ts.map +1 -0
- package/dist/components/forms/radio-group/radio-group.js +28 -0
- package/dist/components/forms/radio-group/radio-group.js.map +1 -0
- package/dist/components/forms/select/index.d.ts +5 -0
- package/dist/components/forms/select/index.d.ts.map +1 -0
- package/dist/components/forms/select/select-item.d.ts +16 -0
- package/dist/components/forms/select/select-item.d.ts.map +1 -0
- package/dist/components/forms/select/select-item.js +9 -0
- package/dist/components/forms/select/select-item.js.map +1 -0
- package/dist/components/forms/select/select.d.ts +52 -0
- package/dist/components/forms/select/select.d.ts.map +1 -0
- package/dist/components/forms/select/select.js +51 -0
- package/dist/components/forms/select/select.js.map +1 -0
- package/dist/components/forms/slider/index.d.ts +3 -0
- package/dist/components/forms/slider/index.d.ts.map +1 -0
- package/dist/components/forms/slider/slider.d.ts +21 -0
- package/dist/components/forms/slider/slider.d.ts.map +1 -0
- package/dist/components/forms/slider/slider.js +65 -0
- package/dist/components/forms/slider/slider.js.map +1 -0
- package/dist/components/forms/switch/index.d.ts +3 -0
- package/dist/components/forms/switch/index.d.ts.map +1 -0
- package/dist/components/forms/switch/switch.d.ts +30 -0
- package/dist/components/forms/switch/switch.d.ts.map +1 -0
- package/dist/components/forms/switch/switch.js +104 -0
- package/dist/components/forms/switch/switch.js.map +1 -0
- package/dist/components/forms/textarea/index.d.ts +3 -0
- package/dist/components/forms/textarea/index.d.ts.map +1 -0
- package/dist/components/forms/textarea/textarea.d.ts +54 -0
- package/dist/components/forms/textarea/textarea.d.ts.map +1 -0
- package/dist/components/forms/textarea/textarea.js +55 -0
- package/dist/components/forms/textarea/textarea.js.map +1 -0
- package/dist/components/index.d.ts +124 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/layout/accordion/accordion.d.ts +30 -0
- package/dist/components/layout/accordion/accordion.d.ts.map +1 -0
- package/dist/components/layout/accordion/accordion.js +38 -0
- package/dist/components/layout/accordion/accordion.js.map +1 -0
- package/dist/components/layout/accordion/index.d.ts +3 -0
- package/dist/components/layout/accordion/index.d.ts.map +1 -0
- package/dist/components/layout/action-card/action-card.d.ts +37 -0
- package/dist/components/layout/action-card/action-card.d.ts.map +1 -0
- package/dist/components/layout/action-card/action-card.js +104 -0
- package/dist/components/layout/action-card/action-card.js.map +1 -0
- package/dist/components/layout/action-card/index.d.ts +3 -0
- package/dist/components/layout/action-card/index.d.ts.map +1 -0
- package/dist/components/layout/card/card-actions.d.ts +47 -0
- package/dist/components/layout/card/card-actions.d.ts.map +1 -0
- package/dist/components/layout/card/card-actions.js +30 -0
- package/dist/components/layout/card/card-actions.js.map +1 -0
- package/dist/components/layout/card/card-body.d.ts +26 -0
- package/dist/components/layout/card/card-body.d.ts.map +1 -0
- package/dist/components/layout/card/card-body.js +22 -0
- package/dist/components/layout/card/card-body.js.map +1 -0
- package/dist/components/layout/card/card-figure.d.ts +50 -0
- package/dist/components/layout/card/card-figure.d.ts.map +1 -0
- package/dist/components/layout/card/card-figure.js +27 -0
- package/dist/components/layout/card/card-figure.js.map +1 -0
- package/dist/components/layout/card/card-footer.d.ts +46 -0
- package/dist/components/layout/card/card-footer.d.ts.map +1 -0
- package/dist/components/layout/card/card-footer.js +39 -0
- package/dist/components/layout/card/card-footer.js.map +1 -0
- package/dist/components/layout/card/card-header.d.ts +41 -0
- package/dist/components/layout/card/card-header.d.ts.map +1 -0
- package/dist/components/layout/card/card-header.js +27 -0
- package/dist/components/layout/card/card-header.js.map +1 -0
- package/dist/components/layout/card/card-title.d.ts +43 -0
- package/dist/components/layout/card/card-title.d.ts.map +1 -0
- package/dist/components/layout/card/card-title.js +21 -0
- package/dist/components/layout/card/card-title.js.map +1 -0
- package/dist/components/layout/card/card.d.ts +74 -0
- package/dist/components/layout/card/card.d.ts.map +1 -0
- package/dist/components/layout/card/card.js +64 -0
- package/dist/components/layout/card/card.js.map +1 -0
- package/dist/components/layout/card/index.d.ts +15 -0
- package/dist/components/layout/card/index.d.ts.map +1 -0
- package/dist/components/layout/container/container.d.ts +33 -0
- package/dist/components/layout/container/container.d.ts.map +1 -0
- package/dist/components/layout/container/container.js +36 -0
- package/dist/components/layout/container/container.js.map +1 -0
- package/dist/components/layout/container/index.d.ts +3 -0
- package/dist/components/layout/container/index.d.ts.map +1 -0
- package/dist/components/layout/divider/divider.d.ts +15 -0
- package/dist/components/layout/divider/divider.d.ts.map +1 -0
- package/dist/components/layout/divider/divider.js +10 -0
- package/dist/components/layout/divider/divider.js.map +1 -0
- package/dist/components/layout/divider/index.d.ts +3 -0
- package/dist/components/layout/divider/index.d.ts.map +1 -0
- package/dist/components/layout/drawer/drawer.d.ts +35 -0
- package/dist/components/layout/drawer/drawer.d.ts.map +1 -0
- package/dist/components/layout/drawer/drawer.js +108 -0
- package/dist/components/layout/drawer/drawer.js.map +1 -0
- package/dist/components/layout/drawer/index.d.ts +3 -0
- package/dist/components/layout/drawer/index.d.ts.map +1 -0
- package/dist/components/layout/feature-section/feature-section.d.ts +36 -0
- package/dist/components/layout/feature-section/feature-section.d.ts.map +1 -0
- package/dist/components/layout/feature-section/feature-section.js +37 -0
- package/dist/components/layout/feature-section/feature-section.js.map +1 -0
- package/dist/components/layout/feature-section/index.d.ts +3 -0
- package/dist/components/layout/feature-section/index.d.ts.map +1 -0
- package/dist/components/layout/footer/footer.d.ts +37 -0
- package/dist/components/layout/footer/footer.d.ts.map +1 -0
- package/dist/components/layout/footer/footer.js +36 -0
- package/dist/components/layout/footer/footer.js.map +1 -0
- package/dist/components/layout/footer/index.d.ts +3 -0
- package/dist/components/layout/footer/index.d.ts.map +1 -0
- package/dist/components/layout/grid/grid.d.ts +66 -0
- package/dist/components/layout/grid/grid.d.ts.map +1 -0
- package/dist/components/layout/grid/grid.js +62 -0
- package/dist/components/layout/grid/grid.js.map +1 -0
- package/dist/components/layout/grid/index.d.ts +3 -0
- package/dist/components/layout/grid/index.d.ts.map +1 -0
- package/dist/components/layout/hero/hero.d.ts +61 -0
- package/dist/components/layout/hero/hero.d.ts.map +1 -0
- package/dist/components/layout/hero/hero.js +79 -0
- package/dist/components/layout/hero/hero.js.map +1 -0
- package/dist/components/layout/hero/index.d.ts +3 -0
- package/dist/components/layout/hero/index.d.ts.map +1 -0
- package/dist/components/layout/left-nav-layout/index.d.ts +7 -0
- package/dist/components/layout/left-nav-layout/index.d.ts.map +1 -0
- package/dist/components/layout/left-nav-layout/left-nav-item.d.ts +56 -0
- package/dist/components/layout/left-nav-layout/left-nav-item.d.ts.map +1 -0
- package/dist/components/layout/left-nav-layout/left-nav-item.js +105 -0
- package/dist/components/layout/left-nav-layout/left-nav-item.js.map +1 -0
- package/dist/components/layout/left-nav-layout/left-nav-layout.d.ts +67 -0
- package/dist/components/layout/left-nav-layout/left-nav-layout.d.ts.map +1 -0
- package/dist/components/layout/left-nav-layout/left-nav-layout.js +182 -0
- package/dist/components/layout/left-nav-layout/left-nav-layout.js.map +1 -0
- package/dist/components/layout/left-nav-layout/left-nav-section.d.ts +40 -0
- package/dist/components/layout/left-nav-layout/left-nav-section.d.ts.map +1 -0
- package/dist/components/layout/left-nav-layout/left-nav-section.js +119 -0
- package/dist/components/layout/left-nav-layout/left-nav-section.js.map +1 -0
- package/dist/components/layout/page/index.d.ts +3 -0
- package/dist/components/layout/page/index.d.ts.map +1 -0
- package/dist/components/layout/page/page.d.ts +17 -0
- package/dist/components/layout/page/page.d.ts.map +1 -0
- package/dist/components/layout/page/page.js +9 -0
- package/dist/components/layout/page/page.js.map +1 -0
- package/dist/components/layout/page-header/index.d.ts +3 -0
- package/dist/components/layout/page-header/index.d.ts.map +1 -0
- package/dist/components/layout/page-header/page-header.d.ts +21 -0
- package/dist/components/layout/page-header/page-header.d.ts.map +1 -0
- package/dist/components/layout/page-header/page-header.js +18 -0
- package/dist/components/layout/page-header/page-header.js.map +1 -0
- package/dist/components/layout/page-transition/index.d.ts +3 -0
- package/dist/components/layout/page-transition/index.d.ts.map +1 -0
- package/dist/components/layout/page-transition/page-transition.d.ts +52 -0
- package/dist/components/layout/page-transition/page-transition.d.ts.map +1 -0
- package/dist/components/layout/page-transition/page-transition.js +43 -0
- package/dist/components/layout/page-transition/page-transition.js.map +1 -0
- package/dist/components/layout/section/index.d.ts +3 -0
- package/dist/components/layout/section/index.d.ts.map +1 -0
- package/dist/components/layout/section/section.d.ts +35 -0
- package/dist/components/layout/section/section.d.ts.map +1 -0
- package/dist/components/layout/section/section.js +18 -0
- package/dist/components/layout/section/section.js.map +1 -0
- package/dist/components/layout/section-header/index.d.ts +3 -0
- package/dist/components/layout/section-header/index.d.ts.map +1 -0
- package/dist/components/layout/section-header/section-header.d.ts +23 -0
- package/dist/components/layout/section-header/section-header.d.ts.map +1 -0
- package/dist/components/layout/section-header/section-header.js +18 -0
- package/dist/components/layout/section-header/section-header.js.map +1 -0
- package/dist/components/layout/settings-page/index.d.ts +4 -0
- package/dist/components/layout/settings-page/index.d.ts.map +1 -0
- package/dist/components/layout/settings-page/setting-item.d.ts +52 -0
- package/dist/components/layout/settings-page/setting-item.d.ts.map +1 -0
- package/dist/components/layout/settings-page/setting-item.js +31 -0
- package/dist/components/layout/settings-page/setting-item.js.map +1 -0
- package/dist/components/layout/settings-page/settings-page.d.ts +37 -0
- package/dist/components/layout/settings-page/settings-page.d.ts.map +1 -0
- package/dist/components/layout/settings-page/settings-page.js +18 -0
- package/dist/components/layout/settings-page/settings-page.js.map +1 -0
- package/dist/components/layout/settings-page/settings-section.d.ts +35 -0
- package/dist/components/layout/settings-page/settings-section.d.ts.map +1 -0
- package/dist/components/layout/settings-page/settings-section.js +17 -0
- package/dist/components/layout/settings-page/settings-section.js.map +1 -0
- package/dist/components/layout/stack/index.d.ts +3 -0
- package/dist/components/layout/stack/index.d.ts.map +1 -0
- package/dist/components/layout/stack/stack.d.ts +33 -0
- package/dist/components/layout/stack/stack.d.ts.map +1 -0
- package/dist/components/layout/stack/stack.js +44 -0
- package/dist/components/layout/stack/stack.js.map +1 -0
- package/dist/components/navigation/breadcrumbs/breadcrumbs.d.ts +61 -0
- package/dist/components/navigation/breadcrumbs/breadcrumbs.d.ts.map +1 -0
- package/dist/components/navigation/breadcrumbs/breadcrumbs.js +30 -0
- package/dist/components/navigation/breadcrumbs/breadcrumbs.js.map +1 -0
- package/dist/components/navigation/breadcrumbs/index.d.ts +3 -0
- package/dist/components/navigation/breadcrumbs/index.d.ts.map +1 -0
- package/dist/components/navigation/dropdown/dropdown.d.ts +83 -0
- package/dist/components/navigation/dropdown/dropdown.d.ts.map +1 -0
- package/dist/components/navigation/dropdown/dropdown.js +295 -0
- package/dist/components/navigation/dropdown/dropdown.js.map +1 -0
- package/dist/components/navigation/dropdown/index.d.ts +5 -0
- package/dist/components/navigation/dropdown/index.d.ts.map +1 -0
- package/dist/components/navigation/nav/index.d.ts +3 -0
- package/dist/components/navigation/nav/index.d.ts.map +1 -0
- package/dist/components/navigation/nav/nav.d.ts +24 -0
- package/dist/components/navigation/nav/nav.d.ts.map +1 -0
- package/dist/components/navigation/nav/nav.js +32 -0
- package/dist/components/navigation/nav/nav.js.map +1 -0
- package/dist/components/navigation/nav-dropdown/index.d.ts +5 -0
- package/dist/components/navigation/nav-dropdown/index.d.ts.map +1 -0
- package/dist/components/navigation/nav-dropdown/nav-dropdown-item.d.ts +17 -0
- package/dist/components/navigation/nav-dropdown/nav-dropdown-item.d.ts.map +1 -0
- package/dist/components/navigation/nav-dropdown/nav-dropdown-item.js +17 -0
- package/dist/components/navigation/nav-dropdown/nav-dropdown-item.js.map +1 -0
- package/dist/components/navigation/nav-dropdown/nav-dropdown.d.ts +20 -0
- package/dist/components/navigation/nav-dropdown/nav-dropdown.d.ts.map +1 -0
- package/dist/components/navigation/nav-dropdown/nav-dropdown.js +24 -0
- package/dist/components/navigation/nav-dropdown/nav-dropdown.js.map +1 -0
- package/dist/components/navigation/navbar/index.d.ts +9 -0
- package/dist/components/navigation/navbar/index.d.ts.map +1 -0
- package/dist/components/navigation/navbar/navbar-brand.d.ts +23 -0
- package/dist/components/navigation/navbar/navbar-brand.d.ts.map +1 -0
- package/dist/components/navigation/navbar/navbar-brand.js +21 -0
- package/dist/components/navigation/navbar/navbar-brand.js.map +1 -0
- package/dist/components/navigation/navbar/navbar-link.d.ts +23 -0
- package/dist/components/navigation/navbar/navbar-link.d.ts.map +1 -0
- package/dist/components/navigation/navbar/navbar-link.js +34 -0
- package/dist/components/navigation/navbar/navbar-link.js.map +1 -0
- package/dist/components/navigation/navbar/navbar-toggle.d.ts +34 -0
- package/dist/components/navigation/navbar/navbar-toggle.d.ts.map +1 -0
- package/dist/components/navigation/navbar/navbar-toggle.js +37 -0
- package/dist/components/navigation/navbar/navbar-toggle.js.map +1 -0
- package/dist/components/navigation/navbar/navbar.d.ts +33 -0
- package/dist/components/navigation/navbar/navbar.d.ts.map +1 -0
- package/dist/components/navigation/navbar/navbar.js +40 -0
- package/dist/components/navigation/navbar/navbar.js.map +1 -0
- package/dist/components/navigation/notification-dropdown/index.d.ts +3 -0
- package/dist/components/navigation/notification-dropdown/index.d.ts.map +1 -0
- package/dist/components/navigation/notification-dropdown/notification-dropdown.d.ts +59 -0
- package/dist/components/navigation/notification-dropdown/notification-dropdown.d.ts.map +1 -0
- package/dist/components/navigation/notification-dropdown/notification-dropdown.js +456 -0
- package/dist/components/navigation/notification-dropdown/notification-dropdown.js.map +1 -0
- package/dist/components/navigation/pagination/index.d.ts +3 -0
- package/dist/components/navigation/pagination/index.d.ts.map +1 -0
- package/dist/components/navigation/pagination/pagination.d.ts +21 -0
- package/dist/components/navigation/pagination/pagination.d.ts.map +1 -0
- package/dist/components/navigation/pagination/pagination.js +72 -0
- package/dist/components/navigation/pagination/pagination.js.map +1 -0
- package/dist/components/navigation/scroll-nav/index.d.ts +3 -0
- package/dist/components/navigation/scroll-nav/index.d.ts.map +1 -0
- package/dist/components/navigation/scroll-nav/scroll-nav.d.ts +53 -0
- package/dist/components/navigation/scroll-nav/scroll-nav.d.ts.map +1 -0
- package/dist/components/navigation/scroll-nav/scroll-nav.js +188 -0
- package/dist/components/navigation/scroll-nav/scroll-nav.js.map +1 -0
- package/dist/components/navigation/sidebar/index.d.ts +3 -0
- package/dist/components/navigation/sidebar/index.d.ts.map +1 -0
- package/dist/components/navigation/sidebar/sidebar.d.ts +18 -0
- package/dist/components/navigation/sidebar/sidebar.d.ts.map +1 -0
- package/dist/components/navigation/sidebar/sidebar.js +41 -0
- package/dist/components/navigation/sidebar/sidebar.js.map +1 -0
- package/dist/components/navigation/stepper/index.d.ts +3 -0
- package/dist/components/navigation/stepper/index.d.ts.map +1 -0
- package/dist/components/navigation/stepper/stepper.d.ts +50 -0
- package/dist/components/navigation/stepper/stepper.d.ts.map +1 -0
- package/dist/components/navigation/stepper/stepper.js +159 -0
- package/dist/components/navigation/stepper/stepper.js.map +1 -0
- package/dist/components/navigation/tabs/index.d.ts +3 -0
- package/dist/components/navigation/tabs/index.d.ts.map +1 -0
- package/dist/components/navigation/tabs/tabs.d.ts +32 -0
- package/dist/components/navigation/tabs/tabs.d.ts.map +1 -0
- package/dist/components/navigation/tabs/tabs.js +61 -0
- package/dist/components/navigation/tabs/tabs.js.map +1 -0
- package/dist/components/system/auth-provider/auth-provider.d.ts +103 -0
- package/dist/components/system/auth-provider/auth-provider.d.ts.map +1 -0
- package/dist/components/system/auth-provider/auth-provider.js +118 -0
- package/dist/components/system/auth-provider/auth-provider.js.map +1 -0
- package/dist/components/system/auth-provider/auth-utils.d.ts +32 -0
- package/dist/components/system/auth-provider/auth-utils.d.ts.map +1 -0
- package/dist/components/system/auth-provider/auth-utils.js +83 -0
- package/dist/components/system/auth-provider/auth-utils.js.map +1 -0
- package/dist/components/system/auth-provider/index.d.ts +4 -0
- package/dist/components/system/auth-provider/index.d.ts.map +1 -0
- package/dist/components/system/color-mode-toggle/color-mode-toggle.d.ts +18 -0
- package/dist/components/system/color-mode-toggle/color-mode-toggle.d.ts.map +1 -0
- package/dist/components/system/color-mode-toggle/color-mode-toggle.js +27 -0
- package/dist/components/system/color-mode-toggle/color-mode-toggle.js.map +1 -0
- package/dist/components/system/color-mode-toggle/index.d.ts +3 -0
- package/dist/components/system/color-mode-toggle/index.d.ts.map +1 -0
- package/dist/components/system/error-boundary/error-boundary.d.ts +21 -0
- package/dist/components/system/error-boundary/error-boundary.d.ts.map +1 -0
- package/dist/components/system/icon/icon.d.ts +35 -0
- package/dist/components/system/icon/icon.d.ts.map +1 -0
- package/dist/components/system/icon/icon.js +83 -0
- package/dist/components/system/icon/icon.js.map +1 -0
- package/dist/components/system/icon/index.d.ts +3 -0
- package/dist/components/system/icon/index.d.ts.map +1 -0
- package/dist/components/system/theme-provider/index.d.ts +3 -0
- package/dist/components/system/theme-provider/index.d.ts.map +1 -0
- package/dist/components/system/theme-provider/theme-provider.d.ts +40 -0
- package/dist/components/system/theme-provider/theme-provider.d.ts.map +1 -0
- package/dist/components/system/theme-provider/theme-provider.js +55 -0
- package/dist/components/system/theme-provider/theme-provider.js.map +1 -0
- package/dist/components/typography/code/code.d.ts +24 -0
- package/dist/components/typography/code/code.d.ts.map +1 -0
- package/dist/components/typography/code/code.js +18 -0
- package/dist/components/typography/code/code.js.map +1 -0
- package/dist/components/typography/code/index.d.ts +3 -0
- package/dist/components/typography/code/index.d.ts.map +1 -0
- package/dist/components/typography/heading/heading.d.ts +32 -0
- package/dist/components/typography/heading/heading.d.ts.map +1 -0
- package/dist/components/typography/heading/heading.js +39 -0
- package/dist/components/typography/heading/heading.js.map +1 -0
- package/dist/components/typography/heading/index.d.ts +3 -0
- package/dist/components/typography/heading/index.d.ts.map +1 -0
- package/dist/components/typography/link/index.d.ts +3 -0
- package/dist/components/typography/link/index.d.ts.map +1 -0
- package/dist/components/typography/link/link.d.ts +44 -0
- package/dist/components/typography/link/link.d.ts.map +1 -0
- package/dist/components/typography/link/link.js +72 -0
- package/dist/components/typography/link/link.js.map +1 -0
- package/dist/components/typography/text/index.d.ts +3 -0
- package/dist/components/typography/text/index.d.ts.map +1 -0
- package/dist/components/typography/text/text.d.ts +104 -0
- package/dist/components/typography/text/text.d.ts.map +1 -0
- package/dist/components/typography/text/text.js +148 -0
- package/dist/components/typography/text/text.js.map +1 -0
- package/dist/components.d.ts +2 -0
- package/dist/components.d.ts.map +1 -0
- package/dist/hooks/useDebounce.d.ts +29 -0
- package/dist/hooks/useDebounce.d.ts.map +1 -0
- package/dist/hooks/useDebounce.js +26 -0
- package/dist/hooks/useDebounce.js.map +1 -0
- package/dist/hooks/useScrollReset.d.ts +11 -0
- package/dist/hooks/useScrollReset.d.ts.map +1 -0
- package/dist/hooks/useScrollReset.js +55 -0
- package/dist/hooks/useScrollReset.js.map +1 -0
- package/dist/humans.txt +8 -0
- package/dist/icons/logo.svg +9 -0
- package/dist/index.d.ts +7 -1170
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +287 -4333
- package/dist/index.js.map +1 -1
- package/dist/manifest.json +16 -0
- package/dist/node_modules/clsx/dist/clsx.js +18 -0
- package/dist/node_modules/clsx/dist/clsx.js.map +1 -0
- package/dist/robots.txt +5 -0
- package/dist/sitemap.xml +8 -0
- package/dist/staticwebapp.config.json +23 -0
- package/dist/style.css +2 -2
- package/dist/styles.d.ts +9 -0
- package/dist/theme/hydn-presets.d.ts +4 -0
- package/dist/theme/hydn-presets.d.ts.map +1 -0
- package/dist/theme/size-tokens.d.ts +686 -0
- package/dist/theme/size-tokens.d.ts.map +1 -0
- package/dist/theme/size-tokens.js +636 -0
- package/dist/theme/size-tokens.js.map +1 -0
- package/dist/theme/tokens.d.ts +116 -0
- package/dist/theme/tokens.d.ts.map +1 -0
- package/dist/theme/tokens.js +164 -0
- package/dist/theme/tokens.js.map +1 -0
- package/dist/utils/debounce.d.ts +7 -0
- package/dist/utils/debounce.d.ts.map +1 -0
- package/dist/utils/debounce.js +40 -0
- package/dist/utils/debounce.js.map +1 -0
- package/package.json +49 -43
- package/dist/index.cjs +0 -4425
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.cts +0 -1170
package/dist/index.cjs
DELETED
|
@@ -1,4425 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
-
var React5 = require('react');
|
|
5
|
-
var iconsReact = require('@tabler/icons-react');
|
|
6
|
-
var reactRouterDom = require('react-router-dom');
|
|
7
|
-
var reactDom = require('react-dom');
|
|
8
|
-
|
|
9
|
-
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
-
|
|
11
|
-
var React5__default = /*#__PURE__*/_interopDefault(React5);
|
|
12
|
-
|
|
13
|
-
// src/components/forms/button/button.tsx
|
|
14
|
-
function Button({
|
|
15
|
-
children,
|
|
16
|
-
onClick,
|
|
17
|
-
ariaLabel,
|
|
18
|
-
disabled = false,
|
|
19
|
-
type = "button",
|
|
20
|
-
className = "",
|
|
21
|
-
icon,
|
|
22
|
-
iconPosition = "left",
|
|
23
|
-
variant = "neutral",
|
|
24
|
-
style = "solid",
|
|
25
|
-
size = "md",
|
|
26
|
-
rounded = "default",
|
|
27
|
-
loading = false,
|
|
28
|
-
fullWidth = false,
|
|
29
|
-
wide = false,
|
|
30
|
-
active = false
|
|
31
|
-
}) {
|
|
32
|
-
const isIconOnly = icon && !children;
|
|
33
|
-
if (isIconOnly && !ariaLabel) {
|
|
34
|
-
console.warn("Button: Icon-only buttons require an ariaLabel for accessibility");
|
|
35
|
-
}
|
|
36
|
-
const solidVariantClasses = {
|
|
37
|
-
neutral: "bg-neutral text-neutral-foreground hover:bg-neutral/90 active:bg-neutral/80",
|
|
38
|
-
primary: "bg-primary text-primary-foreground hover:bg-primary/90 active:bg-primary/80",
|
|
39
|
-
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/90 active:bg-secondary/80",
|
|
40
|
-
accent: "bg-accent text-accent-foreground hover:bg-accent/90 active:bg-accent/80",
|
|
41
|
-
info: "bg-info text-info-foreground hover:bg-info/90 active:bg-info/80",
|
|
42
|
-
success: "bg-success text-success-foreground hover:bg-success/90 active:bg-success/80",
|
|
43
|
-
warning: "bg-warning text-warning-foreground hover:bg-warning/90 active:bg-warning/80",
|
|
44
|
-
error: "bg-destructive text-destructive-foreground hover:bg-destructive/90 active:bg-destructive/80"
|
|
45
|
-
};
|
|
46
|
-
const outlineVariantClasses = {
|
|
47
|
-
neutral: "border-2 border-neutral text-neutral bg-transparent hover:bg-neutral hover:text-neutral-foreground",
|
|
48
|
-
primary: "border-2 border-primary text-primary bg-transparent hover:bg-primary hover:text-primary-foreground",
|
|
49
|
-
secondary: "border-2 border-secondary text-secondary bg-transparent hover:bg-secondary hover:text-secondary-foreground",
|
|
50
|
-
accent: "border-2 border-accent text-accent bg-transparent hover:bg-accent hover:text-accent-foreground",
|
|
51
|
-
info: "border-2 border-info text-info bg-transparent hover:bg-info hover:text-info-foreground",
|
|
52
|
-
success: "border-2 border-success text-success bg-transparent hover:bg-success hover:text-success-foreground",
|
|
53
|
-
warning: "border-2 border-warning text-warning bg-transparent hover:bg-warning hover:text-warning-foreground",
|
|
54
|
-
error: "border-2 border-destructive text-destructive bg-transparent hover:bg-destructive hover:text-destructive-foreground"
|
|
55
|
-
};
|
|
56
|
-
const ghostVariantClasses = {
|
|
57
|
-
neutral: "bg-transparent text-foreground hover:bg-neutral/10 active:bg-neutral/20",
|
|
58
|
-
primary: "bg-transparent text-primary hover:bg-primary/10 active:bg-primary/20",
|
|
59
|
-
secondary: "bg-transparent text-secondary hover:bg-secondary/10 active:bg-secondary/20",
|
|
60
|
-
accent: "bg-transparent text-accent hover:bg-accent/10 active:bg-accent/20",
|
|
61
|
-
info: "bg-transparent text-info hover:bg-info/10 active:bg-info/20",
|
|
62
|
-
success: "bg-transparent text-success hover:bg-success/10 active:bg-success/20",
|
|
63
|
-
warning: "bg-transparent text-warning hover:bg-warning/10 active:bg-warning/20",
|
|
64
|
-
error: "bg-transparent text-destructive hover:bg-destructive/10 active:bg-destructive/20"
|
|
65
|
-
};
|
|
66
|
-
const softVariantClasses = {
|
|
67
|
-
neutral: "bg-neutral/20 text-foreground hover:bg-neutral/30 active:bg-neutral/40",
|
|
68
|
-
primary: "bg-primary/20 text-primary hover:bg-primary/30 active:bg-primary/40",
|
|
69
|
-
secondary: "bg-secondary/20 text-secondary hover:bg-secondary/30 active:bg-secondary/40",
|
|
70
|
-
accent: "bg-accent/20 text-accent hover:bg-accent/30 active:bg-accent/40",
|
|
71
|
-
info: "bg-info/20 text-info hover:bg-info/30 active:bg-info/40",
|
|
72
|
-
success: "bg-success/20 text-success hover:bg-success/30 active:bg-success/40",
|
|
73
|
-
warning: "bg-warning/20 text-warning hover:bg-warning/30 active:bg-warning/40",
|
|
74
|
-
error: "bg-destructive/20 text-destructive hover:bg-destructive/30 active:bg-destructive/40"
|
|
75
|
-
};
|
|
76
|
-
const linkVariantClasses = {
|
|
77
|
-
neutral: "bg-transparent text-foreground underline-offset-4 hover:underline",
|
|
78
|
-
primary: "bg-transparent text-primary underline-offset-4 hover:underline",
|
|
79
|
-
secondary: "bg-transparent text-secondary underline-offset-4 hover:underline",
|
|
80
|
-
accent: "bg-transparent text-accent underline-offset-4 hover:underline",
|
|
81
|
-
info: "bg-transparent text-info underline-offset-4 hover:underline",
|
|
82
|
-
success: "bg-transparent text-success underline-offset-4 hover:underline",
|
|
83
|
-
warning: "bg-transparent text-warning underline-offset-4 hover:underline",
|
|
84
|
-
error: "bg-transparent text-destructive underline-offset-4 hover:underline"
|
|
85
|
-
};
|
|
86
|
-
const getStyleClasses = () => {
|
|
87
|
-
const variantKey = variant;
|
|
88
|
-
switch (style) {
|
|
89
|
-
case "outline":
|
|
90
|
-
return `${outlineVariantClasses[variantKey]} active:scale-95`;
|
|
91
|
-
case "ghost":
|
|
92
|
-
return ghostVariantClasses[variantKey];
|
|
93
|
-
case "link":
|
|
94
|
-
return linkVariantClasses[variantKey];
|
|
95
|
-
case "soft":
|
|
96
|
-
return softVariantClasses[variantKey];
|
|
97
|
-
case "solid":
|
|
98
|
-
default:
|
|
99
|
-
return `${solidVariantClasses[variantKey]} shadow-sm hover:shadow-md`;
|
|
100
|
-
}
|
|
101
|
-
};
|
|
102
|
-
const sizeClasses = {
|
|
103
|
-
xs: "h-6 px-2 text-xs min-h-6",
|
|
104
|
-
sm: "h-8 px-3 text-sm min-h-8",
|
|
105
|
-
md: "h-10 px-4 text-base min-h-10",
|
|
106
|
-
lg: "h-12 px-6 text-lg min-h-12",
|
|
107
|
-
xl: "h-14 px-8 text-xl min-h-14"
|
|
108
|
-
};
|
|
109
|
-
const roundedClasses = {
|
|
110
|
-
default: "rounded-md",
|
|
111
|
-
pill: "rounded-full",
|
|
112
|
-
square: "rounded-none aspect-square",
|
|
113
|
-
circle: "rounded-full aspect-square"
|
|
114
|
-
};
|
|
115
|
-
const displayIcon = loading ? /* @__PURE__ */ jsxRuntime.jsxs("svg", { className: "animate-spin h-4 w-4", xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", children: [
|
|
116
|
-
/* @__PURE__ */ jsxRuntime.jsx("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }),
|
|
117
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
118
|
-
"path",
|
|
119
|
-
{
|
|
120
|
-
className: "opacity-75",
|
|
121
|
-
fill: "currentColor",
|
|
122
|
-
d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
|
|
123
|
-
}
|
|
124
|
-
)
|
|
125
|
-
] }) : icon;
|
|
126
|
-
const styleClasses = getStyleClasses();
|
|
127
|
-
const widthClasses = fullWidth ? "w-full" : wide ? "px-8" : "";
|
|
128
|
-
const activeClasses = active ? "active:scale-95" : "";
|
|
129
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
130
|
-
"button",
|
|
131
|
-
{
|
|
132
|
-
type,
|
|
133
|
-
onClick,
|
|
134
|
-
"aria-label": ariaLabel,
|
|
135
|
-
disabled: disabled || loading,
|
|
136
|
-
className: `inline-flex items-center justify-center ${roundedClasses[rounded]} font-medium transition-all duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 cursor-pointer disabled:cursor-not-allowed disabled:opacity-50 ${styleClasses} ${sizeClasses[size]} ${isIconOnly ? "p-0" : ""} ${widthClasses} ${activeClasses} ${className}`,
|
|
137
|
-
children: [
|
|
138
|
-
displayIcon && iconPosition === "left" && /* @__PURE__ */ jsxRuntime.jsx("span", { className: `inline-flex ${children ? "mr-2" : ""}`, children: displayIcon }),
|
|
139
|
-
children,
|
|
140
|
-
displayIcon && iconPosition === "right" && /* @__PURE__ */ jsxRuntime.jsx("span", { className: `inline-flex ${children ? "ml-2" : ""}`, children: displayIcon })
|
|
141
|
-
]
|
|
142
|
-
}
|
|
143
|
-
);
|
|
144
|
-
}
|
|
145
|
-
Button.displayName = "Button";
|
|
146
|
-
var button_default = Button;
|
|
147
|
-
function Input({
|
|
148
|
-
value,
|
|
149
|
-
onChange,
|
|
150
|
-
placeholder,
|
|
151
|
-
disabled = false,
|
|
152
|
-
type = "text",
|
|
153
|
-
className = "",
|
|
154
|
-
ariaLabel,
|
|
155
|
-
id,
|
|
156
|
-
name,
|
|
157
|
-
required = false,
|
|
158
|
-
size = "md",
|
|
159
|
-
validationState = "default"
|
|
160
|
-
}) {
|
|
161
|
-
const sizeClasses = {
|
|
162
|
-
sm: "h-8 px-3 py-1.5 text-sm",
|
|
163
|
-
md: "h-10 px-3 py-2 text-sm",
|
|
164
|
-
lg: "h-12 px-4 py-3 text-base"
|
|
165
|
-
};
|
|
166
|
-
const validationClasses = {
|
|
167
|
-
default: "border-input focus:border-ring",
|
|
168
|
-
error: "border-destructive focus:border-destructive",
|
|
169
|
-
success: "border-success focus:border-success",
|
|
170
|
-
warning: "border-warning focus:border-warning"
|
|
171
|
-
};
|
|
172
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
173
|
-
"input",
|
|
174
|
-
{
|
|
175
|
-
type,
|
|
176
|
-
value,
|
|
177
|
-
onChange,
|
|
178
|
-
placeholder,
|
|
179
|
-
disabled,
|
|
180
|
-
"aria-label": ariaLabel,
|
|
181
|
-
id,
|
|
182
|
-
name,
|
|
183
|
-
required,
|
|
184
|
-
"aria-invalid": validationState === "error",
|
|
185
|
-
className: `flex w-full rounded-lg border bg-background shadow-sm transition-all duration-200 file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring/20 focus:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-muted/50 ${sizeClasses[size]} ${validationClasses[validationState]} ${className}`
|
|
186
|
-
}
|
|
187
|
-
);
|
|
188
|
-
}
|
|
189
|
-
Input.displayName = "Input";
|
|
190
|
-
var input_default = Input;
|
|
191
|
-
function Checkbox({
|
|
192
|
-
checked,
|
|
193
|
-
onChange,
|
|
194
|
-
disabled = false,
|
|
195
|
-
className = "",
|
|
196
|
-
ariaLabel,
|
|
197
|
-
id,
|
|
198
|
-
name,
|
|
199
|
-
validationState = "default"
|
|
200
|
-
}) {
|
|
201
|
-
const validationClasses = {
|
|
202
|
-
default: "border-input focus:ring-ring",
|
|
203
|
-
error: "border-destructive focus:ring-destructive",
|
|
204
|
-
success: "border-success focus:ring-success",
|
|
205
|
-
warning: "border-warning focus:ring-warning"
|
|
206
|
-
};
|
|
207
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
208
|
-
"input",
|
|
209
|
-
{
|
|
210
|
-
type: "checkbox",
|
|
211
|
-
checked,
|
|
212
|
-
onChange,
|
|
213
|
-
disabled,
|
|
214
|
-
"aria-label": ariaLabel,
|
|
215
|
-
"aria-invalid": validationState === "error",
|
|
216
|
-
id,
|
|
217
|
-
name,
|
|
218
|
-
className: `h-4 w-4 rounded border-2 bg-background text-primary-foreground transition-all duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-muted/50 checked:bg-primary checked:border-primary checked:hover:bg-primary/90 hover:border-primary/50 hover:shadow-sm cursor-pointer accent-primary ${validationClasses[validationState]} ${className}`
|
|
219
|
-
}
|
|
220
|
-
);
|
|
221
|
-
}
|
|
222
|
-
Checkbox.displayName = "Checkbox";
|
|
223
|
-
var checkbox_default = Checkbox;
|
|
224
|
-
var RadioGroupContext = React5.createContext(null);
|
|
225
|
-
var useRadioGroup = () => {
|
|
226
|
-
const context = React5.useContext(RadioGroupContext);
|
|
227
|
-
return context;
|
|
228
|
-
};
|
|
229
|
-
function RadioGroup({
|
|
230
|
-
children,
|
|
231
|
-
name,
|
|
232
|
-
label,
|
|
233
|
-
orientation = "vertical",
|
|
234
|
-
className = "",
|
|
235
|
-
value,
|
|
236
|
-
onChange
|
|
237
|
-
}) {
|
|
238
|
-
const orientationClasses = orientation === "horizontal" ? "flex flex-row gap-4" : "flex flex-col gap-2";
|
|
239
|
-
return /* @__PURE__ */ jsxRuntime.jsx(RadioGroupContext.Provider, { value: { name, value, onChange }, children: /* @__PURE__ */ jsxRuntime.jsxs("fieldset", { className, children: [
|
|
240
|
-
label && /* @__PURE__ */ jsxRuntime.jsx("legend", { className: "text-sm font-medium text-foreground mb-2", children: label }),
|
|
241
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: orientationClasses, role: "radiogroup", children })
|
|
242
|
-
] }) });
|
|
243
|
-
}
|
|
244
|
-
RadioGroup.displayName = "RadioGroup";
|
|
245
|
-
var radio_group_default = RadioGroup;
|
|
246
|
-
function Radio({
|
|
247
|
-
checked,
|
|
248
|
-
onChange,
|
|
249
|
-
disabled = false,
|
|
250
|
-
className = "",
|
|
251
|
-
ariaLabel,
|
|
252
|
-
id,
|
|
253
|
-
name: nameProp,
|
|
254
|
-
value,
|
|
255
|
-
validationState = "default"
|
|
256
|
-
}) {
|
|
257
|
-
const radioGroup = useRadioGroup();
|
|
258
|
-
const name = radioGroup?.name || nameProp;
|
|
259
|
-
const isChecked = radioGroup?.value !== void 0 ? radioGroup.value === value : checked;
|
|
260
|
-
const handleChange = (e) => {
|
|
261
|
-
if (radioGroup?.onChange && value) {
|
|
262
|
-
radioGroup.onChange(value);
|
|
263
|
-
}
|
|
264
|
-
onChange?.(e);
|
|
265
|
-
};
|
|
266
|
-
const validationClasses = {
|
|
267
|
-
default: "border-input focus:ring-ring",
|
|
268
|
-
error: "border-destructive focus:ring-destructive",
|
|
269
|
-
success: "border-success focus:ring-success",
|
|
270
|
-
warning: "border-warning focus:ring-warning"
|
|
271
|
-
};
|
|
272
|
-
const generatedId = React5.useId();
|
|
273
|
-
const inputId = id || `radio-${value || generatedId}`;
|
|
274
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
275
|
-
"div",
|
|
276
|
-
{
|
|
277
|
-
className: `inline-flex items-center justify-center relative ${disabled ? "opacity-60 cursor-not-allowed" : "cursor-pointer"}`,
|
|
278
|
-
children: [
|
|
279
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
280
|
-
"input",
|
|
281
|
-
{
|
|
282
|
-
type: "radio",
|
|
283
|
-
checked: isChecked,
|
|
284
|
-
onChange: handleChange,
|
|
285
|
-
disabled,
|
|
286
|
-
"aria-label": ariaLabel,
|
|
287
|
-
"aria-invalid": validationState === "error" ? "true" : void 0,
|
|
288
|
-
id: inputId,
|
|
289
|
-
name,
|
|
290
|
-
value,
|
|
291
|
-
className: "peer sr-only"
|
|
292
|
-
}
|
|
293
|
-
),
|
|
294
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
295
|
-
"span",
|
|
296
|
-
{
|
|
297
|
-
"aria-hidden": "true",
|
|
298
|
-
onClick: () => !disabled && document.getElementById(inputId)?.click(),
|
|
299
|
-
className: `w-5 h-5 rounded-full border-2 flex items-center justify-center transition-all duration-200 ease-out bg-background shadow-sm
|
|
300
|
-
before:content-[''] before:w-2.5 before:h-2.5 before:rounded-full before:scale-0 before:transition-transform before:duration-200 before:ease-out before:bg-primary
|
|
301
|
-
peer-checked:before:scale-100 peer-checked:border-primary
|
|
302
|
-
peer-focus-visible:ring-2 peer-focus-visible:ring-offset-2 peer-focus-visible:ring-ring
|
|
303
|
-
peer-disabled:opacity-50 peer-disabled:cursor-not-allowed
|
|
304
|
-
peer-hover:border-primary/60 peer-active:scale-95
|
|
305
|
-
${validationClasses[validationState]} ${className}`
|
|
306
|
-
}
|
|
307
|
-
)
|
|
308
|
-
]
|
|
309
|
-
}
|
|
310
|
-
);
|
|
311
|
-
}
|
|
312
|
-
Radio.displayName = "Radio";
|
|
313
|
-
var radio_default = Radio;
|
|
314
|
-
function Select({
|
|
315
|
-
value,
|
|
316
|
-
onChange,
|
|
317
|
-
disabled = false,
|
|
318
|
-
className = "",
|
|
319
|
-
ariaLabel,
|
|
320
|
-
id,
|
|
321
|
-
name,
|
|
322
|
-
children,
|
|
323
|
-
required = false,
|
|
324
|
-
size = "md",
|
|
325
|
-
validationState = "default"
|
|
326
|
-
}) {
|
|
327
|
-
const sizeClasses = {
|
|
328
|
-
sm: "h-8 px-3 py-1.5 text-sm",
|
|
329
|
-
md: "h-10 px-3 py-2 text-sm pr-10",
|
|
330
|
-
lg: "h-12 px-4 py-3 text-base pr-10"
|
|
331
|
-
};
|
|
332
|
-
const validationClasses = {
|
|
333
|
-
default: "border-input focus:border-ring",
|
|
334
|
-
error: "border-destructive focus:border-destructive",
|
|
335
|
-
success: "border-success focus:border-success",
|
|
336
|
-
warning: "border-warning focus:border-warning"
|
|
337
|
-
};
|
|
338
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
339
|
-
"select",
|
|
340
|
-
{
|
|
341
|
-
value,
|
|
342
|
-
onChange,
|
|
343
|
-
disabled,
|
|
344
|
-
"aria-label": ariaLabel,
|
|
345
|
-
id,
|
|
346
|
-
name,
|
|
347
|
-
required,
|
|
348
|
-
"aria-invalid": validationState === "error",
|
|
349
|
-
className: `flex w-full rounded-lg border bg-background shadow-sm transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-ring/20 focus:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-muted/50 appearance-none bg-[url('data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill%3D%22none%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20stroke%3D%22%236b7280%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20stroke-width%3D%221.5%22%20d%3D%22M6%208l4%204%204-4%22%2F%3E%3C%2Fsvg%3E')] bg-[length:1.5em] bg-[right_0.5rem_center] bg-no-repeat ${sizeClasses[size]} ${validationClasses[validationState]} ${className}`,
|
|
350
|
-
children
|
|
351
|
-
}
|
|
352
|
-
);
|
|
353
|
-
}
|
|
354
|
-
Select.displayName = "Select";
|
|
355
|
-
var select_default = Select;
|
|
356
|
-
function SelectItem({ value, disabled = false, children }) {
|
|
357
|
-
return /* @__PURE__ */ jsxRuntime.jsx("option", { value, disabled, children });
|
|
358
|
-
}
|
|
359
|
-
SelectItem.displayName = "SelectItem";
|
|
360
|
-
var select_item_default = SelectItem;
|
|
361
|
-
function MultiSelect({
|
|
362
|
-
options,
|
|
363
|
-
value = [],
|
|
364
|
-
onChange,
|
|
365
|
-
placeholder = "Select options...",
|
|
366
|
-
disabled = false,
|
|
367
|
-
maxSelections,
|
|
368
|
-
size = "md",
|
|
369
|
-
className = ""
|
|
370
|
-
}) {
|
|
371
|
-
const [isOpen, setIsOpen] = React5.useState(false);
|
|
372
|
-
const [searchQuery, setSearchQuery] = React5.useState("");
|
|
373
|
-
const [focusedIndex, setFocusedIndex] = React5.useState(-1);
|
|
374
|
-
const containerRef = React5.useRef(null);
|
|
375
|
-
const searchInputRef = React5.useRef(null);
|
|
376
|
-
const selectedValues = value || [];
|
|
377
|
-
React5.useEffect(() => {
|
|
378
|
-
const handleClickOutside = (event) => {
|
|
379
|
-
if (containerRef.current && !containerRef.current.contains(event.target)) {
|
|
380
|
-
setIsOpen(false);
|
|
381
|
-
setSearchQuery("");
|
|
382
|
-
}
|
|
383
|
-
};
|
|
384
|
-
if (isOpen) {
|
|
385
|
-
document.addEventListener("mousedown", handleClickOutside);
|
|
386
|
-
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
387
|
-
}
|
|
388
|
-
return void 0;
|
|
389
|
-
}, [isOpen]);
|
|
390
|
-
React5.useEffect(() => {
|
|
391
|
-
if (isOpen && searchInputRef.current) {
|
|
392
|
-
searchInputRef.current.focus();
|
|
393
|
-
}
|
|
394
|
-
}, [isOpen]);
|
|
395
|
-
const filteredOptions = options.filter((option) => option.label.toLowerCase().includes(searchQuery.toLowerCase()));
|
|
396
|
-
const handleToggleOption = (optionValue) => {
|
|
397
|
-
const isSelected = selectedValues.includes(optionValue);
|
|
398
|
-
let newValues;
|
|
399
|
-
if (isSelected) {
|
|
400
|
-
newValues = selectedValues.filter((v) => v !== optionValue);
|
|
401
|
-
} else {
|
|
402
|
-
if (maxSelections && selectedValues.length >= maxSelections) {
|
|
403
|
-
return;
|
|
404
|
-
}
|
|
405
|
-
newValues = [...selectedValues, optionValue];
|
|
406
|
-
}
|
|
407
|
-
onChange?.(newValues);
|
|
408
|
-
};
|
|
409
|
-
const handleRemoveValue = (valueToRemove, e) => {
|
|
410
|
-
e.stopPropagation();
|
|
411
|
-
const newValues = selectedValues.filter((v) => v !== valueToRemove);
|
|
412
|
-
onChange?.(newValues);
|
|
413
|
-
};
|
|
414
|
-
const handleClearAll = (e) => {
|
|
415
|
-
e.stopPropagation();
|
|
416
|
-
onChange?.([]);
|
|
417
|
-
};
|
|
418
|
-
const handleKeyDown = (e) => {
|
|
419
|
-
if (disabled) return;
|
|
420
|
-
switch (e.key) {
|
|
421
|
-
case "Enter":
|
|
422
|
-
e.preventDefault();
|
|
423
|
-
if (!isOpen) {
|
|
424
|
-
setIsOpen(true);
|
|
425
|
-
} else if (focusedIndex >= 0 && focusedIndex < filteredOptions.length) {
|
|
426
|
-
handleToggleOption(filteredOptions[focusedIndex].value);
|
|
427
|
-
}
|
|
428
|
-
break;
|
|
429
|
-
case "Escape":
|
|
430
|
-
e.preventDefault();
|
|
431
|
-
setIsOpen(false);
|
|
432
|
-
setSearchQuery("");
|
|
433
|
-
break;
|
|
434
|
-
case "ArrowDown":
|
|
435
|
-
e.preventDefault();
|
|
436
|
-
if (!isOpen) {
|
|
437
|
-
setIsOpen(true);
|
|
438
|
-
} else {
|
|
439
|
-
setFocusedIndex((prev) => prev < filteredOptions.length - 1 ? prev + 1 : prev);
|
|
440
|
-
}
|
|
441
|
-
break;
|
|
442
|
-
case "ArrowUp":
|
|
443
|
-
e.preventDefault();
|
|
444
|
-
setFocusedIndex((prev) => prev > 0 ? prev - 1 : 0);
|
|
445
|
-
break;
|
|
446
|
-
}
|
|
447
|
-
};
|
|
448
|
-
const sizeClasses = {
|
|
449
|
-
sm: { container: "min-h-8 py-1 px-2", text: "text-sm", chip: "text-xs px-1.5 py-0.5", icon: 14 },
|
|
450
|
-
md: { container: "min-h-10 py-2 px-3", text: "text-base", chip: "text-sm px-2 py-1", icon: 16 },
|
|
451
|
-
lg: { container: "min-h-12 py-2 px-4", text: "text-lg", chip: "text-base px-2.5 py-1", icon: 18 }
|
|
452
|
-
};
|
|
453
|
-
const currentSize = sizeClasses[size];
|
|
454
|
-
const getSelectedLabels = () => {
|
|
455
|
-
return selectedValues.map((v) => options.find((opt) => opt.value === v)?.label).filter(Boolean);
|
|
456
|
-
};
|
|
457
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref: containerRef, className: `relative w-full ${className}`, children: [
|
|
458
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
459
|
-
"div",
|
|
460
|
-
{
|
|
461
|
-
className: `
|
|
462
|
-
w-full flex flex-wrap items-center gap-1.5
|
|
463
|
-
border border-input rounded-md
|
|
464
|
-
bg-background text-foreground
|
|
465
|
-
cursor-pointer
|
|
466
|
-
transition-all duration-200
|
|
467
|
-
${currentSize.container}
|
|
468
|
-
${currentSize.text}
|
|
469
|
-
${isOpen ? "ring-2 ring-ring ring-offset-2" : "hover:border-ring"}
|
|
470
|
-
${disabled ? "opacity-50 cursor-not-allowed" : ""}
|
|
471
|
-
`.trim(),
|
|
472
|
-
onClick: () => !disabled && setIsOpen(!isOpen),
|
|
473
|
-
onKeyDown: handleKeyDown,
|
|
474
|
-
tabIndex: disabled ? -1 : 0,
|
|
475
|
-
role: "button",
|
|
476
|
-
"aria-haspopup": "listbox",
|
|
477
|
-
"aria-expanded": isOpen,
|
|
478
|
-
"aria-label": "Multi-select",
|
|
479
|
-
children: [
|
|
480
|
-
selectedValues.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: getSelectedLabels().map((label, index) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
481
|
-
"span",
|
|
482
|
-
{
|
|
483
|
-
className: `
|
|
484
|
-
inline-flex items-center gap-1
|
|
485
|
-
bg-primary/10 text-primary rounded-md font-medium
|
|
486
|
-
animate-scaleIn origin-left
|
|
487
|
-
transition-all duration-200
|
|
488
|
-
${currentSize.chip}
|
|
489
|
-
`.trim(),
|
|
490
|
-
children: [
|
|
491
|
-
label,
|
|
492
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
493
|
-
"button",
|
|
494
|
-
{
|
|
495
|
-
type: "button",
|
|
496
|
-
onClick: (e) => handleRemoveValue(selectedValues[index], e),
|
|
497
|
-
className: "hover:bg-primary/20 rounded-sm transition-colors duration-150",
|
|
498
|
-
"aria-label": `Remove ${label}`,
|
|
499
|
-
tabIndex: -1,
|
|
500
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(iconsReact.IconX, { size: currentSize.icon - 4 })
|
|
501
|
-
}
|
|
502
|
-
)
|
|
503
|
-
]
|
|
504
|
-
},
|
|
505
|
-
selectedValues[index]
|
|
506
|
-
)) }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: placeholder }),
|
|
507
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1 ml-auto flex-shrink-0", children: [
|
|
508
|
-
selectedValues.length > 0 && !disabled && /* @__PURE__ */ jsxRuntime.jsx(
|
|
509
|
-
"button",
|
|
510
|
-
{
|
|
511
|
-
type: "button",
|
|
512
|
-
onClick: handleClearAll,
|
|
513
|
-
className: "p-1 hover:bg-muted rounded transition-colors",
|
|
514
|
-
"aria-label": "Clear all",
|
|
515
|
-
tabIndex: -1,
|
|
516
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(iconsReact.IconX, { size: currentSize.icon })
|
|
517
|
-
}
|
|
518
|
-
),
|
|
519
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
520
|
-
iconsReact.IconChevronDown,
|
|
521
|
-
{
|
|
522
|
-
size: currentSize.icon,
|
|
523
|
-
className: `text-muted-foreground transition-transform ${isOpen ? "rotate-180" : ""}`
|
|
524
|
-
}
|
|
525
|
-
)
|
|
526
|
-
] })
|
|
527
|
-
]
|
|
528
|
-
}
|
|
529
|
-
),
|
|
530
|
-
isOpen && !disabled && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute top-full left-0 right-0 mt-2 z-50 bg-card border border-border rounded-md shadow-lg max-h-64 overflow-hidden flex flex-col animate-scaleIn origin-top", children: [
|
|
531
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-2 border-b border-border", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
532
|
-
"input",
|
|
533
|
-
{
|
|
534
|
-
ref: searchInputRef,
|
|
535
|
-
type: "text",
|
|
536
|
-
value: searchQuery,
|
|
537
|
-
onChange: (e) => {
|
|
538
|
-
setSearchQuery(e.target.value);
|
|
539
|
-
setFocusedIndex(-1);
|
|
540
|
-
},
|
|
541
|
-
placeholder: "Search...",
|
|
542
|
-
className: `w-full px-3 py-1.5 ${currentSize.text} border border-input rounded-md bg-background text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring`,
|
|
543
|
-
onClick: (e) => e.stopPropagation()
|
|
544
|
-
}
|
|
545
|
-
) }),
|
|
546
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "overflow-y-auto", role: "listbox", children: filteredOptions.length > 0 ? filteredOptions.map((option, index) => {
|
|
547
|
-
const isSelected = selectedValues.includes(option.value);
|
|
548
|
-
const isFocused = index === focusedIndex;
|
|
549
|
-
const isDisabled = Boolean(maxSelections && !isSelected && selectedValues.length >= maxSelections);
|
|
550
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
551
|
-
"button",
|
|
552
|
-
{
|
|
553
|
-
type: "button",
|
|
554
|
-
onClick: () => !isDisabled && handleToggleOption(option.value),
|
|
555
|
-
className: `
|
|
556
|
-
w-full px-3 py-2 flex items-center justify-between gap-2
|
|
557
|
-
transition-all duration-200 text-left ${currentSize.text}
|
|
558
|
-
${isFocused ? "bg-muted" : ""}
|
|
559
|
-
${isSelected ? "bg-primary/10 text-primary font-medium" : "hover:bg-muted"}
|
|
560
|
-
${isDisabled ? "opacity-50 cursor-not-allowed" : ""}
|
|
561
|
-
`.trim(),
|
|
562
|
-
role: "option",
|
|
563
|
-
"aria-selected": isSelected,
|
|
564
|
-
disabled: isDisabled,
|
|
565
|
-
children: [
|
|
566
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-1 truncate", children: option.label }),
|
|
567
|
-
isSelected && /* @__PURE__ */ jsxRuntime.jsx(
|
|
568
|
-
iconsReact.IconCheck,
|
|
569
|
-
{
|
|
570
|
-
size: currentSize.icon,
|
|
571
|
-
className: "flex-shrink-0 animate-scaleIn"
|
|
572
|
-
}
|
|
573
|
-
)
|
|
574
|
-
]
|
|
575
|
-
},
|
|
576
|
-
option.value
|
|
577
|
-
);
|
|
578
|
-
}) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-3 py-6 text-center text-muted-foreground", children: "No options found" }) }),
|
|
579
|
-
maxSelections && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "px-3 py-2 border-t border-border bg-muted/30 text-xs text-muted-foreground", children: [
|
|
580
|
-
selectedValues.length,
|
|
581
|
-
" / ",
|
|
582
|
-
maxSelections,
|
|
583
|
-
" selected"
|
|
584
|
-
] })
|
|
585
|
-
] })
|
|
586
|
-
] });
|
|
587
|
-
}
|
|
588
|
-
MultiSelect.displayName = "MultiSelect";
|
|
589
|
-
var multi_select_default = MultiSelect;
|
|
590
|
-
function Textarea({
|
|
591
|
-
value,
|
|
592
|
-
onChange,
|
|
593
|
-
placeholder,
|
|
594
|
-
disabled = false,
|
|
595
|
-
className = "",
|
|
596
|
-
ariaLabel,
|
|
597
|
-
id,
|
|
598
|
-
name,
|
|
599
|
-
rows = 3,
|
|
600
|
-
required = false,
|
|
601
|
-
validationState = "default"
|
|
602
|
-
}) {
|
|
603
|
-
const validationClasses = {
|
|
604
|
-
default: "border-input focus:border-ring",
|
|
605
|
-
error: "border-destructive focus:border-destructive",
|
|
606
|
-
success: "border-success focus:border-success",
|
|
607
|
-
warning: "border-warning focus:border-warning"
|
|
608
|
-
};
|
|
609
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
610
|
-
"textarea",
|
|
611
|
-
{
|
|
612
|
-
value,
|
|
613
|
-
onChange,
|
|
614
|
-
placeholder,
|
|
615
|
-
disabled,
|
|
616
|
-
"aria-label": ariaLabel,
|
|
617
|
-
id,
|
|
618
|
-
name,
|
|
619
|
-
rows,
|
|
620
|
-
required,
|
|
621
|
-
"aria-invalid": validationState === "error",
|
|
622
|
-
className: `flex min-h-[80px] w-full rounded-lg border bg-background px-3 py-2 text-sm shadow-sm transition-all duration-200 placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring/20 focus:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-muted/50 resize-y ${validationClasses[validationState]} ${className}`
|
|
623
|
-
}
|
|
624
|
-
);
|
|
625
|
-
}
|
|
626
|
-
Textarea.displayName = "Textarea";
|
|
627
|
-
var textarea_default = Textarea;
|
|
628
|
-
function Switch({
|
|
629
|
-
checked = false,
|
|
630
|
-
onChange,
|
|
631
|
-
disabled = false,
|
|
632
|
-
className = "",
|
|
633
|
-
ariaLabel,
|
|
634
|
-
id,
|
|
635
|
-
name,
|
|
636
|
-
size = "md",
|
|
637
|
-
variant
|
|
638
|
-
}) {
|
|
639
|
-
const handleChange = (e) => {
|
|
640
|
-
onChange?.(e.target.checked);
|
|
641
|
-
};
|
|
642
|
-
const sizeStyles = {
|
|
643
|
-
xs: {
|
|
644
|
-
container: "h-4 w-8",
|
|
645
|
-
handle: "h-3 w-3",
|
|
646
|
-
padding: "p-0.5",
|
|
647
|
-
translate: checked ? "translate-x-4" : "translate-x-0"
|
|
648
|
-
},
|
|
649
|
-
sm: {
|
|
650
|
-
container: "h-5 w-10",
|
|
651
|
-
handle: "h-4 w-4",
|
|
652
|
-
padding: "p-0.5",
|
|
653
|
-
translate: checked ? "translate-x-5" : "translate-x-0"
|
|
654
|
-
},
|
|
655
|
-
md: {
|
|
656
|
-
container: "h-6 w-12",
|
|
657
|
-
handle: "h-5 w-5",
|
|
658
|
-
padding: "p-0.5",
|
|
659
|
-
translate: checked ? "translate-x-6" : "translate-x-0"
|
|
660
|
-
},
|
|
661
|
-
lg: {
|
|
662
|
-
container: "h-7 w-14",
|
|
663
|
-
handle: "h-6 w-6",
|
|
664
|
-
padding: "p-0.5",
|
|
665
|
-
translate: checked ? "translate-x-7" : "translate-x-0"
|
|
666
|
-
},
|
|
667
|
-
xl: {
|
|
668
|
-
container: "h-8 w-16",
|
|
669
|
-
handle: "h-7 w-7",
|
|
670
|
-
padding: "p-0.5",
|
|
671
|
-
translate: checked ? "translate-x-8" : "translate-x-0"
|
|
672
|
-
}
|
|
673
|
-
};
|
|
674
|
-
const getVariantColors = () => {
|
|
675
|
-
if (!checked) {
|
|
676
|
-
return "bg-input border-input";
|
|
677
|
-
}
|
|
678
|
-
switch (variant) {
|
|
679
|
-
case "secondary":
|
|
680
|
-
return "bg-secondary border-secondary";
|
|
681
|
-
case "accent":
|
|
682
|
-
return "bg-accent border-accent";
|
|
683
|
-
case "success":
|
|
684
|
-
return "bg-success border-success";
|
|
685
|
-
case "warning":
|
|
686
|
-
return "bg-warning border-warning";
|
|
687
|
-
case "info":
|
|
688
|
-
return "bg-info border-info";
|
|
689
|
-
case "error":
|
|
690
|
-
return "bg-destructive border-destructive";
|
|
691
|
-
case "neutral":
|
|
692
|
-
return "bg-neutral border-neutral";
|
|
693
|
-
case "primary":
|
|
694
|
-
default:
|
|
695
|
-
return "bg-primary border-primary";
|
|
696
|
-
}
|
|
697
|
-
};
|
|
698
|
-
const styles = sizeStyles[size];
|
|
699
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
700
|
-
"label",
|
|
701
|
-
{
|
|
702
|
-
className: `relative inline-flex ${styles.container} ${styles.padding} items-center rounded-full border transition-all duration-200 cursor-pointer ${disabled ? "opacity-30 cursor-not-allowed" : ""} ${getVariantColors()} ${className}`,
|
|
703
|
-
children: [
|
|
704
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
705
|
-
"input",
|
|
706
|
-
{
|
|
707
|
-
type: "checkbox",
|
|
708
|
-
role: "switch",
|
|
709
|
-
checked,
|
|
710
|
-
onChange: handleChange,
|
|
711
|
-
disabled,
|
|
712
|
-
"aria-label": ariaLabel,
|
|
713
|
-
id,
|
|
714
|
-
name,
|
|
715
|
-
className: "sr-only"
|
|
716
|
-
}
|
|
717
|
-
),
|
|
718
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
719
|
-
"span",
|
|
720
|
-
{
|
|
721
|
-
className: `inline-block ${styles.handle} rounded-full bg-background shadow-sm transition-transform duration-200 ${styles.translate}`
|
|
722
|
-
}
|
|
723
|
-
)
|
|
724
|
-
]
|
|
725
|
-
}
|
|
726
|
-
);
|
|
727
|
-
}
|
|
728
|
-
Switch.displayName = "Switch";
|
|
729
|
-
var switch_default = Switch;
|
|
730
|
-
function Slider({
|
|
731
|
-
value = 50,
|
|
732
|
-
onChange,
|
|
733
|
-
min = 0,
|
|
734
|
-
max = 100,
|
|
735
|
-
step = 1,
|
|
736
|
-
disabled = false,
|
|
737
|
-
className = "",
|
|
738
|
-
ariaLabel,
|
|
739
|
-
id,
|
|
740
|
-
name
|
|
741
|
-
}) {
|
|
742
|
-
const handleChange = (e) => {
|
|
743
|
-
onChange?.(Number(e.target.value));
|
|
744
|
-
};
|
|
745
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
746
|
-
"input",
|
|
747
|
-
{
|
|
748
|
-
type: "range",
|
|
749
|
-
value,
|
|
750
|
-
onChange: handleChange,
|
|
751
|
-
min,
|
|
752
|
-
max,
|
|
753
|
-
step,
|
|
754
|
-
disabled,
|
|
755
|
-
"aria-label": ariaLabel,
|
|
756
|
-
id,
|
|
757
|
-
name,
|
|
758
|
-
className: `w-full h-2 bg-muted/30 rounded-lg appearance-none cursor-pointer transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed hover:bg-muted/40 ${className}`,
|
|
759
|
-
style: {
|
|
760
|
-
background: `linear-gradient(to right, hsl(var(--primary)) 0%, hsl(var(--primary)) ${(value - min) / (max - min) * 100}%, hsl(var(--muted) / 0.3) ${(value - min) / (max - min) * 100}%, hsl(var(--muted) / 0.3) 100%)`
|
|
761
|
-
}
|
|
762
|
-
}
|
|
763
|
-
);
|
|
764
|
-
}
|
|
765
|
-
Slider.displayName = "Slider";
|
|
766
|
-
var slider_default = Slider;
|
|
767
|
-
function ButtonGroup({
|
|
768
|
-
children,
|
|
769
|
-
className = "",
|
|
770
|
-
variant = "default",
|
|
771
|
-
orientation = "horizontal"
|
|
772
|
-
}) {
|
|
773
|
-
const baseClasses = "inline-flex";
|
|
774
|
-
const orientationClasses = orientation === "horizontal" ? "flex-row" : "flex-col";
|
|
775
|
-
let variantClasses = "";
|
|
776
|
-
if (variant === "separated") {
|
|
777
|
-
variantClasses = "gap-2";
|
|
778
|
-
} else if (orientation === "horizontal") {
|
|
779
|
-
variantClasses = "[&>button]:rounded-none [&>button:first-child]:rounded-l-md [&>button:last-child]:rounded-r-md [&>button:not(:last-child)]:border-r-0";
|
|
780
|
-
} else {
|
|
781
|
-
variantClasses = "[&>button]:rounded-none [&>button:first-child]:rounded-t-md [&>button:last-child]:rounded-b-md [&>button:not(:last-child)]:border-b-0";
|
|
782
|
-
}
|
|
783
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `${baseClasses} ${orientationClasses} ${variantClasses} ${className}`, children });
|
|
784
|
-
}
|
|
785
|
-
ButtonGroup.displayName = "ButtonGroup";
|
|
786
|
-
var button_group_default = ButtonGroup;
|
|
787
|
-
function Text({
|
|
788
|
-
children,
|
|
789
|
-
variant = "body",
|
|
790
|
-
size,
|
|
791
|
-
weight = "semibold",
|
|
792
|
-
// elevated default weight
|
|
793
|
-
className = "",
|
|
794
|
-
noMargin = false
|
|
795
|
-
}) {
|
|
796
|
-
const variantClasses = {
|
|
797
|
-
body: "text-foreground",
|
|
798
|
-
muted: "text-muted-foreground",
|
|
799
|
-
small: "text-muted-foreground"
|
|
800
|
-
};
|
|
801
|
-
const sizeClasses = {
|
|
802
|
-
xs: "text-xs",
|
|
803
|
-
sm: "text-sm",
|
|
804
|
-
base: "text-base",
|
|
805
|
-
lg: "text-lg",
|
|
806
|
-
xl: "text-xl"
|
|
807
|
-
};
|
|
808
|
-
const weightClasses = {
|
|
809
|
-
normal: "font-normal",
|
|
810
|
-
medium: "font-medium",
|
|
811
|
-
semibold: "font-semibold",
|
|
812
|
-
bold: "font-bold"
|
|
813
|
-
};
|
|
814
|
-
const defaultSizes = {
|
|
815
|
-
body: "lg",
|
|
816
|
-
// bigger default body text
|
|
817
|
-
muted: "base",
|
|
818
|
-
// muted still readable
|
|
819
|
-
small: "sm"
|
|
820
|
-
// small bumped up slightly
|
|
821
|
-
};
|
|
822
|
-
const finalSize = size || defaultSizes[variant];
|
|
823
|
-
const margin = noMargin ? "" : "mb-4";
|
|
824
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
825
|
-
"p",
|
|
826
|
-
{
|
|
827
|
-
className: `${variantClasses[variant]} ${sizeClasses[finalSize]} ${weightClasses[weight]} ${margin} ${className}`,
|
|
828
|
-
children
|
|
829
|
-
}
|
|
830
|
-
);
|
|
831
|
-
}
|
|
832
|
-
Text.displayName = "Text";
|
|
833
|
-
var text_default = Text;
|
|
834
|
-
function Stack({
|
|
835
|
-
children,
|
|
836
|
-
className = "",
|
|
837
|
-
direction = "vertical",
|
|
838
|
-
spacing = "md",
|
|
839
|
-
align = "stretch",
|
|
840
|
-
justify
|
|
841
|
-
}) {
|
|
842
|
-
const spacingClasses = {
|
|
843
|
-
none: "gap-0",
|
|
844
|
-
sm: "gap-2",
|
|
845
|
-
md: "gap-4",
|
|
846
|
-
lg: "gap-6",
|
|
847
|
-
xl: "gap-8"
|
|
848
|
-
};
|
|
849
|
-
const alignClasses = {
|
|
850
|
-
start: "items-start",
|
|
851
|
-
center: "items-center",
|
|
852
|
-
end: "items-end",
|
|
853
|
-
stretch: "items-stretch"
|
|
854
|
-
};
|
|
855
|
-
const justifyClasses = {
|
|
856
|
-
start: "justify-start",
|
|
857
|
-
center: "justify-center",
|
|
858
|
-
end: "justify-end",
|
|
859
|
-
between: "justify-between",
|
|
860
|
-
around: "justify-around"
|
|
861
|
-
};
|
|
862
|
-
const directionClass = direction === "horizontal" ? "flex-row" : "flex-col";
|
|
863
|
-
const justifyClass = justify ? justifyClasses[justify] : "";
|
|
864
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
865
|
-
"div",
|
|
866
|
-
{
|
|
867
|
-
"data-component": "Stack",
|
|
868
|
-
className: `flex ${directionClass} ${spacingClasses[spacing]} ${alignClasses[align]} ${justifyClass} ${className}`,
|
|
869
|
-
children
|
|
870
|
-
}
|
|
871
|
-
);
|
|
872
|
-
}
|
|
873
|
-
Stack.displayName = "Stack";
|
|
874
|
-
var stack_default = Stack;
|
|
875
|
-
function FormField({
|
|
876
|
-
children,
|
|
877
|
-
label,
|
|
878
|
-
htmlFor,
|
|
879
|
-
error,
|
|
880
|
-
helperText,
|
|
881
|
-
required = false,
|
|
882
|
-
className = "",
|
|
883
|
-
validationState = "default"
|
|
884
|
-
}) {
|
|
885
|
-
const effectiveValidationState = error ? "error" : validationState;
|
|
886
|
-
const childWithValidation = React5.isValidElement(children) ? React5.cloneElement(children, {
|
|
887
|
-
validationState: effectiveValidationState
|
|
888
|
-
}) : children;
|
|
889
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(stack_default, { direction: "vertical", spacing: "sm", className, children: [
|
|
890
|
-
label && /* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor, children: /* @__PURE__ */ jsxRuntime.jsxs(text_default, { variant: "body", size: "sm", noMargin: true, className: "font-medium", children: [
|
|
891
|
-
label,
|
|
892
|
-
required && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-destructive ml-1", children: "*" })
|
|
893
|
-
] }) }),
|
|
894
|
-
childWithValidation,
|
|
895
|
-
error && /* @__PURE__ */ jsxRuntime.jsx(text_default, { variant: "body", size: "sm", noMargin: true, className: "text-destructive", children: error }),
|
|
896
|
-
!error && helperText && /* @__PURE__ */ jsxRuntime.jsx(text_default, { variant: "muted", size: "sm", noMargin: true, children: helperText })
|
|
897
|
-
] });
|
|
898
|
-
}
|
|
899
|
-
FormField.displayName = "FormField";
|
|
900
|
-
var form_field_default = FormField;
|
|
901
|
-
function InputGroup({ children, prefix, suffix, className = "" }) {
|
|
902
|
-
const isTextSuffix = typeof suffix === "string" || typeof suffix === "number";
|
|
903
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
904
|
-
"div",
|
|
905
|
-
{
|
|
906
|
-
className: [
|
|
907
|
-
"inline-flex items-stretch rounded-lg border border-input shadow-sm bg-background",
|
|
908
|
-
"focus-within:ring-2 focus-within:ring-ring/20 focus-within:border-ring",
|
|
909
|
-
"transition-colors duration-150 overflow-hidden",
|
|
910
|
-
// Use CSS nesting to style child input without cloning
|
|
911
|
-
"[&>input]:border-0 [&>input]:shadow-none [&>input]:rounded-none [&>input]:ring-0",
|
|
912
|
-
"[&>input]:focus:ring-0 [&>input]:focus:border-0 [&>input]:bg-transparent",
|
|
913
|
-
"[&>input]:flex-1 [&>input]:min-w-0",
|
|
914
|
-
// Style child buttons (both direct and nested)
|
|
915
|
-
"[&_button]:rounded-none [&_button]:border-0 [&_button]:shadow-none [&_button]:m-0",
|
|
916
|
-
"[&_button]:h-full",
|
|
917
|
-
className
|
|
918
|
-
].filter(Boolean).join(" "),
|
|
919
|
-
children: [
|
|
920
|
-
prefix && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center px-3 bg-muted/50 text-muted-foreground text-sm shrink-0", children: prefix }),
|
|
921
|
-
children,
|
|
922
|
-
suffix && /* @__PURE__ */ jsxRuntime.jsx(
|
|
923
|
-
"div",
|
|
924
|
-
{
|
|
925
|
-
className: isTextSuffix ? "flex items-center px-3 bg-muted/50 text-muted-foreground text-sm shrink-0" : "flex items-stretch shrink-0",
|
|
926
|
-
children: suffix
|
|
927
|
-
}
|
|
928
|
-
)
|
|
929
|
-
]
|
|
930
|
-
}
|
|
931
|
-
);
|
|
932
|
-
}
|
|
933
|
-
InputGroup.displayName = "InputGroup";
|
|
934
|
-
var input_group_default = InputGroup;
|
|
935
|
-
function Calendar({ value, onChange, minDate, maxDate, disabled = false, className = "" }) {
|
|
936
|
-
const [currentMonth, setCurrentMonth] = React5.useState(value || /* @__PURE__ */ new Date());
|
|
937
|
-
const [selectedDate, setSelectedDate] = React5.useState(value);
|
|
938
|
-
const getDaysInMonth = (date) => {
|
|
939
|
-
return new Date(date.getFullYear(), date.getMonth() + 1, 0).getDate();
|
|
940
|
-
};
|
|
941
|
-
const getFirstDayOfMonth = (date) => {
|
|
942
|
-
return new Date(date.getFullYear(), date.getMonth(), 1).getDay();
|
|
943
|
-
};
|
|
944
|
-
const handleDateClick = (day) => {
|
|
945
|
-
if (disabled) return;
|
|
946
|
-
const newDate = new Date(currentMonth.getFullYear(), currentMonth.getMonth(), day);
|
|
947
|
-
if (minDate && newDate < minDate) return;
|
|
948
|
-
if (maxDate && newDate > maxDate) return;
|
|
949
|
-
setSelectedDate(newDate);
|
|
950
|
-
onChange?.(newDate);
|
|
951
|
-
};
|
|
952
|
-
const handlePreviousMonth = () => {
|
|
953
|
-
setCurrentMonth(new Date(currentMonth.getFullYear(), currentMonth.getMonth() - 1));
|
|
954
|
-
};
|
|
955
|
-
const handleNextMonth = () => {
|
|
956
|
-
setCurrentMonth(new Date(currentMonth.getFullYear(), currentMonth.getMonth() + 1));
|
|
957
|
-
};
|
|
958
|
-
const daysInMonth = getDaysInMonth(currentMonth);
|
|
959
|
-
const firstDayOfMonth = getFirstDayOfMonth(currentMonth);
|
|
960
|
-
const monthName = currentMonth.toLocaleDateString("en-US", { month: "long", year: "numeric" });
|
|
961
|
-
const weekDays = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"];
|
|
962
|
-
const isDateSelected = (day) => {
|
|
963
|
-
if (!selectedDate) return false;
|
|
964
|
-
return selectedDate.getDate() === day && selectedDate.getMonth() === currentMonth.getMonth() && selectedDate.getFullYear() === currentMonth.getFullYear();
|
|
965
|
-
};
|
|
966
|
-
const isDateDisabled = (day) => {
|
|
967
|
-
const date = new Date(currentMonth.getFullYear(), currentMonth.getMonth(), day);
|
|
968
|
-
if (minDate && date < minDate) return true;
|
|
969
|
-
if (maxDate && date > maxDate) return true;
|
|
970
|
-
return false;
|
|
971
|
-
};
|
|
972
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
973
|
-
"div",
|
|
974
|
-
{
|
|
975
|
-
className: `inline-block border border-border rounded-lg bg-card text-card-foreground shadow-sm p-4 ${disabled ? "opacity-50 pointer-events-none" : ""} ${className}`.trim(),
|
|
976
|
-
children: [
|
|
977
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between mb-4", children: [
|
|
978
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
979
|
-
"button",
|
|
980
|
-
{
|
|
981
|
-
type: "button",
|
|
982
|
-
onClick: handlePreviousMonth,
|
|
983
|
-
className: "p-2 hover:bg-muted rounded-md transition-colors focus:outline-none focus:ring-2 focus:ring-ring",
|
|
984
|
-
"aria-label": "Previous month",
|
|
985
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
986
|
-
"svg",
|
|
987
|
-
{
|
|
988
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
989
|
-
width: "20",
|
|
990
|
-
height: "20",
|
|
991
|
-
viewBox: "0 0 24 24",
|
|
992
|
-
fill: "none",
|
|
993
|
-
stroke: "currentColor",
|
|
994
|
-
strokeWidth: "2",
|
|
995
|
-
strokeLinecap: "round",
|
|
996
|
-
strokeLinejoin: "round",
|
|
997
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("polyline", { points: "15 18 9 12 15 6" })
|
|
998
|
-
}
|
|
999
|
-
)
|
|
1000
|
-
}
|
|
1001
|
-
),
|
|
1002
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-semibold text-sm", children: monthName }),
|
|
1003
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1004
|
-
"button",
|
|
1005
|
-
{
|
|
1006
|
-
type: "button",
|
|
1007
|
-
onClick: handleNextMonth,
|
|
1008
|
-
className: "p-2 hover:bg-muted rounded-md transition-colors focus:outline-none focus:ring-2 focus:ring-ring",
|
|
1009
|
-
"aria-label": "Next month",
|
|
1010
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1011
|
-
"svg",
|
|
1012
|
-
{
|
|
1013
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1014
|
-
width: "20",
|
|
1015
|
-
height: "20",
|
|
1016
|
-
viewBox: "0 0 24 24",
|
|
1017
|
-
fill: "none",
|
|
1018
|
-
stroke: "currentColor",
|
|
1019
|
-
strokeWidth: "2",
|
|
1020
|
-
strokeLinecap: "round",
|
|
1021
|
-
strokeLinejoin: "round",
|
|
1022
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("polyline", { points: "9 18 15 12 9 6" })
|
|
1023
|
-
}
|
|
1024
|
-
)
|
|
1025
|
-
}
|
|
1026
|
-
)
|
|
1027
|
-
] }),
|
|
1028
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-7 gap-1 mb-2", children: weekDays.map((day) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-9 h-9 flex items-center justify-center text-xs font-medium text-muted-foreground", children: day }, day)) }),
|
|
1029
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-7 gap-1", children: [
|
|
1030
|
-
Array.from({ length: firstDayOfMonth }).map((_, index) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-9 h-9" }, `empty-${index}`)),
|
|
1031
|
-
Array.from({ length: daysInMonth }).map((_, index) => {
|
|
1032
|
-
const day = index + 1;
|
|
1033
|
-
const selected = isDateSelected(day);
|
|
1034
|
-
const dateDisabled = isDateDisabled(day);
|
|
1035
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1036
|
-
"button",
|
|
1037
|
-
{
|
|
1038
|
-
type: "button",
|
|
1039
|
-
onClick: () => handleDateClick(day),
|
|
1040
|
-
disabled: dateDisabled,
|
|
1041
|
-
className: `
|
|
1042
|
-
w-9 h-9 flex items-center justify-center text-sm rounded-md transition-colors
|
|
1043
|
-
focus:outline-none focus:ring-2 focus:ring-ring
|
|
1044
|
-
${selected ? "bg-primary text-primary-foreground font-semibold" : "hover:bg-muted"}
|
|
1045
|
-
${dateDisabled ? "text-muted-foreground cursor-not-allowed opacity-50" : ""}
|
|
1046
|
-
`.trim(),
|
|
1047
|
-
"aria-label": `Select ${day} ${monthName}`,
|
|
1048
|
-
"aria-pressed": selected,
|
|
1049
|
-
children: day
|
|
1050
|
-
},
|
|
1051
|
-
day
|
|
1052
|
-
);
|
|
1053
|
-
})
|
|
1054
|
-
] })
|
|
1055
|
-
]
|
|
1056
|
-
}
|
|
1057
|
-
);
|
|
1058
|
-
}
|
|
1059
|
-
Calendar.displayName = "Calendar";
|
|
1060
|
-
var calendar_default = Calendar;
|
|
1061
|
-
function DatePicker({
|
|
1062
|
-
value,
|
|
1063
|
-
onChange,
|
|
1064
|
-
minDate,
|
|
1065
|
-
maxDate,
|
|
1066
|
-
placeholder = "Select date",
|
|
1067
|
-
disabled = false,
|
|
1068
|
-
dateFormat = "MM/DD/YYYY",
|
|
1069
|
-
clearable = true,
|
|
1070
|
-
className = "",
|
|
1071
|
-
size = "md"
|
|
1072
|
-
}) {
|
|
1073
|
-
const [isOpen, setIsOpen] = React5.useState(false);
|
|
1074
|
-
const [selectedDate, setSelectedDate] = React5.useState(value);
|
|
1075
|
-
const containerRef = React5.useRef(null);
|
|
1076
|
-
const inputRef = React5.useRef(null);
|
|
1077
|
-
React5.useEffect(() => {
|
|
1078
|
-
setSelectedDate(value);
|
|
1079
|
-
}, [value]);
|
|
1080
|
-
React5.useEffect(() => {
|
|
1081
|
-
const handleClickOutside = (event) => {
|
|
1082
|
-
if (containerRef.current && !containerRef.current.contains(event.target)) {
|
|
1083
|
-
setIsOpen(false);
|
|
1084
|
-
}
|
|
1085
|
-
};
|
|
1086
|
-
if (isOpen) {
|
|
1087
|
-
document.addEventListener("mousedown", handleClickOutside);
|
|
1088
|
-
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
1089
|
-
}
|
|
1090
|
-
return void 0;
|
|
1091
|
-
}, [isOpen]);
|
|
1092
|
-
React5.useEffect(() => {
|
|
1093
|
-
const handleEscape = (event) => {
|
|
1094
|
-
if (event.key === "Escape" && isOpen) {
|
|
1095
|
-
setIsOpen(false);
|
|
1096
|
-
inputRef.current?.focus();
|
|
1097
|
-
}
|
|
1098
|
-
};
|
|
1099
|
-
if (isOpen) {
|
|
1100
|
-
document.addEventListener("keydown", handleEscape);
|
|
1101
|
-
return () => document.removeEventListener("keydown", handleEscape);
|
|
1102
|
-
}
|
|
1103
|
-
return void 0;
|
|
1104
|
-
}, [isOpen]);
|
|
1105
|
-
const formatDate = (date) => {
|
|
1106
|
-
if (!date) return "";
|
|
1107
|
-
const month = String(date.getMonth() + 1).padStart(2, "0");
|
|
1108
|
-
const day = String(date.getDate()).padStart(2, "0");
|
|
1109
|
-
const year = date.getFullYear();
|
|
1110
|
-
return dateFormat.replace("MM", month).replace("DD", day).replace("YYYY", String(year)).replace("YY", String(year).slice(-2));
|
|
1111
|
-
};
|
|
1112
|
-
const handleDateSelect = (date) => {
|
|
1113
|
-
setSelectedDate(date);
|
|
1114
|
-
onChange?.(date);
|
|
1115
|
-
setIsOpen(false);
|
|
1116
|
-
inputRef.current?.focus();
|
|
1117
|
-
};
|
|
1118
|
-
const handleClear = (e) => {
|
|
1119
|
-
e.stopPropagation();
|
|
1120
|
-
setSelectedDate(void 0);
|
|
1121
|
-
onChange?.(void 0);
|
|
1122
|
-
inputRef.current?.focus();
|
|
1123
|
-
};
|
|
1124
|
-
const handleInputClick = () => {
|
|
1125
|
-
if (!disabled) {
|
|
1126
|
-
setIsOpen(!isOpen);
|
|
1127
|
-
}
|
|
1128
|
-
};
|
|
1129
|
-
const handleKeyDown = (e) => {
|
|
1130
|
-
if (e.key === "Enter" || e.key === " ") {
|
|
1131
|
-
e.preventDefault();
|
|
1132
|
-
setIsOpen(!isOpen);
|
|
1133
|
-
}
|
|
1134
|
-
};
|
|
1135
|
-
const sizeClasses = {
|
|
1136
|
-
sm: { container: "h-8 px-3", text: "text-sm", icon: 16 },
|
|
1137
|
-
md: { container: "h-10 px-4", text: "text-base", icon: 18 },
|
|
1138
|
-
lg: { container: "h-12 px-5", text: "text-lg", icon: 20 }
|
|
1139
|
-
};
|
|
1140
|
-
const currentSize = sizeClasses[size];
|
|
1141
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref: containerRef, className: `relative w-full ${className}`, children: [
|
|
1142
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1143
|
-
"div",
|
|
1144
|
-
{
|
|
1145
|
-
className: `
|
|
1146
|
-
w-full flex items-center justify-between gap-2
|
|
1147
|
-
border border-input rounded-md
|
|
1148
|
-
bg-background text-foreground
|
|
1149
|
-
cursor-pointer
|
|
1150
|
-
transition-all duration-200
|
|
1151
|
-
${currentSize.container}
|
|
1152
|
-
${currentSize.text}
|
|
1153
|
-
${isOpen ? "ring-2 ring-ring ring-offset-2" : "hover:border-ring"}
|
|
1154
|
-
${disabled ? "opacity-50 cursor-not-allowed" : ""}
|
|
1155
|
-
`.trim(),
|
|
1156
|
-
onClick: handleInputClick,
|
|
1157
|
-
role: "button",
|
|
1158
|
-
tabIndex: disabled ? -1 : 0,
|
|
1159
|
-
onKeyDown: handleKeyDown,
|
|
1160
|
-
"aria-haspopup": "dialog",
|
|
1161
|
-
"aria-expanded": isOpen,
|
|
1162
|
-
"aria-label": "Date picker",
|
|
1163
|
-
children: [
|
|
1164
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1165
|
-
"input",
|
|
1166
|
-
{
|
|
1167
|
-
ref: inputRef,
|
|
1168
|
-
type: "text",
|
|
1169
|
-
value: formatDate(selectedDate),
|
|
1170
|
-
placeholder,
|
|
1171
|
-
readOnly: true,
|
|
1172
|
-
disabled,
|
|
1173
|
-
className: `flex-1 min-w-0 bg-transparent outline-none cursor-pointer placeholder:text-muted-foreground ${currentSize.text}`,
|
|
1174
|
-
"aria-label": "Selected date"
|
|
1175
|
-
}
|
|
1176
|
-
),
|
|
1177
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1 flex-shrink-0", children: [
|
|
1178
|
-
clearable && selectedDate && !disabled ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1179
|
-
"button",
|
|
1180
|
-
{
|
|
1181
|
-
type: "button",
|
|
1182
|
-
onClick: handleClear,
|
|
1183
|
-
className: "p-1 hover:bg-muted rounded transition-colors flex-shrink-0",
|
|
1184
|
-
"aria-label": "Clear date",
|
|
1185
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1186
|
-
"svg",
|
|
1187
|
-
{
|
|
1188
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1189
|
-
width: currentSize.icon - 2,
|
|
1190
|
-
height: currentSize.icon - 2,
|
|
1191
|
-
viewBox: "0 0 24 24",
|
|
1192
|
-
fill: "none",
|
|
1193
|
-
stroke: "currentColor",
|
|
1194
|
-
strokeWidth: "2",
|
|
1195
|
-
strokeLinecap: "round",
|
|
1196
|
-
strokeLinejoin: "round",
|
|
1197
|
-
children: [
|
|
1198
|
-
/* @__PURE__ */ jsxRuntime.jsx("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
|
|
1199
|
-
/* @__PURE__ */ jsxRuntime.jsx("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
|
|
1200
|
-
]
|
|
1201
|
-
}
|
|
1202
|
-
)
|
|
1203
|
-
}
|
|
1204
|
-
) : clearable ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-6 h-6 flex-shrink-0" }) : null,
|
|
1205
|
-
/* @__PURE__ */ jsxRuntime.jsx(iconsReact.IconCalendar, { size: currentSize.icon, className: "text-muted-foreground flex-shrink-0" })
|
|
1206
|
-
] })
|
|
1207
|
-
]
|
|
1208
|
-
}
|
|
1209
|
-
),
|
|
1210
|
-
isOpen && !disabled && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1211
|
-
"div",
|
|
1212
|
-
{
|
|
1213
|
-
className: "absolute left-0 top-full mt-2 z-50 animate-scaleIn origin-top",
|
|
1214
|
-
role: "dialog",
|
|
1215
|
-
"aria-label": "Calendar",
|
|
1216
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(calendar_default, { value: selectedDate, onChange: handleDateSelect, minDate, maxDate })
|
|
1217
|
-
}
|
|
1218
|
-
)
|
|
1219
|
-
] });
|
|
1220
|
-
}
|
|
1221
|
-
DatePicker.displayName = "DatePicker";
|
|
1222
|
-
var date_picker_default = DatePicker;
|
|
1223
|
-
function Nav({
|
|
1224
|
-
children,
|
|
1225
|
-
className = "",
|
|
1226
|
-
ariaLabel = "Main navigation",
|
|
1227
|
-
direction = "horizontal",
|
|
1228
|
-
spacing = "md",
|
|
1229
|
-
align = "center"
|
|
1230
|
-
}) {
|
|
1231
|
-
const spacingClasses = {
|
|
1232
|
-
none: "gap-0",
|
|
1233
|
-
sm: "gap-2",
|
|
1234
|
-
md: "gap-4",
|
|
1235
|
-
lg: "gap-6",
|
|
1236
|
-
xl: "gap-8"
|
|
1237
|
-
};
|
|
1238
|
-
const alignClasses = {
|
|
1239
|
-
start: "items-start",
|
|
1240
|
-
center: "items-center",
|
|
1241
|
-
end: "items-end",
|
|
1242
|
-
stretch: "items-stretch"
|
|
1243
|
-
};
|
|
1244
|
-
const directionClass = direction === "horizontal" ? "flex-row" : "flex-col";
|
|
1245
|
-
const spacingClass = spacingClasses[spacing];
|
|
1246
|
-
const alignClass = alignClasses[align];
|
|
1247
|
-
return /* @__PURE__ */ jsxRuntime.jsx("nav", { "aria-label": ariaLabel, className: `flex ${directionClass} ${spacingClass} ${alignClass} ${className}`, children });
|
|
1248
|
-
}
|
|
1249
|
-
Nav.displayName = "Nav";
|
|
1250
|
-
var nav_default = Nav;
|
|
1251
|
-
function Container({
|
|
1252
|
-
children,
|
|
1253
|
-
className = "",
|
|
1254
|
-
size = "lg",
|
|
1255
|
-
padding = "lg",
|
|
1256
|
-
align = "center",
|
|
1257
|
-
minWidth,
|
|
1258
|
-
minHeight
|
|
1259
|
-
}) {
|
|
1260
|
-
const sizeClasses = {
|
|
1261
|
-
sm: "max-w-screen-sm",
|
|
1262
|
-
md: "max-w-screen-md",
|
|
1263
|
-
lg: "max-w-screen-lg",
|
|
1264
|
-
xl: "max-w-screen-xl",
|
|
1265
|
-
full: "max-w-full"
|
|
1266
|
-
};
|
|
1267
|
-
const paddingClasses = {
|
|
1268
|
-
none: "",
|
|
1269
|
-
sm: "py-6",
|
|
1270
|
-
md: "py-8",
|
|
1271
|
-
lg: "py-12",
|
|
1272
|
-
xl: "py-16"
|
|
1273
|
-
};
|
|
1274
|
-
const alignClasses = {
|
|
1275
|
-
start: "mr-auto",
|
|
1276
|
-
center: "mx-auto",
|
|
1277
|
-
end: "ml-auto"
|
|
1278
|
-
};
|
|
1279
|
-
const minWidthClasses = {
|
|
1280
|
-
xs: "min-w-[20rem]",
|
|
1281
|
-
// 320px
|
|
1282
|
-
sm: "min-w-[24rem]",
|
|
1283
|
-
// 384px
|
|
1284
|
-
md: "min-w-[28rem]",
|
|
1285
|
-
// 448px
|
|
1286
|
-
lg: "min-w-[32rem]",
|
|
1287
|
-
// 512px
|
|
1288
|
-
xl: "min-w-[36rem]",
|
|
1289
|
-
// 576px
|
|
1290
|
-
"2xl": "min-w-[42rem]",
|
|
1291
|
-
// 672px
|
|
1292
|
-
"3xl": "min-w-[48rem]",
|
|
1293
|
-
// 768px
|
|
1294
|
-
full: "min-w-full"
|
|
1295
|
-
};
|
|
1296
|
-
const minHeightClasses = {
|
|
1297
|
-
xs: "min-h-[10rem]",
|
|
1298
|
-
// 160px
|
|
1299
|
-
sm: "min-h-[15rem]",
|
|
1300
|
-
// 240px
|
|
1301
|
-
md: "min-h-[20rem]",
|
|
1302
|
-
// 320px
|
|
1303
|
-
lg: "min-h-[25rem]",
|
|
1304
|
-
// 400px
|
|
1305
|
-
xl: "min-h-[30rem]",
|
|
1306
|
-
// 480px
|
|
1307
|
-
"2xl": "min-h-[35rem]",
|
|
1308
|
-
// 560px
|
|
1309
|
-
"3xl": "min-h-[40rem]",
|
|
1310
|
-
// 640px
|
|
1311
|
-
screen: "min-h-screen"
|
|
1312
|
-
};
|
|
1313
|
-
const minWidthClass = minWidth && minWidthClasses[minWidth] ? minWidthClasses[minWidth] : "";
|
|
1314
|
-
const minHeightClass = minHeight && minHeightClasses[minHeight] ? minHeightClasses[minHeight] : "";
|
|
1315
|
-
const inlineStyles = {
|
|
1316
|
-
...minWidth && !minWidthClasses[minWidth] && { minWidth },
|
|
1317
|
-
...minHeight && !minHeightClasses[minHeight] && { minHeight }
|
|
1318
|
-
};
|
|
1319
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1320
|
-
"div",
|
|
1321
|
-
{
|
|
1322
|
-
className: `px-4 ${sizeClasses[size]} ${paddingClasses[padding]} ${alignClasses[align]} ${minWidthClass} ${minHeightClass} ${className}`,
|
|
1323
|
-
style: Object.keys(inlineStyles).length > 0 ? inlineStyles : void 0,
|
|
1324
|
-
children
|
|
1325
|
-
}
|
|
1326
|
-
);
|
|
1327
|
-
}
|
|
1328
|
-
Container.displayName = "Container";
|
|
1329
|
-
var container_default = Container;
|
|
1330
|
-
function Navbar({
|
|
1331
|
-
brand,
|
|
1332
|
-
children,
|
|
1333
|
-
sticky = true,
|
|
1334
|
-
className = "",
|
|
1335
|
-
actions,
|
|
1336
|
-
size = "xl",
|
|
1337
|
-
appearance = "solid",
|
|
1338
|
-
border = "none",
|
|
1339
|
-
disableMobileMenu = false
|
|
1340
|
-
}) {
|
|
1341
|
-
const [mobileMenuOpen, setMobileMenuOpen] = React5.useState(false);
|
|
1342
|
-
const appearanceClasses = {
|
|
1343
|
-
solid: "bg-background shadow-sm",
|
|
1344
|
-
blur: "bg-background/70 backdrop-blur-md supports-[backdrop-filter]:bg-background/60 border border-border/60",
|
|
1345
|
-
transparent: "bg-transparent"
|
|
1346
|
-
};
|
|
1347
|
-
const borderClasses = {
|
|
1348
|
-
none: "",
|
|
1349
|
-
bottom: "border-b border-border",
|
|
1350
|
-
top: "border-t border-border",
|
|
1351
|
-
both: "border-y border-border"
|
|
1352
|
-
};
|
|
1353
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1354
|
-
"nav",
|
|
1355
|
-
{
|
|
1356
|
-
"data-appearance": appearance,
|
|
1357
|
-
className: `${sticky ? "sticky top-0 z-50" : ""} ${appearanceClasses[appearance]} ${borderClasses[border]} ${className}`,
|
|
1358
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(container_default, { padding: "none", size, children: [
|
|
1359
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between h-16", children: [
|
|
1360
|
-
brand && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-shrink-0", children: brand }),
|
|
1361
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "hidden md:flex md:items-center md:space-x-6 md:flex-1 md:ml-10", children }),
|
|
1362
|
-
actions && /* @__PURE__ */ jsxRuntime.jsx("div", { className: `${disableMobileMenu ? "flex" : "hidden md:flex"} items-center space-x-4`, children: actions }),
|
|
1363
|
-
!disableMobileMenu && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "md:hidden", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1364
|
-
button_default,
|
|
1365
|
-
{
|
|
1366
|
-
variant: "neutral",
|
|
1367
|
-
style: "ghost",
|
|
1368
|
-
size: "sm",
|
|
1369
|
-
icon: mobileMenuOpen ? /* @__PURE__ */ jsxRuntime.jsx(iconsReact.IconX, { size: 24 }) : /* @__PURE__ */ jsxRuntime.jsx(iconsReact.IconMenu2, { size: 24 }),
|
|
1370
|
-
ariaLabel: "Toggle menu",
|
|
1371
|
-
onClick: () => setMobileMenuOpen(!mobileMenuOpen)
|
|
1372
|
-
}
|
|
1373
|
-
) })
|
|
1374
|
-
] }),
|
|
1375
|
-
!disableMobileMenu && mobileMenuOpen && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "md:hidden py-4 space-y-3 border-t border-border", children: [
|
|
1376
|
-
children,
|
|
1377
|
-
actions && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "pt-4 border-t border-border space-y-2", children: actions })
|
|
1378
|
-
] })
|
|
1379
|
-
] })
|
|
1380
|
-
}
|
|
1381
|
-
);
|
|
1382
|
-
}
|
|
1383
|
-
Navbar.displayName = "Navbar";
|
|
1384
|
-
var navbar_default = Navbar;
|
|
1385
|
-
function NavbarBrand({ children, href, external = false, onClick, className = "" }) {
|
|
1386
|
-
const content = /* @__PURE__ */ jsxRuntime.jsx("span", { className: `text-lg md:text-xl font-bold ${className}`, children });
|
|
1387
|
-
const linkClassName = "no-underline text-foreground hover:text-primary transition-colors";
|
|
1388
|
-
if (href) {
|
|
1389
|
-
if (external) {
|
|
1390
|
-
return /* @__PURE__ */ jsxRuntime.jsx("a", { href, className: linkClassName, target: "_blank", rel: "noopener noreferrer", children: content });
|
|
1391
|
-
}
|
|
1392
|
-
return /* @__PURE__ */ jsxRuntime.jsx(reactRouterDom.Link, { to: href, className: linkClassName, children: content });
|
|
1393
|
-
}
|
|
1394
|
-
if (onClick) {
|
|
1395
|
-
return /* @__PURE__ */ jsxRuntime.jsx("button", { onClick, className: linkClassName, children: content });
|
|
1396
|
-
}
|
|
1397
|
-
return content;
|
|
1398
|
-
}
|
|
1399
|
-
NavbarBrand.displayName = "NavbarBrand";
|
|
1400
|
-
var navbar_brand_default = NavbarBrand;
|
|
1401
|
-
function NavbarLink({ href, children, external = false, className = "", end = false }) {
|
|
1402
|
-
const baseClassName = `block md:inline-block py-2 md:py-0 font-medium transition-colors no-underline ${className}`;
|
|
1403
|
-
if (external) {
|
|
1404
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1405
|
-
"a",
|
|
1406
|
-
{
|
|
1407
|
-
href,
|
|
1408
|
-
target: "_blank",
|
|
1409
|
-
rel: "noopener noreferrer",
|
|
1410
|
-
className: `${baseClassName} text-foreground hover:text-primary`,
|
|
1411
|
-
children
|
|
1412
|
-
}
|
|
1413
|
-
);
|
|
1414
|
-
}
|
|
1415
|
-
if (href.startsWith("#")) {
|
|
1416
|
-
return /* @__PURE__ */ jsxRuntime.jsx("a", { href, className: `${baseClassName} text-foreground hover:text-primary`, children });
|
|
1417
|
-
}
|
|
1418
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1419
|
-
reactRouterDom.NavLink,
|
|
1420
|
-
{
|
|
1421
|
-
to: href,
|
|
1422
|
-
end,
|
|
1423
|
-
className: ({ isActive }) => `${baseClassName} ${isActive ? "text-primary font-semibold border-b-2 border-primary" : "text-foreground hover:text-primary"}`,
|
|
1424
|
-
children
|
|
1425
|
-
}
|
|
1426
|
-
);
|
|
1427
|
-
}
|
|
1428
|
-
NavbarLink.displayName = "NavbarLink";
|
|
1429
|
-
var navbar_link_default = NavbarLink;
|
|
1430
|
-
var PageTransition = ({
|
|
1431
|
-
children,
|
|
1432
|
-
duration = 300,
|
|
1433
|
-
type = "fade",
|
|
1434
|
-
className = ""
|
|
1435
|
-
}) => {
|
|
1436
|
-
const [isVisible, setIsVisible] = React5__default.default.useState(false);
|
|
1437
|
-
React5__default.default.useEffect(() => {
|
|
1438
|
-
requestAnimationFrame(() => {
|
|
1439
|
-
requestAnimationFrame(() => {
|
|
1440
|
-
setIsVisible(true);
|
|
1441
|
-
});
|
|
1442
|
-
});
|
|
1443
|
-
}, []);
|
|
1444
|
-
const getAnimationStyles = () => {
|
|
1445
|
-
if (type === "none") return "";
|
|
1446
|
-
const baseClasses = "transition-all ease-out";
|
|
1447
|
-
const durationClass = `duration-[${duration}ms]`;
|
|
1448
|
-
if (!isVisible) {
|
|
1449
|
-
switch (type) {
|
|
1450
|
-
case "fade":
|
|
1451
|
-
return `${baseClasses} ${durationClass} opacity-0 translate-y-1`;
|
|
1452
|
-
case "slide":
|
|
1453
|
-
return `${baseClasses} ${durationClass} opacity-0 translate-y-3`;
|
|
1454
|
-
case "scale":
|
|
1455
|
-
return `${baseClasses} ${durationClass} opacity-0 scale-[0.99]`;
|
|
1456
|
-
default:
|
|
1457
|
-
return `${baseClasses} ${durationClass} opacity-0 translate-y-1`;
|
|
1458
|
-
}
|
|
1459
|
-
} else {
|
|
1460
|
-
return `${baseClasses} ${durationClass} opacity-100 translate-y-0 scale-100`;
|
|
1461
|
-
}
|
|
1462
|
-
};
|
|
1463
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `${getAnimationStyles()} ${className}`.trim(), children });
|
|
1464
|
-
};
|
|
1465
|
-
PageTransition.displayName = "PageTransition";
|
|
1466
|
-
var page_transition_default = PageTransition;
|
|
1467
|
-
function Tabs({ tabs, defaultTab, className = "", ariaLabel = "Tabs" }) {
|
|
1468
|
-
const [activeTab, setActiveTab] = React5.useState(defaultTab || tabs[0]?.id);
|
|
1469
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className, children: [
|
|
1470
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { role: "tablist", "aria-label": ariaLabel, className: "flex border-b-2 border-border/50", children: tabs.map((tab) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1471
|
-
"button",
|
|
1472
|
-
{
|
|
1473
|
-
role: "tab",
|
|
1474
|
-
"aria-selected": activeTab === tab.id,
|
|
1475
|
-
"aria-controls": `panel-${tab.id}`,
|
|
1476
|
-
id: `tab-${tab.id}`,
|
|
1477
|
-
onClick: () => setActiveTab(tab.id),
|
|
1478
|
-
className: `px-4 py-3 font-medium cursor-pointer transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 relative ${activeTab === tab.id ? "text-primary after:absolute after:bottom-0 after:left-0 after:right-0 after:h-0.5 after:bg-primary after:rounded-t after:transition-all after:duration-200" : "text-muted-foreground hover:text-foreground hover:bg-muted/50"}`,
|
|
1479
|
-
children: tab.label
|
|
1480
|
-
},
|
|
1481
|
-
tab.id
|
|
1482
|
-
)) }),
|
|
1483
|
-
tabs.map((tab) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1484
|
-
"div",
|
|
1485
|
-
{
|
|
1486
|
-
role: "tabpanel",
|
|
1487
|
-
id: `panel-${tab.id}`,
|
|
1488
|
-
"aria-labelledby": `tab-${tab.id}`,
|
|
1489
|
-
hidden: activeTab !== tab.id,
|
|
1490
|
-
children: activeTab === tab.id && /* @__PURE__ */ jsxRuntime.jsx(page_transition_default, { type: "fade", duration: 150, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "pt-6", children: tab.content }) })
|
|
1491
|
-
},
|
|
1492
|
-
tab.id
|
|
1493
|
-
))
|
|
1494
|
-
] });
|
|
1495
|
-
}
|
|
1496
|
-
Tabs.displayName = "Tabs";
|
|
1497
|
-
var tabs_default = Tabs;
|
|
1498
|
-
var DropdownContext = React5.createContext(null);
|
|
1499
|
-
function Dropdown({
|
|
1500
|
-
trigger,
|
|
1501
|
-
children,
|
|
1502
|
-
className = "",
|
|
1503
|
-
align = "start",
|
|
1504
|
-
autoClose = true,
|
|
1505
|
-
size = "md"
|
|
1506
|
-
}) {
|
|
1507
|
-
const [isOpen, setIsOpen] = React5.useState(false);
|
|
1508
|
-
const dropdownRef = React5.useRef(null);
|
|
1509
|
-
const menuRef = React5.useRef(null);
|
|
1510
|
-
const itemsRef = React5.useRef([]);
|
|
1511
|
-
const [activeIndex, setActiveIndex] = React5.useState(-1);
|
|
1512
|
-
const close = React5.useCallback(() => setIsOpen(false), []);
|
|
1513
|
-
const open = React5.useCallback(() => setIsOpen(true), []);
|
|
1514
|
-
React5.useEffect(() => {
|
|
1515
|
-
if (!isOpen) return;
|
|
1516
|
-
const handleKey = (e) => {
|
|
1517
|
-
if (!menuRef.current) return;
|
|
1518
|
-
const itemEls = itemsRef.current.filter(Boolean);
|
|
1519
|
-
if (["ArrowDown", "ArrowUp", "Home", "End"].includes(e.key)) {
|
|
1520
|
-
e.preventDefault();
|
|
1521
|
-
if (itemEls.length === 0) return;
|
|
1522
|
-
let nextIndex = activeIndex;
|
|
1523
|
-
if (e.key === "ArrowDown") nextIndex = (activeIndex + 1) % itemEls.length;
|
|
1524
|
-
if (e.key === "ArrowUp") nextIndex = (activeIndex - 1 + itemEls.length) % itemEls.length;
|
|
1525
|
-
if (e.key === "Home") nextIndex = 0;
|
|
1526
|
-
if (e.key === "End") nextIndex = itemEls.length - 1;
|
|
1527
|
-
setActiveIndex(nextIndex);
|
|
1528
|
-
itemEls[nextIndex]?.focus();
|
|
1529
|
-
return;
|
|
1530
|
-
}
|
|
1531
|
-
if (e.key === "Escape") {
|
|
1532
|
-
e.preventDefault();
|
|
1533
|
-
close();
|
|
1534
|
-
dropdownRef.current?.querySelector('button[data-trigger="true"]')?.focus();
|
|
1535
|
-
}
|
|
1536
|
-
if (e.key === "Tab") {
|
|
1537
|
-
e.preventDefault();
|
|
1538
|
-
const itemEls2 = itemsRef.current.filter(Boolean);
|
|
1539
|
-
if (itemEls2.length === 0) return;
|
|
1540
|
-
const dir = e.shiftKey ? -1 : 1;
|
|
1541
|
-
const nextIndex = (activeIndex + dir + itemEls2.length) % itemEls2.length;
|
|
1542
|
-
setActiveIndex(nextIndex);
|
|
1543
|
-
itemEls2[nextIndex]?.focus();
|
|
1544
|
-
}
|
|
1545
|
-
};
|
|
1546
|
-
document.addEventListener("keydown", handleKey);
|
|
1547
|
-
return () => document.removeEventListener("keydown", handleKey);
|
|
1548
|
-
}, [isOpen, activeIndex, close]);
|
|
1549
|
-
React5.useEffect(() => {
|
|
1550
|
-
if (!isOpen) return;
|
|
1551
|
-
const handleClickOutside = (event) => {
|
|
1552
|
-
if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {
|
|
1553
|
-
close();
|
|
1554
|
-
}
|
|
1555
|
-
};
|
|
1556
|
-
document.addEventListener("mousedown", handleClickOutside);
|
|
1557
|
-
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
1558
|
-
}, [isOpen, close]);
|
|
1559
|
-
React5.useLayoutEffect(() => {
|
|
1560
|
-
let raf;
|
|
1561
|
-
if (isOpen) {
|
|
1562
|
-
const itemEls = itemsRef.current.filter(Boolean);
|
|
1563
|
-
if (itemEls.length) {
|
|
1564
|
-
raf = requestAnimationFrame(() => {
|
|
1565
|
-
setActiveIndex(0);
|
|
1566
|
-
itemEls[0]?.focus();
|
|
1567
|
-
});
|
|
1568
|
-
}
|
|
1569
|
-
} else {
|
|
1570
|
-
raf = requestAnimationFrame(() => setActiveIndex(-1));
|
|
1571
|
-
}
|
|
1572
|
-
return () => {
|
|
1573
|
-
if (raf) cancelAnimationFrame(raf);
|
|
1574
|
-
};
|
|
1575
|
-
}, [isOpen]);
|
|
1576
|
-
const registerItem = React5.useCallback((el, index) => {
|
|
1577
|
-
if (typeof index === "number" && index >= 0) {
|
|
1578
|
-
itemsRef.current[index] = el;
|
|
1579
|
-
return;
|
|
1580
|
-
}
|
|
1581
|
-
if (el === null) {
|
|
1582
|
-
itemsRef.current = itemsRef.current.filter((x) => x !== el && x != null);
|
|
1583
|
-
return;
|
|
1584
|
-
}
|
|
1585
|
-
if (!itemsRef.current.includes(el)) itemsRef.current.push(el);
|
|
1586
|
-
}, []);
|
|
1587
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref: dropdownRef, className: `relative ${className}`, children: [
|
|
1588
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1589
|
-
"button",
|
|
1590
|
-
{
|
|
1591
|
-
"data-trigger": "true",
|
|
1592
|
-
onClick: () => isOpen ? close() : open(),
|
|
1593
|
-
className: "bg-transparent border-0 p-0 cursor-pointer outline-none",
|
|
1594
|
-
type: "button",
|
|
1595
|
-
"aria-expanded": isOpen,
|
|
1596
|
-
"aria-haspopup": "true",
|
|
1597
|
-
"aria-controls": isOpen ? "dropdown-menu" : void 0,
|
|
1598
|
-
children: trigger
|
|
1599
|
-
}
|
|
1600
|
-
),
|
|
1601
|
-
isOpen && /* @__PURE__ */ jsxRuntime.jsx(DropdownContext.Provider, { value: { requestClose: close, autoClose, registerItem }, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1602
|
-
"div",
|
|
1603
|
-
{
|
|
1604
|
-
id: "dropdown-menu",
|
|
1605
|
-
ref: menuRef,
|
|
1606
|
-
className: `absolute mt-2 bg-popover text-popover-foreground border border-border rounded-md shadow-lg z-50 ${size === "sm" ? "min-w-[140px] text-xs py-1" : "min-w-[180px]"} max-h-[320px] overflow-y-auto origin-top animate-scaleIn focus:outline-none ${align === "start" ? "left-0" : align === "end" ? "right-0" : "left-1/2 -translate-x-1/2"} ${className}`,
|
|
1607
|
-
role: "menu",
|
|
1608
|
-
"aria-orientation": "vertical",
|
|
1609
|
-
tabIndex: -1,
|
|
1610
|
-
children
|
|
1611
|
-
}
|
|
1612
|
-
) })
|
|
1613
|
-
] });
|
|
1614
|
-
}
|
|
1615
|
-
Dropdown.displayName = "Dropdown";
|
|
1616
|
-
var dropdown_default = Dropdown;
|
|
1617
|
-
function Breadcrumbs({ items, separator = "/", className = "" }) {
|
|
1618
|
-
return /* @__PURE__ */ jsxRuntime.jsx("nav", { "aria-label": "Breadcrumb", className, children: /* @__PURE__ */ jsxRuntime.jsx("ol", { className: "flex items-center space-x-2 text-sm", children: items.map((item, index) => {
|
|
1619
|
-
const isLast = index === items.length - 1;
|
|
1620
|
-
const key = item.href || item.label;
|
|
1621
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "flex items-center", children: [
|
|
1622
|
-
item.href && !isLast ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1623
|
-
"a",
|
|
1624
|
-
{
|
|
1625
|
-
href: item.href,
|
|
1626
|
-
className: "text-primary hover:text-primary/80 hover:underline cursor-pointer transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-ring rounded px-1 -mx-1",
|
|
1627
|
-
children: item.label
|
|
1628
|
-
}
|
|
1629
|
-
) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: isLast ? "text-foreground font-medium" : "text-muted-foreground", children: item.label }),
|
|
1630
|
-
!isLast && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "mx-2 text-muted-foreground select-none", "aria-hidden": "true", children: separator })
|
|
1631
|
-
] }, key);
|
|
1632
|
-
}) }) });
|
|
1633
|
-
}
|
|
1634
|
-
Breadcrumbs.displayName = "Breadcrumbs";
|
|
1635
|
-
var breadcrumbs_default = Breadcrumbs;
|
|
1636
|
-
function Pagination({
|
|
1637
|
-
currentPage,
|
|
1638
|
-
totalPages,
|
|
1639
|
-
onPageChange,
|
|
1640
|
-
siblingCount = 1,
|
|
1641
|
-
className = ""
|
|
1642
|
-
}) {
|
|
1643
|
-
const getPageNumbers = () => {
|
|
1644
|
-
const pages = [];
|
|
1645
|
-
const leftSibling = Math.max(currentPage - siblingCount, 1);
|
|
1646
|
-
const rightSibling = Math.min(currentPage + siblingCount, totalPages);
|
|
1647
|
-
if (leftSibling > 2) {
|
|
1648
|
-
pages.push(1, "...");
|
|
1649
|
-
} else {
|
|
1650
|
-
for (let i = 1; i < leftSibling; i++) {
|
|
1651
|
-
pages.push(i);
|
|
1652
|
-
}
|
|
1653
|
-
}
|
|
1654
|
-
for (let i = leftSibling; i <= rightSibling; i++) {
|
|
1655
|
-
pages.push(i);
|
|
1656
|
-
}
|
|
1657
|
-
if (rightSibling < totalPages - 1) {
|
|
1658
|
-
pages.push("...", totalPages);
|
|
1659
|
-
} else {
|
|
1660
|
-
for (let i = rightSibling + 1; i <= totalPages; i++) {
|
|
1661
|
-
pages.push(i);
|
|
1662
|
-
}
|
|
1663
|
-
}
|
|
1664
|
-
return pages;
|
|
1665
|
-
};
|
|
1666
|
-
return /* @__PURE__ */ jsxRuntime.jsx("nav", { "aria-label": "Pagination", className, children: /* @__PURE__ */ jsxRuntime.jsxs("ul", { className: "flex items-center space-x-1", children: [
|
|
1667
|
-
/* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1668
|
-
"button",
|
|
1669
|
-
{
|
|
1670
|
-
onClick: () => onPageChange(currentPage - 1),
|
|
1671
|
-
disabled: currentPage === 1,
|
|
1672
|
-
className: "px-3 py-2 rounded-lg border border-border hover:bg-accent hover:text-accent-foreground transition-colors duration-200 cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-ring",
|
|
1673
|
-
"aria-label": "Previous page",
|
|
1674
|
-
children: "\u2190"
|
|
1675
|
-
}
|
|
1676
|
-
) }),
|
|
1677
|
-
getPageNumbers().map((page, index) => {
|
|
1678
|
-
const key = typeof page === "number" ? `page-${page}` : `ellipsis-${index}`;
|
|
1679
|
-
return /* @__PURE__ */ jsxRuntime.jsx("li", { children: typeof page === "number" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1680
|
-
"button",
|
|
1681
|
-
{
|
|
1682
|
-
onClick: () => onPageChange(page),
|
|
1683
|
-
className: `px-3 py-2 rounded-lg border cursor-pointer transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-ring ${page === currentPage ? "bg-primary text-primary-foreground border-primary shadow-sm" : "border-border hover:bg-accent hover:text-accent-foreground hover:border-accent"}`,
|
|
1684
|
-
"aria-label": `Page ${page}`,
|
|
1685
|
-
"aria-current": page === currentPage ? "page" : void 0,
|
|
1686
|
-
children: page
|
|
1687
|
-
}
|
|
1688
|
-
) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "px-3 py-2 text-muted-foreground", children: "..." }) }, key);
|
|
1689
|
-
}),
|
|
1690
|
-
/* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1691
|
-
"button",
|
|
1692
|
-
{
|
|
1693
|
-
onClick: () => onPageChange(currentPage + 1),
|
|
1694
|
-
disabled: currentPage === totalPages,
|
|
1695
|
-
className: "px-3 py-2 rounded-lg border border-border hover:bg-accent hover:text-accent-foreground transition-colors duration-200 cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-ring",
|
|
1696
|
-
"aria-label": "Next page",
|
|
1697
|
-
children: "\u2192"
|
|
1698
|
-
}
|
|
1699
|
-
) })
|
|
1700
|
-
] }) });
|
|
1701
|
-
}
|
|
1702
|
-
Pagination.displayName = "Pagination";
|
|
1703
|
-
var pagination_default = Pagination;
|
|
1704
|
-
function Sidebar({ children, className = "", width = "16rem" }) {
|
|
1705
|
-
const widthClass = width === "16rem" ? "w-64" : width === "4rem" ? "w-16" : "";
|
|
1706
|
-
const enhancedChildren = React5__default.default.Children.map(children, (child) => {
|
|
1707
|
-
if (!React5__default.default.isValidElement(child)) return child;
|
|
1708
|
-
const childProps = child.props || {};
|
|
1709
|
-
if ("href" in childProps) {
|
|
1710
|
-
const existing = typeof childProps.className === "string" ? childProps.className : "";
|
|
1711
|
-
const sidebarItemClasses = "flex items-center w-full justify-start gap-2 px-2 py-1.5 rounded hover:bg-muted";
|
|
1712
|
-
const childInner = child.props.children;
|
|
1713
|
-
const wrappedChildren = /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex items-center gap-2", children: childInner });
|
|
1714
|
-
const newProps = {
|
|
1715
|
-
...child.props,
|
|
1716
|
-
className: `${existing} ${sidebarItemClasses}`.trim()
|
|
1717
|
-
};
|
|
1718
|
-
return React5__default.default.cloneElement(child, newProps, wrappedChildren);
|
|
1719
|
-
}
|
|
1720
|
-
return child;
|
|
1721
|
-
});
|
|
1722
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1723
|
-
"nav",
|
|
1724
|
-
{
|
|
1725
|
-
className: `
|
|
1726
|
-
${widthClass || ""}
|
|
1727
|
-
bg-card border-r border-border
|
|
1728
|
-
flex flex-col
|
|
1729
|
-
overflow-hidden
|
|
1730
|
-
${className}
|
|
1731
|
-
`.replace(/\s+/g, " "),
|
|
1732
|
-
style: !widthClass ? { width } : void 0,
|
|
1733
|
-
"aria-label": "Sidebar navigation",
|
|
1734
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 px-4 py-3 flex flex-col gap-2", children: enhancedChildren })
|
|
1735
|
-
}
|
|
1736
|
-
);
|
|
1737
|
-
}
|
|
1738
|
-
Sidebar.displayName = "Sidebar";
|
|
1739
|
-
var sidebar_default = Sidebar;
|
|
1740
|
-
function Stepper({
|
|
1741
|
-
steps,
|
|
1742
|
-
currentStep,
|
|
1743
|
-
className = "",
|
|
1744
|
-
orientation = "horizontal",
|
|
1745
|
-
onStepClick,
|
|
1746
|
-
clickable = false
|
|
1747
|
-
}) {
|
|
1748
|
-
const getStepStatus = (index) => {
|
|
1749
|
-
const step = steps[index];
|
|
1750
|
-
if (step.status) return step.status;
|
|
1751
|
-
if (index < currentStep) return "completed";
|
|
1752
|
-
if (index === currentStep) return "current";
|
|
1753
|
-
return "pending";
|
|
1754
|
-
};
|
|
1755
|
-
const renderStep = (step, index) => {
|
|
1756
|
-
const status = getStepStatus(index) || "pending";
|
|
1757
|
-
const isClickable = clickable;
|
|
1758
|
-
const statusStyles = {
|
|
1759
|
-
pending: {
|
|
1760
|
-
circle: "bg-muted text-muted-foreground border-2 border-muted",
|
|
1761
|
-
title: "text-muted-foreground",
|
|
1762
|
-
description: "text-muted-foreground"
|
|
1763
|
-
},
|
|
1764
|
-
current: {
|
|
1765
|
-
circle: "bg-primary text-primary-foreground border-2 border-primary",
|
|
1766
|
-
title: "text-foreground font-semibold",
|
|
1767
|
-
description: "text-muted-foreground"
|
|
1768
|
-
},
|
|
1769
|
-
completed: {
|
|
1770
|
-
circle: "bg-success text-success-foreground border-2 border-success",
|
|
1771
|
-
title: "text-foreground",
|
|
1772
|
-
description: "text-muted-foreground"
|
|
1773
|
-
},
|
|
1774
|
-
error: {
|
|
1775
|
-
circle: "bg-destructive text-destructive-foreground border-2 border-destructive",
|
|
1776
|
-
title: "text-destructive",
|
|
1777
|
-
description: "text-destructive"
|
|
1778
|
-
}
|
|
1779
|
-
};
|
|
1780
|
-
const styles = statusStyles[status];
|
|
1781
|
-
const handleClick = () => {
|
|
1782
|
-
if (isClickable && onStepClick) {
|
|
1783
|
-
onStepClick(index);
|
|
1784
|
-
}
|
|
1785
|
-
};
|
|
1786
|
-
const handleKeyDown = (e) => {
|
|
1787
|
-
if (isClickable && onStepClick && (e.key === "Enter" || e.key === " ")) {
|
|
1788
|
-
e.preventDefault();
|
|
1789
|
-
onStepClick(index);
|
|
1790
|
-
}
|
|
1791
|
-
};
|
|
1792
|
-
if (orientation === "horizontal") {
|
|
1793
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1794
|
-
"div",
|
|
1795
|
-
{
|
|
1796
|
-
className: `flex-1 flex flex-col items-center ${isClickable ? "cursor-pointer" : ""}`,
|
|
1797
|
-
onClick: handleClick,
|
|
1798
|
-
onKeyDown: handleKeyDown,
|
|
1799
|
-
role: isClickable ? "button" : void 0,
|
|
1800
|
-
tabIndex: isClickable ? 0 : void 0,
|
|
1801
|
-
"aria-label": `Step ${index + 1}: ${step.title}`,
|
|
1802
|
-
"aria-current": status === "current" ? "step" : void 0,
|
|
1803
|
-
children: [
|
|
1804
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex items-center w-full", children: [
|
|
1805
|
-
index > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1806
|
-
"div",
|
|
1807
|
-
{
|
|
1808
|
-
className: `h-0.5 flex-1 ${status === "completed" || status === "current" ? "bg-success" : "bg-muted"}`
|
|
1809
|
-
}
|
|
1810
|
-
),
|
|
1811
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1812
|
-
"div",
|
|
1813
|
-
{
|
|
1814
|
-
className: `
|
|
1815
|
-
relative z-10 flex items-center justify-center
|
|
1816
|
-
w-10 h-10 rounded-full
|
|
1817
|
-
transition-colors transition-[background-color,border-color] duration-300 ease-in-out
|
|
1818
|
-
${styles.circle}
|
|
1819
|
-
`,
|
|
1820
|
-
children: status === "completed" ? /* @__PURE__ */ jsxRuntime.jsx(iconsReact.IconCheck, { className: "w-5 h-5" }) : step.icon ? step.icon : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-semibold", children: index + 1 })
|
|
1821
|
-
}
|
|
1822
|
-
),
|
|
1823
|
-
index < steps.length - 1 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1824
|
-
"div",
|
|
1825
|
-
{
|
|
1826
|
-
className: `h-0.5 flex-1 transition-colors duration-300 ease-in-out ${status === "completed" ? "bg-success" : "bg-muted"}`
|
|
1827
|
-
}
|
|
1828
|
-
)
|
|
1829
|
-
] }),
|
|
1830
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: `mt-3 text-center text-sm transition-colors duration-300 ease-in-out ${styles.title}`, children: [
|
|
1831
|
-
step.title,
|
|
1832
|
-
step.optional && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-1 text-xs text-muted-foreground", children: "(Optional)" }),
|
|
1833
|
-
step.description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `text-xs mt-1 transition-colors duration-300 ease-in-out ${styles.description}`, children: step.description })
|
|
1834
|
-
] })
|
|
1835
|
-
]
|
|
1836
|
-
},
|
|
1837
|
-
index
|
|
1838
|
-
);
|
|
1839
|
-
}
|
|
1840
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1841
|
-
"div",
|
|
1842
|
-
{
|
|
1843
|
-
className: `flex gap-4 ${index < steps.length - 1 ? "pb-8" : ""} ${isClickable ? "cursor-pointer" : ""}`,
|
|
1844
|
-
onClick: handleClick,
|
|
1845
|
-
onKeyDown: handleKeyDown,
|
|
1846
|
-
role: isClickable ? "button" : void 0,
|
|
1847
|
-
tabIndex: isClickable ? 0 : void 0,
|
|
1848
|
-
"aria-label": `Step ${index + 1}: ${step.title}`,
|
|
1849
|
-
"aria-current": status === "current" ? "step" : void 0,
|
|
1850
|
-
children: [
|
|
1851
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center", children: [
|
|
1852
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1853
|
-
"div",
|
|
1854
|
-
{
|
|
1855
|
-
className: `
|
|
1856
|
-
flex items-center justify-center
|
|
1857
|
-
w-10 h-10 rounded-full flex-shrink-0
|
|
1858
|
-
transition-colors transition-[background-color,border-color] duration-300 ease-in-out
|
|
1859
|
-
${styles.circle}
|
|
1860
|
-
`,
|
|
1861
|
-
children: status === "completed" ? /* @__PURE__ */ jsxRuntime.jsx(iconsReact.IconCheck, { className: "w-5 h-5" }) : step.icon ? step.icon : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-semibold", children: index + 1 })
|
|
1862
|
-
}
|
|
1863
|
-
),
|
|
1864
|
-
index < steps.length - 1 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1865
|
-
"div",
|
|
1866
|
-
{
|
|
1867
|
-
className: `w-0.5 flex-1 mt-2 transition-colors duration-300 ease-in-out ${status === "completed" ? "bg-success" : "bg-muted"}`
|
|
1868
|
-
}
|
|
1869
|
-
)
|
|
1870
|
-
] }),
|
|
1871
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex-1 pt-2 text-base transition-colors duration-300 ease-in-out ${styles.title}`, children: [
|
|
1872
|
-
step.title,
|
|
1873
|
-
step.optional && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-2 text-xs text-muted-foreground", children: "(Optional)" }),
|
|
1874
|
-
step.description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `text-sm mt-1 transition-colors duration-300 ease-in-out ${styles.description}`, children: step.description })
|
|
1875
|
-
] })
|
|
1876
|
-
]
|
|
1877
|
-
},
|
|
1878
|
-
index
|
|
1879
|
-
);
|
|
1880
|
-
};
|
|
1881
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1882
|
-
"div",
|
|
1883
|
-
{
|
|
1884
|
-
className: `
|
|
1885
|
-
${orientation === "horizontal" ? "flex items-start" : "flex flex-col"}
|
|
1886
|
-
${className}
|
|
1887
|
-
`,
|
|
1888
|
-
children: steps.map((step, index) => renderStep(step, index))
|
|
1889
|
-
}
|
|
1890
|
-
);
|
|
1891
|
-
}
|
|
1892
|
-
Stepper.displayName = "Stepper";
|
|
1893
|
-
var stepper_default = Stepper;
|
|
1894
|
-
function Toast({ message, children, type = "info", onClose, className = "", duration = 5e3 }) {
|
|
1895
|
-
const [isClosing, setIsClosing] = React5.useState(false);
|
|
1896
|
-
const typeClasses = {
|
|
1897
|
-
info: "bg-info text-info-foreground",
|
|
1898
|
-
success: "bg-success text-success-foreground",
|
|
1899
|
-
warning: "bg-warning text-warning-foreground",
|
|
1900
|
-
error: "bg-destructive text-destructive-foreground"
|
|
1901
|
-
};
|
|
1902
|
-
const handleClose = React5.useCallback(() => {
|
|
1903
|
-
setIsClosing(true);
|
|
1904
|
-
setTimeout(() => {
|
|
1905
|
-
onClose?.();
|
|
1906
|
-
}, 300);
|
|
1907
|
-
}, [onClose]);
|
|
1908
|
-
React5.useEffect(() => {
|
|
1909
|
-
if (duration > 0) {
|
|
1910
|
-
const timer = setTimeout(() => {
|
|
1911
|
-
handleClose();
|
|
1912
|
-
}, duration);
|
|
1913
|
-
return () => clearTimeout(timer);
|
|
1914
|
-
}
|
|
1915
|
-
return void 0;
|
|
1916
|
-
}, [duration, handleClose]);
|
|
1917
|
-
const toast = /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1918
|
-
"div",
|
|
1919
|
-
{
|
|
1920
|
-
role: "alert",
|
|
1921
|
-
"aria-live": "polite",
|
|
1922
|
-
className: `fixed bottom-4 right-4 px-4 py-3 rounded-md shadow-lg z-[9999] ${typeClasses[type]} transition-all duration-300 ease-out ${isClosing ? "opacity-0 translate-x-full" : "opacity-100 translate-x-0 animate-slideInRight"} ${className}`,
|
|
1923
|
-
children: [
|
|
1924
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { children: children || message }),
|
|
1925
|
-
onClose && /* @__PURE__ */ jsxRuntime.jsx("button", { onClick: handleClose, className: "ml-4 font-bold hover:opacity-70 transition-opacity", "aria-label": "Close", children: "\xD7" })
|
|
1926
|
-
]
|
|
1927
|
-
}
|
|
1928
|
-
);
|
|
1929
|
-
return typeof document !== "undefined" ? reactDom.createPortal(toast, document.body) : toast;
|
|
1930
|
-
}
|
|
1931
|
-
Toast.displayName = "Toast";
|
|
1932
|
-
var toast_default = Toast;
|
|
1933
|
-
function Tooltip({
|
|
1934
|
-
children,
|
|
1935
|
-
content,
|
|
1936
|
-
position = "top",
|
|
1937
|
-
variant = "default",
|
|
1938
|
-
open = false,
|
|
1939
|
-
usePortal = false,
|
|
1940
|
-
className = ""
|
|
1941
|
-
}) {
|
|
1942
|
-
const [showTooltip, setShowTooltip] = React5.useState(false);
|
|
1943
|
-
const [tooltipPosition, setTooltipPosition] = React5.useState({ top: 0, left: 0 });
|
|
1944
|
-
const triggerRef = React5.useRef(null);
|
|
1945
|
-
const isVisible = open || showTooltip;
|
|
1946
|
-
React5.useEffect(() => {
|
|
1947
|
-
if (usePortal && isVisible && triggerRef.current) {
|
|
1948
|
-
const rect = triggerRef.current.getBoundingClientRect();
|
|
1949
|
-
const positions = {
|
|
1950
|
-
top: {
|
|
1951
|
-
top: rect.top - 8,
|
|
1952
|
-
left: rect.left + rect.width / 2
|
|
1953
|
-
},
|
|
1954
|
-
bottom: {
|
|
1955
|
-
top: rect.bottom + 8,
|
|
1956
|
-
left: rect.left + rect.width / 2
|
|
1957
|
-
},
|
|
1958
|
-
left: {
|
|
1959
|
-
top: rect.top + rect.height / 2,
|
|
1960
|
-
left: rect.left - 8
|
|
1961
|
-
},
|
|
1962
|
-
right: {
|
|
1963
|
-
top: rect.top + rect.height / 2,
|
|
1964
|
-
left: rect.right + 8
|
|
1965
|
-
}
|
|
1966
|
-
};
|
|
1967
|
-
setTooltipPosition(positions[position]);
|
|
1968
|
-
}
|
|
1969
|
-
}, [usePortal, isVisible, position]);
|
|
1970
|
-
const variantClasses = {
|
|
1971
|
-
default: "bg-popover text-popover-foreground",
|
|
1972
|
-
primary: "bg-primary text-primary-foreground",
|
|
1973
|
-
secondary: "bg-secondary text-secondary-foreground",
|
|
1974
|
-
accent: "bg-accent text-accent-foreground",
|
|
1975
|
-
info: "bg-blue-500 text-white",
|
|
1976
|
-
success: "bg-green-500 text-white",
|
|
1977
|
-
warning: "bg-yellow-500 text-foreground",
|
|
1978
|
-
error: "bg-red-500 text-white",
|
|
1979
|
-
neutral: "bg-muted text-muted-foreground"
|
|
1980
|
-
};
|
|
1981
|
-
const arrowColorClasses = {
|
|
1982
|
-
default: "before:border-popover",
|
|
1983
|
-
primary: "before:border-primary",
|
|
1984
|
-
secondary: "before:border-secondary",
|
|
1985
|
-
accent: "before:border-accent",
|
|
1986
|
-
info: "before:border-blue-500",
|
|
1987
|
-
success: "before:border-green-500",
|
|
1988
|
-
warning: "before:border-yellow-500",
|
|
1989
|
-
error: "before:border-red-500",
|
|
1990
|
-
neutral: "before:border-muted"
|
|
1991
|
-
};
|
|
1992
|
-
const portalPositionClasses = {
|
|
1993
|
-
top: "-translate-x-1/2 -translate-y-full before:left-1/2 before:-translate-x-1/2 before:top-full before:border-l-transparent before:border-r-transparent before:border-b-transparent",
|
|
1994
|
-
bottom: "-translate-x-1/2 before:left-1/2 before:-translate-x-1/2 before:bottom-full before:border-l-transparent before:border-r-transparent before:border-t-transparent",
|
|
1995
|
-
left: "-translate-x-full -translate-y-1/2 before:left-full before:top-1/2 before:-translate-y-1/2 before:border-t-transparent before:border-b-transparent before:border-r-transparent",
|
|
1996
|
-
right: "-translate-y-1/2 before:left-full before:top-1/2 before:-translate-y-1/2 before:border-t-transparent before:border-b-transparent before:border-r-transparent"
|
|
1997
|
-
};
|
|
1998
|
-
const absolutePositionClasses = {
|
|
1999
|
-
top: "bottom-full left-1/2 -translate-x-1/2 mb-2 before:left-1/2 before:-translate-x-1/2 before:top-full before:border-l-transparent before:border-r-transparent before:border-b-transparent",
|
|
2000
|
-
bottom: "top-full left-1/2 -translate-x-1/2 mt-2 before:left-1/2 before:-translate-x-1/2 before:bottom-full before:border-l-transparent before:border-r-transparent before:border-t-transparent",
|
|
2001
|
-
left: "right-full top-1/2 -translate-y-1/2 mr-2 before:top-1/2 before:-translate-y-1/2 before:left-full before:border-t-transparent before:border-b-transparent before:border-r-transparent",
|
|
2002
|
-
right: "left-full top-1/2 -translate-y-1/2 ml-2 before:top-1/2 before:-translate-y-1/2 before:left-full before:border-t-transparent before:border-b-transparent before:border-r-transparent"
|
|
2003
|
-
};
|
|
2004
|
-
const positionClasses = usePortal ? portalPositionClasses : absolutePositionClasses;
|
|
2005
|
-
const tooltipContent = /* @__PURE__ */ jsxRuntime.jsx(
|
|
2006
|
-
"span",
|
|
2007
|
-
{
|
|
2008
|
-
className: `
|
|
2009
|
-
${usePortal ? "fixed" : "absolute"}
|
|
2010
|
-
z-[9999]
|
|
2011
|
-
px-3 py-2
|
|
2012
|
-
text-sm font-medium
|
|
2013
|
-
rounded-lg
|
|
2014
|
-
shadow-lg
|
|
2015
|
-
whitespace-nowrap
|
|
2016
|
-
pointer-events-none
|
|
2017
|
-
transition-opacity duration-200
|
|
2018
|
-
${variantClasses[variant]}
|
|
2019
|
-
${positionClasses[position]}
|
|
2020
|
-
${arrowColorClasses[variant]}
|
|
2021
|
-
${isVisible ? "opacity-100 visible" : "opacity-0 invisible"}
|
|
2022
|
-
before:content-['']
|
|
2023
|
-
before:absolute
|
|
2024
|
-
before:border-4
|
|
2025
|
-
before:border-solid
|
|
2026
|
-
`,
|
|
2027
|
-
style: usePortal ? {
|
|
2028
|
-
top: `${tooltipPosition.top}px`,
|
|
2029
|
-
left: `${tooltipPosition.left}px`
|
|
2030
|
-
} : void 0,
|
|
2031
|
-
role: "tooltip",
|
|
2032
|
-
"aria-hidden": !isVisible,
|
|
2033
|
-
children: content
|
|
2034
|
-
}
|
|
2035
|
-
);
|
|
2036
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2037
|
-
"span",
|
|
2038
|
-
{
|
|
2039
|
-
ref: triggerRef,
|
|
2040
|
-
className: `group relative inline-flex ${usePortal ? "" : "w-full"} ${className}`,
|
|
2041
|
-
"data-position": position,
|
|
2042
|
-
onMouseEnter: () => !open && setShowTooltip(true),
|
|
2043
|
-
onMouseLeave: () => !open && setShowTooltip(false),
|
|
2044
|
-
onFocus: () => !open && setShowTooltip(true),
|
|
2045
|
-
onBlur: () => !open && setShowTooltip(false),
|
|
2046
|
-
children: [
|
|
2047
|
-
children,
|
|
2048
|
-
usePortal && isVisible ? reactDom.createPortal(tooltipContent, document.body) : !usePortal && tooltipContent
|
|
2049
|
-
]
|
|
2050
|
-
}
|
|
2051
|
-
);
|
|
2052
|
-
}
|
|
2053
|
-
Tooltip.displayName = "Tooltip";
|
|
2054
|
-
var tooltip_default = Tooltip;
|
|
2055
|
-
|
|
2056
|
-
// src/utils/portal.ts
|
|
2057
|
-
function getPortalRoot(id = "hydn-ui-portal") {
|
|
2058
|
-
if (typeof document === "undefined") return null;
|
|
2059
|
-
let root = document.getElementById(id);
|
|
2060
|
-
if (!root) {
|
|
2061
|
-
root = document.createElement("div");
|
|
2062
|
-
root.id = id;
|
|
2063
|
-
document.body.appendChild(root);
|
|
2064
|
-
}
|
|
2065
|
-
return root;
|
|
2066
|
-
}
|
|
2067
|
-
var portal_default = getPortalRoot;
|
|
2068
|
-
function useOverlay(options) {
|
|
2069
|
-
const {
|
|
2070
|
-
isOpen,
|
|
2071
|
-
focusTrap = true,
|
|
2072
|
-
lockScroll = true,
|
|
2073
|
-
animationFrames = 2,
|
|
2074
|
-
restoreFocus = true,
|
|
2075
|
-
exitDuration = 300,
|
|
2076
|
-
unmountOnExit = true
|
|
2077
|
-
} = options;
|
|
2078
|
-
const previouslyFocusedRef = React5.useRef(null);
|
|
2079
|
-
const containerRef = React5.useRef(null);
|
|
2080
|
-
const [shouldRender, setShouldRender] = React5.useState(isOpen);
|
|
2081
|
-
const [phase, setPhase] = React5.useState("mount");
|
|
2082
|
-
React5.useLayoutEffect(() => {
|
|
2083
|
-
if (isOpen && !shouldRender) {
|
|
2084
|
-
setShouldRender(true);
|
|
2085
|
-
setPhase("mount");
|
|
2086
|
-
} else if (isOpen && shouldRender && phase === "mount") {
|
|
2087
|
-
requestAnimationFrame(() => {
|
|
2088
|
-
setPhase("animating-in");
|
|
2089
|
-
let frame = 0;
|
|
2090
|
-
const step = () => {
|
|
2091
|
-
frame += 1;
|
|
2092
|
-
if (frame >= animationFrames) {
|
|
2093
|
-
setPhase("visible");
|
|
2094
|
-
} else {
|
|
2095
|
-
requestAnimationFrame(step);
|
|
2096
|
-
}
|
|
2097
|
-
};
|
|
2098
|
-
if (animationFrames > 0) {
|
|
2099
|
-
requestAnimationFrame(step);
|
|
2100
|
-
} else {
|
|
2101
|
-
setPhase("visible");
|
|
2102
|
-
}
|
|
2103
|
-
});
|
|
2104
|
-
} else if (!isOpen && shouldRender && phase !== "animating-out") {
|
|
2105
|
-
setPhase("animating-out");
|
|
2106
|
-
}
|
|
2107
|
-
}, [isOpen, shouldRender, phase, animationFrames]);
|
|
2108
|
-
React5.useEffect(() => {
|
|
2109
|
-
if (phase === "animating-out" && unmountOnExit) {
|
|
2110
|
-
const timeout = setTimeout(() => {
|
|
2111
|
-
setShouldRender(false);
|
|
2112
|
-
setPhase("mount");
|
|
2113
|
-
}, exitDuration);
|
|
2114
|
-
return () => clearTimeout(timeout);
|
|
2115
|
-
}
|
|
2116
|
-
return void 0;
|
|
2117
|
-
}, [phase, exitDuration, unmountOnExit]);
|
|
2118
|
-
React5.useEffect(() => {
|
|
2119
|
-
if (isOpen) {
|
|
2120
|
-
if (typeof document !== "undefined") {
|
|
2121
|
-
if (restoreFocus) previouslyFocusedRef.current = document.activeElement;
|
|
2122
|
-
if (lockScroll) document.body.style.overflow = "hidden";
|
|
2123
|
-
}
|
|
2124
|
-
}
|
|
2125
|
-
return () => {
|
|
2126
|
-
if (typeof document !== "undefined") {
|
|
2127
|
-
if (lockScroll) document.body.style.overflow = "";
|
|
2128
|
-
if (!isOpen && restoreFocus && previouslyFocusedRef.current) {
|
|
2129
|
-
previouslyFocusedRef.current.focus();
|
|
2130
|
-
}
|
|
2131
|
-
}
|
|
2132
|
-
};
|
|
2133
|
-
}, [isOpen, lockScroll, restoreFocus]);
|
|
2134
|
-
React5.useEffect(() => {
|
|
2135
|
-
if (phase === "visible" && containerRef.current) {
|
|
2136
|
-
const el = containerRef.current;
|
|
2137
|
-
try {
|
|
2138
|
-
el.focus?.({ preventScroll: true });
|
|
2139
|
-
} catch {
|
|
2140
|
-
el.focus?.();
|
|
2141
|
-
}
|
|
2142
|
-
}
|
|
2143
|
-
}, [phase]);
|
|
2144
|
-
const handleKeyDown = React5.useCallback(
|
|
2145
|
-
(e) => {
|
|
2146
|
-
if (!focusTrap || phase !== "visible" || e.key !== "Tab" || !containerRef.current) return;
|
|
2147
|
-
const node = containerRef.current;
|
|
2148
|
-
const focusable = node.querySelectorAll(
|
|
2149
|
-
'a[href], button:not([disabled]), textarea, input, select, [tabindex]:not([tabindex="-1"])'
|
|
2150
|
-
);
|
|
2151
|
-
if (!focusable.length) return;
|
|
2152
|
-
const first = focusable[0];
|
|
2153
|
-
const last = focusable[focusable.length - 1];
|
|
2154
|
-
if (e.shiftKey) {
|
|
2155
|
-
if (document.activeElement === first || document.activeElement === node) {
|
|
2156
|
-
e.preventDefault();
|
|
2157
|
-
last.focus();
|
|
2158
|
-
}
|
|
2159
|
-
} else if (document.activeElement === last) {
|
|
2160
|
-
e.preventDefault();
|
|
2161
|
-
first.focus();
|
|
2162
|
-
}
|
|
2163
|
-
},
|
|
2164
|
-
[focusTrap, phase]
|
|
2165
|
-
);
|
|
2166
|
-
React5.useEffect(() => {
|
|
2167
|
-
if (focusTrap && phase === "visible") {
|
|
2168
|
-
document.addEventListener("keydown", handleKeyDown);
|
|
2169
|
-
return () => document.removeEventListener("keydown", handleKeyDown);
|
|
2170
|
-
}
|
|
2171
|
-
return void 0;
|
|
2172
|
-
}, [phase, focusTrap, handleKeyDown]);
|
|
2173
|
-
const getPhaseClass = React5.useCallback(
|
|
2174
|
-
(openClass, closedClass) => {
|
|
2175
|
-
return phase === "animating-in" || phase === "visible" ? openClass : closedClass;
|
|
2176
|
-
},
|
|
2177
|
-
[phase]
|
|
2178
|
-
);
|
|
2179
|
-
return { phase, shouldRender, ref: containerRef, getPhaseClass };
|
|
2180
|
-
}
|
|
2181
|
-
var useOverlay_default = useOverlay;
|
|
2182
|
-
function Modal({
|
|
2183
|
-
isOpen,
|
|
2184
|
-
onClose,
|
|
2185
|
-
children,
|
|
2186
|
-
title,
|
|
2187
|
-
description,
|
|
2188
|
-
content,
|
|
2189
|
-
actions,
|
|
2190
|
-
className = "",
|
|
2191
|
-
ariaLabel,
|
|
2192
|
-
align = "center",
|
|
2193
|
-
portalRoot = portal_default()
|
|
2194
|
-
}) {
|
|
2195
|
-
const {
|
|
2196
|
-
phase,
|
|
2197
|
-
shouldRender,
|
|
2198
|
-
ref: dialogRef,
|
|
2199
|
-
getPhaseClass
|
|
2200
|
-
} = useOverlay_default({
|
|
2201
|
-
isOpen,
|
|
2202
|
-
focusTrap: true,
|
|
2203
|
-
lockScroll: true,
|
|
2204
|
-
animationFrames: 2,
|
|
2205
|
-
restoreFocus: true
|
|
2206
|
-
});
|
|
2207
|
-
React5__default.default.useEffect(() => {
|
|
2208
|
-
if (!isOpen) return;
|
|
2209
|
-
const handleEscape = (e) => {
|
|
2210
|
-
if (e.key === "Escape") {
|
|
2211
|
-
e.preventDefault();
|
|
2212
|
-
onClose();
|
|
2213
|
-
}
|
|
2214
|
-
};
|
|
2215
|
-
document.addEventListener("keydown", handleEscape);
|
|
2216
|
-
return () => document.removeEventListener("keydown", handleEscape);
|
|
2217
|
-
}, [isOpen, onClose]);
|
|
2218
|
-
if (!shouldRender) return null;
|
|
2219
|
-
const enteringClasses = "scale-100 translate-y-0 opacity-100";
|
|
2220
|
-
const exitingClasses = "scale-[0.97] -translate-y-1 opacity-0";
|
|
2221
|
-
const scaleClass = getPhaseClass(enteringClasses, exitingClasses);
|
|
2222
|
-
const backdropOpacity = phase === "visible" || phase === "animating-in" ? "opacity-100" : "opacity-0 transition-opacity delay-50";
|
|
2223
|
-
const hasStructured = title || description || content || actions;
|
|
2224
|
-
const alignmentClasses = align === "center" ? "grid place-items-center" : "flex items-start justify-center pt-20";
|
|
2225
|
-
const panel = /* @__PURE__ */ jsxRuntime.jsx(
|
|
2226
|
-
"div",
|
|
2227
|
-
{
|
|
2228
|
-
"data-phase": phase,
|
|
2229
|
-
className: `fixed inset-0 z-[999] ${alignmentClasses} bg-black/40 backdrop-blur-sm p-4 overflow-y-auto overscroll-contain transition-opacity duration-300 will-change-opacity ${backdropOpacity}`,
|
|
2230
|
-
onMouseDown: (e) => {
|
|
2231
|
-
if (e.target === e.currentTarget) onClose();
|
|
2232
|
-
},
|
|
2233
|
-
"aria-label": ariaLabel || "Close modal",
|
|
2234
|
-
role: "presentation",
|
|
2235
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2236
|
-
"div",
|
|
2237
|
-
{
|
|
2238
|
-
ref: dialogRef,
|
|
2239
|
-
"data-phase": phase,
|
|
2240
|
-
className: `relative w-11/12 max-w-2xl max-h-[calc(100vh-5em)] bg-card text-card-foreground rounded-2xl border border-border shadow-2xl p-6 focus:outline-none transform transition-[transform,opacity] duration-250 ease-[cubic-bezier(.33,.66,.33,1)] will-change-transform will-change-opacity select-none [backface-visibility:hidden] [transform-style:preserve-3d] ${scaleClass} ${className}`,
|
|
2241
|
-
role: "dialog",
|
|
2242
|
-
"aria-modal": "true",
|
|
2243
|
-
tabIndex: -1,
|
|
2244
|
-
onTransitionEnd: (e) => {
|
|
2245
|
-
if (e.target !== dialogRef.current) return;
|
|
2246
|
-
},
|
|
2247
|
-
children: hasStructured ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
2248
|
-
title && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
2249
|
-
typeof title === "string" ? /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-xl font-semibold tracking-tight", children: title }) : title,
|
|
2250
|
-
description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-sm text-muted-foreground", children: description })
|
|
2251
|
-
] }),
|
|
2252
|
-
content && /* @__PURE__ */ jsxRuntime.jsx("section", { className: "text-sm leading-relaxed space-y-3 mt-4", children: content }),
|
|
2253
|
-
actions && /* @__PURE__ */ jsxRuntime.jsx("footer", { className: "flex justify-end gap-2 pt-2 mt-4 border-t border-border/60", children: actions })
|
|
2254
|
-
] }) : children
|
|
2255
|
-
}
|
|
2256
|
-
)
|
|
2257
|
-
}
|
|
2258
|
-
);
|
|
2259
|
-
return portalRoot ? reactDom.createPortal(panel, portalRoot) : panel;
|
|
2260
|
-
}
|
|
2261
|
-
Modal.displayName = "Modal";
|
|
2262
|
-
var modal_default = Modal;
|
|
2263
|
-
function Dialog({ isOpen, onClose, title, children, actions, className = "" }) {
|
|
2264
|
-
return /* @__PURE__ */ jsxRuntime.jsx(modal_default, { isOpen, onClose, ariaLabel: title, className, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col p-6 gap-4", children: [
|
|
2265
|
-
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-2xl font-bold text-foreground", children: title }),
|
|
2266
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-foreground", children }),
|
|
2267
|
-
actions && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-end gap-3 pt-2", children: actions })
|
|
2268
|
-
] }) });
|
|
2269
|
-
}
|
|
2270
|
-
Dialog.displayName = "Dialog";
|
|
2271
|
-
var dialog_default = Dialog;
|
|
2272
|
-
function DeleteDialog({
|
|
2273
|
-
isOpen,
|
|
2274
|
-
onClose,
|
|
2275
|
-
onConfirm,
|
|
2276
|
-
title = "Confirm Deletion",
|
|
2277
|
-
description,
|
|
2278
|
-
itemName,
|
|
2279
|
-
isLoading = false,
|
|
2280
|
-
confirmText = "Delete",
|
|
2281
|
-
cancelText = "Cancel",
|
|
2282
|
-
className = ""
|
|
2283
|
-
}) {
|
|
2284
|
-
const defaultDescription = itemName ? `Are you sure you want to delete "${itemName}"? This action cannot be undone.` : "Are you sure you want to delete this item? This action cannot be undone.";
|
|
2285
|
-
const finalDescription = description || defaultDescription;
|
|
2286
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2287
|
-
dialog_default,
|
|
2288
|
-
{
|
|
2289
|
-
isOpen,
|
|
2290
|
-
onClose,
|
|
2291
|
-
title,
|
|
2292
|
-
className,
|
|
2293
|
-
actions: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
2294
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2295
|
-
button_default,
|
|
2296
|
-
{
|
|
2297
|
-
onClick: onClose,
|
|
2298
|
-
disabled: isLoading,
|
|
2299
|
-
className: "bg-muted hover:bg-muted/80 text-muted-foreground",
|
|
2300
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(iconsReact.IconX, { size: 16 }),
|
|
2301
|
-
children: cancelText
|
|
2302
|
-
}
|
|
2303
|
-
),
|
|
2304
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2305
|
-
button_default,
|
|
2306
|
-
{
|
|
2307
|
-
onClick: onConfirm,
|
|
2308
|
-
disabled: isLoading,
|
|
2309
|
-
className: "bg-destructive hover:bg-destructive/90 text-destructive-foreground",
|
|
2310
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(iconsReact.IconTrash, { size: 16 }),
|
|
2311
|
-
children: isLoading ? "Deleting..." : confirmText
|
|
2312
|
-
}
|
|
2313
|
-
)
|
|
2314
|
-
] }),
|
|
2315
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-foreground", children: finalDescription })
|
|
2316
|
-
}
|
|
2317
|
-
);
|
|
2318
|
-
}
|
|
2319
|
-
DeleteDialog.displayName = "DeleteDialog";
|
|
2320
|
-
var delete_dialog_default = DeleteDialog;
|
|
2321
|
-
function Popover({ trigger, children, content, position = "bottom", className = "" }) {
|
|
2322
|
-
const [isOpen, setIsOpen] = React5.useState(false);
|
|
2323
|
-
const popoverRef = React5.useRef(null);
|
|
2324
|
-
const triggerContent = children || trigger;
|
|
2325
|
-
React5.useEffect(() => {
|
|
2326
|
-
const handleClickOutside = (event) => {
|
|
2327
|
-
if (popoverRef.current && !popoverRef.current.contains(event.target)) {
|
|
2328
|
-
setIsOpen(false);
|
|
2329
|
-
}
|
|
2330
|
-
};
|
|
2331
|
-
const handleEscape = (event) => {
|
|
2332
|
-
if (event.key === "Escape") {
|
|
2333
|
-
setIsOpen(false);
|
|
2334
|
-
}
|
|
2335
|
-
};
|
|
2336
|
-
if (isOpen) {
|
|
2337
|
-
document.addEventListener("mousedown", handleClickOutside);
|
|
2338
|
-
document.addEventListener("keydown", handleEscape);
|
|
2339
|
-
return () => {
|
|
2340
|
-
document.removeEventListener("mousedown", handleClickOutside);
|
|
2341
|
-
document.removeEventListener("keydown", handleEscape);
|
|
2342
|
-
};
|
|
2343
|
-
}
|
|
2344
|
-
return void 0;
|
|
2345
|
-
}, [isOpen]);
|
|
2346
|
-
const positionClasses = {
|
|
2347
|
-
top: "bottom-full left-1/2 -translate-x-1/2 mb-2",
|
|
2348
|
-
bottom: "top-full left-1/2 -translate-x-1/2 mt-2",
|
|
2349
|
-
left: "right-full top-1/2 -translate-y-1/2 mr-2",
|
|
2350
|
-
right: "left-full top-1/2 -translate-y-1/2 ml-2"
|
|
2351
|
-
};
|
|
2352
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `relative inline-block ${className}`, ref: popoverRef, children: [
|
|
2353
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2354
|
-
"button",
|
|
2355
|
-
{
|
|
2356
|
-
onClick: () => setIsOpen(!isOpen),
|
|
2357
|
-
className: "bg-transparent border-0 p-0 cursor-pointer",
|
|
2358
|
-
type: "button",
|
|
2359
|
-
"aria-expanded": isOpen,
|
|
2360
|
-
"aria-haspopup": "true",
|
|
2361
|
-
children: triggerContent
|
|
2362
|
-
}
|
|
2363
|
-
),
|
|
2364
|
-
isOpen && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2365
|
-
"div",
|
|
2366
|
-
{
|
|
2367
|
-
className: `absolute min-w-[200px] bg-popover text-popover-foreground border border-border rounded-lg shadow-xl p-4 z-50 animate-scaleIn ${positionClasses[position]}`,
|
|
2368
|
-
role: "tooltip",
|
|
2369
|
-
children: content
|
|
2370
|
-
}
|
|
2371
|
-
)
|
|
2372
|
-
] });
|
|
2373
|
-
}
|
|
2374
|
-
Popover.displayName = "Popover";
|
|
2375
|
-
var popover_default = Popover;
|
|
2376
|
-
function Alert({ children, type = "info", dismissible = false, onClose, className = "", position = "relative", duration = 0 }) {
|
|
2377
|
-
const [isClosing, setIsClosing] = React5.useState(false);
|
|
2378
|
-
const typeClasses = {
|
|
2379
|
-
info: "bg-info/20 text-foreground border-info/50 backdrop-blur-sm",
|
|
2380
|
-
success: "bg-success/20 text-foreground border-success/50 backdrop-blur-sm",
|
|
2381
|
-
warning: "bg-warning/20 text-foreground border-warning/50 backdrop-blur-sm",
|
|
2382
|
-
error: "bg-destructive/20 text-foreground border-destructive/50 backdrop-blur-sm"
|
|
2383
|
-
};
|
|
2384
|
-
const iconClasses = {
|
|
2385
|
-
info: "text-info",
|
|
2386
|
-
success: "text-success",
|
|
2387
|
-
warning: "text-warning",
|
|
2388
|
-
error: "text-destructive"
|
|
2389
|
-
};
|
|
2390
|
-
const handleClose = React5.useCallback(() => {
|
|
2391
|
-
setIsClosing(true);
|
|
2392
|
-
setTimeout(() => {
|
|
2393
|
-
onClose?.();
|
|
2394
|
-
}, 300);
|
|
2395
|
-
}, [onClose]);
|
|
2396
|
-
React5.useEffect(() => {
|
|
2397
|
-
if (duration > 0 && onClose) {
|
|
2398
|
-
const timer = setTimeout(() => {
|
|
2399
|
-
handleClose();
|
|
2400
|
-
}, duration);
|
|
2401
|
-
return () => clearTimeout(timer);
|
|
2402
|
-
}
|
|
2403
|
-
return void 0;
|
|
2404
|
-
}, [duration, onClose, handleClose]);
|
|
2405
|
-
const icons = {
|
|
2406
|
-
info: /* @__PURE__ */ jsxRuntime.jsx("svg", { className: "w-5 h-5 flex-shrink-0", fill: "currentColor", viewBox: "0 0 20 20", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2407
|
-
"path",
|
|
2408
|
-
{
|
|
2409
|
-
fillRule: "evenodd",
|
|
2410
|
-
d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z",
|
|
2411
|
-
clipRule: "evenodd"
|
|
2412
|
-
}
|
|
2413
|
-
) }),
|
|
2414
|
-
success: /* @__PURE__ */ jsxRuntime.jsx("svg", { className: "w-5 h-5 flex-shrink-0", fill: "currentColor", viewBox: "0 0 20 20", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2415
|
-
"path",
|
|
2416
|
-
{
|
|
2417
|
-
fillRule: "evenodd",
|
|
2418
|
-
d: "M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",
|
|
2419
|
-
clipRule: "evenodd"
|
|
2420
|
-
}
|
|
2421
|
-
) }),
|
|
2422
|
-
warning: /* @__PURE__ */ jsxRuntime.jsx("svg", { className: "w-5 h-5 flex-shrink-0", fill: "currentColor", viewBox: "0 0 20 20", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2423
|
-
"path",
|
|
2424
|
-
{
|
|
2425
|
-
fillRule: "evenodd",
|
|
2426
|
-
d: "M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z",
|
|
2427
|
-
clipRule: "evenodd"
|
|
2428
|
-
}
|
|
2429
|
-
) }),
|
|
2430
|
-
error: /* @__PURE__ */ jsxRuntime.jsx("svg", { className: "w-5 h-5 flex-shrink-0", fill: "currentColor", viewBox: "0 0 20 20", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2431
|
-
"path",
|
|
2432
|
-
{
|
|
2433
|
-
fillRule: "evenodd",
|
|
2434
|
-
d: "M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",
|
|
2435
|
-
clipRule: "evenodd"
|
|
2436
|
-
}
|
|
2437
|
-
) })
|
|
2438
|
-
};
|
|
2439
|
-
const positionClasses = {
|
|
2440
|
-
top: "fixed top-4 left-1/2 -translate-x-1/2 z-[9999] max-w-2xl w-full mx-4",
|
|
2441
|
-
bottom: "fixed bottom-4 left-1/2 -translate-x-1/2 z-[9999] max-w-2xl w-full mx-4",
|
|
2442
|
-
relative: ""
|
|
2443
|
-
};
|
|
2444
|
-
const getAnimationClasses = () => {
|
|
2445
|
-
if (position === "top") {
|
|
2446
|
-
return isClosing ? "opacity-0 -translate-y-full" : "opacity-100 translate-y-0 animate-slideInTop";
|
|
2447
|
-
}
|
|
2448
|
-
if (position === "bottom") {
|
|
2449
|
-
return isClosing ? "opacity-0 translate-y-full" : "opacity-100 translate-y-0 animate-slideInBottom";
|
|
2450
|
-
}
|
|
2451
|
-
return isClosing ? "opacity-0" : "opacity-100";
|
|
2452
|
-
};
|
|
2453
|
-
const alertContent = /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2454
|
-
"div",
|
|
2455
|
-
{
|
|
2456
|
-
role: "alert",
|
|
2457
|
-
className: `p-4 border rounded-lg flex items-start gap-3 transition-all duration-300 ease-out ${typeClasses[type]} ${positionClasses[position]} ${getAnimationClasses()} ${className}`,
|
|
2458
|
-
children: [
|
|
2459
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: iconClasses[type], children: icons[type] }),
|
|
2460
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-1 text-sm", children }),
|
|
2461
|
-
dismissible && onClose && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2462
|
-
"button",
|
|
2463
|
-
{
|
|
2464
|
-
onClick: handleClose,
|
|
2465
|
-
className: "flex-shrink-0 text-current opacity-70 hover:opacity-100 transition-opacity focus:outline-none focus:ring-2 focus:ring-ring rounded p-0.5",
|
|
2466
|
-
"aria-label": "Close alert",
|
|
2467
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("svg", { className: "w-5 h-5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) })
|
|
2468
|
-
}
|
|
2469
|
-
)
|
|
2470
|
-
]
|
|
2471
|
-
}
|
|
2472
|
-
);
|
|
2473
|
-
if (position !== "relative" && typeof document !== "undefined") {
|
|
2474
|
-
return reactDom.createPortal(alertContent, document.body);
|
|
2475
|
-
}
|
|
2476
|
-
return alertContent;
|
|
2477
|
-
}
|
|
2478
|
-
Alert.displayName = "Alert";
|
|
2479
|
-
var alert_default = Alert;
|
|
2480
|
-
function Spinner({ size = "md", variant = "primary", className = "", speed, ...props }) {
|
|
2481
|
-
const sizeClasses = {
|
|
2482
|
-
sm: "w-4 h-4 border-2",
|
|
2483
|
-
md: "w-8 h-8 border-2",
|
|
2484
|
-
lg: "w-12 h-12 border-4"
|
|
2485
|
-
};
|
|
2486
|
-
const variantTopBorder = {
|
|
2487
|
-
primary: "border-t-primary",
|
|
2488
|
-
accent: "border-t-accent",
|
|
2489
|
-
secondary: "border-t-secondary",
|
|
2490
|
-
neutral: "border-t-neutral"
|
|
2491
|
-
}[variant];
|
|
2492
|
-
const duration = speed ? `[animation-duration:${speed}]` : "";
|
|
2493
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2494
|
-
"div",
|
|
2495
|
-
{
|
|
2496
|
-
role: "status",
|
|
2497
|
-
"aria-label": "Loading",
|
|
2498
|
-
"data-variant": variant,
|
|
2499
|
-
className: `inline-block border-muted ${variantTopBorder} rounded-full animate-spin ${duration} ${sizeClasses[size]} ${className}`,
|
|
2500
|
-
...props,
|
|
2501
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Loading..." })
|
|
2502
|
-
}
|
|
2503
|
-
);
|
|
2504
|
-
}
|
|
2505
|
-
Spinner.displayName = "Spinner";
|
|
2506
|
-
var spinner_default = Spinner;
|
|
2507
|
-
function ProgressBar({
|
|
2508
|
-
value,
|
|
2509
|
-
max = 100,
|
|
2510
|
-
showLabel = false,
|
|
2511
|
-
variant = "default",
|
|
2512
|
-
className = ""
|
|
2513
|
-
}) {
|
|
2514
|
-
const percentage = Math.min(value / max * 100, 100);
|
|
2515
|
-
const variantClasses = {
|
|
2516
|
-
default: "bg-primary",
|
|
2517
|
-
success: "bg-success",
|
|
2518
|
-
warning: "bg-warning",
|
|
2519
|
-
error: "bg-destructive"
|
|
2520
|
-
};
|
|
2521
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className, children: [
|
|
2522
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full bg-muted/30 rounded-full h-2.5 overflow-hidden shadow-inner", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2523
|
-
"div",
|
|
2524
|
-
{
|
|
2525
|
-
role: "progressbar",
|
|
2526
|
-
"aria-valuenow": value,
|
|
2527
|
-
"aria-valuemin": 0,
|
|
2528
|
-
"aria-valuemax": max,
|
|
2529
|
-
className: `h-full transition-all duration-500 ease-out rounded-full ${variantClasses[variant]}`,
|
|
2530
|
-
style: { width: `${percentage}%` }
|
|
2531
|
-
}
|
|
2532
|
-
) }),
|
|
2533
|
-
showLabel && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-sm text-muted-foreground mt-2 text-right font-medium", children: [
|
|
2534
|
-
Math.round(percentage),
|
|
2535
|
-
"%"
|
|
2536
|
-
] })
|
|
2537
|
-
] });
|
|
2538
|
-
}
|
|
2539
|
-
ProgressBar.displayName = "ProgressBar";
|
|
2540
|
-
var progress_bar_default = ProgressBar;
|
|
2541
|
-
function Skeleton({ variant = "text", width, height, className = "", ...props }) {
|
|
2542
|
-
const variantClasses = {
|
|
2543
|
-
text: "rounded h-4",
|
|
2544
|
-
circular: "rounded-full",
|
|
2545
|
-
rectangular: "rounded-md"
|
|
2546
|
-
};
|
|
2547
|
-
const style = {
|
|
2548
|
-
width: width || (variant === "circular" ? "40px" : "100%"),
|
|
2549
|
-
height: height || (variant === "circular" ? "40px" : void 0)
|
|
2550
|
-
};
|
|
2551
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2552
|
-
"div",
|
|
2553
|
-
{
|
|
2554
|
-
className: `bg-muted animate-pulse ${variantClasses[variant]} ${className}`,
|
|
2555
|
-
style,
|
|
2556
|
-
"aria-busy": "true",
|
|
2557
|
-
"aria-live": "polite",
|
|
2558
|
-
...props,
|
|
2559
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Loading..." })
|
|
2560
|
-
}
|
|
2561
|
-
);
|
|
2562
|
-
}
|
|
2563
|
-
Skeleton.displayName = "Skeleton";
|
|
2564
|
-
var skeleton_default = Skeleton;
|
|
2565
|
-
function Badge({ children, variant = "default", size = "md", className = "", ...props }) {
|
|
2566
|
-
const variantClasses = {
|
|
2567
|
-
default: "bg-muted text-muted-foreground border border-border",
|
|
2568
|
-
primary: "bg-primary/10 text-primary border border-primary/20",
|
|
2569
|
-
success: "bg-success/10 text-success border border-success/20",
|
|
2570
|
-
warning: "bg-warning/10 text-warning border border-warning/20",
|
|
2571
|
-
error: "bg-destructive/10 text-destructive border border-destructive/20"
|
|
2572
|
-
};
|
|
2573
|
-
const sizeClasses = {
|
|
2574
|
-
sm: "px-2 py-0.5 text-xs",
|
|
2575
|
-
md: "px-2.5 py-0.5 text-xs font-semibold",
|
|
2576
|
-
lg: "px-3 py-1 text-sm font-semibold"
|
|
2577
|
-
};
|
|
2578
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2579
|
-
"span",
|
|
2580
|
-
{
|
|
2581
|
-
className: `inline-flex items-center font-medium rounded-full transition-colors ${variantClasses[variant]} ${sizeClasses[size]} ${className}`,
|
|
2582
|
-
...props,
|
|
2583
|
-
children
|
|
2584
|
-
}
|
|
2585
|
-
);
|
|
2586
|
-
}
|
|
2587
|
-
Badge.displayName = "Badge";
|
|
2588
|
-
var badge_default = Badge;
|
|
2589
|
-
function StatusLabel({
|
|
2590
|
-
children,
|
|
2591
|
-
status = "info",
|
|
2592
|
-
size = "md",
|
|
2593
|
-
variant = "filled",
|
|
2594
|
-
className = ""
|
|
2595
|
-
}) {
|
|
2596
|
-
const statusConfig = {
|
|
2597
|
-
active: {
|
|
2598
|
-
filled: "bg-success/10 text-success border-success/20",
|
|
2599
|
-
outlined: "bg-transparent text-success border-success",
|
|
2600
|
-
dot: "bg-success"
|
|
2601
|
-
},
|
|
2602
|
-
inactive: {
|
|
2603
|
-
filled: "bg-muted text-muted-foreground border-border",
|
|
2604
|
-
outlined: "bg-transparent text-muted-foreground border-muted-foreground",
|
|
2605
|
-
dot: "bg-muted-foreground"
|
|
2606
|
-
},
|
|
2607
|
-
pending: {
|
|
2608
|
-
filled: "bg-warning/10 text-warning border-warning/20",
|
|
2609
|
-
outlined: "bg-transparent text-warning border-warning",
|
|
2610
|
-
dot: "bg-warning"
|
|
2611
|
-
},
|
|
2612
|
-
success: {
|
|
2613
|
-
filled: "bg-success/10 text-success border-success/20",
|
|
2614
|
-
outlined: "bg-transparent text-success border-success",
|
|
2615
|
-
dot: "bg-success"
|
|
2616
|
-
},
|
|
2617
|
-
error: {
|
|
2618
|
-
filled: "bg-destructive/10 text-destructive border-destructive/20",
|
|
2619
|
-
outlined: "bg-transparent text-destructive border-destructive",
|
|
2620
|
-
dot: "bg-destructive"
|
|
2621
|
-
},
|
|
2622
|
-
warning: {
|
|
2623
|
-
filled: "bg-warning/10 text-warning border-warning/20",
|
|
2624
|
-
outlined: "bg-transparent text-warning border-warning",
|
|
2625
|
-
dot: "bg-warning"
|
|
2626
|
-
},
|
|
2627
|
-
info: {
|
|
2628
|
-
filled: "bg-primary/10 text-primary border-primary/20",
|
|
2629
|
-
outlined: "bg-transparent text-primary border-primary",
|
|
2630
|
-
dot: "bg-primary"
|
|
2631
|
-
}
|
|
2632
|
-
};
|
|
2633
|
-
const sizeClasses = {
|
|
2634
|
-
sm: {
|
|
2635
|
-
container: "px-2 py-0.5 text-xs gap-1.5",
|
|
2636
|
-
dot: "w-1.5 h-1.5"
|
|
2637
|
-
},
|
|
2638
|
-
md: {
|
|
2639
|
-
container: "px-2.5 py-0.5 text-sm gap-2",
|
|
2640
|
-
dot: "w-2 h-2"
|
|
2641
|
-
},
|
|
2642
|
-
lg: {
|
|
2643
|
-
container: "px-3 py-1 text-base gap-2",
|
|
2644
|
-
dot: "w-2.5 h-2.5"
|
|
2645
|
-
}
|
|
2646
|
-
};
|
|
2647
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2648
|
-
"span",
|
|
2649
|
-
{
|
|
2650
|
-
className: `inline-flex items-center font-medium rounded-full border ${statusConfig[status][variant]} ${sizeClasses[size].container} ${className}`,
|
|
2651
|
-
children: [
|
|
2652
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: `rounded-full ${statusConfig[status].dot} ${sizeClasses[size].dot}` }),
|
|
2653
|
-
children
|
|
2654
|
-
]
|
|
2655
|
-
}
|
|
2656
|
-
);
|
|
2657
|
-
}
|
|
2658
|
-
StatusLabel.displayName = "StatusLabel";
|
|
2659
|
-
var status_label_default = StatusLabel;
|
|
2660
|
-
function Avatar({ src, alt = "", fallback, size = "md", className = "" }) {
|
|
2661
|
-
const sizeClasses = {
|
|
2662
|
-
sm: "w-8 h-8 text-xs",
|
|
2663
|
-
md: "w-10 h-10 text-sm",
|
|
2664
|
-
lg: "w-12 h-12 text-base",
|
|
2665
|
-
xl: "w-16 h-16 text-lg"
|
|
2666
|
-
};
|
|
2667
|
-
let content;
|
|
2668
|
-
if (src) {
|
|
2669
|
-
content = /* @__PURE__ */ jsxRuntime.jsx("img", { src, alt, className: "w-full h-full object-cover" });
|
|
2670
|
-
} else if (fallback) {
|
|
2671
|
-
content = fallback;
|
|
2672
|
-
} else {
|
|
2673
|
-
content = /* @__PURE__ */ jsxRuntime.jsx("span", { children: alt.charAt(0).toUpperCase() });
|
|
2674
|
-
}
|
|
2675
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2676
|
-
"div",
|
|
2677
|
-
{
|
|
2678
|
-
className: `inline-flex items-center justify-center rounded-full bg-muted text-muted-foreground font-medium overflow-hidden ${sizeClasses[size]} ${className}`,
|
|
2679
|
-
children: content
|
|
2680
|
-
}
|
|
2681
|
-
);
|
|
2682
|
-
}
|
|
2683
|
-
Avatar.displayName = "Avatar";
|
|
2684
|
-
var avatar_default = Avatar;
|
|
2685
|
-
function EmptyState({ title, description, icon, action, className = "" }) {
|
|
2686
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex flex-col items-center justify-center text-center py-12 ${className}`, children: [
|
|
2687
|
-
icon && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-muted-foreground mb-4", children: icon }),
|
|
2688
|
-
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-lg font-semibold text-foreground mb-2", children: title }),
|
|
2689
|
-
description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground mb-6 max-w-sm", children: description }),
|
|
2690
|
-
action
|
|
2691
|
-
] });
|
|
2692
|
-
}
|
|
2693
|
-
EmptyState.displayName = "EmptyState";
|
|
2694
|
-
var empty_state_default = EmptyState;
|
|
2695
|
-
function List({ children, className = "", ordered = false }) {
|
|
2696
|
-
const Component = ordered ? "ol" : "ul";
|
|
2697
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Component, { className: `divide-y divide-border ${className}`, children });
|
|
2698
|
-
}
|
|
2699
|
-
List.displayName = "List";
|
|
2700
|
-
function ListItem({ children, className = "" }) {
|
|
2701
|
-
return /* @__PURE__ */ jsxRuntime.jsx("li", { className: `py-3 ${className}`, children });
|
|
2702
|
-
}
|
|
2703
|
-
ListItem.displayName = "ListItem";
|
|
2704
|
-
function Table({
|
|
2705
|
-
children,
|
|
2706
|
-
className = "",
|
|
2707
|
-
striped = false,
|
|
2708
|
-
bordered = false,
|
|
2709
|
-
hoverable = false,
|
|
2710
|
-
compact = false,
|
|
2711
|
-
caption,
|
|
2712
|
-
...props
|
|
2713
|
-
}) {
|
|
2714
|
-
const baseClasses = "w-full text-sm text-left";
|
|
2715
|
-
const stripedClasses = striped ? "striped" : "";
|
|
2716
|
-
const borderedClasses = bordered ? "border border-border" : "";
|
|
2717
|
-
const compactClasses = compact ? "table-compact" : "";
|
|
2718
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "overflow-x-auto rounded-lg", children: [
|
|
2719
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2720
|
-
"table",
|
|
2721
|
-
{
|
|
2722
|
-
className: `${baseClasses} ${stripedClasses} ${borderedClasses} ${compactClasses} ${className}`,
|
|
2723
|
-
...props,
|
|
2724
|
-
children: [
|
|
2725
|
-
caption && /* @__PURE__ */ jsxRuntime.jsx("caption", { className: "sr-only", children: caption }),
|
|
2726
|
-
children
|
|
2727
|
-
]
|
|
2728
|
-
}
|
|
2729
|
-
),
|
|
2730
|
-
/* @__PURE__ */ jsxRuntime.jsx("style", { children: `
|
|
2731
|
-
.striped tbody tr:nth-child(even) {
|
|
2732
|
-
background-color: hsl(var(--muted) / 0.3);
|
|
2733
|
-
}
|
|
2734
|
-
${hoverable ? `
|
|
2735
|
-
table tbody tr:hover {
|
|
2736
|
-
background-color: hsl(var(--muted) / 0.5);
|
|
2737
|
-
}
|
|
2738
|
-
` : ""}
|
|
2739
|
-
.table-compact td,
|
|
2740
|
-
.table-compact th {
|
|
2741
|
-
padding: 0.5rem;
|
|
2742
|
-
}
|
|
2743
|
-
` })
|
|
2744
|
-
] });
|
|
2745
|
-
}
|
|
2746
|
-
function TableHeader({ children, className = "", ...props }) {
|
|
2747
|
-
return /* @__PURE__ */ jsxRuntime.jsx("thead", { className: `text-xs text-muted-foreground uppercase bg-muted/50 ${className}`, ...props, children });
|
|
2748
|
-
}
|
|
2749
|
-
function TableBody({ children, className = "", ...props }) {
|
|
2750
|
-
return /* @__PURE__ */ jsxRuntime.jsx("tbody", { className: `divide-y divide-border ${className}`, ...props, children });
|
|
2751
|
-
}
|
|
2752
|
-
function TableFooter({ children, className = "", ...props }) {
|
|
2753
|
-
return /* @__PURE__ */ jsxRuntime.jsx("tfoot", { className: `text-xs font-semibold text-foreground bg-muted/30 ${className}`, ...props, children });
|
|
2754
|
-
}
|
|
2755
|
-
function TableRow({ children, className = "", selected = false, ...props }) {
|
|
2756
|
-
const selectedClasses = selected ? "bg-primary/10" : "";
|
|
2757
|
-
return /* @__PURE__ */ jsxRuntime.jsx("tr", { className: `${selectedClasses} ${className}`, ...props, children });
|
|
2758
|
-
}
|
|
2759
|
-
function TableHeadCell({
|
|
2760
|
-
children,
|
|
2761
|
-
className = "",
|
|
2762
|
-
align = "left",
|
|
2763
|
-
scope = "col",
|
|
2764
|
-
...props
|
|
2765
|
-
}) {
|
|
2766
|
-
const alignClasses = {
|
|
2767
|
-
left: "text-left",
|
|
2768
|
-
center: "text-center",
|
|
2769
|
-
right: "text-right"
|
|
2770
|
-
};
|
|
2771
|
-
return /* @__PURE__ */ jsxRuntime.jsx("th", { scope, className: `px-6 py-3 font-medium ${alignClasses[align]} ${className}`, ...props, children });
|
|
2772
|
-
}
|
|
2773
|
-
function TableCell({ children, className = "", align = "left", ...props }) {
|
|
2774
|
-
const alignClasses = {
|
|
2775
|
-
left: "text-left",
|
|
2776
|
-
center: "text-center",
|
|
2777
|
-
right: "text-right"
|
|
2778
|
-
};
|
|
2779
|
-
return /* @__PURE__ */ jsxRuntime.jsx("td", { className: `px-6 py-4 whitespace-nowrap ${alignClasses[align]} ${className}`, ...props, children });
|
|
2780
|
-
}
|
|
2781
|
-
function useTable({ data, initialSort, pageSize = 10 }) {
|
|
2782
|
-
const [sortConfig, setSortConfig] = React5.useState(
|
|
2783
|
-
initialSort ? { key: initialSort.key, direction: initialSort.direction } : null
|
|
2784
|
-
);
|
|
2785
|
-
const [currentPage, setCurrentPage] = React5.useState(1);
|
|
2786
|
-
const [selectedRows, setSelectedRows] = React5.useState(/* @__PURE__ */ new Set());
|
|
2787
|
-
const sortedData = React5.useMemo(() => {
|
|
2788
|
-
if (!sortConfig) return data;
|
|
2789
|
-
const sorted = [...data].sort((a, b) => {
|
|
2790
|
-
const aValue = a[sortConfig.key];
|
|
2791
|
-
const bValue = b[sortConfig.key];
|
|
2792
|
-
if (aValue === bValue) return 0;
|
|
2793
|
-
if (aValue == null) return 1;
|
|
2794
|
-
if (bValue == null) return -1;
|
|
2795
|
-
if (aValue < bValue) {
|
|
2796
|
-
return sortConfig.direction === "asc" ? -1 : 1;
|
|
2797
|
-
}
|
|
2798
|
-
return sortConfig.direction === "asc" ? 1 : -1;
|
|
2799
|
-
});
|
|
2800
|
-
return sorted;
|
|
2801
|
-
}, [data, sortConfig]);
|
|
2802
|
-
const totalPages = Math.ceil(sortedData.length / pageSize);
|
|
2803
|
-
const startIndex = (currentPage - 1) * pageSize;
|
|
2804
|
-
const endIndex = startIndex + pageSize;
|
|
2805
|
-
const currentData = sortedData.slice(startIndex, endIndex);
|
|
2806
|
-
const handleSort = (key) => {
|
|
2807
|
-
let direction = "asc";
|
|
2808
|
-
if (sortConfig?.key === key) {
|
|
2809
|
-
if (sortConfig.direction === "asc") {
|
|
2810
|
-
direction = "desc";
|
|
2811
|
-
} else if (sortConfig.direction === "desc") {
|
|
2812
|
-
direction = null;
|
|
2813
|
-
}
|
|
2814
|
-
}
|
|
2815
|
-
setSortConfig(direction ? { key, direction } : null);
|
|
2816
|
-
setCurrentPage(1);
|
|
2817
|
-
};
|
|
2818
|
-
const nextPage = () => {
|
|
2819
|
-
setCurrentPage((prev) => Math.min(prev + 1, totalPages));
|
|
2820
|
-
};
|
|
2821
|
-
const prevPage = () => {
|
|
2822
|
-
setCurrentPage((prev) => Math.max(prev - 1, 1));
|
|
2823
|
-
};
|
|
2824
|
-
const canNextPage = currentPage < totalPages;
|
|
2825
|
-
const canPrevPage = currentPage > 1;
|
|
2826
|
-
const toggleRow = (index) => {
|
|
2827
|
-
setSelectedRows((prev) => {
|
|
2828
|
-
const newSet = new Set(prev);
|
|
2829
|
-
if (newSet.has(index)) {
|
|
2830
|
-
newSet.delete(index);
|
|
2831
|
-
} else {
|
|
2832
|
-
newSet.add(index);
|
|
2833
|
-
}
|
|
2834
|
-
return newSet;
|
|
2835
|
-
});
|
|
2836
|
-
};
|
|
2837
|
-
const toggleAll = () => {
|
|
2838
|
-
if (selectedRows.size === currentData.length) {
|
|
2839
|
-
setSelectedRows(/* @__PURE__ */ new Set());
|
|
2840
|
-
} else {
|
|
2841
|
-
const allIndices = currentData.map((_, idx) => startIndex + idx);
|
|
2842
|
-
setSelectedRows(new Set(allIndices));
|
|
2843
|
-
}
|
|
2844
|
-
};
|
|
2845
|
-
const isRowSelected = (index) => selectedRows.has(index);
|
|
2846
|
-
const isAllSelected = currentData.length > 0 && currentData.every((_, idx) => selectedRows.has(startIndex + idx));
|
|
2847
|
-
const clearSelection = () => setSelectedRows(/* @__PURE__ */ new Set());
|
|
2848
|
-
return {
|
|
2849
|
-
currentData,
|
|
2850
|
-
sortedData,
|
|
2851
|
-
sortConfig,
|
|
2852
|
-
handleSort,
|
|
2853
|
-
currentPage,
|
|
2854
|
-
totalPages,
|
|
2855
|
-
setCurrentPage,
|
|
2856
|
-
nextPage,
|
|
2857
|
-
prevPage,
|
|
2858
|
-
canNextPage,
|
|
2859
|
-
canPrevPage,
|
|
2860
|
-
selectedRows,
|
|
2861
|
-
toggleRow,
|
|
2862
|
-
toggleAll,
|
|
2863
|
-
isRowSelected,
|
|
2864
|
-
isAllSelected,
|
|
2865
|
-
clearSelection
|
|
2866
|
-
};
|
|
2867
|
-
}
|
|
2868
|
-
function DataTable({
|
|
2869
|
-
data,
|
|
2870
|
-
columns,
|
|
2871
|
-
className = "",
|
|
2872
|
-
striped = true,
|
|
2873
|
-
bordered = false,
|
|
2874
|
-
hoverable = true,
|
|
2875
|
-
compact = false,
|
|
2876
|
-
stickyHeader = false,
|
|
2877
|
-
sortable = true,
|
|
2878
|
-
paginated = false,
|
|
2879
|
-
pageSize = 10,
|
|
2880
|
-
selectable = false,
|
|
2881
|
-
actions,
|
|
2882
|
-
actionsLabel = "Actions",
|
|
2883
|
-
actionsWidth = "w-32",
|
|
2884
|
-
onRowClick,
|
|
2885
|
-
onSelectionChange,
|
|
2886
|
-
emptyMessage = "No data available",
|
|
2887
|
-
emptyIcon,
|
|
2888
|
-
initialSort
|
|
2889
|
-
}) {
|
|
2890
|
-
const tableOptions = {
|
|
2891
|
-
data,
|
|
2892
|
-
initialSort,
|
|
2893
|
-
pageSize
|
|
2894
|
-
};
|
|
2895
|
-
const {
|
|
2896
|
-
currentData,
|
|
2897
|
-
sortedData,
|
|
2898
|
-
sortConfig,
|
|
2899
|
-
handleSort,
|
|
2900
|
-
currentPage,
|
|
2901
|
-
totalPages,
|
|
2902
|
-
nextPage,
|
|
2903
|
-
prevPage,
|
|
2904
|
-
canNextPage,
|
|
2905
|
-
canPrevPage,
|
|
2906
|
-
selectedRows,
|
|
2907
|
-
toggleRow,
|
|
2908
|
-
toggleAll,
|
|
2909
|
-
isRowSelected,
|
|
2910
|
-
isAllSelected
|
|
2911
|
-
} = useTable(tableOptions);
|
|
2912
|
-
const displayData = paginated ? currentData : sortedData;
|
|
2913
|
-
const handleToggleRow = (index) => {
|
|
2914
|
-
toggleRow(index);
|
|
2915
|
-
if (onSelectionChange) {
|
|
2916
|
-
const newSelection = new Set(selectedRows);
|
|
2917
|
-
if (newSelection.has(index)) {
|
|
2918
|
-
newSelection.delete(index);
|
|
2919
|
-
} else {
|
|
2920
|
-
newSelection.add(index);
|
|
2921
|
-
}
|
|
2922
|
-
onSelectionChange(Array.from(newSelection));
|
|
2923
|
-
}
|
|
2924
|
-
};
|
|
2925
|
-
const handleToggleAll = () => {
|
|
2926
|
-
toggleAll();
|
|
2927
|
-
if (onSelectionChange) {
|
|
2928
|
-
if (isAllSelected) {
|
|
2929
|
-
onSelectionChange([]);
|
|
2930
|
-
} else {
|
|
2931
|
-
const startIndex = (currentPage - 1) * pageSize;
|
|
2932
|
-
const allIndices = displayData.map((_, idx) => startIndex + idx);
|
|
2933
|
-
onSelectionChange(allIndices);
|
|
2934
|
-
}
|
|
2935
|
-
}
|
|
2936
|
-
};
|
|
2937
|
-
const renderSortIcon = (columnKey) => {
|
|
2938
|
-
if (!sortable) return null;
|
|
2939
|
-
const isSorted = sortConfig?.key === columnKey;
|
|
2940
|
-
if (!isSorted) {
|
|
2941
|
-
return /* @__PURE__ */ jsxRuntime.jsx(iconsReact.IconSelector, { className: "w-4 h-4 ml-1 text-muted-foreground" });
|
|
2942
|
-
}
|
|
2943
|
-
if (sortConfig?.direction === "asc") {
|
|
2944
|
-
return /* @__PURE__ */ jsxRuntime.jsx(iconsReact.IconChevronUp, { className: "w-4 h-4 ml-1 text-primary" });
|
|
2945
|
-
}
|
|
2946
|
-
return /* @__PURE__ */ jsxRuntime.jsx(iconsReact.IconChevronDown, { className: "w-4 h-4 ml-1 text-primary" });
|
|
2947
|
-
};
|
|
2948
|
-
if (data.length === 0) {
|
|
2949
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "border border-border rounded-lg", children: /* @__PURE__ */ jsxRuntime.jsx(empty_state_default, { title: emptyMessage, icon: emptyIcon, className: "py-12" }) });
|
|
2950
|
-
}
|
|
2951
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className, children: [
|
|
2952
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: stickyHeader ? "overflow-auto max-h-[600px]" : "", children: /* @__PURE__ */ jsxRuntime.jsxs(Table, { striped, bordered, hoverable, compact, children: [
|
|
2953
|
-
/* @__PURE__ */ jsxRuntime.jsx(TableHeader, { className: stickyHeader ? "sticky top-0 z-10 bg-background shadow-sm" : "", children: /* @__PURE__ */ jsxRuntime.jsxs(TableRow, { children: [
|
|
2954
|
-
selectable && /* @__PURE__ */ jsxRuntime.jsx(TableHeadCell, { className: "w-12", children: /* @__PURE__ */ jsxRuntime.jsx(checkbox_default, { checked: isAllSelected, onChange: handleToggleAll, ariaLabel: "Select all rows" }) }),
|
|
2955
|
-
columns.map((column) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2956
|
-
TableHeadCell,
|
|
2957
|
-
{
|
|
2958
|
-
align: column.align,
|
|
2959
|
-
className: column.width ? `w-[${column.width}]` : "",
|
|
2960
|
-
children: column.sortable !== false && sortable ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2961
|
-
"button",
|
|
2962
|
-
{
|
|
2963
|
-
onClick: () => handleSort(column.key),
|
|
2964
|
-
className: "flex items-center gap-1 hover:text-foreground transition-colors font-medium",
|
|
2965
|
-
type: "button",
|
|
2966
|
-
children: [
|
|
2967
|
-
column.label,
|
|
2968
|
-
renderSortIcon(column.key)
|
|
2969
|
-
]
|
|
2970
|
-
}
|
|
2971
|
-
) : column.label
|
|
2972
|
-
},
|
|
2973
|
-
String(column.key)
|
|
2974
|
-
)),
|
|
2975
|
-
actions && /* @__PURE__ */ jsxRuntime.jsx(TableHeadCell, { align: "center", className: actionsWidth, children: actionsLabel })
|
|
2976
|
-
] }) }),
|
|
2977
|
-
/* @__PURE__ */ jsxRuntime.jsx(TableBody, { children: displayData.map((row, rowIndex) => {
|
|
2978
|
-
const actualIndex = paginated ? (currentPage - 1) * pageSize + rowIndex : rowIndex;
|
|
2979
|
-
const isSelected = isRowSelected(actualIndex);
|
|
2980
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2981
|
-
TableRow,
|
|
2982
|
-
{
|
|
2983
|
-
selected: isSelected,
|
|
2984
|
-
onClick: onRowClick ? () => onRowClick(row, actualIndex) : void 0,
|
|
2985
|
-
className: onRowClick ? "cursor-pointer" : "",
|
|
2986
|
-
children: [
|
|
2987
|
-
selectable && /* @__PURE__ */ jsxRuntime.jsx(TableCell, { onClick: (e) => e.stopPropagation(), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2988
|
-
checkbox_default,
|
|
2989
|
-
{
|
|
2990
|
-
checked: isSelected,
|
|
2991
|
-
onChange: () => handleToggleRow(actualIndex),
|
|
2992
|
-
ariaLabel: `Select row ${actualIndex + 1}`
|
|
2993
|
-
}
|
|
2994
|
-
) }),
|
|
2995
|
-
columns.map((column) => {
|
|
2996
|
-
const value = row[column.key];
|
|
2997
|
-
const content = column.render ? column.render(value, row, actualIndex) : String(value ?? "");
|
|
2998
|
-
return /* @__PURE__ */ jsxRuntime.jsx(TableCell, { align: column.align, children: content }, String(column.key));
|
|
2999
|
-
}),
|
|
3000
|
-
actions && /* @__PURE__ */ jsxRuntime.jsx(TableCell, { align: "center", onClick: (e) => e.stopPropagation(), children: Array.isArray(actions) ? /* @__PURE__ */ jsxRuntime.jsx(stack_default, { direction: "horizontal", spacing: "sm", justify: "center", children: actions.map((action, actionIndex) => {
|
|
3001
|
-
if (action && typeof action === "object" && "onClick" in action) {
|
|
3002
|
-
const actionConfig = action;
|
|
3003
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3004
|
-
button_default,
|
|
3005
|
-
{
|
|
3006
|
-
size: "sm",
|
|
3007
|
-
variant: actionConfig.variant || "neutral",
|
|
3008
|
-
style: "ghost",
|
|
3009
|
-
icon: actionConfig.icon,
|
|
3010
|
-
ariaLabel: actionConfig.label,
|
|
3011
|
-
onClick: () => actionConfig.onClick(row, actualIndex)
|
|
3012
|
-
},
|
|
3013
|
-
actionIndex
|
|
3014
|
-
);
|
|
3015
|
-
} else {
|
|
3016
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { children: action }, actionIndex);
|
|
3017
|
-
}
|
|
3018
|
-
}) }) : actions(row, actualIndex) })
|
|
3019
|
-
]
|
|
3020
|
-
},
|
|
3021
|
-
actualIndex
|
|
3022
|
-
);
|
|
3023
|
-
}) })
|
|
3024
|
-
] }) }),
|
|
3025
|
-
paginated && totalPages > 1 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between px-4 py-3 border-t border-border", children: [
|
|
3026
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-sm text-muted-foreground", children: [
|
|
3027
|
-
"Page ",
|
|
3028
|
-
currentPage,
|
|
3029
|
-
" of ",
|
|
3030
|
-
totalPages,
|
|
3031
|
-
" (",
|
|
3032
|
-
data.length,
|
|
3033
|
-
" total rows)"
|
|
3034
|
-
] }),
|
|
3035
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-2", children: [
|
|
3036
|
-
/* @__PURE__ */ jsxRuntime.jsx(button_default, { size: "sm", style: "outline", onClick: prevPage, disabled: !canPrevPage, children: "Previous" }),
|
|
3037
|
-
/* @__PURE__ */ jsxRuntime.jsx(button_default, { size: "sm", style: "outline", onClick: nextPage, disabled: !canNextPage, children: "Next" })
|
|
3038
|
-
] })
|
|
3039
|
-
] })
|
|
3040
|
-
] });
|
|
3041
|
-
}
|
|
3042
|
-
DataTable.displayName = "DataTable";
|
|
3043
|
-
var data_table_default = DataTable;
|
|
3044
|
-
function Chip({
|
|
3045
|
-
children,
|
|
3046
|
-
className = "",
|
|
3047
|
-
variant = "default",
|
|
3048
|
-
size = "md",
|
|
3049
|
-
onRemove,
|
|
3050
|
-
icon,
|
|
3051
|
-
disabled = false,
|
|
3052
|
-
clickable = false,
|
|
3053
|
-
onClick
|
|
3054
|
-
}) {
|
|
3055
|
-
const sizeClasses = {
|
|
3056
|
-
sm: "text-xs px-2 py-1 gap-1",
|
|
3057
|
-
md: "text-sm px-3 py-1.5 gap-1.5",
|
|
3058
|
-
lg: "text-base px-4 py-2 gap-2"
|
|
3059
|
-
};
|
|
3060
|
-
const variantClasses = {
|
|
3061
|
-
default: "bg-muted text-muted-foreground",
|
|
3062
|
-
primary: "bg-primary/10 text-primary",
|
|
3063
|
-
success: "bg-success/10 text-success",
|
|
3064
|
-
warning: "bg-warning/10 text-warning",
|
|
3065
|
-
error: "bg-destructive/10 text-destructive"
|
|
3066
|
-
};
|
|
3067
|
-
const interactiveClasses = clickable && !disabled ? "cursor-pointer hover:opacity-80 active:opacity-60 transition-opacity" : "";
|
|
3068
|
-
const disabledClasses = disabled ? "opacity-50 cursor-not-allowed" : "";
|
|
3069
|
-
const handleClick = (e) => {
|
|
3070
|
-
if (!disabled && clickable && onClick) {
|
|
3071
|
-
onClick(e);
|
|
3072
|
-
}
|
|
3073
|
-
};
|
|
3074
|
-
const handleRemove = (e) => {
|
|
3075
|
-
e.stopPropagation();
|
|
3076
|
-
if (!disabled && onRemove) {
|
|
3077
|
-
onRemove(e);
|
|
3078
|
-
}
|
|
3079
|
-
};
|
|
3080
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3081
|
-
"div",
|
|
3082
|
-
{
|
|
3083
|
-
className: `
|
|
3084
|
-
inline-flex items-center justify-center
|
|
3085
|
-
rounded-full font-medium
|
|
3086
|
-
${sizeClasses[size]}
|
|
3087
|
-
${variantClasses[variant]}
|
|
3088
|
-
${interactiveClasses}
|
|
3089
|
-
${disabledClasses}
|
|
3090
|
-
${className}
|
|
3091
|
-
`,
|
|
3092
|
-
onClick: handleClick,
|
|
3093
|
-
role: clickable ? "button" : void 0,
|
|
3094
|
-
tabIndex: clickable && !disabled ? 0 : void 0,
|
|
3095
|
-
onKeyDown: clickable && !disabled ? (e) => {
|
|
3096
|
-
if (e.key === "Enter" || e.key === " ") {
|
|
3097
|
-
e.preventDefault();
|
|
3098
|
-
onClick?.(e);
|
|
3099
|
-
}
|
|
3100
|
-
} : void 0,
|
|
3101
|
-
children: [
|
|
3102
|
-
icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-shrink-0 flex items-center", children: icon }),
|
|
3103
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate", children }),
|
|
3104
|
-
onRemove && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3105
|
-
"button",
|
|
3106
|
-
{
|
|
3107
|
-
type: "button",
|
|
3108
|
-
onClick: handleRemove,
|
|
3109
|
-
disabled,
|
|
3110
|
-
className: `
|
|
3111
|
-
flex-shrink-0 flex items-center justify-center
|
|
3112
|
-
rounded-full hover:bg-black/10 dark:hover:bg-white/10
|
|
3113
|
-
transition-colors
|
|
3114
|
-
${size === "sm" ? "w-3 h-3" : size === "md" ? "w-4 h-4" : "w-5 h-5"}
|
|
3115
|
-
${disabled ? "cursor-not-allowed" : "cursor-pointer"}
|
|
3116
|
-
`,
|
|
3117
|
-
"aria-label": "Remove",
|
|
3118
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(iconsReact.IconX, { className: size === "sm" ? "w-2.5 h-2.5" : size === "md" ? "w-3 h-3" : "w-3.5 h-3.5" })
|
|
3119
|
-
}
|
|
3120
|
-
)
|
|
3121
|
-
]
|
|
3122
|
-
}
|
|
3123
|
-
);
|
|
3124
|
-
}
|
|
3125
|
-
Chip.displayName = "Chip";
|
|
3126
|
-
var chip_default = Chip;
|
|
3127
|
-
function TimelineItem({
|
|
3128
|
-
children,
|
|
3129
|
-
className = "",
|
|
3130
|
-
icon,
|
|
3131
|
-
iconColor = "default",
|
|
3132
|
-
title,
|
|
3133
|
-
subtitle,
|
|
3134
|
-
timestamp,
|
|
3135
|
-
isLast = false
|
|
3136
|
-
}) {
|
|
3137
|
-
const iconColorClasses = {
|
|
3138
|
-
default: "bg-muted text-muted-foreground",
|
|
3139
|
-
primary: "bg-primary text-primary-foreground",
|
|
3140
|
-
success: "bg-success text-success-foreground",
|
|
3141
|
-
warning: "bg-warning text-warning-foreground",
|
|
3142
|
-
error: "bg-destructive text-destructive-foreground"
|
|
3143
|
-
};
|
|
3144
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex gap-4 ${className}`, children: [
|
|
3145
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center", children: [
|
|
3146
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3147
|
-
"div",
|
|
3148
|
-
{
|
|
3149
|
-
className: `
|
|
3150
|
-
flex items-center justify-center
|
|
3151
|
-
w-8 h-8 rounded-full
|
|
3152
|
-
flex-shrink-0
|
|
3153
|
-
${iconColorClasses[iconColor]}
|
|
3154
|
-
`,
|
|
3155
|
-
children: icon || /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-2 h-2 rounded-full bg-current" })
|
|
3156
|
-
}
|
|
3157
|
-
),
|
|
3158
|
-
!isLast && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-0.5 flex-1 bg-border mt-2" })
|
|
3159
|
-
] }),
|
|
3160
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex-1 ${!isLast ? "pb-8" : ""}`, children: [
|
|
3161
|
-
(title || timestamp) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between gap-4 mb-1", children: [
|
|
3162
|
-
title && /* @__PURE__ */ jsxRuntime.jsx("h4", { className: "font-semibold text-foreground", children: title }),
|
|
3163
|
-
timestamp && /* @__PURE__ */ jsxRuntime.jsx("time", { className: "text-sm text-muted-foreground whitespace-nowrap", children: timestamp })
|
|
3164
|
-
] }),
|
|
3165
|
-
subtitle && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground mb-2", children: subtitle }),
|
|
3166
|
-
children && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm text-foreground", children })
|
|
3167
|
-
] })
|
|
3168
|
-
] });
|
|
3169
|
-
}
|
|
3170
|
-
function Timeline({ children, className = "", position = "left" }) {
|
|
3171
|
-
const positionClasses = {
|
|
3172
|
-
left: "",
|
|
3173
|
-
center: "mx-auto max-w-2xl",
|
|
3174
|
-
right: "ml-auto max-w-2xl"
|
|
3175
|
-
};
|
|
3176
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `${positionClasses[position]} ${className}`, children });
|
|
3177
|
-
}
|
|
3178
|
-
Timeline.displayName = "Timeline";
|
|
3179
|
-
var timeline_default = Timeline;
|
|
3180
|
-
function Grid({
|
|
3181
|
-
children,
|
|
3182
|
-
className = "",
|
|
3183
|
-
itemSize = "md",
|
|
3184
|
-
maxCols,
|
|
3185
|
-
gap = "md",
|
|
3186
|
-
responsive,
|
|
3187
|
-
alignItems = "stretch",
|
|
3188
|
-
justifyItems = "stretch"
|
|
3189
|
-
}) {
|
|
3190
|
-
const itemSizeValues = {
|
|
3191
|
-
xs: "150px",
|
|
3192
|
-
sm: "200px",
|
|
3193
|
-
md: "250px",
|
|
3194
|
-
lg: "300px",
|
|
3195
|
-
xl: "350px",
|
|
3196
|
-
"2xl": "400px"
|
|
3197
|
-
};
|
|
3198
|
-
const gapClasses = {
|
|
3199
|
-
none: "gap-0",
|
|
3200
|
-
xs: "gap-1",
|
|
3201
|
-
sm: "gap-2",
|
|
3202
|
-
md: "gap-4",
|
|
3203
|
-
lg: "gap-6",
|
|
3204
|
-
xl: "gap-8",
|
|
3205
|
-
"2xl": "gap-12"
|
|
3206
|
-
};
|
|
3207
|
-
const alignItemsClasses = {
|
|
3208
|
-
start: "items-start",
|
|
3209
|
-
center: "items-center",
|
|
3210
|
-
end: "items-end",
|
|
3211
|
-
stretch: "items-stretch"
|
|
3212
|
-
};
|
|
3213
|
-
const justifyItemsClasses = {
|
|
3214
|
-
start: "justify-items-start",
|
|
3215
|
-
center: "justify-items-center",
|
|
3216
|
-
end: "justify-items-end",
|
|
3217
|
-
stretch: "justify-items-stretch"
|
|
3218
|
-
};
|
|
3219
|
-
const responsiveClasses = responsive ? Object.entries(responsive).map(([breakpoint, cols]) => {
|
|
3220
|
-
const breakpointPrefix = breakpoint === "sm" ? "sm:" : breakpoint === "md" ? "md:" : breakpoint === "lg" ? "lg:" : "xl:";
|
|
3221
|
-
return `${breakpointPrefix}grid-cols-${cols}`;
|
|
3222
|
-
}).join(" ") : "";
|
|
3223
|
-
const minWidth = itemSizeValues[itemSize];
|
|
3224
|
-
const gridStyle = !responsive ? {
|
|
3225
|
-
gridTemplateColumns: maxCols ? `repeat(auto-fit, minmax(min(${minWidth}, 100%), 1fr))` : `repeat(auto-fill, minmax(min(${minWidth}, 100%), 1fr))`
|
|
3226
|
-
} : void 0;
|
|
3227
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3228
|
-
"div",
|
|
3229
|
-
{
|
|
3230
|
-
className: `
|
|
3231
|
-
grid
|
|
3232
|
-
${!responsive ? "" : responsiveClasses}
|
|
3233
|
-
${gapClasses[gap]}
|
|
3234
|
-
${alignItemsClasses[alignItems]}
|
|
3235
|
-
${justifyItemsClasses[justifyItems]}
|
|
3236
|
-
${className}
|
|
3237
|
-
`.trim(),
|
|
3238
|
-
style: gridStyle,
|
|
3239
|
-
children
|
|
3240
|
-
}
|
|
3241
|
-
);
|
|
3242
|
-
}
|
|
3243
|
-
Grid.displayName = "Grid";
|
|
3244
|
-
var grid_default = Grid;
|
|
3245
|
-
function Heading({ children, level = 1, className = "", noMargin = false }) {
|
|
3246
|
-
const levelClasses = {
|
|
3247
|
-
1: "text-4xl font-bold",
|
|
3248
|
-
2: "text-3xl font-bold",
|
|
3249
|
-
3: "text-2xl font-semibold",
|
|
3250
|
-
4: "text-xl font-semibold",
|
|
3251
|
-
5: "text-lg font-medium",
|
|
3252
|
-
6: "text-base font-medium"
|
|
3253
|
-
};
|
|
3254
|
-
const marginClasses = {
|
|
3255
|
-
1: "mb-4",
|
|
3256
|
-
2: "mb-3",
|
|
3257
|
-
3: "mb-3",
|
|
3258
|
-
4: "mb-2",
|
|
3259
|
-
5: "mb-2",
|
|
3260
|
-
6: "mb-2"
|
|
3261
|
-
};
|
|
3262
|
-
const margin = noMargin ? "" : marginClasses[level];
|
|
3263
|
-
return React5.createElement(
|
|
3264
|
-
`h${level}`,
|
|
3265
|
-
{
|
|
3266
|
-
className: `text-foreground ${levelClasses[level]} ${margin} ${className}`
|
|
3267
|
-
},
|
|
3268
|
-
children
|
|
3269
|
-
);
|
|
3270
|
-
}
|
|
3271
|
-
Heading.displayName = "Heading";
|
|
3272
|
-
var heading_default = Heading;
|
|
3273
|
-
function PricingTable({ title, description, children, columns = 3, className = "" }) {
|
|
3274
|
-
return /* @__PURE__ */ jsxRuntime.jsx("section", { className: `py-16 md:py-20 ${className}`, children: /* @__PURE__ */ jsxRuntime.jsxs(container_default, { size: "xl", children: [
|
|
3275
|
-
(title || description) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center mb-12 md:mb-16 max-w-3xl mx-auto", children: [
|
|
3276
|
-
title && /* @__PURE__ */ jsxRuntime.jsx(heading_default, { level: 2, className: "text-3xl md:text-4xl font-bold mb-4", children: title }),
|
|
3277
|
-
description && /* @__PURE__ */ jsxRuntime.jsx(text_default, { className: "text-lg md:text-xl text-muted", children: description })
|
|
3278
|
-
] }),
|
|
3279
|
-
/* @__PURE__ */ jsxRuntime.jsx(grid_default, { itemSize: "lg", maxCols: columns, gap: "lg", className: "items-stretch", children })
|
|
3280
|
-
] }) });
|
|
3281
|
-
}
|
|
3282
|
-
PricingTable.displayName = "PricingTable";
|
|
3283
|
-
var pricing_table_default = PricingTable;
|
|
3284
|
-
function Card({
|
|
3285
|
-
children,
|
|
3286
|
-
className = "",
|
|
3287
|
-
variant = "default",
|
|
3288
|
-
size = "md",
|
|
3289
|
-
width = "auto",
|
|
3290
|
-
hoverable = false,
|
|
3291
|
-
imagePosition = "top",
|
|
3292
|
-
centered = false,
|
|
3293
|
-
compact = false,
|
|
3294
|
-
...props
|
|
3295
|
-
}) {
|
|
3296
|
-
const variantClasses = {
|
|
3297
|
-
default: "bg-card text-card-foreground border border-border shadow-md",
|
|
3298
|
-
bordered: "bg-card text-card-foreground border-2 border-border",
|
|
3299
|
-
ghost: "bg-transparent",
|
|
3300
|
-
filled: "bg-muted text-foreground"
|
|
3301
|
-
};
|
|
3302
|
-
const sizeClasses = {
|
|
3303
|
-
xs: "w-36",
|
|
3304
|
-
sm: "w-64",
|
|
3305
|
-
md: "w-96",
|
|
3306
|
-
lg: "w-[28rem]",
|
|
3307
|
-
xl: "w-[32rem]"
|
|
3308
|
-
};
|
|
3309
|
-
const widthClasses = {
|
|
3310
|
-
auto: size !== "md" ? sizeClasses[size] : "max-w-full",
|
|
3311
|
-
full: "w-full",
|
|
3312
|
-
fit: "w-fit"
|
|
3313
|
-
};
|
|
3314
|
-
const hoverClasses = hoverable ? "transition-all duration-300 hover:shadow-xl hover:-translate-y-1 cursor-pointer" : "transition-shadow duration-200";
|
|
3315
|
-
const imagePositionClasses = {
|
|
3316
|
-
top: "flex-col",
|
|
3317
|
-
bottom: "flex-col-reverse",
|
|
3318
|
-
side: "flex-row",
|
|
3319
|
-
overlay: "relative"
|
|
3320
|
-
};
|
|
3321
|
-
const centerClasses = centered ? "text-center items-center" : "";
|
|
3322
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3323
|
-
"div",
|
|
3324
|
-
{
|
|
3325
|
-
className: `
|
|
3326
|
-
rounded-2xl
|
|
3327
|
-
overflow-hidden
|
|
3328
|
-
${variantClasses[variant]}
|
|
3329
|
-
${widthClasses[width]}
|
|
3330
|
-
${hoverClasses}
|
|
3331
|
-
${imagePositionClasses[imagePosition]}
|
|
3332
|
-
${centerClasses}
|
|
3333
|
-
${compact ? "p-4" : ""}
|
|
3334
|
-
${imagePosition === "side" ? "flex" : "flex"}
|
|
3335
|
-
${className}
|
|
3336
|
-
`.trim().replace(/\s+/g, " "),
|
|
3337
|
-
...props,
|
|
3338
|
-
children
|
|
3339
|
-
}
|
|
3340
|
-
);
|
|
3341
|
-
}
|
|
3342
|
-
Card.displayName = "Card";
|
|
3343
|
-
var card_default = Card;
|
|
3344
|
-
function CardHeader({ children, className = "", bordered = true, padding = "md" }) {
|
|
3345
|
-
const paddingClasses = {
|
|
3346
|
-
none: "p-0",
|
|
3347
|
-
sm: "p-4",
|
|
3348
|
-
md: "p-6",
|
|
3349
|
-
lg: "p-8"
|
|
3350
|
-
};
|
|
3351
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3352
|
-
"div",
|
|
3353
|
-
{
|
|
3354
|
-
className: `
|
|
3355
|
-
card-header
|
|
3356
|
-
flex items-center justify-between gap-3
|
|
3357
|
-
${paddingClasses[padding]}
|
|
3358
|
-
${bordered ? "border-b border-border" : ""}
|
|
3359
|
-
${className}
|
|
3360
|
-
`.trim().replace(/\s+/g, " "),
|
|
3361
|
-
children
|
|
3362
|
-
}
|
|
3363
|
-
);
|
|
3364
|
-
}
|
|
3365
|
-
CardHeader.displayName = "CardHeader";
|
|
3366
|
-
var card_header_default = CardHeader;
|
|
3367
|
-
function CardFooter({
|
|
3368
|
-
children,
|
|
3369
|
-
className = "",
|
|
3370
|
-
bordered = true,
|
|
3371
|
-
padding = "md",
|
|
3372
|
-
align = "start"
|
|
3373
|
-
}) {
|
|
3374
|
-
const paddingClasses = {
|
|
3375
|
-
none: "p-0",
|
|
3376
|
-
sm: "p-4",
|
|
3377
|
-
md: "p-6",
|
|
3378
|
-
lg: "p-8"
|
|
3379
|
-
};
|
|
3380
|
-
const alignClasses = {
|
|
3381
|
-
start: "justify-start",
|
|
3382
|
-
center: "justify-center",
|
|
3383
|
-
end: "justify-end"
|
|
3384
|
-
};
|
|
3385
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3386
|
-
"div",
|
|
3387
|
-
{
|
|
3388
|
-
className: `
|
|
3389
|
-
card-footer
|
|
3390
|
-
flex items-center gap-1
|
|
3391
|
-
${paddingClasses[padding]}
|
|
3392
|
-
${bordered ? "border-t border-border" : ""}
|
|
3393
|
-
${alignClasses[align]}
|
|
3394
|
-
${className}
|
|
3395
|
-
`.trim().replace(/\s+/g, " "),
|
|
3396
|
-
children
|
|
3397
|
-
}
|
|
3398
|
-
);
|
|
3399
|
-
}
|
|
3400
|
-
CardFooter.displayName = "CardFooter";
|
|
3401
|
-
var card_footer_default = CardFooter;
|
|
3402
|
-
function PricingTier({
|
|
3403
|
-
name,
|
|
3404
|
-
price,
|
|
3405
|
-
period = "/month",
|
|
3406
|
-
description,
|
|
3407
|
-
features,
|
|
3408
|
-
ctaLabel,
|
|
3409
|
-
ctaOnClick,
|
|
3410
|
-
featured = false,
|
|
3411
|
-
badge,
|
|
3412
|
-
className = ""
|
|
3413
|
-
}) {
|
|
3414
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3415
|
-
card_default,
|
|
3416
|
-
{
|
|
3417
|
-
className: `relative flex flex-col h-full ${featured ? "border-2 border-primary shadow-xl" : "border border-border"} ${className}`,
|
|
3418
|
-
children: [
|
|
3419
|
-
/* @__PURE__ */ jsxRuntime.jsxs(card_header_default, { className: `relative text-center border-none bg-transparent px-6 pt-12 pb-0`, children: [
|
|
3420
|
-
badge && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute top-2 left-1/2 -translate-x-1/2", children: /* @__PURE__ */ jsxRuntime.jsx(badge_default, { variant: "primary", className: "px-4 py-1 shadow-md", children: badge }) }),
|
|
3421
|
-
/* @__PURE__ */ jsxRuntime.jsx(heading_default, { level: 3, className: "text-2xl font-bold mb-3 text-foreground", children: name }),
|
|
3422
|
-
description && /* @__PURE__ */ jsxRuntime.jsx(text_default, { variant: "muted", className: "text-sm mb-1", children: description })
|
|
3423
|
-
] }),
|
|
3424
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "pt-3 pb-8 text-center px-6", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-baseline justify-center gap-1", children: [
|
|
3425
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-5xl font-bold text-foreground", children: price }),
|
|
3426
|
-
period && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground text-lg", children: period })
|
|
3427
|
-
] }) }),
|
|
3428
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 space-y-4 py-6 px-6 border-t border-border/50", children: features.map((feature, index) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-3", children: [
|
|
3429
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3430
|
-
iconsReact.IconCheck,
|
|
3431
|
-
{
|
|
3432
|
-
size: 20,
|
|
3433
|
-
className: `flex-shrink-0 mt-0.5 ${feature.included ? "text-success" : "text-muted-foreground opacity-30"}`
|
|
3434
|
-
}
|
|
3435
|
-
),
|
|
3436
|
-
/* @__PURE__ */ jsxRuntime.jsx(text_default, { className: `text-sm ${feature.included ? "text-foreground" : "text-muted-foreground line-through"}`, children: feature.label })
|
|
3437
|
-
] }, index)) }),
|
|
3438
|
-
/* @__PURE__ */ jsxRuntime.jsx(card_footer_default, { className: "border-none bg-transparent px-6 pb-6 pt-4", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3439
|
-
button_default,
|
|
3440
|
-
{
|
|
3441
|
-
variant: featured ? "primary" : "neutral",
|
|
3442
|
-
style: featured ? "solid" : "outline",
|
|
3443
|
-
className: "w-full",
|
|
3444
|
-
size: "lg",
|
|
3445
|
-
onClick: ctaOnClick,
|
|
3446
|
-
children: ctaLabel
|
|
3447
|
-
}
|
|
3448
|
-
) })
|
|
3449
|
-
]
|
|
3450
|
-
}
|
|
3451
|
-
);
|
|
3452
|
-
}
|
|
3453
|
-
PricingTier.displayName = "PricingTier";
|
|
3454
|
-
var pricing_tier_default = PricingTier;
|
|
3455
|
-
function CodeBlock({ code, className = "", showCopy = true }) {
|
|
3456
|
-
const [copied, setCopied] = React5.useState(false);
|
|
3457
|
-
const handleCopy = async () => {
|
|
3458
|
-
try {
|
|
3459
|
-
await navigator.clipboard.writeText(code);
|
|
3460
|
-
setCopied(true);
|
|
3461
|
-
setTimeout(() => setCopied(false), 2e3);
|
|
3462
|
-
} catch (err) {
|
|
3463
|
-
console.error("Failed to copy code:", err);
|
|
3464
|
-
}
|
|
3465
|
-
};
|
|
3466
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `relative group ${className}`, children: [
|
|
3467
|
-
showCopy && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3468
|
-
button_default,
|
|
3469
|
-
{
|
|
3470
|
-
variant: "neutral",
|
|
3471
|
-
style: "ghost",
|
|
3472
|
-
size: "sm",
|
|
3473
|
-
onClick: handleCopy,
|
|
3474
|
-
className: "text-xs bg-background/80 hover:bg-background",
|
|
3475
|
-
children: copied ? "\u2713 Copied" : "Copy"
|
|
3476
|
-
}
|
|
3477
|
-
) }),
|
|
3478
|
-
/* @__PURE__ */ jsxRuntime.jsx("pre", { className: `bg-muted/50 border rounded-lg p-4 overflow-x-auto text-sm ${showCopy ? "pr-24" : ""}`, children: /* @__PURE__ */ jsxRuntime.jsx("code", { className: "font-mono text-foreground", children: code }) })
|
|
3479
|
-
] });
|
|
3480
|
-
}
|
|
3481
|
-
CodeBlock.displayName = "CodeBlock";
|
|
3482
|
-
var code_block_default = CodeBlock;
|
|
3483
|
-
function CardBody({ children, padding = "md", className = "" }) {
|
|
3484
|
-
const paddingClasses = {
|
|
3485
|
-
none: "p-0",
|
|
3486
|
-
sm: "p-4",
|
|
3487
|
-
md: "p-6",
|
|
3488
|
-
lg: "p-8",
|
|
3489
|
-
xl: "p-10"
|
|
3490
|
-
};
|
|
3491
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3492
|
-
"div",
|
|
3493
|
-
{
|
|
3494
|
-
className: `
|
|
3495
|
-
card-body
|
|
3496
|
-
flex flex-col gap-2
|
|
3497
|
-
${paddingClasses[padding]}
|
|
3498
|
-
${className}
|
|
3499
|
-
`.trim().replace(/\s+/g, " "),
|
|
3500
|
-
children
|
|
3501
|
-
}
|
|
3502
|
-
);
|
|
3503
|
-
}
|
|
3504
|
-
CardBody.displayName = "CardBody";
|
|
3505
|
-
var card_body_default = CardBody;
|
|
3506
|
-
function CardTitle({ children, className = "", as: Component = "h2", size = "md" }) {
|
|
3507
|
-
const sizeClasses = {
|
|
3508
|
-
sm: "text-base font-semibold",
|
|
3509
|
-
md: "text-lg font-bold",
|
|
3510
|
-
lg: "text-xl font-bold",
|
|
3511
|
-
xl: "text-2xl font-bold"
|
|
3512
|
-
};
|
|
3513
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3514
|
-
Component,
|
|
3515
|
-
{
|
|
3516
|
-
className: `
|
|
3517
|
-
card-title
|
|
3518
|
-
${sizeClasses[size]}
|
|
3519
|
-
${className}
|
|
3520
|
-
`.trim().replace(/\s+/g, " "),
|
|
3521
|
-
children
|
|
3522
|
-
}
|
|
3523
|
-
);
|
|
3524
|
-
}
|
|
3525
|
-
CardTitle.displayName = "CardTitle";
|
|
3526
|
-
var card_title_default = CardTitle;
|
|
3527
|
-
function CardActions({ children, className = "", align = "end", direction = "row" }) {
|
|
3528
|
-
const alignClasses = {
|
|
3529
|
-
start: "justify-start",
|
|
3530
|
-
center: "justify-center",
|
|
3531
|
-
end: "justify-end",
|
|
3532
|
-
stretch: "justify-stretch"
|
|
3533
|
-
};
|
|
3534
|
-
const directionClasses = {
|
|
3535
|
-
row: "flex-row",
|
|
3536
|
-
column: "flex-col"
|
|
3537
|
-
};
|
|
3538
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3539
|
-
"div",
|
|
3540
|
-
{
|
|
3541
|
-
className: `
|
|
3542
|
-
flex gap-2 px-6 pb-6 pt-2
|
|
3543
|
-
${directionClasses[direction]}
|
|
3544
|
-
${alignClasses[align]}
|
|
3545
|
-
${className}
|
|
3546
|
-
`.trim().replace(/\s+/g, " "),
|
|
3547
|
-
children
|
|
3548
|
-
}
|
|
3549
|
-
);
|
|
3550
|
-
}
|
|
3551
|
-
CardActions.displayName = "CardActions";
|
|
3552
|
-
var card_actions_default = CardActions;
|
|
3553
|
-
function CardFigure({ children, className = "", aspectRatio = "auto" }) {
|
|
3554
|
-
const aspectRatioClasses = {
|
|
3555
|
-
square: "aspect-square",
|
|
3556
|
-
video: "aspect-video",
|
|
3557
|
-
wide: "aspect-[21/9]",
|
|
3558
|
-
portrait: "aspect-[3/4]",
|
|
3559
|
-
auto: ""
|
|
3560
|
-
};
|
|
3561
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3562
|
-
"figure",
|
|
3563
|
-
{
|
|
3564
|
-
className: `
|
|
3565
|
-
card-figure
|
|
3566
|
-
relative overflow-hidden
|
|
3567
|
-
${aspectRatioClasses[aspectRatio]}
|
|
3568
|
-
${className}
|
|
3569
|
-
`.trim().replace(/\s+/g, " "),
|
|
3570
|
-
children
|
|
3571
|
-
}
|
|
3572
|
-
);
|
|
3573
|
-
}
|
|
3574
|
-
CardFigure.displayName = "CardFigure";
|
|
3575
|
-
var card_figure_default = CardFigure;
|
|
3576
|
-
function Divider({ orientation = "horizontal", className = "", ...props }) {
|
|
3577
|
-
const orientationClasses = orientation === "horizontal" ? "w-full h-px" : "h-full w-px";
|
|
3578
|
-
return /* @__PURE__ */ jsxRuntime.jsx("hr", { className: `border-0 bg-border ${orientationClasses} ${className}`, "aria-orientation": orientation, ...props });
|
|
3579
|
-
}
|
|
3580
|
-
Divider.displayName = "Divider";
|
|
3581
|
-
var divider_default = Divider;
|
|
3582
|
-
function Drawer({
|
|
3583
|
-
isOpen,
|
|
3584
|
-
onClose,
|
|
3585
|
-
children,
|
|
3586
|
-
position = "right",
|
|
3587
|
-
className = "",
|
|
3588
|
-
title,
|
|
3589
|
-
size = "md",
|
|
3590
|
-
closeOnEscape = true,
|
|
3591
|
-
closeOnOutside = true,
|
|
3592
|
-
unmountOnExit = true,
|
|
3593
|
-
portalRoot = portal_default(),
|
|
3594
|
-
noAnimation = false
|
|
3595
|
-
}) {
|
|
3596
|
-
const { phase, shouldRender, ref, getPhaseClass } = useOverlay_default({
|
|
3597
|
-
isOpen,
|
|
3598
|
-
lockScroll: true,
|
|
3599
|
-
restoreFocus: true,
|
|
3600
|
-
focusTrap: true,
|
|
3601
|
-
unmountOnExit,
|
|
3602
|
-
exitDuration: noAnimation ? 0 : 250,
|
|
3603
|
-
animationFrames: noAnimation ? 0 : 0
|
|
3604
|
-
});
|
|
3605
|
-
if (!shouldRender) return null;
|
|
3606
|
-
const sizeClasses = {
|
|
3607
|
-
sm: "w-72",
|
|
3608
|
-
md: "w-96",
|
|
3609
|
-
lg: "w-[32rem]",
|
|
3610
|
-
xl: "w-[40rem]",
|
|
3611
|
-
full: "w-full max-w-2xl"
|
|
3612
|
-
};
|
|
3613
|
-
const edgeClasses = {
|
|
3614
|
-
left: "left-0 top-0 bottom-0",
|
|
3615
|
-
right: "right-0 top-0 bottom-0",
|
|
3616
|
-
top: "top-0 left-0 right-0 h-96",
|
|
3617
|
-
bottom: "bottom-0 left-0 right-0 h-96"
|
|
3618
|
-
};
|
|
3619
|
-
const closedTransform = {
|
|
3620
|
-
left: "-translate-x-full",
|
|
3621
|
-
right: "translate-x-full",
|
|
3622
|
-
top: "-translate-y-full",
|
|
3623
|
-
bottom: "translate-y-full"
|
|
3624
|
-
};
|
|
3625
|
-
const openTransform = "translate-x-0 translate-y-0";
|
|
3626
|
-
const panelTransform = noAnimation ? "" : getPhaseClass(openTransform, closedTransform[position]);
|
|
3627
|
-
const overlayOpacity = noAnimation ? "opacity-100" : getPhaseClass("opacity-100", "opacity-0");
|
|
3628
|
-
const handleKeyDown = (e) => {
|
|
3629
|
-
if (e.key === "Escape" && closeOnEscape) {
|
|
3630
|
-
e.stopPropagation();
|
|
3631
|
-
onClose();
|
|
3632
|
-
}
|
|
3633
|
-
};
|
|
3634
|
-
const panel = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
3635
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3636
|
-
"button",
|
|
3637
|
-
{
|
|
3638
|
-
type: "button",
|
|
3639
|
-
className: `fixed inset-0 z-[999] bg-black/50 backdrop-blur-sm transition-opacity duration-[250ms] ease-in-out ${overlayOpacity} border-0 p-0 m-0`,
|
|
3640
|
-
"aria-label": closeOnOutside ? "Close overlay" : void 0,
|
|
3641
|
-
"aria-hidden": !closeOnOutside,
|
|
3642
|
-
tabIndex: closeOnOutside ? 0 : -1,
|
|
3643
|
-
onClick: () => closeOnOutside && onClose(),
|
|
3644
|
-
onKeyDown: (e) => {
|
|
3645
|
-
if (!closeOnOutside) return;
|
|
3646
|
-
if (e.key === "Enter" || e.key === " ") {
|
|
3647
|
-
e.preventDefault();
|
|
3648
|
-
onClose();
|
|
3649
|
-
}
|
|
3650
|
-
},
|
|
3651
|
-
"data-phase": phase
|
|
3652
|
-
}
|
|
3653
|
-
),
|
|
3654
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
3655
|
-
"div",
|
|
3656
|
-
{
|
|
3657
|
-
ref,
|
|
3658
|
-
role: "dialog",
|
|
3659
|
-
"aria-modal": "true",
|
|
3660
|
-
"aria-label": title || "Drawer",
|
|
3661
|
-
tabIndex: -1,
|
|
3662
|
-
"data-phase": phase,
|
|
3663
|
-
"data-position": position,
|
|
3664
|
-
className: `fixed ${edgeClasses[position]} ${position === "left" || position === "right" ? sizeClasses[size] : ""} bg-card text-card-foreground shadow-2xl z-[1000] flex flex-col outline-none ${panelTransform} ${noAnimation ? "" : "transition-transform duration-[250ms] ease-out will-change-transform"} ${className}`,
|
|
3665
|
-
onKeyDown: handleKeyDown,
|
|
3666
|
-
children: [
|
|
3667
|
-
title && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between px-5 py-4 border-b border-border/60 bg-card/95 backdrop-blur-sm", children: [
|
|
3668
|
-
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-base font-semibold tracking-tight", children: title }),
|
|
3669
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3670
|
-
"button",
|
|
3671
|
-
{
|
|
3672
|
-
type: "button",
|
|
3673
|
-
"aria-label": "Close drawer",
|
|
3674
|
-
onClick: onClose,
|
|
3675
|
-
className: "w-8 h-8 inline-flex items-center justify-center rounded-md hover:bg-muted focus:outline-none focus:ring-2 focus:ring-ring",
|
|
3676
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3677
|
-
"svg",
|
|
3678
|
-
{
|
|
3679
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
3680
|
-
width: "18",
|
|
3681
|
-
height: "18",
|
|
3682
|
-
viewBox: "0 0 24 24",
|
|
3683
|
-
fill: "none",
|
|
3684
|
-
stroke: "currentColor",
|
|
3685
|
-
strokeWidth: "2",
|
|
3686
|
-
strokeLinecap: "round",
|
|
3687
|
-
strokeLinejoin: "round",
|
|
3688
|
-
children: [
|
|
3689
|
-
/* @__PURE__ */ jsxRuntime.jsx("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
|
|
3690
|
-
/* @__PURE__ */ jsxRuntime.jsx("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
|
|
3691
|
-
]
|
|
3692
|
-
}
|
|
3693
|
-
)
|
|
3694
|
-
}
|
|
3695
|
-
)
|
|
3696
|
-
] }),
|
|
3697
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 overflow-y-auto p-5 flex flex-col gap-4", children })
|
|
3698
|
-
]
|
|
3699
|
-
}
|
|
3700
|
-
)
|
|
3701
|
-
] });
|
|
3702
|
-
return portalRoot ? reactDom.createPortal(panel, portalRoot) : panel;
|
|
3703
|
-
}
|
|
3704
|
-
Drawer.displayName = "Drawer";
|
|
3705
|
-
var drawer_default = Drawer;
|
|
3706
|
-
function Page({ children, className = "" }) {
|
|
3707
|
-
return /* @__PURE__ */ jsxRuntime.jsx("main", { className: `min-h-screen bg-background ${className}`, children });
|
|
3708
|
-
}
|
|
3709
|
-
Page.displayName = "Page";
|
|
3710
|
-
var page_default = Page;
|
|
3711
|
-
function AccordionItem({ title, children, defaultOpen = false }) {
|
|
3712
|
-
const [isOpen, setIsOpen] = React5.useState(defaultOpen);
|
|
3713
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("article", { className: "border-b border-border", children: [
|
|
3714
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
3715
|
-
"button",
|
|
3716
|
-
{
|
|
3717
|
-
onClick: () => setIsOpen(!isOpen),
|
|
3718
|
-
className: "w-full flex items-center justify-between py-4 px-2 text-left text-foreground hover:bg-muted/50 active:bg-muted transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 rounded-sm",
|
|
3719
|
-
"aria-expanded": isOpen,
|
|
3720
|
-
children: [
|
|
3721
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium", children: title }),
|
|
3722
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3723
|
-
"svg",
|
|
3724
|
-
{
|
|
3725
|
-
className: `w-5 h-5 transition-transform ${isOpen ? "rotate-180" : ""}`,
|
|
3726
|
-
fill: "none",
|
|
3727
|
-
stroke: "currentColor",
|
|
3728
|
-
viewBox: "0 0 24 24",
|
|
3729
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 9l-7 7-7-7" })
|
|
3730
|
-
}
|
|
3731
|
-
)
|
|
3732
|
-
]
|
|
3733
|
-
}
|
|
3734
|
-
),
|
|
3735
|
-
isOpen && /* @__PURE__ */ jsxRuntime.jsx("section", { className: "px-2 pb-4 text-muted-foreground", children })
|
|
3736
|
-
] });
|
|
3737
|
-
}
|
|
3738
|
-
function Accordion({ children, className = "" }) {
|
|
3739
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `divide-y divide-border ${className}`, children });
|
|
3740
|
-
}
|
|
3741
|
-
Accordion.displayName = "Accordion";
|
|
3742
|
-
var accordion_default = Accordion;
|
|
3743
|
-
function Hero({
|
|
3744
|
-
title,
|
|
3745
|
-
subtitle,
|
|
3746
|
-
description,
|
|
3747
|
-
primaryAction,
|
|
3748
|
-
secondaryAction,
|
|
3749
|
-
children,
|
|
3750
|
-
className = "",
|
|
3751
|
-
variant = "gradient",
|
|
3752
|
-
centered = true,
|
|
3753
|
-
size = "lg"
|
|
3754
|
-
}) {
|
|
3755
|
-
const sizeClasses = {
|
|
3756
|
-
sm: "py-12 md:py-16",
|
|
3757
|
-
md: "py-16 md:py-20",
|
|
3758
|
-
lg: "py-20 md:py-28"
|
|
3759
|
-
};
|
|
3760
|
-
const titleSizes = {
|
|
3761
|
-
sm: "text-3xl md:text-4xl",
|
|
3762
|
-
md: "text-4xl md:text-5xl",
|
|
3763
|
-
lg: "text-5xl md:text-6xl lg:text-7xl"
|
|
3764
|
-
};
|
|
3765
|
-
const variantClasses = {
|
|
3766
|
-
gradient: "bg-gradient-to-b from-primary/10 via-primary/5 to-background",
|
|
3767
|
-
solid: "bg-muted/30",
|
|
3768
|
-
minimal: "bg-background"
|
|
3769
|
-
};
|
|
3770
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: `relative ${sizeClasses[size]} ${variantClasses[variant]} ${className}`, children: [
|
|
3771
|
-
variant === "gradient" && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-x-0 top-0 h-px bg-gradient-to-r from-transparent via-primary/20 to-transparent" }),
|
|
3772
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-x-0 bottom-0 h-32 bg-gradient-to-t from-background to-transparent pointer-events-none" }),
|
|
3773
|
-
/* @__PURE__ */ jsxRuntime.jsx(container_default, { size: "lg", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: centered ? "text-center mx-auto max-w-4xl" : "max-w-4xl", children: [
|
|
3774
|
-
subtitle && /* @__PURE__ */ jsxRuntime.jsx(text_default, { className: "text-lg md:text-xl font-semibold text-primary mb-4", weight: "semibold", children: subtitle }),
|
|
3775
|
-
/* @__PURE__ */ jsxRuntime.jsx(heading_default, { level: 1, className: `${titleSizes[size]} font-extrabold mb-6 tracking-tight`, children: title }),
|
|
3776
|
-
description && /* @__PURE__ */ jsxRuntime.jsx(text_default, { className: "text-lg md:text-xl mb-8 text-muted-foreground max-w-2xl mx-auto", children: description }),
|
|
3777
|
-
(primaryAction || secondaryAction) && /* @__PURE__ */ jsxRuntime.jsxs(stack_default, { direction: "horizontal", spacing: "md", className: `flex-wrap ${centered ? "justify-center" : ""}`, children: [
|
|
3778
|
-
primaryAction && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3779
|
-
button_default,
|
|
3780
|
-
{
|
|
3781
|
-
size: "lg",
|
|
3782
|
-
variant: primaryAction.variant || "primary",
|
|
3783
|
-
style: primaryAction.style,
|
|
3784
|
-
onClick: primaryAction.onClick,
|
|
3785
|
-
loading: primaryAction.loading,
|
|
3786
|
-
icon: primaryAction.icon,
|
|
3787
|
-
className: "shadow-lg shadow-primary/20 hover:shadow-xl hover:shadow-primary/30 transition-all",
|
|
3788
|
-
children: primaryAction.label
|
|
3789
|
-
}
|
|
3790
|
-
),
|
|
3791
|
-
secondaryAction && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3792
|
-
button_default,
|
|
3793
|
-
{
|
|
3794
|
-
size: "lg",
|
|
3795
|
-
variant: secondaryAction.variant || "neutral",
|
|
3796
|
-
style: secondaryAction.style || "outline",
|
|
3797
|
-
onClick: secondaryAction.onClick,
|
|
3798
|
-
loading: secondaryAction.loading,
|
|
3799
|
-
icon: secondaryAction.icon,
|
|
3800
|
-
className: "hover:shadow-md transition-all",
|
|
3801
|
-
children: secondaryAction.label
|
|
3802
|
-
}
|
|
3803
|
-
)
|
|
3804
|
-
] }),
|
|
3805
|
-
children && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-10", children })
|
|
3806
|
-
] }) })
|
|
3807
|
-
] });
|
|
3808
|
-
}
|
|
3809
|
-
Hero.displayName = "Hero";
|
|
3810
|
-
var hero_default = Hero;
|
|
3811
|
-
function FeatureSection({
|
|
3812
|
-
title,
|
|
3813
|
-
description,
|
|
3814
|
-
features,
|
|
3815
|
-
columns = 3,
|
|
3816
|
-
centered = true,
|
|
3817
|
-
className = ""
|
|
3818
|
-
}) {
|
|
3819
|
-
return /* @__PURE__ */ jsxRuntime.jsx("section", { className: `py-16 md:py-20 ${className}`, children: /* @__PURE__ */ jsxRuntime.jsxs(container_default, { size: "xl", children: [
|
|
3820
|
-
(title || description) && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3821
|
-
"div",
|
|
3822
|
-
{
|
|
3823
|
-
className: `mb-12 md:mb-16 ${centered ? "text-center" : ""} ${centered ? "max-w-3xl mx-auto" : "max-w-3xl"}`,
|
|
3824
|
-
children: [
|
|
3825
|
-
title && /* @__PURE__ */ jsxRuntime.jsx(heading_default, { level: 2, className: "text-3xl md:text-4xl font-bold mb-4", children: title }),
|
|
3826
|
-
description && /* @__PURE__ */ jsxRuntime.jsx(text_default, { className: "text-lg md:text-xl", children: description })
|
|
3827
|
-
]
|
|
3828
|
-
}
|
|
3829
|
-
),
|
|
3830
|
-
/* @__PURE__ */ jsxRuntime.jsx(grid_default, { itemSize: "md", maxCols: columns, gap: "lg", children: features.map((feature, index) => /* @__PURE__ */ jsxRuntime.jsxs("article", { className: centered ? "text-center" : "", children: [
|
|
3831
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3832
|
-
"span",
|
|
3833
|
-
{
|
|
3834
|
-
className: `inline-flex items-center justify-center w-12 h-12 md:w-16 md:h-16 rounded-lg md:rounded-xl bg-primary/10 text-primary mb-4 md:mb-6 ${centered ? "" : "mr-auto"}`,
|
|
3835
|
-
children: feature.icon
|
|
3836
|
-
}
|
|
3837
|
-
),
|
|
3838
|
-
/* @__PURE__ */ jsxRuntime.jsx(heading_default, { level: 3, className: "text-xl font-semibold mb-2 md:mb-3", children: feature.title }),
|
|
3839
|
-
/* @__PURE__ */ jsxRuntime.jsx(text_default, { variant: "muted", className: "text-sm md:text-base", children: feature.description })
|
|
3840
|
-
] }, index)) })
|
|
3841
|
-
] }) });
|
|
3842
|
-
}
|
|
3843
|
-
FeatureSection.displayName = "FeatureSection";
|
|
3844
|
-
var feature_section_default = FeatureSection;
|
|
3845
|
-
function Link2({
|
|
3846
|
-
children,
|
|
3847
|
-
href,
|
|
3848
|
-
external = false,
|
|
3849
|
-
variant = "default",
|
|
3850
|
-
underline = "hover",
|
|
3851
|
-
size = "md",
|
|
3852
|
-
display = "inline",
|
|
3853
|
-
className = ""
|
|
3854
|
-
}) {
|
|
3855
|
-
const variantClasses = {
|
|
3856
|
-
default: "text-primary hover:text-primary/80",
|
|
3857
|
-
muted: "text-muted-foreground hover:text-foreground",
|
|
3858
|
-
secondary: "text-secondary hover:text-secondary/80",
|
|
3859
|
-
inherit: "text-inherit hover:opacity-80"
|
|
3860
|
-
};
|
|
3861
|
-
const underlineClasses = {
|
|
3862
|
-
hover: "hover:underline",
|
|
3863
|
-
always: "underline",
|
|
3864
|
-
none: "no-underline"
|
|
3865
|
-
};
|
|
3866
|
-
const sizeClasses = {
|
|
3867
|
-
sm: "text-sm",
|
|
3868
|
-
md: "text-base",
|
|
3869
|
-
lg: "text-lg"
|
|
3870
|
-
};
|
|
3871
|
-
const displayClasses = {
|
|
3872
|
-
inline: "inline",
|
|
3873
|
-
block: "block"
|
|
3874
|
-
};
|
|
3875
|
-
const linkClassName = [
|
|
3876
|
-
variantClasses[variant],
|
|
3877
|
-
underlineClasses[underline],
|
|
3878
|
-
sizeClasses[size],
|
|
3879
|
-
displayClasses[display],
|
|
3880
|
-
"cursor-pointer transition-colors",
|
|
3881
|
-
className
|
|
3882
|
-
].filter(Boolean).join(" ");
|
|
3883
|
-
if (external) {
|
|
3884
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("a", { href, className: linkClassName, target: "_blank", rel: "noopener noreferrer", children: [
|
|
3885
|
-
children,
|
|
3886
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3887
|
-
"svg",
|
|
3888
|
-
{
|
|
3889
|
-
className: "inline-block w-4 h-4 ml-1",
|
|
3890
|
-
fill: "none",
|
|
3891
|
-
stroke: "currentColor",
|
|
3892
|
-
viewBox: "0 0 24 24",
|
|
3893
|
-
"aria-hidden": "true",
|
|
3894
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3895
|
-
"path",
|
|
3896
|
-
{
|
|
3897
|
-
strokeLinecap: "round",
|
|
3898
|
-
strokeLinejoin: "round",
|
|
3899
|
-
strokeWidth: 2,
|
|
3900
|
-
d: "M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"
|
|
3901
|
-
}
|
|
3902
|
-
)
|
|
3903
|
-
}
|
|
3904
|
-
)
|
|
3905
|
-
] });
|
|
3906
|
-
}
|
|
3907
|
-
return /* @__PURE__ */ jsxRuntime.jsx(reactRouterDom.Link, { to: href, className: linkClassName, children });
|
|
3908
|
-
}
|
|
3909
|
-
Link2.displayName = "Link";
|
|
3910
|
-
var link_default = Link2;
|
|
3911
|
-
function Footer({ sections, copyright, social, className = "" }) {
|
|
3912
|
-
return /* @__PURE__ */ jsxRuntime.jsx("footer", { className: `border-t border-border bg-muted/20 ${className}`, children: /* @__PURE__ */ jsxRuntime.jsxs(container_default, { children: [
|
|
3913
|
-
sections && sections.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "py-12 md:py-16", children: /* @__PURE__ */ jsxRuntime.jsx(grid_default, { itemSize: "xs", maxCols: 4, gap: "lg", children: sections.map((section, index) => /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
3914
|
-
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "font-semibold text-foreground mb-4", children: section.title }),
|
|
3915
|
-
/* @__PURE__ */ jsxRuntime.jsx("ul", { className: "space-y-3", children: section.links.map((link, linkIndex) => /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3916
|
-
link_default,
|
|
3917
|
-
{
|
|
3918
|
-
href: link.href,
|
|
3919
|
-
external: link.external,
|
|
3920
|
-
className: "text-sm text-muted hover:text-foreground transition-colors",
|
|
3921
|
-
children: link.label
|
|
3922
|
-
}
|
|
3923
|
-
) }, linkIndex)) })
|
|
3924
|
-
] }, index)) }) }),
|
|
3925
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
3926
|
-
"div",
|
|
3927
|
-
{
|
|
3928
|
-
className: `${sections && sections.length > 0 ? "border-t border-border" : ""} py-6 flex flex-col md:flex-row items-center justify-between gap-4`,
|
|
3929
|
-
children: [
|
|
3930
|
-
copyright && /* @__PURE__ */ jsxRuntime.jsx(text_default, { variant: "muted", className: "text-sm text-center md:text-left", children: copyright }),
|
|
3931
|
-
social && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center space-x-4", children: social })
|
|
3932
|
-
]
|
|
3933
|
-
}
|
|
3934
|
-
)
|
|
3935
|
-
] }) });
|
|
3936
|
-
}
|
|
3937
|
-
Footer.displayName = "Footer";
|
|
3938
|
-
var footer_default = Footer;
|
|
3939
|
-
function useScrollReset(deps, container) {
|
|
3940
|
-
React5.useEffect(() => {
|
|
3941
|
-
let cancelled = false;
|
|
3942
|
-
const maxRaf = 6;
|
|
3943
|
-
let rafCount = 0;
|
|
3944
|
-
const isRef = (obj) => {
|
|
3945
|
-
return typeof obj === "object" && obj !== null && "current" in obj;
|
|
3946
|
-
};
|
|
3947
|
-
const setAllScrollTop = () => {
|
|
3948
|
-
if (cancelled) return;
|
|
3949
|
-
window.scrollTo(0, 0);
|
|
3950
|
-
const resolved = isRef(container) ? container.current : container;
|
|
3951
|
-
if (resolved) resolved.scrollTop = 0;
|
|
3952
|
-
document.documentElement.scrollTop = 0;
|
|
3953
|
-
document.body.scrollTop = 0;
|
|
3954
|
-
};
|
|
3955
|
-
setAllScrollTop();
|
|
3956
|
-
Promise.resolve().then(() => setAllScrollTop());
|
|
3957
|
-
const timeoutId = setTimeout(() => setAllScrollTop(), 0);
|
|
3958
|
-
const loop = () => {
|
|
3959
|
-
if (cancelled) return;
|
|
3960
|
-
setAllScrollTop();
|
|
3961
|
-
rafCount += 1;
|
|
3962
|
-
if (rafCount < maxRaf) requestAnimationFrame(loop);
|
|
3963
|
-
};
|
|
3964
|
-
requestAnimationFrame(loop);
|
|
3965
|
-
return () => {
|
|
3966
|
-
cancelled = true;
|
|
3967
|
-
clearTimeout(timeoutId);
|
|
3968
|
-
};
|
|
3969
|
-
}, deps);
|
|
3970
|
-
}
|
|
3971
|
-
var useScrollReset_default = useScrollReset;
|
|
3972
|
-
function LeftNavLayout({
|
|
3973
|
-
nav,
|
|
3974
|
-
children,
|
|
3975
|
-
collapsed: controlledCollapsed,
|
|
3976
|
-
onCollapsedChange,
|
|
3977
|
-
showToggle = true,
|
|
3978
|
-
className = "",
|
|
3979
|
-
navClassName = "",
|
|
3980
|
-
contentClassName = "",
|
|
3981
|
-
navWidth = "16rem",
|
|
3982
|
-
navWidthCollapsed = "4.5rem",
|
|
3983
|
-
mobileCollapsible = true,
|
|
3984
|
-
mobileMenuOpen: controlledMobileMenuOpen,
|
|
3985
|
-
onMobileMenuOpenChange,
|
|
3986
|
-
embedded = false,
|
|
3987
|
-
mainContentRef
|
|
3988
|
-
}) {
|
|
3989
|
-
const [internalCollapsed, setInternalCollapsed] = React5.useState(false);
|
|
3990
|
-
const [internalMobileMenuOpen, setInternalMobileMenuOpen] = React5.useState(false);
|
|
3991
|
-
const navRef = React5.useRef(null);
|
|
3992
|
-
const scrollPosRef = React5.useRef(0);
|
|
3993
|
-
const internalContentRef = React5.useRef(null);
|
|
3994
|
-
const contentRef = mainContentRef || internalContentRef;
|
|
3995
|
-
const collapsed = controlledCollapsed ?? internalCollapsed;
|
|
3996
|
-
const setCollapsed = (value) => {
|
|
3997
|
-
if (onCollapsedChange) {
|
|
3998
|
-
onCollapsedChange(value);
|
|
3999
|
-
} else {
|
|
4000
|
-
setInternalCollapsed(value);
|
|
4001
|
-
}
|
|
4002
|
-
};
|
|
4003
|
-
const mobileMenuOpen = controlledMobileMenuOpen ?? internalMobileMenuOpen;
|
|
4004
|
-
const setMobileMenuOpen = (value) => {
|
|
4005
|
-
if (onMobileMenuOpenChange) {
|
|
4006
|
-
onMobileMenuOpenChange(value);
|
|
4007
|
-
} else {
|
|
4008
|
-
setInternalMobileMenuOpen(value);
|
|
4009
|
-
}
|
|
4010
|
-
};
|
|
4011
|
-
const toggleCollapsed = () => setCollapsed(!collapsed);
|
|
4012
|
-
const toggleMobileMenu = () => setMobileMenuOpen(!mobileMenuOpen);
|
|
4013
|
-
React5.useEffect(() => {
|
|
4014
|
-
if (navRef.current) {
|
|
4015
|
-
navRef.current.scrollTop = scrollPosRef.current;
|
|
4016
|
-
}
|
|
4017
|
-
}, [children]);
|
|
4018
|
-
useScrollReset_default([children], contentRef);
|
|
4019
|
-
const containerClasses = embedded ? "flex bg-background border border-border rounded-lg overflow-hidden" : "flex h-[calc(100vh-4rem)] bg-background";
|
|
4020
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${containerClasses} ${className}`, children: [
|
|
4021
|
-
mobileCollapsible && mobileMenuOpen && /* @__PURE__ */ jsxRuntime.jsx(
|
|
4022
|
-
"div",
|
|
4023
|
-
{
|
|
4024
|
-
className: "fixed inset-0 z-40 lg:hidden bg-background/80 backdrop-blur-sm",
|
|
4025
|
-
onClick: toggleMobileMenu,
|
|
4026
|
-
"aria-hidden": "true"
|
|
4027
|
-
}
|
|
4028
|
-
),
|
|
4029
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
4030
|
-
"aside",
|
|
4031
|
-
{
|
|
4032
|
-
className: `
|
|
4033
|
-
${embedded ? "relative flex flex-col h-full" : "fixed lg:relative top-0 left-0 z-40 lg:z-10 h-screen lg:h-full"}
|
|
4034
|
-
flex flex-col flex-shrink-0
|
|
4035
|
-
bg-background border-r border-border
|
|
4036
|
-
transition-all duration-300 ease-in-out
|
|
4037
|
-
${!embedded && mobileCollapsible && !mobileMenuOpen ? "-translate-x-full lg:translate-x-0" : "translate-x-0"}
|
|
4038
|
-
${collapsed ? "w-[4.5rem]" : "w-64"}
|
|
4039
|
-
${navClassName}
|
|
4040
|
-
`,
|
|
4041
|
-
style: !collapsed && navWidth !== "16rem" || collapsed && navWidthCollapsed !== "4.5rem" ? {
|
|
4042
|
-
width: collapsed ? navWidthCollapsed : navWidth
|
|
4043
|
-
} : void 0,
|
|
4044
|
-
"aria-label": "Main navigation",
|
|
4045
|
-
children: [
|
|
4046
|
-
showToggle && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4047
|
-
"div",
|
|
4048
|
-
{
|
|
4049
|
-
className: `
|
|
4050
|
-
relative flex items-center h-12 flex-shrink-0
|
|
4051
|
-
px-4 border-b border-border
|
|
4052
|
-
`,
|
|
4053
|
-
children: [
|
|
4054
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4055
|
-
"span",
|
|
4056
|
-
{
|
|
4057
|
-
className: `
|
|
4058
|
-
text-sm font-semibold text-foreground
|
|
4059
|
-
transition-all duration-300 ease-in-out
|
|
4060
|
-
${collapsed ? "opacity-0 w-0 overflow-hidden" : "opacity-100"}
|
|
4061
|
-
`,
|
|
4062
|
-
children: "Navigation"
|
|
4063
|
-
}
|
|
4064
|
-
),
|
|
4065
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4066
|
-
"button",
|
|
4067
|
-
{
|
|
4068
|
-
onClick: toggleCollapsed,
|
|
4069
|
-
className: `
|
|
4070
|
-
hidden lg:flex items-center justify-center
|
|
4071
|
-
w-8 h-8 rounded-md
|
|
4072
|
-
text-muted-foreground hover:text-foreground
|
|
4073
|
-
hover:bg-muted
|
|
4074
|
-
transition-all duration-300 ease-in-out
|
|
4075
|
-
focus:outline-none focus:ring-2 focus:ring-ring
|
|
4076
|
-
${collapsed ? "absolute left-1/2 -translate-x-1/2" : "absolute right-4"}
|
|
4077
|
-
`,
|
|
4078
|
-
"aria-label": collapsed ? "Expand sidebar" : "Collapse sidebar",
|
|
4079
|
-
type: "button",
|
|
4080
|
-
children: collapsed ? /* @__PURE__ */ jsxRuntime.jsx(iconsReact.IconChevronRight, { size: 20 }) : /* @__PURE__ */ jsxRuntime.jsx(iconsReact.IconChevronLeft, { size: 20 })
|
|
4081
|
-
}
|
|
4082
|
-
)
|
|
4083
|
-
]
|
|
4084
|
-
}
|
|
4085
|
-
),
|
|
4086
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4087
|
-
"nav",
|
|
4088
|
-
{
|
|
4089
|
-
ref: navRef,
|
|
4090
|
-
className: "flex-1 overflow-y-auto overflow-x-hidden scrollbar-thin",
|
|
4091
|
-
"data-collapsed": collapsed,
|
|
4092
|
-
onScroll: (e) => {
|
|
4093
|
-
scrollPosRef.current = e.currentTarget.scrollTop;
|
|
4094
|
-
},
|
|
4095
|
-
children: nav
|
|
4096
|
-
}
|
|
4097
|
-
)
|
|
4098
|
-
]
|
|
4099
|
-
}
|
|
4100
|
-
),
|
|
4101
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4102
|
-
"main",
|
|
4103
|
-
{
|
|
4104
|
-
ref: contentRef,
|
|
4105
|
-
className: `flex-1 overflow-auto ${embedded ? "h-60" : ""} ${contentClassName}`,
|
|
4106
|
-
children
|
|
4107
|
-
}
|
|
4108
|
-
)
|
|
4109
|
-
] });
|
|
4110
|
-
}
|
|
4111
|
-
LeftNavLayout.displayName = "LeftNavLayout";
|
|
4112
|
-
var left_nav_layout_default = LeftNavLayout;
|
|
4113
|
-
function LeftNavItem({
|
|
4114
|
-
icon,
|
|
4115
|
-
children,
|
|
4116
|
-
active = false,
|
|
4117
|
-
className = "",
|
|
4118
|
-
badge,
|
|
4119
|
-
href = "#",
|
|
4120
|
-
title,
|
|
4121
|
-
preventNavigation = false
|
|
4122
|
-
}) {
|
|
4123
|
-
const navRef = React5.useRef(null);
|
|
4124
|
-
const [isCollapsed, setIsCollapsed] = React5.useState(() => {
|
|
4125
|
-
if (typeof window !== "undefined") {
|
|
4126
|
-
const navElement = document.querySelector("nav[data-collapsed]");
|
|
4127
|
-
return navElement?.getAttribute("data-collapsed") === "true";
|
|
4128
|
-
}
|
|
4129
|
-
return false;
|
|
4130
|
-
});
|
|
4131
|
-
React5.useEffect(() => {
|
|
4132
|
-
const checkCollapsed = () => {
|
|
4133
|
-
const navElement2 = navRef.current?.closest("nav");
|
|
4134
|
-
if (navElement2) {
|
|
4135
|
-
setIsCollapsed(navElement2.getAttribute("data-collapsed") === "true");
|
|
4136
|
-
}
|
|
4137
|
-
};
|
|
4138
|
-
checkCollapsed();
|
|
4139
|
-
const navElement = navRef.current?.closest("nav");
|
|
4140
|
-
if (navElement) {
|
|
4141
|
-
const observer = new MutationObserver(checkCollapsed);
|
|
4142
|
-
observer.observe(navElement, {
|
|
4143
|
-
attributes: true,
|
|
4144
|
-
attributeFilter: ["data-collapsed"]
|
|
4145
|
-
});
|
|
4146
|
-
return () => observer.disconnect();
|
|
4147
|
-
}
|
|
4148
|
-
return void 0;
|
|
4149
|
-
}, []);
|
|
4150
|
-
const itemTitle = title || (typeof children === "string" ? children : void 0);
|
|
4151
|
-
const navLink = /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4152
|
-
reactRouterDom.NavLink,
|
|
4153
|
-
{
|
|
4154
|
-
ref: navRef,
|
|
4155
|
-
to: href,
|
|
4156
|
-
onClick: (e) => {
|
|
4157
|
-
if (preventNavigation) {
|
|
4158
|
-
e.preventDefault();
|
|
4159
|
-
}
|
|
4160
|
-
},
|
|
4161
|
-
className: ({ isActive }) => `
|
|
4162
|
-
group relative flex items-center gap-3
|
|
4163
|
-
px-3 py-2.5 rounded-lg
|
|
4164
|
-
mx-2
|
|
4165
|
-
[nav[data-collapsed='true']_&]:mx-2
|
|
4166
|
-
[nav[data-collapsed='true']_&]:px-0
|
|
4167
|
-
[nav[data-collapsed='true']_&]:w-12
|
|
4168
|
-
[nav[data-collapsed='true']_&]:justify-center
|
|
4169
|
-
text-sm font-medium
|
|
4170
|
-
transition-colors duration-200
|
|
4171
|
-
focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:ring-offset-card
|
|
4172
|
-
${isActive || active ? "bg-primary text-primary-foreground shadow-sm" : "text-foreground hover:bg-muted hover:text-foreground"}
|
|
4173
|
-
${className}
|
|
4174
|
-
`,
|
|
4175
|
-
"aria-current": active ? "page" : void 0,
|
|
4176
|
-
"aria-label": itemTitle,
|
|
4177
|
-
end: true,
|
|
4178
|
-
children: [
|
|
4179
|
-
icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-shrink-0", "aria-hidden": "true", children: icon }),
|
|
4180
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4181
|
-
"span",
|
|
4182
|
-
{
|
|
4183
|
-
className: "\n flex-1 truncate\n [nav[data-collapsed='true']_&]:hidden\n ",
|
|
4184
|
-
children
|
|
4185
|
-
}
|
|
4186
|
-
),
|
|
4187
|
-
badge && /* @__PURE__ */ jsxRuntime.jsx(
|
|
4188
|
-
"span",
|
|
4189
|
-
{
|
|
4190
|
-
className: "\n flex-shrink-0\n [nav[data-collapsed='true']_&]:hidden\n ",
|
|
4191
|
-
children: badge
|
|
4192
|
-
}
|
|
4193
|
-
)
|
|
4194
|
-
]
|
|
4195
|
-
}
|
|
4196
|
-
);
|
|
4197
|
-
if (!isCollapsed) {
|
|
4198
|
-
return navLink;
|
|
4199
|
-
}
|
|
4200
|
-
const tooltipContent = typeof children === "string" ? children : itemTitle || "Menu Item";
|
|
4201
|
-
return /* @__PURE__ */ jsxRuntime.jsx(tooltip_default, { content: tooltipContent, position: "right", variant: "default", usePortal: true, className: "w-full block", children: navLink });
|
|
4202
|
-
}
|
|
4203
|
-
LeftNavItem.displayName = "LeftNavItem";
|
|
4204
|
-
var left_nav_item_default = LeftNavItem;
|
|
4205
|
-
function LeftNavSection({ children, label, className = "" }) {
|
|
4206
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `py-2 ${className}`, children: [
|
|
4207
|
-
label && /* @__PURE__ */ jsxRuntime.jsx(
|
|
4208
|
-
"h3",
|
|
4209
|
-
{
|
|
4210
|
-
className: "\n px-5 mb-2 mt-2\n text-xs font-semibold uppercase tracking-wider\n text-muted-foreground\n [nav[data-collapsed='true']_&]:hidden\n ",
|
|
4211
|
-
children: label
|
|
4212
|
-
}
|
|
4213
|
-
),
|
|
4214
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-1", children }),
|
|
4215
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-px bg-border mx-3 mt-2", "aria-hidden": "true" })
|
|
4216
|
-
] });
|
|
4217
|
-
}
|
|
4218
|
-
LeftNavSection.displayName = "LeftNavSection";
|
|
4219
|
-
var left_nav_section_default = LeftNavSection;
|
|
4220
|
-
function Code({ children, block = false, variant = "default", className = "" }) {
|
|
4221
|
-
const variantClasses = {
|
|
4222
|
-
default: "bg-muted text-foreground",
|
|
4223
|
-
primary: "text-primary",
|
|
4224
|
-
muted: "text-muted-foreground"
|
|
4225
|
-
};
|
|
4226
|
-
const baseClasses = `font-mono ${variantClasses[variant]}`;
|
|
4227
|
-
if (block) {
|
|
4228
|
-
return /* @__PURE__ */ jsxRuntime.jsx("pre", { className: `${baseClasses} p-4 rounded-lg overflow-x-auto border border-border ${className}`, children: /* @__PURE__ */ jsxRuntime.jsx("code", { children }) });
|
|
4229
|
-
}
|
|
4230
|
-
return /* @__PURE__ */ jsxRuntime.jsx("code", { className: `${baseClasses} px-1.5 py-0.5 rounded text-sm ${className}`, children });
|
|
4231
|
-
}
|
|
4232
|
-
Code.displayName = "Code";
|
|
4233
|
-
var code_default = Code;
|
|
4234
|
-
var ThemeContext = React5.createContext(void 0);
|
|
4235
|
-
function ThemeProvider({
|
|
4236
|
-
children,
|
|
4237
|
-
defaultTheme = "light",
|
|
4238
|
-
storageKey = "hydn-theme",
|
|
4239
|
-
themes = ["light", "dark"]
|
|
4240
|
-
}) {
|
|
4241
|
-
const [theme, setThemeState] = React5.useState(() => {
|
|
4242
|
-
if (typeof window !== "undefined") {
|
|
4243
|
-
const stored = localStorage.getItem(storageKey);
|
|
4244
|
-
return stored && themes.includes(stored) ? stored : defaultTheme;
|
|
4245
|
-
}
|
|
4246
|
-
return defaultTheme;
|
|
4247
|
-
});
|
|
4248
|
-
React5.useEffect(() => {
|
|
4249
|
-
const root = window.document.documentElement;
|
|
4250
|
-
root.classList.remove(...themes);
|
|
4251
|
-
root.classList.add(theme);
|
|
4252
|
-
}, [theme, themes]);
|
|
4253
|
-
const setTheme = React5.useCallback(
|
|
4254
|
-
(newTheme) => {
|
|
4255
|
-
if (themes.includes(newTheme)) {
|
|
4256
|
-
localStorage.setItem(storageKey, newTheme);
|
|
4257
|
-
setThemeState(newTheme);
|
|
4258
|
-
} else {
|
|
4259
|
-
console.warn(`Theme "${newTheme}" is not in availableThemes. Add it to the themes prop.`);
|
|
4260
|
-
}
|
|
4261
|
-
},
|
|
4262
|
-
[themes, storageKey]
|
|
4263
|
-
);
|
|
4264
|
-
const value = React5.useMemo(
|
|
4265
|
-
() => ({
|
|
4266
|
-
theme,
|
|
4267
|
-
setTheme,
|
|
4268
|
-
availableThemes: themes
|
|
4269
|
-
}),
|
|
4270
|
-
[theme, themes, setTheme]
|
|
4271
|
-
);
|
|
4272
|
-
return /* @__PURE__ */ jsxRuntime.jsx(ThemeContext.Provider, { value, children });
|
|
4273
|
-
}
|
|
4274
|
-
function useTheme() {
|
|
4275
|
-
const context = React5.useContext(ThemeContext);
|
|
4276
|
-
if (!context) {
|
|
4277
|
-
throw new Error("useTheme must be used within a ThemeProvider");
|
|
4278
|
-
}
|
|
4279
|
-
return context;
|
|
4280
|
-
}
|
|
4281
|
-
function ColorModeToggle({ className = "" }) {
|
|
4282
|
-
const { theme, setTheme } = useTheme();
|
|
4283
|
-
const toggleTheme = () => {
|
|
4284
|
-
setTheme(theme === "light" ? "dark" : "light");
|
|
4285
|
-
};
|
|
4286
|
-
const isDark = theme === "dark";
|
|
4287
|
-
const label = `Switch to ${theme === "light" ? "dark" : "light"} theme`;
|
|
4288
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4289
|
-
"button",
|
|
4290
|
-
{
|
|
4291
|
-
onClick: toggleTheme,
|
|
4292
|
-
className: `relative p-2 rounded-md hover:bg-accent hover:text-accent-foreground transition-colors cursor-pointer ${className}`,
|
|
4293
|
-
"aria-label": label,
|
|
4294
|
-
title: label,
|
|
4295
|
-
children: [
|
|
4296
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4297
|
-
"svg",
|
|
4298
|
-
{
|
|
4299
|
-
className: `w-5 h-5 absolute inset-0 m-auto transition-all duration-300 ${isDark ? "rotate-90 scale-0 opacity-0" : "rotate-0 scale-100 opacity-100"}`,
|
|
4300
|
-
fill: "none",
|
|
4301
|
-
stroke: "currentColor",
|
|
4302
|
-
viewBox: "0 0 24 24",
|
|
4303
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4304
|
-
"path",
|
|
4305
|
-
{
|
|
4306
|
-
strokeLinecap: "round",
|
|
4307
|
-
strokeLinejoin: "round",
|
|
4308
|
-
strokeWidth: 2,
|
|
4309
|
-
d: "M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z"
|
|
4310
|
-
}
|
|
4311
|
-
)
|
|
4312
|
-
}
|
|
4313
|
-
),
|
|
4314
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4315
|
-
"svg",
|
|
4316
|
-
{
|
|
4317
|
-
className: `w-5 h-5 transition-all duration-300 ${isDark ? "rotate-0 scale-100 opacity-100" : "-rotate-90 scale-0 opacity-0"}`,
|
|
4318
|
-
fill: "none",
|
|
4319
|
-
stroke: "currentColor",
|
|
4320
|
-
viewBox: "0 0 24 24",
|
|
4321
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4322
|
-
"path",
|
|
4323
|
-
{
|
|
4324
|
-
strokeLinecap: "round",
|
|
4325
|
-
strokeLinejoin: "round",
|
|
4326
|
-
strokeWidth: 2,
|
|
4327
|
-
d: "M20.354 15.354A9 9 0 018.646 3.646 9.003 9.003 0 0012 21a9.003 9.003 0 008.354-5.646z"
|
|
4328
|
-
}
|
|
4329
|
-
)
|
|
4330
|
-
}
|
|
4331
|
-
)
|
|
4332
|
-
]
|
|
4333
|
-
}
|
|
4334
|
-
);
|
|
4335
|
-
}
|
|
4336
|
-
ColorModeToggle.displayName = "ColorModeToggle";
|
|
4337
|
-
var color_mode_toggle_default = ColorModeToggle;
|
|
4338
|
-
|
|
4339
|
-
exports.Accordion = accordion_default;
|
|
4340
|
-
exports.AccordionItem = AccordionItem;
|
|
4341
|
-
exports.Alert = alert_default;
|
|
4342
|
-
exports.Avatar = avatar_default;
|
|
4343
|
-
exports.Badge = badge_default;
|
|
4344
|
-
exports.Breadcrumbs = breadcrumbs_default;
|
|
4345
|
-
exports.Button = button_default;
|
|
4346
|
-
exports.ButtonGroup = button_group_default;
|
|
4347
|
-
exports.Calendar = calendar_default;
|
|
4348
|
-
exports.Card = card_default;
|
|
4349
|
-
exports.CardActions = card_actions_default;
|
|
4350
|
-
exports.CardBody = card_body_default;
|
|
4351
|
-
exports.CardFigure = card_figure_default;
|
|
4352
|
-
exports.CardFooter = card_footer_default;
|
|
4353
|
-
exports.CardHeader = card_header_default;
|
|
4354
|
-
exports.CardTitle = card_title_default;
|
|
4355
|
-
exports.Checkbox = checkbox_default;
|
|
4356
|
-
exports.Chip = chip_default;
|
|
4357
|
-
exports.Code = code_default;
|
|
4358
|
-
exports.CodeBlock = code_block_default;
|
|
4359
|
-
exports.ColorModeToggle = color_mode_toggle_default;
|
|
4360
|
-
exports.Container = container_default;
|
|
4361
|
-
exports.DataTable = data_table_default;
|
|
4362
|
-
exports.DatePicker = date_picker_default;
|
|
4363
|
-
exports.DeleteDialog = delete_dialog_default;
|
|
4364
|
-
exports.Dialog = dialog_default;
|
|
4365
|
-
exports.Divider = divider_default;
|
|
4366
|
-
exports.Drawer = drawer_default;
|
|
4367
|
-
exports.Dropdown = dropdown_default;
|
|
4368
|
-
exports.EmptyState = empty_state_default;
|
|
4369
|
-
exports.FeatureSection = feature_section_default;
|
|
4370
|
-
exports.Footer = footer_default;
|
|
4371
|
-
exports.FormField = form_field_default;
|
|
4372
|
-
exports.Grid = grid_default;
|
|
4373
|
-
exports.Heading = heading_default;
|
|
4374
|
-
exports.Hero = hero_default;
|
|
4375
|
-
exports.Input = input_default;
|
|
4376
|
-
exports.InputGroup = input_group_default;
|
|
4377
|
-
exports.LeftNavItem = left_nav_item_default;
|
|
4378
|
-
exports.LeftNavLayout = left_nav_layout_default;
|
|
4379
|
-
exports.LeftNavSection = left_nav_section_default;
|
|
4380
|
-
exports.Link = link_default;
|
|
4381
|
-
exports.List = List;
|
|
4382
|
-
exports.ListItem = ListItem;
|
|
4383
|
-
exports.Modal = modal_default;
|
|
4384
|
-
exports.MultiSelect = multi_select_default;
|
|
4385
|
-
exports.Nav = nav_default;
|
|
4386
|
-
exports.Navbar = navbar_default;
|
|
4387
|
-
exports.NavbarBrand = navbar_brand_default;
|
|
4388
|
-
exports.NavbarLink = navbar_link_default;
|
|
4389
|
-
exports.Page = page_default;
|
|
4390
|
-
exports.Pagination = pagination_default;
|
|
4391
|
-
exports.Popover = popover_default;
|
|
4392
|
-
exports.PricingTable = pricing_table_default;
|
|
4393
|
-
exports.PricingTier = pricing_tier_default;
|
|
4394
|
-
exports.ProgressBar = progress_bar_default;
|
|
4395
|
-
exports.Radio = radio_default;
|
|
4396
|
-
exports.RadioGroup = radio_group_default;
|
|
4397
|
-
exports.Select = select_default;
|
|
4398
|
-
exports.SelectItem = select_item_default;
|
|
4399
|
-
exports.Sidebar = sidebar_default;
|
|
4400
|
-
exports.Skeleton = skeleton_default;
|
|
4401
|
-
exports.Slider = slider_default;
|
|
4402
|
-
exports.Spinner = spinner_default;
|
|
4403
|
-
exports.Stack = stack_default;
|
|
4404
|
-
exports.StatusLabel = status_label_default;
|
|
4405
|
-
exports.Stepper = stepper_default;
|
|
4406
|
-
exports.Switch = switch_default;
|
|
4407
|
-
exports.Table = Table;
|
|
4408
|
-
exports.TableBody = TableBody;
|
|
4409
|
-
exports.TableCell = TableCell;
|
|
4410
|
-
exports.TableFooter = TableFooter;
|
|
4411
|
-
exports.TableHeadCell = TableHeadCell;
|
|
4412
|
-
exports.TableHeader = TableHeader;
|
|
4413
|
-
exports.TableRow = TableRow;
|
|
4414
|
-
exports.Tabs = tabs_default;
|
|
4415
|
-
exports.Text = text_default;
|
|
4416
|
-
exports.Textarea = textarea_default;
|
|
4417
|
-
exports.ThemeProvider = ThemeProvider;
|
|
4418
|
-
exports.Timeline = timeline_default;
|
|
4419
|
-
exports.TimelineItem = TimelineItem;
|
|
4420
|
-
exports.Toast = toast_default;
|
|
4421
|
-
exports.Tooltip = tooltip_default;
|
|
4422
|
-
exports.useTable = useTable;
|
|
4423
|
-
exports.useTheme = useTheme;
|
|
4424
|
-
//# sourceMappingURL=index.cjs.map
|
|
4425
|
-
//# sourceMappingURL=index.cjs.map
|