@krak-stack/registry 0.11.5 → 0.11.7

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 (47) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/dist/components/audit-log-table/classes.d.ts +1 -0
  3. package/dist/components/audit-log-table/html.d.ts +158 -0
  4. package/dist/components/audit-log-table/html.js +3260 -0
  5. package/dist/components/audit-log-table/index.d.ts +37 -0
  6. package/dist/components/audit-log-table/react.d.ts +3 -51
  7. package/dist/components/audit-log-table/react.js +246 -92
  8. package/dist/components/audit-log-table/schema.d.ts +122 -0
  9. package/dist/components/copy-button/html.d.ts +2 -2
  10. package/dist/components/danger-confirmation/index.d.ts +2 -2
  11. package/dist/components/data-table/classes.d.ts +10 -3
  12. package/dist/components/data-table/html.d.ts +93 -21
  13. package/dist/components/data-table/html.js +122 -32
  14. package/dist/components/data-table/index.d.ts +97 -9
  15. package/dist/components/data-table/react.d.ts +14 -3
  16. package/dist/components/data-table/react.js +162 -19
  17. package/dist/components/data-table/schema.d.ts +175 -16
  18. package/dist/components/date-input/html.d.ts +2 -2
  19. package/dist/components/docs/html.js +1 -1
  20. package/dist/components/editable-text/html.d.ts +2 -2
  21. package/dist/components/editable-text/index.d.ts +4 -4
  22. package/dist/components/editing-locale-switcher/html.d.ts +2 -2
  23. package/dist/components/email-editor/legacy-editor.html.d.ts +6 -6
  24. package/dist/components/form/react.d.ts +5 -5
  25. package/dist/components/locale-switcher/html.d.ts +2 -2
  26. package/dist/components/map-menu/html.d.ts +4 -4
  27. package/dist/components/presence-transition/index.d.ts +2 -2
  28. package/dist/components/select-with-custom-input/html.d.ts +2 -2
  29. package/dist/components/sidebar-layout/html.js +1 -1
  30. package/dist/components/switch/react.d.ts +14 -0
  31. package/dist/components/switch/react.js +55 -0
  32. package/dist/components/theme-switcher/html.d.ts +2 -2
  33. package/dist/components/tracking-notice/classes.d.ts +6 -0
  34. package/dist/components/tracking-notice/html.d.ts +85 -0
  35. package/dist/components/tracking-notice/html.js +354 -0
  36. package/dist/components/tracking-notice/index.d.ts +95 -0
  37. package/dist/components/tracking-notice/react.d.ts +5 -27
  38. package/dist/components/tracking-notice/react.js +189 -59
  39. package/dist/components/tracking-notice/schema.d.ts +45 -0
  40. package/dist/components/upload-attachment/html.d.ts +4 -4
  41. package/dist/components/virtualized-combobox/html.d.ts +3 -3
  42. package/dist/components/webhook-delivery-table/html.js +122 -32
  43. package/dist/components/webhook-delivery-table/react.js +162 -19
  44. package/dist/services/events/browser.js +39 -26
  45. package/dist/services/events/index.js +23 -19
  46. package/dist/services/opentelemetry/web-vitals.js +27 -23
  47. package/package.json +9 -1
@@ -465,9 +465,16 @@ import { Csv } from "effect/encoding";
465
465
  import { Command, Component as Component2, Subscription, UiSchema as UiSchema2 } from "effect/ui";
466
466
 
467
467
  // ../../src/components/data-table/schema.ts
468
- import { DateTime as DateTime2, Option as Option2, Schema as Schema4, Struct as Struct2, Tuple } from "effect";
468
+ import { DateTime as DateTime2, Option as Option2, Predicate, Schema as Schema4, Struct as Struct2, Tuple } from "effect";
469
469
 
470
470
  // ../../src/components/data-table/classes.ts
471
+ var booleanCellControl = "flex min-h-16 w-full items-center justify-start px-2 in-[[data-slot=table-cell]]:absolute in-[[data-slot=table-cell]]:inset-0 in-[[data-slot=table-cell]]:min-h-0 has-[:focus-visible]:outline-2 has-[:focus-visible]:-outline-offset-2 has-[:focus-visible]:outline-ring";
472
+ var cellTriggerFocus = "focus-visible:ring-0 focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-ring";
473
+ var tableBadgeTones = {
474
+ success: "border-emerald-200 bg-emerald-100 text-emerald-900 dark:border-emerald-900/50 dark:bg-emerald-950/50 dark:text-emerald-200",
475
+ info: "border-blue-200 bg-blue-100 text-blue-900 dark:border-blue-900/50 dark:bg-blue-950/50 dark:text-blue-200",
476
+ muted: "border-muted bg-muted text-muted-foreground dark:bg-muted/50"
477
+ };
471
478
  var tableClasses = {
472
479
  selectionCell: "w-10 p-0 align-middle",
473
480
  selectionCenter: "grid place-items-center",
@@ -479,16 +486,16 @@ var tableClasses = {
479
486
  menubar: "h-auto w-full flex-wrap justify-start border border-input bg-transparent",
480
487
  cell: "overflow-hidden",
481
488
  cellContent: "min-w-0 wrap-anywhere",
482
- actionTrigger: "size-8 focus-visible:ring-inset",
489
+ actionTrigger: `size-8 ${cellTriggerFocus}`,
483
490
  actionsCell: "sticky right-0 z-20 w-10 min-w-10 cursor-default bg-background p-0 transition-colors group-hover/row:bg-[color-mix(in_oklab,var(--muted)_50%,var(--background))]",
484
491
  actionsAlign: "flex min-h-12 items-center justify-end pe-1",
485
492
  header: "relative h-12 p-0",
486
493
  stickyHeader: "sticky top-0 z-30 bg-background",
487
494
  stickyHeaderRule: "after:border-border after:pointer-events-none after:absolute after:inset-x-0 after:bottom-0 after:border-b",
488
- headerTrigger: "absolute inset-0 h-full w-full min-w-0 justify-start rounded-none px-2 pe-4 focus-visible:ring-inset",
495
+ headerTrigger: `absolute inset-0 h-full w-full min-w-0 justify-start rounded-none px-2 pe-4 ${cellTriggerFocus}`,
489
496
  resizeHandle: "absolute inset-y-0 right-0 z-10 w-2 cursor-col-resize touch-none outline-none after:absolute after:inset-y-3 after:right-0 after:w-px after:bg-border hover:after:w-0.5 hover:after:bg-primary/60 focus-visible:after:w-0.5 focus-visible:after:bg-ring",
490
497
  relationshipCell: "grid min-h-16 in-[[data-slot=table-cell]]:absolute in-[[data-slot=table-cell]]:inset-0 in-[[data-slot=table-cell]]:min-h-0",
491
- relationshipTrigger: "h-full w-full min-w-0 justify-between rounded-none px-2 text-start focus-visible:ring-inset",
498
+ relationshipTrigger: `h-full w-full min-w-0 justify-between rounded-none px-2 text-start ${cellTriggerFocus}`,
492
499
  reference: "flex min-w-0 items-center gap-2",
493
500
  referenceAvatar: "relative grid size-8 shrink-0 place-items-center overflow-hidden bg-muted text-xs font-medium",
494
501
  referenceText: "flex min-w-0 flex-col leading-tight",
@@ -499,6 +506,7 @@ var tableClasses = {
499
506
  referenceName: "truncate font-medium",
500
507
  referenceDescription: "text-muted-foreground truncate text-xs"
501
508
  };
509
+ var tableResultsFooterClass = "bg-background text-muted-foreground sticky bottom-0 z-30 shrink-0 border-t px-2 py-2 text-sm";
502
510
  var resolveTableClasses = (overrides) => ({
503
511
  ...tableClasses,
504
512
  ...overrides
@@ -612,8 +620,33 @@ var column = {
612
620
  emptyLabel: Schema4.optionalKey(Schema4.String),
613
621
  nulls: Schema4.optionalKey(Schema4.Literals(["first", "last"]))
614
622
  };
623
+ var DataTableBadgeOptionSchema = Schema4.Struct({
624
+ value: Schema4.NonEmptyString,
625
+ label: Schema4.optionalKey(Schema4.String),
626
+ variant: Schema4.optionalKey(Schema4.Literals([
627
+ "default",
628
+ "secondary",
629
+ "outline",
630
+ "destructive",
631
+ "success",
632
+ "info",
633
+ "muted"
634
+ ]))
635
+ }).annotate({ identifier: "DataTableBadgeOption" });
636
+ var BadgeIcon = Schema4.declare((value) => Predicate.isFunction(value)).annotate({ identifier: "DataTableBadgeIcon" });
637
+ var DataTableBadgeOptionsSchema = Schema4.Struct({
638
+ options: Schema4.optionalKey(Schema4.Array(DataTableBadgeOptionSchema.mapFields((fields) => ({
639
+ ...fields,
640
+ icon: Schema4.optionalKey(BadgeIcon)
641
+ }))))
642
+ }).annotate({ identifier: "DataTableBadgeOptions" });
615
643
  var DataTableFieldSchema = Schema4.Union([
616
- Schema4.Struct({ ...column, type: Schema4.Literal("text") }),
644
+ Schema4.Struct({
645
+ ...column,
646
+ type: Schema4.Literal("text"),
647
+ display: Schema4.optionalKey(Schema4.Literal("badge")),
648
+ typeOptions: Schema4.optionalKey(DataTableBadgeOptionsSchema)
649
+ }),
617
650
  Schema4.Struct({
618
651
  ...column,
619
652
  type: Schema4.Literal("number"),
@@ -656,7 +689,7 @@ var DataTableFieldSchema = Schema4.Union([
656
689
  options: Schema4.optionalKey(Schema4.Array(DataTableItemSchema)),
657
690
  allowRemove: Schema4.optionalKey(Schema4.Boolean),
658
691
  itemActions: Schema4.optionalKey(Schema4.Array(DataTableActionSchema)),
659
- display: Schema4.optionalKey(Schema4.Literals(["list", "icon"])),
692
+ display: Schema4.optionalKey(Schema4.Literals(["list", "icon", "badge"])),
660
693
  visibleCount: Schema4.optionalKey(Schema4.Int.check(Schema4.isGreaterThanOrEqualTo(0))),
661
694
  actionsLabel: Schema4.optionalKey(Schema4.String),
662
695
  manageLabel: Schema4.optionalKey(Schema4.String)
@@ -958,7 +991,33 @@ var matchesFilterText = (value, filter) => {
958
991
  return text.endsWith(query);
959
992
  }
960
993
  };
961
- var tableFilterKind = (column, hasOptions = false) => hasOptions || column.type === "list" ? "values" : column.type === "reference" ? "text" : column.type === "dateTime" ? "date" : column.type ?? "text";
994
+ var tableFilterKind = (column, hasOptions = false) => hasOptions || column.type === "list" || column.display === "badge" ? "values" : column.type === "reference" ? "text" : column.type === "dateTime" ? "date" : column.type ?? "text";
995
+ var tableBadgeValue = (value) => isTableText(value) && value !== "" ? value : null;
996
+ var tableBadge = (input, config) => {
997
+ const value = tableBadgeValue(input);
998
+ if (value === null)
999
+ return null;
1000
+ const option = config?.options?.find((option) => option.value === value);
1001
+ return {
1002
+ value,
1003
+ label: option?.label ?? value,
1004
+ variant: option?.variant ?? "secondary",
1005
+ option
1006
+ };
1007
+ };
1008
+ var tableBadgeFilterOptions = (values, config) => {
1009
+ const options = new Map(config?.options?.map(({ value, label }) => [value, label ?? value]));
1010
+ for (const input of values) {
1011
+ const value = tableBadgeValue(input);
1012
+ if (value !== null && !options.has(value))
1013
+ options.set(value, value);
1014
+ }
1015
+ return [...options].map(([value, label]) => ({ value, label }));
1016
+ };
1017
+ var tableBadgeSearchText = (value, config) => {
1018
+ const badge = tableBadge(value, config);
1019
+ return badge ? `${badge.label} ${badge.value}` : "";
1020
+ };
962
1021
  var matchesTableFilter = (filter, value, type, text, values) => {
963
1022
  switch (filter.kind) {
964
1023
  case "text":
@@ -1003,13 +1062,20 @@ var filterTableColumns = (rows, columns, filters) => {
1003
1062
  return rows;
1004
1063
  return rows.filter((row) => active.every((filter) => {
1005
1064
  const value = row.cells[filter.id];
1006
- return matchesTableFilter(filter, value, byId.get(filter.id)?.type, () => isTableText(value) ? value : isTableReference(value) ? `${value.label} ${value.description ?? ""}`.trim() : "", () => isTableList(value) ? value.map(({ value }) => value) : []);
1065
+ const column = byId.get(filter.id);
1066
+ return matchesTableFilter(filter, value, column?.type, () => isTableText(value) ? value : isTableReference(value) ? `${value.label} ${value.description ?? ""}`.trim() : "", () => {
1067
+ if (column?.type === "text" && column.display === "badge") {
1068
+ const key = tableBadgeValue(value);
1069
+ return key === null ? [] : [key];
1070
+ }
1071
+ return isTableList(value) ? value.map(({ value }) => value) : [];
1072
+ });
1007
1073
  }));
1008
1074
  };
1009
1075
  var columnValue = (column, value) => {
1010
1076
  switch (column.type) {
1011
1077
  case "text":
1012
- return isTableText(value) ? value : null;
1078
+ return column.display === "badge" ? tableBadgeValue(value) : isTableText(value) ? value : null;
1013
1079
  case "number":
1014
1080
  case "boolean":
1015
1081
  case "date":
@@ -1063,6 +1129,8 @@ var filterTableRows = (rows, columns, search, locale) => {
1063
1129
  const searchable = columns.filter(({ searchable }) => searchable !== false);
1064
1130
  return rows.filter((row) => searchable.some((column) => {
1065
1131
  const value = row.cells[column.id];
1132
+ if (column.type === "text" && column.display === "badge")
1133
+ return tableBadgeSearchText(value, column.typeOptions).toLocaleLowerCase(locale).includes(query);
1066
1134
  if (column.type === "date" || column.type === "dateTime") {
1067
1135
  const date = resolveDate(value, column.type);
1068
1136
  return !!date && `${formatDateValue(date, column, locale)} ${dateIsoValue(date)}`.toLocaleLowerCase(locale).includes(query);
@@ -1818,6 +1886,14 @@ var dataTableBehaviours = {
1818
1886
  // ../../src/components/data-table/html.ts
1819
1887
  var keyOf = (...parts) => JSON.stringify(parts);
1820
1888
  var cellClass = "px-3 py-2 align-middle";
1889
+ var badgeVariants = {
1890
+ ...tableBadgeTones,
1891
+ default: "bg-primary text-primary-foreground",
1892
+ secondary: "bg-secondary text-secondary-foreground",
1893
+ outline: "border-border text-foreground",
1894
+ destructive: "bg-destructive/10 text-destructive dark:bg-destructive/20"
1895
+ };
1896
+ var badgeClass = "inline-flex items-center gap-1 rounded-full border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap";
1821
1897
  var isTextFilterOperator = Schema6.is(TextFilterOperator);
1822
1898
  var RowDrag = "application/x-krakstack-table-row";
1823
1899
  var PersistPreferences = Mount.makeStream("DataTable/PersistPreferences", {
@@ -1922,7 +1998,9 @@ var DataTable = Html2.component({
1922
1998
  const dropOnRow = (rowId, group) => group ? DataTableMessage.GroupDropped(group) : reorder ? DataTableMessage.DragDropped({ targetId: rowId }) : undefined;
1923
1999
  const rowActions = reorder || props.rowData.some(({ actions }) => actions?.length);
1924
2000
  const span = Math.max(1, columns.length + Number(!!selection) + Number(rowActions) + Number(draggable));
1925
- const virtual = tableVirtualization(rows.length, features.virtualization, !grouping.length && !gallery && !features.reordering && props.status?.error === undefined && rows.length > 0);
2001
+ const virtualization = features.virtualization;
2002
+ const fillHeight = virtualization && virtualization !== true && virtualization.scroll === "internal";
2003
+ const virtual = tableVirtualization(rows.length, virtualization, !grouping.length && !gallery && !features.reordering && props.status?.error === undefined && rows.length > 0);
1926
2004
  const ids = rows.filter(({ selectable }) => selectable !== false).map(({ id }) => id);
1927
2005
  const selectedHere = ids.filter((id) => selected.has(id)).length;
1928
2006
  const status = props.status;
@@ -2088,11 +2166,13 @@ var DataTable = Html2.component({
2088
2166
  })))));
2089
2167
  }
2090
2168
  });
2091
- const check = (key, label, checked, onToggle, options) => Checkbox(h, {
2169
+ const check = (key, label, checked, onToggle, options, inCell = false) => Checkbox(h, {
2092
2170
  key,
2093
2171
  props: { checked, ...options },
2094
2172
  onEmit: { Toggled: ({ checked }) => onToggle(checked) },
2095
- view: (checkbox) => h.span.class("grid size-4 shrink-0 place-items-center").children(CheckboxRoot(h, checkbox).attr("aria-label", label).children(CheckboxIndicator(h, checkbox, {
2173
+ view: (checkbox) => h.span.class("grid size-4 shrink-0 place-items-center").children(CheckboxRoot(h, checkbox, {
2174
+ class: inCell ? "focus-visible:outline-none" : undefined
2175
+ }).attr("aria-label", label).children(CheckboxIndicator(h, checkbox, {
2096
2176
  class: "pointer-events-none"
2097
2177
  })))
2098
2178
  });
@@ -2148,9 +2228,9 @@ var DataTable = Html2.component({
2148
2228
  filter: { id, kind: "boolean", value }
2149
2229
  })
2150
2230
  }));
2151
- } else if (column.type === "list") {
2231
+ } else if (column.type === "list" || column.type === "text" && column.display === "badge") {
2152
2232
  const selected = current?.kind === "values" ? current.values : [];
2153
- const options = column.filterOptions ?? tableFilterOptions(props.rowData, id, locale);
2233
+ const options = column.type === "text" ? tableBadgeFilterOptions(props.rowData.map((row) => row.cells[id]), column.typeOptions) : column.filterOptions ?? tableFilterOptions(props.rowData, id, locale);
2154
2234
  children = options.map(({ value, label }) => {
2155
2235
  const checked = selected.includes(value);
2156
2236
  const values = updateSelectedRows(selected, [value], !checked);
@@ -2183,6 +2263,12 @@ var DataTable = Html2.component({
2183
2263
  const disabled = row.disabledColumnIds?.includes(column.id);
2184
2264
  const edit = (edit) => DataTableMessage.CellEditRequested({ rowId: row.id, columnId: column.id, edit });
2185
2265
  switch (column.type) {
2266
+ case "text": {
2267
+ if (column.display !== "badge")
2268
+ return isTableText(value) ? value : empty;
2269
+ const badge = tableBadge(value, column.typeOptions);
2270
+ return badge ? h.span.class(cn(badgeClass, badgeVariants[badge.variant])).children(badge.option?.icon && h.span.attr("aria-hidden", "true").class("inline-flex shrink-0").children(badge.option.icon(h, { size: 12 })), badge.label) : empty;
2271
+ }
2186
2272
  case "number":
2187
2273
  return isTableNumber(value) ? formatNumberValue(value, column.typeOptions, locale) : empty;
2188
2274
  case "date":
@@ -2191,7 +2277,7 @@ var DataTable = Html2.component({
2191
2277
  return date ? h.time.attr("datetime", dateIsoValue(date)).children(formatDateValue(date, column, locale)) : empty;
2192
2278
  }
2193
2279
  case "boolean":
2194
- return isTableBoolean(value) ? props.rowActivation && (!column.editable || disabled) ? value ? column.typeOptions?.trueLabel ?? copy.filterTrue : column.typeOptions?.falseLabel ?? copy.filterFalse : check(keyOf("edit", row.id, column.id), `${column.headerName}: ${row.label}`, value, (value) => edit(DataTableEdit.SetBoolean({ value })), { readOnly: !column.editable || disabled }) : empty;
2280
+ return isTableBoolean(value) ? h.label.attr("data-slot", "data-table-boolean-cell").class(cn(booleanCellControl, column.editable && !disabled && "hover:bg-muted/50 cursor-pointer")).children(check(keyOf("edit", row.id, column.id), `${column.headerName}: ${row.label}`, value, (value) => edit(DataTableEdit.SetBoolean({ value })), { readOnly: !column.editable || disabled }, true)) : empty;
2195
2281
  case "reference":
2196
2282
  return isTableReference(value) ? h.div.class(tableClasses.reference).children(h.span.class(cn(tableClasses.referenceAvatar, "rounded-full")).children(h.span.attr("aria-hidden", "true").children(tableInitials(value.label)), value.imageSrc && !model.failedImages.includes(value.imageSrc) && h.img.attrs({
2197
2283
  src: value.imageSrc,
@@ -2200,6 +2286,9 @@ var DataTable = Html2.component({
2200
2286
  }).class("absolute inset-0 size-full object-cover").on("error", DataTableMessage.ReferenceImageFailed({ src: value.imageSrc }))), h.div.class(tableClasses.referenceText).children(h.span.class(tableClasses.referenceName).children(value.label), value.description && h.span.class(tableClasses.referenceDescription).children(value.description))) : empty;
2201
2287
  case "list": {
2202
2288
  const current = isTableList(value) ? value : [];
2289
+ const visible = current.slice(0, column.visibleCount ?? 3);
2290
+ const overflow = current.length - visible.length;
2291
+ const badgeSummary = () => h.span.class("inline-flex min-w-0 flex-wrap items-center gap-1").children(visible.map(({ value, label }) => h.span.key(value).class(cn(badgeClass, badgeVariants.secondary)).children(label)), overflow > 0 && h.span.class(cn(badgeClass, badgeVariants.secondary)).children(`+${overflow}`));
2203
2292
  if (column.manageLabel && !disabled && (column.options || column.allowRemove)) {
2204
2293
  const used = new Set(current.map(({ value }) => value));
2205
2294
  const available = (column.options ?? []).filter(({ value }) => !used.has(value));
@@ -2235,15 +2324,13 @@ var DataTable = Html2.component({
2235
2324
  }
2236
2325
  ] : []
2237
2326
  ], false, undefined, false, {
2238
- relationship: h.span.class("min-w-0 truncate").children(current.length ? `${current.slice(0, column.visibleCount ?? 3).map(({ label }) => label).join(", ")}${current.length > (column.visibleCount ?? 3) ? ` +${current.length - (column.visibleCount ?? 3)}` : ""}` : empty)
2327
+ relationship: column.display === "badge" && current.length ? badgeSummary() : h.span.class("min-w-0 truncate").children(current.length ? `${current.slice(0, column.visibleCount ?? 3).map(({ label }) => label).join(", ")}${current.length > (column.visibleCount ?? 3) ? ` +${current.length - (column.visibleCount ?? 3)}` : ""}` : empty)
2239
2328
  }));
2240
2329
  }
2241
2330
  if (column.display && !column.options && !column.allowRemove) {
2242
- const visible = current.slice(0, column.visibleCount ?? 3);
2243
- const overflow = current.length - visible.length;
2244
2331
  const label = column.actionsLabel ?? (column.itemActions?.length ? copy.actions : copy.listDetails);
2245
- const summary = column.display === "icon" ? h.span.class("flex min-w-0 items-center gap-1 overflow-hidden").children(visible.map(({ value, label }) => h.span.key(value).attr("title", label).class("inline-grid size-7 place-items-center rounded-full bg-muted text-xs").children(tableInitials(label))), overflow > 0 && `+${overflow}`) : h.span.class("min-w-0 truncate").children(`${visible.map(({ label }) => label).join(", ")}${overflow > 0 ? ` +${overflow}` : ""}`);
2246
- return !current.length ? empty : overflow > 0 || column.itemActions?.length ? h.div.class("min-w-0").children(menu(keyOf("items", row.id, column.id), label, `${label}: ${row.label}`, current.map(({ value, label }) => ({
2332
+ const summary = column.display === "icon" ? h.span.class("flex min-w-0 items-center gap-1 overflow-hidden").children(visible.map(({ value, label }) => h.span.key(value).attr("title", label).class("inline-grid size-7 place-items-center rounded-full bg-muted text-xs").children(tableInitials(label))), overflow > 0 && `+${overflow}`) : column.display === "badge" ? badgeSummary() : h.span.class("min-w-0 truncate").children(`${visible.map(({ label }) => label).join(", ")}${overflow > 0 ? ` +${overflow}` : ""}`);
2333
+ return !current.length ? empty : h.div.class("min-w-0").children(menu(keyOf("items", row.id, column.id), label, `${label}: ${row.label}`, current.map(({ value, label }) => ({
2247
2334
  id: value,
2248
2335
  name: label,
2249
2336
  ...column.itemActions?.length ? {
@@ -2257,11 +2344,11 @@ var DataTable = Html2.component({
2257
2344
  })
2258
2345
  }))
2259
2346
  } : { disabled: true }
2260
- })), false, undefined, false, { relationship: summary })) : summary;
2347
+ })), false, undefined, false, { relationship: summary }));
2261
2348
  }
2262
2349
  const used = new Set(current.map(({ value }) => value));
2263
2350
  const add = (column.options ?? []).filter(({ value }) => !used.has(value));
2264
- return h.div.class("grid gap-1").children(current.length > 0 ? h.ul.class("flex flex-wrap gap-1").children(current.map(({ value, label }) => h.li.key(value).class("bg-muted rounded-sm ps-2 inline-flex items-center gap-1").children(label, !!column.itemActions?.length && menu(keyOf("item", row.id, column.id, value), copy.actions, `${copy.actions}: ${label} — ${row.label}`, column.itemActions.map((action) => ({
2351
+ return h.div.class("grid gap-1").children(current.length > 0 ? h.ul.class("flex flex-wrap gap-1").children(current.map(({ value, label }) => h.li.key(value).class(column.display === "badge" ? cn(badgeClass, badgeVariants.secondary) : "bg-muted rounded-sm ps-2 inline-flex items-center gap-1").children(label, !!column.itemActions?.length && menu(keyOf("item", row.id, column.id, value), copy.actions, `${copy.actions}: ${label} — ${row.label}`, column.itemActions.map((action) => ({
2265
2352
  ...action,
2266
2353
  message: DataTableMessage.ItemActionRequested({
2267
2354
  rowId: row.id,
@@ -2279,8 +2366,6 @@ var DataTable = Html2.component({
2279
2366
  message: edit(DataTableEdit.AddItem({ itemId: value }))
2280
2367
  })), false, copy.addItem));
2281
2368
  }
2282
- case "text":
2283
- return isTableText(value) ? value : empty;
2284
2369
  }
2285
2370
  };
2286
2371
  const dragHandle = (row) => draggable && h.span.attr("aria-hidden", "true").class("inline-flex size-8 cursor-grab items-center justify-center text-muted-foreground").draggable({ [RowDrag]: row.id }, { effectAllowed: "move" }).on("dragstart", DataTableMessage.DragStarted({ rowId: row.id })).on("dragend", DataTableMessage.DragEnded()).children(GripVertical(h, { size: 16 }));
@@ -2298,9 +2383,9 @@ var DataTable = Html2.component({
2298
2383
  };
2299
2384
  const drop = dropOnRow(row.id, group);
2300
2385
  return (drop ? rowElement.dropTarget({ accepts: [RowDrag], dropEffect: "move" }).on("drop", drop) : rowElement).children(selection && h.td.class(tableClasses.selectionCell).on("click", ignoreActivation).on("keydown", ignoreActivation).children(h.div.class(tableClasses.selectionCenter).children(check(keyOf("select", key, row.id), `${copy.selectRow}: ${row.label}`, selected.has(row.id), (checked) => DataTableMessage.SelectionRequested({ rowIds: [row.id], checked }), { disabled: row.selectable === false }))), draggable && h.td.class("w-10 ps-1").on("click", ignoreActivation).on("keydown", ignoreActivation).children(dragHandle(row)), columns.map((column) => {
2301
- const td = h.td.key(column.id).attr("data-slot", "table-cell").class(cn(cellClass, tableClasses.cell, column.truncate ? "whitespace-nowrap" : "whitespace-normal", column.type === "list" && "p-0", "has-[[data-slot=data-table-list-cell]]:relative has-[[data-slot=data-table-list-cell]]:h-16"));
2386
+ const td = h.td.key(column.id).attr("data-slot", "table-cell").attr("data-column-id", column.id).class(cn(cellClass, tableClasses.cell, column.truncate ? "whitespace-nowrap" : "whitespace-normal", column.type === "list" && "p-0", column.type === "boolean" && "min-w-24 has-[[data-slot=data-table-boolean-cell]]:relative has-[[data-slot=data-table-boolean-cell]]:p-0", "has-[[data-slot=data-table-list-cell]]:relative has-[[data-slot=data-table-list-cell]]:h-16"));
2302
2387
  const content = () => h.div.class(cn(tableClasses.cellContent, column.truncate && "truncate")).children(cell(column, row));
2303
- if (column.type === "list" || column.type === "boolean" && column.editable && !row.disabledColumnIds?.includes(column.id)) {
2388
+ if (column.type === "list" || column.type === "boolean" && isTableBoolean(row.cells[column.id])) {
2304
2389
  return td.on("click", ignoreActivation).on("keydown", ignoreActivation).children(content());
2305
2390
  }
2306
2391
  return (!props.rowActivation && activate && column.type !== "boolean" ? td.class("cursor-pointer").on("click", activate) : td).children(content());
@@ -2326,7 +2411,12 @@ var DataTable = Html2.component({
2326
2411
  return (drop ? card.dropTarget({ accepts: [RowDrag], dropEffect: "move" }).on("drop", drop) : card).children(isTableText(image) && h.img.attrs({ src: image, alt: "", loading: "lazy" }).class("aspect-video w-full rounded object-cover"), h.h3.class("font-medium").children(activate ? Button2(h, {
2327
2412
  variant: "ghost",
2328
2413
  onPress: activate
2329
- }).children(name) : name), gallery.description && h.div.class("text-muted-foreground text-sm").children(galleryValue(gallery.description, row)), h.div.class("flex flex-wrap gap-2").children(gallery.tags?.map((id) => h.span.key(id).class("bg-muted rounded px-2 py-1 text-xs").children(galleryValue(id, row)))), selection && check(keyOf("select", key, row.id), `${copy.selectRow}: ${row.label}`, selected.has(row.id), (checked) => DataTableMessage.SelectionRequested({ rowIds: [row.id], checked }), { disabled: row.selectable === false }), h.div.class("flex items-center justify-end gap-1").children(dragHandle(row), rowControls(row, siblings, key)));
2414
+ }).children(name) : name), gallery.description && h.div.class("text-muted-foreground text-sm").children(galleryValue(gallery.description, row)), h.div.class("flex flex-wrap gap-2").children(gallery.tags?.map((id) => {
2415
+ const column = props.columnDefs.find((column) => column.id === id);
2416
+ if ((column?.type === "text" || column?.type === "list") && column.display === "badge")
2417
+ return h.div.key(id).children(cell(column, row));
2418
+ return h.span.key(id).class("bg-muted rounded px-2 py-1 text-xs").children(galleryValue(id, row));
2419
+ })), selection && check(keyOf("select", key, row.id), `${copy.selectRow}: ${row.label}`, selected.has(row.id), (checked) => DataTableMessage.SelectionRequested({ rowIds: [row.id], checked }), { disabled: row.selectable === false }), h.div.class("flex items-center justify-end gap-1").children(dragHandle(row), rowControls(row, siblings, key)));
2330
2420
  };
2331
2421
  const renderGroups = (members, depth, parent, parentTarget) => {
2332
2422
  const field = grouping[depth];
@@ -2361,7 +2451,7 @@ var DataTable = Html2.component({
2361
2451
  ];
2362
2452
  });
2363
2453
  };
2364
- return h.section.class(cn("grid min-w-0 gap-2", props.className)).onMount(PersistPreferences({
2454
+ return h.section.class(cn("min-w-0 gap-2", fillHeight ? "flex min-h-0 flex-1 flex-col" : "grid", props.className)).onMount(PersistPreferences({
2365
2455
  columns: props.columnDefs.map(({ id }) => id),
2366
2456
  gallery: !!features.gallery,
2367
2457
  preferences: tablePreferences(model)
@@ -2595,7 +2685,7 @@ var DataTable = Html2.component({
2595
2685
  ] : [];
2596
2686
  }) : renderGroups(rows, 0, "")));
2597
2687
  };
2598
- const viewport = () => h.div.class("@container overflow-auto");
2688
+ const viewport = () => h.div.class(cn("@container overflow-auto", fillHeight && "min-h-0 flex-1"));
2599
2689
  if (!virtual)
2600
2690
  return viewport().children(renderTable());
2601
2691
  return VirtualList(h, {
@@ -2607,11 +2697,11 @@ var DataTable = Html2.component({
2607
2697
  overscan: virtual.overscan,
2608
2698
  initialCount: virtual.initialCount
2609
2699
  },
2610
- view: (list) => virtual.scroll === "page" ? h.div.children(renderTable(list)) : list.viewport(viewport().style({
2700
+ view: (list) => virtual.scroll === "page" ? h.div.children(renderTable(list)) : list.viewport(fillHeight ? viewport() : viewport().style({
2611
2701
  maxHeight: `${virtual.height}px`
2612
2702
  })).children(renderTable(list))
2613
2703
  });
2614
- })(), paginationVisible && Pagination(h, {
2704
+ })(), paginationVisible ? Pagination(h, {
2615
2705
  props: {
2616
2706
  locale,
2617
2707
  page,
@@ -2625,7 +2715,7 @@ var DataTable = Html2.component({
2625
2715
  PageChanged: ({ page }) => DataTableMessage.PageRequested({ page }),
2626
2716
  PageSizeChanged: ({ pageSize }) => DataTableMessage.PageSizeRequested({ pageSize })
2627
2717
  }
2628
- }));
2718
+ }) : h.div.attr("role", "status").class(tableResultsFooterClass).children(paginationMessages(locale).results(totalRows)));
2629
2719
  }
2630
2720
  });
2631
2721
  export {
@@ -1,7 +1,7 @@
1
1
  import { DateTime, Option, Schema } from "effect";
2
2
  import { Component, Subscription, UiSchema } from "effect/ui";
3
3
  import { ColumnFilter } from "../../lib/query.js";
4
- import { DataTableFilterDraftSchema, DataTablePreferencesSchema, type DataTableColumn, type DataTableDateTimeFormat, type DataTableLabelsSchema, type DataTableProps, type DataTablePublicState, type DataTableRow, type DataTableSort } from "./schema.js";
4
+ import { DataTableFilterDraftSchema, DataTablePreferencesSchema, type DataTableColumn, type DataTableDateTimeFormat, type DataTableLabelsSchema, type DataTableProps, type DataTablePublicState, type DataTableRow, type DataTableSort, type DataTableBadgeOption } from "./schema.js";
5
5
  type Labels = Required<typeof DataTableLabelsSchema.Type>;
6
6
  export declare const defaultMessages: {
7
7
  en: {
@@ -135,7 +135,23 @@ export declare const matchesFilterText: (value: string, filter: Extract<ColumnFi
135
135
  }>) => boolean;
136
136
  export declare const tableFilterKind: (column: {
137
137
  type?: DataTableColumn["type"];
138
+ display?: string;
138
139
  }, hasOptions?: boolean) => ColumnFilter["kind"];
140
+ export declare const tableBadgeValue: <Value>(value: Value) => (Value & string) | null;
141
+ type BadgeConfig<Option extends DataTableBadgeOption = DataTableBadgeOption> = {
142
+ options?: readonly Option[];
143
+ };
144
+ export declare const tableBadge: <Value, Option extends DataTableBadgeOption>(input: Value, config?: BadgeConfig<Option>) => {
145
+ value: Value & string;
146
+ label: string;
147
+ variant: "default" | "destructive" | "info" | "muted" | "outline" | "secondary" | "success";
148
+ option: Option | undefined;
149
+ } | null;
150
+ export declare const tableBadgeFilterOptions: <Value>(values: Iterable<Value>, config?: BadgeConfig) => {
151
+ value: string;
152
+ label: string;
153
+ }[];
154
+ export declare const tableBadgeSearchText: <Value>(value: Value, config?: BadgeConfig) => string;
139
155
  export declare const matchesTableFilter: <Value>(filter: ColumnFilter, value: Value, type: DataTableColumn["type"] | undefined, text: () => string, values: () => readonly string[]) => boolean;
140
156
  /** Resolve the same public field IDs as React without adding visible cells. */
141
157
  export declare const tableDataColumns: (columns: readonly DataTableColumn[]) => readonly DataTableColumn[];
@@ -578,6 +594,15 @@ export declare const dataTableOptions: {
578
594
  readonly emptyLabel: Schema.optionalKey<Schema.String>;
579
595
  readonly nulls: Schema.optionalKey<Schema.Literals<readonly ["first", "last"]>>;
580
596
  readonly type: Schema.Literal<"text">;
597
+ readonly display: Schema.optionalKey<Schema.Literal<"badge">>;
598
+ readonly typeOptions: Schema.optionalKey<Schema.Struct<{
599
+ readonly options: Schema.optionalKey<Schema.$Array<Schema.Struct<{
600
+ readonly value: Schema.NonEmptyString;
601
+ readonly label: Schema.optionalKey<Schema.String>;
602
+ readonly variant: Schema.optionalKey<Schema.Literals<readonly ["default", "secondary", "outline", "destructive", "success", "info", "muted"]>>;
603
+ readonly icon: Schema.optionalKey<Schema.declare<<Msg>(h: import("effect/ui/html/Html").H<Msg>, { size, color, strokeWidth, className, }?: import("../../lib/lucide-effect.js").LucideIconProps) => import("effect/ui/html/Html").SvgElement<Msg, never, SVGSVGElement, "svg">, <Msg>(h: import("effect/ui/html/Html").H<Msg>, { size, color, strokeWidth, className, }?: import("../../lib/lucide-effect.js").LucideIconProps) => import("effect/ui/html/Html").SvgElement<Msg, never, SVGSVGElement, "svg">>>;
604
+ }>>>;
605
+ }>>;
581
606
  readonly fields: Schema.optionalKey<Schema.$Array<Schema.Union<readonly [Schema.Struct<{
582
607
  readonly id: Schema.NonEmptyString;
583
608
  readonly headerName: Schema.String;
@@ -594,6 +619,15 @@ export declare const dataTableOptions: {
594
619
  readonly emptyLabel: Schema.optionalKey<Schema.String>;
595
620
  readonly nulls: Schema.optionalKey<Schema.Literals<readonly ["first", "last"]>>;
596
621
  readonly type: Schema.Literal<"text">;
622
+ readonly display: Schema.optionalKey<Schema.Literal<"badge">>;
623
+ readonly typeOptions: Schema.optionalKey<Schema.Struct<{
624
+ readonly options: Schema.optionalKey<Schema.$Array<Schema.Struct<{
625
+ readonly value: Schema.NonEmptyString;
626
+ readonly label: Schema.optionalKey<Schema.String>;
627
+ readonly variant: Schema.optionalKey<Schema.Literals<readonly ["default", "secondary", "outline", "destructive", "success", "info", "muted"]>>;
628
+ readonly icon: Schema.optionalKey<Schema.declare<<Msg>(h: import("effect/ui/html/Html").H<Msg>, { size, color, strokeWidth, className, }?: import("../../lib/lucide-effect.js").LucideIconProps) => import("effect/ui/html/Html").SvgElement<Msg, never, SVGSVGElement, "svg">, <Msg>(h: import("effect/ui/html/Html").H<Msg>, { size, color, strokeWidth, className, }?: import("../../lib/lucide-effect.js").LucideIconProps) => import("effect/ui/html/Html").SvgElement<Msg, never, SVGSVGElement, "svg">>>;
629
+ }>>>;
630
+ }>>;
597
631
  }>, Schema.Struct<{
598
632
  readonly id: Schema.NonEmptyString;
599
633
  readonly headerName: Schema.String;
@@ -735,7 +769,7 @@ export declare const dataTableOptions: {
735
769
  readonly variant: Schema.optionalKey<Schema.Literals<readonly ["default", "destructive"]>>;
736
770
  readonly disabled: Schema.optionalKey<Schema.Boolean>;
737
771
  }>>>;
738
- readonly display: Schema.optionalKey<Schema.Literals<readonly ["list", "icon"]>>;
772
+ readonly display: Schema.optionalKey<Schema.Literals<readonly ["list", "icon", "badge"]>>;
739
773
  readonly visibleCount: Schema.optionalKey<Schema.Int>;
740
774
  readonly actionsLabel: Schema.optionalKey<Schema.String>;
741
775
  readonly manageLabel: Schema.optionalKey<Schema.String>;
@@ -782,6 +816,15 @@ export declare const dataTableOptions: {
782
816
  readonly emptyLabel: Schema.optionalKey<Schema.String>;
783
817
  readonly nulls: Schema.optionalKey<Schema.Literals<readonly ["first", "last"]>>;
784
818
  readonly type: Schema.Literal<"text">;
819
+ readonly display: Schema.optionalKey<Schema.Literal<"badge">>;
820
+ readonly typeOptions: Schema.optionalKey<Schema.Struct<{
821
+ readonly options: Schema.optionalKey<Schema.$Array<Schema.Struct<{
822
+ readonly value: Schema.NonEmptyString;
823
+ readonly label: Schema.optionalKey<Schema.String>;
824
+ readonly variant: Schema.optionalKey<Schema.Literals<readonly ["default", "secondary", "outline", "destructive", "success", "info", "muted"]>>;
825
+ readonly icon: Schema.optionalKey<Schema.declare<<Msg>(h: import("effect/ui/html/Html").H<Msg>, { size, color, strokeWidth, className, }?: import("../../lib/lucide-effect.js").LucideIconProps) => import("effect/ui/html/Html").SvgElement<Msg, never, SVGSVGElement, "svg">, <Msg>(h: import("effect/ui/html/Html").H<Msg>, { size, color, strokeWidth, className, }?: import("../../lib/lucide-effect.js").LucideIconProps) => import("effect/ui/html/Html").SvgElement<Msg, never, SVGSVGElement, "svg">>>;
826
+ }>>>;
827
+ }>>;
785
828
  }>, Schema.Struct<{
786
829
  readonly id: Schema.NonEmptyString;
787
830
  readonly headerName: Schema.String;
@@ -923,7 +966,7 @@ export declare const dataTableOptions: {
923
966
  readonly variant: Schema.optionalKey<Schema.Literals<readonly ["default", "destructive"]>>;
924
967
  readonly disabled: Schema.optionalKey<Schema.Boolean>;
925
968
  }>>>;
926
- readonly display: Schema.optionalKey<Schema.Literals<readonly ["list", "icon"]>>;
969
+ readonly display: Schema.optionalKey<Schema.Literals<readonly ["list", "icon", "badge"]>>;
927
970
  readonly visibleCount: Schema.optionalKey<Schema.Int>;
928
971
  readonly actionsLabel: Schema.optionalKey<Schema.String>;
929
972
  readonly manageLabel: Schema.optionalKey<Schema.String>;
@@ -960,6 +1003,15 @@ export declare const dataTableOptions: {
960
1003
  readonly emptyLabel: Schema.optionalKey<Schema.String>;
961
1004
  readonly nulls: Schema.optionalKey<Schema.Literals<readonly ["first", "last"]>>;
962
1005
  readonly type: Schema.Literal<"text">;
1006
+ readonly display: Schema.optionalKey<Schema.Literal<"badge">>;
1007
+ readonly typeOptions: Schema.optionalKey<Schema.Struct<{
1008
+ readonly options: Schema.optionalKey<Schema.$Array<Schema.Struct<{
1009
+ readonly value: Schema.NonEmptyString;
1010
+ readonly label: Schema.optionalKey<Schema.String>;
1011
+ readonly variant: Schema.optionalKey<Schema.Literals<readonly ["default", "secondary", "outline", "destructive", "success", "info", "muted"]>>;
1012
+ readonly icon: Schema.optionalKey<Schema.declare<<Msg>(h: import("effect/ui/html/Html").H<Msg>, { size, color, strokeWidth, className, }?: import("../../lib/lucide-effect.js").LucideIconProps) => import("effect/ui/html/Html").SvgElement<Msg, never, SVGSVGElement, "svg">, <Msg>(h: import("effect/ui/html/Html").H<Msg>, { size, color, strokeWidth, className, }?: import("../../lib/lucide-effect.js").LucideIconProps) => import("effect/ui/html/Html").SvgElement<Msg, never, SVGSVGElement, "svg">>>;
1013
+ }>>>;
1014
+ }>>;
963
1015
  }>, Schema.Struct<{
964
1016
  readonly id: Schema.NonEmptyString;
965
1017
  readonly headerName: Schema.String;
@@ -1101,7 +1153,7 @@ export declare const dataTableOptions: {
1101
1153
  readonly variant: Schema.optionalKey<Schema.Literals<readonly ["default", "destructive"]>>;
1102
1154
  readonly disabled: Schema.optionalKey<Schema.Boolean>;
1103
1155
  }>>>;
1104
- readonly display: Schema.optionalKey<Schema.Literals<readonly ["list", "icon"]>>;
1156
+ readonly display: Schema.optionalKey<Schema.Literals<readonly ["list", "icon", "badge"]>>;
1105
1157
  readonly visibleCount: Schema.optionalKey<Schema.Int>;
1106
1158
  readonly actionsLabel: Schema.optionalKey<Schema.String>;
1107
1159
  readonly manageLabel: Schema.optionalKey<Schema.String>;
@@ -1144,6 +1196,15 @@ export declare const dataTableOptions: {
1144
1196
  readonly emptyLabel: Schema.optionalKey<Schema.String>;
1145
1197
  readonly nulls: Schema.optionalKey<Schema.Literals<readonly ["first", "last"]>>;
1146
1198
  readonly type: Schema.Literal<"text">;
1199
+ readonly display: Schema.optionalKey<Schema.Literal<"badge">>;
1200
+ readonly typeOptions: Schema.optionalKey<Schema.Struct<{
1201
+ readonly options: Schema.optionalKey<Schema.$Array<Schema.Struct<{
1202
+ readonly value: Schema.NonEmptyString;
1203
+ readonly label: Schema.optionalKey<Schema.String>;
1204
+ readonly variant: Schema.optionalKey<Schema.Literals<readonly ["default", "secondary", "outline", "destructive", "success", "info", "muted"]>>;
1205
+ readonly icon: Schema.optionalKey<Schema.declare<<Msg>(h: import("effect/ui/html/Html").H<Msg>, { size, color, strokeWidth, className, }?: import("../../lib/lucide-effect.js").LucideIconProps) => import("effect/ui/html/Html").SvgElement<Msg, never, SVGSVGElement, "svg">, <Msg>(h: import("effect/ui/html/Html").H<Msg>, { size, color, strokeWidth, className, }?: import("../../lib/lucide-effect.js").LucideIconProps) => import("effect/ui/html/Html").SvgElement<Msg, never, SVGSVGElement, "svg">>>;
1206
+ }>>>;
1207
+ }>>;
1147
1208
  }>, Schema.Struct<{
1148
1209
  readonly id: Schema.NonEmptyString;
1149
1210
  readonly headerName: Schema.String;
@@ -1285,7 +1346,7 @@ export declare const dataTableOptions: {
1285
1346
  readonly variant: Schema.optionalKey<Schema.Literals<readonly ["default", "destructive"]>>;
1286
1347
  readonly disabled: Schema.optionalKey<Schema.Boolean>;
1287
1348
  }>>>;
1288
- readonly display: Schema.optionalKey<Schema.Literals<readonly ["list", "icon"]>>;
1349
+ readonly display: Schema.optionalKey<Schema.Literals<readonly ["list", "icon", "badge"]>>;
1289
1350
  readonly visibleCount: Schema.optionalKey<Schema.Int>;
1290
1351
  readonly actionsLabel: Schema.optionalKey<Schema.String>;
1291
1352
  readonly manageLabel: Schema.optionalKey<Schema.String>;
@@ -1330,6 +1391,15 @@ export declare const dataTableOptions: {
1330
1391
  readonly emptyLabel: Schema.optionalKey<Schema.String>;
1331
1392
  readonly nulls: Schema.optionalKey<Schema.Literals<readonly ["first", "last"]>>;
1332
1393
  readonly type: Schema.Literal<"text">;
1394
+ readonly display: Schema.optionalKey<Schema.Literal<"badge">>;
1395
+ readonly typeOptions: Schema.optionalKey<Schema.Struct<{
1396
+ readonly options: Schema.optionalKey<Schema.$Array<Schema.Struct<{
1397
+ readonly value: Schema.NonEmptyString;
1398
+ readonly label: Schema.optionalKey<Schema.String>;
1399
+ readonly variant: Schema.optionalKey<Schema.Literals<readonly ["default", "secondary", "outline", "destructive", "success", "info", "muted"]>>;
1400
+ readonly icon: Schema.optionalKey<Schema.declare<<Msg>(h: import("effect/ui/html/Html").H<Msg>, { size, color, strokeWidth, className, }?: import("../../lib/lucide-effect.js").LucideIconProps) => import("effect/ui/html/Html").SvgElement<Msg, never, SVGSVGElement, "svg">, <Msg>(h: import("effect/ui/html/Html").H<Msg>, { size, color, strokeWidth, className, }?: import("../../lib/lucide-effect.js").LucideIconProps) => import("effect/ui/html/Html").SvgElement<Msg, never, SVGSVGElement, "svg">>>;
1401
+ }>>>;
1402
+ }>>;
1333
1403
  }>, Schema.Struct<{
1334
1404
  readonly id: Schema.NonEmptyString;
1335
1405
  readonly headerName: Schema.String;
@@ -1471,7 +1541,7 @@ export declare const dataTableOptions: {
1471
1541
  readonly variant: Schema.optionalKey<Schema.Literals<readonly ["default", "destructive"]>>;
1472
1542
  readonly disabled: Schema.optionalKey<Schema.Boolean>;
1473
1543
  }>>>;
1474
- readonly display: Schema.optionalKey<Schema.Literals<readonly ["list", "icon"]>>;
1544
+ readonly display: Schema.optionalKey<Schema.Literals<readonly ["list", "icon", "badge"]>>;
1475
1545
  readonly visibleCount: Schema.optionalKey<Schema.Int>;
1476
1546
  readonly actionsLabel: Schema.optionalKey<Schema.String>;
1477
1547
  readonly manageLabel: Schema.optionalKey<Schema.String>;
@@ -1514,6 +1584,15 @@ export declare const dataTableOptions: {
1514
1584
  readonly emptyLabel: Schema.optionalKey<Schema.String>;
1515
1585
  readonly nulls: Schema.optionalKey<Schema.Literals<readonly ["first", "last"]>>;
1516
1586
  readonly type: Schema.Literal<"text">;
1587
+ readonly display: Schema.optionalKey<Schema.Literal<"badge">>;
1588
+ readonly typeOptions: Schema.optionalKey<Schema.Struct<{
1589
+ readonly options: Schema.optionalKey<Schema.$Array<Schema.Struct<{
1590
+ readonly value: Schema.NonEmptyString;
1591
+ readonly label: Schema.optionalKey<Schema.String>;
1592
+ readonly variant: Schema.optionalKey<Schema.Literals<readonly ["default", "secondary", "outline", "destructive", "success", "info", "muted"]>>;
1593
+ readonly icon: Schema.optionalKey<Schema.declare<<Msg>(h: import("effect/ui/html/Html").H<Msg>, { size, color, strokeWidth, className, }?: import("../../lib/lucide-effect.js").LucideIconProps) => import("effect/ui/html/Html").SvgElement<Msg, never, SVGSVGElement, "svg">, <Msg>(h: import("effect/ui/html/Html").H<Msg>, { size, color, strokeWidth, className, }?: import("../../lib/lucide-effect.js").LucideIconProps) => import("effect/ui/html/Html").SvgElement<Msg, never, SVGSVGElement, "svg">>>;
1594
+ }>>>;
1595
+ }>>;
1517
1596
  }>, Schema.Struct<{
1518
1597
  readonly id: Schema.NonEmptyString;
1519
1598
  readonly headerName: Schema.String;
@@ -1655,7 +1734,7 @@ export declare const dataTableOptions: {
1655
1734
  readonly variant: Schema.optionalKey<Schema.Literals<readonly ["default", "destructive"]>>;
1656
1735
  readonly disabled: Schema.optionalKey<Schema.Boolean>;
1657
1736
  }>>>;
1658
- readonly display: Schema.optionalKey<Schema.Literals<readonly ["list", "icon"]>>;
1737
+ readonly display: Schema.optionalKey<Schema.Literals<readonly ["list", "icon", "badge"]>>;
1659
1738
  readonly visibleCount: Schema.optionalKey<Schema.Int>;
1660
1739
  readonly actionsLabel: Schema.optionalKey<Schema.String>;
1661
1740
  readonly manageLabel: Schema.optionalKey<Schema.String>;
@@ -1691,7 +1770,7 @@ export declare const dataTableOptions: {
1691
1770
  readonly variant: Schema.optionalKey<Schema.Literals<readonly ["default", "destructive"]>>;
1692
1771
  readonly disabled: Schema.optionalKey<Schema.Boolean>;
1693
1772
  }>>>;
1694
- readonly display: Schema.optionalKey<Schema.Literals<readonly ["list", "icon"]>>;
1773
+ readonly display: Schema.optionalKey<Schema.Literals<readonly ["list", "icon", "badge"]>>;
1695
1774
  readonly visibleCount: Schema.optionalKey<Schema.Int>;
1696
1775
  readonly actionsLabel: Schema.optionalKey<Schema.String>;
1697
1776
  readonly manageLabel: Schema.optionalKey<Schema.String>;
@@ -1711,6 +1790,15 @@ export declare const dataTableOptions: {
1711
1790
  readonly emptyLabel: Schema.optionalKey<Schema.String>;
1712
1791
  readonly nulls: Schema.optionalKey<Schema.Literals<readonly ["first", "last"]>>;
1713
1792
  readonly type: Schema.Literal<"text">;
1793
+ readonly display: Schema.optionalKey<Schema.Literal<"badge">>;
1794
+ readonly typeOptions: Schema.optionalKey<Schema.Struct<{
1795
+ readonly options: Schema.optionalKey<Schema.$Array<Schema.Struct<{
1796
+ readonly value: Schema.NonEmptyString;
1797
+ readonly label: Schema.optionalKey<Schema.String>;
1798
+ readonly variant: Schema.optionalKey<Schema.Literals<readonly ["default", "secondary", "outline", "destructive", "success", "info", "muted"]>>;
1799
+ readonly icon: Schema.optionalKey<Schema.declare<<Msg>(h: import("effect/ui/html/Html").H<Msg>, { size, color, strokeWidth, className, }?: import("../../lib/lucide-effect.js").LucideIconProps) => import("effect/ui/html/Html").SvgElement<Msg, never, SVGSVGElement, "svg">, <Msg>(h: import("effect/ui/html/Html").H<Msg>, { size, color, strokeWidth, className, }?: import("../../lib/lucide-effect.js").LucideIconProps) => import("effect/ui/html/Html").SvgElement<Msg, never, SVGSVGElement, "svg">>>;
1800
+ }>>>;
1801
+ }>>;
1714
1802
  }>, Schema.Struct<{
1715
1803
  readonly id: Schema.NonEmptyString;
1716
1804
  readonly headerName: Schema.String;
@@ -1852,7 +1940,7 @@ export declare const dataTableOptions: {
1852
1940
  readonly variant: Schema.optionalKey<Schema.Literals<readonly ["default", "destructive"]>>;
1853
1941
  readonly disabled: Schema.optionalKey<Schema.Boolean>;
1854
1942
  }>>>;
1855
- readonly display: Schema.optionalKey<Schema.Literals<readonly ["list", "icon"]>>;
1943
+ readonly display: Schema.optionalKey<Schema.Literals<readonly ["list", "icon", "badge"]>>;
1856
1944
  readonly visibleCount: Schema.optionalKey<Schema.Int>;
1857
1945
  readonly actionsLabel: Schema.optionalKey<Schema.String>;
1858
1946
  readonly manageLabel: Schema.optionalKey<Schema.String>;