@bysages/react 0.4.4 → 0.6.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/dist/ai-B0o-dsAf.mjs +309 -0
- package/dist/ai-prompt-input-Cl9ulICF.mjs +401 -0
- package/dist/{ai-response-CjjjprMY.mjs → ai-response-DTxdL5rX.mjs} +9 -11
- package/dist/{chevron-BA7kV9m7.mjs → chevron-DnImlNip.mjs} +2 -3
- package/dist/components/accordion/index.d.mts +1 -2
- package/dist/components/accordion/index.mjs +3 -4
- package/dist/components/affix/index.d.mts +1 -2
- package/dist/components/affix/index.mjs +2 -3
- package/dist/components/ai/index.d.mts +107 -2
- package/dist/components/ai/index.mjs +7 -82
- package/dist/components/ai-action/index.d.mts +0 -2
- package/dist/components/ai-action/index.mjs +2 -3
- package/dist/components/ai-attachments/index.d.mts +0 -2
- package/dist/components/ai-attachments/index.mjs +4 -5
- package/dist/components/ai-message/index.d.mts +2 -14
- package/dist/components/ai-message/index.mjs +5 -4
- package/dist/components/ai-prompt-input/index.d.mts +14 -18
- package/dist/components/ai-prompt-input/index.mjs +1 -126
- package/dist/components/ai-reasoning/index.d.mts +0 -2
- package/dist/components/ai-reasoning/index.mjs +3 -4
- package/dist/components/ai-response/index.d.mts +1 -3
- package/dist/components/ai-response/index.mjs +1 -2
- package/dist/components/ai-source/index.d.mts +0 -2
- package/dist/components/ai-source/index.mjs +2 -3
- package/dist/components/ai-suggestion/index.d.mts +0 -2
- package/dist/components/ai-suggestion/index.mjs +2 -3
- package/dist/components/ai-tool/index.d.mts +2 -24
- package/dist/components/ai-tool/index.mjs +46 -14
- package/dist/components/alert/index.d.mts +1 -2
- package/dist/components/alert/index.mjs +2 -3
- package/dist/components/angle-slider/index.d.mts +1 -2
- package/dist/components/angle-slider/index.mjs +2 -3
- package/dist/components/aspect-ratio/index.d.mts +1 -2
- package/dist/components/aspect-ratio/index.mjs +2 -3
- package/dist/components/autocomplete/index.d.mts +5 -3
- package/dist/components/autocomplete/index.mjs +12 -10
- package/dist/components/avatar/index.d.mts +1 -2
- package/dist/components/avatar/index.mjs +2 -3
- package/dist/components/avatar-group/index.d.mts +1 -2
- package/dist/components/avatar-group/index.mjs +2 -3
- package/dist/components/back-top/index.d.mts +1 -2
- package/dist/components/back-top/index.mjs +3 -4
- package/dist/components/badge/index.d.mts +1 -2
- package/dist/components/badge/index.mjs +2 -3
- package/dist/components/banner/index.d.mts +1 -2
- package/dist/components/banner/index.mjs +3 -4
- package/dist/components/bento/index.d.mts +1 -3
- package/dist/components/bento/index.mjs +1 -2
- package/dist/components/block-ui/index.d.mts +1 -2
- package/dist/components/block-ui/index.mjs +2 -3
- package/dist/components/breadcrumb/index.d.mts +1 -2
- package/dist/components/breadcrumb/index.mjs +2 -3
- package/dist/components/browser/index.d.mts +1 -3
- package/dist/components/browser/index.mjs +1 -2
- package/dist/components/button/index.d.mts +1 -2
- package/dist/components/button/index.mjs +2 -3
- package/dist/components/button-group/index.d.mts +1 -2
- package/dist/components/button-group/index.mjs +1 -2
- package/dist/components/calendar/index.d.mts +1 -2
- package/dist/components/calendar/index.mjs +3 -4
- package/dist/components/card/index.d.mts +1 -3
- package/dist/components/card/index.mjs +1 -2
- package/dist/components/carousel/index.d.mts +1 -2
- package/dist/components/carousel/index.mjs +3 -4
- package/dist/components/cascade-select/index.d.mts +5 -3
- package/dist/components/cascade-select/index.mjs +42 -40
- package/dist/components/checkbox/index.d.mts +1 -2
- package/dist/components/checkbox/index.mjs +3 -4
- package/dist/components/checkbox-group/index.d.mts +1 -2
- package/dist/components/checkbox-group/index.mjs +3 -4
- package/dist/components/chip/index.d.mts +1 -2
- package/dist/components/chip/index.mjs +2 -3
- package/dist/components/client-only/index.d.mts +0 -2
- package/dist/components/client-only/index.mjs +2 -3
- package/dist/components/clipboard/index.d.mts +1 -2
- package/dist/components/clipboard/index.mjs +3 -4
- package/dist/components/collapsible/index.d.mts +1 -2
- package/dist/components/collapsible/index.mjs +3 -4
- package/dist/components/collection/index.mjs +1 -2
- package/dist/components/color-picker/index.d.mts +10 -3
- package/dist/components/color-picker/index.mjs +39 -33
- package/dist/components/combobox/index.d.mts +10 -3
- package/dist/components/combobox/index.mjs +17 -12
- package/dist/components/command/index.d.mts +5 -3
- package/dist/components/command/index.mjs +74 -72
- package/dist/components/comment/index.d.mts +1 -2
- package/dist/components/comment/index.mjs +2 -3
- package/dist/components/config-provider/index.d.mts +1 -2
- package/dist/components/config-provider/index.mjs +2 -3
- package/dist/components/container/index.d.mts +1 -2
- package/dist/components/container/index.mjs +2 -3
- package/dist/components/data-view/index.d.mts +1 -2
- package/dist/components/data-view/index.mjs +3 -4
- package/dist/components/date-input/index.d.mts +0 -2
- package/dist/components/date-input/index.mjs +2 -3
- package/dist/components/date-picker/index.d.mts +9 -3
- package/dist/components/date-picker/index.mjs +30 -25
- package/dist/components/deferred-content/index.d.mts +1 -2
- package/dist/components/deferred-content/index.mjs +2 -3
- package/dist/components/descriptions/index.d.mts +1 -2
- package/dist/components/descriptions/index.mjs +2 -3
- package/dist/components/dialog/index.d.mts +49 -5
- package/dist/components/dialog/index.mjs +67 -20
- package/dist/components/dock/index.d.mts +1 -3
- package/dist/components/dock/index.mjs +1 -2
- package/dist/components/download-trigger/index.d.mts +0 -2
- package/dist/components/download-trigger/index.mjs +2 -3
- package/dist/components/drawer/index.d.mts +20 -5
- package/dist/components/drawer/index.mjs +21 -16
- package/dist/components/dynamic-input/index.d.mts +1 -2
- package/dist/components/dynamic-input/index.mjs +5 -6
- package/dist/components/editable/index.d.mts +1 -2
- package/dist/components/editable/index.mjs +3 -4
- package/dist/components/ellipsis/index.d.mts +1 -2
- package/dist/components/ellipsis/index.mjs +2 -3
- package/dist/components/empty/index.d.mts +1 -3
- package/dist/components/empty/index.mjs +1 -2
- package/dist/components/field/index.d.mts +1 -2
- package/dist/components/field/index.mjs +2 -3
- package/dist/components/fieldset/index.d.mts +1 -2
- package/dist/components/fieldset/index.mjs +2 -3
- package/dist/components/file-upload/index.d.mts +1 -2
- package/dist/components/file-upload/index.mjs +3 -4
- package/dist/components/float-button/index.d.mts +1 -2
- package/dist/components/float-button/index.mjs +3 -4
- package/dist/components/floating-panel/index.d.mts +20 -5
- package/dist/components/floating-panel/index.mjs +37 -32
- package/dist/components/focus-trap/index.d.mts +0 -2
- package/dist/components/focus-trap/index.mjs +2 -3
- package/dist/components/form/index.d.mts +0 -2
- package/dist/components/form/index.mjs +2 -3
- package/dist/components/format/index.d.mts +1 -3
- package/dist/components/format/index.mjs +1 -2
- package/dist/components/frame/index.d.mts +1 -3
- package/dist/components/frame/index.mjs +3 -4
- package/dist/components/grid/index.d.mts +1 -2
- package/dist/components/grid/index.mjs +2 -3
- package/dist/components/highlight/index.d.mts +1 -3
- package/dist/components/highlight/index.mjs +2 -3
- package/dist/components/hover-card/index.d.mts +18 -5
- package/dist/components/hover-card/index.mjs +16 -11
- package/dist/components/icon/index.d.mts +1 -2
- package/dist/components/icon/index.mjs +2 -3
- package/dist/components/image/index.d.mts +1 -2
- package/dist/components/image/index.mjs +3 -4
- package/dist/components/image-cropper/index.d.mts +1 -2
- package/dist/components/image-cropper/index.mjs +2 -3
- package/dist/components/image-viewer/index.d.mts +1 -1
- package/dist/components/image-viewer/index.mjs +1 -2
- package/dist/components/input/index.d.mts +1 -3
- package/dist/components/input/index.mjs +1 -2
- package/dist/components/input-group/index.d.mts +1 -3
- package/dist/components/input-group/index.mjs +1 -2
- package/dist/components/json-tree-view/index.d.mts +1 -2
- package/dist/components/json-tree-view/index.mjs +3 -4
- package/dist/components/kbd/index.d.mts +1 -2
- package/dist/components/kbd/index.mjs +2 -3
- package/dist/components/layout/index.d.mts +1 -2
- package/dist/components/layout/index.mjs +19 -15
- package/dist/components/link/index.d.mts +1 -2
- package/dist/components/link/index.mjs +2 -3
- package/dist/components/list/index.d.mts +1 -2
- package/dist/components/list/index.mjs +1 -2
- package/dist/components/listbox/index.d.mts +0 -2
- package/dist/components/listbox/index.mjs +3 -4
- package/dist/components/marquee/index.d.mts +1 -2
- package/dist/components/marquee/index.mjs +2 -3
- package/dist/components/masonry/index.d.mts +1 -2
- package/dist/components/masonry/index.mjs +2 -3
- package/dist/components/media-player/index.d.mts +1 -1
- package/dist/components/media-player/index.mjs +1 -2
- package/dist/components/mentions/index.d.mts +2 -2
- package/dist/components/mentions/index.mjs +1 -2
- package/dist/components/menu/index.d.mts +11 -4
- package/dist/components/menu/index.mjs +15 -10
- package/dist/components/menubar/index.d.mts +5 -3
- package/dist/components/menubar/index.mjs +14 -12
- package/dist/components/meter/index.d.mts +1 -3
- package/dist/components/meter/index.mjs +1 -2
- package/dist/components/navigation-menu/index.d.mts +10 -3
- package/dist/components/navigation-menu/index.mjs +9 -4
- package/dist/components/number-input/index.d.mts +1 -2
- package/dist/components/number-input/index.mjs +3 -4
- package/dist/components/order-list/index.d.mts +1 -2
- package/dist/components/order-list/index.mjs +4 -5
- package/dist/components/page-header/index.d.mts +1 -3
- package/dist/components/page-header/index.mjs +1 -2
- package/dist/components/pagination/index.d.mts +3 -4
- package/dist/components/pagination/index.mjs +3 -4
- package/dist/components/password-input/index.d.mts +1 -2
- package/dist/components/password-input/index.mjs +3 -4
- package/dist/components/pin-input/index.d.mts +1 -2
- package/dist/components/pin-input/index.mjs +2 -3
- package/dist/components/popconfirm/index.d.mts +6 -4
- package/dist/components/popconfirm/index.mjs +33 -31
- package/dist/components/popover/index.d.mts +1 -1
- package/dist/components/popover/index.mjs +23 -18
- package/dist/components/presence/index.d.mts +0 -2
- package/dist/components/presence/index.mjs +2 -3
- package/dist/components/progress/index.d.mts +1 -2
- package/dist/components/progress/index.mjs +2 -3
- package/dist/components/progress-group/index.d.mts +1 -2
- package/dist/components/progress-group/index.mjs +2 -3
- package/dist/components/qr-code/index.d.mts +1 -2
- package/dist/components/qr-code/index.mjs +2 -3
- package/dist/components/radio-group/index.d.mts +1 -2
- package/dist/components/radio-group/index.mjs +2 -3
- package/dist/components/rating-group/index.d.mts +1 -2
- package/dist/components/rating-group/index.mjs +3 -4
- package/dist/components/result/index.d.mts +1 -2
- package/dist/components/result/index.mjs +2 -3
- package/dist/components/scroll-area/index.d.mts +8 -3
- package/dist/components/scroll-area/index.mjs +7 -6
- package/dist/components/segment-group/index.d.mts +1 -2
- package/dist/components/segment-group/index.mjs +2 -3
- package/dist/components/select/index.d.mts +1 -1
- package/dist/components/select/index.mjs +1 -2
- package/dist/components/separator/index.d.mts +1 -2
- package/dist/components/separator/index.mjs +2 -3
- package/dist/components/signature-pad/index.d.mts +1 -2
- package/dist/components/signature-pad/index.mjs +3 -4
- package/dist/components/skeleton/index.d.mts +1 -2
- package/dist/components/skeleton/index.mjs +2 -3
- package/dist/components/slider/index.d.mts +1 -2
- package/dist/components/slider/index.mjs +2 -3
- package/dist/components/spinner/index.d.mts +1 -2
- package/dist/components/spinner/index.mjs +3 -4
- package/dist/components/split-button/index.d.mts +5 -3
- package/dist/components/split-button/index.mjs +16 -14
- package/dist/components/splitter/index.d.mts +1 -2
- package/dist/components/splitter/index.mjs +2 -3
- package/dist/components/spotlight/index.d.mts +1 -2
- package/dist/components/spotlight/index.mjs +2 -3
- package/dist/components/stack/index.d.mts +1 -2
- package/dist/components/stack/index.mjs +2 -3
- package/dist/components/stat/index.d.mts +1 -3
- package/dist/components/stat/index.mjs +1 -2
- package/dist/components/steps/index.d.mts +0 -2
- package/dist/components/steps/index.mjs +2 -3
- package/dist/components/swap/index.d.mts +1 -2
- package/dist/components/swap/index.mjs +3 -4
- package/dist/components/switch/index.d.mts +1 -2
- package/dist/components/switch/index.mjs +2 -3
- package/dist/components/table/index.d.mts +21 -3
- package/dist/components/table/index.mjs +28 -14
- package/dist/components/tabs/index.d.mts +9 -3
- package/dist/components/tabs/index.mjs +36 -8
- package/dist/components/tag/index.d.mts +1 -2
- package/dist/components/tag/index.mjs +3 -4
- package/dist/components/tags-input/index.d.mts +1 -2
- package/dist/components/tags-input/index.mjs +3 -4
- package/dist/components/terminal/index.d.mts +4 -3
- package/dist/components/terminal/index.mjs +8 -7
- package/dist/components/textarea/index.d.mts +1 -2
- package/dist/components/textarea/index.mjs +2 -3
- package/dist/components/timeline/index.d.mts +1 -2
- package/dist/components/timeline/index.mjs +1 -2
- package/dist/components/timer/index.d.mts +1 -2
- package/dist/components/timer/index.mjs +2 -3
- package/dist/components/toast/index.d.mts +0 -2
- package/dist/components/toast/index.mjs +4 -5
- package/dist/components/toc/index.d.mts +1 -2
- package/dist/components/toc/index.mjs +2 -3
- package/dist/components/toggle/index.d.mts +1 -2
- package/dist/components/toggle/index.mjs +2 -3
- package/dist/components/toggle-group/index.d.mts +1 -2
- package/dist/components/toggle-group/index.mjs +3 -4
- package/dist/components/toolbar/index.d.mts +1 -2
- package/dist/components/toolbar/index.mjs +2 -3
- package/dist/components/tooltip/index.d.mts +18 -5
- package/dist/components/tooltip/index.mjs +10 -5
- package/dist/components/tour/index.d.mts +20 -5
- package/dist/components/tour/index.mjs +18 -13
- package/dist/components/transfer/index.d.mts +1 -2
- package/dist/components/transfer/index.mjs +5 -6
- package/dist/components/tree-select/index.d.mts +6 -4
- package/dist/components/tree-select/index.mjs +43 -41
- package/dist/components/tree-view/index.d.mts +15 -5
- package/dist/components/tree-view/index.mjs +30 -12
- package/dist/components/typography/index.d.mts +9 -7
- package/dist/components/typography/index.mjs +10 -3
- package/dist/components/user/index.d.mts +1 -2
- package/dist/components/user/index.mjs +2 -3
- package/dist/components/virtual-list/index.d.mts +1 -2
- package/dist/components/virtual-list/index.mjs +2 -3
- package/dist/components/watermark/index.d.mts +1 -2
- package/dist/components/watermark/index.mjs +2 -3
- package/dist/{family-DE_GQeeM.mjs → family-Co1YsN4N.mjs} +1 -2
- package/dist/floating-BhcDRgnx.d.mts +7 -0
- package/dist/floating-CMR7cvmA.mjs +33 -0
- package/dist/generative/index.d.mts +0 -2
- package/dist/generative/index.mjs +28 -53
- package/dist/{icon-Cri0-7-x.mjs → icon-C9udWCyz.mjs} +1 -2
- package/dist/{id-C37UYLwJ.mjs → id-Ctic_3o8.mjs} +1 -2
- package/dist/{image-viewer-D4FuYrk6.mjs → image-viewer-BPTApdoP.mjs} +50 -52
- package/dist/index-CEYybyEQ.d.mts +163 -0
- package/dist/index-CjO4Ggf0.d.mts +115 -0
- package/dist/{index-BcRdWGY-.d.mts → index-DIZEFqJM.d.mts} +0 -8
- package/dist/{index-D_iKc2Uw.d.mts → index-DZ2S5rMj.d.mts} +10 -6
- package/dist/index-j02dTkfc.d.mts +37 -0
- package/dist/index-lCsvE2Vl.d.mts +37 -0
- package/dist/{index-Dj8S4eyJ.d.mts → index-n9VlNO7D.d.mts} +4 -5
- package/dist/index.d.mts +13 -13
- package/dist/index.mjs +10 -10
- package/dist/{input-BDpQ0e6G.mjs → input-YRjehBhU.mjs} +3 -5
- package/dist/{media-player-C0WcjVI-.mjs → media-player-DxG0EYz7.mjs} +7 -12
- package/dist/mentions-B59tQDPt.mjs +341 -0
- package/dist/{messages-1jJWtaYU.mjs → messages-B6n0lVyt.mjs} +1 -2
- package/dist/{select-D_soVdWK.mjs → select-BLFqfeVw.mjs} +24 -20
- package/package.json +17 -17
- package/dist/index-B4twHAQC.d.mts +0 -10456
- package/dist/index-Bbg4heDO.d.mts +0 -113
- package/dist/index-Eu-Bttta.d.mts +0 -24
- package/dist/mentions-BwnyvdXz.mjs +0 -213
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { r as iconNode } from "../../icon-
|
|
2
|
-
import { t as useElementId } from "../../id-
|
|
3
|
-
import { t as withSelfRoot } from "../../family-
|
|
4
|
-
import { n as useComponentMessages } from "../../messages-
|
|
5
|
-
import { t as
|
|
1
|
+
import { r as iconNode } from "../../icon-C9udWCyz.mjs";
|
|
2
|
+
import { t as useElementId } from "../../id-Ctic_3o8.mjs";
|
|
3
|
+
import { t as withSelfRoot } from "../../family-Co1YsN4N.mjs";
|
|
4
|
+
import { n as useComponentMessages } from "../../messages-B6n0lVyt.mjs";
|
|
5
|
+
import { t as FloatingPortal } from "../../floating-CMR7cvmA.mjs";
|
|
6
|
+
import { t as Input } from "../../input-YRjehBhU.mjs";
|
|
6
7
|
import { injectComponentStyle } from "@bysages/core/styling";
|
|
7
8
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
8
9
|
import { useMemo, useState } from "react";
|
|
9
|
-
import { Portal } from "@ark-ui/react/portal";
|
|
10
10
|
import { useEnvironmentContext } from "@ark-ui/react/environment";
|
|
11
11
|
import { useFilter, useLocaleContext } from "@ark-ui/react/locale";
|
|
12
12
|
import * as cascade from "@zag-js/cascade-select";
|
|
13
13
|
import { normalizeProps, useMachine } from "@zag-js/react";
|
|
14
|
-
|
|
14
|
+
// src/components/cascade-select/index.tsx
|
|
15
15
|
const chevronDown = iconNode("chevron-down");
|
|
16
16
|
const chevronRight = iconNode("chevron-right");
|
|
17
17
|
const checkIcon = iconNode("check");
|
|
18
|
-
function CascadeSelectImpl({ value, data, placeholder = "Select…", highlightTrigger, filterable = false, multiple = false, disabled = false, size = "md", onValueChange, ...rest }) {
|
|
18
|
+
function CascadeSelectImpl({ portal = false, value, data, placeholder = "Select…", highlightTrigger, filterable = false, multiple = false, disabled = false, size = "md", onValueChange, ...rest }) {
|
|
19
19
|
injectComponentStyle("cascade-select");
|
|
20
20
|
const messages = useComponentMessages();
|
|
21
21
|
const id = useElementId("cascade-select", rest);
|
|
@@ -169,42 +169,44 @@ function CascadeSelectImpl({ value, data, placeholder = "Select…", highlightTr
|
|
|
169
169
|
children: chevronDown
|
|
170
170
|
})]
|
|
171
171
|
})
|
|
172
|
-
}), /* @__PURE__ */ jsx(
|
|
173
|
-
|
|
174
|
-
children: /* @__PURE__ */
|
|
175
|
-
...api.
|
|
176
|
-
"
|
|
177
|
-
|
|
178
|
-
"data-
|
|
179
|
-
|
|
180
|
-
children: /* @__PURE__ */ jsx(Input, {
|
|
181
|
-
size: "sm",
|
|
182
|
-
value: query,
|
|
183
|
-
onValueChange: setQuery,
|
|
184
|
-
placeholder: messages.select.filter,
|
|
185
|
-
"aria-label": messages.select.filter
|
|
186
|
-
})
|
|
187
|
-
}) : null, /* @__PURE__ */ jsx("div", {
|
|
188
|
-
"data-scope": "cascade-select",
|
|
189
|
-
"data-part": "corridor",
|
|
190
|
-
"data-flow": filtering ? "flat" : "columns",
|
|
191
|
-
children: filtering ? matchPaths.length === 0 ? /* @__PURE__ */ jsx("p", {
|
|
172
|
+
}), /* @__PURE__ */ jsx(FloatingPortal, {
|
|
173
|
+
portal,
|
|
174
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
175
|
+
...api.getPositionerProps(),
|
|
176
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
177
|
+
...api.getContentProps(),
|
|
178
|
+
"data-size": size,
|
|
179
|
+
children: [filterable ? /* @__PURE__ */ jsx("div", {
|
|
192
180
|
"data-scope": "cascade-select",
|
|
193
|
-
"data-part": "
|
|
194
|
-
children:
|
|
195
|
-
|
|
196
|
-
|
|
181
|
+
"data-part": "search",
|
|
182
|
+
children: /* @__PURE__ */ jsx(Input, {
|
|
183
|
+
size: "sm",
|
|
184
|
+
value: query,
|
|
185
|
+
onValueChange: setQuery,
|
|
186
|
+
placeholder: messages.select.filter,
|
|
187
|
+
"aria-label": messages.select.filter
|
|
188
|
+
})
|
|
189
|
+
}) : null, /* @__PURE__ */ jsx("div", {
|
|
197
190
|
"data-scope": "cascade-select",
|
|
198
|
-
"data-part": "
|
|
199
|
-
"data-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
191
|
+
"data-part": "corridor",
|
|
192
|
+
"data-flow": filtering ? "flat" : "columns",
|
|
193
|
+
children: filtering ? matchPaths.length === 0 ? /* @__PURE__ */ jsx("p", {
|
|
194
|
+
"data-scope": "cascade-select",
|
|
195
|
+
"data-part": "empty",
|
|
196
|
+
children: "Nothing matches"
|
|
197
|
+
}) : matchPaths.map((hit) => /* @__PURE__ */ jsx("button", {
|
|
198
|
+
type: "button",
|
|
199
|
+
"data-scope": "cascade-select",
|
|
200
|
+
"data-part": "match",
|
|
201
|
+
"data-selected": isSelected(hit.path) || void 0,
|
|
202
|
+
onClick: () => pickMatch(hit.path),
|
|
203
|
+
children: hit.labels.join(" / ")
|
|
204
|
+
}, hit.path.join("/"))) : renderColumn(collection.rootNode, [], [])
|
|
205
|
+
})]
|
|
206
|
+
})
|
|
204
207
|
})
|
|
205
|
-
})
|
|
208
|
+
})]
|
|
206
209
|
});
|
|
207
210
|
}
|
|
208
211
|
const CascadeSelect = withSelfRoot(CascadeSelectImpl);
|
|
209
|
-
//#endregion
|
|
210
212
|
export { CascadeSelect };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ComponentProps } from "react";
|
|
2
2
|
import { Checkbox as Checkbox$1 } from "@ark-ui/react/checkbox";
|
|
3
|
-
//#region src/components/checkbox/index.d.ts
|
|
4
3
|
type CheckboxRootProps = ComponentProps<typeof Checkbox$1.Root> & {
|
|
5
4
|
/** One rung for the control's box: the tick scales with it. */
|
|
6
5
|
size?: "sm" | "md" | "lg";
|
|
@@ -31,4 +30,4 @@ type CheckboxParts = Omit<typeof Checkbox$1, "Root"> & {
|
|
|
31
30
|
Root: typeof CheckboxRoot;
|
|
32
31
|
};
|
|
33
32
|
export declare const Checkbox: typeof CheckboxFacade & CheckboxParts;
|
|
34
|
-
|
|
33
|
+
export {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { r as iconNode } from "../../icon-
|
|
2
|
-
import { t as useElementId } from "../../id-
|
|
1
|
+
import { r as iconNode } from "../../icon-C9udWCyz.mjs";
|
|
2
|
+
import { t as useElementId } from "../../id-Ctic_3o8.mjs";
|
|
3
3
|
import { injectComponentStyle } from "@bysages/core/styling";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
import { Checkbox as Checkbox$1 } from "@ark-ui/react/checkbox";
|
|
6
|
-
|
|
6
|
+
// src/components/checkbox/index.tsx
|
|
7
7
|
function CheckboxRoot(props) {
|
|
8
8
|
const id = useElementId("checkbox", props);
|
|
9
9
|
const { size = "md", ...rest } = props;
|
|
@@ -37,5 +37,4 @@ const Checkbox = Object.assign(CheckboxFacade, {
|
|
|
37
37
|
Root: CheckboxRoot
|
|
38
38
|
});
|
|
39
39
|
injectComponentStyle("checkbox");
|
|
40
|
-
//#endregion
|
|
41
40
|
export { Checkbox };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Checkbox } from "../checkbox/index.mjs";
|
|
2
2
|
import { HTMLAttributes } from "react";
|
|
3
|
-
//#region src/components/checkbox-group/index.d.ts
|
|
4
3
|
export interface CheckboxOption {
|
|
5
4
|
label: string;
|
|
6
5
|
value: string;
|
|
@@ -27,4 +26,4 @@ export interface CheckboxGroupProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
27
26
|
*/
|
|
28
27
|
declare function CheckboxGroupImpl({ value, defaultValue, options, layout, size, invalid, disabled, onValueChange, ...rest }: CheckboxGroupProps): import("react").JSX.Element;
|
|
29
28
|
export declare const CheckboxGroup: typeof CheckboxGroupImpl & typeof Checkbox;
|
|
30
|
-
|
|
29
|
+
export {};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { r as iconNode } from "../../icon-
|
|
2
|
-
import { t as useElementId } from "../../id-
|
|
1
|
+
import { r as iconNode } from "../../icon-C9udWCyz.mjs";
|
|
2
|
+
import { t as useElementId } from "../../id-Ctic_3o8.mjs";
|
|
3
3
|
import { Checkbox as Checkbox$1 } from "../checkbox/index.mjs";
|
|
4
4
|
import { injectComponentStyle } from "@bysages/core/styling";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import { useFieldContext } from "@ark-ui/react/field";
|
|
7
7
|
import { Checkbox } from "@ark-ui/react/checkbox";
|
|
8
|
-
|
|
8
|
+
// src/components/checkbox-group/index.tsx
|
|
9
9
|
const checkIcon = iconNode("check");
|
|
10
10
|
/**
|
|
11
11
|
* One question, many answers: a labelled stack (or row) of the seal-cut
|
|
@@ -57,5 +57,4 @@ function CheckboxGroupImpl({ value, defaultValue, options, layout = "vertical",
|
|
|
57
57
|
});
|
|
58
58
|
}
|
|
59
59
|
const CheckboxGroup = Object.assign(CheckboxGroupImpl, Checkbox$1);
|
|
60
|
-
//#endregion
|
|
61
60
|
export { CheckboxGroup };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { HTMLAttributes } from "react";
|
|
2
|
-
//#region src/components/chip/index.d.ts
|
|
3
2
|
/** A counting coin: the numeric value, capped at `max` with an ellipsis
|
|
4
3
|
* of the remainder ("99+"). */
|
|
5
4
|
export interface ChipProps extends HTMLAttributes<HTMLSpanElement> {
|
|
@@ -12,4 +11,4 @@ declare function ChipImpl({ value, max, tone, variant, ...rest }: ChipProps): im
|
|
|
12
11
|
export declare const Chip: typeof ChipImpl & {
|
|
13
12
|
Root: typeof ChipImpl;
|
|
14
13
|
};
|
|
15
|
-
|
|
14
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as withSelfRoot } from "../../family-
|
|
1
|
+
import { t as withSelfRoot } from "../../family-Co1YsN4N.mjs";
|
|
2
2
|
import { injectComponentStyle } from "@bysages/core/styling";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
|
-
|
|
4
|
+
// src/components/chip/index.tsx
|
|
5
5
|
function ChipImpl({ value, max, tone = "ink", variant = "solid", ...rest }) {
|
|
6
6
|
injectComponentStyle("chip");
|
|
7
7
|
const text = max != null && value > max ? `${max}+` : String(value);
|
|
@@ -15,5 +15,4 @@ function ChipImpl({ value, max, tone = "ink", variant = "solid", ...rest }) {
|
|
|
15
15
|
});
|
|
16
16
|
}
|
|
17
17
|
const Chip = withSelfRoot(ChipImpl);
|
|
18
|
-
//#endregion
|
|
19
18
|
export { Chip };
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { ClientOnlyProps } from "@ark-ui/react/client-only";
|
|
2
|
-
//#region src/components/client-only/index.d.ts
|
|
3
2
|
export declare const ClientOnly: ((props: import("@ark-ui/react/client-only").ClientOnlyProps) => React.ReactNode) & {
|
|
4
3
|
Root: (props: import("@ark-ui/react/client-only").ClientOnlyProps) => React.ReactNode;
|
|
5
4
|
};
|
|
6
|
-
//#endregion
|
|
7
5
|
export type { ClientOnlyProps };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { t as withSelfRoot } from "../../family-
|
|
1
|
+
import { t as withSelfRoot } from "../../family-Co1YsN4N.mjs";
|
|
2
2
|
import { ClientOnly as ClientOnly$1 } from "@ark-ui/react/client-only";
|
|
3
|
-
|
|
3
|
+
// src/components/client-only/index.tsx
|
|
4
4
|
const ClientOnly = withSelfRoot(ClientOnly$1);
|
|
5
|
-
//#endregion
|
|
6
5
|
export { ClientOnly };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { CSSProperties, ComponentProps, HTMLAttributes } from "react";
|
|
2
2
|
import { Clipboard as Clipboard$1 } from "@ark-ui/react/clipboard";
|
|
3
|
-
//#region src/components/clipboard/index.d.ts
|
|
4
3
|
/** Ark's Clipboard, dressed in the paper-and-ink system: a hairline value
|
|
5
4
|
* field beside an icon-sized copy trigger whose ink turns bamboo while the
|
|
6
5
|
* copy is confirmed. The API is Ark's own — Root, Label, Control, Input,
|
|
@@ -27,4 +26,4 @@ declare function ClipboardFacade(props: ClipboardFacadeProps): import("react").J
|
|
|
27
26
|
export declare const Clipboard: typeof ClipboardFacade & Omit<typeof Clipboard$1, "Root"> & {
|
|
28
27
|
Root: typeof ClipboardRoot;
|
|
29
28
|
};
|
|
30
|
-
|
|
29
|
+
export {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { r as iconNode } from "../../icon-
|
|
2
|
-
import { t as useElementId } from "../../id-
|
|
1
|
+
import { r as iconNode } from "../../icon-C9udWCyz.mjs";
|
|
2
|
+
import { t as useElementId } from "../../id-Ctic_3o8.mjs";
|
|
3
3
|
import { injectComponentStyle } from "@bysages/core/styling";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
import { Clipboard as Clipboard$1 } from "@ark-ui/react/clipboard";
|
|
6
|
-
|
|
6
|
+
// src/components/clipboard/index.tsx
|
|
7
7
|
function ClipboardRoot(props) {
|
|
8
8
|
injectComponentStyle("clipboard");
|
|
9
9
|
const id = useElementId("clipboard", props);
|
|
@@ -41,5 +41,4 @@ const Clipboard = Object.assign(ClipboardFacade, {
|
|
|
41
41
|
...Clipboard$1,
|
|
42
42
|
Root: ClipboardRoot
|
|
43
43
|
});
|
|
44
|
-
//#endregion
|
|
45
44
|
export { Clipboard };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
2
|
import { Collapsible as Collapsible$1 } from "@ark-ui/react/collapsible";
|
|
3
|
-
//#region src/components/collapsible/index.d.ts
|
|
4
3
|
export interface CollapsibleFacadeProps {
|
|
5
4
|
open?: boolean;
|
|
6
5
|
defaultOpen?: boolean;
|
|
@@ -16,4 +15,4 @@ declare namespace CollapsibleFacade {
|
|
|
16
15
|
}
|
|
17
16
|
type CollapsibleParts = typeof Collapsible$1;
|
|
18
17
|
export declare const Collapsible: typeof CollapsibleFacade & CollapsibleParts;
|
|
19
|
-
|
|
18
|
+
export {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { r as iconNode } from "../../icon-
|
|
2
|
-
import { t as useElementId } from "../../id-
|
|
1
|
+
import { r as iconNode } from "../../icon-C9udWCyz.mjs";
|
|
2
|
+
import { t as useElementId } from "../../id-Ctic_3o8.mjs";
|
|
3
3
|
import { injectComponentStyle } from "@bysages/core/styling";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
import { Collapsible as Collapsible$1 } from "@ark-ui/react/collapsible";
|
|
6
|
-
|
|
6
|
+
// src/components/collapsible/index.tsx
|
|
7
7
|
/** Ark's Collapsible, dressed in the paper-and-ink system: one control on
|
|
8
8
|
* the paper, its panel dissolving open to the machine's measured height.
|
|
9
9
|
* The API is Ark's own — Root, Trigger, Content, Indicator. */
|
|
@@ -30,5 +30,4 @@ const Collapsible = Object.assign(CollapsibleFacade, {
|
|
|
30
30
|
Root: CollapsibleRoot
|
|
31
31
|
});
|
|
32
32
|
injectComponentStyle("collapsible");
|
|
33
|
-
//#endregion
|
|
34
33
|
export { Collapsible };
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { createFileTreeCollection, createGridCollection, createListCollection, createTreeCollection, useAsyncList, useListCollection, useListSelection };
|
|
1
|
+
export { createFileTreeCollection, createGridCollection, createListCollection, createTreeCollection, useAsyncList, useListCollection, useListSelection } from "@ark-ui/react/collection";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { n as FloatingPortalTarget, t as FloatingPortalProps } from "../../floating-BhcDRgnx.mjs";
|
|
1
2
|
import { CSSProperties, ComponentProps } from "react";
|
|
2
3
|
import { Color, ColorPicker as ColorPicker$1 } from "@ark-ui/react/color-picker";
|
|
3
|
-
//#region src/components/color-picker/index.d.ts
|
|
4
4
|
type ColorPickerRootProps = ComponentProps<typeof ColorPicker$1.Root> & {
|
|
5
5
|
/** One rung of the control-height ladder for the swatch seal. */
|
|
6
6
|
size?: "sm" | "md" | "lg";
|
|
@@ -15,6 +15,8 @@ declare function ColorPickerRoot(props: ColorPickerRootProps): import("react").J
|
|
|
15
15
|
* SwatchTrigger, SwatchIndicator, Swatch, EyeDropperTrigger, FormatTrigger,
|
|
16
16
|
* FormatSelect, HiddenInput, Context. */
|
|
17
17
|
type ColorPickerFacadeProps = {
|
|
18
|
+
/** Portal after hydration; `false` keeps the vessel inline. */
|
|
19
|
+
portal?: FloatingPortalTarget;
|
|
18
20
|
value?: string | Color;
|
|
19
21
|
defaultValue?: string | Color;
|
|
20
22
|
disabled?: boolean;
|
|
@@ -31,8 +33,13 @@ type ColorPickerFacadeProps = {
|
|
|
31
33
|
/** The complete picker behind one color: the hex input rides beside the
|
|
32
34
|
* swatch trigger, while the popup carries the area and hue/alpha tracks.
|
|
33
35
|
* Saved swatches and format switches remain anatomy work. */
|
|
36
|
+
declare const ColorPickerPositioner: {
|
|
37
|
+
({ portal, ...rest }: FloatingPortalProps & ColorPicker$1.PositionerProps & import("react").RefAttributes<HTMLDivElement>): import("react").JSX.Element;
|
|
38
|
+
displayName: string;
|
|
39
|
+
};
|
|
34
40
|
declare function ColorPickerFacade(props: ColorPickerFacadeProps): import("react").JSX.Element;
|
|
35
|
-
export declare const ColorPicker: typeof ColorPickerFacade & Omit<typeof ColorPicker$1, "Root"> & {
|
|
41
|
+
export declare const ColorPicker: typeof ColorPickerFacade & Omit<typeof ColorPicker$1, "Root" | "Positioner"> & {
|
|
42
|
+
Positioner: typeof ColorPickerPositioner;
|
|
36
43
|
Root: typeof ColorPickerRoot;
|
|
37
44
|
};
|
|
38
|
-
|
|
45
|
+
export {};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { r as iconNode } from "../../icon-
|
|
2
|
-
import { t as useElementId } from "../../id-
|
|
1
|
+
import { r as iconNode } from "../../icon-C9udWCyz.mjs";
|
|
2
|
+
import { t as useElementId } from "../../id-Ctic_3o8.mjs";
|
|
3
|
+
import { n as definePositioner, t as FloatingPortal } from "../../floating-CMR7cvmA.mjs";
|
|
3
4
|
import { injectComponentStyle } from "@bysages/core/styling";
|
|
4
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
6
|
import { ColorPicker as ColorPicker$1, parseColor } from "@ark-ui/react/color-picker";
|
|
6
|
-
|
|
7
|
+
// src/components/color-picker/index.tsx
|
|
7
8
|
const checkIcon = iconNode("check", {
|
|
8
9
|
width: 12,
|
|
9
10
|
height: 12
|
|
@@ -21,7 +22,9 @@ function ColorPickerRoot(props) {
|
|
|
21
22
|
/** The complete picker behind one color: the hex input rides beside the
|
|
22
23
|
* swatch trigger, while the popup carries the area and hue/alpha tracks.
|
|
23
24
|
* Saved swatches and format switches remain anatomy work. */
|
|
25
|
+
const ColorPickerPositioner = definePositioner(ColorPicker$1.Positioner);
|
|
24
26
|
function ColorPickerFacade(props) {
|
|
27
|
+
const { portal = false } = props;
|
|
25
28
|
const { value, defaultValue, disabled, invalid, required, label, swatches = [], size = "md", className, style, onValueChange } = props;
|
|
26
29
|
const toColor = (color) => typeof color === "string" ? parseColor(color) : color;
|
|
27
30
|
return /* @__PURE__ */ jsxs(ColorPickerRoot, {
|
|
@@ -37,45 +40,48 @@ function ColorPickerFacade(props) {
|
|
|
37
40
|
children: [
|
|
38
41
|
label ? /* @__PURE__ */ jsx(ColorPicker$1.Label, { children: label }) : null,
|
|
39
42
|
/* @__PURE__ */ jsxs(ColorPicker$1.Control, { children: [/* @__PURE__ */ jsx(ColorPicker$1.ChannelInput, { channel: "hex" }), /* @__PURE__ */ jsxs(ColorPicker$1.Trigger, { children: [/* @__PURE__ */ jsx(ColorPicker$1.TransparencyGrid, {}), /* @__PURE__ */ jsx(ColorPicker$1.ValueSwatch, {})] })] }),
|
|
40
|
-
/* @__PURE__ */ jsx(
|
|
41
|
-
|
|
42
|
-
/* @__PURE__ */ jsxs(
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
children: [/* @__PURE__ */ jsx(ColorPicker$1.EyeDropperTrigger, { children: iconNode("pipette", {
|
|
46
|
-
width: 14,
|
|
47
|
-
height: 14
|
|
48
|
-
}) }), /* @__PURE__ */ jsxs("div", {
|
|
43
|
+
/* @__PURE__ */ jsx(FloatingPortal, {
|
|
44
|
+
portal,
|
|
45
|
+
children: /* @__PURE__ */ jsx(ColorPicker$1.Positioner, { children: /* @__PURE__ */ jsxs(ColorPicker$1.Content, { children: [
|
|
46
|
+
/* @__PURE__ */ jsxs(ColorPicker$1.Area, { children: [/* @__PURE__ */ jsx(ColorPicker$1.AreaBackground, {}), /* @__PURE__ */ jsx(ColorPicker$1.AreaThumb, {})] }),
|
|
47
|
+
/* @__PURE__ */ jsxs("div", {
|
|
49
48
|
"data-scope": "color-picker",
|
|
50
|
-
"data-part": "channel-
|
|
51
|
-
children: [/* @__PURE__ */
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}), /* @__PURE__ */ jsxs(
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
/* @__PURE__ */ jsx(ColorPicker$1.ChannelSliderThumb, {})
|
|
60
|
-
|
|
49
|
+
"data-part": "channel-controls",
|
|
50
|
+
children: [/* @__PURE__ */ jsx(ColorPicker$1.EyeDropperTrigger, { children: iconNode("pipette", {
|
|
51
|
+
width: 14,
|
|
52
|
+
height: 14
|
|
53
|
+
}) }), /* @__PURE__ */ jsxs("div", {
|
|
54
|
+
"data-scope": "color-picker",
|
|
55
|
+
"data-part": "channel-sliders",
|
|
56
|
+
children: [/* @__PURE__ */ jsxs(ColorPicker$1.ChannelSlider, {
|
|
57
|
+
channel: "hue",
|
|
58
|
+
children: [/* @__PURE__ */ jsx(ColorPicker$1.ChannelSliderTrack, {}), /* @__PURE__ */ jsx(ColorPicker$1.ChannelSliderThumb, {})]
|
|
59
|
+
}), /* @__PURE__ */ jsxs(ColorPicker$1.ChannelSlider, {
|
|
60
|
+
channel: "alpha",
|
|
61
|
+
children: [
|
|
62
|
+
/* @__PURE__ */ jsx(ColorPicker$1.TransparencyGrid, {}),
|
|
63
|
+
/* @__PURE__ */ jsx(ColorPicker$1.ChannelSliderTrack, {}),
|
|
64
|
+
/* @__PURE__ */ jsx(ColorPicker$1.ChannelSliderThumb, {})
|
|
65
|
+
]
|
|
66
|
+
})]
|
|
61
67
|
})]
|
|
62
|
-
})
|
|
63
|
-
|
|
64
|
-
swatches.length > 0 ? /* @__PURE__ */ jsx(ColorPicker$1.SwatchGroup, { children: swatches.map((color) => /* @__PURE__ */ jsx(ColorPicker$1.SwatchTrigger, {
|
|
65
|
-
value: color,
|
|
66
|
-
children: /* @__PURE__ */ jsx(ColorPicker$1.Swatch, {
|
|
68
|
+
}),
|
|
69
|
+
swatches.length > 0 ? /* @__PURE__ */ jsx(ColorPicker$1.SwatchGroup, { children: swatches.map((color) => /* @__PURE__ */ jsx(ColorPicker$1.SwatchTrigger, {
|
|
67
70
|
value: color,
|
|
68
|
-
children: /* @__PURE__ */ jsx(ColorPicker$1.
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
71
|
+
children: /* @__PURE__ */ jsx(ColorPicker$1.Swatch, {
|
|
72
|
+
value: color,
|
|
73
|
+
children: /* @__PURE__ */ jsx(ColorPicker$1.SwatchIndicator, { children: checkIcon })
|
|
74
|
+
})
|
|
75
|
+
}, color)) }) : null
|
|
76
|
+
] }) })
|
|
77
|
+
}),
|
|
72
78
|
/* @__PURE__ */ jsx(ColorPicker$1.HiddenInput, {})
|
|
73
79
|
]
|
|
74
80
|
});
|
|
75
81
|
}
|
|
76
82
|
const ColorPicker = Object.assign(ColorPickerFacade, {
|
|
77
83
|
...ColorPicker$1,
|
|
84
|
+
Positioner: ColorPickerPositioner,
|
|
78
85
|
Root: ColorPickerRoot
|
|
79
86
|
});
|
|
80
|
-
//#endregion
|
|
81
87
|
export { ColorPicker };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { n as FloatingPortalTarget, t as FloatingPortalProps } from "../../floating-BhcDRgnx.mjs";
|
|
1
2
|
import { CSSProperties } from "react";
|
|
2
3
|
import { CollectionItem } from "@ark-ui/react/collection";
|
|
3
4
|
import { Combobox as Combobox$1, ComboboxRootComponentProps } from "@ark-ui/react/combobox";
|
|
4
|
-
//#region src/components/combobox/index.d.ts
|
|
5
5
|
/** Ark's Combobox, dressed in the paper-and-ink system: the field carries
|
|
6
6
|
* the control recipe and its matches dissolve open as a paper vessel, the
|
|
7
7
|
* checked row taking the flat ink fill. The API is Ark's own — Root, Label,
|
|
@@ -18,6 +18,8 @@ type ComboboxOption = {
|
|
|
18
18
|
};
|
|
19
19
|
type ComboboxFacadeValue = string | string[];
|
|
20
20
|
type ComboboxFacadeProps = {
|
|
21
|
+
/** Portal after hydration; `false` keeps the vessel inline. */
|
|
22
|
+
portal?: FloatingPortalTarget;
|
|
21
23
|
value?: ComboboxFacadeValue;
|
|
22
24
|
defaultValue?: ComboboxFacadeValue;
|
|
23
25
|
options: ComboboxOption[];
|
|
@@ -36,8 +38,13 @@ type ComboboxFacadeProps = {
|
|
|
36
38
|
};
|
|
37
39
|
/** The complete combobox behind one model value: options become the vessel's
|
|
38
40
|
* rows while typing, clearing, and selection stay on the common field path. */
|
|
41
|
+
declare const ComboboxPositioner: {
|
|
42
|
+
({ portal, ...rest }: FloatingPortalProps & Combobox$1.PositionerProps & import("react").RefAttributes<HTMLDivElement>): import("react").JSX.Element;
|
|
43
|
+
displayName: string;
|
|
44
|
+
};
|
|
39
45
|
declare function ComboboxFacade(props: ComboboxFacadeProps): import("react").JSX.Element;
|
|
40
|
-
export declare const Combobox: typeof ComboboxFacade & Omit<typeof Combobox$1, "Root"> & {
|
|
46
|
+
export declare const Combobox: typeof ComboboxFacade & Omit<typeof Combobox$1, "Root" | "Positioner"> & {
|
|
47
|
+
Positioner: typeof ComboboxPositioner;
|
|
41
48
|
Root: typeof ComboboxRoot;
|
|
42
49
|
};
|
|
43
|
-
|
|
50
|
+
export {};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { r as iconNode } from "../../icon-
|
|
2
|
-
import { t as useElementId } from "../../id-
|
|
1
|
+
import { r as iconNode } from "../../icon-C9udWCyz.mjs";
|
|
2
|
+
import { t as useElementId } from "../../id-Ctic_3o8.mjs";
|
|
3
|
+
import { n as definePositioner, t as FloatingPortal } from "../../floating-CMR7cvmA.mjs";
|
|
3
4
|
import { injectComponentStyle } from "@bysages/core/styling";
|
|
4
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
6
|
import { Combobox as Combobox$1, createListCollection } from "@ark-ui/react/combobox";
|
|
6
|
-
|
|
7
|
+
// src/components/combobox/index.tsx
|
|
7
8
|
function ComboboxRoot(props) {
|
|
8
9
|
injectComponentStyle("combobox");
|
|
9
10
|
const id = useElementId("combobox", props);
|
|
@@ -23,8 +24,9 @@ function fromComboboxValue(value, multiple) {
|
|
|
23
24
|
}
|
|
24
25
|
/** The complete combobox behind one model value: options become the vessel's
|
|
25
26
|
* rows while typing, clearing, and selection stay on the common field path. */
|
|
27
|
+
const ComboboxPositioner = definePositioner(Combobox$1.Positioner);
|
|
26
28
|
function ComboboxFacade(props) {
|
|
27
|
-
const { value, defaultValue, options, multiple, clearable = true, disabled, invalid, required, label, placeholder, size = "md", className, style, onValueChange } = props;
|
|
29
|
+
const { portal = false, value, defaultValue, options, multiple, clearable = true, disabled, invalid, required, label, placeholder, size = "md", className, style, onValueChange } = props;
|
|
28
30
|
const collection = createListCollection({ items: options });
|
|
29
31
|
return /* @__PURE__ */ jsxs(ComboboxRoot, {
|
|
30
32
|
size,
|
|
@@ -57,19 +59,22 @@ function ComboboxFacade(props) {
|
|
|
57
59
|
height: 16
|
|
58
60
|
}) })
|
|
59
61
|
] }),
|
|
60
|
-
/* @__PURE__ */ jsx(
|
|
61
|
-
|
|
62
|
-
children:
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
62
|
+
/* @__PURE__ */ jsx(FloatingPortal, {
|
|
63
|
+
portal,
|
|
64
|
+
children: /* @__PURE__ */ jsx(Combobox$1.Positioner, { children: /* @__PURE__ */ jsxs(Combobox$1.Content, { children: [/* @__PURE__ */ jsx(Combobox$1.Empty, { children: "No results found" }), /* @__PURE__ */ jsx(Combobox$1.List, { children: collection.items.map((item) => /* @__PURE__ */ jsxs(Combobox$1.Item, {
|
|
65
|
+
item,
|
|
66
|
+
children: [/* @__PURE__ */ jsx(Combobox$1.ItemText, { children: item.label }), /* @__PURE__ */ jsx(Combobox$1.ItemIndicator, { children: iconNode("check", {
|
|
67
|
+
width: 14,
|
|
68
|
+
height: 14
|
|
69
|
+
}) })]
|
|
70
|
+
}, item.value)) })] }) })
|
|
71
|
+
})
|
|
67
72
|
]
|
|
68
73
|
});
|
|
69
74
|
}
|
|
70
75
|
const Combobox = Object.assign(ComboboxFacade, {
|
|
71
76
|
...Combobox$1,
|
|
77
|
+
Positioner: ComboboxPositioner,
|
|
72
78
|
Root: ComboboxRoot
|
|
73
79
|
});
|
|
74
|
-
//#endregion
|
|
75
80
|
export { Combobox };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { n as FloatingPortalTarget } from "../../floating-BhcDRgnx.mjs";
|
|
1
2
|
import { Dialog } from "../dialog/index.mjs";
|
|
2
|
-
//#region src/components/command/index.d.ts
|
|
3
3
|
export interface CommandEntry {
|
|
4
4
|
label: string;
|
|
5
5
|
value: string;
|
|
@@ -18,6 +18,8 @@ export interface CommandEntry {
|
|
|
18
18
|
* grafts onto the sheet's list.
|
|
19
19
|
*/
|
|
20
20
|
export interface CommandProps {
|
|
21
|
+
/** Portal after hydration; `false` keeps the vessel inline. */
|
|
22
|
+
portal?: FloatingPortalTarget;
|
|
21
23
|
id?: string;
|
|
22
24
|
/** The commands on offer, grouped as they arrive. */
|
|
23
25
|
items?: CommandEntry[];
|
|
@@ -41,6 +43,6 @@ export interface CommandProps {
|
|
|
41
43
|
/** Reports the field's live text. */
|
|
42
44
|
onInputValueChange?: (value: string) => void;
|
|
43
45
|
}
|
|
44
|
-
declare function CommandImpl({ items, placeholder, open, autoFilter, inputValue, emptyText, onSelect, onOpenChange, onInputValueChange, id }: CommandProps): import("react").JSX.Element;
|
|
46
|
+
declare function CommandImpl({ portal, items, placeholder, open, autoFilter, inputValue, emptyText, onSelect, onOpenChange, onInputValueChange, id }: CommandProps): import("react").JSX.Element;
|
|
45
47
|
export declare const Command: typeof CommandImpl & typeof Dialog;
|
|
46
|
-
|
|
48
|
+
export {};
|