@pathscale/ui 0.0.13 → 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 -1
- 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 -29
- 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/64ESNXN4.js +0 -1
- 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/H2Q3L5KM.js +0 -48
- 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/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/PFB27MP3.jsx +0 -0
- 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/T324HUIT.jsx +0 -57
- package/dist/chunk/T5LDPSFV.jsx +0 -122
- 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/YWIT2MRI.jsx +0 -43
- package/dist/chunk/ZH7DKMMN.js +0 -109
- 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 -9
- 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/loading/index.d.ts +0 -11
- package/dist/components/loading/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 -33
- package/dist/index.jsx +0 -143
- package/dist/types-CUG9pToa.d.ts +0 -15
package/dist/chunk/VN5BKHA2.jsx
DELETED
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
classes,
|
|
3
|
-
cva
|
|
4
|
-
} from "./P7WPLZNA.jsx";
|
|
5
|
-
|
|
6
|
-
// src/components/field/Field.tsx
|
|
7
|
-
import {
|
|
8
|
-
splitProps
|
|
9
|
-
} from "solid-js";
|
|
10
|
-
|
|
11
|
-
// src/components/field/Field.styles.ts
|
|
12
|
-
var fieldWrapper = cva(
|
|
13
|
-
"flex flex-col space-y-1",
|
|
14
|
-
{
|
|
15
|
-
variants: {
|
|
16
|
-
horizontal: {
|
|
17
|
-
true: "flex-row items-center space-x-2 space-y-0",
|
|
18
|
-
false: "flex-col"
|
|
19
|
-
},
|
|
20
|
-
size: {
|
|
21
|
-
sm: "text-sm",
|
|
22
|
-
md: "text-base",
|
|
23
|
-
lg: "text-lg"
|
|
24
|
-
},
|
|
25
|
-
type: {
|
|
26
|
-
default: "",
|
|
27
|
-
danger: "text-red-600"
|
|
28
|
-
},
|
|
29
|
-
grouped: {
|
|
30
|
-
true: "flex flex-wrap gap-2",
|
|
31
|
-
false: ""
|
|
32
|
-
},
|
|
33
|
-
groupMultiline: {
|
|
34
|
-
true: "flex-col",
|
|
35
|
-
false: "flex-row"
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
compoundVariants: [
|
|
39
|
-
{ horizontal: true, grouped: true, class: "items-start" }
|
|
40
|
-
],
|
|
41
|
-
defaultVariants: {
|
|
42
|
-
horizontal: false,
|
|
43
|
-
size: "md",
|
|
44
|
-
type: "default",
|
|
45
|
-
grouped: false,
|
|
46
|
-
groupMultiline: false
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
);
|
|
50
|
-
var labelStyles = cva("font-medium", {
|
|
51
|
-
variants: {
|
|
52
|
-
size: { sm: "text-sm", md: "text-base", lg: "text-lg" },
|
|
53
|
-
type: { default: "text-gray-800", danger: "text-red-600" }
|
|
54
|
-
},
|
|
55
|
-
defaultVariants: { size: "md", type: "default" }
|
|
56
|
-
});
|
|
57
|
-
var messageStyles = cva("mt-1 text-sm", {
|
|
58
|
-
variants: {
|
|
59
|
-
type: { default: "text-gray-600", danger: "text-red-600" }
|
|
60
|
-
},
|
|
61
|
-
defaultVariants: { type: "default" }
|
|
62
|
-
});
|
|
63
|
-
|
|
64
|
-
// src/components/field/Field.tsx
|
|
65
|
-
var Field = (props) => {
|
|
66
|
-
const [local, variantProps, rest] = splitProps(
|
|
67
|
-
props,
|
|
68
|
-
["label", "message", "className", "children"],
|
|
69
|
-
["horizontal", "size", "type", "grouped", "groupMultiline"]
|
|
70
|
-
);
|
|
71
|
-
return <div class={classes(fieldWrapper(variantProps), local.className)} {...rest}>
|
|
72
|
-
{local.label && <label class={labelStyles(variantProps)}>
|
|
73
|
-
{local.label}
|
|
74
|
-
</label>}
|
|
75
|
-
|
|
76
|
-
{
|
|
77
|
-
/* CONTENT SLOT: now flex when horizontal */
|
|
78
|
-
}
|
|
79
|
-
<div class={classes(
|
|
80
|
-
variantProps.horizontal ? "flex items-center gap-2" : ""
|
|
81
|
-
)}>
|
|
82
|
-
{local.children}
|
|
83
|
-
</div>
|
|
84
|
-
|
|
85
|
-
{local.message && <span class={messageStyles(variantProps)}>
|
|
86
|
-
{local.message}
|
|
87
|
-
</span>}
|
|
88
|
-
</div>;
|
|
89
|
-
};
|
|
90
|
-
var Field_default = Field;
|
|
91
|
-
|
|
92
|
-
// src/components/field/index.ts
|
|
93
|
-
var field_default = Field_default;
|
|
94
|
-
|
|
95
|
-
export {
|
|
96
|
-
field_default
|
|
97
|
-
};
|
package/dist/chunk/WOT36Q7O.js
DELETED
|
@@ -1,166 +0,0 @@
|
|
|
1
|
-
import { cva } from './HKS7ET6T.js';
|
|
2
|
-
import { delegateEvents, template, spread, insert, createComponent, effect, className } from 'solid-js/web';
|
|
3
|
-
import { splitProps, createSignal, createMemo, For, Show } from 'solid-js';
|
|
4
|
-
|
|
5
|
-
// src/components/tabs/Tabs.styles.ts
|
|
6
|
-
var tabsNavVariants = cva(
|
|
7
|
-
"flex text-sm font-medium text-gray-600 dark:text-gray-300",
|
|
8
|
-
{
|
|
9
|
-
variants: {
|
|
10
|
-
type: {
|
|
11
|
-
basic: "",
|
|
12
|
-
boxed: "flex gap-2",
|
|
13
|
-
toggle: "inline-flex rounded-md p-1",
|
|
14
|
-
"toggle-rounded": "inline-flex rounded-full p-1"
|
|
15
|
-
},
|
|
16
|
-
size: {
|
|
17
|
-
sm: "text-xs gap-1",
|
|
18
|
-
md: "text-sm gap-2",
|
|
19
|
-
lg: "text-base gap-3"
|
|
20
|
-
},
|
|
21
|
-
alignment: {
|
|
22
|
-
left: "justify-start",
|
|
23
|
-
center: "justify-center",
|
|
24
|
-
right: "justify-end"
|
|
25
|
-
},
|
|
26
|
-
expanded: {
|
|
27
|
-
true: "w-full",
|
|
28
|
-
false: ""
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
defaultVariants: {
|
|
32
|
-
type: "basic",
|
|
33
|
-
size: "md",
|
|
34
|
-
alignment: "left",
|
|
35
|
-
expanded: false
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
);
|
|
39
|
-
var tabTriggerVariants = cva(
|
|
40
|
-
"inline-flex items-center justify-center whitespace-nowrap font-medium text-sm transition-colors",
|
|
41
|
-
{
|
|
42
|
-
variants: {
|
|
43
|
-
size: {
|
|
44
|
-
sm: "text-xs px-2 py-1",
|
|
45
|
-
md: "text-sm px-3 py-2",
|
|
46
|
-
lg: "text-base px-4 py-3"
|
|
47
|
-
},
|
|
48
|
-
type: {
|
|
49
|
-
basic: "border-b-2 transition-colors hover:text-blue-600",
|
|
50
|
-
boxed: "rounded-t px-4 py-2 hover:text-blue-600",
|
|
51
|
-
toggle: "border -ml-px px-4 py-2 transition-colors first:ml-0 first:rounded-l-md last:rounded-r-md",
|
|
52
|
-
"toggle-rounded": "border -ml-px first:ml-0 first:rounded-l-full last:rounded-r-full transition-colors"
|
|
53
|
-
},
|
|
54
|
-
active: {
|
|
55
|
-
true: "",
|
|
56
|
-
false: ""
|
|
57
|
-
},
|
|
58
|
-
disabled: {
|
|
59
|
-
true: "opacity-50 cursor-not-allowed pointer-events-none",
|
|
60
|
-
false: ""
|
|
61
|
-
}
|
|
62
|
-
},
|
|
63
|
-
compoundVariants: [
|
|
64
|
-
{
|
|
65
|
-
type: "basic",
|
|
66
|
-
active: true,
|
|
67
|
-
class: "border-blue-600 text-blue-600"
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
type: "basic",
|
|
71
|
-
active: false,
|
|
72
|
-
class: "border-transparent text-gray-500 dark:text-gray-400"
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
type: "boxed",
|
|
76
|
-
active: true,
|
|
77
|
-
class: "border-x border-t border-b-0 border-gray-400 dark:border-gray-600 text-blue-600"
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
type: "boxed",
|
|
81
|
-
active: false,
|
|
82
|
-
class: "border-b border-transparent text-gray-500 dark:text-gray-400 hover:text-blue-600"
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
type: "toggle",
|
|
86
|
-
active: true,
|
|
87
|
-
class: "bg-blue-600 text-white border-blue-600"
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
type: "toggle",
|
|
91
|
-
active: false,
|
|
92
|
-
class: "bg-transparent text-gray-600 dark:text-gray-300 border-gray-300 dark:border-gray-600"
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
type: "toggle-rounded",
|
|
96
|
-
active: true,
|
|
97
|
-
class: "bg-blue-600 text-white border-blue-600"
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
type: "toggle-rounded",
|
|
101
|
-
active: false,
|
|
102
|
-
class: "bg-transparent text-gray-600 dark:text-gray-300 border-gray-300 dark:border-gray-600"
|
|
103
|
-
}
|
|
104
|
-
],
|
|
105
|
-
defaultVariants: {
|
|
106
|
-
active: false,
|
|
107
|
-
disabled: false
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
);
|
|
111
|
-
|
|
112
|
-
// src/components/tabs/Tabs.tsx
|
|
113
|
-
var _tmpl$ = /* @__PURE__ */ template(`<div><nav><ul class="flex gap-0"></ul></nav><div class=pt-4>`);
|
|
114
|
-
var _tmpl$2 = /* @__PURE__ */ template(`<li><button>`);
|
|
115
|
-
var Tabs = (props) => {
|
|
116
|
-
const [local, variantProps, otherProps] = splitProps(props, ["items", "value", "onChange"], ["size", "type", "alignment", "expanded"]);
|
|
117
|
-
const [internalActive, setInternalActive] = createSignal(local.value ?? 0);
|
|
118
|
-
const isControlled = () => local.value !== void 0;
|
|
119
|
-
const active = createMemo(() => isControlled() ? local.value : internalActive());
|
|
120
|
-
const handleChange = (i) => {
|
|
121
|
-
const item = local.items[i];
|
|
122
|
-
if (!item || item.disabled) return;
|
|
123
|
-
if (!isControlled()) {
|
|
124
|
-
setInternalActive(i);
|
|
125
|
-
}
|
|
126
|
-
local.onChange?.(i);
|
|
127
|
-
};
|
|
128
|
-
return (() => {
|
|
129
|
-
var _el$ = _tmpl$(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$2.nextSibling;
|
|
130
|
-
spread(_el$, otherProps, false, true);
|
|
131
|
-
insert(_el$3, createComponent(For, {
|
|
132
|
-
get each() {
|
|
133
|
-
return local.items;
|
|
134
|
-
},
|
|
135
|
-
children: (tab, i) => (() => {
|
|
136
|
-
var _el$5 = _tmpl$2(), _el$6 = _el$5.firstChild;
|
|
137
|
-
_el$6.$$click = () => handleChange(i());
|
|
138
|
-
insert(_el$6, () => tab.label);
|
|
139
|
-
effect(() => className(_el$6, tabTriggerVariants({
|
|
140
|
-
type: variantProps.type ?? "basic",
|
|
141
|
-
size: variantProps.size ?? "md",
|
|
142
|
-
active: i() === active(),
|
|
143
|
-
disabled: tab.disabled
|
|
144
|
-
})));
|
|
145
|
-
return _el$5;
|
|
146
|
-
})()
|
|
147
|
-
}));
|
|
148
|
-
insert(_el$4, createComponent(Show, {
|
|
149
|
-
get when() {
|
|
150
|
-
return local.items[active()];
|
|
151
|
-
},
|
|
152
|
-
get children() {
|
|
153
|
-
return local.items[active()]?.content;
|
|
154
|
-
}
|
|
155
|
-
}));
|
|
156
|
-
effect(() => className(_el$2, tabsNavVariants(variantProps)));
|
|
157
|
-
return _el$;
|
|
158
|
-
})();
|
|
159
|
-
};
|
|
160
|
-
var Tabs_default = Tabs;
|
|
161
|
-
delegateEvents(["click"]);
|
|
162
|
-
|
|
163
|
-
// src/components/tabs/index.ts
|
|
164
|
-
var tabs_default = Tabs_default;
|
|
165
|
-
|
|
166
|
-
export { tabs_default };
|
package/dist/chunk/WUZETUQR.js
DELETED
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import { cva, classes } from './HKS7ET6T.js';
|
|
2
|
-
import { template, className, insert, createComponent, memo, effect } from 'solid-js/web';
|
|
3
|
-
import { For } from 'solid-js';
|
|
4
|
-
|
|
5
|
-
// src/components/timeline/Timeline.styles.ts
|
|
6
|
-
var timelineWrapperClass = "relative";
|
|
7
|
-
var timelineItemClass = cva(
|
|
8
|
-
"relative flex items-center gap-3 min-h-[48px]",
|
|
9
|
-
{
|
|
10
|
-
variants: {
|
|
11
|
-
state: {
|
|
12
|
-
default: "text-gray-500",
|
|
13
|
-
active: "text-green-500 font-medium",
|
|
14
|
-
error: "text-red-500 font-medium"
|
|
15
|
-
}
|
|
16
|
-
},
|
|
17
|
-
defaultVariants: {
|
|
18
|
-
state: "default"
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
);
|
|
22
|
-
var timelineMarkerWrapperClass = "relative w-6 min-h-[48px] flex items-center justify-center";
|
|
23
|
-
var timelineLineClass = "absolute top-0 bottom-0 left-1/2 -translate-x-1/2 w-px bg-gray-300 dark:bg-gray-600";
|
|
24
|
-
var timelineMarkerClass = "absolute w-3 h-3 rounded-full border-2 border-white bg-gray-400 z-10";
|
|
25
|
-
var timelineNumberClass = cva(
|
|
26
|
-
"absolute -left-4 top-1/2 -translate-y-1/2 text-xs font-semibold",
|
|
27
|
-
{
|
|
28
|
-
variants: {
|
|
29
|
-
state: {
|
|
30
|
-
default: "text-gray-500",
|
|
31
|
-
active: "text-green-500",
|
|
32
|
-
error: "text-red-500"
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
defaultVariants: {
|
|
36
|
-
state: "default"
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
);
|
|
40
|
-
var timelineContentClass = "pt-0.5 text-sm";
|
|
41
|
-
|
|
42
|
-
// src/components/timeline/Timeline.tsx
|
|
43
|
-
var _tmpl$ = /* @__PURE__ */ template(`<ol>`);
|
|
44
|
-
var _tmpl$2 = /* @__PURE__ */ template(`<li><div><div></div><span></span><span>.</span></div><div>`);
|
|
45
|
-
var Timeline = (props) => {
|
|
46
|
-
return (() => {
|
|
47
|
-
var _el$ = _tmpl$();
|
|
48
|
-
className(_el$, timelineWrapperClass);
|
|
49
|
-
insert(_el$, createComponent(For, {
|
|
50
|
-
get each() {
|
|
51
|
-
return props.stages;
|
|
52
|
-
},
|
|
53
|
-
children: (stage, index) => {
|
|
54
|
-
const state = stage.error === true ? "error" : stage.active === true ? "active" : "default";
|
|
55
|
-
return (() => {
|
|
56
|
-
var _el$2 = _tmpl$2(), _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling, _el$6 = _el$5.nextSibling, _el$7 = _el$6.firstChild, _el$8 = _el$3.nextSibling;
|
|
57
|
-
className(_el$3, timelineMarkerWrapperClass);
|
|
58
|
-
className(_el$4, timelineLineClass);
|
|
59
|
-
insert(_el$6, () => index() + 1, _el$7);
|
|
60
|
-
className(_el$8, timelineContentClass);
|
|
61
|
-
insert(_el$8, (() => {
|
|
62
|
-
var _c$ = memo(() => !!props.renderStage);
|
|
63
|
-
return () => _c$() ? props.renderStage(stage, index()) : stage.title;
|
|
64
|
-
})());
|
|
65
|
-
effect((_p$) => {
|
|
66
|
-
var _v$ = timelineItemClass({
|
|
67
|
-
state
|
|
68
|
-
}), _v$2 = classes(timelineMarkerClass, state === "active" && "bg-green-500", state === "error" && "bg-red-500"), _v$3 = timelineNumberClass({
|
|
69
|
-
state
|
|
70
|
-
});
|
|
71
|
-
_v$ !== _p$.e && className(_el$2, _p$.e = _v$);
|
|
72
|
-
_v$2 !== _p$.t && className(_el$5, _p$.t = _v$2);
|
|
73
|
-
_v$3 !== _p$.a && className(_el$6, _p$.a = _v$3);
|
|
74
|
-
return _p$;
|
|
75
|
-
}, {
|
|
76
|
-
e: void 0,
|
|
77
|
-
t: void 0,
|
|
78
|
-
a: void 0
|
|
79
|
-
});
|
|
80
|
-
return _el$2;
|
|
81
|
-
})();
|
|
82
|
-
}
|
|
83
|
-
}));
|
|
84
|
-
return _el$;
|
|
85
|
-
})();
|
|
86
|
-
};
|
|
87
|
-
var Timeline_default = Timeline;
|
|
88
|
-
|
|
89
|
-
// src/components/timeline/index.ts
|
|
90
|
-
var timeline_default = Timeline_default;
|
|
91
|
-
|
|
92
|
-
export { timeline_default };
|
package/dist/chunk/XM3KF5LV.jsx
DELETED
|
@@ -1,179 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
clsx
|
|
3
|
-
} from "./O7LDJCQS.jsx";
|
|
4
|
-
import {
|
|
5
|
-
twMerge
|
|
6
|
-
} from "./5HG7XWVC.jsx";
|
|
7
|
-
|
|
8
|
-
// src/components/avatar/Avatar.tsx
|
|
9
|
-
import {
|
|
10
|
-
splitProps as splitProps2,
|
|
11
|
-
children as getSolidChildren
|
|
12
|
-
} from "solid-js";
|
|
13
|
-
import { Dynamic as Dynamic2 } from "solid-js/web";
|
|
14
|
-
|
|
15
|
-
// src/components/avatar/AvatarGroup.tsx
|
|
16
|
-
import { splitProps } from "solid-js";
|
|
17
|
-
import { Dynamic } from "solid-js/web";
|
|
18
|
-
var VoidElementList = [
|
|
19
|
-
"area",
|
|
20
|
-
"base",
|
|
21
|
-
"br",
|
|
22
|
-
"col",
|
|
23
|
-
"embed",
|
|
24
|
-
"hr",
|
|
25
|
-
"img",
|
|
26
|
-
"input",
|
|
27
|
-
"link",
|
|
28
|
-
"keygen",
|
|
29
|
-
"meta",
|
|
30
|
-
"param",
|
|
31
|
-
"source",
|
|
32
|
-
"track",
|
|
33
|
-
"wbr"
|
|
34
|
-
];
|
|
35
|
-
var AvatarGroup = (props) => {
|
|
36
|
-
const [local, others] = splitProps(
|
|
37
|
-
props,
|
|
38
|
-
["as", "class", "className", "children"]
|
|
39
|
-
);
|
|
40
|
-
const Tag = local.as || "div";
|
|
41
|
-
const classes = () => twMerge("avatar-group -space-x-6", local.class, local.className);
|
|
42
|
-
const ariaLabel = `Group of ${local.children.length} avatar photos`;
|
|
43
|
-
if (VoidElementList.includes(Tag)) {
|
|
44
|
-
return <Dynamic
|
|
45
|
-
component={Tag}
|
|
46
|
-
{...others}
|
|
47
|
-
aria-label={ariaLabel}
|
|
48
|
-
class={classes()}
|
|
49
|
-
/>;
|
|
50
|
-
}
|
|
51
|
-
return <Dynamic
|
|
52
|
-
component={Tag}
|
|
53
|
-
{...others}
|
|
54
|
-
aria-label={ariaLabel}
|
|
55
|
-
class={classes()}
|
|
56
|
-
>
|
|
57
|
-
{local.children}
|
|
58
|
-
</Dynamic>;
|
|
59
|
-
};
|
|
60
|
-
var AvatarGroup_default = AvatarGroup;
|
|
61
|
-
|
|
62
|
-
// src/components/avatar/Avatar.tsx
|
|
63
|
-
var VoidElementList2 = [
|
|
64
|
-
"area",
|
|
65
|
-
"base",
|
|
66
|
-
"br",
|
|
67
|
-
"col",
|
|
68
|
-
"embed",
|
|
69
|
-
"hr",
|
|
70
|
-
"img",
|
|
71
|
-
"input",
|
|
72
|
-
"link",
|
|
73
|
-
"keygen",
|
|
74
|
-
"meta",
|
|
75
|
-
"param",
|
|
76
|
-
"source",
|
|
77
|
-
"track",
|
|
78
|
-
"wbr"
|
|
79
|
-
];
|
|
80
|
-
var Avatar = (props) => {
|
|
81
|
-
const [local, others] = splitProps2(
|
|
82
|
-
props,
|
|
83
|
-
[
|
|
84
|
-
"src",
|
|
85
|
-
"letters",
|
|
86
|
-
"size",
|
|
87
|
-
"shape",
|
|
88
|
-
"color",
|
|
89
|
-
"border",
|
|
90
|
-
"borderColor",
|
|
91
|
-
"online",
|
|
92
|
-
"offline",
|
|
93
|
-
"innerClass",
|
|
94
|
-
"as",
|
|
95
|
-
"class",
|
|
96
|
-
"className",
|
|
97
|
-
"style",
|
|
98
|
-
"children"
|
|
99
|
-
]
|
|
100
|
-
);
|
|
101
|
-
const Tag = local.as || "div";
|
|
102
|
-
const containerClass = () => twMerge(
|
|
103
|
-
"avatar",
|
|
104
|
-
local.class,
|
|
105
|
-
local.className,
|
|
106
|
-
clsx({
|
|
107
|
-
"avatar-online": local.online,
|
|
108
|
-
"avatar-offline": local.offline,
|
|
109
|
-
"avatar-placeholder": !local.src
|
|
110
|
-
})
|
|
111
|
-
);
|
|
112
|
-
const customSizeStyle = typeof local.size === "number" ? { width: `${local.size}px`, height: `${local.size}px` } : void 0;
|
|
113
|
-
const baseInner = () => twMerge(local.innerClass);
|
|
114
|
-
const imgClasses = () => clsx(baseInner(), {
|
|
115
|
-
ring: local.border,
|
|
116
|
-
"ring-offset-base-100 ring-offset-2": local.border,
|
|
117
|
-
[`ring-${local.borderColor}`]: local.border && local.borderColor,
|
|
118
|
-
"rounded-full": local.shape === "circle",
|
|
119
|
-
"rounded-btn": local.shape === "square",
|
|
120
|
-
"w-32 h-32": local.size === "lg",
|
|
121
|
-
"w-24 h-24": local.size === "md",
|
|
122
|
-
"w-14 h-14": local.size === "sm",
|
|
123
|
-
"w-10 h-10": local.size === "xs"
|
|
124
|
-
});
|
|
125
|
-
const placeholderClasses = () => clsx(baseInner(), {
|
|
126
|
-
"bg-neutral-focus": !local.color,
|
|
127
|
-
"text-neutral-content": !local.color || local.color === "neutral",
|
|
128
|
-
[`bg-${local.color}`]: !!local.color,
|
|
129
|
-
[`text-${local.color}-content`]: !!local.color,
|
|
130
|
-
ring: local.border,
|
|
131
|
-
"ring-offset-base-100 ring-offset-2": local.border,
|
|
132
|
-
[`ring-${local.borderColor}`]: local.border && local.borderColor,
|
|
133
|
-
"rounded-full": local.shape === "circle",
|
|
134
|
-
"rounded-btn": local.shape === "square",
|
|
135
|
-
"w-32 h-32 text-3xl": local.size === "lg",
|
|
136
|
-
"w-24 h-24 text-xl": local.size === "md",
|
|
137
|
-
"w-14 h-14": local.size === "sm",
|
|
138
|
-
"w-10 h-10": local.size === "xs"
|
|
139
|
-
});
|
|
140
|
-
const resolved = getSolidChildren(() => local.children)();
|
|
141
|
-
const isStringChild = typeof resolved === "string";
|
|
142
|
-
const renderContents = () => {
|
|
143
|
-
return local.src ? <div class={imgClasses()} style={customSizeStyle}>
|
|
144
|
-
<img src={local.src} />
|
|
145
|
-
</div> : local.letters || isStringChild ? <div class={placeholderClasses()} style={customSizeStyle}>
|
|
146
|
-
<span>{local.letters ?? resolved}</span>
|
|
147
|
-
</div> : <div class={imgClasses()} style={customSizeStyle}>
|
|
148
|
-
{local.children}
|
|
149
|
-
</div>;
|
|
150
|
-
};
|
|
151
|
-
if (VoidElementList2.includes(Tag)) {
|
|
152
|
-
return <Dynamic2
|
|
153
|
-
component={Tag}
|
|
154
|
-
{...others}
|
|
155
|
-
data-theme={others["dataTheme"]}
|
|
156
|
-
class={containerClass()}
|
|
157
|
-
style={local.style}
|
|
158
|
-
/>;
|
|
159
|
-
}
|
|
160
|
-
return <Dynamic2
|
|
161
|
-
component={Tag}
|
|
162
|
-
{...others}
|
|
163
|
-
data-theme={others["dataTheme"]}
|
|
164
|
-
class={containerClass()}
|
|
165
|
-
style={local.style}
|
|
166
|
-
>
|
|
167
|
-
{renderContents()}
|
|
168
|
-
</Dynamic2>;
|
|
169
|
-
};
|
|
170
|
-
var Avatar_default = Object.assign(Avatar, {
|
|
171
|
-
Group: AvatarGroup_default
|
|
172
|
-
});
|
|
173
|
-
|
|
174
|
-
// src/components/avatar/index.ts
|
|
175
|
-
var avatar_default = Avatar_default;
|
|
176
|
-
|
|
177
|
-
export {
|
|
178
|
-
avatar_default
|
|
179
|
-
};
|
package/dist/chunk/YWIT2MRI.jsx
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
CollapseContent,
|
|
3
|
-
CollapseTitle
|
|
4
|
-
} from "./KQ3RAWCE.jsx";
|
|
5
|
-
import {
|
|
6
|
-
clsx
|
|
7
|
-
} from "./O7LDJCQS.jsx";
|
|
8
|
-
import {
|
|
9
|
-
twMerge
|
|
10
|
-
} from "./5HG7XWVC.jsx";
|
|
11
|
-
|
|
12
|
-
// src/components/accordion/Accordion.tsx
|
|
13
|
-
import { splitProps } from "solid-js";
|
|
14
|
-
var Accordion = (props) => {
|
|
15
|
-
const [local, others] = splitProps(props, [
|
|
16
|
-
"name",
|
|
17
|
-
"icon",
|
|
18
|
-
"dataTheme",
|
|
19
|
-
"class",
|
|
20
|
-
"className",
|
|
21
|
-
"style"
|
|
22
|
-
]);
|
|
23
|
-
const classes = () => twMerge(
|
|
24
|
-
"collapse",
|
|
25
|
-
clsx({
|
|
26
|
-
"collapse-arrow": local.icon === "arrow",
|
|
27
|
-
"collapse-plus": local.icon === "plus"
|
|
28
|
-
}),
|
|
29
|
-
local.class,
|
|
30
|
-
local.className
|
|
31
|
-
);
|
|
32
|
-
return <div class={classes()} data-theme={local.dataTheme} style={local.style}>
|
|
33
|
-
<input type="radio" name={local.name ?? "accordion"} {...others} />
|
|
34
|
-
{props.children}
|
|
35
|
-
</div>;
|
|
36
|
-
};
|
|
37
|
-
Accordion.Title = CollapseTitle;
|
|
38
|
-
Accordion.Content = CollapseContent;
|
|
39
|
-
var Accordion_default = Accordion;
|
|
40
|
-
|
|
41
|
-
export {
|
|
42
|
-
Accordion_default
|
|
43
|
-
};
|
package/dist/chunk/ZH7DKMMN.js
DELETED
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
import { Loading_default } from './H2Q3L5KM.js';
|
|
2
|
-
import { clsx } from './HUHXQCKK.js';
|
|
3
|
-
import { twMerge } from './STFCLC5R.js';
|
|
4
|
-
import { createComponent, Dynamic, mergeProps, memo } from 'solid-js/web';
|
|
5
|
-
import { splitProps, Show } from 'solid-js';
|
|
6
|
-
|
|
7
|
-
var VoidElementList = ["area", "base", "br", "col", "embed", "hr", "img", "input", "link", "keygen", "meta", "param", "source", "track", "wbr"];
|
|
8
|
-
var Button = (props) => {
|
|
9
|
-
const [local, others] = splitProps(props, ["children", "shape", "size", "variant", "color", "glass", "startIcon", "endIcon", "wide", "fullWidth", "responsive", "animation", "loading", "active", "disabled", "dataTheme", "class", "className", "style", "as"]);
|
|
10
|
-
const classes = () => twMerge("btn", local.class, local.className, clsx((local.startIcon && !local.loading || local.endIcon) && "gap-2", {
|
|
11
|
-
"btn-xl": local.size === "xl",
|
|
12
|
-
"btn-lg": local.size === "lg",
|
|
13
|
-
"btn-md": local.size === "md",
|
|
14
|
-
"btn-sm": local.size === "sm",
|
|
15
|
-
"btn-xs": local.size === "xs",
|
|
16
|
-
"btn-circle": local.shape === "circle",
|
|
17
|
-
"btn-square": local.shape === "square",
|
|
18
|
-
"btn-soft": local.variant === "soft",
|
|
19
|
-
"btn-dash": local.variant === "dash",
|
|
20
|
-
"btn-outline": local.variant === "outline",
|
|
21
|
-
"btn-link": local.variant === "link",
|
|
22
|
-
"btn-neutral": local.color === "neutral",
|
|
23
|
-
"btn-primary": local.color === "primary",
|
|
24
|
-
"btn-secondary": local.color === "secondary",
|
|
25
|
-
"btn-accent": local.color === "accent",
|
|
26
|
-
"btn-info": local.color === "info",
|
|
27
|
-
"btn-success": local.color === "success",
|
|
28
|
-
"btn-warning": local.color === "warning",
|
|
29
|
-
"btn-error": local.color === "error",
|
|
30
|
-
"btn-ghost": local.color === "ghost",
|
|
31
|
-
glass: local.glass,
|
|
32
|
-
"btn-wide": local.wide,
|
|
33
|
-
"btn-block": local.fullWidth,
|
|
34
|
-
"btn-xs sm:btn-sm md:btn-md lg:btn-lg": local.responsive,
|
|
35
|
-
"no-animation": !local.animation,
|
|
36
|
-
"btn-active": local.active,
|
|
37
|
-
"btn-disabled": local.disabled
|
|
38
|
-
}));
|
|
39
|
-
const Tag = local.as || "button";
|
|
40
|
-
if (VoidElementList.includes(Tag)) {
|
|
41
|
-
return createComponent(Dynamic, mergeProps({
|
|
42
|
-
component: Tag
|
|
43
|
-
}, others, {
|
|
44
|
-
get ["data-theme"]() {
|
|
45
|
-
return local.dataTheme;
|
|
46
|
-
},
|
|
47
|
-
get ["class"]() {
|
|
48
|
-
return classes();
|
|
49
|
-
},
|
|
50
|
-
get style() {
|
|
51
|
-
return local.style;
|
|
52
|
-
},
|
|
53
|
-
get disabled() {
|
|
54
|
-
return local.disabled;
|
|
55
|
-
}
|
|
56
|
-
}));
|
|
57
|
-
}
|
|
58
|
-
return createComponent(Dynamic, mergeProps({
|
|
59
|
-
component: Tag
|
|
60
|
-
}, others, {
|
|
61
|
-
get ["data-theme"]() {
|
|
62
|
-
return local.dataTheme;
|
|
63
|
-
},
|
|
64
|
-
get ["class"]() {
|
|
65
|
-
return classes();
|
|
66
|
-
},
|
|
67
|
-
get style() {
|
|
68
|
-
return local.style;
|
|
69
|
-
},
|
|
70
|
-
get disabled() {
|
|
71
|
-
return local.disabled;
|
|
72
|
-
},
|
|
73
|
-
get children() {
|
|
74
|
-
return [createComponent(Show, {
|
|
75
|
-
get when() {
|
|
76
|
-
return local.loading;
|
|
77
|
-
},
|
|
78
|
-
get children() {
|
|
79
|
-
return createComponent(Loading_default, {
|
|
80
|
-
get size() {
|
|
81
|
-
return local.size;
|
|
82
|
-
},
|
|
83
|
-
get color() {
|
|
84
|
-
return local.color;
|
|
85
|
-
},
|
|
86
|
-
variant: "spinner"
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
|
-
}), createComponent(Show, {
|
|
90
|
-
get when() {
|
|
91
|
-
return local.startIcon && !local.loading;
|
|
92
|
-
},
|
|
93
|
-
get children() {
|
|
94
|
-
return local.startIcon;
|
|
95
|
-
}
|
|
96
|
-
}), memo(() => local.children), createComponent(Show, {
|
|
97
|
-
get when() {
|
|
98
|
-
return local.endIcon;
|
|
99
|
-
},
|
|
100
|
-
get children() {
|
|
101
|
-
return local.endIcon;
|
|
102
|
-
}
|
|
103
|
-
})];
|
|
104
|
-
}
|
|
105
|
-
}));
|
|
106
|
-
};
|
|
107
|
-
var Button_default = Button;
|
|
108
|
-
|
|
109
|
-
export { Button_default };
|