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