@bysages/react 0.3.1 → 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-BfKTmtCt.mjs → ai-response-B4DX7nmJ.mjs} +3 -1
- 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 +1 -1
- package/dist/components/ai/index.mjs +5 -3
- 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 +16 -44
- 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 +10 -14
- 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 +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 +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 +6 -1
- 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 +2 -11
- package/dist/components/block-ui/index.d.mts +4 -1
- package/dist/components/block-ui/index.mjs +3 -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 +12 -35
- 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 +7 -1
- 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 +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 +3 -1
- package/dist/components/data-view/index.d.mts +4 -1
- package/dist/components/data-view/index.mjs +3 -1
- 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 +10 -18
- 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 +29 -9
- package/dist/components/file-upload/index.mjs +46 -10
- 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 +5 -2
- package/dist/components/image/index.mjs +14 -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 -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/json-tree-view/index.d.mts +17 -1
- package/dist/components/json-tree-view/index.mjs +26 -5
- 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 +157 -63
- package/dist/components/link/index.d.mts +4 -1
- package/dist/components/link/index.mjs +3 -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 +6 -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 +26 -24
- 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 +3 -1
- package/dist/components/split-button/index.d.mts +3 -1
- package/dist/components/split-button/index.mjs +12 -17
- 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 +26 -6
- package/dist/components/steps/index.mjs +26 -11
- 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 +26 -56
- 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 +3 -1
- 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 +19 -5
- package/dist/components/toc/index.mjs +31 -5
- 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 +14 -26
- package/dist/components/tree-select/index.d.mts +3 -1
- package/dist/components/tree-select/index.mjs +11 -22
- package/dist/components/tree-view/index.d.mts +22 -2
- package/dist/components/tree-view/index.mjs +50 -8
- 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 +10 -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-Iy8m0Qev.d.mts → index-D_iKc2Uw.d.mts} +31 -2
- package/dist/{index-Dn5mHf1g.d.mts → index-DdNKngUQ.d.mts} +56 -17
- 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-C21Zzuy6.mjs} +3 -1
- package/dist/media-player-gQrnxU52.mjs +554 -0
- package/dist/{mentions-DMIBCBOd.mjs → mentions-BuWibdci.mjs} +74 -42
- package/dist/select-ozUFq0zd.mjs +121 -0
- package/package.json +3 -3
- package/dist/chevron-BeHvt46K.mjs +0 -17
- package/dist/glyph-VI989p8H.mjs +0 -14
- package/dist/select-eAHutw56.mjs +0 -70
|
@@ -1,18 +1,38 @@
|
|
|
1
|
-
import { ComponentProps } from "react";
|
|
1
|
+
import { CSSProperties, ComponentProps } from "react";
|
|
2
2
|
import { Pagination as Pagination$1 } from "@ark-ui/react/pagination";
|
|
3
3
|
//#region src/components/pagination/index.d.ts
|
|
4
4
|
type PaginationRootProps = ComponentProps<typeof Pagination$1.Root> & {
|
|
5
5
|
/** One rung of the control-height ladder every page seal shares. */
|
|
6
6
|
size?: "sm" | "md" | "lg";
|
|
7
7
|
};
|
|
8
|
-
declare function PaginationRoot(
|
|
8
|
+
declare function PaginationRoot(props: PaginationRootProps): import("react").JSX.Element;
|
|
9
9
|
/**
|
|
10
10
|
* Pagination — paged navigation.
|
|
11
11
|
*
|
|
12
12
|
* Parts: Root, Item (page seals), Ellipsis, PrevTrigger, NextTrigger,
|
|
13
13
|
* FirstTrigger, LastTrigger. Items carry data-selected.
|
|
14
14
|
*/
|
|
15
|
-
|
|
15
|
+
type PaginationFacadeProps = {
|
|
16
|
+
value?: number;
|
|
17
|
+
defaultValue?: number;
|
|
18
|
+
count?: number;
|
|
19
|
+
pageSize?: number;
|
|
20
|
+
defaultPageSize?: number;
|
|
21
|
+
siblingCount?: number;
|
|
22
|
+
label?: string;
|
|
23
|
+
size?: "sm" | "md" | "lg";
|
|
24
|
+
className?: string;
|
|
25
|
+
style?: CSSProperties;
|
|
26
|
+
onValueChange?: (page: number) => void;
|
|
27
|
+
};
|
|
28
|
+
declare const PaginationPrevTrigger: import("react").ForwardRefExoticComponent<Pagination$1.PrevTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
29
|
+
declare const PaginationNextTrigger: import("react").ForwardRefExoticComponent<Pagination$1.NextTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
30
|
+
/** The complete pagination bar behind one page: count and page size become
|
|
31
|
+
* the visible ladder, with edge semantics left to anatomy. */
|
|
32
|
+
declare function PaginationFacade(props: PaginationFacadeProps): import("react").JSX.Element;
|
|
33
|
+
export declare const Pagination: typeof PaginationFacade & Omit<typeof Pagination$1, "Root" | "PrevTrigger" | "NextTrigger"> & {
|
|
16
34
|
Root: typeof PaginationRoot;
|
|
35
|
+
PrevTrigger: typeof PaginationPrevTrigger;
|
|
36
|
+
NextTrigger: typeof PaginationNextTrigger;
|
|
17
37
|
};
|
|
18
38
|
//#endregion
|
|
@@ -1,23 +1,68 @@
|
|
|
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 { Pagination as Pagination$1 } from "@ark-ui/react/pagination";
|
|
4
6
|
//#region src/components/pagination/index.tsx
|
|
5
|
-
function PaginationRoot(
|
|
7
|
+
function PaginationRoot(props) {
|
|
8
|
+
injectComponentStyle("pagination");
|
|
9
|
+
const id = useElementId("pagination", props);
|
|
10
|
+
const { size = "md", ...rest } = props;
|
|
6
11
|
return /* @__PURE__ */ jsx(Pagination$1.Root, {
|
|
7
12
|
...rest,
|
|
13
|
+
id,
|
|
8
14
|
"data-size": size
|
|
9
15
|
});
|
|
10
16
|
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
*
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
17
|
+
const PaginationPrevTrigger = Pagination$1.PrevTrigger;
|
|
18
|
+
const PaginationNextTrigger = Pagination$1.NextTrigger;
|
|
19
|
+
/** The complete pagination bar behind one page: count and page size become
|
|
20
|
+
* the visible ladder, with edge semantics left to anatomy. */
|
|
21
|
+
function PaginationFacade(props) {
|
|
22
|
+
const { value, defaultValue, count = 0, pageSize, defaultPageSize, siblingCount = 1, label, size = "md", className, style, onValueChange } = props;
|
|
23
|
+
return /* @__PURE__ */ jsxs(PaginationRoot, {
|
|
24
|
+
size,
|
|
25
|
+
"aria-label": label,
|
|
26
|
+
count,
|
|
27
|
+
defaultPage: defaultValue,
|
|
28
|
+
page: value,
|
|
29
|
+
...pageSize === void 0 ? {} : { pageSize },
|
|
30
|
+
...defaultPageSize === void 0 ? {} : { defaultPageSize },
|
|
31
|
+
siblingCount,
|
|
32
|
+
className,
|
|
33
|
+
style,
|
|
34
|
+
onPageChange: (event) => onValueChange?.(event.page),
|
|
35
|
+
children: [
|
|
36
|
+
/* @__PURE__ */ jsx(PaginationPrevTrigger, {
|
|
37
|
+
"aria-label": "Previous page",
|
|
38
|
+
children: iconNode("chevron-left", {
|
|
39
|
+
width: 14,
|
|
40
|
+
height: 14
|
|
41
|
+
})
|
|
42
|
+
}),
|
|
43
|
+
/* @__PURE__ */ jsx(Pagination$1.Context, { children: (pagination) => pagination.pages.map((page, index) => page.type === "page" ? /* @__PURE__ */ jsx(Pagination$1.Item, {
|
|
44
|
+
type: "page",
|
|
45
|
+
value: page.value,
|
|
46
|
+
children: page.value
|
|
47
|
+
}, page.value) : /* @__PURE__ */ jsx(Pagination$1.Ellipsis, {
|
|
48
|
+
index,
|
|
49
|
+
children: "…"
|
|
50
|
+
}, `ellipsis-${index}`)) }),
|
|
51
|
+
/* @__PURE__ */ jsx(PaginationNextTrigger, {
|
|
52
|
+
"aria-label": "Next page",
|
|
53
|
+
children: iconNode("chevron-right", {
|
|
54
|
+
width: 14,
|
|
55
|
+
height: 14
|
|
56
|
+
})
|
|
57
|
+
})
|
|
58
|
+
]
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
const Pagination = Object.assign(PaginationFacade, {
|
|
18
62
|
...Pagination$1,
|
|
19
|
-
Root: PaginationRoot
|
|
20
|
-
|
|
21
|
-
|
|
63
|
+
Root: PaginationRoot,
|
|
64
|
+
PrevTrigger: PaginationPrevTrigger,
|
|
65
|
+
NextTrigger: PaginationNextTrigger
|
|
66
|
+
});
|
|
22
67
|
//#endregion
|
|
23
68
|
export { Pagination };
|
|
@@ -5,12 +5,30 @@ type PasswordInputRootProps = ComponentProps<typeof PasswordInput$1.Root> & {
|
|
|
5
5
|
/** One rung of the control-height ladder for the field and its eye. */
|
|
6
6
|
size?: "sm" | "md" | "lg";
|
|
7
7
|
};
|
|
8
|
-
declare function PasswordInputRoot(
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
declare function PasswordInputRoot(props: PasswordInputRootProps): import("react").JSX.Element;
|
|
9
|
+
interface PasswordInputFacadeProps {
|
|
10
|
+
value?: string;
|
|
11
|
+
defaultValue?: string;
|
|
12
|
+
label?: string;
|
|
13
|
+
placeholder?: string;
|
|
14
|
+
autoComplete?: "current-password" | "new-password";
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
invalid?: boolean;
|
|
17
|
+
required?: boolean;
|
|
18
|
+
size?: "sm" | "md" | "lg";
|
|
19
|
+
onValueChange?: (value: string) => void;
|
|
20
|
+
}
|
|
21
|
+
/** The one-tag path: the masked field and reveal control. Visibility
|
|
22
|
+
* state, password-manager rules, and validation stay on the anatomy. */
|
|
23
|
+
declare function PasswordInputFacade({ value, defaultValue, label, placeholder, autoComplete, disabled, invalid, required, size, onValueChange }: PasswordInputFacadeProps): import("react").JSX.Element;
|
|
24
|
+
export declare const PasswordInput: typeof PasswordInputFacade & {
|
|
14
25
|
Root: typeof PasswordInputRoot;
|
|
26
|
+
Context: (props: PasswordInput$1.ContextProps) => import("react").ReactNode;
|
|
27
|
+
Control: import("react").ForwardRefExoticComponent<PasswordInput$1.ControlProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
28
|
+
Indicator: import("react").ForwardRefExoticComponent<PasswordInput$1.IndicatorProps & import("react").RefAttributes<HTMLSpanElement>>;
|
|
29
|
+
Input: import("react").ForwardRefExoticComponent<PasswordInput$1.InputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
30
|
+
Label: import("react").ForwardRefExoticComponent<PasswordInput$1.LabelProps & import("react").RefAttributes<HTMLLabelElement>>;
|
|
31
|
+
RootProvider: import("react").ForwardRefExoticComponent<PasswordInput$1.RootProviderProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
32
|
+
VisibilityTrigger: import("react").ForwardRefExoticComponent<PasswordInput$1.VisibilityTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
15
33
|
};
|
|
16
34
|
//#endregion
|
|
@@ -1,21 +1,44 @@
|
|
|
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 { PasswordInput as PasswordInput$1 } from "@ark-ui/react/password-input";
|
|
4
6
|
//#region src/components/password-input/index.tsx
|
|
5
|
-
function PasswordInputRoot(
|
|
7
|
+
function PasswordInputRoot(props) {
|
|
8
|
+
const id = useElementId("password-input", props);
|
|
9
|
+
const { size = "md", ...rest } = props;
|
|
6
10
|
return /* @__PURE__ */ jsx(PasswordInput$1.Root, {
|
|
7
11
|
...rest,
|
|
12
|
+
id,
|
|
8
13
|
"data-size": size
|
|
9
14
|
});
|
|
10
15
|
}
|
|
11
|
-
/**
|
|
12
|
-
*
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
+
/** The one-tag path: the masked field and reveal control. Visibility
|
|
17
|
+
* state, password-manager rules, and validation stay on the anatomy. */
|
|
18
|
+
function PasswordInputFacade({ value, defaultValue, label, placeholder, autoComplete, disabled = false, invalid = false, required = false, size = "md", onValueChange }) {
|
|
19
|
+
return /* @__PURE__ */ jsxs(PasswordInputRoot, {
|
|
20
|
+
size,
|
|
21
|
+
autoComplete,
|
|
22
|
+
disabled,
|
|
23
|
+
invalid,
|
|
24
|
+
required,
|
|
25
|
+
children: [label ? /* @__PURE__ */ jsx(PasswordInput$1.Label, { children: label }) : null, /* @__PURE__ */ jsxs(PasswordInput$1.Control, { children: [/* @__PURE__ */ jsx(PasswordInput$1.Input, {
|
|
26
|
+
placeholder,
|
|
27
|
+
defaultValue,
|
|
28
|
+
...value === void 0 ? {} : {
|
|
29
|
+
value,
|
|
30
|
+
onChange: (event) => onValueChange?.(event.target.value)
|
|
31
|
+
}
|
|
32
|
+
}), /* @__PURE__ */ jsx(PasswordInput$1.VisibilityTrigger, { children: /* @__PURE__ */ jsx(PasswordInput$1.Indicator, {
|
|
33
|
+
fallback: iconNode("eye-off"),
|
|
34
|
+
children: iconNode("eye")
|
|
35
|
+
}) })] })]
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
const PasswordInput = Object.assign(PasswordInputFacade, {
|
|
16
39
|
...PasswordInput$1,
|
|
17
40
|
Root: PasswordInputRoot
|
|
18
|
-
};
|
|
41
|
+
});
|
|
19
42
|
injectComponentStyle("password-input");
|
|
20
43
|
//#endregion
|
|
21
44
|
export { PasswordInput };
|
|
@@ -5,11 +5,29 @@ type PinInputRootProps = ComponentProps<typeof PinInput$1.Root> & {
|
|
|
5
5
|
/** One rung of the control-height ladder each seal stands on. */
|
|
6
6
|
size?: "sm" | "md" | "lg";
|
|
7
7
|
};
|
|
8
|
-
declare function PinInputRoot(
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
declare function PinInputRoot(props: PinInputRootProps): import("react").JSX.Element;
|
|
9
|
+
interface PinInputFacadeProps {
|
|
10
|
+
value?: string[];
|
|
11
|
+
defaultValue?: string[];
|
|
12
|
+
label?: string;
|
|
13
|
+
placeholder?: string;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
invalid?: boolean;
|
|
16
|
+
required?: boolean;
|
|
17
|
+
length?: number;
|
|
18
|
+
size?: "sm" | "md" | "lg";
|
|
19
|
+
onValueChange?: (value: string[]) => void;
|
|
20
|
+
}
|
|
21
|
+
/** The one-tag path for an even run of seals; OTP, masks, and custom
|
|
22
|
+
* validation stay on the anatomy. */
|
|
23
|
+
declare function PinInputFacade({ value, defaultValue, label, placeholder, disabled, invalid, required, length, size, onValueChange }: PinInputFacadeProps): import("react").JSX.Element;
|
|
24
|
+
export declare const PinInput: typeof PinInputFacade & {
|
|
13
25
|
Root: typeof PinInputRoot;
|
|
26
|
+
Context: (props: PinInput$1.ContextProps) => import("react").ReactNode;
|
|
27
|
+
Control: import("react").ForwardRefExoticComponent<PinInput$1.ControlProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
28
|
+
HiddenInput: import("react").ForwardRefExoticComponent<PinInput$1.HiddenInputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
29
|
+
Input: import("react").ForwardRefExoticComponent<PinInput$1.InputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
30
|
+
Label: import("react").ForwardRefExoticComponent<PinInput$1.LabelProps & import("react").RefAttributes<HTMLLabelElement>>;
|
|
31
|
+
RootProvider: import("react").ForwardRefExoticComponent<PinInput$1.RootProviderProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
14
32
|
};
|
|
15
33
|
//#endregion
|
|
@@ -1,20 +1,42 @@
|
|
|
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 { PinInput as PinInput$1 } from "@ark-ui/react/pin-input";
|
|
4
5
|
//#region src/components/pin-input/index.tsx
|
|
5
|
-
function PinInputRoot(
|
|
6
|
+
function PinInputRoot(props) {
|
|
7
|
+
const id = useElementId("pin-input", props);
|
|
8
|
+
const { size = "md", ...rest } = props;
|
|
6
9
|
return /* @__PURE__ */ jsx(PinInput$1.Root, {
|
|
7
10
|
...rest,
|
|
11
|
+
id,
|
|
8
12
|
"data-size": size
|
|
9
13
|
});
|
|
10
14
|
}
|
|
11
|
-
/**
|
|
12
|
-
*
|
|
13
|
-
|
|
14
|
-
|
|
15
|
+
/** The one-tag path for an even run of seals; OTP, masks, and custom
|
|
16
|
+
* validation stay on the anatomy. */
|
|
17
|
+
function PinInputFacade({ value, defaultValue, label, placeholder = "·", disabled = false, invalid = false, required = false, length = 4, size = "md", onValueChange }) {
|
|
18
|
+
return /* @__PURE__ */ jsxs(PinInputRoot, {
|
|
19
|
+
size,
|
|
20
|
+
disabled,
|
|
21
|
+
invalid,
|
|
22
|
+
required,
|
|
23
|
+
placeholder,
|
|
24
|
+
defaultValue,
|
|
25
|
+
...value === void 0 ? {} : {
|
|
26
|
+
value,
|
|
27
|
+
onValueChange: (details) => onValueChange?.(details.value)
|
|
28
|
+
},
|
|
29
|
+
children: [
|
|
30
|
+
label ? /* @__PURE__ */ jsx(PinInput$1.Label, { children: label }) : null,
|
|
31
|
+
/* @__PURE__ */ jsx(PinInput$1.Control, { children: Array.from({ length }, (_, index) => /* @__PURE__ */ jsx(PinInput$1.Input, { index }, index)) }),
|
|
32
|
+
/* @__PURE__ */ jsx(PinInput$1.HiddenInput, {})
|
|
33
|
+
]
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
const PinInput = Object.assign(PinInputFacade, {
|
|
15
37
|
...PinInput$1,
|
|
16
38
|
Root: PinInputRoot
|
|
17
|
-
};
|
|
39
|
+
});
|
|
18
40
|
injectComponentStyle("pin-input");
|
|
19
41
|
//#endregion
|
|
20
42
|
export { PinInput };
|
|
@@ -1,13 +1,16 @@
|
|
|
1
|
+
import { t as Popover } from "../../index-Eu-Bttta.mjs";
|
|
1
2
|
import { ReactNode } from "react";
|
|
2
3
|
//#region src/components/popconfirm/index.d.ts
|
|
3
4
|
/**
|
|
4
5
|
* A question at the point of no return: the trigger opens a small
|
|
5
|
-
* anchored vessel carrying the message and two answers.
|
|
6
|
-
*
|
|
7
|
-
* either way. The children are the
|
|
8
|
-
* (wrap a group in a span
|
|
6
|
+
* anchored vessel carrying the message and two answers. Each answer is
|
|
7
|
+
* a close trigger: the answer reports through its own handler and the
|
|
8
|
+
* popover machine folds the panel either way. The children are the
|
|
9
|
+
* trigger; give it a single element (wrap a group in a span
|
|
10
|
+
* otherwise).
|
|
9
11
|
*/
|
|
10
12
|
export interface PopconfirmProps {
|
|
13
|
+
id?: string;
|
|
11
14
|
/** The question the reader is answering. */
|
|
12
15
|
message: string;
|
|
13
16
|
confirmText?: string;
|
|
@@ -16,5 +19,6 @@ export interface PopconfirmProps {
|
|
|
16
19
|
onConfirm?: () => void;
|
|
17
20
|
onCancel?: () => void;
|
|
18
21
|
}
|
|
19
|
-
|
|
22
|
+
declare function PopconfirmImpl({ message, confirmText, cancelText, children, onConfirm, onCancel, id }: PopconfirmProps): import("react").JSX.Element;
|
|
23
|
+
export declare const Popconfirm: typeof PopconfirmImpl & typeof Popover;
|
|
20
24
|
//#endregion
|
|
@@ -1,20 +1,16 @@
|
|
|
1
|
+
import { t as useElementId } from "../../id-C37UYLwJ.mjs";
|
|
1
2
|
import { Button } from "../button/index.mjs";
|
|
3
|
+
import { Popover as Popover$1 } from "../popover/index.mjs";
|
|
2
4
|
import { injectComponentStyle } from "@bysages/core";
|
|
3
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
-
import { useState } from "react";
|
|
5
6
|
import { Popover } from "@ark-ui/react/popover";
|
|
6
7
|
import { Portal } from "@ark-ui/react/portal";
|
|
7
8
|
//#region src/components/popconfirm/index.tsx
|
|
8
|
-
function
|
|
9
|
+
function PopconfirmImpl({ message, confirmText = "Confirm", cancelText = "Cancel", children, onConfirm, onCancel, id }) {
|
|
9
10
|
injectComponentStyle("popconfirm");
|
|
10
|
-
const
|
|
11
|
-
function settle(confirmed) {
|
|
12
|
-
setOpen(false);
|
|
13
|
-
(confirmed ? onConfirm : onCancel)?.();
|
|
14
|
-
}
|
|
11
|
+
const hostId = useElementId("popconfirm", { id });
|
|
15
12
|
return /* @__PURE__ */ jsxs(Popover.Root, {
|
|
16
|
-
|
|
17
|
-
onOpenChange: (details) => setOpen(details.open),
|
|
13
|
+
id: `${hostId}:popover`,
|
|
18
14
|
positioning: { placement: "top" },
|
|
19
15
|
children: [/* @__PURE__ */ jsx(Popover.Trigger, {
|
|
20
16
|
asChild: true,
|
|
@@ -26,19 +22,28 @@ function Popconfirm({ message, confirmText = "Confirm", cancelText = "Cancel", c
|
|
|
26
22
|
children: message
|
|
27
23
|
}), /* @__PURE__ */ jsxs("div", {
|
|
28
24
|
"data-part": "actions",
|
|
29
|
-
children: [/* @__PURE__ */ jsx(
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
25
|
+
children: [/* @__PURE__ */ jsx(Popover.CloseTrigger, {
|
|
26
|
+
asChild: true,
|
|
27
|
+
children: /* @__PURE__ */ jsx(Button, {
|
|
28
|
+
variant: "ghost",
|
|
29
|
+
size: "sm",
|
|
30
|
+
"aria-label": cancelText,
|
|
31
|
+
onClick: () => onCancel?.(),
|
|
32
|
+
children: cancelText
|
|
33
|
+
})
|
|
34
|
+
}), /* @__PURE__ */ jsx(Popover.CloseTrigger, {
|
|
35
|
+
asChild: true,
|
|
36
|
+
children: /* @__PURE__ */ jsx(Button, {
|
|
37
|
+
size: "sm",
|
|
38
|
+
"aria-label": confirmText,
|
|
39
|
+
onClick: () => onConfirm?.(),
|
|
40
|
+
children: confirmText
|
|
41
|
+
})
|
|
38
42
|
})]
|
|
39
43
|
})]
|
|
40
44
|
}) }) })]
|
|
41
45
|
});
|
|
42
46
|
}
|
|
47
|
+
const Popconfirm = Object.assign(PopconfirmImpl, Popover$1);
|
|
43
48
|
//#endregion
|
|
44
49
|
export { Popconfirm };
|
|
@@ -1,8 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
/** Ark's Popover, dressed in the paper-and-ink system: a paper vessel that
|
|
4
|
-
* dissolves in on elevation, anchored to its trigger by a whisker arrow. The
|
|
5
|
-
* API is Ark's own — Root, Trigger, Anchor, Indicator, Positioner, Content,
|
|
6
|
-
* Title, Description, CloseTrigger, Arrow, ArrowTip. */
|
|
7
|
-
export declare const Popover: typeof Popover$1;
|
|
8
|
-
//#endregion
|
|
1
|
+
import { n as PopoverFacadeProps, t as Popover } from "../../index-Eu-Bttta.mjs";
|
|
2
|
+
export { Popover, PopoverFacadeProps };
|
|
@@ -1,11 +1,51 @@
|
|
|
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";
|
|
5
|
+
import { isValidElement } from "react";
|
|
2
6
|
import { Popover as Popover$1 } from "@ark-ui/react/popover";
|
|
3
7
|
//#region src/components/popover/index.tsx
|
|
4
8
|
/** Ark's Popover, dressed in the paper-and-ink system: a paper vessel that
|
|
5
|
-
* dissolves in on elevation, anchored to its trigger by a whisker arrow.
|
|
6
|
-
* API is Ark's own — Root, Trigger, Anchor, Indicator, Positioner,
|
|
7
|
-
* Title, Description, CloseTrigger, Arrow, ArrowTip. */
|
|
8
|
-
|
|
9
|
+
* dissolves in on elevation, anchored to its trigger by a whisker arrow.
|
|
10
|
+
* The API is Ark's own — Root, Trigger, Anchor, Indicator, Positioner,
|
|
11
|
+
* Content, Title, Description, CloseTrigger, Arrow, ArrowTip. */
|
|
12
|
+
function PopoverRoot(props) {
|
|
13
|
+
const id = useElementId("popover", props);
|
|
14
|
+
return /* @__PURE__ */ jsx(Popover$1.Root, {
|
|
15
|
+
...props,
|
|
16
|
+
id
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
function PopoverFacade({ open, defaultOpen, trigger, content, label, description, disabled = false, placement, children, onOpenChange }) {
|
|
20
|
+
return /* @__PURE__ */ jsxs(PopoverRoot, {
|
|
21
|
+
...placement === void 0 ? {} : { positioning: { placement } },
|
|
22
|
+
...open === void 0 ? {} : { open },
|
|
23
|
+
...defaultOpen === void 0 ? {} : { defaultOpen },
|
|
24
|
+
onOpenChange: (details) => onOpenChange?.(details.open),
|
|
25
|
+
children: [/* @__PURE__ */ jsx(Popover$1.Trigger, {
|
|
26
|
+
asChild: isValidElement(trigger),
|
|
27
|
+
disabled,
|
|
28
|
+
children: trigger ?? label
|
|
29
|
+
}), /* @__PURE__ */ jsx(Popover$1.Positioner, { children: /* @__PURE__ */ jsxs(Popover$1.Content, { children: [
|
|
30
|
+
/* @__PURE__ */ jsx(Popover$1.CloseTrigger, {
|
|
31
|
+
"aria-label": "Close",
|
|
32
|
+
children: iconNode("x", {
|
|
33
|
+
width: 14,
|
|
34
|
+
height: 14
|
|
35
|
+
})
|
|
36
|
+
}),
|
|
37
|
+
/* @__PURE__ */ jsx(Popover$1.Title, { children: label }),
|
|
38
|
+
description ? /* @__PURE__ */ jsx(Popover$1.Description, { children: description }) : null,
|
|
39
|
+
content ? /* @__PURE__ */ jsx("p", { children: content }) : null,
|
|
40
|
+
children
|
|
41
|
+
] }) })]
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
PopoverFacade.displayName = "SPopover";
|
|
45
|
+
const Popover = Object.assign(PopoverFacade, {
|
|
46
|
+
...Popover$1,
|
|
47
|
+
Root: PopoverRoot
|
|
48
|
+
});
|
|
9
49
|
injectComponentStyle("popover");
|
|
10
50
|
//#endregion
|
|
11
51
|
export { Popover };
|
|
@@ -1,2 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { PresenceBaseProps, PresenceProps, UsePresenceContext, UsePresenceProps, UsePresenceReturn, usePresence, usePresenceContext } from "@ark-ui/react/presence";
|
|
2
|
+
//#region src/components/presence/index.d.ts
|
|
3
|
+
export declare const Presence: import("react").ForwardRefExoticComponent<import("@ark-ui/react/presence").PresenceProps & import("react").RefAttributes<HTMLDivElement>> & {
|
|
4
|
+
Root: import("react").ForwardRefExoticComponent<import("@ark-ui/react/presence").PresenceProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
5
|
+
};
|
|
6
|
+
export declare const PresenceProvider: import("react").Provider<import("@ark-ui/react/presence").UsePresenceContext> & {
|
|
7
|
+
Root: import("react").Provider<import("@ark-ui/react/presence").UsePresenceContext>;
|
|
8
|
+
};
|
|
9
|
+
//#endregion
|
|
10
|
+
export { type PresenceBaseProps, type PresenceProps, type UsePresenceContext, type UsePresenceProps, type UsePresenceReturn, usePresence, usePresenceContext };
|
|
@@ -1,2 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as withSelfRoot } from "../../family-DE_GQeeM.mjs";
|
|
2
|
+
import { Presence as Presence$1, PresenceProvider as PresenceProvider$1, usePresence, usePresenceContext } from "@ark-ui/react/presence";
|
|
3
|
+
//#region src/components/presence/index.tsx
|
|
4
|
+
const Presence = withSelfRoot(Presence$1);
|
|
5
|
+
const PresenceProvider = withSelfRoot(PresenceProvider$1);
|
|
6
|
+
//#endregion
|
|
2
7
|
export { Presence, PresenceProvider, usePresence, usePresenceContext };
|
|
@@ -1,16 +1,31 @@
|
|
|
1
|
-
import { ComponentProps } from "react";
|
|
1
|
+
import { CSSProperties, ComponentProps } from "react";
|
|
2
2
|
import { Progress as Progress$1 } from "@ark-ui/react/progress";
|
|
3
3
|
//#region src/components/progress/index.d.ts
|
|
4
4
|
type ProgressRootProps = ComponentProps<typeof Progress$1.Root> & {
|
|
5
5
|
/** One rung of the groove ladder — the track's thickness. */
|
|
6
6
|
size?: "sm" | "md" | "lg";
|
|
7
7
|
};
|
|
8
|
-
declare function ProgressRoot(
|
|
8
|
+
declare function ProgressRoot(props: ProgressRootProps): import("react").JSX.Element;
|
|
9
9
|
/** Ark's Progress, dressed in the paper-and-ink system: a quiet hairline
|
|
10
10
|
* groove that the primary ink fills at the machine's pace. The API is
|
|
11
11
|
* Ark's own — Root, Label, ValueText, Track, Range, View, Circle,
|
|
12
12
|
* CircleTrack, CircleRange. */
|
|
13
|
-
|
|
13
|
+
type ProgressFacadeProps = {
|
|
14
|
+
value?: number | null;
|
|
15
|
+
defaultValue?: number | null;
|
|
16
|
+
min?: number;
|
|
17
|
+
max?: number;
|
|
18
|
+
label?: string;
|
|
19
|
+
variant?: "linear" | "circle";
|
|
20
|
+
size?: "sm" | "md" | "lg";
|
|
21
|
+
className?: string;
|
|
22
|
+
style?: CSSProperties;
|
|
23
|
+
onValueChange?: (value: number | null) => void;
|
|
24
|
+
};
|
|
25
|
+
/** The complete progress behind one value: a labelled linear groove by
|
|
26
|
+
* default, with a circular variant for compact status. */
|
|
27
|
+
declare function ProgressFacade(props: ProgressFacadeProps): import("react").JSX.Element;
|
|
28
|
+
export declare const Progress: typeof ProgressFacade & Omit<typeof Progress$1, "Root"> & {
|
|
14
29
|
Root: typeof ProgressRoot;
|
|
15
30
|
};
|
|
16
31
|
//#endregion
|
|
@@ -1,21 +1,46 @@
|
|
|
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 { Progress as Progress$1 } from "@ark-ui/react/progress";
|
|
4
5
|
//#region src/components/progress/index.tsx
|
|
5
|
-
|
|
6
|
+
const ProgressView = Progress$1.View;
|
|
7
|
+
function ProgressRoot(props) {
|
|
8
|
+
injectComponentStyle("progress");
|
|
9
|
+
const id = useElementId("progress", props);
|
|
10
|
+
const { size = "md", ...rest } = props;
|
|
6
11
|
return /* @__PURE__ */ jsx(Progress$1.Root, {
|
|
7
12
|
...rest,
|
|
13
|
+
id,
|
|
8
14
|
"data-size": size
|
|
9
15
|
});
|
|
10
16
|
}
|
|
11
|
-
/**
|
|
12
|
-
*
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
17
|
+
/** The complete progress behind one value: a labelled linear groove by
|
|
18
|
+
* default, with a circular variant for compact status. */
|
|
19
|
+
function ProgressFacade(props) {
|
|
20
|
+
const { value, defaultValue, min, max, label, variant = "linear", size = "md", className, style, onValueChange } = props;
|
|
21
|
+
return /* @__PURE__ */ jsxs(ProgressRoot, {
|
|
22
|
+
size,
|
|
23
|
+
"data-variant": variant,
|
|
24
|
+
defaultValue,
|
|
25
|
+
value,
|
|
26
|
+
min,
|
|
27
|
+
max,
|
|
28
|
+
className,
|
|
29
|
+
style,
|
|
30
|
+
onValueChange: (event) => onValueChange?.(event.value),
|
|
31
|
+
children: [
|
|
32
|
+
label ? /* @__PURE__ */ jsx(Progress$1.Label, { children: label }) : null,
|
|
33
|
+
/* @__PURE__ */ jsx(Progress$1.ValueText, {}),
|
|
34
|
+
variant === "circle" ? /* @__PURE__ */ jsx(ProgressView, {
|
|
35
|
+
view: "circle",
|
|
36
|
+
children: /* @__PURE__ */ jsx(Progress$1.Circle, { children: /* @__PURE__ */ jsx(Progress$1.CircleRange, {}) })
|
|
37
|
+
}) : /* @__PURE__ */ jsx(Progress$1.Track, { children: /* @__PURE__ */ jsx(Progress$1.Range, {}) })
|
|
38
|
+
]
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
const Progress = Object.assign(ProgressFacade, {
|
|
16
42
|
...Progress$1,
|
|
17
43
|
Root: ProgressRoot
|
|
18
|
-
};
|
|
19
|
-
injectComponentStyle("progress");
|
|
44
|
+
});
|
|
20
45
|
//#endregion
|
|
21
46
|
export { Progress };
|
|
@@ -18,5 +18,8 @@ export interface ProgressGroupProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
18
18
|
max?: number;
|
|
19
19
|
showLegend?: boolean;
|
|
20
20
|
}
|
|
21
|
-
|
|
21
|
+
declare function ProgressGroupImpl({ segments, max, showLegend, ...rest }: ProgressGroupProps): import("react").JSX.Element;
|
|
22
|
+
export declare const ProgressGroup: typeof ProgressGroupImpl & {
|
|
23
|
+
Root: typeof ProgressGroupImpl;
|
|
24
|
+
};
|
|
22
25
|
//#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, jsxs } from "react/jsx-runtime";
|
|
3
4
|
//#region src/components/progress-group/index.tsx
|
|
4
|
-
function
|
|
5
|
+
function ProgressGroupImpl({ segments, max, showLegend = true, ...rest }) {
|
|
5
6
|
injectComponentStyle("progress-group");
|
|
6
7
|
const total = max ?? segments.reduce((sum, segment) => sum + segment.value, 0);
|
|
7
8
|
const share = (value) => total > 0 ? `${value / total * 100}%` : "0%";
|
|
@@ -22,7 +23,7 @@ function ProgressGroup({ segments, max, showLegend = true, ...rest }) {
|
|
|
22
23
|
"aria-valuemin": 0,
|
|
23
24
|
"aria-valuemax": total,
|
|
24
25
|
"aria-label": nameOf(segment, index),
|
|
25
|
-
style: {
|
|
26
|
+
style: { "--bs-progress-group-share": share(segment.value) }
|
|
26
27
|
}, index))
|
|
27
28
|
}), showLegend ? /* @__PURE__ */ jsx("div", {
|
|
28
29
|
"data-scope": "progress-group",
|
|
@@ -52,5 +53,6 @@ function ProgressGroup({ segments, max, showLegend = true, ...rest }) {
|
|
|
52
53
|
}) : null]
|
|
53
54
|
});
|
|
54
55
|
}
|
|
56
|
+
const ProgressGroup = withSelfRoot(ProgressGroupImpl);
|
|
55
57
|
//#endregion
|
|
56
58
|
export { ProgressGroup };
|
|
@@ -1,8 +1,21 @@
|
|
|
1
|
+
import { CSSProperties, ComponentProps } from "react";
|
|
1
2
|
import { QrCode as QrCode$1 } from "@ark-ui/react/qr-code";
|
|
2
3
|
//#region src/components/qr-code/index.d.ts
|
|
3
4
|
/** Ark's QrCode, dressed in the paper-and-ink system: the pattern prints in
|
|
4
5
|
* ink on the page, with an optional paper badge and a seal-cut download
|
|
5
6
|
* control. The API is Ark's own — Root, Frame, Pattern, Overlay,
|
|
6
7
|
* DownloadTrigger. */
|
|
7
|
-
|
|
8
|
+
declare function QrCodeRoot(props: ComponentProps<typeof QrCode$1.Root>): import("react").JSX.Element;
|
|
9
|
+
type QrCodeFacadeProps = {
|
|
10
|
+
value?: string;
|
|
11
|
+
defaultValue?: string;
|
|
12
|
+
className?: string;
|
|
13
|
+
style?: CSSProperties;
|
|
14
|
+
onValueChange?: (value: string) => void;
|
|
15
|
+
};
|
|
16
|
+
/** The complete printable code behind one payload. */
|
|
17
|
+
declare function QrCodeFacade(props: QrCodeFacadeProps): import("react").JSX.Element;
|
|
18
|
+
export declare const QrCode: typeof QrCodeFacade & Omit<typeof QrCode$1, "Root"> & {
|
|
19
|
+
Root: typeof QrCodeRoot;
|
|
20
|
+
};
|
|
8
21
|
//#endregion
|