@bysages/solid 0.2.2 → 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-ClGGptX3.mjs +139 -0
- package/dist/chevron-D5RzcayK.mjs +9 -0
- package/dist/components/accordion/index.d.mts +7 -0
- package/dist/components/accordion/index.mjs +10 -0
- package/dist/components/affix/index.d.mts +20 -0
- package/dist/components/affix/index.mjs +33 -0
- package/dist/components/ai/index.d.mts +2 -0
- package/dist/components/ai/index.mjs +71 -0
- package/dist/components/ai-action/index.d.mts +13 -0
- package/dist/components/ai-action/index.mjs +27 -0
- package/dist/components/ai-attachments/index.d.mts +20 -0
- package/dist/components/ai-attachments/index.mjs +110 -0
- package/dist/components/ai-message/index.d.mts +13 -0
- package/dist/components/ai-message/index.mjs +22 -0
- package/dist/components/ai-prompt-input/index.d.mts +45 -0
- package/dist/components/ai-prompt-input/index.mjs +153 -0
- package/dist/components/ai-reasoning/index.d.mts +13 -0
- package/dist/components/ai-reasoning/index.mjs +38 -0
- package/dist/components/ai-response/index.d.mts +20 -0
- package/dist/components/ai-response/index.mjs +2 -0
- package/dist/components/ai-source/index.d.mts +13 -0
- package/dist/components/ai-source/index.mjs +36 -0
- package/dist/components/ai-suggestion/index.d.mts +13 -0
- package/dist/components/ai-suggestion/index.mjs +22 -0
- package/dist/components/ai-tool/index.d.mts +23 -0
- package/dist/components/ai-tool/index.mjs +90 -0
- package/dist/components/alert/index.d.mts +22 -0
- package/dist/components/alert/index.mjs +87 -0
- package/dist/components/angle-slider/index.d.mts +15 -0
- package/dist/components/angle-slider/index.mjs +18 -0
- package/dist/components/aspect-ratio/index.d.mts +10 -0
- package/dist/components/aspect-ratio/index.mjs +23 -0
- package/dist/components/autocomplete/index.d.mts +21 -0
- package/dist/components/autocomplete/index.mjs +76 -0
- package/dist/components/avatar/index.d.mts +23 -0
- package/dist/components/avatar/index.mjs +20 -0
- package/dist/components/avatar-group/index.d.mts +11 -0
- package/dist/components/avatar-group/index.mjs +20 -0
- package/dist/components/back-top/index.d.mts +29 -0
- package/dist/components/back-top/index.mjs +93 -0
- package/dist/components/badge/index.d.mts +10 -0
- package/dist/components/badge/index.mjs +23 -0
- package/dist/components/banner/index.d.mts +24 -0
- package/dist/components/banner/index.mjs +67 -0
- 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.d.mts +11 -0
- package/dist/components/breadcrumb/index.mjs +45 -0
- package/dist/components/browser/index.d.mts +21 -0
- package/dist/components/browser/index.mjs +87 -0
- package/dist/components/button/index.d.mts +15 -0
- package/dist/components/button/index.mjs +43 -0
- package/dist/components/button-group/index.d.mts +23 -0
- package/dist/components/button-group/index.mjs +38 -0
- package/dist/components/calendar/index.d.mts +17 -0
- package/dist/components/calendar/index.mjs +209 -0
- package/dist/components/card/index.d.mts +11 -0
- package/dist/components/card/index.mjs +33 -0
- package/dist/components/carousel/index.d.mts +9 -0
- package/dist/components/carousel/index.mjs +12 -0
- package/dist/components/cascade-select/index.d.mts +31 -0
- package/dist/components/cascade-select/index.mjs +304 -0
- package/dist/components/checkbox/index.d.mts +15 -0
- package/dist/components/checkbox/index.mjs +18 -0
- package/dist/components/checkbox-group/index.d.mts +28 -0
- package/dist/components/checkbox-group/index.mjs +97 -0
- package/dist/components/chip/index.d.mts +12 -0
- package/dist/components/chip/index.mjs +36 -0
- package/dist/components/client-only/index.d.mts +2 -0
- package/dist/components/client-only/index.mjs +2 -0
- package/dist/components/clipboard/index.d.mts +16 -0
- package/dist/components/clipboard/index.mjs +19 -0
- package/dist/components/collapsible/index.d.mts +7 -0
- package/dist/components/collapsible/index.mjs +10 -0
- package/dist/components/collection/index.d.mts +2 -0
- package/dist/components/collection/index.mjs +2 -0
- package/dist/components/color-picker/index.d.mts +19 -0
- package/dist/components/color-picker/index.mjs +18 -0
- package/dist/components/combobox/index.d.mts +17 -0
- package/dist/components/combobox/index.mjs +18 -0
- package/dist/components/command/index.d.mts +43 -0
- package/dist/components/command/index.mjs +253 -0
- package/dist/components/comment/index.d.mts +17 -0
- package/dist/components/comment/index.mjs +101 -0
- package/dist/components/config-provider/index.d.mts +48 -0
- package/dist/components/config-provider/index.mjs +67 -0
- package/dist/components/container/index.d.mts +13 -0
- package/dist/components/container/index.mjs +23 -0
- 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.d.mts +15 -0
- package/dist/components/date-input/index.mjs +18 -0
- package/dist/components/date-picker/index.d.mts +17 -0
- package/dist/components/date-picker/index.mjs +18 -0
- 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 +26 -0
- package/dist/components/descriptions/index.mjs +69 -0
- package/dist/components/dialog/index.d.mts +9 -0
- package/dist/components/dialog/index.mjs +11 -0
- package/dist/components/dock/index.d.mts +22 -0
- package/dist/components/dock/index.mjs +64 -0
- package/dist/components/download-trigger/index.d.mts +2 -0
- package/dist/components/download-trigger/index.mjs +2 -0
- package/dist/components/drawer/index.d.mts +9 -0
- package/dist/components/drawer/index.mjs +12 -0
- package/dist/components/dynamic-input/index.d.mts +30 -0
- package/dist/components/dynamic-input/index.mjs +119 -0
- package/dist/components/editable/index.d.mts +15 -0
- package/dist/components/editable/index.mjs +18 -0
- package/dist/components/ellipsis/index.d.mts +10 -0
- package/dist/components/ellipsis/index.mjs +27 -0
- package/dist/components/empty/index.d.mts +10 -0
- package/dist/components/empty/index.mjs +31 -0
- package/dist/components/field/index.d.mts +8 -0
- package/dist/components/field/index.mjs +11 -0
- package/dist/components/fieldset/index.d.mts +7 -0
- package/dist/components/fieldset/index.mjs +10 -0
- package/dist/components/file-upload/index.d.mts +17 -0
- package/dist/components/file-upload/index.mjs +18 -0
- package/dist/components/float-button/index.d.mts +61 -0
- package/dist/components/float-button/index.mjs +129 -0
- package/dist/components/floating-panel/index.d.mts +9 -0
- package/dist/components/floating-panel/index.mjs +12 -0
- package/dist/components/focus-trap/index.d.mts +2 -0
- package/dist/components/focus-trap/index.mjs +2 -0
- package/dist/components/form/index.d.mts +2 -0
- package/dist/components/form/index.mjs +125 -0
- package/dist/components/format/index.d.mts +9 -0
- package/dist/components/format/index.mjs +10 -0
- package/dist/components/frame/index.d.mts +10 -0
- package/dist/components/frame/index.mjs +12 -0
- package/dist/components/grid/index.d.mts +13 -0
- package/dist/components/grid/index.mjs +42 -0
- package/dist/components/highlight/index.d.mts +7 -0
- package/dist/components/highlight/index.mjs +11 -0
- package/dist/components/hover-card/index.d.mts +7 -0
- package/dist/components/hover-card/index.mjs +10 -0
- package/dist/components/icon/index.d.mts +24 -0
- package/dist/components/icon/index.mjs +54 -0
- package/dist/components/image/index.d.mts +17 -0
- package/dist/components/image/index.mjs +70 -0
- package/dist/components/image-cropper/index.d.mts +8 -0
- package/dist/components/image-cropper/index.mjs +11 -0
- package/dist/components/image-viewer/index.d.mts +19 -0
- package/dist/components/image-viewer/index.mjs +152 -0
- package/dist/components/input/index.d.mts +19 -0
- package/dist/components/input/index.mjs +2 -0
- package/dist/components/input-group/index.d.mts +18 -0
- package/dist/components/input-group/index.mjs +36 -0
- package/dist/components/json-tree-view/index.d.mts +7 -0
- package/dist/components/json-tree-view/index.mjs +10 -0
- package/dist/components/kbd/index.d.mts +6 -0
- package/dist/components/kbd/index.mjs +15 -0
- package/dist/components/layout/index.d.mts +60 -0
- package/dist/components/layout/index.mjs +192 -0
- package/dist/components/link/index.d.mts +10 -0
- package/dist/components/link/index.mjs +24 -0
- package/dist/components/list/index.d.mts +26 -0
- package/dist/components/list/index.mjs +97 -0
- package/dist/components/listbox/index.d.mts +17 -0
- package/dist/components/listbox/index.mjs +19 -0
- package/dist/components/marquee/index.d.mts +7 -0
- package/dist/components/marquee/index.mjs +10 -0
- package/dist/components/masonry/index.d.mts +11 -0
- package/dist/components/masonry/index.mjs +34 -0
- package/dist/components/mentions/index.d.mts +2 -0
- package/dist/components/mentions/index.mjs +3 -0
- package/dist/components/menu/index.d.mts +13 -0
- package/dist/components/menu/index.mjs +38 -0
- package/dist/components/menubar/index.d.mts +32 -0
- package/dist/components/menubar/index.mjs +83 -0
- package/dist/components/meter/index.d.mts +21 -0
- package/dist/components/meter/index.mjs +95 -0
- package/dist/components/navigation-menu/index.d.mts +8 -0
- package/dist/components/navigation-menu/index.mjs +11 -0
- package/dist/components/number-input/index.d.mts +15 -0
- package/dist/components/number-input/index.mjs +18 -0
- 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.d.mts +11 -0
- package/dist/components/page-header/index.mjs +34 -0
- package/dist/components/pagination/index.d.mts +17 -0
- package/dist/components/pagination/index.mjs +18 -0
- package/dist/components/password-input/index.d.mts +15 -0
- package/dist/components/password-input/index.mjs +18 -0
- package/dist/components/pin-input/index.d.mts +14 -0
- package/dist/components/pin-input/index.mjs +18 -0
- package/dist/components/popconfirm/index.d.mts +17 -0
- package/dist/components/popconfirm/index.mjs +85 -0
- package/dist/components/popover/index.d.mts +8 -0
- package/dist/components/popover/index.mjs +11 -0
- package/dist/components/presence/index.d.mts +2 -0
- package/dist/components/presence/index.mjs +2 -0
- package/dist/components/progress/index.d.mts +15 -0
- package/dist/components/progress/index.mjs +18 -0
- package/dist/components/progress-group/index.d.mts +22 -0
- package/dist/components/progress-group/index.mjs +84 -0
- package/dist/components/qr-code/index.d.mts +8 -0
- package/dist/components/qr-code/index.mjs +11 -0
- package/dist/components/radio-group/index.d.mts +15 -0
- package/dist/components/radio-group/index.mjs +18 -0
- package/dist/components/rating-group/index.d.mts +15 -0
- package/dist/components/rating-group/index.mjs +18 -0
- package/dist/components/result/index.d.mts +22 -0
- package/dist/components/result/index.mjs +66 -0
- package/dist/components/scroll-area/index.d.mts +7 -0
- package/dist/components/scroll-area/index.mjs +10 -0
- package/dist/components/segment-group/index.d.mts +17 -0
- package/dist/components/segment-group/index.mjs +23 -0
- package/dist/components/select/index.d.mts +2 -0
- package/dist/components/select/index.mjs +2 -0
- package/dist/components/separator/index.d.mts +11 -0
- package/dist/components/separator/index.mjs +27 -0
- package/dist/components/signature-pad/index.d.mts +8 -0
- package/dist/components/signature-pad/index.mjs +11 -0
- package/dist/components/skeleton/index.d.mts +7 -0
- package/dist/components/skeleton/index.mjs +15 -0
- package/dist/components/slider/index.d.mts +15 -0
- package/dist/components/slider/index.mjs +18 -0
- package/dist/components/spinner/index.d.mts +9 -0
- package/dist/components/spinner/index.mjs +26 -0
- package/dist/components/split-button/index.d.mts +36 -0
- package/dist/components/split-button/index.mjs +124 -0
- package/dist/components/splitter/index.d.mts +7 -0
- package/dist/components/splitter/index.mjs +10 -0
- package/dist/components/spotlight/index.d.mts +11 -0
- package/dist/components/spotlight/index.mjs +38 -0
- package/dist/components/stack/index.d.mts +11 -0
- package/dist/components/stack/index.mjs +45 -0
- package/dist/components/stat/index.d.mts +17 -0
- package/dist/components/stat/index.mjs +44 -0
- package/dist/components/steps/index.d.mts +18 -0
- package/dist/components/steps/index.mjs +18 -0
- package/dist/components/swap/index.d.mts +8 -0
- package/dist/components/swap/index.mjs +11 -0
- package/dist/components/switch/index.d.mts +15 -0
- package/dist/components/switch/index.mjs +18 -0
- package/dist/components/table/index.d.mts +77 -0
- package/dist/components/table/index.mjs +837 -0
- package/dist/components/tabs/index.d.mts +19 -0
- package/dist/components/tabs/index.mjs +23 -0
- package/dist/components/tags-input/index.d.mts +16 -0
- package/dist/components/tags-input/index.mjs +18 -0
- package/dist/components/terminal/index.d.mts +17 -0
- package/dist/components/terminal/index.mjs +84 -0
- package/dist/components/textarea/index.d.mts +14 -0
- package/dist/components/textarea/index.mjs +37 -0
- package/dist/components/timeline/index.d.mts +15 -0
- package/dist/components/timeline/index.mjs +44 -0
- package/dist/components/timer/index.d.mts +8 -0
- package/dist/components/timer/index.mjs +11 -0
- package/dist/components/toast/index.d.mts +11 -0
- package/dist/components/toast/index.mjs +13 -0
- package/dist/components/toc/index.d.mts +7 -0
- package/dist/components/toc/index.mjs +10 -0
- package/dist/components/toggle/index.d.mts +7 -0
- package/dist/components/toggle/index.mjs +10 -0
- package/dist/components/toggle-group/index.d.mts +14 -0
- package/dist/components/toggle-group/index.mjs +18 -0
- package/dist/components/toolbar/index.d.mts +17 -0
- package/dist/components/toolbar/index.mjs +46 -0
- package/dist/components/tooltip/index.d.mts +7 -0
- package/dist/components/tooltip/index.mjs +10 -0
- package/dist/components/tour/index.d.mts +11 -0
- package/dist/components/tour/index.mjs +13 -0
- package/dist/components/transfer/index.d.mts +24 -0
- package/dist/components/transfer/index.mjs +175 -0
- package/dist/components/tree-select/index.d.mts +28 -0
- package/dist/components/tree-select/index.mjs +253 -0
- package/dist/components/tree-view/index.d.mts +18 -0
- package/dist/components/tree-view/index.mjs +19 -0
- package/dist/components/typography/index.d.mts +11 -0
- package/dist/components/typography/index.mjs +34 -0
- 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.d.mts +17 -0
- package/dist/components/watermark/index.mjs +77 -0
- package/dist/index-B1xiJ5ki.d.mts +1811 -0
- package/dist/index-DDX7x8aT.d.mts +95 -0
- package/dist/index-IfofF-SW.d.mts +10356 -0
- package/dist/index-YPUiqD3n.d.mts +42 -0
- package/dist/index.d.mts +141 -15209
- package/dist/index.mjs +141 -6171
- package/dist/input-DoFQ7RXh.mjs +78 -0
- package/dist/mentions-f5Js_2W7.mjs +263 -0
- package/dist/select-CHaXbzLX.mjs +115 -0
- package/package.json +101 -7
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
+
import { createComponent, insert, mergeProps, spread, template } from "@solidjs/web";
|
|
3
|
+
import { splitProps } from "solid-js";
|
|
4
|
+
//#region src/components/meter/index.tsx
|
|
5
|
+
var _tmpl$ = /* @__PURE__ */ template(`<span><span data-scope=meter data-part=range>`);
|
|
6
|
+
var _tmpl$2 = /* @__PURE__ */ template(`<div>`);
|
|
7
|
+
function part(name, tag) {
|
|
8
|
+
function Component(props) {
|
|
9
|
+
return createComponent(tag, mergeProps(props, {
|
|
10
|
+
"data-scope": "meter",
|
|
11
|
+
get "data-part"() {
|
|
12
|
+
return name.toLowerCase();
|
|
13
|
+
}
|
|
14
|
+
}));
|
|
15
|
+
}
|
|
16
|
+
return Component;
|
|
17
|
+
}
|
|
18
|
+
const Label = part("Label", "span");
|
|
19
|
+
const ValueText = part("ValueText", "span");
|
|
20
|
+
const Track = (props) => (() => {
|
|
21
|
+
var _el$ = _tmpl$();
|
|
22
|
+
spread(_el$, [props, {
|
|
23
|
+
"data-scope": "meter",
|
|
24
|
+
"data-part": "track"
|
|
25
|
+
}], true);
|
|
26
|
+
return _el$;
|
|
27
|
+
})();
|
|
28
|
+
function Root(props) {
|
|
29
|
+
const [own, rest] = splitProps(props, [
|
|
30
|
+
"value",
|
|
31
|
+
"min",
|
|
32
|
+
"max",
|
|
33
|
+
"level",
|
|
34
|
+
"label",
|
|
35
|
+
"size"
|
|
36
|
+
]);
|
|
37
|
+
const min = () => own.min ?? 0;
|
|
38
|
+
const max = () => own.max ?? 100;
|
|
39
|
+
const ratio = () => {
|
|
40
|
+
const span = max() - min();
|
|
41
|
+
return span > 0 ? Math.min(Math.max((own.value - min()) / span, 0), 1) : 0;
|
|
42
|
+
};
|
|
43
|
+
const level = () => own.level ?? "normal";
|
|
44
|
+
var _el$2 = _tmpl$2();
|
|
45
|
+
spread(_el$2, [rest, {
|
|
46
|
+
role: "meter",
|
|
47
|
+
get "aria-valuemin"() {
|
|
48
|
+
return min();
|
|
49
|
+
},
|
|
50
|
+
get "aria-valuemax"() {
|
|
51
|
+
return max();
|
|
52
|
+
},
|
|
53
|
+
get "aria-valuenow"() {
|
|
54
|
+
return own.value;
|
|
55
|
+
},
|
|
56
|
+
get "aria-label"() {
|
|
57
|
+
return own.label ?? rest["aria-label"];
|
|
58
|
+
},
|
|
59
|
+
"data-scope": "meter",
|
|
60
|
+
"data-part": "root",
|
|
61
|
+
get "data-size"() {
|
|
62
|
+
return own.size ?? "md";
|
|
63
|
+
},
|
|
64
|
+
get "data-level"() {
|
|
65
|
+
return level() !== "normal" ? level() : void 0;
|
|
66
|
+
},
|
|
67
|
+
get style() {
|
|
68
|
+
return {
|
|
69
|
+
...rest.style,
|
|
70
|
+
"--_percent": `${ratio() * 100}%`
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
}], true);
|
|
74
|
+
insert(_el$2, () => {
|
|
75
|
+
return rest.children ?? [
|
|
76
|
+
createComponent(Label, { get children() {
|
|
77
|
+
return own.label;
|
|
78
|
+
} }),
|
|
79
|
+
createComponent(ValueText, { get children() {
|
|
80
|
+
return `${Math.round(ratio() * 100)}%`;
|
|
81
|
+
} }),
|
|
82
|
+
createComponent(Track, {})
|
|
83
|
+
];
|
|
84
|
+
});
|
|
85
|
+
return _el$2;
|
|
86
|
+
}
|
|
87
|
+
const Meter = Object.assign(Root, {
|
|
88
|
+
Root,
|
|
89
|
+
Label,
|
|
90
|
+
ValueText,
|
|
91
|
+
Track
|
|
92
|
+
});
|
|
93
|
+
injectComponentStyle("meter");
|
|
94
|
+
//#endregion
|
|
95
|
+
export { Meter };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { NavigationMenu as NavigationMenu$1 } from "@ark-ui/solid/navigation-menu";
|
|
2
|
+
//#region src/components/navigation-menu/index.d.ts
|
|
3
|
+
/** Ark's NavigationMenu, dressed in the paper-and-ink system: a menubar of
|
|
4
|
+
* ghost triggers with one sliding stroke of primary ink, opening the shared
|
|
5
|
+
* popup vessel. The API is Ark's own — Root, List, Item, Trigger, Link,
|
|
6
|
+
* Content, ViewportPositioner, Viewport, Indicator, ItemIndicator, Arrow. */
|
|
7
|
+
export declare const NavigationMenu: typeof NavigationMenu$1;
|
|
8
|
+
//#endregion
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
+
import { NavigationMenu as NavigationMenu$1 } from "@ark-ui/solid/navigation-menu";
|
|
3
|
+
//#region src/components/navigation-menu/index.ts
|
|
4
|
+
/** Ark's NavigationMenu, dressed in the paper-and-ink system: a menubar of
|
|
5
|
+
* ghost triggers with one sliding stroke of primary ink, opening the shared
|
|
6
|
+
* popup vessel. The API is Ark's own — Root, List, Item, Trigger, Link,
|
|
7
|
+
* Content, ViewportPositioner, Viewport, Indicator, ItemIndicator, Arrow. */
|
|
8
|
+
const NavigationMenu = NavigationMenu$1;
|
|
9
|
+
injectComponentStyle("navigation-menu");
|
|
10
|
+
//#endregion
|
|
11
|
+
export { NavigationMenu };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { NumberInput as NumberInput$1, NumberInputRootProps } from "@ark-ui/solid/number-input";
|
|
2
|
+
//#region src/components/number-input/index.d.ts
|
|
3
|
+
/** Ark's NumberInput, dressed in the paper-and-ink system: the stepper
|
|
4
|
+
* rides inside the field as one seal split by a hairline, numbers set in
|
|
5
|
+
* tabular figures. The API is Ark's own — Root, Label, Control, Input,
|
|
6
|
+
* ValueText, IncrementTrigger, DecrementTrigger, Scrubber. */
|
|
7
|
+
type NumberInputOwnProps = {
|
|
8
|
+
/** One rung of the control-height ladder for the field and its stepper. */
|
|
9
|
+
size?: "sm" | "md" | "lg";
|
|
10
|
+
};
|
|
11
|
+
declare function NumberInputRoot(props: NumberInputRootProps & NumberInputOwnProps): import("solid-js").JSX.Element;
|
|
12
|
+
export declare const NumberInput: Omit<typeof NumberInput$1, "Root"> & {
|
|
13
|
+
Root: typeof NumberInputRoot;
|
|
14
|
+
};
|
|
15
|
+
//#endregion
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
+
import { createComponent, mergeProps } from "@solidjs/web";
|
|
3
|
+
import { splitProps } from "solid-js";
|
|
4
|
+
import { NumberInput as NumberInput$1 } from "@ark-ui/solid/number-input";
|
|
5
|
+
//#region src/components/number-input/index.tsx
|
|
6
|
+
function NumberInputRoot(props) {
|
|
7
|
+
const [own, rest] = splitProps(props, ["size"]);
|
|
8
|
+
return createComponent(NumberInput$1.Root, mergeProps(rest, { get "data-size"() {
|
|
9
|
+
return own.size ?? "md";
|
|
10
|
+
} }));
|
|
11
|
+
}
|
|
12
|
+
const NumberInput = {
|
|
13
|
+
...NumberInput$1,
|
|
14
|
+
Root: NumberInputRoot
|
|
15
|
+
};
|
|
16
|
+
injectComponentStyle("number-input");
|
|
17
|
+
//#endregion
|
|
18
|
+
export { NumberInput };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { JSX } from "solid-js";
|
|
2
|
+
//#region src/components/order-list/index.d.ts
|
|
3
|
+
export interface OrderOption {
|
|
4
|
+
label: string;
|
|
5
|
+
value: string;
|
|
6
|
+
}
|
|
7
|
+
export interface OrderListProps extends JSX.HTMLAttributes<HTMLDivElement> {
|
|
8
|
+
/** The rows in their current order — the value is the order. */
|
|
9
|
+
value: string[];
|
|
10
|
+
/** Every row the ledger knows, in no particular order. */
|
|
11
|
+
options: OrderOption[];
|
|
12
|
+
label?: string;
|
|
13
|
+
onValueChange?: (value: string[]) => void;
|
|
14
|
+
}
|
|
15
|
+
/** A ledger the reader may rewrite: rows move by grip or by the side
|
|
16
|
+
* arrows, and the group reports the new order as the value itself —
|
|
17
|
+
* the model is the order. Dragging rides the native drag events — a
|
|
18
|
+
* hairline of primary ink marks the seam the row will land on — so
|
|
19
|
+
* touch keeps the buttons as its route. */
|
|
20
|
+
export declare function OrderList(props: OrderListProps): JSX.Element;
|
|
21
|
+
//#endregion
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
+
import { createComponent, delegateEvents, effect, insert, setAttribute, spread, template } from "@solidjs/web";
|
|
3
|
+
import { For, createSignal, createUniqueId, splitProps } from "solid-js";
|
|
4
|
+
//#region src/components/order-list/index.tsx
|
|
5
|
+
var _tmpl$ = /* @__PURE__ */ template(`<svg viewBox="0 0 24 24"width=12 height=12 fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round aria-hidden=true>`);
|
|
6
|
+
var _tmpl$2 = /* @__PURE__ */ template(`<svg><path></svg>`, 2);
|
|
7
|
+
var _tmpl$3 = /* @__PURE__ */ template(`<div><ol data-scope=order-list data-part=list>`);
|
|
8
|
+
var _tmpl$4 = /* @__PURE__ */ template(`<li role=option aria-selected=true draggable 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 aria-label="Move to top"data-scope=order-list data-part=move></button><button type=button aria-label="Move up"data-scope=order-list data-part=move></button><button type=button aria-label="Move down"data-scope=order-list data-part=move></button><button type=button aria-label="Move to bottom"data-scope=order-list data-part=move>`);
|
|
9
|
+
const ARROWS = {
|
|
10
|
+
up: ["m18 15-6-6-6 6"],
|
|
11
|
+
down: ["m6 9 6 6 6-6"],
|
|
12
|
+
top: ["m18 15-6-6-6 6", "M5 4h14"],
|
|
13
|
+
bottom: ["m6 9 6 6 6-6", "M5 20h14"]
|
|
14
|
+
};
|
|
15
|
+
function arrowGlyph(paths) {
|
|
16
|
+
var _el$ = _tmpl$();
|
|
17
|
+
insert(_el$, createComponent(For, {
|
|
18
|
+
each: paths,
|
|
19
|
+
children: (d) => (() => {
|
|
20
|
+
var _el$2 = _tmpl$2();
|
|
21
|
+
setAttribute(_el$2, "d", d);
|
|
22
|
+
return _el$2;
|
|
23
|
+
})()
|
|
24
|
+
}));
|
|
25
|
+
return _el$;
|
|
26
|
+
}
|
|
27
|
+
/** A ledger the reader may rewrite: rows move by grip or by the side
|
|
28
|
+
* arrows, and the group reports the new order as the value itself —
|
|
29
|
+
* the model is the order. Dragging rides the native drag events — a
|
|
30
|
+
* hairline of primary ink marks the seam the row will land on — so
|
|
31
|
+
* touch keeps the buttons as its route. */
|
|
32
|
+
function OrderList(props) {
|
|
33
|
+
injectComponentStyle("order-list");
|
|
34
|
+
const uid = createUniqueId();
|
|
35
|
+
const [own, rest] = splitProps(props, [
|
|
36
|
+
"value",
|
|
37
|
+
"options",
|
|
38
|
+
"label",
|
|
39
|
+
"onValueChange"
|
|
40
|
+
]);
|
|
41
|
+
const [dragging, setDragging] = createSignal(null);
|
|
42
|
+
const [dropLine, setDropLine] = createSignal(null);
|
|
43
|
+
const rows = () => own.value.map((entry) => own.options.find((option) => option.value === entry)).filter((option) => option != null);
|
|
44
|
+
function reset() {
|
|
45
|
+
setDragging(null);
|
|
46
|
+
setDropLine(null);
|
|
47
|
+
}
|
|
48
|
+
function move(entry, offset) {
|
|
49
|
+
const next = [...own.value];
|
|
50
|
+
const from = next.indexOf(entry);
|
|
51
|
+
const to = Math.max(0, Math.min(next.length - 1, from + offset));
|
|
52
|
+
if (from === to) return;
|
|
53
|
+
next.splice(to, 0, ...next.splice(from, 1));
|
|
54
|
+
own.onValueChange?.(next);
|
|
55
|
+
}
|
|
56
|
+
function drop() {
|
|
57
|
+
const entry = dragging();
|
|
58
|
+
if (entry == null) return;
|
|
59
|
+
const seam = dropLine();
|
|
60
|
+
const from = own.value.indexOf(entry);
|
|
61
|
+
if (seam && seam.index === from) return reset();
|
|
62
|
+
const next = own.value.filter((candidate) => candidate !== entry);
|
|
63
|
+
let at = seam ? seam.before ? seam.index : seam.index + 1 : next.length;
|
|
64
|
+
if (from < at) at -= 1;
|
|
65
|
+
next.splice(Math.max(0, Math.min(next.length, at)), 0, entry);
|
|
66
|
+
own.onValueChange?.(next);
|
|
67
|
+
reset();
|
|
68
|
+
}
|
|
69
|
+
var _el$3 = _tmpl$3();
|
|
70
|
+
var _el$4 = _el$3.firstChild;
|
|
71
|
+
spread(_el$3, [rest, {
|
|
72
|
+
role: "listbox",
|
|
73
|
+
get "aria-label"() {
|
|
74
|
+
return own.label;
|
|
75
|
+
},
|
|
76
|
+
"aria-multiselectable": false,
|
|
77
|
+
"data-scope": "order-list",
|
|
78
|
+
"data-part": "root",
|
|
79
|
+
"data-uid": uid,
|
|
80
|
+
onDragLeave: (event) => {
|
|
81
|
+
const host = event.currentTarget;
|
|
82
|
+
if (!event.relatedTarget || !host.contains(event.relatedTarget)) setDropLine(null);
|
|
83
|
+
}
|
|
84
|
+
}], true);
|
|
85
|
+
insert(_el$4, createComponent(For, {
|
|
86
|
+
get each() {
|
|
87
|
+
return rows();
|
|
88
|
+
},
|
|
89
|
+
children: (option, index) => {
|
|
90
|
+
const seam = () => dropLine() && dropLine().index === index() ? dropLine().before ? "top" : "bottom" : void 0;
|
|
91
|
+
var _el$5 = _tmpl$4();
|
|
92
|
+
var _el$7 = _el$5.firstChild.nextSibling;
|
|
93
|
+
var _el$9 = _el$7.nextSibling.firstChild;
|
|
94
|
+
var _el$10 = _el$9.nextSibling;
|
|
95
|
+
var _el$11 = _el$10.nextSibling;
|
|
96
|
+
var _el$12 = _el$11.nextSibling;
|
|
97
|
+
_el$5.addEventListener("drop", (event) => {
|
|
98
|
+
event.preventDefault();
|
|
99
|
+
drop();
|
|
100
|
+
});
|
|
101
|
+
_el$5.addEventListener("dragover", (event) => {
|
|
102
|
+
event.preventDefault();
|
|
103
|
+
if (event.dataTransfer) event.dataTransfer.dropEffect = "move";
|
|
104
|
+
const rect = event.currentTarget.getBoundingClientRect();
|
|
105
|
+
const before = event.clientY < rect.top + rect.height / 2;
|
|
106
|
+
setDropLine(dragging() != null && !(option.value === dragging() && before) ? {
|
|
107
|
+
index: index(),
|
|
108
|
+
before
|
|
109
|
+
} : null);
|
|
110
|
+
});
|
|
111
|
+
_el$5.addEventListener("dragend", reset);
|
|
112
|
+
_el$5.addEventListener("dragstart", (event) => {
|
|
113
|
+
setDragging(option.value);
|
|
114
|
+
event.dataTransfer?.setData("text/plain", option.value);
|
|
115
|
+
if (event.dataTransfer) event.dataTransfer.effectAllowed = "move";
|
|
116
|
+
});
|
|
117
|
+
insert(_el$7, () => {
|
|
118
|
+
return option.label;
|
|
119
|
+
});
|
|
120
|
+
_el$9._$$click = () => move(option.value, -index());
|
|
121
|
+
insert(_el$9, () => {
|
|
122
|
+
return arrowGlyph(ARROWS.top);
|
|
123
|
+
});
|
|
124
|
+
_el$10._$$click = () => move(option.value, -1);
|
|
125
|
+
insert(_el$10, () => {
|
|
126
|
+
return arrowGlyph(ARROWS.up);
|
|
127
|
+
});
|
|
128
|
+
_el$11._$$click = () => move(option.value, 1);
|
|
129
|
+
insert(_el$11, () => {
|
|
130
|
+
return arrowGlyph(ARROWS.down);
|
|
131
|
+
});
|
|
132
|
+
_el$12._$$click = () => move(option.value, rows().length - 1 - index());
|
|
133
|
+
insert(_el$12, () => {
|
|
134
|
+
return arrowGlyph(ARROWS.bottom);
|
|
135
|
+
});
|
|
136
|
+
effect(() => {
|
|
137
|
+
return {
|
|
138
|
+
e: dragging() === option.value ? "" : void 0,
|
|
139
|
+
t: seam(),
|
|
140
|
+
a: index() === 0,
|
|
141
|
+
o: index() === 0,
|
|
142
|
+
i: index() === rows().length - 1,
|
|
143
|
+
n: index() === rows().length - 1
|
|
144
|
+
};
|
|
145
|
+
}, ({ e, t, a, o, i, n }, _p$) => {
|
|
146
|
+
e !== _p$?.e && setAttribute(_el$5, "data-dragging", e);
|
|
147
|
+
t !== _p$?.t && setAttribute(_el$5, "data-drop-line", t);
|
|
148
|
+
a !== _p$?.a && setAttribute(_el$9, "disabled", a);
|
|
149
|
+
o !== _p$?.o && setAttribute(_el$10, "disabled", o);
|
|
150
|
+
i !== _p$?.i && setAttribute(_el$11, "disabled", i);
|
|
151
|
+
n !== _p$?.n && setAttribute(_el$12, "disabled", n);
|
|
152
|
+
});
|
|
153
|
+
return _el$5;
|
|
154
|
+
}
|
|
155
|
+
}));
|
|
156
|
+
return _el$3;
|
|
157
|
+
}
|
|
158
|
+
delegateEvents(["click"]);
|
|
159
|
+
//#endregion
|
|
160
|
+
export { OrderList };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { JSX } from "solid-js";
|
|
2
|
+
//#region src/components/page-header/index.d.ts
|
|
3
|
+
export declare const PageHeader: ((props: JSX.HTMLAttributes<HTMLElement>) => JSX.Element) & {
|
|
4
|
+
Root: (props: JSX.HTMLAttributes<HTMLElement>) => JSX.Element;
|
|
5
|
+
Heading: (props: JSX.HTMLAttributes<HTMLElement>) => JSX.Element;
|
|
6
|
+
Eyebrow: (props: JSX.HTMLAttributes<HTMLElement>) => JSX.Element;
|
|
7
|
+
Title: (props: JSX.HTMLAttributes<HTMLElement>) => JSX.Element;
|
|
8
|
+
Description: (props: JSX.HTMLAttributes<HTMLElement>) => JSX.Element;
|
|
9
|
+
Actions: (props: JSX.HTMLAttributes<HTMLElement>) => JSX.Element;
|
|
10
|
+
};
|
|
11
|
+
//#endregion
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
+
import { createComponent, mergeProps } from "@solidjs/web";
|
|
3
|
+
//#region src/components/page-header/index.tsx
|
|
4
|
+
/** The page's face: an eyebrow whisper, a serif title, one line of
|
|
5
|
+
* description, and the actions resting beside the title on the same
|
|
6
|
+
* baseline. Heading groups title and actions; the rest compose below. */
|
|
7
|
+
function part(name, tag, extra = {}) {
|
|
8
|
+
function Component(props) {
|
|
9
|
+
return createComponent(tag, mergeProps(extra, props, {
|
|
10
|
+
"data-scope": "page-header",
|
|
11
|
+
get "data-part"() {
|
|
12
|
+
return name.toLowerCase();
|
|
13
|
+
}
|
|
14
|
+
}));
|
|
15
|
+
}
|
|
16
|
+
return Component;
|
|
17
|
+
}
|
|
18
|
+
const Root = part("Root", "header");
|
|
19
|
+
const Heading = part("Heading", "div");
|
|
20
|
+
const Eyebrow = part("Eyebrow", "p");
|
|
21
|
+
const Title = part("Title", "h1");
|
|
22
|
+
const Description = part("Description", "p");
|
|
23
|
+
const Actions = part("Actions", "div");
|
|
24
|
+
const PageHeader = Object.assign(Root, {
|
|
25
|
+
Root,
|
|
26
|
+
Heading,
|
|
27
|
+
Eyebrow,
|
|
28
|
+
Title,
|
|
29
|
+
Description,
|
|
30
|
+
Actions
|
|
31
|
+
});
|
|
32
|
+
injectComponentStyle("page-header");
|
|
33
|
+
//#endregion
|
|
34
|
+
export { PageHeader };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Pagination as Pagination$1, PaginationRootProps } from "@ark-ui/solid/pagination";
|
|
2
|
+
//#region src/components/pagination/index.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* Pagination — paged navigation.
|
|
5
|
+
*
|
|
6
|
+
* Parts: Root, Item (page seals), Ellipsis, PrevTrigger, NextTrigger,
|
|
7
|
+
* FirstTrigger, LastTrigger. Items carry data-selected.
|
|
8
|
+
*/
|
|
9
|
+
type PaginationOwnProps = {
|
|
10
|
+
/** One rung of the control-height ladder every page seal shares. */
|
|
11
|
+
size?: "sm" | "md" | "lg";
|
|
12
|
+
};
|
|
13
|
+
declare function PaginationRoot(props: PaginationRootProps & PaginationOwnProps): import("solid-js").JSX.Element;
|
|
14
|
+
export declare const Pagination: Omit<typeof Pagination$1, "Root"> & {
|
|
15
|
+
Root: typeof PaginationRoot;
|
|
16
|
+
};
|
|
17
|
+
//#endregion
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
+
import { createComponent, mergeProps } from "@solidjs/web";
|
|
3
|
+
import { splitProps } from "solid-js";
|
|
4
|
+
import { Pagination as Pagination$1 } from "@ark-ui/solid/pagination";
|
|
5
|
+
//#region src/components/pagination/index.tsx
|
|
6
|
+
function PaginationRoot(props) {
|
|
7
|
+
const [own, rest] = splitProps(props, ["size"]);
|
|
8
|
+
return createComponent(Pagination$1.Root, mergeProps(rest, { get "data-size"() {
|
|
9
|
+
return own.size ?? "md";
|
|
10
|
+
} }));
|
|
11
|
+
}
|
|
12
|
+
const Pagination = {
|
|
13
|
+
...Pagination$1,
|
|
14
|
+
Root: PaginationRoot
|
|
15
|
+
};
|
|
16
|
+
injectComponentStyle("pagination");
|
|
17
|
+
//#endregion
|
|
18
|
+
export { Pagination };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { PasswordInput as PasswordInput$1, PasswordInputRootProps } from "@ark-ui/solid/password-input";
|
|
2
|
+
//#region src/components/password-input/index.d.ts
|
|
3
|
+
/** Ark's PasswordInput, dressed in the paper-and-ink system: the reveal
|
|
4
|
+
* eye sits quiet at the field's edge and swaps in place — no shift, no
|
|
5
|
+
* noise. The API is Ark's own — Root, Label, Control, Input, Indicator,
|
|
6
|
+
* VisibilityTrigger. */
|
|
7
|
+
type PasswordInputOwnProps = {
|
|
8
|
+
/** One rung of the control-height ladder for the field and its eye. */
|
|
9
|
+
size?: "sm" | "md" | "lg";
|
|
10
|
+
};
|
|
11
|
+
declare function PasswordInputRoot(props: PasswordInputRootProps & PasswordInputOwnProps): import("solid-js").JSX.Element;
|
|
12
|
+
export declare const PasswordInput: Omit<typeof PasswordInput$1, "Root"> & {
|
|
13
|
+
Root: typeof PasswordInputRoot;
|
|
14
|
+
};
|
|
15
|
+
//#endregion
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
+
import { createComponent, mergeProps } from "@solidjs/web";
|
|
3
|
+
import { splitProps } from "solid-js";
|
|
4
|
+
import { PasswordInput as PasswordInput$1 } from "@ark-ui/solid/password-input";
|
|
5
|
+
//#region src/components/password-input/index.tsx
|
|
6
|
+
function PasswordInputRoot(props) {
|
|
7
|
+
const [own, rest] = splitProps(props, ["size"]);
|
|
8
|
+
return createComponent(PasswordInput$1.Root, mergeProps(rest, { get "data-size"() {
|
|
9
|
+
return own.size ?? "md";
|
|
10
|
+
} }));
|
|
11
|
+
}
|
|
12
|
+
const PasswordInput = {
|
|
13
|
+
...PasswordInput$1,
|
|
14
|
+
Root: PasswordInputRoot
|
|
15
|
+
};
|
|
16
|
+
injectComponentStyle("password-input");
|
|
17
|
+
//#endregion
|
|
18
|
+
export { PasswordInput };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { PinInput as PinInput$1, PinInputRootProps } from "@ark-ui/solid/pin-input";
|
|
2
|
+
//#region src/components/pin-input/index.d.ts
|
|
3
|
+
/** Ark's PinInput, dressed in the paper-and-ink system: one character per
|
|
4
|
+
* square-cut seal, centered ink in tabular figures. The API is Ark's own —
|
|
5
|
+
* Root, Label, Control, Input, HiddenInput. */
|
|
6
|
+
type PinInputOwnProps = {
|
|
7
|
+
/** One rung of the control-height ladder each seal stands on. */
|
|
8
|
+
size?: "sm" | "md" | "lg";
|
|
9
|
+
};
|
|
10
|
+
declare function PinInputRoot(props: PinInputRootProps & PinInputOwnProps): import("solid-js").JSX.Element;
|
|
11
|
+
export declare const PinInput: Omit<typeof PinInput$1, "Root"> & {
|
|
12
|
+
Root: typeof PinInputRoot;
|
|
13
|
+
};
|
|
14
|
+
//#endregion
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
+
import { createComponent, mergeProps } from "@solidjs/web";
|
|
3
|
+
import { splitProps } from "solid-js";
|
|
4
|
+
import { PinInput as PinInput$1 } from "@ark-ui/solid/pin-input";
|
|
5
|
+
//#region src/components/pin-input/index.tsx
|
|
6
|
+
function PinInputRoot(props) {
|
|
7
|
+
const [own, rest] = splitProps(props, ["size"]);
|
|
8
|
+
return createComponent(PinInput$1.Root, mergeProps(rest, { get "data-size"() {
|
|
9
|
+
return own.size ?? "md";
|
|
10
|
+
} }));
|
|
11
|
+
}
|
|
12
|
+
const PinInput = {
|
|
13
|
+
...PinInput$1,
|
|
14
|
+
Root: PinInputRoot
|
|
15
|
+
};
|
|
16
|
+
injectComponentStyle("pin-input");
|
|
17
|
+
//#endregion
|
|
18
|
+
export { PinInput };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { JSX } from "solid-js";
|
|
2
|
+
//#region src/components/popconfirm/index.d.ts
|
|
3
|
+
export interface PopconfirmProps extends JSX.HTMLAttributes<HTMLButtonElement> {
|
|
4
|
+
/** The question the reader is answering. */
|
|
5
|
+
message: string;
|
|
6
|
+
confirmText?: string;
|
|
7
|
+
cancelText?: string;
|
|
8
|
+
onConfirm?: () => void;
|
|
9
|
+
onCancel?: () => void;
|
|
10
|
+
}
|
|
11
|
+
/** A question at the point of no return: the trigger opens a small
|
|
12
|
+
* anchored vessel carrying the message and two answers. Confirmation
|
|
13
|
+
* and cancellation are the caller's to act on — the panel closes
|
|
14
|
+
* either way. The children are the trigger's content, riding the
|
|
15
|
+
* machine-driven trigger button. */
|
|
16
|
+
export declare function Popconfirm(props: PopconfirmProps): JSX.Element;
|
|
17
|
+
//#endregion
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { Button } from "../button/index.mjs";
|
|
2
|
+
import { injectComponentStyle } from "@bysages/core";
|
|
3
|
+
import { createComponent, insert, spread, template } from "@solidjs/web";
|
|
4
|
+
import { createSignal, splitProps } from "solid-js";
|
|
5
|
+
import { Portal } from "solid-js/web";
|
|
6
|
+
import { Popover } from "@ark-ui/solid/popover";
|
|
7
|
+
//#region src/components/popconfirm/index.tsx
|
|
8
|
+
var _tmpl$ = /* @__PURE__ */ template(`<p data-part=message>`);
|
|
9
|
+
var _tmpl$2 = /* @__PURE__ */ template(`<div data-part=actions><!><!>`);
|
|
10
|
+
var _tmpl$3 = /* @__PURE__ */ template(`<button>`);
|
|
11
|
+
/** A question at the point of no return: the trigger opens a small
|
|
12
|
+
* anchored vessel carrying the message and two answers. Confirmation
|
|
13
|
+
* and cancellation are the caller's to act on — the panel closes
|
|
14
|
+
* either way. The children are the trigger's content, riding the
|
|
15
|
+
* machine-driven trigger button. */
|
|
16
|
+
function Popconfirm(props) {
|
|
17
|
+
injectComponentStyle("popconfirm");
|
|
18
|
+
const [own, rest] = splitProps(props, [
|
|
19
|
+
"message",
|
|
20
|
+
"confirmText",
|
|
21
|
+
"cancelText",
|
|
22
|
+
"onConfirm",
|
|
23
|
+
"onCancel",
|
|
24
|
+
"children"
|
|
25
|
+
]);
|
|
26
|
+
const [open, setOpen] = createSignal(false);
|
|
27
|
+
function settle(confirmed) {
|
|
28
|
+
setOpen(false);
|
|
29
|
+
(confirmed ? own.onConfirm : own.onCancel)?.();
|
|
30
|
+
}
|
|
31
|
+
return createComponent(Popover.Root, {
|
|
32
|
+
get open() {
|
|
33
|
+
return open();
|
|
34
|
+
},
|
|
35
|
+
onOpenChange: (details) => setOpen(details.open),
|
|
36
|
+
positioning: { placement: "top" },
|
|
37
|
+
get children() {
|
|
38
|
+
return [createComponent(Popover.Trigger, { asChild: (propsFn) => (() => {
|
|
39
|
+
var _el$5 = _tmpl$3();
|
|
40
|
+
spread(_el$5, [propsFn, rest], true);
|
|
41
|
+
insert(_el$5, () => {
|
|
42
|
+
return own.children;
|
|
43
|
+
});
|
|
44
|
+
return _el$5;
|
|
45
|
+
})() }), createComponent(Portal, { get children() {
|
|
46
|
+
return createComponent(Popover.Positioner, { get children() {
|
|
47
|
+
return createComponent(Popover.Content, {
|
|
48
|
+
class: "bs-popconfirm",
|
|
49
|
+
get children() {
|
|
50
|
+
return [(() => {
|
|
51
|
+
var _el$ = _tmpl$();
|
|
52
|
+
insert(_el$, () => {
|
|
53
|
+
return own.message;
|
|
54
|
+
});
|
|
55
|
+
return _el$;
|
|
56
|
+
})(), (() => {
|
|
57
|
+
var _el$2 = _tmpl$2();
|
|
58
|
+
var _el$3 = _el$2.firstChild;
|
|
59
|
+
var _el$4 = _el$3.nextSibling;
|
|
60
|
+
insert(_el$2, createComponent(Button, {
|
|
61
|
+
variant: "ghost",
|
|
62
|
+
size: "sm",
|
|
63
|
+
onClick: () => settle(false),
|
|
64
|
+
get children() {
|
|
65
|
+
return own.cancelText ?? "Cancel";
|
|
66
|
+
}
|
|
67
|
+
}), _el$3);
|
|
68
|
+
insert(_el$2, createComponent(Button, {
|
|
69
|
+
size: "sm",
|
|
70
|
+
onClick: () => settle(true),
|
|
71
|
+
get children() {
|
|
72
|
+
return own.confirmText ?? "Confirm";
|
|
73
|
+
}
|
|
74
|
+
}), _el$4);
|
|
75
|
+
return _el$2;
|
|
76
|
+
})()];
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
} });
|
|
80
|
+
} })];
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
//#endregion
|
|
85
|
+
export { Popconfirm };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Popover as Popover$1 } from "@ark-ui/solid/popover";
|
|
2
|
+
//#region src/components/popover/index.d.ts
|
|
3
|
+
/** Ark's Popover, dressed in the paper-and-ink system: a paper vessel that
|
|
4
|
+
* dissolves in on elevation, anchored to its trigger by a whisker arrow. The
|
|
5
|
+
* API is Ark's own — Root, Trigger, Anchor, Indicator, Positioner, Content,
|
|
6
|
+
* Title, Description, CloseTrigger, Arrow, ArrowTip. */
|
|
7
|
+
export declare const Popover: typeof Popover$1;
|
|
8
|
+
//#endregion
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
+
import { Popover as Popover$1 } from "@ark-ui/solid/popover";
|
|
3
|
+
//#region src/components/popover/index.ts
|
|
4
|
+
/** Ark's Popover, dressed in the paper-and-ink system: a paper vessel that
|
|
5
|
+
* dissolves in on elevation, anchored to its trigger by a whisker arrow. The
|
|
6
|
+
* API is Ark's own — Root, Trigger, Anchor, Indicator, Positioner, Content,
|
|
7
|
+
* Title, Description, CloseTrigger, Arrow, ArrowTip. */
|
|
8
|
+
const Popover = Popover$1;
|
|
9
|
+
injectComponentStyle("popover");
|
|
10
|
+
//#endregion
|
|
11
|
+
export { Popover };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { Presence, PresenceProps, PresenceProvider, UsePresenceContext, UsePresenceProps, UsePresenceReturn, usePresence, usePresenceContext } from "@ark-ui/solid/presence";
|
|
2
|
+
export { Presence, type PresenceProps, PresenceProvider, type UsePresenceContext, type UsePresenceProps, type UsePresenceReturn, usePresence, usePresenceContext };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Progress as Progress$1, ProgressRootProps } from "@ark-ui/solid/progress";
|
|
2
|
+
//#region src/components/progress/index.d.ts
|
|
3
|
+
/** Ark's Progress, dressed in the paper-and-ink system: a quiet hairline
|
|
4
|
+
* groove that the primary ink fills at the machine's pace. The API is
|
|
5
|
+
* Ark's own — Root, Label, ValueText, Track, Range, View, Circle,
|
|
6
|
+
* CircleTrack, CircleRange. */
|
|
7
|
+
type ProgressOwnProps = {
|
|
8
|
+
/** One rung of the groove ladder — the track's thickness. */
|
|
9
|
+
size?: "sm" | "md" | "lg";
|
|
10
|
+
};
|
|
11
|
+
declare function ProgressRoot(props: ProgressRootProps & ProgressOwnProps): import("solid-js").JSX.Element;
|
|
12
|
+
export declare const Progress: Omit<typeof Progress$1, "Root"> & {
|
|
13
|
+
Root: typeof ProgressRoot;
|
|
14
|
+
};
|
|
15
|
+
//#endregion
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
+
import { createComponent, mergeProps } from "@solidjs/web";
|
|
3
|
+
import { splitProps } from "solid-js";
|
|
4
|
+
import { Progress as Progress$1 } from "@ark-ui/solid/progress";
|
|
5
|
+
//#region src/components/progress/index.tsx
|
|
6
|
+
function ProgressRoot(props) {
|
|
7
|
+
const [own, rest] = splitProps(props, ["size"]);
|
|
8
|
+
return createComponent(Progress$1.Root, mergeProps(rest, { get "data-size"() {
|
|
9
|
+
return own.size ?? "md";
|
|
10
|
+
} }));
|
|
11
|
+
}
|
|
12
|
+
const Progress = {
|
|
13
|
+
...Progress$1,
|
|
14
|
+
Root: ProgressRoot
|
|
15
|
+
};
|
|
16
|
+
injectComponentStyle("progress");
|
|
17
|
+
//#endregion
|
|
18
|
+
export { Progress };
|