@pathscale/ui 0.0.11 → 0.0.13
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/{Autocomplete-BLKN_nG8.d.ts → Autocomplete-gLkjMHrc.d.ts} +1 -1
- 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-BNR3p92D.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/64ESNXN4.js +1 -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/H2Q3L5KM.js +48 -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/O7LDJCQS.jsx +18 -0
- package/dist/chunk/PFB27MP3.jsx +0 -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/STFCLC5R.js +2954 -0
- package/dist/chunk/SVJIYMYJ.jsx +156 -0
- package/dist/chunk/SYWB4UN3.jsx +64 -0
- package/dist/chunk/T324HUIT.jsx +57 -0
- package/dist/chunk/T5LDPSFV.jsx +122 -0
- package/dist/chunk/UNKDNDT3.js +62 -0
- package/dist/chunk/XM3KF5LV.jsx +179 -0
- package/dist/chunk/YWIT2MRI.jsx +43 -0
- package/dist/chunk/ZH7DKMMN.js +109 -0
- package/dist/chunk/ZYEP35R3.jsx +60 -0
- package/dist/components/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/autocomplete/index.d.ts +2 -2
- 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 +6 -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/loading/index.d.ts +11 -0
- package/dist/components/loading/index.js +1 -0
- package/dist/components/loading/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 -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 +25 -19
- package/dist/index.js +23 -19
- package/dist/index.jsx +87 -67
- package/dist/types-CUG9pToa.d.ts +15 -0
- package/package.json +4 -2
- package/dist/Accordion-nwuRbRRw.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-X4gwIB-F.d.ts +0 -42
- package/dist/Pagination-CJtlFMHy.d.ts +0 -43
- package/dist/Select-CP-TUHJv.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/GWFGP2JQ.jsx +0 -179
- package/dist/chunk/LAQPAV5I.jsx +0 -187
- package/dist/chunk/LI3HCFL7.jsx +0 -132
- package/dist/chunk/LMPV5G35.jsx +0 -228
- package/dist/chunk/MI773TMC.js +0 -107
- package/dist/chunk/MMTAND25.jsx +0 -126
- package/dist/chunk/NZKPDBTE.js +0 -118
- package/dist/chunk/O2IMHWMY.js +0 -159
- package/dist/chunk/OMRJVDZV.js +0 -173
- package/dist/chunk/OYAKKETQ.js +0 -111
- package/dist/chunk/PF47YREI.js +0 -214
- 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/chunk/WYHYWDOM.js
DELETED
|
@@ -1,164 +0,0 @@
|
|
|
1
|
-
import { cva } from './HKS7ET6T.js';
|
|
2
|
-
import { template, use, className, spread, mergeProps, insert, createComponent, memo, effect, setAttribute } from 'solid-js/web';
|
|
3
|
-
import { splitProps, createSignal, createEffect, Show, untrack } from 'solid-js';
|
|
4
|
-
|
|
5
|
-
// src/components/checkbox/Checkbox.styles.ts
|
|
6
|
-
var checkboxVariants = cva(
|
|
7
|
-
[
|
|
8
|
-
"relative inline-flex items-center gap-2 select-none",
|
|
9
|
-
"cursor-pointer disabled:cursor-default peer-disabled:cursor-default",
|
|
10
|
-
"peer-disabled:opacity-50"
|
|
11
|
-
],
|
|
12
|
-
{
|
|
13
|
-
variants: {
|
|
14
|
-
size: {
|
|
15
|
-
sm: "text-sm",
|
|
16
|
-
md: "text-base",
|
|
17
|
-
lg: "text-lg"
|
|
18
|
-
},
|
|
19
|
-
color: {
|
|
20
|
-
primary: "text-blue-600",
|
|
21
|
-
success: "text-green-600",
|
|
22
|
-
warning: "text-yellow-600",
|
|
23
|
-
danger: "text-red-600"
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
defaultVariants: {
|
|
27
|
-
size: "md",
|
|
28
|
-
color: "primary"
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
);
|
|
32
|
-
var checkboxMarkerVariants = cva(
|
|
33
|
-
[
|
|
34
|
-
"inline-flex items-center justify-center rounded-sm border",
|
|
35
|
-
"transition-colors duration-200",
|
|
36
|
-
"peer-disabled:opacity-50"
|
|
37
|
-
],
|
|
38
|
-
{
|
|
39
|
-
variants: {
|
|
40
|
-
size: {
|
|
41
|
-
sm: "w-4 h-4 text-sm",
|
|
42
|
-
md: "w-5 h-5 text-base",
|
|
43
|
-
lg: "w-6 h-6 text-lg"
|
|
44
|
-
},
|
|
45
|
-
color: {
|
|
46
|
-
primary: "bg-blue-600 border-blue-600",
|
|
47
|
-
success: "bg-green-600 border-green-600",
|
|
48
|
-
warning: "bg-yellow-400 border-yellow-400",
|
|
49
|
-
danger: "bg-red-600 border-red-600"
|
|
50
|
-
},
|
|
51
|
-
variant: {
|
|
52
|
-
colored: "text-white",
|
|
53
|
-
default: "border-gray-400 text-gray-800 dark:text-gray-200 bg-transparent"
|
|
54
|
-
}
|
|
55
|
-
},
|
|
56
|
-
defaultVariants: {
|
|
57
|
-
size: "md",
|
|
58
|
-
variant: "default"
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
);
|
|
62
|
-
var checkboxInputClass = "peer absolute opacity-0 w-4 h-4";
|
|
63
|
-
var checkboxLabelClass = "ml-2 text-gray-800 dark:text-gray-200";
|
|
64
|
-
var _tmpl$ = /* @__PURE__ */ template(`<svg viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=3 stroke-linecap=round stroke-linejoin=round class="w-3.5 h-3.5"><polyline points="20 6 9 17 4 12">`);
|
|
65
|
-
var CheckIcon = () => _tmpl$();
|
|
66
|
-
var CheckIcon_default = CheckIcon;
|
|
67
|
-
var _tmpl$2 = /* @__PURE__ */ template(`<svg viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=3 stroke-linecap=round stroke-linejoin=round class="w-3.5 h-3.5"><line x1=5 y1=12 x2=19 y2=12>`);
|
|
68
|
-
var MinusIcon = () => _tmpl$2();
|
|
69
|
-
var MinusIcon_default = MinusIcon;
|
|
70
|
-
|
|
71
|
-
// src/components/checkbox/Checkbox.tsx
|
|
72
|
-
var _tmpl$3 = /* @__PURE__ */ template(`<span>`);
|
|
73
|
-
var _tmpl$22 = /* @__PURE__ */ template(`<label role=checkbox><input type=checkbox aria-hidden=true><span>`);
|
|
74
|
-
var Checkbox = (props) => {
|
|
75
|
-
const [localProps, variantProps, otherProps] = splitProps(props, ["label", "indeterminate", "defaultChecked", "checked", "onChange", "onFocus", "onBlur", "disabled"], ["class", ...checkboxVariants.variantKeys]);
|
|
76
|
-
const isControlled = localProps.checked !== void 0;
|
|
77
|
-
const [status, setStatus] = createSignal(localProps.indeterminate ? "indeterminate" : isControlled ? localProps.checked ? "checked" : "unchecked" : localProps.defaultChecked ? "checked" : "unchecked");
|
|
78
|
-
createEffect(() => {
|
|
79
|
-
if (isControlled) {
|
|
80
|
-
setStatus(localProps.indeterminate ? "indeterminate" : localProps.checked ? "checked" : "unchecked");
|
|
81
|
-
}
|
|
82
|
-
});
|
|
83
|
-
const handleChange = (e) => {
|
|
84
|
-
const input = e.currentTarget;
|
|
85
|
-
if (input.indeterminate) {
|
|
86
|
-
input.indeterminate = false;
|
|
87
|
-
input.checked = true;
|
|
88
|
-
setStatus("checked");
|
|
89
|
-
} else {
|
|
90
|
-
setStatus(input.checked ? "checked" : "unchecked");
|
|
91
|
-
}
|
|
92
|
-
untrack(() => {
|
|
93
|
-
if (typeof localProps.onChange === "function") {
|
|
94
|
-
localProps.onChange(e);
|
|
95
|
-
}
|
|
96
|
-
});
|
|
97
|
-
};
|
|
98
|
-
return (() => {
|
|
99
|
-
var _el$ = _tmpl$22(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
|
|
100
|
-
use((el) => {
|
|
101
|
-
if (status() === "indeterminate") {
|
|
102
|
-
el.indeterminate = true;
|
|
103
|
-
}
|
|
104
|
-
}, _el$2);
|
|
105
|
-
className(_el$2, checkboxInputClass);
|
|
106
|
-
spread(_el$2, mergeProps({
|
|
107
|
-
get checked() {
|
|
108
|
-
return status() === "checked";
|
|
109
|
-
},
|
|
110
|
-
get disabled() {
|
|
111
|
-
return localProps.disabled;
|
|
112
|
-
}
|
|
113
|
-
}, otherProps, {
|
|
114
|
-
"onChange": handleChange,
|
|
115
|
-
get onFocus() {
|
|
116
|
-
return localProps.onFocus;
|
|
117
|
-
},
|
|
118
|
-
get onBlur() {
|
|
119
|
-
return localProps.onBlur;
|
|
120
|
-
}
|
|
121
|
-
}), false, false);
|
|
122
|
-
insert(_el$3, createComponent(Show, {
|
|
123
|
-
get when() {
|
|
124
|
-
return status() !== "unchecked";
|
|
125
|
-
},
|
|
126
|
-
get children() {
|
|
127
|
-
return memo(() => status() === "indeterminate")() ? createComponent(MinusIcon_default, {}) : createComponent(CheckIcon_default, {});
|
|
128
|
-
}
|
|
129
|
-
}));
|
|
130
|
-
insert(_el$, createComponent(Show, {
|
|
131
|
-
get when() {
|
|
132
|
-
return localProps.label;
|
|
133
|
-
},
|
|
134
|
-
get children() {
|
|
135
|
-
var _el$4 = _tmpl$3();
|
|
136
|
-
className(_el$4, checkboxLabelClass);
|
|
137
|
-
insert(_el$4, () => localProps.label);
|
|
138
|
-
return _el$4;
|
|
139
|
-
}
|
|
140
|
-
}), null);
|
|
141
|
-
effect((_p$) => {
|
|
142
|
-
var _v$ = checkboxVariants(), _v$2 = status() === "indeterminate" ? "mixed" : status() === "checked", _v$3 = checkboxMarkerVariants({
|
|
143
|
-
size: variantProps.size,
|
|
144
|
-
color: status() !== "unchecked" ? variantProps.color : void 0,
|
|
145
|
-
variant: status() !== "unchecked" ? "colored" : "default"
|
|
146
|
-
});
|
|
147
|
-
_v$ !== _p$.e && className(_el$, _p$.e = _v$);
|
|
148
|
-
_v$2 !== _p$.t && setAttribute(_el$, "aria-checked", _p$.t = _v$2);
|
|
149
|
-
_v$3 !== _p$.a && className(_el$3, _p$.a = _v$3);
|
|
150
|
-
return _p$;
|
|
151
|
-
}, {
|
|
152
|
-
e: void 0,
|
|
153
|
-
t: void 0,
|
|
154
|
-
a: void 0
|
|
155
|
-
});
|
|
156
|
-
return _el$;
|
|
157
|
-
})();
|
|
158
|
-
};
|
|
159
|
-
var Checkbox_default = Checkbox;
|
|
160
|
-
|
|
161
|
-
// src/components/checkbox/index.ts
|
|
162
|
-
var checkbox_default = Checkbox_default;
|
|
163
|
-
|
|
164
|
-
export { checkbox_default };
|
package/dist/chunk/XD34JKSU.jsx
DELETED
|
@@ -1,201 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
classes,
|
|
3
|
-
cva
|
|
4
|
-
} from "./P7WPLZNA.jsx";
|
|
5
|
-
|
|
6
|
-
// src/components/menu/Menu.tsx
|
|
7
|
-
import {
|
|
8
|
-
splitProps
|
|
9
|
-
} from "solid-js";
|
|
10
|
-
|
|
11
|
-
// src/components/menu/Menu.styles.ts
|
|
12
|
-
var menuWrapper = cva("bg-white border border-gray-200 rounded shadow", {
|
|
13
|
-
variants: {
|
|
14
|
-
inline: {
|
|
15
|
-
true: "flex space-x-4",
|
|
16
|
-
false: "block"
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
defaultVariants: {
|
|
20
|
-
inline: false
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
var listWrapper = cva("px-4 py-2", {
|
|
24
|
-
variants: {
|
|
25
|
-
label: {
|
|
26
|
-
true: "pt-6",
|
|
27
|
-
false: ""
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
defaultVariants: {
|
|
31
|
-
label: false
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
var itemVariants = cva(
|
|
35
|
-
"px-4 py-2 cursor-pointer select-none transition-colors",
|
|
36
|
-
{
|
|
37
|
-
variants: {
|
|
38
|
-
active: {
|
|
39
|
-
true: "bg-blue-100 font-semibold",
|
|
40
|
-
false: "hover:bg-blue-500"
|
|
41
|
-
},
|
|
42
|
-
expanded: {
|
|
43
|
-
true: "bg-gray-50 text-black",
|
|
44
|
-
false: ""
|
|
45
|
-
},
|
|
46
|
-
disabled: {
|
|
47
|
-
true: "opacity-50 cursor-not-allowed text-gray-700",
|
|
48
|
-
false: ""
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
|
-
compoundVariants: [
|
|
52
|
-
{
|
|
53
|
-
active: true,
|
|
54
|
-
expanded: true,
|
|
55
|
-
class: "bg-blue-200"
|
|
56
|
-
}
|
|
57
|
-
],
|
|
58
|
-
defaultVariants: {
|
|
59
|
-
active: false,
|
|
60
|
-
expanded: false,
|
|
61
|
-
disabled: false
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
);
|
|
65
|
-
var itemDetailWrapper = cva(
|
|
66
|
-
"ml-4 border-l border-gray-200 mt-1 pl-2"
|
|
67
|
-
);
|
|
68
|
-
|
|
69
|
-
// src/components/menu/Menu.tsx
|
|
70
|
-
var Menu = (props) => {
|
|
71
|
-
const [local, variantProps, otherProps] = splitProps(
|
|
72
|
-
props,
|
|
73
|
-
["class", "className", "children", "inline"],
|
|
74
|
-
Object.keys(menuWrapper.variantKeys ?? {})
|
|
75
|
-
);
|
|
76
|
-
return <div
|
|
77
|
-
class={classes(
|
|
78
|
-
menuWrapper({ inline: !!variantProps.inline }),
|
|
79
|
-
local.class,
|
|
80
|
-
local.className
|
|
81
|
-
)}
|
|
82
|
-
{...otherProps}
|
|
83
|
-
>
|
|
84
|
-
{local.children}
|
|
85
|
-
</div>;
|
|
86
|
-
};
|
|
87
|
-
var Menu_default = Menu;
|
|
88
|
-
|
|
89
|
-
// src/components/menu/MenuList.tsx
|
|
90
|
-
import {
|
|
91
|
-
splitProps as splitProps2,
|
|
92
|
-
Show
|
|
93
|
-
} from "solid-js";
|
|
94
|
-
var MenuList = (props) => {
|
|
95
|
-
const [local, variantProps, otherProps] = splitProps2(
|
|
96
|
-
props,
|
|
97
|
-
["class", "children", "label"],
|
|
98
|
-
Object.keys(listWrapper.variantKeys ?? {})
|
|
99
|
-
);
|
|
100
|
-
return <div
|
|
101
|
-
class={classes(
|
|
102
|
-
listWrapper({ label: !!local.label }),
|
|
103
|
-
local.class
|
|
104
|
-
)}
|
|
105
|
-
{...otherProps}
|
|
106
|
-
>
|
|
107
|
-
<Show when={local.label}>
|
|
108
|
-
<div class="px-4 pb-2 font-medium text-gray-700">{local.label}</div>
|
|
109
|
-
</Show>
|
|
110
|
-
<div class="flex flex-col">{local.children}</div>
|
|
111
|
-
</div>;
|
|
112
|
-
};
|
|
113
|
-
var MenuList_default = MenuList;
|
|
114
|
-
|
|
115
|
-
// src/components/menu/MenuItem.tsx
|
|
116
|
-
import {
|
|
117
|
-
splitProps as splitProps3,
|
|
118
|
-
Show as Show2,
|
|
119
|
-
createSignal,
|
|
120
|
-
createMemo
|
|
121
|
-
} from "solid-js";
|
|
122
|
-
import { Dynamic } from "solid-js/web";
|
|
123
|
-
var MenuItem = (props) => {
|
|
124
|
-
const [local, variantProps, rest] = splitProps3(
|
|
125
|
-
props,
|
|
126
|
-
[
|
|
127
|
-
"class",
|
|
128
|
-
"className",
|
|
129
|
-
"label",
|
|
130
|
-
"active",
|
|
131
|
-
"expanded",
|
|
132
|
-
"disabled",
|
|
133
|
-
"tag",
|
|
134
|
-
"to",
|
|
135
|
-
"target",
|
|
136
|
-
"children"
|
|
137
|
-
],
|
|
138
|
-
Object.keys(itemVariants.variantKeys ?? {})
|
|
139
|
-
);
|
|
140
|
-
const hasChildren = createMemo(() => !!local.children);
|
|
141
|
-
const isControlled = createMemo(() => local.expanded !== void 0);
|
|
142
|
-
const [internalExpanded, setInternalExpanded] = createSignal(false);
|
|
143
|
-
const isExpanded = createMemo(
|
|
144
|
-
() => isControlled() ? !!local.expanded : internalExpanded()
|
|
145
|
-
);
|
|
146
|
-
const toggleExpand = () => {
|
|
147
|
-
if (!isControlled() && hasChildren() && !local.disabled) {
|
|
148
|
-
setInternalExpanded((prev) => !prev);
|
|
149
|
-
}
|
|
150
|
-
};
|
|
151
|
-
const onKeyDown = (e) => {
|
|
152
|
-
if (local.disabled) return;
|
|
153
|
-
if (e.key === "Enter" || e.key === " ") {
|
|
154
|
-
e.preventDefault();
|
|
155
|
-
toggleExpand();
|
|
156
|
-
}
|
|
157
|
-
};
|
|
158
|
-
const tagName = local.to ? "a" : local.tag ?? "div";
|
|
159
|
-
const focusableProps = !local.to && !local.disabled ? { tabIndex: 0 } : {};
|
|
160
|
-
return <Dynamic
|
|
161
|
-
component={tagName}
|
|
162
|
-
class={classes(local.class, local.className, "w-full")}
|
|
163
|
-
href={local.to}
|
|
164
|
-
target={local.target}
|
|
165
|
-
aria-disabled={local.disabled}
|
|
166
|
-
onClick={toggleExpand}
|
|
167
|
-
onKeyDown={onKeyDown}
|
|
168
|
-
{...focusableProps}
|
|
169
|
-
{...rest}
|
|
170
|
-
>
|
|
171
|
-
<div
|
|
172
|
-
class={itemVariants({
|
|
173
|
-
active: !!local.active,
|
|
174
|
-
expanded: isExpanded(),
|
|
175
|
-
disabled: !!local.disabled
|
|
176
|
-
})}
|
|
177
|
-
>
|
|
178
|
-
<div class="flex items-center justify-between">
|
|
179
|
-
<span>{local.label}</span>
|
|
180
|
-
<Show2 when={hasChildren()}>
|
|
181
|
-
<span class="ml-2 text-gray-500">
|
|
182
|
-
{isExpanded() ? "\u25BE" : "\u25B8"}
|
|
183
|
-
</span>
|
|
184
|
-
</Show2>
|
|
185
|
-
</div>
|
|
186
|
-
</div>
|
|
187
|
-
|
|
188
|
-
<Show2 when={isExpanded()}>
|
|
189
|
-
<div class={itemDetailWrapper()}>
|
|
190
|
-
{local.children}
|
|
191
|
-
</div>
|
|
192
|
-
</Show2>
|
|
193
|
-
</Dynamic>;
|
|
194
|
-
};
|
|
195
|
-
var MenuItem_default = MenuItem;
|
|
196
|
-
|
|
197
|
-
export {
|
|
198
|
-
Menu_default,
|
|
199
|
-
MenuList_default,
|
|
200
|
-
MenuItem_default
|
|
201
|
-
};
|
package/dist/chunk/YDEDUOFM.js
DELETED
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import { cva, classes } from './HKS7ET6T.js';
|
|
2
|
-
import { template, className, spread, mergeProps, insert, createComponent, effect } from 'solid-js/web';
|
|
3
|
-
import { splitProps, Show } from 'solid-js';
|
|
4
|
-
|
|
5
|
-
// src/components/upload/Upload.styles.ts
|
|
6
|
-
var uploadWrapperVariants = cva("", {
|
|
7
|
-
variants: {
|
|
8
|
-
style: {
|
|
9
|
-
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",
|
|
10
|
-
button: "px-4 py-2 rounded inline-flex items-center gap-2 text-white transition-colors"
|
|
11
|
-
},
|
|
12
|
-
color: {
|
|
13
|
-
primary: "bg-blue-500 hover:bg-blue-600",
|
|
14
|
-
success: "bg-green-500 hover:bg-green-600",
|
|
15
|
-
info: "bg-sky-500 hover:bg-sky-600",
|
|
16
|
-
warning: "bg-yellow-500 hover:bg-yellow-600",
|
|
17
|
-
danger: "bg-red-500 hover:bg-red-600",
|
|
18
|
-
gray: ""
|
|
19
|
-
// usado solo en style="boxed"
|
|
20
|
-
},
|
|
21
|
-
size: {
|
|
22
|
-
sm: "text-sm",
|
|
23
|
-
md: "text-base",
|
|
24
|
-
lg: "text-lg"
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
|
-
defaultVariants: {
|
|
28
|
-
style: "boxed",
|
|
29
|
-
color: "gray",
|
|
30
|
-
size: "md"
|
|
31
|
-
}
|
|
32
|
-
});
|
|
33
|
-
var fileInputClass = "absolute inset-0 w-full h-full opacity-0 cursor-pointer";
|
|
34
|
-
var fileIconClass = "w-6 h-6";
|
|
35
|
-
var fileLabelClass = "font-medium";
|
|
36
|
-
|
|
37
|
-
// src/components/upload/Upload.tsx
|
|
38
|
-
var _tmpl$ = /* @__PURE__ */ template(`<span>`);
|
|
39
|
-
var _tmpl$2 = /* @__PURE__ */ template(`<div><label class="cursor-pointer relative w-full h-full"><input type=file><div><span>`);
|
|
40
|
-
var Upload = (props) => {
|
|
41
|
-
const [local, variantProps, otherProps] = splitProps(props, ["icon", "label", "multiple", "disabled", "accept", "dragDrop", "name", "onChange"], ["style", "color", "size"]);
|
|
42
|
-
const handleChange = (e) => {
|
|
43
|
-
const input = e.target;
|
|
44
|
-
const files = input.files;
|
|
45
|
-
if (!files || files.length === 0) return;
|
|
46
|
-
if (local.onChange) {
|
|
47
|
-
if (local.multiple) {
|
|
48
|
-
local.onChange(Array.from(files));
|
|
49
|
-
} else if (files[0]) {
|
|
50
|
-
local.onChange(files[0]);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
};
|
|
54
|
-
return (() => {
|
|
55
|
-
var _el$ = _tmpl$2(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$6 = _el$4.firstChild;
|
|
56
|
-
_el$3.addEventListener("change", handleChange);
|
|
57
|
-
className(_el$3, fileInputClass);
|
|
58
|
-
spread(_el$3, mergeProps({
|
|
59
|
-
get name() {
|
|
60
|
-
return local.name;
|
|
61
|
-
},
|
|
62
|
-
get multiple() {
|
|
63
|
-
return local.multiple;
|
|
64
|
-
},
|
|
65
|
-
get accept() {
|
|
66
|
-
return local.accept;
|
|
67
|
-
},
|
|
68
|
-
get disabled() {
|
|
69
|
-
return local.disabled;
|
|
70
|
-
}
|
|
71
|
-
}, otherProps), false, false);
|
|
72
|
-
insert(_el$4, createComponent(Show, {
|
|
73
|
-
get when() {
|
|
74
|
-
return local.icon;
|
|
75
|
-
},
|
|
76
|
-
get children() {
|
|
77
|
-
var _el$5 = _tmpl$();
|
|
78
|
-
className(_el$5, fileIconClass);
|
|
79
|
-
insert(_el$5, () => local.icon);
|
|
80
|
-
return _el$5;
|
|
81
|
-
}
|
|
82
|
-
}), _el$6);
|
|
83
|
-
className(_el$6, fileLabelClass);
|
|
84
|
-
insert(_el$6, () => local.label);
|
|
85
|
-
effect((_p$) => {
|
|
86
|
-
var _v$ = uploadWrapperVariants(variantProps), _v$2 = classes(variantProps.style === "boxed" ? "flex flex-col items-center justify-center gap-2" : "flex flex-row items-center justify-center gap-2");
|
|
87
|
-
_v$ !== _p$.e && className(_el$, _p$.e = _v$);
|
|
88
|
-
_v$2 !== _p$.t && className(_el$4, _p$.t = _v$2);
|
|
89
|
-
return _p$;
|
|
90
|
-
}, {
|
|
91
|
-
e: void 0,
|
|
92
|
-
t: void 0
|
|
93
|
-
});
|
|
94
|
-
return _el$;
|
|
95
|
-
})();
|
|
96
|
-
};
|
|
97
|
-
var Upload_default = Upload;
|
|
98
|
-
|
|
99
|
-
// src/components/upload/index.ts
|
|
100
|
-
var upload_default = Upload_default;
|
|
101
|
-
|
|
102
|
-
export { upload_default };
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { Component, JSX } from 'solid-js';
|
|
2
|
-
import { C as ConfigVariants, a as ClassProps, V as VariantProps } from '../../classes-B_S9K-9I.js';
|
|
3
|
-
|
|
4
|
-
declare const breadcrumbContainerVariants: {
|
|
5
|
-
(props?: (ConfigVariants<{
|
|
6
|
-
alignment: {
|
|
7
|
-
left: string;
|
|
8
|
-
center: string;
|
|
9
|
-
right: string;
|
|
10
|
-
};
|
|
11
|
-
size: {
|
|
12
|
-
sm: string;
|
|
13
|
-
md: string;
|
|
14
|
-
lg: string;
|
|
15
|
-
};
|
|
16
|
-
separator: {
|
|
17
|
-
arrow: string;
|
|
18
|
-
dot: string;
|
|
19
|
-
bullet: string;
|
|
20
|
-
succeeds: string;
|
|
21
|
-
};
|
|
22
|
-
}> & ClassProps) | undefined): string;
|
|
23
|
-
variantKeys: ("size" | "separator" | "alignment")[];
|
|
24
|
-
};
|
|
25
|
-
declare const breadcrumbItemVariants: {
|
|
26
|
-
(props?: (ConfigVariants<{
|
|
27
|
-
active: {
|
|
28
|
-
true: string;
|
|
29
|
-
false: string;
|
|
30
|
-
};
|
|
31
|
-
}> & ClassProps) | undefined): string;
|
|
32
|
-
variantKeys: "active"[];
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
type BreadcrumbProps = {
|
|
36
|
-
children?: JSX.Element;
|
|
37
|
-
} & VariantProps<typeof breadcrumbContainerVariants> & JSX.HTMLAttributes<HTMLElement>;
|
|
38
|
-
declare const Breadcrumb: Component<BreadcrumbProps>;
|
|
39
|
-
|
|
40
|
-
type BreadcrumbItemProps = {
|
|
41
|
-
children?: JSX.Element;
|
|
42
|
-
href?: string;
|
|
43
|
-
active?: boolean;
|
|
44
|
-
} & VariantProps<typeof breadcrumbItemVariants>;
|
|
45
|
-
declare const BreadcrumbItem: Component<BreadcrumbItemProps>;
|
|
46
|
-
|
|
47
|
-
export { Breadcrumb, BreadcrumbItem, type BreadcrumbItemProps, type BreadcrumbProps };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Breadcrumb_default as Breadcrumb, BreadcrumbItem_default as BreadcrumbItem } from '../../chunk/V6Y5E7BL.js';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { switch_default as default } from '../../chunk/EE4HXMKA.js';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { tag_default as default } from '../../chunk/CJZGTNJZ.js';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { upload_default as default } from '../../chunk/YDEDUOFM.js';
|