@slipstream-ui/core 0.6.0 → 0.7.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 +337 -17
- package/dist/index.d.ts +337 -17
- package/dist/index.js +719 -226
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +713 -226
- package/dist/index.mjs.map +1 -1
- package/dist/manifests/accordion.manifest.json +1 -1
- 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/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/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 +1 -1
- 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 +158 -0
- package/dist/manifests/dialog.manifest.json +1 -1
- package/dist/manifests/document-card.manifest.json +108 -0
- package/dist/manifests/drawer.manifest.json +1 -1
- package/dist/manifests/empty-state.manifest.json +1 -1
- package/dist/manifests/entity-card.manifest.json +114 -0
- 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 +1 -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 +40 -8
- 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 +88 -0
- 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 +1 -1
- 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 +2 -2
- package/dist/manifests/select.manifest.json +1 -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 +1 -1
- 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 +69 -5
- 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 +26 -5
- 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 +97 -0
- package/dist/manifests/tooltip.manifest.json +1 -1
- package/dist/src/components/date-picker/DatePicker.js +1 -1
- package/dist/src/components/date-picker/DatePicker.js.map +1 -1
- package/dist/src/components/date-picker/DatePicker.mjs +1 -1
- package/dist/src/components/date-picker/DatePicker.mjs.map +1 -1
- package/dist/src/components/deal-card/DealCard.d.ts +72 -0
- package/dist/src/components/deal-card/DealCard.js +108 -0
- package/dist/src/components/deal-card/DealCard.js.map +1 -0
- package/dist/src/components/deal-card/DealCard.mjs +74 -0
- package/dist/src/components/deal-card/DealCard.mjs.map +1 -0
- package/dist/src/components/deal-card/index.d.ts +2 -0
- package/dist/src/components/deal-card/index.js +29 -0
- package/dist/src/components/deal-card/index.js.map +1 -0
- package/dist/src/components/deal-card/index.mjs +5 -0
- package/dist/src/components/deal-card/index.mjs.map +1 -0
- package/dist/src/components/document-card/DocumentCard.d.ts +42 -0
- package/dist/src/components/document-card/DocumentCard.js +84 -0
- package/dist/src/components/document-card/DocumentCard.js.map +1 -0
- package/dist/src/components/document-card/DocumentCard.mjs +50 -0
- package/dist/src/components/document-card/DocumentCard.mjs.map +1 -0
- package/dist/src/components/document-card/index.d.ts +2 -0
- package/dist/src/components/document-card/index.js +29 -0
- package/dist/src/components/document-card/index.js.map +1 -0
- package/dist/src/components/document-card/index.mjs +5 -0
- package/dist/src/components/document-card/index.mjs.map +1 -0
- package/dist/src/components/entity-card/EntityCard.d.ts +78 -0
- package/dist/src/components/entity-card/EntityCard.js +95 -0
- package/dist/src/components/entity-card/EntityCard.js.map +1 -0
- package/dist/src/components/entity-card/EntityCard.mjs +60 -0
- package/dist/src/components/entity-card/EntityCard.mjs.map +1 -0
- package/dist/src/components/entity-card/index.d.ts +2 -0
- package/dist/src/components/entity-card/index.js +31 -0
- package/dist/src/components/entity-card/index.js.map +1 -0
- package/dist/src/components/entity-card/index.mjs +6 -0
- package/dist/src/components/entity-card/index.mjs.map +1 -0
- package/dist/src/components/hero/Hero.d.ts +25 -13
- package/dist/src/components/hero/Hero.js +116 -12
- package/dist/src/components/hero/Hero.js.map +1 -1
- package/dist/src/components/hero/Hero.mjs +116 -12
- package/dist/src/components/hero/Hero.mjs.map +1 -1
- package/dist/src/components/load-more/LoadMore.d.ts +34 -0
- package/dist/src/components/load-more/LoadMore.js +55 -0
- package/dist/src/components/load-more/LoadMore.js.map +1 -0
- package/dist/src/components/load-more/LoadMore.mjs +21 -0
- package/dist/src/components/load-more/LoadMore.mjs.map +1 -0
- package/dist/src/components/load-more/index.d.ts +2 -0
- package/dist/src/components/load-more/index.js +29 -0
- package/dist/src/components/load-more/index.js.map +1 -0
- package/dist/src/components/load-more/index.mjs +5 -0
- package/dist/src/components/load-more/index.mjs.map +1 -0
- package/dist/src/components/range-slider/RangeSlider.js +6 -6
- package/dist/src/components/range-slider/RangeSlider.js.map +1 -1
- package/dist/src/components/range-slider/RangeSlider.mjs +6 -6
- package/dist/src/components/range-slider/RangeSlider.mjs.map +1 -1
- package/dist/src/components/select-menu/SelectMenu.js +2 -0
- package/dist/src/components/select-menu/SelectMenu.js.map +1 -1
- package/dist/src/components/select-menu/SelectMenu.mjs +2 -0
- package/dist/src/components/select-menu/SelectMenu.mjs.map +1 -1
- package/dist/src/components/separator/Separator.js +1 -1
- package/dist/src/components/separator/Separator.js.map +1 -1
- package/dist/src/components/separator/Separator.mjs +1 -1
- package/dist/src/components/separator/Separator.mjs.map +1 -1
- package/dist/src/components/stepper/Stepper.d.ts +35 -0
- package/dist/src/components/stepper/Stepper.js +118 -25
- package/dist/src/components/stepper/Stepper.js.map +1 -1
- package/dist/src/components/stepper/Stepper.mjs +118 -25
- package/dist/src/components/stepper/Stepper.mjs.map +1 -1
- package/dist/src/components/table-of-contents/TableOfContents.d.ts +10 -2
- package/dist/src/components/table-of-contents/TableOfContents.js +13 -0
- package/dist/src/components/table-of-contents/TableOfContents.js.map +1 -1
- package/dist/src/components/table-of-contents/TableOfContents.mjs +13 -0
- package/dist/src/components/table-of-contents/TableOfContents.mjs.map +1 -1
- package/dist/src/components/tabs/Tabs.js +43 -3
- package/dist/src/components/tabs/Tabs.js.map +1 -1
- package/dist/src/components/tabs/Tabs.mjs +43 -3
- package/dist/src/components/tabs/Tabs.mjs.map +1 -1
- package/dist/src/components/time-picker/TimePicker.js +1 -1
- package/dist/src/components/time-picker/TimePicker.js.map +1 -1
- package/dist/src/components/time-picker/TimePicker.mjs +1 -1
- package/dist/src/components/time-picker/TimePicker.mjs.map +1 -1
- package/dist/src/components/timeline/Timeline.js +2 -2
- package/dist/src/components/timeline/Timeline.js.map +1 -1
- package/dist/src/components/timeline/Timeline.mjs +2 -2
- package/dist/src/components/timeline/Timeline.mjs.map +1 -1
- package/dist/src/components/tombstone-card/TombstoneCard.d.ts +39 -0
- package/dist/src/components/tombstone-card/TombstoneCard.js +86 -0
- package/dist/src/components/tombstone-card/TombstoneCard.js.map +1 -0
- package/dist/src/components/tombstone-card/TombstoneCard.mjs +52 -0
- package/dist/src/components/tombstone-card/TombstoneCard.mjs.map +1 -0
- package/dist/src/components/tombstone-card/index.d.ts +2 -0
- package/dist/src/components/tombstone-card/index.js +29 -0
- package/dist/src/components/tombstone-card/index.js.map +1 -0
- package/dist/src/components/tombstone-card/index.mjs +5 -0
- package/dist/src/components/tombstone-card/index.mjs.map +1 -0
- package/dist/src/index.d.ts +5 -0
- package/dist/src/utils/modal-layer.js +3 -2
- package/dist/src/utils/modal-layer.js.map +1 -1
- package/dist/src/utils/modal-layer.mjs +3 -2
- package/dist/src/utils/modal-layer.mjs.map +1 -1
- package/dist/styles-full.css +1 -1
- package/dist/styles.css +1 -1
- package/package.json +4 -4
- package/src/components/date-picker/DatePicker.tsx +1 -1
- package/src/components/deal-card/DealCard.test.tsx +54 -0
- package/src/components/deal-card/DealCard.tsx +138 -0
- package/src/components/deal-card/index.ts +2 -0
- package/src/components/document-card/DocumentCard.test.tsx +41 -0
- package/src/components/document-card/DocumentCard.tsx +82 -0
- package/src/components/document-card/index.ts +2 -0
- package/src/components/entity-card/EntityCard.test.tsx +38 -0
- package/src/components/entity-card/EntityCard.tsx +133 -0
- package/src/components/entity-card/index.ts +2 -0
- package/src/components/hero/Hero.test.tsx +14 -0
- package/src/components/hero/Hero.tsx +111 -19
- package/src/components/load-more/LoadMore.test.tsx +28 -0
- package/src/components/load-more/LoadMore.tsx +53 -0
- package/src/components/load-more/index.ts +2 -0
- package/src/components/range-slider/RangeSlider.test.tsx +8 -0
- package/src/components/range-slider/RangeSlider.tsx +10 -6
- package/src/components/select-menu/SelectMenu.test.tsx +20 -10
- package/src/components/select-menu/SelectMenu.tsx +2 -0
- package/src/components/separator/Separator.test.tsx +9 -1
- package/src/components/separator/Separator.tsx +1 -1
- package/src/components/stepper/Stepper.test.tsx +19 -0
- package/src/components/stepper/Stepper.tsx +169 -37
- package/src/components/table-of-contents/TableOfContents.test.tsx +12 -1
- package/src/components/table-of-contents/TableOfContents.tsx +25 -1
- package/src/components/tabs/Tabs.test.tsx +12 -0
- package/src/components/tabs/Tabs.tsx +48 -4
- package/src/components/time-picker/TimePicker.tsx +1 -1
- package/src/components/timeline/Timeline.tsx +2 -2
- package/src/components/tombstone-card/TombstoneCard.test.tsx +26 -0
- package/src/components/tombstone-card/TombstoneCard.tsx +77 -0
- package/src/components/tombstone-card/index.ts +2 -0
- package/src/index.ts +5 -0
- package/src/manifests/accordion.manifest.json +1 -1
- 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/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/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 +1 -1
- 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 +158 -0
- package/src/manifests/dialog.manifest.json +1 -1
- package/src/manifests/document-card.manifest.json +108 -0
- package/src/manifests/drawer.manifest.json +1 -1
- package/src/manifests/empty-state.manifest.json +1 -1
- package/src/manifests/entity-card.manifest.json +114 -0
- 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 +1 -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 +40 -8
- 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 +88 -0
- 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 +1 -1
- 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 +2 -2
- package/src/manifests/select.manifest.json +1 -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 +1 -1
- 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 +69 -5
- 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 +26 -5
- 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 +97 -0
- package/src/manifests/tooltip.manifest.json +1 -1
- package/src/test/jest-axe.d.ts +6 -1
- package/src/utils/modal-layer.ts +3 -2
package/dist/index.mjs
CHANGED
|
@@ -62,8 +62,9 @@ var restoreScroll = null;
|
|
|
62
62
|
function useModalLayer(open) {
|
|
63
63
|
const id = React2.useRef(/* @__PURE__ */ Symbol("modal-layer"));
|
|
64
64
|
React2.useEffect(() => {
|
|
65
|
+
const layerId = id.current;
|
|
65
66
|
if (!open) return;
|
|
66
|
-
layers.push(
|
|
67
|
+
layers.push(layerId);
|
|
67
68
|
if (layers.length === 1) {
|
|
68
69
|
const previousOverflow = document.body.style.overflow;
|
|
69
70
|
document.body.style.overflow = "hidden";
|
|
@@ -72,7 +73,7 @@ function useModalLayer(open) {
|
|
|
72
73
|
};
|
|
73
74
|
}
|
|
74
75
|
return () => {
|
|
75
|
-
const index = layers.indexOf(
|
|
76
|
+
const index = layers.indexOf(layerId);
|
|
76
77
|
if (index >= 0) layers.splice(index, 1);
|
|
77
78
|
if (layers.length === 0) {
|
|
78
79
|
restoreScroll?.();
|
|
@@ -1405,6 +1406,7 @@ var SelectMenu = React17.forwardRef(function SelectMenu2({
|
|
|
1405
1406
|
{
|
|
1406
1407
|
ref: setTriggerRef,
|
|
1407
1408
|
type: "button",
|
|
1409
|
+
role: "combobox",
|
|
1408
1410
|
"aria-haspopup": "listbox",
|
|
1409
1411
|
"aria-expanded": open,
|
|
1410
1412
|
"aria-controls": open ? listboxId : void 0,
|
|
@@ -1433,6 +1435,7 @@ var SelectMenu = React17.forwardRef(function SelectMenu2({
|
|
|
1433
1435
|
ref: listRef,
|
|
1434
1436
|
id: listboxId,
|
|
1435
1437
|
role: "listbox",
|
|
1438
|
+
tabIndex: -1,
|
|
1436
1439
|
"aria-labelledby": labelId,
|
|
1437
1440
|
"aria-multiselectable": multiple || void 0,
|
|
1438
1441
|
style: {
|
|
@@ -2466,7 +2469,7 @@ var Separator = React32.forwardRef(
|
|
|
2466
2469
|
ref,
|
|
2467
2470
|
role: label ? "separator" : "none",
|
|
2468
2471
|
"aria-label": label,
|
|
2469
|
-
"aria-orientation": orientation === "vertical" ? "vertical" : void 0,
|
|
2472
|
+
"aria-orientation": label && orientation === "vertical" ? "vertical" : void 0,
|
|
2470
2473
|
className: cn(separatorVariants({ orientation }), className),
|
|
2471
2474
|
...props
|
|
2472
2475
|
}
|
|
@@ -2553,13 +2556,35 @@ var TabsContext = React35.createContext({
|
|
|
2553
2556
|
},
|
|
2554
2557
|
baseId: "",
|
|
2555
2558
|
variant: "default",
|
|
2556
|
-
size: "md"
|
|
2559
|
+
size: "md",
|
|
2560
|
+
panels: /* @__PURE__ */ new Set(),
|
|
2561
|
+
registerPanel: () => {
|
|
2562
|
+
},
|
|
2563
|
+
unregisterPanel: () => {
|
|
2564
|
+
}
|
|
2557
2565
|
});
|
|
2558
2566
|
var Tabs = React35.forwardRef(
|
|
2559
2567
|
({ value, defaultValue, onValueChange, variant = "default", size = "md", className, children }, ref) => {
|
|
2560
2568
|
const [internalValue, setInternalValue] = React35.useState(defaultValue ?? "");
|
|
2561
2569
|
const current = value ?? internalValue;
|
|
2562
2570
|
const baseId = React35.useId();
|
|
2571
|
+
const [panels, setPanels] = React35.useState(() => /* @__PURE__ */ new Set());
|
|
2572
|
+
const registerPanel = React35.useCallback((panelValue) => {
|
|
2573
|
+
setPanels((previous) => {
|
|
2574
|
+
if (previous.has(panelValue)) return previous;
|
|
2575
|
+
const next = new Set(previous);
|
|
2576
|
+
next.add(panelValue);
|
|
2577
|
+
return next;
|
|
2578
|
+
});
|
|
2579
|
+
}, []);
|
|
2580
|
+
const unregisterPanel = React35.useCallback((panelValue) => {
|
|
2581
|
+
setPanels((previous) => {
|
|
2582
|
+
if (!previous.has(panelValue)) return previous;
|
|
2583
|
+
const next = new Set(previous);
|
|
2584
|
+
next.delete(panelValue);
|
|
2585
|
+
return next;
|
|
2586
|
+
});
|
|
2587
|
+
}, []);
|
|
2563
2588
|
const setValue = React35.useCallback(
|
|
2564
2589
|
(next) => {
|
|
2565
2590
|
if (value === void 0) setInternalValue(next);
|
|
@@ -2567,7 +2592,20 @@ var Tabs = React35.forwardRef(
|
|
|
2567
2592
|
},
|
|
2568
2593
|
[value, onValueChange]
|
|
2569
2594
|
);
|
|
2570
|
-
|
|
2595
|
+
const contextValue = React35.useMemo(
|
|
2596
|
+
() => ({
|
|
2597
|
+
value: current,
|
|
2598
|
+
setValue,
|
|
2599
|
+
baseId,
|
|
2600
|
+
variant,
|
|
2601
|
+
size,
|
|
2602
|
+
panels,
|
|
2603
|
+
registerPanel,
|
|
2604
|
+
unregisterPanel
|
|
2605
|
+
}),
|
|
2606
|
+
[current, setValue, baseId, variant, size, panels, registerPanel, unregisterPanel]
|
|
2607
|
+
);
|
|
2608
|
+
return /* @__PURE__ */ jsx33("div", { ref, className, "data-value": current, "data-variant": variant, children: /* @__PURE__ */ jsx33(TabsContext.Provider, { value: contextValue, children }) });
|
|
2571
2609
|
}
|
|
2572
2610
|
);
|
|
2573
2611
|
Tabs.displayName = "Tabs";
|
|
@@ -2652,7 +2690,7 @@ var TabsTrigger = React35.forwardRef(
|
|
|
2652
2690
|
role: "tab",
|
|
2653
2691
|
id: `${ctx.baseId}-tab-${value}`,
|
|
2654
2692
|
"aria-selected": active,
|
|
2655
|
-
"aria-controls": `${ctx.baseId}-panel-${value}
|
|
2693
|
+
"aria-controls": ctx.panels.has(value) ? `${ctx.baseId}-panel-${value}` : void 0,
|
|
2656
2694
|
"data-state": active ? "active" : "inactive",
|
|
2657
2695
|
tabIndex: active ? 0 : -1,
|
|
2658
2696
|
onClick: () => ctx.setValue(value),
|
|
@@ -2693,7 +2731,12 @@ TabsTrigger.displayName = "TabsTrigger";
|
|
|
2693
2731
|
var TabsContent = React35.forwardRef(
|
|
2694
2732
|
({ value, className, ...props }, ref) => {
|
|
2695
2733
|
const ctx = React35.useContext(TabsContext);
|
|
2734
|
+
const { registerPanel, unregisterPanel } = ctx;
|
|
2696
2735
|
const active = ctx.value === value;
|
|
2736
|
+
React35.useEffect(() => {
|
|
2737
|
+
registerPanel(value);
|
|
2738
|
+
return () => unregisterPanel(value);
|
|
2739
|
+
}, [registerPanel, unregisterPanel, value]);
|
|
2697
2740
|
return /* @__PURE__ */ jsx33(
|
|
2698
2741
|
"div",
|
|
2699
2742
|
{
|
|
@@ -2969,6 +3012,7 @@ function TableOfContents({
|
|
|
2969
3012
|
ariaLabel,
|
|
2970
3013
|
labelClassName,
|
|
2971
3014
|
sticky = true,
|
|
3015
|
+
onNavigate,
|
|
2972
3016
|
className,
|
|
2973
3017
|
...props
|
|
2974
3018
|
}) {
|
|
@@ -2987,6 +3031,7 @@ function TableOfContents({
|
|
|
2987
3031
|
{
|
|
2988
3032
|
href: `#${heading.id}`,
|
|
2989
3033
|
"aria-current": active ? "location" : void 0,
|
|
3034
|
+
onClick: () => onNavigate?.(heading.id),
|
|
2990
3035
|
className: cn(
|
|
2991
3036
|
"-ml-px block border-l py-1 pl-3 no-underline transition-colors",
|
|
2992
3037
|
active ? "border-primary font-medium text-primary underline" : "border-transparent text-muted-foreground hover:border-border hover:text-foreground"
|
|
@@ -3018,6 +3063,17 @@ function useScrollSpy(ids, options) {
|
|
|
3018
3063
|
elements.forEach((element) => observer.observe(element));
|
|
3019
3064
|
return () => observer.disconnect();
|
|
3020
3065
|
}, [idKey, rootMargin]);
|
|
3066
|
+
React40.useEffect(() => {
|
|
3067
|
+
if (typeof window === "undefined") return;
|
|
3068
|
+
const ids2 = idKey.split("|").filter(Boolean);
|
|
3069
|
+
const syncFromHash = () => {
|
|
3070
|
+
const id = window.location.hash.replace(/^#/, "");
|
|
3071
|
+
if (id && ids2.includes(id)) setActiveId(id);
|
|
3072
|
+
};
|
|
3073
|
+
syncFromHash();
|
|
3074
|
+
window.addEventListener("hashchange", syncFromHash);
|
|
3075
|
+
return () => window.removeEventListener("hashchange", syncFromHash);
|
|
3076
|
+
}, [idKey]);
|
|
3021
3077
|
return activeId;
|
|
3022
3078
|
}
|
|
3023
3079
|
|
|
@@ -4373,7 +4429,7 @@ var DatePicker = React58.forwardRef(function DatePicker2({ value, defaultValue,
|
|
|
4373
4429
|
type: "button",
|
|
4374
4430
|
onClick: () => commit(""),
|
|
4375
4431
|
"aria-label": clearLabel,
|
|
4376
|
-
className: "absolute right-
|
|
4432
|
+
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",
|
|
4377
4433
|
children: "\u2715"
|
|
4378
4434
|
}
|
|
4379
4435
|
)
|
|
@@ -4411,7 +4467,7 @@ var TimePicker = React59.forwardRef(function TimePicker2({ value, defaultValue,
|
|
|
4411
4467
|
type: "button",
|
|
4412
4468
|
onClick: () => commit(""),
|
|
4413
4469
|
"aria-label": clearLabel,
|
|
4414
|
-
className: "absolute right-
|
|
4470
|
+
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",
|
|
4415
4471
|
children: "\u2715"
|
|
4416
4472
|
}
|
|
4417
4473
|
)
|
|
@@ -4421,52 +4477,145 @@ var TimePicker = React59.forwardRef(function TimePicker2({ value, defaultValue,
|
|
|
4421
4477
|
// src/components/stepper/Stepper.tsx
|
|
4422
4478
|
import * as React60 from "react";
|
|
4423
4479
|
import { Fragment as Fragment10, jsx as jsx59, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
4424
|
-
var Stepper = React60.forwardRef(function Stepper2({
|
|
4480
|
+
var Stepper = React60.forwardRef(function Stepper2({
|
|
4481
|
+
steps,
|
|
4482
|
+
current,
|
|
4483
|
+
orientation = "horizontal",
|
|
4484
|
+
variant = "numbered",
|
|
4485
|
+
size = "md",
|
|
4486
|
+
labelPlacement = "inline",
|
|
4487
|
+
alignTitles = "center",
|
|
4488
|
+
onStepClick,
|
|
4489
|
+
className,
|
|
4490
|
+
...props
|
|
4491
|
+
}, ref) {
|
|
4492
|
+
const vertical = orientation === "vertical";
|
|
4493
|
+
const interactive = Boolean(onStepClick);
|
|
4494
|
+
const markerSizeClass = size === "sm" ? "h-6 w-6 text-[11px]" : "h-7 w-7 text-xs";
|
|
4495
|
+
const dotSizeClass = size === "sm" ? "h-2 w-2" : "h-2.5 w-2.5";
|
|
4496
|
+
const labelSizeClass = size === "sm" ? "text-xs" : "text-sm";
|
|
4497
|
+
const descriptionSizeClass = size === "sm" ? "text-[11px]" : "text-xs";
|
|
4498
|
+
const gapClass = size === "sm" ? "gap-1.5" : "gap-2";
|
|
4499
|
+
const verticalTitlePad = size === "sm" ? "pt-0.5" : "pt-1";
|
|
4500
|
+
const connectorTop = variant === "dots" ? size === "sm" ? "mt-1" : "mt-[5px]" : size === "sm" ? "mt-3" : "mt-3.5";
|
|
4501
|
+
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";
|
|
4425
4502
|
return /* @__PURE__ */ jsx59(
|
|
4426
4503
|
"ol",
|
|
4427
4504
|
{
|
|
4428
4505
|
ref,
|
|
4429
4506
|
className: cn(
|
|
4430
|
-
"flex gap-4",
|
|
4431
|
-
orientation === "vertical" ? "flex-col" : "flex-wrap items-start",
|
|
4507
|
+
vertical ? "flex flex-col" : "flex flex-wrap items-start gap-4",
|
|
4432
4508
|
className
|
|
4433
4509
|
),
|
|
4434
4510
|
...props,
|
|
4435
4511
|
children: steps.map((step, index) => {
|
|
4436
4512
|
const state = index < current ? "complete" : index === current ? "current" : "upcoming";
|
|
4437
|
-
const
|
|
4438
|
-
const
|
|
4513
|
+
const isLast = index === steps.length - 1;
|
|
4514
|
+
const titleCentered = alignTitles === "center" && !step.description;
|
|
4515
|
+
const below = !vertical && labelPlacement === "below";
|
|
4516
|
+
const marker = /* @__PURE__ */ jsx59(
|
|
4517
|
+
"span",
|
|
4518
|
+
{
|
|
4519
|
+
"aria-hidden": "true",
|
|
4520
|
+
className: cn(
|
|
4521
|
+
"flex shrink-0 items-center justify-center",
|
|
4522
|
+
variant === "dots" ? cn(
|
|
4523
|
+
"rounded-full",
|
|
4524
|
+
dotSizeClass,
|
|
4525
|
+
state === "upcoming" ? "bg-border" : "bg-primary",
|
|
4526
|
+
state === "current" && "ring-2 ring-primary/30 ring-offset-2 ring-offset-background"
|
|
4527
|
+
) : cn(
|
|
4528
|
+
"rounded-full border font-medium",
|
|
4529
|
+
markerSizeClass,
|
|
4530
|
+
state === "complete" && "border-primary bg-primary text-primary-foreground",
|
|
4531
|
+
state === "current" && "border-primary text-primary",
|
|
4532
|
+
state === "upcoming" && "border-border text-muted-foreground"
|
|
4533
|
+
)
|
|
4534
|
+
),
|
|
4535
|
+
children: variant === "numbered" ? state === "complete" ? "\u2713" : index + 1 : null
|
|
4536
|
+
}
|
|
4537
|
+
);
|
|
4538
|
+
const label = /* @__PURE__ */ jsxs41("span", { className: "min-w-0", children: [
|
|
4439
4539
|
/* @__PURE__ */ jsx59(
|
|
4440
4540
|
"span",
|
|
4441
4541
|
{
|
|
4442
|
-
"aria-hidden": "true",
|
|
4443
4542
|
className: cn(
|
|
4444
|
-
"
|
|
4445
|
-
|
|
4446
|
-
|
|
4447
|
-
state === "upcoming"
|
|
4543
|
+
"block leading-5",
|
|
4544
|
+
labelSizeClass,
|
|
4545
|
+
below && "text-center",
|
|
4546
|
+
state === "upcoming" ? "text-muted-foreground" : "font-medium"
|
|
4448
4547
|
),
|
|
4449
|
-
children:
|
|
4548
|
+
children: step.label
|
|
4450
4549
|
}
|
|
4451
4550
|
),
|
|
4452
|
-
/* @__PURE__ */
|
|
4453
|
-
|
|
4454
|
-
|
|
4455
|
-
|
|
4456
|
-
|
|
4551
|
+
step.description && /* @__PURE__ */ jsx59(
|
|
4552
|
+
"span",
|
|
4553
|
+
{
|
|
4554
|
+
className: cn(
|
|
4555
|
+
"mt-0.5 block leading-4 text-muted-foreground",
|
|
4556
|
+
descriptionSizeClass,
|
|
4557
|
+
below && "text-center"
|
|
4558
|
+
),
|
|
4559
|
+
children: step.description
|
|
4560
|
+
}
|
|
4561
|
+
),
|
|
4562
|
+
/* @__PURE__ */ jsx59("span", { className: "sr-only", children: state === "complete" ? " (completed)" : state === "current" ? " (current step)" : " (upcoming)" })
|
|
4457
4563
|
] });
|
|
4564
|
+
const renderRow = (children, rowClassName) => interactive ? /* @__PURE__ */ jsx59(
|
|
4565
|
+
"button",
|
|
4566
|
+
{
|
|
4567
|
+
type: "button",
|
|
4568
|
+
onClick: () => onStepClick?.(index),
|
|
4569
|
+
"aria-current": state === "current" ? "step" : void 0,
|
|
4570
|
+
className: cn(rowClassName, focusClass),
|
|
4571
|
+
children
|
|
4572
|
+
}
|
|
4573
|
+
) : /* @__PURE__ */ jsx59("div", { "aria-current": state === "current" ? "step" : void 0, className: rowClassName, children });
|
|
4574
|
+
if (vertical) {
|
|
4575
|
+
return /* @__PURE__ */ jsx59("li", { className: "flex", children: renderRow(
|
|
4576
|
+
/* @__PURE__ */ jsxs41(Fragment10, { children: [
|
|
4577
|
+
/* @__PURE__ */ jsxs41("div", { className: "flex flex-col items-center", children: [
|
|
4578
|
+
marker,
|
|
4579
|
+
!isLast && /* @__PURE__ */ jsx59("span", { "aria-hidden": "true", className: "my-1 w-px flex-1 rounded-full bg-border" })
|
|
4580
|
+
] }),
|
|
4581
|
+
/* @__PURE__ */ jsx59("div", { className: cn("min-w-0 pb-6", titleCentered && verticalTitlePad), children: label })
|
|
4582
|
+
] }),
|
|
4583
|
+
"flex w-full items-stretch gap-3 text-left"
|
|
4584
|
+
) }, step.label);
|
|
4585
|
+
}
|
|
4586
|
+
if (below) {
|
|
4587
|
+
return /* @__PURE__ */ jsxs41("li", { className: "flex min-w-0 flex-1 items-start gap-2", children: [
|
|
4588
|
+
renderRow(
|
|
4589
|
+
/* @__PURE__ */ jsxs41(Fragment10, { children: [
|
|
4590
|
+
marker,
|
|
4591
|
+
label
|
|
4592
|
+
] }),
|
|
4593
|
+
"flex min-w-0 flex-1 flex-col items-center gap-2 text-center"
|
|
4594
|
+
),
|
|
4595
|
+
!isLast && /* @__PURE__ */ jsx59(
|
|
4596
|
+
"span",
|
|
4597
|
+
{
|
|
4598
|
+
"aria-hidden": "true",
|
|
4599
|
+
className: cn("h-px min-w-4 flex-1 bg-border", connectorTop)
|
|
4600
|
+
}
|
|
4601
|
+
)
|
|
4602
|
+
] }, step.label);
|
|
4603
|
+
}
|
|
4458
4604
|
return /* @__PURE__ */ jsxs41("li", { className: "flex min-w-0 items-start gap-2", children: [
|
|
4459
|
-
|
|
4460
|
-
|
|
4605
|
+
renderRow(
|
|
4606
|
+
/* @__PURE__ */ jsxs41(Fragment10, { children: [
|
|
4607
|
+
marker,
|
|
4608
|
+
label
|
|
4609
|
+
] }),
|
|
4610
|
+
cn("flex min-w-0 text-left", gapClass, titleCentered ? "items-center" : "items-start")
|
|
4611
|
+
),
|
|
4612
|
+
!isLast && /* @__PURE__ */ jsx59(
|
|
4613
|
+
"span",
|
|
4461
4614
|
{
|
|
4462
|
-
|
|
4463
|
-
|
|
4464
|
-
"aria-current": state === "current" ? "step" : void 0,
|
|
4465
|
-
className: "flex items-start gap-2 rounded-md text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
4466
|
-
children: content
|
|
4615
|
+
"aria-hidden": "true",
|
|
4616
|
+
className: cn("h-px w-6 shrink-0 bg-border sm:w-8", connectorTop)
|
|
4467
4617
|
}
|
|
4468
|
-
)
|
|
4469
|
-
orientation === "horizontal" && index < steps.length - 1 && /* @__PURE__ */ jsx59("span", { "aria-hidden": "true", className: "mt-3.5 hidden h-px w-8 bg-border sm:block" })
|
|
4618
|
+
)
|
|
4470
4619
|
] }, step.label);
|
|
4471
4620
|
})
|
|
4472
4621
|
}
|
|
@@ -4607,9 +4756,9 @@ var Timeline = React62.forwardRef(function Timeline2({ items, className, ...prop
|
|
|
4607
4756
|
),
|
|
4608
4757
|
index < items.length - 1 && /* @__PURE__ */ jsx61("span", { "aria-hidden": "true", className: "mt-1 w-px flex-1 bg-border" })
|
|
4609
4758
|
] }),
|
|
4610
|
-
/* @__PURE__ */ jsxs43("div", { className:
|
|
4759
|
+
/* @__PURE__ */ jsxs43("div", { className: "min-w-0 pb-1", children: [
|
|
4611
4760
|
item.period && /* @__PURE__ */ jsx61("p", { className: "text-xs font-medium uppercase tracking-wide text-muted-foreground", children: item.period }),
|
|
4612
|
-
/* @__PURE__ */ jsx61("p", { className: "text-sm font-semibold", children: item.title }),
|
|
4761
|
+
/* @__PURE__ */ jsx61("p", { className: cn("text-sm font-semibold", item.muted && "text-muted-foreground"), children: item.title }),
|
|
4613
4762
|
item.description && /* @__PURE__ */ jsx61("p", { className: "mt-1 text-sm text-muted-foreground", children: item.description }),
|
|
4614
4763
|
item.icon && /* @__PURE__ */ jsx61("div", { className: "mt-1 text-muted-foreground [&_svg]:size-4", children: item.icon })
|
|
4615
4764
|
] })
|
|
@@ -4921,8 +5070,8 @@ var Section = React67.forwardRef(function Section2({
|
|
|
4921
5070
|
import * as React68 from "react";
|
|
4922
5071
|
import { jsx as jsx67, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
4923
5072
|
var titleSizes = {
|
|
4924
|
-
md: "text-
|
|
4925
|
-
lg: "text-4xl sm:text-5xl
|
|
5073
|
+
md: "text-3xl sm:text-4xl md:text-5xl",
|
|
5074
|
+
lg: "text-4xl sm:text-5xl md:text-6xl lg:leading-[1.05]"
|
|
4926
5075
|
};
|
|
4927
5076
|
var Hero = React68.forwardRef(function Hero2({
|
|
4928
5077
|
title,
|
|
@@ -4941,6 +5090,7 @@ var Hero = React68.forwardRef(function Hero2({
|
|
|
4941
5090
|
descriptionClassName,
|
|
4942
5091
|
eyebrowClassName,
|
|
4943
5092
|
badgeClassName,
|
|
5093
|
+
mediaClassName,
|
|
4944
5094
|
className,
|
|
4945
5095
|
...props
|
|
4946
5096
|
}, ref) {
|
|
@@ -4948,28 +5098,131 @@ var Hero = React68.forwardRef(function Hero2({
|
|
|
4948
5098
|
const layout = variant ?? (media ? "split" : "centered");
|
|
4949
5099
|
const Heading2 = `h${level}`;
|
|
4950
5100
|
const centered = layout === "centered" || align === "center";
|
|
4951
|
-
const
|
|
4952
|
-
|
|
4953
|
-
|
|
4954
|
-
|
|
4955
|
-
|
|
4956
|
-
|
|
4957
|
-
|
|
5101
|
+
const overlay = layout === "overlay";
|
|
5102
|
+
const copy = /* @__PURE__ */ jsxs44(
|
|
5103
|
+
"div",
|
|
5104
|
+
{
|
|
5105
|
+
className: cn(
|
|
5106
|
+
"min-w-0",
|
|
5107
|
+
centered && "mx-auto flex max-w-3xl flex-col items-center text-center",
|
|
5108
|
+
overlay && "max-w-2xl"
|
|
5109
|
+
),
|
|
5110
|
+
children: [
|
|
5111
|
+
badge && /* @__PURE__ */ jsx67(
|
|
5112
|
+
"div",
|
|
5113
|
+
{
|
|
5114
|
+
className: cn(
|
|
5115
|
+
"mb-5 inline-flex rounded-full border px-3 py-1 text-xs font-medium",
|
|
5116
|
+
overlay ? "border-background/30 bg-background/10 text-background" : "border-primary/30 bg-primary/10 text-primary",
|
|
5117
|
+
badgeClassName
|
|
5118
|
+
),
|
|
5119
|
+
children: badge
|
|
5120
|
+
}
|
|
5121
|
+
),
|
|
5122
|
+
eyebrow && /* @__PURE__ */ jsx67(
|
|
5123
|
+
"p",
|
|
5124
|
+
{
|
|
5125
|
+
className: cn(
|
|
5126
|
+
"mb-3 text-xs font-semibold uppercase tracking-widest",
|
|
5127
|
+
overlay ? "text-background/90" : "text-primary",
|
|
5128
|
+
eyebrowClassName
|
|
5129
|
+
),
|
|
5130
|
+
children: eyebrow
|
|
5131
|
+
}
|
|
5132
|
+
),
|
|
5133
|
+
/* @__PURE__ */ jsx67(
|
|
5134
|
+
Heading2,
|
|
5135
|
+
{
|
|
5136
|
+
className: cn(
|
|
5137
|
+
"font-semibold tracking-tight text-balance",
|
|
5138
|
+
titleSizes[size],
|
|
5139
|
+
overlay && "text-background",
|
|
5140
|
+
titleClassName
|
|
5141
|
+
),
|
|
5142
|
+
children: title
|
|
5143
|
+
}
|
|
5144
|
+
),
|
|
5145
|
+
description && /* @__PURE__ */ jsx67(
|
|
5146
|
+
"p",
|
|
5147
|
+
{
|
|
5148
|
+
className: cn(
|
|
5149
|
+
"mt-5 text-base leading-relaxed sm:text-lg",
|
|
5150
|
+
overlay ? "text-background/80" : "text-muted-foreground",
|
|
5151
|
+
centered ? "max-w-2xl" : "max-w-xl",
|
|
5152
|
+
descriptionClassName
|
|
5153
|
+
),
|
|
5154
|
+
children: description
|
|
5155
|
+
}
|
|
5156
|
+
),
|
|
5157
|
+
actions && /* @__PURE__ */ jsx67(
|
|
5158
|
+
"div",
|
|
5159
|
+
{
|
|
5160
|
+
className: cn(
|
|
5161
|
+
"mt-8 flex flex-wrap items-center gap-3",
|
|
5162
|
+
centered && "justify-center"
|
|
5163
|
+
),
|
|
5164
|
+
children: actions
|
|
5165
|
+
}
|
|
5166
|
+
)
|
|
5167
|
+
]
|
|
5168
|
+
}
|
|
5169
|
+
);
|
|
5170
|
+
if (overlay) {
|
|
5171
|
+
return /* @__PURE__ */ jsxs44(
|
|
5172
|
+
Tag,
|
|
5173
|
+
{
|
|
5174
|
+
ref,
|
|
5175
|
+
className: cn(
|
|
5176
|
+
"relative isolate flex min-h-[22rem] w-full items-center overflow-hidden rounded-lg py-12 sm:min-h-[26rem] sm:py-16 lg:min-h-[32rem] lg:py-20",
|
|
5177
|
+
className
|
|
5178
|
+
),
|
|
5179
|
+
...props,
|
|
5180
|
+
children: [
|
|
5181
|
+
media && /* @__PURE__ */ jsx67(
|
|
5182
|
+
"div",
|
|
5183
|
+
{
|
|
5184
|
+
className: cn(
|
|
5185
|
+
"absolute inset-0 -z-20 [&>*]:h-full [&>*]:w-full [&>*]:object-cover",
|
|
5186
|
+
mediaClassName
|
|
5187
|
+
),
|
|
5188
|
+
children: media
|
|
5189
|
+
}
|
|
5190
|
+
),
|
|
5191
|
+
/* @__PURE__ */ jsx67("div", { "aria-hidden": "true", className: "absolute inset-0 -z-10 bg-foreground/60" }),
|
|
5192
|
+
/* @__PURE__ */ jsx67("div", { className: "relative w-full px-4 sm:px-6 lg:px-10", children: copy })
|
|
5193
|
+
]
|
|
5194
|
+
}
|
|
5195
|
+
);
|
|
5196
|
+
}
|
|
4958
5197
|
if (layout === "centered") {
|
|
4959
5198
|
return /* @__PURE__ */ jsxs44(Tag, { ref, className: cn("w-full", className), ...props, children: [
|
|
4960
5199
|
copy,
|
|
4961
|
-
media && /* @__PURE__ */ jsx67("div", { className: "mt-12", children: media })
|
|
5200
|
+
media && /* @__PURE__ */ jsx67("div", { className: cn("mt-12 min-w-0", mediaClassName), children: media })
|
|
4962
5201
|
] });
|
|
4963
5202
|
}
|
|
5203
|
+
if (layout === "stacked") {
|
|
5204
|
+
return /* @__PURE__ */ jsxs44(
|
|
5205
|
+
Tag,
|
|
5206
|
+
{
|
|
5207
|
+
ref,
|
|
5208
|
+
className: cn("flex w-full flex-col gap-10 lg:gap-14", className),
|
|
5209
|
+
...props,
|
|
5210
|
+
children: [
|
|
5211
|
+
copy,
|
|
5212
|
+
media && /* @__PURE__ */ jsx67("div", { className: cn("min-w-0 w-full", mediaClassName), children: media })
|
|
5213
|
+
]
|
|
5214
|
+
}
|
|
5215
|
+
);
|
|
5216
|
+
}
|
|
4964
5217
|
return /* @__PURE__ */ jsxs44(
|
|
4965
5218
|
Tag,
|
|
4966
5219
|
{
|
|
4967
5220
|
ref,
|
|
4968
|
-
className: cn("grid w-full items-center gap-10 lg:grid-cols-2 lg:gap-16", className),
|
|
5221
|
+
className: cn("grid w-full items-center gap-10 lg:grid-cols-2 lg:gap-16 xl:gap-20", className),
|
|
4969
5222
|
...props,
|
|
4970
5223
|
children: [
|
|
4971
5224
|
/* @__PURE__ */ jsx67("div", { className: cn(mediaPosition === "left" && "lg:order-2"), children: copy }),
|
|
4972
|
-
media && /* @__PURE__ */ jsx67("div", { className: cn("min-w-0", mediaPosition === "left" && "lg:order-1"), children: media })
|
|
5225
|
+
media && /* @__PURE__ */ jsx67("div", { className: cn("min-w-0", mediaPosition === "left" && "lg:order-1", mediaClassName), children: media })
|
|
4973
5226
|
]
|
|
4974
5227
|
}
|
|
4975
5228
|
);
|
|
@@ -5534,15 +5787,243 @@ var AnnouncementBar = React80.forwardRef(
|
|
|
5534
5787
|
}
|
|
5535
5788
|
);
|
|
5536
5789
|
|
|
5537
|
-
// src/components/
|
|
5790
|
+
// src/components/deal-card/DealCard.tsx
|
|
5538
5791
|
import * as React81 from "react";
|
|
5539
5792
|
import { jsx as jsx80, jsxs as jsxs57 } from "react/jsx-runtime";
|
|
5793
|
+
var statusConfig = {
|
|
5794
|
+
available: { label: "Available", variant: "success" },
|
|
5795
|
+
"under-nda": { label: "Under NDA", variant: "info" },
|
|
5796
|
+
closed: { label: "Closed", variant: "secondary" },
|
|
5797
|
+
draft: { label: "Draft", variant: "outline" }
|
|
5798
|
+
};
|
|
5799
|
+
var DealCard = React81.forwardRef(function DealCard2({
|
|
5800
|
+
title,
|
|
5801
|
+
sector,
|
|
5802
|
+
location,
|
|
5803
|
+
description,
|
|
5804
|
+
metrics,
|
|
5805
|
+
status = "available",
|
|
5806
|
+
ndaAvailable,
|
|
5807
|
+
cimAvailable,
|
|
5808
|
+
href,
|
|
5809
|
+
linkComponent,
|
|
5810
|
+
saved = false,
|
|
5811
|
+
onSave,
|
|
5812
|
+
saveLabel = "Save",
|
|
5813
|
+
onRequestAccess,
|
|
5814
|
+
requestLabel = "Request access",
|
|
5815
|
+
className,
|
|
5816
|
+
...props
|
|
5817
|
+
}, ref) {
|
|
5818
|
+
const Link3 = linkComponent ?? "a";
|
|
5819
|
+
const statusInfo = statusConfig[status];
|
|
5820
|
+
return /* @__PURE__ */ jsxs57(Card, { ref, className: cn("flex h-full flex-col overflow-hidden", className), ...props, children: [
|
|
5821
|
+
/* @__PURE__ */ jsxs57(CardHeader, { className: "gap-2 p-5 pb-3", children: [
|
|
5822
|
+
/* @__PURE__ */ jsxs57("div", { className: "flex items-start justify-between gap-2", children: [
|
|
5823
|
+
/* @__PURE__ */ jsx80("p", { className: "text-xs font-semibold uppercase tracking-widest text-primary", children: sector }),
|
|
5824
|
+
/* @__PURE__ */ jsx80(Badge, { variant: statusInfo.variant, children: statusInfo.label })
|
|
5825
|
+
] }),
|
|
5826
|
+
/* @__PURE__ */ jsx80("h3", { className: "text-lg font-semibold leading-snug tracking-tight", children: href ? /* @__PURE__ */ jsx80(Link3, { href, className: "rounded-sm hover:text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", children: title }) : title }),
|
|
5827
|
+
location && /* @__PURE__ */ jsx80("p", { className: "text-xs text-muted-foreground", children: location })
|
|
5828
|
+
] }),
|
|
5829
|
+
/* @__PURE__ */ jsxs57(CardContent, { className: "flex-1 px-5 pb-3", children: [
|
|
5830
|
+
description && /* @__PURE__ */ jsx80("p", { className: "line-clamp-2 text-sm leading-relaxed text-muted-foreground", children: description }),
|
|
5831
|
+
/* @__PURE__ */ jsx80("dl", { className: "mt-4 grid grid-cols-3 gap-3", children: metrics.map((metric) => /* @__PURE__ */ jsxs57("div", { className: "min-w-0", children: [
|
|
5832
|
+
/* @__PURE__ */ jsx80("dt", { className: "text-xs text-muted-foreground", children: metric.label }),
|
|
5833
|
+
/* @__PURE__ */ jsx80("dd", { className: "mt-0.5 truncate text-sm font-semibold tabular-nums", children: metric.value })
|
|
5834
|
+
] }, metric.label)) }),
|
|
5835
|
+
(ndaAvailable || cimAvailable) && /* @__PURE__ */ jsxs57("div", { className: "mt-4 flex flex-wrap gap-1.5", children: [
|
|
5836
|
+
ndaAvailable && /* @__PURE__ */ jsx80(Badge, { variant: "info", children: "NDA available" }),
|
|
5837
|
+
cimAvailable && /* @__PURE__ */ jsx80(Badge, { variant: "secondary", children: "CIM available" })
|
|
5838
|
+
] })
|
|
5839
|
+
] }),
|
|
5840
|
+
/* @__PURE__ */ jsxs57(CardFooter, { className: "flex flex-wrap items-center gap-2 border-t border-border px-5 py-3", children: [
|
|
5841
|
+
onRequestAccess && /* @__PURE__ */ jsx80(Button, { type: "button", size: "sm", onClick: onRequestAccess, children: requestLabel }),
|
|
5842
|
+
onSave && /* @__PURE__ */ jsx80(
|
|
5843
|
+
Button,
|
|
5844
|
+
{
|
|
5845
|
+
type: "button",
|
|
5846
|
+
size: "sm",
|
|
5847
|
+
variant: "ghost",
|
|
5848
|
+
"aria-pressed": saved,
|
|
5849
|
+
onClick: onSave,
|
|
5850
|
+
className: "ml-auto",
|
|
5851
|
+
children: saved ? "Saved" : saveLabel
|
|
5852
|
+
}
|
|
5853
|
+
)
|
|
5854
|
+
] })
|
|
5855
|
+
] });
|
|
5856
|
+
});
|
|
5857
|
+
|
|
5858
|
+
// src/components/entity-card/EntityCard.tsx
|
|
5859
|
+
import * as React82 from "react";
|
|
5860
|
+
import { jsx as jsx81, jsxs as jsxs58 } from "react/jsx-runtime";
|
|
5861
|
+
function initials(name) {
|
|
5862
|
+
return name.split(/\s+/).filter(Boolean).slice(0, 2).map((part) => part[0]?.toUpperCase() ?? "").join("");
|
|
5863
|
+
}
|
|
5864
|
+
var EntityCard = React82.forwardRef(function EntityCard2({
|
|
5865
|
+
name,
|
|
5866
|
+
entityType,
|
|
5867
|
+
location,
|
|
5868
|
+
description,
|
|
5869
|
+
logo,
|
|
5870
|
+
stats,
|
|
5871
|
+
tags,
|
|
5872
|
+
href,
|
|
5873
|
+
linkComponent,
|
|
5874
|
+
actions,
|
|
5875
|
+
className,
|
|
5876
|
+
...props
|
|
5877
|
+
}, ref) {
|
|
5878
|
+
const Link3 = linkComponent ?? "a";
|
|
5879
|
+
return /* @__PURE__ */ jsxs58(Card, { ref, className: cn("flex h-full flex-col", className), ...props, children: [
|
|
5880
|
+
/* @__PURE__ */ jsxs58(CardHeader, { className: "flex-row items-start gap-3 p-5 pb-3", children: [
|
|
5881
|
+
/* @__PURE__ */ jsx81("div", { className: "shrink-0", children: logo ?? /* @__PURE__ */ jsx81(Avatar, { children: /* @__PURE__ */ jsx81(AvatarFallback, { children: initials(name) }) }) }),
|
|
5882
|
+
/* @__PURE__ */ jsxs58("div", { className: "min-w-0 flex-1", children: [
|
|
5883
|
+
/* @__PURE__ */ jsx81("h3", { className: "truncate text-base font-semibold tracking-tight", children: href ? /* @__PURE__ */ jsx81(Link3, { href, className: "rounded-sm hover:text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", children: name }) : name }),
|
|
5884
|
+
/* @__PURE__ */ jsx81("p", { className: "mt-0.5 truncate text-xs text-muted-foreground", children: entityType }),
|
|
5885
|
+
location && /* @__PURE__ */ jsx81("p", { className: "mt-0.5 truncate text-xs text-muted-foreground", children: location })
|
|
5886
|
+
] })
|
|
5887
|
+
] }),
|
|
5888
|
+
/* @__PURE__ */ jsxs58(CardContent, { className: "flex-1 px-5 pb-3", children: [
|
|
5889
|
+
description && /* @__PURE__ */ jsx81("p", { className: "line-clamp-3 text-sm leading-relaxed text-muted-foreground", children: description }),
|
|
5890
|
+
tags && tags.length > 0 && /* @__PURE__ */ jsx81("div", { className: "mt-3 flex flex-wrap gap-1.5", children: tags.map((tag) => /* @__PURE__ */ jsx81(Badge, { variant: "secondary", children: tag }, tag)) }),
|
|
5891
|
+
stats && stats.length > 0 && /* @__PURE__ */ jsx81("dl", { className: "mt-4 grid grid-cols-2 gap-3", children: stats.map((stat) => /* @__PURE__ */ jsxs58("div", { className: "min-w-0", children: [
|
|
5892
|
+
/* @__PURE__ */ jsx81("dt", { className: "text-xs text-muted-foreground", children: stat.label }),
|
|
5893
|
+
/* @__PURE__ */ jsx81("dd", { className: "mt-0.5 truncate text-sm font-semibold tabular-nums", children: stat.value })
|
|
5894
|
+
] }, stat.label)) })
|
|
5895
|
+
] }),
|
|
5896
|
+
(href || actions) && /* @__PURE__ */ jsxs58(CardFooter, { className: "flex flex-wrap items-center gap-2 border-t border-border px-5 py-3", children: [
|
|
5897
|
+
href && /* @__PURE__ */ jsx81(
|
|
5898
|
+
Link3,
|
|
5899
|
+
{
|
|
5900
|
+
href,
|
|
5901
|
+
className: "text-sm font-medium text-primary underline-offset-4 hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
5902
|
+
children: "View profile"
|
|
5903
|
+
}
|
|
5904
|
+
),
|
|
5905
|
+
actions && /* @__PURE__ */ jsx81("div", { className: "ml-auto flex items-center gap-2", children: actions })
|
|
5906
|
+
] })
|
|
5907
|
+
] });
|
|
5908
|
+
});
|
|
5909
|
+
var ProfileCard = EntityCard;
|
|
5910
|
+
|
|
5911
|
+
// src/components/tombstone-card/TombstoneCard.tsx
|
|
5912
|
+
import * as React83 from "react";
|
|
5913
|
+
import { jsx as jsx82, jsxs as jsxs59 } from "react/jsx-runtime";
|
|
5914
|
+
var statusConfig2 = {
|
|
5915
|
+
archived: { label: "Archived", variant: "secondary" },
|
|
5916
|
+
unavailable: { label: "Unavailable", variant: "warning" },
|
|
5917
|
+
closed: { label: "Closed", variant: "outline" }
|
|
5918
|
+
};
|
|
5919
|
+
var TombstoneCard = React83.forwardRef(function TombstoneCard2({
|
|
5920
|
+
title,
|
|
5921
|
+
reason,
|
|
5922
|
+
status = "unavailable",
|
|
5923
|
+
logo,
|
|
5924
|
+
href,
|
|
5925
|
+
actionLabel = "View details",
|
|
5926
|
+
linkComponent,
|
|
5927
|
+
className,
|
|
5928
|
+
...props
|
|
5929
|
+
}, ref) {
|
|
5930
|
+
const Link3 = linkComponent ?? "a";
|
|
5931
|
+
const statusInfo = statusConfig2[status];
|
|
5932
|
+
return /* @__PURE__ */ jsx82(
|
|
5933
|
+
Card,
|
|
5934
|
+
{
|
|
5935
|
+
ref,
|
|
5936
|
+
className: cn("flex h-full flex-col border-dashed bg-muted/30 shadow-none", className),
|
|
5937
|
+
...props,
|
|
5938
|
+
children: /* @__PURE__ */ jsxs59(CardContent, { className: "flex flex-1 flex-col gap-3 p-5", children: [
|
|
5939
|
+
/* @__PURE__ */ jsxs59("div", { className: "flex items-start justify-between gap-2", children: [
|
|
5940
|
+
logo && /* @__PURE__ */ jsx82("div", { className: "min-w-0 opacity-70", children: logo }),
|
|
5941
|
+
/* @__PURE__ */ jsx82(Badge, { variant: statusInfo.variant, children: statusInfo.label })
|
|
5942
|
+
] }),
|
|
5943
|
+
/* @__PURE__ */ jsx82("h3", { className: "text-base font-semibold tracking-tight text-foreground/80", children: title }),
|
|
5944
|
+
reason && /* @__PURE__ */ jsx82("p", { className: "text-sm leading-relaxed text-muted-foreground", children: reason }),
|
|
5945
|
+
href && /* @__PURE__ */ jsx82(
|
|
5946
|
+
Link3,
|
|
5947
|
+
{
|
|
5948
|
+
href,
|
|
5949
|
+
className: "mt-auto text-sm font-medium text-primary underline-offset-4 hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
5950
|
+
children: actionLabel
|
|
5951
|
+
}
|
|
5952
|
+
)
|
|
5953
|
+
] })
|
|
5954
|
+
}
|
|
5955
|
+
);
|
|
5956
|
+
});
|
|
5957
|
+
|
|
5958
|
+
// src/components/document-card/DocumentCard.tsx
|
|
5959
|
+
import * as React84 from "react";
|
|
5960
|
+
import { jsx as jsx83, jsxs as jsxs60 } from "react/jsx-runtime";
|
|
5961
|
+
var statusConfig3 = {
|
|
5962
|
+
available: { label: "Available", variant: "success" },
|
|
5963
|
+
restricted: { label: "Restricted", variant: "warning" },
|
|
5964
|
+
pending: { label: "Pending", variant: "info" }
|
|
5965
|
+
};
|
|
5966
|
+
var DocumentCard = React84.forwardRef(function DocumentCard2({
|
|
5967
|
+
name,
|
|
5968
|
+
fileType,
|
|
5969
|
+
size,
|
|
5970
|
+
updatedAt,
|
|
5971
|
+
status = "available",
|
|
5972
|
+
onDownload,
|
|
5973
|
+
downloadLabel = "Download",
|
|
5974
|
+
icon,
|
|
5975
|
+
className,
|
|
5976
|
+
...props
|
|
5977
|
+
}, ref) {
|
|
5978
|
+
const statusInfo = statusConfig3[status];
|
|
5979
|
+
const meta = [fileType, size, updatedAt].filter(Boolean).join(" \xB7 ");
|
|
5980
|
+
return /* @__PURE__ */ jsx83(Card, { ref, className: cn("w-full", className), ...props, children: /* @__PURE__ */ jsxs60(CardContent, { className: "flex items-center gap-3 p-4", children: [
|
|
5981
|
+
/* @__PURE__ */ jsx83("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__ */ jsx83("span", { className: "text-[10px] font-bold uppercase tracking-wide", children: fileType }) }),
|
|
5982
|
+
/* @__PURE__ */ jsxs60("div", { className: "min-w-0 flex-1", children: [
|
|
5983
|
+
/* @__PURE__ */ jsx83("p", { className: "truncate text-sm font-medium", children: name }),
|
|
5984
|
+
meta && /* @__PURE__ */ jsx83("p", { className: "mt-0.5 truncate text-xs text-muted-foreground", children: meta })
|
|
5985
|
+
] }),
|
|
5986
|
+
/* @__PURE__ */ jsx83(Badge, { variant: statusInfo.variant, children: statusInfo.label }),
|
|
5987
|
+
onDownload && /* @__PURE__ */ jsx83(
|
|
5988
|
+
Button,
|
|
5989
|
+
{
|
|
5990
|
+
type: "button",
|
|
5991
|
+
variant: "outline",
|
|
5992
|
+
size: "sm",
|
|
5993
|
+
onClick: onDownload,
|
|
5994
|
+
disabled: status !== "available",
|
|
5995
|
+
"aria-label": `${downloadLabel} ${name}`,
|
|
5996
|
+
children: downloadLabel
|
|
5997
|
+
}
|
|
5998
|
+
)
|
|
5999
|
+
] }) });
|
|
6000
|
+
});
|
|
6001
|
+
|
|
6002
|
+
// src/components/load-more/LoadMore.tsx
|
|
6003
|
+
import * as React85 from "react";
|
|
6004
|
+
import { jsx as jsx84 } from "react/jsx-runtime";
|
|
6005
|
+
var LoadMore = React85.forwardRef(function LoadMore2({
|
|
6006
|
+
hasMore,
|
|
6007
|
+
onLoadMore,
|
|
6008
|
+
loading = false,
|
|
6009
|
+
loadLabel = "Load more",
|
|
6010
|
+
loadingLabel = "Loading...",
|
|
6011
|
+
endLabel = "You're all caught up.",
|
|
6012
|
+
className,
|
|
6013
|
+
...props
|
|
6014
|
+
}, ref) {
|
|
6015
|
+
return /* @__PURE__ */ jsx84("div", { ref, "aria-live": "polite", className: cn("flex w-full justify-center py-4", className), ...props, children: hasMore ? /* @__PURE__ */ jsx84(Button, { type: "button", variant: "outline", onClick: onLoadMore, loading, children: loading ? loadingLabel : loadLabel }) : /* @__PURE__ */ jsx84("p", { role: "status", className: "text-sm text-muted-foreground", children: endLabel }) });
|
|
6016
|
+
});
|
|
6017
|
+
|
|
6018
|
+
// src/components/segmented-control/SegmentedControl.tsx
|
|
6019
|
+
import * as React86 from "react";
|
|
6020
|
+
import { jsx as jsx85, jsxs as jsxs61 } from "react/jsx-runtime";
|
|
5540
6021
|
var sizeClasses10 = {
|
|
5541
6022
|
sm: "h-8 px-2.5 text-xs",
|
|
5542
6023
|
md: "h-9 px-3 text-sm",
|
|
5543
6024
|
lg: "h-10 px-4 text-sm"
|
|
5544
6025
|
};
|
|
5545
|
-
var SegmentedControl =
|
|
6026
|
+
var SegmentedControl = React86.forwardRef(
|
|
5546
6027
|
function SegmentedControl2({
|
|
5547
6028
|
options,
|
|
5548
6029
|
value,
|
|
@@ -5556,12 +6037,12 @@ var SegmentedControl = React81.forwardRef(
|
|
|
5556
6037
|
...props
|
|
5557
6038
|
}, ref) {
|
|
5558
6039
|
const isControlled = value !== void 0;
|
|
5559
|
-
const [internal, setInternal] =
|
|
6040
|
+
const [internal, setInternal] = React86.useState(
|
|
5560
6041
|
() => multiple ? Array.isArray(defaultValue) ? defaultValue : [] : typeof defaultValue === "string" ? defaultValue : ""
|
|
5561
6042
|
);
|
|
5562
6043
|
const current = isControlled ? value : internal;
|
|
5563
6044
|
const selected = multiple ? Array.isArray(current) ? current : [] : typeof current === "string" ? current : "";
|
|
5564
|
-
const refs =
|
|
6045
|
+
const refs = React86.useRef([]);
|
|
5565
6046
|
const commit = (next) => {
|
|
5566
6047
|
if (!isControlled) setInternal(next);
|
|
5567
6048
|
onValueChange?.(next);
|
|
@@ -5611,7 +6092,7 @@ var SegmentedControl = React81.forwardRef(
|
|
|
5611
6092
|
moveFocus("last");
|
|
5612
6093
|
}
|
|
5613
6094
|
};
|
|
5614
|
-
return /* @__PURE__ */
|
|
6095
|
+
return /* @__PURE__ */ jsx85(
|
|
5615
6096
|
"div",
|
|
5616
6097
|
{
|
|
5617
6098
|
ref,
|
|
@@ -5627,7 +6108,7 @@ var SegmentedControl = React81.forwardRef(
|
|
|
5627
6108
|
const active = multiple ? Array.isArray(selected) && selected.includes(option.value) : selected === option.value;
|
|
5628
6109
|
const firstEnabled = options.findIndex((entry) => !entry.disabled);
|
|
5629
6110
|
const focusable = multiple || active || !selected && index === firstEnabled;
|
|
5630
|
-
return /* @__PURE__ */
|
|
6111
|
+
return /* @__PURE__ */ jsxs61(
|
|
5631
6112
|
"button",
|
|
5632
6113
|
{
|
|
5633
6114
|
ref: (node) => {
|
|
@@ -5650,8 +6131,8 @@ var SegmentedControl = React81.forwardRef(
|
|
|
5650
6131
|
active ? "bg-background text-foreground shadow-sm" : "text-muted-foreground hover:text-foreground"
|
|
5651
6132
|
),
|
|
5652
6133
|
children: [
|
|
5653
|
-
option.icon && /* @__PURE__ */
|
|
5654
|
-
/* @__PURE__ */
|
|
6134
|
+
option.icon && /* @__PURE__ */ jsx85("span", { className: "shrink-0 [&_svg]:size-4", children: option.icon }),
|
|
6135
|
+
/* @__PURE__ */ jsx85("span", { className: "truncate", children: option.label })
|
|
5655
6136
|
]
|
|
5656
6137
|
},
|
|
5657
6138
|
option.value
|
|
@@ -5663,18 +6144,18 @@ var SegmentedControl = React81.forwardRef(
|
|
|
5663
6144
|
);
|
|
5664
6145
|
|
|
5665
6146
|
// src/components/range-slider/RangeSlider.tsx
|
|
5666
|
-
import * as
|
|
5667
|
-
import { jsx as
|
|
6147
|
+
import * as React87 from "react";
|
|
6148
|
+
import { jsx as jsx86, jsxs as jsxs62 } from "react/jsx-runtime";
|
|
5668
6149
|
var rangeInputClass = cn(
|
|
5669
|
-
"pointer-events-none absolute inset-x-0 top-1/2 h-
|
|
5670
|
-
"[&::-webkit-slider-runnable-track]:h-1 [&::-webkit-slider-runnable-track]:bg-transparent",
|
|
5671
|
-
"[&::-webkit-slider-thumb]:pointer-events-auto [&::-webkit-slider-thumb]:h-4 [&::-webkit-slider-thumb]:w-4 [&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:border-2 [&::-webkit-slider-thumb]:border-primary [&::-webkit-slider-thumb]:bg-background [&::-webkit-slider-thumb]:shadow",
|
|
5672
|
-
"[&::-moz-range-track]:h-1 [&::-moz-range-track]:bg-transparent",
|
|
5673
|
-
"[&::-moz-range-thumb]:pointer-events-auto [&::-moz-range-thumb]:h-4 [&::-moz-range-thumb]:w-4 [&::-moz-range-thumb]:rounded-full [&::-moz-range-thumb]:border-2 [&::-moz-range-thumb]:border-primary [&::-moz-range-thumb]:bg-background [&::-moz-range-thumb]:shadow",
|
|
6150
|
+
"pointer-events-none absolute inset-x-0 top-1/2 h-6 w-full -translate-y-1/2 appearance-none bg-transparent",
|
|
6151
|
+
"[&::-webkit-slider-runnable-track]:h-1 [&::-webkit-slider-runnable-track]:rounded-full [&::-webkit-slider-runnable-track]:bg-transparent",
|
|
6152
|
+
"[&::-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-primary [&::-webkit-slider-thumb]:bg-background [&::-webkit-slider-thumb]:shadow",
|
|
6153
|
+
"[&::-moz-range-track]:h-1 [&::-moz-range-track]:rounded-full [&::-moz-range-track]:bg-transparent",
|
|
6154
|
+
"[&::-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-primary [&::-moz-range-thumb]:bg-background [&::-moz-range-thumb]:shadow",
|
|
5674
6155
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
|
|
5675
6156
|
"disabled:cursor-not-allowed disabled:opacity-50"
|
|
5676
6157
|
);
|
|
5677
|
-
var RangeSlider =
|
|
6158
|
+
var RangeSlider = React87.forwardRef(function RangeSlider2({
|
|
5678
6159
|
value,
|
|
5679
6160
|
defaultValue,
|
|
5680
6161
|
onValueChange,
|
|
@@ -5690,7 +6171,7 @@ var RangeSlider = React82.forwardRef(function RangeSlider2({
|
|
|
5690
6171
|
...props
|
|
5691
6172
|
}, ref) {
|
|
5692
6173
|
const clamp = (entry) => Math.min(Math.max(entry, min), max);
|
|
5693
|
-
const [internal, setInternal] =
|
|
6174
|
+
const [internal, setInternal] = React87.useState(() => {
|
|
5694
6175
|
const initial = defaultValue ?? [min, max];
|
|
5695
6176
|
return [clamp(initial[0]), clamp(initial[1])];
|
|
5696
6177
|
});
|
|
@@ -5704,21 +6185,21 @@ var RangeSlider = React82.forwardRef(function RangeSlider2({
|
|
|
5704
6185
|
const span = max - min || 1;
|
|
5705
6186
|
const lowPercent = (low - min) / span * 100;
|
|
5706
6187
|
const highPercent = (high - min) / span * 100;
|
|
5707
|
-
return /* @__PURE__ */
|
|
5708
|
-
showValues && /* @__PURE__ */
|
|
5709
|
-
/* @__PURE__ */
|
|
5710
|
-
/* @__PURE__ */
|
|
6188
|
+
return /* @__PURE__ */ jsxs62("div", { ref, className: cn("w-full", className), ...props, children: [
|
|
6189
|
+
showValues && /* @__PURE__ */ jsxs62("div", { className: "mb-2 flex items-center justify-between text-sm font-medium tabular-nums", children: [
|
|
6190
|
+
/* @__PURE__ */ jsx86("span", { children: formatValue(low) }),
|
|
6191
|
+
/* @__PURE__ */ jsx86("span", { children: formatValue(high) })
|
|
5711
6192
|
] }),
|
|
5712
|
-
/* @__PURE__ */
|
|
5713
|
-
/* @__PURE__ */
|
|
5714
|
-
/* @__PURE__ */
|
|
6193
|
+
/* @__PURE__ */ jsxs62("div", { className: "relative h-6 w-full", children: [
|
|
6194
|
+
/* @__PURE__ */ jsx86("div", { className: "absolute inset-x-0 top-1/2 h-1 -translate-y-1/2 rounded-full bg-muted" }),
|
|
6195
|
+
/* @__PURE__ */ jsx86(
|
|
5715
6196
|
"div",
|
|
5716
6197
|
{
|
|
5717
6198
|
className: "absolute top-1/2 h-1 -translate-y-1/2 rounded-full bg-primary",
|
|
5718
6199
|
style: { left: `${lowPercent}%`, right: `${100 - highPercent}%` }
|
|
5719
6200
|
}
|
|
5720
6201
|
),
|
|
5721
|
-
/* @__PURE__ */
|
|
6202
|
+
/* @__PURE__ */ jsx86(
|
|
5722
6203
|
"input",
|
|
5723
6204
|
{
|
|
5724
6205
|
type: "range",
|
|
@@ -5733,7 +6214,7 @@ var RangeSlider = React82.forwardRef(function RangeSlider2({
|
|
|
5733
6214
|
className: cn(rangeInputClass, "z-10")
|
|
5734
6215
|
}
|
|
5735
6216
|
),
|
|
5736
|
-
/* @__PURE__ */
|
|
6217
|
+
/* @__PURE__ */ jsx86(
|
|
5737
6218
|
"input",
|
|
5738
6219
|
{
|
|
5739
6220
|
type: "range",
|
|
@@ -5753,9 +6234,9 @@ var RangeSlider = React82.forwardRef(function RangeSlider2({
|
|
|
5753
6234
|
});
|
|
5754
6235
|
|
|
5755
6236
|
// src/components/filter-chips/FilterChips.tsx
|
|
5756
|
-
import * as
|
|
5757
|
-
import { jsx as
|
|
5758
|
-
var FilterChips =
|
|
6237
|
+
import * as React88 from "react";
|
|
6238
|
+
import { jsx as jsx87, jsxs as jsxs63 } from "react/jsx-runtime";
|
|
6239
|
+
var FilterChips = React88.forwardRef(function FilterChips2({
|
|
5759
6240
|
filters,
|
|
5760
6241
|
onClearAll,
|
|
5761
6242
|
clearLabel = "Clear all",
|
|
@@ -5765,9 +6246,9 @@ var FilterChips = React83.forwardRef(function FilterChips2({
|
|
|
5765
6246
|
...props
|
|
5766
6247
|
}, ref) {
|
|
5767
6248
|
if (filters.length === 0) {
|
|
5768
|
-
return emptyLabel ? /* @__PURE__ */
|
|
6249
|
+
return emptyLabel ? /* @__PURE__ */ jsx87("div", { ref, className: cn("text-sm text-muted-foreground", className), ...props, children: emptyLabel }) : null;
|
|
5769
6250
|
}
|
|
5770
|
-
return /* @__PURE__ */
|
|
6251
|
+
return /* @__PURE__ */ jsxs63(
|
|
5771
6252
|
"div",
|
|
5772
6253
|
{
|
|
5773
6254
|
ref,
|
|
@@ -5776,34 +6257,34 @@ var FilterChips = React83.forwardRef(function FilterChips2({
|
|
|
5776
6257
|
className: cn("flex flex-wrap items-center gap-2", className),
|
|
5777
6258
|
...props,
|
|
5778
6259
|
children: [
|
|
5779
|
-
filters.map((filter) => /* @__PURE__ */
|
|
6260
|
+
filters.map((filter) => /* @__PURE__ */ jsxs63(
|
|
5780
6261
|
"span",
|
|
5781
6262
|
{
|
|
5782
6263
|
className: "inline-flex max-w-full items-center gap-1.5 rounded-full border border-border bg-muted/60 py-1 pl-3 pr-1 text-sm",
|
|
5783
6264
|
children: [
|
|
5784
|
-
/* @__PURE__ */
|
|
5785
|
-
/* @__PURE__ */
|
|
6265
|
+
/* @__PURE__ */ jsxs63("span", { className: "truncate", children: [
|
|
6266
|
+
/* @__PURE__ */ jsxs63("span", { className: "text-muted-foreground", children: [
|
|
5786
6267
|
filter.label,
|
|
5787
6268
|
":"
|
|
5788
6269
|
] }),
|
|
5789
6270
|
" ",
|
|
5790
|
-
/* @__PURE__ */
|
|
6271
|
+
/* @__PURE__ */ jsx87("span", { className: "font-medium", children: filter.value ?? "Any" })
|
|
5791
6272
|
] }),
|
|
5792
|
-
filter.onRemove && /* @__PURE__ */
|
|
6273
|
+
filter.onRemove && /* @__PURE__ */ jsx87(
|
|
5793
6274
|
"button",
|
|
5794
6275
|
{
|
|
5795
6276
|
type: "button",
|
|
5796
6277
|
onClick: filter.onRemove,
|
|
5797
6278
|
"aria-label": `Remove ${filter.label}${filter.value ? `: ${filter.value}` : ""}`,
|
|
5798
6279
|
className: "rounded-full p-1 text-muted-foreground transition-colors hover:bg-background hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
5799
|
-
children: /* @__PURE__ */
|
|
6280
|
+
children: /* @__PURE__ */ jsx87("svg", { "aria-hidden": "true", viewBox: "0 0 20 20", className: "h-3.5 w-3.5", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", children: /* @__PURE__ */ jsx87("path", { d: "m5 5 10 10M15 5 5 15" }) })
|
|
5800
6281
|
}
|
|
5801
6282
|
)
|
|
5802
6283
|
]
|
|
5803
6284
|
},
|
|
5804
6285
|
filter.key
|
|
5805
6286
|
)),
|
|
5806
|
-
onClearAll && /* @__PURE__ */
|
|
6287
|
+
onClearAll && /* @__PURE__ */ jsx87(
|
|
5807
6288
|
"button",
|
|
5808
6289
|
{
|
|
5809
6290
|
type: "button",
|
|
@@ -5818,13 +6299,13 @@ var FilterChips = React83.forwardRef(function FilterChips2({
|
|
|
5818
6299
|
});
|
|
5819
6300
|
|
|
5820
6301
|
// src/components/multi-select/MultiSelect.tsx
|
|
5821
|
-
import * as
|
|
6302
|
+
import * as React90 from "react";
|
|
5822
6303
|
|
|
5823
6304
|
// src/components/popover/Popover.tsx
|
|
5824
|
-
import * as
|
|
6305
|
+
import * as React89 from "react";
|
|
5825
6306
|
import { createPortal as createPortal7 } from "react-dom";
|
|
5826
|
-
import { jsx as
|
|
5827
|
-
var PopoverContext =
|
|
6307
|
+
import { jsx as jsx88 } from "react/jsx-runtime";
|
|
6308
|
+
var PopoverContext = React89.createContext({
|
|
5828
6309
|
open: false,
|
|
5829
6310
|
setOpen: () => {
|
|
5830
6311
|
},
|
|
@@ -5832,14 +6313,14 @@ var PopoverContext = React84.createContext({
|
|
|
5832
6313
|
contentId: "",
|
|
5833
6314
|
wrapperRef: { current: null }
|
|
5834
6315
|
});
|
|
5835
|
-
var Popover =
|
|
6316
|
+
var Popover = React89.forwardRef(
|
|
5836
6317
|
({ open, onOpenChange, className, children }, ref) => {
|
|
5837
|
-
const [internalOpen, setInternalOpen] =
|
|
6318
|
+
const [internalOpen, setInternalOpen] = React89.useState(false);
|
|
5838
6319
|
const current = open ?? internalOpen;
|
|
5839
|
-
const triggerId =
|
|
5840
|
-
const contentId =
|
|
5841
|
-
const wrapperRef =
|
|
5842
|
-
const setRefs =
|
|
6320
|
+
const triggerId = React89.useId();
|
|
6321
|
+
const contentId = React89.useId();
|
|
6322
|
+
const wrapperRef = React89.useRef(null);
|
|
6323
|
+
const setRefs = React89.useCallback(
|
|
5843
6324
|
(node) => {
|
|
5844
6325
|
wrapperRef.current = node;
|
|
5845
6326
|
if (typeof ref === "function") ref(node);
|
|
@@ -5847,14 +6328,14 @@ var Popover = React84.forwardRef(
|
|
|
5847
6328
|
},
|
|
5848
6329
|
[ref]
|
|
5849
6330
|
);
|
|
5850
|
-
const setOpen =
|
|
6331
|
+
const setOpen = React89.useCallback(
|
|
5851
6332
|
(next) => {
|
|
5852
6333
|
if (open === void 0) setInternalOpen(next);
|
|
5853
6334
|
onOpenChange?.(next);
|
|
5854
6335
|
},
|
|
5855
6336
|
[open, onOpenChange]
|
|
5856
6337
|
);
|
|
5857
|
-
return /* @__PURE__ */
|
|
6338
|
+
return /* @__PURE__ */ jsx88("div", { ref: setRefs, className: cn("relative inline-block", className), children: /* @__PURE__ */ jsx88(
|
|
5858
6339
|
PopoverContext.Provider,
|
|
5859
6340
|
{
|
|
5860
6341
|
value: { open: current, setOpen, triggerId, contentId, wrapperRef },
|
|
@@ -5864,10 +6345,10 @@ var Popover = React84.forwardRef(
|
|
|
5864
6345
|
}
|
|
5865
6346
|
);
|
|
5866
6347
|
Popover.displayName = "Popover";
|
|
5867
|
-
var PopoverTrigger =
|
|
6348
|
+
var PopoverTrigger = React89.forwardRef(
|
|
5868
6349
|
({ className, children, onClick, ...props }, ref) => {
|
|
5869
|
-
const { open, setOpen, triggerId, contentId } =
|
|
5870
|
-
return /* @__PURE__ */
|
|
6350
|
+
const { open, setOpen, triggerId, contentId } = React89.useContext(PopoverContext);
|
|
6351
|
+
return /* @__PURE__ */ jsx88(
|
|
5871
6352
|
"button",
|
|
5872
6353
|
{
|
|
5873
6354
|
ref,
|
|
@@ -5892,12 +6373,12 @@ var PopoverTrigger = React84.forwardRef(
|
|
|
5892
6373
|
}
|
|
5893
6374
|
);
|
|
5894
6375
|
PopoverTrigger.displayName = "PopoverTrigger";
|
|
5895
|
-
var PopoverContent =
|
|
6376
|
+
var PopoverContent = React89.forwardRef(
|
|
5896
6377
|
({ className, children, onKeyDown, ...props }, ref) => {
|
|
5897
|
-
const { open, setOpen, triggerId, contentId, wrapperRef } =
|
|
5898
|
-
const contentRef =
|
|
5899
|
-
const [pos, setPos] =
|
|
5900
|
-
|
|
6378
|
+
const { open, setOpen, triggerId, contentId, wrapperRef } = React89.useContext(PopoverContext);
|
|
6379
|
+
const contentRef = React89.useRef(null);
|
|
6380
|
+
const [pos, setPos] = React89.useState(null);
|
|
6381
|
+
React89.useLayoutEffect(() => {
|
|
5901
6382
|
if (!open) {
|
|
5902
6383
|
setPos(null);
|
|
5903
6384
|
return;
|
|
@@ -5917,7 +6398,7 @@ var PopoverContent = React84.forwardRef(
|
|
|
5917
6398
|
window.removeEventListener("resize", measure);
|
|
5918
6399
|
};
|
|
5919
6400
|
}, [open, setOpen, wrapperRef]);
|
|
5920
|
-
|
|
6401
|
+
React89.useEffect(() => {
|
|
5921
6402
|
if (!open) return;
|
|
5922
6403
|
function onPointerDown(event) {
|
|
5923
6404
|
if (!contentRef.current?.contains(event.target)) setOpen(false);
|
|
@@ -5925,14 +6406,14 @@ var PopoverContent = React84.forwardRef(
|
|
|
5925
6406
|
document.addEventListener("pointerdown", onPointerDown);
|
|
5926
6407
|
return () => document.removeEventListener("pointerdown", onPointerDown);
|
|
5927
6408
|
}, [open, setOpen]);
|
|
5928
|
-
|
|
6409
|
+
React89.useEffect(() => {
|
|
5929
6410
|
if (open && pos && contentRef.current) {
|
|
5930
6411
|
contentRef.current.focus();
|
|
5931
6412
|
}
|
|
5932
6413
|
}, [open, pos]);
|
|
5933
6414
|
if (!open || !pos || typeof document === "undefined") return null;
|
|
5934
6415
|
return createPortal7(
|
|
5935
|
-
/* @__PURE__ */
|
|
6416
|
+
/* @__PURE__ */ jsx88(
|
|
5936
6417
|
"div",
|
|
5937
6418
|
{
|
|
5938
6419
|
ref: (node) => {
|
|
@@ -5967,8 +6448,8 @@ var PopoverContent = React84.forwardRef(
|
|
|
5967
6448
|
PopoverContent.displayName = "PopoverContent";
|
|
5968
6449
|
|
|
5969
6450
|
// src/components/multi-select/MultiSelect.tsx
|
|
5970
|
-
import { jsx as
|
|
5971
|
-
var MultiSelect =
|
|
6451
|
+
import { jsx as jsx89, jsxs as jsxs64 } from "react/jsx-runtime";
|
|
6452
|
+
var MultiSelect = React90.forwardRef(function MultiSelect2({
|
|
5972
6453
|
options,
|
|
5973
6454
|
value,
|
|
5974
6455
|
defaultValue,
|
|
@@ -5982,10 +6463,10 @@ var MultiSelect = React85.forwardRef(function MultiSelect2({
|
|
|
5982
6463
|
className,
|
|
5983
6464
|
...props
|
|
5984
6465
|
}, ref) {
|
|
5985
|
-
const labelId =
|
|
5986
|
-
const [internal, setInternal] =
|
|
5987
|
-
const [query, setQuery] =
|
|
5988
|
-
const [open, setOpen] =
|
|
6466
|
+
const labelId = React90.useId();
|
|
6467
|
+
const [internal, setInternal] = React90.useState(defaultValue ?? []);
|
|
6468
|
+
const [query, setQuery] = React90.useState("");
|
|
6469
|
+
const [open, setOpen] = React90.useState(false);
|
|
5989
6470
|
const selected = value ?? internal;
|
|
5990
6471
|
const commit = (next) => {
|
|
5991
6472
|
if (value === void 0) setInternal(next);
|
|
@@ -6002,7 +6483,7 @@ var MultiSelect = React85.forwardRef(function MultiSelect2({
|
|
|
6002
6483
|
const q = query.trim().toLowerCase();
|
|
6003
6484
|
return option.label.toLowerCase().includes(q) || option.value.toLowerCase().includes(q) || option.description?.toLowerCase().includes(q) || option.group?.toLowerCase().includes(q);
|
|
6004
6485
|
}) : options;
|
|
6005
|
-
const groups =
|
|
6486
|
+
const groups = React90.useMemo(() => {
|
|
6006
6487
|
let last;
|
|
6007
6488
|
return filtered.map((option) => {
|
|
6008
6489
|
const heading = option.group && option.group !== last ? option.group : void 0;
|
|
@@ -6012,16 +6493,16 @@ var MultiSelect = React85.forwardRef(function MultiSelect2({
|
|
|
6012
6493
|
}, [filtered]);
|
|
6013
6494
|
const visibleChips = selectedOptions.slice(0, maxDisplay);
|
|
6014
6495
|
const hiddenCount = selectedOptions.length - visibleChips.length;
|
|
6015
|
-
return /* @__PURE__ */
|
|
6016
|
-
label && /* @__PURE__ */
|
|
6017
|
-
visibleChips.length > 0 && /* @__PURE__ */
|
|
6018
|
-
visibleChips.map((option) => /* @__PURE__ */
|
|
6496
|
+
return /* @__PURE__ */ jsxs64("div", { ref, className: cn("flex flex-col gap-2", className), ...props, children: [
|
|
6497
|
+
label && /* @__PURE__ */ jsx89("span", { id: labelId, className: "text-sm font-medium", children: label }),
|
|
6498
|
+
visibleChips.length > 0 && /* @__PURE__ */ jsxs64("div", { className: "flex flex-wrap gap-1.5", children: [
|
|
6499
|
+
visibleChips.map((option) => /* @__PURE__ */ jsxs64(
|
|
6019
6500
|
"span",
|
|
6020
6501
|
{
|
|
6021
6502
|
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",
|
|
6022
6503
|
children: [
|
|
6023
|
-
/* @__PURE__ */
|
|
6024
|
-
/* @__PURE__ */
|
|
6504
|
+
/* @__PURE__ */ jsx89("span", { className: "truncate", children: option.label }),
|
|
6505
|
+
/* @__PURE__ */ jsx89(
|
|
6025
6506
|
"button",
|
|
6026
6507
|
{
|
|
6027
6508
|
type: "button",
|
|
@@ -6029,26 +6510,26 @@ var MultiSelect = React85.forwardRef(function MultiSelect2({
|
|
|
6029
6510
|
disabled,
|
|
6030
6511
|
"aria-label": `Remove ${option.label}`,
|
|
6031
6512
|
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",
|
|
6032
|
-
children: /* @__PURE__ */
|
|
6513
|
+
children: /* @__PURE__ */ jsx89("svg", { "aria-hidden": "true", viewBox: "0 0 20 20", className: "h-3 w-3", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", children: /* @__PURE__ */ jsx89("path", { d: "m5 5 10 10M15 5 5 15" }) })
|
|
6033
6514
|
}
|
|
6034
6515
|
)
|
|
6035
6516
|
]
|
|
6036
6517
|
},
|
|
6037
6518
|
option.value
|
|
6038
6519
|
)),
|
|
6039
|
-
hiddenCount > 0 && /* @__PURE__ */
|
|
6520
|
+
hiddenCount > 0 && /* @__PURE__ */ jsxs64("span", { className: "self-center text-xs text-muted-foreground", children: [
|
|
6040
6521
|
"+",
|
|
6041
6522
|
hiddenCount,
|
|
6042
6523
|
" more"
|
|
6043
6524
|
] })
|
|
6044
6525
|
] }),
|
|
6045
|
-
/* @__PURE__ */
|
|
6046
|
-
/* @__PURE__ */
|
|
6047
|
-
/* @__PURE__ */
|
|
6048
|
-
/* @__PURE__ */
|
|
6526
|
+
/* @__PURE__ */ jsxs64(Popover, { open, onOpenChange: setOpen, children: [
|
|
6527
|
+
/* @__PURE__ */ jsxs64(PopoverTrigger, { "aria-labelledby": label ? labelId : void 0, disabled, className: "w-full justify-between", children: [
|
|
6528
|
+
/* @__PURE__ */ jsx89("span", { children: selected.length > 0 ? `${selected.length} selected` : triggerLabel }),
|
|
6529
|
+
/* @__PURE__ */ jsx89("span", { "aria-hidden": "true", className: "text-muted-foreground", children: "\u2304" })
|
|
6049
6530
|
] }),
|
|
6050
|
-
/* @__PURE__ */
|
|
6051
|
-
/* @__PURE__ */
|
|
6531
|
+
/* @__PURE__ */ jsxs64(PopoverContent, { className: "w-80 p-0", children: [
|
|
6532
|
+
/* @__PURE__ */ jsx89("div", { className: "border-b border-border p-3", children: /* @__PURE__ */ jsx89(
|
|
6052
6533
|
Input,
|
|
6053
6534
|
{
|
|
6054
6535
|
type: "search",
|
|
@@ -6059,9 +6540,9 @@ var MultiSelect = React85.forwardRef(function MultiSelect2({
|
|
|
6059
6540
|
autoFocus: true
|
|
6060
6541
|
}
|
|
6061
6542
|
) }),
|
|
6062
|
-
/* @__PURE__ */
|
|
6063
|
-
heading && /* @__PURE__ */
|
|
6064
|
-
/* @__PURE__ */
|
|
6543
|
+
/* @__PURE__ */ jsx89("div", { className: "max-h-64 overflow-y-auto p-1", children: groups.length === 0 ? /* @__PURE__ */ jsx89("p", { className: "px-3 py-3 text-sm text-muted-foreground", children: emptyText }) : groups.map(({ option, heading }) => /* @__PURE__ */ jsxs64(React90.Fragment, { children: [
|
|
6544
|
+
heading && /* @__PURE__ */ jsx89("p", { className: "px-3 pb-1 pt-2 text-xs font-medium uppercase tracking-wide text-muted-foreground", children: heading }),
|
|
6545
|
+
/* @__PURE__ */ jsxs64(
|
|
6065
6546
|
"label",
|
|
6066
6547
|
{
|
|
6067
6548
|
className: cn(
|
|
@@ -6069,7 +6550,7 @@ var MultiSelect = React85.forwardRef(function MultiSelect2({
|
|
|
6069
6550
|
option.disabled && "cursor-not-allowed opacity-50"
|
|
6070
6551
|
),
|
|
6071
6552
|
children: [
|
|
6072
|
-
/* @__PURE__ */
|
|
6553
|
+
/* @__PURE__ */ jsx89(
|
|
6073
6554
|
Checkbox,
|
|
6074
6555
|
{
|
|
6075
6556
|
checked: selected.includes(option.value),
|
|
@@ -6078,16 +6559,16 @@ var MultiSelect = React85.forwardRef(function MultiSelect2({
|
|
|
6078
6559
|
className: "mt-0.5"
|
|
6079
6560
|
}
|
|
6080
6561
|
),
|
|
6081
|
-
/* @__PURE__ */
|
|
6082
|
-
/* @__PURE__ */
|
|
6083
|
-
option.description && /* @__PURE__ */
|
|
6562
|
+
/* @__PURE__ */ jsxs64("span", { className: "min-w-0", children: [
|
|
6563
|
+
/* @__PURE__ */ jsx89("span", { className: "block", children: option.label }),
|
|
6564
|
+
option.description && /* @__PURE__ */ jsx89("span", { className: "mt-0.5 block text-xs text-muted-foreground", children: option.description })
|
|
6084
6565
|
] })
|
|
6085
6566
|
]
|
|
6086
6567
|
}
|
|
6087
6568
|
)
|
|
6088
6569
|
] }, option.value)) }),
|
|
6089
|
-
/* @__PURE__ */
|
|
6090
|
-
/* @__PURE__ */
|
|
6570
|
+
/* @__PURE__ */ jsxs64("div", { className: "flex items-center justify-between gap-2 border-t border-border p-2", children: [
|
|
6571
|
+
/* @__PURE__ */ jsx89(
|
|
6091
6572
|
Button,
|
|
6092
6573
|
{
|
|
6093
6574
|
type: "button",
|
|
@@ -6097,7 +6578,7 @@ var MultiSelect = React85.forwardRef(function MultiSelect2({
|
|
|
6097
6578
|
children: "Select all"
|
|
6098
6579
|
}
|
|
6099
6580
|
),
|
|
6100
|
-
/* @__PURE__ */
|
|
6581
|
+
/* @__PURE__ */ jsx89(Button, { type: "button", variant: "ghost", size: "sm", onClick: () => commit([]), children: "Clear" })
|
|
6101
6582
|
] })
|
|
6102
6583
|
] })
|
|
6103
6584
|
] })
|
|
@@ -6105,9 +6586,9 @@ var MultiSelect = React85.forwardRef(function MultiSelect2({
|
|
|
6105
6586
|
});
|
|
6106
6587
|
|
|
6107
6588
|
// src/components/filter-panel/FilterPanel.tsx
|
|
6108
|
-
import * as
|
|
6109
|
-
import { jsx as
|
|
6110
|
-
var FilterPanel =
|
|
6589
|
+
import * as React91 from "react";
|
|
6590
|
+
import { jsx as jsx90, jsxs as jsxs65 } from "react/jsx-runtime";
|
|
6591
|
+
var FilterPanel = React91.forwardRef(function FilterPanel2({
|
|
6111
6592
|
sections,
|
|
6112
6593
|
title = "Filters",
|
|
6113
6594
|
description,
|
|
@@ -6123,7 +6604,7 @@ var FilterPanel = React86.forwardRef(function FilterPanel2({
|
|
|
6123
6604
|
...props
|
|
6124
6605
|
}, ref) {
|
|
6125
6606
|
const Tag = as;
|
|
6126
|
-
const [open, setOpen] =
|
|
6607
|
+
const [open, setOpen] = React91.useState(
|
|
6127
6608
|
defaultOpen ?? sections.filter((section) => section.defaultOpen).map((section) => section.title)
|
|
6128
6609
|
);
|
|
6129
6610
|
const isOpen = (section) => !collapsible || open.includes(section.title);
|
|
@@ -6133,15 +6614,15 @@ var FilterPanel = React86.forwardRef(function FilterPanel2({
|
|
|
6133
6614
|
(current) => current.includes(section.title) ? current.filter((title2) => title2 !== section.title) : [...current, section.title]
|
|
6134
6615
|
);
|
|
6135
6616
|
};
|
|
6136
|
-
return /* @__PURE__ */
|
|
6137
|
-
(title || description) && /* @__PURE__ */
|
|
6138
|
-
title && /* @__PURE__ */
|
|
6139
|
-
description && /* @__PURE__ */
|
|
6617
|
+
return /* @__PURE__ */ jsxs65(Tag, { ref, className: cn("w-full rounded-xl border border-border bg-card", className), ...props, children: [
|
|
6618
|
+
(title || description) && /* @__PURE__ */ jsxs65("div", { className: "border-b border-border px-4 py-3", children: [
|
|
6619
|
+
title && /* @__PURE__ */ jsx90("h2", { className: "text-sm font-semibold", children: title }),
|
|
6620
|
+
description && /* @__PURE__ */ jsx90("p", { className: "mt-1 text-xs text-muted-foreground", children: description })
|
|
6140
6621
|
] }),
|
|
6141
|
-
/* @__PURE__ */
|
|
6622
|
+
/* @__PURE__ */ jsx90("div", { className: "divide-y divide-border", children: sections.map((section) => {
|
|
6142
6623
|
const expanded = isOpen(section);
|
|
6143
|
-
return /* @__PURE__ */
|
|
6144
|
-
/* @__PURE__ */
|
|
6624
|
+
return /* @__PURE__ */ jsxs65("div", { className: "px-4 py-3", children: [
|
|
6625
|
+
/* @__PURE__ */ jsx90("h3", { children: /* @__PURE__ */ jsxs65(
|
|
6145
6626
|
"button",
|
|
6146
6627
|
{
|
|
6147
6628
|
type: "button",
|
|
@@ -6154,28 +6635,28 @@ var FilterPanel = React86.forwardRef(function FilterPanel2({
|
|
|
6154
6635
|
collapsible && "rounded-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
6155
6636
|
),
|
|
6156
6637
|
children: [
|
|
6157
|
-
/* @__PURE__ */
|
|
6638
|
+
/* @__PURE__ */ jsxs65("span", { children: [
|
|
6158
6639
|
section.title,
|
|
6159
|
-
section.description && /* @__PURE__ */
|
|
6640
|
+
section.description && /* @__PURE__ */ jsx90("span", { className: "mt-0.5 block text-xs font-normal text-muted-foreground", children: section.description })
|
|
6160
6641
|
] }),
|
|
6161
|
-
collapsible && /* @__PURE__ */
|
|
6642
|
+
collapsible && /* @__PURE__ */ jsx90("span", { "aria-hidden": "true", className: cn("text-muted-foreground transition-transform", expanded && "rotate-180"), children: "\u2304" })
|
|
6162
6643
|
]
|
|
6163
6644
|
}
|
|
6164
6645
|
) }),
|
|
6165
|
-
expanded && /* @__PURE__ */
|
|
6646
|
+
expanded && /* @__PURE__ */ jsx90("div", { id: `filter-section-${section.title.replace(/\s+/g, "-").toLowerCase()}`, className: "mt-3", children: section.content })
|
|
6166
6647
|
] }, section.title);
|
|
6167
6648
|
}) }),
|
|
6168
|
-
(onReset || onApply || actions) && /* @__PURE__ */
|
|
6649
|
+
(onReset || onApply || actions) && /* @__PURE__ */ jsxs65("div", { className: "flex flex-wrap items-center gap-2 border-t border-border px-4 py-3", children: [
|
|
6169
6650
|
actions,
|
|
6170
|
-
onReset && /* @__PURE__ */
|
|
6171
|
-
onApply && /* @__PURE__ */
|
|
6651
|
+
onReset && /* @__PURE__ */ jsx90(Button, { type: "button", variant: "ghost", size: "sm", onClick: onReset, className: "ml-auto", children: resetLabel }),
|
|
6652
|
+
onApply && /* @__PURE__ */ jsx90(Button, { type: "button", size: "sm", onClick: onApply, children: applyLabel })
|
|
6172
6653
|
] })
|
|
6173
6654
|
] });
|
|
6174
6655
|
});
|
|
6175
6656
|
|
|
6176
6657
|
// src/components/date-range-picker/DateRangePicker.tsx
|
|
6177
|
-
import * as
|
|
6178
|
-
import { jsx as
|
|
6658
|
+
import * as React92 from "react";
|
|
6659
|
+
import { jsx as jsx91, jsxs as jsxs66 } from "react/jsx-runtime";
|
|
6179
6660
|
var DEFAULT_PRESETS = [
|
|
6180
6661
|
{ label: "7 days", days: 7 },
|
|
6181
6662
|
{ label: "30 days", days: 30 },
|
|
@@ -6188,7 +6669,7 @@ function toIsoDate(date) {
|
|
|
6188
6669
|
const day = String(date.getDate()).padStart(2, "0");
|
|
6189
6670
|
return `${year}-${month}-${day}`;
|
|
6190
6671
|
}
|
|
6191
|
-
var DateRangePicker =
|
|
6672
|
+
var DateRangePicker = React92.forwardRef(
|
|
6192
6673
|
function DateRangePicker2({
|
|
6193
6674
|
value,
|
|
6194
6675
|
defaultValue,
|
|
@@ -6201,9 +6682,9 @@ var DateRangePicker = React87.forwardRef(
|
|
|
6201
6682
|
className,
|
|
6202
6683
|
...props
|
|
6203
6684
|
}, ref) {
|
|
6204
|
-
const startId =
|
|
6205
|
-
const endId =
|
|
6206
|
-
const [internal, setInternal] =
|
|
6685
|
+
const startId = React92.useId();
|
|
6686
|
+
const endId = React92.useId();
|
|
6687
|
+
const [internal, setInternal] = React92.useState(defaultValue ?? {});
|
|
6207
6688
|
const current = value ?? internal;
|
|
6208
6689
|
const commit = (next) => {
|
|
6209
6690
|
if (value === void 0) setInternal(next);
|
|
@@ -6227,8 +6708,8 @@ var DateRangePicker = React87.forwardRef(
|
|
|
6227
6708
|
}
|
|
6228
6709
|
commit({ start: toIsoDate(start), end: toIsoDate(end) });
|
|
6229
6710
|
};
|
|
6230
|
-
return /* @__PURE__ */
|
|
6231
|
-
showPresets && presets.length > 0 && /* @__PURE__ */
|
|
6711
|
+
return /* @__PURE__ */ jsxs66("div", { ref, className: cn("flex flex-col gap-3", className), ...props, children: [
|
|
6712
|
+
showPresets && presets.length > 0 && /* @__PURE__ */ jsx91("div", { className: "flex flex-wrap gap-2", children: presets.map((preset) => /* @__PURE__ */ jsx91(
|
|
6232
6713
|
Button,
|
|
6233
6714
|
{
|
|
6234
6715
|
type: "button",
|
|
@@ -6240,10 +6721,10 @@ var DateRangePicker = React87.forwardRef(
|
|
|
6240
6721
|
},
|
|
6241
6722
|
preset.label
|
|
6242
6723
|
)) }),
|
|
6243
|
-
/* @__PURE__ */
|
|
6244
|
-
/* @__PURE__ */
|
|
6245
|
-
/* @__PURE__ */
|
|
6246
|
-
/* @__PURE__ */
|
|
6724
|
+
/* @__PURE__ */ jsxs66("div", { className: "grid gap-3 sm:grid-cols-2", children: [
|
|
6725
|
+
/* @__PURE__ */ jsxs66("div", { children: [
|
|
6726
|
+
/* @__PURE__ */ jsx91("label", { htmlFor: startId, className: "mb-1 block text-xs font-medium text-muted-foreground", children: startLabel }),
|
|
6727
|
+
/* @__PURE__ */ jsx91(
|
|
6247
6728
|
DatePicker,
|
|
6248
6729
|
{
|
|
6249
6730
|
id: startId,
|
|
@@ -6255,9 +6736,9 @@ var DateRangePicker = React87.forwardRef(
|
|
|
6255
6736
|
}
|
|
6256
6737
|
)
|
|
6257
6738
|
] }),
|
|
6258
|
-
/* @__PURE__ */
|
|
6259
|
-
/* @__PURE__ */
|
|
6260
|
-
/* @__PURE__ */
|
|
6739
|
+
/* @__PURE__ */ jsxs66("div", { children: [
|
|
6740
|
+
/* @__PURE__ */ jsx91("label", { htmlFor: endId, className: "mb-1 block text-xs font-medium text-muted-foreground", children: endLabel }),
|
|
6741
|
+
/* @__PURE__ */ jsx91(
|
|
6261
6742
|
DatePicker,
|
|
6262
6743
|
{
|
|
6263
6744
|
id: endId,
|
|
@@ -6275,9 +6756,9 @@ var DateRangePicker = React87.forwardRef(
|
|
|
6275
6756
|
);
|
|
6276
6757
|
|
|
6277
6758
|
// src/components/applied-filters/AppliedFilters.tsx
|
|
6278
|
-
import * as
|
|
6279
|
-
import { jsx as
|
|
6280
|
-
var AppliedFilters =
|
|
6759
|
+
import * as React93 from "react";
|
|
6760
|
+
import { jsx as jsx92, jsxs as jsxs67 } from "react/jsx-runtime";
|
|
6761
|
+
var AppliedFilters = React93.forwardRef(
|
|
6281
6762
|
function AppliedFilters2({
|
|
6282
6763
|
filters,
|
|
6283
6764
|
onClearAll,
|
|
@@ -6290,9 +6771,9 @@ var AppliedFilters = React88.forwardRef(
|
|
|
6290
6771
|
}, ref) {
|
|
6291
6772
|
const summary = label ?? `${filters.length} active`;
|
|
6292
6773
|
if (filters.length === 0) {
|
|
6293
|
-
return emptyLabel ? /* @__PURE__ */
|
|
6774
|
+
return emptyLabel ? /* @__PURE__ */ jsx92("div", { ref, className: cn("text-sm text-muted-foreground", className), ...props, children: emptyLabel }) : null;
|
|
6294
6775
|
}
|
|
6295
|
-
return /* @__PURE__ */
|
|
6776
|
+
return /* @__PURE__ */ jsxs67(
|
|
6296
6777
|
"div",
|
|
6297
6778
|
{
|
|
6298
6779
|
ref,
|
|
@@ -6300,9 +6781,9 @@ var AppliedFilters = React88.forwardRef(
|
|
|
6300
6781
|
className: cn("flex flex-wrap items-center gap-2", className),
|
|
6301
6782
|
...props,
|
|
6302
6783
|
children: [
|
|
6303
|
-
/* @__PURE__ */
|
|
6304
|
-
/* @__PURE__ */
|
|
6305
|
-
onEdit && /* @__PURE__ */
|
|
6784
|
+
/* @__PURE__ */ jsx92("span", { className: "text-xs font-medium uppercase tracking-wide text-muted-foreground", children: summary }),
|
|
6785
|
+
/* @__PURE__ */ jsx92(FilterChips, { filters, onClearAll }),
|
|
6786
|
+
onEdit && /* @__PURE__ */ jsx92(Button, { type: "button", variant: "ghost", size: "sm", onClick: onEdit, children: editLabel })
|
|
6306
6787
|
]
|
|
6307
6788
|
}
|
|
6308
6789
|
);
|
|
@@ -6310,11 +6791,11 @@ var AppliedFilters = React88.forwardRef(
|
|
|
6310
6791
|
);
|
|
6311
6792
|
|
|
6312
6793
|
// src/components/menu/Menu.tsx
|
|
6313
|
-
import * as
|
|
6794
|
+
import * as React94 from "react";
|
|
6314
6795
|
import { createPortal as createPortal8 } from "react-dom";
|
|
6315
6796
|
import { Slot as Slot5 } from "@radix-ui/react-slot";
|
|
6316
|
-
import { jsx as
|
|
6317
|
-
var MenuContext =
|
|
6797
|
+
import { jsx as jsx93 } from "react/jsx-runtime";
|
|
6798
|
+
var MenuContext = React94.createContext({
|
|
6318
6799
|
open: false,
|
|
6319
6800
|
setOpen: () => {
|
|
6320
6801
|
},
|
|
@@ -6323,13 +6804,13 @@ var MenuContext = React89.createContext({
|
|
|
6323
6804
|
},
|
|
6324
6805
|
wrapperRef: { current: null }
|
|
6325
6806
|
});
|
|
6326
|
-
var Menu =
|
|
6807
|
+
var Menu = React94.forwardRef(
|
|
6327
6808
|
({ open, onOpenChange, className, children }, ref) => {
|
|
6328
|
-
const [internalOpen, setInternalOpen] =
|
|
6329
|
-
const [activeIndex, setActiveIndex] =
|
|
6809
|
+
const [internalOpen, setInternalOpen] = React94.useState(false);
|
|
6810
|
+
const [activeIndex, setActiveIndex] = React94.useState(-1);
|
|
6330
6811
|
const current = open ?? internalOpen;
|
|
6331
|
-
const wrapperRef =
|
|
6332
|
-
const setRefs =
|
|
6812
|
+
const wrapperRef = React94.useRef(null);
|
|
6813
|
+
const setRefs = React94.useCallback(
|
|
6333
6814
|
(node) => {
|
|
6334
6815
|
wrapperRef.current = node;
|
|
6335
6816
|
if (typeof ref === "function") ref(node);
|
|
@@ -6337,7 +6818,7 @@ var Menu = React89.forwardRef(
|
|
|
6337
6818
|
},
|
|
6338
6819
|
[ref]
|
|
6339
6820
|
);
|
|
6340
|
-
const setOpen =
|
|
6821
|
+
const setOpen = React94.useCallback(
|
|
6341
6822
|
(next) => {
|
|
6342
6823
|
if (open === void 0) setInternalOpen(next);
|
|
6343
6824
|
onOpenChange?.(next);
|
|
@@ -6345,7 +6826,7 @@ var Menu = React89.forwardRef(
|
|
|
6345
6826
|
},
|
|
6346
6827
|
[open, onOpenChange]
|
|
6347
6828
|
);
|
|
6348
|
-
return /* @__PURE__ */
|
|
6829
|
+
return /* @__PURE__ */ jsx93("div", { ref: setRefs, className: cn("relative inline-block", className), children: /* @__PURE__ */ jsx93(
|
|
6349
6830
|
MenuContext.Provider,
|
|
6350
6831
|
{
|
|
6351
6832
|
value: { open: current, setOpen, activeIndex, setActiveIndex, wrapperRef },
|
|
@@ -6355,10 +6836,10 @@ var Menu = React89.forwardRef(
|
|
|
6355
6836
|
}
|
|
6356
6837
|
);
|
|
6357
6838
|
Menu.displayName = "Menu";
|
|
6358
|
-
var MenuTrigger =
|
|
6839
|
+
var MenuTrigger = React94.forwardRef(
|
|
6359
6840
|
({ className, children, ...props }, ref) => {
|
|
6360
|
-
const { open, setOpen } =
|
|
6361
|
-
return /* @__PURE__ */
|
|
6841
|
+
const { open, setOpen } = React94.useContext(MenuContext);
|
|
6842
|
+
return /* @__PURE__ */ jsx93(
|
|
6362
6843
|
"button",
|
|
6363
6844
|
{
|
|
6364
6845
|
ref,
|
|
@@ -6378,13 +6859,13 @@ var MenuTrigger = React89.forwardRef(
|
|
|
6378
6859
|
}
|
|
6379
6860
|
);
|
|
6380
6861
|
MenuTrigger.displayName = "MenuTrigger";
|
|
6381
|
-
var MenuContent =
|
|
6862
|
+
var MenuContent = React94.forwardRef(
|
|
6382
6863
|
({ className, children, ...props }, ref) => {
|
|
6383
|
-
const { open, setOpen, activeIndex, setActiveIndex, wrapperRef } =
|
|
6384
|
-
const contentRef =
|
|
6385
|
-
const [pos, setPos] =
|
|
6386
|
-
const itemsRef =
|
|
6387
|
-
|
|
6864
|
+
const { open, setOpen, activeIndex, setActiveIndex, wrapperRef } = React94.useContext(MenuContext);
|
|
6865
|
+
const contentRef = React94.useRef(null);
|
|
6866
|
+
const [pos, setPos] = React94.useState(null);
|
|
6867
|
+
const itemsRef = React94.useRef([]);
|
|
6868
|
+
React94.useLayoutEffect(() => {
|
|
6388
6869
|
if (!open) {
|
|
6389
6870
|
setPos(null);
|
|
6390
6871
|
return;
|
|
@@ -6404,7 +6885,7 @@ var MenuContent = React89.forwardRef(
|
|
|
6404
6885
|
window.removeEventListener("resize", measure);
|
|
6405
6886
|
};
|
|
6406
6887
|
}, [open, setOpen, wrapperRef]);
|
|
6407
|
-
|
|
6888
|
+
React94.useEffect(() => {
|
|
6408
6889
|
if (!open) return;
|
|
6409
6890
|
function onPointerDown(event) {
|
|
6410
6891
|
if (!contentRef.current?.contains(event.target)) setOpen(false);
|
|
@@ -6412,7 +6893,7 @@ var MenuContent = React89.forwardRef(
|
|
|
6412
6893
|
document.addEventListener("pointerdown", onPointerDown);
|
|
6413
6894
|
return () => document.removeEventListener("pointerdown", onPointerDown);
|
|
6414
6895
|
}, [open, setOpen]);
|
|
6415
|
-
|
|
6896
|
+
React94.useEffect(() => {
|
|
6416
6897
|
if (open && pos && contentRef.current) {
|
|
6417
6898
|
itemsRef.current = Array.from(
|
|
6418
6899
|
contentRef.current.querySelectorAll('[role="menuitem"]:not([disabled])')
|
|
@@ -6448,7 +6929,7 @@ var MenuContent = React89.forwardRef(
|
|
|
6448
6929
|
};
|
|
6449
6930
|
if (!open || !pos || typeof document === "undefined") return null;
|
|
6450
6931
|
return createPortal8(
|
|
6451
|
-
/* @__PURE__ */
|
|
6932
|
+
/* @__PURE__ */ jsx93(
|
|
6452
6933
|
"div",
|
|
6453
6934
|
{
|
|
6454
6935
|
ref: (node) => {
|
|
@@ -6472,12 +6953,12 @@ var MenuContent = React89.forwardRef(
|
|
|
6472
6953
|
}
|
|
6473
6954
|
);
|
|
6474
6955
|
MenuContent.displayName = "MenuContent";
|
|
6475
|
-
var MenuItem =
|
|
6956
|
+
var MenuItem = React94.forwardRef(
|
|
6476
6957
|
({ className, destructive, asChild = false, onClick, ...props }, ref) => {
|
|
6477
|
-
const { setOpen } =
|
|
6958
|
+
const { setOpen } = React94.useContext(MenuContext);
|
|
6478
6959
|
const Comp = asChild ? Slot5 : "button";
|
|
6479
6960
|
const typeProp = asChild ? {} : { type: "button" };
|
|
6480
|
-
return /* @__PURE__ */
|
|
6961
|
+
return /* @__PURE__ */ jsx93(
|
|
6481
6962
|
Comp,
|
|
6482
6963
|
{
|
|
6483
6964
|
ref,
|
|
@@ -6499,12 +6980,12 @@ var MenuItem = React89.forwardRef(
|
|
|
6499
6980
|
}
|
|
6500
6981
|
);
|
|
6501
6982
|
MenuItem.displayName = "MenuItem";
|
|
6502
|
-
var MenuSeparator =
|
|
6503
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
6983
|
+
var MenuSeparator = React94.forwardRef(
|
|
6984
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx93("div", { ref, role: "separator", className: cn("-mx-1 my-1 h-px bg-border", className), ...props })
|
|
6504
6985
|
);
|
|
6505
6986
|
MenuSeparator.displayName = "MenuSeparator";
|
|
6506
|
-
var MenuLabel =
|
|
6507
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
6987
|
+
var MenuLabel = React94.forwardRef(
|
|
6988
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx93(
|
|
6508
6989
|
"div",
|
|
6509
6990
|
{
|
|
6510
6991
|
ref,
|
|
@@ -6516,9 +6997,9 @@ var MenuLabel = React89.forwardRef(
|
|
|
6516
6997
|
MenuLabel.displayName = "MenuLabel";
|
|
6517
6998
|
|
|
6518
6999
|
// src/components/alert/Alert.tsx
|
|
6519
|
-
import * as
|
|
7000
|
+
import * as React95 from "react";
|
|
6520
7001
|
import { cva as cva8 } from "class-variance-authority";
|
|
6521
|
-
import { jsx as
|
|
7002
|
+
import { jsx as jsx94 } from "react/jsx-runtime";
|
|
6522
7003
|
var alertVariants = cva8(
|
|
6523
7004
|
"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",
|
|
6524
7005
|
{
|
|
@@ -6538,8 +7019,8 @@ var alertVariants = cva8(
|
|
|
6538
7019
|
}
|
|
6539
7020
|
}
|
|
6540
7021
|
);
|
|
6541
|
-
var Alert =
|
|
6542
|
-
({ className, variant, ...props }, ref) => /* @__PURE__ */
|
|
7022
|
+
var Alert = React95.forwardRef(
|
|
7023
|
+
({ className, variant, ...props }, ref) => /* @__PURE__ */ jsx94(
|
|
6543
7024
|
"div",
|
|
6544
7025
|
{
|
|
6545
7026
|
ref,
|
|
@@ -6550,8 +7031,8 @@ var Alert = React90.forwardRef(
|
|
|
6550
7031
|
)
|
|
6551
7032
|
);
|
|
6552
7033
|
Alert.displayName = "Alert";
|
|
6553
|
-
var AlertTitle =
|
|
6554
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
7034
|
+
var AlertTitle = React95.forwardRef(
|
|
7035
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx94(
|
|
6555
7036
|
"h5",
|
|
6556
7037
|
{
|
|
6557
7038
|
ref,
|
|
@@ -6561,8 +7042,8 @@ var AlertTitle = React90.forwardRef(
|
|
|
6561
7042
|
)
|
|
6562
7043
|
);
|
|
6563
7044
|
AlertTitle.displayName = "AlertTitle";
|
|
6564
|
-
var AlertDescription =
|
|
6565
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
7045
|
+
var AlertDescription = React95.forwardRef(
|
|
7046
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx94(
|
|
6566
7047
|
"div",
|
|
6567
7048
|
{
|
|
6568
7049
|
ref,
|
|
@@ -6574,23 +7055,23 @@ var AlertDescription = React90.forwardRef(
|
|
|
6574
7055
|
AlertDescription.displayName = "AlertDescription";
|
|
6575
7056
|
|
|
6576
7057
|
// src/components/breadcrumb/Breadcrumb.tsx
|
|
6577
|
-
import * as
|
|
6578
|
-
import { jsx as
|
|
6579
|
-
var Breadcrumb =
|
|
7058
|
+
import * as React96 from "react";
|
|
7059
|
+
import { jsx as jsx95, jsxs as jsxs68 } from "react/jsx-runtime";
|
|
7060
|
+
var Breadcrumb = React96.forwardRef(
|
|
6580
7061
|
({ items, label = "Breadcrumb", separator = "/", onItemClick, linkComponent, linkHrefProp = "href", truncateCurrent = false, className, ...props }, ref) => {
|
|
6581
7062
|
const LinkEl = linkComponent ?? "a";
|
|
6582
|
-
return /* @__PURE__ */
|
|
7063
|
+
return /* @__PURE__ */ jsx95(
|
|
6583
7064
|
"nav",
|
|
6584
7065
|
{
|
|
6585
7066
|
ref,
|
|
6586
7067
|
"aria-label": label,
|
|
6587
7068
|
className: cn("flex items-center space-x-1.5 text-sm text-muted-foreground", className),
|
|
6588
7069
|
...props,
|
|
6589
|
-
children: /* @__PURE__ */
|
|
7070
|
+
children: /* @__PURE__ */ jsx95("ol", { className: "flex flex-wrap items-center space-x-1.5", children: items.map((item, index) => {
|
|
6590
7071
|
const isLast = index === items.length - 1;
|
|
6591
|
-
return /* @__PURE__ */
|
|
6592
|
-
index > 0 && /* @__PURE__ */
|
|
6593
|
-
item.href && !isLast ? /* @__PURE__ */
|
|
7072
|
+
return /* @__PURE__ */ jsxs68("li", { className: cn("flex items-center space-x-1.5", truncateCurrent && isLast && "min-w-0"), children: [
|
|
7073
|
+
index > 0 && /* @__PURE__ */ jsx95("span", { "aria-hidden": "true", className: "text-muted-foreground/50", children: separator }),
|
|
7074
|
+
item.href && !isLast ? /* @__PURE__ */ jsx95(
|
|
6594
7075
|
LinkEl,
|
|
6595
7076
|
{
|
|
6596
7077
|
...linkHrefProp === "to" ? { to: item.href } : { href: item.href },
|
|
@@ -6601,7 +7082,7 @@ var Breadcrumb = React91.forwardRef(
|
|
|
6601
7082
|
} : void 0,
|
|
6602
7083
|
children: item.label
|
|
6603
7084
|
}
|
|
6604
|
-
) : /* @__PURE__ */
|
|
7085
|
+
) : /* @__PURE__ */ jsx95(
|
|
6605
7086
|
"span",
|
|
6606
7087
|
{
|
|
6607
7088
|
"aria-current": isLast ? "page" : void 0,
|
|
@@ -6656,6 +7137,7 @@ export {
|
|
|
6656
7137
|
DataTable,
|
|
6657
7138
|
DatePicker,
|
|
6658
7139
|
DateRangePicker,
|
|
7140
|
+
DealCard,
|
|
6659
7141
|
Dialog,
|
|
6660
7142
|
DialogBody,
|
|
6661
7143
|
DialogDescription,
|
|
@@ -6663,8 +7145,10 @@ export {
|
|
|
6663
7145
|
DialogHeader,
|
|
6664
7146
|
DialogTitle,
|
|
6665
7147
|
Divider,
|
|
7148
|
+
DocumentCard,
|
|
6666
7149
|
Drawer,
|
|
6667
7150
|
EmptyState,
|
|
7151
|
+
EntityCard,
|
|
6668
7152
|
FeatureGrid,
|
|
6669
7153
|
FeatureRow,
|
|
6670
7154
|
Fieldset,
|
|
@@ -6689,6 +7173,7 @@ export {
|
|
|
6689
7173
|
LinkTabs,
|
|
6690
7174
|
List,
|
|
6691
7175
|
ListItem,
|
|
7176
|
+
LoadMore,
|
|
6692
7177
|
LogoCloud,
|
|
6693
7178
|
Menu,
|
|
6694
7179
|
MenuContent,
|
|
@@ -6706,6 +7191,7 @@ export {
|
|
|
6706
7191
|
PopoverContent,
|
|
6707
7192
|
PopoverTrigger,
|
|
6708
7193
|
ProcessSteps,
|
|
7194
|
+
ProfileCard,
|
|
6709
7195
|
Progress,
|
|
6710
7196
|
Prose,
|
|
6711
7197
|
Radio,
|
|
@@ -6751,6 +7237,7 @@ export {
|
|
|
6751
7237
|
Timeline,
|
|
6752
7238
|
ToastProvider,
|
|
6753
7239
|
Toaster,
|
|
7240
|
+
TombstoneCard,
|
|
6754
7241
|
Tooltip,
|
|
6755
7242
|
alertVariants,
|
|
6756
7243
|
badgeVariants,
|