@bysages/react 0.2.1 → 0.2.3
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 +127 -0
- package/dist/chevron-BeHvt46K.mjs +17 -0
- package/dist/components/accordion/index.d.mts +7 -0
- package/dist/components/accordion/index.mjs +10 -0
- package/dist/components/affix/index.d.mts +20 -0
- package/dist/components/affix/index.mjs +18 -0
- package/dist/components/ai/index.d.mts +2 -0
- package/dist/components/ai/index.mjs +65 -0
- package/dist/components/ai-action/index.d.mts +14 -0
- package/dist/components/ai-action/index.mjs +18 -0
- package/dist/components/ai-attachments/index.d.mts +19 -0
- package/dist/components/ai-attachments/index.mjs +106 -0
- package/dist/components/ai-message/index.d.mts +11 -0
- package/dist/components/ai-message/index.mjs +15 -0
- package/dist/components/ai-prompt-input/index.d.mts +47 -0
- package/dist/components/ai-prompt-input/index.mjs +135 -0
- package/dist/components/ai-reasoning/index.d.mts +13 -0
- package/dist/components/ai-reasoning/index.mjs +19 -0
- package/dist/components/ai-response/index.d.mts +22 -0
- package/dist/components/ai-response/index.mjs +2 -0
- package/dist/components/ai-source/index.d.mts +17 -0
- package/dist/components/ai-source/index.mjs +27 -0
- package/dist/components/ai-suggestion/index.d.mts +13 -0
- package/dist/components/ai-suggestion/index.mjs +16 -0
- package/dist/components/ai-tool/index.d.mts +21 -0
- package/dist/components/ai-tool/index.mjs +36 -0
- package/dist/components/alert/index.d.mts +23 -0
- package/dist/components/alert/index.mjs +80 -0
- package/dist/components/angle-slider/index.d.mts +16 -0
- package/dist/components/angle-slider/index.mjs +21 -0
- package/dist/components/aspect-ratio/index.d.mts +10 -0
- package/dist/components/aspect-ratio/index.mjs +17 -0
- package/dist/components/autocomplete/index.d.mts +21 -0
- package/dist/components/autocomplete/index.mjs +35 -0
- package/dist/components/avatar/index.d.mts +20 -0
- package/dist/components/avatar/index.mjs +14 -0
- package/dist/components/avatar-group/index.d.mts +11 -0
- package/dist/components/avatar-group/index.mjs +15 -0
- package/dist/components/back-top/index.d.mts +29 -0
- package/dist/components/back-top/index.mjs +82 -0
- package/dist/components/badge/index.d.mts +10 -0
- package/dist/components/badge/index.mjs +15 -0
- package/dist/components/banner/index.d.mts +31 -0
- package/dist/components/banner/index.mjs +63 -0
- package/dist/components/breadcrumb/index.d.mts +32 -0
- package/dist/components/breadcrumb/index.mjs +35 -0
- package/dist/components/button/index.d.mts +19 -0
- package/dist/components/button/index.mjs +29 -0
- package/dist/components/button-group/index.d.mts +24 -0
- package/dist/components/button-group/index.mjs +25 -0
- package/dist/components/calendar/index.d.mts +17 -0
- package/dist/components/calendar/index.mjs +96 -0
- package/dist/components/card/index.d.mts +46 -0
- package/dist/components/card/index.mjs +44 -0
- package/dist/components/carousel/index.d.mts +9 -0
- package/dist/components/carousel/index.mjs +12 -0
- package/dist/components/cascade-select/index.d.mts +31 -0
- package/dist/components/cascade-select/index.mjs +223 -0
- package/dist/components/checkbox/index.d.mts +16 -0
- package/dist/components/checkbox/index.mjs +21 -0
- package/dist/components/checkbox-group/index.d.mts +28 -0
- package/dist/components/checkbox-group/index.mjs +65 -0
- package/dist/components/chip/index.d.mts +12 -0
- package/dist/components/chip/index.mjs +17 -0
- package/dist/components/client-only/index.d.mts +2 -0
- package/dist/components/client-only/index.mjs +2 -0
- package/dist/components/clipboard/index.d.mts +17 -0
- package/dist/components/clipboard/index.mjs +17 -0
- package/dist/components/collapsible/index.d.mts +7 -0
- package/dist/components/collapsible/index.mjs +10 -0
- package/dist/components/collection/index.d.mts +2 -0
- package/dist/components/collection/index.mjs +2 -0
- package/dist/components/color-picker/index.d.mts +20 -0
- package/dist/components/color-picker/index.mjs +25 -0
- package/dist/components/combobox/index.d.mts +17 -0
- package/dist/components/combobox/index.mjs +18 -0
- package/dist/components/command/index.d.mts +43 -0
- package/dist/components/command/index.mjs +137 -0
- package/dist/components/comment/index.d.mts +17 -0
- package/dist/components/comment/index.mjs +47 -0
- package/dist/components/config-provider/index.d.mts +46 -0
- package/dist/components/config-provider/index.mjs +41 -0
- package/dist/components/container/index.d.mts +13 -0
- package/dist/components/container/index.mjs +15 -0
- package/dist/components/date-input/index.d.mts +17 -0
- package/dist/components/date-input/index.mjs +21 -0
- package/dist/components/date-picker/index.d.mts +19 -0
- package/dist/components/date-picker/index.mjs +23 -0
- package/dist/components/descriptions/index.d.mts +25 -0
- package/dist/components/descriptions/index.mjs +32 -0
- package/dist/components/dialog/index.d.mts +9 -0
- package/dist/components/dialog/index.mjs +11 -0
- package/dist/components/download-trigger/index.d.mts +2 -0
- package/dist/components/download-trigger/index.mjs +2 -0
- package/dist/components/drawer/index.d.mts +9 -0
- package/dist/components/drawer/index.mjs +12 -0
- package/dist/components/dynamic-input/index.d.mts +28 -0
- package/dist/components/dynamic-input/index.mjs +83 -0
- package/dist/components/editable/index.d.mts +16 -0
- package/dist/components/editable/index.mjs +17 -0
- package/dist/components/ellipsis/index.d.mts +10 -0
- package/dist/components/ellipsis/index.mjs +19 -0
- package/dist/components/empty/index.d.mts +28 -0
- package/dist/components/empty/index.mjs +32 -0
- package/dist/components/field/index.d.mts +8 -0
- package/dist/components/field/index.mjs +11 -0
- package/dist/components/fieldset/index.d.mts +7 -0
- package/dist/components/fieldset/index.mjs +10 -0
- package/dist/components/file-upload/index.d.mts +18 -0
- package/dist/components/file-upload/index.mjs +23 -0
- package/dist/components/float-button/index.d.mts +59 -0
- package/dist/components/float-button/index.mjs +90 -0
- package/dist/components/floating-panel/index.d.mts +9 -0
- package/dist/components/floating-panel/index.mjs +12 -0
- package/dist/components/focus-trap/index.d.mts +2 -0
- package/dist/components/focus-trap/index.mjs +2 -0
- package/dist/components/form/index.d.mts +2 -0
- package/dist/components/form/index.mjs +67 -0
- package/dist/components/format/index.d.mts +9 -0
- package/dist/components/format/index.mjs +10 -0
- package/dist/components/frame/index.d.mts +10 -0
- package/dist/components/frame/index.mjs +12 -0
- package/dist/components/grid/index.d.mts +13 -0
- package/dist/components/grid/index.mjs +31 -0
- package/dist/components/highlight/index.d.mts +7 -0
- package/dist/components/highlight/index.mjs +11 -0
- package/dist/components/hover-card/index.d.mts +7 -0
- package/dist/components/hover-card/index.mjs +10 -0
- package/dist/components/icon/index.d.mts +19 -0
- package/dist/components/icon/index.mjs +26 -0
- package/dist/components/image/index.d.mts +17 -0
- package/dist/components/image/index.mjs +57 -0
- package/dist/components/image-cropper/index.d.mts +8 -0
- package/dist/components/image-cropper/index.mjs +11 -0
- package/dist/components/image-viewer/index.d.mts +18 -0
- package/dist/components/image-viewer/index.mjs +110 -0
- package/dist/components/input/index.d.mts +16 -0
- package/dist/components/input/index.mjs +21 -0
- package/dist/components/input-group/index.d.mts +17 -0
- package/dist/components/input-group/index.mjs +31 -0
- package/dist/components/json-tree-view/index.d.mts +7 -0
- package/dist/components/json-tree-view/index.mjs +10 -0
- package/dist/components/kbd/index.d.mts +6 -0
- package/dist/components/kbd/index.mjs +14 -0
- package/dist/components/layout/index.d.mts +63 -0
- package/dist/components/layout/index.mjs +133 -0
- package/dist/components/link/index.d.mts +10 -0
- package/dist/components/link/index.mjs +18 -0
- package/dist/components/list/index.d.mts +39 -0
- package/dist/components/list/index.mjs +66 -0
- package/dist/components/listbox/index.d.mts +18 -0
- package/dist/components/listbox/index.mjs +18 -0
- package/dist/components/marquee/index.d.mts +7 -0
- package/dist/components/marquee/index.mjs +10 -0
- package/dist/components/masonry/index.d.mts +11 -0
- package/dist/components/masonry/index.mjs +29 -0
- package/dist/components/mentions/index.d.mts +2 -0
- package/dist/components/mentions/index.mjs +2 -0
- package/dist/components/menu/index.d.mts +20 -0
- package/dist/components/menu/index.mjs +37 -0
- package/dist/components/menubar/index.d.mts +32 -0
- package/dist/components/menubar/index.mjs +35 -0
- package/dist/components/meter/index.d.mts +26 -0
- package/dist/components/meter/index.mjs +59 -0
- package/dist/components/navigation-menu/index.d.mts +8 -0
- package/dist/components/navigation-menu/index.mjs +11 -0
- package/dist/components/number-input/index.d.mts +16 -0
- package/dist/components/number-input/index.mjs +21 -0
- package/dist/components/page-header/index.d.mts +32 -0
- package/dist/components/page-header/index.mjs +34 -0
- package/dist/components/pagination/index.d.mts +18 -0
- package/dist/components/pagination/index.mjs +23 -0
- package/dist/components/password-input/index.d.mts +16 -0
- package/dist/components/password-input/index.mjs +21 -0
- package/dist/components/pin-input/index.d.mts +15 -0
- package/dist/components/pin-input/index.mjs +20 -0
- package/dist/components/popconfirm/index.d.mts +20 -0
- package/dist/components/popconfirm/index.mjs +44 -0
- package/dist/components/popover/index.d.mts +8 -0
- package/dist/components/popover/index.mjs +11 -0
- package/dist/components/presence/index.d.mts +2 -0
- package/dist/components/presence/index.mjs +2 -0
- package/dist/components/progress/index.d.mts +16 -0
- package/dist/components/progress/index.mjs +21 -0
- package/dist/components/progress-group/index.d.mts +22 -0
- package/dist/components/progress-group/index.mjs +56 -0
- package/dist/components/qr-code/index.d.mts +8 -0
- package/dist/components/qr-code/index.mjs +11 -0
- package/dist/components/radio-group/index.d.mts +16 -0
- package/dist/components/radio-group/index.mjs +21 -0
- package/dist/components/rating-group/index.d.mts +16 -0
- package/dist/components/rating-group/index.mjs +21 -0
- package/dist/components/scroll-area/index.d.mts +7 -0
- package/dist/components/scroll-area/index.mjs +10 -0
- package/dist/components/segment-group/index.d.mts +18 -0
- package/dist/components/segment-group/index.mjs +20 -0
- package/dist/components/select/index.d.mts +17 -0
- package/dist/components/select/index.mjs +18 -0
- package/dist/components/separator/index.d.mts +11 -0
- package/dist/components/separator/index.mjs +16 -0
- package/dist/components/signature-pad/index.d.mts +8 -0
- package/dist/components/signature-pad/index.mjs +11 -0
- package/dist/components/skeleton/index.d.mts +7 -0
- package/dist/components/skeleton/index.mjs +13 -0
- package/dist/components/slider/index.d.mts +16 -0
- package/dist/components/slider/index.mjs +21 -0
- package/dist/components/spinner/index.d.mts +9 -0
- package/dist/components/spinner/index.mjs +36 -0
- package/dist/components/split-button/index.d.mts +36 -0
- package/dist/components/split-button/index.mjs +71 -0
- package/dist/components/splitter/index.d.mts +7 -0
- package/dist/components/splitter/index.mjs +10 -0
- package/dist/components/stack/index.d.mts +11 -0
- package/dist/components/stack/index.mjs +32 -0
- package/dist/components/stat/index.d.mts +29 -0
- package/dist/components/stat/index.mjs +37 -0
- package/dist/components/steps/index.d.mts +19 -0
- package/dist/components/steps/index.mjs +24 -0
- package/dist/components/swap/index.d.mts +8 -0
- package/dist/components/swap/index.mjs +11 -0
- package/dist/components/switch/index.d.mts +16 -0
- package/dist/components/switch/index.mjs +21 -0
- package/dist/components/table/index.d.mts +79 -0
- package/dist/components/table/index.mjs +688 -0
- package/dist/components/tabs/index.d.mts +18 -0
- package/dist/components/tabs/index.mjs +23 -0
- package/dist/components/tags-input/index.d.mts +17 -0
- package/dist/components/tags-input/index.mjs +22 -0
- package/dist/components/textarea/index.d.mts +14 -0
- package/dist/components/textarea/index.mjs +20 -0
- package/dist/components/timeline/index.d.mts +24 -0
- package/dist/components/timeline/index.mjs +30 -0
- package/dist/components/timer/index.d.mts +8 -0
- package/dist/components/timer/index.mjs +11 -0
- package/dist/components/toast/index.d.mts +11 -0
- package/dist/components/toast/index.mjs +13 -0
- package/dist/components/toc/index.d.mts +7 -0
- package/dist/components/toc/index.mjs +10 -0
- package/dist/components/toggle/index.d.mts +7 -0
- package/dist/components/toggle/index.mjs +10 -0
- package/dist/components/toggle-group/index.d.mts +15 -0
- package/dist/components/toggle-group/index.mjs +20 -0
- package/dist/components/tooltip/index.d.mts +7 -0
- package/dist/components/tooltip/index.mjs +10 -0
- package/dist/components/tour/index.d.mts +11 -0
- package/dist/components/tour/index.mjs +13 -0
- package/dist/components/transfer/index.d.mts +23 -0
- package/dist/components/transfer/index.mjs +154 -0
- package/dist/components/tree-select/index.d.mts +28 -0
- package/dist/components/tree-select/index.mjs +157 -0
- package/dist/components/tree-view/index.d.mts +19 -0
- package/dist/components/tree-view/index.mjs +18 -0
- package/dist/components/typography/index.d.mts +32 -0
- package/dist/components/typography/index.mjs +34 -0
- package/dist/components/watermark/index.d.mts +16 -0
- package/dist/components/watermark/index.mjs +80 -0
- package/dist/index-DaAbbSz9.d.mts +13416 -0
- package/dist/index-Uefyw7Im.d.mts +108 -0
- package/dist/index-uPyYiWaL.d.mts +1813 -0
- package/dist/index.d.mts +128 -15218
- package/dist/index.mjs +128 -4556
- package/dist/mentions-DMIBCBOd.mjs +181 -0
- package/package.json +77 -3
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
//#region src/components/popconfirm/index.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* A question at the point of no return: the trigger opens a small
|
|
5
|
+
* anchored vessel carrying the message and two answers. Confirmation
|
|
6
|
+
* and cancellation are the caller's to act on — the panel closes
|
|
7
|
+
* either way. The children are the trigger; give it a single element
|
|
8
|
+
* (wrap a group in a span otherwise).
|
|
9
|
+
*/
|
|
10
|
+
export interface PopconfirmProps {
|
|
11
|
+
/** The question the reader is answering. */
|
|
12
|
+
message: string;
|
|
13
|
+
confirmText?: string;
|
|
14
|
+
cancelText?: string;
|
|
15
|
+
children?: ReactNode;
|
|
16
|
+
onConfirm?: () => void;
|
|
17
|
+
onCancel?: () => void;
|
|
18
|
+
}
|
|
19
|
+
export declare function Popconfirm({ message, confirmText, cancelText, children, onConfirm, onCancel }: PopconfirmProps): import("react").JSX.Element;
|
|
20
|
+
//#endregion
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { Button } from "../button/index.mjs";
|
|
2
|
+
import { injectComponentStyle } from "@bysages/core";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import { useState } from "react";
|
|
5
|
+
import { Popover } from "@ark-ui/react/popover";
|
|
6
|
+
import { Portal } from "@ark-ui/react/portal";
|
|
7
|
+
//#region src/components/popconfirm/index.tsx
|
|
8
|
+
function Popconfirm({ message, confirmText = "Confirm", cancelText = "Cancel", children, onConfirm, onCancel }) {
|
|
9
|
+
injectComponentStyle("popconfirm");
|
|
10
|
+
const [open, setOpen] = useState(false);
|
|
11
|
+
function settle(confirmed) {
|
|
12
|
+
setOpen(false);
|
|
13
|
+
(confirmed ? onConfirm : onCancel)?.();
|
|
14
|
+
}
|
|
15
|
+
return /* @__PURE__ */ jsxs(Popover.Root, {
|
|
16
|
+
open,
|
|
17
|
+
onOpenChange: (details) => setOpen(details.open),
|
|
18
|
+
positioning: { placement: "top" },
|
|
19
|
+
children: [/* @__PURE__ */ jsx(Popover.Trigger, {
|
|
20
|
+
asChild: true,
|
|
21
|
+
children
|
|
22
|
+
}), /* @__PURE__ */ jsx(Portal, { children: /* @__PURE__ */ jsx(Popover.Positioner, { children: /* @__PURE__ */ jsxs(Popover.Content, {
|
|
23
|
+
className: "bs-popconfirm",
|
|
24
|
+
children: [/* @__PURE__ */ jsx("p", {
|
|
25
|
+
"data-part": "message",
|
|
26
|
+
children: message
|
|
27
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
28
|
+
"data-part": "actions",
|
|
29
|
+
children: [/* @__PURE__ */ jsx(Button, {
|
|
30
|
+
variant: "ghost",
|
|
31
|
+
size: "sm",
|
|
32
|
+
onClick: () => settle(false),
|
|
33
|
+
children: cancelText
|
|
34
|
+
}), /* @__PURE__ */ jsx(Button, {
|
|
35
|
+
size: "sm",
|
|
36
|
+
onClick: () => settle(true),
|
|
37
|
+
children: confirmText
|
|
38
|
+
})]
|
|
39
|
+
})]
|
|
40
|
+
}) }) })]
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
//#endregion
|
|
44
|
+
export { Popconfirm };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Popover as Popover$1 } from "@ark-ui/react/popover";
|
|
2
|
+
//#region src/components/popover/index.d.ts
|
|
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
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
+
import { Popover as Popover$1 } from "@ark-ui/react/popover";
|
|
3
|
+
//#region src/components/popover/index.tsx
|
|
4
|
+
/** 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. The
|
|
6
|
+
* API is Ark's own — Root, Trigger, Anchor, Indicator, Positioner, Content,
|
|
7
|
+
* Title, Description, CloseTrigger, Arrow, ArrowTip. */
|
|
8
|
+
const Popover = Popover$1;
|
|
9
|
+
injectComponentStyle("popover");
|
|
10
|
+
//#endregion
|
|
11
|
+
export { Popover };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { Presence, PresenceBaseProps, PresenceProps, PresenceProvider, UsePresenceContext, UsePresenceProps, UsePresenceReturn, usePresence, usePresenceContext } from "@ark-ui/react/presence";
|
|
2
|
+
export { Presence, type PresenceBaseProps, type PresenceProps, PresenceProvider, type UsePresenceContext, type UsePresenceProps, type UsePresenceReturn, usePresence, usePresenceContext };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
import { Progress as Progress$1 } from "@ark-ui/react/progress";
|
|
3
|
+
//#region src/components/progress/index.d.ts
|
|
4
|
+
type ProgressRootProps = ComponentProps<typeof Progress$1.Root> & {
|
|
5
|
+
/** One rung of the groove ladder — the track's thickness. */
|
|
6
|
+
size?: "sm" | "md" | "lg";
|
|
7
|
+
};
|
|
8
|
+
declare function ProgressRoot({ size, ...rest }: ProgressRootProps): import("react").JSX.Element;
|
|
9
|
+
/** Ark's Progress, dressed in the paper-and-ink system: a quiet hairline
|
|
10
|
+
* groove that the primary ink fills at the machine's pace. The API is
|
|
11
|
+
* Ark's own — Root, Label, ValueText, Track, Range, View, Circle,
|
|
12
|
+
* CircleTrack, CircleRange. */
|
|
13
|
+
export declare const Progress: Omit<typeof Progress$1, "Root"> & {
|
|
14
|
+
Root: typeof ProgressRoot;
|
|
15
|
+
};
|
|
16
|
+
//#endregion
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Progress as Progress$1 } from "@ark-ui/react/progress";
|
|
4
|
+
//#region src/components/progress/index.tsx
|
|
5
|
+
function ProgressRoot({ size = "md", ...rest }) {
|
|
6
|
+
return /* @__PURE__ */ jsx(Progress$1.Root, {
|
|
7
|
+
...rest,
|
|
8
|
+
"data-size": size
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
/** Ark's Progress, dressed in the paper-and-ink system: a quiet hairline
|
|
12
|
+
* groove that the primary ink fills at the machine's pace. The API is
|
|
13
|
+
* Ark's own — Root, Label, ValueText, Track, Range, View, Circle,
|
|
14
|
+
* CircleTrack, CircleRange. */
|
|
15
|
+
const Progress = {
|
|
16
|
+
...Progress$1,
|
|
17
|
+
Root: ProgressRoot
|
|
18
|
+
};
|
|
19
|
+
injectComponentStyle("progress");
|
|
20
|
+
//#endregion
|
|
21
|
+
export { Progress };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { HTMLAttributes } from "react";
|
|
2
|
+
//#region src/components/progress-group/index.d.ts
|
|
3
|
+
/** One verdict on the bar. */
|
|
4
|
+
export interface ProgressSegment {
|
|
5
|
+
value: number;
|
|
6
|
+
label?: string;
|
|
7
|
+
pigment?: "primary" | "success" | "warning" | "danger" | "info";
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* One bar, several verdicts: the segments stand shoulder to shoulder,
|
|
11
|
+
* each as wide as its share of the whole and speaking its own pigment;
|
|
12
|
+
* the legend reads them back beneath (swatch, label, value) unless the
|
|
13
|
+
* caller declines it. The whole is the sum of the parts unless the
|
|
14
|
+
* caller brings a larger one — the remainder then shows as groove.
|
|
15
|
+
*/
|
|
16
|
+
export interface ProgressGroupProps extends HTMLAttributes<HTMLDivElement> {
|
|
17
|
+
segments: ProgressSegment[];
|
|
18
|
+
max?: number;
|
|
19
|
+
showLegend?: boolean;
|
|
20
|
+
}
|
|
21
|
+
export declare function ProgressGroup({ segments, max, showLegend, ...rest }: ProgressGroupProps): import("react").JSX.Element;
|
|
22
|
+
//#endregion
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
//#region src/components/progress-group/index.tsx
|
|
4
|
+
function ProgressGroup({ segments, max, showLegend = true, ...rest }) {
|
|
5
|
+
injectComponentStyle("progress-group");
|
|
6
|
+
const total = max ?? segments.reduce((sum, segment) => sum + segment.value, 0);
|
|
7
|
+
const share = (value) => total > 0 ? `${value / total * 100}%` : "0%";
|
|
8
|
+
const nameOf = (segment, index) => segment.label ?? segment.pigment ?? `Segment ${index + 1}`;
|
|
9
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
10
|
+
...rest,
|
|
11
|
+
"data-scope": "progress-group",
|
|
12
|
+
"data-part": "root",
|
|
13
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
14
|
+
"data-scope": "progress-group",
|
|
15
|
+
"data-part": "track",
|
|
16
|
+
children: segments.map((segment, index) => /* @__PURE__ */ jsx("div", {
|
|
17
|
+
"data-scope": "progress-group",
|
|
18
|
+
"data-part": "segment",
|
|
19
|
+
"data-pigment": segment.pigment,
|
|
20
|
+
role: "progressbar",
|
|
21
|
+
"aria-valuenow": segment.value,
|
|
22
|
+
"aria-valuemin": 0,
|
|
23
|
+
"aria-valuemax": total,
|
|
24
|
+
"aria-label": nameOf(segment, index),
|
|
25
|
+
style: { inlineSize: share(segment.value) }
|
|
26
|
+
}, index))
|
|
27
|
+
}), showLegend ? /* @__PURE__ */ jsx("div", {
|
|
28
|
+
"data-scope": "progress-group",
|
|
29
|
+
"data-part": "legend",
|
|
30
|
+
children: segments.map((segment, index) => /* @__PURE__ */ jsxs("div", {
|
|
31
|
+
"data-scope": "progress-group",
|
|
32
|
+
"data-part": "legend-item",
|
|
33
|
+
"data-pigment": segment.pigment,
|
|
34
|
+
children: [
|
|
35
|
+
/* @__PURE__ */ jsx("span", {
|
|
36
|
+
"data-scope": "progress-group",
|
|
37
|
+
"data-part": "swatch",
|
|
38
|
+
"aria-hidden": "true"
|
|
39
|
+
}),
|
|
40
|
+
/* @__PURE__ */ jsx("span", {
|
|
41
|
+
"data-scope": "progress-group",
|
|
42
|
+
"data-part": "legend-label",
|
|
43
|
+
children: nameOf(segment, index)
|
|
44
|
+
}),
|
|
45
|
+
/* @__PURE__ */ jsx("span", {
|
|
46
|
+
"data-scope": "progress-group",
|
|
47
|
+
"data-part": "legend-value",
|
|
48
|
+
children: String(segment.value)
|
|
49
|
+
})
|
|
50
|
+
]
|
|
51
|
+
}, index))
|
|
52
|
+
}) : null]
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
//#endregion
|
|
56
|
+
export { ProgressGroup };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { QrCode as QrCode$1 } from "@ark-ui/react/qr-code";
|
|
2
|
+
//#region src/components/qr-code/index.d.ts
|
|
3
|
+
/** Ark's QrCode, dressed in the paper-and-ink system: the pattern prints in
|
|
4
|
+
* ink on the page, with an optional paper badge and a seal-cut download
|
|
5
|
+
* control. The API is Ark's own — Root, Frame, Pattern, Overlay,
|
|
6
|
+
* DownloadTrigger. */
|
|
7
|
+
export declare const QrCode: typeof QrCode$1;
|
|
8
|
+
//#endregion
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
+
import { QrCode as QrCode$1 } from "@ark-ui/react/qr-code";
|
|
3
|
+
//#region src/components/qr-code/index.tsx
|
|
4
|
+
/** Ark's QrCode, dressed in the paper-and-ink system: the pattern prints in
|
|
5
|
+
* ink on the page, with an optional paper badge and a seal-cut download
|
|
6
|
+
* control. The API is Ark's own — Root, Frame, Pattern, Overlay,
|
|
7
|
+
* DownloadTrigger. */
|
|
8
|
+
const QrCode = QrCode$1;
|
|
9
|
+
injectComponentStyle("qr-code");
|
|
10
|
+
//#endregion
|
|
11
|
+
export { QrCode };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
import { RadioGroup as RadioGroup$1 } from "@ark-ui/react/radio-group";
|
|
3
|
+
//#region src/components/radio-group/index.d.ts
|
|
4
|
+
type RadioGroupRootProps = ComponentProps<typeof RadioGroup$1.Root> & {
|
|
5
|
+
/** One rung for the dial; the chosen dot rides it. */
|
|
6
|
+
size?: "sm" | "md" | "lg";
|
|
7
|
+
};
|
|
8
|
+
declare function RadioGroupRoot({ size, ...rest }: RadioGroupRootProps): import("react").JSX.Element;
|
|
9
|
+
/** Ark's RadioGroup, dressed in the paper-and-ink system: a column of
|
|
10
|
+
* full-circle seals that fill flat with primary ink when chosen, the dot
|
|
11
|
+
* punched through as paper. The API is Ark's own — Root, Label, Item,
|
|
12
|
+
* ItemText, ItemControl, Indicator, ItemHiddenInput. */
|
|
13
|
+
export declare const RadioGroup: Omit<typeof RadioGroup$1, "Root"> & {
|
|
14
|
+
Root: typeof RadioGroupRoot;
|
|
15
|
+
};
|
|
16
|
+
//#endregion
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { RadioGroup as RadioGroup$1 } from "@ark-ui/react/radio-group";
|
|
4
|
+
//#region src/components/radio-group/index.tsx
|
|
5
|
+
function RadioGroupRoot({ size = "md", ...rest }) {
|
|
6
|
+
return /* @__PURE__ */ jsx(RadioGroup$1.Root, {
|
|
7
|
+
...rest,
|
|
8
|
+
"data-size": size
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
/** Ark's RadioGroup, dressed in the paper-and-ink system: a column of
|
|
12
|
+
* full-circle seals that fill flat with primary ink when chosen, the dot
|
|
13
|
+
* punched through as paper. The API is Ark's own — Root, Label, Item,
|
|
14
|
+
* ItemText, ItemControl, Indicator, ItemHiddenInput. */
|
|
15
|
+
const RadioGroup = {
|
|
16
|
+
...RadioGroup$1,
|
|
17
|
+
Root: RadioGroupRoot
|
|
18
|
+
};
|
|
19
|
+
injectComponentStyle("radio-group");
|
|
20
|
+
//#endregion
|
|
21
|
+
export { RadioGroup };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
import { RatingGroup as RatingGroup$1 } from "@ark-ui/react/rating-group";
|
|
3
|
+
//#region src/components/rating-group/index.d.ts
|
|
4
|
+
type RatingGroupRootProps = ComponentProps<typeof RatingGroup$1.Root> & {
|
|
5
|
+
/** One rung of the control-height ladder every seal stands on. */
|
|
6
|
+
size?: "sm" | "md" | "lg";
|
|
7
|
+
};
|
|
8
|
+
declare function RatingGroupRoot({ size, ...rest }: RatingGroupRootProps): import("react").JSX.Element;
|
|
9
|
+
/** Ark's RatingGroup, dressed in the paper-and-ink system: a row of quiet
|
|
10
|
+
* seals whose glyphs take the primary pigment as they light up. The API is
|
|
11
|
+
* Ark's own — Root, Label, Control, Item, HiddenInput (plus the Context and
|
|
12
|
+
* ItemContext render helpers). */
|
|
13
|
+
export declare const RatingGroup: Omit<typeof RatingGroup$1, "Root"> & {
|
|
14
|
+
Root: typeof RatingGroupRoot;
|
|
15
|
+
};
|
|
16
|
+
//#endregion
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { RatingGroup as RatingGroup$1 } from "@ark-ui/react/rating-group";
|
|
4
|
+
//#region src/components/rating-group/index.tsx
|
|
5
|
+
function RatingGroupRoot({ size = "md", ...rest }) {
|
|
6
|
+
return /* @__PURE__ */ jsx(RatingGroup$1.Root, {
|
|
7
|
+
...rest,
|
|
8
|
+
"data-size": size
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
/** Ark's RatingGroup, dressed in the paper-and-ink system: a row of quiet
|
|
12
|
+
* seals whose glyphs take the primary pigment as they light up. The API is
|
|
13
|
+
* Ark's own — Root, Label, Control, Item, HiddenInput (plus the Context and
|
|
14
|
+
* ItemContext render helpers). */
|
|
15
|
+
const RatingGroup = {
|
|
16
|
+
...RatingGroup$1,
|
|
17
|
+
Root: RatingGroupRoot
|
|
18
|
+
};
|
|
19
|
+
injectComponentStyle("rating-group");
|
|
20
|
+
//#endregion
|
|
21
|
+
export { RatingGroup };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ScrollArea as ScrollArea$1 } from "@ark-ui/react/scroll-area";
|
|
2
|
+
//#region src/components/scroll-area/index.d.ts
|
|
3
|
+
/** Ark's ScrollArea, dressed in the paper-and-ink system: native bars
|
|
4
|
+
* give way to quiet ink lanes that surface on hover and scroll. The API
|
|
5
|
+
* is Ark's own — Root, Viewport, Content, Scrollbar, Thumb, Corner. */
|
|
6
|
+
export declare const ScrollArea: typeof ScrollArea$1;
|
|
7
|
+
//#endregion
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
+
import { ScrollArea as ScrollArea$1 } from "@ark-ui/react/scroll-area";
|
|
3
|
+
//#region src/components/scroll-area/index.tsx
|
|
4
|
+
/** Ark's ScrollArea, dressed in the paper-and-ink system: native bars
|
|
5
|
+
* give way to quiet ink lanes that surface on hover and scroll. The API
|
|
6
|
+
* is Ark's own — Root, Viewport, Content, Scrollbar, Thumb, Corner. */
|
|
7
|
+
const ScrollArea = ScrollArea$1;
|
|
8
|
+
injectComponentStyle("scroll-area");
|
|
9
|
+
//#endregion
|
|
10
|
+
export { ScrollArea };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
import { SegmentGroup as SegmentGroup$1 } from "@ark-ui/react/segment-group";
|
|
3
|
+
//#region src/components/segment-group/index.d.ts
|
|
4
|
+
type SegmentGroupRootProps = ComponentProps<typeof SegmentGroup$1.Root> & {
|
|
5
|
+
/** One rung of the control-height ladder for the segments. The
|
|
6
|
+
* family keeps its compact register, so the rungs sit one notch
|
|
7
|
+
* below the global ladder - the default md rests at the small
|
|
8
|
+
* height. */
|
|
9
|
+
size?: "sm" | "md" | "lg";
|
|
10
|
+
};
|
|
11
|
+
declare function SegmentGroupRoot({ size, ...rest }: SegmentGroupRootProps): import("react").JSX.Element;
|
|
12
|
+
/** SegmentGroup, dressed in the paper-and-ink system: a hairline tray
|
|
13
|
+
* where one flat ink plate travels beneath the checked seal. The parts - Root, Label, Indicator, Item, ItemText, ItemControl,
|
|
14
|
+
* ItemHiddenInput. */
|
|
15
|
+
export declare const SegmentGroup: Omit<typeof SegmentGroup$1, "Root"> & {
|
|
16
|
+
Root: typeof SegmentGroupRoot;
|
|
17
|
+
};
|
|
18
|
+
//#endregion
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { SegmentGroup as SegmentGroup$1 } from "@ark-ui/react/segment-group";
|
|
4
|
+
//#region src/components/segment-group/index.tsx
|
|
5
|
+
function SegmentGroupRoot({ size = "md", ...rest }) {
|
|
6
|
+
return /* @__PURE__ */ jsx(SegmentGroup$1.Root, {
|
|
7
|
+
...rest,
|
|
8
|
+
"data-size": size
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
/** SegmentGroup, dressed in the paper-and-ink system: a hairline tray
|
|
12
|
+
* where one flat ink plate travels beneath the checked seal. The parts - Root, Label, Indicator, Item, ItemText, ItemControl,
|
|
13
|
+
* ItemHiddenInput. */
|
|
14
|
+
const SegmentGroup = {
|
|
15
|
+
...SegmentGroup$1,
|
|
16
|
+
Root: SegmentGroupRoot
|
|
17
|
+
};
|
|
18
|
+
injectComponentStyle("segment-group");
|
|
19
|
+
//#endregion
|
|
20
|
+
export { SegmentGroup };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { CollectionItem } from "@ark-ui/react/collection";
|
|
2
|
+
import { Select as Select$1, SelectRootComponentProps } from "@ark-ui/react/select";
|
|
3
|
+
//#region src/components/select/index.d.ts
|
|
4
|
+
/** Ark's Select, dressed in the paper-and-ink system: the trigger is the
|
|
5
|
+
* whole control and its list dissolves open as a paper vessel, the checked
|
|
6
|
+
* row taking the flat ink fill. The API is Ark's own — Root, Label, Control,
|
|
7
|
+
* Trigger, ValueText, Indicator, ClearTrigger, HiddenSelect, Positioner,
|
|
8
|
+
* Content, List, Item, ItemText, ItemIndicator, ItemGroup, ItemGroupLabel. */
|
|
9
|
+
type SelectOwnProps = {
|
|
10
|
+
/** One rung of the control-height ladder for the trigger. */
|
|
11
|
+
size?: "sm" | "md" | "lg";
|
|
12
|
+
};
|
|
13
|
+
declare function SelectRoot<T extends CollectionItem>(props: SelectRootComponentProps<T, SelectOwnProps>): import("react").JSX.Element;
|
|
14
|
+
export declare const Select: Omit<typeof Select$1, "Root"> & {
|
|
15
|
+
Root: typeof SelectRoot;
|
|
16
|
+
};
|
|
17
|
+
//#endregion
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Select as Select$1 } from "@ark-ui/react/select";
|
|
4
|
+
//#region src/components/select/index.tsx
|
|
5
|
+
function SelectRoot(props) {
|
|
6
|
+
const { size = "md", ...rest } = props;
|
|
7
|
+
return /* @__PURE__ */ jsx(Select$1.Root, {
|
|
8
|
+
...rest,
|
|
9
|
+
"data-size": size
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
const Select = {
|
|
13
|
+
...Select$1,
|
|
14
|
+
Root: SelectRoot
|
|
15
|
+
};
|
|
16
|
+
injectComponentStyle("select");
|
|
17
|
+
//#endregion
|
|
18
|
+
export { Select };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { HTMLAttributes } from "react";
|
|
2
|
+
//#region src/components/separator/index.d.ts
|
|
3
|
+
/** The paper-ink hairline as a component: a named rule between sections.
|
|
4
|
+
* Decorative separators drop the separator role, since the page reads
|
|
5
|
+
* fine without them. */
|
|
6
|
+
export interface SeparatorProps extends HTMLAttributes<HTMLDivElement> {
|
|
7
|
+
orientation?: "horizontal" | "vertical";
|
|
8
|
+
decorative?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare function Separator({ orientation, decorative, ...rest }: SeparatorProps): import("react").JSX.Element;
|
|
11
|
+
//#endregion
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
//#region src/components/separator/index.tsx
|
|
4
|
+
function Separator({ orientation = "horizontal", decorative = false, ...rest }) {
|
|
5
|
+
injectComponentStyle("separator");
|
|
6
|
+
return /* @__PURE__ */ jsx("div", {
|
|
7
|
+
...rest,
|
|
8
|
+
role: decorative ? "none" : "separator",
|
|
9
|
+
"data-scope": "separator",
|
|
10
|
+
"data-part": "root",
|
|
11
|
+
"data-orientation": orientation,
|
|
12
|
+
"aria-orientation": decorative ? void 0 : orientation
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
//#endregion
|
|
16
|
+
export { Separator };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { SignaturePad as SignaturePad$1 } from "@ark-ui/react/signature-pad";
|
|
2
|
+
//#region src/components/signature-pad/index.d.ts
|
|
3
|
+
/** Ark's SignaturePad, dressed in the paper-and-ink system: a quiet paper
|
|
4
|
+
* field with a guide hairline where ink — real ink strokes — is laid down.
|
|
5
|
+
* The API is Ark's own — Root, Label, Control, Segment, SegmentPath, Guide,
|
|
6
|
+
* ClearTrigger, HiddenInput, Context. */
|
|
7
|
+
export declare const SignaturePad: typeof SignaturePad$1;
|
|
8
|
+
//#endregion
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
+
import { SignaturePad as SignaturePad$1 } from "@ark-ui/react/signature-pad";
|
|
3
|
+
//#region src/components/signature-pad/index.tsx
|
|
4
|
+
/** Ark's SignaturePad, dressed in the paper-and-ink system: a quiet paper
|
|
5
|
+
* field with a guide hairline where ink — real ink strokes — is laid down.
|
|
6
|
+
* The API is Ark's own — Root, Label, Control, Segment, SegmentPath, Guide,
|
|
7
|
+
* ClearTrigger, HiddenInput, Context. */
|
|
8
|
+
const SignaturePad = SignaturePad$1;
|
|
9
|
+
injectComponentStyle("signature-pad");
|
|
10
|
+
//#endregion
|
|
11
|
+
export { SignaturePad };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { HTMLAttributes } from "react";
|
|
2
|
+
//#region src/components/skeleton/index.d.ts
|
|
3
|
+
/** A waiting sheet of unset paper. Size it from the outside; the breath
|
|
4
|
+
* is the component's own. */
|
|
5
|
+
export type SkeletonProps = HTMLAttributes<HTMLDivElement>;
|
|
6
|
+
export declare function Skeleton({ ...rest }: SkeletonProps): import("react").JSX.Element;
|
|
7
|
+
//#endregion
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
//#region src/components/skeleton/index.tsx
|
|
4
|
+
function Skeleton({ ...rest }) {
|
|
5
|
+
injectComponentStyle("skeleton");
|
|
6
|
+
return /* @__PURE__ */ jsx("div", {
|
|
7
|
+
...rest,
|
|
8
|
+
"data-scope": "skeleton",
|
|
9
|
+
"data-part": "root"
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
//#endregion
|
|
13
|
+
export { Skeleton };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
import { Slider as Slider$1 } from "@ark-ui/react/slider";
|
|
3
|
+
//#region src/components/slider/index.d.ts
|
|
4
|
+
type SliderRootProps = ComponentProps<typeof Slider$1.Root> & {
|
|
5
|
+
/** One rung of the part-size ladder for the thumb seal. */
|
|
6
|
+
size?: "sm" | "md" | "lg";
|
|
7
|
+
};
|
|
8
|
+
declare function SliderRoot({ size, ...rest }: SliderRootProps): import("react").JSX.Element;
|
|
9
|
+
/** Ark's Slider, dressed in the paper-and-ink system: a recessed track the
|
|
10
|
+
* primary ink runs along, a paper-seal thumb, and hairline tick markers.
|
|
11
|
+
* The API is Ark's own — Root, Label, ValueText, Control, Track, Range,
|
|
12
|
+
* Thumb, MarkerGroup, Marker, DraggingIndicator, HiddenInput. */
|
|
13
|
+
export declare const Slider: Omit<typeof Slider$1, "Root"> & {
|
|
14
|
+
Root: typeof SliderRoot;
|
|
15
|
+
};
|
|
16
|
+
//#endregion
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Slider as Slider$1 } from "@ark-ui/react/slider";
|
|
4
|
+
//#region src/components/slider/index.tsx
|
|
5
|
+
function SliderRoot({ size = "md", ...rest }) {
|
|
6
|
+
return /* @__PURE__ */ jsx(Slider$1.Root, {
|
|
7
|
+
...rest,
|
|
8
|
+
"data-size": size
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
/** Ark's Slider, dressed in the paper-and-ink system: a recessed track the
|
|
12
|
+
* primary ink runs along, a paper-seal thumb, and hairline tick markers.
|
|
13
|
+
* The API is Ark's own — Root, Label, ValueText, Control, Track, Range,
|
|
14
|
+
* Thumb, MarkerGroup, Marker, DraggingIndicator, HiddenInput. */
|
|
15
|
+
const Slider = {
|
|
16
|
+
...Slider$1,
|
|
17
|
+
Root: SliderRoot
|
|
18
|
+
};
|
|
19
|
+
injectComponentStyle("slider");
|
|
20
|
+
//#endregion
|
|
21
|
+
export { Slider };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { HTMLAttributes } from "react";
|
|
2
|
+
//#region src/components/spinner/index.d.ts
|
|
3
|
+
export interface SpinnerProps extends HTMLAttributes<HTMLElement> {
|
|
4
|
+
size?: "sm" | "md" | "lg";
|
|
5
|
+
}
|
|
6
|
+
/** A wheel of waiting: one arc of ink turning about its center. Quiet by
|
|
7
|
+
* default — it reports progress without claiming attention. */
|
|
8
|
+
export declare function Spinner({ size, children, ...rest }: SpinnerProps): import("react").JSX.Element;
|
|
9
|
+
//#endregion
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
//#region src/components/spinner/index.tsx
|
|
4
|
+
/** A wheel of waiting: one arc of ink turning about its center. Quiet by
|
|
5
|
+
* default — it reports progress without claiming attention. */
|
|
6
|
+
function Spinner({ size = "md", children, ...rest }) {
|
|
7
|
+
injectComponentStyle("spinner");
|
|
8
|
+
return /* @__PURE__ */ jsxs("span", {
|
|
9
|
+
...rest,
|
|
10
|
+
role: "status",
|
|
11
|
+
"aria-label": rest["aria-label"] ?? "Loading",
|
|
12
|
+
"data-scope": "spinner",
|
|
13
|
+
"data-part": "root",
|
|
14
|
+
"data-size": size,
|
|
15
|
+
children: [/* @__PURE__ */ jsxs("svg", {
|
|
16
|
+
viewBox: "0 0 24 24",
|
|
17
|
+
fill: "none",
|
|
18
|
+
"aria-hidden": true,
|
|
19
|
+
children: [/* @__PURE__ */ jsx("circle", {
|
|
20
|
+
cx: 12,
|
|
21
|
+
cy: 12,
|
|
22
|
+
r: 9,
|
|
23
|
+
stroke: "currentColor",
|
|
24
|
+
strokeOpacity: .2,
|
|
25
|
+
strokeWidth: 2.5
|
|
26
|
+
}), /* @__PURE__ */ jsx("path", {
|
|
27
|
+
d: "M21 12a9 9 0 0 0-9-9",
|
|
28
|
+
stroke: "currentColor",
|
|
29
|
+
strokeWidth: 2.5,
|
|
30
|
+
strokeLinecap: "round"
|
|
31
|
+
})]
|
|
32
|
+
}), children]
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
//#endregion
|
|
36
|
+
export { Spinner };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { HTMLAttributes } from "react";
|
|
2
|
+
//#region src/components/split-button/index.d.ts
|
|
3
|
+
export interface SplitButtonEntry {
|
|
4
|
+
label: string;
|
|
5
|
+
/** Handed back with `onSelect` when the entry is chosen. */
|
|
6
|
+
value: string;
|
|
7
|
+
danger?: boolean;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface SplitButtonProps extends Omit<HTMLAttributes<HTMLDivElement>, "onSelect"> {
|
|
11
|
+
/** The main action's label. */
|
|
12
|
+
label: string;
|
|
13
|
+
/** The dropdown's entries. */
|
|
14
|
+
items?: SplitButtonEntry[];
|
|
15
|
+
/** How both halves rest; the arrow always reads as one control with
|
|
16
|
+
* the main button. */
|
|
17
|
+
variant?: "solid" | "outline" | "ghost" | "subtle";
|
|
18
|
+
tone?: "ink" | "info" | "success" | "warning" | "danger";
|
|
19
|
+
size?: "sm" | "md" | "lg";
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
/** The main button was pressed. */
|
|
22
|
+
onClick?: () => void;
|
|
23
|
+
/** An entry was chosen; carries its `value`. */
|
|
24
|
+
onSelect?: (value: string) => void;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* A primary action with its alternatives one seam away: the main button
|
|
28
|
+
* fires `onClick`, the fitted arrow opens a paper vessel of the same
|
|
29
|
+
* register whose entries report `onSelect` with their value. The arrow
|
|
30
|
+
* is the menu machine's trigger grafting the button recipe — the
|
|
31
|
+
* machine keeps the element (positioning, focus, `data-state`), the
|
|
32
|
+
* button stylesheet's trigger register dresses it. The popup keeps the
|
|
33
|
+
* menu parts untouched.
|
|
34
|
+
*/
|
|
35
|
+
export declare function SplitButton({ label, items, variant, tone, size, disabled, onClick, onSelect, ...rest }: SplitButtonProps): import("react").JSX.Element;
|
|
36
|
+
//#endregion
|