@bysages/react 0.3.1 → 0.4.1
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-BfKTmtCt.mjs → ai-response-nhDOlELQ.mjs} +4 -2
- package/dist/chevron-a2nIZKN4.mjs +6 -0
- package/dist/components/accordion/index.d.mts +22 -4
- package/dist/components/accordion/index.mjs +32 -2
- package/dist/components/affix/index.d.mts +4 -1
- package/dist/components/affix/index.mjs +6 -4
- package/dist/components/ai/index.d.mts +1 -1
- package/dist/components/ai/index.mjs +6 -4
- package/dist/components/ai-action/index.d.mts +4 -1
- package/dist/components/ai-action/index.mjs +4 -2
- package/dist/components/ai-attachments/index.d.mts +10 -4
- package/dist/components/ai-attachments/index.mjs +17 -45
- package/dist/components/ai-message/index.d.mts +4 -1
- package/dist/components/ai-message/index.mjs +4 -2
- package/dist/components/ai-prompt-input/index.d.mts +5 -2
- package/dist/components/ai-prompt-input/index.mjs +11 -15
- package/dist/components/ai-reasoning/index.d.mts +4 -1
- package/dist/components/ai-reasoning/index.mjs +5 -3
- package/dist/components/ai-response/index.d.mts +4 -1
- package/dist/components/ai-response/index.mjs +1 -1
- package/dist/components/ai-source/index.d.mts +8 -2
- package/dist/components/ai-source/index.mjs +6 -3
- package/dist/components/ai-suggestion/index.d.mts +4 -1
- package/dist/components/ai-suggestion/index.mjs +4 -2
- package/dist/components/ai-tool/index.d.mts +4 -1
- package/dist/components/ai-tool/index.mjs +5 -3
- package/dist/components/alert/index.d.mts +2 -0
- package/dist/components/alert/index.mjs +12 -19
- package/dist/components/angle-slider/index.d.mts +19 -2
- package/dist/components/angle-slider/index.mjs +32 -9
- package/dist/components/aspect-ratio/index.d.mts +4 -1
- package/dist/components/aspect-ratio/index.mjs +4 -2
- package/dist/components/autocomplete/index.d.mts +3 -1
- package/dist/components/autocomplete/index.mjs +15 -3
- package/dist/components/avatar/index.d.mts +2 -2
- package/dist/components/avatar/index.mjs +10 -3
- package/dist/components/avatar-group/index.d.mts +4 -1
- package/dist/components/avatar-group/index.mjs +4 -2
- package/dist/components/back-top/index.d.mts +7 -1
- package/dist/components/back-top/index.mjs +13 -18
- package/dist/components/badge/index.d.mts +4 -1
- package/dist/components/badge/index.mjs +4 -2
- package/dist/components/banner/index.mjs +3 -12
- package/dist/components/bento/index.mjs +1 -1
- package/dist/components/block-ui/index.d.mts +4 -1
- package/dist/components/block-ui/index.mjs +4 -2
- package/dist/components/breadcrumb/index.mjs +1 -1
- package/dist/components/browser/index.mjs +1 -1
- package/dist/components/button/index.d.mts +4 -1
- package/dist/components/button/index.mjs +4 -2
- package/dist/components/button-group/index.mjs +1 -1
- package/dist/components/calendar/index.d.mts +3 -1
- package/dist/components/calendar/index.mjs +10 -11
- package/dist/components/card/index.mjs +1 -1
- package/dist/components/carousel/index.d.mts +21 -1
- package/dist/components/carousel/index.mjs +44 -3
- package/dist/components/cascade-select/index.d.mts +6 -1
- package/dist/components/cascade-select/index.mjs +13 -36
- package/dist/components/checkbox/index.d.mts +20 -2
- package/dist/components/checkbox/index.mjs +29 -9
- package/dist/components/checkbox-group/index.d.mts +8 -6
- package/dist/components/checkbox-group/index.mjs +45 -49
- package/dist/components/chip/index.d.mts +4 -1
- package/dist/components/chip/index.mjs +4 -2
- package/dist/components/client-only/index.d.mts +7 -2
- package/dist/components/client-only/index.mjs +5 -1
- package/dist/components/clipboard/index.d.mts +17 -4
- package/dist/components/clipboard/index.mjs +34 -6
- package/dist/components/collapsible/index.d.mts +16 -4
- package/dist/components/collapsible/index.mjs +26 -2
- package/dist/components/color-picker/index.d.mts +20 -4
- package/dist/components/color-picker/index.mjs +57 -15
- package/dist/components/combobox/index.d.mts +27 -1
- package/dist/components/combobox/index.mjs +63 -6
- package/dist/components/command/index.d.mts +4 -1
- package/dist/components/command/index.mjs +8 -2
- package/dist/components/comment/index.d.mts +4 -1
- package/dist/components/comment/index.mjs +4 -2
- package/dist/components/config-provider/index.d.mts +4 -1
- package/dist/components/config-provider/index.mjs +3 -1
- package/dist/components/container/index.d.mts +4 -1
- package/dist/components/container/index.mjs +4 -2
- package/dist/components/data-view/index.d.mts +4 -1
- package/dist/components/data-view/index.mjs +4 -2
- package/dist/components/date-input/index.d.mts +19 -4
- package/dist/components/date-input/index.mjs +34 -10
- package/dist/components/date-picker/index.d.mts +21 -4
- package/dist/components/date-picker/index.mjs +59 -12
- package/dist/components/deferred-content/index.d.mts +4 -1
- package/dist/components/deferred-content/index.mjs +4 -2
- package/dist/components/descriptions/index.d.mts +10 -2
- package/dist/components/descriptions/index.mjs +14 -9
- package/dist/components/dialog/index.d.mts +18 -5
- package/dist/components/dialog/index.mjs +44 -2
- package/dist/components/dock/index.mjs +1 -1
- package/dist/components/download-trigger/index.d.mts +7 -2
- package/dist/components/download-trigger/index.mjs +5 -1
- package/dist/components/drawer/index.d.mts +18 -6
- package/dist/components/drawer/index.mjs +41 -2
- package/dist/components/dynamic-input/index.d.mts +4 -1
- package/dist/components/dynamic-input/index.mjs +11 -19
- package/dist/components/editable/index.d.mts +28 -7
- package/dist/components/editable/index.mjs +44 -5
- package/dist/components/ellipsis/index.d.mts +4 -1
- package/dist/components/ellipsis/index.mjs +4 -2
- package/dist/components/empty/index.mjs +1 -1
- package/dist/components/field/index.d.mts +30 -5
- package/dist/components/field/index.mjs +37 -4
- package/dist/components/fieldset/index.d.mts +19 -4
- package/dist/components/fieldset/index.mjs +29 -4
- package/dist/components/file-upload/index.d.mts +29 -9
- package/dist/components/file-upload/index.mjs +47 -11
- package/dist/components/float-button/index.mjs +1 -1
- package/dist/components/floating-panel/index.d.mts +18 -6
- package/dist/components/floating-panel/index.mjs +56 -2
- package/dist/components/focus-trap/index.d.mts +7 -2
- package/dist/components/focus-trap/index.mjs +5 -1
- package/dist/components/form/index.d.mts +1 -1
- package/dist/components/form/index.mjs +6 -3
- package/dist/components/frame/index.d.mts +4 -8
- package/dist/components/frame/index.mjs +13 -1
- package/dist/components/grid/index.d.mts +4 -1
- package/dist/components/grid/index.mjs +4 -2
- package/dist/components/highlight/index.d.mts +3 -5
- package/dist/components/highlight/index.mjs +7 -2
- package/dist/components/hover-card/index.d.mts +20 -4
- package/dist/components/hover-card/index.mjs +33 -2
- package/dist/components/icon/index.d.mts +10 -8
- package/dist/components/icon/index.mjs +6 -4
- package/dist/components/image/index.d.mts +5 -2
- package/dist/components/image/index.mjs +15 -30
- package/dist/components/image-cropper/index.d.mts +13 -2
- package/dist/components/image-cropper/index.mjs +35 -3
- package/dist/components/image-viewer/index.d.mts +2 -24
- package/dist/components/image-viewer/index.mjs +3 -113
- package/dist/components/input/index.d.mts +3 -1
- package/dist/components/input/index.mjs +1 -1
- package/dist/components/input-group/index.mjs +1 -1
- package/dist/components/json-tree-view/index.d.mts +17 -1
- package/dist/components/json-tree-view/index.mjs +27 -6
- package/dist/components/kbd/index.d.mts +4 -1
- package/dist/components/kbd/index.mjs +4 -2
- package/dist/components/layout/index.d.mts +25 -7
- package/dist/components/layout/index.mjs +158 -64
- package/dist/components/link/index.d.mts +4 -1
- package/dist/components/link/index.mjs +4 -2
- package/dist/components/list/index.mjs +1 -1
- package/dist/components/listbox/index.d.mts +22 -1
- package/dist/components/listbox/index.mjs +37 -5
- package/dist/components/marquee/index.d.mts +18 -1
- package/dist/components/marquee/index.mjs +35 -3
- package/dist/components/masonry/index.d.mts +4 -1
- package/dist/components/masonry/index.mjs +4 -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 +1 -1
- package/dist/components/menu/index.d.mts +29 -11
- package/dist/components/menu/index.mjs +35 -13
- package/dist/components/menubar/index.d.mts +3 -1
- package/dist/components/menubar/index.mjs +7 -2
- package/dist/components/meter/index.mjs +1 -1
- package/dist/components/navigation-menu/index.d.mts +25 -1
- package/dist/components/navigation-menu/index.mjs +37 -2
- package/dist/components/number-input/index.d.mts +28 -6
- package/dist/components/number-input/index.mjs +34 -9
- package/dist/components/order-list/index.d.mts +4 -1
- package/dist/components/order-list/index.mjs +27 -25
- package/dist/components/page-header/index.mjs +1 -1
- package/dist/components/pagination/index.d.mts +23 -3
- package/dist/components/pagination/index.mjs +58 -13
- package/dist/components/password-input/index.d.mts +24 -6
- package/dist/components/password-input/index.mjs +32 -9
- package/dist/components/pin-input/index.d.mts +23 -5
- package/dist/components/pin-input/index.mjs +30 -8
- package/dist/components/popconfirm/index.d.mts +9 -5
- package/dist/components/popconfirm/index.mjs +24 -19
- package/dist/components/popover/index.d.mts +2 -8
- package/dist/components/popover/index.mjs +45 -5
- package/dist/components/presence/index.d.mts +10 -2
- package/dist/components/presence/index.mjs +6 -1
- package/dist/components/progress/index.d.mts +18 -3
- package/dist/components/progress/index.mjs +35 -10
- package/dist/components/progress-group/index.d.mts +4 -1
- package/dist/components/progress-group/index.mjs +5 -3
- package/dist/components/qr-code/index.d.mts +14 -1
- package/dist/components/qr-code/index.mjs +27 -3
- package/dist/components/radio-group/index.d.mts +27 -2
- package/dist/components/radio-group/index.mjs +33 -9
- package/dist/components/rating-group/index.d.mts +20 -3
- package/dist/components/rating-group/index.mjs +27 -9
- package/dist/components/result/index.d.mts +1 -1
- package/dist/components/result/index.mjs +3 -3
- package/dist/components/scroll-area/index.d.mts +14 -1
- package/dist/components/scroll-area/index.mjs +33 -3
- package/dist/components/segment-group/index.d.mts +28 -2
- package/dist/components/segment-group/index.mjs +35 -8
- package/dist/components/select/index.d.mts +2 -2
- package/dist/components/select/index.mjs +1 -1
- package/dist/components/separator/index.d.mts +4 -1
- package/dist/components/separator/index.mjs +4 -2
- package/dist/components/signature-pad/index.d.mts +25 -5
- package/dist/components/signature-pad/index.mjs +38 -4
- package/dist/components/skeleton/index.d.mts +4 -1
- package/dist/components/skeleton/index.mjs +4 -2
- package/dist/components/slider/index.d.mts +21 -2
- package/dist/components/slider/index.mjs +32 -9
- package/dist/components/spinner/index.d.mts +4 -1
- package/dist/components/spinner/index.mjs +4 -2
- package/dist/components/split-button/index.d.mts +3 -1
- package/dist/components/split-button/index.mjs +13 -18
- package/dist/components/splitter/index.d.mts +17 -4
- package/dist/components/splitter/index.mjs +36 -2
- package/dist/components/spotlight/index.d.mts +4 -1
- package/dist/components/spotlight/index.mjs +4 -2
- package/dist/components/stack/index.d.mts +4 -1
- package/dist/components/stack/index.mjs +7 -5
- package/dist/components/stat/index.mjs +1 -1
- package/dist/components/steps/index.d.mts +26 -6
- package/dist/components/steps/index.mjs +27 -12
- package/dist/components/swap/index.d.mts +11 -5
- package/dist/components/swap/index.mjs +31 -4
- package/dist/components/switch/index.d.mts +20 -2
- package/dist/components/switch/index.mjs +28 -9
- package/dist/components/table/index.d.mts +4 -1
- package/dist/components/table/index.mjs +38 -60
- package/dist/components/tabs/index.d.mts +24 -2
- package/dist/components/tabs/index.mjs +26 -10
- package/dist/components/tags-input/index.d.mts +33 -8
- package/dist/components/tags-input/index.mjs +42 -10
- package/dist/components/terminal/index.d.mts +4 -1
- package/dist/components/terminal/index.mjs +4 -2
- package/dist/components/textarea/index.d.mts +4 -1
- package/dist/components/textarea/index.mjs +4 -2
- package/dist/components/timeline/index.mjs +1 -1
- package/dist/components/timer/index.d.mts +18 -1
- package/dist/components/timer/index.mjs +52 -3
- package/dist/components/toast/index.d.mts +3 -6
- package/dist/components/toast/index.mjs +23 -3
- package/dist/components/toc/index.d.mts +19 -5
- package/dist/components/toc/index.mjs +32 -6
- package/dist/components/toggle/index.d.mts +11 -4
- package/dist/components/toggle/index.mjs +22 -2
- package/dist/components/toggle-group/index.d.mts +26 -2
- package/dist/components/toggle-group/index.mjs +32 -7
- package/dist/components/toolbar/index.d.mts +4 -1
- package/dist/components/toolbar/index.mjs +4 -2
- package/dist/components/tooltip/index.d.mts +17 -4
- package/dist/components/tooltip/index.mjs +29 -2
- package/dist/components/tour/index.d.mts +18 -9
- package/dist/components/tour/index.mjs +45 -3
- package/dist/components/transfer/index.d.mts +3 -1
- package/dist/components/transfer/index.mjs +15 -27
- package/dist/components/tree-select/index.d.mts +3 -1
- package/dist/components/tree-select/index.mjs +12 -23
- package/dist/components/tree-view/index.d.mts +22 -2
- package/dist/components/tree-view/index.mjs +51 -9
- package/dist/components/typography/index.d.mts +4 -0
- package/dist/components/typography/index.mjs +2 -1
- package/dist/components/user/index.d.mts +4 -1
- package/dist/components/user/index.mjs +4 -2
- package/dist/components/virtual-list/index.d.mts +4 -1
- package/dist/components/virtual-list/index.mjs +11 -13
- package/dist/components/watermark/index.d.mts +4 -1
- package/dist/components/watermark/index.mjs +5 -3
- package/dist/family-DE_GQeeM.mjs +9 -0
- package/dist/icon-BALgGtNK.mjs +18 -0
- package/dist/id-C37UYLwJ.mjs +13 -0
- package/dist/image-viewer-B-hKFkEw.mjs +141 -0
- package/dist/{index-Dn5mHf1g.d.mts → index-B4twHAQC.d.mts} +194 -106
- package/dist/{index-Uefyw7Im.d.mts → index-Bbg4heDO.d.mts} +12 -7
- package/dist/index-BcRdWGY-.d.mts +115 -0
- package/dist/{index-Iy8m0Qev.d.mts → index-D_iKc2Uw.d.mts} +31 -2
- package/dist/index-Dj8S4eyJ.d.mts +41 -0
- package/dist/index-Eu-Bttta.d.mts +24 -0
- package/dist/{index-uPyYiWaL.d.mts → index-PsgGWW3m.d.mts} +8 -2
- package/dist/index.d.mts +36 -35
- package/dist/index.mjs +11 -10
- package/dist/{input-2oezH-dY.mjs → input-BDpQ0e6G.mjs} +4 -2
- package/dist/media-player-DjVvo1_7.mjs +554 -0
- package/dist/{mentions-DMIBCBOd.mjs → mentions-BwnyvdXz.mjs} +75 -43
- package/dist/select-i9UZsQCU.mjs +121 -0
- package/package.json +9 -81
- package/dist/chevron-BeHvt46K.mjs +0 -17
- package/dist/glyph-VI989p8H.mjs +0 -14
- package/dist/select-eAHutw56.mjs +0 -70
|
@@ -1,10 +1,35 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as useElementId } from "../../id-C37UYLwJ.mjs";
|
|
2
|
+
import { injectComponentStyle } from "@bysages/core/styling";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
4
|
import { Fieldset as Fieldset$1 } from "@ark-ui/react/fieldset";
|
|
3
5
|
//#region src/components/fieldset/index.tsx
|
|
4
|
-
/**
|
|
5
|
-
* legend heading a column of fields. The
|
|
6
|
+
/** Fieldset, dressed in the paper-and-ink system: a song-serif
|
|
7
|
+
* legend heading a column of fields. The parts — Root, Legend,
|
|
6
8
|
* HelperText, ErrorText. */
|
|
7
|
-
|
|
9
|
+
function FieldsetRoot(props) {
|
|
10
|
+
const id = useElementId("fieldset", props);
|
|
11
|
+
return /* @__PURE__ */ jsx(Fieldset$1.Root, {
|
|
12
|
+
...props,
|
|
13
|
+
id
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
/** The one-tag path: one label and optional description around the
|
|
17
|
+
* caller controls; compound or bespoke groups keep the anatomy. */
|
|
18
|
+
function FieldsetFacade({ label, description, disabled = false, invalid = false, children }) {
|
|
19
|
+
return /* @__PURE__ */ jsxs(FieldsetRoot, {
|
|
20
|
+
disabled,
|
|
21
|
+
invalid,
|
|
22
|
+
children: [
|
|
23
|
+
label ? /* @__PURE__ */ jsx(Fieldset$1.Legend, { children: label }) : null,
|
|
24
|
+
children,
|
|
25
|
+
description ? /* @__PURE__ */ jsx(Fieldset$1.HelperText, { children: description }) : null
|
|
26
|
+
]
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
const Fieldset = Object.assign(FieldsetFacade, {
|
|
30
|
+
...Fieldset$1,
|
|
31
|
+
Root: FieldsetRoot
|
|
32
|
+
});
|
|
8
33
|
injectComponentStyle("fieldset");
|
|
9
34
|
//#endregion
|
|
10
35
|
export { Fieldset };
|
|
@@ -1,25 +1,45 @@
|
|
|
1
|
-
import { ComponentProps } from "react";
|
|
1
|
+
import { ComponentProps, ReactNode } from "react";
|
|
2
2
|
import { FileUpload as FileUpload$1 } from "@ark-ui/react/file-upload";
|
|
3
3
|
//#region src/components/file-upload/index.d.ts
|
|
4
4
|
type FileUploadRootProps = ComponentProps<typeof FileUpload$1.Root> & {
|
|
5
5
|
/** One rung of the control-height ladder for the trigger. */
|
|
6
6
|
size?: "sm" | "md" | "lg";
|
|
7
7
|
};
|
|
8
|
-
declare function FileUploadRoot(
|
|
8
|
+
declare function FileUploadRoot(props: FileUploadRootProps): import("react").JSX.Element;
|
|
9
9
|
/** The inner trigger repeats the click binding the dropzone already
|
|
10
10
|
* owns, and no flavor of taming a nested button survives the audit —
|
|
11
11
|
* assistive tech can still land on it. So the visual cue is a plain
|
|
12
12
|
* span wearing the trigger props; the dropzone stays the one real
|
|
13
13
|
* control, keyboard included. */
|
|
14
14
|
declare function FileUploadTrigger(props: ComponentProps<typeof FileUpload$1.Trigger>): import("react").JSX.Element;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
15
|
+
interface FileUploadFacadeProps {
|
|
16
|
+
label?: string;
|
|
17
|
+
placeholder?: string;
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
invalid?: boolean;
|
|
20
|
+
required?: boolean;
|
|
21
|
+
maxFiles?: number;
|
|
22
|
+
size?: "sm" | "md" | "lg";
|
|
23
|
+
children?: ReactNode;
|
|
24
|
+
}
|
|
25
|
+
/** The one-tag path: a labelled dropzone and its accepted slips; MIME
|
|
26
|
+
* rules, directories, and controlled files stay on the anatomy. */
|
|
27
|
+
declare function FileUploadFacade({ label, placeholder, disabled, invalid, required, maxFiles, size }: FileUploadFacadeProps): import("react").JSX.Element;
|
|
28
|
+
export declare const FileUpload: typeof FileUploadFacade & {
|
|
22
29
|
Root: typeof FileUploadRoot;
|
|
23
30
|
Trigger: typeof FileUploadTrigger;
|
|
31
|
+
ClearTrigger: import("react").ForwardRefExoticComponent<FileUpload$1.ClearTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
32
|
+
Context: (props: FileUpload$1.ContextProps) => ReactNode;
|
|
33
|
+
Dropzone: import("react").ForwardRefExoticComponent<FileUpload$1.DropzoneProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
34
|
+
HiddenInput: import("react").ForwardRefExoticComponent<FileUpload$1.HiddenInputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
35
|
+
Item: import("react").ForwardRefExoticComponent<FileUpload$1.ItemProps & import("react").RefAttributes<HTMLLIElement>>;
|
|
36
|
+
ItemDeleteTrigger: import("react").ForwardRefExoticComponent<FileUpload$1.ItemDeleteTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
37
|
+
ItemGroup: import("react").ForwardRefExoticComponent<FileUpload$1.ItemGroupProps & import("react").RefAttributes<HTMLUListElement>>;
|
|
38
|
+
ItemName: import("react").ForwardRefExoticComponent<FileUpload$1.ItemNameProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
39
|
+
ItemPreview: import("react").ForwardRefExoticComponent<FileUpload$1.ItemPreviewProps & import("react").RefAttributes<HTMLImageElement>>;
|
|
40
|
+
ItemPreviewImage: import("react").ForwardRefExoticComponent<FileUpload$1.ItemPreviewImageProps & import("react").RefAttributes<HTMLImageElement>>;
|
|
41
|
+
ItemSizeText: import("react").ForwardRefExoticComponent<FileUpload$1.ItemSizeTextProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
42
|
+
Label: import("react").ForwardRefExoticComponent<FileUpload$1.LabelProps & import("react").RefAttributes<HTMLLabelElement>>;
|
|
43
|
+
RootProvider: import("react").ForwardRefExoticComponent<FileUpload$1.RootProviderProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
24
44
|
};
|
|
25
45
|
//#endregion
|
|
@@ -1,10 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { t as iconNode } from "../../icon-BALgGtNK.mjs";
|
|
2
|
+
import { t as useElementId } from "../../id-C37UYLwJ.mjs";
|
|
3
|
+
import { injectComponentStyle } from "@bysages/core/styling";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
5
|
import { FileUpload as FileUpload$1 } from "@ark-ui/react/file-upload";
|
|
4
6
|
//#region src/components/file-upload/index.tsx
|
|
5
|
-
function FileUploadRoot(
|
|
7
|
+
function FileUploadRoot(props) {
|
|
8
|
+
const id = useElementId("file-upload", props);
|
|
9
|
+
const { size = "md", ...rest } = props;
|
|
6
10
|
return /* @__PURE__ */ jsx(FileUpload$1.Root, {
|
|
7
11
|
...rest,
|
|
12
|
+
id,
|
|
8
13
|
"data-size": size
|
|
9
14
|
});
|
|
10
15
|
}
|
|
@@ -26,17 +31,48 @@ function FileUploadTrigger(props) {
|
|
|
26
31
|
})
|
|
27
32
|
});
|
|
28
33
|
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
const fileIcon = iconNode("file", {
|
|
35
|
+
width: 16,
|
|
36
|
+
height: 16
|
|
37
|
+
});
|
|
38
|
+
const uploadIcon = iconNode("upload", {
|
|
39
|
+
width: 28,
|
|
40
|
+
height: 28
|
|
41
|
+
});
|
|
42
|
+
const closeIcon = iconNode("x", {
|
|
43
|
+
width: 14,
|
|
44
|
+
height: 14
|
|
45
|
+
});
|
|
46
|
+
/** The one-tag path: a labelled dropzone and its accepted slips; MIME
|
|
47
|
+
* rules, directories, and controlled files stay on the anatomy. */
|
|
48
|
+
function FileUploadFacade({ label, placeholder, disabled = false, invalid = false, required = false, maxFiles, size = "md" }) {
|
|
49
|
+
return /* @__PURE__ */ jsxs(FileUploadRoot, {
|
|
50
|
+
size,
|
|
51
|
+
disabled,
|
|
52
|
+
invalid,
|
|
53
|
+
required,
|
|
54
|
+
maxFiles,
|
|
55
|
+
children: [
|
|
56
|
+
label ? /* @__PURE__ */ jsx(FileUpload$1.Label, { children: label }) : null,
|
|
57
|
+
/* @__PURE__ */ jsx(FileUpload$1.Dropzone, { children: /* @__PURE__ */ jsxs(FileUploadTrigger, { children: [uploadIcon, placeholder ?? "Choose files"] }) }),
|
|
58
|
+
/* @__PURE__ */ jsx(FileUpload$1.ItemGroup, { children: /* @__PURE__ */ jsx(FileUpload$1.Context, { children: (api) => api.acceptedFiles.map((file) => /* @__PURE__ */ jsxs(FileUpload$1.Item, {
|
|
59
|
+
file,
|
|
60
|
+
children: [
|
|
61
|
+
/* @__PURE__ */ jsx(FileUpload$1.ItemPreview, { children: fileIcon }),
|
|
62
|
+
/* @__PURE__ */ jsx(FileUpload$1.ItemName, {}),
|
|
63
|
+
/* @__PURE__ */ jsx(FileUpload$1.ItemSizeText, {}),
|
|
64
|
+
/* @__PURE__ */ jsx(FileUpload$1.ItemDeleteTrigger, { children: closeIcon })
|
|
65
|
+
]
|
|
66
|
+
}, file.name)) }) }),
|
|
67
|
+
/* @__PURE__ */ jsx(FileUpload$1.HiddenInput, {})
|
|
68
|
+
]
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
const FileUpload = Object.assign(FileUploadFacade, {
|
|
36
72
|
...FileUpload$1,
|
|
37
73
|
Root: FileUploadRoot,
|
|
38
74
|
Trigger: FileUploadTrigger
|
|
39
|
-
};
|
|
75
|
+
});
|
|
40
76
|
injectComponentStyle("file-upload");
|
|
41
77
|
//#endregion
|
|
42
78
|
export { FileUpload };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as useComponentMessages } from "../../messages-1jJWtaYU.mjs";
|
|
2
2
|
import { Button } from "../button/index.mjs";
|
|
3
|
-
import { injectComponentStyle } from "@bysages/core";
|
|
3
|
+
import { injectComponentStyle } from "@bysages/core/styling";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
import { createContext, useContext, useState } from "react";
|
|
6
6
|
//#region src/components/float-button/index.tsx
|
|
@@ -1,9 +1,21 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
1
2
|
import { FloatingPanel as FloatingPanel$1 } from "@ark-ui/react/floating-panel";
|
|
2
3
|
//#region src/components/floating-panel/index.d.ts
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
export interface FloatingPanelFacadeProps {
|
|
5
|
+
open?: boolean;
|
|
6
|
+
defaultOpen?: boolean;
|
|
7
|
+
trigger?: string;
|
|
8
|
+
content?: string;
|
|
9
|
+
label: string;
|
|
10
|
+
description?: string;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
children?: ReactNode;
|
|
13
|
+
onOpenChange?: (open: boolean) => void;
|
|
14
|
+
}
|
|
15
|
+
declare function FloatingPanelFacade({ open, defaultOpen, trigger, content, label, description, disabled, children, onOpenChange }: FloatingPanelFacadeProps): import("react").JSX.Element;
|
|
16
|
+
declare namespace FloatingPanelFacade {
|
|
17
|
+
var displayName: string;
|
|
18
|
+
}
|
|
19
|
+
type FloatingPanelParts = typeof FloatingPanel$1;
|
|
20
|
+
export declare const FloatingPanel: typeof FloatingPanelFacade & FloatingPanelParts;
|
|
9
21
|
//#endregion
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as iconNode } from "../../icon-BALgGtNK.mjs";
|
|
2
|
+
import { t as useElementId } from "../../id-C37UYLwJ.mjs";
|
|
3
|
+
import { injectComponentStyle } from "@bysages/core/styling";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
5
|
import { FloatingPanel as FloatingPanel$1 } from "@ark-ui/react/floating-panel";
|
|
3
6
|
//#region src/components/floating-panel/index.tsx
|
|
4
7
|
/** Ark's FloatingPanel, dressed in the paper-and-ink system: the shared
|
|
@@ -6,7 +9,58 @@ import { FloatingPanel as FloatingPanel$1 } from "@ark-ui/react/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);
|
|
14
|
+
return /* @__PURE__ */ jsx(FloatingPanel$1.Root, {
|
|
15
|
+
...props,
|
|
16
|
+
id
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
const resizeAxes = [
|
|
20
|
+
"n",
|
|
21
|
+
"e",
|
|
22
|
+
"s",
|
|
23
|
+
"w",
|
|
24
|
+
"ne",
|
|
25
|
+
"se",
|
|
26
|
+
"sw",
|
|
27
|
+
"nw"
|
|
28
|
+
];
|
|
29
|
+
function FloatingPanelFacade({ open, defaultOpen, trigger, content, label, description, disabled = false, children, onOpenChange }) {
|
|
30
|
+
return /* @__PURE__ */ jsxs(FloatingPanelRoot, {
|
|
31
|
+
disabled,
|
|
32
|
+
...open === void 0 ? {} : { open },
|
|
33
|
+
...defaultOpen === void 0 ? {} : { defaultOpen },
|
|
34
|
+
onOpenChange: (details) => onOpenChange?.(details.open),
|
|
35
|
+
children: [/* @__PURE__ */ jsx(FloatingPanel$1.Trigger, { children: trigger ?? label }), /* @__PURE__ */ jsx(FloatingPanel$1.Positioner, { children: /* @__PURE__ */ jsxs(FloatingPanel$1.Content, { children: [
|
|
36
|
+
/* @__PURE__ */ jsx(FloatingPanel$1.DragTrigger, { children: /* @__PURE__ */ jsxs(FloatingPanel$1.Header, { children: [/* @__PURE__ */ jsx(FloatingPanel$1.Title, { children: label }), /* @__PURE__ */ jsxs(FloatingPanel$1.Control, { children: [
|
|
37
|
+
/* @__PURE__ */ jsx(FloatingPanel$1.StageTrigger, {
|
|
38
|
+
stage: "minimized",
|
|
39
|
+
children: iconNode("minus")
|
|
40
|
+
}),
|
|
41
|
+
/* @__PURE__ */ jsx(FloatingPanel$1.StageTrigger, {
|
|
42
|
+
stage: "maximized",
|
|
43
|
+
children: iconNode("maximize-2")
|
|
44
|
+
}),
|
|
45
|
+
/* @__PURE__ */ jsx(FloatingPanel$1.CloseTrigger, {
|
|
46
|
+
"aria-label": "Close",
|
|
47
|
+
children: iconNode("x")
|
|
48
|
+
})
|
|
49
|
+
] })] }) }),
|
|
50
|
+
/* @__PURE__ */ jsxs(FloatingPanel$1.Body, { children: [
|
|
51
|
+
description ? /* @__PURE__ */ jsx("p", { children: description }) : null,
|
|
52
|
+
content ? /* @__PURE__ */ jsx("p", { children: content }) : null,
|
|
53
|
+
children
|
|
54
|
+
] }),
|
|
55
|
+
resizeAxes.map((axis) => /* @__PURE__ */ jsx(FloatingPanel$1.ResizeTrigger, { axis }, axis))
|
|
56
|
+
] }) })]
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
FloatingPanelFacade.displayName = "SFloatingPanel";
|
|
60
|
+
const FloatingPanel = Object.assign(FloatingPanelFacade, {
|
|
61
|
+
...FloatingPanel$1,
|
|
62
|
+
Root: FloatingPanelRoot
|
|
63
|
+
});
|
|
10
64
|
injectComponentStyle("floating-panel");
|
|
11
65
|
//#endregion
|
|
12
66
|
export { FloatingPanel };
|
|
@@ -1,2 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { FocusTrapBaseProps, FocusTrapProps } from "@ark-ui/react/focus-trap";
|
|
2
|
+
//#region src/components/focus-trap/index.d.ts
|
|
3
|
+
export declare const FocusTrap: import("react").ForwardRefExoticComponent<import("@ark-ui/react/focus-trap").FocusTrapProps & import("react").RefAttributes<HTMLDivElement>> & {
|
|
4
|
+
Root: import("react").ForwardRefExoticComponent<import("@ark-ui/react/focus-trap").FocusTrapProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
5
|
+
};
|
|
6
|
+
//#endregion
|
|
7
|
+
export type { FocusTrapBaseProps, FocusTrapProps };
|
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as withSelfRoot } from "../../family-DE_GQeeM.mjs";
|
|
2
|
+
import { FocusTrap as FocusTrap$1 } from "@ark-ui/react/focus-trap";
|
|
3
|
+
//#region src/components/focus-trap/index.tsx
|
|
4
|
+
const FocusTrap = withSelfRoot(FocusTrap$1);
|
|
5
|
+
//#endregion
|
|
2
6
|
export { FocusTrap };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as useField, c as FieldApi, i as FormProps, n as FormField, o as useForm, r as FormFieldProps, s as FormApi, t as Form } from "../../index-
|
|
1
|
+
import { a as useField, c as FieldApi, i as FormProps, n as FormField, o as useForm, r as FormFieldProps, s as FormApi, t as Form } from "../../index-PsgGWW3m.mjs";
|
|
2
2
|
export { type FieldApi, Form, type FormApi, FormField, FormFieldProps, FormProps, useField, useForm };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as withSelfRoot } from "../../family-DE_GQeeM.mjs";
|
|
2
|
+
import { injectComponentStyle } from "@bysages/core/styling";
|
|
2
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
4
|
import { createContext, useContext } from "react";
|
|
4
5
|
import { Field } from "@ark-ui/react/field";
|
|
@@ -13,7 +14,7 @@ function errorText(error) {
|
|
|
13
14
|
if (typeof error === "object" && "message" in error) return String(error.message);
|
|
14
15
|
return "";
|
|
15
16
|
}
|
|
16
|
-
function
|
|
17
|
+
function FormImpl({ form, children, ...rest }) {
|
|
17
18
|
injectComponentStyle("form");
|
|
18
19
|
injectComponentStyle("field");
|
|
19
20
|
return /* @__PURE__ */ jsx(FormContext.Provider, {
|
|
@@ -31,7 +32,8 @@ function Form({ form, children, ...rest }) {
|
|
|
31
32
|
})
|
|
32
33
|
});
|
|
33
34
|
}
|
|
34
|
-
|
|
35
|
+
const Form = withSelfRoot(FormImpl);
|
|
36
|
+
function FormFieldImpl({ form: formProp, name, label, hint, required = false, invalid = false, disabled = false, children, ...rest }) {
|
|
35
37
|
const injected = useContext(FormContext);
|
|
36
38
|
const form = formProp ?? injected;
|
|
37
39
|
const { className: klass, style, ...fieldOptions } = rest;
|
|
@@ -63,5 +65,6 @@ function FormField({ form: formProp, name, label, hint, required = false, invali
|
|
|
63
65
|
children: assemble
|
|
64
66
|
});
|
|
65
67
|
}
|
|
68
|
+
const FormField = withSelfRoot(FormFieldImpl);
|
|
66
69
|
//#endregion
|
|
67
70
|
export { Form, FormField, useField, useForm };
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
+
import { FrameProps } from "@ark-ui/react/frame";
|
|
1
2
|
//#region src/components/frame/index.d.ts
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
* through that prop. The frame measures its content and grows to
|
|
6
|
-
* fit; the vessel's border and paper belong to the consumer, since
|
|
7
|
-
* an iframe carries no anatomy attributes for the core stylesheet
|
|
8
|
-
* to hook. The API is Ark's own. */
|
|
9
|
-
export declare const Frame: import("react").ForwardRefExoticComponent<import("@ark-ui/react/frame").FrameProps & import("react").RefAttributes<HTMLIFrameElement>>;
|
|
3
|
+
export declare const Frame: import("react").ForwardRefExoticComponent<FrameProps & import("react").RefAttributes<HTMLIFrameElement>> & {
|
|
4
|
+
Root: import("react").ForwardRefExoticComponent<FrameProps & import("react").RefAttributes<HTMLIFrameElement>>;
|
|
5
|
+
};
|
|
10
6
|
//#endregion
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import { t as useElementId } from "../../id-C37UYLwJ.mjs";
|
|
2
|
+
import { t as withSelfRoot } from "../../family-DE_GQeeM.mjs";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { forwardRef } from "react";
|
|
1
5
|
import { Frame as Frame$1 } from "@ark-ui/react/frame";
|
|
2
6
|
//#region src/components/frame/index.tsx
|
|
3
7
|
/** Ark's Frame, dressed in the paper-and-ink system: a sandboxed
|
|
@@ -7,6 +11,14 @@ import { Frame as Frame$1 } from "@ark-ui/react/frame";
|
|
|
7
11
|
* fit; the vessel's border and paper belong to the consumer, since
|
|
8
12
|
* an iframe carries no anatomy attributes for the core stylesheet
|
|
9
13
|
* to hook. The API is Ark's own. */
|
|
10
|
-
const
|
|
14
|
+
const FrameRoot = forwardRef(function FrameRoot(props, ref) {
|
|
15
|
+
const id = useElementId("frame", props);
|
|
16
|
+
return /* @__PURE__ */ jsx(Frame$1, {
|
|
17
|
+
ref,
|
|
18
|
+
...props,
|
|
19
|
+
id
|
|
20
|
+
});
|
|
21
|
+
});
|
|
22
|
+
const Frame = withSelfRoot(FrameRoot);
|
|
11
23
|
//#endregion
|
|
12
24
|
export { Frame };
|
|
@@ -9,5 +9,8 @@ export interface GridProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
9
9
|
* and the container decides how many fit. */
|
|
10
10
|
minChildWidth?: string;
|
|
11
11
|
}
|
|
12
|
-
|
|
12
|
+
declare function GridImpl({ columns, gap, minChildWidth, ...rest }: GridProps): import("react").JSX.Element;
|
|
13
|
+
export declare const Grid: typeof GridImpl & {
|
|
14
|
+
Root: typeof GridImpl;
|
|
15
|
+
};
|
|
13
16
|
//#endregion
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as withSelfRoot } from "../../family-DE_GQeeM.mjs";
|
|
2
|
+
import { injectComponentStyle } from "@bysages/core/styling";
|
|
2
3
|
import { jsx } from "react/jsx-runtime";
|
|
3
4
|
//#region src/components/grid/index.tsx
|
|
4
5
|
/** The same named steps of the space ramp the stack uses — one
|
|
@@ -11,7 +12,7 @@ const gapVars = {
|
|
|
11
12
|
lg: "var(--bs-gap-lg)",
|
|
12
13
|
xl: "var(--bs-gap-xl)"
|
|
13
14
|
};
|
|
14
|
-
function
|
|
15
|
+
function GridImpl({ columns = 12, gap = "md", minChildWidth, ...rest }) {
|
|
15
16
|
injectComponentStyle("grid");
|
|
16
17
|
const style = {
|
|
17
18
|
...rest.style,
|
|
@@ -27,5 +28,6 @@ function Grid({ columns = 12, gap = "md", minChildWidth, ...rest }) {
|
|
|
27
28
|
"data-autofill": minChildWidth != null ? "" : void 0
|
|
28
29
|
});
|
|
29
30
|
}
|
|
31
|
+
const Grid = withSelfRoot(GridImpl);
|
|
30
32
|
//#endregion
|
|
31
33
|
export { Grid };
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
//#region src/components/highlight/index.d.ts
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
* document-wide mark default carries the look. The API is Ark's own. */
|
|
6
|
-
export declare const Highlight: (props: import("@ark-ui/react/highlight").HighlightProps) => import("react").JSX.Element;
|
|
2
|
+
export declare const Highlight: ((props: import("@ark-ui/react/highlight").HighlightProps) => import("react").JSX.Element) & {
|
|
3
|
+
Root: (props: import("@ark-ui/react/highlight").HighlightProps) => import("react").JSX.Element;
|
|
4
|
+
};
|
|
7
5
|
//#endregion
|
|
@@ -1,11 +1,16 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as withSelfRoot } from "../../family-DE_GQeeM.mjs";
|
|
2
|
+
import { injectComponentStyle } from "@bysages/core/styling";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
4
|
import { Highlight as Highlight$1 } from "@ark-ui/react/highlight";
|
|
3
5
|
//#region src/components/highlight/index.tsx
|
|
4
6
|
/** Ark's Highlight, dressed in the paper-and-ink system: query hits are
|
|
5
7
|
* strokes of pigment on the page — a quiet tint of the accent behind the
|
|
6
8
|
* ink, never neon. The component renders bare <mark> elements, so the
|
|
7
9
|
* document-wide mark default carries the look. The API is Ark's own. */
|
|
8
|
-
|
|
10
|
+
function HighlightRoot(props) {
|
|
11
|
+
return /* @__PURE__ */ jsx(Highlight$1, { ...props });
|
|
12
|
+
}
|
|
13
|
+
const Highlight = withSelfRoot(HighlightRoot);
|
|
9
14
|
injectComponentStyle("highlight");
|
|
10
15
|
//#endregion
|
|
11
16
|
export { Highlight };
|
|
@@ -1,7 +1,23 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
1
2
|
import { HoverCard as HoverCard$1 } from "@ark-ui/react/hover-card";
|
|
2
3
|
//#region src/components/hover-card/index.d.ts
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
type HoverCardPlacement = "top" | "top-start" | "top-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end" | "right" | "right-start" | "right-end";
|
|
5
|
+
export interface HoverCardFacadeProps {
|
|
6
|
+
open?: boolean;
|
|
7
|
+
defaultOpen?: boolean;
|
|
8
|
+
trigger: string;
|
|
9
|
+
content?: string;
|
|
10
|
+
label: string;
|
|
11
|
+
description?: string;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
placement?: HoverCardPlacement;
|
|
14
|
+
children?: ReactNode;
|
|
15
|
+
onOpenChange?: (open: boolean) => void;
|
|
16
|
+
}
|
|
17
|
+
declare function HoverCardFacade({ open, defaultOpen, trigger, content, label, description, disabled, placement, children, onOpenChange }: HoverCardFacadeProps): import("react").JSX.Element;
|
|
18
|
+
declare namespace HoverCardFacade {
|
|
19
|
+
var displayName: string;
|
|
20
|
+
}
|
|
21
|
+
type HoverCardParts = typeof HoverCard$1;
|
|
22
|
+
export declare const HoverCard: typeof HoverCardFacade & HoverCardParts;
|
|
7
23
|
//#endregion
|
|
@@ -1,10 +1,41 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as useElementId } from "../../id-C37UYLwJ.mjs";
|
|
2
|
+
import { injectComponentStyle } from "@bysages/core/styling";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
4
|
import { HoverCard as HoverCard$1 } from "@ark-ui/react/hover-card";
|
|
3
5
|
//#region src/components/hover-card/index.tsx
|
|
4
6
|
/** Ark's HoverCard, dressed in the paper-and-ink system: a preview card
|
|
5
7
|
* that dissolves in over a quiet inline link, never stealing focus. The
|
|
6
8
|
* API is Ark's own — Root, Trigger, Positioner, Content, Arrow, ArrowTip. */
|
|
7
|
-
|
|
9
|
+
function HoverCardRoot(props) {
|
|
10
|
+
const id = useElementId("hover-card", props);
|
|
11
|
+
return /* @__PURE__ */ jsx(HoverCard$1.Root, {
|
|
12
|
+
...props,
|
|
13
|
+
id
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
function HoverCardFacade({ open, defaultOpen, trigger, content, label, description, disabled = false, placement, children, onOpenChange }) {
|
|
17
|
+
return /* @__PURE__ */ jsxs(HoverCardRoot, {
|
|
18
|
+
...placement === void 0 ? {} : { positioning: { placement } },
|
|
19
|
+
...open === void 0 ? {} : { open },
|
|
20
|
+
...defaultOpen === void 0 ? {} : { defaultOpen },
|
|
21
|
+
onOpenChange: (details) => onOpenChange?.(details.open),
|
|
22
|
+
children: [/* @__PURE__ */ jsx(HoverCard$1.Trigger, {
|
|
23
|
+
disabled,
|
|
24
|
+
children: trigger
|
|
25
|
+
}), /* @__PURE__ */ jsx(HoverCard$1.Positioner, { children: /* @__PURE__ */ jsxs(HoverCard$1.Content, { children: [
|
|
26
|
+
/* @__PURE__ */ jsx(HoverCard$1.Arrow, { children: /* @__PURE__ */ jsx(HoverCard$1.ArrowTip, {}) }),
|
|
27
|
+
/* @__PURE__ */ jsx("h3", { children: label }),
|
|
28
|
+
description ? /* @__PURE__ */ jsx("p", { children: description }) : null,
|
|
29
|
+
content ? /* @__PURE__ */ jsx("p", { children: content }) : null,
|
|
30
|
+
children
|
|
31
|
+
] }) })]
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
HoverCardFacade.displayName = "SHoverCard";
|
|
35
|
+
const HoverCard = Object.assign(HoverCardFacade, {
|
|
36
|
+
...HoverCard$1,
|
|
37
|
+
Root: HoverCardRoot
|
|
38
|
+
});
|
|
8
39
|
injectComponentStyle("hover-card");
|
|
9
40
|
//#endregion
|
|
10
41
|
export { HoverCard };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { HTMLAttributes } from "react";
|
|
2
1
|
import { IconifyIcon } from "@bysages/core/icons";
|
|
2
|
+
import { HTMLAttributes } from "react";
|
|
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 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,14 @@ export interface IconProps extends 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
|
-
|
|
22
|
+
declare function IconImpl({ size, label, glyph, name, children, ...rest }: IconProps): import("react").JSX.Element;
|
|
23
|
+
export declare const Icon: typeof IconImpl & {
|
|
24
|
+
Root: typeof IconImpl;
|
|
25
|
+
};
|
|
24
26
|
//#endregion
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { t as withSelfRoot } from "../../family-DE_GQeeM.mjs";
|
|
2
|
+
import { injectComponentStyle } from "@bysages/core/styling";
|
|
3
3
|
import { getIcon } from "@bysages/core/icons";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
5
|
//#region src/components/icon/index.tsx
|
|
5
|
-
function
|
|
6
|
+
function IconImpl({ size = "inherit", label, glyph, name, children, ...rest }) {
|
|
6
7
|
injectComponentStyle("icon");
|
|
7
8
|
const resolved = glyph ?? (name && children == null ? getIcon(name) : void 0);
|
|
8
|
-
if (name && children == null && glyph == null && !resolved) console.error(`[icons] unknown icon name "${name}" — not in the
|
|
9
|
+
if (name && children == null && glyph == null && !resolved) console.error(`[icons] unknown icon name "${name}" — not in the core default registry; pass it explicitly as glyph`);
|
|
9
10
|
return /* @__PURE__ */ jsx("span", {
|
|
10
11
|
...rest,
|
|
11
12
|
role: label != null ? "img" : void 0,
|
|
@@ -22,5 +23,6 @@ function Icon({ size = "inherit", label, glyph, name, children, ...rest }) {
|
|
|
22
23
|
}) : null)
|
|
23
24
|
});
|
|
24
25
|
}
|
|
26
|
+
const Icon = withSelfRoot(IconImpl);
|
|
25
27
|
//#endregion
|
|
26
28
|
export { Icon };
|
|
@@ -2,7 +2,7 @@ import { HTMLAttributes, ReactNode } from "react";
|
|
|
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` — or the placeholder
|
|
5
|
+
* source leaves the `fallback` — 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 Omit<HTMLAttributes<HTMLElement>, "onError" | "onLoad"> {
|
|
@@ -19,5 +19,8 @@ export interface ImageProps extends Omit<HTMLAttributes<HTMLElement>, "onError"
|
|
|
19
19
|
/** Shown in place of the picture when the source breaks. */
|
|
20
20
|
fallback?: ReactNode;
|
|
21
21
|
}
|
|
22
|
-
|
|
22
|
+
declare function ImageImpl({ src, alt, fit, loading, width, height, fallback, ...rest }: ImageProps): import("react").JSX.Element;
|
|
23
|
+
export declare const Image: typeof ImageImpl & {
|
|
24
|
+
Root: typeof ImageImpl;
|
|
25
|
+
};
|
|
23
26
|
//#endregion
|