@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,124 @@
|
|
|
1
|
+
import { Button } from "../button/index.mjs";
|
|
2
|
+
import { injectComponentStyle } from "@bysages/core";
|
|
3
|
+
import { createComponent, insert, spread, template } from "@solidjs/web";
|
|
4
|
+
import { For, splitProps } from "solid-js";
|
|
5
|
+
import { Portal } from "solid-js/web";
|
|
6
|
+
import { Menu } from "@ark-ui/solid/menu";
|
|
7
|
+
//#region src/components/split-button/index.tsx
|
|
8
|
+
var _tmpl$ = /* @__PURE__ */ template(`<div><!><!>`);
|
|
9
|
+
var _tmpl$2 = /* @__PURE__ */ template(`<button>`);
|
|
10
|
+
var _tmpl$3 = /* @__PURE__ */ template(`<svg width=16 height=16 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=1.75 stroke-linecap=round stroke-linejoin=round aria-hidden=true><path d="m6 9 6 6 6-6">`);
|
|
11
|
+
/**
|
|
12
|
+
* A primary action with its alternatives one seam away: the main button
|
|
13
|
+
* fires `onClick`, the fitted arrow opens a paper vessel of the same
|
|
14
|
+
* register whose entries call `onSelect` with their value. The arrow is
|
|
15
|
+
* the menu machine's trigger with the button recipe riding over it —
|
|
16
|
+
* the machine keeps the element (positioning, focus, `data-state`), the
|
|
17
|
+
* button stylesheet's trigger register dresses it. The popup keeps the
|
|
18
|
+
* menu parts untouched.
|
|
19
|
+
*/
|
|
20
|
+
function SplitButton(props) {
|
|
21
|
+
injectComponentStyle("split-button");
|
|
22
|
+
injectComponentStyle("menu");
|
|
23
|
+
const [own, rest] = splitProps(props, [
|
|
24
|
+
"label",
|
|
25
|
+
"items",
|
|
26
|
+
"variant",
|
|
27
|
+
"tone",
|
|
28
|
+
"size",
|
|
29
|
+
"disabled",
|
|
30
|
+
"onClick",
|
|
31
|
+
"onSelect",
|
|
32
|
+
"children"
|
|
33
|
+
]);
|
|
34
|
+
const variant = () => own.variant ?? "solid";
|
|
35
|
+
const tone = () => own.tone ?? "ink";
|
|
36
|
+
const size = () => own.size ?? "md";
|
|
37
|
+
var _el$ = _tmpl$();
|
|
38
|
+
var _el$2 = _el$.firstChild;
|
|
39
|
+
var _el$3 = _el$2.nextSibling;
|
|
40
|
+
spread(_el$, [rest, {
|
|
41
|
+
"data-scope": "split-button",
|
|
42
|
+
"data-part": "root"
|
|
43
|
+
}], true);
|
|
44
|
+
insert(_el$, createComponent(Button, {
|
|
45
|
+
get variant() {
|
|
46
|
+
return variant();
|
|
47
|
+
},
|
|
48
|
+
get tone() {
|
|
49
|
+
return tone();
|
|
50
|
+
},
|
|
51
|
+
get size() {
|
|
52
|
+
return size();
|
|
53
|
+
},
|
|
54
|
+
get disabled() {
|
|
55
|
+
return own.disabled;
|
|
56
|
+
},
|
|
57
|
+
onClick: (event) => own.onClick?.(event),
|
|
58
|
+
get children() {
|
|
59
|
+
return own.label;
|
|
60
|
+
}
|
|
61
|
+
}), _el$2);
|
|
62
|
+
insert(_el$, createComponent(Menu.Root, {
|
|
63
|
+
positioning: { placement: "bottom-end" },
|
|
64
|
+
get children() {
|
|
65
|
+
return [createComponent(Menu.Trigger, { asChild: (propsFn) => (() => {
|
|
66
|
+
var _el$4 = _tmpl$2();
|
|
67
|
+
spread(_el$4, [propsFn, {
|
|
68
|
+
type: "button",
|
|
69
|
+
get disabled() {
|
|
70
|
+
return own.disabled;
|
|
71
|
+
},
|
|
72
|
+
"aria-label": "More actions",
|
|
73
|
+
get "data-variant"() {
|
|
74
|
+
return variant();
|
|
75
|
+
},
|
|
76
|
+
get "data-tone"() {
|
|
77
|
+
return tone();
|
|
78
|
+
},
|
|
79
|
+
get "data-size"() {
|
|
80
|
+
return size();
|
|
81
|
+
},
|
|
82
|
+
"data-square": "true",
|
|
83
|
+
"data-motion": "ink-ripple lit"
|
|
84
|
+
}], true);
|
|
85
|
+
insert(_el$4, chevronDown);
|
|
86
|
+
return _el$4;
|
|
87
|
+
})() }), createComponent(Portal, { get children() {
|
|
88
|
+
return createComponent(Menu.Positioner, { get children() {
|
|
89
|
+
return createComponent(Menu.Content, { get children() {
|
|
90
|
+
return createComponent(For, {
|
|
91
|
+
get each() {
|
|
92
|
+
return own.items ?? [];
|
|
93
|
+
},
|
|
94
|
+
children: (entry) => createComponent(Menu.Item, {
|
|
95
|
+
get value() {
|
|
96
|
+
return entry.value;
|
|
97
|
+
},
|
|
98
|
+
get disabled() {
|
|
99
|
+
return entry.disabled;
|
|
100
|
+
},
|
|
101
|
+
get "data-danger"() {
|
|
102
|
+
return entry.danger ? "" : void 0;
|
|
103
|
+
},
|
|
104
|
+
onSelect: () => own.onSelect?.(entry.value),
|
|
105
|
+
get children() {
|
|
106
|
+
return createComponent(Menu.ItemText, { get children() {
|
|
107
|
+
return entry.label;
|
|
108
|
+
} });
|
|
109
|
+
}
|
|
110
|
+
})
|
|
111
|
+
});
|
|
112
|
+
} });
|
|
113
|
+
} });
|
|
114
|
+
} })];
|
|
115
|
+
}
|
|
116
|
+
}), _el$3);
|
|
117
|
+
return _el$;
|
|
118
|
+
}
|
|
119
|
+
/** One stroke pointing down: all a fitted dropdown arrow needs. */
|
|
120
|
+
function chevronDown() {
|
|
121
|
+
return _tmpl$3();
|
|
122
|
+
}
|
|
123
|
+
//#endregion
|
|
124
|
+
export { SplitButton };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Splitter as Splitter$1 } from "@ark-ui/solid/splitter";
|
|
2
|
+
//#region src/components/splitter/index.d.ts
|
|
3
|
+
/** Ark's Splitter, dressed in the paper-and-ink system: panels divide on
|
|
4
|
+
* a hairline and a small paper-seal thumb answers the hand. The API is
|
|
5
|
+
* Ark's own — Root, Panel, ResizeTrigger, ResizeTriggerIndicator. */
|
|
6
|
+
export declare const Splitter: typeof Splitter$1;
|
|
7
|
+
//#endregion
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
+
import { Splitter as Splitter$1 } from "@ark-ui/solid/splitter";
|
|
3
|
+
//#region src/components/splitter/index.ts
|
|
4
|
+
/** Ark's Splitter, dressed in the paper-and-ink system: panels divide on
|
|
5
|
+
* a hairline and a small paper-seal thumb answers the hand. The API is
|
|
6
|
+
* Ark's own — Root, Panel, ResizeTrigger, ResizeTriggerIndicator. */
|
|
7
|
+
const Splitter = Splitter$1;
|
|
8
|
+
injectComponentStyle("splitter");
|
|
9
|
+
//#endregion
|
|
10
|
+
export { Splitter };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { JSX } from "solid-js";
|
|
2
|
+
//#region src/components/spotlight/index.d.ts
|
|
3
|
+
export interface SpotlightProps extends JSX.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
/** How far the lamp throws before the ink swallows it. */
|
|
5
|
+
radius?: string;
|
|
6
|
+
}
|
|
7
|
+
/** The ink-light card: a vessel whose rim and face take light from the
|
|
8
|
+
* reader's hand. The wrapper only measures and writes the geometry —
|
|
9
|
+
* the lamp itself is the two layers the stylesheet paints. */
|
|
10
|
+
export declare function Spotlight(props: SpotlightProps): JSX.Element;
|
|
11
|
+
//#endregion
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
+
import { insert, spread, template } from "@solidjs/web";
|
|
3
|
+
import { splitProps } from "solid-js";
|
|
4
|
+
//#region src/components/spotlight/index.tsx
|
|
5
|
+
var _tmpl$ = /* @__PURE__ */ template(`<div>`);
|
|
6
|
+
/** The ink-light card: a vessel whose rim and face take light from the
|
|
7
|
+
* reader's hand. The wrapper only measures and writes the geometry —
|
|
8
|
+
* the lamp itself is the two layers the stylesheet paints. */
|
|
9
|
+
function Spotlight(props) {
|
|
10
|
+
injectComponentStyle("spotlight");
|
|
11
|
+
const [own, rest] = splitProps(props, ["radius"]);
|
|
12
|
+
const track = (event) => {
|
|
13
|
+
const host = event.currentTarget;
|
|
14
|
+
const rect = host.getBoundingClientRect();
|
|
15
|
+
host.style.setProperty("--bs-spot-x", `${event.clientX - rect.left}px`);
|
|
16
|
+
host.style.setProperty("--bs-spot-y", `${event.clientY - rect.top}px`);
|
|
17
|
+
};
|
|
18
|
+
var _el$ = _tmpl$();
|
|
19
|
+
spread(_el$, [rest, {
|
|
20
|
+
"data-scope": "spotlight",
|
|
21
|
+
"data-part": "root",
|
|
22
|
+
get style() {
|
|
23
|
+
return { "--bs-spot-radius": own.radius };
|
|
24
|
+
},
|
|
25
|
+
onPointerMove: track,
|
|
26
|
+
onPointerEnter: (event) => {
|
|
27
|
+
track(event);
|
|
28
|
+
event.currentTarget.setAttribute("data-hovered", "");
|
|
29
|
+
},
|
|
30
|
+
onPointerLeave: (event) => event.currentTarget.removeAttribute("data-hovered")
|
|
31
|
+
}], true);
|
|
32
|
+
insert(_el$, () => {
|
|
33
|
+
return props.children;
|
|
34
|
+
});
|
|
35
|
+
return _el$;
|
|
36
|
+
}
|
|
37
|
+
//#endregion
|
|
38
|
+
export { Spotlight };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { JSX } from "solid-js";
|
|
2
|
+
//#region src/components/stack/index.d.ts
|
|
3
|
+
export interface StackProps extends JSX.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
direction?: "column" | "row";
|
|
5
|
+
gap?: "none" | "xs" | "sm" | "md" | "lg" | "xl";
|
|
6
|
+
wrap?: boolean;
|
|
7
|
+
align?: string;
|
|
8
|
+
justify?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function Stack(props: StackProps): JSX.Element;
|
|
11
|
+
//#endregion
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
+
import { spread, template } from "@solidjs/web";
|
|
3
|
+
import { splitProps } from "solid-js";
|
|
4
|
+
//#region src/components/stack/index.tsx
|
|
5
|
+
var _tmpl$ = /* @__PURE__ */ template(`<div>`);
|
|
6
|
+
/** Whitespace chosen by name: the named steps point at the space ramp so
|
|
7
|
+
* siblings are held apart by one token, never by ad-hoc margins. */
|
|
8
|
+
const gapVars = {
|
|
9
|
+
none: "0",
|
|
10
|
+
xs: "var(--bs-gap-xs)",
|
|
11
|
+
sm: "var(--bs-gap-sm)",
|
|
12
|
+
md: "var(--bs-gap-md)",
|
|
13
|
+
lg: "var(--bs-gap-lg)",
|
|
14
|
+
xl: "var(--bs-gap-xl)"
|
|
15
|
+
};
|
|
16
|
+
function Stack(props) {
|
|
17
|
+
injectComponentStyle("stack");
|
|
18
|
+
const [own, rest] = splitProps(props, [
|
|
19
|
+
"direction",
|
|
20
|
+
"gap",
|
|
21
|
+
"wrap",
|
|
22
|
+
"align",
|
|
23
|
+
"justify"
|
|
24
|
+
]);
|
|
25
|
+
var _el$ = _tmpl$();
|
|
26
|
+
spread(_el$, [rest, {
|
|
27
|
+
get style() {
|
|
28
|
+
return {
|
|
29
|
+
...rest.style,
|
|
30
|
+
"--bs-stack-gap": gapVars[own.gap ?? "md"] ?? gapVars.md,
|
|
31
|
+
"align-items": own.align,
|
|
32
|
+
"justify-content": own.justify,
|
|
33
|
+
"flex-wrap": own.wrap ? "wrap" : void 0
|
|
34
|
+
};
|
|
35
|
+
},
|
|
36
|
+
"data-scope": "stack",
|
|
37
|
+
"data-part": "root",
|
|
38
|
+
get "data-direction"() {
|
|
39
|
+
return own.direction ?? "column";
|
|
40
|
+
}
|
|
41
|
+
}], false);
|
|
42
|
+
return _el$;
|
|
43
|
+
}
|
|
44
|
+
//#endregion
|
|
45
|
+
export { Stack };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { JSX } from "solid-js";
|
|
2
|
+
//#region src/components/stat/index.d.ts
|
|
3
|
+
export interface StatDeltaProps extends JSX.HTMLAttributes<HTMLElement> {
|
|
4
|
+
direction?: "up" | "down" | "flat";
|
|
5
|
+
"data-direction"?: string;
|
|
6
|
+
}
|
|
7
|
+
/** The delta reads the direction in the fixed semantic pigments; an
|
|
8
|
+
* explicit `data-direction` attribute on the consumer side still wins. */
|
|
9
|
+
declare function Delta(props: StatDeltaProps): JSX.Element;
|
|
10
|
+
export declare const Stat: ((props: JSX.HTMLAttributes<HTMLDivElement>) => JSX.Element) & {
|
|
11
|
+
Root: (props: JSX.HTMLAttributes<HTMLDivElement>) => JSX.Element;
|
|
12
|
+
Label: (props: JSX.HTMLAttributes<HTMLDivElement>) => JSX.Element;
|
|
13
|
+
Value: (props: JSX.HTMLAttributes<HTMLDivElement>) => JSX.Element;
|
|
14
|
+
Delta: typeof Delta;
|
|
15
|
+
Description: (props: JSX.HTMLAttributes<HTMLDivElement>) => JSX.Element;
|
|
16
|
+
};
|
|
17
|
+
//#endregion
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
+
import { createComponent, mergeProps, spread, template } from "@solidjs/web";
|
|
3
|
+
import { splitProps } from "solid-js";
|
|
4
|
+
//#region src/components/stat/index.tsx
|
|
5
|
+
var _tmpl$ = /* @__PURE__ */ template(`<span>`);
|
|
6
|
+
function part(name, tag) {
|
|
7
|
+
function Component(props) {
|
|
8
|
+
return createComponent(tag, mergeProps(props, {
|
|
9
|
+
"data-scope": "stat",
|
|
10
|
+
get "data-part"() {
|
|
11
|
+
return name.toLowerCase();
|
|
12
|
+
}
|
|
13
|
+
}));
|
|
14
|
+
}
|
|
15
|
+
return Component;
|
|
16
|
+
}
|
|
17
|
+
const Root = part("Root", "div");
|
|
18
|
+
const Label = part("Label", "p");
|
|
19
|
+
const Value = part("Value", "div");
|
|
20
|
+
const Description = part("Description", "p");
|
|
21
|
+
/** The delta reads the direction in the fixed semantic pigments; an
|
|
22
|
+
* explicit `data-direction` attribute on the consumer side still wins. */
|
|
23
|
+
function Delta(props) {
|
|
24
|
+
const [own, rest] = splitProps(props, ["direction"]);
|
|
25
|
+
var _el$ = _tmpl$();
|
|
26
|
+
spread(_el$, [rest, {
|
|
27
|
+
"data-scope": "stat",
|
|
28
|
+
"data-part": "delta",
|
|
29
|
+
get "data-direction"() {
|
|
30
|
+
return rest["data-direction"] ?? own.direction ?? "flat";
|
|
31
|
+
}
|
|
32
|
+
}], false);
|
|
33
|
+
return _el$;
|
|
34
|
+
}
|
|
35
|
+
const Stat = Object.assign(Root, {
|
|
36
|
+
Root,
|
|
37
|
+
Label,
|
|
38
|
+
Value,
|
|
39
|
+
Delta,
|
|
40
|
+
Description
|
|
41
|
+
});
|
|
42
|
+
injectComponentStyle("stat");
|
|
43
|
+
//#endregion
|
|
44
|
+
export { Stat };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Steps as Steps$1, StepsRootProps } from "@ark-ui/solid/steps";
|
|
2
|
+
//#region src/components/steps/index.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* Steps — linear progress through a sequence.
|
|
5
|
+
*
|
|
6
|
+
* Parts: Root, List, Item, Trigger, Indicator, Separator, Content,
|
|
7
|
+
* PrevTrigger, NextTrigger, Progress. Indicator and Separator carry
|
|
8
|
+
* data-complete / data-current / data-incomplete.
|
|
9
|
+
*/
|
|
10
|
+
type StepsOwnProps = {
|
|
11
|
+
/** One rung of the control-height ladder every indicator stands on. */
|
|
12
|
+
size?: "sm" | "md" | "lg";
|
|
13
|
+
};
|
|
14
|
+
declare function StepsRoot(props: StepsRootProps & StepsOwnProps): import("solid-js").JSX.Element;
|
|
15
|
+
export declare const Steps: Omit<typeof Steps$1, "Root"> & {
|
|
16
|
+
Root: typeof StepsRoot;
|
|
17
|
+
};
|
|
18
|
+
//#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 { Steps as Steps$1 } from "@ark-ui/solid/steps";
|
|
5
|
+
//#region src/components/steps/index.tsx
|
|
6
|
+
function StepsRoot(props) {
|
|
7
|
+
const [own, rest] = splitProps(props, ["size"]);
|
|
8
|
+
return createComponent(Steps$1.Root, mergeProps(rest, { get "data-size"() {
|
|
9
|
+
return own.size ?? "md";
|
|
10
|
+
} }));
|
|
11
|
+
}
|
|
12
|
+
const Steps = {
|
|
13
|
+
...Steps$1,
|
|
14
|
+
Root: StepsRoot
|
|
15
|
+
};
|
|
16
|
+
injectComponentStyle("steps");
|
|
17
|
+
//#endregion
|
|
18
|
+
export { Steps };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Swap as Swap$1 } from "@ark-ui/solid/swap";
|
|
2
|
+
//#region src/components/swap/index.d.ts
|
|
3
|
+
/** Ark's Swap, dressed in the paper-and-ink system: two impressions
|
|
4
|
+
* occupying one seal, the arriving one growing into place on the spring
|
|
5
|
+
* while the departing one shrinks away. The API is Ark's own — Root,
|
|
6
|
+
* Indicator (type="on" | "off"), RootProvider. */
|
|
7
|
+
export declare const Swap: typeof Swap$1;
|
|
8
|
+
//#endregion
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
+
import { Swap as Swap$1 } from "@ark-ui/solid/swap";
|
|
3
|
+
//#region src/components/swap/index.ts
|
|
4
|
+
/** Ark's Swap, dressed in the paper-and-ink system: two impressions
|
|
5
|
+
* occupying one seal, the arriving one growing into place on the spring
|
|
6
|
+
* while the departing one shrinks away. The API is Ark's own — Root,
|
|
7
|
+
* Indicator (type="on" | "off"), RootProvider. */
|
|
8
|
+
const Swap = Swap$1;
|
|
9
|
+
injectComponentStyle("swap");
|
|
10
|
+
//#endregion
|
|
11
|
+
export { Swap };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Switch as Switch$1, SwitchRootProps } from "@ark-ui/solid/switch";
|
|
2
|
+
//#region src/components/switch/index.d.ts
|
|
3
|
+
/** Ark's Switch, dressed in the paper-and-ink system: a track that rests
|
|
4
|
+
* in the inset shade of the paper and fills flat with primary ink when on,
|
|
5
|
+
* the thumb sliding on the spring. The API is Ark's own — Root, Label,
|
|
6
|
+
* Control, Thumb, HiddenInput. */
|
|
7
|
+
type SwitchOwnProps = {
|
|
8
|
+
/** One rung for the thumb; the track travels with it. */
|
|
9
|
+
size?: "sm" | "md" | "lg";
|
|
10
|
+
};
|
|
11
|
+
declare function SwitchRoot(props: SwitchRootProps & SwitchOwnProps): import("solid-js").JSX.Element;
|
|
12
|
+
export declare const Switch: Omit<typeof Switch$1, "Root"> & {
|
|
13
|
+
Root: typeof SwitchRoot;
|
|
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 { Switch as Switch$1 } from "@ark-ui/solid/switch";
|
|
5
|
+
//#region src/components/switch/index.tsx
|
|
6
|
+
function SwitchRoot(props) {
|
|
7
|
+
const [own, rest] = splitProps(props, ["size"]);
|
|
8
|
+
return createComponent(Switch$1.Root, mergeProps(rest, { get "data-size"() {
|
|
9
|
+
return own.size ?? "md";
|
|
10
|
+
} }));
|
|
11
|
+
}
|
|
12
|
+
const Switch = {
|
|
13
|
+
...Switch$1,
|
|
14
|
+
Root: SwitchRoot
|
|
15
|
+
};
|
|
16
|
+
injectComponentStyle("switch");
|
|
17
|
+
//#endregion
|
|
18
|
+
export { Switch };
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { JSX } from "solid-js";
|
|
2
|
+
import { CellData, ColumnDef, FlexRender, RowData, SortingState, TableFeatures, createColumnHelper } from "@tanstack/solid-table";
|
|
3
|
+
//#region src/components/table/index.d.ts
|
|
4
|
+
/** Column metadata understood by this table: mark columns whose values
|
|
5
|
+
* read right-aligned in tabular figures. The type parameters mirror the
|
|
6
|
+
* library's own declaration — augmentation merging demands an identical
|
|
7
|
+
* parameter list. */
|
|
8
|
+
declare module "@tanstack/solid-table" {
|
|
9
|
+
interface ColumnMeta<in out TFeatures extends TableFeatures, in out TData extends RowData, TValue extends CellData = CellData> {
|
|
10
|
+
numeric?: boolean;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
/** One-stop data table on TanStack Table v9, dressed in the paper-and-ink
|
|
14
|
+
* system: rows are CSS grids under ARIA table semantics, so sticky headers,
|
|
15
|
+
* pinned columns, merged cells, and a virtualized window all stay honest
|
|
16
|
+
* while sorting, filtering, tree expansion, selection, and pagination come
|
|
17
|
+
* from the row-model pipeline. */
|
|
18
|
+
export interface DataTableProps {
|
|
19
|
+
/** Row data; replaced wholesale on change — TanStack's memoized row
|
|
20
|
+
* models keep unrelated rows untouched, so edits land without a full
|
|
21
|
+
* re-render. Tree rows nest under `subRows`. */
|
|
22
|
+
data: RowData[];
|
|
23
|
+
/** Column definitions (TanStack `ColumnDef`, preferably built with
|
|
24
|
+
* `createColumnHelper().columns([...])`). Give every column an `id`
|
|
25
|
+
* unless it uses `accessorKey`. `size` fixes a px width; `minSize`
|
|
26
|
+
* floors a flexing track; otherwise the track hugs its content and
|
|
27
|
+
* only the table's leftover width is shared between columns. */
|
|
28
|
+
columns: ColumnDef<any, any, any>[];
|
|
29
|
+
/** Render a leading checkbox column with select-all. */
|
|
30
|
+
selectable?: boolean;
|
|
31
|
+
/** Allow header-click sorting (default true). */
|
|
32
|
+
sortable?: boolean;
|
|
33
|
+
/** Render a global-filter toolbar and per-column filter inputs. */
|
|
34
|
+
filterable?: boolean;
|
|
35
|
+
/** Keep the built-in toolbar row above the table (default true when
|
|
36
|
+
* `filterable`). Turn it off to host the global filter in your own
|
|
37
|
+
* toolbar — the feature stays registered and the instance methods
|
|
38
|
+
* keep working. */
|
|
39
|
+
showToolbar?: boolean;
|
|
40
|
+
/** Enable tree expansion over `subRows`; the first column hosts the
|
|
41
|
+
* expander and depth indent. */
|
|
42
|
+
tree?: boolean;
|
|
43
|
+
/** Column ids whose equal adjacent values merge into one cell (mutually
|
|
44
|
+
* exclusive with `virtual`). */
|
|
45
|
+
merge?: string[];
|
|
46
|
+
/** Column ids pinned to the start edge. */
|
|
47
|
+
pinStart?: string[];
|
|
48
|
+
/** Column ids pinned to the end edge. */
|
|
49
|
+
pinEnd?: string[];
|
|
50
|
+
/** Virtualize the body through a fixed-height window (mutually exclusive
|
|
51
|
+
* with `merge`). */
|
|
52
|
+
virtual?: boolean;
|
|
53
|
+
/** Row height in px; must match CSS so the virtual window aligns. */
|
|
54
|
+
rowHeight?: number;
|
|
55
|
+
/** Render the pagination bar and slice rows client-side. */
|
|
56
|
+
paginated?: boolean;
|
|
57
|
+
pageSize?: number;
|
|
58
|
+
pageSizeOptions?: number[];
|
|
59
|
+
/** Keep the (optional) footer row pinned to the viewport bottom. */
|
|
60
|
+
stickyFooter?: boolean;
|
|
61
|
+
initialSorting?: SortingState;
|
|
62
|
+
globalFilterPlaceholder?: string;
|
|
63
|
+
emptyText?: string;
|
|
64
|
+
/** Allow dragging header cells onto each other to reorder columns and
|
|
65
|
+
* body rows onto each other to reorder data — with `tree`, row drops
|
|
66
|
+
* read as before / inside / after, so a drop can also nest a branch
|
|
67
|
+
* under its target. Rows need a stable `id`. Row dragging rests while
|
|
68
|
+
* sorting or filtering hides the data order. */
|
|
69
|
+
reorderable?: boolean;
|
|
70
|
+
/** Fires with the reordered data array (the whole tree in tree mode). */
|
|
71
|
+
onRowReorder?: (rows: RowData[]) => void;
|
|
72
|
+
/** Fires with the full leaf-column id order after a header drop. */
|
|
73
|
+
onColumnReorder?: (ids: string[]) => void;
|
|
74
|
+
}
|
|
75
|
+
export declare function DataTable(props: DataTableProps): JSX.Element;
|
|
76
|
+
//#endregion
|
|
77
|
+
export { type ColumnDef, FlexRender, type SortingState, createColumnHelper };
|