@slipstream-ui/core 0.11.8 → 0.11.10
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 +176 -9
- package/dist/index.d.ts +176 -9
- package/dist/index.js +1297 -905
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1294 -905
- package/dist/index.mjs.map +1 -1
- package/dist/manifests/accordion.manifest.json +1 -1
- package/dist/manifests/alert.manifest.json +1 -1
- package/dist/manifests/announcement-bar.manifest.json +1 -1
- package/dist/manifests/app-shell.manifest.json +1 -1
- package/dist/manifests/applied-filters.manifest.json +1 -1
- package/dist/manifests/article-card.manifest.json +1 -1
- package/dist/manifests/auth-layout.manifest.json +1 -1
- package/dist/manifests/autocomplete.manifest.json +1 -1
- package/dist/manifests/avatar.manifest.json +1 -1
- package/dist/manifests/badge.manifest.json +1 -1
- package/dist/manifests/block.manifest.json +1 -1
- package/dist/manifests/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 +4 -2
- package/dist/manifests/calendar.manifest.json +1 -1
- package/dist/manifests/card.manifest.json +1 -1
- package/dist/manifests/checkbox.manifest.json +1 -1
- package/dist/manifests/comparison-table.manifest.json +1 -1
- package/dist/manifests/confirm-dialog.manifest.json +1 -1
- package/dist/manifests/contact-strip.manifest.json +1 -1
- package/dist/manifests/container.manifest.json +1 -1
- package/dist/manifests/cover-image.manifest.json +1 -1
- package/dist/manifests/cta-section.manifest.json +1 -1
- package/dist/manifests/data-table.manifest.json +22 -1
- package/dist/manifests/date-picker-popover.manifest.json +1 -1
- package/dist/manifests/date-picker.manifest.json +1 -1
- package/dist/manifests/date-range-picker.manifest.json +1 -1
- package/dist/manifests/deal-card.manifest.json +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 +1 -1
- 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-toolbar.manifest.json +120 -0
- 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/media-card.manifest.json +161 -0
- package/dist/manifests/menu.manifest.json +1 -1
- package/dist/manifests/metric-card.manifest.json +1 -1
- package/dist/manifests/month-schedule.manifest.json +217 -0
- package/dist/manifests/multi-select.manifest.json +1 -1
- package/dist/manifests/newsletter.manifest.json +1 -1
- package/dist/manifests/page-header.manifest.json +1 -1
- package/dist/manifests/pagination.manifest.json +1 -1
- package/dist/manifests/password-input.manifest.json +1 -1
- package/dist/manifests/popover.manifest.json +1 -1
- package/dist/manifests/process-steps.manifest.json +1 -1
- package/dist/manifests/progress.manifest.json +1 -1
- package/dist/manifests/prose.manifest.json +1 -1
- package/dist/manifests/radio.manifest.json +1 -1
- package/dist/manifests/range-slider.manifest.json +1 -1
- package/dist/manifests/search.manifest.json +1 -1
- package/dist/manifests/section-heading.manifest.json +1 -1
- package/dist/manifests/section.manifest.json +1 -1
- package/dist/manifests/segmented-control.manifest.json +4 -4
- 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 +1 -1
- package/dist/manifests/skeleton.manifest.json +1 -1
- package/dist/manifests/spinner.manifest.json +1 -1
- package/dist/manifests/stat-band.manifest.json +1 -1
- package/dist/manifests/stepper.manifest.json +1 -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/button/Button.d.ts +2 -2
- package/dist/src/components/button/Button.js +1 -0
- package/dist/src/components/button/Button.js.map +1 -1
- package/dist/src/components/button/Button.mjs +1 -0
- package/dist/src/components/button/Button.mjs.map +1 -1
- package/dist/src/components/data-table/DataTable.d.ts +12 -1
- package/dist/src/components/data-table/DataTable.js +189 -112
- package/dist/src/components/data-table/DataTable.js.map +1 -1
- package/dist/src/components/data-table/DataTable.mjs +189 -112
- package/dist/src/components/data-table/DataTable.mjs.map +1 -1
- package/dist/src/components/list-toolbar/ListToolbar.d.ts +25 -0
- package/dist/src/components/list-toolbar/ListToolbar.js +68 -0
- package/dist/src/components/list-toolbar/ListToolbar.js.map +1 -0
- package/dist/src/components/list-toolbar/ListToolbar.mjs +44 -0
- package/dist/src/components/list-toolbar/ListToolbar.mjs.map +1 -0
- package/dist/src/components/list-toolbar/index.d.ts +1 -0
- package/dist/src/components/list-toolbar/index.js +23 -0
- package/dist/src/components/list-toolbar/index.js.map +1 -0
- package/dist/src/components/list-toolbar/index.mjs +2 -0
- package/dist/src/components/list-toolbar/index.mjs.map +1 -0
- package/dist/src/components/media-card/MediaCard.d.ts +61 -0
- package/dist/src/components/media-card/MediaCard.js +88 -0
- package/dist/src/components/media-card/MediaCard.js.map +1 -0
- package/dist/src/components/media-card/MediaCard.mjs +54 -0
- package/dist/src/components/media-card/MediaCard.mjs.map +1 -0
- package/dist/src/components/media-card/index.d.ts +1 -0
- package/dist/src/components/media-card/index.js +23 -0
- package/dist/src/components/media-card/index.js.map +1 -0
- package/dist/src/components/media-card/index.mjs +2 -0
- package/dist/src/components/media-card/index.mjs.map +1 -0
- package/dist/src/components/month-schedule/MonthSchedule.d.ts +56 -0
- package/dist/src/components/month-schedule/MonthSchedule.js +245 -0
- package/dist/src/components/month-schedule/MonthSchedule.js.map +1 -0
- package/dist/src/components/month-schedule/MonthSchedule.mjs +219 -0
- package/dist/src/components/month-schedule/MonthSchedule.mjs.map +1 -0
- package/dist/src/components/month-schedule/index.d.ts +1 -0
- package/dist/src/components/month-schedule/index.js +23 -0
- package/dist/src/components/month-schedule/index.js.map +1 -0
- package/dist/src/components/month-schedule/index.mjs +2 -0
- package/dist/src/components/month-schedule/index.mjs.map +1 -0
- package/dist/src/components/segmented-control/SegmentedControl.d.ts +20 -4
- package/dist/src/components/segmented-control/SegmentedControl.js +17 -3
- package/dist/src/components/segmented-control/SegmentedControl.js.map +1 -1
- package/dist/src/components/segmented-control/SegmentedControl.mjs +17 -3
- package/dist/src/components/segmented-control/SegmentedControl.mjs.map +1 -1
- package/dist/src/index.d.ts +3 -0
- package/dist/styles-full.css +1 -1
- package/dist/styles.css +1 -1
- package/package.json +3 -3
- package/src/components/button/Button.ssr.test.tsx +1 -1
- package/src/components/button/Button.test.tsx +6 -0
- package/src/components/button/Button.tsx +1 -0
- package/src/components/data-table/DataTable.test.tsx +99 -0
- package/src/components/data-table/DataTable.tsx +115 -1
- package/src/components/list-toolbar/ListToolbar.test.tsx +50 -0
- package/src/components/list-toolbar/ListToolbar.tsx +64 -0
- package/src/components/list-toolbar/index.ts +1 -0
- package/src/components/media-card/MediaCard.test.tsx +97 -0
- package/src/components/media-card/MediaCard.tsx +116 -0
- package/src/components/media-card/index.ts +1 -0
- package/src/components/month-schedule/MonthSchedule.test.tsx +137 -0
- package/src/components/month-schedule/MonthSchedule.tsx +332 -0
- package/src/components/month-schedule/index.ts +1 -0
- package/src/components/segmented-control/SegmentedControl.test.tsx +51 -0
- package/src/components/segmented-control/SegmentedControl.tsx +36 -4
- package/src/index.ts +3 -0
- package/src/manifests/accordion.manifest.json +1 -1
- package/src/manifests/alert.manifest.json +1 -1
- package/src/manifests/announcement-bar.manifest.json +1 -1
- package/src/manifests/app-shell.manifest.json +1 -1
- package/src/manifests/applied-filters.manifest.json +1 -1
- package/src/manifests/article-card.manifest.json +1 -1
- package/src/manifests/auth-layout.manifest.json +1 -1
- package/src/manifests/autocomplete.manifest.json +1 -1
- package/src/manifests/avatar.manifest.json +1 -1
- package/src/manifests/badge.manifest.json +1 -1
- package/src/manifests/block.manifest.json +1 -1
- package/src/manifests/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 +4 -2
- package/src/manifests/calendar.manifest.json +1 -1
- package/src/manifests/card.manifest.json +1 -1
- package/src/manifests/checkbox.manifest.json +1 -1
- package/src/manifests/comparison-table.manifest.json +1 -1
- package/src/manifests/confirm-dialog.manifest.json +1 -1
- package/src/manifests/contact-strip.manifest.json +1 -1
- package/src/manifests/container.manifest.json +1 -1
- package/src/manifests/cover-image.manifest.json +1 -1
- package/src/manifests/cta-section.manifest.json +1 -1
- package/src/manifests/data-table.manifest.json +22 -1
- package/src/manifests/date-picker-popover.manifest.json +1 -1
- package/src/manifests/date-picker.manifest.json +1 -1
- package/src/manifests/date-range-picker.manifest.json +1 -1
- package/src/manifests/deal-card.manifest.json +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 +1 -1
- 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-toolbar.manifest.json +120 -0
- 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/media-card.manifest.json +161 -0
- package/src/manifests/menu.manifest.json +1 -1
- package/src/manifests/metric-card.manifest.json +1 -1
- package/src/manifests/month-schedule.manifest.json +217 -0
- package/src/manifests/multi-select.manifest.json +1 -1
- package/src/manifests/newsletter.manifest.json +1 -1
- package/src/manifests/page-header.manifest.json +1 -1
- package/src/manifests/pagination.manifest.json +1 -1
- package/src/manifests/password-input.manifest.json +1 -1
- package/src/manifests/popover.manifest.json +1 -1
- package/src/manifests/process-steps.manifest.json +1 -1
- package/src/manifests/progress.manifest.json +1 -1
- package/src/manifests/prose.manifest.json +1 -1
- package/src/manifests/radio.manifest.json +1 -1
- package/src/manifests/range-slider.manifest.json +1 -1
- package/src/manifests/search.manifest.json +1 -1
- package/src/manifests/section-heading.manifest.json +1 -1
- package/src/manifests/section.manifest.json +1 -1
- package/src/manifests/segmented-control.manifest.json +4 -4
- 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 +1 -1
- package/src/manifests/skeleton.manifest.json +1 -1
- package/src/manifests/spinner.manifest.json +1 -1
- package/src/manifests/stat-band.manifest.json +1 -1
- package/src/manifests/stepper.manifest.json +1 -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/dist/index.js
CHANGED
|
@@ -109,8 +109,10 @@ __export(index_exports, {
|
|
|
109
109
|
LinkTabs: () => LinkTabs,
|
|
110
110
|
List: () => List,
|
|
111
111
|
ListItem: () => ListItem,
|
|
112
|
+
ListToolbar: () => ListToolbar,
|
|
112
113
|
LoadMore: () => LoadMore,
|
|
113
114
|
LogoCloud: () => LogoCloud,
|
|
115
|
+
MediaCard: () => MediaCard,
|
|
114
116
|
Menu: () => Menu,
|
|
115
117
|
MenuContent: () => MenuContent,
|
|
116
118
|
MenuItem: () => MenuItem,
|
|
@@ -118,6 +120,7 @@ __export(index_exports, {
|
|
|
118
120
|
MenuSeparator: () => MenuSeparator,
|
|
119
121
|
MenuTrigger: () => MenuTrigger,
|
|
120
122
|
MetricCard: () => MetricCard,
|
|
123
|
+
MonthSchedule: () => MonthSchedule,
|
|
121
124
|
MultiSelect: () => MultiSelect,
|
|
122
125
|
Newsletter: () => Newsletter,
|
|
123
126
|
PageHeader: () => PageHeader,
|
|
@@ -745,6 +748,7 @@ var buttonVariants = (0, import_class_variance_authority.cva)(
|
|
|
745
748
|
size: {
|
|
746
749
|
default: "h-10 px-4 py-2",
|
|
747
750
|
sm: "h-9 rounded-md px-3",
|
|
751
|
+
xs: "h-8 rounded-md px-2.5 text-xs",
|
|
748
752
|
lg: "h-11 rounded-md px-8",
|
|
749
753
|
icon: "h-10 w-10"
|
|
750
754
|
}
|
|
@@ -3625,14 +3629,218 @@ function partsOf(key) {
|
|
|
3625
3629
|
return { year: parts?.year ?? 1970, month: parts?.month ?? 0 };
|
|
3626
3630
|
}
|
|
3627
3631
|
|
|
3628
|
-
// src/components/
|
|
3632
|
+
// src/components/month-schedule/MonthSchedule.tsx
|
|
3629
3633
|
var React39 = __toESM(require("react"));
|
|
3630
|
-
var import_react_slot3 = require("@radix-ui/react-slot");
|
|
3631
3634
|
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
3632
|
-
var
|
|
3635
|
+
var TYPE_TONES = [
|
|
3636
|
+
"outline-info",
|
|
3637
|
+
"outline-success",
|
|
3638
|
+
"outline-warning",
|
|
3639
|
+
"outline-danger",
|
|
3640
|
+
"outline"
|
|
3641
|
+
];
|
|
3642
|
+
function typeTone(type, legend) {
|
|
3643
|
+
if (!type) return "outline";
|
|
3644
|
+
const index = legend?.findIndex((item) => item.type === type) ?? -1;
|
|
3645
|
+
if (index >= 0) return TYPE_TONES[index % TYPE_TONES.length];
|
|
3646
|
+
let hash = 0;
|
|
3647
|
+
for (let i = 0; i < type.length; i += 1) hash = hash * 31 + type.charCodeAt(i) >>> 0;
|
|
3648
|
+
return TYPE_TONES[hash % TYPE_TONES.length];
|
|
3649
|
+
}
|
|
3650
|
+
function monthOf(key) {
|
|
3651
|
+
const parts = parseDateKey(`${key}-01`);
|
|
3652
|
+
return { year: parts?.year ?? 1970, month: parts?.month ?? 0 };
|
|
3653
|
+
}
|
|
3654
|
+
function shiftMonth(monthKey, delta) {
|
|
3655
|
+
const { year, month } = monthOf(monthKey);
|
|
3656
|
+
const shifted = addMonths(`${year}-${String(month + 1).padStart(2, "0")}-01`, delta);
|
|
3657
|
+
return shifted.slice(0, 7);
|
|
3658
|
+
}
|
|
3659
|
+
function MonthSchedule({
|
|
3660
|
+
events,
|
|
3661
|
+
getDate,
|
|
3662
|
+
getLabel,
|
|
3663
|
+
getType,
|
|
3664
|
+
getHref,
|
|
3665
|
+
month,
|
|
3666
|
+
defaultMonth,
|
|
3667
|
+
onMonthChange,
|
|
3668
|
+
today,
|
|
3669
|
+
locale = "en-US",
|
|
3670
|
+
weekStartsOn = 0,
|
|
3671
|
+
maxPerDay = 3,
|
|
3672
|
+
legend,
|
|
3673
|
+
agendaBreakpoint = "md",
|
|
3674
|
+
linkComponent,
|
|
3675
|
+
linkHrefProp = "href",
|
|
3676
|
+
"aria-label": ariaLabel,
|
|
3677
|
+
className
|
|
3678
|
+
}) {
|
|
3679
|
+
const resolvedToday = today ?? todayKey();
|
|
3680
|
+
const Link3 = linkComponent ?? "a";
|
|
3681
|
+
const [internalMonth, setInternalMonth] = React39.useState(
|
|
3682
|
+
() => month ?? defaultMonth ?? resolvedToday.slice(0, 7)
|
|
3683
|
+
);
|
|
3684
|
+
const activeMonth = month ?? internalMonth;
|
|
3685
|
+
const { year, month: monthIndex } = monthOf(activeMonth);
|
|
3686
|
+
const byDay = React39.useMemo(() => {
|
|
3687
|
+
const map = /* @__PURE__ */ new Map();
|
|
3688
|
+
for (const event of events) {
|
|
3689
|
+
const key = getDate(event);
|
|
3690
|
+
const list = map.get(key);
|
|
3691
|
+
if (list) list.push(event);
|
|
3692
|
+
else map.set(key, [event]);
|
|
3693
|
+
}
|
|
3694
|
+
for (const list of map.values()) {
|
|
3695
|
+
list.sort((a, b) => getLabel(a).localeCompare(getLabel(b)));
|
|
3696
|
+
}
|
|
3697
|
+
return map;
|
|
3698
|
+
}, [events, getDate, getLabel]);
|
|
3699
|
+
const weeks = React39.useMemo(
|
|
3700
|
+
() => calendarWeeks(year, monthIndex, weekStartsOn),
|
|
3701
|
+
[year, monthIndex, weekStartsOn]
|
|
3702
|
+
);
|
|
3703
|
+
const weekdays = React39.useMemo(
|
|
3704
|
+
() => weekdayLabels(locale, weekStartsOn),
|
|
3705
|
+
[locale, weekStartsOn]
|
|
3706
|
+
);
|
|
3707
|
+
const monthName = monthLabel(year, monthIndex, locale);
|
|
3708
|
+
const agendaDays = React39.useMemo(
|
|
3709
|
+
() => [...byDay.keys()].filter((key) => key.startsWith(activeMonth)).sort().map((key) => ({ key, items: byDay.get(key) ?? [] })),
|
|
3710
|
+
[byDay, activeMonth]
|
|
3711
|
+
);
|
|
3712
|
+
const page = (delta) => {
|
|
3713
|
+
const next = shiftMonth(activeMonth, delta);
|
|
3714
|
+
if (month === void 0) setInternalMonth(next);
|
|
3715
|
+
onMonthChange?.(next);
|
|
3716
|
+
};
|
|
3717
|
+
const renderEvent = (event, key) => {
|
|
3718
|
+
const label = getLabel(event);
|
|
3719
|
+
const type = getType?.(event);
|
|
3720
|
+
const tone = typeTone(type, legend);
|
|
3721
|
+
const href = getHref?.(event);
|
|
3722
|
+
const chip = /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Badge, { variant: tone, size: "sm", className: "max-w-full truncate", children: label });
|
|
3723
|
+
if (!href) return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { children: chip }, key);
|
|
3724
|
+
const destination = linkHrefProp === "to" ? { to: href } : { href };
|
|
3725
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3726
|
+
Link3,
|
|
3727
|
+
{
|
|
3728
|
+
...destination,
|
|
3729
|
+
className: "block max-w-full rounded-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
3730
|
+
children: chip
|
|
3731
|
+
},
|
|
3732
|
+
key
|
|
3733
|
+
);
|
|
3734
|
+
};
|
|
3735
|
+
const gridHidden = agendaBreakpoint === "sm" ? "hidden sm:block" : "hidden md:block";
|
|
3736
|
+
const agendaHidden = agendaBreakpoint === "sm" ? "sm:hidden" : "md:hidden";
|
|
3737
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: cn("w-full select-none", className), children: [
|
|
3738
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "mb-2 flex items-center justify-between gap-2", children: [
|
|
3739
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3740
|
+
Button,
|
|
3741
|
+
{
|
|
3742
|
+
type: "button",
|
|
3743
|
+
variant: "ghost",
|
|
3744
|
+
size: "icon",
|
|
3745
|
+
"aria-label": "Previous month",
|
|
3746
|
+
onClick: () => page(-1),
|
|
3747
|
+
children: "\u2039"
|
|
3748
|
+
}
|
|
3749
|
+
),
|
|
3750
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { "aria-live": "polite", className: "text-sm font-semibold text-foreground", children: monthName }),
|
|
3751
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3752
|
+
Button,
|
|
3753
|
+
{
|
|
3754
|
+
type: "button",
|
|
3755
|
+
variant: "ghost",
|
|
3756
|
+
size: "icon",
|
|
3757
|
+
"aria-label": "Next month",
|
|
3758
|
+
onClick: () => page(1),
|
|
3759
|
+
children: "\u203A"
|
|
3760
|
+
}
|
|
3761
|
+
)
|
|
3762
|
+
] }),
|
|
3763
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
3764
|
+
"div",
|
|
3765
|
+
{
|
|
3766
|
+
role: "grid",
|
|
3767
|
+
"aria-label": ariaLabel ?? monthName,
|
|
3768
|
+
className: cn("flex flex-col gap-1", gridHidden),
|
|
3769
|
+
children: [
|
|
3770
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { role: "row", className: "grid grid-cols-7 gap-1 text-center text-xs text-muted-foreground", children: weekdays.map((weekday) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { role: "columnheader", "aria-label": weekday, className: "py-1", children: weekday }, weekday)) }),
|
|
3771
|
+
weeks.map((week) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { role: "row", className: "grid grid-cols-7 gap-1", children: week.map((day) => {
|
|
3772
|
+
const dayEvents = byDay.get(day.key) ?? [];
|
|
3773
|
+
const visible = dayEvents.slice(0, maxPerDay);
|
|
3774
|
+
const overflow = dayEvents.length - visible.length;
|
|
3775
|
+
const isToday = day.key === resolvedToday;
|
|
3776
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
3777
|
+
"div",
|
|
3778
|
+
{
|
|
3779
|
+
role: "gridcell",
|
|
3780
|
+
"aria-current": isToday ? "date" : void 0,
|
|
3781
|
+
className: cn(
|
|
3782
|
+
"flex min-h-16 flex-col gap-0.5 rounded-md border border-transparent p-1",
|
|
3783
|
+
!day.inMonth && "opacity-50",
|
|
3784
|
+
isToday && "border-primary/40 bg-primary/5"
|
|
3785
|
+
),
|
|
3786
|
+
children: [
|
|
3787
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3788
|
+
"span",
|
|
3789
|
+
{
|
|
3790
|
+
className: cn(
|
|
3791
|
+
"self-start px-1 text-xs tabular-nums",
|
|
3792
|
+
isToday ? "font-semibold text-primary-ink" : "text-muted-foreground"
|
|
3793
|
+
),
|
|
3794
|
+
children: day.day
|
|
3795
|
+
}
|
|
3796
|
+
),
|
|
3797
|
+
visible.map(
|
|
3798
|
+
(event, index) => renderEvent(event, `${day.key}-${index}-${getLabel(event)}`)
|
|
3799
|
+
),
|
|
3800
|
+
overflow > 0 && /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("span", { className: "px-1 text-[11px] text-muted-foreground", children: [
|
|
3801
|
+
"+",
|
|
3802
|
+
overflow,
|
|
3803
|
+
" more"
|
|
3804
|
+
] })
|
|
3805
|
+
]
|
|
3806
|
+
},
|
|
3807
|
+
day.key
|
|
3808
|
+
);
|
|
3809
|
+
}) }, week[0]?.key))
|
|
3810
|
+
]
|
|
3811
|
+
}
|
|
3812
|
+
),
|
|
3813
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: cn("flex flex-col gap-3", agendaHidden), children: agendaDays.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("p", { className: "py-6 text-center text-sm text-muted-foreground", children: "No events this month." }) : agendaDays.map(({ key, items }) => /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("section", { "aria-label": formatDateLabel(key, locale), children: [
|
|
3814
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("h3", { className: "mb-1 text-xs font-semibold uppercase tracking-wide text-muted-foreground", children: formatDateLabel(key, locale) }),
|
|
3815
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("ul", { className: "flex flex-col gap-1", children: items.map((event, index) => {
|
|
3816
|
+
const label = getLabel(event);
|
|
3817
|
+
const type = getType?.(event);
|
|
3818
|
+
const tone = typeTone(type, legend);
|
|
3819
|
+
const href = getHref?.(event);
|
|
3820
|
+
const row = /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Badge, { variant: tone, size: "sm", className: "max-w-full truncate", children: label });
|
|
3821
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("li", { children: href ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3822
|
+
Link3,
|
|
3823
|
+
{
|
|
3824
|
+
...linkHrefProp === "to" ? { to: href } : { href },
|
|
3825
|
+
className: "block max-w-full rounded-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
3826
|
+
children: row
|
|
3827
|
+
}
|
|
3828
|
+
) : row }, `${key}-${index}-${label}`);
|
|
3829
|
+
}) })
|
|
3830
|
+
] }, key)) }),
|
|
3831
|
+
legend && legend.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("ul", { className: "mt-3 flex flex-wrap gap-x-4 gap-y-1", "aria-label": "Event types", children: legend.map((item) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("li", { className: "flex items-center gap-1.5 text-xs text-muted-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Badge, { variant: typeTone(item.type, legend), size: "sm", children: item.label }) }, item.type)) })
|
|
3832
|
+
] });
|
|
3833
|
+
}
|
|
3834
|
+
MonthSchedule.displayName = "MonthSchedule";
|
|
3835
|
+
|
|
3836
|
+
// src/components/card/Card.tsx
|
|
3837
|
+
var React40 = __toESM(require("react"));
|
|
3838
|
+
var import_react_slot3 = require("@radix-ui/react-slot");
|
|
3839
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
3840
|
+
var Card = React40.forwardRef(
|
|
3633
3841
|
({ className, asChild = false, ...props }, ref) => {
|
|
3634
3842
|
const Comp = asChild ? import_react_slot3.Slot : "div";
|
|
3635
|
-
return /* @__PURE__ */ (0,
|
|
3843
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3636
3844
|
Comp,
|
|
3637
3845
|
{
|
|
3638
3846
|
ref,
|
|
@@ -3643,12 +3851,12 @@ var Card = React39.forwardRef(
|
|
|
3643
3851
|
}
|
|
3644
3852
|
);
|
|
3645
3853
|
Card.displayName = "Card";
|
|
3646
|
-
var CardHeader =
|
|
3647
|
-
({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
3854
|
+
var CardHeader = React40.forwardRef(
|
|
3855
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { ref, className: cn("flex flex-col space-y-1.5 p-6", className), ...props })
|
|
3648
3856
|
);
|
|
3649
3857
|
CardHeader.displayName = "CardHeader";
|
|
3650
|
-
var CardTitle =
|
|
3651
|
-
({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
3858
|
+
var CardTitle = React40.forwardRef(
|
|
3859
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3652
3860
|
"h3",
|
|
3653
3861
|
{
|
|
3654
3862
|
ref,
|
|
@@ -3658,22 +3866,22 @@ var CardTitle = React39.forwardRef(
|
|
|
3658
3866
|
)
|
|
3659
3867
|
);
|
|
3660
3868
|
CardTitle.displayName = "CardTitle";
|
|
3661
|
-
var CardDescription =
|
|
3662
|
-
({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
3869
|
+
var CardDescription = React40.forwardRef(
|
|
3870
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", { ref, className: cn("text-sm text-muted-foreground", className), ...props })
|
|
3663
3871
|
);
|
|
3664
3872
|
CardDescription.displayName = "CardDescription";
|
|
3665
|
-
var CardContent =
|
|
3666
|
-
({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
3873
|
+
var CardContent = React40.forwardRef(
|
|
3874
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { ref, className: cn("p-6 pt-0", className), ...props })
|
|
3667
3875
|
);
|
|
3668
3876
|
CardContent.displayName = "CardContent";
|
|
3669
|
-
var CardFooter =
|
|
3670
|
-
({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
3877
|
+
var CardFooter = React40.forwardRef(
|
|
3878
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { ref, className: cn("flex items-center p-6 pt-0", className), ...props })
|
|
3671
3879
|
);
|
|
3672
3880
|
CardFooter.displayName = "CardFooter";
|
|
3673
3881
|
|
|
3674
3882
|
// src/components/confirm-dialog/ConfirmDialog.tsx
|
|
3675
|
-
var
|
|
3676
|
-
var
|
|
3883
|
+
var React41 = __toESM(require("react"));
|
|
3884
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
3677
3885
|
function ConfirmDialog({
|
|
3678
3886
|
open,
|
|
3679
3887
|
onOpenChange,
|
|
@@ -3686,7 +3894,7 @@ function ConfirmDialog({
|
|
|
3686
3894
|
closeOnConfirm = true,
|
|
3687
3895
|
children
|
|
3688
3896
|
}) {
|
|
3689
|
-
const [pending, setPending] =
|
|
3897
|
+
const [pending, setPending] = React41.useState(false);
|
|
3690
3898
|
const handleConfirm = async () => {
|
|
3691
3899
|
try {
|
|
3692
3900
|
setPending(true);
|
|
@@ -3696,7 +3904,7 @@ function ConfirmDialog({
|
|
|
3696
3904
|
setPending(false);
|
|
3697
3905
|
}
|
|
3698
3906
|
};
|
|
3699
|
-
return /* @__PURE__ */ (0,
|
|
3907
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
3700
3908
|
Dialog,
|
|
3701
3909
|
{
|
|
3702
3910
|
open,
|
|
@@ -3707,9 +3915,9 @@ function ConfirmDialog({
|
|
|
3707
3915
|
title,
|
|
3708
3916
|
description,
|
|
3709
3917
|
size: "sm",
|
|
3710
|
-
footer: /* @__PURE__ */ (0,
|
|
3711
|
-
/* @__PURE__ */ (0,
|
|
3712
|
-
/* @__PURE__ */ (0,
|
|
3918
|
+
footer: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(DialogFooter, { children: [
|
|
3919
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Button, { variant: "ghost", onClick: () => onOpenChange(false), disabled: pending, children: cancelLabel }),
|
|
3920
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
3713
3921
|
Button,
|
|
3714
3922
|
{
|
|
3715
3923
|
variant: destructive ? "destructive" : "default",
|
|
@@ -3725,8 +3933,8 @@ function ConfirmDialog({
|
|
|
3725
3933
|
}
|
|
3726
3934
|
|
|
3727
3935
|
// src/components/table-of-contents/TableOfContents.tsx
|
|
3728
|
-
var
|
|
3729
|
-
var
|
|
3936
|
+
var React42 = __toESM(require("react"));
|
|
3937
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
3730
3938
|
function TableOfContents({
|
|
3731
3939
|
headings,
|
|
3732
3940
|
activeId,
|
|
@@ -3738,17 +3946,17 @@ function TableOfContents({
|
|
|
3738
3946
|
className,
|
|
3739
3947
|
...props
|
|
3740
3948
|
}) {
|
|
3741
|
-
return /* @__PURE__ */ (0,
|
|
3949
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
3742
3950
|
"nav",
|
|
3743
3951
|
{
|
|
3744
3952
|
"aria-label": ariaLabel ?? label,
|
|
3745
3953
|
className: cn("text-sm", sticky && "sticky top-20 max-h-[calc(100vh-6rem)] overflow-y-auto", className),
|
|
3746
3954
|
...props,
|
|
3747
3955
|
children: [
|
|
3748
|
-
/* @__PURE__ */ (0,
|
|
3749
|
-
/* @__PURE__ */ (0,
|
|
3956
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("p", { className: cn("mb-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground", labelClassName), children: label }),
|
|
3957
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("ul", { className: "space-y-1 border-l border-border", children: headings.map((heading) => {
|
|
3750
3958
|
const active = heading.id === activeId;
|
|
3751
|
-
return /* @__PURE__ */ (0,
|
|
3959
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("li", { style: { paddingLeft: `${(heading.level - 2) * 0.75}rem` }, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3752
3960
|
"a",
|
|
3753
3961
|
{
|
|
3754
3962
|
href: `#${heading.id}`,
|
|
@@ -3767,10 +3975,10 @@ function TableOfContents({
|
|
|
3767
3975
|
);
|
|
3768
3976
|
}
|
|
3769
3977
|
function useScrollSpy(ids, options) {
|
|
3770
|
-
const [activeId, setActiveId] =
|
|
3978
|
+
const [activeId, setActiveId] = React42.useState();
|
|
3771
3979
|
const idKey = ids.join("|");
|
|
3772
3980
|
const rootMargin = options?.rootMargin ?? "0px 0px -70% 0px";
|
|
3773
|
-
|
|
3981
|
+
React42.useEffect(() => {
|
|
3774
3982
|
if (idKey.length === 0 || typeof IntersectionObserver === "undefined") return;
|
|
3775
3983
|
const elements = idKey.split("|").map((id) => document.getElementById(id)).filter((element) => element !== null);
|
|
3776
3984
|
if (elements.length === 0) return;
|
|
@@ -3785,7 +3993,7 @@ function useScrollSpy(ids, options) {
|
|
|
3785
3993
|
elements.forEach((element) => observer.observe(element));
|
|
3786
3994
|
return () => observer.disconnect();
|
|
3787
3995
|
}, [idKey, rootMargin]);
|
|
3788
|
-
|
|
3996
|
+
React42.useEffect(() => {
|
|
3789
3997
|
if (typeof window === "undefined") return;
|
|
3790
3998
|
const ids2 = idKey.split("|").filter(Boolean);
|
|
3791
3999
|
const syncFromHash = () => {
|
|
@@ -3800,15 +4008,15 @@ function useScrollSpy(ids, options) {
|
|
|
3800
4008
|
}
|
|
3801
4009
|
|
|
3802
4010
|
// src/components/prose/Prose.tsx
|
|
3803
|
-
var
|
|
3804
|
-
var
|
|
4011
|
+
var React43 = __toESM(require("react"));
|
|
4012
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
3805
4013
|
var sizeClasses3 = {
|
|
3806
4014
|
sm: "text-sm [&_h2]:text-xl [&_h3]:text-lg",
|
|
3807
4015
|
md: "text-base [&_h2]:text-2xl [&_h3]:text-xl",
|
|
3808
4016
|
lg: "text-lg [&_h2]:text-3xl [&_h3]:text-2xl"
|
|
3809
4017
|
};
|
|
3810
|
-
var Prose =
|
|
3811
|
-
return /* @__PURE__ */ (0,
|
|
4018
|
+
var Prose = React43.forwardRef(function Prose2({ size = "md", className, ...props }, ref) {
|
|
4019
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
3812
4020
|
"div",
|
|
3813
4021
|
{
|
|
3814
4022
|
ref,
|
|
@@ -3847,7 +4055,7 @@ var Prose = React42.forwardRef(function Prose2({ size = "md", className, ...prop
|
|
|
3847
4055
|
});
|
|
3848
4056
|
|
|
3849
4057
|
// src/components/site-footer/SiteFooter.tsx
|
|
3850
|
-
var
|
|
4058
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
3851
4059
|
function isActive2(itemHref, activeHref, match) {
|
|
3852
4060
|
if (!activeHref) return false;
|
|
3853
4061
|
if (itemHref === activeHref) return true;
|
|
@@ -3869,18 +4077,18 @@ function SiteFooter({
|
|
|
3869
4077
|
}) {
|
|
3870
4078
|
const Link3 = linkComponent ?? "a";
|
|
3871
4079
|
const destination = (href) => linkHrefProp === "to" ? { to: href } : { href };
|
|
3872
|
-
return /* @__PURE__ */ (0,
|
|
3873
|
-
/* @__PURE__ */ (0,
|
|
3874
|
-
/* @__PURE__ */ (0,
|
|
4080
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("footer", { className: cn("border-t border-border bg-muted/30", className), ...props, children: [
|
|
4081
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("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: [
|
|
4082
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "min-w-0", children: [
|
|
3875
4083
|
brand,
|
|
3876
|
-
tagline && /* @__PURE__ */ (0,
|
|
3877
|
-
contact && /* @__PURE__ */ (0,
|
|
4084
|
+
tagline && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("p", { className: "mt-3 max-w-56 text-sm text-muted-foreground", children: tagline }),
|
|
4085
|
+
contact && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "mt-3 max-w-56 text-sm text-muted-foreground", children: contact })
|
|
3878
4086
|
] }),
|
|
3879
|
-
columns.map((column) => /* @__PURE__ */ (0,
|
|
3880
|
-
/* @__PURE__ */ (0,
|
|
3881
|
-
/* @__PURE__ */ (0,
|
|
4087
|
+
columns.map((column) => /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { children: [
|
|
4088
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("h2", { className: "mb-3 text-xs font-semibold uppercase tracking-wider text-muted-foreground", children: column.title }),
|
|
4089
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("ul", { className: "m-0 list-none space-y-2 p-0 text-sm", children: column.links.map((link) => {
|
|
3882
4090
|
const active = isActive2(link.href, activeHref, match);
|
|
3883
|
-
return /* @__PURE__ */ (0,
|
|
4091
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
3884
4092
|
Link3,
|
|
3885
4093
|
{
|
|
3886
4094
|
...destination(link.href),
|
|
@@ -3896,13 +4104,13 @@ function SiteFooter({
|
|
|
3896
4104
|
}) })
|
|
3897
4105
|
] }, column.title))
|
|
3898
4106
|
] }),
|
|
3899
|
-
legal && /* @__PURE__ */ (0,
|
|
4107
|
+
legal && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "border-t border-border", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("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 }) })
|
|
3900
4108
|
] });
|
|
3901
4109
|
}
|
|
3902
4110
|
|
|
3903
4111
|
// src/components/site-header/SiteHeader.tsx
|
|
3904
|
-
var
|
|
3905
|
-
var
|
|
4112
|
+
var React44 = __toESM(require("react"));
|
|
4113
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
3906
4114
|
function isActive3(itemHref, activeHref, match) {
|
|
3907
4115
|
if (!activeHref) return false;
|
|
3908
4116
|
if (itemHref === activeHref) return true;
|
|
@@ -3910,7 +4118,7 @@ function isActive3(itemHref, activeHref, match) {
|
|
|
3910
4118
|
return activeHref === itemHref || activeHref.startsWith(itemHref.endsWith("/") ? itemHref : `${itemHref}/`);
|
|
3911
4119
|
}
|
|
3912
4120
|
function Caret() {
|
|
3913
|
-
return /* @__PURE__ */ (0,
|
|
4121
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
3914
4122
|
"svg",
|
|
3915
4123
|
{
|
|
3916
4124
|
"aria-hidden": "true",
|
|
@@ -3921,7 +4129,7 @@ function Caret() {
|
|
|
3921
4129
|
strokeWidth: "1.75",
|
|
3922
4130
|
strokeLinecap: "round",
|
|
3923
4131
|
strokeLinejoin: "round",
|
|
3924
|
-
children: /* @__PURE__ */ (0,
|
|
4132
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("path", { d: "m2.5 4.5 3.5 3.5 3.5-3.5" })
|
|
3925
4133
|
}
|
|
3926
4134
|
);
|
|
3927
4135
|
}
|
|
@@ -3948,14 +4156,14 @@ function SiteHeader({
|
|
|
3948
4156
|
className,
|
|
3949
4157
|
...props
|
|
3950
4158
|
}) {
|
|
3951
|
-
const [mobileOpen, setMobileOpen] =
|
|
3952
|
-
const [openMenu, setOpenMenu] =
|
|
3953
|
-
const pendingFocus =
|
|
3954
|
-
const generatedId =
|
|
4159
|
+
const [mobileOpen, setMobileOpen] = React44.useState(false);
|
|
4160
|
+
const [openMenu, setOpenMenu] = React44.useState(null);
|
|
4161
|
+
const pendingFocus = React44.useRef(null);
|
|
4162
|
+
const generatedId = React44.useId();
|
|
3955
4163
|
const menuId = `${generatedId}-menu`;
|
|
3956
4164
|
const Link3 = linkComponent ?? "a";
|
|
3957
4165
|
const destination = (href) => linkHrefProp === "to" ? { to: href } : { href };
|
|
3958
|
-
|
|
4166
|
+
React44.useEffect(() => {
|
|
3959
4167
|
if (!openMenu) return;
|
|
3960
4168
|
const onKey = (event) => {
|
|
3961
4169
|
if (event.key === "Escape") setOpenMenu(null);
|
|
@@ -3972,7 +4180,7 @@ function SiteHeader({
|
|
|
3972
4180
|
document.removeEventListener("pointerdown", onPointer);
|
|
3973
4181
|
};
|
|
3974
4182
|
}, [openMenu]);
|
|
3975
|
-
|
|
4183
|
+
React44.useEffect(() => {
|
|
3976
4184
|
if (!openMenu || !pendingFocus.current) return;
|
|
3977
4185
|
const panel = document.getElementById(pendingFocus.current);
|
|
3978
4186
|
pendingFocus.current = null;
|
|
@@ -3980,7 +4188,7 @@ function SiteHeader({
|
|
|
3980
4188
|
}, [openMenu]);
|
|
3981
4189
|
const navLink = (item, extra) => {
|
|
3982
4190
|
const active = isActive3(item.href, activeHref, match);
|
|
3983
|
-
return /* @__PURE__ */ (0,
|
|
4191
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
3984
4192
|
Link3,
|
|
3985
4193
|
{
|
|
3986
4194
|
...destination(item.href),
|
|
@@ -3994,17 +4202,17 @@ function SiteHeader({
|
|
|
3994
4202
|
!extra && "text-sm hover:text-foreground",
|
|
3995
4203
|
!extra && (active ? "font-medium text-foreground" : "text-muted-foreground")
|
|
3996
4204
|
),
|
|
3997
|
-
children: extra === "panel" ? /* @__PURE__ */ (0,
|
|
3998
|
-
/* @__PURE__ */ (0,
|
|
3999
|
-
item.description && /* @__PURE__ */ (0,
|
|
4205
|
+
children: extra === "panel" ? /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_jsx_runtime44.Fragment, { children: [
|
|
4206
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "block text-sm font-medium", children: item.label }),
|
|
4207
|
+
item.description && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "mt-0.5 block text-xs text-muted-foreground", children: item.description })
|
|
4000
4208
|
] }) : item.label
|
|
4001
4209
|
},
|
|
4002
4210
|
item.href
|
|
4003
4211
|
);
|
|
4004
4212
|
};
|
|
4005
4213
|
const hasColumns = (item) => Array.isArray(item.columns) && item.columns.length > 0;
|
|
4006
|
-
return /* @__PURE__ */ (0,
|
|
4007
|
-
/* @__PURE__ */ (0,
|
|
4214
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_jsx_runtime44.Fragment, { children: [
|
|
4215
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
4008
4216
|
"header",
|
|
4009
4217
|
{
|
|
4010
4218
|
className: cn(
|
|
@@ -4013,7 +4221,7 @@ function SiteHeader({
|
|
|
4013
4221
|
className
|
|
4014
4222
|
),
|
|
4015
4223
|
...props,
|
|
4016
|
-
children: /* @__PURE__ */ (0,
|
|
4224
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
4017
4225
|
"nav",
|
|
4018
4226
|
{
|
|
4019
4227
|
"aria-label": navLabel,
|
|
@@ -4022,8 +4230,8 @@ function SiteHeader({
|
|
|
4022
4230
|
navClassName
|
|
4023
4231
|
),
|
|
4024
4232
|
children: [
|
|
4025
|
-
/* @__PURE__ */ (0,
|
|
4026
|
-
/* @__PURE__ */ (0,
|
|
4233
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "flex min-w-0 items-center gap-6", children: [
|
|
4234
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
4027
4235
|
Link3,
|
|
4028
4236
|
{
|
|
4029
4237
|
...destination("/"),
|
|
@@ -4032,7 +4240,7 @@ function SiteHeader({
|
|
|
4032
4240
|
children: brand
|
|
4033
4241
|
}
|
|
4034
4242
|
),
|
|
4035
|
-
/* @__PURE__ */ (0,
|
|
4243
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
4036
4244
|
"ul",
|
|
4037
4245
|
{
|
|
4038
4246
|
className: cn(
|
|
@@ -4041,11 +4249,11 @@ function SiteHeader({
|
|
|
4041
4249
|
),
|
|
4042
4250
|
children: items.map((item) => {
|
|
4043
4251
|
if (!hasColumns(item)) {
|
|
4044
|
-
return /* @__PURE__ */ (0,
|
|
4252
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("li", { children: navLink(item) }, item.href);
|
|
4045
4253
|
}
|
|
4046
4254
|
const panelId = `${generatedId}-panel-${item.label.replace(/\s+/g, "-").toLowerCase()}`;
|
|
4047
4255
|
const open = openMenu === item.label;
|
|
4048
|
-
return /* @__PURE__ */ (0,
|
|
4256
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
4049
4257
|
"li",
|
|
4050
4258
|
{
|
|
4051
4259
|
"data-site-nav-item": true,
|
|
@@ -4059,7 +4267,7 @@ function SiteHeader({
|
|
|
4059
4267
|
}
|
|
4060
4268
|
},
|
|
4061
4269
|
children: [
|
|
4062
|
-
/* @__PURE__ */ (0,
|
|
4270
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
4063
4271
|
"button",
|
|
4064
4272
|
{
|
|
4065
4273
|
type: "button",
|
|
@@ -4083,11 +4291,11 @@ function SiteHeader({
|
|
|
4083
4291
|
),
|
|
4084
4292
|
children: [
|
|
4085
4293
|
item.label,
|
|
4086
|
-
/* @__PURE__ */ (0,
|
|
4294
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Caret, {})
|
|
4087
4295
|
]
|
|
4088
4296
|
}
|
|
4089
4297
|
),
|
|
4090
|
-
/* @__PURE__ */ (0,
|
|
4298
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
4091
4299
|
"div",
|
|
4092
4300
|
{
|
|
4093
4301
|
id: panelId,
|
|
@@ -4097,9 +4305,9 @@ function SiteHeader({
|
|
|
4097
4305
|
item.columns.length > 1 ? "grid-cols-2" : "grid-cols-1",
|
|
4098
4306
|
"min-w-[22rem]"
|
|
4099
4307
|
),
|
|
4100
|
-
children: item.columns.map((column, index) => /* @__PURE__ */ (0,
|
|
4101
|
-
column.heading && /* @__PURE__ */ (0,
|
|
4102
|
-
/* @__PURE__ */ (0,
|
|
4308
|
+
children: item.columns.map((column, index) => /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "min-w-40", children: [
|
|
4309
|
+
column.heading && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("p", { className: "mb-2 text-xs font-medium uppercase tracking-wide text-muted-foreground", children: column.heading }),
|
|
4310
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("ul", { className: "flex flex-col gap-0.5", children: column.items.map((link) => /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("li", { children: navLink(link, "panel") }, `${column.heading ?? index}-${link.href}-${link.label}`)) })
|
|
4103
4311
|
] }, column.heading ?? index))
|
|
4104
4312
|
}
|
|
4105
4313
|
)
|
|
@@ -4111,9 +4319,9 @@ function SiteHeader({
|
|
|
4111
4319
|
}
|
|
4112
4320
|
)
|
|
4113
4321
|
] }),
|
|
4114
|
-
/* @__PURE__ */ (0,
|
|
4322
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
4115
4323
|
actions,
|
|
4116
|
-
showMobileTrigger && /* @__PURE__ */ (0,
|
|
4324
|
+
showMobileTrigger && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
4117
4325
|
"button",
|
|
4118
4326
|
{
|
|
4119
4327
|
type: "button",
|
|
@@ -4126,7 +4334,7 @@ function SiteHeader({
|
|
|
4126
4334
|
"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",
|
|
4127
4335
|
desktopBreakpoint === "lg" ? "lg:hidden" : "md:hidden"
|
|
4128
4336
|
),
|
|
4129
|
-
children: /* @__PURE__ */ (0,
|
|
4337
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
4130
4338
|
"svg",
|
|
4131
4339
|
{
|
|
4132
4340
|
"aria-hidden": "true",
|
|
@@ -4136,7 +4344,7 @@ function SiteHeader({
|
|
|
4136
4344
|
stroke: "currentColor",
|
|
4137
4345
|
strokeWidth: "2",
|
|
4138
4346
|
strokeLinecap: "round",
|
|
4139
|
-
children: mobileOpen ? /* @__PURE__ */ (0,
|
|
4347
|
+
children: mobileOpen ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("path", { d: "M6 6l12 12M18 6L6 18" }) : /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("path", { d: "M4 7h16M4 12h16M4 17h16" })
|
|
4140
4348
|
}
|
|
4141
4349
|
)
|
|
4142
4350
|
}
|
|
@@ -4147,7 +4355,7 @@ function SiteHeader({
|
|
|
4147
4355
|
)
|
|
4148
4356
|
}
|
|
4149
4357
|
),
|
|
4150
|
-
showMobileTrigger && /* @__PURE__ */ (0,
|
|
4358
|
+
showMobileTrigger && /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
4151
4359
|
Drawer,
|
|
4152
4360
|
{
|
|
4153
4361
|
open: mobileOpen,
|
|
@@ -4158,16 +4366,16 @@ function SiteHeader({
|
|
|
4158
4366
|
size: "sm",
|
|
4159
4367
|
animate: true,
|
|
4160
4368
|
children: [
|
|
4161
|
-
/* @__PURE__ */ (0,
|
|
4162
|
-
(item) => hasColumns(item) ? /* @__PURE__ */ (0,
|
|
4163
|
-
/* @__PURE__ */ (0,
|
|
4164
|
-
/* @__PURE__ */ (0,
|
|
4165
|
-
column.heading && /* @__PURE__ */ (0,
|
|
4166
|
-
/* @__PURE__ */ (0,
|
|
4369
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("nav", { id: menuId, "aria-label": mobileNavLabel, className: "flex flex-col gap-1", children: items.map(
|
|
4370
|
+
(item) => hasColumns(item) ? /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("details", { className: "rounded-md", children: [
|
|
4371
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("summary", { className: "cursor-pointer rounded-md px-3 py-2 text-base font-medium hover:bg-accent", children: item.label }),
|
|
4372
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "mt-1 flex flex-col gap-2 pb-2", children: item.columns.map((column, index) => /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "px-3", children: [
|
|
4373
|
+
column.heading && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("p", { className: "mb-1 text-xs font-medium uppercase tracking-wide text-muted-foreground", children: column.heading }),
|
|
4374
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("ul", { className: "flex flex-col gap-1", children: column.items.map((link) => /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("li", { children: navLink(link, "mobile") }, `${column.heading ?? index}-${link.href}-${link.label}`)) })
|
|
4167
4375
|
] }, column.heading ?? index)) })
|
|
4168
4376
|
] }, item.label) : navLink(item, "mobile")
|
|
4169
4377
|
) }),
|
|
4170
|
-
(mobileActions ?? actions) && /* @__PURE__ */ (0,
|
|
4378
|
+
(mobileActions ?? actions) && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "mt-4 border-t border-border pt-4", children: mobileActions ?? actions })
|
|
4171
4379
|
]
|
|
4172
4380
|
}
|
|
4173
4381
|
)
|
|
@@ -4175,15 +4383,15 @@ function SiteHeader({
|
|
|
4175
4383
|
}
|
|
4176
4384
|
|
|
4177
4385
|
// src/components/accordion/Accordion.tsx
|
|
4178
|
-
var
|
|
4179
|
-
var
|
|
4180
|
-
var AccordionContext =
|
|
4386
|
+
var React45 = __toESM(require("react"));
|
|
4387
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
4388
|
+
var AccordionContext = React45.createContext({
|
|
4181
4389
|
openItems: /* @__PURE__ */ new Set(),
|
|
4182
4390
|
toggle: () => {
|
|
4183
4391
|
},
|
|
4184
4392
|
collapsible: true
|
|
4185
4393
|
});
|
|
4186
|
-
var Accordion =
|
|
4394
|
+
var Accordion = React45.forwardRef(
|
|
4187
4395
|
({
|
|
4188
4396
|
value,
|
|
4189
4397
|
defaultValue = [],
|
|
@@ -4196,9 +4404,9 @@ var Accordion = React44.forwardRef(
|
|
|
4196
4404
|
style,
|
|
4197
4405
|
children
|
|
4198
4406
|
}, ref) => {
|
|
4199
|
-
const [internalOpen, setInternalOpen] =
|
|
4407
|
+
const [internalOpen, setInternalOpen] = React45.useState(defaultValue);
|
|
4200
4408
|
const current = value ?? internalOpen;
|
|
4201
|
-
const toggle =
|
|
4409
|
+
const toggle = React45.useCallback(
|
|
4202
4410
|
(id) => {
|
|
4203
4411
|
const next = current.includes(id) ? current.filter((item) => item !== id) : collapsible ? [id] : [...current, id];
|
|
4204
4412
|
if (value === void 0) setInternalOpen(next);
|
|
@@ -4207,7 +4415,7 @@ var Accordion = React44.forwardRef(
|
|
|
4207
4415
|
[current, collapsible, value, onValueChange]
|
|
4208
4416
|
);
|
|
4209
4417
|
const gapResolved = resolveGap(gap);
|
|
4210
|
-
return /* @__PURE__ */ (0,
|
|
4418
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
4211
4419
|
"div",
|
|
4212
4420
|
{
|
|
4213
4421
|
ref,
|
|
@@ -4220,28 +4428,28 @@ var Accordion = React44.forwardRef(
|
|
|
4220
4428
|
className
|
|
4221
4429
|
),
|
|
4222
4430
|
style: { ...gapResolved.style, ...style },
|
|
4223
|
-
children: /* @__PURE__ */ (0,
|
|
4224
|
-
/* @__PURE__ */ (0,
|
|
4225
|
-
/* @__PURE__ */ (0,
|
|
4431
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(AccordionContext.Provider, { value: { openItems: new Set(current), toggle, collapsible }, children: items ? items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(AccordionItem, { id: item.id, children: [
|
|
4432
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(AccordionTrigger, { disabled: item.disabled, children: item.title }),
|
|
4433
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(AccordionContent, { children: item.content })
|
|
4226
4434
|
] }, item.id)) : children })
|
|
4227
4435
|
}
|
|
4228
4436
|
);
|
|
4229
4437
|
}
|
|
4230
4438
|
);
|
|
4231
4439
|
Accordion.displayName = "Accordion";
|
|
4232
|
-
var AccordionItem =
|
|
4233
|
-
({ id, className, children }, ref) => /* @__PURE__ */ (0,
|
|
4440
|
+
var AccordionItem = React45.forwardRef(
|
|
4441
|
+
({ id, className, children }, ref) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { ref, "data-accordion-item": id, className, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(AccordionItemContext.Provider, { value: { id }, children }) })
|
|
4234
4442
|
);
|
|
4235
4443
|
AccordionItem.displayName = "AccordionItem";
|
|
4236
|
-
var AccordionItemContext =
|
|
4237
|
-
var AccordionTrigger =
|
|
4444
|
+
var AccordionItemContext = React45.createContext({ id: "" });
|
|
4445
|
+
var AccordionTrigger = React45.forwardRef(
|
|
4238
4446
|
({ className, children, icon, ...props }, ref) => {
|
|
4239
|
-
const { id } =
|
|
4240
|
-
const { openItems, toggle } =
|
|
4447
|
+
const { id } = React45.useContext(AccordionItemContext);
|
|
4448
|
+
const { openItems, toggle } = React45.useContext(AccordionContext);
|
|
4241
4449
|
const open = openItems.has(id);
|
|
4242
4450
|
const panelId = `${id}-panel`;
|
|
4243
4451
|
const triggerId = `${id}-trigger`;
|
|
4244
|
-
return /* @__PURE__ */ (0,
|
|
4452
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
4245
4453
|
"button",
|
|
4246
4454
|
{
|
|
4247
4455
|
ref,
|
|
@@ -4260,7 +4468,7 @@ var AccordionTrigger = React44.forwardRef(
|
|
|
4260
4468
|
...props,
|
|
4261
4469
|
children: [
|
|
4262
4470
|
children,
|
|
4263
|
-
icon ?? /* @__PURE__ */ (0,
|
|
4471
|
+
icon ?? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
4264
4472
|
"svg",
|
|
4265
4473
|
{
|
|
4266
4474
|
"aria-hidden": "true",
|
|
@@ -4270,7 +4478,7 @@ var AccordionTrigger = React44.forwardRef(
|
|
|
4270
4478
|
strokeWidth: "2",
|
|
4271
4479
|
strokeLinecap: "round",
|
|
4272
4480
|
className: cn("h-4 w-4 shrink-0 transition-transform duration-200", open && "rotate-180"),
|
|
4273
|
-
children: /* @__PURE__ */ (0,
|
|
4481
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("polyline", { points: "6 9 12 15 18 9" })
|
|
4274
4482
|
}
|
|
4275
4483
|
)
|
|
4276
4484
|
]
|
|
@@ -4279,14 +4487,14 @@ var AccordionTrigger = React44.forwardRef(
|
|
|
4279
4487
|
}
|
|
4280
4488
|
);
|
|
4281
4489
|
AccordionTrigger.displayName = "AccordionTrigger";
|
|
4282
|
-
var AccordionContent =
|
|
4490
|
+
var AccordionContent = React45.forwardRef(
|
|
4283
4491
|
({ className, children, ...props }, ref) => {
|
|
4284
|
-
const { id } =
|
|
4285
|
-
const { openItems } =
|
|
4492
|
+
const { id } = React45.useContext(AccordionItemContext);
|
|
4493
|
+
const { openItems } = React45.useContext(AccordionContext);
|
|
4286
4494
|
const open = openItems.has(id);
|
|
4287
|
-
const [mounted, setMounted] =
|
|
4288
|
-
const [expanded, setExpanded] =
|
|
4289
|
-
|
|
4495
|
+
const [mounted, setMounted] = React45.useState(open);
|
|
4496
|
+
const [expanded, setExpanded] = React45.useState(open);
|
|
4497
|
+
React45.useEffect(() => {
|
|
4290
4498
|
const reduce = typeof window.matchMedia === "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
4291
4499
|
if (open) {
|
|
4292
4500
|
setMounted(true);
|
|
@@ -4311,7 +4519,7 @@ var AccordionContent = React44.forwardRef(
|
|
|
4311
4519
|
const timer = setTimeout(() => setMounted(false), 320);
|
|
4312
4520
|
return () => clearTimeout(timer);
|
|
4313
4521
|
}, [open]);
|
|
4314
|
-
return /* @__PURE__ */ (0,
|
|
4522
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
4315
4523
|
"div",
|
|
4316
4524
|
{
|
|
4317
4525
|
ref,
|
|
@@ -4330,7 +4538,7 @@ var AccordionContent = React44.forwardRef(
|
|
|
4330
4538
|
className
|
|
4331
4539
|
),
|
|
4332
4540
|
...props,
|
|
4333
|
-
children: /* @__PURE__ */ (0,
|
|
4541
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "px-4 pb-3 text-sm text-muted-foreground", children }) })
|
|
4334
4542
|
}
|
|
4335
4543
|
);
|
|
4336
4544
|
}
|
|
@@ -4338,10 +4546,10 @@ var AccordionContent = React44.forwardRef(
|
|
|
4338
4546
|
AccordionContent.displayName = "AccordionContent";
|
|
4339
4547
|
|
|
4340
4548
|
// src/components/table/Table.tsx
|
|
4341
|
-
var
|
|
4342
|
-
var
|
|
4343
|
-
var Table =
|
|
4344
|
-
({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
4549
|
+
var React46 = __toESM(require("react"));
|
|
4550
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
4551
|
+
var Table = React46.forwardRef(
|
|
4552
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "relative w-full overflow-auto", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
4345
4553
|
"table",
|
|
4346
4554
|
{
|
|
4347
4555
|
ref,
|
|
@@ -4351,16 +4559,16 @@ var Table = React45.forwardRef(
|
|
|
4351
4559
|
) })
|
|
4352
4560
|
);
|
|
4353
4561
|
Table.displayName = "Table";
|
|
4354
|
-
var TableHeader =
|
|
4355
|
-
({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
4562
|
+
var TableHeader = React46.forwardRef(
|
|
4563
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("thead", { ref, className: cn("[&_tr]:border-b", className), ...props })
|
|
4356
4564
|
);
|
|
4357
4565
|
TableHeader.displayName = "TableHeader";
|
|
4358
|
-
var TableBody =
|
|
4359
|
-
({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
4566
|
+
var TableBody = React46.forwardRef(
|
|
4567
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("tbody", { ref, className: cn("[&_tr:last-child]:border-0", className), ...props })
|
|
4360
4568
|
);
|
|
4361
4569
|
TableBody.displayName = "TableBody";
|
|
4362
|
-
var TableFooter =
|
|
4363
|
-
({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
4570
|
+
var TableFooter = React46.forwardRef(
|
|
4571
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
4364
4572
|
"tfoot",
|
|
4365
4573
|
{
|
|
4366
4574
|
ref,
|
|
@@ -4370,8 +4578,8 @@ var TableFooter = React45.forwardRef(
|
|
|
4370
4578
|
)
|
|
4371
4579
|
);
|
|
4372
4580
|
TableFooter.displayName = "TableFooter";
|
|
4373
|
-
var TableRow =
|
|
4374
|
-
({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
4581
|
+
var TableRow = React46.forwardRef(
|
|
4582
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
4375
4583
|
"tr",
|
|
4376
4584
|
{
|
|
4377
4585
|
ref,
|
|
@@ -4384,8 +4592,8 @@ var TableRow = React45.forwardRef(
|
|
|
4384
4592
|
)
|
|
4385
4593
|
);
|
|
4386
4594
|
TableRow.displayName = "TableRow";
|
|
4387
|
-
var TableHead =
|
|
4388
|
-
({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
4595
|
+
var TableHead = React46.forwardRef(
|
|
4596
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
4389
4597
|
"th",
|
|
4390
4598
|
{
|
|
4391
4599
|
ref,
|
|
@@ -4399,27 +4607,27 @@ var TableHead = React45.forwardRef(
|
|
|
4399
4607
|
)
|
|
4400
4608
|
);
|
|
4401
4609
|
TableHead.displayName = "TableHead";
|
|
4402
|
-
var TableCell =
|
|
4403
|
-
({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
4610
|
+
var TableCell = React46.forwardRef(
|
|
4611
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("td", { ref, className: cn("px-3 py-2 align-middle", className), ...props })
|
|
4404
4612
|
);
|
|
4405
4613
|
TableCell.displayName = "TableCell";
|
|
4406
|
-
var TableCaption =
|
|
4407
|
-
({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
4614
|
+
var TableCaption = React46.forwardRef(
|
|
4615
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("caption", { ref, className: cn("mt-3 text-xs text-muted-foreground", className), ...props })
|
|
4408
4616
|
);
|
|
4409
4617
|
TableCaption.displayName = "TableCaption";
|
|
4410
4618
|
|
|
4411
4619
|
// src/components/data-table/DataTable.tsx
|
|
4412
|
-
var
|
|
4620
|
+
var React48 = __toESM(require("react"));
|
|
4413
4621
|
|
|
4414
4622
|
// src/components/pagination/Pagination.tsx
|
|
4415
|
-
var
|
|
4416
|
-
var
|
|
4623
|
+
var React47 = __toESM(require("react"));
|
|
4624
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
4417
4625
|
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";
|
|
4418
4626
|
var controlDisabledClass = "pointer-events-none opacity-50";
|
|
4419
4627
|
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";
|
|
4420
4628
|
var pageActiveClass = "border-primary bg-primary text-primary-foreground font-medium";
|
|
4421
4629
|
var pageIdleClass = "border-border hover:bg-muted";
|
|
4422
|
-
var Pagination =
|
|
4630
|
+
var Pagination = React47.forwardRef(
|
|
4423
4631
|
({
|
|
4424
4632
|
page: pageProp,
|
|
4425
4633
|
pageCount: pageCountProp,
|
|
@@ -4466,11 +4674,11 @@ var Pagination = React46.forwardRef(
|
|
|
4466
4674
|
if (linkMode) {
|
|
4467
4675
|
const href = hrefFor(target);
|
|
4468
4676
|
if (disabled || href === void 0) {
|
|
4469
|
-
return /* @__PURE__ */ (0,
|
|
4677
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { "aria-label": label, "aria-disabled": "true", className: cn(controlClass, controlDisabledClass), children: content });
|
|
4470
4678
|
}
|
|
4471
|
-
return /* @__PURE__ */ (0,
|
|
4679
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(LinkEl, { ...destination(href), "aria-label": label, className: controlClass, children: content });
|
|
4472
4680
|
}
|
|
4473
|
-
return /* @__PURE__ */ (0,
|
|
4681
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
4474
4682
|
"button",
|
|
4475
4683
|
{
|
|
4476
4684
|
type: "button",
|
|
@@ -4489,11 +4697,11 @@ var Pagination = React46.forwardRef(
|
|
|
4489
4697
|
if (linkMode) {
|
|
4490
4698
|
const href = hrefFor(entry);
|
|
4491
4699
|
if (isCurrent || href === void 0) {
|
|
4492
|
-
return /* @__PURE__ */ (0,
|
|
4700
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { "aria-current": "page", "aria-label": label, className: classes, children: entry }, entry);
|
|
4493
4701
|
}
|
|
4494
|
-
return /* @__PURE__ */ (0,
|
|
4702
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(LinkEl, { ...destination(href), "aria-label": label, className: classes, children: entry }, entry);
|
|
4495
4703
|
}
|
|
4496
|
-
return /* @__PURE__ */ (0,
|
|
4704
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
4497
4705
|
"button",
|
|
4498
4706
|
{
|
|
4499
4707
|
type: "button",
|
|
@@ -4506,7 +4714,7 @@ var Pagination = React46.forwardRef(
|
|
|
4506
4714
|
entry
|
|
4507
4715
|
);
|
|
4508
4716
|
};
|
|
4509
|
-
const nav = /* @__PURE__ */ (0,
|
|
4717
|
+
const nav = /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
4510
4718
|
"nav",
|
|
4511
4719
|
{
|
|
4512
4720
|
ref,
|
|
@@ -4517,7 +4725,7 @@ var Pagination = React46.forwardRef(
|
|
|
4517
4725
|
withFirst && step(1, labels?.first ?? "First page", icons?.first ?? "\xAB", page <= 1),
|
|
4518
4726
|
step(page - 1, labels?.previous ?? "Previous page", icons?.previous ?? "<", page <= 1),
|
|
4519
4727
|
pages.map(
|
|
4520
|
-
(entry, index) => entry === "ellipsis" ? /* @__PURE__ */ (0,
|
|
4728
|
+
(entry, index) => entry === "ellipsis" ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
4521
4729
|
"span",
|
|
4522
4730
|
{
|
|
4523
4731
|
"aria-hidden": "true",
|
|
@@ -4533,8 +4741,8 @@ var Pagination = React46.forwardRef(
|
|
|
4533
4741
|
}
|
|
4534
4742
|
);
|
|
4535
4743
|
if (!summaryEnabled) return nav;
|
|
4536
|
-
return /* @__PURE__ */ (0,
|
|
4537
|
-
/* @__PURE__ */ (0,
|
|
4744
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: cn("flex flex-wrap items-center justify-between gap-3", className), children: [
|
|
4745
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("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}` }),
|
|
4538
4746
|
nav
|
|
4539
4747
|
] });
|
|
4540
4748
|
}
|
|
@@ -4542,7 +4750,14 @@ var Pagination = React46.forwardRef(
|
|
|
4542
4750
|
Pagination.displayName = "Pagination";
|
|
4543
4751
|
|
|
4544
4752
|
// src/components/data-table/DataTable.tsx
|
|
4545
|
-
var
|
|
4753
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
4754
|
+
var cardBreakpointClasses = {
|
|
4755
|
+
sm: { table: "max-sm:hidden", cards: "sm:hidden" },
|
|
4756
|
+
md: { table: "max-md:hidden", cards: "md:hidden" },
|
|
4757
|
+
lg: { table: "max-lg:hidden", cards: "lg:hidden" },
|
|
4758
|
+
xl: { table: "max-xl:hidden", cards: "xl:hidden" },
|
|
4759
|
+
"2xl": { table: "max-2xl:hidden", cards: "2xl:hidden" }
|
|
4760
|
+
};
|
|
4546
4761
|
function compareValues(a, b) {
|
|
4547
4762
|
if (typeof a === "number" && typeof b === "number") return a - b;
|
|
4548
4763
|
if (a instanceof Date && b instanceof Date) return a.getTime() - b.getTime();
|
|
@@ -4577,13 +4792,14 @@ function DataTable({
|
|
|
4577
4792
|
stickyHeader,
|
|
4578
4793
|
density = "default",
|
|
4579
4794
|
zebra,
|
|
4795
|
+
cardLayout,
|
|
4580
4796
|
loading,
|
|
4581
4797
|
loadingRows,
|
|
4582
4798
|
className
|
|
4583
4799
|
}) {
|
|
4584
|
-
const [internalSort, setInternalSort] =
|
|
4585
|
-
const [internalPage, setInternalPage] =
|
|
4586
|
-
const sort =
|
|
4800
|
+
const [internalSort, setInternalSort] = React48.useState(defaultSort);
|
|
4801
|
+
const [internalPage, setInternalPage] = React48.useState(1);
|
|
4802
|
+
const sort = React48.useMemo(() => {
|
|
4587
4803
|
if (sortKey !== void 0) {
|
|
4588
4804
|
return sortKey === null ? null : { key: sortKey, dir: sortDir ?? "asc" };
|
|
4589
4805
|
}
|
|
@@ -4600,7 +4816,7 @@ function DataTable({
|
|
|
4600
4816
|
if (page === void 0) setInternalPage(next);
|
|
4601
4817
|
onPageChange?.(next);
|
|
4602
4818
|
};
|
|
4603
|
-
const sorted =
|
|
4819
|
+
const sorted = React48.useMemo(() => {
|
|
4604
4820
|
if (!sort) return data;
|
|
4605
4821
|
const column = columns.find((c) => c.key === sort.key);
|
|
4606
4822
|
if (!column) return data;
|
|
@@ -4620,10 +4836,10 @@ function DataTable({
|
|
|
4620
4836
|
const pageCount = pageCountProp ?? computedPageCount;
|
|
4621
4837
|
const safePage = Math.min(currentPage, pageCount || 1);
|
|
4622
4838
|
const visible = manualPagination ? data : pageSize ? sorted.slice((safePage - 1) * pageSize, safePage * pageSize) : sorted;
|
|
4623
|
-
const [internalSelected, setInternalSelected] =
|
|
4839
|
+
const [internalSelected, setInternalSelected] = React48.useState([]);
|
|
4624
4840
|
const selectionEnabled = selectedRowIds !== void 0 || onSelectedRowIdsChange !== void 0;
|
|
4625
4841
|
const selectedIds = selectedRowIds ?? internalSelected;
|
|
4626
|
-
const selectedSet =
|
|
4842
|
+
const selectedSet = React48.useMemo(() => new Set(selectedIds), [selectedIds]);
|
|
4627
4843
|
const selectableVisible = isRowSelectable ? visible.filter(isRowSelectable) : visible;
|
|
4628
4844
|
const allSelected = selectableVisible.length > 0 && selectableVisible.every((row) => selectedSet.has(rowId(row)));
|
|
4629
4845
|
const someSelected = selectableVisible.some((row) => selectedSet.has(rowId(row)));
|
|
@@ -4650,136 +4866,205 @@ function DataTable({
|
|
|
4650
4866
|
if (typeof raw === "string" || typeof raw === "number") return raw;
|
|
4651
4867
|
return String(raw);
|
|
4652
4868
|
};
|
|
4869
|
+
const cardBreakpoint = typeof cardLayout === "string" ? cardLayout : cardLayout ? "md" : null;
|
|
4870
|
+
const cardClasses = cardBreakpoint ? cardBreakpointClasses[cardBreakpoint] : null;
|
|
4653
4871
|
const alignClass = (align) => align === "right" ? "text-right" : align === "center" ? "text-center" : "text-left";
|
|
4654
|
-
|
|
4655
|
-
|
|
4656
|
-
|
|
4657
|
-
/* @__PURE__ */ (0,
|
|
4872
|
+
const cardCell = (row, column, index) => {
|
|
4873
|
+
const value = cellValue(row, column, index);
|
|
4874
|
+
if (column.onClick) {
|
|
4875
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
4876
|
+
"button",
|
|
4877
|
+
{
|
|
4878
|
+
type: "button",
|
|
4879
|
+
onClick: () => column.onClick(row),
|
|
4880
|
+
className: "block w-full rounded px-1.5 py-0.5 text-left transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
4881
|
+
children: value
|
|
4882
|
+
}
|
|
4883
|
+
);
|
|
4884
|
+
}
|
|
4885
|
+
return value;
|
|
4886
|
+
};
|
|
4887
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: cn("w-full space-y-3", className), children: [
|
|
4888
|
+
selectionEnabled && selectedIds.length > 0 && bulkActions && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("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: [
|
|
4889
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "font-medium", children: selectedLabel.replace("{count}", String(selectedIds.length)) }),
|
|
4890
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "flex flex-wrap items-center gap-2", children: bulkActions })
|
|
4658
4891
|
] }),
|
|
4659
|
-
/* @__PURE__ */ (0,
|
|
4660
|
-
"
|
|
4892
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
4893
|
+
"div",
|
|
4661
4894
|
{
|
|
4662
|
-
className: cn("w-full
|
|
4663
|
-
children:
|
|
4664
|
-
|
|
4665
|
-
|
|
4666
|
-
|
|
4667
|
-
|
|
4668
|
-
{
|
|
4669
|
-
|
|
4670
|
-
|
|
4671
|
-
|
|
4672
|
-
|
|
4673
|
-
|
|
4674
|
-
|
|
4675
|
-
|
|
4676
|
-
|
|
4677
|
-
|
|
4678
|
-
|
|
4679
|
-
|
|
4680
|
-
|
|
4681
|
-
|
|
4895
|
+
className: cn("w-full overflow-x-auto rounded-lg border border-border", cardClasses?.table),
|
|
4896
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
4897
|
+
"table",
|
|
4898
|
+
{
|
|
4899
|
+
className: cn("w-full caption-bottom", density === "compact" ? "text-xs" : "text-sm"),
|
|
4900
|
+
children: [
|
|
4901
|
+
caption && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("caption", { className: "px-3 py-2 text-left text-xs text-muted-foreground", children: caption }),
|
|
4902
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("thead", { className: cn("bg-muted/50", stickyHeader && "sticky top-0 z-10 bg-background"), children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("tr", { children: [
|
|
4903
|
+
selectionEnabled && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("th", { scope: "col", className: "w-10 border-b border-border px-3 py-2", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
4904
|
+
Checkbox,
|
|
4905
|
+
{
|
|
4906
|
+
"aria-label": selectAllLabel,
|
|
4907
|
+
checked: allSelected,
|
|
4908
|
+
ref: (node) => {
|
|
4909
|
+
if (node) node.indeterminate = someSelected && !allSelected;
|
|
4910
|
+
},
|
|
4911
|
+
onCheckedChange: toggleAll
|
|
4912
|
+
}
|
|
4913
|
+
) }),
|
|
4914
|
+
columns.map((column) => {
|
|
4915
|
+
const isSorted = sort?.key === column.key;
|
|
4916
|
+
const ariaSort = !column.sortable ? void 0 : isSorted ? sort.dir === "asc" ? "ascending" : "descending" : "none";
|
|
4917
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
4918
|
+
"th",
|
|
4919
|
+
{
|
|
4920
|
+
scope: "col",
|
|
4921
|
+
"aria-sort": ariaSort,
|
|
4922
|
+
className: cn(
|
|
4923
|
+
"border-b border-border px-3 py-2 font-medium",
|
|
4924
|
+
alignClass(column.align),
|
|
4925
|
+
column.className
|
|
4926
|
+
),
|
|
4927
|
+
children: column.sortable ? /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
4928
|
+
"button",
|
|
4929
|
+
{
|
|
4930
|
+
type: "button",
|
|
4931
|
+
onClick: () => applySort(column.key),
|
|
4932
|
+
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",
|
|
4933
|
+
children: [
|
|
4934
|
+
column.header,
|
|
4935
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("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" })
|
|
4936
|
+
]
|
|
4937
|
+
}
|
|
4938
|
+
) : column.header
|
|
4939
|
+
},
|
|
4940
|
+
column.key
|
|
4941
|
+
);
|
|
4942
|
+
})
|
|
4943
|
+
] }) }),
|
|
4944
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("tbody", { "aria-busy": loading || void 0, children: loading ? Array.from(
|
|
4945
|
+
{ length: (loadingRows ?? pageSize ?? Math.min(visible.length, 5)) || 5 },
|
|
4946
|
+
(_, skeletonRow) => /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("tr", { children: [
|
|
4947
|
+
selectionEnabled && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("td", { className: cn("px-3 py-2", density === "compact" && "px-2 py-1"), children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Skeleton, { className: "h-4 w-4" }) }),
|
|
4948
|
+
columns.map((column) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("td", { className: cn("px-3 py-2", density === "compact" && "px-2 py-1"), children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Skeleton, { className: density === "compact" ? "h-3 w-full" : "h-4 w-full" }) }, column.key))
|
|
4949
|
+
] }, `skeleton-${skeletonRow}`)
|
|
4950
|
+
) : visible.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
4951
|
+
"td",
|
|
4952
|
+
{
|
|
4953
|
+
colSpan: columns.length + (selectionEnabled ? 1 : 0),
|
|
4954
|
+
className: "px-3 py-8 text-center text-sm text-muted-foreground",
|
|
4955
|
+
children: emptyMessage
|
|
4956
|
+
}
|
|
4957
|
+
) }) : visible.map((row, index) => /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
4958
|
+
"tr",
|
|
4682
4959
|
{
|
|
4683
|
-
|
|
4684
|
-
|
|
4960
|
+
tabIndex: onRowClick ? 0 : void 0,
|
|
4961
|
+
onClick: onRowClick ? () => onRowClick(row) : void 0,
|
|
4962
|
+
onKeyDown: onRowClick ? (event) => {
|
|
4963
|
+
if (event.key === "Enter" || event.key === " ") {
|
|
4964
|
+
event.preventDefault();
|
|
4965
|
+
onRowClick(row);
|
|
4966
|
+
}
|
|
4967
|
+
} : void 0,
|
|
4685
4968
|
className: cn(
|
|
4686
|
-
"border-b border-border
|
|
4687
|
-
|
|
4688
|
-
|
|
4969
|
+
"border-b border-border last:border-0",
|
|
4970
|
+
zebra && "[&:nth-child(odd)]:bg-muted/30",
|
|
4971
|
+
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"
|
|
4689
4972
|
),
|
|
4690
|
-
children:
|
|
4691
|
-
|
|
4692
|
-
|
|
4693
|
-
type: "button",
|
|
4694
|
-
onClick: () => applySort(column.key),
|
|
4695
|
-
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",
|
|
4696
|
-
children: [
|
|
4697
|
-
column.header,
|
|
4698
|
-
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("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" })
|
|
4699
|
-
]
|
|
4700
|
-
}
|
|
4701
|
-
) : column.header
|
|
4702
|
-
},
|
|
4703
|
-
column.key
|
|
4704
|
-
);
|
|
4705
|
-
})
|
|
4706
|
-
] }) }),
|
|
4707
|
-
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("tbody", { "aria-busy": loading || void 0, children: loading ? Array.from(
|
|
4708
|
-
{ length: (loadingRows ?? pageSize ?? Math.min(visible.length, 5)) || 5 },
|
|
4709
|
-
(_, skeletonRow) => /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("tr", { children: [
|
|
4710
|
-
selectionEnabled && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("td", { className: cn("px-3 py-2", density === "compact" && "px-2 py-1"), children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Skeleton, { className: "h-4 w-4" }) }),
|
|
4711
|
-
columns.map((column) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("td", { className: cn("px-3 py-2", density === "compact" && "px-2 py-1"), children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Skeleton, { className: density === "compact" ? "h-3 w-full" : "h-4 w-full" }) }, column.key))
|
|
4712
|
-
] }, `skeleton-${skeletonRow}`)
|
|
4713
|
-
) : visible.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
4714
|
-
"td",
|
|
4715
|
-
{
|
|
4716
|
-
colSpan: columns.length + (selectionEnabled ? 1 : 0),
|
|
4717
|
-
className: "px-3 py-8 text-center text-sm text-muted-foreground",
|
|
4718
|
-
children: emptyMessage
|
|
4719
|
-
}
|
|
4720
|
-
) }) : visible.map((row, index) => /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
4721
|
-
"tr",
|
|
4722
|
-
{
|
|
4723
|
-
tabIndex: onRowClick ? 0 : void 0,
|
|
4724
|
-
onClick: onRowClick ? () => onRowClick(row) : void 0,
|
|
4725
|
-
onKeyDown: onRowClick ? (event) => {
|
|
4726
|
-
if (event.key === "Enter" || event.key === " ") {
|
|
4727
|
-
event.preventDefault();
|
|
4728
|
-
onRowClick(row);
|
|
4729
|
-
}
|
|
4730
|
-
} : void 0,
|
|
4731
|
-
className: cn(
|
|
4732
|
-
"border-b border-border last:border-0",
|
|
4733
|
-
zebra && "[&:nth-child(odd)]:bg-muted/30",
|
|
4734
|
-
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"
|
|
4735
|
-
),
|
|
4736
|
-
children: [
|
|
4737
|
-
selectionEnabled && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
4738
|
-
"td",
|
|
4739
|
-
{
|
|
4740
|
-
className: cn("align-middle", density === "compact" ? "px-2 py-1" : "px-3 py-2"),
|
|
4741
|
-
onClick: (event) => event.stopPropagation(),
|
|
4742
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
4743
|
-
Checkbox,
|
|
4973
|
+
children: [
|
|
4974
|
+
selectionEnabled && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
4975
|
+
"td",
|
|
4744
4976
|
{
|
|
4745
|
-
"
|
|
4746
|
-
|
|
4747
|
-
|
|
4748
|
-
|
|
4977
|
+
className: cn("align-middle", density === "compact" ? "px-2 py-1" : "px-3 py-2"),
|
|
4978
|
+
onClick: (event) => event.stopPropagation(),
|
|
4979
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
4980
|
+
Checkbox,
|
|
4981
|
+
{
|
|
4982
|
+
"aria-label": `Select row ${rowId(row)}`,
|
|
4983
|
+
checked: selectedSet.has(rowId(row)),
|
|
4984
|
+
disabled: isRowSelectable ? !isRowSelectable(row) : void 0,
|
|
4985
|
+
onCheckedChange: () => toggleRow(rowId(row))
|
|
4986
|
+
}
|
|
4987
|
+
)
|
|
4749
4988
|
}
|
|
4750
|
-
)
|
|
4751
|
-
}
|
|
4752
|
-
),
|
|
4753
|
-
columns.map((column) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
4754
|
-
"td",
|
|
4755
|
-
{
|
|
4756
|
-
className: cn(
|
|
4757
|
-
"align-middle",
|
|
4758
|
-
density === "compact" ? "px-2 py-1" : "px-3 py-2",
|
|
4759
|
-
alignClass(column.align),
|
|
4760
|
-
column.className
|
|
4761
4989
|
),
|
|
4762
|
-
|
|
4763
|
-
"
|
|
4990
|
+
columns.map((column) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
4991
|
+
"td",
|
|
4764
4992
|
{
|
|
4765
|
-
|
|
4766
|
-
|
|
4767
|
-
|
|
4768
|
-
|
|
4769
|
-
|
|
4770
|
-
|
|
4771
|
-
|
|
4772
|
-
|
|
4773
|
-
|
|
4774
|
-
|
|
4775
|
-
|
|
4776
|
-
|
|
4777
|
-
|
|
4993
|
+
className: cn(
|
|
4994
|
+
"align-middle",
|
|
4995
|
+
density === "compact" ? "px-2 py-1" : "px-3 py-2",
|
|
4996
|
+
alignClass(column.align),
|
|
4997
|
+
column.className
|
|
4998
|
+
),
|
|
4999
|
+
children: column.onClick ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
5000
|
+
"button",
|
|
5001
|
+
{
|
|
5002
|
+
type: "button",
|
|
5003
|
+
onClick: () => column.onClick(row),
|
|
5004
|
+
className: "block w-full rounded px-1.5 py-0.5 text-left transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
5005
|
+
children: cellValue(row, column, index)
|
|
5006
|
+
}
|
|
5007
|
+
) : cellValue(row, column, index)
|
|
5008
|
+
},
|
|
5009
|
+
column.key
|
|
5010
|
+
))
|
|
5011
|
+
]
|
|
5012
|
+
},
|
|
5013
|
+
rowId(row)
|
|
5014
|
+
)) })
|
|
5015
|
+
]
|
|
5016
|
+
}
|
|
5017
|
+
)
|
|
5018
|
+
}
|
|
5019
|
+
),
|
|
5020
|
+
cardClasses && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("ul", { "aria-label": caption, "aria-busy": loading || void 0, className: cn("space-y-3", cardClasses.cards), children: loading ? Array.from(
|
|
5021
|
+
{ length: (loadingRows ?? pageSize ?? Math.min(visible.length, 5)) || 5 },
|
|
5022
|
+
(_, skeletonRow) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("li", { className: "rounded-lg border border-border p-3", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "space-y-2", children: [
|
|
5023
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Skeleton, { className: "h-4 w-1/3" }),
|
|
5024
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Skeleton, { className: "h-4 w-full" }),
|
|
5025
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Skeleton, { className: "h-4 w-2/3" })
|
|
5026
|
+
] }) }, `skeleton-${skeletonRow}`)
|
|
5027
|
+
) : visible.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("li", { className: "rounded-lg border border-border px-3 py-8 text-center text-sm text-muted-foreground", children: emptyMessage }) : visible.map((row, index) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
5028
|
+
"div",
|
|
5029
|
+
{
|
|
5030
|
+
tabIndex: onRowClick ? 0 : void 0,
|
|
5031
|
+
onClick: onRowClick ? () => onRowClick(row) : void 0,
|
|
5032
|
+
onKeyDown: onRowClick ? (event) => {
|
|
5033
|
+
if (event.key === "Enter" || event.key === " ") {
|
|
5034
|
+
event.preventDefault();
|
|
5035
|
+
onRowClick(row);
|
|
5036
|
+
}
|
|
5037
|
+
} : void 0,
|
|
5038
|
+
className: cn(
|
|
5039
|
+
"rounded-lg border border-border",
|
|
5040
|
+
onRowClick && "cursor-pointer transition-colors hover:bg-muted/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
5041
|
+
),
|
|
5042
|
+
children: [
|
|
5043
|
+
selectionEnabled && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
5044
|
+
"div",
|
|
5045
|
+
{
|
|
5046
|
+
className: "flex items-center justify-end px-3 pt-2",
|
|
5047
|
+
onClick: (event) => event.stopPropagation(),
|
|
5048
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
5049
|
+
Checkbox,
|
|
5050
|
+
{
|
|
5051
|
+
"aria-label": `Select row ${rowId(row)}`,
|
|
5052
|
+
checked: selectedSet.has(rowId(row)),
|
|
5053
|
+
disabled: isRowSelectable ? !isRowSelectable(row) : void 0,
|
|
5054
|
+
onCheckedChange: () => toggleRow(rowId(row))
|
|
5055
|
+
}
|
|
5056
|
+
)
|
|
5057
|
+
}
|
|
5058
|
+
),
|
|
5059
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("dl", { className: "divide-y divide-border", children: columns.map((column) => /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "px-3 py-2", children: [
|
|
5060
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("dt", { className: "text-xs font-medium text-muted-foreground", children: column.header }),
|
|
5061
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("dd", { className: cn("mt-0.5 text-sm", alignClass(column.align)), children: cardCell(row, column, index) })
|
|
5062
|
+
] }, column.key)) })
|
|
4778
5063
|
]
|
|
4779
5064
|
}
|
|
4780
|
-
) }),
|
|
4781
|
-
pageSize && pageCount > 1 && /* @__PURE__ */ (0,
|
|
4782
|
-
/* @__PURE__ */ (0,
|
|
5065
|
+
) }, rowId(row))) }),
|
|
5066
|
+
pageSize && pageCount > 1 && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex flex-wrap items-center justify-between gap-x-4 gap-y-2", children: [
|
|
5067
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
4783
5068
|
"p",
|
|
4784
5069
|
{
|
|
4785
5070
|
className: "min-h-8 leading-none text-xs text-muted-foreground",
|
|
@@ -4794,17 +5079,17 @@ function DataTable({
|
|
|
4794
5079
|
]
|
|
4795
5080
|
}
|
|
4796
5081
|
),
|
|
4797
|
-
/* @__PURE__ */ (0,
|
|
5082
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Pagination, { page: safePage, pageCount, onPageChange: setPage })
|
|
4798
5083
|
] })
|
|
4799
5084
|
] });
|
|
4800
5085
|
}
|
|
4801
5086
|
|
|
4802
5087
|
// src/components/list/List.tsx
|
|
4803
|
-
var
|
|
4804
|
-
var
|
|
4805
|
-
var ListDensityContext =
|
|
4806
|
-
var List =
|
|
4807
|
-
({ divided, bordered, size = "default", className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
5088
|
+
var React49 = __toESM(require("react"));
|
|
5089
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
5090
|
+
var ListDensityContext = React49.createContext("default");
|
|
5091
|
+
var List = React49.forwardRef(
|
|
5092
|
+
({ divided, bordered, size = "default", className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(ListDensityContext.Provider, { value: size, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
4808
5093
|
"ul",
|
|
4809
5094
|
{
|
|
4810
5095
|
ref,
|
|
@@ -4819,9 +5104,9 @@ var List = React48.forwardRef(
|
|
|
4819
5104
|
) })
|
|
4820
5105
|
);
|
|
4821
5106
|
List.displayName = "List";
|
|
4822
|
-
var ListItem =
|
|
5107
|
+
var ListItem = React49.forwardRef(
|
|
4823
5108
|
({ leading, trailing, selected, onClick, description, disabled, className, children, ...props }, ref) => {
|
|
4824
|
-
const density =
|
|
5109
|
+
const density = React49.useContext(ListDensityContext);
|
|
4825
5110
|
const padding = density === "compact" ? "px-3 py-1.5" : "px-3 py-2.5";
|
|
4826
5111
|
const rowClass = cn(
|
|
4827
5112
|
"flex w-full items-center gap-3 text-left text-sm",
|
|
@@ -4830,24 +5115,24 @@ var ListItem = React48.forwardRef(
|
|
|
4830
5115
|
disabled && "opacity-50",
|
|
4831
5116
|
className
|
|
4832
5117
|
);
|
|
4833
|
-
const body = /* @__PURE__ */ (0,
|
|
4834
|
-
leading && /* @__PURE__ */ (0,
|
|
4835
|
-
/* @__PURE__ */ (0,
|
|
4836
|
-
/* @__PURE__ */ (0,
|
|
4837
|
-
description && /* @__PURE__ */ (0,
|
|
5118
|
+
const body = /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_jsx_runtime49.Fragment, { children: [
|
|
5119
|
+
leading && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "flex shrink-0 items-center", children: leading }),
|
|
5120
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("span", { className: "min-w-0 flex-1", children: [
|
|
5121
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "block truncate", children }),
|
|
5122
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "mt-0.5 block text-xs text-muted-foreground", children: description })
|
|
4838
5123
|
] }),
|
|
4839
|
-
trailing && /* @__PURE__ */ (0,
|
|
5124
|
+
trailing && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "flex shrink-0 items-center text-xs text-muted-foreground", children: trailing })
|
|
4840
5125
|
] });
|
|
4841
|
-
return /* @__PURE__ */ (0,
|
|
5126
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("li", { ref, ...props, children: onClick ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("button", { type: "button", onClick, disabled, className: cn(padding, rowClass), children: body }) : /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: cn(padding, rowClass), children: body }) });
|
|
4842
5127
|
}
|
|
4843
5128
|
);
|
|
4844
5129
|
ListItem.displayName = "ListItem";
|
|
4845
5130
|
|
|
4846
5131
|
// src/components/link/Link.tsx
|
|
4847
|
-
var
|
|
5132
|
+
var React50 = __toESM(require("react"));
|
|
4848
5133
|
var import_react_slot4 = require("@radix-ui/react-slot");
|
|
4849
5134
|
var import_class_variance_authority7 = require("class-variance-authority");
|
|
4850
|
-
var
|
|
5135
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
4851
5136
|
var linkVariants = (0, import_class_variance_authority7.cva)("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", {
|
|
4852
5137
|
variants: {
|
|
4853
5138
|
variant: {
|
|
@@ -4861,12 +5146,12 @@ var linkVariants = (0, import_class_variance_authority7.cva)("inline-flex items-
|
|
|
4861
5146
|
defaultVariants: { variant: "default" }
|
|
4862
5147
|
});
|
|
4863
5148
|
var ABSOLUTE = /^https?:\/\//i;
|
|
4864
|
-
var Link =
|
|
5149
|
+
var Link = React50.forwardRef(function Link2({ className, variant, asChild = false, external, target, rel, children, ...props }, ref) {
|
|
4865
5150
|
const isAbsolute = typeof props.href === "string" && ABSOLUTE.test(props.href);
|
|
4866
5151
|
const isExternal = external ?? isAbsolute;
|
|
4867
5152
|
const Comp = asChild ? import_react_slot4.Slot : "a";
|
|
4868
5153
|
if (asChild) {
|
|
4869
|
-
return /* @__PURE__ */ (0,
|
|
5154
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
4870
5155
|
Comp,
|
|
4871
5156
|
{
|
|
4872
5157
|
ref,
|
|
@@ -4878,7 +5163,7 @@ var Link = React49.forwardRef(function Link2({ className, variant, asChild = fal
|
|
|
4878
5163
|
}
|
|
4879
5164
|
);
|
|
4880
5165
|
}
|
|
4881
|
-
return /* @__PURE__ */ (0,
|
|
5166
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
|
|
4882
5167
|
Comp,
|
|
4883
5168
|
{
|
|
4884
5169
|
ref,
|
|
@@ -4888,9 +5173,9 @@ var Link = React49.forwardRef(function Link2({ className, variant, asChild = fal
|
|
|
4888
5173
|
...props,
|
|
4889
5174
|
children: [
|
|
4890
5175
|
children,
|
|
4891
|
-
isExternal && variant !== "muted" && /* @__PURE__ */ (0,
|
|
4892
|
-
/* @__PURE__ */ (0,
|
|
4893
|
-
/* @__PURE__ */ (0,
|
|
5176
|
+
isExternal && variant !== "muted" && /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_jsx_runtime50.Fragment, { children: [
|
|
5177
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { "aria-hidden": "true", className: "text-[0.75em]", children: "\u2197" }),
|
|
5178
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: "sr-only", children: "(opens in a new tab)" })
|
|
4894
5179
|
] })
|
|
4895
5180
|
]
|
|
4896
5181
|
}
|
|
@@ -4898,8 +5183,8 @@ var Link = React49.forwardRef(function Link2({ className, variant, asChild = fal
|
|
|
4898
5183
|
});
|
|
4899
5184
|
|
|
4900
5185
|
// src/components/image/Image.tsx
|
|
4901
|
-
var
|
|
4902
|
-
var
|
|
5186
|
+
var React51 = __toESM(require("react"));
|
|
5187
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
4903
5188
|
function Image2({
|
|
4904
5189
|
src,
|
|
4905
5190
|
alt,
|
|
@@ -4913,16 +5198,16 @@ function Image2({
|
|
|
4913
5198
|
sizes,
|
|
4914
5199
|
style
|
|
4915
5200
|
}) {
|
|
4916
|
-
const [stage, setStage] =
|
|
4917
|
-
const [prevUrls, setPrevUrls] =
|
|
5201
|
+
const [stage, setStage] = React51.useState(0);
|
|
5202
|
+
const [prevUrls, setPrevUrls] = React51.useState({ src, fallbackSrc });
|
|
4918
5203
|
if (prevUrls.src !== src || prevUrls.fallbackSrc !== fallbackSrc) {
|
|
4919
5204
|
setPrevUrls({ src, fallbackSrc });
|
|
4920
5205
|
setStage(0);
|
|
4921
5206
|
}
|
|
4922
5207
|
const onError = () => setStage((current2) => current2 === 0 && fallbackSrc ? 1 : 2);
|
|
4923
5208
|
const current = stage === 0 ? src : stage === 1 ? fallbackSrc : null;
|
|
4924
|
-
if (!current || stage === 2) return /* @__PURE__ */ (0,
|
|
4925
|
-
return /* @__PURE__ */ (0,
|
|
5209
|
+
if (!current || stage === 2) return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_jsx_runtime51.Fragment, { children: fallback ?? null });
|
|
5210
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
4926
5211
|
"img",
|
|
4927
5212
|
{
|
|
4928
5213
|
src: current,
|
|
@@ -4942,7 +5227,7 @@ function Image2({
|
|
|
4942
5227
|
Image2.displayName = "Image";
|
|
4943
5228
|
|
|
4944
5229
|
// src/components/cover-image/CoverImage.tsx
|
|
4945
|
-
var
|
|
5230
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
4946
5231
|
var aspectClasses = {
|
|
4947
5232
|
video: "aspect-video",
|
|
4948
5233
|
square: "aspect-square",
|
|
@@ -4977,21 +5262,21 @@ function CoverImage({
|
|
|
4977
5262
|
}) {
|
|
4978
5263
|
const preset = aspectClasses[aspect];
|
|
4979
5264
|
const aspectStyle = preset === void 0 && typeof aspect === "string" ? { aspectRatio: aspect } : void 0;
|
|
4980
|
-
const fallbackNode = fallback ?? /* @__PURE__ */ (0,
|
|
5265
|
+
const fallbackNode = fallback ?? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
4981
5266
|
"div",
|
|
4982
5267
|
{
|
|
4983
5268
|
className: "flex h-full w-full items-center justify-center",
|
|
4984
5269
|
style: seededGradient(seed ?? alt),
|
|
4985
5270
|
"aria-hidden": "true",
|
|
4986
|
-
children: mark && /* @__PURE__ */ (0,
|
|
5271
|
+
children: mark && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "text-muted-foreground [&_svg]:size-8", children: mark })
|
|
4987
5272
|
}
|
|
4988
5273
|
);
|
|
4989
|
-
return /* @__PURE__ */ (0,
|
|
5274
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
4990
5275
|
"div",
|
|
4991
5276
|
{
|
|
4992
5277
|
className: cn("relative overflow-hidden rounded-lg bg-muted", preset, className),
|
|
4993
5278
|
style: aspectStyle,
|
|
4994
|
-
children: src ? /* @__PURE__ */ (0,
|
|
5279
|
+
children: src ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
4995
5280
|
Image2,
|
|
4996
5281
|
{
|
|
4997
5282
|
src,
|
|
@@ -5008,8 +5293,8 @@ function CoverImage({
|
|
|
5008
5293
|
CoverImage.displayName = "CoverImage";
|
|
5009
5294
|
|
|
5010
5295
|
// src/components/text/Text.tsx
|
|
5011
|
-
var
|
|
5012
|
-
var
|
|
5296
|
+
var React52 = __toESM(require("react"));
|
|
5297
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
5013
5298
|
var sizeClasses4 = {
|
|
5014
5299
|
xs: "text-xs",
|
|
5015
5300
|
sm: "text-sm",
|
|
@@ -5023,10 +5308,10 @@ var weightClasses = {
|
|
|
5023
5308
|
semibold: "font-semibold",
|
|
5024
5309
|
bold: "font-bold"
|
|
5025
5310
|
};
|
|
5026
|
-
var Text =
|
|
5311
|
+
var Text = React52.forwardRef(
|
|
5027
5312
|
({ inline, size = "base", weight, muted, className, ...props }, ref) => {
|
|
5028
5313
|
const Tag = inline ? "span" : "p";
|
|
5029
|
-
return /* @__PURE__ */ (0,
|
|
5314
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
5030
5315
|
Tag,
|
|
5031
5316
|
{
|
|
5032
5317
|
ref,
|
|
@@ -5045,8 +5330,8 @@ var Text = React51.forwardRef(
|
|
|
5045
5330
|
Text.displayName = "Text";
|
|
5046
5331
|
|
|
5047
5332
|
// src/components/heading/Heading.tsx
|
|
5048
|
-
var
|
|
5049
|
-
var
|
|
5333
|
+
var React53 = __toESM(require("react"));
|
|
5334
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
5050
5335
|
var levelClasses = {
|
|
5051
5336
|
1: "text-4xl",
|
|
5052
5337
|
2: "text-3xl",
|
|
@@ -5063,10 +5348,10 @@ var sizeClasses5 = {
|
|
|
5063
5348
|
"2xl": "text-4xl",
|
|
5064
5349
|
"3xl": "text-5xl"
|
|
5065
5350
|
};
|
|
5066
|
-
var Heading =
|
|
5351
|
+
var Heading = React53.forwardRef(
|
|
5067
5352
|
({ level, size, muted, className, ...props }, ref) => {
|
|
5068
5353
|
const Tag = `h${level}`;
|
|
5069
|
-
return /* @__PURE__ */ (0,
|
|
5354
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
5070
5355
|
Tag,
|
|
5071
5356
|
{
|
|
5072
5357
|
ref,
|
|
@@ -5084,10 +5369,10 @@ var Heading = React52.forwardRef(
|
|
|
5084
5369
|
Heading.displayName = "Heading";
|
|
5085
5370
|
|
|
5086
5371
|
// src/components/empty-state/EmptyState.tsx
|
|
5087
|
-
var
|
|
5088
|
-
var
|
|
5372
|
+
var React54 = __toESM(require("react"));
|
|
5373
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
5089
5374
|
function isActionObject(value) {
|
|
5090
|
-
return typeof value === "object" && value !== null && !
|
|
5375
|
+
return typeof value === "object" && value !== null && !React54.isValidElement(value) && "label" in value;
|
|
5091
5376
|
}
|
|
5092
5377
|
function renderAction(action, linkComponent, linkHrefProp = "href") {
|
|
5093
5378
|
if (!isActionObject(action)) return action;
|
|
@@ -5095,11 +5380,11 @@ function renderAction(action, linkComponent, linkHrefProp = "href") {
|
|
|
5095
5380
|
if (href) {
|
|
5096
5381
|
const LinkEl = linkComponent ?? "a";
|
|
5097
5382
|
const destination = linkHrefProp === "to" ? { to: href } : { href };
|
|
5098
|
-
return /* @__PURE__ */ (0,
|
|
5383
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Button, { variant, asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(LinkEl, { ...destination, children: label }) });
|
|
5099
5384
|
}
|
|
5100
|
-
return /* @__PURE__ */ (0,
|
|
5385
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Button, { variant, onClick, children: label });
|
|
5101
5386
|
}
|
|
5102
|
-
var EmptyState =
|
|
5387
|
+
var EmptyState = React54.forwardRef(function EmptyState2({
|
|
5103
5388
|
icon,
|
|
5104
5389
|
title,
|
|
5105
5390
|
description,
|
|
@@ -5118,7 +5403,7 @@ var EmptyState = React53.forwardRef(function EmptyState2({
|
|
|
5118
5403
|
}, ref) {
|
|
5119
5404
|
const primaryAction = renderAction(action, linkComponent, linkHrefProp) ?? actions;
|
|
5120
5405
|
const start = align === "start";
|
|
5121
|
-
return /* @__PURE__ */ (0,
|
|
5406
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
|
|
5122
5407
|
"div",
|
|
5123
5408
|
{
|
|
5124
5409
|
ref,
|
|
@@ -5132,11 +5417,11 @@ var EmptyState = React53.forwardRef(function EmptyState2({
|
|
|
5132
5417
|
),
|
|
5133
5418
|
...props,
|
|
5134
5419
|
children: [
|
|
5135
|
-
icon && /* @__PURE__ */ (0,
|
|
5136
|
-
/* @__PURE__ */ (0,
|
|
5137
|
-
description && /* @__PURE__ */ (0,
|
|
5420
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "text-muted-foreground [&_svg]:size-8", children: icon }),
|
|
5421
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Title, { className: cn("font-semibold", size === "md" ? "text-base" : "text-sm"), children: title }),
|
|
5422
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("p", { className: cn("max-w-sm text-sm text-muted-foreground", start && "max-w-md"), children: description }),
|
|
5138
5423
|
children,
|
|
5139
|
-
(primaryAction || secondaryAction) && /* @__PURE__ */ (0,
|
|
5424
|
+
(primaryAction || secondaryAction) && /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: cn("mt-1 flex flex-wrap items-center gap-2", start ? "justify-start" : "justify-center"), children: [
|
|
5140
5425
|
primaryAction,
|
|
5141
5426
|
secondaryAction
|
|
5142
5427
|
] })
|
|
@@ -5146,27 +5431,27 @@ var EmptyState = React53.forwardRef(function EmptyState2({
|
|
|
5146
5431
|
});
|
|
5147
5432
|
|
|
5148
5433
|
// src/components/page-header/PageHeader.tsx
|
|
5149
|
-
var
|
|
5150
|
-
var
|
|
5434
|
+
var React55 = __toESM(require("react"));
|
|
5435
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
5151
5436
|
var sizeClasses6 = {
|
|
5152
5437
|
sm: "text-xl",
|
|
5153
5438
|
md: "text-2xl",
|
|
5154
5439
|
lg: "text-3xl",
|
|
5155
5440
|
hero: "text-4xl sm:text-5xl lg:text-[3.4rem] lg:leading-[1.1]"
|
|
5156
5441
|
};
|
|
5157
|
-
var PageHeader =
|
|
5442
|
+
var PageHeader = React55.forwardRef(function PageHeader2({ title, description, subtitle, breadcrumbs, actions, eyebrow, size = "md", as: Heading2 = "h1", align = "left", titleClassName, descriptionClassName, eyebrowClassName, className, children, ...props }, ref) {
|
|
5158
5443
|
const supporting = description ?? subtitle;
|
|
5159
|
-
return /* @__PURE__ */ (0,
|
|
5160
|
-
breadcrumbs && /* @__PURE__ */ (0,
|
|
5161
|
-
eyebrow && /* @__PURE__ */ (0,
|
|
5162
|
-
/* @__PURE__ */ (0,
|
|
5163
|
-
/* @__PURE__ */ (0,
|
|
5164
|
-
/* @__PURE__ */ (0,
|
|
5165
|
-
supporting && /* @__PURE__ */ (0,
|
|
5444
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { ref, className: cn("flex flex-col gap-2", align === "center" && "items-center text-center", className), ...props, children: [
|
|
5445
|
+
breadcrumbs && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "text-sm text-muted-foreground", children: breadcrumbs }),
|
|
5446
|
+
eyebrow && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: cn("text-xs font-medium uppercase tracking-wide text-primary-ink", eyebrowClassName), children: eyebrow }),
|
|
5447
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: cn("flex w-full flex-wrap items-start justify-between gap-3", align === "center" && "justify-center"), children: [
|
|
5448
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: cn("min-w-0", align === "center" && "flex flex-col items-center"), children: [
|
|
5449
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Heading2, { className: cn("font-semibold tracking-tight", sizeClasses6[size], titleClassName), children: title }),
|
|
5450
|
+
supporting && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("p", { className: cn("mt-2 max-w-2xl text-base text-muted-foreground", descriptionClassName), children: supporting })
|
|
5166
5451
|
] }),
|
|
5167
|
-
actions && /* @__PURE__ */ (0,
|
|
5452
|
+
actions && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "flex shrink-0 items-center gap-2", children: actions })
|
|
5168
5453
|
] }),
|
|
5169
|
-
children && /* @__PURE__ */ (0,
|
|
5454
|
+
children && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "mt-2", children })
|
|
5170
5455
|
] });
|
|
5171
5456
|
});
|
|
5172
5457
|
|
|
@@ -5186,16 +5471,16 @@ function documentHead({
|
|
|
5186
5471
|
}
|
|
5187
5472
|
|
|
5188
5473
|
// src/components/section-heading/SectionHeading.tsx
|
|
5189
|
-
var
|
|
5190
|
-
var
|
|
5474
|
+
var React56 = __toESM(require("react"));
|
|
5475
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
5191
5476
|
var sizeClasses7 = {
|
|
5192
5477
|
sm: "text-lg",
|
|
5193
5478
|
md: "text-2xl",
|
|
5194
5479
|
lg: "text-3xl"
|
|
5195
5480
|
};
|
|
5196
|
-
var SectionHeading =
|
|
5481
|
+
var SectionHeading = React56.forwardRef(function SectionHeading2({ title, description, eyebrow, actions, level = 2, align = "left", size = "md", titleClassName, descriptionClassName, eyebrowClassName, className, ...props }, ref) {
|
|
5197
5482
|
const Heading2 = `h${level}`;
|
|
5198
|
-
return /* @__PURE__ */ (0,
|
|
5483
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
|
|
5199
5484
|
"div",
|
|
5200
5485
|
{
|
|
5201
5486
|
ref,
|
|
@@ -5206,20 +5491,20 @@ var SectionHeading = React55.forwardRef(function SectionHeading2({ title, descri
|
|
|
5206
5491
|
),
|
|
5207
5492
|
...props,
|
|
5208
5493
|
children: [
|
|
5209
|
-
/* @__PURE__ */ (0,
|
|
5210
|
-
eyebrow && /* @__PURE__ */ (0,
|
|
5211
|
-
/* @__PURE__ */ (0,
|
|
5212
|
-
description && /* @__PURE__ */ (0,
|
|
5494
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: cn("min-w-0", align === "center" && "flex flex-col items-center"), children: [
|
|
5495
|
+
eyebrow && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: cn("mb-1 text-xs font-medium uppercase tracking-wide text-primary-ink", eyebrowClassName), children: eyebrow }),
|
|
5496
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Heading2, { className: cn("font-semibold tracking-tight", sizeClasses7[size], titleClassName), children: title }),
|
|
5497
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("p", { className: cn("mt-2 max-w-2xl text-muted-foreground", align === "center" ? "mx-auto" : "", descriptionClassName), children: description })
|
|
5213
5498
|
] }),
|
|
5214
|
-
actions && /* @__PURE__ */ (0,
|
|
5499
|
+
actions && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "flex shrink-0 items-center gap-2", children: actions })
|
|
5215
5500
|
]
|
|
5216
5501
|
}
|
|
5217
5502
|
);
|
|
5218
5503
|
});
|
|
5219
5504
|
|
|
5220
5505
|
// src/components/metric-card/MetricCard.tsx
|
|
5221
|
-
var
|
|
5222
|
-
var
|
|
5506
|
+
var React57 = __toESM(require("react"));
|
|
5507
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
5223
5508
|
var trendClasses = {
|
|
5224
5509
|
up: "text-success",
|
|
5225
5510
|
down: "text-destructive",
|
|
@@ -5232,11 +5517,11 @@ var toneClasses = {
|
|
|
5232
5517
|
destructive: "text-destructive"
|
|
5233
5518
|
};
|
|
5234
5519
|
var trendGlyph = { up: "\u2191", down: "\u2193", flat: "\u2192" };
|
|
5235
|
-
var MetricCard =
|
|
5520
|
+
var MetricCard = React57.forwardRef(function MetricCard2({ label, value, hint, title, description, delta, trend = "flat", tone = "default", loading = false, icon, className, ...props }, ref) {
|
|
5236
5521
|
const heading = label ?? title;
|
|
5237
5522
|
const supporting = hint ?? description;
|
|
5238
5523
|
if (loading) {
|
|
5239
|
-
return /* @__PURE__ */ (0,
|
|
5524
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
|
|
5240
5525
|
"div",
|
|
5241
5526
|
{
|
|
5242
5527
|
ref,
|
|
@@ -5244,41 +5529,41 @@ var MetricCard = React56.forwardRef(function MetricCard2({ label, value, hint, t
|
|
|
5244
5529
|
className: cn("rounded-xl border border-border bg-card p-5", className),
|
|
5245
5530
|
...props,
|
|
5246
5531
|
children: [
|
|
5247
|
-
/* @__PURE__ */ (0,
|
|
5248
|
-
heading && /* @__PURE__ */ (0,
|
|
5249
|
-
icon && /* @__PURE__ */ (0,
|
|
5532
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "flex items-start justify-between gap-3", children: [
|
|
5533
|
+
heading && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("p", { className: "text-sm text-muted-foreground", children: heading }),
|
|
5534
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "text-muted-foreground [&_svg]:size-4", children: icon })
|
|
5250
5535
|
] }),
|
|
5251
|
-
/* @__PURE__ */ (0,
|
|
5252
|
-
/* @__PURE__ */ (0,
|
|
5536
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { "aria-hidden": "true", className: "mt-3 block h-7 w-24 animate-pulse rounded-md bg-muted" }),
|
|
5537
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "sr-only", children: "Loading" })
|
|
5253
5538
|
]
|
|
5254
5539
|
}
|
|
5255
5540
|
);
|
|
5256
5541
|
}
|
|
5257
|
-
return /* @__PURE__ */ (0,
|
|
5258
|
-
/* @__PURE__ */ (0,
|
|
5259
|
-
heading && /* @__PURE__ */ (0,
|
|
5260
|
-
icon && /* @__PURE__ */ (0,
|
|
5542
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { ref, className: cn("rounded-xl border border-border bg-card p-5", className), ...props, children: [
|
|
5543
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "flex items-start justify-between gap-3", children: [
|
|
5544
|
+
heading && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("p", { className: "text-sm text-muted-foreground", children: heading }),
|
|
5545
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "text-muted-foreground [&_svg]:size-4", children: icon })
|
|
5261
5546
|
] }),
|
|
5262
|
-
/* @__PURE__ */ (0,
|
|
5263
|
-
(delta || supporting) && /* @__PURE__ */ (0,
|
|
5264
|
-
delta && /* @__PURE__ */ (0,
|
|
5265
|
-
/* @__PURE__ */ (0,
|
|
5547
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("p", { className: cn("mt-2 text-2xl font-semibold tabular-nums", toneClasses[tone]), children: value }),
|
|
5548
|
+
(delta || supporting) && /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("p", { className: "mt-1 flex items-center gap-2 text-sm", children: [
|
|
5549
|
+
delta && /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("span", { className: cn("font-medium tabular-nums", trendClasses[trend]), children: [
|
|
5550
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { "aria-hidden": "true", children: trendGlyph[trend] }),
|
|
5266
5551
|
" ",
|
|
5267
5552
|
delta
|
|
5268
5553
|
] }),
|
|
5269
|
-
supporting && /* @__PURE__ */ (0,
|
|
5554
|
+
supporting && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "text-muted-foreground", children: supporting })
|
|
5270
5555
|
] })
|
|
5271
5556
|
] });
|
|
5272
5557
|
});
|
|
5273
5558
|
|
|
5274
5559
|
// src/components/password-input/PasswordInput.tsx
|
|
5275
|
-
var
|
|
5276
|
-
var
|
|
5277
|
-
var PasswordInput =
|
|
5278
|
-
const [visible, setVisible] =
|
|
5279
|
-
return /* @__PURE__ */ (0,
|
|
5280
|
-
/* @__PURE__ */ (0,
|
|
5281
|
-
/* @__PURE__ */ (0,
|
|
5560
|
+
var React58 = __toESM(require("react"));
|
|
5561
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
5562
|
+
var PasswordInput = React58.forwardRef(function PasswordInput2({ className, showLabel = "Show password", hideLabel = "Hide password", ...props }, ref) {
|
|
5563
|
+
const [visible, setVisible] = React58.useState(false);
|
|
5564
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: cn("relative flex items-center", className), children: [
|
|
5565
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Input, { ref, type: visible ? "text" : "password", className: "pr-24", ...props }),
|
|
5566
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
5282
5567
|
Button,
|
|
5283
5568
|
{
|
|
5284
5569
|
type: "button",
|
|
@@ -5295,14 +5580,14 @@ var PasswordInput = React57.forwardRef(function PasswordInput2({ className, show
|
|
|
5295
5580
|
});
|
|
5296
5581
|
|
|
5297
5582
|
// src/components/auth-layout/AuthLayout.tsx
|
|
5298
|
-
var
|
|
5299
|
-
var
|
|
5583
|
+
var React59 = __toESM(require("react"));
|
|
5584
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
5300
5585
|
var sizeClasses8 = {
|
|
5301
5586
|
sm: "max-w-sm",
|
|
5302
5587
|
md: "max-w-md",
|
|
5303
5588
|
lg: "max-w-lg"
|
|
5304
5589
|
};
|
|
5305
|
-
var AuthLayout =
|
|
5590
|
+
var AuthLayout = React59.forwardRef(function AuthLayout2({
|
|
5306
5591
|
title,
|
|
5307
5592
|
description,
|
|
5308
5593
|
subtitle,
|
|
@@ -5321,7 +5606,7 @@ var AuthLayout = React58.forwardRef(function AuthLayout2({
|
|
|
5321
5606
|
const supporting = description ?? subtitle;
|
|
5322
5607
|
const mark = brand ?? logo;
|
|
5323
5608
|
const widthStyle = maxWidth === void 0 ? void 0 : { maxWidth: typeof maxWidth === "number" ? `${maxWidth}px` : maxWidth };
|
|
5324
|
-
const form = /* @__PURE__ */ (0,
|
|
5609
|
+
const form = /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
|
|
5325
5610
|
"div",
|
|
5326
5611
|
{
|
|
5327
5612
|
className: cn(
|
|
@@ -5330,8 +5615,8 @@ var AuthLayout = React58.forwardRef(function AuthLayout2({
|
|
|
5330
5615
|
),
|
|
5331
5616
|
style: widthStyle,
|
|
5332
5617
|
children: [
|
|
5333
|
-
mark && /* @__PURE__ */ (0,
|
|
5334
|
-
/* @__PURE__ */ (0,
|
|
5618
|
+
mark && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "mb-6", children: mark }),
|
|
5619
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
|
|
5335
5620
|
"div",
|
|
5336
5621
|
{
|
|
5337
5622
|
className: cn(
|
|
@@ -5340,31 +5625,31 @@ var AuthLayout = React58.forwardRef(function AuthLayout2({
|
|
|
5340
5625
|
),
|
|
5341
5626
|
style: widthStyle,
|
|
5342
5627
|
children: [
|
|
5343
|
-
/* @__PURE__ */ (0,
|
|
5344
|
-
supporting && /* @__PURE__ */ (0,
|
|
5345
|
-
/* @__PURE__ */ (0,
|
|
5628
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("h1", { className: "text-xl font-semibold tracking-tight", children: title }),
|
|
5629
|
+
supporting && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("p", { className: "mt-1 text-sm text-muted-foreground", children: supporting }),
|
|
5630
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "mt-6", children })
|
|
5346
5631
|
]
|
|
5347
5632
|
}
|
|
5348
5633
|
),
|
|
5349
|
-
footer && /* @__PURE__ */ (0,
|
|
5634
|
+
footer && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "mt-6 text-center text-sm text-muted-foreground", children: footer })
|
|
5350
5635
|
]
|
|
5351
5636
|
}
|
|
5352
5637
|
);
|
|
5353
5638
|
if (split) {
|
|
5354
|
-
return /* @__PURE__ */ (0,
|
|
5639
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
5355
5640
|
"div",
|
|
5356
5641
|
{
|
|
5357
5642
|
ref,
|
|
5358
5643
|
className: cn("min-h-screen bg-muted/30 px-4 py-12 lg:px-8", className),
|
|
5359
5644
|
...props,
|
|
5360
|
-
children: /* @__PURE__ */ (0,
|
|
5645
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("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: [
|
|
5361
5646
|
form,
|
|
5362
|
-
/* @__PURE__ */ (0,
|
|
5647
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("aside", { className: "w-full", children: aside })
|
|
5363
5648
|
] })
|
|
5364
5649
|
}
|
|
5365
5650
|
);
|
|
5366
5651
|
}
|
|
5367
|
-
return /* @__PURE__ */ (0,
|
|
5652
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
5368
5653
|
"div",
|
|
5369
5654
|
{
|
|
5370
5655
|
ref,
|
|
@@ -5379,9 +5664,9 @@ var AuthLayout = React58.forwardRef(function AuthLayout2({
|
|
|
5379
5664
|
});
|
|
5380
5665
|
|
|
5381
5666
|
// src/components/filter-bar/FilterBar.tsx
|
|
5382
|
-
var
|
|
5383
|
-
var
|
|
5384
|
-
var FilterBar =
|
|
5667
|
+
var React60 = __toESM(require("react"));
|
|
5668
|
+
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
5669
|
+
var FilterBar = React60.forwardRef(function FilterBar2({
|
|
5385
5670
|
searchValue,
|
|
5386
5671
|
onSearchChange,
|
|
5387
5672
|
searchPlaceholder = "Search\u2026",
|
|
@@ -5396,7 +5681,7 @@ var FilterBar = React59.forwardRef(function FilterBar2({
|
|
|
5396
5681
|
children,
|
|
5397
5682
|
...props
|
|
5398
5683
|
}, ref) {
|
|
5399
|
-
return /* @__PURE__ */ (0,
|
|
5684
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
|
|
5400
5685
|
"div",
|
|
5401
5686
|
{
|
|
5402
5687
|
ref,
|
|
@@ -5407,7 +5692,7 @@ var FilterBar = React59.forwardRef(function FilterBar2({
|
|
|
5407
5692
|
),
|
|
5408
5693
|
...props,
|
|
5409
5694
|
children: [
|
|
5410
|
-
onSearchChange !== void 0 && /* @__PURE__ */ (0,
|
|
5695
|
+
onSearchChange !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
5411
5696
|
Input,
|
|
5412
5697
|
{
|
|
5413
5698
|
type: "search",
|
|
@@ -5418,38 +5703,79 @@ var FilterBar = React59.forwardRef(function FilterBar2({
|
|
|
5418
5703
|
className: "h-9 w-full min-w-40 flex-1 sm:w-auto"
|
|
5419
5704
|
}
|
|
5420
5705
|
),
|
|
5421
|
-
/* @__PURE__ */ (0,
|
|
5422
|
-
onOpenFilters && /* @__PURE__ */ (0,
|
|
5706
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "flex flex-wrap items-center gap-2", children }),
|
|
5707
|
+
onOpenFilters && /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(Button, { type: "button", variant: "outline", size: "sm", onClick: onOpenFilters, children: [
|
|
5423
5708
|
filtersLabel,
|
|
5424
5709
|
activeCount > 0 ? ` (${activeCount})` : ""
|
|
5425
5710
|
] }),
|
|
5426
|
-
onReset && /* @__PURE__ */ (0,
|
|
5711
|
+
onReset && /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(Button, { type: "button", variant: "ghost", size: "sm", onClick: onReset, children: [
|
|
5427
5712
|
"Reset",
|
|
5428
5713
|
activeCount > 0 ? ` (${activeCount})` : ""
|
|
5429
5714
|
] }),
|
|
5430
|
-
resultsCount !== void 0 && /* @__PURE__ */ (0,
|
|
5715
|
+
resultsCount !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("span", { className: "ml-auto text-sm text-muted-foreground", children: [
|
|
5431
5716
|
resultsCount,
|
|
5432
5717
|
" ",
|
|
5433
5718
|
resultsLabel
|
|
5434
5719
|
] }),
|
|
5435
|
-
trailing && /* @__PURE__ */ (0,
|
|
5720
|
+
trailing && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: cn("flex items-center gap-2", resultsCount === void 0 && "ml-auto"), children: trailing })
|
|
5436
5721
|
]
|
|
5437
5722
|
}
|
|
5438
5723
|
);
|
|
5439
5724
|
});
|
|
5440
5725
|
|
|
5726
|
+
// src/components/list-toolbar/ListToolbar.tsx
|
|
5727
|
+
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
5728
|
+
var alignClasses = {
|
|
5729
|
+
between: "justify-between",
|
|
5730
|
+
start: "justify-start",
|
|
5731
|
+
center: "justify-center",
|
|
5732
|
+
end: "justify-end"
|
|
5733
|
+
};
|
|
5734
|
+
function ListToolbar({
|
|
5735
|
+
count,
|
|
5736
|
+
countLabel = "results",
|
|
5737
|
+
position,
|
|
5738
|
+
note,
|
|
5739
|
+
align = "between",
|
|
5740
|
+
className,
|
|
5741
|
+
children,
|
|
5742
|
+
...props
|
|
5743
|
+
}) {
|
|
5744
|
+
const hasSummary = count !== void 0 || position !== void 0 || note !== void 0;
|
|
5745
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
|
|
5746
|
+
"div",
|
|
5747
|
+
{
|
|
5748
|
+
className: cn("flex flex-wrap items-center gap-x-4 gap-y-2 text-sm", alignClasses[align], className),
|
|
5749
|
+
...props,
|
|
5750
|
+
children: [
|
|
5751
|
+
hasSummary && /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("p", { className: "flex flex-wrap items-baseline gap-x-2 text-muted-foreground", "aria-live": "polite", children: [
|
|
5752
|
+
count !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("span", { className: "font-medium text-foreground", children: [
|
|
5753
|
+
count,
|
|
5754
|
+
" ",
|
|
5755
|
+
countLabel
|
|
5756
|
+
] }),
|
|
5757
|
+
position && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { children: position }),
|
|
5758
|
+
note && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { className: "text-xs", children: note })
|
|
5759
|
+
] }),
|
|
5760
|
+
children && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: "flex flex-wrap items-center gap-2", children })
|
|
5761
|
+
]
|
|
5762
|
+
}
|
|
5763
|
+
);
|
|
5764
|
+
}
|
|
5765
|
+
ListToolbar.displayName = "ListToolbar";
|
|
5766
|
+
|
|
5441
5767
|
// src/components/date-picker/DatePicker.tsx
|
|
5442
|
-
var
|
|
5443
|
-
var
|
|
5444
|
-
var DatePicker =
|
|
5445
|
-
const [internal, setInternal] =
|
|
5768
|
+
var React61 = __toESM(require("react"));
|
|
5769
|
+
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
5770
|
+
var DatePicker = React61.forwardRef(function DatePicker2({ value, defaultValue, onValueChange, onChange, clearable = false, clearLabel = "Clear date", className, ...props }, ref) {
|
|
5771
|
+
const [internal, setInternal] = React61.useState(defaultValue ?? "");
|
|
5446
5772
|
const current = value ?? internal;
|
|
5447
5773
|
const commit = (next) => {
|
|
5448
5774
|
if (value === void 0) setInternal(next);
|
|
5449
5775
|
onValueChange?.(next);
|
|
5450
5776
|
};
|
|
5451
|
-
return /* @__PURE__ */ (0,
|
|
5452
|
-
/* @__PURE__ */ (0,
|
|
5777
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: cn("relative flex items-center", className), children: [
|
|
5778
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
5453
5779
|
Input,
|
|
5454
5780
|
{
|
|
5455
5781
|
ref,
|
|
@@ -5463,7 +5789,7 @@ var DatePicker = React60.forwardRef(function DatePicker2({ value, defaultValue,
|
|
|
5463
5789
|
...props
|
|
5464
5790
|
}
|
|
5465
5791
|
),
|
|
5466
|
-
clearable && current && /* @__PURE__ */ (0,
|
|
5792
|
+
clearable && current && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
5467
5793
|
"button",
|
|
5468
5794
|
{
|
|
5469
5795
|
type: "button",
|
|
@@ -5477,10 +5803,10 @@ var DatePicker = React60.forwardRef(function DatePicker2({ value, defaultValue,
|
|
|
5477
5803
|
});
|
|
5478
5804
|
|
|
5479
5805
|
// src/components/date-picker-popover/DatePickerPopover.tsx
|
|
5480
|
-
var
|
|
5806
|
+
var React63 = __toESM(require("react"));
|
|
5481
5807
|
|
|
5482
5808
|
// src/components/popover/Popover.tsx
|
|
5483
|
-
var
|
|
5809
|
+
var React62 = __toESM(require("react"));
|
|
5484
5810
|
var import_react_dom7 = require("react-dom");
|
|
5485
5811
|
|
|
5486
5812
|
// src/utils/position.ts
|
|
@@ -5549,8 +5875,8 @@ function computePosition({
|
|
|
5549
5875
|
}
|
|
5550
5876
|
|
|
5551
5877
|
// src/components/popover/Popover.tsx
|
|
5552
|
-
var
|
|
5553
|
-
var PopoverContext =
|
|
5878
|
+
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
5879
|
+
var PopoverContext = React62.createContext({
|
|
5554
5880
|
open: false,
|
|
5555
5881
|
setOpen: () => {
|
|
5556
5882
|
},
|
|
@@ -5560,16 +5886,16 @@ var PopoverContext = React61.createContext({
|
|
|
5560
5886
|
anchorRef: { current: null },
|
|
5561
5887
|
triggerRef: { current: null }
|
|
5562
5888
|
});
|
|
5563
|
-
var Popover =
|
|
5889
|
+
var Popover = React62.forwardRef(
|
|
5564
5890
|
({ open, onOpenChange, className, children }, ref) => {
|
|
5565
|
-
const [internalOpen, setInternalOpen] =
|
|
5891
|
+
const [internalOpen, setInternalOpen] = React62.useState(false);
|
|
5566
5892
|
const current = open ?? internalOpen;
|
|
5567
|
-
const triggerId =
|
|
5568
|
-
const contentId =
|
|
5569
|
-
const wrapperRef =
|
|
5570
|
-
const anchorRef =
|
|
5571
|
-
const triggerRef =
|
|
5572
|
-
const setRefs =
|
|
5893
|
+
const triggerId = React62.useId();
|
|
5894
|
+
const contentId = React62.useId();
|
|
5895
|
+
const wrapperRef = React62.useRef(null);
|
|
5896
|
+
const anchorRef = React62.useRef(null);
|
|
5897
|
+
const triggerRef = React62.useRef(null);
|
|
5898
|
+
const setRefs = React62.useCallback(
|
|
5573
5899
|
(node) => {
|
|
5574
5900
|
wrapperRef.current = node;
|
|
5575
5901
|
if (typeof ref === "function") ref(node);
|
|
@@ -5577,14 +5903,14 @@ var Popover = React61.forwardRef(
|
|
|
5577
5903
|
},
|
|
5578
5904
|
[ref]
|
|
5579
5905
|
);
|
|
5580
|
-
const setOpen =
|
|
5906
|
+
const setOpen = React62.useCallback(
|
|
5581
5907
|
(next) => {
|
|
5582
5908
|
if (open === void 0) setInternalOpen(next);
|
|
5583
5909
|
onOpenChange?.(next);
|
|
5584
5910
|
},
|
|
5585
5911
|
[open, onOpenChange]
|
|
5586
5912
|
);
|
|
5587
|
-
return /* @__PURE__ */ (0,
|
|
5913
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { ref: setRefs, className: cn("relative inline-block", className), children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
5588
5914
|
PopoverContext.Provider,
|
|
5589
5915
|
{
|
|
5590
5916
|
value: { open: current, setOpen, triggerId, contentId, wrapperRef, anchorRef, triggerRef },
|
|
@@ -5594,10 +5920,10 @@ var Popover = React61.forwardRef(
|
|
|
5594
5920
|
}
|
|
5595
5921
|
);
|
|
5596
5922
|
Popover.displayName = "Popover";
|
|
5597
|
-
var PopoverTrigger =
|
|
5923
|
+
var PopoverTrigger = React62.forwardRef(
|
|
5598
5924
|
({ className, children, onClick, id, ...props }, ref) => {
|
|
5599
|
-
const { open, setOpen, triggerId, contentId, triggerRef } =
|
|
5600
|
-
const setRefs =
|
|
5925
|
+
const { open, setOpen, triggerId, contentId, triggerRef } = React62.useContext(PopoverContext);
|
|
5926
|
+
const setRefs = React62.useCallback(
|
|
5601
5927
|
(node) => {
|
|
5602
5928
|
triggerRef.current = node;
|
|
5603
5929
|
if (typeof ref === "function") ref(node);
|
|
@@ -5605,7 +5931,7 @@ var PopoverTrigger = React61.forwardRef(
|
|
|
5605
5931
|
},
|
|
5606
5932
|
[ref, triggerRef]
|
|
5607
5933
|
);
|
|
5608
|
-
return /* @__PURE__ */ (0,
|
|
5934
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
5609
5935
|
"button",
|
|
5610
5936
|
{
|
|
5611
5937
|
ref: setRefs,
|
|
@@ -5630,10 +5956,10 @@ var PopoverTrigger = React61.forwardRef(
|
|
|
5630
5956
|
}
|
|
5631
5957
|
);
|
|
5632
5958
|
PopoverTrigger.displayName = "PopoverTrigger";
|
|
5633
|
-
var PopoverAnchor =
|
|
5959
|
+
var PopoverAnchor = React62.forwardRef(
|
|
5634
5960
|
({ className, children, ...props }, ref) => {
|
|
5635
|
-
const { anchorRef } =
|
|
5636
|
-
const setRefs =
|
|
5961
|
+
const { anchorRef } = React62.useContext(PopoverContext);
|
|
5962
|
+
const setRefs = React62.useCallback(
|
|
5637
5963
|
(node) => {
|
|
5638
5964
|
anchorRef.current = node;
|
|
5639
5965
|
if (typeof ref === "function") ref(node);
|
|
@@ -5641,7 +5967,7 @@ var PopoverAnchor = React61.forwardRef(
|
|
|
5641
5967
|
},
|
|
5642
5968
|
[anchorRef, ref]
|
|
5643
5969
|
);
|
|
5644
|
-
return /* @__PURE__ */ (0,
|
|
5970
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { ref: setRefs, className: cn("inline-block", className), ...props, children });
|
|
5645
5971
|
}
|
|
5646
5972
|
);
|
|
5647
5973
|
PopoverAnchor.displayName = "PopoverAnchor";
|
|
@@ -5654,7 +5980,7 @@ function rectOf(element) {
|
|
|
5654
5980
|
height: rect.height || element.offsetHeight || 0
|
|
5655
5981
|
};
|
|
5656
5982
|
}
|
|
5657
|
-
var PopoverContent =
|
|
5983
|
+
var PopoverContent = React62.forwardRef(
|
|
5658
5984
|
({
|
|
5659
5985
|
className,
|
|
5660
5986
|
children,
|
|
@@ -5668,12 +5994,12 @@ var PopoverContent = React61.forwardRef(
|
|
|
5668
5994
|
matchTriggerWidth = false,
|
|
5669
5995
|
...props
|
|
5670
5996
|
}, ref) => {
|
|
5671
|
-
const { open, setOpen, contentId, wrapperRef, anchorRef, triggerRef } =
|
|
5997
|
+
const { open, setOpen, contentId, wrapperRef, anchorRef, triggerRef } = React62.useContext(PopoverContext);
|
|
5672
5998
|
const labelledBy = triggerRef.current?.id || void 0;
|
|
5673
|
-
const contentRef =
|
|
5674
|
-
const [pos, setPos] =
|
|
5675
|
-
const [width, setWidth] =
|
|
5676
|
-
const updatePosition =
|
|
5999
|
+
const contentRef = React62.useRef(null);
|
|
6000
|
+
const [pos, setPos] = React62.useState(null);
|
|
6001
|
+
const [width, setWidth] = React62.useState(void 0);
|
|
6002
|
+
const updatePosition = React62.useCallback(() => {
|
|
5677
6003
|
const anchorEl = anchorRef.current ?? wrapperRef.current;
|
|
5678
6004
|
const panel = contentRef.current;
|
|
5679
6005
|
if (!anchorEl || !panel) return;
|
|
@@ -5702,17 +6028,17 @@ var PopoverContent = React61.forwardRef(
|
|
|
5702
6028
|
sideOffset,
|
|
5703
6029
|
wrapperRef
|
|
5704
6030
|
]);
|
|
5705
|
-
|
|
6031
|
+
React62.useLayoutEffect(() => {
|
|
5706
6032
|
if (!open) {
|
|
5707
6033
|
setPos(null);
|
|
5708
6034
|
return;
|
|
5709
6035
|
}
|
|
5710
6036
|
updatePosition();
|
|
5711
6037
|
}, [open, updatePosition]);
|
|
5712
|
-
|
|
6038
|
+
React62.useEffect(() => {
|
|
5713
6039
|
if (open && !pos) updatePosition();
|
|
5714
6040
|
}, [open, pos, updatePosition]);
|
|
5715
|
-
|
|
6041
|
+
React62.useEffect(() => {
|
|
5716
6042
|
if (!open) return;
|
|
5717
6043
|
const onScroll = () => updatePosition();
|
|
5718
6044
|
window.addEventListener("scroll", onScroll, true);
|
|
@@ -5726,7 +6052,7 @@ var PopoverContent = React61.forwardRef(
|
|
|
5726
6052
|
observer?.disconnect();
|
|
5727
6053
|
};
|
|
5728
6054
|
}, [open, updatePosition]);
|
|
5729
|
-
|
|
6055
|
+
React62.useEffect(() => {
|
|
5730
6056
|
if (!open) return;
|
|
5731
6057
|
function onPointerDown(event) {
|
|
5732
6058
|
if (!contentRef.current?.contains(event.target)) setOpen(false);
|
|
@@ -5734,14 +6060,14 @@ var PopoverContent = React61.forwardRef(
|
|
|
5734
6060
|
document.addEventListener("pointerdown", onPointerDown);
|
|
5735
6061
|
return () => document.removeEventListener("pointerdown", onPointerDown);
|
|
5736
6062
|
}, [open, setOpen]);
|
|
5737
|
-
|
|
6063
|
+
React62.useEffect(() => {
|
|
5738
6064
|
if (open && pos && contentRef.current) {
|
|
5739
6065
|
contentRef.current.focus();
|
|
5740
6066
|
}
|
|
5741
6067
|
}, [open, pos]);
|
|
5742
6068
|
if (!open || typeof document === "undefined") return null;
|
|
5743
6069
|
return (0, import_react_dom7.createPortal)(
|
|
5744
|
-
/* @__PURE__ */ (0,
|
|
6070
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
5745
6071
|
"div",
|
|
5746
6072
|
{
|
|
5747
6073
|
ref: (node) => {
|
|
@@ -5786,8 +6112,8 @@ var PopoverContent = React61.forwardRef(
|
|
|
5786
6112
|
PopoverContent.displayName = "PopoverContent";
|
|
5787
6113
|
|
|
5788
6114
|
// src/components/date-picker-popover/DatePickerPopover.tsx
|
|
5789
|
-
var
|
|
5790
|
-
var DatePickerPopover =
|
|
6115
|
+
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
6116
|
+
var DatePickerPopover = React63.forwardRef(
|
|
5791
6117
|
({
|
|
5792
6118
|
value,
|
|
5793
6119
|
onValueChange,
|
|
@@ -5808,9 +6134,9 @@ var DatePickerPopover = React62.forwardRef(
|
|
|
5808
6134
|
"aria-describedby": ariaDescribedBy,
|
|
5809
6135
|
"aria-invalid": ariaInvalid
|
|
5810
6136
|
}, ref) => {
|
|
5811
|
-
const [open, setOpen] =
|
|
5812
|
-
const triggerRef =
|
|
5813
|
-
const setTriggerRef =
|
|
6137
|
+
const [open, setOpen] = React63.useState(false);
|
|
6138
|
+
const triggerRef = React63.useRef(null);
|
|
6139
|
+
const setTriggerRef = React63.useCallback(
|
|
5814
6140
|
(node) => {
|
|
5815
6141
|
triggerRef.current = node;
|
|
5816
6142
|
if (typeof ref === "function") ref(node);
|
|
@@ -5819,9 +6145,9 @@ var DatePickerPopover = React62.forwardRef(
|
|
|
5819
6145
|
[ref]
|
|
5820
6146
|
);
|
|
5821
6147
|
const label = value ? formatDateLabel(value, locale) : placeholder;
|
|
5822
|
-
return /* @__PURE__ */ (0,
|
|
5823
|
-
/* @__PURE__ */ (0,
|
|
5824
|
-
/* @__PURE__ */ (0,
|
|
6148
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(import_jsx_runtime65.Fragment, { children: [
|
|
6149
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(Popover, { open, onOpenChange: setOpen, children: [
|
|
6150
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
5825
6151
|
PopoverTrigger,
|
|
5826
6152
|
{
|
|
5827
6153
|
ref: setTriggerRef,
|
|
@@ -5839,7 +6165,7 @@ var DatePickerPopover = React62.forwardRef(
|
|
|
5839
6165
|
children: label
|
|
5840
6166
|
}
|
|
5841
6167
|
),
|
|
5842
|
-
/* @__PURE__ */ (0,
|
|
6168
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(PopoverContent, { side, align, matchTriggerWidth: true, className: "w-auto p-3", children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
5843
6169
|
Calendar,
|
|
5844
6170
|
{
|
|
5845
6171
|
value,
|
|
@@ -5857,24 +6183,24 @@ var DatePickerPopover = React62.forwardRef(
|
|
|
5857
6183
|
}
|
|
5858
6184
|
) })
|
|
5859
6185
|
] }),
|
|
5860
|
-
name ? /* @__PURE__ */ (0,
|
|
6186
|
+
name ? /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("input", { type: "hidden", name, value: value ?? "", required }) : null
|
|
5861
6187
|
] });
|
|
5862
6188
|
}
|
|
5863
6189
|
);
|
|
5864
6190
|
DatePickerPopover.displayName = "DatePickerPopover";
|
|
5865
6191
|
|
|
5866
6192
|
// src/components/time-picker/TimePicker.tsx
|
|
5867
|
-
var
|
|
5868
|
-
var
|
|
5869
|
-
var TimePicker =
|
|
5870
|
-
const [internal, setInternal] =
|
|
6193
|
+
var React64 = __toESM(require("react"));
|
|
6194
|
+
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
6195
|
+
var TimePicker = React64.forwardRef(function TimePicker2({ value, defaultValue, onValueChange, onChange, clearable = false, clearLabel = "Clear time", className, ...props }, ref) {
|
|
6196
|
+
const [internal, setInternal] = React64.useState(defaultValue ?? "");
|
|
5871
6197
|
const current = value ?? internal;
|
|
5872
6198
|
const commit = (next) => {
|
|
5873
6199
|
if (value === void 0) setInternal(next);
|
|
5874
6200
|
onValueChange?.(next);
|
|
5875
6201
|
};
|
|
5876
|
-
return /* @__PURE__ */ (0,
|
|
5877
|
-
/* @__PURE__ */ (0,
|
|
6202
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: cn("relative flex items-center", className), children: [
|
|
6203
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
5878
6204
|
Input,
|
|
5879
6205
|
{
|
|
5880
6206
|
ref,
|
|
@@ -5888,7 +6214,7 @@ var TimePicker = React63.forwardRef(function TimePicker2({ value, defaultValue,
|
|
|
5888
6214
|
...props
|
|
5889
6215
|
}
|
|
5890
6216
|
),
|
|
5891
|
-
clearable && current && /* @__PURE__ */ (0,
|
|
6217
|
+
clearable && current && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
5892
6218
|
"button",
|
|
5893
6219
|
{
|
|
5894
6220
|
type: "button",
|
|
@@ -5902,9 +6228,9 @@ var TimePicker = React63.forwardRef(function TimePicker2({ value, defaultValue,
|
|
|
5902
6228
|
});
|
|
5903
6229
|
|
|
5904
6230
|
// src/components/stepper/Stepper.tsx
|
|
5905
|
-
var
|
|
5906
|
-
var
|
|
5907
|
-
var Stepper =
|
|
6231
|
+
var React65 = __toESM(require("react"));
|
|
6232
|
+
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
6233
|
+
var Stepper = React65.forwardRef(function Stepper2({
|
|
5908
6234
|
steps,
|
|
5909
6235
|
current,
|
|
5910
6236
|
orientation = "horizontal",
|
|
@@ -5927,7 +6253,7 @@ var Stepper = React64.forwardRef(function Stepper2({
|
|
|
5927
6253
|
const verticalTitlePad = size === "sm" ? "pt-0.5" : "pt-1";
|
|
5928
6254
|
const connectorTop = variant === "dots" ? size === "sm" ? "mt-1" : "mt-[5px]" : size === "sm" ? "mt-3" : "mt-3.5";
|
|
5929
6255
|
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";
|
|
5930
|
-
return /* @__PURE__ */ (0,
|
|
6256
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
5931
6257
|
"ol",
|
|
5932
6258
|
{
|
|
5933
6259
|
ref,
|
|
@@ -5941,7 +6267,7 @@ var Stepper = React64.forwardRef(function Stepper2({
|
|
|
5941
6267
|
const isLast = index === steps.length - 1;
|
|
5942
6268
|
const titleCentered = alignTitles === "center" && !step.description;
|
|
5943
6269
|
const below = !vertical && labelPlacement === "below";
|
|
5944
|
-
const marker = /* @__PURE__ */ (0,
|
|
6270
|
+
const marker = /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
5945
6271
|
"span",
|
|
5946
6272
|
{
|
|
5947
6273
|
"aria-hidden": "true",
|
|
@@ -5963,8 +6289,8 @@ var Stepper = React64.forwardRef(function Stepper2({
|
|
|
5963
6289
|
children: variant === "numbered" ? state === "complete" ? "\u2713" : index + 1 : null
|
|
5964
6290
|
}
|
|
5965
6291
|
);
|
|
5966
|
-
const label = /* @__PURE__ */ (0,
|
|
5967
|
-
/* @__PURE__ */ (0,
|
|
6292
|
+
const label = /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("span", { className: "min-w-0", children: [
|
|
6293
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
5968
6294
|
"span",
|
|
5969
6295
|
{
|
|
5970
6296
|
className: cn(
|
|
@@ -5976,7 +6302,7 @@ var Stepper = React64.forwardRef(function Stepper2({
|
|
|
5976
6302
|
children: step.label
|
|
5977
6303
|
}
|
|
5978
6304
|
),
|
|
5979
|
-
step.description && /* @__PURE__ */ (0,
|
|
6305
|
+
step.description && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
5980
6306
|
"span",
|
|
5981
6307
|
{
|
|
5982
6308
|
className: cn(
|
|
@@ -5987,9 +6313,9 @@ var Stepper = React64.forwardRef(function Stepper2({
|
|
|
5987
6313
|
children: step.description
|
|
5988
6314
|
}
|
|
5989
6315
|
),
|
|
5990
|
-
/* @__PURE__ */ (0,
|
|
6316
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("span", { className: "sr-only", children: state === "complete" ? labels?.completed ?? " (completed)" : state === "current" ? labels?.current ?? " (current step)" : labels?.upcoming ?? " (upcoming)" })
|
|
5991
6317
|
] });
|
|
5992
|
-
const renderRow = (children, rowClassName) => interactive ? /* @__PURE__ */ (0,
|
|
6318
|
+
const renderRow = (children, rowClassName) => interactive ? /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
5993
6319
|
"button",
|
|
5994
6320
|
{
|
|
5995
6321
|
type: "button",
|
|
@@ -5998,29 +6324,29 @@ var Stepper = React64.forwardRef(function Stepper2({
|
|
|
5998
6324
|
className: cn(rowClassName, focusClass),
|
|
5999
6325
|
children
|
|
6000
6326
|
}
|
|
6001
|
-
) : /* @__PURE__ */ (0,
|
|
6327
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { "aria-current": state === "current" ? "step" : void 0, className: rowClassName, children });
|
|
6002
6328
|
if (vertical) {
|
|
6003
|
-
return /* @__PURE__ */ (0,
|
|
6004
|
-
/* @__PURE__ */ (0,
|
|
6005
|
-
/* @__PURE__ */ (0,
|
|
6329
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("li", { className: "flex", children: renderRow(
|
|
6330
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(import_jsx_runtime67.Fragment, { children: [
|
|
6331
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex flex-col items-center", children: [
|
|
6006
6332
|
marker,
|
|
6007
|
-
!isLast && /* @__PURE__ */ (0,
|
|
6333
|
+
!isLast && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("span", { "aria-hidden": "true", className: "my-1 w-px flex-1 rounded-full bg-border" })
|
|
6008
6334
|
] }),
|
|
6009
|
-
/* @__PURE__ */ (0,
|
|
6335
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: cn("min-w-0 pb-6", titleCentered && verticalTitlePad), children: label })
|
|
6010
6336
|
] }),
|
|
6011
6337
|
"flex w-full items-stretch gap-3 text-left"
|
|
6012
6338
|
) }, step.label);
|
|
6013
6339
|
}
|
|
6014
6340
|
if (below) {
|
|
6015
|
-
return /* @__PURE__ */ (0,
|
|
6341
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("li", { className: "flex min-w-0 flex-1 items-start gap-2", children: [
|
|
6016
6342
|
renderRow(
|
|
6017
|
-
/* @__PURE__ */ (0,
|
|
6343
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(import_jsx_runtime67.Fragment, { children: [
|
|
6018
6344
|
marker,
|
|
6019
6345
|
label
|
|
6020
6346
|
] }),
|
|
6021
6347
|
"flex min-w-0 flex-1 flex-col items-center gap-2 text-center"
|
|
6022
6348
|
),
|
|
6023
|
-
!isLast && /* @__PURE__ */ (0,
|
|
6349
|
+
!isLast && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
6024
6350
|
"span",
|
|
6025
6351
|
{
|
|
6026
6352
|
"aria-hidden": "true",
|
|
@@ -6029,15 +6355,15 @@ var Stepper = React64.forwardRef(function Stepper2({
|
|
|
6029
6355
|
)
|
|
6030
6356
|
] }, step.label);
|
|
6031
6357
|
}
|
|
6032
|
-
return /* @__PURE__ */ (0,
|
|
6358
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("li", { className: "flex min-w-0 items-start gap-2", children: [
|
|
6033
6359
|
renderRow(
|
|
6034
|
-
/* @__PURE__ */ (0,
|
|
6360
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(import_jsx_runtime67.Fragment, { children: [
|
|
6035
6361
|
marker,
|
|
6036
6362
|
label
|
|
6037
6363
|
] }),
|
|
6038
6364
|
cn("flex min-w-0 text-left", gapClass, titleCentered ? "items-center" : "items-start")
|
|
6039
6365
|
),
|
|
6040
|
-
!isLast && /* @__PURE__ */ (0,
|
|
6366
|
+
!isLast && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
6041
6367
|
"span",
|
|
6042
6368
|
{
|
|
6043
6369
|
"aria-hidden": "true",
|
|
@@ -6051,14 +6377,14 @@ var Stepper = React64.forwardRef(function Stepper2({
|
|
|
6051
6377
|
});
|
|
6052
6378
|
|
|
6053
6379
|
// src/components/file-upload/FileUpload.tsx
|
|
6054
|
-
var
|
|
6055
|
-
var
|
|
6380
|
+
var React66 = __toESM(require("react"));
|
|
6381
|
+
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
6056
6382
|
function formatSize(bytes) {
|
|
6057
6383
|
if (bytes < 1024) return `${bytes} B`;
|
|
6058
6384
|
if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`;
|
|
6059
6385
|
return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;
|
|
6060
6386
|
}
|
|
6061
|
-
var FileUpload =
|
|
6387
|
+
var FileUpload = React66.forwardRef(function FileUpload2({
|
|
6062
6388
|
files,
|
|
6063
6389
|
defaultFiles,
|
|
6064
6390
|
onFilesChange,
|
|
@@ -6075,13 +6401,13 @@ var FileUpload = React65.forwardRef(function FileUpload2({
|
|
|
6075
6401
|
id,
|
|
6076
6402
|
...props
|
|
6077
6403
|
}, ref) {
|
|
6078
|
-
const [internal, setInternal] =
|
|
6079
|
-
const [dragging, setDragging] =
|
|
6404
|
+
const [internal, setInternal] = React66.useState(defaultFiles ?? []);
|
|
6405
|
+
const [dragging, setDragging] = React66.useState(false);
|
|
6080
6406
|
const current = files ?? internal;
|
|
6081
|
-
const generatedId =
|
|
6407
|
+
const generatedId = React66.useId();
|
|
6082
6408
|
const inputId = id ?? generatedId;
|
|
6083
|
-
const fileIds =
|
|
6084
|
-
const nextFileId =
|
|
6409
|
+
const fileIds = React66.useRef(/* @__PURE__ */ new WeakMap());
|
|
6410
|
+
const nextFileId = React66.useRef(0);
|
|
6085
6411
|
const idFor = (file) => {
|
|
6086
6412
|
let fileId = fileIds.current.get(file);
|
|
6087
6413
|
if (!fileId) {
|
|
@@ -6099,8 +6425,8 @@ var FileUpload = React65.forwardRef(function FileUpload2({
|
|
|
6099
6425
|
const list = Array.from(incoming);
|
|
6100
6426
|
commit(multiple ? [...current, ...list] : list.slice(0, 1));
|
|
6101
6427
|
};
|
|
6102
|
-
return /* @__PURE__ */ (0,
|
|
6103
|
-
/* @__PURE__ */ (0,
|
|
6428
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: cn("flex flex-col gap-3", className), children: [
|
|
6429
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
|
|
6104
6430
|
"div",
|
|
6105
6431
|
{
|
|
6106
6432
|
onDragOver: (event) => {
|
|
@@ -6121,9 +6447,9 @@ var FileUpload = React65.forwardRef(function FileUpload2({
|
|
|
6121
6447
|
disabled && "opacity-50"
|
|
6122
6448
|
),
|
|
6123
6449
|
children: [
|
|
6124
|
-
/* @__PURE__ */ (0,
|
|
6450
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("label", { htmlFor: inputId, className: cn("block text-sm", disabled ? "cursor-not-allowed" : "cursor-pointer"), children: [
|
|
6125
6451
|
label,
|
|
6126
|
-
/* @__PURE__ */ (0,
|
|
6452
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
6127
6453
|
"input",
|
|
6128
6454
|
{
|
|
6129
6455
|
ref,
|
|
@@ -6141,15 +6467,15 @@ var FileUpload = React65.forwardRef(function FileUpload2({
|
|
|
6141
6467
|
}
|
|
6142
6468
|
)
|
|
6143
6469
|
] }),
|
|
6144
|
-
/* @__PURE__ */ (0,
|
|
6470
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("p", { className: "mt-1 text-xs text-muted-foreground", children: hint ?? (accept ? `Accepted: ${accept}` : "Any file type") })
|
|
6145
6471
|
]
|
|
6146
6472
|
}
|
|
6147
6473
|
),
|
|
6148
|
-
current.length > 0 && /* @__PURE__ */ (0,
|
|
6149
|
-
/* @__PURE__ */ (0,
|
|
6150
|
-
/* @__PURE__ */ (0,
|
|
6151
|
-
/* @__PURE__ */ (0,
|
|
6152
|
-
progress?.[file.name] !== void 0 && /* @__PURE__ */ (0,
|
|
6474
|
+
current.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("ul", { "aria-label": selectedFilesLabel, className: "space-y-2", children: current.map((file) => /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("li", { className: "flex items-center justify-between gap-3 rounded-md border border-border px-3 py-2", children: [
|
|
6475
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "min-w-0", children: [
|
|
6476
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("p", { className: "truncate text-sm", children: file.name }),
|
|
6477
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("p", { className: "text-xs text-muted-foreground", children: formatSize(file.size) }),
|
|
6478
|
+
progress?.[file.name] !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
6153
6479
|
"div",
|
|
6154
6480
|
{
|
|
6155
6481
|
role: "progressbar",
|
|
@@ -6158,11 +6484,11 @@ var FileUpload = React65.forwardRef(function FileUpload2({
|
|
|
6158
6484
|
"aria-valuemax": 100,
|
|
6159
6485
|
"aria-label": uploadingLabel(file),
|
|
6160
6486
|
className: "mt-1 h-1.5 w-40 overflow-hidden rounded-full bg-muted",
|
|
6161
|
-
children: /* @__PURE__ */ (0,
|
|
6487
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "h-full bg-primary", style: { width: `${progress[file.name]}%` } })
|
|
6162
6488
|
}
|
|
6163
6489
|
)
|
|
6164
6490
|
] }),
|
|
6165
|
-
/* @__PURE__ */ (0,
|
|
6491
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
6166
6492
|
"button",
|
|
6167
6493
|
{
|
|
6168
6494
|
type: "button",
|
|
@@ -6177,18 +6503,18 @@ var FileUpload = React65.forwardRef(function FileUpload2({
|
|
|
6177
6503
|
});
|
|
6178
6504
|
|
|
6179
6505
|
// src/components/timeline/Timeline.tsx
|
|
6180
|
-
var
|
|
6181
|
-
var
|
|
6182
|
-
var Timeline =
|
|
6183
|
-
return /* @__PURE__ */ (0,
|
|
6184
|
-
index < items.length - 1 && /* @__PURE__ */ (0,
|
|
6506
|
+
var React67 = __toESM(require("react"));
|
|
6507
|
+
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
6508
|
+
var Timeline = React67.forwardRef(function Timeline2({ items, className, ...props }, ref) {
|
|
6509
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("ol", { ref, className: cn("relative flex flex-col gap-6", className), ...props, children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("li", { className: "relative flex gap-4", children: [
|
|
6510
|
+
index < items.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
6185
6511
|
"span",
|
|
6186
6512
|
{
|
|
6187
6513
|
"aria-hidden": "true",
|
|
6188
6514
|
className: "absolute left-[5.5px] top-4 -bottom-7 w-px bg-border"
|
|
6189
6515
|
}
|
|
6190
6516
|
),
|
|
6191
|
-
/* @__PURE__ */ (0,
|
|
6517
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "relative z-10 flex flex-col items-center", children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
6192
6518
|
"span",
|
|
6193
6519
|
{
|
|
6194
6520
|
"aria-hidden": "true",
|
|
@@ -6198,22 +6524,22 @@ var Timeline = React66.forwardRef(function Timeline2({ items, className, ...prop
|
|
|
6198
6524
|
)
|
|
6199
6525
|
}
|
|
6200
6526
|
) }),
|
|
6201
|
-
/* @__PURE__ */ (0,
|
|
6202
|
-
item.period && /* @__PURE__ */ (0,
|
|
6203
|
-
/* @__PURE__ */ (0,
|
|
6204
|
-
item.description && /* @__PURE__ */ (0,
|
|
6205
|
-
item.icon && /* @__PURE__ */ (0,
|
|
6527
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "min-w-0 pb-1", children: [
|
|
6528
|
+
item.period && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("p", { className: "text-xs font-medium uppercase tracking-wide text-muted-foreground", children: item.period }),
|
|
6529
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("p", { className: cn("text-sm font-semibold", item.muted && "text-muted-foreground"), children: item.title }),
|
|
6530
|
+
item.description && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("p", { className: "mt-1 text-sm text-muted-foreground", children: item.description }),
|
|
6531
|
+
item.icon && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "mt-1 text-muted-foreground [&_svg]:size-4", children: item.icon })
|
|
6206
6532
|
] })
|
|
6207
6533
|
] }, `${item.title}-${index}`)) });
|
|
6208
6534
|
});
|
|
6209
6535
|
|
|
6210
6536
|
// src/components/block/Block.tsx
|
|
6211
|
-
var
|
|
6212
|
-
var
|
|
6213
|
-
var Block =
|
|
6537
|
+
var React68 = __toESM(require("react"));
|
|
6538
|
+
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
6539
|
+
var Block = React68.forwardRef(
|
|
6214
6540
|
({ as = "div", inline, muted, className, ...props }, ref) => {
|
|
6215
6541
|
const Tag = inline ? "span" : as;
|
|
6216
|
-
return /* @__PURE__ */ (0,
|
|
6542
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
6217
6543
|
Tag,
|
|
6218
6544
|
{
|
|
6219
6545
|
ref,
|
|
@@ -6226,8 +6552,8 @@ var Block = React67.forwardRef(
|
|
|
6226
6552
|
Block.displayName = "Block";
|
|
6227
6553
|
|
|
6228
6554
|
// src/components/flex/Flex.tsx
|
|
6229
|
-
var
|
|
6230
|
-
var
|
|
6555
|
+
var React69 = __toESM(require("react"));
|
|
6556
|
+
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
6231
6557
|
var justifyClasses = {
|
|
6232
6558
|
start: "justify-start",
|
|
6233
6559
|
center: "justify-center",
|
|
@@ -6236,18 +6562,18 @@ var justifyClasses = {
|
|
|
6236
6562
|
around: "justify-around",
|
|
6237
6563
|
evenly: "justify-evenly"
|
|
6238
6564
|
};
|
|
6239
|
-
var
|
|
6565
|
+
var alignClasses2 = {
|
|
6240
6566
|
start: "items-start",
|
|
6241
6567
|
center: "items-center",
|
|
6242
6568
|
end: "items-end",
|
|
6243
6569
|
stretch: "items-stretch",
|
|
6244
6570
|
baseline: "items-baseline"
|
|
6245
6571
|
};
|
|
6246
|
-
var Flex =
|
|
6572
|
+
var Flex = React69.forwardRef(
|
|
6247
6573
|
({ direction = "row", align, justify, wrap, gap = "md", as = "div", className, style, ...props }, ref) => {
|
|
6248
6574
|
const Tag = as;
|
|
6249
6575
|
const gapResolved = resolveGap(gap);
|
|
6250
|
-
return /* @__PURE__ */ (0,
|
|
6576
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
6251
6577
|
Tag,
|
|
6252
6578
|
{
|
|
6253
6579
|
ref,
|
|
@@ -6255,7 +6581,7 @@ var Flex = React68.forwardRef(
|
|
|
6255
6581
|
"flex min-w-0",
|
|
6256
6582
|
direction === "column" ? "flex-col" : "flex-row",
|
|
6257
6583
|
wrap && "flex-wrap",
|
|
6258
|
-
align &&
|
|
6584
|
+
align && alignClasses2[align],
|
|
6259
6585
|
justify && justifyClasses[justify],
|
|
6260
6586
|
gapResolved.className,
|
|
6261
6587
|
className
|
|
@@ -6274,7 +6600,7 @@ var selfAlignClasses = {
|
|
|
6274
6600
|
stretch: "self-stretch",
|
|
6275
6601
|
baseline: "self-baseline"
|
|
6276
6602
|
};
|
|
6277
|
-
var FlexItem =
|
|
6603
|
+
var FlexItem = React69.forwardRef(
|
|
6278
6604
|
({ grow, shrink, basis, align, as = "div", className, ...props }, ref) => {
|
|
6279
6605
|
const Tag = as;
|
|
6280
6606
|
const style = {
|
|
@@ -6282,7 +6608,7 @@ var FlexItem = React68.forwardRef(
|
|
|
6282
6608
|
...shrink === false ? { flexShrink: 0 } : typeof shrink === "string" && shrink ? { flexShrink: Number(shrink) || shrink } : {},
|
|
6283
6609
|
...basis ? { flexBasis: basis } : {}
|
|
6284
6610
|
};
|
|
6285
|
-
return /* @__PURE__ */ (0,
|
|
6611
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
6286
6612
|
Tag,
|
|
6287
6613
|
{
|
|
6288
6614
|
ref,
|
|
@@ -6296,8 +6622,8 @@ var FlexItem = React68.forwardRef(
|
|
|
6296
6622
|
FlexItem.displayName = "FlexItem";
|
|
6297
6623
|
|
|
6298
6624
|
// src/components/grid/Grid.tsx
|
|
6299
|
-
var
|
|
6300
|
-
var
|
|
6625
|
+
var React70 = __toESM(require("react"));
|
|
6626
|
+
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
6301
6627
|
var BASE_COLS = {
|
|
6302
6628
|
1: "grid-cols-1",
|
|
6303
6629
|
2: "grid-cols-2",
|
|
@@ -6362,11 +6688,11 @@ var LG_COL_SPAN = {
|
|
|
6362
6688
|
5: "lg:col-span-5",
|
|
6363
6689
|
6: "lg:col-span-6"
|
|
6364
6690
|
};
|
|
6365
|
-
var Grid =
|
|
6691
|
+
var Grid = React70.forwardRef(
|
|
6366
6692
|
({ cols, smCols, mdCols, lgCols, minCol, gap = "md", as = "div", className, style, ...props }, ref) => {
|
|
6367
6693
|
const Tag = as;
|
|
6368
6694
|
const gapResolved = resolveGap(gap);
|
|
6369
|
-
return /* @__PURE__ */ (0,
|
|
6695
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
6370
6696
|
Tag,
|
|
6371
6697
|
{
|
|
6372
6698
|
ref,
|
|
@@ -6390,10 +6716,10 @@ var Grid = React69.forwardRef(
|
|
|
6390
6716
|
}
|
|
6391
6717
|
);
|
|
6392
6718
|
Grid.displayName = "Grid";
|
|
6393
|
-
var GridItem =
|
|
6719
|
+
var GridItem = React70.forwardRef(
|
|
6394
6720
|
({ span, smSpan, mdSpan, lgSpan, as = "div", className, ...props }, ref) => {
|
|
6395
6721
|
const Tag = as;
|
|
6396
|
-
return /* @__PURE__ */ (0,
|
|
6722
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
6397
6723
|
Tag,
|
|
6398
6724
|
{
|
|
6399
6725
|
ref,
|
|
@@ -6412,8 +6738,8 @@ var GridItem = React69.forwardRef(
|
|
|
6412
6738
|
GridItem.displayName = "GridItem";
|
|
6413
6739
|
|
|
6414
6740
|
// src/components/container/Container.tsx
|
|
6415
|
-
var
|
|
6416
|
-
var
|
|
6741
|
+
var React71 = __toESM(require("react"));
|
|
6742
|
+
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
6417
6743
|
var widthClasses = {
|
|
6418
6744
|
sm: "max-w-3xl",
|
|
6419
6745
|
md: "max-w-5xl",
|
|
@@ -6427,9 +6753,9 @@ var paddingClasses = {
|
|
|
6427
6753
|
md: "px-4 sm:px-6",
|
|
6428
6754
|
lg: "px-4 sm:px-6 lg:px-8"
|
|
6429
6755
|
};
|
|
6430
|
-
var Container =
|
|
6756
|
+
var Container = React71.forwardRef(function Container2({ width = "lg", padding = "md", as = "div", className, ...props }, ref) {
|
|
6431
6757
|
const Tag = as;
|
|
6432
|
-
return /* @__PURE__ */ (0,
|
|
6758
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
6433
6759
|
Tag,
|
|
6434
6760
|
{
|
|
6435
6761
|
ref,
|
|
@@ -6440,8 +6766,8 @@ var Container = React70.forwardRef(function Container2({ width = "lg", padding =
|
|
|
6440
6766
|
});
|
|
6441
6767
|
|
|
6442
6768
|
// src/components/section/Section.tsx
|
|
6443
|
-
var
|
|
6444
|
-
var
|
|
6769
|
+
var React72 = __toESM(require("react"));
|
|
6770
|
+
var import_jsx_runtime74 = require("react/jsx-runtime");
|
|
6445
6771
|
var toneClasses2 = {
|
|
6446
6772
|
default: "bg-background text-foreground",
|
|
6447
6773
|
muted: "bg-muted/40 text-foreground",
|
|
@@ -6481,7 +6807,7 @@ var brandVars = {
|
|
|
6481
6807
|
"--border": "var(--primary-foreground)",
|
|
6482
6808
|
"--input": "var(--primary-foreground)"
|
|
6483
6809
|
};
|
|
6484
|
-
var Section =
|
|
6810
|
+
var Section = React72.forwardRef(function Section2({
|
|
6485
6811
|
tone = "default",
|
|
6486
6812
|
padding = "md",
|
|
6487
6813
|
width = "lg",
|
|
@@ -6495,7 +6821,7 @@ var Section = React71.forwardRef(function Section2({
|
|
|
6495
6821
|
}, ref) {
|
|
6496
6822
|
const Tag = as;
|
|
6497
6823
|
const toneStyle = tone === "inverse" ? inverseVars : tone === "brand" ? brandVars : void 0;
|
|
6498
|
-
return /* @__PURE__ */ (0,
|
|
6824
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6499
6825
|
Tag,
|
|
6500
6826
|
{
|
|
6501
6827
|
ref,
|
|
@@ -6503,19 +6829,19 @@ var Section = React71.forwardRef(function Section2({
|
|
|
6503
6829
|
className: cn("w-full", toneClasses2[tone], paddingClasses2[padding], className),
|
|
6504
6830
|
style: { ...toneStyle, ...style },
|
|
6505
6831
|
...props,
|
|
6506
|
-
children: container ? /* @__PURE__ */ (0,
|
|
6832
|
+
children: container ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(Container, { width, className: containerClassName, children }) : children
|
|
6507
6833
|
}
|
|
6508
6834
|
);
|
|
6509
6835
|
});
|
|
6510
6836
|
|
|
6511
6837
|
// src/components/hero/Hero.tsx
|
|
6512
|
-
var
|
|
6513
|
-
var
|
|
6838
|
+
var React73 = __toESM(require("react"));
|
|
6839
|
+
var import_jsx_runtime75 = require("react/jsx-runtime");
|
|
6514
6840
|
var titleSizes = {
|
|
6515
6841
|
md: "text-3xl sm:text-4xl md:text-5xl",
|
|
6516
6842
|
lg: "text-4xl sm:text-5xl md:text-6xl lg:leading-[1.05]"
|
|
6517
6843
|
};
|
|
6518
|
-
var Hero =
|
|
6844
|
+
var Hero = React73.forwardRef(function Hero2({
|
|
6519
6845
|
title,
|
|
6520
6846
|
description,
|
|
6521
6847
|
eyebrow,
|
|
@@ -6541,7 +6867,7 @@ var Hero = React72.forwardRef(function Hero2({
|
|
|
6541
6867
|
const Heading2 = `h${level}`;
|
|
6542
6868
|
const centered = layout === "centered" || align === "center";
|
|
6543
6869
|
const overlay = layout === "overlay";
|
|
6544
|
-
const copy = /* @__PURE__ */ (0,
|
|
6870
|
+
const copy = /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)(
|
|
6545
6871
|
"div",
|
|
6546
6872
|
{
|
|
6547
6873
|
className: cn(
|
|
@@ -6550,7 +6876,7 @@ var Hero = React72.forwardRef(function Hero2({
|
|
|
6550
6876
|
overlay && "max-w-2xl"
|
|
6551
6877
|
),
|
|
6552
6878
|
children: [
|
|
6553
|
-
badge && /* @__PURE__ */ (0,
|
|
6879
|
+
badge && /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
6554
6880
|
"div",
|
|
6555
6881
|
{
|
|
6556
6882
|
className: cn(
|
|
@@ -6561,7 +6887,7 @@ var Hero = React72.forwardRef(function Hero2({
|
|
|
6561
6887
|
children: badge
|
|
6562
6888
|
}
|
|
6563
6889
|
),
|
|
6564
|
-
eyebrow && /* @__PURE__ */ (0,
|
|
6890
|
+
eyebrow && /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
6565
6891
|
"p",
|
|
6566
6892
|
{
|
|
6567
6893
|
className: cn(
|
|
@@ -6572,7 +6898,7 @@ var Hero = React72.forwardRef(function Hero2({
|
|
|
6572
6898
|
children: eyebrow
|
|
6573
6899
|
}
|
|
6574
6900
|
),
|
|
6575
|
-
/* @__PURE__ */ (0,
|
|
6901
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
6576
6902
|
Heading2,
|
|
6577
6903
|
{
|
|
6578
6904
|
className: cn(
|
|
@@ -6584,7 +6910,7 @@ var Hero = React72.forwardRef(function Hero2({
|
|
|
6584
6910
|
children: title
|
|
6585
6911
|
}
|
|
6586
6912
|
),
|
|
6587
|
-
description && /* @__PURE__ */ (0,
|
|
6913
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
6588
6914
|
"p",
|
|
6589
6915
|
{
|
|
6590
6916
|
className: cn(
|
|
@@ -6596,7 +6922,7 @@ var Hero = React72.forwardRef(function Hero2({
|
|
|
6596
6922
|
children: description
|
|
6597
6923
|
}
|
|
6598
6924
|
),
|
|
6599
|
-
actions && /* @__PURE__ */ (0,
|
|
6925
|
+
actions && /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
6600
6926
|
"div",
|
|
6601
6927
|
{
|
|
6602
6928
|
className: cn(
|
|
@@ -6610,7 +6936,7 @@ var Hero = React72.forwardRef(function Hero2({
|
|
|
6610
6936
|
}
|
|
6611
6937
|
);
|
|
6612
6938
|
if (overlay) {
|
|
6613
|
-
return /* @__PURE__ */ (0,
|
|
6939
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)(
|
|
6614
6940
|
Tag,
|
|
6615
6941
|
{
|
|
6616
6942
|
ref,
|
|
@@ -6620,7 +6946,7 @@ var Hero = React72.forwardRef(function Hero2({
|
|
|
6620
6946
|
),
|
|
6621
6947
|
...props,
|
|
6622
6948
|
children: [
|
|
6623
|
-
media && /* @__PURE__ */ (0,
|
|
6949
|
+
media && /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
6624
6950
|
"div",
|
|
6625
6951
|
{
|
|
6626
6952
|
className: cn(
|
|
@@ -6630,20 +6956,20 @@ var Hero = React72.forwardRef(function Hero2({
|
|
|
6630
6956
|
children: media
|
|
6631
6957
|
}
|
|
6632
6958
|
),
|
|
6633
|
-
/* @__PURE__ */ (0,
|
|
6634
|
-
/* @__PURE__ */ (0,
|
|
6959
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)("div", { "aria-hidden": "true", className: "absolute inset-0 -z-10 bg-foreground/60" }),
|
|
6960
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)("div", { className: "relative w-full px-4 sm:px-6 lg:px-10", children: copy })
|
|
6635
6961
|
]
|
|
6636
6962
|
}
|
|
6637
6963
|
);
|
|
6638
6964
|
}
|
|
6639
6965
|
if (layout === "centered") {
|
|
6640
|
-
return /* @__PURE__ */ (0,
|
|
6966
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)(Tag, { ref, className: cn("w-full", className), ...props, children: [
|
|
6641
6967
|
copy,
|
|
6642
|
-
media && /* @__PURE__ */ (0,
|
|
6968
|
+
media && /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("div", { className: cn("mt-12 min-w-0", mediaClassName), children: media })
|
|
6643
6969
|
] });
|
|
6644
6970
|
}
|
|
6645
6971
|
if (layout === "stacked") {
|
|
6646
|
-
return /* @__PURE__ */ (0,
|
|
6972
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)(
|
|
6647
6973
|
Tag,
|
|
6648
6974
|
{
|
|
6649
6975
|
ref,
|
|
@@ -6651,28 +6977,28 @@ var Hero = React72.forwardRef(function Hero2({
|
|
|
6651
6977
|
...props,
|
|
6652
6978
|
children: [
|
|
6653
6979
|
copy,
|
|
6654
|
-
media && /* @__PURE__ */ (0,
|
|
6980
|
+
media && /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("div", { className: cn("min-w-0 w-full", mediaClassName), children: media })
|
|
6655
6981
|
]
|
|
6656
6982
|
}
|
|
6657
6983
|
);
|
|
6658
6984
|
}
|
|
6659
|
-
return /* @__PURE__ */ (0,
|
|
6985
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)(
|
|
6660
6986
|
Tag,
|
|
6661
6987
|
{
|
|
6662
6988
|
ref,
|
|
6663
6989
|
className: cn("grid w-full items-center gap-10 lg:grid-cols-2 lg:gap-16 xl:gap-20", className),
|
|
6664
6990
|
...props,
|
|
6665
6991
|
children: [
|
|
6666
|
-
/* @__PURE__ */ (0,
|
|
6667
|
-
media && /* @__PURE__ */ (0,
|
|
6992
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)("div", { className: cn(mediaPosition === "left" && "lg:order-2"), children: copy }),
|
|
6993
|
+
media && /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("div", { className: cn("min-w-0", mediaPosition === "left" && "lg:order-1", mediaClassName), children: media })
|
|
6668
6994
|
]
|
|
6669
6995
|
}
|
|
6670
6996
|
);
|
|
6671
6997
|
});
|
|
6672
6998
|
|
|
6673
6999
|
// src/components/stat-band/StatBand.tsx
|
|
6674
|
-
var
|
|
6675
|
-
var
|
|
7000
|
+
var React74 = __toESM(require("react"));
|
|
7001
|
+
var import_jsx_runtime76 = require("react/jsx-runtime");
|
|
6676
7002
|
var columnClasses = {
|
|
6677
7003
|
2: "sm:grid-cols-2",
|
|
6678
7004
|
3: "sm:grid-cols-2 lg:grid-cols-3",
|
|
@@ -6688,7 +7014,7 @@ var panelValueClasses = {
|
|
|
6688
7014
|
md: "text-xl sm:text-2xl",
|
|
6689
7015
|
lg: "text-2xl sm:text-3xl"
|
|
6690
7016
|
};
|
|
6691
|
-
var StatBand =
|
|
7017
|
+
var StatBand = React74.forwardRef(function StatBand2({
|
|
6692
7018
|
items,
|
|
6693
7019
|
columns = 3,
|
|
6694
7020
|
align = "center",
|
|
@@ -6700,7 +7026,7 @@ var StatBand = React73.forwardRef(function StatBand2({
|
|
|
6700
7026
|
...props
|
|
6701
7027
|
}, ref) {
|
|
6702
7028
|
const panel = variant === "panel";
|
|
6703
|
-
return /* @__PURE__ */ (0,
|
|
7029
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
6704
7030
|
"dl",
|
|
6705
7031
|
{
|
|
6706
7032
|
ref,
|
|
@@ -6712,7 +7038,7 @@ var StatBand = React73.forwardRef(function StatBand2({
|
|
|
6712
7038
|
className
|
|
6713
7039
|
),
|
|
6714
7040
|
...props,
|
|
6715
|
-
children: items.map((item) => /* @__PURE__ */ (0,
|
|
7041
|
+
children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(
|
|
6716
7042
|
"div",
|
|
6717
7043
|
{
|
|
6718
7044
|
className: cn(
|
|
@@ -6721,7 +7047,7 @@ var StatBand = React73.forwardRef(function StatBand2({
|
|
|
6721
7047
|
align === "center" ? "items-center text-center" : "items-start text-left"
|
|
6722
7048
|
),
|
|
6723
7049
|
children: [
|
|
6724
|
-
/* @__PURE__ */ (0,
|
|
7050
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(
|
|
6725
7051
|
"dt",
|
|
6726
7052
|
{
|
|
6727
7053
|
className: cn(
|
|
@@ -6730,11 +7056,11 @@ var StatBand = React73.forwardRef(function StatBand2({
|
|
|
6730
7056
|
),
|
|
6731
7057
|
children: [
|
|
6732
7058
|
item.label,
|
|
6733
|
-
item.hint && /* @__PURE__ */ (0,
|
|
7059
|
+
item.hint && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { className: cn("mt-1 block font-normal", panel ? "text-xs normal-case tracking-normal" : "text-xs"), children: item.hint })
|
|
6734
7060
|
]
|
|
6735
7061
|
}
|
|
6736
7062
|
),
|
|
6737
|
-
/* @__PURE__ */ (0,
|
|
7063
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
6738
7064
|
"dd",
|
|
6739
7065
|
{
|
|
6740
7066
|
className: cn(
|
|
@@ -6754,14 +7080,14 @@ var StatBand = React73.forwardRef(function StatBand2({
|
|
|
6754
7080
|
});
|
|
6755
7081
|
|
|
6756
7082
|
// src/components/cta-section/CTASection.tsx
|
|
6757
|
-
var
|
|
6758
|
-
var
|
|
7083
|
+
var React75 = __toESM(require("react"));
|
|
7084
|
+
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
6759
7085
|
var sizePadding = {
|
|
6760
7086
|
sm: "md",
|
|
6761
7087
|
md: "lg",
|
|
6762
7088
|
lg: "xl"
|
|
6763
7089
|
};
|
|
6764
|
-
var CTASection =
|
|
7090
|
+
var CTASection = React75.forwardRef(function CTASection2({
|
|
6765
7091
|
title,
|
|
6766
7092
|
description,
|
|
6767
7093
|
eyebrow,
|
|
@@ -6773,7 +7099,7 @@ var CTASection = React74.forwardRef(function CTASection2({
|
|
|
6773
7099
|
className,
|
|
6774
7100
|
...props
|
|
6775
7101
|
}, ref) {
|
|
6776
|
-
return /* @__PURE__ */ (0,
|
|
7102
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
6777
7103
|
Section,
|
|
6778
7104
|
{
|
|
6779
7105
|
ref,
|
|
@@ -6782,7 +7108,7 @@ var CTASection = React74.forwardRef(function CTASection2({
|
|
|
6782
7108
|
width,
|
|
6783
7109
|
className,
|
|
6784
7110
|
...props,
|
|
6785
|
-
children: /* @__PURE__ */ (0,
|
|
7111
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(
|
|
6786
7112
|
"div",
|
|
6787
7113
|
{
|
|
6788
7114
|
className: cn(
|
|
@@ -6790,10 +7116,10 @@ var CTASection = React74.forwardRef(function CTASection2({
|
|
|
6790
7116
|
align === "center" ? "items-center text-center" : "items-start text-left"
|
|
6791
7117
|
),
|
|
6792
7118
|
children: [
|
|
6793
|
-
eyebrow && /* @__PURE__ */ (0,
|
|
6794
|
-
/* @__PURE__ */ (0,
|
|
6795
|
-
description && /* @__PURE__ */ (0,
|
|
6796
|
-
actions && /* @__PURE__ */ (0,
|
|
7119
|
+
eyebrow && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("p", { className: "text-xs font-semibold uppercase tracking-widest text-primary-ink", children: eyebrow }),
|
|
7120
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("h2", { className: "max-w-3xl text-3xl font-semibold tracking-tight text-balance sm:text-4xl", children: title }),
|
|
7121
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("p", { className: cn("max-w-2xl text-base leading-relaxed text-muted-foreground sm:text-lg"), children: description }),
|
|
7122
|
+
actions && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: cn("mt-2 flex flex-wrap items-center gap-3", align === "center" && "justify-center"), children: actions })
|
|
6797
7123
|
]
|
|
6798
7124
|
}
|
|
6799
7125
|
)
|
|
@@ -6802,10 +7128,10 @@ var CTASection = React74.forwardRef(function CTASection2({
|
|
|
6802
7128
|
});
|
|
6803
7129
|
|
|
6804
7130
|
// src/components/comparison-table/ComparisonTable.tsx
|
|
6805
|
-
var
|
|
6806
|
-
var
|
|
7131
|
+
var React76 = __toESM(require("react"));
|
|
7132
|
+
var import_jsx_runtime78 = require("react/jsx-runtime");
|
|
6807
7133
|
function CheckMark() {
|
|
6808
|
-
return /* @__PURE__ */ (0,
|
|
7134
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
6809
7135
|
"svg",
|
|
6810
7136
|
{
|
|
6811
7137
|
"aria-hidden": "true",
|
|
@@ -6816,12 +7142,12 @@ function CheckMark() {
|
|
|
6816
7142
|
strokeLinecap: "round",
|
|
6817
7143
|
strokeLinejoin: "round",
|
|
6818
7144
|
className: "mx-auto h-5 w-5 text-success",
|
|
6819
|
-
children: /* @__PURE__ */ (0,
|
|
7145
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("path", { d: "m4 10.5 4 4 8-9" })
|
|
6820
7146
|
}
|
|
6821
7147
|
);
|
|
6822
7148
|
}
|
|
6823
7149
|
function DashMark() {
|
|
6824
|
-
return /* @__PURE__ */ (0,
|
|
7150
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
6825
7151
|
"svg",
|
|
6826
7152
|
{
|
|
6827
7153
|
"aria-hidden": "true",
|
|
@@ -6831,11 +7157,11 @@ function DashMark() {
|
|
|
6831
7157
|
strokeWidth: "2.2",
|
|
6832
7158
|
strokeLinecap: "round",
|
|
6833
7159
|
className: "mx-auto h-5 w-5 text-muted-foreground/60",
|
|
6834
|
-
children: /* @__PURE__ */ (0,
|
|
7160
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("path", { d: "M5 10h10" })
|
|
6835
7161
|
}
|
|
6836
7162
|
);
|
|
6837
7163
|
}
|
|
6838
|
-
var ComparisonTable =
|
|
7164
|
+
var ComparisonTable = React76.forwardRef(
|
|
6839
7165
|
function ComparisonTable2({
|
|
6840
7166
|
columns,
|
|
6841
7167
|
rows,
|
|
@@ -6847,11 +7173,11 @@ var ComparisonTable = React75.forwardRef(
|
|
|
6847
7173
|
}, ref) {
|
|
6848
7174
|
const yes = valueLabels?.yes ?? "Included";
|
|
6849
7175
|
const no = valueLabels?.no ?? "Not included";
|
|
6850
|
-
return /* @__PURE__ */ (0,
|
|
6851
|
-
/* @__PURE__ */ (0,
|
|
6852
|
-
/* @__PURE__ */ (0,
|
|
6853
|
-
/* @__PURE__ */ (0,
|
|
6854
|
-
columns.map((column) => /* @__PURE__ */ (0,
|
|
7176
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "w-full overflow-x-auto rounded-xl border border-border bg-card", children: /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("table", { ref, className: cn("w-full border-collapse text-sm", className), ...props, children: [
|
|
7177
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("caption", { className: "sr-only", children: caption }),
|
|
7178
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("tr", { className: "border-b border-border", children: [
|
|
7179
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("th", { scope: "col", className: "min-w-48 px-5 py-4 text-left font-medium text-muted-foreground", children: featureLabel }),
|
|
7180
|
+
columns.map((column) => /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
6855
7181
|
"th",
|
|
6856
7182
|
{
|
|
6857
7183
|
scope: "col",
|
|
@@ -6864,21 +7190,21 @@ var ComparisonTable = React75.forwardRef(
|
|
|
6864
7190
|
column.label
|
|
6865
7191
|
))
|
|
6866
7192
|
] }) }),
|
|
6867
|
-
/* @__PURE__ */ (0,
|
|
6868
|
-
/* @__PURE__ */ (0,
|
|
7193
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("tbody", { children: rows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("tr", { className: "border-b border-border last:border-b-0", children: [
|
|
7194
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("th", { scope: "row", className: "px-5 py-4 text-left font-medium", children: [
|
|
6869
7195
|
row.feature,
|
|
6870
|
-
row.hint && /* @__PURE__ */ (0,
|
|
7196
|
+
row.hint && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "mt-1 block text-xs font-normal text-muted-foreground", children: row.hint })
|
|
6871
7197
|
] }),
|
|
6872
7198
|
columns.map((column, index) => {
|
|
6873
7199
|
const value = row.values[index];
|
|
6874
|
-
return /* @__PURE__ */ (0,
|
|
7200
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
6875
7201
|
"td",
|
|
6876
7202
|
{
|
|
6877
7203
|
className: cn("px-5 py-4 text-center align-middle", column.highlight && "bg-primary/5"),
|
|
6878
|
-
children: typeof value === "boolean" ? /* @__PURE__ */ (0,
|
|
6879
|
-
value ? /* @__PURE__ */ (0,
|
|
6880
|
-
/* @__PURE__ */ (0,
|
|
6881
|
-
] }) : /* @__PURE__ */ (0,
|
|
7204
|
+
children: typeof value === "boolean" ? /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(import_jsx_runtime78.Fragment, { children: [
|
|
7205
|
+
value ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(CheckMark, {}) : /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(DashMark, {}),
|
|
7206
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "sr-only", children: value ? yes : no })
|
|
7207
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { children: value ?? "" })
|
|
6882
7208
|
},
|
|
6883
7209
|
`${row.feature}-${column.label}`
|
|
6884
7210
|
);
|
|
@@ -6889,8 +7215,8 @@ var ComparisonTable = React75.forwardRef(
|
|
|
6889
7215
|
);
|
|
6890
7216
|
|
|
6891
7217
|
// src/components/logo-cloud/LogoCloud.tsx
|
|
6892
|
-
var
|
|
6893
|
-
var
|
|
7218
|
+
var React77 = __toESM(require("react"));
|
|
7219
|
+
var import_jsx_runtime79 = require("react/jsx-runtime");
|
|
6894
7220
|
var columnClasses2 = {
|
|
6895
7221
|
3: "grid-cols-2 sm:grid-cols-3",
|
|
6896
7222
|
4: "grid-cols-2 sm:grid-cols-4",
|
|
@@ -6902,7 +7228,7 @@ var sizeClasses9 = {
|
|
|
6902
7228
|
md: "h-8",
|
|
6903
7229
|
lg: "h-12"
|
|
6904
7230
|
};
|
|
6905
|
-
var LogoCloud =
|
|
7231
|
+
var LogoCloud = React77.forwardRef(function LogoCloud2({
|
|
6906
7232
|
items,
|
|
6907
7233
|
caption,
|
|
6908
7234
|
columns = 4,
|
|
@@ -6920,8 +7246,8 @@ var LogoCloud = React76.forwardRef(function LogoCloud2({
|
|
|
6920
7246
|
sizeClasses9[size],
|
|
6921
7247
|
grayscale && "opacity-70 grayscale hover:opacity-100 hover:grayscale-0"
|
|
6922
7248
|
);
|
|
6923
|
-
return /* @__PURE__ */ (0,
|
|
6924
|
-
caption && /* @__PURE__ */ (0,
|
|
7249
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { ref, className: cn("w-full", className), ...props, children: [
|
|
7250
|
+
caption && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
6925
7251
|
"p",
|
|
6926
7252
|
{
|
|
6927
7253
|
className: cn(
|
|
@@ -6931,12 +7257,12 @@ var LogoCloud = React76.forwardRef(function LogoCloud2({
|
|
|
6931
7257
|
children: caption
|
|
6932
7258
|
}
|
|
6933
7259
|
),
|
|
6934
|
-
/* @__PURE__ */ (0,
|
|
6935
|
-
const content = /* @__PURE__ */ (0,
|
|
6936
|
-
/* @__PURE__ */ (0,
|
|
6937
|
-
/* @__PURE__ */ (0,
|
|
7260
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("ul", { className: cn("grid items-center gap-x-8 gap-y-6", columnClasses2[columns], align === "center" && "justify-items-center"), children: items.map((item) => {
|
|
7261
|
+
const content = /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(import_jsx_runtime79.Fragment, { children: [
|
|
7262
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { className: logoClass, "aria-hidden": "true", children: item.logo }),
|
|
7263
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { className: "sr-only", children: item.name })
|
|
6938
7264
|
] });
|
|
6939
|
-
return /* @__PURE__ */ (0,
|
|
7265
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("li", { className: cn("min-w-0", align === "center" ? "justify-self-center" : "justify-self-start"), children: item.href ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
6940
7266
|
Link3,
|
|
6941
7267
|
{
|
|
6942
7268
|
...linkHrefProp === "to" ? { to: item.href } : { href: item.href },
|
|
@@ -6949,41 +7275,41 @@ var LogoCloud = React76.forwardRef(function LogoCloud2({
|
|
|
6949
7275
|
});
|
|
6950
7276
|
|
|
6951
7277
|
// src/components/feature-grid/FeatureGrid.tsx
|
|
6952
|
-
var
|
|
6953
|
-
var
|
|
7278
|
+
var React78 = __toESM(require("react"));
|
|
7279
|
+
var import_jsx_runtime80 = require("react/jsx-runtime");
|
|
6954
7280
|
var columnClasses3 = {
|
|
6955
7281
|
2: "sm:grid-cols-2",
|
|
6956
7282
|
3: "sm:grid-cols-2 lg:grid-cols-3",
|
|
6957
7283
|
4: "sm:grid-cols-2 lg:grid-cols-4"
|
|
6958
7284
|
};
|
|
6959
|
-
var FeatureGrid =
|
|
7285
|
+
var FeatureGrid = React78.forwardRef(function FeatureGrid2({ features, columns = 3, variant = "card", align = "left", linkComponent, className, ...props }, ref) {
|
|
6960
7286
|
const Link3 = linkComponent ?? "a";
|
|
6961
7287
|
const cardClass = cn(
|
|
6962
7288
|
"group flex h-full flex-col gap-3 rounded-xl p-6",
|
|
6963
7289
|
variant === "card" && "border border-border bg-card shadow-sm transition-colors hover:border-primary/40",
|
|
6964
7290
|
align === "center" && "items-center text-center"
|
|
6965
7291
|
);
|
|
6966
|
-
const content = (feature) => /* @__PURE__ */ (0,
|
|
6967
|
-
feature.icon && /* @__PURE__ */ (0,
|
|
6968
|
-
/* @__PURE__ */ (0,
|
|
6969
|
-
feature.description && /* @__PURE__ */ (0,
|
|
6970
|
-
feature.href && feature.actionLabel && /* @__PURE__ */ (0,
|
|
7292
|
+
const content = (feature) => /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(import_jsx_runtime80.Fragment, { children: [
|
|
7293
|
+
feature.icon && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("span", { className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-primary/10 text-primary-ink [&_svg]:size-5", children: feature.icon }),
|
|
7294
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("h3", { className: "text-base font-semibold tracking-tight", children: feature.title }),
|
|
7295
|
+
feature.description && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("p", { className: "text-sm leading-relaxed text-muted-foreground", children: feature.description }),
|
|
7296
|
+
feature.href && feature.actionLabel && /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("span", { className: "mt-auto pt-2 text-sm font-medium text-primary-ink", children: [
|
|
6971
7297
|
feature.actionLabel,
|
|
6972
7298
|
" ",
|
|
6973
|
-
/* @__PURE__ */ (0,
|
|
7299
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("span", { "aria-hidden": "true", children: "\u2192" })
|
|
6974
7300
|
] })
|
|
6975
7301
|
] });
|
|
6976
|
-
return /* @__PURE__ */ (0,
|
|
7302
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("ul", { ref, className: cn("grid gap-6", columnClasses3[columns], className), ...props, children: features.map((feature) => /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("li", { className: "min-w-0", children: feature.href ? /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(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__ */ (0, import_jsx_runtime80.jsx)("div", { className: cardClass, children: content(feature) }) }, feature.title)) });
|
|
6977
7303
|
});
|
|
6978
7304
|
|
|
6979
7305
|
// src/components/feature-row/FeatureRow.tsx
|
|
6980
|
-
var
|
|
6981
|
-
var
|
|
7306
|
+
var React79 = __toESM(require("react"));
|
|
7307
|
+
var import_jsx_runtime81 = require("react/jsx-runtime");
|
|
6982
7308
|
var titleSizes2 = {
|
|
6983
7309
|
md: "text-3xl",
|
|
6984
7310
|
lg: "text-3xl sm:text-4xl"
|
|
6985
7311
|
};
|
|
6986
|
-
var FeatureRow =
|
|
7312
|
+
var FeatureRow = React79.forwardRef(function FeatureRow2({
|
|
6987
7313
|
title,
|
|
6988
7314
|
description,
|
|
6989
7315
|
eyebrow,
|
|
@@ -6996,35 +7322,35 @@ var FeatureRow = React78.forwardRef(function FeatureRow2({
|
|
|
6996
7322
|
...props
|
|
6997
7323
|
}, ref) {
|
|
6998
7324
|
const Heading2 = `h${level}`;
|
|
6999
|
-
return /* @__PURE__ */ (0,
|
|
7325
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(
|
|
7000
7326
|
"div",
|
|
7001
7327
|
{
|
|
7002
7328
|
ref,
|
|
7003
7329
|
className: cn("grid items-center gap-10 lg:grid-cols-2 lg:gap-16", className),
|
|
7004
7330
|
...props,
|
|
7005
7331
|
children: [
|
|
7006
|
-
/* @__PURE__ */ (0,
|
|
7007
|
-
eyebrow && /* @__PURE__ */ (0,
|
|
7008
|
-
/* @__PURE__ */ (0,
|
|
7009
|
-
description && /* @__PURE__ */ (0,
|
|
7010
|
-
actions && /* @__PURE__ */ (0,
|
|
7332
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: cn("min-w-0", mediaPosition === "left" && "lg:order-2"), children: [
|
|
7333
|
+
eyebrow && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("p", { className: "mb-3 text-xs font-semibold uppercase tracking-widest text-primary-ink", children: eyebrow }),
|
|
7334
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Heading2, { className: cn("font-semibold tracking-tight text-balance", titleSizes2[size]), children: title }),
|
|
7335
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: "mt-4 max-w-xl text-base leading-relaxed text-muted-foreground sm:text-lg", children: description }),
|
|
7336
|
+
actions && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: "mt-7 flex flex-wrap items-center gap-3", children: actions })
|
|
7011
7337
|
] }),
|
|
7012
|
-
/* @__PURE__ */ (0,
|
|
7338
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: cn("min-w-0", mediaPosition === "left" && "lg:order-1"), children: media })
|
|
7013
7339
|
]
|
|
7014
7340
|
}
|
|
7015
7341
|
);
|
|
7016
7342
|
});
|
|
7017
7343
|
|
|
7018
7344
|
// src/components/testimonial/Testimonial.tsx
|
|
7019
|
-
var
|
|
7020
|
-
var
|
|
7345
|
+
var React80 = __toESM(require("react"));
|
|
7346
|
+
var import_jsx_runtime82 = require("react/jsx-runtime");
|
|
7021
7347
|
var quoteSizes = {
|
|
7022
7348
|
sm: "text-base",
|
|
7023
7349
|
md: "text-lg",
|
|
7024
7350
|
lg: "text-xl sm:text-2xl"
|
|
7025
7351
|
};
|
|
7026
|
-
var Testimonial =
|
|
7027
|
-
return /* @__PURE__ */ (0,
|
|
7352
|
+
var Testimonial = React80.forwardRef(function Testimonial2({ quote, name, role, company, avatar, logo, variant = "card", size = "md", className, ...props }, ref) {
|
|
7353
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(
|
|
7028
7354
|
"figure",
|
|
7029
7355
|
{
|
|
7030
7356
|
ref,
|
|
@@ -7035,17 +7361,17 @@ var Testimonial = React79.forwardRef(function Testimonial2({ quote, name, role,
|
|
|
7035
7361
|
),
|
|
7036
7362
|
...props,
|
|
7037
7363
|
children: [
|
|
7038
|
-
logo && /* @__PURE__ */ (0,
|
|
7039
|
-
/* @__PURE__ */ (0,
|
|
7364
|
+
logo && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "flex items-center", children: logo }),
|
|
7365
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("blockquote", { className: cn("flex-1 leading-relaxed", quoteSizes[size]), children: /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("p", { children: [
|
|
7040
7366
|
"\u201C",
|
|
7041
7367
|
quote,
|
|
7042
7368
|
"\u201D"
|
|
7043
7369
|
] }) }),
|
|
7044
|
-
/* @__PURE__ */ (0,
|
|
7045
|
-
avatar && /* @__PURE__ */ (0,
|
|
7046
|
-
/* @__PURE__ */ (0,
|
|
7047
|
-
/* @__PURE__ */ (0,
|
|
7048
|
-
(role || company) && /* @__PURE__ */ (0,
|
|
7370
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("figcaption", { className: "flex items-center gap-3", children: [
|
|
7371
|
+
avatar && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "shrink-0", children: avatar }),
|
|
7372
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "min-w-0", children: [
|
|
7373
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("p", { className: "text-sm font-semibold", children: name }),
|
|
7374
|
+
(role || company) && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("p", { className: "text-xs text-muted-foreground", children: [role, company].filter(Boolean).join(", ") })
|
|
7049
7375
|
] })
|
|
7050
7376
|
] })
|
|
7051
7377
|
]
|
|
@@ -7054,24 +7380,24 @@ var Testimonial = React79.forwardRef(function Testimonial2({ quote, name, role,
|
|
|
7054
7380
|
});
|
|
7055
7381
|
|
|
7056
7382
|
// src/components/process-steps/ProcessSteps.tsx
|
|
7057
|
-
var
|
|
7058
|
-
var
|
|
7383
|
+
var React81 = __toESM(require("react"));
|
|
7384
|
+
var import_jsx_runtime83 = require("react/jsx-runtime");
|
|
7059
7385
|
var columnClasses4 = {
|
|
7060
7386
|
2: "sm:grid-cols-2",
|
|
7061
7387
|
3: "sm:grid-cols-2 lg:grid-cols-3",
|
|
7062
7388
|
4: "sm:grid-cols-2 lg:grid-cols-4"
|
|
7063
7389
|
};
|
|
7064
|
-
var ProcessSteps =
|
|
7390
|
+
var ProcessSteps = React81.forwardRef(function ProcessSteps2({ steps, columns = 3, numbered = true, align = "left", headingLevel = 3, className, ...props }, ref) {
|
|
7065
7391
|
const HeadingTag = { 2: "h2", 3: "h3", 4: "h4" }[headingLevel];
|
|
7066
|
-
return /* @__PURE__ */ (0,
|
|
7392
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("ol", { ref, className: cn("grid gap-8", columnClasses4[columns], className), ...props, children: steps.map((step, index) => /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(
|
|
7067
7393
|
"li",
|
|
7068
7394
|
{
|
|
7069
7395
|
className: cn("flex min-w-0 flex-col gap-4", align === "center" && "items-center text-center"),
|
|
7070
7396
|
children: [
|
|
7071
|
-
/* @__PURE__ */ (0,
|
|
7072
|
-
/* @__PURE__ */ (0,
|
|
7073
|
-
/* @__PURE__ */ (0,
|
|
7074
|
-
step.description && /* @__PURE__ */ (0,
|
|
7397
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-primary/10 text-sm font-semibold text-primary-ink [&_svg]:size-5", children: step.icon ?? (numbered ? String(index + 1).padStart(2, "0") : null) }),
|
|
7398
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "min-w-0", children: [
|
|
7399
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(HeadingTag, { className: "text-base font-semibold tracking-tight", children: step.title }),
|
|
7400
|
+
step.description && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("p", { className: "mt-1 text-sm leading-relaxed text-muted-foreground", children: step.description })
|
|
7075
7401
|
] })
|
|
7076
7402
|
]
|
|
7077
7403
|
},
|
|
@@ -7080,9 +7406,9 @@ var ProcessSteps = React80.forwardRef(function ProcessSteps2({ steps, columns =
|
|
|
7080
7406
|
});
|
|
7081
7407
|
|
|
7082
7408
|
// src/components/article-card/ArticleCard.tsx
|
|
7083
|
-
var
|
|
7084
|
-
var
|
|
7085
|
-
var ArticleCard =
|
|
7409
|
+
var React82 = __toESM(require("react"));
|
|
7410
|
+
var import_jsx_runtime84 = require("react/jsx-runtime");
|
|
7411
|
+
var ArticleCard = React82.forwardRef(function ArticleCard2({
|
|
7086
7412
|
title,
|
|
7087
7413
|
description,
|
|
7088
7414
|
href,
|
|
@@ -7096,7 +7422,7 @@ var ArticleCard = React81.forwardRef(function ArticleCard2({
|
|
|
7096
7422
|
}, ref) {
|
|
7097
7423
|
const Link3 = linkComponent ?? "a";
|
|
7098
7424
|
const compact = variant === "compact";
|
|
7099
|
-
return /* @__PURE__ */ (0,
|
|
7425
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("article", { ref, className: cn("h-full", className), ...props, children: /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
7100
7426
|
Link3,
|
|
7101
7427
|
{
|
|
7102
7428
|
href,
|
|
@@ -7105,22 +7431,71 @@ var ArticleCard = React81.forwardRef(function ArticleCard2({
|
|
|
7105
7431
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background"
|
|
7106
7432
|
),
|
|
7107
7433
|
children: [
|
|
7108
|
-
media && !compact && /* @__PURE__ */ (0,
|
|
7109
|
-
/* @__PURE__ */ (0,
|
|
7110
|
-
eyebrow && /* @__PURE__ */ (0,
|
|
7111
|
-
/* @__PURE__ */ (0,
|
|
7112
|
-
description && /* @__PURE__ */ (0,
|
|
7113
|
-
meta && /* @__PURE__ */ (0,
|
|
7434
|
+
media && !compact && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "aspect-[16/10] w-full overflow-hidden bg-muted [&_img]:h-full [&_img]:w-full [&_img]:object-cover", children: media }),
|
|
7435
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: cn("flex flex-1 flex-col gap-2", compact ? "p-4" : "p-5"), children: [
|
|
7436
|
+
eyebrow && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("p", { className: "text-xs font-semibold uppercase tracking-widest text-primary-ink", children: eyebrow }),
|
|
7437
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("h3", { className: cn("font-semibold tracking-tight transition-colors group-hover:text-primary-ink", compact ? "text-base" : "text-lg"), children: title }),
|
|
7438
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("p", { className: "line-clamp-3 text-sm leading-relaxed text-muted-foreground", children: description }),
|
|
7439
|
+
meta && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "mt-auto pt-2 text-xs text-muted-foreground", children: meta })
|
|
7114
7440
|
] })
|
|
7115
7441
|
]
|
|
7116
7442
|
}
|
|
7117
7443
|
) });
|
|
7118
7444
|
});
|
|
7119
7445
|
|
|
7446
|
+
// src/components/media-card/MediaCard.tsx
|
|
7447
|
+
var React83 = __toESM(require("react"));
|
|
7448
|
+
var import_jsx_runtime85 = require("react/jsx-runtime");
|
|
7449
|
+
var MediaCard = React83.forwardRef(function MediaCard2({
|
|
7450
|
+
title,
|
|
7451
|
+
description,
|
|
7452
|
+
href,
|
|
7453
|
+
cover,
|
|
7454
|
+
meta,
|
|
7455
|
+
chips,
|
|
7456
|
+
footer,
|
|
7457
|
+
layout = "vertical",
|
|
7458
|
+
linkComponent,
|
|
7459
|
+
linkHrefProp = "href",
|
|
7460
|
+
className,
|
|
7461
|
+
...props
|
|
7462
|
+
}, ref) {
|
|
7463
|
+
const Link3 = linkComponent ?? "a";
|
|
7464
|
+
const destination = href ? linkHrefProp === "to" ? { to: href } : { href } : void 0;
|
|
7465
|
+
const row = layout === "row";
|
|
7466
|
+
const body = /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(import_jsx_runtime85.Fragment, { children: [
|
|
7467
|
+
cover && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
7468
|
+
CoverImage,
|
|
7469
|
+
{
|
|
7470
|
+
...cover,
|
|
7471
|
+
className: cn(
|
|
7472
|
+
row ? "w-36 shrink-0 sm:w-44" : "w-full",
|
|
7473
|
+
!row && "rounded-none border-b border-border"
|
|
7474
|
+
)
|
|
7475
|
+
}
|
|
7476
|
+
),
|
|
7477
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: cn("flex min-w-0 flex-1 flex-col gap-2", row ? "p-4" : "p-5"), children: [
|
|
7478
|
+
chips && chips.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "flex flex-wrap gap-1.5", children: chips.map((chip) => /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(Badge, { variant: chip.variant ?? "outline", size: "sm", dot: chip.dot, children: chip.label }, chip.label)) }),
|
|
7479
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("h3", { className: "font-semibold tracking-tight transition-colors group-hover:text-primary-ink", children: title }),
|
|
7480
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "line-clamp-3 text-sm leading-relaxed text-muted-foreground", children: description }),
|
|
7481
|
+
meta && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "text-xs text-muted-foreground", children: meta }),
|
|
7482
|
+
footer && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "mt-auto pt-2 text-xs text-muted-foreground", children: footer })
|
|
7483
|
+
] })
|
|
7484
|
+
] });
|
|
7485
|
+
const cardClass = cn(
|
|
7486
|
+
"group flex h-full overflow-hidden rounded-xl border border-border bg-card shadow-sm transition-colors hover:border-primary/40",
|
|
7487
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
|
|
7488
|
+
row ? "flex-row" : "flex-col",
|
|
7489
|
+
className
|
|
7490
|
+
);
|
|
7491
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("article", { ref, className: "h-full", ...props, children: href && destination ? /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(Link3, { ...destination, className: cardClass, children: body }) : /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: cardClass, children: body }) });
|
|
7492
|
+
});
|
|
7493
|
+
MediaCard.displayName = "MediaCard";
|
|
7494
|
+
|
|
7120
7495
|
// src/components/newsletter/Newsletter.tsx
|
|
7121
|
-
var
|
|
7122
|
-
var
|
|
7123
|
-
var Newsletter =
|
|
7496
|
+
var React84 = __toESM(require("react"));
|
|
7497
|
+
var import_jsx_runtime86 = require("react/jsx-runtime");
|
|
7498
|
+
var Newsletter = React84.forwardRef(function Newsletter2({
|
|
7124
7499
|
title,
|
|
7125
7500
|
description,
|
|
7126
7501
|
placeholder = "you@example.com",
|
|
@@ -7135,9 +7510,9 @@ var Newsletter = React82.forwardRef(function Newsletter2({
|
|
|
7135
7510
|
className,
|
|
7136
7511
|
...props
|
|
7137
7512
|
}, ref) {
|
|
7138
|
-
const id =
|
|
7139
|
-
const [email, setEmail] =
|
|
7140
|
-
const [status, setStatus] =
|
|
7513
|
+
const id = React84.useId();
|
|
7514
|
+
const [email, setEmail] = React84.useState("");
|
|
7515
|
+
const [status, setStatus] = React84.useState("idle");
|
|
7141
7516
|
const Heading2 = `h${level}`;
|
|
7142
7517
|
const handleSubmit = async (event) => {
|
|
7143
7518
|
event.preventDefault();
|
|
@@ -7151,13 +7526,13 @@ var Newsletter = React82.forwardRef(function Newsletter2({
|
|
|
7151
7526
|
setStatus("error");
|
|
7152
7527
|
}
|
|
7153
7528
|
};
|
|
7154
|
-
return /* @__PURE__ */ (0,
|
|
7155
|
-
/* @__PURE__ */ (0,
|
|
7156
|
-
description && /* @__PURE__ */ (0,
|
|
7157
|
-
/* @__PURE__ */ (0,
|
|
7158
|
-
/* @__PURE__ */ (0,
|
|
7159
|
-
/* @__PURE__ */ (0,
|
|
7160
|
-
/* @__PURE__ */ (0,
|
|
7529
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "w-full", children: [
|
|
7530
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(Heading2, { className: "text-2xl font-semibold tracking-tight", children: title }),
|
|
7531
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("p", { className: "mt-2 max-w-2xl text-sm leading-relaxed text-muted-foreground", children: description }),
|
|
7532
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("form", { ref, onSubmit: handleSubmit, className: cn("mt-5", className), ...props, children: [
|
|
7533
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: cn("flex gap-2", layout === "inline" ? "flex-col sm:flex-row" : "flex-col"), children: [
|
|
7534
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("label", { htmlFor: id, className: "sr-only", children: label }),
|
|
7535
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
7161
7536
|
Input,
|
|
7162
7537
|
{
|
|
7163
7538
|
id,
|
|
@@ -7172,44 +7547,44 @@ var Newsletter = React82.forwardRef(function Newsletter2({
|
|
|
7172
7547
|
className: "sm:flex-1"
|
|
7173
7548
|
}
|
|
7174
7549
|
),
|
|
7175
|
-
/* @__PURE__ */ (0,
|
|
7550
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(Button, { type: "submit", loading: status === "loading", className: "shrink-0", children: buttonLabel })
|
|
7176
7551
|
] }),
|
|
7177
|
-
consent && /* @__PURE__ */ (0,
|
|
7178
|
-
/* @__PURE__ */ (0,
|
|
7179
|
-
status === "success" && /* @__PURE__ */ (0,
|
|
7180
|
-
status === "error" && /* @__PURE__ */ (0,
|
|
7552
|
+
consent && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "mt-3 text-xs leading-relaxed text-muted-foreground", children: consent }),
|
|
7553
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { "aria-live": "polite", className: "mt-2 min-h-5 text-sm", children: [
|
|
7554
|
+
status === "success" && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("p", { className: "text-success", children: successMessage }),
|
|
7555
|
+
status === "error" && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("p", { role: "alert", className: "text-destructive", children: errorMessage })
|
|
7181
7556
|
] })
|
|
7182
7557
|
] })
|
|
7183
7558
|
] });
|
|
7184
7559
|
});
|
|
7185
7560
|
|
|
7186
7561
|
// src/components/contact-strip/ContactStrip.tsx
|
|
7187
|
-
var
|
|
7188
|
-
var
|
|
7562
|
+
var React85 = __toESM(require("react"));
|
|
7563
|
+
var import_jsx_runtime87 = require("react/jsx-runtime");
|
|
7189
7564
|
var columnClasses5 = {
|
|
7190
7565
|
2: "sm:grid-cols-2",
|
|
7191
7566
|
3: "sm:grid-cols-3"
|
|
7192
7567
|
};
|
|
7193
|
-
var ContactStrip =
|
|
7568
|
+
var ContactStrip = React85.forwardRef(function ContactStrip2({ items, columns = 2, align = "left", linkComponent, className, ...props }, ref) {
|
|
7194
7569
|
const Link3 = linkComponent ?? "a";
|
|
7195
|
-
return /* @__PURE__ */ (0,
|
|
7196
|
-
item.icon && /* @__PURE__ */ (0,
|
|
7197
|
-
/* @__PURE__ */ (0,
|
|
7198
|
-
/* @__PURE__ */ (0,
|
|
7199
|
-
item.href ? /* @__PURE__ */ (0,
|
|
7570
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("ul", { ref, className: cn("grid gap-6", columnClasses5[columns], className), ...props, children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("li", { className: cn("flex min-w-0 items-start gap-3", align === "center" && "justify-center text-center"), children: [
|
|
7571
|
+
item.icon && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { className: "mt-0.5 flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-primary/10 text-primary-ink [&_svg]:size-4", children: item.icon }),
|
|
7572
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "min-w-0", children: [
|
|
7573
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("p", { className: "text-xs font-semibold uppercase tracking-wider text-muted-foreground", children: item.label }),
|
|
7574
|
+
item.href ? /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(Link3, { href: item.href, className: "mt-0.5 block break-words text-sm font-medium text-primary-ink underline-offset-4 hover:underline", children: item.value }) : /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("p", { className: "mt-0.5 break-words text-sm font-medium", children: item.value })
|
|
7200
7575
|
] })
|
|
7201
7576
|
] }, item.label)) });
|
|
7202
7577
|
});
|
|
7203
7578
|
|
|
7204
7579
|
// src/components/announcement-bar/AnnouncementBar.tsx
|
|
7205
|
-
var
|
|
7206
|
-
var
|
|
7580
|
+
var React86 = __toESM(require("react"));
|
|
7581
|
+
var import_jsx_runtime88 = require("react/jsx-runtime");
|
|
7207
7582
|
var toneClasses3 = {
|
|
7208
7583
|
muted: "bg-muted text-foreground",
|
|
7209
7584
|
brand: "bg-primary text-primary-foreground",
|
|
7210
7585
|
inverse: "bg-inverse text-inverse-foreground"
|
|
7211
7586
|
};
|
|
7212
|
-
var AnnouncementBar =
|
|
7587
|
+
var AnnouncementBar = React86.forwardRef(
|
|
7213
7588
|
function AnnouncementBar2({
|
|
7214
7589
|
message,
|
|
7215
7590
|
href,
|
|
@@ -7222,14 +7597,14 @@ var AnnouncementBar = React84.forwardRef(
|
|
|
7222
7597
|
className,
|
|
7223
7598
|
...props
|
|
7224
7599
|
}, ref) {
|
|
7225
|
-
const [dismissed, setDismissed] =
|
|
7600
|
+
const [dismissed, setDismissed] = React86.useState(false);
|
|
7226
7601
|
const Link3 = linkComponent ?? "a";
|
|
7227
7602
|
if (dismissed) return null;
|
|
7228
7603
|
const dismiss2 = () => {
|
|
7229
7604
|
setDismissed(true);
|
|
7230
7605
|
onDismiss?.();
|
|
7231
7606
|
};
|
|
7232
|
-
return /* @__PURE__ */ (0,
|
|
7607
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
7233
7608
|
"div",
|
|
7234
7609
|
{
|
|
7235
7610
|
ref,
|
|
@@ -7242,9 +7617,9 @@ var AnnouncementBar = React84.forwardRef(
|
|
|
7242
7617
|
className
|
|
7243
7618
|
),
|
|
7244
7619
|
...props,
|
|
7245
|
-
children: /* @__PURE__ */ (0,
|
|
7246
|
-
/* @__PURE__ */ (0,
|
|
7247
|
-
href && actionLabel && /* @__PURE__ */ (0,
|
|
7620
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("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: [
|
|
7621
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)("p", { className: "min-w-0 text-center", children: message }),
|
|
7622
|
+
href && actionLabel && /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
7248
7623
|
Link3,
|
|
7249
7624
|
{
|
|
7250
7625
|
href,
|
|
@@ -7252,14 +7627,14 @@ var AnnouncementBar = React84.forwardRef(
|
|
|
7252
7627
|
children: actionLabel
|
|
7253
7628
|
}
|
|
7254
7629
|
),
|
|
7255
|
-
dismissible && /* @__PURE__ */ (0,
|
|
7630
|
+
dismissible && /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
7256
7631
|
"button",
|
|
7257
7632
|
{
|
|
7258
7633
|
type: "button",
|
|
7259
7634
|
onClick: dismiss2,
|
|
7260
7635
|
"aria-label": "Dismiss announcement",
|
|
7261
7636
|
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",
|
|
7262
|
-
children: /* @__PURE__ */ (0,
|
|
7637
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("svg", { "aria-hidden": "true", viewBox: "0 0 20 20", className: "h-4 w-4", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("path", { d: "m5 5 10 10M15 5 5 15" }) })
|
|
7263
7638
|
}
|
|
7264
7639
|
)
|
|
7265
7640
|
] })
|
|
@@ -7269,15 +7644,15 @@ var AnnouncementBar = React84.forwardRef(
|
|
|
7269
7644
|
);
|
|
7270
7645
|
|
|
7271
7646
|
// src/components/deal-card/DealCard.tsx
|
|
7272
|
-
var
|
|
7273
|
-
var
|
|
7647
|
+
var React87 = __toESM(require("react"));
|
|
7648
|
+
var import_jsx_runtime89 = require("react/jsx-runtime");
|
|
7274
7649
|
var statusConfig = {
|
|
7275
7650
|
available: { label: "Available", variant: "success" },
|
|
7276
7651
|
"under-nda": { label: "Under NDA", variant: "info" },
|
|
7277
7652
|
closed: { label: "Closed", variant: "secondary" },
|
|
7278
7653
|
draft: { label: "Draft", variant: "outline" }
|
|
7279
7654
|
};
|
|
7280
|
-
var DealCard =
|
|
7655
|
+
var DealCard = React87.forwardRef(function DealCard2({
|
|
7281
7656
|
title,
|
|
7282
7657
|
sector,
|
|
7283
7658
|
location,
|
|
@@ -7298,29 +7673,29 @@ var DealCard = React85.forwardRef(function DealCard2({
|
|
|
7298
7673
|
}, ref) {
|
|
7299
7674
|
const Link3 = linkComponent ?? "a";
|
|
7300
7675
|
const statusInfo = statusConfig[status];
|
|
7301
|
-
return /* @__PURE__ */ (0,
|
|
7302
|
-
/* @__PURE__ */ (0,
|
|
7303
|
-
/* @__PURE__ */ (0,
|
|
7304
|
-
/* @__PURE__ */ (0,
|
|
7305
|
-
/* @__PURE__ */ (0,
|
|
7676
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(Card, { ref, className: cn("flex h-full flex-col overflow-hidden", className), ...props, children: [
|
|
7677
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(CardHeader, { className: "gap-2 p-5 pb-3", children: [
|
|
7678
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { className: "flex items-start justify-between gap-2", children: [
|
|
7679
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)("p", { className: "text-xs font-semibold uppercase tracking-widest text-primary-ink", children: sector }),
|
|
7680
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)(Badge, { variant: statusInfo.variant, children: statusInfo.label })
|
|
7306
7681
|
] }),
|
|
7307
|
-
/* @__PURE__ */ (0,
|
|
7308
|
-
location && /* @__PURE__ */ (0,
|
|
7682
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)("h3", { className: "text-lg font-semibold leading-snug tracking-tight", children: href ? /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(Link3, { href, className: "rounded-sm hover:text-primary-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", children: title }) : title }),
|
|
7683
|
+
location && /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("p", { className: "text-xs text-muted-foreground", children: location })
|
|
7309
7684
|
] }),
|
|
7310
|
-
/* @__PURE__ */ (0,
|
|
7311
|
-
description && /* @__PURE__ */ (0,
|
|
7312
|
-
/* @__PURE__ */ (0,
|
|
7313
|
-
/* @__PURE__ */ (0,
|
|
7314
|
-
/* @__PURE__ */ (0,
|
|
7685
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(CardContent, { className: "flex-1 px-5 pb-3", children: [
|
|
7686
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("p", { className: "line-clamp-2 text-sm leading-relaxed text-muted-foreground", children: description }),
|
|
7687
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)("dl", { className: "mt-4 grid grid-cols-3 gap-3", children: metrics.map((metric) => /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { className: "min-w-0", children: [
|
|
7688
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)("dt", { className: "text-xs text-muted-foreground", children: metric.label }),
|
|
7689
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)("dd", { className: "mt-0.5 truncate text-sm font-semibold tabular-nums", children: metric.value })
|
|
7315
7690
|
] }, metric.label)) }),
|
|
7316
|
-
(ndaAvailable || cimAvailable) && /* @__PURE__ */ (0,
|
|
7317
|
-
ndaAvailable && /* @__PURE__ */ (0,
|
|
7318
|
-
cimAvailable && /* @__PURE__ */ (0,
|
|
7691
|
+
(ndaAvailable || cimAvailable) && /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { className: "mt-4 flex flex-wrap gap-1.5", children: [
|
|
7692
|
+
ndaAvailable && /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(Badge, { variant: "info", children: "NDA available" }),
|
|
7693
|
+
cimAvailable && /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(Badge, { variant: "secondary", children: "CIM available" })
|
|
7319
7694
|
] })
|
|
7320
7695
|
] }),
|
|
7321
|
-
/* @__PURE__ */ (0,
|
|
7322
|
-
onRequestAccess && /* @__PURE__ */ (0,
|
|
7323
|
-
onSave && /* @__PURE__ */ (0,
|
|
7696
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(CardFooter, { className: "flex flex-wrap items-center gap-2 border-t border-border px-5 py-3", children: [
|
|
7697
|
+
onRequestAccess && /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(Button, { type: "button", size: "sm", onClick: onRequestAccess, children: requestLabel }),
|
|
7698
|
+
onSave && /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
7324
7699
|
Button,
|
|
7325
7700
|
{
|
|
7326
7701
|
type: "button",
|
|
@@ -7337,12 +7712,12 @@ var DealCard = React85.forwardRef(function DealCard2({
|
|
|
7337
7712
|
});
|
|
7338
7713
|
|
|
7339
7714
|
// src/components/entity-card/EntityCard.tsx
|
|
7340
|
-
var
|
|
7341
|
-
var
|
|
7715
|
+
var React88 = __toESM(require("react"));
|
|
7716
|
+
var import_jsx_runtime90 = require("react/jsx-runtime");
|
|
7342
7717
|
function initials(name) {
|
|
7343
7718
|
return name.split(/\s+/).filter(Boolean).slice(0, 2).map((part) => part[0]?.toUpperCase() ?? "").join("");
|
|
7344
7719
|
}
|
|
7345
|
-
var EntityCard =
|
|
7720
|
+
var EntityCard = React88.forwardRef(function EntityCard2({
|
|
7346
7721
|
name,
|
|
7347
7722
|
entityType,
|
|
7348
7723
|
location,
|
|
@@ -7360,11 +7735,11 @@ var EntityCard = React86.forwardRef(function EntityCard2({
|
|
|
7360
7735
|
const Link3 = linkComponent ?? "a";
|
|
7361
7736
|
const stretched = Boolean(cardHref);
|
|
7362
7737
|
const nameHref = cardHref ?? href;
|
|
7363
|
-
return /* @__PURE__ */ (0,
|
|
7364
|
-
/* @__PURE__ */ (0,
|
|
7365
|
-
/* @__PURE__ */ (0,
|
|
7366
|
-
/* @__PURE__ */ (0,
|
|
7367
|
-
/* @__PURE__ */ (0,
|
|
7738
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(Card, { ref, className: cn("flex h-full flex-col", stretched && "relative isolate", className), ...props, children: [
|
|
7739
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(CardHeader, { className: "flex-row items-start gap-3 p-5 pb-3", children: [
|
|
7740
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { className: "shrink-0", children: logo ?? /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(Avatar, { children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(AvatarFallback, { children: initials(name) }) }) }),
|
|
7741
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
7742
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)("h3", { className: "truncate text-base font-semibold tracking-tight", children: nameHref ? /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
7368
7743
|
Link3,
|
|
7369
7744
|
{
|
|
7370
7745
|
href: nameHref,
|
|
@@ -7375,20 +7750,20 @@ var EntityCard = React86.forwardRef(function EntityCard2({
|
|
|
7375
7750
|
children: name
|
|
7376
7751
|
}
|
|
7377
7752
|
) : name }),
|
|
7378
|
-
/* @__PURE__ */ (0,
|
|
7379
|
-
location && /* @__PURE__ */ (0,
|
|
7753
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)("p", { className: "mt-0.5 truncate text-xs text-muted-foreground", children: entityType }),
|
|
7754
|
+
location && /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("p", { className: "mt-0.5 truncate text-xs text-muted-foreground", children: location })
|
|
7380
7755
|
] })
|
|
7381
7756
|
] }),
|
|
7382
|
-
/* @__PURE__ */ (0,
|
|
7383
|
-
description && /* @__PURE__ */ (0,
|
|
7384
|
-
tags && tags.length > 0 && /* @__PURE__ */ (0,
|
|
7385
|
-
stats && stats.length > 0 && /* @__PURE__ */ (0,
|
|
7386
|
-
/* @__PURE__ */ (0,
|
|
7387
|
-
/* @__PURE__ */ (0,
|
|
7757
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(CardContent, { className: "flex-1 px-5 pb-3", children: [
|
|
7758
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("p", { className: "line-clamp-3 text-sm leading-relaxed text-muted-foreground", children: description }),
|
|
7759
|
+
tags && tags.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { className: "mt-3 flex flex-wrap gap-1.5", children: tags.map((tag) => /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(Badge, { variant: "secondary", children: tag }, tag)) }),
|
|
7760
|
+
stats && stats.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("dl", { className: "mt-4 grid grid-cols-2 gap-3", children: stats.map((stat) => /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: "min-w-0", children: [
|
|
7761
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)("dt", { className: "text-xs text-muted-foreground", children: stat.label }),
|
|
7762
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)("dd", { className: "mt-0.5 truncate text-sm font-semibold tabular-nums", children: stat.value })
|
|
7388
7763
|
] }, stat.label)) })
|
|
7389
7764
|
] }),
|
|
7390
|
-
(href && !stretched || actions) && /* @__PURE__ */ (0,
|
|
7391
|
-
href && !stretched && /* @__PURE__ */ (0,
|
|
7765
|
+
(href && !stretched || actions) && /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(CardFooter, { className: cn("flex flex-wrap items-center gap-2 border-t border-border px-5 py-3", stretched && "relative z-10"), children: [
|
|
7766
|
+
href && !stretched && /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
7392
7767
|
Link3,
|
|
7393
7768
|
{
|
|
7394
7769
|
href,
|
|
@@ -7396,21 +7771,21 @@ var EntityCard = React86.forwardRef(function EntityCard2({
|
|
|
7396
7771
|
children: "View profile"
|
|
7397
7772
|
}
|
|
7398
7773
|
),
|
|
7399
|
-
actions && /* @__PURE__ */ (0,
|
|
7774
|
+
actions && /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { className: "ml-auto flex items-center gap-2", children: actions })
|
|
7400
7775
|
] })
|
|
7401
7776
|
] });
|
|
7402
7777
|
});
|
|
7403
7778
|
var ProfileCard = EntityCard;
|
|
7404
7779
|
|
|
7405
7780
|
// src/components/tombstone-card/TombstoneCard.tsx
|
|
7406
|
-
var
|
|
7407
|
-
var
|
|
7781
|
+
var React89 = __toESM(require("react"));
|
|
7782
|
+
var import_jsx_runtime91 = require("react/jsx-runtime");
|
|
7408
7783
|
var statusConfig2 = {
|
|
7409
7784
|
archived: { label: "Archived", variant: "secondary" },
|
|
7410
7785
|
unavailable: { label: "Unavailable", variant: "warning" },
|
|
7411
7786
|
closed: { label: "Closed", variant: "outline" }
|
|
7412
7787
|
};
|
|
7413
|
-
var TombstoneCard =
|
|
7788
|
+
var TombstoneCard = React89.forwardRef(function TombstoneCard2({
|
|
7414
7789
|
title,
|
|
7415
7790
|
reason,
|
|
7416
7791
|
status = "unavailable",
|
|
@@ -7423,20 +7798,20 @@ var TombstoneCard = React87.forwardRef(function TombstoneCard2({
|
|
|
7423
7798
|
}, ref) {
|
|
7424
7799
|
const Link3 = linkComponent ?? "a";
|
|
7425
7800
|
const statusInfo = statusConfig2[status];
|
|
7426
|
-
return /* @__PURE__ */ (0,
|
|
7801
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
7427
7802
|
Card,
|
|
7428
7803
|
{
|
|
7429
7804
|
ref,
|
|
7430
7805
|
className: cn("flex h-full flex-col border-dashed bg-muted/30 shadow-none", className),
|
|
7431
7806
|
...props,
|
|
7432
|
-
children: /* @__PURE__ */ (0,
|
|
7433
|
-
/* @__PURE__ */ (0,
|
|
7434
|
-
logo && /* @__PURE__ */ (0,
|
|
7435
|
-
/* @__PURE__ */ (0,
|
|
7807
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(CardContent, { className: "flex flex-1 flex-col gap-3 p-5", children: [
|
|
7808
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "flex items-start justify-between gap-2", children: [
|
|
7809
|
+
logo && /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: "min-w-0 opacity-70", children: logo }),
|
|
7810
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(Badge, { variant: statusInfo.variant, children: statusInfo.label })
|
|
7436
7811
|
] }),
|
|
7437
|
-
/* @__PURE__ */ (0,
|
|
7438
|
-
reason && /* @__PURE__ */ (0,
|
|
7439
|
-
href && /* @__PURE__ */ (0,
|
|
7812
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("h3", { className: "text-base font-semibold tracking-tight text-foreground/80", children: title }),
|
|
7813
|
+
reason && /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("p", { className: "text-sm leading-relaxed text-muted-foreground", children: reason }),
|
|
7814
|
+
href && /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
7440
7815
|
Link3,
|
|
7441
7816
|
{
|
|
7442
7817
|
href,
|
|
@@ -7450,14 +7825,14 @@ var TombstoneCard = React87.forwardRef(function TombstoneCard2({
|
|
|
7450
7825
|
});
|
|
7451
7826
|
|
|
7452
7827
|
// src/components/document-card/DocumentCard.tsx
|
|
7453
|
-
var
|
|
7454
|
-
var
|
|
7828
|
+
var React90 = __toESM(require("react"));
|
|
7829
|
+
var import_jsx_runtime92 = require("react/jsx-runtime");
|
|
7455
7830
|
var statusConfig3 = {
|
|
7456
7831
|
available: { label: "Available", variant: "success" },
|
|
7457
7832
|
restricted: { label: "Restricted", variant: "warning" },
|
|
7458
7833
|
pending: { label: "Pending", variant: "info" }
|
|
7459
7834
|
};
|
|
7460
|
-
var DocumentCard =
|
|
7835
|
+
var DocumentCard = React90.forwardRef(function DocumentCard2({
|
|
7461
7836
|
name,
|
|
7462
7837
|
fileType,
|
|
7463
7838
|
size,
|
|
@@ -7471,14 +7846,14 @@ var DocumentCard = React88.forwardRef(function DocumentCard2({
|
|
|
7471
7846
|
}, ref) {
|
|
7472
7847
|
const statusInfo = statusConfig3[status];
|
|
7473
7848
|
const meta = [fileType, size, updatedAt].filter(Boolean).join(" \xB7 ");
|
|
7474
|
-
return /* @__PURE__ */ (0,
|
|
7475
|
-
/* @__PURE__ */ (0,
|
|
7476
|
-
/* @__PURE__ */ (0,
|
|
7477
|
-
/* @__PURE__ */ (0,
|
|
7478
|
-
meta && /* @__PURE__ */ (0,
|
|
7849
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Card, { ref, className: cn("w-full", className), ...props, children: /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(CardContent, { className: "flex items-center gap-3 p-4", children: [
|
|
7850
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)("span", { className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-primary/10 text-primary-ink [&_svg]:size-5", children: icon ?? /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("span", { className: "text-[10px] font-bold uppercase tracking-wide", children: fileType }) }),
|
|
7851
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
7852
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)("p", { className: "truncate text-sm font-medium", children: name }),
|
|
7853
|
+
meta && /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("p", { className: "mt-0.5 truncate text-xs text-muted-foreground", children: meta })
|
|
7479
7854
|
] }),
|
|
7480
|
-
/* @__PURE__ */ (0,
|
|
7481
|
-
onDownload && /* @__PURE__ */ (0,
|
|
7855
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Badge, { variant: statusInfo.variant, children: statusInfo.label }),
|
|
7856
|
+
onDownload && /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
7482
7857
|
Button,
|
|
7483
7858
|
{
|
|
7484
7859
|
type: "button",
|
|
@@ -7494,9 +7869,9 @@ var DocumentCard = React88.forwardRef(function DocumentCard2({
|
|
|
7494
7869
|
});
|
|
7495
7870
|
|
|
7496
7871
|
// src/components/load-more/LoadMore.tsx
|
|
7497
|
-
var
|
|
7498
|
-
var
|
|
7499
|
-
var LoadMore =
|
|
7872
|
+
var React91 = __toESM(require("react"));
|
|
7873
|
+
var import_jsx_runtime93 = require("react/jsx-runtime");
|
|
7874
|
+
var LoadMore = React91.forwardRef(function LoadMore2({
|
|
7500
7875
|
hasMore,
|
|
7501
7876
|
onLoadMore,
|
|
7502
7877
|
loading = false,
|
|
@@ -7506,18 +7881,25 @@ var LoadMore = React89.forwardRef(function LoadMore2({
|
|
|
7506
7881
|
className,
|
|
7507
7882
|
...props
|
|
7508
7883
|
}, ref) {
|
|
7509
|
-
return /* @__PURE__ */ (0,
|
|
7884
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { ref, "aria-live": "polite", className: cn("flex w-full justify-center py-4", className), ...props, children: hasMore ? /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Button, { type: "button", variant: "outline", onClick: onLoadMore, loading, children: loading ? loadingLabel : loadLabel }) : /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("p", { role: "status", className: "text-sm text-muted-foreground", children: endLabel }) });
|
|
7510
7885
|
});
|
|
7511
7886
|
|
|
7512
7887
|
// src/components/segmented-control/SegmentedControl.tsx
|
|
7513
|
-
var
|
|
7514
|
-
var
|
|
7888
|
+
var React92 = __toESM(require("react"));
|
|
7889
|
+
var import_jsx_runtime94 = require("react/jsx-runtime");
|
|
7515
7890
|
var sizeClasses10 = {
|
|
7516
7891
|
sm: "h-8 px-2.5 text-xs",
|
|
7517
7892
|
md: "h-9 px-3 text-sm",
|
|
7518
7893
|
lg: "h-10 px-4 text-sm"
|
|
7519
7894
|
};
|
|
7520
|
-
var
|
|
7895
|
+
var fullWidthBreakpoints = {
|
|
7896
|
+
sm: "max-sm",
|
|
7897
|
+
md: "max-md",
|
|
7898
|
+
lg: "max-lg",
|
|
7899
|
+
xl: "max-xl",
|
|
7900
|
+
"2xl": "max-2xl"
|
|
7901
|
+
};
|
|
7902
|
+
var SegmentedControl = React92.forwardRef(
|
|
7521
7903
|
function SegmentedControl2({
|
|
7522
7904
|
options,
|
|
7523
7905
|
value,
|
|
@@ -7533,15 +7915,16 @@ var SegmentedControl = React90.forwardRef(
|
|
|
7533
7915
|
...props
|
|
7534
7916
|
}, ref) {
|
|
7535
7917
|
const isControlled = value !== void 0;
|
|
7536
|
-
const [internal, setInternal] =
|
|
7918
|
+
const [internal, setInternal] = React92.useState(
|
|
7537
7919
|
() => multiple ? Array.isArray(defaultValue) ? defaultValue : [] : typeof defaultValue === "string" ? defaultValue : ""
|
|
7538
7920
|
);
|
|
7539
7921
|
const current = isControlled ? value : internal;
|
|
7540
7922
|
const selected = multiple ? Array.isArray(current) ? current : [] : typeof current === "string" ? current : "";
|
|
7923
|
+
const fullWidthBelow = typeof fullWidth === "string" ? fullWidthBreakpoints[fullWidth] : null;
|
|
7541
7924
|
const linkMode = options.some((option) => option.href !== void 0);
|
|
7542
7925
|
const LinkEl = linkComponent ?? "a";
|
|
7543
7926
|
const destination = (href) => linkHrefProp === "to" ? { to: href } : { href };
|
|
7544
|
-
const refs =
|
|
7927
|
+
const refs = React92.useRef([]);
|
|
7545
7928
|
const commit = (next) => {
|
|
7546
7929
|
if (!isControlled) setInternal(next);
|
|
7547
7930
|
onValueChange?.(next);
|
|
@@ -7591,7 +7974,7 @@ var SegmentedControl = React90.forwardRef(
|
|
|
7591
7974
|
moveFocus("last");
|
|
7592
7975
|
}
|
|
7593
7976
|
};
|
|
7594
|
-
return /* @__PURE__ */ (0,
|
|
7977
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
7595
7978
|
"div",
|
|
7596
7979
|
{
|
|
7597
7980
|
ref,
|
|
@@ -7599,7 +7982,8 @@ var SegmentedControl = React90.forwardRef(
|
|
|
7599
7982
|
"aria-label": ariaLabel,
|
|
7600
7983
|
className: cn(
|
|
7601
7984
|
"inline-flex items-center gap-1 rounded-lg border border-border bg-muted p-1",
|
|
7602
|
-
fullWidth && "flex w-full",
|
|
7985
|
+
fullWidth === true && "flex w-full",
|
|
7986
|
+
fullWidthBelow && `${fullWidthBelow}:flex ${fullWidthBelow}:w-full`,
|
|
7603
7987
|
className
|
|
7604
7988
|
),
|
|
7605
7989
|
...props,
|
|
@@ -7612,37 +7996,41 @@ var SegmentedControl = React90.forwardRef(
|
|
|
7612
7996
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
|
|
7613
7997
|
"disabled:pointer-events-none disabled:opacity-50",
|
|
7614
7998
|
sizeClasses10[size],
|
|
7615
|
-
fullWidth && "flex-1",
|
|
7999
|
+
fullWidth === true && "flex-1",
|
|
8000
|
+
fullWidthBelow && `${fullWidthBelow}:flex-1`,
|
|
7616
8001
|
active ? "bg-background text-foreground shadow-sm" : "text-muted-foreground hover:text-foreground"
|
|
7617
8002
|
);
|
|
7618
|
-
const segmentContent = /* @__PURE__ */ (0,
|
|
7619
|
-
option.icon && /* @__PURE__ */ (0,
|
|
7620
|
-
/* @__PURE__ */ (0,
|
|
8003
|
+
const segmentContent = /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(import_jsx_runtime94.Fragment, { children: [
|
|
8004
|
+
option.icon && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("span", { className: "shrink-0 [&_svg]:size-4", children: option.icon }),
|
|
8005
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("span", { className: "truncate", children: option.label }),
|
|
8006
|
+
option.hint && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("span", { "aria-hidden": "true", className: "shrink-0 text-[10px] font-normal text-muted-foreground/70", children: option.hint })
|
|
7621
8007
|
] });
|
|
7622
8008
|
if (option.href !== void 0) {
|
|
7623
8009
|
if (option.disabled || active) {
|
|
7624
|
-
return /* @__PURE__ */ (0,
|
|
8010
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
7625
8011
|
"span",
|
|
7626
8012
|
{
|
|
7627
8013
|
"aria-current": active ? "page" : void 0,
|
|
7628
8014
|
"aria-disabled": option.disabled || void 0,
|
|
8015
|
+
"aria-description": option.hint,
|
|
7629
8016
|
className: cn(segmentClass, option.disabled && "opacity-50"),
|
|
7630
8017
|
children: segmentContent
|
|
7631
8018
|
},
|
|
7632
8019
|
option.value
|
|
7633
8020
|
);
|
|
7634
8021
|
}
|
|
7635
|
-
return /* @__PURE__ */ (0,
|
|
8022
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
7636
8023
|
LinkEl,
|
|
7637
8024
|
{
|
|
7638
8025
|
...destination(option.href),
|
|
8026
|
+
"aria-description": option.hint,
|
|
7639
8027
|
className: segmentClass,
|
|
7640
8028
|
children: segmentContent
|
|
7641
8029
|
},
|
|
7642
8030
|
option.value
|
|
7643
8031
|
);
|
|
7644
8032
|
}
|
|
7645
|
-
return /* @__PURE__ */ (0,
|
|
8033
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
7646
8034
|
"button",
|
|
7647
8035
|
{
|
|
7648
8036
|
ref: (node) => {
|
|
@@ -7653,6 +8041,7 @@ var SegmentedControl = React90.forwardRef(
|
|
|
7653
8041
|
"aria-checked": multiple || linkMode ? void 0 : active,
|
|
7654
8042
|
"aria-pressed": multiple ? active : void 0,
|
|
7655
8043
|
"aria-current": linkMode && active ? "page" : void 0,
|
|
8044
|
+
"aria-description": option.hint,
|
|
7656
8045
|
disabled: option.disabled,
|
|
7657
8046
|
tabIndex: focusable ? 0 : -1,
|
|
7658
8047
|
onClick: () => select(option),
|
|
@@ -7669,8 +8058,8 @@ var SegmentedControl = React90.forwardRef(
|
|
|
7669
8058
|
);
|
|
7670
8059
|
|
|
7671
8060
|
// src/components/range-slider/RangeSlider.tsx
|
|
7672
|
-
var
|
|
7673
|
-
var
|
|
8061
|
+
var React93 = __toESM(require("react"));
|
|
8062
|
+
var import_jsx_runtime95 = require("react/jsx-runtime");
|
|
7674
8063
|
var rangeInputClass = cn(
|
|
7675
8064
|
"pointer-events-none absolute inset-x-0 top-1/2 h-6 w-full -translate-y-1/2 appearance-none bg-transparent",
|
|
7676
8065
|
"[&::-webkit-slider-runnable-track]:h-1 [&::-webkit-slider-runnable-track]:rounded-full [&::-webkit-slider-runnable-track]:bg-transparent",
|
|
@@ -7680,7 +8069,7 @@ var rangeInputClass = cn(
|
|
|
7680
8069
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
|
|
7681
8070
|
"disabled:cursor-not-allowed disabled:opacity-50"
|
|
7682
8071
|
);
|
|
7683
|
-
var RangeSlider =
|
|
8072
|
+
var RangeSlider = React93.forwardRef(function RangeSlider2({
|
|
7684
8073
|
value,
|
|
7685
8074
|
defaultValue,
|
|
7686
8075
|
onValueChange,
|
|
@@ -7696,7 +8085,7 @@ var RangeSlider = React91.forwardRef(function RangeSlider2({
|
|
|
7696
8085
|
...props
|
|
7697
8086
|
}, ref) {
|
|
7698
8087
|
const clamp2 = (entry) => Math.min(Math.max(entry, min), max);
|
|
7699
|
-
const [internal, setInternal] =
|
|
8088
|
+
const [internal, setInternal] = React93.useState(() => {
|
|
7700
8089
|
const initial = defaultValue ?? [min, max];
|
|
7701
8090
|
return [clamp2(initial[0]), clamp2(initial[1])];
|
|
7702
8091
|
});
|
|
@@ -7710,21 +8099,21 @@ var RangeSlider = React91.forwardRef(function RangeSlider2({
|
|
|
7710
8099
|
const span = max - min || 1;
|
|
7711
8100
|
const lowPercent = (low - min) / span * 100;
|
|
7712
8101
|
const highPercent = (high - min) / span * 100;
|
|
7713
|
-
return /* @__PURE__ */ (0,
|
|
7714
|
-
showValues && /* @__PURE__ */ (0,
|
|
7715
|
-
/* @__PURE__ */ (0,
|
|
7716
|
-
/* @__PURE__ */ (0,
|
|
8102
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { ref, className: cn("w-full", className), ...props, children: [
|
|
8103
|
+
showValues && /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: "mb-2 flex items-center justify-between text-sm font-medium tabular-nums", children: [
|
|
8104
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("span", { children: formatValue(low) }),
|
|
8105
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("span", { children: formatValue(high) })
|
|
7717
8106
|
] }),
|
|
7718
|
-
/* @__PURE__ */ (0,
|
|
7719
|
-
/* @__PURE__ */ (0,
|
|
7720
|
-
/* @__PURE__ */ (0,
|
|
8107
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: "relative h-6 w-full", children: [
|
|
8108
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: "absolute inset-x-0 top-1/2 h-1 -translate-y-1/2 rounded-full bg-border" }),
|
|
8109
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
7721
8110
|
"div",
|
|
7722
8111
|
{
|
|
7723
8112
|
className: "absolute top-1/2 h-1 -translate-y-1/2 rounded-full bg-primary",
|
|
7724
8113
|
style: { left: `${lowPercent}%`, right: `${100 - highPercent}%` }
|
|
7725
8114
|
}
|
|
7726
8115
|
),
|
|
7727
|
-
/* @__PURE__ */ (0,
|
|
8116
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
7728
8117
|
"input",
|
|
7729
8118
|
{
|
|
7730
8119
|
type: "range",
|
|
@@ -7739,7 +8128,7 @@ var RangeSlider = React91.forwardRef(function RangeSlider2({
|
|
|
7739
8128
|
className: cn(rangeInputClass, "z-10")
|
|
7740
8129
|
}
|
|
7741
8130
|
),
|
|
7742
|
-
/* @__PURE__ */ (0,
|
|
8131
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
7743
8132
|
"input",
|
|
7744
8133
|
{
|
|
7745
8134
|
type: "range",
|
|
@@ -7759,8 +8148,8 @@ var RangeSlider = React91.forwardRef(function RangeSlider2({
|
|
|
7759
8148
|
});
|
|
7760
8149
|
|
|
7761
8150
|
// src/components/filter-chips/FilterChips.tsx
|
|
7762
|
-
var
|
|
7763
|
-
var
|
|
8151
|
+
var React94 = __toESM(require("react"));
|
|
8152
|
+
var import_jsx_runtime96 = require("react/jsx-runtime");
|
|
7764
8153
|
var CHIP_SIZES = {
|
|
7765
8154
|
sm: {
|
|
7766
8155
|
chip: "gap-1 py-0.5 pl-2.5 pr-0.5 text-xs",
|
|
@@ -7781,7 +8170,7 @@ var CHIP_SIZES = {
|
|
|
7781
8170
|
clear: "text-base"
|
|
7782
8171
|
}
|
|
7783
8172
|
};
|
|
7784
|
-
var FilterChips =
|
|
8173
|
+
var FilterChips = React94.forwardRef(function FilterChips2({
|
|
7785
8174
|
filters,
|
|
7786
8175
|
size = "md",
|
|
7787
8176
|
onClearAll,
|
|
@@ -7792,10 +8181,10 @@ var FilterChips = React92.forwardRef(function FilterChips2({
|
|
|
7792
8181
|
...props
|
|
7793
8182
|
}, ref) {
|
|
7794
8183
|
if (filters.length === 0) {
|
|
7795
|
-
return emptyLabel ? /* @__PURE__ */ (0,
|
|
8184
|
+
return emptyLabel ? /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { ref, className: cn("text-sm text-muted-foreground", className), ...props, children: emptyLabel }) : null;
|
|
7796
8185
|
}
|
|
7797
8186
|
const scale = CHIP_SIZES[size];
|
|
7798
|
-
return /* @__PURE__ */ (0,
|
|
8187
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(
|
|
7799
8188
|
"div",
|
|
7800
8189
|
{
|
|
7801
8190
|
ref,
|
|
@@ -7804,7 +8193,7 @@ var FilterChips = React92.forwardRef(function FilterChips2({
|
|
|
7804
8193
|
className: cn("flex flex-wrap items-center gap-2", className),
|
|
7805
8194
|
...props,
|
|
7806
8195
|
children: [
|
|
7807
|
-
filters.map((filter) => /* @__PURE__ */ (0,
|
|
8196
|
+
filters.map((filter) => /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(
|
|
7808
8197
|
"span",
|
|
7809
8198
|
{
|
|
7810
8199
|
className: cn(
|
|
@@ -7812,15 +8201,15 @@ var FilterChips = React92.forwardRef(function FilterChips2({
|
|
|
7812
8201
|
scale.chip
|
|
7813
8202
|
),
|
|
7814
8203
|
children: [
|
|
7815
|
-
/* @__PURE__ */ (0,
|
|
7816
|
-
/* @__PURE__ */ (0,
|
|
8204
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("span", { className: "truncate", children: [
|
|
8205
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("span", { className: "text-muted-foreground", children: [
|
|
7817
8206
|
filter.label,
|
|
7818
8207
|
":"
|
|
7819
8208
|
] }),
|
|
7820
8209
|
" ",
|
|
7821
|
-
/* @__PURE__ */ (0,
|
|
8210
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)("span", { className: "font-medium", children: filter.value ?? "Any" })
|
|
7822
8211
|
] }),
|
|
7823
|
-
filter.onRemove && /* @__PURE__ */ (0,
|
|
8212
|
+
filter.onRemove && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
7824
8213
|
"button",
|
|
7825
8214
|
{
|
|
7826
8215
|
type: "button",
|
|
@@ -7830,14 +8219,14 @@ var FilterChips = React92.forwardRef(function FilterChips2({
|
|
|
7830
8219
|
"rounded-full text-muted-foreground transition-colors hover:bg-background hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
7831
8220
|
scale.remove
|
|
7832
8221
|
),
|
|
7833
|
-
children: /* @__PURE__ */ (0,
|
|
8222
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("svg", { "aria-hidden": "true", viewBox: "0 0 20 20", className: scale.icon, fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("path", { d: "m5 5 10 10M15 5 5 15" }) })
|
|
7834
8223
|
}
|
|
7835
8224
|
)
|
|
7836
8225
|
]
|
|
7837
8226
|
},
|
|
7838
8227
|
filter.key
|
|
7839
8228
|
)),
|
|
7840
|
-
onClearAll && /* @__PURE__ */ (0,
|
|
8229
|
+
onClearAll && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
7841
8230
|
"button",
|
|
7842
8231
|
{
|
|
7843
8232
|
type: "button",
|
|
@@ -7855,9 +8244,9 @@ var FilterChips = React92.forwardRef(function FilterChips2({
|
|
|
7855
8244
|
});
|
|
7856
8245
|
|
|
7857
8246
|
// src/components/multi-select/MultiSelect.tsx
|
|
7858
|
-
var
|
|
7859
|
-
var
|
|
7860
|
-
var MultiSelect =
|
|
8247
|
+
var React95 = __toESM(require("react"));
|
|
8248
|
+
var import_jsx_runtime97 = require("react/jsx-runtime");
|
|
8249
|
+
var MultiSelect = React95.forwardRef(function MultiSelect2({
|
|
7861
8250
|
options,
|
|
7862
8251
|
value,
|
|
7863
8252
|
defaultValue,
|
|
@@ -7871,10 +8260,10 @@ var MultiSelect = React93.forwardRef(function MultiSelect2({
|
|
|
7871
8260
|
className,
|
|
7872
8261
|
...props
|
|
7873
8262
|
}, ref) {
|
|
7874
|
-
const labelId =
|
|
7875
|
-
const [internal, setInternal] =
|
|
7876
|
-
const [query, setQuery] =
|
|
7877
|
-
const [open, setOpen] =
|
|
8263
|
+
const labelId = React95.useId();
|
|
8264
|
+
const [internal, setInternal] = React95.useState(defaultValue ?? []);
|
|
8265
|
+
const [query, setQuery] = React95.useState("");
|
|
8266
|
+
const [open, setOpen] = React95.useState(false);
|
|
7878
8267
|
const selected = value ?? internal;
|
|
7879
8268
|
const commit = (next) => {
|
|
7880
8269
|
if (value === void 0) setInternal(next);
|
|
@@ -7891,7 +8280,7 @@ var MultiSelect = React93.forwardRef(function MultiSelect2({
|
|
|
7891
8280
|
const q = query.trim().toLowerCase();
|
|
7892
8281
|
return option.label.toLowerCase().includes(q) || option.value.toLowerCase().includes(q) || option.description?.toLowerCase().includes(q) || option.group?.toLowerCase().includes(q);
|
|
7893
8282
|
}) : options;
|
|
7894
|
-
const groups =
|
|
8283
|
+
const groups = React95.useMemo(() => {
|
|
7895
8284
|
let last;
|
|
7896
8285
|
return filtered.map((option) => {
|
|
7897
8286
|
const heading = option.group && option.group !== last ? option.group : void 0;
|
|
@@ -7901,16 +8290,16 @@ var MultiSelect = React93.forwardRef(function MultiSelect2({
|
|
|
7901
8290
|
}, [filtered]);
|
|
7902
8291
|
const visibleChips = selectedOptions.slice(0, maxDisplay);
|
|
7903
8292
|
const hiddenCount = selectedOptions.length - visibleChips.length;
|
|
7904
|
-
return /* @__PURE__ */ (0,
|
|
7905
|
-
label && /* @__PURE__ */ (0,
|
|
7906
|
-
visibleChips.length > 0 && /* @__PURE__ */ (0,
|
|
7907
|
-
visibleChips.map((option) => /* @__PURE__ */ (0,
|
|
8293
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { ref, className: cn("flex flex-col gap-2", className), ...props, children: [
|
|
8294
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("span", { id: labelId, className: "text-sm font-medium", children: label }),
|
|
8295
|
+
visibleChips.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "flex flex-wrap gap-1.5", children: [
|
|
8296
|
+
visibleChips.map((option) => /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
|
|
7908
8297
|
"span",
|
|
7909
8298
|
{
|
|
7910
8299
|
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",
|
|
7911
8300
|
children: [
|
|
7912
|
-
/* @__PURE__ */ (0,
|
|
7913
|
-
/* @__PURE__ */ (0,
|
|
8301
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("span", { className: "truncate", children: option.label }),
|
|
8302
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
7914
8303
|
"button",
|
|
7915
8304
|
{
|
|
7916
8305
|
type: "button",
|
|
@@ -7918,26 +8307,26 @@ var MultiSelect = React93.forwardRef(function MultiSelect2({
|
|
|
7918
8307
|
disabled,
|
|
7919
8308
|
"aria-label": `Remove ${option.label}`,
|
|
7920
8309
|
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",
|
|
7921
|
-
children: /* @__PURE__ */ (0,
|
|
8310
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("svg", { "aria-hidden": "true", viewBox: "0 0 20 20", className: "h-3 w-3", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("path", { d: "m5 5 10 10M15 5 5 15" }) })
|
|
7922
8311
|
}
|
|
7923
8312
|
)
|
|
7924
8313
|
]
|
|
7925
8314
|
},
|
|
7926
8315
|
option.value
|
|
7927
8316
|
)),
|
|
7928
|
-
hiddenCount > 0 && /* @__PURE__ */ (0,
|
|
8317
|
+
hiddenCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("span", { className: "self-center text-xs text-muted-foreground", children: [
|
|
7929
8318
|
"+",
|
|
7930
8319
|
hiddenCount,
|
|
7931
8320
|
" more"
|
|
7932
8321
|
] })
|
|
7933
8322
|
] }),
|
|
7934
|
-
/* @__PURE__ */ (0,
|
|
7935
|
-
/* @__PURE__ */ (0,
|
|
7936
|
-
/* @__PURE__ */ (0,
|
|
7937
|
-
/* @__PURE__ */ (0,
|
|
8323
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(Popover, { open, onOpenChange: setOpen, children: [
|
|
8324
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(PopoverTrigger, { "aria-labelledby": label ? labelId : void 0, disabled, className: "w-full justify-between", children: [
|
|
8325
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("span", { children: selected.length > 0 ? `${selected.length} selected` : triggerLabel }),
|
|
8326
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("span", { "aria-hidden": "true", className: "text-muted-foreground", children: "\u2304" })
|
|
7938
8327
|
] }),
|
|
7939
|
-
/* @__PURE__ */ (0,
|
|
7940
|
-
/* @__PURE__ */ (0,
|
|
8328
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(PopoverContent, { className: "w-80 p-0", children: [
|
|
8329
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: "border-b border-border p-3", children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
7941
8330
|
Input,
|
|
7942
8331
|
{
|
|
7943
8332
|
type: "search",
|
|
@@ -7948,9 +8337,9 @@ var MultiSelect = React93.forwardRef(function MultiSelect2({
|
|
|
7948
8337
|
autoFocus: true
|
|
7949
8338
|
}
|
|
7950
8339
|
) }),
|
|
7951
|
-
/* @__PURE__ */ (0,
|
|
7952
|
-
heading && /* @__PURE__ */ (0,
|
|
7953
|
-
/* @__PURE__ */ (0,
|
|
8340
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: "max-h-64 overflow-y-auto p-1", children: groups.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("p", { className: "px-3 py-3 text-sm text-muted-foreground", children: emptyText }) : groups.map(({ option, heading }) => /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(React95.Fragment, { children: [
|
|
8341
|
+
heading && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("p", { className: "px-3 pb-1 pt-2 text-xs font-medium uppercase tracking-wide text-muted-foreground", children: heading }),
|
|
8342
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
|
|
7954
8343
|
"label",
|
|
7955
8344
|
{
|
|
7956
8345
|
className: cn(
|
|
@@ -7958,7 +8347,7 @@ var MultiSelect = React93.forwardRef(function MultiSelect2({
|
|
|
7958
8347
|
option.disabled && "cursor-not-allowed opacity-50"
|
|
7959
8348
|
),
|
|
7960
8349
|
children: [
|
|
7961
|
-
/* @__PURE__ */ (0,
|
|
8350
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
7962
8351
|
Checkbox,
|
|
7963
8352
|
{
|
|
7964
8353
|
checked: selected.includes(option.value),
|
|
@@ -7967,16 +8356,16 @@ var MultiSelect = React93.forwardRef(function MultiSelect2({
|
|
|
7967
8356
|
className: "mt-0.5"
|
|
7968
8357
|
}
|
|
7969
8358
|
),
|
|
7970
|
-
/* @__PURE__ */ (0,
|
|
7971
|
-
/* @__PURE__ */ (0,
|
|
7972
|
-
option.description && /* @__PURE__ */ (0,
|
|
8359
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("span", { className: "min-w-0", children: [
|
|
8360
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("span", { className: "block", children: option.label }),
|
|
8361
|
+
option.description && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("span", { className: "mt-0.5 block text-xs text-muted-foreground", children: option.description })
|
|
7973
8362
|
] })
|
|
7974
8363
|
]
|
|
7975
8364
|
}
|
|
7976
8365
|
)
|
|
7977
8366
|
] }, option.value)) }),
|
|
7978
|
-
/* @__PURE__ */ (0,
|
|
7979
|
-
/* @__PURE__ */ (0,
|
|
8367
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "flex items-center justify-between gap-2 border-t border-border p-2", children: [
|
|
8368
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
7980
8369
|
Button,
|
|
7981
8370
|
{
|
|
7982
8371
|
type: "button",
|
|
@@ -7986,7 +8375,7 @@ var MultiSelect = React93.forwardRef(function MultiSelect2({
|
|
|
7986
8375
|
children: "Select all"
|
|
7987
8376
|
}
|
|
7988
8377
|
),
|
|
7989
|
-
/* @__PURE__ */ (0,
|
|
8378
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(Button, { type: "button", variant: "ghost", size: "sm", onClick: () => commit([]), children: "Clear" })
|
|
7990
8379
|
] })
|
|
7991
8380
|
] })
|
|
7992
8381
|
] })
|
|
@@ -7994,9 +8383,9 @@ var MultiSelect = React93.forwardRef(function MultiSelect2({
|
|
|
7994
8383
|
});
|
|
7995
8384
|
|
|
7996
8385
|
// src/components/filter-panel/FilterPanel.tsx
|
|
7997
|
-
var
|
|
7998
|
-
var
|
|
7999
|
-
var FilterPanel =
|
|
8386
|
+
var React96 = __toESM(require("react"));
|
|
8387
|
+
var import_jsx_runtime98 = require("react/jsx-runtime");
|
|
8388
|
+
var FilterPanel = React96.forwardRef(function FilterPanel2({
|
|
8000
8389
|
sections,
|
|
8001
8390
|
title = "Filters",
|
|
8002
8391
|
description,
|
|
@@ -8012,7 +8401,7 @@ var FilterPanel = React94.forwardRef(function FilterPanel2({
|
|
|
8012
8401
|
...props
|
|
8013
8402
|
}, ref) {
|
|
8014
8403
|
const Tag = as;
|
|
8015
|
-
const [open, setOpen] =
|
|
8404
|
+
const [open, setOpen] = React96.useState(() => {
|
|
8016
8405
|
if (defaultOpen) {
|
|
8017
8406
|
return sections.flatMap((section, index) => defaultOpen.includes(section.title) ? [index] : []);
|
|
8018
8407
|
}
|
|
@@ -8025,16 +8414,16 @@ var FilterPanel = React94.forwardRef(function FilterPanel2({
|
|
|
8025
8414
|
(current) => current.includes(index) ? current.filter((entry) => entry !== index) : [...current, index]
|
|
8026
8415
|
);
|
|
8027
8416
|
};
|
|
8028
|
-
return /* @__PURE__ */ (0,
|
|
8029
|
-
(title || description) && /* @__PURE__ */ (0,
|
|
8030
|
-
title && /* @__PURE__ */ (0,
|
|
8031
|
-
description && /* @__PURE__ */ (0,
|
|
8417
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(Tag, { ref, className: cn("w-full rounded-xl border border-border bg-card", className), ...props, children: [
|
|
8418
|
+
(title || description) && /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: "border-b border-border px-4 py-3", children: [
|
|
8419
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("h2", { className: "text-sm font-semibold", children: title }),
|
|
8420
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("p", { className: "mt-1 text-xs text-muted-foreground", children: description })
|
|
8032
8421
|
] }),
|
|
8033
|
-
/* @__PURE__ */ (0,
|
|
8422
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: "divide-y divide-border", children: sections.map((section, index) => {
|
|
8034
8423
|
const expanded = isOpen(index);
|
|
8035
8424
|
const sectionId = `filter-section-${index}`;
|
|
8036
|
-
return /* @__PURE__ */ (0,
|
|
8037
|
-
/* @__PURE__ */ (0,
|
|
8425
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: "px-4 py-3", children: [
|
|
8426
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("h3", { children: /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(
|
|
8038
8427
|
"button",
|
|
8039
8428
|
{
|
|
8040
8429
|
type: "button",
|
|
@@ -8047,28 +8436,28 @@ var FilterPanel = React94.forwardRef(function FilterPanel2({
|
|
|
8047
8436
|
collapsible && "rounded-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
8048
8437
|
),
|
|
8049
8438
|
children: [
|
|
8050
|
-
/* @__PURE__ */ (0,
|
|
8439
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("span", { children: [
|
|
8051
8440
|
section.title,
|
|
8052
|
-
section.description && /* @__PURE__ */ (0,
|
|
8441
|
+
section.description && /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("span", { className: "mt-0.5 block text-xs font-normal text-muted-foreground", children: section.description })
|
|
8053
8442
|
] }),
|
|
8054
|
-
collapsible && /* @__PURE__ */ (0,
|
|
8443
|
+
collapsible && /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("span", { "aria-hidden": "true", className: cn("text-muted-foreground transition-transform", expanded && "rotate-180"), children: "\u2304" })
|
|
8055
8444
|
]
|
|
8056
8445
|
}
|
|
8057
8446
|
) }),
|
|
8058
|
-
expanded && /* @__PURE__ */ (0,
|
|
8447
|
+
expanded && /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { id: sectionId, className: "mt-3", children: section.content })
|
|
8059
8448
|
] }, index);
|
|
8060
8449
|
}) }),
|
|
8061
|
-
(onReset || onApply || actions) && /* @__PURE__ */ (0,
|
|
8450
|
+
(onReset || onApply || actions) && /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: "flex flex-wrap items-center gap-2 border-t border-border px-4 py-3", children: [
|
|
8062
8451
|
actions,
|
|
8063
|
-
onReset && /* @__PURE__ */ (0,
|
|
8064
|
-
onApply && /* @__PURE__ */ (0,
|
|
8452
|
+
onReset && /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(Button, { type: "button", variant: "ghost", size: "sm", onClick: onReset, className: "ml-auto", children: resetLabel }),
|
|
8453
|
+
onApply && /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(Button, { type: "button", size: "sm", onClick: onApply, children: applyLabel })
|
|
8065
8454
|
] })
|
|
8066
8455
|
] });
|
|
8067
8456
|
});
|
|
8068
8457
|
|
|
8069
8458
|
// src/components/date-range-picker/DateRangePicker.tsx
|
|
8070
|
-
var
|
|
8071
|
-
var
|
|
8459
|
+
var React97 = __toESM(require("react"));
|
|
8460
|
+
var import_jsx_runtime99 = require("react/jsx-runtime");
|
|
8072
8461
|
var DEFAULT_PRESETS = [
|
|
8073
8462
|
{ label: "7 days", days: 7 },
|
|
8074
8463
|
{ label: "30 days", days: 30 },
|
|
@@ -8081,7 +8470,7 @@ function toIsoDate(date) {
|
|
|
8081
8470
|
const day = String(date.getDate()).padStart(2, "0");
|
|
8082
8471
|
return `${year}-${month}-${day}`;
|
|
8083
8472
|
}
|
|
8084
|
-
var DateRangePicker =
|
|
8473
|
+
var DateRangePicker = React97.forwardRef(
|
|
8085
8474
|
function DateRangePicker2({
|
|
8086
8475
|
value,
|
|
8087
8476
|
defaultValue,
|
|
@@ -8094,9 +8483,9 @@ var DateRangePicker = React95.forwardRef(
|
|
|
8094
8483
|
className,
|
|
8095
8484
|
...props
|
|
8096
8485
|
}, ref) {
|
|
8097
|
-
const startId =
|
|
8098
|
-
const endId =
|
|
8099
|
-
const [internal, setInternal] =
|
|
8486
|
+
const startId = React97.useId();
|
|
8487
|
+
const endId = React97.useId();
|
|
8488
|
+
const [internal, setInternal] = React97.useState(defaultValue ?? {});
|
|
8100
8489
|
const current = value ?? internal;
|
|
8101
8490
|
const commit = (next) => {
|
|
8102
8491
|
if (value === void 0) setInternal(next);
|
|
@@ -8120,8 +8509,8 @@ var DateRangePicker = React95.forwardRef(
|
|
|
8120
8509
|
}
|
|
8121
8510
|
commit({ start: toIsoDate(start), end: toIsoDate(end) });
|
|
8122
8511
|
};
|
|
8123
|
-
return /* @__PURE__ */ (0,
|
|
8124
|
-
showPresets && presets.length > 0 && /* @__PURE__ */ (0,
|
|
8512
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { ref, className: cn("flex flex-col gap-3", className), ...props, children: [
|
|
8513
|
+
showPresets && presets.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: "flex flex-wrap gap-2", children: presets.map((preset) => /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
8125
8514
|
Button,
|
|
8126
8515
|
{
|
|
8127
8516
|
type: "button",
|
|
@@ -8133,10 +8522,10 @@ var DateRangePicker = React95.forwardRef(
|
|
|
8133
8522
|
},
|
|
8134
8523
|
preset.label
|
|
8135
8524
|
)) }),
|
|
8136
|
-
/* @__PURE__ */ (0,
|
|
8137
|
-
/* @__PURE__ */ (0,
|
|
8138
|
-
/* @__PURE__ */ (0,
|
|
8139
|
-
/* @__PURE__ */ (0,
|
|
8525
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "grid gap-3 sm:grid-cols-2", children: [
|
|
8526
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { children: [
|
|
8527
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("label", { htmlFor: startId, className: "mb-1 block text-xs font-medium text-muted-foreground", children: startLabel }),
|
|
8528
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
8140
8529
|
DatePicker,
|
|
8141
8530
|
{
|
|
8142
8531
|
id: startId,
|
|
@@ -8148,9 +8537,9 @@ var DateRangePicker = React95.forwardRef(
|
|
|
8148
8537
|
}
|
|
8149
8538
|
)
|
|
8150
8539
|
] }),
|
|
8151
|
-
/* @__PURE__ */ (0,
|
|
8152
|
-
/* @__PURE__ */ (0,
|
|
8153
|
-
/* @__PURE__ */ (0,
|
|
8540
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { children: [
|
|
8541
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("label", { htmlFor: endId, className: "mb-1 block text-xs font-medium text-muted-foreground", children: endLabel }),
|
|
8542
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
8154
8543
|
DatePicker,
|
|
8155
8544
|
{
|
|
8156
8545
|
id: endId,
|
|
@@ -8168,9 +8557,9 @@ var DateRangePicker = React95.forwardRef(
|
|
|
8168
8557
|
);
|
|
8169
8558
|
|
|
8170
8559
|
// src/components/applied-filters/AppliedFilters.tsx
|
|
8171
|
-
var
|
|
8172
|
-
var
|
|
8173
|
-
var AppliedFilters =
|
|
8560
|
+
var React98 = __toESM(require("react"));
|
|
8561
|
+
var import_jsx_runtime100 = require("react/jsx-runtime");
|
|
8562
|
+
var AppliedFilters = React98.forwardRef(
|
|
8174
8563
|
function AppliedFilters2({
|
|
8175
8564
|
filters,
|
|
8176
8565
|
onClearAll,
|
|
@@ -8183,9 +8572,9 @@ var AppliedFilters = React96.forwardRef(
|
|
|
8183
8572
|
}, ref) {
|
|
8184
8573
|
const summary = label ?? `${filters.length} active`;
|
|
8185
8574
|
if (filters.length === 0) {
|
|
8186
|
-
return emptyLabel ? /* @__PURE__ */ (0,
|
|
8575
|
+
return emptyLabel ? /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("div", { ref, className: cn("text-sm text-muted-foreground", className), ...props, children: emptyLabel }) : null;
|
|
8187
8576
|
}
|
|
8188
|
-
return /* @__PURE__ */ (0,
|
|
8577
|
+
return /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)(
|
|
8189
8578
|
"div",
|
|
8190
8579
|
{
|
|
8191
8580
|
ref,
|
|
@@ -8193,9 +8582,9 @@ var AppliedFilters = React96.forwardRef(
|
|
|
8193
8582
|
className: cn("flex flex-wrap items-center gap-2", className),
|
|
8194
8583
|
...props,
|
|
8195
8584
|
children: [
|
|
8196
|
-
/* @__PURE__ */ (0,
|
|
8197
|
-
/* @__PURE__ */ (0,
|
|
8198
|
-
onEdit && /* @__PURE__ */ (0,
|
|
8585
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)("span", { className: "text-xs font-medium uppercase tracking-wide text-muted-foreground", children: summary }),
|
|
8586
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)(FilterChips, { filters, onClearAll }),
|
|
8587
|
+
onEdit && /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(Button, { type: "button", variant: "ghost", size: "sm", onClick: onEdit, children: editLabel })
|
|
8199
8588
|
]
|
|
8200
8589
|
}
|
|
8201
8590
|
);
|
|
@@ -8203,11 +8592,11 @@ var AppliedFilters = React96.forwardRef(
|
|
|
8203
8592
|
);
|
|
8204
8593
|
|
|
8205
8594
|
// src/components/menu/Menu.tsx
|
|
8206
|
-
var
|
|
8595
|
+
var React99 = __toESM(require("react"));
|
|
8207
8596
|
var import_react_dom8 = require("react-dom");
|
|
8208
8597
|
var import_react_slot5 = require("@radix-ui/react-slot");
|
|
8209
|
-
var
|
|
8210
|
-
var MenuContext =
|
|
8598
|
+
var import_jsx_runtime101 = require("react/jsx-runtime");
|
|
8599
|
+
var MenuContext = React99.createContext({
|
|
8211
8600
|
open: false,
|
|
8212
8601
|
setOpen: () => {
|
|
8213
8602
|
},
|
|
@@ -8216,13 +8605,13 @@ var MenuContext = React97.createContext({
|
|
|
8216
8605
|
},
|
|
8217
8606
|
wrapperRef: { current: null }
|
|
8218
8607
|
});
|
|
8219
|
-
var Menu =
|
|
8608
|
+
var Menu = React99.forwardRef(
|
|
8220
8609
|
({ open, onOpenChange, className, children }, ref) => {
|
|
8221
|
-
const [internalOpen, setInternalOpen] =
|
|
8222
|
-
const [activeIndex, setActiveIndex] =
|
|
8610
|
+
const [internalOpen, setInternalOpen] = React99.useState(false);
|
|
8611
|
+
const [activeIndex, setActiveIndex] = React99.useState(-1);
|
|
8223
8612
|
const current = open ?? internalOpen;
|
|
8224
|
-
const wrapperRef =
|
|
8225
|
-
const setRefs =
|
|
8613
|
+
const wrapperRef = React99.useRef(null);
|
|
8614
|
+
const setRefs = React99.useCallback(
|
|
8226
8615
|
(node) => {
|
|
8227
8616
|
wrapperRef.current = node;
|
|
8228
8617
|
if (typeof ref === "function") ref(node);
|
|
@@ -8230,7 +8619,7 @@ var Menu = React97.forwardRef(
|
|
|
8230
8619
|
},
|
|
8231
8620
|
[ref]
|
|
8232
8621
|
);
|
|
8233
|
-
const setOpen =
|
|
8622
|
+
const setOpen = React99.useCallback(
|
|
8234
8623
|
(next) => {
|
|
8235
8624
|
if (open === void 0) setInternalOpen(next);
|
|
8236
8625
|
onOpenChange?.(next);
|
|
@@ -8238,7 +8627,7 @@ var Menu = React97.forwardRef(
|
|
|
8238
8627
|
},
|
|
8239
8628
|
[open, onOpenChange]
|
|
8240
8629
|
);
|
|
8241
|
-
return /* @__PURE__ */ (0,
|
|
8630
|
+
return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("div", { ref: setRefs, className: cn("relative inline-block", className), children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
8242
8631
|
MenuContext.Provider,
|
|
8243
8632
|
{
|
|
8244
8633
|
value: { open: current, setOpen, activeIndex, setActiveIndex, wrapperRef },
|
|
@@ -8248,10 +8637,10 @@ var Menu = React97.forwardRef(
|
|
|
8248
8637
|
}
|
|
8249
8638
|
);
|
|
8250
8639
|
Menu.displayName = "Menu";
|
|
8251
|
-
var MenuTrigger =
|
|
8640
|
+
var MenuTrigger = React99.forwardRef(
|
|
8252
8641
|
({ className, children, ...props }, ref) => {
|
|
8253
|
-
const { open, setOpen } =
|
|
8254
|
-
return /* @__PURE__ */ (0,
|
|
8642
|
+
const { open, setOpen } = React99.useContext(MenuContext);
|
|
8643
|
+
return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
8255
8644
|
"button",
|
|
8256
8645
|
{
|
|
8257
8646
|
ref,
|
|
@@ -8271,13 +8660,13 @@ var MenuTrigger = React97.forwardRef(
|
|
|
8271
8660
|
}
|
|
8272
8661
|
);
|
|
8273
8662
|
MenuTrigger.displayName = "MenuTrigger";
|
|
8274
|
-
var MenuContent =
|
|
8663
|
+
var MenuContent = React99.forwardRef(
|
|
8275
8664
|
({ className, children, ...props }, ref) => {
|
|
8276
|
-
const { open, setOpen, activeIndex, setActiveIndex, wrapperRef } =
|
|
8277
|
-
const contentRef =
|
|
8278
|
-
const [pos, setPos] =
|
|
8279
|
-
const itemsRef =
|
|
8280
|
-
|
|
8665
|
+
const { open, setOpen, activeIndex, setActiveIndex, wrapperRef } = React99.useContext(MenuContext);
|
|
8666
|
+
const contentRef = React99.useRef(null);
|
|
8667
|
+
const [pos, setPos] = React99.useState(null);
|
|
8668
|
+
const itemsRef = React99.useRef([]);
|
|
8669
|
+
React99.useLayoutEffect(() => {
|
|
8281
8670
|
if (!open) {
|
|
8282
8671
|
setPos(null);
|
|
8283
8672
|
return;
|
|
@@ -8297,7 +8686,7 @@ var MenuContent = React97.forwardRef(
|
|
|
8297
8686
|
window.removeEventListener("resize", measure);
|
|
8298
8687
|
};
|
|
8299
8688
|
}, [open, setOpen, wrapperRef]);
|
|
8300
|
-
|
|
8689
|
+
React99.useEffect(() => {
|
|
8301
8690
|
if (!open) return;
|
|
8302
8691
|
function onPointerDown(event) {
|
|
8303
8692
|
if (!contentRef.current?.contains(event.target)) setOpen(false);
|
|
@@ -8305,7 +8694,7 @@ var MenuContent = React97.forwardRef(
|
|
|
8305
8694
|
document.addEventListener("pointerdown", onPointerDown);
|
|
8306
8695
|
return () => document.removeEventListener("pointerdown", onPointerDown);
|
|
8307
8696
|
}, [open, setOpen]);
|
|
8308
|
-
|
|
8697
|
+
React99.useEffect(() => {
|
|
8309
8698
|
if (open && pos && contentRef.current) {
|
|
8310
8699
|
itemsRef.current = Array.from(
|
|
8311
8700
|
contentRef.current.querySelectorAll('[role="menuitem"]:not([disabled])')
|
|
@@ -8353,7 +8742,7 @@ var MenuContent = React97.forwardRef(
|
|
|
8353
8742
|
};
|
|
8354
8743
|
if (!open || !pos || typeof document === "undefined") return null;
|
|
8355
8744
|
return (0, import_react_dom8.createPortal)(
|
|
8356
|
-
/* @__PURE__ */ (0,
|
|
8745
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
8357
8746
|
"div",
|
|
8358
8747
|
{
|
|
8359
8748
|
ref: (node) => {
|
|
@@ -8377,12 +8766,12 @@ var MenuContent = React97.forwardRef(
|
|
|
8377
8766
|
}
|
|
8378
8767
|
);
|
|
8379
8768
|
MenuContent.displayName = "MenuContent";
|
|
8380
|
-
var MenuItem =
|
|
8769
|
+
var MenuItem = React99.forwardRef(
|
|
8381
8770
|
({ className, destructive, asChild = false, onClick, ...props }, ref) => {
|
|
8382
|
-
const { setOpen } =
|
|
8771
|
+
const { setOpen } = React99.useContext(MenuContext);
|
|
8383
8772
|
const Comp = asChild ? import_react_slot5.Slot : "button";
|
|
8384
8773
|
const typeProp = asChild ? {} : { type: "button" };
|
|
8385
|
-
return /* @__PURE__ */ (0,
|
|
8774
|
+
return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
8386
8775
|
Comp,
|
|
8387
8776
|
{
|
|
8388
8777
|
ref,
|
|
@@ -8404,12 +8793,12 @@ var MenuItem = React97.forwardRef(
|
|
|
8404
8793
|
}
|
|
8405
8794
|
);
|
|
8406
8795
|
MenuItem.displayName = "MenuItem";
|
|
8407
|
-
var MenuSeparator =
|
|
8408
|
-
({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
8796
|
+
var MenuSeparator = React99.forwardRef(
|
|
8797
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("div", { ref, role: "separator", className: cn("-mx-1 my-1 h-px bg-border", className), ...props })
|
|
8409
8798
|
);
|
|
8410
8799
|
MenuSeparator.displayName = "MenuSeparator";
|
|
8411
|
-
var MenuLabel =
|
|
8412
|
-
({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
8800
|
+
var MenuLabel = React99.forwardRef(
|
|
8801
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
8413
8802
|
"div",
|
|
8414
8803
|
{
|
|
8415
8804
|
ref,
|
|
@@ -8421,9 +8810,9 @@ var MenuLabel = React97.forwardRef(
|
|
|
8421
8810
|
MenuLabel.displayName = "MenuLabel";
|
|
8422
8811
|
|
|
8423
8812
|
// src/components/alert/Alert.tsx
|
|
8424
|
-
var
|
|
8813
|
+
var React100 = __toESM(require("react"));
|
|
8425
8814
|
var import_class_variance_authority8 = require("class-variance-authority");
|
|
8426
|
-
var
|
|
8815
|
+
var import_jsx_runtime102 = require("react/jsx-runtime");
|
|
8427
8816
|
var alertVariants = (0, import_class_variance_authority8.cva)(
|
|
8428
8817
|
"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",
|
|
8429
8818
|
{
|
|
@@ -8443,8 +8832,8 @@ var alertVariants = (0, import_class_variance_authority8.cva)(
|
|
|
8443
8832
|
}
|
|
8444
8833
|
}
|
|
8445
8834
|
);
|
|
8446
|
-
var Alert =
|
|
8447
|
-
({ className, variant, ...props }, ref) => /* @__PURE__ */ (0,
|
|
8835
|
+
var Alert = React100.forwardRef(
|
|
8836
|
+
({ className, variant, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
8448
8837
|
"div",
|
|
8449
8838
|
{
|
|
8450
8839
|
ref,
|
|
@@ -8455,8 +8844,8 @@ var Alert = React98.forwardRef(
|
|
|
8455
8844
|
)
|
|
8456
8845
|
);
|
|
8457
8846
|
Alert.displayName = "Alert";
|
|
8458
|
-
var AlertTitle =
|
|
8459
|
-
({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
8847
|
+
var AlertTitle = React100.forwardRef(
|
|
8848
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
8460
8849
|
"h5",
|
|
8461
8850
|
{
|
|
8462
8851
|
ref,
|
|
@@ -8466,8 +8855,8 @@ var AlertTitle = React98.forwardRef(
|
|
|
8466
8855
|
)
|
|
8467
8856
|
);
|
|
8468
8857
|
AlertTitle.displayName = "AlertTitle";
|
|
8469
|
-
var AlertDescription =
|
|
8470
|
-
({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
8858
|
+
var AlertDescription = React100.forwardRef(
|
|
8859
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
8471
8860
|
"div",
|
|
8472
8861
|
{
|
|
8473
8862
|
ref,
|
|
@@ -8479,23 +8868,23 @@ var AlertDescription = React98.forwardRef(
|
|
|
8479
8868
|
AlertDescription.displayName = "AlertDescription";
|
|
8480
8869
|
|
|
8481
8870
|
// src/components/breadcrumb/Breadcrumb.tsx
|
|
8482
|
-
var
|
|
8483
|
-
var
|
|
8484
|
-
var Breadcrumb =
|
|
8871
|
+
var React101 = __toESM(require("react"));
|
|
8872
|
+
var import_jsx_runtime103 = require("react/jsx-runtime");
|
|
8873
|
+
var Breadcrumb = React101.forwardRef(
|
|
8485
8874
|
({ items, label = "Breadcrumb", separator = "/", onItemClick, linkComponent, linkHrefProp = "href", truncateCurrent = false, className, ...props }, ref) => {
|
|
8486
8875
|
const LinkEl = linkComponent ?? "a";
|
|
8487
|
-
return /* @__PURE__ */ (0,
|
|
8876
|
+
return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
|
|
8488
8877
|
"nav",
|
|
8489
8878
|
{
|
|
8490
8879
|
ref,
|
|
8491
8880
|
"aria-label": label,
|
|
8492
8881
|
className: cn("flex items-center space-x-1.5 text-sm text-muted-foreground", className),
|
|
8493
8882
|
...props,
|
|
8494
|
-
children: /* @__PURE__ */ (0,
|
|
8883
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime103.jsx)("ol", { className: "flex flex-wrap items-center space-x-1.5", children: items.map((item, index) => {
|
|
8495
8884
|
const isLast = index === items.length - 1;
|
|
8496
|
-
return /* @__PURE__ */ (0,
|
|
8497
|
-
index > 0 && /* @__PURE__ */ (0,
|
|
8498
|
-
item.href && !isLast ? /* @__PURE__ */ (0,
|
|
8885
|
+
return /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)("li", { className: cn("flex items-center space-x-1.5", truncateCurrent && isLast && "min-w-0"), children: [
|
|
8886
|
+
index > 0 && /* @__PURE__ */ (0, import_jsx_runtime103.jsx)("span", { "aria-hidden": "true", className: "text-muted-foreground/50", children: separator }),
|
|
8887
|
+
item.href && !isLast ? /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
|
|
8499
8888
|
LinkEl,
|
|
8500
8889
|
{
|
|
8501
8890
|
...linkHrefProp === "to" ? { to: item.href } : { href: item.href },
|
|
@@ -8506,7 +8895,7 @@ var Breadcrumb = React99.forwardRef(
|
|
|
8506
8895
|
} : void 0,
|
|
8507
8896
|
children: item.label
|
|
8508
8897
|
}
|
|
8509
|
-
) : /* @__PURE__ */ (0,
|
|
8898
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
|
|
8510
8899
|
"span",
|
|
8511
8900
|
{
|
|
8512
8901
|
"aria-current": isLast ? "page" : void 0,
|
|
@@ -8603,8 +8992,10 @@ Breadcrumb.displayName = "Breadcrumb";
|
|
|
8603
8992
|
LinkTabs,
|
|
8604
8993
|
List,
|
|
8605
8994
|
ListItem,
|
|
8995
|
+
ListToolbar,
|
|
8606
8996
|
LoadMore,
|
|
8607
8997
|
LogoCloud,
|
|
8998
|
+
MediaCard,
|
|
8608
8999
|
Menu,
|
|
8609
9000
|
MenuContent,
|
|
8610
9001
|
MenuItem,
|
|
@@ -8612,6 +9003,7 @@ Breadcrumb.displayName = "Breadcrumb";
|
|
|
8612
9003
|
MenuSeparator,
|
|
8613
9004
|
MenuTrigger,
|
|
8614
9005
|
MetricCard,
|
|
9006
|
+
MonthSchedule,
|
|
8615
9007
|
MultiSelect,
|
|
8616
9008
|
Newsletter,
|
|
8617
9009
|
PageHeader,
|