@bysages/solid 0.3.1 → 0.4.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/dist/{ai-response-slzE03wh.mjs → ai-response-D2uINBIi.mjs} +13 -5
- package/dist/chevron-BHQrYKPM.mjs +8 -0
- package/dist/components/accordion/index.d.mts +22 -2
- package/dist/components/accordion/index.mjs +68 -2
- package/dist/components/affix/index.d.mts +3 -1
- package/dist/components/affix/index.mjs +5 -4
- package/dist/components/ai/index.d.mts +1 -1
- package/dist/components/ai/index.mjs +6 -5
- package/dist/components/ai-action/index.d.mts +3 -1
- package/dist/components/ai-action/index.mjs +3 -2
- package/dist/components/ai-attachments/index.d.mts +8 -4
- package/dist/components/ai-attachments/index.mjs +38 -36
- package/dist/components/ai-message/index.d.mts +3 -1
- package/dist/components/ai-message/index.mjs +3 -2
- package/dist/components/ai-prompt-input/index.d.mts +3 -1
- package/dist/components/ai-prompt-input/index.mjs +47 -43
- package/dist/components/ai-reasoning/index.d.mts +3 -1
- package/dist/components/ai-reasoning/index.mjs +4 -3
- package/dist/components/ai-response/index.d.mts +3 -1
- package/dist/components/ai-response/index.mjs +1 -1
- package/dist/components/ai-source/index.d.mts +6 -2
- package/dist/components/ai-source/index.mjs +5 -4
- package/dist/components/ai-suggestion/index.d.mts +3 -1
- package/dist/components/ai-suggestion/index.mjs +3 -2
- package/dist/components/ai-tool/index.d.mts +3 -1
- package/dist/components/ai-tool/index.mjs +4 -3
- package/dist/components/alert/index.mjs +31 -34
- package/dist/components/angle-slider/index.d.mts +1 -1
- package/dist/components/angle-slider/index.mjs +13 -5
- package/dist/components/aspect-ratio/index.d.mts +3 -1
- package/dist/components/aspect-ratio/index.mjs +3 -2
- package/dist/components/autocomplete/index.d.mts +4 -1
- package/dist/components/autocomplete/index.mjs +10 -1
- package/dist/components/avatar/index.d.mts +1 -1
- package/dist/components/avatar/index.mjs +10 -1
- package/dist/components/avatar-group/index.d.mts +3 -1
- package/dist/components/avatar-group/index.mjs +3 -2
- package/dist/components/back-top/index.d.mts +3 -1
- package/dist/components/back-top/index.mjs +9 -5
- package/dist/components/badge/index.d.mts +3 -1
- package/dist/components/badge/index.mjs +3 -2
- package/dist/components/banner/index.mjs +6 -2
- package/dist/components/block-ui/index.d.mts +3 -1
- package/dist/components/block-ui/index.mjs +3 -2
- package/dist/components/button/index.d.mts +3 -1
- package/dist/components/button/index.mjs +3 -2
- package/dist/components/calendar/index.d.mts +3 -1
- package/dist/components/calendar/index.mjs +29 -21
- package/dist/components/carousel/index.d.mts +5 -1
- package/dist/components/carousel/index.mjs +13 -1
- package/dist/components/cascade-select/index.d.mts +3 -1
- package/dist/components/cascade-select/index.mjs +73 -72
- package/dist/components/checkbox/index.d.mts +1 -1
- package/dist/components/checkbox/index.mjs +13 -5
- package/dist/components/checkbox-group/index.d.mts +4 -9
- package/dist/components/checkbox-group/index.mjs +65 -68
- package/dist/components/chip/index.d.mts +3 -1
- package/dist/components/chip/index.mjs +3 -2
- package/dist/components/client-only/index.d.mts +7 -2
- package/dist/components/client-only/index.mjs +8 -1
- package/dist/components/clipboard/index.d.mts +1 -1
- package/dist/components/clipboard/index.mjs +13 -5
- package/dist/components/collapsible/index.d.mts +15 -1
- package/dist/components/collapsible/index.mjs +39 -2
- package/dist/components/color-picker/index.d.mts +13 -2
- package/dist/components/color-picker/index.mjs +95 -8
- package/dist/components/combobox/index.d.mts +24 -1
- package/dist/components/combobox/index.mjs +129 -8
- package/dist/components/command/index.d.mts +4 -1
- package/dist/components/command/index.mjs +13 -1
- package/dist/components/comment/index.d.mts +3 -1
- package/dist/components/comment/index.mjs +3 -2
- package/dist/components/config-provider/index.d.mts +3 -1
- package/dist/components/config-provider/index.mjs +3 -2
- package/dist/components/container/index.d.mts +3 -1
- package/dist/components/container/index.mjs +3 -2
- package/dist/components/data-view/index.d.mts +3 -1
- package/dist/components/data-view/index.mjs +5 -6
- package/dist/components/date-input/index.d.mts +1 -1
- package/dist/components/date-input/index.mjs +13 -5
- package/dist/components/date-picker/index.d.mts +1 -1
- package/dist/components/date-picker/index.mjs +13 -5
- package/dist/components/deferred-content/index.d.mts +3 -1
- package/dist/components/deferred-content/index.mjs +3 -2
- package/dist/components/descriptions/index.d.mts +7 -0
- package/dist/components/descriptions/index.mjs +21 -2
- package/dist/components/dialog/index.d.mts +17 -1
- package/dist/components/dialog/index.mjs +84 -2
- package/dist/components/download-trigger/index.d.mts +7 -2
- package/dist/components/download-trigger/index.mjs +8 -1
- package/dist/components/drawer/index.d.mts +17 -1
- package/dist/components/drawer/index.mjs +83 -2
- package/dist/components/dynamic-input/index.d.mts +3 -1
- package/dist/components/dynamic-input/index.mjs +10 -6
- package/dist/components/editable/index.d.mts +1 -1
- package/dist/components/editable/index.mjs +13 -5
- package/dist/components/ellipsis/index.d.mts +3 -1
- package/dist/components/ellipsis/index.mjs +3 -2
- package/dist/components/field/index.d.mts +5 -1
- package/dist/components/field/index.mjs +13 -1
- package/dist/components/fieldset/index.d.mts +5 -1
- package/dist/components/fieldset/index.mjs +13 -1
- package/dist/components/file-upload/index.d.mts +1 -7
- package/dist/components/file-upload/index.mjs +13 -5
- package/dist/components/floating-panel/index.d.mts +5 -1
- package/dist/components/floating-panel/index.mjs +13 -1
- package/dist/components/focus-trap/index.d.mts +7 -2
- package/dist/components/focus-trap/index.mjs +8 -1
- package/dist/components/form/index.d.mts +1 -1
- package/dist/components/form/index.mjs +10 -4
- package/dist/components/frame/index.d.mts +6 -1
- package/dist/components/frame/index.mjs +10 -1
- package/dist/components/grid/index.d.mts +3 -1
- package/dist/components/grid/index.mjs +3 -2
- package/dist/components/highlight/index.d.mts +3 -1
- package/dist/components/highlight/index.mjs +2 -1
- package/dist/components/hover-card/index.d.mts +19 -1
- package/dist/components/hover-card/index.mjs +91 -2
- package/dist/components/icon/index.d.mts +8 -7
- package/dist/components/icon/index.mjs +4 -3
- package/dist/components/image/index.d.mts +4 -2
- package/dist/components/image/index.mjs +34 -33
- package/dist/components/image-cropper/index.d.mts +5 -1
- package/dist/components/image-cropper/index.mjs +13 -1
- package/dist/components/image-viewer/index.d.mts +2 -23
- package/dist/components/image-viewer/index.mjs +3 -159
- package/dist/components/input/index.d.mts +3 -1
- package/dist/components/input/index.mjs +1 -1
- package/dist/components/json-tree-view/index.d.mts +5 -4
- package/dist/components/json-tree-view/index.mjs +15 -18
- package/dist/components/kbd/index.d.mts +3 -1
- package/dist/components/kbd/index.mjs +3 -2
- package/dist/components/link/index.d.mts +3 -1
- package/dist/components/link/index.mjs +3 -2
- package/dist/components/listbox/index.d.mts +1 -1
- package/dist/components/listbox/index.mjs +13 -5
- package/dist/components/marquee/index.d.mts +5 -1
- package/dist/components/marquee/index.mjs +13 -1
- package/dist/components/masonry/index.d.mts +3 -1
- package/dist/components/masonry/index.mjs +3 -2
- package/dist/components/media-player/index.d.mts +2 -0
- package/dist/components/media-player/index.mjs +2 -0
- package/dist/components/mentions/index.d.mts +1 -1
- package/dist/components/mentions/index.mjs +2 -2
- package/dist/components/menu/index.d.mts +21 -1
- package/dist/components/menu/index.mjs +62 -5
- package/dist/components/menubar/index.d.mts +3 -1
- package/dist/components/menubar/index.mjs +30 -9
- package/dist/components/navigation-menu/index.d.mts +5 -1
- package/dist/components/navigation-menu/index.mjs +13 -1
- package/dist/components/number-input/index.d.mts +1 -1
- package/dist/components/number-input/index.mjs +13 -5
- package/dist/components/order-list/index.d.mts +3 -1
- package/dist/components/order-list/index.mjs +67 -63
- package/dist/components/pagination/index.d.mts +1 -1
- package/dist/components/pagination/index.mjs +13 -5
- package/dist/components/password-input/index.d.mts +1 -1
- package/dist/components/password-input/index.mjs +13 -5
- package/dist/components/pin-input/index.d.mts +1 -1
- package/dist/components/pin-input/index.mjs +13 -5
- package/dist/components/popconfirm/index.d.mts +3 -1
- package/dist/components/popconfirm/index.mjs +16 -8
- package/dist/components/popover/index.d.mts +19 -1
- package/dist/components/popover/index.mjs +91 -2
- package/dist/components/presence/index.d.mts +10 -2
- package/dist/components/presence/index.mjs +9 -1
- package/dist/components/progress/index.d.mts +1 -1
- package/dist/components/progress/index.mjs +13 -5
- package/dist/components/progress-group/index.d.mts +3 -1
- package/dist/components/progress-group/index.mjs +4 -3
- package/dist/components/qr-code/index.d.mts +5 -1
- package/dist/components/qr-code/index.mjs +13 -1
- package/dist/components/radio-group/index.d.mts +1 -1
- package/dist/components/radio-group/index.mjs +13 -5
- package/dist/components/rating-group/index.d.mts +2 -2
- package/dist/components/rating-group/index.mjs +13 -5
- package/dist/components/result/index.d.mts +1 -1
- package/dist/components/result/index.mjs +5 -3
- package/dist/components/scroll-area/index.d.mts +5 -1
- package/dist/components/scroll-area/index.mjs +13 -1
- package/dist/components/segment-group/index.d.mts +1 -1
- package/dist/components/segment-group/index.mjs +11 -6
- package/dist/components/select/index.d.mts +2 -2
- package/dist/components/select/index.mjs +1 -1
- package/dist/components/separator/index.d.mts +3 -1
- package/dist/components/separator/index.mjs +3 -2
- package/dist/components/signature-pad/index.d.mts +5 -1
- package/dist/components/signature-pad/index.mjs +13 -1
- package/dist/components/skeleton/index.d.mts +3 -1
- package/dist/components/skeleton/index.mjs +3 -2
- package/dist/components/slider/index.d.mts +1 -1
- package/dist/components/slider/index.mjs +13 -5
- package/dist/components/spinner/index.d.mts +3 -1
- package/dist/components/spinner/index.mjs +3 -2
- package/dist/components/split-button/index.d.mts +3 -1
- package/dist/components/split-button/index.mjs +14 -3
- package/dist/components/splitter/index.d.mts +5 -1
- package/dist/components/splitter/index.mjs +13 -1
- package/dist/components/spotlight/index.d.mts +3 -1
- package/dist/components/spotlight/index.mjs +3 -2
- package/dist/components/stack/index.d.mts +3 -1
- package/dist/components/stack/index.mjs +6 -5
- package/dist/components/steps/index.d.mts +20 -3
- package/dist/components/steps/index.mjs +66 -7
- package/dist/components/swap/index.d.mts +5 -1
- package/dist/components/swap/index.mjs +13 -1
- package/dist/components/switch/index.d.mts +1 -1
- package/dist/components/switch/index.mjs +13 -5
- package/dist/components/table/index.d.mts +3 -1
- package/dist/components/table/index.mjs +169 -151
- package/dist/components/tabs/index.d.mts +20 -2
- package/dist/components/tabs/index.mjs +59 -3
- package/dist/components/tags-input/index.d.mts +1 -1
- package/dist/components/tags-input/index.mjs +13 -5
- package/dist/components/terminal/index.d.mts +3 -1
- package/dist/components/terminal/index.mjs +3 -2
- package/dist/components/textarea/index.d.mts +3 -1
- package/dist/components/textarea/index.mjs +3 -2
- package/dist/components/timer/index.d.mts +5 -1
- package/dist/components/timer/index.mjs +13 -1
- package/dist/components/toast/index.d.mts +8 -2
- package/dist/components/toast/index.mjs +14 -2
- package/dist/components/toc/index.d.mts +11 -2
- package/dist/components/toc/index.mjs +1 -1
- package/dist/components/toggle/index.d.mts +5 -1
- package/dist/components/toggle/index.mjs +13 -1
- package/dist/components/toggle-group/index.d.mts +1 -1
- package/dist/components/toggle-group/index.mjs +13 -5
- package/dist/components/toolbar/index.d.mts +3 -1
- package/dist/components/toolbar/index.mjs +3 -2
- package/dist/components/tooltip/index.d.mts +16 -1
- package/dist/components/tooltip/index.mjs +55 -2
- package/dist/components/tour/index.d.mts +16 -3
- package/dist/components/tour/index.mjs +74 -9
- package/dist/components/transfer/index.d.mts +3 -1
- package/dist/components/transfer/index.mjs +54 -50
- package/dist/components/tree-select/index.d.mts +3 -1
- package/dist/components/tree-select/index.mjs +37 -30
- package/dist/components/tree-view/index.d.mts +1 -8
- package/dist/components/tree-view/index.mjs +16 -21
- package/dist/components/user/index.d.mts +3 -1
- package/dist/components/user/index.mjs +8 -2
- package/dist/components/virtual-list/index.d.mts +3 -1
- package/dist/components/virtual-list/index.mjs +13 -9
- package/dist/components/watermark/index.d.mts +3 -1
- package/dist/components/watermark/index.mjs +4 -3
- package/dist/element-dGIhOTJ6.mjs +16 -0
- package/dist/family-Cmd8HEyK.mjs +11 -0
- package/dist/icon-DTqmJCd5.mjs +48 -0
- package/dist/id-2ygNzPHF.mjs +12 -0
- package/dist/image-viewer-B9A5lXsk.mjs +228 -0
- package/dist/{index-B1xiJ5ki.d.mts → index-B1-quIrl.d.mts} +6 -2
- package/dist/{index-DDX7x8aT.d.mts → index-DEArHiFI.d.mts} +16 -7
- package/dist/index-DhripUtf.d.mts +39 -0
- package/dist/{index-YPUiqD3n.d.mts → index-ID48LCMU.d.mts} +28 -2
- package/dist/{index-IfofF-SW.d.mts → index-nFXK_8hJ.d.mts} +53 -23
- package/dist/index-wW28BYf1.d.mts +124 -0
- package/dist/index.d.mts +23 -22
- package/dist/index.mjs +13 -12
- package/dist/{input-DoFQ7RXh.mjs → input-CPAJdwDb.mjs} +3 -2
- package/dist/media-player-BC8D_d29.mjs +796 -0
- package/dist/{mentions-f5Js_2W7.mjs → mentions-CeG5u8Qm.mjs} +67 -51
- package/dist/select-7YjMSBGx.mjs +292 -0
- package/dist/{toc-CZmYEaQR.mjs → toc-DYKaKQ_X.mjs} +12 -2
- package/package.json +3 -3
- package/dist/chevron-D5RzcayK.mjs +0 -9
- package/dist/index-DdsnfV4f.d.mts +0 -16
- package/dist/select-CX6OuQlU.mjs +0 -123
|
@@ -11,7 +11,7 @@ type ListboxOwnProps = {
|
|
|
11
11
|
size?: "sm" | "md" | "lg";
|
|
12
12
|
};
|
|
13
13
|
declare function ListboxRoot<T extends CollectionItem>(props: ListboxRootProps<T> & ListboxOwnProps): import("solid-js").JSX.Element;
|
|
14
|
-
export declare const Listbox: Omit<typeof Listbox$1, "Root"> & {
|
|
14
|
+
export declare const Listbox: typeof ListboxRoot & Omit<typeof Listbox$1, "Root"> & {
|
|
15
15
|
Root: typeof ListboxRoot;
|
|
16
16
|
};
|
|
17
17
|
//#endregion
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { t as defineFamily } from "../../family-Cmd8HEyK.mjs";
|
|
2
|
+
import { t as useElementId } from "../../id-2ygNzPHF.mjs";
|
|
1
3
|
import { injectComponentStyle } from "@bysages/core";
|
|
2
4
|
import { createComponent, mergeProps } from "@solidjs/web";
|
|
3
5
|
import { splitProps } from "solid-js";
|
|
@@ -6,14 +8,20 @@ import { Listbox as Listbox$1 } from "@ark-ui/solid/listbox";
|
|
|
6
8
|
const ArkRoot = Listbox$1.Root;
|
|
7
9
|
function ListboxRoot(props) {
|
|
8
10
|
const [own, rest] = splitProps(props, ["size"]);
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
const id = useElementId("listbox", () => rest.id);
|
|
12
|
+
return createComponent(ArkRoot, mergeProps(rest, {
|
|
13
|
+
get id() {
|
|
14
|
+
return id();
|
|
15
|
+
},
|
|
16
|
+
get "data-size"() {
|
|
17
|
+
return own.size ?? "md";
|
|
18
|
+
}
|
|
19
|
+
}));
|
|
12
20
|
}
|
|
13
|
-
const Listbox = {
|
|
21
|
+
const Listbox = defineFamily(ListboxRoot, {
|
|
14
22
|
...Listbox$1,
|
|
15
23
|
Root: ListboxRoot
|
|
16
|
-
};
|
|
24
|
+
});
|
|
17
25
|
injectComponentStyle("listbox");
|
|
18
26
|
//#endregion
|
|
19
27
|
export { Listbox };
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
+
import { ComponentProps } from "solid-js";
|
|
1
2
|
import { Marquee as Marquee$1 } from "@ark-ui/solid/marquee";
|
|
2
3
|
//#region src/components/marquee/index.d.ts
|
|
3
4
|
/** Ark's Marquee, dressed in the paper-and-ink system: a linear ribbon of
|
|
4
5
|
* seal-cut chips that dissolves into the paper at its edges rather than
|
|
5
6
|
* cutting off. The API is Ark's own — Root, Viewport, Content, Edge, Item. */
|
|
6
|
-
|
|
7
|
+
declare function MarqueeRoot(props: ComponentProps<typeof Marquee$1.Root>): import("solid-js").JSX.Element;
|
|
8
|
+
export declare const Marquee: typeof MarqueeRoot & Omit<typeof Marquee$1, "Root"> & {
|
|
9
|
+
Root: typeof MarqueeRoot;
|
|
10
|
+
};
|
|
7
11
|
//#endregion
|
|
@@ -1,10 +1,22 @@
|
|
|
1
|
+
import { t as defineFamily } from "../../family-Cmd8HEyK.mjs";
|
|
2
|
+
import { t as useElementId } from "../../id-2ygNzPHF.mjs";
|
|
1
3
|
import { injectComponentStyle } from "@bysages/core";
|
|
4
|
+
import { createComponent, mergeProps } from "solid-js";
|
|
2
5
|
import { Marquee as Marquee$1 } from "@ark-ui/solid/marquee";
|
|
3
6
|
//#region src/components/marquee/index.ts
|
|
4
7
|
/** Ark's Marquee, dressed in the paper-and-ink system: a linear ribbon of
|
|
5
8
|
* seal-cut chips that dissolves into the paper at its edges rather than
|
|
6
9
|
* cutting off. The API is Ark's own — Root, Viewport, Content, Edge, Item. */
|
|
7
|
-
|
|
10
|
+
function MarqueeRoot(props) {
|
|
11
|
+
const id = useElementId("marquee", () => props.id);
|
|
12
|
+
return createComponent(Marquee$1.Root, mergeProps(props, { get id() {
|
|
13
|
+
return id();
|
|
14
|
+
} }));
|
|
15
|
+
}
|
|
16
|
+
const Marquee = defineFamily(MarqueeRoot, {
|
|
17
|
+
...Marquee$1,
|
|
18
|
+
Root: MarqueeRoot
|
|
19
|
+
});
|
|
8
20
|
injectComponentStyle("marquee");
|
|
9
21
|
//#endregion
|
|
10
22
|
export { Marquee };
|
|
@@ -7,5 +7,7 @@ export interface MasonryProps extends JSX.HTMLAttributes<HTMLDivElement> {
|
|
|
7
7
|
columns?: number;
|
|
8
8
|
gap?: "none" | "xs" | "sm" | "md" | "lg" | "xl";
|
|
9
9
|
}
|
|
10
|
-
export declare
|
|
10
|
+
export declare const Masonry: ((props: MasonryProps) => JSX.Element) & {
|
|
11
|
+
Root: (props: MasonryProps) => JSX.Element;
|
|
12
|
+
};
|
|
11
13
|
//#endregion
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { n as withSelfRoot } from "../../family-Cmd8HEyK.mjs";
|
|
1
2
|
import { injectComponentStyle } from "@bysages/core";
|
|
2
3
|
import { spread, template } from "@solidjs/web";
|
|
3
4
|
import { splitProps } from "solid-js";
|
|
@@ -13,7 +14,7 @@ const gapVars = {
|
|
|
13
14
|
lg: "var(--bs-gap-lg)",
|
|
14
15
|
xl: "var(--bs-gap-xl)"
|
|
15
16
|
};
|
|
16
|
-
function Masonry(props) {
|
|
17
|
+
const Masonry = withSelfRoot(function Masonry(props) {
|
|
17
18
|
injectComponentStyle("masonry");
|
|
18
19
|
const [own, rest] = splitProps(props, ["columns", "gap"]);
|
|
19
20
|
var _el$ = _tmpl$();
|
|
@@ -29,6 +30,6 @@ function Masonry(props) {
|
|
|
29
30
|
"data-part": "root"
|
|
30
31
|
}], false);
|
|
31
32
|
return _el$;
|
|
32
|
-
}
|
|
33
|
+
});
|
|
33
34
|
//#endregion
|
|
34
35
|
export { Masonry };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { a as MediaTextTrackOption, i as MediaSourceOption, n as Video, o as formatMediaTime, r as MediaPlayerProps, t as Audio } from "../../index-wW28BYf1.mjs";
|
|
2
|
+
export { Audio, type MediaPlayerProps, type MediaSourceOption, type MediaTextTrackOption, Video, formatMediaTime };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as MentionsVesselProps, c as useMentions, i as MentionsVessel, n as Mentions, o as UseMentionsHandlers, r as MentionsProps, s as UseMentionsOptions, t as MentionEntry } from "../../index-
|
|
1
|
+
import { a as MentionsVesselProps, c as useMentions, i as MentionsVessel, n as Mentions, o as UseMentionsHandlers, r as MentionsProps, s as UseMentionsOptions, t as MentionEntry } from "../../index-DEArHiFI.mjs";
|
|
2
2
|
export { MentionEntry, Mentions, MentionsProps, MentionsVessel, MentionsVesselProps, type UseMentionsHandlers, type UseMentionsOptions, useMentions };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "../
|
|
2
|
-
import { n as MentionsVessel, r as useMentions, t as Mentions } from "../../mentions-
|
|
1
|
+
import "../popover/index.mjs";
|
|
2
|
+
import { n as MentionsVessel, r as useMentions, t as Mentions } from "../../mentions-CeG5u8Qm.mjs";
|
|
3
3
|
export { Mentions, MentionsVessel, useMentions };
|
|
@@ -6,7 +6,27 @@ type MenuOwnProps = {
|
|
|
6
6
|
};
|
|
7
7
|
declare function MenuRoot(props: Parameters<typeof Menu$1.Root>[0] & MenuOwnProps): import("solid-js").JSX.Element;
|
|
8
8
|
declare function MenuContent(props: Parameters<typeof Menu$1.Content>[0]): import("solid-js").JSX.Element;
|
|
9
|
-
|
|
9
|
+
/** One plain row in the callable menu; richer checkboxes, radios, and
|
|
10
|
+
* nested menus stay on the anatomy. */
|
|
11
|
+
export interface MenuItemOption {
|
|
12
|
+
label: string;
|
|
13
|
+
value: string;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
}
|
|
16
|
+
type MenuPlacement = "top" | "top-start" | "top-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end" | "right" | "right-start" | "right-end";
|
|
17
|
+
export interface MenuFacadeProps {
|
|
18
|
+
open?: boolean;
|
|
19
|
+
defaultOpen?: boolean;
|
|
20
|
+
trigger: string;
|
|
21
|
+
items: MenuItemOption[];
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
placement?: MenuPlacement;
|
|
24
|
+
size?: "sm" | "md" | "lg";
|
|
25
|
+
onSelect?: (value: string) => void;
|
|
26
|
+
onOpenChange?: (open: boolean) => void;
|
|
27
|
+
}
|
|
28
|
+
declare function MenuFacade(props: MenuFacadeProps): import("solid-js").JSX.Element;
|
|
29
|
+
export declare const Menu: typeof MenuFacade & Omit<typeof Menu$1, "Root" | "Content"> & {
|
|
10
30
|
Root: typeof MenuRoot;
|
|
11
31
|
Content: typeof MenuContent;
|
|
12
32
|
};
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import { t as defineFamily } from "../../family-Cmd8HEyK.mjs";
|
|
2
|
+
import { r as iconNode } from "../../icon-DTqmJCd5.mjs";
|
|
3
|
+
import { t as useElementId } from "../../id-2ygNzPHF.mjs";
|
|
1
4
|
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
-
import { createComponent, mergeProps } from "@solidjs/web";
|
|
3
|
-
import { createContext, splitProps, useContext } from "solid-js";
|
|
5
|
+
import { createComponent, memo, mergeProps } from "@solidjs/web";
|
|
6
|
+
import { For, createContext, splitProps, useContext } from "solid-js";
|
|
4
7
|
import { Menu as Menu$1 } from "@ark-ui/solid/menu";
|
|
5
8
|
//#region src/components/menu/index.tsx
|
|
6
9
|
/** Ark's Menu, dressed in the paper-and-ink system: a quiet paper vessel on
|
|
@@ -15,10 +18,13 @@ import { Menu as Menu$1 } from "@ark-ui/solid/menu";
|
|
|
15
18
|
const MenuSizeContext = createContext();
|
|
16
19
|
function MenuRoot(props) {
|
|
17
20
|
const [own, rest] = splitProps(props, ["size"]);
|
|
21
|
+
const id = useElementId("menu", () => rest.id);
|
|
18
22
|
return createComponent(MenuSizeContext.Provider, {
|
|
19
23
|
value: () => own.size ?? "md",
|
|
20
24
|
get children() {
|
|
21
|
-
return createComponent(Menu$1.Root, rest)
|
|
25
|
+
return createComponent(Menu$1.Root, mergeProps(rest, { get id() {
|
|
26
|
+
return id();
|
|
27
|
+
} }));
|
|
22
28
|
}
|
|
23
29
|
});
|
|
24
30
|
}
|
|
@@ -28,11 +34,62 @@ function MenuContent(props) {
|
|
|
28
34
|
return size?.() ?? "md";
|
|
29
35
|
} }));
|
|
30
36
|
}
|
|
31
|
-
|
|
37
|
+
function MenuFacade(props) {
|
|
38
|
+
injectComponentStyle("menu");
|
|
39
|
+
return createComponent(MenuRoot, mergeProps({ get size() {
|
|
40
|
+
return props.size ?? "md";
|
|
41
|
+
} }, () => {
|
|
42
|
+
return props.open === void 0 ? {} : { open: props.open };
|
|
43
|
+
}, () => {
|
|
44
|
+
return props.defaultOpen === void 0 ? {} : { defaultOpen: props.defaultOpen };
|
|
45
|
+
}, () => {
|
|
46
|
+
return props.placement === void 0 ? {} : { positioning: { placement: props.placement } };
|
|
47
|
+
}, {
|
|
48
|
+
onSelect: (details) => props.onSelect?.(details.value),
|
|
49
|
+
onOpenChange: (details) => props.onOpenChange?.(details.open),
|
|
50
|
+
get children() {
|
|
51
|
+
return [createComponent(Menu$1.Trigger, {
|
|
52
|
+
get disabled() {
|
|
53
|
+
return props.disabled;
|
|
54
|
+
},
|
|
55
|
+
get children() {
|
|
56
|
+
return [memo(() => {
|
|
57
|
+
return props.trigger;
|
|
58
|
+
}), createComponent(Menu$1.Indicator, { get children() {
|
|
59
|
+
return iconNode("chevron-down", {
|
|
60
|
+
width: "14",
|
|
61
|
+
height: "14"
|
|
62
|
+
});
|
|
63
|
+
} })];
|
|
64
|
+
}
|
|
65
|
+
}), createComponent(Menu$1.Positioner, { get children() {
|
|
66
|
+
return createComponent(MenuContent, { get children() {
|
|
67
|
+
return createComponent(For, {
|
|
68
|
+
get each() {
|
|
69
|
+
return props.items;
|
|
70
|
+
},
|
|
71
|
+
children: (item) => createComponent(Menu$1.Item, {
|
|
72
|
+
get value() {
|
|
73
|
+
return item.value;
|
|
74
|
+
},
|
|
75
|
+
get disabled() {
|
|
76
|
+
return item.disabled;
|
|
77
|
+
},
|
|
78
|
+
get children() {
|
|
79
|
+
return item.label;
|
|
80
|
+
}
|
|
81
|
+
})
|
|
82
|
+
});
|
|
83
|
+
} });
|
|
84
|
+
} })];
|
|
85
|
+
}
|
|
86
|
+
}));
|
|
87
|
+
}
|
|
88
|
+
const Menu = defineFamily(MenuFacade, {
|
|
32
89
|
...Menu$1,
|
|
33
90
|
Root: MenuRoot,
|
|
34
91
|
Content: MenuContent
|
|
35
|
-
};
|
|
92
|
+
});
|
|
36
93
|
injectComponentStyle("menu");
|
|
37
94
|
//#endregion
|
|
38
95
|
export { Menu };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Menu } from "../menu/index.mjs";
|
|
1
2
|
import { JSX } from "solid-js";
|
|
2
3
|
//#region src/components/menubar/index.d.ts
|
|
3
4
|
export interface MenubarEntry {
|
|
@@ -28,5 +29,6 @@ export interface MenubarProps extends Omit<JSX.HTMLAttributes<HTMLDivElement>, "
|
|
|
28
29
|
* arrow keys — cross-menu arrow traversal is out of scope for this
|
|
29
30
|
* version. Inside an open menu the machine handles arrows and Escape.
|
|
30
31
|
*/
|
|
31
|
-
|
|
32
|
+
declare function MenubarImpl(props: MenubarProps): JSX.Element;
|
|
33
|
+
export declare const Menubar: typeof MenubarImpl & typeof Menu;
|
|
32
34
|
//#endregion
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
+
import { t as defineFamily } from "../../family-Cmd8HEyK.mjs";
|
|
2
|
+
import { t as useElementId } from "../../id-2ygNzPHF.mjs";
|
|
3
|
+
import { Menu as Menu$1 } from "../menu/index.mjs";
|
|
1
4
|
import { injectComponentStyle } from "@bysages/core";
|
|
2
5
|
import { createComponent, insert, spread, template } from "@solidjs/web";
|
|
3
6
|
import { For, splitProps } from "solid-js";
|
|
4
7
|
import { Portal } from "solid-js/web";
|
|
5
8
|
import { Menu } from "@ark-ui/solid/menu";
|
|
6
9
|
//#region src/components/menubar/index.tsx
|
|
7
|
-
var _tmpl$ = /* @__PURE__ */ template(`<div
|
|
10
|
+
var _tmpl$ = /* @__PURE__ */ template(`<div><!><!>`);
|
|
8
11
|
var _tmpl$2 = /* @__PURE__ */ template(`<button>`);
|
|
9
12
|
/**
|
|
10
13
|
* A desktop-style menu bar: a row of quiet ghost triggers, each opening
|
|
@@ -18,12 +21,23 @@ var _tmpl$2 = /* @__PURE__ */ template(`<button>`);
|
|
|
18
21
|
* arrow keys — cross-menu arrow traversal is out of scope for this
|
|
19
22
|
* version. Inside an open menu the machine handles arrows and Escape.
|
|
20
23
|
*/
|
|
21
|
-
function
|
|
24
|
+
function MenubarImpl(props) {
|
|
22
25
|
injectComponentStyle("menubar");
|
|
23
26
|
injectComponentStyle("menu");
|
|
24
|
-
const [own, rest] = splitProps(props, [
|
|
27
|
+
const [own, rest] = splitProps(props, [
|
|
28
|
+
"id",
|
|
29
|
+
"items",
|
|
30
|
+
"onSelect",
|
|
31
|
+
"children"
|
|
32
|
+
]);
|
|
33
|
+
const id = useElementId("menubar", () => own.id);
|
|
25
34
|
var _el$ = _tmpl$();
|
|
35
|
+
var _el$2 = _el$.firstChild;
|
|
36
|
+
var _el$3 = _el$2.nextSibling;
|
|
26
37
|
spread(_el$, [rest, {
|
|
38
|
+
get id() {
|
|
39
|
+
return own.id;
|
|
40
|
+
},
|
|
27
41
|
"data-scope": "menubar",
|
|
28
42
|
"data-part": "root",
|
|
29
43
|
role: "menubar"
|
|
@@ -32,21 +46,24 @@ function Menubar(props) {
|
|
|
32
46
|
get each() {
|
|
33
47
|
return own.items ?? [];
|
|
34
48
|
},
|
|
35
|
-
children: (group) => createComponent(Menu.Root, {
|
|
49
|
+
children: (group, index) => createComponent(Menu.Root, {
|
|
50
|
+
get id() {
|
|
51
|
+
return `${id()}-${index()}`;
|
|
52
|
+
},
|
|
36
53
|
positioning: { placement: "bottom-start" },
|
|
37
54
|
get children() {
|
|
38
55
|
return [createComponent(Menu.Trigger, { asChild: (triggerProps) => (() => {
|
|
39
|
-
var _el$
|
|
40
|
-
spread(_el$
|
|
56
|
+
var _el$4 = _tmpl$2();
|
|
57
|
+
spread(_el$4, [triggerProps, {
|
|
41
58
|
type: "button",
|
|
42
59
|
role: "menuitem",
|
|
43
60
|
"data-scope": "menubar",
|
|
44
61
|
"data-part": "trigger"
|
|
45
62
|
}], true);
|
|
46
|
-
insert(_el$
|
|
63
|
+
insert(_el$4, () => {
|
|
47
64
|
return group.label;
|
|
48
65
|
});
|
|
49
|
-
return _el$
|
|
66
|
+
return _el$4;
|
|
50
67
|
})() }), createComponent(Portal, { get children() {
|
|
51
68
|
return createComponent(Menu.Positioner, { get children() {
|
|
52
69
|
return createComponent(Menu.Content, { get children() {
|
|
@@ -77,8 +94,12 @@ function Menubar(props) {
|
|
|
77
94
|
} })];
|
|
78
95
|
}
|
|
79
96
|
})
|
|
80
|
-
}));
|
|
97
|
+
}), _el$2);
|
|
98
|
+
insert(_el$, () => {
|
|
99
|
+
return own.children;
|
|
100
|
+
}, _el$3);
|
|
81
101
|
return _el$;
|
|
82
102
|
}
|
|
103
|
+
const Menubar = defineFamily(MenubarImpl, Menu$1);
|
|
83
104
|
//#endregion
|
|
84
105
|
export { Menubar };
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
+
import { ComponentProps } from "solid-js";
|
|
1
2
|
import { NavigationMenu as NavigationMenu$1 } from "@ark-ui/solid/navigation-menu";
|
|
2
3
|
//#region src/components/navigation-menu/index.d.ts
|
|
3
4
|
/** Ark's NavigationMenu, dressed in the paper-and-ink system: a menubar of
|
|
4
5
|
* ghost triggers with one sliding stroke of primary ink, opening the shared
|
|
5
6
|
* popup vessel. The API is Ark's own — Root, List, Item, Trigger, Link,
|
|
6
7
|
* Content, ViewportPositioner, Viewport, Indicator, ItemIndicator, Arrow. */
|
|
7
|
-
|
|
8
|
+
declare function NavigationMenuRoot(props: ComponentProps<typeof NavigationMenu$1.Root>): import("solid-js").JSX.Element;
|
|
9
|
+
export declare const NavigationMenu: typeof NavigationMenuRoot & Omit<typeof NavigationMenu$1, "Root"> & {
|
|
10
|
+
Root: typeof NavigationMenuRoot;
|
|
11
|
+
};
|
|
8
12
|
//#endregion
|
|
@@ -1,11 +1,23 @@
|
|
|
1
|
+
import { t as defineFamily } from "../../family-Cmd8HEyK.mjs";
|
|
2
|
+
import { t as useElementId } from "../../id-2ygNzPHF.mjs";
|
|
1
3
|
import { injectComponentStyle } from "@bysages/core";
|
|
4
|
+
import { createComponent, mergeProps } from "solid-js";
|
|
2
5
|
import { NavigationMenu as NavigationMenu$1 } from "@ark-ui/solid/navigation-menu";
|
|
3
6
|
//#region src/components/navigation-menu/index.ts
|
|
4
7
|
/** Ark's NavigationMenu, dressed in the paper-and-ink system: a menubar of
|
|
5
8
|
* ghost triggers with one sliding stroke of primary ink, opening the shared
|
|
6
9
|
* popup vessel. The API is Ark's own — Root, List, Item, Trigger, Link,
|
|
7
10
|
* Content, ViewportPositioner, Viewport, Indicator, ItemIndicator, Arrow. */
|
|
8
|
-
|
|
11
|
+
function NavigationMenuRoot(props) {
|
|
12
|
+
const id = useElementId("navigation-menu", () => props.id);
|
|
13
|
+
return createComponent(NavigationMenu$1.Root, mergeProps(props, { get id() {
|
|
14
|
+
return id();
|
|
15
|
+
} }));
|
|
16
|
+
}
|
|
17
|
+
const NavigationMenu = defineFamily(NavigationMenuRoot, {
|
|
18
|
+
...NavigationMenu$1,
|
|
19
|
+
Root: NavigationMenuRoot
|
|
20
|
+
});
|
|
9
21
|
injectComponentStyle("navigation-menu");
|
|
10
22
|
//#endregion
|
|
11
23
|
export { NavigationMenu };
|
|
@@ -9,7 +9,7 @@ type NumberInputOwnProps = {
|
|
|
9
9
|
size?: "sm" | "md" | "lg";
|
|
10
10
|
};
|
|
11
11
|
declare function NumberInputRoot(props: NumberInputRootProps & NumberInputOwnProps): import("solid-js").JSX.Element;
|
|
12
|
-
export declare const NumberInput: Omit<typeof NumberInput$1, "Root"> & {
|
|
12
|
+
export declare const NumberInput: typeof NumberInputRoot & Omit<typeof NumberInput$1, "Root"> & {
|
|
13
13
|
Root: typeof NumberInputRoot;
|
|
14
14
|
};
|
|
15
15
|
//#endregion
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { t as defineFamily } from "../../family-Cmd8HEyK.mjs";
|
|
2
|
+
import { t as useElementId } from "../../id-2ygNzPHF.mjs";
|
|
1
3
|
import { injectComponentStyle } from "@bysages/core";
|
|
2
4
|
import { createComponent, mergeProps } from "@solidjs/web";
|
|
3
5
|
import { splitProps } from "solid-js";
|
|
@@ -5,14 +7,20 @@ import { NumberInput as NumberInput$1 } from "@ark-ui/solid/number-input";
|
|
|
5
7
|
//#region src/components/number-input/index.tsx
|
|
6
8
|
function NumberInputRoot(props) {
|
|
7
9
|
const [own, rest] = splitProps(props, ["size"]);
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
const id = useElementId("number-input", () => rest.id);
|
|
11
|
+
return createComponent(NumberInput$1.Root, mergeProps(rest, {
|
|
12
|
+
get id() {
|
|
13
|
+
return id();
|
|
14
|
+
},
|
|
15
|
+
get "data-size"() {
|
|
16
|
+
return own.size ?? "md";
|
|
17
|
+
}
|
|
18
|
+
}));
|
|
11
19
|
}
|
|
12
|
-
const NumberInput = {
|
|
20
|
+
const NumberInput = defineFamily(NumberInputRoot, {
|
|
13
21
|
...NumberInput$1,
|
|
14
22
|
Root: NumberInputRoot
|
|
15
|
-
};
|
|
23
|
+
});
|
|
16
24
|
injectComponentStyle("number-input");
|
|
17
25
|
//#endregion
|
|
18
26
|
export { NumberInput };
|
|
@@ -17,5 +17,7 @@ export interface OrderListProps extends JSX.HTMLAttributes<HTMLDivElement> {
|
|
|
17
17
|
* the model is the order. Dragging rides the native drag events — a
|
|
18
18
|
* hairline of primary ink marks the seam the row will land on — so
|
|
19
19
|
* touch keeps the buttons as its route. */
|
|
20
|
-
export declare
|
|
20
|
+
export declare const OrderList: ((props: OrderListProps) => JSX.Element) & {
|
|
21
|
+
Root: (props: OrderListProps) => JSX.Element;
|
|
22
|
+
};
|
|
21
23
|
//#endregion
|
|
@@ -1,39 +1,44 @@
|
|
|
1
|
+
import { n as withSelfRoot } from "../../family-Cmd8HEyK.mjs";
|
|
2
|
+
import { r as iconNode } from "../../icon-DTqmJCd5.mjs";
|
|
1
3
|
import { n as useComponentMessages } from "../../use-component-messages-C4SCVYjD.mjs";
|
|
2
4
|
import { injectComponentStyle } from "@bysages/core";
|
|
3
5
|
import { createComponent, delegateEvents, effect, insert, setAttribute, spread, template } from "@solidjs/web";
|
|
4
|
-
import { For, createSignal,
|
|
6
|
+
import { For, createSignal, splitProps } from "solid-js";
|
|
5
7
|
//#region src/components/order-list/index.tsx
|
|
6
|
-
var _tmpl$ = /* @__PURE__ */ template(`<
|
|
7
|
-
var _tmpl$2 = /* @__PURE__ */ template(`<
|
|
8
|
-
var _tmpl$3 = /* @__PURE__ */ template(`<div><ol data-scope=order-list data-part=list>`);
|
|
9
|
-
var _tmpl$4 = /* @__PURE__ */ template(`<li draggable aria-roledescription="Sortable item"data-scope=order-list data-part=item><span data-scope=order-list data-part=grip aria-hidden=true>⋮⋮</span><span data-scope=order-list data-part=label></span><span data-scope=order-list data-part=controls><button type=button data-scope=order-list data-part=move></button><button type=button data-scope=order-list data-part=move></button><button type=button data-scope=order-list data-part=move></button><button type=button data-scope=order-list data-part=move>`);
|
|
8
|
+
var _tmpl$ = /* @__PURE__ */ template(`<div><ol data-scope=order-list data-part=list>`);
|
|
9
|
+
var _tmpl$2 = /* @__PURE__ */ template(`<li draggable aria-roledescription="Sortable item"data-scope=order-list data-part=item><span data-scope=order-list data-part=grip aria-hidden=true>⋮⋮</span><span data-scope=order-list data-part=label></span><span data-scope=order-list data-part=controls><button type=button data-scope=order-list data-part=move></button><button type=button data-scope=order-list data-part=move></button><button type=button data-scope=order-list data-part=move></button><button type=button data-scope=order-list data-part=move>`);
|
|
10
10
|
const ARROWS = {
|
|
11
|
-
up:
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
up: {
|
|
12
|
+
name: "chevron-up",
|
|
13
|
+
rail: ""
|
|
14
|
+
},
|
|
15
|
+
down: {
|
|
16
|
+
name: "chevron-down",
|
|
17
|
+
rail: ""
|
|
18
|
+
},
|
|
19
|
+
top: {
|
|
20
|
+
name: "chevron-up",
|
|
21
|
+
rail: "<path d=\"M5 4h14\"/>"
|
|
22
|
+
},
|
|
23
|
+
bottom: {
|
|
24
|
+
name: "chevron-down",
|
|
25
|
+
rail: "<path d=\"M5 20h14\"/>"
|
|
26
|
+
}
|
|
15
27
|
};
|
|
16
|
-
function
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
var _el$2 = _tmpl$2();
|
|
22
|
-
setAttribute(_el$2, "d", d);
|
|
23
|
-
return _el$2;
|
|
24
|
-
})()
|
|
25
|
-
}));
|
|
26
|
-
return _el$;
|
|
28
|
+
function arrowIcon(arrow) {
|
|
29
|
+
return iconNode(arrow.name, {
|
|
30
|
+
width: "12",
|
|
31
|
+
height: "12"
|
|
32
|
+
}, arrow.rail);
|
|
27
33
|
}
|
|
28
34
|
/** A ledger the reader may rewrite: rows move by grip or by the side
|
|
29
35
|
* arrows, and the group reports the new order as the value itself —
|
|
30
36
|
* the model is the order. Dragging rides the native drag events — a
|
|
31
37
|
* hairline of primary ink marks the seam the row will land on — so
|
|
32
38
|
* touch keeps the buttons as its route. */
|
|
33
|
-
function OrderList(props) {
|
|
39
|
+
const OrderList = withSelfRoot(function OrderList(props) {
|
|
34
40
|
const messages = useComponentMessages();
|
|
35
41
|
injectComponentStyle("order-list");
|
|
36
|
-
const uid = createUniqueId();
|
|
37
42
|
const [own, rest] = splitProps(props, [
|
|
38
43
|
"value",
|
|
39
44
|
"options",
|
|
@@ -68,34 +73,33 @@ function OrderList(props) {
|
|
|
68
73
|
own.onValueChange?.(next);
|
|
69
74
|
reset();
|
|
70
75
|
}
|
|
71
|
-
var _el$
|
|
72
|
-
var _el$
|
|
73
|
-
spread(_el
|
|
76
|
+
var _el$ = _tmpl$();
|
|
77
|
+
var _el$2 = _el$.firstChild;
|
|
78
|
+
spread(_el$, [rest, {
|
|
74
79
|
"data-scope": "order-list",
|
|
75
80
|
"data-part": "root",
|
|
76
|
-
"data-uid": uid,
|
|
77
81
|
onDragLeave: (event) => {
|
|
78
82
|
const host = event.currentTarget;
|
|
79
83
|
if (!event.relatedTarget || !host.contains(event.relatedTarget)) setDropLine(null);
|
|
80
84
|
}
|
|
81
85
|
}], true);
|
|
82
|
-
insert(_el$
|
|
86
|
+
insert(_el$2, createComponent(For, {
|
|
83
87
|
get each() {
|
|
84
88
|
return rows();
|
|
85
89
|
},
|
|
86
90
|
children: (option, index) => {
|
|
87
91
|
const seam = () => dropLine() && dropLine().index === index() ? dropLine().before ? "top" : "bottom" : void 0;
|
|
88
|
-
var _el$
|
|
89
|
-
var _el$
|
|
90
|
-
var _el$
|
|
92
|
+
var _el$3 = _tmpl$2();
|
|
93
|
+
var _el$5 = _el$3.firstChild.nextSibling;
|
|
94
|
+
var _el$7 = _el$5.nextSibling.firstChild;
|
|
95
|
+
var _el$8 = _el$7.nextSibling;
|
|
96
|
+
var _el$9 = _el$8.nextSibling;
|
|
91
97
|
var _el$10 = _el$9.nextSibling;
|
|
92
|
-
|
|
93
|
-
var _el$12 = _el$11.nextSibling;
|
|
94
|
-
_el$5.addEventListener("drop", (event) => {
|
|
98
|
+
_el$3.addEventListener("drop", (event) => {
|
|
95
99
|
event.preventDefault();
|
|
96
100
|
drop();
|
|
97
101
|
});
|
|
98
|
-
_el$
|
|
102
|
+
_el$3.addEventListener("dragover", (event) => {
|
|
99
103
|
event.preventDefault();
|
|
100
104
|
if (event.dataTransfer) event.dataTransfer.dropEffect = "move";
|
|
101
105
|
const rect = event.currentTarget.getBoundingClientRect();
|
|
@@ -105,30 +109,30 @@ function OrderList(props) {
|
|
|
105
109
|
before
|
|
106
110
|
} : null);
|
|
107
111
|
});
|
|
108
|
-
_el$
|
|
109
|
-
_el$
|
|
112
|
+
_el$3.addEventListener("dragend", reset);
|
|
113
|
+
_el$3.addEventListener("dragstart", (event) => {
|
|
110
114
|
setDragging(option.value);
|
|
111
115
|
event.dataTransfer?.setData("text/plain", option.value);
|
|
112
116
|
if (event.dataTransfer) event.dataTransfer.effectAllowed = "move";
|
|
113
117
|
});
|
|
114
|
-
insert(_el$
|
|
118
|
+
insert(_el$5, () => {
|
|
115
119
|
return option.label;
|
|
116
120
|
});
|
|
117
|
-
_el$
|
|
118
|
-
insert(_el$
|
|
119
|
-
return
|
|
121
|
+
_el$7._$$click = () => move(option.value, -index());
|
|
122
|
+
insert(_el$7, () => {
|
|
123
|
+
return arrowIcon(ARROWS.top);
|
|
120
124
|
});
|
|
121
|
-
_el$
|
|
122
|
-
insert(_el$
|
|
123
|
-
return
|
|
125
|
+
_el$8._$$click = () => move(option.value, -1);
|
|
126
|
+
insert(_el$8, () => {
|
|
127
|
+
return arrowIcon(ARROWS.up);
|
|
124
128
|
});
|
|
125
|
-
_el$
|
|
126
|
-
insert(_el$
|
|
127
|
-
return
|
|
129
|
+
_el$9._$$click = () => move(option.value, 1);
|
|
130
|
+
insert(_el$9, () => {
|
|
131
|
+
return arrowIcon(ARROWS.down);
|
|
128
132
|
});
|
|
129
|
-
_el$
|
|
130
|
-
insert(_el$
|
|
131
|
-
return
|
|
133
|
+
_el$10._$$click = () => move(option.value, rows().length - 1 - index());
|
|
134
|
+
insert(_el$10, () => {
|
|
135
|
+
return arrowIcon(ARROWS.bottom);
|
|
132
136
|
});
|
|
133
137
|
effect(() => {
|
|
134
138
|
return {
|
|
@@ -144,25 +148,25 @@ function OrderList(props) {
|
|
|
144
148
|
d: index() === rows().length - 1
|
|
145
149
|
};
|
|
146
150
|
}, ({ e, t, a, o, i, n, s, h, r, d }, _p$) => {
|
|
147
|
-
e !== _p$?.e && setAttribute(_el$
|
|
148
|
-
t !== _p$?.t && setAttribute(_el$
|
|
149
|
-
a !== _p$?.a && setAttribute(_el$
|
|
150
|
-
o !== _p$?.o && setAttribute(_el$
|
|
151
|
-
i !== _p$?.i && setAttribute(_el$
|
|
152
|
-
n !== _p$?.n && setAttribute(_el$
|
|
153
|
-
s !== _p$?.s && setAttribute(_el$
|
|
154
|
-
h !== _p$?.h && setAttribute(_el$
|
|
155
|
-
r !== _p$?.r && setAttribute(_el$
|
|
156
|
-
d !== _p$?.d && setAttribute(_el$
|
|
151
|
+
e !== _p$?.e && setAttribute(_el$3, "data-dragging", e);
|
|
152
|
+
t !== _p$?.t && setAttribute(_el$3, "data-drop-line", t);
|
|
153
|
+
a !== _p$?.a && setAttribute(_el$7, "aria-label", a);
|
|
154
|
+
o !== _p$?.o && setAttribute(_el$7, "disabled", o);
|
|
155
|
+
i !== _p$?.i && setAttribute(_el$8, "aria-label", i);
|
|
156
|
+
n !== _p$?.n && setAttribute(_el$8, "disabled", n);
|
|
157
|
+
s !== _p$?.s && setAttribute(_el$9, "aria-label", s);
|
|
158
|
+
h !== _p$?.h && setAttribute(_el$9, "disabled", h);
|
|
159
|
+
r !== _p$?.r && setAttribute(_el$10, "aria-label", r);
|
|
160
|
+
d !== _p$?.d && setAttribute(_el$10, "disabled", d);
|
|
157
161
|
});
|
|
158
|
-
return _el$
|
|
162
|
+
return _el$3;
|
|
159
163
|
}
|
|
160
164
|
}));
|
|
161
165
|
effect(() => own.label, (_v$) => {
|
|
162
|
-
setAttribute(_el$
|
|
166
|
+
setAttribute(_el$2, "aria-label", _v$);
|
|
163
167
|
});
|
|
164
|
-
return _el
|
|
165
|
-
}
|
|
168
|
+
return _el$;
|
|
169
|
+
});
|
|
166
170
|
delegateEvents(["click"]);
|
|
167
171
|
//#endregion
|
|
168
172
|
export { OrderList };
|