gridsmith-ui 0.32.0 → 0.33.1
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/CHANGELOG.md +64 -1
- package/README.md +4 -2
- package/dist/charts.d.ts +10 -1
- package/dist/charts.js +115 -50
- package/dist/charts.js.map +1 -1
- package/dist/chat.js +6 -6
- package/dist/{chunk-WSKPESAX.js → chunk-4FX6UCSS.js} +5 -5
- package/dist/{chunk-WSKPESAX.js.map → chunk-4FX6UCSS.js.map} +1 -1
- package/dist/{chunk-DO6DLTFK.js → chunk-4TQVFRKK.js} +6 -6
- package/dist/{chunk-DO6DLTFK.js.map → chunk-4TQVFRKK.js.map} +1 -1
- package/dist/{chunk-HCEHTJ5E.js → chunk-77X7AHFB.js} +3 -3
- package/dist/{chunk-HCEHTJ5E.js.map → chunk-77X7AHFB.js.map} +1 -1
- package/dist/{chunk-SIEU4H3H.js → chunk-BL2C35BN.js} +43 -33
- package/dist/chunk-BL2C35BN.js.map +1 -0
- package/dist/chunk-GIA4BMGI.js +18 -0
- package/dist/chunk-GIA4BMGI.js.map +1 -0
- package/dist/{chunk-2724SJO2.js → chunk-HDFTENVW.js} +7 -3
- package/dist/chunk-HDFTENVW.js.map +1 -0
- package/dist/{chunk-OVHM55JF.js → chunk-MPXE2XOP.js} +41 -6
- package/dist/chunk-MPXE2XOP.js.map +1 -0
- package/dist/{chunk-XBVZIN26.js → chunk-MW5CJOJN.js} +10 -8
- package/dist/chunk-MW5CJOJN.js.map +1 -0
- package/dist/{chunk-QY2RA2HO.js → chunk-N6QLEZFH.js} +5 -5
- package/dist/{chunk-QY2RA2HO.js.map → chunk-N6QLEZFH.js.map} +1 -1
- package/dist/{chunk-TMPPBXX3.js → chunk-NFVJEICH.js} +3 -3
- package/dist/{chunk-TMPPBXX3.js.map → chunk-NFVJEICH.js.map} +1 -1
- package/dist/{chunk-JHZ22HQP.js → chunk-NJG6JQGC.js} +61 -222
- package/dist/chunk-NJG6JQGC.js.map +1 -0
- package/dist/chunk-P3NUUIL6.js +9 -0
- package/dist/chunk-P3NUUIL6.js.map +1 -0
- package/dist/{chunk-NGZJK57C.js → chunk-PT4HYHI3.js} +10 -9
- package/dist/chunk-PT4HYHI3.js.map +1 -0
- package/dist/chunk-R7FG4ZQ5.js +16 -0
- package/dist/chunk-R7FG4ZQ5.js.map +1 -0
- package/dist/chunk-T33JK3ZE.js +81 -0
- package/dist/chunk-T33JK3ZE.js.map +1 -0
- package/dist/chunk-UI4BSRCQ.js +213 -0
- package/dist/chunk-UI4BSRCQ.js.map +1 -0
- package/dist/{chunk-HUVZQOU4.js → chunk-XJGFZ5CP.js} +5 -5
- package/dist/{chunk-HUVZQOU4.js.map → chunk-XJGFZ5CP.js.map} +1 -1
- package/dist/{chunk-R2IAK3J3.js → chunk-ZTS6HJAU.js} +3 -3
- package/dist/{chunk-R2IAK3J3.js.map → chunk-ZTS6HJAU.js.map} +1 -1
- package/dist/dashboard.d.ts +207 -0
- package/dist/dashboard.js +1210 -0
- package/dist/dashboard.js.map +1 -0
- package/dist/data-grid.js +10 -9
- package/dist/data-grid.js.map +1 -1
- package/dist/editor-mentions.js +2 -2
- package/dist/editor.js +2 -2
- package/dist/index.d.ts +64 -8
- package/dist/index.js +245 -147
- package/dist/index.js.map +1 -1
- package/dist/kanban.js +8 -8
- package/dist/resizable.js +9 -8
- package/dist/resizable.js.map +1 -1
- package/dist/utils.d.ts +51 -1
- package/dist/utils.js +55 -4
- package/dist/utils.js.map +1 -1
- package/dist/virtualized.js +8 -8
- package/package.json +6 -1
- package/dist/chunk-2724SJO2.js.map +0 -1
- package/dist/chunk-H732QL56.js +0 -71
- package/dist/chunk-H732QL56.js.map +0 -1
- package/dist/chunk-JHZ22HQP.js.map +0 -1
- package/dist/chunk-LJYSVZMI.js +0 -25
- package/dist/chunk-LJYSVZMI.js.map +0 -1
- package/dist/chunk-NGZJK57C.js.map +0 -1
- package/dist/chunk-OVHM55JF.js.map +0 -1
- package/dist/chunk-SIEU4H3H.js.map +0 -1
- package/dist/chunk-XBVZIN26.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,46 +1,49 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
export {
|
|
4
|
-
import {
|
|
5
|
-
export {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
export { Avatar } from './chunk-TMPPBXX3.js';
|
|
9
|
-
import { Link } from './chunk-QY2RA2HO.js';
|
|
10
|
-
export { CodeBlock, Divider, Link } from './chunk-QY2RA2HO.js';
|
|
11
|
-
import { DropdownMenu } from './chunk-HUVZQOU4.js';
|
|
12
|
-
export { DropdownMenu } from './chunk-HUVZQOU4.js';
|
|
13
|
-
import { useFillHeight, FillContext } from './chunk-SS3C24IJ.js';
|
|
14
|
-
import { Badge } from './chunk-WSKPESAX.js';
|
|
15
|
-
export { Badge } from './chunk-WSKPESAX.js';
|
|
16
|
-
import { useKeyboardScroll } from './chunk-H732QL56.js';
|
|
17
|
-
import { localeCache, startOfDay, addDays, useWeekStart, useDateWords, localeDayFirst, dayKey, moveDay, addMonths, DateSegmentFields, getMonthGrid, isSameMonth, isSameDay, DatePicker, timeSegments, pad2, inferColumnKinds, useCardsSwitch, CARDS_BELOW, kindOfRenderedText, Checkbox, CardValue, SortIndicator, startOfWeek, endOfWeek, addMonthsClamped, isExcludedDay, CutCell, CutEmail, stepValue, separatorMovesOn, TIME_SEPARATORS, typeDigit, getEventsForDay, layoutWeek, isWeekend, getWeekDays, isBarEvent, layoutPieces, dayPieces, groupEventsByDay, timeToFraction } from './chunk-NGZJK57C.js';
|
|
18
|
-
export { Checkbox, CheckboxGroup, CheckboxGroupItem, DatePicker, HoverCard, TextOverflow } from './chunk-NGZJK57C.js';
|
|
19
|
-
import { useWholeListCheck, pagerPart, Pagination, NumberInput } from './chunk-SIEU4H3H.js';
|
|
20
|
-
export { NumberInput, Pagination, Popover, usePagination } from './chunk-SIEU4H3H.js';
|
|
2
|
+
import { localeCache, startOfDay, addDays, useWeekStart, useDateWords, localeDayFirst, dayKey, moveDay, addMonths, DateSegmentFields, getMonthGrid, isSameMonth, isSameDay, DatePicker, timeSegments, pad2, inferColumnKinds, useCardsSwitch, CARDS_BELOW, kindOfRenderedText, Checkbox, CardValue, SortIndicator, startOfWeek, endOfWeek, addMonthsClamped, isExcludedDay, CutCell, CutEmail, stepValue, separatorMovesOn, TIME_SEPARATORS, typeDigit, getEventsForDay, layoutWeek, isWeekend, getWeekDays, isBarEvent, layoutPieces, dayPieces, groupEventsByDay, timeToFraction } from './chunk-PT4HYHI3.js';
|
|
3
|
+
export { Checkbox, CheckboxGroup, CheckboxGroupItem, DatePicker, HoverCard, TextOverflow } from './chunk-PT4HYHI3.js';
|
|
4
|
+
import { useWholeListCheck, pagerPart, Pagination, NumberInput } from './chunk-BL2C35BN.js';
|
|
5
|
+
export { NumberInput, Pagination, Popover, usePagination } from './chunk-BL2C35BN.js';
|
|
6
|
+
import { useAppShell, REACT_VERSION_PROBLEM, Breadcrumbs, useCrumbFollow, crumbGoes, useCornerInset, NAVBAR_INSET_PRIORITY, useScrollbarInset, useBulkBarHost, DrawerFooterCtx, BulkBarHostCtx, AsideSlotContext, BulkBarSpacer, bulkBarRoom, insetLessScrollbar, BULK_BAR_LAYER, BulkBarPresenceCtx, BULK_BAR_WINDOW_LAYER, DrawerPanel, useCloseSettle, besideRoom, PANEL_INSET_PRIORITY, Drawer, LAUNCHER_INSET_PRIORITY, TOAST_INSET_VARS, useRememberedWidth, pxOf, ResizeEdge, defaultMaxWidth } from './chunk-NJG6JQGC.js';
|
|
7
|
+
export { AppShell, Breadcrumbs, Drawer, SkipLink, useAppShell, useUnsavedChanges } from './chunk-NJG6JQGC.js';
|
|
21
8
|
import { useShellPreferences, PREFERENCE_HOUSE_DEFAULTS, formatRelativeTime, thresholdOf, toMillis, formatFullTime, datedMillis, preferenceActionKey, DAY, HOUR, MINUTE } from './chunk-QOMP4D6V.js';
|
|
22
9
|
export { PreferencesContext, formatFullTime, formatRelativeTime, preferenceActionKey, usePreferences } from './chunk-QOMP4D6V.js';
|
|
23
|
-
import {
|
|
24
|
-
export {
|
|
25
|
-
import {
|
|
26
|
-
export {
|
|
10
|
+
import { CELL_FRAME, Skeleton, CELL_HIDE, TITLE_FLOOR, CELL_ROOM, TITLE_TEXT, CELL_STAT_ROOM, CELL_STAT_ROOM_END, CELL_STAT_TILE, CELL_ROOM_INNER, SegmentedControl } from './chunk-MPXE2XOP.js';
|
|
11
|
+
export { SegmentedControl, Skeleton } from './chunk-MPXE2XOP.js';
|
|
12
|
+
import { useFormatLocale, LocaleContext } from './chunk-R7FG4ZQ5.js';
|
|
13
|
+
export { useFormatLocale } from './chunk-R7FG4ZQ5.js';
|
|
14
|
+
import { Input, CHECK_FILL, Dropdown, FilterRowContext, SWITCH_KNOB_ON, SWITCH_KNOB_OFF, SWITCH_KNOB_MOTION, SWITCH_TRACK_ON, SWITCH_TRACK_OFF, useFieldControl, useField, OutsideField, InlineFieldError, Label, AddAnotherRowCtx, Field } from './chunk-4TQVFRKK.js';
|
|
15
|
+
export { Dropdown, Field, InlineFieldError, Input, Label, Textarea, Toggle } from './chunk-4TQVFRKK.js';
|
|
27
16
|
import { formatLocale, localeChoice } from './chunk-7QLXYRPD.js';
|
|
17
|
+
import { useScrollEdges, EDGE_FADE } from './chunk-3BRQRKDO.js';
|
|
18
|
+
import { Avatar, foldForSearch, useActiveOptionInView, shownMentions, matchMentions, mentionOptionId, MentionList, initialsOf } from './chunk-NFVJEICH.js';
|
|
19
|
+
export { Avatar } from './chunk-NFVJEICH.js';
|
|
20
|
+
import { Link } from './chunk-N6QLEZFH.js';
|
|
21
|
+
export { CodeBlock, Divider, Link } from './chunk-N6QLEZFH.js';
|
|
22
|
+
import { CardSurfaceCtx, useScrollsInside, useRunsEdgeToEdge, SplitPaneCtx, PanePaddedCtx, RowsCtx, PageActionsCtx, PANE_HEADING_CANCEL, SurfaceBoundary, useFramesItself, TableCardCtx, useWantsInset } from './chunk-RS624TD5.js';
|
|
23
|
+
import { Badge } from './chunk-4FX6UCSS.js';
|
|
24
|
+
export { Badge } from './chunk-4FX6UCSS.js';
|
|
25
|
+
import { useTextOverflow } from './chunk-ZTS6HJAU.js';
|
|
26
|
+
export { useTextOverflow } from './chunk-ZTS6HJAU.js';
|
|
27
|
+
import { useOverlayMark, useDirtyGuard, OverlayMarkScope, OverlayCloseCtx, DiscardConfirm, OVERLAY_ROOT_ATTR, OverlayMarkCtx, useCompact, useElementWidth } from './chunk-UI4BSRCQ.js';
|
|
28
|
+
import { useHydrated, useToday } from './chunk-GIA4BMGI.js';
|
|
29
|
+
export { useHydrated } from './chunk-GIA4BMGI.js';
|
|
28
30
|
import { FormChangeCtx, useReportedChange, useOptionalFormContext, FormCtx } from './chunk-72SDAX54.js';
|
|
29
31
|
export { useFormContext } from './chunk-72SDAX54.js';
|
|
30
|
-
import {
|
|
31
|
-
|
|
32
|
-
|
|
32
|
+
import { DropdownMenu } from './chunk-XJGFZ5CP.js';
|
|
33
|
+
export { DropdownMenu } from './chunk-XJGFZ5CP.js';
|
|
34
|
+
import { useFillHeight, FillContext } from './chunk-SS3C24IJ.js';
|
|
35
|
+
import { Button, elementType, ControlSizeContext, triggerType, Spinner } from './chunk-MW5CJOJN.js';
|
|
36
|
+
export { Button, ButtonSizeContext, ControlSizeContext, Spinner } from './chunk-MW5CJOJN.js';
|
|
33
37
|
import { useBreakpoint, readBreakpointPx } from './chunk-ZHUVLBCC.js';
|
|
34
38
|
export { BreakpointWidthProvider, useBreakpoint } from './chunk-ZHUVLBCC.js';
|
|
35
39
|
import { inputModality, useInputModality } from './chunk-7RKC5C7G.js';
|
|
36
40
|
export { INPUT_MODALITY_ATTR, inputModality, installInputModality, useInputModality } from './chunk-7RKC5C7G.js';
|
|
37
|
-
import {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
export { Tooltip, useRevealFocus } from './chunk-HCEHTJ5E.js';
|
|
41
|
+
import { useKeyboardScroll } from './chunk-T33JK3ZE.js';
|
|
42
|
+
import { AutoTooltip, mergeRefs, useRevealFocus } from './chunk-77X7AHFB.js';
|
|
43
|
+
export { Tooltip, useRevealFocus } from './chunk-77X7AHFB.js';
|
|
41
44
|
import { Icon, slotIcon, warnOnce } from './chunk-53F7GVBQ.js';
|
|
42
|
-
import { cn, FOCUS_RING, focusAfterSelfRemoval, FOCUSABLE, GLASS_SURFACE, useFocusKeptInList, FOCUS_INSET, useLatest, PEER_FOCUS_RING, GLASS_BACKDROP, OPEN_TO_FOCUS, focusOutOf, FIELD, ZOOM_KEYS, rovingTabStop, FOCUS_ROOM, useOverlayLayer, useFocusTrap, useFocusBeforeOpen, rememberOpener, focusInitial, lockBodyScroll, unlockBodyScroll, OVERLAY_CLOSE_ATTR, OVERLAY_SURFACE, GLASS_OVERLAY, usePopupFocus, pointOf, pageAddress, registerOpenerRoot, rememberFocus, usePosition, ERROR_HAS_FOCUS_RING, FIELD_HAS_FOCUS_RING,
|
|
43
|
-
export { useGridKeyboard } from './chunk-
|
|
45
|
+
import { cn, FOCUS_RING, focusAfterSelfRemoval, FOCUSABLE, GLASS_SURFACE, FOCUS_INSET_WHILE_STOP, useFocusKeptInList, FOCUS_INSET, useLatest, PEER_FOCUS_RING, GLASS_BACKDROP, OPEN_TO_FOCUS, focusOutOf, FIELD, ZOOM_KEYS, rovingTabStop, FOCUS_ROOM, useOverlayLayer, useFocusTrap, useFocusBeforeOpen, rememberOpener, focusInitial, lockBodyScroll, unlockBodyScroll, OVERLAY_CLOSE_ATTR, OVERLAY_SURFACE, GLASS_OVERLAY, usePopupFocus, tabStops, CONTROL_ANCESTOR, pointOf, pageAddress, registerOpenerRoot, rememberFocus, usePosition, ERROR_HAS_FOCUS_RING, FIELD_HAS_FOCUS_RING, GROUP_FOCUS_RING, useGridKeyboard, ERROR_ACTIVE_RING, ACTIVE_RING, ERROR_FOCUS_WITHIN_RING, FIELD_FOCUS_WITHIN_RING, focusAfterRemoval, placesOf, GLASS_DROPDOWN, ERROR_FOCUS_RING, FIELD_FOCUS_RING, openToFocus, atLeastFocusRoom, useNonModalDialog, useReturnFocus, onMovingOn } from './chunk-HDFTENVW.js';
|
|
46
|
+
export { useGridKeyboard } from './chunk-HDFTENVW.js';
|
|
44
47
|
import { forwardRef, useRef, useId, useEffect, useState, createContext, useCallback, useLayoutEffect, useMemo, useContext, isValidElement, memo, useImperativeHandle, useSyncExternalStore, Children, Fragment as Fragment$1, cloneElement, useReducer } from 'react';
|
|
45
48
|
import { createPortal, flushSync } from 'react-dom';
|
|
46
49
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
@@ -2033,7 +2036,7 @@ function Dialog({ open, onClose: onCloseProp, title, description, children, foot
|
|
|
2033
2036
|
...barStack ? { scrollPaddingBottom: bulkBarRoom(barStack) } : {}
|
|
2034
2037
|
},
|
|
2035
2038
|
children: [
|
|
2036
|
-
/* @__PURE__ */ jsx(SurfaceBoundary, { children: /* @__PURE__ */ jsx(DrawerFooterCtx, { value: null, children: /* @__PURE__ */ jsx(OverlayMarkScope, { mark, children: /* @__PURE__ */ jsx(OverlayCloseCtx, { value: onClose, children: /* @__PURE__ */ jsx(BulkBarHostCtx, { value: barHost, children }) }) }) }) }),
|
|
2039
|
+
/* @__PURE__ */ jsx(SurfaceBoundary, { children: /* @__PURE__ */ jsx(DrawerFooterCtx, { value: null, children: /* @__PURE__ */ jsx(OverlayMarkScope, { mark, children: /* @__PURE__ */ jsx(OverlayCloseCtx, { value: onClose, children: /* @__PURE__ */ jsx(BulkBarHostCtx, { value: barHost, children: /* @__PURE__ */ jsx(AsideSlotContext, { value: true, children }) }) }) }) }) }),
|
|
2037
2040
|
/* @__PURE__ */ jsx(BulkBarSpacer, { room: barStack })
|
|
2038
2041
|
]
|
|
2039
2042
|
}
|
|
@@ -2573,7 +2576,7 @@ function SliderRange({
|
|
|
2573
2576
|
const valueText = (v) => formatValue ? formatValue(v) : void 0;
|
|
2574
2577
|
const handleChange = useCallback(
|
|
2575
2578
|
(which, raw) => {
|
|
2576
|
-
const v = Math.round(raw / step) * step;
|
|
2579
|
+
const v = Number((Math.round(raw / step) * step).toFixed(placesOf(step)));
|
|
2577
2580
|
const clamped = Math.max(min, Math.min(max, v));
|
|
2578
2581
|
if (isRange) {
|
|
2579
2582
|
if (which === "low") onChange([Math.min(clamped, high), high]);
|
|
@@ -5076,8 +5079,8 @@ var Card = forwardRef(function Card2({
|
|
|
5076
5079
|
useLayoutEffect(() => {
|
|
5077
5080
|
const root = rootRef.current;
|
|
5078
5081
|
if (!root || !isAction && !checkable) return;
|
|
5079
|
-
const controls = Array.from(root.querySelectorAll(FOCUSABLE)).some((el) => !el.hasAttribute(CARD_ACTION_ATTR));
|
|
5080
5082
|
const titleId = root.querySelector("[data-card-title]")?.id || null;
|
|
5083
|
+
const controls = Array.from(root.querySelectorAll(FOCUSABLE)).some((el) => !el.hasAttribute(CARD_ACTION_ATTR)) || !!titleId && root.matches(CELL_FRAME);
|
|
5081
5084
|
setInner((cur) => cur.controls === controls && cur.titleId === titleId ? cur : { controls, titleId });
|
|
5082
5085
|
}, [isAction, checkable, loading, children]);
|
|
5083
5086
|
const holdsControls = isAction && inner.controls;
|
|
@@ -5263,7 +5266,6 @@ function splitTitle(children) {
|
|
|
5263
5266
|
if (at < 0) return { lead: [], title: parts[0] ?? null, rest: parts.slice(1) };
|
|
5264
5267
|
return { lead: parts.slice(0, at), title: parts[at], rest: parts.slice(at + 1) };
|
|
5265
5268
|
}
|
|
5266
|
-
var TITLE_FLOOR = "basis-[calc(var(--ds-font-size-lg)*4.5)]";
|
|
5267
5269
|
var TITLE_ROW = cn(
|
|
5268
5270
|
"flex flex-wrap items-start justify-end gap-x-ds-2 gap-y-ds-2 min-w-0 grow basis-0",
|
|
5269
5271
|
"[&>[data-header-actions]>*]:order-5",
|
|
@@ -5305,13 +5307,13 @@ var CardHeader = forwardRef(function CardHeader2(allProps, ref) {
|
|
|
5305
5307
|
const band = (order) => cn("shrink-0 self-start flex items-center", TITLE_LINE, order);
|
|
5306
5308
|
const checkbox = owns && row.checkbox ? /* @__PURE__ */ jsx("span", { className: band("order-5"), children: row.checkbox }) : null;
|
|
5307
5309
|
const check = owns && row.check ? /* @__PURE__ */ jsx("span", { "data-card-selection": "", className: band("order-4"), children: row.check }) : null;
|
|
5308
|
-
const menuPart = menu ? /* @__PURE__ */ jsx("span", { className: band("order-6"), children: menu }) : null;
|
|
5310
|
+
const menuPart = menu ? /* @__PURE__ */ jsx("span", { className: cn(band("order-6"), CELL_HIDE), children: menu }) : null;
|
|
5309
5311
|
const { lead, title, rest } = splitTitle(children);
|
|
5310
5312
|
const leadBlock = lead.length > 0 ? /* @__PURE__ */ jsx("div", { "data-card-lead": "", className: "flex flex-col space-y-ds-1.5 min-w-0 grow", children: lead }) : null;
|
|
5311
5313
|
const topLine = iconBlock ?? leadBlock;
|
|
5312
5314
|
const ownBlock = title !== null && !(isValidElement(title) && elementType(title.type) === CardTitle);
|
|
5313
|
-
const actionsSlot = "actions" in allProps ? /* @__PURE__ */ jsx("div", { "data-header-actions": "", className: "contents", children: partsOf(actions).map((item, i) => /* @__PURE__ */ jsx("span", { className: cn("flex items-center shrink-0", TITLE_LINE), children: item }, isValidElement(item) && item.key !== null ? item.key : i)) }) : null;
|
|
5314
|
-
return /* @__PURE__ */ jsxs("div", { ref, "data-card-header": "", className: cn("flex flex-col px-ds-5 pt-ds-4 last:pb-ds-4 min-w-0", className), ...props, children: [
|
|
5315
|
+
const actionsSlot = "actions" in allProps ? /* @__PURE__ */ jsx("div", { "data-header-actions": "", className: cn("contents", CELL_HIDE), children: partsOf(actions).map((item, i) => /* @__PURE__ */ jsx("span", { className: cn("flex items-center shrink-0", TITLE_LINE), children: item }, isValidElement(item) && item.key !== null ? item.key : i)) }) : null;
|
|
5316
|
+
return /* @__PURE__ */ jsxs("div", { ref, "data-card-header": "", className: cn("flex flex-col px-ds-5 pt-ds-4 last:pb-ds-4 min-w-0", CELL_ROOM, className), ...props, children: [
|
|
5315
5317
|
topLine && /* @__PURE__ */ jsxs("div", { "data-card-icon-row": iconBlock ? "" : void 0, "data-card-lead-row": iconBlock ? void 0 : "", className: cn("flex items-start gap-ds-2", iconBlock ? "mb-ds-2.5" : "mb-ds-1.5"), children: [
|
|
5316
5318
|
topLine,
|
|
5317
5319
|
iconBlock && /* @__PURE__ */ jsx("span", { "aria-hidden": "true", className: "grow -ml-ds-2" }),
|
|
@@ -5412,8 +5414,9 @@ var CardDescription = forwardRef(function CardDescription2({ className, children
|
|
|
5412
5414
|
);
|
|
5413
5415
|
return /* @__PURE__ */ jsx(AutoTooltip, { content: children, disabled: !isTruncated, children: el });
|
|
5414
5416
|
});
|
|
5417
|
+
var CELL_CARD_BODY = "[[data-dashboard-content]>[data-card]>&]:min-h-0 [[data-dashboard-content]>[data-card]>&]:overflow-y-auto [[data-dashboard-content]>[data-card]>&]:scroll-p-[4px]";
|
|
5415
5418
|
var CardContent = forwardRef(function CardContent2({ className, children, ...props }, ref) {
|
|
5416
|
-
return /* @__PURE__ */ jsx("div", { ref, className: cn("flex-1 px-ds-5 py-ds-4", className), ...props, children });
|
|
5419
|
+
return /* @__PURE__ */ jsx("div", { ref, "data-card-content": "", className: cn("flex-1 px-ds-5 py-ds-4", CELL_CARD_BODY, FOCUS_INSET_WHILE_STOP, className), ...props, children });
|
|
5417
5420
|
});
|
|
5418
5421
|
var CardFooter = forwardRef(function CardFooter2({ className, children, ...props }, ref) {
|
|
5419
5422
|
return (
|
|
@@ -5421,9 +5424,14 @@ var CardFooter = forwardRef(function CardFooter2({ className, children, ...props
|
|
|
5421
5424
|
/* @__PURE__ */ jsx("div", { ref, className: cn("flex items-center gap-ds-2 px-ds-5 pb-ds-4 pt-ds-2 mt-auto min-w-0 [&:not(:has(>:not(button)))]:justify-end", className), ...props, children })
|
|
5422
5425
|
);
|
|
5423
5426
|
});
|
|
5424
|
-
|
|
5427
|
+
var CELL_STAT = "[[data-dashboard-content]>&]:overflow-y-auto [[data-dashboard-content]>&]:scroll-p-[4px]";
|
|
5428
|
+
var STAT_CONTAINER = "@container/stat [contain-intrinsic-inline-size:12rem]";
|
|
5429
|
+
var STAT_VALUE_STEPS = "@max-[11.25rem]/stat:text-xl @max-[7.25rem]/stat:text-lg";
|
|
5430
|
+
var STAT_NARROW_LINE = "@max-[10.375rem]/stat:col-span-2";
|
|
5431
|
+
var STAT_NARROW_TILE = "@max-[10.375rem]/stat:row-[1]";
|
|
5432
|
+
function TruncLabel({ children, className }) {
|
|
5425
5433
|
const { ref, isTruncated } = useTextOverflow({ lines: 1 });
|
|
5426
|
-
const el = /* @__PURE__ */ jsx("span", { ref, className: "block text-xs font-medium text-[var(--ds-text-muted)] uppercase tracking-wider truncate min-w-0", children });
|
|
5434
|
+
const el = /* @__PURE__ */ jsx("span", { ref, className: cn("block text-xs font-medium text-[var(--ds-text-muted)] uppercase tracking-wider truncate min-w-0", className), children });
|
|
5427
5435
|
if (!isTruncated) return el;
|
|
5428
5436
|
return /* @__PURE__ */ jsx(AutoTooltip, { content: children, children: el });
|
|
5429
5437
|
}
|
|
@@ -5441,6 +5449,7 @@ function StatsCard({ value, label, trend, icon, layout = "card", interactive, on
|
|
|
5441
5449
|
"div",
|
|
5442
5450
|
{
|
|
5443
5451
|
"data-card": "",
|
|
5452
|
+
"data-stats-card": "",
|
|
5444
5453
|
className: cn(
|
|
5445
5454
|
"flex flex-col p-ds-3 sm:p-ds-5 min-w-0",
|
|
5446
5455
|
"bg-[var(--ds-bg-surface)] rounded-[var(--ds-radius-md)]",
|
|
@@ -5455,8 +5464,10 @@ function StatsCard({ value, label, trend, icon, layout = "card", interactive, on
|
|
|
5455
5464
|
"hover:scale-[var(--ds-ambient-hover-scale)] hover:-translate-y-[var(--ds-ambient-hover-lift)]"
|
|
5456
5465
|
],
|
|
5457
5466
|
GLASS_SURFACE,
|
|
5458
|
-
|
|
5459
|
-
|
|
5467
|
+
STAT_CONTAINER,
|
|
5468
|
+
CELL_STAT,
|
|
5469
|
+
// a clickable card is a Tab stop; a plain one is while it scrolls in a dashboard's widget
|
|
5470
|
+
onClick ? FOCUS_RING : FOCUS_INSET_WHILE_STOP,
|
|
5460
5471
|
className
|
|
5461
5472
|
),
|
|
5462
5473
|
onClick,
|
|
@@ -5469,15 +5480,13 @@ function StatsCard({ value, label, trend, icon, layout = "card", interactive, on
|
|
|
5469
5480
|
}
|
|
5470
5481
|
} : void 0,
|
|
5471
5482
|
children: [
|
|
5472
|
-
/* @__PURE__ */ jsxs("div", { className: "
|
|
5473
|
-
/* @__PURE__ */
|
|
5474
|
-
|
|
5475
|
-
/* @__PURE__ */
|
|
5476
|
-
|
|
5477
|
-
trend && /* @__PURE__ */ jsx(TrendBadge, { trend })
|
|
5478
|
-
] })
|
|
5483
|
+
/* @__PURE__ */ jsxs("div", { className: cn("grid gap-ds-2 min-w-0", icon ? "grid-cols-[minmax(0,1fr)_auto]" : "grid-cols-[minmax(0,1fr)]", CELL_ROOM_INNER), children: [
|
|
5484
|
+
/* @__PURE__ */ jsx(TruncLabel, { className: cn("self-start", CELL_STAT_ROOM, !icon && CELL_STAT_ROOM_END), children: label }),
|
|
5485
|
+
/* @__PURE__ */ jsxs("div", { className: cn("col-start-1 flex items-baseline gap-ds-2 flex-wrap", icon && STAT_NARROW_LINE), children: [
|
|
5486
|
+
/* @__PURE__ */ jsx("span", { className: cn("font-[family-name:var(--ds-font-display)] text-2xl font-[var(--ds-weight-heading)] text-[var(--ds-text-primary)] leading-none tabular-nums", STAT_VALUE_STEPS), children: value }),
|
|
5487
|
+
trend && /* @__PURE__ */ jsx(TrendBadge, { trend })
|
|
5479
5488
|
] }),
|
|
5480
|
-
icon && /* @__PURE__ */ jsx("div", { className: "
|
|
5489
|
+
icon && /* @__PURE__ */ jsx("div", { className: cn("col-start-2 row-[1/span_2] self-start flex items-center justify-center w-8 h-8 rounded-[var(--ds-radius-sm)] bg-[var(--ds-bg-muted)]", STAT_NARROW_TILE, CELL_STAT_TILE), children: /* @__PURE__ */ jsx(Icon, { name: icon, size: 16, className: "text-[var(--ds-text-muted)]" }) })
|
|
5481
5490
|
] }),
|
|
5482
5491
|
children && /* @__PURE__ */ jsx("div", { className: "mt-ds-3 text-xs text-[var(--ds-text-muted)]", children })
|
|
5483
5492
|
]
|
|
@@ -6163,12 +6172,12 @@ var CARD_TOGGLE = cn(
|
|
|
6163
6172
|
);
|
|
6164
6173
|
function TableHeading({ title, description, actions, titleId, descriptionId, inset }) {
|
|
6165
6174
|
const heading = /* @__PURE__ */ jsx("h3", { id: titleId, className: TITLE_CLASSES, children: title });
|
|
6166
|
-
const actionsBlock = actions ? /* @__PURE__ */ jsx("div", { className: HEADER_LAYOUT.actions, children: actions }) : null;
|
|
6175
|
+
const actionsBlock = actions ? /* @__PURE__ */ jsx("div", { className: cn(HEADER_LAYOUT.actions, CELL_HIDE), children: actions }) : null;
|
|
6167
6176
|
const titleLeads = !actions || actionsAreBadges(actions);
|
|
6168
6177
|
const leadRowRef = useRef(null);
|
|
6169
6178
|
const leadFloorFits = useTitleFloorFits(leadRowRef, titleLeads);
|
|
6170
6179
|
const descriptionText = (className) => description ? /* @__PURE__ */ jsx("p", { id: descriptionId, className: cn(className, "text-sm text-[var(--ds-text-muted)] break-words"), children: description }) : null;
|
|
6171
|
-
return /* @__PURE__ */ jsx("div", { "data-table-heading": "", className: cn(inset ? "px-ds-5 py-ds-4" : "pb-ds-4"), children: !titleLeads ? /* @__PURE__ */ jsxs("div", { className: HEADER_LAYOUT.row, children: [
|
|
6180
|
+
return /* @__PURE__ */ jsx("div", { "data-table-heading": "", className: cn(inset ? "px-ds-5 py-ds-4" : "pb-ds-4", CELL_ROOM), children: !titleLeads ? /* @__PURE__ */ jsxs("div", { className: HEADER_LAYOUT.row, children: [
|
|
6172
6181
|
/* @__PURE__ */ jsxs("div", { className: HEADER_LAYOUT.block, children: [
|
|
6173
6182
|
heading,
|
|
6174
6183
|
descriptionText()
|
|
@@ -6477,7 +6486,8 @@ function Table({
|
|
|
6477
6486
|
const preferences = useShellPreferences();
|
|
6478
6487
|
const mobileBreakpoint = mobileBreakpointProp ?? preferences.tableToCardsBreakpoint ?? "md";
|
|
6479
6488
|
const narrowScreen = useBreakpoint(mobileBreakpoint);
|
|
6480
|
-
const
|
|
6489
|
+
const [inCell, setInCell] = useState(false);
|
|
6490
|
+
const { cards: isMobile, rootRef } = useCardsSwitch(narrowScreen && !inCell, inCell ? 0 : cardsBelow, title);
|
|
6481
6491
|
useRevealFocus(rootRef, isMobile);
|
|
6482
6492
|
useFocusKeptInList(rootRef);
|
|
6483
6493
|
const [cardsEl, setCardsEl] = useState(null);
|
|
@@ -6486,6 +6496,7 @@ function Table({
|
|
|
6486
6496
|
rootRef.current = node;
|
|
6487
6497
|
if (typeof ref === "function") ref(node);
|
|
6488
6498
|
else if (ref) ref.current = node;
|
|
6499
|
+
if (node) setInCell(node.matches(CELL_FRAME));
|
|
6489
6500
|
}, [ref, rootRef]);
|
|
6490
6501
|
const tableRef = useRef(null);
|
|
6491
6502
|
const [pins, setPins] = useState(NO_PINS);
|
|
@@ -7323,7 +7334,7 @@ function Table({
|
|
|
7323
7334
|
},
|
|
7324
7335
|
...fade,
|
|
7325
7336
|
...region,
|
|
7326
|
-
className: cn("relative min-h-0 overflow-x-auto focus-visible:outline-none", title ? "rounded-b-[inherit]" : "rounded-[inherit]"),
|
|
7337
|
+
className: cn("relative min-h-0 overflow-x-auto focus-visible:outline-none", title ? "rounded-b-[inherit]" : "rounded-[inherit]", inCell && "scroll-p-[4px]"),
|
|
7327
7338
|
children: table
|
|
7328
7339
|
}
|
|
7329
7340
|
)
|
|
@@ -10846,19 +10857,20 @@ function AsidePanel({
|
|
|
10846
10857
|
}) {
|
|
10847
10858
|
const collapsed = useBreakpoint(collapseBelow);
|
|
10848
10859
|
const shell = useAppShell();
|
|
10860
|
+
const inSlot = useContext(AsideSlotContext);
|
|
10849
10861
|
const navbarFloating = navbarFloatingProp ?? shell?.navbarFloating ?? false;
|
|
10850
10862
|
const sidebarFloating = sidebarFloatingProp ?? shell?.sidebarFloating ?? false;
|
|
10851
|
-
const setAsideOpen = shell?.setAsideOpen;
|
|
10852
|
-
const setAsideFloating = shell?.setAsideFloating;
|
|
10853
10863
|
const floating = position === "floating";
|
|
10854
|
-
|
|
10855
|
-
|
|
10856
|
-
|
|
10857
|
-
|
|
10858
|
-
|
|
10859
|
-
|
|
10860
|
-
|
|
10861
|
-
|
|
10864
|
+
const reportAside = shell?.reportAside;
|
|
10865
|
+
const close = useLatest(onClose);
|
|
10866
|
+
const wasOpen = useRef(false);
|
|
10867
|
+
useLayoutEffect(() => {
|
|
10868
|
+
if (!reportAside) return;
|
|
10869
|
+
const opened = open && !wasOpen.current;
|
|
10870
|
+
wasOpen.current = open;
|
|
10871
|
+
reportAside(close, { open, opened, page: !inSlot, docked: !collapsed, floating, side, name: labelledBy });
|
|
10872
|
+
return () => reportAside(close, null);
|
|
10873
|
+
}, [reportAside, close, open, inSlot, collapsed, floating, side, labelledBy]);
|
|
10862
10874
|
if (collapsed) {
|
|
10863
10875
|
return /* @__PURE__ */ jsx(
|
|
10864
10876
|
Drawer,
|
|
@@ -10877,7 +10889,7 @@ function AsidePanel({
|
|
|
10877
10889
|
}
|
|
10878
10890
|
);
|
|
10879
10891
|
}
|
|
10880
|
-
|
|
10892
|
+
const docked = /* @__PURE__ */ jsx(
|
|
10881
10893
|
DockedColumn,
|
|
10882
10894
|
{
|
|
10883
10895
|
open,
|
|
@@ -10896,6 +10908,9 @@ function AsidePanel({
|
|
|
10896
10908
|
children
|
|
10897
10909
|
}
|
|
10898
10910
|
);
|
|
10911
|
+
if (!shell || inSlot) return docked;
|
|
10912
|
+
const host = shell.asideHosts[side];
|
|
10913
|
+
return host ? createPortal(docked, host) : null;
|
|
10899
10914
|
}
|
|
10900
10915
|
function DockedColumn({ open, onClose, side, width, floating, navbarFloating, sidebarFloating, keepMounted, resizable, maxWidth, labelledBy, id, children, className }) {
|
|
10901
10916
|
const asideRef = useRef(null);
|
|
@@ -10960,7 +10975,7 @@ function DockedColumn({ open, onClose, side, width, floating, navbarFloating, si
|
|
|
10960
10975
|
),
|
|
10961
10976
|
style: { width: currentWidth },
|
|
10962
10977
|
children: [
|
|
10963
|
-
children,
|
|
10978
|
+
/* @__PURE__ */ jsx(OverlayCloseCtx, { value: null, children }),
|
|
10964
10979
|
resizable && open && /* @__PURE__ */ jsx(
|
|
10965
10980
|
ResizeEdge,
|
|
10966
10981
|
{
|
|
@@ -11013,7 +11028,7 @@ var StackedList = forwardRef(function StackedList2({
|
|
|
11013
11028
|
}, [ref]);
|
|
11014
11029
|
const stackMeta = isPhone && articles;
|
|
11015
11030
|
const selectable = selectedId !== void 0 || items.some((i) => i.selected !== void 0);
|
|
11016
|
-
const inset = articles ? inCard ? "px-ds-5" : "px-0" : inCard ? "px-ds-5" : inPane ? "pl-ds-3 pr-ds-4" : selectable ? "pl-ds-3 pr-0" : "px-0";
|
|
11031
|
+
const inset = articles ? inCard ? "px-ds-5" : "px-0" : inCard ? selectable ? "pl-[calc(var(--ds-space-5)_-_var(--ds-nav-v-active-rail)*1.5)] pr-ds-5" : "px-ds-5" : inPane ? "pl-ds-3 pr-ds-4" : selectable ? "pl-ds-3 pr-0" : "px-0";
|
|
11017
11032
|
const list2 = /* @__PURE__ */ jsx(
|
|
11018
11033
|
"ul",
|
|
11019
11034
|
{
|
|
@@ -13016,7 +13031,7 @@ function getTabsFromDOM(el) {
|
|
|
13016
13031
|
const tablist = el.closest('[role="tablist"]');
|
|
13017
13032
|
if (!tablist) return [];
|
|
13018
13033
|
return Array.from(tablist.querySelectorAll('[role="tab"]')).map((btn) => ({
|
|
13019
|
-
id: btn.
|
|
13034
|
+
id: btn.dataset.tab ?? "",
|
|
13020
13035
|
disabled: btn.getAttribute("aria-disabled") === "true"
|
|
13021
13036
|
}));
|
|
13022
13037
|
}
|
|
@@ -13049,11 +13064,12 @@ function handleTabKeyDown(e, currentId, getTabs, orientation, select) {
|
|
|
13049
13064
|
e.preventDefault();
|
|
13050
13065
|
if (targetId && targetId !== currentId) {
|
|
13051
13066
|
select?.(targetId);
|
|
13052
|
-
|
|
13067
|
+
e.currentTarget.closest('[role="tablist"]')?.querySelector(`[data-tab="${CSS.escape(targetId)}"]`)?.focus();
|
|
13053
13068
|
}
|
|
13054
13069
|
}
|
|
13055
13070
|
function TabButton({
|
|
13056
13071
|
id,
|
|
13072
|
+
scope,
|
|
13057
13073
|
label,
|
|
13058
13074
|
count,
|
|
13059
13075
|
icon,
|
|
@@ -13080,8 +13096,8 @@ function TabButton({
|
|
|
13080
13096
|
if (!e.currentTarget.closest('[role="tablist"]')?.contains(e.relatedTarget)) forget();
|
|
13081
13097
|
}
|
|
13082
13098
|
};
|
|
13083
|
-
const tabId = `ds-tab-${id}`;
|
|
13084
|
-
const panelId = hasPanel === false ? void 0 : `ds-tabpanel-${id}`;
|
|
13099
|
+
const tabId = `ds-tab-${scope}${id}`;
|
|
13100
|
+
const panelId = hasPanel === false ? void 0 : `ds-tabpanel-${scope}${id}`;
|
|
13085
13101
|
const badgeBg = orientation === "vertical" ? "bg-[var(--ds-nav-v-badge-bg)]" : "bg-[var(--ds-nav-h-badge-bg)]";
|
|
13086
13102
|
const countBadge = count !== void 0 ? /* @__PURE__ */ jsx("span", { className: cn(
|
|
13087
13103
|
orientation === "vertical" ? "ml-ds-2" : "",
|
|
@@ -13094,6 +13110,7 @@ function TabButton({
|
|
|
13094
13110
|
{
|
|
13095
13111
|
type: "button",
|
|
13096
13112
|
id: tabId,
|
|
13113
|
+
"data-tab": id,
|
|
13097
13114
|
role: "tab",
|
|
13098
13115
|
"aria-selected": isActive2,
|
|
13099
13116
|
"aria-controls": panelId,
|
|
@@ -13130,6 +13147,7 @@ function TabButton({
|
|
|
13130
13147
|
{
|
|
13131
13148
|
type: "button",
|
|
13132
13149
|
id: tabId,
|
|
13150
|
+
"data-tab": id,
|
|
13133
13151
|
role: "tab",
|
|
13134
13152
|
"aria-selected": isActive2,
|
|
13135
13153
|
"aria-controls": panelId,
|
|
@@ -13186,11 +13204,12 @@ function TabsList({ children, className }) {
|
|
|
13186
13204
|
return /* @__PURE__ */ jsx(TabStrip, { overflow, fullWidth, track, label, className, children });
|
|
13187
13205
|
}
|
|
13188
13206
|
function TabsTrigger({ value, children, count, icon, disabled, truncate, className }) {
|
|
13189
|
-
const { activeTab, onTabChange, orientation, fullWidth, overflow, activation, stopTab, setFocusedTab } = useTabsCtx();
|
|
13207
|
+
const { activeTab, onTabChange, orientation, fullWidth, overflow, activation, stopTab, setFocusedTab, scope } = useTabsCtx();
|
|
13190
13208
|
return /* @__PURE__ */ jsx(
|
|
13191
13209
|
TabButton,
|
|
13192
13210
|
{
|
|
13193
13211
|
id: value,
|
|
13212
|
+
scope,
|
|
13194
13213
|
label: children,
|
|
13195
13214
|
count,
|
|
13196
13215
|
icon,
|
|
@@ -13207,16 +13226,47 @@ function TabsTrigger({ value, children, count, icon, disabled, truncate, classNa
|
|
|
13207
13226
|
}
|
|
13208
13227
|
);
|
|
13209
13228
|
}
|
|
13229
|
+
function needsStop(panel) {
|
|
13230
|
+
const stops = tabStops(panel);
|
|
13231
|
+
if (!stops.length) return true;
|
|
13232
|
+
const walk = panel.ownerDocument.createTreeWalker(panel, NodeFilter.SHOW_TEXT);
|
|
13233
|
+
for (let text = walk.nextNode(); text; text = walk.nextNode()) {
|
|
13234
|
+
const at = text.parentElement;
|
|
13235
|
+
if (!at || !text.textContent?.trim()) continue;
|
|
13236
|
+
return !stops.some((stop) => stop.contains(at)) && !panel.contains(at.closest(CONTROL_ANCESTOR));
|
|
13237
|
+
}
|
|
13238
|
+
return false;
|
|
13239
|
+
}
|
|
13240
|
+
function keepPanelStop(panel) {
|
|
13241
|
+
const read = () => {
|
|
13242
|
+
if (panel.ownerDocument.activeElement === panel) return;
|
|
13243
|
+
const stop = needsStop(panel);
|
|
13244
|
+
if (stop !== (panel.getAttribute("tabindex") === "0")) {
|
|
13245
|
+
if (stop) panel.tabIndex = 0;
|
|
13246
|
+
else panel.removeAttribute("tabindex");
|
|
13247
|
+
}
|
|
13248
|
+
};
|
|
13249
|
+
read();
|
|
13250
|
+
const watch = new MutationObserver(read);
|
|
13251
|
+
watch.observe(panel, { subtree: true, childList: true, characterData: true, attributes: true, attributeFilter: ["tabindex", "disabled", "hidden", "inert", "href", "role"] });
|
|
13252
|
+
panel.addEventListener("focusout", read);
|
|
13253
|
+
return () => {
|
|
13254
|
+
watch.disconnect();
|
|
13255
|
+
panel.removeEventListener("focusout", read);
|
|
13256
|
+
};
|
|
13257
|
+
}
|
|
13210
13258
|
function TabsContent({ value, children, className }) {
|
|
13211
|
-
const { activeTab } = useTabsCtx();
|
|
13259
|
+
const { activeTab, scope } = useTabsCtx();
|
|
13260
|
+
const [panel, setPanel] = useState(null);
|
|
13261
|
+
useLayoutEffect(() => panel ? keepPanelStop(panel) : void 0, [panel]);
|
|
13212
13262
|
if (activeTab !== value) return null;
|
|
13213
13263
|
return /* @__PURE__ */ jsx(
|
|
13214
13264
|
"div",
|
|
13215
13265
|
{
|
|
13216
|
-
|
|
13266
|
+
ref: setPanel,
|
|
13267
|
+
id: `ds-tabpanel-${scope}${value}`,
|
|
13217
13268
|
role: "tabpanel",
|
|
13218
|
-
"aria-labelledby": `ds-tab-${value}`,
|
|
13219
|
-
tabIndex: 0,
|
|
13269
|
+
"aria-labelledby": `ds-tab-${scope}${value}`,
|
|
13220
13270
|
className: cn(FOCUS_RING, className),
|
|
13221
13271
|
children
|
|
13222
13272
|
}
|
|
@@ -13239,6 +13289,7 @@ function TabsRoot(props) {
|
|
|
13239
13289
|
const arrayOverflow = arrayApi && props.tabs.some((t) => t.truncate) ? "truncate" : overflow;
|
|
13240
13290
|
const [focusedTab, setFocusedTab] = useState(null);
|
|
13241
13291
|
const stopTab = focusedTab ?? activeTab;
|
|
13292
|
+
const scope = useId();
|
|
13242
13293
|
const track = useScrollTrack(stopTab, arrayApi && effectiveOrientation === "horizontal" && arrayOverflow === "scroll");
|
|
13243
13294
|
if ("tabs" in props && props.tabs) {
|
|
13244
13295
|
const { tabs, mobile = "scroll" } = props;
|
|
@@ -13280,14 +13331,14 @@ function TabsRoot(props) {
|
|
|
13280
13331
|
children: tab.group
|
|
13281
13332
|
}
|
|
13282
13333
|
),
|
|
13283
|
-
/* @__PURE__ */ jsx(TabButton, { hasPanel: false, ...tab, orientation: effectiveOrientation, activeTab, onTabChange, fullWidth, isTabStop: i === stopIndex, setFocusedTab, onKeyDown: (e) => handleTabKeyDown(e, tab.id, () => tabs, effectiveOrientation, select) })
|
|
13334
|
+
/* @__PURE__ */ jsx(TabButton, { hasPanel: false, ...tab, scope, orientation: effectiveOrientation, activeTab, onTabChange, fullWidth, isTabStop: i === stopIndex, setFocusedTab, onKeyDown: (e) => handleTabKeyDown(e, tab.id, () => tabs, effectiveOrientation, select) })
|
|
13284
13335
|
] }, tab.id))
|
|
13285
13336
|
}
|
|
13286
13337
|
);
|
|
13287
13338
|
}
|
|
13288
|
-
return /* @__PURE__ */ jsx(TabStrip, { overflow: arrayOverflow, fullWidth, track, label: ariaLabel, className, children: tabs.map((tab, i) => /* @__PURE__ */ jsx(TabButton, { hasPanel: false, ...tab, orientation: effectiveOrientation, activeTab, onTabChange, fullWidth, isTabStop: i === stopIndex, setFocusedTab, onKeyDown: (e) => handleTabKeyDown(e, tab.id, () => tabs, effectiveOrientation, select) }, tab.id)) });
|
|
13339
|
+
return /* @__PURE__ */ jsx(TabStrip, { overflow: arrayOverflow, fullWidth, track, label: ariaLabel, className, children: tabs.map((tab, i) => /* @__PURE__ */ jsx(TabButton, { hasPanel: false, ...tab, scope, orientation: effectiveOrientation, activeTab, onTabChange, fullWidth, isTabStop: i === stopIndex, setFocusedTab, onKeyDown: (e) => handleTabKeyDown(e, tab.id, () => tabs, effectiveOrientation, select) }, tab.id)) });
|
|
13289
13340
|
}
|
|
13290
|
-
return /* @__PURE__ */ jsx(TabsContext.Provider, { value: { activeTab, onTabChange, orientation: effectiveOrientation, fullWidth, overflow, activation, stopTab, setFocusedTab, label: ariaLabel }, children: /* @__PURE__ */ jsx("div", { className, children: props.children }) });
|
|
13341
|
+
return /* @__PURE__ */ jsx(TabsContext.Provider, { value: { activeTab, onTabChange, orientation: effectiveOrientation, fullWidth, overflow, activation, stopTab, setFocusedTab, label: ariaLabel, scope }, children: /* @__PURE__ */ jsx("div", { className, children: props.children }) });
|
|
13291
13342
|
}
|
|
13292
13343
|
var Tabs = Object.assign(TabsRoot, {
|
|
13293
13344
|
List: TabsList,
|
|
@@ -15600,6 +15651,16 @@ var FLOATING_HEADER = cn(
|
|
|
15600
15651
|
"border-[length:var(--ds-border-width)] border-[var(--ds-border-default)]",
|
|
15601
15652
|
GLASS_SURFACE
|
|
15602
15653
|
);
|
|
15654
|
+
var HEAD_LINE = "flex flex-col @sm:flex-row flex-wrap @sm:items-center justify-between gap-ds-4";
|
|
15655
|
+
var HEAD_LEAD = "flex items-center gap-ds-4 min-w-0 @sm:contents";
|
|
15656
|
+
var HEAD_BLOCK = "min-w-0 @sm:grow @sm:max-w-max @sm:me-auto @sm:basis-[calc(var(--ds-font-size-3xl)*4.5)]";
|
|
15657
|
+
var MINIMAL_LINE = "flex flex-wrap items-center justify-between gap-ds-4";
|
|
15658
|
+
var TITLE_GROUP = "flex flex-wrap items-center gap-x-ds-2 gap-y-ds-1 min-w-0";
|
|
15659
|
+
var FLOOR_XL = "basis-[calc(var(--ds-font-size-xl)*4.5)]";
|
|
15660
|
+
var MINIMAL_LEAD = cn(TITLE_GROUP, "grow max-w-max", FLOOR_XL);
|
|
15661
|
+
var TITLE_KEEPS = "min-w-0 grow max-w-max";
|
|
15662
|
+
var FLOOR_3XL = "basis-[calc(var(--ds-font-size-3xl)*4.5)]";
|
|
15663
|
+
var HEAD_ACTIONS = "flex flex-wrap items-center gap-ds-2";
|
|
15603
15664
|
function computeFloatingPadding(navbarFloating, sidebarFloating, overlapActive, asideFloatingSide) {
|
|
15604
15665
|
return {
|
|
15605
15666
|
paddingTop: navbarFloating ? 0 : "var(--ds-space-3)",
|
|
@@ -15665,7 +15726,7 @@ var PageHeader = forwardRef(function PageHeader2({
|
|
|
15665
15726
|
}, { isHome: shell?.isHome ?? false, isMobile: shell?.isMobile ?? false, navbarFloating: shell?.navbarFloating ?? false, sidebarFloating: shell?.sidebarFloating ?? false });
|
|
15666
15727
|
const { variant, behavior, position, intensity, navbarFloating, sidebarFloating } = r;
|
|
15667
15728
|
const isFloating = position === "floating";
|
|
15668
|
-
const asideFloatingSide = shell?.
|
|
15729
|
+
const asideFloatingSide = shell?.asideFloatingSide ?? null;
|
|
15669
15730
|
const bcPill = r.breadcrumbStyle === "pill";
|
|
15670
15731
|
const bcSep = r.breadcrumbSeparator;
|
|
15671
15732
|
const contentMaxWidth = contentMaxWidthProp ?? container?.contentMaxWidth;
|
|
@@ -15868,23 +15929,20 @@ function DefaultHeader({
|
|
|
15868
15929
|
/* @__PURE__ */ jsxs("div", { className: inner.className, style: inner.style, children: [
|
|
15869
15930
|
focusBack && /* @__PURE__ */ jsx(BackLink, { onClick: focusBack }),
|
|
15870
15931
|
hasBreadcrumbs && /* @__PURE__ */ jsx(Breadcrumbs2, { items: breadcrumbs, pill: breadcrumbPill, separator: breadcrumbSeparator }),
|
|
15871
|
-
/* @__PURE__ */ jsxs("div", { className: cn(
|
|
15872
|
-
"
|
|
15873
|
-
hasBreadcrumbs && "mt-ds-1"
|
|
15874
|
-
), children: [
|
|
15875
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-ds-4 min-w-0", children: [
|
|
15932
|
+
/* @__PURE__ */ jsxs("div", { className: cn(HEAD_LINE, hasBreadcrumbs && "mt-ds-1"), children: [
|
|
15933
|
+
/* @__PURE__ */ jsxs("div", { className: HEAD_LEAD, children: [
|
|
15876
15934
|
onBack && /* @__PURE__ */ jsx(BackButton, { onClick: onBack }),
|
|
15877
15935
|
avatar && /* @__PURE__ */ jsx("div", { className: "shrink-0", children: avatar }),
|
|
15878
|
-
/* @__PURE__ */ jsxs("div", { className:
|
|
15936
|
+
/* @__PURE__ */ jsxs("div", { className: HEAD_BLOCK, children: [
|
|
15879
15937
|
caption && /* @__PURE__ */ jsx(Caption, { children: caption }),
|
|
15880
|
-
/* @__PURE__ */ jsxs("div", { className:
|
|
15881
|
-
/* @__PURE__ */ jsx(TruncHeading, { as: Heading, className: "font-[family-name:var(--ds-font-display)] text-3xl font-[var(--ds-weight-heading)] text-[var(--ds-text-primary)]", children: title }),
|
|
15938
|
+
/* @__PURE__ */ jsxs("div", { className: TITLE_GROUP, children: [
|
|
15939
|
+
/* @__PURE__ */ jsx(TruncHeading, { as: Heading, className: cn(TITLE_KEEPS, FLOOR_3XL, "font-[family-name:var(--ds-font-display)] text-3xl font-[var(--ds-weight-heading)] text-[var(--ds-text-primary)]"), children: title }),
|
|
15882
15940
|
badge
|
|
15883
15941
|
] }),
|
|
15884
15942
|
description && /* @__PURE__ */ jsx(ClampedText, { className: "mt-ds-1 text-sm text-[var(--ds-text-secondary)]", children: description })
|
|
15885
15943
|
] })
|
|
15886
15944
|
] }),
|
|
15887
|
-
actions && /* @__PURE__ */ jsx("div", { className:
|
|
15945
|
+
actions && /* @__PURE__ */ jsx("div", { className: HEAD_ACTIONS, children: actions })
|
|
15888
15946
|
] }),
|
|
15889
15947
|
filters && /* @__PURE__ */ jsx(FilterRow, { className: "mt-ds-4", children: filters }),
|
|
15890
15948
|
tabs && /* @__PURE__ */ jsx(TabRow, { hasCaption: !!caption, className: "mt-ds-4 -mx-ds-1", children: tabs })
|
|
@@ -15915,12 +15973,12 @@ function MinimalHeader({
|
|
|
15915
15973
|
focusBack && /* @__PURE__ */ jsx(BackLink, { onClick: focusBack }),
|
|
15916
15974
|
hasBreadcrumbs && /* @__PURE__ */ jsx(Breadcrumbs2, { items: breadcrumbs, pill: breadcrumbPill, separator: breadcrumbSeparator }),
|
|
15917
15975
|
caption && /* @__PURE__ */ jsx(Caption, { children: caption }),
|
|
15918
|
-
/* @__PURE__ */ jsxs("div", { className: cn(
|
|
15919
|
-
/* @__PURE__ */ jsxs("div", { className:
|
|
15920
|
-
/* @__PURE__ */ jsx(TruncHeading, { as: Heading, lines: 1, className: "font-[family-name:var(--ds-font-display)] text-xl font-[var(--ds-weight-heading)] text-[var(--ds-text-primary)]", children: title }),
|
|
15976
|
+
/* @__PURE__ */ jsxs("div", { className: cn(MINIMAL_LINE, hasBreadcrumbs && "mt-ds-0.5"), children: [
|
|
15977
|
+
/* @__PURE__ */ jsxs("div", { className: MINIMAL_LEAD, children: [
|
|
15978
|
+
/* @__PURE__ */ jsx(TruncHeading, { as: Heading, lines: 1, className: cn(TITLE_KEEPS, FLOOR_XL, "font-[family-name:var(--ds-font-display)] text-xl font-[var(--ds-weight-heading)] text-[var(--ds-text-primary)]"), children: title }),
|
|
15921
15979
|
badge
|
|
15922
15980
|
] }),
|
|
15923
|
-
actions && /* @__PURE__ */ jsx(ControlSizeContext.Provider, { value: "sm", children: /* @__PURE__ */ jsx("div", { className:
|
|
15981
|
+
actions && /* @__PURE__ */ jsx(ControlSizeContext.Provider, { value: "sm", children: /* @__PURE__ */ jsx("div", { className: HEAD_ACTIONS, children: actions }) })
|
|
15924
15982
|
] }),
|
|
15925
15983
|
tabs && /* @__PURE__ */ jsx(TabRow, { hasCaption: !!caption, className: "mt-ds-3 -mx-ds-1", children: tabs })
|
|
15926
15984
|
] }) });
|
|
@@ -16005,17 +16063,16 @@ function ColourfulHeader({
|
|
|
16005
16063
|
children: [
|
|
16006
16064
|
focusBack && /* @__PURE__ */ jsx(BackLink, { onClick: focusBack, onLight: isBold }),
|
|
16007
16065
|
hasBreadcrumbs && /* @__PURE__ */ jsx(Breadcrumbs2, { items: breadcrumbs, onLight: isBold, onTint: !isBold, pill: breadcrumbPill, separator: breadcrumbSeparator }),
|
|
16008
|
-
/* @__PURE__ */ jsxs("div", { className: cn(
|
|
16009
|
-
"
|
|
16010
|
-
hasBreadcrumbs && "mt-ds-1"
|
|
16011
|
-
), children: [
|
|
16012
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-ds-4 min-w-0", children: [
|
|
16066
|
+
/* @__PURE__ */ jsxs("div", { className: cn(HEAD_LINE, hasBreadcrumbs && "mt-ds-1"), children: [
|
|
16067
|
+
/* @__PURE__ */ jsxs("div", { className: HEAD_LEAD, children: [
|
|
16013
16068
|
onBack && /* @__PURE__ */ jsx(BackButton, { onClick: onBack, onLight: isBold }),
|
|
16014
16069
|
avatar && /* @__PURE__ */ jsx("div", { className: "shrink-0", children: avatar }),
|
|
16015
|
-
/* @__PURE__ */ jsxs("div", { className:
|
|
16070
|
+
/* @__PURE__ */ jsxs("div", { className: HEAD_BLOCK, children: [
|
|
16016
16071
|
caption && /* @__PURE__ */ jsx(Caption, { onLight: isBold, onTint: !isBold, children: caption }),
|
|
16017
|
-
/* @__PURE__ */ jsxs("div", { className:
|
|
16072
|
+
/* @__PURE__ */ jsxs("div", { className: TITLE_GROUP, children: [
|
|
16018
16073
|
/* @__PURE__ */ jsx(TruncHeading, { as: Heading, className: cn(
|
|
16074
|
+
TITLE_KEEPS,
|
|
16075
|
+
FLOOR_3XL,
|
|
16019
16076
|
"font-[family-name:var(--ds-font-display)] text-3xl font-[var(--ds-weight-heading)]",
|
|
16020
16077
|
isBold ? "text-[var(--ds-text-on-primary)]" : "text-[var(--ds-text-primary)]"
|
|
16021
16078
|
), children: title }),
|
|
@@ -16027,7 +16084,7 @@ function ColourfulHeader({
|
|
|
16027
16084
|
), children: description })
|
|
16028
16085
|
] })
|
|
16029
16086
|
] }),
|
|
16030
|
-
actions && /* @__PURE__ */ jsx("div", { className:
|
|
16087
|
+
actions && /* @__PURE__ */ jsx("div", { className: HEAD_ACTIONS, children: actions })
|
|
16031
16088
|
] }),
|
|
16032
16089
|
filters && /* @__PURE__ */ jsx(FilterRow, { className: "mt-ds-4", onBand: isBold, children: filters }),
|
|
16033
16090
|
tabs && /* @__PURE__ */ jsx(TabRow, { hasCaption: !!caption, className: "mt-ds-4 -mx-ds-1", onBand: isBold, children: tabs })
|
|
@@ -16227,12 +16284,12 @@ function SnappingHeader({
|
|
|
16227
16284
|
focusBack && /* @__PURE__ */ jsx(BackLink, { onClick: focusBack }),
|
|
16228
16285
|
hasBreadcrumbs && !hideExpandedBreadcrumbs && /* @__PURE__ */ jsx(Breadcrumbs2, { items: breadcrumbs, pill: breadcrumbPill, separator: breadcrumbSeparator }),
|
|
16229
16286
|
caption && /* @__PURE__ */ jsx(Caption, { children: caption }),
|
|
16230
|
-
/* @__PURE__ */ jsxs("div", { className: cn(
|
|
16231
|
-
/* @__PURE__ */ jsxs("div", { className:
|
|
16232
|
-
/* @__PURE__ */ jsx(TruncHeading, { as: Heading, className: "font-[family-name:var(--ds-font-display)] text-xl font-[var(--ds-weight-heading)] text-[var(--ds-text-primary)]", children: title }),
|
|
16287
|
+
/* @__PURE__ */ jsxs("div", { className: cn(MINIMAL_LINE, hasBreadcrumbs && !hideExpandedBreadcrumbs && "mt-ds-0.5"), children: [
|
|
16288
|
+
/* @__PURE__ */ jsxs("div", { className: MINIMAL_LEAD, children: [
|
|
16289
|
+
/* @__PURE__ */ jsx(TruncHeading, { as: Heading, className: cn(TITLE_KEEPS, FLOOR_XL, "font-[family-name:var(--ds-font-display)] text-xl font-[var(--ds-weight-heading)] text-[var(--ds-text-primary)]"), children: title }),
|
|
16233
16290
|
badge
|
|
16234
16291
|
] }),
|
|
16235
|
-
actions && /* @__PURE__ */ jsx(ControlSizeContext.Provider, { value: "sm", children: /* @__PURE__ */ jsx("div", { className:
|
|
16292
|
+
actions && /* @__PURE__ */ jsx(ControlSizeContext.Provider, { value: "sm", children: /* @__PURE__ */ jsx("div", { className: HEAD_ACTIONS, children: actions }) })
|
|
16236
16293
|
] }),
|
|
16237
16294
|
filters && /* @__PURE__ */ jsx(FilterRow, { className: "mt-ds-3", children: filters }),
|
|
16238
16295
|
expandedContent && /* @__PURE__ */ jsx("div", { className: "mt-ds-3", children: expandedContent }),
|
|
@@ -16255,40 +16312,41 @@ function SnappingHeader({
|
|
|
16255
16312
|
!collapsed && focusBack && /* @__PURE__ */ jsx(BackLink, { onClick: focusBack, onLight }),
|
|
16256
16313
|
!collapsed && hasBreadcrumbs && !hideExpandedBreadcrumbs && /* @__PURE__ */ jsx(Breadcrumbs2, { items: breadcrumbs, onLight, onTint, pill: breadcrumbPill, separator: breadcrumbSeparator }),
|
|
16257
16314
|
/* @__PURE__ */ jsxs("div", { className: cn(
|
|
16258
|
-
|
|
16259
|
-
collapsed
|
|
16260
|
-
!collapsed && hasBreadcrumbs && !hideExpandedBreadcrumbs && "mt-ds-1",
|
|
16261
|
-
collapsed && "w-full"
|
|
16315
|
+
collapsed ? cn(MINIMAL_LINE, "w-full") : HEAD_LINE,
|
|
16316
|
+
!collapsed && hasBreadcrumbs && !hideExpandedBreadcrumbs && "mt-ds-1"
|
|
16262
16317
|
), children: [
|
|
16263
|
-
/* @__PURE__ */ jsxs("div", { className: "
|
|
16318
|
+
/* @__PURE__ */ jsxs("div", { className: collapsed ? "contents" : HEAD_LEAD, children: [
|
|
16264
16319
|
onBack && !collapsed && /* @__PURE__ */ jsx(BackButton, { onClick: onBack, onLight }),
|
|
16265
16320
|
avatar && !collapsed && /* @__PURE__ */ jsx("div", { className: "shrink-0", children: avatar }),
|
|
16266
|
-
|
|
16321
|
+
collapsed && hasBreadcrumbs && (() => {
|
|
16322
|
+
const lastCrumb = breadcrumbs[breadcrumbs.length - 1];
|
|
16323
|
+
const isClickable = !!lastCrumb && crumbGoes(lastCrumb);
|
|
16324
|
+
const Tag3 = isClickable ? "a" : "span";
|
|
16325
|
+
return /* @__PURE__ */ jsxs(
|
|
16326
|
+
Tag3,
|
|
16327
|
+
{
|
|
16328
|
+
...isClickable ? {
|
|
16329
|
+
href: lastCrumb.href ?? "#",
|
|
16330
|
+
onClick: (e) => followCrumb(e, lastCrumb)
|
|
16331
|
+
} : {},
|
|
16332
|
+
className: cn(
|
|
16333
|
+
// the title's group's gap from it, not the line's
|
|
16334
|
+
"text-sm hidden @sm:inline-flex items-center gap-ds-1 -me-ds-2",
|
|
16335
|
+
isClickable ? cn("text-[var(--ds-text-secondary)] hover:text-[var(--ds-text-primary)] transition-colors duration-[var(--ds-transition-speed)] cursor-pointer", FOCUS_RING) : "text-[var(--ds-text-secondary)]"
|
|
16336
|
+
),
|
|
16337
|
+
children: [
|
|
16338
|
+
lastCrumb?.label,
|
|
16339
|
+
breadcrumbSeparator === "slash" ? /* @__PURE__ */ jsx("span", { "aria-hidden": true, children: "/" }) : breadcrumbSeparator === "dot" ? /* @__PURE__ */ jsx("span", { "aria-hidden": true, children: "\xB7" }) : breadcrumbSeparator === "arrow" ? /* @__PURE__ */ jsx(Icon, { name: "arrow-right", size: 12 }) : /* @__PURE__ */ jsx(Icon, { name: "chevron-right", size: 12 })
|
|
16340
|
+
]
|
|
16341
|
+
}
|
|
16342
|
+
);
|
|
16343
|
+
})(),
|
|
16344
|
+
/* @__PURE__ */ jsxs("div", { className: collapsed ? cn("min-w-0 grow max-w-max me-auto", TITLE_FLOOR) : HEAD_BLOCK, children: [
|
|
16267
16345
|
!collapsed && caption && /* @__PURE__ */ jsx(Caption, { onLight, onTint, children: caption }),
|
|
16268
|
-
/* @__PURE__ */ jsxs("div", { className:
|
|
16269
|
-
collapsed && hasBreadcrumbs && (() => {
|
|
16270
|
-
const lastCrumb = breadcrumbs[breadcrumbs.length - 1];
|
|
16271
|
-
const isClickable = !!lastCrumb && crumbGoes(lastCrumb);
|
|
16272
|
-
const Tag3 = isClickable ? "a" : "span";
|
|
16273
|
-
return /* @__PURE__ */ jsxs(
|
|
16274
|
-
Tag3,
|
|
16275
|
-
{
|
|
16276
|
-
...isClickable ? {
|
|
16277
|
-
href: lastCrumb.href ?? "#",
|
|
16278
|
-
onClick: (e) => followCrumb(e, lastCrumb)
|
|
16279
|
-
} : {},
|
|
16280
|
-
className: cn(
|
|
16281
|
-
"text-sm hidden @sm:inline-flex items-center gap-ds-1",
|
|
16282
|
-
isClickable ? cn("text-[var(--ds-text-secondary)] hover:text-[var(--ds-text-primary)] transition-colors duration-[var(--ds-transition-speed)] cursor-pointer", FOCUS_RING) : "text-[var(--ds-text-secondary)]"
|
|
16283
|
-
),
|
|
16284
|
-
children: [
|
|
16285
|
-
lastCrumb?.label,
|
|
16286
|
-
breadcrumbSeparator === "slash" ? /* @__PURE__ */ jsx("span", { "aria-hidden": true, children: "/" }) : breadcrumbSeparator === "dot" ? /* @__PURE__ */ jsx("span", { "aria-hidden": true, children: "\xB7" }) : breadcrumbSeparator === "arrow" ? /* @__PURE__ */ jsx(Icon, { name: "arrow-right", size: 12 }) : /* @__PURE__ */ jsx(Icon, { name: "chevron-right", size: 12 })
|
|
16287
|
-
]
|
|
16288
|
-
}
|
|
16289
|
-
);
|
|
16290
|
-
})(),
|
|
16346
|
+
/* @__PURE__ */ jsxs("div", { className: TITLE_GROUP, children: [
|
|
16291
16347
|
/* @__PURE__ */ jsx(TruncHeading, { as: Heading, lines: collapsed ? 1 : void 0, className: cn(
|
|
16348
|
+
TITLE_KEEPS,
|
|
16349
|
+
collapsed ? TITLE_FLOOR : FLOOR_3XL,
|
|
16292
16350
|
"font-[family-name:var(--ds-font-display)] font-[var(--ds-weight-heading)]",
|
|
16293
16351
|
collapsed ? "text-lg text-[var(--ds-text-primary)]" : cn("text-3xl", onLight ? "text-[var(--ds-text-on-primary)]" : "text-[var(--ds-text-primary)]")
|
|
16294
16352
|
), children: title }),
|
|
@@ -16300,7 +16358,7 @@ function SnappingHeader({
|
|
|
16300
16358
|
), children: description })
|
|
16301
16359
|
] })
|
|
16302
16360
|
] }),
|
|
16303
|
-
actions && (collapsed ? /* @__PURE__ */ jsx(ControlSizeContext.Provider, { value: "sm", children: /* @__PURE__ */ jsx("div", { className:
|
|
16361
|
+
actions && (collapsed ? /* @__PURE__ */ jsx(ControlSizeContext.Provider, { value: "sm", children: /* @__PURE__ */ jsx("div", { className: HEAD_ACTIONS, children: actions }) }) : /* @__PURE__ */ jsx("div", { className: HEAD_ACTIONS, children: actions }))
|
|
16304
16362
|
] }),
|
|
16305
16363
|
!collapsed && filters && /* @__PURE__ */ jsx(FilterRow, { className: "mt-ds-4", onBand: isBoldColourful, children: filters }),
|
|
16306
16364
|
!collapsed && expandedContent && /* @__PURE__ */ jsx("div", { className: "mt-ds-4", children: expandedContent }),
|
|
@@ -16373,23 +16431,20 @@ function TabsIntegratedHeader({
|
|
|
16373
16431
|
return /* @__PURE__ */ jsx("header", { "data-gs": "page-header", ref: headerRef, className: cn(hasBreadcrumbs ? "pt-ds-3" : "pt-ds-6", "pb-ds-6", isFloating && cn(FLOATING_HEADER, "overflow-hidden"), className), children: /* @__PURE__ */ jsxs("div", { className: inner.className, style: inner.style, children: [
|
|
16374
16432
|
focusBack && /* @__PURE__ */ jsx(BackLink, { onClick: focusBack }),
|
|
16375
16433
|
hasBreadcrumbs && /* @__PURE__ */ jsx(Breadcrumbs2, { items: breadcrumbs, pill: breadcrumbPill, separator: breadcrumbSeparator }),
|
|
16376
|
-
/* @__PURE__ */ jsxs("div", { className: cn(
|
|
16377
|
-
"
|
|
16378
|
-
hasBreadcrumbs && "mt-ds-1"
|
|
16379
|
-
), children: [
|
|
16380
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-ds-4 min-w-0", children: [
|
|
16434
|
+
/* @__PURE__ */ jsxs("div", { className: cn(HEAD_LINE, hasBreadcrumbs && "mt-ds-1"), children: [
|
|
16435
|
+
/* @__PURE__ */ jsxs("div", { className: HEAD_LEAD, children: [
|
|
16381
16436
|
onBack && /* @__PURE__ */ jsx(BackButton, { onClick: onBack }),
|
|
16382
16437
|
avatar && /* @__PURE__ */ jsx("div", { className: "shrink-0", children: avatar }),
|
|
16383
|
-
/* @__PURE__ */ jsxs("div", { className:
|
|
16438
|
+
/* @__PURE__ */ jsxs("div", { className: HEAD_BLOCK, children: [
|
|
16384
16439
|
caption && /* @__PURE__ */ jsx(Caption, { children: caption }),
|
|
16385
|
-
/* @__PURE__ */ jsxs("div", { className:
|
|
16386
|
-
/* @__PURE__ */ jsx(TruncHeading, { as: Heading, className: "font-[family-name:var(--ds-font-display)] text-3xl font-[var(--ds-weight-heading)] text-[var(--ds-text-primary)]", children: title }),
|
|
16440
|
+
/* @__PURE__ */ jsxs("div", { className: TITLE_GROUP, children: [
|
|
16441
|
+
/* @__PURE__ */ jsx(TruncHeading, { as: Heading, className: cn(TITLE_KEEPS, FLOOR_3XL, "font-[family-name:var(--ds-font-display)] text-3xl font-[var(--ds-weight-heading)] text-[var(--ds-text-primary)]"), children: title }),
|
|
16387
16442
|
badge
|
|
16388
16443
|
] }),
|
|
16389
16444
|
description && /* @__PURE__ */ jsx(ClampedText, { className: "mt-ds-1 text-sm text-[var(--ds-text-secondary)]", children: description })
|
|
16390
16445
|
] })
|
|
16391
16446
|
] }),
|
|
16392
|
-
actions && /* @__PURE__ */ jsx("div", { className:
|
|
16447
|
+
actions && /* @__PURE__ */ jsx("div", { className: HEAD_ACTIONS, children: actions })
|
|
16393
16448
|
] }),
|
|
16394
16449
|
tabs && /* @__PURE__ */ jsx(TabRow, { hasCaption: !!caption, className: "mt-ds-4 -mx-ds-1", children: tabs })
|
|
16395
16450
|
] }) });
|
|
@@ -18634,7 +18689,50 @@ function DangerZone({ title = "Danger zone", description, children, className })
|
|
|
18634
18689
|
)
|
|
18635
18690
|
] });
|
|
18636
18691
|
}
|
|
18692
|
+
var byte = (n) => n.toString(16).padStart(2, "0");
|
|
18693
|
+
function readColours(el, names) {
|
|
18694
|
+
const doc = el.ownerDocument;
|
|
18695
|
+
const style = getComputedStyle(el);
|
|
18696
|
+
const probe = el.appendChild(doc.createElement("span"));
|
|
18697
|
+
const ctx = doc.createElement("canvas").getContext("2d", { willReadFrequently: true });
|
|
18698
|
+
const out = {};
|
|
18699
|
+
for (const name of names) {
|
|
18700
|
+
const raw = style.getPropertyValue(name).trim();
|
|
18701
|
+
if (!ctx || !raw || !CSS.supports("color", raw)) {
|
|
18702
|
+
out[name] = "#00000000";
|
|
18703
|
+
continue;
|
|
18704
|
+
}
|
|
18705
|
+
probe.style.color = `var(${name})`;
|
|
18706
|
+
const computed = getComputedStyle(probe).color;
|
|
18707
|
+
const see = /^rgba|\s\//.test(computed) ? /[,/]\s*([\d.]+)(%?)\s*\)$/.exec(computed) : null;
|
|
18708
|
+
const alpha = see ? +see[1] / (see[2] ? 100 : 1) : 1;
|
|
18709
|
+
ctx.clearRect(0, 0, 1, 1);
|
|
18710
|
+
ctx.fillStyle = see ? `${computed.slice(0, see.index)})` : computed;
|
|
18711
|
+
ctx.fillRect(0, 0, 1, 1);
|
|
18712
|
+
const [r, g, b] = ctx.getImageData(0, 0, 1, 1).data;
|
|
18713
|
+
out[name] = `#${byte(r)}${byte(g)}${byte(b)}${alpha < 1 ? byte(Math.round(alpha * 255)) : ""}`;
|
|
18714
|
+
}
|
|
18715
|
+
probe.remove();
|
|
18716
|
+
return out;
|
|
18717
|
+
}
|
|
18718
|
+
function useThemeColors(ref, names) {
|
|
18719
|
+
const key = names.join(" ");
|
|
18720
|
+
const [colours, setColours] = useState(null);
|
|
18721
|
+
useLayoutEffect(() => {
|
|
18722
|
+
const el = ref.current;
|
|
18723
|
+
if (!el || !key || typeof CSS === "undefined") return;
|
|
18724
|
+
const read = () => {
|
|
18725
|
+
const next = readColours(el, key.split(" "));
|
|
18726
|
+
setColours((was) => JSON.stringify(was) === JSON.stringify(next) ? was : next);
|
|
18727
|
+
};
|
|
18728
|
+
read();
|
|
18729
|
+
const watch = new MutationObserver(read);
|
|
18730
|
+
watch.observe(el.ownerDocument.documentElement, { attributes: true, attributeFilter: ["data-mode"], subtree: true });
|
|
18731
|
+
return () => watch.disconnect();
|
|
18732
|
+
}, [ref, key]);
|
|
18733
|
+
return colours;
|
|
18734
|
+
}
|
|
18637
18735
|
|
|
18638
|
-
export { Accordion, ActionPanel, ActionPanelGroup, AddAnother, Alert, AsidePanel, AvatarGroup, BottomNav, BulkActionBar, Calendar, Card, CardContent, CardDescription, CardFooter, CardGrid, CardHeader, CardTitle, Carousel, ChatMessageList, ChatPanel, Collapsible, CollapsibleContent, CollapsibleTrigger, ColorPicker, Combobox, CommandPalette, ContextMenu, CornerPanel, DEFAULT_DATE_RANGE_PRESETS, DangerZone, DataList, DateRangePicker, DescriptionList, Dialog, Dock, EmptyState, EntityCell, FileUpload, FlowSaved, FormWrapper, Gantt, Kbd, Launcher, LocaleProvider, MentionInput, MobileHeaderMenu, NavItem, NavMenu, Navbar, NotificationCenter, PageActions, PageContainer, PageHeader, PinInput, Progress, RadioGroup, Rating, RecurrencePicker, RecurrenceScopeDialog, RelativeTime, ScrollArea, SectionHeading, SettingsLayout, Sheet, Sidebar, SidebarNav, SliderRange, StackedList, StatsCard, StatusDot, Stepper, TIME_ZOOMS, Table, TableToolbar, Tabs, TabsContent, TabsList, TabsTrigger, Tag, TagInput, TimeBar, TimePicker, TimeRow, TimeScaleHeader, TimeViewport, Timeline, TimezoneSelect, Toast, ToastProvider, Tour, TransferList, TreeView, browserTimeZone, canonicalTimeZone, countEdited, dateOfDay, dayOf, deleteOccurrence, describeRecurrence, endDayOf, fitLabel, fitLabels, formatDateRange, nthOf, occurrenceOn, occurrences, parseRRule, readFlowProgress, readRecurrence, recurrencePresets, sameRecurrence, saveOccurrence, timeExtent, timeZoneOffset, toRRule, useBrowserTimeZone, useContentWidth, useDestructiveAction, useFittedLabels, useFlowSteps, useRelativeTimeFormat, useSidebar, useTextMeasure, useTimeScale, useTimeViewport, useTimeViewportLayout, useToast, useToastOptional };
|
|
18736
|
+
export { Accordion, ActionPanel, ActionPanelGroup, AddAnother, Alert, AsidePanel, AvatarGroup, BottomNav, BulkActionBar, Calendar, Card, CardContent, CardDescription, CardFooter, CardGrid, CardHeader, CardTitle, Carousel, ChatMessageList, ChatPanel, Collapsible, CollapsibleContent, CollapsibleTrigger, ColorPicker, Combobox, CommandPalette, ContextMenu, CornerPanel, DEFAULT_DATE_RANGE_PRESETS, DangerZone, DataList, DateRangePicker, DescriptionList, Dialog, Dock, EmptyState, EntityCell, FileUpload, FlowSaved, FormWrapper, Gantt, Kbd, Launcher, LocaleProvider, MentionInput, MobileHeaderMenu, NavItem, NavMenu, Navbar, NotificationCenter, PageActions, PageContainer, PageHeader, PinInput, Progress, RadioGroup, Rating, RecurrencePicker, RecurrenceScopeDialog, RelativeTime, ScrollArea, SectionHeading, SettingsLayout, Sheet, Sidebar, SidebarNav, SliderRange, StackedList, StatsCard, StatusDot, Stepper, TIME_ZOOMS, Table, TableToolbar, Tabs, TabsContent, TabsList, TabsTrigger, Tag, TagInput, TimeBar, TimePicker, TimeRow, TimeScaleHeader, TimeViewport, Timeline, TimezoneSelect, Toast, ToastProvider, Tour, TransferList, TreeView, browserTimeZone, canonicalTimeZone, countEdited, dateOfDay, dayOf, deleteOccurrence, describeRecurrence, endDayOf, fitLabel, fitLabels, formatDateRange, nthOf, occurrenceOn, occurrences, parseRRule, readFlowProgress, readRecurrence, recurrencePresets, sameRecurrence, saveOccurrence, timeExtent, timeZoneOffset, toRRule, useBrowserTimeZone, useContentWidth, useDestructiveAction, useFittedLabels, useFlowSteps, useRelativeTimeFormat, useSidebar, useTextMeasure, useThemeColors, useTimeScale, useTimeViewport, useTimeViewportLayout, useToast, useToastOptional };
|
|
18639
18737
|
//# sourceMappingURL=index.js.map
|
|
18640
18738
|
//# sourceMappingURL=index.js.map
|