@bysages/solid 0.4.0 → 0.4.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/{ai-response-D2uINBIi.mjs → ai-response-CJ-uEAgj.mjs} +1 -1
- package/dist/components/accordion/index.mjs +1 -1
- package/dist/components/affix/index.mjs +3 -3
- package/dist/components/ai/index.d.mts +1 -1
- package/dist/components/ai/index.mjs +2 -2
- package/dist/components/ai-action/index.mjs +1 -1
- package/dist/components/ai-attachments/index.mjs +1 -1
- package/dist/components/ai-message/index.mjs +1 -1
- package/dist/components/ai-prompt-input/index.mjs +38 -36
- package/dist/components/ai-reasoning/index.mjs +1 -1
- package/dist/components/ai-response/index.mjs +1 -1
- package/dist/components/ai-source/index.mjs +1 -1
- package/dist/components/ai-suggestion/index.mjs +1 -1
- package/dist/components/ai-tool/index.mjs +1 -1
- package/dist/components/alert/index.mjs +1 -1
- package/dist/components/angle-slider/index.d.mts +15 -1
- package/dist/components/angle-slider/index.mjs +58 -3
- package/dist/components/aspect-ratio/index.mjs +1 -1
- package/dist/components/autocomplete/index.mjs +9 -3
- package/dist/components/avatar/index.mjs +1 -1
- package/dist/components/avatar-group/index.mjs +1 -1
- package/dist/components/back-top/index.mjs +1 -1
- package/dist/components/badge/index.mjs +1 -1
- package/dist/components/banner/index.mjs +1 -1
- package/dist/components/bento/index.mjs +1 -1
- package/dist/components/block-ui/index.mjs +1 -1
- package/dist/components/breadcrumb/index.mjs +1 -1
- package/dist/components/browser/index.mjs +1 -1
- package/dist/components/button/index.mjs +1 -1
- package/dist/components/button-group/index.mjs +1 -1
- package/dist/components/calendar/index.d.mts +19 -7
- package/dist/components/calendar/index.mjs +213 -139
- package/dist/components/card/index.mjs +1 -1
- package/dist/components/carousel/index.d.mts +15 -1
- package/dist/components/carousel/index.mjs +69 -5
- package/dist/components/cascade-select/index.mjs +2 -2
- package/dist/components/checkbox/index.d.mts +16 -1
- package/dist/components/checkbox/index.mjs +54 -3
- package/dist/components/checkbox-group/index.d.mts +10 -3
- package/dist/components/checkbox-group/index.mjs +3 -3
- package/dist/components/chip/index.d.mts +1 -1
- package/dist/components/chip/index.mjs +1 -1
- package/dist/components/clipboard/index.d.mts +14 -1
- package/dist/components/clipboard/index.mjs +58 -3
- package/dist/components/collapsible/index.mjs +1 -1
- package/dist/components/color-picker/index.mjs +1 -1
- package/dist/components/combobox/index.mjs +1 -1
- package/dist/components/command/index.mjs +1 -1
- package/dist/components/comment/index.mjs +1 -1
- package/dist/components/container/index.mjs +1 -1
- package/dist/components/data-view/index.mjs +1 -1
- package/dist/components/date-input/index.d.mts +16 -2
- package/dist/components/date-input/index.mjs +52 -3
- package/dist/components/date-picker/index.d.mts +27 -2
- package/dist/components/date-picker/index.mjs +153 -4
- package/dist/components/deferred-content/index.mjs +1 -1
- package/dist/components/descriptions/index.mjs +1 -1
- package/dist/components/dialog/index.mjs +1 -1
- package/dist/components/dock/index.mjs +1 -1
- package/dist/components/drawer/index.mjs +1 -1
- package/dist/components/dynamic-input/index.mjs +2 -2
- package/dist/components/editable/index.d.mts +17 -1
- package/dist/components/editable/index.mjs +81 -3
- package/dist/components/ellipsis/index.mjs +1 -1
- package/dist/components/empty/index.mjs +1 -1
- package/dist/components/field/index.d.mts +16 -1
- package/dist/components/field/index.mjs +53 -5
- package/dist/components/fieldset/index.d.mts +15 -3
- package/dist/components/fieldset/index.mjs +47 -5
- package/dist/components/file-upload/index.d.mts +21 -1
- package/dist/components/file-upload/index.mjs +66 -3
- package/dist/components/float-button/index.mjs +1 -1
- package/dist/components/floating-panel/index.d.mts +15 -3
- package/dist/components/floating-panel/index.mjs +113 -5
- package/dist/components/form/index.d.mts +44 -2
- package/dist/components/form/index.mjs +1 -1
- package/dist/components/grid/index.mjs +1 -1
- package/dist/components/highlight/index.mjs +1 -1
- package/dist/components/hover-card/index.mjs +1 -1
- package/dist/components/icon/index.mjs +1 -1
- package/dist/components/image/index.mjs +1 -1
- package/dist/components/image-cropper/index.d.mts +8 -1
- package/dist/components/image-cropper/index.mjs +43 -5
- package/dist/components/image-viewer/index.mjs +1 -1
- package/dist/components/input/index.mjs +1 -1
- package/dist/components/input-group/index.mjs +1 -1
- package/dist/components/json-tree-view/index.d.mts +11 -2
- package/dist/components/json-tree-view/index.mjs +17 -2
- package/dist/components/kbd/index.mjs +1 -1
- package/dist/components/layout/index.mjs +1 -1
- package/dist/components/link/index.mjs +1 -1
- package/dist/components/list/index.mjs +1 -1
- package/dist/components/listbox/index.d.mts +21 -1
- package/dist/components/listbox/index.mjs +59 -4
- package/dist/components/marquee/index.d.mts +12 -1
- package/dist/components/marquee/index.mjs +46 -5
- package/dist/components/masonry/index.mjs +1 -1
- package/dist/components/media-player/index.mjs +1 -1
- package/dist/components/mentions/index.mjs +1 -1
- package/dist/components/menu/index.mjs +1 -1
- package/dist/components/menubar/index.mjs +1 -1
- package/dist/components/meter/index.mjs +1 -1
- package/dist/components/navigation-menu/index.d.mts +17 -1
- package/dist/components/navigation-menu/index.mjs +66 -6
- package/dist/components/number-input/index.d.mts +20 -1
- package/dist/components/number-input/index.mjs +72 -3
- package/dist/components/order-list/index.mjs +1 -1
- package/dist/components/page-header/index.mjs +1 -1
- package/dist/components/pagination/index.d.mts +22 -2
- package/dist/components/pagination/index.mjs +105 -6
- package/dist/components/password-input/index.d.mts +18 -1
- package/dist/components/password-input/index.mjs +57 -3
- package/dist/components/pin-input/index.d.mts +18 -1
- package/dist/components/pin-input/index.mjs +55 -3
- package/dist/components/popconfirm/index.mjs +1 -1
- package/dist/components/popover/index.mjs +1 -1
- package/dist/components/progress/index.d.mts +19 -1
- package/dist/components/progress/index.mjs +106 -7
- package/dist/components/progress-group/index.mjs +1 -1
- package/dist/components/qr-code/index.d.mts +8 -1
- package/dist/components/qr-code/index.mjs +22 -5
- package/dist/components/radio-group/index.d.mts +23 -1
- package/dist/components/radio-group/index.mjs +66 -3
- package/dist/components/rating-group/index.d.mts +15 -1
- package/dist/components/rating-group/index.mjs +52 -3
- package/dist/components/result/index.mjs +1 -1
- package/dist/components/scroll-area/index.d.mts +11 -3
- package/dist/components/scroll-area/index.mjs +37 -5
- package/dist/components/segment-group/index.d.mts +27 -4
- package/dist/components/segment-group/index.mjs +66 -7
- package/dist/components/select/index.mjs +1 -1
- package/dist/components/separator/index.mjs +1 -1
- package/dist/components/signature-pad/index.d.mts +16 -1
- package/dist/components/signature-pad/index.mjs +64 -5
- package/dist/components/skeleton/index.mjs +1 -1
- package/dist/components/slider/index.d.mts +20 -1
- package/dist/components/slider/index.mjs +67 -3
- package/dist/components/spinner/index.mjs +1 -1
- package/dist/components/split-button/index.mjs +1 -1
- package/dist/components/splitter/index.d.mts +15 -1
- package/dist/components/splitter/index.mjs +58 -5
- package/dist/components/spotlight/index.mjs +1 -1
- package/dist/components/stack/index.mjs +1 -1
- package/dist/components/stat/index.mjs +1 -1
- package/dist/components/steps/index.d.mts +5 -1
- package/dist/components/steps/index.mjs +10 -3
- package/dist/components/swap/index.d.mts +11 -3
- package/dist/components/swap/index.mjs +35 -5
- package/dist/components/switch/index.d.mts +16 -1
- package/dist/components/switch/index.mjs +48 -3
- package/dist/components/table/index.d.mts +2 -0
- package/dist/components/table/index.mjs +36 -14
- package/dist/components/tabs/index.mjs +1 -1
- package/dist/components/tag/index.d.mts +29 -0
- package/dist/components/tag/index.mjs +108 -0
- package/dist/components/tags-input/index.d.mts +18 -1
- package/dist/components/tags-input/index.mjs +83 -3
- package/dist/components/terminal/index.mjs +1 -1
- package/dist/components/textarea/index.mjs +1 -1
- package/dist/components/timeline/index.mjs +1 -1
- package/dist/components/timer/index.d.mts +12 -1
- package/dist/components/timer/index.mjs +57 -5
- package/dist/components/toast/index.d.mts +10 -5
- package/dist/components/toast/index.mjs +38 -6
- package/dist/components/toc/index.d.mts +2 -11
- package/dist/components/toc/index.mjs +1 -1
- package/dist/components/toggle/index.d.mts +8 -1
- package/dist/components/toggle/index.mjs +27 -5
- package/dist/components/toggle-group/index.d.mts +23 -1
- package/dist/components/toggle-group/index.mjs +58 -4
- package/dist/components/toolbar/index.mjs +1 -1
- package/dist/components/tooltip/index.mjs +1 -1
- package/dist/components/tour/index.mjs +1 -1
- package/dist/components/transfer/index.mjs +2 -2
- package/dist/components/tree-select/index.mjs +2 -2
- package/dist/components/tree-view/index.d.mts +32 -2
- package/dist/components/tree-view/index.mjs +94 -5
- package/dist/components/typography/index.mjs +1 -1
- package/dist/components/user/index.mjs +1 -1
- package/dist/components/virtual-list/index.mjs +1 -1
- package/dist/components/watermark/index.mjs +1 -1
- package/dist/{image-viewer-B9A5lXsk.mjs → image-viewer-19s75Hz_.mjs} +1 -1
- package/dist/index-BU5U5w04.d.mts +35 -0
- package/dist/{index-nFXK_8hJ.d.mts → index-DVc1L_zt.d.mts} +138 -89
- package/dist/index.d.mts +44 -43
- package/dist/index.mjs +9 -8
- package/dist/{input-CPAJdwDb.mjs → input-BL3N3L8g.mjs} +1 -1
- package/dist/{media-player-BC8D_d29.mjs → media-player-yF7KVUxM.mjs} +2 -2
- package/dist/{mentions-CeG5u8Qm.mjs → mentions-DKUG7eHt.mjs} +1 -1
- package/dist/{select-7YjMSBGx.mjs → select-DI7pFspF.mjs} +1 -1
- package/dist/toc-DRHr8_eD.mjs +88 -0
- package/package.json +10 -82
- package/dist/index-B1-quIrl.d.mts +0 -1815
- package/dist/toc-DYKaKQ_X.mjs +0 -31
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { t as defineFamily } from "../../family-Cmd8HEyK.mjs";
|
|
2
|
+
import { r as iconNode } from "../../icon-DTqmJCd5.mjs";
|
|
2
3
|
import { t as useElementId } from "../../id-2ygNzPHF.mjs";
|
|
3
|
-
import { injectComponentStyle } from "@bysages/core";
|
|
4
4
|
import { createComponent, mergeProps } from "@solidjs/web";
|
|
5
|
-
import {
|
|
5
|
+
import { injectComponentStyle } from "@bysages/core/styling";
|
|
6
|
+
import { Show, splitProps } from "solid-js";
|
|
6
7
|
import { NumberInput as NumberInput$1 } from "@ark-ui/solid/number-input";
|
|
7
8
|
//#region src/components/number-input/index.tsx
|
|
8
9
|
function NumberInputRoot(props) {
|
|
@@ -17,7 +18,75 @@ function NumberInputRoot(props) {
|
|
|
17
18
|
}
|
|
18
19
|
}));
|
|
19
20
|
}
|
|
20
|
-
|
|
21
|
+
/** The one-tag path for a stepped number field; formatting, scrubbing,
|
|
22
|
+
* and locale rules stay on the anatomy. */
|
|
23
|
+
function NumberInputFacade(props) {
|
|
24
|
+
injectComponentStyle("number-input");
|
|
25
|
+
return createComponent(NumberInputRoot, mergeProps({
|
|
26
|
+
get size() {
|
|
27
|
+
return props.size ?? "md";
|
|
28
|
+
},
|
|
29
|
+
get min() {
|
|
30
|
+
return props.min;
|
|
31
|
+
},
|
|
32
|
+
get max() {
|
|
33
|
+
return props.max;
|
|
34
|
+
},
|
|
35
|
+
get step() {
|
|
36
|
+
return props.step;
|
|
37
|
+
},
|
|
38
|
+
get disabled() {
|
|
39
|
+
return props.disabled;
|
|
40
|
+
},
|
|
41
|
+
get invalid() {
|
|
42
|
+
return props.invalid;
|
|
43
|
+
},
|
|
44
|
+
get required() {
|
|
45
|
+
return props.required;
|
|
46
|
+
},
|
|
47
|
+
get defaultValue() {
|
|
48
|
+
return props.defaultValue;
|
|
49
|
+
}
|
|
50
|
+
}, () => {
|
|
51
|
+
return props.value === void 0 ? {} : { value: props.value };
|
|
52
|
+
}, {
|
|
53
|
+
onValueChange: (details) => props.onValueChange?.(details.value),
|
|
54
|
+
get children() {
|
|
55
|
+
return [createComponent(Show, {
|
|
56
|
+
get when() {
|
|
57
|
+
return props.label;
|
|
58
|
+
},
|
|
59
|
+
get children() {
|
|
60
|
+
return createComponent(NumberInput$1.Label, { get children() {
|
|
61
|
+
return props.label;
|
|
62
|
+
} });
|
|
63
|
+
}
|
|
64
|
+
}), createComponent(NumberInput$1.Control, { get children() {
|
|
65
|
+
return [
|
|
66
|
+
createComponent(NumberInput$1.Input, { get placeholder() {
|
|
67
|
+
return props.placeholder;
|
|
68
|
+
} }),
|
|
69
|
+
createComponent(NumberInput$1.Scrubber, { get children() {
|
|
70
|
+
return iconNode("pause");
|
|
71
|
+
} }),
|
|
72
|
+
createComponent(NumberInput$1.IncrementTrigger, {
|
|
73
|
+
"aria-label": "Increment",
|
|
74
|
+
get children() {
|
|
75
|
+
return iconNode("chevron-up");
|
|
76
|
+
}
|
|
77
|
+
}),
|
|
78
|
+
createComponent(NumberInput$1.DecrementTrigger, {
|
|
79
|
+
"aria-label": "Decrement",
|
|
80
|
+
get children() {
|
|
81
|
+
return iconNode("chevron-down");
|
|
82
|
+
}
|
|
83
|
+
})
|
|
84
|
+
];
|
|
85
|
+
} })];
|
|
86
|
+
}
|
|
87
|
+
}));
|
|
88
|
+
}
|
|
89
|
+
const NumberInput = defineFamily(NumberInputFacade, {
|
|
21
90
|
...NumberInput$1,
|
|
22
91
|
Root: NumberInputRoot
|
|
23
92
|
});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { n as withSelfRoot } from "../../family-Cmd8HEyK.mjs";
|
|
2
2
|
import { r as iconNode } from "../../icon-DTqmJCd5.mjs";
|
|
3
3
|
import { n as useComponentMessages } from "../../use-component-messages-C4SCVYjD.mjs";
|
|
4
|
-
import { injectComponentStyle } from "@bysages/core";
|
|
5
4
|
import { createComponent, delegateEvents, effect, insert, setAttribute, spread, template } from "@solidjs/web";
|
|
5
|
+
import { injectComponentStyle } from "@bysages/core/styling";
|
|
6
6
|
import { For, createSignal, splitProps } from "solid-js";
|
|
7
7
|
//#region src/components/order-list/index.tsx
|
|
8
8
|
var _tmpl$ = /* @__PURE__ */ template(`<div><ol data-scope=order-list data-part=list>`);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { injectComponentStyle } from "@bysages/core";
|
|
2
1
|
import { createComponent, mergeProps } from "@solidjs/web";
|
|
2
|
+
import { injectComponentStyle } from "@bysages/core/styling";
|
|
3
3
|
//#region src/components/page-header/index.tsx
|
|
4
4
|
/** The page's face: an eyebrow whisper, a serif title, one line of
|
|
5
5
|
* description, and the actions resting beside the title on the same
|
|
@@ -9,9 +9,29 @@ import { Pagination as Pagination$1, PaginationRootProps } from "@ark-ui/solid/p
|
|
|
9
9
|
type PaginationOwnProps = {
|
|
10
10
|
/** One rung of the control-height ladder every page seal shares. */
|
|
11
11
|
size?: "sm" | "md" | "lg";
|
|
12
|
+
/** full is the page-seal ladder; simple keeps prev, the count, next. */
|
|
13
|
+
variant?: "default" | "simple";
|
|
12
14
|
};
|
|
13
|
-
|
|
14
|
-
|
|
15
|
+
type PaginationRootProps$1 = PaginationRootProps & PaginationOwnProps;
|
|
16
|
+
declare function PaginationRoot(props: PaginationRootProps$1): import("solid-js").JSX.Element;
|
|
17
|
+
export interface PaginationFacadeProps {
|
|
18
|
+
value?: number;
|
|
19
|
+
defaultValue?: number;
|
|
20
|
+
count?: number;
|
|
21
|
+
pageSize?: number;
|
|
22
|
+
defaultPageSize?: number;
|
|
23
|
+
siblingCount?: number;
|
|
24
|
+
label?: string;
|
|
25
|
+
size?: "sm" | "md" | "lg";
|
|
26
|
+
/** full is the page-seal ladder; simple keeps prev, the count, next. */
|
|
27
|
+
variant?: "default" | "simple";
|
|
28
|
+
class?: string;
|
|
29
|
+
onValueChange?: (value: number) => void;
|
|
30
|
+
}
|
|
31
|
+
/** The complete pagination bar behind one page: count and page size become
|
|
32
|
+
* the visible ladder, with edge semantics left to anatomy. */
|
|
33
|
+
declare function PaginationFacade(props: PaginationFacadeProps): import("solid-js").JSX.Element;
|
|
34
|
+
export declare const Pagination: typeof PaginationFacade & Omit<typeof Pagination$1, "Root"> & {
|
|
15
35
|
Root: typeof PaginationRoot;
|
|
16
36
|
};
|
|
17
37
|
//#endregion
|
|
@@ -1,23 +1,122 @@
|
|
|
1
1
|
import { t as defineFamily } from "../../family-Cmd8HEyK.mjs";
|
|
2
|
+
import { r as iconNode } from "../../icon-DTqmJCd5.mjs";
|
|
2
3
|
import { t as useElementId } from "../../id-2ygNzPHF.mjs";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { splitProps } from "solid-js";
|
|
4
|
+
import { createComponent, insert, memo, mergeProps, template } from "@solidjs/web";
|
|
5
|
+
import { injectComponentStyle } from "@bysages/core/styling";
|
|
6
|
+
import { For, splitProps } from "solid-js";
|
|
6
7
|
import { Pagination as Pagination$1 } from "@ark-ui/solid/pagination";
|
|
7
8
|
//#region src/components/pagination/index.tsx
|
|
9
|
+
var _tmpl$ = /* @__PURE__ */ template(`<span data-scope=pagination data-part=status> / <!>`);
|
|
8
10
|
function PaginationRoot(props) {
|
|
9
|
-
|
|
10
|
-
const
|
|
11
|
+
injectComponentStyle("pagination");
|
|
12
|
+
const [own, rest] = splitProps(props, [
|
|
13
|
+
"id",
|
|
14
|
+
"size",
|
|
15
|
+
"variant"
|
|
16
|
+
]);
|
|
17
|
+
const id = useElementId("pagination", () => props.id);
|
|
11
18
|
return createComponent(Pagination$1.Root, mergeProps(rest, {
|
|
12
19
|
get id() {
|
|
13
20
|
return id();
|
|
14
21
|
},
|
|
15
22
|
get "data-size"() {
|
|
16
23
|
return own.size ?? "md";
|
|
24
|
+
},
|
|
25
|
+
get "data-variant"() {
|
|
26
|
+
return memo(() => {
|
|
27
|
+
return own.variant === "simple";
|
|
28
|
+
})() ? own.variant : void 0;
|
|
17
29
|
}
|
|
18
30
|
}));
|
|
19
31
|
}
|
|
20
|
-
|
|
32
|
+
/** The complete pagination bar behind one page: count and page size become
|
|
33
|
+
* the visible ladder, with edge semantics left to anatomy. */
|
|
34
|
+
function PaginationFacade(props) {
|
|
35
|
+
const variant = props.variant ?? "default";
|
|
36
|
+
return createComponent(PaginationRoot, {
|
|
37
|
+
get "class"() {
|
|
38
|
+
return props.class;
|
|
39
|
+
},
|
|
40
|
+
get size() {
|
|
41
|
+
return props.size ?? "md";
|
|
42
|
+
},
|
|
43
|
+
variant,
|
|
44
|
+
get "aria-label"() {
|
|
45
|
+
return props.label;
|
|
46
|
+
},
|
|
47
|
+
get count() {
|
|
48
|
+
return props.count ?? 0;
|
|
49
|
+
},
|
|
50
|
+
get defaultPage() {
|
|
51
|
+
return props.defaultValue;
|
|
52
|
+
},
|
|
53
|
+
get page() {
|
|
54
|
+
return props.value;
|
|
55
|
+
},
|
|
56
|
+
get pageSize() {
|
|
57
|
+
return props.pageSize;
|
|
58
|
+
},
|
|
59
|
+
get defaultPageSize() {
|
|
60
|
+
return props.defaultPageSize;
|
|
61
|
+
},
|
|
62
|
+
get siblingCount() {
|
|
63
|
+
return props.siblingCount ?? 1;
|
|
64
|
+
},
|
|
65
|
+
onPageChange: (details) => props.onValueChange?.(details.page),
|
|
66
|
+
get children() {
|
|
67
|
+
return [
|
|
68
|
+
createComponent(Pagination$1.PrevTrigger, {
|
|
69
|
+
"aria-label": "Previous page",
|
|
70
|
+
get children() {
|
|
71
|
+
return iconNode("chevron-left", {
|
|
72
|
+
width: "14",
|
|
73
|
+
height: "14"
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
}),
|
|
77
|
+
memo(() => {
|
|
78
|
+
return variant === "simple" ? createComponent(Pagination$1.Context, { children: (pagination) => (() => {
|
|
79
|
+
var _el$ = _tmpl$();
|
|
80
|
+
var _el$2 = _el$.firstChild;
|
|
81
|
+
var _el$3 = _el$2.nextSibling;
|
|
82
|
+
insert(_el$, () => {
|
|
83
|
+
return pagination().page;
|
|
84
|
+
}, _el$2);
|
|
85
|
+
insert(_el$, () => {
|
|
86
|
+
return pagination().totalPages;
|
|
87
|
+
}, _el$3);
|
|
88
|
+
return _el$;
|
|
89
|
+
})() }) : createComponent(Pagination$1.Context, { children: (pagination) => createComponent(For, {
|
|
90
|
+
get each() {
|
|
91
|
+
return pagination().pages;
|
|
92
|
+
},
|
|
93
|
+
children: (page, index) => page.type === "ellipsis" ? createComponent(Pagination$1.Ellipsis, { get index() {
|
|
94
|
+
return index();
|
|
95
|
+
} }) : createComponent(Pagination$1.Item, {
|
|
96
|
+
type: "page",
|
|
97
|
+
get value() {
|
|
98
|
+
return page.value;
|
|
99
|
+
},
|
|
100
|
+
get children() {
|
|
101
|
+
return page.value;
|
|
102
|
+
}
|
|
103
|
+
})
|
|
104
|
+
}) });
|
|
105
|
+
}),
|
|
106
|
+
createComponent(Pagination$1.NextTrigger, {
|
|
107
|
+
"aria-label": "Next page",
|
|
108
|
+
get children() {
|
|
109
|
+
return iconNode("chevron-right", {
|
|
110
|
+
width: "14",
|
|
111
|
+
height: "14"
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
})
|
|
115
|
+
];
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
const Pagination = defineFamily(PaginationFacade, {
|
|
21
120
|
...Pagination$1,
|
|
22
121
|
Root: PaginationRoot
|
|
23
122
|
});
|
|
@@ -9,7 +9,24 @@ type PasswordInputOwnProps = {
|
|
|
9
9
|
size?: "sm" | "md" | "lg";
|
|
10
10
|
};
|
|
11
11
|
declare function PasswordInputRoot(props: PasswordInputRootProps & PasswordInputOwnProps): import("solid-js").JSX.Element;
|
|
12
|
-
export
|
|
12
|
+
export interface PasswordInputFacadeProps {
|
|
13
|
+
value?: string;
|
|
14
|
+
defaultValue?: string;
|
|
15
|
+
label?: string;
|
|
16
|
+
placeholder?: string;
|
|
17
|
+
autoComplete?: "current-password" | "new-password";
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
invalid?: boolean;
|
|
20
|
+
required?: boolean;
|
|
21
|
+
/** One rung of the control-height ladder for the field and its eye. */
|
|
22
|
+
size?: "sm" | "md" | "lg";
|
|
23
|
+
onValueChange?: (value: string) => void;
|
|
24
|
+
}
|
|
25
|
+
/** The one-tag path: the masked field and reveal control. Visibility
|
|
26
|
+
* state, password-manager rules, and validation stay on the anatomy. */
|
|
27
|
+
declare function PasswordInputFacade(props: PasswordInputFacadeProps): import("solid-js").JSX.Element;
|
|
28
|
+
type PasswordInputParts = Omit<typeof PasswordInput$1, "Root"> & {
|
|
13
29
|
Root: typeof PasswordInputRoot;
|
|
14
30
|
};
|
|
31
|
+
export declare const PasswordInput: typeof PasswordInputFacade & PasswordInputParts;
|
|
15
32
|
//#endregion
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { t as defineFamily } from "../../family-Cmd8HEyK.mjs";
|
|
2
|
+
import { r as iconNode } from "../../icon-DTqmJCd5.mjs";
|
|
2
3
|
import { t as useElementId } from "../../id-2ygNzPHF.mjs";
|
|
3
|
-
import { injectComponentStyle } from "@bysages/core";
|
|
4
4
|
import { createComponent, mergeProps } from "@solidjs/web";
|
|
5
|
-
import {
|
|
5
|
+
import { injectComponentStyle } from "@bysages/core/styling";
|
|
6
|
+
import { Show, splitProps } from "solid-js";
|
|
6
7
|
import { PasswordInput as PasswordInput$1 } from "@ark-ui/solid/password-input";
|
|
7
8
|
//#region src/components/password-input/index.tsx
|
|
8
9
|
function PasswordInputRoot(props) {
|
|
@@ -17,7 +18,60 @@ function PasswordInputRoot(props) {
|
|
|
17
18
|
}
|
|
18
19
|
}));
|
|
19
20
|
}
|
|
20
|
-
|
|
21
|
+
/** The one-tag path: the masked field and reveal control. Visibility
|
|
22
|
+
* state, password-manager rules, and validation stay on the anatomy. */
|
|
23
|
+
function PasswordInputFacade(props) {
|
|
24
|
+
injectComponentStyle("password-input");
|
|
25
|
+
return createComponent(PasswordInputRoot, {
|
|
26
|
+
get size() {
|
|
27
|
+
return props.size ?? "md";
|
|
28
|
+
},
|
|
29
|
+
get autoComplete() {
|
|
30
|
+
return props.autoComplete;
|
|
31
|
+
},
|
|
32
|
+
get disabled() {
|
|
33
|
+
return props.disabled;
|
|
34
|
+
},
|
|
35
|
+
get invalid() {
|
|
36
|
+
return props.invalid;
|
|
37
|
+
},
|
|
38
|
+
get required() {
|
|
39
|
+
return props.required;
|
|
40
|
+
},
|
|
41
|
+
get children() {
|
|
42
|
+
return [createComponent(Show, {
|
|
43
|
+
get when() {
|
|
44
|
+
return props.label;
|
|
45
|
+
},
|
|
46
|
+
get children() {
|
|
47
|
+
return createComponent(PasswordInput$1.Label, { get children() {
|
|
48
|
+
return props.label;
|
|
49
|
+
} });
|
|
50
|
+
}
|
|
51
|
+
}), createComponent(PasswordInput$1.Control, { get children() {
|
|
52
|
+
return [createComponent(PasswordInput$1.Input, {
|
|
53
|
+
get placeholder() {
|
|
54
|
+
return props.placeholder;
|
|
55
|
+
},
|
|
56
|
+
get value() {
|
|
57
|
+
return props.value ?? props.defaultValue;
|
|
58
|
+
},
|
|
59
|
+
onInput: (event) => props.onValueChange?.(event.currentTarget.value)
|
|
60
|
+
}), createComponent(PasswordInput$1.VisibilityTrigger, { get children() {
|
|
61
|
+
return createComponent(PasswordInput$1.Indicator, {
|
|
62
|
+
get fallback() {
|
|
63
|
+
return iconNode("eye-off");
|
|
64
|
+
},
|
|
65
|
+
get children() {
|
|
66
|
+
return iconNode("eye");
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
} })];
|
|
70
|
+
} })];
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
const PasswordInput = defineFamily(PasswordInputFacade, {
|
|
21
75
|
...PasswordInput$1,
|
|
22
76
|
Root: PasswordInputRoot
|
|
23
77
|
});
|
|
@@ -8,7 +8,24 @@ type PinInputOwnProps = {
|
|
|
8
8
|
size?: "sm" | "md" | "lg";
|
|
9
9
|
};
|
|
10
10
|
declare function PinInputRoot(props: PinInputRootProps & PinInputOwnProps): import("solid-js").JSX.Element;
|
|
11
|
-
export
|
|
11
|
+
export interface PinInputFacadeProps {
|
|
12
|
+
value?: string[];
|
|
13
|
+
defaultValue?: string[];
|
|
14
|
+
label?: string;
|
|
15
|
+
placeholder?: string;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
invalid?: boolean;
|
|
18
|
+
required?: boolean;
|
|
19
|
+
length?: number;
|
|
20
|
+
/** One rung of the control-height ladder each seal stands on. */
|
|
21
|
+
size?: "sm" | "md" | "lg";
|
|
22
|
+
onValueChange?: (value: string[]) => void;
|
|
23
|
+
}
|
|
24
|
+
/** The one-tag path for an even run of seals; OTP, masks, and custom
|
|
25
|
+
* validation stay on the anatomy. */
|
|
26
|
+
declare function PinInputFacade(props: PinInputFacadeProps): import("solid-js").JSX.Element;
|
|
27
|
+
type PinInputParts = Omit<typeof PinInput$1, "Root"> & {
|
|
12
28
|
Root: typeof PinInputRoot;
|
|
13
29
|
};
|
|
30
|
+
export declare const PinInput: typeof PinInputFacade & PinInputParts;
|
|
14
31
|
//#endregion
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as defineFamily } from "../../family-Cmd8HEyK.mjs";
|
|
2
2
|
import { t as useElementId } from "../../id-2ygNzPHF.mjs";
|
|
3
|
-
import { injectComponentStyle } from "@bysages/core";
|
|
4
3
|
import { createComponent, mergeProps } from "@solidjs/web";
|
|
5
|
-
import {
|
|
4
|
+
import { injectComponentStyle } from "@bysages/core/styling";
|
|
5
|
+
import { For, Show, splitProps } from "solid-js";
|
|
6
6
|
import { PinInput as PinInput$1 } from "@ark-ui/solid/pin-input";
|
|
7
7
|
//#region src/components/pin-input/index.tsx
|
|
8
8
|
function PinInputRoot(props) {
|
|
@@ -17,7 +17,59 @@ function PinInputRoot(props) {
|
|
|
17
17
|
}
|
|
18
18
|
}));
|
|
19
19
|
}
|
|
20
|
-
|
|
20
|
+
/** The one-tag path for an even run of seals; OTP, masks, and custom
|
|
21
|
+
* validation stay on the anatomy. */
|
|
22
|
+
function PinInputFacade(props) {
|
|
23
|
+
injectComponentStyle("pin-input");
|
|
24
|
+
return createComponent(PinInputRoot, mergeProps({
|
|
25
|
+
get size() {
|
|
26
|
+
return props.size ?? "md";
|
|
27
|
+
},
|
|
28
|
+
get disabled() {
|
|
29
|
+
return props.disabled;
|
|
30
|
+
},
|
|
31
|
+
get invalid() {
|
|
32
|
+
return props.invalid;
|
|
33
|
+
},
|
|
34
|
+
get required() {
|
|
35
|
+
return props.required;
|
|
36
|
+
},
|
|
37
|
+
get placeholder() {
|
|
38
|
+
return props.placeholder ?? "·";
|
|
39
|
+
},
|
|
40
|
+
get defaultValue() {
|
|
41
|
+
return props.defaultValue;
|
|
42
|
+
}
|
|
43
|
+
}, () => {
|
|
44
|
+
return props.value === void 0 ? {} : { value: props.value };
|
|
45
|
+
}, {
|
|
46
|
+
onValueChange: (details) => props.onValueChange?.(details.value),
|
|
47
|
+
get children() {
|
|
48
|
+
return [
|
|
49
|
+
createComponent(Show, {
|
|
50
|
+
get when() {
|
|
51
|
+
return props.label;
|
|
52
|
+
},
|
|
53
|
+
get children() {
|
|
54
|
+
return createComponent(PinInput$1.Label, { get children() {
|
|
55
|
+
return props.label;
|
|
56
|
+
} });
|
|
57
|
+
}
|
|
58
|
+
}),
|
|
59
|
+
createComponent(PinInput$1.Control, { get children() {
|
|
60
|
+
return createComponent(For, {
|
|
61
|
+
get each() {
|
|
62
|
+
return Array.from({ length: props.length ?? 4 }, (_, index) => index);
|
|
63
|
+
},
|
|
64
|
+
children: (index) => createComponent(PinInput$1.Input, { index })
|
|
65
|
+
});
|
|
66
|
+
} }),
|
|
67
|
+
createComponent(PinInput$1.HiddenInput, {})
|
|
68
|
+
];
|
|
69
|
+
}
|
|
70
|
+
}));
|
|
71
|
+
}
|
|
72
|
+
const PinInput = defineFamily(PinInputFacade, {
|
|
21
73
|
...PinInput$1,
|
|
22
74
|
Root: PinInputRoot
|
|
23
75
|
});
|
|
@@ -2,8 +2,8 @@ import { t as defineFamily } from "../../family-Cmd8HEyK.mjs";
|
|
|
2
2
|
import { t as useElementId } from "../../id-2ygNzPHF.mjs";
|
|
3
3
|
import { Button } from "../button/index.mjs";
|
|
4
4
|
import { Popover as Popover$1 } from "../popover/index.mjs";
|
|
5
|
-
import { injectComponentStyle } from "@bysages/core";
|
|
6
5
|
import { createComponent, insert, mergeProps, spread, template } from "@solidjs/web";
|
|
6
|
+
import { injectComponentStyle } from "@bysages/core/styling";
|
|
7
7
|
import { createSignal, splitProps } from "solid-js";
|
|
8
8
|
import { Portal } from "solid-js/web";
|
|
9
9
|
import { Popover } from "@ark-ui/solid/popover";
|
|
@@ -2,8 +2,8 @@ import { t as defineFamily } from "../../family-Cmd8HEyK.mjs";
|
|
|
2
2
|
import { r as iconNode } from "../../icon-DTqmJCd5.mjs";
|
|
3
3
|
import { t as useElementId } from "../../id-2ygNzPHF.mjs";
|
|
4
4
|
import { n as withElementProps, t as isElement } from "../../element-dGIhOTJ6.mjs";
|
|
5
|
-
import { injectComponentStyle } from "@bysages/core";
|
|
6
5
|
import { createComponent, insert, memo, mergeProps, template } from "@solidjs/web";
|
|
6
|
+
import { injectComponentStyle } from "@bysages/core/styling";
|
|
7
7
|
import { Show, createComponent as createComponent$1, mergeProps as mergeProps$1 } from "solid-js";
|
|
8
8
|
import { Popover as Popover$1 } from "@ark-ui/solid/popover";
|
|
9
9
|
//#region src/components/popover/index.tsx
|
|
@@ -7,9 +7,27 @@ import { Progress as Progress$1, ProgressRootProps } from "@ark-ui/solid/progres
|
|
|
7
7
|
type ProgressOwnProps = {
|
|
8
8
|
/** One rung of the groove ladder — the track's thickness. */
|
|
9
9
|
size?: "sm" | "md" | "lg";
|
|
10
|
+
/** Linear is the groove; circle and dashboard are compact dials. */
|
|
11
|
+
variant?: "linear" | "circle" | "dashboard";
|
|
12
|
+
/** The accessible name shown beside the dashboard dial. */
|
|
13
|
+
label?: string;
|
|
10
14
|
};
|
|
11
15
|
declare function ProgressRoot(props: ProgressRootProps & ProgressOwnProps): import("solid-js").JSX.Element;
|
|
12
|
-
export
|
|
16
|
+
export interface ProgressFacadeProps {
|
|
17
|
+
value?: number;
|
|
18
|
+
defaultValue?: number;
|
|
19
|
+
min?: number;
|
|
20
|
+
max?: number;
|
|
21
|
+
label?: string;
|
|
22
|
+
variant?: "linear" | "circle" | "dashboard";
|
|
23
|
+
/** One rung of the groove ladder — the track's thickness. */
|
|
24
|
+
size?: "sm" | "md" | "lg";
|
|
25
|
+
onValueChange?: (value: number | null) => void;
|
|
26
|
+
}
|
|
27
|
+
/** The complete progress behind one value: a labelled linear groove by
|
|
28
|
+
* default, with circular and dashboard dials for compact status. */
|
|
29
|
+
declare function ProgressFacade(props: ProgressFacadeProps): import("solid-js").JSX.Element;
|
|
30
|
+
export declare const Progress: typeof ProgressFacade & Omit<typeof Progress$1, "Root"> & {
|
|
13
31
|
Root: typeof ProgressRoot;
|
|
14
32
|
};
|
|
15
33
|
//#endregion
|
|
@@ -1,23 +1,122 @@
|
|
|
1
1
|
import { t as defineFamily } from "../../family-Cmd8HEyK.mjs";
|
|
2
2
|
import { t as useElementId } from "../../id-2ygNzPHF.mjs";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { splitProps } from "solid-js";
|
|
6
|
-
import { Progress as Progress$1 } from "@ark-ui/solid/progress";
|
|
3
|
+
import { createComponent, effect, insert, memo, mergeProps, setStyleProperty, template } from "@solidjs/web";
|
|
4
|
+
import { injectComponentStyle } from "@bysages/core/styling";
|
|
5
|
+
import { Show, createMemo, splitProps } from "solid-js";
|
|
6
|
+
import { Progress as Progress$1, useProgressContext } from "@ark-ui/solid/progress";
|
|
7
7
|
//#region src/components/progress/index.tsx
|
|
8
|
+
var _tmpl$ = /* @__PURE__ */ template(`<div data-scope=progress data-part=view data-view=dashboard><div aria-hidden=true data-scope=progress data-part=dash-ring>`);
|
|
8
9
|
function ProgressRoot(props) {
|
|
9
|
-
|
|
10
|
-
const
|
|
10
|
+
injectComponentStyle("progress");
|
|
11
|
+
const [own, rest] = splitProps(props, [
|
|
12
|
+
"id",
|
|
13
|
+
"size",
|
|
14
|
+
"variant",
|
|
15
|
+
"label",
|
|
16
|
+
"value",
|
|
17
|
+
"defaultValue",
|
|
18
|
+
"min",
|
|
19
|
+
"max"
|
|
20
|
+
]);
|
|
21
|
+
const id = useElementId("progress", () => own.id);
|
|
22
|
+
const dashboardPercent = createMemo(() => {
|
|
23
|
+
const min = own.min ?? 0;
|
|
24
|
+
const max = own.max ?? 100;
|
|
25
|
+
const percent = ((own.value ?? own.defaultValue ?? min + (max - min) / 2) - min) / (max - min) * 100;
|
|
26
|
+
return !Number.isFinite(percent) ? 0 : Math.min(100, Math.max(0, percent));
|
|
27
|
+
});
|
|
11
28
|
return createComponent(Progress$1.Root, mergeProps(rest, {
|
|
12
29
|
get id() {
|
|
13
30
|
return id();
|
|
14
31
|
},
|
|
15
32
|
get "data-size"() {
|
|
16
33
|
return own.size ?? "md";
|
|
34
|
+
},
|
|
35
|
+
get "data-variant"() {
|
|
36
|
+
return own.variant ?? "linear";
|
|
37
|
+
},
|
|
38
|
+
get children() {
|
|
39
|
+
return createComponent(Show, {
|
|
40
|
+
get when() {
|
|
41
|
+
return own.variant === "dashboard";
|
|
42
|
+
},
|
|
43
|
+
get fallback() {
|
|
44
|
+
return rest.children;
|
|
45
|
+
},
|
|
46
|
+
get children() {
|
|
47
|
+
return [memo(() => {
|
|
48
|
+
return memo(() => {
|
|
49
|
+
return !!own.label;
|
|
50
|
+
})() ? createComponent(Progress$1.Label, { get children() {
|
|
51
|
+
return own.label;
|
|
52
|
+
} }) : null;
|
|
53
|
+
}), (() => {
|
|
54
|
+
var _el$ = _tmpl$();
|
|
55
|
+
var _el$2 = _el$.firstChild;
|
|
56
|
+
insert(_el$, createComponent(Progress$1.ValueText, {}), null);
|
|
57
|
+
effect(() => String(dashboardPercent()), (_v$) => {
|
|
58
|
+
setStyleProperty(_el$2, "--percent", _v$);
|
|
59
|
+
});
|
|
60
|
+
return _el$;
|
|
61
|
+
})()];
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
}));
|
|
66
|
+
}
|
|
67
|
+
function ProgressCircleView() {
|
|
68
|
+
const progress = useProgressContext();
|
|
69
|
+
const value = progress().value;
|
|
70
|
+
const max = progress().max;
|
|
71
|
+
const state = value === null ? "indeterminate" : value === max ? "complete" : "loading";
|
|
72
|
+
return createComponent(Progress$1.View, {
|
|
73
|
+
state,
|
|
74
|
+
get children() {
|
|
75
|
+
return createComponent(Progress$1.Circle, { get children() {
|
|
76
|
+
return createComponent(Progress$1.CircleRange, {});
|
|
77
|
+
} });
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
/** The complete progress behind one value: a labelled linear groove by
|
|
82
|
+
* default, with circular and dashboard dials for compact status. */
|
|
83
|
+
function ProgressFacade(props) {
|
|
84
|
+
const variant = () => props.variant ?? "linear";
|
|
85
|
+
return createComponent(ProgressRoot, mergeProps({
|
|
86
|
+
get size() {
|
|
87
|
+
return props.size ?? "md";
|
|
88
|
+
},
|
|
89
|
+
get variant() {
|
|
90
|
+
return variant();
|
|
91
|
+
},
|
|
92
|
+
get label() {
|
|
93
|
+
return props.label;
|
|
94
|
+
},
|
|
95
|
+
get defaultValue() {
|
|
96
|
+
return props.defaultValue;
|
|
97
|
+
},
|
|
98
|
+
get min() {
|
|
99
|
+
return props.min;
|
|
100
|
+
},
|
|
101
|
+
get max() {
|
|
102
|
+
return props.max;
|
|
103
|
+
}
|
|
104
|
+
}, () => {
|
|
105
|
+
return props.value === void 0 ? {} : { value: props.value };
|
|
106
|
+
}, {
|
|
107
|
+
onValueChange: (details) => props.onValueChange?.(details.value),
|
|
108
|
+
get children() {
|
|
109
|
+
return memo(() => {
|
|
110
|
+
return variant() === "dashboard";
|
|
111
|
+
})() ? null : [props.label ? createComponent(Progress$1.Label, { get children() {
|
|
112
|
+
return props.label;
|
|
113
|
+
} }) : null, variant() === "circle" ? createComponent(ProgressCircleView, {}) : createComponent(Progress$1.Track, { get children() {
|
|
114
|
+
return createComponent(Progress$1.Range, {});
|
|
115
|
+
} })];
|
|
17
116
|
}
|
|
18
117
|
}));
|
|
19
118
|
}
|
|
20
|
-
const Progress = defineFamily(
|
|
119
|
+
const Progress = defineFamily(ProgressFacade, {
|
|
21
120
|
...Progress$1,
|
|
22
121
|
Root: ProgressRoot
|
|
23
122
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as withSelfRoot } from "../../family-Cmd8HEyK.mjs";
|
|
2
|
-
import { injectComponentStyle } from "@bysages/core";
|
|
3
2
|
import { createComponent, effect, insert, setAttribute, setStyleProperty, spread, template } from "@solidjs/web";
|
|
3
|
+
import { injectComponentStyle } from "@bysages/core/styling";
|
|
4
4
|
import { For, Show, splitProps } from "solid-js";
|
|
5
5
|
//#region src/components/progress-group/index.tsx
|
|
6
6
|
var _tmpl$ = /* @__PURE__ */ template(`<div data-scope=progress-group data-part=legend>`);
|
|
@@ -6,7 +6,14 @@ import { QrCode as QrCode$1 } from "@ark-ui/solid/qr-code";
|
|
|
6
6
|
* control. The API is Ark's own — Root, Frame, Pattern, Overlay,
|
|
7
7
|
* DownloadTrigger. */
|
|
8
8
|
declare function QrCodeRoot(props: ComponentProps<typeof QrCode$1.Root>): import("solid-js").JSX.Element;
|
|
9
|
-
export
|
|
9
|
+
export interface QrCodeFacadeProps {
|
|
10
|
+
value?: string;
|
|
11
|
+
defaultValue?: string;
|
|
12
|
+
onValueChange?: (value: string) => void;
|
|
13
|
+
}
|
|
14
|
+
/** The complete printable code behind one payload. */
|
|
15
|
+
declare function QrCodeFacade(props: QrCodeFacadeProps): import("solid-js").JSX.Element;
|
|
16
|
+
export declare const QrCode: typeof QrCodeFacade & Omit<typeof QrCode$1, "Root"> & {
|
|
10
17
|
Root: typeof QrCodeRoot;
|
|
11
18
|
};
|
|
12
19
|
//#endregion
|