@pathscale/ui 0.0.12 → 0.0.14
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 +44 -39
- package/dist/components/accordion/index.html +7 -0
- package/dist/components/accordion/index.html.br +2 -0
- package/dist/components/accordion/index.js +7690 -1
- package/dist/components/accordion/index.js.br +0 -0
- package/dist/components/alert/index.html +7 -0
- package/dist/components/alert/index.html.br +0 -0
- package/dist/components/alert/index.js +7426 -0
- package/dist/components/alert/index.js.br +0 -0
- package/dist/components/autocomplete/index.html +7 -0
- package/dist/components/autocomplete/index.html.br +1 -0
- package/dist/components/autocomplete/index.js +5438 -1
- package/dist/components/autocomplete/index.js.br +0 -0
- package/dist/components/avatar/index.html +7 -0
- package/dist/components/avatar/index.html.br +0 -0
- package/dist/components/avatar/index.js +8795 -1
- package/dist/components/avatar/index.js.br +0 -0
- package/dist/components/badge/index.html +7 -0
- package/dist/components/badge/index.html.br +1 -0
- package/dist/components/badge/index.js +7435 -1
- package/dist/components/badge/index.js.br +0 -0
- package/dist/components/breadcrumbs/index.html +7 -0
- package/dist/components/breadcrumbs/index.html.br +0 -0
- package/dist/components/breadcrumbs/index.js +7434 -1
- package/dist/components/breadcrumbs/index.js.br +0 -0
- package/dist/components/button/index.html +7 -0
- package/dist/components/button/index.html.br +0 -0
- package/dist/components/button/index.js +8771 -1
- package/dist/components/button/index.js.br +0 -0
- package/dist/components/card/index.html +7 -0
- package/dist/components/card/index.html.br +2 -0
- package/dist/components/card/index.js +7536 -0
- package/dist/components/card/index.js.br +0 -0
- package/dist/components/chatbubble/index.html +7 -0
- package/dist/components/chatbubble/index.html.br +0 -0
- package/dist/components/chatbubble/index.js +8991 -0
- package/dist/components/chatbubble/index.js.br +0 -0
- package/dist/components/checkbox/index.html +7 -0
- package/dist/components/checkbox/index.html.br +0 -0
- package/dist/components/checkbox/index.js +7436 -1
- package/dist/components/checkbox/index.js.br +0 -0
- package/dist/components/collapse/index.html +7 -0
- package/dist/components/collapse/index.html.br +0 -0
- package/dist/components/collapse/index.js +7621 -1
- package/dist/components/collapse/index.js.br +0 -0
- package/dist/components/countdown/index.html +7 -0
- package/dist/components/countdown/index.html.br +0 -0
- package/dist/components/countdown/index.js +7378 -0
- package/dist/components/countdown/index.js.br +0 -0
- package/dist/components/diff/index.html +7 -0
- package/dist/components/diff/index.html.br +0 -0
- package/dist/components/diff/index.js +7408 -0
- package/dist/components/diff/index.js.br +0 -0
- package/dist/components/divider/index.html +7 -0
- package/dist/components/divider/index.html.br +0 -0
- package/dist/components/divider/index.js +9852 -0
- package/dist/components/divider/index.js.br +0 -0
- package/dist/components/dock/index.html +7 -0
- package/dist/components/dock/index.html.br +0 -0
- package/dist/components/dock/index.js +7503 -0
- package/dist/components/dock/index.js.br +0 -0
- package/dist/components/dropdown/index.html +7 -0
- package/dist/components/dropdown/index.html.br +0 -0
- package/dist/components/dropdown/index.js +9073 -1
- package/dist/components/dropdown/index.js.br +0 -0
- package/dist/components/field/index.html +7 -0
- package/dist/components/field/index.html.br +2 -0
- package/dist/components/field/index.js +5356 -1
- package/dist/components/field/index.js.br +0 -0
- package/dist/components/fileinput/index.html +7 -0
- package/dist/components/fileinput/index.html.br +2 -0
- package/dist/components/fileinput/index.js +7431 -1
- package/dist/components/fileinput/index.js.br +0 -0
- package/dist/components/indicator/index.html +7 -0
- package/dist/components/indicator/index.html.br +2 -0
- package/dist/components/indicator/index.js +9219 -0
- package/dist/components/indicator/index.js.br +0 -0
- package/dist/components/input/index.html +7 -0
- package/dist/components/input/index.html.br +2 -0
- package/dist/components/input/index.js +7425 -1
- package/dist/components/input/index.js.br +0 -0
- package/dist/components/join/index.html +7 -0
- package/dist/components/join/index.html.br +2 -0
- package/dist/components/join/index.js +7418 -1
- package/dist/components/join/index.js.br +0 -0
- package/dist/components/kbd/index.html +7 -0
- package/dist/components/kbd/index.html.br +2 -0
- package/dist/components/kbd/index.js +7399 -0
- package/dist/components/kbd/index.js.br +0 -0
- package/dist/components/link/index.html +7 -0
- package/dist/components/link/index.html.br +2 -0
- package/dist/components/link/index.js +7422 -0
- package/dist/components/link/index.js.br +0 -0
- package/dist/components/loading/index.html +7 -0
- package/dist/components/loading/index.html.br +0 -0
- package/dist/components/loading/index.js +7432 -0
- package/dist/components/loading/index.js.br +0 -0
- package/dist/components/mask/index.html +7 -0
- package/dist/components/mask/index.html.br +0 -0
- package/dist/components/mask/index.js +7440 -1
- package/dist/components/mask/index.js.br +0 -0
- package/dist/components/menu/index.html +7 -0
- package/dist/components/menu/index.html.br +2 -0
- package/dist/components/menu/index.js +7618 -1
- package/dist/components/menu/index.js.br +0 -0
- package/dist/components/modal/index.html +7 -0
- package/dist/components/modal/index.html.br +3 -0
- package/dist/components/modal/index.js +7599 -0
- package/dist/components/modal/index.js.br +0 -0
- package/dist/components/navbar/index.html +7 -0
- package/dist/components/navbar/index.html.br +2 -0
- package/dist/components/navbar/index.js +7475 -1
- package/dist/components/navbar/index.js.br +0 -0
- package/dist/components/pagination/index.html +7 -0
- package/dist/components/pagination/index.html.br +2 -0
- package/dist/components/pagination/index.js +7426 -1
- package/dist/components/pagination/index.js.br +0 -0
- package/dist/components/polymorphic/index.html +7 -0
- package/dist/components/polymorphic/index.html.br +0 -0
- package/dist/components/polymorphic/index.js +3031 -1
- package/dist/components/polymorphic/index.js.br +0 -0
- package/dist/components/progress/index.html +7 -0
- package/dist/components/progress/index.html.br +0 -0
- package/dist/components/progress/index.js +7413 -0
- package/dist/components/progress/index.js.br +0 -0
- package/dist/components/radialprogress/index.html +7 -0
- package/dist/components/radialprogress/index.html.br +0 -0
- package/dist/components/radialprogress/index.js +7430 -0
- package/dist/components/radialprogress/index.js.br +0 -0
- package/dist/components/radio/index.html +7 -0
- package/dist/components/radio/index.html.br +2 -0
- package/dist/components/radio/index.js +7423 -0
- package/dist/components/radio/index.js.br +0 -0
- package/dist/components/range/index.html +7 -0
- package/dist/components/range/index.html.br +0 -0
- package/dist/components/range/index.js +7462 -0
- package/dist/components/range/index.js.br +0 -0
- package/dist/components/rating/index.html +7 -0
- package/dist/components/rating/index.html.br +0 -0
- package/dist/components/rating/index.js +8858 -0
- package/dist/components/rating/index.js.br +0 -0
- package/dist/components/select/index.html +7 -0
- package/dist/components/select/index.html.br +0 -0
- package/dist/components/select/index.js +7427 -1
- package/dist/components/select/index.js.br +0 -0
- package/dist/components/skeleton/index.html +7 -0
- package/dist/components/skeleton/index.html.br +0 -0
- package/dist/components/skeleton/index.js +7381 -0
- package/dist/components/skeleton/index.js.br +0 -0
- package/dist/components/stack/index.html +7 -0
- package/dist/components/stack/index.html.br +0 -0
- package/dist/components/stack/index.js +8972 -0
- package/dist/components/stack/index.js.br +0 -0
- package/dist/components/stats/index.html +7 -0
- package/dist/components/stats/index.html.br +0 -0
- package/dist/components/stats/index.js +7508 -0
- package/dist/components/stats/index.js.br +0 -0
- package/dist/components/steps/index.html +7 -0
- package/dist/components/steps/index.html.br +0 -0
- package/dist/components/steps/index.js +8732 -1
- package/dist/components/steps/index.js.br +0 -0
- package/dist/components/swap/index.html +7 -0
- package/dist/components/swap/index.html.br +2 -0
- package/dist/components/swap/index.js +7467 -0
- package/dist/components/swap/index.js.br +0 -0
- package/dist/components/table/index.html +7 -0
- package/dist/components/table/index.html.br +2 -0
- package/dist/components/table/index.js +9493 -1
- package/dist/components/table/index.js.br +0 -0
- package/dist/components/tabs/index.html +7 -0
- package/dist/components/tabs/index.html.br +3 -0
- package/dist/components/tabs/index.js +5399 -1
- package/dist/components/tabs/index.js.br +0 -0
- package/dist/components/textarea/index.html +7 -0
- package/dist/components/textarea/index.html.br +0 -0
- package/dist/components/textarea/index.js +7425 -1
- package/dist/components/textarea/index.js.br +0 -0
- package/dist/components/timeline/index.html +7 -0
- package/dist/components/timeline/index.html.br +1 -0
- package/dist/components/timeline/index.js +7600 -1
- package/dist/components/timeline/index.js.br +0 -0
- package/dist/components/toast/index.html +7 -0
- package/dist/components/toast/index.html.br +0 -0
- package/dist/components/toast/index.js +8793 -1
- package/dist/components/toast/index.js.br +0 -0
- package/dist/components/toggle/index.html +7 -0
- package/dist/components/toggle/index.html.br +0 -0
- package/dist/components/toggle/index.js +7426 -1
- package/dist/components/toggle/index.js.br +0 -0
- package/dist/components/tooltip/index.html +7 -0
- package/dist/components/tooltip/index.html.br +0 -0
- package/dist/components/tooltip/index.js +7432 -1
- package/dist/components/tooltip/index.js.br +0 -0
- package/dist/index.css.css +176 -0
- package/dist/index.css.css.br +0 -0
- package/dist/index.css.html +7 -0
- package/dist/index.css.html.br +0 -0
- package/dist/index.css.js +126 -0
- package/dist/index.css.js.br +0 -0
- package/dist/index.html +7 -0
- package/dist/index.html.br +0 -0
- package/dist/index.js +16127 -28
- package/dist/index.js.br +0 -0
- package/package.json +38 -43
- package/dist/Autocomplete-gLkjMHrc.d.ts +0 -28
- package/dist/Avatar-Dkd_kPlV.d.ts +0 -40
- package/dist/CollapseTitle-BNxog3is.d.ts +0 -12
- package/dist/Field-DI2PA30N.d.ts +0 -49
- package/dist/Mask-CPb596Mg.d.ts +0 -16
- package/dist/Menu-DgO4SHmA.d.ts +0 -45
- package/dist/Progress-ChF4ior8.d.ts +0 -64
- package/dist/Steps-Dk-UPL6r.d.ts +0 -38
- package/dist/Table-CGa6Nop3.d.ts +0 -39
- package/dist/Tabs-WiUU0xsM.d.ts +0 -42
- package/dist/Timeline-Bd4SxHMT.d.ts +0 -14
- package/dist/chunk/2OJYONJ3.js +0 -40
- package/dist/chunk/2VQ2762Z.js +0 -80
- package/dist/chunk/2XPPNBYK.js +0 -164
- package/dist/chunk/3FBDYV4P.js +0 -143
- package/dist/chunk/3I23P4TJ.js +0 -33
- package/dist/chunk/55B7Q4NT.jsx +0 -258
- package/dist/chunk/5HG7XWVC.jsx +0 -2956
- package/dist/chunk/5IJ7WEIF.js +0 -43
- package/dist/chunk/5O6WC3OB.jsx +0 -67
- package/dist/chunk/6P5JIKPF.jsx +0 -51
- package/dist/chunk/BHLLVOVR.js +0 -46
- package/dist/chunk/C4YO33NN.jsx +0 -179
- package/dist/chunk/DJI5XKAV.js +0 -31
- package/dist/chunk/DN3P54J2.jsx +0 -43
- package/dist/chunk/DSTUGZW6.jsx +0 -81
- package/dist/chunk/DVFQAAZR.js +0 -43
- package/dist/chunk/EDDBK4J6.js +0 -42
- package/dist/chunk/FKSQPGOD.jsx +0 -170
- package/dist/chunk/FZRQDGPD.jsx +0 -54
- package/dist/chunk/G5UEZ2VC.js +0 -49
- package/dist/chunk/GL7JG772.js +0 -114
- package/dist/chunk/GMIXRYN3.js +0 -138
- package/dist/chunk/HEOKGP5U.js +0 -55
- package/dist/chunk/HKS7ET6T.js +0 -56
- package/dist/chunk/HUHXQCKK.js +0 -16
- package/dist/chunk/HWAGW5N4.jsx +0 -118
- package/dist/chunk/I36LHZUY.jsx +0 -31
- package/dist/chunk/IG323YKF.jsx +0 -50
- package/dist/chunk/JQ4HSRDP.js +0 -142
- package/dist/chunk/JSQBKK7L.jsx +0 -50
- package/dist/chunk/JWRGKHDO.js +0 -172
- package/dist/chunk/K3WO7SRD.js +0 -1
- package/dist/chunk/KQ3RAWCE.jsx +0 -57
- package/dist/chunk/KV6LTJHI.jsx +0 -175
- package/dist/chunk/KXJZKDJX.jsx +0 -0
- package/dist/chunk/L4A67X7S.js +0 -7
- package/dist/chunk/LGDDR242.jsx +0 -159
- package/dist/chunk/MAX47D6F.js +0 -99
- package/dist/chunk/MM2DZQL3.js +0 -46
- package/dist/chunk/MYERRMTM.js +0 -200
- package/dist/chunk/MZWBWFDD.js +0 -151
- package/dist/chunk/O7LDJCQS.jsx +0 -18
- package/dist/chunk/OJRG4ZAB.jsx +0 -143
- package/dist/chunk/P653OZ5D.js +0 -224
- package/dist/chunk/P7WPLZNA.jsx +0 -59
- package/dist/chunk/Q4442PU4.js +0 -42
- package/dist/chunk/QYEMOKUG.js +0 -125
- package/dist/chunk/R5G3PODL.jsx +0 -11
- package/dist/chunk/R6ZBT7CY.jsx +0 -55
- package/dist/chunk/RHEFVSMJ.jsx +0 -52
- package/dist/chunk/SPEY5RMB.js +0 -84
- package/dist/chunk/STFCLC5R.js +0 -2954
- package/dist/chunk/STKRVQR6.jsx +0 -130
- package/dist/chunk/SVJIYMYJ.jsx +0 -156
- package/dist/chunk/SYWB4UN3.jsx +0 -64
- package/dist/chunk/T2LDLYWV.jsx +0 -101
- package/dist/chunk/UNKDNDT3.js +0 -62
- package/dist/chunk/VN5BKHA2.jsx +0 -97
- package/dist/chunk/WOT36Q7O.js +0 -166
- package/dist/chunk/WUZETUQR.js +0 -92
- package/dist/chunk/XM3KF5LV.jsx +0 -179
- package/dist/chunk/XQCSYRVP.jsx +0 -168
- package/dist/chunk/YWIT2MRI.jsx +0 -43
- package/dist/chunk/ZYEP35R3.jsx +0 -60
- package/dist/classes-B_S9K-9I.d.ts +0 -13
- package/dist/components/Progress/index.d.ts +0 -7
- package/dist/components/Progress/index.js +0 -1
- package/dist/components/Progress/index.jsx +0 -7
- package/dist/components/accordion/index.d.ts +0 -20
- package/dist/components/accordion/index.jsx +0 -9
- package/dist/components/autocomplete/index.d.ts +0 -8
- package/dist/components/autocomplete/index.jsx +0 -7
- package/dist/components/avatar/index.d.ts +0 -8
- package/dist/components/avatar/index.jsx +0 -8
- package/dist/components/badge/index.d.ts +0 -17
- package/dist/components/badge/index.jsx +0 -8
- package/dist/components/breadcrumbs/index.d.ts +0 -9
- package/dist/components/breadcrumbs/index.jsx +0 -7
- package/dist/components/button/index.d.ts +0 -31
- package/dist/components/button/index.jsx +0 -8
- package/dist/components/checkbox/index.d.ts +0 -16
- package/dist/components/checkbox/index.jsx +0 -8
- package/dist/components/collapse/index.d.ts +0 -15
- package/dist/components/collapse/index.jsx +0 -14
- package/dist/components/dropdown/index.d.ts +0 -27
- package/dist/components/dropdown/index.jsx +0 -13
- package/dist/components/field/index.d.ts +0 -7
- package/dist/components/field/index.jsx +0 -7
- package/dist/components/fileinput/index.d.ts +0 -16
- package/dist/components/fileinput/index.jsx +0 -8
- package/dist/components/input/index.d.ts +0 -15
- package/dist/components/input/index.jsx +0 -8
- package/dist/components/join/index.d.ts +0 -11
- package/dist/components/join/index.jsx +0 -9
- package/dist/components/mask/index.d.ts +0 -7
- package/dist/components/mask/index.jsx +0 -8
- package/dist/components/menu/index.d.ts +0 -8
- package/dist/components/menu/index.jsx +0 -8
- package/dist/components/navbar/index.d.ts +0 -36
- package/dist/components/navbar/index.jsx +0 -11
- package/dist/components/pagination/index.d.ts +0 -8
- package/dist/components/pagination/index.jsx +0 -9
- package/dist/components/polymorphic/index.d.ts +0 -34
- package/dist/components/polymorphic/index.jsx +0 -8
- package/dist/components/select/index.d.ts +0 -15
- package/dist/components/select/index.jsx +0 -8
- package/dist/components/steps/index.d.ts +0 -7
- package/dist/components/steps/index.jsx +0 -8
- package/dist/components/table/index.d.ts +0 -8
- package/dist/components/table/index.jsx +0 -7
- package/dist/components/tabs/index.d.ts +0 -8
- package/dist/components/tabs/index.jsx +0 -7
- package/dist/components/textarea/index.d.ts +0 -15
- package/dist/components/textarea/index.jsx +0 -8
- package/dist/components/timeline/index.d.ts +0 -7
- package/dist/components/timeline/index.jsx +0 -7
- package/dist/components/toast/index.d.ts +0 -24
- package/dist/components/toast/index.jsx +0 -11
- package/dist/components/toggle/index.d.ts +0 -15
- package/dist/components/toggle/index.jsx +0 -8
- package/dist/components/tooltip/index.d.ts +0 -17
- package/dist/components/tooltip/index.jsx +0 -8
- package/dist/index.css +0 -73
- package/dist/index.d.ts +0 -32
- package/dist/index.jsx +0 -138
- package/dist/types-CUG9pToa.d.ts +0 -15
package/dist/chunk/HWAGW5N4.jsx
DELETED
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
classes,
|
|
3
|
-
cva
|
|
4
|
-
} from "./P7WPLZNA.jsx";
|
|
5
|
-
|
|
6
|
-
// src/components/table/Table.tsx
|
|
7
|
-
import {
|
|
8
|
-
splitProps,
|
|
9
|
-
createMemo,
|
|
10
|
-
createSignal,
|
|
11
|
-
For
|
|
12
|
-
} from "solid-js";
|
|
13
|
-
|
|
14
|
-
// src/components/table/Table.styles.ts
|
|
15
|
-
var tableWrapper = cva(
|
|
16
|
-
"overflow-x-auto rounded-lg border border-gray-200 shadow"
|
|
17
|
-
);
|
|
18
|
-
var tableVariants = cva(
|
|
19
|
-
[
|
|
20
|
-
"min-w-full",
|
|
21
|
-
"text-sm text-left",
|
|
22
|
-
"divide-y divide-gray-100"
|
|
23
|
-
],
|
|
24
|
-
{
|
|
25
|
-
variants: {
|
|
26
|
-
header: {
|
|
27
|
-
default: "bg-gray-50 font-semibold text-gray-700"
|
|
28
|
-
},
|
|
29
|
-
row: {
|
|
30
|
-
default: ""
|
|
31
|
-
},
|
|
32
|
-
cell: {
|
|
33
|
-
default: "px-4 py-2"
|
|
34
|
-
},
|
|
35
|
-
divider: {
|
|
36
|
-
on: "border-r border-gray-200 last:border-r-0",
|
|
37
|
-
off: ""
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
defaultVariants: {
|
|
41
|
-
header: "default",
|
|
42
|
-
row: "default",
|
|
43
|
-
cell: "default",
|
|
44
|
-
divider: "on"
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
);
|
|
48
|
-
|
|
49
|
-
// src/components/table/Table.tsx
|
|
50
|
-
var Table = (props) => {
|
|
51
|
-
const [localProps, variantProps, otherProps] = splitProps(
|
|
52
|
-
props,
|
|
53
|
-
["columns", "rows", "onSort", "className", "rowKey"],
|
|
54
|
-
Object.keys(tableVariants.variantKeys ?? {})
|
|
55
|
-
);
|
|
56
|
-
const [sortKey, setSortKey] = createSignal(null);
|
|
57
|
-
const [sortDir, setSortDir] = createSignal("asc");
|
|
58
|
-
const data = createMemo(() => localProps.rows);
|
|
59
|
-
const baseVars = () => variantProps;
|
|
60
|
-
const wrapperClass = classes(
|
|
61
|
-
tableWrapper(),
|
|
62
|
-
localProps.className
|
|
63
|
-
);
|
|
64
|
-
const tableClass = classes(
|
|
65
|
-
tableVariants(baseVars()),
|
|
66
|
-
localProps.className
|
|
67
|
-
);
|
|
68
|
-
const handleHeaderClick = (colKey, isSortable) => {
|
|
69
|
-
if (!isSortable) return;
|
|
70
|
-
const newDir = sortKey() === colKey && sortDir() === "asc" ? "desc" : "asc";
|
|
71
|
-
setSortKey(() => colKey);
|
|
72
|
-
setSortDir(newDir);
|
|
73
|
-
props.onSort?.(colKey, newDir);
|
|
74
|
-
};
|
|
75
|
-
return <div class={wrapperClass}>
|
|
76
|
-
<table {...otherProps} class={tableClass}>
|
|
77
|
-
<thead>
|
|
78
|
-
<tr>
|
|
79
|
-
{localProps.columns.map((col) => <th
|
|
80
|
-
class={tableVariants({ ...baseVars(), cell: variantProps.cell, divider: "on" })}
|
|
81
|
-
onClick={() => handleHeaderClick(col.key, col.sortable)}
|
|
82
|
-
style={col.sortable ? { cursor: "pointer" } : void 0}
|
|
83
|
-
role="columnheader"
|
|
84
|
-
aria-sort={sortKey() === col.key ? sortDir() === "asc" ? "ascending" : "descending" : void 0}
|
|
85
|
-
>
|
|
86
|
-
{col.header}
|
|
87
|
-
{sortKey() === col.key && (sortDir() === "asc" ? " \u2191" : " \u2193")}
|
|
88
|
-
</th>)}
|
|
89
|
-
</tr>
|
|
90
|
-
</thead>
|
|
91
|
-
<tbody>
|
|
92
|
-
<For each={data()}>
|
|
93
|
-
{(row) => <tr
|
|
94
|
-
class={tableVariants({ ...baseVars(), row: variantProps.row })}
|
|
95
|
-
>
|
|
96
|
-
{localProps.columns.map((col, ci) => <td
|
|
97
|
-
class={tableVariants({
|
|
98
|
-
...baseVars(),
|
|
99
|
-
cell: variantProps.cell,
|
|
100
|
-
divider: ci === localProps.columns.length - 1 ? "off" : "on"
|
|
101
|
-
})}
|
|
102
|
-
>
|
|
103
|
-
{String(row[col.key] ?? "")}
|
|
104
|
-
</td>)}
|
|
105
|
-
</tr>}
|
|
106
|
-
</For>
|
|
107
|
-
</tbody>
|
|
108
|
-
</table>
|
|
109
|
-
</div>;
|
|
110
|
-
};
|
|
111
|
-
var Table_default = Table;
|
|
112
|
-
|
|
113
|
-
// src/components/table/index.ts
|
|
114
|
-
var table_default = Table_default;
|
|
115
|
-
|
|
116
|
-
export {
|
|
117
|
-
table_default
|
|
118
|
-
};
|
package/dist/chunk/I36LHZUY.jsx
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
twMerge
|
|
3
|
-
} from "./5HG7XWVC.jsx";
|
|
4
|
-
|
|
5
|
-
// src/components/breadcrumbs/Breadcrumbs.tsx
|
|
6
|
-
import { splitProps } from "solid-js";
|
|
7
|
-
var Breadcrumbs = (props) => {
|
|
8
|
-
const [local, others] = splitProps(props, [
|
|
9
|
-
"dataTheme",
|
|
10
|
-
"class",
|
|
11
|
-
"className",
|
|
12
|
-
"style",
|
|
13
|
-
"innerProps"
|
|
14
|
-
]);
|
|
15
|
-
const classes = () => twMerge("breadcrumbs text-sm", local.class, local.className);
|
|
16
|
-
return <div
|
|
17
|
-
{...others}
|
|
18
|
-
role="navigation"
|
|
19
|
-
aria-label="Breadcrumbs"
|
|
20
|
-
data-theme={local.dataTheme}
|
|
21
|
-
class={classes()}
|
|
22
|
-
style={local.style}
|
|
23
|
-
>
|
|
24
|
-
<ul {...local.innerProps}>{props.children}</ul>
|
|
25
|
-
</div>;
|
|
26
|
-
};
|
|
27
|
-
var Breadcrumbs_default = Breadcrumbs;
|
|
28
|
-
|
|
29
|
-
export {
|
|
30
|
-
Breadcrumbs_default
|
|
31
|
-
};
|
package/dist/chunk/IG323YKF.jsx
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
clsx
|
|
3
|
-
} from "./O7LDJCQS.jsx";
|
|
4
|
-
import {
|
|
5
|
-
twMerge
|
|
6
|
-
} from "./5HG7XWVC.jsx";
|
|
7
|
-
|
|
8
|
-
// src/components/textarea/Textarea.tsx
|
|
9
|
-
import { splitProps } from "solid-js";
|
|
10
|
-
var Textarea = (props) => {
|
|
11
|
-
const [local, others] = splitProps(props, [
|
|
12
|
-
"color",
|
|
13
|
-
"size",
|
|
14
|
-
"dataTheme",
|
|
15
|
-
"class",
|
|
16
|
-
"className",
|
|
17
|
-
"style"
|
|
18
|
-
]);
|
|
19
|
-
const classes = () => twMerge(
|
|
20
|
-
"textarea",
|
|
21
|
-
local.class,
|
|
22
|
-
local.className,
|
|
23
|
-
clsx({
|
|
24
|
-
"textarea-xl": local.size === "xl",
|
|
25
|
-
"textarea-lg": local.size === "lg",
|
|
26
|
-
"textarea-md": local.size === "md",
|
|
27
|
-
"textarea-sm": local.size === "sm",
|
|
28
|
-
"textarea-xs": local.size === "xs",
|
|
29
|
-
"textarea-primary": local.color === "primary",
|
|
30
|
-
"textarea-secondary": local.color === "secondary",
|
|
31
|
-
"textarea-accent": local.color === "accent",
|
|
32
|
-
"textarea-ghost": local.color === "ghost",
|
|
33
|
-
"textarea-info": local.color === "info",
|
|
34
|
-
"textarea-success": local.color === "success",
|
|
35
|
-
"textarea-warning": local.color === "warning",
|
|
36
|
-
"textarea-error": local.color === "error"
|
|
37
|
-
})
|
|
38
|
-
);
|
|
39
|
-
return <textarea
|
|
40
|
-
{...others}
|
|
41
|
-
data-theme={local.dataTheme}
|
|
42
|
-
class={classes()}
|
|
43
|
-
style={local.style}
|
|
44
|
-
/>;
|
|
45
|
-
};
|
|
46
|
-
var Textarea_default = Textarea;
|
|
47
|
-
|
|
48
|
-
export {
|
|
49
|
-
Textarea_default
|
|
50
|
-
};
|
package/dist/chunk/JQ4HSRDP.js
DELETED
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
import { clsx } from './HUHXQCKK.js';
|
|
2
|
-
import { twMerge } from './STFCLC5R.js';
|
|
3
|
-
import { template, spread, mergeProps, insert, effect, className } from 'solid-js/web';
|
|
4
|
-
import { splitProps } from 'solid-js';
|
|
5
|
-
|
|
6
|
-
var _tmpl$ = /* @__PURE__ */ template(`<li>`);
|
|
7
|
-
var MenuTitle = (props) => {
|
|
8
|
-
const [local, others] = splitProps(props, ["class", "className"]);
|
|
9
|
-
const classes = () => twMerge("menu-title", local.class, local.className);
|
|
10
|
-
return (() => {
|
|
11
|
-
var _el$ = _tmpl$();
|
|
12
|
-
spread(_el$, mergeProps(others, {
|
|
13
|
-
get ["class"]() {
|
|
14
|
-
return classes();
|
|
15
|
-
}
|
|
16
|
-
}), false, false);
|
|
17
|
-
return _el$;
|
|
18
|
-
})();
|
|
19
|
-
};
|
|
20
|
-
var MenuTitle_default = MenuTitle;
|
|
21
|
-
var _tmpl$2 = /* @__PURE__ */ template(`<li role=menuitem>`);
|
|
22
|
-
var MenuItem = (props) => {
|
|
23
|
-
const [local, others] = splitProps(props, ["class", "className", "focus", "active", "disabled", "children", "style", "dataTheme"]);
|
|
24
|
-
const classes = () => twMerge(local.class, local.className, clsx({
|
|
25
|
-
"menu-focus": local.focus,
|
|
26
|
-
"menu-active": local.active,
|
|
27
|
-
"menu-disabled": local.disabled
|
|
28
|
-
}));
|
|
29
|
-
return (() => {
|
|
30
|
-
var _el$ = _tmpl$2();
|
|
31
|
-
spread(_el$, mergeProps({
|
|
32
|
-
get ["class"]() {
|
|
33
|
-
return classes();
|
|
34
|
-
},
|
|
35
|
-
get style() {
|
|
36
|
-
return local.style;
|
|
37
|
-
},
|
|
38
|
-
get ["data-theme"]() {
|
|
39
|
-
return local.dataTheme;
|
|
40
|
-
}
|
|
41
|
-
}, others), false, true);
|
|
42
|
-
insert(_el$, () => local.children);
|
|
43
|
-
return _el$;
|
|
44
|
-
})();
|
|
45
|
-
};
|
|
46
|
-
var MenuItem_default = MenuItem;
|
|
47
|
-
var _tmpl$3 = /* @__PURE__ */ template(`<span>`);
|
|
48
|
-
var _tmpl$22 = /* @__PURE__ */ template(`<ul>`);
|
|
49
|
-
var MenuDropdown = (props) => {
|
|
50
|
-
const [local, others] = splitProps(props, ["label", "open", "class", "className", "style", "children", "data-theme"]);
|
|
51
|
-
const spanClasses = () => twMerge("menu-dropdown-toggle", local.class, local.className, clsx({
|
|
52
|
-
"menu-dropdown-show": local.open
|
|
53
|
-
}));
|
|
54
|
-
const ulClasses = () => clsx("menu-dropdown", {
|
|
55
|
-
"menu-dropdown-show": local.open
|
|
56
|
-
});
|
|
57
|
-
return [(() => {
|
|
58
|
-
var _el$ = _tmpl$3();
|
|
59
|
-
spread(_el$, mergeProps(others, {
|
|
60
|
-
get ["class"]() {
|
|
61
|
-
return spanClasses();
|
|
62
|
-
},
|
|
63
|
-
get style() {
|
|
64
|
-
return local.style;
|
|
65
|
-
},
|
|
66
|
-
get ["data-theme"]() {
|
|
67
|
-
return local["data-theme"];
|
|
68
|
-
}
|
|
69
|
-
}), false, true);
|
|
70
|
-
insert(_el$, () => local.label);
|
|
71
|
-
return _el$;
|
|
72
|
-
})(), (() => {
|
|
73
|
-
var _el$2 = _tmpl$22();
|
|
74
|
-
insert(_el$2, () => local.children);
|
|
75
|
-
effect(() => className(_el$2, ulClasses()));
|
|
76
|
-
return _el$2;
|
|
77
|
-
})()];
|
|
78
|
-
};
|
|
79
|
-
var MenuDropdown_default = MenuDropdown;
|
|
80
|
-
var _tmpl$4 = /* @__PURE__ */ template(`<details><summary></summary><ul>`);
|
|
81
|
-
var MenuDetails = (props) => {
|
|
82
|
-
const [local, others] = splitProps(props, ["label", "open", "class", "className", "style", "children", "dataTheme"]);
|
|
83
|
-
const classAttr = () => local.class ?? local.className;
|
|
84
|
-
return (() => {
|
|
85
|
-
var _el$ = _tmpl$4(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
|
|
86
|
-
spread(_el$, mergeProps(others, {
|
|
87
|
-
get open() {
|
|
88
|
-
return local.open;
|
|
89
|
-
},
|
|
90
|
-
get ["class"]() {
|
|
91
|
-
return classAttr();
|
|
92
|
-
},
|
|
93
|
-
get style() {
|
|
94
|
-
return local.style;
|
|
95
|
-
},
|
|
96
|
-
get ["data-theme"]() {
|
|
97
|
-
return local.dataTheme;
|
|
98
|
-
}
|
|
99
|
-
}), false, true);
|
|
100
|
-
insert(_el$2, () => local.label);
|
|
101
|
-
insert(_el$3, () => local.children);
|
|
102
|
-
return _el$;
|
|
103
|
-
})();
|
|
104
|
-
};
|
|
105
|
-
var MenuDetails_default = MenuDetails;
|
|
106
|
-
|
|
107
|
-
// src/components/menu/Menu.tsx
|
|
108
|
-
var _tmpl$5 = /* @__PURE__ */ template(`<ul role=menu>`);
|
|
109
|
-
var Menu = (props) => {
|
|
110
|
-
const [local, others] = splitProps(props, ["responsive", "horizontal", "vertical", "size", "class", "className", "dataTheme"]);
|
|
111
|
-
const classes = () => twMerge("menu", local.class, local.className, clsx({
|
|
112
|
-
"menu-vertical lg:menu-horizontal": local.responsive,
|
|
113
|
-
"menu-xl": local.size === "xl",
|
|
114
|
-
"menu-lg": local.size === "lg",
|
|
115
|
-
"menu-md": local.size === "md",
|
|
116
|
-
"menu-sm": local.size === "sm",
|
|
117
|
-
"menu-xs": local.size === "xs",
|
|
118
|
-
"menu-vertical": local.vertical,
|
|
119
|
-
"menu-horizontal": local.horizontal
|
|
120
|
-
}));
|
|
121
|
-
return (() => {
|
|
122
|
-
var _el$ = _tmpl$5();
|
|
123
|
-
spread(_el$, mergeProps({
|
|
124
|
-
get ["data-theme"]() {
|
|
125
|
-
return local.dataTheme;
|
|
126
|
-
},
|
|
127
|
-
get ["class"]() {
|
|
128
|
-
return classes();
|
|
129
|
-
}
|
|
130
|
-
}, others), false, false);
|
|
131
|
-
return _el$;
|
|
132
|
-
})();
|
|
133
|
-
};
|
|
134
|
-
var Menu_default = Object.assign(Menu, {
|
|
135
|
-
Title: MenuTitle_default,
|
|
136
|
-
Item: MenuItem_default,
|
|
137
|
-
Dropdown: MenuDropdown_default,
|
|
138
|
-
Details: MenuDetails_default,
|
|
139
|
-
Menu
|
|
140
|
-
});
|
|
141
|
-
|
|
142
|
-
export { Menu_default };
|
package/dist/chunk/JSQBKK7L.jsx
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
clsx
|
|
3
|
-
} from "./O7LDJCQS.jsx";
|
|
4
|
-
import {
|
|
5
|
-
twMerge
|
|
6
|
-
} from "./5HG7XWVC.jsx";
|
|
7
|
-
|
|
8
|
-
// src/components/input/Input.tsx
|
|
9
|
-
import { splitProps } from "solid-js";
|
|
10
|
-
var Input = (props) => {
|
|
11
|
-
const [local, others] = splitProps(props, [
|
|
12
|
-
"size",
|
|
13
|
-
"color",
|
|
14
|
-
"dataTheme",
|
|
15
|
-
"class",
|
|
16
|
-
"className",
|
|
17
|
-
"style"
|
|
18
|
-
]);
|
|
19
|
-
const classes = () => twMerge(
|
|
20
|
-
"input",
|
|
21
|
-
local.class,
|
|
22
|
-
local.className,
|
|
23
|
-
clsx({
|
|
24
|
-
"input-xl": local.size === "xl",
|
|
25
|
-
"input-lg": local.size === "lg",
|
|
26
|
-
"input-md": local.size === "md",
|
|
27
|
-
"input-sm": local.size === "sm",
|
|
28
|
-
"input-xs": local.size === "xs",
|
|
29
|
-
"input-primary": local.color === "primary",
|
|
30
|
-
"input-secondary": local.color === "secondary",
|
|
31
|
-
"input-accent": local.color === "accent",
|
|
32
|
-
"input-ghost": local.color === "ghost",
|
|
33
|
-
"input-info": local.color === "info",
|
|
34
|
-
"input-success": local.color === "success",
|
|
35
|
-
"input-warning": local.color === "warning",
|
|
36
|
-
"input-error": local.color === "error"
|
|
37
|
-
})
|
|
38
|
-
);
|
|
39
|
-
return <input
|
|
40
|
-
{...others}
|
|
41
|
-
data-theme={local.dataTheme}
|
|
42
|
-
class={classes()}
|
|
43
|
-
style={local.style}
|
|
44
|
-
/>;
|
|
45
|
-
};
|
|
46
|
-
var Input_default = Input;
|
|
47
|
-
|
|
48
|
-
export {
|
|
49
|
-
Input_default
|
|
50
|
-
};
|
package/dist/chunk/JWRGKHDO.js
DELETED
|
@@ -1,172 +0,0 @@
|
|
|
1
|
-
import { cva } from './HKS7ET6T.js';
|
|
2
|
-
import { createSignal, For, onMount, onCleanup, Show } from 'solid-js';
|
|
3
|
-
import { delegateEvents, template, insert, createComponent, mergeProps, effect, className, use } from 'solid-js/web';
|
|
4
|
-
|
|
5
|
-
var [toasts, setToasts] = createSignal([]);
|
|
6
|
-
var toastStore = {
|
|
7
|
-
toasts,
|
|
8
|
-
add(toast2) {
|
|
9
|
-
const id = crypto.randomUUID();
|
|
10
|
-
setToasts((prev) => [...prev, { ...toast2, id }]);
|
|
11
|
-
return id;
|
|
12
|
-
},
|
|
13
|
-
remove(id) {
|
|
14
|
-
setToasts((prev) => prev.filter((t) => t.id !== id));
|
|
15
|
-
},
|
|
16
|
-
clear() {
|
|
17
|
-
setToasts([]);
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
// src/components/toast/toast-api.ts
|
|
22
|
-
function createToastApi() {
|
|
23
|
-
const show = (message, options = {}) => {
|
|
24
|
-
return toastStore.add({ ...options, message });
|
|
25
|
-
};
|
|
26
|
-
return {
|
|
27
|
-
show,
|
|
28
|
-
success: (msg, opts) => show(msg, { ...opts, type: "success" }),
|
|
29
|
-
error: (msg, opts) => show(msg, { ...opts, type: "error" }),
|
|
30
|
-
info: (msg, opts) => show(msg, { ...opts, type: "info" }),
|
|
31
|
-
warning: (msg, opts) => show(msg, { ...opts, type: "warning" }),
|
|
32
|
-
clear: toastStore.clear
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
// src/components/toast/utils/remove-element.ts
|
|
37
|
-
function removeElement(el) {
|
|
38
|
-
if (typeof el.remove === "function") {
|
|
39
|
-
el.remove();
|
|
40
|
-
} else {
|
|
41
|
-
el.parentNode?.removeChild(el);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
// src/components/toast/utils/timer.ts
|
|
46
|
-
var Timer = class {
|
|
47
|
-
callback;
|
|
48
|
-
delay;
|
|
49
|
-
startedAt;
|
|
50
|
-
timer;
|
|
51
|
-
constructor(callback, delay) {
|
|
52
|
-
this.callback = callback;
|
|
53
|
-
this.delay = delay;
|
|
54
|
-
this.startedAt = Date.now();
|
|
55
|
-
this.timer = window.setTimeout(callback, delay);
|
|
56
|
-
}
|
|
57
|
-
pause() {
|
|
58
|
-
this.stop();
|
|
59
|
-
this.delay -= Date.now() - this.startedAt;
|
|
60
|
-
}
|
|
61
|
-
resume() {
|
|
62
|
-
this.stop();
|
|
63
|
-
this.startedAt = Date.now();
|
|
64
|
-
this.timer = window.setTimeout(this.callback, this.delay);
|
|
65
|
-
}
|
|
66
|
-
stop() {
|
|
67
|
-
clearTimeout(this.timer);
|
|
68
|
-
}
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
// src/components/toast/Toast.styles.ts
|
|
72
|
-
var toastWrapperClass = cva(
|
|
73
|
-
"relative flex items-start gap-3 px-4 py-3 rounded-2xl shadow-lg transition-all duration-300 w-full",
|
|
74
|
-
{
|
|
75
|
-
variants: {
|
|
76
|
-
type: {
|
|
77
|
-
default: "bg-gray-700 text-white",
|
|
78
|
-
success: "bg-green-600 text-white",
|
|
79
|
-
error: "bg-red-600 text-white",
|
|
80
|
-
info: "bg-blue-600 text-white",
|
|
81
|
-
warning: "bg-yellow-400 text-black"
|
|
82
|
-
},
|
|
83
|
-
visible: {
|
|
84
|
-
true: "opacity-100 translate-y-0",
|
|
85
|
-
false: "opacity-0 -translate-y-2 pointer-events-none"
|
|
86
|
-
}
|
|
87
|
-
},
|
|
88
|
-
defaultVariants: {
|
|
89
|
-
type: "default",
|
|
90
|
-
visible: true
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
);
|
|
94
|
-
|
|
95
|
-
// src/components/toast/Toast.tsx
|
|
96
|
-
var _tmpl$ = /* @__PURE__ */ template(`<button class="absolute top-2 right-2 text-white/80 hover:text-white transition"aria-label="Close toast">\xD7`);
|
|
97
|
-
var _tmpl$2 = /* @__PURE__ */ template(`<div role=alert>`);
|
|
98
|
-
var Toast = (props) => {
|
|
99
|
-
const [visible, setVisible] = createSignal(false);
|
|
100
|
-
let rootRef;
|
|
101
|
-
let timer = null;
|
|
102
|
-
const close = () => {
|
|
103
|
-
timer?.stop();
|
|
104
|
-
setVisible(false);
|
|
105
|
-
setTimeout(() => {
|
|
106
|
-
props.onClose?.();
|
|
107
|
-
if (rootRef) removeElement(rootRef);
|
|
108
|
-
}, 150);
|
|
109
|
-
};
|
|
110
|
-
onMount(() => {
|
|
111
|
-
setVisible(true);
|
|
112
|
-
if (props.duration !== false) {
|
|
113
|
-
timer = new Timer(close, props.duration || 4e3);
|
|
114
|
-
}
|
|
115
|
-
});
|
|
116
|
-
onCleanup(() => {
|
|
117
|
-
timer?.stop();
|
|
118
|
-
});
|
|
119
|
-
return (() => {
|
|
120
|
-
var _el$ = _tmpl$2();
|
|
121
|
-
_el$.$$click = () => props.dismissible && close();
|
|
122
|
-
var _ref$ = rootRef;
|
|
123
|
-
typeof _ref$ === "function" ? use(_ref$, _el$) : rootRef = _el$;
|
|
124
|
-
insert(_el$, createComponent(Show, {
|
|
125
|
-
get when() {
|
|
126
|
-
return props.dismissible;
|
|
127
|
-
},
|
|
128
|
-
get children() {
|
|
129
|
-
return _tmpl$();
|
|
130
|
-
}
|
|
131
|
-
}));
|
|
132
|
-
effect((_p$) => {
|
|
133
|
-
var _v$ = toastWrapperClass({
|
|
134
|
-
type: props.type || "default",
|
|
135
|
-
visible: visible()
|
|
136
|
-
}), _v$2 = props.message;
|
|
137
|
-
_v$ !== _p$.e && className(_el$, _p$.e = _v$);
|
|
138
|
-
_v$2 !== _p$.t && (_el$.innerHTML = _p$.t = _v$2);
|
|
139
|
-
return _p$;
|
|
140
|
-
}, {
|
|
141
|
-
e: void 0,
|
|
142
|
-
t: void 0
|
|
143
|
-
});
|
|
144
|
-
return _el$;
|
|
145
|
-
})();
|
|
146
|
-
};
|
|
147
|
-
var Toast_default = Toast;
|
|
148
|
-
delegateEvents(["click"]);
|
|
149
|
-
|
|
150
|
-
// src/components/toast/Toaster.tsx
|
|
151
|
-
var _tmpl$3 = /* @__PURE__ */ template(`<div class="fixed bottom-4 right-4 z-50 flex flex-col items-end gap-2 w-[300px] max-w-full">`);
|
|
152
|
-
var Toaster = () => {
|
|
153
|
-
return (() => {
|
|
154
|
-
var _el$ = _tmpl$3();
|
|
155
|
-
insert(_el$, createComponent(For, {
|
|
156
|
-
get each() {
|
|
157
|
-
return toastStore.toasts();
|
|
158
|
-
},
|
|
159
|
-
children: (toast2) => createComponent(Toast_default, mergeProps(toast2, {
|
|
160
|
-
onClose: () => toastStore.remove(toast2.id)
|
|
161
|
-
}))
|
|
162
|
-
}));
|
|
163
|
-
return _el$;
|
|
164
|
-
})();
|
|
165
|
-
};
|
|
166
|
-
var Toaster_default = Toaster;
|
|
167
|
-
|
|
168
|
-
// src/components/toast/index.ts
|
|
169
|
-
var toast = createToastApi();
|
|
170
|
-
var toast_default = toast;
|
|
171
|
-
|
|
172
|
-
export { Toaster_default, toast, toast_default };
|
package/dist/chunk/K3WO7SRD.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
package/dist/chunk/KQ3RAWCE.jsx
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
clsx
|
|
3
|
-
} from "./O7LDJCQS.jsx";
|
|
4
|
-
import {
|
|
5
|
-
twMerge
|
|
6
|
-
} from "./5HG7XWVC.jsx";
|
|
7
|
-
|
|
8
|
-
// src/components/collapse/CollapseContent.tsx
|
|
9
|
-
function CollapseContent(props) {
|
|
10
|
-
const classes = twMerge("collapse-content", props.class);
|
|
11
|
-
return <div {...props} class={classes} />;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
// src/components/collapse/CollapseTitle.tsx
|
|
15
|
-
var classesFn = ({ className }) => twMerge("collapse-title", className);
|
|
16
|
-
function CollapseTitle(props) {
|
|
17
|
-
return <div {...props} class={classesFn({ className: props.class })} />;
|
|
18
|
-
}
|
|
19
|
-
function Summary(props) {
|
|
20
|
-
return <summary {...props} class={classesFn({ className: props.class })} />;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
// src/components/collapse/CollapseDetails.tsx
|
|
24
|
-
function classesFn2({
|
|
25
|
-
className,
|
|
26
|
-
icon,
|
|
27
|
-
open
|
|
28
|
-
}) {
|
|
29
|
-
return twMerge(
|
|
30
|
-
"collapse",
|
|
31
|
-
className,
|
|
32
|
-
clsx({
|
|
33
|
-
"collapse-arrow": icon === "arrow",
|
|
34
|
-
"collapse-plus": icon === "plus",
|
|
35
|
-
"collapse-open": open === true,
|
|
36
|
-
"collapse-close": open === false
|
|
37
|
-
})
|
|
38
|
-
);
|
|
39
|
-
}
|
|
40
|
-
function CollapseDetails(props) {
|
|
41
|
-
const classes = classesFn2({
|
|
42
|
-
className: props.class,
|
|
43
|
-
icon: props.icon,
|
|
44
|
-
open: props.open
|
|
45
|
-
});
|
|
46
|
-
return <details {...props} class={classes} open={props.open}>
|
|
47
|
-
{props.children}
|
|
48
|
-
</details>;
|
|
49
|
-
}
|
|
50
|
-
CollapseDetails.Title = Summary;
|
|
51
|
-
|
|
52
|
-
export {
|
|
53
|
-
CollapseContent,
|
|
54
|
-
CollapseTitle,
|
|
55
|
-
Summary,
|
|
56
|
-
CollapseDetails
|
|
57
|
-
};
|