@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
@@ -1,7 +1,13 @@
1
1
  import { type ReactElement, type ReactNode } from "react";
2
2
  import { type PaginationMessages } from "../ui/pagination.js";
3
3
  import { ColumnFilter, type QueryType } from "../../lib/query.js";
4
- import type { DataTableCommonFeatures, DataTableCommonProps, DataTableDateFormat, DataTableDateTimeFormat, DataTablePublicState } from "./schema.js";
4
+ import type { DataTableCommonFeatures, DataTableCommonProps, DataTableDateFormat, DataTableDateTimeFormat, DataTablePublicState, DataTableBadgeOption } from "./schema.js";
5
+ export type DataTableBadgeOptions = {
6
+ options?: readonly (DataTableBadgeOption & {
7
+ icon?: ReactNode;
8
+ })[];
9
+ emptyLabel?: ReactNode;
10
+ };
5
11
  /** Presentation only. Popup classes are applied inside portals, not to their triggers. */
6
12
  export type DataTableClassNames = {
7
13
  table?: Partial<Record<"content" | "header" | "body" | "row" | "head" | "cell", string>>;
@@ -61,7 +67,7 @@ export interface DataTableListItemContext<TData> {
61
67
  }
62
68
  export interface DataTableListOptions {
63
69
  emptyLabel: ReactNode;
64
- display?: "list" | "icon" | undefined;
70
+ display?: "list" | "icon" | "badge" | undefined;
65
71
  locale?: string | undefined;
66
72
  messages?: DataTableMessageTranslations | undefined;
67
73
  visibleCount?: number | undefined;
@@ -159,7 +165,8 @@ export interface DataTableBooleanOptions<TData> {
159
165
  disabled?: (row: TData) => boolean;
160
166
  }
161
167
  type DataTableColumnType<TData> = {
162
- type?: undefined;
168
+ type?: undefined | "text";
169
+ display?: never;
163
170
  typeOptions?: never;
164
171
  } | DataTableDateType | {
165
172
  type: "number";
@@ -167,6 +174,10 @@ type DataTableColumnType<TData> = {
167
174
  } | {
168
175
  type: "boolean";
169
176
  typeOptions?: DataTableBooleanOptions<TData>;
177
+ } | {
178
+ type: "text";
179
+ display: "badge";
180
+ typeOptions?: DataTableBadgeOptions;
170
181
  } | {
171
182
  type: "reference";
172
183
  typeOptions: DataTableReferenceOptions<TData>;
@@ -614,6 +614,13 @@ import { useModel } from "@krak-stack/registry/effect-ui-adapter/react";
614
614
  import { useKrakstackLocale as useKrakstackLocale3 } from "@krak-stack/registry/krakstack-provider/react";
615
615
 
616
616
  // ../../src/components/data-table/classes.ts
617
+ 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";
618
+ var cellTriggerFocus = "focus-visible:ring-0 focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-ring";
619
+ var tableBadgeTones = {
620
+ success: "border-emerald-200 bg-emerald-100 text-emerald-900 dark:border-emerald-900/50 dark:bg-emerald-950/50 dark:text-emerald-200",
621
+ info: "border-blue-200 bg-blue-100 text-blue-900 dark:border-blue-900/50 dark:bg-blue-950/50 dark:text-blue-200",
622
+ muted: "border-muted bg-muted text-muted-foreground dark:bg-muted/50"
623
+ };
617
624
  var tableClasses = {
618
625
  selectionCell: "w-10 p-0 align-middle",
619
626
  selectionCenter: "grid place-items-center",
@@ -625,16 +632,16 @@ var tableClasses = {
625
632
  menubar: "h-auto w-full flex-wrap justify-start border border-input bg-transparent",
626
633
  cell: "overflow-hidden",
627
634
  cellContent: "min-w-0 wrap-anywhere",
628
- actionTrigger: "size-8 focus-visible:ring-inset",
635
+ actionTrigger: `size-8 ${cellTriggerFocus}`,
629
636
  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))]",
630
637
  actionsAlign: "flex min-h-12 items-center justify-end pe-1",
631
638
  header: "relative h-12 p-0",
632
639
  stickyHeader: "sticky top-0 z-30 bg-background",
633
640
  stickyHeaderRule: "after:border-border after:pointer-events-none after:absolute after:inset-x-0 after:bottom-0 after:border-b",
634
- headerTrigger: "absolute inset-0 h-full w-full min-w-0 justify-start rounded-none px-2 pe-4 focus-visible:ring-inset",
641
+ headerTrigger: `absolute inset-0 h-full w-full min-w-0 justify-start rounded-none px-2 pe-4 ${cellTriggerFocus}`,
635
642
  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",
636
643
  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",
637
- relationshipTrigger: "h-full w-full min-w-0 justify-between rounded-none px-2 text-start focus-visible:ring-inset",
644
+ relationshipTrigger: `h-full w-full min-w-0 justify-between rounded-none px-2 text-start ${cellTriggerFocus}`,
638
645
  reference: "flex min-w-0 items-center gap-2",
639
646
  referenceAvatar: "relative grid size-8 shrink-0 place-items-center overflow-hidden bg-muted text-xs font-medium",
640
647
  referenceText: "flex min-w-0 flex-col leading-tight",
@@ -645,6 +652,7 @@ var tableClasses = {
645
652
  referenceName: "truncate font-medium",
646
653
  referenceDescription: "text-muted-foreground truncate text-xs"
647
654
  };
655
+ var tableResultsFooterClass = "bg-background text-muted-foreground sticky bottom-0 z-30 shrink-0 border-t px-2 py-2 text-sm";
648
656
  var resolveTableClasses = (overrides) => ({
649
657
  ...tableClasses,
650
658
  ...overrides
@@ -656,7 +664,7 @@ import { Csv } from "effect/encoding";
656
664
  import { Command, Component as Component2, Subscription, UiSchema as UiSchema2 } from "effect/ui";
657
665
 
658
666
  // ../../src/components/data-table/schema.ts
659
- import { DateTime as DateTime2, Option as Option2, Schema as Schema4, Struct as Struct2, Tuple } from "effect";
667
+ import { DateTime as DateTime2, Option as Option2, Predicate, Schema as Schema4, Struct as Struct2, Tuple } from "effect";
660
668
  var TableClassesOverridesSchema = Schema4.Record(Schema4.Literals(Struct2.keys(tableClasses)), Schema4.optionalKey(Schema4.String)).annotate({ identifier: "TableClassesOverrides" });
661
669
  var DataTableCommonPropsSchema = Schema4.Struct({
662
670
  classes: Schema4.optional(TableClassesOverridesSchema),
@@ -764,8 +772,33 @@ var column = {
764
772
  emptyLabel: Schema4.optionalKey(Schema4.String),
765
773
  nulls: Schema4.optionalKey(Schema4.Literals(["first", "last"]))
766
774
  };
775
+ var DataTableBadgeOptionSchema = Schema4.Struct({
776
+ value: Schema4.NonEmptyString,
777
+ label: Schema4.optionalKey(Schema4.String),
778
+ variant: Schema4.optionalKey(Schema4.Literals([
779
+ "default",
780
+ "secondary",
781
+ "outline",
782
+ "destructive",
783
+ "success",
784
+ "info",
785
+ "muted"
786
+ ]))
787
+ }).annotate({ identifier: "DataTableBadgeOption" });
788
+ var BadgeIcon = Schema4.declare((value) => Predicate.isFunction(value)).annotate({ identifier: "DataTableBadgeIcon" });
789
+ var DataTableBadgeOptionsSchema = Schema4.Struct({
790
+ options: Schema4.optionalKey(Schema4.Array(DataTableBadgeOptionSchema.mapFields((fields) => ({
791
+ ...fields,
792
+ icon: Schema4.optionalKey(BadgeIcon)
793
+ }))))
794
+ }).annotate({ identifier: "DataTableBadgeOptions" });
767
795
  var DataTableFieldSchema = Schema4.Union([
768
- Schema4.Struct({ ...column, type: Schema4.Literal("text") }),
796
+ Schema4.Struct({
797
+ ...column,
798
+ type: Schema4.Literal("text"),
799
+ display: Schema4.optionalKey(Schema4.Literal("badge")),
800
+ typeOptions: Schema4.optionalKey(DataTableBadgeOptionsSchema)
801
+ }),
769
802
  Schema4.Struct({
770
803
  ...column,
771
804
  type: Schema4.Literal("number"),
@@ -808,7 +841,7 @@ var DataTableFieldSchema = Schema4.Union([
808
841
  options: Schema4.optionalKey(Schema4.Array(DataTableItemSchema)),
809
842
  allowRemove: Schema4.optionalKey(Schema4.Boolean),
810
843
  itemActions: Schema4.optionalKey(Schema4.Array(DataTableActionSchema)),
811
- display: Schema4.optionalKey(Schema4.Literals(["list", "icon"])),
844
+ display: Schema4.optionalKey(Schema4.Literals(["list", "icon", "badge"])),
812
845
  visibleCount: Schema4.optionalKey(Schema4.Int.check(Schema4.isGreaterThanOrEqualTo(0))),
813
846
  actionsLabel: Schema4.optionalKey(Schema4.String),
814
847
  manageLabel: Schema4.optionalKey(Schema4.String)
@@ -1102,7 +1135,33 @@ var matchesFilterText = (value, filter) => {
1102
1135
  return text.endsWith(query);
1103
1136
  }
1104
1137
  };
1105
- var tableFilterKind = (column, hasOptions = false) => hasOptions || column.type === "list" ? "values" : column.type === "reference" ? "text" : column.type === "dateTime" ? "date" : column.type ?? "text";
1138
+ var tableFilterKind = (column, hasOptions = false) => hasOptions || column.type === "list" || column.display === "badge" ? "values" : column.type === "reference" ? "text" : column.type === "dateTime" ? "date" : column.type ?? "text";
1139
+ var tableBadgeValue = (value) => isTableText(value) && value !== "" ? value : null;
1140
+ var tableBadge = (input, config) => {
1141
+ const value = tableBadgeValue(input);
1142
+ if (value === null)
1143
+ return null;
1144
+ const option = config?.options?.find((option) => option.value === value);
1145
+ return {
1146
+ value,
1147
+ label: option?.label ?? value,
1148
+ variant: option?.variant ?? "secondary",
1149
+ option
1150
+ };
1151
+ };
1152
+ var tableBadgeFilterOptions = (values, config) => {
1153
+ const options = new Map(config?.options?.map(({ value, label }) => [value, label ?? value]));
1154
+ for (const input of values) {
1155
+ const value = tableBadgeValue(input);
1156
+ if (value !== null && !options.has(value))
1157
+ options.set(value, value);
1158
+ }
1159
+ return [...options].map(([value, label]) => ({ value, label }));
1160
+ };
1161
+ var tableBadgeSearchText = (value, config) => {
1162
+ const badge = tableBadge(value, config);
1163
+ return badge ? `${badge.label} ${badge.value}` : "";
1164
+ };
1106
1165
  var matchesTableFilter = (filter, value, type, text, values) => {
1107
1166
  switch (filter.kind) {
1108
1167
  case "text":
@@ -1136,13 +1195,20 @@ var filterTableColumns = (rows, columns, filters) => {
1136
1195
  return rows;
1137
1196
  return rows.filter((row) => active.every((filter) => {
1138
1197
  const value = row.cells[filter.id];
1139
- 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) : []);
1198
+ const column = byId.get(filter.id);
1199
+ return matchesTableFilter(filter, value, column?.type, () => isTableText(value) ? value : isTableReference(value) ? `${value.label} ${value.description ?? ""}`.trim() : "", () => {
1200
+ if (column?.type === "text" && column.display === "badge") {
1201
+ const key = tableBadgeValue(value);
1202
+ return key === null ? [] : [key];
1203
+ }
1204
+ return isTableList(value) ? value.map(({ value }) => value) : [];
1205
+ });
1140
1206
  }));
1141
1207
  };
1142
1208
  var columnValue = (column, value) => {
1143
1209
  switch (column.type) {
1144
1210
  case "text":
1145
- return isTableText(value) ? value : null;
1211
+ return column.display === "badge" ? tableBadgeValue(value) : isTableText(value) ? value : null;
1146
1212
  case "number":
1147
1213
  case "boolean":
1148
1214
  case "date":
@@ -1196,6 +1262,8 @@ var filterTableRows = (rows, columns, search, locale) => {
1196
1262
  const searchable = columns.filter(({ searchable }) => searchable !== false);
1197
1263
  return rows.filter((row) => searchable.some((column) => {
1198
1264
  const value = row.cells[column.id];
1265
+ if (column.type === "text" && column.display === "badge")
1266
+ return tableBadgeSearchText(value, column.typeOptions).toLocaleLowerCase(locale).includes(query);
1199
1267
  if (column.type === "date" || column.type === "dateTime") {
1200
1268
  const date = resolveDate(value, column.type);
1201
1269
  return !!date && `${formatDateValue(date, column, locale)} ${dateIsoValue(date)}`.toLocaleLowerCase(locale).includes(query);
@@ -2125,6 +2193,8 @@ var booleanLabel = (value, options) => value ? options?.trueLabel : options?.fal
2125
2193
  var getDataTableExportValue = (row, column, locale = "en") => {
2126
2194
  const value = row.values.get(column.id);
2127
2195
  const colDef = column.colDef;
2196
+ if (colDef.type === "text" && colDef.display === "badge")
2197
+ return tableBadgeValue(value);
2128
2198
  if (colDef.type === "number") {
2129
2199
  const number = Option4.getOrUndefined(decodeNumberValue(value));
2130
2200
  if (number === undefined)
@@ -2153,7 +2223,9 @@ var filterDataTableRows = (rows, columns, globalFilter, locale = "en") => {
2153
2223
  const value = row.values.get(column.id);
2154
2224
  const colDef = column.colDef;
2155
2225
  let text = dataTableValueText(value);
2156
- if (colDef.type === "date" || colDef.type === "dateTime") {
2226
+ if (colDef.type === "text" && colDef.display === "badge") {
2227
+ text = tableBadgeSearchText(value, colDef.typeOptions);
2228
+ } else if (colDef.type === "date" || colDef.type === "dateTime") {
2157
2229
  const date = resolveDate(value, colDef.type);
2158
2230
  text = date ? `${formatDateValue(date, colDef, locale)} ${dateIsoValue(date)}` : "";
2159
2231
  } else if (colDef.type === "number") {
@@ -2169,11 +2241,14 @@ var filterDataTableRows = (rows, columns, globalFilter, locale = "en") => {
2169
2241
  var getDataTableFilterColumns = (columns) => columns.flatMap((column) => column.colDef.filterable === false ? [] : ((column.colDef.fields?.length) ? getDataTableFieldColumns(column) : [column]).filter(({ colDef }) => colDef.filterable !== false));
2170
2242
  var getDataTableFilterKind = ({
2171
2243
  colDef
2172
- }) => tableFilterKind(colDef, !!colDef.filterOptions);
2244
+ }) => tableFilterKind(colDef.type === "text" ? colDef : { type: colDef.type }, !!colDef.filterOptions);
2173
2245
  var getDataTableFilterOptions = (rows, column) => {
2174
2246
  const { colDef } = column;
2175
2247
  if (colDef.filterOptions)
2176
2248
  return colDef.filterOptions;
2249
+ if (colDef.type === "text" && colDef.display === "badge") {
2250
+ return tableBadgeFilterOptions(rows.map((row) => row.values.get(column.id)), colDef.typeOptions);
2251
+ }
2177
2252
  const options = new Map;
2178
2253
  if (colDef.type === "list") {
2179
2254
  for (const row of rows) {
@@ -2198,7 +2273,15 @@ var filterDataTableColumnRows = (rows, columns, filters) => {
2198
2273
  colDef: column.colDef
2199
2274
  }) : row.values.get(column.id);
2200
2275
  const { colDef } = column;
2201
- return matchesTableFilter(filter, value, colDef.type, () => dataTableValueText(value), () => colDef.type === "list" ? colDef.typeOptions.getItems(row.data).map((item) => item.value ?? item.label) : [dataTableValueText(value)]);
2276
+ return matchesTableFilter(filter, value, colDef.type, () => dataTableValueText(value), () => {
2277
+ if (colDef.type === "list")
2278
+ return colDef.typeOptions.getItems(row.data).map((item) => item.value ?? item.label);
2279
+ if (colDef.type === "text" && colDef.display === "badge") {
2280
+ const key = tableBadgeValue(value);
2281
+ return key === null ? [] : [key];
2282
+ }
2283
+ return [dataTableValueText(value)];
2284
+ });
2202
2285
  }));
2203
2286
  };
2204
2287
  var sortDataTableRows = (rows, columns, sorting) => {
@@ -2214,6 +2297,12 @@ var sortDataTableRows = (rows, columns, sorting) => {
2214
2297
  const leftValue = left.row.values.get(sort.id);
2215
2298
  const rightValue = right.row.values.get(sort.id);
2216
2299
  const colDef = column.colDef;
2300
+ if (!colDef.comparator && colDef.type === "text" && colDef.display === "badge") {
2301
+ const comparison = compareTableSortValues(tableBadgeValue(leftValue), tableBadgeValue(rightValue), sort.direction);
2302
+ if (comparison !== 0)
2303
+ return comparison;
2304
+ continue;
2305
+ }
2217
2306
  if (!colDef.comparator && (colDef.type === "number" || colDef.type === "boolean" || colDef.type === "date" || colDef.type === "dateTime")) {
2218
2307
  const comparison = compareTableSortValues(tableSortScalar(colDef.type, leftValue), tableSortScalar(colDef.type, rightValue), sort.direction, colDef.typeOptions?.nulls);
2219
2308
  if (comparison !== 0)
@@ -2370,6 +2459,27 @@ var renderCell = (row, column, locale = "en", labels = dataTableMessages(locale)
2370
2459
  ...params
2371
2460
  });
2372
2461
  const colDef = column.colDef;
2462
+ if (colDef.type === "text" && colDef.display === "badge") {
2463
+ if (colDef.valueFormatter)
2464
+ return colDef.valueFormatter(params);
2465
+ const badge = tableBadge(value, colDef.typeOptions);
2466
+ if (!badge)
2467
+ return colDef.typeOptions?.emptyLabel ?? "—";
2468
+ const { variant, label, option } = badge;
2469
+ const tone = variant === "success" || variant === "info" || variant === "muted" ? tableBadgeTones[variant] : undefined;
2470
+ return /* @__PURE__ */ jsxs3(Badge, {
2471
+ variant: variant === "success" || variant === "info" || variant === "muted" ? "outline" : variant,
2472
+ className: tone,
2473
+ children: [
2474
+ option?.icon && /* @__PURE__ */ jsx3("span", {
2475
+ "aria-hidden": "true",
2476
+ className: "inline-flex shrink-0 [&_svg]:size-3",
2477
+ children: option.icon
2478
+ }),
2479
+ label
2480
+ ]
2481
+ });
2482
+ }
2373
2483
  if (colDef.type === "reference") {
2374
2484
  if (colDef.valueFormatter)
2375
2485
  return colDef.valueFormatter(params);
@@ -2397,7 +2507,7 @@ var renderCell = (row, column, locale = "en", labels = dataTableMessages(locale)
2397
2507
  const options = colDef.typeOptions;
2398
2508
  return /* @__PURE__ */ jsx3("label", {
2399
2509
  "data-slot": "data-table-boolean-cell",
2400
- className: cn("focus-within:border-ring focus-within:ring-ring/50 flex min-h-16 w-full items-center justify-start border border-transparent px-2 outline-none focus-within:ring-3 focus-within:ring-inset in-[[data-slot=table-cell]]:absolute in-[[data-slot=table-cell]]:inset-0 in-[[data-slot=table-cell]]:min-h-0", options?.onChange && !options.disabled?.(row.data) && "hover:bg-muted/50 cursor-pointer"),
2510
+ className: cn(booleanCellControl, options?.onChange && !options.disabled?.(row.data) && "hover:bg-muted/50 cursor-pointer"),
2401
2511
  onClick: (event) => event.stopPropagation(),
2402
2512
  onPointerDown: (event) => event.stopPropagation(),
2403
2513
  children: /* @__PURE__ */ jsx3(Checkbox, {
@@ -4069,7 +4179,9 @@ var GalleryTag = ({
4069
4179
  if ((value == null || value === "") && !column.colDef.cellRenderer)
4070
4180
  return null;
4071
4181
  const content = renderCell(row, column, locale, labels);
4072
- return column.colDef.cellRenderer || column.colDef.valueFormatter ? /* @__PURE__ */ jsxs3("div", {
4182
+ const { colDef } = column;
4183
+ const displaysBadges = colDef.type === "text" && colDef.display === "badge" || colDef.type === "list" && colDef.typeOptions.display === "badge";
4184
+ return colDef.cellRenderer || colDef.valueFormatter || displaysBadges ? /* @__PURE__ */ jsxs3("div", {
4073
4185
  className: "flex min-w-0 items-center gap-1",
4074
4186
  children: [
4075
4187
  icon,
@@ -4278,7 +4390,7 @@ var DataTableGallery = ({
4278
4390
  children: renderSections(sections)
4279
4391
  });
4280
4392
  };
4281
- var DataTablePagination = ({
4393
+ var DataTableFooter = ({
4282
4394
  table
4283
4395
  }) => {
4284
4396
  const styles = useContext(DataTableStylesContext);
@@ -4292,8 +4404,13 @@ var DataTablePagination = ({
4292
4404
  send(DataTableMessage.PageRequested({ page }));
4293
4405
  }
4294
4406
  }, [page, pageIndex, pagination, paginationVisible, send]);
4295
- if (!paginationVisible || !pagination)
4296
- return null;
4407
+ if (!paginationVisible || !pagination) {
4408
+ return /* @__PURE__ */ jsx3("div", {
4409
+ className: tableResultsFooterClass,
4410
+ role: "status",
4411
+ children: store.config.labels.results(model.totalRows)
4412
+ });
4413
+ }
4297
4414
  const selected = model.rows.filter((row) => store.state.rowSelection[row.id]).length;
4298
4415
  return /* @__PURE__ */ jsx3("div", {
4299
4416
  "data-table-slot": "pagination",
@@ -4490,7 +4607,7 @@ var HydratedDataTable = (props) => {
4490
4607
  /* @__PURE__ */ jsx3(DataTableContent, {
4491
4608
  table
4492
4609
  }),
4493
- /* @__PURE__ */ jsx3(DataTablePagination, {
4610
+ /* @__PURE__ */ jsx3(DataTableFooter, {
4494
4611
  table
4495
4612
  })
4496
4613
  ]
@@ -4786,7 +4903,7 @@ var EditableDataTableListCell = ({
4786
4903
  } : undefined,
4787
4904
  trigger: /* @__PURE__ */ jsxs3(Button2, {
4788
4905
  "aria-label": manageLabel,
4789
- className: "h-full w-full min-w-0 justify-between rounded-none px-2 focus-visible:ring-inset",
4906
+ className: tableClasses.relationshipTrigger,
4790
4907
  variant: "ghost",
4791
4908
  children: [
4792
4909
  /* @__PURE__ */ jsx3(DataTableListSummaryContent, {
@@ -5027,6 +5144,32 @@ var DataTableListSummaryContent = ({
5027
5144
  })
5028
5145
  });
5029
5146
  }
5147
+ if (display === "badge") {
5148
+ return /* @__PURE__ */ jsxs3("span", {
5149
+ className: "inline-flex min-w-0 flex-wrap items-center gap-1",
5150
+ children: [
5151
+ visible.map((item, index) => /* @__PURE__ */ jsx3(Badge, {
5152
+ variant: "secondary",
5153
+ children: item.label
5154
+ }, item.value ?? `${item.label}-${index}`)),
5155
+ remaining ? /* @__PURE__ */ jsxs3(Badge, {
5156
+ variant: "secondary",
5157
+ children: [
5158
+ "+",
5159
+ remaining
5160
+ ]
5161
+ }) : null,
5162
+ remaining && showMenu ? /* @__PURE__ */ jsx3(DataTableListMenu, {
5163
+ actions: [],
5164
+ display,
5165
+ force: true,
5166
+ items: normalized,
5167
+ locale,
5168
+ messages
5169
+ }) : null
5170
+ ]
5171
+ });
5172
+ }
5030
5173
  return /* @__PURE__ */ jsxs3("span", {
5031
5174
  className: "inline-flex min-w-0 items-center gap-2 text-sm",
5032
5175
  children: [