@bysages/solid 0.2.0 → 0.2.2
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/index.d.mts +244 -54
- package/dist/index.mjs +528 -238
- package/package.json +3 -2
package/dist/index.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { injectComponentStyle } from "@bysages/core";
|
|
2
2
|
import { Accordion as Accordion$1 } from "@ark-ui/solid/accordion";
|
|
3
3
|
import { Portal, addEventListener, createComponent, delegateEvents, effect, insert, memo, mergeProps, setAttribute, setStyleProperty, spread, style, template, use } from "solid-js/web";
|
|
4
|
-
import { For, Index, Show, createContext, createEffect, createMemo, createSignal, createUniqueId, mergeProps as mergeProps$1, on, onCleanup, onMount, splitProps, useContext } from "solid-js";
|
|
4
|
+
import { For, Index, Show, createComponent as createComponent$1, createContext, createEffect, createMemo, createSignal, createUniqueId, mergeProps as mergeProps$1, on, onCleanup, onMount, splitProps, useContext } from "solid-js";
|
|
5
5
|
import { Field as Field$1, useFieldContext } from "@ark-ui/solid/field";
|
|
6
6
|
import { Collapsible as Collapsible$1 } from "@ark-ui/solid/collapsible";
|
|
7
7
|
import { renderHtml } from "@tanstack/markdown/html";
|
|
8
8
|
import { AngleSlider as AngleSlider$1 } from "@ark-ui/solid/angle-slider";
|
|
9
|
-
import { createFileTreeCollection, createGridCollection, createTreeCollection, useAsyncList, useListCollection, useListCollection as useListCollection$1, useListSelection } from "@ark-ui/solid/collection";
|
|
9
|
+
import { createFileTreeCollection, createGridCollection, createListCollection, createTreeCollection, useAsyncList, useListCollection, useListCollection as useListCollection$1, useListSelection } from "@ark-ui/solid/collection";
|
|
10
10
|
import { Combobox as Combobox$1 } from "@ark-ui/solid/combobox";
|
|
11
11
|
import { Avatar as Avatar$1 } from "@ark-ui/solid/avatar";
|
|
12
12
|
import { DatePicker as DatePicker$1 } from "@ark-ui/solid/date-picker";
|
|
@@ -32,6 +32,7 @@ import { Format as Format$1 } from "@ark-ui/solid/format";
|
|
|
32
32
|
import { Frame as Frame$1 } from "@ark-ui/solid/frame";
|
|
33
33
|
import { Highlight as Highlight$1 } from "@ark-ui/solid/highlight";
|
|
34
34
|
import { HoverCard as HoverCard$1 } from "@ark-ui/solid/hover-card";
|
|
35
|
+
import { getIcon } from "@bysages/icons";
|
|
35
36
|
import { ImageCropper as ImageCropper$1 } from "@ark-ui/solid/image-cropper";
|
|
36
37
|
import { JsonTreeView as JsonTreeView$1 } from "@ark-ui/solid/json-tree-view";
|
|
37
38
|
import { Listbox as Listbox$1 } from "@ark-ui/solid/listbox";
|
|
@@ -50,7 +51,7 @@ import { RadioGroup as RadioGroup$1 } from "@ark-ui/solid/radio-group";
|
|
|
50
51
|
import { RatingGroup as RatingGroup$1 } from "@ark-ui/solid/rating-group";
|
|
51
52
|
import { ScrollArea as ScrollArea$1 } from "@ark-ui/solid/scroll-area";
|
|
52
53
|
import { SegmentGroup as SegmentGroup$1 } from "@ark-ui/solid/segment-group";
|
|
53
|
-
import { Select as Select$1, createListCollection } from "@ark-ui/solid/select";
|
|
54
|
+
import { Select as Select$1, createListCollection as createListCollection$1 } from "@ark-ui/solid/select";
|
|
54
55
|
import { SignaturePad as SignaturePad$1 } from "@ark-ui/solid/signature-pad";
|
|
55
56
|
import { Slider as Slider$1 } from "@ark-ui/solid/slider";
|
|
56
57
|
import { Splitter as Splitter$1 } from "@ark-ui/solid/splitter";
|
|
@@ -201,7 +202,7 @@ injectComponentStyle("field");
|
|
|
201
202
|
//#endregion
|
|
202
203
|
//#region src/components/ai-prompt-input/index.tsx
|
|
203
204
|
var _tmpl$$55 = /*#__PURE__*/ template(`<svg viewBox="0 0 16 16"width=14 height=14 aria-hidden=true fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=square><path d="M8 13V3M3.5 7.5 8 3l4.5 4.5">`);
|
|
204
|
-
var _tmpl$2$
|
|
205
|
+
var _tmpl$2$29 = /*#__PURE__*/ template(`<svg viewBox="0 0 16 16"width=14 height=14 aria-hidden=true><rect x=4.5 y=4.5 width=7 height=7 fill=currentColor>`);
|
|
205
206
|
var _tmpl$3$18 = /*#__PURE__*/ template(`<div data-scope=ai>`);
|
|
206
207
|
var _tmpl$4$14 = /*#__PURE__*/ template(`<div data-scope=ai data-part=prompt-footer><div data-scope=ai data-part=prompt-end>`);
|
|
207
208
|
var _tmpl$5$11 = /*#__PURE__*/ template(`<form><div data-scope=ai data-part=prompt-main>`);
|
|
@@ -209,7 +210,7 @@ function arrowUpGlyph() {
|
|
|
209
210
|
return _tmpl$$55();
|
|
210
211
|
}
|
|
211
212
|
function stopGlyph() {
|
|
212
|
-
return _tmpl$2$
|
|
213
|
+
return _tmpl$2$29();
|
|
213
214
|
}
|
|
214
215
|
/** The prompt vessel: the shared field textarea — self-growing on the
|
|
215
216
|
* machine's autoresize — with the submit seal riding its last line.
|
|
@@ -345,7 +346,7 @@ injectComponentStyle("collapsible");
|
|
|
345
346
|
//#endregion
|
|
346
347
|
//#region src/components/ai-reasoning/index.tsx
|
|
347
348
|
var _tmpl$$53 = /*#__PURE__*/ template(`<span>`);
|
|
348
|
-
var _tmpl$2$
|
|
349
|
+
var _tmpl$2$28 = /*#__PURE__*/ template(`<div data-scope=ai data-part=reasoning-content>`);
|
|
349
350
|
/** The model's thought, folded by the shared collapsible in its quiet
|
|
350
351
|
* register: bare ink for a trigger, the thought on one hairline. */
|
|
351
352
|
function Reasoning(props) {
|
|
@@ -362,7 +363,7 @@ function Reasoning(props) {
|
|
|
362
363
|
return chevron$2();
|
|
363
364
|
} })];
|
|
364
365
|
} }), createComponent(Collapsible.Content, { get children() {
|
|
365
|
-
var _el$2 = _tmpl$2$
|
|
366
|
+
var _el$2 = _tmpl$2$28();
|
|
366
367
|
insert(_el$2, () => own.children);
|
|
367
368
|
return _el$2;
|
|
368
369
|
} })];
|
|
@@ -428,6 +429,45 @@ async function clickCodeCopy(event, copyLabel, copiedLabel) {
|
|
|
428
429
|
}, REVERT_MS);
|
|
429
430
|
}
|
|
430
431
|
//#endregion
|
|
432
|
+
//#region src/components/ai-response/tables.ts
|
|
433
|
+
/** Wide tables ride a scrolling lane instead of bursting the column.
|
|
434
|
+
* The lane is a plain div: the table-as-scroll-container form is what
|
|
435
|
+
* ate the mouse wheel over plain tables. Idempotent, so it can run
|
|
436
|
+
* after every stream patch. */
|
|
437
|
+
const lanes = /* @__PURE__ */ new Set();
|
|
438
|
+
let laneObserver;
|
|
439
|
+
/** A lane's verdict must follow its box — the panel around it can
|
|
440
|
+
* resize at any moment, so each lane stays observed and re-decided
|
|
441
|
+
* whenever its width changes. */
|
|
442
|
+
function watchLane(lane) {
|
|
443
|
+
if (lanes.has(lane)) return;
|
|
444
|
+
lanes.add(lane);
|
|
445
|
+
laneObserver ??= new ResizeObserver(() => {
|
|
446
|
+
for (const lane of lanes) {
|
|
447
|
+
if (!lane.isConnected) {
|
|
448
|
+
laneObserver.unobserve(lane);
|
|
449
|
+
lanes.delete(lane);
|
|
450
|
+
continue;
|
|
451
|
+
}
|
|
452
|
+
lane.toggleAttribute("data-scrollable", lane.scrollWidth > lane.clientWidth);
|
|
453
|
+
}
|
|
454
|
+
});
|
|
455
|
+
laneObserver.observe(lane);
|
|
456
|
+
}
|
|
457
|
+
function wrapResponseTables(root) {
|
|
458
|
+
for (const table of root.querySelectorAll("table")) {
|
|
459
|
+
if (table.parentElement?.hasAttribute("data-table-scroll")) continue;
|
|
460
|
+
const lane = document.createElement("div");
|
|
461
|
+
lane.setAttribute("data-table-scroll", "");
|
|
462
|
+
table.replaceWith(lane);
|
|
463
|
+
lane.append(table);
|
|
464
|
+
}
|
|
465
|
+
for (const lane of root.querySelectorAll("[data-table-scroll]")) {
|
|
466
|
+
lane.toggleAttribute("data-scrollable", lane.scrollWidth > lane.clientWidth);
|
|
467
|
+
watchLane(lane);
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
//#endregion
|
|
431
471
|
//#region src/components/ai-response/index.tsx
|
|
432
472
|
var _tmpl$$52 = /*#__PURE__*/ template(`<div>`);
|
|
433
473
|
/** Markdown set on the paper. Rendering goes through
|
|
@@ -445,6 +485,7 @@ function Response(props) {
|
|
|
445
485
|
onMount(() => createEffect(() => {
|
|
446
486
|
html();
|
|
447
487
|
if (root) decorateCodeCopy(root, own.copyLabel ?? "Copy code");
|
|
488
|
+
if (root) wrapResponseTables(root);
|
|
448
489
|
}));
|
|
449
490
|
const onClick = (event) => {
|
|
450
491
|
clickCodeCopy(event, own.copyLabel ?? "Copy code", own.copiedLabel ?? "Copied");
|
|
@@ -467,7 +508,7 @@ injectComponentStyle("ai");
|
|
|
467
508
|
//#endregion
|
|
468
509
|
//#region src/components/ai-source/index.tsx
|
|
469
510
|
var _tmpl$$51 = /*#__PURE__*/ template(`<li data-scope=ai data-part=source><a>`);
|
|
470
|
-
var _tmpl$2$
|
|
511
|
+
var _tmpl$2$27 = /*#__PURE__*/ template(`<ol>`);
|
|
471
512
|
/** One place the ink came from; href and the rest ride the anchor. */
|
|
472
513
|
function Source(props) {
|
|
473
514
|
const [own, rest] = splitProps(props, ["href", "children"]);
|
|
@@ -487,7 +528,7 @@ function Source(props) {
|
|
|
487
528
|
/** The reading list under a response: where this ink came from. */
|
|
488
529
|
function Sources(props) {
|
|
489
530
|
return (() => {
|
|
490
|
-
var _el$3 = _tmpl$2$
|
|
531
|
+
var _el$3 = _tmpl$2$27();
|
|
491
532
|
spread(_el$3, mergeProps(props, {
|
|
492
533
|
"data-scope": "ai",
|
|
493
534
|
"data-part": "sources"
|
|
@@ -516,7 +557,7 @@ injectComponentStyle("ai");
|
|
|
516
557
|
//#endregion
|
|
517
558
|
//#region src/components/ai-tool/index.tsx
|
|
518
559
|
var _tmpl$$50 = /*#__PURE__*/ template(`<span>`);
|
|
519
|
-
var _tmpl$2$
|
|
560
|
+
var _tmpl$2$26 = /*#__PURE__*/ template(`<span data-scope=ai data-part=tool-status>`);
|
|
520
561
|
var _tmpl$3$17 = /*#__PURE__*/ template(`<span data-scope=ai data-part=tool-label>Input`);
|
|
521
562
|
var _tmpl$4$13 = /*#__PURE__*/ template(`<pre>`);
|
|
522
563
|
var _tmpl$5$10 = /*#__PURE__*/ template(`<span data-scope=ai data-part=tool-label>Output`);
|
|
@@ -545,7 +586,7 @@ function Tool(props) {
|
|
|
545
586
|
return own.status;
|
|
546
587
|
},
|
|
547
588
|
get children() {
|
|
548
|
-
var _el$2 = _tmpl$2$
|
|
589
|
+
var _el$2 = _tmpl$2$26();
|
|
549
590
|
insert(_el$2, () => own.status.charAt(0).toUpperCase() + own.status.slice(1));
|
|
550
591
|
return _el$2;
|
|
551
592
|
}
|
|
@@ -646,7 +687,7 @@ injectComponentStyle("ai");
|
|
|
646
687
|
//#endregion
|
|
647
688
|
//#region src/components/ai-attachments/index.tsx
|
|
648
689
|
var _tmpl$$48 = /*#__PURE__*/ template(`<svg viewBox="0 0 16 16"aria-hidden=true fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=square><rect x=2.5 y=3.5 width=11 height=9></rect><path d="M2.5 10.5 6 7l3 3 2-1.5 2.5 2"></path><circle cx=6 cy=6 r=0.75 fill=currentColor stroke=none>`);
|
|
649
|
-
var _tmpl$2$
|
|
690
|
+
var _tmpl$2$25 = /*#__PURE__*/ template(`<svg viewBox="0 0 16 16"aria-hidden=true fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=square><path d="M4 2.5h5l3 3V13.5H4z"></path><path d="M9 2.5v3h3">`);
|
|
650
691
|
var _tmpl$3$16 = /*#__PURE__*/ template(`<svg viewBox="0 0 16 16"width=12 height=12 aria-hidden=true fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=square><path d="M4 4l8 8M12 4l-8 8">`);
|
|
651
692
|
var _tmpl$4$12 = /*#__PURE__*/ template(`<span><span></span><button type=button data-remove>`);
|
|
652
693
|
var _tmpl$5$9 = /*#__PURE__*/ template(`<span>`);
|
|
@@ -654,7 +695,7 @@ function imageGlyph() {
|
|
|
654
695
|
return _tmpl$$48();
|
|
655
696
|
}
|
|
656
697
|
function fileGlyph() {
|
|
657
|
-
return _tmpl$2$
|
|
698
|
+
return _tmpl$2$25();
|
|
658
699
|
}
|
|
659
700
|
function removeGlyph() {
|
|
660
701
|
return _tmpl$3$16();
|
|
@@ -740,7 +781,7 @@ delegateEvents(["click"]);
|
|
|
740
781
|
//#endregion
|
|
741
782
|
//#region src/components/alert/index.tsx
|
|
742
783
|
var _tmpl$$47 = /*#__PURE__*/ template(`<svg width=16 height=16 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=1.75 stroke-linecap=round stroke-linejoin=round aria-hidden=true><path>`);
|
|
743
|
-
var _tmpl$2$
|
|
784
|
+
var _tmpl$2$24 = /*#__PURE__*/ template(`<div>`);
|
|
744
785
|
var _tmpl$3$15 = /*#__PURE__*/ template(`<span data-scope=alert data-part=icon>`);
|
|
745
786
|
var _tmpl$4$11 = /*#__PURE__*/ template(`<p>`);
|
|
746
787
|
const StatusContext = createContext(() => "ink");
|
|
@@ -764,7 +805,7 @@ function AlertRoot(props) {
|
|
|
764
805
|
return createComponent(StatusContext.Provider, {
|
|
765
806
|
value: status,
|
|
766
807
|
get children() {
|
|
767
|
-
var _el$3 = _tmpl$2$
|
|
808
|
+
var _el$3 = _tmpl$2$24();
|
|
768
809
|
spread(_el$3, mergeProps(rest, {
|
|
769
810
|
get role() {
|
|
770
811
|
return status() === "ink" || status() === "info" ? "status" : "alert";
|
|
@@ -789,7 +830,7 @@ function Icon$2() {
|
|
|
789
830
|
}
|
|
790
831
|
function Body$2(props) {
|
|
791
832
|
return (() => {
|
|
792
|
-
var _el$5 = _tmpl$2$
|
|
833
|
+
var _el$5 = _tmpl$2$24();
|
|
793
834
|
spread(_el$5, mergeProps(props, {
|
|
794
835
|
"data-scope": "alert",
|
|
795
836
|
"data-part": "body"
|
|
@@ -826,12 +867,17 @@ const Alert = Object.assign(AlertRoot, {
|
|
|
826
867
|
});
|
|
827
868
|
injectComponentStyle("alert");
|
|
828
869
|
//#endregion
|
|
829
|
-
//#region src/components/angle-slider/index.
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
870
|
+
//#region src/components/angle-slider/index.tsx
|
|
871
|
+
function AngleSliderRoot(props) {
|
|
872
|
+
const [own, rest] = splitProps(props, ["size"]);
|
|
873
|
+
return createComponent(AngleSlider$1.Root, mergeProps(rest, { get ["data-size"]() {
|
|
874
|
+
return own.size ?? "md";
|
|
875
|
+
} }));
|
|
876
|
+
}
|
|
877
|
+
const AngleSlider = {
|
|
878
|
+
...AngleSlider$1,
|
|
879
|
+
Root: AngleSliderRoot
|
|
880
|
+
};
|
|
835
881
|
injectComponentStyle("angle-slider");
|
|
836
882
|
//#endregion
|
|
837
883
|
//#region src/components/aspect-ratio/index.tsx
|
|
@@ -869,6 +915,7 @@ function AutoComplete(props) {
|
|
|
869
915
|
"value",
|
|
870
916
|
"items",
|
|
871
917
|
"placeholder",
|
|
918
|
+
"size",
|
|
872
919
|
"filter",
|
|
873
920
|
"onValueChange"
|
|
874
921
|
]);
|
|
@@ -883,6 +930,9 @@ function AutoComplete(props) {
|
|
|
883
930
|
get inputValue() {
|
|
884
931
|
return own.value;
|
|
885
932
|
},
|
|
933
|
+
get ["data-size"]() {
|
|
934
|
+
return own.size ?? "md";
|
|
935
|
+
},
|
|
886
936
|
allowCustomValue: true,
|
|
887
937
|
onValueChange: (details) => {
|
|
888
938
|
const [first] = details.value;
|
|
@@ -933,11 +983,15 @@ injectComponentStyle("avatar");
|
|
|
933
983
|
//#region src/components/avatar-group/index.tsx
|
|
934
984
|
var _tmpl$$45 = /*#__PURE__*/ template(`<div>`);
|
|
935
985
|
function AvatarGroup(props) {
|
|
986
|
+
const [own, rest] = splitProps(props, ["size"]);
|
|
936
987
|
return (() => {
|
|
937
988
|
var _el$ = _tmpl$$45();
|
|
938
|
-
spread(_el$, mergeProps(
|
|
989
|
+
spread(_el$, mergeProps(rest, {
|
|
939
990
|
"data-scope": "avatar-group",
|
|
940
|
-
"data-part": "root"
|
|
991
|
+
"data-part": "root",
|
|
992
|
+
get ["data-size"]() {
|
|
993
|
+
return own.size;
|
|
994
|
+
}
|
|
941
995
|
}), false, false);
|
|
942
996
|
return _el$;
|
|
943
997
|
})();
|
|
@@ -946,7 +1000,7 @@ injectComponentStyle("avatar-group");
|
|
|
946
1000
|
//#endregion
|
|
947
1001
|
//#region src/components/back-top/index.tsx
|
|
948
1002
|
var _tmpl$$44 = /*#__PURE__*/ template(`<div data-scope=back-top data-part=root>`);
|
|
949
|
-
var _tmpl$2$
|
|
1003
|
+
var _tmpl$2$23 = /*#__PURE__*/ template(`<svg width=16 height=16 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=1.75 stroke-linecap=round stroke-linejoin=round aria-hidden=true><path d="m6 14 6-6 6 6">`);
|
|
950
1004
|
/**
|
|
951
1005
|
* A way home: after the page has scrolled past `threshold`, a small
|
|
952
1006
|
* floating control rises at the page's corner and returns the reader to
|
|
@@ -1024,7 +1078,7 @@ function BackTop(props) {
|
|
|
1024
1078
|
}
|
|
1025
1079
|
/** The single glyph a way-home control needs: one stroke pointing up. */
|
|
1026
1080
|
function chevronUp() {
|
|
1027
|
-
return _tmpl$2$
|
|
1081
|
+
return _tmpl$2$23();
|
|
1028
1082
|
}
|
|
1029
1083
|
injectComponentStyle("back-top");
|
|
1030
1084
|
//#endregion
|
|
@@ -1051,7 +1105,7 @@ injectComponentStyle("badge");
|
|
|
1051
1105
|
//#endregion
|
|
1052
1106
|
//#region src/components/banner/index.tsx
|
|
1053
1107
|
var _tmpl$$42 = /*#__PURE__*/ template(`<div>`);
|
|
1054
|
-
var _tmpl$2$
|
|
1108
|
+
var _tmpl$2$22 = /*#__PURE__*/ template(`<button><svg viewBox="0 0 16 16"fill=none aria-hidden=true><path d="M4 4l8 8M12 4l-8 8"stroke=currentColor stroke-width=1.5 stroke-linecap=round>`);
|
|
1055
1109
|
/** A page-level notice, spoken across the full measure: a wash of the
|
|
1056
1110
|
* status pigment, one heavier hairline on the leading edge, and room
|
|
1057
1111
|
* for actions and a quiet close. Ink is the neutral register; the four
|
|
@@ -1091,7 +1145,7 @@ const Actions$3 = part$10("Actions", "div");
|
|
|
1091
1145
|
function Close(props) {
|
|
1092
1146
|
const [own, rest] = splitProps(props, ["type"]);
|
|
1093
1147
|
return (() => {
|
|
1094
|
-
var _el$2 = _tmpl$2$
|
|
1148
|
+
var _el$2 = _tmpl$2$22();
|
|
1095
1149
|
spread(_el$2, mergeProps(rest, {
|
|
1096
1150
|
get type() {
|
|
1097
1151
|
return own.type ?? "button";
|
|
@@ -1193,7 +1247,7 @@ injectComponentStyle("button-group");
|
|
|
1193
1247
|
//#endregion
|
|
1194
1248
|
//#region src/components/calendar/index.tsx
|
|
1195
1249
|
var _tmpl$$39 = /*#__PURE__*/ template(`<svg width=16 height=16 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=1.75 aria-hidden=true><path d="m9 5 7 7-7 7">`);
|
|
1196
|
-
var _tmpl$2$
|
|
1250
|
+
var _tmpl$2$21 = /*#__PURE__*/ template(`<div data-scope=calendar data-part=header>`);
|
|
1197
1251
|
var _tmpl$3$14 = /*#__PURE__*/ template(`<div>`);
|
|
1198
1252
|
function chevron$1(dir) {
|
|
1199
1253
|
return (() => {
|
|
@@ -1227,7 +1281,7 @@ function Calendar(props) {
|
|
|
1227
1281
|
return `${decade} - ${decade + 9}`;
|
|
1228
1282
|
};
|
|
1229
1283
|
const header = () => (() => {
|
|
1230
|
-
var _el$2 = _tmpl$2$
|
|
1284
|
+
var _el$2 = _tmpl$2$21();
|
|
1231
1285
|
insert(_el$2, createComponent(DatePicker$1.ViewControl, { get children() {
|
|
1232
1286
|
return [
|
|
1233
1287
|
createComponent(DatePicker$1.PrevTrigger, { get children() {
|
|
@@ -1461,7 +1515,7 @@ injectComponentStyle("input");
|
|
|
1461
1515
|
//#endregion
|
|
1462
1516
|
//#region src/components/cascade-select/index.tsx
|
|
1463
1517
|
var _tmpl$$37 = /*#__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">`);
|
|
1464
|
-
var _tmpl$2$
|
|
1518
|
+
var _tmpl$2$20 = /*#__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">`);
|
|
1465
1519
|
var _tmpl$3$13 = /*#__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">`);
|
|
1466
1520
|
var _tmpl$4$10 = /*#__PURE__*/ template(`<ul>`);
|
|
1467
1521
|
var _tmpl$5$8 = /*#__PURE__*/ template(`<span data-part=branch-indicator aria-hidden=true>`);
|
|
@@ -1475,7 +1529,7 @@ function chevronDown$1() {
|
|
|
1475
1529
|
return _tmpl$$37();
|
|
1476
1530
|
}
|
|
1477
1531
|
function chevronRight() {
|
|
1478
|
-
return _tmpl$2$
|
|
1532
|
+
return _tmpl$2$20();
|
|
1479
1533
|
}
|
|
1480
1534
|
function checkGlyph$2() {
|
|
1481
1535
|
return _tmpl$3$13();
|
|
@@ -1498,6 +1552,7 @@ function CascadeSelect(props) {
|
|
|
1498
1552
|
"filterable",
|
|
1499
1553
|
"multiple",
|
|
1500
1554
|
"disabled",
|
|
1555
|
+
"size",
|
|
1501
1556
|
"onValueChange"
|
|
1502
1557
|
]);
|
|
1503
1558
|
const id = createUniqueId();
|
|
@@ -1632,7 +1687,9 @@ function CascadeSelect(props) {
|
|
|
1632
1687
|
}
|
|
1633
1688
|
return (() => {
|
|
1634
1689
|
var _el$9 = _tmpl$9$2(), _el$0 = _el$9.firstChild, _el$1 = _el$0.firstChild, _el$10 = _el$1.firstChild, _el$11 = _el$10.nextSibling;
|
|
1635
|
-
spread(_el$9, mergeProps(rest, () => mergeProps$1(() => api().getRootProps())
|
|
1690
|
+
spread(_el$9, mergeProps(rest, () => mergeProps$1(() => api().getRootProps()), { get ["data-size"]() {
|
|
1691
|
+
return own.size ?? "md";
|
|
1692
|
+
} }), false, true);
|
|
1636
1693
|
spread(_el$0, mergeProps(() => mergeProps$1(() => api().getControlProps())), false, true);
|
|
1637
1694
|
spread(_el$1, mergeProps(() => mergeProps$1(() => api().getTriggerProps(), {
|
|
1638
1695
|
get disabled() {
|
|
@@ -1650,7 +1707,9 @@ function CascadeSelect(props) {
|
|
|
1650
1707
|
insert(_el$9, createComponent(Portal, { get children() {
|
|
1651
1708
|
var _el$12 = _tmpl$8$2(), _el$13 = _el$12.firstChild;
|
|
1652
1709
|
spread(_el$12, mergeProps(() => mergeProps$1(() => api().getPositionerProps())), false, true);
|
|
1653
|
-
spread(_el$13, mergeProps(() => mergeProps$1(() => api().getContentProps())
|
|
1710
|
+
spread(_el$13, mergeProps(() => mergeProps$1(() => api().getContentProps()), { get ["data-size"]() {
|
|
1711
|
+
return own.size ?? "md";
|
|
1712
|
+
} }), false, true);
|
|
1654
1713
|
insert(_el$13, createComponent(Show, {
|
|
1655
1714
|
get when() {
|
|
1656
1715
|
return own.filterable;
|
|
@@ -1709,17 +1768,22 @@ function CascadeSelect(props) {
|
|
|
1709
1768
|
injectComponentStyle("cascade-select");
|
|
1710
1769
|
delegateEvents(["click"]);
|
|
1711
1770
|
//#endregion
|
|
1712
|
-
//#region src/components/checkbox/index.
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1771
|
+
//#region src/components/checkbox/index.tsx
|
|
1772
|
+
function CheckboxRoot(props) {
|
|
1773
|
+
const [own, rest] = splitProps(props, ["size"]);
|
|
1774
|
+
return createComponent(Checkbox$1.Root, mergeProps(rest, { get ["data-size"]() {
|
|
1775
|
+
return own.size ?? "md";
|
|
1776
|
+
} }));
|
|
1777
|
+
}
|
|
1778
|
+
const Checkbox = {
|
|
1779
|
+
...Checkbox$1,
|
|
1780
|
+
Root: CheckboxRoot
|
|
1781
|
+
};
|
|
1718
1782
|
injectComponentStyle("checkbox");
|
|
1719
1783
|
//#endregion
|
|
1720
1784
|
//#region src/components/checkbox-group/index.tsx
|
|
1721
1785
|
var _tmpl$$36 = /*#__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">`);
|
|
1722
|
-
var _tmpl$2$
|
|
1786
|
+
var _tmpl$2$19 = /*#__PURE__*/ template(`<div>`);
|
|
1723
1787
|
function checkGlyph$1() {
|
|
1724
1788
|
return _tmpl$$36();
|
|
1725
1789
|
}
|
|
@@ -1733,10 +1797,12 @@ function checkGlyph$1() {
|
|
|
1733
1797
|
*/
|
|
1734
1798
|
function CheckboxGroup(props) {
|
|
1735
1799
|
const field = useFieldContext();
|
|
1800
|
+
const uid = createUniqueId();
|
|
1736
1801
|
const [own, rest] = splitProps(props, [
|
|
1737
1802
|
"value",
|
|
1738
1803
|
"options",
|
|
1739
1804
|
"layout",
|
|
1805
|
+
"size",
|
|
1740
1806
|
"invalid",
|
|
1741
1807
|
"disabled",
|
|
1742
1808
|
"onValueChange"
|
|
@@ -1751,7 +1817,7 @@ function CheckboxGroup(props) {
|
|
|
1751
1817
|
own.onValueChange?.([...next]);
|
|
1752
1818
|
}
|
|
1753
1819
|
return (() => {
|
|
1754
|
-
var _el$2 = _tmpl$2$
|
|
1820
|
+
var _el$2 = _tmpl$2$19();
|
|
1755
1821
|
spread(_el$2, mergeProps(rest, {
|
|
1756
1822
|
"role": "group",
|
|
1757
1823
|
"data-scope": "checkbox-group",
|
|
@@ -1768,9 +1834,18 @@ function CheckboxGroup(props) {
|
|
|
1768
1834
|
return own.options;
|
|
1769
1835
|
},
|
|
1770
1836
|
children: (option) => createComponent(Checkbox$1.Root, {
|
|
1837
|
+
get ids() {
|
|
1838
|
+
return {
|
|
1839
|
+
label: `${uid}:${option.value}:label`,
|
|
1840
|
+
hiddenInput: `${uid}:${option.value}:input`
|
|
1841
|
+
};
|
|
1842
|
+
},
|
|
1771
1843
|
get checked() {
|
|
1772
1844
|
return selected().has(option.value);
|
|
1773
1845
|
},
|
|
1846
|
+
get ["data-size"]() {
|
|
1847
|
+
return own.size ?? "md";
|
|
1848
|
+
},
|
|
1774
1849
|
get invalid() {
|
|
1775
1850
|
return isInvalid();
|
|
1776
1851
|
},
|
|
@@ -1829,38 +1904,49 @@ function Chip(props) {
|
|
|
1829
1904
|
}
|
|
1830
1905
|
injectComponentStyle("chip");
|
|
1831
1906
|
//#endregion
|
|
1832
|
-
//#region src/components/clipboard/index.
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1907
|
+
//#region src/components/clipboard/index.tsx
|
|
1908
|
+
const ArkRoot$2 = Clipboard$1.Root;
|
|
1909
|
+
function ClipboardRoot(props) {
|
|
1910
|
+
const [own, rest] = splitProps(props, ["size"]);
|
|
1911
|
+
return createComponent(ArkRoot$2, mergeProps(rest, { get ["data-size"]() {
|
|
1912
|
+
return own.size ?? "md";
|
|
1913
|
+
} }));
|
|
1914
|
+
}
|
|
1915
|
+
const Clipboard = {
|
|
1916
|
+
...Clipboard$1,
|
|
1917
|
+
Root: ClipboardRoot
|
|
1918
|
+
};
|
|
1838
1919
|
injectComponentStyle("clipboard");
|
|
1839
1920
|
//#endregion
|
|
1840
|
-
//#region src/components/color-picker/index.
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1921
|
+
//#region src/components/color-picker/index.tsx
|
|
1922
|
+
function ColorPickerRoot(props) {
|
|
1923
|
+
const [own, rest] = splitProps(props, ["size"]);
|
|
1924
|
+
return createComponent(ColorPicker$1.Root, mergeProps(rest, { get ["data-size"]() {
|
|
1925
|
+
return own.size ?? "md";
|
|
1926
|
+
} }));
|
|
1927
|
+
}
|
|
1928
|
+
const ColorPicker = {
|
|
1929
|
+
...ColorPicker$1,
|
|
1930
|
+
Root: ColorPickerRoot
|
|
1931
|
+
};
|
|
1850
1932
|
injectComponentStyle("color-picker");
|
|
1851
1933
|
//#endregion
|
|
1852
|
-
//#region src/components/combobox/index.
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1934
|
+
//#region src/components/combobox/index.tsx
|
|
1935
|
+
function ComboboxRoot(props) {
|
|
1936
|
+
const [own, rest] = splitProps(props, ["size"]);
|
|
1937
|
+
return createComponent(Combobox$1.Root, mergeProps(rest, { get ["data-size"]() {
|
|
1938
|
+
return own.size ?? "md";
|
|
1939
|
+
} }));
|
|
1940
|
+
}
|
|
1941
|
+
const Combobox = {
|
|
1942
|
+
...Combobox$1,
|
|
1943
|
+
Root: ComboboxRoot
|
|
1944
|
+
};
|
|
1859
1945
|
injectComponentStyle("combobox");
|
|
1860
1946
|
//#endregion
|
|
1861
1947
|
//#region src/components/command/index.tsx
|
|
1862
1948
|
var _tmpl$$34 = /*#__PURE__*/ template(`<span data-scope=command data-part=item-hint>`);
|
|
1863
|
-
var _tmpl$2$
|
|
1949
|
+
var _tmpl$2$18 = /*#__PURE__*/ template(`<div>`);
|
|
1864
1950
|
var _tmpl$3$12 = /*#__PURE__*/ template(`<span>`);
|
|
1865
1951
|
var _tmpl$4$9 = /*#__PURE__*/ template(`<input>`);
|
|
1866
1952
|
var _tmpl$5$7 = /*#__PURE__*/ template(`<div data-scope=command data-part=empty>`);
|
|
@@ -1872,7 +1958,7 @@ function Row(props) {
|
|
|
1872
1958
|
return props.entry.value;
|
|
1873
1959
|
},
|
|
1874
1960
|
asChild: (itemProps) => (() => {
|
|
1875
|
-
var _el$ = _tmpl$2$
|
|
1961
|
+
var _el$ = _tmpl$2$18();
|
|
1876
1962
|
spread(_el$, mergeProps(itemProps, {
|
|
1877
1963
|
"data-scope": "command",
|
|
1878
1964
|
"data-part": "item"
|
|
@@ -1967,13 +2053,13 @@ function Command(props) {
|
|
|
1967
2053
|
get children() {
|
|
1968
2054
|
return createComponent(Portal, { get children() {
|
|
1969
2055
|
return [createComponent(Dialog$1.Backdrop, {}), createComponent(Dialog$1.Positioner, { asChild: (positionerProps) => (() => {
|
|
1970
|
-
var _el$4 = _tmpl$2$
|
|
2056
|
+
var _el$4 = _tmpl$2$18();
|
|
1971
2057
|
spread(_el$4, mergeProps(positionerProps, {
|
|
1972
2058
|
"data-scope": "command",
|
|
1973
2059
|
"data-part": "positioner"
|
|
1974
2060
|
}), false, true);
|
|
1975
2061
|
insert(_el$4, createComponent(Dialog$1.Content, { asChild: (contentProps) => (() => {
|
|
1976
|
-
var _el$5 = _tmpl$2$
|
|
2062
|
+
var _el$5 = _tmpl$2$18();
|
|
1977
2063
|
spread(_el$5, mergeProps(contentProps, {
|
|
1978
2064
|
"data-scope": "command",
|
|
1979
2065
|
"data-part": "content"
|
|
@@ -2015,7 +2101,7 @@ function Command(props) {
|
|
|
2015
2101
|
}), false, false);
|
|
2016
2102
|
return _el$6;
|
|
2017
2103
|
})() }), createComponent(Combobox$1.Content, { asChild: (listProps) => (() => {
|
|
2018
|
-
var _el$7 = _tmpl$2$
|
|
2104
|
+
var _el$7 = _tmpl$2$18();
|
|
2019
2105
|
spread(_el$7, mergeProps(listProps, {
|
|
2020
2106
|
"data-scope": "command",
|
|
2021
2107
|
"data-part": "list"
|
|
@@ -2038,13 +2124,13 @@ function Command(props) {
|
|
|
2038
2124
|
},
|
|
2039
2125
|
get children() {
|
|
2040
2126
|
return createComponent(Combobox$1.ItemGroup, { asChild: (groupProps) => (() => {
|
|
2041
|
-
var _el$9 = _tmpl$2$
|
|
2127
|
+
var _el$9 = _tmpl$2$18();
|
|
2042
2128
|
spread(_el$9, mergeProps(groupProps, {
|
|
2043
2129
|
"data-scope": "command",
|
|
2044
2130
|
"data-part": "group"
|
|
2045
2131
|
}), false, true);
|
|
2046
2132
|
insert(_el$9, createComponent(Combobox$1.ItemGroupLabel, { asChild: (labelProps) => (() => {
|
|
2047
|
-
var _el$0 = _tmpl$2$
|
|
2133
|
+
var _el$0 = _tmpl$2$18();
|
|
2048
2134
|
spread(_el$0, mergeProps(labelProps, {
|
|
2049
2135
|
"data-scope": "command",
|
|
2050
2136
|
"data-part": "group-label"
|
|
@@ -2090,7 +2176,7 @@ injectComponentStyle("dialog");
|
|
|
2090
2176
|
//#endregion
|
|
2091
2177
|
//#region src/components/comment/index.tsx
|
|
2092
2178
|
var _tmpl$$33 = /*#__PURE__*/ template(`<div data-scope=comment data-part=avatar>`);
|
|
2093
|
-
var _tmpl$2$
|
|
2179
|
+
var _tmpl$2$17 = /*#__PURE__*/ template(`<span data-scope=comment data-part=author>`);
|
|
2094
2180
|
var _tmpl$3$11 = /*#__PURE__*/ template(`<time data-scope=comment data-part=datetime>`);
|
|
2095
2181
|
var _tmpl$4$8 = /*#__PURE__*/ template(`<header data-scope=comment data-part=header>`);
|
|
2096
2182
|
var _tmpl$5$6 = /*#__PURE__*/ template(`<div data-scope=comment data-part=actions>`);
|
|
@@ -2135,7 +2221,7 @@ function Comment(props) {
|
|
|
2135
2221
|
return own.author;
|
|
2136
2222
|
},
|
|
2137
2223
|
get children() {
|
|
2138
|
-
var _el$5 = _tmpl$2$
|
|
2224
|
+
var _el$5 = _tmpl$2$17();
|
|
2139
2225
|
insert(_el$5, () => own.author);
|
|
2140
2226
|
return _el$5;
|
|
2141
2227
|
}
|
|
@@ -2248,22 +2334,30 @@ function Container(props) {
|
|
|
2248
2334
|
}
|
|
2249
2335
|
injectComponentStyle("container");
|
|
2250
2336
|
//#endregion
|
|
2251
|
-
//#region src/components/date-input/index.
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2337
|
+
//#region src/components/date-input/index.tsx
|
|
2338
|
+
function DateInputRoot(props) {
|
|
2339
|
+
const [own, rest] = splitProps(props, ["size"]);
|
|
2340
|
+
return createComponent(DateInput$1.Root, mergeProps(rest, { get ["data-size"]() {
|
|
2341
|
+
return own.size ?? "md";
|
|
2342
|
+
} }));
|
|
2343
|
+
}
|
|
2344
|
+
const DateInput = {
|
|
2345
|
+
...DateInput$1,
|
|
2346
|
+
Root: DateInputRoot
|
|
2347
|
+
};
|
|
2257
2348
|
injectComponentStyle("date-input");
|
|
2258
2349
|
//#endregion
|
|
2259
|
-
//#region src/components/date-picker/index.
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
const DatePicker =
|
|
2350
|
+
//#region src/components/date-picker/index.tsx
|
|
2351
|
+
function DatePickerRoot(props) {
|
|
2352
|
+
const [own, rest] = splitProps(props, ["size"]);
|
|
2353
|
+
return createComponent(DatePicker$1.Root, mergeProps(rest, { get ["data-size"]() {
|
|
2354
|
+
return own.size ?? "md";
|
|
2355
|
+
} }));
|
|
2356
|
+
}
|
|
2357
|
+
const DatePicker = {
|
|
2358
|
+
...DatePicker$1,
|
|
2359
|
+
Root: DatePickerRoot
|
|
2360
|
+
};
|
|
2267
2361
|
injectComponentStyle("date-picker");
|
|
2268
2362
|
//#endregion
|
|
2269
2363
|
//#region src/components/descriptions/index.tsx
|
|
@@ -2323,7 +2417,7 @@ injectComponentStyle("drawer");
|
|
|
2323
2417
|
//#endregion
|
|
2324
2418
|
//#region src/components/dynamic-input/index.tsx
|
|
2325
2419
|
var _tmpl$$29 = /*#__PURE__*/ template(`<div><div data-scope=dynamic-input data-part=add>`);
|
|
2326
|
-
var _tmpl$2$
|
|
2420
|
+
var _tmpl$2$16 = /*#__PURE__*/ template(`<div data-scope=dynamic-input data-part=row>`);
|
|
2327
2421
|
var _tmpl$3$10 = /*#__PURE__*/ template(`<svg width=16 height=16 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=1.75 stroke-linecap=round stroke-linejoin=round aria-hidden=true><path d="M18 6 6 18M6 6l12 12">`);
|
|
2328
2422
|
/**
|
|
2329
2423
|
* A column of entry rows: one Input per line, each with a quiet remove
|
|
@@ -2339,6 +2433,7 @@ function DynamicInput(props) {
|
|
|
2339
2433
|
"min",
|
|
2340
2434
|
"max",
|
|
2341
2435
|
"placeholder",
|
|
2436
|
+
"size",
|
|
2342
2437
|
"addLabel",
|
|
2343
2438
|
"disabled",
|
|
2344
2439
|
"invalid",
|
|
@@ -2371,7 +2466,7 @@ function DynamicInput(props) {
|
|
|
2371
2466
|
return values();
|
|
2372
2467
|
},
|
|
2373
2468
|
children: (value, index) => (() => {
|
|
2374
|
-
var _el$3 = _tmpl$2$
|
|
2469
|
+
var _el$3 = _tmpl$2$16();
|
|
2375
2470
|
insert(_el$3, createComponent(Input, {
|
|
2376
2471
|
get value() {
|
|
2377
2472
|
return value();
|
|
@@ -2385,10 +2480,16 @@ function DynamicInput(props) {
|
|
|
2385
2480
|
get invalid() {
|
|
2386
2481
|
return own.invalid;
|
|
2387
2482
|
},
|
|
2483
|
+
get size() {
|
|
2484
|
+
return own.size ?? "md";
|
|
2485
|
+
},
|
|
2388
2486
|
onValueChange: (next) => update(index, next)
|
|
2389
2487
|
}), null);
|
|
2390
2488
|
insert(_el$3, createComponent(Button, {
|
|
2391
2489
|
variant: "ghost",
|
|
2490
|
+
get size() {
|
|
2491
|
+
return own.size ?? "md";
|
|
2492
|
+
},
|
|
2392
2493
|
square: true,
|
|
2393
2494
|
get disabled() {
|
|
2394
2495
|
return own.disabled || !canRemove();
|
|
@@ -2404,6 +2505,9 @@ function DynamicInput(props) {
|
|
|
2404
2505
|
}), _el$2);
|
|
2405
2506
|
insert(_el$2, createComponent(Button, {
|
|
2406
2507
|
variant: "ghost",
|
|
2508
|
+
get size() {
|
|
2509
|
+
return own.size ?? "md";
|
|
2510
|
+
},
|
|
2407
2511
|
get disabled() {
|
|
2408
2512
|
return own.disabled || !canAdd();
|
|
2409
2513
|
},
|
|
@@ -2421,12 +2525,17 @@ function crossIcon() {
|
|
|
2421
2525
|
}
|
|
2422
2526
|
injectComponentStyle("dynamic-input");
|
|
2423
2527
|
//#endregion
|
|
2424
|
-
//#region src/components/editable/index.
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2528
|
+
//#region src/components/editable/index.tsx
|
|
2529
|
+
function EditableRoot(props) {
|
|
2530
|
+
const [own, rest] = splitProps(props, ["size"]);
|
|
2531
|
+
return createComponent(Editable$1.Root, mergeProps(rest, { get ["data-size"]() {
|
|
2532
|
+
return own.size ?? "md";
|
|
2533
|
+
} }));
|
|
2534
|
+
}
|
|
2535
|
+
const Editable = {
|
|
2536
|
+
...Editable$1,
|
|
2537
|
+
Root: EditableRoot
|
|
2538
|
+
};
|
|
2430
2539
|
injectComponentStyle("editable");
|
|
2431
2540
|
//#endregion
|
|
2432
2541
|
//#region src/components/ellipsis/index.tsx
|
|
@@ -2489,19 +2598,22 @@ injectComponentStyle("empty");
|
|
|
2489
2598
|
const Fieldset = Fieldset$1;
|
|
2490
2599
|
injectComponentStyle("fieldset");
|
|
2491
2600
|
//#endregion
|
|
2492
|
-
//#region src/components/file-upload/index.
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
const FileUpload =
|
|
2601
|
+
//#region src/components/file-upload/index.tsx
|
|
2602
|
+
function FileUploadRoot(props) {
|
|
2603
|
+
const [own, rest] = splitProps(props, ["size"]);
|
|
2604
|
+
return createComponent(FileUpload$1.Root, mergeProps(rest, { get ["data-size"]() {
|
|
2605
|
+
return own.size ?? "md";
|
|
2606
|
+
} }));
|
|
2607
|
+
}
|
|
2608
|
+
const FileUpload = {
|
|
2609
|
+
...FileUpload$1,
|
|
2610
|
+
Root: FileUploadRoot
|
|
2611
|
+
};
|
|
2500
2612
|
injectComponentStyle("file-upload");
|
|
2501
2613
|
//#endregion
|
|
2502
2614
|
//#region src/components/float-button/index.tsx
|
|
2503
2615
|
var _tmpl$$27 = /*#__PURE__*/ template(`<div>`);
|
|
2504
|
-
var _tmpl$2$
|
|
2616
|
+
var _tmpl$2$15 = /*#__PURE__*/ template(`<div><span data-scope=float-button data-part=item-label aria-hidden=true>`);
|
|
2505
2617
|
/** Solid context for {@link FloatButtonContext}, exported so a custom
|
|
2506
2618
|
* part can read the group's state with `useContext`. */
|
|
2507
2619
|
const FloatButtonContextKey = createContext();
|
|
@@ -2518,6 +2630,7 @@ function FloatButtonRoot(props) {
|
|
|
2518
2630
|
const [own, rest] = splitProps(props, [
|
|
2519
2631
|
"open",
|
|
2520
2632
|
"placement",
|
|
2633
|
+
"size",
|
|
2521
2634
|
"onOpenChange"
|
|
2522
2635
|
]);
|
|
2523
2636
|
const [inner, setInner] = createSignal(false);
|
|
@@ -2528,6 +2641,7 @@ function FloatButtonRoot(props) {
|
|
|
2528
2641
|
};
|
|
2529
2642
|
const context = {
|
|
2530
2643
|
open,
|
|
2644
|
+
size: () => own.size ?? "lg",
|
|
2531
2645
|
toggle: () => setOpen(!open()),
|
|
2532
2646
|
close: () => setOpen(false)
|
|
2533
2647
|
};
|
|
@@ -2549,13 +2663,20 @@ function FloatButtonRoot(props) {
|
|
|
2549
2663
|
}
|
|
2550
2664
|
});
|
|
2551
2665
|
}
|
|
2666
|
+
const STEP_DOWN = {
|
|
2667
|
+
lg: "md",
|
|
2668
|
+
md: "sm",
|
|
2669
|
+
sm: "sm"
|
|
2670
|
+
};
|
|
2552
2671
|
function FloatButtonTrigger(props) {
|
|
2553
2672
|
const [own, rest] = splitProps(props, ["label", "children"]);
|
|
2554
2673
|
const context = useContext(FloatButtonContextKey);
|
|
2555
2674
|
return createComponent(Button, mergeProps(rest, {
|
|
2556
2675
|
variant: "solid",
|
|
2557
2676
|
square: true,
|
|
2558
|
-
size
|
|
2677
|
+
get size() {
|
|
2678
|
+
return context?.size() ?? "lg";
|
|
2679
|
+
},
|
|
2559
2680
|
onClick: () => context?.toggle(),
|
|
2560
2681
|
get ["aria-label"]() {
|
|
2561
2682
|
return own.label || "Actions";
|
|
@@ -2577,7 +2698,7 @@ function FloatButtonItem(props) {
|
|
|
2577
2698
|
]);
|
|
2578
2699
|
const context = useContext(FloatButtonContextKey);
|
|
2579
2700
|
return (() => {
|
|
2580
|
-
var _el$2 = _tmpl$2$
|
|
2701
|
+
var _el$2 = _tmpl$2$15(), _el$3 = _el$2.firstChild;
|
|
2581
2702
|
spread(_el$2, mergeProps(rest, {
|
|
2582
2703
|
"data-scope": "float-button",
|
|
2583
2704
|
"data-part": "item"
|
|
@@ -2585,7 +2706,9 @@ function FloatButtonItem(props) {
|
|
|
2585
2706
|
insert(_el$2, createComponent(Button, {
|
|
2586
2707
|
variant: "outline",
|
|
2587
2708
|
square: true,
|
|
2588
|
-
size
|
|
2709
|
+
get size() {
|
|
2710
|
+
return context ? STEP_DOWN[context.size()] : "md";
|
|
2711
|
+
},
|
|
2589
2712
|
get disabled() {
|
|
2590
2713
|
return own.disabled;
|
|
2591
2714
|
},
|
|
@@ -2630,13 +2753,18 @@ const Format = Format$1;
|
|
|
2630
2753
|
//#endregion
|
|
2631
2754
|
//#region src/components/form/index.tsx
|
|
2632
2755
|
var _tmpl$$26 = /*#__PURE__*/ template(`<form>`);
|
|
2633
|
-
var _tmpl$2$
|
|
2756
|
+
var _tmpl$2$14 = /*#__PURE__*/ template(`<div>`);
|
|
2634
2757
|
const FormContext = createContext();
|
|
2635
2758
|
/** Walk a Standard Schema issue's path back to the dotted name the
|
|
2636
2759
|
* matching FormField declared. */
|
|
2637
2760
|
function issueName(issue) {
|
|
2638
2761
|
return (issue.path ?? []).map((segment) => typeof segment === "object" ? segment.key : segment).join(".");
|
|
2639
2762
|
}
|
|
2763
|
+
/** A field owns the issues that live at its name or deeper inside it
|
|
2764
|
+
* ("topics.0" belongs to the "topics" field). */
|
|
2765
|
+
function inScope(name, scope) {
|
|
2766
|
+
return name === scope || name.startsWith(scope + ".");
|
|
2767
|
+
}
|
|
2640
2768
|
/**
|
|
2641
2769
|
* The validation scheduler: one reactive error map, a submit that
|
|
2642
2770
|
* validates before it emits, live re-validation on the events the
|
|
@@ -2662,7 +2790,7 @@ function Form(props) {
|
|
|
2662
2790
|
disabled: own.disabled ?? false
|
|
2663
2791
|
};
|
|
2664
2792
|
let run = 0;
|
|
2665
|
-
async function runValidate() {
|
|
2793
|
+
async function runValidate(scope) {
|
|
2666
2794
|
const seq = ++run;
|
|
2667
2795
|
const next = /* @__PURE__ */ new Map();
|
|
2668
2796
|
if (own.validate) for (const error of await own.validate(own.state)) next.set(error.name, error.message);
|
|
@@ -2673,6 +2801,13 @@ function Form(props) {
|
|
|
2673
2801
|
if (!next.has(name)) next.set(name, issue.message);
|
|
2674
2802
|
}
|
|
2675
2803
|
}
|
|
2804
|
+
if (scope != null) {
|
|
2805
|
+
const merged = /* @__PURE__ */ new Map();
|
|
2806
|
+
for (const [name, message] of errors()) if (!inScope(name, scope)) merged.set(name, message);
|
|
2807
|
+
for (const [name, message] of next) if (inScope(name, scope)) merged.set(name, message);
|
|
2808
|
+
if (seq === run) setErrorsMap(merged);
|
|
2809
|
+
return merged;
|
|
2810
|
+
}
|
|
2676
2811
|
if (seq === run) setErrorsMap(next);
|
|
2677
2812
|
return next;
|
|
2678
2813
|
}
|
|
@@ -2726,8 +2861,9 @@ function Form(props) {
|
|
|
2726
2861
|
]).includes(event.type)) return;
|
|
2727
2862
|
const target = event.target;
|
|
2728
2863
|
if (!target || !("value" in target)) return;
|
|
2864
|
+
const scope = target.closest?.("[data-form-field]")?.getAttribute("data-form-field") ?? void 0;
|
|
2729
2865
|
clearTimeout(timer);
|
|
2730
|
-
timer = setTimeout(() => void runValidate(), event.type === "input" ? 300 : 0);
|
|
2866
|
+
timer = setTimeout(() => void runValidate(scope), event.type === "input" ? 300 : 0);
|
|
2731
2867
|
}
|
|
2732
2868
|
const [formEl, setFormEl] = createSignal(null);
|
|
2733
2869
|
onMount(() => {
|
|
@@ -2774,7 +2910,7 @@ function FormField(props) {
|
|
|
2774
2910
|
const invalid = () => own.invalid || error() != null;
|
|
2775
2911
|
const disabled = () => own.disabled || (form?.disabled ?? false);
|
|
2776
2912
|
return (() => {
|
|
2777
|
-
var _el$2 = _tmpl$2$
|
|
2913
|
+
var _el$2 = _tmpl$2$14();
|
|
2778
2914
|
spread(_el$2, mergeProps(rest, { get ["data-form-field"]() {
|
|
2779
2915
|
return own.name;
|
|
2780
2916
|
} }), false, true);
|
|
@@ -2876,8 +3012,16 @@ injectComponentStyle("hover-card");
|
|
|
2876
3012
|
//#endregion
|
|
2877
3013
|
//#region src/components/icon/index.tsx
|
|
2878
3014
|
var _tmpl$$24 = /*#__PURE__*/ template(`<span>`);
|
|
3015
|
+
var _tmpl$2$13 = /*#__PURE__*/ template(`<svg fill=currentColor aria-hidden=true>`);
|
|
2879
3016
|
function Icon(props) {
|
|
2880
|
-
const [own, rest] = splitProps(props, [
|
|
3017
|
+
const [own, rest] = splitProps(props, [
|
|
3018
|
+
"size",
|
|
3019
|
+
"label",
|
|
3020
|
+
"name",
|
|
3021
|
+
"children"
|
|
3022
|
+
]);
|
|
3023
|
+
const glyph = own.name && own.children == null ? getIcon(own.name) : void 0;
|
|
3024
|
+
if (own.name && own.children == null && !glyph) console.error(`[icons] unknown icon name "${own.name}" — extend packages/icons/icons.config.json and rerun the generator`);
|
|
2881
3025
|
return (() => {
|
|
2882
3026
|
var _el$ = _tmpl$$24();
|
|
2883
3027
|
spread(_el$, mergeProps(rest, {
|
|
@@ -2895,7 +3039,20 @@ function Icon(props) {
|
|
|
2895
3039
|
get ["data-size"]() {
|
|
2896
3040
|
return own.size ?? "inherit";
|
|
2897
3041
|
}
|
|
2898
|
-
}), false,
|
|
3042
|
+
}), false, true);
|
|
3043
|
+
insert(_el$, () => own.children ?? (glyph ? (() => {
|
|
3044
|
+
var _el$2 = _tmpl$2$13();
|
|
3045
|
+
effect((_p$) => {
|
|
3046
|
+
var _v$ = `0 0 ${glyph.width ?? 24} ${glyph.height ?? 24}`, _v$2 = glyph.body;
|
|
3047
|
+
_v$ !== _p$.e && setAttribute(_el$2, "viewBox", _p$.e = _v$);
|
|
3048
|
+
_v$2 !== _p$.t && (_el$2.innerHTML = _p$.t = _v$2);
|
|
3049
|
+
return _p$;
|
|
3050
|
+
}, {
|
|
3051
|
+
e: void 0,
|
|
3052
|
+
t: void 0
|
|
3053
|
+
});
|
|
3054
|
+
return _el$2;
|
|
3055
|
+
})() : null));
|
|
2899
3056
|
return _el$;
|
|
2900
3057
|
})();
|
|
2901
3058
|
}
|
|
@@ -3465,13 +3622,18 @@ const List = Object.assign(Root$4, {
|
|
|
3465
3622
|
});
|
|
3466
3623
|
injectComponentStyle("list");
|
|
3467
3624
|
//#endregion
|
|
3468
|
-
//#region src/components/listbox/index.
|
|
3469
|
-
|
|
3470
|
-
|
|
3471
|
-
|
|
3472
|
-
|
|
3473
|
-
|
|
3474
|
-
|
|
3625
|
+
//#region src/components/listbox/index.tsx
|
|
3626
|
+
const ArkRoot$1 = Listbox$1.Root;
|
|
3627
|
+
function ListboxRoot(props) {
|
|
3628
|
+
const [own, rest] = splitProps(props, ["size"]);
|
|
3629
|
+
return createComponent(ArkRoot$1, mergeProps(rest, { get ["data-size"]() {
|
|
3630
|
+
return own.size ?? "md";
|
|
3631
|
+
} }));
|
|
3632
|
+
}
|
|
3633
|
+
const Listbox = {
|
|
3634
|
+
...Listbox$1,
|
|
3635
|
+
Root: ListboxRoot
|
|
3636
|
+
};
|
|
3475
3637
|
injectComponentStyle("listbox");
|
|
3476
3638
|
//#endregion
|
|
3477
3639
|
//#region src/components/marquee/index.ts
|
|
@@ -3513,13 +3675,37 @@ function Masonry(props) {
|
|
|
3513
3675
|
}
|
|
3514
3676
|
injectComponentStyle("masonry");
|
|
3515
3677
|
//#endregion
|
|
3516
|
-
//#region src/components/menu/index.
|
|
3678
|
+
//#region src/components/menu/index.tsx
|
|
3517
3679
|
/** Ark's Menu, dressed in the paper-and-ink system: a quiet paper vessel on
|
|
3518
3680
|
* elevation, hover as light on the row, checked items as the flat ink fill.
|
|
3519
3681
|
* The API is Ark's own — Root, Trigger, ContextTrigger, Indicator, Positioner,
|
|
3520
3682
|
* Content, Item, ItemText, ItemIndicator, ItemGroup, ItemGroupLabel,
|
|
3521
3683
|
* TriggerItem, Separator, Arrow, ArrowTip. */
|
|
3522
|
-
|
|
3684
|
+
/** The row rung rides the context because Ark's Root renders no DOM of
|
|
3685
|
+
* its own — the vessel (Content) is the element the rung can land on,
|
|
3686
|
+
* and the Portal breaks CSS ancestry between the two. The getter keeps
|
|
3687
|
+
* the rung live, so a bound size retunes an open vessel. */
|
|
3688
|
+
const MenuSizeContext = createContext();
|
|
3689
|
+
function MenuRoot(props) {
|
|
3690
|
+
const [own, rest] = splitProps(props, ["size"]);
|
|
3691
|
+
return createComponent(MenuSizeContext.Provider, {
|
|
3692
|
+
value: () => own.size ?? "md",
|
|
3693
|
+
get children() {
|
|
3694
|
+
return createComponent(Menu$1.Root, rest);
|
|
3695
|
+
}
|
|
3696
|
+
});
|
|
3697
|
+
}
|
|
3698
|
+
function MenuContent(props) {
|
|
3699
|
+
const size = useContext(MenuSizeContext);
|
|
3700
|
+
return createComponent(Menu$1.Content, mergeProps(props, { get ["data-size"]() {
|
|
3701
|
+
return size?.() ?? "md";
|
|
3702
|
+
} }));
|
|
3703
|
+
}
|
|
3704
|
+
const Menu = {
|
|
3705
|
+
...Menu$1,
|
|
3706
|
+
Root: MenuRoot,
|
|
3707
|
+
Content: MenuContent
|
|
3708
|
+
};
|
|
3523
3709
|
injectComponentStyle("menu");
|
|
3524
3710
|
//#endregion
|
|
3525
3711
|
//#region src/components/menubar/index.tsx
|
|
@@ -3739,7 +3925,10 @@ function MentionsVessel(props) {
|
|
|
3739
3925
|
var _el$ = _tmpl$$13();
|
|
3740
3926
|
spread(_el$, mergeProps(contentProps, {
|
|
3741
3927
|
"data-scope": "mentions",
|
|
3742
|
-
"data-part": "popup"
|
|
3928
|
+
"data-part": "popup",
|
|
3929
|
+
get ["data-size"]() {
|
|
3930
|
+
return props.size ?? "md";
|
|
3931
|
+
}
|
|
3743
3932
|
}), false, true);
|
|
3744
3933
|
insert(_el$, createComponent(For, {
|
|
3745
3934
|
get each() {
|
|
@@ -3785,6 +3974,7 @@ function Mentions(props) {
|
|
|
3785
3974
|
"placeholder",
|
|
3786
3975
|
"autoresize",
|
|
3787
3976
|
"invalid",
|
|
3977
|
+
"size",
|
|
3788
3978
|
"onValueChange"
|
|
3789
3979
|
]);
|
|
3790
3980
|
const [internal, setInternal] = createSignal("");
|
|
@@ -3818,7 +4008,10 @@ function Mentions(props) {
|
|
|
3818
4008
|
var _el$3 = _tmpl$$13();
|
|
3819
4009
|
spread(_el$3, mergeProps(rest, {
|
|
3820
4010
|
"data-scope": "mentions",
|
|
3821
|
-
"data-part": "root"
|
|
4011
|
+
"data-part": "root",
|
|
4012
|
+
get ["data-size"]() {
|
|
4013
|
+
return own.size ?? "md";
|
|
4014
|
+
}
|
|
3822
4015
|
}), false, true);
|
|
3823
4016
|
insert(_el$3, createComponent(Textarea, {
|
|
3824
4017
|
ref: (node) => setFieldEl(node),
|
|
@@ -3853,6 +4046,9 @@ function Mentions(props) {
|
|
|
3853
4046
|
get active() {
|
|
3854
4047
|
return mentions.active();
|
|
3855
4048
|
},
|
|
4049
|
+
get size() {
|
|
4050
|
+
return own.size ?? "md";
|
|
4051
|
+
},
|
|
3856
4052
|
get anchor() {
|
|
3857
4053
|
return fieldEl();
|
|
3858
4054
|
},
|
|
@@ -3902,7 +4098,8 @@ function Root$3(props) {
|
|
|
3902
4098
|
"min",
|
|
3903
4099
|
"max",
|
|
3904
4100
|
"level",
|
|
3905
|
-
"label"
|
|
4101
|
+
"label",
|
|
4102
|
+
"size"
|
|
3906
4103
|
]);
|
|
3907
4104
|
const min = () => own.min ?? 0;
|
|
3908
4105
|
const max = () => own.max ?? 100;
|
|
@@ -3929,6 +4126,9 @@ function Root$3(props) {
|
|
|
3929
4126
|
},
|
|
3930
4127
|
"data-scope": "meter",
|
|
3931
4128
|
"data-part": "root",
|
|
4129
|
+
get ["data-size"]() {
|
|
4130
|
+
return own.size ?? "md";
|
|
4131
|
+
},
|
|
3932
4132
|
get ["data-level"]() {
|
|
3933
4133
|
return memo(() => level() !== "normal")() ? level() : void 0;
|
|
3934
4134
|
},
|
|
@@ -3967,12 +4167,17 @@ injectComponentStyle("meter");
|
|
|
3967
4167
|
const NavigationMenu = NavigationMenu$1;
|
|
3968
4168
|
injectComponentStyle("navigation-menu");
|
|
3969
4169
|
//#endregion
|
|
3970
|
-
//#region src/components/number-input/index.
|
|
3971
|
-
|
|
3972
|
-
|
|
3973
|
-
|
|
3974
|
-
|
|
3975
|
-
|
|
4170
|
+
//#region src/components/number-input/index.tsx
|
|
4171
|
+
function NumberInputRoot(props) {
|
|
4172
|
+
const [own, rest] = splitProps(props, ["size"]);
|
|
4173
|
+
return createComponent(NumberInput$1.Root, mergeProps(rest, { get ["data-size"]() {
|
|
4174
|
+
return own.size ?? "md";
|
|
4175
|
+
} }));
|
|
4176
|
+
}
|
|
4177
|
+
const NumberInput = {
|
|
4178
|
+
...NumberInput$1,
|
|
4179
|
+
Root: NumberInputRoot
|
|
4180
|
+
};
|
|
3976
4181
|
injectComponentStyle("number-input");
|
|
3977
4182
|
//#endregion
|
|
3978
4183
|
//#region src/components/page-header/index.tsx
|
|
@@ -4006,29 +4211,43 @@ const PageHeader = Object.assign(Root$2, {
|
|
|
4006
4211
|
});
|
|
4007
4212
|
injectComponentStyle("page-header");
|
|
4008
4213
|
//#endregion
|
|
4009
|
-
//#region src/components/pagination/index.
|
|
4010
|
-
|
|
4011
|
-
|
|
4012
|
-
|
|
4013
|
-
|
|
4014
|
-
|
|
4015
|
-
|
|
4016
|
-
const Pagination =
|
|
4214
|
+
//#region src/components/pagination/index.tsx
|
|
4215
|
+
function PaginationRoot(props) {
|
|
4216
|
+
const [own, rest] = splitProps(props, ["size"]);
|
|
4217
|
+
return createComponent(Pagination$1.Root, mergeProps(rest, { get ["data-size"]() {
|
|
4218
|
+
return own.size ?? "md";
|
|
4219
|
+
} }));
|
|
4220
|
+
}
|
|
4221
|
+
const Pagination = {
|
|
4222
|
+
...Pagination$1,
|
|
4223
|
+
Root: PaginationRoot
|
|
4224
|
+
};
|
|
4017
4225
|
injectComponentStyle("pagination");
|
|
4018
4226
|
//#endregion
|
|
4019
|
-
//#region src/components/password-input/index.
|
|
4020
|
-
|
|
4021
|
-
|
|
4022
|
-
|
|
4023
|
-
|
|
4024
|
-
|
|
4227
|
+
//#region src/components/password-input/index.tsx
|
|
4228
|
+
function PasswordInputRoot(props) {
|
|
4229
|
+
const [own, rest] = splitProps(props, ["size"]);
|
|
4230
|
+
return createComponent(PasswordInput$1.Root, mergeProps(rest, { get ["data-size"]() {
|
|
4231
|
+
return own.size ?? "md";
|
|
4232
|
+
} }));
|
|
4233
|
+
}
|
|
4234
|
+
const PasswordInput = {
|
|
4235
|
+
...PasswordInput$1,
|
|
4236
|
+
Root: PasswordInputRoot
|
|
4237
|
+
};
|
|
4025
4238
|
injectComponentStyle("password-input");
|
|
4026
4239
|
//#endregion
|
|
4027
|
-
//#region src/components/pin-input/index.
|
|
4028
|
-
|
|
4029
|
-
|
|
4030
|
-
|
|
4031
|
-
|
|
4240
|
+
//#region src/components/pin-input/index.tsx
|
|
4241
|
+
function PinInputRoot(props) {
|
|
4242
|
+
const [own, rest] = splitProps(props, ["size"]);
|
|
4243
|
+
return createComponent(PinInput$1.Root, mergeProps(rest, { get ["data-size"]() {
|
|
4244
|
+
return own.size ?? "md";
|
|
4245
|
+
} }));
|
|
4246
|
+
}
|
|
4247
|
+
const PinInput = {
|
|
4248
|
+
...PinInput$1,
|
|
4249
|
+
Root: PinInputRoot
|
|
4250
|
+
};
|
|
4032
4251
|
injectComponentStyle("pin-input");
|
|
4033
4252
|
//#endregion
|
|
4034
4253
|
//#region src/components/popconfirm/index.tsx
|
|
@@ -4111,12 +4330,17 @@ injectComponentStyle("popconfirm");
|
|
|
4111
4330
|
const Popover = Popover$1;
|
|
4112
4331
|
injectComponentStyle("popover");
|
|
4113
4332
|
//#endregion
|
|
4114
|
-
//#region src/components/progress/index.
|
|
4115
|
-
|
|
4116
|
-
|
|
4117
|
-
|
|
4118
|
-
|
|
4119
|
-
|
|
4333
|
+
//#region src/components/progress/index.tsx
|
|
4334
|
+
function ProgressRoot(props) {
|
|
4335
|
+
const [own, rest] = splitProps(props, ["size"]);
|
|
4336
|
+
return createComponent(Progress$1.Root, mergeProps(rest, { get ["data-size"]() {
|
|
4337
|
+
return own.size ?? "md";
|
|
4338
|
+
} }));
|
|
4339
|
+
}
|
|
4340
|
+
const Progress = {
|
|
4341
|
+
...Progress$1,
|
|
4342
|
+
Root: ProgressRoot
|
|
4343
|
+
};
|
|
4120
4344
|
injectComponentStyle("progress");
|
|
4121
4345
|
//#endregion
|
|
4122
4346
|
//#region src/components/progress-group/index.tsx
|
|
@@ -4200,20 +4424,30 @@ injectComponentStyle("progress-group");
|
|
|
4200
4424
|
const QrCode = QrCode$1;
|
|
4201
4425
|
injectComponentStyle("qr-code");
|
|
4202
4426
|
//#endregion
|
|
4203
|
-
//#region src/components/radio-group/index.
|
|
4204
|
-
|
|
4205
|
-
|
|
4206
|
-
|
|
4207
|
-
|
|
4208
|
-
|
|
4427
|
+
//#region src/components/radio-group/index.tsx
|
|
4428
|
+
function RadioGroupRoot(props) {
|
|
4429
|
+
const [own, rest] = splitProps(props, ["size"]);
|
|
4430
|
+
return createComponent(RadioGroup$1.Root, mergeProps(rest, { get ["data-size"]() {
|
|
4431
|
+
return own.size ?? "md";
|
|
4432
|
+
} }));
|
|
4433
|
+
}
|
|
4434
|
+
const RadioGroup = {
|
|
4435
|
+
...RadioGroup$1,
|
|
4436
|
+
Root: RadioGroupRoot
|
|
4437
|
+
};
|
|
4209
4438
|
injectComponentStyle("radio-group");
|
|
4210
4439
|
//#endregion
|
|
4211
|
-
//#region src/components/rating-group/index.
|
|
4212
|
-
|
|
4213
|
-
|
|
4214
|
-
|
|
4215
|
-
|
|
4216
|
-
|
|
4440
|
+
//#region src/components/rating-group/index.tsx
|
|
4441
|
+
function RatingGroupRoot(props) {
|
|
4442
|
+
const [own, rest] = splitProps(props, ["size"]);
|
|
4443
|
+
return createComponent(RatingGroup$1.Root, mergeProps(rest, { get ["data-size"]() {
|
|
4444
|
+
return own.size ?? "md";
|
|
4445
|
+
} }));
|
|
4446
|
+
}
|
|
4447
|
+
const RatingGroup = {
|
|
4448
|
+
...RatingGroup$1,
|
|
4449
|
+
Root: RatingGroupRoot
|
|
4450
|
+
};
|
|
4217
4451
|
injectComponentStyle("rating-group");
|
|
4218
4452
|
//#endregion
|
|
4219
4453
|
//#region src/components/scroll-area/index.ts
|
|
@@ -4223,21 +4457,36 @@ injectComponentStyle("rating-group");
|
|
|
4223
4457
|
const ScrollArea = ScrollArea$1;
|
|
4224
4458
|
injectComponentStyle("scroll-area");
|
|
4225
4459
|
//#endregion
|
|
4226
|
-
//#region src/components/segment-group/index.
|
|
4227
|
-
|
|
4228
|
-
|
|
4229
|
-
|
|
4460
|
+
//#region src/components/segment-group/index.tsx
|
|
4461
|
+
function SegmentGroupRoot(props) {
|
|
4462
|
+
const [own, rest] = splitProps(props, ["size"]);
|
|
4463
|
+
return createComponent$1(SegmentGroup$1.Root, {
|
|
4464
|
+
get "data-size"() {
|
|
4465
|
+
return own.size ?? "md";
|
|
4466
|
+
},
|
|
4467
|
+
...rest
|
|
4468
|
+
});
|
|
4469
|
+
}
|
|
4470
|
+
/** SegmentGroup, dressed in the paper-and-ink system: a hairline tray
|
|
4471
|
+
* where one flat ink plate travels beneath the checked seal. The parts - Root, Label, Indicator, Item, ItemText, ItemControl,
|
|
4230
4472
|
* ItemHiddenInput. */
|
|
4231
|
-
const SegmentGroup =
|
|
4473
|
+
const SegmentGroup = {
|
|
4474
|
+
...SegmentGroup$1,
|
|
4475
|
+
Root: SegmentGroupRoot
|
|
4476
|
+
};
|
|
4232
4477
|
injectComponentStyle("segment-group");
|
|
4233
4478
|
//#endregion
|
|
4234
|
-
//#region src/components/select/index.
|
|
4235
|
-
|
|
4236
|
-
|
|
4237
|
-
|
|
4238
|
-
|
|
4239
|
-
|
|
4240
|
-
|
|
4479
|
+
//#region src/components/select/index.tsx
|
|
4480
|
+
function SelectRoot(props) {
|
|
4481
|
+
const [own, rest] = splitProps(props, ["size"]);
|
|
4482
|
+
return createComponent(Select$1.Root, mergeProps(rest, { get ["data-size"]() {
|
|
4483
|
+
return own.size ?? "md";
|
|
4484
|
+
} }));
|
|
4485
|
+
}
|
|
4486
|
+
const Select = {
|
|
4487
|
+
...Select$1,
|
|
4488
|
+
Root: SelectRoot
|
|
4489
|
+
};
|
|
4241
4490
|
injectComponentStyle("select");
|
|
4242
4491
|
//#endregion
|
|
4243
4492
|
//#region src/components/separator/index.tsx
|
|
@@ -4287,12 +4536,17 @@ function Skeleton(props) {
|
|
|
4287
4536
|
}
|
|
4288
4537
|
injectComponentStyle("skeleton");
|
|
4289
4538
|
//#endregion
|
|
4290
|
-
//#region src/components/slider/index.
|
|
4291
|
-
|
|
4292
|
-
|
|
4293
|
-
|
|
4294
|
-
|
|
4295
|
-
|
|
4539
|
+
//#region src/components/slider/index.tsx
|
|
4540
|
+
function SliderRoot(props) {
|
|
4541
|
+
const [own, rest] = splitProps(props, ["size"]);
|
|
4542
|
+
return createComponent(Slider$1.Root, mergeProps(rest, { get ["data-size"]() {
|
|
4543
|
+
return own.size ?? "md";
|
|
4544
|
+
} }));
|
|
4545
|
+
}
|
|
4546
|
+
const Slider = {
|
|
4547
|
+
...Slider$1,
|
|
4548
|
+
Root: SliderRoot
|
|
4549
|
+
};
|
|
4296
4550
|
injectComponentStyle("slider");
|
|
4297
4551
|
//#endregion
|
|
4298
4552
|
//#region src/components/spinner/index.tsx
|
|
@@ -4528,15 +4782,17 @@ const Stat = Object.assign(Root$1, {
|
|
|
4528
4782
|
});
|
|
4529
4783
|
injectComponentStyle("stat");
|
|
4530
4784
|
//#endregion
|
|
4531
|
-
//#region src/components/steps/index.
|
|
4532
|
-
|
|
4533
|
-
|
|
4534
|
-
|
|
4535
|
-
|
|
4536
|
-
|
|
4537
|
-
|
|
4538
|
-
|
|
4539
|
-
|
|
4785
|
+
//#region src/components/steps/index.tsx
|
|
4786
|
+
function StepsRoot(props) {
|
|
4787
|
+
const [own, rest] = splitProps(props, ["size"]);
|
|
4788
|
+
return createComponent(Steps$1.Root, mergeProps(rest, { get ["data-size"]() {
|
|
4789
|
+
return own.size ?? "md";
|
|
4790
|
+
} }));
|
|
4791
|
+
}
|
|
4792
|
+
const Steps = {
|
|
4793
|
+
...Steps$1,
|
|
4794
|
+
Root: StepsRoot
|
|
4795
|
+
};
|
|
4540
4796
|
injectComponentStyle("steps");
|
|
4541
4797
|
//#endregion
|
|
4542
4798
|
//#region src/components/swap/index.ts
|
|
@@ -4547,12 +4803,17 @@ injectComponentStyle("steps");
|
|
|
4547
4803
|
const Swap = Swap$1;
|
|
4548
4804
|
injectComponentStyle("swap");
|
|
4549
4805
|
//#endregion
|
|
4550
|
-
//#region src/components/switch/index.
|
|
4551
|
-
|
|
4552
|
-
|
|
4553
|
-
|
|
4554
|
-
|
|
4555
|
-
|
|
4806
|
+
//#region src/components/switch/index.tsx
|
|
4807
|
+
function SwitchRoot(props) {
|
|
4808
|
+
const [own, rest] = splitProps(props, ["size"]);
|
|
4809
|
+
return createComponent(Switch$1.Root, mergeProps(rest, { get ["data-size"]() {
|
|
4810
|
+
return own.size ?? "md";
|
|
4811
|
+
} }));
|
|
4812
|
+
}
|
|
4813
|
+
const Switch = {
|
|
4814
|
+
...Switch$1,
|
|
4815
|
+
Root: SwitchRoot
|
|
4816
|
+
};
|
|
4556
4817
|
injectComponentStyle("switch");
|
|
4557
4818
|
//#endregion
|
|
4558
4819
|
//#region src/components/table/index.tsx
|
|
@@ -4716,24 +4977,30 @@ function DataTable(props) {
|
|
|
4716
4977
|
const rows = createMemo(() => table.getRowModel().rows);
|
|
4717
4978
|
/** The declared row height is the density-scale baseline; the live
|
|
4718
4979
|
* scale comes off the document so the virtual window matches what CSS
|
|
4719
|
-
* actually renders.
|
|
4980
|
+
* actually renders. It is read once and re-read only when the density
|
|
4981
|
+
* or scene attribute moves — estimateSize runs on every scroll frame. */
|
|
4720
4982
|
const baseRowHeight = () => props.rowHeight ?? 40;
|
|
4721
|
-
|
|
4983
|
+
let densityScale = 1;
|
|
4984
|
+
const readDensityScale = () => {
|
|
4722
4985
|
const value = Number(getComputedStyle(document.documentElement).getPropertyValue("--bs-density-scale"));
|
|
4723
|
-
|
|
4986
|
+
densityScale = Number.isFinite(value) && value > 0 ? value : 1;
|
|
4724
4987
|
};
|
|
4725
4988
|
const virtualizer = createVirtualizer({
|
|
4726
4989
|
get count() {
|
|
4727
4990
|
return rows().length;
|
|
4728
4991
|
},
|
|
4729
4992
|
getScrollElement: () => viewport(),
|
|
4730
|
-
estimateSize: () => baseRowHeight() * densityScale
|
|
4993
|
+
estimateSize: () => baseRowHeight() * densityScale,
|
|
4731
4994
|
getItemKey: (index) => rows()[index]?.id ?? index,
|
|
4732
4995
|
overscan: 8
|
|
4733
4996
|
});
|
|
4734
4997
|
onMount(() => {
|
|
4735
4998
|
if (typeof MutationObserver === "undefined") return;
|
|
4736
|
-
|
|
4999
|
+
readDensityScale();
|
|
5000
|
+
const densityObserver = new MutationObserver(() => {
|
|
5001
|
+
readDensityScale();
|
|
5002
|
+
virtualizer.measure();
|
|
5003
|
+
});
|
|
4737
5004
|
densityObserver.observe(document.documentElement, {
|
|
4738
5005
|
attributes: true,
|
|
4739
5006
|
attributeFilter: ["data-density", "data-scene"]
|
|
@@ -5165,7 +5432,7 @@ function DataTable(props) {
|
|
|
5165
5432
|
insert(_el$25, () => `${table.getRowCount()} rows`);
|
|
5166
5433
|
insert(_el$26, createComponent(Select.Root, {
|
|
5167
5434
|
get collection() {
|
|
5168
|
-
return createListCollection({ items: (props.pageSizeOptions ?? [
|
|
5435
|
+
return createListCollection$1({ items: (props.pageSizeOptions ?? [
|
|
5169
5436
|
10,
|
|
5170
5437
|
20,
|
|
5171
5438
|
50
|
|
@@ -5280,23 +5547,30 @@ function DataTable(props) {
|
|
|
5280
5547
|
injectComponentStyle("table");
|
|
5281
5548
|
delegateEvents(["click", "input"]);
|
|
5282
5549
|
//#endregion
|
|
5283
|
-
//#region src/components/tabs/index.
|
|
5284
|
-
|
|
5285
|
-
|
|
5286
|
-
|
|
5287
|
-
|
|
5288
|
-
|
|
5289
|
-
|
|
5290
|
-
const Tabs =
|
|
5550
|
+
//#region src/components/tabs/index.tsx
|
|
5551
|
+
function TabsRoot(props) {
|
|
5552
|
+
const [own, rest] = splitProps(props, ["size"]);
|
|
5553
|
+
return createComponent(Tabs$1.Root, mergeProps(rest, { get ["data-size"]() {
|
|
5554
|
+
return own.size ?? "md";
|
|
5555
|
+
} }));
|
|
5556
|
+
}
|
|
5557
|
+
const Tabs = {
|
|
5558
|
+
...Tabs$1,
|
|
5559
|
+
Root: TabsRoot
|
|
5560
|
+
};
|
|
5291
5561
|
injectComponentStyle("tabs");
|
|
5292
5562
|
//#endregion
|
|
5293
|
-
//#region src/components/tags-input/index.
|
|
5294
|
-
|
|
5295
|
-
|
|
5296
|
-
|
|
5297
|
-
|
|
5298
|
-
|
|
5299
|
-
|
|
5563
|
+
//#region src/components/tags-input/index.tsx
|
|
5564
|
+
function TagsInputRoot(props) {
|
|
5565
|
+
const [own, rest] = splitProps(props, ["size"]);
|
|
5566
|
+
return createComponent(TagsInput$1.Root, mergeProps(rest, { get ["data-size"]() {
|
|
5567
|
+
return own.size ?? "md";
|
|
5568
|
+
} }));
|
|
5569
|
+
}
|
|
5570
|
+
const TagsInput = {
|
|
5571
|
+
...TagsInput$1,
|
|
5572
|
+
Root: TagsInputRoot
|
|
5573
|
+
};
|
|
5300
5574
|
injectComponentStyle("tags-input");
|
|
5301
5575
|
//#endregion
|
|
5302
5576
|
//#region src/components/timeline/index.tsx
|
|
@@ -5388,11 +5662,17 @@ const Typography = Object.assign(Display, {
|
|
|
5388
5662
|
});
|
|
5389
5663
|
injectComponentStyle("typography");
|
|
5390
5664
|
//#endregion
|
|
5391
|
-
//#region src/components/toggle-group/index.
|
|
5392
|
-
|
|
5393
|
-
|
|
5394
|
-
|
|
5395
|
-
|
|
5665
|
+
//#region src/components/toggle-group/index.tsx
|
|
5666
|
+
function ToggleGroupRoot(props) {
|
|
5667
|
+
const [own, rest] = splitProps(props, ["size"]);
|
|
5668
|
+
return createComponent(ToggleGroup$1.Root, mergeProps(rest, { get ["data-size"]() {
|
|
5669
|
+
return own.size ?? "md";
|
|
5670
|
+
} }));
|
|
5671
|
+
}
|
|
5672
|
+
const ToggleGroup = {
|
|
5673
|
+
...ToggleGroup$1,
|
|
5674
|
+
Root: ToggleGroupRoot
|
|
5675
|
+
};
|
|
5396
5676
|
injectComponentStyle("toggle-group");
|
|
5397
5677
|
//#endregion
|
|
5398
5678
|
//#region src/components/transfer/index.tsx
|
|
@@ -5595,6 +5875,7 @@ function TreeSelect(props) {
|
|
|
5595
5875
|
"placeholder",
|
|
5596
5876
|
"filterable",
|
|
5597
5877
|
"disabled",
|
|
5878
|
+
"size",
|
|
5598
5879
|
"onValueChange"
|
|
5599
5880
|
]);
|
|
5600
5881
|
const [open, setOpen] = createSignal(false);
|
|
@@ -5715,6 +5996,9 @@ function TreeSelect(props) {
|
|
|
5715
5996
|
"type": "button",
|
|
5716
5997
|
"data-scope": "tree-select",
|
|
5717
5998
|
"data-part": "control",
|
|
5999
|
+
get ["data-size"]() {
|
|
6000
|
+
return own.size ?? "md";
|
|
6001
|
+
},
|
|
5718
6002
|
get ["data-open"]() {
|
|
5719
6003
|
return open() ? "" : void 0;
|
|
5720
6004
|
},
|
|
@@ -5733,6 +6017,9 @@ function TreeSelect(props) {
|
|
|
5733
6017
|
return createComponent(Popover$1.Content, {
|
|
5734
6018
|
"data-scope": "tree-select",
|
|
5735
6019
|
"data-part": "content",
|
|
6020
|
+
get ["data-size"]() {
|
|
6021
|
+
return own.size ?? "md";
|
|
6022
|
+
},
|
|
5736
6023
|
get children() {
|
|
5737
6024
|
return [createComponent(Show, {
|
|
5738
6025
|
get when() {
|
|
@@ -5801,15 +6088,18 @@ function TreeSelect(props) {
|
|
|
5801
6088
|
injectComponentStyle("tree-select");
|
|
5802
6089
|
injectComponentStyle("tree-view");
|
|
5803
6090
|
//#endregion
|
|
5804
|
-
//#region src/components/tree-view/index.
|
|
5805
|
-
|
|
5806
|
-
|
|
5807
|
-
|
|
5808
|
-
|
|
5809
|
-
|
|
5810
|
-
|
|
5811
|
-
|
|
5812
|
-
const TreeView =
|
|
6091
|
+
//#region src/components/tree-view/index.tsx
|
|
6092
|
+
const ArkRoot = TreeView$1.Root;
|
|
6093
|
+
function TreeViewRoot(props) {
|
|
6094
|
+
const [own, rest] = splitProps(props, ["size"]);
|
|
6095
|
+
return createComponent(ArkRoot, mergeProps(rest, { get ["data-size"]() {
|
|
6096
|
+
return own.size ?? "md";
|
|
6097
|
+
} }));
|
|
6098
|
+
}
|
|
6099
|
+
const TreeView = {
|
|
6100
|
+
...TreeView$1,
|
|
6101
|
+
Root: TreeViewRoot
|
|
6102
|
+
};
|
|
5813
6103
|
injectComponentStyle("tree-view");
|
|
5814
6104
|
//#endregion
|
|
5815
6105
|
//#region src/components/watermark/index.tsx
|
|
@@ -5879,4 +6169,4 @@ function Watermark(props) {
|
|
|
5879
6169
|
}
|
|
5880
6170
|
injectComponentStyle("watermark");
|
|
5881
6171
|
//#endregion
|
|
5882
|
-
export { Accordion, Action, Action as AiAction, Affix, Ai, AiActions, Attachment as AiAttachment, Attachment, Attachments as AiAttachments, Attachments, AiContent, AiConversation, AiLoader, Message as AiMessage, Message, PromptInput as AiPromptInput, PromptInput, Reasoning as AiReasoning, Reasoning, Response as AiResponse, Response, Source as AiSource, Source, Sources as AiSources, Sources, Suggestion as AiSuggestion, Suggestion, Tool as AiTool, Tool, Alert, AngleSlider, AspectRatio, AutoComplete, Avatar, AvatarGroup, BackTop, Badge, Banner, Breadcrumb, Button, ButtonGroup, ButtonGroupRoot, Calendar, Card, Carousel, CascadeSelect, Checkbox, CheckboxGroup, Chip, ClientOnly, Clipboard, Collapsible, ColorPicker, Combobox, Command, Comment, ConfigContextKey, ConfigProvider, Container, DataTable, DateInput, DatePicker, Descriptions, Dialog, DownloadTrigger, Drawer, DynamicInput, Editable, Ellipsis, Empty, Field, Fieldset, FileUpload, FlexRender, FloatButton, FloatButtonContextKey, FloatingPanel, FocusTrap, Form, FormField, Format, Frame, Grid, Highlight, HoverCard, Icon, Image, ImageCropper, ImageViewer, Input, InputGroup, JsonTreeView, Kbd, Layout, Link, List, Listbox, Marquee, Masonry, Mentions, MentionsVessel, Menu, Menubar, Meter, NavigationMenu, NumberInput, PageHeader, Pagination, PasswordInput, PinInput, Popconfirm, Popover, Presence, PresenceProvider, Progress, ProgressGroup, QrCode, RadioGroup, RatingGroup, ScrollArea, SegmentGroup, Select, Separator, SignaturePad, Skeleton, Slider, Spinner, SplitButton, Splitter, Stack, Stat, Steps, Swap, Switch, Tabs, TagsInput, Textarea, Timeline, Timer, Toast, Toaster, Toc, Toggle, ToggleGroup, Tooltip, Tour, Transfer, TreeSelect, TreeView, Typography, Watermark, createColumnHelper, createFileTreeCollection, createGridCollection, createToaster, createTreeCollection, useAsyncList, useConfig, useDownload, useListCollection, useListSelection, useMentions, usePresence, usePresenceContext, useTour };
|
|
6172
|
+
export { Accordion, Action, Action as AiAction, Affix, Ai, AiActions, Attachment as AiAttachment, Attachment, Attachments as AiAttachments, Attachments, AiContent, AiConversation, AiLoader, Message as AiMessage, Message, PromptInput as AiPromptInput, PromptInput, Reasoning as AiReasoning, Reasoning, Response as AiResponse, Response, Source as AiSource, Source, Sources as AiSources, Sources, Suggestion as AiSuggestion, Suggestion, Tool as AiTool, Tool, Alert, AngleSlider, AspectRatio, AutoComplete, Avatar, AvatarGroup, BackTop, Badge, Banner, Breadcrumb, Button, ButtonGroup, ButtonGroupRoot, Calendar, Card, Carousel, CascadeSelect, Checkbox, CheckboxGroup, Chip, ClientOnly, Clipboard, Collapsible, ColorPicker, Combobox, Command, Comment, ConfigContextKey, ConfigProvider, Container, DataTable, DateInput, DatePicker, Descriptions, Dialog, DownloadTrigger, Drawer, DynamicInput, Editable, Ellipsis, Empty, Field, Fieldset, FileUpload, FlexRender, FloatButton, FloatButtonContextKey, FloatingPanel, FocusTrap, Form, FormField, Format, Frame, Grid, Highlight, HoverCard, Icon, Image, ImageCropper, ImageViewer, Input, InputGroup, JsonTreeView, Kbd, Layout, Link, List, Listbox, Marquee, Masonry, Mentions, MentionsVessel, Menu, Menubar, Meter, NavigationMenu, NumberInput, PageHeader, Pagination, PasswordInput, PinInput, Popconfirm, Popover, Presence, PresenceProvider, Progress, ProgressGroup, QrCode, RadioGroup, RatingGroup, ScrollArea, SegmentGroup, Select, Separator, SignaturePad, Skeleton, Slider, Spinner, SplitButton, Splitter, Stack, Stat, Steps, Swap, Switch, Tabs, TagsInput, Textarea, Timeline, Timer, Toast, Toaster, Toc, Toggle, ToggleGroup, Tooltip, Tour, Transfer, TreeSelect, TreeView, Typography, Watermark, createColumnHelper, createFileTreeCollection, createGridCollection, createListCollection, createToaster, createTreeCollection, useAsyncList, useConfig, useDownload, useListCollection, useListSelection, useMentions, usePresence, usePresenceContext, useTour };
|