@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,124 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import {
|
|
7
|
-
splitProps,
|
|
8
|
-
children,
|
|
9
|
-
createMemo,
|
|
10
|
-
untrack
|
|
11
|
-
} from "solid-js";
|
|
12
|
-
|
|
13
|
-
// src/components/breadcrumb/Breadcrumb.styles.ts
|
|
14
|
-
var breadcrumbContainerVariants = cva(
|
|
15
|
-
["flex", "items-center", "gap-2", "text-sm"],
|
|
16
|
-
{
|
|
17
|
-
variants: {
|
|
18
|
-
alignment: {
|
|
19
|
-
left: "justify-start",
|
|
20
|
-
center: "justify-center",
|
|
21
|
-
right: "justify-end"
|
|
22
|
-
},
|
|
23
|
-
size: {
|
|
24
|
-
sm: "text-xs gap-1",
|
|
25
|
-
md: "text-sm gap-2",
|
|
26
|
-
lg: "text-base gap-3"
|
|
27
|
-
},
|
|
28
|
-
separator: {
|
|
29
|
-
arrow: "breadcrumb-arrow",
|
|
30
|
-
dot: "breadcrumb-dot",
|
|
31
|
-
bullet: "breadcrumb-bullet",
|
|
32
|
-
succeeds: "breadcrumb-succeeds"
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
defaultVariants: {
|
|
36
|
-
alignment: "left",
|
|
37
|
-
size: "md"
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
);
|
|
41
|
-
var breadcrumbItemVariants = cva(
|
|
42
|
-
["text-gray-600", "dark:text-gray-300"],
|
|
43
|
-
{
|
|
44
|
-
variants: {
|
|
45
|
-
active: {
|
|
46
|
-
true: "text-blue-600 font-semibold cursor-default",
|
|
47
|
-
false: "hover:underline"
|
|
48
|
-
}
|
|
49
|
-
},
|
|
50
|
-
defaultVariants: {
|
|
51
|
-
active: false
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
);
|
|
55
|
-
|
|
56
|
-
// src/components/breadcrumb/Breadcrumb.tsx
|
|
57
|
-
var separatorMap = {
|
|
58
|
-
arrow: "\u2192",
|
|
59
|
-
dot: "\xB7",
|
|
60
|
-
bullet: "\u2022",
|
|
61
|
-
succeeds: "\xBB"
|
|
62
|
-
};
|
|
63
|
-
var Breadcrumb = (props) => {
|
|
64
|
-
const [local, variantProps, otherProps] = splitProps(
|
|
65
|
-
props,
|
|
66
|
-
["children"],
|
|
67
|
-
["alignment", "size", "separator"]
|
|
68
|
-
);
|
|
69
|
-
const resolvedChildren = children(() => local.children);
|
|
70
|
-
const items = createMemo(() => resolvedChildren.toArray());
|
|
71
|
-
const separator = createMemo(
|
|
72
|
-
() => untrack(() => {
|
|
73
|
-
const sep = variantProps.separator;
|
|
74
|
-
return sep && separatorMap[sep] ? separatorMap[sep] : "/";
|
|
75
|
-
})
|
|
76
|
-
);
|
|
77
|
-
const containerClasses = createMemo(
|
|
78
|
-
() => breadcrumbContainerVariants(variantProps)
|
|
79
|
-
);
|
|
80
|
-
const renderItems = createMemo(() => {
|
|
81
|
-
return items().reduce((acc, item, idx) => {
|
|
82
|
-
if (idx > 0) {
|
|
83
|
-
acc.push(
|
|
84
|
-
<li class="text-gray-400 select-none" aria-hidden="true">
|
|
85
|
-
{separator()}
|
|
86
|
-
</li>
|
|
87
|
-
);
|
|
88
|
-
}
|
|
89
|
-
acc.push(
|
|
90
|
-
<li>
|
|
91
|
-
<span aria-current={idx === items().length - 1 ? "page" : void 0}>
|
|
92
|
-
{item}
|
|
93
|
-
</span>
|
|
94
|
-
</li>
|
|
95
|
-
);
|
|
96
|
-
return acc;
|
|
97
|
-
}, []);
|
|
98
|
-
});
|
|
99
|
-
return <nav class={containerClasses()} aria-label="Breadcrumb" {...otherProps}>
|
|
100
|
-
<ol class="flex items-center flex-wrap gap-1">{renderItems()}</ol>
|
|
101
|
-
</nav>;
|
|
102
|
-
};
|
|
103
|
-
var Breadcrumb_default = Breadcrumb;
|
|
104
|
-
|
|
105
|
-
// src/components/breadcrumb/BreadcrumbItem.tsx
|
|
106
|
-
import { splitProps as splitProps2 } from "solid-js";
|
|
107
|
-
var BreadcrumbItem = (props) => {
|
|
108
|
-
const [local, variantProps] = splitProps2(
|
|
109
|
-
props,
|
|
110
|
-
["children", "href", "active"],
|
|
111
|
-
["active"]
|
|
112
|
-
);
|
|
113
|
-
return <li class="flex items-center gap-1">
|
|
114
|
-
{local.href && !local.active ? <a href={local.href} class={breadcrumbItemVariants(variantProps)}>
|
|
115
|
-
{local.children}
|
|
116
|
-
</a> : <span class={breadcrumbItemVariants({ active: true })}>
|
|
117
|
-
{local.children}
|
|
118
|
-
</span>}
|
|
119
|
-
</li>;
|
|
120
|
-
};
|
|
121
|
-
var BreadcrumbItem_default = BreadcrumbItem;
|
|
2
|
+
BreadcrumbItem_default,
|
|
3
|
+
Breadcrumb_default
|
|
4
|
+
} from "../../chunk/MMTAND25.jsx";
|
|
5
|
+
import "../../chunk/P7WPLZNA.jsx";
|
|
122
6
|
export {
|
|
123
7
|
Breadcrumb_default as Breadcrumb,
|
|
124
8
|
BreadcrumbItem_default as BreadcrumbItem
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { button_default as default } from '../../chunk/
|
|
1
|
+
export { button_default as default } from '../../chunk/YMO6RPS6.js';
|
|
@@ -1,40 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { C as Checkbox } from '../../Checkbox-BjaweaOH.js';
|
|
2
|
+
export { a as CheckboxProps } from '../../Checkbox-BjaweaOH.js';
|
|
3
|
+
import 'solid-js';
|
|
4
|
+
import '../../classes-B_S9K-9I.js';
|
|
3
5
|
|
|
4
|
-
declare const checkboxVariants: {
|
|
5
|
-
(props?: (ConfigVariants<{
|
|
6
|
-
size: {
|
|
7
|
-
sm: string;
|
|
8
|
-
md: string;
|
|
9
|
-
lg: string;
|
|
10
|
-
};
|
|
11
|
-
color: {
|
|
12
|
-
primary: string;
|
|
13
|
-
success: string;
|
|
14
|
-
warning: string;
|
|
15
|
-
danger: string;
|
|
16
|
-
};
|
|
17
|
-
checked: {
|
|
18
|
-
true: string;
|
|
19
|
-
false: string;
|
|
20
|
-
};
|
|
21
|
-
indeterminate: {
|
|
22
|
-
true: string;
|
|
23
|
-
false: string;
|
|
24
|
-
};
|
|
25
|
-
}> & ClassProps) | undefined): string;
|
|
26
|
-
variantKeys: ("size" | "color" | "checked" | "indeterminate")[];
|
|
27
|
-
};
|
|
28
6
|
|
|
29
|
-
type CheckboxProps = VariantProps<typeof checkboxVariants> & ClassProps & Omit<ComponentProps<"input">, "onChange" | "onFocus" | "onBlur"> & {
|
|
30
|
-
indeterminate?: boolean;
|
|
31
|
-
label?: JSX.Element;
|
|
32
|
-
onChange?: JSX.EventHandlerUnion<HTMLInputElement, Event>;
|
|
33
|
-
onFocus?: JSX.EventHandlerUnion<HTMLInputElement, FocusEvent>;
|
|
34
|
-
onBlur?: JSX.EventHandlerUnion<HTMLInputElement, FocusEvent>;
|
|
35
|
-
"aria-label"?: string;
|
|
36
|
-
"aria-describedby"?: string;
|
|
37
|
-
};
|
|
38
|
-
declare const Checkbox: Component<CheckboxProps>;
|
|
39
7
|
|
|
40
|
-
export {
|
|
8
|
+
export { Checkbox as default };
|
|
@@ -1,137 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { template, spread, mergeProps, insert, createComponent, effect, className, setAttribute, use } from 'solid-js/web';
|
|
3
|
-
import { splitProps, createMemo, 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 cursor-pointer",
|
|
9
|
-
"select-none",
|
|
10
|
-
"disabled:cursor-not-allowed 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-primary",
|
|
21
|
-
success: "text-green-600",
|
|
22
|
-
warning: "text-yellow-600",
|
|
23
|
-
danger: "text-red-600"
|
|
24
|
-
},
|
|
25
|
-
checked: {
|
|
26
|
-
true: "",
|
|
27
|
-
false: ""
|
|
28
|
-
},
|
|
29
|
-
indeterminate: {
|
|
30
|
-
true: "",
|
|
31
|
-
false: ""
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
defaultVariants: {
|
|
35
|
-
size: "md",
|
|
36
|
-
color: "primary",
|
|
37
|
-
checked: false,
|
|
38
|
-
indeterminate: false
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
);
|
|
42
|
-
|
|
43
|
-
// src/components/checkbox/Checkbox.tsx
|
|
44
|
-
var _tmpl$ = /* @__PURE__ */ template(`<span class="absolute top-1/2 left-1/2 w-2 h-0.5 bg-white -translate-x-1/2 -translate-y-1/2"aria-hidden=true>`);
|
|
45
|
-
var _tmpl$2 = /* @__PURE__ */ template(`<span class=ml-2>`);
|
|
46
|
-
var _tmpl$3 = /* @__PURE__ */ template(`<label role=checkbox><input type=checkbox class="peer absolute opacity-0 w-4 h-4"aria-hidden=true><span>`);
|
|
47
|
-
var Checkbox = (props) => {
|
|
48
|
-
const [localProps, variantProps, otherProps] = splitProps(props, ["label", "indeterminate", "type", "onChange", "onFocus", "onBlur", "checked", "disabled", "aria-label", "aria-describedby"], ["class", ...checkboxVariants.variantKeys]);
|
|
49
|
-
let inputRef;
|
|
50
|
-
const checkboxClasses = createMemo(() => checkboxVariants(variantProps));
|
|
51
|
-
const markerClasses = createMemo(() => classes("inline-block w-4 h-4 border border-gray-400 rounded-sm peer-checked:bg-current", localProps.indeterminate ? "bg-gray-400 relative" : ""));
|
|
52
|
-
const handleChange = (e) => {
|
|
53
|
-
untrack(() => {
|
|
54
|
-
if (typeof localProps.onChange === "function") {
|
|
55
|
-
localProps.onChange(e);
|
|
56
|
-
}
|
|
57
|
-
});
|
|
58
|
-
};
|
|
59
|
-
const handleFocus = (e) => {
|
|
60
|
-
untrack(() => {
|
|
61
|
-
if (typeof localProps.onFocus === "function") {
|
|
62
|
-
localProps.onFocus(e);
|
|
63
|
-
}
|
|
64
|
-
});
|
|
65
|
-
};
|
|
66
|
-
const handleBlur = (e) => {
|
|
67
|
-
untrack(() => {
|
|
68
|
-
if (typeof localProps.onBlur === "function") {
|
|
69
|
-
localProps.onBlur(e);
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
};
|
|
73
|
-
createEffect(() => {
|
|
74
|
-
if (inputRef) {
|
|
75
|
-
untrack(() => {
|
|
76
|
-
inputRef.indeterminate = !!localProps.indeterminate;
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
});
|
|
80
|
-
return (() => {
|
|
81
|
-
var _el$ = _tmpl$3(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
|
|
82
|
-
var _ref$ = inputRef;
|
|
83
|
-
typeof _ref$ === "function" ? use(_ref$, _el$2) : inputRef = _el$2;
|
|
84
|
-
spread(_el$2, mergeProps({
|
|
85
|
-
get checked() {
|
|
86
|
-
return localProps.checked;
|
|
87
|
-
},
|
|
88
|
-
get disabled() {
|
|
89
|
-
return localProps.disabled;
|
|
90
|
-
}
|
|
91
|
-
}, otherProps, {
|
|
92
|
-
"onChange": handleChange,
|
|
93
|
-
"onFocus": handleFocus,
|
|
94
|
-
"onBlur": handleBlur
|
|
95
|
-
}), false, false);
|
|
96
|
-
insert(_el$3, createComponent(Show, {
|
|
97
|
-
get when() {
|
|
98
|
-
return localProps.indeterminate;
|
|
99
|
-
},
|
|
100
|
-
get children() {
|
|
101
|
-
return _tmpl$();
|
|
102
|
-
}
|
|
103
|
-
}));
|
|
104
|
-
insert(_el$, createComponent(Show, {
|
|
105
|
-
get when() {
|
|
106
|
-
return localProps.label;
|
|
107
|
-
},
|
|
108
|
-
get children() {
|
|
109
|
-
var _el$5 = _tmpl$2();
|
|
110
|
-
insert(_el$5, () => localProps.label);
|
|
111
|
-
return _el$5;
|
|
112
|
-
}
|
|
113
|
-
}), null);
|
|
114
|
-
effect((_p$) => {
|
|
115
|
-
var _v$ = checkboxClasses(), _v$2 = localProps.indeterminate ? "mixed" : localProps.checked, _v$3 = localProps["aria-label"], _v$4 = localProps["aria-describedby"], _v$5 = markerClasses();
|
|
116
|
-
_v$ !== _p$.e && className(_el$, _p$.e = _v$);
|
|
117
|
-
_v$2 !== _p$.t && setAttribute(_el$, "aria-checked", _p$.t = _v$2);
|
|
118
|
-
_v$3 !== _p$.a && setAttribute(_el$, "aria-label", _p$.a = _v$3);
|
|
119
|
-
_v$4 !== _p$.o && setAttribute(_el$, "aria-describedby", _p$.o = _v$4);
|
|
120
|
-
_v$5 !== _p$.i && className(_el$3, _p$.i = _v$5);
|
|
121
|
-
return _p$;
|
|
122
|
-
}, {
|
|
123
|
-
e: void 0,
|
|
124
|
-
t: void 0,
|
|
125
|
-
a: void 0,
|
|
126
|
-
o: void 0,
|
|
127
|
-
i: void 0
|
|
128
|
-
});
|
|
129
|
-
return _el$;
|
|
130
|
-
})();
|
|
131
|
-
};
|
|
132
|
-
var Checkbox_default = Checkbox;
|
|
133
|
-
|
|
134
|
-
// src/components/checkbox/index.ts
|
|
135
|
-
var checkbox_default = Checkbox_default;
|
|
136
|
-
|
|
137
|
-
export { checkbox_default as default };
|
|
1
|
+
export { checkbox_default as default } from '../../chunk/FPUQ25SO.js';
|
|
@@ -1,147 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
// src/components/checkbox/Checkbox.tsx
|
|
7
|
-
import {
|
|
8
|
-
splitProps,
|
|
9
|
-
Show,
|
|
10
|
-
createEffect,
|
|
11
|
-
createMemo,
|
|
12
|
-
untrack
|
|
13
|
-
} from "solid-js";
|
|
14
|
-
|
|
15
|
-
// src/components/checkbox/Checkbox.styles.ts
|
|
16
|
-
var checkboxVariants = cva(
|
|
17
|
-
[
|
|
18
|
-
"relative inline-flex items-center gap-2 cursor-pointer",
|
|
19
|
-
"select-none",
|
|
20
|
-
"disabled:cursor-not-allowed disabled:opacity-50"
|
|
21
|
-
],
|
|
22
|
-
{
|
|
23
|
-
variants: {
|
|
24
|
-
size: {
|
|
25
|
-
sm: "text-sm",
|
|
26
|
-
md: "text-base",
|
|
27
|
-
lg: "text-lg"
|
|
28
|
-
},
|
|
29
|
-
color: {
|
|
30
|
-
primary: "text-primary",
|
|
31
|
-
success: "text-green-600",
|
|
32
|
-
warning: "text-yellow-600",
|
|
33
|
-
danger: "text-red-600"
|
|
34
|
-
},
|
|
35
|
-
checked: {
|
|
36
|
-
true: "",
|
|
37
|
-
false: ""
|
|
38
|
-
},
|
|
39
|
-
indeterminate: {
|
|
40
|
-
true: "",
|
|
41
|
-
false: ""
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
|
-
defaultVariants: {
|
|
45
|
-
size: "md",
|
|
46
|
-
color: "primary",
|
|
47
|
-
checked: false,
|
|
48
|
-
indeterminate: false
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
);
|
|
52
|
-
|
|
53
|
-
// src/components/checkbox/Checkbox.tsx
|
|
54
|
-
var Checkbox = (props) => {
|
|
55
|
-
const [localProps, variantProps, otherProps] = splitProps(
|
|
56
|
-
props,
|
|
57
|
-
[
|
|
58
|
-
"label",
|
|
59
|
-
"indeterminate",
|
|
60
|
-
"type",
|
|
61
|
-
"onChange",
|
|
62
|
-
"onFocus",
|
|
63
|
-
"onBlur",
|
|
64
|
-
"checked",
|
|
65
|
-
"disabled",
|
|
66
|
-
"aria-label",
|
|
67
|
-
"aria-describedby"
|
|
68
|
-
],
|
|
69
|
-
["class", ...checkboxVariants.variantKeys]
|
|
70
|
-
);
|
|
71
|
-
let inputRef;
|
|
72
|
-
const checkboxClasses = createMemo(() => checkboxVariants(variantProps));
|
|
73
|
-
const markerClasses = createMemo(
|
|
74
|
-
() => classes(
|
|
75
|
-
"inline-block w-4 h-4 border border-gray-400 rounded-sm peer-checked:bg-current",
|
|
76
|
-
localProps.indeterminate ? "bg-gray-400 relative" : ""
|
|
77
|
-
)
|
|
78
|
-
);
|
|
79
|
-
const handleChange = (e) => {
|
|
80
|
-
untrack(() => {
|
|
81
|
-
if (typeof localProps.onChange === "function") {
|
|
82
|
-
localProps.onChange(e);
|
|
83
|
-
}
|
|
84
|
-
});
|
|
85
|
-
};
|
|
86
|
-
const handleFocus = (e) => {
|
|
87
|
-
untrack(() => {
|
|
88
|
-
if (typeof localProps.onFocus === "function") {
|
|
89
|
-
localProps.onFocus(e);
|
|
90
|
-
}
|
|
91
|
-
});
|
|
92
|
-
};
|
|
93
|
-
const handleBlur = (e) => {
|
|
94
|
-
untrack(() => {
|
|
95
|
-
if (typeof localProps.onBlur === "function") {
|
|
96
|
-
localProps.onBlur(e);
|
|
97
|
-
}
|
|
98
|
-
});
|
|
99
|
-
};
|
|
100
|
-
createEffect(() => {
|
|
101
|
-
if (inputRef) {
|
|
102
|
-
untrack(() => {
|
|
103
|
-
inputRef.indeterminate = !!localProps.indeterminate;
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
|
-
});
|
|
107
|
-
return <label
|
|
108
|
-
class={checkboxClasses()}
|
|
109
|
-
role="checkbox"
|
|
110
|
-
aria-checked={localProps.indeterminate ? "mixed" : localProps.checked}
|
|
111
|
-
aria-label={localProps["aria-label"]}
|
|
112
|
-
aria-describedby={localProps["aria-describedby"]}
|
|
113
|
-
>
|
|
114
|
-
<input
|
|
115
|
-
ref={inputRef}
|
|
116
|
-
type="checkbox"
|
|
117
|
-
class="peer absolute opacity-0 w-4 h-4"
|
|
118
|
-
checked={localProps.checked}
|
|
119
|
-
disabled={localProps.disabled}
|
|
120
|
-
aria-hidden="true"
|
|
121
|
-
{...otherProps}
|
|
122
|
-
onChange={handleChange}
|
|
123
|
-
onFocus={handleFocus}
|
|
124
|
-
onBlur={handleBlur}
|
|
125
|
-
/>
|
|
126
|
-
|
|
127
|
-
<span class={markerClasses()}>
|
|
128
|
-
<Show when={localProps.indeterminate}>
|
|
129
|
-
<span
|
|
130
|
-
class="absolute top-1/2 left-1/2 w-2 h-0.5 bg-white -translate-x-1/2 -translate-y-1/2"
|
|
131
|
-
aria-hidden="true"
|
|
132
|
-
/>
|
|
133
|
-
</Show>
|
|
134
|
-
</span>
|
|
135
|
-
|
|
136
|
-
<Show when={localProps.label}>
|
|
137
|
-
<span class="ml-2">{localProps.label}</span>
|
|
138
|
-
</Show>
|
|
139
|
-
</label>;
|
|
140
|
-
};
|
|
141
|
-
var Checkbox_default = Checkbox;
|
|
142
|
-
|
|
143
|
-
// src/components/checkbox/index.ts
|
|
144
|
-
var checkbox_default = Checkbox_default;
|
|
2
|
+
checkbox_default
|
|
3
|
+
} from "../../chunk/MXG3MBEN.jsx";
|
|
4
|
+
import "../../chunk/P7WPLZNA.jsx";
|
|
145
5
|
export {
|
|
146
6
|
checkbox_default as default
|
|
147
7
|
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Component, JSX, ComponentProps } from 'solid-js';
|
|
2
|
+
import { C as ConfigVariants, a as ClassProps, V as VariantProps } from '../../classes-B_S9K-9I.js';
|
|
3
|
+
|
|
4
|
+
declare const dropdownVariants: {
|
|
5
|
+
(props?: (ConfigVariants<{
|
|
6
|
+
position: {
|
|
7
|
+
"bottom-left": string;
|
|
8
|
+
"bottom-right": string;
|
|
9
|
+
"top-left": string;
|
|
10
|
+
"top-right": string;
|
|
11
|
+
};
|
|
12
|
+
open: {
|
|
13
|
+
true: string;
|
|
14
|
+
false: string;
|
|
15
|
+
};
|
|
16
|
+
}> & ClassProps) | undefined): string;
|
|
17
|
+
variantKeys: ("open" | "position")[];
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
type DropdownProps = {
|
|
21
|
+
label?: string | JSX.Element;
|
|
22
|
+
disabledLabel?: string | JSX.Element;
|
|
23
|
+
trigger?: "click" | "hover";
|
|
24
|
+
children: JSX.Element;
|
|
25
|
+
color?: "primary" | "secondary" | "default";
|
|
26
|
+
disabled?: boolean;
|
|
27
|
+
className?: string;
|
|
28
|
+
} & VariantProps<typeof dropdownVariants> & ClassProps & ComponentProps<"div">;
|
|
29
|
+
declare const Dropdown: Component<DropdownProps>;
|
|
30
|
+
|
|
31
|
+
interface DropdownItemProps {
|
|
32
|
+
hasLink?: boolean;
|
|
33
|
+
children: JSX.Element;
|
|
34
|
+
}
|
|
35
|
+
declare const DropdownItem: Component<DropdownItemProps>;
|
|
36
|
+
|
|
37
|
+
interface DropdownMenuProps extends VariantProps<typeof dropdownVariants>, // open + position only
|
|
38
|
+
JSX.HTMLAttributes<HTMLDivElement> {
|
|
39
|
+
children: JSX.Element;
|
|
40
|
+
}
|
|
41
|
+
declare const DropdownMenu: Component<DropdownMenuProps>;
|
|
42
|
+
|
|
43
|
+
export { Dropdown, DropdownItem, DropdownMenu };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Dropdown_default as Dropdown, DropdownItem_default as DropdownItem, DropdownMenu_default as DropdownMenu } from '../../chunk/7ROVLN3J.js';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DropdownItem_default,
|
|
3
|
+
DropdownMenu_default,
|
|
4
|
+
Dropdown_default
|
|
5
|
+
} from "../../chunk/D2BEL4SM.jsx";
|
|
6
|
+
import "../../chunk/YAQK2KFY.jsx";
|
|
7
|
+
import "../../chunk/P7WPLZNA.jsx";
|
|
8
|
+
export {
|
|
9
|
+
Dropdown_default as Dropdown,
|
|
10
|
+
DropdownItem_default as DropdownItem,
|
|
11
|
+
DropdownMenu_default as DropdownMenu
|
|
12
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { field_default as default } from '../../chunk/MAX47D6F.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { I as Input } from '../../Input-
|
|
2
|
-
export { a as InputProps } from '../../Input-
|
|
1
|
+
import { I as Input } from '../../Input-C1bm4HGf.js';
|
|
2
|
+
export { a as InputProps } from '../../Input-C1bm4HGf.js';
|
|
3
3
|
import 'solid-js';
|
|
4
4
|
import '../../classes-B_S9K-9I.js';
|
|
5
5
|
|
|
@@ -0,0 +1,66 @@
|
|
|
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 menuWrapper: {
|
|
5
|
+
(props?: (ConfigVariants<{
|
|
6
|
+
inline: {
|
|
7
|
+
true: string;
|
|
8
|
+
false: string;
|
|
9
|
+
};
|
|
10
|
+
}> & ClassProps) | undefined): string;
|
|
11
|
+
variantKeys: "inline"[];
|
|
12
|
+
};
|
|
13
|
+
declare const listWrapper: {
|
|
14
|
+
(props?: (ConfigVariants<{
|
|
15
|
+
label: {
|
|
16
|
+
true: string;
|
|
17
|
+
false: string;
|
|
18
|
+
};
|
|
19
|
+
}> & ClassProps) | undefined): string;
|
|
20
|
+
variantKeys: "label"[];
|
|
21
|
+
};
|
|
22
|
+
declare const itemVariants: {
|
|
23
|
+
(props?: (ConfigVariants<{
|
|
24
|
+
active: {
|
|
25
|
+
true: string;
|
|
26
|
+
false: string;
|
|
27
|
+
};
|
|
28
|
+
expanded: {
|
|
29
|
+
true: string;
|
|
30
|
+
false: string;
|
|
31
|
+
};
|
|
32
|
+
disabled: {
|
|
33
|
+
true: string;
|
|
34
|
+
false: string;
|
|
35
|
+
};
|
|
36
|
+
}> & ClassProps) | undefined): string;
|
|
37
|
+
variantKeys: ("expanded" | "disabled" | "active")[];
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
type MenuProps = {
|
|
41
|
+
inline?: boolean;
|
|
42
|
+
className?: string;
|
|
43
|
+
children: JSX.Element;
|
|
44
|
+
} & VariantProps<typeof menuWrapper> & ClassProps;
|
|
45
|
+
declare const Menu: Component<MenuProps>;
|
|
46
|
+
|
|
47
|
+
type MenuListProps = {
|
|
48
|
+
label?: string;
|
|
49
|
+
children: JSX.Element;
|
|
50
|
+
} & VariantProps<typeof listWrapper> & ClassProps;
|
|
51
|
+
declare const MenuList: Component<MenuListProps>;
|
|
52
|
+
|
|
53
|
+
type MenuItemProps = {
|
|
54
|
+
label: string;
|
|
55
|
+
active?: boolean;
|
|
56
|
+
expanded?: boolean;
|
|
57
|
+
disabled?: boolean;
|
|
58
|
+
className?: string;
|
|
59
|
+
tag?: keyof JSX.IntrinsicElements;
|
|
60
|
+
to?: string;
|
|
61
|
+
target?: string;
|
|
62
|
+
children?: JSX.Element;
|
|
63
|
+
} & VariantProps<typeof itemVariants> & ClassProps & Omit<JSX.HTMLAttributes<HTMLElement>, "children">;
|
|
64
|
+
declare const MenuItem: Component<MenuItemProps>;
|
|
65
|
+
|
|
66
|
+
export { Menu, MenuItem, MenuList };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Menu_default as Menu, MenuItem_default as MenuItem, MenuList_default as MenuList } from '../../chunk/3VOILEMN.js';
|