@bysages/solid 0.3.0 → 0.4.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/dist/{ai-response-ClGGptX3.mjs → ai-response-D2uINBIi.mjs} +17 -7
- package/dist/chevron-BHQrYKPM.mjs +8 -0
- package/dist/components/accordion/index.d.mts +22 -2
- package/dist/components/accordion/index.mjs +68 -2
- package/dist/components/affix/index.d.mts +3 -1
- package/dist/components/affix/index.mjs +5 -4
- package/dist/components/ai/index.d.mts +1 -1
- package/dist/components/ai/index.mjs +14 -16
- package/dist/components/ai-action/index.d.mts +3 -1
- package/dist/components/ai-action/index.mjs +3 -2
- package/dist/components/ai-attachments/index.d.mts +8 -4
- package/dist/components/ai-attachments/index.mjs +41 -37
- package/dist/components/ai-message/index.d.mts +3 -1
- package/dist/components/ai-message/index.mjs +3 -2
- package/dist/components/ai-prompt-input/index.d.mts +3 -1
- package/dist/components/ai-prompt-input/index.mjs +59 -46
- package/dist/components/ai-reasoning/index.d.mts +3 -1
- package/dist/components/ai-reasoning/index.mjs +4 -3
- package/dist/components/ai-response/index.d.mts +3 -1
- package/dist/components/ai-response/index.mjs +1 -1
- package/dist/components/ai-source/index.d.mts +6 -2
- package/dist/components/ai-source/index.mjs +5 -4
- package/dist/components/ai-suggestion/index.d.mts +3 -1
- package/dist/components/ai-suggestion/index.mjs +3 -2
- package/dist/components/ai-tool/index.d.mts +3 -1
- package/dist/components/ai-tool/index.mjs +4 -3
- package/dist/components/alert/index.mjs +31 -34
- package/dist/components/angle-slider/index.d.mts +1 -1
- package/dist/components/angle-slider/index.mjs +13 -5
- package/dist/components/aspect-ratio/index.d.mts +3 -1
- package/dist/components/aspect-ratio/index.mjs +3 -2
- package/dist/components/autocomplete/index.d.mts +4 -1
- package/dist/components/autocomplete/index.mjs +15 -2
- package/dist/components/avatar/index.d.mts +1 -1
- package/dist/components/avatar/index.mjs +10 -1
- package/dist/components/avatar-group/index.d.mts +3 -1
- package/dist/components/avatar-group/index.mjs +3 -2
- package/dist/components/back-top/index.d.mts +3 -1
- package/dist/components/back-top/index.mjs +9 -5
- package/dist/components/badge/index.d.mts +3 -1
- package/dist/components/badge/index.mjs +3 -2
- package/dist/components/banner/index.mjs +9 -3
- package/dist/components/block-ui/index.d.mts +3 -1
- package/dist/components/block-ui/index.mjs +3 -2
- package/dist/components/breadcrumb/index.mjs +5 -5
- package/dist/components/button/index.d.mts +3 -1
- package/dist/components/button/index.mjs +3 -2
- package/dist/components/calendar/index.d.mts +3 -1
- package/dist/components/calendar/index.mjs +29 -21
- package/dist/components/carousel/index.d.mts +5 -1
- package/dist/components/carousel/index.mjs +13 -1
- package/dist/components/cascade-select/index.d.mts +3 -1
- package/dist/components/cascade-select/index.mjs +82 -74
- package/dist/components/checkbox/index.d.mts +1 -1
- package/dist/components/checkbox/index.mjs +13 -5
- package/dist/components/checkbox-group/index.d.mts +4 -9
- package/dist/components/checkbox-group/index.mjs +65 -68
- package/dist/components/chip/index.d.mts +3 -1
- package/dist/components/chip/index.mjs +3 -2
- package/dist/components/client-only/index.d.mts +7 -2
- package/dist/components/client-only/index.mjs +8 -1
- package/dist/components/clipboard/index.d.mts +1 -1
- package/dist/components/clipboard/index.mjs +13 -5
- package/dist/components/collapsible/index.d.mts +15 -1
- package/dist/components/collapsible/index.mjs +39 -2
- package/dist/components/color-picker/index.d.mts +13 -2
- package/dist/components/color-picker/index.mjs +95 -8
- package/dist/components/combobox/index.d.mts +24 -1
- package/dist/components/combobox/index.mjs +129 -8
- package/dist/components/command/index.d.mts +4 -1
- package/dist/components/command/index.mjs +24 -4
- package/dist/components/comment/index.d.mts +3 -1
- package/dist/components/comment/index.mjs +3 -2
- package/dist/components/config-provider/index.d.mts +7 -2
- package/dist/components/config-provider/index.mjs +6 -3
- package/dist/components/container/index.d.mts +3 -1
- package/dist/components/container/index.mjs +3 -2
- package/dist/components/data-view/index.d.mts +3 -1
- package/dist/components/data-view/index.mjs +13 -8
- package/dist/components/date-input/index.d.mts +1 -1
- package/dist/components/date-input/index.mjs +13 -5
- package/dist/components/date-picker/index.d.mts +1 -1
- package/dist/components/date-picker/index.mjs +13 -5
- package/dist/components/deferred-content/index.d.mts +3 -1
- package/dist/components/deferred-content/index.mjs +3 -2
- package/dist/components/descriptions/index.d.mts +7 -0
- package/dist/components/descriptions/index.mjs +21 -2
- package/dist/components/dialog/index.d.mts +17 -1
- package/dist/components/dialog/index.mjs +84 -2
- package/dist/components/download-trigger/index.d.mts +7 -2
- package/dist/components/download-trigger/index.mjs +8 -1
- package/dist/components/drawer/index.d.mts +17 -1
- package/dist/components/drawer/index.mjs +83 -2
- package/dist/components/dynamic-input/index.d.mts +3 -1
- package/dist/components/dynamic-input/index.mjs +15 -7
- package/dist/components/editable/index.d.mts +1 -1
- package/dist/components/editable/index.mjs +13 -5
- package/dist/components/ellipsis/index.d.mts +3 -1
- package/dist/components/ellipsis/index.mjs +3 -2
- package/dist/components/field/index.d.mts +5 -1
- package/dist/components/field/index.mjs +13 -1
- package/dist/components/fieldset/index.d.mts +5 -1
- package/dist/components/fieldset/index.mjs +13 -1
- package/dist/components/file-upload/index.d.mts +1 -1
- package/dist/components/file-upload/index.mjs +24 -6
- package/dist/components/float-button/index.mjs +3 -1
- package/dist/components/floating-panel/index.d.mts +5 -1
- package/dist/components/floating-panel/index.mjs +13 -1
- package/dist/components/focus-trap/index.d.mts +7 -2
- package/dist/components/focus-trap/index.mjs +8 -1
- package/dist/components/form/index.d.mts +1 -1
- package/dist/components/form/index.mjs +10 -4
- package/dist/components/frame/index.d.mts +6 -1
- package/dist/components/frame/index.mjs +10 -1
- package/dist/components/grid/index.d.mts +3 -1
- package/dist/components/grid/index.mjs +3 -2
- package/dist/components/highlight/index.d.mts +3 -1
- package/dist/components/highlight/index.mjs +2 -1
- package/dist/components/hover-card/index.d.mts +19 -1
- package/dist/components/hover-card/index.mjs +91 -2
- package/dist/components/icon/index.d.mts +8 -7
- package/dist/components/icon/index.mjs +4 -3
- package/dist/components/image/index.d.mts +8 -2
- package/dist/components/image/index.mjs +40 -33
- package/dist/components/image-cropper/index.d.mts +5 -1
- package/dist/components/image-cropper/index.mjs +13 -1
- package/dist/components/image-viewer/index.d.mts +2 -19
- package/dist/components/image-viewer/index.mjs +3 -151
- package/dist/components/input/index.d.mts +3 -1
- package/dist/components/input/index.mjs +1 -1
- package/dist/components/json-tree-view/index.d.mts +5 -1
- package/dist/components/json-tree-view/index.mjs +22 -2
- package/dist/components/kbd/index.d.mts +3 -1
- package/dist/components/kbd/index.mjs +3 -2
- package/dist/components/layout/index.mjs +8 -4
- package/dist/components/link/index.d.mts +3 -1
- package/dist/components/link/index.mjs +3 -2
- package/dist/components/list/index.d.mts +2 -1
- package/dist/components/list/index.mjs +35 -26
- package/dist/components/listbox/index.d.mts +1 -1
- package/dist/components/listbox/index.mjs +13 -5
- package/dist/components/marquee/index.d.mts +5 -1
- package/dist/components/marquee/index.mjs +13 -1
- package/dist/components/masonry/index.d.mts +3 -1
- package/dist/components/masonry/index.mjs +3 -2
- package/dist/components/media-player/index.d.mts +2 -0
- package/dist/components/media-player/index.mjs +2 -0
- package/dist/components/mentions/index.d.mts +1 -1
- package/dist/components/mentions/index.mjs +2 -2
- package/dist/components/menu/index.d.mts +21 -1
- package/dist/components/menu/index.mjs +62 -5
- package/dist/components/menubar/index.d.mts +3 -1
- package/dist/components/menubar/index.mjs +31 -9
- package/dist/components/navigation-menu/index.d.mts +5 -1
- package/dist/components/navigation-menu/index.mjs +13 -1
- package/dist/components/number-input/index.d.mts +1 -1
- package/dist/components/number-input/index.mjs +13 -5
- package/dist/components/order-list/index.d.mts +3 -1
- package/dist/components/order-list/index.mjs +79 -67
- package/dist/components/pagination/index.d.mts +1 -1
- package/dist/components/pagination/index.mjs +13 -5
- package/dist/components/password-input/index.d.mts +1 -1
- package/dist/components/password-input/index.mjs +13 -5
- package/dist/components/pin-input/index.d.mts +1 -1
- package/dist/components/pin-input/index.mjs +13 -5
- package/dist/components/popconfirm/index.d.mts +3 -1
- package/dist/components/popconfirm/index.mjs +16 -8
- package/dist/components/popover/index.d.mts +19 -1
- package/dist/components/popover/index.mjs +91 -2
- package/dist/components/presence/index.d.mts +10 -2
- package/dist/components/presence/index.mjs +9 -1
- package/dist/components/progress/index.d.mts +1 -1
- package/dist/components/progress/index.mjs +13 -5
- package/dist/components/progress-group/index.d.mts +3 -1
- package/dist/components/progress-group/index.mjs +4 -3
- package/dist/components/qr-code/index.d.mts +5 -1
- package/dist/components/qr-code/index.mjs +13 -1
- package/dist/components/radio-group/index.d.mts +1 -1
- package/dist/components/radio-group/index.mjs +13 -5
- package/dist/components/rating-group/index.d.mts +2 -2
- package/dist/components/rating-group/index.mjs +13 -5
- package/dist/components/result/index.d.mts +1 -1
- package/dist/components/result/index.mjs +5 -3
- package/dist/components/scroll-area/index.d.mts +5 -1
- package/dist/components/scroll-area/index.mjs +13 -1
- package/dist/components/segment-group/index.d.mts +1 -1
- package/dist/components/segment-group/index.mjs +11 -6
- package/dist/components/select/index.d.mts +2 -2
- package/dist/components/select/index.mjs +1 -1
- package/dist/components/separator/index.d.mts +3 -1
- package/dist/components/separator/index.mjs +3 -2
- package/dist/components/signature-pad/index.d.mts +5 -1
- package/dist/components/signature-pad/index.mjs +13 -1
- package/dist/components/skeleton/index.d.mts +3 -1
- package/dist/components/skeleton/index.mjs +3 -2
- package/dist/components/slider/index.d.mts +1 -1
- package/dist/components/slider/index.mjs +13 -5
- package/dist/components/spinner/index.d.mts +3 -1
- package/dist/components/spinner/index.mjs +6 -3
- package/dist/components/split-button/index.d.mts +3 -1
- package/dist/components/split-button/index.mjs +19 -4
- package/dist/components/splitter/index.d.mts +5 -1
- package/dist/components/splitter/index.mjs +13 -1
- package/dist/components/spotlight/index.d.mts +3 -1
- package/dist/components/spotlight/index.mjs +3 -2
- package/dist/components/stack/index.d.mts +3 -1
- package/dist/components/stack/index.mjs +6 -5
- package/dist/components/steps/index.d.mts +25 -3
- package/dist/components/steps/index.mjs +73 -8
- package/dist/components/swap/index.d.mts +5 -1
- package/dist/components/swap/index.mjs +13 -1
- package/dist/components/switch/index.d.mts +1 -1
- package/dist/components/switch/index.mjs +13 -5
- package/dist/components/table/index.d.mts +3 -1
- package/dist/components/table/index.mjs +194 -164
- package/dist/components/tabs/index.d.mts +20 -2
- package/dist/components/tabs/index.mjs +59 -3
- package/dist/components/tags-input/index.d.mts +1 -1
- package/dist/components/tags-input/index.mjs +13 -5
- package/dist/components/terminal/index.d.mts +3 -1
- package/dist/components/terminal/index.mjs +6 -3
- package/dist/components/textarea/index.d.mts +3 -1
- package/dist/components/textarea/index.mjs +3 -2
- package/dist/components/timer/index.d.mts +5 -1
- package/dist/components/timer/index.mjs +13 -1
- package/dist/components/toast/index.d.mts +8 -2
- package/dist/components/toast/index.mjs +14 -2
- package/dist/components/toc/index.d.mts +5 -1
- package/dist/components/toc/index.mjs +1 -9
- package/dist/components/toggle/index.d.mts +5 -1
- package/dist/components/toggle/index.mjs +13 -1
- package/dist/components/toggle-group/index.d.mts +1 -1
- package/dist/components/toggle-group/index.mjs +13 -5
- package/dist/components/toolbar/index.d.mts +3 -1
- package/dist/components/toolbar/index.mjs +3 -2
- package/dist/components/tooltip/index.d.mts +16 -1
- package/dist/components/tooltip/index.mjs +55 -2
- package/dist/components/tour/index.d.mts +16 -3
- package/dist/components/tour/index.mjs +74 -9
- package/dist/components/transfer/index.d.mts +3 -1
- package/dist/components/transfer/index.mjs +68 -54
- package/dist/components/tree-select/index.d.mts +3 -1
- package/dist/components/tree-select/index.mjs +45 -35
- package/dist/components/tree-view/index.d.mts +1 -1
- package/dist/components/tree-view/index.mjs +26 -5
- package/dist/components/user/index.d.mts +3 -1
- package/dist/components/user/index.mjs +8 -2
- package/dist/components/virtual-list/index.d.mts +3 -1
- package/dist/components/virtual-list/index.mjs +14 -9
- package/dist/components/watermark/index.d.mts +3 -1
- package/dist/components/watermark/index.mjs +4 -3
- package/dist/element-dGIhOTJ6.mjs +16 -0
- package/dist/family-Cmd8HEyK.mjs +11 -0
- package/dist/icon-DTqmJCd5.mjs +48 -0
- package/dist/id-2ygNzPHF.mjs +12 -0
- package/dist/image-viewer-B9A5lXsk.mjs +228 -0
- package/dist/{index-B1xiJ5ki.d.mts → index-B1-quIrl.d.mts} +6 -2
- package/dist/{index-DDX7x8aT.d.mts → index-DEArHiFI.d.mts} +16 -7
- package/dist/index-DhripUtf.d.mts +39 -0
- package/dist/{index-YPUiqD3n.d.mts → index-ID48LCMU.d.mts} +28 -2
- package/dist/{index-IfofF-SW.d.mts → index-nFXK_8hJ.d.mts} +53 -23
- package/dist/index-wW28BYf1.d.mts +124 -0
- package/dist/index.d.mts +22 -21
- package/dist/index.mjs +14 -13
- package/dist/{input-DoFQ7RXh.mjs → input-CPAJdwDb.mjs} +3 -2
- package/dist/media-player-BC8D_d29.mjs +796 -0
- package/dist/{mentions-f5Js_2W7.mjs → mentions-CeG5u8Qm.mjs} +67 -51
- package/dist/select-7YjMSBGx.mjs +292 -0
- package/dist/toc-DYKaKQ_X.mjs +31 -0
- package/dist/use-component-messages-C4SCVYjD.mjs +17 -0
- package/package.json +3 -3
- package/dist/chevron-D5RzcayK.mjs +0 -9
- package/dist/select-CHaXbzLX.mjs +0 -115
|
@@ -1,8 +1,12 @@
|
|
|
1
|
+
import { ComponentProps } from "solid-js";
|
|
1
2
|
import { Field as Field$1 } from "@ark-ui/solid/field";
|
|
2
3
|
//#region src/components/field/index.d.ts
|
|
3
4
|
/** Ark's Field, dressed in the paper-and-ink system: a tracked label, a
|
|
4
5
|
* border-and-halo control, and quiet help text. The API is Ark's own —
|
|
5
6
|
* Root, Label, Input, Textarea, Select, HelperText, ErrorText,
|
|
6
7
|
* RequiredIndicator. */
|
|
7
|
-
|
|
8
|
+
declare function FieldRoot(props: ComponentProps<typeof Field$1.Root>): import("solid-js").JSX.Element;
|
|
9
|
+
export declare const Field: typeof FieldRoot & Omit<typeof Field$1, "Root"> & {
|
|
10
|
+
Root: typeof FieldRoot;
|
|
11
|
+
};
|
|
8
12
|
//#endregion
|
|
@@ -1,11 +1,23 @@
|
|
|
1
|
+
import { t as defineFamily } from "../../family-Cmd8HEyK.mjs";
|
|
2
|
+
import { t as useElementId } from "../../id-2ygNzPHF.mjs";
|
|
1
3
|
import { injectComponentStyle } from "@bysages/core";
|
|
4
|
+
import { createComponent, mergeProps } from "solid-js";
|
|
2
5
|
import { Field as Field$1 } from "@ark-ui/solid/field";
|
|
3
6
|
//#region src/components/field/index.ts
|
|
4
7
|
/** Ark's Field, dressed in the paper-and-ink system: a tracked label, a
|
|
5
8
|
* border-and-halo control, and quiet help text. The API is Ark's own —
|
|
6
9
|
* Root, Label, Input, Textarea, Select, HelperText, ErrorText,
|
|
7
10
|
* RequiredIndicator. */
|
|
8
|
-
|
|
11
|
+
function FieldRoot(props) {
|
|
12
|
+
const id = useElementId("field", () => props.id);
|
|
13
|
+
return createComponent(Field$1.Root, mergeProps(props, { get id() {
|
|
14
|
+
return id();
|
|
15
|
+
} }));
|
|
16
|
+
}
|
|
17
|
+
const Field = defineFamily(FieldRoot, {
|
|
18
|
+
...Field$1,
|
|
19
|
+
Root: FieldRoot
|
|
20
|
+
});
|
|
9
21
|
injectComponentStyle("field");
|
|
10
22
|
//#endregion
|
|
11
23
|
export { Field };
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
+
import { ComponentProps } from "solid-js";
|
|
1
2
|
import { Fieldset as Fieldset$1 } from "@ark-ui/solid/fieldset";
|
|
2
3
|
//#region src/components/fieldset/index.d.ts
|
|
3
4
|
/** Ark's Fieldset, dressed in the paper-and-ink system: a song-serif
|
|
4
5
|
* legend heading a column of fields. The API is Ark's own — Root, Legend,
|
|
5
6
|
* HelperText, ErrorText. */
|
|
6
|
-
|
|
7
|
+
declare function FieldsetRoot(props: ComponentProps<typeof Fieldset$1.Root>): import("solid-js").JSX.Element;
|
|
8
|
+
export declare const Fieldset: typeof FieldsetRoot & Omit<typeof Fieldset$1, "Root"> & {
|
|
9
|
+
Root: typeof FieldsetRoot;
|
|
10
|
+
};
|
|
7
11
|
//#endregion
|
|
@@ -1,10 +1,22 @@
|
|
|
1
|
+
import { t as defineFamily } from "../../family-Cmd8HEyK.mjs";
|
|
2
|
+
import { t as useElementId } from "../../id-2ygNzPHF.mjs";
|
|
1
3
|
import { injectComponentStyle } from "@bysages/core";
|
|
4
|
+
import { createComponent, mergeProps } from "solid-js";
|
|
2
5
|
import { Fieldset as Fieldset$1 } from "@ark-ui/solid/fieldset";
|
|
3
6
|
//#region src/components/fieldset/index.ts
|
|
4
7
|
/** Ark's Fieldset, dressed in the paper-and-ink system: a song-serif
|
|
5
8
|
* legend heading a column of fields. The API is Ark's own — Root, Legend,
|
|
6
9
|
* HelperText, ErrorText. */
|
|
7
|
-
|
|
10
|
+
function FieldsetRoot(props) {
|
|
11
|
+
const id = useElementId("fieldset", () => props.id);
|
|
12
|
+
return createComponent(Fieldset$1.Root, mergeProps(props, { get id() {
|
|
13
|
+
return id();
|
|
14
|
+
} }));
|
|
15
|
+
}
|
|
16
|
+
const Fieldset = defineFamily(FieldsetRoot, {
|
|
17
|
+
...Fieldset$1,
|
|
18
|
+
Root: FieldsetRoot
|
|
19
|
+
});
|
|
8
20
|
injectComponentStyle("fieldset");
|
|
9
21
|
//#endregion
|
|
10
22
|
export { Fieldset };
|
|
@@ -11,7 +11,7 @@ type FileUploadOwnProps = {
|
|
|
11
11
|
size?: "sm" | "md" | "lg";
|
|
12
12
|
};
|
|
13
13
|
declare function FileUploadRoot(props: FileUploadRootProps & FileUploadOwnProps): import("solid-js").JSX.Element;
|
|
14
|
-
export declare const FileUpload: Omit<typeof FileUpload$1, "Root"> & {
|
|
14
|
+
export declare const FileUpload: typeof FileUploadRoot & Omit<typeof FileUpload$1, "Root"> & {
|
|
15
15
|
Root: typeof FileUploadRoot;
|
|
16
16
|
};
|
|
17
17
|
//#endregion
|
|
@@ -1,18 +1,36 @@
|
|
|
1
|
+
import { t as defineFamily } from "../../family-Cmd8HEyK.mjs";
|
|
2
|
+
import { t as useElementId } from "../../id-2ygNzPHF.mjs";
|
|
1
3
|
import { injectComponentStyle } from "@bysages/core";
|
|
2
4
|
import { createComponent, mergeProps } from "@solidjs/web";
|
|
3
5
|
import { splitProps } from "solid-js";
|
|
4
6
|
import { FileUpload as FileUpload$1 } from "@ark-ui/solid/file-upload";
|
|
5
7
|
//#region src/components/file-upload/index.tsx
|
|
8
|
+
/** The inner trigger repeats the click binding the dropzone already
|
|
9
|
+
* owns: keyboard users enter through the dropzone, so the button
|
|
10
|
+
* leaves the tab order and the semantic tree entirely. */
|
|
11
|
+
function FileUploadTrigger(props) {
|
|
12
|
+
return createComponent(FileUpload$1.Trigger, mergeProps(props, {
|
|
13
|
+
tabindex: -1,
|
|
14
|
+
"aria-hidden": "true"
|
|
15
|
+
}));
|
|
16
|
+
}
|
|
6
17
|
function FileUploadRoot(props) {
|
|
7
18
|
const [own, rest] = splitProps(props, ["size"]);
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
19
|
+
const id = useElementId("file-upload", () => rest.id);
|
|
20
|
+
return createComponent(FileUpload$1.Root, mergeProps(rest, {
|
|
21
|
+
get id() {
|
|
22
|
+
return id();
|
|
23
|
+
},
|
|
24
|
+
get "data-size"() {
|
|
25
|
+
return own.size ?? "md";
|
|
26
|
+
}
|
|
27
|
+
}));
|
|
11
28
|
}
|
|
12
|
-
const FileUpload = {
|
|
29
|
+
const FileUpload = defineFamily(FileUploadRoot, {
|
|
13
30
|
...FileUpload$1,
|
|
14
|
-
Root: FileUploadRoot
|
|
15
|
-
|
|
31
|
+
Root: FileUploadRoot,
|
|
32
|
+
Trigger: FileUploadTrigger
|
|
33
|
+
});
|
|
16
34
|
injectComponentStyle("file-upload");
|
|
17
35
|
//#endregion
|
|
18
36
|
export { FileUpload };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Button } from "../button/index.mjs";
|
|
2
|
+
import { n as useComponentMessages } from "../../use-component-messages-C4SCVYjD.mjs";
|
|
2
3
|
import { injectComponentStyle } from "@bysages/core";
|
|
3
4
|
import { createComponent, insert, mergeProps, spread, template } from "@solidjs/web";
|
|
4
5
|
import { createContext, createSignal, splitProps, useContext } from "solid-js";
|
|
@@ -62,6 +63,7 @@ const STEP_DOWN = {
|
|
|
62
63
|
function FloatButtonTrigger(props) {
|
|
63
64
|
const [own, rest] = splitProps(props, ["label", "children"]);
|
|
64
65
|
const context = useContext(FloatButtonContextKey);
|
|
66
|
+
const messages = useComponentMessages();
|
|
65
67
|
return createComponent(Button, mergeProps(rest, {
|
|
66
68
|
variant: "solid",
|
|
67
69
|
square: true,
|
|
@@ -70,7 +72,7 @@ function FloatButtonTrigger(props) {
|
|
|
70
72
|
},
|
|
71
73
|
onClick: () => context?.toggle(),
|
|
72
74
|
get "aria-label"() {
|
|
73
|
-
return own.label ||
|
|
75
|
+
return own.label || messages().floatButton.actions;
|
|
74
76
|
},
|
|
75
77
|
get "aria-expanded"() {
|
|
76
78
|
return context?.open() ?? false;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ComponentProps } from "solid-js";
|
|
1
2
|
import { FloatingPanel as FloatingPanel$1 } from "@ark-ui/solid/floating-panel";
|
|
2
3
|
//#region src/components/floating-panel/index.d.ts
|
|
3
4
|
/** Ark's FloatingPanel, dressed in the paper-and-ink system: the shared
|
|
@@ -5,5 +6,8 @@ import { FloatingPanel as FloatingPanel$1 } from "@ark-ui/solid/floating-panel";
|
|
|
5
6
|
* handle. The API is Ark's own — Root, Trigger, Positioner, Content, Header,
|
|
6
7
|
* Title, Control, DragTrigger, StageTrigger, CloseTrigger, ResizeTrigger,
|
|
7
8
|
* Body. */
|
|
8
|
-
|
|
9
|
+
declare function FloatingPanelRoot(props: ComponentProps<typeof FloatingPanel$1.Root>): import("solid-js").JSX.Element;
|
|
10
|
+
export declare const FloatingPanel: typeof FloatingPanelRoot & Omit<typeof FloatingPanel$1, "Root"> & {
|
|
11
|
+
Root: typeof FloatingPanelRoot;
|
|
12
|
+
};
|
|
9
13
|
//#endregion
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
import { t as defineFamily } from "../../family-Cmd8HEyK.mjs";
|
|
2
|
+
import { t as useElementId } from "../../id-2ygNzPHF.mjs";
|
|
1
3
|
import { injectComponentStyle } from "@bysages/core";
|
|
4
|
+
import { createComponent, mergeProps } from "solid-js";
|
|
2
5
|
import { FloatingPanel as FloatingPanel$1 } from "@ark-ui/solid/floating-panel";
|
|
3
6
|
//#region src/components/floating-panel/index.ts
|
|
4
7
|
/** Ark's FloatingPanel, dressed in the paper-and-ink system: the shared
|
|
@@ -6,7 +9,16 @@ import { FloatingPanel as FloatingPanel$1 } from "@ark-ui/solid/floating-panel";
|
|
|
6
9
|
* handle. The API is Ark's own — Root, Trigger, Positioner, Content, Header,
|
|
7
10
|
* Title, Control, DragTrigger, StageTrigger, CloseTrigger, ResizeTrigger,
|
|
8
11
|
* Body. */
|
|
9
|
-
|
|
12
|
+
function FloatingPanelRoot(props) {
|
|
13
|
+
const id = useElementId("floating-panel", () => props.id);
|
|
14
|
+
return createComponent(FloatingPanel$1.Root, mergeProps(props, { get id() {
|
|
15
|
+
return id();
|
|
16
|
+
} }));
|
|
17
|
+
}
|
|
18
|
+
const FloatingPanel = defineFamily(FloatingPanelRoot, {
|
|
19
|
+
...FloatingPanel$1,
|
|
20
|
+
Root: FloatingPanelRoot
|
|
21
|
+
});
|
|
10
22
|
injectComponentStyle("floating-panel");
|
|
11
23
|
//#endregion
|
|
12
24
|
export { FloatingPanel };
|
|
@@ -1,2 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { FocusTrapBaseProps, FocusTrapProps } from "@ark-ui/solid/focus-trap";
|
|
2
|
+
//#region src/components/focus-trap/index.d.ts
|
|
3
|
+
export declare const FocusTrap: ((props: import("@ark-ui/solid/focus-trap").FocusTrapProps) => import("solid-js").JSX.Element) & {
|
|
4
|
+
Root: (props: import("@ark-ui/solid/focus-trap").FocusTrapProps) => import("solid-js").JSX.Element;
|
|
5
|
+
};
|
|
6
|
+
//#endregion
|
|
7
|
+
export type { FocusTrapBaseProps, FocusTrapProps };
|
|
@@ -1,2 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as withSelfRoot } from "../../family-Cmd8HEyK.mjs";
|
|
2
|
+
import { FocusTrap as FocusTrap$1 } from "@ark-ui/solid/focus-trap";
|
|
3
|
+
//#region src/components/focus-trap/index.ts
|
|
4
|
+
/** Trap focus within a subtree — for containers that live outside the
|
|
5
|
+
* dialog machine but still owe the keyboard a boundary. Headless, like
|
|
6
|
+
* the rest of Ark's utilities. */
|
|
7
|
+
const FocusTrap = withSelfRoot(FocusTrap$1);
|
|
8
|
+
//#endregion
|
|
2
9
|
export { FocusTrap };
|
|
@@ -1,2 +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-
|
|
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-B1-quIrl.mjs";
|
|
2
2
|
export { type FieldApi, Form, type FormApi, FormField, FormFieldProps, FormProps, type SolidFormApi, createField, createField as useField, createForm, createForm as useForm };
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { n as withSelfRoot } from "../../family-Cmd8HEyK.mjs";
|
|
2
|
+
import { t as useElementId } from "../../id-2ygNzPHF.mjs";
|
|
1
3
|
import { injectComponentStyle } from "@bysages/core";
|
|
2
4
|
import { claimElement, createComponent, insert, memo, mergeProps, spread, template } from "@solidjs/web";
|
|
3
5
|
import { Show, createContext, splitProps, useContext } from "solid-js";
|
|
@@ -15,7 +17,7 @@ function errorText(error) {
|
|
|
15
17
|
if (typeof error === "object" && "message" in error) return String(error.message);
|
|
16
18
|
return "";
|
|
17
19
|
}
|
|
18
|
-
function Form(props) {
|
|
20
|
+
const Form = withSelfRoot(function Form(props) {
|
|
19
21
|
injectComponentStyle("form");
|
|
20
22
|
injectComponentStyle("field");
|
|
21
23
|
const [own, rest] = splitProps(props, ["form"]);
|
|
@@ -38,8 +40,8 @@ function Form(props) {
|
|
|
38
40
|
return _el$;
|
|
39
41
|
}
|
|
40
42
|
});
|
|
41
|
-
}
|
|
42
|
-
function FormField(props) {
|
|
43
|
+
});
|
|
44
|
+
const FormField = withSelfRoot(function FormField(props) {
|
|
43
45
|
const injected = useContext(FormContext);
|
|
44
46
|
const [own, rest] = splitProps(props, [
|
|
45
47
|
"form",
|
|
@@ -51,6 +53,7 @@ function FormField(props) {
|
|
|
51
53
|
"disabled",
|
|
52
54
|
"children"
|
|
53
55
|
]);
|
|
56
|
+
const id = useElementId("form-field");
|
|
54
57
|
const form = () => own.form ?? injected;
|
|
55
58
|
const assemble = (field) => {
|
|
56
59
|
const errors = () => {
|
|
@@ -63,6 +66,9 @@ function FormField(props) {
|
|
|
63
66
|
return own.name;
|
|
64
67
|
} }], true);
|
|
65
68
|
insert(_el$2, createComponent(Field.Root, {
|
|
69
|
+
get id() {
|
|
70
|
+
return id();
|
|
71
|
+
},
|
|
66
72
|
get invalid() {
|
|
67
73
|
return own.invalid || errors().length > 0;
|
|
68
74
|
},
|
|
@@ -120,6 +126,6 @@ function FormField(props) {
|
|
|
120
126
|
children: (field) => assemble(field)
|
|
121
127
|
}))
|
|
122
128
|
});
|
|
123
|
-
}
|
|
129
|
+
});
|
|
124
130
|
//#endregion
|
|
125
131
|
export { Form, FormField, createField, createField as useField, createForm, createForm as useForm };
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { ComponentProps } from "solid-js";
|
|
2
|
+
import { Frame as Frame$1 } from "@ark-ui/solid/frame";
|
|
1
3
|
//#region src/components/frame/index.d.ts
|
|
2
4
|
/** Ark's Frame, dressed in the paper-and-ink system: a sandboxed
|
|
3
5
|
* iframe whose body mounts the children and whose `head` prop
|
|
@@ -6,5 +8,8 @@
|
|
|
6
8
|
* grows to fit; the vessel's border and paper belong to the
|
|
7
9
|
* consumer, since an iframe carries no anatomy attributes for the
|
|
8
10
|
* core stylesheet to hook. The API is Ark's own. */
|
|
9
|
-
|
|
11
|
+
declare function FrameRoot(props: ComponentProps<typeof Frame$1>): import("solid-js").JSX.Element;
|
|
12
|
+
export declare const Frame: typeof FrameRoot & {
|
|
13
|
+
Root: typeof FrameRoot;
|
|
14
|
+
};
|
|
10
15
|
//#endregion
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { n as withSelfRoot } from "../../family-Cmd8HEyK.mjs";
|
|
2
|
+
import { t as useElementId } from "../../id-2ygNzPHF.mjs";
|
|
3
|
+
import { createComponent, mergeProps } from "solid-js";
|
|
1
4
|
import { Frame as Frame$1 } from "@ark-ui/solid/frame";
|
|
2
5
|
//#region src/components/frame/index.ts
|
|
3
6
|
/** Ark's Frame, dressed in the paper-and-ink system: a sandboxed
|
|
@@ -7,6 +10,12 @@ import { Frame as Frame$1 } from "@ark-ui/solid/frame";
|
|
|
7
10
|
* grows to fit; the vessel's border and paper belong to the
|
|
8
11
|
* consumer, since an iframe carries no anatomy attributes for the
|
|
9
12
|
* core stylesheet to hook. The API is Ark's own. */
|
|
10
|
-
|
|
13
|
+
function FrameRoot(props) {
|
|
14
|
+
const id = useElementId("frame", () => props.id);
|
|
15
|
+
return createComponent(Frame$1, mergeProps(props, { get id() {
|
|
16
|
+
return id();
|
|
17
|
+
} }));
|
|
18
|
+
}
|
|
19
|
+
const Frame = withSelfRoot(FrameRoot);
|
|
11
20
|
//#endregion
|
|
12
21
|
export { Frame };
|
|
@@ -9,5 +9,7 @@ export interface GridProps extends JSX.HTMLAttributes<HTMLDivElement> {
|
|
|
9
9
|
* and the container decides how many fit. */
|
|
10
10
|
minChildWidth?: string;
|
|
11
11
|
}
|
|
12
|
-
export declare
|
|
12
|
+
export declare const Grid: ((props: GridProps) => JSX.Element) & {
|
|
13
|
+
Root: (props: GridProps) => JSX.Element;
|
|
14
|
+
};
|
|
13
15
|
//#endregion
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { n as withSelfRoot } from "../../family-Cmd8HEyK.mjs";
|
|
1
2
|
import { injectComponentStyle } from "@bysages/core";
|
|
2
3
|
import { spread, template } from "@solidjs/web";
|
|
3
4
|
import { splitProps } from "solid-js";
|
|
@@ -13,7 +14,7 @@ const gapVars = {
|
|
|
13
14
|
lg: "var(--bs-gap-lg)",
|
|
14
15
|
xl: "var(--bs-gap-xl)"
|
|
15
16
|
};
|
|
16
|
-
function Grid(props) {
|
|
17
|
+
const Grid = withSelfRoot(function Grid(props) {
|
|
17
18
|
injectComponentStyle("grid");
|
|
18
19
|
const [own, rest] = splitProps(props, [
|
|
19
20
|
"columns",
|
|
@@ -37,6 +38,6 @@ function Grid(props) {
|
|
|
37
38
|
}
|
|
38
39
|
}], false);
|
|
39
40
|
return _el$;
|
|
40
|
-
}
|
|
41
|
+
});
|
|
41
42
|
//#endregion
|
|
42
43
|
export { Grid };
|
|
@@ -3,5 +3,7 @@
|
|
|
3
3
|
* strokes of pigment on the page — a quiet tint of the accent behind the
|
|
4
4
|
* ink, never neon. The component renders bare <mark> elements, so the
|
|
5
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
|
|
6
|
+
export declare const Highlight: ((props: import("@ark-ui/solid/highlight").HighlightProps) => import("solid-js").JSX.Element) & {
|
|
7
|
+
Root: (props: import("@ark-ui/solid/highlight").HighlightProps) => import("solid-js").JSX.Element;
|
|
8
|
+
};
|
|
7
9
|
//#endregion
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { n as withSelfRoot } from "../../family-Cmd8HEyK.mjs";
|
|
1
2
|
import { injectComponentStyle } from "@bysages/core";
|
|
2
3
|
import { Highlight as Highlight$1 } from "@ark-ui/solid/highlight";
|
|
3
4
|
//#region src/components/highlight/index.ts
|
|
@@ -5,7 +6,7 @@ import { Highlight as Highlight$1 } from "@ark-ui/solid/highlight";
|
|
|
5
6
|
* strokes of pigment on the page — a quiet tint of the accent behind the
|
|
6
7
|
* ink, never neon. The component renders bare <mark> elements, so the
|
|
7
8
|
* document-wide mark default carries the look. The API is Ark's own. */
|
|
8
|
-
const Highlight = Highlight$1;
|
|
9
|
+
const Highlight = withSelfRoot(Highlight$1);
|
|
9
10
|
injectComponentStyle("highlight");
|
|
10
11
|
//#endregion
|
|
11
12
|
export { Highlight };
|
|
@@ -1,7 +1,25 @@
|
|
|
1
|
+
import { ComponentProps, JSX } from "solid-js";
|
|
1
2
|
import { HoverCard as HoverCard$1 } from "@ark-ui/solid/hover-card";
|
|
2
3
|
//#region src/components/hover-card/index.d.ts
|
|
3
4
|
/** Ark's HoverCard, dressed in the paper-and-ink system: a preview card
|
|
4
5
|
* that dissolves in over a quiet inline link, never stealing focus. The
|
|
5
6
|
* API is Ark's own — Root, Trigger, Positioner, Content, Arrow, ArrowTip. */
|
|
6
|
-
|
|
7
|
+
declare function HoverCardRoot(props: ComponentProps<typeof HoverCard$1.Root>): JSX.Element;
|
|
8
|
+
type HoverCardPlacement = "top" | "top-start" | "top-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end" | "right" | "right-start" | "right-end";
|
|
9
|
+
export interface HoverCardFacadeProps {
|
|
10
|
+
open?: boolean;
|
|
11
|
+
defaultOpen?: boolean;
|
|
12
|
+
trigger: string | Element;
|
|
13
|
+
content?: string;
|
|
14
|
+
label: string;
|
|
15
|
+
description?: string;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
placement?: HoverCardPlacement;
|
|
18
|
+
children?: JSX.Element;
|
|
19
|
+
onOpenChange?: (open: boolean) => void;
|
|
20
|
+
}
|
|
21
|
+
declare function HoverCardFacade(props: HoverCardFacadeProps): JSX.Element;
|
|
22
|
+
export declare const HoverCard: typeof HoverCardFacade & Omit<typeof HoverCard$1, "Root"> & {
|
|
23
|
+
Root: typeof HoverCardRoot;
|
|
24
|
+
};
|
|
7
25
|
//#endregion
|
|
@@ -1,10 +1,99 @@
|
|
|
1
|
+
import { t as defineFamily } from "../../family-Cmd8HEyK.mjs";
|
|
2
|
+
import { t as useElementId } from "../../id-2ygNzPHF.mjs";
|
|
3
|
+
import { n as withElementProps, t as isElement } from "../../element-dGIhOTJ6.mjs";
|
|
1
4
|
import { injectComponentStyle } from "@bysages/core";
|
|
5
|
+
import { createComponent, insert, memo, mergeProps, template } from "@solidjs/web";
|
|
6
|
+
import { Show, createComponent as createComponent$1, mergeProps as mergeProps$1 } from "solid-js";
|
|
2
7
|
import { HoverCard as HoverCard$1 } from "@ark-ui/solid/hover-card";
|
|
3
|
-
//#region src/components/hover-card/index.
|
|
8
|
+
//#region src/components/hover-card/index.tsx
|
|
9
|
+
var _tmpl$ = /* @__PURE__ */ template(`<h3>`);
|
|
10
|
+
var _tmpl$2 = /* @__PURE__ */ template(`<p>`);
|
|
4
11
|
/** Ark's HoverCard, dressed in the paper-and-ink system: a preview card
|
|
5
12
|
* that dissolves in over a quiet inline link, never stealing focus. The
|
|
6
13
|
* API is Ark's own — Root, Trigger, Positioner, Content, Arrow, ArrowTip. */
|
|
7
|
-
|
|
14
|
+
function HoverCardRoot(props) {
|
|
15
|
+
const id = useElementId("hover-card", () => props.id);
|
|
16
|
+
return createComponent$1(HoverCard$1.Root, mergeProps$1(props, { get id() {
|
|
17
|
+
return id();
|
|
18
|
+
} }));
|
|
19
|
+
}
|
|
20
|
+
function HoverCardFacade(props) {
|
|
21
|
+
injectComponentStyle("hover-card");
|
|
22
|
+
const triggerElement = () => isElement(props.trigger) ? props.trigger : void 0;
|
|
23
|
+
const triggerChildren = () => triggerElement() ? void 0 : props.trigger;
|
|
24
|
+
const triggerAsChild = (propsFn) => {
|
|
25
|
+
const trigger = triggerElement();
|
|
26
|
+
return trigger ? withElementProps(trigger, propsFn()) : props.trigger;
|
|
27
|
+
};
|
|
28
|
+
return createComponent(HoverCardRoot, mergeProps(() => {
|
|
29
|
+
return props.open === void 0 ? {} : { open: props.open };
|
|
30
|
+
}, () => {
|
|
31
|
+
return props.defaultOpen === void 0 ? {} : { defaultOpen: props.defaultOpen };
|
|
32
|
+
}, () => {
|
|
33
|
+
return props.placement === void 0 ? {} : { positioning: { placement: props.placement } };
|
|
34
|
+
}, {
|
|
35
|
+
onOpenChange: (details) => props.onOpenChange?.(details.open),
|
|
36
|
+
get children() {
|
|
37
|
+
return [createComponent(HoverCard$1.Trigger, {
|
|
38
|
+
get disabled() {
|
|
39
|
+
return props.disabled;
|
|
40
|
+
},
|
|
41
|
+
get asChild() {
|
|
42
|
+
return triggerElement() ? triggerAsChild : void 0;
|
|
43
|
+
},
|
|
44
|
+
get children() {
|
|
45
|
+
return triggerChildren();
|
|
46
|
+
}
|
|
47
|
+
}), createComponent(HoverCard$1.Positioner, { get children() {
|
|
48
|
+
return createComponent(HoverCard$1.Content, { get children() {
|
|
49
|
+
return [
|
|
50
|
+
createComponent(HoverCard$1.Arrow, { get children() {
|
|
51
|
+
return createComponent(HoverCard$1.ArrowTip, {});
|
|
52
|
+
} }),
|
|
53
|
+
(() => {
|
|
54
|
+
var _el$ = _tmpl$();
|
|
55
|
+
insert(_el$, () => {
|
|
56
|
+
return props.label;
|
|
57
|
+
});
|
|
58
|
+
return _el$;
|
|
59
|
+
})(),
|
|
60
|
+
createComponent(Show, {
|
|
61
|
+
get when() {
|
|
62
|
+
return props.description;
|
|
63
|
+
},
|
|
64
|
+
get children() {
|
|
65
|
+
var _el$2 = _tmpl$2();
|
|
66
|
+
insert(_el$2, () => {
|
|
67
|
+
return props.description;
|
|
68
|
+
});
|
|
69
|
+
return _el$2;
|
|
70
|
+
}
|
|
71
|
+
}),
|
|
72
|
+
createComponent(Show, {
|
|
73
|
+
get when() {
|
|
74
|
+
return props.content;
|
|
75
|
+
},
|
|
76
|
+
get children() {
|
|
77
|
+
var _el$3 = _tmpl$2();
|
|
78
|
+
insert(_el$3, () => {
|
|
79
|
+
return props.content;
|
|
80
|
+
});
|
|
81
|
+
return _el$3;
|
|
82
|
+
}
|
|
83
|
+
}),
|
|
84
|
+
memo(() => {
|
|
85
|
+
return props.children;
|
|
86
|
+
})
|
|
87
|
+
];
|
|
88
|
+
} });
|
|
89
|
+
} })];
|
|
90
|
+
}
|
|
91
|
+
}));
|
|
92
|
+
}
|
|
93
|
+
const HoverCard = defineFamily(HoverCardFacade, {
|
|
94
|
+
...HoverCard$1,
|
|
95
|
+
Root: HoverCardRoot
|
|
96
|
+
});
|
|
8
97
|
injectComponentStyle("hover-card");
|
|
9
98
|
//#endregion
|
|
10
99
|
export { HoverCard };
|
|
@@ -3,9 +3,9 @@ import { IconifyIcon } from "@bysages/core/icons";
|
|
|
3
3
|
//#region src/components/icon/index.d.ts
|
|
4
4
|
/** The inkwell: a standard box that keeps any inline svg at its optical
|
|
5
5
|
* measure and in the text's own ink — the icon carries no pigment and no
|
|
6
|
-
* size of its own. Bring
|
|
7
|
-
*
|
|
8
|
-
* own; the well renders either. */
|
|
6
|
+
* size of its own. Bring an `@bysages/icons` export or any other
|
|
7
|
+
* IconifyIcon through `glyph`, a built-in core-registry name through
|
|
8
|
+
* `name`, or your own svg; the well renders either. */
|
|
9
9
|
export interface IconProps extends JSX.HTMLAttributes<HTMLSpanElement> {
|
|
10
10
|
/** Size steps follow the surrounding font size; `inherit` is the
|
|
11
11
|
* default — one em of the text the icon sits in. */
|
|
@@ -13,12 +13,13 @@ export interface IconProps extends JSX.HTMLAttributes<HTMLSpanElement> {
|
|
|
13
13
|
/** The accessible name. Without it the icon is presentation-only and
|
|
14
14
|
* hidden from the accessibility tree. */
|
|
15
15
|
label?: string;
|
|
16
|
-
/**
|
|
16
|
+
/** An `@bysages/icons` export or any IconifyIcon. Ignored when children
|
|
17
17
|
* are given — an explicit glyph always wins. */
|
|
18
18
|
glyph?: IconifyIcon;
|
|
19
|
-
/** A
|
|
20
|
-
* themselves. Ignored when `glyph` or children are given. */
|
|
19
|
+
/** A built-in name from the curated core registry. Ignored when `glyph` or children are given. */
|
|
21
20
|
name?: string;
|
|
22
21
|
}
|
|
23
|
-
export declare
|
|
22
|
+
export declare const Icon: ((props: IconProps) => JSX.Element) & {
|
|
23
|
+
Root: (props: IconProps) => JSX.Element;
|
|
24
|
+
};
|
|
24
25
|
//#endregion
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { n as withSelfRoot } from "../../family-Cmd8HEyK.mjs";
|
|
1
2
|
import { injectComponentStyle } from "@bysages/core";
|
|
2
3
|
import { effect, insert, setAttribute, spread, template } from "@solidjs/web";
|
|
3
4
|
import { splitProps } from "solid-js";
|
|
@@ -5,7 +6,7 @@ import { getIcon } from "@bysages/core/icons";
|
|
|
5
6
|
//#region src/components/icon/index.tsx
|
|
6
7
|
var _tmpl$ = /* @__PURE__ */ template(`<span>`);
|
|
7
8
|
var _tmpl$2 = /* @__PURE__ */ template(`<svg fill=currentColor aria-hidden=true>`);
|
|
8
|
-
function Icon(props) {
|
|
9
|
+
const Icon = withSelfRoot(function Icon(props) {
|
|
9
10
|
injectComponentStyle("icon");
|
|
10
11
|
const [own, rest] = splitProps(props, [
|
|
11
12
|
"size",
|
|
@@ -15,7 +16,7 @@ function Icon(props) {
|
|
|
15
16
|
"children"
|
|
16
17
|
]);
|
|
17
18
|
const resolved = own.glyph ?? (own.name && own.children == null ? getIcon(own.name) : void 0);
|
|
18
|
-
if (own.name && own.children == null && own.glyph == null && !resolved) console.error(`[icons] unknown icon name "${own.name}" — not in the
|
|
19
|
+
if (own.name && own.children == null && own.glyph == null && !resolved) console.error(`[icons] unknown icon name "${own.name}" — not in the core default registry; pass it explicitly as glyph`);
|
|
19
20
|
var _el$ = _tmpl$();
|
|
20
21
|
spread(_el$, [rest, {
|
|
21
22
|
get role() {
|
|
@@ -49,6 +50,6 @@ function Icon(props) {
|
|
|
49
50
|
})() : null);
|
|
50
51
|
});
|
|
51
52
|
return _el$;
|
|
52
|
-
}
|
|
53
|
+
});
|
|
53
54
|
//#endregion
|
|
54
55
|
export { Icon };
|
|
@@ -2,16 +2,22 @@ import { JSX } from "solid-js";
|
|
|
2
2
|
//#region src/components/image/index.d.ts
|
|
3
3
|
/** A framed picture: while the source loads, the frame keeps the
|
|
4
4
|
* skeleton's breath; the picture dissolves in when it lands; a broken
|
|
5
|
-
* source leaves the `fallback` prop — or the placeholder
|
|
5
|
+
* source leaves the `fallback` prop — or the placeholder icon when the
|
|
6
6
|
* caller has nothing local to say. The frame's size is the consumer's
|
|
7
7
|
* to give. */
|
|
8
8
|
export interface ImageProps extends JSX.HTMLAttributes<HTMLElement> {
|
|
9
9
|
src: string;
|
|
10
10
|
alt?: string;
|
|
11
|
+
/** Intrinsic dimensions for the image element, reserving the layout
|
|
12
|
+
* box before bytes arrive. */
|
|
13
|
+
width?: number | string;
|
|
14
|
+
height?: number | string;
|
|
11
15
|
fit?: "cover" | "contain" | "fill" | "none";
|
|
12
16
|
loading?: "lazy" | "eager";
|
|
13
17
|
/** What a broken source leaves instead of the picture. */
|
|
14
18
|
fallback?: JSX.Element;
|
|
15
19
|
}
|
|
16
|
-
export declare
|
|
20
|
+
export declare const Image: ((props: ImageProps) => JSX.Element) & {
|
|
21
|
+
Root: (props: ImageProps) => JSX.Element;
|
|
22
|
+
};
|
|
17
23
|
//#endregion
|