@panneau/lists 5.0.0-alpha.1 → 5.0.0-alpha.11
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.
- package/README.md +3 -3
- package/dist/ItemDetails.css +34 -0
- package/dist/ItemDetails.d.ts +18 -0
- package/dist/ItemDetails.d.ts.map +1 -0
- package/dist/ItemDetails.js +104 -0
- package/dist/ItemDetails.js.map +1 -0
- package/dist/ItemDetails.module.js +16 -0
- package/dist/ItemDetails.module.js.map +1 -0
- package/dist/List.d.ts +2 -2
- package/dist/List.js +54 -12
- package/dist/List.js.map +1 -1
- package/dist/ListSkeleton.d.ts +17 -0
- package/dist/ListSkeleton.d.ts.map +1 -0
- package/dist/ListSkeleton.js +111 -0
- package/dist/ListSkeleton.js.map +1 -0
- package/dist/ListView.css +16 -16
- package/dist/ListView.d.ts +35 -6
- package/dist/ListView.d.ts.map +1 -1
- package/dist/ListView.js +544 -211
- package/dist/ListView.js.map +1 -1
- package/dist/ListView.module.js +10 -10
- package/dist/actions/ActionButton.d.ts +1 -1
- package/dist/actions/ActionButton.d.ts.map +1 -1
- package/dist/actions/ActionButton.js +96 -26
- package/dist/actions/ActionButton.js.map +1 -1
- package/dist/actions/Actions.css +8 -42
- package/dist/actions/Actions.module.js +5 -9
- package/dist/actions/Actions.module.js.map +1 -1
- package/dist/actions/ConfirmDialog.d.ts +15 -3
- package/dist/actions/ConfirmDialog.d.ts.map +1 -1
- package/dist/actions/ConfirmDialog.js +103 -89
- package/dist/actions/ConfirmDialog.js.map +1 -1
- package/dist/actions/RowActions.d.ts +6 -7
- package/dist/actions/RowActions.d.ts.map +1 -1
- package/dist/actions/RowActions.js +59 -53
- package/dist/actions/RowActions.js.map +1 -1
- package/dist/actions/actions.d.ts +5 -4
- package/dist/actions/actions.d.ts.map +1 -1
- package/dist/actions/actions.js +7 -14
- package/dist/actions/actions.js.map +1 -1
- package/dist/actions/icons.js.map +1 -1
- package/dist/cx.js.map +1 -1
- package/dist/displays/Displays.css +25 -13
- package/dist/displays/Displays.module.js +18 -14
- package/dist/displays/Displays.module.js.map +1 -1
- package/dist/displays/displays.d.ts +18 -3
- package/dist/displays/displays.d.ts.map +1 -1
- package/dist/displays/displays.js +355 -12
- package/dist/displays/displays.js.map +1 -1
- package/dist/filters/Filters.css +34 -20
- package/dist/filters/Filters.d.ts +1 -1
- package/dist/filters/Filters.js.map +1 -1
- package/dist/filters/Filters.module.js +13 -9
- package/dist/filters/Filters.module.js.map +1 -1
- package/dist/filters/controls.d.ts +1 -1
- package/dist/filters/controls.d.ts.map +1 -1
- package/dist/filters/controls.js +57 -35
- package/dist/filters/controls.js.map +1 -1
- package/dist/filters/format.d.ts +1 -1
- package/dist/filters/format.js.map +1 -1
- package/dist/index.d.ts +19 -18
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -3
- package/dist/layouts/CardsLayout.css +22 -11
- package/dist/layouts/CardsLayout.d.ts +2 -2
- package/dist/layouts/CardsLayout.d.ts.map +1 -1
- package/dist/layouts/CardsLayout.js +39 -35
- package/dist/layouts/CardsLayout.js.map +1 -1
- package/dist/layouts/CardsLayout.module.js +8 -8
- package/dist/layouts/CardsLayout.module.js.map +1 -1
- package/dist/layouts/ItemTitle.d.ts +3 -1
- package/dist/layouts/ItemTitle.d.ts.map +1 -1
- package/dist/layouts/ItemTitle.js +12 -8
- package/dist/layouts/ItemTitle.js.map +1 -1
- package/dist/layouts/TableLayout.css +60 -35
- package/dist/layouts/TableLayout.d.ts +2 -2
- package/dist/layouts/TableLayout.d.ts.map +1 -1
- package/dist/layouts/TableLayout.js +38 -33
- package/dist/layouts/TableLayout.js.map +1 -1
- package/dist/layouts/TableLayout.module.js +14 -14
- package/dist/layouts/TableLayout.module.js.map +1 -1
- package/dist/layouts/builtIn.d.ts +1 -1
- package/dist/layouts/builtIn.js.map +1 -1
- package/dist/layouts/link.css +3 -3
- package/dist/layouts/link.module.js +1 -1
- package/dist/plugin.d.ts +1 -1
- package/dist/plugin.js.map +1 -1
- package/dist/query.d.ts +1 -1
- package/dist/query.js.map +1 -1
- package/dist/selection.d.ts +1 -1
- package/dist/selection.js.map +1 -1
- package/dist/toolbar/LayoutSwitch.js.map +1 -1
- package/dist/toolbar/Pagination.d.ts +33 -0
- package/dist/toolbar/Pagination.d.ts.map +1 -1
- package/dist/toolbar/Pagination.js +282 -42
- package/dist/toolbar/Pagination.js.map +1 -1
- package/dist/toolbar/SearchField.js.map +1 -1
- package/dist/toolbar/SortSelect.d.ts +1 -1
- package/dist/toolbar/SortSelect.js.map +1 -1
- package/dist/toolbar/Toolbar.css +12 -12
- package/dist/toolbar/Toolbar.module.js +7 -7
- package/dist/types.d.ts +16 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/useDraft.js.map +1 -1
- package/dist/useListState.js.map +1 -1
- package/dist/useRenderValue.d.ts +8 -0
- package/dist/useRenderValue.d.ts.map +1 -0
- package/dist/useRenderValue.js +64 -0
- package/dist/useRenderValue.js.map +1 -0
- package/dist/values.d.ts +3 -1
- package/dist/values.d.ts.map +1 -1
- package/dist/values.js +6 -2
- package/dist/values.js.map +1 -1
- package/package.json +9 -9
package/dist/index.d.ts
CHANGED
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
export { type ListActions, getActionHref, groupListActions, isAllowedOn } from './actions/actions';
|
|
2
|
-
export { ConfirmDialog, type ConfirmDialogProps } from './actions/ConfirmDialog';
|
|
3
|
-
export { type ActionIcons, getActionIcon } from './actions/icons';
|
|
4
|
-
export { BooleanDisplay, ColorDisplay, DateDisplay, DateTimeDisplay, EmailDisplay, EmptyValue, MediaDisplay, NumberDisplay, RelationDisplay, RichTextDisplay, SelectDisplay, TextDisplay, TimeDisplay, UrlDisplay, builtInDisplays, } from './displays/displays';
|
|
5
|
-
export { DateFilter, DateRangeFilter, RelationFilter, SelectFilter, TextFilter, ToggleFilter, builtInFilters, } from './filters/controls';
|
|
6
|
-
export { CardsLayout } from './layouts/CardsLayout';
|
|
7
|
-
export { TableLayout } from './layouts/TableLayout';
|
|
8
|
-
export { builtInLayouts } from './layouts/builtIn';
|
|
9
|
-
export {
|
|
10
|
-
export {
|
|
11
|
-
export {
|
|
12
|
-
export {
|
|
13
|
-
export {
|
|
14
|
-
export {
|
|
15
|
-
export {
|
|
16
|
-
export
|
|
17
|
-
export {
|
|
18
|
-
export {
|
|
1
|
+
export { type ListActions, getActionHref, groupListActions, isAllowedOn } from './actions/actions.js';
|
|
2
|
+
export { ConfirmDialog, type ConfirmDialogProps, type ConfirmPreview, } from './actions/ConfirmDialog.js';
|
|
3
|
+
export { type ActionIcons, getActionIcon } from './actions/icons.js';
|
|
4
|
+
export { BooleanDisplay, ColorDisplay, DateDisplay, DateTimeDisplay, DurationDisplay, EmailDisplay, EmbedDisplay, EmptyValue, JsonDisplay, LocationDisplay, MediaDisplay, NumberDisplay, RelationDisplay, RichTextDisplay, SelectDisplay, TagsDisplay, TelDisplay, TextDisplay, TimeDisplay, UrlDisplay, builtInDisplays, } from './displays/displays.js';
|
|
5
|
+
export { DateFilter, DateRangeFilter, RelationFilter, SelectFilter, TextFilter, ToggleFilter, builtInFilters, } from './filters/controls.js';
|
|
6
|
+
export { CardsLayout } from './layouts/CardsLayout.js';
|
|
7
|
+
export { TableLayout } from './layouts/TableLayout.js';
|
|
8
|
+
export { builtInLayouts } from './layouts/builtIn.js';
|
|
9
|
+
export { ItemDetails, type ItemDetailsProps } from './ItemDetails.js';
|
|
10
|
+
export { List, type ListProps } from './List.js';
|
|
11
|
+
export { ListView, type ListViewProps } from './ListView.js';
|
|
12
|
+
export { listsPlugin } from './plugin.js';
|
|
13
|
+
export { type LocalQueryOptions, type LocalQueryResult, applyListQuery } from './query.js';
|
|
14
|
+
export { countSelected, getPageSelection, isItemSelected } from './selection.js';
|
|
15
|
+
export { CursorPagination, type CursorPaginationProps, Pagination, type PaginationProps, getPagingProps, } from './toolbar/Pagination.js';
|
|
16
|
+
export { SearchField, type SearchFieldProps } from './toolbar/SearchField.js';
|
|
17
|
+
export type { DisplayEntry, DisplayProps, FilterControlProps, FilterEntry, ListActionEvent, ListActionHandler, ListActionPreview, ListActionPreviewer, ListColumn, ListItem, ListLayoutEntry, ListLayoutProps, } from './types.js';
|
|
18
|
+
export { useListState } from './useListState.js';
|
|
19
|
+
export { getLocalizedValue, toText } from './values.js';
|
|
19
20
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAAE,aAAa,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACnG,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAAE,aAAa,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACnG,OAAO,EACH,aAAa,EACb,KAAK,kBAAkB,EACvB,KAAK,cAAc,GACtB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,KAAK,WAAW,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAClE,OAAO,EACH,cAAc,EACd,YAAY,EACZ,WAAW,EACX,eAAe,EACf,eAAe,EACf,YAAY,EACZ,YAAY,EACZ,UAAU,EACV,WAAW,EACX,eAAe,EACf,YAAY,EACZ,aAAa,EACb,eAAe,EACf,eAAe,EACf,aAAa,EACb,WAAW,EACX,UAAU,EACV,WAAW,EACX,WAAW,EACX,UAAU,EACV,eAAe,GAClB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACH,UAAU,EACV,eAAe,EACf,cAAc,EACd,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,cAAc,GACjB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACnE,OAAO,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,YAAY,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,gBAAgB,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AACxF,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC9E,OAAO,EACH,gBAAgB,EAChB,KAAK,qBAAqB,EAC1B,UAAU,EACV,KAAK,eAAe,EACpB,cAAc,GACjB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC3E,YAAY,EACR,YAAY,EACZ,YAAY,EACZ,kBAAkB,EAClB,WAAW,EACX,eAAe,EACf,iBAAiB,EACjB,iBAAiB,EACjB,mBAAmB,EACnB,UAAU,EACV,QAAQ,EACR,eAAe,EACf,eAAe,GAClB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -2,17 +2,18 @@ import { getActionHref, groupListActions, isAllowedOn } from "./actions/actions.
|
|
|
2
2
|
import { ConfirmDialog } from "./actions/ConfirmDialog.js";
|
|
3
3
|
import { getActionIcon } from "./actions/icons.js";
|
|
4
4
|
import { getLocalizedValue, toText } from "./values.js";
|
|
5
|
-
import { BooleanDisplay, ColorDisplay, DateDisplay, DateTimeDisplay, EmailDisplay, EmptyValue, MediaDisplay, NumberDisplay, RelationDisplay, RichTextDisplay, SelectDisplay, TextDisplay, TimeDisplay, UrlDisplay, builtInDisplays } from "./displays/displays.js";
|
|
5
|
+
import { BooleanDisplay, ColorDisplay, DateDisplay, DateTimeDisplay, DurationDisplay, EmailDisplay, EmbedDisplay, EmptyValue, JsonDisplay, LocationDisplay, MediaDisplay, NumberDisplay, RelationDisplay, RichTextDisplay, SelectDisplay, TagsDisplay, TelDisplay, TextDisplay, TimeDisplay, UrlDisplay, builtInDisplays } from "./displays/displays.js";
|
|
6
6
|
import { DateFilter, DateRangeFilter, RelationFilter, SelectFilter, TextFilter, ToggleFilter, builtInFilters } from "./filters/controls.js";
|
|
7
7
|
import { CardsLayout } from "./layouts/CardsLayout.js";
|
|
8
8
|
import { TableLayout } from "./layouts/TableLayout.js";
|
|
9
9
|
import { builtInLayouts } from "./layouts/builtIn.js";
|
|
10
|
+
import { ItemDetails } from "./ItemDetails.js";
|
|
10
11
|
import { countSelected, getPageSelection, isItemSelected } from "./selection.js";
|
|
11
|
-
import { Pagination } from "./toolbar/Pagination.js";
|
|
12
|
+
import { CursorPagination, Pagination, getPagingProps } from "./toolbar/Pagination.js";
|
|
12
13
|
import { SearchField } from "./toolbar/SearchField.js";
|
|
13
14
|
import { useListState } from "./useListState.js";
|
|
14
15
|
import { ListView } from "./ListView.js";
|
|
15
16
|
import { applyListQuery } from "./query.js";
|
|
16
17
|
import { List } from "./List.js";
|
|
17
18
|
import { listsPlugin } from "./plugin.js";
|
|
18
|
-
export { BooleanDisplay, CardsLayout, ColorDisplay, ConfirmDialog, DateDisplay, DateFilter, DateRangeFilter, DateTimeDisplay, EmailDisplay, EmptyValue, List, ListView, MediaDisplay, NumberDisplay, Pagination, RelationDisplay, RelationFilter, RichTextDisplay, SearchField, SelectDisplay, SelectFilter, TableLayout, TextDisplay, TextFilter, TimeDisplay, ToggleFilter, UrlDisplay, applyListQuery, builtInDisplays, builtInFilters, builtInLayouts, countSelected, getActionHref, getActionIcon, getLocalizedValue, getPageSelection, groupListActions, isAllowedOn, isItemSelected, listsPlugin, toText, useListState };
|
|
19
|
+
export { BooleanDisplay, CardsLayout, ColorDisplay, ConfirmDialog, CursorPagination, DateDisplay, DateFilter, DateRangeFilter, DateTimeDisplay, DurationDisplay, EmailDisplay, EmbedDisplay, EmptyValue, ItemDetails, JsonDisplay, List, ListView, LocationDisplay, MediaDisplay, NumberDisplay, Pagination, RelationDisplay, RelationFilter, RichTextDisplay, SearchField, SelectDisplay, SelectFilter, TableLayout, TagsDisplay, TelDisplay, TextDisplay, TextFilter, TimeDisplay, ToggleFilter, UrlDisplay, applyListQuery, builtInDisplays, builtInFilters, builtInLayouts, countSelected, getActionHref, getActionIcon, getLocalizedValue, getPageSelection, getPagingProps, groupListActions, isAllowedOn, isItemSelected, listsPlugin, toText, useListState };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
.panneau-cards-
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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-
|
|
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
|
|
64
|
+
.panneau-cards-layout-value dt {
|
|
54
65
|
color: var(--panneau-color-text-muted);
|
|
55
66
|
}
|
|
56
67
|
|
|
57
|
-
.panneau-value
|
|
68
|
+
.panneau-cards-layout-value dd {
|
|
58
69
|
margin: 0;
|
|
59
70
|
min-width: 0;
|
|
60
71
|
}
|
|
61
72
|
|
|
62
|
-
.panneau-
|
|
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-
|
|
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,+
|
|
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(
|
|
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] !==
|
|
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 ($[
|
|
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
|
-
$[
|
|
25
|
-
$[
|
|
26
|
-
$[
|
|
27
|
-
} else t4 = $[
|
|
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] =
|
|
70
|
-
$[5] =
|
|
71
|
-
$[6] =
|
|
72
|
-
$[7] =
|
|
73
|
-
$[8] =
|
|
74
|
-
$[9] =
|
|
75
|
-
$[10] =
|
|
76
|
-
$[11] =
|
|
77
|
-
$[12] =
|
|
78
|
-
$[13] =
|
|
79
|
-
$[14] =
|
|
80
|
-
$[15] =
|
|
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 = $[
|
|
83
|
-
t2 = $[
|
|
84
|
-
t3 = $[
|
|
85
|
-
t4 = $[
|
|
86
|
+
t1 = $[13];
|
|
87
|
+
t2 = $[14];
|
|
88
|
+
t3 = $[15];
|
|
89
|
+
t4 = $[16];
|
|
86
90
|
}
|
|
87
91
|
let t5;
|
|
88
|
-
if ($[
|
|
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
|
-
$[
|
|
95
|
-
$[
|
|
96
|
-
$[
|
|
97
|
-
$[
|
|
98
|
-
} else t5 = $[
|
|
98
|
+
$[20] = t1;
|
|
99
|
+
$[21] = t2;
|
|
100
|
+
$[22] = t3;
|
|
101
|
+
$[23] = t5;
|
|
102
|
+
} else t5 = $[23];
|
|
99
103
|
let t6;
|
|
100
|
-
if ($[
|
|
104
|
+
if ($[24] !== t4 || $[25] !== t5) {
|
|
101
105
|
t6 = /* @__PURE__ */ jsxs("div", { children: [t4, t5] });
|
|
102
|
-
$[
|
|
103
|
-
$[
|
|
104
|
-
$[
|
|
105
|
-
} else t6 = $[
|
|
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":["
|
|
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":"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"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import "./CardsLayout.css";
|
|
2
2
|
//#region src/layouts/CardsLayout.module.css
|
|
3
|
-
var cards = "panneau-cards-
|
|
4
|
-
var card = "panneau-card
|
|
5
|
-
var header = "panneau-header
|
|
6
|
-
var title = "panneau-title
|
|
7
|
-
var values = "panneau-values
|
|
8
|
-
var value = "panneau-value
|
|
9
|
-
var actions = "panneau-
|
|
10
|
-
var pageSelection = "panneau-
|
|
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
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,
|
|
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(
|
|
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
|
-
|
|
15
|
-
|
|
16
|
-
|
|
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] =
|
|
24
|
-
|
|
25
|
-
|
|
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({
|
|
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"}
|