@anoki/fse-ui 1.0.564 → 1.0.566
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/dist/index.cjs219.js +1 -1
- package/dist/index.cjs226.js +1 -1
- package/dist/index.cjs237.js +1 -1
- package/dist/index.cjs244.js +1 -1
- package/dist/index.cjs245.js +1 -1
- package/dist/index.cjs249.js +1 -1
- package/dist/index.cjs254.js +1 -1
- package/dist/index.cjs256.js +1 -1
- package/dist/index.cjs264.js +1 -1
- package/dist/index.cjs303.js +1 -1
- package/dist/index.cjs338.js +1 -1
- package/dist/index.cjs339.js +1 -1
- package/dist/index.cjs342.js +1 -1
- package/dist/index.cjs342.js.map +1 -1
- package/dist/{index.cjs346.js → index.cjs343.js} +1 -1
- package/dist/{index.cjs346.js.map → index.cjs343.js.map} +1 -1
- package/dist/{index.cjs347.js → index.cjs344.js} +1 -1
- package/dist/{index.cjs347.js.map → index.cjs344.js.map} +1 -1
- package/dist/index.cjs345.js +1 -1
- package/dist/index.cjs345.js.map +1 -1
- package/dist/{index.cjs356.js → index.cjs348.js} +1 -1
- package/dist/{index.cjs356.js.map → index.cjs348.js.map} +1 -1
- package/dist/{index.cjs357.js → index.cjs349.js} +1 -1
- package/dist/{index.cjs357.js.map → index.cjs349.js.map} +1 -1
- package/dist/{index.cjs358.js → index.cjs350.js} +1 -1
- package/dist/{index.cjs358.js.map → index.cjs350.js.map} +1 -1
- package/dist/{index.cjs359.js → index.cjs351.js} +1 -1
- package/dist/{index.cjs359.js.map → index.cjs351.js.map} +1 -1
- package/dist/{index.cjs360.js → index.cjs352.js} +1 -1
- package/dist/{index.cjs360.js.map → index.cjs352.js.map} +1 -1
- package/dist/{index.cjs361.js → index.cjs353.js} +1 -1
- package/dist/{index.cjs361.js.map → index.cjs353.js.map} +1 -1
- package/dist/{index.cjs362.js → index.cjs354.js} +1 -1
- package/dist/{index.cjs362.js.map → index.cjs354.js.map} +1 -1
- package/dist/index.cjs375.js +1 -1
- package/dist/index.cjs377.js +1 -1
- package/dist/index.cjs394.js +1 -1
- package/dist/index.cjs396.js +1 -1
- package/dist/index.cjs398.js +1 -1
- package/dist/index.cjs411.js +38 -1
- package/dist/index.cjs411.js.map +1 -1
- package/dist/index.cjs412.js +1 -38
- package/dist/index.cjs412.js.map +1 -1
- package/dist/index.cjs413.js +1 -1
- package/dist/index.cjs413.js.map +1 -1
- package/dist/index.cjs414.js +1 -1
- package/dist/index.cjs414.js.map +1 -1
- package/dist/index.cjs415.js +1 -1
- package/dist/index.cjs415.js.map +1 -1
- package/dist/index.cjs58.js +1 -1
- package/dist/index.cjs58.js.map +1 -1
- package/dist/index.cjs65.js +1 -1
- package/dist/index.cjs65.js.map +1 -1
- package/dist/index.d.ts +12 -6
- package/dist/index.es219.js +1 -1
- package/dist/index.es226.js +3 -3
- package/dist/index.es237.js +8 -8
- package/dist/index.es244.js +1 -1
- package/dist/index.es245.js +1 -1
- package/dist/index.es249.js +1 -1
- package/dist/index.es254.js +1 -1
- package/dist/index.es256.js +1 -1
- package/dist/index.es264.js +2 -2
- package/dist/index.es303.js +1 -1
- package/dist/index.es338.js +1 -1
- package/dist/index.es339.js +8 -8
- package/dist/index.es342.js +6 -15
- package/dist/index.es342.js.map +1 -1
- package/dist/{index.es346.js → index.es343.js} +1 -1
- package/dist/{index.es346.js.map → index.es343.js.map} +1 -1
- package/dist/{index.es347.js → index.es344.js} +1 -1
- package/dist/{index.es347.js.map → index.es344.js.map} +1 -1
- package/dist/index.es345.js +15 -6
- package/dist/index.es345.js.map +1 -1
- package/dist/{index.es356.js → index.es348.js} +1 -1
- package/dist/{index.es356.js.map → index.es348.js.map} +1 -1
- package/dist/{index.es357.js → index.es349.js} +1 -1
- package/dist/{index.es357.js.map → index.es349.js.map} +1 -1
- package/dist/{index.es358.js → index.es350.js} +1 -1
- package/dist/{index.es358.js.map → index.es350.js.map} +1 -1
- package/dist/{index.es359.js → index.es351.js} +1 -1
- package/dist/{index.es359.js.map → index.es351.js.map} +1 -1
- package/dist/{index.es360.js → index.es352.js} +1 -1
- package/dist/{index.es360.js.map → index.es352.js.map} +1 -1
- package/dist/{index.es361.js → index.es353.js} +1 -1
- package/dist/{index.es361.js.map → index.es353.js.map} +1 -1
- package/dist/{index.es362.js → index.es354.js} +1 -1
- package/dist/{index.es362.js.map → index.es354.js.map} +1 -1
- package/dist/index.es375.js +1 -1
- package/dist/index.es377.js +1 -1
- package/dist/index.es394.js +1 -1
- package/dist/index.es396.js +1 -1
- package/dist/index.es398.js +4 -4
- package/dist/index.es411.js +69 -65
- package/dist/index.es411.js.map +1 -1
- package/dist/index.es412.js +8 -68
- package/dist/index.es412.js.map +1 -1
- package/dist/index.es413.js +14 -9
- package/dist/index.es413.js.map +1 -1
- package/dist/index.es414.js +62 -14
- package/dist/index.es414.js.map +1 -1
- package/dist/index.es415.js +64 -61
- package/dist/index.es415.js.map +1 -1
- package/dist/index.es58.js +3 -2
- package/dist/index.es58.js.map +1 -1
- package/dist/index.es65.js +220 -176
- package/dist/index.es65.js.map +1 -1
- package/package.json +1 -1
- /package/dist/components/ui/{DoctorConfirmModal/DoctorConfirmModalContent/DoctorConfirmModalContent.css → ConsentModal/ConsentModalContent/ConsentModalContent.css} +0 -0
- /package/dist/components/ui/{DoctorModal/DoctorModalFooter/DoctorModalFooter.css → ConsentModal/ConsentModalFooter/ConsentModalFooter.css} +0 -0
package/dist/index.es58.js
CHANGED
@@ -11,12 +11,13 @@ const n = ({
|
|
11
11
|
description: o,
|
12
12
|
onChange: l
|
13
13
|
}) => /* @__PURE__ */ r.jsxs(
|
14
|
-
"
|
14
|
+
"label",
|
15
15
|
{
|
16
16
|
className: d(
|
17
17
|
"shadow bg-white br-x4 ui-radio-card",
|
18
18
|
a && "ui-radio-card-checked"
|
19
19
|
),
|
20
|
+
htmlFor: s,
|
20
21
|
children: [
|
21
22
|
/* @__PURE__ */ r.jsx(
|
22
23
|
"input",
|
@@ -30,7 +31,7 @@ const n = ({
|
|
30
31
|
}
|
31
32
|
),
|
32
33
|
/* @__PURE__ */ r.jsxs(m, { gap: "x4", children: [
|
33
|
-
/* @__PURE__ */ r.jsx("
|
34
|
+
/* @__PURE__ */ r.jsx("div", { className: "fw-semibold text-slate-20 fs-4", children: i }),
|
34
35
|
/* @__PURE__ */ r.jsx("p", { className: "fs-6 fw-regular text-slate-20", children: o })
|
35
36
|
] })
|
36
37
|
]
|
package/dist/index.es58.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.es58.js","sources":["../src/components/ui/RadioCard/index.tsx"],"sourcesContent":["import clsx from \"clsx\";\r\nimport \"./RadioCard.scss\";\r\nimport { Col } from \"@/components\";\r\n\r\ntype RadioCardProps = {\r\n id: string;\r\n name: string;\r\n value: string;\r\n checked: boolean;\r\n label: string;\r\n description?: string;\r\n onChange: (event: React.ChangeEvent<HTMLInputElement>) => void;\r\n};\r\n\r\nexport const RadioCard = ({\r\n id,\r\n name,\r\n value,\r\n checked = false,\r\n label,\r\n description,\r\n onChange,\r\n}: RadioCardProps) => {\r\n return (\r\n <
|
1
|
+
{"version":3,"file":"index.es58.js","sources":["../src/components/ui/RadioCard/index.tsx"],"sourcesContent":["import clsx from \"clsx\";\r\nimport \"./RadioCard.scss\";\r\nimport { Col } from \"@/components\";\r\n\r\ntype RadioCardProps = {\r\n id: string;\r\n name: string;\r\n value: string;\r\n checked: boolean;\r\n label: string;\r\n description?: string;\r\n onChange: (event: React.ChangeEvent<HTMLInputElement>) => void;\r\n};\r\n\r\nexport const RadioCard = ({\r\n id,\r\n name,\r\n value,\r\n checked = false,\r\n label,\r\n description,\r\n onChange,\r\n}: RadioCardProps) => {\r\n return (\r\n <label\r\n className={clsx(\r\n \"shadow bg-white br-x4 ui-radio-card\",\r\n checked && \"ui-radio-card-checked\",\r\n )}\r\n htmlFor={id}\r\n >\r\n <input\r\n type=\"radio\"\r\n id={id}\r\n name={name}\r\n value={value}\r\n checked={checked}\r\n onChange={onChange}\r\n />\r\n <Col gap={\"x4\"}>\r\n <div className=\"fw-semibold text-slate-20 fs-4\">{label}</div>\r\n <p className=\"fs-6 fw-regular text-slate-20\">{description}</p>\r\n </Col>\r\n </label>\r\n );\r\n};\r\n"],"names":["RadioCard","id","name","value","checked","label","description","onChange","jsxs","clsx","jsx","Col"],"mappings":";;;;AAcO,MAAMA,IAAY,CAAC;AAAA,EACxB,IAAAC;AAAA,EACA,MAAAC;AAAA,EACA,OAAAC;AAAA,EACA,SAAAC,IAAU;AAAA,EACV,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,UAAAC;AACF,MAEIC,gBAAAA,EAAA;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAWC;AAAA,MACT;AAAA,MACAL,KAAW;AAAA,IACb;AAAA,IACA,SAASH;AAAA,IAET,UAAA;AAAA,MAAAS,gBAAAA,EAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,MAAK;AAAA,UACL,IAAAT;AAAA,UACA,MAAAC;AAAA,UACA,OAAAC;AAAA,UACA,SAAAC;AAAA,UACA,UAAAG;AAAA,QAAA;AAAA,MACF;AAAA,MACAC,gBAAAA,EAAAA,KAACG,GAAI,EAAA,KAAK,MACR,UAAA;AAAA,QAACD,gBAAAA,EAAA,IAAA,OAAA,EAAI,WAAU,kCAAkC,UAAML,GAAA;AAAA,QACtDK,gBAAAA,EAAA,IAAA,KAAA,EAAE,WAAU,iCAAiC,UAAYJ,EAAA,CAAA;AAAA,MAAA,EAC5D,CAAA;AAAA,IAAA;AAAA,EAAA;AACF;"}
|
package/dist/index.es65.js
CHANGED
@@ -1,210 +1,219 @@
|
|
1
|
-
import { j as
|
2
|
-
import * as
|
3
|
-
import { useEffect as
|
4
|
-
import { clsx as
|
1
|
+
import { j as e } from "./index.es188.js";
|
2
|
+
import * as x from "react";
|
3
|
+
import { useEffect as P } from "react";
|
4
|
+
import { clsx as o } from "./index.es190.js";
|
5
5
|
import './components/ui/Table/Table.css';/* empty css */
|
6
|
-
import { ActionIconText as
|
7
|
-
import { TriangleUp as
|
8
|
-
import { TriangleDown as
|
9
|
-
import { Download as
|
10
|
-
import { Info as
|
11
|
-
const
|
6
|
+
import { ActionIconText as S } from "./index.es59.js";
|
7
|
+
import { TriangleUp as ee } from "./index.es155.js";
|
8
|
+
import { TriangleDown as ae } from "./index.es156.js";
|
9
|
+
import { Download as te } from "./index.es148.js";
|
10
|
+
import { Info as se } from "./index.es157.js";
|
11
|
+
const ie = x.forwardRef(
|
12
12
|
({
|
13
|
-
className:
|
13
|
+
className: a,
|
14
14
|
columns: t,
|
15
15
|
data: s,
|
16
|
-
pagination:
|
17
|
-
initialCurrentPage:
|
18
|
-
resultsPerPage:
|
19
|
-
defaultSortDirection:
|
16
|
+
pagination: i,
|
17
|
+
initialCurrentPage: N = 1,
|
18
|
+
resultsPerPage: l = 10,
|
19
|
+
defaultSortDirection: b = "desc",
|
20
20
|
setSelectedSort: p,
|
21
|
-
initialSortConfig:
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
21
|
+
initialSortConfig: h,
|
22
|
+
serverSidePagination: _ = !1,
|
23
|
+
totalItems: j,
|
24
|
+
hasNextPage: y,
|
25
|
+
hasPreviousPage: C,
|
26
|
+
onNextPage: v,
|
27
|
+
onPreviousPage: w,
|
28
|
+
...T
|
29
|
+
}, g) => {
|
30
|
+
const [r, M] = x.useState(
|
31
|
+
h || {
|
26
32
|
key: t[0].key || t[0].label,
|
27
|
-
direction:
|
33
|
+
direction: b
|
28
34
|
}
|
29
|
-
), [
|
30
|
-
|
31
|
-
|
32
|
-
}, [
|
33
|
-
const
|
34
|
-
const
|
35
|
-
(
|
35
|
+
), [R, z] = x.useState(N);
|
36
|
+
P(() => {
|
37
|
+
h && M(h);
|
38
|
+
}, [h]);
|
39
|
+
const k = x.useMemo(() => [...s].sort((d, u) => {
|
40
|
+
const c = d[r.key], n = u[r.key], m = t.find(
|
41
|
+
(f) => (f.key || f.label) === r.key
|
36
42
|
);
|
37
|
-
if (typeof
|
38
|
-
if ((
|
39
|
-
const
|
40
|
-
const [
|
41
|
-
return new Date(
|
42
|
-
},
|
43
|
-
return
|
43
|
+
if (typeof c == "string" && typeof n == "string") {
|
44
|
+
if ((m == null ? void 0 : m.type) === "date") {
|
45
|
+
const f = (G) => {
|
46
|
+
const [J, Q] = G.split(" - "), [W, X, Y] = J.split("/").map(Number), [Z, K] = Q.split(":").map(Number);
|
47
|
+
return new Date(Y, X - 1, W, Z, K);
|
48
|
+
}, L = f(c), I = f(n);
|
49
|
+
return r.direction === "asc" ? L.getTime() - I.getTime() : I.getTime() - L.getTime();
|
44
50
|
}
|
45
|
-
if ((
|
46
|
-
const
|
47
|
-
return
|
51
|
+
if ((m == null ? void 0 : m.type) === "number") {
|
52
|
+
const f = parseFloat(c), L = parseFloat(n);
|
53
|
+
return r.direction === "asc" ? f - L : L - f;
|
48
54
|
}
|
49
|
-
return
|
55
|
+
return r.direction === "asc" ? c.localeCompare(n) : n.localeCompare(c);
|
50
56
|
}
|
51
|
-
return
|
52
|
-
}), [s,
|
53
|
-
const
|
54
|
-
key:
|
55
|
-
direction:
|
57
|
+
return D(c) && D(n) ? r.direction === "asc" ? c.firstLine.localeCompare(n.firstLine) : n.firstLine.localeCompare(c.firstLine) : 0;
|
58
|
+
}), [s, r, t]), E = (d) => {
|
59
|
+
const u = {
|
60
|
+
key: d,
|
61
|
+
direction: r.key === d && r.direction === "asc" ? "desc" : "asc"
|
56
62
|
};
|
57
|
-
|
58
|
-
},
|
59
|
-
return /* @__PURE__ */
|
60
|
-
/* @__PURE__ */
|
63
|
+
M(u), p && p(u);
|
64
|
+
}, $ = i && !_ ? (R - 1) * l : 0, O = i && !_ ? Math.min($ + l, k.length) : k.length, q = _ ? k : k.slice($, O);
|
65
|
+
return /* @__PURE__ */ e.jsxs("div", { className: "position-relative w-full", children: [
|
66
|
+
/* @__PURE__ */ e.jsxs(
|
61
67
|
"table",
|
62
68
|
{
|
63
|
-
ref:
|
64
|
-
className:
|
69
|
+
ref: g,
|
70
|
+
className: o("table", a),
|
65
71
|
role: "table",
|
66
|
-
...
|
72
|
+
...T,
|
67
73
|
children: [
|
68
|
-
/* @__PURE__ */
|
69
|
-
|
74
|
+
/* @__PURE__ */ e.jsx(F, { className: "table__header", children: /* @__PURE__ */ e.jsx(B, { children: t.map((d, u) => /* @__PURE__ */ e.jsx(
|
75
|
+
U,
|
70
76
|
{
|
71
|
-
config:
|
72
|
-
sortConfig:
|
73
|
-
onSort: () =>
|
77
|
+
config: d,
|
78
|
+
sortConfig: r,
|
79
|
+
onSort: () => d.sortable && E(d.key || d.label)
|
74
80
|
},
|
75
|
-
`${
|
81
|
+
`${d.label}-${u}`
|
76
82
|
)) }) }),
|
77
|
-
/* @__PURE__ */
|
78
|
-
|
83
|
+
/* @__PURE__ */ e.jsx(H, { className: "table__body", children: q.map((d, u) => /* @__PURE__ */ e.jsx(B, { className: "table__row", children: Object.entries(d).map(([c, n], m) => n ? c === "actionData" && V(n) ? /* @__PURE__ */ e.jsx(
|
84
|
+
A,
|
79
85
|
{
|
80
86
|
content: n,
|
81
87
|
type: "action"
|
82
88
|
},
|
83
|
-
`${
|
84
|
-
) :
|
85
|
-
|
89
|
+
`${c}-${m}`
|
90
|
+
) : D(n) ? /* @__PURE__ */ e.jsx(
|
91
|
+
A,
|
86
92
|
{
|
87
93
|
content: n,
|
88
94
|
type: "double-line"
|
89
95
|
},
|
90
|
-
`${
|
91
|
-
) : typeof n == "string" ? /* @__PURE__ */
|
96
|
+
`${c}-${m}`
|
97
|
+
) : typeof n == "string" ? /* @__PURE__ */ e.jsx(A, { content: n }, `${c}-${m}`) : null : null) }, u)) })
|
92
98
|
]
|
93
99
|
}
|
94
100
|
),
|
95
|
-
|
96
|
-
|
101
|
+
i && /* @__PURE__ */ e.jsx(
|
102
|
+
re,
|
97
103
|
{
|
98
|
-
currentPage:
|
99
|
-
totalResults:
|
100
|
-
resultsPerPage:
|
101
|
-
setCurrentPage:
|
102
|
-
|
103
|
-
|
104
|
-
|
104
|
+
currentPage: R,
|
105
|
+
totalResults: _ ? j || 0 : k.length,
|
106
|
+
resultsPerPage: l,
|
107
|
+
setCurrentPage: z,
|
108
|
+
serverSide: _,
|
109
|
+
totalItems: j,
|
110
|
+
hasNextPage: y,
|
111
|
+
hasPreviousPage: C,
|
112
|
+
onNextPage: v,
|
113
|
+
onPreviousPage: w
|
105
114
|
}
|
106
115
|
)
|
107
116
|
] });
|
108
117
|
}
|
109
118
|
);
|
110
|
-
|
111
|
-
const
|
112
|
-
({ className:
|
119
|
+
ie.displayName = "Table";
|
120
|
+
const F = x.forwardRef(
|
121
|
+
({ className: a, children: t, ...s }, i) => /* @__PURE__ */ e.jsx(
|
113
122
|
"thead",
|
114
123
|
{
|
115
|
-
ref:
|
116
|
-
className:
|
124
|
+
ref: i,
|
125
|
+
className: o("[&_tr]:border-b-0", a),
|
117
126
|
...s,
|
118
127
|
children: t
|
119
128
|
}
|
120
129
|
)
|
121
130
|
);
|
122
|
-
|
123
|
-
const
|
124
|
-
({ className:
|
131
|
+
F.displayName = "TableHeader";
|
132
|
+
const H = x.forwardRef(
|
133
|
+
({ className: a, children: t, ...s }, i) => /* @__PURE__ */ e.jsx(
|
125
134
|
"tbody",
|
126
135
|
{
|
127
|
-
ref:
|
128
|
-
className:
|
136
|
+
ref: i,
|
137
|
+
className: o("[&_tr:last-child]:border-0", a),
|
129
138
|
...s,
|
130
139
|
children: t
|
131
140
|
}
|
132
141
|
)
|
133
142
|
);
|
134
|
-
|
135
|
-
const
|
136
|
-
({ className:
|
143
|
+
H.displayName = "TableBody";
|
144
|
+
const B = x.forwardRef(
|
145
|
+
({ className: a, children: t, ...s }, i) => /* @__PURE__ */ e.jsx(
|
137
146
|
"tr",
|
138
147
|
{
|
139
|
-
ref:
|
140
|
-
className:
|
148
|
+
ref: i,
|
149
|
+
className: o(
|
141
150
|
"border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",
|
142
|
-
|
151
|
+
a
|
143
152
|
),
|
144
153
|
...s,
|
145
154
|
children: t
|
146
155
|
}
|
147
156
|
)
|
148
157
|
);
|
149
|
-
|
150
|
-
const
|
151
|
-
var
|
152
|
-
const
|
153
|
-
switch (
|
158
|
+
B.displayName = "TableRow";
|
159
|
+
const U = x.forwardRef(({ className: a, config: t, sortConfig: s, onSort: i, ...N }, l) => {
|
160
|
+
var j;
|
161
|
+
const b = s.key === (t.key || t.label), p = b ? s.direction : null, h = () => p === "asc" ? "ascending" : "descending", _ = (y) => {
|
162
|
+
switch (y) {
|
154
163
|
case "info":
|
155
|
-
return /* @__PURE__ */
|
164
|
+
return /* @__PURE__ */ e.jsx(se, {});
|
156
165
|
case "download":
|
157
|
-
return /* @__PURE__ */
|
166
|
+
return /* @__PURE__ */ e.jsx(te, {});
|
158
167
|
default:
|
159
|
-
return
|
168
|
+
return y;
|
160
169
|
}
|
161
170
|
};
|
162
|
-
return /* @__PURE__ */
|
171
|
+
return /* @__PURE__ */ e.jsx(
|
163
172
|
"th",
|
164
173
|
{
|
165
|
-
ref:
|
166
|
-
className:
|
174
|
+
ref: l,
|
175
|
+
className: o(
|
167
176
|
"table__cell table__cell--header",
|
168
177
|
{
|
169
178
|
"table__cell--sortable": t.sortable,
|
170
179
|
"table__cell--action": t.action
|
171
180
|
},
|
172
|
-
|
181
|
+
a
|
173
182
|
),
|
174
|
-
onClick: t.sortable ?
|
183
|
+
onClick: t.sortable ? i : t.action,
|
175
184
|
"aria-label": t.ariaLabel,
|
176
|
-
"aria-sort":
|
177
|
-
...
|
178
|
-
children: /* @__PURE__ */
|
179
|
-
/* @__PURE__ */
|
180
|
-
|
185
|
+
"aria-sort": b ? h() : void 0,
|
186
|
+
...N,
|
187
|
+
children: /* @__PURE__ */ e.jsxs("div", { className: "table__cell--header--content", children: [
|
188
|
+
/* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsx(
|
189
|
+
S,
|
181
190
|
{
|
182
|
-
icon:
|
191
|
+
icon: _(t.icon),
|
183
192
|
textLabel: t.label,
|
184
193
|
iconPosition: t.iconPosition,
|
185
194
|
handleIconAction: () => {
|
186
195
|
t.iconAction;
|
187
196
|
},
|
188
197
|
popupInfo: t.popupInfo,
|
189
|
-
positionPopUp: (
|
198
|
+
positionPopUp: (j = t.popupInfo) == null ? void 0 : j.positionPopUp
|
190
199
|
}
|
191
200
|
) }),
|
192
|
-
t.sortable && /* @__PURE__ */
|
193
|
-
/* @__PURE__ */
|
194
|
-
|
201
|
+
t.sortable && /* @__PURE__ */ e.jsxs("span", { className: "sort-indicator", children: [
|
202
|
+
/* @__PURE__ */ e.jsx(
|
203
|
+
ee,
|
195
204
|
{
|
196
|
-
filled:
|
197
|
-
className:
|
198
|
-
active:
|
205
|
+
filled: b && p === "desc",
|
206
|
+
className: o("sort-indicator__triangle", {
|
207
|
+
active: b && p === "desc"
|
199
208
|
})
|
200
209
|
}
|
201
210
|
),
|
202
|
-
/* @__PURE__ */
|
203
|
-
|
211
|
+
/* @__PURE__ */ e.jsx(
|
212
|
+
ae,
|
204
213
|
{
|
205
|
-
filled:
|
206
|
-
className:
|
207
|
-
active:
|
214
|
+
filled: b && p === "asc",
|
215
|
+
className: o("sort-indicator__triangle", {
|
216
|
+
active: b && p === "asc"
|
208
217
|
})
|
209
218
|
}
|
210
219
|
)
|
@@ -213,105 +222,140 @@ const A = u.forwardRef(({ className: e, config: t, sortConfig: s, onSort: l, ...
|
|
213
222
|
}
|
214
223
|
);
|
215
224
|
});
|
216
|
-
|
217
|
-
const
|
218
|
-
/* @__PURE__ */
|
219
|
-
/* @__PURE__ */
|
220
|
-
] }),
|
221
|
-
content:
|
222
|
-
}) => typeof
|
223
|
-
({ className:
|
225
|
+
U.displayName = "TableHead";
|
226
|
+
const ne = ({ data: a }) => /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
227
|
+
/* @__PURE__ */ e.jsx("div", { className: "table__cell--firstLine", children: a.firstLine }),
|
228
|
+
/* @__PURE__ */ e.jsx("div", { className: "table__cell--secondLine", children: a.secondLine })
|
229
|
+
] }), le = ({ data: a }) => a.type === "link" && a.link ? /* @__PURE__ */ e.jsx("a", { href: a.link, "aria-label": a.ariaLabel, children: a.label }) : /* @__PURE__ */ e.jsx("button", { onClick: a.action, "aria-label": a.ariaLabel, children: a.label }), D = (a) => typeof a == "object" && a !== null && "firstLine" in a && "secondLine" in a, V = (a) => typeof a == "object" && a !== null && "label" in a && "type" in a, oe = ({
|
230
|
+
content: a
|
231
|
+
}) => typeof a == "string" ? /* @__PURE__ */ e.jsx(e.Fragment, { children: a }) : D(a) ? /* @__PURE__ */ e.jsx(ne, { data: a }) : V(a) ? /* @__PURE__ */ e.jsx(le, { data: a }) : null, A = x.forwardRef(
|
232
|
+
({ className: a, content: t, type: s, ...i }, N) => /* @__PURE__ */ e.jsx(
|
224
233
|
"td",
|
225
234
|
{
|
226
|
-
ref:
|
227
|
-
className:
|
235
|
+
ref: N,
|
236
|
+
className: o(
|
228
237
|
"table__cell",
|
229
238
|
{
|
230
239
|
"table__cell--double-line": s === "double-line",
|
231
240
|
"table__cell--action": s === "action"
|
232
241
|
},
|
233
|
-
|
242
|
+
a
|
234
243
|
),
|
235
|
-
...
|
236
|
-
children: /* @__PURE__ */
|
244
|
+
...i,
|
245
|
+
children: /* @__PURE__ */ e.jsx(oe, { content: t })
|
237
246
|
}
|
238
247
|
)
|
239
248
|
);
|
240
|
-
|
241
|
-
const
|
242
|
-
currentPage:
|
249
|
+
A.displayName = "TableCell";
|
250
|
+
const re = ({
|
251
|
+
currentPage: a = 1,
|
243
252
|
totalResults: t,
|
244
253
|
resultsPerPage: s,
|
245
|
-
setCurrentPage:
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
254
|
+
setCurrentPage: i,
|
255
|
+
className: N,
|
256
|
+
serverSide: l = !1,
|
257
|
+
totalItems: b,
|
258
|
+
hasNextPage: p,
|
259
|
+
hasPreviousPage: h,
|
260
|
+
onNextPage: _,
|
261
|
+
onPreviousPage: j
|
250
262
|
}) => {
|
251
|
-
const
|
252
|
-
l
|
253
|
-
}
|
254
|
-
|
255
|
-
|
263
|
+
const y = Math.ceil(l ? (b || t) / s : t / s), C = () => {
|
264
|
+
l && _ ? _() : i(a + 1);
|
265
|
+
}, v = () => {
|
266
|
+
l && j ? j() : i(a - 1);
|
267
|
+
}, w = l ? !p : a === y, T = l ? !h : a === 1;
|
268
|
+
return /* @__PURE__ */ e.jsxs("div", { className: o("pagination", N), children: [
|
269
|
+
/* @__PURE__ */ e.jsxs("div", { className: "pagination__info", children: [
|
256
270
|
"Stai visualizzando",
|
257
271
|
" ",
|
258
|
-
/* @__PURE__ */
|
272
|
+
/* @__PURE__ */ e.jsx("span", { className: "pagination__info__resultsPerPage", children: s }),
|
259
273
|
" ",
|
260
274
|
"di ",
|
261
|
-
t,
|
275
|
+
l && b || t,
|
262
276
|
" risultati"
|
263
277
|
] }),
|
264
|
-
/* @__PURE__ */
|
265
|
-
/* @__PURE__ */
|
278
|
+
!l && /* @__PURE__ */ e.jsxs("div", { className: "pagination__nav", children: [
|
279
|
+
/* @__PURE__ */ e.jsx(
|
266
280
|
"button",
|
267
281
|
{
|
268
|
-
className:
|
282
|
+
className: o(
|
269
283
|
"pagination__button",
|
270
|
-
|
284
|
+
T && "pagination__button--disabled"
|
271
285
|
),
|
272
|
-
onClick:
|
273
|
-
disabled:
|
286
|
+
onClick: v,
|
287
|
+
disabled: T,
|
274
288
|
"aria-label": "Previous page",
|
275
|
-
children: /* @__PURE__ */
|
289
|
+
children: /* @__PURE__ */ e.jsx("svg", { className: "pagination__button-arrow", viewBox: "0 0 24 24", children: /* @__PURE__ */ e.jsx("path", { d: "M15 18l-6-6 6-6" }) })
|
276
290
|
}
|
277
291
|
),
|
278
|
-
Array.from({ length:
|
292
|
+
Array.from({ length: y }, (g, r) => r + 1).map((g) => /* @__PURE__ */ e.jsx(
|
279
293
|
"button",
|
280
294
|
{
|
281
|
-
className:
|
295
|
+
className: o(
|
282
296
|
"pagination__button",
|
283
|
-
|
284
|
-
r && "pagination__button--disabled"
|
297
|
+
a === g && "pagination__button--active"
|
285
298
|
),
|
286
|
-
onClick: () =>
|
287
|
-
|
288
|
-
children: c
|
299
|
+
onClick: () => i(g),
|
300
|
+
children: g
|
289
301
|
},
|
290
|
-
|
302
|
+
g
|
291
303
|
)),
|
292
|
-
/* @__PURE__ */
|
304
|
+
/* @__PURE__ */ e.jsx(
|
305
|
+
"button",
|
306
|
+
{
|
307
|
+
className: o(
|
308
|
+
"pagination__button",
|
309
|
+
w && "pagination__button--disabled"
|
310
|
+
),
|
311
|
+
onClick: C,
|
312
|
+
disabled: w,
|
313
|
+
"aria-label": "Next page",
|
314
|
+
children: /* @__PURE__ */ e.jsx("svg", { className: "pagination__button-arrow", viewBox: "0 0 24 24", children: /* @__PURE__ */ e.jsx("path", { d: "M9 6l6 6-6 6" }) })
|
315
|
+
}
|
316
|
+
)
|
317
|
+
] }),
|
318
|
+
l && /* @__PURE__ */ e.jsxs("div", { className: "pagination__nav", children: [
|
319
|
+
/* @__PURE__ */ e.jsx(
|
320
|
+
"button",
|
321
|
+
{
|
322
|
+
className: o(
|
323
|
+
"pagination__button",
|
324
|
+
T && "pagination__button--disabled"
|
325
|
+
),
|
326
|
+
onClick: v,
|
327
|
+
disabled: T,
|
328
|
+
"aria-label": "Previous page",
|
329
|
+
children: /* @__PURE__ */ e.jsx("svg", { className: "pagination__button-arrow", viewBox: "0 0 24 24", children: /* @__PURE__ */ e.jsx("path", { d: "M15 18l-6-6 6-6" }) })
|
330
|
+
}
|
331
|
+
),
|
332
|
+
/* @__PURE__ */ e.jsxs("div", { className: "pagination__page-indicator", children: [
|
333
|
+
"Pagina ",
|
334
|
+
a
|
335
|
+
] }),
|
336
|
+
/* @__PURE__ */ e.jsx(
|
293
337
|
"button",
|
294
338
|
{
|
295
|
-
className:
|
339
|
+
className: o(
|
296
340
|
"pagination__button",
|
297
|
-
|
341
|
+
w && "pagination__button--disabled"
|
298
342
|
),
|
299
|
-
onClick:
|
300
|
-
disabled:
|
343
|
+
onClick: C,
|
344
|
+
disabled: w,
|
301
345
|
"aria-label": "Next page",
|
302
|
-
children: /* @__PURE__ */
|
346
|
+
children: /* @__PURE__ */ e.jsx("svg", { className: "pagination__button-arrow", viewBox: "0 0 24 24", children: /* @__PURE__ */ e.jsx("path", { d: "M9 6l6 6-6 6" }) })
|
303
347
|
}
|
304
348
|
)
|
305
349
|
] })
|
306
350
|
] });
|
307
351
|
};
|
308
352
|
export {
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
353
|
+
re as Pagination,
|
354
|
+
ie as Table,
|
355
|
+
H as TableBody,
|
356
|
+
A as TableCell,
|
357
|
+
U as TableHead,
|
358
|
+
F as TableHeader,
|
359
|
+
B as TableRow
|
316
360
|
};
|
317
361
|
//# sourceMappingURL=index.es65.js.map
|