@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,18 @@
|
|
|
1
|
+
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
+
import { createComponent, mergeProps } from "@solidjs/web";
|
|
3
|
+
import { splitProps } from "solid-js";
|
|
4
|
+
import { Editable as Editable$1 } from "@ark-ui/solid/editable";
|
|
5
|
+
//#region src/components/editable/index.tsx
|
|
6
|
+
function EditableRoot(props) {
|
|
7
|
+
const [own, rest] = splitProps(props, ["size"]);
|
|
8
|
+
return createComponent(Editable$1.Root, mergeProps(rest, { get "data-size"() {
|
|
9
|
+
return own.size ?? "md";
|
|
10
|
+
} }));
|
|
11
|
+
}
|
|
12
|
+
const Editable = {
|
|
13
|
+
...Editable$1,
|
|
14
|
+
Root: EditableRoot
|
|
15
|
+
};
|
|
16
|
+
injectComponentStyle("editable");
|
|
17
|
+
//#endregion
|
|
18
|
+
export { Editable };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { JSX } from "solid-js";
|
|
2
|
+
//#region src/components/ellipsis/index.d.ts
|
|
3
|
+
/** The overflow knife: text cut at one line, or held to N lines. The
|
|
4
|
+
* primitive only draws the cut — reaching the full text (title,
|
|
5
|
+
* tooltip) stays the consumer's decision. */
|
|
6
|
+
export interface EllipsisProps extends JSX.HTMLAttributes<HTMLSpanElement> {
|
|
7
|
+
lines?: number;
|
|
8
|
+
}
|
|
9
|
+
export declare function Ellipsis(props: EllipsisProps): JSX.Element;
|
|
10
|
+
//#endregion
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
+
import { spread, template } from "@solidjs/web";
|
|
3
|
+
import { splitProps } from "solid-js";
|
|
4
|
+
//#region src/components/ellipsis/index.tsx
|
|
5
|
+
var _tmpl$ = /* @__PURE__ */ template(`<span>`);
|
|
6
|
+
function Ellipsis(props) {
|
|
7
|
+
injectComponentStyle("ellipsis");
|
|
8
|
+
const [own, rest] = splitProps(props, ["lines"]);
|
|
9
|
+
const multiline = () => (own.lines ?? 1) > 1;
|
|
10
|
+
var _el$ = _tmpl$();
|
|
11
|
+
spread(_el$, [rest, {
|
|
12
|
+
get style() {
|
|
13
|
+
return {
|
|
14
|
+
...rest.style,
|
|
15
|
+
...multiline() ? { "--bs-ellipsis-lines": String(own.lines) } : {}
|
|
16
|
+
};
|
|
17
|
+
},
|
|
18
|
+
"data-scope": "ellipsis",
|
|
19
|
+
"data-part": "root",
|
|
20
|
+
get "data-multiline"() {
|
|
21
|
+
return multiline() ? "" : void 0;
|
|
22
|
+
}
|
|
23
|
+
}], false);
|
|
24
|
+
return _el$;
|
|
25
|
+
}
|
|
26
|
+
//#endregion
|
|
27
|
+
export { Ellipsis };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Component } from "solid-js";
|
|
2
|
+
//#region src/components/empty/index.d.ts
|
|
3
|
+
export declare const Empty: Component<Record<string, unknown>> & {
|
|
4
|
+
Root: Component<Record<string, unknown>>;
|
|
5
|
+
Visual: Component<Record<string, unknown>>;
|
|
6
|
+
Title: Component<Record<string, unknown>>;
|
|
7
|
+
Description: Component<Record<string, unknown>>;
|
|
8
|
+
Actions: Component<Record<string, unknown>>;
|
|
9
|
+
};
|
|
10
|
+
//#endregion
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
+
import { createComponent, mergeProps } from "@solidjs/web";
|
|
3
|
+
//#region src/components/empty/index.tsx
|
|
4
|
+
/** An empty state: the page holds its breath. Root centers the column,
|
|
5
|
+
* Visual carries the mark, Title and Description carry the ink, Actions
|
|
6
|
+
* the way out. Any subset composes. */
|
|
7
|
+
function part(name, tag) {
|
|
8
|
+
return ((props) => {
|
|
9
|
+
return createComponent(tag, mergeProps(props, {
|
|
10
|
+
"data-scope": "empty",
|
|
11
|
+
get "data-part"() {
|
|
12
|
+
return name.toLowerCase();
|
|
13
|
+
}
|
|
14
|
+
}));
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
const Root = part("Root", "div");
|
|
18
|
+
const Visual = part("Visual", "div");
|
|
19
|
+
const Title = part("Title", "h3");
|
|
20
|
+
const Description = part("Description", "p");
|
|
21
|
+
const Actions = part("Actions", "div");
|
|
22
|
+
const Empty = Object.assign(Root, {
|
|
23
|
+
Root,
|
|
24
|
+
Visual,
|
|
25
|
+
Title,
|
|
26
|
+
Description,
|
|
27
|
+
Actions
|
|
28
|
+
});
|
|
29
|
+
injectComponentStyle("empty");
|
|
30
|
+
//#endregion
|
|
31
|
+
export { Empty };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Field as Field$1 } from "@ark-ui/solid/field";
|
|
2
|
+
//#region src/components/field/index.d.ts
|
|
3
|
+
/** Ark's Field, dressed in the paper-and-ink system: a tracked label, a
|
|
4
|
+
* border-and-halo control, and quiet help text. The API is Ark's own —
|
|
5
|
+
* Root, Label, Input, Textarea, Select, HelperText, ErrorText,
|
|
6
|
+
* RequiredIndicator. */
|
|
7
|
+
export declare const Field: typeof Field$1;
|
|
8
|
+
//#endregion
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
+
import { Field as Field$1 } from "@ark-ui/solid/field";
|
|
3
|
+
//#region src/components/field/index.ts
|
|
4
|
+
/** Ark's Field, dressed in the paper-and-ink system: a tracked label, a
|
|
5
|
+
* border-and-halo control, and quiet help text. The API is Ark's own —
|
|
6
|
+
* Root, Label, Input, Textarea, Select, HelperText, ErrorText,
|
|
7
|
+
* RequiredIndicator. */
|
|
8
|
+
const Field = Field$1;
|
|
9
|
+
injectComponentStyle("field");
|
|
10
|
+
//#endregion
|
|
11
|
+
export { Field };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Fieldset as Fieldset$1 } from "@ark-ui/solid/fieldset";
|
|
2
|
+
//#region src/components/fieldset/index.d.ts
|
|
3
|
+
/** Ark's Fieldset, dressed in the paper-and-ink system: a song-serif
|
|
4
|
+
* legend heading a column of fields. The API is Ark's own — Root, Legend,
|
|
5
|
+
* HelperText, ErrorText. */
|
|
6
|
+
export declare const Fieldset: typeof Fieldset$1;
|
|
7
|
+
//#endregion
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
+
import { Fieldset as Fieldset$1 } from "@ark-ui/solid/fieldset";
|
|
3
|
+
//#region src/components/fieldset/index.ts
|
|
4
|
+
/** Ark's Fieldset, dressed in the paper-and-ink system: a song-serif
|
|
5
|
+
* legend heading a column of fields. The API is Ark's own — Root, Legend,
|
|
6
|
+
* HelperText, ErrorText. */
|
|
7
|
+
const Fieldset = Fieldset$1;
|
|
8
|
+
injectComponentStyle("fieldset");
|
|
9
|
+
//#endregion
|
|
10
|
+
export { Fieldset };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { FileUpload as FileUpload$1, FileUploadRootProps } from "@ark-ui/solid/file-upload";
|
|
2
|
+
//#region src/components/file-upload/index.d.ts
|
|
3
|
+
/** Ark's FileUpload, dressed in the paper-and-ink system: a dashed
|
|
4
|
+
* dropzone that floods with subtle light on drag-over, and accepted files
|
|
5
|
+
* as loose hairline slips. The API is Ark's own — Root, Label, Trigger,
|
|
6
|
+
* Dropzone, HiddenInput, ItemGroup, Item, ItemName, ItemSizeText,
|
|
7
|
+
* ItemPreview, ItemPreviewImage, ItemDeleteTrigger, ClearTrigger,
|
|
8
|
+
* Context. */
|
|
9
|
+
type FileUploadOwnProps = {
|
|
10
|
+
/** One rung of the control-height ladder for the trigger. */
|
|
11
|
+
size?: "sm" | "md" | "lg";
|
|
12
|
+
};
|
|
13
|
+
declare function FileUploadRoot(props: FileUploadRootProps & FileUploadOwnProps): import("solid-js").JSX.Element;
|
|
14
|
+
export declare const FileUpload: Omit<typeof FileUpload$1, "Root"> & {
|
|
15
|
+
Root: typeof FileUploadRoot;
|
|
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 { FileUpload as FileUpload$1 } from "@ark-ui/solid/file-upload";
|
|
5
|
+
//#region src/components/file-upload/index.tsx
|
|
6
|
+
function FileUploadRoot(props) {
|
|
7
|
+
const [own, rest] = splitProps(props, ["size"]);
|
|
8
|
+
return createComponent(FileUpload$1.Root, mergeProps(rest, { get "data-size"() {
|
|
9
|
+
return own.size ?? "md";
|
|
10
|
+
} }));
|
|
11
|
+
}
|
|
12
|
+
const FileUpload = {
|
|
13
|
+
...FileUpload$1,
|
|
14
|
+
Root: FileUploadRoot
|
|
15
|
+
};
|
|
16
|
+
injectComponentStyle("file-upload");
|
|
17
|
+
//#endregion
|
|
18
|
+
export { FileUpload };
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { JSX } from "solid-js";
|
|
2
|
+
//#region src/components/float-button/index.d.ts
|
|
3
|
+
export type FloatButtonPlacement = "bottom-end" | "bottom-start" | "top-end" | "top-start";
|
|
4
|
+
export type FloatButtonSize = "sm" | "md" | "lg";
|
|
5
|
+
/** The group's openness, shared from the mooring to its parts. */
|
|
6
|
+
export interface FloatButtonContext {
|
|
7
|
+
open: () => boolean;
|
|
8
|
+
/** The group's button rung; the trigger takes it whole, the items
|
|
9
|
+
* step down one. */
|
|
10
|
+
size: () => FloatButtonSize;
|
|
11
|
+
toggle: () => void;
|
|
12
|
+
/** Folds the fan — an Item calls this once its action fires, the way
|
|
13
|
+
* a speed dial closes after a choice. */
|
|
14
|
+
close: () => void;
|
|
15
|
+
}
|
|
16
|
+
/** Solid context for {@link FloatButtonContext}, exported so a custom
|
|
17
|
+
* part can read the group's state with `useContext`. */
|
|
18
|
+
export declare const FloatButtonContextKey: import("solid-js").Context<FloatButtonContext | undefined>;
|
|
19
|
+
export interface FloatButtonRootProps extends JSX.HTMLAttributes<HTMLDivElement> {
|
|
20
|
+
/** Controlled openness: leave unset to let the group hold its own
|
|
21
|
+
* state; while set, the Trigger reports back through
|
|
22
|
+
* `onOpenChange`. */
|
|
23
|
+
open?: boolean;
|
|
24
|
+
/** Which corner the group moors at. */
|
|
25
|
+
placement?: FloatButtonPlacement;
|
|
26
|
+
/** One rung of the button ladder for the whole group. */
|
|
27
|
+
size?: FloatButtonSize;
|
|
28
|
+
/** The openness changed — from the Trigger, or an Item folding the
|
|
29
|
+
* fan. */
|
|
30
|
+
onOpenChange?: (open: boolean) => void;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* A floating action and its fanned-out alternatives — FAB and speed
|
|
34
|
+
* dial in one family. The Root moors the group at a page corner and
|
|
35
|
+
* holds the openness (mirrored from `open` when controlled); the
|
|
36
|
+
* Trigger flips it; each Item is a round action with its name surfacing
|
|
37
|
+
* beside it while the group is open. The buttons are the shared recipe
|
|
38
|
+
* (vessels here: round); this family owns only the mooring, the fan
|
|
39
|
+
* and the fold.
|
|
40
|
+
*/
|
|
41
|
+
declare function FloatButtonRoot(props: FloatButtonRootProps): JSX.Element;
|
|
42
|
+
export interface FloatButtonTriggerProps extends JSX.HTMLAttributes<HTMLButtonElement> {
|
|
43
|
+
/** The accessible name; the control is icon-only. */
|
|
44
|
+
label?: string;
|
|
45
|
+
}
|
|
46
|
+
declare function FloatButtonTrigger(props: FloatButtonTriggerProps): JSX.Element;
|
|
47
|
+
export interface FloatButtonItemProps extends Omit<JSX.HTMLAttributes<HTMLDivElement>, "onClick"> {
|
|
48
|
+
/** The action's name: the button's accessible name and the
|
|
49
|
+
* annotation surfaced beside it while the group is open. */
|
|
50
|
+
label: string;
|
|
51
|
+
disabled?: boolean;
|
|
52
|
+
/** The action fired — the fan folds right after. */
|
|
53
|
+
onClick?: (event: MouseEvent) => void;
|
|
54
|
+
}
|
|
55
|
+
declare function FloatButtonItem(props: FloatButtonItemProps): JSX.Element;
|
|
56
|
+
export declare const FloatButton: typeof FloatButtonRoot & {
|
|
57
|
+
Root: typeof FloatButtonRoot;
|
|
58
|
+
Trigger: typeof FloatButtonTrigger;
|
|
59
|
+
Item: typeof FloatButtonItem;
|
|
60
|
+
};
|
|
61
|
+
//#endregion
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { Button } from "../button/index.mjs";
|
|
2
|
+
import { injectComponentStyle } from "@bysages/core";
|
|
3
|
+
import { createComponent, insert, mergeProps, spread, template } from "@solidjs/web";
|
|
4
|
+
import { createContext, createSignal, splitProps, useContext } from "solid-js";
|
|
5
|
+
//#region src/components/float-button/index.tsx
|
|
6
|
+
var _tmpl$ = /* @__PURE__ */ template(`<div>`);
|
|
7
|
+
var _tmpl$2 = /* @__PURE__ */ template(`<div><span data-scope=float-button data-part=item-label aria-hidden=true>`);
|
|
8
|
+
/** Solid context for {@link FloatButtonContext}, exported so a custom
|
|
9
|
+
* part can read the group's state with `useContext`. */
|
|
10
|
+
const FloatButtonContextKey = createContext();
|
|
11
|
+
/**
|
|
12
|
+
* A floating action and its fanned-out alternatives — FAB and speed
|
|
13
|
+
* dial in one family. The Root moors the group at a page corner and
|
|
14
|
+
* holds the openness (mirrored from `open` when controlled); the
|
|
15
|
+
* Trigger flips it; each Item is a round action with its name surfacing
|
|
16
|
+
* beside it while the group is open. The buttons are the shared recipe
|
|
17
|
+
* (vessels here: round); this family owns only the mooring, the fan
|
|
18
|
+
* and the fold.
|
|
19
|
+
*/
|
|
20
|
+
function FloatButtonRoot(props) {
|
|
21
|
+
const [own, rest] = splitProps(props, [
|
|
22
|
+
"open",
|
|
23
|
+
"placement",
|
|
24
|
+
"size",
|
|
25
|
+
"onOpenChange"
|
|
26
|
+
]);
|
|
27
|
+
const [inner, setInner] = createSignal(false);
|
|
28
|
+
const open = () => own.open ?? inner();
|
|
29
|
+
const setOpen = (value) => {
|
|
30
|
+
setInner(value);
|
|
31
|
+
own.onOpenChange?.(value);
|
|
32
|
+
};
|
|
33
|
+
const context = {
|
|
34
|
+
open,
|
|
35
|
+
size: () => own.size ?? "lg",
|
|
36
|
+
toggle: () => setOpen(!open()),
|
|
37
|
+
close: () => setOpen(false)
|
|
38
|
+
};
|
|
39
|
+
return createComponent(FloatButtonContextKey.Provider, {
|
|
40
|
+
value: context,
|
|
41
|
+
get children() {
|
|
42
|
+
var _el$ = _tmpl$();
|
|
43
|
+
spread(_el$, [rest, {
|
|
44
|
+
"data-scope": "float-button",
|
|
45
|
+
"data-part": "root",
|
|
46
|
+
get "data-placement"() {
|
|
47
|
+
return own.placement ?? "bottom-end";
|
|
48
|
+
},
|
|
49
|
+
get "data-state"() {
|
|
50
|
+
return open() ? "open" : "closed";
|
|
51
|
+
}
|
|
52
|
+
}], false);
|
|
53
|
+
return _el$;
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
const STEP_DOWN = {
|
|
58
|
+
lg: "md",
|
|
59
|
+
md: "sm",
|
|
60
|
+
sm: "sm"
|
|
61
|
+
};
|
|
62
|
+
function FloatButtonTrigger(props) {
|
|
63
|
+
const [own, rest] = splitProps(props, ["label", "children"]);
|
|
64
|
+
const context = useContext(FloatButtonContextKey);
|
|
65
|
+
return createComponent(Button, mergeProps(rest, {
|
|
66
|
+
variant: "solid",
|
|
67
|
+
square: true,
|
|
68
|
+
get size() {
|
|
69
|
+
return context?.size() ?? "lg";
|
|
70
|
+
},
|
|
71
|
+
onClick: () => context?.toggle(),
|
|
72
|
+
get "aria-label"() {
|
|
73
|
+
return own.label || "Actions";
|
|
74
|
+
},
|
|
75
|
+
get "aria-expanded"() {
|
|
76
|
+
return context?.open() ?? false;
|
|
77
|
+
},
|
|
78
|
+
get children() {
|
|
79
|
+
return own.children;
|
|
80
|
+
}
|
|
81
|
+
}));
|
|
82
|
+
}
|
|
83
|
+
function FloatButtonItem(props) {
|
|
84
|
+
const [own, rest] = splitProps(props, [
|
|
85
|
+
"label",
|
|
86
|
+
"disabled",
|
|
87
|
+
"onClick",
|
|
88
|
+
"children"
|
|
89
|
+
]);
|
|
90
|
+
const context = useContext(FloatButtonContextKey);
|
|
91
|
+
var _el$2 = _tmpl$2();
|
|
92
|
+
var _el$3 = _el$2.firstChild;
|
|
93
|
+
spread(_el$2, [rest, {
|
|
94
|
+
"data-scope": "float-button",
|
|
95
|
+
"data-part": "item"
|
|
96
|
+
}], true);
|
|
97
|
+
insert(_el$2, createComponent(Button, {
|
|
98
|
+
variant: "outline",
|
|
99
|
+
square: true,
|
|
100
|
+
get size() {
|
|
101
|
+
return context ? STEP_DOWN[context.size()] : "md";
|
|
102
|
+
},
|
|
103
|
+
get disabled() {
|
|
104
|
+
return own.disabled;
|
|
105
|
+
},
|
|
106
|
+
get "aria-label"() {
|
|
107
|
+
return own.label;
|
|
108
|
+
},
|
|
109
|
+
onClick: (event) => {
|
|
110
|
+
own.onClick?.(event);
|
|
111
|
+
context?.close();
|
|
112
|
+
},
|
|
113
|
+
get children() {
|
|
114
|
+
return own.children;
|
|
115
|
+
}
|
|
116
|
+
}), _el$3);
|
|
117
|
+
insert(_el$3, () => {
|
|
118
|
+
return own.label;
|
|
119
|
+
});
|
|
120
|
+
return _el$2;
|
|
121
|
+
}
|
|
122
|
+
const FloatButton = Object.assign(FloatButtonRoot, {
|
|
123
|
+
Root: FloatButtonRoot,
|
|
124
|
+
Trigger: FloatButtonTrigger,
|
|
125
|
+
Item: FloatButtonItem
|
|
126
|
+
});
|
|
127
|
+
injectComponentStyle("float-button");
|
|
128
|
+
//#endregion
|
|
129
|
+
export { FloatButton, FloatButtonContextKey };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FloatingPanel as FloatingPanel$1 } from "@ark-ui/solid/floating-panel";
|
|
2
|
+
//#region src/components/floating-panel/index.d.ts
|
|
3
|
+
/** Ark's FloatingPanel, dressed in the paper-and-ink system: the shared
|
|
4
|
+
* popup vessel let loose — a draggable, resizable sheet whose header is the
|
|
5
|
+
* handle. The API is Ark's own — Root, Trigger, Positioner, Content, Header,
|
|
6
|
+
* Title, Control, DragTrigger, StageTrigger, CloseTrigger, ResizeTrigger,
|
|
7
|
+
* Body. */
|
|
8
|
+
export declare const FloatingPanel: typeof FloatingPanel$1;
|
|
9
|
+
//#endregion
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
+
import { FloatingPanel as FloatingPanel$1 } from "@ark-ui/solid/floating-panel";
|
|
3
|
+
//#region src/components/floating-panel/index.ts
|
|
4
|
+
/** Ark's FloatingPanel, dressed in the paper-and-ink system: the shared
|
|
5
|
+
* popup vessel let loose — a draggable, resizable sheet whose header is the
|
|
6
|
+
* handle. The API is Ark's own — Root, Trigger, Positioner, Content, Header,
|
|
7
|
+
* Title, Control, DragTrigger, StageTrigger, CloseTrigger, ResizeTrigger,
|
|
8
|
+
* Body. */
|
|
9
|
+
const FloatingPanel = FloatingPanel$1;
|
|
10
|
+
injectComponentStyle("floating-panel");
|
|
11
|
+
//#endregion
|
|
12
|
+
export { FloatingPanel };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { a as SolidFormApi, c as FormApi, i as FormProps, l as FieldApi, n as FormField, o as createField, r as FormFieldProps, s as createForm, t as Form } from "../../index-B1xiJ5ki.mjs";
|
|
2
|
+
export { type FieldApi, Form, type FormApi, FormField, FormFieldProps, FormProps, type SolidFormApi, createField, createField as useField, createForm, createForm as useForm };
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
+
import { claimElement, createComponent, insert, memo, mergeProps, spread, template } from "@solidjs/web";
|
|
3
|
+
import { Show, createContext, splitProps, useContext } from "solid-js";
|
|
4
|
+
import { Field } from "@ark-ui/solid/field";
|
|
5
|
+
import { createField, createForm } from "@tanstack/solid-form";
|
|
6
|
+
//#region src/components/form/index.tsx
|
|
7
|
+
var _tmpl$ = /* @__PURE__ */ template(`<form>`);
|
|
8
|
+
var _tmpl$2 = /* @__PURE__ */ template(`<div>`);
|
|
9
|
+
const FormContext = createContext(null);
|
|
10
|
+
/** A validator's complaint is a string or a Standard Schema issue; both
|
|
11
|
+
* reduce to the sentence the field shows. */
|
|
12
|
+
function errorText(error) {
|
|
13
|
+
if (error == null) return "";
|
|
14
|
+
if (typeof error === "string") return error;
|
|
15
|
+
if (typeof error === "object" && "message" in error) return String(error.message);
|
|
16
|
+
return "";
|
|
17
|
+
}
|
|
18
|
+
function Form(props) {
|
|
19
|
+
injectComponentStyle("form");
|
|
20
|
+
injectComponentStyle("field");
|
|
21
|
+
const [own, rest] = splitProps(props, ["form"]);
|
|
22
|
+
return createComponent(FormContext.Provider, {
|
|
23
|
+
get value() {
|
|
24
|
+
return own.form;
|
|
25
|
+
},
|
|
26
|
+
get children() {
|
|
27
|
+
var _el$ = _tmpl$();
|
|
28
|
+
claimElement(_el$);
|
|
29
|
+
spread(_el$, [rest, {
|
|
30
|
+
"data-scope": "form",
|
|
31
|
+
"data-part": "root",
|
|
32
|
+
novalidate: true,
|
|
33
|
+
onSubmit: (event) => {
|
|
34
|
+
event.preventDefault();
|
|
35
|
+
own.form.handleSubmit();
|
|
36
|
+
}
|
|
37
|
+
}], false);
|
|
38
|
+
return _el$;
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
function FormField(props) {
|
|
43
|
+
const injected = useContext(FormContext);
|
|
44
|
+
const [own, rest] = splitProps(props, [
|
|
45
|
+
"form",
|
|
46
|
+
"name",
|
|
47
|
+
"label",
|
|
48
|
+
"hint",
|
|
49
|
+
"required",
|
|
50
|
+
"invalid",
|
|
51
|
+
"disabled",
|
|
52
|
+
"children"
|
|
53
|
+
]);
|
|
54
|
+
const form = () => own.form ?? injected;
|
|
55
|
+
const assemble = (field) => {
|
|
56
|
+
const errors = () => {
|
|
57
|
+
if (!field) return [];
|
|
58
|
+
const meta = field().state.meta;
|
|
59
|
+
return (meta.isTouched ? meta.errors ?? [] : [meta.errorMap?.onSubmit].flat().filter(Boolean)).map(errorText).filter(Boolean);
|
|
60
|
+
};
|
|
61
|
+
var _el$2 = _tmpl$2();
|
|
62
|
+
spread(_el$2, [rest, { get "data-form-field"() {
|
|
63
|
+
return own.name;
|
|
64
|
+
} }], true);
|
|
65
|
+
insert(_el$2, createComponent(Field.Root, {
|
|
66
|
+
get invalid() {
|
|
67
|
+
return own.invalid || errors().length > 0;
|
|
68
|
+
},
|
|
69
|
+
get required() {
|
|
70
|
+
return own.required;
|
|
71
|
+
},
|
|
72
|
+
get disabled() {
|
|
73
|
+
return own.disabled;
|
|
74
|
+
},
|
|
75
|
+
get children() {
|
|
76
|
+
return [
|
|
77
|
+
memo(() => {
|
|
78
|
+
return memo(() => {
|
|
79
|
+
return !!own.label;
|
|
80
|
+
})() ? createComponent(Field.Label, { get children() {
|
|
81
|
+
return own.label;
|
|
82
|
+
} }) : null;
|
|
83
|
+
}),
|
|
84
|
+
memo(() => {
|
|
85
|
+
return memo(() => {
|
|
86
|
+
return typeof own.children === "function";
|
|
87
|
+
})() ? own.children(field) : own.children;
|
|
88
|
+
}),
|
|
89
|
+
memo(() => {
|
|
90
|
+
return memo(() => {
|
|
91
|
+
return !!(own.hint && errors().length === 0);
|
|
92
|
+
})() ? createComponent(Field.HelperText, { get children() {
|
|
93
|
+
return own.hint;
|
|
94
|
+
} }) : null;
|
|
95
|
+
}),
|
|
96
|
+
memo(() => {
|
|
97
|
+
return memo(() => {
|
|
98
|
+
return errors().length > 0;
|
|
99
|
+
})() ? createComponent(Field.ErrorText, { get children() {
|
|
100
|
+
return errors()[0];
|
|
101
|
+
} }) : null;
|
|
102
|
+
})
|
|
103
|
+
];
|
|
104
|
+
}
|
|
105
|
+
}));
|
|
106
|
+
return _el$2;
|
|
107
|
+
};
|
|
108
|
+
return createComponent(Show, {
|
|
109
|
+
get when() {
|
|
110
|
+
return form();
|
|
111
|
+
},
|
|
112
|
+
keyed: true,
|
|
113
|
+
get fallback() {
|
|
114
|
+
return assemble(void 0);
|
|
115
|
+
},
|
|
116
|
+
children: (engine) => createComponent(engine.Field, mergeProps(rest, {
|
|
117
|
+
get name() {
|
|
118
|
+
return own.name;
|
|
119
|
+
},
|
|
120
|
+
children: (field) => assemble(field)
|
|
121
|
+
}))
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
//#endregion
|
|
125
|
+
export { Form, FormField, createField, createField as useField, createForm, createForm as useForm };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Format as Format$1 } from "@ark-ui/solid/format";
|
|
2
|
+
//#region src/components/format/index.d.ts
|
|
3
|
+
/** Ark's Format, dressed in the paper-and-ink system: Intl formatting for
|
|
4
|
+
* numbers, currency, bytes and relative time. The components render bare
|
|
5
|
+
* text with no DOM of their own — typography flows from the token layer,
|
|
6
|
+
* so there is no component stylesheet. The API is Ark's own — Number,
|
|
7
|
+
* Byte, Time, RelativeTime. */
|
|
8
|
+
export declare const Format: typeof Format$1;
|
|
9
|
+
//#endregion
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Format as Format$1 } from "@ark-ui/solid/format";
|
|
2
|
+
//#region src/components/format/index.ts
|
|
3
|
+
/** Ark's Format, dressed in the paper-and-ink system: Intl formatting for
|
|
4
|
+
* numbers, currency, bytes and relative time. The components render bare
|
|
5
|
+
* text with no DOM of their own — typography flows from the token layer,
|
|
6
|
+
* so there is no component stylesheet. The API is Ark's own — Number,
|
|
7
|
+
* Byte, Time, RelativeTime. */
|
|
8
|
+
const Format = Format$1;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { Format };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
//#region src/components/frame/index.d.ts
|
|
2
|
+
/** Ark's Frame, dressed in the paper-and-ink system: a sandboxed
|
|
3
|
+
* iframe whose body mounts the children and whose `head` prop
|
|
4
|
+
* carries extra <head> elements — styles the child renders must
|
|
5
|
+
* travel through that prop. The frame measures its content and
|
|
6
|
+
* grows to fit; the vessel's border and paper belong to the
|
|
7
|
+
* consumer, since an iframe carries no anatomy attributes for the
|
|
8
|
+
* core stylesheet to hook. The API is Ark's own. */
|
|
9
|
+
export declare const Frame: (props: import("@ark-ui/solid/frame").FrameProps) => import("solid-js").JSX.Element;
|
|
10
|
+
//#endregion
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Frame as Frame$1 } from "@ark-ui/solid/frame";
|
|
2
|
+
//#region src/components/frame/index.ts
|
|
3
|
+
/** Ark's Frame, dressed in the paper-and-ink system: a sandboxed
|
|
4
|
+
* iframe whose body mounts the children and whose `head` prop
|
|
5
|
+
* carries extra <head> elements — styles the child renders must
|
|
6
|
+
* travel through that prop. The frame measures its content and
|
|
7
|
+
* grows to fit; the vessel's border and paper belong to the
|
|
8
|
+
* consumer, since an iframe carries no anatomy attributes for the
|
|
9
|
+
* core stylesheet to hook. The API is Ark's own. */
|
|
10
|
+
const Frame = Frame$1;
|
|
11
|
+
//#endregion
|
|
12
|
+
export { Frame };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { JSX } from "solid-js";
|
|
2
|
+
//#region src/components/grid/index.d.ts
|
|
3
|
+
/** An alignment lattice: tracks of equal measure, sized by column count
|
|
4
|
+
* — or, with `minChildWidth`, as many tracks as the container fits. */
|
|
5
|
+
export interface GridProps extends JSX.HTMLAttributes<HTMLDivElement> {
|
|
6
|
+
columns?: number;
|
|
7
|
+
gap?: "none" | "xs" | "sm" | "md" | "lg" | "xl";
|
|
8
|
+
/** Switch to the auto-fill lattice: each track is at least this wide,
|
|
9
|
+
* and the container decides how many fit. */
|
|
10
|
+
minChildWidth?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare function Grid(props: GridProps): JSX.Element;
|
|
13
|
+
//#endregion
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
+
import { spread, template } from "@solidjs/web";
|
|
3
|
+
import { splitProps } from "solid-js";
|
|
4
|
+
//#region src/components/grid/index.tsx
|
|
5
|
+
var _tmpl$ = /* @__PURE__ */ template(`<div>`);
|
|
6
|
+
/** The same named steps of the space ramp the stack uses — one
|
|
7
|
+
* vocabulary of distance across the layout primitives. */
|
|
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 Grid(props) {
|
|
17
|
+
injectComponentStyle("grid");
|
|
18
|
+
const [own, rest] = splitProps(props, [
|
|
19
|
+
"columns",
|
|
20
|
+
"gap",
|
|
21
|
+
"minChildWidth"
|
|
22
|
+
]);
|
|
23
|
+
var _el$ = _tmpl$();
|
|
24
|
+
spread(_el$, [rest, {
|
|
25
|
+
get style() {
|
|
26
|
+
return {
|
|
27
|
+
...rest.style,
|
|
28
|
+
"--bs-grid-columns": String(own.columns ?? 12),
|
|
29
|
+
"--bs-grid-gap": gapVars[own.gap ?? "md"] ?? gapVars.md,
|
|
30
|
+
...own.minChildWidth != null ? { "--bs-grid-min-child-width": own.minChildWidth } : {}
|
|
31
|
+
};
|
|
32
|
+
},
|
|
33
|
+
"data-scope": "grid",
|
|
34
|
+
"data-part": "root",
|
|
35
|
+
get "data-autofill"() {
|
|
36
|
+
return own.minChildWidth != null ? "" : void 0;
|
|
37
|
+
}
|
|
38
|
+
}], false);
|
|
39
|
+
return _el$;
|
|
40
|
+
}
|
|
41
|
+
//#endregion
|
|
42
|
+
export { Grid };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
//#region src/components/highlight/index.d.ts
|
|
2
|
+
/** Ark's Highlight, dressed in the paper-and-ink system: query hits are
|
|
3
|
+
* strokes of pigment on the page — a quiet tint of the accent behind the
|
|
4
|
+
* ink, never neon. The component renders bare <mark> elements, so the
|
|
5
|
+
* document-wide mark default carries the look. The API is Ark's own. */
|
|
6
|
+
export declare const Highlight: (props: import("@ark-ui/solid/highlight").HighlightProps) => import("solid-js").JSX.Element;
|
|
7
|
+
//#endregion
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
+
import { Highlight as Highlight$1 } from "@ark-ui/solid/highlight";
|
|
3
|
+
//#region src/components/highlight/index.ts
|
|
4
|
+
/** Ark's Highlight, dressed in the paper-and-ink system: query hits are
|
|
5
|
+
* strokes of pigment on the page — a quiet tint of the accent behind the
|
|
6
|
+
* ink, never neon. The component renders bare <mark> elements, so the
|
|
7
|
+
* document-wide mark default carries the look. The API is Ark's own. */
|
|
8
|
+
const Highlight = Highlight$1;
|
|
9
|
+
injectComponentStyle("highlight");
|
|
10
|
+
//#endregion
|
|
11
|
+
export { Highlight };
|