@pathscale/ui 0.0.10 → 0.0.12
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 +53 -0
- package/dist/Avatar-Dkd_kPlV.d.ts +40 -0
- package/dist/CollapseTitle-BNxog3is.d.ts +12 -0
- package/dist/{Field-DfUn85_1.d.ts → Field-DI2PA30N.d.ts} +1 -1
- package/dist/Mask-CPb596Mg.d.ts +16 -0
- package/dist/Menu-DgO4SHmA.d.ts +45 -0
- package/dist/{Progress-gN0xqhAF.d.ts → Progress-ChF4ior8.d.ts} +2 -2
- package/dist/Steps-Dk-UPL6r.d.ts +38 -0
- package/dist/{Tabs-BEnRV6GG.d.ts → Tabs-WiUU0xsM.d.ts} +1 -1
- package/dist/chunk/2OJYONJ3.js +40 -0
- package/dist/chunk/2VQ2762Z.js +80 -0
- package/dist/chunk/2XPPNBYK.js +164 -0
- package/dist/chunk/3I23P4TJ.js +33 -0
- package/dist/chunk/5HG7XWVC.jsx +2956 -0
- package/dist/chunk/5IJ7WEIF.js +43 -0
- package/dist/chunk/5O6WC3OB.jsx +67 -0
- package/dist/chunk/6P5JIKPF.jsx +51 -0
- package/dist/chunk/BHLLVOVR.js +46 -0
- package/dist/chunk/DJI5XKAV.js +31 -0
- package/dist/chunk/DN3P54J2.jsx +43 -0
- package/dist/chunk/DVFQAAZR.js +43 -0
- package/dist/chunk/EDDBK4J6.js +42 -0
- package/dist/chunk/FZRQDGPD.jsx +54 -0
- package/dist/chunk/G5UEZ2VC.js +49 -0
- package/dist/chunk/GL7JG772.js +114 -0
- package/dist/chunk/HEOKGP5U.js +55 -0
- package/dist/chunk/HUHXQCKK.js +16 -0
- package/dist/chunk/I36LHZUY.jsx +31 -0
- package/dist/chunk/IG323YKF.jsx +50 -0
- package/dist/chunk/JQ4HSRDP.js +142 -0
- package/dist/chunk/JSQBKK7L.jsx +50 -0
- package/dist/chunk/K3WO7SRD.js +1 -0
- package/dist/chunk/KQ3RAWCE.jsx +57 -0
- package/dist/chunk/KXJZKDJX.jsx +0 -0
- package/dist/chunk/L4A67X7S.js +7 -0
- package/dist/chunk/LGDDR242.jsx +159 -0
- package/dist/chunk/MM2DZQL3.js +46 -0
- package/dist/chunk/MZWBWFDD.js +151 -0
- package/dist/chunk/O7LDJCQS.jsx +18 -0
- package/dist/chunk/Q4442PU4.js +42 -0
- package/dist/chunk/R5G3PODL.jsx +11 -0
- package/dist/chunk/R6ZBT7CY.jsx +55 -0
- package/dist/chunk/RHEFVSMJ.jsx +52 -0
- package/dist/chunk/{G6RG4LR7.js → SPEY5RMB.js} +2 -5
- package/dist/chunk/STFCLC5R.js +2954 -0
- package/dist/chunk/SVJIYMYJ.jsx +156 -0
- package/dist/chunk/SYWB4UN3.jsx +64 -0
- package/dist/chunk/{KACNXPUM.jsx → T2LDLYWV.jsx} +2 -4
- package/dist/chunk/UNKDNDT3.js +62 -0
- package/dist/chunk/XM3KF5LV.jsx +179 -0
- package/dist/chunk/XQCSYRVP.jsx +168 -0
- package/dist/chunk/YWIT2MRI.jsx +43 -0
- package/dist/chunk/ZYEP35R3.jsx +60 -0
- package/dist/components/{progress → Progress}/index.d.ts +1 -1
- package/dist/components/accordion/index.d.ts +17 -5
- package/dist/components/accordion/index.js +1 -1
- package/dist/components/accordion/index.jsx +6 -4
- package/dist/components/avatar/index.d.ts +4 -4
- package/dist/components/avatar/index.js +1 -1
- package/dist/components/avatar/index.jsx +3 -2
- package/dist/components/badge/index.d.ts +17 -0
- package/dist/components/badge/index.js +1 -0
- package/dist/components/badge/index.jsx +8 -0
- package/dist/components/breadcrumbs/index.d.ts +9 -0
- package/dist/components/breadcrumbs/index.js +1 -0
- package/dist/components/breadcrumbs/index.jsx +7 -0
- package/dist/components/button/index.d.ts +28 -6
- package/dist/components/button/index.js +1 -1
- package/dist/components/button/index.jsx +5 -5
- package/dist/components/checkbox/index.d.ts +13 -5
- package/dist/components/checkbox/index.js +1 -1
- package/dist/components/checkbox/index.jsx +5 -4
- package/dist/components/collapse/index.d.ts +15 -0
- package/dist/components/collapse/index.js +1 -0
- package/dist/components/collapse/index.jsx +14 -0
- package/dist/components/field/index.d.ts +1 -1
- package/dist/components/fileinput/index.d.ts +16 -0
- package/dist/components/fileinput/index.js +1 -0
- package/dist/components/fileinput/index.jsx +8 -0
- package/dist/components/input/index.d.ts +13 -8
- package/dist/components/input/index.js +1 -1
- package/dist/components/input/index.jsx +5 -6
- package/dist/components/join/index.d.ts +11 -0
- package/dist/components/join/index.js +1 -0
- package/dist/components/join/index.jsx +9 -0
- package/dist/components/mask/index.d.ts +7 -0
- package/dist/components/mask/index.js +1 -0
- package/dist/components/mask/index.jsx +8 -0
- package/dist/components/menu/index.d.ts +6 -64
- package/dist/components/menu/index.js +1 -1
- package/dist/components/menu/index.jsx +4 -7
- package/dist/components/pagination/index.d.ts +6 -6
- package/dist/components/pagination/index.js +1 -1
- package/dist/components/pagination/index.jsx +6 -4
- package/dist/components/polymorphic/index.d.ts +1 -2
- package/dist/components/polymorphic/index.js +1 -1
- package/dist/components/polymorphic/index.jsx +1 -1
- package/dist/components/select/index.d.ts +12 -5
- package/dist/components/select/index.js +1 -1
- package/dist/components/select/index.jsx +5 -4
- package/dist/components/steps/index.d.ts +3 -4
- package/dist/components/steps/index.js +1 -1
- package/dist/components/steps/index.jsx +3 -2
- package/dist/components/tabs/index.d.ts +2 -2
- package/dist/components/textarea/index.d.ts +12 -5
- package/dist/components/textarea/index.js +1 -1
- package/dist/components/textarea/index.jsx +5 -4
- package/dist/components/toggle/index.d.ts +15 -0
- package/dist/components/toggle/index.js +1 -0
- package/dist/components/toggle/index.jsx +8 -0
- package/dist/components/tooltip/index.d.ts +14 -5
- package/dist/components/tooltip/index.js +1 -1
- package/dist/components/tooltip/index.jsx +5 -4
- package/dist/index.d.ts +23 -18
- package/dist/index.js +23 -20
- package/dist/index.jsx +80 -65
- package/dist/types-CUG9pToa.d.ts +15 -0
- package/package.json +4 -2
- package/dist/Accordion-JZGWxBMK.d.ts +0 -27
- package/dist/Avatar-CzIirpVq.d.ts +0 -33
- package/dist/Button-B50OLXuV.d.ts +0 -63
- package/dist/Checkbox-CzeDsQLA.d.ts +0 -32
- package/dist/Input-BGHHmBBR.d.ts +0 -42
- package/dist/Pagination-CJtlFMHy.d.ts +0 -43
- package/dist/Select-CWCDBvec.d.ts +0 -44
- package/dist/Steps-1miUeyCD.d.ts +0 -34
- package/dist/Switch-CW6QtO1Y.d.ts +0 -76
- package/dist/Tag-BPrhn-Ne.d.ts +0 -42
- package/dist/Textarea-Cpdk7m6S.d.ts +0 -37
- package/dist/Tooltip-BfPongoz.d.ts +0 -53
- package/dist/Upload-CRljD5jf.d.ts +0 -39
- package/dist/chunk/3VOILEMN.js +0 -187
- package/dist/chunk/C4745OZS.jsx +0 -101
- package/dist/chunk/CJZGTNJZ.js +0 -115
- package/dist/chunk/DBQ7IOPU.js +0 -189
- package/dist/chunk/EB7KXR65.js +0 -102
- package/dist/chunk/EE4HXMKA.js +0 -165
- package/dist/chunk/ELRAUORW.jsx +0 -179
- package/dist/chunk/F33TSIEQ.jsx +0 -181
- package/dist/chunk/GA2HCFRS.jsx +0 -228
- package/dist/chunk/GWFGP2JQ.jsx +0 -179
- package/dist/chunk/LAQPAV5I.jsx +0 -187
- package/dist/chunk/LI3HCFL7.jsx +0 -132
- package/dist/chunk/MI773TMC.js +0 -107
- package/dist/chunk/MMTAND25.jsx +0 -126
- package/dist/chunk/NZKPDBTE.js +0 -118
- package/dist/chunk/NZZRKP74.js +0 -214
- package/dist/chunk/O2IMHWMY.js +0 -159
- package/dist/chunk/OMRJVDZV.js +0 -173
- package/dist/chunk/OYAKKETQ.js +0 -111
- package/dist/chunk/PNPC2OI3.jsx +0 -156
- package/dist/chunk/QHJOIUYT.jsx +0 -117
- package/dist/chunk/QONDPQ2I.jsx +0 -105
- package/dist/chunk/R6COBCN7.jsx +0 -100
- package/dist/chunk/T7IZ26YC.jsx +0 -194
- package/dist/chunk/TT2JYGLU.js +0 -218
- package/dist/chunk/V6Y5E7BL.js +0 -133
- package/dist/chunk/WB6NEEQV.jsx +0 -107
- package/dist/chunk/WYHYWDOM.js +0 -164
- package/dist/chunk/XD34JKSU.jsx +0 -201
- package/dist/chunk/YDEDUOFM.js +0 -102
- package/dist/components/breadcrumb/index.d.ts +0 -47
- package/dist/components/breadcrumb/index.js +0 -1
- package/dist/components/breadcrumb/index.jsx +0 -9
- package/dist/components/switch/index.d.ts +0 -8
- package/dist/components/switch/index.js +0 -1
- package/dist/components/switch/index.jsx +0 -7
- package/dist/components/tag/index.d.ts +0 -8
- package/dist/components/tag/index.js +0 -1
- package/dist/components/tag/index.jsx +0 -7
- package/dist/components/upload/index.d.ts +0 -8
- package/dist/components/upload/index.js +0 -1
- package/dist/components/upload/index.jsx +0 -7
- /package/dist/components/{progress → Progress}/index.js +0 -0
- /package/dist/components/{progress → Progress}/index.jsx +0 -0
package/dist/chunk/QHJOIUYT.jsx
DELETED
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
classes,
|
|
3
|
-
cva
|
|
4
|
-
} from "./P7WPLZNA.jsx";
|
|
5
|
-
|
|
6
|
-
// src/components/upload/Upload.tsx
|
|
7
|
-
import { splitProps, Show } from "solid-js";
|
|
8
|
-
|
|
9
|
-
// src/components/upload/Upload.styles.ts
|
|
10
|
-
var uploadWrapperVariants = cva("", {
|
|
11
|
-
variants: {
|
|
12
|
-
style: {
|
|
13
|
-
boxed: "flex flex-col items-center justify-center border border-gray-300 rounded-md p-4 bg-white dark:bg-gray-800 text-gray-700 hover:text-gray-900 text-center",
|
|
14
|
-
button: "px-4 py-2 rounded inline-flex items-center gap-2 text-white transition-colors"
|
|
15
|
-
},
|
|
16
|
-
color: {
|
|
17
|
-
primary: "bg-blue-500 hover:bg-blue-600",
|
|
18
|
-
success: "bg-green-500 hover:bg-green-600",
|
|
19
|
-
info: "bg-sky-500 hover:bg-sky-600",
|
|
20
|
-
warning: "bg-yellow-500 hover:bg-yellow-600",
|
|
21
|
-
danger: "bg-red-500 hover:bg-red-600",
|
|
22
|
-
gray: ""
|
|
23
|
-
// usado solo en style="boxed"
|
|
24
|
-
},
|
|
25
|
-
size: {
|
|
26
|
-
sm: "text-sm",
|
|
27
|
-
md: "text-base",
|
|
28
|
-
lg: "text-lg"
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
defaultVariants: {
|
|
32
|
-
style: "boxed",
|
|
33
|
-
color: "gray",
|
|
34
|
-
size: "md"
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
|
-
var fileInputClass = "absolute inset-0 w-full h-full opacity-0 cursor-pointer";
|
|
38
|
-
var fileIconClass = "w-6 h-6";
|
|
39
|
-
var fileLabelClass = "font-medium";
|
|
40
|
-
|
|
41
|
-
// src/components/upload/Upload.tsx
|
|
42
|
-
var Upload = (props) => {
|
|
43
|
-
const [local, variantProps, otherProps] = splitProps(
|
|
44
|
-
props,
|
|
45
|
-
[
|
|
46
|
-
"icon",
|
|
47
|
-
"label",
|
|
48
|
-
"multiple",
|
|
49
|
-
"disabled",
|
|
50
|
-
"accept",
|
|
51
|
-
"dragDrop",
|
|
52
|
-
"name",
|
|
53
|
-
"onChange"
|
|
54
|
-
],
|
|
55
|
-
["style", "color", "size"]
|
|
56
|
-
);
|
|
57
|
-
const handleChange = (e) => {
|
|
58
|
-
const input = e.target;
|
|
59
|
-
const files = input.files;
|
|
60
|
-
if (!files || files.length === 0) return;
|
|
61
|
-
if (local.onChange) {
|
|
62
|
-
if (local.multiple) {
|
|
63
|
-
local.onChange(Array.from(files));
|
|
64
|
-
} else if (files[0]) {
|
|
65
|
-
local.onChange(files[0]);
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
};
|
|
69
|
-
const handleDrop = (e) => {
|
|
70
|
-
if (!local.dragDrop) return;
|
|
71
|
-
e.preventDefault();
|
|
72
|
-
const files = e.dataTransfer?.files;
|
|
73
|
-
if (!files || files.length === 0) return;
|
|
74
|
-
if (local.onChange) {
|
|
75
|
-
if (local.multiple) {
|
|
76
|
-
local.onChange(Array.from(files));
|
|
77
|
-
} else if (files[0]) {
|
|
78
|
-
local.onChange(files[0]);
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
};
|
|
82
|
-
const handleDragOver = (e) => {
|
|
83
|
-
if (local.dragDrop) e.preventDefault();
|
|
84
|
-
};
|
|
85
|
-
return <div class={uploadWrapperVariants(variantProps)}>
|
|
86
|
-
<label class="cursor-pointer relative w-full h-full">
|
|
87
|
-
<input
|
|
88
|
-
type="file"
|
|
89
|
-
class={fileInputClass}
|
|
90
|
-
name={local.name}
|
|
91
|
-
multiple={local.multiple}
|
|
92
|
-
accept={local.accept}
|
|
93
|
-
disabled={local.disabled}
|
|
94
|
-
onChange={handleChange}
|
|
95
|
-
{...otherProps}
|
|
96
|
-
/>
|
|
97
|
-
<div
|
|
98
|
-
class={classes(
|
|
99
|
-
variantProps.style === "boxed" ? "flex flex-col items-center justify-center gap-2" : "flex flex-row items-center justify-center gap-2"
|
|
100
|
-
)}
|
|
101
|
-
>
|
|
102
|
-
<Show when={local.icon}>
|
|
103
|
-
<span class={fileIconClass}>{local.icon}</span>
|
|
104
|
-
</Show>
|
|
105
|
-
<span class={fileLabelClass}>{local.label}</span>
|
|
106
|
-
</div>
|
|
107
|
-
</label>
|
|
108
|
-
</div>;
|
|
109
|
-
};
|
|
110
|
-
var Upload_default = Upload;
|
|
111
|
-
|
|
112
|
-
// src/components/upload/index.ts
|
|
113
|
-
var upload_default = Upload_default;
|
|
114
|
-
|
|
115
|
-
export {
|
|
116
|
-
upload_default
|
|
117
|
-
};
|
package/dist/chunk/QONDPQ2I.jsx
DELETED
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
cva
|
|
3
|
-
} from "./P7WPLZNA.jsx";
|
|
4
|
-
|
|
5
|
-
// src/components/accordion/Accordion.tsx
|
|
6
|
-
import {
|
|
7
|
-
createSignal,
|
|
8
|
-
splitProps,
|
|
9
|
-
Show
|
|
10
|
-
} from "solid-js";
|
|
11
|
-
|
|
12
|
-
// src/components/accordion/Accordion.styles.ts
|
|
13
|
-
var accordionContainerVariants = cva(
|
|
14
|
-
["w-full border rounded transition-colors", "bg-white dark:bg-gray-800"],
|
|
15
|
-
{
|
|
16
|
-
variants: {
|
|
17
|
-
expanded: {
|
|
18
|
-
true: "border-blue-500",
|
|
19
|
-
false: "border-gray-300 dark:border-gray-600"
|
|
20
|
-
},
|
|
21
|
-
disabled: {
|
|
22
|
-
true: "opacity-50 cursor-not-allowed",
|
|
23
|
-
false: ""
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
defaultVariants: {
|
|
27
|
-
expanded: false,
|
|
28
|
-
disabled: false
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
);
|
|
32
|
-
var accordionHeaderVariants = cva(
|
|
33
|
-
[
|
|
34
|
-
"w-full text-left px-4 py-2 flex items-center justify-between cursor-pointer",
|
|
35
|
-
"transition-colors duration-200"
|
|
36
|
-
],
|
|
37
|
-
{
|
|
38
|
-
variants: {
|
|
39
|
-
headerIsTrigger: {
|
|
40
|
-
true: "hover:bg-gray-100 dark:hover:bg-gray-700",
|
|
41
|
-
false: ""
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
|
-
defaultVariants: {
|
|
45
|
-
headerIsTrigger: true
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
);
|
|
49
|
-
var accordionContentVariants = cva(
|
|
50
|
-
"px-4 py-2 border-t border-gray-200 dark:border-gray-700"
|
|
51
|
-
);
|
|
52
|
-
|
|
53
|
-
// src/components/accordion/Accordion.tsx
|
|
54
|
-
var Accordion = (props) => {
|
|
55
|
-
const [local, variantProps, otherProps] = splitProps(
|
|
56
|
-
props,
|
|
57
|
-
["expanded", "disabled", "headerIsTrigger", "header", "content"],
|
|
58
|
-
["expanded", "disabled"]
|
|
59
|
-
);
|
|
60
|
-
const [isOpen, setIsOpen] = createSignal(local.expanded ?? false);
|
|
61
|
-
const handleToggle = () => {
|
|
62
|
-
if (!local.disabled) setIsOpen((prev) => !prev);
|
|
63
|
-
};
|
|
64
|
-
const handleKeyDown = local.headerIsTrigger ? (e) => {
|
|
65
|
-
if (e.key === "Enter" || e.key === " ") {
|
|
66
|
-
e.preventDefault();
|
|
67
|
-
handleToggle();
|
|
68
|
-
}
|
|
69
|
-
} : void 0;
|
|
70
|
-
return <div
|
|
71
|
-
class={accordionContainerVariants({
|
|
72
|
-
...variantProps,
|
|
73
|
-
expanded: isOpen(),
|
|
74
|
-
disabled: local.disabled
|
|
75
|
-
})}
|
|
76
|
-
onKeyDown={handleKeyDown}
|
|
77
|
-
role={local.headerIsTrigger ? "button" : void 0}
|
|
78
|
-
tabindex={local.headerIsTrigger ? "0" : void 0}
|
|
79
|
-
aria-expanded={local.headerIsTrigger ? isOpen() : void 0}
|
|
80
|
-
aria-disabled={local.disabled}
|
|
81
|
-
{...otherProps}
|
|
82
|
-
>
|
|
83
|
-
<div
|
|
84
|
-
class={accordionHeaderVariants({
|
|
85
|
-
headerIsTrigger: local.headerIsTrigger
|
|
86
|
-
})}
|
|
87
|
-
onClick={local.headerIsTrigger ? handleToggle : void 0}
|
|
88
|
-
role={local.headerIsTrigger ? "button" : void 0}
|
|
89
|
-
>
|
|
90
|
-
{local.header}
|
|
91
|
-
</div>
|
|
92
|
-
|
|
93
|
-
<Show when={isOpen()}>
|
|
94
|
-
<div class={accordionContentVariants()}>{local.content}</div>
|
|
95
|
-
</Show>
|
|
96
|
-
</div>;
|
|
97
|
-
};
|
|
98
|
-
var Accordion_default = Accordion;
|
|
99
|
-
|
|
100
|
-
// src/components/accordion/index.ts
|
|
101
|
-
var accordion_default = Accordion_default;
|
|
102
|
-
|
|
103
|
-
export {
|
|
104
|
-
accordion_default
|
|
105
|
-
};
|
package/dist/chunk/R6COBCN7.jsx
DELETED
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
cva
|
|
3
|
-
} from "./P7WPLZNA.jsx";
|
|
4
|
-
|
|
5
|
-
// src/components/tooltip/Tooltip.tsx
|
|
6
|
-
import {
|
|
7
|
-
splitProps,
|
|
8
|
-
Show
|
|
9
|
-
} from "solid-js";
|
|
10
|
-
|
|
11
|
-
// src/components/tooltip/Tooltip.styles.ts
|
|
12
|
-
var tooltipVariants = cva(
|
|
13
|
-
[
|
|
14
|
-
"absolute z-10 px-3 py-1 text-white text-sm",
|
|
15
|
-
"opacity-0 group-hover:opacity-100",
|
|
16
|
-
"pointer-events-none transition-opacity duration-200",
|
|
17
|
-
"max-w-xs break-words",
|
|
18
|
-
"after:content-[''] after:absolute after:w-2 after:h-2 after:rotate-45 after:bg-inherit"
|
|
19
|
-
].join(" "),
|
|
20
|
-
{
|
|
21
|
-
variants: {
|
|
22
|
-
type: {
|
|
23
|
-
info: "bg-blue-500",
|
|
24
|
-
success: "bg-green-500",
|
|
25
|
-
warning: "bg-yellow-500",
|
|
26
|
-
danger: "bg-red-500",
|
|
27
|
-
primary: "bg-indigo-500",
|
|
28
|
-
gray: "bg-gray-700"
|
|
29
|
-
},
|
|
30
|
-
size: {
|
|
31
|
-
sm: "text-xs",
|
|
32
|
-
md: "text-sm",
|
|
33
|
-
lg: "text-base"
|
|
34
|
-
},
|
|
35
|
-
rounded: {
|
|
36
|
-
true: "rounded",
|
|
37
|
-
false: "rounded-none"
|
|
38
|
-
},
|
|
39
|
-
dashed: {
|
|
40
|
-
true: "border border-white border-dashed",
|
|
41
|
-
false: ""
|
|
42
|
-
},
|
|
43
|
-
multilined: {
|
|
44
|
-
true: "whitespace-pre-wrap",
|
|
45
|
-
false: "whitespace-nowrap overflow-hidden text-ellipsis"
|
|
46
|
-
},
|
|
47
|
-
animated: {
|
|
48
|
-
true: "transition-opacity duration-300 ease-in-out",
|
|
49
|
-
false: ""
|
|
50
|
-
},
|
|
51
|
-
position: {
|
|
52
|
-
top: "bottom-full left-1/2 -translate-x-1/2 mb-1 after:top-full after:left-1/2 after:-translate-x-1/2 after:-mt-1",
|
|
53
|
-
bottom: "top-full left-1/2 -translate-x-1/2 mt-1 after:bottom-full after:left-1/2 after:-translate-x-1/2 after:-mb-1",
|
|
54
|
-
left: "right-full top-1/2 -translate-y-1/2 mr-1 after:left-full after:top-1/2 after:-translate-y-1/2 after:-ml-1",
|
|
55
|
-
right: "left-full top-1/2 -translate-y-1/2 ml-1 after:right-full after:top-1/2 after:-translate-y-1/2 after:-mr-1"
|
|
56
|
-
}
|
|
57
|
-
},
|
|
58
|
-
defaultVariants: {
|
|
59
|
-
type: "primary",
|
|
60
|
-
size: "md",
|
|
61
|
-
rounded: true,
|
|
62
|
-
dashed: false,
|
|
63
|
-
multilined: false,
|
|
64
|
-
animated: true,
|
|
65
|
-
position: "top"
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
);
|
|
69
|
-
|
|
70
|
-
// src/components/tooltip/Tooltip.tsx
|
|
71
|
-
var Tooltip = (props) => {
|
|
72
|
-
const [local, variantProps, otherProps] = splitProps(
|
|
73
|
-
props,
|
|
74
|
-
["label", "delay", "always", "children"],
|
|
75
|
-
["type", "size", "position", "rounded", "dashed", "multilined", "animated"]
|
|
76
|
-
);
|
|
77
|
-
return <span class="relative inline-block group" {...otherProps}>
|
|
78
|
-
{local.children}
|
|
79
|
-
<Show when={local.label}>
|
|
80
|
-
<span
|
|
81
|
-
class={tooltipVariants(variantProps)}
|
|
82
|
-
style={{
|
|
83
|
-
"transition-delay": `${local.delay ?? 0}ms`,
|
|
84
|
-
opacity: local.always ? 1 : void 0,
|
|
85
|
-
"pointer-events": "none"
|
|
86
|
-
}}
|
|
87
|
-
>
|
|
88
|
-
{variantProps.multilined ? local.label.split("\n").map((line, index) => <div class="block">{line}</div>) : local.label}
|
|
89
|
-
</span>
|
|
90
|
-
</Show>
|
|
91
|
-
</span>;
|
|
92
|
-
};
|
|
93
|
-
var Tooltip_default = Tooltip;
|
|
94
|
-
|
|
95
|
-
// src/components/tooltip/index.ts
|
|
96
|
-
var tooltip_default = Tooltip_default;
|
|
97
|
-
|
|
98
|
-
export {
|
|
99
|
-
tooltip_default
|
|
100
|
-
};
|
package/dist/chunk/T7IZ26YC.jsx
DELETED
|
@@ -1,194 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
cva
|
|
3
|
-
} from "./P7WPLZNA.jsx";
|
|
4
|
-
|
|
5
|
-
// src/components/checkbox/Checkbox.tsx
|
|
6
|
-
import {
|
|
7
|
-
splitProps,
|
|
8
|
-
createSignal,
|
|
9
|
-
Show,
|
|
10
|
-
untrack,
|
|
11
|
-
createEffect
|
|
12
|
-
} from "solid-js";
|
|
13
|
-
|
|
14
|
-
// src/components/checkbox/Checkbox.styles.ts
|
|
15
|
-
var checkboxVariants = cva(
|
|
16
|
-
[
|
|
17
|
-
"relative inline-flex items-center gap-2 select-none",
|
|
18
|
-
"cursor-pointer disabled:cursor-default peer-disabled:cursor-default",
|
|
19
|
-
"peer-disabled:opacity-50"
|
|
20
|
-
],
|
|
21
|
-
{
|
|
22
|
-
variants: {
|
|
23
|
-
size: {
|
|
24
|
-
sm: "text-sm",
|
|
25
|
-
md: "text-base",
|
|
26
|
-
lg: "text-lg"
|
|
27
|
-
},
|
|
28
|
-
color: {
|
|
29
|
-
primary: "text-blue-600",
|
|
30
|
-
success: "text-green-600",
|
|
31
|
-
warning: "text-yellow-600",
|
|
32
|
-
danger: "text-red-600"
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
defaultVariants: {
|
|
36
|
-
size: "md",
|
|
37
|
-
color: "primary"
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
);
|
|
41
|
-
var checkboxMarkerVariants = cva(
|
|
42
|
-
[
|
|
43
|
-
"inline-flex items-center justify-center rounded-sm border",
|
|
44
|
-
"transition-colors duration-200",
|
|
45
|
-
"peer-disabled:opacity-50"
|
|
46
|
-
],
|
|
47
|
-
{
|
|
48
|
-
variants: {
|
|
49
|
-
size: {
|
|
50
|
-
sm: "w-4 h-4 text-sm",
|
|
51
|
-
md: "w-5 h-5 text-base",
|
|
52
|
-
lg: "w-6 h-6 text-lg"
|
|
53
|
-
},
|
|
54
|
-
color: {
|
|
55
|
-
primary: "bg-blue-600 border-blue-600",
|
|
56
|
-
success: "bg-green-600 border-green-600",
|
|
57
|
-
warning: "bg-yellow-400 border-yellow-400",
|
|
58
|
-
danger: "bg-red-600 border-red-600"
|
|
59
|
-
},
|
|
60
|
-
variant: {
|
|
61
|
-
colored: "text-white",
|
|
62
|
-
default: "border-gray-400 text-gray-800 dark:text-gray-200 bg-transparent"
|
|
63
|
-
}
|
|
64
|
-
},
|
|
65
|
-
defaultVariants: {
|
|
66
|
-
size: "md",
|
|
67
|
-
variant: "default"
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
);
|
|
71
|
-
var checkboxInputClass = "peer absolute opacity-0 w-4 h-4";
|
|
72
|
-
var checkboxLabelClass = "ml-2 text-gray-800 dark:text-gray-200";
|
|
73
|
-
|
|
74
|
-
// src/components/checkbox/CheckIcon.tsx
|
|
75
|
-
import "solid-js";
|
|
76
|
-
var CheckIcon = () => <svg
|
|
77
|
-
viewBox="0 0 24 24"
|
|
78
|
-
fill="none"
|
|
79
|
-
stroke="currentColor"
|
|
80
|
-
stroke-width="3"
|
|
81
|
-
stroke-linecap="round"
|
|
82
|
-
stroke-linejoin="round"
|
|
83
|
-
class="w-3.5 h-3.5"
|
|
84
|
-
>
|
|
85
|
-
<polyline points="20 6 9 17 4 12" />
|
|
86
|
-
</svg>;
|
|
87
|
-
var CheckIcon_default = CheckIcon;
|
|
88
|
-
|
|
89
|
-
// src/components/checkbox/MinusIcon.tsx
|
|
90
|
-
import "solid-js";
|
|
91
|
-
var MinusIcon = () => <svg
|
|
92
|
-
viewBox="0 0 24 24"
|
|
93
|
-
fill="none"
|
|
94
|
-
stroke="currentColor"
|
|
95
|
-
stroke-width="3"
|
|
96
|
-
stroke-linecap="round"
|
|
97
|
-
stroke-linejoin="round"
|
|
98
|
-
class="w-3.5 h-3.5"
|
|
99
|
-
>
|
|
100
|
-
<line x1="5" y1="12" x2="19" y2="12" />
|
|
101
|
-
</svg>;
|
|
102
|
-
var MinusIcon_default = MinusIcon;
|
|
103
|
-
|
|
104
|
-
// src/components/checkbox/Checkbox.tsx
|
|
105
|
-
var Checkbox = (props) => {
|
|
106
|
-
const [localProps, variantProps, otherProps] = splitProps(
|
|
107
|
-
props,
|
|
108
|
-
[
|
|
109
|
-
"label",
|
|
110
|
-
"indeterminate",
|
|
111
|
-
"defaultChecked",
|
|
112
|
-
"checked",
|
|
113
|
-
"onChange",
|
|
114
|
-
"onFocus",
|
|
115
|
-
"onBlur",
|
|
116
|
-
"disabled"
|
|
117
|
-
],
|
|
118
|
-
["class", ...checkboxVariants.variantKeys]
|
|
119
|
-
);
|
|
120
|
-
let inputRef;
|
|
121
|
-
const isControlled = localProps.checked !== void 0;
|
|
122
|
-
const [status, setStatus] = createSignal(
|
|
123
|
-
localProps.indeterminate ? "indeterminate" : isControlled ? localProps.checked ? "checked" : "unchecked" : localProps.defaultChecked ? "checked" : "unchecked"
|
|
124
|
-
);
|
|
125
|
-
createEffect(() => {
|
|
126
|
-
if (isControlled) {
|
|
127
|
-
setStatus(
|
|
128
|
-
localProps.indeterminate ? "indeterminate" : localProps.checked ? "checked" : "unchecked"
|
|
129
|
-
);
|
|
130
|
-
}
|
|
131
|
-
});
|
|
132
|
-
const handleChange = (e) => {
|
|
133
|
-
const input = e.currentTarget;
|
|
134
|
-
if (input.indeterminate) {
|
|
135
|
-
input.indeterminate = false;
|
|
136
|
-
input.checked = true;
|
|
137
|
-
setStatus("checked");
|
|
138
|
-
} else {
|
|
139
|
-
setStatus(input.checked ? "checked" : "unchecked");
|
|
140
|
-
}
|
|
141
|
-
untrack(() => {
|
|
142
|
-
if (typeof localProps.onChange === "function") {
|
|
143
|
-
localProps.onChange(e);
|
|
144
|
-
}
|
|
145
|
-
});
|
|
146
|
-
};
|
|
147
|
-
return <label
|
|
148
|
-
class={checkboxVariants()}
|
|
149
|
-
role="checkbox"
|
|
150
|
-
aria-checked={status() === "indeterminate" ? "mixed" : status() === "checked"}
|
|
151
|
-
>
|
|
152
|
-
<input
|
|
153
|
-
ref={(el) => {
|
|
154
|
-
inputRef = el;
|
|
155
|
-
if (status() === "indeterminate") {
|
|
156
|
-
el.indeterminate = true;
|
|
157
|
-
}
|
|
158
|
-
}}
|
|
159
|
-
type="checkbox"
|
|
160
|
-
class={checkboxInputClass}
|
|
161
|
-
checked={status() === "checked"}
|
|
162
|
-
disabled={localProps.disabled}
|
|
163
|
-
aria-hidden="true"
|
|
164
|
-
{...otherProps}
|
|
165
|
-
onChange={handleChange}
|
|
166
|
-
onFocus={localProps.onFocus}
|
|
167
|
-
onBlur={localProps.onBlur}
|
|
168
|
-
/>
|
|
169
|
-
|
|
170
|
-
<span
|
|
171
|
-
class={checkboxMarkerVariants({
|
|
172
|
-
size: variantProps.size,
|
|
173
|
-
color: status() !== "unchecked" ? variantProps.color : void 0,
|
|
174
|
-
variant: status() !== "unchecked" ? "colored" : "default"
|
|
175
|
-
})}
|
|
176
|
-
>
|
|
177
|
-
<Show when={status() !== "unchecked"}>
|
|
178
|
-
{status() === "indeterminate" ? <MinusIcon_default /> : <CheckIcon_default />}
|
|
179
|
-
</Show>
|
|
180
|
-
</span>
|
|
181
|
-
|
|
182
|
-
<Show when={localProps.label}>
|
|
183
|
-
<span class={checkboxLabelClass}>{localProps.label}</span>
|
|
184
|
-
</Show>
|
|
185
|
-
</label>;
|
|
186
|
-
};
|
|
187
|
-
var Checkbox_default = Checkbox;
|
|
188
|
-
|
|
189
|
-
// src/components/checkbox/index.ts
|
|
190
|
-
var checkbox_default = Checkbox_default;
|
|
191
|
-
|
|
192
|
-
export {
|
|
193
|
-
checkbox_default
|
|
194
|
-
};
|