@bysages/react 0.2.2 → 0.3.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/README.md +16 -2
- 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 +23 -0
- package/dist/components/avatar/index.mjs +15 -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/bento/index.d.mts +26 -0
- package/dist/components/bento/index.mjs +41 -0
- package/dist/components/block-ui/index.d.mts +12 -0
- package/dist/components/block-ui/index.mjs +24 -0
- package/dist/components/breadcrumb/index.d.mts +32 -0
- package/dist/components/breadcrumb/index.mjs +35 -0
- package/dist/components/browser/index.d.mts +23 -0
- package/dist/components/browser/index.mjs +70 -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 +229 -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/data-view/index.d.mts +18 -0
- package/dist/components/data-view/index.mjs +64 -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/deferred-content/index.d.mts +16 -0
- package/dist/components/deferred-content/index.mjs +34 -0
- package/dist/components/descriptions/index.d.mts +33 -0
- package/dist/components/descriptions/index.mjs +50 -0
- package/dist/components/dialog/index.d.mts +9 -0
- package/dist/components/dialog/index.mjs +11 -0
- package/dist/components/dock/index.d.mts +25 -0
- package/dist/components/dock/index.mjs +51 -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 +24 -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 +19 -0
- package/dist/components/input/index.mjs +2 -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/order-list/index.d.mts +21 -0
- package/dist/components/order-list/index.mjs +162 -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/result/index.d.mts +31 -0
- package/dist/components/result/index.mjs +59 -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 +2 -0
- package/dist/components/select/index.mjs +2 -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/spotlight/index.d.mts +12 -0
- package/dist/components/spotlight/index.mjs +33 -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 +20 -0
- package/dist/components/tabs/index.mjs +24 -0
- package/dist/components/tags-input/index.d.mts +17 -0
- package/dist/components/tags-input/index.mjs +22 -0
- package/dist/components/terminal/index.d.mts +17 -0
- package/dist/components/terminal/index.mjs +65 -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 +26 -0
- package/dist/components/timeline/index.mjs +40 -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/toolbar/index.d.mts +17 -0
- package/dist/components/toolbar/index.mjs +29 -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/user/index.d.mts +20 -0
- package/dist/components/user/index.mjs +42 -0
- package/dist/components/virtual-list/index.d.mts +17 -0
- package/dist/components/virtual-list/index.mjs +52 -0
- package/dist/components/watermark/index.d.mts +16 -0
- package/dist/components/watermark/index.mjs +80 -0
- package/dist/index-CsfxYv6J.d.mts +10383 -0
- package/dist/index-DFN9F5Zt.d.mts +42 -0
- package/dist/index-Uefyw7Im.d.mts +108 -0
- package/dist/index-uPyYiWaL.d.mts +1813 -0
- package/dist/index.d.mts +141 -15446
- package/dist/index.mjs +141 -4871
- package/dist/input-2oezH-dY.mjs +58 -0
- package/dist/mentions-DMIBCBOd.mjs +181 -0
- package/dist/select-D1xiT1oJ.mjs +68 -0
- package/package.json +103 -9
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { a as MentionsVesselProps, c as useMentions, i as MentionsVessel, n as Mentions, o as UseMentionsHandlers, r as MentionsProps, s as UseMentionsOptions, t as MentionEntry } from "../../index-Uefyw7Im.mjs";
|
|
2
|
+
export { MentionEntry, Mentions, MentionsProps, MentionsVessel, MentionsVesselProps, type UseMentionsHandlers, type UseMentionsOptions, useMentions };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Menu as Menu$1 } from "@ark-ui/react/menu";
|
|
2
|
+
//#region src/components/menu/index.d.ts
|
|
3
|
+
type MenuRootProps = Parameters<typeof Menu$1.Root>[0] & {
|
|
4
|
+
/** One rung of the control-height ladder for the vessel's rows. */
|
|
5
|
+
size?: "sm" | "md" | "lg";
|
|
6
|
+
};
|
|
7
|
+
declare function MenuRoot({ size, ...rest }: MenuRootProps): import("react").JSX.Element;
|
|
8
|
+
declare function MenuContent(props: Parameters<typeof Menu$1.Content>[0]): import("react").JSX.Element;
|
|
9
|
+
/** Ark's Menu, dressed in the paper-and-ink system: a quiet paper vessel on
|
|
10
|
+
* elevation, hover as light on the row, checked items as the flat ink fill.
|
|
11
|
+
* The parts — Root, Trigger, ContextTrigger, Indicator, Positioner,
|
|
12
|
+
* Content, Item, ItemText, ItemIndicator, ItemGroup, ItemGroupLabel,
|
|
13
|
+
* TriggerItem, Separator, Arrow, ArrowTip. Ark's namespace is frozen —
|
|
14
|
+
* spread copies the members so Root and Content can be the sized
|
|
15
|
+
* wrappers while the rest stay Ark's own parts. */
|
|
16
|
+
export declare const Menu: Omit<typeof Menu$1, "Root" | "Content"> & {
|
|
17
|
+
Root: typeof MenuRoot;
|
|
18
|
+
Content: typeof MenuContent;
|
|
19
|
+
};
|
|
20
|
+
//#endregion
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { createContext, useContext } from "react";
|
|
4
|
+
import { Menu as Menu$1 } from "@ark-ui/react/menu";
|
|
5
|
+
//#region src/components/menu/index.tsx
|
|
6
|
+
/** The row rung rides the context because Ark's Root renders no DOM of
|
|
7
|
+
* its own — the vessel (Content) is the element the rung can land on,
|
|
8
|
+
* and the Portal breaks CSS ancestry between the two. */
|
|
9
|
+
const MenuSizeContext = createContext("md");
|
|
10
|
+
function MenuRoot({ size = "md", ...rest }) {
|
|
11
|
+
return /* @__PURE__ */ jsx(MenuSizeContext.Provider, {
|
|
12
|
+
value: size,
|
|
13
|
+
children: /* @__PURE__ */ jsx(Menu$1.Root, { ...rest })
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
function MenuContent(props) {
|
|
17
|
+
const size = useContext(MenuSizeContext);
|
|
18
|
+
return /* @__PURE__ */ jsx(Menu$1.Content, {
|
|
19
|
+
...props,
|
|
20
|
+
"data-size": size
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
/** Ark's Menu, dressed in the paper-and-ink system: a quiet paper vessel on
|
|
24
|
+
* elevation, hover as light on the row, checked items as the flat ink fill.
|
|
25
|
+
* The parts — Root, Trigger, ContextTrigger, Indicator, Positioner,
|
|
26
|
+
* Content, Item, ItemText, ItemIndicator, ItemGroup, ItemGroupLabel,
|
|
27
|
+
* TriggerItem, Separator, Arrow, ArrowTip. Ark's namespace is frozen —
|
|
28
|
+
* spread copies the members so Root and Content can be the sized
|
|
29
|
+
* wrappers while the rest stay Ark's own parts. */
|
|
30
|
+
const Menu = {
|
|
31
|
+
...Menu$1,
|
|
32
|
+
Root: MenuRoot,
|
|
33
|
+
Content: MenuContent
|
|
34
|
+
};
|
|
35
|
+
injectComponentStyle("menu");
|
|
36
|
+
//#endregion
|
|
37
|
+
export { Menu };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { HTMLAttributes } from "react";
|
|
2
|
+
//#region src/components/menubar/index.d.ts
|
|
3
|
+
export interface MenubarEntry {
|
|
4
|
+
label: string;
|
|
5
|
+
value: string;
|
|
6
|
+
danger?: boolean;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface MenubarGroup {
|
|
10
|
+
label: string;
|
|
11
|
+
items: MenubarEntry[];
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* A desktop-style menu bar: a row of quiet ghost triggers, each opening
|
|
15
|
+
* the same paper vessel as the menu family. The triggers are our own
|
|
16
|
+
* buttons grafted onto the menu machine's trigger via `asChild` — the
|
|
17
|
+
* machine keeps the trigger element (positioning, focus restore,
|
|
18
|
+
* `data-state`) while the element wears the menubar scope. The popups
|
|
19
|
+
* keep the menu parts untouched, so the menu stylesheet dresses them.
|
|
20
|
+
*
|
|
21
|
+
* Keyboard note: the triggers move between each other with Tab, not
|
|
22
|
+
* arrow keys — cross-menu arrow traversal is out of scope for this
|
|
23
|
+
* version. Inside an open menu the machine handles arrows and Escape.
|
|
24
|
+
*/
|
|
25
|
+
export interface MenubarProps extends Omit<HTMLAttributes<HTMLDivElement>, "onSelect"> {
|
|
26
|
+
/** The menus across the bar, each with its entries. */
|
|
27
|
+
items: MenubarGroup[];
|
|
28
|
+
/** Called with the entry's `value` when it is chosen. */
|
|
29
|
+
onSelect?: (value: string) => void;
|
|
30
|
+
}
|
|
31
|
+
export declare function Menubar({ items, onSelect, children, ...rest }: MenubarProps): import("react").JSX.Element;
|
|
32
|
+
//#endregion
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Portal } from "@ark-ui/react/portal";
|
|
4
|
+
import { Menu } from "@ark-ui/react/menu";
|
|
5
|
+
//#region src/components/menubar/index.tsx
|
|
6
|
+
function Menubar({ items, onSelect, children, ...rest }) {
|
|
7
|
+
injectComponentStyle("menubar");
|
|
8
|
+
injectComponentStyle("menu");
|
|
9
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
10
|
+
...rest,
|
|
11
|
+
"data-scope": "menubar",
|
|
12
|
+
"data-part": "root",
|
|
13
|
+
role: "menubar",
|
|
14
|
+
children: [items.map((group) => /* @__PURE__ */ jsxs(Menu.Root, {
|
|
15
|
+
positioning: { placement: "bottom-start" },
|
|
16
|
+
children: [/* @__PURE__ */ jsx(Menu.Trigger, {
|
|
17
|
+
asChild: true,
|
|
18
|
+
children: /* @__PURE__ */ jsx("button", {
|
|
19
|
+
type: "button",
|
|
20
|
+
"data-scope": "menubar",
|
|
21
|
+
"data-part": "trigger",
|
|
22
|
+
children: group.label
|
|
23
|
+
})
|
|
24
|
+
}), /* @__PURE__ */ jsx(Portal, { children: /* @__PURE__ */ jsx(Menu.Positioner, { children: /* @__PURE__ */ jsx(Menu.Content, { children: group.items.map((entry) => /* @__PURE__ */ jsx(Menu.Item, {
|
|
25
|
+
value: entry.value,
|
|
26
|
+
disabled: entry.disabled,
|
|
27
|
+
"data-danger": entry.danger ? "" : void 0,
|
|
28
|
+
onSelect: () => onSelect?.(entry.value),
|
|
29
|
+
children: /* @__PURE__ */ jsx(Menu.ItemText, { children: entry.label })
|
|
30
|
+
}, entry.value)) }) }) })]
|
|
31
|
+
}, group.label)), children]
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
//#endregion
|
|
35
|
+
export { Menubar };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { HTMLAttributes } from "react";
|
|
2
|
+
//#region src/components/meter/index.d.ts
|
|
3
|
+
export interface MeterRootProps extends HTMLAttributes<HTMLElement> {
|
|
4
|
+
/** The measured value — clamped between min and max. */
|
|
5
|
+
value: number;
|
|
6
|
+
min?: number;
|
|
7
|
+
max?: number;
|
|
8
|
+
/** The pigment the ink rides: primary unless a threshold is crossed. */
|
|
9
|
+
level?: "normal" | "success" | "warning" | "danger";
|
|
10
|
+
/** One rung of the groove ladder — the track's thickness. */
|
|
11
|
+
size?: "sm" | "md" | "lg";
|
|
12
|
+
label?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare const Meter: (({ value, min, max, level, size, label, children, ...rest }: MeterRootProps) => import("react").JSX.Element) & {
|
|
15
|
+
Root: ({ value, min, max, level, size, label, children, ...rest }: MeterRootProps) => import("react").JSX.Element;
|
|
16
|
+
Label: {
|
|
17
|
+
({ children, ...rest }: HTMLAttributes<HTMLElement>): import("react").JSX.Element;
|
|
18
|
+
displayName: string;
|
|
19
|
+
};
|
|
20
|
+
ValueText: {
|
|
21
|
+
({ children, ...rest }: HTMLAttributes<HTMLElement>): import("react").JSX.Element;
|
|
22
|
+
displayName: string;
|
|
23
|
+
};
|
|
24
|
+
Track: ({ ...rest }: HTMLAttributes<HTMLElement>) => import("react").JSX.Element;
|
|
25
|
+
};
|
|
26
|
+
//#endregion
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
//#region src/components/meter/index.tsx
|
|
4
|
+
function part(name, tag) {
|
|
5
|
+
const Tag = tag;
|
|
6
|
+
const Component = ({ children, ...rest }) => /* @__PURE__ */ jsx(Tag, {
|
|
7
|
+
...rest,
|
|
8
|
+
"data-scope": "meter",
|
|
9
|
+
"data-part": name.toLowerCase(),
|
|
10
|
+
children
|
|
11
|
+
});
|
|
12
|
+
Component.displayName = "Meter" + name;
|
|
13
|
+
return Component;
|
|
14
|
+
}
|
|
15
|
+
const Label = part("Label", "span");
|
|
16
|
+
const ValueText = part("ValueText", "span");
|
|
17
|
+
const Track = ({ ...rest }) => /* @__PURE__ */ jsx("span", {
|
|
18
|
+
...rest,
|
|
19
|
+
"data-scope": "meter",
|
|
20
|
+
"data-part": "track",
|
|
21
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
22
|
+
"data-scope": "meter",
|
|
23
|
+
"data-part": "range"
|
|
24
|
+
})
|
|
25
|
+
});
|
|
26
|
+
const Root = ({ value, min = 0, max = 100, level = "normal", size = "md", label, children, ...rest }) => {
|
|
27
|
+
const span = max - min;
|
|
28
|
+
const ratio = span > 0 ? Math.min(Math.max((value - min) / span, 0), 1) : 0;
|
|
29
|
+
return /* @__PURE__ */ jsx("div", {
|
|
30
|
+
...rest,
|
|
31
|
+
role: "meter",
|
|
32
|
+
"aria-valuemin": min,
|
|
33
|
+
"aria-valuemax": max,
|
|
34
|
+
"aria-valuenow": value,
|
|
35
|
+
"aria-label": label ?? rest["aria-label"],
|
|
36
|
+
"data-scope": "meter",
|
|
37
|
+
"data-part": "root",
|
|
38
|
+
"data-size": size,
|
|
39
|
+
"data-level": level !== "normal" ? level : void 0,
|
|
40
|
+
style: {
|
|
41
|
+
...rest.style,
|
|
42
|
+
"--_percent": `${ratio * 100}%`
|
|
43
|
+
},
|
|
44
|
+
children: children ?? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
45
|
+
/* @__PURE__ */ jsx(Label, { children: label }),
|
|
46
|
+
/* @__PURE__ */ jsx(ValueText, { children: `${Math.round(ratio * 100)}%` }),
|
|
47
|
+
/* @__PURE__ */ jsx(Track, {})
|
|
48
|
+
] })
|
|
49
|
+
});
|
|
50
|
+
};
|
|
51
|
+
const Meter = Object.assign(Root, {
|
|
52
|
+
Root,
|
|
53
|
+
Label,
|
|
54
|
+
ValueText,
|
|
55
|
+
Track
|
|
56
|
+
});
|
|
57
|
+
injectComponentStyle("meter");
|
|
58
|
+
//#endregion
|
|
59
|
+
export { Meter };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { NavigationMenu as NavigationMenu$1 } from "@ark-ui/react/navigation-menu";
|
|
2
|
+
//#region src/components/navigation-menu/index.d.ts
|
|
3
|
+
/** Ark's NavigationMenu, dressed in the paper-and-ink system: a menubar of
|
|
4
|
+
* ghost triggers with one sliding stroke of primary ink, opening the shared
|
|
5
|
+
* popup vessel. The API is Ark's own — Root, List, Item, Trigger, Link,
|
|
6
|
+
* Content, ViewportPositioner, Viewport, Indicator, ItemIndicator, Arrow. */
|
|
7
|
+
export declare const NavigationMenu: typeof NavigationMenu$1;
|
|
8
|
+
//#endregion
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
+
import { NavigationMenu as NavigationMenu$1 } from "@ark-ui/react/navigation-menu";
|
|
3
|
+
//#region src/components/navigation-menu/index.tsx
|
|
4
|
+
/** Ark's NavigationMenu, dressed in the paper-and-ink system: a menubar of
|
|
5
|
+
* ghost triggers with one sliding stroke of primary ink, opening the shared
|
|
6
|
+
* popup vessel. The API is Ark's own — Root, List, Item, Trigger, Link,
|
|
7
|
+
* Content, ViewportPositioner, Viewport, Indicator, ItemIndicator, Arrow. */
|
|
8
|
+
const NavigationMenu = NavigationMenu$1;
|
|
9
|
+
injectComponentStyle("navigation-menu");
|
|
10
|
+
//#endregion
|
|
11
|
+
export { NavigationMenu };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
import { NumberInput as NumberInput$1 } from "@ark-ui/react/number-input";
|
|
3
|
+
//#region src/components/number-input/index.d.ts
|
|
4
|
+
type NumberInputRootProps = ComponentProps<typeof NumberInput$1.Root> & {
|
|
5
|
+
/** One rung of the control-height ladder for the field and its stepper. */
|
|
6
|
+
size?: "sm" | "md" | "lg";
|
|
7
|
+
};
|
|
8
|
+
declare function NumberInputRoot({ size, ...rest }: NumberInputRootProps): import("react").JSX.Element;
|
|
9
|
+
/** Ark's NumberInput, dressed in the paper-and-ink system: the stepper
|
|
10
|
+
* rides inside the field as one seal split by a hairline, numbers set in
|
|
11
|
+
* tabular figures. The API is Ark's own — Root, Label, Control, Input,
|
|
12
|
+
* ValueText, IncrementTrigger, DecrementTrigger, Scrubber. */
|
|
13
|
+
export declare const NumberInput: Omit<typeof NumberInput$1, "Root"> & {
|
|
14
|
+
Root: typeof NumberInputRoot;
|
|
15
|
+
};
|
|
16
|
+
//#endregion
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { NumberInput as NumberInput$1 } from "@ark-ui/react/number-input";
|
|
4
|
+
//#region src/components/number-input/index.tsx
|
|
5
|
+
function NumberInputRoot({ size = "md", ...rest }) {
|
|
6
|
+
return /* @__PURE__ */ jsx(NumberInput$1.Root, {
|
|
7
|
+
...rest,
|
|
8
|
+
"data-size": size
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
/** Ark's NumberInput, dressed in the paper-and-ink system: the stepper
|
|
12
|
+
* rides inside the field as one seal split by a hairline, numbers set in
|
|
13
|
+
* tabular figures. The API is Ark's own — Root, Label, Control, Input,
|
|
14
|
+
* ValueText, IncrementTrigger, DecrementTrigger, Scrubber. */
|
|
15
|
+
const NumberInput = {
|
|
16
|
+
...NumberInput$1,
|
|
17
|
+
Root: NumberInputRoot
|
|
18
|
+
};
|
|
19
|
+
injectComponentStyle("number-input");
|
|
20
|
+
//#endregion
|
|
21
|
+
export { NumberInput };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { HTMLAttributes } from "react";
|
|
2
|
+
//#region src/components/order-list/index.d.ts
|
|
3
|
+
export interface OrderOption {
|
|
4
|
+
label: string;
|
|
5
|
+
value: string;
|
|
6
|
+
}
|
|
7
|
+
export interface OrderListProps extends HTMLAttributes<HTMLDivElement> {
|
|
8
|
+
/** The rows in their current order — the value is the order. */
|
|
9
|
+
value: string[];
|
|
10
|
+
/** Every row the ledger knows, in no particular order. */
|
|
11
|
+
options: OrderOption[];
|
|
12
|
+
label?: string;
|
|
13
|
+
onValueChange?: (value: string[]) => void;
|
|
14
|
+
}
|
|
15
|
+
/** A ledger the reader may rewrite: rows move by grip or by the side
|
|
16
|
+
* arrows, and the group reports the new order as the value itself —
|
|
17
|
+
* the model is the order. Dragging rides the native drag events — a
|
|
18
|
+
* hairline of primary ink marks the seam the row will land on — so
|
|
19
|
+
* touch keeps the buttons as its route. */
|
|
20
|
+
export declare function OrderList({ value, options, label, onValueChange, ...rest }: OrderListProps): import("react").JSX.Element;
|
|
21
|
+
//#endregion
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useRef, useState } from "react";
|
|
4
|
+
//#region src/components/order-list/index.tsx
|
|
5
|
+
const ARROWS = {
|
|
6
|
+
up: ["m18 15-6-6-6 6"],
|
|
7
|
+
down: ["m6 9 6 6 6-6"],
|
|
8
|
+
top: ["m18 15-6-6-6 6", "M5 4h14"],
|
|
9
|
+
bottom: ["m6 9 6 6 6-6", "M5 20h14"]
|
|
10
|
+
};
|
|
11
|
+
function arrowGlyph(paths) {
|
|
12
|
+
return /* @__PURE__ */ jsx("svg", {
|
|
13
|
+
viewBox: "0 0 24 24",
|
|
14
|
+
width: 12,
|
|
15
|
+
height: 12,
|
|
16
|
+
fill: "none",
|
|
17
|
+
stroke: "currentColor",
|
|
18
|
+
strokeWidth: 2,
|
|
19
|
+
strokeLinecap: "round",
|
|
20
|
+
strokeLinejoin: "round",
|
|
21
|
+
"aria-hidden": "true",
|
|
22
|
+
children: paths.map((d) => /* @__PURE__ */ jsx("path", { d }, d))
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
/** A ledger the reader may rewrite: rows move by grip or by the side
|
|
26
|
+
* arrows, and the group reports the new order as the value itself —
|
|
27
|
+
* the model is the order. Dragging rides the native drag events — a
|
|
28
|
+
* hairline of primary ink marks the seam the row will land on — so
|
|
29
|
+
* touch keeps the buttons as its route. */
|
|
30
|
+
function OrderList({ value, options, label, onValueChange, ...rest }) {
|
|
31
|
+
injectComponentStyle("order-list");
|
|
32
|
+
const dragging = useRef(null);
|
|
33
|
+
const [dropLine, setDropLine] = useState(null);
|
|
34
|
+
const rows = value.map((entry) => options.find((option) => option.value === entry)).filter((option) => option != null);
|
|
35
|
+
function reset() {
|
|
36
|
+
dragging.current = null;
|
|
37
|
+
setDropLine(null);
|
|
38
|
+
}
|
|
39
|
+
function move(entry, offset) {
|
|
40
|
+
const next = [...value];
|
|
41
|
+
const from = next.indexOf(entry);
|
|
42
|
+
const to = Math.max(0, Math.min(next.length - 1, from + offset));
|
|
43
|
+
if (from === to) return;
|
|
44
|
+
next.splice(to, 0, ...next.splice(from, 1));
|
|
45
|
+
onValueChange?.(next);
|
|
46
|
+
}
|
|
47
|
+
function drop() {
|
|
48
|
+
const entry = dragging.current;
|
|
49
|
+
if (entry == null) return;
|
|
50
|
+
const seam = dropLine;
|
|
51
|
+
const from = value.indexOf(entry);
|
|
52
|
+
if (seam && seam.index === from) return reset();
|
|
53
|
+
const next = value.filter((candidate) => candidate !== entry);
|
|
54
|
+
let at = seam ? seam.before ? seam.index : seam.index + 1 : next.length;
|
|
55
|
+
if (from < at) at -= 1;
|
|
56
|
+
next.splice(Math.max(0, Math.min(next.length, at)), 0, entry);
|
|
57
|
+
onValueChange?.(next);
|
|
58
|
+
reset();
|
|
59
|
+
}
|
|
60
|
+
function over(event, index, entry) {
|
|
61
|
+
event.preventDefault();
|
|
62
|
+
if (event.dataTransfer) event.dataTransfer.dropEffect = "move";
|
|
63
|
+
const rect = event.currentTarget.getBoundingClientRect();
|
|
64
|
+
const before = event.clientY < rect.top + rect.height / 2;
|
|
65
|
+
setDropLine(dragging.current != null && !(entry.value === dragging.current && before) ? {
|
|
66
|
+
index,
|
|
67
|
+
before
|
|
68
|
+
} : null);
|
|
69
|
+
}
|
|
70
|
+
return /* @__PURE__ */ jsx("div", {
|
|
71
|
+
...rest,
|
|
72
|
+
role: "listbox",
|
|
73
|
+
"aria-label": label ?? void 0,
|
|
74
|
+
"aria-multiselectable": false,
|
|
75
|
+
"data-scope": "order-list",
|
|
76
|
+
"data-part": "root",
|
|
77
|
+
onDragLeave: (event) => {
|
|
78
|
+
const host = event.currentTarget;
|
|
79
|
+
if (!event.relatedTarget || !host.contains(event.relatedTarget)) setDropLine(null);
|
|
80
|
+
},
|
|
81
|
+
children: /* @__PURE__ */ jsx("ol", {
|
|
82
|
+
"data-scope": "order-list",
|
|
83
|
+
"data-part": "list",
|
|
84
|
+
children: rows.map((option, index) => {
|
|
85
|
+
const seam = dropLine && dropLine.index === index ? dropLine.before ? "top" : "bottom" : void 0;
|
|
86
|
+
return /* @__PURE__ */ jsxs("li", {
|
|
87
|
+
role: "option",
|
|
88
|
+
"aria-selected": true,
|
|
89
|
+
draggable: true,
|
|
90
|
+
"data-scope": "order-list",
|
|
91
|
+
"data-part": "item",
|
|
92
|
+
"data-dragging": dragging.current === option.value ? "" : void 0,
|
|
93
|
+
"data-drop-line": seam,
|
|
94
|
+
onDragStart: (event) => {
|
|
95
|
+
dragging.current = option.value;
|
|
96
|
+
event.dataTransfer?.setData("text/plain", option.value);
|
|
97
|
+
if (event.dataTransfer) event.dataTransfer.effectAllowed = "move";
|
|
98
|
+
},
|
|
99
|
+
onDragEnd: reset,
|
|
100
|
+
onDragOver: (event) => over(event, index, option),
|
|
101
|
+
onDrop: (event) => {
|
|
102
|
+
event.preventDefault();
|
|
103
|
+
drop();
|
|
104
|
+
},
|
|
105
|
+
children: [
|
|
106
|
+
/* @__PURE__ */ jsx("span", {
|
|
107
|
+
"data-scope": "order-list",
|
|
108
|
+
"data-part": "grip",
|
|
109
|
+
"aria-hidden": "true",
|
|
110
|
+
children: "⋮⋮"
|
|
111
|
+
}),
|
|
112
|
+
/* @__PURE__ */ jsx("span", {
|
|
113
|
+
"data-scope": "order-list",
|
|
114
|
+
"data-part": "label",
|
|
115
|
+
children: option.label
|
|
116
|
+
}),
|
|
117
|
+
/* @__PURE__ */ jsx("span", {
|
|
118
|
+
"data-scope": "order-list",
|
|
119
|
+
"data-part": "controls",
|
|
120
|
+
children: [
|
|
121
|
+
[
|
|
122
|
+
"Move to top",
|
|
123
|
+
ARROWS.top,
|
|
124
|
+
-index,
|
|
125
|
+
0
|
|
126
|
+
],
|
|
127
|
+
[
|
|
128
|
+
"Move up",
|
|
129
|
+
ARROWS.up,
|
|
130
|
+
-1,
|
|
131
|
+
0
|
|
132
|
+
],
|
|
133
|
+
[
|
|
134
|
+
"Move down",
|
|
135
|
+
ARROWS.down,
|
|
136
|
+
1,
|
|
137
|
+
rows.length - 1
|
|
138
|
+
],
|
|
139
|
+
[
|
|
140
|
+
"Move to bottom",
|
|
141
|
+
ARROWS.bottom,
|
|
142
|
+
rows.length - 1 - index,
|
|
143
|
+
rows.length - 1
|
|
144
|
+
]
|
|
145
|
+
].map(([aria, paths, offset, edge]) => /* @__PURE__ */ jsx("button", {
|
|
146
|
+
type: "button",
|
|
147
|
+
"aria-label": aria,
|
|
148
|
+
"data-scope": "order-list",
|
|
149
|
+
"data-part": "move",
|
|
150
|
+
disabled: index === edge,
|
|
151
|
+
onClick: () => move(option.value, offset),
|
|
152
|
+
children: arrowGlyph([...paths])
|
|
153
|
+
}, aria))
|
|
154
|
+
})
|
|
155
|
+
]
|
|
156
|
+
}, option.value);
|
|
157
|
+
})
|
|
158
|
+
})
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
//#endregion
|
|
162
|
+
export { OrderList };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { HTMLAttributes } from "react";
|
|
2
|
+
//#region src/components/page-header/index.d.ts
|
|
3
|
+
export declare const PageHeader: {
|
|
4
|
+
({ children, ...rest }: HTMLAttributes<HTMLElement>): import("react").JSX.Element;
|
|
5
|
+
displayName: string;
|
|
6
|
+
} & {
|
|
7
|
+
Root: {
|
|
8
|
+
({ children, ...rest }: HTMLAttributes<HTMLElement>): import("react").JSX.Element;
|
|
9
|
+
displayName: string;
|
|
10
|
+
};
|
|
11
|
+
Heading: {
|
|
12
|
+
({ children, ...rest }: HTMLAttributes<HTMLElement>): import("react").JSX.Element;
|
|
13
|
+
displayName: string;
|
|
14
|
+
};
|
|
15
|
+
Eyebrow: {
|
|
16
|
+
({ children, ...rest }: HTMLAttributes<HTMLElement>): import("react").JSX.Element;
|
|
17
|
+
displayName: string;
|
|
18
|
+
};
|
|
19
|
+
Title: {
|
|
20
|
+
({ children, ...rest }: HTMLAttributes<HTMLElement>): import("react").JSX.Element;
|
|
21
|
+
displayName: string;
|
|
22
|
+
};
|
|
23
|
+
Description: {
|
|
24
|
+
({ children, ...rest }: HTMLAttributes<HTMLElement>): import("react").JSX.Element;
|
|
25
|
+
displayName: string;
|
|
26
|
+
};
|
|
27
|
+
Actions: {
|
|
28
|
+
({ children, ...rest }: HTMLAttributes<HTMLElement>): import("react").JSX.Element;
|
|
29
|
+
displayName: string;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
//#endregion
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
//#region src/components/page-header/index.tsx
|
|
4
|
+
/** The page's face: an eyebrow whisper, a serif title, one line of
|
|
5
|
+
* description, and the actions resting beside the title on the same
|
|
6
|
+
* baseline. Heading groups title and actions; the rest compose below. */
|
|
7
|
+
function part(name, tag) {
|
|
8
|
+
const Tag = tag;
|
|
9
|
+
const Component = ({ children, ...rest }) => /* @__PURE__ */ jsx(Tag, {
|
|
10
|
+
...rest,
|
|
11
|
+
"data-scope": "page-header",
|
|
12
|
+
"data-part": name.toLowerCase(),
|
|
13
|
+
children
|
|
14
|
+
});
|
|
15
|
+
Component.displayName = "PageHeader" + name;
|
|
16
|
+
return Component;
|
|
17
|
+
}
|
|
18
|
+
const Root = part("Root", "header");
|
|
19
|
+
const Heading = part("Heading", "div");
|
|
20
|
+
const Eyebrow = part("Eyebrow", "p");
|
|
21
|
+
const Title = part("Title", "h1");
|
|
22
|
+
const Description = part("Description", "p");
|
|
23
|
+
const Actions = part("Actions", "div");
|
|
24
|
+
const PageHeader = Object.assign(Root, {
|
|
25
|
+
Root,
|
|
26
|
+
Heading,
|
|
27
|
+
Eyebrow,
|
|
28
|
+
Title,
|
|
29
|
+
Description,
|
|
30
|
+
Actions
|
|
31
|
+
});
|
|
32
|
+
injectComponentStyle("page-header");
|
|
33
|
+
//#endregion
|
|
34
|
+
export { PageHeader };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
import { Pagination as Pagination$1 } from "@ark-ui/react/pagination";
|
|
3
|
+
//#region src/components/pagination/index.d.ts
|
|
4
|
+
type PaginationRootProps = ComponentProps<typeof Pagination$1.Root> & {
|
|
5
|
+
/** One rung of the control-height ladder every page seal shares. */
|
|
6
|
+
size?: "sm" | "md" | "lg";
|
|
7
|
+
};
|
|
8
|
+
declare function PaginationRoot({ size, ...rest }: PaginationRootProps): import("react").JSX.Element;
|
|
9
|
+
/**
|
|
10
|
+
* Pagination — paged navigation.
|
|
11
|
+
*
|
|
12
|
+
* Parts: Root, Item (page seals), Ellipsis, PrevTrigger, NextTrigger,
|
|
13
|
+
* FirstTrigger, LastTrigger. Items carry data-selected.
|
|
14
|
+
*/
|
|
15
|
+
export declare const Pagination: Omit<typeof Pagination$1, "Root"> & {
|
|
16
|
+
Root: typeof PaginationRoot;
|
|
17
|
+
};
|
|
18
|
+
//#endregion
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Pagination as Pagination$1 } from "@ark-ui/react/pagination";
|
|
4
|
+
//#region src/components/pagination/index.tsx
|
|
5
|
+
function PaginationRoot({ size = "md", ...rest }) {
|
|
6
|
+
return /* @__PURE__ */ jsx(Pagination$1.Root, {
|
|
7
|
+
...rest,
|
|
8
|
+
"data-size": size
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Pagination — paged navigation.
|
|
13
|
+
*
|
|
14
|
+
* Parts: Root, Item (page seals), Ellipsis, PrevTrigger, NextTrigger,
|
|
15
|
+
* FirstTrigger, LastTrigger. Items carry data-selected.
|
|
16
|
+
*/
|
|
17
|
+
const Pagination = {
|
|
18
|
+
...Pagination$1,
|
|
19
|
+
Root: PaginationRoot
|
|
20
|
+
};
|
|
21
|
+
injectComponentStyle("pagination");
|
|
22
|
+
//#endregion
|
|
23
|
+
export { Pagination };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
import { PasswordInput as PasswordInput$1 } from "@ark-ui/react/password-input";
|
|
3
|
+
//#region src/components/password-input/index.d.ts
|
|
4
|
+
type PasswordInputRootProps = ComponentProps<typeof PasswordInput$1.Root> & {
|
|
5
|
+
/** One rung of the control-height ladder for the field and its eye. */
|
|
6
|
+
size?: "sm" | "md" | "lg";
|
|
7
|
+
};
|
|
8
|
+
declare function PasswordInputRoot({ size, ...rest }: PasswordInputRootProps): import("react").JSX.Element;
|
|
9
|
+
/** Ark's PasswordInput, dressed in the paper-and-ink system: the reveal
|
|
10
|
+
* eye sits quiet at the field's edge and swaps in place — no shift, no
|
|
11
|
+
* noise. The API is Ark's own — Root, Label, Control, Input, Indicator,
|
|
12
|
+
* VisibilityTrigger. */
|
|
13
|
+
export declare const PasswordInput: Omit<typeof PasswordInput$1, "Root"> & {
|
|
14
|
+
Root: typeof PasswordInputRoot;
|
|
15
|
+
};
|
|
16
|
+
//#endregion
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { PasswordInput as PasswordInput$1 } from "@ark-ui/react/password-input";
|
|
4
|
+
//#region src/components/password-input/index.tsx
|
|
5
|
+
function PasswordInputRoot({ size = "md", ...rest }) {
|
|
6
|
+
return /* @__PURE__ */ jsx(PasswordInput$1.Root, {
|
|
7
|
+
...rest,
|
|
8
|
+
"data-size": size
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
/** Ark's PasswordInput, dressed in the paper-and-ink system: the reveal
|
|
12
|
+
* eye sits quiet at the field's edge and swaps in place — no shift, no
|
|
13
|
+
* noise. The API is Ark's own — Root, Label, Control, Input, Indicator,
|
|
14
|
+
* VisibilityTrigger. */
|
|
15
|
+
const PasswordInput = {
|
|
16
|
+
...PasswordInput$1,
|
|
17
|
+
Root: PasswordInputRoot
|
|
18
|
+
};
|
|
19
|
+
injectComponentStyle("password-input");
|
|
20
|
+
//#endregion
|
|
21
|
+
export { PasswordInput };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
import { PinInput as PinInput$1 } from "@ark-ui/react/pin-input";
|
|
3
|
+
//#region src/components/pin-input/index.d.ts
|
|
4
|
+
type PinInputRootProps = ComponentProps<typeof PinInput$1.Root> & {
|
|
5
|
+
/** One rung of the control-height ladder each seal stands on. */
|
|
6
|
+
size?: "sm" | "md" | "lg";
|
|
7
|
+
};
|
|
8
|
+
declare function PinInputRoot({ size, ...rest }: PinInputRootProps): import("react").JSX.Element;
|
|
9
|
+
/** Ark's PinInput, dressed in the paper-and-ink system: one character per
|
|
10
|
+
* square-cut seal, centered ink in tabular figures. The API is Ark's own —
|
|
11
|
+
* Root, Label, Control, Input, HiddenInput. */
|
|
12
|
+
export declare const PinInput: Omit<typeof PinInput$1, "Root"> & {
|
|
13
|
+
Root: typeof PinInputRoot;
|
|
14
|
+
};
|
|
15
|
+
//#endregion
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { PinInput as PinInput$1 } from "@ark-ui/react/pin-input";
|
|
4
|
+
//#region src/components/pin-input/index.tsx
|
|
5
|
+
function PinInputRoot({ size = "md", ...rest }) {
|
|
6
|
+
return /* @__PURE__ */ jsx(PinInput$1.Root, {
|
|
7
|
+
...rest,
|
|
8
|
+
"data-size": size
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
/** Ark's PinInput, dressed in the paper-and-ink system: one character per
|
|
12
|
+
* square-cut seal, centered ink in tabular figures. The API is Ark's own —
|
|
13
|
+
* Root, Label, Control, Input, HiddenInput. */
|
|
14
|
+
const PinInput = {
|
|
15
|
+
...PinInput$1,
|
|
16
|
+
Root: PinInputRoot
|
|
17
|
+
};
|
|
18
|
+
injectComponentStyle("pin-input");
|
|
19
|
+
//#endregion
|
|
20
|
+
export { PinInput };
|