@caratlogic/design-system 0.1.30 → 0.1.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -15443,7 +15443,7 @@ const CollapsibleCard = ({ title, subtitle, icon, headerActions, defaultOpen = t
15443
15443
 
15444
15444
  /** A titled card on a document detail page: payments, customer, items, notes… */
15445
15445
  function DetailSection({ icon, title, count, actions, children, className, bodyClassName, }) {
15446
- return (jsxs("section", { className: cn('overflow-hidden rounded-2xl border border-border bg-card', className), children: [jsxs("header", { className: "flex flex-wrap items-center gap-2.5 border-b border-border px-4 py-3", children: [jsx("span", { "aria-hidden": true, className: "flex size-7 shrink-0 items-center justify-center rounded-lg bg-primary/10 text-primary dark:bg-primary/20 [&_svg]:size-4", children: icon }), jsx("h3", { className: "m-0 text-base font-semibold text-foreground", children: title }), typeof count === 'string' || typeof count === 'number' ? (jsx(Badge, { appearance: "soft", color: "secondary", shape: "pill", size: "sm", children: count })) : (count), actions ? jsx("div", { className: "ml-auto flex flex-wrap items-center gap-2.5", children: actions }) : null] }), children != null ? jsx("div", { className: bodyClassName, children: children }) : null] }));
15446
+ return (jsxs("section", { className: cn('overflow-hidden rounded-2xl border border-border bg-card', className), children: [jsxs("header", { className: "flex flex-wrap items-center gap-2.5 border-b border-border bg-section-header px-4 py-3", children: [jsx("span", { "aria-hidden": true, className: "flex size-7 shrink-0 items-center justify-center rounded-lg bg-primary/10 text-primary dark:bg-primary/20 [&_svg]:size-4", children: icon }), jsx("h3", { className: "m-0 text-base font-semibold text-foreground", children: title }), typeof count === 'string' || typeof count === 'number' ? (jsx(Badge, { appearance: "soft", color: "secondary", shape: "pill", size: "sm", children: count })) : (count), actions ? jsx("div", { className: "ml-auto flex flex-wrap items-center gap-2.5", children: actions }) : null] }), children != null ? jsx("div", { className: bodyClassName, children: children }) : null] }));
15447
15447
  }
15448
15448
 
15449
15449
  const HEADER_TONE_CLASSES = {
@@ -37212,26 +37212,63 @@ function clampPercent$1(value) {
37212
37212
  return 0;
37213
37213
  return Math.min(100, Math.max(0, value));
37214
37214
  }
37215
- const CAPTION_TONE = {
37216
- default: 'text-muted-foreground',
37215
+ const LABEL_TONE = {
37216
+ default: 'text-secondary-foreground',
37217
37217
  success: 'text-amount-paid',
37218
+ info: 'text-info',
37219
+ warning: 'text-badge-amber-text',
37218
37220
  destructive: 'text-amount-outstanding',
37221
+ muted: 'text-secondary-foreground',
37219
37222
  };
37220
- function getCaptionClassName(tone) {
37221
- return CAPTION_TONE[tone];
37223
+ function getLabelClassName(tone) {
37224
+ return LABEL_TONE[tone];
37222
37225
  }
37223
- const BAR_TONE = {
37224
- primary: 'bg-primary',
37225
- success: 'bg-success',
37226
- info: 'bg-info',
37226
+ /** The lightest wash of the status colour, matching the document's status pill. */
37227
+ const PANEL_TONE = {
37228
+ default: 'bg-muted/40',
37229
+ success: 'bg-primary/5 dark:bg-primary/10',
37230
+ info: 'bg-info/5 dark:bg-info/10',
37231
+ warning: 'bg-warning/5 dark:bg-warning/10',
37232
+ destructive: 'bg-destructive/5 dark:bg-destructive/10',
37233
+ muted: 'bg-muted/40',
37227
37234
  };
37228
- function getBarClassName(tone) {
37229
- return BAR_TONE[tone];
37235
+ function getFactsPanelClassName(tone) {
37236
+ return PANEL_TONE[tone];
37237
+ }
37238
+ const TRACK_TONE = {
37239
+ default: 'bg-progress-track',
37240
+ success: 'bg-progress-track',
37241
+ info: 'bg-info/15',
37242
+ warning: 'bg-warning/15',
37243
+ destructive: 'bg-destructive/15',
37244
+ muted: 'bg-progress-track',
37245
+ };
37246
+ function getProgressTrackClassName(tone) {
37247
+ return TRACK_TONE[tone];
37248
+ }
37249
+ const FACT_ICON_TONE = {
37250
+ default: 'bg-muted text-muted-foreground',
37251
+ success: 'bg-badge-green-bg text-amount-paid',
37252
+ warning: 'bg-badge-amber-bg text-badge-amber-text',
37253
+ destructive: 'bg-badge-destructive-bg text-amount-outstanding',
37254
+ };
37255
+ function getFactIconClassName(tone) {
37256
+ return FACT_ICON_TONE[tone];
37257
+ }
37258
+ const FACT_NOTE_TONE = {
37259
+ default: 'text-muted-foreground',
37260
+ success: 'text-amount-paid',
37261
+ warning: 'text-badge-amber-text',
37262
+ destructive: 'text-amount-outstanding',
37263
+ };
37264
+ function getFactNoteClassName(tone) {
37265
+ return FACT_NOTE_TONE[tone];
37230
37266
  }
37231
37267
  const SEGMENT_TONE = {
37232
37268
  success: 'bg-success',
37233
37269
  info: 'bg-info',
37234
37270
  primary: 'bg-primary',
37271
+ 'primary-soft': 'bg-primary/40',
37235
37272
  warning: 'bg-warning',
37236
37273
  remaining: 'bg-progress-track',
37237
37274
  };
@@ -37240,82 +37277,47 @@ function getSegmentClassName$1(tone) {
37240
37277
  }
37241
37278
  /** Each segment's width in percent of the segments' sum; all 0 when there's nothing to split. */
37242
37279
  function getSegmentPercents(segments) {
37243
- const amounts = segments.map((segment) => (Number.isFinite(segment.amount) ? Math.max(0, segment.amount) : 0));
37280
+ const amounts = segments.map((segment) => Number.isFinite(segment.amount) ? Math.max(0, segment.amount) : 0);
37244
37281
  const whole = amounts.reduce((sum, amount) => sum + amount, 0);
37245
37282
  return amounts.map((amount) => (whole > 0 ? (amount / whole) * 100 : 0));
37246
37283
  }
37247
- /** A complete payment uses the brand green; a partial one the "paid" green. */
37248
- function getProgressFillClassName(percent) {
37249
- return percent >= 100 ? 'bg-primary' : 'bg-amount-paid';
37250
- }
37251
- /** The lightest wash of the status colour, so the panel reads like the header pill without shouting. */
37252
- const STATUS_TINT = {
37253
- neutral: '',
37254
- success: 'bg-success/5 dark:bg-success/10',
37255
- info: 'bg-info/5 dark:bg-info/10',
37256
- warning: 'bg-warning/5 dark:bg-warning/10',
37257
- destructive: 'bg-destructive/5 dark:bg-destructive/10',
37258
- muted: 'bg-muted/40',
37259
- };
37260
- /** Background tint for the status area (the side panel, or the whole card without one). */
37261
- function getStatusTintClassName(tone) {
37262
- return STATUS_TINT[tone];
37263
- }
37264
- /** The panel beside the total only takes a colour when the status has one. */
37265
- function getAsidePanelClassName(tone) {
37266
- return STATUS_TINT[tone];
37267
- }
37268
37284
  /** No value to show: blank, or the "—" placeholder apps pass. */
37269
- function isEmptyMetaValue(value) {
37270
- return value == null || (typeof value === 'string' && (value.trim() === '' || value.trim() === '—'));
37271
- }
37272
- function getProgressTrackClassName(tone) {
37273
- return tone === 'destructive' ? 'bg-destructive/15' : 'bg-progress-track';
37274
- }
37275
- /** Up to four meta cells per row from `md`, two on phones. */
37276
- function getMetaColumns(count) {
37277
- return Math.min(4, Math.max(1, count));
37278
- }
37279
- const MD_COLS = {
37280
- 1: 'md:grid-cols-1',
37281
- 2: 'md:grid-cols-2',
37282
- 3: 'md:grid-cols-3',
37283
- 4: 'md:grid-cols-4',
37284
- };
37285
- function getMetaGridClassName(count) {
37286
- return `grid grid-cols-2 ${MD_COLS[getMetaColumns(count)]}`;
37287
- }
37288
- /** Hairlines by position, so they're right whether two or `cols` cells share a row. */
37289
- function getMetaCellClassName(index, count) {
37290
- const cols = getMetaColumns(count);
37291
- return [
37292
- 'min-w-0 border-border px-5 py-3',
37293
- index % 2 === 1 ? 'border-l' : '',
37294
- index >= 2 ? 'border-t' : '',
37295
- index % cols === 0 ? 'md:border-l-0' : 'md:border-l',
37296
- index >= cols ? 'md:border-t' : 'md:border-t-0',
37297
- ]
37298
- .filter(Boolean)
37299
- .join(' ');
37285
+ function isEmptyFactValue(value) {
37286
+ return (value == null ||
37287
+ (typeof value === 'string' && (value.trim() === '' || value.trim() === '—')));
37300
37288
  }
37301
37289
 
37302
- function BreakdownPanel({ breakdown }) {
37290
+ function ProgressBar({ progress, tone, name, }) {
37291
+ const percent = clampPercent$1(progress.percent);
37292
+ return (jsxs("div", { className: "mt-4 w-full max-w-xl", children: [jsx("div", { role: "progressbar", "aria-label": name, "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": percent, className: cn('h-2 overflow-hidden rounded-full', getProgressTrackClassName(tone)), children: jsx("div", { className: "h-full rounded-full bg-primary", style: { width: `${percent}%` } }) }), progress.value != null ||
37293
+ progress.label != null ||
37294
+ progress.trailing != null ? (jsxs("div", { className: "mt-2 flex items-center justify-between gap-3 text-xs", children: [jsxs("span", { className: "text-secondary-foreground", children: [progress.value != null ? (jsx("span", { className: "font-semibold tabular-nums text-amount-paid", children: progress.value })) : null, progress.value != null && progress.label != null ? ' ' : null, progress.label] }), progress.trailing != null ? (jsx("span", { className: "text-right tabular-nums text-secondary-foreground", children: progress.trailing })) : null] })) : null] }));
37295
+ }
37296
+ function BreakdownBar({ breakdown, }) {
37303
37297
  const percents = getSegmentPercents(breakdown.segments);
37304
- return (jsxs(Fragment$2, { children: [jsx("dl", { className: "m-0 grid grid-flow-col auto-cols-fr gap-4", children: breakdown.segments.map((segment) => (jsxs("div", { className: "min-w-0", children: [jsxs("dt", { className: "flex items-center gap-1.5 text-xs text-label-subtle", children: [jsx("span", { "aria-hidden": true, className: cn('size-2 shrink-0 rounded-full', getSegmentClassName$1(segment.tone)) }), segment.label] }), jsx("dd", { className: "m-0 text-lg font-semibold tabular-nums text-foreground", children: segment.value })] }, segment.label))) }), jsx("div", { role: "img", "aria-label": `${breakdown.label}: ${breakdown.segments
37298
+ return (jsxs("div", { className: "mt-4 w-full max-w-xl", children: [jsx("dl", { className: "m-0 grid grid-flow-col auto-cols-fr gap-4", children: breakdown.segments.map((segment) => (jsxs("div", { className: "min-w-0", children: [jsxs("dt", { className: "flex items-center gap-1.5 text-xs text-muted-foreground", children: [jsx("span", { "aria-hidden": true, className: cn('h-1.5 w-3 shrink-0 rounded-full', getSegmentClassName$1(segment.tone), segment.tone === 'remaining' &&
37299
+ 'ring-1 ring-inset ring-border') }), segment.label] }), jsx("dd", { className: "m-0 text-base font-semibold tabular-nums text-foreground", children: segment.value })] }, segment.label))) }), jsx("div", { role: "img", "aria-label": `${breakdown.label}: ${breakdown.segments
37305
37300
  .map((segment, index) => `${segment.label} ${Math.round(percents[index])}%`)
37306
- .join(', ')}`, className: "mb-2 mt-3 flex h-2 overflow-hidden rounded-full bg-progress-track", children: breakdown.segments.map((segment, index) => segment.tone === 'remaining' || percents[index] === 0 ? null : (jsx("div", { className: cn('h-full', getSegmentClassName$1(segment.tone)), style: { width: `${percents[index]}%` } }, segment.label))) }), breakdown.caption ? jsx("p", { className: "m-0 text-xs text-muted-foreground", children: breakdown.caption }) : null] }));
37301
+ .join(', ')}`, className: "mt-3 flex h-2 overflow-hidden rounded-full bg-progress-track", children: breakdown.segments.map((segment, index) => segment.tone === 'remaining' || percents[index] === 0 ? null : (jsx("div", { className: cn('h-full', getSegmentClassName$1(segment.tone)), style: { width: `${percents[index]}%` } }, segment.label))) }), breakdown.caption ? (jsx("p", { className: "m-0 mt-2 text-xs text-secondary-foreground", children: breakdown.caption })) : null] }));
37302
+ }
37303
+ function FactRow({ fact }) {
37304
+ const tone = fact.tone ?? 'default';
37305
+ const empty = isEmptyFactValue(fact.value);
37306
+ return (jsxs("div", { className: "flex min-h-10 items-center gap-3 border-b border-border py-1.5 last:border-b-0", children: [jsx("span", { "aria-hidden": true, className: cn('flex size-6 shrink-0 items-center justify-center rounded-md text-xs font-semibold [&_svg]:size-3.5', getFactIconClassName(tone)), children: fact.icon }), jsx("dt", { className: "min-w-0 flex-1 text-sm text-secondary-foreground", children: fact.label }), jsxs("dd", { className: "m-0 flex min-w-0 flex-wrap items-baseline justify-end gap-x-2 text-right", children: [empty ? (jsx("span", { className: "text-sm font-medium text-muted-foreground", children: fact.emptyLabel ?? 'Not provided' })) : (jsx("span", { className: cn('break-words text-sm font-semibold tabular-nums', tone === 'success' ? 'text-amount-paid' : 'text-foreground'), children: fact.value })), fact.note ? (jsx("span", { className: cn('text-xs font-medium', getFactNoteClassName(tone)), children: fact.note })) : null, fact.onAction ? (jsx("button", { type: "button", onClick: fact.onAction, className: "text-xs font-medium text-primary underline-offset-2 hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", children: fact.actionLabel ?? 'View' })) : null] })] }));
37307
37307
  }
37308
37308
  /**
37309
- * The top of a document detail page: its total, how much of it is settled
37310
- * (paid, or carats returned/sold) and its key dates. Data-only.
37309
+ * The top of a document detail page: the headline amount (balance, total, value),
37310
+ * how much of it is settled, and the key dates and facts beside it. Data-only.
37311
37311
  */
37312
- function DocumentHero({ label, total, caption, captionTone = 'default', payment, bars, breakdown, meta = [], statusTone = 'neutral', className, }) {
37313
- const hasAside = !!payment || !!breakdown || (bars?.length ?? 0) > 0;
37314
- const percent = payment ? clampPercent$1(payment.percent) : 0;
37315
- return (jsxs("section", { className: cn('overflow-hidden rounded-2xl border border-border bg-card', className), children: [jsxs("div", { className: cn('grid grid-cols-1', hasAside ? 'md:grid-cols-[1fr_1.25fr]' : getStatusTintClassName(statusTone)), children: [jsxs("div", { className: "min-w-0 px-5 py-4", children: [jsx("p", { className: "m-0 text-xs text-label-subtle", children: label }), jsx("p", { className: "m-0 mt-1 break-words text-4xl font-semibold leading-none tracking-tight tabular-nums text-foreground", children: total }), caption ? jsx("p", { className: cn('m-0 mt-2 text-xs', getCaptionClassName(captionTone)), children: caption }) : null] }), payment ? (jsxs("div", { className: cn('min-w-0 border-t border-border px-5 py-4 md:border-l md:border-t-0', getAsidePanelClassName(statusTone)), children: [jsxs("div", { className: "flex items-baseline justify-between gap-4", children: [jsxs("div", { className: "min-w-0", children: [jsx("span", { className: "text-xs text-label-subtle", children: payment.paidLabel ?? 'Amount paid' }), jsx("p", { className: "m-0 text-lg font-semibold tabular-nums text-amount-paid", children: payment.paid })] }), jsxs("div", { className: "min-w-0 text-right", children: [jsx("span", { className: "text-xs text-label-subtle", children: payment.outstandingLabel ?? 'Outstanding' }), jsx("p", { className: "m-0 text-lg font-semibold tabular-nums text-amount-outstanding", children: payment.outstanding })] })] }), jsx("div", { role: "progressbar", "aria-label": payment.paidLabel ?? 'Amount paid', "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": percent, className: cn('mb-2 mt-3 h-2 overflow-hidden rounded-full', getProgressTrackClassName(statusTone)), children: jsx("div", { className: cn('h-full rounded-full', getProgressFillClassName(percent)), style: { width: `${percent}%` } }) }), payment.caption ? jsx("p", { className: "m-0 text-xs text-muted-foreground", children: payment.caption }) : null] })) : breakdown ? (jsx("div", { className: cn('min-w-0 border-t border-border px-5 py-4 md:border-l md:border-t-0', getAsidePanelClassName(statusTone)), children: jsx(BreakdownPanel, { breakdown: breakdown }) })) : bars && bars.length > 0 ? (jsx("div", { className: cn('flex min-w-0 flex-col gap-3 border-t border-border px-5 py-4 md:border-l md:border-t-0', getAsidePanelClassName(statusTone)), children: bars.map((bar) => {
37316
- const barPercent = clampPercent$1(bar.percent);
37317
- return (jsxs("div", { children: [jsxs("div", { className: "mb-1 flex justify-between gap-3 text-xs", children: [jsx("span", { className: "text-muted-foreground", children: bar.label }), jsx("span", { className: "font-medium tabular-nums text-foreground", children: bar.value })] }), jsx("div", { role: "progressbar", "aria-label": bar.label, "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": barPercent, className: "h-2 overflow-hidden rounded-full bg-muted", children: jsx("div", { className: cn('h-full rounded-full', getBarClassName(bar.tone ?? 'primary')), style: { width: `${barPercent}%` } }) })] }, bar.label));
37318
- }) })) : null] }), meta.length > 0 ? (jsx("dl", { className: cn('m-0 border-t border-border', getMetaGridClassName(meta.length)), children: meta.map((item, index) => (jsxs("div", { className: getMetaCellClassName(index, meta.length), children: [jsx("dt", { className: cn('text-xs font-semibold uppercase tracking-wider', item.danger ? 'text-amount-outstanding' : 'text-label-subtle'), children: item.label }), isEmptyMetaValue(item.value) ? (jsx("dd", { className: "m-0 mt-1 text-sm italic text-muted-foreground", children: item.emptyLabel ?? 'Not provided' })) : (jsx("dd", { className: cn('m-0 mt-1 break-words text-sm font-medium', item.danger ? 'text-amount-outstanding' : 'text-foreground'), children: item.value }))] }, item.label))) })) : null] }));
37312
+ function DocumentHero({ label, labelIcon, tone = 'default', amount, amountNote, progress, breakdown, facts = [], details = [], detailsLabel, detailsIcon, className, }) {
37313
+ return (jsxs("section", { className: cn('overflow-hidden rounded-2xl border border-border bg-card', className), children: [jsxs("div", { className: cn('grid grid-cols-1', facts.length > 0 && 'md:grid-cols-[minmax(0,1.4fr)_minmax(0,1fr)]'), children: [jsxs("div", { className: "flex min-w-0 flex-col justify-center px-5 py-4 sm:px-7 sm:py-4", children: [jsxs("p", { className: cn('m-0 flex items-center gap-1.5 text-xs font-semibold uppercase tracking-wider [&_svg]:size-3.5', getLabelClassName(tone)), children: [labelIcon, label] }), jsxs("div", { className: "mt-1.5 flex flex-wrap items-baseline gap-x-3 gap-y-1", children: [jsx("span", { className: "break-all text-4xl font-semibold leading-none tracking-tight tabular-nums text-foreground sm:text-[2.75rem]", children: amount }), amountNote ? (jsx("span", { className: "text-sm text-secondary-foreground", children: amountNote })) : null] }), breakdown ? (jsx(BreakdownBar, { breakdown: breakdown })) : progress ? (jsx(ProgressBar, { progress: progress, tone: tone, name: label })) : null] }), facts.length > 0 ? (jsx("dl", { className: cn('m-0 flex min-w-0 flex-col justify-center border-t border-border px-5 py-2 md:border-l md:border-t-0', getFactsPanelClassName(tone)), children: facts.map((fact) => (jsx(FactRow, { fact: fact }, fact.label))) })) : null] }), details.length > 0 ? (jsxs("div", { className: "flex flex-wrap items-center gap-x-3 gap-y-1.5 border-t border-border px-5 py-2.5 text-xs sm:px-7", children: [detailsLabel ? (jsxs("span", { className: "inline-flex shrink-0 items-center gap-1 rounded bg-muted px-1.5 py-0.5 font-semibold text-secondary-foreground [&_svg]:size-3", children: [detailsIcon, detailsLabel] })) : null, jsx("dl", { className: "m-0 flex min-w-0 flex-wrap items-center gap-x-3 gap-y-1.5", children: details.map((detail, index) => {
37314
+ const empty = isEmptyFactValue(detail.value);
37315
+ return (jsxs("div", { className: "flex min-w-0 items-center gap-x-3", children: [index > 0 ? (jsx("span", { "aria-hidden": true, className: "h-3 w-px shrink-0 bg-border" })) : null, jsxs("div", { className: "flex min-w-0 items-baseline gap-1.5", children: [jsx("dt", { className: "whitespace-nowrap text-muted-foreground", children: detail.label }), jsx("dd", { className: cn('m-0 break-words', empty
37316
+ ? 'italic text-label-subtle'
37317
+ : 'font-medium text-foreground'), children: empty
37318
+ ? (detail.emptyLabel ?? 'Not provided')
37319
+ : detail.value })] })] }, detail.label));
37320
+ }) })] })) : null] }));
37319
37321
  }
37320
37322
 
37321
37323
  const DropdownMenu = DropdownMenuPrimitive.Root;
@@ -67486,7 +67488,7 @@ function DetailPageSkeleton({ sections = 3, }) {
67486
67488
  }
67487
67489
  /** Document detail page (invoice, memo…): header, `DocumentHero` and `DetailSection` placeholders. */
67488
67490
  function DocumentDetailSkeleton({ aside = 'payment', sections = 3, label = 'Loading document', }) {
67489
- return (jsxs("div", { role: "status", "aria-busy": "true", "aria-label": label, className: "space-y-4", children: [jsxs("div", { className: "flex flex-wrap items-center justify-between gap-3", children: [jsxs("div", { className: "flex items-center gap-3", children: [jsx(SquareSkeleton, { height: 14, width: 80, rounded: "full" }), jsx("span", { className: "h-5 w-px bg-border" }), jsx(SquareSkeleton, { height: 28, width: 200, rounded: "md" }), jsx(SquareSkeleton, { height: 22, width: 72, rounded: "full" })] }), jsxs("div", { className: "flex items-center gap-2", children: [jsx(SquareSkeleton, { height: 36, width: 112, rounded: "lg" }), jsx(SquareSkeleton, { height: 36, width: 80, rounded: "lg" }), jsx(SquareSkeleton, { height: 36, width: 128, rounded: "lg" }), jsx(SquareSkeleton, { height: 36, width: 36, rounded: "lg" })] })] }), jsxs("section", { "aria-hidden": "true", className: "overflow-hidden rounded-2xl border border-border bg-card", children: [jsxs("div", { className: cn('grid grid-cols-1', aside !== 'none' && 'md:grid-cols-[1fr_1.25fr]'), children: [jsxs("div", { className: "space-y-3 px-5 py-4", children: [jsx(SquareSkeleton, { height: 12, width: 96, rounded: "full" }), jsx(SquareSkeleton, { height: 36, width: 180, rounded: "md" }), jsx(SquareSkeleton, { height: 12, width: 200, rounded: "full" })] }), aside === 'payment' && (jsxs("div", { className: "space-y-3 border-t border-border px-5 py-4 md:border-l md:border-t-0", children: [jsxs("div", { className: "flex justify-between gap-4", children: [jsxs("div", { className: "space-y-1.5", children: [jsx(SquareSkeleton, { height: 11, width: 80, rounded: "full" }), jsx(SquareSkeleton, { height: 20, width: 104, rounded: "md" })] }), jsxs("div", { className: "flex flex-col items-end space-y-1.5", children: [jsx(SquareSkeleton, { height: 11, width: 80, rounded: "full" }), jsx(SquareSkeleton, { height: 20, width: 104, rounded: "md" })] })] }), jsx(SquareSkeleton, { height: 8, className: "w-full", rounded: "full" }), jsx(SquareSkeleton, { height: 11, width: 160, rounded: "full" })] })), aside === 'bars' && (jsx("div", { className: "space-y-3 border-t border-border px-5 py-4 md:border-l md:border-t-0", children: [0, 1, 2].map((i) => (jsxs("div", { className: "space-y-1.5", children: [jsxs("div", { className: "flex justify-between", children: [jsx(SquareSkeleton, { height: 11, width: 96, rounded: "full" }), jsx(SquareSkeleton, { height: 11, width: 56, rounded: "full" })] }), jsx(SquareSkeleton, { height: 8, className: "w-full", rounded: "full" })] }, i))) }))] }), jsx("div", { className: "grid grid-cols-2 border-t border-border md:grid-cols-4", children: [0, 1, 2, 3].map((i) => (jsxs("div", { className: "space-y-2 border-border px-5 py-3 even:border-l [&:nth-child(n+3)]:border-t md:border-l md:first:border-l-0 md:[&:nth-child(n+3)]:border-t-0", children: [jsx(SquareSkeleton, { height: 10, width: 56, rounded: "full" }), jsx(SquareSkeleton, { height: 14, width: 96, rounded: "full" })] }, i))) })] }), Array.from({ length: sections }).map((_, s) => (jsxs("section", { "aria-hidden": "true", className: "overflow-hidden rounded-2xl border border-border bg-card", children: [jsxs("div", { className: "flex items-center gap-2.5 border-b border-border px-4 py-3", children: [jsx(SquareSkeleton, { height: 28, width: 28, rounded: "lg" }), jsx(SquareSkeleton, { height: 15, width: 128, rounded: "full" })] }), jsx("div", { className: "space-y-3 p-4", children: Array.from({ length: s === 1 ? 4 : 2 }).map((__, row) => (jsx(SquareSkeleton, { height: s === 1 ? 36 : 14, className: row % 2 ? 'w-3/4' : 'w-full', rounded: "md" }, row))) })] }, s))), jsx("span", { className: "sr-only", children: label })] }));
67491
+ return (jsxs("div", { role: "status", "aria-busy": "true", "aria-label": label, className: "space-y-4", children: [jsxs("div", { className: "flex flex-wrap items-center justify-between gap-3", children: [jsxs("div", { className: "flex items-center gap-3", children: [jsx(SquareSkeleton, { height: 14, width: 80, rounded: "full" }), jsx("span", { className: "h-5 w-px bg-border" }), jsx(SquareSkeleton, { height: 28, width: 200, rounded: "md" }), jsx(SquareSkeleton, { height: 22, width: 72, rounded: "full" })] }), jsxs("div", { className: "flex items-center gap-2", children: [jsx(SquareSkeleton, { height: 36, width: 112, rounded: "lg" }), jsx(SquareSkeleton, { height: 36, width: 80, rounded: "lg" }), jsx(SquareSkeleton, { height: 36, width: 128, rounded: "lg" }), jsx(SquareSkeleton, { height: 36, width: 36, rounded: "lg" })] })] }), jsxs("section", { "aria-hidden": "true", className: "grid grid-cols-1 overflow-hidden rounded-2xl border border-border bg-card md:grid-cols-[minmax(0,1.4fr)_minmax(0,1fr)]", children: [jsxs("div", { className: "flex flex-col justify-center space-y-3 px-5 py-4 sm:px-7 sm:py-4", children: [jsx(SquareSkeleton, { height: 12, width: 96, rounded: "full" }), jsx(SquareSkeleton, { height: 40, width: 220, rounded: "md" }), aside !== 'none' && (jsxs("div", { className: "w-full max-w-xl space-y-2 pt-1", children: [jsx(SquareSkeleton, { height: 8, className: "w-full", rounded: "full" }), jsxs("div", { className: "flex justify-between", children: [jsx(SquareSkeleton, { height: 11, width: 88, rounded: "full" }), jsx(SquareSkeleton, { height: 11, width: 40, rounded: "full" })] })] }))] }), jsx("div", { className: "border-t border-border bg-muted/40 px-5 py-2 md:border-l md:border-t-0", children: [0, 1, 2, 3].map((i) => (jsxs("div", { className: "flex min-h-10 items-center gap-3 border-b border-border py-1.5 last:border-b-0", children: [jsx(SquareSkeleton, { height: 24, width: 24, rounded: "md" }), jsx(SquareSkeleton, { height: 12, width: 72, rounded: "full" }), jsx(SquareSkeleton, { height: 12, width: 88, rounded: "full", className: "ml-auto" })] }, i))) })] }), Array.from({ length: sections }).map((_, s) => (jsxs("section", { "aria-hidden": "true", className: "overflow-hidden rounded-2xl border border-border bg-card", children: [jsxs("div", { className: "flex items-center gap-2.5 border-b border-border px-4 py-3", children: [jsx(SquareSkeleton, { height: 28, width: 28, rounded: "lg" }), jsx(SquareSkeleton, { height: 15, width: 128, rounded: "full" })] }), jsx("div", { className: "space-y-3 p-4", children: Array.from({ length: s === 1 ? 4 : 2 }).map((__, row) => (jsx(SquareSkeleton, { height: s === 1 ? 36 : 14, className: row % 2 ? 'w-3/4' : 'w-full', rounded: "md" }, row))) })] }, s))), jsx("span", { className: "sr-only", children: label })] }));
67490
67492
  }
67491
67493
 
67492
67494
  const SlideOut = ({ open, onOpenChange, ...props }) => {