@bysages/react 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-jZy-0Tvv.mjs → ai-response-B4DX7nmJ.mjs} +10 -4
- package/dist/chevron-a2nIZKN4.mjs +6 -0
- package/dist/components/accordion/index.d.mts +22 -4
- package/dist/components/accordion/index.mjs +31 -1
- package/dist/components/affix/index.d.mts +4 -1
- package/dist/components/affix/index.mjs +5 -3
- package/dist/components/ai/index.d.mts +2 -2
- package/dist/components/ai/index.mjs +29 -12
- package/dist/components/ai-action/index.d.mts +4 -1
- package/dist/components/ai-action/index.mjs +3 -1
- package/dist/components/ai-attachments/index.d.mts +10 -4
- package/dist/components/ai-attachments/index.mjs +19 -45
- package/dist/components/ai-message/index.d.mts +4 -1
- package/dist/components/ai-message/index.mjs +3 -1
- package/dist/components/ai-prompt-input/index.d.mts +5 -2
- package/dist/components/ai-prompt-input/index.mjs +17 -17
- package/dist/components/ai-reasoning/index.d.mts +4 -1
- package/dist/components/ai-reasoning/index.mjs +4 -2
- package/dist/components/ai-response/index.d.mts +8 -3
- 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 +5 -2
- package/dist/components/ai-suggestion/index.d.mts +4 -1
- package/dist/components/ai-suggestion/index.mjs +3 -1
- package/dist/components/ai-tool/index.d.mts +4 -1
- package/dist/components/ai-tool/index.mjs +4 -2
- package/dist/components/alert/index.d.mts +2 -0
- package/dist/components/alert/index.mjs +11 -18
- package/dist/components/angle-slider/index.d.mts +19 -2
- package/dist/components/angle-slider/index.mjs +31 -8
- package/dist/components/aspect-ratio/index.d.mts +4 -1
- package/dist/components/aspect-ratio/index.mjs +3 -1
- package/dist/components/autocomplete/index.d.mts +3 -1
- package/dist/components/autocomplete/index.mjs +9 -2
- package/dist/components/avatar/index.d.mts +2 -2
- package/dist/components/avatar/index.mjs +9 -2
- package/dist/components/avatar-group/index.d.mts +4 -1
- package/dist/components/avatar-group/index.mjs +3 -1
- package/dist/components/back-top/index.d.mts +7 -1
- package/dist/components/back-top/index.mjs +12 -17
- package/dist/components/badge/index.d.mts +4 -1
- package/dist/components/badge/index.mjs +3 -1
- package/dist/components/banner/index.mjs +13 -18
- package/dist/components/block-ui/index.d.mts +4 -1
- package/dist/components/block-ui/index.mjs +3 -1
- package/dist/components/breadcrumb/index.d.mts +3 -8
- package/dist/components/breadcrumb/index.mjs +11 -1
- package/dist/components/button/index.d.mts +4 -1
- package/dist/components/button/index.mjs +3 -1
- package/dist/components/calendar/index.d.mts +3 -1
- package/dist/components/calendar/index.mjs +9 -10
- package/dist/components/carousel/index.d.mts +21 -1
- package/dist/components/carousel/index.mjs +43 -2
- package/dist/components/cascade-select/index.d.mts +6 -1
- package/dist/components/cascade-select/index.mjs +18 -37
- package/dist/components/checkbox/index.d.mts +20 -2
- package/dist/components/checkbox/index.mjs +28 -8
- package/dist/components/checkbox-group/index.d.mts +8 -6
- package/dist/components/checkbox-group/index.mjs +44 -48
- package/dist/components/chip/index.d.mts +4 -1
- package/dist/components/chip/index.mjs +3 -1
- 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 +33 -5
- package/dist/components/collapsible/index.d.mts +16 -4
- package/dist/components/collapsible/index.mjs +25 -1
- package/dist/components/color-picker/index.d.mts +20 -4
- package/dist/components/color-picker/index.mjs +56 -14
- package/dist/components/combobox/index.d.mts +27 -1
- package/dist/components/combobox/index.mjs +62 -5
- package/dist/components/command/index.d.mts +4 -1
- package/dist/components/command/index.mjs +15 -3
- package/dist/components/comment/index.d.mts +4 -1
- package/dist/components/comment/index.mjs +3 -1
- package/dist/components/config-provider/index.d.mts +8 -2
- package/dist/components/config-provider/index.mjs +5 -2
- package/dist/components/container/index.d.mts +4 -1
- package/dist/components/container/index.mjs +3 -1
- package/dist/components/data-view/index.d.mts +4 -1
- package/dist/components/data-view/index.mjs +7 -3
- package/dist/components/date-input/index.d.mts +19 -4
- package/dist/components/date-input/index.mjs +33 -9
- package/dist/components/date-picker/index.d.mts +21 -4
- package/dist/components/date-picker/index.mjs +58 -11
- package/dist/components/deferred-content/index.d.mts +4 -1
- package/dist/components/deferred-content/index.mjs +3 -1
- package/dist/components/descriptions/index.d.mts +10 -2
- package/dist/components/descriptions/index.mjs +13 -8
- package/dist/components/dialog/index.d.mts +18 -5
- package/dist/components/dialog/index.mjs +43 -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 +40 -1
- package/dist/components/dynamic-input/index.d.mts +4 -1
- package/dist/components/dynamic-input/index.mjs +13 -19
- package/dist/components/editable/index.d.mts +28 -7
- package/dist/components/editable/index.mjs +43 -4
- package/dist/components/ellipsis/index.d.mts +4 -1
- package/dist/components/ellipsis/index.mjs +3 -1
- package/dist/components/field/index.d.mts +30 -5
- package/dist/components/field/index.mjs +36 -3
- package/dist/components/fieldset/index.d.mts +19 -4
- package/dist/components/fieldset/index.mjs +28 -3
- package/dist/components/file-upload/index.d.mts +36 -9
- package/dist/components/file-upload/index.mjs +66 -11
- package/dist/components/float-button/index.mjs +3 -1
- package/dist/components/floating-panel/index.d.mts +18 -6
- package/dist/components/floating-panel/index.mjs +55 -1
- 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 +5 -2
- 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 +3 -1
- package/dist/components/highlight/index.d.mts +3 -5
- package/dist/components/highlight/index.mjs +6 -1
- package/dist/components/hover-card/index.d.mts +20 -4
- package/dist/components/hover-card/index.mjs +32 -1
- package/dist/components/icon/index.d.mts +10 -8
- package/dist/components/icon/index.mjs +5 -3
- package/dist/components/image/index.d.mts +11 -2
- package/dist/components/image/index.mjs +16 -29
- package/dist/components/image-cropper/index.d.mts +13 -2
- package/dist/components/image-cropper/index.mjs +34 -2
- package/dist/components/image-viewer/index.d.mts +2 -18
- package/dist/components/image-viewer/index.mjs +3 -109
- 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 +20 -4
- package/dist/components/json-tree-view/index.mjs +38 -4
- package/dist/components/kbd/index.d.mts +4 -1
- package/dist/components/kbd/index.mjs +3 -1
- package/dist/components/layout/index.d.mts +25 -7
- package/dist/components/layout/index.mjs +159 -63
- package/dist/components/link/index.d.mts +4 -1
- package/dist/components/link/index.mjs +3 -1
- package/dist/components/list/index.d.mts +5 -4
- package/dist/components/list/index.mjs +10 -1
- package/dist/components/listbox/index.d.mts +22 -1
- package/dist/components/listbox/index.mjs +36 -4
- package/dist/components/marquee/index.d.mts +18 -1
- package/dist/components/marquee/index.mjs +34 -2
- package/dist/components/masonry/index.d.mts +4 -1
- package/dist/components/masonry/index.mjs +3 -1
- 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 +34 -12
- package/dist/components/menubar/index.d.mts +3 -1
- package/dist/components/menubar/index.mjs +7 -1
- package/dist/components/navigation-menu/index.d.mts +25 -1
- package/dist/components/navigation-menu/index.mjs +36 -1
- package/dist/components/number-input/index.d.mts +28 -6
- package/dist/components/number-input/index.mjs +33 -8
- package/dist/components/order-list/index.d.mts +4 -1
- package/dist/components/order-list/index.mjs +34 -33
- package/dist/components/pagination/index.d.mts +23 -3
- package/dist/components/pagination/index.mjs +57 -12
- package/dist/components/password-input/index.d.mts +24 -6
- package/dist/components/password-input/index.mjs +31 -8
- package/dist/components/pin-input/index.d.mts +23 -5
- package/dist/components/pin-input/index.mjs +29 -7
- package/dist/components/popconfirm/index.d.mts +9 -5
- package/dist/components/popconfirm/index.mjs +23 -18
- package/dist/components/popover/index.d.mts +2 -8
- package/dist/components/popover/index.mjs +44 -4
- 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 +34 -9
- package/dist/components/progress-group/index.d.mts +4 -1
- package/dist/components/progress-group/index.mjs +4 -2
- package/dist/components/qr-code/index.d.mts +14 -1
- package/dist/components/qr-code/index.mjs +26 -2
- package/dist/components/radio-group/index.d.mts +27 -2
- package/dist/components/radio-group/index.mjs +32 -8
- package/dist/components/rating-group/index.d.mts +20 -3
- package/dist/components/rating-group/index.mjs +26 -8
- package/dist/components/result/index.d.mts +1 -1
- package/dist/components/result/index.mjs +2 -2
- package/dist/components/scroll-area/index.d.mts +14 -1
- package/dist/components/scroll-area/index.mjs +32 -2
- package/dist/components/segment-group/index.d.mts +28 -2
- package/dist/components/segment-group/index.mjs +34 -7
- 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 +3 -1
- package/dist/components/signature-pad/index.d.mts +25 -5
- package/dist/components/signature-pad/index.mjs +37 -3
- package/dist/components/skeleton/index.d.mts +4 -1
- package/dist/components/skeleton/index.mjs +3 -1
- package/dist/components/slider/index.d.mts +21 -2
- package/dist/components/slider/index.mjs +31 -8
- package/dist/components/spinner/index.d.mts +4 -1
- package/dist/components/spinner/index.mjs +6 -2
- package/dist/components/split-button/index.d.mts +3 -1
- package/dist/components/split-button/index.mjs +15 -18
- package/dist/components/splitter/index.d.mts +17 -4
- package/dist/components/splitter/index.mjs +35 -1
- package/dist/components/spotlight/index.d.mts +4 -1
- package/dist/components/spotlight/index.mjs +3 -1
- package/dist/components/stack/index.d.mts +4 -1
- package/dist/components/stack/index.mjs +6 -4
- package/dist/components/steps/index.d.mts +27 -3
- package/dist/components/steps/index.mjs +36 -12
- package/dist/components/swap/index.d.mts +11 -5
- package/dist/components/swap/index.mjs +30 -3
- package/dist/components/switch/index.d.mts +20 -2
- package/dist/components/switch/index.mjs +27 -8
- package/dist/components/table/index.d.mts +4 -1
- package/dist/components/table/index.mjs +44 -70
- package/dist/components/tabs/index.d.mts +24 -2
- package/dist/components/tabs/index.mjs +25 -9
- package/dist/components/tags-input/index.d.mts +33 -8
- package/dist/components/tags-input/index.mjs +41 -9
- package/dist/components/terminal/index.d.mts +4 -1
- package/dist/components/terminal/index.mjs +8 -3
- package/dist/components/textarea/index.d.mts +4 -1
- package/dist/components/textarea/index.mjs +3 -1
- package/dist/components/timer/index.d.mts +18 -1
- package/dist/components/timer/index.mjs +51 -2
- package/dist/components/toast/index.d.mts +3 -6
- package/dist/components/toast/index.mjs +22 -2
- package/dist/components/toc/index.d.mts +24 -4
- package/dist/components/toc/index.mjs +41 -3
- package/dist/components/toggle/index.d.mts +11 -4
- package/dist/components/toggle/index.mjs +21 -1
- package/dist/components/toggle-group/index.d.mts +26 -2
- package/dist/components/toggle-group/index.mjs +31 -6
- package/dist/components/toolbar/index.d.mts +4 -1
- package/dist/components/toolbar/index.mjs +3 -1
- package/dist/components/tooltip/index.d.mts +17 -4
- package/dist/components/tooltip/index.mjs +28 -1
- package/dist/components/tour/index.d.mts +18 -9
- package/dist/components/tour/index.mjs +44 -2
- package/dist/components/transfer/index.d.mts +3 -1
- package/dist/components/transfer/index.mjs +20 -30
- package/dist/components/tree-select/index.d.mts +3 -1
- package/dist/components/tree-select/index.mjs +15 -24
- package/dist/components/tree-view/index.d.mts +30 -1
- package/dist/components/tree-view/index.mjs +69 -6
- package/dist/components/typography/index.d.mts +4 -0
- package/dist/components/typography/index.mjs +1 -0
- package/dist/components/user/index.d.mts +4 -1
- package/dist/components/user/index.mjs +3 -1
- package/dist/components/virtual-list/index.d.mts +4 -1
- package/dist/components/virtual-list/index.mjs +11 -12
- package/dist/components/watermark/index.d.mts +4 -1
- package/dist/components/watermark/index.mjs +4 -2
- 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-Cf6thHax.mjs +141 -0
- package/dist/{index-Uefyw7Im.d.mts → index-Bbg4heDO.d.mts} +12 -7
- package/dist/index-BcRdWGY-.d.mts +115 -0
- package/dist/{index-DFN9F5Zt.d.mts → index-D_iKc2Uw.d.mts} +32 -3
- package/dist/{index-CsfxYv6J.d.mts → index-DdNKngUQ.d.mts} +63 -39
- 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 +13 -12
- package/dist/{input-2oezH-dY.mjs → input-C21Zzuy6.mjs} +3 -1
- package/dist/media-player-gQrnxU52.mjs +554 -0
- package/dist/{mentions-DMIBCBOd.mjs → mentions-BuWibdci.mjs} +74 -42
- package/dist/messages-1jJWtaYU.mjs +16 -0
- package/dist/select-ozUFq0zd.mjs +121 -0
- package/package.json +3 -3
- package/dist/chevron-BeHvt46K.mjs +0 -17
- package/dist/select-D1xiT1oJ.mjs +0 -68
|
@@ -1,21 +1,39 @@
|
|
|
1
|
+
import { t as iconNode } from "../../icon-BALgGtNK.mjs";
|
|
2
|
+
import { t as useElementId } from "../../id-C37UYLwJ.mjs";
|
|
1
3
|
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
-
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
5
|
import { RatingGroup as RatingGroup$1 } from "@ark-ui/react/rating-group";
|
|
4
6
|
//#region src/components/rating-group/index.tsx
|
|
5
|
-
function RatingGroupRoot(
|
|
7
|
+
function RatingGroupRoot(props) {
|
|
8
|
+
const id = useElementId("rating-group", props);
|
|
9
|
+
const { size = "md", ...rest } = props;
|
|
6
10
|
return /* @__PURE__ */ jsx(RatingGroup$1.Root, {
|
|
7
11
|
...rest,
|
|
12
|
+
id,
|
|
8
13
|
"data-size": size
|
|
9
14
|
});
|
|
10
15
|
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
+
function RatingGroupFacade({ value, defaultValue = 0, label, count = 5, disabled = false, readOnly = false, size = "md", className, onValueChange }) {
|
|
17
|
+
return /* @__PURE__ */ jsxs(RatingGroupRoot, {
|
|
18
|
+
className,
|
|
19
|
+
size,
|
|
20
|
+
count,
|
|
21
|
+
disabled,
|
|
22
|
+
readOnly,
|
|
23
|
+
defaultValue,
|
|
24
|
+
...value === void 0 ? {} : { value },
|
|
25
|
+
onValueChange: (details) => onValueChange?.(details.value ?? 0),
|
|
26
|
+
children: [label ? /* @__PURE__ */ jsx(RatingGroup$1.Label, { children: label }) : null, /* @__PURE__ */ jsxs(RatingGroup$1.Control, { children: [/* @__PURE__ */ jsx(RatingGroup$1.Context, { children: (api) => api.items.map((item) => /* @__PURE__ */ jsx(RatingGroup$1.Item, {
|
|
27
|
+
index: item,
|
|
28
|
+
children: iconNode("star")
|
|
29
|
+
}, item)) }), /* @__PURE__ */ jsx(RatingGroup$1.HiddenInput, {})] })]
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
RatingGroupFacade.displayName = "SRatingGroup";
|
|
33
|
+
const RatingGroup = Object.assign(RatingGroupFacade, {
|
|
16
34
|
...RatingGroup$1,
|
|
17
35
|
Root: RatingGroupRoot
|
|
18
|
-
};
|
|
36
|
+
});
|
|
19
37
|
injectComponentStyle("rating-group");
|
|
20
38
|
//#endregion
|
|
21
39
|
export { RatingGroup };
|
|
@@ -15,7 +15,7 @@ export declare function ResultIcon({ children, ...rest }: HTMLAttributes<HTMLDiv
|
|
|
15
15
|
/** A verdict drawn after the deed: the mark washes in the fixed
|
|
16
16
|
* pigment, the title rides the serif, and the extra carries the way
|
|
17
17
|
* onward. Any subset composes. */
|
|
18
|
-
export declare const Result: {
|
|
18
|
+
export declare const Result: typeof ResultRoot & {
|
|
19
19
|
Root: typeof ResultRoot;
|
|
20
20
|
Icon: typeof ResultIcon;
|
|
21
21
|
Title: ({ children, ...rest }: HTMLAttributes<HTMLElement> & {
|
|
@@ -48,12 +48,12 @@ function part(name, tag) {
|
|
|
48
48
|
/** A verdict drawn after the deed: the mark washes in the fixed
|
|
49
49
|
* pigment, the title rides the serif, and the extra carries the way
|
|
50
50
|
* onward. Any subset composes. */
|
|
51
|
-
const Result = {
|
|
51
|
+
const Result = Object.assign(ResultRoot, {
|
|
52
52
|
Root: ResultRoot,
|
|
53
53
|
Icon: ResultIcon,
|
|
54
54
|
Title: part("title", "h3"),
|
|
55
55
|
Description: part("description", "p"),
|
|
56
56
|
Extra: part("extra", "div")
|
|
57
|
-
};
|
|
57
|
+
});
|
|
58
58
|
//#endregion
|
|
59
59
|
export { Result, ResultIcon, ResultRoot };
|
|
@@ -1,7 +1,20 @@
|
|
|
1
|
+
import { CSSProperties, ComponentProps, ReactNode } from "react";
|
|
1
2
|
import { ScrollArea as ScrollArea$1 } from "@ark-ui/react/scroll-area";
|
|
2
3
|
//#region src/components/scroll-area/index.d.ts
|
|
3
4
|
/** Ark's ScrollArea, dressed in the paper-and-ink system: native bars
|
|
4
5
|
* give way to quiet ink lanes that surface on hover and scroll. The API
|
|
5
6
|
* is Ark's own — Root, Viewport, Content, Scrollbar, Thumb, Corner. */
|
|
6
|
-
|
|
7
|
+
declare function ScrollAreaRoot(props: ComponentProps<typeof ScrollArea$1.Root>): import("react").JSX.Element;
|
|
8
|
+
type ScrollAreaFacadeProps = {
|
|
9
|
+
orientation?: "vertical" | "horizontal" | "both";
|
|
10
|
+
className?: string;
|
|
11
|
+
style?: CSSProperties;
|
|
12
|
+
children?: ReactNode;
|
|
13
|
+
};
|
|
14
|
+
/** The complete scroll vessel around caller content, with one or both quiet
|
|
15
|
+
* lanes depending on orientation. */
|
|
16
|
+
declare function ScrollAreaFacade(props: ScrollAreaFacadeProps): import("react").JSX.Element;
|
|
17
|
+
export declare const ScrollArea: typeof ScrollAreaFacade & Omit<typeof ScrollArea$1, "Root"> & {
|
|
18
|
+
Root: typeof ScrollAreaRoot;
|
|
19
|
+
};
|
|
7
20
|
//#endregion
|
|
@@ -1,10 +1,40 @@
|
|
|
1
|
+
import { t as useElementId } from "../../id-C37UYLwJ.mjs";
|
|
1
2
|
import { injectComponentStyle } from "@bysages/core";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
4
|
import { ScrollArea as ScrollArea$1 } from "@ark-ui/react/scroll-area";
|
|
3
5
|
//#region src/components/scroll-area/index.tsx
|
|
4
6
|
/** Ark's ScrollArea, dressed in the paper-and-ink system: native bars
|
|
5
7
|
* give way to quiet ink lanes that surface on hover and scroll. The API
|
|
6
8
|
* is Ark's own — Root, Viewport, Content, Scrollbar, Thumb, Corner. */
|
|
7
|
-
|
|
8
|
-
injectComponentStyle("scroll-area");
|
|
9
|
+
function ScrollAreaRoot(props) {
|
|
10
|
+
injectComponentStyle("scroll-area");
|
|
11
|
+
const id = useElementId("scroll-area", props);
|
|
12
|
+
return /* @__PURE__ */ jsx(ScrollArea$1.Root, {
|
|
13
|
+
...props,
|
|
14
|
+
id
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
/** The complete scroll vessel around caller content, with one or both quiet
|
|
18
|
+
* lanes depending on orientation. */
|
|
19
|
+
function ScrollAreaFacade(props) {
|
|
20
|
+
const { orientation = "vertical", className, style, children } = props;
|
|
21
|
+
const orientations = orientation === "both" ? ["vertical", "horizontal"] : [orientation];
|
|
22
|
+
return /* @__PURE__ */ jsxs(ScrollAreaRoot, {
|
|
23
|
+
className,
|
|
24
|
+
style,
|
|
25
|
+
children: [
|
|
26
|
+
/* @__PURE__ */ jsx(ScrollArea$1.Viewport, { children: /* @__PURE__ */ jsx(ScrollArea$1.Content, { children }) }),
|
|
27
|
+
orientations.map((item) => /* @__PURE__ */ jsx(ScrollArea$1.Scrollbar, {
|
|
28
|
+
orientation: item,
|
|
29
|
+
children: /* @__PURE__ */ jsx(ScrollArea$1.Thumb, {})
|
|
30
|
+
}, item)),
|
|
31
|
+
/* @__PURE__ */ jsx(ScrollArea$1.Corner, {})
|
|
32
|
+
]
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
const ScrollArea = Object.assign(ScrollAreaFacade, {
|
|
36
|
+
...ScrollArea$1,
|
|
37
|
+
Root: ScrollAreaRoot
|
|
38
|
+
});
|
|
9
39
|
//#endregion
|
|
10
40
|
export { ScrollArea };
|
|
@@ -8,11 +8,37 @@ type SegmentGroupRootProps = ComponentProps<typeof SegmentGroup$1.Root> & {
|
|
|
8
8
|
* height. */
|
|
9
9
|
size?: "sm" | "md" | "lg";
|
|
10
10
|
};
|
|
11
|
-
declare function SegmentGroupRoot(
|
|
11
|
+
declare function SegmentGroupRoot(props: SegmentGroupRootProps): import("react").JSX.Element;
|
|
12
|
+
export type SegmentGroupItem = {
|
|
13
|
+
value: string;
|
|
14
|
+
label: string;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
};
|
|
17
|
+
export interface SegmentGroupFacadeProps {
|
|
18
|
+
value?: string;
|
|
19
|
+
defaultValue?: string;
|
|
20
|
+
items: SegmentGroupItem[];
|
|
21
|
+
label?: string;
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
readOnly?: boolean;
|
|
24
|
+
orientation?: "horizontal" | "vertical";
|
|
25
|
+
/** One rung of the control-height ladder for the segments. The
|
|
26
|
+
* family keeps its compact register, so the rungs sit one notch
|
|
27
|
+
* below the global ladder - the default md rests at the small
|
|
28
|
+
* height. */
|
|
29
|
+
size?: "sm" | "md" | "lg";
|
|
30
|
+
className?: string;
|
|
31
|
+
onValueChange?: (value: string) => void;
|
|
32
|
+
}
|
|
33
|
+
declare function SegmentGroupFacade({ value, defaultValue, items, label, disabled, readOnly, orientation, size, className, onValueChange }: SegmentGroupFacadeProps): import("react").JSX.Element;
|
|
34
|
+
declare namespace SegmentGroupFacade {
|
|
35
|
+
var displayName: string;
|
|
36
|
+
}
|
|
12
37
|
/** SegmentGroup, dressed in the paper-and-ink system: a hairline tray
|
|
13
38
|
* where one flat ink plate travels beneath the checked seal. The parts - Root, Label, Indicator, Item, ItemText, ItemControl,
|
|
14
39
|
* ItemHiddenInput. */
|
|
15
|
-
|
|
40
|
+
type SegmentGroupParts = Omit<typeof SegmentGroup$1, "Root"> & {
|
|
16
41
|
Root: typeof SegmentGroupRoot;
|
|
17
42
|
};
|
|
43
|
+
export declare const SegmentGroup: typeof SegmentGroupFacade & SegmentGroupParts;
|
|
18
44
|
//#endregion
|
|
@@ -1,20 +1,47 @@
|
|
|
1
|
+
import { t as useElementId } from "../../id-C37UYLwJ.mjs";
|
|
1
2
|
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
-
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
4
|
import { SegmentGroup as SegmentGroup$1 } from "@ark-ui/react/segment-group";
|
|
4
5
|
//#region src/components/segment-group/index.tsx
|
|
5
|
-
function SegmentGroupRoot(
|
|
6
|
+
function SegmentGroupRoot(props) {
|
|
7
|
+
const id = useElementId("segment-group", props);
|
|
8
|
+
const { size = "md", ...rest } = props;
|
|
6
9
|
return /* @__PURE__ */ jsx(SegmentGroup$1.Root, {
|
|
7
10
|
...rest,
|
|
11
|
+
id,
|
|
8
12
|
"data-size": size
|
|
9
13
|
});
|
|
10
14
|
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
+
function SegmentGroupFacade({ value, defaultValue, items, label, disabled = false, readOnly = false, orientation = "horizontal", size = "md", className, onValueChange }) {
|
|
16
|
+
return /* @__PURE__ */ jsxs(SegmentGroupRoot, {
|
|
17
|
+
className,
|
|
18
|
+
size,
|
|
19
|
+
orientation,
|
|
20
|
+
disabled,
|
|
21
|
+
readOnly,
|
|
22
|
+
defaultValue,
|
|
23
|
+
...value === void 0 ? {} : { value },
|
|
24
|
+
onValueChange: (details) => onValueChange?.(details.value ?? ""),
|
|
25
|
+
children: [
|
|
26
|
+
label ? /* @__PURE__ */ jsx(SegmentGroup$1.Label, { children: label }) : null,
|
|
27
|
+
/* @__PURE__ */ jsx(SegmentGroup$1.Indicator, {}),
|
|
28
|
+
items.map((item) => /* @__PURE__ */ jsxs(SegmentGroup$1.Item, {
|
|
29
|
+
value: item.value,
|
|
30
|
+
disabled: item.disabled,
|
|
31
|
+
children: [
|
|
32
|
+
/* @__PURE__ */ jsx(SegmentGroup$1.ItemText, { children: item.label }),
|
|
33
|
+
/* @__PURE__ */ jsx(SegmentGroup$1.ItemControl, {}),
|
|
34
|
+
/* @__PURE__ */ jsx(SegmentGroup$1.ItemHiddenInput, {})
|
|
35
|
+
]
|
|
36
|
+
}, item.value))
|
|
37
|
+
]
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
SegmentGroupFacade.displayName = "SSegmentGroup";
|
|
41
|
+
const SegmentGroup = Object.assign(SegmentGroupFacade, {
|
|
15
42
|
...SegmentGroup$1,
|
|
16
43
|
Root: SegmentGroupRoot
|
|
17
|
-
};
|
|
44
|
+
});
|
|
18
45
|
injectComponentStyle("segment-group");
|
|
19
46
|
//#endregion
|
|
20
47
|
export { SegmentGroup };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { NativeSelect, type NativeSelectOption, type NativeSelectProps, Select };
|
|
1
|
+
import { a as NativeSelectProps, i as NativeSelectOption, n as SelectFacadeProps, r as NativeSelect, t as Select } from "../../index-D_iKc2Uw.mjs";
|
|
2
|
+
export { NativeSelect, type NativeSelectOption, type NativeSelectProps, Select, SelectFacadeProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as NativeSelect, t as Select } from "../../select-
|
|
1
|
+
import { n as NativeSelect, t as Select } from "../../select-ozUFq0zd.mjs";
|
|
2
2
|
export { NativeSelect, Select };
|
|
@@ -7,5 +7,8 @@ export interface SeparatorProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
7
7
|
orientation?: "horizontal" | "vertical";
|
|
8
8
|
decorative?: boolean;
|
|
9
9
|
}
|
|
10
|
-
|
|
10
|
+
declare function SeparatorImpl({ orientation, decorative, ...rest }: SeparatorProps): import("react").JSX.Element;
|
|
11
|
+
export declare const Separator: typeof SeparatorImpl & {
|
|
12
|
+
Root: typeof SeparatorImpl;
|
|
13
|
+
};
|
|
11
14
|
//#endregion
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { t as withSelfRoot } from "../../family-DE_GQeeM.mjs";
|
|
1
2
|
import { injectComponentStyle } from "@bysages/core";
|
|
2
3
|
import { jsx } from "react/jsx-runtime";
|
|
3
4
|
//#region src/components/separator/index.tsx
|
|
4
|
-
function
|
|
5
|
+
function SeparatorImpl({ orientation = "horizontal", decorative = false, ...rest }) {
|
|
5
6
|
injectComponentStyle("separator");
|
|
6
7
|
return /* @__PURE__ */ jsx("div", {
|
|
7
8
|
...rest,
|
|
@@ -12,5 +13,6 @@ function Separator({ orientation = "horizontal", decorative = false, ...rest })
|
|
|
12
13
|
"aria-orientation": decorative ? void 0 : orientation
|
|
13
14
|
});
|
|
14
15
|
}
|
|
16
|
+
const Separator = withSelfRoot(SeparatorImpl);
|
|
15
17
|
//#endregion
|
|
16
18
|
export { Separator };
|
|
@@ -1,8 +1,28 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
1
2
|
import { SignaturePad as SignaturePad$1 } from "@ark-ui/react/signature-pad";
|
|
2
3
|
//#region src/components/signature-pad/index.d.ts
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
interface SignaturePadFacadeProps {
|
|
5
|
+
value?: string[];
|
|
6
|
+
defaultValue?: string[];
|
|
7
|
+
label?: string;
|
|
8
|
+
/** Show the reset control. */
|
|
9
|
+
clearable?: boolean;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
onValueChange?: (paths: string[]) => void;
|
|
12
|
+
children?: ReactNode;
|
|
13
|
+
}
|
|
14
|
+
/** The one-tag path: the paper, guide, clear control, and hidden form
|
|
15
|
+
* value; stroke previews and drawing events stay on the anatomy. */
|
|
16
|
+
declare function SignaturePadFacade({ value, defaultValue, label, clearable, disabled, onValueChange }: SignaturePadFacadeProps): import("react").JSX.Element;
|
|
17
|
+
export declare const SignaturePad: typeof SignaturePadFacade & {
|
|
18
|
+
Root: typeof SignaturePad$1.Root;
|
|
19
|
+
ClearTrigger: import("react").ForwardRefExoticComponent<SignaturePad$1.ClearTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
20
|
+
Context: (props: SignaturePad$1.ContextProps) => ReactNode;
|
|
21
|
+
Control: import("react").ForwardRefExoticComponent<SignaturePad$1.ControlProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
22
|
+
Guide: import("react").ForwardRefExoticComponent<SignaturePad$1.GuideProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
23
|
+
HiddenInput: import("react").ForwardRefExoticComponent<SignaturePad$1.HiddenInputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
24
|
+
Label: import("react").ForwardRefExoticComponent<SignaturePad$1.LabelProps & import("react").RefAttributes<HTMLLabelElement>>;
|
|
25
|
+
RootProvider: import("react").ForwardRefExoticComponent<SignaturePad$1.RootProviderProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
26
|
+
Segment: import("react").ForwardRefExoticComponent<SignaturePad$1.SegmentProps & import("react").RefAttributes<SVGSVGElement>>;
|
|
27
|
+
};
|
|
8
28
|
//#endregion
|
|
@@ -1,11 +1,45 @@
|
|
|
1
|
+
import { t as iconNode } from "../../icon-BALgGtNK.mjs";
|
|
2
|
+
import { t as useElementId } from "../../id-C37UYLwJ.mjs";
|
|
1
3
|
import { injectComponentStyle } from "@bysages/core";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
5
|
import { SignaturePad as SignaturePad$1 } from "@ark-ui/react/signature-pad";
|
|
3
6
|
//#region src/components/signature-pad/index.tsx
|
|
4
|
-
/**
|
|
7
|
+
/** SignaturePad, dressed in the paper-and-ink system: a quiet paper
|
|
5
8
|
* field with a guide hairline where ink — real ink strokes — is laid down.
|
|
6
|
-
* The
|
|
9
|
+
* The parts — Root, Label, Control, Segment, SegmentPath, Guide,
|
|
7
10
|
* ClearTrigger, HiddenInput, Context. */
|
|
8
|
-
|
|
11
|
+
function SignaturePadRoot(props) {
|
|
12
|
+
const id = useElementId("signature-pad", props);
|
|
13
|
+
return /* @__PURE__ */ jsx(SignaturePad$1.Root, {
|
|
14
|
+
...props,
|
|
15
|
+
id
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
/** The one-tag path: the paper, guide, clear control, and hidden form
|
|
19
|
+
* value; stroke previews and drawing events stay on the anatomy. */
|
|
20
|
+
function SignaturePadFacade({ value, defaultValue, label, clearable = true, disabled = false, onValueChange }) {
|
|
21
|
+
return /* @__PURE__ */ jsxs(SignaturePadRoot, {
|
|
22
|
+
disabled,
|
|
23
|
+
defaultPaths: defaultValue,
|
|
24
|
+
...value === void 0 ? {} : {
|
|
25
|
+
paths: value,
|
|
26
|
+
onDraw: (details) => onValueChange?.(details.paths)
|
|
27
|
+
},
|
|
28
|
+
children: [
|
|
29
|
+
label ? /* @__PURE__ */ jsx(SignaturePad$1.Label, { children: label }) : null,
|
|
30
|
+
/* @__PURE__ */ jsxs(SignaturePad$1.Control, { children: [
|
|
31
|
+
/* @__PURE__ */ jsx(SignaturePad$1.Segment, {}),
|
|
32
|
+
clearable ? /* @__PURE__ */ jsx(SignaturePad$1.ClearTrigger, { children: iconNode("undo") }) : null,
|
|
33
|
+
/* @__PURE__ */ jsx(SignaturePad$1.Guide, {})
|
|
34
|
+
] }),
|
|
35
|
+
/* @__PURE__ */ jsx(SignaturePad$1.HiddenInput, { value: "" })
|
|
36
|
+
]
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
const SignaturePad = Object.assign(SignaturePadFacade, {
|
|
40
|
+
...SignaturePad$1,
|
|
41
|
+
Root: SignaturePadRoot
|
|
42
|
+
});
|
|
9
43
|
injectComponentStyle("signature-pad");
|
|
10
44
|
//#endregion
|
|
11
45
|
export { SignaturePad };
|
|
@@ -3,5 +3,8 @@ import { HTMLAttributes } from "react";
|
|
|
3
3
|
/** A waiting sheet of unset paper. Size it from the outside; the breath
|
|
4
4
|
* is the component's own. */
|
|
5
5
|
export type SkeletonProps = HTMLAttributes<HTMLDivElement>;
|
|
6
|
-
|
|
6
|
+
declare function SkeletonImpl({ ...rest }: SkeletonProps): import("react").JSX.Element;
|
|
7
|
+
export declare const Skeleton: typeof SkeletonImpl & {
|
|
8
|
+
Root: typeof SkeletonImpl;
|
|
9
|
+
};
|
|
7
10
|
//#endregion
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { t as withSelfRoot } from "../../family-DE_GQeeM.mjs";
|
|
1
2
|
import { injectComponentStyle } from "@bysages/core";
|
|
2
3
|
import { jsx } from "react/jsx-runtime";
|
|
3
4
|
//#region src/components/skeleton/index.tsx
|
|
4
|
-
function
|
|
5
|
+
function SkeletonImpl({ ...rest }) {
|
|
5
6
|
injectComponentStyle("skeleton");
|
|
6
7
|
return /* @__PURE__ */ jsx("div", {
|
|
7
8
|
...rest,
|
|
@@ -9,5 +10,6 @@ function Skeleton({ ...rest }) {
|
|
|
9
10
|
"data-part": "root"
|
|
10
11
|
});
|
|
11
12
|
}
|
|
13
|
+
const Skeleton = withSelfRoot(SkeletonImpl);
|
|
12
14
|
//#endregion
|
|
13
15
|
export { Skeleton };
|
|
@@ -5,12 +5,31 @@ type SliderRootProps = ComponentProps<typeof Slider$1.Root> & {
|
|
|
5
5
|
/** One rung of the part-size ladder for the thumb seal. */
|
|
6
6
|
size?: "sm" | "md" | "lg";
|
|
7
7
|
};
|
|
8
|
-
declare function SliderRoot(
|
|
8
|
+
declare function SliderRoot(props: SliderRootProps): import("react").JSX.Element;
|
|
9
|
+
export interface SliderFacadeProps {
|
|
10
|
+
value?: number;
|
|
11
|
+
defaultValue?: number;
|
|
12
|
+
label?: string;
|
|
13
|
+
min?: number;
|
|
14
|
+
max?: number;
|
|
15
|
+
step?: number;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
orientation?: "horizontal" | "vertical";
|
|
18
|
+
/** One rung of the part-size ladder for the thumb seal. */
|
|
19
|
+
size?: "sm" | "md" | "lg";
|
|
20
|
+
className?: string;
|
|
21
|
+
onValueChange?: (value: number) => void;
|
|
22
|
+
}
|
|
23
|
+
declare function SliderFacade({ value, defaultValue, label, min, max, step, disabled, orientation, size, className, onValueChange }: SliderFacadeProps): import("react").JSX.Element;
|
|
24
|
+
declare namespace SliderFacade {
|
|
25
|
+
var displayName: string;
|
|
26
|
+
}
|
|
9
27
|
/** Ark's Slider, dressed in the paper-and-ink system: a recessed track the
|
|
10
28
|
* primary ink runs along, a paper-seal thumb, and hairline tick markers.
|
|
11
29
|
* The API is Ark's own — Root, Label, ValueText, Control, Track, Range,
|
|
12
30
|
* Thumb, MarkerGroup, Marker, DraggingIndicator, HiddenInput. */
|
|
13
|
-
|
|
31
|
+
type SliderParts = Omit<typeof Slider$1, "Root"> & {
|
|
14
32
|
Root: typeof SliderRoot;
|
|
15
33
|
};
|
|
34
|
+
export declare const Slider: typeof SliderFacade & SliderParts;
|
|
16
35
|
//#endregion
|
|
@@ -1,21 +1,44 @@
|
|
|
1
|
+
import { t as useElementId } from "../../id-C37UYLwJ.mjs";
|
|
1
2
|
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
-
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
4
|
import { Slider as Slider$1 } from "@ark-ui/react/slider";
|
|
4
5
|
//#region src/components/slider/index.tsx
|
|
5
|
-
function SliderRoot(
|
|
6
|
+
function SliderRoot(props) {
|
|
7
|
+
const id = useElementId("slider", props);
|
|
8
|
+
const { size = "md", ...rest } = props;
|
|
6
9
|
return /* @__PURE__ */ jsx(Slider$1.Root, {
|
|
7
10
|
...rest,
|
|
11
|
+
id,
|
|
8
12
|
"data-size": size
|
|
9
13
|
});
|
|
10
14
|
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
15
|
+
function SliderFacade({ value, defaultValue = 50, label, min = 0, max = 100, step = 1, disabled = false, orientation = "horizontal", size = "md", className, onValueChange }) {
|
|
16
|
+
return /* @__PURE__ */ jsxs(SliderRoot, {
|
|
17
|
+
className,
|
|
18
|
+
size,
|
|
19
|
+
disabled,
|
|
20
|
+
min,
|
|
21
|
+
max,
|
|
22
|
+
step,
|
|
23
|
+
orientation,
|
|
24
|
+
defaultValue: [defaultValue],
|
|
25
|
+
...value === void 0 ? {} : { value: [value] },
|
|
26
|
+
onValueChange: (details) => onValueChange?.(details.value.at(0) ?? min),
|
|
27
|
+
children: [
|
|
28
|
+
label ? /* @__PURE__ */ jsx(Slider$1.Label, { children: label }) : null,
|
|
29
|
+
/* @__PURE__ */ jsx(Slider$1.ValueText, {}),
|
|
30
|
+
/* @__PURE__ */ jsxs(Slider$1.Control, { children: [/* @__PURE__ */ jsx(Slider$1.Track, { children: /* @__PURE__ */ jsx(Slider$1.Range, {}) }), /* @__PURE__ */ jsx(Slider$1.Thumb, {
|
|
31
|
+
index: 0,
|
|
32
|
+
children: /* @__PURE__ */ jsx(Slider$1.HiddenInput, {})
|
|
33
|
+
})] })
|
|
34
|
+
]
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
SliderFacade.displayName = "SSlider";
|
|
38
|
+
const Slider = Object.assign(SliderFacade, {
|
|
16
39
|
...Slider$1,
|
|
17
40
|
Root: SliderRoot
|
|
18
|
-
};
|
|
41
|
+
});
|
|
19
42
|
injectComponentStyle("slider");
|
|
20
43
|
//#endregion
|
|
21
44
|
export { Slider };
|
|
@@ -5,5 +5,8 @@ export interface SpinnerProps extends HTMLAttributes<HTMLElement> {
|
|
|
5
5
|
}
|
|
6
6
|
/** A wheel of waiting: one arc of ink turning about its center. Quiet by
|
|
7
7
|
* default — it reports progress without claiming attention. */
|
|
8
|
-
|
|
8
|
+
declare function SpinnerImpl({ size, children, ...rest }: SpinnerProps): import("react").JSX.Element;
|
|
9
|
+
export declare const Spinner: typeof SpinnerImpl & {
|
|
10
|
+
Root: typeof SpinnerImpl;
|
|
11
|
+
};
|
|
9
12
|
//#endregion
|
|
@@ -1,14 +1,17 @@
|
|
|
1
|
+
import { t as withSelfRoot } from "../../family-DE_GQeeM.mjs";
|
|
2
|
+
import { n as useComponentMessages } from "../../messages-1jJWtaYU.mjs";
|
|
1
3
|
import { injectComponentStyle } from "@bysages/core";
|
|
2
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
5
|
//#region src/components/spinner/index.tsx
|
|
4
6
|
/** A wheel of waiting: one arc of ink turning about its center. Quiet by
|
|
5
7
|
* default — it reports progress without claiming attention. */
|
|
6
|
-
function
|
|
8
|
+
function SpinnerImpl({ size = "md", children, ...rest }) {
|
|
7
9
|
injectComponentStyle("spinner");
|
|
10
|
+
const messages = useComponentMessages();
|
|
8
11
|
return /* @__PURE__ */ jsxs("span", {
|
|
9
12
|
...rest,
|
|
10
13
|
role: "status",
|
|
11
|
-
"aria-label": rest["aria-label"] ??
|
|
14
|
+
"aria-label": rest["aria-label"] ?? messages.spinner.loading,
|
|
12
15
|
"data-scope": "spinner",
|
|
13
16
|
"data-part": "root",
|
|
14
17
|
"data-size": size,
|
|
@@ -32,5 +35,6 @@ function Spinner({ size = "md", children, ...rest }) {
|
|
|
32
35
|
}), children]
|
|
33
36
|
});
|
|
34
37
|
}
|
|
38
|
+
const Spinner = withSelfRoot(SpinnerImpl);
|
|
35
39
|
//#endregion
|
|
36
40
|
export { Spinner };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Menu } from "../menu/index.mjs";
|
|
1
2
|
import { HTMLAttributes } from "react";
|
|
2
3
|
//#region src/components/split-button/index.d.ts
|
|
3
4
|
export interface SplitButtonEntry {
|
|
@@ -32,5 +33,6 @@ export interface SplitButtonProps extends Omit<HTMLAttributes<HTMLDivElement>, "
|
|
|
32
33
|
* button stylesheet's trigger register dresses it. The popup keeps the
|
|
33
34
|
* menu parts untouched.
|
|
34
35
|
*/
|
|
35
|
-
|
|
36
|
+
declare function SplitButtonImpl({ label, items, variant, tone, size, disabled, onClick, onSelect, ...rest }: SplitButtonProps): import("react").JSX.Element;
|
|
37
|
+
export declare const SplitButton: typeof SplitButtonImpl & typeof Menu;
|
|
36
38
|
//#endregion
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
+
import { t as iconNode } from "../../icon-BALgGtNK.mjs";
|
|
2
|
+
import { t as useElementId } from "../../id-C37UYLwJ.mjs";
|
|
3
|
+
import { n as useComponentMessages } from "../../messages-1jJWtaYU.mjs";
|
|
1
4
|
import { Button } from "../button/index.mjs";
|
|
5
|
+
import { Menu as Menu$1 } from "../menu/index.mjs";
|
|
2
6
|
import { injectComponentStyle } from "@bysages/core";
|
|
3
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
8
|
import { Portal } from "@ark-ui/react/portal";
|
|
@@ -13,9 +17,11 @@ import { Menu } from "@ark-ui/react/menu";
|
|
|
13
17
|
* button stylesheet's trigger register dresses it. The popup keeps the
|
|
14
18
|
* menu parts untouched.
|
|
15
19
|
*/
|
|
16
|
-
function
|
|
20
|
+
function SplitButtonImpl({ label, items = [], variant = "solid", tone = "ink", size = "md", disabled = false, onClick, onSelect, ...rest }) {
|
|
17
21
|
injectComponentStyle("split-button");
|
|
18
22
|
injectComponentStyle("menu");
|
|
23
|
+
const hostId = useElementId("split-button", rest);
|
|
24
|
+
const messages = useComponentMessages();
|
|
19
25
|
return /* @__PURE__ */ jsxs("div", {
|
|
20
26
|
...rest,
|
|
21
27
|
"data-scope": "split-button",
|
|
@@ -28,6 +34,7 @@ function SplitButton({ label, items = [], variant = "solid", tone = "ink", size
|
|
|
28
34
|
onClick,
|
|
29
35
|
children: label
|
|
30
36
|
}), /* @__PURE__ */ jsxs(Menu.Root, {
|
|
37
|
+
id: `${hostId}:menu`,
|
|
31
38
|
positioning: { placement: "bottom-end" },
|
|
32
39
|
children: [/* @__PURE__ */ jsx(Menu.Trigger, {
|
|
33
40
|
asChild: true,
|
|
@@ -39,8 +46,8 @@ function SplitButton({ label, items = [], variant = "solid", tone = "ink", size
|
|
|
39
46
|
"data-size": size,
|
|
40
47
|
"data-square": "true",
|
|
41
48
|
"data-motion": "ink-ripple lit",
|
|
42
|
-
"aria-label":
|
|
43
|
-
children: chevronDown
|
|
49
|
+
"aria-label": messages.more.actions,
|
|
50
|
+
children: chevronDown
|
|
44
51
|
})
|
|
45
52
|
}), /* @__PURE__ */ jsx(Portal, { children: /* @__PURE__ */ jsx(Menu.Positioner, { children: /* @__PURE__ */ jsx(Menu.Content, { children: items.map((entry) => /* @__PURE__ */ jsx(Menu.Item, {
|
|
46
53
|
value: entry.value,
|
|
@@ -52,20 +59,10 @@ function SplitButton({ label, items = [], variant = "solid", tone = "ink", size
|
|
|
52
59
|
})]
|
|
53
60
|
});
|
|
54
61
|
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
viewBox: "0 0 24 24",
|
|
61
|
-
fill: "none",
|
|
62
|
-
stroke: "currentColor",
|
|
63
|
-
strokeWidth: 1.75,
|
|
64
|
-
strokeLinecap: "round",
|
|
65
|
-
strokeLinejoin: "round",
|
|
66
|
-
"aria-hidden": "true",
|
|
67
|
-
children: /* @__PURE__ */ jsx("path", { d: "m6 9 6 6 6-6" })
|
|
68
|
-
});
|
|
69
|
-
}
|
|
62
|
+
const SplitButton = Object.assign(SplitButtonImpl, Menu$1);
|
|
63
|
+
const chevronDown = iconNode("chevron-down", {
|
|
64
|
+
width: 16,
|
|
65
|
+
height: 16
|
|
66
|
+
});
|
|
70
67
|
//#endregion
|
|
71
68
|
export { SplitButton };
|
|
@@ -1,7 +1,20 @@
|
|
|
1
1
|
import { Splitter as Splitter$1 } from "@ark-ui/react/splitter";
|
|
2
2
|
//#region src/components/splitter/index.d.ts
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
export type SplitterItem = {
|
|
4
|
+
id: string;
|
|
5
|
+
label: string;
|
|
6
|
+
};
|
|
7
|
+
export interface SplitterFacadeProps {
|
|
8
|
+
items: SplitterItem[];
|
|
9
|
+
defaultValue?: number[];
|
|
10
|
+
value?: number[];
|
|
11
|
+
orientation?: "horizontal" | "vertical";
|
|
12
|
+
className?: string;
|
|
13
|
+
}
|
|
14
|
+
declare function SplitterFacade({ items, defaultValue, value, orientation, className }: SplitterFacadeProps): import("react").JSX.Element;
|
|
15
|
+
declare namespace SplitterFacade {
|
|
16
|
+
var displayName: string;
|
|
17
|
+
}
|
|
18
|
+
type SplitterParts = typeof Splitter$1;
|
|
19
|
+
export declare const Splitter: typeof SplitterFacade & SplitterParts;
|
|
7
20
|
//#endregion
|