@bysages/react 0.2.2 → 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 -15446
- package/dist/index.mjs +128 -4871
- package/dist/mentions-DMIBCBOd.mjs +181 -0
- package/package.json +77 -4
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { Button } from "../button/index.mjs";
|
|
2
|
+
import { injectComponentStyle } from "@bysages/core";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import { Portal } from "@ark-ui/react/portal";
|
|
5
|
+
import { Menu } from "@ark-ui/react/menu";
|
|
6
|
+
//#region src/components/split-button/index.tsx
|
|
7
|
+
/**
|
|
8
|
+
* A primary action with its alternatives one seam away: the main button
|
|
9
|
+
* fires `onClick`, the fitted arrow opens a paper vessel of the same
|
|
10
|
+
* register whose entries report `onSelect` with their value. The arrow
|
|
11
|
+
* is the menu machine's trigger grafting the button recipe — the
|
|
12
|
+
* machine keeps the element (positioning, focus, `data-state`), the
|
|
13
|
+
* button stylesheet's trigger register dresses it. The popup keeps the
|
|
14
|
+
* menu parts untouched.
|
|
15
|
+
*/
|
|
16
|
+
function SplitButton({ label, items = [], variant = "solid", tone = "ink", size = "md", disabled = false, onClick, onSelect, ...rest }) {
|
|
17
|
+
injectComponentStyle("split-button");
|
|
18
|
+
injectComponentStyle("menu");
|
|
19
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
20
|
+
...rest,
|
|
21
|
+
"data-scope": "split-button",
|
|
22
|
+
"data-part": "root",
|
|
23
|
+
children: [/* @__PURE__ */ jsx(Button, {
|
|
24
|
+
variant,
|
|
25
|
+
tone,
|
|
26
|
+
size,
|
|
27
|
+
disabled,
|
|
28
|
+
onClick,
|
|
29
|
+
children: label
|
|
30
|
+
}), /* @__PURE__ */ jsxs(Menu.Root, {
|
|
31
|
+
positioning: { placement: "bottom-end" },
|
|
32
|
+
children: [/* @__PURE__ */ jsx(Menu.Trigger, {
|
|
33
|
+
asChild: true,
|
|
34
|
+
children: /* @__PURE__ */ jsx("button", {
|
|
35
|
+
type: "button",
|
|
36
|
+
disabled,
|
|
37
|
+
"data-variant": variant,
|
|
38
|
+
"data-tone": tone,
|
|
39
|
+
"data-size": size,
|
|
40
|
+
"data-square": "true",
|
|
41
|
+
"data-motion": "ink-ripple lit",
|
|
42
|
+
"aria-label": "More actions",
|
|
43
|
+
children: chevronDown()
|
|
44
|
+
})
|
|
45
|
+
}), /* @__PURE__ */ jsx(Portal, { children: /* @__PURE__ */ jsx(Menu.Positioner, { children: /* @__PURE__ */ jsx(Menu.Content, { children: items.map((entry) => /* @__PURE__ */ jsx(Menu.Item, {
|
|
46
|
+
value: entry.value,
|
|
47
|
+
disabled: entry.disabled,
|
|
48
|
+
"data-danger": entry.danger ? "" : void 0,
|
|
49
|
+
onSelect: () => onSelect?.(entry.value),
|
|
50
|
+
children: /* @__PURE__ */ jsx(Menu.ItemText, { children: entry.label })
|
|
51
|
+
}, entry.value)) }) }) })]
|
|
52
|
+
})]
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
/** One stroke pointing down: all a fitted dropdown arrow needs. */
|
|
56
|
+
function chevronDown() {
|
|
57
|
+
return /* @__PURE__ */ jsx("svg", {
|
|
58
|
+
width: 16,
|
|
59
|
+
height: 16,
|
|
60
|
+
viewBox: "0 0 24 24",
|
|
61
|
+
fill: "none",
|
|
62
|
+
stroke: "currentColor",
|
|
63
|
+
strokeWidth: 1.75,
|
|
64
|
+
strokeLinecap: "round",
|
|
65
|
+
strokeLinejoin: "round",
|
|
66
|
+
"aria-hidden": "true",
|
|
67
|
+
children: /* @__PURE__ */ jsx("path", { d: "m6 9 6 6 6-6" })
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
//#endregion
|
|
71
|
+
export { SplitButton };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Splitter as Splitter$1 } from "@ark-ui/react/splitter";
|
|
2
|
+
//#region src/components/splitter/index.d.ts
|
|
3
|
+
/** Ark's Splitter, dressed in the paper-and-ink system: panels divide on
|
|
4
|
+
* a hairline and a small paper-seal thumb answers the hand. The API is
|
|
5
|
+
* Ark's own — Root, Panel, ResizeTrigger, ResizeTriggerIndicator. */
|
|
6
|
+
export declare const Splitter: typeof Splitter$1;
|
|
7
|
+
//#endregion
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
+
import { Splitter as Splitter$1 } from "@ark-ui/react/splitter";
|
|
3
|
+
//#region src/components/splitter/index.tsx
|
|
4
|
+
/** Ark's Splitter, dressed in the paper-and-ink system: panels divide on
|
|
5
|
+
* a hairline and a small paper-seal thumb answers the hand. The API is
|
|
6
|
+
* Ark's own — Root, Panel, ResizeTrigger, ResizeTriggerIndicator. */
|
|
7
|
+
const Splitter = Splitter$1;
|
|
8
|
+
injectComponentStyle("splitter");
|
|
9
|
+
//#endregion
|
|
10
|
+
export { Splitter };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { HTMLAttributes } from "react";
|
|
2
|
+
//#region src/components/stack/index.d.ts
|
|
3
|
+
export interface StackProps extends HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
direction?: "column" | "row";
|
|
5
|
+
gap?: "none" | "xs" | "sm" | "md" | "lg" | "xl";
|
|
6
|
+
wrap?: boolean;
|
|
7
|
+
align?: string;
|
|
8
|
+
justify?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function Stack({ direction, gap, wrap, align, justify, ...rest }: StackProps): import("react").JSX.Element;
|
|
11
|
+
//#endregion
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
//#region src/components/stack/index.tsx
|
|
4
|
+
/** Whitespace chosen by name: the named steps point at the space ramp so
|
|
5
|
+
* siblings are held apart by one token, never by ad-hoc margins. */
|
|
6
|
+
const gapVars = {
|
|
7
|
+
none: "0",
|
|
8
|
+
xs: "var(--bs-gap-xs)",
|
|
9
|
+
sm: "var(--bs-gap-sm)",
|
|
10
|
+
md: "var(--bs-gap-md)",
|
|
11
|
+
lg: "var(--bs-gap-lg)",
|
|
12
|
+
xl: "var(--bs-gap-xl)"
|
|
13
|
+
};
|
|
14
|
+
function Stack({ direction = "column", gap = "md", wrap = false, align, justify, ...rest }) {
|
|
15
|
+
injectComponentStyle("stack");
|
|
16
|
+
const style = {
|
|
17
|
+
...rest.style,
|
|
18
|
+
"--bs-stack-gap": gapVars[gap] ?? gapVars.md,
|
|
19
|
+
alignItems: align,
|
|
20
|
+
justifyContent: justify,
|
|
21
|
+
flexWrap: wrap ? "wrap" : void 0
|
|
22
|
+
};
|
|
23
|
+
return /* @__PURE__ */ jsx("div", {
|
|
24
|
+
...rest,
|
|
25
|
+
style,
|
|
26
|
+
"data-scope": "stack",
|
|
27
|
+
"data-part": "root",
|
|
28
|
+
"data-direction": direction
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
//#endregion
|
|
32
|
+
export { Stack };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { HTMLAttributes } from "react";
|
|
2
|
+
//#region src/components/stat/index.d.ts
|
|
3
|
+
export interface StatDeltaProps extends HTMLAttributes<HTMLElement> {
|
|
4
|
+
direction?: "up" | "down" | "flat";
|
|
5
|
+
"data-direction"?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const Stat: {
|
|
8
|
+
({ children, ...rest }: HTMLAttributes<HTMLElement>): import("react").JSX.Element;
|
|
9
|
+
displayName: string;
|
|
10
|
+
} & {
|
|
11
|
+
Root: {
|
|
12
|
+
({ children, ...rest }: HTMLAttributes<HTMLElement>): import("react").JSX.Element;
|
|
13
|
+
displayName: string;
|
|
14
|
+
};
|
|
15
|
+
Label: {
|
|
16
|
+
({ children, ...rest }: HTMLAttributes<HTMLElement>): import("react").JSX.Element;
|
|
17
|
+
displayName: string;
|
|
18
|
+
};
|
|
19
|
+
Value: {
|
|
20
|
+
({ children, ...rest }: HTMLAttributes<HTMLElement>): import("react").JSX.Element;
|
|
21
|
+
displayName: string;
|
|
22
|
+
};
|
|
23
|
+
Delta: ({ direction, children, ...rest }: StatDeltaProps) => import("react").JSX.Element;
|
|
24
|
+
Description: {
|
|
25
|
+
({ children, ...rest }: HTMLAttributes<HTMLElement>): import("react").JSX.Element;
|
|
26
|
+
displayName: string;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
//#endregion
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
//#region src/components/stat/index.tsx
|
|
4
|
+
function part(name, tag) {
|
|
5
|
+
const Tag = tag;
|
|
6
|
+
const Component = ({ children, ...rest }) => /* @__PURE__ */ jsx(Tag, {
|
|
7
|
+
...rest,
|
|
8
|
+
"data-scope": "stat",
|
|
9
|
+
"data-part": name.toLowerCase(),
|
|
10
|
+
children
|
|
11
|
+
});
|
|
12
|
+
Component.displayName = "Stat" + name;
|
|
13
|
+
return Component;
|
|
14
|
+
}
|
|
15
|
+
const Root = part("Root", "div");
|
|
16
|
+
const Label = part("Label", "p");
|
|
17
|
+
const Value = part("Value", "div");
|
|
18
|
+
const Description = part("Description", "p");
|
|
19
|
+
/** The delta reads the direction in the fixed semantic pigments; an
|
|
20
|
+
* explicit `data-direction` attribute on the consumer side still wins. */
|
|
21
|
+
const Delta = ({ direction = "flat", children, ...rest }) => /* @__PURE__ */ jsx("span", {
|
|
22
|
+
...rest,
|
|
23
|
+
"data-scope": "stat",
|
|
24
|
+
"data-part": "delta",
|
|
25
|
+
"data-direction": rest["data-direction"] ?? direction,
|
|
26
|
+
children
|
|
27
|
+
});
|
|
28
|
+
const Stat = Object.assign(Root, {
|
|
29
|
+
Root,
|
|
30
|
+
Label,
|
|
31
|
+
Value,
|
|
32
|
+
Delta,
|
|
33
|
+
Description
|
|
34
|
+
});
|
|
35
|
+
injectComponentStyle("stat");
|
|
36
|
+
//#endregion
|
|
37
|
+
export { Stat };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
import { Steps as Steps$1 } from "@ark-ui/react/steps";
|
|
3
|
+
//#region src/components/steps/index.d.ts
|
|
4
|
+
type StepsRootProps = ComponentProps<typeof Steps$1.Root> & {
|
|
5
|
+
/** One rung of the control-height ladder every indicator stands on. */
|
|
6
|
+
size?: "sm" | "md" | "lg";
|
|
7
|
+
};
|
|
8
|
+
declare function StepsRoot({ size, ...rest }: StepsRootProps): import("react").JSX.Element;
|
|
9
|
+
/**
|
|
10
|
+
* Steps — linear progress through a sequence.
|
|
11
|
+
*
|
|
12
|
+
* Parts: Root, List, Item, Trigger, Indicator, Separator, Content,
|
|
13
|
+
* PrevTrigger, NextTrigger, Progress. Indicator and Separator carry
|
|
14
|
+
* data-complete / data-current / data-incomplete.
|
|
15
|
+
*/
|
|
16
|
+
export declare const Steps: Omit<typeof Steps$1, "Root"> & {
|
|
17
|
+
Root: typeof StepsRoot;
|
|
18
|
+
};
|
|
19
|
+
//#endregion
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Steps as Steps$1 } from "@ark-ui/react/steps";
|
|
4
|
+
//#region src/components/steps/index.tsx
|
|
5
|
+
function StepsRoot({ size = "md", ...rest }) {
|
|
6
|
+
return /* @__PURE__ */ jsx(Steps$1.Root, {
|
|
7
|
+
...rest,
|
|
8
|
+
"data-size": size
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Steps — linear progress through a sequence.
|
|
13
|
+
*
|
|
14
|
+
* Parts: Root, List, Item, Trigger, Indicator, Separator, Content,
|
|
15
|
+
* PrevTrigger, NextTrigger, Progress. Indicator and Separator carry
|
|
16
|
+
* data-complete / data-current / data-incomplete.
|
|
17
|
+
*/
|
|
18
|
+
const Steps = {
|
|
19
|
+
...Steps$1,
|
|
20
|
+
Root: StepsRoot
|
|
21
|
+
};
|
|
22
|
+
injectComponentStyle("steps");
|
|
23
|
+
//#endregion
|
|
24
|
+
export { Steps };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Swap as Swap$1 } from "@ark-ui/react/swap";
|
|
2
|
+
//#region src/components/swap/index.d.ts
|
|
3
|
+
/** Ark's Swap, dressed in the paper-and-ink system: two impressions
|
|
4
|
+
* occupying one seal, the arriving one growing into place on the spring
|
|
5
|
+
* while the departing one shrinks away. The API is Ark's own — Root,
|
|
6
|
+
* Indicator (type="on" | "off"), RootProvider. */
|
|
7
|
+
export declare const Swap: typeof Swap$1;
|
|
8
|
+
//#endregion
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
+
import { Swap as Swap$1 } from "@ark-ui/react/swap";
|
|
3
|
+
//#region src/components/swap/index.tsx
|
|
4
|
+
/** Ark's Swap, dressed in the paper-and-ink system: two impressions
|
|
5
|
+
* occupying one seal, the arriving one growing into place on the spring
|
|
6
|
+
* while the departing one shrinks away. The API is Ark's own — Root,
|
|
7
|
+
* Indicator (type="on" | "off"), RootProvider. */
|
|
8
|
+
const Swap = Swap$1;
|
|
9
|
+
injectComponentStyle("swap");
|
|
10
|
+
//#endregion
|
|
11
|
+
export { Swap };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
import { Switch as Switch$1 } from "@ark-ui/react/switch";
|
|
3
|
+
//#region src/components/switch/index.d.ts
|
|
4
|
+
type SwitchRootProps = ComponentProps<typeof Switch$1.Root> & {
|
|
5
|
+
/** One rung for the thumb; the track travels with it. */
|
|
6
|
+
size?: "sm" | "md" | "lg";
|
|
7
|
+
};
|
|
8
|
+
declare function SwitchRoot({ size, ...rest }: SwitchRootProps): import("react").JSX.Element;
|
|
9
|
+
/** Ark's Switch, dressed in the paper-and-ink system: a track that rests
|
|
10
|
+
* in the inset shade of the paper and fills flat with primary ink when on,
|
|
11
|
+
* the thumb sliding on the spring. The API is Ark's own — Root, Label,
|
|
12
|
+
* Control, Thumb, HiddenInput. */
|
|
13
|
+
export declare const Switch: Omit<typeof Switch$1, "Root"> & {
|
|
14
|
+
Root: typeof SwitchRoot;
|
|
15
|
+
};
|
|
16
|
+
//#endregion
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Switch as Switch$1 } from "@ark-ui/react/switch";
|
|
4
|
+
//#region src/components/switch/index.tsx
|
|
5
|
+
function SwitchRoot({ size = "md", ...rest }) {
|
|
6
|
+
return /* @__PURE__ */ jsx(Switch$1.Root, {
|
|
7
|
+
...rest,
|
|
8
|
+
"data-size": size
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
/** Ark's Switch, dressed in the paper-and-ink system: a track that rests
|
|
12
|
+
* in the inset shade of the paper and fills flat with primary ink when on,
|
|
13
|
+
* the thumb sliding on the spring. The API is Ark's own — Root, Label,
|
|
14
|
+
* Control, Thumb, HiddenInput. */
|
|
15
|
+
const Switch = {
|
|
16
|
+
...Switch$1,
|
|
17
|
+
Root: SwitchRoot
|
|
18
|
+
};
|
|
19
|
+
injectComponentStyle("switch");
|
|
20
|
+
//#endregion
|
|
21
|
+
export { Switch };
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { CSSProperties } from "react";
|
|
2
|
+
import { CellData, ColumnDef, FlexRender, RowData, SortingState, TableFeatures, createColumnHelper } from "@tanstack/react-table";
|
|
3
|
+
//#region src/components/table/index.d.ts
|
|
4
|
+
/** Column metadata understood by this table: mark columns whose values
|
|
5
|
+
* read right-aligned in tabular figures. The type parameters mirror the
|
|
6
|
+
* library's own declaration — augmentation merging demands an identical
|
|
7
|
+
* parameter list. */
|
|
8
|
+
declare module "@tanstack/react-table" {
|
|
9
|
+
interface ColumnMeta<in out TFeatures extends TableFeatures, in out TData extends RowData, TValue extends CellData = CellData> {
|
|
10
|
+
numeric?: boolean;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
/** One-stop data table on TanStack Table v9, dressed in the paper-and-ink
|
|
14
|
+
* system: rows are CSS grids under ARIA table semantics, so sticky headers,
|
|
15
|
+
* pinned columns, merged cells, and a virtualized window all stay honest
|
|
16
|
+
* while sorting, filtering, tree expansion, selection, and pagination come
|
|
17
|
+
* from the row-model pipeline. */
|
|
18
|
+
export interface DataTableProps {
|
|
19
|
+
/** Row data; replaced wholesale on change — TanStack's memoized row
|
|
20
|
+
* models keep unrelated rows untouched, so edits land without a full
|
|
21
|
+
* re-render. Tree rows nest under `subRows`. */
|
|
22
|
+
data: RowData[];
|
|
23
|
+
/** Column definitions (TanStack `ColumnDef`, preferably built with
|
|
24
|
+
* `createColumnHelper().columns([...])`). Give every column an `id`
|
|
25
|
+
* unless it uses `accessorKey`. `size` fixes a px width; `minSize`
|
|
26
|
+
* floors a flexing track; otherwise the track hugs its content and
|
|
27
|
+
* only the table's leftover width is shared between columns. */
|
|
28
|
+
columns: ColumnDef<any, any, any>[];
|
|
29
|
+
/** Render a leading checkbox column with select-all. */
|
|
30
|
+
selectable?: boolean;
|
|
31
|
+
/** Allow header-click sorting (default true). */
|
|
32
|
+
sortable?: boolean;
|
|
33
|
+
/** Render a global-filter toolbar and per-column filter inputs. */
|
|
34
|
+
filterable?: boolean;
|
|
35
|
+
/** Keep the built-in toolbar row above the table (default true when
|
|
36
|
+
* `filterable`). Turn it off to host the global filter in your own
|
|
37
|
+
* toolbar — the feature stays registered and the instance methods
|
|
38
|
+
* keep working. */
|
|
39
|
+
showToolbar?: boolean;
|
|
40
|
+
/** Enable tree expansion over `subRows`; the first column hosts the
|
|
41
|
+
* expander and depth indent. */
|
|
42
|
+
tree?: boolean;
|
|
43
|
+
/** Column ids whose equal adjacent values merge into one cell (mutually
|
|
44
|
+
* exclusive with `virtual`). */
|
|
45
|
+
merge?: string[];
|
|
46
|
+
/** Column ids pinned to the start edge. */
|
|
47
|
+
pinStart?: string[];
|
|
48
|
+
/** Column ids pinned to the end edge. */
|
|
49
|
+
pinEnd?: string[];
|
|
50
|
+
/** Virtualize the body through a fixed-height window (mutually exclusive
|
|
51
|
+
* with `merge`). */
|
|
52
|
+
virtual?: boolean;
|
|
53
|
+
/** Row height in px; must match CSS so the virtual window aligns. */
|
|
54
|
+
rowHeight?: number;
|
|
55
|
+
/** Render the pagination bar and slice rows client-side. */
|
|
56
|
+
paginated?: boolean;
|
|
57
|
+
pageSize?: number;
|
|
58
|
+
pageSizeOptions?: number[];
|
|
59
|
+
/** Keep the (optional) footer row pinned to the viewport bottom. */
|
|
60
|
+
stickyFooter?: boolean;
|
|
61
|
+
initialSorting?: SortingState;
|
|
62
|
+
globalFilterPlaceholder?: string;
|
|
63
|
+
emptyText?: string;
|
|
64
|
+
/** Allow dragging header cells onto each other to reorder columns and
|
|
65
|
+
* body rows onto each other to reorder data — with `tree`, row drops
|
|
66
|
+
* read as before / inside / after, so a drop can also nest a branch
|
|
67
|
+
* under its target. Rows need a stable `id`. Row dragging rests while
|
|
68
|
+
* sorting or filtering hides the data order. */
|
|
69
|
+
reorderable?: boolean;
|
|
70
|
+
/** Fires with the reordered data array (the whole tree in tree mode). */
|
|
71
|
+
onRowReorder?: (rows: RowData[]) => void;
|
|
72
|
+
/** Fires with the full leaf-column id order after a header drop. */
|
|
73
|
+
onColumnReorder?: (ids: string[]) => void;
|
|
74
|
+
/** Applied to the root vessel. */
|
|
75
|
+
style?: CSSProperties;
|
|
76
|
+
}
|
|
77
|
+
export declare function DataTable(rawProps: DataTableProps): import("react").JSX.Element;
|
|
78
|
+
//#endregion
|
|
79
|
+
export { type ColumnDef, FlexRender, type SortingState, createColumnHelper };
|