@krak-stack/registry 0.10.19 → 0.10.20

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.
Files changed (46) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/README.md +18 -0
  3. package/dist/components/ui/code-block.js +7 -7
  4. package/dist/components/ui/copy-button.js +7 -7
  5. package/dist/components/ui/copy-value.js +7 -7
  6. package/dist/components/ui/data-table.d.ts +3 -3
  7. package/dist/components/ui/data-table.js +23 -17
  8. package/dist/components/ui/editing-locale-switcher.js +7 -7
  9. package/dist/components/ui/effect-form.js +8 -8
  10. package/dist/components/ui/email-composer.js +871 -0
  11. package/dist/components/ui/email-editor.d.ts +3 -1
  12. package/dist/components/ui/email-editor.js +294 -471
  13. package/dist/components/ui/error-component.js +7 -7
  14. package/dist/components/ui/form.d.ts +7 -7
  15. package/dist/components/ui/form.js +18 -14
  16. package/dist/components/ui/icon-input.js +1 -1
  17. package/dist/components/ui/map-menu.d.ts +1 -1
  18. package/dist/components/ui/map-menu.js +183 -60
  19. package/dist/components/ui/pagination.js +7 -7
  20. package/dist/components/ui/phone-number-input.js +1 -1
  21. package/dist/components/ui/rich-text-editor.d.ts +15 -13
  22. package/dist/components/ui/rich-text-editor.js +280 -661
  23. package/dist/components/ui/select-with-custom-input.js +7 -7
  24. package/dist/components/ui/select.js +159 -0
  25. package/dist/components/ui/timezone-select.js +1 -1
  26. package/dist/components/ui/virtualized-combobox.js +1 -1
  27. package/dist/lib/docs.js +7 -7
  28. package/dist/lib/email-composer/index.js +110 -0
  29. package/dist/lib/email-composer/schema.js +13 -0
  30. package/dist/lib/email-document/legacy-rich-text/editor.d.ts +70 -0
  31. package/dist/lib/email-document/legacy-rich-text/schema.d.ts +65 -0
  32. package/dist/lib/email-document/legacy-rich-text/tiptap.d.ts +39 -0
  33. package/dist/lib/email-document/model.d.ts +1 -1
  34. package/dist/lib/email-document/model.js +2 -2
  35. package/dist/lib/email-document/render.js +2 -2
  36. package/dist/lib/email-document/schema.js +1 -1
  37. package/dist/lib/rich-text/model.js +79 -111
  38. package/dist/lib/rich-text/schema.d.ts +5 -55
  39. package/dist/lib/rich-text/schema.js +17 -36
  40. package/dist/lib/rich-text/tiptap.d.ts +12 -0
  41. package/dist/services/agent/client/index.js +7 -7
  42. package/dist/services/events/client/audit-log-table.js +23 -17
  43. package/dist/services/webhooks/client/delivery-table.js +30 -24
  44. package/package.json +24 -1
  45. package/dist/lib/rich-text/dom.d.ts +0 -40
  46. /package/dist/lib/{rich-text → email-document/legacy-rich-text}/model.d.ts +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,27 @@
1
1
  # @krak-stack/registry
2
2
 
3
+ ## 0.10.20
4
+
5
+ ### Patch Changes
6
+
7
+ - 18f5e37: Anchor select menus to their trigger instead of overlapping the selected option.
8
+ Keep narrow menus at trigger width and constrain wider menus to the available
9
+ viewport. Apply these defaults to forms, tables, pagination and editing-locale
10
+ selectors through a KrakStack-owned Select registry item; preserve positioning overrides.
11
+ - 08b3ce9: Add a 50 Km map radius preset and use the shared KrakStack Select for radius
12
+ selection. Preserve numeric callbacks, custom radius options, point mode and
13
+ inline/dialog behavior. Radius labels consistently use “Km”.
14
+ - 805d5bd: Validate form field error messages, preserve readonly combobox option types, and
15
+ handle clipboard failures from synchronous button callbacks. Tighten table view
16
+ selection at the Base UI boundary.
17
+ - f382af2: Use native Tiptap JSONContent and standard Tiptap extensions in RichTextEditor, without the KrakStack versioned rich-text format or conversion layer. This changes the value/onChange contract: old version 1 documents are not accepted or silently migrated.
18
+
19
+ Fix caret placement inside links and apply URL edits or removal to the full existing link.
20
+
21
+ Add Email Composer: a document-style editor using the shared RichTextEditor surface, @react-email/editor extensions, and continuous HTML/plain-text previews with escaped variable samples instead of an export button. Keep programmatic React Email export available. Deprecate the drag-and-drop Email Editor, retaining its frozen legacy document support only for existing integrations.
22
+
23
+ - 2aeb055: Add `features.virtualization.scroll: "internal"` to fill a height-constrained flex column while keeping the toolbar and pagination outside the internal scroll area. `"page"` still scrolls with the browser, and `"table"` retains the existing height cap.
24
+
3
25
  ## 0.10.19
4
26
 
5
27
  ### Patch Changes
@@ -54,14 +76,17 @@
54
76
  - Place table search alongside the menubar on wider screens, show an icon-only Filters trigger on mobile, and keep internal scroll targets clear of sticky column headers.
55
77
 
56
78
  Match the menubar border and shadow to the search input.
79
+
57
80
  - Allow virtualized tables to use page scrolling instead of an internal vertical viewport.
58
81
 
59
82
  Keep list-cell menus from locking page scrolling and disturbing virtualized rows.
83
+
60
84
  - Keep table toolbar menus non-modal so opening them does not lock page scrolling.
61
85
  - Add opt-in DataTable row virtualization for large flat tables.
62
86
  - Make pagination opt-in. Paginated tables default to 100 rows and offer page sizes of 20, 50, and 100.
63
87
 
64
88
  Automatically virtualize tables with at least 100 displayed rows unless `virtualization` is set to `false`.
89
+
65
90
  - Virtualize expanded group rows, place the internal scrollbar below the header, and keep the bottom divider attached to the sticky header.
66
91
 
67
92
  ## 0.10.11
package/README.md CHANGED
@@ -18,6 +18,24 @@ Les composants animés nécessitent la dépendance paire facultative `motion` ;
18
18
  champ de numéro de téléphone nécessite `libphonenumber-js`. Installez ces paquets
19
19
  uniquement pour les composants concernés. Le menu de notifications n'en a pas besoin.
20
20
 
21
+ ## Select popup positioning
22
+
23
+ Use `@krak-stack/registry/select`, or install `@krak-stack/select` with shadcn
24
+ and import from `@/components/ui/select`. This shared Base UI composition serves
25
+ KrakStack forms/tables and consumer applications without product copy or policy.
26
+ Menus default to start alignment, trigger width, available viewport bounds and
27
+ `alignItemWithTrigger={false}`. Existing props can override those defaults.
28
+ Update this registry item rather than bare shadcn `select`; existing consumers
29
+ can update Select alone without upgrading tables or forms.
30
+
31
+ ## Map radius selection
32
+
33
+ Map Menu uses the shared KrakStack Select in inline and dialog presentations.
34
+ Default presets are 1, 2, 5, 10, 20, 40, 50, 60, 80, 100, 250 and 500 Km.
35
+ `radiusOptions` still overrides presets; values and callbacks remain numeric.
36
+ The radius popup exposes `data-map-menu-radius-popup` for host styling outside
37
+ the map root. Point mode has no radius control.
38
+
21
39
  ## Shared integration documentation
22
40
 
23
41
  Generate API, OAuth MCP, and webhook guides in a Bun server loader:
@@ -92,16 +92,16 @@ function CopyButton({
92
92
  clearTimeout(copyTimeout.current);
93
93
  copyTimeout.current = setTimeout(() => setCopyState("idle"), resetDelay);
94
94
  };
95
- const copy = async () => {
96
- try {
97
- await navigator.clipboard.writeText(value);
95
+ const copy = () => {
96
+ Promise.resolve().then(() => navigator.clipboard.writeText(value)).then(() => {
98
97
  setCopyState("copied");
99
98
  onCopied?.();
100
- } catch (error) {
99
+ resetCopyState();
100
+ }).catch((cause) => {
101
101
  setCopyState("failed");
102
- onCopyError?.(error instanceof Error ? error : new Error(labels.copyFailed, { cause: error }));
103
- }
104
- resetCopyState();
102
+ onCopyError?.(cause instanceof Error ? cause : new Error(labels.copyFailed, { cause }));
103
+ resetCopyState();
104
+ });
105
105
  };
106
106
  const status = copyState === "copied" ? valueDescription ? `${labels.copied}: ${valueDescription}` : labels.copied : copyState === "failed" ? valueDescription ? `${labels.copyFailed}: ${valueDescription}` : labels.copyFailed : "";
107
107
  return /* @__PURE__ */ jsxs(Button, {
@@ -92,16 +92,16 @@ function CopyButton({
92
92
  clearTimeout(copyTimeout.current);
93
93
  copyTimeout.current = setTimeout(() => setCopyState("idle"), resetDelay);
94
94
  };
95
- const copy = async () => {
96
- try {
97
- await navigator.clipboard.writeText(value);
95
+ const copy = () => {
96
+ Promise.resolve().then(() => navigator.clipboard.writeText(value)).then(() => {
98
97
  setCopyState("copied");
99
98
  onCopied?.();
100
- } catch (error) {
99
+ resetCopyState();
100
+ }).catch((cause) => {
101
101
  setCopyState("failed");
102
- onCopyError?.(error instanceof Error ? error : new Error(labels.copyFailed, { cause: error }));
103
- }
104
- resetCopyState();
102
+ onCopyError?.(cause instanceof Error ? cause : new Error(labels.copyFailed, { cause }));
103
+ resetCopyState();
104
+ });
105
105
  };
106
106
  const status = copyState === "copied" ? valueDescription ? `${labels.copied}: ${valueDescription}` : labels.copied : copyState === "failed" ? valueDescription ? `${labels.copyFailed}: ${valueDescription}` : labels.copyFailed : "";
107
107
  return /* @__PURE__ */ jsxs(Button, {
@@ -188,16 +188,16 @@ function CopyButton({
188
188
  clearTimeout(copyTimeout.current);
189
189
  copyTimeout.current = setTimeout(() => setCopyState("idle"), resetDelay);
190
190
  };
191
- const copy = async () => {
192
- try {
193
- await navigator.clipboard.writeText(value);
191
+ const copy = () => {
192
+ Promise.resolve().then(() => navigator.clipboard.writeText(value)).then(() => {
194
193
  setCopyState("copied");
195
194
  onCopied?.();
196
- } catch (error) {
195
+ resetCopyState();
196
+ }).catch((cause) => {
197
197
  setCopyState("failed");
198
- onCopyError?.(error instanceof Error ? error : new Error(labels.copyFailed, { cause: error }));
199
- }
200
- resetCopyState();
198
+ onCopyError?.(cause instanceof Error ? cause : new Error(labels.copyFailed, { cause }));
199
+ resetCopyState();
200
+ });
201
201
  };
202
202
  const status = copyState === "copied" ? valueDescription ? `${labels.copied}: ${valueDescription}` : labels.copied : copyState === "failed" ? valueDescription ? `${labels.copyFailed}: ${valueDescription}` : labels.copyFailed : "";
203
203
  return /* @__PURE__ */ jsxs(Button, {
@@ -265,9 +265,9 @@ export type DataTablePaginationFeature = false | {
265
265
  pageSizes?: readonly number[];
266
266
  };
267
267
  export interface DataTableVirtualizationOptions {
268
- /** Use the page scrollbar instead of an internal viewport. Defaults to "table". */
269
- scroll?: "table" | "page";
270
- /** Maximum internal scroll viewport height in pixels. Defaults to 480. */
268
+ /** "page" uses window scrolling; "internal" fills a height-constrained flex column. Defaults to "table" (capped viewport). */
269
+ scroll?: "table" | "internal" | "page";
270
+ /** Maximum viewport height in pixels for "table" mode only. Defaults to 480. */
271
271
  height?: number;
272
272
  /** Initial row height in pixels, before measuring. Defaults to 64. */
273
273
  estimateRowHeight?: number;
@@ -410,7 +410,7 @@ function SelectTrigger({
410
410
  return /* @__PURE__ */ jsxs3(SelectPrimitive.Trigger, {
411
411
  "data-slot": "select-trigger",
412
412
  "data-size": size,
413
- className: cn("flex w-fit items-center justify-between gap-1.5 rounded-md border border-input bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
413
+ className: cn("border-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 flex w-fit items-center justify-between gap-1.5 rounded-md border bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-3 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:ring-3 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
414
414
  ...props,
415
415
  children: [
416
416
  children,
@@ -427,9 +427,9 @@ function SelectContent({
427
427
  children,
428
428
  side = "bottom",
429
429
  sideOffset = 4,
430
- align = "center",
430
+ align = "start",
431
431
  alignOffset = 0,
432
- alignItemWithTrigger = true,
432
+ alignItemWithTrigger = false,
433
433
  ...props
434
434
  }) {
435
435
  return /* @__PURE__ */ jsx8(SelectPrimitive.Portal, {
@@ -443,7 +443,7 @@ function SelectContent({
443
443
  children: /* @__PURE__ */ jsxs3(SelectPrimitive.Popup, {
444
444
  "data-slot": "select-content",
445
445
  "data-align-trigger": alignItemWithTrigger,
446
- className: cn("relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className),
446
+ className: cn("bg-popover text-popover-foreground ring-foreground/10 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 relative isolate z-50 max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-0 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md shadow-md ring-1 duration-100 data-[align-trigger=true]:animate-none", className),
447
447
  ...props,
448
448
  children: [
449
449
  /* @__PURE__ */ jsx8(SelectScrollUpButton, {}),
@@ -463,7 +463,7 @@ function SelectItem({
463
463
  }) {
464
464
  return /* @__PURE__ */ jsxs3(SelectPrimitive.Item, {
465
465
  "data-slot": "select-item",
466
- className: cn("relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2", className),
466
+ className: cn("focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2", className),
467
467
  ...props,
468
468
  children: [
469
469
  /* @__PURE__ */ jsx8(SelectPrimitive.ItemText, {
@@ -487,7 +487,7 @@ function SelectScrollUpButton({
487
487
  }) {
488
488
  return /* @__PURE__ */ jsx8(SelectPrimitive.ScrollUpArrow, {
489
489
  "data-slot": "select-scroll-up-button",
490
- className: cn("top-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4", className),
490
+ className: cn("bg-popover top-0 z-10 flex w-full cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-4", className),
491
491
  ...props,
492
492
  children: /* @__PURE__ */ jsx8(ChevronUpIcon, {})
493
493
  });
@@ -498,7 +498,7 @@ function SelectScrollDownButton({
498
498
  }) {
499
499
  return /* @__PURE__ */ jsx8(SelectPrimitive.ScrollDownArrow, {
500
500
  "data-slot": "select-scroll-down-button",
501
- className: cn("bottom-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4", className),
501
+ className: cn("bg-popover bottom-0 z-10 flex w-full cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-4", className),
502
502
  ...props,
503
503
  children: /* @__PURE__ */ jsx8(ChevronDownIcon, {})
504
504
  });
@@ -2139,7 +2139,7 @@ var DataTableToolbar = ({
2139
2139
  }
2140
2140
  };
2141
2141
  return /* @__PURE__ */ jsxs9("div", {
2142
- className: cn("grid min-w-0 items-center gap-2 pb-4", features.search !== false && "md:grid-cols-[minmax(12rem,1fr)_minmax(0,auto)]"),
2142
+ className: cn("grid min-w-0 shrink-0 items-center gap-2 pb-4", features.search !== false && "md:grid-cols-[minmax(12rem,1fr)_minmax(0,auto)]"),
2143
2143
  children: [
2144
2144
  features.search !== false ? /* @__PURE__ */ jsxs9("div", {
2145
2145
  className: "relative min-w-0",
@@ -2801,9 +2801,13 @@ var ViewMenu = ({
2801
2801
  }),
2802
2802
  /* @__PURE__ */ jsx15(MenubarSeparator2, {}),
2803
2803
  /* @__PURE__ */ jsxs9(MenubarRadioGroup, {
2804
- onValueChange: (view) => {
2805
- if (view === "table" || view === "gallery") {
2806
- changeState(setStore, (state) => ({ ...state, view }));
2804
+ onValueChange: (input) => {
2805
+ const view = Schema2.decodeUnknownOption(DataTablePersistedUiStateSchema.fields.view)(input);
2806
+ if (Option2.isSome(view)) {
2807
+ changeState(setStore, (state) => ({
2808
+ ...state,
2809
+ view: view.value
2810
+ }));
2807
2811
  }
2808
2812
  },
2809
2813
  value: store.state.view,
@@ -3952,7 +3956,7 @@ var DataTablePagination = ({
3952
3956
  const setPagination = (next) => changeState(setStore, (state) => ({ ...state, ...next }));
3953
3957
  return /* @__PURE__ */ jsx15("div", {
3954
3958
  "data-table-slot": "pagination",
3955
- className: cn("pt-4", styles?.pagination),
3959
+ className: cn("shrink-0 pt-4", styles?.pagination),
3956
3960
  children: /* @__PURE__ */ jsx15(Pagination, {
3957
3961
  pageSizeContentClassName: styles?.popup?.select,
3958
3962
  locale: store.config.locale,
@@ -3968,6 +3972,7 @@ var DataTablePagination = ({
3968
3972
  })
3969
3973
  });
3970
3974
  };
3975
+ var getTableLayoutClass = (virtualization) => virtualization && virtualization !== true && virtualization.scroll === "internal" ? "flex min-h-0 flex-1 flex-col" : undefined;
3971
3976
  var HydratedDataTable = ({
3972
3977
  persistedUiState,
3973
3978
  setPersistedUiState,
@@ -4049,7 +4054,7 @@ var HydratedDataTable = ({
4049
4054
  uiState
4050
4055
  ]);
4051
4056
  return /* @__PURE__ */ jsxs9("div", {
4052
- className: cn("w-full max-w-full min-w-0 rounded-md", props.className),
4057
+ className: cn("w-full max-w-full min-w-0 rounded-md", getTableLayoutClass(props.features?.virtualization), props.className),
4053
4058
  "data-table-root": "",
4054
4059
  children: [
4055
4060
  /* @__PURE__ */ jsx15(DataTableToolbar, {
@@ -4094,7 +4099,7 @@ var DataTable = (props) => {
4094
4099
  if (!persistedUiState || AsyncResult.isWaiting(persistedUiResult)) {
4095
4100
  return /* @__PURE__ */ jsx15("div", {
4096
4101
  "aria-busy": "true",
4097
- className: cn("invisible w-full max-w-full min-w-0 rounded-md", props.className),
4102
+ className: cn("invisible w-full max-w-full min-w-0 rounded-md", getTableLayoutClass(props.features?.virtualization), props.className),
4098
4103
  "data-table-root": ""
4099
4104
  });
4100
4105
  }
@@ -4191,15 +4196,16 @@ var DataTableContent = ({
4191
4196
  })
4192
4197
  });
4193
4198
  }
4199
+ const fillHeight = options.scroll === "internal";
4194
4200
  return /* @__PURE__ */ jsxs9(ScrollAreaPrimitive2.Root, {
4195
- className: "relative isolate max-w-full min-w-0",
4201
+ className: cn("relative isolate max-w-full min-w-0", fillHeight && "flex min-h-0 flex-1 flex-col"),
4196
4202
  children: [
4197
4203
  /* @__PURE__ */ jsx15(ScrollAreaPrimitive2.Viewport, {
4198
4204
  ref: setScrollElement,
4199
4205
  "data-table-virtual-viewport": "",
4200
- className: "@container [overflow-anchor:none] data-has-overflow-y:me-2.5 [&_[data-slot=table-container]]:overflow-visible",
4206
+ className: cn("@container [overflow-anchor:none] data-has-overflow-y:me-2.5 [&_[data-slot=table-container]]:overflow-visible", fillHeight && "min-h-0 flex-1"),
4201
4207
  style: {
4202
- maxHeight: options.height ?? 480,
4208
+ maxHeight: fillHeight ? undefined : options.height ?? 480,
4203
4209
  scrollPaddingTop: headerHeight
4204
4210
  },
4205
4211
  children: /* @__PURE__ */ jsx15(ScrollAreaPrimitive2.Content, {
@@ -37,7 +37,7 @@ function SelectTrigger({
37
37
  return /* @__PURE__ */ jsxs(SelectPrimitive.Trigger, {
38
38
  "data-slot": "select-trigger",
39
39
  "data-size": size,
40
- className: cn("flex w-fit items-center justify-between gap-1.5 rounded-md border border-input bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
40
+ className: cn("border-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 flex w-fit items-center justify-between gap-1.5 rounded-md border bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-3 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:ring-3 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
41
41
  ...props,
42
42
  children: [
43
43
  children,
@@ -54,9 +54,9 @@ function SelectContent({
54
54
  children,
55
55
  side = "bottom",
56
56
  sideOffset = 4,
57
- align = "center",
57
+ align = "start",
58
58
  alignOffset = 0,
59
- alignItemWithTrigger = true,
59
+ alignItemWithTrigger = false,
60
60
  ...props
61
61
  }) {
62
62
  return /* @__PURE__ */ jsx2(SelectPrimitive.Portal, {
@@ -70,7 +70,7 @@ function SelectContent({
70
70
  children: /* @__PURE__ */ jsxs(SelectPrimitive.Popup, {
71
71
  "data-slot": "select-content",
72
72
  "data-align-trigger": alignItemWithTrigger,
73
- className: cn("relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className),
73
+ className: cn("bg-popover text-popover-foreground ring-foreground/10 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 relative isolate z-50 max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-0 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md shadow-md ring-1 duration-100 data-[align-trigger=true]:animate-none", className),
74
74
  ...props,
75
75
  children: [
76
76
  /* @__PURE__ */ jsx2(SelectScrollUpButton, {}),
@@ -90,7 +90,7 @@ function SelectItem({
90
90
  }) {
91
91
  return /* @__PURE__ */ jsxs(SelectPrimitive.Item, {
92
92
  "data-slot": "select-item",
93
- className: cn("relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2", className),
93
+ className: cn("focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2", className),
94
94
  ...props,
95
95
  children: [
96
96
  /* @__PURE__ */ jsx2(SelectPrimitive.ItemText, {
@@ -114,7 +114,7 @@ function SelectScrollUpButton({
114
114
  }) {
115
115
  return /* @__PURE__ */ jsx2(SelectPrimitive.ScrollUpArrow, {
116
116
  "data-slot": "select-scroll-up-button",
117
- className: cn("top-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4", className),
117
+ className: cn("bg-popover top-0 z-10 flex w-full cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-4", className),
118
118
  ...props,
119
119
  children: /* @__PURE__ */ jsx2(ChevronUpIcon, {})
120
120
  });
@@ -125,7 +125,7 @@ function SelectScrollDownButton({
125
125
  }) {
126
126
  return /* @__PURE__ */ jsx2(SelectPrimitive.ScrollDownArrow, {
127
127
  "data-slot": "select-scroll-down-button",
128
- className: cn("bottom-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4", className),
128
+ className: cn("bg-popover bottom-0 z-10 flex w-full cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-4", className),
129
129
  ...props,
130
130
  children: /* @__PURE__ */ jsx2(ChevronDownIcon, {})
131
131
  });
@@ -793,7 +793,7 @@ function SelectTrigger({
793
793
  return /* @__PURE__ */ jsxs4(SelectPrimitive.Trigger, {
794
794
  "data-slot": "select-trigger",
795
795
  "data-size": size,
796
- className: cn("flex w-fit items-center justify-between gap-1.5 rounded-md border border-input bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
796
+ className: cn("border-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 flex w-fit items-center justify-between gap-1.5 rounded-md border bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-3 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:ring-3 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
797
797
  ...props,
798
798
  children: [
799
799
  children,
@@ -810,9 +810,9 @@ function SelectContent({
810
810
  children,
811
811
  side = "bottom",
812
812
  sideOffset = 4,
813
- align = "center",
813
+ align = "start",
814
814
  alignOffset = 0,
815
- alignItemWithTrigger = true,
815
+ alignItemWithTrigger = false,
816
816
  ...props
817
817
  }) {
818
818
  return /* @__PURE__ */ jsx9(SelectPrimitive.Portal, {
@@ -826,7 +826,7 @@ function SelectContent({
826
826
  children: /* @__PURE__ */ jsxs4(SelectPrimitive.Popup, {
827
827
  "data-slot": "select-content",
828
828
  "data-align-trigger": alignItemWithTrigger,
829
- className: cn("relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className),
829
+ className: cn("bg-popover text-popover-foreground ring-foreground/10 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 relative isolate z-50 max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-0 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md shadow-md ring-1 duration-100 data-[align-trigger=true]:animate-none", className),
830
830
  ...props,
831
831
  children: [
832
832
  /* @__PURE__ */ jsx9(SelectScrollUpButton, {}),
@@ -846,7 +846,7 @@ function SelectItem({
846
846
  }) {
847
847
  return /* @__PURE__ */ jsxs4(SelectPrimitive.Item, {
848
848
  "data-slot": "select-item",
849
- className: cn("relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2", className),
849
+ className: cn("focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2", className),
850
850
  ...props,
851
851
  children: [
852
852
  /* @__PURE__ */ jsx9(SelectPrimitive.ItemText, {
@@ -870,7 +870,7 @@ function SelectScrollUpButton({
870
870
  }) {
871
871
  return /* @__PURE__ */ jsx9(SelectPrimitive.ScrollUpArrow, {
872
872
  "data-slot": "select-scroll-up-button",
873
- className: cn("top-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4", className),
873
+ className: cn("bg-popover top-0 z-10 flex w-full cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-4", className),
874
874
  ...props,
875
875
  children: /* @__PURE__ */ jsx9(ChevronUpIcon, {})
876
876
  });
@@ -881,7 +881,7 @@ function SelectScrollDownButton({
881
881
  }) {
882
882
  return /* @__PURE__ */ jsx9(SelectPrimitive.ScrollDownArrow, {
883
883
  "data-slot": "select-scroll-down-button",
884
- className: cn("bottom-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4", className),
884
+ className: cn("bg-popover bottom-0 z-10 flex w-full cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-4", className),
885
885
  ...props,
886
886
  children: /* @__PURE__ */ jsx9(ChevronDownIcon, {})
887
887
  });
@@ -1168,7 +1168,7 @@ var defaultClear = (label) => /* @__PURE__ */ jsx12(ComboboxPrimitive.Clear, {
1168
1168
  })
1169
1169
  });
1170
1170
  var selectedLabel = (value, placeholder) => {
1171
- if (Array.isArray(value)) {
1171
+ if (value && !("label" in value)) {
1172
1172
  return value.length > 0 ? value.map(({ label }) => label).join(", ") : placeholder;
1173
1173
  }
1174
1174
  return value && "label" in value ? value.label : placeholder;