@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,26 +1,19 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as iconNode } from "../../icon-BALgGtNK.mjs";
|
|
2
|
+
import { injectComponentStyle } from "@bysages/core/styling";
|
|
2
3
|
import { jsx } from "react/jsx-runtime";
|
|
3
4
|
import { createContext, useContext } from "react";
|
|
4
5
|
//#region src/components/alert/index.tsx
|
|
5
6
|
const StatusContext = createContext("ink");
|
|
6
|
-
function
|
|
7
|
-
return
|
|
7
|
+
function statusIcon(status) {
|
|
8
|
+
return iconNode({
|
|
9
|
+
info: "info",
|
|
10
|
+
success: "circle-check",
|
|
11
|
+
warning: "triangle-alert",
|
|
12
|
+
danger: "circle-x",
|
|
13
|
+
ink: "info"
|
|
14
|
+
}[status], {
|
|
8
15
|
width: 16,
|
|
9
|
-
height: 16
|
|
10
|
-
viewBox: "0 0 24 24",
|
|
11
|
-
fill: "none",
|
|
12
|
-
stroke: "currentColor",
|
|
13
|
-
strokeWidth: 1.75,
|
|
14
|
-
strokeLinecap: "round",
|
|
15
|
-
strokeLinejoin: "round",
|
|
16
|
-
"aria-hidden": "true",
|
|
17
|
-
children: /* @__PURE__ */ jsx("path", { d: {
|
|
18
|
-
info: "M12 8v5m0 3v.01M12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18Z",
|
|
19
|
-
success: "m4 12.5 5 5L20 6.5",
|
|
20
|
-
warning: "M12 4 2.5 20h19L12 4Zm0 6v4m0 3v.01",
|
|
21
|
-
danger: "M6 6l12 12M18 6 6 18",
|
|
22
|
-
ink: "M12 8v5m0 3v.01M12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18Z"
|
|
23
|
-
}[status] })
|
|
16
|
+
height: 16
|
|
24
17
|
});
|
|
25
18
|
}
|
|
26
19
|
function AlertRoot({ status = "ink", children, ...rest }) {
|
|
@@ -41,7 +34,7 @@ function Icon() {
|
|
|
41
34
|
return /* @__PURE__ */ jsx("span", {
|
|
42
35
|
"data-scope": "alert",
|
|
43
36
|
"data-part": "icon",
|
|
44
|
-
children:
|
|
37
|
+
children: statusIcon(status)
|
|
45
38
|
});
|
|
46
39
|
}
|
|
47
40
|
function Body({ children, ...rest }) {
|
|
@@ -5,12 +5,29 @@ type AngleSliderRootProps = ComponentProps<typeof AngleSlider$1.Root> & {
|
|
|
5
5
|
/** One rung of the dial ladder — the diameter the needle sweeps. */
|
|
6
6
|
size?: "sm" | "md" | "lg";
|
|
7
7
|
};
|
|
8
|
-
declare function AngleSliderRoot(
|
|
8
|
+
declare function AngleSliderRoot(props: AngleSliderRootProps): import("react").JSX.Element;
|
|
9
|
+
export interface AngleSliderFacadeProps {
|
|
10
|
+
value?: number;
|
|
11
|
+
defaultValue?: number;
|
|
12
|
+
label?: string;
|
|
13
|
+
step?: number;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
readOnly?: boolean;
|
|
16
|
+
/** One rung of the dial ladder — the diameter the needle sweeps. */
|
|
17
|
+
size?: "sm" | "md" | "lg";
|
|
18
|
+
className?: string;
|
|
19
|
+
onValueChange?: (value: number) => void;
|
|
20
|
+
}
|
|
21
|
+
declare function AngleSliderFacade({ value, defaultValue, label, step, disabled, readOnly, size, className, onValueChange }: AngleSliderFacadeProps): import("react").JSX.Element;
|
|
22
|
+
declare namespace AngleSliderFacade {
|
|
23
|
+
var displayName: string;
|
|
24
|
+
}
|
|
9
25
|
/** Ark's AngleSlider, dressed in the paper-and-ink system: a flat paper dial
|
|
10
26
|
* the thumb sweeps as a pigment needle over hairline degree ticks. The API
|
|
11
27
|
* is Ark's own — Root, Label, ValueText, Control, Thumb, MarkerGroup,
|
|
12
28
|
* Marker, HiddenInput. */
|
|
13
|
-
|
|
29
|
+
type AngleSliderParts = Omit<typeof AngleSlider$1, "Root"> & {
|
|
14
30
|
Root: typeof AngleSliderRoot;
|
|
15
31
|
};
|
|
32
|
+
export declare const AngleSlider: typeof AngleSliderFacade & AngleSliderParts;
|
|
16
33
|
//#endregion
|
|
@@ -1,21 +1,44 @@
|
|
|
1
|
-
import {
|
|
2
|
-
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";
|
|
3
4
|
import { AngleSlider as AngleSlider$1 } from "@ark-ui/react/angle-slider";
|
|
4
5
|
//#region src/components/angle-slider/index.tsx
|
|
5
|
-
function AngleSliderRoot(
|
|
6
|
+
function AngleSliderRoot(props) {
|
|
7
|
+
const id = useElementId("angle-slider", props);
|
|
8
|
+
const { size = "md", ...rest } = props;
|
|
6
9
|
return /* @__PURE__ */ jsx(AngleSlider$1.Root, {
|
|
7
10
|
...rest,
|
|
11
|
+
id,
|
|
8
12
|
"data-size": size
|
|
9
13
|
});
|
|
10
14
|
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
15
|
+
function AngleSliderFacade({ value, defaultValue = 45, label, step = 1, disabled = false, readOnly = false, size = "md", className, onValueChange }) {
|
|
16
|
+
return /* @__PURE__ */ jsxs(AngleSliderRoot, {
|
|
17
|
+
className,
|
|
18
|
+
size,
|
|
19
|
+
disabled,
|
|
20
|
+
readOnly,
|
|
21
|
+
step,
|
|
22
|
+
defaultValue,
|
|
23
|
+
...value === void 0 ? {} : { value },
|
|
24
|
+
onValueChange: (details) => onValueChange?.(details.value),
|
|
25
|
+
children: [
|
|
26
|
+
label ? /* @__PURE__ */ jsx(AngleSlider$1.Label, { children: label }) : null,
|
|
27
|
+
/* @__PURE__ */ jsx(AngleSlider$1.ValueText, {}),
|
|
28
|
+
/* @__PURE__ */ jsxs(AngleSlider$1.Control, { children: [/* @__PURE__ */ jsx(AngleSlider$1.MarkerGroup, { children: [
|
|
29
|
+
0,
|
|
30
|
+
90,
|
|
31
|
+
180,
|
|
32
|
+
270
|
|
33
|
+
].map((degree) => /* @__PURE__ */ jsx(AngleSlider$1.Marker, { value: degree }, degree)) }), /* @__PURE__ */ jsx(AngleSlider$1.Thumb, { children: /* @__PURE__ */ jsx(AngleSlider$1.HiddenInput, {}) })] })
|
|
34
|
+
]
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
AngleSliderFacade.displayName = "SAngleSlider";
|
|
38
|
+
const AngleSlider = Object.assign(AngleSliderFacade, {
|
|
16
39
|
...AngleSlider$1,
|
|
17
40
|
Root: AngleSliderRoot
|
|
18
|
-
};
|
|
41
|
+
});
|
|
19
42
|
injectComponentStyle("angle-slider");
|
|
20
43
|
//#endregion
|
|
21
44
|
export { AngleSlider };
|
|
@@ -6,5 +6,8 @@ export interface AspectRatioProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
6
6
|
/** A CSS `aspect-ratio` value — "16 / 9", "4 / 3", "1 / 1". */
|
|
7
7
|
ratio?: string;
|
|
8
8
|
}
|
|
9
|
-
|
|
9
|
+
declare function AspectRatioImpl({ ratio, ...rest }: AspectRatioProps): import("react").JSX.Element;
|
|
10
|
+
export declare const AspectRatio: typeof AspectRatioImpl & {
|
|
11
|
+
Root: typeof AspectRatioImpl;
|
|
12
|
+
};
|
|
10
13
|
//#endregion
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as withSelfRoot } from "../../family-DE_GQeeM.mjs";
|
|
2
|
+
import { injectComponentStyle } from "@bysages/core/styling";
|
|
2
3
|
import { jsx } from "react/jsx-runtime";
|
|
3
4
|
//#region src/components/aspect-ratio/index.tsx
|
|
4
|
-
function
|
|
5
|
+
function AspectRatioImpl({ ratio = "1 / 1", ...rest }) {
|
|
5
6
|
injectComponentStyle("aspect-ratio");
|
|
6
7
|
return /* @__PURE__ */ jsx("div", {
|
|
7
8
|
...rest,
|
|
@@ -13,5 +14,6 @@ function AspectRatio({ ratio = "1 / 1", ...rest }) {
|
|
|
13
14
|
"data-part": "root"
|
|
14
15
|
});
|
|
15
16
|
}
|
|
17
|
+
const AspectRatio = withSelfRoot(AspectRatioImpl);
|
|
16
18
|
//#endregion
|
|
17
19
|
export { AspectRatio };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Combobox } from "../combobox/index.mjs";
|
|
1
2
|
import { HTMLAttributes } from "react";
|
|
2
3
|
//#region src/components/autocomplete/index.d.ts
|
|
3
4
|
/**
|
|
@@ -17,5 +18,6 @@ export interface AutoCompleteProps extends Omit<HTMLAttributes<HTMLDivElement>,
|
|
|
17
18
|
size?: "sm" | "md" | "lg";
|
|
18
19
|
onValueChange?: (value: string) => void;
|
|
19
20
|
}
|
|
20
|
-
|
|
21
|
+
declare function AutoCompleteImpl({ value, items, placeholder, filter, size, onValueChange, ...rest }: AutoCompleteProps): import("react").JSX.Element;
|
|
22
|
+
export declare const AutoComplete: typeof AutoCompleteImpl & typeof Combobox;
|
|
21
23
|
//#endregion
|
|
@@ -1,19 +1,29 @@
|
|
|
1
|
+
import { t as useElementId } from "../../id-C37UYLwJ.mjs";
|
|
1
2
|
import { n as useComponentMessages } from "../../messages-1jJWtaYU.mjs";
|
|
2
|
-
import {
|
|
3
|
+
import { Combobox as Combobox$1 } from "../combobox/index.mjs";
|
|
4
|
+
import { injectComponentStyle } from "@bysages/core/styling";
|
|
3
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { useEffect, useRef } from "react";
|
|
4
7
|
import { Portal } from "@ark-ui/react/portal";
|
|
5
8
|
import { useListCollection } from "@ark-ui/react/collection";
|
|
6
9
|
import { Combobox } from "@ark-ui/react/combobox";
|
|
7
10
|
//#region src/components/autocomplete/index.tsx
|
|
8
|
-
function
|
|
11
|
+
function AutoCompleteImpl({ value = "", items = [], placeholder, filter, size = "md", onValueChange, ...rest }) {
|
|
9
12
|
injectComponentStyle("combobox");
|
|
10
13
|
const messages = useComponentMessages();
|
|
11
|
-
const
|
|
14
|
+
const hostId = useElementId("autocomplete", rest);
|
|
15
|
+
const fieldText = useRef("");
|
|
16
|
+
const { collection, set, filter: filterItems } = useListCollection({
|
|
12
17
|
initialItems: items,
|
|
13
18
|
filter: (item, input) => filter ? filter(item, input) : item.toLowerCase().includes(input.toLowerCase())
|
|
14
19
|
});
|
|
20
|
+
useEffect(() => {
|
|
21
|
+
set(items);
|
|
22
|
+
filterItems(fieldText.current);
|
|
23
|
+
}, [items]);
|
|
15
24
|
return /* @__PURE__ */ jsxs(Combobox.Root, {
|
|
16
25
|
...rest,
|
|
26
|
+
id: `${hostId}:combobox`,
|
|
17
27
|
collection,
|
|
18
28
|
inputValue: value,
|
|
19
29
|
allowCustomValue: true,
|
|
@@ -23,6 +33,7 @@ function AutoComplete({ value = "", items = [], placeholder, filter, size = "md"
|
|
|
23
33
|
if (first != null) onValueChange?.(first);
|
|
24
34
|
},
|
|
25
35
|
onInputValueChange: (details) => {
|
|
36
|
+
fieldText.current = details.inputValue;
|
|
26
37
|
filterItems(details.inputValue);
|
|
27
38
|
onValueChange?.(details.inputValue);
|
|
28
39
|
},
|
|
@@ -33,5 +44,6 @@ function AutoComplete({ value = "", items = [], placeholder, filter, size = "md"
|
|
|
33
44
|
}, item))] }) }) })]
|
|
34
45
|
});
|
|
35
46
|
}
|
|
47
|
+
const AutoComplete = Object.assign(AutoCompleteImpl, Combobox$1);
|
|
36
48
|
//#endregion
|
|
37
49
|
export { AutoComplete };
|
|
@@ -16,8 +16,8 @@ export interface AvatarProps extends ComponentProps<typeof Avatar$1.Root> {
|
|
|
16
16
|
* beside a round portrait. */
|
|
17
17
|
shape?: "circle" | "square";
|
|
18
18
|
}
|
|
19
|
-
declare function AvatarRoot(
|
|
20
|
-
export declare const Avatar: typeof Avatar$1 & {
|
|
19
|
+
declare function AvatarRoot(props: AvatarProps): import("react").JSX.Element;
|
|
20
|
+
export declare const Avatar: typeof AvatarRoot & typeof Avatar$1 & {
|
|
21
21
|
Root: typeof AvatarRoot;
|
|
22
22
|
};
|
|
23
23
|
//#endregion
|
|
@@ -1,15 +1,22 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as useElementId } from "../../id-C37UYLwJ.mjs";
|
|
2
|
+
import { injectComponentStyle } from "@bysages/core/styling";
|
|
2
3
|
import { jsx } from "react/jsx-runtime";
|
|
3
4
|
import { Avatar as Avatar$1 } from "@ark-ui/react/avatar";
|
|
4
5
|
//#region src/components/avatar/index.tsx
|
|
5
|
-
function AvatarRoot(
|
|
6
|
+
function AvatarRoot(props) {
|
|
7
|
+
const id = useElementId("avatar", props);
|
|
8
|
+
const { size, shape = "circle", ...rest } = props;
|
|
6
9
|
return /* @__PURE__ */ jsx(Avatar$1.Root, {
|
|
7
10
|
...rest,
|
|
11
|
+
id,
|
|
8
12
|
"data-size": size,
|
|
9
13
|
"data-shape": shape
|
|
10
14
|
});
|
|
11
15
|
}
|
|
12
|
-
const Avatar = Object.assign(
|
|
16
|
+
const Avatar = Object.assign(AvatarRoot, {
|
|
17
|
+
...Avatar$1,
|
|
18
|
+
Root: AvatarRoot
|
|
19
|
+
});
|
|
13
20
|
injectComponentStyle("avatar");
|
|
14
21
|
//#endregion
|
|
15
22
|
export { Avatar };
|
|
@@ -7,5 +7,8 @@ export interface AvatarGroupProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
7
7
|
* stylesheet to re-point the avatars' measure. */
|
|
8
8
|
size?: "sm" | "md" | "lg";
|
|
9
9
|
}
|
|
10
|
-
|
|
10
|
+
declare function AvatarGroupImpl({ size, children, ...rest }: AvatarGroupProps): import("react").JSX.Element;
|
|
11
|
+
export declare const AvatarGroup: typeof AvatarGroupImpl & {
|
|
12
|
+
Root: typeof AvatarGroupImpl;
|
|
13
|
+
};
|
|
11
14
|
//#endregion
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as withSelfRoot } from "../../family-DE_GQeeM.mjs";
|
|
2
|
+
import { injectComponentStyle } from "@bysages/core/styling";
|
|
2
3
|
import { jsx } from "react/jsx-runtime";
|
|
3
4
|
//#region src/components/avatar-group/index.tsx
|
|
4
|
-
function
|
|
5
|
+
function AvatarGroupImpl({ size, children, ...rest }) {
|
|
5
6
|
injectComponentStyle("avatar-group");
|
|
6
7
|
return /* @__PURE__ */ jsx("div", {
|
|
7
8
|
...rest,
|
|
@@ -11,5 +12,6 @@ function AvatarGroup({ size, children, ...rest }) {
|
|
|
11
12
|
children
|
|
12
13
|
});
|
|
13
14
|
}
|
|
15
|
+
const AvatarGroup = withSelfRoot(AvatarGroupImpl);
|
|
14
16
|
//#endregion
|
|
15
17
|
export { AvatarGroup };
|
|
@@ -11,6 +11,9 @@ export interface BackTopProps extends HTMLAttributes<HTMLButtonElement> {
|
|
|
11
11
|
* scrollTop. The host supplies the positioning context. */
|
|
12
12
|
scrollEl?: () => HTMLElement | null;
|
|
13
13
|
}
|
|
14
|
+
/**
|
|
15
|
+
* A way
|
|
16
|
+
|
|
14
17
|
/**
|
|
15
18
|
* A way home: after the page has scrolled past `threshold`, a small
|
|
16
19
|
* floating control rises at the page's corner and returns the reader to
|
|
@@ -25,5 +28,8 @@ export interface BackTopProps extends HTMLAttributes<HTMLButtonElement> {
|
|
|
25
28
|
* paper, hairline and halo are its; this family owns only the floating
|
|
26
29
|
* and the entrance.
|
|
27
30
|
*/
|
|
28
|
-
|
|
31
|
+
declare function BackTopImpl({ threshold, label, scrollEl, ...rest }: BackTopProps): import("react").JSX.Element;
|
|
32
|
+
export declare const BackTop: typeof BackTopImpl & {
|
|
33
|
+
Root: typeof BackTopImpl;
|
|
34
|
+
};
|
|
29
35
|
//#endregion
|
|
@@ -1,23 +1,17 @@
|
|
|
1
|
+
import { t as iconNode } from "../../icon-BALgGtNK.mjs";
|
|
2
|
+
import { t as withSelfRoot } from "../../family-DE_GQeeM.mjs";
|
|
1
3
|
import { Button } from "../button/index.mjs";
|
|
2
|
-
import { injectComponentStyle } from "@bysages/core";
|
|
4
|
+
import { injectComponentStyle } from "@bysages/core/styling";
|
|
3
5
|
import { jsx } from "react/jsx-runtime";
|
|
4
6
|
import { useEffect, useState } from "react";
|
|
5
7
|
//#region src/components/back-top/index.tsx
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
stroke: "currentColor",
|
|
14
|
-
strokeWidth: 1.75,
|
|
15
|
-
strokeLinecap: "round",
|
|
16
|
-
strokeLinejoin: "round",
|
|
17
|
-
"aria-hidden": "true",
|
|
18
|
-
children: /* @__PURE__ */ jsx("path", { d: "m6 14 6-6 6 6" })
|
|
19
|
-
});
|
|
20
|
-
}
|
|
8
|
+
const chevronUp = iconNode("chevron-up", {
|
|
9
|
+
width: 16,
|
|
10
|
+
height: 16
|
|
11
|
+
});
|
|
12
|
+
/**
|
|
13
|
+
* A way
|
|
14
|
+
|
|
21
15
|
/**
|
|
22
16
|
* A way home: after the page has scrolled past `threshold`, a small
|
|
23
17
|
* floating control rises at the page's corner and returns the reader to
|
|
@@ -32,7 +26,7 @@ function chevronUp() {
|
|
|
32
26
|
* paper, hairline and halo are its; this family owns only the floating
|
|
33
27
|
* and the entrance.
|
|
34
28
|
*/
|
|
35
|
-
function
|
|
29
|
+
function BackTopImpl({ threshold = 400, label = "Back to top", scrollEl, ...rest }) {
|
|
36
30
|
injectComponentStyle("back-top");
|
|
37
31
|
const [visible, setVisible] = useState(false);
|
|
38
32
|
useEffect(() => {
|
|
@@ -74,9 +68,10 @@ function BackTop({ threshold = 400, label = "Back to top", scrollEl, ...rest })
|
|
|
74
68
|
"aria-hidden": visible ? void 0 : "true",
|
|
75
69
|
tabIndex: visible ? 0 : -1,
|
|
76
70
|
onClick: toTop,
|
|
77
|
-
children: rest.children ?? chevronUp
|
|
71
|
+
children: rest.children ?? chevronUp
|
|
78
72
|
})
|
|
79
73
|
});
|
|
80
74
|
}
|
|
75
|
+
const BackTop = withSelfRoot(BackTopImpl);
|
|
81
76
|
//#endregion
|
|
82
77
|
export { BackTop };
|
|
@@ -6,5 +6,8 @@ export interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {
|
|
|
6
6
|
tone?: "ink" | "info" | "success" | "warning" | "danger";
|
|
7
7
|
variant?: "solid" | "subtle" | "outline";
|
|
8
8
|
}
|
|
9
|
-
|
|
9
|
+
declare function BadgeImpl({ tone, variant, ...rest }: BadgeProps): import("react").JSX.Element;
|
|
10
|
+
export declare const Badge: typeof BadgeImpl & {
|
|
11
|
+
Root: typeof BadgeImpl;
|
|
12
|
+
};
|
|
10
13
|
//#endregion
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as withSelfRoot } from "../../family-DE_GQeeM.mjs";
|
|
2
|
+
import { injectComponentStyle } from "@bysages/core/styling";
|
|
2
3
|
import { jsx } from "react/jsx-runtime";
|
|
3
4
|
//#region src/components/badge/index.tsx
|
|
4
|
-
function
|
|
5
|
+
function BadgeImpl({ tone = "ink", variant = "solid", ...rest }) {
|
|
5
6
|
injectComponentStyle("badge");
|
|
6
7
|
return /* @__PURE__ */ jsx("span", {
|
|
7
8
|
...rest,
|
|
@@ -11,5 +12,6 @@ function Badge({ tone = "ink", variant = "solid", ...rest }) {
|
|
|
11
12
|
"data-variant": variant
|
|
12
13
|
});
|
|
13
14
|
}
|
|
15
|
+
const Badge = withSelfRoot(BadgeImpl);
|
|
14
16
|
//#endregion
|
|
15
17
|
export { Badge };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { t as iconNode } from "../../icon-BALgGtNK.mjs";
|
|
1
2
|
import { n as useComponentMessages } from "../../messages-1jJWtaYU.mjs";
|
|
2
|
-
import { injectComponentStyle } from "@bysages/core";
|
|
3
|
+
import { injectComponentStyle } from "@bysages/core/styling";
|
|
3
4
|
import { jsx } from "react/jsx-runtime";
|
|
4
5
|
//#region src/components/banner/index.tsx
|
|
5
6
|
/** A page-level notice, spoken across the full measure: a wash of the
|
|
@@ -40,17 +41,7 @@ const Close = (rest) => {
|
|
|
40
41
|
"aria-label": rest["aria-label"] ?? messages.banner.dismiss,
|
|
41
42
|
"data-scope": "banner",
|
|
42
43
|
"data-part": "close",
|
|
43
|
-
children:
|
|
44
|
-
viewBox: "0 0 16 16",
|
|
45
|
-
fill: "none",
|
|
46
|
-
"aria-hidden": true,
|
|
47
|
-
children: /* @__PURE__ */ jsx("path", {
|
|
48
|
-
d: "M4 4l8 8M12 4l-8 8",
|
|
49
|
-
stroke: "currentColor",
|
|
50
|
-
strokeWidth: 1.5,
|
|
51
|
-
strokeLinecap: "round"
|
|
52
|
-
})
|
|
53
|
-
})
|
|
44
|
+
children: iconNode("x")
|
|
54
45
|
});
|
|
55
46
|
};
|
|
56
47
|
const Banner = Object.assign(Root, {
|
|
@@ -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/bento/index.tsx
|
|
4
4
|
/** The bento lattice: a grid of unequal tiles that reads as one plate.
|
|
@@ -8,5 +8,8 @@ export interface BlockUIProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
8
8
|
/** A curtain over content that must wait: the blocked region keeps its
|
|
9
9
|
* shape and dims under frosted paper while a quiet wheel reports the
|
|
10
10
|
* wait. Callers own the state; the curtain only answers it. */
|
|
11
|
-
|
|
11
|
+
declare function BlockUIImpl({ blocked, children, ...rest }: BlockUIProps): import("react").JSX.Element;
|
|
12
|
+
export declare const BlockUI: typeof BlockUIImpl & {
|
|
13
|
+
Root: typeof BlockUIImpl;
|
|
14
|
+
};
|
|
12
15
|
//#endregion
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
+
import { t as withSelfRoot } from "../../family-DE_GQeeM.mjs";
|
|
1
2
|
import { Spinner } from "../spinner/index.mjs";
|
|
2
|
-
import { injectComponentStyle } from "@bysages/core";
|
|
3
|
+
import { injectComponentStyle } from "@bysages/core/styling";
|
|
3
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
5
|
//#region src/components/block-ui/index.tsx
|
|
5
6
|
/** A curtain over content that must wait: the blocked region keeps its
|
|
6
7
|
* shape and dims under frosted paper while a quiet wheel reports the
|
|
7
8
|
* wait. Callers own the state; the curtain only answers it. */
|
|
8
|
-
function
|
|
9
|
+
function BlockUIImpl({ blocked = false, children, ...rest }) {
|
|
9
10
|
injectComponentStyle("block-ui");
|
|
10
11
|
return /* @__PURE__ */ jsxs("div", {
|
|
11
12
|
...rest,
|
|
@@ -20,5 +21,6 @@ function BlockUI({ blocked = false, children, ...rest }) {
|
|
|
20
21
|
}) : null]
|
|
21
22
|
});
|
|
22
23
|
}
|
|
24
|
+
const BlockUI = withSelfRoot(BlockUIImpl);
|
|
23
25
|
//#endregion
|
|
24
26
|
export { BlockUI };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as useComponentMessages } from "../../messages-1jJWtaYU.mjs";
|
|
2
|
-
import { injectComponentStyle } from "@bysages/core";
|
|
2
|
+
import { injectComponentStyle } from "@bysages/core/styling";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
//#region src/components/breadcrumb/index.tsx
|
|
5
5
|
/** A trail of waymarks: Root wraps the nav, List the ordered trail, and
|
|
@@ -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/browser/index.tsx
|
|
4
4
|
/** The three lamps are the system's own fixed pigments — the same
|
|
@@ -15,5 +15,8 @@ export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
|
15
15
|
disabled?: boolean;
|
|
16
16
|
children?: ReactNode;
|
|
17
17
|
}
|
|
18
|
-
|
|
18
|
+
declare function ButtonImpl({ variant, tone, size, square, asChild, disabled, type, children, ...rest }: ButtonProps): import("react").JSX.Element | null;
|
|
19
|
+
export declare const Button: typeof ButtonImpl & {
|
|
20
|
+
Root: typeof ButtonImpl;
|
|
21
|
+
};
|
|
19
22
|
//#endregion
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as withSelfRoot } from "../../family-DE_GQeeM.mjs";
|
|
2
|
+
import { injectComponentStyle } from "@bysages/core/styling";
|
|
2
3
|
import { jsx } from "react/jsx-runtime";
|
|
3
4
|
import { Children, cloneElement, isValidElement } from "react";
|
|
4
5
|
//#region src/components/button/index.tsx
|
|
5
|
-
function
|
|
6
|
+
function ButtonImpl({ variant = "solid", tone = "ink", size = "md", square = false, asChild = false, disabled = false, type = "button", children, ...rest }) {
|
|
6
7
|
injectComponentStyle("button");
|
|
7
8
|
const partProps = {
|
|
8
9
|
...rest,
|
|
@@ -25,5 +26,6 @@ function Button({ variant = "solid", tone = "ink", size = "md", square = false,
|
|
|
25
26
|
children
|
|
26
27
|
});
|
|
27
28
|
}
|
|
29
|
+
const Button = withSelfRoot(ButtonImpl);
|
|
28
30
|
//#endregion
|
|
29
31
|
export { Button };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { DatePicker as DatePicker$1 } from "../date-picker/index.mjs";
|
|
1
2
|
import { HTMLAttributes } from "react";
|
|
2
3
|
import { DatePickerRootProps } from "@ark-ui/react/date-picker";
|
|
3
4
|
//#region src/components/calendar/index.d.ts
|
|
@@ -13,5 +14,6 @@ export interface CalendarProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
13
14
|
* title zooms out through month and year grids; the grids themselves
|
|
14
15
|
* are the shared machinery — value, range selection, and focus ride
|
|
15
16
|
* Ark's own contract. */
|
|
16
|
-
|
|
17
|
+
declare function CalendarImpl({ value, min, max, onValueChange, children, ...rest }: CalendarProps): import("react").JSX.Element;
|
|
18
|
+
export declare const Calendar: typeof CalendarImpl & typeof DatePicker$1;
|
|
17
19
|
//#endregion
|
|
@@ -1,18 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as iconNode } from "../../icon-BALgGtNK.mjs";
|
|
2
|
+
import { t as useElementId } from "../../id-C37UYLwJ.mjs";
|
|
3
|
+
import { DatePicker as DatePicker$1 } from "../date-picker/index.mjs";
|
|
4
|
+
import { injectComponentStyle } from "@bysages/core/styling";
|
|
2
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
6
|
import { DatePicker } from "@ark-ui/react/date-picker";
|
|
4
7
|
//#region src/components/calendar/index.tsx
|
|
5
8
|
function chevron(dir) {
|
|
6
|
-
return
|
|
9
|
+
return iconNode(dir === "left" ? "chevron-left" : "chevron-right", {
|
|
7
10
|
width: 16,
|
|
8
|
-
height: 16
|
|
9
|
-
viewBox: "0 0 24 24",
|
|
10
|
-
fill: "none",
|
|
11
|
-
stroke: "currentColor",
|
|
12
|
-
strokeWidth: 1.75,
|
|
13
|
-
"aria-hidden": true,
|
|
14
|
-
style: dir === "left" ? { transform: "rotate(180deg)" } : void 0,
|
|
15
|
-
children: /* @__PURE__ */ jsx("path", { d: "m9 5 7 7-7 7" })
|
|
11
|
+
height: 16
|
|
16
12
|
});
|
|
17
13
|
}
|
|
18
14
|
/** The date-picker's month grid, standing on the page without its
|
|
@@ -20,9 +16,10 @@ function chevron(dir) {
|
|
|
20
16
|
* title zooms out through month and year grids; the grids themselves
|
|
21
17
|
* are the shared machinery — value, range selection, and focus ride
|
|
22
18
|
* Ark's own contract. */
|
|
23
|
-
function
|
|
19
|
+
function CalendarImpl({ value, min, max, onValueChange, children, ...rest }) {
|
|
24
20
|
injectComponentStyle("calendar");
|
|
25
21
|
injectComponentStyle("date-picker");
|
|
22
|
+
const hostId = useElementId("calendar", rest);
|
|
26
23
|
const title = (dp) => {
|
|
27
24
|
const d = dp.focusedValue;
|
|
28
25
|
if (!d) return "";
|
|
@@ -48,6 +45,7 @@ function Calendar({ value, min, max, onValueChange, children, ...rest }) {
|
|
|
48
45
|
"data-scope": "calendar",
|
|
49
46
|
"data-part": "root",
|
|
50
47
|
children: [/* @__PURE__ */ jsxs(DatePicker.Root, {
|
|
48
|
+
id: `${hostId}:date-picker`,
|
|
51
49
|
open: true,
|
|
52
50
|
closeOnSelect: true,
|
|
53
51
|
inline: true,
|
|
@@ -92,5 +90,6 @@ function Calendar({ value, min, max, onValueChange, children, ...rest }) {
|
|
|
92
90
|
}), children]
|
|
93
91
|
});
|
|
94
92
|
}
|
|
93
|
+
const Calendar = Object.assign(CalendarImpl, DatePicker$1);
|
|
95
94
|
//#endregion
|
|
96
95
|
export { Calendar };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { CSSProperties, ComponentProps } from "react";
|
|
1
2
|
import { Carousel as Carousel$1 } from "@ark-ui/react/carousel";
|
|
2
3
|
//#region src/components/carousel/index.d.ts
|
|
3
4
|
/** Ark's Carousel, dressed in the paper-and-ink system: slides ride in one
|
|
@@ -5,5 +6,24 @@ import { Carousel as Carousel$1 } from "@ark-ui/react/carousel";
|
|
|
5
6
|
* current indicator alone carries the ink. The API is Ark's own — Root,
|
|
6
7
|
* Control, PrevTrigger, NextTrigger, ItemGroup, Item, IndicatorGroup,
|
|
7
8
|
* Indicator, AutoplayTrigger, ProgressText. */
|
|
8
|
-
|
|
9
|
+
declare function CarouselRoot(props: ComponentProps<typeof Carousel$1.Root>): import("react").JSX.Element;
|
|
10
|
+
type CarouselSlide = string | {
|
|
11
|
+
label: string;
|
|
12
|
+
};
|
|
13
|
+
type CarouselFacadeProps = {
|
|
14
|
+
value?: number;
|
|
15
|
+
defaultValue?: number;
|
|
16
|
+
items: CarouselSlide[];
|
|
17
|
+
spacing?: string;
|
|
18
|
+
label?: string;
|
|
19
|
+
className?: string;
|
|
20
|
+
style?: CSSProperties;
|
|
21
|
+
onValueChange?: (page: number) => void;
|
|
22
|
+
};
|
|
23
|
+
/** The complete carousel behind a slide list: arrows, progress, items, and
|
|
24
|
+
* indicators use the common lane. Custom slides remain anatomy work. */
|
|
25
|
+
declare function CarouselFacade(props: CarouselFacadeProps): import("react").JSX.Element;
|
|
26
|
+
export declare const Carousel: typeof CarouselFacade & Omit<typeof Carousel$1, "Root"> & {
|
|
27
|
+
Root: typeof CarouselRoot;
|
|
28
|
+
};
|
|
9
29
|
//#endregion
|