@bysages/solid 0.2.3 → 0.3.0
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 +16 -2
- package/dist/{ai-response-B_586r27.mjs → ai-response-ClGGptX3.mjs} +15 -15
- package/dist/chevron-D5RzcayK.mjs +9 -0
- package/dist/components/affix/index.mjs +15 -17
- package/dist/components/ai/index.d.mts +1 -1
- package/dist/components/ai/index.mjs +12 -10
- package/dist/components/ai-action/index.mjs +2 -2
- package/dist/components/ai-attachments/index.mjs +50 -38
- package/dist/components/ai-message/index.mjs +11 -13
- package/dist/components/ai-prompt-input/index.mjs +70 -53
- package/dist/components/ai-reasoning/index.mjs +10 -6
- package/dist/components/ai-response/index.mjs +1 -1
- package/dist/components/ai-source/index.mjs +23 -23
- package/dist/components/ai-suggestion/index.mjs +1 -1
- package/dist/components/ai-tool/index.mjs +29 -17
- package/dist/components/alert/index.mjs +37 -42
- package/dist/components/angle-slider/index.mjs +2 -2
- package/dist/components/aspect-ratio/index.mjs +14 -16
- package/dist/components/autocomplete/index.mjs +3 -2
- package/dist/components/avatar/index.d.mts +3 -0
- package/dist/components/avatar/index.mjs +10 -5
- package/dist/components/avatar-group/index.mjs +11 -13
- package/dist/components/back-top/index.mjs +31 -27
- package/dist/components/badge/index.mjs +14 -16
- package/dist/components/banner/index.mjs +24 -28
- package/dist/components/bento/index.d.mts +24 -0
- package/dist/components/bento/index.mjs +51 -0
- package/dist/components/block-ui/index.d.mts +12 -0
- package/dist/components/block-ui/index.mjs +43 -0
- package/dist/components/breadcrumb/index.mjs +7 -5
- package/dist/components/browser/index.d.mts +21 -0
- package/dist/components/browser/index.mjs +87 -0
- package/dist/components/button/index.mjs +27 -29
- package/dist/components/button-group/index.mjs +18 -20
- package/dist/components/calendar/index.mjs +141 -129
- package/dist/components/card/index.mjs +2 -2
- package/dist/components/cascade-select/index.mjs +160 -121
- package/dist/components/checkbox/index.mjs +2 -2
- package/dist/components/checkbox-group/index.mjs +53 -55
- package/dist/components/chip/index.mjs +22 -20
- package/dist/components/clipboard/index.mjs +2 -2
- package/dist/components/color-picker/index.mjs +2 -2
- package/dist/components/combobox/index.mjs +2 -2
- package/dist/components/command/index.mjs +73 -57
- package/dist/components/comment/index.mjs +77 -62
- package/dist/components/config-provider/index.mjs +10 -8
- package/dist/components/container/index.mjs +14 -16
- package/dist/components/data-view/index.d.mts +18 -0
- package/dist/components/data-view/index.mjs +110 -0
- package/dist/components/date-input/index.mjs +2 -2
- package/dist/components/date-picker/index.mjs +2 -2
- package/dist/components/deferred-content/index.d.mts +16 -0
- package/dist/components/deferred-content/index.mjs +52 -0
- package/dist/components/descriptions/index.d.mts +9 -1
- package/dist/components/descriptions/index.mjs +43 -16
- package/dist/components/dock/index.d.mts +22 -0
- package/dist/components/dock/index.mjs +64 -0
- package/dist/components/dynamic-input/index.mjs +71 -68
- package/dist/components/editable/index.mjs +2 -2
- package/dist/components/ellipsis/index.mjs +17 -19
- package/dist/components/empty/index.mjs +2 -2
- package/dist/components/file-upload/index.mjs +2 -2
- package/dist/components/float-button/index.mjs +39 -38
- package/dist/components/form/index.d.mts +1 -1
- package/dist/components/form/index.mjs +52 -37
- package/dist/components/grid/index.mjs +19 -21
- package/dist/components/icon/index.d.mts +9 -4
- package/dist/components/icon/index.mjs +37 -36
- package/dist/components/image/index.mjs +44 -43
- package/dist/components/image-viewer/index.mjs +46 -37
- package/dist/components/input/index.d.mts +3 -0
- package/dist/components/input/index.mjs +1 -41
- package/dist/components/input-group/index.mjs +14 -18
- package/dist/components/kbd/index.mjs +8 -10
- package/dist/components/layout/index.mjs +77 -77
- package/dist/components/link/index.mjs +12 -13
- package/dist/components/list/index.mjs +52 -47
- package/dist/components/listbox/index.mjs +2 -2
- package/dist/components/masonry/index.mjs +15 -17
- package/dist/components/mentions/index.mjs +1 -1
- package/dist/components/menu/index.mjs +2 -2
- package/dist/components/menubar/index.mjs +58 -57
- package/dist/components/meter/index.mjs +41 -41
- package/dist/components/number-input/index.mjs +2 -2
- package/dist/components/order-list/index.d.mts +21 -0
- package/dist/components/order-list/index.mjs +160 -0
- package/dist/components/page-header/index.mjs +2 -2
- package/dist/components/pagination/index.mjs +2 -2
- package/dist/components/password-input/index.mjs +2 -2
- package/dist/components/pin-input/index.mjs +2 -2
- package/dist/components/popconfirm/index.mjs +19 -12
- package/dist/components/progress/index.mjs +2 -2
- package/dist/components/progress-group/index.mjs +65 -58
- package/dist/components/radio-group/index.mjs +2 -2
- package/dist/components/rating-group/index.mjs +2 -2
- package/dist/components/result/index.d.mts +22 -0
- package/dist/components/result/index.mjs +66 -0
- package/dist/components/select/index.d.mts +2 -17
- package/dist/components/select/index.mjs +2 -18
- package/dist/components/separator/index.mjs +17 -19
- package/dist/components/skeleton/index.mjs +8 -10
- package/dist/components/slider/index.mjs +2 -2
- package/dist/components/spinner/index.mjs +15 -17
- package/dist/components/split-button/index.mjs +84 -83
- package/dist/components/spotlight/index.d.mts +11 -0
- package/dist/components/spotlight/index.mjs +38 -0
- package/dist/components/stack/index.mjs +20 -22
- package/dist/components/stat/index.mjs +12 -14
- package/dist/components/steps/index.mjs +2 -2
- package/dist/components/switch/index.mjs +2 -2
- package/dist/components/table/index.mjs +308 -211
- package/dist/components/tabs/index.d.mts +2 -0
- package/dist/components/tabs/index.mjs +10 -5
- package/dist/components/tags-input/index.mjs +2 -2
- package/dist/components/terminal/index.d.mts +17 -0
- package/dist/components/terminal/index.mjs +84 -0
- package/dist/components/textarea/index.mjs +8 -8
- package/dist/components/timeline/index.d.mts +9 -3
- package/dist/components/timeline/index.mjs +18 -3
- package/dist/components/toggle-group/index.mjs +2 -2
- package/dist/components/toolbar/index.d.mts +17 -0
- package/dist/components/toolbar/index.mjs +46 -0
- package/dist/components/transfer/index.mjs +116 -107
- package/dist/components/tree-select/index.mjs +29 -21
- package/dist/components/tree-view/index.mjs +2 -2
- package/dist/components/typography/index.mjs +2 -2
- package/dist/components/user/index.d.mts +19 -0
- package/dist/components/user/index.mjs +68 -0
- package/dist/components/virtual-list/index.d.mts +17 -0
- package/dist/components/virtual-list/index.mjs +71 -0
- package/dist/components/watermark/index.mjs +19 -13
- package/dist/{index-B4XS2n2y.d.mts → index-IfofF-SW.d.mts} +718 -3773
- package/dist/index-YPUiqD3n.d.mts +42 -0
- package/dist/index.d.mts +16 -3
- package/dist/index.mjs +20 -7
- package/dist/input-DoFQ7RXh.mjs +78 -0
- package/dist/{mentions-xbI6vJAP.mjs → mentions-f5Js_2W7.mjs} +76 -70
- package/dist/select-CHaXbzLX.mjs +115 -0
- package/package.json +28 -7
- package/dist/chevron-GWEoEYdO.mjs +0 -9
|
@@ -1,23 +1,24 @@
|
|
|
1
|
-
import { Input } from "
|
|
1
|
+
import { t as Input } from "../../input-DoFQ7RXh.mjs";
|
|
2
2
|
import { injectComponentStyle } from "@bysages/core";
|
|
3
|
-
import {
|
|
3
|
+
import { createComponent, delegateEvents, effect, insert, setAttribute, spread, template } from "@solidjs/web";
|
|
4
4
|
import { For, Show, createMemo, createSignal, createUniqueId, mergeProps as mergeProps$1, splitProps } from "solid-js";
|
|
5
|
+
import { Portal } from "solid-js/web";
|
|
5
6
|
import { useEnvironmentContext } from "@ark-ui/solid/environment";
|
|
6
7
|
import { useFilter, useLocaleContext } from "@ark-ui/solid/locale";
|
|
7
8
|
import * as cascade from "@zag-js/cascade-select";
|
|
8
9
|
import { normalizeProps, useMachine } from "@zag-js/solid";
|
|
9
10
|
//#region src/components/cascade-select/index.tsx
|
|
10
|
-
var _tmpl$ =
|
|
11
|
-
var _tmpl$2 =
|
|
12
|
-
var _tmpl$3 =
|
|
13
|
-
var _tmpl$4 =
|
|
14
|
-
var _tmpl$5 =
|
|
15
|
-
var _tmpl$6 =
|
|
16
|
-
var _tmpl$7 =
|
|
17
|
-
var _tmpl$8 =
|
|
18
|
-
var _tmpl$9 =
|
|
19
|
-
var _tmpl$
|
|
20
|
-
var _tmpl$
|
|
11
|
+
var _tmpl$ = /* @__PURE__ */ template(`<svg viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round aria-hidden=true><path d="m6 9 6 6 6-6">`);
|
|
12
|
+
var _tmpl$2 = /* @__PURE__ */ template(`<svg viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round aria-hidden=true><path d="m9 18 6-6-6-6">`);
|
|
13
|
+
var _tmpl$3 = /* @__PURE__ */ template(`<svg viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=3 stroke-linecap=round stroke-linejoin=round aria-hidden=true><path d="m5 12.5 5 5L19 7">`);
|
|
14
|
+
var _tmpl$4 = /* @__PURE__ */ template(`<ul>`);
|
|
15
|
+
var _tmpl$5 = /* @__PURE__ */ template(`<span data-scope=cascade-select data-part=branch-indicator aria-hidden=true>`);
|
|
16
|
+
var _tmpl$6 = /* @__PURE__ */ template(`<li><span></span><span>`);
|
|
17
|
+
var _tmpl$7 = /* @__PURE__ */ template(`<div data-scope=cascade-select data-part=search>`);
|
|
18
|
+
var _tmpl$8 = /* @__PURE__ */ template(`<div><div><div data-scope=cascade-select data-part=corridor>`);
|
|
19
|
+
var _tmpl$9 = /* @__PURE__ */ template(`<div><div><button><span></span><span>`);
|
|
20
|
+
var _tmpl$10 = /* @__PURE__ */ template(`<p data-scope=cascade-select data-part=empty>Nothing matches`);
|
|
21
|
+
var _tmpl$11 = /* @__PURE__ */ template(`<button type=button data-scope=cascade-select data-part=match>`);
|
|
21
22
|
function chevronDown() {
|
|
22
23
|
return _tmpl$();
|
|
23
24
|
}
|
|
@@ -140,52 +141,72 @@ function CascadeSelect(props) {
|
|
|
140
141
|
};
|
|
141
142
|
const nodeState = () => api().getItemState(nodeProps);
|
|
142
143
|
const children = collection().getNodeChildren(node);
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
144
|
+
var _el$4 = _tmpl$4();
|
|
145
|
+
spread(_el$4, () => {
|
|
146
|
+
return mergeProps$1(() => api().getListProps(nodeProps));
|
|
147
|
+
}, true);
|
|
148
|
+
insert(_el$4, createComponent(For, {
|
|
149
|
+
each: children,
|
|
150
|
+
children: (item, index) => {
|
|
151
|
+
const itemValue = collection().getNodeValue(item);
|
|
152
|
+
const itemProps = {
|
|
153
|
+
item,
|
|
154
|
+
indexPath: [...indexPath, index()],
|
|
155
|
+
value: [...valuePath, itemValue]
|
|
156
|
+
};
|
|
157
|
+
const itemState = () => api().getItemState(itemProps);
|
|
158
|
+
var _el$5 = _tmpl$6();
|
|
159
|
+
var _el$6 = _el$5.firstChild;
|
|
160
|
+
var _el$8 = _el$6.nextSibling;
|
|
161
|
+
spread(_el$5, () => {
|
|
162
|
+
return mergeProps$1(() => api().getItemProps(itemProps));
|
|
163
|
+
}, true);
|
|
164
|
+
spread(_el$6, () => {
|
|
165
|
+
return mergeProps$1(() => api().getItemTextProps(itemProps));
|
|
166
|
+
}, true);
|
|
167
|
+
insert(_el$6, () => {
|
|
168
|
+
return item.label;
|
|
169
|
+
});
|
|
170
|
+
insert(_el$5, createComponent(Show, {
|
|
171
|
+
get when() {
|
|
172
|
+
return itemState().hasChildren;
|
|
173
|
+
},
|
|
174
|
+
get children() {
|
|
175
|
+
var _el$7 = _tmpl$5();
|
|
176
|
+
insert(_el$7, chevronRight);
|
|
177
|
+
return _el$7;
|
|
178
|
+
}
|
|
179
|
+
}), _el$8);
|
|
180
|
+
spread(_el$8, () => {
|
|
181
|
+
return mergeProps$1(() => api().getItemIndicatorProps(itemProps));
|
|
182
|
+
}, true);
|
|
183
|
+
insert(_el$8, checkGlyph);
|
|
184
|
+
return _el$5;
|
|
185
|
+
}
|
|
186
|
+
}));
|
|
187
|
+
const list = _el$4;
|
|
179
188
|
const next = nodeState().highlightedChild;
|
|
180
189
|
return [list, next != null && collection().isBranchNode(next) ? renderColumn(next, [...indexPath, nodeState().highlightedIndex], [...valuePath, collection().getNodeValue(next)]) : null];
|
|
181
190
|
}
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
191
|
+
var _el$9 = _tmpl$9();
|
|
192
|
+
var _el$10 = _el$9.firstChild;
|
|
193
|
+
var _el$11 = _el$10.firstChild;
|
|
194
|
+
var _el$12 = _el$11.firstChild;
|
|
195
|
+
var _el$13 = _el$12.nextSibling;
|
|
196
|
+
spread(_el$9, [
|
|
197
|
+
rest,
|
|
198
|
+
() => {
|
|
199
|
+
return mergeProps$1(() => api().getRootProps());
|
|
200
|
+
},
|
|
201
|
+
{ get "data-size"() {
|
|
185
202
|
return own.size ?? "md";
|
|
186
|
-
} }
|
|
187
|
-
|
|
188
|
-
|
|
203
|
+
} }
|
|
204
|
+
], true);
|
|
205
|
+
spread(_el$10, () => {
|
|
206
|
+
return mergeProps$1(() => api().getControlProps());
|
|
207
|
+
}, true);
|
|
208
|
+
spread(_el$11, () => {
|
|
209
|
+
return mergeProps$1(() => api().getTriggerProps(), {
|
|
189
210
|
get disabled() {
|
|
190
211
|
return own.disabled || void 0;
|
|
191
212
|
},
|
|
@@ -193,72 +214,90 @@ function CascadeSelect(props) {
|
|
|
193
214
|
api().getTriggerProps().onclick?.(event);
|
|
194
215
|
setQuery("");
|
|
195
216
|
}
|
|
196
|
-
})
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
217
|
+
});
|
|
218
|
+
}, true);
|
|
219
|
+
spread(_el$12, () => {
|
|
220
|
+
return mergeProps$1(() => api().getValueTextProps());
|
|
221
|
+
}, true);
|
|
222
|
+
insert(_el$12, () => {
|
|
223
|
+
return display() ?? own.placeholder ?? "Select…";
|
|
224
|
+
});
|
|
225
|
+
spread(_el$13, () => {
|
|
226
|
+
return mergeProps$1(() => api().getIndicatorProps());
|
|
227
|
+
}, true);
|
|
228
|
+
insert(_el$13, chevronDown);
|
|
229
|
+
insert(_el$9, createComponent(Portal, { get children() {
|
|
230
|
+
var _el$14 = _tmpl$8();
|
|
231
|
+
var _el$15 = _el$14.firstChild;
|
|
232
|
+
var _el$17 = _el$15.firstChild;
|
|
233
|
+
spread(_el$14, () => {
|
|
234
|
+
return mergeProps$1(() => api().getPositionerProps());
|
|
235
|
+
}, true);
|
|
236
|
+
spread(_el$15, [() => {
|
|
237
|
+
return mergeProps$1(() => api().getContentProps());
|
|
238
|
+
}, { get "data-size"() {
|
|
239
|
+
return own.size ?? "md";
|
|
240
|
+
} }], true);
|
|
241
|
+
insert(_el$15, createComponent(Show, {
|
|
242
|
+
get when() {
|
|
243
|
+
return own.filterable;
|
|
244
|
+
},
|
|
245
|
+
get children() {
|
|
246
|
+
var _el$16 = _tmpl$7();
|
|
247
|
+
insert(_el$16, createComponent(Input, {
|
|
248
|
+
size: "sm",
|
|
249
|
+
get value() {
|
|
250
|
+
return query();
|
|
251
|
+
},
|
|
252
|
+
onValueChange: setQuery,
|
|
253
|
+
placeholder: "Filter…",
|
|
254
|
+
"aria-label": "Filter options"
|
|
255
|
+
}));
|
|
256
|
+
return _el$16;
|
|
257
|
+
}
|
|
258
|
+
}), _el$17);
|
|
259
|
+
insert(_el$17, createComponent(Show, {
|
|
260
|
+
get when() {
|
|
261
|
+
return !filtering();
|
|
262
|
+
},
|
|
263
|
+
get fallback() {
|
|
264
|
+
return createComponent(Show, {
|
|
265
|
+
get when() {
|
|
266
|
+
return matchPaths().length > 0;
|
|
267
|
+
},
|
|
268
|
+
get fallback() {
|
|
269
|
+
return _tmpl$10();
|
|
270
|
+
},
|
|
271
|
+
get children() {
|
|
272
|
+
return createComponent(For, {
|
|
273
|
+
get each() {
|
|
274
|
+
return matchPaths();
|
|
275
|
+
},
|
|
276
|
+
children: (hit) => (() => {
|
|
277
|
+
var _el$19 = _tmpl$11();
|
|
278
|
+
_el$19._$$click = () => pickMatch(hit.path);
|
|
279
|
+
insert(_el$19, () => {
|
|
280
|
+
return hit.labels.join(" / ");
|
|
281
|
+
});
|
|
282
|
+
effect(() => isSelected(hit.path) || void 0, (_v$) => {
|
|
283
|
+
setAttribute(_el$19, "data-selected", _v$);
|
|
284
|
+
});
|
|
285
|
+
return _el$19;
|
|
286
|
+
})()
|
|
287
|
+
});
|
|
288
|
+
}
|
|
289
|
+
});
|
|
290
|
+
},
|
|
291
|
+
get children() {
|
|
292
|
+
return renderColumn(collection().rootNode, [], []);
|
|
293
|
+
}
|
|
294
|
+
}));
|
|
295
|
+
effect(() => filtering() ? "flat" : "columns", (_v$) => {
|
|
296
|
+
setAttribute(_el$17, "data-flow", _v$);
|
|
297
|
+
});
|
|
298
|
+
return _el$14;
|
|
299
|
+
} }), null);
|
|
300
|
+
return _el$9;
|
|
262
301
|
}
|
|
263
302
|
delegateEvents(["click"]);
|
|
264
303
|
//#endregion
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
-
import { createComponent, mergeProps } from "
|
|
2
|
+
import { createComponent, mergeProps } from "@solidjs/web";
|
|
3
3
|
import { splitProps } from "solid-js";
|
|
4
4
|
import { Checkbox as Checkbox$1 } from "@ark-ui/solid/checkbox";
|
|
5
5
|
//#region src/components/checkbox/index.tsx
|
|
6
6
|
function CheckboxRoot(props) {
|
|
7
7
|
const [own, rest] = splitProps(props, ["size"]);
|
|
8
|
-
return createComponent(Checkbox$1.Root, mergeProps(rest, { get
|
|
8
|
+
return createComponent(Checkbox$1.Root, mergeProps(rest, { get "data-size"() {
|
|
9
9
|
return own.size ?? "md";
|
|
10
10
|
} }));
|
|
11
11
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
-
import { createComponent, insert,
|
|
2
|
+
import { createComponent, insert, spread, template } from "@solidjs/web";
|
|
3
3
|
import { For, createUniqueId, splitProps } from "solid-js";
|
|
4
4
|
import { useFieldContext } from "@ark-ui/solid/field";
|
|
5
5
|
import { Checkbox } from "@ark-ui/solid/checkbox";
|
|
6
6
|
//#region src/components/checkbox-group/index.tsx
|
|
7
|
-
var _tmpl$ =
|
|
8
|
-
var _tmpl$2 =
|
|
7
|
+
var _tmpl$ = /* @__PURE__ */ template(`<svg viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=3 stroke-linecap=round stroke-linejoin=round aria-hidden=true><path d="m5 12.5 5 5L19 7">`);
|
|
8
|
+
var _tmpl$2 = /* @__PURE__ */ template(`<div>`);
|
|
9
9
|
function checkGlyph() {
|
|
10
10
|
return _tmpl$();
|
|
11
11
|
}
|
|
@@ -40,60 +40,58 @@ function CheckboxGroup(props) {
|
|
|
40
40
|
else next.add(value);
|
|
41
41
|
own.onValueChange?.([...next]);
|
|
42
42
|
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
43
|
+
var _el$2 = _tmpl$2();
|
|
44
|
+
spread(_el$2, [rest, {
|
|
45
|
+
role: "group",
|
|
46
|
+
"data-scope": "checkbox-group",
|
|
47
|
+
"data-part": "root",
|
|
48
|
+
get "data-layout"() {
|
|
49
|
+
return own.layout ?? "vertical";
|
|
50
|
+
},
|
|
51
|
+
get "data-invalid"() {
|
|
52
|
+
return isInvalid() ? "" : void 0;
|
|
53
|
+
}
|
|
54
|
+
}], true);
|
|
55
|
+
insert(_el$2, createComponent(For, {
|
|
56
|
+
get each() {
|
|
57
|
+
return own.options;
|
|
58
|
+
},
|
|
59
|
+
children: (option) => createComponent(Checkbox.Root, {
|
|
60
|
+
get ids() {
|
|
61
|
+
return {
|
|
62
|
+
label: `${uid}:${option.value}:label`,
|
|
63
|
+
hiddenInput: `${uid}:${option.value}:input`
|
|
64
|
+
};
|
|
51
65
|
},
|
|
52
|
-
get
|
|
53
|
-
return
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
66
|
+
get checked() {
|
|
67
|
+
return selected().has(option.value);
|
|
68
|
+
},
|
|
69
|
+
get "data-size"() {
|
|
70
|
+
return own.size ?? "md";
|
|
71
|
+
},
|
|
72
|
+
get invalid() {
|
|
73
|
+
return isInvalid();
|
|
59
74
|
},
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
get children() {
|
|
81
|
-
return [
|
|
82
|
-
createComponent(Checkbox.Control, { get children() {
|
|
83
|
-
return createComponent(Checkbox.Indicator, { get children() {
|
|
84
|
-
return checkGlyph();
|
|
85
|
-
} });
|
|
86
|
-
} }),
|
|
87
|
-
createComponent(Checkbox.Label, { get children() {
|
|
88
|
-
return option.label;
|
|
89
|
-
} }),
|
|
90
|
-
createComponent(Checkbox.HiddenInput, {})
|
|
91
|
-
];
|
|
92
|
-
}
|
|
93
|
-
})
|
|
94
|
-
}));
|
|
95
|
-
return _el$2;
|
|
96
|
-
})();
|
|
75
|
+
get disabled() {
|
|
76
|
+
return isDisabled() || option.disabled === true;
|
|
77
|
+
},
|
|
78
|
+
onCheckedChange: () => toggle(option.value),
|
|
79
|
+
get children() {
|
|
80
|
+
return [
|
|
81
|
+
createComponent(Checkbox.Control, { get children() {
|
|
82
|
+
return createComponent(Checkbox.Indicator, { get children() {
|
|
83
|
+
return checkGlyph();
|
|
84
|
+
} });
|
|
85
|
+
} }),
|
|
86
|
+
createComponent(Checkbox.Label, { get children() {
|
|
87
|
+
return option.label;
|
|
88
|
+
} }),
|
|
89
|
+
createComponent(Checkbox.HiddenInput, {})
|
|
90
|
+
];
|
|
91
|
+
}
|
|
92
|
+
})
|
|
93
|
+
}));
|
|
94
|
+
return _el$2;
|
|
97
95
|
}
|
|
98
96
|
//#endregion
|
|
99
97
|
export { CheckboxGroup };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
-
import { insert, memo,
|
|
2
|
+
import { insert, memo, spread, template } from "@solidjs/web";
|
|
3
3
|
import { splitProps } from "solid-js";
|
|
4
4
|
//#region src/components/chip/index.tsx
|
|
5
|
-
var _tmpl$ =
|
|
5
|
+
var _tmpl$ = /* @__PURE__ */ template(`<span>`);
|
|
6
6
|
function Chip(props) {
|
|
7
7
|
injectComponentStyle("chip");
|
|
8
8
|
const [own, rest] = splitProps(props, [
|
|
@@ -11,24 +11,26 @@ function Chip(props) {
|
|
|
11
11
|
"tone",
|
|
12
12
|
"variant"
|
|
13
13
|
]);
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
14
|
+
var _el$ = _tmpl$();
|
|
15
|
+
spread(_el$, [rest, {
|
|
16
|
+
"data-scope": "chip",
|
|
17
|
+
"data-part": "root",
|
|
18
|
+
get "data-tone"() {
|
|
19
|
+
return own.tone ?? "ink";
|
|
20
|
+
},
|
|
21
|
+
get "data-variant"() {
|
|
22
|
+
return own.variant ?? "solid";
|
|
23
|
+
}
|
|
24
|
+
}], true);
|
|
25
|
+
insert(_el$, (() => {
|
|
26
|
+
var _c$ = memo(() => {
|
|
27
|
+
return !!(own.max != null && own.value > own.max);
|
|
28
|
+
});
|
|
29
|
+
return () => {
|
|
30
|
+
return _c$() ? `${own.max}+` : String(own.value);
|
|
31
|
+
};
|
|
32
|
+
})());
|
|
33
|
+
return _el$;
|
|
32
34
|
}
|
|
33
35
|
//#endregion
|
|
34
36
|
export { Chip };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
-
import { createComponent, mergeProps } from "
|
|
2
|
+
import { createComponent, mergeProps } from "@solidjs/web";
|
|
3
3
|
import { splitProps } from "solid-js";
|
|
4
4
|
import { Clipboard as Clipboard$1 } from "@ark-ui/solid/clipboard";
|
|
5
5
|
//#region src/components/clipboard/index.tsx
|
|
6
6
|
const ArkRoot = Clipboard$1.Root;
|
|
7
7
|
function ClipboardRoot(props) {
|
|
8
8
|
const [own, rest] = splitProps(props, ["size"]);
|
|
9
|
-
return createComponent(ArkRoot, mergeProps(rest, { get
|
|
9
|
+
return createComponent(ArkRoot, mergeProps(rest, { get "data-size"() {
|
|
10
10
|
return own.size ?? "md";
|
|
11
11
|
} }));
|
|
12
12
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
-
import { createComponent, mergeProps } from "
|
|
2
|
+
import { createComponent, mergeProps } from "@solidjs/web";
|
|
3
3
|
import { splitProps } from "solid-js";
|
|
4
4
|
import { ColorPicker as ColorPicker$1 } from "@ark-ui/solid/color-picker";
|
|
5
5
|
//#region src/components/color-picker/index.tsx
|
|
6
6
|
function ColorPickerRoot(props) {
|
|
7
7
|
const [own, rest] = splitProps(props, ["size"]);
|
|
8
|
-
return createComponent(ColorPicker$1.Root, mergeProps(rest, { get
|
|
8
|
+
return createComponent(ColorPicker$1.Root, mergeProps(rest, { get "data-size"() {
|
|
9
9
|
return own.size ?? "md";
|
|
10
10
|
} }));
|
|
11
11
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
-
import { createComponent, mergeProps } from "
|
|
2
|
+
import { createComponent, mergeProps } from "@solidjs/web";
|
|
3
3
|
import { splitProps } from "solid-js";
|
|
4
4
|
import { Combobox as Combobox$1 } from "@ark-ui/solid/combobox";
|
|
5
5
|
//#region src/components/combobox/index.tsx
|
|
6
6
|
function ComboboxRoot(props) {
|
|
7
7
|
const [own, rest] = splitProps(props, ["size"]);
|
|
8
|
-
return createComponent(Combobox$1.Root, mergeProps(rest, { get
|
|
8
|
+
return createComponent(Combobox$1.Root, mergeProps(rest, { get "data-size"() {
|
|
9
9
|
return own.size ?? "md";
|
|
10
10
|
} }));
|
|
11
11
|
}
|