@pathscale/ui 0.0.1 → 0.0.3
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/dist/Accordion-JZGWxBMK.d.ts +27 -0
- package/dist/Autocomplete-gLkjMHrc.d.ts +28 -0
- package/dist/Checkbox-BjaweaOH.d.ts +40 -0
- package/dist/Field-DfUn85_1.d.ts +49 -0
- package/dist/{Input-BQbTzjIO.d.ts → Input-C1bm4HGf.d.ts} +1 -1
- package/dist/Pagination-CJtlFMHy.d.ts +43 -0
- package/dist/Progress-gN0xqhAF.d.ts +64 -0
- package/dist/Select-CWCDBvec.d.ts +44 -0
- package/dist/Steps-1miUeyCD.d.ts +34 -0
- package/dist/Switch-BiKX7HZ2.d.ts +72 -0
- package/dist/Table-CGa6Nop3.d.ts +39 -0
- package/dist/Tabs-BEnRV6GG.d.ts +42 -0
- package/dist/Tag-BPrhn-Ne.d.ts +42 -0
- package/dist/Timeline-Bd4SxHMT.d.ts +14 -0
- package/dist/Tooltip-BfPongoz.d.ts +53 -0
- package/dist/Upload-BrFuZ4JA.d.ts +39 -0
- package/dist/chunk/3IHANYRN.js +98 -0
- package/dist/chunk/3VOILEMN.js +187 -0
- package/dist/chunk/4TWLQ3IA.js +103 -0
- package/dist/chunk/6SBH3KSM.jsx +96 -0
- package/dist/chunk/7ROVLN3J.js +175 -0
- package/dist/chunk/BBDVIXAH.jsx +194 -0
- package/dist/chunk/{4RCWSX7S.jsx → C4745OZS.jsx} +7 -7
- package/dist/chunk/C4YO33NN.jsx +179 -0
- package/dist/chunk/CJZGTNJZ.js +115 -0
- package/dist/chunk/D2BEL4SM.jsx +169 -0
- package/dist/chunk/DBQ7IOPU.js +189 -0
- package/dist/chunk/DNTGSCVF.jsx +100 -0
- package/dist/chunk/DSTUGZW6.jsx +81 -0
- package/dist/chunk/ELRAUORW.jsx +179 -0
- package/dist/chunk/FKSQPGOD.jsx +170 -0
- package/dist/chunk/FPUQ25SO.js +137 -0
- package/dist/chunk/GLEAR2TS.jsx +160 -0
- package/dist/chunk/GMIXRYN3.js +138 -0
- package/dist/chunk/HWAGW5N4.jsx +118 -0
- package/dist/chunk/JWRGKHDO.js +172 -0
- package/dist/chunk/KV6LTJHI.jsx +175 -0
- package/dist/chunk/LAQPAV5I.jsx +187 -0
- package/dist/chunk/LI3HCFL7.jsx +132 -0
- package/dist/chunk/MAX47D6F.js +99 -0
- package/dist/chunk/{2JGZSAW5.js → MI773TMC.js} +6 -6
- package/dist/chunk/MMTAND25.jsx +126 -0
- package/dist/chunk/MXG3MBEN.jsx +148 -0
- package/dist/chunk/MYERRMTM.js +200 -0
- package/dist/chunk/NZKPDBTE.js +118 -0
- package/dist/chunk/OSJ3P7PI.js +189 -0
- package/dist/chunk/P2L6LFLS.js +144 -0
- package/dist/chunk/QLESLIWS.jsx +110 -0
- package/dist/chunk/QONDPQ2I.jsx +105 -0
- package/dist/chunk/QYEMOKUG.js +125 -0
- package/dist/chunk/S3ZDSQSV.js +98 -0
- package/dist/chunk/SCJSBRV2.jsx +39 -0
- package/dist/chunk/STKRVQR6.jsx +130 -0
- package/dist/chunk/{NZZRKP74.js → TFLJI242.js} +1 -25
- package/dist/chunk/TT2JYGLU.js +218 -0
- package/dist/chunk/V6Y5E7BL.js +133 -0
- package/dist/chunk/VN5BKHA2.jsx +97 -0
- package/dist/chunk/WOT36Q7O.js +166 -0
- package/dist/chunk/WUZETUQR.js +92 -0
- package/dist/chunk/XD34JKSU.jsx +201 -0
- package/dist/chunk/{GA2HCFRS.jsx → YAQK2KFY.jsx} +1 -35
- package/dist/chunk/YMO6RPS6.js +26 -0
- package/dist/components/Progress/index.d.ts +4 -39
- package/dist/components/Progress/index.js +1 -278
- package/dist/components/Progress/index.jsx +4 -199
- package/dist/components/accordion/index.d.ts +5 -24
- package/dist/components/accordion/index.js +1 -118
- package/dist/components/accordion/index.jsx +3 -100
- package/dist/components/autocomplete/index.d.ts +8 -0
- package/dist/components/autocomplete/index.js +1 -0
- package/dist/components/autocomplete/index.jsx +7 -0
- package/dist/components/avatar/index.js +1 -1
- package/dist/components/avatar/index.jsx +3 -3
- package/dist/components/breadcrumb/index.d.ts +2 -2
- package/dist/components/breadcrumb/index.js +1 -133
- package/dist/components/breadcrumb/index.jsx +4 -120
- package/dist/components/button/index.js +1 -1
- package/dist/components/button/index.jsx +2 -1
- package/dist/components/checkbox/index.d.ts +5 -37
- package/dist/components/checkbox/index.js +1 -137
- package/dist/components/checkbox/index.jsx +3 -143
- package/dist/components/dropdown/index.d.ts +43 -0
- package/dist/components/dropdown/index.js +1 -0
- package/dist/components/dropdown/index.jsx +12 -0
- package/dist/components/field/index.d.ts +7 -0
- package/dist/components/field/index.js +1 -0
- package/dist/components/field/index.jsx +7 -0
- package/dist/components/input/index.d.ts +2 -2
- package/dist/components/menu/index.d.ts +66 -0
- package/dist/components/menu/index.js +1 -0
- package/dist/components/menu/index.jsx +11 -0
- package/dist/components/navbar/index.d.ts +74 -0
- package/dist/components/navbar/index.js +1 -0
- package/dist/components/navbar/index.jsx +11 -0
- package/dist/components/pagination/index.d.ts +5 -40
- package/dist/components/pagination/index.js +1 -189
- package/dist/components/pagination/index.jsx +3 -174
- package/dist/components/select/index.d.ts +5 -41
- package/dist/components/select/index.js +1 -98
- package/dist/components/select/index.jsx +3 -91
- package/dist/components/steps/index.d.ts +8 -0
- package/dist/components/steps/index.js +1 -0
- package/dist/components/steps/index.jsx +7 -0
- package/dist/components/switch/index.d.ts +5 -69
- package/dist/components/switch/index.js +1 -144
- package/dist/components/switch/index.jsx +3 -155
- package/dist/components/table/index.d.ts +8 -0
- package/dist/components/table/index.js +1 -0
- package/dist/components/table/index.jsx +7 -0
- package/dist/components/tabs/index.d.ts +5 -39
- package/dist/components/tabs/index.js +1 -166
- package/dist/components/tabs/index.jsx +3 -170
- package/dist/components/tag/index.d.ts +5 -39
- package/dist/components/tag/index.js +1 -115
- package/dist/components/tag/index.jsx +3 -127
- package/dist/components/timeline/index.d.ts +7 -0
- package/dist/components/timeline/index.js +1 -0
- package/dist/components/timeline/index.jsx +7 -0
- package/dist/components/toast/index.d.ts +24 -0
- package/dist/components/toast/index.js +1 -0
- package/dist/components/toast/index.jsx +11 -0
- package/dist/components/tooltip/index.d.ts +5 -50
- package/dist/components/tooltip/index.js +1 -103
- package/dist/components/tooltip/index.jsx +3 -95
- package/dist/components/upload/index.d.ts +5 -36
- package/dist/components/upload/index.js +1 -98
- package/dist/components/upload/index.jsx +3 -105
- package/dist/index.d.ts +22 -2
- package/dist/index.js +23 -2
- package/dist/index.jsx +108 -8
- package/package.json +1 -1
|
@@ -1,166 +1 @@
|
|
|
1
|
-
|
|
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 as default };
|
|
1
|
+
export { tabs_default as default } from '../../chunk/WOT36Q7O.js';
|
|
@@ -1,174 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
} from "../../chunk/
|
|
4
|
-
|
|
5
|
-
// src/components/tabs/Tabs.tsx
|
|
6
|
-
import {
|
|
7
|
-
createSignal,
|
|
8
|
-
splitProps,
|
|
9
|
-
For,
|
|
10
|
-
Show,
|
|
11
|
-
createMemo
|
|
12
|
-
} from "solid-js";
|
|
13
|
-
|
|
14
|
-
// src/components/tabs/Tabs.styles.ts
|
|
15
|
-
var tabsNavVariants = cva(
|
|
16
|
-
"flex text-sm font-medium text-gray-600 dark:text-gray-300",
|
|
17
|
-
{
|
|
18
|
-
variants: {
|
|
19
|
-
type: {
|
|
20
|
-
basic: "",
|
|
21
|
-
boxed: "flex gap-2",
|
|
22
|
-
toggle: "inline-flex rounded-md p-1",
|
|
23
|
-
"toggle-rounded": "inline-flex rounded-full p-1"
|
|
24
|
-
},
|
|
25
|
-
size: {
|
|
26
|
-
sm: "text-xs gap-1",
|
|
27
|
-
md: "text-sm gap-2",
|
|
28
|
-
lg: "text-base gap-3"
|
|
29
|
-
},
|
|
30
|
-
alignment: {
|
|
31
|
-
left: "justify-start",
|
|
32
|
-
center: "justify-center",
|
|
33
|
-
right: "justify-end"
|
|
34
|
-
},
|
|
35
|
-
expanded: {
|
|
36
|
-
true: "w-full",
|
|
37
|
-
false: ""
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
defaultVariants: {
|
|
41
|
-
type: "basic",
|
|
42
|
-
size: "md",
|
|
43
|
-
alignment: "left",
|
|
44
|
-
expanded: false
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
);
|
|
48
|
-
var tabTriggerVariants = cva(
|
|
49
|
-
"inline-flex items-center justify-center whitespace-nowrap font-medium text-sm transition-colors",
|
|
50
|
-
{
|
|
51
|
-
variants: {
|
|
52
|
-
size: {
|
|
53
|
-
sm: "text-xs px-2 py-1",
|
|
54
|
-
md: "text-sm px-3 py-2",
|
|
55
|
-
lg: "text-base px-4 py-3"
|
|
56
|
-
},
|
|
57
|
-
type: {
|
|
58
|
-
basic: "border-b-2 transition-colors hover:text-blue-600",
|
|
59
|
-
boxed: "rounded-t px-4 py-2 hover:text-blue-600",
|
|
60
|
-
toggle: "border -ml-px px-4 py-2 transition-colors first:ml-0 first:rounded-l-md last:rounded-r-md",
|
|
61
|
-
"toggle-rounded": "border -ml-px first:ml-0 first:rounded-l-full last:rounded-r-full transition-colors"
|
|
62
|
-
},
|
|
63
|
-
active: {
|
|
64
|
-
true: "",
|
|
65
|
-
false: ""
|
|
66
|
-
},
|
|
67
|
-
disabled: {
|
|
68
|
-
true: "opacity-50 cursor-not-allowed pointer-events-none",
|
|
69
|
-
false: ""
|
|
70
|
-
}
|
|
71
|
-
},
|
|
72
|
-
compoundVariants: [
|
|
73
|
-
{
|
|
74
|
-
type: "basic",
|
|
75
|
-
active: true,
|
|
76
|
-
class: "border-blue-600 text-blue-600"
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
type: "basic",
|
|
80
|
-
active: false,
|
|
81
|
-
class: "border-transparent text-gray-500 dark:text-gray-400"
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
type: "boxed",
|
|
85
|
-
active: true,
|
|
86
|
-
class: "border-x border-t border-b-0 border-gray-400 dark:border-gray-600 text-blue-600"
|
|
87
|
-
},
|
|
88
|
-
{
|
|
89
|
-
type: "boxed",
|
|
90
|
-
active: false,
|
|
91
|
-
class: "border-b border-transparent text-gray-500 dark:text-gray-400 hover:text-blue-600"
|
|
92
|
-
},
|
|
93
|
-
{
|
|
94
|
-
type: "toggle",
|
|
95
|
-
active: true,
|
|
96
|
-
class: "bg-blue-600 text-white border-blue-600"
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
type: "toggle",
|
|
100
|
-
active: false,
|
|
101
|
-
class: "bg-transparent text-gray-600 dark:text-gray-300 border-gray-300 dark:border-gray-600"
|
|
102
|
-
},
|
|
103
|
-
{
|
|
104
|
-
type: "toggle-rounded",
|
|
105
|
-
active: true,
|
|
106
|
-
class: "bg-blue-600 text-white border-blue-600"
|
|
107
|
-
},
|
|
108
|
-
{
|
|
109
|
-
type: "toggle-rounded",
|
|
110
|
-
active: false,
|
|
111
|
-
class: "bg-transparent text-gray-600 dark:text-gray-300 border-gray-300 dark:border-gray-600"
|
|
112
|
-
}
|
|
113
|
-
],
|
|
114
|
-
defaultVariants: {
|
|
115
|
-
active: false,
|
|
116
|
-
disabled: false
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
);
|
|
120
|
-
|
|
121
|
-
// src/components/tabs/Tabs.tsx
|
|
122
|
-
var Tabs = (props) => {
|
|
123
|
-
const [local, variantProps, otherProps] = splitProps(
|
|
124
|
-
props,
|
|
125
|
-
["items", "value", "onChange"],
|
|
126
|
-
["size", "type", "alignment", "expanded"]
|
|
127
|
-
);
|
|
128
|
-
const [internalActive, setInternalActive] = createSignal(local.value ?? 0);
|
|
129
|
-
const isControlled = () => local.value !== void 0;
|
|
130
|
-
const active = createMemo(
|
|
131
|
-
() => isControlled() ? local.value : internalActive()
|
|
132
|
-
);
|
|
133
|
-
const handleChange = (i) => {
|
|
134
|
-
const item = local.items[i];
|
|
135
|
-
if (!item || item.disabled) return;
|
|
136
|
-
if (!isControlled()) {
|
|
137
|
-
setInternalActive(i);
|
|
138
|
-
}
|
|
139
|
-
local.onChange?.(i);
|
|
140
|
-
};
|
|
141
|
-
return <div {...otherProps}>
|
|
142
|
-
<nav class={tabsNavVariants(variantProps)}>
|
|
143
|
-
<ul class="flex gap-0">
|
|
144
|
-
<For each={local.items}>
|
|
145
|
-
{(tab, i) => <li>
|
|
146
|
-
<button
|
|
147
|
-
class={tabTriggerVariants({
|
|
148
|
-
type: variantProps.type ?? "basic",
|
|
149
|
-
size: variantProps.size ?? "md",
|
|
150
|
-
active: i() === active(),
|
|
151
|
-
disabled: tab.disabled
|
|
152
|
-
})}
|
|
153
|
-
onClick={() => handleChange(i())}
|
|
154
|
-
>
|
|
155
|
-
{tab.label}
|
|
156
|
-
</button>
|
|
157
|
-
</li>}
|
|
158
|
-
</For>
|
|
159
|
-
</ul>
|
|
160
|
-
</nav>
|
|
161
|
-
<div class="pt-4">
|
|
162
|
-
<Show when={local.items[active()]}>
|
|
163
|
-
{local.items[active()]?.content}
|
|
164
|
-
</Show>
|
|
165
|
-
</div>
|
|
166
|
-
</div>;
|
|
167
|
-
};
|
|
168
|
-
var Tabs_default = Tabs;
|
|
169
|
-
|
|
170
|
-
// src/components/tabs/index.ts
|
|
171
|
-
var tabs_default = Tabs_default;
|
|
2
|
+
tabs_default
|
|
3
|
+
} from "../../chunk/KV6LTJHI.jsx";
|
|
4
|
+
import "../../chunk/P7WPLZNA.jsx";
|
|
172
5
|
export {
|
|
173
6
|
tabs_default as default
|
|
174
7
|
};
|
|
@@ -1,42 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { T as Tag } from '../../Tag-BPrhn-Ne.js';
|
|
2
|
+
export { a as TagProps } from '../../Tag-BPrhn-Ne.js';
|
|
3
|
+
import 'solid-js';
|
|
4
|
+
import '../../classes-B_S9K-9I.js';
|
|
3
5
|
|
|
4
|
-
declare const tagVariants: {
|
|
5
|
-
(props?: (ConfigVariants<{
|
|
6
|
-
size: {
|
|
7
|
-
normal: string;
|
|
8
|
-
medium: string;
|
|
9
|
-
large: string;
|
|
10
|
-
};
|
|
11
|
-
type: {
|
|
12
|
-
primary: string;
|
|
13
|
-
info: string;
|
|
14
|
-
success: string;
|
|
15
|
-
warning: string;
|
|
16
|
-
danger: string;
|
|
17
|
-
dark: string;
|
|
18
|
-
light: string;
|
|
19
|
-
};
|
|
20
|
-
rounded: {
|
|
21
|
-
true: string;
|
|
22
|
-
false: string;
|
|
23
|
-
};
|
|
24
|
-
closable: {
|
|
25
|
-
true: string;
|
|
26
|
-
false: string;
|
|
27
|
-
};
|
|
28
|
-
}> & ClassProps) | undefined): string;
|
|
29
|
-
variantKeys: ("size" | "type" | "rounded" | "closable")[];
|
|
30
|
-
};
|
|
31
6
|
|
|
32
|
-
type TagProps = VariantProps<typeof tagVariants> & ClassProps & ComponentProps<"span"> & {
|
|
33
|
-
closable?: boolean;
|
|
34
|
-
attached?: boolean;
|
|
35
|
-
ariaCloseLabel?: string;
|
|
36
|
-
onClose?: (e: MouseEvent) => void;
|
|
37
|
-
closeIcon?: JSX.Element;
|
|
38
|
-
children?: JSX.Element;
|
|
39
|
-
};
|
|
40
|
-
declare const Tag: Component<TagProps>;
|
|
41
7
|
|
|
42
|
-
export {
|
|
8
|
+
export { Tag as default };
|
|
@@ -1,115 +1 @@
|
|
|
1
|
-
|
|
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 as default };
|
|
1
|
+
export { tag_default as default } from '../../chunk/CJZGTNJZ.js';
|
|
@@ -1,131 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
// src/components/tag/Tag.tsx
|
|
7
|
-
import {
|
|
8
|
-
splitProps,
|
|
9
|
-
createMemo,
|
|
10
|
-
Show,
|
|
11
|
-
untrack
|
|
12
|
-
} from "solid-js";
|
|
13
|
-
|
|
14
|
-
// src/components/tag/Tag.styles.ts
|
|
15
|
-
var tagVariants = cva(
|
|
16
|
-
[
|
|
17
|
-
"inline-flex items-center gap-2 px-3 py-1 text-sm rounded",
|
|
18
|
-
"transition select-none"
|
|
19
|
-
],
|
|
20
|
-
{
|
|
21
|
-
variants: {
|
|
22
|
-
size: {
|
|
23
|
-
normal: "text-xs px-2 py-0.5",
|
|
24
|
-
medium: "text-sm px-3 py-1",
|
|
25
|
-
large: "text-base px-4 py-2"
|
|
26
|
-
},
|
|
27
|
-
type: {
|
|
28
|
-
primary: "bg-blue-500 text-white",
|
|
29
|
-
info: "bg-sky-500 text-white",
|
|
30
|
-
success: "bg-green-500 text-white",
|
|
31
|
-
warning: "bg-yellow-500 text-black",
|
|
32
|
-
danger: "bg-red-500 text-white",
|
|
33
|
-
dark: "bg-zinc-800 text-white",
|
|
34
|
-
light: "bg-gray-100 text-black"
|
|
35
|
-
},
|
|
36
|
-
rounded: {
|
|
37
|
-
true: "rounded-full",
|
|
38
|
-
false: ""
|
|
39
|
-
},
|
|
40
|
-
closable: {
|
|
41
|
-
true: "pr-1",
|
|
42
|
-
false: ""
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
defaultVariants: {
|
|
46
|
-
size: "normal"
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
);
|
|
50
|
-
|
|
51
|
-
// src/components/tag/Tag.tsx
|
|
52
|
-
var Tag = (props) => {
|
|
53
|
-
const [localProps, variantProps, otherProps] = splitProps(
|
|
54
|
-
props,
|
|
55
|
-
[
|
|
56
|
-
"closable",
|
|
57
|
-
"attached",
|
|
58
|
-
"onClose",
|
|
59
|
-
"ariaCloseLabel",
|
|
60
|
-
"closeIcon",
|
|
61
|
-
"children",
|
|
62
|
-
"type"
|
|
63
|
-
],
|
|
64
|
-
["class", ...tagVariants.variantKeys]
|
|
65
|
-
);
|
|
66
|
-
const isAttachedClosable = createMemo(
|
|
67
|
-
() => untrack(() => localProps.attached && localProps.closable)
|
|
68
|
-
);
|
|
69
|
-
const isClosable = createMemo(
|
|
70
|
-
() => untrack(() => localProps.closable && !localProps.attached)
|
|
71
|
-
);
|
|
72
|
-
const tagClasses = createMemo(
|
|
73
|
-
() => classes(
|
|
74
|
-
tagVariants({
|
|
75
|
-
...variantProps,
|
|
76
|
-
closable: localProps.closable
|
|
77
|
-
}),
|
|
78
|
-
variantProps.class
|
|
79
|
-
)
|
|
80
|
-
);
|
|
81
|
-
const attachedButtonClasses = createMemo(
|
|
82
|
-
() => tagVariants({
|
|
83
|
-
...variantProps,
|
|
84
|
-
class: "ml-1 text-xs hover:opacity-80"
|
|
85
|
-
})
|
|
86
|
-
);
|
|
87
|
-
const handleClose = (e) => {
|
|
88
|
-
untrack(() => {
|
|
89
|
-
if (typeof localProps.onClose === "function") {
|
|
90
|
-
localProps.onClose(e);
|
|
91
|
-
}
|
|
92
|
-
});
|
|
93
|
-
};
|
|
94
|
-
return <div
|
|
95
|
-
class={isAttachedClosable() ? "tags has-addons" : void 0}
|
|
96
|
-
role="group"
|
|
97
|
-
>
|
|
98
|
-
<span class={tagClasses()} role="status" {...otherProps}>
|
|
99
|
-
<span class="truncate">{localProps.children}</span>
|
|
100
|
-
|
|
101
|
-
<Show when={isClosable()}>
|
|
102
|
-
<button
|
|
103
|
-
type="button"
|
|
104
|
-
aria-label={localProps.ariaCloseLabel ?? "Remove tag"}
|
|
105
|
-
onClick={handleClose}
|
|
106
|
-
class="ml-2 text-xs text-white hover:opacity-80"
|
|
107
|
-
>
|
|
108
|
-
{localProps.closeIcon ?? "\xD7"}
|
|
109
|
-
</button>
|
|
110
|
-
</Show>
|
|
111
|
-
</span>
|
|
112
|
-
|
|
113
|
-
<Show when={isAttachedClosable()}>
|
|
114
|
-
<button
|
|
115
|
-
type="button"
|
|
116
|
-
aria-label={localProps.ariaCloseLabel ?? "Remove tag"}
|
|
117
|
-
onClick={handleClose}
|
|
118
|
-
class={attachedButtonClasses()}
|
|
119
|
-
>
|
|
120
|
-
{localProps.closeIcon ?? "\xD7"}
|
|
121
|
-
</button>
|
|
122
|
-
</Show>
|
|
123
|
-
</div>;
|
|
124
|
-
};
|
|
125
|
-
var Tag_default = Tag;
|
|
126
|
-
|
|
127
|
-
// src/components/tag/index.ts
|
|
128
|
-
var tag_default = Tag_default;
|
|
2
|
+
tag_default
|
|
3
|
+
} from "../../chunk/LI3HCFL7.jsx";
|
|
4
|
+
import "../../chunk/P7WPLZNA.jsx";
|
|
129
5
|
export {
|
|
130
6
|
tag_default as default
|
|
131
7
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { timeline_default as default } from '../../chunk/WUZETUQR.js';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as solid_js from 'solid-js';
|
|
2
|
+
|
|
3
|
+
interface ToastProps {
|
|
4
|
+
message: string;
|
|
5
|
+
type?: "success" | "error" | "info" | "warning" | "default";
|
|
6
|
+
duration?: number | false;
|
|
7
|
+
dismissible?: boolean;
|
|
8
|
+
onClose?: () => void;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
type ToastOptions = Omit<ToastProps, "message">;
|
|
12
|
+
|
|
13
|
+
declare const Toaster: () => solid_js.JSX.Element;
|
|
14
|
+
|
|
15
|
+
declare const toast: {
|
|
16
|
+
show: (message: string, options?: ToastOptions) => `${string}-${string}-${string}-${string}-${string}`;
|
|
17
|
+
success: (msg: string, opts?: ToastOptions) => `${string}-${string}-${string}-${string}-${string}`;
|
|
18
|
+
error: (msg: string, opts?: ToastOptions) => `${string}-${string}-${string}-${string}-${string}`;
|
|
19
|
+
info: (msg: string, opts?: ToastOptions) => `${string}-${string}-${string}-${string}-${string}`;
|
|
20
|
+
warning: (msg: string, opts?: ToastOptions) => `${string}-${string}-${string}-${string}-${string}`;
|
|
21
|
+
clear: () => void;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export { Toaster, toast as default, toast };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Toaster_default as Toaster, toast_default as default, toast } from '../../chunk/JWRGKHDO.js';
|