@plumile/ui 0.1.115 → 0.1.116
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/lib/esm/admin/templates/admin_shell_layout/AdminShellLayout.js +15 -14
- package/lib/esm/admin/templates/admin_shell_layout/AdminShellLayout.js.map +1 -1
- package/lib/esm/atomic/molecules/markdown/components/MarkdownArticleContainer.css.js +0 -1
- package/lib/esm/atomic/molecules/markdown/components/MarkdownTableCell.css.js +1 -0
- package/lib/esm/backoffice/organisms/backoffice_data_table/BackofficeDataTable.js +59 -56
- package/lib/esm/backoffice/organisms/backoffice_data_table/BackofficeDataTable.js.map +1 -1
- package/lib/esm/backoffice/organisms/backoffice_data_table/backofficeDataTable.css.js +2 -2
- package/lib/esm/backoffice/organisms/backoffice_data_table/backofficeDataTable.css.js.map +1 -1
- package/lib/esm/backoffice/organisms/backoffice_virtualized_connection_table/BackofficeVirtualizedConnectionTable.js +3 -2
- package/lib/esm/backoffice/organisms/backoffice_virtualized_connection_table/BackofficeVirtualizedConnectionTable.js.map +1 -1
- package/lib/esm/backoffice/templates/detail_page_template/DetailPageTemplate.js +42 -39
- package/lib/esm/backoffice/templates/detail_page_template/DetailPageTemplate.js.map +1 -1
- package/lib/esm/backoffice/templates/detail_page_template/detailPageTemplate.css.js +3 -3
- package/lib/esm/backoffice/templates/detail_page_template/detailPageTemplate.css.js.map +1 -1
- package/lib/esm/backoffice/templates/list_page_template/ListPageTemplate.js +45 -29
- package/lib/esm/backoffice/templates/list_page_template/ListPageTemplate.js.map +1 -1
- package/lib/esm/backoffice/templates/list_page_template/listPageTemplate.css.js +73 -13
- package/lib/esm/backoffice/templates/list_page_template/listPageTemplate.css.js.map +1 -1
- package/lib/esm/components/data-table/DataTable.css.js +52 -52
- package/lib/esm/components/data-table/DataTable.css.js.map +1 -1
- package/lib/esm/components/data-table/DataTable.js +43 -39
- package/lib/esm/components/data-table/DataTable.js.map +1 -1
- package/lib/esm/components/data-table/ResponsiveRecordList.css.js +7 -7
- package/lib/esm/components/data-table/ResponsiveRecordList.css.js.map +1 -1
- package/lib/esm/components/data-table/ResponsiveRecordList.js +86 -61
- package/lib/esm/components/data-table/ResponsiveRecordList.js.map +1 -1
- package/lib/esm/components/data-table/VirtualizedConnectionTable.js +158 -142
- package/lib/esm/components/data-table/VirtualizedConnectionTable.js.map +1 -1
- package/lib/esm/components/layout/AppShell.js +2 -1
- package/lib/esm/components/layout/AppShell.js.map +1 -1
- package/lib/esm/components/layout/PageShell.css.js +8 -8
- package/lib/esm/components/layout/PageShell.css.js.map +1 -1
- package/lib/esm/components/layout/PageShell.js +115 -107
- package/lib/esm/components/layout/PageShell.js.map +1 -1
- package/lib/esm/style.css +1 -1
- package/lib/types/admin/templates/admin_shell_layout/AdminShellLayout.d.ts +3 -2
- package/lib/types/admin/templates/admin_shell_layout/AdminShellLayout.d.ts.map +1 -1
- package/lib/types/backoffice/organisms/backoffice_data_table/BackofficeDataTable.d.ts +3 -2
- package/lib/types/backoffice/organisms/backoffice_data_table/BackofficeDataTable.d.ts.map +1 -1
- package/lib/types/backoffice/organisms/backoffice_data_table/backofficeDataTable.css.d.ts +1 -0
- package/lib/types/backoffice/organisms/backoffice_data_table/backofficeDataTable.css.d.ts.map +1 -1
- package/lib/types/backoffice/organisms/backoffice_virtualized_connection_table/BackofficeVirtualizedConnectionTable.d.ts +3 -2
- package/lib/types/backoffice/organisms/backoffice_virtualized_connection_table/BackofficeVirtualizedConnectionTable.d.ts.map +1 -1
- package/lib/types/backoffice/templates/detail_page_template/DetailPageTemplate.d.ts.map +1 -1
- package/lib/types/backoffice/templates/detail_page_template/detailPageTemplate.css.d.ts +5 -0
- package/lib/types/backoffice/templates/detail_page_template/detailPageTemplate.css.d.ts.map +1 -1
- package/lib/types/backoffice/templates/list_page_template/ListPageTemplate.d.ts +1 -0
- package/lib/types/backoffice/templates/list_page_template/ListPageTemplate.d.ts.map +1 -1
- package/lib/types/backoffice/templates/list_page_template/listPageTemplate.css.d.ts +17 -2
- package/lib/types/backoffice/templates/list_page_template/listPageTemplate.css.d.ts.map +1 -1
- package/lib/types/components/data-table/DataTable.css.d.ts +2 -0
- package/lib/types/components/data-table/DataTable.css.d.ts.map +1 -1
- package/lib/types/components/data-table/DataTable.d.ts +5 -2
- package/lib/types/components/data-table/DataTable.d.ts.map +1 -1
- package/lib/types/components/data-table/ResponsiveRecordList.css.d.ts +2 -0
- package/lib/types/components/data-table/ResponsiveRecordList.css.d.ts.map +1 -1
- package/lib/types/components/data-table/ResponsiveRecordList.d.ts +1 -1
- package/lib/types/components/data-table/ResponsiveRecordList.d.ts.map +1 -1
- package/lib/types/components/data-table/VirtualizedConnectionTable.d.ts +3 -2
- package/lib/types/components/data-table/VirtualizedConnectionTable.d.ts.map +1 -1
- package/lib/types/components/layout/AppShell.d.ts +3 -2
- package/lib/types/components/layout/AppShell.d.ts.map +1 -1
- package/lib/types/components/layout/PageShell.css.d.ts +3 -0
- package/lib/types/components/layout/PageShell.css.d.ts.map +1 -1
- package/lib/types/components/layout/PageShell.d.ts +3 -1
- package/lib/types/components/layout/PageShell.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -1,43 +1,59 @@
|
|
|
1
1
|
import { cx as e } from "../../../theme/tools.js";
|
|
2
2
|
import { BackofficeDataTable as t } from "../../organisms/backoffice_data_table/BackofficeDataTable.js";
|
|
3
3
|
import { EntityHeader as n } from "../../organisms/entity_header/EntityHeader.js";
|
|
4
|
-
import { container as r,
|
|
5
|
-
import { jsx as
|
|
4
|
+
import { container as r, containerContained as i, containerPresentation as a, containerRows as o, headerCard as s, headerPresentation as c, tableCard as l, tableCardContained as u, tableFooter as d, tablePresentation as f, tableScroll as p, tableScrollContained as m, toolbarPresentation as h } from "./listPageTemplate.css.js";
|
|
5
|
+
import { jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
6
6
|
//#region src/backoffice/templates/list_page_template/ListPageTemplate.tsx
|
|
7
|
-
var
|
|
8
|
-
let { presentation:
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
T
|
|
14
|
-
let
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
7
|
+
var v = (v) => {
|
|
8
|
+
let { presentation: y = "framed", className: b, toolbarNode: x, statusNode: S, tableFooterNode: C, bodyScrollMode: w = "page" } = v, T = w === "contained", E = x != null, D = S != null, O = o({
|
|
9
|
+
scrollMode: w,
|
|
10
|
+
toolbar: E,
|
|
11
|
+
status: D
|
|
12
|
+
}), k = null, A = null, j = null;
|
|
13
|
+
T && (k = i, A = u, j = m);
|
|
14
|
+
let M = e(r, O, k, a[y], b), N;
|
|
15
|
+
N = "headerNode" in v ? v.headerNode : /* @__PURE__ */ g(n, { ...v.header });
|
|
16
|
+
let P;
|
|
17
|
+
P = "tableNode" in v ? v.tableNode : /* @__PURE__ */ g(t, {
|
|
18
|
+
...v.table,
|
|
19
|
+
bodyScrollMode: w
|
|
20
|
+
});
|
|
21
|
+
let F = null;
|
|
22
|
+
return C != null && (F = /* @__PURE__ */ g("div", {
|
|
23
|
+
className: d,
|
|
24
|
+
"data-list-template-slot": "table-footer",
|
|
25
|
+
children: C
|
|
26
|
+
})), /* @__PURE__ */ _("div", {
|
|
27
|
+
className: M,
|
|
28
|
+
"data-scroll-mode": w,
|
|
20
29
|
children: [
|
|
21
|
-
/* @__PURE__ */
|
|
22
|
-
className: e(s, c[
|
|
23
|
-
|
|
30
|
+
/* @__PURE__ */ g("div", {
|
|
31
|
+
className: e(s, c[y]),
|
|
32
|
+
"data-list-template-slot": "header",
|
|
33
|
+
children: N
|
|
34
|
+
}),
|
|
35
|
+
E && /* @__PURE__ */ g("div", {
|
|
36
|
+
className: e("dlvvnqm", h[y]),
|
|
37
|
+
"data-list-template-slot": "toolbar",
|
|
38
|
+
children: x
|
|
24
39
|
}),
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
children:
|
|
40
|
+
D && /* @__PURE__ */ g("div", {
|
|
41
|
+
"data-list-template-slot": "status",
|
|
42
|
+
children: S
|
|
28
43
|
}),
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
children: [/* @__PURE__ */
|
|
33
|
-
className:
|
|
34
|
-
|
|
35
|
-
|
|
44
|
+
/* @__PURE__ */ _("div", {
|
|
45
|
+
className: e(l, A, f[y]),
|
|
46
|
+
"data-list-template-slot": "table",
|
|
47
|
+
children: [/* @__PURE__ */ g("div", {
|
|
48
|
+
className: e(p, j),
|
|
49
|
+
"data-list-template-slot": "table-scroll",
|
|
50
|
+
children: P
|
|
51
|
+
}), F]
|
|
36
52
|
})
|
|
37
53
|
]
|
|
38
54
|
});
|
|
39
55
|
};
|
|
40
56
|
//#endregion
|
|
41
|
-
export {
|
|
57
|
+
export { v as ListPageTemplate, v as default };
|
|
42
58
|
|
|
43
59
|
//# sourceMappingURL=ListPageTemplate.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListPageTemplate.js","names":[],"sources":["../../../../../src/backoffice/templates/list_page_template/ListPageTemplate.tsx"],"sourcesContent":["import { type JSX, type ReactNode } from 'react';\n\nimport {\n BackofficeDataTable,\n type BackofficeDataTableProps,\n} from '../../organisms/backoffice_data_table/BackofficeDataTable.js';\nimport {\n EntityHeader,\n type EntityHeaderProps,\n} from '../../organisms/entity_header/EntityHeader.js';\n\nimport * as styles from './listPageTemplate.css.js';\nimport { cx } from '../../../theme/tools.js';\n\ntype ListBaseProps = {\n toolbarNode?: ReactNode;\n statusNode?: ReactNode;\n tableFooterNode?: ReactNode;\n presentation?: 'framed' | 'flat';\n className?: string;\n};\n\ntype ListWithHeaderProps<Row> = ListBaseProps & {\n header: EntityHeaderProps;\n headerNode?: never;\n table: BackofficeDataTableProps<Row>;\n tableNode?: never;\n};\n\ntype ListWithHeaderNode<Row> = ListBaseProps & {\n header?: never;\n headerNode: ReactNode;\n table: BackofficeDataTableProps<Row>;\n tableNode?: never;\n};\n\ntype ListWithCustomTable =\n | (ListBaseProps & {\n header: EntityHeaderProps;\n headerNode?: never;\n table?: never;\n tableNode: ReactNode;\n })\n | (ListBaseProps & {\n header?: never;\n headerNode: ReactNode;\n table?: never;\n tableNode: ReactNode;\n });\n\nexport type ListPageTemplateProps<Row> =\n | ListWithHeaderProps<Row>\n | ListWithHeaderNode<Row>\n | ListWithCustomTable;\n\nexport const ListPageTemplate = <Row,>(\n props: ListPageTemplateProps<Row>,\n): JSX.Element => {\n const {\n presentation = 'framed',\n className,\n toolbarNode,\n statusNode,\n tableFooterNode,\n } = props;\n\n
|
|
1
|
+
{"version":3,"file":"ListPageTemplate.js","names":[],"sources":["../../../../../src/backoffice/templates/list_page_template/ListPageTemplate.tsx"],"sourcesContent":["import { type JSX, type ReactNode } from 'react';\n\nimport {\n BackofficeDataTable,\n type BackofficeDataTableProps,\n} from '../../organisms/backoffice_data_table/BackofficeDataTable.js';\nimport {\n EntityHeader,\n type EntityHeaderProps,\n} from '../../organisms/entity_header/EntityHeader.js';\n\nimport * as styles from './listPageTemplate.css.js';\nimport { cx } from '../../../theme/tools.js';\n\ntype ListBaseProps = {\n toolbarNode?: ReactNode;\n statusNode?: ReactNode;\n tableFooterNode?: ReactNode;\n presentation?: 'framed' | 'flat';\n className?: string;\n bodyScrollMode?: 'page' | 'contained';\n};\n\ntype ListWithHeaderProps<Row> = ListBaseProps & {\n header: EntityHeaderProps;\n headerNode?: never;\n table: BackofficeDataTableProps<Row>;\n tableNode?: never;\n};\n\ntype ListWithHeaderNode<Row> = ListBaseProps & {\n header?: never;\n headerNode: ReactNode;\n table: BackofficeDataTableProps<Row>;\n tableNode?: never;\n};\n\ntype ListWithCustomTable =\n | (ListBaseProps & {\n header: EntityHeaderProps;\n headerNode?: never;\n table?: never;\n tableNode: ReactNode;\n })\n | (ListBaseProps & {\n header?: never;\n headerNode: ReactNode;\n table?: never;\n tableNode: ReactNode;\n });\n\nexport type ListPageTemplateProps<Row> =\n | ListWithHeaderProps<Row>\n | ListWithHeaderNode<Row>\n | ListWithCustomTable;\n\nexport const ListPageTemplate = <Row,>(\n props: ListPageTemplateProps<Row>,\n): JSX.Element => {\n const {\n presentation = 'framed',\n className,\n toolbarNode,\n statusNode,\n tableFooterNode,\n bodyScrollMode = 'page',\n } = props;\n const hasContainedBodyScroll = bodyScrollMode === 'contained';\n\n const hasToolbar = toolbarNode != null;\n const hasStatus = statusNode != null;\n const containerVariant = styles.containerRows({\n scrollMode: bodyScrollMode,\n toolbar: hasToolbar,\n status: hasStatus,\n });\n let containedContainerClassName: string | null = null;\n let containedTableCardClassName: string | null = null;\n let containedTableScrollClassName: string | null = null;\n if (hasContainedBodyScroll) {\n containedContainerClassName = styles.containerContained;\n containedTableCardClassName = styles.tableCardContained;\n containedTableScrollClassName = styles.tableScrollContained;\n }\n\n const containerClasses = cx(\n styles.container,\n containerVariant,\n containedContainerClassName,\n styles.containerPresentation[presentation],\n className,\n );\n\n let resolvedHeader: ReactNode;\n if ('headerNode' in props) {\n resolvedHeader = props.headerNode;\n } else {\n resolvedHeader = <EntityHeader {...props.header} />;\n }\n\n let resolvedTable: ReactNode;\n if ('tableNode' in props) {\n resolvedTable = props.tableNode;\n } else {\n resolvedTable = (\n <BackofficeDataTable {...props.table} bodyScrollMode={bodyScrollMode} />\n );\n }\n\n let footerSection: ReactNode | null = null;\n if (tableFooterNode != null) {\n footerSection = (\n <div\n className={styles.tableFooter}\n data-list-template-slot=\"table-footer\"\n >\n {tableFooterNode}\n </div>\n );\n }\n\n return (\n <div className={containerClasses} data-scroll-mode={bodyScrollMode}>\n <div\n className={cx(\n styles.headerCard,\n styles.headerPresentation[presentation],\n )}\n data-list-template-slot=\"header\"\n >\n {resolvedHeader}\n </div>\n {hasToolbar && (\n <div\n className={cx(\n styles.toolbarCard,\n styles.toolbarPresentation[presentation],\n )}\n data-list-template-slot=\"toolbar\"\n >\n {toolbarNode}\n </div>\n )}\n {hasStatus && <div data-list-template-slot=\"status\">{statusNode}</div>}\n <div\n className={cx(\n styles.tableCard,\n containedTableCardClassName,\n styles.tablePresentation[presentation],\n )}\n data-list-template-slot=\"table\"\n >\n <div\n className={cx(styles.tableScroll, containedTableScrollClassName)}\n data-list-template-slot=\"table-scroll\"\n >\n {resolvedTable}\n </div>\n {footerSection}\n </div>\n </div>\n );\n};\n\nexport default ListPageTemplate;\n"],"mappings":";;;;;;AAwDA,IAAa,KACX,MACgB;CAChB,IAAM,EACJ,kBAAe,UACf,cACA,gBACA,eACA,oBACA,oBAAiB,WACf,GACE,IAAyB,MAAmB,aAE5C,IAAa,KAAe,MAC5B,IAAY,KAAc,MAC1B,IAAmB,EAAqB;EAC5C,YAAY;EACZ,SAAS;EACT,QAAQ;EACT,CAAC,EACE,IAA6C,MAC7C,IAA6C,MAC7C,IAA+C;CACnD,AAAI,MACF,IAA8B,GAC9B,IAA8B,GAC9B,IAAgC;CAGlC,IAAM,IAAmB,EACvB,GACA,GACA,GACA,EAA6B,IAC7B,EACD,EAEG;CACJ,AAGE,IAHE,gBAAgB,IACD,EAAM,aAEN,kBAAC,GAAD,EAAc,GAAI,EAAM,QAAU,CAAA;CAGrD,IAAI;CACJ,AAGE,IAHE,eAAe,IACD,EAAM,YAGpB,kBAAC,GAAD;EAAqB,GAAI,EAAM;EAAuB;EAAkB,CAAA;CAI5E,IAAI,IAAkC;CAYtC,OAXI,KAAmB,SACrB,IACE,kBAAC,OAAD;EACE,WAAW;EACX,2BAAwB;YAEvB;EACG,CAAA,GAKR,kBAAC,OAAD;EAAK,WAAW;EAAkB,oBAAkB;YAApD;GACE,kBAAC,OAAD;IACE,WAAW,EACT,GACA,EAA0B,GAC3B;IACD,2BAAwB;cAEvB;IACG,CAAA;GACL,KACC,kBAAC,OAAD;IACE,WAAW,EACT,WACA,EAA2B,GAC5B;IACD,2BAAwB;cAEvB;IACG,CAAA;GAEP,KAAa,kBAAC,OAAD;IAAK,2BAAwB;cAAU;IAAiB,CAAA;GACtE,kBAAC,OAAD;IACE,WAAW,EACT,GACA,GACA,EAAyB,GAC1B;IACD,2BAAwB;cAN1B,CAQE,kBAAC,OAAD;KACE,WAAW,EAAG,GAAoB,EAA8B;KAChE,2BAAwB;eAEvB;KACG,CAAA,EACL,EACG;;GACF"}
|
|
@@ -7,21 +7,81 @@
|
|
|
7
7
|
/* empty css */
|
|
8
8
|
/* empty css */
|
|
9
9
|
/* empty css */
|
|
10
|
+
import { createRuntimeFn as e } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
10
11
|
//#region src/backoffice/templates/list_page_template/listPageTemplate.css.ts
|
|
11
|
-
var
|
|
12
|
-
framed: "
|
|
13
|
-
flat: "
|
|
14
|
-
},
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
var t = "dlvvnq0 txvbqb9iy", n = "dlvvnq1 txvbqbcgg txvbqbjh7", r = {
|
|
13
|
+
framed: "dlvvnq2 txvbqbaog",
|
|
14
|
+
flat: "dlvvnq3 txvbqbao7"
|
|
15
|
+
}, i = e({
|
|
16
|
+
defaultClassName: "dlvvnq4",
|
|
17
|
+
variantClassNames: {
|
|
18
|
+
scrollMode: {
|
|
19
|
+
page: "dlvvnq5",
|
|
20
|
+
contained: "dlvvnq6"
|
|
21
|
+
},
|
|
22
|
+
toolbar: {
|
|
23
|
+
true: "dlvvnq7",
|
|
24
|
+
false: "dlvvnq8"
|
|
25
|
+
},
|
|
26
|
+
status: {
|
|
27
|
+
true: "dlvvnq9",
|
|
28
|
+
false: "dlvvnqa"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
defaultVariants: {},
|
|
32
|
+
compoundVariants: [
|
|
33
|
+
[{
|
|
34
|
+
scrollMode: "page",
|
|
35
|
+
toolbar: !0,
|
|
36
|
+
status: !0
|
|
37
|
+
}, "dlvvnqb"],
|
|
38
|
+
[{
|
|
39
|
+
scrollMode: "page",
|
|
40
|
+
toolbar: !0,
|
|
41
|
+
status: !1
|
|
42
|
+
}, "dlvvnqc"],
|
|
43
|
+
[{
|
|
44
|
+
scrollMode: "page",
|
|
45
|
+
toolbar: !1,
|
|
46
|
+
status: !0
|
|
47
|
+
}, "dlvvnqd"],
|
|
48
|
+
[{
|
|
49
|
+
scrollMode: "page",
|
|
50
|
+
toolbar: !1,
|
|
51
|
+
status: !1
|
|
52
|
+
}, "dlvvnqe"],
|
|
53
|
+
[{
|
|
54
|
+
scrollMode: "contained",
|
|
55
|
+
toolbar: !0,
|
|
56
|
+
status: !0
|
|
57
|
+
}, "dlvvnqf"],
|
|
58
|
+
[{
|
|
59
|
+
scrollMode: "contained",
|
|
60
|
+
toolbar: !0,
|
|
61
|
+
status: !1
|
|
62
|
+
}, "dlvvnqg"],
|
|
63
|
+
[{
|
|
64
|
+
scrollMode: "contained",
|
|
65
|
+
toolbar: !1,
|
|
66
|
+
status: !0
|
|
67
|
+
}, "dlvvnqh"],
|
|
68
|
+
[{
|
|
69
|
+
scrollMode: "contained",
|
|
70
|
+
toolbar: !1,
|
|
71
|
+
status: !1
|
|
72
|
+
}, "dlvvnqi"]
|
|
73
|
+
]
|
|
74
|
+
}), a = "dlvvnqj", o = {
|
|
75
|
+
framed: "dlvvnqk _1995g4r1 _1995g4r0 _1995g4r2 _1995g4rb _1995g4rd _1995g4rg _1995g4rm",
|
|
76
|
+
flat: "dlvvnql txvbqbnvp txvbqboiy txvbqbp67 txvbqblxy"
|
|
77
|
+
}, s = "dlvvnqm", c = {
|
|
18
78
|
framed: "_1995g4r1 _1995g4r0 _1995g4r4 _1995g4ra _1995g4rd _1995g4rg _1995g4rk",
|
|
19
|
-
flat: "
|
|
20
|
-
},
|
|
21
|
-
framed: "
|
|
22
|
-
flat: "
|
|
23
|
-
},
|
|
79
|
+
flat: "dlvvnqn _1995g4r1 _1995g4r0 _1995g4r4 _1995g4ra _1995g4rd _1995g4rg _1995g4rk"
|
|
80
|
+
}, l = "dlvvnqp dlvvnqo txvbqb9ip txvbqbai7 txvbqbaog", u = "dlvvnqq txvbqbcgg txvbqbjh7", d = {
|
|
81
|
+
framed: "dlvvnqr _1995g4r1 _1995g4r0 _1995g4r5 _1995g4rb _1995g4rd _1995g4rg _1995g4rk",
|
|
82
|
+
flat: "dlvvnqs _1995g4r1 _1995g4r0 _1995g4r5 _1995g4ra _1995g4rd _1995g4rg _1995g4rk"
|
|
83
|
+
}, f = "dlvvnqt", p = "dlvvnqu txvbqb9my txvbqbjh7", m = "dlvvnqv txvbqbhxp";
|
|
24
84
|
//#endregion
|
|
25
|
-
export {
|
|
85
|
+
export { t as container, n as containerContained, r as containerPresentation, i as containerRows, a as headerCard, o as headerPresentation, l as tableCard, u as tableCardContained, m as tableFooter, d as tablePresentation, f as tableScroll, p as tableScrollContained, s as toolbarCard, c as toolbarPresentation };
|
|
26
86
|
|
|
27
87
|
//# sourceMappingURL=listPageTemplate.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listPageTemplate.css.js","names":[],"sources":["../../../../../src/backoffice/templates/list_page_template/listPageTemplate.css.ts"],"sourcesContent":["import { style } from '@vanilla-extract/css';\n\nimport { adminSurfaceRecipe } from '../../../admin/theme/adminSurface.css.js';\nimport { sprinkles } from '../../../theme/sprinkles.css.js';\nimport { vars } from '../../../theme/themeContract.js';\n\nexport const container = sprinkles({\n display: 'grid',\n});\n\nexport const containerPresentation = {\n framed: sprinkles({\n gap: 3,\n }),\n flat: sprinkles({\n gap: 2,\n }),\n};\n\nexport const
|
|
1
|
+
{"version":3,"file":"listPageTemplate.css.js","names":[],"sources":["../../../../../src/backoffice/templates/list_page_template/listPageTemplate.css.ts"],"sourcesContent":["import { style } from '@vanilla-extract/css';\nimport { recipe } from '@vanilla-extract/recipes';\n\nimport { adminSurfaceRecipe } from '../../../admin/theme/adminSurface.css.js';\nimport { sprinkles } from '../../../theme/sprinkles.css.js';\nimport { vars } from '../../../theme/themeContract.js';\n\nexport const container = sprinkles({\n display: 'grid',\n});\n\nexport const containerContained = sprinkles({\n height: 'full',\n minHeight: 0,\n});\n\nexport const containerPresentation = {\n framed: sprinkles({\n gap: 3,\n }),\n flat: sprinkles({\n gap: 2,\n }),\n};\n\nexport const containerRows = recipe({\n variants: {\n scrollMode: {\n page: {},\n contained: {},\n },\n toolbar: {\n true: {},\n false: {},\n },\n status: {\n true: {},\n false: {},\n },\n },\n compoundVariants: [\n {\n variants: { scrollMode: 'page', toolbar: true, status: true },\n style: { gridTemplateRows: 'auto auto auto minmax(0, auto)' },\n },\n {\n variants: { scrollMode: 'page', toolbar: true, status: false },\n style: { gridTemplateRows: 'auto auto minmax(0, auto)' },\n },\n {\n variants: { scrollMode: 'page', toolbar: false, status: true },\n style: { gridTemplateRows: 'auto auto minmax(0, auto)' },\n },\n {\n variants: { scrollMode: 'page', toolbar: false, status: false },\n style: { gridTemplateRows: 'auto minmax(0, auto)' },\n },\n {\n variants: { scrollMode: 'contained', toolbar: true, status: true },\n style: { gridTemplateRows: 'auto auto auto minmax(0, 1fr)' },\n },\n {\n variants: { scrollMode: 'contained', toolbar: true, status: false },\n style: { gridTemplateRows: 'auto auto minmax(0, 1fr)' },\n },\n {\n variants: { scrollMode: 'contained', toolbar: false, status: true },\n style: { gridTemplateRows: 'auto auto minmax(0, 1fr)' },\n },\n {\n variants: { scrollMode: 'contained', toolbar: false, status: false },\n style: { gridTemplateRows: 'auto minmax(0, 1fr)' },\n },\n ],\n});\n\nexport const headerCard = style([\n {\n minWidth: 0,\n },\n]);\n\nexport const headerPresentation = {\n framed: style([\n adminSurfaceRecipe({\n level: 'panel',\n radius: 'lg',\n border: 'subtle',\n elevation: 'none',\n padding: 'lg',\n }),\n {\n backgroundImage: `linear-gradient(135deg, color-mix(in srgb, ${vars.colors.surface} 88%, ${vars.colors['blue-50']}) 0%, ${vars.colors.surface} 58%)`,\n },\n ]),\n flat: sprinkles({\n paddingX: 1,\n paddingY: 1,\n }),\n};\n\nexport const toolbarCard = style([\n {\n minWidth: 0,\n },\n]);\n\nexport const toolbarPresentation = {\n framed: adminSurfaceRecipe({\n level: 'toolbar',\n radius: 'md',\n border: 'subtle',\n elevation: 'none',\n padding: 'sm',\n }),\n flat: style([\n adminSurfaceRecipe({\n level: 'toolbar',\n radius: 'md',\n border: 'subtle',\n elevation: 'none',\n padding: 'sm',\n }),\n {\n boxShadow: `0 1px 0 ${vars.colors.borderLight}`,\n },\n ]),\n};\n\nexport const tableCard = style([\n sprinkles({\n display: 'flex',\n flexDirection: 'column',\n gap: 3,\n }),\n {\n minHeight: 0,\n minWidth: 0,\n },\n]);\n\nexport const tableCardContained = sprinkles({\n height: 'full',\n minHeight: 0,\n});\n\nexport const tablePresentation = {\n framed: style([\n adminSurfaceRecipe({\n level: 'table',\n radius: 'lg',\n border: 'subtle',\n elevation: 'none',\n padding: 'sm',\n }),\n {\n boxShadow: `0 1px 0 ${vars.colors.borderSubtle}`,\n },\n ]),\n flat: style([\n adminSurfaceRecipe({\n level: 'table',\n radius: 'md',\n border: 'subtle',\n elevation: 'none',\n padding: 'sm',\n }),\n {\n boxShadow: `0 1px 0 ${vars.colors.borderLight}`,\n },\n ]),\n};\n\nexport const tableScroll = style({\n overflowX: 'auto',\n overflowY: 'visible',\n scrollbarWidth: 'thin',\n scrollbarColor: `${vars.colors.border} transparent`,\n});\n\nexport const tableScrollContained = sprinkles({\n flex: 1,\n minHeight: 0,\n});\n\nexport const tableFooter = sprinkles({\n marginTop: 0,\n});\n"],"mappings":""}
|
|
@@ -10,103 +10,103 @@ var t = e({
|
|
|
10
10
|
} },
|
|
11
11
|
defaultVariants: { kind: "default" },
|
|
12
12
|
compoundVariants: []
|
|
13
|
-
}), n = e({
|
|
14
|
-
defaultClassName: "
|
|
13
|
+
}), n = "ysn8466 txvbqbcgg txvbqbjh7 txvbqbl7g", r = e({
|
|
14
|
+
defaultClassName: "ysn8469",
|
|
15
15
|
variantClassNames: { kind: {
|
|
16
|
-
default: "
|
|
17
|
-
brandTable: "
|
|
16
|
+
default: "ysn846a ysn8467 txvbqb12g txvbqb1qg txvbqb62p txvbqb3ny txvbqbv45",
|
|
17
|
+
brandTable: "ysn846b ysn8468 txvbqbv0t txvbqb12g txvbqb1qg txvbqb62p txvbqb3s7"
|
|
18
18
|
} },
|
|
19
19
|
defaultVariants: { kind: "default" },
|
|
20
20
|
compoundVariants: []
|
|
21
|
-
}),
|
|
22
|
-
defaultClassName: "
|
|
21
|
+
}), i = "ysn846c txvbqb9iy txvbqbu7g txvbqbc7", a = "var(--ysn846d)", o = "var(--ysn846e)", s = "var(--ysn846f)", c = "var(--ysn846g)", l = e({
|
|
22
|
+
defaultClassName: "ysn846h",
|
|
23
23
|
variantClassNames: { density: {
|
|
24
|
-
compact: "
|
|
25
|
-
default: "
|
|
26
|
-
comfortable: "
|
|
24
|
+
compact: "ysn846i",
|
|
25
|
+
default: "ysn846j",
|
|
26
|
+
comfortable: "ysn846k"
|
|
27
27
|
} },
|
|
28
28
|
defaultVariants: { density: "default" },
|
|
29
29
|
compoundVariants: []
|
|
30
|
-
}),
|
|
31
|
-
defaultClassName: "
|
|
30
|
+
}), u = e({
|
|
31
|
+
defaultClassName: "ysn846p ysn846l txvbqbcp txvbqb9ip txvbqbaj7 txvbqbao7 txvbqbl7g txvbqbt7g txvbqbuxg",
|
|
32
32
|
variantClassNames: { kind: {
|
|
33
|
-
default: "
|
|
34
|
-
brandTable: "
|
|
33
|
+
default: "ysn846q ysn846n ysn846m txvbqbva1 txvbqbamp txvbqbefy txvbqb66",
|
|
34
|
+
brandTable: "ysn846r ysn846o txvbqbnvg txvbqboip txvbqbp6y txvbqblyp txvbqbv8z txvbqbamy txvbqb8p txvbqbefg txvbqb66 txvbqb54y"
|
|
35
35
|
} },
|
|
36
36
|
defaultVariants: { kind: "default" },
|
|
37
37
|
compoundVariants: []
|
|
38
|
-
}),
|
|
39
|
-
defaultClassName: "
|
|
38
|
+
}), d = e({
|
|
39
|
+
defaultClassName: "ysn846u ysn846s txvbqb9ip txvbqbai7",
|
|
40
40
|
variantClassNames: { kind: {
|
|
41
|
-
default: "
|
|
42
|
-
brandTable: "
|
|
41
|
+
default: "ysn846v",
|
|
42
|
+
brandTable: "ysn846w ysn846t txvbqbv0t"
|
|
43
43
|
} },
|
|
44
44
|
defaultVariants: { kind: "default" },
|
|
45
45
|
compoundVariants: []
|
|
46
|
-
}),
|
|
47
|
-
defaultClassName: "
|
|
46
|
+
}), f = "ysn846y ysn846x txvbqb9my txvbqbjh7", p = e({
|
|
47
|
+
defaultClassName: "ysn84614 ysn846z txvbqbc7 txvbqb1qg txvbqb12g txvbqb9iy txvbqb78 txvbqb6x txvbqb7k",
|
|
48
48
|
variantClassNames: { kind: {
|
|
49
|
-
default: "
|
|
50
|
-
brandTable: "ysn84613
|
|
49
|
+
default: "ysn84615 ysn84611 ysn84610 txvbqbv41 txvbqb3og txvbqb62p",
|
|
50
|
+
brandTable: "ysn84616 ysn84613 ysn84612 txvbqbv0t txvbqb3s7 txvbqb62p"
|
|
51
51
|
} },
|
|
52
52
|
defaultVariants: { kind: "default" },
|
|
53
53
|
compoundVariants: []
|
|
54
|
-
}),
|
|
55
|
-
defaultClassName: "
|
|
54
|
+
}), m = e({
|
|
55
|
+
defaultClassName: "ysn84619",
|
|
56
56
|
variantClassNames: { kind: {
|
|
57
|
-
default: "ysn84617
|
|
58
|
-
brandTable: "ysn84618
|
|
57
|
+
default: "ysn8461a ysn84617 txvbqbv43",
|
|
58
|
+
brandTable: "ysn8461b ysn84618 txvbqbv0t"
|
|
59
59
|
} },
|
|
60
60
|
defaultVariants: { kind: "default" },
|
|
61
61
|
compoundVariants: []
|
|
62
|
-
}),
|
|
63
|
-
defaultClassName: "
|
|
62
|
+
}), h = e({
|
|
63
|
+
defaultClassName: "ysn8461e",
|
|
64
64
|
variantClassNames: { kind: {
|
|
65
|
-
default: "ysn8461c
|
|
66
|
-
brandTable: "ysn8461d
|
|
65
|
+
default: "ysn8461f ysn8461c txvbqbv41",
|
|
66
|
+
brandTable: "ysn8461g ysn8461d txvbqbv0t"
|
|
67
67
|
} },
|
|
68
68
|
defaultVariants: { kind: "default" },
|
|
69
69
|
compoundVariants: []
|
|
70
|
-
}),
|
|
71
|
-
defaultClassName: "
|
|
70
|
+
}), g = e({
|
|
71
|
+
defaultClassName: "ysn8461l ysn8461h txvbqbcp txvbqb9ip txvbqbao7 txvbqbk5y txvbqbl7g",
|
|
72
72
|
variantClassNames: { kind: {
|
|
73
|
-
default: "ysn8461j
|
|
74
|
-
brandTable: "ysn8461k
|
|
73
|
+
default: "ysn8461m ysn8461j ysn8461i txvbqbva1",
|
|
74
|
+
brandTable: "ysn8461n ysn8461k txvbqbnvg txvbqboip txvbqbp6y txvbqblyp txvbqbv9z txvbqbamp txvbqb8y txvbqb54y"
|
|
75
75
|
} },
|
|
76
76
|
defaultVariants: { kind: "default" },
|
|
77
77
|
compoundVariants: []
|
|
78
|
-
}),
|
|
79
|
-
defaultClassName: "
|
|
78
|
+
}), _ = "ysn8461o txvbqbamp txvbqbv9z", v = "ysn8461p txvbqbv9z", y = "ysn8461q", b = e({
|
|
79
|
+
defaultClassName: "ysn8461u",
|
|
80
80
|
variantClassNames: { align: {
|
|
81
|
-
left: "
|
|
82
|
-
center: "
|
|
83
|
-
right: "
|
|
81
|
+
left: "ysn8461v ysn8461r txvbqbdpg txvbqbt6p",
|
|
82
|
+
center: "ysn8461w ysn8461s txvbqbdoy txvbqbt6y",
|
|
83
|
+
right: "ysn8461x ysn8461t txvbqbdp7 txvbqbt77"
|
|
84
84
|
} },
|
|
85
85
|
defaultVariants: {},
|
|
86
86
|
compoundVariants: []
|
|
87
|
-
}),
|
|
88
|
-
defaultClassName: "
|
|
87
|
+
}), x = e({
|
|
88
|
+
defaultClassName: "ysn8461y",
|
|
89
89
|
variantClassNames: { state: {
|
|
90
|
-
default: "
|
|
91
|
-
selected: "
|
|
92
|
-
muted: "
|
|
93
|
-
danger: "
|
|
90
|
+
default: "ysn8461z",
|
|
91
|
+
selected: "ysn84620",
|
|
92
|
+
muted: "ysn84621",
|
|
93
|
+
danger: "ysn84622"
|
|
94
94
|
} },
|
|
95
95
|
defaultVariants: {},
|
|
96
96
|
compoundVariants: []
|
|
97
|
-
}),
|
|
98
|
-
defaultClassName: "
|
|
97
|
+
}), S = "ysn84623", C = "ysn84624 txvbqb97 txvbqbva1 txvbqbt6y", w = e({
|
|
98
|
+
defaultClassName: "ysn84625",
|
|
99
99
|
variantClassNames: { minVisibleAt: {
|
|
100
|
-
sm: "
|
|
101
|
-
md: "
|
|
102
|
-
lg: "
|
|
103
|
-
xl: "
|
|
104
|
-
xxl: "
|
|
100
|
+
sm: "ysn84626",
|
|
101
|
+
md: "ysn84627",
|
|
102
|
+
lg: "ysn84628",
|
|
103
|
+
xl: "ysn84629",
|
|
104
|
+
xxl: "ysn8462a"
|
|
105
105
|
} },
|
|
106
106
|
defaultVariants: {},
|
|
107
107
|
compoundVariants: []
|
|
108
108
|
});
|
|
109
109
|
//#endregion
|
|
110
|
-
export {
|
|
110
|
+
export { b as alignRecipe, d as body, f as bodyContained, g as cell, t as container, n as containerWithContainedBody, l as densityRecipe, C as emptyCell, S as emptyRow, r as header, u as headerCell, i as headerRow, w as hideBelowRecipe, _ as primaryCell, v as primaryHeaderCell, p as row, m as rowEven, h as rowOdd, x as rowStateRecipe, y as stickyHeader, o as tableCellFontSizeVar, a as tableCellPaddingVar, s as tableEmptyRowPaddingVar, c as tableRowMinHeightVar };
|
|
111
111
|
|
|
112
112
|
//# sourceMappingURL=DataTable.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataTable.css.js","names":[],"sources":["../../../../src/components/data-table/DataTable.css.ts"],"sourcesContent":["import {\n createVar,\n fallbackVar,\n style,\n type StyleRule,\n} from '@vanilla-extract/css';\nimport { recipe } from '@vanilla-extract/recipes';\n\nimport { vars } from '../../theme/themeContract.js';\n\nimport {\n DATA_TABLE_BREAKPOINT_ENTRIES,\n type DataTableBreakpoint,\n} from './tableBreakpoints.js';\nimport { sprinkles } from '../../theme/sprinkles.css.js';\n\nexport const container = recipe({\n base: sprinkles({\n display: 'flex',\n flexDirection: 'column',\n width: 'full',\n containerType: 'inline-size',\n }),\n variants: {\n kind: {\n default: sprinkles({\n backgroundColor: 'surface',\n borderColor: 'border',\n borderRadius: 'lg',\n borderStyle: 'solid',\n borderWidth: 'default',\n overflowX: 'auto',\n overflowY: 'hidden',\n }),\n brandTable: sprinkles({\n backgroundColor: 'transparent',\n borderRadius: 'none',\n borderStyle: 'none',\n borderWidth: 0,\n overflow: 'visible',\n }),\n },\n },\n defaultVariants: {\n kind: 'default',\n },\n});\n\nexport const header = recipe({\n variants: {\n kind: {\n default: sprinkles({\n borderWidth: 0,\n borderStyle: 'solid',\n borderBottomWidth: 'default',\n borderBottomColor: 'borderSubtle',\n backgroundColor: 'surfaceMuted',\n }),\n brandTable: sprinkles({\n backgroundColor: 'transparent',\n borderWidth: 0,\n borderStyle: 'solid',\n borderBottomWidth: 'default',\n borderBottomColor: 'brandSecondaryOrange-20',\n }),\n },\n },\n defaultVariants: {\n kind: 'default',\n },\n});\n\nexport const headerRow = sprinkles({\n display: 'grid',\n width: 'full',\n alignItems: 'stretch',\n});\n\nexport const tableCellPaddingVar = createVar();\nexport const tableCellFontSizeVar = createVar();\nexport const tableEmptyRowPaddingVar = createVar();\nexport const tableRowMinHeightVar = createVar();\n\nexport const densityRecipe = recipe({\n variants: {\n density: {\n compact: {\n vars: {\n [tableCellPaddingVar]: `${vars.spacing[2]} ${vars.spacing[3]}`,\n [tableCellFontSizeVar]: vars.fontSize.sm,\n [tableEmptyRowPaddingVar]: `${vars.spacing[4]} ${vars.spacing[3]}`,\n [tableRowMinHeightVar]: vars.spacing[9],\n },\n },\n default: {\n vars: {\n [tableCellPaddingVar]: `${vars.spacing[3]} ${vars.spacing[4]}`,\n [tableCellFontSizeVar]: vars.fontSize.sm,\n [tableEmptyRowPaddingVar]: `${vars.spacing[6]} ${vars.spacing[4]}`,\n [tableRowMinHeightVar]: vars.spacing[10],\n },\n },\n comfortable: {\n vars: {\n [tableCellPaddingVar]: `${vars.spacing[3]} ${vars.spacing[5]}`,\n [tableCellFontSizeVar]: vars.fontSize.base,\n [tableEmptyRowPaddingVar]: `${vars.spacing[7]} ${vars.spacing[5]}`,\n [tableRowMinHeightVar]: vars.spacing[12],\n },\n },\n },\n },\n defaultVariants: {\n density: 'default',\n },\n});\n\nexport const headerCell = recipe({\n base: sprinkles({\n alignItems: 'center',\n display: 'flex',\n flexShrink: 0,\n gap: 2,\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n }),\n variants: {\n kind: {\n default: style([\n sprinkles({\n color: 'textSecondary',\n fontWeight: 'semibold',\n letterSpacing: 'capsNarrow',\n textTransform: 'uppercase',\n }),\n {\n padding: fallbackVar(\n tableCellPaddingVar,\n `${vars.spacing[3]} ${vars.spacing[4]}`,\n ),\n fontSize: fallbackVar(tableCellFontSizeVar, vars.fontSize.sm),\n minHeight: fallbackVar(tableRowMinHeightVar, vars.spacing[10]),\n selectors: {\n '&:last-child': {\n borderRight: 'none',\n },\n },\n },\n ]),\n brandTable: sprinkles({\n color: 'black-300',\n fontWeight: 'bold',\n fontSize: 'xs',\n letterSpacing: 'caps',\n textTransform: 'uppercase',\n paddingY: 4,\n paddingX: 0,\n borderRightWidth: 0,\n }),\n },\n },\n defaultVariants: {\n kind: 'default',\n },\n});\n\nexport const body = recipe({\n base: sprinkles({\n display: 'flex',\n flexDirection: 'column',\n }),\n variants: {\n kind: {\n default: {},\n brandTable: sprinkles({\n backgroundColor: 'transparent',\n }),\n },\n },\n defaultVariants: {\n kind: 'default',\n },\n});\n\nexport const row = recipe({\n base: sprinkles({\n alignItems: 'stretch',\n borderStyle: 'solid',\n borderWidth: 0,\n display: 'grid',\n transitionProperty: 'colors',\n transitionDuration: 150,\n transitionTimingFunction: 'ease',\n }),\n variants: {\n kind: {\n default: style([\n sprinkles({\n backgroundColor: 'surface',\n borderBottomColor: 'borderLight',\n borderBottomWidth: 'default',\n }),\n {\n selectors: {\n '&:last-child': {\n borderBottomWidth: 0,\n },\n '&:hover': {\n backgroundColor: vars.colors.surfaceMuted,\n },\n },\n },\n ]),\n brandTable: style([\n sprinkles({\n backgroundColor: 'transparent',\n borderBottomColor: 'brandSecondaryOrange-20',\n borderBottomWidth: 'default',\n }),\n {\n selectors: {\n '&:last-child': {\n borderBottomWidth: 0,\n },\n '&:hover': {\n backgroundColor: 'transparent',\n },\n },\n },\n ]),\n },\n },\n defaultVariants: {\n kind: 'default',\n },\n});\n\nexport const rowEven = recipe({\n variants: {\n kind: {\n default: sprinkles({\n backgroundColor: 'surfaceSecondary',\n }),\n brandTable: sprinkles({\n backgroundColor: 'transparent',\n }),\n },\n },\n defaultVariants: {\n kind: 'default',\n },\n});\n\nexport const rowOdd = recipe({\n variants: {\n kind: {\n default: sprinkles({\n backgroundColor: 'surface',\n }),\n brandTable: sprinkles({\n backgroundColor: 'transparent',\n }),\n },\n },\n defaultVariants: {\n kind: 'default',\n },\n});\n\nexport const cell = recipe({\n base: sprinkles({\n alignItems: 'center',\n display: 'flex',\n gap: 2,\n minWidth: 0,\n overflow: 'hidden',\n }),\n variants: {\n kind: {\n default: style([\n sprinkles({\n color: 'textSecondary',\n }),\n {\n padding: fallbackVar(\n tableCellPaddingVar,\n `${vars.spacing[3]} ${vars.spacing[4]}`,\n ),\n fontSize: fallbackVar(tableCellFontSizeVar, vars.fontSize.sm),\n minHeight: fallbackVar(tableRowMinHeightVar, vars.spacing[10]),\n selectors: {\n '&:last-child': {\n borderRight: 'none',\n },\n },\n },\n ]),\n brandTable: sprinkles({\n color: 'text',\n fontWeight: 'semibold',\n fontSize: 'sm',\n paddingY: 4,\n paddingX: 0,\n borderRightWidth: 0,\n }),\n },\n },\n defaultVariants: {\n kind: 'default',\n },\n});\n\nexport const primaryCell = sprinkles({\n fontWeight: 'semibold',\n color: 'text',\n});\n\nexport const primaryHeaderCell = sprinkles({\n color: 'text',\n});\n\nexport const stickyHeader = style({\n position: 'sticky',\n top: 0,\n zIndex: vars.zIndex[10],\n});\n\nexport const alignRecipe = recipe({\n variants: {\n align: {\n left: sprinkles({\n justifyContent: 'flex-start',\n textAlign: 'left',\n }),\n center: sprinkles({\n justifyContent: 'center',\n textAlign: 'center',\n }),\n right: sprinkles({\n justifyContent: 'flex-end',\n textAlign: 'end',\n }),\n },\n },\n});\n\nexport const rowStateRecipe = recipe({\n variants: {\n state: {\n default: {},\n selected: {\n backgroundColor: vars.colors.primaryLight,\n },\n muted: {\n opacity: 0.72,\n },\n danger: {\n backgroundColor: vars.colors['red-50'],\n },\n },\n },\n});\n\nexport const emptyRow = style({\n padding: fallbackVar(\n tableEmptyRowPaddingVar,\n `${vars.spacing[6]} ${vars.spacing[4]}`,\n ),\n});\n\nexport const emptyCell = sprinkles({\n fontSize: 'base',\n color: 'textSecondary',\n textAlign: 'center',\n});\n\nconst hideBelowMap: Record<DataTableBreakpoint, StyleRule> = {} as Record<\n DataTableBreakpoint,\n StyleRule\n>;\n\nDATA_TABLE_BREAKPOINT_ENTRIES.forEach(([breakpoint, width]) => {\n hideBelowMap[breakpoint] = {\n '@container': {\n [`(max-width: ${width - 0.5}px)`]: {\n visibility: 'hidden',\n opacity: 0,\n pointerEvents: 'none',\n paddingInline: 0,\n paddingBlock: 0,\n borderRight: 'none',\n overflow: 'hidden',\n },\n },\n };\n});\n\nexport const hideBelowRecipe = recipe({\n variants: {\n minVisibleAt: hideBelowMap,\n },\n});\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"DataTable.css.js","names":[],"sources":["../../../../src/components/data-table/DataTable.css.ts"],"sourcesContent":["import {\n createVar,\n fallbackVar,\n style,\n type StyleRule,\n} from '@vanilla-extract/css';\nimport { recipe } from '@vanilla-extract/recipes';\n\nimport { vars } from '../../theme/themeContract.js';\n\nimport {\n DATA_TABLE_BREAKPOINT_ENTRIES,\n type DataTableBreakpoint,\n} from './tableBreakpoints.js';\nimport { sprinkles } from '../../theme/sprinkles.css.js';\n\nexport const container = recipe({\n base: sprinkles({\n display: 'flex',\n flexDirection: 'column',\n width: 'full',\n containerType: 'inline-size',\n }),\n variants: {\n kind: {\n default: sprinkles({\n backgroundColor: 'surface',\n borderColor: 'border',\n borderRadius: 'lg',\n borderStyle: 'solid',\n borderWidth: 'default',\n overflowX: 'auto',\n overflowY: 'hidden',\n }),\n brandTable: sprinkles({\n backgroundColor: 'transparent',\n borderRadius: 'none',\n borderStyle: 'none',\n borderWidth: 0,\n overflow: 'visible',\n }),\n },\n },\n defaultVariants: {\n kind: 'default',\n },\n});\n\nexport const containerWithContainedBody = sprinkles({\n height: 'full',\n minHeight: 0,\n overflow: 'hidden',\n});\n\nexport const header = recipe({\n variants: {\n kind: {\n default: sprinkles({\n borderWidth: 0,\n borderStyle: 'solid',\n borderBottomWidth: 'default',\n borderBottomColor: 'borderSubtle',\n backgroundColor: 'surfaceMuted',\n }),\n brandTable: sprinkles({\n backgroundColor: 'transparent',\n borderWidth: 0,\n borderStyle: 'solid',\n borderBottomWidth: 'default',\n borderBottomColor: 'brandSecondaryOrange-20',\n }),\n },\n },\n defaultVariants: {\n kind: 'default',\n },\n});\n\nexport const headerRow = sprinkles({\n display: 'grid',\n width: 'full',\n alignItems: 'stretch',\n});\n\nexport const tableCellPaddingVar = createVar();\nexport const tableCellFontSizeVar = createVar();\nexport const tableEmptyRowPaddingVar = createVar();\nexport const tableRowMinHeightVar = createVar();\n\nexport const densityRecipe = recipe({\n variants: {\n density: {\n compact: {\n vars: {\n [tableCellPaddingVar]: `${vars.spacing[2]} ${vars.spacing[3]}`,\n [tableCellFontSizeVar]: vars.fontSize.sm,\n [tableEmptyRowPaddingVar]: `${vars.spacing[4]} ${vars.spacing[3]}`,\n [tableRowMinHeightVar]: vars.spacing[9],\n },\n },\n default: {\n vars: {\n [tableCellPaddingVar]: `${vars.spacing[3]} ${vars.spacing[4]}`,\n [tableCellFontSizeVar]: vars.fontSize.sm,\n [tableEmptyRowPaddingVar]: `${vars.spacing[6]} ${vars.spacing[4]}`,\n [tableRowMinHeightVar]: vars.spacing[10],\n },\n },\n comfortable: {\n vars: {\n [tableCellPaddingVar]: `${vars.spacing[3]} ${vars.spacing[5]}`,\n [tableCellFontSizeVar]: vars.fontSize.base,\n [tableEmptyRowPaddingVar]: `${vars.spacing[7]} ${vars.spacing[5]}`,\n [tableRowMinHeightVar]: vars.spacing[12],\n },\n },\n },\n },\n defaultVariants: {\n density: 'default',\n },\n});\n\nexport const headerCell = recipe({\n base: sprinkles({\n alignItems: 'center',\n display: 'flex',\n flexShrink: 0,\n gap: 2,\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n }),\n variants: {\n kind: {\n default: style([\n sprinkles({\n color: 'textSecondary',\n fontWeight: 'semibold',\n letterSpacing: 'capsNarrow',\n textTransform: 'uppercase',\n }),\n {\n padding: fallbackVar(\n tableCellPaddingVar,\n `${vars.spacing[3]} ${vars.spacing[4]}`,\n ),\n fontSize: fallbackVar(tableCellFontSizeVar, vars.fontSize.sm),\n minHeight: fallbackVar(tableRowMinHeightVar, vars.spacing[10]),\n selectors: {\n '&:last-child': {\n borderRight: 'none',\n },\n },\n },\n ]),\n brandTable: sprinkles({\n color: 'black-300',\n fontWeight: 'bold',\n fontSize: 'xs',\n letterSpacing: 'caps',\n textTransform: 'uppercase',\n paddingY: 4,\n paddingX: 0,\n borderRightWidth: 0,\n }),\n },\n },\n defaultVariants: {\n kind: 'default',\n },\n});\n\nexport const body = recipe({\n base: sprinkles({\n display: 'flex',\n flexDirection: 'column',\n }),\n variants: {\n kind: {\n default: {},\n brandTable: sprinkles({\n backgroundColor: 'transparent',\n }),\n },\n },\n defaultVariants: {\n kind: 'default',\n },\n});\n\nexport const bodyContained = style([\n sprinkles({\n flex: 1,\n minHeight: 0,\n }),\n {\n overflowY: 'auto',\n scrollbarWidth: 'thin',\n scrollbarColor: `${vars.colors.border} transparent`,\n },\n]);\n\nexport const row = recipe({\n base: sprinkles({\n alignItems: 'stretch',\n borderStyle: 'solid',\n borderWidth: 0,\n display: 'grid',\n transitionProperty: 'colors',\n transitionDuration: 150,\n transitionTimingFunction: 'ease',\n }),\n variants: {\n kind: {\n default: style([\n sprinkles({\n backgroundColor: 'surface',\n borderBottomColor: 'borderLight',\n borderBottomWidth: 'default',\n }),\n {\n selectors: {\n '&:last-child': {\n borderBottomWidth: 0,\n },\n '&:hover': {\n backgroundColor: vars.colors.surfaceMuted,\n },\n },\n },\n ]),\n brandTable: style([\n sprinkles({\n backgroundColor: 'transparent',\n borderBottomColor: 'brandSecondaryOrange-20',\n borderBottomWidth: 'default',\n }),\n {\n selectors: {\n '&:last-child': {\n borderBottomWidth: 0,\n },\n '&:hover': {\n backgroundColor: 'transparent',\n },\n },\n },\n ]),\n },\n },\n defaultVariants: {\n kind: 'default',\n },\n});\n\nexport const rowEven = recipe({\n variants: {\n kind: {\n default: sprinkles({\n backgroundColor: 'surfaceSecondary',\n }),\n brandTable: sprinkles({\n backgroundColor: 'transparent',\n }),\n },\n },\n defaultVariants: {\n kind: 'default',\n },\n});\n\nexport const rowOdd = recipe({\n variants: {\n kind: {\n default: sprinkles({\n backgroundColor: 'surface',\n }),\n brandTable: sprinkles({\n backgroundColor: 'transparent',\n }),\n },\n },\n defaultVariants: {\n kind: 'default',\n },\n});\n\nexport const cell = recipe({\n base: sprinkles({\n alignItems: 'center',\n display: 'flex',\n gap: 2,\n minWidth: 0,\n overflow: 'hidden',\n }),\n variants: {\n kind: {\n default: style([\n sprinkles({\n color: 'textSecondary',\n }),\n {\n padding: fallbackVar(\n tableCellPaddingVar,\n `${vars.spacing[3]} ${vars.spacing[4]}`,\n ),\n fontSize: fallbackVar(tableCellFontSizeVar, vars.fontSize.sm),\n minHeight: fallbackVar(tableRowMinHeightVar, vars.spacing[10]),\n selectors: {\n '&:last-child': {\n borderRight: 'none',\n },\n },\n },\n ]),\n brandTable: sprinkles({\n color: 'text',\n fontWeight: 'semibold',\n fontSize: 'sm',\n paddingY: 4,\n paddingX: 0,\n borderRightWidth: 0,\n }),\n },\n },\n defaultVariants: {\n kind: 'default',\n },\n});\n\nexport const primaryCell = sprinkles({\n fontWeight: 'semibold',\n color: 'text',\n});\n\nexport const primaryHeaderCell = sprinkles({\n color: 'text',\n});\n\nexport const stickyHeader = style({\n position: 'sticky',\n top: 0,\n zIndex: vars.zIndex[10],\n});\n\nexport const alignRecipe = recipe({\n variants: {\n align: {\n left: sprinkles({\n justifyContent: 'flex-start',\n textAlign: 'left',\n }),\n center: sprinkles({\n justifyContent: 'center',\n textAlign: 'center',\n }),\n right: sprinkles({\n justifyContent: 'flex-end',\n textAlign: 'end',\n }),\n },\n },\n});\n\nexport const rowStateRecipe = recipe({\n variants: {\n state: {\n default: {},\n selected: {\n backgroundColor: vars.colors.primaryLight,\n },\n muted: {\n opacity: 0.72,\n },\n danger: {\n backgroundColor: vars.colors['red-50'],\n },\n },\n },\n});\n\nexport const emptyRow = style({\n padding: fallbackVar(\n tableEmptyRowPaddingVar,\n `${vars.spacing[6]} ${vars.spacing[4]}`,\n ),\n});\n\nexport const emptyCell = sprinkles({\n fontSize: 'base',\n color: 'textSecondary',\n textAlign: 'center',\n});\n\nconst hideBelowMap: Record<DataTableBreakpoint, StyleRule> = {} as Record<\n DataTableBreakpoint,\n StyleRule\n>;\n\nDATA_TABLE_BREAKPOINT_ENTRIES.forEach(([breakpoint, width]) => {\n hideBelowMap[breakpoint] = {\n '@container': {\n [`(max-width: ${width - 0.5}px)`]: {\n visibility: 'hidden',\n opacity: 0,\n pointerEvents: 'none',\n paddingInline: 0,\n paddingBlock: 0,\n borderRight: 'none',\n overflow: 'hidden',\n },\n },\n };\n});\n\nexport const hideBelowRecipe = recipe({\n variants: {\n minVisibleAt: hideBelowMap,\n },\n});\n"],"mappings":""}
|
|
@@ -1,79 +1,83 @@
|
|
|
1
1
|
import { cx as e } from "../../theme/tools.js";
|
|
2
2
|
import { useUiTranslation as t } from "../../i18n/useUiTranslation.js";
|
|
3
|
-
import { alignRecipe as n, body as r,
|
|
4
|
-
import { Fragment as
|
|
3
|
+
import { alignRecipe as n, body as r, bodyContained as i, cell as a, container as o, containerWithContainedBody as s, densityRecipe as c, emptyCell as l, emptyRow as u, header as d, headerCell as f, headerRow as p, hideBelowRecipe as m, primaryCell as h, primaryHeaderCell as g, row as ee, rowEven as _, rowOdd as v, rowStateRecipe as y, stickyHeader as b } from "./DataTable.css.js";
|
|
4
|
+
import { Fragment as te, jsx as x, jsxs as S } from "react/jsx-runtime";
|
|
5
5
|
//#region src/components/data-table/DataTable.tsx
|
|
6
|
-
var C = "minmax(0, 1fr)", w = (e) => e == null ? null :
|
|
7
|
-
let { t:
|
|
8
|
-
|
|
9
|
-
let
|
|
10
|
-
className: e(
|
|
11
|
-
children:
|
|
12
|
-
}),
|
|
13
|
-
|
|
6
|
+
var C = "minmax(0, 1fr)", w = (e) => e == null ? null : m({ minVisibleAt: e }), T = (e, t) => typeof t == "string" && t !== "" ? { gridTemplateColumns: t } : { gridTemplateColumns: `repeat(${e}, ${C})` }, E = ({ columns: m, rows: C, getRowId: E, emptyState: D, className: ne, headerClassName: re, bodyClassName: ie, rowClassName: O, gridTemplateClassName: k, gridTemplateColumns: A, kind: j, density: M, headerBehavior: N, bodyScrollMode: P = "page", rowState: F, classes: I, ariaLabel: L, ariaLabelledBy: R, bodyFooterNode: z }) => {
|
|
7
|
+
let { t: B } = t(), V = j ?? "default", H = L ?? B("common.table.label");
|
|
8
|
+
R != null && (H = void 0);
|
|
9
|
+
let U = /* @__PURE__ */ x("div", {
|
|
10
|
+
className: e(l, I?.emptyCell),
|
|
11
|
+
children: B("common.table.empty")
|
|
12
|
+
}), W = D ?? U, G = C.length === 0, K = P === "contained", q;
|
|
13
|
+
k ?? (q = T(m.length, A));
|
|
14
14
|
let J = null;
|
|
15
|
-
|
|
15
|
+
N?.sticky === !0 && (J = b);
|
|
16
16
|
let Y;
|
|
17
|
-
|
|
18
|
-
let X = [
|
|
19
|
-
|
|
17
|
+
N?.offsetTop != null && (Y = { top: N.offsetTop });
|
|
18
|
+
let X = [c({ density: M ?? "default" })];
|
|
19
|
+
k != null && X.push(k);
|
|
20
20
|
let Z;
|
|
21
|
-
|
|
22
|
-
className: e(
|
|
21
|
+
Z = G ? /* @__PURE__ */ x("div", {
|
|
22
|
+
className: e(u, I?.emptyRow),
|
|
23
23
|
role: "row",
|
|
24
24
|
children: /* @__PURE__ */ x("div", {
|
|
25
25
|
role: "cell",
|
|
26
|
-
children:
|
|
26
|
+
children: W
|
|
27
27
|
})
|
|
28
|
-
}) : /* @__PURE__ */ x(
|
|
29
|
-
let
|
|
30
|
-
s != null && o.push(
|
|
28
|
+
}) : /* @__PURE__ */ x(te, { children: C.map((t, r) => {
|
|
29
|
+
let i = E(t, r), o = [ee({ kind: V }), I?.row], s = F?.(t, r);
|
|
30
|
+
s != null && o.push(y({ state: s })), r % 2 == 0 ? o.push(_({ kind: V }), I?.rowEven) : o.push(v({ kind: V }), I?.rowOdd);
|
|
31
31
|
for (let e of X) o.push(e);
|
|
32
|
-
if (
|
|
33
|
-
let e =
|
|
32
|
+
if (O != null) {
|
|
33
|
+
let e = O(t, r);
|
|
34
34
|
e != null && o.push(e);
|
|
35
35
|
}
|
|
36
36
|
return /* @__PURE__ */ x("div", {
|
|
37
37
|
role: "row",
|
|
38
38
|
className: e(...o),
|
|
39
39
|
style: q,
|
|
40
|
-
children:
|
|
41
|
-
let
|
|
42
|
-
o != null &&
|
|
40
|
+
children: m.map((r) => {
|
|
41
|
+
let i = [a({ kind: V }), I?.cell], o = w(r.minVisibleAt);
|
|
42
|
+
o != null && i.push(o), r.className != null && i.push(r.className), r.isPrimary && i.push(h, I?.primaryCell), r.align != null && i.push(n({ align: r.align }));
|
|
43
43
|
let s = r.cell(t);
|
|
44
44
|
return /* @__PURE__ */ x("div", {
|
|
45
45
|
role: "cell",
|
|
46
|
-
className: e(...
|
|
46
|
+
className: e(...i),
|
|
47
47
|
children: s
|
|
48
48
|
}, r.id);
|
|
49
49
|
})
|
|
50
|
-
},
|
|
51
|
-
}) })
|
|
52
|
-
|
|
50
|
+
}, i);
|
|
51
|
+
}) });
|
|
52
|
+
let Q = null, $ = null;
|
|
53
|
+
return K && (Q = s, $ = i), /* @__PURE__ */ S("div", {
|
|
54
|
+
className: e(o({ kind: V }), Q, I?.container, ne),
|
|
53
55
|
role: "table",
|
|
54
|
-
"aria-label":
|
|
55
|
-
"aria-labelledby":
|
|
56
|
+
"aria-label": H,
|
|
57
|
+
"aria-labelledby": R,
|
|
58
|
+
"data-scroll-mode": P,
|
|
56
59
|
children: [/* @__PURE__ */ x("div", {
|
|
57
|
-
className: e(
|
|
60
|
+
className: e(d({ kind: V }), J, I?.header, re),
|
|
58
61
|
style: Y,
|
|
59
62
|
role: "rowgroup",
|
|
60
63
|
children: /* @__PURE__ */ x("div", {
|
|
61
|
-
className: e(
|
|
64
|
+
className: e(p, I?.headerRow, ...X),
|
|
62
65
|
role: "row",
|
|
63
66
|
style: q,
|
|
64
|
-
children:
|
|
65
|
-
let r = [
|
|
66
|
-
return i != null && r.push(i), t.className != null && r.push(t.className), t.isPrimary && r.push(
|
|
67
|
+
children: m.map((t) => {
|
|
68
|
+
let r = [f({ kind: V }), I?.headerCell], i = w(t.minVisibleAt);
|
|
69
|
+
return i != null && r.push(i), t.className != null && r.push(t.className), t.isPrimary && r.push(g, I?.primaryHeaderCell), t.align != null && r.push(n({ align: t.align })), /* @__PURE__ */ x("div", {
|
|
67
70
|
role: "columnheader",
|
|
68
71
|
className: e(...r),
|
|
69
72
|
children: t.header
|
|
70
73
|
}, t.id);
|
|
71
74
|
})
|
|
72
75
|
})
|
|
73
|
-
}), /* @__PURE__ */
|
|
74
|
-
className: e(r({ kind:
|
|
76
|
+
}), /* @__PURE__ */ S("div", {
|
|
77
|
+
className: e(r({ kind: V }), $, I?.body, ie),
|
|
75
78
|
role: "rowgroup",
|
|
76
|
-
|
|
79
|
+
"data-scroll-mode": P,
|
|
80
|
+
children: [Z, z]
|
|
77
81
|
})]
|
|
78
82
|
});
|
|
79
83
|
}, D = {
|