@refraction-ui/react 0.21.0 → 0.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-ZF3OHCGV.js → chunk-2Q6HHFAN.js} +1 -1
- package/dist/chunk-2Q6HHFAN.js.map +7 -0
- package/dist/{chunk-533MCMSU.js → chunk-3I3DYDHR.js} +2 -2
- package/dist/{chunk-H54FLNAF.js → chunk-63N4PZUJ.js} +2 -2
- package/dist/chunk-7P7EJ56S.js +7 -0
- package/dist/{chunk-Y2FNNAIL.js → chunk-EGVPAMQU.js} +2 -2
- package/dist/chunk-EGVPAMQU.js.map +1 -0
- package/dist/{chunk-WK2IIUFO.js → chunk-QDMLIDYN.js} +2 -2
- package/dist/{chunk-BOLFYVI6.js → chunk-QPCKJ2YR.js} +2 -2
- package/dist/{chunk-TOZBR4GL.js → chunk-RSWOLRIC.js} +4 -4
- package/dist/{chunk-TOZBR4GL.js.map → chunk-RSWOLRIC.js.map} +1 -1
- package/dist/{chunk-UNEM2TRI.js → chunk-SDAJVXD4.js} +2 -2
- package/dist/{chunk-VK3EQ34F.js → chunk-V24GDHUX.js} +2 -2
- package/dist/{chunk-XWP763SH.js → chunk-V727VZOE.js} +4 -2
- package/dist/{chunk-XWP763SH.js.map → chunk-V727VZOE.js.map} +2 -2
- package/dist/{chunk-AMK4VCBG.js → chunk-WYKPPK3W.js} +2 -2
- package/dist/{chunk-ONACRMG4.js → chunk-XMFNBOPO.js} +2 -2
- package/dist/{chunk-NKCWOPNX.js → chunk-Z5IHYNQD.js} +12 -8
- package/dist/chunk-Z5IHYNQD.js.map +7 -0
- package/dist/faro-engine-VIUXJAPH-FSARIABU.js +3 -0
- package/dist/{faro-engine-47HGRAQH-JKINJPMH.js.map → faro-engine-VIUXJAPH-FSARIABU.js.map} +1 -1
- package/dist/form.cjs.map +1 -1
- package/dist/form.js +1 -1
- package/dist/index.cjs +1305 -302
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +7 -0
- package/dist/internal/action-list/index.d.ts +39 -0
- package/dist/internal/avatar/index.d.cts +4 -1
- package/dist/internal/avatar/index.d.ts +4 -1
- package/dist/internal/button/index.d.cts +2 -2
- package/dist/internal/button/index.d.ts +2 -2
- package/dist/internal/card/index.d.cts +5 -1
- package/dist/internal/card/index.d.ts +5 -1
- package/dist/internal/data-table/index.d.cts +48 -3
- package/dist/internal/data-table/index.d.ts +48 -3
- package/dist/internal/funnel-chart/index.d.ts +60 -0
- package/dist/internal/line-chart/index.d.ts +124 -0
- package/dist/internal/native-select/index.d.ts +21 -0
- package/dist/internal/page-header/index.d.ts +35 -0
- package/dist/internal/react-action-list/index.d.ts +28 -0
- package/dist/internal/react-avatar/index.d.cts +4 -2
- package/dist/internal/react-avatar/index.d.ts +4 -2
- package/dist/internal/react-card/index.d.cts +10 -4
- package/dist/internal/react-card/index.d.ts +10 -4
- package/dist/internal/react-command/index.d.cts +13 -2
- package/dist/internal/react-command/index.d.ts +13 -2
- package/dist/internal/react-data-table/index.d.cts +27 -9
- package/dist/internal/react-data-table/index.d.ts +27 -9
- package/dist/internal/react-dialog/index.d.cts +5 -0
- package/dist/internal/react-dialog/index.d.ts +5 -0
- package/dist/internal/react-dropdown-menu/index.d.cts +19 -1
- package/dist/internal/react-dropdown-menu/index.d.ts +19 -1
- package/dist/internal/react-funnel-chart/index.d.ts +28 -0
- package/dist/internal/react-line-chart/index.d.ts +38 -0
- package/dist/internal/react-native-select/index.d.ts +19 -0
- package/dist/internal/react-page-header/index.d.ts +23 -0
- package/dist/internal/react-select/index.d.cts +21 -3
- package/dist/internal/react-select/index.d.ts +21 -3
- package/dist/internal/react-stat-grid/index.d.ts +22 -11
- package/dist/internal/react-table/index.d.ts +39 -0
- package/dist/internal/select/index.d.cts +14 -1
- package/dist/internal/select/index.d.ts +14 -1
- package/dist/internal/shared/index.d.cts +6 -3
- package/dist/internal/shared/index.d.ts +6 -3
- package/dist/internal/stat-grid/index.d.ts +49 -7
- package/dist/internal/table/index.d.ts +46 -0
- package/dist/internal/tabs/index.d.cts +8 -1
- package/dist/internal/tabs/index.d.ts +8 -1
- package/dist/react-accordion.js +1 -1
- package/dist/react-action-list.js +74 -0
- package/dist/react-action-list.js.map +7 -0
- package/dist/react-ai.js +1 -1
- package/dist/react-analytics.js +16 -4
- package/dist/react-analytics.js.map +2 -2
- package/dist/react-animated-text.js +1 -1
- package/dist/react-app-shell.js +1 -1
- package/dist/react-audience-feature-card.js +1 -1
- package/dist/react-audio-room.js +1 -1
- package/dist/react-auth.js +1 -1
- package/dist/react-avatar-group.js +1 -1
- package/dist/react-avatar.js +13 -9
- package/dist/react-avatar.js.map +2 -2
- package/dist/react-badge.js +2 -2
- package/dist/react-badge.js.map +1 -1
- package/dist/react-bottom-nav.js +1 -1
- package/dist/react-brand-network-cell.js +1 -1
- package/dist/react-breadcrumbs.js +1 -1
- package/dist/react-browser-chrome-mock.js +1 -1
- package/dist/react-button.js +3 -3
- package/dist/react-calendar.js +1 -1
- package/dist/react-call-controls.js +1 -1
- package/dist/react-callout.js +8 -3
- package/dist/react-callout.js.map +2 -2
- package/dist/react-card-grid.js +1 -1
- package/dist/react-card.js +5 -5
- package/dist/react-card.js.map +2 -2
- package/dist/react-carousel.js +1 -1
- package/dist/react-charts.js +1 -1
- package/dist/react-checkbox.js +1 -1
- package/dist/react-checklist.js +1 -1
- package/dist/react-code-block.js +1 -1
- package/dist/react-code-editor.js +1 -1
- package/dist/react-collapsible.js +1 -1
- package/dist/react-combobox.js +1 -1
- package/dist/react-command-input.js +1 -1
- package/dist/react-command.js +115 -70
- package/dist/react-command.js.map +3 -3
- package/dist/react-composer.js +3 -3
- package/dist/react-content-protection.js +1 -1
- package/dist/react-conversation.js +5 -5
- package/dist/react-cookie-consent.js +1 -1
- package/dist/react-data-table.js +125 -114
- package/dist/react-data-table.js.map +2 -2
- package/dist/react-date-picker.js +1 -1
- package/dist/react-device-frame.js +1 -1
- package/dist/react-dialog.js +33 -9
- package/dist/react-dialog.js.map +2 -2
- package/dist/react-diff-viewer.js +1 -1
- package/dist/react-dropdown-menu.js +61 -8
- package/dist/react-dropdown-menu.js.map +3 -3
- package/dist/react-editor-status-bar.js +1 -1
- package/dist/react-editor-tabs.js +1 -1
- package/dist/react-emoji-picker.js +2 -2
- package/dist/react-empty-state.js +1 -1
- package/dist/react-feedback-dialog.js +2 -2
- package/dist/react-file-tree.js +1 -1
- package/dist/react-file-upload.js +1 -1
- package/dist/react-floating-reactions.js +1 -1
- package/dist/react-flow-editor.js +2 -2
- package/dist/react-footer.js +1 -1
- package/dist/react-funnel-chart.js +105 -0
- package/dist/react-funnel-chart.js.map +7 -0
- package/dist/react-graph-view.js +2 -2
- package/dist/react-infinite-canvas.js +2 -2
- package/dist/react-inline-editor.js +1 -1
- package/dist/react-input-group.js +1 -1
- package/dist/react-input.js +2 -2
- package/dist/react-install-prompt.js +1 -1
- package/dist/react-kanban-board.js +1 -1
- package/dist/react-keyboard-shortcut.js +2 -2
- package/dist/react-language-selector.js +1 -1
- package/dist/react-line-chart.js +280 -0
- package/dist/react-line-chart.js.map +7 -0
- package/dist/react-link-card.js +1 -1
- package/dist/react-live-captions.js +1 -1
- package/dist/react-live-cursors.js +1 -1
- package/dist/react-live-transcript.js +1 -1
- package/dist/react-location-selector.js +1 -1
- package/dist/react-logger.js +3 -3
- package/dist/react-markdown-renderer.js +2 -2
- package/dist/react-marquee-strip.js +1 -1
- package/dist/react-mascot.js +1 -1
- package/dist/react-mastery-bar.js +1 -1
- package/dist/react-mini-map.js +1 -1
- package/dist/react-mobile-nav.js +1 -1
- package/dist/react-native-select.js +52 -0
- package/dist/react-native-select.js.map +7 -0
- package/dist/react-navbar.js +1 -1
- package/dist/react-numbered-steps.js +1 -1
- package/dist/react-otp-input.js +1 -1
- package/dist/react-page-header.js +40 -0
- package/dist/react-page-header.js.map +7 -0
- package/dist/react-pagination.js +1 -1
- package/dist/react-password-input.js +2 -2
- package/dist/react-payment.js +1 -1
- package/dist/react-popover.js +1 -1
- package/dist/react-pre-call-lobby.js +1 -1
- package/dist/react-presence-indicator.js +1 -1
- package/dist/react-pricing-card.js +1 -1
- package/dist/react-progress-display.js +2 -2
- package/dist/react-progress-display.js.map +1 -1
- package/dist/react-radial-gauge.js +1 -1
- package/dist/react-radio.js +1 -1
- package/dist/react-rating-scale.js +1 -1
- package/dist/react-reaction-bar.js +1 -1
- package/dist/react-resizable-layout.js +1 -1
- package/dist/react-search-bar.js +1 -1
- package/dist/react-section-head.js +1 -1
- package/dist/react-segmented-control.js +1 -1
- package/dist/react-select.js +94 -20
- package/dist/react-select.js.map +3 -3
- package/dist/react-separator.js +1 -1
- package/dist/react-sheet.js +1 -1
- package/dist/react-sidebar.js +1 -1
- package/dist/react-skeleton.js +1 -1
- package/dist/react-skip-to-content.js +1 -1
- package/dist/react-slide-viewer.js +1 -1
- package/dist/react-slider.js +1 -1
- package/dist/react-slot-picker.js +1 -1
- package/dist/react-social-auth-button.js +3 -3
- package/dist/react-sortable-list.js +1 -1
- package/dist/react-stat-grid.js +91 -22
- package/dist/react-stat-grid.js.map +2 -2
- package/dist/react-status-indicator.js +1 -1
- package/dist/react-steps.js +1 -1
- package/dist/react-sticky-note.js +1 -1
- package/dist/react-switch.js +1 -1
- package/dist/react-table-of-contents.js +1 -1
- package/dist/react-table.js +148 -0
- package/dist/react-table.js.map +7 -0
- package/dist/react-tabs.js +84 -7
- package/dist/react-tabs.js.map +2 -2
- package/dist/react-terminal.js +1 -1
- package/dist/react-test-results.js +1 -1
- package/dist/react-textarea.js +3 -3
- package/dist/react-textarea.js.map +1 -1
- package/dist/react-thread-view.js +2 -2
- package/dist/react-timeline.js +1 -1
- package/dist/react-toast.js +1 -1
- package/dist/react-tooltip.js +1 -1
- package/dist/react-version-selector.js +1 -1
- package/dist/react-video-grid.js +2 -2
- package/dist/react-video-player.js +1 -1
- package/dist/react-video-tile.js +2 -2
- package/dist/react-voice-pill.js +1 -1
- package/dist/react-waveform.js +1 -1
- package/dist/react-wizard.js +1 -1
- package/dist/theme.js +1 -1
- package/package.json +7 -1
- package/dist/chunk-NKCWOPNX.js.map +0 -7
- package/dist/chunk-SDZ3LROZ.js +0 -7
- package/dist/chunk-Y2FNNAIL.js.map +0 -1
- package/dist/chunk-ZF3OHCGV.js.map +0 -7
- package/dist/faro-engine-47HGRAQH-JKINJPMH.js +0 -3
- /package/dist/{chunk-533MCMSU.js.map → chunk-3I3DYDHR.js.map} +0 -0
- /package/dist/{chunk-H54FLNAF.js.map → chunk-63N4PZUJ.js.map} +0 -0
- /package/dist/{chunk-SDZ3LROZ.js.map → chunk-7P7EJ56S.js.map} +0 -0
- /package/dist/{chunk-WK2IIUFO.js.map → chunk-QDMLIDYN.js.map} +0 -0
- /package/dist/{chunk-BOLFYVI6.js.map → chunk-QPCKJ2YR.js.map} +0 -0
- /package/dist/{chunk-UNEM2TRI.js.map → chunk-SDAJVXD4.js.map} +0 -0
- /package/dist/{chunk-VK3EQ34F.js.map → chunk-V24GDHUX.js.map} +0 -0
- /package/dist/{chunk-AMK4VCBG.js.map → chunk-WYKPPK3W.js.map} +0 -0
- /package/dist/{chunk-ONACRMG4.js.map → chunk-XMFNBOPO.js.map} +0 -0
package/dist/index.cjs
CHANGED
|
@@ -767,7 +767,7 @@ var init_dist = __esm({
|
|
|
767
767
|
}
|
|
768
768
|
});
|
|
769
769
|
|
|
770
|
-
// ../logger/dist/chunk-
|
|
770
|
+
// ../logger/dist/chunk-OEINJBSK.js
|
|
771
771
|
async function createFaroSink(opts) {
|
|
772
772
|
const transport = opts.transport ?? await loadFaroTransport(opts);
|
|
773
773
|
if (!transport) return null;
|
|
@@ -788,10 +788,12 @@ async function loadFaroTransport(opts) {
|
|
|
788
788
|
const sdkName = "@grafana/faro-web-sdk";
|
|
789
789
|
const tracingName = "@grafana/faro-web-tracing";
|
|
790
790
|
const sdk = await import(
|
|
791
|
+
/* webpackIgnore: true */
|
|
791
792
|
/* @vite-ignore */
|
|
792
793
|
sdkName
|
|
793
794
|
);
|
|
794
795
|
const tracing = await import(
|
|
796
|
+
/* webpackIgnore: true */
|
|
795
797
|
/* @vite-ignore */
|
|
796
798
|
tracingName
|
|
797
799
|
);
|
|
@@ -833,8 +835,8 @@ function flatten(ctx) {
|
|
|
833
835
|
return out;
|
|
834
836
|
}
|
|
835
837
|
var FARO_LEVEL;
|
|
836
|
-
var
|
|
837
|
-
"../logger/dist/chunk-
|
|
838
|
+
var init_chunk_OEINJBSK = __esm({
|
|
839
|
+
"../logger/dist/chunk-OEINJBSK.js"() {
|
|
838
840
|
FARO_LEVEL = {
|
|
839
841
|
debug: "debug",
|
|
840
842
|
info: "info",
|
|
@@ -845,14 +847,14 @@ var init_chunk_57LG5ZUS = __esm({
|
|
|
845
847
|
}
|
|
846
848
|
});
|
|
847
849
|
|
|
848
|
-
// ../logger/dist/faro-engine-
|
|
849
|
-
var
|
|
850
|
-
__export(
|
|
850
|
+
// ../logger/dist/faro-engine-VIUXJAPH.js
|
|
851
|
+
var faro_engine_VIUXJAPH_exports = {};
|
|
852
|
+
__export(faro_engine_VIUXJAPH_exports, {
|
|
851
853
|
createFaroSink: () => createFaroSink
|
|
852
854
|
});
|
|
853
|
-
var
|
|
854
|
-
"../logger/dist/faro-engine-
|
|
855
|
-
|
|
855
|
+
var init_faro_engine_VIUXJAPH = __esm({
|
|
856
|
+
"../logger/dist/faro-engine-VIUXJAPH.js"() {
|
|
857
|
+
init_chunk_OEINJBSK();
|
|
856
858
|
}
|
|
857
859
|
});
|
|
858
860
|
|
|
@@ -1773,7 +1775,7 @@ function createBadge(props = {}) {
|
|
|
1773
1775
|
};
|
|
1774
1776
|
}
|
|
1775
1777
|
var badgeVariants = cva({
|
|
1776
|
-
base: "inline-flex items-center rounded-full border
|
|
1778
|
+
base: "inline-flex items-center rounded-full border font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
|
1777
1779
|
variants: {
|
|
1778
1780
|
variant: {
|
|
1779
1781
|
default: "border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",
|
|
@@ -2072,7 +2074,7 @@ var buttonTokens = {
|
|
|
2072
2074
|
}
|
|
2073
2075
|
};
|
|
2074
2076
|
var buttonVariants = cva({
|
|
2075
|
-
base: "inline-flex items-center justify-center gap-2 whitespace-nowrap
|
|
2077
|
+
base: "inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
2076
2078
|
variants: {
|
|
2077
2079
|
variant: {
|
|
2078
2080
|
default: "bg-primary text-primary-foreground shadow hover:bg-primary/90",
|
|
@@ -2093,9 +2095,11 @@ var buttonVariants = cva({
|
|
|
2093
2095
|
size: {
|
|
2094
2096
|
xs: "h-7 rounded px-2 text-xs",
|
|
2095
2097
|
sm: "h-8 rounded-md px-3 text-xs",
|
|
2096
|
-
default: "h-9 px-4 py-2",
|
|
2097
|
-
lg: "h-10 rounded-md px-8",
|
|
2098
|
-
icon: "h-9 w-9"
|
|
2098
|
+
default: "h-9 rounded-md px-4 py-2 text-sm",
|
|
2099
|
+
lg: "h-10 rounded-md px-8 text-sm",
|
|
2100
|
+
icon: "h-9 w-9 rounded-md text-sm",
|
|
2101
|
+
"icon-sm": "h-8 w-8 rounded-md text-xs",
|
|
2102
|
+
"icon-xs": "h-7 w-7 rounded text-xs"
|
|
2099
2103
|
}
|
|
2100
2104
|
},
|
|
2101
2105
|
defaultVariants: {
|
|
@@ -2417,7 +2421,9 @@ var Button = React52__namespace.forwardRef(
|
|
|
2417
2421
|
return React52__namespace.cloneElement(children, {
|
|
2418
2422
|
ref: mergedRef,
|
|
2419
2423
|
className: cn(classes, children.props.className, "relative"),
|
|
2420
|
-
type
|
|
2424
|
+
// `type` is only meaningful on a <button>; forcing type="button" onto
|
|
2425
|
+
// an <a> changes its semantics (it becomes a MIME-type hint).
|
|
2426
|
+
...children.type === "button" || props.type ? { type: getButtonType({ type: props.type }) } : {},
|
|
2421
2427
|
...api.ariaProps,
|
|
2422
2428
|
...api.dataAttributes,
|
|
2423
2429
|
...props,
|
|
@@ -4305,26 +4311,49 @@ function useCommandContext() {
|
|
|
4305
4311
|
}
|
|
4306
4312
|
return ctx;
|
|
4307
4313
|
}
|
|
4314
|
+
function itemValueOf(value, children) {
|
|
4315
|
+
if (value !== void 0) return value;
|
|
4316
|
+
if (typeof children === "string" || typeof children === "number") return String(children);
|
|
4317
|
+
return "";
|
|
4318
|
+
}
|
|
4319
|
+
function collectItems(node, into) {
|
|
4320
|
+
React52__namespace.Children.forEach(node, (child) => {
|
|
4321
|
+
if (!React52__namespace.isValidElement(child)) return;
|
|
4322
|
+
if (child.type === CommandItem) {
|
|
4323
|
+
const value = itemValueOf(child.props.value, child.props.children);
|
|
4324
|
+
into.push({ id: value, value, label: value, disabled: child.props.disabled });
|
|
4325
|
+
return;
|
|
4326
|
+
}
|
|
4327
|
+
collectItems(child.props.children, into);
|
|
4328
|
+
});
|
|
4329
|
+
return into;
|
|
4330
|
+
}
|
|
4331
|
+
var defaultFilter3 = (value, search) => value.toLowerCase().includes(search.toLowerCase());
|
|
4308
4332
|
function Command({
|
|
4309
4333
|
open,
|
|
4310
4334
|
onOpenChange,
|
|
4311
|
-
filter,
|
|
4335
|
+
filter = defaultFilter3,
|
|
4312
4336
|
className,
|
|
4313
4337
|
children
|
|
4314
4338
|
}) {
|
|
4315
|
-
const [
|
|
4339
|
+
const [registered, setRegistered] = React52__namespace.useState(() => /* @__PURE__ */ new Map());
|
|
4316
4340
|
const [search, setSearch] = React52__namespace.useState("");
|
|
4317
4341
|
const [selectedIndex, setSelectedIndex] = React52__namespace.useState(0);
|
|
4318
|
-
const
|
|
4319
|
-
const
|
|
4320
|
-
|
|
4321
|
-
|
|
4322
|
-
|
|
4323
|
-
|
|
4324
|
-
|
|
4325
|
-
|
|
4326
|
-
|
|
4327
|
-
|
|
4342
|
+
const uid = React52__namespace.useId().replace(/:/g, "");
|
|
4343
|
+
const listId = `rfr-cmd-list-${uid}`;
|
|
4344
|
+
const inputId = `rfr-cmd-input-${uid}`;
|
|
4345
|
+
const api = React52__namespace.useMemo(() => createCommand({ open, onOpenChange, filter }), [open, onOpenChange, filter]);
|
|
4346
|
+
const items = React52__namespace.useMemo(() => {
|
|
4347
|
+
const all = collectItems(children, []);
|
|
4348
|
+
const known = new Set(all.map((i) => i.value));
|
|
4349
|
+
for (const [value, item] of registered) {
|
|
4350
|
+
if (!known.has(value)) all.push({ id: value, value, label: value, disabled: item.disabled });
|
|
4351
|
+
}
|
|
4352
|
+
return all;
|
|
4353
|
+
}, [children, registered]);
|
|
4354
|
+
const matches = React52__namespace.useCallback((value) => !search || filter(value, search), [filter, search]);
|
|
4355
|
+
const filteredItems = React52__namespace.useMemo(() => items.filter((i) => matches(i.value)), [items, matches]);
|
|
4356
|
+
const highlighted = filteredItems[selectedIndex];
|
|
4328
4357
|
const handleSearch = React52__namespace.useCallback((query) => {
|
|
4329
4358
|
setSearch(query);
|
|
4330
4359
|
setSelectedIndex(0);
|
|
@@ -4332,57 +4361,59 @@ function Command({
|
|
|
4332
4361
|
const handleSelect = React52__namespace.useCallback((index2) => {
|
|
4333
4362
|
setSelectedIndex(index2);
|
|
4334
4363
|
}, []);
|
|
4335
|
-
const registerItem = React52__namespace.useCallback((item) => {
|
|
4336
|
-
|
|
4337
|
-
|
|
4338
|
-
return
|
|
4364
|
+
const registerItem = React52__namespace.useCallback((value, item) => {
|
|
4365
|
+
setRegistered((prev) => {
|
|
4366
|
+
const current = prev.get(value);
|
|
4367
|
+
if (current && current.domId === item.domId && current.disabled === item.disabled) return prev;
|
|
4368
|
+
const next = new Map(prev);
|
|
4369
|
+
next.set(value, item);
|
|
4370
|
+
return next;
|
|
4339
4371
|
});
|
|
4340
4372
|
}, []);
|
|
4341
|
-
const unregisterItem = React52__namespace.useCallback((
|
|
4342
|
-
|
|
4373
|
+
const unregisterItem = React52__namespace.useCallback((value) => {
|
|
4374
|
+
setRegistered((prev) => {
|
|
4375
|
+
if (!prev.has(value)) return prev;
|
|
4376
|
+
const next = new Map(prev);
|
|
4377
|
+
next.delete(value);
|
|
4378
|
+
return next;
|
|
4379
|
+
});
|
|
4343
4380
|
}, []);
|
|
4344
|
-
const handleKeyDown =
|
|
4345
|
-
|
|
4346
|
-
|
|
4347
|
-
|
|
4348
|
-
|
|
4349
|
-
|
|
4350
|
-
|
|
4351
|
-
|
|
4352
|
-
|
|
4353
|
-
|
|
4354
|
-
|
|
4355
|
-
|
|
4356
|
-
|
|
4357
|
-
|
|
4358
|
-
|
|
4359
|
-
|
|
4360
|
-
|
|
4361
|
-
|
|
4362
|
-
|
|
4363
|
-
|
|
4364
|
-
|
|
4365
|
-
|
|
4366
|
-
|
|
4367
|
-
|
|
4368
|
-
|
|
4369
|
-
|
|
4370
|
-
|
|
4371
|
-
|
|
4372
|
-
|
|
4373
|
-
|
|
4374
|
-
|
|
4375
|
-
|
|
4376
|
-
|
|
4377
|
-
|
|
4378
|
-
|
|
4379
|
-
|
|
4380
|
-
unregisterItem,
|
|
4381
|
-
listId: api.ids.list,
|
|
4382
|
-
inputId: api.ids.input
|
|
4383
|
-
}),
|
|
4384
|
-
[search, handleSearch, selectedIndex, handleSelect, items, filteredItems, registerItem, unregisterItem, api.ids.list, api.ids.input]
|
|
4385
|
-
);
|
|
4381
|
+
const handleKeyDown = (e) => {
|
|
4382
|
+
const count = filteredItems.length;
|
|
4383
|
+
const handler = createKeyboardHandler({
|
|
4384
|
+
[Keys.ArrowDown]: (ev) => {
|
|
4385
|
+
ev.preventDefault();
|
|
4386
|
+
if (count > 0) setSelectedIndex((prev) => (prev + 1) % count);
|
|
4387
|
+
},
|
|
4388
|
+
[Keys.ArrowUp]: (ev) => {
|
|
4389
|
+
ev.preventDefault();
|
|
4390
|
+
if (count > 0) setSelectedIndex((prev) => (prev - 1 + count) % count);
|
|
4391
|
+
},
|
|
4392
|
+
[Keys.Enter]: (ev) => {
|
|
4393
|
+
ev.preventDefault();
|
|
4394
|
+
if (highlighted && !highlighted.disabled) registered.get(highlighted.value)?.select();
|
|
4395
|
+
},
|
|
4396
|
+
[Keys.Escape]: (ev) => {
|
|
4397
|
+
ev.preventDefault();
|
|
4398
|
+
onOpenChange?.(false);
|
|
4399
|
+
}
|
|
4400
|
+
});
|
|
4401
|
+
handler(e.nativeEvent);
|
|
4402
|
+
};
|
|
4403
|
+
const ctx = {
|
|
4404
|
+
search,
|
|
4405
|
+
onSearch: handleSearch,
|
|
4406
|
+
selectedIndex,
|
|
4407
|
+
onSelect: handleSelect,
|
|
4408
|
+
items,
|
|
4409
|
+
filteredItems,
|
|
4410
|
+
matches,
|
|
4411
|
+
registerItem,
|
|
4412
|
+
unregisterItem,
|
|
4413
|
+
activeDescendant: highlighted ? registered.get(highlighted.value)?.domId : void 0,
|
|
4414
|
+
listId,
|
|
4415
|
+
inputId
|
|
4416
|
+
};
|
|
4386
4417
|
return React52__namespace.createElement(
|
|
4387
4418
|
CommandContext.Provider,
|
|
4388
4419
|
{ value: ctx },
|
|
@@ -4391,6 +4422,8 @@ function Command({
|
|
|
4391
4422
|
{
|
|
4392
4423
|
className: cn(commandVariants(), className),
|
|
4393
4424
|
...api.ariaProps,
|
|
4425
|
+
"aria-owns": listId,
|
|
4426
|
+
id: `rfr-cmd-${uid}`,
|
|
4394
4427
|
onKeyDown: handleKeyDown
|
|
4395
4428
|
},
|
|
4396
4429
|
children
|
|
@@ -4399,7 +4432,7 @@ function Command({
|
|
|
4399
4432
|
}
|
|
4400
4433
|
var CommandInput = React52__namespace.forwardRef(
|
|
4401
4434
|
function CommandInput2({ className, onChange, ...props }, ref) {
|
|
4402
|
-
const { search, onSearch, inputId, listId } = useCommandContext();
|
|
4435
|
+
const { search, onSearch, inputId, listId, activeDescendant } = useCommandContext();
|
|
4403
4436
|
const handleChange = (e) => {
|
|
4404
4437
|
onSearch(e.target.value);
|
|
4405
4438
|
onChange?.(e);
|
|
@@ -4411,6 +4444,7 @@ var CommandInput = React52__namespace.forwardRef(
|
|
|
4411
4444
|
role: "searchbox",
|
|
4412
4445
|
"aria-autocomplete": "list",
|
|
4413
4446
|
"aria-controls": listId,
|
|
4447
|
+
"aria-activedescendant": activeDescendant,
|
|
4414
4448
|
value: search,
|
|
4415
4449
|
onChange: handleChange,
|
|
4416
4450
|
className: cn(commandInputVariants(), className),
|
|
@@ -4472,21 +4506,38 @@ var CommandGroup = React52__namespace.forwardRef(
|
|
|
4472
4506
|
}
|
|
4473
4507
|
);
|
|
4474
4508
|
var CommandItem = React52__namespace.forwardRef(
|
|
4475
|
-
function CommandItem2({ className, value, disabled, onSelect: onItemSelect, children, ...props }, ref) {
|
|
4476
|
-
const
|
|
4509
|
+
function CommandItem2({ className, value, disabled = false, onSelect: onItemSelect, onClick, onMouseMove, children, ...props }, ref) {
|
|
4510
|
+
const { matches, filteredItems, selectedIndex, onSelect, registerItem, unregisterItem } = useCommandContext();
|
|
4511
|
+
const itemValue = itemValueOf(value, children);
|
|
4512
|
+
const domId = `rfr-cmd-item-${React52__namespace.useId().replace(/:/g, "")}`;
|
|
4513
|
+
const onSelectRef = React52__namespace.useRef(onItemSelect);
|
|
4514
|
+
onSelectRef.current = onItemSelect;
|
|
4515
|
+
React52__namespace.useEffect(() => {
|
|
4516
|
+
registerItem(itemValue, { domId, disabled, select: () => onSelectRef.current?.() });
|
|
4517
|
+
}, [registerItem, itemValue, domId, disabled]);
|
|
4518
|
+
React52__namespace.useEffect(() => () => unregisterItem(itemValue), [unregisterItem, itemValue]);
|
|
4519
|
+
if (!matches(itemValue)) return null;
|
|
4520
|
+
const index2 = filteredItems.findIndex((i) => i.value === itemValue);
|
|
4521
|
+
const isSelected = index2 !== -1 && index2 === selectedIndex;
|
|
4522
|
+
const state = disabled ? "disabled" : isSelected ? "selected" : "default";
|
|
4477
4523
|
return React52__namespace.createElement(
|
|
4478
4524
|
"div",
|
|
4479
4525
|
{
|
|
4480
4526
|
ref,
|
|
4527
|
+
id: domId,
|
|
4481
4528
|
role: "option",
|
|
4482
|
-
"aria-selected":
|
|
4483
|
-
"aria-disabled": disabled
|
|
4484
|
-
"data-value":
|
|
4529
|
+
"aria-selected": isSelected,
|
|
4530
|
+
"aria-disabled": disabled,
|
|
4531
|
+
"data-value": itemValue,
|
|
4532
|
+
"data-selected": isSelected ? "" : void 0,
|
|
4485
4533
|
className: cn(commandItemVariants({ state }), className),
|
|
4486
|
-
onClick: () => {
|
|
4487
|
-
|
|
4488
|
-
|
|
4489
|
-
|
|
4534
|
+
onClick: (e) => {
|
|
4535
|
+
onClick?.(e);
|
|
4536
|
+
if (!disabled && !e.defaultPrevented) onItemSelect?.();
|
|
4537
|
+
},
|
|
4538
|
+
onMouseMove: (e) => {
|
|
4539
|
+
onMouseMove?.(e);
|
|
4540
|
+
if (index2 !== -1 && index2 !== selectedIndex) onSelect(index2);
|
|
4490
4541
|
},
|
|
4491
4542
|
...props
|
|
4492
4543
|
},
|
|
@@ -10203,11 +10254,11 @@ function MessageBody({ message }) {
|
|
|
10203
10254
|
message.status === "error" ? h2("div", { className: "mt-1 text-xs text-destructive", role: "alert" }, message.error ?? "Failed to send.") : null
|
|
10204
10255
|
);
|
|
10205
10256
|
}
|
|
10206
|
-
function Reactions({ message, onReact, align }) {
|
|
10257
|
+
function Reactions({ message, onReact, align: align2 }) {
|
|
10207
10258
|
if (!message.reactions || message.reactions.length === 0) return null;
|
|
10208
10259
|
return h2(
|
|
10209
10260
|
"div",
|
|
10210
|
-
{ className: cn("mt-1 flex flex-wrap gap-1",
|
|
10261
|
+
{ className: cn("mt-1 flex flex-wrap gap-1", align2 === "end" && "justify-end") },
|
|
10211
10262
|
...message.reactions.map(
|
|
10212
10263
|
(r) => h2(
|
|
10213
10264
|
"button",
|
|
@@ -10244,7 +10295,7 @@ function HoverActions({
|
|
|
10244
10295
|
isOwn,
|
|
10245
10296
|
onEdit,
|
|
10246
10297
|
onToggleEmojis,
|
|
10247
|
-
align
|
|
10298
|
+
align: align2
|
|
10248
10299
|
}) {
|
|
10249
10300
|
const { replyTo, deleteMessage } = conversation;
|
|
10250
10301
|
return h2(
|
|
@@ -10252,7 +10303,7 @@ function HoverActions({
|
|
|
10252
10303
|
{
|
|
10253
10304
|
className: cn(
|
|
10254
10305
|
"mt-1 flex items-center gap-3 text-xs text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100",
|
|
10255
|
-
|
|
10306
|
+
align2 === "end" && "justify-end"
|
|
10256
10307
|
)
|
|
10257
10308
|
},
|
|
10258
10309
|
// Reply targets this specific message but groups under the originating root.
|
|
@@ -10262,10 +10313,10 @@ function HoverActions({
|
|
|
10262
10313
|
isOwn ? h2("button", { type: "button", className: "hover:text-destructive", onClick: () => deleteMessage(message.id) }, "Delete") : null
|
|
10263
10314
|
);
|
|
10264
10315
|
}
|
|
10265
|
-
function EmojiRow({ onPick, align }) {
|
|
10316
|
+
function EmojiRow({ onPick, align: align2 }) {
|
|
10266
10317
|
return h2(
|
|
10267
10318
|
"div",
|
|
10268
|
-
{ className: cn("mt-1 flex gap-1",
|
|
10319
|
+
{ className: cn("mt-1 flex gap-1", align2 === "end" && "justify-end") },
|
|
10269
10320
|
...QUICK_EMOJIS.map(
|
|
10270
10321
|
(emoji) => h2("button", { key: emoji, type: "button", className: "rounded px-1 text-base hover:bg-accent", onClick: () => onPick(emoji) }, emoji)
|
|
10271
10322
|
)
|
|
@@ -10314,25 +10365,25 @@ function MessageRow({
|
|
|
10314
10365
|
const [editing, setEditing] = React52__namespace.useState(false);
|
|
10315
10366
|
const isUser = currentUserId ? message.author.id === currentUserId : message.role === "user";
|
|
10316
10367
|
const replyCount = getReplyCount(state.messages, message.id);
|
|
10317
|
-
const
|
|
10368
|
+
const align2 = isUser ? "end" : "start";
|
|
10318
10369
|
const inner = h2(
|
|
10319
10370
|
React52__namespace.Fragment,
|
|
10320
10371
|
null,
|
|
10321
10372
|
quotedParent ? h2(QuotedParent, { parent: quotedParent, onClick: () => openThread(rootIdOf(state.messages, quotedParent.id)) }) : null,
|
|
10322
10373
|
editing ? h2(EditField, { message, conversation, onDone: () => setEditing(false) }) : isUser ? h2("div", { className: "inline-block rounded-2xl rounded-br-sm bg-primary/10 px-3 py-2 text-left" }, h2(MessageBody, { message })) : h2(MessageBody, { message }),
|
|
10323
|
-
h2(Reactions, { message, onReact: (e) => react(message.id, e), align }),
|
|
10374
|
+
h2(Reactions, { message, onReact: (e) => react(message.id, e), align: align2 }),
|
|
10324
10375
|
showThreadAffordance && replyCount > 0 ? h2(
|
|
10325
10376
|
"button",
|
|
10326
|
-
{ type: "button", className: cn("mt-1 text-xs font-medium text-primary hover:underline",
|
|
10377
|
+
{ type: "button", className: cn("mt-1 text-xs font-medium text-primary hover:underline", align2 === "end" && "self-end"), onClick: () => openThread(message.id) },
|
|
10327
10378
|
`\u{1F4AC} ${replyCount} ${replyCount === 1 ? "reply" : "replies"}`
|
|
10328
10379
|
) : null,
|
|
10329
|
-
h2(HoverActions, { message, conversation, isOwn: isUser, onEdit: () => setEditing(true), onToggleEmojis: () => setShowEmojis((v2) => !v2), align }),
|
|
10380
|
+
h2(HoverActions, { message, conversation, isOwn: isUser, onEdit: () => setEditing(true), onToggleEmojis: () => setShowEmojis((v2) => !v2), align: align2 }),
|
|
10330
10381
|
showEmojis ? h2(EmojiRow, {
|
|
10331
10382
|
onPick: (e) => {
|
|
10332
10383
|
react(message.id, e);
|
|
10333
10384
|
setShowEmojis(false);
|
|
10334
10385
|
},
|
|
10335
|
-
align
|
|
10386
|
+
align: align2
|
|
10336
10387
|
}) : null
|
|
10337
10388
|
);
|
|
10338
10389
|
if (!isUser) {
|
|
@@ -10925,6 +10976,15 @@ var CookieConsent = React52__namespace.forwardRef(
|
|
|
10925
10976
|
);
|
|
10926
10977
|
|
|
10927
10978
|
// ../data-table/dist/index.js
|
|
10979
|
+
function resolveColumnAlign(col) {
|
|
10980
|
+
return col.align ?? (col.numeric ? "end" : "start");
|
|
10981
|
+
}
|
|
10982
|
+
function getColumnValue(col, row) {
|
|
10983
|
+
return col.accessor ? col.accessor(row) : void 0;
|
|
10984
|
+
}
|
|
10985
|
+
function resolveRowKey(row, index2, getRowKey) {
|
|
10986
|
+
return getRowKey ? getRowKey(row, index2) : index2;
|
|
10987
|
+
}
|
|
10928
10988
|
function createDataTable(props) {
|
|
10929
10989
|
const {
|
|
10930
10990
|
columns,
|
|
@@ -10942,10 +11002,10 @@ function createDataTable(props) {
|
|
|
10942
11002
|
for (const [columnId, filterValue] of Object.entries(filters)) {
|
|
10943
11003
|
if (!filterValue) continue;
|
|
10944
11004
|
const col = columns.find((c) => c.id === columnId);
|
|
10945
|
-
if (!col) continue;
|
|
11005
|
+
if (!col?.accessor) continue;
|
|
10946
11006
|
const lowerFilter = filterValue.toLowerCase();
|
|
10947
11007
|
result = result.filter((row) => {
|
|
10948
|
-
const cellValue = col
|
|
11008
|
+
const cellValue = getColumnValue(col, row);
|
|
10949
11009
|
return String(cellValue ?? "").toLowerCase().includes(lowerFilter);
|
|
10950
11010
|
});
|
|
10951
11011
|
}
|
|
@@ -10955,10 +11015,10 @@ function createDataTable(props) {
|
|
|
10955
11015
|
const filtered = getFilteredData();
|
|
10956
11016
|
if (!sortBy) return filtered;
|
|
10957
11017
|
const col = columns.find((c) => c.id === sortBy);
|
|
10958
|
-
if (!col) return filtered;
|
|
11018
|
+
if (!col?.accessor) return filtered;
|
|
10959
11019
|
return [...filtered].sort((a, b) => {
|
|
10960
|
-
const aVal = col
|
|
10961
|
-
const bVal = col
|
|
11020
|
+
const aVal = getColumnValue(col, a);
|
|
11021
|
+
const bVal = getColumnValue(col, b);
|
|
10962
11022
|
const aStr = String(aVal ?? "");
|
|
10963
11023
|
const bStr = String(bVal ?? "");
|
|
10964
11024
|
const cmp = aStr.localeCompare(bStr, void 0, { numeric: true });
|
|
@@ -11078,8 +11138,18 @@ var rowVariants = cva({
|
|
|
11078
11138
|
selected: "false"
|
|
11079
11139
|
}
|
|
11080
11140
|
});
|
|
11081
|
-
|
|
11082
|
-
|
|
11141
|
+
var dataTableAlignClass = {
|
|
11142
|
+
start: "text-start",
|
|
11143
|
+
center: "text-center",
|
|
11144
|
+
end: "text-end"
|
|
11145
|
+
};
|
|
11146
|
+
var dataTableNumericClass = "tabular-nums whitespace-nowrap";
|
|
11147
|
+
var dataTableSortButtonClass = "inline-flex items-center gap-1 rounded-sm font-inherit text-inherit focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring";
|
|
11148
|
+
var dataTableActionRowClass = "cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring";
|
|
11149
|
+
var ACTIVATION_KEYS = /* @__PURE__ */ new Set(["Enter", " "]);
|
|
11150
|
+
function filterLabel(header, id) {
|
|
11151
|
+
return typeof header === "string" || typeof header === "number" ? String(header) : id;
|
|
11152
|
+
}
|
|
11083
11153
|
function DataTable({
|
|
11084
11154
|
columns,
|
|
11085
11155
|
data,
|
|
@@ -11088,13 +11158,21 @@ function DataTable({
|
|
|
11088
11158
|
onSort,
|
|
11089
11159
|
filters: controlledFilters,
|
|
11090
11160
|
className,
|
|
11091
|
-
emptyMessage = "No data available"
|
|
11161
|
+
emptyMessage = "No data available",
|
|
11162
|
+
getRowKey,
|
|
11163
|
+
getRowProps,
|
|
11164
|
+
onRowClick,
|
|
11165
|
+
caption,
|
|
11166
|
+
wrapperClassName,
|
|
11167
|
+
...tableProps
|
|
11092
11168
|
}) {
|
|
11093
11169
|
const [sortBy, setSortBy] = React52__namespace.useState(controlledSortBy ?? null);
|
|
11094
11170
|
const [sortDir, setSortDir] = React52__namespace.useState(controlledSortDir);
|
|
11095
11171
|
const [filters, setFilters] = React52__namespace.useState(controlledFilters ?? {});
|
|
11096
11172
|
const api = React52__namespace.useMemo(
|
|
11097
11173
|
() => createDataTable({
|
|
11174
|
+
// The core only reads id/accessor/sortable/filterable; header and cell
|
|
11175
|
+
// are rendered here.
|
|
11098
11176
|
columns,
|
|
11099
11177
|
data,
|
|
11100
11178
|
sortBy: sortBy ?? void 0,
|
|
@@ -11104,119 +11182,100 @@ function DataTable({
|
|
|
11104
11182
|
}),
|
|
11105
11183
|
[columns, data, sortBy, sortDir, onSort, filters]
|
|
11106
11184
|
);
|
|
11107
|
-
const handleSort =
|
|
11108
|
-
(
|
|
11109
|
-
|
|
11110
|
-
|
|
11111
|
-
|
|
11112
|
-
|
|
11113
|
-
|
|
11114
|
-
|
|
11115
|
-
|
|
11116
|
-
|
|
11117
|
-
|
|
11118
|
-
|
|
11119
|
-
[columns, sortBy, sortDir, onSort]
|
|
11120
|
-
);
|
|
11121
|
-
const handleFilter = React52__namespace.useCallback(
|
|
11122
|
-
(columnId, value) => {
|
|
11123
|
-
setFilters((prev) => ({ ...prev, [columnId]: value }));
|
|
11124
|
-
},
|
|
11125
|
-
[]
|
|
11126
|
-
);
|
|
11127
|
-
const sortedData = api.state.sortedData;
|
|
11185
|
+
const handleSort = (columnId) => {
|
|
11186
|
+
const col = columns.find((c) => c.id === columnId);
|
|
11187
|
+
if (!col?.sortable) return;
|
|
11188
|
+
const newDir = sortBy === columnId && sortDir === "asc" ? "desc" : "asc";
|
|
11189
|
+
setSortBy(columnId);
|
|
11190
|
+
setSortDir(newDir);
|
|
11191
|
+
onSort?.(columnId, newDir);
|
|
11192
|
+
};
|
|
11193
|
+
const handleFilter = (columnId, value) => {
|
|
11194
|
+
setFilters((prev) => ({ ...prev, [columnId]: value }));
|
|
11195
|
+
};
|
|
11196
|
+
const rows = api.state.sortedData;
|
|
11128
11197
|
const hasFilterable = columns.some((c) => c.filterable);
|
|
11129
|
-
|
|
11130
|
-
|
|
11131
|
-
|
|
11132
|
-
|
|
11133
|
-
|
|
11134
|
-
|
|
11135
|
-
|
|
11136
|
-
|
|
11198
|
+
const rowElementProps = (row, index2) => {
|
|
11199
|
+
const extra = getRowProps?.(row, index2) ?? {};
|
|
11200
|
+
if (!onRowClick) return extra;
|
|
11201
|
+
return {
|
|
11202
|
+
tabIndex: 0,
|
|
11203
|
+
...extra,
|
|
11204
|
+
className: cn(dataTableActionRowClass, extra.className),
|
|
11205
|
+
onClick: (e) => {
|
|
11206
|
+
extra.onClick?.(e);
|
|
11207
|
+
if (!e.defaultPrevented) onRowClick(row, index2);
|
|
11137
11208
|
},
|
|
11138
|
-
|
|
11139
|
-
|
|
11140
|
-
|
|
11141
|
-
|
|
11142
|
-
|
|
11143
|
-
|
|
11144
|
-
|
|
11145
|
-
|
|
11146
|
-
|
|
11147
|
-
|
|
11148
|
-
|
|
11149
|
-
|
|
11150
|
-
|
|
11151
|
-
|
|
11152
|
-
|
|
11153
|
-
|
|
11154
|
-
|
|
11155
|
-
|
|
11209
|
+
onKeyDown: (e) => {
|
|
11210
|
+
extra.onKeyDown?.(e);
|
|
11211
|
+
if (e.defaultPrevented || e.target !== e.currentTarget || !ACTIVATION_KEYS.has(e.key)) return;
|
|
11212
|
+
e.preventDefault();
|
|
11213
|
+
onRowClick(row, index2);
|
|
11214
|
+
}
|
|
11215
|
+
};
|
|
11216
|
+
};
|
|
11217
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("relative w-full overflow-auto", wrapperClassName), children: /* @__PURE__ */ jsxRuntime.jsxs("table", { className: cn(tableVariants(), className), role: "table", ...tableProps, children: [
|
|
11218
|
+
caption != null && /* @__PURE__ */ jsxRuntime.jsx("caption", { className: "mt-2 caption-bottom text-xs text-muted-foreground", children: caption }),
|
|
11219
|
+
/* @__PURE__ */ jsxRuntime.jsxs("thead", { children: [
|
|
11220
|
+
/* @__PURE__ */ jsxRuntime.jsx("tr", { role: "row", children: columns.map((col) => {
|
|
11221
|
+
const headerProps = api.getHeaderProps(col);
|
|
11222
|
+
const align2 = resolveColumnAlign(col);
|
|
11223
|
+
const indicator = col.sortable && sortBy === col.id ? /* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": "true", children: sortDir === "asc" ? "\u2191" : "\u2193" }) : null;
|
|
11224
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11225
|
+
"th",
|
|
11226
|
+
{
|
|
11227
|
+
...headerProps,
|
|
11228
|
+
className: cn(
|
|
11229
|
+
headerVariants({ sortable: col.sortable ? "true" : "false" }),
|
|
11230
|
+
dataTableAlignClass[align2],
|
|
11231
|
+
col.headerClassName
|
|
11232
|
+
),
|
|
11233
|
+
children: col.sortable ? /* @__PURE__ */ jsxRuntime.jsxs("button", { type: "button", className: dataTableSortButtonClass, onClick: () => handleSort(col.id), children: [
|
|
11156
11234
|
col.header,
|
|
11157
|
-
|
|
11158
|
-
)
|
|
11159
|
-
}
|
|
11160
|
-
|
|
11161
|
-
|
|
11162
|
-
|
|
11163
|
-
|
|
11164
|
-
|
|
11165
|
-
|
|
11166
|
-
|
|
11167
|
-
|
|
11168
|
-
|
|
11169
|
-
|
|
11170
|
-
|
|
11171
|
-
|
|
11172
|
-
|
|
11173
|
-
|
|
11174
|
-
|
|
11175
|
-
|
|
11176
|
-
|
|
11177
|
-
|
|
11178
|
-
|
|
11179
|
-
|
|
11180
|
-
|
|
11181
|
-
|
|
11182
|
-
|
|
11183
|
-
null,
|
|
11184
|
-
sortedData.length === 0 ? React52__namespace.createElement(
|
|
11185
|
-
"tr",
|
|
11186
|
-
{ role: "row" },
|
|
11187
|
-
React52__namespace.createElement(
|
|
11235
|
+
indicator
|
|
11236
|
+
] }) : col.header
|
|
11237
|
+
},
|
|
11238
|
+
col.id
|
|
11239
|
+
);
|
|
11240
|
+
}) }),
|
|
11241
|
+
hasFilterable && /* @__PURE__ */ jsxRuntime.jsx("tr", { role: "row", "data-filter-row": "true", children: columns.map((col) => /* @__PURE__ */ jsxRuntime.jsx("th", { children: col.filterable ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
11242
|
+
"input",
|
|
11243
|
+
{
|
|
11244
|
+
type: "text",
|
|
11245
|
+
"aria-label": `Filter ${filterLabel(col.header, col.id)}`,
|
|
11246
|
+
value: filters[col.id] ?? "",
|
|
11247
|
+
onChange: (e) => handleFilter(col.id, e.target.value),
|
|
11248
|
+
placeholder: "Filter..."
|
|
11249
|
+
}
|
|
11250
|
+
) : null }, `filter-${col.id}`)) })
|
|
11251
|
+
] }),
|
|
11252
|
+
/* @__PURE__ */ jsxRuntime.jsx("tbody", { children: rows.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("tr", { role: "row", children: /* @__PURE__ */ jsxRuntime.jsx("td", { colSpan: columns.length, className: "text-center p-4 text-muted-foreground", role: "cell", children: emptyMessage }) }) : rows.map((row, rowIndex) => {
|
|
11253
|
+
const rowProps = rowElementProps(row, rowIndex);
|
|
11254
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11255
|
+
"tr",
|
|
11256
|
+
{
|
|
11257
|
+
...api.getRowProps(row, rowIndex),
|
|
11258
|
+
...rowProps,
|
|
11259
|
+
className: cn(rowVariants(), rowProps.className),
|
|
11260
|
+
children: columns.map((col) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
11188
11261
|
"td",
|
|
11189
11262
|
{
|
|
11190
|
-
|
|
11191
|
-
className:
|
|
11192
|
-
|
|
11193
|
-
|
|
11194
|
-
|
|
11195
|
-
|
|
11196
|
-
|
|
11197
|
-
|
|
11198
|
-
"tr",
|
|
11199
|
-
{
|
|
11200
|
-
key: rowIndex,
|
|
11201
|
-
...api.getRowProps(row, rowIndex),
|
|
11202
|
-
className: rowVariants()
|
|
11263
|
+
...api.getCellProps(col, row),
|
|
11264
|
+
className: cn(
|
|
11265
|
+
cellVariants(),
|
|
11266
|
+
dataTableAlignClass[resolveColumnAlign(col)],
|
|
11267
|
+
col.numeric && dataTableNumericClass,
|
|
11268
|
+
col.className
|
|
11269
|
+
),
|
|
11270
|
+
children: col.cell ? col.cell(row, rowIndex) : String(getColumnValue(col, row) ?? "")
|
|
11203
11271
|
},
|
|
11204
|
-
|
|
11205
|
-
|
|
11206
|
-
|
|
11207
|
-
|
|
11208
|
-
|
|
11209
|
-
|
|
11210
|
-
|
|
11211
|
-
},
|
|
11212
|
-
String(col.accessor(row) ?? "")
|
|
11213
|
-
)
|
|
11214
|
-
)
|
|
11215
|
-
)
|
|
11216
|
-
)
|
|
11217
|
-
)
|
|
11218
|
-
)
|
|
11219
|
-
);
|
|
11272
|
+
col.id
|
|
11273
|
+
))
|
|
11274
|
+
},
|
|
11275
|
+
resolveRowKey(row, rowIndex, getRowKey)
|
|
11276
|
+
);
|
|
11277
|
+
}) })
|
|
11278
|
+
] }) });
|
|
11220
11279
|
}
|
|
11221
11280
|
|
|
11222
11281
|
// ../device-frame/dist/index.js
|
|
@@ -11460,6 +11519,8 @@ function Dialog({
|
|
|
11460
11519
|
apiRef.current = createDialog({ open, modal });
|
|
11461
11520
|
}
|
|
11462
11521
|
const api = apiRef.current;
|
|
11522
|
+
const [hasTitle, setHasTitle] = React52__namespace.useState(false);
|
|
11523
|
+
const [hasDescription, setHasDescription] = React52__namespace.useState(false);
|
|
11463
11524
|
const ctx = React52__namespace.useMemo(
|
|
11464
11525
|
() => ({
|
|
11465
11526
|
open,
|
|
@@ -11467,9 +11528,13 @@ function Dialog({
|
|
|
11467
11528
|
modal,
|
|
11468
11529
|
contentId: api.ids.content,
|
|
11469
11530
|
titleId: api.ids.title,
|
|
11470
|
-
descriptionId: api.ids.description
|
|
11531
|
+
descriptionId: api.ids.description,
|
|
11532
|
+
hasTitle,
|
|
11533
|
+
hasDescription,
|
|
11534
|
+
setHasTitle,
|
|
11535
|
+
setHasDescription
|
|
11471
11536
|
}),
|
|
11472
|
-
[open, handleOpenChange, modal, api.ids.content, api.ids.title, api.ids.description]
|
|
11537
|
+
[open, handleOpenChange, modal, api.ids.content, api.ids.title, api.ids.description, hasTitle, hasDescription]
|
|
11473
11538
|
);
|
|
11474
11539
|
return React52__namespace.createElement(DialogContext.Provider, { value: ctx }, children);
|
|
11475
11540
|
}
|
|
@@ -11514,9 +11579,17 @@ var DialogOverlay = React52__namespace.forwardRef(
|
|
|
11514
11579
|
});
|
|
11515
11580
|
}
|
|
11516
11581
|
);
|
|
11582
|
+
function containsElement(node, type) {
|
|
11583
|
+
let found = false;
|
|
11584
|
+
React52__namespace.Children.forEach(node, (child) => {
|
|
11585
|
+
if (found || !React52__namespace.isValidElement(child)) return;
|
|
11586
|
+
found = child.type === type || containsElement(child.props.children, type);
|
|
11587
|
+
});
|
|
11588
|
+
return found;
|
|
11589
|
+
}
|
|
11517
11590
|
var DialogContent = React52__namespace.forwardRef(
|
|
11518
11591
|
function DialogContent2({ className, children, onKeyDown, ...props }, ref) {
|
|
11519
|
-
const { open, onOpenChange, modal, contentId, titleId, descriptionId } = useDialogContext();
|
|
11592
|
+
const { open, onOpenChange, modal, contentId, titleId, descriptionId, hasTitle, hasDescription } = useDialogContext();
|
|
11520
11593
|
React52__namespace.useMemo(
|
|
11521
11594
|
() => createDialog({ open, modal }),
|
|
11522
11595
|
[open, modal]
|
|
@@ -11538,8 +11611,10 @@ var DialogContent = React52__namespace.forwardRef(
|
|
|
11538
11611
|
ref,
|
|
11539
11612
|
role: "dialog",
|
|
11540
11613
|
"aria-modal": modal,
|
|
11541
|
-
|
|
11542
|
-
|
|
11614
|
+
// Reference only parts that exist: an id pointing at nothing leaves the
|
|
11615
|
+
// dialog unnamed while looking labelled.
|
|
11616
|
+
"aria-labelledby": hasTitle || containsElement(children, DialogTitle) ? titleId : void 0,
|
|
11617
|
+
"aria-describedby": hasDescription || containsElement(children, DialogDescription) ? descriptionId : void 0,
|
|
11543
11618
|
id: contentId,
|
|
11544
11619
|
className: cn(dialogContentVariants(), className),
|
|
11545
11620
|
onKeyDown: handleKeyDown,
|
|
@@ -11577,7 +11652,11 @@ var DialogFooter = React52__namespace.forwardRef(
|
|
|
11577
11652
|
);
|
|
11578
11653
|
var DialogTitle = React52__namespace.forwardRef(
|
|
11579
11654
|
function DialogTitle2({ className, ...props }, ref) {
|
|
11580
|
-
const { titleId } = useDialogContext();
|
|
11655
|
+
const { titleId, setHasTitle } = useDialogContext();
|
|
11656
|
+
React52__namespace.useEffect(() => {
|
|
11657
|
+
setHasTitle(true);
|
|
11658
|
+
return () => setHasTitle(false);
|
|
11659
|
+
}, [setHasTitle]);
|
|
11581
11660
|
return React52__namespace.createElement("h2", {
|
|
11582
11661
|
ref,
|
|
11583
11662
|
id: titleId,
|
|
@@ -11587,7 +11666,11 @@ var DialogTitle = React52__namespace.forwardRef(
|
|
|
11587
11666
|
}
|
|
11588
11667
|
);
|
|
11589
11668
|
var DialogDescription = React52__namespace.forwardRef(function DialogDescription2({ className, ...props }, ref) {
|
|
11590
|
-
const { descriptionId } = useDialogContext();
|
|
11669
|
+
const { descriptionId, setHasDescription } = useDialogContext();
|
|
11670
|
+
React52__namespace.useEffect(() => {
|
|
11671
|
+
setHasDescription(true);
|
|
11672
|
+
return () => setHasDescription(false);
|
|
11673
|
+
}, [setHasDescription]);
|
|
11591
11674
|
return React52__namespace.createElement("p", {
|
|
11592
11675
|
ref,
|
|
11593
11676
|
id: descriptionId,
|
|
@@ -11741,11 +11824,13 @@ function DropdownMenu({
|
|
|
11741
11824
|
apiRef.current = createDropdownMenu({ open });
|
|
11742
11825
|
}
|
|
11743
11826
|
const api = apiRef.current;
|
|
11827
|
+
const triggerRef = React52__namespace.useRef(null);
|
|
11744
11828
|
const ctx = React52__namespace.useMemo(
|
|
11745
11829
|
() => ({
|
|
11746
11830
|
open,
|
|
11747
11831
|
onOpenChange: handleOpenChange,
|
|
11748
|
-
contentId: api.ids.content
|
|
11832
|
+
contentId: api.ids.content,
|
|
11833
|
+
triggerRef
|
|
11749
11834
|
}),
|
|
11750
11835
|
[open, handleOpenChange, api.ids.content]
|
|
11751
11836
|
);
|
|
@@ -11753,7 +11838,12 @@ function DropdownMenu({
|
|
|
11753
11838
|
}
|
|
11754
11839
|
var DropdownMenuTrigger = React52__namespace.forwardRef(
|
|
11755
11840
|
function DropdownMenuTrigger2({ asChild = false, onClick, children, ...props }, ref) {
|
|
11756
|
-
const { open, onOpenChange, contentId } = useDropdownMenuContext();
|
|
11841
|
+
const { open, onOpenChange, contentId, triggerRef } = useDropdownMenuContext();
|
|
11842
|
+
const setRefs = (node) => {
|
|
11843
|
+
triggerRef.current = node;
|
|
11844
|
+
if (typeof ref === "function") ref(node);
|
|
11845
|
+
else if (ref) ref.current = node;
|
|
11846
|
+
};
|
|
11757
11847
|
const handleClick = (e) => {
|
|
11758
11848
|
onOpenChange(!open);
|
|
11759
11849
|
onClick?.(e);
|
|
@@ -11784,20 +11874,63 @@ var DropdownMenuTrigger = React52__namespace.forwardRef(
|
|
|
11784
11874
|
if (!e.defaultPrevented) handleClick(e);
|
|
11785
11875
|
},
|
|
11786
11876
|
ref: (node) => {
|
|
11787
|
-
|
|
11788
|
-
else if (ref) ref.current = node;
|
|
11877
|
+
setRefs(node);
|
|
11789
11878
|
if (typeof childRef === "function") childRef(node);
|
|
11790
11879
|
else if (childRef) childRef.current = node;
|
|
11791
11880
|
}
|
|
11792
11881
|
};
|
|
11793
11882
|
return React52__namespace.cloneElement(child, mergedProps);
|
|
11794
11883
|
}
|
|
11795
|
-
return React52__namespace.createElement("button", { ref, ...triggerProps }, children);
|
|
11884
|
+
return React52__namespace.createElement("button", { ref: setRefs, ...triggerProps }, children);
|
|
11796
11885
|
}
|
|
11797
11886
|
);
|
|
11887
|
+
var DEFAULT_SIDE_OFFSET = 4;
|
|
11888
|
+
var useIsomorphicLayoutEffect = typeof window !== "undefined" ? React52__namespace.useLayoutEffect : React52__namespace.useEffect;
|
|
11889
|
+
function computeMenuPosition(trigger, contentWidth, align2, sideOffset) {
|
|
11890
|
+
const left = align2 === "end" ? trigger.right - contentWidth : align2 === "center" ? trigger.left + trigger.width / 2 - contentWidth / 2 : trigger.left;
|
|
11891
|
+
return { position: "fixed", top: trigger.bottom + sideOffset, left: Math.max(0, left), minWidth: trigger.width };
|
|
11892
|
+
}
|
|
11798
11893
|
var DropdownMenuContent = React52__namespace.forwardRef(
|
|
11799
|
-
function DropdownMenuContent2({ className, children, onKeyDown, ...props },
|
|
11800
|
-
const { open, onOpenChange, contentId } = useDropdownMenuContext();
|
|
11894
|
+
function DropdownMenuContent2({ className, children, onKeyDown, align: align2 = "start", sideOffset = DEFAULT_SIDE_OFFSET, style, ...props }, forwardedRef) {
|
|
11895
|
+
const { open, onOpenChange, contentId, triggerRef } = useDropdownMenuContext();
|
|
11896
|
+
const contentRef = React52__namespace.useRef(null);
|
|
11897
|
+
const ref = React52__namespace.useCallback(
|
|
11898
|
+
(node) => {
|
|
11899
|
+
contentRef.current = node;
|
|
11900
|
+
if (typeof forwardedRef === "function") forwardedRef(node);
|
|
11901
|
+
else if (forwardedRef) forwardedRef.current = node;
|
|
11902
|
+
},
|
|
11903
|
+
[forwardedRef]
|
|
11904
|
+
);
|
|
11905
|
+
const [position, setPosition] = React52__namespace.useState(null);
|
|
11906
|
+
useIsomorphicLayoutEffect(() => {
|
|
11907
|
+
if (!open) return;
|
|
11908
|
+
const update = () => {
|
|
11909
|
+
const trigger = triggerRef.current;
|
|
11910
|
+
const content2 = contentRef.current;
|
|
11911
|
+
if (!trigger) return;
|
|
11912
|
+
setPosition(
|
|
11913
|
+
computeMenuPosition(trigger.getBoundingClientRect(), content2?.offsetWidth ?? 0, align2, sideOffset)
|
|
11914
|
+
);
|
|
11915
|
+
};
|
|
11916
|
+
update();
|
|
11917
|
+
window.addEventListener("resize", update);
|
|
11918
|
+
window.addEventListener("scroll", update, true);
|
|
11919
|
+
return () => {
|
|
11920
|
+
window.removeEventListener("resize", update);
|
|
11921
|
+
window.removeEventListener("scroll", update, true);
|
|
11922
|
+
};
|
|
11923
|
+
}, [open, align2, sideOffset, triggerRef]);
|
|
11924
|
+
React52__namespace.useEffect(() => {
|
|
11925
|
+
if (!open) return;
|
|
11926
|
+
const onPointerDown = (event) => {
|
|
11927
|
+
const target = event.target;
|
|
11928
|
+
if (contentRef.current?.contains(target) || triggerRef.current?.contains(target)) return;
|
|
11929
|
+
onOpenChange(false);
|
|
11930
|
+
};
|
|
11931
|
+
document.addEventListener("pointerdown", onPointerDown);
|
|
11932
|
+
return () => document.removeEventListener("pointerdown", onPointerDown);
|
|
11933
|
+
}, [open, onOpenChange, triggerRef]);
|
|
11801
11934
|
const handleKeyDown = (e) => {
|
|
11802
11935
|
const handler = createKeyboardHandler({
|
|
11803
11936
|
Escape: (ev) => {
|
|
@@ -11817,6 +11950,8 @@ var DropdownMenuContent = React52__namespace.forwardRef(
|
|
|
11817
11950
|
id: contentId,
|
|
11818
11951
|
"data-state": open ? "open" : "closed",
|
|
11819
11952
|
className: cn(menuContentVariants(), className),
|
|
11953
|
+
style: position ? { ...position, ...style } : style,
|
|
11954
|
+
"data-align": align2,
|
|
11820
11955
|
onKeyDown: handleKeyDown,
|
|
11821
11956
|
tabIndex: -1,
|
|
11822
11957
|
...props
|
|
@@ -12443,11 +12578,11 @@ function createInput(props = {}) {
|
|
|
12443
12578
|
};
|
|
12444
12579
|
}
|
|
12445
12580
|
var inputVariants = cva({
|
|
12446
|
-
base: "flex
|
|
12581
|
+
base: "flex w-full rounded-md border border-input bg-transparent px-3 py-1 shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
|
|
12447
12582
|
variants: {
|
|
12448
12583
|
size: {
|
|
12449
12584
|
sm: "h-8 text-xs",
|
|
12450
|
-
default: "h-9",
|
|
12585
|
+
default: "h-9 text-sm",
|
|
12451
12586
|
lg: "h-10 text-base"
|
|
12452
12587
|
},
|
|
12453
12588
|
validationState: {
|
|
@@ -14594,6 +14729,23 @@ function createTabs(props = {}) {
|
|
|
14594
14729
|
idPrefix
|
|
14595
14730
|
};
|
|
14596
14731
|
}
|
|
14732
|
+
function getNextTabIndex(current, key, count, orientation = "horizontal") {
|
|
14733
|
+
if (count === 0) return null;
|
|
14734
|
+
const prev = orientation === "horizontal" ? "ArrowLeft" : "ArrowUp";
|
|
14735
|
+
const next = orientation === "horizontal" ? "ArrowRight" : "ArrowDown";
|
|
14736
|
+
switch (key) {
|
|
14737
|
+
case next:
|
|
14738
|
+
return current < 0 ? 0 : (current + 1) % count;
|
|
14739
|
+
case prev:
|
|
14740
|
+
return current < 0 ? count - 1 : (current - 1 + count) % count;
|
|
14741
|
+
case "Home":
|
|
14742
|
+
return 0;
|
|
14743
|
+
case "End":
|
|
14744
|
+
return count - 1;
|
|
14745
|
+
default:
|
|
14746
|
+
return null;
|
|
14747
|
+
}
|
|
14748
|
+
}
|
|
14597
14749
|
var tabsListVariants = cva({
|
|
14598
14750
|
base: "inline-flex max-w-full overflow-x-auto items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground"
|
|
14599
14751
|
});
|
|
@@ -14633,14 +14785,31 @@ var Tabs = React52__namespace.forwardRef(
|
|
|
14633
14785
|
apiRef.current = createTabs({ value, orientation });
|
|
14634
14786
|
}
|
|
14635
14787
|
const api = apiRef.current;
|
|
14788
|
+
const [panels, setPanels] = React52__namespace.useState(() => /* @__PURE__ */ new Set());
|
|
14789
|
+
const registerPanel = React52__namespace.useCallback((panelValue) => {
|
|
14790
|
+
setPanels((prev) => prev.has(panelValue) ? prev : new Set(prev).add(panelValue));
|
|
14791
|
+
return () => setPanels((prev) => {
|
|
14792
|
+
if (!prev.has(panelValue)) return prev;
|
|
14793
|
+
const next = new Set(prev);
|
|
14794
|
+
next.delete(panelValue);
|
|
14795
|
+
return next;
|
|
14796
|
+
});
|
|
14797
|
+
}, []);
|
|
14798
|
+
const allPanels = React52__namespace.useMemo(() => {
|
|
14799
|
+
const found = new Set(panels);
|
|
14800
|
+
collectPanelValues(children, found);
|
|
14801
|
+
return found;
|
|
14802
|
+
}, [children, panels]);
|
|
14636
14803
|
const ctx = React52__namespace.useMemo(
|
|
14637
14804
|
() => ({
|
|
14638
14805
|
value,
|
|
14639
14806
|
onValueChange: handleValueChange,
|
|
14640
14807
|
orientation,
|
|
14641
|
-
idPrefix: api.idPrefix
|
|
14808
|
+
idPrefix: api.idPrefix,
|
|
14809
|
+
panels: allPanels,
|
|
14810
|
+
registerPanel
|
|
14642
14811
|
}),
|
|
14643
|
-
[value, handleValueChange, orientation, api.idPrefix]
|
|
14812
|
+
[value, handleValueChange, orientation, api.idPrefix, allPanels, registerPanel]
|
|
14644
14813
|
);
|
|
14645
14814
|
return React52__namespace.createElement(
|
|
14646
14815
|
"div",
|
|
@@ -14649,21 +14818,62 @@ var Tabs = React52__namespace.forwardRef(
|
|
|
14649
14818
|
);
|
|
14650
14819
|
}
|
|
14651
14820
|
);
|
|
14821
|
+
function collectPanelValues(node, into) {
|
|
14822
|
+
React52__namespace.Children.forEach(node, (child) => {
|
|
14823
|
+
if (!React52__namespace.isValidElement(child)) return;
|
|
14824
|
+
if (child.type === TabsContent && typeof child.props.value === "string") {
|
|
14825
|
+
into.add(child.props.value);
|
|
14826
|
+
return;
|
|
14827
|
+
}
|
|
14828
|
+
collectPanelValues(child.props.children, into);
|
|
14829
|
+
});
|
|
14830
|
+
}
|
|
14652
14831
|
var TabsList = React52__namespace.forwardRef(
|
|
14653
|
-
function TabsList2({ className, ...props },
|
|
14832
|
+
function TabsList2({ className, onKeyDown, ...props }, forwardedRef) {
|
|
14654
14833
|
const { orientation } = useTabsContext();
|
|
14834
|
+
const listRef = React52__namespace.useRef(null);
|
|
14835
|
+
const ref = React52__namespace.useCallback(
|
|
14836
|
+
(node) => {
|
|
14837
|
+
listRef.current = node;
|
|
14838
|
+
if (typeof forwardedRef === "function") forwardedRef(node);
|
|
14839
|
+
else if (forwardedRef) forwardedRef.current = node;
|
|
14840
|
+
},
|
|
14841
|
+
[forwardedRef]
|
|
14842
|
+
);
|
|
14843
|
+
React52__namespace.useEffect(() => {
|
|
14844
|
+
const tabs = enabledTabs(listRef.current);
|
|
14845
|
+
const stop = tabs.find((tab) => tab.getAttribute("aria-selected") === "true") ?? tabs[0];
|
|
14846
|
+
for (const tab of tabs) tab.tabIndex = tab === stop ? 0 : -1;
|
|
14847
|
+
});
|
|
14848
|
+
const handleKeyDown = (e) => {
|
|
14849
|
+
onKeyDown?.(e);
|
|
14850
|
+
if (e.defaultPrevented) return;
|
|
14851
|
+
const tabs = enabledTabs(listRef.current);
|
|
14852
|
+
const current = tabs.indexOf(e.target);
|
|
14853
|
+
if (current === -1) return;
|
|
14854
|
+
const next = getNextTabIndex(current, e.key, tabs.length, orientation);
|
|
14855
|
+
if (next === null) return;
|
|
14856
|
+
e.preventDefault();
|
|
14857
|
+
tabs[next].focus();
|
|
14858
|
+
tabs[next].click();
|
|
14859
|
+
};
|
|
14655
14860
|
return React52__namespace.createElement("div", {
|
|
14656
14861
|
ref,
|
|
14657
14862
|
role: "tablist",
|
|
14658
14863
|
"aria-orientation": orientation,
|
|
14659
14864
|
className: cn(tabsListVariants(), className),
|
|
14865
|
+
onKeyDown: handleKeyDown,
|
|
14660
14866
|
...props
|
|
14661
14867
|
});
|
|
14662
14868
|
}
|
|
14663
14869
|
);
|
|
14870
|
+
function enabledTabs(list) {
|
|
14871
|
+
if (!list) return [];
|
|
14872
|
+
return Array.from(list.querySelectorAll('[role="tab"]:not([disabled])'));
|
|
14873
|
+
}
|
|
14664
14874
|
var TabsTrigger = React52__namespace.forwardRef(
|
|
14665
14875
|
function TabsTrigger2({ value, className, onClick, onKeyDown, children, ...props }, ref) {
|
|
14666
|
-
const { value: activeValue, onValueChange,
|
|
14876
|
+
const { value: activeValue, onValueChange, idPrefix, panels } = useTabsContext();
|
|
14667
14877
|
const isSelected = activeValue === value;
|
|
14668
14878
|
const tabId = `${idPrefix}-tab-${value}`;
|
|
14669
14879
|
const panelId = `${idPrefix}-panel-${value}`;
|
|
@@ -14681,7 +14891,8 @@ var TabsTrigger = React52__namespace.forwardRef(
|
|
|
14681
14891
|
type: "button",
|
|
14682
14892
|
role: "tab",
|
|
14683
14893
|
"aria-selected": isSelected,
|
|
14684
|
-
|
|
14894
|
+
// Only the selected panel is rendered; never reference a missing element.
|
|
14895
|
+
"aria-controls": isSelected && panels.has(value) ? panelId : void 0,
|
|
14685
14896
|
tabIndex: isSelected ? 0 : -1,
|
|
14686
14897
|
id: tabId,
|
|
14687
14898
|
"data-state": isSelected ? "active" : "inactive",
|
|
@@ -14696,7 +14907,8 @@ var TabsTrigger = React52__namespace.forwardRef(
|
|
|
14696
14907
|
);
|
|
14697
14908
|
var TabsContent = React52__namespace.forwardRef(
|
|
14698
14909
|
function TabsContent2({ value, className, children, ...props }, ref) {
|
|
14699
|
-
const { value: activeValue, idPrefix } = useTabsContext();
|
|
14910
|
+
const { value: activeValue, idPrefix, registerPanel } = useTabsContext();
|
|
14911
|
+
React52__namespace.useEffect(() => registerPanel(value), [registerPanel, value]);
|
|
14700
14912
|
const isSelected = activeValue === value;
|
|
14701
14913
|
const tabId = `${idPrefix}-tab-${value}`;
|
|
14702
14914
|
const panelId = `${idPrefix}-panel-${value}`;
|
|
@@ -14752,11 +14964,11 @@ function createTextarea(props = {}) {
|
|
|
14752
14964
|
};
|
|
14753
14965
|
}
|
|
14754
14966
|
var textareaVariants = cva({
|
|
14755
|
-
base: "flex
|
|
14967
|
+
base: "flex w-full rounded-md border border-input bg-transparent px-3 py-2 shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
|
|
14756
14968
|
variants: {
|
|
14757
14969
|
size: {
|
|
14758
14970
|
sm: "min-h-[40px] text-xs",
|
|
14759
|
-
default: "min-h-[60px]",
|
|
14971
|
+
default: "min-h-[60px] text-sm",
|
|
14760
14972
|
lg: "min-h-[80px] text-base"
|
|
14761
14973
|
}
|
|
14762
14974
|
},
|
|
@@ -16293,7 +16505,7 @@ var badgeItemVariants = cva({
|
|
|
16293
16505
|
}
|
|
16294
16506
|
});
|
|
16295
16507
|
var progressBarVariants = cva({
|
|
16296
|
-
base: "
|
|
16508
|
+
base: "w-full overflow-hidden rounded-full bg-secondary",
|
|
16297
16509
|
variants: {
|
|
16298
16510
|
size: {
|
|
16299
16511
|
sm: "h-1",
|
|
@@ -18518,10 +18730,9 @@ function getInitials(name) {
|
|
|
18518
18730
|
}
|
|
18519
18731
|
function createAvatar(props = {}) {
|
|
18520
18732
|
const { src, alt = "", fallback = "", size = "md" } = props;
|
|
18521
|
-
const ariaProps = {
|
|
18522
|
-
role: "img"
|
|
18523
|
-
};
|
|
18733
|
+
const ariaProps = {};
|
|
18524
18734
|
if (alt) {
|
|
18735
|
+
ariaProps.role = "img";
|
|
18525
18736
|
ariaProps["aria-label"] = alt;
|
|
18526
18737
|
}
|
|
18527
18738
|
const fallbackText = fallback ? getInitials(fallback) : alt ? getInitials(alt) : "";
|
|
@@ -18551,8 +18762,12 @@ var avatarTokens = {
|
|
|
18551
18762
|
}
|
|
18552
18763
|
};
|
|
18553
18764
|
var avatarVariants = cva({
|
|
18554
|
-
base: "relative flex shrink-0 overflow-hidden
|
|
18765
|
+
base: "relative flex shrink-0 overflow-hidden",
|
|
18555
18766
|
variants: {
|
|
18767
|
+
shape: {
|
|
18768
|
+
circle: "rounded-full",
|
|
18769
|
+
square: "rounded-md"
|
|
18770
|
+
},
|
|
18556
18771
|
size: {
|
|
18557
18772
|
xs: "h-6 w-6",
|
|
18558
18773
|
sm: "h-8 w-8",
|
|
@@ -18562,6 +18777,7 @@ var avatarVariants = cva({
|
|
|
18562
18777
|
}
|
|
18563
18778
|
},
|
|
18564
18779
|
defaultVariants: {
|
|
18780
|
+
shape: "circle",
|
|
18565
18781
|
size: "md"
|
|
18566
18782
|
}
|
|
18567
18783
|
});
|
|
@@ -18569,7 +18785,7 @@ var avatarImageVariants = cva({
|
|
|
18569
18785
|
base: "aspect-square h-full w-full object-cover"
|
|
18570
18786
|
});
|
|
18571
18787
|
var avatarFallbackVariants = cva({
|
|
18572
|
-
base: "flex h-full w-full items-center justify-center rounded-
|
|
18788
|
+
base: "flex h-full w-full items-center justify-center rounded-[inherit] bg-muted text-muted-foreground",
|
|
18573
18789
|
variants: {
|
|
18574
18790
|
size: {
|
|
18575
18791
|
xs: "text-xs",
|
|
@@ -18593,15 +18809,15 @@ var AvatarContext = React52__namespace.createContext({
|
|
|
18593
18809
|
}
|
|
18594
18810
|
});
|
|
18595
18811
|
var Avatar2 = React52__namespace.forwardRef(
|
|
18596
|
-
function Avatar22({ size = "md", className, children, ...props }, ref) {
|
|
18812
|
+
function Avatar22({ size = "md", shape = "circle", className, children, ...props }, ref) {
|
|
18597
18813
|
const [imageLoaded, setImageLoaded] = React52__namespace.useState(false);
|
|
18598
18814
|
const [imageError, setImageError] = React52__namespace.useState(false);
|
|
18599
|
-
const api = createAvatar({ size });
|
|
18815
|
+
const api = createAvatar({ size, alt: props["aria-label"] });
|
|
18600
18816
|
return /* @__PURE__ */ jsxRuntime.jsx(AvatarContext.Provider, { value: { size, imageLoaded, imageError, setImageLoaded, setImageError }, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
18601
18817
|
"span",
|
|
18602
18818
|
{
|
|
18603
18819
|
ref,
|
|
18604
|
-
className: cn(avatarVariants({ size }), className),
|
|
18820
|
+
className: cn(avatarVariants({ size, shape }), className),
|
|
18605
18821
|
...api.ariaProps,
|
|
18606
18822
|
...api.dataAttributes,
|
|
18607
18823
|
...props,
|
|
@@ -18875,9 +19091,9 @@ var cardFooterVariants = cva({
|
|
|
18875
19091
|
base: "flex items-center p-6 pt-0"
|
|
18876
19092
|
});
|
|
18877
19093
|
var Card = React52__namespace.forwardRef(
|
|
18878
|
-
function Card2({ className, variant, asChild = false, ...props }, ref) {
|
|
19094
|
+
function Card2({ className, variant, padding, asChild = false, ...props }, ref) {
|
|
18879
19095
|
const api = createCard();
|
|
18880
|
-
const classes = cn(cardVariants({ variant }), className);
|
|
19096
|
+
const classes = cn(cardVariants({ variant, padding }), className);
|
|
18881
19097
|
if (asChild) {
|
|
18882
19098
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
18883
19099
|
Slot,
|
|
@@ -18917,10 +19133,10 @@ var CardHeader = React52__namespace.forwardRef(
|
|
|
18917
19133
|
}
|
|
18918
19134
|
);
|
|
18919
19135
|
var CardTitle = React52__namespace.forwardRef(
|
|
18920
|
-
function CardTitle2({ className, ...props }, ref) {
|
|
19136
|
+
function CardTitle2({ className, as: Heading = "h3", ...props }, ref) {
|
|
18921
19137
|
const api = createCardTitle();
|
|
18922
19138
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
18923
|
-
|
|
19139
|
+
Heading,
|
|
18924
19140
|
{
|
|
18925
19141
|
ref,
|
|
18926
19142
|
className: cn(cardTitleVariants(), className),
|
|
@@ -20479,13 +20695,12 @@ function createSelect(props = {}) {
|
|
|
20479
20695
|
} = props;
|
|
20480
20696
|
const isInteractive = !disabled;
|
|
20481
20697
|
const selectedOption = options.find((o) => o.value === value);
|
|
20482
|
-
const triggerId = generateId("select-trigger");
|
|
20483
|
-
const contentId = generateId("select-content");
|
|
20698
|
+
const triggerId = props.ids?.trigger ?? generateId("select-trigger");
|
|
20699
|
+
const contentId = props.ids?.content ?? generateId("select-content");
|
|
20484
20700
|
const triggerAriaProps = {
|
|
20485
20701
|
role: "combobox",
|
|
20486
20702
|
"aria-expanded": open,
|
|
20487
|
-
"aria-controls": contentId
|
|
20488
|
-
"aria-labelledby": triggerId
|
|
20703
|
+
"aria-controls": contentId
|
|
20489
20704
|
};
|
|
20490
20705
|
if (disabled) {
|
|
20491
20706
|
triggerAriaProps["aria-disabled"] = true;
|
|
@@ -20567,7 +20782,7 @@ var selectTokens = {
|
|
|
20567
20782
|
}
|
|
20568
20783
|
};
|
|
20569
20784
|
var selectTriggerVariants = cva({
|
|
20570
|
-
base: "flex
|
|
20785
|
+
base: "flex w-full items-center justify-between rounded-md border border-input bg-transparent px-3 py-2 shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
|
|
20571
20786
|
variants: {
|
|
20572
20787
|
size: {
|
|
20573
20788
|
sm: "h-8 text-xs",
|
|
@@ -20580,10 +20795,10 @@ var selectTriggerVariants = cva({
|
|
|
20580
20795
|
}
|
|
20581
20796
|
});
|
|
20582
20797
|
var selectContentVariants = cva({
|
|
20583
|
-
base: "
|
|
20798
|
+
base: "absolute left-0 top-full z-50 mt-1 max-h-96 w-full min-w-[8rem] overflow-y-auto rounded-md border bg-popover text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95",
|
|
20584
20799
|
variants: {
|
|
20585
20800
|
position: {
|
|
20586
|
-
popper: "
|
|
20801
|
+
popper: "",
|
|
20587
20802
|
"item-aligned": ""
|
|
20588
20803
|
}
|
|
20589
20804
|
},
|
|
@@ -20603,6 +20818,8 @@ var selectItemVariants = cva({
|
|
|
20603
20818
|
selected: "false"
|
|
20604
20819
|
}
|
|
20605
20820
|
});
|
|
20821
|
+
var selectRootClass = "relative";
|
|
20822
|
+
var selectValueClass = "truncate text-left data-[placeholder]:text-muted-foreground";
|
|
20606
20823
|
var SelectContext = React52__namespace.createContext({
|
|
20607
20824
|
__isDefault: true,
|
|
20608
20825
|
value: void 0,
|
|
@@ -20615,7 +20832,10 @@ var SelectContext = React52__namespace.createContext({
|
|
|
20615
20832
|
disabled: false,
|
|
20616
20833
|
placeholder: "Select an option",
|
|
20617
20834
|
triggerId: "",
|
|
20618
|
-
contentId: ""
|
|
20835
|
+
contentId: "",
|
|
20836
|
+
labels: /* @__PURE__ */ new Map(),
|
|
20837
|
+
registerLabel: () => {
|
|
20838
|
+
}
|
|
20619
20839
|
});
|
|
20620
20840
|
function useSelectContext(part) {
|
|
20621
20841
|
const ctx = React52__namespace.useContext(SelectContext);
|
|
@@ -20627,22 +20847,70 @@ function useSelectContext(part) {
|
|
|
20627
20847
|
}
|
|
20628
20848
|
return ctx;
|
|
20629
20849
|
}
|
|
20850
|
+
function collectItemLabels(node, into) {
|
|
20851
|
+
React52__namespace.Children.forEach(node, (child) => {
|
|
20852
|
+
if (!React52__namespace.isValidElement(child)) return;
|
|
20853
|
+
if (child.type === SelectItem && typeof child.props.value === "string") {
|
|
20854
|
+
into.set(child.props.value, child.props.children);
|
|
20855
|
+
return;
|
|
20856
|
+
}
|
|
20857
|
+
collectItemLabels(child.props.children, into);
|
|
20858
|
+
});
|
|
20859
|
+
return into;
|
|
20860
|
+
}
|
|
20630
20861
|
function Select({
|
|
20631
|
-
value,
|
|
20862
|
+
value: controlledValue,
|
|
20863
|
+
defaultValue,
|
|
20632
20864
|
onValueChange,
|
|
20633
20865
|
disabled = false,
|
|
20634
20866
|
children,
|
|
20635
|
-
placeholder = "Select an option"
|
|
20867
|
+
placeholder = "Select an option",
|
|
20868
|
+
className
|
|
20636
20869
|
}) {
|
|
20637
20870
|
const [open, setOpen] = React52__namespace.useState(false);
|
|
20638
|
-
const
|
|
20871
|
+
const [uncontrolledValue, setUncontrolledValue] = React52__namespace.useState(defaultValue);
|
|
20872
|
+
const isControlled = controlledValue !== void 0;
|
|
20873
|
+
const value = isControlled ? controlledValue : uncontrolledValue;
|
|
20874
|
+
const rootRef = React52__namespace.useRef(null);
|
|
20875
|
+
const baseId = React52__namespace.useId();
|
|
20876
|
+
const triggerId = `${baseId}-trigger`;
|
|
20877
|
+
const contentId = `${baseId}-content`;
|
|
20878
|
+
const [registered, setRegistered] = React52__namespace.useState(
|
|
20879
|
+
() => /* @__PURE__ */ new Map()
|
|
20880
|
+
);
|
|
20881
|
+
const registerLabel = React52__namespace.useCallback((itemValue, label) => {
|
|
20882
|
+
setRegistered((prev) => {
|
|
20883
|
+
if (prev.get(itemValue) === label) return prev;
|
|
20884
|
+
const next = new Map(prev);
|
|
20885
|
+
next.set(itemValue, label);
|
|
20886
|
+
return next;
|
|
20887
|
+
});
|
|
20888
|
+
}, []);
|
|
20889
|
+
const labels = React52__namespace.useMemo(
|
|
20890
|
+
() => collectItemLabels(children, new Map(registered)),
|
|
20891
|
+
[children, registered]
|
|
20892
|
+
);
|
|
20893
|
+
React52__namespace.useEffect(() => {
|
|
20894
|
+
if (!open) return;
|
|
20895
|
+
const onPointerDown = (event) => {
|
|
20896
|
+
if (rootRef.current && !rootRef.current.contains(event.target)) setOpen(false);
|
|
20897
|
+
};
|
|
20898
|
+
document.addEventListener("pointerdown", onPointerDown);
|
|
20899
|
+
return () => document.removeEventListener("pointerdown", onPointerDown);
|
|
20900
|
+
}, [open]);
|
|
20901
|
+
const handleValueChange = React52__namespace.useCallback(
|
|
20902
|
+
(next) => {
|
|
20903
|
+
if (!isControlled) setUncontrolledValue(next);
|
|
20904
|
+
onValueChange?.(next);
|
|
20905
|
+
},
|
|
20906
|
+
[isControlled, onValueChange]
|
|
20907
|
+
);
|
|
20639
20908
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
20640
20909
|
SelectContext.Provider,
|
|
20641
20910
|
{
|
|
20642
20911
|
value: {
|
|
20643
20912
|
value,
|
|
20644
|
-
onValueChange:
|
|
20645
|
-
}),
|
|
20913
|
+
onValueChange: handleValueChange,
|
|
20646
20914
|
open,
|
|
20647
20915
|
setOpen: (v2) => {
|
|
20648
20916
|
if (!disabled) setOpen(v2);
|
|
@@ -20650,17 +20918,19 @@ function Select({
|
|
|
20650
20918
|
options: [],
|
|
20651
20919
|
disabled,
|
|
20652
20920
|
placeholder,
|
|
20653
|
-
triggerId
|
|
20654
|
-
contentId
|
|
20921
|
+
triggerId,
|
|
20922
|
+
contentId,
|
|
20923
|
+
labels,
|
|
20924
|
+
registerLabel
|
|
20655
20925
|
},
|
|
20656
|
-
children
|
|
20926
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("div", { ref: rootRef, className: cn(selectRootClass, className), "data-slot": "select", children })
|
|
20657
20927
|
}
|
|
20658
20928
|
);
|
|
20659
20929
|
}
|
|
20660
20930
|
var SelectTrigger = React52__namespace.forwardRef(
|
|
20661
20931
|
function SelectTrigger2({ className, children, size = "default", ...props }, ref) {
|
|
20662
20932
|
const { open, setOpen, disabled, triggerId, contentId } = useSelectContext("SelectTrigger");
|
|
20663
|
-
const api = createSelect({ disabled, open });
|
|
20933
|
+
const api = createSelect({ disabled, open, ids: { trigger: triggerId, content: contentId } });
|
|
20664
20934
|
const handleClick = () => {
|
|
20665
20935
|
if (!disabled) {
|
|
20666
20936
|
setOpen(!open);
|
|
@@ -20691,7 +20961,6 @@ var SelectTrigger = React52__namespace.forwardRef(
|
|
|
20691
20961
|
disabled,
|
|
20692
20962
|
...api.triggerProps.ariaProps,
|
|
20693
20963
|
...api.triggerProps.dataAttributes,
|
|
20694
|
-
"aria-controls": contentId,
|
|
20695
20964
|
...props,
|
|
20696
20965
|
children: [
|
|
20697
20966
|
children,
|
|
@@ -20777,8 +21046,11 @@ var SelectContent = React52__namespace.forwardRef(
|
|
|
20777
21046
|
);
|
|
20778
21047
|
var SelectItem = React52__namespace.forwardRef(
|
|
20779
21048
|
function SelectItem2({ className, children, value: itemValue, disabled: itemDisabled = false, ...props }, ref) {
|
|
20780
|
-
const { value, onValueChange, setOpen, triggerId } = useSelectContext("SelectItem");
|
|
21049
|
+
const { value, onValueChange, setOpen, triggerId, registerLabel } = useSelectContext("SelectItem");
|
|
20781
21050
|
const isSelected = value === itemValue;
|
|
21051
|
+
React52__namespace.useEffect(() => {
|
|
21052
|
+
registerLabel(itemValue, children);
|
|
21053
|
+
}, [registerLabel, itemValue, children]);
|
|
20782
21054
|
const handleClick = () => {
|
|
20783
21055
|
if (!itemDisabled) {
|
|
20784
21056
|
onValueChange(itemValue);
|
|
@@ -20832,6 +21104,23 @@ var SelectItem = React52__namespace.forwardRef(
|
|
|
20832
21104
|
);
|
|
20833
21105
|
}
|
|
20834
21106
|
);
|
|
21107
|
+
var SelectValue = React52__namespace.forwardRef(
|
|
21108
|
+
function SelectValue2({ placeholder, className, children, ...props }, ref) {
|
|
21109
|
+
const ctx = useSelectContext("SelectValue");
|
|
21110
|
+
const label = ctx.value !== void 0 ? ctx.labels.get(ctx.value) : void 0;
|
|
21111
|
+
const showPlaceholder = children == null && label === void 0;
|
|
21112
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
21113
|
+
"span",
|
|
21114
|
+
{
|
|
21115
|
+
ref,
|
|
21116
|
+
className: cn(selectValueClass, className),
|
|
21117
|
+
"data-placeholder": showPlaceholder ? "" : void 0,
|
|
21118
|
+
...props,
|
|
21119
|
+
children: children ?? (showPlaceholder ? placeholder ?? ctx.placeholder : label)
|
|
21120
|
+
}
|
|
21121
|
+
);
|
|
21122
|
+
}
|
|
21123
|
+
);
|
|
20835
21124
|
|
|
20836
21125
|
// ../status-indicator/dist/index.js
|
|
20837
21126
|
var STATUS_INDICATOR_COLORS = {
|
|
@@ -21613,7 +21902,9 @@ function createCallout(props = {}) {
|
|
|
21613
21902
|
const ariaProps = {};
|
|
21614
21903
|
if (props.role) {
|
|
21615
21904
|
ariaProps.role = props.role;
|
|
21616
|
-
} else {
|
|
21905
|
+
} else if (props.destructive) {
|
|
21906
|
+
ariaProps.role = "alert";
|
|
21907
|
+
} else if (props.labelled) {
|
|
21617
21908
|
ariaProps.role = "region";
|
|
21618
21909
|
}
|
|
21619
21910
|
return {
|
|
@@ -21656,7 +21947,10 @@ var calloutDescriptionVariants = cva({
|
|
|
21656
21947
|
});
|
|
21657
21948
|
var Callout = React52__namespace.forwardRef(
|
|
21658
21949
|
function Callout2({ className, variant, asChild = false, ...props }, ref) {
|
|
21659
|
-
const api = createCallout({
|
|
21950
|
+
const api = createCallout({
|
|
21951
|
+
destructive: variant === "destructive",
|
|
21952
|
+
labelled: Boolean(props["aria-label"] || props["aria-labelledby"])
|
|
21953
|
+
});
|
|
21660
21954
|
const classes = cn(calloutVariants({ variant }), className);
|
|
21661
21955
|
if (asChild) {
|
|
21662
21956
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -22460,7 +22754,7 @@ React52__namespace.forwardRef(
|
|
|
22460
22754
|
);
|
|
22461
22755
|
|
|
22462
22756
|
// ../logger/dist/index.js
|
|
22463
|
-
|
|
22757
|
+
init_chunk_OEINJBSK();
|
|
22464
22758
|
var LEVEL_ORDER = {
|
|
22465
22759
|
debug: 10,
|
|
22466
22760
|
info: 20,
|
|
@@ -22611,7 +22905,7 @@ function createTelemetry(config3) {
|
|
|
22611
22905
|
addSinkInternal(createConsoleSink({ pretty: preset.pretty }));
|
|
22612
22906
|
if (config3.endpoint) {
|
|
22613
22907
|
const endpoint = config3.endpoint;
|
|
22614
|
-
void Promise.resolve().then(() => (
|
|
22908
|
+
void Promise.resolve().then(() => (init_faro_engine_VIUXJAPH(), faro_engine_VIUXJAPH_exports)).then(({ createFaroSink: createFaroSink2 }) => createFaroSink2({ app: config3.app, endpoint })).then((faro) => {
|
|
22615
22909
|
if (faro) addSinkInternal(faro);
|
|
22616
22910
|
}).catch(() => {
|
|
22617
22911
|
});
|
|
@@ -23994,7 +24288,11 @@ function createClientSdkSink(opts) {
|
|
|
23994
24288
|
});
|
|
23995
24289
|
return instance;
|
|
23996
24290
|
}
|
|
23997
|
-
const mod = await import(
|
|
24291
|
+
const mod = await import(
|
|
24292
|
+
/* webpackIgnore: true */
|
|
24293
|
+
/* @vite-ignore */
|
|
24294
|
+
appInsightsWebSpecifier
|
|
24295
|
+
);
|
|
23998
24296
|
const ai = new mod.ApplicationInsights({
|
|
23999
24297
|
config: {
|
|
24000
24298
|
connectionString: opts.connectionString,
|
|
@@ -24345,7 +24643,11 @@ function createPostHogHttpSink(options) {
|
|
|
24345
24643
|
}
|
|
24346
24644
|
var posthogJsSpecifier = "posthog-js";
|
|
24347
24645
|
async function defaultLoad() {
|
|
24348
|
-
const mod = await import(
|
|
24646
|
+
const mod = await import(
|
|
24647
|
+
/* webpackIgnore: true */
|
|
24648
|
+
/* @vite-ignore */
|
|
24649
|
+
posthogJsSpecifier
|
|
24650
|
+
);
|
|
24349
24651
|
return "default" in mod ? mod.default : mod;
|
|
24350
24652
|
}
|
|
24351
24653
|
function createPostHogClientSdkSink(options) {
|
|
@@ -24437,7 +24739,11 @@ function createPostHogSink(options) {
|
|
|
24437
24739
|
// ../analytics-sink-posthog/dist/replay.js
|
|
24438
24740
|
var posthogJsSpecifier2 = "posthog-js";
|
|
24439
24741
|
async function defaultLoad2() {
|
|
24440
|
-
const mod = await import(
|
|
24742
|
+
const mod = await import(
|
|
24743
|
+
/* webpackIgnore: true */
|
|
24744
|
+
/* @vite-ignore */
|
|
24745
|
+
posthogJsSpecifier2
|
|
24746
|
+
);
|
|
24441
24747
|
return "default" in mod ? mod.default : mod;
|
|
24442
24748
|
}
|
|
24443
24749
|
async function startSessionReplay(options) {
|
|
@@ -25929,7 +26235,7 @@ function createEditorTabs(props = {}) {
|
|
|
25929
26235
|
}
|
|
25930
26236
|
return { ariaProps, dataAttributes };
|
|
25931
26237
|
}
|
|
25932
|
-
function
|
|
26238
|
+
function getNextTabIndex2(currentIndex, key, count) {
|
|
25933
26239
|
if (count <= 0) return currentIndex;
|
|
25934
26240
|
switch (key) {
|
|
25935
26241
|
case "ArrowRight":
|
|
@@ -25987,7 +26293,7 @@ var EditorTabs = React52__namespace.forwardRef(
|
|
|
25987
26293
|
const activeIndex = tabs.findIndex((t) => t.id === activeId);
|
|
25988
26294
|
const tabbableIndex = activeIndex === -1 ? 0 : activeIndex;
|
|
25989
26295
|
const handleKeyDown = (event, index2) => {
|
|
25990
|
-
const next =
|
|
26296
|
+
const next = getNextTabIndex2(index2, event.key, tabs.length);
|
|
25991
26297
|
if (next !== index2) {
|
|
25992
26298
|
event.preventDefault();
|
|
25993
26299
|
onSelect(tabs[next].id);
|
|
@@ -28523,9 +28829,9 @@ var MiniMap = React52__namespace.forwardRef(
|
|
|
28523
28829
|
|
|
28524
28830
|
// ../section-head/dist/index.js
|
|
28525
28831
|
function createSectionHead(props = {}) {
|
|
28526
|
-
const { align = "center" } = props;
|
|
28832
|
+
const { align: align2 = "center" } = props;
|
|
28527
28833
|
const dataAttributes = {
|
|
28528
|
-
"data-align":
|
|
28834
|
+
"data-align": align2
|
|
28529
28835
|
};
|
|
28530
28836
|
return { dataAttributes };
|
|
28531
28837
|
}
|
|
@@ -28549,17 +28855,17 @@ var SectionHead = React52__namespace.forwardRef(
|
|
|
28549
28855
|
kicker,
|
|
28550
28856
|
title,
|
|
28551
28857
|
lede,
|
|
28552
|
-
align = "center",
|
|
28858
|
+
align: align2 = "center",
|
|
28553
28859
|
as: Tag = "h2",
|
|
28554
28860
|
className,
|
|
28555
28861
|
...props
|
|
28556
28862
|
}, ref) {
|
|
28557
|
-
const { dataAttributes } = createSectionHead({ align });
|
|
28863
|
+
const { dataAttributes } = createSectionHead({ align: align2 });
|
|
28558
28864
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
28559
28865
|
"div",
|
|
28560
28866
|
{
|
|
28561
28867
|
ref,
|
|
28562
|
-
className: cn(sectionHeadVariants({ align }), className),
|
|
28868
|
+
className: cn(sectionHeadVariants({ align: align2 }), className),
|
|
28563
28869
|
...dataAttributes,
|
|
28564
28870
|
...props,
|
|
28565
28871
|
children: [
|
|
@@ -28574,10 +28880,13 @@ var SectionHead = React52__namespace.forwardRef(
|
|
|
28574
28880
|
|
|
28575
28881
|
// ../stat-grid/dist/index.js
|
|
28576
28882
|
function statColumns(count, max = 3) {
|
|
28577
|
-
if (count <=
|
|
28578
|
-
if (count === 1) return 1;
|
|
28883
|
+
if (count <= 1) return 1;
|
|
28579
28884
|
if (count === 2) return 2;
|
|
28580
|
-
return Math.min(count, max);
|
|
28885
|
+
return Math.min(count, max, 4);
|
|
28886
|
+
}
|
|
28887
|
+
function statColumnsKey(columns) {
|
|
28888
|
+
if (columns === "auto") return "auto";
|
|
28889
|
+
return String(Math.min(Math.max(Math.round(columns), 1), 4));
|
|
28581
28890
|
}
|
|
28582
28891
|
function createStatGrid() {
|
|
28583
28892
|
return {
|
|
@@ -28586,41 +28895,107 @@ function createStatGrid() {
|
|
|
28586
28895
|
};
|
|
28587
28896
|
}
|
|
28588
28897
|
var statGridVariants = cva({
|
|
28589
|
-
base: "grid
|
|
28898
|
+
base: "grid",
|
|
28590
28899
|
variants: {
|
|
28591
28900
|
columns: {
|
|
28592
28901
|
"1": "grid-cols-1",
|
|
28593
|
-
"2": "grid-cols-2",
|
|
28594
|
-
"3": "grid-cols-3"
|
|
28902
|
+
"2": "grid-cols-1 sm:grid-cols-2",
|
|
28903
|
+
"3": "grid-cols-1 sm:grid-cols-2 lg:grid-cols-3",
|
|
28904
|
+
"4": "grid-cols-1 sm:grid-cols-2 lg:grid-cols-4",
|
|
28905
|
+
auto: "grid-cols-[repeat(auto-fill,minmax(12rem,1fr))]"
|
|
28906
|
+
},
|
|
28907
|
+
variant: {
|
|
28908
|
+
plain: "gap-8",
|
|
28909
|
+
card: "gap-3"
|
|
28595
28910
|
}
|
|
28596
28911
|
},
|
|
28597
28912
|
defaultVariants: {
|
|
28598
|
-
columns: "3"
|
|
28913
|
+
columns: "3",
|
|
28914
|
+
variant: "plain"
|
|
28599
28915
|
}
|
|
28600
28916
|
});
|
|
28601
|
-
var
|
|
28602
|
-
|
|
28603
|
-
|
|
28917
|
+
var statItemVariants = cva({
|
|
28918
|
+
base: "flex min-w-0 flex-col",
|
|
28919
|
+
variants: {
|
|
28920
|
+
variant: {
|
|
28921
|
+
plain: "",
|
|
28922
|
+
card: "gap-1 rounded-lg border border-border bg-card p-4 text-card-foreground"
|
|
28923
|
+
}
|
|
28924
|
+
},
|
|
28925
|
+
defaultVariants: {
|
|
28926
|
+
variant: "plain"
|
|
28927
|
+
}
|
|
28928
|
+
});
|
|
28929
|
+
var statValueVariants = cva({
|
|
28930
|
+
base: "font-bold tabular-nums",
|
|
28931
|
+
variants: {
|
|
28932
|
+
variant: {
|
|
28933
|
+
plain: "text-xl sm:text-2xl",
|
|
28934
|
+
card: "text-2xl leading-tight"
|
|
28935
|
+
},
|
|
28936
|
+
tone: {
|
|
28937
|
+
default: "",
|
|
28938
|
+
positive: "text-success",
|
|
28939
|
+
negative: "text-destructive",
|
|
28940
|
+
caution: "text-warning"
|
|
28941
|
+
}
|
|
28942
|
+
},
|
|
28943
|
+
compoundVariants: [
|
|
28944
|
+
{ variant: "plain", tone: "default", class: "text-primary" },
|
|
28945
|
+
{ variant: "card", tone: "default", class: "text-foreground" }
|
|
28946
|
+
],
|
|
28947
|
+
defaultVariants: {
|
|
28948
|
+
variant: "plain",
|
|
28949
|
+
tone: "default"
|
|
28950
|
+
}
|
|
28951
|
+
});
|
|
28952
|
+
var statLabelVariants = cva({
|
|
28953
|
+
base: "text-muted-foreground",
|
|
28954
|
+
variants: {
|
|
28955
|
+
layout: {
|
|
28956
|
+
"value-first": "mt-1 text-sm leading-snug",
|
|
28957
|
+
"label-first": "text-xs uppercase tracking-wide"
|
|
28958
|
+
}
|
|
28959
|
+
},
|
|
28960
|
+
defaultVariants: {
|
|
28961
|
+
layout: "value-first"
|
|
28962
|
+
}
|
|
28963
|
+
});
|
|
28964
|
+
var statDescriptionClass = "text-xs leading-snug text-muted-foreground";
|
|
28604
28965
|
var StatGrid = React52__namespace.forwardRef(
|
|
28605
|
-
function StatGrid2({ items, columns, className, ...props }, ref) {
|
|
28606
|
-
const cols = columns ?? statColumns(items.length);
|
|
28966
|
+
function StatGrid2({ items, columns, variant = "plain", layout = "value-first", className, ...props }, ref) {
|
|
28967
|
+
const cols = statColumnsKey(columns ?? statColumns(items.length));
|
|
28607
28968
|
const { ariaProps, dataAttributes } = createStatGrid();
|
|
28608
28969
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
28609
28970
|
"div",
|
|
28610
28971
|
{
|
|
28611
28972
|
ref,
|
|
28612
|
-
className: cn(
|
|
28613
|
-
|
|
28614
|
-
|
|
28615
|
-
),
|
|
28616
|
-
style: { gridTemplateColumns: `repeat(${cols}, 1fr)` },
|
|
28973
|
+
className: cn(statGridVariants({ columns: cols, variant }), className),
|
|
28974
|
+
"data-variant": variant,
|
|
28975
|
+
"data-layout": layout,
|
|
28617
28976
|
...ariaProps,
|
|
28618
28977
|
...dataAttributes,
|
|
28619
28978
|
...props,
|
|
28620
|
-
children: items.map((item, index2) =>
|
|
28621
|
-
|
|
28622
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
28623
|
-
|
|
28979
|
+
children: items.map((item, index2) => {
|
|
28980
|
+
const { className: itemClassName, ...itemProps } = item.props ?? {};
|
|
28981
|
+
const label = /* @__PURE__ */ jsxRuntime.jsx("span", { className: statLabelVariants({ layout }), children: item.label });
|
|
28982
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
28983
|
+
"div",
|
|
28984
|
+
{
|
|
28985
|
+
role: "listitem",
|
|
28986
|
+
className: cn(statItemVariants({ variant }), itemClassName),
|
|
28987
|
+
"data-tone": item.tone ?? "default",
|
|
28988
|
+
...itemProps,
|
|
28989
|
+
children: [
|
|
28990
|
+
layout === "label-first" && label,
|
|
28991
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: statValueVariants({ variant, tone: item.tone ?? "default" }), children: item.value }),
|
|
28992
|
+
layout === "value-first" && label,
|
|
28993
|
+
item.description != null && /* @__PURE__ */ jsxRuntime.jsx("span", { className: statDescriptionClass, children: item.description })
|
|
28994
|
+
]
|
|
28995
|
+
},
|
|
28996
|
+
item.id ?? index2
|
|
28997
|
+
);
|
|
28998
|
+
})
|
|
28624
28999
|
}
|
|
28625
29000
|
);
|
|
28626
29001
|
}
|
|
@@ -29672,11 +30047,624 @@ var SlotPicker = React52__namespace.forwardRef(
|
|
|
29672
30047
|
}
|
|
29673
30048
|
);
|
|
29674
30049
|
|
|
30050
|
+
// ../action-list/dist/index.js
|
|
30051
|
+
function createActionListItem(props = {}) {
|
|
30052
|
+
const { disabled = false, density = "default" } = props;
|
|
30053
|
+
const dataAttributes = {
|
|
30054
|
+
"data-slot": "action-list-item",
|
|
30055
|
+
"data-density": density
|
|
30056
|
+
};
|
|
30057
|
+
if (disabled) dataAttributes["data-disabled"] = "";
|
|
30058
|
+
const ariaProps = {};
|
|
30059
|
+
if (disabled) ariaProps["aria-disabled"] = true;
|
|
30060
|
+
return { ariaProps, dataAttributes };
|
|
30061
|
+
}
|
|
30062
|
+
var actionListClass = "m-0 flex list-none flex-col divide-y divide-border-subtle p-0";
|
|
30063
|
+
var actionListItemVariants = cva({
|
|
30064
|
+
base: "flex w-full items-center gap-4 bg-transparent text-left text-sm text-foreground transition-colors hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",
|
|
30065
|
+
variants: {
|
|
30066
|
+
density: {
|
|
30067
|
+
default: "px-4 py-3",
|
|
30068
|
+
compact: "px-3 py-2"
|
|
30069
|
+
}
|
|
30070
|
+
},
|
|
30071
|
+
defaultVariants: {
|
|
30072
|
+
density: "default"
|
|
30073
|
+
}
|
|
30074
|
+
});
|
|
30075
|
+
var actionListItemBodyClass = "flex min-w-0 flex-1 flex-col gap-0.5";
|
|
30076
|
+
var actionListItemTitleClass = "break-words font-semibold text-foreground";
|
|
30077
|
+
var actionListItemDescriptionClass = "break-words text-xs text-muted-foreground";
|
|
30078
|
+
var actionListItemMetaClass = "break-words text-xs text-muted-foreground";
|
|
30079
|
+
var actionListItemTrailingClass = "flex flex-none items-center gap-4 text-xs tabular-nums text-muted-foreground";
|
|
30080
|
+
var ActionList = React52__namespace.forwardRef(function ActionList2({ className, ...props }, ref) {
|
|
30081
|
+
return /* @__PURE__ */ jsxRuntime.jsx("ul", { ref, className: cn(actionListClass, className), "data-slot": "action-list", ...props });
|
|
30082
|
+
});
|
|
30083
|
+
var ActionListItem = React52__namespace.forwardRef(
|
|
30084
|
+
function ActionListItem2({ title, description, meta, trailing, density = "default", disabled, className, ...props }, ref) {
|
|
30085
|
+
const api = createActionListItem({ disabled, density });
|
|
30086
|
+
return /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
30087
|
+
"button",
|
|
30088
|
+
{
|
|
30089
|
+
ref,
|
|
30090
|
+
type: "button",
|
|
30091
|
+
disabled,
|
|
30092
|
+
className: cn(actionListItemVariants({ density }), className),
|
|
30093
|
+
...api.ariaProps,
|
|
30094
|
+
...api.dataAttributes,
|
|
30095
|
+
...props,
|
|
30096
|
+
children: [
|
|
30097
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: actionListItemBodyClass, children: [
|
|
30098
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: actionListItemTitleClass, children: title }),
|
|
30099
|
+
description != null && /* @__PURE__ */ jsxRuntime.jsx("span", { className: actionListItemDescriptionClass, children: description }),
|
|
30100
|
+
meta != null && /* @__PURE__ */ jsxRuntime.jsx("span", { className: actionListItemMetaClass, children: meta })
|
|
30101
|
+
] }),
|
|
30102
|
+
trailing != null && /* @__PURE__ */ jsxRuntime.jsx("span", { className: actionListItemTrailingClass, children: trailing })
|
|
30103
|
+
]
|
|
30104
|
+
}
|
|
30105
|
+
) });
|
|
30106
|
+
}
|
|
30107
|
+
);
|
|
30108
|
+
|
|
30109
|
+
// ../funnel-chart/dist/index.js
|
|
30110
|
+
var DEFAULT_FUNNEL_MIN_BAR_PERCENT = 6;
|
|
30111
|
+
var percentOf = (part, whole) => whole ? part / whole * 100 : 0;
|
|
30112
|
+
function computeFunnel(steps, minBarPercent = DEFAULT_FUNNEL_MIN_BAR_PERCENT) {
|
|
30113
|
+
const top = steps.length ? steps[0].value : 0;
|
|
30114
|
+
return steps.map((step, i) => {
|
|
30115
|
+
const shareOfTop = percentOf(step.value, top);
|
|
30116
|
+
const following = steps[i + 1];
|
|
30117
|
+
return {
|
|
30118
|
+
step,
|
|
30119
|
+
shareOfTop,
|
|
30120
|
+
barPercent: Math.min(100, Math.max(shareOfTop, minBarPercent)),
|
|
30121
|
+
next: following ? {
|
|
30122
|
+
conversion: percentOf(following.value, step.value),
|
|
30123
|
+
dropped: step.value - following.value
|
|
30124
|
+
} : void 0
|
|
30125
|
+
};
|
|
30126
|
+
});
|
|
30127
|
+
}
|
|
30128
|
+
var funnelChartDefaults = {
|
|
30129
|
+
formatValue: (value) => value.toLocaleString("en-US"),
|
|
30130
|
+
formatPercent: (percent) => `${percent.toFixed(1)}%`,
|
|
30131
|
+
shareLabel: (share) => `${share} of top`,
|
|
30132
|
+
conversionLabel: (percent) => `${percent} continue`,
|
|
30133
|
+
droppedLabel: (count) => `\u2212${count} dropped`
|
|
30134
|
+
};
|
|
30135
|
+
var funnelChartClasses = {
|
|
30136
|
+
root: "m-0 grid list-none p-0",
|
|
30137
|
+
bar: "relative flex items-center gap-3 overflow-hidden rounded-lg border border-border bg-background px-3.5 py-3",
|
|
30138
|
+
fill: "absolute inset-y-0 left-0 border-r-2 border-primary bg-accent",
|
|
30139
|
+
chevron: "relative shrink-0 text-primary",
|
|
30140
|
+
text: "relative grid min-w-0 flex-1",
|
|
30141
|
+
label: "text-[13px] font-bold text-foreground",
|
|
30142
|
+
description: "text-[11px] text-muted-foreground",
|
|
30143
|
+
figure: "relative grid text-right",
|
|
30144
|
+
value: "text-[15px] font-bold tabular-nums text-foreground",
|
|
30145
|
+
share: "text-[10.5px] text-muted-foreground",
|
|
30146
|
+
transition: "flex items-center gap-2 py-1.5 pl-[18px] text-[11px] text-muted-foreground",
|
|
30147
|
+
conversion: "font-semibold text-success",
|
|
30148
|
+
dropped: "font-semibold text-destructive"
|
|
30149
|
+
};
|
|
30150
|
+
function Chevron() {
|
|
30151
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
30152
|
+
"svg",
|
|
30153
|
+
{
|
|
30154
|
+
className: funnelChartClasses.chevron,
|
|
30155
|
+
width: "15",
|
|
30156
|
+
height: "15",
|
|
30157
|
+
viewBox: "0 0 24 24",
|
|
30158
|
+
fill: "none",
|
|
30159
|
+
stroke: "currentColor",
|
|
30160
|
+
strokeWidth: "2",
|
|
30161
|
+
strokeLinecap: "round",
|
|
30162
|
+
strokeLinejoin: "round",
|
|
30163
|
+
"aria-hidden": "true",
|
|
30164
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "m9 18 6-6-6-6" })
|
|
30165
|
+
}
|
|
30166
|
+
);
|
|
30167
|
+
}
|
|
30168
|
+
var FunnelChart = React52__namespace.forwardRef(function FunnelChart2({
|
|
30169
|
+
steps,
|
|
30170
|
+
formatValue = funnelChartDefaults.formatValue,
|
|
30171
|
+
formatPercent = funnelChartDefaults.formatPercent,
|
|
30172
|
+
minBarPercent = DEFAULT_FUNNEL_MIN_BAR_PERCENT,
|
|
30173
|
+
shareLabel = funnelChartDefaults.shareLabel,
|
|
30174
|
+
conversionLabel = funnelChartDefaults.conversionLabel,
|
|
30175
|
+
droppedLabel = funnelChartDefaults.droppedLabel,
|
|
30176
|
+
className,
|
|
30177
|
+
...rest
|
|
30178
|
+
}, ref) {
|
|
30179
|
+
const rows = React52__namespace.useMemo(() => computeFunnel(steps, minBarPercent), [steps, minBarPercent]);
|
|
30180
|
+
return /* @__PURE__ */ jsxRuntime.jsx("ol", { ref, className: cn(funnelChartClasses.root, className), "data-slot": "funnel-chart", ...rest, children: rows.map((row) => /* @__PURE__ */ jsxRuntime.jsxs("li", { children: [
|
|
30181
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: funnelChartClasses.bar, children: [
|
|
30182
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: funnelChartClasses.fill, style: { width: `${row.barPercent}%` }, "aria-hidden": "true" }),
|
|
30183
|
+
/* @__PURE__ */ jsxRuntime.jsx(Chevron, {}),
|
|
30184
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: funnelChartClasses.text, children: [
|
|
30185
|
+
/* @__PURE__ */ jsxRuntime.jsx("b", { className: funnelChartClasses.label, children: row.step.label }),
|
|
30186
|
+
row.step.description && /* @__PURE__ */ jsxRuntime.jsx("span", { className: funnelChartClasses.description, children: row.step.description })
|
|
30187
|
+
] }),
|
|
30188
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: funnelChartClasses.figure, children: [
|
|
30189
|
+
/* @__PURE__ */ jsxRuntime.jsx("b", { className: funnelChartClasses.value, children: formatValue(row.step.value) }),
|
|
30190
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: funnelChartClasses.share, children: shareLabel(formatPercent(row.shareOfTop)) })
|
|
30191
|
+
] })
|
|
30192
|
+
] }),
|
|
30193
|
+
row.next && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: funnelChartClasses.transition, children: [
|
|
30194
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: funnelChartClasses.conversion, children: conversionLabel(formatPercent(row.next.conversion)) }),
|
|
30195
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": "true", children: "\xB7" }),
|
|
30196
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: funnelChartClasses.dropped, children: droppedLabel(formatValue(row.next.dropped)) })
|
|
30197
|
+
] })
|
|
30198
|
+
] }, row.step.id)) });
|
|
30199
|
+
});
|
|
30200
|
+
|
|
30201
|
+
// ../line-chart/dist/index.js
|
|
30202
|
+
var DEFAULT_LINE_CHART_PADDING = {
|
|
30203
|
+
top: 14,
|
|
30204
|
+
right: 14,
|
|
30205
|
+
bottom: 24,
|
|
30206
|
+
left: 40
|
|
30207
|
+
};
|
|
30208
|
+
var DEFAULT_LINE_CHART_WIDTH = 760;
|
|
30209
|
+
var DEFAULT_LINE_CHART_HEIGHT = 230;
|
|
30210
|
+
var DEFAULT_TICK_COUNT = 4;
|
|
30211
|
+
var DEFAULT_HEADROOM = 1.08;
|
|
30212
|
+
var MIN_LABEL_SPACING = 48;
|
|
30213
|
+
var CHART_TOKEN_COUNT = 5;
|
|
30214
|
+
function lineChartColor(index2) {
|
|
30215
|
+
return `hsl(var(--chart-${index2 % CHART_TOKEN_COUNT + 1}))`;
|
|
30216
|
+
}
|
|
30217
|
+
var NICE_STEPS = [1, 2, 5, 10];
|
|
30218
|
+
function niceScale(rawMax, tickCount) {
|
|
30219
|
+
const intervals = Math.max(1, Math.floor(tickCount));
|
|
30220
|
+
if (!(rawMax > 0)) return { max: 1, step: 1 / intervals, ticks: Array.from({ length: intervals + 1 }, (_2, i) => i / intervals) };
|
|
30221
|
+
const target = rawMax / intervals;
|
|
30222
|
+
const magnitude = 10 ** Math.floor(Math.log10(target));
|
|
30223
|
+
const step = NICE_STEPS.map((m) => m * magnitude).find((candidate) => candidate >= target) ?? 10 * magnitude;
|
|
30224
|
+
const count = Math.ceil(rawMax / step - 1e-9);
|
|
30225
|
+
const decimals = Math.max(0, -Math.floor(Math.log10(step)));
|
|
30226
|
+
const clean = (value) => Number(value.toFixed(decimals));
|
|
30227
|
+
const ticks = Array.from({ length: count + 1 }, (_2, i) => clean(i * step));
|
|
30228
|
+
return { max: ticks[ticks.length - 1], step: clean(step), ticks };
|
|
30229
|
+
}
|
|
30230
|
+
function pathFrom(points) {
|
|
30231
|
+
return points.map(([px, py], i) => (i ? "L" : "M") + px.toFixed(1) + " " + py.toFixed(1)).join(" ");
|
|
30232
|
+
}
|
|
30233
|
+
function computeLineChart(options) {
|
|
30234
|
+
const {
|
|
30235
|
+
series,
|
|
30236
|
+
labels,
|
|
30237
|
+
width,
|
|
30238
|
+
height,
|
|
30239
|
+
tickCount = DEFAULT_TICK_COUNT,
|
|
30240
|
+
headroom = DEFAULT_HEADROOM
|
|
30241
|
+
} = options;
|
|
30242
|
+
const padding = { ...DEFAULT_LINE_CHART_PADDING, ...options.padding };
|
|
30243
|
+
const n = labels.length;
|
|
30244
|
+
const values = series.flatMap((s) => s.data);
|
|
30245
|
+
const peak = values.length ? Math.max(...values) : 0;
|
|
30246
|
+
const scale = niceScale(peak > 0 ? peak * headroom : 0, tickCount);
|
|
30247
|
+
const max = scale.max;
|
|
30248
|
+
const plotW = width - padding.left - padding.right;
|
|
30249
|
+
const plotTop = padding.top;
|
|
30250
|
+
const plotBottom = height - padding.bottom;
|
|
30251
|
+
const plotH = plotBottom - plotTop;
|
|
30252
|
+
const labelEvery = options.labelEvery ?? Math.max(1, Math.ceil(n / Math.max(1, Math.floor(plotW / MIN_LABEL_SPACING))));
|
|
30253
|
+
const x = (index2) => padding.left + (n > 1 ? index2 / (n - 1) * plotW : plotW / 2);
|
|
30254
|
+
const y = (value) => plotTop + (1 - value / max) * plotH;
|
|
30255
|
+
const ticks = scale.ticks.map((value) => ({ value, y: y(value) }));
|
|
30256
|
+
const xLabels = labels.map((label, index2) => ({ index: index2, label, x: x(index2) })).filter(({ index: index2 }) => index2 % labelEvery === 0 || index2 === n - 1);
|
|
30257
|
+
const paths = series.map((s, si) => {
|
|
30258
|
+
const points = s.data.map((v2, i) => [x(i), y(v2)]);
|
|
30259
|
+
const line = pathFrom(points);
|
|
30260
|
+
const first = points.length ? points[0][0] : x(0);
|
|
30261
|
+
const last = points.length ? points[points.length - 1][0] : x(0);
|
|
30262
|
+
const base = y(0).toFixed(1);
|
|
30263
|
+
const area = `${line} L ${last.toFixed(1)} ${base} L ${first.toFixed(1)} ${base} Z`;
|
|
30264
|
+
return { id: s.id, color: s.color ?? lineChartColor(si), line, area };
|
|
30265
|
+
});
|
|
30266
|
+
const colW = n > 1 ? plotW / (n - 1) : plotW;
|
|
30267
|
+
const columns = labels.map((_2, index2) => ({
|
|
30268
|
+
index: index2,
|
|
30269
|
+
x: x(index2) - colW / 2,
|
|
30270
|
+
width: colW
|
|
30271
|
+
}));
|
|
30272
|
+
return { width, height, padding, max, ticks, xLabels, paths, columns, x, y, plotTop, plotBottom };
|
|
30273
|
+
}
|
|
30274
|
+
function tooltipLeftPercent(geometry, index2) {
|
|
30275
|
+
return geometry.x(index2) / geometry.width * 100;
|
|
30276
|
+
}
|
|
30277
|
+
function nextLineChartIndex(current, key, count) {
|
|
30278
|
+
if (count === 0) return null;
|
|
30279
|
+
const last = count - 1;
|
|
30280
|
+
switch (key) {
|
|
30281
|
+
case "ArrowRight":
|
|
30282
|
+
return current == null ? 0 : Math.min(current + 1, last);
|
|
30283
|
+
case "ArrowLeft":
|
|
30284
|
+
return current == null ? last : Math.max(current - 1, 0);
|
|
30285
|
+
case "Home":
|
|
30286
|
+
return 0;
|
|
30287
|
+
case "End":
|
|
30288
|
+
return last;
|
|
30289
|
+
default:
|
|
30290
|
+
return current;
|
|
30291
|
+
}
|
|
30292
|
+
}
|
|
30293
|
+
var lineChartClasses = {
|
|
30294
|
+
root: "relative",
|
|
30295
|
+
svg: "block w-full rounded-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
30296
|
+
gridline: "stroke-border",
|
|
30297
|
+
axis: "fill-muted-foreground text-[9px]",
|
|
30298
|
+
crosshair: "stroke-border",
|
|
30299
|
+
marker: "stroke-card",
|
|
30300
|
+
tooltip: "pointer-events-none absolute z-10 -translate-x-1/2 whitespace-nowrap rounded-md bg-tertiary px-2.5 py-2 text-[11px] text-tertiary-foreground shadow-lg",
|
|
30301
|
+
tooltipLabel: "mb-1 opacity-60",
|
|
30302
|
+
tooltipRow: "flex justify-between gap-2",
|
|
30303
|
+
legend: "mt-2.5 flex flex-wrap gap-3.5",
|
|
30304
|
+
legendItem: "inline-flex items-center gap-1.5 text-[11px] text-muted-foreground",
|
|
30305
|
+
legendSwatch: "h-[3px] w-2.5 rounded-sm"
|
|
30306
|
+
};
|
|
30307
|
+
var defaultFormat = (value) => String(Math.round(value));
|
|
30308
|
+
var MARKER_RADIUS = 3.5;
|
|
30309
|
+
var STROKE_WIDTH = 2.2;
|
|
30310
|
+
var TOOLTIP_TOP_PX = 8;
|
|
30311
|
+
var useIsomorphicLayoutEffect2 = typeof window !== "undefined" ? React52__namespace.useLayoutEffect : React52__namespace.useEffect;
|
|
30312
|
+
function useMeasuredWidth(ref) {
|
|
30313
|
+
const [measured, setMeasured] = React52__namespace.useState(null);
|
|
30314
|
+
useIsomorphicLayoutEffect2(() => {
|
|
30315
|
+
const node = ref.current;
|
|
30316
|
+
if (!node || typeof ResizeObserver === "undefined") return;
|
|
30317
|
+
const apply = (w) => {
|
|
30318
|
+
const rounded = Math.round(w);
|
|
30319
|
+
if (rounded > 0) setMeasured((prev) => prev === rounded ? prev : rounded);
|
|
30320
|
+
};
|
|
30321
|
+
apply(node.getBoundingClientRect().width);
|
|
30322
|
+
const observer = new ResizeObserver((entries) => apply(entries[0]?.contentRect.width ?? 0));
|
|
30323
|
+
observer.observe(node);
|
|
30324
|
+
return () => observer.disconnect();
|
|
30325
|
+
}, [ref]);
|
|
30326
|
+
return measured;
|
|
30327
|
+
}
|
|
30328
|
+
var LineChart = React52__namespace.forwardRef(function LineChart2({
|
|
30329
|
+
series,
|
|
30330
|
+
labels,
|
|
30331
|
+
ariaLabel,
|
|
30332
|
+
height = DEFAULT_LINE_CHART_HEIGHT,
|
|
30333
|
+
width: fallbackWidth = DEFAULT_LINE_CHART_WIDTH,
|
|
30334
|
+
formatValue = defaultFormat,
|
|
30335
|
+
formatTick: formatTick2,
|
|
30336
|
+
area,
|
|
30337
|
+
showLegend = true,
|
|
30338
|
+
className,
|
|
30339
|
+
...rest
|
|
30340
|
+
}, forwardedRef) {
|
|
30341
|
+
const rootRef = React52__namespace.useRef(null);
|
|
30342
|
+
const ref = React52__namespace.useCallback(
|
|
30343
|
+
(node) => {
|
|
30344
|
+
rootRef.current = node;
|
|
30345
|
+
if (typeof forwardedRef === "function") forwardedRef(node);
|
|
30346
|
+
else if (forwardedRef) forwardedRef.current = node;
|
|
30347
|
+
},
|
|
30348
|
+
[forwardedRef]
|
|
30349
|
+
);
|
|
30350
|
+
const width = useMeasuredWidth(rootRef) ?? fallbackWidth;
|
|
30351
|
+
const [active, setActive] = React52__namespace.useState(null);
|
|
30352
|
+
const gradientBase = React52__namespace.useId().replace(/:/g, "");
|
|
30353
|
+
const geo = React52__namespace.useMemo(
|
|
30354
|
+
() => computeLineChart({ series, labels, width, height }),
|
|
30355
|
+
[series, labels, width, height]
|
|
30356
|
+
);
|
|
30357
|
+
const fillArea = area ?? series.length === 1;
|
|
30358
|
+
const tick = formatTick2 ?? formatValue;
|
|
30359
|
+
const handleKeyDown = (event) => {
|
|
30360
|
+
const next = nextLineChartIndex(active, event.key, labels.length);
|
|
30361
|
+
if (next === active) return;
|
|
30362
|
+
event.preventDefault();
|
|
30363
|
+
setActive(next);
|
|
30364
|
+
};
|
|
30365
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, className: cn(lineChartClasses.root, className), "data-slot": "line-chart", ...rest, children: [
|
|
30366
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
30367
|
+
"svg",
|
|
30368
|
+
{
|
|
30369
|
+
className: lineChartClasses.svg,
|
|
30370
|
+
viewBox: `0 0 ${width} ${height}`,
|
|
30371
|
+
style: { height },
|
|
30372
|
+
role: "img",
|
|
30373
|
+
"aria-label": ariaLabel,
|
|
30374
|
+
tabIndex: 0,
|
|
30375
|
+
onKeyDown: handleKeyDown,
|
|
30376
|
+
onBlur: () => setActive(null),
|
|
30377
|
+
onMouseLeave: () => setActive(null),
|
|
30378
|
+
children: [
|
|
30379
|
+
geo.ticks.map((t, i) => /* @__PURE__ */ jsxRuntime.jsxs("g", { children: [
|
|
30380
|
+
/* @__PURE__ */ jsxRuntime.jsx("line", { className: lineChartClasses.gridline, x1: geo.padding.left, y1: t.y, x2: width - geo.padding.right, y2: t.y }),
|
|
30381
|
+
/* @__PURE__ */ jsxRuntime.jsx("text", { className: lineChartClasses.axis, x: geo.padding.left - 8, y: t.y + 3, textAnchor: "end", children: tick(t.value) })
|
|
30382
|
+
] }, i)),
|
|
30383
|
+
geo.xLabels.map((l2) => /* @__PURE__ */ jsxRuntime.jsx("text", { className: lineChartClasses.axis, x: l2.x, y: height - 6, textAnchor: "middle", children: l2.label }, l2.index)),
|
|
30384
|
+
geo.paths.map((p, si) => {
|
|
30385
|
+
const gid = `${gradientBase}-${si}`;
|
|
30386
|
+
const value = active != null ? series[si].data[active] : void 0;
|
|
30387
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("g", { children: [
|
|
30388
|
+
fillArea && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
30389
|
+
/* @__PURE__ */ jsxRuntime.jsx("defs", { children: /* @__PURE__ */ jsxRuntime.jsxs("linearGradient", { id: gid, x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
30390
|
+
/* @__PURE__ */ jsxRuntime.jsx("stop", { offset: "0%", stopColor: p.color, stopOpacity: "0.22" }),
|
|
30391
|
+
/* @__PURE__ */ jsxRuntime.jsx("stop", { offset: "100%", stopColor: p.color, stopOpacity: "0" })
|
|
30392
|
+
] }) }),
|
|
30393
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: p.area, fill: `url(#${gid})` })
|
|
30394
|
+
] }),
|
|
30395
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
30396
|
+
"path",
|
|
30397
|
+
{
|
|
30398
|
+
d: p.line,
|
|
30399
|
+
fill: "none",
|
|
30400
|
+
stroke: p.color,
|
|
30401
|
+
strokeWidth: STROKE_WIDTH,
|
|
30402
|
+
strokeLinecap: "round",
|
|
30403
|
+
strokeLinejoin: "round"
|
|
30404
|
+
}
|
|
30405
|
+
),
|
|
30406
|
+
active != null && value != null && /* @__PURE__ */ jsxRuntime.jsx(
|
|
30407
|
+
"circle",
|
|
30408
|
+
{
|
|
30409
|
+
className: lineChartClasses.marker,
|
|
30410
|
+
cx: geo.x(active),
|
|
30411
|
+
cy: geo.y(value),
|
|
30412
|
+
r: MARKER_RADIUS,
|
|
30413
|
+
fill: p.color,
|
|
30414
|
+
strokeWidth: "1.5"
|
|
30415
|
+
}
|
|
30416
|
+
)
|
|
30417
|
+
] }, p.id);
|
|
30418
|
+
}),
|
|
30419
|
+
active != null && /* @__PURE__ */ jsxRuntime.jsx(
|
|
30420
|
+
"line",
|
|
30421
|
+
{
|
|
30422
|
+
className: lineChartClasses.crosshair,
|
|
30423
|
+
x1: geo.x(active),
|
|
30424
|
+
y1: geo.plotTop,
|
|
30425
|
+
x2: geo.x(active),
|
|
30426
|
+
y2: geo.plotBottom,
|
|
30427
|
+
strokeDasharray: "3 3"
|
|
30428
|
+
}
|
|
30429
|
+
),
|
|
30430
|
+
geo.columns.map((col) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
30431
|
+
"rect",
|
|
30432
|
+
{
|
|
30433
|
+
"data-index": col.index,
|
|
30434
|
+
x: col.x,
|
|
30435
|
+
y: 0,
|
|
30436
|
+
width: col.width,
|
|
30437
|
+
height,
|
|
30438
|
+
fill: "transparent",
|
|
30439
|
+
onMouseEnter: () => setActive(col.index)
|
|
30440
|
+
},
|
|
30441
|
+
col.index
|
|
30442
|
+
))
|
|
30443
|
+
]
|
|
30444
|
+
}
|
|
30445
|
+
),
|
|
30446
|
+
active != null && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
30447
|
+
"div",
|
|
30448
|
+
{
|
|
30449
|
+
className: lineChartClasses.tooltip,
|
|
30450
|
+
role: "status",
|
|
30451
|
+
style: { left: `${tooltipLeftPercent(geo, active)}%`, top: TOOLTIP_TOP_PX },
|
|
30452
|
+
children: [
|
|
30453
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: lineChartClasses.tooltipLabel, children: labels[active] }),
|
|
30454
|
+
series.map((s, si) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: lineChartClasses.tooltipRow, children: [
|
|
30455
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: geo.paths[si].color }, children: s.name }),
|
|
30456
|
+
/* @__PURE__ */ jsxRuntime.jsx("b", { children: s.data[active] != null ? formatValue(s.data[active]) : "\u2014" })
|
|
30457
|
+
] }, s.id))
|
|
30458
|
+
]
|
|
30459
|
+
}
|
|
30460
|
+
),
|
|
30461
|
+
showLegend && /* @__PURE__ */ jsxRuntime.jsx("div", { className: lineChartClasses.legend, children: series.map((s, si) => /* @__PURE__ */ jsxRuntime.jsxs("span", { className: lineChartClasses.legendItem, children: [
|
|
30462
|
+
/* @__PURE__ */ jsxRuntime.jsx("i", { className: lineChartClasses.legendSwatch, style: { background: geo.paths[si].color }, "aria-hidden": "true" }),
|
|
30463
|
+
s.name
|
|
30464
|
+
] }, s.id)) })
|
|
30465
|
+
] });
|
|
30466
|
+
});
|
|
30467
|
+
|
|
30468
|
+
// ../page-header/dist/index.js
|
|
30469
|
+
function createPageHeader(props = {}) {
|
|
30470
|
+
return {
|
|
30471
|
+
dataAttributes: {
|
|
30472
|
+
"data-slot": "page-header",
|
|
30473
|
+
"data-has-actions": props.hasActions ? "true" : "false"
|
|
30474
|
+
}
|
|
30475
|
+
};
|
|
30476
|
+
}
|
|
30477
|
+
var pageHeaderClass = "flex flex-wrap items-start justify-between gap-4";
|
|
30478
|
+
var pageHeaderTextClass = "flex min-w-0 flex-1 flex-col gap-1";
|
|
30479
|
+
var pageHeaderKickerClass = "break-words text-[11px] uppercase tracking-wider text-muted-foreground";
|
|
30480
|
+
var pageHeaderTitleClass = "break-words text-xl font-semibold text-foreground";
|
|
30481
|
+
var pageHeaderDescriptionClass = "max-w-prose text-sm text-muted-foreground";
|
|
30482
|
+
var pageHeaderActionsClass = "flex flex-none flex-wrap items-center gap-2";
|
|
30483
|
+
var PageHeader = React52__namespace.forwardRef(function PageHeader2({ kicker, title, description, actions, as: Title = "h1", className, ...props }, ref) {
|
|
30484
|
+
const { dataAttributes } = createPageHeader({ hasActions: actions != null });
|
|
30485
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("header", { ref, className: cn(pageHeaderClass, className), ...dataAttributes, ...props, children: [
|
|
30486
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: pageHeaderTextClass, children: [
|
|
30487
|
+
kicker != null && /* @__PURE__ */ jsxRuntime.jsx("p", { className: pageHeaderKickerClass, children: kicker }),
|
|
30488
|
+
/* @__PURE__ */ jsxRuntime.jsx(Title, { className: pageHeaderTitleClass, children: title }),
|
|
30489
|
+
description != null && /* @__PURE__ */ jsxRuntime.jsx("div", { className: pageHeaderDescriptionClass, children: description })
|
|
30490
|
+
] }),
|
|
30491
|
+
actions != null && /* @__PURE__ */ jsxRuntime.jsx("div", { className: pageHeaderActionsClass, children: actions })
|
|
30492
|
+
] });
|
|
30493
|
+
});
|
|
30494
|
+
|
|
30495
|
+
// ../table/dist/index.js
|
|
30496
|
+
function createTable(props = {}) {
|
|
30497
|
+
return {
|
|
30498
|
+
dataAttributes: {
|
|
30499
|
+
"data-slot": "table",
|
|
30500
|
+
"data-density": props.density ?? "default",
|
|
30501
|
+
"data-head-tone": props.headTone ?? "default"
|
|
30502
|
+
}
|
|
30503
|
+
};
|
|
30504
|
+
}
|
|
30505
|
+
var tableContainerClass = "relative w-full overflow-x-auto";
|
|
30506
|
+
var tableRootVariants = cva({
|
|
30507
|
+
base: "w-full caption-bottom border-collapse text-sm",
|
|
30508
|
+
variants: {
|
|
30509
|
+
fixed: {
|
|
30510
|
+
true: "table-fixed",
|
|
30511
|
+
false: ""
|
|
30512
|
+
}
|
|
30513
|
+
},
|
|
30514
|
+
defaultVariants: {
|
|
30515
|
+
fixed: "false"
|
|
30516
|
+
}
|
|
30517
|
+
});
|
|
30518
|
+
var tableCaptionClass = "mt-2 text-xs text-muted-foreground";
|
|
30519
|
+
var tableRowClass = "border-b border-border-subtle last:border-b-0";
|
|
30520
|
+
var align = {
|
|
30521
|
+
start: "text-start",
|
|
30522
|
+
center: "text-center",
|
|
30523
|
+
end: "text-end"
|
|
30524
|
+
};
|
|
30525
|
+
var tableHeadVariants = cva({
|
|
30526
|
+
base: "border-b border-border-subtle bg-surface-subtle align-middle",
|
|
30527
|
+
variants: {
|
|
30528
|
+
align,
|
|
30529
|
+
tone: {
|
|
30530
|
+
default: "text-xs font-medium text-muted-foreground",
|
|
30531
|
+
eyebrow: "text-[11px] font-semibold uppercase tracking-wider text-muted-foreground"
|
|
30532
|
+
},
|
|
30533
|
+
density: {
|
|
30534
|
+
compact: "h-8 px-2",
|
|
30535
|
+
default: "h-9 px-3"
|
|
30536
|
+
}
|
|
30537
|
+
},
|
|
30538
|
+
defaultVariants: {
|
|
30539
|
+
align: "start",
|
|
30540
|
+
tone: "default",
|
|
30541
|
+
density: "default"
|
|
30542
|
+
}
|
|
30543
|
+
});
|
|
30544
|
+
var tableCellVariants = cva({
|
|
30545
|
+
base: "align-middle",
|
|
30546
|
+
variants: {
|
|
30547
|
+
align,
|
|
30548
|
+
density: {
|
|
30549
|
+
compact: "px-2 py-1.5",
|
|
30550
|
+
default: "px-3 py-2.5"
|
|
30551
|
+
},
|
|
30552
|
+
numeric: {
|
|
30553
|
+
true: "tabular-nums whitespace-nowrap",
|
|
30554
|
+
false: ""
|
|
30555
|
+
}
|
|
30556
|
+
},
|
|
30557
|
+
defaultVariants: {
|
|
30558
|
+
align: "start",
|
|
30559
|
+
density: "default",
|
|
30560
|
+
numeric: "false"
|
|
30561
|
+
}
|
|
30562
|
+
});
|
|
30563
|
+
var TableContext = React52__namespace.createContext({ density: "default", headTone: "default" });
|
|
30564
|
+
var Table = React52__namespace.forwardRef(function Table2({ density = "default", headTone = "default", fixed = false, containerClassName, className, ...props }, ref) {
|
|
30565
|
+
const ctx = React52__namespace.useMemo(() => ({ density, headTone }), [density, headTone]);
|
|
30566
|
+
const { dataAttributes } = createTable({ density, headTone });
|
|
30567
|
+
return /* @__PURE__ */ jsxRuntime.jsx(TableContext.Provider, { value: ctx, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(tableContainerClass, containerClassName), "data-slot": "table-container", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
30568
|
+
"table",
|
|
30569
|
+
{
|
|
30570
|
+
ref,
|
|
30571
|
+
className: cn(tableRootVariants({ fixed: fixed ? "true" : "false" }), className),
|
|
30572
|
+
...dataAttributes,
|
|
30573
|
+
...props
|
|
30574
|
+
}
|
|
30575
|
+
) }) });
|
|
30576
|
+
});
|
|
30577
|
+
var TableHeader = React52__namespace.forwardRef(
|
|
30578
|
+
function TableHeader2(props, ref) {
|
|
30579
|
+
return /* @__PURE__ */ jsxRuntime.jsx("thead", { ref, "data-slot": "table-header", ...props });
|
|
30580
|
+
}
|
|
30581
|
+
);
|
|
30582
|
+
var TableBody = React52__namespace.forwardRef(
|
|
30583
|
+
function TableBody2(props, ref) {
|
|
30584
|
+
return /* @__PURE__ */ jsxRuntime.jsx("tbody", { ref, "data-slot": "table-body", ...props });
|
|
30585
|
+
}
|
|
30586
|
+
);
|
|
30587
|
+
var TableRow = React52__namespace.forwardRef(
|
|
30588
|
+
function TableRow2({ className, ...props }, ref) {
|
|
30589
|
+
return /* @__PURE__ */ jsxRuntime.jsx("tr", { ref, className: cn(tableRowClass, className), "data-slot": "table-row", ...props });
|
|
30590
|
+
}
|
|
30591
|
+
);
|
|
30592
|
+
var TableHead = React52__namespace.forwardRef(function TableHead2({ align: align2, scope = "col", className, ...props }, ref) {
|
|
30593
|
+
const { density, headTone } = React52__namespace.useContext(TableContext);
|
|
30594
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
30595
|
+
"th",
|
|
30596
|
+
{
|
|
30597
|
+
ref,
|
|
30598
|
+
scope,
|
|
30599
|
+
className: cn(tableHeadVariants({ align: align2, density, tone: headTone }), className),
|
|
30600
|
+
"data-slot": "table-head",
|
|
30601
|
+
...props
|
|
30602
|
+
}
|
|
30603
|
+
);
|
|
30604
|
+
});
|
|
30605
|
+
var TableCell = React52__namespace.forwardRef(function TableCell2({ align: align2, numeric = false, className, ...props }, ref) {
|
|
30606
|
+
const { density } = React52__namespace.useContext(TableContext);
|
|
30607
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
30608
|
+
"td",
|
|
30609
|
+
{
|
|
30610
|
+
ref,
|
|
30611
|
+
className: cn(tableCellVariants({ align: align2, density, numeric: numeric ? "true" : "false" }), className),
|
|
30612
|
+
"data-slot": "table-cell",
|
|
30613
|
+
...props
|
|
30614
|
+
}
|
|
30615
|
+
);
|
|
30616
|
+
});
|
|
30617
|
+
var TableCaption = React52__namespace.forwardRef(
|
|
30618
|
+
function TableCaption2({ className, ...props }, ref) {
|
|
30619
|
+
return /* @__PURE__ */ jsxRuntime.jsx("caption", { ref, className: cn(tableCaptionClass, className), "data-slot": "table-caption", ...props });
|
|
30620
|
+
}
|
|
30621
|
+
);
|
|
30622
|
+
|
|
30623
|
+
// ../native-select/dist/index.js
|
|
30624
|
+
var nativeSelectChevronPath = "m6 9 6 6 6-6";
|
|
30625
|
+
var nativeSelectWrapperClass = "relative inline-flex min-w-0 items-center";
|
|
30626
|
+
var nativeSelectVariants = cva({
|
|
30627
|
+
base: "w-full cursor-pointer appearance-none rounded-md border border-input bg-background text-foreground shadow-sm ring-offset-background focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
|
|
30628
|
+
variants: {
|
|
30629
|
+
size: {
|
|
30630
|
+
sm: "h-8 pl-2.5 pr-8 text-xs",
|
|
30631
|
+
default: "h-9 pl-3 pr-9 text-sm",
|
|
30632
|
+
lg: "h-10 pl-3 pr-10 text-base"
|
|
30633
|
+
}
|
|
30634
|
+
},
|
|
30635
|
+
defaultVariants: {
|
|
30636
|
+
size: "default"
|
|
30637
|
+
}
|
|
30638
|
+
});
|
|
30639
|
+
var nativeSelectIconClass = "pointer-events-none absolute right-2.5 h-4 w-4 shrink-0 text-muted-foreground";
|
|
30640
|
+
var NativeSelect = React52__namespace.forwardRef(function NativeSelect2({ size = "default", className, containerClassName, children, ...props }, ref) {
|
|
30641
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: cn(nativeSelectWrapperClass, containerClassName), "data-slot": "native-select", children: [
|
|
30642
|
+
/* @__PURE__ */ jsxRuntime.jsx("select", { ref, className: cn(nativeSelectVariants({ size }), className), ...props, children }),
|
|
30643
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
30644
|
+
"svg",
|
|
30645
|
+
{
|
|
30646
|
+
className: nativeSelectIconClass,
|
|
30647
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
30648
|
+
viewBox: "0 0 24 24",
|
|
30649
|
+
fill: "none",
|
|
30650
|
+
stroke: "currentColor",
|
|
30651
|
+
strokeWidth: "2",
|
|
30652
|
+
strokeLinecap: "round",
|
|
30653
|
+
strokeLinejoin: "round",
|
|
30654
|
+
"aria-hidden": "true",
|
|
30655
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: nativeSelectChevronPath })
|
|
30656
|
+
}
|
|
30657
|
+
)
|
|
30658
|
+
] });
|
|
30659
|
+
});
|
|
30660
|
+
|
|
29675
30661
|
exports.AIProvider = AIProvider;
|
|
29676
30662
|
exports.Accordion = Accordion;
|
|
29677
30663
|
exports.AccordionContent = AccordionContent;
|
|
29678
30664
|
exports.AccordionItem = AccordionItem;
|
|
29679
30665
|
exports.AccordionTrigger = AccordionTrigger;
|
|
30666
|
+
exports.ActionList = ActionList;
|
|
30667
|
+
exports.ActionListItem = ActionListItem;
|
|
29680
30668
|
exports.AltHintState = AltHintState;
|
|
29681
30669
|
exports.AnalyticsProvider = AnalyticsProvider;
|
|
29682
30670
|
exports.AnimatedText = AnimatedText;
|
|
@@ -29794,6 +30782,7 @@ exports.FileUpload = FileUpload;
|
|
|
29794
30782
|
exports.FloatingReactions = FloatingReactions;
|
|
29795
30783
|
exports.FlowEditor = FlowEditor;
|
|
29796
30784
|
exports.Footer = Footer;
|
|
30785
|
+
exports.FunnelChart = FunnelChart;
|
|
29797
30786
|
exports.Gradient = Gradient;
|
|
29798
30787
|
exports.GraphView = GraphView;
|
|
29799
30788
|
exports.Histogram = Histogram;
|
|
@@ -29812,6 +30801,7 @@ exports.KanbanColumn = KanbanColumn;
|
|
|
29812
30801
|
exports.KeyboardShortcut = KeyboardShortcut;
|
|
29813
30802
|
exports.LanguageSelector = LanguageSelector;
|
|
29814
30803
|
exports.Line = Line;
|
|
30804
|
+
exports.LineChart = LineChart;
|
|
29815
30805
|
exports.LinkCard = LinkCard;
|
|
29816
30806
|
exports.LiveCaptions = LiveCaptions;
|
|
29817
30807
|
exports.LiveCursors = LiveCursors;
|
|
@@ -29826,11 +30816,13 @@ exports.MobileNav = MobileNav;
|
|
|
29826
30816
|
exports.MobileNavContent = MobileNavContent;
|
|
29827
30817
|
exports.MobileNavLink = MobileNavLink;
|
|
29828
30818
|
exports.MobileNavTrigger = MobileNavTrigger;
|
|
30819
|
+
exports.NativeSelect = NativeSelect;
|
|
29829
30820
|
exports.Navbar = Navbar;
|
|
29830
30821
|
exports.NumberedSteps = NumberedSteps;
|
|
29831
30822
|
exports.OtpInput = OtpInput;
|
|
29832
30823
|
exports.PRESENCE_STATUS_COLORS = STATUS_COLORS;
|
|
29833
30824
|
exports.PRESENCE_STATUS_LABELS = STATUS_LABELS;
|
|
30825
|
+
exports.PageHeader = PageHeader;
|
|
29834
30826
|
exports.Pagination = Pagination;
|
|
29835
30827
|
exports.PasswordInput = PasswordInput;
|
|
29836
30828
|
exports.Payment = Payment;
|
|
@@ -29870,6 +30862,7 @@ exports.Select = Select;
|
|
|
29870
30862
|
exports.SelectContent = SelectContent;
|
|
29871
30863
|
exports.SelectItem = SelectItem;
|
|
29872
30864
|
exports.SelectTrigger = SelectTrigger;
|
|
30865
|
+
exports.SelectValue = SelectValue;
|
|
29873
30866
|
exports.Separator = Separator;
|
|
29874
30867
|
exports.Sheet = Sheet;
|
|
29875
30868
|
exports.SheetClose = SheetClose;
|
|
@@ -29910,7 +30903,14 @@ exports.Steps = Steps;
|
|
|
29910
30903
|
exports.StickyNote = StickyNote;
|
|
29911
30904
|
exports.Switch = Switch;
|
|
29912
30905
|
exports.TTSProvider = TTSProvider;
|
|
30906
|
+
exports.Table = Table;
|
|
30907
|
+
exports.TableBody = TableBody;
|
|
30908
|
+
exports.TableCaption = TableCaption;
|
|
30909
|
+
exports.TableCell = TableCell;
|
|
30910
|
+
exports.TableHead = TableHead;
|
|
30911
|
+
exports.TableHeader = TableHeader;
|
|
29913
30912
|
exports.TableOfContents = TableOfContents;
|
|
30913
|
+
exports.TableRow = TableRow;
|
|
29914
30914
|
exports.Tabs = Tabs;
|
|
29915
30915
|
exports.TabsContent = TabsContent;
|
|
29916
30916
|
exports.TabsList = TabsList;
|
|
@@ -29972,6 +30972,7 @@ exports.checkIconPath = checkIconPath;
|
|
|
29972
30972
|
exports.checkboxTokens = checkboxTokens;
|
|
29973
30973
|
exports.checkboxVariants = checkboxVariants;
|
|
29974
30974
|
exports.clampVoicePillIntensity = clampVoicePillIntensity;
|
|
30975
|
+
exports.cn = cn;
|
|
29975
30976
|
exports.codeEditorTokens = codeEditorTokens;
|
|
29976
30977
|
exports.codeEditorVariants = codeEditorVariants;
|
|
29977
30978
|
exports.collapsibleContentVariants = collapsibleContentVariants;
|
|
@@ -29996,6 +30997,7 @@ exports.composerPrimaryActionVariants = composerPrimaryActionVariants;
|
|
|
29996
30997
|
exports.composerSurfaceVariants = composerSurfaceVariants;
|
|
29997
30998
|
exports.composerTokenPillClass = composerTokenPillClass;
|
|
29998
30999
|
exports.composerTrayClass = composerTrayClass;
|
|
31000
|
+
exports.computeMenuPosition = computeMenuPosition;
|
|
29999
31001
|
exports.contentProtectionVariants = contentProtectionVariants;
|
|
30000
31002
|
exports.controlsVariants = controlsVariants;
|
|
30001
31003
|
exports.createAnalytics = createAnalytics;
|
|
@@ -30021,6 +31023,7 @@ exports.createTelemetry = createTelemetry;
|
|
|
30021
31023
|
exports.createTwemojiRenderer = createTwemojiRenderer;
|
|
30022
31024
|
exports.createVoicePill = createVoicePill;
|
|
30023
31025
|
exports.createWaveform = createWaveform;
|
|
31026
|
+
exports.cva = cva;
|
|
30024
31027
|
exports.dayVariants = dayVariants;
|
|
30025
31028
|
exports.defaultStickerRenderer = defaultStickerRenderer;
|
|
30026
31029
|
exports.deviceFrameVariants = deviceFrameVariants;
|