@krak-stack/registry 0.11.4 → 0.11.6

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 (175) hide show
  1. package/CHANGELOG.md +23 -1
  2. package/README.md +23 -9
  3. package/dist/components/agent/react.js +226 -1072
  4. package/dist/components/app-switcher/html.js +10 -53
  5. package/dist/components/app-switcher/react.js +29 -139
  6. package/dist/components/async-action-button/html.js +3 -34
  7. package/dist/components/async-action-button/react.d.ts +1 -1
  8. package/dist/components/async-action-button/react.js +8 -54
  9. package/dist/components/audit-log-table/react.js +706 -1279
  10. package/dist/components/bulk-list-input/html.js +3 -40
  11. package/dist/components/bulk-list-input/react.d.ts +1 -1
  12. package/dist/components/bulk-list-input/react.js +6 -59
  13. package/dist/components/code-block/html.js +1 -35
  14. package/dist/components/code-block/react.js +12 -59
  15. package/dist/components/color-input/html.js +2 -19
  16. package/dist/components/color-input/react.js +6 -97
  17. package/dist/components/copy-button/html.js +1 -35
  18. package/dist/components/copy-button/react.d.ts +1 -1
  19. package/dist/components/copy-button/react.js +7 -54
  20. package/dist/components/copy-value/html.js +11 -52
  21. package/dist/components/copy-value/react.js +25 -165
  22. package/dist/components/cron-input/html.js +2 -18
  23. package/dist/components/cron-input/react.js +15 -30
  24. package/dist/components/danger-confirmation/html.js +11 -57
  25. package/dist/components/danger-confirmation/react.js +26 -187
  26. package/dist/components/data-table/classes.d.ts +9 -3
  27. package/dist/components/data-table/html.d.ts +93 -21
  28. package/dist/components/data-table/html.js +309 -196
  29. package/dist/components/data-table/index.d.ts +97 -9
  30. package/dist/components/data-table/react.d.ts +14 -3
  31. package/dist/components/data-table/react.js +700 -1273
  32. package/dist/components/data-table/schema.d.ts +175 -16
  33. package/dist/components/date-input/html.js +19 -74
  34. package/dist/components/date-input/react.d.ts +1 -1
  35. package/dist/components/date-input/react.js +28 -313
  36. package/dist/components/docs/classes.d.ts +15 -0
  37. package/dist/components/docs/html.d.ts +55 -0
  38. package/dist/components/docs/html.js +837 -0
  39. package/dist/components/docs/index.d.ts +49 -0
  40. package/dist/components/docs/react.d.ts +10 -0
  41. package/dist/components/docs/react.js +949 -0
  42. package/dist/components/docs/schema.d.ts +49 -0
  43. package/dist/components/editable-text/html.js +6 -52
  44. package/dist/components/editable-text/react.js +13 -83
  45. package/dist/components/editing-locale-switcher/html.d.ts +2 -2
  46. package/dist/components/editing-locale-switcher/html.js +13 -43
  47. package/dist/components/editing-locale-switcher/react.js +17 -141
  48. package/dist/components/effect-form/react.js +249 -812
  49. package/dist/components/email-composer/react.js +62 -279
  50. package/dist/components/email-editor/html.js +13 -58
  51. package/dist/components/email-editor/react.js +187 -483
  52. package/dist/components/error-component/html.js +2 -47
  53. package/dist/components/error-component/react.js +33 -137
  54. package/dist/components/file-input/html.js +9 -40
  55. package/dist/components/file-input/react.js +39 -208
  56. package/dist/components/form/react.js +212 -777
  57. package/dist/components/icon-input/html.js +9 -56
  58. package/dist/components/icon-input/react.js +43 -143
  59. package/dist/components/image-crop-editor/html.js +1 -35
  60. package/dist/components/image-crop-editor/react.js +21 -66
  61. package/dist/components/locale-switcher/html.js +8 -55
  62. package/dist/components/locale-switcher/react.js +21 -146
  63. package/dist/components/map-menu/html.d.ts +8 -8
  64. package/dist/components/map-menu/html.js +13 -72
  65. package/dist/components/map-menu/react.js +92 -309
  66. package/dist/components/markdown/html.js +1 -35
  67. package/dist/components/markdown/react.js +20 -64
  68. package/dist/components/notification-menu/html.js +14 -50
  69. package/dist/components/notification-menu/react.js +73 -343
  70. package/dist/components/pagination/html.js +17 -73
  71. package/dist/components/pagination/react.js +37 -200
  72. package/dist/components/phone-number-input/html.js +19 -57
  73. package/dist/components/phone-number-input/react.d.ts +1 -1
  74. package/dist/components/phone-number-input/react.js +43 -142
  75. package/dist/components/presence-transition/index.d.ts +2 -2
  76. package/dist/components/registry-previews/component-example.js +26 -126
  77. package/dist/components/rich-text-editor/html.d.ts +12 -12
  78. package/dist/components/rich-text-editor/html.js +12 -85
  79. package/dist/components/rich-text-editor/react.js +55 -272
  80. package/dist/components/search-menu/classes.d.ts +2 -0
  81. package/dist/components/search-menu/html.d.ts +2 -0
  82. package/dist/components/search-menu/html.js +40 -73
  83. package/dist/components/search-menu/index.d.ts +27 -2
  84. package/dist/components/search-menu/react.d.ts +1 -1
  85. package/dist/components/search-menu/react.js +59 -280
  86. package/dist/components/search-menu/schema.d.ts +1 -0
  87. package/dist/components/select-with-custom-input/html.d.ts +2 -2
  88. package/dist/components/select-with-custom-input/html.js +13 -48
  89. package/dist/components/select-with-custom-input/react.js +22 -146
  90. package/dist/components/sidebar-layout/html.d.ts +16 -6
  91. package/dist/components/sidebar-layout/html.js +83 -69
  92. package/dist/components/sidebar-layout/index.d.ts +16 -0
  93. package/dist/components/sidebar-layout/react.js +105 -698
  94. package/dist/components/stats-card/react.js +13 -58
  95. package/dist/components/support/html.js +14 -69
  96. package/dist/components/support/react.js +74 -320
  97. package/dist/components/theme-switcher/html.js +11 -55
  98. package/dist/components/theme-switcher/react.js +28 -152
  99. package/dist/components/time-input/html.d.ts +2 -2
  100. package/dist/components/time-input/html.js +8 -53
  101. package/dist/components/time-input/react.js +34 -188
  102. package/dist/components/timezone-input/html.js +11 -67
  103. package/dist/components/timezone-input/react.js +41 -143
  104. package/dist/components/toast/html.d.ts +6 -6
  105. package/dist/components/toast/html.js +13 -46
  106. package/dist/components/tracking-notice/react.js +39 -188
  107. package/dist/components/unsaved-changes-guard/html.js +9 -43
  108. package/dist/components/unsaved-changes-guard/react.js +19 -169
  109. package/dist/components/upload-attachment/html.d.ts +4 -4
  110. package/dist/components/upload-attachment/html.js +4 -35
  111. package/dist/components/upload-attachment/react.js +25 -164
  112. package/dist/components/virtualized-combobox/html.js +10 -35
  113. package/dist/components/virtualized-combobox/react.js +28 -129
  114. package/dist/components/webhook-delivery-table/html.js +320 -206
  115. package/dist/components/webhook-delivery-table/react.js +736 -1376
  116. package/dist/lib/docs.integrations.server.js +150 -202
  117. package/dist/lib/docs.js +305 -1085
  118. package/dist/lib/docs.server.js +134 -186
  119. package/dist/lib/documentation-toolkit.js +144 -196
  120. package/dist/services/agent/client/index.js +226 -1072
  121. package/dist/services/notification/client/index.js +73 -343
  122. package/dist/services/notification/public.js +73 -343
  123. package/package.json +5 -13
  124. package/dist/components/effectcn/alert-dialog.d.ts +0 -13
  125. package/dist/components/effectcn/button.d.ts +0 -31
  126. package/dist/components/effectcn/calendar.d.ts +0 -12
  127. package/dist/components/effectcn/checkbox.d.ts +0 -10
  128. package/dist/components/effectcn/combobox.d.ts +0 -25
  129. package/dist/components/effectcn/dialog.d.ts +0 -19
  130. package/dist/components/effectcn/field.d.ts +0 -11
  131. package/dist/components/effectcn/file-drop.d.ts +0 -8
  132. package/dist/components/effectcn/input.d.ts +0 -26
  133. package/dist/components/effectcn/menu.d.ts +0 -85
  134. package/dist/components/effectcn/menubar.d.ts +0 -8
  135. package/dist/components/effectcn/popover.d.ts +0 -18
  136. package/dist/components/effectcn/scroll-area.d.ts +0 -12
  137. package/dist/components/effectcn/select.d.ts +0 -68
  138. package/dist/components/effectcn/toast.d.ts +0 -29
  139. package/dist/components/ui/alert-dialog.d.ts +0 -18
  140. package/dist/components/ui/alert.d.ts +0 -10
  141. package/dist/components/ui/attachment.d.ts +0 -23
  142. package/dist/components/ui/badge.d.ts +0 -7
  143. package/dist/components/ui/bubble.d.ts +0 -16
  144. package/dist/components/ui/button.d.ts +0 -8
  145. package/dist/components/ui/calendar.d.ts +0 -10
  146. package/dist/components/ui/card.d.ts +0 -11
  147. package/dist/components/ui/checkbox.d.ts +0 -3
  148. package/dist/components/ui/collapsible.d.ts +0 -5
  149. package/dist/components/ui/command.d.ts +0 -18
  150. package/dist/components/ui/dialog.d.ts +0 -17
  151. package/dist/components/ui/dropdown-menu.d.ts +0 -29
  152. package/dist/components/ui/empty.d.ts +0 -11
  153. package/dist/components/ui/field.d.ts +0 -24
  154. package/dist/components/ui/input-group.d.ts +0 -17
  155. package/dist/components/ui/input.d.ts +0 -3
  156. package/dist/components/ui/item.d.ts +0 -22
  157. package/dist/components/ui/label.d.ts +0 -3
  158. package/dist/components/ui/menubar.d.ts +0 -29
  159. package/dist/components/ui/message-scroller.d.ts +0 -10
  160. package/dist/components/ui/message.d.ts +0 -10
  161. package/dist/components/ui/popover.d.ts +0 -9
  162. package/dist/components/ui/scroll-area.d.ts +0 -4
  163. package/dist/components/ui/select.d.ts +0 -15
  164. package/dist/components/ui/select.js +0 -159
  165. package/dist/components/ui/separator.d.ts +0 -3
  166. package/dist/components/ui/sheet.d.ts +0 -14
  167. package/dist/components/ui/sidebar.d.ts +0 -63
  168. package/dist/components/ui/skeleton.d.ts +0 -2
  169. package/dist/components/ui/table.d.ts +0 -10
  170. package/dist/components/ui/tabs.d.ts +0 -10
  171. package/dist/components/ui/textarea.d.ts +0 -3
  172. package/dist/components/ui/tooltip.d.ts +0 -6
  173. package/dist/components/ui/trace.d.ts +0 -18
  174. package/dist/lib/effectcn-form.d.ts +0 -3
  175. package/dist/lib/effectcn-form.js +0 -54
@@ -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>;
@@ -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>;