@bysages/react 0.5.0 → 0.6.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-B3vbpXlK.mjs → ai-B0o-dsAf.mjs} +1 -1
- package/dist/{ai-prompt-input-k34KssHJ.mjs → ai-prompt-input-Cl9ulICF.mjs} +1 -1
- package/dist/components/ai/index.mjs +1 -1
- package/dist/components/ai-prompt-input/index.d.mts +1 -1
- package/dist/components/ai-prompt-input/index.mjs +1 -1
- package/dist/components/autocomplete/index.d.mts +4 -1
- package/dist/components/autocomplete/index.mjs +9 -6
- package/dist/components/cascade-select/index.d.mts +4 -1
- package/dist/components/cascade-select/index.mjs +36 -33
- package/dist/components/color-picker/index.d.mts +9 -1
- package/dist/components/color-picker/index.mjs +36 -29
- package/dist/components/combobox/index.d.mts +9 -1
- package/dist/components/combobox/index.mjs +14 -8
- package/dist/components/command/index.d.mts +4 -1
- package/dist/components/command/index.mjs +71 -68
- package/dist/components/date-picker/index.d.mts +9 -1
- package/dist/components/date-picker/index.mjs +27 -21
- package/dist/components/dialog/index.d.mts +20 -3
- package/dist/components/dialog/index.mjs +28 -12
- package/dist/components/drawer/index.d.mts +19 -3
- package/dist/components/drawer/index.mjs +18 -12
- package/dist/components/floating-panel/index.d.mts +19 -3
- package/dist/components/floating-panel/index.mjs +34 -28
- package/dist/components/hover-card/index.d.mts +17 -3
- package/dist/components/hover-card/index.mjs +14 -8
- package/dist/components/image-viewer/index.d.mts +1 -1
- package/dist/components/image-viewer/index.mjs +1 -1
- package/dist/components/media-player/index.mjs +1 -1
- package/dist/components/mentions/index.d.mts +1 -1
- package/dist/components/mentions/index.mjs +1 -1
- package/dist/components/menu/index.d.mts +10 -2
- package/dist/components/menu/index.mjs +12 -6
- package/dist/components/menubar/index.d.mts +4 -1
- package/dist/components/menubar/index.mjs +12 -9
- package/dist/components/navigation-menu/index.d.mts +9 -1
- package/dist/components/navigation-menu/index.mjs +7 -1
- package/dist/components/pagination/index.d.mts +2 -2
- package/dist/components/popconfirm/index.d.mts +5 -2
- package/dist/components/popconfirm/index.mjs +31 -28
- package/dist/components/popover/index.d.mts +1 -1
- package/dist/components/popover/index.mjs +20 -14
- package/dist/components/select/index.d.mts +1 -1
- package/dist/components/select/index.mjs +1 -1
- package/dist/components/split-button/index.d.mts +4 -1
- package/dist/components/split-button/index.mjs +12 -9
- package/dist/components/table/index.d.mts +21 -1
- package/dist/components/table/index.mjs +24 -9
- package/dist/components/tooltip/index.d.mts +17 -3
- package/dist/components/tooltip/index.mjs +8 -2
- package/dist/components/tour/index.d.mts +20 -3
- package/dist/components/tour/index.mjs +16 -10
- package/dist/components/tree-select/index.d.mts +5 -2
- package/dist/components/tree-select/index.mjs +38 -35
- package/dist/components/typography/index.d.mts +10 -6
- package/dist/components/typography/index.mjs +9 -1
- package/dist/floating-BhcDRgnx.d.mts +7 -0
- package/dist/floating-CMR7cvmA.mjs +33 -0
- package/dist/generative/index.mjs +1 -1
- package/dist/{image-viewer-BYiXpi1X.mjs → image-viewer-BPTApdoP.mjs} +32 -29
- package/dist/{index-DcpvCyt6.d.mts → index-CEYybyEQ.d.mts} +8 -3
- package/dist/{index-DczfbPCg.d.mts → index-DZ2S5rMj.d.mts} +10 -2
- package/dist/index-j02dTkfc.d.mts +37 -0
- package/dist/{index-D4C52fI7.d.mts → index-n9VlNO7D.d.mts} +4 -1
- package/dist/index.d.mts +8 -8
- package/dist/index.mjs +6 -6
- package/dist/{media-player-CO2Cczl-.mjs → media-player-DxG0EYz7.mjs} +1 -1
- package/dist/{mentions-De7ChJbl.mjs → mentions-B59tQDPt.mjs} +31 -25
- package/dist/{select-DQ5669_K.mjs → select-BLFqfeVw.mjs} +20 -14
- package/package.json +2 -2
- package/dist/index-BVdkcSSY.d.mts +0 -22
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { t as useElementId } from "../../id-Ctic_3o8.mjs";
|
|
2
|
+
import { t as FloatingPortal } from "../../floating-CMR7cvmA.mjs";
|
|
2
3
|
import { Menu as Menu$1 } from "../menu/index.mjs";
|
|
3
4
|
import { injectComponentStyle } from "@bysages/core/styling";
|
|
4
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
-
import { Portal } from "@ark-ui/react/portal";
|
|
6
6
|
import { Menu } from "@ark-ui/react/menu";
|
|
7
7
|
// src/components/menubar/index.tsx
|
|
8
|
-
function MenubarImpl({ items, onSelect, children, ...rest }) {
|
|
8
|
+
function MenubarImpl({ portal = false, items, onSelect, children, ...rest }) {
|
|
9
9
|
injectComponentStyle("menubar");
|
|
10
10
|
injectComponentStyle("menu");
|
|
11
11
|
const hostId = useElementId("menubar", rest);
|
|
@@ -26,13 +26,16 @@ function MenubarImpl({ items, onSelect, children, ...rest }) {
|
|
|
26
26
|
"data-part": "trigger",
|
|
27
27
|
children: group.label
|
|
28
28
|
})
|
|
29
|
-
}), /* @__PURE__ */ jsx(
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
29
|
+
}), /* @__PURE__ */ jsx(FloatingPortal, {
|
|
30
|
+
portal,
|
|
31
|
+
children: /* @__PURE__ */ jsx(Menu.Positioner, { children: /* @__PURE__ */ jsx(Menu.Content, { children: group.items.map((entry) => /* @__PURE__ */ jsx(Menu.Item, {
|
|
32
|
+
value: entry.value,
|
|
33
|
+
disabled: entry.disabled,
|
|
34
|
+
"data-danger": entry.danger ? "" : void 0,
|
|
35
|
+
onSelect: () => onSelect?.(entry.value),
|
|
36
|
+
children: /* @__PURE__ */ jsx(Menu.ItemText, { children: entry.label })
|
|
37
|
+
}, entry.value)) }) })
|
|
38
|
+
})]
|
|
36
39
|
}, group.label)), children]
|
|
37
40
|
});
|
|
38
41
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { t as FloatingPortalProps } from "../../floating-BhcDRgnx.mjs";
|
|
1
2
|
import { ComponentProps } from "react";
|
|
2
3
|
import { NavigationMenu as NavigationMenu$1 } from "@ark-ui/react/navigation-menu";
|
|
3
4
|
/** Ark's NavigationMenu, dressed in the paper-and-ink system: a menubar of
|
|
@@ -6,6 +7,12 @@ import { NavigationMenu as NavigationMenu$1 } from "@ark-ui/react/navigation-men
|
|
|
6
7
|
* Content, ViewportPositioner, Viewport, Indicator, ItemIndicator, Arrow. */
|
|
7
8
|
declare function NavigationMenuRoot(props: ComponentProps<typeof NavigationMenu$1.Root>): import("react").JSX.Element;
|
|
8
9
|
declare function NavigationMenuLink(props: ComponentProps<typeof NavigationMenu$1.Link>): import("react").JSX.Element;
|
|
10
|
+
/** The shared panel stage keeps the raw Ark part until a caller opts into
|
|
11
|
+
* a portal; the flat-link facade has no vessel of its own. */
|
|
12
|
+
declare const NavigationMenuViewportPositioner: {
|
|
13
|
+
({ portal, ...rest }: FloatingPortalProps & NavigationMenu$1.ViewportPositionerProps & import("react").RefAttributes<HTMLDivElement>): import("react").JSX.Element;
|
|
14
|
+
displayName: string;
|
|
15
|
+
};
|
|
9
16
|
/** One flat destination in the callable bar; grouped panels and mega
|
|
10
17
|
* menus stay on the anatomy. */
|
|
11
18
|
export interface NavigationMenuLinkOption {
|
|
@@ -23,9 +30,10 @@ declare function NavigationMenuFacade({ items, orientation, className }: Navigat
|
|
|
23
30
|
declare namespace NavigationMenuFacade {
|
|
24
31
|
var displayName: string;
|
|
25
32
|
}
|
|
26
|
-
type NavigationMenuParts = Omit<typeof NavigationMenu$1, "Root" | "Link"> & {
|
|
33
|
+
type NavigationMenuParts = Omit<typeof NavigationMenu$1, "Root" | "Link" | "ViewportPositioner"> & {
|
|
27
34
|
Root: typeof NavigationMenuRoot;
|
|
28
35
|
Link: typeof NavigationMenuLink;
|
|
36
|
+
ViewportPositioner: typeof NavigationMenuViewportPositioner;
|
|
29
37
|
};
|
|
30
38
|
export declare const NavigationMenu: typeof NavigationMenuFacade & NavigationMenuParts;
|
|
31
39
|
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { t as useElementId } from "../../id-Ctic_3o8.mjs";
|
|
2
|
+
import { n as definePositioner } from "../../floating-CMR7cvmA.mjs";
|
|
2
3
|
import { injectComponentStyle } from "@bysages/core/styling";
|
|
3
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
5
|
import { NavigationMenu as NavigationMenu$1 } from "@ark-ui/react/navigation-menu";
|
|
@@ -21,6 +22,10 @@ function NavigationMenuLink(props) {
|
|
|
21
22
|
"data-motion": "ink-ripple"
|
|
22
23
|
});
|
|
23
24
|
}
|
|
25
|
+
/** The shared panel stage keeps the raw Ark part until a caller opts into
|
|
26
|
+
* a portal; the flat-link facade has no vessel of its own. */
|
|
27
|
+
const NavigationMenuViewportPositioner = definePositioner(NavigationMenu$1.ViewportPositioner);
|
|
28
|
+
NavigationMenuViewportPositioner.displayName = "SNavigationMenuViewportPositioner";
|
|
24
29
|
function NavigationMenuFacade({ items, orientation = "horizontal", className }) {
|
|
25
30
|
return /* @__PURE__ */ jsx(NavigationMenuRoot, {
|
|
26
31
|
className,
|
|
@@ -39,7 +44,8 @@ NavigationMenuFacade.displayName = "SNavigationMenu";
|
|
|
39
44
|
const NavigationMenu = Object.assign(NavigationMenuFacade, {
|
|
40
45
|
...NavigationMenu$1,
|
|
41
46
|
Root: NavigationMenuRoot,
|
|
42
|
-
Link: NavigationMenuLink
|
|
47
|
+
Link: NavigationMenuLink,
|
|
48
|
+
ViewportPositioner: NavigationMenuViewportPositioner
|
|
43
49
|
});
|
|
44
50
|
injectComponentStyle("navigation-menu");
|
|
45
51
|
export { NavigationMenu };
|
|
@@ -26,8 +26,8 @@ type PaginationFacadeProps = {
|
|
|
26
26
|
style?: CSSProperties;
|
|
27
27
|
onValueChange?: (page: number) => void;
|
|
28
28
|
};
|
|
29
|
-
declare const PaginationPrevTrigger: import("react").ForwardRefExoticComponent<Pagination$1.PrevTriggerProps & import("react").RefAttributes<
|
|
30
|
-
declare const PaginationNextTrigger: import("react").ForwardRefExoticComponent<Pagination$1.NextTriggerProps & import("react").RefAttributes<
|
|
29
|
+
declare const PaginationPrevTrigger: import("react").ForwardRefExoticComponent<Pagination$1.PrevTriggerProps & import("react").RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
30
|
+
declare const PaginationNextTrigger: import("react").ForwardRefExoticComponent<Pagination$1.NextTriggerProps & import("react").RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
31
31
|
/** The complete pagination bar behind one page: count and page size become
|
|
32
32
|
* the visible ladder, with edge semantics left to anatomy. */
|
|
33
33
|
declare function PaginationFacade(props: PaginationFacadeProps): import("react").JSX.Element;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as FloatingPortalTarget } from "../../floating-BhcDRgnx.mjs";
|
|
2
|
+
import { t as Popover } from "../../index-j02dTkfc.mjs";
|
|
2
3
|
import { ReactNode } from "react";
|
|
3
4
|
/**
|
|
4
5
|
* A question at the point of no return: the trigger opens a small
|
|
@@ -9,6 +10,8 @@ import { ReactNode } from "react";
|
|
|
9
10
|
* otherwise).
|
|
10
11
|
*/
|
|
11
12
|
export interface PopconfirmProps {
|
|
13
|
+
/** Portal after hydration; `false` keeps the vessel inline. */
|
|
14
|
+
portal?: FloatingPortalTarget;
|
|
12
15
|
id?: string;
|
|
13
16
|
/** The question the reader is answering. */
|
|
14
17
|
message: string;
|
|
@@ -18,6 +21,6 @@ export interface PopconfirmProps {
|
|
|
18
21
|
onConfirm?: () => void;
|
|
19
22
|
onCancel?: () => void;
|
|
20
23
|
}
|
|
21
|
-
declare function PopconfirmImpl({ message, confirmText, cancelText, children, onConfirm, onCancel, id }: PopconfirmProps): import("react").JSX.Element;
|
|
24
|
+
declare function PopconfirmImpl({ portal, message, confirmText, cancelText, children, onConfirm, onCancel, id }: PopconfirmProps): import("react").JSX.Element;
|
|
22
25
|
export declare const Popconfirm: typeof PopconfirmImpl & typeof Popover;
|
|
23
26
|
export {};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { t as useElementId } from "../../id-Ctic_3o8.mjs";
|
|
2
2
|
import { Button } from "../button/index.mjs";
|
|
3
|
+
import { t as FloatingPortal } from "../../floating-CMR7cvmA.mjs";
|
|
3
4
|
import { Popover as Popover$1 } from "../popover/index.mjs";
|
|
4
5
|
import { injectComponentStyle } from "@bysages/core/styling";
|
|
5
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
7
|
import { Popover } from "@ark-ui/react/popover";
|
|
7
|
-
import { Portal } from "@ark-ui/react/portal";
|
|
8
8
|
// src/components/popconfirm/index.tsx
|
|
9
|
-
function PopconfirmImpl({ message, confirmText = "Confirm", cancelText = "Cancel", children, onConfirm, onCancel, id }) {
|
|
9
|
+
function PopconfirmImpl({ portal = false, message, confirmText = "Confirm", cancelText = "Cancel", children, onConfirm, onCancel, id }) {
|
|
10
10
|
injectComponentStyle("popconfirm");
|
|
11
11
|
const hostId = useElementId("popconfirm", { id });
|
|
12
12
|
return /* @__PURE__ */ jsxs(Popover.Root, {
|
|
@@ -15,33 +15,36 @@ function PopconfirmImpl({ message, confirmText = "Confirm", cancelText = "Cancel
|
|
|
15
15
|
children: [/* @__PURE__ */ jsx(Popover.Trigger, {
|
|
16
16
|
asChild: true,
|
|
17
17
|
children
|
|
18
|
-
}), /* @__PURE__ */ jsx(
|
|
19
|
-
|
|
20
|
-
children:
|
|
21
|
-
|
|
22
|
-
children:
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
children: /* @__PURE__ */ jsx(
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
18
|
+
}), /* @__PURE__ */ jsx(FloatingPortal, {
|
|
19
|
+
portal,
|
|
20
|
+
children: /* @__PURE__ */ jsx(Popover.Positioner, { children: /* @__PURE__ */ jsxs(Popover.Content, {
|
|
21
|
+
className: "bs-popconfirm",
|
|
22
|
+
children: [/* @__PURE__ */ jsx("p", {
|
|
23
|
+
"data-part": "message",
|
|
24
|
+
children: message
|
|
25
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
26
|
+
"data-part": "actions",
|
|
27
|
+
children: [/* @__PURE__ */ jsx(Popover.CloseTrigger, {
|
|
28
|
+
asChild: true,
|
|
29
|
+
children: /* @__PURE__ */ jsx(Button, {
|
|
30
|
+
variant: "ghost",
|
|
31
|
+
size: "sm",
|
|
32
|
+
"aria-label": cancelText,
|
|
33
|
+
onClick: () => onCancel?.(),
|
|
34
|
+
children: cancelText
|
|
35
|
+
})
|
|
36
|
+
}), /* @__PURE__ */ jsx(Popover.CloseTrigger, {
|
|
37
|
+
asChild: true,
|
|
38
|
+
children: /* @__PURE__ */ jsx(Button, {
|
|
39
|
+
size: "sm",
|
|
40
|
+
"aria-label": confirmText,
|
|
41
|
+
onClick: () => onConfirm?.(),
|
|
42
|
+
children: confirmText
|
|
43
|
+
})
|
|
44
|
+
})]
|
|
42
45
|
})]
|
|
43
|
-
})
|
|
44
|
-
})
|
|
46
|
+
}) })
|
|
47
|
+
})]
|
|
45
48
|
});
|
|
46
49
|
}
|
|
47
50
|
const Popconfirm = Object.assign(PopconfirmImpl, Popover$1);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as PopoverFacadeProps, t as Popover } from "../../index-
|
|
1
|
+
import { n as PopoverFacadeProps, t as Popover } from "../../index-j02dTkfc.mjs";
|
|
2
2
|
export { Popover, PopoverFacadeProps };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { r as iconNode } from "../../icon-C9udWCyz.mjs";
|
|
2
2
|
import { t as useElementId } from "../../id-Ctic_3o8.mjs";
|
|
3
|
+
import { n as definePositioner, t as FloatingPortal } from "../../floating-CMR7cvmA.mjs";
|
|
3
4
|
import { injectComponentStyle } from "@bysages/core/styling";
|
|
4
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
6
|
import { isValidElement } from "react";
|
|
@@ -16,7 +17,8 @@ function PopoverRoot(props) {
|
|
|
16
17
|
id
|
|
17
18
|
});
|
|
18
19
|
}
|
|
19
|
-
|
|
20
|
+
const PopoverPositioner = definePositioner(Popover$1.Positioner);
|
|
21
|
+
function PopoverFacade({ portal = false, open, defaultOpen, trigger, content, label, description, disabled = false, placement, children, onOpenChange }) {
|
|
20
22
|
return /* @__PURE__ */ jsxs(PopoverRoot, {
|
|
21
23
|
...placement === void 0 ? {} : { positioning: { placement } },
|
|
22
24
|
...open === void 0 ? {} : { open },
|
|
@@ -26,24 +28,28 @@ function PopoverFacade({ open, defaultOpen, trigger, content, label, description
|
|
|
26
28
|
asChild: isValidElement(trigger),
|
|
27
29
|
disabled,
|
|
28
30
|
children: trigger ?? label
|
|
29
|
-
}), /* @__PURE__ */ jsx(
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
31
|
+
}), /* @__PURE__ */ jsx(FloatingPortal, {
|
|
32
|
+
portal,
|
|
33
|
+
children: /* @__PURE__ */ jsx(Popover$1.Positioner, { children: /* @__PURE__ */ jsxs(Popover$1.Content, { children: [
|
|
34
|
+
/* @__PURE__ */ jsx(Popover$1.CloseTrigger, {
|
|
35
|
+
"aria-label": "Close",
|
|
36
|
+
children: iconNode("x", {
|
|
37
|
+
width: 14,
|
|
38
|
+
height: 14
|
|
39
|
+
})
|
|
40
|
+
}),
|
|
41
|
+
/* @__PURE__ */ jsx(Popover$1.Title, { children: label }),
|
|
42
|
+
description ? /* @__PURE__ */ jsx(Popover$1.Description, { children: description }) : null,
|
|
43
|
+
content ? /* @__PURE__ */ jsx("p", { children: content }) : null,
|
|
44
|
+
children
|
|
45
|
+
] }) })
|
|
46
|
+
})]
|
|
42
47
|
});
|
|
43
48
|
}
|
|
44
49
|
PopoverFacade.displayName = "SPopover";
|
|
45
50
|
const Popover = Object.assign(PopoverFacade, {
|
|
46
51
|
...Popover$1,
|
|
52
|
+
Positioner: PopoverPositioner,
|
|
47
53
|
Root: PopoverRoot
|
|
48
54
|
});
|
|
49
55
|
injectComponentStyle("popover");
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as NativeSelectProps, i as NativeSelectOption, n as SelectFacadeProps, r as NativeSelect, t as Select } from "../../index-
|
|
1
|
+
import { a as NativeSelectProps, i as NativeSelectOption, n as SelectFacadeProps, r as NativeSelect, t as Select } from "../../index-DZ2S5rMj.mjs";
|
|
2
2
|
export { NativeSelect, type NativeSelectOption, type NativeSelectProps, Select, SelectFacadeProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { n as NativeSelect, t as Select } from "../../select-
|
|
1
|
+
export { n as NativeSelect, t as Select } from "../../select-BLFqfeVw.mjs";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { n as FloatingPortalTarget } from "../../floating-BhcDRgnx.mjs";
|
|
1
2
|
import { Menu } from "../menu/index.mjs";
|
|
2
3
|
import { HTMLAttributes } from "react";
|
|
3
4
|
export interface SplitButtonEntry {
|
|
@@ -8,6 +9,8 @@ export interface SplitButtonEntry {
|
|
|
8
9
|
disabled?: boolean;
|
|
9
10
|
}
|
|
10
11
|
export interface SplitButtonProps extends Omit<HTMLAttributes<HTMLDivElement>, "onSelect"> {
|
|
12
|
+
/** Portal after hydration; `false` keeps the vessel inline. */
|
|
13
|
+
portal?: FloatingPortalTarget;
|
|
11
14
|
/** The main action's label. */
|
|
12
15
|
label: string;
|
|
13
16
|
/** The dropdown's entries. */
|
|
@@ -32,6 +35,6 @@ export interface SplitButtonProps extends Omit<HTMLAttributes<HTMLDivElement>, "
|
|
|
32
35
|
* button stylesheet's trigger register dresses it. The popup keeps the
|
|
33
36
|
* menu parts untouched.
|
|
34
37
|
*/
|
|
35
|
-
declare function SplitButtonImpl({ label, items, variant, tone, size, disabled, onClick, onSelect, ...rest }: SplitButtonProps): import("react").JSX.Element;
|
|
38
|
+
declare function SplitButtonImpl({ portal, label, items, variant, tone, size, disabled, onClick, onSelect, ...rest }: SplitButtonProps): import("react").JSX.Element;
|
|
36
39
|
export declare const SplitButton: typeof SplitButtonImpl & typeof Menu;
|
|
37
40
|
export {};
|
|
@@ -2,10 +2,10 @@ import { r as iconNode } from "../../icon-C9udWCyz.mjs";
|
|
|
2
2
|
import { t as useElementId } from "../../id-Ctic_3o8.mjs";
|
|
3
3
|
import { n as useComponentMessages } from "../../messages-B6n0lVyt.mjs";
|
|
4
4
|
import { Button } from "../button/index.mjs";
|
|
5
|
+
import { t as FloatingPortal } from "../../floating-CMR7cvmA.mjs";
|
|
5
6
|
import { Menu as Menu$1 } from "../menu/index.mjs";
|
|
6
7
|
import { injectComponentStyle } from "@bysages/core/styling";
|
|
7
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
-
import { Portal } from "@ark-ui/react/portal";
|
|
9
9
|
import { Menu } from "@ark-ui/react/menu";
|
|
10
10
|
// src/components/split-button/index.tsx
|
|
11
11
|
/**
|
|
@@ -17,7 +17,7 @@ import { Menu } from "@ark-ui/react/menu";
|
|
|
17
17
|
* button stylesheet's trigger register dresses it. The popup keeps the
|
|
18
18
|
* menu parts untouched.
|
|
19
19
|
*/
|
|
20
|
-
function SplitButtonImpl({ label, items = [], variant = "solid", tone = "ink", size = "md", disabled = false, onClick, onSelect, ...rest }) {
|
|
20
|
+
function SplitButtonImpl({ portal = false, label, items = [], variant = "solid", tone = "ink", size = "md", disabled = false, onClick, onSelect, ...rest }) {
|
|
21
21
|
injectComponentStyle("split-button");
|
|
22
22
|
injectComponentStyle("menu");
|
|
23
23
|
const hostId = useElementId("split-button", rest);
|
|
@@ -49,13 +49,16 @@ function SplitButtonImpl({ label, items = [], variant = "solid", tone = "ink", s
|
|
|
49
49
|
"aria-label": messages.more.actions,
|
|
50
50
|
children: chevronDown
|
|
51
51
|
})
|
|
52
|
-
}), /* @__PURE__ */ jsx(
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
52
|
+
}), /* @__PURE__ */ jsx(FloatingPortal, {
|
|
53
|
+
portal,
|
|
54
|
+
children: /* @__PURE__ */ jsx(Menu.Positioner, { children: /* @__PURE__ */ jsx(Menu.Content, { children: items.map((entry) => /* @__PURE__ */ jsx(Menu.Item, {
|
|
55
|
+
value: entry.value,
|
|
56
|
+
disabled: entry.disabled,
|
|
57
|
+
"data-danger": entry.danger ? "" : void 0,
|
|
58
|
+
onSelect: () => onSelect?.(entry.value),
|
|
59
|
+
children: /* @__PURE__ */ jsx(Menu.ItemText, { children: entry.label })
|
|
60
|
+
}, entry.value)) }) })
|
|
61
|
+
})]
|
|
59
62
|
})]
|
|
60
63
|
});
|
|
61
64
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CSSProperties } from "react";
|
|
1
|
+
import { CSSProperties, ReactNode } from "react";
|
|
2
2
|
import { CellData, ColumnDef, FlexRender, RowData, SortingState, TableFeatures, createColumnHelper } from "@tanstack/react-table";
|
|
3
3
|
/** Column metadata understood by this table: mark columns whose values
|
|
4
4
|
* read right-aligned in tabular figures. The type parameters mirror the
|
|
@@ -72,9 +72,29 @@ export interface DataTableProps {
|
|
|
72
72
|
onRowReorder?: (rows: RowData[]) => void;
|
|
73
73
|
/** Fires with the full leaf-column id order after a header drop. */
|
|
74
74
|
onColumnReorder?: (ids: string[]) => void;
|
|
75
|
+
/** Render a caller-owned toolbar instead of the built-in global filter.
|
|
76
|
+
* The function receives the live filter values and setters. */
|
|
77
|
+
toolbar?: (slot: DataTableToolbarSlot) => ReactNode;
|
|
75
78
|
/** Applied to the root vessel. */
|
|
76
79
|
style?: CSSProperties;
|
|
77
80
|
}
|
|
81
|
+
/** A stable toolbar contract: the wrapper owns TanStack's state atoms and
|
|
82
|
+
* exposes only the two filter decisions a caller toolbar needs. */
|
|
83
|
+
export interface DataTableToolbarSlot {
|
|
84
|
+
/** The current global filter value; empty string reads as no filter. */
|
|
85
|
+
globalFilter: string;
|
|
86
|
+
setGlobalFilter(value: string): void;
|
|
87
|
+
/** Current per-column filters, each as `{ id, value }`. */
|
|
88
|
+
columnFilters: Array<{
|
|
89
|
+
id: string;
|
|
90
|
+
value: unknown;
|
|
91
|
+
}>;
|
|
92
|
+
setColumnFilters(filters: Array<{
|
|
93
|
+
id: string;
|
|
94
|
+
value: unknown;
|
|
95
|
+
}>): void;
|
|
96
|
+
clearFilters(): void;
|
|
97
|
+
}
|
|
78
98
|
declare function DataTableImpl(rawProps: DataTableProps): import("react").JSX.Element;
|
|
79
99
|
export declare const DataTable: typeof DataTableImpl & {
|
|
80
100
|
Root: typeof DataTableImpl;
|
|
@@ -2,7 +2,7 @@ import { r as iconNode } from "../../icon-C9udWCyz.mjs";
|
|
|
2
2
|
import { t as withSelfRoot } from "../../family-Co1YsN4N.mjs";
|
|
3
3
|
import { n as useComponentMessages, t as formatMessage } from "../../messages-B6n0lVyt.mjs";
|
|
4
4
|
import { Pagination } from "../pagination/index.mjs";
|
|
5
|
-
import { t as Select$1 } from "../../select-
|
|
5
|
+
import { t as Select$1 } from "../../select-BLFqfeVw.mjs";
|
|
6
6
|
import { injectComponentStyle } from "@bysages/core/styling";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
import { useEffect, useLayoutEffect, useMemo, useReducer, useRef, useState } from "react";
|
|
@@ -584,13 +584,16 @@ function DataTableImpl(rawProps) {
|
|
|
584
584
|
children: [/* @__PURE__ */ jsx(Select$1.Control, { children: /* @__PURE__ */ jsxs(Select$1.Trigger, {
|
|
585
585
|
"aria-label": messages.table.rowsPerPage,
|
|
586
586
|
children: [/* @__PURE__ */ jsx(Select$1.ValueText, {}), /* @__PURE__ */ jsx(Select$1.Indicator, { children: chevronDownIcon })]
|
|
587
|
-
}) }), /* @__PURE__ */ jsx(Select$1.Positioner, {
|
|
588
|
-
|
|
589
|
-
children:
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
587
|
+
}) }), /* @__PURE__ */ jsx(Select$1.Positioner, {
|
|
588
|
+
portal: true,
|
|
589
|
+
children: /* @__PURE__ */ jsx(Select$1.Content, { children: sizeItems.items.map((item) => /* @__PURE__ */ jsxs(Select$1.Item, {
|
|
590
|
+
item,
|
|
591
|
+
children: [/* @__PURE__ */ jsx(Select$1.ItemText, { children: item.label }), /* @__PURE__ */ jsx(Select$1.ItemIndicator, { children: iconNode("check", {
|
|
592
|
+
width: 14,
|
|
593
|
+
height: 14
|
|
594
|
+
}) })]
|
|
595
|
+
}, item.value)) })
|
|
596
|
+
})]
|
|
594
597
|
});
|
|
595
598
|
const pager = /* @__PURE__ */ jsxs(Pagination.Root, {
|
|
596
599
|
count: rowCount,
|
|
@@ -621,7 +624,19 @@ function DataTableImpl(rawProps) {
|
|
|
621
624
|
})]
|
|
622
625
|
});
|
|
623
626
|
})() : null;
|
|
624
|
-
const
|
|
627
|
+
const toolbarSlot = filterable ? {
|
|
628
|
+
globalFilter: table.atoms.globalFilter.get() ?? "",
|
|
629
|
+
setGlobalFilter: (value) => table.setGlobalFilter(value),
|
|
630
|
+
columnFilters: table.atoms.columnFilters.get().map((filter) => ({ ...filter })),
|
|
631
|
+
setColumnFilters: (filters) => table.setColumnFilters(filters),
|
|
632
|
+
clearFilters: () => table.setColumnFilters([])
|
|
633
|
+
} : void 0;
|
|
634
|
+
const customToolbar = toolbarSlot ? props.toolbar?.(toolbarSlot) : void 0;
|
|
635
|
+
const toolbar = customToolbar !== void 0 ? /* @__PURE__ */ jsx("div", {
|
|
636
|
+
"data-scope": "table",
|
|
637
|
+
"data-part": "toolbar",
|
|
638
|
+
children: customToolbar
|
|
639
|
+
}) : filterable && showToolbar ? /* @__PURE__ */ jsx("div", {
|
|
625
640
|
"data-scope": "table",
|
|
626
641
|
"data-part": "toolbar",
|
|
627
642
|
children: /* @__PURE__ */ jsx("input", {
|
|
@@ -1,7 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as FloatingPortalTarget, t as FloatingPortalProps } from "../../floating-BhcDRgnx.mjs";
|
|
2
|
+
import { ComponentProps, ReactNode } from "react";
|
|
2
3
|
import { Tooltip as Tooltip$1 } from "@ark-ui/react/tooltip";
|
|
4
|
+
/** Ark's Tooltip, dressed in the paper-and-ink system: the smallest
|
|
5
|
+
* vessel — a tight chip of ink that dissolves in over its anchor. The
|
|
6
|
+
* API is Ark's own — Root, Trigger, Positioner, Content, Arrow, ArrowTip. */
|
|
7
|
+
declare function TooltipRoot(props: ComponentProps<typeof Tooltip$1.Root>): import("react").JSX.Element;
|
|
3
8
|
type TooltipPlacement = "top" | "top-start" | "top-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end" | "right" | "right-start" | "right-end";
|
|
4
9
|
export interface TooltipFacadeProps {
|
|
10
|
+
/** Portal after hydration; `false` keeps the vessel inline. */
|
|
11
|
+
portal?: FloatingPortalTarget;
|
|
5
12
|
open?: boolean;
|
|
6
13
|
defaultOpen?: boolean;
|
|
7
14
|
trigger: ReactNode;
|
|
@@ -10,10 +17,17 @@ export interface TooltipFacadeProps {
|
|
|
10
17
|
placement?: TooltipPlacement;
|
|
11
18
|
onOpenChange?: (open: boolean) => void;
|
|
12
19
|
}
|
|
13
|
-
declare
|
|
20
|
+
declare const TooltipPositioner: {
|
|
21
|
+
({ portal, ...rest }: FloatingPortalProps & Tooltip$1.PositionerProps & import("react").RefAttributes<HTMLDivElement>): import("react").JSX.Element;
|
|
22
|
+
displayName: string;
|
|
23
|
+
};
|
|
24
|
+
declare function TooltipFacade({ portal, open, defaultOpen, trigger, content, disabled, placement, onOpenChange }: TooltipFacadeProps): import("react").JSX.Element;
|
|
14
25
|
declare namespace TooltipFacade {
|
|
15
26
|
var displayName: string;
|
|
16
27
|
}
|
|
17
|
-
type TooltipParts = typeof Tooltip$1
|
|
28
|
+
type TooltipParts = Omit<typeof Tooltip$1, "Root" | "Positioner"> & {
|
|
29
|
+
Positioner: typeof TooltipPositioner;
|
|
30
|
+
Root: typeof TooltipRoot;
|
|
31
|
+
};
|
|
18
32
|
export declare const Tooltip: typeof TooltipFacade & TooltipParts;
|
|
19
33
|
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { t as useElementId } from "../../id-Ctic_3o8.mjs";
|
|
2
|
+
import { n as definePositioner, t as FloatingPortal } from "../../floating-CMR7cvmA.mjs";
|
|
2
3
|
import { injectComponentStyle } from "@bysages/core/styling";
|
|
3
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
5
|
import { isValidElement } from "react";
|
|
@@ -14,7 +15,8 @@ function TooltipRoot(props) {
|
|
|
14
15
|
id
|
|
15
16
|
});
|
|
16
17
|
}
|
|
17
|
-
|
|
18
|
+
const TooltipPositioner = definePositioner(Tooltip$1.Positioner);
|
|
19
|
+
function TooltipFacade({ portal = false, open, defaultOpen, trigger, content, disabled = false, placement, onOpenChange }) {
|
|
18
20
|
return /* @__PURE__ */ jsxs(TooltipRoot, {
|
|
19
21
|
...placement === void 0 ? {} : { positioning: { placement } },
|
|
20
22
|
...open === void 0 ? {} : { open },
|
|
@@ -24,12 +26,16 @@ function TooltipFacade({ open, defaultOpen, trigger, content, disabled = false,
|
|
|
24
26
|
asChild: isValidElement(trigger),
|
|
25
27
|
disabled,
|
|
26
28
|
children: trigger
|
|
27
|
-
}), /* @__PURE__ */ jsx(
|
|
29
|
+
}), /* @__PURE__ */ jsx(FloatingPortal, {
|
|
30
|
+
portal,
|
|
31
|
+
children: /* @__PURE__ */ jsx(Tooltip$1.Positioner, { children: /* @__PURE__ */ jsxs(Tooltip$1.Content, { children: [/* @__PURE__ */ jsx(Tooltip$1.Arrow, { children: /* @__PURE__ */ jsx(Tooltip$1.ArrowTip, {}) }), content] }) })
|
|
32
|
+
})]
|
|
28
33
|
});
|
|
29
34
|
}
|
|
30
35
|
TooltipFacade.displayName = "STooltip";
|
|
31
36
|
const Tooltip = Object.assign(TooltipFacade, {
|
|
32
37
|
...Tooltip$1,
|
|
38
|
+
Positioner: TooltipPositioner,
|
|
33
39
|
Root: TooltipRoot
|
|
34
40
|
});
|
|
35
41
|
injectComponentStyle("tooltip");
|
|
@@ -1,17 +1,34 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as FloatingPortalTarget, t as FloatingPortalProps } from "../../floating-BhcDRgnx.mjs";
|
|
2
|
+
import { ComponentProps, ReactNode } from "react";
|
|
2
3
|
import { Tour as Tour$1, TourInteractOutsideEvent, TourPointerDownOutsideEvent, TourStepDetails, UseTourProps, UseTourReturn } from "@ark-ui/react/tour";
|
|
4
|
+
/** Ark's Tour, dressed in the paper-and-ink system: a dimmed page where
|
|
5
|
+
* the spotlight alone keeps the focus halo, and the anchored card rides
|
|
6
|
+
* the shared popup vessel. The API is Ark's own — Root, Backdrop,
|
|
7
|
+
* Spotlight, Positioner, Content, Arrow, ArrowTip, Title, Description,
|
|
8
|
+
* ProgressText, Control, Actions, ActionTrigger, CloseTrigger, plus
|
|
9
|
+
* useTour. */
|
|
10
|
+
declare function TourRoot(props: ComponentProps<typeof Tour$1.Root>): import("react").JSX.Element;
|
|
3
11
|
export interface TourFacadeProps {
|
|
12
|
+
/** Portal after hydration; `false` keeps the vessel inline. */
|
|
13
|
+
portal?: FloatingPortalTarget;
|
|
4
14
|
tour: UseTourReturn;
|
|
5
15
|
trigger?: string;
|
|
6
16
|
/** Replaces the standard card body when supplied. */
|
|
7
17
|
content?: ReactNode;
|
|
8
18
|
children?: ReactNode;
|
|
9
19
|
}
|
|
10
|
-
declare
|
|
20
|
+
declare const TourPositioner: {
|
|
21
|
+
({ portal, ...rest }: FloatingPortalProps & Tour$1.PositionerProps & import("react").RefAttributes<HTMLDivElement>): import("react").JSX.Element;
|
|
22
|
+
displayName: string;
|
|
23
|
+
};
|
|
24
|
+
declare function TourFacade({ portal, tour, trigger, content, children }: TourFacadeProps): import("react").JSX.Element;
|
|
11
25
|
declare namespace TourFacade {
|
|
12
26
|
var displayName: string;
|
|
13
27
|
}
|
|
14
|
-
type TourParts = typeof Tour$1
|
|
28
|
+
type TourParts = Omit<typeof Tour$1, "Root" | "Positioner"> & {
|
|
29
|
+
Positioner: typeof TourPositioner;
|
|
30
|
+
Root: typeof TourRoot;
|
|
31
|
+
};
|
|
15
32
|
export declare const Tour: typeof TourFacade & TourParts;
|
|
16
33
|
/** Tour machines are created by useTour, so the stable id belongs there. */
|
|
17
34
|
export declare function useTour(props?: UseTourProps): UseTourReturn;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { t as useElementId } from "../../id-Ctic_3o8.mjs";
|
|
2
2
|
import { Button } from "../button/index.mjs";
|
|
3
|
+
import { n as definePositioner, t as FloatingPortal } from "../../floating-CMR7cvmA.mjs";
|
|
3
4
|
import { injectComponentStyle } from "@bysages/core/styling";
|
|
4
5
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
5
6
|
import { Tour as Tour$1, useTour as useTour$1 } from "@ark-ui/react/tour";
|
|
@@ -13,7 +14,8 @@ import { Tour as Tour$1, useTour as useTour$1 } from "@ark-ui/react/tour";
|
|
|
13
14
|
function TourRoot(props) {
|
|
14
15
|
return /* @__PURE__ */ jsx(Tour$1.Root, { ...props });
|
|
15
16
|
}
|
|
16
|
-
|
|
17
|
+
const TourPositioner = definePositioner(Tour$1.Positioner);
|
|
18
|
+
function TourFacade({ portal = true, tour, trigger = "Start tour", content, children }) {
|
|
17
19
|
return /* @__PURE__ */ jsxs(TourRoot, {
|
|
18
20
|
tour,
|
|
19
21
|
children: [
|
|
@@ -25,21 +27,25 @@ function TourFacade({ tour, trigger = "Start tour", content, children }) {
|
|
|
25
27
|
children,
|
|
26
28
|
/* @__PURE__ */ jsx(Tour$1.Backdrop, {}),
|
|
27
29
|
/* @__PURE__ */ jsx(Tour$1.Spotlight, {}),
|
|
28
|
-
/* @__PURE__ */ jsx(
|
|
29
|
-
|
|
30
|
-
/* @__PURE__ */ jsx(Tour$1.
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
children: action.
|
|
35
|
-
|
|
36
|
-
|
|
30
|
+
/* @__PURE__ */ jsx(FloatingPortal, {
|
|
31
|
+
portal,
|
|
32
|
+
children: /* @__PURE__ */ jsx(Tour$1.Positioner, { children: /* @__PURE__ */ jsx(Tour$1.Content, { children: content ?? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
33
|
+
/* @__PURE__ */ jsx(Tour$1.ProgressText, {}),
|
|
34
|
+
/* @__PURE__ */ jsx(Tour$1.Title, {}),
|
|
35
|
+
/* @__PURE__ */ jsx(Tour$1.Description, {}),
|
|
36
|
+
/* @__PURE__ */ jsx(Tour$1.Control, { children: /* @__PURE__ */ jsx(Tour$1.Actions, { children: (actions) => actions.map((action) => /* @__PURE__ */ jsx(Tour$1.ActionTrigger, {
|
|
37
|
+
action,
|
|
38
|
+
children: action.label
|
|
39
|
+
}, action.label)) }) })
|
|
40
|
+
] }) }) })
|
|
41
|
+
})
|
|
37
42
|
]
|
|
38
43
|
});
|
|
39
44
|
}
|
|
40
45
|
TourFacade.displayName = "STour";
|
|
41
46
|
const Tour = Object.assign(TourFacade, {
|
|
42
47
|
...Tour$1,
|
|
48
|
+
Positioner: TourPositioner,
|
|
43
49
|
Root: TourRoot
|
|
44
50
|
});
|
|
45
51
|
/** Tour machines are created by useTour, so the stable id belongs there. */
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as FloatingPortalTarget } from "../../floating-BhcDRgnx.mjs";
|
|
2
|
+
import { t as Popover } from "../../index-j02dTkfc.mjs";
|
|
2
3
|
import { HTMLAttributes } from "react";
|
|
3
4
|
export interface TreeSelectNode {
|
|
4
5
|
label: string;
|
|
@@ -14,6 +15,8 @@ export interface TreeSelectNode {
|
|
|
14
15
|
* matches keep their ancestors and the branches fan open.
|
|
15
16
|
*/
|
|
16
17
|
export interface TreeSelectProps extends HTMLAttributes<HTMLDivElement> {
|
|
18
|
+
/** Portal after hydration; `false` keeps the vessel inline. */
|
|
19
|
+
portal?: FloatingPortalTarget;
|
|
17
20
|
value?: string;
|
|
18
21
|
data: TreeSelectNode[];
|
|
19
22
|
placeholder?: string;
|
|
@@ -24,6 +27,6 @@ export interface TreeSelectProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
24
27
|
size?: "sm" | "md" | "lg";
|
|
25
28
|
onValueChange?: (value: string) => void;
|
|
26
29
|
}
|
|
27
|
-
declare function TreeSelectImpl({ value, data, placeholder, filterable, disabled, size, onValueChange, ...rest }: TreeSelectProps): import("react").JSX.Element;
|
|
30
|
+
declare function TreeSelectImpl({ portal, value, data, placeholder, filterable, disabled, size, onValueChange, ...rest }: TreeSelectProps): import("react").JSX.Element;
|
|
28
31
|
export declare const TreeSelect: typeof TreeSelectImpl & typeof Popover;
|
|
29
32
|
export {};
|