@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/3VOILEMN.js
DELETED
|
@@ -1,187 +0,0 @@
|
|
|
1
|
-
import { cva, classes } from './HKS7ET6T.js';
|
|
2
|
-
import { template, spread, mergeProps, insert, createComponent, Dynamic, effect, className } from 'solid-js/web';
|
|
3
|
-
import { splitProps, Show, createMemo, createSignal } from 'solid-js';
|
|
4
|
-
|
|
5
|
-
// src/components/menu/Menu.styles.ts
|
|
6
|
-
var menuWrapper = cva("bg-white border border-gray-200 rounded shadow", {
|
|
7
|
-
variants: {
|
|
8
|
-
inline: {
|
|
9
|
-
true: "flex space-x-4",
|
|
10
|
-
false: "block"
|
|
11
|
-
}
|
|
12
|
-
},
|
|
13
|
-
defaultVariants: {
|
|
14
|
-
inline: false
|
|
15
|
-
}
|
|
16
|
-
});
|
|
17
|
-
var listWrapper = cva("px-4 py-2", {
|
|
18
|
-
variants: {
|
|
19
|
-
label: {
|
|
20
|
-
true: "pt-6",
|
|
21
|
-
false: ""
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
defaultVariants: {
|
|
25
|
-
label: false
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
var itemVariants = cva(
|
|
29
|
-
"px-4 py-2 cursor-pointer select-none transition-colors",
|
|
30
|
-
{
|
|
31
|
-
variants: {
|
|
32
|
-
active: {
|
|
33
|
-
true: "bg-blue-100 font-semibold",
|
|
34
|
-
false: "hover:bg-blue-500"
|
|
35
|
-
},
|
|
36
|
-
expanded: {
|
|
37
|
-
true: "bg-gray-50 text-black",
|
|
38
|
-
false: ""
|
|
39
|
-
},
|
|
40
|
-
disabled: {
|
|
41
|
-
true: "opacity-50 cursor-not-allowed text-gray-700",
|
|
42
|
-
false: ""
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
compoundVariants: [
|
|
46
|
-
{
|
|
47
|
-
active: true,
|
|
48
|
-
expanded: true,
|
|
49
|
-
class: "bg-blue-200"
|
|
50
|
-
}
|
|
51
|
-
],
|
|
52
|
-
defaultVariants: {
|
|
53
|
-
active: false,
|
|
54
|
-
expanded: false,
|
|
55
|
-
disabled: false
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
);
|
|
59
|
-
var itemDetailWrapper = cva(
|
|
60
|
-
"ml-4 border-l border-gray-200 mt-1 pl-2"
|
|
61
|
-
);
|
|
62
|
-
|
|
63
|
-
// src/components/menu/Menu.tsx
|
|
64
|
-
var _tmpl$ = /* @__PURE__ */ template(`<div>`);
|
|
65
|
-
var Menu = (props) => {
|
|
66
|
-
const [local, variantProps, otherProps] = splitProps(props, ["class", "className", "children", "inline"], Object.keys(menuWrapper.variantKeys ?? {}));
|
|
67
|
-
return (() => {
|
|
68
|
-
var _el$ = _tmpl$();
|
|
69
|
-
spread(_el$, mergeProps({
|
|
70
|
-
get ["class"]() {
|
|
71
|
-
return classes(menuWrapper({
|
|
72
|
-
inline: !!variantProps.inline
|
|
73
|
-
}), local.class, local.className);
|
|
74
|
-
}
|
|
75
|
-
}, otherProps), false, true);
|
|
76
|
-
insert(_el$, () => local.children);
|
|
77
|
-
return _el$;
|
|
78
|
-
})();
|
|
79
|
-
};
|
|
80
|
-
var Menu_default = Menu;
|
|
81
|
-
var _tmpl$2 = /* @__PURE__ */ template(`<div class="px-4 pb-2 font-medium text-gray-700">`);
|
|
82
|
-
var _tmpl$22 = /* @__PURE__ */ template(`<div><div class="flex flex-col">`);
|
|
83
|
-
var MenuList = (props) => {
|
|
84
|
-
const [local, variantProps, otherProps] = splitProps(props, ["class", "children", "label"], Object.keys(listWrapper.variantKeys ?? {}));
|
|
85
|
-
return (() => {
|
|
86
|
-
var _el$ = _tmpl$22(), _el$3 = _el$.firstChild;
|
|
87
|
-
spread(_el$, mergeProps({
|
|
88
|
-
get ["class"]() {
|
|
89
|
-
return classes(listWrapper({
|
|
90
|
-
label: !!local.label
|
|
91
|
-
}), local.class);
|
|
92
|
-
}
|
|
93
|
-
}, otherProps), false, true);
|
|
94
|
-
insert(_el$, createComponent(Show, {
|
|
95
|
-
get when() {
|
|
96
|
-
return local.label;
|
|
97
|
-
},
|
|
98
|
-
get children() {
|
|
99
|
-
var _el$2 = _tmpl$2();
|
|
100
|
-
insert(_el$2, () => local.label);
|
|
101
|
-
return _el$2;
|
|
102
|
-
}
|
|
103
|
-
}), _el$3);
|
|
104
|
-
insert(_el$3, () => local.children);
|
|
105
|
-
return _el$;
|
|
106
|
-
})();
|
|
107
|
-
};
|
|
108
|
-
var MenuList_default = MenuList;
|
|
109
|
-
var _tmpl$3 = /* @__PURE__ */ template(`<span class="ml-2 text-gray-500">`);
|
|
110
|
-
var _tmpl$23 = /* @__PURE__ */ template(`<div><div class="flex items-center justify-between"><span>`);
|
|
111
|
-
var _tmpl$32 = /* @__PURE__ */ template(`<div>`);
|
|
112
|
-
var MenuItem = (props) => {
|
|
113
|
-
const [local, variantProps, rest] = splitProps(props, ["class", "className", "label", "active", "expanded", "disabled", "tag", "to", "target", "children"], Object.keys(itemVariants.variantKeys ?? {}));
|
|
114
|
-
const hasChildren = createMemo(() => !!local.children);
|
|
115
|
-
const isControlled = createMemo(() => local.expanded !== void 0);
|
|
116
|
-
const [internalExpanded, setInternalExpanded] = createSignal(false);
|
|
117
|
-
const isExpanded = createMemo(() => isControlled() ? !!local.expanded : internalExpanded());
|
|
118
|
-
const toggleExpand = () => {
|
|
119
|
-
if (!isControlled() && hasChildren() && !local.disabled) {
|
|
120
|
-
setInternalExpanded((prev) => !prev);
|
|
121
|
-
}
|
|
122
|
-
};
|
|
123
|
-
const onKeyDown = (e) => {
|
|
124
|
-
if (local.disabled) return;
|
|
125
|
-
if (e.key === "Enter" || e.key === " ") {
|
|
126
|
-
e.preventDefault();
|
|
127
|
-
toggleExpand();
|
|
128
|
-
}
|
|
129
|
-
};
|
|
130
|
-
const tagName = local.to ? "a" : local.tag ?? "div";
|
|
131
|
-
const focusableProps = !local.to && !local.disabled ? {
|
|
132
|
-
tabIndex: 0
|
|
133
|
-
} : {};
|
|
134
|
-
return createComponent(Dynamic, mergeProps({
|
|
135
|
-
component: tagName,
|
|
136
|
-
get ["class"]() {
|
|
137
|
-
return classes(local.class, local.className, "w-full");
|
|
138
|
-
},
|
|
139
|
-
get href() {
|
|
140
|
-
return local.to;
|
|
141
|
-
},
|
|
142
|
-
get target() {
|
|
143
|
-
return local.target;
|
|
144
|
-
},
|
|
145
|
-
get ["aria-disabled"]() {
|
|
146
|
-
return local.disabled;
|
|
147
|
-
},
|
|
148
|
-
onClick: toggleExpand,
|
|
149
|
-
onKeyDown
|
|
150
|
-
}, focusableProps, rest, {
|
|
151
|
-
get children() {
|
|
152
|
-
return [(() => {
|
|
153
|
-
var _el$ = _tmpl$23(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild;
|
|
154
|
-
insert(_el$3, () => local.label);
|
|
155
|
-
insert(_el$2, createComponent(Show, {
|
|
156
|
-
get when() {
|
|
157
|
-
return hasChildren();
|
|
158
|
-
},
|
|
159
|
-
get children() {
|
|
160
|
-
var _el$4 = _tmpl$3();
|
|
161
|
-
insert(_el$4, () => isExpanded() ? "\u25BE" : "\u25B8");
|
|
162
|
-
return _el$4;
|
|
163
|
-
}
|
|
164
|
-
}), null);
|
|
165
|
-
effect(() => className(_el$, itemVariants({
|
|
166
|
-
active: !!local.active,
|
|
167
|
-
expanded: isExpanded(),
|
|
168
|
-
disabled: !!local.disabled
|
|
169
|
-
})));
|
|
170
|
-
return _el$;
|
|
171
|
-
})(), createComponent(Show, {
|
|
172
|
-
get when() {
|
|
173
|
-
return isExpanded();
|
|
174
|
-
},
|
|
175
|
-
get children() {
|
|
176
|
-
var _el$5 = _tmpl$32();
|
|
177
|
-
insert(_el$5, () => local.children);
|
|
178
|
-
effect(() => className(_el$5, itemDetailWrapper()));
|
|
179
|
-
return _el$5;
|
|
180
|
-
}
|
|
181
|
-
})];
|
|
182
|
-
}
|
|
183
|
-
}));
|
|
184
|
-
};
|
|
185
|
-
var MenuItem_default = MenuItem;
|
|
186
|
-
|
|
187
|
-
export { MenuItem_default, MenuList_default, Menu_default };
|
package/dist/chunk/C4745OZS.jsx
DELETED
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
cva
|
|
3
|
-
} from "./P7WPLZNA.jsx";
|
|
4
|
-
|
|
5
|
-
// src/components/avatar/Avatar.tsx
|
|
6
|
-
import {
|
|
7
|
-
createSignal,
|
|
8
|
-
createMemo,
|
|
9
|
-
createEffect,
|
|
10
|
-
mergeProps,
|
|
11
|
-
splitProps,
|
|
12
|
-
Show,
|
|
13
|
-
untrack
|
|
14
|
-
} from "solid-js";
|
|
15
|
-
|
|
16
|
-
// src/components/avatar/Avatar.styles.ts
|
|
17
|
-
var avatarVariants = cva(
|
|
18
|
-
[
|
|
19
|
-
"flex items-center justify-center mx-1",
|
|
20
|
-
"font-medium outline-none select-none transition active:transition-none",
|
|
21
|
-
"not-disabled:cursor-pointer",
|
|
22
|
-
"disabled:cursor-not-allowed disabled:opacity-25",
|
|
23
|
-
"aria-busy:cursor-wait"
|
|
24
|
-
],
|
|
25
|
-
{
|
|
26
|
-
variants: {
|
|
27
|
-
size: {
|
|
28
|
-
sm: "size-8 text-sm",
|
|
29
|
-
md: "size-16 text-base",
|
|
30
|
-
lg: "size-24 text-lg"
|
|
31
|
-
},
|
|
32
|
-
shape: {
|
|
33
|
-
circle: "rounded-full overflow-hidden",
|
|
34
|
-
rounded: "rounded-lg overflow-hidden"
|
|
35
|
-
},
|
|
36
|
-
variant: {
|
|
37
|
-
filled: "bg-gray-200 text-gray-800",
|
|
38
|
-
outlined: "border-2 border-gray-300 text-gray-800",
|
|
39
|
-
ghost: "text-gray-800"
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
defaultVariants: {
|
|
43
|
-
size: "md",
|
|
44
|
-
shape: "circle",
|
|
45
|
-
variant: "filled"
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
);
|
|
49
|
-
|
|
50
|
-
// src/components/avatar/utils.ts
|
|
51
|
-
function parseCaption(alt) {
|
|
52
|
-
if (!alt) return "";
|
|
53
|
-
const parts = alt.split(" ");
|
|
54
|
-
if (parts.length >= 2 && parts[0] && parts[1]) {
|
|
55
|
-
return `${parts[0][0] ?? ""}${parts[1][0] ?? ""}`;
|
|
56
|
-
}
|
|
57
|
-
return "";
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
// src/components/avatar/Avatar.tsx
|
|
61
|
-
var Avatar = (rawProps) => {
|
|
62
|
-
const props = mergeProps({ alt: "User Avatar" }, rawProps);
|
|
63
|
-
const [variantProps, otherProps] = splitProps(props, [
|
|
64
|
-
"class",
|
|
65
|
-
...avatarVariants.variantKeys
|
|
66
|
-
]);
|
|
67
|
-
const [source, setSource] = createSignal(props.src || props.dataSrc);
|
|
68
|
-
createEffect(() => {
|
|
69
|
-
untrack(() => {
|
|
70
|
-
if (import.meta.env.PROD && props.dataSrc) {
|
|
71
|
-
setSource(props.dataSrc);
|
|
72
|
-
}
|
|
73
|
-
});
|
|
74
|
-
});
|
|
75
|
-
const styles = createMemo(() => ({
|
|
76
|
-
background: untrack(() => source() ? "" : props.class ?? "bg-blue-500"),
|
|
77
|
-
text: untrack(() => source() ? "" : props.text ?? "text-white")
|
|
78
|
-
}));
|
|
79
|
-
const caption = createMemo(() => parseCaption(props.alt));
|
|
80
|
-
return <figure class={avatarVariants(variantProps)}>
|
|
81
|
-
<Show
|
|
82
|
-
when={source()}
|
|
83
|
-
fallback={<figcaption class={styles().text}>{caption()}</figcaption>}
|
|
84
|
-
>
|
|
85
|
-
<img
|
|
86
|
-
src={source()}
|
|
87
|
-
data-src={props.dataSrc}
|
|
88
|
-
class="size-full object-cover"
|
|
89
|
-
{...otherProps}
|
|
90
|
-
/>
|
|
91
|
-
</Show>
|
|
92
|
-
</figure>;
|
|
93
|
-
};
|
|
94
|
-
var Avatar_default = Avatar;
|
|
95
|
-
|
|
96
|
-
// src/components/avatar/index.ts
|
|
97
|
-
var avatar_default = Avatar_default;
|
|
98
|
-
|
|
99
|
-
export {
|
|
100
|
-
avatar_default
|
|
101
|
-
};
|
package/dist/chunk/CJZGTNJZ.js
DELETED
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
import { cva, classes } from './HKS7ET6T.js';
|
|
2
|
-
import { delegateEvents, template, spread, mergeProps, insert, createComponent, effect, setAttribute, className } from 'solid-js/web';
|
|
3
|
-
import { splitProps, createMemo, untrack, Show } from 'solid-js';
|
|
4
|
-
|
|
5
|
-
// src/components/tag/Tag.styles.ts
|
|
6
|
-
var tagVariants = cva(
|
|
7
|
-
[
|
|
8
|
-
"inline-flex items-center gap-2 px-3 py-1 text-sm rounded",
|
|
9
|
-
"transition select-none"
|
|
10
|
-
],
|
|
11
|
-
{
|
|
12
|
-
variants: {
|
|
13
|
-
size: {
|
|
14
|
-
normal: "text-xs px-2 py-0.5",
|
|
15
|
-
medium: "text-sm px-3 py-1",
|
|
16
|
-
large: "text-base px-4 py-2"
|
|
17
|
-
},
|
|
18
|
-
type: {
|
|
19
|
-
primary: "bg-blue-500 text-white",
|
|
20
|
-
info: "bg-sky-500 text-white",
|
|
21
|
-
success: "bg-green-500 text-white",
|
|
22
|
-
warning: "bg-yellow-500 text-black",
|
|
23
|
-
danger: "bg-red-500 text-white",
|
|
24
|
-
dark: "bg-zinc-800 text-white",
|
|
25
|
-
light: "bg-gray-100 text-black"
|
|
26
|
-
},
|
|
27
|
-
rounded: {
|
|
28
|
-
true: "rounded-full",
|
|
29
|
-
false: ""
|
|
30
|
-
},
|
|
31
|
-
closable: {
|
|
32
|
-
true: "pr-1",
|
|
33
|
-
false: ""
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
defaultVariants: {
|
|
37
|
-
size: "normal"
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
);
|
|
41
|
-
|
|
42
|
-
// src/components/tag/Tag.tsx
|
|
43
|
-
var _tmpl$ = /* @__PURE__ */ template(`<button type=button class="ml-2 text-xs text-white hover:opacity-80">`);
|
|
44
|
-
var _tmpl$2 = /* @__PURE__ */ template(`<button type=button>`);
|
|
45
|
-
var _tmpl$3 = /* @__PURE__ */ template(`<div role=group><span role=status><span class=truncate>`);
|
|
46
|
-
var Tag = (props) => {
|
|
47
|
-
const [localProps, variantProps, otherProps] = splitProps(props, ["closable", "attached", "onClose", "ariaCloseLabel", "closeIcon", "children", "type"], ["class", ...tagVariants.variantKeys]);
|
|
48
|
-
const isAttachedClosable = createMemo(() => untrack(() => localProps.attached && localProps.closable));
|
|
49
|
-
const isClosable = createMemo(() => untrack(() => localProps.closable && !localProps.attached));
|
|
50
|
-
const tagClasses = createMemo(() => classes(tagVariants({
|
|
51
|
-
...variantProps,
|
|
52
|
-
closable: localProps.closable
|
|
53
|
-
}), variantProps.class));
|
|
54
|
-
const attachedButtonClasses = createMemo(() => tagVariants({
|
|
55
|
-
...variantProps,
|
|
56
|
-
class: "ml-1 text-xs hover:opacity-80"
|
|
57
|
-
}));
|
|
58
|
-
const handleClose = (e) => {
|
|
59
|
-
untrack(() => {
|
|
60
|
-
if (typeof localProps.onClose === "function") {
|
|
61
|
-
localProps.onClose(e);
|
|
62
|
-
}
|
|
63
|
-
});
|
|
64
|
-
};
|
|
65
|
-
return (() => {
|
|
66
|
-
var _el$ = _tmpl$3(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild;
|
|
67
|
-
spread(_el$2, mergeProps({
|
|
68
|
-
get ["class"]() {
|
|
69
|
-
return tagClasses();
|
|
70
|
-
}
|
|
71
|
-
}, otherProps), false, true);
|
|
72
|
-
insert(_el$3, () => localProps.children);
|
|
73
|
-
insert(_el$2, createComponent(Show, {
|
|
74
|
-
get when() {
|
|
75
|
-
return isClosable();
|
|
76
|
-
},
|
|
77
|
-
get children() {
|
|
78
|
-
var _el$4 = _tmpl$();
|
|
79
|
-
_el$4.$$click = handleClose;
|
|
80
|
-
insert(_el$4, () => localProps.closeIcon ?? "\xD7");
|
|
81
|
-
effect(() => setAttribute(_el$4, "aria-label", localProps.ariaCloseLabel ?? "Remove tag"));
|
|
82
|
-
return _el$4;
|
|
83
|
-
}
|
|
84
|
-
}), null);
|
|
85
|
-
insert(_el$, createComponent(Show, {
|
|
86
|
-
get when() {
|
|
87
|
-
return isAttachedClosable();
|
|
88
|
-
},
|
|
89
|
-
get children() {
|
|
90
|
-
var _el$5 = _tmpl$2();
|
|
91
|
-
_el$5.$$click = handleClose;
|
|
92
|
-
insert(_el$5, () => localProps.closeIcon ?? "\xD7");
|
|
93
|
-
effect((_p$) => {
|
|
94
|
-
var _v$ = localProps.ariaCloseLabel ?? "Remove tag", _v$2 = attachedButtonClasses();
|
|
95
|
-
_v$ !== _p$.e && setAttribute(_el$5, "aria-label", _p$.e = _v$);
|
|
96
|
-
_v$2 !== _p$.t && className(_el$5, _p$.t = _v$2);
|
|
97
|
-
return _p$;
|
|
98
|
-
}, {
|
|
99
|
-
e: void 0,
|
|
100
|
-
t: void 0
|
|
101
|
-
});
|
|
102
|
-
return _el$5;
|
|
103
|
-
}
|
|
104
|
-
}), null);
|
|
105
|
-
effect(() => className(_el$, isAttachedClosable() ? "tags has-addons" : void 0));
|
|
106
|
-
return _el$;
|
|
107
|
-
})();
|
|
108
|
-
};
|
|
109
|
-
var Tag_default = Tag;
|
|
110
|
-
delegateEvents(["click"]);
|
|
111
|
-
|
|
112
|
-
// src/components/tag/index.ts
|
|
113
|
-
var tag_default = Tag_default;
|
|
114
|
-
|
|
115
|
-
export { tag_default };
|
package/dist/chunk/DBQ7IOPU.js
DELETED
|
@@ -1,189 +0,0 @@
|
|
|
1
|
-
import { cva } from './HKS7ET6T.js';
|
|
2
|
-
import { delegateEvents, template, spread, mergeProps, insert, createComponent, memo, effect, className } from 'solid-js/web';
|
|
3
|
-
import { splitProps, createMemo, Show, For } from 'solid-js';
|
|
4
|
-
|
|
5
|
-
// src/components/pagination/Pagination.styles.ts
|
|
6
|
-
var paginationItemVariants = cva(
|
|
7
|
-
[
|
|
8
|
-
"inline-flex items-center justify-center font-medium transition-colors",
|
|
9
|
-
"select-none border border-transparent",
|
|
10
|
-
// border shown only when needed
|
|
11
|
-
"disabled:opacity-50 disabled:pointer-events-none"
|
|
12
|
-
],
|
|
13
|
-
{
|
|
14
|
-
variants: {
|
|
15
|
-
active: {
|
|
16
|
-
true: "bg-blue-500 text-white hover:bg-blue-600",
|
|
17
|
-
false: "bg-transparent text-gray-700 hover:bg-gray-200 dark:text-gray-200 dark:hover:bg-gray-700"
|
|
18
|
-
},
|
|
19
|
-
rounded: {
|
|
20
|
-
true: "rounded-full",
|
|
21
|
-
false: "rounded"
|
|
22
|
-
},
|
|
23
|
-
simple: {
|
|
24
|
-
true: "border-none bg-transparent hover:bg-transparent text-gray-700 dark:text-gray-300",
|
|
25
|
-
false: ""
|
|
26
|
-
},
|
|
27
|
-
size: {
|
|
28
|
-
sm: "text-xs px-2 py-1",
|
|
29
|
-
md: "text-sm px-3 py-1.5",
|
|
30
|
-
lg: "text-base px-4 py-2"
|
|
31
|
-
},
|
|
32
|
-
disabled: {
|
|
33
|
-
true: "opacity-50 pointer-events-none",
|
|
34
|
-
false: ""
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
defaultVariants: {
|
|
38
|
-
active: false,
|
|
39
|
-
rounded: false,
|
|
40
|
-
simple: false,
|
|
41
|
-
size: "md",
|
|
42
|
-
disabled: false
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
);
|
|
46
|
-
var paginationInfoVariants = cva(
|
|
47
|
-
"inline-block font-medium transition-colors",
|
|
48
|
-
{
|
|
49
|
-
variants: {
|
|
50
|
-
simple: {
|
|
51
|
-
true: "text-sm text-gray-600 dark:text-gray-300 px-2",
|
|
52
|
-
false: "text-sm text-gray-700 dark:text-gray-200 px-2"
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
defaultVariants: {
|
|
56
|
-
simple: false
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
);
|
|
60
|
-
var paginationContainerVariants = cva(
|
|
61
|
-
"flex items-center gap-1 flex-wrap",
|
|
62
|
-
{
|
|
63
|
-
variants: {
|
|
64
|
-
align: {
|
|
65
|
-
start: "justify-start",
|
|
66
|
-
center: "justify-center",
|
|
67
|
-
end: "justify-end"
|
|
68
|
-
},
|
|
69
|
-
wrap: {
|
|
70
|
-
true: "flex-wrap",
|
|
71
|
-
false: "flex-nowrap"
|
|
72
|
-
}
|
|
73
|
-
},
|
|
74
|
-
defaultVariants: {
|
|
75
|
-
align: "start",
|
|
76
|
-
wrap: true
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
);
|
|
80
|
-
|
|
81
|
-
// src/components/pagination/Pagination.tsx
|
|
82
|
-
var _tmpl$ = /* @__PURE__ */ template(`<span>`);
|
|
83
|
-
var _tmpl$2 = /* @__PURE__ */ template(`<nav><button>«</button><button>»`);
|
|
84
|
-
var _tmpl$3 = /* @__PURE__ */ template(`<button>`);
|
|
85
|
-
var Pagination = (props) => {
|
|
86
|
-
const [local, variantProps, otherProps] = splitProps(props, ["total", "perPage", "current", "onChange", "rangeBefore", "rangeAfter", "simple", "children"], ["rounded", "size", "disabled", "active", "simple"]);
|
|
87
|
-
const perPage = () => local.perPage ?? 20;
|
|
88
|
-
const pageCount = createMemo(() => Math.ceil(local.total / perPage()));
|
|
89
|
-
const hasPrev = createMemo(() => local.current > 1);
|
|
90
|
-
const hasNext = createMemo(() => local.current < pageCount());
|
|
91
|
-
const pagesInRange = createMemo(() => {
|
|
92
|
-
const before = local.rangeBefore ?? 1;
|
|
93
|
-
const after = local.rangeAfter ?? 1;
|
|
94
|
-
const start = Math.max(1, local.current - before);
|
|
95
|
-
const end = Math.min(local.current + after, pageCount());
|
|
96
|
-
return Array.from({
|
|
97
|
-
length: end - start + 1
|
|
98
|
-
}, (_, i) => start + i);
|
|
99
|
-
});
|
|
100
|
-
const changePage = (page) => {
|
|
101
|
-
if (page >= 1 && page <= pageCount() && page !== local.current) {
|
|
102
|
-
local.onChange(page);
|
|
103
|
-
}
|
|
104
|
-
};
|
|
105
|
-
return (() => {
|
|
106
|
-
var _el$ = _tmpl$2(), _el$2 = _el$.firstChild, _el$4 = _el$2.nextSibling;
|
|
107
|
-
spread(_el$, mergeProps({
|
|
108
|
-
get ["class"]() {
|
|
109
|
-
return paginationContainerVariants({
|
|
110
|
-
align: "start",
|
|
111
|
-
wrap: true
|
|
112
|
-
});
|
|
113
|
-
}
|
|
114
|
-
}, otherProps), false, true);
|
|
115
|
-
_el$2.$$click = () => changePage(local.current - 1);
|
|
116
|
-
insert(_el$, createComponent(Show, {
|
|
117
|
-
get when() {
|
|
118
|
-
return pageCount() > 1;
|
|
119
|
-
},
|
|
120
|
-
get children() {
|
|
121
|
-
return [createComponent(Show, {
|
|
122
|
-
get when() {
|
|
123
|
-
return local.simple;
|
|
124
|
-
},
|
|
125
|
-
get children() {
|
|
126
|
-
var _el$3 = _tmpl$();
|
|
127
|
-
insert(_el$3, (() => {
|
|
128
|
-
var _c$ = memo(() => perPage() === 1);
|
|
129
|
-
return () => _c$() ? `${(local.current - 1) * perPage() + 1} / ${local.total}` : `${(local.current - 1) * perPage() + 1}-${Math.min(local.current * perPage(), local.total)} / ${local.total}`;
|
|
130
|
-
})());
|
|
131
|
-
effect(() => className(_el$3, paginationInfoVariants({
|
|
132
|
-
simple: true
|
|
133
|
-
})));
|
|
134
|
-
return _el$3;
|
|
135
|
-
}
|
|
136
|
-
}), createComponent(Show, {
|
|
137
|
-
get when() {
|
|
138
|
-
return !local.simple;
|
|
139
|
-
},
|
|
140
|
-
get children() {
|
|
141
|
-
return createComponent(For, {
|
|
142
|
-
get each() {
|
|
143
|
-
return pagesInRange();
|
|
144
|
-
},
|
|
145
|
-
children: (page) => (() => {
|
|
146
|
-
var _el$5 = _tmpl$3();
|
|
147
|
-
_el$5.$$click = () => changePage(page);
|
|
148
|
-
insert(_el$5, page);
|
|
149
|
-
effect(() => className(_el$5, paginationItemVariants({
|
|
150
|
-
...variantProps,
|
|
151
|
-
active: page === local.current
|
|
152
|
-
})));
|
|
153
|
-
return _el$5;
|
|
154
|
-
})()
|
|
155
|
-
});
|
|
156
|
-
}
|
|
157
|
-
})];
|
|
158
|
-
}
|
|
159
|
-
}), _el$4);
|
|
160
|
-
_el$4.$$click = () => changePage(local.current + 1);
|
|
161
|
-
effect((_p$) => {
|
|
162
|
-
var _v$ = paginationItemVariants({
|
|
163
|
-
...variantProps,
|
|
164
|
-
disabled: !hasPrev()
|
|
165
|
-
}), _v$2 = !hasPrev(), _v$3 = paginationItemVariants({
|
|
166
|
-
...variantProps,
|
|
167
|
-
disabled: !hasNext()
|
|
168
|
-
}), _v$4 = !hasNext();
|
|
169
|
-
_v$ !== _p$.e && className(_el$2, _p$.e = _v$);
|
|
170
|
-
_v$2 !== _p$.t && (_el$2.disabled = _p$.t = _v$2);
|
|
171
|
-
_v$3 !== _p$.a && className(_el$4, _p$.a = _v$3);
|
|
172
|
-
_v$4 !== _p$.o && (_el$4.disabled = _p$.o = _v$4);
|
|
173
|
-
return _p$;
|
|
174
|
-
}, {
|
|
175
|
-
e: void 0,
|
|
176
|
-
t: void 0,
|
|
177
|
-
a: void 0,
|
|
178
|
-
o: void 0
|
|
179
|
-
});
|
|
180
|
-
return _el$;
|
|
181
|
-
})();
|
|
182
|
-
};
|
|
183
|
-
var Pagination_default = Pagination;
|
|
184
|
-
delegateEvents(["click"]);
|
|
185
|
-
|
|
186
|
-
// src/components/pagination/index.ts
|
|
187
|
-
var pagination_default = Pagination_default;
|
|
188
|
-
|
|
189
|
-
export { pagination_default };
|
package/dist/chunk/EB7KXR65.js
DELETED
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import { cva, classes } from './HKS7ET6T.js';
|
|
2
|
-
import { template, spread, mergeProps, insert, createComponent, effect, className } from 'solid-js/web';
|
|
3
|
-
import { splitProps, createSignal, createMemo, Show } from 'solid-js';
|
|
4
|
-
|
|
5
|
-
// src/components/textarea/Textarea.styles.ts
|
|
6
|
-
var textareaVariants = cva(
|
|
7
|
-
[
|
|
8
|
-
"block w-full rounded-md border bg-white px-3 py-2 text-sm",
|
|
9
|
-
"text-gray-900 placeholder-gray-400",
|
|
10
|
-
"focus:outline-none focus:ring-2 focus:ring-accent focus:border-transparent",
|
|
11
|
-
"disabled:opacity-50 disabled:cursor-not-allowed"
|
|
12
|
-
],
|
|
13
|
-
{
|
|
14
|
-
variants: {
|
|
15
|
-
size: {
|
|
16
|
-
sm: "text-sm py-1.5",
|
|
17
|
-
md: "text-base py-2",
|
|
18
|
-
lg: "text-lg py-3"
|
|
19
|
-
},
|
|
20
|
-
color: {
|
|
21
|
-
primary: "border-blue-500",
|
|
22
|
-
info: "border-cyan-500",
|
|
23
|
-
success: "border-green-500",
|
|
24
|
-
warning: "border-yellow-500",
|
|
25
|
-
danger: "border-red-500"
|
|
26
|
-
},
|
|
27
|
-
loading: {
|
|
28
|
-
true: "opacity-50 cursor-wait",
|
|
29
|
-
false: ""
|
|
30
|
-
},
|
|
31
|
-
resize: {
|
|
32
|
-
none: "resize-none",
|
|
33
|
-
both: "resize",
|
|
34
|
-
x: "resize-x",
|
|
35
|
-
y: "resize-y"
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
defaultVariants: {
|
|
39
|
-
size: "md",
|
|
40
|
-
color: "primary",
|
|
41
|
-
loading: false,
|
|
42
|
-
resize: "y"
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
);
|
|
46
|
-
|
|
47
|
-
// src/components/textarea/Textarea.tsx
|
|
48
|
-
var _tmpl$ = /* @__PURE__ */ template(`<small> / `);
|
|
49
|
-
var _tmpl$2 = /* @__PURE__ */ template(`<div class="relative w-full"><textarea>`);
|
|
50
|
-
var Textarea = (props) => {
|
|
51
|
-
const [localProps, variantProps, otherProps] = splitProps(props, ["hasCounter", "value", "onInput", "onFocus", "onBlur", "maxLength"], ["class", ...textareaVariants.variantKeys]);
|
|
52
|
-
const [isFocused, setFocused] = createSignal(false);
|
|
53
|
-
const valueLength = createMemo(() => typeof localProps.value === "string" ? localProps.value.length : 0);
|
|
54
|
-
const showCounter = createMemo(() => localProps.maxLength && localProps.hasCounter);
|
|
55
|
-
return (() => {
|
|
56
|
-
var _el$ = _tmpl$2(), _el$2 = _el$.firstChild;
|
|
57
|
-
_el$2.addEventListener("blur", (e) => {
|
|
58
|
-
setFocused(false);
|
|
59
|
-
typeof localProps.onBlur === "function" && localProps.onBlur(e);
|
|
60
|
-
});
|
|
61
|
-
_el$2.addEventListener("focus", (e) => {
|
|
62
|
-
setFocused(true);
|
|
63
|
-
typeof localProps.onFocus === "function" && localProps.onFocus(e);
|
|
64
|
-
});
|
|
65
|
-
spread(_el$2, mergeProps({
|
|
66
|
-
get ["class"]() {
|
|
67
|
-
return textareaVariants(variantProps);
|
|
68
|
-
},
|
|
69
|
-
get value() {
|
|
70
|
-
return localProps.value;
|
|
71
|
-
},
|
|
72
|
-
get maxLength() {
|
|
73
|
-
return localProps.maxLength;
|
|
74
|
-
},
|
|
75
|
-
get onInput() {
|
|
76
|
-
return localProps.onInput;
|
|
77
|
-
},
|
|
78
|
-
get ["aria-invalid"]() {
|
|
79
|
-
return variantProps.color === "danger" ? "true" : void 0;
|
|
80
|
-
}
|
|
81
|
-
}, otherProps), false, false);
|
|
82
|
-
insert(_el$, createComponent(Show, {
|
|
83
|
-
get when() {
|
|
84
|
-
return showCounter();
|
|
85
|
-
},
|
|
86
|
-
get children() {
|
|
87
|
-
var _el$3 = _tmpl$(), _el$4 = _el$3.firstChild;
|
|
88
|
-
insert(_el$3, valueLength, _el$4);
|
|
89
|
-
insert(_el$3, () => localProps.maxLength, null);
|
|
90
|
-
effect(() => className(_el$3, classes("absolute bottom-1 right-2 text-xs text-gray-500 transition-opacity", isFocused() ? "opacity-100" : "opacity-0")));
|
|
91
|
-
return _el$3;
|
|
92
|
-
}
|
|
93
|
-
}), null);
|
|
94
|
-
return _el$;
|
|
95
|
-
})();
|
|
96
|
-
};
|
|
97
|
-
var Textarea_default = Textarea;
|
|
98
|
-
|
|
99
|
-
// src/components/textarea/index.ts
|
|
100
|
-
var textarea_default = Textarea_default;
|
|
101
|
-
|
|
102
|
-
export { textarea_default };
|