@panneau/lists 5.0.0-alpha.0 → 5.0.0-alpha.10

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 (120) hide show
  1. package/README.md +7 -3
  2. package/dist/ItemDetails.css +34 -0
  3. package/dist/ItemDetails.d.ts +18 -0
  4. package/dist/ItemDetails.d.ts.map +1 -0
  5. package/dist/ItemDetails.js +104 -0
  6. package/dist/ItemDetails.js.map +1 -0
  7. package/dist/ItemDetails.module.js +16 -0
  8. package/dist/ItemDetails.module.js.map +1 -0
  9. package/dist/List.d.ts +2 -2
  10. package/dist/List.js +54 -12
  11. package/dist/List.js.map +1 -1
  12. package/dist/ListSkeleton.d.ts +17 -0
  13. package/dist/ListSkeleton.d.ts.map +1 -0
  14. package/dist/ListSkeleton.js +111 -0
  15. package/dist/ListSkeleton.js.map +1 -0
  16. package/dist/ListView.css +16 -16
  17. package/dist/ListView.d.ts +40 -5
  18. package/dist/ListView.d.ts.map +1 -1
  19. package/dist/ListView.js +547 -211
  20. package/dist/ListView.js.map +1 -1
  21. package/dist/ListView.module.js +10 -10
  22. package/dist/actions/ActionButton.d.ts +4 -1
  23. package/dist/actions/ActionButton.d.ts.map +1 -1
  24. package/dist/actions/ActionButton.js +91 -23
  25. package/dist/actions/ActionButton.js.map +1 -1
  26. package/dist/actions/Actions.css +9 -9
  27. package/dist/actions/Actions.module.js +6 -6
  28. package/dist/actions/ConfirmDialog.d.ts +15 -3
  29. package/dist/actions/ConfirmDialog.d.ts.map +1 -1
  30. package/dist/actions/ConfirmDialog.js +103 -89
  31. package/dist/actions/ConfirmDialog.js.map +1 -1
  32. package/dist/actions/RowActions.d.ts +8 -6
  33. package/dist/actions/RowActions.d.ts.map +1 -1
  34. package/dist/actions/RowActions.js +40 -30
  35. package/dist/actions/RowActions.js.map +1 -1
  36. package/dist/actions/actions.d.ts +5 -4
  37. package/dist/actions/actions.d.ts.map +1 -1
  38. package/dist/actions/actions.js +7 -14
  39. package/dist/actions/actions.js.map +1 -1
  40. package/dist/actions/icons.d.ts +8 -3
  41. package/dist/actions/icons.d.ts.map +1 -1
  42. package/dist/actions/icons.js +11 -7
  43. package/dist/actions/icons.js.map +1 -1
  44. package/dist/cx.js.map +1 -1
  45. package/dist/displays/Displays.css +25 -13
  46. package/dist/displays/Displays.module.js +18 -14
  47. package/dist/displays/Displays.module.js.map +1 -1
  48. package/dist/displays/displays.d.ts +18 -3
  49. package/dist/displays/displays.d.ts.map +1 -1
  50. package/dist/displays/displays.js +355 -12
  51. package/dist/displays/displays.js.map +1 -1
  52. package/dist/filters/Filters.css +34 -20
  53. package/dist/filters/Filters.d.ts +1 -1
  54. package/dist/filters/Filters.js.map +1 -1
  55. package/dist/filters/Filters.module.js +13 -9
  56. package/dist/filters/Filters.module.js.map +1 -1
  57. package/dist/filters/controls.d.ts +3 -3
  58. package/dist/filters/controls.d.ts.map +1 -1
  59. package/dist/filters/controls.js +171 -123
  60. package/dist/filters/controls.js.map +1 -1
  61. package/dist/filters/format.d.ts +1 -1
  62. package/dist/filters/format.d.ts.map +1 -1
  63. package/dist/filters/format.js +4 -1
  64. package/dist/filters/format.js.map +1 -1
  65. package/dist/index.d.ts +19 -17
  66. package/dist/index.d.ts.map +1 -1
  67. package/dist/index.js +5 -3
  68. package/dist/layouts/CardsLayout.css +22 -11
  69. package/dist/layouts/CardsLayout.d.ts +2 -2
  70. package/dist/layouts/CardsLayout.d.ts.map +1 -1
  71. package/dist/layouts/CardsLayout.js +39 -35
  72. package/dist/layouts/CardsLayout.js.map +1 -1
  73. package/dist/layouts/CardsLayout.module.js +8 -8
  74. package/dist/layouts/CardsLayout.module.js.map +1 -1
  75. package/dist/layouts/ItemTitle.d.ts +4 -2
  76. package/dist/layouts/ItemTitle.d.ts.map +1 -1
  77. package/dist/layouts/ItemTitle.js +12 -8
  78. package/dist/layouts/ItemTitle.js.map +1 -1
  79. package/dist/layouts/TableLayout.css +51 -35
  80. package/dist/layouts/TableLayout.d.ts +2 -2
  81. package/dist/layouts/TableLayout.d.ts.map +1 -1
  82. package/dist/layouts/TableLayout.js +38 -33
  83. package/dist/layouts/TableLayout.js.map +1 -1
  84. package/dist/layouts/TableLayout.module.js +14 -14
  85. package/dist/layouts/TableLayout.module.js.map +1 -1
  86. package/dist/layouts/builtIn.d.ts +1 -1
  87. package/dist/layouts/builtIn.js.map +1 -1
  88. package/dist/layouts/link.css +3 -3
  89. package/dist/layouts/link.module.js +1 -1
  90. package/dist/plugin.d.ts +1 -1
  91. package/dist/plugin.js.map +1 -1
  92. package/dist/query.d.ts +3 -3
  93. package/dist/query.d.ts.map +1 -1
  94. package/dist/query.js +7 -2
  95. package/dist/query.js.map +1 -1
  96. package/dist/selection.d.ts +1 -1
  97. package/dist/selection.js.map +1 -1
  98. package/dist/toolbar/LayoutSwitch.js.map +1 -1
  99. package/dist/toolbar/Pagination.d.ts +33 -0
  100. package/dist/toolbar/Pagination.d.ts.map +1 -1
  101. package/dist/toolbar/Pagination.js +282 -42
  102. package/dist/toolbar/Pagination.js.map +1 -1
  103. package/dist/toolbar/SearchField.js.map +1 -1
  104. package/dist/toolbar/SortSelect.d.ts +1 -1
  105. package/dist/toolbar/SortSelect.js.map +1 -1
  106. package/dist/toolbar/Toolbar.css +12 -12
  107. package/dist/toolbar/Toolbar.module.js +7 -7
  108. package/dist/types.d.ts +18 -2
  109. package/dist/types.d.ts.map +1 -1
  110. package/dist/useDraft.js.map +1 -1
  111. package/dist/useListState.js.map +1 -1
  112. package/dist/useRenderValue.d.ts +8 -0
  113. package/dist/useRenderValue.d.ts.map +1 -0
  114. package/dist/useRenderValue.js +64 -0
  115. package/dist/useRenderValue.js.map +1 -0
  116. package/dist/values.d.ts +3 -1
  117. package/dist/values.d.ts.map +1 -1
  118. package/dist/values.js +6 -2
  119. package/dist/values.js.map +1 -1
  120. package/package.json +9 -9
@@ -1,4 +1,4 @@
1
- .panneau-cards-Z7Eoyl {
1
+ .panneau-cards-layout-cards {
2
2
  display: grid;
3
3
  grid-template-columns: repeat(auto-fill, minmax(min(16rem, 100%), 1fr));
4
4
  gap: var(--panneau-space-3);
@@ -7,7 +7,7 @@
7
7
  list-style: none;
8
8
  }
9
9
 
10
- .panneau-card-3yuJKc {
10
+ .panneau-cards-layout-card {
11
11
  display: flex;
12
12
  flex-direction: column;
13
13
  gap: var(--panneau-space-2);
@@ -17,18 +17,23 @@
17
17
  border-radius: var(--panneau-radius-lg);
18
18
  }
19
19
 
20
- .panneau-card-3yuJKc[data-selected] {
20
+ .panneau-cards-layout-card[data-current] {
21
+ border-color: var(--panneau-color-accent);
22
+ box-shadow: inset 0 0 0 1px var(--panneau-color-accent);
23
+ }
24
+
25
+ .panneau-cards-layout-card[data-selected] {
21
26
  background-color: var(--panneau-color-accent-subtle);
22
27
  border-color: var(--panneau-color-border-control);
23
28
  }
24
29
 
25
- .panneau-header-8nkYnu {
30
+ .panneau-cards-layout-header {
26
31
  display: flex;
27
32
  align-items: flex-start;
28
33
  gap: var(--panneau-space-2);
29
34
  }
30
35
 
31
- .panneau-title-D4GR87 {
36
+ .panneau-cards-layout-title {
32
37
  flex: 1;
33
38
  min-width: 0;
34
39
  margin: 0;
@@ -37,29 +42,35 @@
37
42
  line-height: var(--panneau-line-height-tight);
38
43
  }
39
44
 
40
- .panneau-values-JmHWF4 {
45
+ .panneau-cards-layout-values {
41
46
  display: grid;
42
47
  gap: var(--panneau-space-1);
43
48
  margin: 0;
44
49
  font-size: var(--panneau-font-size-md);
45
50
  }
46
51
 
47
- .panneau-value--4Hmov {
52
+ .panneau-cards-layout-values dt,
53
+ .panneau-cards-layout-values dd {
54
+ margin: 0;
55
+ font-weight: inherit;
56
+ }
57
+
58
+ .panneau-cards-layout-value {
48
59
  display: grid;
49
60
  grid-template-columns: minmax(5rem, 40%) 1fr;
50
61
  gap: var(--panneau-space-2);
51
62
  }
52
63
 
53
- .panneau-value--4Hmov dt {
64
+ .panneau-cards-layout-value dt {
54
65
  color: var(--panneau-color-text-muted);
55
66
  }
56
67
 
57
- .panneau-value--4Hmov dd {
68
+ .panneau-cards-layout-value dd {
58
69
  margin: 0;
59
70
  min-width: 0;
60
71
  }
61
72
 
62
- .panneau-actions-gw5-oU {
73
+ .panneau-cards-layout-actions {
63
74
  display: flex;
64
75
  flex-wrap: wrap;
65
76
  gap: var(--panneau-space-1);
@@ -67,6 +78,6 @@
67
78
  padding-top: var(--panneau-space-1);
68
79
  }
69
80
 
70
- .panneau-pageSelection-r1GtpS {
81
+ .panneau-cards-layout-page-selection {
71
82
  margin-bottom: var(--panneau-space-2);
72
83
  }
@@ -1,4 +1,4 @@
1
- import type { ListLayoutProps } from '../types';
1
+ import type { ListLayoutProps } from '../types.js';
2
2
  /** Items as cards: the first column is the title, the others are listed under it. */
3
- export declare function CardsLayout({ items, columns, renderValue, getItemLabel, getItemHref, selectable, isSelected, onToggle, renderActions, label, pageSelection, }: ListLayoutProps): import("react").JSX.Element;
3
+ export declare function CardsLayout({ items, columns, renderValue, getItemLabel, getItemHref, isCurrent, selectable, isSelected, onToggle, renderActions, label, pageSelection, }: ListLayoutProps): import("react").JSX.Element;
4
4
  //# sourceMappingURL=CardsLayout.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CardsLayout.d.ts","sourceRoot":"","sources":["../../src/layouts/CardsLayout.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAIhD,qFAAqF;AACrF,wBAAgB,WAAW,CAAC,EACxB,KAAK,EACL,OAAO,EACP,WAAW,EACX,YAAY,EACZ,WAAW,EACX,UAAU,EACV,UAAU,EACV,QAAQ,EACR,aAAa,EACb,KAAK,EACL,aAAa,GAChB,EAAE,eAAe,+BAqDjB"}
1
+ {"version":3,"file":"CardsLayout.d.ts","sourceRoot":"","sources":["../../src/layouts/CardsLayout.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAIhD,qFAAqF;AACrF,wBAAgB,WAAW,CAAC,EACxB,KAAK,EACL,OAAO,EACP,WAAW,EACX,YAAY,EACZ,WAAW,EACX,SAAS,EACT,UAAU,EACV,UAAU,EACV,QAAQ,EACR,aAAa,EACb,KAAK,EACL,aAAa,GAChB,EAAE,eAAe,+BAuDjB"}
@@ -7,32 +7,34 @@ import { jsx, jsxs } from "react/jsx-runtime";
7
7
  //#region src/layouts/CardsLayout.tsx
8
8
  /** Items as cards: the first column is the title, the others are listed under it. */
9
9
  function CardsLayout(t0) {
10
- const $ = c(26);
11
- const { items, columns, renderValue, getItemLabel, getItemHref, selectable, isSelected, onToggle, renderActions, label, pageSelection } = t0;
10
+ const $ = c(27);
11
+ const { items, columns, renderValue, getItemLabel, getItemHref, isCurrent, selectable, isSelected, onToggle, renderActions, label, pageSelection } = t0;
12
12
  const intl = usePanneauIntl();
13
13
  let t1;
14
14
  let t2;
15
15
  let t3;
16
16
  let t4;
17
- if ($[0] !== columns || $[1] !== getItemHref || $[2] !== getItemLabel || $[3] !== intl || $[4] !== isSelected || $[5] !== items || $[6] !== label || $[7] !== onToggle || $[8] !== pageSelection || $[9] !== renderActions || $[10] !== renderValue || $[11] !== selectable) {
17
+ if ($[0] !== columns || $[1] !== getItemHref || $[2] !== getItemLabel || $[3] !== intl || $[4] !== isCurrent || $[5] !== isSelected || $[6] !== items || $[7] !== label || $[8] !== onToggle || $[9] !== pageSelection || $[10] !== renderActions || $[11] !== renderValue || $[12] !== selectable) {
18
18
  const [title, ...others] = columns;
19
- if ($[16] !== pageSelection || $[17] !== selectable) {
19
+ if ($[17] !== pageSelection || $[18] !== selectable) {
20
20
  t4 = selectable ? /* @__PURE__ */ jsx("div", {
21
21
  className: CardsLayout_module_default.pageSelection,
22
22
  children: pageSelection
23
23
  }) : null;
24
- $[16] = pageSelection;
25
- $[17] = selectable;
26
- $[18] = t4;
27
- } else t4 = $[18];
24
+ $[17] = pageSelection;
25
+ $[18] = selectable;
26
+ $[19] = t4;
27
+ } else t4 = $[19];
28
28
  t1 = CardsLayout_module_default.cards;
29
29
  t2 = label;
30
30
  t3 = items.map((item) => {
31
31
  const selected = selectable && isSelected(item);
32
32
  const actions = renderActions(item);
33
+ const current = isCurrent?.(item) ?? false;
33
34
  return /* @__PURE__ */ jsxs("li", {
34
35
  className: CardsLayout_module_default.card,
35
36
  "data-selected": selected || void 0,
37
+ "data-current": current || void 0,
36
38
  children: [
37
39
  /* @__PURE__ */ jsxs("div", {
38
40
  className: CardsLayout_module_default.header,
@@ -40,6 +42,7 @@ function CardsLayout(t0) {
40
42
  className: CardsLayout_module_default.title,
41
43
  children: /* @__PURE__ */ jsx(ItemTitle, {
42
44
  href: getItemHref?.(item) ?? null,
45
+ current,
43
46
  children: title !== void 0 ? renderValue(item, title) : getItemLabel(item)
44
47
  })
45
48
  }), selectable ? /* @__PURE__ */ jsx(Checkbox, {
@@ -66,43 +69,44 @@ function CardsLayout(t0) {
66
69
  $[1] = getItemHref;
67
70
  $[2] = getItemLabel;
68
71
  $[3] = intl;
69
- $[4] = isSelected;
70
- $[5] = items;
71
- $[6] = label;
72
- $[7] = onToggle;
73
- $[8] = pageSelection;
74
- $[9] = renderActions;
75
- $[10] = renderValue;
76
- $[11] = selectable;
77
- $[12] = t1;
78
- $[13] = t2;
79
- $[14] = t3;
80
- $[15] = t4;
72
+ $[4] = isCurrent;
73
+ $[5] = isSelected;
74
+ $[6] = items;
75
+ $[7] = label;
76
+ $[8] = onToggle;
77
+ $[9] = pageSelection;
78
+ $[10] = renderActions;
79
+ $[11] = renderValue;
80
+ $[12] = selectable;
81
+ $[13] = t1;
82
+ $[14] = t2;
83
+ $[15] = t3;
84
+ $[16] = t4;
81
85
  } else {
82
- t1 = $[12];
83
- t2 = $[13];
84
- t3 = $[14];
85
- t4 = $[15];
86
+ t1 = $[13];
87
+ t2 = $[14];
88
+ t3 = $[15];
89
+ t4 = $[16];
86
90
  }
87
91
  let t5;
88
- if ($[19] !== t1 || $[20] !== t2 || $[21] !== t3) {
92
+ if ($[20] !== t1 || $[21] !== t2 || $[22] !== t3) {
89
93
  t5 = /* @__PURE__ */ jsx("ul", {
90
94
  className: t1,
91
95
  "aria-label": t2,
92
96
  children: t3
93
97
  });
94
- $[19] = t1;
95
- $[20] = t2;
96
- $[21] = t3;
97
- $[22] = t5;
98
- } else t5 = $[22];
98
+ $[20] = t1;
99
+ $[21] = t2;
100
+ $[22] = t3;
101
+ $[23] = t5;
102
+ } else t5 = $[23];
99
103
  let t6;
100
- if ($[23] !== t4 || $[24] !== t5) {
104
+ if ($[24] !== t4 || $[25] !== t5) {
101
105
  t6 = /* @__PURE__ */ jsxs("div", { children: [t4, t5] });
102
- $[23] = t4;
103
- $[24] = t5;
104
- $[25] = t6;
105
- } else t6 = $[25];
106
+ $[24] = t4;
107
+ $[25] = t5;
108
+ $[26] = t6;
109
+ } else t6 = $[26];
106
110
  return t6;
107
111
  }
108
112
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"CardsLayout.js","names":["pageSelection","label","selected","actions","_c","styles"],"sources":["../../src/layouts/CardsLayout.tsx"],"sourcesContent":["import { Checkbox, usePanneauIntl } from '@panneau/ui';\n\nimport { messages } from '../messages';\nimport type { ListLayoutProps } from '../types';\nimport styles from './CardsLayout.module.css';\nimport { ItemTitle } from './ItemTitle';\n\n/** Items as cards: the first column is the title, the others are listed under it. */\nexport function CardsLayout({\n items,\n columns,\n renderValue,\n getItemLabel,\n getItemHref,\n selectable,\n isSelected,\n onToggle,\n renderActions,\n label,\n pageSelection,\n}: ListLayoutProps) {\n const intl = usePanneauIntl();\n const [title, ...others] = columns;\n return (\n <div>\n {selectable ? <div className={styles.pageSelection}>{pageSelection}</div> : null}\n <ul className={styles.cards} aria-label={label}>\n {items.map((item) => {\n const selected = selectable && isSelected(item);\n const actions = renderActions(item);\n return (\n <li\n key={item.id}\n className={styles.card}\n data-selected={selected || undefined}\n >\n <div className={styles.header}>\n <div className={styles.title}>\n <ItemTitle href={getItemHref?.(item) ?? null}>\n {title !== undefined\n ? renderValue(item, title)\n : getItemLabel(item)}\n </ItemTitle>\n </div>\n {selectable ? (\n <Checkbox\n aria-label={intl.formatMessage(messages.selectItem, {\n item: getItemLabel(item),\n })}\n isSelected={selected}\n onChange={() => onToggle(item)}\n />\n ) : null}\n </div>\n {others.length > 0 ? (\n <dl className={styles.values}>\n {others.map((column) => (\n <div key={column.id} className={styles.value}>\n <dt>{column.label ?? column.id}</dt>\n <dd>{renderValue(item, column)}</dd>\n </div>\n ))}\n </dl>\n ) : null}\n {actions !== null ? (\n <div className={styles.actions}>{actions}</div>\n ) : null}\n </li>\n );\n })}\n </ul>\n </div>\n );\n}\n"],"mappings":";;;;;;;;AAQA,SAAO,YAAA,IAAA;CAAA,MAAA,IAAAI,EAAA,EAAA;CAAqB,MAAA,EAAA,OAAA,SAAA,aAAA,cAAA,aAAA,YAAA,YAAA,UAAA,eAAA,OAAA,kBAAA;CAaxB,MAAA,OAAa,eAAe;CAAE,IAAA;CAAA,IAAA;CAAA,IAAA;CAAA,IAAA;CAAA,IAAA,EAAA,OAAA,WAAA,EAAA,OAAA,eAAA,EAAA,OAAA,gBAAA,EAAA,OAAA,QAAA,EAAA,OAAA,cAAA,EAAA,OAAA,SAAA,EAAA,OAAA,SAAA,EAAA,OAAA,YAAA,EAAA,OAAA,iBAAA,EAAA,OAAA,iBAAA,EAAA,QAAA,eAAA,EAAA,QAAA,YAAA;EAC9B,MAAA,CAAA,OAAA,GAAA,UAA2B;EAAQ,IAAA,EAAA,QAAA,iBAAA,EAAA,QAAA,YAAA;GAG1B,KAAA,aAAa,oBAAA,OAAA;IAAgB,WAAAC,2BAAM;IAAiB,UAAA;GAAoB,CAAA,IAAxE;GAA+E,EAAA,MAAA;GAAA,EAAA,MAAA;GAAA,EAAA,MAAA;EAAA,OAAA,KAAA,EAAA;EACjE,KAAAA,2BAAM;EAAoBJ,KAAA;EACpC,KAAA,MAAK,KAAK,SAAA;GACP,MAAA,WAAiB,cAAc,WAAW,IAAI;GAC9C,MAA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,OAAA;EAAA,KAAA,EAAA;EAAA,KAAA,EAAA;EAAA,KAAA,EAAA;EAAA,KAAA,EAAA;CAAA;CAAA,IAAA;CAAA,IAAA,EAAA,QAAA,MAAA,EAAA,QAAA,MAAA,EAAA,QAAA,IAAA;EA3CN,KAAA,oBAAA,MAAA;GAAe,WAAA;GAA0BJ,cAAAA;GACpC,UAAA;EA2CA,CAAA;EAAA,EAAA,MAAA;EAAA,EAAA,MAAA;EAAA,EAAA,MAAA;EAAA,EAAA,MAAA;CAAA,OAAA,KAAA,EAAA;CAAA,IAAA;CAAA,IAAA,EAAA,QAAA,MAAA,EAAA,QAAA,IAAA;EA9CT,KAAA,qBAAA,OAAA,EAAA,UAAA,CACK,IACD,EA6CE,EAAA,CAAA;EAAA,EAAA,MAAA;EAAA,EAAA,MAAA;EAAA,EAAA,MAAA;CAAA,OAAA,KAAA,EAAA;CAAA,OA/CN;AA+CM"}
1
+ {"version":3,"file":"CardsLayout.js","names":["Checkbox","usePanneauIntl","messages","ListLayoutProps","styles","ItemTitle","CardsLayout","t0","$","_c","items","columns","renderValue","getItemLabel","getItemHref","isCurrent","selectable","isSelected","onToggle","renderActions","label","pageSelection","intl","t1","t2","t3","t4","title","others","cards","map","item","selected","actions","current","id","card","undefined","header","formatMessage","selectItem","length","values","column","value","t5","t6","_c","styles"],"sources":["../../src/layouts/CardsLayout.tsx"],"sourcesContent":["import { Checkbox, usePanneauIntl } from '@panneau/ui';\n\nimport { messages } from '../messages';\nimport type { ListLayoutProps } from '../types';\nimport styles from './CardsLayout.module.css';\nimport { ItemTitle } from './ItemTitle';\n\n/** Items as cards: the first column is the title, the others are listed under it. */\nexport function CardsLayout({\n items,\n columns,\n renderValue,\n getItemLabel,\n getItemHref,\n isCurrent,\n selectable,\n isSelected,\n onToggle,\n renderActions,\n label,\n pageSelection,\n}: ListLayoutProps) {\n const intl = usePanneauIntl();\n const [title, ...others] = columns;\n return (\n <div>\n {selectable ? <div className={styles.pageSelection}>{pageSelection}</div> : null}\n <ul className={styles.cards} aria-label={label}>\n {items.map((item) => {\n const selected = selectable && isSelected(item);\n const actions = renderActions(item);\n const current = isCurrent?.(item) ?? false;\n return (\n <li\n key={item.id}\n className={styles.card}\n data-selected={selected || undefined}\n data-current={current || undefined}\n >\n <div className={styles.header}>\n <div className={styles.title}>\n <ItemTitle href={getItemHref?.(item) ?? null} current={current}>\n {title !== undefined\n ? renderValue(item, title)\n : getItemLabel(item)}\n </ItemTitle>\n </div>\n {selectable ? (\n <Checkbox\n aria-label={intl.formatMessage(messages.selectItem, {\n item: getItemLabel(item),\n })}\n isSelected={selected}\n onChange={() => onToggle(item)}\n />\n ) : null}\n </div>\n {others.length > 0 ? (\n <dl className={styles.values}>\n {others.map((column) => (\n <div key={column.id} className={styles.value}>\n <dt>{column.label ?? column.id}</dt>\n <dd>{renderValue(item, column)}</dd>\n </div>\n ))}\n </dl>\n ) : null}\n {actions !== null ? (\n <div className={styles.actions}>{actions}</div>\n ) : null}\n </li>\n );\n })}\n </ul>\n </div>\n );\n}\n"],"mappings":";;;;;;;;AAQA,SAAOM,YAAAC,IAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAqB,MAAA,EAAAC,OAAAC,SAAAC,aAAAC,cAAAC,aAAAC,WAAAC,YAAAC,YAAAC,UAAAC,eAAAC,OAAAC,kBAAAd;CAcxB,MAAAe,OAAarB,eAAe;CAAE,IAAAsB;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAlB,EAAA,OAAAG,WAAAH,EAAA,OAAAM,eAAAN,EAAA,OAAAK,gBAAAL,EAAA,OAAAc,QAAAd,EAAA,OAAAO,aAAAP,EAAA,OAAAS,cAAAT,EAAA,OAAAE,SAAAF,EAAA,OAAAY,SAAAZ,EAAA,OAAAU,YAAAV,EAAA,OAAAa,iBAAAb,EAAA,QAAAW,iBAAAX,EAAA,QAAAI,eAAAJ,EAAA,QAAAQ,YAAA;EAC9B,MAAA,CAAAW,OAAA,GAAAC,UAA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AA,OAAAA,KAAAtC,EAAA;CAAA,OAjDNsC;AAiDM"}
@@ -1,13 +1,13 @@
1
1
  import "./CardsLayout.css";
2
2
  //#region src/layouts/CardsLayout.module.css
3
- var cards = "panneau-cards-Z7Eoyl";
4
- var card = "panneau-card-3yuJKc";
5
- var header = "panneau-header-8nkYnu";
6
- var title = "panneau-title-D4GR87";
7
- var values = "panneau-values-JmHWF4";
8
- var value = "panneau-value--4Hmov";
9
- var actions = "panneau-actions-gw5-oU";
10
- var pageSelection = "panneau-pageSelection-r1GtpS";
3
+ var cards = "panneau-cards-layout-cards";
4
+ var card = "panneau-cards-layout-card";
5
+ var header = "panneau-cards-layout-header";
6
+ var title = "panneau-cards-layout-title";
7
+ var values = "panneau-cards-layout-values";
8
+ var value = "panneau-cards-layout-value";
9
+ var actions = "panneau-cards-layout-actions";
10
+ var pageSelection = "panneau-cards-layout-page-selection";
11
11
  var CardsLayout_module_default = {
12
12
  cards,
13
13
  card,
@@ -1 +1 @@
1
- {"version":3,"file":"CardsLayout.module.js","names":[],"sources":["../../src/layouts/CardsLayout.module.css"],"sourcesContent":[".cards {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(min(16rem, 100%), 1fr));\n gap: var(--panneau-space-3);\n margin: 0;\n padding: 0;\n list-style: none;\n}\n\n.card {\n display: flex;\n flex-direction: column;\n gap: var(--panneau-space-2);\n padding: var(--panneau-space-3);\n background-color: var(--panneau-color-surface);\n border: var(--panneau-border-width) solid var(--panneau-color-border);\n border-radius: var(--panneau-radius-lg);\n}\n\n.card[data-selected] {\n background-color: var(--panneau-color-accent-subtle);\n border-color: var(--panneau-color-border-control);\n}\n\n.header {\n display: flex;\n align-items: flex-start;\n gap: var(--panneau-space-2);\n}\n\n.title {\n flex: 1;\n min-width: 0;\n margin: 0;\n font-size: var(--panneau-font-size-lg);\n font-weight: var(--panneau-font-weight-medium);\n line-height: var(--panneau-line-height-tight);\n}\n\n.values {\n display: grid;\n gap: var(--panneau-space-1);\n margin: 0;\n font-size: var(--panneau-font-size-md);\n}\n\n.value {\n display: grid;\n grid-template-columns: minmax(5rem, 40%) 1fr;\n gap: var(--panneau-space-2);\n}\n\n.value dt {\n color: var(--panneau-color-text-muted);\n}\n\n.value dd {\n margin: 0;\n min-width: 0;\n}\n\n.actions {\n display: flex;\n flex-wrap: wrap;\n gap: var(--panneau-space-1);\n margin-top: auto;\n padding-top: var(--panneau-space-1);\n}\n\n.pageSelection {\n margin-bottom: var(--panneau-space-2);\n}\n"],"mappings":""}
1
+ {"version":3,"file":"CardsLayout.module.js","names":[],"sources":["../../src/layouts/CardsLayout.module.css"],"sourcesContent":[".cards {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(min(16rem, 100%), 1fr));\n gap: var(--panneau-space-3);\n margin: 0;\n padding: 0;\n list-style: none;\n}\n\n.card {\n display: flex;\n flex-direction: column;\n gap: var(--panneau-space-2);\n padding: var(--panneau-space-3);\n background-color: var(--panneau-color-surface);\n border: var(--panneau-border-width) solid var(--panneau-color-border);\n border-radius: var(--panneau-radius-lg);\n}\n\n.card[data-current] {\n border-color: var(--panneau-color-accent);\n box-shadow: inset 0 0 0 1px var(--panneau-color-accent);\n}\n\n.card[data-selected] {\n background-color: var(--panneau-color-accent-subtle);\n border-color: var(--panneau-color-border-control);\n}\n\n.header {\n display: flex;\n align-items: flex-start;\n gap: var(--panneau-space-2);\n}\n\n.title {\n flex: 1;\n min-width: 0;\n margin: 0;\n font-size: var(--panneau-font-size-lg);\n font-weight: var(--panneau-font-weight-medium);\n line-height: var(--panneau-line-height-tight);\n}\n\n.values {\n display: grid;\n gap: var(--panneau-space-1);\n margin: 0;\n font-size: var(--panneau-font-size-md);\n}\n\n.values dt,\n.values dd {\n margin: 0;\n font-weight: inherit;\n}\n\n.value {\n display: grid;\n grid-template-columns: minmax(5rem, 40%) 1fr;\n gap: var(--panneau-space-2);\n}\n\n.value dt {\n color: var(--panneau-color-text-muted);\n}\n\n.value dd {\n margin: 0;\n min-width: 0;\n}\n\n.actions {\n display: flex;\n flex-wrap: wrap;\n gap: var(--panneau-space-1);\n margin-top: auto;\n padding-top: var(--panneau-space-1);\n}\n\n.pageSelection {\n margin-bottom: var(--panneau-space-2);\n}\n"],"mappings":""}
@@ -3,8 +3,10 @@ import type { ReactNode } from 'react';
3
3
  * The title of an item, as a link to it when the list has one. Links go through React Aria, so an
4
4
  * app's `RouterProvider` handles them with its router.
5
5
  */
6
- export declare function ItemTitle({ href, children }: {
6
+ export declare function ItemTitle({ href, current, children, }: {
7
7
  href: string | null;
8
+ /** The item is the one shown next to the list: its link is the current page. */
9
+ current?: boolean;
8
10
  children: ReactNode;
9
- }): string | number | bigint | boolean | import("react").JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | null | undefined;
11
+ }): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | import("react").JSX.Element | null | undefined;
10
12
  //# sourceMappingURL=ItemTitle.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ItemTitle.d.ts","sourceRoot":"","sources":["../../src/layouts/ItemTitle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKvC;;;GAGG;AACH,wBAAgB,SAAS,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;IAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,QAAQ,EAAE,SAAS,CAAA;CAAE,+TASzF"}
1
+ {"version":3,"file":"ItemTitle.d.ts","sourceRoot":"","sources":["../../src/layouts/ItemTitle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKvC;;;GAGG;AACH,wBAAgB,SAAS,CAAC,EACtB,IAAI,EACJ,OAAe,EACf,QAAQ,GACX,EAAE;IACC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,gFAAgF;IAChF,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,SAAS,CAAC;CACvB,+TASA"}
@@ -8,21 +8,25 @@ import { Link } from "react-aria-components";
8
8
  * app's `RouterProvider` handles them with its router.
9
9
  */
10
10
  function ItemTitle(t0) {
11
- const $ = c(3);
12
- const { href, children } = t0;
11
+ const $ = c(4);
12
+ const { href, current: t1, children } = t0;
13
+ const current = t1 === void 0 ? false : t1;
13
14
  if (href === null) return children;
14
- let t1;
15
- if ($[0] !== children || $[1] !== href) {
16
- t1 = /* @__PURE__ */ jsx(Link, {
15
+ const t2 = current ? "page" : void 0;
16
+ let t3;
17
+ if ($[0] !== children || $[1] !== href || $[2] !== t2) {
18
+ t3 = /* @__PURE__ */ jsx(Link, {
17
19
  className: link_module_default.link,
18
20
  href,
21
+ "aria-current": t2,
19
22
  children
20
23
  });
21
24
  $[0] = children;
22
25
  $[1] = href;
23
- $[2] = t1;
24
- } else t1 = $[2];
25
- return t1;
26
+ $[2] = t2;
27
+ $[3] = t3;
28
+ } else t3 = $[3];
29
+ return t3;
26
30
  }
27
31
  //#endregion
28
32
  export { ItemTitle };
@@ -1 +1 @@
1
- {"version":3,"file":"ItemTitle.js","names":["href","children","_c","styles"],"sources":["../../src/layouts/ItemTitle.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport { Link } from 'react-aria-components';\n\nimport styles from './link.module.css';\n\n/**\n * The title of an item, as a link to it when the list has one. Links go through React Aria, so an\n * app's `RouterProvider` handles them with its router.\n */\nexport function ItemTitle({ href, children }: { href: string | null; children: ReactNode }) {\n if (href === null) {\n return children;\n }\n return (\n <Link className={styles.link} href={href}>\n {children}\n </Link>\n );\n}\n"],"mappings":";;;;;;;;;AASA,SAAO,UAAA,IAAA;CAAA,MAAA,IAAAE,EAAA,CAAA;CAAmB,MAAA,EAAA,MAAA,aAAA;CACtB,IAAI,SAAS,MAAI,OACN;CACV,IAAA;CAAA,IAAA,EAAA,OAAA,YAAA,EAAA,OAAA,MAAA;EAEG,KAAA,oBAAC,MAAD;GAAiB,WAAAC,oBAAM;GAAa;GAC/B;EADA,CAAA;EAEE,EAAA,KAAA;EAAA,EAAA,KAAA;EAAA,EAAA,KAAA;CAAA,OAAA,KAAA,EAAA;CAAA,OAFP;AAEO"}
1
+ {"version":3,"file":"ItemTitle.js","names":["ReactNode","Link","styles","ItemTitle","t0","$","_c","href","current","t1","children","undefined","t2","t3","link","_c","styles"],"sources":["../../src/layouts/ItemTitle.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport { Link } from 'react-aria-components';\n\nimport styles from './link.module.css';\n\n/**\n * The title of an item, as a link to it when the list has one. Links go through React Aria, so an\n * app's `RouterProvider` handles them with its router.\n */\nexport function ItemTitle({\n href,\n current = false,\n children,\n}: {\n href: string | null;\n /** The item is the one shown next to the list: its link is the current page. */\n current?: boolean;\n children: ReactNode;\n}) {\n if (href === null) {\n return children;\n }\n return (\n <Link className={styles.link} href={href} aria-current={current ? 'page' : undefined}>\n {children}\n </Link>\n );\n}\n"],"mappings":";;;;;;;;;AASA,SAAOG,UAAAC,IAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAmB,MAAA,EAAAC,MAAAC,SAAAC,IAAAC,aAAAN;CAEtB,MAAAI,UAAAC,OAAAE,KAAAA,IAAA,QAAAF;CAQA,IAAIF,SAAS,MAAI,OACNG;CAGiD,MAAAE,KAAAJ,UAAA,SAAAG,KAAAA;CAA4B,IAAAE;CAAA,IAAAR,EAAA,OAAAK,YAAAL,EAAA,OAAAE,QAAAF,EAAA,OAAAO,IAAA;EAApFC,KAAA,oBAAC,MAAD;GAAiB,WAAAX,oBAAMY;GAAaP;GAAoB,gBAAAK;GACnDF;EADA,CAAA;EAEEL,EAAA,KAAAK;EAAAL,EAAA,KAAAE;EAAAF,EAAA,KAAAO;EAAAP,EAAA,KAAAQ;CAAA,OAAAA,KAAAR,EAAA;CAAA,OAFPQ;AAEO"}
@@ -1,25 +1,25 @@
1
- .panneau-scroller-dntHlH {
1
+ .panneau-table-layout-scroller {
2
2
  overflow-x: auto;
3
3
  border: var(--panneau-border-width) solid var(--panneau-color-border);
4
4
  border-radius: var(--panneau-radius-lg);
5
5
  background-color: var(--panneau-color-surface);
6
6
  }
7
7
 
8
- .panneau-table-adJh-G {
8
+ .panneau-table-layout-table {
9
9
  width: 100%;
10
10
  border-collapse: collapse;
11
11
  font-size: var(--panneau-font-size-md);
12
12
  }
13
13
 
14
- .panneau-table-adJh-G th,
15
- .panneau-table-adJh-G td {
16
- padding: var(--panneau-space-2) var(--panneau-space-3);
14
+ .panneau-table-layout-table th,
15
+ .panneau-table-layout-table td {
16
+ padding: var(--panneau-row-padding-y) var(--panneau-space-3);
17
17
  text-align: start;
18
18
  vertical-align: middle;
19
19
  border-bottom: var(--panneau-border-width) solid var(--panneau-color-border);
20
20
  }
21
21
 
22
- .panneau-table-adJh-G th {
22
+ .panneau-table-layout-table th {
23
23
  font-size: var(--panneau-font-size-sm);
24
24
  font-weight: var(--panneau-font-weight-medium);
25
25
  color: var(--panneau-color-text-muted);
@@ -27,33 +27,48 @@
27
27
  background-color: var(--panneau-color-surface-sunken);
28
28
  }
29
29
 
30
- .panneau-table-adJh-G tbody tr:last-child td {
30
+ /* The title stays readable in a narrow list, such as next to an item's details: the table
31
+ * scrolls instead. */
32
+ .panneau-table-layout-table td.panneau-table-layout-title {
33
+ min-width: 12rem;
34
+ }
35
+
36
+ .panneau-table-layout-table tbody tr:last-child td {
31
37
  border-bottom: 0;
32
38
  }
33
39
 
34
- .panneau-table-adJh-G tbody tr[data-selected] {
40
+ .panneau-table-layout-table tbody tr[data-selected] {
35
41
  background-color: var(--panneau-color-accent-subtle);
36
42
  }
37
43
 
38
- .panneau-center-Fx-12L {
44
+ /* The item shown next to the list: a bar on its first cell. */
45
+ .panneau-table-layout-table tbody tr[data-current] td:first-child {
46
+ box-shadow: inset 3px 0 0 var(--panneau-color-accent);
47
+ }
48
+
49
+ .panneau-table-layout-table tbody tr[data-current] {
50
+ background-color: var(--panneau-color-hover);
51
+ }
52
+
53
+ .panneau-table-layout-center {
39
54
  text-align: center !important;
40
55
  }
41
56
 
42
- .panneau-end-Jr3hRc {
57
+ .panneau-table-layout-end {
43
58
  text-align: end !important;
44
59
  }
45
60
 
46
- .panneau-check-E5-IqZ {
61
+ .panneau-table-layout-check {
47
62
  width: 1px;
48
63
  }
49
64
 
50
- .panneau-actionsCell-dzoCuU {
65
+ .panneau-table-layout-actions-cell {
51
66
  width: 1px;
52
67
  text-align: end !important;
53
68
  white-space: nowrap;
54
69
  }
55
70
 
56
- .panneau-sort-t4x1tD {
71
+ .panneau-table-layout-sort {
57
72
  display: inline-flex;
58
73
  align-items: center;
59
74
  gap: var(--panneau-space-1);
@@ -67,29 +82,29 @@
67
82
  cursor: pointer;
68
83
  }
69
84
 
70
- .panneau-sort-t4x1tD:hover {
85
+ .panneau-table-layout-sort:hover {
71
86
  color: var(--panneau-color-text);
72
87
  background-color: var(--panneau-color-hover);
73
88
  }
74
89
 
75
- .panneau-sort-t4x1tD:focus-visible {
90
+ .panneau-table-layout-sort:focus-visible {
76
91
  outline: var(--panneau-focus-width) solid var(--panneau-color-focus);
77
92
  outline-offset: 1px;
78
93
  }
79
94
 
80
- .panneau-sortIcon-5pp-ve {
95
+ .panneau-table-layout-sort-icon {
81
96
  opacity: 0.5;
82
97
  }
83
98
 
84
- .panneau-sorted-a6Fwul .panneau-sortIcon-5pp-ve {
99
+ .panneau-table-layout-sorted .panneau-table-layout-sort-icon {
85
100
  opacity: 1;
86
101
  }
87
102
 
88
- .panneau-cellLabel-tiliX5 {
103
+ .panneau-table-layout-cell-label {
89
104
  display: none;
90
105
  }
91
106
 
92
- .panneau-visuallyHidden--8qvnp {
107
+ .panneau-table-layout-visually-hidden {
93
108
  position: absolute;
94
109
  width: 1px;
95
110
  height: 1px;
@@ -100,30 +115,30 @@
100
115
 
101
116
  /* Narrow lists (phones): each row is a block, with the label of each value next to it. */
102
117
  @container panneau-list (max-width: 40rem) {
103
- .panneau-scroller-dntHlH {
118
+ .panneau-table-layout-scroller {
104
119
  overflow: visible;
105
120
  background: none;
106
121
  border: 0;
107
122
  }
108
123
 
109
124
  /* The labels of the cells replace the headers, and the list's sort select their buttons. */
110
- .panneau-table-adJh-G thead {
125
+ .panneau-table-layout-table thead {
111
126
  display: none;
112
127
  }
113
128
 
114
- .panneau-table-adJh-G,
115
- .panneau-table-adJh-G tbody,
116
- .panneau-table-adJh-G tr,
117
- .panneau-table-adJh-G td {
129
+ .panneau-table-layout-table,
130
+ .panneau-table-layout-table tbody,
131
+ .panneau-table-layout-table tr,
132
+ .panneau-table-layout-table td {
118
133
  display: block;
119
134
  }
120
135
 
121
- .panneau-table-adJh-G tbody {
136
+ .panneau-table-layout-table tbody {
122
137
  display: grid;
123
138
  gap: var(--panneau-space-2);
124
139
  }
125
140
 
126
- .panneau-table-adJh-G tr {
141
+ .panneau-table-layout-table tr {
127
142
  position: relative;
128
143
  padding: var(--panneau-space-2) 0;
129
144
  background-color: var(--panneau-color-surface);
@@ -131,7 +146,7 @@
131
146
  border-radius: var(--panneau-radius-lg);
132
147
  }
133
148
 
134
- .panneau-table-adJh-G td {
149
+ .panneau-table-layout-table td {
135
150
  display: grid;
136
151
  grid-template-columns: minmax(5rem, 35%) 1fr;
137
152
  gap: var(--panneau-space-2);
@@ -140,36 +155,37 @@
140
155
  border: 0;
141
156
  }
142
157
 
143
- .panneau-table-adJh-G td.panneau-check-E5-IqZ,
144
- .panneau-table-adJh-G td.panneau-actionsCell-dzoCuU {
158
+ .panneau-table-layout-table td.panneau-table-layout-check,
159
+ .panneau-table-layout-table td.panneau-table-layout-actions-cell {
145
160
  display: flex;
146
161
  width: auto;
147
162
  }
148
163
 
149
- .panneau-table-adJh-G td.panneau-check-E5-IqZ {
164
+ .panneau-table-layout-table td.panneau-table-layout-check {
150
165
  position: absolute;
151
166
  top: var(--panneau-space-2);
152
167
  inset-inline-end: var(--panneau-space-2);
153
168
  padding: 0;
154
169
  }
155
170
 
156
- .panneau-table-adJh-G td.panneau-actionsCell-dzoCuU {
171
+ .panneau-table-layout-table td.panneau-table-layout-actions-cell {
157
172
  justify-content: flex-start;
158
173
  flex-wrap: wrap;
159
174
  padding-top: var(--panneau-space-2);
160
175
  }
161
176
 
162
- .panneau-table-adJh-G td.panneau-title-KEAnyJ {
177
+ .panneau-table-layout-table td.panneau-table-layout-title {
163
178
  display: block;
179
+ min-width: 0;
164
180
  padding-inline-end: var(--panneau-space-10);
165
181
  font-weight: var(--panneau-font-weight-medium);
166
182
  }
167
183
 
168
- .panneau-table-adJh-G td.panneau-title-KEAnyJ .panneau-cellLabel-tiliX5 {
184
+ .panneau-table-layout-table td.panneau-table-layout-title .panneau-table-layout-cell-label {
169
185
  display: none;
170
186
  }
171
187
 
172
- .panneau-cellLabel-tiliX5 {
188
+ .panneau-table-layout-cell-label {
173
189
  display: block;
174
190
  font-size: var(--panneau-font-size-sm);
175
191
  color: var(--panneau-color-text-muted);
@@ -1,9 +1,9 @@
1
- import type { ListColumn, ListLayoutProps } from '../types';
1
+ import type { ListColumn, ListLayoutProps } from '../types.js';
2
2
  /** The sort direction of a column, from the first `sort` value. */
3
3
  export declare function getSortDirection(sort: readonly string[], column: ListColumn): 'ascending' | 'descending' | null;
4
4
  /**
5
5
  * Items as a table, with sortable column headers. On narrow lists (phones), each row turns into a
6
6
  * block that shows the label of each value.
7
7
  */
8
- export declare function TableLayout({ items, columns, renderValue, getItemLabel, getItemHref, selectable, isSelected, onToggle, renderActions, sort, onSort, label, pageSelection, }: ListLayoutProps): import("react").JSX.Element;
8
+ export declare function TableLayout({ items, columns, renderValue, getItemLabel, getItemHref, isCurrent, selectable, isSelected, onToggle, renderActions, sort, onSort, label, pageSelection, }: ListLayoutProps): import("react").JSX.Element;
9
9
  //# sourceMappingURL=TableLayout.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TableLayout.d.ts","sourceRoot":"","sources":["../../src/layouts/TableLayout.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAI5D,mEAAmE;AACnE,wBAAgB,gBAAgB,CAC5B,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,MAAM,EAAE,UAAU,GACnB,WAAW,GAAG,YAAY,GAAG,IAAI,CAMnC;AASD;;;GAGG;AACH,wBAAgB,WAAW,CAAC,EACxB,KAAK,EACL,OAAO,EACP,WAAW,EACX,YAAY,EACZ,WAAW,EACX,UAAU,EACV,UAAU,EACV,QAAQ,EACR,aAAa,EACb,IAAI,EACJ,MAAM,EACN,KAAK,EACL,aAAa,GAChB,EAAE,eAAe,+BAiHjB"}
1
+ {"version":3,"file":"TableLayout.d.ts","sourceRoot":"","sources":["../../src/layouts/TableLayout.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAI5D,mEAAmE;AACnE,wBAAgB,gBAAgB,CAC5B,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,MAAM,EAAE,UAAU,GACnB,WAAW,GAAG,YAAY,GAAG,IAAI,CAMnC;AASD;;;GAGG;AACH,wBAAgB,WAAW,CAAC,EACxB,KAAK,EACL,OAAO,EACP,WAAW,EACX,YAAY,EACZ,WAAW,EACX,SAAS,EACT,UAAU,EACV,UAAU,EACV,QAAQ,EACR,aAAa,EACb,IAAI,EACJ,MAAM,EACN,KAAK,EACL,aAAa,GAChB,EAAE,eAAe,+BAsHjB"}