@balikjs/mobile 0.1.10 → 0.1.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Alert/Alert.module.css.js +18 -18
- package/dist/Avatar/Avatar.module.css.js +16 -16
- package/dist/BackToTop/BackToTop.module.css.js +6 -6
- package/dist/Badge/Badge.js +44 -43
- package/dist/Badge/Badge.module.css.js +36 -42
- package/dist/BottomNavigation/BottomNavigation.module.css.js +6 -6
- package/dist/BottomSheet/BottomSheet.js +61 -78
- package/dist/BottomSheet/BottomSheet.module.css.js +14 -20
- package/dist/Button/Button.js +29 -24
- package/dist/Button/Button.module.css.js +21 -19
- package/dist/Card/Card.module.css.js +1 -1
- package/dist/Checkbox/Checkbox.module.css.js +13 -13
- package/dist/Clipboard/Clipboard.js +31 -26
- package/dist/Clipboard/Clipboard.module.css.js +16 -16
- package/dist/CloseButton/CloseButton.js +1 -2
- package/dist/CloseButton/CloseButton.module.css.js +12 -12
- package/dist/Confirm/Confirm.js +31 -24
- package/dist/DatePicker/DatePicker.js +71 -59
- package/dist/DatePicker/DatePicker.module.css.js +36 -24
- package/dist/Dialog/Dialog.js +79 -63
- package/dist/Dialog/Dialog.module.css.js +16 -14
- package/dist/Divider/Divider.module.css.js +2 -2
- package/dist/Drawer/Drawer.module.css.js +2 -2
- package/dist/Fab/Fab.module.css.js +16 -16
- package/dist/Field/Field.module.css.js +14 -14
- package/dist/Fieldset/Fieldset.module.css.js +1 -1
- package/dist/FileUpload/FileUpload.module.css.js +26 -26
- package/dist/FilterGroup/FilterGroup.js +61 -58
- package/dist/FilterGroup/FilterGroup.module.css.js +12 -20
- package/dist/Input/Input.js +62 -40
- package/dist/Input/Input.module.css.js +36 -30
- package/dist/Link/Link.module.css.js +1 -1
- package/dist/MoneyInput/MoneyInput.module.css.js +6 -6
- package/dist/Pagination/Pagination.module.css.js +1 -1
- package/dist/Picker/Picker.module.css.js +8 -8
- package/dist/PickerView/PickerView.module.css.js +16 -16
- package/dist/PinInput/PinInput.module.css.js +14 -14
- package/dist/Popover/Popover.module.css.js +10 -10
- package/dist/Progress/Progress.module.css.js +14 -14
- package/dist/QrCode/QrCode.module.css.js +6 -6
- package/dist/RadioGroup/Radio.module.css.js +18 -18
- package/dist/RatingGroup/RatingGroup.js +6 -6
- package/dist/RatingGroup/RatingGroup.module.css.js +6 -6
- package/dist/SearchInput/SearchInput.module.css.js +1 -1
- package/dist/Select/Select.js +45 -44
- package/dist/Select/Select.module.css.js +20 -18
- package/dist/SelectPc/Select.js +50 -44
- package/dist/SelectPc/SelectPc.module.css.js +34 -28
- package/dist/SignaturePad/SignaturePad.js +116 -0
- package/dist/SignaturePad/SignaturePad.module.css.js +15 -0
- package/dist/Slider/Slider.module.css.js +10 -10
- package/dist/Spinner/Spinner.module.css.js +4 -4
- package/dist/Steps/Steps.js +87 -77
- package/dist/Steps/Steps.module.css.js +20 -22
- package/dist/StickyHeader/StickyHeader.module.css.js +2 -2
- package/dist/Switch/Switch.js +22 -18
- package/dist/Switch/Switch.module.css.js +22 -20
- package/dist/Tabs/Tabs.module.css.js +6 -6
- package/dist/Tag/Tag.js +34 -26
- package/dist/Tag/Tag.module.css.js +36 -32
- package/dist/Textarea/Textarea.module.css.js +10 -10
- package/dist/Toast/Toast.module.css.js +30 -30
- package/dist/Toggle/Toggle.module.css.js +1 -1
- package/dist/ToggleGroup/ToggleGroup.js +36 -21
- package/dist/ToggleGroup/ToggleGroup.module.css.js +22 -16
- package/dist/index.js +143 -135
- package/dist/styles.css +1 -1
- package/package.json +4 -1
|
@@ -1,29 +1,41 @@
|
|
|
1
|
-
const e = "
|
|
1
|
+
const e = "_trigger_1po9a_1", _ = "_sizeXs_1po9a_23", o = "_sizeSm_1po9a_32", t = "_sizeMd_1po9a_41", s = "_sizeLg_1po9a_50", r = "_sizeXl_1po9a_59", i = "_triggerDisabled_1po9a_78", a = "_invalid_1po9a_83", g = "_triggerText_1po9a_91", c = "_triggerPlaceholder_1po9a_99", n = "_triggerIcon_1po9a_103", d = "_pickerBody_1po9a_112", l = "_sheet_1po9a_119", p = "_header_1po9a_123", h = "_headerTitle_1po9a_136", z = "_headerButton_1po9a_152", u = "_columns_1po9a_163", y = "_weekday_1po9a_167", k = {
|
|
2
2
|
trigger: e,
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
3
|
+
sizeXs: _,
|
|
4
|
+
sizeSm: o,
|
|
5
|
+
sizeMd: t,
|
|
6
|
+
sizeLg: s,
|
|
7
|
+
sizeXl: r,
|
|
8
|
+
triggerDisabled: i,
|
|
9
|
+
invalid: a,
|
|
10
|
+
triggerText: g,
|
|
11
|
+
triggerPlaceholder: c,
|
|
12
|
+
triggerIcon: n,
|
|
13
|
+
pickerBody: d,
|
|
14
|
+
sheet: l,
|
|
15
|
+
header: p,
|
|
16
|
+
headerTitle: h,
|
|
17
|
+
headerButton: z,
|
|
18
|
+
columns: u,
|
|
19
|
+
weekday: y
|
|
14
20
|
};
|
|
15
21
|
export {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
22
|
+
u as columns,
|
|
23
|
+
k as default,
|
|
24
|
+
p as header,
|
|
25
|
+
z as headerButton,
|
|
26
|
+
h as headerTitle,
|
|
27
|
+
a as invalid,
|
|
28
|
+
d as pickerBody,
|
|
29
|
+
l as sheet,
|
|
30
|
+
s as sizeLg,
|
|
31
|
+
t as sizeMd,
|
|
32
|
+
o as sizeSm,
|
|
33
|
+
r as sizeXl,
|
|
34
|
+
_ as sizeXs,
|
|
23
35
|
e as trigger,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
36
|
+
i as triggerDisabled,
|
|
37
|
+
n as triggerIcon,
|
|
38
|
+
c as triggerPlaceholder,
|
|
39
|
+
g as triggerText,
|
|
40
|
+
y as weekday
|
|
29
41
|
};
|
package/dist/Dialog/Dialog.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { insert as u, createComponent as o, effect as
|
|
2
|
-
import { splitProps as
|
|
3
|
-
import { Dialog as
|
|
1
|
+
import { insert as u, createComponent as o, effect as m, className as g, mergeProps as D, Portal as E, memo as a, template as p } from "solid-js/web";
|
|
2
|
+
import { splitProps as L, mergeProps as S, createEffect as z, on as M, Show as b } from "solid-js";
|
|
3
|
+
import { Dialog as i } from "@ark-ui/solid";
|
|
4
4
|
import { CloseButton as x } from "../CloseButton/CloseButton.js";
|
|
5
|
-
import { cn as
|
|
6
|
-
import { bem as
|
|
7
|
-
import { Button as
|
|
8
|
-
import
|
|
9
|
-
var
|
|
10
|
-
const
|
|
5
|
+
import { cn as c } from "../utils/cn.js";
|
|
6
|
+
import { bem as T } from "../utils/bem.js";
|
|
7
|
+
import { Button as w } from "../Button/Button.js";
|
|
8
|
+
import n from "./Dialog.module.css.js";
|
|
9
|
+
var N = /* @__PURE__ */ p("<div data-scope=dialog data-part=footer>"), R = /* @__PURE__ */ p("<div data-scope=dialog data-part=body>"), q = /* @__PURE__ */ p("<div data-scope=dialog data-part=header>");
|
|
10
|
+
const A = {
|
|
11
11
|
mode: "sheet",
|
|
12
12
|
modal: !0,
|
|
13
13
|
lazyMount: !0,
|
|
@@ -22,63 +22,70 @@ const $ = {
|
|
|
22
22
|
danger: !1,
|
|
23
23
|
backdropDismissible: !0
|
|
24
24
|
};
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
25
|
+
let O = !1;
|
|
26
|
+
function F(v) {
|
|
27
|
+
const [e, P] = L(S(A, v), ["mode", "onOpen", "onClose", "onOpenChange", "title", "closeable", "lazyMount", "unmountOnExit", "showCancel", "showConfirm", "cancelLabel", "confirmLabel", "onCancel", "onConfirm", "loading", "danger", "backdropDismissible", "backdropBlur", "modal", "defaultOpen", "footerClass", "footerPlacement", "class", "children"]), l = e.mode === "modal", f = () => e.open !== void 0, k = (t) => {
|
|
28
|
+
var r, s, d, C;
|
|
29
|
+
t.open ? f() || (r = e.onOpen) == null || r.call(e) : ((s = e.onCancel) == null || s.call(e), f() || (d = e.onClose) == null || d.call(e)), (C = e.onOpenChange) == null || C.call(e, t);
|
|
30
|
+
};
|
|
31
|
+
z(M(() => e.open, (t, r) => {
|
|
32
|
+
var s, d;
|
|
33
|
+
r === void 0 || t === r || (t ? (s = e.onOpen) == null || s.call(e) : (d = e.onClose) == null || d.call(e));
|
|
34
|
+
}));
|
|
35
|
+
const $ = () => {
|
|
36
|
+
var t, r;
|
|
37
|
+
(t = e.onCancel) == null || t.call(e), (r = e.onOpenChange) == null || r.call(e, {
|
|
35
38
|
open: !1
|
|
36
|
-
})
|
|
37
|
-
},
|
|
38
|
-
var
|
|
39
|
-
(
|
|
40
|
-
},
|
|
41
|
-
|
|
42
|
-
|
|
39
|
+
});
|
|
40
|
+
}, B = () => {
|
|
41
|
+
var t;
|
|
42
|
+
(t = e.onConfirm) == null || t.call(e);
|
|
43
|
+
}, _ = e.showCancel !== e.showConfirm, y = () => !!e.title || l && e.closeable && !e.loading;
|
|
44
|
+
!l && !e.title && !O && (O = !0, console.warn("[Dialog] sheet mode requires a title; use BottomSheet for header-less content."));
|
|
45
|
+
const h = (() => {
|
|
46
|
+
var t = N();
|
|
47
|
+
return u(t, o(b, {
|
|
43
48
|
get when() {
|
|
44
49
|
return e.showCancel;
|
|
45
50
|
},
|
|
46
51
|
get children() {
|
|
47
|
-
return o(
|
|
52
|
+
return o(w, {
|
|
48
53
|
size: "sm",
|
|
54
|
+
"data-part": "negative-trigger",
|
|
49
55
|
get disabled() {
|
|
50
56
|
return e.loading;
|
|
51
57
|
},
|
|
52
|
-
onClick:
|
|
58
|
+
onClick: $,
|
|
53
59
|
get children() {
|
|
54
60
|
return e.cancelLabel;
|
|
55
61
|
}
|
|
56
62
|
});
|
|
57
63
|
}
|
|
58
|
-
}), null), u(
|
|
64
|
+
}), null), u(t, o(b, {
|
|
59
65
|
get when() {
|
|
60
66
|
return e.showConfirm;
|
|
61
67
|
},
|
|
62
68
|
get children() {
|
|
63
|
-
return o(
|
|
69
|
+
return o(w, {
|
|
64
70
|
size: "sm",
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
71
|
+
variant: "solid",
|
|
72
|
+
"data-part": "positive-trigger",
|
|
73
|
+
get intent() {
|
|
74
|
+
return e.danger ? "danger" : "default";
|
|
68
75
|
},
|
|
69
76
|
get loading() {
|
|
70
77
|
return e.loading;
|
|
71
78
|
},
|
|
72
|
-
onClick:
|
|
79
|
+
onClick: B,
|
|
73
80
|
get children() {
|
|
74
81
|
return e.confirmLabel;
|
|
75
82
|
}
|
|
76
83
|
});
|
|
77
84
|
}
|
|
78
|
-
}), null),
|
|
85
|
+
}), null), m(() => g(t, c(n.footer, _ && n.footerSingle, e.footerClass))), t;
|
|
79
86
|
})();
|
|
80
|
-
return o(
|
|
81
|
-
onOpenChange:
|
|
87
|
+
return o(i.Root, D(P, {
|
|
88
|
+
onOpenChange: k,
|
|
82
89
|
get modal() {
|
|
83
90
|
return e.modal;
|
|
84
91
|
},
|
|
@@ -89,44 +96,53 @@ function v(b) {
|
|
|
89
96
|
return e.unmountOnExit;
|
|
90
97
|
},
|
|
91
98
|
get closeOnInteractOutside() {
|
|
92
|
-
return
|
|
99
|
+
return a(() => !!e.backdropDismissible)() && !e.loading;
|
|
93
100
|
},
|
|
94
101
|
get children() {
|
|
95
|
-
return o(
|
|
102
|
+
return o(E, {
|
|
96
103
|
get mount() {
|
|
97
104
|
return document.body;
|
|
98
105
|
},
|
|
99
106
|
get children() {
|
|
100
|
-
return [o(
|
|
107
|
+
return [o(i.Backdrop, {
|
|
101
108
|
get class() {
|
|
102
|
-
return
|
|
109
|
+
return c(n.backdrop, e.backdropBlur && n.blurred);
|
|
103
110
|
}
|
|
104
|
-
}), o(
|
|
111
|
+
}), o(i.Positioner, {
|
|
105
112
|
get class() {
|
|
106
|
-
return
|
|
113
|
+
return c(n.positioner, !l && n.positionerSheet);
|
|
107
114
|
},
|
|
108
115
|
get children() {
|
|
109
|
-
return o(
|
|
116
|
+
return o(i.Content, {
|
|
110
117
|
get class() {
|
|
111
|
-
return
|
|
118
|
+
return c(T(), n.content, l ? n.contentModal : n.contentSheet, e.class);
|
|
112
119
|
},
|
|
113
120
|
get children() {
|
|
114
|
-
return [
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
121
|
+
return [a(() => a(() => !!y())() && (() => {
|
|
122
|
+
var t = q();
|
|
123
|
+
return u(t, (() => {
|
|
124
|
+
var r = a(() => !!e.title);
|
|
125
|
+
return () => r() && o(i.Title, {
|
|
126
|
+
get class() {
|
|
127
|
+
return n.title;
|
|
128
|
+
},
|
|
129
|
+
get children() {
|
|
130
|
+
return e.title;
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
})(), null), u(t, (() => {
|
|
134
|
+
var r = a(() => !!(l && e.closeable && !e.loading));
|
|
135
|
+
return () => r() && o(i.CloseTrigger, {
|
|
136
|
+
asChild: x,
|
|
137
|
+
get class() {
|
|
138
|
+
return n.close;
|
|
139
|
+
}
|
|
140
|
+
});
|
|
141
|
+
})(), null), m(() => g(t, n.header)), t;
|
|
142
|
+
})()), a(() => e.footerPlacement === "top" && (e.showCancel || e.showConfirm) && h), (() => {
|
|
143
|
+
var t = R();
|
|
144
|
+
return u(t, () => e.children), m(() => g(t, n.body)), t;
|
|
145
|
+
})(), a(() => e.footerPlacement !== "top" && (e.showCancel || e.showConfirm) && h)];
|
|
130
146
|
}
|
|
131
147
|
});
|
|
132
148
|
}
|
|
@@ -136,7 +152,7 @@ function v(b) {
|
|
|
136
152
|
}
|
|
137
153
|
}));
|
|
138
154
|
}
|
|
139
|
-
|
|
155
|
+
F.Original = i;
|
|
140
156
|
export {
|
|
141
|
-
|
|
157
|
+
F as Dialog
|
|
142
158
|
};
|
|
@@ -1,29 +1,31 @@
|
|
|
1
|
-
const o = "
|
|
1
|
+
const o = "_backdrop_8f5qn_1", t = "_blurred_8f5qn_11", e = "_positioner_8f5qn_27", n = "_positionerSheet_8f5qn_38", _ = "_content_8f5qn_44", c = "_contentModal_8f5qn_54", s = "_contentSheet_8f5qn_87", r = "_header_8f5qn_104", f = "_title_8f5qn_113", i = "_body_8f5qn_122", l = "_footer_8f5qn_129", d = "_footerSingle_8f5qn_139", q = "_close_8f5qn_143", a = {
|
|
2
2
|
backdrop: o,
|
|
3
3
|
blurred: t,
|
|
4
4
|
positioner: e,
|
|
5
5
|
positionerSheet: n,
|
|
6
6
|
content: _,
|
|
7
7
|
contentModal: c,
|
|
8
|
-
contentSheet:
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
contentSheet: s,
|
|
9
|
+
header: r,
|
|
10
|
+
title: f,
|
|
11
|
+
body: i,
|
|
12
|
+
footer: l,
|
|
13
|
+
footerSingle: d,
|
|
14
|
+
close: q
|
|
14
15
|
};
|
|
15
16
|
export {
|
|
16
17
|
o as backdrop,
|
|
17
18
|
t as blurred,
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
i as body,
|
|
20
|
+
q as close,
|
|
20
21
|
_ as content,
|
|
21
22
|
c as contentModal,
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
s as contentSheet,
|
|
24
|
+
a as default,
|
|
25
|
+
l as footer,
|
|
26
|
+
d as footerSingle,
|
|
27
|
+
r as header,
|
|
26
28
|
e as positioner,
|
|
27
29
|
n as positionerSheet,
|
|
28
|
-
|
|
30
|
+
f as title
|
|
29
31
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const e = "
|
|
1
|
+
const e = "_backdrop_1mqck_1", t = "_panel_1mqck_17", _ = "_sideLeft_1mqck_36", c = "_sideRight_1mqck_46", s = "_header_1mqck_56", d = "_title_1mqck_64", o = "_body_1mqck_72", i = {
|
|
2
2
|
backdrop: e,
|
|
3
3
|
panel: t,
|
|
4
4
|
sideLeft: _,
|
|
@@ -10,7 +10,7 @@ const e = "_backdrop_c5zjb_1", t = "_panel_c5zjb_17", _ = "_sideLeft_c5zjb_36",
|
|
|
10
10
|
export {
|
|
11
11
|
e as backdrop,
|
|
12
12
|
o as body,
|
|
13
|
-
|
|
13
|
+
i as default,
|
|
14
14
|
s as header,
|
|
15
15
|
t as panel,
|
|
16
16
|
_ as sideLeft,
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
const
|
|
2
|
-
base:
|
|
3
|
-
icon:
|
|
4
|
-
groupContent:
|
|
5
|
-
items:
|
|
6
|
-
item:
|
|
7
|
-
itemIcon:
|
|
8
|
-
itemLabel:
|
|
1
|
+
const t = "_base_abatn_1", n = "_icon_abatn_28", e = "_groupContent_abatn_41", a = "_items_abatn_49", o = "_item_abatn_49", _ = "_itemIcon_abatn_79", s = "_itemLabel_abatn_92", i = {
|
|
2
|
+
base: t,
|
|
3
|
+
icon: n,
|
|
4
|
+
groupContent: e,
|
|
5
|
+
items: a,
|
|
6
|
+
item: o,
|
|
7
|
+
itemIcon: _,
|
|
8
|
+
itemLabel: s
|
|
9
9
|
};
|
|
10
10
|
export {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
11
|
+
t as base,
|
|
12
|
+
i as default,
|
|
13
|
+
e as groupContent,
|
|
14
|
+
n as icon,
|
|
15
|
+
o as item,
|
|
16
|
+
_ as itemIcon,
|
|
17
|
+
s as itemLabel,
|
|
18
|
+
a as items
|
|
19
19
|
};
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
const e = "
|
|
1
|
+
const e = "_root_gmnym_1", t = "_compact_gmnym_7", o = "_label_gmnym_15", r = "_compactLabel_gmnym_21", _ = "_inputWrap_gmnym_26", m = "_required_gmnym_34", c = "_errorText_gmnym_39", n = "_helperText_gmnym_46", a = {
|
|
2
2
|
root: e,
|
|
3
3
|
compact: t,
|
|
4
|
-
label:
|
|
5
|
-
compactLabel:
|
|
6
|
-
inputWrap:
|
|
7
|
-
required:
|
|
8
|
-
errorText:
|
|
9
|
-
helperText:
|
|
4
|
+
label: o,
|
|
5
|
+
compactLabel: r,
|
|
6
|
+
inputWrap: _,
|
|
7
|
+
required: m,
|
|
8
|
+
errorText: c,
|
|
9
|
+
helperText: n
|
|
10
10
|
};
|
|
11
11
|
export {
|
|
12
12
|
t as compact,
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
13
|
+
r as compactLabel,
|
|
14
|
+
a as default,
|
|
15
|
+
c as errorText,
|
|
16
|
+
n as helperText,
|
|
17
|
+
_ as inputWrap,
|
|
18
|
+
o as label,
|
|
19
|
+
m as required,
|
|
20
20
|
e as root
|
|
21
21
|
};
|
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
const e = "
|
|
1
|
+
const e = "_root_1w6g7_1", t = "_label_1w6g7_7", o = "_dropzone_1w6g7_13", r = "_dropzoneIcon_1w6g7_41", i = "_dropzoneText_1w6g7_47", _ = "_itemGroup_1w6g7_53", g = "_item_1w6g7_53", m = "_itemPreview_1w6g7_72", n = "_itemPreviewImage_1w6g7_84", c = "_itemPreviewFallback_1w6g7_90", w = "_itemName_1w6g7_101", a = "_itemSizeText_1w6g7_109", l = "_itemDeleteTrigger_1w6g7_115", s = "_trigger_1w6g7_137", p = "_clearTrigger_1w6g7_163", z = {
|
|
2
2
|
root: e,
|
|
3
|
-
label:
|
|
4
|
-
dropzone:
|
|
5
|
-
dropzoneIcon:
|
|
3
|
+
label: t,
|
|
4
|
+
dropzone: o,
|
|
5
|
+
dropzoneIcon: r,
|
|
6
6
|
dropzoneText: i,
|
|
7
7
|
itemGroup: _,
|
|
8
|
-
item:
|
|
9
|
-
itemPreview:
|
|
10
|
-
itemPreviewImage:
|
|
11
|
-
itemPreviewFallback:
|
|
12
|
-
itemName:
|
|
13
|
-
itemSizeText:
|
|
14
|
-
itemDeleteTrigger:
|
|
15
|
-
trigger:
|
|
16
|
-
clearTrigger:
|
|
8
|
+
item: g,
|
|
9
|
+
itemPreview: m,
|
|
10
|
+
itemPreviewImage: n,
|
|
11
|
+
itemPreviewFallback: c,
|
|
12
|
+
itemName: w,
|
|
13
|
+
itemSizeText: a,
|
|
14
|
+
itemDeleteTrigger: l,
|
|
15
|
+
trigger: s,
|
|
16
|
+
clearTrigger: p
|
|
17
17
|
};
|
|
18
18
|
export {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
p as clearTrigger,
|
|
20
|
+
z as default,
|
|
21
|
+
o as dropzone,
|
|
22
|
+
r as dropzoneIcon,
|
|
23
23
|
i as dropzoneText,
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
g as item,
|
|
25
|
+
l as itemDeleteTrigger,
|
|
26
26
|
_ as itemGroup,
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
27
|
+
w as itemName,
|
|
28
|
+
m as itemPreview,
|
|
29
|
+
c as itemPreviewFallback,
|
|
30
|
+
n as itemPreviewImage,
|
|
31
|
+
a as itemSizeText,
|
|
32
|
+
t as label,
|
|
33
33
|
e as root,
|
|
34
|
-
|
|
34
|
+
s as trigger
|
|
35
35
|
};
|
|
@@ -1,70 +1,73 @@
|
|
|
1
|
-
import { insert as
|
|
2
|
-
import { createSignal as
|
|
3
|
-
import {
|
|
4
|
-
import { bem as
|
|
5
|
-
import { cn as
|
|
6
|
-
import
|
|
7
|
-
var
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
lg: l.sizeLg,
|
|
13
|
-
xl: l.sizeXl
|
|
14
|
-
}, K = (t) => {
|
|
15
|
-
const k = t.allLabel ?? "All", V = t.items ?? [], x = t.size ?? "md", s = () => t.sticky ?? !1, [A, L] = O(t.defaultValue ?? []), d = () => t.value !== void 0, v = () => d() ? t.value ?? [] : A(), u = () => v().length === 0, g = (i) => {
|
|
16
|
-
var n;
|
|
17
|
-
d() || L(i), (n = t.onValueChange) == null || n.call(t, i);
|
|
1
|
+
import { insert as y, createComponent as u, effect as B, className as d, style as G, template as N } from "solid-js/web";
|
|
2
|
+
import { createSignal as S, For as $ } from "solid-js";
|
|
3
|
+
import { Button as k } from "../Button/Button.js";
|
|
4
|
+
import { bem as j } from "../utils/bem.js";
|
|
5
|
+
import { cn as r } from "../utils/cn.js";
|
|
6
|
+
import o from "./FilterGroup.module.css.js";
|
|
7
|
+
var q = /* @__PURE__ */ N("<div><div><div>");
|
|
8
|
+
const M = (e) => {
|
|
9
|
+
const x = e.allLabel ?? "All", A = e.items ?? [], v = e.size ?? "md", c = () => e.sticky ?? !1, [I, z] = S(e.defaultValue ?? []), f = () => e.value !== void 0, a = () => f() ? e.value ?? [] : I(), s = () => a().length === 0, m = (n) => {
|
|
10
|
+
var l;
|
|
11
|
+
f() || z(n), (l = e.onValueChange) == null || l.call(e, n);
|
|
18
12
|
}, F = () => {
|
|
19
|
-
|
|
20
|
-
},
|
|
21
|
-
|
|
22
|
-
|
|
13
|
+
s() || m([]);
|
|
14
|
+
}, L = (n) => {
|
|
15
|
+
const l = a(), i = l.includes(n) ? l.filter((t) => t !== n) : [...l, n];
|
|
16
|
+
m(i);
|
|
17
|
+
}, g = r(o.pill, e.buttonClass);
|
|
23
18
|
return (() => {
|
|
24
|
-
var
|
|
25
|
-
return
|
|
26
|
-
|
|
27
|
-
|
|
19
|
+
var n = q(), l = n.firstChild, i = l.firstChild;
|
|
20
|
+
return y(l, u(k, {
|
|
21
|
+
type: "button",
|
|
22
|
+
size: v,
|
|
23
|
+
get variant() {
|
|
24
|
+
return s() ? "solid" : "outline";
|
|
28
25
|
},
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
return S(() => !!u())() ? [] : v();
|
|
26
|
+
get intent() {
|
|
27
|
+
return s() ? "default" : "neutral";
|
|
32
28
|
},
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
29
|
+
get "data-state"() {
|
|
30
|
+
return s() ? "on" : "off";
|
|
31
|
+
},
|
|
32
|
+
class: g,
|
|
33
|
+
onClick: F,
|
|
34
|
+
children: x
|
|
35
|
+
}), i), y(i, u($, {
|
|
36
|
+
each: A,
|
|
37
|
+
children: (t) => u(k, {
|
|
38
|
+
type: "button",
|
|
39
|
+
size: v,
|
|
40
|
+
variant: "outline",
|
|
41
|
+
get intent() {
|
|
42
|
+
return a().includes(t.value) ? "default" : "neutral";
|
|
43
|
+
},
|
|
44
|
+
get disabled() {
|
|
45
|
+
return t.disabled;
|
|
46
|
+
},
|
|
47
|
+
get "data-state"() {
|
|
48
|
+
return a().includes(t.value) ? "on" : "off";
|
|
49
|
+
},
|
|
50
|
+
get class() {
|
|
51
|
+
return r(g, a().includes(t.value) && o.selectedItem);
|
|
52
|
+
},
|
|
53
|
+
onClick: () => L(t.value),
|
|
54
|
+
get children() {
|
|
55
|
+
return t.label;
|
|
56
|
+
}
|
|
57
|
+
})
|
|
58
|
+
})), B((t) => {
|
|
59
|
+
var C = r(j(), e.class), b = r(o.group, c() && o.sticky), V = typeof c() == "number" ? {
|
|
60
|
+
top: `${c()}px`
|
|
61
|
+
} : void 0, h = r(o.list, e.groupClass);
|
|
62
|
+
return C !== t.e && d(n, t.e = C), b !== t.t && d(l, t.t = b), t.a = G(l, V, t.a), h !== t.o && d(i, t.o = h), t;
|
|
58
63
|
}, {
|
|
59
64
|
e: void 0,
|
|
60
65
|
t: void 0,
|
|
61
66
|
a: void 0,
|
|
62
|
-
o: void 0
|
|
63
|
-
|
|
64
|
-
}), i;
|
|
67
|
+
o: void 0
|
|
68
|
+
}), n;
|
|
65
69
|
})();
|
|
66
70
|
};
|
|
67
|
-
N(["click"]);
|
|
68
71
|
export {
|
|
69
|
-
|
|
72
|
+
M as FilterGroup
|
|
70
73
|
};
|