@slipstream-ui/core 0.8.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +203 -8
- package/dist/index.d.ts +203 -8
- package/dist/index.js +1737 -965
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1729 -961
- package/dist/index.mjs.map +1 -1
- package/dist/manifests/accordion.manifest.json +2 -2
- package/dist/manifests/alert.manifest.json +1 -1
- package/dist/manifests/announcement-bar.manifest.json +1 -1
- package/dist/manifests/app-shell.manifest.json +1 -1
- package/dist/manifests/applied-filters.manifest.json +1 -1
- package/dist/manifests/article-card.manifest.json +1 -1
- package/dist/manifests/auth-layout.manifest.json +1 -1
- package/dist/manifests/autocomplete.manifest.json +1 -1
- package/dist/manifests/avatar.manifest.json +1 -1
- package/dist/manifests/badge.manifest.json +1 -1
- package/dist/manifests/block.manifest.json +1 -1
- package/dist/manifests/bottom-nav.manifest.json +1 -1
- package/dist/manifests/breadcrumb.manifest.json +1 -1
- package/dist/manifests/button-group.manifest.json +1 -1
- package/dist/manifests/button.manifest.json +1 -1
- package/dist/manifests/calendar.manifest.json +175 -0
- package/dist/manifests/card.manifest.json +1 -1
- package/dist/manifests/checkbox.manifest.json +1 -1
- package/dist/manifests/comparison-table.manifest.json +1 -1
- package/dist/manifests/confirm-dialog.manifest.json +1 -1
- package/dist/manifests/contact-strip.manifest.json +1 -1
- package/dist/manifests/container.manifest.json +1 -1
- package/dist/manifests/cta-section.manifest.json +1 -1
- package/dist/manifests/data-table.manifest.json +8 -1
- package/dist/manifests/date-picker-popover.manifest.json +202 -0
- package/dist/manifests/date-picker.manifest.json +1 -1
- package/dist/manifests/date-range-picker.manifest.json +1 -1
- package/dist/manifests/deal-card.manifest.json +1 -1
- package/dist/manifests/dialog.manifest.json +1 -1
- package/dist/manifests/document-card.manifest.json +1 -1
- package/dist/manifests/drawer.manifest.json +1 -1
- package/dist/manifests/empty-state.manifest.json +1 -1
- package/dist/manifests/entity-card.manifest.json +1 -1
- package/dist/manifests/feature-grid.manifest.json +1 -1
- package/dist/manifests/feature-row.manifest.json +1 -1
- package/dist/manifests/fieldset.manifest.json +1 -1
- package/dist/manifests/file-upload.manifest.json +1 -1
- package/dist/manifests/filter-bar.manifest.json +1 -1
- package/dist/manifests/filter-chips.manifest.json +13 -1
- package/dist/manifests/filter-panel.manifest.json +1 -1
- package/dist/manifests/flex.manifest.json +1 -1
- package/dist/manifests/form-field.manifest.json +1 -1
- package/dist/manifests/form-layout.manifest.json +1 -1
- package/dist/manifests/form.manifest.json +1 -1
- package/dist/manifests/grid.manifest.json +1 -1
- package/dist/manifests/heading.manifest.json +1 -1
- package/dist/manifests/hero.manifest.json +1 -1
- package/dist/manifests/image.manifest.json +142 -0
- package/dist/manifests/input-group.manifest.json +1 -1
- package/dist/manifests/input.manifest.json +1 -1
- package/dist/manifests/label.manifest.json +1 -1
- package/dist/manifests/link-tabs.manifest.json +1 -1
- package/dist/manifests/link.manifest.json +1 -1
- package/dist/manifests/list.manifest.json +1 -1
- package/dist/manifests/load-more.manifest.json +1 -1
- package/dist/manifests/logo-cloud.manifest.json +1 -1
- package/dist/manifests/menu.manifest.json +1 -1
- package/dist/manifests/metric-card.manifest.json +1 -1
- package/dist/manifests/multi-select.manifest.json +1 -1
- package/dist/manifests/newsletter.manifest.json +1 -1
- package/dist/manifests/page-header.manifest.json +1 -1
- package/dist/manifests/pagination.manifest.json +1 -1
- package/dist/manifests/password-input.manifest.json +1 -1
- package/dist/manifests/popover.manifest.json +86 -4
- package/dist/manifests/process-steps.manifest.json +1 -1
- package/dist/manifests/progress.manifest.json +1 -1
- package/dist/manifests/prose.manifest.json +1 -1
- package/dist/manifests/radio.manifest.json +1 -1
- package/dist/manifests/range-slider.manifest.json +1 -1
- package/dist/manifests/search.manifest.json +1 -1
- package/dist/manifests/section-heading.manifest.json +1 -1
- package/dist/manifests/section.manifest.json +1 -1
- package/dist/manifests/segmented-control.manifest.json +1 -1
- package/dist/manifests/select-menu.manifest.json +1 -1
- package/dist/manifests/select.manifest.json +8 -1
- package/dist/manifests/separator.manifest.json +1 -1
- package/dist/manifests/site-footer.manifest.json +1 -1
- package/dist/manifests/site-header.manifest.json +13 -3
- package/dist/manifests/skeleton.manifest.json +1 -1
- package/dist/manifests/spinner.manifest.json +1 -1
- package/dist/manifests/stat-band.manifest.json +1 -1
- package/dist/manifests/stepper.manifest.json +7 -1
- package/dist/manifests/switch.manifest.json +1 -1
- package/dist/manifests/table-card.manifest.json +1 -1
- package/dist/manifests/table-of-contents.manifest.json +1 -1
- package/dist/manifests/table.manifest.json +1 -1
- package/dist/manifests/tabs.manifest.json +1 -1
- package/dist/manifests/testimonial.manifest.json +1 -1
- package/dist/manifests/text.manifest.json +1 -1
- package/dist/manifests/textarea.manifest.json +1 -1
- package/dist/manifests/theme-toggle.manifest.json +1 -1
- package/dist/manifests/time-picker.manifest.json +1 -1
- package/dist/manifests/timeline.manifest.json +1 -1
- package/dist/manifests/toast.manifest.json +1 -1
- package/dist/manifests/tombstone-card.manifest.json +1 -1
- package/dist/manifests/tooltip.manifest.json +12 -1
- package/dist/src/components/accordion/Accordion.js +26 -19
- package/dist/src/components/accordion/Accordion.js.map +1 -1
- package/dist/src/components/accordion/Accordion.mjs +26 -19
- package/dist/src/components/accordion/Accordion.mjs.map +1 -1
- package/dist/src/components/alert/Alert.js +1 -1
- package/dist/src/components/alert/Alert.js.map +1 -1
- package/dist/src/components/alert/Alert.mjs +1 -1
- package/dist/src/components/alert/Alert.mjs.map +1 -1
- package/dist/src/components/app-shell/AppShell.js +1 -1
- package/dist/src/components/app-shell/AppShell.js.map +1 -1
- package/dist/src/components/app-shell/AppShell.mjs +1 -1
- package/dist/src/components/app-shell/AppShell.mjs.map +1 -1
- package/dist/src/components/article-card/ArticleCard.js +2 -2
- package/dist/src/components/article-card/ArticleCard.js.map +1 -1
- package/dist/src/components/article-card/ArticleCard.mjs +2 -2
- package/dist/src/components/article-card/ArticleCard.mjs.map +1 -1
- package/dist/src/components/calendar/Calendar.d.ts +34 -0
- package/dist/src/components/calendar/Calendar.js +233 -0
- package/dist/src/components/calendar/Calendar.js.map +1 -0
- package/dist/src/components/calendar/Calendar.mjs +208 -0
- package/dist/src/components/calendar/Calendar.mjs.map +1 -0
- package/dist/src/components/calendar/index.d.ts +1 -0
- package/dist/src/components/calendar/index.js +23 -0
- package/dist/src/components/calendar/index.js.map +1 -0
- package/dist/src/components/calendar/index.mjs +2 -0
- package/dist/src/components/calendar/index.mjs.map +1 -0
- package/dist/src/components/checkbox/Checkbox.js +1 -1
- package/dist/src/components/checkbox/Checkbox.js.map +1 -1
- package/dist/src/components/checkbox/Checkbox.mjs +1 -1
- package/dist/src/components/checkbox/Checkbox.mjs.map +1 -1
- package/dist/src/components/comparison-table/ComparisonTable.js +1 -1
- package/dist/src/components/comparison-table/ComparisonTable.js.map +1 -1
- package/dist/src/components/comparison-table/ComparisonTable.mjs +1 -1
- package/dist/src/components/comparison-table/ComparisonTable.mjs.map +1 -1
- package/dist/src/components/cta-section/CTASection.js +1 -1
- package/dist/src/components/cta-section/CTASection.js.map +1 -1
- package/dist/src/components/cta-section/CTASection.mjs +1 -1
- package/dist/src/components/cta-section/CTASection.mjs.map +1 -1
- package/dist/src/components/data-table/DataTable.d.ts +3 -1
- package/dist/src/components/data-table/DataTable.js +2 -4
- package/dist/src/components/data-table/DataTable.js.map +1 -1
- package/dist/src/components/data-table/DataTable.mjs +2 -4
- package/dist/src/components/data-table/DataTable.mjs.map +1 -1
- package/dist/src/components/date-picker-popover/DatePickerPopover.d.ts +33 -0
- package/dist/src/components/date-picker-popover/DatePickerPopover.js +117 -0
- package/dist/src/components/date-picker-popover/DatePickerPopover.js.map +1 -0
- package/dist/src/components/date-picker-popover/DatePickerPopover.mjs +83 -0
- package/dist/src/components/date-picker-popover/DatePickerPopover.mjs.map +1 -0
- package/dist/src/components/date-picker-popover/index.d.ts +1 -0
- package/dist/src/components/date-picker-popover/index.js +23 -0
- package/dist/src/components/date-picker-popover/index.js.map +1 -0
- package/dist/src/components/date-picker-popover/index.mjs +2 -0
- package/dist/src/components/date-picker-popover/index.mjs.map +1 -0
- package/dist/src/components/drawer/Drawer.js +2 -1
- package/dist/src/components/drawer/Drawer.js.map +1 -1
- package/dist/src/components/drawer/Drawer.mjs +2 -1
- package/dist/src/components/drawer/Drawer.mjs.map +1 -1
- package/dist/src/components/filter-chips/FilterChips.d.ts +4 -0
- package/dist/src/components/filter-chips/FilterChips.js +35 -4
- package/dist/src/components/filter-chips/FilterChips.js.map +1 -1
- package/dist/src/components/filter-chips/FilterChips.mjs +35 -4
- package/dist/src/components/filter-chips/FilterChips.mjs.map +1 -1
- package/dist/src/components/image/Image.d.ts +34 -0
- package/dist/src/components/image/Image.js +75 -0
- package/dist/src/components/image/Image.js.map +1 -0
- package/dist/src/components/image/Image.mjs +41 -0
- package/dist/src/components/image/Image.mjs.map +1 -0
- package/dist/src/components/image/index.d.ts +1 -0
- package/dist/src/components/image/index.js +29 -0
- package/dist/src/components/image/index.js.map +1 -0
- package/dist/src/components/image/index.mjs +5 -0
- package/dist/src/components/image/index.mjs.map +1 -0
- package/dist/src/components/link/Link.js +4 -4
- package/dist/src/components/link/Link.js.map +1 -1
- package/dist/src/components/link/Link.mjs +4 -4
- package/dist/src/components/link/Link.mjs.map +1 -1
- package/dist/src/components/page-header/PageHeader.js +1 -1
- package/dist/src/components/page-header/PageHeader.js.map +1 -1
- package/dist/src/components/page-header/PageHeader.mjs +1 -1
- package/dist/src/components/page-header/PageHeader.mjs.map +1 -1
- package/dist/src/components/popover/Popover.d.ts +36 -3
- package/dist/src/components/popover/Popover.js +118 -22
- package/dist/src/components/popover/Popover.js.map +1 -1
- package/dist/src/components/popover/Popover.mjs +117 -22
- package/dist/src/components/popover/Popover.mjs.map +1 -1
- package/dist/src/components/radio/Radio.js +1 -1
- package/dist/src/components/radio/Radio.js.map +1 -1
- package/dist/src/components/radio/Radio.mjs +1 -1
- package/dist/src/components/radio/Radio.mjs.map +1 -1
- package/dist/src/components/range-slider/RangeSlider.js +3 -3
- package/dist/src/components/range-slider/RangeSlider.js.map +1 -1
- package/dist/src/components/range-slider/RangeSlider.mjs +3 -3
- package/dist/src/components/range-slider/RangeSlider.mjs.map +1 -1
- package/dist/src/components/section-heading/SectionHeading.js +1 -1
- package/dist/src/components/section-heading/SectionHeading.js.map +1 -1
- package/dist/src/components/section-heading/SectionHeading.mjs +1 -1
- package/dist/src/components/section-heading/SectionHeading.mjs.map +1 -1
- package/dist/src/components/select/Select.d.ts +10 -0
- package/dist/src/components/select/Select.js +2 -2
- package/dist/src/components/select/Select.js.map +1 -1
- package/dist/src/components/select/Select.mjs +2 -2
- package/dist/src/components/select/Select.mjs.map +1 -1
- package/dist/src/components/site-header/SiteHeader.d.ts +25 -3
- package/dist/src/components/site-header/SiteHeader.js +141 -6
- package/dist/src/components/site-header/SiteHeader.js.map +1 -1
- package/dist/src/components/site-header/SiteHeader.mjs +141 -6
- package/dist/src/components/site-header/SiteHeader.mjs.map +1 -1
- package/dist/src/components/stepper/Stepper.d.ts +18 -0
- package/dist/src/components/stepper/Stepper.js +2 -1
- package/dist/src/components/stepper/Stepper.js.map +1 -1
- package/dist/src/components/stepper/Stepper.mjs +2 -1
- package/dist/src/components/stepper/Stepper.mjs.map +1 -1
- package/dist/src/components/timeline/Timeline.js +17 -13
- package/dist/src/components/timeline/Timeline.js.map +1 -1
- package/dist/src/components/timeline/Timeline.mjs +17 -13
- package/dist/src/components/timeline/Timeline.mjs.map +1 -1
- package/dist/src/components/tooltip/Tooltip.d.ts +5 -0
- package/dist/src/components/tooltip/Tooltip.js +9 -2
- package/dist/src/components/tooltip/Tooltip.js.map +1 -1
- package/dist/src/components/tooltip/Tooltip.mjs +9 -2
- package/dist/src/components/tooltip/Tooltip.mjs.map +1 -1
- package/dist/src/index.d.ts +3 -0
- package/dist/src/utils/date.d.ts +32 -0
- package/dist/src/utils/date.js +171 -0
- package/dist/src/utils/date.js.map +1 -0
- package/dist/src/utils/date.mjs +134 -0
- package/dist/src/utils/date.mjs.map +1 -0
- package/dist/src/utils/position.d.ts +42 -0
- package/dist/src/utils/position.js +91 -0
- package/dist/src/utils/position.js.map +1 -0
- package/dist/src/utils/position.mjs +67 -0
- package/dist/src/utils/position.mjs.map +1 -0
- package/dist/styles-full.css +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/src/components/accordion/Accordion.test.tsx +14 -3
- package/src/components/accordion/Accordion.tsx +34 -21
- package/src/components/alert/Alert.tsx +1 -1
- package/src/components/app-shell/AppShell.tsx +1 -1
- package/src/components/article-card/ArticleCard.tsx +2 -2
- package/src/components/calendar/Calendar.test.tsx +277 -0
- package/src/components/calendar/Calendar.tsx +273 -0
- package/src/components/calendar/index.ts +1 -0
- package/src/components/checkbox/Checkbox.tsx +1 -1
- package/src/components/comparison-table/ComparisonTable.tsx +1 -1
- package/src/components/cta-section/CTASection.tsx +1 -1
- package/src/components/data-table/DataTable.test.tsx +21 -0
- package/src/components/data-table/DataTable.tsx +4 -1
- package/src/components/date-picker-popover/DatePickerPopover.test.tsx +223 -0
- package/src/components/date-picker-popover/DatePickerPopover.tsx +117 -0
- package/src/components/date-picker-popover/index.ts +1 -0
- package/src/components/drawer/Drawer.test.tsx +12 -0
- package/src/components/drawer/Drawer.tsx +8 -1
- package/src/components/filter-chips/FilterChips.test.tsx +11 -0
- package/src/components/filter-chips/FilterChips.tsx +40 -4
- package/src/components/image/Image.test.tsx +94 -0
- package/src/components/image/Image.tsx +71 -0
- package/src/components/image/index.ts +1 -0
- package/src/components/link/Link.test.tsx +2 -1
- package/src/components/link/Link.tsx +4 -4
- package/src/components/page-header/PageHeader.tsx +1 -1
- package/src/components/popover/Popover.test.tsx +307 -3
- package/src/components/popover/Popover.tsx +228 -91
- package/src/components/radio/Radio.tsx +1 -1
- package/src/components/range-slider/RangeSlider.tsx +3 -3
- package/src/components/section-heading/SectionHeading.tsx +1 -1
- package/src/components/select/Select.test.tsx +14 -0
- package/src/components/select/Select.tsx +7 -2
- package/src/components/site-header/SiteHeader.test.tsx +103 -1
- package/src/components/site-header/SiteHeader.tsx +220 -16
- package/src/components/stepper/Stepper.test.tsx +12 -0
- package/src/components/stepper/Stepper.tsx +15 -1
- package/src/components/timeline/Timeline.test.tsx +11 -0
- package/src/components/timeline/Timeline.tsx +13 -2
- package/src/components/tooltip/Tooltip.test.tsx +15 -0
- package/src/components/tooltip/Tooltip.tsx +19 -2
- package/src/index.ts +3 -0
- package/src/manifests/accordion.manifest.json +2 -2
- package/src/manifests/alert.manifest.json +1 -1
- package/src/manifests/announcement-bar.manifest.json +1 -1
- package/src/manifests/app-shell.manifest.json +1 -1
- package/src/manifests/applied-filters.manifest.json +1 -1
- package/src/manifests/article-card.manifest.json +1 -1
- package/src/manifests/auth-layout.manifest.json +1 -1
- package/src/manifests/autocomplete.manifest.json +1 -1
- package/src/manifests/avatar.manifest.json +1 -1
- package/src/manifests/badge.manifest.json +1 -1
- package/src/manifests/block.manifest.json +1 -1
- package/src/manifests/bottom-nav.manifest.json +1 -1
- package/src/manifests/breadcrumb.manifest.json +1 -1
- package/src/manifests/button-group.manifest.json +1 -1
- package/src/manifests/button.manifest.json +1 -1
- package/src/manifests/calendar.manifest.json +175 -0
- package/src/manifests/card.manifest.json +1 -1
- package/src/manifests/checkbox.manifest.json +1 -1
- package/src/manifests/comparison-table.manifest.json +1 -1
- package/src/manifests/confirm-dialog.manifest.json +1 -1
- package/src/manifests/contact-strip.manifest.json +1 -1
- package/src/manifests/container.manifest.json +1 -1
- package/src/manifests/cta-section.manifest.json +1 -1
- package/src/manifests/data-table.manifest.json +8 -1
- package/src/manifests/date-picker-popover.manifest.json +202 -0
- package/src/manifests/date-picker.manifest.json +1 -1
- package/src/manifests/date-range-picker.manifest.json +1 -1
- package/src/manifests/deal-card.manifest.json +1 -1
- package/src/manifests/dialog.manifest.json +1 -1
- package/src/manifests/document-card.manifest.json +1 -1
- package/src/manifests/drawer.manifest.json +1 -1
- package/src/manifests/empty-state.manifest.json +1 -1
- package/src/manifests/entity-card.manifest.json +1 -1
- package/src/manifests/feature-grid.manifest.json +1 -1
- package/src/manifests/feature-row.manifest.json +1 -1
- package/src/manifests/fieldset.manifest.json +1 -1
- package/src/manifests/file-upload.manifest.json +1 -1
- package/src/manifests/filter-bar.manifest.json +1 -1
- package/src/manifests/filter-chips.manifest.json +13 -1
- package/src/manifests/filter-panel.manifest.json +1 -1
- package/src/manifests/flex.manifest.json +1 -1
- package/src/manifests/form-field.manifest.json +1 -1
- package/src/manifests/form-layout.manifest.json +1 -1
- package/src/manifests/form.manifest.json +1 -1
- package/src/manifests/grid.manifest.json +1 -1
- package/src/manifests/heading.manifest.json +1 -1
- package/src/manifests/hero.manifest.json +1 -1
- package/src/manifests/image.manifest.json +142 -0
- package/src/manifests/input-group.manifest.json +1 -1
- package/src/manifests/input.manifest.json +1 -1
- package/src/manifests/label.manifest.json +1 -1
- package/src/manifests/link-tabs.manifest.json +1 -1
- package/src/manifests/link.manifest.json +1 -1
- package/src/manifests/list.manifest.json +1 -1
- package/src/manifests/load-more.manifest.json +1 -1
- package/src/manifests/logo-cloud.manifest.json +1 -1
- package/src/manifests/menu.manifest.json +1 -1
- package/src/manifests/metric-card.manifest.json +1 -1
- package/src/manifests/multi-select.manifest.json +1 -1
- package/src/manifests/newsletter.manifest.json +1 -1
- package/src/manifests/page-header.manifest.json +1 -1
- package/src/manifests/pagination.manifest.json +1 -1
- package/src/manifests/password-input.manifest.json +1 -1
- package/src/manifests/popover.manifest.json +86 -4
- package/src/manifests/process-steps.manifest.json +1 -1
- package/src/manifests/progress.manifest.json +1 -1
- package/src/manifests/prose.manifest.json +1 -1
- package/src/manifests/radio.manifest.json +1 -1
- package/src/manifests/range-slider.manifest.json +1 -1
- package/src/manifests/search.manifest.json +1 -1
- package/src/manifests/section-heading.manifest.json +1 -1
- package/src/manifests/section.manifest.json +1 -1
- package/src/manifests/segmented-control.manifest.json +1 -1
- package/src/manifests/select-menu.manifest.json +1 -1
- package/src/manifests/select.manifest.json +8 -1
- package/src/manifests/separator.manifest.json +1 -1
- package/src/manifests/site-footer.manifest.json +1 -1
- package/src/manifests/site-header.manifest.json +13 -3
- package/src/manifests/skeleton.manifest.json +1 -1
- package/src/manifests/spinner.manifest.json +1 -1
- package/src/manifests/stat-band.manifest.json +1 -1
- package/src/manifests/stepper.manifest.json +7 -1
- package/src/manifests/switch.manifest.json +1 -1
- package/src/manifests/table-card.manifest.json +1 -1
- package/src/manifests/table-of-contents.manifest.json +1 -1
- package/src/manifests/table.manifest.json +1 -1
- package/src/manifests/tabs.manifest.json +1 -1
- package/src/manifests/testimonial.manifest.json +1 -1
- package/src/manifests/text.manifest.json +1 -1
- package/src/manifests/textarea.manifest.json +1 -1
- package/src/manifests/theme-toggle.manifest.json +1 -1
- package/src/manifests/time-picker.manifest.json +1 -1
- package/src/manifests/timeline.manifest.json +1 -1
- package/src/manifests/toast.manifest.json +1 -1
- package/src/manifests/tombstone-card.manifest.json +1 -1
- package/src/manifests/tooltip.manifest.json +12 -1
- package/src/utils/date.test.ts +190 -0
- package/src/utils/date.ts +162 -0
- package/src/utils/position.test.ts +227 -0
- package/src/utils/position.ts +129 -0
package/dist/index.mjs
CHANGED
|
@@ -276,11 +276,12 @@ function Drawer({
|
|
|
276
276
|
"duration-200 motion-reduce:animate-none",
|
|
277
277
|
exiting ? `animate-out ${slideOut[side]}` : `animate-in ${slideIn[side]}`
|
|
278
278
|
) : void 0;
|
|
279
|
+
const backdropMotion = animate ? cn("motion-reduce:animate-none", exiting ? "animate-out fade-out-0" : "animate-in fade-in-0") : void 0;
|
|
279
280
|
return createPortal(
|
|
280
281
|
/* @__PURE__ */ jsx(
|
|
281
282
|
"div",
|
|
282
283
|
{
|
|
283
|
-
className: "fixed inset-0 z-50",
|
|
284
|
+
className: cn("fixed inset-0 z-50 bg-background/80", backdropMotion),
|
|
284
285
|
onMouseDown: (event) => {
|
|
285
286
|
if (closeOnBackdrop && event.target === event.currentTarget) requestClose();
|
|
286
287
|
},
|
|
@@ -356,7 +357,7 @@ function containsActive(item, activeHref) {
|
|
|
356
357
|
return (item.children ?? []).some((child) => containsActive(child, activeHref));
|
|
357
358
|
}
|
|
358
359
|
var itemClass = "flex w-full items-center gap-2.5 rounded-md px-2.5 py-2 text-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring";
|
|
359
|
-
var activeClass = "bg-primary/10 font-medium text-primary";
|
|
360
|
+
var activeClass = "bg-primary/10 font-medium text-primary-ink";
|
|
360
361
|
var idleClass = "text-muted-foreground hover:bg-accent hover:text-accent-foreground";
|
|
361
362
|
function Sidebar({
|
|
362
363
|
sections,
|
|
@@ -671,13 +672,13 @@ Textarea.displayName = "Textarea";
|
|
|
671
672
|
// src/components/select/Select.tsx
|
|
672
673
|
import * as React9 from "react";
|
|
673
674
|
import { jsx as jsx7, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
674
|
-
var Select = React9.forwardRef(function Select2({ options, groups, label, placeholder, multiple = false, value, defaultValue, onChange, onValueChange, children, id, className, ...props }, ref) {
|
|
675
|
+
var Select = React9.forwardRef(function Select2({ options, groups, label, labelHidden = false, placeholder, multiple = false, value, defaultValue, onChange, onValueChange, children, id, className, ...props }, ref) {
|
|
675
676
|
const generatedId = React9.useId();
|
|
676
677
|
const selectId = id ?? generatedId;
|
|
677
678
|
const labelId = `${selectId}-label`;
|
|
678
679
|
const renderOption = (option) => /* @__PURE__ */ jsx7("option", { value: option.value, disabled: option.disabled, children: option.label }, option.value);
|
|
679
680
|
return /* @__PURE__ */ jsxs4("div", { className: "flex w-full flex-col gap-1.5", children: [
|
|
680
|
-
label && /* @__PURE__ */ jsx7("label", { id: labelId, htmlFor: selectId, className: "text-sm font-medium", children: label }),
|
|
681
|
+
label && /* @__PURE__ */ jsx7("label", { id: labelId, htmlFor: selectId, className: labelHidden ? "sr-only" : "text-sm font-medium", children: label }),
|
|
681
682
|
/* @__PURE__ */ jsxs4(
|
|
682
683
|
"select",
|
|
683
684
|
{
|
|
@@ -2079,7 +2080,7 @@ var Checkbox = React21.forwardRef(
|
|
|
2079
2080
|
onChange?.(event);
|
|
2080
2081
|
},
|
|
2081
2082
|
className: cn(
|
|
2082
|
-
"peer h-4 w-4 shrink-0 rounded-sm border border-primary",
|
|
2083
|
+
"peer h-4 w-4 shrink-0 rounded-sm border border-primary accent-primary",
|
|
2083
2084
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
|
|
2084
2085
|
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
2085
2086
|
"checked:bg-primary checked:text-primary-foreground",
|
|
@@ -2164,7 +2165,7 @@ var Radio = React23.forwardRef(
|
|
|
2164
2165
|
onChange?.(event);
|
|
2165
2166
|
},
|
|
2166
2167
|
className: cn(
|
|
2167
|
-
"h-4 w-4 shrink-0 rounded-full border border-primary",
|
|
2168
|
+
"h-4 w-4 shrink-0 rounded-full border border-primary accent-primary",
|
|
2168
2169
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
|
|
2169
2170
|
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
2170
2171
|
"checked:bg-primary checked:text-primary-foreground",
|
|
@@ -2324,8 +2325,12 @@ import * as React27 from "react";
|
|
|
2324
2325
|
import { createPortal as createPortal6 } from "react-dom";
|
|
2325
2326
|
import { jsx as jsx26, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
2326
2327
|
var GAP = 8;
|
|
2328
|
+
var VARIANTS = {
|
|
2329
|
+
default: "border-border bg-popover text-popover-foreground",
|
|
2330
|
+
inverse: "border-inverse-border bg-inverse text-inverse-foreground"
|
|
2331
|
+
};
|
|
2327
2332
|
var Tooltip = React27.forwardRef(
|
|
2328
|
-
({ content, side = "top", delay = 300, className, children }, ref) => {
|
|
2333
|
+
({ content, side = "top", delay = 300, variant = "default", className, children }, ref) => {
|
|
2329
2334
|
const [open, setOpen] = React27.useState(false);
|
|
2330
2335
|
const [pos, setPos] = React27.useState(null);
|
|
2331
2336
|
const anchorRef = React27.useRef(null);
|
|
@@ -2391,7 +2396,10 @@ var Tooltip = React27.forwardRef(
|
|
|
2391
2396
|
id,
|
|
2392
2397
|
role: "tooltip",
|
|
2393
2398
|
style: { position: "fixed", top: pos.top, left: pos.left, transform: pos.transform, zIndex: 60 },
|
|
2394
|
-
className:
|
|
2399
|
+
className: cn(
|
|
2400
|
+
"pointer-events-none w-max max-w-xs rounded-md border px-3 py-1.5 text-xs shadow-md",
|
|
2401
|
+
VARIANTS[variant]
|
|
2402
|
+
),
|
|
2395
2403
|
children: content
|
|
2396
2404
|
}
|
|
2397
2405
|
),
|
|
@@ -3063,14 +3071,322 @@ var ThemeToggle = React37.forwardRef(function ThemeToggle2({ theme, onThemeChang
|
|
|
3063
3071
|
});
|
|
3064
3072
|
ThemeToggle.displayName = "ThemeToggle";
|
|
3065
3073
|
|
|
3066
|
-
// src/components/
|
|
3074
|
+
// src/components/calendar/Calendar.tsx
|
|
3067
3075
|
import * as React38 from "react";
|
|
3076
|
+
|
|
3077
|
+
// src/utils/date.ts
|
|
3078
|
+
var DAY_MS = 864e5;
|
|
3079
|
+
function pad(value) {
|
|
3080
|
+
return String(value).padStart(2, "0");
|
|
3081
|
+
}
|
|
3082
|
+
function dateKeyOf(year, month, day) {
|
|
3083
|
+
return `${year}-${pad(month + 1)}-${pad(day)}`;
|
|
3084
|
+
}
|
|
3085
|
+
function parseDateKey(value) {
|
|
3086
|
+
const match = /^(\d{4})-(\d{2})-(\d{2})$/.exec(value);
|
|
3087
|
+
if (!match) return null;
|
|
3088
|
+
const year = Number(match[1]);
|
|
3089
|
+
const month = Number(match[2]) - 1;
|
|
3090
|
+
const day = Number(match[3]);
|
|
3091
|
+
if (month < 0 || month > 11 || day < 1 || day > daysInMonth(year, month)) return null;
|
|
3092
|
+
return { year, month, day };
|
|
3093
|
+
}
|
|
3094
|
+
function daysInMonth(year, month) {
|
|
3095
|
+
return new Date(Date.UTC(year, month + 1, 0)).getUTCDate();
|
|
3096
|
+
}
|
|
3097
|
+
function utc(key) {
|
|
3098
|
+
const parts = parseDateKey(key);
|
|
3099
|
+
if (!parts) return new Date(Date.UTC(1970, 0, 1));
|
|
3100
|
+
return new Date(Date.UTC(parts.year, parts.month, parts.day));
|
|
3101
|
+
}
|
|
3102
|
+
function toDateKey(date) {
|
|
3103
|
+
return dateKeyOf(date.getFullYear(), date.getMonth(), date.getDate());
|
|
3104
|
+
}
|
|
3105
|
+
function utcKey(date) {
|
|
3106
|
+
return dateKeyOf(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate());
|
|
3107
|
+
}
|
|
3108
|
+
function todayKey(now = /* @__PURE__ */ new Date()) {
|
|
3109
|
+
return toDateKey(now);
|
|
3110
|
+
}
|
|
3111
|
+
function addDays(key, delta) {
|
|
3112
|
+
if (!parseDateKey(key)) return key;
|
|
3113
|
+
const date = utc(key);
|
|
3114
|
+
return utcKey(new Date(date.getTime() + delta * DAY_MS));
|
|
3115
|
+
}
|
|
3116
|
+
function addMonths(key, delta) {
|
|
3117
|
+
const parts = parseDateKey(key);
|
|
3118
|
+
if (!parts) return key;
|
|
3119
|
+
const index = parts.year * 12 + parts.month + delta;
|
|
3120
|
+
const year = Math.floor(index / 12);
|
|
3121
|
+
const month = index % 12;
|
|
3122
|
+
return dateKeyOf(year, month, Math.min(parts.day, daysInMonth(year, month)));
|
|
3123
|
+
}
|
|
3124
|
+
function startOfWeek(key, weekStartsOn = 0) {
|
|
3125
|
+
if (!parseDateKey(key)) return key;
|
|
3126
|
+
const date = utc(key);
|
|
3127
|
+
const offset = (date.getUTCDay() - weekStartsOn + 7) % 7;
|
|
3128
|
+
return addDays(key, -offset);
|
|
3129
|
+
}
|
|
3130
|
+
function moveDateKey(key, move, weekStartsOn = 0) {
|
|
3131
|
+
switch (move) {
|
|
3132
|
+
case "left":
|
|
3133
|
+
return addDays(key, -1);
|
|
3134
|
+
case "right":
|
|
3135
|
+
return addDays(key, 1);
|
|
3136
|
+
case "up":
|
|
3137
|
+
return addDays(key, -7);
|
|
3138
|
+
case "down":
|
|
3139
|
+
return addDays(key, 7);
|
|
3140
|
+
case "home":
|
|
3141
|
+
return startOfWeek(key, weekStartsOn);
|
|
3142
|
+
case "end":
|
|
3143
|
+
return addDays(startOfWeek(key, weekStartsOn), 6);
|
|
3144
|
+
case "pageup":
|
|
3145
|
+
return addMonths(key, -1);
|
|
3146
|
+
case "pagedown":
|
|
3147
|
+
return addMonths(key, 1);
|
|
3148
|
+
}
|
|
3149
|
+
}
|
|
3150
|
+
function calendarWeeks(year, month, weekStartsOn = 0) {
|
|
3151
|
+
const first = dateKeyOf(year, month, 1);
|
|
3152
|
+
const start = startOfWeek(first, weekStartsOn);
|
|
3153
|
+
return Array.from(
|
|
3154
|
+
{ length: 6 },
|
|
3155
|
+
(_, week) => Array.from({ length: 7 }, (_2, day) => {
|
|
3156
|
+
const key = addDays(start, week * 7 + day);
|
|
3157
|
+
const parts = parseDateKey(key);
|
|
3158
|
+
return {
|
|
3159
|
+
key,
|
|
3160
|
+
day: parts?.day ?? 1,
|
|
3161
|
+
inMonth: parts?.month === month && parts?.year === year
|
|
3162
|
+
};
|
|
3163
|
+
})
|
|
3164
|
+
);
|
|
3165
|
+
}
|
|
3166
|
+
function monthLabel(year, month, locale = "en-US") {
|
|
3167
|
+
return new Intl.DateTimeFormat(locale, {
|
|
3168
|
+
month: "long",
|
|
3169
|
+
year: "numeric",
|
|
3170
|
+
timeZone: "UTC"
|
|
3171
|
+
}).format(new Date(Date.UTC(year, month, 1)));
|
|
3172
|
+
}
|
|
3173
|
+
function weekdayLabels(locale = "en-US", weekStartsOn = 0) {
|
|
3174
|
+
return Array.from(
|
|
3175
|
+
{ length: 7 },
|
|
3176
|
+
(_, index) => new Intl.DateTimeFormat(locale, { weekday: "short", timeZone: "UTC" }).format(
|
|
3177
|
+
new Date(Date.UTC(2024, 0, 7 + weekStartsOn + index))
|
|
3178
|
+
)
|
|
3179
|
+
);
|
|
3180
|
+
}
|
|
3181
|
+
function formatDateLabel(key, locale = "en-US") {
|
|
3182
|
+
const parts = parseDateKey(key);
|
|
3183
|
+
if (!parts) return key;
|
|
3184
|
+
return new Intl.DateTimeFormat(locale, {
|
|
3185
|
+
dateStyle: "medium",
|
|
3186
|
+
timeZone: "UTC"
|
|
3187
|
+
}).format(new Date(Date.UTC(parts.year, parts.month, parts.day)));
|
|
3188
|
+
}
|
|
3189
|
+
|
|
3190
|
+
// src/components/calendar/Calendar.tsx
|
|
3191
|
+
import { jsx as jsx37, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
3192
|
+
var MOVES = {
|
|
3193
|
+
ArrowLeft: "left",
|
|
3194
|
+
ArrowRight: "right",
|
|
3195
|
+
ArrowUp: "up",
|
|
3196
|
+
ArrowDown: "down",
|
|
3197
|
+
Home: "home",
|
|
3198
|
+
End: "end",
|
|
3199
|
+
PageUp: "pageup",
|
|
3200
|
+
PageDown: "pagedown"
|
|
3201
|
+
};
|
|
3202
|
+
var Calendar = React38.forwardRef(
|
|
3203
|
+
({
|
|
3204
|
+
value,
|
|
3205
|
+
defaultValue,
|
|
3206
|
+
onValueChange,
|
|
3207
|
+
min,
|
|
3208
|
+
max,
|
|
3209
|
+
today,
|
|
3210
|
+
locale = "en-US",
|
|
3211
|
+
weekStartsOn = 0,
|
|
3212
|
+
isDateDisabled,
|
|
3213
|
+
showOutsideDays = true,
|
|
3214
|
+
autoFocus = false,
|
|
3215
|
+
disabled = false,
|
|
3216
|
+
className,
|
|
3217
|
+
"aria-label": ariaLabel,
|
|
3218
|
+
...props
|
|
3219
|
+
}, ref) => {
|
|
3220
|
+
const resolvedToday = today ?? todayKey();
|
|
3221
|
+
const [internal, setInternal] = React38.useState(defaultValue ?? "");
|
|
3222
|
+
const selected = value ?? internal;
|
|
3223
|
+
const initial = selected || resolvedToday;
|
|
3224
|
+
const [view, setView] = React38.useState(() => {
|
|
3225
|
+
const parts = parseDateKey(initial);
|
|
3226
|
+
return { year: parts?.year ?? 1970, month: parts?.month ?? 0 };
|
|
3227
|
+
});
|
|
3228
|
+
const [focusKey, setFocusKey] = React38.useState(initial);
|
|
3229
|
+
const gridRef = React38.useRef(null);
|
|
3230
|
+
const keyboardNav = React38.useRef(false);
|
|
3231
|
+
React38.useEffect(() => {
|
|
3232
|
+
if (!selected) return;
|
|
3233
|
+
const parts = parseDateKey(selected);
|
|
3234
|
+
if (parts) setView({ year: parts.year, month: parts.month });
|
|
3235
|
+
setFocusKey(selected);
|
|
3236
|
+
}, [selected]);
|
|
3237
|
+
const weeks = React38.useMemo(
|
|
3238
|
+
() => calendarWeeks(view.year, view.month, weekStartsOn),
|
|
3239
|
+
[view.year, view.month, weekStartsOn]
|
|
3240
|
+
);
|
|
3241
|
+
const weekdays = React38.useMemo(
|
|
3242
|
+
() => weekdayLabels(locale, weekStartsOn),
|
|
3243
|
+
[locale, weekStartsOn]
|
|
3244
|
+
);
|
|
3245
|
+
const blocked = React38.useCallback(
|
|
3246
|
+
(key) => disabled || Boolean(min && key < min || max && key > max) || Boolean(isDateDisabled?.(key)),
|
|
3247
|
+
[disabled, isDateDisabled, max, min]
|
|
3248
|
+
);
|
|
3249
|
+
const choose = (key) => {
|
|
3250
|
+
if (blocked(key)) return;
|
|
3251
|
+
if (value === void 0) setInternal(key);
|
|
3252
|
+
setFocusKey(key);
|
|
3253
|
+
onValueChange?.(key);
|
|
3254
|
+
};
|
|
3255
|
+
const onGridKeyDown = (event) => {
|
|
3256
|
+
const move = MOVES[event.key];
|
|
3257
|
+
if (!move) return;
|
|
3258
|
+
event.preventDefault();
|
|
3259
|
+
const next = moveDateKey(focusKey, move, weekStartsOn);
|
|
3260
|
+
const parts = parseDateKey(next);
|
|
3261
|
+
if (parts) setView({ year: parts.year, month: parts.month });
|
|
3262
|
+
setFocusKey(next);
|
|
3263
|
+
keyboardNav.current = true;
|
|
3264
|
+
};
|
|
3265
|
+
React38.useEffect(() => {
|
|
3266
|
+
if (!keyboardNav.current) return;
|
|
3267
|
+
const target = gridRef.current?.querySelector(`[data-date="${focusKey}"]`);
|
|
3268
|
+
keyboardNav.current = false;
|
|
3269
|
+
target?.focus();
|
|
3270
|
+
}, [focusKey, view.year, view.month]);
|
|
3271
|
+
const visibleKeys = weeks.flat().filter((day) => day.inMonth);
|
|
3272
|
+
const tabbable = visibleKeys.some((day) => day.key === focusKey) ? focusKey : visibleKeys[0]?.key ?? "";
|
|
3273
|
+
React38.useEffect(() => {
|
|
3274
|
+
if (!autoFocus) return;
|
|
3275
|
+
const timer = setTimeout(() => {
|
|
3276
|
+
gridRef.current?.querySelector(`[data-date="${tabbable}"]`)?.focus();
|
|
3277
|
+
}, 0);
|
|
3278
|
+
return () => clearTimeout(timer);
|
|
3279
|
+
}, [autoFocus, tabbable, view.year, view.month]);
|
|
3280
|
+
const monthName = monthLabel(view.year, view.month, locale);
|
|
3281
|
+
return /* @__PURE__ */ jsxs24(
|
|
3282
|
+
"div",
|
|
3283
|
+
{
|
|
3284
|
+
ref,
|
|
3285
|
+
className: cn("w-72 select-none", className),
|
|
3286
|
+
"data-disabled": disabled ? "" : void 0,
|
|
3287
|
+
...props,
|
|
3288
|
+
children: [
|
|
3289
|
+
/* @__PURE__ */ jsxs24("div", { className: "mb-2 flex items-center justify-between gap-2", children: [
|
|
3290
|
+
/* @__PURE__ */ jsx37(
|
|
3291
|
+
Button,
|
|
3292
|
+
{
|
|
3293
|
+
type: "button",
|
|
3294
|
+
variant: "ghost",
|
|
3295
|
+
size: "icon",
|
|
3296
|
+
"aria-label": "Previous month",
|
|
3297
|
+
disabled,
|
|
3298
|
+
onClick: () => setView(partsOf(addMonths(keyOf(view), -1))),
|
|
3299
|
+
children: "\u2039"
|
|
3300
|
+
}
|
|
3301
|
+
),
|
|
3302
|
+
/* @__PURE__ */ jsx37("div", { "aria-live": "polite", className: "text-sm font-semibold text-foreground", children: monthName }),
|
|
3303
|
+
/* @__PURE__ */ jsx37(
|
|
3304
|
+
Button,
|
|
3305
|
+
{
|
|
3306
|
+
type: "button",
|
|
3307
|
+
variant: "ghost",
|
|
3308
|
+
size: "icon",
|
|
3309
|
+
"aria-label": "Next month",
|
|
3310
|
+
disabled,
|
|
3311
|
+
onClick: () => setView(partsOf(addMonths(keyOf(view), 1))),
|
|
3312
|
+
children: "\u203A"
|
|
3313
|
+
}
|
|
3314
|
+
)
|
|
3315
|
+
] }),
|
|
3316
|
+
/* @__PURE__ */ jsxs24(
|
|
3317
|
+
"div",
|
|
3318
|
+
{
|
|
3319
|
+
ref: gridRef,
|
|
3320
|
+
role: "grid",
|
|
3321
|
+
"aria-label": ariaLabel ?? monthName,
|
|
3322
|
+
onKeyDown: onGridKeyDown,
|
|
3323
|
+
className: "flex flex-col gap-1",
|
|
3324
|
+
children: [
|
|
3325
|
+
/* @__PURE__ */ jsx37("div", { role: "row", className: "grid grid-cols-7 gap-1 text-center text-xs text-muted-foreground", children: weekdays.map((weekday) => /* @__PURE__ */ jsx37("span", { role: "columnheader", "aria-label": weekday, className: "py-1", children: weekday }, weekday)) }),
|
|
3326
|
+
weeks.map((week) => /* @__PURE__ */ jsx37("div", { role: "row", className: "grid grid-cols-7 gap-1", children: week.map((day) => {
|
|
3327
|
+
const isSelected = day.key === selected;
|
|
3328
|
+
const isToday = day.key === resolvedToday;
|
|
3329
|
+
const isBlocked = blocked(day.key);
|
|
3330
|
+
const hidden = !day.inMonth && !showOutsideDays;
|
|
3331
|
+
if (hidden) {
|
|
3332
|
+
return /* @__PURE__ */ jsx37("div", { role: "gridcell", "aria-hidden": "true", className: "h-9 w-9" }, day.key);
|
|
3333
|
+
}
|
|
3334
|
+
return /* @__PURE__ */ jsx37(
|
|
3335
|
+
"div",
|
|
3336
|
+
{
|
|
3337
|
+
role: "gridcell",
|
|
3338
|
+
"aria-selected": isSelected,
|
|
3339
|
+
className: "flex justify-center",
|
|
3340
|
+
children: /* @__PURE__ */ jsx37(
|
|
3341
|
+
Button,
|
|
3342
|
+
{
|
|
3343
|
+
type: "button",
|
|
3344
|
+
size: "sm",
|
|
3345
|
+
variant: isSelected ? "primary" : "ghost",
|
|
3346
|
+
"data-date": day.key,
|
|
3347
|
+
tabIndex: day.key === tabbable ? 0 : -1,
|
|
3348
|
+
"aria-current": isToday ? "date" : void 0,
|
|
3349
|
+
"aria-disabled": isBlocked || void 0,
|
|
3350
|
+
"aria-label": formatDateLabel(day.key, locale),
|
|
3351
|
+
className: cn(
|
|
3352
|
+
"h-9 w-9 p-0 font-normal",
|
|
3353
|
+
!day.inMonth && "text-muted-foreground/80",
|
|
3354
|
+
isBlocked && "cursor-not-allowed opacity-40",
|
|
3355
|
+
isToday && !isSelected && "ring-1 ring-primary"
|
|
3356
|
+
),
|
|
3357
|
+
onClick: () => choose(day.key),
|
|
3358
|
+
children: day.day
|
|
3359
|
+
}
|
|
3360
|
+
)
|
|
3361
|
+
},
|
|
3362
|
+
day.key
|
|
3363
|
+
);
|
|
3364
|
+
}) }, week[0]?.key))
|
|
3365
|
+
]
|
|
3366
|
+
}
|
|
3367
|
+
)
|
|
3368
|
+
]
|
|
3369
|
+
}
|
|
3370
|
+
);
|
|
3371
|
+
}
|
|
3372
|
+
);
|
|
3373
|
+
Calendar.displayName = "Calendar";
|
|
3374
|
+
function keyOf(view) {
|
|
3375
|
+
return `${view.year}-${String(view.month + 1).padStart(2, "0")}-01`;
|
|
3376
|
+
}
|
|
3377
|
+
function partsOf(key) {
|
|
3378
|
+
const parts = parseDateKey(key);
|
|
3379
|
+
return { year: parts?.year ?? 1970, month: parts?.month ?? 0 };
|
|
3380
|
+
}
|
|
3381
|
+
|
|
3382
|
+
// src/components/card/Card.tsx
|
|
3383
|
+
import * as React39 from "react";
|
|
3068
3384
|
import { Slot as Slot3 } from "@radix-ui/react-slot";
|
|
3069
|
-
import { jsx as
|
|
3070
|
-
var Card =
|
|
3385
|
+
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
3386
|
+
var Card = React39.forwardRef(
|
|
3071
3387
|
({ className, asChild = false, ...props }, ref) => {
|
|
3072
3388
|
const Comp = asChild ? Slot3 : "div";
|
|
3073
|
-
return /* @__PURE__ */
|
|
3389
|
+
return /* @__PURE__ */ jsx38(
|
|
3074
3390
|
Comp,
|
|
3075
3391
|
{
|
|
3076
3392
|
ref,
|
|
@@ -3081,12 +3397,12 @@ var Card = React38.forwardRef(
|
|
|
3081
3397
|
}
|
|
3082
3398
|
);
|
|
3083
3399
|
Card.displayName = "Card";
|
|
3084
|
-
var CardHeader =
|
|
3085
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
3400
|
+
var CardHeader = React39.forwardRef(
|
|
3401
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx38("div", { ref, className: cn("flex flex-col space-y-1.5 p-6", className), ...props })
|
|
3086
3402
|
);
|
|
3087
3403
|
CardHeader.displayName = "CardHeader";
|
|
3088
|
-
var CardTitle =
|
|
3089
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
3404
|
+
var CardTitle = React39.forwardRef(
|
|
3405
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx38(
|
|
3090
3406
|
"h3",
|
|
3091
3407
|
{
|
|
3092
3408
|
ref,
|
|
@@ -3096,22 +3412,22 @@ var CardTitle = React38.forwardRef(
|
|
|
3096
3412
|
)
|
|
3097
3413
|
);
|
|
3098
3414
|
CardTitle.displayName = "CardTitle";
|
|
3099
|
-
var CardDescription =
|
|
3100
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
3415
|
+
var CardDescription = React39.forwardRef(
|
|
3416
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx38("p", { ref, className: cn("text-sm text-muted-foreground", className), ...props })
|
|
3101
3417
|
);
|
|
3102
3418
|
CardDescription.displayName = "CardDescription";
|
|
3103
|
-
var CardContent =
|
|
3104
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
3419
|
+
var CardContent = React39.forwardRef(
|
|
3420
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx38("div", { ref, className: cn("p-6 pt-0", className), ...props })
|
|
3105
3421
|
);
|
|
3106
3422
|
CardContent.displayName = "CardContent";
|
|
3107
|
-
var CardFooter =
|
|
3108
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
3423
|
+
var CardFooter = React39.forwardRef(
|
|
3424
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx38("div", { ref, className: cn("flex items-center p-6 pt-0", className), ...props })
|
|
3109
3425
|
);
|
|
3110
3426
|
CardFooter.displayName = "CardFooter";
|
|
3111
3427
|
|
|
3112
3428
|
// src/components/confirm-dialog/ConfirmDialog.tsx
|
|
3113
|
-
import * as
|
|
3114
|
-
import { jsx as
|
|
3429
|
+
import * as React40 from "react";
|
|
3430
|
+
import { jsx as jsx39, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
3115
3431
|
function ConfirmDialog({
|
|
3116
3432
|
open,
|
|
3117
3433
|
onOpenChange,
|
|
@@ -3124,7 +3440,7 @@ function ConfirmDialog({
|
|
|
3124
3440
|
closeOnConfirm = true,
|
|
3125
3441
|
children
|
|
3126
3442
|
}) {
|
|
3127
|
-
const [pending, setPending] =
|
|
3443
|
+
const [pending, setPending] = React40.useState(false);
|
|
3128
3444
|
const handleConfirm = async () => {
|
|
3129
3445
|
try {
|
|
3130
3446
|
setPending(true);
|
|
@@ -3134,7 +3450,7 @@ function ConfirmDialog({
|
|
|
3134
3450
|
setPending(false);
|
|
3135
3451
|
}
|
|
3136
3452
|
};
|
|
3137
|
-
return /* @__PURE__ */
|
|
3453
|
+
return /* @__PURE__ */ jsx39(
|
|
3138
3454
|
Dialog,
|
|
3139
3455
|
{
|
|
3140
3456
|
open,
|
|
@@ -3145,9 +3461,9 @@ function ConfirmDialog({
|
|
|
3145
3461
|
title,
|
|
3146
3462
|
description,
|
|
3147
3463
|
size: "sm",
|
|
3148
|
-
footer: /* @__PURE__ */
|
|
3149
|
-
/* @__PURE__ */
|
|
3150
|
-
/* @__PURE__ */
|
|
3464
|
+
footer: /* @__PURE__ */ jsxs25(DialogFooter, { children: [
|
|
3465
|
+
/* @__PURE__ */ jsx39(Button, { variant: "ghost", onClick: () => onOpenChange(false), disabled: pending, children: cancelLabel }),
|
|
3466
|
+
/* @__PURE__ */ jsx39(
|
|
3151
3467
|
Button,
|
|
3152
3468
|
{
|
|
3153
3469
|
variant: destructive ? "destructive" : "default",
|
|
@@ -3163,8 +3479,8 @@ function ConfirmDialog({
|
|
|
3163
3479
|
}
|
|
3164
3480
|
|
|
3165
3481
|
// src/components/table-of-contents/TableOfContents.tsx
|
|
3166
|
-
import * as
|
|
3167
|
-
import { jsx as
|
|
3482
|
+
import * as React41 from "react";
|
|
3483
|
+
import { jsx as jsx40, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
3168
3484
|
function TableOfContents({
|
|
3169
3485
|
headings,
|
|
3170
3486
|
activeId,
|
|
@@ -3176,17 +3492,17 @@ function TableOfContents({
|
|
|
3176
3492
|
className,
|
|
3177
3493
|
...props
|
|
3178
3494
|
}) {
|
|
3179
|
-
return /* @__PURE__ */
|
|
3495
|
+
return /* @__PURE__ */ jsxs26(
|
|
3180
3496
|
"nav",
|
|
3181
3497
|
{
|
|
3182
3498
|
"aria-label": ariaLabel ?? label,
|
|
3183
3499
|
className: cn("text-sm", sticky && "sticky top-20 max-h-[calc(100vh-6rem)] overflow-y-auto", className),
|
|
3184
3500
|
...props,
|
|
3185
3501
|
children: [
|
|
3186
|
-
/* @__PURE__ */
|
|
3187
|
-
/* @__PURE__ */
|
|
3502
|
+
/* @__PURE__ */ jsx40("p", { className: cn("mb-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground", labelClassName), children: label }),
|
|
3503
|
+
/* @__PURE__ */ jsx40("ul", { className: "space-y-1 border-l border-border", children: headings.map((heading) => {
|
|
3188
3504
|
const active = heading.id === activeId;
|
|
3189
|
-
return /* @__PURE__ */
|
|
3505
|
+
return /* @__PURE__ */ jsx40("li", { style: { paddingLeft: `${(heading.level - 2) * 0.75}rem` }, children: /* @__PURE__ */ jsx40(
|
|
3190
3506
|
"a",
|
|
3191
3507
|
{
|
|
3192
3508
|
href: `#${heading.id}`,
|
|
@@ -3205,10 +3521,10 @@ function TableOfContents({
|
|
|
3205
3521
|
);
|
|
3206
3522
|
}
|
|
3207
3523
|
function useScrollSpy(ids, options) {
|
|
3208
|
-
const [activeId, setActiveId] =
|
|
3524
|
+
const [activeId, setActiveId] = React41.useState();
|
|
3209
3525
|
const idKey = ids.join("|");
|
|
3210
3526
|
const rootMargin = options?.rootMargin ?? "0px 0px -70% 0px";
|
|
3211
|
-
|
|
3527
|
+
React41.useEffect(() => {
|
|
3212
3528
|
if (idKey.length === 0 || typeof IntersectionObserver === "undefined") return;
|
|
3213
3529
|
const elements = idKey.split("|").map((id) => document.getElementById(id)).filter((element) => element !== null);
|
|
3214
3530
|
if (elements.length === 0) return;
|
|
@@ -3223,7 +3539,7 @@ function useScrollSpy(ids, options) {
|
|
|
3223
3539
|
elements.forEach((element) => observer.observe(element));
|
|
3224
3540
|
return () => observer.disconnect();
|
|
3225
3541
|
}, [idKey, rootMargin]);
|
|
3226
|
-
|
|
3542
|
+
React41.useEffect(() => {
|
|
3227
3543
|
if (typeof window === "undefined") return;
|
|
3228
3544
|
const ids2 = idKey.split("|").filter(Boolean);
|
|
3229
3545
|
const syncFromHash = () => {
|
|
@@ -3238,15 +3554,15 @@ function useScrollSpy(ids, options) {
|
|
|
3238
3554
|
}
|
|
3239
3555
|
|
|
3240
3556
|
// src/components/prose/Prose.tsx
|
|
3241
|
-
import * as
|
|
3242
|
-
import { jsx as
|
|
3557
|
+
import * as React42 from "react";
|
|
3558
|
+
import { jsx as jsx41 } from "react/jsx-runtime";
|
|
3243
3559
|
var sizeClasses3 = {
|
|
3244
3560
|
sm: "text-sm [&_h2]:text-xl [&_h3]:text-lg",
|
|
3245
3561
|
md: "text-base [&_h2]:text-2xl [&_h3]:text-xl",
|
|
3246
3562
|
lg: "text-lg [&_h2]:text-3xl [&_h3]:text-2xl"
|
|
3247
3563
|
};
|
|
3248
|
-
var Prose =
|
|
3249
|
-
return /* @__PURE__ */
|
|
3564
|
+
var Prose = React42.forwardRef(function Prose2({ size = "md", className, ...props }, ref) {
|
|
3565
|
+
return /* @__PURE__ */ jsx41(
|
|
3250
3566
|
"div",
|
|
3251
3567
|
{
|
|
3252
3568
|
ref,
|
|
@@ -3285,7 +3601,7 @@ var Prose = React41.forwardRef(function Prose2({ size = "md", className, ...prop
|
|
|
3285
3601
|
});
|
|
3286
3602
|
|
|
3287
3603
|
// src/components/site-footer/SiteFooter.tsx
|
|
3288
|
-
import { jsx as
|
|
3604
|
+
import { jsx as jsx42, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
3289
3605
|
function isActive2(itemHref, activeHref, match) {
|
|
3290
3606
|
if (!activeHref) return false;
|
|
3291
3607
|
if (itemHref === activeHref) return true;
|
|
@@ -3306,17 +3622,17 @@ function SiteFooter({
|
|
|
3306
3622
|
}) {
|
|
3307
3623
|
const Link3 = linkComponent ?? "a";
|
|
3308
3624
|
const destination = (href) => linkHrefProp === "to" ? { to: href } : { href };
|
|
3309
|
-
return /* @__PURE__ */
|
|
3310
|
-
/* @__PURE__ */
|
|
3311
|
-
/* @__PURE__ */
|
|
3625
|
+
return /* @__PURE__ */ jsxs27("footer", { className: cn("border-t border-border bg-muted/30", className), ...props, children: [
|
|
3626
|
+
/* @__PURE__ */ jsxs27("div", { className: "mx-auto grid w-full max-w-7xl gap-8 px-4 py-12 sm:grid-cols-2 sm:px-6 lg:grid-cols-4", children: [
|
|
3627
|
+
/* @__PURE__ */ jsxs27("div", { className: "min-w-0", children: [
|
|
3312
3628
|
brand,
|
|
3313
|
-
tagline && /* @__PURE__ */
|
|
3629
|
+
tagline && /* @__PURE__ */ jsx42("p", { className: "mt-3 max-w-56 text-sm text-muted-foreground", children: tagline })
|
|
3314
3630
|
] }),
|
|
3315
|
-
columns.map((column) => /* @__PURE__ */
|
|
3316
|
-
/* @__PURE__ */
|
|
3317
|
-
/* @__PURE__ */
|
|
3631
|
+
columns.map((column) => /* @__PURE__ */ jsxs27("div", { children: [
|
|
3632
|
+
/* @__PURE__ */ jsx42("h2", { className: "mb-3 text-xs font-semibold uppercase tracking-wider text-muted-foreground", children: column.title }),
|
|
3633
|
+
/* @__PURE__ */ jsx42("ul", { className: "m-0 list-none space-y-2 p-0 text-sm", children: column.links.map((link) => {
|
|
3318
3634
|
const active = isActive2(link.href, activeHref, match);
|
|
3319
|
-
return /* @__PURE__ */
|
|
3635
|
+
return /* @__PURE__ */ jsx42("li", { children: /* @__PURE__ */ jsx42(
|
|
3320
3636
|
Link3,
|
|
3321
3637
|
{
|
|
3322
3638
|
...destination(link.href),
|
|
@@ -3332,19 +3648,35 @@ function SiteFooter({
|
|
|
3332
3648
|
}) })
|
|
3333
3649
|
] }, column.title))
|
|
3334
3650
|
] }),
|
|
3335
|
-
legal && /* @__PURE__ */
|
|
3651
|
+
legal && /* @__PURE__ */ jsx42("div", { className: "border-t border-border", children: /* @__PURE__ */ jsx42("div", { className: "mx-auto flex w-full max-w-7xl flex-wrap items-center justify-between gap-2 px-4 py-4 text-xs text-muted-foreground sm:px-6", children: legal }) })
|
|
3336
3652
|
] });
|
|
3337
3653
|
}
|
|
3338
3654
|
|
|
3339
3655
|
// src/components/site-header/SiteHeader.tsx
|
|
3340
|
-
import * as
|
|
3341
|
-
import { Fragment as Fragment8, jsx as
|
|
3656
|
+
import * as React43 from "react";
|
|
3657
|
+
import { Fragment as Fragment8, jsx as jsx43, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
3342
3658
|
function isActive3(itemHref, activeHref, match) {
|
|
3343
3659
|
if (!activeHref) return false;
|
|
3344
3660
|
if (itemHref === activeHref) return true;
|
|
3345
3661
|
if (match === "exact") return false;
|
|
3346
3662
|
return activeHref === itemHref || activeHref.startsWith(itemHref.endsWith("/") ? itemHref : `${itemHref}/`);
|
|
3347
3663
|
}
|
|
3664
|
+
function Caret() {
|
|
3665
|
+
return /* @__PURE__ */ jsx43(
|
|
3666
|
+
"svg",
|
|
3667
|
+
{
|
|
3668
|
+
"aria-hidden": "true",
|
|
3669
|
+
viewBox: "0 0 12 12",
|
|
3670
|
+
className: "h-2.5 w-2.5",
|
|
3671
|
+
fill: "none",
|
|
3672
|
+
stroke: "currentColor",
|
|
3673
|
+
strokeWidth: "1.75",
|
|
3674
|
+
strokeLinecap: "round",
|
|
3675
|
+
strokeLinejoin: "round",
|
|
3676
|
+
children: /* @__PURE__ */ jsx43("path", { d: "m2.5 4.5 3.5 3.5 3.5-3.5" })
|
|
3677
|
+
}
|
|
3678
|
+
);
|
|
3679
|
+
}
|
|
3348
3680
|
function SiteHeader({
|
|
3349
3681
|
brand,
|
|
3350
3682
|
items,
|
|
@@ -3365,14 +3697,39 @@ function SiteHeader({
|
|
|
3365
3697
|
className,
|
|
3366
3698
|
...props
|
|
3367
3699
|
}) {
|
|
3368
|
-
const [mobileOpen, setMobileOpen] =
|
|
3369
|
-
const
|
|
3700
|
+
const [mobileOpen, setMobileOpen] = React43.useState(false);
|
|
3701
|
+
const [openMenu, setOpenMenu] = React43.useState(null);
|
|
3702
|
+
const pendingFocus = React43.useRef(null);
|
|
3703
|
+
const generatedId = React43.useId();
|
|
3370
3704
|
const menuId = `${generatedId}-menu`;
|
|
3371
3705
|
const Link3 = linkComponent ?? "a";
|
|
3372
3706
|
const destination = (href) => linkHrefProp === "to" ? { to: href } : { href };
|
|
3707
|
+
React43.useEffect(() => {
|
|
3708
|
+
if (!openMenu) return;
|
|
3709
|
+
const onKey = (event) => {
|
|
3710
|
+
if (event.key === "Escape") setOpenMenu(null);
|
|
3711
|
+
};
|
|
3712
|
+
const onPointer = (event) => {
|
|
3713
|
+
const target = event.target;
|
|
3714
|
+
if (!(target instanceof Element)) return;
|
|
3715
|
+
if (!target.closest("[data-site-nav-item]")) setOpenMenu(null);
|
|
3716
|
+
};
|
|
3717
|
+
document.addEventListener("keydown", onKey);
|
|
3718
|
+
document.addEventListener("pointerdown", onPointer);
|
|
3719
|
+
return () => {
|
|
3720
|
+
document.removeEventListener("keydown", onKey);
|
|
3721
|
+
document.removeEventListener("pointerdown", onPointer);
|
|
3722
|
+
};
|
|
3723
|
+
}, [openMenu]);
|
|
3724
|
+
React43.useEffect(() => {
|
|
3725
|
+
if (!openMenu || !pendingFocus.current) return;
|
|
3726
|
+
const panel = document.getElementById(pendingFocus.current);
|
|
3727
|
+
pendingFocus.current = null;
|
|
3728
|
+
panel?.querySelector("a[href]")?.focus();
|
|
3729
|
+
}, [openMenu]);
|
|
3373
3730
|
const navLink = (item, extra) => {
|
|
3374
3731
|
const active = isActive3(item.href, activeHref, match);
|
|
3375
|
-
return /* @__PURE__ */
|
|
3732
|
+
return /* @__PURE__ */ jsx43(
|
|
3376
3733
|
Link3,
|
|
3377
3734
|
{
|
|
3378
3735
|
...destination(item.href),
|
|
@@ -3381,16 +3738,22 @@ function SiteHeader({
|
|
|
3381
3738
|
onClick: extra === "mobile" ? () => setMobileOpen(false) : void 0,
|
|
3382
3739
|
className: cn(
|
|
3383
3740
|
"rounded-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
3384
|
-
extra === "mobile"
|
|
3385
|
-
|
|
3741
|
+
extra === "mobile" && "block rounded-md px-3 py-2 text-base hover:bg-accent",
|
|
3742
|
+
extra === "panel" && "block rounded-md p-2 hover:bg-accent",
|
|
3743
|
+
!extra && "text-sm hover:text-foreground",
|
|
3744
|
+
!extra && (active ? "font-medium text-foreground" : "text-muted-foreground")
|
|
3386
3745
|
),
|
|
3387
|
-
children:
|
|
3746
|
+
children: extra === "panel" ? /* @__PURE__ */ jsxs28(Fragment8, { children: [
|
|
3747
|
+
/* @__PURE__ */ jsx43("span", { className: "block text-sm font-medium", children: item.label }),
|
|
3748
|
+
item.description && /* @__PURE__ */ jsx43("span", { className: "mt-0.5 block text-xs text-muted-foreground", children: item.description })
|
|
3749
|
+
] }) : item.label
|
|
3388
3750
|
},
|
|
3389
3751
|
item.href
|
|
3390
3752
|
);
|
|
3391
3753
|
};
|
|
3392
|
-
|
|
3393
|
-
|
|
3754
|
+
const hasColumns = (item) => Array.isArray(item.columns) && item.columns.length > 0;
|
|
3755
|
+
return /* @__PURE__ */ jsxs28(Fragment8, { children: [
|
|
3756
|
+
/* @__PURE__ */ jsx43(
|
|
3394
3757
|
"header",
|
|
3395
3758
|
{
|
|
3396
3759
|
className: cn(
|
|
@@ -3399,14 +3762,17 @@ function SiteHeader({
|
|
|
3399
3762
|
className
|
|
3400
3763
|
),
|
|
3401
3764
|
...props,
|
|
3402
|
-
children: /* @__PURE__ */
|
|
3765
|
+
children: /* @__PURE__ */ jsxs28(
|
|
3403
3766
|
"nav",
|
|
3404
3767
|
{
|
|
3405
3768
|
"aria-label": navLabel,
|
|
3406
|
-
className: cn(
|
|
3769
|
+
className: cn(
|
|
3770
|
+
"mx-auto flex h-14 w-full max-w-7xl items-center justify-between gap-4 px-4 sm:px-6",
|
|
3771
|
+
navClassName
|
|
3772
|
+
),
|
|
3407
3773
|
children: [
|
|
3408
|
-
/* @__PURE__ */
|
|
3409
|
-
/* @__PURE__ */
|
|
3774
|
+
/* @__PURE__ */ jsxs28("div", { className: "flex min-w-0 items-center gap-6", children: [
|
|
3775
|
+
/* @__PURE__ */ jsx43(
|
|
3410
3776
|
Link3,
|
|
3411
3777
|
{
|
|
3412
3778
|
...destination("/"),
|
|
@@ -3415,11 +3781,88 @@ function SiteHeader({
|
|
|
3415
3781
|
children: brand
|
|
3416
3782
|
}
|
|
3417
3783
|
),
|
|
3418
|
-
/* @__PURE__ */
|
|
3784
|
+
/* @__PURE__ */ jsx43(
|
|
3785
|
+
"ul",
|
|
3786
|
+
{
|
|
3787
|
+
className: cn(
|
|
3788
|
+
"hidden items-center gap-5",
|
|
3789
|
+
desktopBreakpoint === "lg" ? "lg:flex" : "md:flex"
|
|
3790
|
+
),
|
|
3791
|
+
children: items.map((item) => {
|
|
3792
|
+
if (!hasColumns(item)) {
|
|
3793
|
+
return /* @__PURE__ */ jsx43("li", { children: navLink(item) }, item.href);
|
|
3794
|
+
}
|
|
3795
|
+
const panelId = `${generatedId}-panel-${item.label.replace(/\s+/g, "-").toLowerCase()}`;
|
|
3796
|
+
const open = openMenu === item.label;
|
|
3797
|
+
return /* @__PURE__ */ jsxs28(
|
|
3798
|
+
"li",
|
|
3799
|
+
{
|
|
3800
|
+
"data-site-nav-item": true,
|
|
3801
|
+
className: "relative",
|
|
3802
|
+
onMouseEnter: () => setOpenMenu(item.label),
|
|
3803
|
+
onMouseLeave: () => setOpenMenu(null),
|
|
3804
|
+
onBlur: (event) => {
|
|
3805
|
+
const next = event.relatedTarget;
|
|
3806
|
+
if (!next || !event.currentTarget.contains(next)) {
|
|
3807
|
+
setOpenMenu(null);
|
|
3808
|
+
}
|
|
3809
|
+
},
|
|
3810
|
+
children: [
|
|
3811
|
+
/* @__PURE__ */ jsxs28(
|
|
3812
|
+
"button",
|
|
3813
|
+
{
|
|
3814
|
+
type: "button",
|
|
3815
|
+
"aria-expanded": open,
|
|
3816
|
+
"aria-controls": panelId,
|
|
3817
|
+
onClick: () => setOpenMenu(item.label),
|
|
3818
|
+
onKeyDown: (event) => {
|
|
3819
|
+
if (event.key === "Escape") {
|
|
3820
|
+
setOpenMenu(null);
|
|
3821
|
+
event.currentTarget.focus();
|
|
3822
|
+
}
|
|
3823
|
+
if (event.key === "ArrowDown") {
|
|
3824
|
+
event.preventDefault();
|
|
3825
|
+
pendingFocus.current = panelId;
|
|
3826
|
+
setOpenMenu(item.label);
|
|
3827
|
+
}
|
|
3828
|
+
},
|
|
3829
|
+
className: cn(
|
|
3830
|
+
"flex items-center gap-1 rounded-sm text-sm transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
3831
|
+
isActive3(item.href ?? "", activeHref, match) ? "font-medium text-foreground" : "text-muted-foreground"
|
|
3832
|
+
),
|
|
3833
|
+
children: [
|
|
3834
|
+
item.label,
|
|
3835
|
+
/* @__PURE__ */ jsx43(Caret, {})
|
|
3836
|
+
]
|
|
3837
|
+
}
|
|
3838
|
+
),
|
|
3839
|
+
/* @__PURE__ */ jsx43(
|
|
3840
|
+
"div",
|
|
3841
|
+
{
|
|
3842
|
+
id: panelId,
|
|
3843
|
+
hidden: !open,
|
|
3844
|
+
className: cn(
|
|
3845
|
+
"absolute left-0 top-full z-50 mt-2 grid gap-6 rounded-lg border border-border bg-popover p-5 shadow-lg",
|
|
3846
|
+
item.columns.length > 1 ? "grid-cols-2" : "grid-cols-1",
|
|
3847
|
+
"min-w-[22rem]"
|
|
3848
|
+
),
|
|
3849
|
+
children: item.columns.map((column, index) => /* @__PURE__ */ jsxs28("div", { className: "min-w-40", children: [
|
|
3850
|
+
column.heading && /* @__PURE__ */ jsx43("p", { className: "mb-2 text-xs font-medium uppercase tracking-wide text-muted-foreground", children: column.heading }),
|
|
3851
|
+
/* @__PURE__ */ jsx43("ul", { className: "flex flex-col gap-0.5", children: column.items.map((link) => /* @__PURE__ */ jsx43("li", { children: navLink(link, "panel") }, `${column.heading ?? index}-${link.href}-${link.label}`)) })
|
|
3852
|
+
] }, column.heading ?? index))
|
|
3853
|
+
}
|
|
3854
|
+
)
|
|
3855
|
+
]
|
|
3856
|
+
},
|
|
3857
|
+
item.label
|
|
3858
|
+
);
|
|
3859
|
+
})
|
|
3860
|
+
}
|
|
3861
|
+
)
|
|
3419
3862
|
] }),
|
|
3420
|
-
/* @__PURE__ */
|
|
3863
|
+
/* @__PURE__ */ jsxs28("div", { className: "flex items-center gap-2", children: [
|
|
3421
3864
|
actions,
|
|
3422
|
-
showMobileTrigger && /* @__PURE__ */
|
|
3865
|
+
showMobileTrigger && /* @__PURE__ */ jsx43(
|
|
3423
3866
|
"button",
|
|
3424
3867
|
{
|
|
3425
3868
|
type: "button",
|
|
@@ -3432,7 +3875,7 @@ function SiteHeader({
|
|
|
3432
3875
|
"rounded-md border border-border p-2 text-muted-foreground hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
3433
3876
|
desktopBreakpoint === "lg" ? "lg:hidden" : "md:hidden"
|
|
3434
3877
|
),
|
|
3435
|
-
children: /* @__PURE__ */
|
|
3878
|
+
children: /* @__PURE__ */ jsx43(
|
|
3436
3879
|
"svg",
|
|
3437
3880
|
{
|
|
3438
3881
|
"aria-hidden": "true",
|
|
@@ -3442,7 +3885,7 @@ function SiteHeader({
|
|
|
3442
3885
|
stroke: "currentColor",
|
|
3443
3886
|
strokeWidth: "2",
|
|
3444
3887
|
strokeLinecap: "round",
|
|
3445
|
-
children: mobileOpen ? /* @__PURE__ */
|
|
3888
|
+
children: mobileOpen ? /* @__PURE__ */ jsx43("path", { d: "M6 6l12 12M18 6L6 18" }) : /* @__PURE__ */ jsx43("path", { d: "M4 7h16M4 12h16M4 17h16" })
|
|
3446
3889
|
}
|
|
3447
3890
|
)
|
|
3448
3891
|
}
|
|
@@ -3453,7 +3896,7 @@ function SiteHeader({
|
|
|
3453
3896
|
)
|
|
3454
3897
|
}
|
|
3455
3898
|
),
|
|
3456
|
-
showMobileTrigger && /* @__PURE__ */
|
|
3899
|
+
showMobileTrigger && /* @__PURE__ */ jsxs28(
|
|
3457
3900
|
Drawer,
|
|
3458
3901
|
{
|
|
3459
3902
|
open: mobileOpen,
|
|
@@ -3463,8 +3906,16 @@ function SiteHeader({
|
|
|
3463
3906
|
size: "sm",
|
|
3464
3907
|
animate: true,
|
|
3465
3908
|
children: [
|
|
3466
|
-
/* @__PURE__ */
|
|
3467
|
-
|
|
3909
|
+
/* @__PURE__ */ jsx43("nav", { id: menuId, "aria-label": mobileNavLabel, className: "flex flex-col gap-1", children: items.map(
|
|
3910
|
+
(item) => hasColumns(item) ? /* @__PURE__ */ jsxs28("details", { className: "rounded-md", children: [
|
|
3911
|
+
/* @__PURE__ */ jsx43("summary", { className: "cursor-pointer rounded-md px-3 py-2 text-base font-medium hover:bg-accent", children: item.label }),
|
|
3912
|
+
/* @__PURE__ */ jsx43("div", { className: "mt-1 flex flex-col gap-2 pb-2", children: item.columns.map((column, index) => /* @__PURE__ */ jsxs28("div", { className: "px-3", children: [
|
|
3913
|
+
column.heading && /* @__PURE__ */ jsx43("p", { className: "mb-1 text-xs font-medium uppercase tracking-wide text-muted-foreground", children: column.heading }),
|
|
3914
|
+
/* @__PURE__ */ jsx43("ul", { className: "flex flex-col gap-1", children: column.items.map((link) => /* @__PURE__ */ jsx43("li", { children: navLink(link, "mobile") }, `${column.heading ?? index}-${link.href}-${link.label}`)) })
|
|
3915
|
+
] }, column.heading ?? index)) })
|
|
3916
|
+
] }, item.label) : navLink(item, "mobile")
|
|
3917
|
+
) }),
|
|
3918
|
+
(mobileActions ?? actions) && /* @__PURE__ */ jsx43("div", { className: "mt-4 border-t border-border pt-4", children: mobileActions ?? actions })
|
|
3468
3919
|
]
|
|
3469
3920
|
}
|
|
3470
3921
|
)
|
|
@@ -3472,15 +3923,15 @@ function SiteHeader({
|
|
|
3472
3923
|
}
|
|
3473
3924
|
|
|
3474
3925
|
// src/components/accordion/Accordion.tsx
|
|
3475
|
-
import * as
|
|
3476
|
-
import { jsx as
|
|
3477
|
-
var AccordionContext =
|
|
3926
|
+
import * as React44 from "react";
|
|
3927
|
+
import { jsx as jsx44, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
3928
|
+
var AccordionContext = React44.createContext({
|
|
3478
3929
|
openItems: /* @__PURE__ */ new Set(),
|
|
3479
3930
|
toggle: () => {
|
|
3480
3931
|
},
|
|
3481
3932
|
collapsible: true
|
|
3482
3933
|
});
|
|
3483
|
-
var Accordion =
|
|
3934
|
+
var Accordion = React44.forwardRef(
|
|
3484
3935
|
({
|
|
3485
3936
|
value,
|
|
3486
3937
|
defaultValue = [],
|
|
@@ -3493,9 +3944,9 @@ var Accordion = React43.forwardRef(
|
|
|
3493
3944
|
style,
|
|
3494
3945
|
children
|
|
3495
3946
|
}, ref) => {
|
|
3496
|
-
const [internalOpen, setInternalOpen] =
|
|
3947
|
+
const [internalOpen, setInternalOpen] = React44.useState(defaultValue);
|
|
3497
3948
|
const current = value ?? internalOpen;
|
|
3498
|
-
const toggle =
|
|
3949
|
+
const toggle = React44.useCallback(
|
|
3499
3950
|
(id) => {
|
|
3500
3951
|
const next = current.includes(id) ? current.filter((item) => item !== id) : collapsible ? [id] : [...current, id];
|
|
3501
3952
|
if (value === void 0) setInternalOpen(next);
|
|
@@ -3504,7 +3955,7 @@ var Accordion = React43.forwardRef(
|
|
|
3504
3955
|
[current, collapsible, value, onValueChange]
|
|
3505
3956
|
);
|
|
3506
3957
|
const gapResolved = resolveGap(gap);
|
|
3507
|
-
return /* @__PURE__ */
|
|
3958
|
+
return /* @__PURE__ */ jsx44(
|
|
3508
3959
|
"div",
|
|
3509
3960
|
{
|
|
3510
3961
|
ref,
|
|
@@ -3517,28 +3968,28 @@ var Accordion = React43.forwardRef(
|
|
|
3517
3968
|
className
|
|
3518
3969
|
),
|
|
3519
3970
|
style: { ...gapResolved.style, ...style },
|
|
3520
|
-
children: /* @__PURE__ */
|
|
3521
|
-
/* @__PURE__ */
|
|
3522
|
-
/* @__PURE__ */
|
|
3971
|
+
children: /* @__PURE__ */ jsx44(AccordionContext.Provider, { value: { openItems: new Set(current), toggle, collapsible }, children: items ? items.map((item) => /* @__PURE__ */ jsxs29(AccordionItem, { id: item.id, children: [
|
|
3972
|
+
/* @__PURE__ */ jsx44(AccordionTrigger, { disabled: item.disabled, children: item.title }),
|
|
3973
|
+
/* @__PURE__ */ jsx44(AccordionContent, { children: item.content })
|
|
3523
3974
|
] }, item.id)) : children })
|
|
3524
3975
|
}
|
|
3525
3976
|
);
|
|
3526
3977
|
}
|
|
3527
3978
|
);
|
|
3528
3979
|
Accordion.displayName = "Accordion";
|
|
3529
|
-
var AccordionItem =
|
|
3530
|
-
({ id, className, children }, ref) => /* @__PURE__ */
|
|
3980
|
+
var AccordionItem = React44.forwardRef(
|
|
3981
|
+
({ id, className, children }, ref) => /* @__PURE__ */ jsx44("div", { ref, "data-accordion-item": id, className, children: /* @__PURE__ */ jsx44(AccordionItemContext.Provider, { value: { id }, children }) })
|
|
3531
3982
|
);
|
|
3532
3983
|
AccordionItem.displayName = "AccordionItem";
|
|
3533
|
-
var AccordionItemContext =
|
|
3534
|
-
var AccordionTrigger =
|
|
3984
|
+
var AccordionItemContext = React44.createContext({ id: "" });
|
|
3985
|
+
var AccordionTrigger = React44.forwardRef(
|
|
3535
3986
|
({ className, children, icon, ...props }, ref) => {
|
|
3536
|
-
const { id } =
|
|
3537
|
-
const { openItems, toggle } =
|
|
3987
|
+
const { id } = React44.useContext(AccordionItemContext);
|
|
3988
|
+
const { openItems, toggle } = React44.useContext(AccordionContext);
|
|
3538
3989
|
const open = openItems.has(id);
|
|
3539
3990
|
const panelId = `${id}-panel`;
|
|
3540
3991
|
const triggerId = `${id}-trigger`;
|
|
3541
|
-
return /* @__PURE__ */
|
|
3992
|
+
return /* @__PURE__ */ jsxs29(
|
|
3542
3993
|
"button",
|
|
3543
3994
|
{
|
|
3544
3995
|
ref,
|
|
@@ -3557,7 +4008,7 @@ var AccordionTrigger = React43.forwardRef(
|
|
|
3557
4008
|
...props,
|
|
3558
4009
|
children: [
|
|
3559
4010
|
children,
|
|
3560
|
-
icon ?? /* @__PURE__ */
|
|
4011
|
+
icon ?? /* @__PURE__ */ jsx44(
|
|
3561
4012
|
"svg",
|
|
3562
4013
|
{
|
|
3563
4014
|
"aria-hidden": "true",
|
|
@@ -3567,7 +4018,7 @@ var AccordionTrigger = React43.forwardRef(
|
|
|
3567
4018
|
strokeWidth: "2",
|
|
3568
4019
|
strokeLinecap: "round",
|
|
3569
4020
|
className: cn("h-4 w-4 shrink-0 transition-transform duration-200", open && "rotate-180"),
|
|
3570
|
-
children: /* @__PURE__ */
|
|
4021
|
+
children: /* @__PURE__ */ jsx44("polyline", { points: "6 9 12 15 18 9" })
|
|
3571
4022
|
}
|
|
3572
4023
|
)
|
|
3573
4024
|
]
|
|
@@ -3576,51 +4027,58 @@ var AccordionTrigger = React43.forwardRef(
|
|
|
3576
4027
|
}
|
|
3577
4028
|
);
|
|
3578
4029
|
AccordionTrigger.displayName = "AccordionTrigger";
|
|
3579
|
-
var AccordionContent =
|
|
4030
|
+
var AccordionContent = React44.forwardRef(
|
|
3580
4031
|
({ className, children, ...props }, ref) => {
|
|
3581
|
-
const { id } =
|
|
3582
|
-
const { openItems } =
|
|
4032
|
+
const { id } = React44.useContext(AccordionItemContext);
|
|
4033
|
+
const { openItems } = React44.useContext(AccordionContext);
|
|
3583
4034
|
const open = openItems.has(id);
|
|
3584
|
-
const [
|
|
3585
|
-
|
|
3586
|
-
|
|
3587
|
-
setExpanded(false);
|
|
3588
|
-
return;
|
|
3589
|
-
}
|
|
4035
|
+
const [mounted, setMounted] = React44.useState(open);
|
|
4036
|
+
const [expanded, setExpanded] = React44.useState(open);
|
|
4037
|
+
React44.useEffect(() => {
|
|
3590
4038
|
const reduce = typeof window.matchMedia === "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
4039
|
+
if (open) {
|
|
4040
|
+
setMounted(true);
|
|
4041
|
+
if (reduce) {
|
|
4042
|
+
setExpanded(true);
|
|
4043
|
+
return;
|
|
4044
|
+
}
|
|
4045
|
+
let second = 0;
|
|
4046
|
+
const first = requestAnimationFrame(() => {
|
|
4047
|
+
second = requestAnimationFrame(() => setExpanded(true));
|
|
4048
|
+
});
|
|
4049
|
+
return () => {
|
|
4050
|
+
cancelAnimationFrame(first);
|
|
4051
|
+
cancelAnimationFrame(second);
|
|
4052
|
+
};
|
|
4053
|
+
}
|
|
4054
|
+
setExpanded(false);
|
|
3591
4055
|
if (reduce) {
|
|
3592
|
-
|
|
4056
|
+
setMounted(false);
|
|
3593
4057
|
return;
|
|
3594
4058
|
}
|
|
3595
|
-
|
|
3596
|
-
|
|
3597
|
-
second = requestAnimationFrame(() => setExpanded(true));
|
|
3598
|
-
});
|
|
3599
|
-
return () => {
|
|
3600
|
-
cancelAnimationFrame(first);
|
|
3601
|
-
cancelAnimationFrame(second);
|
|
3602
|
-
};
|
|
4059
|
+
const timer = setTimeout(() => setMounted(false), 320);
|
|
4060
|
+
return () => clearTimeout(timer);
|
|
3603
4061
|
}, [open]);
|
|
3604
|
-
return /* @__PURE__ */
|
|
4062
|
+
return /* @__PURE__ */ jsx44(
|
|
3605
4063
|
"div",
|
|
3606
4064
|
{
|
|
3607
4065
|
ref,
|
|
3608
4066
|
id: `${id}-panel`,
|
|
3609
4067
|
role: "region",
|
|
3610
4068
|
"aria-labelledby": `${id}-trigger`,
|
|
3611
|
-
hidden:
|
|
4069
|
+
"aria-hidden": open ? void 0 : true,
|
|
4070
|
+
hidden: !mounted,
|
|
3612
4071
|
className: cn(
|
|
3613
|
-
// No display utility while
|
|
4072
|
+
// No display utility while unmounted: author styles would beat the
|
|
3614
4073
|
// UA [hidden] rule and keep the collapsed panel visible.
|
|
3615
|
-
|
|
3616
|
-
"grid transition-[grid-template-rows] duration-
|
|
3617
|
-
expanded ? "grid-rows-[1fr]" : "grid-rows-[0fr]"
|
|
4074
|
+
mounted && cn(
|
|
4075
|
+
"grid transition-[grid-template-rows,opacity] duration-300 ease-out motion-reduce:transition-none",
|
|
4076
|
+
expanded ? "grid-rows-[1fr] opacity-100" : "grid-rows-[0fr] pointer-events-none opacity-0"
|
|
3618
4077
|
),
|
|
3619
|
-
!open && "grid-rows-[0fr]",
|
|
3620
4078
|
className
|
|
3621
4079
|
),
|
|
3622
4080
|
...props,
|
|
3623
|
-
children: /* @__PURE__ */
|
|
4081
|
+
children: /* @__PURE__ */ jsx44("div", { className: "overflow-hidden", children: /* @__PURE__ */ jsx44("div", { className: "px-4 pb-3 text-sm text-muted-foreground", children }) })
|
|
3624
4082
|
}
|
|
3625
4083
|
);
|
|
3626
4084
|
}
|
|
@@ -3628,10 +4086,10 @@ var AccordionContent = React43.forwardRef(
|
|
|
3628
4086
|
AccordionContent.displayName = "AccordionContent";
|
|
3629
4087
|
|
|
3630
4088
|
// src/components/table/Table.tsx
|
|
3631
|
-
import * as
|
|
3632
|
-
import { jsx as
|
|
3633
|
-
var Table =
|
|
3634
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
4089
|
+
import * as React45 from "react";
|
|
4090
|
+
import { jsx as jsx45 } from "react/jsx-runtime";
|
|
4091
|
+
var Table = React45.forwardRef(
|
|
4092
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx45("div", { className: "relative w-full overflow-auto", children: /* @__PURE__ */ jsx45(
|
|
3635
4093
|
"table",
|
|
3636
4094
|
{
|
|
3637
4095
|
ref,
|
|
@@ -3641,16 +4099,16 @@ var Table = React44.forwardRef(
|
|
|
3641
4099
|
) })
|
|
3642
4100
|
);
|
|
3643
4101
|
Table.displayName = "Table";
|
|
3644
|
-
var TableHeader =
|
|
3645
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
4102
|
+
var TableHeader = React45.forwardRef(
|
|
4103
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx45("thead", { ref, className: cn("[&_tr]:border-b", className), ...props })
|
|
3646
4104
|
);
|
|
3647
4105
|
TableHeader.displayName = "TableHeader";
|
|
3648
|
-
var TableBody =
|
|
3649
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
4106
|
+
var TableBody = React45.forwardRef(
|
|
4107
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx45("tbody", { ref, className: cn("[&_tr:last-child]:border-0", className), ...props })
|
|
3650
4108
|
);
|
|
3651
4109
|
TableBody.displayName = "TableBody";
|
|
3652
|
-
var TableFooter =
|
|
3653
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
4110
|
+
var TableFooter = React45.forwardRef(
|
|
4111
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx45(
|
|
3654
4112
|
"tfoot",
|
|
3655
4113
|
{
|
|
3656
4114
|
ref,
|
|
@@ -3660,8 +4118,8 @@ var TableFooter = React44.forwardRef(
|
|
|
3660
4118
|
)
|
|
3661
4119
|
);
|
|
3662
4120
|
TableFooter.displayName = "TableFooter";
|
|
3663
|
-
var TableRow =
|
|
3664
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
4121
|
+
var TableRow = React45.forwardRef(
|
|
4122
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx45(
|
|
3665
4123
|
"tr",
|
|
3666
4124
|
{
|
|
3667
4125
|
ref,
|
|
@@ -3674,8 +4132,8 @@ var TableRow = React44.forwardRef(
|
|
|
3674
4132
|
)
|
|
3675
4133
|
);
|
|
3676
4134
|
TableRow.displayName = "TableRow";
|
|
3677
|
-
var TableHead =
|
|
3678
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
4135
|
+
var TableHead = React45.forwardRef(
|
|
4136
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx45(
|
|
3679
4137
|
"th",
|
|
3680
4138
|
{
|
|
3681
4139
|
ref,
|
|
@@ -3689,27 +4147,27 @@ var TableHead = React44.forwardRef(
|
|
|
3689
4147
|
)
|
|
3690
4148
|
);
|
|
3691
4149
|
TableHead.displayName = "TableHead";
|
|
3692
|
-
var TableCell =
|
|
3693
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
4150
|
+
var TableCell = React45.forwardRef(
|
|
4151
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx45("td", { ref, className: cn("px-3 py-2 align-middle", className), ...props })
|
|
3694
4152
|
);
|
|
3695
4153
|
TableCell.displayName = "TableCell";
|
|
3696
|
-
var TableCaption =
|
|
3697
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
4154
|
+
var TableCaption = React45.forwardRef(
|
|
4155
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx45("caption", { ref, className: cn("mt-3 text-xs text-muted-foreground", className), ...props })
|
|
3698
4156
|
);
|
|
3699
4157
|
TableCaption.displayName = "TableCaption";
|
|
3700
4158
|
|
|
3701
4159
|
// src/components/data-table/DataTable.tsx
|
|
3702
|
-
import * as
|
|
4160
|
+
import * as React47 from "react";
|
|
3703
4161
|
|
|
3704
4162
|
// src/components/pagination/Pagination.tsx
|
|
3705
|
-
import * as
|
|
3706
|
-
import { jsx as
|
|
4163
|
+
import * as React46 from "react";
|
|
4164
|
+
import { jsx as jsx46, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
3707
4165
|
var controlClass = "inline-flex h-8 items-center rounded-md border border-border px-2.5 text-sm transition-colors hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50";
|
|
3708
4166
|
var controlDisabledClass = "pointer-events-none opacity-50";
|
|
3709
4167
|
var pageClass = "inline-flex h-8 w-8 items-center justify-center rounded-md border text-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring";
|
|
3710
4168
|
var pageActiveClass = "border-primary bg-primary text-primary-foreground font-medium";
|
|
3711
4169
|
var pageIdleClass = "border-border hover:bg-muted";
|
|
3712
|
-
var Pagination =
|
|
4170
|
+
var Pagination = React46.forwardRef(
|
|
3713
4171
|
({
|
|
3714
4172
|
page: pageProp,
|
|
3715
4173
|
pageCount: pageCountProp,
|
|
@@ -3756,11 +4214,11 @@ var Pagination = React45.forwardRef(
|
|
|
3756
4214
|
if (linkMode) {
|
|
3757
4215
|
const href = hrefFor(target);
|
|
3758
4216
|
if (disabled || href === void 0) {
|
|
3759
|
-
return /* @__PURE__ */
|
|
4217
|
+
return /* @__PURE__ */ jsx46("span", { "aria-label": label, "aria-disabled": "true", className: cn(controlClass, controlDisabledClass), children: content });
|
|
3760
4218
|
}
|
|
3761
|
-
return /* @__PURE__ */
|
|
4219
|
+
return /* @__PURE__ */ jsx46(LinkEl, { ...destination(href), "aria-label": label, className: controlClass, children: content });
|
|
3762
4220
|
}
|
|
3763
|
-
return /* @__PURE__ */
|
|
4221
|
+
return /* @__PURE__ */ jsx46(
|
|
3764
4222
|
"button",
|
|
3765
4223
|
{
|
|
3766
4224
|
type: "button",
|
|
@@ -3779,11 +4237,11 @@ var Pagination = React45.forwardRef(
|
|
|
3779
4237
|
if (linkMode) {
|
|
3780
4238
|
const href = hrefFor(entry);
|
|
3781
4239
|
if (isCurrent || href === void 0) {
|
|
3782
|
-
return /* @__PURE__ */
|
|
4240
|
+
return /* @__PURE__ */ jsx46("span", { "aria-current": "page", "aria-label": label, className: classes, children: entry }, entry);
|
|
3783
4241
|
}
|
|
3784
|
-
return /* @__PURE__ */
|
|
4242
|
+
return /* @__PURE__ */ jsx46(LinkEl, { ...destination(href), "aria-label": label, className: classes, children: entry }, entry);
|
|
3785
4243
|
}
|
|
3786
|
-
return /* @__PURE__ */
|
|
4244
|
+
return /* @__PURE__ */ jsx46(
|
|
3787
4245
|
"button",
|
|
3788
4246
|
{
|
|
3789
4247
|
type: "button",
|
|
@@ -3796,7 +4254,7 @@ var Pagination = React45.forwardRef(
|
|
|
3796
4254
|
entry
|
|
3797
4255
|
);
|
|
3798
4256
|
};
|
|
3799
|
-
const nav = /* @__PURE__ */
|
|
4257
|
+
const nav = /* @__PURE__ */ jsxs30(
|
|
3800
4258
|
"nav",
|
|
3801
4259
|
{
|
|
3802
4260
|
ref,
|
|
@@ -3807,7 +4265,7 @@ var Pagination = React45.forwardRef(
|
|
|
3807
4265
|
withFirst && step(1, labels?.first ?? "First page", icons?.first ?? "\xAB", page <= 1),
|
|
3808
4266
|
step(page - 1, labels?.previous ?? "Previous page", icons?.previous ?? "<", page <= 1),
|
|
3809
4267
|
pages.map(
|
|
3810
|
-
(entry, index) => entry === "ellipsis" ? /* @__PURE__ */
|
|
4268
|
+
(entry, index) => entry === "ellipsis" ? /* @__PURE__ */ jsx46(
|
|
3811
4269
|
"span",
|
|
3812
4270
|
{
|
|
3813
4271
|
"aria-hidden": "true",
|
|
@@ -3823,8 +4281,8 @@ var Pagination = React45.forwardRef(
|
|
|
3823
4281
|
}
|
|
3824
4282
|
);
|
|
3825
4283
|
if (!summaryEnabled) return nav;
|
|
3826
|
-
return /* @__PURE__ */
|
|
3827
|
-
/* @__PURE__ */
|
|
4284
|
+
return /* @__PURE__ */ jsxs30("div", { className: cn("flex flex-wrap items-center justify-between gap-3", className), children: [
|
|
4285
|
+
/* @__PURE__ */ jsx46("p", { className: "text-sm text-muted-foreground", children: rangeStart !== void 0 && rangeEnd !== void 0 && total !== void 0 ? `Showing ${rangeStart}\u2013${rangeEnd} of ${total} ${itemLabel}` : `Page ${page} of ${pageCount}` }),
|
|
3828
4286
|
nav
|
|
3829
4287
|
] });
|
|
3830
4288
|
}
|
|
@@ -3832,7 +4290,7 @@ var Pagination = React45.forwardRef(
|
|
|
3832
4290
|
Pagination.displayName = "Pagination";
|
|
3833
4291
|
|
|
3834
4292
|
// src/components/data-table/DataTable.tsx
|
|
3835
|
-
import { jsx as
|
|
4293
|
+
import { jsx as jsx47, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
3836
4294
|
function compareValues(a, b) {
|
|
3837
4295
|
if (typeof a === "number" && typeof b === "number") return a - b;
|
|
3838
4296
|
if (a instanceof Date && b instanceof Date) return a.getTime() - b.getTime();
|
|
@@ -3863,6 +4321,7 @@ function DataTable({
|
|
|
3863
4321
|
onRowClick,
|
|
3864
4322
|
emptyMessage = "No results.",
|
|
3865
4323
|
selectAllLabel = "Select all rows",
|
|
4324
|
+
selectedLabel = "{count} selected",
|
|
3866
4325
|
stickyHeader,
|
|
3867
4326
|
density = "default",
|
|
3868
4327
|
zebra,
|
|
@@ -3870,9 +4329,9 @@ function DataTable({
|
|
|
3870
4329
|
loadingRows,
|
|
3871
4330
|
className
|
|
3872
4331
|
}) {
|
|
3873
|
-
const [internalSort, setInternalSort] =
|
|
3874
|
-
const [internalPage, setInternalPage] =
|
|
3875
|
-
const sort =
|
|
4332
|
+
const [internalSort, setInternalSort] = React47.useState(defaultSort);
|
|
4333
|
+
const [internalPage, setInternalPage] = React47.useState(1);
|
|
4334
|
+
const sort = React47.useMemo(() => {
|
|
3876
4335
|
if (sortKey !== void 0) {
|
|
3877
4336
|
return sortKey === null ? null : { key: sortKey, dir: sortDir ?? "asc" };
|
|
3878
4337
|
}
|
|
@@ -3889,7 +4348,7 @@ function DataTable({
|
|
|
3889
4348
|
if (page === void 0) setInternalPage(next);
|
|
3890
4349
|
onPageChange?.(next);
|
|
3891
4350
|
};
|
|
3892
|
-
const sorted =
|
|
4351
|
+
const sorted = React47.useMemo(() => {
|
|
3893
4352
|
if (!sort) return data;
|
|
3894
4353
|
const column = columns.find((c) => c.key === sort.key);
|
|
3895
4354
|
if (!column) return data;
|
|
@@ -3909,10 +4368,10 @@ function DataTable({
|
|
|
3909
4368
|
const pageCount = pageCountProp ?? computedPageCount;
|
|
3910
4369
|
const safePage = Math.min(currentPage, pageCount || 1);
|
|
3911
4370
|
const visible = manualPagination ? data : pageSize ? sorted.slice((safePage - 1) * pageSize, safePage * pageSize) : sorted;
|
|
3912
|
-
const [internalSelected, setInternalSelected] =
|
|
4371
|
+
const [internalSelected, setInternalSelected] = React47.useState([]);
|
|
3913
4372
|
const selectionEnabled = selectedRowIds !== void 0 || onSelectedRowIdsChange !== void 0;
|
|
3914
4373
|
const selectedIds = selectedRowIds ?? internalSelected;
|
|
3915
|
-
const selectedSet =
|
|
4374
|
+
const selectedSet = React47.useMemo(() => new Set(selectedIds), [selectedIds]);
|
|
3916
4375
|
const selectableVisible = isRowSelectable ? visible.filter(isRowSelectable) : visible;
|
|
3917
4376
|
const allSelected = selectableVisible.length > 0 && selectableVisible.every((row) => selectedSet.has(rowId(row)));
|
|
3918
4377
|
const someSelected = selectableVisible.some((row) => selectedSet.has(rowId(row)));
|
|
@@ -3940,22 +4399,19 @@ function DataTable({
|
|
|
3940
4399
|
return String(raw);
|
|
3941
4400
|
};
|
|
3942
4401
|
const alignClass = (align) => align === "right" ? "text-right" : align === "center" ? "text-center" : "text-left";
|
|
3943
|
-
return /* @__PURE__ */
|
|
3944
|
-
selectionEnabled && selectedIds.length > 0 && bulkActions && /* @__PURE__ */
|
|
3945
|
-
/* @__PURE__ */
|
|
3946
|
-
|
|
3947
|
-
" selected"
|
|
3948
|
-
] }),
|
|
3949
|
-
/* @__PURE__ */ jsx46("div", { className: "flex flex-wrap items-center gap-2", children: bulkActions })
|
|
4402
|
+
return /* @__PURE__ */ jsxs31("div", { className: cn("w-full space-y-3", className), children: [
|
|
4403
|
+
selectionEnabled && selectedIds.length > 0 && bulkActions && /* @__PURE__ */ jsxs31("div", { className: "flex flex-wrap items-center justify-between gap-2 rounded-lg border border-border bg-muted/40 px-3 py-2 text-sm", children: [
|
|
4404
|
+
/* @__PURE__ */ jsx47("span", { className: "font-medium", children: selectedLabel.replace("{count}", String(selectedIds.length)) }),
|
|
4405
|
+
/* @__PURE__ */ jsx47("div", { className: "flex flex-wrap items-center gap-2", children: bulkActions })
|
|
3950
4406
|
] }),
|
|
3951
|
-
/* @__PURE__ */
|
|
4407
|
+
/* @__PURE__ */ jsx47("div", { className: "w-full overflow-x-auto rounded-lg border border-border", children: /* @__PURE__ */ jsxs31(
|
|
3952
4408
|
"table",
|
|
3953
4409
|
{
|
|
3954
4410
|
className: cn("w-full caption-bottom", density === "compact" ? "text-xs" : "text-sm"),
|
|
3955
4411
|
children: [
|
|
3956
|
-
caption && /* @__PURE__ */
|
|
3957
|
-
/* @__PURE__ */
|
|
3958
|
-
selectionEnabled && /* @__PURE__ */
|
|
4412
|
+
caption && /* @__PURE__ */ jsx47("caption", { className: "px-3 py-2 text-left text-xs text-muted-foreground", children: caption }),
|
|
4413
|
+
/* @__PURE__ */ jsx47("thead", { className: cn("bg-muted/50", stickyHeader && "sticky top-0 z-10 bg-background"), children: /* @__PURE__ */ jsxs31("tr", { children: [
|
|
4414
|
+
selectionEnabled && /* @__PURE__ */ jsx47("th", { scope: "col", className: "w-10 border-b border-border px-3 py-2", children: /* @__PURE__ */ jsx47(
|
|
3959
4415
|
Checkbox,
|
|
3960
4416
|
{
|
|
3961
4417
|
"aria-label": selectAllLabel,
|
|
@@ -3969,7 +4425,7 @@ function DataTable({
|
|
|
3969
4425
|
columns.map((column) => {
|
|
3970
4426
|
const isSorted = sort?.key === column.key;
|
|
3971
4427
|
const ariaSort = !column.sortable ? void 0 : isSorted ? sort.dir === "asc" ? "ascending" : "descending" : "none";
|
|
3972
|
-
return /* @__PURE__ */
|
|
4428
|
+
return /* @__PURE__ */ jsx47(
|
|
3973
4429
|
"th",
|
|
3974
4430
|
{
|
|
3975
4431
|
scope: "col",
|
|
@@ -3979,7 +4435,7 @@ function DataTable({
|
|
|
3979
4435
|
alignClass(column.align),
|
|
3980
4436
|
column.className
|
|
3981
4437
|
),
|
|
3982
|
-
children: column.sortable ? /* @__PURE__ */
|
|
4438
|
+
children: column.sortable ? /* @__PURE__ */ jsxs31(
|
|
3983
4439
|
"button",
|
|
3984
4440
|
{
|
|
3985
4441
|
type: "button",
|
|
@@ -3987,7 +4443,7 @@ function DataTable({
|
|
|
3987
4443
|
className: "inline-flex items-center gap-1 rounded px-1 py-0.5 transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
3988
4444
|
children: [
|
|
3989
4445
|
column.header,
|
|
3990
|
-
/* @__PURE__ */
|
|
4446
|
+
/* @__PURE__ */ jsx47("span", { "aria-hidden": "true", className: "text-[10px] text-muted-foreground", children: renderSortIcon ? renderSortIcon(isSorted ? sort.dir === "asc" ? "asc" : "desc" : "none") : isSorted ? sort.dir === "asc" ? "\u25B2" : "\u25BC" : "\u2195" })
|
|
3991
4447
|
]
|
|
3992
4448
|
}
|
|
3993
4449
|
) : column.header
|
|
@@ -3996,20 +4452,20 @@ function DataTable({
|
|
|
3996
4452
|
);
|
|
3997
4453
|
})
|
|
3998
4454
|
] }) }),
|
|
3999
|
-
/* @__PURE__ */
|
|
4455
|
+
/* @__PURE__ */ jsx47("tbody", { "aria-busy": loading || void 0, children: loading ? Array.from(
|
|
4000
4456
|
{ length: (loadingRows ?? pageSize ?? Math.min(visible.length, 5)) || 5 },
|
|
4001
|
-
(_, skeletonRow) => /* @__PURE__ */
|
|
4002
|
-
selectionEnabled && /* @__PURE__ */
|
|
4003
|
-
columns.map((column) => /* @__PURE__ */
|
|
4457
|
+
(_, skeletonRow) => /* @__PURE__ */ jsxs31("tr", { children: [
|
|
4458
|
+
selectionEnabled && /* @__PURE__ */ jsx47("td", { className: cn("px-3 py-2", density === "compact" && "px-2 py-1"), children: /* @__PURE__ */ jsx47(Skeleton, { className: "h-4 w-4" }) }),
|
|
4459
|
+
columns.map((column) => /* @__PURE__ */ jsx47("td", { className: cn("px-3 py-2", density === "compact" && "px-2 py-1"), children: /* @__PURE__ */ jsx47(Skeleton, { className: density === "compact" ? "h-3 w-full" : "h-4 w-full" }) }, column.key))
|
|
4004
4460
|
] }, `skeleton-${skeletonRow}`)
|
|
4005
|
-
) : visible.length === 0 ? /* @__PURE__ */
|
|
4461
|
+
) : visible.length === 0 ? /* @__PURE__ */ jsx47("tr", { children: /* @__PURE__ */ jsx47(
|
|
4006
4462
|
"td",
|
|
4007
4463
|
{
|
|
4008
4464
|
colSpan: columns.length + (selectionEnabled ? 1 : 0),
|
|
4009
4465
|
className: "px-3 py-8 text-center text-sm text-muted-foreground",
|
|
4010
4466
|
children: emptyMessage
|
|
4011
4467
|
}
|
|
4012
|
-
) }) : visible.map((row, index) => /* @__PURE__ */
|
|
4468
|
+
) }) : visible.map((row, index) => /* @__PURE__ */ jsxs31(
|
|
4013
4469
|
"tr",
|
|
4014
4470
|
{
|
|
4015
4471
|
tabIndex: onRowClick ? 0 : void 0,
|
|
@@ -4026,12 +4482,12 @@ function DataTable({
|
|
|
4026
4482
|
onRowClick && "cursor-pointer transition-colors hover:bg-muted/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring"
|
|
4027
4483
|
),
|
|
4028
4484
|
children: [
|
|
4029
|
-
selectionEnabled && /* @__PURE__ */
|
|
4485
|
+
selectionEnabled && /* @__PURE__ */ jsx47(
|
|
4030
4486
|
"td",
|
|
4031
4487
|
{
|
|
4032
4488
|
className: cn("align-middle", density === "compact" ? "px-2 py-1" : "px-3 py-2"),
|
|
4033
4489
|
onClick: (event) => event.stopPropagation(),
|
|
4034
|
-
children: /* @__PURE__ */
|
|
4490
|
+
children: /* @__PURE__ */ jsx47(
|
|
4035
4491
|
Checkbox,
|
|
4036
4492
|
{
|
|
4037
4493
|
"aria-label": `Select row ${rowId(row)}`,
|
|
@@ -4042,7 +4498,7 @@ function DataTable({
|
|
|
4042
4498
|
)
|
|
4043
4499
|
}
|
|
4044
4500
|
),
|
|
4045
|
-
columns.map((column) => /* @__PURE__ */
|
|
4501
|
+
columns.map((column) => /* @__PURE__ */ jsx47(
|
|
4046
4502
|
"td",
|
|
4047
4503
|
{
|
|
4048
4504
|
className: cn(
|
|
@@ -4051,7 +4507,7 @@ function DataTable({
|
|
|
4051
4507
|
alignClass(column.align),
|
|
4052
4508
|
column.className
|
|
4053
4509
|
),
|
|
4054
|
-
children: column.onClick ? /* @__PURE__ */
|
|
4510
|
+
children: column.onClick ? /* @__PURE__ */ jsx47(
|
|
4055
4511
|
"button",
|
|
4056
4512
|
{
|
|
4057
4513
|
type: "button",
|
|
@@ -4070,8 +4526,8 @@ function DataTable({
|
|
|
4070
4526
|
]
|
|
4071
4527
|
}
|
|
4072
4528
|
) }),
|
|
4073
|
-
pageSize && pageCount > 1 && /* @__PURE__ */
|
|
4074
|
-
/* @__PURE__ */
|
|
4529
|
+
pageSize && pageCount > 1 && /* @__PURE__ */ jsxs31("div", { className: "flex flex-wrap items-center justify-between gap-x-4 gap-y-2", children: [
|
|
4530
|
+
/* @__PURE__ */ jsxs31(
|
|
4075
4531
|
"p",
|
|
4076
4532
|
{
|
|
4077
4533
|
className: "min-h-8 leading-none text-xs text-muted-foreground",
|
|
@@ -4086,16 +4542,16 @@ function DataTable({
|
|
|
4086
4542
|
]
|
|
4087
4543
|
}
|
|
4088
4544
|
),
|
|
4089
|
-
/* @__PURE__ */
|
|
4545
|
+
/* @__PURE__ */ jsx47(Pagination, { page: safePage, pageCount, onPageChange: setPage })
|
|
4090
4546
|
] })
|
|
4091
4547
|
] });
|
|
4092
4548
|
}
|
|
4093
4549
|
|
|
4094
4550
|
// src/components/list/List.tsx
|
|
4095
|
-
import * as
|
|
4096
|
-
import { Fragment as Fragment9, jsx as
|
|
4097
|
-
var List =
|
|
4098
|
-
({ divided, bordered, size = "default", className, ...props }, ref) => /* @__PURE__ */
|
|
4551
|
+
import * as React48 from "react";
|
|
4552
|
+
import { Fragment as Fragment9, jsx as jsx48, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
4553
|
+
var List = React48.forwardRef(
|
|
4554
|
+
({ divided, bordered, size = "default", className, ...props }, ref) => /* @__PURE__ */ jsx48(
|
|
4099
4555
|
"ul",
|
|
4100
4556
|
{
|
|
4101
4557
|
ref,
|
|
@@ -4111,7 +4567,7 @@ var List = React47.forwardRef(
|
|
|
4111
4567
|
)
|
|
4112
4568
|
);
|
|
4113
4569
|
List.displayName = "List";
|
|
4114
|
-
var ListItem =
|
|
4570
|
+
var ListItem = React48.forwardRef(
|
|
4115
4571
|
({ leading, trailing, selected, onClick, description, disabled, className, children, ...props }, ref) => {
|
|
4116
4572
|
const padding = "px-3 py-2.5";
|
|
4117
4573
|
const rowClass = cn(
|
|
@@ -4121,43 +4577,43 @@ var ListItem = React47.forwardRef(
|
|
|
4121
4577
|
disabled && "opacity-50",
|
|
4122
4578
|
className
|
|
4123
4579
|
);
|
|
4124
|
-
const body = /* @__PURE__ */
|
|
4125
|
-
leading && /* @__PURE__ */
|
|
4126
|
-
/* @__PURE__ */
|
|
4127
|
-
/* @__PURE__ */
|
|
4128
|
-
description && /* @__PURE__ */
|
|
4580
|
+
const body = /* @__PURE__ */ jsxs32(Fragment9, { children: [
|
|
4581
|
+
leading && /* @__PURE__ */ jsx48("span", { className: "flex shrink-0 items-center", children: leading }),
|
|
4582
|
+
/* @__PURE__ */ jsxs32("span", { className: "min-w-0 flex-1", children: [
|
|
4583
|
+
/* @__PURE__ */ jsx48("span", { className: "block truncate", children }),
|
|
4584
|
+
description && /* @__PURE__ */ jsx48("span", { className: "mt-0.5 block text-xs text-muted-foreground", children: description })
|
|
4129
4585
|
] }),
|
|
4130
|
-
trailing && /* @__PURE__ */
|
|
4586
|
+
trailing && /* @__PURE__ */ jsx48("span", { className: "flex shrink-0 items-center text-xs text-muted-foreground", children: trailing })
|
|
4131
4587
|
] });
|
|
4132
|
-
return /* @__PURE__ */
|
|
4588
|
+
return /* @__PURE__ */ jsx48("li", { ref, ...props, children: onClick ? /* @__PURE__ */ jsx48("button", { type: "button", onClick, disabled, className: cn(padding, rowClass), children: body }) : /* @__PURE__ */ jsx48("div", { className: cn(padding, rowClass), children: body }) });
|
|
4133
4589
|
}
|
|
4134
4590
|
);
|
|
4135
4591
|
ListItem.displayName = "ListItem";
|
|
4136
4592
|
|
|
4137
4593
|
// src/components/link/Link.tsx
|
|
4138
|
-
import * as
|
|
4594
|
+
import * as React49 from "react";
|
|
4139
4595
|
import { Slot as Slot4 } from "@radix-ui/react-slot";
|
|
4140
4596
|
import { cva as cva7 } from "class-variance-authority";
|
|
4141
|
-
import { Fragment as Fragment10, jsx as
|
|
4597
|
+
import { Fragment as Fragment10, jsx as jsx49, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
4142
4598
|
var linkVariants = cva7("inline-flex items-center gap-1 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background rounded-sm", {
|
|
4143
4599
|
variants: {
|
|
4144
4600
|
variant: {
|
|
4145
|
-
default: "text-primary hover:underline underline-offset-4",
|
|
4601
|
+
default: "text-primary-ink hover:underline underline-offset-4",
|
|
4146
4602
|
muted: "text-muted-foreground hover:text-foreground",
|
|
4147
|
-
underline: "underline underline-offset-4 hover:text-primary",
|
|
4148
|
-
arrow: "font-medium text-primary hover:underline underline-offset-4",
|
|
4149
|
-
external: "text-primary hover:underline underline-offset-4"
|
|
4603
|
+
underline: "underline underline-offset-4 hover:text-primary-ink",
|
|
4604
|
+
arrow: "font-medium text-primary-ink hover:underline underline-offset-4",
|
|
4605
|
+
external: "text-primary-ink hover:underline underline-offset-4"
|
|
4150
4606
|
}
|
|
4151
4607
|
},
|
|
4152
4608
|
defaultVariants: { variant: "default" }
|
|
4153
4609
|
});
|
|
4154
4610
|
var ABSOLUTE = /^https?:\/\//i;
|
|
4155
|
-
var Link =
|
|
4611
|
+
var Link = React49.forwardRef(function Link2({ className, variant, asChild = false, external, target, rel, children, ...props }, ref) {
|
|
4156
4612
|
const isAbsolute = typeof props.href === "string" && ABSOLUTE.test(props.href);
|
|
4157
4613
|
const isExternal = external ?? isAbsolute;
|
|
4158
4614
|
const Comp = asChild ? Slot4 : "a";
|
|
4159
4615
|
if (asChild) {
|
|
4160
|
-
return /* @__PURE__ */
|
|
4616
|
+
return /* @__PURE__ */ jsx49(
|
|
4161
4617
|
Comp,
|
|
4162
4618
|
{
|
|
4163
4619
|
ref,
|
|
@@ -4169,7 +4625,7 @@ var Link = React48.forwardRef(function Link2({ className, variant, asChild = fal
|
|
|
4169
4625
|
}
|
|
4170
4626
|
);
|
|
4171
4627
|
}
|
|
4172
|
-
return /* @__PURE__ */
|
|
4628
|
+
return /* @__PURE__ */ jsxs33(
|
|
4173
4629
|
Comp,
|
|
4174
4630
|
{
|
|
4175
4631
|
ref,
|
|
@@ -4179,18 +4635,55 @@ var Link = React48.forwardRef(function Link2({ className, variant, asChild = fal
|
|
|
4179
4635
|
...props,
|
|
4180
4636
|
children: [
|
|
4181
4637
|
children,
|
|
4182
|
-
isExternal && variant !== "muted" && /* @__PURE__ */
|
|
4183
|
-
/* @__PURE__ */
|
|
4184
|
-
/* @__PURE__ */
|
|
4638
|
+
isExternal && variant !== "muted" && /* @__PURE__ */ jsxs33(Fragment10, { children: [
|
|
4639
|
+
/* @__PURE__ */ jsx49("span", { "aria-hidden": "true", className: "text-[0.75em]", children: "\u2197" }),
|
|
4640
|
+
/* @__PURE__ */ jsx49("span", { className: "sr-only", children: "(opens in a new tab)" })
|
|
4185
4641
|
] })
|
|
4186
4642
|
]
|
|
4187
4643
|
}
|
|
4188
4644
|
);
|
|
4189
4645
|
});
|
|
4190
4646
|
|
|
4647
|
+
// src/components/image/Image.tsx
|
|
4648
|
+
import * as React50 from "react";
|
|
4649
|
+
import { Fragment as Fragment11, jsx as jsx50 } from "react/jsx-runtime";
|
|
4650
|
+
function Image2({
|
|
4651
|
+
src,
|
|
4652
|
+
alt,
|
|
4653
|
+
fallbackSrc,
|
|
4654
|
+
fallback,
|
|
4655
|
+
priority = false,
|
|
4656
|
+
width = 1200,
|
|
4657
|
+
height = 630,
|
|
4658
|
+
className,
|
|
4659
|
+
imgClassName,
|
|
4660
|
+
style
|
|
4661
|
+
}) {
|
|
4662
|
+
const [stage, setStage] = React50.useState(0);
|
|
4663
|
+
const onError = () => setStage((current2) => current2 === 0 && fallbackSrc ? 1 : 2);
|
|
4664
|
+
const current = stage === 0 ? src : stage === 1 ? fallbackSrc : null;
|
|
4665
|
+
if (!current || stage === 2) return /* @__PURE__ */ jsx50(Fragment11, { children: fallback ?? null });
|
|
4666
|
+
return /* @__PURE__ */ jsx50(
|
|
4667
|
+
"img",
|
|
4668
|
+
{
|
|
4669
|
+
src: current,
|
|
4670
|
+
alt,
|
|
4671
|
+
width,
|
|
4672
|
+
height,
|
|
4673
|
+
loading: priority ? "eager" : "lazy",
|
|
4674
|
+
fetchPriority: priority ? "high" : "auto",
|
|
4675
|
+
decoding: "async",
|
|
4676
|
+
className: cn(className, imgClassName),
|
|
4677
|
+
style,
|
|
4678
|
+
onError
|
|
4679
|
+
}
|
|
4680
|
+
);
|
|
4681
|
+
}
|
|
4682
|
+
Image2.displayName = "Image";
|
|
4683
|
+
|
|
4191
4684
|
// src/components/text/Text.tsx
|
|
4192
|
-
import * as
|
|
4193
|
-
import { jsx as
|
|
4685
|
+
import * as React51 from "react";
|
|
4686
|
+
import { jsx as jsx51 } from "react/jsx-runtime";
|
|
4194
4687
|
var sizeClasses4 = {
|
|
4195
4688
|
xs: "text-xs",
|
|
4196
4689
|
sm: "text-sm",
|
|
@@ -4204,10 +4697,10 @@ var weightClasses = {
|
|
|
4204
4697
|
semibold: "font-semibold",
|
|
4205
4698
|
bold: "font-bold"
|
|
4206
4699
|
};
|
|
4207
|
-
var Text =
|
|
4700
|
+
var Text = React51.forwardRef(
|
|
4208
4701
|
({ inline, size = "base", weight, muted, className, ...props }, ref) => {
|
|
4209
4702
|
const Tag = inline ? "span" : "p";
|
|
4210
|
-
return /* @__PURE__ */
|
|
4703
|
+
return /* @__PURE__ */ jsx51(
|
|
4211
4704
|
Tag,
|
|
4212
4705
|
{
|
|
4213
4706
|
ref,
|
|
@@ -4226,8 +4719,8 @@ var Text = React49.forwardRef(
|
|
|
4226
4719
|
Text.displayName = "Text";
|
|
4227
4720
|
|
|
4228
4721
|
// src/components/heading/Heading.tsx
|
|
4229
|
-
import * as
|
|
4230
|
-
import { jsx as
|
|
4722
|
+
import * as React52 from "react";
|
|
4723
|
+
import { jsx as jsx52 } from "react/jsx-runtime";
|
|
4231
4724
|
var levelClasses = {
|
|
4232
4725
|
1: "text-4xl",
|
|
4233
4726
|
2: "text-3xl",
|
|
@@ -4244,10 +4737,10 @@ var sizeClasses5 = {
|
|
|
4244
4737
|
"2xl": "text-4xl",
|
|
4245
4738
|
"3xl": "text-5xl"
|
|
4246
4739
|
};
|
|
4247
|
-
var Heading =
|
|
4740
|
+
var Heading = React52.forwardRef(
|
|
4248
4741
|
({ level, size, muted, className, ...props }, ref) => {
|
|
4249
4742
|
const Tag = `h${level}`;
|
|
4250
|
-
return /* @__PURE__ */
|
|
4743
|
+
return /* @__PURE__ */ jsx52(
|
|
4251
4744
|
Tag,
|
|
4252
4745
|
{
|
|
4253
4746
|
ref,
|
|
@@ -4265,20 +4758,20 @@ var Heading = React50.forwardRef(
|
|
|
4265
4758
|
Heading.displayName = "Heading";
|
|
4266
4759
|
|
|
4267
4760
|
// src/components/empty-state/EmptyState.tsx
|
|
4268
|
-
import * as
|
|
4269
|
-
import { jsx as
|
|
4761
|
+
import * as React53 from "react";
|
|
4762
|
+
import { jsx as jsx53, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
4270
4763
|
function isActionObject(value) {
|
|
4271
|
-
return typeof value === "object" && value !== null && !
|
|
4764
|
+
return typeof value === "object" && value !== null && !React53.isValidElement(value) && "label" in value;
|
|
4272
4765
|
}
|
|
4273
4766
|
function renderAction(action) {
|
|
4274
4767
|
if (!isActionObject(action)) return action;
|
|
4275
4768
|
const { label, onClick, href, variant } = action;
|
|
4276
4769
|
if (href) {
|
|
4277
|
-
return /* @__PURE__ */
|
|
4770
|
+
return /* @__PURE__ */ jsx53(Button, { variant, asChild: true, children: /* @__PURE__ */ jsx53("a", { href, children: label }) });
|
|
4278
4771
|
}
|
|
4279
|
-
return /* @__PURE__ */
|
|
4772
|
+
return /* @__PURE__ */ jsx53(Button, { variant, onClick, children: label });
|
|
4280
4773
|
}
|
|
4281
|
-
var EmptyState =
|
|
4774
|
+
var EmptyState = React53.forwardRef(function EmptyState2({
|
|
4282
4775
|
icon,
|
|
4283
4776
|
title,
|
|
4284
4777
|
description,
|
|
@@ -4292,7 +4785,7 @@ var EmptyState = React51.forwardRef(function EmptyState2({
|
|
|
4292
4785
|
...props
|
|
4293
4786
|
}, ref) {
|
|
4294
4787
|
const primaryAction = renderAction(action) ?? actions;
|
|
4295
|
-
return /* @__PURE__ */
|
|
4788
|
+
return /* @__PURE__ */ jsxs34(
|
|
4296
4789
|
"div",
|
|
4297
4790
|
{
|
|
4298
4791
|
ref,
|
|
@@ -4303,11 +4796,11 @@ var EmptyState = React51.forwardRef(function EmptyState2({
|
|
|
4303
4796
|
),
|
|
4304
4797
|
...props,
|
|
4305
4798
|
children: [
|
|
4306
|
-
icon && /* @__PURE__ */
|
|
4307
|
-
/* @__PURE__ */
|
|
4308
|
-
description && /* @__PURE__ */
|
|
4799
|
+
icon && /* @__PURE__ */ jsx53("div", { className: "text-muted-foreground [&_svg]:size-8", children: icon }),
|
|
4800
|
+
/* @__PURE__ */ jsx53(Title, { className: cn("font-semibold", size === "md" ? "text-base" : "text-sm"), children: title }),
|
|
4801
|
+
description && /* @__PURE__ */ jsx53("p", { className: "max-w-sm text-sm text-muted-foreground", children: description }),
|
|
4309
4802
|
children,
|
|
4310
|
-
(primaryAction || secondaryAction) && /* @__PURE__ */
|
|
4803
|
+
(primaryAction || secondaryAction) && /* @__PURE__ */ jsxs34("div", { className: "mt-1 flex flex-wrap items-center justify-center gap-2", children: [
|
|
4311
4804
|
primaryAction,
|
|
4312
4805
|
secondaryAction
|
|
4313
4806
|
] })
|
|
@@ -4317,27 +4810,27 @@ var EmptyState = React51.forwardRef(function EmptyState2({
|
|
|
4317
4810
|
});
|
|
4318
4811
|
|
|
4319
4812
|
// src/components/page-header/PageHeader.tsx
|
|
4320
|
-
import * as
|
|
4321
|
-
import { jsx as
|
|
4813
|
+
import * as React54 from "react";
|
|
4814
|
+
import { jsx as jsx54, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
4322
4815
|
var sizeClasses6 = {
|
|
4323
4816
|
sm: "text-xl",
|
|
4324
4817
|
md: "text-2xl",
|
|
4325
4818
|
lg: "text-3xl",
|
|
4326
4819
|
hero: "text-4xl sm:text-5xl lg:text-[3.4rem] lg:leading-[1.1]"
|
|
4327
4820
|
};
|
|
4328
|
-
var PageHeader =
|
|
4821
|
+
var PageHeader = React54.forwardRef(function PageHeader2({ title, description, subtitle, breadcrumbs, actions, eyebrow, size = "md", align = "left", titleClassName, descriptionClassName, eyebrowClassName, className, children, ...props }, ref) {
|
|
4329
4822
|
const supporting = description ?? subtitle;
|
|
4330
|
-
return /* @__PURE__ */
|
|
4331
|
-
breadcrumbs && /* @__PURE__ */
|
|
4332
|
-
eyebrow && /* @__PURE__ */
|
|
4333
|
-
/* @__PURE__ */
|
|
4334
|
-
/* @__PURE__ */
|
|
4335
|
-
/* @__PURE__ */
|
|
4336
|
-
supporting && /* @__PURE__ */
|
|
4823
|
+
return /* @__PURE__ */ jsxs35("div", { ref, className: cn("flex flex-col gap-2", align === "center" && "items-center text-center", className), ...props, children: [
|
|
4824
|
+
breadcrumbs && /* @__PURE__ */ jsx54("div", { className: "text-sm text-muted-foreground", children: breadcrumbs }),
|
|
4825
|
+
eyebrow && /* @__PURE__ */ jsx54("div", { className: cn("text-xs font-medium uppercase tracking-wide text-primary-ink", eyebrowClassName), children: eyebrow }),
|
|
4826
|
+
/* @__PURE__ */ jsxs35("div", { className: cn("flex w-full flex-wrap items-start justify-between gap-3", align === "center" && "justify-center"), children: [
|
|
4827
|
+
/* @__PURE__ */ jsxs35("div", { className: cn("min-w-0", align === "center" && "flex flex-col items-center"), children: [
|
|
4828
|
+
/* @__PURE__ */ jsx54("h1", { className: cn("font-semibold tracking-tight", sizeClasses6[size], titleClassName), children: title }),
|
|
4829
|
+
supporting && /* @__PURE__ */ jsx54("p", { className: cn("mt-2 max-w-2xl text-base text-muted-foreground", descriptionClassName), children: supporting })
|
|
4337
4830
|
] }),
|
|
4338
|
-
actions && /* @__PURE__ */
|
|
4831
|
+
actions && /* @__PURE__ */ jsx54("div", { className: "flex shrink-0 items-center gap-2", children: actions })
|
|
4339
4832
|
] }),
|
|
4340
|
-
children && /* @__PURE__ */
|
|
4833
|
+
children && /* @__PURE__ */ jsx54("div", { className: "mt-2", children })
|
|
4341
4834
|
] });
|
|
4342
4835
|
});
|
|
4343
4836
|
|
|
@@ -4357,16 +4850,16 @@ function documentHead({
|
|
|
4357
4850
|
}
|
|
4358
4851
|
|
|
4359
4852
|
// src/components/section-heading/SectionHeading.tsx
|
|
4360
|
-
import * as
|
|
4361
|
-
import { jsx as
|
|
4853
|
+
import * as React55 from "react";
|
|
4854
|
+
import { jsx as jsx55, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
4362
4855
|
var sizeClasses7 = {
|
|
4363
4856
|
sm: "text-lg",
|
|
4364
4857
|
md: "text-2xl",
|
|
4365
4858
|
lg: "text-3xl"
|
|
4366
4859
|
};
|
|
4367
|
-
var SectionHeading =
|
|
4860
|
+
var SectionHeading = React55.forwardRef(function SectionHeading2({ title, description, eyebrow, actions, level = 2, align = "left", size = "md", titleClassName, descriptionClassName, eyebrowClassName, className, ...props }, ref) {
|
|
4368
4861
|
const Heading2 = `h${level}`;
|
|
4369
|
-
return /* @__PURE__ */
|
|
4862
|
+
return /* @__PURE__ */ jsxs36(
|
|
4370
4863
|
"div",
|
|
4371
4864
|
{
|
|
4372
4865
|
ref,
|
|
@@ -4377,20 +4870,20 @@ var SectionHeading = React53.forwardRef(function SectionHeading2({ title, descri
|
|
|
4377
4870
|
),
|
|
4378
4871
|
...props,
|
|
4379
4872
|
children: [
|
|
4380
|
-
/* @__PURE__ */
|
|
4381
|
-
eyebrow && /* @__PURE__ */
|
|
4382
|
-
/* @__PURE__ */
|
|
4383
|
-
description && /* @__PURE__ */
|
|
4873
|
+
/* @__PURE__ */ jsxs36("div", { className: cn("min-w-0", align === "center" && "flex flex-col items-center"), children: [
|
|
4874
|
+
eyebrow && /* @__PURE__ */ jsx55("div", { className: cn("mb-1 text-xs font-medium uppercase tracking-wide text-primary-ink", eyebrowClassName), children: eyebrow }),
|
|
4875
|
+
/* @__PURE__ */ jsx55(Heading2, { className: cn("font-semibold tracking-tight", sizeClasses7[size], titleClassName), children: title }),
|
|
4876
|
+
description && /* @__PURE__ */ jsx55("p", { className: cn("mt-2 max-w-2xl text-muted-foreground", align === "center" ? "mx-auto" : "", descriptionClassName), children: description })
|
|
4384
4877
|
] }),
|
|
4385
|
-
actions && /* @__PURE__ */
|
|
4878
|
+
actions && /* @__PURE__ */ jsx55("div", { className: "flex shrink-0 items-center gap-2", children: actions })
|
|
4386
4879
|
]
|
|
4387
4880
|
}
|
|
4388
4881
|
);
|
|
4389
4882
|
});
|
|
4390
4883
|
|
|
4391
4884
|
// src/components/metric-card/MetricCard.tsx
|
|
4392
|
-
import * as
|
|
4393
|
-
import { jsx as
|
|
4885
|
+
import * as React56 from "react";
|
|
4886
|
+
import { jsx as jsx56, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
4394
4887
|
var trendClasses = {
|
|
4395
4888
|
up: "text-success",
|
|
4396
4889
|
down: "text-destructive",
|
|
@@ -4403,11 +4896,11 @@ var toneClasses = {
|
|
|
4403
4896
|
destructive: "text-destructive"
|
|
4404
4897
|
};
|
|
4405
4898
|
var trendGlyph = { up: "\u2191", down: "\u2193", flat: "\u2192" };
|
|
4406
|
-
var MetricCard =
|
|
4899
|
+
var MetricCard = React56.forwardRef(function MetricCard2({ label, value, hint, title, description, delta, trend = "flat", tone = "default", loading = false, icon, className, ...props }, ref) {
|
|
4407
4900
|
const heading = label ?? title;
|
|
4408
4901
|
const supporting = hint ?? description;
|
|
4409
4902
|
if (loading) {
|
|
4410
|
-
return /* @__PURE__ */
|
|
4903
|
+
return /* @__PURE__ */ jsxs37(
|
|
4411
4904
|
"div",
|
|
4412
4905
|
{
|
|
4413
4906
|
ref,
|
|
@@ -4415,41 +4908,41 @@ var MetricCard = React54.forwardRef(function MetricCard2({ label, value, hint, t
|
|
|
4415
4908
|
className: cn("rounded-xl border border-border bg-card p-5", className),
|
|
4416
4909
|
...props,
|
|
4417
4910
|
children: [
|
|
4418
|
-
/* @__PURE__ */
|
|
4419
|
-
heading && /* @__PURE__ */
|
|
4420
|
-
icon && /* @__PURE__ */
|
|
4911
|
+
/* @__PURE__ */ jsxs37("div", { className: "flex items-start justify-between gap-3", children: [
|
|
4912
|
+
heading && /* @__PURE__ */ jsx56("p", { className: "text-sm text-muted-foreground", children: heading }),
|
|
4913
|
+
icon && /* @__PURE__ */ jsx56("span", { className: "text-muted-foreground [&_svg]:size-4", children: icon })
|
|
4421
4914
|
] }),
|
|
4422
|
-
/* @__PURE__ */
|
|
4423
|
-
/* @__PURE__ */
|
|
4915
|
+
/* @__PURE__ */ jsx56("span", { "aria-hidden": "true", className: "mt-3 block h-7 w-24 animate-pulse rounded-md bg-muted" }),
|
|
4916
|
+
/* @__PURE__ */ jsx56("span", { className: "sr-only", children: "Loading" })
|
|
4424
4917
|
]
|
|
4425
4918
|
}
|
|
4426
4919
|
);
|
|
4427
4920
|
}
|
|
4428
|
-
return /* @__PURE__ */
|
|
4429
|
-
/* @__PURE__ */
|
|
4430
|
-
heading && /* @__PURE__ */
|
|
4431
|
-
icon && /* @__PURE__ */
|
|
4921
|
+
return /* @__PURE__ */ jsxs37("div", { ref, className: cn("rounded-xl border border-border bg-card p-5", className), ...props, children: [
|
|
4922
|
+
/* @__PURE__ */ jsxs37("div", { className: "flex items-start justify-between gap-3", children: [
|
|
4923
|
+
heading && /* @__PURE__ */ jsx56("p", { className: "text-sm text-muted-foreground", children: heading }),
|
|
4924
|
+
icon && /* @__PURE__ */ jsx56("span", { className: "text-muted-foreground [&_svg]:size-4", children: icon })
|
|
4432
4925
|
] }),
|
|
4433
|
-
/* @__PURE__ */
|
|
4434
|
-
(delta || supporting) && /* @__PURE__ */
|
|
4435
|
-
delta && /* @__PURE__ */
|
|
4436
|
-
/* @__PURE__ */
|
|
4926
|
+
/* @__PURE__ */ jsx56("p", { className: cn("mt-2 text-2xl font-semibold tabular-nums", toneClasses[tone]), children: value }),
|
|
4927
|
+
(delta || supporting) && /* @__PURE__ */ jsxs37("p", { className: "mt-1 flex items-center gap-2 text-sm", children: [
|
|
4928
|
+
delta && /* @__PURE__ */ jsxs37("span", { className: cn("font-medium tabular-nums", trendClasses[trend]), children: [
|
|
4929
|
+
/* @__PURE__ */ jsx56("span", { "aria-hidden": "true", children: trendGlyph[trend] }),
|
|
4437
4930
|
" ",
|
|
4438
4931
|
delta
|
|
4439
4932
|
] }),
|
|
4440
|
-
supporting && /* @__PURE__ */
|
|
4933
|
+
supporting && /* @__PURE__ */ jsx56("span", { className: "text-muted-foreground", children: supporting })
|
|
4441
4934
|
] })
|
|
4442
4935
|
] });
|
|
4443
4936
|
});
|
|
4444
4937
|
|
|
4445
4938
|
// src/components/password-input/PasswordInput.tsx
|
|
4446
|
-
import * as
|
|
4447
|
-
import { jsx as
|
|
4448
|
-
var PasswordInput =
|
|
4449
|
-
const [visible, setVisible] =
|
|
4450
|
-
return /* @__PURE__ */
|
|
4451
|
-
/* @__PURE__ */
|
|
4452
|
-
/* @__PURE__ */
|
|
4939
|
+
import * as React57 from "react";
|
|
4940
|
+
import { jsx as jsx57, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
4941
|
+
var PasswordInput = React57.forwardRef(function PasswordInput2({ className, showLabel = "Show password", hideLabel = "Hide password", ...props }, ref) {
|
|
4942
|
+
const [visible, setVisible] = React57.useState(false);
|
|
4943
|
+
return /* @__PURE__ */ jsxs38("div", { className: cn("relative flex items-center", className), children: [
|
|
4944
|
+
/* @__PURE__ */ jsx57(Input, { ref, type: visible ? "text" : "password", className: "pr-24", ...props }),
|
|
4945
|
+
/* @__PURE__ */ jsx57(
|
|
4453
4946
|
Button,
|
|
4454
4947
|
{
|
|
4455
4948
|
type: "button",
|
|
@@ -4466,14 +4959,14 @@ var PasswordInput = React55.forwardRef(function PasswordInput2({ className, show
|
|
|
4466
4959
|
});
|
|
4467
4960
|
|
|
4468
4961
|
// src/components/auth-layout/AuthLayout.tsx
|
|
4469
|
-
import * as
|
|
4470
|
-
import { jsx as
|
|
4962
|
+
import * as React58 from "react";
|
|
4963
|
+
import { jsx as jsx58, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
4471
4964
|
var sizeClasses8 = {
|
|
4472
4965
|
sm: "max-w-sm",
|
|
4473
4966
|
md: "max-w-md",
|
|
4474
4967
|
lg: "max-w-lg"
|
|
4475
4968
|
};
|
|
4476
|
-
var AuthLayout =
|
|
4969
|
+
var AuthLayout = React58.forwardRef(function AuthLayout2({
|
|
4477
4970
|
title,
|
|
4478
4971
|
description,
|
|
4479
4972
|
subtitle,
|
|
@@ -4492,7 +4985,7 @@ var AuthLayout = React56.forwardRef(function AuthLayout2({
|
|
|
4492
4985
|
const supporting = description ?? subtitle;
|
|
4493
4986
|
const mark = brand ?? logo;
|
|
4494
4987
|
const widthStyle = maxWidth === void 0 ? void 0 : { maxWidth: typeof maxWidth === "number" ? `${maxWidth}px` : maxWidth };
|
|
4495
|
-
const form = /* @__PURE__ */
|
|
4988
|
+
const form = /* @__PURE__ */ jsxs39(
|
|
4496
4989
|
"div",
|
|
4497
4990
|
{
|
|
4498
4991
|
className: cn(
|
|
@@ -4501,8 +4994,8 @@ var AuthLayout = React56.forwardRef(function AuthLayout2({
|
|
|
4501
4994
|
),
|
|
4502
4995
|
style: widthStyle,
|
|
4503
4996
|
children: [
|
|
4504
|
-
mark && /* @__PURE__ */
|
|
4505
|
-
/* @__PURE__ */
|
|
4997
|
+
mark && /* @__PURE__ */ jsx58("div", { className: "mb-6", children: mark }),
|
|
4998
|
+
/* @__PURE__ */ jsxs39(
|
|
4506
4999
|
"div",
|
|
4507
5000
|
{
|
|
4508
5001
|
className: cn(
|
|
@@ -4511,31 +5004,31 @@ var AuthLayout = React56.forwardRef(function AuthLayout2({
|
|
|
4511
5004
|
),
|
|
4512
5005
|
style: widthStyle,
|
|
4513
5006
|
children: [
|
|
4514
|
-
/* @__PURE__ */
|
|
4515
|
-
supporting && /* @__PURE__ */
|
|
4516
|
-
/* @__PURE__ */
|
|
5007
|
+
/* @__PURE__ */ jsx58("h1", { className: "text-xl font-semibold tracking-tight", children: title }),
|
|
5008
|
+
supporting && /* @__PURE__ */ jsx58("p", { className: "mt-1 text-sm text-muted-foreground", children: supporting }),
|
|
5009
|
+
/* @__PURE__ */ jsx58("div", { className: "mt-6", children })
|
|
4517
5010
|
]
|
|
4518
5011
|
}
|
|
4519
5012
|
),
|
|
4520
|
-
footer && /* @__PURE__ */
|
|
5013
|
+
footer && /* @__PURE__ */ jsx58("div", { className: "mt-6 text-center text-sm text-muted-foreground", children: footer })
|
|
4521
5014
|
]
|
|
4522
5015
|
}
|
|
4523
5016
|
);
|
|
4524
5017
|
if (split) {
|
|
4525
|
-
return /* @__PURE__ */
|
|
5018
|
+
return /* @__PURE__ */ jsx58(
|
|
4526
5019
|
"div",
|
|
4527
5020
|
{
|
|
4528
5021
|
ref,
|
|
4529
5022
|
className: cn("min-h-screen bg-muted/30 px-4 py-12 lg:px-8", className),
|
|
4530
5023
|
...props,
|
|
4531
|
-
children: /* @__PURE__ */
|
|
5024
|
+
children: /* @__PURE__ */ jsxs39("div", { className: "mx-auto grid min-h-[calc(100vh-6rem)] w-full max-w-6xl items-center gap-10 lg:grid-cols-[minmax(0,1fr)_minmax(0,1.1fr)]", children: [
|
|
4532
5025
|
form,
|
|
4533
|
-
/* @__PURE__ */
|
|
5026
|
+
/* @__PURE__ */ jsx58("aside", { className: "w-full", children: aside })
|
|
4534
5027
|
] })
|
|
4535
5028
|
}
|
|
4536
5029
|
);
|
|
4537
5030
|
}
|
|
4538
|
-
return /* @__PURE__ */
|
|
5031
|
+
return /* @__PURE__ */ jsx58(
|
|
4539
5032
|
"div",
|
|
4540
5033
|
{
|
|
4541
5034
|
ref,
|
|
@@ -4550,9 +5043,9 @@ var AuthLayout = React56.forwardRef(function AuthLayout2({
|
|
|
4550
5043
|
});
|
|
4551
5044
|
|
|
4552
5045
|
// src/components/filter-bar/FilterBar.tsx
|
|
4553
|
-
import * as
|
|
4554
|
-
import { jsx as
|
|
4555
|
-
var FilterBar =
|
|
5046
|
+
import * as React59 from "react";
|
|
5047
|
+
import { jsx as jsx59, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
5048
|
+
var FilterBar = React59.forwardRef(function FilterBar2({
|
|
4556
5049
|
searchValue,
|
|
4557
5050
|
onSearchChange,
|
|
4558
5051
|
searchPlaceholder = "Search\u2026",
|
|
@@ -4567,7 +5060,7 @@ var FilterBar = React57.forwardRef(function FilterBar2({
|
|
|
4567
5060
|
children,
|
|
4568
5061
|
...props
|
|
4569
5062
|
}, ref) {
|
|
4570
|
-
return /* @__PURE__ */
|
|
5063
|
+
return /* @__PURE__ */ jsxs40(
|
|
4571
5064
|
"div",
|
|
4572
5065
|
{
|
|
4573
5066
|
ref,
|
|
@@ -4578,7 +5071,7 @@ var FilterBar = React57.forwardRef(function FilterBar2({
|
|
|
4578
5071
|
),
|
|
4579
5072
|
...props,
|
|
4580
5073
|
children: [
|
|
4581
|
-
onSearchChange !== void 0 && /* @__PURE__ */
|
|
5074
|
+
onSearchChange !== void 0 && /* @__PURE__ */ jsx59(
|
|
4582
5075
|
Input,
|
|
4583
5076
|
{
|
|
4584
5077
|
type: "search",
|
|
@@ -4589,38 +5082,38 @@ var FilterBar = React57.forwardRef(function FilterBar2({
|
|
|
4589
5082
|
className: "h-9 w-full min-w-40 flex-1 sm:w-auto"
|
|
4590
5083
|
}
|
|
4591
5084
|
),
|
|
4592
|
-
/* @__PURE__ */
|
|
4593
|
-
onOpenFilters && /* @__PURE__ */
|
|
5085
|
+
/* @__PURE__ */ jsx59("div", { className: "flex flex-wrap items-center gap-2", children }),
|
|
5086
|
+
onOpenFilters && /* @__PURE__ */ jsxs40(Button, { type: "button", variant: "outline", size: "sm", onClick: onOpenFilters, children: [
|
|
4594
5087
|
filtersLabel,
|
|
4595
5088
|
activeCount > 0 ? ` (${activeCount})` : ""
|
|
4596
5089
|
] }),
|
|
4597
|
-
onReset && /* @__PURE__ */
|
|
5090
|
+
onReset && /* @__PURE__ */ jsxs40(Button, { type: "button", variant: "ghost", size: "sm", onClick: onReset, children: [
|
|
4598
5091
|
"Reset",
|
|
4599
5092
|
activeCount > 0 ? ` (${activeCount})` : ""
|
|
4600
5093
|
] }),
|
|
4601
|
-
resultsCount !== void 0 && /* @__PURE__ */
|
|
5094
|
+
resultsCount !== void 0 && /* @__PURE__ */ jsxs40("span", { className: "ml-auto text-sm text-muted-foreground", children: [
|
|
4602
5095
|
resultsCount,
|
|
4603
5096
|
" ",
|
|
4604
5097
|
resultsLabel
|
|
4605
5098
|
] }),
|
|
4606
|
-
trailing && /* @__PURE__ */
|
|
5099
|
+
trailing && /* @__PURE__ */ jsx59("div", { className: cn("flex items-center gap-2", resultsCount === void 0 && "ml-auto"), children: trailing })
|
|
4607
5100
|
]
|
|
4608
5101
|
}
|
|
4609
5102
|
);
|
|
4610
5103
|
});
|
|
4611
5104
|
|
|
4612
5105
|
// src/components/date-picker/DatePicker.tsx
|
|
4613
|
-
import * as
|
|
4614
|
-
import { jsx as
|
|
4615
|
-
var DatePicker =
|
|
4616
|
-
const [internal, setInternal] =
|
|
5106
|
+
import * as React60 from "react";
|
|
5107
|
+
import { jsx as jsx60, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
5108
|
+
var DatePicker = React60.forwardRef(function DatePicker2({ value, defaultValue, onValueChange, onChange, clearable = false, clearLabel = "Clear date", className, ...props }, ref) {
|
|
5109
|
+
const [internal, setInternal] = React60.useState(defaultValue ?? "");
|
|
4617
5110
|
const current = value ?? internal;
|
|
4618
5111
|
const commit = (next) => {
|
|
4619
5112
|
if (value === void 0) setInternal(next);
|
|
4620
5113
|
onValueChange?.(next);
|
|
4621
5114
|
};
|
|
4622
|
-
return /* @__PURE__ */
|
|
4623
|
-
/* @__PURE__ */
|
|
5115
|
+
return /* @__PURE__ */ jsxs41("div", { className: cn("relative flex items-center", className), children: [
|
|
5116
|
+
/* @__PURE__ */ jsx60(
|
|
4624
5117
|
Input,
|
|
4625
5118
|
{
|
|
4626
5119
|
ref,
|
|
@@ -4634,7 +5127,7 @@ var DatePicker = React58.forwardRef(function DatePicker2({ value, defaultValue,
|
|
|
4634
5127
|
...props
|
|
4635
5128
|
}
|
|
4636
5129
|
),
|
|
4637
|
-
clearable && current && /* @__PURE__ */
|
|
5130
|
+
clearable && current && /* @__PURE__ */ jsx60(
|
|
4638
5131
|
"button",
|
|
4639
5132
|
{
|
|
4640
5133
|
type: "button",
|
|
@@ -4647,56 +5140,440 @@ var DatePicker = React58.forwardRef(function DatePicker2({ value, defaultValue,
|
|
|
4647
5140
|
] });
|
|
4648
5141
|
});
|
|
4649
5142
|
|
|
4650
|
-
// src/components/
|
|
4651
|
-
import * as
|
|
4652
|
-
|
|
4653
|
-
|
|
4654
|
-
|
|
4655
|
-
|
|
4656
|
-
|
|
4657
|
-
|
|
4658
|
-
|
|
4659
|
-
|
|
4660
|
-
|
|
4661
|
-
|
|
4662
|
-
|
|
5143
|
+
// src/components/date-picker-popover/DatePickerPopover.tsx
|
|
5144
|
+
import * as React62 from "react";
|
|
5145
|
+
|
|
5146
|
+
// src/components/popover/Popover.tsx
|
|
5147
|
+
import * as React61 from "react";
|
|
5148
|
+
import { createPortal as createPortal7 } from "react-dom";
|
|
5149
|
+
|
|
5150
|
+
// src/utils/position.ts
|
|
5151
|
+
var OPPOSITE = {
|
|
5152
|
+
top: "bottom",
|
|
5153
|
+
bottom: "top",
|
|
5154
|
+
left: "right",
|
|
5155
|
+
right: "left"
|
|
5156
|
+
};
|
|
5157
|
+
var isHorizontal = (side) => side === "left" || side === "right";
|
|
5158
|
+
function clamp(value, min, max) {
|
|
5159
|
+
if (max < min) return min;
|
|
5160
|
+
return Math.min(Math.max(value, min), max);
|
|
5161
|
+
}
|
|
5162
|
+
function spaceFor(side, anchor, viewport, padding) {
|
|
5163
|
+
switch (side) {
|
|
5164
|
+
case "top":
|
|
5165
|
+
return anchor.top - padding;
|
|
5166
|
+
case "bottom":
|
|
5167
|
+
return viewport.height - (anchor.top + anchor.height) - padding;
|
|
5168
|
+
case "left":
|
|
5169
|
+
return anchor.left - padding;
|
|
5170
|
+
case "right":
|
|
5171
|
+
return viewport.width - (anchor.left + anchor.width) - padding;
|
|
5172
|
+
}
|
|
5173
|
+
}
|
|
5174
|
+
function computePosition({
|
|
5175
|
+
anchor,
|
|
5176
|
+
content,
|
|
5177
|
+
viewport,
|
|
5178
|
+
side = "bottom",
|
|
5179
|
+
align = "start",
|
|
5180
|
+
sideOffset = 8,
|
|
5181
|
+
alignOffset = 0,
|
|
5182
|
+
collisionPadding = 8
|
|
5183
|
+
}) {
|
|
5184
|
+
const crossExtent = isHorizontal(side) ? content.height : content.width;
|
|
5185
|
+
const mainExtent = isHorizontal(side) ? content.width : content.height;
|
|
5186
|
+
const vertical = !isHorizontal(side);
|
|
5187
|
+
const preferredSpace = spaceFor(side, anchor, viewport, collisionPadding);
|
|
5188
|
+
const oppositeSpace = spaceFor(OPPOSITE[side], anchor, viewport, collisionPadding);
|
|
5189
|
+
const resolvedSide = preferredSpace < mainExtent && oppositeSpace > preferredSpace ? OPPOSITE[side] : side;
|
|
5190
|
+
const anchorCrossStart = vertical ? anchor.left : anchor.top;
|
|
5191
|
+
const anchorCrossSize = vertical ? anchor.width : anchor.height;
|
|
5192
|
+
let cross = align === "start" ? anchorCrossStart : align === "end" ? anchorCrossStart + anchorCrossSize - crossExtent : anchorCrossStart + (anchorCrossSize - crossExtent) / 2;
|
|
5193
|
+
cross += alignOffset;
|
|
5194
|
+
let main;
|
|
5195
|
+
switch (resolvedSide) {
|
|
5196
|
+
case "bottom":
|
|
5197
|
+
main = anchor.top + anchor.height + sideOffset;
|
|
5198
|
+
break;
|
|
5199
|
+
case "top":
|
|
5200
|
+
main = anchor.top - content.height - sideOffset;
|
|
5201
|
+
break;
|
|
5202
|
+
case "right":
|
|
5203
|
+
main = anchor.left + anchor.width + sideOffset;
|
|
5204
|
+
break;
|
|
5205
|
+
default:
|
|
5206
|
+
main = anchor.left - content.width - sideOffset;
|
|
5207
|
+
}
|
|
5208
|
+
const crossLimit = (vertical ? viewport.width : viewport.height) - crossExtent - collisionPadding;
|
|
5209
|
+
const boundedCross = clamp(cross, collisionPadding, crossLimit);
|
|
5210
|
+
const mainLimit = (vertical ? viewport.height : viewport.width) - mainExtent - collisionPadding;
|
|
5211
|
+
const boundedMain = clamp(main, collisionPadding, mainLimit);
|
|
5212
|
+
return vertical ? { top: boundedMain, left: boundedCross, side: resolvedSide } : { top: boundedCross, left: boundedMain, side: resolvedSide };
|
|
5213
|
+
}
|
|
5214
|
+
|
|
5215
|
+
// src/components/popover/Popover.tsx
|
|
5216
|
+
import { jsx as jsx61 } from "react/jsx-runtime";
|
|
5217
|
+
var PopoverContext = React61.createContext({
|
|
5218
|
+
open: false,
|
|
5219
|
+
setOpen: () => {
|
|
5220
|
+
},
|
|
5221
|
+
triggerId: "",
|
|
5222
|
+
contentId: "",
|
|
5223
|
+
wrapperRef: { current: null },
|
|
5224
|
+
anchorRef: { current: null },
|
|
5225
|
+
triggerRef: { current: null }
|
|
5226
|
+
});
|
|
5227
|
+
var Popover = React61.forwardRef(
|
|
5228
|
+
({ open, onOpenChange, className, children }, ref) => {
|
|
5229
|
+
const [internalOpen, setInternalOpen] = React61.useState(false);
|
|
5230
|
+
const current = open ?? internalOpen;
|
|
5231
|
+
const triggerId = React61.useId();
|
|
5232
|
+
const contentId = React61.useId();
|
|
5233
|
+
const wrapperRef = React61.useRef(null);
|
|
5234
|
+
const anchorRef = React61.useRef(null);
|
|
5235
|
+
const triggerRef = React61.useRef(null);
|
|
5236
|
+
const setRefs = React61.useCallback(
|
|
5237
|
+
(node) => {
|
|
5238
|
+
wrapperRef.current = node;
|
|
5239
|
+
if (typeof ref === "function") ref(node);
|
|
5240
|
+
else if (ref) ref.current = node;
|
|
5241
|
+
},
|
|
5242
|
+
[ref]
|
|
5243
|
+
);
|
|
5244
|
+
const setOpen = React61.useCallback(
|
|
5245
|
+
(next) => {
|
|
5246
|
+
if (open === void 0) setInternalOpen(next);
|
|
5247
|
+
onOpenChange?.(next);
|
|
5248
|
+
},
|
|
5249
|
+
[open, onOpenChange]
|
|
5250
|
+
);
|
|
5251
|
+
return /* @__PURE__ */ jsx61("div", { ref: setRefs, className: cn("relative inline-block", className), children: /* @__PURE__ */ jsx61(
|
|
5252
|
+
PopoverContext.Provider,
|
|
4663
5253
|
{
|
|
4664
|
-
|
|
4665
|
-
|
|
4666
|
-
value: current,
|
|
4667
|
-
onChange: (event) => {
|
|
4668
|
-
commit(event.target.value);
|
|
4669
|
-
onChange?.(event);
|
|
4670
|
-
},
|
|
4671
|
-
className: clearable && current ? "pr-9" : void 0,
|
|
4672
|
-
...props
|
|
5254
|
+
value: { open: current, setOpen, triggerId, contentId, wrapperRef, anchorRef, triggerRef },
|
|
5255
|
+
children
|
|
4673
5256
|
}
|
|
4674
|
-
)
|
|
4675
|
-
|
|
5257
|
+
) });
|
|
5258
|
+
}
|
|
5259
|
+
);
|
|
5260
|
+
Popover.displayName = "Popover";
|
|
5261
|
+
var PopoverTrigger = React61.forwardRef(
|
|
5262
|
+
({ className, children, onClick, id, ...props }, ref) => {
|
|
5263
|
+
const { open, setOpen, triggerId, contentId, triggerRef } = React61.useContext(PopoverContext);
|
|
5264
|
+
const setRefs = React61.useCallback(
|
|
5265
|
+
(node) => {
|
|
5266
|
+
triggerRef.current = node;
|
|
5267
|
+
if (typeof ref === "function") ref(node);
|
|
5268
|
+
else if (ref) ref.current = node;
|
|
5269
|
+
},
|
|
5270
|
+
[ref, triggerRef]
|
|
5271
|
+
);
|
|
5272
|
+
return /* @__PURE__ */ jsx61(
|
|
4676
5273
|
"button",
|
|
4677
5274
|
{
|
|
5275
|
+
ref: setRefs,
|
|
5276
|
+
id: id ?? triggerId,
|
|
4678
5277
|
type: "button",
|
|
4679
|
-
|
|
4680
|
-
"aria-
|
|
4681
|
-
|
|
4682
|
-
|
|
4683
|
-
|
|
4684
|
-
|
|
4685
|
-
|
|
4686
|
-
|
|
4687
|
-
|
|
4688
|
-
|
|
4689
|
-
|
|
4690
|
-
|
|
4691
|
-
|
|
4692
|
-
|
|
4693
|
-
|
|
4694
|
-
|
|
4695
|
-
|
|
4696
|
-
|
|
4697
|
-
|
|
5278
|
+
"aria-haspopup": "dialog",
|
|
5279
|
+
"aria-expanded": open,
|
|
5280
|
+
"aria-controls": open ? contentId : void 0,
|
|
5281
|
+
onClick: (event) => {
|
|
5282
|
+
onClick?.(event);
|
|
5283
|
+
setOpen(!open);
|
|
5284
|
+
},
|
|
5285
|
+
className: cn(
|
|
5286
|
+
"inline-flex items-center justify-center rounded-md border border-border bg-background px-3 py-1.5 text-sm font-medium transition-colors",
|
|
5287
|
+
"hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
5288
|
+
className
|
|
5289
|
+
),
|
|
5290
|
+
...props,
|
|
5291
|
+
children
|
|
5292
|
+
}
|
|
5293
|
+
);
|
|
5294
|
+
}
|
|
5295
|
+
);
|
|
5296
|
+
PopoverTrigger.displayName = "PopoverTrigger";
|
|
5297
|
+
var PopoverAnchor = React61.forwardRef(
|
|
5298
|
+
({ className, children, ...props }, ref) => {
|
|
5299
|
+
const { anchorRef } = React61.useContext(PopoverContext);
|
|
5300
|
+
const setRefs = React61.useCallback(
|
|
5301
|
+
(node) => {
|
|
5302
|
+
anchorRef.current = node;
|
|
5303
|
+
if (typeof ref === "function") ref(node);
|
|
5304
|
+
else if (ref) ref.current = node;
|
|
5305
|
+
},
|
|
5306
|
+
[anchorRef, ref]
|
|
5307
|
+
);
|
|
5308
|
+
return /* @__PURE__ */ jsx61("span", { ref: setRefs, className: cn("inline-block", className), ...props, children });
|
|
5309
|
+
}
|
|
5310
|
+
);
|
|
5311
|
+
PopoverAnchor.displayName = "PopoverAnchor";
|
|
5312
|
+
function rectOf(element) {
|
|
5313
|
+
const rect = element.getBoundingClientRect();
|
|
5314
|
+
return {
|
|
5315
|
+
top: rect.top,
|
|
5316
|
+
left: rect.left,
|
|
5317
|
+
width: rect.width || element.offsetWidth || 0,
|
|
5318
|
+
height: rect.height || element.offsetHeight || 0
|
|
5319
|
+
};
|
|
5320
|
+
}
|
|
5321
|
+
var PopoverContent = React61.forwardRef(
|
|
5322
|
+
({
|
|
5323
|
+
className,
|
|
5324
|
+
children,
|
|
5325
|
+
onKeyDown,
|
|
5326
|
+
style,
|
|
5327
|
+
side = "bottom",
|
|
5328
|
+
align = "start",
|
|
5329
|
+
sideOffset = 8,
|
|
5330
|
+
alignOffset = 0,
|
|
5331
|
+
collisionPadding = 8,
|
|
5332
|
+
matchTriggerWidth = false,
|
|
5333
|
+
...props
|
|
5334
|
+
}, ref) => {
|
|
5335
|
+
const { open, setOpen, contentId, wrapperRef, anchorRef, triggerRef } = React61.useContext(PopoverContext);
|
|
5336
|
+
const labelledBy = triggerRef.current?.id || void 0;
|
|
5337
|
+
const contentRef = React61.useRef(null);
|
|
5338
|
+
const [pos, setPos] = React61.useState(null);
|
|
5339
|
+
const [width, setWidth] = React61.useState(void 0);
|
|
5340
|
+
const updatePosition = React61.useCallback(() => {
|
|
5341
|
+
const anchorEl = anchorRef.current ?? wrapperRef.current;
|
|
5342
|
+
const panel = contentRef.current;
|
|
5343
|
+
if (!anchorEl || !panel) return;
|
|
5344
|
+
const anchor = rectOf(anchorEl);
|
|
5345
|
+
const measured = rectOf(panel);
|
|
5346
|
+
setWidth(matchTriggerWidth ? anchor.width : void 0);
|
|
5347
|
+
setPos(
|
|
5348
|
+
computePosition({
|
|
5349
|
+
anchor,
|
|
5350
|
+
content: { width: measured.width, height: measured.height },
|
|
5351
|
+
viewport: { width: window.innerWidth, height: window.innerHeight },
|
|
5352
|
+
side,
|
|
5353
|
+
align,
|
|
5354
|
+
sideOffset,
|
|
5355
|
+
alignOffset,
|
|
5356
|
+
collisionPadding
|
|
5357
|
+
})
|
|
5358
|
+
);
|
|
5359
|
+
}, [
|
|
5360
|
+
align,
|
|
5361
|
+
alignOffset,
|
|
5362
|
+
anchorRef,
|
|
5363
|
+
collisionPadding,
|
|
5364
|
+
matchTriggerWidth,
|
|
5365
|
+
side,
|
|
5366
|
+
sideOffset,
|
|
5367
|
+
wrapperRef
|
|
5368
|
+
]);
|
|
5369
|
+
React61.useLayoutEffect(() => {
|
|
5370
|
+
if (!open) {
|
|
5371
|
+
setPos(null);
|
|
5372
|
+
return;
|
|
5373
|
+
}
|
|
5374
|
+
updatePosition();
|
|
5375
|
+
}, [open, updatePosition]);
|
|
5376
|
+
React61.useEffect(() => {
|
|
5377
|
+
if (open && !pos) updatePosition();
|
|
5378
|
+
}, [open, pos, updatePosition]);
|
|
5379
|
+
React61.useEffect(() => {
|
|
5380
|
+
if (!open) return;
|
|
5381
|
+
const onScroll = () => updatePosition();
|
|
5382
|
+
window.addEventListener("scroll", onScroll, true);
|
|
5383
|
+
window.addEventListener("resize", onScroll);
|
|
5384
|
+
const panel = contentRef.current;
|
|
5385
|
+
const observer = typeof ResizeObserver === "undefined" || !panel ? null : new ResizeObserver(onScroll);
|
|
5386
|
+
if (panel && observer) observer.observe(panel);
|
|
5387
|
+
return () => {
|
|
5388
|
+
window.removeEventListener("scroll", onScroll, true);
|
|
5389
|
+
window.removeEventListener("resize", onScroll);
|
|
5390
|
+
observer?.disconnect();
|
|
5391
|
+
};
|
|
5392
|
+
}, [open, updatePosition]);
|
|
5393
|
+
React61.useEffect(() => {
|
|
5394
|
+
if (!open) return;
|
|
5395
|
+
function onPointerDown(event) {
|
|
5396
|
+
if (!contentRef.current?.contains(event.target)) setOpen(false);
|
|
5397
|
+
}
|
|
5398
|
+
document.addEventListener("pointerdown", onPointerDown);
|
|
5399
|
+
return () => document.removeEventListener("pointerdown", onPointerDown);
|
|
5400
|
+
}, [open, setOpen]);
|
|
5401
|
+
React61.useEffect(() => {
|
|
5402
|
+
if (open && pos && contentRef.current) {
|
|
5403
|
+
contentRef.current.focus();
|
|
5404
|
+
}
|
|
5405
|
+
}, [open, pos]);
|
|
5406
|
+
if (!open || typeof document === "undefined") return null;
|
|
5407
|
+
return createPortal7(
|
|
5408
|
+
/* @__PURE__ */ jsx61(
|
|
5409
|
+
"div",
|
|
5410
|
+
{
|
|
5411
|
+
ref: (node) => {
|
|
5412
|
+
contentRef.current = node;
|
|
5413
|
+
if (typeof ref === "function") ref(node);
|
|
5414
|
+
else if (ref) ref.current = node;
|
|
5415
|
+
},
|
|
5416
|
+
id: contentId,
|
|
5417
|
+
role: "dialog",
|
|
5418
|
+
"aria-labelledby": labelledBy,
|
|
5419
|
+
tabIndex: -1,
|
|
5420
|
+
"data-side": pos?.side ?? side,
|
|
5421
|
+
onKeyDown: (event) => {
|
|
5422
|
+
onKeyDown?.(event);
|
|
5423
|
+
if (event.key === "Escape") {
|
|
5424
|
+
event.stopPropagation();
|
|
5425
|
+
setOpen(false);
|
|
5426
|
+
(triggerRef.current ?? anchorRef.current)?.focus();
|
|
5427
|
+
}
|
|
5428
|
+
},
|
|
5429
|
+
style: {
|
|
5430
|
+
position: "fixed",
|
|
5431
|
+
top: pos?.top ?? 0,
|
|
5432
|
+
left: pos?.left ?? 0,
|
|
5433
|
+
width,
|
|
5434
|
+
visibility: pos ? "visible" : "hidden",
|
|
5435
|
+
zIndex: 50,
|
|
5436
|
+
...style
|
|
5437
|
+
},
|
|
5438
|
+
className: cn(
|
|
5439
|
+
"w-72 rounded-md border border-border bg-popover p-4 text-popover-foreground shadow-md outline-none",
|
|
5440
|
+
className
|
|
5441
|
+
),
|
|
5442
|
+
...props,
|
|
5443
|
+
children
|
|
5444
|
+
}
|
|
5445
|
+
),
|
|
5446
|
+
document.body
|
|
5447
|
+
);
|
|
5448
|
+
}
|
|
5449
|
+
);
|
|
5450
|
+
PopoverContent.displayName = "PopoverContent";
|
|
5451
|
+
|
|
5452
|
+
// src/components/date-picker-popover/DatePickerPopover.tsx
|
|
5453
|
+
import { Fragment as Fragment12, jsx as jsx62, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
5454
|
+
var DatePickerPopover = React62.forwardRef(
|
|
5455
|
+
({
|
|
5456
|
+
value,
|
|
5457
|
+
onValueChange,
|
|
5458
|
+
min,
|
|
5459
|
+
max,
|
|
5460
|
+
today,
|
|
5461
|
+
locale = "en-US",
|
|
5462
|
+
weekStartsOn = 0,
|
|
5463
|
+
placeholder = "Pick a date",
|
|
5464
|
+
name,
|
|
5465
|
+
required,
|
|
5466
|
+
disabled,
|
|
5467
|
+
side = "bottom",
|
|
5468
|
+
align = "start",
|
|
5469
|
+
id,
|
|
5470
|
+
className,
|
|
5471
|
+
"aria-label": ariaLabel
|
|
5472
|
+
}, ref) => {
|
|
5473
|
+
const [open, setOpen] = React62.useState(false);
|
|
5474
|
+
const triggerRef = React62.useRef(null);
|
|
5475
|
+
const setTriggerRef = React62.useCallback(
|
|
5476
|
+
(node) => {
|
|
5477
|
+
triggerRef.current = node;
|
|
5478
|
+
if (typeof ref === "function") ref(node);
|
|
5479
|
+
else if (ref) ref.current = node;
|
|
5480
|
+
},
|
|
5481
|
+
[ref]
|
|
5482
|
+
);
|
|
5483
|
+
const label = value ? formatDateLabel(value, locale) : placeholder;
|
|
5484
|
+
return /* @__PURE__ */ jsxs42(Fragment12, { children: [
|
|
5485
|
+
/* @__PURE__ */ jsxs42(Popover, { open, onOpenChange: setOpen, children: [
|
|
5486
|
+
/* @__PURE__ */ jsx62(
|
|
5487
|
+
PopoverTrigger,
|
|
5488
|
+
{
|
|
5489
|
+
ref: setTriggerRef,
|
|
5490
|
+
id,
|
|
5491
|
+
disabled,
|
|
5492
|
+
"aria-label": ariaLabel,
|
|
5493
|
+
className: cn(
|
|
5494
|
+
buttonVariants({ variant: "outline" }),
|
|
5495
|
+
"w-full justify-start font-normal",
|
|
5496
|
+
!value && "text-muted-foreground",
|
|
5497
|
+
className
|
|
5498
|
+
),
|
|
5499
|
+
children: label
|
|
5500
|
+
}
|
|
5501
|
+
),
|
|
5502
|
+
/* @__PURE__ */ jsx62(PopoverContent, { side, align, matchTriggerWidth: true, className: "w-auto p-3", children: /* @__PURE__ */ jsx62(
|
|
5503
|
+
Calendar,
|
|
5504
|
+
{
|
|
5505
|
+
value,
|
|
5506
|
+
min,
|
|
5507
|
+
max,
|
|
5508
|
+
today,
|
|
5509
|
+
locale,
|
|
5510
|
+
weekStartsOn,
|
|
5511
|
+
autoFocus: true,
|
|
5512
|
+
onValueChange: (next) => {
|
|
5513
|
+
onValueChange?.(next);
|
|
5514
|
+
setOpen(false);
|
|
5515
|
+
triggerRef.current?.focus();
|
|
5516
|
+
}
|
|
5517
|
+
}
|
|
5518
|
+
) })
|
|
5519
|
+
] }),
|
|
5520
|
+
name ? /* @__PURE__ */ jsx62("input", { type: "hidden", name, value: value ?? "", required }) : null
|
|
5521
|
+
] });
|
|
5522
|
+
}
|
|
5523
|
+
);
|
|
5524
|
+
DatePickerPopover.displayName = "DatePickerPopover";
|
|
5525
|
+
|
|
5526
|
+
// src/components/time-picker/TimePicker.tsx
|
|
5527
|
+
import * as React63 from "react";
|
|
5528
|
+
import { jsx as jsx63, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
5529
|
+
var TimePicker = React63.forwardRef(function TimePicker2({ value, defaultValue, onValueChange, onChange, clearable = false, clearLabel = "Clear time", className, ...props }, ref) {
|
|
5530
|
+
const [internal, setInternal] = React63.useState(defaultValue ?? "");
|
|
5531
|
+
const current = value ?? internal;
|
|
5532
|
+
const commit = (next) => {
|
|
5533
|
+
if (value === void 0) setInternal(next);
|
|
5534
|
+
onValueChange?.(next);
|
|
5535
|
+
};
|
|
5536
|
+
return /* @__PURE__ */ jsxs43("div", { className: cn("relative flex items-center", className), children: [
|
|
5537
|
+
/* @__PURE__ */ jsx63(
|
|
5538
|
+
Input,
|
|
5539
|
+
{
|
|
5540
|
+
ref,
|
|
5541
|
+
type: "time",
|
|
5542
|
+
value: current,
|
|
5543
|
+
onChange: (event) => {
|
|
5544
|
+
commit(event.target.value);
|
|
5545
|
+
onChange?.(event);
|
|
5546
|
+
},
|
|
5547
|
+
className: clearable && current ? "pr-9" : void 0,
|
|
5548
|
+
...props
|
|
5549
|
+
}
|
|
5550
|
+
),
|
|
5551
|
+
clearable && current && /* @__PURE__ */ jsx63(
|
|
5552
|
+
"button",
|
|
5553
|
+
{
|
|
5554
|
+
type: "button",
|
|
5555
|
+
onClick: () => commit(""),
|
|
5556
|
+
"aria-label": clearLabel,
|
|
5557
|
+
className: "absolute right-1.5 inline-flex h-6 w-6 items-center justify-center rounded text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
5558
|
+
children: "\u2715"
|
|
5559
|
+
}
|
|
5560
|
+
)
|
|
5561
|
+
] });
|
|
5562
|
+
});
|
|
5563
|
+
|
|
5564
|
+
// src/components/stepper/Stepper.tsx
|
|
5565
|
+
import * as React64 from "react";
|
|
5566
|
+
import { Fragment as Fragment13, jsx as jsx64, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
5567
|
+
var Stepper = React64.forwardRef(function Stepper2({
|
|
5568
|
+
steps,
|
|
5569
|
+
current,
|
|
5570
|
+
orientation = "horizontal",
|
|
5571
|
+
variant = "numbered",
|
|
5572
|
+
size = "md",
|
|
5573
|
+
labelPlacement = "inline",
|
|
4698
5574
|
alignTitles = "center",
|
|
4699
5575
|
onStepClick,
|
|
5576
|
+
labels,
|
|
4700
5577
|
className,
|
|
4701
5578
|
...props
|
|
4702
5579
|
}, ref) {
|
|
@@ -4710,7 +5587,7 @@ var Stepper = React60.forwardRef(function Stepper2({
|
|
|
4710
5587
|
const verticalTitlePad = size === "sm" ? "pt-0.5" : "pt-1";
|
|
4711
5588
|
const connectorTop = variant === "dots" ? size === "sm" ? "mt-1" : "mt-[5px]" : size === "sm" ? "mt-3" : "mt-3.5";
|
|
4712
5589
|
const focusClass = "rounded-md focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background";
|
|
4713
|
-
return /* @__PURE__ */
|
|
5590
|
+
return /* @__PURE__ */ jsx64(
|
|
4714
5591
|
"ol",
|
|
4715
5592
|
{
|
|
4716
5593
|
ref,
|
|
@@ -4724,7 +5601,7 @@ var Stepper = React60.forwardRef(function Stepper2({
|
|
|
4724
5601
|
const isLast = index === steps.length - 1;
|
|
4725
5602
|
const titleCentered = alignTitles === "center" && !step.description;
|
|
4726
5603
|
const below = !vertical && labelPlacement === "below";
|
|
4727
|
-
const marker = /* @__PURE__ */
|
|
5604
|
+
const marker = /* @__PURE__ */ jsx64(
|
|
4728
5605
|
"span",
|
|
4729
5606
|
{
|
|
4730
5607
|
"aria-hidden": "true",
|
|
@@ -4746,8 +5623,8 @@ var Stepper = React60.forwardRef(function Stepper2({
|
|
|
4746
5623
|
children: variant === "numbered" ? state === "complete" ? "\u2713" : index + 1 : null
|
|
4747
5624
|
}
|
|
4748
5625
|
);
|
|
4749
|
-
const label = /* @__PURE__ */
|
|
4750
|
-
/* @__PURE__ */
|
|
5626
|
+
const label = /* @__PURE__ */ jsxs44("span", { className: "min-w-0", children: [
|
|
5627
|
+
/* @__PURE__ */ jsx64(
|
|
4751
5628
|
"span",
|
|
4752
5629
|
{
|
|
4753
5630
|
className: cn(
|
|
@@ -4759,7 +5636,7 @@ var Stepper = React60.forwardRef(function Stepper2({
|
|
|
4759
5636
|
children: step.label
|
|
4760
5637
|
}
|
|
4761
5638
|
),
|
|
4762
|
-
step.description && /* @__PURE__ */
|
|
5639
|
+
step.description && /* @__PURE__ */ jsx64(
|
|
4763
5640
|
"span",
|
|
4764
5641
|
{
|
|
4765
5642
|
className: cn(
|
|
@@ -4770,9 +5647,9 @@ var Stepper = React60.forwardRef(function Stepper2({
|
|
|
4770
5647
|
children: step.description
|
|
4771
5648
|
}
|
|
4772
5649
|
),
|
|
4773
|
-
/* @__PURE__ */
|
|
5650
|
+
/* @__PURE__ */ jsx64("span", { className: "sr-only", children: state === "complete" ? labels?.completed ?? " (completed)" : state === "current" ? labels?.current ?? " (current step)" : labels?.upcoming ?? " (upcoming)" })
|
|
4774
5651
|
] });
|
|
4775
|
-
const renderRow = (children, rowClassName) => interactive ? /* @__PURE__ */
|
|
5652
|
+
const renderRow = (children, rowClassName) => interactive ? /* @__PURE__ */ jsx64(
|
|
4776
5653
|
"button",
|
|
4777
5654
|
{
|
|
4778
5655
|
type: "button",
|
|
@@ -4781,29 +5658,29 @@ var Stepper = React60.forwardRef(function Stepper2({
|
|
|
4781
5658
|
className: cn(rowClassName, focusClass),
|
|
4782
5659
|
children
|
|
4783
5660
|
}
|
|
4784
|
-
) : /* @__PURE__ */
|
|
5661
|
+
) : /* @__PURE__ */ jsx64("div", { "aria-current": state === "current" ? "step" : void 0, className: rowClassName, children });
|
|
4785
5662
|
if (vertical) {
|
|
4786
|
-
return /* @__PURE__ */
|
|
4787
|
-
/* @__PURE__ */
|
|
4788
|
-
/* @__PURE__ */
|
|
5663
|
+
return /* @__PURE__ */ jsx64("li", { className: "flex", children: renderRow(
|
|
5664
|
+
/* @__PURE__ */ jsxs44(Fragment13, { children: [
|
|
5665
|
+
/* @__PURE__ */ jsxs44("div", { className: "flex flex-col items-center", children: [
|
|
4789
5666
|
marker,
|
|
4790
|
-
!isLast && /* @__PURE__ */
|
|
5667
|
+
!isLast && /* @__PURE__ */ jsx64("span", { "aria-hidden": "true", className: "my-1 w-px flex-1 rounded-full bg-border" })
|
|
4791
5668
|
] }),
|
|
4792
|
-
/* @__PURE__ */
|
|
5669
|
+
/* @__PURE__ */ jsx64("div", { className: cn("min-w-0 pb-6", titleCentered && verticalTitlePad), children: label })
|
|
4793
5670
|
] }),
|
|
4794
5671
|
"flex w-full items-stretch gap-3 text-left"
|
|
4795
5672
|
) }, step.label);
|
|
4796
5673
|
}
|
|
4797
5674
|
if (below) {
|
|
4798
|
-
return /* @__PURE__ */
|
|
5675
|
+
return /* @__PURE__ */ jsxs44("li", { className: "flex min-w-0 flex-1 items-start gap-2", children: [
|
|
4799
5676
|
renderRow(
|
|
4800
|
-
/* @__PURE__ */
|
|
5677
|
+
/* @__PURE__ */ jsxs44(Fragment13, { children: [
|
|
4801
5678
|
marker,
|
|
4802
5679
|
label
|
|
4803
5680
|
] }),
|
|
4804
5681
|
"flex min-w-0 flex-1 flex-col items-center gap-2 text-center"
|
|
4805
5682
|
),
|
|
4806
|
-
!isLast && /* @__PURE__ */
|
|
5683
|
+
!isLast && /* @__PURE__ */ jsx64(
|
|
4807
5684
|
"span",
|
|
4808
5685
|
{
|
|
4809
5686
|
"aria-hidden": "true",
|
|
@@ -4812,15 +5689,15 @@ var Stepper = React60.forwardRef(function Stepper2({
|
|
|
4812
5689
|
)
|
|
4813
5690
|
] }, step.label);
|
|
4814
5691
|
}
|
|
4815
|
-
return /* @__PURE__ */
|
|
5692
|
+
return /* @__PURE__ */ jsxs44("li", { className: "flex min-w-0 items-start gap-2", children: [
|
|
4816
5693
|
renderRow(
|
|
4817
|
-
/* @__PURE__ */
|
|
5694
|
+
/* @__PURE__ */ jsxs44(Fragment13, { children: [
|
|
4818
5695
|
marker,
|
|
4819
5696
|
label
|
|
4820
5697
|
] }),
|
|
4821
5698
|
cn("flex min-w-0 text-left", gapClass, titleCentered ? "items-center" : "items-start")
|
|
4822
5699
|
),
|
|
4823
|
-
!isLast && /* @__PURE__ */
|
|
5700
|
+
!isLast && /* @__PURE__ */ jsx64(
|
|
4824
5701
|
"span",
|
|
4825
5702
|
{
|
|
4826
5703
|
"aria-hidden": "true",
|
|
@@ -4834,14 +5711,14 @@ var Stepper = React60.forwardRef(function Stepper2({
|
|
|
4834
5711
|
});
|
|
4835
5712
|
|
|
4836
5713
|
// src/components/file-upload/FileUpload.tsx
|
|
4837
|
-
import * as
|
|
4838
|
-
import { jsx as
|
|
5714
|
+
import * as React65 from "react";
|
|
5715
|
+
import { jsx as jsx65, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
4839
5716
|
function formatSize(bytes) {
|
|
4840
5717
|
if (bytes < 1024) return `${bytes} B`;
|
|
4841
5718
|
if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`;
|
|
4842
5719
|
return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;
|
|
4843
5720
|
}
|
|
4844
|
-
var FileUpload =
|
|
5721
|
+
var FileUpload = React65.forwardRef(function FileUpload2({
|
|
4845
5722
|
files,
|
|
4846
5723
|
defaultFiles,
|
|
4847
5724
|
onFilesChange,
|
|
@@ -4858,10 +5735,10 @@ var FileUpload = React61.forwardRef(function FileUpload2({
|
|
|
4858
5735
|
id,
|
|
4859
5736
|
...props
|
|
4860
5737
|
}, ref) {
|
|
4861
|
-
const [internal, setInternal] =
|
|
4862
|
-
const [dragging, setDragging] =
|
|
5738
|
+
const [internal, setInternal] = React65.useState(defaultFiles ?? []);
|
|
5739
|
+
const [dragging, setDragging] = React65.useState(false);
|
|
4863
5740
|
const current = files ?? internal;
|
|
4864
|
-
const generatedId =
|
|
5741
|
+
const generatedId = React65.useId();
|
|
4865
5742
|
const inputId = id ?? generatedId;
|
|
4866
5743
|
const commit = (next) => {
|
|
4867
5744
|
if (files === void 0) setInternal(next);
|
|
@@ -4872,8 +5749,8 @@ var FileUpload = React61.forwardRef(function FileUpload2({
|
|
|
4872
5749
|
const list = Array.from(incoming);
|
|
4873
5750
|
commit(multiple ? [...current, ...list] : list.slice(0, 1));
|
|
4874
5751
|
};
|
|
4875
|
-
return /* @__PURE__ */
|
|
4876
|
-
/* @__PURE__ */
|
|
5752
|
+
return /* @__PURE__ */ jsxs45("div", { className: cn("flex flex-col gap-3", className), children: [
|
|
5753
|
+
/* @__PURE__ */ jsxs45(
|
|
4877
5754
|
"div",
|
|
4878
5755
|
{
|
|
4879
5756
|
onDragOver: (event) => {
|
|
@@ -4894,9 +5771,9 @@ var FileUpload = React61.forwardRef(function FileUpload2({
|
|
|
4894
5771
|
disabled && "opacity-50"
|
|
4895
5772
|
),
|
|
4896
5773
|
children: [
|
|
4897
|
-
/* @__PURE__ */
|
|
5774
|
+
/* @__PURE__ */ jsxs45("label", { htmlFor: inputId, className: cn("block text-sm", disabled ? "cursor-not-allowed" : "cursor-pointer"), children: [
|
|
4898
5775
|
label,
|
|
4899
|
-
/* @__PURE__ */
|
|
5776
|
+
/* @__PURE__ */ jsx65(
|
|
4900
5777
|
"input",
|
|
4901
5778
|
{
|
|
4902
5779
|
ref,
|
|
@@ -4914,15 +5791,15 @@ var FileUpload = React61.forwardRef(function FileUpload2({
|
|
|
4914
5791
|
}
|
|
4915
5792
|
)
|
|
4916
5793
|
] }),
|
|
4917
|
-
/* @__PURE__ */
|
|
5794
|
+
/* @__PURE__ */ jsx65("p", { className: "mt-1 text-xs text-muted-foreground", children: hint ?? (accept ? `Accepted: ${accept}` : "Any file type") })
|
|
4918
5795
|
]
|
|
4919
5796
|
}
|
|
4920
5797
|
),
|
|
4921
|
-
current.length > 0 && /* @__PURE__ */
|
|
4922
|
-
/* @__PURE__ */
|
|
4923
|
-
/* @__PURE__ */
|
|
4924
|
-
/* @__PURE__ */
|
|
4925
|
-
progress?.[file.name] !== void 0 && /* @__PURE__ */
|
|
5798
|
+
current.length > 0 && /* @__PURE__ */ jsx65("ul", { "aria-label": selectedFilesLabel, className: "space-y-2", children: current.map((file) => /* @__PURE__ */ jsxs45("li", { className: "flex items-center justify-between gap-3 rounded-md border border-border px-3 py-2", children: [
|
|
5799
|
+
/* @__PURE__ */ jsxs45("div", { className: "min-w-0", children: [
|
|
5800
|
+
/* @__PURE__ */ jsx65("p", { className: "truncate text-sm", children: file.name }),
|
|
5801
|
+
/* @__PURE__ */ jsx65("p", { className: "text-xs text-muted-foreground", children: formatSize(file.size) }),
|
|
5802
|
+
progress?.[file.name] !== void 0 && /* @__PURE__ */ jsx65(
|
|
4926
5803
|
"div",
|
|
4927
5804
|
{
|
|
4928
5805
|
role: "progressbar",
|
|
@@ -4931,11 +5808,11 @@ var FileUpload = React61.forwardRef(function FileUpload2({
|
|
|
4931
5808
|
"aria-valuemax": 100,
|
|
4932
5809
|
"aria-label": uploadingLabel(file),
|
|
4933
5810
|
className: "mt-1 h-1.5 w-40 overflow-hidden rounded-full bg-muted",
|
|
4934
|
-
children: /* @__PURE__ */
|
|
5811
|
+
children: /* @__PURE__ */ jsx65("div", { className: "h-full bg-primary", style: { width: `${progress[file.name]}%` } })
|
|
4935
5812
|
}
|
|
4936
5813
|
)
|
|
4937
5814
|
] }),
|
|
4938
|
-
/* @__PURE__ */
|
|
5815
|
+
/* @__PURE__ */ jsx65(
|
|
4939
5816
|
"button",
|
|
4940
5817
|
{
|
|
4941
5818
|
type: "button",
|
|
@@ -4950,39 +5827,43 @@ var FileUpload = React61.forwardRef(function FileUpload2({
|
|
|
4950
5827
|
});
|
|
4951
5828
|
|
|
4952
5829
|
// src/components/timeline/Timeline.tsx
|
|
4953
|
-
import * as
|
|
4954
|
-
import { jsx as
|
|
4955
|
-
var Timeline =
|
|
4956
|
-
return /* @__PURE__ */
|
|
4957
|
-
|
|
4958
|
-
|
|
4959
|
-
|
|
4960
|
-
|
|
4961
|
-
|
|
4962
|
-
|
|
4963
|
-
|
|
4964
|
-
|
|
4965
|
-
|
|
4966
|
-
|
|
4967
|
-
|
|
4968
|
-
|
|
4969
|
-
|
|
4970
|
-
|
|
4971
|
-
|
|
4972
|
-
|
|
4973
|
-
|
|
4974
|
-
|
|
5830
|
+
import * as React66 from "react";
|
|
5831
|
+
import { jsx as jsx66, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
5832
|
+
var Timeline = React66.forwardRef(function Timeline2({ items, className, ...props }, ref) {
|
|
5833
|
+
return /* @__PURE__ */ jsx66("ol", { ref, className: cn("relative flex flex-col gap-6", className), ...props, children: items.map((item, index) => /* @__PURE__ */ jsxs46("li", { className: "relative flex gap-4", children: [
|
|
5834
|
+
index < items.length - 1 && /* @__PURE__ */ jsx66(
|
|
5835
|
+
"span",
|
|
5836
|
+
{
|
|
5837
|
+
"aria-hidden": "true",
|
|
5838
|
+
className: "absolute left-[5.5px] top-4 -bottom-7 w-px bg-border"
|
|
5839
|
+
}
|
|
5840
|
+
),
|
|
5841
|
+
/* @__PURE__ */ jsx66("div", { className: "relative z-10 flex flex-col items-center", children: /* @__PURE__ */ jsx66(
|
|
5842
|
+
"span",
|
|
5843
|
+
{
|
|
5844
|
+
"aria-hidden": "true",
|
|
5845
|
+
className: cn(
|
|
5846
|
+
"mt-1 flex h-3 w-3 shrink-0 items-center justify-center rounded-full border-2",
|
|
5847
|
+
item.muted ? "border-border bg-background" : "border-primary bg-primary"
|
|
5848
|
+
)
|
|
5849
|
+
}
|
|
5850
|
+
) }),
|
|
5851
|
+
/* @__PURE__ */ jsxs46("div", { className: "min-w-0 pb-1", children: [
|
|
5852
|
+
item.period && /* @__PURE__ */ jsx66("p", { className: "text-xs font-medium uppercase tracking-wide text-muted-foreground", children: item.period }),
|
|
5853
|
+
/* @__PURE__ */ jsx66("p", { className: cn("text-sm font-semibold", item.muted && "text-muted-foreground"), children: item.title }),
|
|
5854
|
+
item.description && /* @__PURE__ */ jsx66("p", { className: "mt-1 text-sm text-muted-foreground", children: item.description }),
|
|
5855
|
+
item.icon && /* @__PURE__ */ jsx66("div", { className: "mt-1 text-muted-foreground [&_svg]:size-4", children: item.icon })
|
|
4975
5856
|
] })
|
|
4976
5857
|
] }, `${item.title}-${index}`)) });
|
|
4977
5858
|
});
|
|
4978
5859
|
|
|
4979
5860
|
// src/components/block/Block.tsx
|
|
4980
|
-
import * as
|
|
4981
|
-
import { jsx as
|
|
4982
|
-
var Block =
|
|
5861
|
+
import * as React67 from "react";
|
|
5862
|
+
import { jsx as jsx67 } from "react/jsx-runtime";
|
|
5863
|
+
var Block = React67.forwardRef(
|
|
4983
5864
|
({ as = "div", inline, muted, className, ...props }, ref) => {
|
|
4984
5865
|
const Tag = inline ? "span" : as;
|
|
4985
|
-
return /* @__PURE__ */
|
|
5866
|
+
return /* @__PURE__ */ jsx67(
|
|
4986
5867
|
Tag,
|
|
4987
5868
|
{
|
|
4988
5869
|
ref,
|
|
@@ -4995,8 +5876,8 @@ var Block = React63.forwardRef(
|
|
|
4995
5876
|
Block.displayName = "Block";
|
|
4996
5877
|
|
|
4997
5878
|
// src/components/flex/Flex.tsx
|
|
4998
|
-
import * as
|
|
4999
|
-
import { jsx as
|
|
5879
|
+
import * as React68 from "react";
|
|
5880
|
+
import { jsx as jsx68 } from "react/jsx-runtime";
|
|
5000
5881
|
var justifyClasses = {
|
|
5001
5882
|
start: "justify-start",
|
|
5002
5883
|
center: "justify-center",
|
|
@@ -5012,11 +5893,11 @@ var alignClasses = {
|
|
|
5012
5893
|
stretch: "items-stretch",
|
|
5013
5894
|
baseline: "items-baseline"
|
|
5014
5895
|
};
|
|
5015
|
-
var Flex =
|
|
5896
|
+
var Flex = React68.forwardRef(
|
|
5016
5897
|
({ direction = "row", align, justify, wrap, gap = "md", as = "div", className, style, ...props }, ref) => {
|
|
5017
5898
|
const Tag = as;
|
|
5018
5899
|
const gapResolved = resolveGap(gap);
|
|
5019
|
-
return /* @__PURE__ */
|
|
5900
|
+
return /* @__PURE__ */ jsx68(
|
|
5020
5901
|
Tag,
|
|
5021
5902
|
{
|
|
5022
5903
|
ref,
|
|
@@ -5043,7 +5924,7 @@ var selfAlignClasses = {
|
|
|
5043
5924
|
stretch: "self-stretch",
|
|
5044
5925
|
baseline: "self-baseline"
|
|
5045
5926
|
};
|
|
5046
|
-
var FlexItem =
|
|
5927
|
+
var FlexItem = React68.forwardRef(
|
|
5047
5928
|
({ grow, shrink, basis, align, as = "div", className, ...props }, ref) => {
|
|
5048
5929
|
const Tag = as;
|
|
5049
5930
|
const style = {
|
|
@@ -5051,7 +5932,7 @@ var FlexItem = React64.forwardRef(
|
|
|
5051
5932
|
...shrink === false ? { flexShrink: 0 } : typeof shrink === "string" && shrink ? { flexShrink: Number(shrink) || shrink } : {},
|
|
5052
5933
|
...basis ? { flexBasis: basis } : {}
|
|
5053
5934
|
};
|
|
5054
|
-
return /* @__PURE__ */
|
|
5935
|
+
return /* @__PURE__ */ jsx68(
|
|
5055
5936
|
Tag,
|
|
5056
5937
|
{
|
|
5057
5938
|
ref,
|
|
@@ -5065,8 +5946,8 @@ var FlexItem = React64.forwardRef(
|
|
|
5065
5946
|
FlexItem.displayName = "FlexItem";
|
|
5066
5947
|
|
|
5067
5948
|
// src/components/grid/Grid.tsx
|
|
5068
|
-
import * as
|
|
5069
|
-
import { jsx as
|
|
5949
|
+
import * as React69 from "react";
|
|
5950
|
+
import { jsx as jsx69 } from "react/jsx-runtime";
|
|
5070
5951
|
var BASE_COLS = {
|
|
5071
5952
|
1: "grid-cols-1",
|
|
5072
5953
|
2: "grid-cols-2",
|
|
@@ -5131,11 +6012,11 @@ var LG_COL_SPAN = {
|
|
|
5131
6012
|
5: "lg:col-span-5",
|
|
5132
6013
|
6: "lg:col-span-6"
|
|
5133
6014
|
};
|
|
5134
|
-
var Grid =
|
|
6015
|
+
var Grid = React69.forwardRef(
|
|
5135
6016
|
({ cols, smCols, mdCols, lgCols, minCol, gap = "md", as = "div", className, style, ...props }, ref) => {
|
|
5136
6017
|
const Tag = as;
|
|
5137
6018
|
const gapResolved = resolveGap(gap);
|
|
5138
|
-
return /* @__PURE__ */
|
|
6019
|
+
return /* @__PURE__ */ jsx69(
|
|
5139
6020
|
Tag,
|
|
5140
6021
|
{
|
|
5141
6022
|
ref,
|
|
@@ -5159,10 +6040,10 @@ var Grid = React65.forwardRef(
|
|
|
5159
6040
|
}
|
|
5160
6041
|
);
|
|
5161
6042
|
Grid.displayName = "Grid";
|
|
5162
|
-
var GridItem =
|
|
6043
|
+
var GridItem = React69.forwardRef(
|
|
5163
6044
|
({ span, smSpan, mdSpan, lgSpan, as = "div", className, ...props }, ref) => {
|
|
5164
6045
|
const Tag = as;
|
|
5165
|
-
return /* @__PURE__ */
|
|
6046
|
+
return /* @__PURE__ */ jsx69(
|
|
5166
6047
|
Tag,
|
|
5167
6048
|
{
|
|
5168
6049
|
ref,
|
|
@@ -5181,8 +6062,8 @@ var GridItem = React65.forwardRef(
|
|
|
5181
6062
|
GridItem.displayName = "GridItem";
|
|
5182
6063
|
|
|
5183
6064
|
// src/components/container/Container.tsx
|
|
5184
|
-
import * as
|
|
5185
|
-
import { jsx as
|
|
6065
|
+
import * as React70 from "react";
|
|
6066
|
+
import { jsx as jsx70 } from "react/jsx-runtime";
|
|
5186
6067
|
var widthClasses = {
|
|
5187
6068
|
sm: "max-w-3xl",
|
|
5188
6069
|
md: "max-w-5xl",
|
|
@@ -5196,9 +6077,9 @@ var paddingClasses = {
|
|
|
5196
6077
|
md: "px-4 sm:px-6",
|
|
5197
6078
|
lg: "px-4 sm:px-6 lg:px-8"
|
|
5198
6079
|
};
|
|
5199
|
-
var Container =
|
|
6080
|
+
var Container = React70.forwardRef(function Container2({ width = "lg", padding = "md", as = "div", className, ...props }, ref) {
|
|
5200
6081
|
const Tag = as;
|
|
5201
|
-
return /* @__PURE__ */
|
|
6082
|
+
return /* @__PURE__ */ jsx70(
|
|
5202
6083
|
Tag,
|
|
5203
6084
|
{
|
|
5204
6085
|
ref,
|
|
@@ -5209,8 +6090,8 @@ var Container = React66.forwardRef(function Container2({ width = "lg", padding =
|
|
|
5209
6090
|
});
|
|
5210
6091
|
|
|
5211
6092
|
// src/components/section/Section.tsx
|
|
5212
|
-
import * as
|
|
5213
|
-
import { jsx as
|
|
6093
|
+
import * as React71 from "react";
|
|
6094
|
+
import { jsx as jsx71 } from "react/jsx-runtime";
|
|
5214
6095
|
var toneClasses2 = {
|
|
5215
6096
|
default: "bg-background text-foreground",
|
|
5216
6097
|
muted: "bg-muted/40 text-foreground",
|
|
@@ -5250,7 +6131,7 @@ var brandVars = {
|
|
|
5250
6131
|
"--border": "var(--primary-foreground)",
|
|
5251
6132
|
"--input": "var(--primary-foreground)"
|
|
5252
6133
|
};
|
|
5253
|
-
var Section =
|
|
6134
|
+
var Section = React71.forwardRef(function Section2({
|
|
5254
6135
|
tone = "default",
|
|
5255
6136
|
padding = "md",
|
|
5256
6137
|
width = "lg",
|
|
@@ -5264,7 +6145,7 @@ var Section = React67.forwardRef(function Section2({
|
|
|
5264
6145
|
}, ref) {
|
|
5265
6146
|
const Tag = as;
|
|
5266
6147
|
const toneStyle = tone === "inverse" ? inverseVars : tone === "brand" ? brandVars : void 0;
|
|
5267
|
-
return /* @__PURE__ */
|
|
6148
|
+
return /* @__PURE__ */ jsx71(
|
|
5268
6149
|
Tag,
|
|
5269
6150
|
{
|
|
5270
6151
|
ref,
|
|
@@ -5272,19 +6153,19 @@ var Section = React67.forwardRef(function Section2({
|
|
|
5272
6153
|
className: cn("w-full", toneClasses2[tone], paddingClasses2[padding], className),
|
|
5273
6154
|
style: { ...toneStyle, ...style },
|
|
5274
6155
|
...props,
|
|
5275
|
-
children: container ? /* @__PURE__ */
|
|
6156
|
+
children: container ? /* @__PURE__ */ jsx71(Container, { width, className: containerClassName, children }) : children
|
|
5276
6157
|
}
|
|
5277
6158
|
);
|
|
5278
6159
|
});
|
|
5279
6160
|
|
|
5280
6161
|
// src/components/hero/Hero.tsx
|
|
5281
|
-
import * as
|
|
5282
|
-
import { jsx as
|
|
6162
|
+
import * as React72 from "react";
|
|
6163
|
+
import { jsx as jsx72, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
5283
6164
|
var titleSizes = {
|
|
5284
6165
|
md: "text-3xl sm:text-4xl md:text-5xl",
|
|
5285
6166
|
lg: "text-4xl sm:text-5xl md:text-6xl lg:leading-[1.05]"
|
|
5286
6167
|
};
|
|
5287
|
-
var Hero =
|
|
6168
|
+
var Hero = React72.forwardRef(function Hero2({
|
|
5288
6169
|
title,
|
|
5289
6170
|
description,
|
|
5290
6171
|
eyebrow,
|
|
@@ -5310,7 +6191,7 @@ var Hero = React68.forwardRef(function Hero2({
|
|
|
5310
6191
|
const Heading2 = `h${level}`;
|
|
5311
6192
|
const centered = layout === "centered" || align === "center";
|
|
5312
6193
|
const overlay = layout === "overlay";
|
|
5313
|
-
const copy = /* @__PURE__ */
|
|
6194
|
+
const copy = /* @__PURE__ */ jsxs47(
|
|
5314
6195
|
"div",
|
|
5315
6196
|
{
|
|
5316
6197
|
className: cn(
|
|
@@ -5319,7 +6200,7 @@ var Hero = React68.forwardRef(function Hero2({
|
|
|
5319
6200
|
overlay && "max-w-2xl"
|
|
5320
6201
|
),
|
|
5321
6202
|
children: [
|
|
5322
|
-
badge && /* @__PURE__ */
|
|
6203
|
+
badge && /* @__PURE__ */ jsx72(
|
|
5323
6204
|
"div",
|
|
5324
6205
|
{
|
|
5325
6206
|
className: cn(
|
|
@@ -5330,7 +6211,7 @@ var Hero = React68.forwardRef(function Hero2({
|
|
|
5330
6211
|
children: badge
|
|
5331
6212
|
}
|
|
5332
6213
|
),
|
|
5333
|
-
eyebrow && /* @__PURE__ */
|
|
6214
|
+
eyebrow && /* @__PURE__ */ jsx72(
|
|
5334
6215
|
"p",
|
|
5335
6216
|
{
|
|
5336
6217
|
className: cn(
|
|
@@ -5341,7 +6222,7 @@ var Hero = React68.forwardRef(function Hero2({
|
|
|
5341
6222
|
children: eyebrow
|
|
5342
6223
|
}
|
|
5343
6224
|
),
|
|
5344
|
-
/* @__PURE__ */
|
|
6225
|
+
/* @__PURE__ */ jsx72(
|
|
5345
6226
|
Heading2,
|
|
5346
6227
|
{
|
|
5347
6228
|
className: cn(
|
|
@@ -5353,7 +6234,7 @@ var Hero = React68.forwardRef(function Hero2({
|
|
|
5353
6234
|
children: title
|
|
5354
6235
|
}
|
|
5355
6236
|
),
|
|
5356
|
-
description && /* @__PURE__ */
|
|
6237
|
+
description && /* @__PURE__ */ jsx72(
|
|
5357
6238
|
"p",
|
|
5358
6239
|
{
|
|
5359
6240
|
className: cn(
|
|
@@ -5365,7 +6246,7 @@ var Hero = React68.forwardRef(function Hero2({
|
|
|
5365
6246
|
children: description
|
|
5366
6247
|
}
|
|
5367
6248
|
),
|
|
5368
|
-
actions && /* @__PURE__ */
|
|
6249
|
+
actions && /* @__PURE__ */ jsx72(
|
|
5369
6250
|
"div",
|
|
5370
6251
|
{
|
|
5371
6252
|
className: cn(
|
|
@@ -5379,7 +6260,7 @@ var Hero = React68.forwardRef(function Hero2({
|
|
|
5379
6260
|
}
|
|
5380
6261
|
);
|
|
5381
6262
|
if (overlay) {
|
|
5382
|
-
return /* @__PURE__ */
|
|
6263
|
+
return /* @__PURE__ */ jsxs47(
|
|
5383
6264
|
Tag,
|
|
5384
6265
|
{
|
|
5385
6266
|
ref,
|
|
@@ -5389,7 +6270,7 @@ var Hero = React68.forwardRef(function Hero2({
|
|
|
5389
6270
|
),
|
|
5390
6271
|
...props,
|
|
5391
6272
|
children: [
|
|
5392
|
-
media && /* @__PURE__ */
|
|
6273
|
+
media && /* @__PURE__ */ jsx72(
|
|
5393
6274
|
"div",
|
|
5394
6275
|
{
|
|
5395
6276
|
className: cn(
|
|
@@ -5399,20 +6280,20 @@ var Hero = React68.forwardRef(function Hero2({
|
|
|
5399
6280
|
children: media
|
|
5400
6281
|
}
|
|
5401
6282
|
),
|
|
5402
|
-
/* @__PURE__ */
|
|
5403
|
-
/* @__PURE__ */
|
|
6283
|
+
/* @__PURE__ */ jsx72("div", { "aria-hidden": "true", className: "absolute inset-0 -z-10 bg-foreground/60" }),
|
|
6284
|
+
/* @__PURE__ */ jsx72("div", { className: "relative w-full px-4 sm:px-6 lg:px-10", children: copy })
|
|
5404
6285
|
]
|
|
5405
6286
|
}
|
|
5406
6287
|
);
|
|
5407
6288
|
}
|
|
5408
6289
|
if (layout === "centered") {
|
|
5409
|
-
return /* @__PURE__ */
|
|
6290
|
+
return /* @__PURE__ */ jsxs47(Tag, { ref, className: cn("w-full", className), ...props, children: [
|
|
5410
6291
|
copy,
|
|
5411
|
-
media && /* @__PURE__ */
|
|
6292
|
+
media && /* @__PURE__ */ jsx72("div", { className: cn("mt-12 min-w-0", mediaClassName), children: media })
|
|
5412
6293
|
] });
|
|
5413
6294
|
}
|
|
5414
6295
|
if (layout === "stacked") {
|
|
5415
|
-
return /* @__PURE__ */
|
|
6296
|
+
return /* @__PURE__ */ jsxs47(
|
|
5416
6297
|
Tag,
|
|
5417
6298
|
{
|
|
5418
6299
|
ref,
|
|
@@ -5420,28 +6301,28 @@ var Hero = React68.forwardRef(function Hero2({
|
|
|
5420
6301
|
...props,
|
|
5421
6302
|
children: [
|
|
5422
6303
|
copy,
|
|
5423
|
-
media && /* @__PURE__ */
|
|
6304
|
+
media && /* @__PURE__ */ jsx72("div", { className: cn("min-w-0 w-full", mediaClassName), children: media })
|
|
5424
6305
|
]
|
|
5425
6306
|
}
|
|
5426
6307
|
);
|
|
5427
6308
|
}
|
|
5428
|
-
return /* @__PURE__ */
|
|
6309
|
+
return /* @__PURE__ */ jsxs47(
|
|
5429
6310
|
Tag,
|
|
5430
6311
|
{
|
|
5431
6312
|
ref,
|
|
5432
6313
|
className: cn("grid w-full items-center gap-10 lg:grid-cols-2 lg:gap-16 xl:gap-20", className),
|
|
5433
6314
|
...props,
|
|
5434
6315
|
children: [
|
|
5435
|
-
/* @__PURE__ */
|
|
5436
|
-
media && /* @__PURE__ */
|
|
6316
|
+
/* @__PURE__ */ jsx72("div", { className: cn(mediaPosition === "left" && "lg:order-2"), children: copy }),
|
|
6317
|
+
media && /* @__PURE__ */ jsx72("div", { className: cn("min-w-0", mediaPosition === "left" && "lg:order-1", mediaClassName), children: media })
|
|
5437
6318
|
]
|
|
5438
6319
|
}
|
|
5439
6320
|
);
|
|
5440
6321
|
});
|
|
5441
6322
|
|
|
5442
6323
|
// src/components/stat-band/StatBand.tsx
|
|
5443
|
-
import * as
|
|
5444
|
-
import { jsx as
|
|
6324
|
+
import * as React73 from "react";
|
|
6325
|
+
import { jsx as jsx73, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
5445
6326
|
var columnClasses = {
|
|
5446
6327
|
2: "sm:grid-cols-2",
|
|
5447
6328
|
3: "sm:grid-cols-2 lg:grid-cols-3",
|
|
@@ -5452,8 +6333,8 @@ var valueClasses = {
|
|
|
5452
6333
|
md: "text-3xl",
|
|
5453
6334
|
lg: "text-4xl sm:text-5xl"
|
|
5454
6335
|
};
|
|
5455
|
-
var StatBand =
|
|
5456
|
-
return /* @__PURE__ */
|
|
6336
|
+
var StatBand = React73.forwardRef(function StatBand2({ items, columns = 3, align = "center", size = "md", divided = true, className, ...props }, ref) {
|
|
6337
|
+
return /* @__PURE__ */ jsx73(
|
|
5457
6338
|
"dl",
|
|
5458
6339
|
{
|
|
5459
6340
|
ref,
|
|
@@ -5464,7 +6345,7 @@ var StatBand = React69.forwardRef(function StatBand2({ items, columns = 3, align
|
|
|
5464
6345
|
className
|
|
5465
6346
|
),
|
|
5466
6347
|
...props,
|
|
5467
|
-
children: items.map((item) => /* @__PURE__ */
|
|
6348
|
+
children: items.map((item) => /* @__PURE__ */ jsxs48(
|
|
5468
6349
|
"div",
|
|
5469
6350
|
{
|
|
5470
6351
|
className: cn(
|
|
@@ -5472,11 +6353,11 @@ var StatBand = React69.forwardRef(function StatBand2({ items, columns = 3, align
|
|
|
5472
6353
|
align === "center" ? "items-center text-center" : "items-start text-left"
|
|
5473
6354
|
),
|
|
5474
6355
|
children: [
|
|
5475
|
-
/* @__PURE__ */
|
|
6356
|
+
/* @__PURE__ */ jsxs48("dt", { className: "order-2 text-sm font-medium text-muted-foreground", children: [
|
|
5476
6357
|
item.label,
|
|
5477
|
-
item.hint && /* @__PURE__ */
|
|
6358
|
+
item.hint && /* @__PURE__ */ jsx73("span", { className: "mt-1 block text-xs font-normal", children: item.hint })
|
|
5478
6359
|
] }),
|
|
5479
|
-
/* @__PURE__ */
|
|
6360
|
+
/* @__PURE__ */ jsx73("dd", { className: cn("order-1 m-0 font-semibold tracking-tight tabular-nums", valueClasses[size]), children: item.value })
|
|
5480
6361
|
]
|
|
5481
6362
|
},
|
|
5482
6363
|
item.label
|
|
@@ -5486,14 +6367,14 @@ var StatBand = React69.forwardRef(function StatBand2({ items, columns = 3, align
|
|
|
5486
6367
|
});
|
|
5487
6368
|
|
|
5488
6369
|
// src/components/cta-section/CTASection.tsx
|
|
5489
|
-
import * as
|
|
5490
|
-
import { jsx as
|
|
6370
|
+
import * as React74 from "react";
|
|
6371
|
+
import { jsx as jsx74, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
5491
6372
|
var sizePadding = {
|
|
5492
6373
|
sm: "md",
|
|
5493
6374
|
md: "lg",
|
|
5494
6375
|
lg: "xl"
|
|
5495
6376
|
};
|
|
5496
|
-
var CTASection =
|
|
6377
|
+
var CTASection = React74.forwardRef(function CTASection2({
|
|
5497
6378
|
title,
|
|
5498
6379
|
description,
|
|
5499
6380
|
eyebrow,
|
|
@@ -5505,7 +6386,7 @@ var CTASection = React70.forwardRef(function CTASection2({
|
|
|
5505
6386
|
className,
|
|
5506
6387
|
...props
|
|
5507
6388
|
}, ref) {
|
|
5508
|
-
return /* @__PURE__ */
|
|
6389
|
+
return /* @__PURE__ */ jsx74(
|
|
5509
6390
|
Section,
|
|
5510
6391
|
{
|
|
5511
6392
|
ref,
|
|
@@ -5514,7 +6395,7 @@ var CTASection = React70.forwardRef(function CTASection2({
|
|
|
5514
6395
|
width,
|
|
5515
6396
|
className,
|
|
5516
6397
|
...props,
|
|
5517
|
-
children: /* @__PURE__ */
|
|
6398
|
+
children: /* @__PURE__ */ jsxs49(
|
|
5518
6399
|
"div",
|
|
5519
6400
|
{
|
|
5520
6401
|
className: cn(
|
|
@@ -5522,10 +6403,10 @@ var CTASection = React70.forwardRef(function CTASection2({
|
|
|
5522
6403
|
align === "center" ? "items-center text-center" : "items-start text-left"
|
|
5523
6404
|
),
|
|
5524
6405
|
children: [
|
|
5525
|
-
eyebrow && /* @__PURE__ */
|
|
5526
|
-
/* @__PURE__ */
|
|
5527
|
-
description && /* @__PURE__ */
|
|
5528
|
-
actions && /* @__PURE__ */
|
|
6406
|
+
eyebrow && /* @__PURE__ */ jsx74("p", { className: "text-xs font-semibold uppercase tracking-widest text-primary-ink", children: eyebrow }),
|
|
6407
|
+
/* @__PURE__ */ jsx74("h2", { className: "max-w-3xl text-3xl font-semibold tracking-tight text-balance sm:text-4xl", children: title }),
|
|
6408
|
+
description && /* @__PURE__ */ jsx74("p", { className: cn("max-w-2xl text-base leading-relaxed text-muted-foreground sm:text-lg"), children: description }),
|
|
6409
|
+
actions && /* @__PURE__ */ jsx74("div", { className: cn("mt-2 flex flex-wrap items-center gap-3", align === "center" && "justify-center"), children: actions })
|
|
5529
6410
|
]
|
|
5530
6411
|
}
|
|
5531
6412
|
)
|
|
@@ -5534,10 +6415,10 @@ var CTASection = React70.forwardRef(function CTASection2({
|
|
|
5534
6415
|
});
|
|
5535
6416
|
|
|
5536
6417
|
// src/components/comparison-table/ComparisonTable.tsx
|
|
5537
|
-
import * as
|
|
5538
|
-
import { Fragment as
|
|
6418
|
+
import * as React75 from "react";
|
|
6419
|
+
import { Fragment as Fragment14, jsx as jsx75, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
5539
6420
|
function CheckMark() {
|
|
5540
|
-
return /* @__PURE__ */
|
|
6421
|
+
return /* @__PURE__ */ jsx75(
|
|
5541
6422
|
"svg",
|
|
5542
6423
|
{
|
|
5543
6424
|
"aria-hidden": "true",
|
|
@@ -5548,12 +6429,12 @@ function CheckMark() {
|
|
|
5548
6429
|
strokeLinecap: "round",
|
|
5549
6430
|
strokeLinejoin: "round",
|
|
5550
6431
|
className: "mx-auto h-5 w-5 text-success",
|
|
5551
|
-
children: /* @__PURE__ */
|
|
6432
|
+
children: /* @__PURE__ */ jsx75("path", { d: "m4 10.5 4 4 8-9" })
|
|
5552
6433
|
}
|
|
5553
6434
|
);
|
|
5554
6435
|
}
|
|
5555
6436
|
function DashMark() {
|
|
5556
|
-
return /* @__PURE__ */
|
|
6437
|
+
return /* @__PURE__ */ jsx75(
|
|
5557
6438
|
"svg",
|
|
5558
6439
|
{
|
|
5559
6440
|
"aria-hidden": "true",
|
|
@@ -5563,11 +6444,11 @@ function DashMark() {
|
|
|
5563
6444
|
strokeWidth: "2.2",
|
|
5564
6445
|
strokeLinecap: "round",
|
|
5565
6446
|
className: "mx-auto h-5 w-5 text-muted-foreground/60",
|
|
5566
|
-
children: /* @__PURE__ */
|
|
6447
|
+
children: /* @__PURE__ */ jsx75("path", { d: "M5 10h10" })
|
|
5567
6448
|
}
|
|
5568
6449
|
);
|
|
5569
6450
|
}
|
|
5570
|
-
var ComparisonTable =
|
|
6451
|
+
var ComparisonTable = React75.forwardRef(
|
|
5571
6452
|
function ComparisonTable2({
|
|
5572
6453
|
columns,
|
|
5573
6454
|
rows,
|
|
@@ -5579,38 +6460,38 @@ var ComparisonTable = React71.forwardRef(
|
|
|
5579
6460
|
}, ref) {
|
|
5580
6461
|
const yes = valueLabels?.yes ?? "Included";
|
|
5581
6462
|
const no = valueLabels?.no ?? "Not included";
|
|
5582
|
-
return /* @__PURE__ */
|
|
5583
|
-
/* @__PURE__ */
|
|
5584
|
-
/* @__PURE__ */
|
|
5585
|
-
/* @__PURE__ */
|
|
5586
|
-
columns.map((column) => /* @__PURE__ */
|
|
6463
|
+
return /* @__PURE__ */ jsx75("div", { className: "w-full overflow-x-auto rounded-xl border border-border bg-card", children: /* @__PURE__ */ jsxs50("table", { ref, className: cn("w-full border-collapse text-sm", className), ...props, children: [
|
|
6464
|
+
/* @__PURE__ */ jsx75("caption", { className: "sr-only", children: caption }),
|
|
6465
|
+
/* @__PURE__ */ jsx75("thead", { children: /* @__PURE__ */ jsxs50("tr", { className: "border-b border-border", children: [
|
|
6466
|
+
/* @__PURE__ */ jsx75("th", { scope: "col", className: "min-w-48 px-5 py-4 text-left font-medium text-muted-foreground", children: featureLabel }),
|
|
6467
|
+
columns.map((column) => /* @__PURE__ */ jsx75(
|
|
5587
6468
|
"th",
|
|
5588
6469
|
{
|
|
5589
6470
|
scope: "col",
|
|
5590
6471
|
className: cn(
|
|
5591
6472
|
"min-w-40 px-5 py-4 text-center font-semibold",
|
|
5592
|
-
column.highlight && "bg-primary/10 text-primary"
|
|
6473
|
+
column.highlight && "bg-primary/10 text-primary-ink"
|
|
5593
6474
|
),
|
|
5594
6475
|
children: column.label
|
|
5595
6476
|
},
|
|
5596
6477
|
column.label
|
|
5597
6478
|
))
|
|
5598
6479
|
] }) }),
|
|
5599
|
-
/* @__PURE__ */
|
|
5600
|
-
/* @__PURE__ */
|
|
6480
|
+
/* @__PURE__ */ jsx75("tbody", { children: rows.map((row) => /* @__PURE__ */ jsxs50("tr", { className: "border-b border-border last:border-b-0", children: [
|
|
6481
|
+
/* @__PURE__ */ jsxs50("th", { scope: "row", className: "px-5 py-4 text-left font-medium", children: [
|
|
5601
6482
|
row.feature,
|
|
5602
|
-
row.hint && /* @__PURE__ */
|
|
6483
|
+
row.hint && /* @__PURE__ */ jsx75("span", { className: "mt-1 block text-xs font-normal text-muted-foreground", children: row.hint })
|
|
5603
6484
|
] }),
|
|
5604
6485
|
columns.map((column, index) => {
|
|
5605
6486
|
const value = row.values[index];
|
|
5606
|
-
return /* @__PURE__ */
|
|
6487
|
+
return /* @__PURE__ */ jsx75(
|
|
5607
6488
|
"td",
|
|
5608
6489
|
{
|
|
5609
6490
|
className: cn("px-5 py-4 text-center align-middle", column.highlight && "bg-primary/5"),
|
|
5610
|
-
children: typeof value === "boolean" ? /* @__PURE__ */
|
|
5611
|
-
value ? /* @__PURE__ */
|
|
5612
|
-
/* @__PURE__ */
|
|
5613
|
-
] }) : /* @__PURE__ */
|
|
6491
|
+
children: typeof value === "boolean" ? /* @__PURE__ */ jsxs50(Fragment14, { children: [
|
|
6492
|
+
value ? /* @__PURE__ */ jsx75(CheckMark, {}) : /* @__PURE__ */ jsx75(DashMark, {}),
|
|
6493
|
+
/* @__PURE__ */ jsx75("span", { className: "sr-only", children: value ? yes : no })
|
|
6494
|
+
] }) : /* @__PURE__ */ jsx75("span", { children: value ?? "" })
|
|
5614
6495
|
},
|
|
5615
6496
|
`${row.feature}-${column.label}`
|
|
5616
6497
|
);
|
|
@@ -5621,8 +6502,8 @@ var ComparisonTable = React71.forwardRef(
|
|
|
5621
6502
|
);
|
|
5622
6503
|
|
|
5623
6504
|
// src/components/logo-cloud/LogoCloud.tsx
|
|
5624
|
-
import * as
|
|
5625
|
-
import { Fragment as
|
|
6505
|
+
import * as React76 from "react";
|
|
6506
|
+
import { Fragment as Fragment15, jsx as jsx76, jsxs as jsxs51 } from "react/jsx-runtime";
|
|
5626
6507
|
var columnClasses2 = {
|
|
5627
6508
|
3: "grid-cols-2 sm:grid-cols-3",
|
|
5628
6509
|
4: "grid-cols-2 sm:grid-cols-4",
|
|
@@ -5634,7 +6515,7 @@ var sizeClasses9 = {
|
|
|
5634
6515
|
md: "h-8",
|
|
5635
6516
|
lg: "h-12"
|
|
5636
6517
|
};
|
|
5637
|
-
var LogoCloud =
|
|
6518
|
+
var LogoCloud = React76.forwardRef(function LogoCloud2({
|
|
5638
6519
|
items,
|
|
5639
6520
|
caption,
|
|
5640
6521
|
columns = 4,
|
|
@@ -5651,8 +6532,8 @@ var LogoCloud = React72.forwardRef(function LogoCloud2({
|
|
|
5651
6532
|
sizeClasses9[size],
|
|
5652
6533
|
grayscale && "opacity-70 grayscale hover:opacity-100 hover:grayscale-0"
|
|
5653
6534
|
);
|
|
5654
|
-
return /* @__PURE__ */
|
|
5655
|
-
caption && /* @__PURE__ */
|
|
6535
|
+
return /* @__PURE__ */ jsxs51("div", { ref, className: cn("w-full", className), ...props, children: [
|
|
6536
|
+
caption && /* @__PURE__ */ jsx76(
|
|
5656
6537
|
"p",
|
|
5657
6538
|
{
|
|
5658
6539
|
className: cn(
|
|
@@ -5662,12 +6543,12 @@ var LogoCloud = React72.forwardRef(function LogoCloud2({
|
|
|
5662
6543
|
children: caption
|
|
5663
6544
|
}
|
|
5664
6545
|
),
|
|
5665
|
-
/* @__PURE__ */
|
|
5666
|
-
const content = /* @__PURE__ */
|
|
5667
|
-
/* @__PURE__ */
|
|
5668
|
-
/* @__PURE__ */
|
|
6546
|
+
/* @__PURE__ */ jsx76("ul", { className: cn("grid items-center gap-x-8 gap-y-6", columnClasses2[columns], align === "center" && "justify-items-center"), children: items.map((item) => {
|
|
6547
|
+
const content = /* @__PURE__ */ jsxs51(Fragment15, { children: [
|
|
6548
|
+
/* @__PURE__ */ jsx76("span", { className: logoClass, "aria-hidden": "true", children: item.logo }),
|
|
6549
|
+
/* @__PURE__ */ jsx76("span", { className: "sr-only", children: item.name })
|
|
5669
6550
|
] });
|
|
5670
|
-
return /* @__PURE__ */
|
|
6551
|
+
return /* @__PURE__ */ jsx76("li", { className: cn("min-w-0", align === "center" ? "justify-self-center" : "justify-self-start"), children: item.href ? /* @__PURE__ */ jsx76(
|
|
5671
6552
|
Link3,
|
|
5672
6553
|
{
|
|
5673
6554
|
href: item.href,
|
|
@@ -5680,41 +6561,41 @@ var LogoCloud = React72.forwardRef(function LogoCloud2({
|
|
|
5680
6561
|
});
|
|
5681
6562
|
|
|
5682
6563
|
// src/components/feature-grid/FeatureGrid.tsx
|
|
5683
|
-
import * as
|
|
5684
|
-
import { Fragment as
|
|
6564
|
+
import * as React77 from "react";
|
|
6565
|
+
import { Fragment as Fragment16, jsx as jsx77, jsxs as jsxs52 } from "react/jsx-runtime";
|
|
5685
6566
|
var columnClasses3 = {
|
|
5686
6567
|
2: "sm:grid-cols-2",
|
|
5687
6568
|
3: "sm:grid-cols-2 lg:grid-cols-3",
|
|
5688
6569
|
4: "sm:grid-cols-2 lg:grid-cols-4"
|
|
5689
6570
|
};
|
|
5690
|
-
var FeatureGrid =
|
|
6571
|
+
var FeatureGrid = React77.forwardRef(function FeatureGrid2({ features, columns = 3, variant = "card", align = "left", linkComponent, className, ...props }, ref) {
|
|
5691
6572
|
const Link3 = linkComponent ?? "a";
|
|
5692
6573
|
const cardClass = cn(
|
|
5693
6574
|
"group flex h-full flex-col gap-3 rounded-xl p-6",
|
|
5694
6575
|
variant === "card" && "border border-border bg-card shadow-sm transition-colors hover:border-primary/40",
|
|
5695
6576
|
align === "center" && "items-center text-center"
|
|
5696
6577
|
);
|
|
5697
|
-
const content = (feature) => /* @__PURE__ */
|
|
5698
|
-
feature.icon && /* @__PURE__ */
|
|
5699
|
-
/* @__PURE__ */
|
|
5700
|
-
feature.description && /* @__PURE__ */
|
|
5701
|
-
feature.href && feature.actionLabel && /* @__PURE__ */
|
|
6578
|
+
const content = (feature) => /* @__PURE__ */ jsxs52(Fragment16, { children: [
|
|
6579
|
+
feature.icon && /* @__PURE__ */ jsx77("span", { className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-primary/10 text-primary [&_svg]:size-5", children: feature.icon }),
|
|
6580
|
+
/* @__PURE__ */ jsx77("h3", { className: "text-base font-semibold tracking-tight", children: feature.title }),
|
|
6581
|
+
feature.description && /* @__PURE__ */ jsx77("p", { className: "text-sm leading-relaxed text-muted-foreground", children: feature.description }),
|
|
6582
|
+
feature.href && feature.actionLabel && /* @__PURE__ */ jsxs52("span", { className: "mt-auto pt-2 text-sm font-medium text-primary", children: [
|
|
5702
6583
|
feature.actionLabel,
|
|
5703
6584
|
" ",
|
|
5704
|
-
/* @__PURE__ */
|
|
6585
|
+
/* @__PURE__ */ jsx77("span", { "aria-hidden": "true", children: "\u2192" })
|
|
5705
6586
|
] })
|
|
5706
6587
|
] });
|
|
5707
|
-
return /* @__PURE__ */
|
|
6588
|
+
return /* @__PURE__ */ jsx77("ul", { ref, className: cn("grid gap-6", columnClasses3[columns], className), ...props, children: features.map((feature) => /* @__PURE__ */ jsx77("li", { className: "min-w-0", children: feature.href ? /* @__PURE__ */ jsx77(Link3, { href: feature.href, className: cn(cardClass, "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background"), children: content(feature) }) : /* @__PURE__ */ jsx77("div", { className: cardClass, children: content(feature) }) }, feature.title)) });
|
|
5708
6589
|
});
|
|
5709
6590
|
|
|
5710
6591
|
// src/components/feature-row/FeatureRow.tsx
|
|
5711
|
-
import * as
|
|
5712
|
-
import { jsx as
|
|
6592
|
+
import * as React78 from "react";
|
|
6593
|
+
import { jsx as jsx78, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
5713
6594
|
var titleSizes2 = {
|
|
5714
6595
|
md: "text-3xl",
|
|
5715
6596
|
lg: "text-3xl sm:text-4xl"
|
|
5716
6597
|
};
|
|
5717
|
-
var FeatureRow =
|
|
6598
|
+
var FeatureRow = React78.forwardRef(function FeatureRow2({
|
|
5718
6599
|
title,
|
|
5719
6600
|
description,
|
|
5720
6601
|
eyebrow,
|
|
@@ -5727,35 +6608,35 @@ var FeatureRow = React74.forwardRef(function FeatureRow2({
|
|
|
5727
6608
|
...props
|
|
5728
6609
|
}, ref) {
|
|
5729
6610
|
const Heading2 = `h${level}`;
|
|
5730
|
-
return /* @__PURE__ */
|
|
6611
|
+
return /* @__PURE__ */ jsxs53(
|
|
5731
6612
|
"div",
|
|
5732
6613
|
{
|
|
5733
6614
|
ref,
|
|
5734
6615
|
className: cn("grid items-center gap-10 lg:grid-cols-2 lg:gap-16", className),
|
|
5735
6616
|
...props,
|
|
5736
6617
|
children: [
|
|
5737
|
-
/* @__PURE__ */
|
|
5738
|
-
eyebrow && /* @__PURE__ */
|
|
5739
|
-
/* @__PURE__ */
|
|
5740
|
-
description && /* @__PURE__ */
|
|
5741
|
-
actions && /* @__PURE__ */
|
|
6618
|
+
/* @__PURE__ */ jsxs53("div", { className: cn("min-w-0", mediaPosition === "left" && "lg:order-2"), children: [
|
|
6619
|
+
eyebrow && /* @__PURE__ */ jsx78("p", { className: "mb-3 text-xs font-semibold uppercase tracking-widest text-primary", children: eyebrow }),
|
|
6620
|
+
/* @__PURE__ */ jsx78(Heading2, { className: cn("font-semibold tracking-tight text-balance", titleSizes2[size]), children: title }),
|
|
6621
|
+
description && /* @__PURE__ */ jsx78("div", { className: "mt-4 max-w-xl text-base leading-relaxed text-muted-foreground sm:text-lg", children: description }),
|
|
6622
|
+
actions && /* @__PURE__ */ jsx78("div", { className: "mt-7 flex flex-wrap items-center gap-3", children: actions })
|
|
5742
6623
|
] }),
|
|
5743
|
-
/* @__PURE__ */
|
|
6624
|
+
/* @__PURE__ */ jsx78("div", { className: cn("min-w-0", mediaPosition === "left" && "lg:order-1"), children: media })
|
|
5744
6625
|
]
|
|
5745
6626
|
}
|
|
5746
6627
|
);
|
|
5747
6628
|
});
|
|
5748
6629
|
|
|
5749
6630
|
// src/components/testimonial/Testimonial.tsx
|
|
5750
|
-
import * as
|
|
5751
|
-
import { jsx as
|
|
6631
|
+
import * as React79 from "react";
|
|
6632
|
+
import { jsx as jsx79, jsxs as jsxs54 } from "react/jsx-runtime";
|
|
5752
6633
|
var quoteSizes = {
|
|
5753
6634
|
sm: "text-base",
|
|
5754
6635
|
md: "text-lg",
|
|
5755
6636
|
lg: "text-xl sm:text-2xl"
|
|
5756
6637
|
};
|
|
5757
|
-
var Testimonial =
|
|
5758
|
-
return /* @__PURE__ */
|
|
6638
|
+
var Testimonial = React79.forwardRef(function Testimonial2({ quote, name, role, company, avatar, logo, variant = "card", size = "md", className, ...props }, ref) {
|
|
6639
|
+
return /* @__PURE__ */ jsxs54(
|
|
5759
6640
|
"figure",
|
|
5760
6641
|
{
|
|
5761
6642
|
ref,
|
|
@@ -5766,17 +6647,17 @@ var Testimonial = React75.forwardRef(function Testimonial2({ quote, name, role,
|
|
|
5766
6647
|
),
|
|
5767
6648
|
...props,
|
|
5768
6649
|
children: [
|
|
5769
|
-
logo && /* @__PURE__ */
|
|
5770
|
-
/* @__PURE__ */
|
|
6650
|
+
logo && /* @__PURE__ */ jsx79("div", { className: "flex items-center", children: logo }),
|
|
6651
|
+
/* @__PURE__ */ jsx79("blockquote", { className: cn("flex-1 leading-relaxed", quoteSizes[size]), children: /* @__PURE__ */ jsxs54("p", { children: [
|
|
5771
6652
|
"\u201C",
|
|
5772
6653
|
quote,
|
|
5773
6654
|
"\u201D"
|
|
5774
6655
|
] }) }),
|
|
5775
|
-
/* @__PURE__ */
|
|
5776
|
-
avatar && /* @__PURE__ */
|
|
5777
|
-
/* @__PURE__ */
|
|
5778
|
-
/* @__PURE__ */
|
|
5779
|
-
(role || company) && /* @__PURE__ */
|
|
6656
|
+
/* @__PURE__ */ jsxs54("figcaption", { className: "flex items-center gap-3", children: [
|
|
6657
|
+
avatar && /* @__PURE__ */ jsx79("div", { className: "shrink-0", children: avatar }),
|
|
6658
|
+
/* @__PURE__ */ jsxs54("div", { className: "min-w-0", children: [
|
|
6659
|
+
/* @__PURE__ */ jsx79("p", { className: "text-sm font-semibold", children: name }),
|
|
6660
|
+
(role || company) && /* @__PURE__ */ jsx79("p", { className: "text-xs text-muted-foreground", children: [role, company].filter(Boolean).join(", ") })
|
|
5780
6661
|
] })
|
|
5781
6662
|
] })
|
|
5782
6663
|
]
|
|
@@ -5785,23 +6666,23 @@ var Testimonial = React75.forwardRef(function Testimonial2({ quote, name, role,
|
|
|
5785
6666
|
});
|
|
5786
6667
|
|
|
5787
6668
|
// src/components/process-steps/ProcessSteps.tsx
|
|
5788
|
-
import * as
|
|
5789
|
-
import { jsx as
|
|
6669
|
+
import * as React80 from "react";
|
|
6670
|
+
import { jsx as jsx80, jsxs as jsxs55 } from "react/jsx-runtime";
|
|
5790
6671
|
var columnClasses4 = {
|
|
5791
6672
|
2: "sm:grid-cols-2",
|
|
5792
6673
|
3: "sm:grid-cols-2 lg:grid-cols-3",
|
|
5793
6674
|
4: "sm:grid-cols-2 lg:grid-cols-4"
|
|
5794
6675
|
};
|
|
5795
|
-
var ProcessSteps =
|
|
5796
|
-
return /* @__PURE__ */
|
|
6676
|
+
var ProcessSteps = React80.forwardRef(function ProcessSteps2({ steps, columns = 3, numbered = true, align = "left", className, ...props }, ref) {
|
|
6677
|
+
return /* @__PURE__ */ jsx80("ol", { ref, className: cn("grid gap-8", columnClasses4[columns], className), ...props, children: steps.map((step, index) => /* @__PURE__ */ jsxs55(
|
|
5797
6678
|
"li",
|
|
5798
6679
|
{
|
|
5799
6680
|
className: cn("flex min-w-0 flex-col gap-4", align === "center" && "items-center text-center"),
|
|
5800
6681
|
children: [
|
|
5801
|
-
/* @__PURE__ */
|
|
5802
|
-
/* @__PURE__ */
|
|
5803
|
-
/* @__PURE__ */
|
|
5804
|
-
step.description && /* @__PURE__ */
|
|
6682
|
+
/* @__PURE__ */ jsx80("span", { className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-primary/10 text-sm font-semibold text-primary [&_svg]:size-5", children: step.icon ?? (numbered ? String(index + 1).padStart(2, "0") : null) }),
|
|
6683
|
+
/* @__PURE__ */ jsxs55("div", { className: "min-w-0", children: [
|
|
6684
|
+
/* @__PURE__ */ jsx80("h3", { className: "text-base font-semibold tracking-tight", children: step.title }),
|
|
6685
|
+
step.description && /* @__PURE__ */ jsx80("p", { className: "mt-1 text-sm leading-relaxed text-muted-foreground", children: step.description })
|
|
5805
6686
|
] })
|
|
5806
6687
|
]
|
|
5807
6688
|
},
|
|
@@ -5810,9 +6691,9 @@ var ProcessSteps = React76.forwardRef(function ProcessSteps2({ steps, columns =
|
|
|
5810
6691
|
});
|
|
5811
6692
|
|
|
5812
6693
|
// src/components/article-card/ArticleCard.tsx
|
|
5813
|
-
import * as
|
|
5814
|
-
import { jsx as
|
|
5815
|
-
var ArticleCard =
|
|
6694
|
+
import * as React81 from "react";
|
|
6695
|
+
import { jsx as jsx81, jsxs as jsxs56 } from "react/jsx-runtime";
|
|
6696
|
+
var ArticleCard = React81.forwardRef(function ArticleCard2({
|
|
5816
6697
|
title,
|
|
5817
6698
|
description,
|
|
5818
6699
|
href,
|
|
@@ -5826,7 +6707,7 @@ var ArticleCard = React77.forwardRef(function ArticleCard2({
|
|
|
5826
6707
|
}, ref) {
|
|
5827
6708
|
const Link3 = linkComponent ?? "a";
|
|
5828
6709
|
const compact = variant === "compact";
|
|
5829
|
-
return /* @__PURE__ */
|
|
6710
|
+
return /* @__PURE__ */ jsx81("article", { ref, className: cn("h-full", className), ...props, children: /* @__PURE__ */ jsxs56(
|
|
5830
6711
|
Link3,
|
|
5831
6712
|
{
|
|
5832
6713
|
href,
|
|
@@ -5835,12 +6716,12 @@ var ArticleCard = React77.forwardRef(function ArticleCard2({
|
|
|
5835
6716
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background"
|
|
5836
6717
|
),
|
|
5837
6718
|
children: [
|
|
5838
|
-
media && !compact && /* @__PURE__ */
|
|
5839
|
-
/* @__PURE__ */
|
|
5840
|
-
eyebrow && /* @__PURE__ */
|
|
5841
|
-
/* @__PURE__ */
|
|
5842
|
-
description && /* @__PURE__ */
|
|
5843
|
-
meta && /* @__PURE__ */
|
|
6719
|
+
media && !compact && /* @__PURE__ */ jsx81("div", { className: "aspect-[16/10] w-full overflow-hidden bg-muted [&_img]:h-full [&_img]:w-full [&_img]:object-cover", children: media }),
|
|
6720
|
+
/* @__PURE__ */ jsxs56("div", { className: cn("flex flex-1 flex-col gap-2", compact ? "p-4" : "p-5"), children: [
|
|
6721
|
+
eyebrow && /* @__PURE__ */ jsx81("p", { className: "text-xs font-semibold uppercase tracking-widest text-primary-ink", children: eyebrow }),
|
|
6722
|
+
/* @__PURE__ */ jsx81("h3", { className: cn("font-semibold tracking-tight transition-colors group-hover:text-primary-ink", compact ? "text-base" : "text-lg"), children: title }),
|
|
6723
|
+
description && /* @__PURE__ */ jsx81("p", { className: "line-clamp-3 text-sm leading-relaxed text-muted-foreground", children: description }),
|
|
6724
|
+
meta && /* @__PURE__ */ jsx81("div", { className: "mt-auto pt-2 text-xs text-muted-foreground", children: meta })
|
|
5844
6725
|
] })
|
|
5845
6726
|
]
|
|
5846
6727
|
}
|
|
@@ -5848,9 +6729,9 @@ var ArticleCard = React77.forwardRef(function ArticleCard2({
|
|
|
5848
6729
|
});
|
|
5849
6730
|
|
|
5850
6731
|
// src/components/newsletter/Newsletter.tsx
|
|
5851
|
-
import * as
|
|
5852
|
-
import { jsx as
|
|
5853
|
-
var Newsletter =
|
|
6732
|
+
import * as React82 from "react";
|
|
6733
|
+
import { jsx as jsx82, jsxs as jsxs57 } from "react/jsx-runtime";
|
|
6734
|
+
var Newsletter = React82.forwardRef(function Newsletter2({
|
|
5854
6735
|
title,
|
|
5855
6736
|
description,
|
|
5856
6737
|
placeholder = "you@example.com",
|
|
@@ -5865,9 +6746,9 @@ var Newsletter = React78.forwardRef(function Newsletter2({
|
|
|
5865
6746
|
className,
|
|
5866
6747
|
...props
|
|
5867
6748
|
}, ref) {
|
|
5868
|
-
const id =
|
|
5869
|
-
const [email, setEmail] =
|
|
5870
|
-
const [status, setStatus] =
|
|
6749
|
+
const id = React82.useId();
|
|
6750
|
+
const [email, setEmail] = React82.useState("");
|
|
6751
|
+
const [status, setStatus] = React82.useState("idle");
|
|
5871
6752
|
const Heading2 = `h${level}`;
|
|
5872
6753
|
const handleSubmit = async (event) => {
|
|
5873
6754
|
event.preventDefault();
|
|
@@ -5881,13 +6762,13 @@ var Newsletter = React78.forwardRef(function Newsletter2({
|
|
|
5881
6762
|
setStatus("error");
|
|
5882
6763
|
}
|
|
5883
6764
|
};
|
|
5884
|
-
return /* @__PURE__ */
|
|
5885
|
-
/* @__PURE__ */
|
|
5886
|
-
description && /* @__PURE__ */
|
|
5887
|
-
/* @__PURE__ */
|
|
5888
|
-
/* @__PURE__ */
|
|
5889
|
-
/* @__PURE__ */
|
|
5890
|
-
/* @__PURE__ */
|
|
6765
|
+
return /* @__PURE__ */ jsxs57("div", { className: "w-full", children: [
|
|
6766
|
+
/* @__PURE__ */ jsx82(Heading2, { className: "text-2xl font-semibold tracking-tight", children: title }),
|
|
6767
|
+
description && /* @__PURE__ */ jsx82("p", { className: "mt-2 max-w-2xl text-sm leading-relaxed text-muted-foreground", children: description }),
|
|
6768
|
+
/* @__PURE__ */ jsxs57("form", { ref, onSubmit: handleSubmit, className: cn("mt-5", className), ...props, children: [
|
|
6769
|
+
/* @__PURE__ */ jsxs57("div", { className: cn("flex gap-2", layout === "inline" ? "flex-col sm:flex-row" : "flex-col"), children: [
|
|
6770
|
+
/* @__PURE__ */ jsx82("label", { htmlFor: id, className: "sr-only", children: label }),
|
|
6771
|
+
/* @__PURE__ */ jsx82(
|
|
5891
6772
|
Input,
|
|
5892
6773
|
{
|
|
5893
6774
|
id,
|
|
@@ -5902,44 +6783,44 @@ var Newsletter = React78.forwardRef(function Newsletter2({
|
|
|
5902
6783
|
className: "sm:flex-1"
|
|
5903
6784
|
}
|
|
5904
6785
|
),
|
|
5905
|
-
/* @__PURE__ */
|
|
6786
|
+
/* @__PURE__ */ jsx82(Button, { type: "submit", loading: status === "loading", className: "shrink-0", children: buttonLabel })
|
|
5906
6787
|
] }),
|
|
5907
|
-
consent && /* @__PURE__ */
|
|
5908
|
-
/* @__PURE__ */
|
|
5909
|
-
status === "success" && /* @__PURE__ */
|
|
5910
|
-
status === "error" && /* @__PURE__ */
|
|
6788
|
+
consent && /* @__PURE__ */ jsx82("div", { className: "mt-3 text-xs leading-relaxed text-muted-foreground", children: consent }),
|
|
6789
|
+
/* @__PURE__ */ jsxs57("div", { "aria-live": "polite", className: "mt-2 min-h-5 text-sm", children: [
|
|
6790
|
+
status === "success" && /* @__PURE__ */ jsx82("p", { className: "text-success", children: successMessage }),
|
|
6791
|
+
status === "error" && /* @__PURE__ */ jsx82("p", { role: "alert", className: "text-destructive", children: errorMessage })
|
|
5911
6792
|
] })
|
|
5912
6793
|
] })
|
|
5913
6794
|
] });
|
|
5914
6795
|
});
|
|
5915
6796
|
|
|
5916
6797
|
// src/components/contact-strip/ContactStrip.tsx
|
|
5917
|
-
import * as
|
|
5918
|
-
import { jsx as
|
|
6798
|
+
import * as React83 from "react";
|
|
6799
|
+
import { jsx as jsx83, jsxs as jsxs58 } from "react/jsx-runtime";
|
|
5919
6800
|
var columnClasses5 = {
|
|
5920
6801
|
2: "sm:grid-cols-2",
|
|
5921
6802
|
3: "sm:grid-cols-3"
|
|
5922
6803
|
};
|
|
5923
|
-
var ContactStrip =
|
|
6804
|
+
var ContactStrip = React83.forwardRef(function ContactStrip2({ items, columns = 2, align = "left", linkComponent, className, ...props }, ref) {
|
|
5924
6805
|
const Link3 = linkComponent ?? "a";
|
|
5925
|
-
return /* @__PURE__ */
|
|
5926
|
-
item.icon && /* @__PURE__ */
|
|
5927
|
-
/* @__PURE__ */
|
|
5928
|
-
/* @__PURE__ */
|
|
5929
|
-
item.href ? /* @__PURE__ */
|
|
6806
|
+
return /* @__PURE__ */ jsx83("ul", { ref, className: cn("grid gap-6", columnClasses5[columns], className), ...props, children: items.map((item) => /* @__PURE__ */ jsxs58("li", { className: cn("flex min-w-0 items-start gap-3", align === "center" && "justify-center text-center"), children: [
|
|
6807
|
+
item.icon && /* @__PURE__ */ jsx83("span", { className: "mt-0.5 flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-primary/10 text-primary [&_svg]:size-4", children: item.icon }),
|
|
6808
|
+
/* @__PURE__ */ jsxs58("div", { className: "min-w-0", children: [
|
|
6809
|
+
/* @__PURE__ */ jsx83("p", { className: "text-xs font-semibold uppercase tracking-wider text-muted-foreground", children: item.label }),
|
|
6810
|
+
item.href ? /* @__PURE__ */ jsx83(Link3, { href: item.href, className: "mt-0.5 block break-words text-sm font-medium text-primary underline-offset-4 hover:underline", children: item.value }) : /* @__PURE__ */ jsx83("p", { className: "mt-0.5 break-words text-sm font-medium", children: item.value })
|
|
5930
6811
|
] })
|
|
5931
6812
|
] }, item.label)) });
|
|
5932
6813
|
});
|
|
5933
6814
|
|
|
5934
6815
|
// src/components/announcement-bar/AnnouncementBar.tsx
|
|
5935
|
-
import * as
|
|
5936
|
-
import { jsx as
|
|
6816
|
+
import * as React84 from "react";
|
|
6817
|
+
import { jsx as jsx84, jsxs as jsxs59 } from "react/jsx-runtime";
|
|
5937
6818
|
var toneClasses3 = {
|
|
5938
6819
|
muted: "bg-muted text-foreground",
|
|
5939
6820
|
brand: "bg-primary text-primary-foreground",
|
|
5940
6821
|
inverse: "bg-inverse text-inverse-foreground"
|
|
5941
6822
|
};
|
|
5942
|
-
var AnnouncementBar =
|
|
6823
|
+
var AnnouncementBar = React84.forwardRef(
|
|
5943
6824
|
function AnnouncementBar2({
|
|
5944
6825
|
message,
|
|
5945
6826
|
href,
|
|
@@ -5952,14 +6833,14 @@ var AnnouncementBar = React80.forwardRef(
|
|
|
5952
6833
|
className,
|
|
5953
6834
|
...props
|
|
5954
6835
|
}, ref) {
|
|
5955
|
-
const [dismissed, setDismissed] =
|
|
6836
|
+
const [dismissed, setDismissed] = React84.useState(false);
|
|
5956
6837
|
const Link3 = linkComponent ?? "a";
|
|
5957
6838
|
if (dismissed) return null;
|
|
5958
6839
|
const dismiss2 = () => {
|
|
5959
6840
|
setDismissed(true);
|
|
5960
6841
|
onDismiss?.();
|
|
5961
6842
|
};
|
|
5962
|
-
return /* @__PURE__ */
|
|
6843
|
+
return /* @__PURE__ */ jsx84(
|
|
5963
6844
|
"div",
|
|
5964
6845
|
{
|
|
5965
6846
|
ref,
|
|
@@ -5972,9 +6853,9 @@ var AnnouncementBar = React80.forwardRef(
|
|
|
5972
6853
|
className
|
|
5973
6854
|
),
|
|
5974
6855
|
...props,
|
|
5975
|
-
children: /* @__PURE__ */
|
|
5976
|
-
/* @__PURE__ */
|
|
5977
|
-
href && actionLabel && /* @__PURE__ */
|
|
6856
|
+
children: /* @__PURE__ */ jsxs59("div", { className: "mx-auto flex w-full max-w-7xl items-center justify-center gap-3 px-4 py-2 text-sm sm:px-6", children: [
|
|
6857
|
+
/* @__PURE__ */ jsx84("p", { className: "min-w-0 text-center", children: message }),
|
|
6858
|
+
href && actionLabel && /* @__PURE__ */ jsx84(
|
|
5978
6859
|
Link3,
|
|
5979
6860
|
{
|
|
5980
6861
|
href,
|
|
@@ -5982,14 +6863,14 @@ var AnnouncementBar = React80.forwardRef(
|
|
|
5982
6863
|
children: actionLabel
|
|
5983
6864
|
}
|
|
5984
6865
|
),
|
|
5985
|
-
dismissible && /* @__PURE__ */
|
|
6866
|
+
dismissible && /* @__PURE__ */ jsx84(
|
|
5986
6867
|
"button",
|
|
5987
6868
|
{
|
|
5988
6869
|
type: "button",
|
|
5989
6870
|
onClick: dismiss2,
|
|
5990
6871
|
"aria-label": "Dismiss announcement",
|
|
5991
6872
|
className: "shrink-0 rounded p-1 opacity-70 transition-opacity hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-current",
|
|
5992
|
-
children: /* @__PURE__ */
|
|
6873
|
+
children: /* @__PURE__ */ jsx84("svg", { "aria-hidden": "true", viewBox: "0 0 20 20", className: "h-4 w-4", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", children: /* @__PURE__ */ jsx84("path", { d: "m5 5 10 10M15 5 5 15" }) })
|
|
5993
6874
|
}
|
|
5994
6875
|
)
|
|
5995
6876
|
] })
|
|
@@ -5999,15 +6880,15 @@ var AnnouncementBar = React80.forwardRef(
|
|
|
5999
6880
|
);
|
|
6000
6881
|
|
|
6001
6882
|
// src/components/deal-card/DealCard.tsx
|
|
6002
|
-
import * as
|
|
6003
|
-
import { jsx as
|
|
6883
|
+
import * as React85 from "react";
|
|
6884
|
+
import { jsx as jsx85, jsxs as jsxs60 } from "react/jsx-runtime";
|
|
6004
6885
|
var statusConfig = {
|
|
6005
6886
|
available: { label: "Available", variant: "success" },
|
|
6006
6887
|
"under-nda": { label: "Under NDA", variant: "info" },
|
|
6007
6888
|
closed: { label: "Closed", variant: "secondary" },
|
|
6008
6889
|
draft: { label: "Draft", variant: "outline" }
|
|
6009
6890
|
};
|
|
6010
|
-
var DealCard =
|
|
6891
|
+
var DealCard = React85.forwardRef(function DealCard2({
|
|
6011
6892
|
title,
|
|
6012
6893
|
sector,
|
|
6013
6894
|
location,
|
|
@@ -6028,29 +6909,29 @@ var DealCard = React81.forwardRef(function DealCard2({
|
|
|
6028
6909
|
}, ref) {
|
|
6029
6910
|
const Link3 = linkComponent ?? "a";
|
|
6030
6911
|
const statusInfo = statusConfig[status];
|
|
6031
|
-
return /* @__PURE__ */
|
|
6032
|
-
/* @__PURE__ */
|
|
6033
|
-
/* @__PURE__ */
|
|
6034
|
-
/* @__PURE__ */
|
|
6035
|
-
/* @__PURE__ */
|
|
6912
|
+
return /* @__PURE__ */ jsxs60(Card, { ref, className: cn("flex h-full flex-col overflow-hidden", className), ...props, children: [
|
|
6913
|
+
/* @__PURE__ */ jsxs60(CardHeader, { className: "gap-2 p-5 pb-3", children: [
|
|
6914
|
+
/* @__PURE__ */ jsxs60("div", { className: "flex items-start justify-between gap-2", children: [
|
|
6915
|
+
/* @__PURE__ */ jsx85("p", { className: "text-xs font-semibold uppercase tracking-widest text-primary", children: sector }),
|
|
6916
|
+
/* @__PURE__ */ jsx85(Badge, { variant: statusInfo.variant, children: statusInfo.label })
|
|
6036
6917
|
] }),
|
|
6037
|
-
/* @__PURE__ */
|
|
6038
|
-
location && /* @__PURE__ */
|
|
6918
|
+
/* @__PURE__ */ jsx85("h3", { className: "text-lg font-semibold leading-snug tracking-tight", children: href ? /* @__PURE__ */ jsx85(Link3, { href, className: "rounded-sm hover:text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", children: title }) : title }),
|
|
6919
|
+
location && /* @__PURE__ */ jsx85("p", { className: "text-xs text-muted-foreground", children: location })
|
|
6039
6920
|
] }),
|
|
6040
|
-
/* @__PURE__ */
|
|
6041
|
-
description && /* @__PURE__ */
|
|
6042
|
-
/* @__PURE__ */
|
|
6043
|
-
/* @__PURE__ */
|
|
6044
|
-
/* @__PURE__ */
|
|
6921
|
+
/* @__PURE__ */ jsxs60(CardContent, { className: "flex-1 px-5 pb-3", children: [
|
|
6922
|
+
description && /* @__PURE__ */ jsx85("p", { className: "line-clamp-2 text-sm leading-relaxed text-muted-foreground", children: description }),
|
|
6923
|
+
/* @__PURE__ */ jsx85("dl", { className: "mt-4 grid grid-cols-3 gap-3", children: metrics.map((metric) => /* @__PURE__ */ jsxs60("div", { className: "min-w-0", children: [
|
|
6924
|
+
/* @__PURE__ */ jsx85("dt", { className: "text-xs text-muted-foreground", children: metric.label }),
|
|
6925
|
+
/* @__PURE__ */ jsx85("dd", { className: "mt-0.5 truncate text-sm font-semibold tabular-nums", children: metric.value })
|
|
6045
6926
|
] }, metric.label)) }),
|
|
6046
|
-
(ndaAvailable || cimAvailable) && /* @__PURE__ */
|
|
6047
|
-
ndaAvailable && /* @__PURE__ */
|
|
6048
|
-
cimAvailable && /* @__PURE__ */
|
|
6927
|
+
(ndaAvailable || cimAvailable) && /* @__PURE__ */ jsxs60("div", { className: "mt-4 flex flex-wrap gap-1.5", children: [
|
|
6928
|
+
ndaAvailable && /* @__PURE__ */ jsx85(Badge, { variant: "info", children: "NDA available" }),
|
|
6929
|
+
cimAvailable && /* @__PURE__ */ jsx85(Badge, { variant: "secondary", children: "CIM available" })
|
|
6049
6930
|
] })
|
|
6050
6931
|
] }),
|
|
6051
|
-
/* @__PURE__ */
|
|
6052
|
-
onRequestAccess && /* @__PURE__ */
|
|
6053
|
-
onSave && /* @__PURE__ */
|
|
6932
|
+
/* @__PURE__ */ jsxs60(CardFooter, { className: "flex flex-wrap items-center gap-2 border-t border-border px-5 py-3", children: [
|
|
6933
|
+
onRequestAccess && /* @__PURE__ */ jsx85(Button, { type: "button", size: "sm", onClick: onRequestAccess, children: requestLabel }),
|
|
6934
|
+
onSave && /* @__PURE__ */ jsx85(
|
|
6054
6935
|
Button,
|
|
6055
6936
|
{
|
|
6056
6937
|
type: "button",
|
|
@@ -6067,12 +6948,12 @@ var DealCard = React81.forwardRef(function DealCard2({
|
|
|
6067
6948
|
});
|
|
6068
6949
|
|
|
6069
6950
|
// src/components/entity-card/EntityCard.tsx
|
|
6070
|
-
import * as
|
|
6071
|
-
import { jsx as
|
|
6951
|
+
import * as React86 from "react";
|
|
6952
|
+
import { jsx as jsx86, jsxs as jsxs61 } from "react/jsx-runtime";
|
|
6072
6953
|
function initials(name) {
|
|
6073
6954
|
return name.split(/\s+/).filter(Boolean).slice(0, 2).map((part) => part[0]?.toUpperCase() ?? "").join("");
|
|
6074
6955
|
}
|
|
6075
|
-
var EntityCard =
|
|
6956
|
+
var EntityCard = React86.forwardRef(function EntityCard2({
|
|
6076
6957
|
name,
|
|
6077
6958
|
entityType,
|
|
6078
6959
|
location,
|
|
@@ -6087,25 +6968,25 @@ var EntityCard = React82.forwardRef(function EntityCard2({
|
|
|
6087
6968
|
...props
|
|
6088
6969
|
}, ref) {
|
|
6089
6970
|
const Link3 = linkComponent ?? "a";
|
|
6090
|
-
return /* @__PURE__ */
|
|
6091
|
-
/* @__PURE__ */
|
|
6092
|
-
/* @__PURE__ */
|
|
6093
|
-
/* @__PURE__ */
|
|
6094
|
-
/* @__PURE__ */
|
|
6095
|
-
/* @__PURE__ */
|
|
6096
|
-
location && /* @__PURE__ */
|
|
6971
|
+
return /* @__PURE__ */ jsxs61(Card, { ref, className: cn("flex h-full flex-col", className), ...props, children: [
|
|
6972
|
+
/* @__PURE__ */ jsxs61(CardHeader, { className: "flex-row items-start gap-3 p-5 pb-3", children: [
|
|
6973
|
+
/* @__PURE__ */ jsx86("div", { className: "shrink-0", children: logo ?? /* @__PURE__ */ jsx86(Avatar, { children: /* @__PURE__ */ jsx86(AvatarFallback, { children: initials(name) }) }) }),
|
|
6974
|
+
/* @__PURE__ */ jsxs61("div", { className: "min-w-0 flex-1", children: [
|
|
6975
|
+
/* @__PURE__ */ jsx86("h3", { className: "truncate text-base font-semibold tracking-tight", children: href ? /* @__PURE__ */ jsx86(Link3, { href, className: "rounded-sm hover:text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", children: name }) : name }),
|
|
6976
|
+
/* @__PURE__ */ jsx86("p", { className: "mt-0.5 truncate text-xs text-muted-foreground", children: entityType }),
|
|
6977
|
+
location && /* @__PURE__ */ jsx86("p", { className: "mt-0.5 truncate text-xs text-muted-foreground", children: location })
|
|
6097
6978
|
] })
|
|
6098
6979
|
] }),
|
|
6099
|
-
/* @__PURE__ */
|
|
6100
|
-
description && /* @__PURE__ */
|
|
6101
|
-
tags && tags.length > 0 && /* @__PURE__ */
|
|
6102
|
-
stats && stats.length > 0 && /* @__PURE__ */
|
|
6103
|
-
/* @__PURE__ */
|
|
6104
|
-
/* @__PURE__ */
|
|
6980
|
+
/* @__PURE__ */ jsxs61(CardContent, { className: "flex-1 px-5 pb-3", children: [
|
|
6981
|
+
description && /* @__PURE__ */ jsx86("p", { className: "line-clamp-3 text-sm leading-relaxed text-muted-foreground", children: description }),
|
|
6982
|
+
tags && tags.length > 0 && /* @__PURE__ */ jsx86("div", { className: "mt-3 flex flex-wrap gap-1.5", children: tags.map((tag) => /* @__PURE__ */ jsx86(Badge, { variant: "secondary", children: tag }, tag)) }),
|
|
6983
|
+
stats && stats.length > 0 && /* @__PURE__ */ jsx86("dl", { className: "mt-4 grid grid-cols-2 gap-3", children: stats.map((stat) => /* @__PURE__ */ jsxs61("div", { className: "min-w-0", children: [
|
|
6984
|
+
/* @__PURE__ */ jsx86("dt", { className: "text-xs text-muted-foreground", children: stat.label }),
|
|
6985
|
+
/* @__PURE__ */ jsx86("dd", { className: "mt-0.5 truncate text-sm font-semibold tabular-nums", children: stat.value })
|
|
6105
6986
|
] }, stat.label)) })
|
|
6106
6987
|
] }),
|
|
6107
|
-
(href || actions) && /* @__PURE__ */
|
|
6108
|
-
href && /* @__PURE__ */
|
|
6988
|
+
(href || actions) && /* @__PURE__ */ jsxs61(CardFooter, { className: "flex flex-wrap items-center gap-2 border-t border-border px-5 py-3", children: [
|
|
6989
|
+
href && /* @__PURE__ */ jsx86(
|
|
6109
6990
|
Link3,
|
|
6110
6991
|
{
|
|
6111
6992
|
href,
|
|
@@ -6113,21 +6994,21 @@ var EntityCard = React82.forwardRef(function EntityCard2({
|
|
|
6113
6994
|
children: "View profile"
|
|
6114
6995
|
}
|
|
6115
6996
|
),
|
|
6116
|
-
actions && /* @__PURE__ */
|
|
6997
|
+
actions && /* @__PURE__ */ jsx86("div", { className: "ml-auto flex items-center gap-2", children: actions })
|
|
6117
6998
|
] })
|
|
6118
6999
|
] });
|
|
6119
7000
|
});
|
|
6120
7001
|
var ProfileCard = EntityCard;
|
|
6121
7002
|
|
|
6122
7003
|
// src/components/tombstone-card/TombstoneCard.tsx
|
|
6123
|
-
import * as
|
|
6124
|
-
import { jsx as
|
|
7004
|
+
import * as React87 from "react";
|
|
7005
|
+
import { jsx as jsx87, jsxs as jsxs62 } from "react/jsx-runtime";
|
|
6125
7006
|
var statusConfig2 = {
|
|
6126
7007
|
archived: { label: "Archived", variant: "secondary" },
|
|
6127
7008
|
unavailable: { label: "Unavailable", variant: "warning" },
|
|
6128
7009
|
closed: { label: "Closed", variant: "outline" }
|
|
6129
7010
|
};
|
|
6130
|
-
var TombstoneCard =
|
|
7011
|
+
var TombstoneCard = React87.forwardRef(function TombstoneCard2({
|
|
6131
7012
|
title,
|
|
6132
7013
|
reason,
|
|
6133
7014
|
status = "unavailable",
|
|
@@ -6140,20 +7021,20 @@ var TombstoneCard = React83.forwardRef(function TombstoneCard2({
|
|
|
6140
7021
|
}, ref) {
|
|
6141
7022
|
const Link3 = linkComponent ?? "a";
|
|
6142
7023
|
const statusInfo = statusConfig2[status];
|
|
6143
|
-
return /* @__PURE__ */
|
|
7024
|
+
return /* @__PURE__ */ jsx87(
|
|
6144
7025
|
Card,
|
|
6145
7026
|
{
|
|
6146
7027
|
ref,
|
|
6147
7028
|
className: cn("flex h-full flex-col border-dashed bg-muted/30 shadow-none", className),
|
|
6148
7029
|
...props,
|
|
6149
|
-
children: /* @__PURE__ */
|
|
6150
|
-
/* @__PURE__ */
|
|
6151
|
-
logo && /* @__PURE__ */
|
|
6152
|
-
/* @__PURE__ */
|
|
7030
|
+
children: /* @__PURE__ */ jsxs62(CardContent, { className: "flex flex-1 flex-col gap-3 p-5", children: [
|
|
7031
|
+
/* @__PURE__ */ jsxs62("div", { className: "flex items-start justify-between gap-2", children: [
|
|
7032
|
+
logo && /* @__PURE__ */ jsx87("div", { className: "min-w-0 opacity-70", children: logo }),
|
|
7033
|
+
/* @__PURE__ */ jsx87(Badge, { variant: statusInfo.variant, children: statusInfo.label })
|
|
6153
7034
|
] }),
|
|
6154
|
-
/* @__PURE__ */
|
|
6155
|
-
reason && /* @__PURE__ */
|
|
6156
|
-
href && /* @__PURE__ */
|
|
7035
|
+
/* @__PURE__ */ jsx87("h3", { className: "text-base font-semibold tracking-tight text-foreground/80", children: title }),
|
|
7036
|
+
reason && /* @__PURE__ */ jsx87("p", { className: "text-sm leading-relaxed text-muted-foreground", children: reason }),
|
|
7037
|
+
href && /* @__PURE__ */ jsx87(
|
|
6157
7038
|
Link3,
|
|
6158
7039
|
{
|
|
6159
7040
|
href,
|
|
@@ -6167,14 +7048,14 @@ var TombstoneCard = React83.forwardRef(function TombstoneCard2({
|
|
|
6167
7048
|
});
|
|
6168
7049
|
|
|
6169
7050
|
// src/components/document-card/DocumentCard.tsx
|
|
6170
|
-
import * as
|
|
6171
|
-
import { jsx as
|
|
7051
|
+
import * as React88 from "react";
|
|
7052
|
+
import { jsx as jsx88, jsxs as jsxs63 } from "react/jsx-runtime";
|
|
6172
7053
|
var statusConfig3 = {
|
|
6173
7054
|
available: { label: "Available", variant: "success" },
|
|
6174
7055
|
restricted: { label: "Restricted", variant: "warning" },
|
|
6175
7056
|
pending: { label: "Pending", variant: "info" }
|
|
6176
7057
|
};
|
|
6177
|
-
var DocumentCard =
|
|
7058
|
+
var DocumentCard = React88.forwardRef(function DocumentCard2({
|
|
6178
7059
|
name,
|
|
6179
7060
|
fileType,
|
|
6180
7061
|
size,
|
|
@@ -6188,14 +7069,14 @@ var DocumentCard = React84.forwardRef(function DocumentCard2({
|
|
|
6188
7069
|
}, ref) {
|
|
6189
7070
|
const statusInfo = statusConfig3[status];
|
|
6190
7071
|
const meta = [fileType, size, updatedAt].filter(Boolean).join(" \xB7 ");
|
|
6191
|
-
return /* @__PURE__ */
|
|
6192
|
-
/* @__PURE__ */
|
|
6193
|
-
/* @__PURE__ */
|
|
6194
|
-
/* @__PURE__ */
|
|
6195
|
-
meta && /* @__PURE__ */
|
|
7072
|
+
return /* @__PURE__ */ jsx88(Card, { ref, className: cn("w-full", className), ...props, children: /* @__PURE__ */ jsxs63(CardContent, { className: "flex items-center gap-3 p-4", children: [
|
|
7073
|
+
/* @__PURE__ */ jsx88("span", { className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-primary/10 text-primary [&_svg]:size-5", children: icon ?? /* @__PURE__ */ jsx88("span", { className: "text-[10px] font-bold uppercase tracking-wide", children: fileType }) }),
|
|
7074
|
+
/* @__PURE__ */ jsxs63("div", { className: "min-w-0 flex-1", children: [
|
|
7075
|
+
/* @__PURE__ */ jsx88("p", { className: "truncate text-sm font-medium", children: name }),
|
|
7076
|
+
meta && /* @__PURE__ */ jsx88("p", { className: "mt-0.5 truncate text-xs text-muted-foreground", children: meta })
|
|
6196
7077
|
] }),
|
|
6197
|
-
/* @__PURE__ */
|
|
6198
|
-
onDownload && /* @__PURE__ */
|
|
7078
|
+
/* @__PURE__ */ jsx88(Badge, { variant: statusInfo.variant, children: statusInfo.label }),
|
|
7079
|
+
onDownload && /* @__PURE__ */ jsx88(
|
|
6199
7080
|
Button,
|
|
6200
7081
|
{
|
|
6201
7082
|
type: "button",
|
|
@@ -6211,9 +7092,9 @@ var DocumentCard = React84.forwardRef(function DocumentCard2({
|
|
|
6211
7092
|
});
|
|
6212
7093
|
|
|
6213
7094
|
// src/components/load-more/LoadMore.tsx
|
|
6214
|
-
import * as
|
|
6215
|
-
import { jsx as
|
|
6216
|
-
var LoadMore =
|
|
7095
|
+
import * as React89 from "react";
|
|
7096
|
+
import { jsx as jsx89 } from "react/jsx-runtime";
|
|
7097
|
+
var LoadMore = React89.forwardRef(function LoadMore2({
|
|
6217
7098
|
hasMore,
|
|
6218
7099
|
onLoadMore,
|
|
6219
7100
|
loading = false,
|
|
@@ -6223,18 +7104,18 @@ var LoadMore = React85.forwardRef(function LoadMore2({
|
|
|
6223
7104
|
className,
|
|
6224
7105
|
...props
|
|
6225
7106
|
}, ref) {
|
|
6226
|
-
return /* @__PURE__ */
|
|
7107
|
+
return /* @__PURE__ */ jsx89("div", { ref, "aria-live": "polite", className: cn("flex w-full justify-center py-4", className), ...props, children: hasMore ? /* @__PURE__ */ jsx89(Button, { type: "button", variant: "outline", onClick: onLoadMore, loading, children: loading ? loadingLabel : loadLabel }) : /* @__PURE__ */ jsx89("p", { role: "status", className: "text-sm text-muted-foreground", children: endLabel }) });
|
|
6227
7108
|
});
|
|
6228
7109
|
|
|
6229
7110
|
// src/components/segmented-control/SegmentedControl.tsx
|
|
6230
|
-
import * as
|
|
6231
|
-
import { jsx as
|
|
7111
|
+
import * as React90 from "react";
|
|
7112
|
+
import { jsx as jsx90, jsxs as jsxs64 } from "react/jsx-runtime";
|
|
6232
7113
|
var sizeClasses10 = {
|
|
6233
7114
|
sm: "h-8 px-2.5 text-xs",
|
|
6234
7115
|
md: "h-9 px-3 text-sm",
|
|
6235
7116
|
lg: "h-10 px-4 text-sm"
|
|
6236
7117
|
};
|
|
6237
|
-
var SegmentedControl =
|
|
7118
|
+
var SegmentedControl = React90.forwardRef(
|
|
6238
7119
|
function SegmentedControl2({
|
|
6239
7120
|
options,
|
|
6240
7121
|
value,
|
|
@@ -6248,12 +7129,12 @@ var SegmentedControl = React86.forwardRef(
|
|
|
6248
7129
|
...props
|
|
6249
7130
|
}, ref) {
|
|
6250
7131
|
const isControlled = value !== void 0;
|
|
6251
|
-
const [internal, setInternal] =
|
|
7132
|
+
const [internal, setInternal] = React90.useState(
|
|
6252
7133
|
() => multiple ? Array.isArray(defaultValue) ? defaultValue : [] : typeof defaultValue === "string" ? defaultValue : ""
|
|
6253
7134
|
);
|
|
6254
7135
|
const current = isControlled ? value : internal;
|
|
6255
7136
|
const selected = multiple ? Array.isArray(current) ? current : [] : typeof current === "string" ? current : "";
|
|
6256
|
-
const refs =
|
|
7137
|
+
const refs = React90.useRef([]);
|
|
6257
7138
|
const commit = (next) => {
|
|
6258
7139
|
if (!isControlled) setInternal(next);
|
|
6259
7140
|
onValueChange?.(next);
|
|
@@ -6303,7 +7184,7 @@ var SegmentedControl = React86.forwardRef(
|
|
|
6303
7184
|
moveFocus("last");
|
|
6304
7185
|
}
|
|
6305
7186
|
};
|
|
6306
|
-
return /* @__PURE__ */
|
|
7187
|
+
return /* @__PURE__ */ jsx90(
|
|
6307
7188
|
"div",
|
|
6308
7189
|
{
|
|
6309
7190
|
ref,
|
|
@@ -6319,7 +7200,7 @@ var SegmentedControl = React86.forwardRef(
|
|
|
6319
7200
|
const active = multiple ? Array.isArray(selected) && selected.includes(option.value) : selected === option.value;
|
|
6320
7201
|
const firstEnabled = options.findIndex((entry) => !entry.disabled);
|
|
6321
7202
|
const focusable = multiple || active || !selected && index === firstEnabled;
|
|
6322
|
-
return /* @__PURE__ */
|
|
7203
|
+
return /* @__PURE__ */ jsxs64(
|
|
6323
7204
|
"button",
|
|
6324
7205
|
{
|
|
6325
7206
|
ref: (node) => {
|
|
@@ -6342,8 +7223,8 @@ var SegmentedControl = React86.forwardRef(
|
|
|
6342
7223
|
active ? "bg-background text-foreground shadow-sm" : "text-muted-foreground hover:text-foreground"
|
|
6343
7224
|
),
|
|
6344
7225
|
children: [
|
|
6345
|
-
option.icon && /* @__PURE__ */
|
|
6346
|
-
/* @__PURE__ */
|
|
7226
|
+
option.icon && /* @__PURE__ */ jsx90("span", { className: "shrink-0 [&_svg]:size-4", children: option.icon }),
|
|
7227
|
+
/* @__PURE__ */ jsx90("span", { className: "truncate", children: option.label })
|
|
6347
7228
|
]
|
|
6348
7229
|
},
|
|
6349
7230
|
option.value
|
|
@@ -6355,18 +7236,18 @@ var SegmentedControl = React86.forwardRef(
|
|
|
6355
7236
|
);
|
|
6356
7237
|
|
|
6357
7238
|
// src/components/range-slider/RangeSlider.tsx
|
|
6358
|
-
import * as
|
|
6359
|
-
import { jsx as
|
|
7239
|
+
import * as React91 from "react";
|
|
7240
|
+
import { jsx as jsx91, jsxs as jsxs65 } from "react/jsx-runtime";
|
|
6360
7241
|
var rangeInputClass = cn(
|
|
6361
7242
|
"pointer-events-none absolute inset-x-0 top-1/2 h-6 w-full -translate-y-1/2 appearance-none bg-transparent",
|
|
6362
7243
|
"[&::-webkit-slider-runnable-track]:h-1 [&::-webkit-slider-runnable-track]:rounded-full [&::-webkit-slider-runnable-track]:bg-transparent",
|
|
6363
|
-
"[&::-webkit-slider-thumb]:pointer-events-auto [&::-webkit-slider-thumb]:mt-[-6px] [&::-webkit-slider-thumb]:h-4 [&::-webkit-slider-thumb]:w-4 [&::-webkit-slider-thumb]:cursor-grab [&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:border-2 [&::-webkit-slider-thumb]:border-
|
|
7244
|
+
"[&::-webkit-slider-thumb]:pointer-events-auto [&::-webkit-slider-thumb]:mt-[-6px] [&::-webkit-slider-thumb]:h-4 [&::-webkit-slider-thumb]:w-4 [&::-webkit-slider-thumb]:cursor-grab [&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:border-2 [&::-webkit-slider-thumb]:border-background [&::-webkit-slider-thumb]:bg-primary [&::-webkit-slider-thumb]:shadow-md",
|
|
6364
7245
|
"[&::-moz-range-track]:h-1 [&::-moz-range-track]:rounded-full [&::-moz-range-track]:bg-transparent",
|
|
6365
|
-
"[&::-moz-range-thumb]:pointer-events-auto [&::-moz-range-thumb]:h-4 [&::-moz-range-thumb]:w-4 [&::-moz-range-thumb]:cursor-grab [&::-moz-range-thumb]:rounded-full [&::-moz-range-thumb]:border-2 [&::-moz-range-thumb]:border-
|
|
7246
|
+
"[&::-moz-range-thumb]:pointer-events-auto [&::-moz-range-thumb]:h-4 [&::-moz-range-thumb]:w-4 [&::-moz-range-thumb]:cursor-grab [&::-moz-range-thumb]:rounded-full [&::-moz-range-thumb]:border-2 [&::-moz-range-thumb]:border-background [&::-moz-range-thumb]:bg-primary [&::-moz-range-thumb]:shadow-md",
|
|
6366
7247
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
|
|
6367
7248
|
"disabled:cursor-not-allowed disabled:opacity-50"
|
|
6368
7249
|
);
|
|
6369
|
-
var RangeSlider =
|
|
7250
|
+
var RangeSlider = React91.forwardRef(function RangeSlider2({
|
|
6370
7251
|
value,
|
|
6371
7252
|
defaultValue,
|
|
6372
7253
|
onValueChange,
|
|
@@ -6381,14 +7262,14 @@ var RangeSlider = React87.forwardRef(function RangeSlider2({
|
|
|
6381
7262
|
className,
|
|
6382
7263
|
...props
|
|
6383
7264
|
}, ref) {
|
|
6384
|
-
const
|
|
6385
|
-
const [internal, setInternal] =
|
|
7265
|
+
const clamp2 = (entry) => Math.min(Math.max(entry, min), max);
|
|
7266
|
+
const [internal, setInternal] = React91.useState(() => {
|
|
6386
7267
|
const initial = defaultValue ?? [min, max];
|
|
6387
|
-
return [
|
|
7268
|
+
return [clamp2(initial[0]), clamp2(initial[1])];
|
|
6388
7269
|
});
|
|
6389
7270
|
const current = value ?? internal;
|
|
6390
|
-
const low = Math.min(
|
|
6391
|
-
const high = Math.max(
|
|
7271
|
+
const low = Math.min(clamp2(current[0]), clamp2(current[1]));
|
|
7272
|
+
const high = Math.max(clamp2(current[0]), clamp2(current[1]));
|
|
6392
7273
|
const commit = (next) => {
|
|
6393
7274
|
if (value === void 0) setInternal(next);
|
|
6394
7275
|
onValueChange?.(next);
|
|
@@ -6396,21 +7277,21 @@ var RangeSlider = React87.forwardRef(function RangeSlider2({
|
|
|
6396
7277
|
const span = max - min || 1;
|
|
6397
7278
|
const lowPercent = (low - min) / span * 100;
|
|
6398
7279
|
const highPercent = (high - min) / span * 100;
|
|
6399
|
-
return /* @__PURE__ */
|
|
6400
|
-
showValues && /* @__PURE__ */
|
|
6401
|
-
/* @__PURE__ */
|
|
6402
|
-
/* @__PURE__ */
|
|
7280
|
+
return /* @__PURE__ */ jsxs65("div", { ref, className: cn("w-full", className), ...props, children: [
|
|
7281
|
+
showValues && /* @__PURE__ */ jsxs65("div", { className: "mb-2 flex items-center justify-between text-sm font-medium tabular-nums", children: [
|
|
7282
|
+
/* @__PURE__ */ jsx91("span", { children: formatValue(low) }),
|
|
7283
|
+
/* @__PURE__ */ jsx91("span", { children: formatValue(high) })
|
|
6403
7284
|
] }),
|
|
6404
|
-
/* @__PURE__ */
|
|
6405
|
-
/* @__PURE__ */
|
|
6406
|
-
/* @__PURE__ */
|
|
7285
|
+
/* @__PURE__ */ jsxs65("div", { className: "relative h-6 w-full", children: [
|
|
7286
|
+
/* @__PURE__ */ jsx91("div", { className: "absolute inset-x-0 top-1/2 h-1 -translate-y-1/2 rounded-full bg-border" }),
|
|
7287
|
+
/* @__PURE__ */ jsx91(
|
|
6407
7288
|
"div",
|
|
6408
7289
|
{
|
|
6409
7290
|
className: "absolute top-1/2 h-1 -translate-y-1/2 rounded-full bg-primary",
|
|
6410
7291
|
style: { left: `${lowPercent}%`, right: `${100 - highPercent}%` }
|
|
6411
7292
|
}
|
|
6412
7293
|
),
|
|
6413
|
-
/* @__PURE__ */
|
|
7294
|
+
/* @__PURE__ */ jsx91(
|
|
6414
7295
|
"input",
|
|
6415
7296
|
{
|
|
6416
7297
|
type: "range",
|
|
@@ -6425,7 +7306,7 @@ var RangeSlider = React87.forwardRef(function RangeSlider2({
|
|
|
6425
7306
|
className: cn(rangeInputClass, "z-10")
|
|
6426
7307
|
}
|
|
6427
7308
|
),
|
|
6428
|
-
/* @__PURE__ */
|
|
7309
|
+
/* @__PURE__ */ jsx91(
|
|
6429
7310
|
"input",
|
|
6430
7311
|
{
|
|
6431
7312
|
type: "range",
|
|
@@ -6445,10 +7326,31 @@ var RangeSlider = React87.forwardRef(function RangeSlider2({
|
|
|
6445
7326
|
});
|
|
6446
7327
|
|
|
6447
7328
|
// src/components/filter-chips/FilterChips.tsx
|
|
6448
|
-
import * as
|
|
6449
|
-
import { jsx as
|
|
6450
|
-
var
|
|
7329
|
+
import * as React92 from "react";
|
|
7330
|
+
import { jsx as jsx92, jsxs as jsxs66 } from "react/jsx-runtime";
|
|
7331
|
+
var CHIP_SIZES = {
|
|
7332
|
+
sm: {
|
|
7333
|
+
chip: "gap-1 py-0.5 pl-2.5 pr-0.5 text-xs",
|
|
7334
|
+
remove: "p-0.5",
|
|
7335
|
+
icon: "h-3 w-3",
|
|
7336
|
+
clear: "text-xs"
|
|
7337
|
+
},
|
|
7338
|
+
md: {
|
|
7339
|
+
chip: "gap-1.5 py-1 pl-3 pr-1 text-sm",
|
|
7340
|
+
remove: "p-1",
|
|
7341
|
+
icon: "h-3.5 w-3.5",
|
|
7342
|
+
clear: "text-sm"
|
|
7343
|
+
},
|
|
7344
|
+
lg: {
|
|
7345
|
+
chip: "gap-2 py-1.5 pl-3.5 pr-1.5 text-base",
|
|
7346
|
+
remove: "p-1.5",
|
|
7347
|
+
icon: "h-4 w-4",
|
|
7348
|
+
clear: "text-base"
|
|
7349
|
+
}
|
|
7350
|
+
};
|
|
7351
|
+
var FilterChips = React92.forwardRef(function FilterChips2({
|
|
6451
7352
|
filters,
|
|
7353
|
+
size = "md",
|
|
6452
7354
|
onClearAll,
|
|
6453
7355
|
clearLabel = "Clear all",
|
|
6454
7356
|
emptyLabel,
|
|
@@ -6457,9 +7359,10 @@ var FilterChips = React88.forwardRef(function FilterChips2({
|
|
|
6457
7359
|
...props
|
|
6458
7360
|
}, ref) {
|
|
6459
7361
|
if (filters.length === 0) {
|
|
6460
|
-
return emptyLabel ? /* @__PURE__ */
|
|
7362
|
+
return emptyLabel ? /* @__PURE__ */ jsx92("div", { ref, className: cn("text-sm text-muted-foreground", className), ...props, children: emptyLabel }) : null;
|
|
6461
7363
|
}
|
|
6462
|
-
|
|
7364
|
+
const scale = CHIP_SIZES[size];
|
|
7365
|
+
return /* @__PURE__ */ jsxs66(
|
|
6463
7366
|
"div",
|
|
6464
7367
|
{
|
|
6465
7368
|
ref,
|
|
@@ -6468,39 +7371,48 @@ var FilterChips = React88.forwardRef(function FilterChips2({
|
|
|
6468
7371
|
className: cn("flex flex-wrap items-center gap-2", className),
|
|
6469
7372
|
...props,
|
|
6470
7373
|
children: [
|
|
6471
|
-
filters.map((filter) => /* @__PURE__ */
|
|
7374
|
+
filters.map((filter) => /* @__PURE__ */ jsxs66(
|
|
6472
7375
|
"span",
|
|
6473
7376
|
{
|
|
6474
|
-
className:
|
|
7377
|
+
className: cn(
|
|
7378
|
+
"inline-flex max-w-full items-center rounded-full border border-border bg-muted/60",
|
|
7379
|
+
scale.chip
|
|
7380
|
+
),
|
|
6475
7381
|
children: [
|
|
6476
|
-
/* @__PURE__ */
|
|
6477
|
-
/* @__PURE__ */
|
|
7382
|
+
/* @__PURE__ */ jsxs66("span", { className: "truncate", children: [
|
|
7383
|
+
/* @__PURE__ */ jsxs66("span", { className: "text-muted-foreground", children: [
|
|
6478
7384
|
filter.label,
|
|
6479
7385
|
":"
|
|
6480
7386
|
] }),
|
|
6481
7387
|
" ",
|
|
6482
|
-
/* @__PURE__ */
|
|
7388
|
+
/* @__PURE__ */ jsx92("span", { className: "font-medium", children: filter.value ?? "Any" })
|
|
6483
7389
|
] }),
|
|
6484
|
-
filter.onRemove && /* @__PURE__ */
|
|
7390
|
+
filter.onRemove && /* @__PURE__ */ jsx92(
|
|
6485
7391
|
"button",
|
|
6486
7392
|
{
|
|
6487
7393
|
type: "button",
|
|
6488
7394
|
onClick: filter.onRemove,
|
|
6489
7395
|
"aria-label": `Remove ${filter.label}${filter.value ? `: ${filter.value}` : ""}`,
|
|
6490
|
-
className:
|
|
6491
|
-
|
|
7396
|
+
className: cn(
|
|
7397
|
+
"rounded-full text-muted-foreground transition-colors hover:bg-background hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
7398
|
+
scale.remove
|
|
7399
|
+
),
|
|
7400
|
+
children: /* @__PURE__ */ jsx92("svg", { "aria-hidden": "true", viewBox: "0 0 20 20", className: scale.icon, fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", children: /* @__PURE__ */ jsx92("path", { d: "m5 5 10 10M15 5 5 15" }) })
|
|
6492
7401
|
}
|
|
6493
7402
|
)
|
|
6494
7403
|
]
|
|
6495
7404
|
},
|
|
6496
7405
|
filter.key
|
|
6497
7406
|
)),
|
|
6498
|
-
onClearAll && /* @__PURE__ */
|
|
7407
|
+
onClearAll && /* @__PURE__ */ jsx92(
|
|
6499
7408
|
"button",
|
|
6500
7409
|
{
|
|
6501
7410
|
type: "button",
|
|
6502
7411
|
onClick: onClearAll,
|
|
6503
|
-
className:
|
|
7412
|
+
className: cn(
|
|
7413
|
+
"rounded-sm px-1 font-medium text-primary underline-offset-4 hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
7414
|
+
scale.clear
|
|
7415
|
+
),
|
|
6504
7416
|
children: clearLabel
|
|
6505
7417
|
}
|
|
6506
7418
|
)
|
|
@@ -6510,157 +7422,9 @@ var FilterChips = React88.forwardRef(function FilterChips2({
|
|
|
6510
7422
|
});
|
|
6511
7423
|
|
|
6512
7424
|
// src/components/multi-select/MultiSelect.tsx
|
|
6513
|
-
import * as
|
|
6514
|
-
|
|
6515
|
-
|
|
6516
|
-
import * as React89 from "react";
|
|
6517
|
-
import { createPortal as createPortal7 } from "react-dom";
|
|
6518
|
-
import { jsx as jsx89 } from "react/jsx-runtime";
|
|
6519
|
-
var PopoverContext = React89.createContext({
|
|
6520
|
-
open: false,
|
|
6521
|
-
setOpen: () => {
|
|
6522
|
-
},
|
|
6523
|
-
triggerId: "",
|
|
6524
|
-
contentId: "",
|
|
6525
|
-
wrapperRef: { current: null }
|
|
6526
|
-
});
|
|
6527
|
-
var Popover = React89.forwardRef(
|
|
6528
|
-
({ open, onOpenChange, className, children }, ref) => {
|
|
6529
|
-
const [internalOpen, setInternalOpen] = React89.useState(false);
|
|
6530
|
-
const current = open ?? internalOpen;
|
|
6531
|
-
const triggerId = React89.useId();
|
|
6532
|
-
const contentId = React89.useId();
|
|
6533
|
-
const wrapperRef = React89.useRef(null);
|
|
6534
|
-
const setRefs = React89.useCallback(
|
|
6535
|
-
(node) => {
|
|
6536
|
-
wrapperRef.current = node;
|
|
6537
|
-
if (typeof ref === "function") ref(node);
|
|
6538
|
-
else if (ref) ref.current = node;
|
|
6539
|
-
},
|
|
6540
|
-
[ref]
|
|
6541
|
-
);
|
|
6542
|
-
const setOpen = React89.useCallback(
|
|
6543
|
-
(next) => {
|
|
6544
|
-
if (open === void 0) setInternalOpen(next);
|
|
6545
|
-
onOpenChange?.(next);
|
|
6546
|
-
},
|
|
6547
|
-
[open, onOpenChange]
|
|
6548
|
-
);
|
|
6549
|
-
return /* @__PURE__ */ jsx89("div", { ref: setRefs, className: cn("relative inline-block", className), children: /* @__PURE__ */ jsx89(
|
|
6550
|
-
PopoverContext.Provider,
|
|
6551
|
-
{
|
|
6552
|
-
value: { open: current, setOpen, triggerId, contentId, wrapperRef },
|
|
6553
|
-
children
|
|
6554
|
-
}
|
|
6555
|
-
) });
|
|
6556
|
-
}
|
|
6557
|
-
);
|
|
6558
|
-
Popover.displayName = "Popover";
|
|
6559
|
-
var PopoverTrigger = React89.forwardRef(
|
|
6560
|
-
({ className, children, onClick, ...props }, ref) => {
|
|
6561
|
-
const { open, setOpen, triggerId, contentId } = React89.useContext(PopoverContext);
|
|
6562
|
-
return /* @__PURE__ */ jsx89(
|
|
6563
|
-
"button",
|
|
6564
|
-
{
|
|
6565
|
-
ref,
|
|
6566
|
-
id: triggerId,
|
|
6567
|
-
type: "button",
|
|
6568
|
-
"aria-haspopup": "dialog",
|
|
6569
|
-
"aria-expanded": open,
|
|
6570
|
-
"aria-controls": open ? contentId : void 0,
|
|
6571
|
-
onClick: (event) => {
|
|
6572
|
-
onClick?.(event);
|
|
6573
|
-
setOpen(!open);
|
|
6574
|
-
},
|
|
6575
|
-
className: cn(
|
|
6576
|
-
"inline-flex items-center justify-center rounded-md border border-border bg-background px-3 py-1.5 text-sm font-medium transition-colors",
|
|
6577
|
-
"hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
6578
|
-
className
|
|
6579
|
-
),
|
|
6580
|
-
...props,
|
|
6581
|
-
children
|
|
6582
|
-
}
|
|
6583
|
-
);
|
|
6584
|
-
}
|
|
6585
|
-
);
|
|
6586
|
-
PopoverTrigger.displayName = "PopoverTrigger";
|
|
6587
|
-
var PopoverContent = React89.forwardRef(
|
|
6588
|
-
({ className, children, onKeyDown, ...props }, ref) => {
|
|
6589
|
-
const { open, setOpen, triggerId, contentId, wrapperRef } = React89.useContext(PopoverContext);
|
|
6590
|
-
const contentRef = React89.useRef(null);
|
|
6591
|
-
const [pos, setPos] = React89.useState(null);
|
|
6592
|
-
React89.useLayoutEffect(() => {
|
|
6593
|
-
if (!open) {
|
|
6594
|
-
setPos(null);
|
|
6595
|
-
return;
|
|
6596
|
-
}
|
|
6597
|
-
const GAP2 = 8;
|
|
6598
|
-
const measure = () => {
|
|
6599
|
-
const rect = wrapperRef.current?.getBoundingClientRect();
|
|
6600
|
-
if (!rect) return;
|
|
6601
|
-
setPos({ top: rect.bottom + GAP2, right: Math.max(8, window.innerWidth - rect.right) });
|
|
6602
|
-
};
|
|
6603
|
-
measure();
|
|
6604
|
-
const onScroll = () => setOpen(false);
|
|
6605
|
-
window.addEventListener("scroll", onScroll, true);
|
|
6606
|
-
window.addEventListener("resize", measure);
|
|
6607
|
-
return () => {
|
|
6608
|
-
window.removeEventListener("scroll", onScroll, true);
|
|
6609
|
-
window.removeEventListener("resize", measure);
|
|
6610
|
-
};
|
|
6611
|
-
}, [open, setOpen, wrapperRef]);
|
|
6612
|
-
React89.useEffect(() => {
|
|
6613
|
-
if (!open) return;
|
|
6614
|
-
function onPointerDown(event) {
|
|
6615
|
-
if (!contentRef.current?.contains(event.target)) setOpen(false);
|
|
6616
|
-
}
|
|
6617
|
-
document.addEventListener("pointerdown", onPointerDown);
|
|
6618
|
-
return () => document.removeEventListener("pointerdown", onPointerDown);
|
|
6619
|
-
}, [open, setOpen]);
|
|
6620
|
-
React89.useEffect(() => {
|
|
6621
|
-
if (open && pos && contentRef.current) {
|
|
6622
|
-
contentRef.current.focus();
|
|
6623
|
-
}
|
|
6624
|
-
}, [open, pos]);
|
|
6625
|
-
if (!open || !pos || typeof document === "undefined") return null;
|
|
6626
|
-
return createPortal7(
|
|
6627
|
-
/* @__PURE__ */ jsx89(
|
|
6628
|
-
"div",
|
|
6629
|
-
{
|
|
6630
|
-
ref: (node) => {
|
|
6631
|
-
contentRef.current = node;
|
|
6632
|
-
if (typeof ref === "function") ref(node);
|
|
6633
|
-
else if (ref) ref.current = node;
|
|
6634
|
-
},
|
|
6635
|
-
id: contentId,
|
|
6636
|
-
role: "dialog",
|
|
6637
|
-
"aria-labelledby": triggerId,
|
|
6638
|
-
tabIndex: -1,
|
|
6639
|
-
onKeyDown: (event) => {
|
|
6640
|
-
onKeyDown?.(event);
|
|
6641
|
-
if (event.key === "Escape") {
|
|
6642
|
-
event.stopPropagation();
|
|
6643
|
-
setOpen(false);
|
|
6644
|
-
}
|
|
6645
|
-
},
|
|
6646
|
-
style: { position: "fixed", top: pos.top, right: pos.right, zIndex: 50 },
|
|
6647
|
-
className: cn(
|
|
6648
|
-
"w-72 rounded-md border border-border bg-popover p-4 text-popover-foreground shadow-md outline-none",
|
|
6649
|
-
className
|
|
6650
|
-
),
|
|
6651
|
-
...props,
|
|
6652
|
-
children
|
|
6653
|
-
}
|
|
6654
|
-
),
|
|
6655
|
-
document.body
|
|
6656
|
-
);
|
|
6657
|
-
}
|
|
6658
|
-
);
|
|
6659
|
-
PopoverContent.displayName = "PopoverContent";
|
|
6660
|
-
|
|
6661
|
-
// src/components/multi-select/MultiSelect.tsx
|
|
6662
|
-
import { jsx as jsx90, jsxs as jsxs65 } from "react/jsx-runtime";
|
|
6663
|
-
var MultiSelect = React90.forwardRef(function MultiSelect2({
|
|
7425
|
+
import * as React93 from "react";
|
|
7426
|
+
import { jsx as jsx93, jsxs as jsxs67 } from "react/jsx-runtime";
|
|
7427
|
+
var MultiSelect = React93.forwardRef(function MultiSelect2({
|
|
6664
7428
|
options,
|
|
6665
7429
|
value,
|
|
6666
7430
|
defaultValue,
|
|
@@ -6674,10 +7438,10 @@ var MultiSelect = React90.forwardRef(function MultiSelect2({
|
|
|
6674
7438
|
className,
|
|
6675
7439
|
...props
|
|
6676
7440
|
}, ref) {
|
|
6677
|
-
const labelId =
|
|
6678
|
-
const [internal, setInternal] =
|
|
6679
|
-
const [query, setQuery] =
|
|
6680
|
-
const [open, setOpen] =
|
|
7441
|
+
const labelId = React93.useId();
|
|
7442
|
+
const [internal, setInternal] = React93.useState(defaultValue ?? []);
|
|
7443
|
+
const [query, setQuery] = React93.useState("");
|
|
7444
|
+
const [open, setOpen] = React93.useState(false);
|
|
6681
7445
|
const selected = value ?? internal;
|
|
6682
7446
|
const commit = (next) => {
|
|
6683
7447
|
if (value === void 0) setInternal(next);
|
|
@@ -6694,7 +7458,7 @@ var MultiSelect = React90.forwardRef(function MultiSelect2({
|
|
|
6694
7458
|
const q = query.trim().toLowerCase();
|
|
6695
7459
|
return option.label.toLowerCase().includes(q) || option.value.toLowerCase().includes(q) || option.description?.toLowerCase().includes(q) || option.group?.toLowerCase().includes(q);
|
|
6696
7460
|
}) : options;
|
|
6697
|
-
const groups =
|
|
7461
|
+
const groups = React93.useMemo(() => {
|
|
6698
7462
|
let last;
|
|
6699
7463
|
return filtered.map((option) => {
|
|
6700
7464
|
const heading = option.group && option.group !== last ? option.group : void 0;
|
|
@@ -6704,16 +7468,16 @@ var MultiSelect = React90.forwardRef(function MultiSelect2({
|
|
|
6704
7468
|
}, [filtered]);
|
|
6705
7469
|
const visibleChips = selectedOptions.slice(0, maxDisplay);
|
|
6706
7470
|
const hiddenCount = selectedOptions.length - visibleChips.length;
|
|
6707
|
-
return /* @__PURE__ */
|
|
6708
|
-
label && /* @__PURE__ */
|
|
6709
|
-
visibleChips.length > 0 && /* @__PURE__ */
|
|
6710
|
-
visibleChips.map((option) => /* @__PURE__ */
|
|
7471
|
+
return /* @__PURE__ */ jsxs67("div", { ref, className: cn("flex flex-col gap-2", className), ...props, children: [
|
|
7472
|
+
label && /* @__PURE__ */ jsx93("span", { id: labelId, className: "text-sm font-medium", children: label }),
|
|
7473
|
+
visibleChips.length > 0 && /* @__PURE__ */ jsxs67("div", { className: "flex flex-wrap gap-1.5", children: [
|
|
7474
|
+
visibleChips.map((option) => /* @__PURE__ */ jsxs67(
|
|
6711
7475
|
"span",
|
|
6712
7476
|
{
|
|
6713
7477
|
className: "inline-flex max-w-full items-center gap-1 rounded-full border border-border bg-muted/60 py-0.5 pl-2.5 pr-1 text-xs",
|
|
6714
7478
|
children: [
|
|
6715
|
-
/* @__PURE__ */
|
|
6716
|
-
/* @__PURE__ */
|
|
7479
|
+
/* @__PURE__ */ jsx93("span", { className: "truncate", children: option.label }),
|
|
7480
|
+
/* @__PURE__ */ jsx93(
|
|
6717
7481
|
"button",
|
|
6718
7482
|
{
|
|
6719
7483
|
type: "button",
|
|
@@ -6721,26 +7485,26 @@ var MultiSelect = React90.forwardRef(function MultiSelect2({
|
|
|
6721
7485
|
disabled,
|
|
6722
7486
|
"aria-label": `Remove ${option.label}`,
|
|
6723
7487
|
className: "rounded-full p-1 text-muted-foreground hover:bg-background hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none",
|
|
6724
|
-
children: /* @__PURE__ */
|
|
7488
|
+
children: /* @__PURE__ */ jsx93("svg", { "aria-hidden": "true", viewBox: "0 0 20 20", className: "h-3 w-3", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", children: /* @__PURE__ */ jsx93("path", { d: "m5 5 10 10M15 5 5 15" }) })
|
|
6725
7489
|
}
|
|
6726
7490
|
)
|
|
6727
7491
|
]
|
|
6728
7492
|
},
|
|
6729
7493
|
option.value
|
|
6730
7494
|
)),
|
|
6731
|
-
hiddenCount > 0 && /* @__PURE__ */
|
|
7495
|
+
hiddenCount > 0 && /* @__PURE__ */ jsxs67("span", { className: "self-center text-xs text-muted-foreground", children: [
|
|
6732
7496
|
"+",
|
|
6733
7497
|
hiddenCount,
|
|
6734
7498
|
" more"
|
|
6735
7499
|
] })
|
|
6736
7500
|
] }),
|
|
6737
|
-
/* @__PURE__ */
|
|
6738
|
-
/* @__PURE__ */
|
|
6739
|
-
/* @__PURE__ */
|
|
6740
|
-
/* @__PURE__ */
|
|
7501
|
+
/* @__PURE__ */ jsxs67(Popover, { open, onOpenChange: setOpen, children: [
|
|
7502
|
+
/* @__PURE__ */ jsxs67(PopoverTrigger, { "aria-labelledby": label ? labelId : void 0, disabled, className: "w-full justify-between", children: [
|
|
7503
|
+
/* @__PURE__ */ jsx93("span", { children: selected.length > 0 ? `${selected.length} selected` : triggerLabel }),
|
|
7504
|
+
/* @__PURE__ */ jsx93("span", { "aria-hidden": "true", className: "text-muted-foreground", children: "\u2304" })
|
|
6741
7505
|
] }),
|
|
6742
|
-
/* @__PURE__ */
|
|
6743
|
-
/* @__PURE__ */
|
|
7506
|
+
/* @__PURE__ */ jsxs67(PopoverContent, { className: "w-80 p-0", children: [
|
|
7507
|
+
/* @__PURE__ */ jsx93("div", { className: "border-b border-border p-3", children: /* @__PURE__ */ jsx93(
|
|
6744
7508
|
Input,
|
|
6745
7509
|
{
|
|
6746
7510
|
type: "search",
|
|
@@ -6751,9 +7515,9 @@ var MultiSelect = React90.forwardRef(function MultiSelect2({
|
|
|
6751
7515
|
autoFocus: true
|
|
6752
7516
|
}
|
|
6753
7517
|
) }),
|
|
6754
|
-
/* @__PURE__ */
|
|
6755
|
-
heading && /* @__PURE__ */
|
|
6756
|
-
/* @__PURE__ */
|
|
7518
|
+
/* @__PURE__ */ jsx93("div", { className: "max-h-64 overflow-y-auto p-1", children: groups.length === 0 ? /* @__PURE__ */ jsx93("p", { className: "px-3 py-3 text-sm text-muted-foreground", children: emptyText }) : groups.map(({ option, heading }) => /* @__PURE__ */ jsxs67(React93.Fragment, { children: [
|
|
7519
|
+
heading && /* @__PURE__ */ jsx93("p", { className: "px-3 pb-1 pt-2 text-xs font-medium uppercase tracking-wide text-muted-foreground", children: heading }),
|
|
7520
|
+
/* @__PURE__ */ jsxs67(
|
|
6757
7521
|
"label",
|
|
6758
7522
|
{
|
|
6759
7523
|
className: cn(
|
|
@@ -6761,7 +7525,7 @@ var MultiSelect = React90.forwardRef(function MultiSelect2({
|
|
|
6761
7525
|
option.disabled && "cursor-not-allowed opacity-50"
|
|
6762
7526
|
),
|
|
6763
7527
|
children: [
|
|
6764
|
-
/* @__PURE__ */
|
|
7528
|
+
/* @__PURE__ */ jsx93(
|
|
6765
7529
|
Checkbox,
|
|
6766
7530
|
{
|
|
6767
7531
|
checked: selected.includes(option.value),
|
|
@@ -6770,16 +7534,16 @@ var MultiSelect = React90.forwardRef(function MultiSelect2({
|
|
|
6770
7534
|
className: "mt-0.5"
|
|
6771
7535
|
}
|
|
6772
7536
|
),
|
|
6773
|
-
/* @__PURE__ */
|
|
6774
|
-
/* @__PURE__ */
|
|
6775
|
-
option.description && /* @__PURE__ */
|
|
7537
|
+
/* @__PURE__ */ jsxs67("span", { className: "min-w-0", children: [
|
|
7538
|
+
/* @__PURE__ */ jsx93("span", { className: "block", children: option.label }),
|
|
7539
|
+
option.description && /* @__PURE__ */ jsx93("span", { className: "mt-0.5 block text-xs text-muted-foreground", children: option.description })
|
|
6776
7540
|
] })
|
|
6777
7541
|
]
|
|
6778
7542
|
}
|
|
6779
7543
|
)
|
|
6780
7544
|
] }, option.value)) }),
|
|
6781
|
-
/* @__PURE__ */
|
|
6782
|
-
/* @__PURE__ */
|
|
7545
|
+
/* @__PURE__ */ jsxs67("div", { className: "flex items-center justify-between gap-2 border-t border-border p-2", children: [
|
|
7546
|
+
/* @__PURE__ */ jsx93(
|
|
6783
7547
|
Button,
|
|
6784
7548
|
{
|
|
6785
7549
|
type: "button",
|
|
@@ -6789,7 +7553,7 @@ var MultiSelect = React90.forwardRef(function MultiSelect2({
|
|
|
6789
7553
|
children: "Select all"
|
|
6790
7554
|
}
|
|
6791
7555
|
),
|
|
6792
|
-
/* @__PURE__ */
|
|
7556
|
+
/* @__PURE__ */ jsx93(Button, { type: "button", variant: "ghost", size: "sm", onClick: () => commit([]), children: "Clear" })
|
|
6793
7557
|
] })
|
|
6794
7558
|
] })
|
|
6795
7559
|
] })
|
|
@@ -6797,9 +7561,9 @@ var MultiSelect = React90.forwardRef(function MultiSelect2({
|
|
|
6797
7561
|
});
|
|
6798
7562
|
|
|
6799
7563
|
// src/components/filter-panel/FilterPanel.tsx
|
|
6800
|
-
import * as
|
|
6801
|
-
import { jsx as
|
|
6802
|
-
var FilterPanel =
|
|
7564
|
+
import * as React94 from "react";
|
|
7565
|
+
import { jsx as jsx94, jsxs as jsxs68 } from "react/jsx-runtime";
|
|
7566
|
+
var FilterPanel = React94.forwardRef(function FilterPanel2({
|
|
6803
7567
|
sections,
|
|
6804
7568
|
title = "Filters",
|
|
6805
7569
|
description,
|
|
@@ -6815,7 +7579,7 @@ var FilterPanel = React91.forwardRef(function FilterPanel2({
|
|
|
6815
7579
|
...props
|
|
6816
7580
|
}, ref) {
|
|
6817
7581
|
const Tag = as;
|
|
6818
|
-
const [open, setOpen] =
|
|
7582
|
+
const [open, setOpen] = React94.useState(
|
|
6819
7583
|
defaultOpen ?? sections.filter((section) => section.defaultOpen).map((section) => section.title)
|
|
6820
7584
|
);
|
|
6821
7585
|
const isOpen = (section) => !collapsible || open.includes(section.title);
|
|
@@ -6825,15 +7589,15 @@ var FilterPanel = React91.forwardRef(function FilterPanel2({
|
|
|
6825
7589
|
(current) => current.includes(section.title) ? current.filter((title2) => title2 !== section.title) : [...current, section.title]
|
|
6826
7590
|
);
|
|
6827
7591
|
};
|
|
6828
|
-
return /* @__PURE__ */
|
|
6829
|
-
(title || description) && /* @__PURE__ */
|
|
6830
|
-
title && /* @__PURE__ */
|
|
6831
|
-
description && /* @__PURE__ */
|
|
7592
|
+
return /* @__PURE__ */ jsxs68(Tag, { ref, className: cn("w-full rounded-xl border border-border bg-card", className), ...props, children: [
|
|
7593
|
+
(title || description) && /* @__PURE__ */ jsxs68("div", { className: "border-b border-border px-4 py-3", children: [
|
|
7594
|
+
title && /* @__PURE__ */ jsx94("h2", { className: "text-sm font-semibold", children: title }),
|
|
7595
|
+
description && /* @__PURE__ */ jsx94("p", { className: "mt-1 text-xs text-muted-foreground", children: description })
|
|
6832
7596
|
] }),
|
|
6833
|
-
/* @__PURE__ */
|
|
7597
|
+
/* @__PURE__ */ jsx94("div", { className: "divide-y divide-border", children: sections.map((section) => {
|
|
6834
7598
|
const expanded = isOpen(section);
|
|
6835
|
-
return /* @__PURE__ */
|
|
6836
|
-
/* @__PURE__ */
|
|
7599
|
+
return /* @__PURE__ */ jsxs68("div", { className: "px-4 py-3", children: [
|
|
7600
|
+
/* @__PURE__ */ jsx94("h3", { children: /* @__PURE__ */ jsxs68(
|
|
6837
7601
|
"button",
|
|
6838
7602
|
{
|
|
6839
7603
|
type: "button",
|
|
@@ -6846,28 +7610,28 @@ var FilterPanel = React91.forwardRef(function FilterPanel2({
|
|
|
6846
7610
|
collapsible && "rounded-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
6847
7611
|
),
|
|
6848
7612
|
children: [
|
|
6849
|
-
/* @__PURE__ */
|
|
7613
|
+
/* @__PURE__ */ jsxs68("span", { children: [
|
|
6850
7614
|
section.title,
|
|
6851
|
-
section.description && /* @__PURE__ */
|
|
7615
|
+
section.description && /* @__PURE__ */ jsx94("span", { className: "mt-0.5 block text-xs font-normal text-muted-foreground", children: section.description })
|
|
6852
7616
|
] }),
|
|
6853
|
-
collapsible && /* @__PURE__ */
|
|
7617
|
+
collapsible && /* @__PURE__ */ jsx94("span", { "aria-hidden": "true", className: cn("text-muted-foreground transition-transform", expanded && "rotate-180"), children: "\u2304" })
|
|
6854
7618
|
]
|
|
6855
7619
|
}
|
|
6856
7620
|
) }),
|
|
6857
|
-
expanded && /* @__PURE__ */
|
|
7621
|
+
expanded && /* @__PURE__ */ jsx94("div", { id: `filter-section-${section.title.replace(/\s+/g, "-").toLowerCase()}`, className: "mt-3", children: section.content })
|
|
6858
7622
|
] }, section.title);
|
|
6859
7623
|
}) }),
|
|
6860
|
-
(onReset || onApply || actions) && /* @__PURE__ */
|
|
7624
|
+
(onReset || onApply || actions) && /* @__PURE__ */ jsxs68("div", { className: "flex flex-wrap items-center gap-2 border-t border-border px-4 py-3", children: [
|
|
6861
7625
|
actions,
|
|
6862
|
-
onReset && /* @__PURE__ */
|
|
6863
|
-
onApply && /* @__PURE__ */
|
|
7626
|
+
onReset && /* @__PURE__ */ jsx94(Button, { type: "button", variant: "ghost", size: "sm", onClick: onReset, className: "ml-auto", children: resetLabel }),
|
|
7627
|
+
onApply && /* @__PURE__ */ jsx94(Button, { type: "button", size: "sm", onClick: onApply, children: applyLabel })
|
|
6864
7628
|
] })
|
|
6865
7629
|
] });
|
|
6866
7630
|
});
|
|
6867
7631
|
|
|
6868
7632
|
// src/components/date-range-picker/DateRangePicker.tsx
|
|
6869
|
-
import * as
|
|
6870
|
-
import { jsx as
|
|
7633
|
+
import * as React95 from "react";
|
|
7634
|
+
import { jsx as jsx95, jsxs as jsxs69 } from "react/jsx-runtime";
|
|
6871
7635
|
var DEFAULT_PRESETS = [
|
|
6872
7636
|
{ label: "7 days", days: 7 },
|
|
6873
7637
|
{ label: "30 days", days: 30 },
|
|
@@ -6880,7 +7644,7 @@ function toIsoDate(date) {
|
|
|
6880
7644
|
const day = String(date.getDate()).padStart(2, "0");
|
|
6881
7645
|
return `${year}-${month}-${day}`;
|
|
6882
7646
|
}
|
|
6883
|
-
var DateRangePicker =
|
|
7647
|
+
var DateRangePicker = React95.forwardRef(
|
|
6884
7648
|
function DateRangePicker2({
|
|
6885
7649
|
value,
|
|
6886
7650
|
defaultValue,
|
|
@@ -6893,9 +7657,9 @@ var DateRangePicker = React92.forwardRef(
|
|
|
6893
7657
|
className,
|
|
6894
7658
|
...props
|
|
6895
7659
|
}, ref) {
|
|
6896
|
-
const startId =
|
|
6897
|
-
const endId =
|
|
6898
|
-
const [internal, setInternal] =
|
|
7660
|
+
const startId = React95.useId();
|
|
7661
|
+
const endId = React95.useId();
|
|
7662
|
+
const [internal, setInternal] = React95.useState(defaultValue ?? {});
|
|
6899
7663
|
const current = value ?? internal;
|
|
6900
7664
|
const commit = (next) => {
|
|
6901
7665
|
if (value === void 0) setInternal(next);
|
|
@@ -6919,8 +7683,8 @@ var DateRangePicker = React92.forwardRef(
|
|
|
6919
7683
|
}
|
|
6920
7684
|
commit({ start: toIsoDate(start), end: toIsoDate(end) });
|
|
6921
7685
|
};
|
|
6922
|
-
return /* @__PURE__ */
|
|
6923
|
-
showPresets && presets.length > 0 && /* @__PURE__ */
|
|
7686
|
+
return /* @__PURE__ */ jsxs69("div", { ref, className: cn("flex flex-col gap-3", className), ...props, children: [
|
|
7687
|
+
showPresets && presets.length > 0 && /* @__PURE__ */ jsx95("div", { className: "flex flex-wrap gap-2", children: presets.map((preset) => /* @__PURE__ */ jsx95(
|
|
6924
7688
|
Button,
|
|
6925
7689
|
{
|
|
6926
7690
|
type: "button",
|
|
@@ -6932,10 +7696,10 @@ var DateRangePicker = React92.forwardRef(
|
|
|
6932
7696
|
},
|
|
6933
7697
|
preset.label
|
|
6934
7698
|
)) }),
|
|
6935
|
-
/* @__PURE__ */
|
|
6936
|
-
/* @__PURE__ */
|
|
6937
|
-
/* @__PURE__ */
|
|
6938
|
-
/* @__PURE__ */
|
|
7699
|
+
/* @__PURE__ */ jsxs69("div", { className: "grid gap-3 sm:grid-cols-2", children: [
|
|
7700
|
+
/* @__PURE__ */ jsxs69("div", { children: [
|
|
7701
|
+
/* @__PURE__ */ jsx95("label", { htmlFor: startId, className: "mb-1 block text-xs font-medium text-muted-foreground", children: startLabel }),
|
|
7702
|
+
/* @__PURE__ */ jsx95(
|
|
6939
7703
|
DatePicker,
|
|
6940
7704
|
{
|
|
6941
7705
|
id: startId,
|
|
@@ -6947,9 +7711,9 @@ var DateRangePicker = React92.forwardRef(
|
|
|
6947
7711
|
}
|
|
6948
7712
|
)
|
|
6949
7713
|
] }),
|
|
6950
|
-
/* @__PURE__ */
|
|
6951
|
-
/* @__PURE__ */
|
|
6952
|
-
/* @__PURE__ */
|
|
7714
|
+
/* @__PURE__ */ jsxs69("div", { children: [
|
|
7715
|
+
/* @__PURE__ */ jsx95("label", { htmlFor: endId, className: "mb-1 block text-xs font-medium text-muted-foreground", children: endLabel }),
|
|
7716
|
+
/* @__PURE__ */ jsx95(
|
|
6953
7717
|
DatePicker,
|
|
6954
7718
|
{
|
|
6955
7719
|
id: endId,
|
|
@@ -6967,9 +7731,9 @@ var DateRangePicker = React92.forwardRef(
|
|
|
6967
7731
|
);
|
|
6968
7732
|
|
|
6969
7733
|
// src/components/applied-filters/AppliedFilters.tsx
|
|
6970
|
-
import * as
|
|
6971
|
-
import { jsx as
|
|
6972
|
-
var AppliedFilters =
|
|
7734
|
+
import * as React96 from "react";
|
|
7735
|
+
import { jsx as jsx96, jsxs as jsxs70 } from "react/jsx-runtime";
|
|
7736
|
+
var AppliedFilters = React96.forwardRef(
|
|
6973
7737
|
function AppliedFilters2({
|
|
6974
7738
|
filters,
|
|
6975
7739
|
onClearAll,
|
|
@@ -6982,9 +7746,9 @@ var AppliedFilters = React93.forwardRef(
|
|
|
6982
7746
|
}, ref) {
|
|
6983
7747
|
const summary = label ?? `${filters.length} active`;
|
|
6984
7748
|
if (filters.length === 0) {
|
|
6985
|
-
return emptyLabel ? /* @__PURE__ */
|
|
7749
|
+
return emptyLabel ? /* @__PURE__ */ jsx96("div", { ref, className: cn("text-sm text-muted-foreground", className), ...props, children: emptyLabel }) : null;
|
|
6986
7750
|
}
|
|
6987
|
-
return /* @__PURE__ */
|
|
7751
|
+
return /* @__PURE__ */ jsxs70(
|
|
6988
7752
|
"div",
|
|
6989
7753
|
{
|
|
6990
7754
|
ref,
|
|
@@ -6992,9 +7756,9 @@ var AppliedFilters = React93.forwardRef(
|
|
|
6992
7756
|
className: cn("flex flex-wrap items-center gap-2", className),
|
|
6993
7757
|
...props,
|
|
6994
7758
|
children: [
|
|
6995
|
-
/* @__PURE__ */
|
|
6996
|
-
/* @__PURE__ */
|
|
6997
|
-
onEdit && /* @__PURE__ */
|
|
7759
|
+
/* @__PURE__ */ jsx96("span", { className: "text-xs font-medium uppercase tracking-wide text-muted-foreground", children: summary }),
|
|
7760
|
+
/* @__PURE__ */ jsx96(FilterChips, { filters, onClearAll }),
|
|
7761
|
+
onEdit && /* @__PURE__ */ jsx96(Button, { type: "button", variant: "ghost", size: "sm", onClick: onEdit, children: editLabel })
|
|
6998
7762
|
]
|
|
6999
7763
|
}
|
|
7000
7764
|
);
|
|
@@ -7002,11 +7766,11 @@ var AppliedFilters = React93.forwardRef(
|
|
|
7002
7766
|
);
|
|
7003
7767
|
|
|
7004
7768
|
// src/components/menu/Menu.tsx
|
|
7005
|
-
import * as
|
|
7769
|
+
import * as React97 from "react";
|
|
7006
7770
|
import { createPortal as createPortal8 } from "react-dom";
|
|
7007
7771
|
import { Slot as Slot5 } from "@radix-ui/react-slot";
|
|
7008
|
-
import { jsx as
|
|
7009
|
-
var MenuContext =
|
|
7772
|
+
import { jsx as jsx97 } from "react/jsx-runtime";
|
|
7773
|
+
var MenuContext = React97.createContext({
|
|
7010
7774
|
open: false,
|
|
7011
7775
|
setOpen: () => {
|
|
7012
7776
|
},
|
|
@@ -7015,13 +7779,13 @@ var MenuContext = React94.createContext({
|
|
|
7015
7779
|
},
|
|
7016
7780
|
wrapperRef: { current: null }
|
|
7017
7781
|
});
|
|
7018
|
-
var Menu =
|
|
7782
|
+
var Menu = React97.forwardRef(
|
|
7019
7783
|
({ open, onOpenChange, className, children }, ref) => {
|
|
7020
|
-
const [internalOpen, setInternalOpen] =
|
|
7021
|
-
const [activeIndex, setActiveIndex] =
|
|
7784
|
+
const [internalOpen, setInternalOpen] = React97.useState(false);
|
|
7785
|
+
const [activeIndex, setActiveIndex] = React97.useState(-1);
|
|
7022
7786
|
const current = open ?? internalOpen;
|
|
7023
|
-
const wrapperRef =
|
|
7024
|
-
const setRefs =
|
|
7787
|
+
const wrapperRef = React97.useRef(null);
|
|
7788
|
+
const setRefs = React97.useCallback(
|
|
7025
7789
|
(node) => {
|
|
7026
7790
|
wrapperRef.current = node;
|
|
7027
7791
|
if (typeof ref === "function") ref(node);
|
|
@@ -7029,7 +7793,7 @@ var Menu = React94.forwardRef(
|
|
|
7029
7793
|
},
|
|
7030
7794
|
[ref]
|
|
7031
7795
|
);
|
|
7032
|
-
const setOpen =
|
|
7796
|
+
const setOpen = React97.useCallback(
|
|
7033
7797
|
(next) => {
|
|
7034
7798
|
if (open === void 0) setInternalOpen(next);
|
|
7035
7799
|
onOpenChange?.(next);
|
|
@@ -7037,7 +7801,7 @@ var Menu = React94.forwardRef(
|
|
|
7037
7801
|
},
|
|
7038
7802
|
[open, onOpenChange]
|
|
7039
7803
|
);
|
|
7040
|
-
return /* @__PURE__ */
|
|
7804
|
+
return /* @__PURE__ */ jsx97("div", { ref: setRefs, className: cn("relative inline-block", className), children: /* @__PURE__ */ jsx97(
|
|
7041
7805
|
MenuContext.Provider,
|
|
7042
7806
|
{
|
|
7043
7807
|
value: { open: current, setOpen, activeIndex, setActiveIndex, wrapperRef },
|
|
@@ -7047,10 +7811,10 @@ var Menu = React94.forwardRef(
|
|
|
7047
7811
|
}
|
|
7048
7812
|
);
|
|
7049
7813
|
Menu.displayName = "Menu";
|
|
7050
|
-
var MenuTrigger =
|
|
7814
|
+
var MenuTrigger = React97.forwardRef(
|
|
7051
7815
|
({ className, children, ...props }, ref) => {
|
|
7052
|
-
const { open, setOpen } =
|
|
7053
|
-
return /* @__PURE__ */
|
|
7816
|
+
const { open, setOpen } = React97.useContext(MenuContext);
|
|
7817
|
+
return /* @__PURE__ */ jsx97(
|
|
7054
7818
|
"button",
|
|
7055
7819
|
{
|
|
7056
7820
|
ref,
|
|
@@ -7070,13 +7834,13 @@ var MenuTrigger = React94.forwardRef(
|
|
|
7070
7834
|
}
|
|
7071
7835
|
);
|
|
7072
7836
|
MenuTrigger.displayName = "MenuTrigger";
|
|
7073
|
-
var MenuContent =
|
|
7837
|
+
var MenuContent = React97.forwardRef(
|
|
7074
7838
|
({ className, children, ...props }, ref) => {
|
|
7075
|
-
const { open, setOpen, activeIndex, setActiveIndex, wrapperRef } =
|
|
7076
|
-
const contentRef =
|
|
7077
|
-
const [pos, setPos] =
|
|
7078
|
-
const itemsRef =
|
|
7079
|
-
|
|
7839
|
+
const { open, setOpen, activeIndex, setActiveIndex, wrapperRef } = React97.useContext(MenuContext);
|
|
7840
|
+
const contentRef = React97.useRef(null);
|
|
7841
|
+
const [pos, setPos] = React97.useState(null);
|
|
7842
|
+
const itemsRef = React97.useRef([]);
|
|
7843
|
+
React97.useLayoutEffect(() => {
|
|
7080
7844
|
if (!open) {
|
|
7081
7845
|
setPos(null);
|
|
7082
7846
|
return;
|
|
@@ -7096,7 +7860,7 @@ var MenuContent = React94.forwardRef(
|
|
|
7096
7860
|
window.removeEventListener("resize", measure);
|
|
7097
7861
|
};
|
|
7098
7862
|
}, [open, setOpen, wrapperRef]);
|
|
7099
|
-
|
|
7863
|
+
React97.useEffect(() => {
|
|
7100
7864
|
if (!open) return;
|
|
7101
7865
|
function onPointerDown(event) {
|
|
7102
7866
|
if (!contentRef.current?.contains(event.target)) setOpen(false);
|
|
@@ -7104,7 +7868,7 @@ var MenuContent = React94.forwardRef(
|
|
|
7104
7868
|
document.addEventListener("pointerdown", onPointerDown);
|
|
7105
7869
|
return () => document.removeEventListener("pointerdown", onPointerDown);
|
|
7106
7870
|
}, [open, setOpen]);
|
|
7107
|
-
|
|
7871
|
+
React97.useEffect(() => {
|
|
7108
7872
|
if (open && pos && contentRef.current) {
|
|
7109
7873
|
itemsRef.current = Array.from(
|
|
7110
7874
|
contentRef.current.querySelectorAll('[role="menuitem"]:not([disabled])')
|
|
@@ -7140,7 +7904,7 @@ var MenuContent = React94.forwardRef(
|
|
|
7140
7904
|
};
|
|
7141
7905
|
if (!open || !pos || typeof document === "undefined") return null;
|
|
7142
7906
|
return createPortal8(
|
|
7143
|
-
/* @__PURE__ */
|
|
7907
|
+
/* @__PURE__ */ jsx97(
|
|
7144
7908
|
"div",
|
|
7145
7909
|
{
|
|
7146
7910
|
ref: (node) => {
|
|
@@ -7164,12 +7928,12 @@ var MenuContent = React94.forwardRef(
|
|
|
7164
7928
|
}
|
|
7165
7929
|
);
|
|
7166
7930
|
MenuContent.displayName = "MenuContent";
|
|
7167
|
-
var MenuItem =
|
|
7931
|
+
var MenuItem = React97.forwardRef(
|
|
7168
7932
|
({ className, destructive, asChild = false, onClick, ...props }, ref) => {
|
|
7169
|
-
const { setOpen } =
|
|
7933
|
+
const { setOpen } = React97.useContext(MenuContext);
|
|
7170
7934
|
const Comp = asChild ? Slot5 : "button";
|
|
7171
7935
|
const typeProp = asChild ? {} : { type: "button" };
|
|
7172
|
-
return /* @__PURE__ */
|
|
7936
|
+
return /* @__PURE__ */ jsx97(
|
|
7173
7937
|
Comp,
|
|
7174
7938
|
{
|
|
7175
7939
|
ref,
|
|
@@ -7191,12 +7955,12 @@ var MenuItem = React94.forwardRef(
|
|
|
7191
7955
|
}
|
|
7192
7956
|
);
|
|
7193
7957
|
MenuItem.displayName = "MenuItem";
|
|
7194
|
-
var MenuSeparator =
|
|
7195
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
7958
|
+
var MenuSeparator = React97.forwardRef(
|
|
7959
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx97("div", { ref, role: "separator", className: cn("-mx-1 my-1 h-px bg-border", className), ...props })
|
|
7196
7960
|
);
|
|
7197
7961
|
MenuSeparator.displayName = "MenuSeparator";
|
|
7198
|
-
var MenuLabel =
|
|
7199
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
7962
|
+
var MenuLabel = React97.forwardRef(
|
|
7963
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx97(
|
|
7200
7964
|
"div",
|
|
7201
7965
|
{
|
|
7202
7966
|
ref,
|
|
@@ -7208,9 +7972,9 @@ var MenuLabel = React94.forwardRef(
|
|
|
7208
7972
|
MenuLabel.displayName = "MenuLabel";
|
|
7209
7973
|
|
|
7210
7974
|
// src/components/alert/Alert.tsx
|
|
7211
|
-
import * as
|
|
7975
|
+
import * as React98 from "react";
|
|
7212
7976
|
import { cva as cva8 } from "class-variance-authority";
|
|
7213
|
-
import { jsx as
|
|
7977
|
+
import { jsx as jsx98 } from "react/jsx-runtime";
|
|
7214
7978
|
var alertVariants = cva8(
|
|
7215
7979
|
"relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",
|
|
7216
7980
|
{
|
|
@@ -7220,7 +7984,7 @@ var alertVariants = cva8(
|
|
|
7220
7984
|
destructive: "border-destructive/50 text-destructive bg-destructive/10 [&>svg]:text-destructive",
|
|
7221
7985
|
/** Alias kept for Bootstrap/shadcn-style codebases. */
|
|
7222
7986
|
danger: "border-destructive/50 text-destructive bg-destructive/10 [&>svg]:text-destructive",
|
|
7223
|
-
success: "border-success/50 text-success bg-success/10 [&>svg]:text-success",
|
|
7987
|
+
success: "border-success/50 text-success-ink bg-success/10 [&>svg]:text-success-ink",
|
|
7224
7988
|
warning: "border-warning/50 text-warning-ink bg-warning/10 [&>svg]:text-warning-ink",
|
|
7225
7989
|
info: "border-info/50 text-info-ink bg-info/10 [&>svg]:text-info-ink"
|
|
7226
7990
|
}
|
|
@@ -7230,8 +7994,8 @@ var alertVariants = cva8(
|
|
|
7230
7994
|
}
|
|
7231
7995
|
}
|
|
7232
7996
|
);
|
|
7233
|
-
var Alert =
|
|
7234
|
-
({ className, variant, ...props }, ref) => /* @__PURE__ */
|
|
7997
|
+
var Alert = React98.forwardRef(
|
|
7998
|
+
({ className, variant, ...props }, ref) => /* @__PURE__ */ jsx98(
|
|
7235
7999
|
"div",
|
|
7236
8000
|
{
|
|
7237
8001
|
ref,
|
|
@@ -7242,8 +8006,8 @@ var Alert = React95.forwardRef(
|
|
|
7242
8006
|
)
|
|
7243
8007
|
);
|
|
7244
8008
|
Alert.displayName = "Alert";
|
|
7245
|
-
var AlertTitle =
|
|
7246
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
8009
|
+
var AlertTitle = React98.forwardRef(
|
|
8010
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx98(
|
|
7247
8011
|
"h5",
|
|
7248
8012
|
{
|
|
7249
8013
|
ref,
|
|
@@ -7253,8 +8017,8 @@ var AlertTitle = React95.forwardRef(
|
|
|
7253
8017
|
)
|
|
7254
8018
|
);
|
|
7255
8019
|
AlertTitle.displayName = "AlertTitle";
|
|
7256
|
-
var AlertDescription =
|
|
7257
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
8020
|
+
var AlertDescription = React98.forwardRef(
|
|
8021
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx98(
|
|
7258
8022
|
"div",
|
|
7259
8023
|
{
|
|
7260
8024
|
ref,
|
|
@@ -7266,23 +8030,23 @@ var AlertDescription = React95.forwardRef(
|
|
|
7266
8030
|
AlertDescription.displayName = "AlertDescription";
|
|
7267
8031
|
|
|
7268
8032
|
// src/components/breadcrumb/Breadcrumb.tsx
|
|
7269
|
-
import * as
|
|
7270
|
-
import { jsx as
|
|
7271
|
-
var Breadcrumb =
|
|
8033
|
+
import * as React99 from "react";
|
|
8034
|
+
import { jsx as jsx99, jsxs as jsxs71 } from "react/jsx-runtime";
|
|
8035
|
+
var Breadcrumb = React99.forwardRef(
|
|
7272
8036
|
({ items, label = "Breadcrumb", separator = "/", onItemClick, linkComponent, linkHrefProp = "href", truncateCurrent = false, className, ...props }, ref) => {
|
|
7273
8037
|
const LinkEl = linkComponent ?? "a";
|
|
7274
|
-
return /* @__PURE__ */
|
|
8038
|
+
return /* @__PURE__ */ jsx99(
|
|
7275
8039
|
"nav",
|
|
7276
8040
|
{
|
|
7277
8041
|
ref,
|
|
7278
8042
|
"aria-label": label,
|
|
7279
8043
|
className: cn("flex items-center space-x-1.5 text-sm text-muted-foreground", className),
|
|
7280
8044
|
...props,
|
|
7281
|
-
children: /* @__PURE__ */
|
|
8045
|
+
children: /* @__PURE__ */ jsx99("ol", { className: "flex flex-wrap items-center space-x-1.5", children: items.map((item, index) => {
|
|
7282
8046
|
const isLast = index === items.length - 1;
|
|
7283
|
-
return /* @__PURE__ */
|
|
7284
|
-
index > 0 && /* @__PURE__ */
|
|
7285
|
-
item.href && !isLast ? /* @__PURE__ */
|
|
8047
|
+
return /* @__PURE__ */ jsxs71("li", { className: cn("flex items-center space-x-1.5", truncateCurrent && isLast && "min-w-0"), children: [
|
|
8048
|
+
index > 0 && /* @__PURE__ */ jsx99("span", { "aria-hidden": "true", className: "text-muted-foreground/50", children: separator }),
|
|
8049
|
+
item.href && !isLast ? /* @__PURE__ */ jsx99(
|
|
7286
8050
|
LinkEl,
|
|
7287
8051
|
{
|
|
7288
8052
|
...linkHrefProp === "to" ? { to: item.href } : { href: item.href },
|
|
@@ -7293,7 +8057,7 @@ var Breadcrumb = React96.forwardRef(
|
|
|
7293
8057
|
} : void 0,
|
|
7294
8058
|
children: item.label
|
|
7295
8059
|
}
|
|
7296
|
-
) : /* @__PURE__ */
|
|
8060
|
+
) : /* @__PURE__ */ jsx99(
|
|
7297
8061
|
"span",
|
|
7298
8062
|
{
|
|
7299
8063
|
"aria-current": isLast ? "page" : void 0,
|
|
@@ -7333,6 +8097,7 @@ export {
|
|
|
7333
8097
|
Button,
|
|
7334
8098
|
ButtonGroup,
|
|
7335
8099
|
CTASection,
|
|
8100
|
+
Calendar,
|
|
7336
8101
|
Card,
|
|
7337
8102
|
CardContent,
|
|
7338
8103
|
CardDescription,
|
|
@@ -7348,6 +8113,7 @@ export {
|
|
|
7348
8113
|
Container,
|
|
7349
8114
|
DataTable,
|
|
7350
8115
|
DatePicker,
|
|
8116
|
+
DatePickerPopover,
|
|
7351
8117
|
DateRangePicker,
|
|
7352
8118
|
DealCard,
|
|
7353
8119
|
Dialog,
|
|
@@ -7377,6 +8143,7 @@ export {
|
|
|
7377
8143
|
GridItem,
|
|
7378
8144
|
Heading,
|
|
7379
8145
|
Hero,
|
|
8146
|
+
Image2 as Image,
|
|
7380
8147
|
Input,
|
|
7381
8148
|
InputGroup,
|
|
7382
8149
|
InputGroupAddon,
|
|
@@ -7400,6 +8167,7 @@ export {
|
|
|
7400
8167
|
Pagination,
|
|
7401
8168
|
PasswordInput,
|
|
7402
8169
|
Popover,
|
|
8170
|
+
PopoverAnchor,
|
|
7403
8171
|
PopoverContent,
|
|
7404
8172
|
PopoverTrigger,
|
|
7405
8173
|
ProcessSteps,
|