@designa8/vibedesign-openai-internal-v1-2-176b 0.0.3 → 0.0.5

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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @designa8/vibedesign-openai-internal-v1-2-176b
2
2
 
3
- Complete design system generated by Atoms Design, version **0.0.3**.
3
+ Complete design system generated by Atoms Design, version **0.0.5**.
4
4
  Tokens, atoms, molecules, organisms, and templates — import from the package root;
5
5
  never hardcode visual values in consumer code.
6
6
 
package/dist/index.cjs CHANGED
@@ -520,6 +520,7 @@ var import_jsx_runtime5 = require("react/jsx-runtime");
520
520
  var cn3 = (...parts) => parts.filter(Boolean).join(" ");
521
521
  var base = "relative inline-flex shrink-0 items-center justify-center whitespace-nowrap border select-none cursor-pointer transition duration-150 ease-out active:scale-[0.98] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-blue focus-visible:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50 disabled:active:scale-100";
522
522
  var rowBase = "relative flex w-full min-w-0 select-none items-center justify-start whitespace-nowrap border text-left cursor-pointer transition-colors duration-150 ease-out focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50";
523
+ var bareBase = "relative flex w-full min-w-0 select-none items-start justify-start whitespace-normal border-transparent text-left cursor-pointer transition-colors duration-150 ease-out focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-focus-blue disabled:cursor-not-allowed disabled:opacity-50";
523
524
  var isRow = (v) => v === "field" || v === "item";
524
525
  var rowSizes = {
525
526
  field: {
@@ -533,6 +534,11 @@ var rowSizes = {
533
534
  lg: "h-9 gap-sm px-sm text-body-md"
534
535
  }
535
536
  };
537
+ var bareSizes = {
538
+ sm: "gap-xxs p-0 text-body-sm",
539
+ md: "gap-xxs p-0 text-body-md",
540
+ lg: "gap-xxs p-0 text-body-md"
541
+ };
536
542
  var variants = {
537
543
  primary: "bg-primary text-on-primary border-transparent hover:bg-primary-hover active:bg-primary-active disabled:bg-primary-disabled disabled:text-muted-soft",
538
544
  secondary: "bg-canvas text-ink border-hairline-strong hover:bg-surface-strong hover:border-transparent active:bg-primary active:text-on-primary active:border-transparent focus-visible:border-focus-blue disabled:bg-surface-strong disabled:text-muted-soft disabled:border-transparent",
@@ -542,7 +548,8 @@ var variants = {
542
548
  accent: "bg-accent text-on-accent border-transparent hover:bg-accent-hover active:bg-accent-hover",
543
549
  danger: "bg-semantic-error text-on-primary border-transparent hover:opacity-90 active:opacity-100",
544
550
  field: "bg-canvas text-ink border-hairline-strong enabled:hover:border-muted-soft focus-visible:border-focus-blue aria-expanded:border-focus-blue enabled:hover:aria-expanded:border-focus-blue aria-invalid:border-semantic-error disabled:bg-surface-strong disabled:border-transparent disabled:text-muted-soft",
545
- item: "bg-transparent text-ink border-transparent enabled:hover:bg-surface-soft enabled:active:bg-surface-strong focus-visible:bg-surface-soft aria-selected:bg-surface-strong disabled:text-muted-soft"
551
+ item: "bg-transparent text-ink border-transparent enabled:hover:bg-surface-soft enabled:active:bg-surface-strong focus-visible:bg-surface-soft aria-selected:bg-surface-strong disabled:text-muted-soft",
552
+ bare: "rounded-none bg-transparent text-ink border-transparent disabled:text-muted-soft"
546
553
  };
547
554
  var sizes = {
548
555
  sm: "h-7 gap-xs px-md text-body-sm",
@@ -578,6 +585,8 @@ var Button = React5.forwardRef(
578
585
  ...props
579
586
  }, ref) => {
580
587
  const isDisabled = Boolean(disabled);
588
+ const isBare = variant === "bare";
589
+ const row = isRow(variant);
581
590
  return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
582
591
  "button",
583
592
  {
@@ -594,9 +603,9 @@ var Button = React5.forwardRef(
594
603
  onClick?.(e);
595
604
  },
596
605
  className: cn3(
597
- isRow(variant) ? rowBase : base,
606
+ isBare ? bareBase : row ? rowBase : base,
598
607
  variants[variant],
599
- isRow(variant) ? rowSizes[variant][size] : iconOnly ? squareSizes[size] : sizes[size],
608
+ isBare ? bareSizes[size] : row ? rowSizes[variant][size] : iconOnly ? squareSizes[size] : sizes[size],
600
609
  shape === "pill" ? "rounded-full" : radii[size],
601
610
  fullWidth && "w-full",
602
611
  loading && "cursor-progress",
@@ -604,7 +613,7 @@ var Button = React5.forwardRef(
604
613
  ),
605
614
  ...props,
606
615
  children: [
607
- !isRow(variant) || loading ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
616
+ !row || loading ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
608
617
  "span",
609
618
  {
610
619
  "aria-hidden": "true",
@@ -616,7 +625,7 @@ var Button = React5.forwardRef(
616
625
  }
617
626
  ) : null,
618
627
  leadingIcon ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { "aria-hidden": "true", className: "inline-flex items-center", children: leadingIcon }) : null,
619
- children != null && !(iconOnly && loading) ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: isRow(variant) ? "min-w-0 flex-1 truncate" : "inline-flex items-center", children }) : null,
628
+ children != null && !(iconOnly && loading) ? isBare ? children : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: row ? "min-w-0 flex-1 truncate" : "inline-flex items-center", children }) : null,
620
629
  trailingIcon ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { "aria-hidden": "true", className: "inline-flex items-center", children: trailingIcon }) : null
621
630
  ]
622
631
  }
@@ -3004,22 +3013,40 @@ var React32 = __toESM(require("react"));
3004
3013
  var import_jsx_runtime32 = require("react/jsx-runtime");
3005
3014
  var cn28 = (...parts) => parts.filter(Boolean).join(" ");
3006
3015
  var isCell = (c) => typeof c === "object" && c !== null && !React32.isValidElement(c) && "content" in c;
3016
+ var NESTED_INTERACTIVE = "button, a, input, select, textarea, label, [role='button'], [role='link'], [role='checkbox'], [role='switch'], [role='menuitem'], [role='option']";
3007
3017
  var TableRow = React32.forwardRef(
3008
- ({ cells, selected = false, onSelect, className, onKeyDown, ...props }, ref) => {
3009
- const interactive = Boolean(onSelect);
3018
+ ({ cells, selected = false, onSelect, onRowClick, className, onClick, onKeyDown, ...props }, ref) => {
3019
+ const rowClickable = Boolean(onRowClick);
3020
+ const interactive = Boolean(onSelect) || rowClickable;
3021
+ const handleClick = (event) => {
3022
+ onClick?.(event);
3023
+ if (event.defaultPrevented || !interactive) return;
3024
+ const nested = Boolean(event.target?.closest(NESTED_INTERACTIVE));
3025
+ if (rowClickable) {
3026
+ if (nested) return;
3027
+ onSelect?.();
3028
+ onRowClick?.();
3029
+ return;
3030
+ }
3031
+ onSelect?.();
3032
+ };
3010
3033
  return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
3011
3034
  "tr",
3012
3035
  {
3013
3036
  ref,
3014
- "aria-selected": interactive ? selected : void 0,
3037
+ "aria-selected": onSelect ? selected : void 0,
3015
3038
  tabIndex: interactive ? 0 : void 0,
3016
- onClick: onSelect,
3039
+ onClick: handleClick,
3017
3040
  onKeyDown: (e) => {
3018
3041
  onKeyDown?.(e);
3019
- if (!interactive) return;
3020
- if (e.key === "Enter" || e.key === " ") {
3042
+ if (!interactive || e.defaultPrevented) return;
3043
+ if (e.key === "Enter") {
3021
3044
  e.preventDefault();
3022
- onSelect?.();
3045
+ if (rowClickable) onRowClick?.();
3046
+ else onSelect?.();
3047
+ } else if (e.key === " " && onSelect) {
3048
+ e.preventDefault();
3049
+ onSelect();
3023
3050
  }
3024
3051
  },
3025
3052
  className: cn28(
@@ -3128,12 +3155,22 @@ Pagination.displayName = "Pagination";
3128
3155
  var import_jsx_runtime34 = require("react/jsx-runtime");
3129
3156
  var cn30 = (...parts) => parts.filter(Boolean).join(" ");
3130
3157
  function useDataTableState(props) {
3131
- const { columns, rows, filterKey, selected, onSelectedChange, pageSize = 5, defaultSort } = props;
3158
+ const {
3159
+ columns,
3160
+ rows,
3161
+ filterKey,
3162
+ selected,
3163
+ onSelectedChange,
3164
+ pageSize = 5,
3165
+ defaultSort,
3166
+ page: controlledPage,
3167
+ onPageChange
3168
+ } = props;
3132
3169
  const [query, setQuery] = React34.useState("");
3133
3170
  const [sort, setSort] = React34.useState(
3134
3171
  defaultSort ?? { key: "", direction: "none" }
3135
3172
  );
3136
- const [page, setPage] = React34.useState(1);
3173
+ const [innerPage, setInnerPage] = React34.useState(1);
3137
3174
  const [innerSel, setInnerSel] = React34.useState([]);
3138
3175
  const sel = selected ?? innerSel;
3139
3176
  const setSel = (ids) => {
@@ -3161,7 +3198,12 @@ function useDataTableState(props) {
3161
3198
  });
3162
3199
  }, [filtered, sort]);
3163
3200
  const pageCount = Math.max(1, Math.ceil(sorted.length / pageSize));
3164
- const safePage = Math.min(page, pageCount);
3201
+ const requestedPage = controlledPage ?? innerPage;
3202
+ const safePage = Math.min(Math.max(1, requestedPage), pageCount);
3203
+ const setPage = (next) => {
3204
+ if (controlledPage === void 0) setInnerPage(next);
3205
+ onPageChange?.(next);
3206
+ };
3165
3207
  const pageRows = sorted.slice((safePage - 1) * pageSize, safePage * pageSize);
3166
3208
  const allOnPage = pageRows.length > 0 && pageRows.every((r) => sel.includes(r.id));
3167
3209
  const someOnPage = pageRows.some((r) => sel.includes(r.id));
@@ -3194,13 +3236,19 @@ function DataTableDesktopInner(props, ref) {
3194
3236
  views,
3195
3237
  view,
3196
3238
  onViewChange,
3239
+ toolbarStart,
3197
3240
  filterKey,
3198
3241
  filterPlaceholder = "Filter",
3199
3242
  selectable = false,
3200
3243
  selected: _selected,
3201
3244
  onSelectedChange: _onSel,
3245
+ onRowClick,
3246
+ page: _page,
3247
+ onPageChange: _onPageChange,
3202
3248
  pageSize: _ps,
3203
3249
  defaultSort: _ds,
3250
+ mobileDescription: _mobileDescription,
3251
+ resultLabel,
3204
3252
  emptyState = {
3205
3253
  icon: "file",
3206
3254
  title: "Nothing here yet",
@@ -3214,8 +3262,10 @@ function DataTableDesktopInner(props, ref) {
3214
3262
  const filterId = React34.useId();
3215
3263
  const filterLabel = columns.find((c) => c.key === filterKey)?.label.toLowerCase() ?? "";
3216
3264
  const isEmpty = rows.length === 0;
3265
+ const resultsText = resultLabel ? resultLabel(s.total) : `${s.total} ${s.total === 1 ? "result" : "results"}`;
3217
3266
  const body = /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex w-full flex-col gap-md", children: [
3218
3267
  !isEmpty ? /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex w-full flex-wrap items-center gap-sm", children: [
3268
+ toolbarStart,
3219
3269
  filterKey ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "w-64", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
3220
3270
  Input,
3221
3271
  {
@@ -3239,11 +3289,7 @@ function DataTableDesktopInner(props, ref) {
3239
3289
  "aria-label": `Remove filter ${filterLabel}: ${s.query.trim()}`
3240
3290
  }
3241
3291
  ) : null,
3242
- /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("span", { className: "ml-auto text-body-sm text-muted", "aria-live": "polite", children: [
3243
- s.total,
3244
- " ",
3245
- s.total === 1 ? "result" : "results"
3246
- ] })
3292
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "ml-auto text-body-sm text-muted", "aria-live": "polite", children: resultsText })
3247
3293
  ] }) : null,
3248
3294
  isEmpty ? /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex w-full flex-col items-center gap-xs rounded-lg border border-hairline bg-surface px-lg py-xxl text-center", children: [
3249
3295
  /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "mb-sm flex size-10 items-center justify-center rounded-md border border-hairline bg-canvas shadow-sm", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Icon, { name: emptyState.icon ?? "file", size: 18 }) }),
@@ -3290,6 +3336,7 @@ function DataTableDesktopInner(props, ref) {
3290
3336
  TableRow,
3291
3337
  {
3292
3338
  className: isSel ? "bg-surface-soft" : void 0,
3339
+ onRowClick: onRowClick ? () => onRowClick(row) : void 0,
3293
3340
  cells: selectable ? [
3294
3341
  {
3295
3342
  content: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
@@ -3572,13 +3619,19 @@ function DataTableMobileInner(props, ref) {
3572
3619
  views,
3573
3620
  view,
3574
3621
  onViewChange,
3622
+ toolbarStart,
3575
3623
  filterKey,
3576
3624
  filterPlaceholder = "Filter",
3577
3625
  selectable = false,
3578
3626
  selected: _selected,
3579
3627
  onSelectedChange: _onSel,
3628
+ onRowClick,
3629
+ page: _page,
3630
+ onPageChange: _onPageChange,
3580
3631
  pageSize: _ps,
3581
3632
  defaultSort: _ds,
3633
+ mobileDescription,
3634
+ resultLabel,
3582
3635
  emptyState = { icon: "file", title: "Nothing here yet" },
3583
3636
  caption = "Data table",
3584
3637
  className,
@@ -3594,6 +3647,7 @@ function DataTableMobileInner(props, ref) {
3594
3647
  const c = columns.find((x) => x.key === key);
3595
3648
  return c?.render ? c.render(row) : String(row[key] ?? "");
3596
3649
  };
3650
+ const resultsText = resultLabel ? resultLabel(s.total) : `${s.total} ${s.total === 1 ? "result" : "results"}`;
3597
3651
  const sortValue = s.sort.direction === "none" ? "" : `${s.sort.key}:${s.sort.direction}`;
3598
3652
  const sortOptions = sortable.flatMap((c) => [
3599
3653
  { value: `${c.key}:descending`, label: `${c.label} \u2193` },
@@ -3601,6 +3655,7 @@ function DataTableMobileInner(props, ref) {
3601
3655
  ]);
3602
3656
  const body = /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "flex w-full flex-col gap-md", children: [
3603
3657
  !isEmpty ? /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "flex w-full flex-col gap-sm", children: [
3658
+ toolbarStart ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "flex w-full flex-wrap items-center gap-sm", children: toolbarStart }) : null,
3604
3659
  filterKey ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
3605
3660
  Input,
3606
3661
  {
@@ -3627,11 +3682,7 @@ function DataTableMobileInner(props, ref) {
3627
3682
  }
3628
3683
  }
3629
3684
  ) }) : null,
3630
- /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("span", { className: "ml-auto shrink-0 text-body-sm text-muted", "aria-live": "polite", children: [
3631
- s.total,
3632
- " ",
3633
- s.total === 1 ? "result" : "results"
3634
- ] })
3685
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "ml-auto shrink-0 text-body-sm text-muted", "aria-live": "polite", children: resultsText })
3635
3686
  ] }),
3636
3687
  s.query.trim() ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
3637
3688
  Chip,
@@ -3668,11 +3719,13 @@ function DataTableMobileInner(props, ref) {
3668
3719
  ] }) : null,
3669
3720
  s.pageRows.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("p", { className: "px-base py-lg text-center text-body-sm text-muted", children: "No rows match this filter." }) : /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("ul", { "aria-label": caption, className: "divide-y divide-hairline-soft", children: s.pageRows.map((row) => {
3670
3721
  const isSel = s.sel.includes(row.id);
3722
+ const description = mobileDescription ? mobileDescription(row) : null;
3671
3723
  return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
3672
3724
  "li",
3673
3725
  {
3674
3726
  className: cn32(
3675
3727
  "flex items-start gap-md px-base py-sm transition-colors duration-150 ease-out",
3728
+ onRowClick ? "hover:bg-surface-soft active:bg-surface-strong" : null,
3676
3729
  isSel ? "bg-surface-soft" : "bg-surface"
3677
3730
  ),
3678
3731
  children: [
@@ -3685,9 +3738,27 @@ function DataTableMobileInner(props, ref) {
3685
3738
  onCheckedChange: () => s.toggleRow(row.id)
3686
3739
  }
3687
3740
  ) }) : null,
3688
- /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col gap-xxs", children: [
3741
+ onRowClick ? /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
3742
+ Button,
3743
+ {
3744
+ variant: "bare",
3745
+ size: "md",
3746
+ className: "min-w-0 flex-1 flex-col items-start",
3747
+ onClick: () => onRowClick(row),
3748
+ children: [
3749
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "w-full min-w-0 truncate text-left text-body-md text-ink", children: cell(row, primary.key) }),
3750
+ description ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "w-full min-w-0 truncate text-left text-body-sm text-muted", children: description }) : secondary ? /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("span", { className: "w-full min-w-0 truncate text-left text-body-sm text-muted", children: [
3751
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("span", { className: "sr-only", children: [
3752
+ secondary.label,
3753
+ ": "
3754
+ ] }),
3755
+ cell(row, secondary.key)
3756
+ ] }) : null
3757
+ ]
3758
+ }
3759
+ ) : /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col gap-xxs", children: [
3689
3760
  /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "min-w-0 truncate text-body-md text-ink", children: cell(row, primary.key) }),
3690
- secondary ? /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "truncate text-body-sm text-muted", children: [
3761
+ description ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "min-w-0 truncate text-body-sm text-muted", children: description }) : secondary ? /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "truncate text-body-sm text-muted", children: [
3691
3762
  /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("span", { className: "sr-only", children: [
3692
3763
  secondary.label,
3693
3764
  ": "
@@ -5654,7 +5725,8 @@ var cn49 = (...parts) => parts.filter(Boolean).join(" ");
5654
5725
  var widths = {
5655
5726
  sm: "sm:w-[var(--container-modal-sm,400px)]",
5656
5727
  md: "sm:w-[var(--container-modal,480px)]",
5657
- lg: "sm:w-[var(--container-modal-lg,640px)]"
5728
+ lg: "sm:w-[var(--container-modal-lg,640px)]",
5729
+ xl: "sm:w-[var(--container-modal-xl,640px)]"
5658
5730
  };
5659
5731
  var Modal = React55.forwardRef(
5660
5732
  ({
@@ -5666,6 +5738,8 @@ var Modal = React55.forwardRef(
5666
5738
  tone = "default",
5667
5739
  footer,
5668
5740
  size = "md",
5741
+ placement = "center",
5742
+ hideHeader = false,
5669
5743
  closeOnScrimClick = true,
5670
5744
  hideClose = false,
5671
5745
  closeLabel = "Close",
@@ -5711,13 +5785,21 @@ var Modal = React55.forwardRef(
5711
5785
  };
5712
5786
  if (!mounted) return null;
5713
5787
  const state = open ? "open" : "closed";
5788
+ const showHeader = !hideHeader;
5789
+ const hasVisibleTitle = showHeader && Boolean(title);
5790
+ const hasVisibleDescription = showHeader && Boolean(description);
5791
+ const isTop = placement === "top";
5714
5792
  return (0, import_react_dom6.createPortal)(
5715
5793
  /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
5716
5794
  "div",
5717
5795
  {
5718
5796
  "data-state": state,
5797
+ "data-placement": placement,
5719
5798
  "aria-hidden": !open,
5720
- className: "fixed inset-0 flex items-end justify-center p-base text-ink transition-[visibility] duration-200 data-[state=closed]:pointer-events-none data-[state=closed]:invisible sm:items-center",
5799
+ className: cn49(
5800
+ "fixed inset-0 flex justify-center p-base text-ink transition-[visibility] duration-200 data-[state=closed]:pointer-events-none data-[state=closed]:invisible",
5801
+ isTop ? "items-start pt-[12dvh]" : "items-end sm:items-center"
5802
+ ),
5721
5803
  style: { zIndex: "var(--z-modal, 1200)" },
5722
5804
  children: [
5723
5805
  /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
@@ -5735,13 +5817,15 @@ var Modal = React55.forwardRef(
5735
5817
  ref: setRefs,
5736
5818
  role: "dialog",
5737
5819
  "aria-modal": "true",
5738
- "aria-labelledby": title ? titleId : void 0,
5739
- "aria-label": title ? void 0 : ariaLabel,
5740
- "aria-describedby": description ? descId : void 0,
5820
+ "aria-labelledby": hasVisibleTitle ? titleId : void 0,
5821
+ "aria-label": hasVisibleTitle ? void 0 : ariaLabel,
5822
+ "aria-describedby": hasVisibleDescription ? descId : void 0,
5741
5823
  tabIndex: -1,
5742
5824
  "data-state": state,
5825
+ "data-placement": placement,
5743
5826
  className: cn49(
5744
- "relative flex max-h-[calc(100dvh-2rem)] w-full flex-col overflow-hidden rounded-lg border border-hairline bg-canvas text-ink shadow-modal",
5827
+ "relative flex w-full flex-col overflow-hidden rounded-lg border border-hairline bg-canvas text-ink shadow-modal",
5828
+ isTop ? "max-h-[calc(88dvh-2rem)]" : "max-h-[calc(100dvh-2rem)]",
5745
5829
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-blue",
5746
5830
  "transition duration-200 ease-out",
5747
5831
  "data-[state=open]:translate-y-0 data-[state=open]:scale-100 data-[state=open]:opacity-100",
@@ -5751,7 +5835,7 @@ var Modal = React55.forwardRef(
5751
5835
  ),
5752
5836
  ...props,
5753
5837
  children: [
5754
- /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "flex shrink-0 items-start justify-between gap-base px-lg pt-lg", children: [
5838
+ showHeader ? /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "flex shrink-0 items-start justify-between gap-base px-lg pt-lg", children: [
5755
5839
  /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "flex min-w-0 flex-col gap-sm", children: [
5756
5840
  icon ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
5757
5841
  "span",
@@ -5780,8 +5864,17 @@ var Modal = React55.forwardRef(
5780
5864
  onClick: () => onOpenChange(false)
5781
5865
  }
5782
5866
  ) : null
5783
- ] }),
5784
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "min-h-0 flex-1 overflow-y-auto overscroll-contain px-lg pt-base pb-lg", children }),
5867
+ ] }) : null,
5868
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
5869
+ "div",
5870
+ {
5871
+ className: cn49(
5872
+ "min-h-0 flex-1 overflow-y-auto overscroll-contain px-lg pb-lg",
5873
+ showHeader && "pt-base"
5874
+ ),
5875
+ children
5876
+ }
5877
+ ),
5785
5878
  footer ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "flex shrink-0 items-center justify-end gap-sm px-lg pb-lg", children: footer }) : null
5786
5879
  ]
5787
5880
  }