@bysages/react 0.3.1 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ai-response-BfKTmtCt.mjs → ai-response-nhDOlELQ.mjs} +4 -2
- package/dist/chevron-a2nIZKN4.mjs +6 -0
- package/dist/components/accordion/index.d.mts +22 -4
- package/dist/components/accordion/index.mjs +32 -2
- package/dist/components/affix/index.d.mts +4 -1
- package/dist/components/affix/index.mjs +6 -4
- package/dist/components/ai/index.d.mts +1 -1
- package/dist/components/ai/index.mjs +6 -4
- package/dist/components/ai-action/index.d.mts +4 -1
- package/dist/components/ai-action/index.mjs +4 -2
- package/dist/components/ai-attachments/index.d.mts +10 -4
- package/dist/components/ai-attachments/index.mjs +17 -45
- package/dist/components/ai-message/index.d.mts +4 -1
- package/dist/components/ai-message/index.mjs +4 -2
- package/dist/components/ai-prompt-input/index.d.mts +5 -2
- package/dist/components/ai-prompt-input/index.mjs +11 -15
- package/dist/components/ai-reasoning/index.d.mts +4 -1
- package/dist/components/ai-reasoning/index.mjs +5 -3
- package/dist/components/ai-response/index.d.mts +4 -1
- package/dist/components/ai-response/index.mjs +1 -1
- package/dist/components/ai-source/index.d.mts +8 -2
- package/dist/components/ai-source/index.mjs +6 -3
- package/dist/components/ai-suggestion/index.d.mts +4 -1
- package/dist/components/ai-suggestion/index.mjs +4 -2
- package/dist/components/ai-tool/index.d.mts +4 -1
- package/dist/components/ai-tool/index.mjs +5 -3
- package/dist/components/alert/index.d.mts +2 -0
- package/dist/components/alert/index.mjs +12 -19
- package/dist/components/angle-slider/index.d.mts +19 -2
- package/dist/components/angle-slider/index.mjs +32 -9
- package/dist/components/aspect-ratio/index.d.mts +4 -1
- package/dist/components/aspect-ratio/index.mjs +4 -2
- package/dist/components/autocomplete/index.d.mts +3 -1
- package/dist/components/autocomplete/index.mjs +15 -3
- package/dist/components/avatar/index.d.mts +2 -2
- package/dist/components/avatar/index.mjs +10 -3
- package/dist/components/avatar-group/index.d.mts +4 -1
- package/dist/components/avatar-group/index.mjs +4 -2
- package/dist/components/back-top/index.d.mts +7 -1
- package/dist/components/back-top/index.mjs +13 -18
- package/dist/components/badge/index.d.mts +4 -1
- package/dist/components/badge/index.mjs +4 -2
- package/dist/components/banner/index.mjs +3 -12
- package/dist/components/bento/index.mjs +1 -1
- package/dist/components/block-ui/index.d.mts +4 -1
- package/dist/components/block-ui/index.mjs +4 -2
- package/dist/components/breadcrumb/index.mjs +1 -1
- package/dist/components/browser/index.mjs +1 -1
- package/dist/components/button/index.d.mts +4 -1
- package/dist/components/button/index.mjs +4 -2
- package/dist/components/button-group/index.mjs +1 -1
- package/dist/components/calendar/index.d.mts +3 -1
- package/dist/components/calendar/index.mjs +10 -11
- package/dist/components/card/index.mjs +1 -1
- package/dist/components/carousel/index.d.mts +21 -1
- package/dist/components/carousel/index.mjs +44 -3
- package/dist/components/cascade-select/index.d.mts +6 -1
- package/dist/components/cascade-select/index.mjs +13 -36
- package/dist/components/checkbox/index.d.mts +20 -2
- package/dist/components/checkbox/index.mjs +29 -9
- package/dist/components/checkbox-group/index.d.mts +8 -6
- package/dist/components/checkbox-group/index.mjs +45 -49
- package/dist/components/chip/index.d.mts +4 -1
- package/dist/components/chip/index.mjs +4 -2
- package/dist/components/client-only/index.d.mts +7 -2
- package/dist/components/client-only/index.mjs +5 -1
- package/dist/components/clipboard/index.d.mts +17 -4
- package/dist/components/clipboard/index.mjs +34 -6
- package/dist/components/collapsible/index.d.mts +16 -4
- package/dist/components/collapsible/index.mjs +26 -2
- package/dist/components/color-picker/index.d.mts +20 -4
- package/dist/components/color-picker/index.mjs +57 -15
- package/dist/components/combobox/index.d.mts +27 -1
- package/dist/components/combobox/index.mjs +63 -6
- package/dist/components/command/index.d.mts +4 -1
- package/dist/components/command/index.mjs +8 -2
- package/dist/components/comment/index.d.mts +4 -1
- package/dist/components/comment/index.mjs +4 -2
- package/dist/components/config-provider/index.d.mts +4 -1
- package/dist/components/config-provider/index.mjs +3 -1
- package/dist/components/container/index.d.mts +4 -1
- package/dist/components/container/index.mjs +4 -2
- package/dist/components/data-view/index.d.mts +4 -1
- package/dist/components/data-view/index.mjs +4 -2
- package/dist/components/date-input/index.d.mts +19 -4
- package/dist/components/date-input/index.mjs +34 -10
- package/dist/components/date-picker/index.d.mts +21 -4
- package/dist/components/date-picker/index.mjs +59 -12
- package/dist/components/deferred-content/index.d.mts +4 -1
- package/dist/components/deferred-content/index.mjs +4 -2
- package/dist/components/descriptions/index.d.mts +10 -2
- package/dist/components/descriptions/index.mjs +14 -9
- package/dist/components/dialog/index.d.mts +18 -5
- package/dist/components/dialog/index.mjs +44 -2
- package/dist/components/dock/index.mjs +1 -1
- package/dist/components/download-trigger/index.d.mts +7 -2
- package/dist/components/download-trigger/index.mjs +5 -1
- package/dist/components/drawer/index.d.mts +18 -6
- package/dist/components/drawer/index.mjs +41 -2
- package/dist/components/dynamic-input/index.d.mts +4 -1
- package/dist/components/dynamic-input/index.mjs +11 -19
- package/dist/components/editable/index.d.mts +28 -7
- package/dist/components/editable/index.mjs +44 -5
- package/dist/components/ellipsis/index.d.mts +4 -1
- package/dist/components/ellipsis/index.mjs +4 -2
- package/dist/components/empty/index.mjs +1 -1
- package/dist/components/field/index.d.mts +30 -5
- package/dist/components/field/index.mjs +37 -4
- package/dist/components/fieldset/index.d.mts +19 -4
- package/dist/components/fieldset/index.mjs +29 -4
- package/dist/components/file-upload/index.d.mts +29 -9
- package/dist/components/file-upload/index.mjs +47 -11
- package/dist/components/float-button/index.mjs +1 -1
- package/dist/components/floating-panel/index.d.mts +18 -6
- package/dist/components/floating-panel/index.mjs +56 -2
- package/dist/components/focus-trap/index.d.mts +7 -2
- package/dist/components/focus-trap/index.mjs +5 -1
- package/dist/components/form/index.d.mts +1 -1
- package/dist/components/form/index.mjs +6 -3
- package/dist/components/frame/index.d.mts +4 -8
- package/dist/components/frame/index.mjs +13 -1
- package/dist/components/grid/index.d.mts +4 -1
- package/dist/components/grid/index.mjs +4 -2
- package/dist/components/highlight/index.d.mts +3 -5
- package/dist/components/highlight/index.mjs +7 -2
- package/dist/components/hover-card/index.d.mts +20 -4
- package/dist/components/hover-card/index.mjs +33 -2
- package/dist/components/icon/index.d.mts +10 -8
- package/dist/components/icon/index.mjs +6 -4
- package/dist/components/image/index.d.mts +5 -2
- package/dist/components/image/index.mjs +15 -30
- package/dist/components/image-cropper/index.d.mts +13 -2
- package/dist/components/image-cropper/index.mjs +35 -3
- package/dist/components/image-viewer/index.d.mts +2 -24
- package/dist/components/image-viewer/index.mjs +3 -113
- package/dist/components/input/index.d.mts +3 -1
- package/dist/components/input/index.mjs +1 -1
- package/dist/components/input-group/index.mjs +1 -1
- package/dist/components/json-tree-view/index.d.mts +17 -1
- package/dist/components/json-tree-view/index.mjs +27 -6
- package/dist/components/kbd/index.d.mts +4 -1
- package/dist/components/kbd/index.mjs +4 -2
- package/dist/components/layout/index.d.mts +25 -7
- package/dist/components/layout/index.mjs +158 -64
- package/dist/components/link/index.d.mts +4 -1
- package/dist/components/link/index.mjs +4 -2
- package/dist/components/list/index.mjs +1 -1
- package/dist/components/listbox/index.d.mts +22 -1
- package/dist/components/listbox/index.mjs +37 -5
- package/dist/components/marquee/index.d.mts +18 -1
- package/dist/components/marquee/index.mjs +35 -3
- package/dist/components/masonry/index.d.mts +4 -1
- package/dist/components/masonry/index.mjs +4 -2
- package/dist/components/media-player/index.d.mts +2 -0
- package/dist/components/media-player/index.mjs +2 -0
- package/dist/components/mentions/index.d.mts +1 -1
- package/dist/components/mentions/index.mjs +1 -1
- package/dist/components/menu/index.d.mts +29 -11
- package/dist/components/menu/index.mjs +35 -13
- package/dist/components/menubar/index.d.mts +3 -1
- package/dist/components/menubar/index.mjs +7 -2
- package/dist/components/meter/index.mjs +1 -1
- package/dist/components/navigation-menu/index.d.mts +25 -1
- package/dist/components/navigation-menu/index.mjs +37 -2
- package/dist/components/number-input/index.d.mts +28 -6
- package/dist/components/number-input/index.mjs +34 -9
- package/dist/components/order-list/index.d.mts +4 -1
- package/dist/components/order-list/index.mjs +27 -25
- package/dist/components/page-header/index.mjs +1 -1
- package/dist/components/pagination/index.d.mts +23 -3
- package/dist/components/pagination/index.mjs +58 -13
- package/dist/components/password-input/index.d.mts +24 -6
- package/dist/components/password-input/index.mjs +32 -9
- package/dist/components/pin-input/index.d.mts +23 -5
- package/dist/components/pin-input/index.mjs +30 -8
- package/dist/components/popconfirm/index.d.mts +9 -5
- package/dist/components/popconfirm/index.mjs +24 -19
- package/dist/components/popover/index.d.mts +2 -8
- package/dist/components/popover/index.mjs +45 -5
- package/dist/components/presence/index.d.mts +10 -2
- package/dist/components/presence/index.mjs +6 -1
- package/dist/components/progress/index.d.mts +18 -3
- package/dist/components/progress/index.mjs +35 -10
- package/dist/components/progress-group/index.d.mts +4 -1
- package/dist/components/progress-group/index.mjs +5 -3
- package/dist/components/qr-code/index.d.mts +14 -1
- package/dist/components/qr-code/index.mjs +27 -3
- package/dist/components/radio-group/index.d.mts +27 -2
- package/dist/components/radio-group/index.mjs +33 -9
- package/dist/components/rating-group/index.d.mts +20 -3
- package/dist/components/rating-group/index.mjs +27 -9
- package/dist/components/result/index.d.mts +1 -1
- package/dist/components/result/index.mjs +3 -3
- package/dist/components/scroll-area/index.d.mts +14 -1
- package/dist/components/scroll-area/index.mjs +33 -3
- package/dist/components/segment-group/index.d.mts +28 -2
- package/dist/components/segment-group/index.mjs +35 -8
- package/dist/components/select/index.d.mts +2 -2
- package/dist/components/select/index.mjs +1 -1
- package/dist/components/separator/index.d.mts +4 -1
- package/dist/components/separator/index.mjs +4 -2
- package/dist/components/signature-pad/index.d.mts +25 -5
- package/dist/components/signature-pad/index.mjs +38 -4
- package/dist/components/skeleton/index.d.mts +4 -1
- package/dist/components/skeleton/index.mjs +4 -2
- package/dist/components/slider/index.d.mts +21 -2
- package/dist/components/slider/index.mjs +32 -9
- package/dist/components/spinner/index.d.mts +4 -1
- package/dist/components/spinner/index.mjs +4 -2
- package/dist/components/split-button/index.d.mts +3 -1
- package/dist/components/split-button/index.mjs +13 -18
- package/dist/components/splitter/index.d.mts +17 -4
- package/dist/components/splitter/index.mjs +36 -2
- package/dist/components/spotlight/index.d.mts +4 -1
- package/dist/components/spotlight/index.mjs +4 -2
- package/dist/components/stack/index.d.mts +4 -1
- package/dist/components/stack/index.mjs +7 -5
- package/dist/components/stat/index.mjs +1 -1
- package/dist/components/steps/index.d.mts +26 -6
- package/dist/components/steps/index.mjs +27 -12
- package/dist/components/swap/index.d.mts +11 -5
- package/dist/components/swap/index.mjs +31 -4
- package/dist/components/switch/index.d.mts +20 -2
- package/dist/components/switch/index.mjs +28 -9
- package/dist/components/table/index.d.mts +4 -1
- package/dist/components/table/index.mjs +38 -60
- package/dist/components/tabs/index.d.mts +24 -2
- package/dist/components/tabs/index.mjs +26 -10
- package/dist/components/tags-input/index.d.mts +33 -8
- package/dist/components/tags-input/index.mjs +42 -10
- package/dist/components/terminal/index.d.mts +4 -1
- package/dist/components/terminal/index.mjs +4 -2
- package/dist/components/textarea/index.d.mts +4 -1
- package/dist/components/textarea/index.mjs +4 -2
- package/dist/components/timeline/index.mjs +1 -1
- package/dist/components/timer/index.d.mts +18 -1
- package/dist/components/timer/index.mjs +52 -3
- package/dist/components/toast/index.d.mts +3 -6
- package/dist/components/toast/index.mjs +23 -3
- package/dist/components/toc/index.d.mts +19 -5
- package/dist/components/toc/index.mjs +32 -6
- package/dist/components/toggle/index.d.mts +11 -4
- package/dist/components/toggle/index.mjs +22 -2
- package/dist/components/toggle-group/index.d.mts +26 -2
- package/dist/components/toggle-group/index.mjs +32 -7
- package/dist/components/toolbar/index.d.mts +4 -1
- package/dist/components/toolbar/index.mjs +4 -2
- package/dist/components/tooltip/index.d.mts +17 -4
- package/dist/components/tooltip/index.mjs +29 -2
- package/dist/components/tour/index.d.mts +18 -9
- package/dist/components/tour/index.mjs +45 -3
- package/dist/components/transfer/index.d.mts +3 -1
- package/dist/components/transfer/index.mjs +15 -27
- package/dist/components/tree-select/index.d.mts +3 -1
- package/dist/components/tree-select/index.mjs +12 -23
- package/dist/components/tree-view/index.d.mts +22 -2
- package/dist/components/tree-view/index.mjs +51 -9
- package/dist/components/typography/index.d.mts +4 -0
- package/dist/components/typography/index.mjs +2 -1
- package/dist/components/user/index.d.mts +4 -1
- package/dist/components/user/index.mjs +4 -2
- package/dist/components/virtual-list/index.d.mts +4 -1
- package/dist/components/virtual-list/index.mjs +11 -13
- package/dist/components/watermark/index.d.mts +4 -1
- package/dist/components/watermark/index.mjs +5 -3
- package/dist/family-DE_GQeeM.mjs +9 -0
- package/dist/icon-BALgGtNK.mjs +18 -0
- package/dist/id-C37UYLwJ.mjs +13 -0
- package/dist/image-viewer-B-hKFkEw.mjs +141 -0
- package/dist/{index-Dn5mHf1g.d.mts → index-B4twHAQC.d.mts} +194 -106
- package/dist/{index-Uefyw7Im.d.mts → index-Bbg4heDO.d.mts} +12 -7
- package/dist/index-BcRdWGY-.d.mts +115 -0
- package/dist/{index-Iy8m0Qev.d.mts → index-D_iKc2Uw.d.mts} +31 -2
- package/dist/index-Dj8S4eyJ.d.mts +41 -0
- package/dist/index-Eu-Bttta.d.mts +24 -0
- package/dist/{index-uPyYiWaL.d.mts → index-PsgGWW3m.d.mts} +8 -2
- package/dist/index.d.mts +36 -35
- package/dist/index.mjs +11 -10
- package/dist/{input-2oezH-dY.mjs → input-BDpQ0e6G.mjs} +4 -2
- package/dist/media-player-DjVvo1_7.mjs +554 -0
- package/dist/{mentions-DMIBCBOd.mjs → mentions-BwnyvdXz.mjs} +75 -43
- package/dist/select-i9UZsQCU.mjs +121 -0
- package/package.json +9 -81
- package/dist/chevron-BeHvt46K.mjs +0 -17
- package/dist/glyph-VI989p8H.mjs +0 -14
- package/dist/select-eAHutw56.mjs +0 -70
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Menu } from "../menu/index.mjs";
|
|
1
2
|
import { HTMLAttributes } from "react";
|
|
2
3
|
//#region src/components/menubar/index.d.ts
|
|
3
4
|
export interface MenubarEntry {
|
|
@@ -28,5 +29,6 @@ export interface MenubarProps extends Omit<HTMLAttributes<HTMLDivElement>, "onSe
|
|
|
28
29
|
/** Called with the entry's `value` when it is chosen. */
|
|
29
30
|
onSelect?: (value: string) => void;
|
|
30
31
|
}
|
|
31
|
-
|
|
32
|
+
declare function MenubarImpl({ items, onSelect, children, ...rest }: MenubarProps): import("react").JSX.Element;
|
|
33
|
+
export declare const Menubar: typeof MenubarImpl & typeof Menu;
|
|
32
34
|
//#endregion
|
|
@@ -1,17 +1,21 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as useElementId } from "../../id-C37UYLwJ.mjs";
|
|
2
|
+
import { Menu as Menu$1 } from "../menu/index.mjs";
|
|
3
|
+
import { injectComponentStyle } from "@bysages/core/styling";
|
|
2
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
5
|
import { Portal } from "@ark-ui/react/portal";
|
|
4
6
|
import { Menu } from "@ark-ui/react/menu";
|
|
5
7
|
//#region src/components/menubar/index.tsx
|
|
6
|
-
function
|
|
8
|
+
function MenubarImpl({ items, onSelect, children, ...rest }) {
|
|
7
9
|
injectComponentStyle("menubar");
|
|
8
10
|
injectComponentStyle("menu");
|
|
11
|
+
const hostId = useElementId("menubar", rest);
|
|
9
12
|
return /* @__PURE__ */ jsxs("div", {
|
|
10
13
|
...rest,
|
|
11
14
|
"data-scope": "menubar",
|
|
12
15
|
"data-part": "root",
|
|
13
16
|
role: "menubar",
|
|
14
17
|
children: [items.map((group) => /* @__PURE__ */ jsxs(Menu.Root, {
|
|
18
|
+
id: `${hostId}:menu:${group.label}`,
|
|
15
19
|
positioning: { placement: "bottom-start" },
|
|
16
20
|
children: [/* @__PURE__ */ jsx(Menu.Trigger, {
|
|
17
21
|
asChild: true,
|
|
@@ -32,5 +36,6 @@ function Menubar({ items, onSelect, children, ...rest }) {
|
|
|
32
36
|
}, group.label)), children]
|
|
33
37
|
});
|
|
34
38
|
}
|
|
39
|
+
const Menubar = Object.assign(MenubarImpl, Menu$1);
|
|
35
40
|
//#endregion
|
|
36
41
|
export { Menubar };
|
|
@@ -1,8 +1,32 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
1
2
|
import { NavigationMenu as NavigationMenu$1 } from "@ark-ui/react/navigation-menu";
|
|
2
3
|
//#region src/components/navigation-menu/index.d.ts
|
|
3
4
|
/** Ark's NavigationMenu, dressed in the paper-and-ink system: a menubar of
|
|
4
5
|
* ghost triggers with one sliding stroke of primary ink, opening the shared
|
|
5
6
|
* popup vessel. The API is Ark's own — Root, List, Item, Trigger, Link,
|
|
6
7
|
* Content, ViewportPositioner, Viewport, Indicator, ItemIndicator, Arrow. */
|
|
7
|
-
|
|
8
|
+
declare function NavigationMenuRoot(props: ComponentProps<typeof NavigationMenu$1.Root>): import("react").JSX.Element;
|
|
9
|
+
declare function NavigationMenuLink(props: ComponentProps<typeof NavigationMenu$1.Link>): import("react").JSX.Element;
|
|
10
|
+
/** One flat destination in the callable bar; grouped panels and mega
|
|
11
|
+
* menus stay on the anatomy. */
|
|
12
|
+
export interface NavigationMenuLinkOption {
|
|
13
|
+
label: string;
|
|
14
|
+
href: string;
|
|
15
|
+
current?: boolean;
|
|
16
|
+
description?: string;
|
|
17
|
+
}
|
|
18
|
+
export interface NavigationMenuFacadeProps {
|
|
19
|
+
items: NavigationMenuLinkOption[];
|
|
20
|
+
orientation?: "horizontal" | "vertical";
|
|
21
|
+
className?: string;
|
|
22
|
+
}
|
|
23
|
+
declare function NavigationMenuFacade({ items, orientation, className }: NavigationMenuFacadeProps): import("react").JSX.Element;
|
|
24
|
+
declare namespace NavigationMenuFacade {
|
|
25
|
+
var displayName: string;
|
|
26
|
+
}
|
|
27
|
+
type NavigationMenuParts = Omit<typeof NavigationMenu$1, "Root" | "Link"> & {
|
|
28
|
+
Root: typeof NavigationMenuRoot;
|
|
29
|
+
Link: typeof NavigationMenuLink;
|
|
30
|
+
};
|
|
31
|
+
export declare const NavigationMenu: typeof NavigationMenuFacade & NavigationMenuParts;
|
|
8
32
|
//#endregion
|
|
@@ -1,11 +1,46 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as useElementId } from "../../id-C37UYLwJ.mjs";
|
|
2
|
+
import { injectComponentStyle } from "@bysages/core/styling";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
4
|
import { NavigationMenu as NavigationMenu$1 } from "@ark-ui/react/navigation-menu";
|
|
3
5
|
//#region src/components/navigation-menu/index.tsx
|
|
4
6
|
/** Ark's NavigationMenu, dressed in the paper-and-ink system: a menubar of
|
|
5
7
|
* ghost triggers with one sliding stroke of primary ink, opening the shared
|
|
6
8
|
* popup vessel. The API is Ark's own — Root, List, Item, Trigger, Link,
|
|
7
9
|
* Content, ViewportPositioner, Viewport, Indicator, ItemIndicator, Arrow. */
|
|
8
|
-
|
|
10
|
+
function NavigationMenuRoot(props) {
|
|
11
|
+
const id = useElementId("navigation-menu", props);
|
|
12
|
+
return /* @__PURE__ */ jsx(NavigationMenu$1.Root, {
|
|
13
|
+
...props,
|
|
14
|
+
id
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
function NavigationMenuLink(props) {
|
|
18
|
+
injectComponentStyle("navigation-menu");
|
|
19
|
+
return /* @__PURE__ */ jsx(NavigationMenu$1.Link, {
|
|
20
|
+
...props,
|
|
21
|
+
"data-motion": "ink-ripple"
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
function NavigationMenuFacade({ items, orientation = "horizontal", className }) {
|
|
25
|
+
return /* @__PURE__ */ jsx(NavigationMenuRoot, {
|
|
26
|
+
className,
|
|
27
|
+
orientation,
|
|
28
|
+
children: /* @__PURE__ */ jsx(NavigationMenu$1.List, { children: items.map((item) => /* @__PURE__ */ jsx(NavigationMenu$1.Item, {
|
|
29
|
+
value: item.href,
|
|
30
|
+
children: /* @__PURE__ */ jsxs(NavigationMenuLink, {
|
|
31
|
+
href: item.href,
|
|
32
|
+
current: item.current,
|
|
33
|
+
children: [/* @__PURE__ */ jsx("span", { children: item.label }), item.description ? /* @__PURE__ */ jsx("span", { children: item.description }) : null]
|
|
34
|
+
})
|
|
35
|
+
}, item.href)) })
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
NavigationMenuFacade.displayName = "SNavigationMenu";
|
|
39
|
+
const NavigationMenu = Object.assign(NavigationMenuFacade, {
|
|
40
|
+
...NavigationMenu$1,
|
|
41
|
+
Root: NavigationMenuRoot,
|
|
42
|
+
Link: NavigationMenuLink
|
|
43
|
+
});
|
|
9
44
|
injectComponentStyle("navigation-menu");
|
|
10
45
|
//#endregion
|
|
11
46
|
export { NavigationMenu };
|
|
@@ -5,12 +5,34 @@ type NumberInputRootProps = ComponentProps<typeof NumberInput$1.Root> & {
|
|
|
5
5
|
/** One rung of the control-height ladder for the field and its stepper. */
|
|
6
6
|
size?: "sm" | "md" | "lg";
|
|
7
7
|
};
|
|
8
|
-
declare function NumberInputRoot(
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
declare function NumberInputRoot(props: NumberInputRootProps): import("react").JSX.Element;
|
|
9
|
+
interface NumberInputFacadeProps {
|
|
10
|
+
value?: string;
|
|
11
|
+
defaultValue?: string;
|
|
12
|
+
label?: string;
|
|
13
|
+
placeholder?: string;
|
|
14
|
+
min?: number;
|
|
15
|
+
max?: number;
|
|
16
|
+
step?: number;
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
invalid?: boolean;
|
|
19
|
+
required?: boolean;
|
|
20
|
+
size?: "sm" | "md" | "lg";
|
|
21
|
+
onValueChange?: (value: string) => void;
|
|
22
|
+
}
|
|
23
|
+
/** The one-tag path for a stepped number field; formatting, scrubbing,
|
|
24
|
+
* and locale rules stay on the anatomy. */
|
|
25
|
+
declare function NumberInputFacade({ value, defaultValue, label, placeholder, min, max, step, disabled, invalid, required, size, onValueChange }: NumberInputFacadeProps): import("react").JSX.Element;
|
|
26
|
+
export declare const NumberInput: typeof NumberInputFacade & {
|
|
14
27
|
Root: typeof NumberInputRoot;
|
|
28
|
+
Context: (props: NumberInput$1.ContextProps) => import("react").ReactNode;
|
|
29
|
+
Control: import("react").ForwardRefExoticComponent<NumberInput$1.ControlProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
30
|
+
DecrementTrigger: import("react").ForwardRefExoticComponent<NumberInput$1.DecrementTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
31
|
+
IncrementTrigger: import("react").ForwardRefExoticComponent<NumberInput$1.IncrementTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
32
|
+
Input: import("react").ForwardRefExoticComponent<NumberInput$1.InputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
33
|
+
Label: import("react").ForwardRefExoticComponent<NumberInput$1.LabelProps & import("react").RefAttributes<HTMLLabelElement>>;
|
|
34
|
+
RootProvider: import("react").ForwardRefExoticComponent<NumberInput$1.RootProviderProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
35
|
+
Scrubber: import("react").ForwardRefExoticComponent<NumberInput$1.ScrubberProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
36
|
+
ValueText: import("react").ForwardRefExoticComponent<NumberInput$1.ValueTextProps & import("react").RefAttributes<HTMLSpanElement>>;
|
|
15
37
|
};
|
|
16
38
|
//#endregion
|
|
@@ -1,21 +1,46 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { t as iconNode } from "../../icon-BALgGtNK.mjs";
|
|
2
|
+
import { t as useElementId } from "../../id-C37UYLwJ.mjs";
|
|
3
|
+
import { injectComponentStyle } from "@bysages/core/styling";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
5
|
import { NumberInput as NumberInput$1 } from "@ark-ui/react/number-input";
|
|
4
6
|
//#region src/components/number-input/index.tsx
|
|
5
|
-
function NumberInputRoot(
|
|
7
|
+
function NumberInputRoot(props) {
|
|
8
|
+
const id = useElementId("number-input", props);
|
|
9
|
+
const { size = "md", ...rest } = props;
|
|
6
10
|
return /* @__PURE__ */ jsx(NumberInput$1.Root, {
|
|
7
11
|
...rest,
|
|
12
|
+
id,
|
|
8
13
|
"data-size": size
|
|
9
14
|
});
|
|
10
15
|
}
|
|
11
|
-
/**
|
|
12
|
-
*
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
+
/** The one-tag path for a stepped number field; formatting, scrubbing,
|
|
17
|
+
* and locale rules stay on the anatomy. */
|
|
18
|
+
function NumberInputFacade({ value, defaultValue, label, placeholder, min, max, step, disabled = false, invalid = false, required = false, size = "md", onValueChange }) {
|
|
19
|
+
return /* @__PURE__ */ jsxs(NumberInputRoot, {
|
|
20
|
+
size,
|
|
21
|
+
min,
|
|
22
|
+
max,
|
|
23
|
+
step,
|
|
24
|
+
disabled,
|
|
25
|
+
invalid,
|
|
26
|
+
required,
|
|
27
|
+
defaultValue,
|
|
28
|
+
...value === void 0 ? {} : {
|
|
29
|
+
value,
|
|
30
|
+
onValueChange: (details) => onValueChange?.(details.value)
|
|
31
|
+
},
|
|
32
|
+
children: [label ? /* @__PURE__ */ jsx(NumberInput$1.Label, { children: label }) : null, /* @__PURE__ */ jsxs(NumberInput$1.Control, { children: [
|
|
33
|
+
/* @__PURE__ */ jsx(NumberInput$1.Input, { placeholder }),
|
|
34
|
+
/* @__PURE__ */ jsx(NumberInput$1.Scrubber, { children: iconNode("pause") }),
|
|
35
|
+
/* @__PURE__ */ jsx(NumberInput$1.IncrementTrigger, { children: iconNode("chevron-up") }),
|
|
36
|
+
/* @__PURE__ */ jsx(NumberInput$1.DecrementTrigger, { children: iconNode("chevron-down") })
|
|
37
|
+
] })]
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
const NumberInput = Object.assign(NumberInputFacade, {
|
|
16
41
|
...NumberInput$1,
|
|
17
42
|
Root: NumberInputRoot
|
|
18
|
-
};
|
|
43
|
+
});
|
|
19
44
|
injectComponentStyle("number-input");
|
|
20
45
|
//#endregion
|
|
21
46
|
export { NumberInput };
|
|
@@ -17,5 +17,8 @@ export interface OrderListProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
17
17
|
* the model is the order. Dragging rides the native drag events — a
|
|
18
18
|
* hairline of primary ink marks the seam the row will land on — so
|
|
19
19
|
* touch keeps the buttons as its route. */
|
|
20
|
-
|
|
20
|
+
declare function OrderListImpl({ value, options, label, onValueChange, ...rest }: OrderListProps): import("react").JSX.Element;
|
|
21
|
+
export declare const OrderList: typeof OrderListImpl & {
|
|
22
|
+
Root: typeof OrderListImpl;
|
|
23
|
+
};
|
|
21
24
|
//#endregion
|
|
@@ -1,34 +1,35 @@
|
|
|
1
|
+
import { t as iconNode } from "../../icon-BALgGtNK.mjs";
|
|
2
|
+
import { t as withSelfRoot } from "../../family-DE_GQeeM.mjs";
|
|
1
3
|
import { n as useComponentMessages } from "../../messages-1jJWtaYU.mjs";
|
|
2
|
-
import { injectComponentStyle } from "@bysages/core";
|
|
4
|
+
import { injectComponentStyle } from "@bysages/core/styling";
|
|
3
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
6
|
import { useRef, useState } from "react";
|
|
5
7
|
//#region src/components/order-list/index.tsx
|
|
6
|
-
const
|
|
7
|
-
up:
|
|
8
|
-
down:
|
|
9
|
-
top:
|
|
10
|
-
|
|
8
|
+
const ORDER_ICONS = {
|
|
9
|
+
up: { name: "chevron-up" },
|
|
10
|
+
down: { name: "chevron-down" },
|
|
11
|
+
top: {
|
|
12
|
+
name: "chevron-up",
|
|
13
|
+
rail: `<path d="M5 4h14" />`
|
|
14
|
+
},
|
|
15
|
+
bottom: {
|
|
16
|
+
name: "chevron-down",
|
|
17
|
+
rail: `<path d="M5 20h14" />`
|
|
18
|
+
}
|
|
11
19
|
};
|
|
12
|
-
function
|
|
13
|
-
|
|
14
|
-
|
|
20
|
+
function orderIcon(direction) {
|
|
21
|
+
const icon = ORDER_ICONS[direction];
|
|
22
|
+
return iconNode(icon.name, {
|
|
15
23
|
width: 12,
|
|
16
|
-
height: 12
|
|
17
|
-
|
|
18
|
-
stroke: "currentColor",
|
|
19
|
-
strokeWidth: 2,
|
|
20
|
-
strokeLinecap: "round",
|
|
21
|
-
strokeLinejoin: "round",
|
|
22
|
-
"aria-hidden": "true",
|
|
23
|
-
children: paths.map((d) => /* @__PURE__ */ jsx("path", { d }, d))
|
|
24
|
-
});
|
|
24
|
+
height: 12
|
|
25
|
+
}, icon.rail ?? "");
|
|
25
26
|
}
|
|
26
27
|
/** A ledger the reader may rewrite: rows move by grip or by the side
|
|
27
28
|
* arrows, and the group reports the new order as the value itself —
|
|
28
29
|
* the model is the order. Dragging rides the native drag events — a
|
|
29
30
|
* hairline of primary ink marks the seam the row will land on — so
|
|
30
31
|
* touch keeps the buttons as its route. */
|
|
31
|
-
function
|
|
32
|
+
function OrderListImpl({ value, options, label, onValueChange, ...rest }) {
|
|
32
33
|
injectComponentStyle("order-list");
|
|
33
34
|
const messages = useComponentMessages();
|
|
34
35
|
const dragging = useRef(null);
|
|
@@ -119,36 +120,36 @@ function OrderList({ value, options, label, onValueChange, ...rest }) {
|
|
|
119
120
|
children: [
|
|
120
121
|
[
|
|
121
122
|
messages.orderList.toTop,
|
|
122
|
-
|
|
123
|
+
"top",
|
|
123
124
|
-index,
|
|
124
125
|
0
|
|
125
126
|
],
|
|
126
127
|
[
|
|
127
128
|
messages.orderList.moveUp,
|
|
128
|
-
|
|
129
|
+
"up",
|
|
129
130
|
-1,
|
|
130
131
|
0
|
|
131
132
|
],
|
|
132
133
|
[
|
|
133
134
|
messages.orderList.moveDown,
|
|
134
|
-
|
|
135
|
+
"down",
|
|
135
136
|
1,
|
|
136
137
|
rows.length - 1
|
|
137
138
|
],
|
|
138
139
|
[
|
|
139
140
|
messages.orderList.toBottom,
|
|
140
|
-
|
|
141
|
+
"bottom",
|
|
141
142
|
rows.length - 1 - index,
|
|
142
143
|
rows.length - 1
|
|
143
144
|
]
|
|
144
|
-
].map(([aria,
|
|
145
|
+
].map(([aria, direction, offset, edge]) => /* @__PURE__ */ jsx("button", {
|
|
145
146
|
type: "button",
|
|
146
147
|
"aria-label": aria,
|
|
147
148
|
"data-scope": "order-list",
|
|
148
149
|
"data-part": "move",
|
|
149
150
|
disabled: index === edge,
|
|
150
151
|
onClick: () => move(option.value, offset),
|
|
151
|
-
children:
|
|
152
|
+
children: orderIcon(direction)
|
|
152
153
|
}, aria))
|
|
153
154
|
})
|
|
154
155
|
]
|
|
@@ -157,5 +158,6 @@ function OrderList({ value, options, label, onValueChange, ...rest }) {
|
|
|
157
158
|
})
|
|
158
159
|
});
|
|
159
160
|
}
|
|
161
|
+
const OrderList = withSelfRoot(OrderListImpl);
|
|
160
162
|
//#endregion
|
|
161
163
|
export { OrderList };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { injectComponentStyle } from "@bysages/core";
|
|
1
|
+
import { injectComponentStyle } from "@bysages/core/styling";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
//#region src/components/page-header/index.tsx
|
|
4
4
|
/** The page's face: an eyebrow whisper, a serif title, one line of
|
|
@@ -1,18 +1,38 @@
|
|
|
1
|
-
import { ComponentProps } from "react";
|
|
1
|
+
import { CSSProperties, ComponentProps } from "react";
|
|
2
2
|
import { Pagination as Pagination$1 } from "@ark-ui/react/pagination";
|
|
3
3
|
//#region src/components/pagination/index.d.ts
|
|
4
4
|
type PaginationRootProps = ComponentProps<typeof Pagination$1.Root> & {
|
|
5
5
|
/** One rung of the control-height ladder every page seal shares. */
|
|
6
6
|
size?: "sm" | "md" | "lg";
|
|
7
7
|
};
|
|
8
|
-
declare function PaginationRoot(
|
|
8
|
+
declare function PaginationRoot(props: PaginationRootProps): import("react").JSX.Element;
|
|
9
9
|
/**
|
|
10
10
|
* Pagination — paged navigation.
|
|
11
11
|
*
|
|
12
12
|
* Parts: Root, Item (page seals), Ellipsis, PrevTrigger, NextTrigger,
|
|
13
13
|
* FirstTrigger, LastTrigger. Items carry data-selected.
|
|
14
14
|
*/
|
|
15
|
-
|
|
15
|
+
type PaginationFacadeProps = {
|
|
16
|
+
value?: number;
|
|
17
|
+
defaultValue?: number;
|
|
18
|
+
count?: number;
|
|
19
|
+
pageSize?: number;
|
|
20
|
+
defaultPageSize?: number;
|
|
21
|
+
siblingCount?: number;
|
|
22
|
+
label?: string;
|
|
23
|
+
size?: "sm" | "md" | "lg";
|
|
24
|
+
className?: string;
|
|
25
|
+
style?: CSSProperties;
|
|
26
|
+
onValueChange?: (page: number) => void;
|
|
27
|
+
};
|
|
28
|
+
declare const PaginationPrevTrigger: import("react").ForwardRefExoticComponent<Pagination$1.PrevTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
29
|
+
declare const PaginationNextTrigger: import("react").ForwardRefExoticComponent<Pagination$1.NextTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
30
|
+
/** The complete pagination bar behind one page: count and page size become
|
|
31
|
+
* the visible ladder, with edge semantics left to anatomy. */
|
|
32
|
+
declare function PaginationFacade(props: PaginationFacadeProps): import("react").JSX.Element;
|
|
33
|
+
export declare const Pagination: typeof PaginationFacade & Omit<typeof Pagination$1, "Root" | "PrevTrigger" | "NextTrigger"> & {
|
|
16
34
|
Root: typeof PaginationRoot;
|
|
35
|
+
PrevTrigger: typeof PaginationPrevTrigger;
|
|
36
|
+
NextTrigger: typeof PaginationNextTrigger;
|
|
17
37
|
};
|
|
18
38
|
//#endregion
|
|
@@ -1,23 +1,68 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { t as iconNode } from "../../icon-BALgGtNK.mjs";
|
|
2
|
+
import { t as useElementId } from "../../id-C37UYLwJ.mjs";
|
|
3
|
+
import { injectComponentStyle } from "@bysages/core/styling";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
5
|
import { Pagination as Pagination$1 } from "@ark-ui/react/pagination";
|
|
4
6
|
//#region src/components/pagination/index.tsx
|
|
5
|
-
function PaginationRoot(
|
|
7
|
+
function PaginationRoot(props) {
|
|
8
|
+
injectComponentStyle("pagination");
|
|
9
|
+
const id = useElementId("pagination", props);
|
|
10
|
+
const { size = "md", ...rest } = props;
|
|
6
11
|
return /* @__PURE__ */ jsx(Pagination$1.Root, {
|
|
7
12
|
...rest,
|
|
13
|
+
id,
|
|
8
14
|
"data-size": size
|
|
9
15
|
});
|
|
10
16
|
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
*
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
17
|
+
const PaginationPrevTrigger = Pagination$1.PrevTrigger;
|
|
18
|
+
const PaginationNextTrigger = Pagination$1.NextTrigger;
|
|
19
|
+
/** The complete pagination bar behind one page: count and page size become
|
|
20
|
+
* the visible ladder, with edge semantics left to anatomy. */
|
|
21
|
+
function PaginationFacade(props) {
|
|
22
|
+
const { value, defaultValue, count = 0, pageSize, defaultPageSize, siblingCount = 1, label, size = "md", className, style, onValueChange } = props;
|
|
23
|
+
return /* @__PURE__ */ jsxs(PaginationRoot, {
|
|
24
|
+
size,
|
|
25
|
+
"aria-label": label,
|
|
26
|
+
count,
|
|
27
|
+
defaultPage: defaultValue,
|
|
28
|
+
page: value,
|
|
29
|
+
...pageSize === void 0 ? {} : { pageSize },
|
|
30
|
+
...defaultPageSize === void 0 ? {} : { defaultPageSize },
|
|
31
|
+
siblingCount,
|
|
32
|
+
className,
|
|
33
|
+
style,
|
|
34
|
+
onPageChange: (event) => onValueChange?.(event.page),
|
|
35
|
+
children: [
|
|
36
|
+
/* @__PURE__ */ jsx(PaginationPrevTrigger, {
|
|
37
|
+
"aria-label": "Previous page",
|
|
38
|
+
children: iconNode("chevron-left", {
|
|
39
|
+
width: 14,
|
|
40
|
+
height: 14
|
|
41
|
+
})
|
|
42
|
+
}),
|
|
43
|
+
/* @__PURE__ */ jsx(Pagination$1.Context, { children: (pagination) => pagination.pages.map((page, index) => page.type === "page" ? /* @__PURE__ */ jsx(Pagination$1.Item, {
|
|
44
|
+
type: "page",
|
|
45
|
+
value: page.value,
|
|
46
|
+
children: page.value
|
|
47
|
+
}, page.value) : /* @__PURE__ */ jsx(Pagination$1.Ellipsis, {
|
|
48
|
+
index,
|
|
49
|
+
children: "…"
|
|
50
|
+
}, `ellipsis-${index}`)) }),
|
|
51
|
+
/* @__PURE__ */ jsx(PaginationNextTrigger, {
|
|
52
|
+
"aria-label": "Next page",
|
|
53
|
+
children: iconNode("chevron-right", {
|
|
54
|
+
width: 14,
|
|
55
|
+
height: 14
|
|
56
|
+
})
|
|
57
|
+
})
|
|
58
|
+
]
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
const Pagination = Object.assign(PaginationFacade, {
|
|
18
62
|
...Pagination$1,
|
|
19
|
-
Root: PaginationRoot
|
|
20
|
-
|
|
21
|
-
|
|
63
|
+
Root: PaginationRoot,
|
|
64
|
+
PrevTrigger: PaginationPrevTrigger,
|
|
65
|
+
NextTrigger: PaginationNextTrigger
|
|
66
|
+
});
|
|
22
67
|
//#endregion
|
|
23
68
|
export { Pagination };
|
|
@@ -5,12 +5,30 @@ type PasswordInputRootProps = ComponentProps<typeof PasswordInput$1.Root> & {
|
|
|
5
5
|
/** One rung of the control-height ladder for the field and its eye. */
|
|
6
6
|
size?: "sm" | "md" | "lg";
|
|
7
7
|
};
|
|
8
|
-
declare function PasswordInputRoot(
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
declare function PasswordInputRoot(props: PasswordInputRootProps): import("react").JSX.Element;
|
|
9
|
+
interface PasswordInputFacadeProps {
|
|
10
|
+
value?: string;
|
|
11
|
+
defaultValue?: string;
|
|
12
|
+
label?: string;
|
|
13
|
+
placeholder?: string;
|
|
14
|
+
autoComplete?: "current-password" | "new-password";
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
invalid?: boolean;
|
|
17
|
+
required?: boolean;
|
|
18
|
+
size?: "sm" | "md" | "lg";
|
|
19
|
+
onValueChange?: (value: string) => void;
|
|
20
|
+
}
|
|
21
|
+
/** The one-tag path: the masked field and reveal control. Visibility
|
|
22
|
+
* state, password-manager rules, and validation stay on the anatomy. */
|
|
23
|
+
declare function PasswordInputFacade({ value, defaultValue, label, placeholder, autoComplete, disabled, invalid, required, size, onValueChange }: PasswordInputFacadeProps): import("react").JSX.Element;
|
|
24
|
+
export declare const PasswordInput: typeof PasswordInputFacade & {
|
|
14
25
|
Root: typeof PasswordInputRoot;
|
|
26
|
+
Context: (props: PasswordInput$1.ContextProps) => import("react").ReactNode;
|
|
27
|
+
Control: import("react").ForwardRefExoticComponent<PasswordInput$1.ControlProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
28
|
+
Indicator: import("react").ForwardRefExoticComponent<PasswordInput$1.IndicatorProps & import("react").RefAttributes<HTMLSpanElement>>;
|
|
29
|
+
Input: import("react").ForwardRefExoticComponent<PasswordInput$1.InputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
30
|
+
Label: import("react").ForwardRefExoticComponent<PasswordInput$1.LabelProps & import("react").RefAttributes<HTMLLabelElement>>;
|
|
31
|
+
RootProvider: import("react").ForwardRefExoticComponent<PasswordInput$1.RootProviderProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
32
|
+
VisibilityTrigger: import("react").ForwardRefExoticComponent<PasswordInput$1.VisibilityTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
15
33
|
};
|
|
16
34
|
//#endregion
|
|
@@ -1,21 +1,44 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { t as iconNode } from "../../icon-BALgGtNK.mjs";
|
|
2
|
+
import { t as useElementId } from "../../id-C37UYLwJ.mjs";
|
|
3
|
+
import { injectComponentStyle } from "@bysages/core/styling";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
5
|
import { PasswordInput as PasswordInput$1 } from "@ark-ui/react/password-input";
|
|
4
6
|
//#region src/components/password-input/index.tsx
|
|
5
|
-
function PasswordInputRoot(
|
|
7
|
+
function PasswordInputRoot(props) {
|
|
8
|
+
const id = useElementId("password-input", props);
|
|
9
|
+
const { size = "md", ...rest } = props;
|
|
6
10
|
return /* @__PURE__ */ jsx(PasswordInput$1.Root, {
|
|
7
11
|
...rest,
|
|
12
|
+
id,
|
|
8
13
|
"data-size": size
|
|
9
14
|
});
|
|
10
15
|
}
|
|
11
|
-
/**
|
|
12
|
-
*
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
+
/** The one-tag path: the masked field and reveal control. Visibility
|
|
17
|
+
* state, password-manager rules, and validation stay on the anatomy. */
|
|
18
|
+
function PasswordInputFacade({ value, defaultValue, label, placeholder, autoComplete, disabled = false, invalid = false, required = false, size = "md", onValueChange }) {
|
|
19
|
+
return /* @__PURE__ */ jsxs(PasswordInputRoot, {
|
|
20
|
+
size,
|
|
21
|
+
autoComplete,
|
|
22
|
+
disabled,
|
|
23
|
+
invalid,
|
|
24
|
+
required,
|
|
25
|
+
children: [label ? /* @__PURE__ */ jsx(PasswordInput$1.Label, { children: label }) : null, /* @__PURE__ */ jsxs(PasswordInput$1.Control, { children: [/* @__PURE__ */ jsx(PasswordInput$1.Input, {
|
|
26
|
+
placeholder,
|
|
27
|
+
defaultValue,
|
|
28
|
+
...value === void 0 ? {} : {
|
|
29
|
+
value,
|
|
30
|
+
onChange: (event) => onValueChange?.(event.target.value)
|
|
31
|
+
}
|
|
32
|
+
}), /* @__PURE__ */ jsx(PasswordInput$1.VisibilityTrigger, { children: /* @__PURE__ */ jsx(PasswordInput$1.Indicator, {
|
|
33
|
+
fallback: iconNode("eye-off"),
|
|
34
|
+
children: iconNode("eye")
|
|
35
|
+
}) })] })]
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
const PasswordInput = Object.assign(PasswordInputFacade, {
|
|
16
39
|
...PasswordInput$1,
|
|
17
40
|
Root: PasswordInputRoot
|
|
18
|
-
};
|
|
41
|
+
});
|
|
19
42
|
injectComponentStyle("password-input");
|
|
20
43
|
//#endregion
|
|
21
44
|
export { PasswordInput };
|
|
@@ -5,11 +5,29 @@ type PinInputRootProps = ComponentProps<typeof PinInput$1.Root> & {
|
|
|
5
5
|
/** One rung of the control-height ladder each seal stands on. */
|
|
6
6
|
size?: "sm" | "md" | "lg";
|
|
7
7
|
};
|
|
8
|
-
declare function PinInputRoot(
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
declare function PinInputRoot(props: PinInputRootProps): import("react").JSX.Element;
|
|
9
|
+
interface PinInputFacadeProps {
|
|
10
|
+
value?: string[];
|
|
11
|
+
defaultValue?: string[];
|
|
12
|
+
label?: string;
|
|
13
|
+
placeholder?: string;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
invalid?: boolean;
|
|
16
|
+
required?: boolean;
|
|
17
|
+
length?: number;
|
|
18
|
+
size?: "sm" | "md" | "lg";
|
|
19
|
+
onValueChange?: (value: string[]) => void;
|
|
20
|
+
}
|
|
21
|
+
/** The one-tag path for an even run of seals; OTP, masks, and custom
|
|
22
|
+
* validation stay on the anatomy. */
|
|
23
|
+
declare function PinInputFacade({ value, defaultValue, label, placeholder, disabled, invalid, required, length, size, onValueChange }: PinInputFacadeProps): import("react").JSX.Element;
|
|
24
|
+
export declare const PinInput: typeof PinInputFacade & {
|
|
13
25
|
Root: typeof PinInputRoot;
|
|
26
|
+
Context: (props: PinInput$1.ContextProps) => import("react").ReactNode;
|
|
27
|
+
Control: import("react").ForwardRefExoticComponent<PinInput$1.ControlProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
28
|
+
HiddenInput: import("react").ForwardRefExoticComponent<PinInput$1.HiddenInputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
29
|
+
Input: import("react").ForwardRefExoticComponent<PinInput$1.InputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
30
|
+
Label: import("react").ForwardRefExoticComponent<PinInput$1.LabelProps & import("react").RefAttributes<HTMLLabelElement>>;
|
|
31
|
+
RootProvider: import("react").ForwardRefExoticComponent<PinInput$1.RootProviderProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
14
32
|
};
|
|
15
33
|
//#endregion
|