@panneau/lists 5.0.0-alpha.0 → 5.0.0-alpha.2
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 +5 -1
- package/dist/ListView.css +16 -16
- package/dist/ListView.d.ts +7 -1
- package/dist/ListView.d.ts.map +1 -1
- package/dist/ListView.js +8 -5
- package/dist/ListView.js.map +1 -1
- package/dist/ListView.module.js +10 -10
- package/dist/actions/ActionButton.d.ts +4 -1
- package/dist/actions/ActionButton.d.ts.map +1 -1
- package/dist/actions/ActionButton.js +3 -3
- package/dist/actions/ActionButton.js.map +1 -1
- package/dist/actions/Actions.css +9 -9
- package/dist/actions/Actions.module.js +6 -6
- package/dist/actions/RowActions.d.ts +4 -1
- package/dist/actions/RowActions.d.ts.map +1 -1
- package/dist/actions/RowActions.js +37 -33
- package/dist/actions/RowActions.js.map +1 -1
- package/dist/actions/icons.d.ts +8 -3
- package/dist/actions/icons.d.ts.map +1 -1
- package/dist/actions/icons.js +11 -7
- package/dist/actions/icons.js.map +1 -1
- package/dist/displays/Displays.css +13 -13
- package/dist/displays/Displays.module.js +12 -12
- package/dist/displays/Displays.module.js.map +1 -1
- package/dist/filters/Filters.css +13 -13
- package/dist/filters/Filters.module.js +8 -8
- package/dist/filters/controls.d.ts +2 -2
- package/dist/filters/controls.d.ts.map +1 -1
- package/dist/filters/controls.js +145 -119
- package/dist/filters/controls.js.map +1 -1
- package/dist/filters/format.d.ts.map +1 -1
- package/dist/filters/format.js +4 -1
- package/dist/filters/format.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/layouts/CardsLayout.css +17 -11
- package/dist/layouts/CardsLayout.module.js +8 -8
- package/dist/layouts/CardsLayout.module.js.map +1 -1
- package/dist/layouts/ItemTitle.d.ts +1 -1
- package/dist/layouts/TableLayout.css +35 -35
- package/dist/layouts/TableLayout.module.js +12 -12
- package/dist/layouts/TableLayout.module.js.map +1 -1
- package/dist/layouts/link.css +3 -3
- package/dist/layouts/link.module.js +1 -1
- package/dist/query.d.ts +2 -2
- package/dist/query.d.ts.map +1 -1
- package/dist/query.js +7 -2
- package/dist/query.js.map +1 -1
- package/dist/toolbar/Toolbar.css +12 -12
- package/dist/toolbar/Toolbar.module.js +7 -7
- package/dist/types.d.ts +2 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +7 -7
|
@@ -10,15 +10,16 @@ import { Ellipsis } from "lucide-react";
|
|
|
10
10
|
//#region src/actions/RowActions.tsx
|
|
11
11
|
/** The actions of a row: buttons, then an overflow menu. */
|
|
12
12
|
function RowActions(t0) {
|
|
13
|
-
const $ = c(
|
|
14
|
-
const { item, itemLabel, actions, menu, pending, onRun } = t0;
|
|
13
|
+
const $ = c(26);
|
|
14
|
+
const { item, itemLabel, actions, menu, pending, onRun, icons } = t0;
|
|
15
15
|
const intl = usePanneauIntl();
|
|
16
16
|
let t1;
|
|
17
|
-
if ($[0] !== actions || $[1] !==
|
|
17
|
+
if ($[0] !== actions || $[1] !== icons || $[2] !== intl || $[3] !== item || $[4] !== itemLabel || $[5] !== onRun || $[6] !== pending) {
|
|
18
18
|
let t2;
|
|
19
|
-
if ($[
|
|
19
|
+
if ($[8] !== icons || $[9] !== intl || $[10] !== item || $[11] !== itemLabel || $[12] !== onRun || $[13] !== pending) {
|
|
20
20
|
t2 = (action) => /* @__PURE__ */ jsx(ActionButton, {
|
|
21
21
|
action,
|
|
22
|
+
icons,
|
|
22
23
|
href: getActionHref(action, item),
|
|
23
24
|
isPending: pending === action.id,
|
|
24
25
|
isDisabled: pending !== null && pending !== action.id,
|
|
@@ -28,24 +29,26 @@ function RowActions(t0) {
|
|
|
28
29
|
}),
|
|
29
30
|
onPress: () => onRun(action)
|
|
30
31
|
}, action.id);
|
|
31
|
-
$[
|
|
32
|
-
$[
|
|
33
|
-
$[
|
|
34
|
-
$[
|
|
35
|
-
$[
|
|
36
|
-
$[
|
|
37
|
-
|
|
32
|
+
$[8] = icons;
|
|
33
|
+
$[9] = intl;
|
|
34
|
+
$[10] = item;
|
|
35
|
+
$[11] = itemLabel;
|
|
36
|
+
$[12] = onRun;
|
|
37
|
+
$[13] = pending;
|
|
38
|
+
$[14] = t2;
|
|
39
|
+
} else t2 = $[14];
|
|
38
40
|
t1 = actions.map(t2);
|
|
39
41
|
$[0] = actions;
|
|
40
|
-
$[1] =
|
|
41
|
-
$[2] =
|
|
42
|
-
$[3] =
|
|
43
|
-
$[4] =
|
|
44
|
-
$[5] =
|
|
45
|
-
$[6] =
|
|
46
|
-
|
|
42
|
+
$[1] = icons;
|
|
43
|
+
$[2] = intl;
|
|
44
|
+
$[3] = item;
|
|
45
|
+
$[4] = itemLabel;
|
|
46
|
+
$[5] = onRun;
|
|
47
|
+
$[6] = pending;
|
|
48
|
+
$[7] = t1;
|
|
49
|
+
} else t1 = $[7];
|
|
47
50
|
let t2;
|
|
48
|
-
if ($[
|
|
51
|
+
if ($[15] !== icons || $[16] !== intl || $[17] !== item || $[18] !== itemLabel || $[19] !== menu || $[20] !== onRun || $[21] !== pending) {
|
|
49
52
|
t2 = menu.length > 0 ? /* @__PURE__ */ jsxs(MenuTrigger, { children: [/* @__PURE__ */ jsx(IconButton, {
|
|
50
53
|
icon: Ellipsis,
|
|
51
54
|
size: "sm",
|
|
@@ -59,7 +62,7 @@ function RowActions(t0) {
|
|
|
59
62
|
},
|
|
60
63
|
children: menu.map((action_2) => {
|
|
61
64
|
const href = getActionHref(action_2, item);
|
|
62
|
-
const icon = getActionIcon(action_2);
|
|
65
|
+
const icon = getActionIcon(action_2, icons);
|
|
63
66
|
return /* @__PURE__ */ jsx(MenuItem, {
|
|
64
67
|
id: action_2.id,
|
|
65
68
|
isDanger: action_2.destructive === true,
|
|
@@ -69,24 +72,25 @@ function RowActions(t0) {
|
|
|
69
72
|
}, action_2.id);
|
|
70
73
|
})
|
|
71
74
|
})] }) : null;
|
|
72
|
-
$[
|
|
73
|
-
$[
|
|
74
|
-
$[
|
|
75
|
-
$[
|
|
76
|
-
$[
|
|
77
|
-
$[
|
|
78
|
-
$[
|
|
79
|
-
|
|
75
|
+
$[15] = icons;
|
|
76
|
+
$[16] = intl;
|
|
77
|
+
$[17] = item;
|
|
78
|
+
$[18] = itemLabel;
|
|
79
|
+
$[19] = menu;
|
|
80
|
+
$[20] = onRun;
|
|
81
|
+
$[21] = pending;
|
|
82
|
+
$[22] = t2;
|
|
83
|
+
} else t2 = $[22];
|
|
80
84
|
let t3;
|
|
81
|
-
if ($[
|
|
85
|
+
if ($[23] !== t1 || $[24] !== t2) {
|
|
82
86
|
t3 = /* @__PURE__ */ jsxs("div", {
|
|
83
87
|
className: Actions_module_default.row,
|
|
84
88
|
children: [t1, t2]
|
|
85
89
|
});
|
|
86
|
-
$[
|
|
87
|
-
$[
|
|
88
|
-
$[
|
|
89
|
-
} else t3 = $[
|
|
90
|
+
$[23] = t1;
|
|
91
|
+
$[24] = t2;
|
|
92
|
+
$[25] = t3;
|
|
93
|
+
} else t3 = $[25];
|
|
90
94
|
return t3;
|
|
91
95
|
}
|
|
92
96
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RowActions.js","names":["action","Ellipsis","_c","styles"],"sources":["../../src/actions/RowActions.tsx"],"sourcesContent":["import { Ellipsis } from 'lucide-react';\n\nimport type { Action } from '@panneau/protocol';\nimport { IconButton, Menu, MenuItem, MenuTrigger, usePanneauIntl } from '@panneau/ui';\n\nimport { messages } from '../messages';\nimport type { ListItem } from '../types';\nimport { ActionButton } from './ActionButton';\nimport styles from './Actions.module.css';\nimport { getActionHref } from './actions';\nimport { getActionIcon } from './icons';\n\nexport interface RowActionsProps {\n item: ListItem;\n /** The label of the item, for the accessible names of its actions. */\n itemLabel: string;\n /** Actions shown as buttons. */\n actions: readonly Action[];\n /** Actions in the overflow menu. */\n menu: readonly Action[];\n /** Id of the action that is running on this item, if any. */\n pending: string | null;\n onRun: (action: Action) => void;\n}\n\n/** The actions of a row: buttons, then an overflow menu. */\nexport function RowActions({
|
|
1
|
+
{"version":3,"file":"RowActions.js","names":["action","icons","Ellipsis","_c","styles"],"sources":["../../src/actions/RowActions.tsx"],"sourcesContent":["import { Ellipsis } from 'lucide-react';\n\nimport type { Action } from '@panneau/protocol';\nimport { IconButton, Menu, MenuItem, MenuTrigger, usePanneauIntl } from '@panneau/ui';\n\nimport { messages } from '../messages';\nimport type { ListItem } from '../types';\nimport { ActionButton } from './ActionButton';\nimport styles from './Actions.module.css';\nimport { getActionHref } from './actions';\nimport { type ActionIcons, getActionIcon } from './icons';\n\nexport interface RowActionsProps {\n item: ListItem;\n /** The label of the item, for the accessible names of its actions. */\n itemLabel: string;\n /** Actions shown as buttons. */\n actions: readonly Action[];\n /** Actions in the overflow menu. */\n menu: readonly Action[];\n /** Id of the action that is running on this item, if any. */\n pending: string | null;\n onRun: (action: Action) => void;\n /** Icons of actions by id, over the icon the action names. */\n icons?: ActionIcons | undefined;\n}\n\n/** The actions of a row: buttons, then an overflow menu. */\nexport function RowActions({\n item,\n itemLabel,\n actions,\n menu,\n pending,\n onRun,\n icons,\n}: RowActionsProps) {\n const intl = usePanneauIntl();\n return (\n <div className={styles.row}>\n {actions.map((action) => (\n <ActionButton\n key={action.id}\n action={action}\n icons={icons}\n href={getActionHref(action, item)}\n isPending={pending === action.id}\n isDisabled={pending !== null && pending !== action.id}\n aria-label={intl.formatMessage(messages.actionOnItem, {\n action: action.label,\n item: itemLabel,\n })}\n onPress={() => onRun(action)}\n />\n ))}\n {menu.length > 0 ? (\n <MenuTrigger>\n <IconButton\n icon={Ellipsis}\n size=\"sm\"\n label={intl.formatMessage(messages.itemActions, { item: itemLabel })}\n isPending={pending !== null && menu.some((action) => action.id === pending)}\n />\n <Menu\n placement=\"bottom end\"\n onAction={(key) => {\n const action = menu.find((candidate) => candidate.id === key);\n if (action !== undefined && getActionHref(action, item) === null) {\n onRun(action);\n }\n }}\n >\n {menu.map((action) => {\n const href = getActionHref(action, item);\n const icon = getActionIcon(action, icons);\n return (\n <MenuItem\n key={action.id}\n id={action.id}\n isDanger={action.destructive === true}\n {...(icon !== undefined ? { icon } : {})}\n {...(href !== null ? { href } : {})}\n >\n {action.label}\n </MenuItem>\n );\n })}\n </Menu>\n </MenuTrigger>\n ) : null}\n </div>\n );\n}\n"],"mappings":"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"}
|
package/dist/actions/icons.d.ts
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
import { type LucideIcon } from 'lucide-react';
|
|
2
1
|
import type { Action } from '@panneau/protocol';
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import { type IconComponent } from '@panneau/ui';
|
|
3
|
+
/** Icons of actions by action id, for actions written in code (`{ archive: Archive }`). */
|
|
4
|
+
export type ActionIcons = Readonly<Record<string, IconComponent>>;
|
|
5
|
+
/**
|
|
6
|
+
* The icon of an action: the one given for its id in `icons`, then the Lucide icon its `icon`
|
|
7
|
+
* names (`"send"`, loaded when it first renders), then the icon of a built-in action.
|
|
8
|
+
*/
|
|
9
|
+
export declare function getActionIcon(action: Action, icons?: ActionIcons): IconComponent | undefined;
|
|
5
10
|
//# sourceMappingURL=icons.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../../src/actions/icons.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../../src/actions/icons.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,KAAK,aAAa,EAAgB,MAAM,aAAa,CAAC;AAE/D,2FAA2F;AAC3F,MAAM,MAAM,WAAW,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC;AAalE;;;GAGG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,WAAW,GAAG,aAAa,GAAG,SAAS,CAU5F"}
|
package/dist/actions/icons.js
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
|
+
import { getNamedIcon } from "@panneau/ui";
|
|
1
2
|
import { Copy, Download, Eye, Pencil, RotateCcw, Trash2, Upload } from "lucide-react";
|
|
2
3
|
//#region src/actions/icons.ts
|
|
3
|
-
/**
|
|
4
|
-
* Icons of the built-in actions. Icons named in definitions (`"icon": "send"`) need a lookup by
|
|
5
|
-
* name, which comes with the actions of Phase 2 (decision 0020).
|
|
6
|
-
*/
|
|
4
|
+
/** Icons of the built-in actions, when they don't name one. */
|
|
7
5
|
var BUILT_IN_ICONS = {
|
|
8
6
|
show: Eye,
|
|
9
7
|
edit: Pencil,
|
|
@@ -13,9 +11,15 @@ var BUILT_IN_ICONS = {
|
|
|
13
11
|
export: Download,
|
|
14
12
|
import: Upload
|
|
15
13
|
};
|
|
16
|
-
/**
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
/**
|
|
15
|
+
* The icon of an action: the one given for its id in `icons`, then the Lucide icon its `icon`
|
|
16
|
+
* names (`"send"`, loaded when it first renders), then the icon of a built-in action.
|
|
17
|
+
*/
|
|
18
|
+
function getActionIcon(action, icons) {
|
|
19
|
+
const given = icons !== void 0 && Object.hasOwn(icons, action.id) ? icons[action.id] : void 0;
|
|
20
|
+
if (given !== void 0) return given;
|
|
21
|
+
if (action.icon !== void 0 && action.icon !== "") return getNamedIcon(action.icon);
|
|
22
|
+
return Object.hasOwn(BUILT_IN_ICONS, action.id) ? BUILT_IN_ICONS[action.id] : void 0;
|
|
19
23
|
}
|
|
20
24
|
//#endregion
|
|
21
25
|
export { getActionIcon };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icons.js","names":[],"sources":["../../src/actions/icons.ts"],"sourcesContent":["import {\n Copy,\n Download,\n Eye,\n type LucideIcon,\n Pencil,\n RotateCcw,\n Trash2,\n Upload,\n} from 'lucide-react';\n\nimport type { Action } from '@panneau/protocol';\n\n
|
|
1
|
+
{"version":3,"file":"icons.js","names":[],"sources":["../../src/actions/icons.ts"],"sourcesContent":["import {\n Copy,\n Download,\n Eye,\n type LucideIcon,\n Pencil,\n RotateCcw,\n Trash2,\n Upload,\n} from 'lucide-react';\n\nimport type { Action } from '@panneau/protocol';\nimport { type IconComponent, getNamedIcon } from '@panneau/ui';\n\n/** Icons of actions by action id, for actions written in code (`{ archive: Archive }`). */\nexport type ActionIcons = Readonly<Record<string, IconComponent>>;\n\n/** Icons of the built-in actions, when they don't name one. */\nconst BUILT_IN_ICONS: Record<string, LucideIcon> = {\n show: Eye,\n edit: Pencil,\n duplicate: Copy,\n delete: Trash2,\n restore: RotateCcw,\n export: Download,\n import: Upload,\n};\n\n/**\n * The icon of an action: the one given for its id in `icons`, then the Lucide icon its `icon`\n * names (`\"send\"`, loaded when it first renders), then the icon of a built-in action.\n */\nexport function getActionIcon(action: Action, icons?: ActionIcons): IconComponent | undefined {\n const given =\n icons !== undefined && Object.hasOwn(icons, action.id) ? icons[action.id] : undefined;\n if (given !== undefined) {\n return given;\n }\n if (action.icon !== undefined && action.icon !== '') {\n return getNamedIcon(action.icon);\n }\n return Object.hasOwn(BUILT_IN_ICONS, action.id) ? BUILT_IN_ICONS[action.id] : undefined;\n}\n"],"mappings":";;;;AAkBA,IAAM,iBAA6C;CAC/C,MAAM;CACN,MAAM;CACN,WAAW;CACX,QAAQ;CACR,SAAS;CACT,QAAQ;CACR,QAAQ;AACZ;;;;;AAMA,SAAgB,cAAc,QAAgB,OAAgD;CAC1F,MAAM,QACF,UAAU,KAAA,KAAa,OAAO,OAAO,OAAO,OAAO,EAAE,IAAI,MAAM,OAAO,MAAM,KAAA;CAChF,IAAI,UAAU,KAAA,GACV,OAAO;CAEX,IAAI,OAAO,SAAS,KAAA,KAAa,OAAO,SAAS,IAC7C,OAAO,aAAa,OAAO,IAAI;CAEnC,OAAO,OAAO,OAAO,gBAAgB,OAAO,EAAE,IAAI,eAAe,OAAO,MAAM,KAAA;AAClF"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
.panneau-empty
|
|
1
|
+
.panneau-displays-empty {
|
|
2
2
|
color: var(--panneau-color-text-muted);
|
|
3
3
|
}
|
|
4
4
|
|
|
5
|
-
.panneau-text
|
|
5
|
+
.panneau-displays-text {
|
|
6
6
|
display: -webkit-box;
|
|
7
7
|
overflow: hidden;
|
|
8
8
|
-webkit-line-clamp: 2;
|
|
@@ -11,35 +11,35 @@
|
|
|
11
11
|
overflow-wrap: anywhere;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
.panneau-badges
|
|
14
|
+
.panneau-displays-badges {
|
|
15
15
|
display: inline-flex;
|
|
16
16
|
flex-wrap: wrap;
|
|
17
17
|
gap: var(--panneau-space-1);
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
.panneau-boolean
|
|
20
|
+
.panneau-displays-boolean {
|
|
21
21
|
display: inline-flex;
|
|
22
22
|
align-items: center;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
.panneau-true
|
|
25
|
+
.panneau-displays-true {
|
|
26
26
|
color: var(--panneau-color-success);
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
.panneau-false
|
|
29
|
+
.panneau-displays-false {
|
|
30
30
|
color: var(--panneau-color-text-muted);
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
.panneau-number
|
|
34
|
-
font-variant-numeric:
|
|
33
|
+
.panneau-displays-number {
|
|
34
|
+
font-variant-numeric: var(--panneau-font-numeric);
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
.panneau-link
|
|
37
|
+
.panneau-displays-link {
|
|
38
38
|
color: var(--panneau-color-link);
|
|
39
39
|
overflow-wrap: anywhere;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
.panneau-color
|
|
42
|
+
.panneau-displays-color {
|
|
43
43
|
display: inline-flex;
|
|
44
44
|
align-items: center;
|
|
45
45
|
gap: var(--panneau-space-2);
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
font-size: var(--panneau-font-size-sm);
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
.panneau-swatch
|
|
50
|
+
.panneau-displays-swatch {
|
|
51
51
|
flex: none;
|
|
52
52
|
width: 1rem;
|
|
53
53
|
height: 1rem;
|
|
@@ -55,13 +55,13 @@
|
|
|
55
55
|
border-radius: var(--panneau-radius-sm);
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
.panneau-media
|
|
58
|
+
.panneau-displays-media {
|
|
59
59
|
display: inline-flex;
|
|
60
60
|
align-items: center;
|
|
61
61
|
gap: var(--panneau-space-2);
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
.panneau-thumbnail
|
|
64
|
+
.panneau-displays-thumbnail {
|
|
65
65
|
flex: none;
|
|
66
66
|
width: 2.5rem;
|
|
67
67
|
height: 2.5rem;
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import "./Displays.css";
|
|
2
2
|
//#region src/displays/Displays.module.css
|
|
3
|
-
var empty = "panneau-empty
|
|
4
|
-
var text = "panneau-text
|
|
5
|
-
var badges = "panneau-badges
|
|
6
|
-
var boolean = "panneau-boolean
|
|
7
|
-
var number = "panneau-number
|
|
8
|
-
var link = "panneau-link
|
|
9
|
-
var color = "panneau-color
|
|
10
|
-
var swatch = "panneau-swatch
|
|
11
|
-
var media = "panneau-media
|
|
12
|
-
var thumbnail = "panneau-thumbnail
|
|
3
|
+
var empty = "panneau-displays-empty";
|
|
4
|
+
var text = "panneau-displays-text";
|
|
5
|
+
var badges = "panneau-displays-badges";
|
|
6
|
+
var boolean = "panneau-displays-boolean";
|
|
7
|
+
var number = "panneau-displays-number";
|
|
8
|
+
var link = "panneau-displays-link";
|
|
9
|
+
var color = "panneau-displays-color";
|
|
10
|
+
var swatch = "panneau-displays-swatch";
|
|
11
|
+
var media = "panneau-displays-media";
|
|
12
|
+
var thumbnail = "panneau-displays-thumbnail";
|
|
13
13
|
var Displays_module_default = {
|
|
14
14
|
empty,
|
|
15
15
|
text,
|
|
16
16
|
badges,
|
|
17
17
|
boolean,
|
|
18
|
-
"true": "panneau-true
|
|
19
|
-
"false": "panneau-false
|
|
18
|
+
"true": "panneau-displays-true",
|
|
19
|
+
"false": "panneau-displays-false",
|
|
20
20
|
number,
|
|
21
21
|
link,
|
|
22
22
|
color,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Displays.module.js","names":[],"sources":["../../src/displays/Displays.module.css"],"sourcesContent":[".empty {\n color: var(--panneau-color-text-muted);\n}\n\n.text {\n display: -webkit-box;\n overflow: hidden;\n -webkit-line-clamp: 2;\n line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow-wrap: anywhere;\n}\n\n.badges {\n display: inline-flex;\n flex-wrap: wrap;\n gap: var(--panneau-space-1);\n}\n\n.boolean {\n display: inline-flex;\n align-items: center;\n}\n\n.true {\n color: var(--panneau-color-success);\n}\n\n.false {\n color: var(--panneau-color-text-muted);\n}\n\n.number {\n font-variant-numeric:
|
|
1
|
+
{"version":3,"file":"Displays.module.js","names":[],"sources":["../../src/displays/Displays.module.css"],"sourcesContent":[".empty {\n color: var(--panneau-color-text-muted);\n}\n\n.text {\n display: -webkit-box;\n overflow: hidden;\n -webkit-line-clamp: 2;\n line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow-wrap: anywhere;\n}\n\n.badges {\n display: inline-flex;\n flex-wrap: wrap;\n gap: var(--panneau-space-1);\n}\n\n.boolean {\n display: inline-flex;\n align-items: center;\n}\n\n.true {\n color: var(--panneau-color-success);\n}\n\n.false {\n color: var(--panneau-color-text-muted);\n}\n\n.number {\n font-variant-numeric: var(--panneau-font-numeric);\n}\n\n.link {\n color: var(--panneau-color-link);\n overflow-wrap: anywhere;\n}\n\n.color {\n display: inline-flex;\n align-items: center;\n gap: var(--panneau-space-2);\n font-family: var(--panneau-font-family-mono);\n font-size: var(--panneau-font-size-sm);\n}\n\n.swatch {\n flex: none;\n width: 1rem;\n height: 1rem;\n border: var(--panneau-border-width) solid var(--panneau-color-border-control);\n border-radius: var(--panneau-radius-sm);\n}\n\n.media {\n display: inline-flex;\n align-items: center;\n gap: var(--panneau-space-2);\n}\n\n.thumbnail {\n flex: none;\n width: 2.5rem;\n height: 2.5rem;\n object-fit: cover;\n background-color: var(--panneau-color-surface-sunken);\n border-radius: var(--panneau-radius-sm);\n}\n"],"mappings":""}
|
package/dist/filters/Filters.css
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
.panneau-filters
|
|
1
|
+
.panneau-filters {
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-wrap: wrap;
|
|
4
4
|
align-items: flex-end;
|
|
5
5
|
gap: var(--panneau-space-3);
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
-
.panneau-control
|
|
8
|
+
.panneau-filters-control {
|
|
9
9
|
width: 12rem;
|
|
10
10
|
max-width: 100%;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
.panneau-toggle
|
|
13
|
+
.panneau-filters-toggle {
|
|
14
14
|
align-self: center;
|
|
15
15
|
min-height: var(--panneau-control-height);
|
|
16
16
|
display: flex;
|
|
17
17
|
align-items: center;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
.panneau-range
|
|
20
|
+
.panneau-filters-range {
|
|
21
21
|
display: flex;
|
|
22
22
|
flex-wrap: wrap;
|
|
23
23
|
gap: var(--panneau-space-2);
|
|
24
24
|
max-width: 100%;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
.panneau-range
|
|
27
|
+
.panneau-filters-range > :not(legend) {
|
|
28
28
|
width: 11rem;
|
|
29
29
|
max-width: 100%;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
.panneau-chips
|
|
32
|
+
.panneau-filters-chips {
|
|
33
33
|
display: flex;
|
|
34
34
|
flex-wrap: wrap;
|
|
35
35
|
align-items: center;
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
list-style: none;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
.panneau-chip
|
|
42
|
+
.panneau-filters-chip {
|
|
43
43
|
display: inline-flex;
|
|
44
44
|
align-items: center;
|
|
45
45
|
gap: var(--panneau-space-1);
|
|
@@ -51,21 +51,21 @@
|
|
|
51
51
|
border-radius: var(--panneau-radius-full);
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
.panneau-
|
|
54
|
+
.panneau-filters-chip-text {
|
|
55
55
|
overflow: hidden;
|
|
56
56
|
text-overflow: ellipsis;
|
|
57
57
|
white-space: nowrap;
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
.panneau-
|
|
60
|
+
.panneau-filters-chip-label {
|
|
61
61
|
color: var(--panneau-color-text-muted);
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
@container panneau-list (max-width: 40rem) {
|
|
65
|
-
.panneau-filters
|
|
66
|
-
.panneau-control
|
|
67
|
-
.panneau-range
|
|
68
|
-
.panneau-range
|
|
65
|
+
.panneau-filters,
|
|
66
|
+
.panneau-filters-control,
|
|
67
|
+
.panneau-filters-range,
|
|
68
|
+
.panneau-filters-range > :not(legend) {
|
|
69
69
|
width: 100%;
|
|
70
70
|
}
|
|
71
71
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import "./Filters.css";
|
|
2
2
|
//#region src/filters/Filters.module.css
|
|
3
|
-
var filters = "panneau-filters
|
|
4
|
-
var control = "panneau-control
|
|
5
|
-
var toggle = "panneau-toggle
|
|
6
|
-
var range = "panneau-range
|
|
7
|
-
var chips = "panneau-chips
|
|
8
|
-
var chip = "panneau-chip
|
|
9
|
-
var chipText = "panneau-
|
|
10
|
-
var chipLabel = "panneau-
|
|
3
|
+
var filters = "panneau-filters";
|
|
4
|
+
var control = "panneau-filters-control";
|
|
5
|
+
var toggle = "panneau-filters-toggle";
|
|
6
|
+
var range = "panneau-filters-range";
|
|
7
|
+
var chips = "panneau-filters-chips";
|
|
8
|
+
var chip = "panneau-filters-chip";
|
|
9
|
+
var chipText = "panneau-filters-chip-text";
|
|
10
|
+
var chipLabel = "panneau-filters-chip-label";
|
|
11
11
|
var Filters_module_default = {
|
|
12
12
|
filters,
|
|
13
13
|
control,
|
|
@@ -8,8 +8,8 @@ export declare function ToggleFilter({ label, value, onChange }: FilterControlPr
|
|
|
8
8
|
/** A day (`2026-10-15`). */
|
|
9
9
|
export declare function DateFilter({ label, value, onChange }: FilterControlProps): import("react").JSX.Element;
|
|
10
10
|
/**
|
|
11
|
-
* A range of days, sent as
|
|
12
|
-
*
|
|
11
|
+
* A range of days, sent as its bounds (`filter[published_at][from]=2026-01-01&…[to]=…`). Either end
|
|
12
|
+
* can be open: it is left out.
|
|
13
13
|
*/
|
|
14
14
|
export declare function DateRangeFilter({ label, value, onChange }: FilterControlProps): import("react").JSX.Element;
|
|
15
15
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"controls.d.ts","sourceRoot":"","sources":["../../src/filters/controls.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"controls.d.ts","sourceRoot":"","sources":["../../src/filters/controls.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAchE,kEAAkE;AAClE,wBAAgB,UAAU,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,kBAAkB,+BAmBxE;AAED,8DAA8D;AAC9D,wBAAgB,YAAY,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,kBAAkB,+BAgC3F;AAED,iEAAiE;AACjE,wBAAgB,YAAY,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,kBAAkB,+BAU1E;AAED,4BAA4B;AAC5B,wBAAgB,UAAU,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,kBAAkB,+BASxE;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,kBAAkB,+BA4B7E;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,EAC3B,MAAM,EACN,KAAK,EACL,KAAK,EACL,QAAQ,EACR,OAAO,EACP,aAAa,GAChB,EAAE,kBAAkB,+BA8CpB;AAED,oFAAoF;AACpF,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAOhE,CAAC"}
|