@bysages/solid 0.2.3 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -2
- package/dist/{ai-response-B_586r27.mjs → ai-response-ClGGptX3.mjs} +15 -15
- package/dist/chevron-D5RzcayK.mjs +9 -0
- package/dist/components/affix/index.mjs +15 -17
- package/dist/components/ai/index.d.mts +1 -1
- package/dist/components/ai/index.mjs +12 -10
- package/dist/components/ai-action/index.mjs +2 -2
- package/dist/components/ai-attachments/index.mjs +50 -38
- package/dist/components/ai-message/index.mjs +11 -13
- package/dist/components/ai-prompt-input/index.mjs +70 -53
- package/dist/components/ai-reasoning/index.mjs +10 -6
- package/dist/components/ai-response/index.mjs +1 -1
- package/dist/components/ai-source/index.mjs +23 -23
- package/dist/components/ai-suggestion/index.mjs +1 -1
- package/dist/components/ai-tool/index.mjs +29 -17
- package/dist/components/alert/index.mjs +37 -42
- package/dist/components/angle-slider/index.mjs +2 -2
- package/dist/components/aspect-ratio/index.mjs +14 -16
- package/dist/components/autocomplete/index.mjs +3 -2
- package/dist/components/avatar/index.d.mts +3 -0
- package/dist/components/avatar/index.mjs +10 -5
- package/dist/components/avatar-group/index.mjs +11 -13
- package/dist/components/back-top/index.mjs +31 -27
- package/dist/components/badge/index.mjs +14 -16
- package/dist/components/banner/index.mjs +24 -28
- package/dist/components/bento/index.d.mts +24 -0
- package/dist/components/bento/index.mjs +51 -0
- package/dist/components/block-ui/index.d.mts +12 -0
- package/dist/components/block-ui/index.mjs +43 -0
- package/dist/components/breadcrumb/index.mjs +7 -5
- package/dist/components/browser/index.d.mts +21 -0
- package/dist/components/browser/index.mjs +87 -0
- package/dist/components/button/index.mjs +27 -29
- package/dist/components/button-group/index.mjs +18 -20
- package/dist/components/calendar/index.mjs +141 -129
- package/dist/components/card/index.mjs +2 -2
- package/dist/components/cascade-select/index.mjs +160 -121
- package/dist/components/checkbox/index.mjs +2 -2
- package/dist/components/checkbox-group/index.mjs +53 -55
- package/dist/components/chip/index.mjs +22 -20
- package/dist/components/clipboard/index.mjs +2 -2
- package/dist/components/color-picker/index.mjs +2 -2
- package/dist/components/combobox/index.mjs +2 -2
- package/dist/components/command/index.mjs +73 -57
- package/dist/components/comment/index.mjs +77 -62
- package/dist/components/config-provider/index.mjs +10 -8
- package/dist/components/container/index.mjs +14 -16
- package/dist/components/data-view/index.d.mts +18 -0
- package/dist/components/data-view/index.mjs +110 -0
- package/dist/components/date-input/index.mjs +2 -2
- package/dist/components/date-picker/index.mjs +2 -2
- package/dist/components/deferred-content/index.d.mts +16 -0
- package/dist/components/deferred-content/index.mjs +52 -0
- package/dist/components/descriptions/index.d.mts +9 -1
- package/dist/components/descriptions/index.mjs +43 -16
- package/dist/components/dock/index.d.mts +22 -0
- package/dist/components/dock/index.mjs +64 -0
- package/dist/components/dynamic-input/index.mjs +71 -68
- package/dist/components/editable/index.mjs +2 -2
- package/dist/components/ellipsis/index.mjs +17 -19
- package/dist/components/empty/index.mjs +2 -2
- package/dist/components/file-upload/index.mjs +2 -2
- package/dist/components/float-button/index.mjs +39 -38
- package/dist/components/form/index.d.mts +1 -1
- package/dist/components/form/index.mjs +52 -37
- package/dist/components/grid/index.mjs +19 -21
- package/dist/components/icon/index.d.mts +9 -4
- package/dist/components/icon/index.mjs +37 -36
- package/dist/components/image/index.mjs +44 -43
- package/dist/components/image-viewer/index.mjs +46 -37
- package/dist/components/input/index.d.mts +3 -0
- package/dist/components/input/index.mjs +1 -41
- package/dist/components/input-group/index.mjs +14 -18
- package/dist/components/kbd/index.mjs +8 -10
- package/dist/components/layout/index.mjs +77 -77
- package/dist/components/link/index.mjs +12 -13
- package/dist/components/list/index.mjs +52 -47
- package/dist/components/listbox/index.mjs +2 -2
- package/dist/components/masonry/index.mjs +15 -17
- package/dist/components/mentions/index.mjs +1 -1
- package/dist/components/menu/index.mjs +2 -2
- package/dist/components/menubar/index.mjs +58 -57
- package/dist/components/meter/index.mjs +41 -41
- package/dist/components/number-input/index.mjs +2 -2
- package/dist/components/order-list/index.d.mts +21 -0
- package/dist/components/order-list/index.mjs +160 -0
- package/dist/components/page-header/index.mjs +2 -2
- package/dist/components/pagination/index.mjs +2 -2
- package/dist/components/password-input/index.mjs +2 -2
- package/dist/components/pin-input/index.mjs +2 -2
- package/dist/components/popconfirm/index.mjs +19 -12
- package/dist/components/progress/index.mjs +2 -2
- package/dist/components/progress-group/index.mjs +65 -58
- package/dist/components/radio-group/index.mjs +2 -2
- package/dist/components/rating-group/index.mjs +2 -2
- package/dist/components/result/index.d.mts +22 -0
- package/dist/components/result/index.mjs +66 -0
- package/dist/components/select/index.d.mts +2 -17
- package/dist/components/select/index.mjs +2 -18
- package/dist/components/separator/index.mjs +17 -19
- package/dist/components/skeleton/index.mjs +8 -10
- package/dist/components/slider/index.mjs +2 -2
- package/dist/components/spinner/index.mjs +15 -17
- package/dist/components/split-button/index.mjs +84 -83
- package/dist/components/spotlight/index.d.mts +11 -0
- package/dist/components/spotlight/index.mjs +38 -0
- package/dist/components/stack/index.mjs +20 -22
- package/dist/components/stat/index.mjs +12 -14
- package/dist/components/steps/index.mjs +2 -2
- package/dist/components/switch/index.mjs +2 -2
- package/dist/components/table/index.mjs +308 -211
- package/dist/components/tabs/index.d.mts +2 -0
- package/dist/components/tabs/index.mjs +10 -5
- package/dist/components/tags-input/index.mjs +2 -2
- package/dist/components/terminal/index.d.mts +17 -0
- package/dist/components/terminal/index.mjs +84 -0
- package/dist/components/textarea/index.mjs +8 -8
- package/dist/components/timeline/index.d.mts +9 -3
- package/dist/components/timeline/index.mjs +18 -3
- package/dist/components/toggle-group/index.mjs +2 -2
- package/dist/components/toolbar/index.d.mts +17 -0
- package/dist/components/toolbar/index.mjs +46 -0
- package/dist/components/transfer/index.mjs +116 -107
- package/dist/components/tree-select/index.mjs +29 -21
- package/dist/components/tree-view/index.mjs +2 -2
- package/dist/components/typography/index.mjs +2 -2
- package/dist/components/user/index.d.mts +19 -0
- package/dist/components/user/index.mjs +68 -0
- package/dist/components/virtual-list/index.d.mts +17 -0
- package/dist/components/virtual-list/index.mjs +71 -0
- package/dist/components/watermark/index.mjs +19 -13
- package/dist/{index-B4XS2n2y.d.mts → index-IfofF-SW.d.mts} +718 -3773
- package/dist/index-YPUiqD3n.d.mts +42 -0
- package/dist/index.d.mts +16 -3
- package/dist/index.mjs +20 -7
- package/dist/input-DoFQ7RXh.mjs +78 -0
- package/dist/{mentions-xbI6vJAP.mjs → mentions-f5Js_2W7.mjs} +76 -70
- package/dist/select-CHaXbzLX.mjs +115 -0
- package/package.json +28 -7
- package/dist/chevron-GWEoEYdO.mjs +0 -9
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Spinner } from "../spinner/index.mjs";
|
|
2
|
+
import { injectComponentStyle } from "@bysages/core";
|
|
3
|
+
import { createComponent, insert, spread, template } from "@solidjs/web";
|
|
4
|
+
import { Show, splitProps } from "solid-js";
|
|
5
|
+
//#region src/components/block-ui/index.tsx
|
|
6
|
+
var _tmpl$ = /* @__PURE__ */ template(`<div data-scope=block-ui data-part=mask>`);
|
|
7
|
+
var _tmpl$2 = /* @__PURE__ */ template(`<div><!><!>`);
|
|
8
|
+
/** A curtain over content that must wait: the blocked region keeps its
|
|
9
|
+
* shape and dims under frosted paper while a quiet wheel reports the
|
|
10
|
+
* wait. Callers own the state; the curtain only answers it. */
|
|
11
|
+
function BlockUI(props) {
|
|
12
|
+
injectComponentStyle("block-ui");
|
|
13
|
+
const [own, rest] = splitProps(props, ["blocked", "children"]);
|
|
14
|
+
var _el$ = _tmpl$2();
|
|
15
|
+
var _el$2 = _el$.firstChild;
|
|
16
|
+
var _el$4 = _el$2.nextSibling;
|
|
17
|
+
spread(_el$, [rest, {
|
|
18
|
+
"data-scope": "block-ui",
|
|
19
|
+
"data-part": "root",
|
|
20
|
+
get "data-blocked"() {
|
|
21
|
+
return own.blocked ? "" : void 0;
|
|
22
|
+
},
|
|
23
|
+
get "aria-busy"() {
|
|
24
|
+
return own.blocked || void 0;
|
|
25
|
+
}
|
|
26
|
+
}], true);
|
|
27
|
+
insert(_el$, () => {
|
|
28
|
+
return own.children;
|
|
29
|
+
}, _el$2);
|
|
30
|
+
insert(_el$, createComponent(Show, {
|
|
31
|
+
get when() {
|
|
32
|
+
return own.blocked;
|
|
33
|
+
},
|
|
34
|
+
get children() {
|
|
35
|
+
var _el$3 = _tmpl$();
|
|
36
|
+
insert(_el$3, createComponent(Spinner, { size: "lg" }));
|
|
37
|
+
return _el$3;
|
|
38
|
+
}
|
|
39
|
+
}), _el$4);
|
|
40
|
+
return _el$;
|
|
41
|
+
}
|
|
42
|
+
//#endregion
|
|
43
|
+
export { BlockUI };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
-
import { createComponent, mergeProps, spread, template } from "
|
|
2
|
+
import { createComponent, mergeProps, spread, template } from "@solidjs/web";
|
|
3
3
|
import { mergeProps as mergeProps$1 } from "solid-js";
|
|
4
4
|
//#region src/components/breadcrumb/index.tsx
|
|
5
|
-
var _tmpl$ =
|
|
5
|
+
var _tmpl$ = /* @__PURE__ */ template(`<span>`);
|
|
6
6
|
/** A trail of waymarks: Root wraps the nav, List the ordered trail, and
|
|
7
7
|
* each Item carries a Link — or the Current page — parted by a quiet
|
|
8
8
|
* Separator. Links take href and the rest through attributes. */
|
|
@@ -10,7 +10,7 @@ function part(name, tag, extra = {}) {
|
|
|
10
10
|
return ((props) => {
|
|
11
11
|
return createComponent(tag, mergeProps(extra, props, {
|
|
12
12
|
"data-scope": "breadcrumb",
|
|
13
|
-
get
|
|
13
|
+
get "data-part"() {
|
|
14
14
|
return name.toLowerCase();
|
|
15
15
|
}
|
|
16
16
|
}));
|
|
@@ -23,11 +23,13 @@ const Link = part("Link", "a");
|
|
|
23
23
|
const Current = part("Current", "span", { "aria-current": "page" });
|
|
24
24
|
const Separator = (props) => (() => {
|
|
25
25
|
var _el$ = _tmpl$();
|
|
26
|
-
spread(_el$,
|
|
26
|
+
spread(_el$, [() => {
|
|
27
|
+
return mergeProps$1({ children: "/" }, props);
|
|
28
|
+
}, {
|
|
27
29
|
"aria-hidden": "true",
|
|
28
30
|
"data-scope": "breadcrumb",
|
|
29
31
|
"data-part": "separator"
|
|
30
|
-
}
|
|
32
|
+
}], false);
|
|
31
33
|
return _el$;
|
|
32
34
|
})();
|
|
33
35
|
const Breadcrumb = Object.assign(Root, {
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { JSX } from "solid-js";
|
|
2
|
+
//#region src/components/browser/index.d.ts
|
|
3
|
+
export interface BrowserPartProps extends JSX.HTMLAttributes<HTMLDivElement> {}
|
|
4
|
+
/** The three lamps are the system's own fixed pigments — the same
|
|
5
|
+
* semantics reserved for danger, warning, and success. */
|
|
6
|
+
export declare function BrowserDots(props: BrowserPartProps): JSX.Element;
|
|
7
|
+
export declare function BrowserRoot(props: BrowserPartProps): JSX.Element;
|
|
8
|
+
export declare function BrowserTitleBar(props: BrowserPartProps): JSX.Element;
|
|
9
|
+
export declare function BrowserUrlBar(props: BrowserPartProps): JSX.Element;
|
|
10
|
+
export declare function BrowserBody(props: BrowserPartProps): JSX.Element;
|
|
11
|
+
/** A browser window as a vessel: title bar, the three lamps, the
|
|
12
|
+
* address well, and a body that carries whatever the site hangs in
|
|
13
|
+
* it — an iframe, a screenshot, a live page. */
|
|
14
|
+
export declare const Browser: typeof BrowserRoot & {
|
|
15
|
+
Root: typeof BrowserRoot;
|
|
16
|
+
TitleBar: typeof BrowserTitleBar;
|
|
17
|
+
Dots: typeof BrowserDots;
|
|
18
|
+
UrlBar: typeof BrowserUrlBar;
|
|
19
|
+
Body: typeof BrowserBody;
|
|
20
|
+
};
|
|
21
|
+
//#endregion
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
+
import { insert, setAttribute, spread, template } from "@solidjs/web";
|
|
3
|
+
//#region src/components/browser/index.tsx
|
|
4
|
+
var _tmpl$ = /* @__PURE__ */ template(`<div>`);
|
|
5
|
+
var _tmpl$2 = /* @__PURE__ */ template(`<span data-scope=browser data-part=dot>`);
|
|
6
|
+
/** The three lamps are the system's own fixed pigments — the same
|
|
7
|
+
* semantics reserved for danger, warning, and success. */
|
|
8
|
+
function BrowserDots(props) {
|
|
9
|
+
injectComponentStyle("browser");
|
|
10
|
+
var _el$ = _tmpl$();
|
|
11
|
+
spread(_el$, [props, {
|
|
12
|
+
"data-scope": "browser",
|
|
13
|
+
"data-part": "dots"
|
|
14
|
+
}], true);
|
|
15
|
+
insert(_el$, () => {
|
|
16
|
+
return [
|
|
17
|
+
"danger",
|
|
18
|
+
"warning",
|
|
19
|
+
"success"
|
|
20
|
+
].map((tone) => (() => {
|
|
21
|
+
var _el$2 = _tmpl$2();
|
|
22
|
+
setAttribute(_el$2, "data-tone", tone);
|
|
23
|
+
return _el$2;
|
|
24
|
+
})());
|
|
25
|
+
});
|
|
26
|
+
return _el$;
|
|
27
|
+
}
|
|
28
|
+
function BrowserRoot(props) {
|
|
29
|
+
injectComponentStyle("browser");
|
|
30
|
+
var _el$3 = _tmpl$();
|
|
31
|
+
spread(_el$3, [props, {
|
|
32
|
+
"data-scope": "browser",
|
|
33
|
+
"data-part": "root"
|
|
34
|
+
}], true);
|
|
35
|
+
insert(_el$3, () => {
|
|
36
|
+
return props.children;
|
|
37
|
+
});
|
|
38
|
+
return _el$3;
|
|
39
|
+
}
|
|
40
|
+
function BrowserTitleBar(props) {
|
|
41
|
+
injectComponentStyle("browser");
|
|
42
|
+
var _el$4 = _tmpl$();
|
|
43
|
+
spread(_el$4, [props, {
|
|
44
|
+
"data-scope": "browser",
|
|
45
|
+
"data-part": "titlebar"
|
|
46
|
+
}], true);
|
|
47
|
+
insert(_el$4, () => {
|
|
48
|
+
return props.children;
|
|
49
|
+
});
|
|
50
|
+
return _el$4;
|
|
51
|
+
}
|
|
52
|
+
function BrowserUrlBar(props) {
|
|
53
|
+
injectComponentStyle("browser");
|
|
54
|
+
var _el$5 = _tmpl$();
|
|
55
|
+
spread(_el$5, [props, {
|
|
56
|
+
"data-scope": "browser",
|
|
57
|
+
"data-part": "urlbar"
|
|
58
|
+
}], true);
|
|
59
|
+
insert(_el$5, () => {
|
|
60
|
+
return props.children;
|
|
61
|
+
});
|
|
62
|
+
return _el$5;
|
|
63
|
+
}
|
|
64
|
+
function BrowserBody(props) {
|
|
65
|
+
injectComponentStyle("browser");
|
|
66
|
+
var _el$6 = _tmpl$();
|
|
67
|
+
spread(_el$6, [props, {
|
|
68
|
+
"data-scope": "browser",
|
|
69
|
+
"data-part": "body"
|
|
70
|
+
}], true);
|
|
71
|
+
insert(_el$6, () => {
|
|
72
|
+
return props.children;
|
|
73
|
+
});
|
|
74
|
+
return _el$6;
|
|
75
|
+
}
|
|
76
|
+
/** A browser window as a vessel: title bar, the three lamps, the
|
|
77
|
+
* address well, and a body that carries whatever the site hangs in
|
|
78
|
+
* it — an iframe, a screenshot, a live page. */
|
|
79
|
+
const Browser = Object.assign(BrowserRoot, {
|
|
80
|
+
Root: BrowserRoot,
|
|
81
|
+
TitleBar: BrowserTitleBar,
|
|
82
|
+
Dots: BrowserDots,
|
|
83
|
+
UrlBar: BrowserUrlBar,
|
|
84
|
+
Body: BrowserBody
|
|
85
|
+
});
|
|
86
|
+
//#endregion
|
|
87
|
+
export { Browser, BrowserBody, BrowserDots, BrowserRoot, BrowserTitleBar, BrowserUrlBar };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
-
import {
|
|
2
|
+
import { spread, template } from "@solidjs/web";
|
|
3
3
|
import { splitProps } from "solid-js";
|
|
4
4
|
//#region src/components/button/index.tsx
|
|
5
|
-
var _tmpl$ =
|
|
5
|
+
var _tmpl$ = /* @__PURE__ */ template(`<button>`);
|
|
6
6
|
function Button(props) {
|
|
7
7
|
injectComponentStyle("button");
|
|
8
8
|
const [own, rest] = splitProps(props, [
|
|
@@ -13,33 +13,31 @@ function Button(props) {
|
|
|
13
13
|
"type",
|
|
14
14
|
"disabled"
|
|
15
15
|
]);
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
return _el$;
|
|
42
|
-
})();
|
|
16
|
+
var _el$ = _tmpl$();
|
|
17
|
+
spread(_el$, [rest, {
|
|
18
|
+
get type() {
|
|
19
|
+
return own.type ?? "button";
|
|
20
|
+
},
|
|
21
|
+
get disabled() {
|
|
22
|
+
return own.disabled;
|
|
23
|
+
},
|
|
24
|
+
"data-scope": "button",
|
|
25
|
+
"data-part": "root",
|
|
26
|
+
get "data-variant"() {
|
|
27
|
+
return own.variant ?? "solid";
|
|
28
|
+
},
|
|
29
|
+
get "data-tone"() {
|
|
30
|
+
return own.tone ?? "ink";
|
|
31
|
+
},
|
|
32
|
+
get "data-size"() {
|
|
33
|
+
return own.size ?? "md";
|
|
34
|
+
},
|
|
35
|
+
get "data-square"() {
|
|
36
|
+
return own.square ? "true" : void 0;
|
|
37
|
+
},
|
|
38
|
+
"data-motion": "ink-ripple lit"
|
|
39
|
+
}], false);
|
|
40
|
+
return _el$;
|
|
43
41
|
}
|
|
44
42
|
//#endregion
|
|
45
43
|
export { Button };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
-
import {
|
|
2
|
+
import { spread, template } from "@solidjs/web";
|
|
3
3
|
import { splitProps } from "solid-js";
|
|
4
4
|
//#region src/components/button-group/index.tsx
|
|
5
|
-
var _tmpl$ =
|
|
5
|
+
var _tmpl$ = /* @__PURE__ */ template(`<div>`);
|
|
6
6
|
/**
|
|
7
7
|
* Buttons fused into one control: the group owns only the joinery, so
|
|
8
8
|
* members keep every variant they were given — a solid action can sit
|
|
@@ -16,24 +16,22 @@ function ButtonGroupRoot(props) {
|
|
|
16
16
|
"size",
|
|
17
17
|
"radius"
|
|
18
18
|
]);
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
return _el$;
|
|
36
|
-
})();
|
|
19
|
+
var _el$ = _tmpl$();
|
|
20
|
+
spread(_el$, [rest, {
|
|
21
|
+
role: "group",
|
|
22
|
+
"data-scope": "button-group",
|
|
23
|
+
"data-part": "root",
|
|
24
|
+
get "data-orientation"() {
|
|
25
|
+
return own.orientation ?? "horizontal";
|
|
26
|
+
},
|
|
27
|
+
get "data-size"() {
|
|
28
|
+
return own.size;
|
|
29
|
+
},
|
|
30
|
+
get "data-radius"() {
|
|
31
|
+
return own.radius;
|
|
32
|
+
}
|
|
33
|
+
}], false);
|
|
34
|
+
return _el$;
|
|
37
35
|
}
|
|
38
36
|
const ButtonGroup = Object.assign(ButtonGroupRoot, { Root: ButtonGroupRoot });
|
|
39
37
|
//#endregion
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
-
import { createComponent, effect, insert, memo, mergeProps, spread, style, template } from "
|
|
2
|
+
import { createComponent, effect, insert, memo, mergeProps, readShallow, spread, style, template } from "@solidjs/web";
|
|
3
3
|
import { For, Show, splitProps } from "solid-js";
|
|
4
4
|
import { DatePicker } from "@ark-ui/solid/date-picker";
|
|
5
5
|
//#region src/components/calendar/index.tsx
|
|
6
|
-
var _tmpl$ =
|
|
7
|
-
var _tmpl$2 =
|
|
8
|
-
var _tmpl$3 =
|
|
6
|
+
var _tmpl$ = /* @__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">`);
|
|
7
|
+
var _tmpl$2 = /* @__PURE__ */ template(`<div data-scope=calendar data-part=header>`);
|
|
8
|
+
var _tmpl$3 = /* @__PURE__ */ template(`<div><!><!>`);
|
|
9
9
|
function chevron(dir) {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
var _el$ = _tmpl$();
|
|
11
|
+
effect(() => readShallow(dir === "left" ? { transform: "rotate(180deg)" } : void 0), (_v$, _$p) => {
|
|
12
|
+
style(_el$, _v$, _$p);
|
|
13
|
+
});
|
|
14
|
+
return _el$;
|
|
15
15
|
}
|
|
16
16
|
/** The date-picker's month grid, standing on the page without its
|
|
17
17
|
* popup: always open, the trigger gone, the vessel a quiet card. The
|
|
@@ -56,142 +56,154 @@ function Calendar(props) {
|
|
|
56
56
|
} }));
|
|
57
57
|
return _el$2;
|
|
58
58
|
})();
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
59
|
+
var _el$3 = _tmpl$3();
|
|
60
|
+
var _el$4 = _el$3.firstChild;
|
|
61
|
+
var _el$5 = _el$4.nextSibling;
|
|
62
|
+
spread(_el$3, [rest, {
|
|
63
|
+
"data-scope": "calendar",
|
|
64
|
+
"data-part": "root"
|
|
65
|
+
}], true);
|
|
66
|
+
insert(_el$3, createComponent(DatePicker.Root, mergeProps({
|
|
67
|
+
open: true,
|
|
68
|
+
closeOnSelect: true,
|
|
69
|
+
inline: true
|
|
70
|
+
}, () => {
|
|
71
|
+
return own.value !== void 0 ? { value: own.value } : {};
|
|
72
|
+
}, () => {
|
|
73
|
+
return own.min !== void 0 ? { min: own.min } : {};
|
|
74
|
+
}, () => {
|
|
75
|
+
return own.max !== void 0 ? { max: own.max } : {};
|
|
76
|
+
}, {
|
|
77
|
+
onValueChange: (details) => own.onValueChange?.(details.value),
|
|
78
|
+
get children() {
|
|
79
|
+
return [
|
|
80
|
+
createComponent(DatePicker.View, {
|
|
81
|
+
view: "day",
|
|
82
|
+
get children() {
|
|
83
|
+
return [memo(() => {
|
|
84
|
+
return header();
|
|
85
|
+
}), createComponent(DatePicker.Table, { get children() {
|
|
86
|
+
return [createComponent(DatePicker.TableHead, { get children() {
|
|
87
|
+
return createComponent(DatePicker.TableRow, { get children() {
|
|
88
|
+
return createComponent(DatePicker.Context, { children: (dp) => createComponent(For, {
|
|
89
|
+
get each() {
|
|
90
|
+
return dp().weekDays;
|
|
91
|
+
},
|
|
92
|
+
children: (day) => createComponent(DatePicker.TableHeader, {
|
|
93
|
+
get "aria-label"() {
|
|
94
|
+
return day.long;
|
|
82
95
|
},
|
|
83
|
-
children
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
96
|
+
get children() {
|
|
97
|
+
return day.narrow;
|
|
98
|
+
}
|
|
99
|
+
})
|
|
100
|
+
}) });
|
|
101
|
+
} });
|
|
102
|
+
} }), createComponent(DatePicker.TableBody, { get children() {
|
|
103
|
+
return createComponent(DatePicker.Context, { children: (dp) => createComponent(For, {
|
|
104
|
+
get each() {
|
|
105
|
+
return dp().weeks;
|
|
106
|
+
},
|
|
107
|
+
children: (week) => createComponent(DatePicker.TableRow, { get children() {
|
|
108
|
+
return createComponent(For, {
|
|
109
|
+
each: week,
|
|
110
|
+
children: (day) => createComponent(DatePicker.TableCell, {
|
|
111
|
+
value: day,
|
|
87
112
|
get children() {
|
|
88
|
-
return
|
|
113
|
+
return createComponent(DatePicker.TableCellTrigger, { get children() {
|
|
114
|
+
return day.day;
|
|
115
|
+
} });
|
|
89
116
|
}
|
|
90
117
|
})
|
|
91
|
-
})
|
|
92
|
-
} })
|
|
93
|
-
} })
|
|
118
|
+
});
|
|
119
|
+
} })
|
|
120
|
+
}) });
|
|
121
|
+
} })];
|
|
122
|
+
} })];
|
|
123
|
+
}
|
|
124
|
+
}),
|
|
125
|
+
createComponent(DatePicker.View, {
|
|
126
|
+
view: "month",
|
|
127
|
+
get children() {
|
|
128
|
+
return [memo(() => {
|
|
129
|
+
return header();
|
|
130
|
+
}), createComponent(DatePicker.Table, {
|
|
131
|
+
columns: 3,
|
|
132
|
+
get children() {
|
|
133
|
+
return createComponent(DatePicker.TableBody, { get children() {
|
|
94
134
|
return createComponent(DatePicker.Context, { children: (dp) => createComponent(For, {
|
|
95
135
|
get each() {
|
|
96
|
-
return dp().
|
|
136
|
+
return dp().getMonthsGrid({ columns: 3 });
|
|
97
137
|
},
|
|
98
|
-
children: (
|
|
138
|
+
children: (months) => createComponent(DatePicker.TableRow, { get children() {
|
|
99
139
|
return createComponent(For, {
|
|
100
|
-
each:
|
|
101
|
-
children: (
|
|
102
|
-
value
|
|
140
|
+
each: months,
|
|
141
|
+
children: (month) => createComponent(DatePicker.TableCell, {
|
|
142
|
+
get value() {
|
|
143
|
+
return month.value;
|
|
144
|
+
},
|
|
145
|
+
columns: 3,
|
|
103
146
|
get children() {
|
|
104
147
|
return createComponent(DatePicker.TableCellTrigger, { get children() {
|
|
105
|
-
return
|
|
148
|
+
return month.label;
|
|
106
149
|
} });
|
|
107
150
|
}
|
|
108
151
|
})
|
|
109
152
|
});
|
|
110
153
|
} })
|
|
111
154
|
}) });
|
|
112
|
-
} })
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
get value() {
|
|
165
|
-
return year.value;
|
|
166
|
-
},
|
|
167
|
-
columns: 3,
|
|
168
|
-
get children() {
|
|
169
|
-
return createComponent(DatePicker.TableCellTrigger, { get children() {
|
|
170
|
-
return year.label;
|
|
171
|
-
} });
|
|
172
|
-
}
|
|
173
|
-
})
|
|
174
|
-
});
|
|
175
|
-
} })
|
|
176
|
-
}) });
|
|
177
|
-
} });
|
|
178
|
-
}
|
|
179
|
-
})];
|
|
180
|
-
}
|
|
181
|
-
})
|
|
182
|
-
];
|
|
183
|
-
}
|
|
184
|
-
})), null);
|
|
185
|
-
insert(_el$3, createComponent(Show, {
|
|
186
|
-
get when() {
|
|
187
|
-
return rest.children;
|
|
188
|
-
},
|
|
189
|
-
get children() {
|
|
190
|
-
return rest.children;
|
|
191
|
-
}
|
|
192
|
-
}), null);
|
|
193
|
-
return _el$3;
|
|
194
|
-
})();
|
|
155
|
+
} });
|
|
156
|
+
}
|
|
157
|
+
})];
|
|
158
|
+
}
|
|
159
|
+
}),
|
|
160
|
+
createComponent(DatePicker.View, {
|
|
161
|
+
view: "year",
|
|
162
|
+
get children() {
|
|
163
|
+
return [memo(() => {
|
|
164
|
+
return header();
|
|
165
|
+
}), createComponent(DatePicker.Table, {
|
|
166
|
+
columns: 3,
|
|
167
|
+
get children() {
|
|
168
|
+
return createComponent(DatePicker.TableBody, { get children() {
|
|
169
|
+
return createComponent(DatePicker.Context, { children: (dp) => createComponent(For, {
|
|
170
|
+
get each() {
|
|
171
|
+
return dp().getYearsGrid({ columns: 3 });
|
|
172
|
+
},
|
|
173
|
+
children: (years) => createComponent(DatePicker.TableRow, { get children() {
|
|
174
|
+
return createComponent(For, {
|
|
175
|
+
each: years,
|
|
176
|
+
children: (year) => createComponent(DatePicker.TableCell, {
|
|
177
|
+
get value() {
|
|
178
|
+
return year.value;
|
|
179
|
+
},
|
|
180
|
+
columns: 3,
|
|
181
|
+
get children() {
|
|
182
|
+
return createComponent(DatePicker.TableCellTrigger, { get children() {
|
|
183
|
+
return year.label;
|
|
184
|
+
} });
|
|
185
|
+
}
|
|
186
|
+
})
|
|
187
|
+
});
|
|
188
|
+
} })
|
|
189
|
+
}) });
|
|
190
|
+
} });
|
|
191
|
+
}
|
|
192
|
+
})];
|
|
193
|
+
}
|
|
194
|
+
})
|
|
195
|
+
];
|
|
196
|
+
}
|
|
197
|
+
})), _el$4);
|
|
198
|
+
insert(_el$3, createComponent(Show, {
|
|
199
|
+
get when() {
|
|
200
|
+
return rest.children;
|
|
201
|
+
},
|
|
202
|
+
get children() {
|
|
203
|
+
return rest.children;
|
|
204
|
+
}
|
|
205
|
+
}), _el$5);
|
|
206
|
+
return _el$3;
|
|
195
207
|
}
|
|
196
208
|
//#endregion
|
|
197
209
|
export { Calendar };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
-
import { createComponent, mergeProps } from "
|
|
2
|
+
import { createComponent, mergeProps } from "@solidjs/web";
|
|
3
3
|
//#region src/components/card/index.tsx
|
|
4
4
|
/** A vessel: round, resting at the first elevation, one hairline for its
|
|
5
5
|
* edge. Root, Header, Title, Description, Content, Footer — sections
|
|
@@ -8,7 +8,7 @@ function part(name, tag) {
|
|
|
8
8
|
return ((props) => {
|
|
9
9
|
return createComponent(tag, mergeProps(props, {
|
|
10
10
|
"data-scope": "card",
|
|
11
|
-
get
|
|
11
|
+
get "data-part"() {
|
|
12
12
|
return name.toLowerCase();
|
|
13
13
|
}
|
|
14
14
|
}));
|