@bysages/solid 0.4.3 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/ai-NX47X8sz.mjs +365 -0
- package/dist/ai-prompt-input-CEnnpkgi.mjs +486 -0
- package/dist/{ai-response-CJ-uEAgj.mjs → ai-response-BM_DVIDY.mjs} +25 -27
- package/dist/{chevron-BHQrYKPM.mjs → chevron-DGKPHc2O.mjs} +2 -3
- package/dist/components/accordion/index.d.mts +1 -2
- package/dist/components/accordion/index.mjs +9 -16
- package/dist/components/affix/index.d.mts +1 -3
- package/dist/components/affix/index.mjs +19 -18
- package/dist/components/ai/index.d.mts +95 -2
- package/dist/components/ai/index.mjs +7 -69
- package/dist/components/ai-action/index.d.mts +0 -2
- package/dist/components/ai-action/index.mjs +4 -5
- package/dist/components/ai-attachments/index.d.mts +0 -2
- package/dist/components/ai-attachments/index.mjs +39 -52
- package/dist/components/ai-message/index.d.mts +2 -15
- package/dist/components/ai-message/index.mjs +18 -15
- package/dist/components/ai-prompt-input/index.d.mts +19 -15
- package/dist/components/ai-prompt-input/index.mjs +1 -168
- package/dist/components/ai-reasoning/index.d.mts +0 -2
- package/dist/components/ai-reasoning/index.mjs +8 -13
- 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 +25 -26
- package/dist/components/ai-suggestion/index.d.mts +0 -2
- package/dist/components/ai-suggestion/index.mjs +3 -4
- package/dist/components/ai-tool/index.d.mts +2 -25
- package/dist/components/ai-tool/index.mjs +75 -40
- package/dist/components/alert/index.d.mts +1 -2
- package/dist/components/alert/index.mjs +38 -33
- package/dist/components/angle-slider/index.d.mts +1 -2
- package/dist/components/angle-slider/index.mjs +6 -9
- package/dist/components/aspect-ratio/index.d.mts +1 -3
- package/dist/components/aspect-ratio/index.mjs +18 -17
- package/dist/components/autocomplete/index.d.mts +1 -2
- package/dist/components/autocomplete/index.mjs +6 -8
- package/dist/components/avatar/index.d.mts +17 -6
- package/dist/components/avatar/index.mjs +66 -10
- package/dist/components/avatar-group/index.d.mts +1 -3
- package/dist/components/avatar-group/index.mjs +15 -14
- package/dist/components/back-top/index.d.mts +1 -3
- package/dist/components/back-top/index.mjs +29 -34
- package/dist/components/badge/index.d.mts +1 -3
- package/dist/components/badge/index.mjs +18 -17
- package/dist/components/banner/index.d.mts +18 -3
- package/dist/components/banner/index.mjs +108 -31
- package/dist/components/bento/index.d.mts +1 -3
- package/dist/components/bento/index.mjs +30 -31
- package/dist/components/block-ui/index.d.mts +1 -3
- package/dist/components/block-ui/index.mjs +30 -33
- package/dist/components/breadcrumb/index.d.mts +15 -3
- package/dist/components/breadcrumb/index.mjs +56 -12
- package/dist/components/browser/index.d.mts +1 -3
- package/dist/components/browser/index.mjs +50 -51
- package/dist/components/button/index.d.mts +1 -3
- package/dist/components/button/index.mjs +31 -30
- package/dist/components/button-group/index.d.mts +1 -3
- package/dist/components/button-group/index.mjs +21 -20
- package/dist/components/calendar/index.d.mts +0 -2
- package/dist/components/calendar/index.mjs +73 -116
- package/dist/components/card/index.d.mts +1 -3
- package/dist/components/card/index.mjs +3 -4
- package/dist/components/carousel/index.d.mts +1 -2
- package/dist/components/carousel/index.mjs +6 -7
- package/dist/components/cascade-select/index.d.mts +1 -3
- package/dist/components/cascade-select/index.mjs +127 -167
- package/dist/components/checkbox/index.d.mts +1 -2
- package/dist/components/checkbox/index.mjs +7 -10
- package/dist/components/checkbox-group/index.d.mts +1 -2
- package/dist/components/checkbox-group/index.mjs +9 -12
- package/dist/components/chip/index.d.mts +1 -3
- package/dist/components/chip/index.mjs +22 -25
- 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 +10 -17
- package/dist/components/collapsible/index.d.mts +1 -2
- package/dist/components/collapsible/index.mjs +7 -14
- package/dist/components/collection/index.mjs +1 -2
- package/dist/components/color-picker/index.d.mts +5 -2
- package/dist/components/color-picker/index.mjs +69 -39
- package/dist/components/combobox/index.d.mts +1 -2
- package/dist/components/combobox/index.mjs +9 -14
- package/dist/components/command/index.d.mts +1 -2
- package/dist/components/command/index.mjs +63 -80
- package/dist/components/comment/index.d.mts +1 -3
- package/dist/components/comment/index.mjs +64 -80
- package/dist/components/config-provider/index.d.mts +1 -3
- package/dist/components/config-provider/index.mjs +10 -13
- package/dist/components/container/index.d.mts +1 -3
- package/dist/components/container/index.mjs +18 -17
- package/dist/components/data-view/index.d.mts +1 -3
- package/dist/components/data-view/index.mjs +81 -90
- package/dist/components/date-input/index.d.mts +1 -2
- package/dist/components/date-input/index.mjs +6 -9
- package/dist/components/date-picker/index.d.mts +1 -2
- package/dist/components/date-picker/index.mjs +11 -16
- package/dist/components/deferred-content/index.d.mts +1 -3
- package/dist/components/deferred-content/index.mjs +24 -25
- package/dist/components/descriptions/index.d.mts +1 -2
- package/dist/components/descriptions/index.mjs +40 -39
- package/dist/components/dialog/index.d.mts +11 -2
- package/dist/components/dialog/index.mjs +78 -40
- package/dist/components/dock/index.d.mts +1 -3
- package/dist/components/dock/index.mjs +29 -30
- 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 +1 -2
- package/dist/components/drawer/index.mjs +9 -18
- package/dist/components/dynamic-input/index.d.mts +1 -3
- package/dist/components/dynamic-input/index.mjs +73 -77
- package/dist/components/editable/index.d.mts +1 -2
- package/dist/components/editable/index.mjs +7 -10
- package/dist/components/ellipsis/index.d.mts +1 -3
- package/dist/components/ellipsis/index.mjs +21 -20
- package/dist/components/empty/index.d.mts +1 -3
- package/dist/components/empty/index.mjs +3 -4
- package/dist/components/field/index.d.mts +1 -2
- package/dist/components/field/index.mjs +4 -5
- package/dist/components/fieldset/index.d.mts +1 -2
- package/dist/components/fieldset/index.mjs +6 -9
- package/dist/components/file-upload/index.d.mts +1 -2
- package/dist/components/file-upload/index.mjs +6 -7
- package/dist/components/float-button/index.d.mts +25 -3
- package/dist/components/float-button/index.mjs +108 -39
- package/dist/components/floating-panel/index.d.mts +1 -2
- package/dist/components/floating-panel/index.mjs +10 -21
- 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 +42 -58
- 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 -2
- package/dist/components/frame/index.mjs +3 -4
- package/dist/components/grid/index.d.mts +1 -3
- package/dist/components/grid/index.mjs +23 -22
- 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 +1 -2
- package/dist/components/hover-card/index.mjs +12 -27
- package/dist/components/icon/index.d.mts +1 -3
- package/dist/components/icon/index.mjs +35 -36
- package/dist/components/image/index.d.mts +1 -3
- package/dist/components/image/index.mjs +48 -52
- package/dist/components/image-cropper/index.d.mts +1 -2
- package/dist/components/image-cropper/index.mjs +5 -6
- 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 -2
- package/dist/components/input-group/index.mjs +19 -16
- package/dist/components/json-tree-view/index.d.mts +1 -2
- package/dist/components/json-tree-view/index.mjs +5 -6
- package/dist/components/kbd/index.d.mts +1 -3
- package/dist/components/kbd/index.mjs +12 -11
- package/dist/components/layout/index.d.mts +1 -2
- package/dist/components/layout/index.mjs +92 -84
- package/dist/components/link/index.d.mts +1 -3
- package/dist/components/link/index.mjs +15 -15
- package/dist/components/list/index.d.mts +1 -2
- package/dist/components/list/index.mjs +57 -61
- package/dist/components/listbox/index.d.mts +1 -2
- package/dist/components/listbox/index.mjs +8 -11
- package/dist/components/marquee/index.d.mts +1 -2
- package/dist/components/marquee/index.mjs +7 -8
- package/dist/components/masonry/index.d.mts +1 -3
- package/dist/components/masonry/index.mjs +19 -18
- 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 -3
- package/dist/components/menu/index.d.mts +1 -2
- package/dist/components/menu/index.mjs +8 -17
- package/dist/components/menubar/index.d.mts +1 -2
- package/dist/components/menubar/index.mjs +66 -72
- package/dist/components/meter/index.d.mts +1 -2
- package/dist/components/meter/index.mjs +42 -43
- package/dist/components/navigation-menu/index.d.mts +1 -2
- package/dist/components/navigation-menu/index.mjs +7 -12
- package/dist/components/number-input/index.d.mts +1 -2
- package/dist/components/number-input/index.mjs +7 -10
- package/dist/components/order-list/index.d.mts +1 -3
- package/dist/components/order-list/index.mjs +86 -101
- package/dist/components/page-header/index.d.mts +1 -3
- package/dist/components/page-header/index.mjs +3 -4
- package/dist/components/pagination/index.d.mts +1 -2
- package/dist/components/pagination/index.mjs +31 -42
- package/dist/components/password-input/index.d.mts +1 -2
- package/dist/components/password-input/index.mjs +6 -7
- package/dist/components/pin-input/index.d.mts +1 -2
- package/dist/components/pin-input/index.mjs +6 -9
- package/dist/components/popconfirm/index.d.mts +2 -3
- package/dist/components/popconfirm/index.mjs +15 -23
- package/dist/components/popover/index.d.mts +2 -26
- package/dist/components/popover/index.mjs +10 -21
- 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 +14 -26
- package/dist/components/progress-group/index.d.mts +1 -3
- package/dist/components/progress-group/index.mjs +60 -68
- package/dist/components/qr-code/index.d.mts +1 -2
- package/dist/components/qr-code/index.mjs +5 -8
- package/dist/components/radio-group/index.d.mts +1 -2
- package/dist/components/radio-group/index.mjs +6 -9
- package/dist/components/rating-group/index.d.mts +1 -2
- package/dist/components/rating-group/index.mjs +7 -10
- package/dist/components/result/index.d.mts +1 -2
- package/dist/components/result/index.mjs +28 -29
- package/dist/components/scroll-area/index.d.mts +8 -3
- package/dist/components/scroll-area/index.mjs +19 -11
- package/dist/components/segment-group/index.d.mts +1 -2
- package/dist/components/segment-group/index.mjs +5 -8
- 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 -3
- package/dist/components/separator/index.mjs +21 -20
- package/dist/components/signature-pad/index.d.mts +1 -2
- package/dist/components/signature-pad/index.mjs +7 -10
- package/dist/components/skeleton/index.d.mts +1 -3
- package/dist/components/skeleton/index.mjs +12 -11
- package/dist/components/slider/index.d.mts +1 -2
- package/dist/components/slider/index.mjs +6 -9
- package/dist/components/spinner/index.d.mts +1 -3
- package/dist/components/spinner/index.mjs +20 -19
- package/dist/components/split-button/index.d.mts +1 -2
- package/dist/components/split-button/index.mjs +92 -94
- package/dist/components/splitter/index.d.mts +1 -2
- package/dist/components/splitter/index.mjs +5 -8
- package/dist/components/spotlight/index.d.mts +1 -3
- package/dist/components/spotlight/index.mjs +22 -23
- package/dist/components/stack/index.d.mts +1 -3
- package/dist/components/stack/index.mjs +24 -23
- package/dist/components/stat/index.d.mts +1 -2
- package/dist/components/stat/index.mjs +15 -14
- package/dist/components/steps/index.d.mts +0 -2
- package/dist/components/steps/index.mjs +10 -17
- package/dist/components/swap/index.d.mts +1 -2
- package/dist/components/swap/index.mjs +5 -6
- package/dist/components/switch/index.d.mts +1 -2
- package/dist/components/switch/index.mjs +6 -9
- package/dist/components/table/index.d.mts +0 -2
- package/dist/components/table/index.mjs +233 -320
- package/dist/components/tabs/index.d.mts +8 -12
- package/dist/components/tabs/index.mjs +83 -34
- package/dist/components/tag/index.d.mts +1 -2
- package/dist/components/tag/index.mjs +46 -70
- package/dist/components/tags-input/index.d.mts +1 -2
- package/dist/components/tags-input/index.mjs +7 -10
- package/dist/components/terminal/index.d.mts +3 -3
- package/dist/components/terminal/index.mjs +61 -56
- package/dist/components/textarea/index.d.mts +1 -3
- package/dist/components/textarea/index.mjs +10 -11
- package/dist/components/timeline/index.d.mts +1 -2
- package/dist/components/timeline/index.mjs +15 -14
- package/dist/components/timer/index.d.mts +1 -2
- package/dist/components/timer/index.mjs +5 -6
- package/dist/components/toast/index.d.mts +0 -2
- package/dist/components/toast/index.mjs +5 -6
- package/dist/components/toc/index.d.mts +1 -1
- package/dist/components/toc/index.mjs +1 -2
- package/dist/components/toggle/index.d.mts +1 -2
- package/dist/components/toggle/index.mjs +5 -6
- package/dist/components/toggle-group/index.d.mts +1 -2
- package/dist/components/toggle-group/index.mjs +11 -16
- package/dist/components/toolbar/index.d.mts +1 -3
- package/dist/components/toolbar/index.mjs +27 -31
- package/dist/components/tooltip/index.d.mts +1 -2
- package/dist/components/tooltip/index.mjs +7 -16
- package/dist/components/tour/index.d.mts +0 -2
- package/dist/components/tour/index.mjs +11 -16
- package/dist/components/transfer/index.d.mts +1 -2
- package/dist/components/transfer/index.mjs +115 -126
- package/dist/components/tree-select/index.d.mts +2 -3
- package/dist/components/tree-select/index.mjs +24 -33
- package/dist/components/tree-view/index.d.mts +10 -4
- package/dist/components/tree-view/index.mjs +32 -23
- package/dist/components/typography/index.d.mts +2 -3
- package/dist/components/typography/index.mjs +4 -4
- package/dist/components/user/index.d.mts +1 -3
- package/dist/components/user/index.mjs +40 -57
- package/dist/components/virtual-list/index.d.mts +1 -3
- package/dist/components/virtual-list/index.mjs +39 -45
- package/dist/components/watermark/index.d.mts +1 -3
- package/dist/components/watermark/index.mjs +15 -22
- package/dist/{element-dGIhOTJ6.mjs → element-liigPBUh.mjs} +1 -2
- package/dist/{family-Cmd8HEyK.mjs → family-B5HtE0on.mjs} +1 -2
- package/dist/generative/index.d.mts +0 -2
- package/dist/generative/index.mjs +240 -248
- package/dist/{icon-DTqmJCd5.mjs → icon-DQqYA2fO.mjs} +11 -17
- package/dist/{id-2ygNzPHF.mjs → id-DGvz-2rQ.mjs} +1 -2
- package/dist/{image-viewer-19s75Hz_.mjs → image-viewer-TEia4PaY.mjs} +73 -101
- package/dist/{index-BU5U5w04.d.mts → index-B4WyTngM.d.mts} +0 -4
- package/dist/index-BRvSfkKs.d.mts +25 -0
- package/dist/{index-DhripUtf.d.mts → index-CTsFsYdA.d.mts} +0 -4
- package/dist/index-CutrHCzU.d.mts +153 -0
- package/dist/{index-wW28BYf1.d.mts → index-CwmZdzxT.d.mts} +0 -8
- package/dist/index-DK7YgaAU.d.mts +37 -0
- package/dist/index-Dms00480.d.mts +115 -0
- package/dist/{index-ID48LCMU.d.mts → index-Dv6mwzIr.d.mts} +3 -7
- package/dist/index.d.mts +17 -17
- package/dist/index.mjs +12 -12
- package/dist/{input-BL3N3L8g.mjs → input-2xfPP-7Z.mjs} +11 -13
- package/dist/{media-player-yF7KVUxM.mjs → media-player-LHnTiSiN.mjs} +248 -259
- package/dist/mentions-CvY9IGzc.mjs +438 -0
- package/dist/{select-DI7pFspF.mjs → select-NaNlrYUT.mjs} +72 -96
- package/dist/{toc-DRHr8_eD.mjs → toc-RnPG3w7q.mjs} +5 -7
- package/dist/{use-component-messages-C4SCVYjD.mjs → use-component-messages-DS9ppb4C.mjs} +1 -2
- package/package.json +13 -13
- package/dist/index-DEArHiFI.d.mts +0 -104
- package/dist/index-DVc1L_zt.d.mts +0 -10435
- package/dist/mentions-DKUG7eHt.mjs +0 -279
|
@@ -1,25 +1,24 @@
|
|
|
1
|
-
import { n as withSelfRoot } from "../../family-
|
|
2
|
-
import { r as iconNode } from "../../icon-
|
|
3
|
-
import { t as useElementId } from "../../id-
|
|
4
|
-
import { n as useComponentMessages } from "../../use-component-messages-
|
|
5
|
-
import { t as Input } from "../../input-
|
|
6
|
-
import { createComponent, delegateEvents, effect, insert, setAttribute, spread, template } from "
|
|
1
|
+
import { n as withSelfRoot } from "../../family-B5HtE0on.mjs";
|
|
2
|
+
import { r as iconNode } from "../../icon-DQqYA2fO.mjs";
|
|
3
|
+
import { t as useElementId } from "../../id-DGvz-2rQ.mjs";
|
|
4
|
+
import { n as useComponentMessages } from "../../use-component-messages-DS9ppb4C.mjs";
|
|
5
|
+
import { t as Input } from "../../input-2xfPP-7Z.mjs";
|
|
6
|
+
import { Portal, createComponent, delegateEvents, effect, insert, mergeProps, setAttribute, spread, template } from "solid-js/web";
|
|
7
7
|
import { injectComponentStyle } from "@bysages/core/styling";
|
|
8
8
|
import { For, Show, createMemo, createSignal, mergeProps as mergeProps$1, splitProps } from "solid-js";
|
|
9
|
-
import { Portal } from "solid-js/web";
|
|
10
9
|
import { useEnvironmentContext } from "@ark-ui/solid/environment";
|
|
11
10
|
import { useFilter, useLocaleContext } from "@ark-ui/solid/locale";
|
|
12
11
|
import * as cascade from "@zag-js/cascade-select";
|
|
13
12
|
import { normalizeProps, useMachine } from "@zag-js/solid";
|
|
14
|
-
|
|
15
|
-
var _tmpl$ =
|
|
16
|
-
var _tmpl$2 =
|
|
17
|
-
var _tmpl$3 =
|
|
18
|
-
var _tmpl$4 =
|
|
19
|
-
var _tmpl$5 =
|
|
20
|
-
var _tmpl$6 =
|
|
21
|
-
var _tmpl$7 =
|
|
22
|
-
var _tmpl$8 =
|
|
13
|
+
// src/components/cascade-select/index.tsx
|
|
14
|
+
var _tmpl$ = /*#__PURE__*/ template(`<ul>`);
|
|
15
|
+
var _tmpl$2 = /*#__PURE__*/ template(`<span data-scope=cascade-select data-part=branch-indicator aria-hidden=true>`);
|
|
16
|
+
var _tmpl$3 = /*#__PURE__*/ template(`<li><span></span><span>`);
|
|
17
|
+
var _tmpl$4 = /*#__PURE__*/ template(`<div data-scope=cascade-select data-part=search>`);
|
|
18
|
+
var _tmpl$5 = /*#__PURE__*/ template(`<div><div><div data-scope=cascade-select data-part=corridor>`);
|
|
19
|
+
var _tmpl$6 = /*#__PURE__*/ template(`<div><div><button><span></span><span>`);
|
|
20
|
+
var _tmpl$7 = /*#__PURE__*/ template(`<p data-scope=cascade-select data-part=empty>Nothing matches`);
|
|
21
|
+
var _tmpl$8 = /*#__PURE__*/ template(`<button type=button data-scope=cascade-select data-part=match>`);
|
|
23
22
|
function chevronDown() {
|
|
24
23
|
return iconNode("chevron-down");
|
|
25
24
|
}
|
|
@@ -144,72 +143,52 @@ const CascadeSelect = withSelfRoot(function CascadeSelect(props) {
|
|
|
144
143
|
};
|
|
145
144
|
const nodeState = () => api().getItemState(nodeProps);
|
|
146
145
|
const children = collection().getNodeChildren(node);
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
spread(_el$5, () => {
|
|
184
|
-
return mergeProps$1(() => api().getItemIndicatorProps(itemProps));
|
|
185
|
-
}, true);
|
|
186
|
-
insert(_el$5, checkIcon);
|
|
187
|
-
return _el$2;
|
|
188
|
-
}
|
|
189
|
-
}));
|
|
190
|
-
const list = _el$;
|
|
146
|
+
const list = (() => {
|
|
147
|
+
var _el$ = _tmpl$();
|
|
148
|
+
spread(_el$, mergeProps(() => mergeProps$1(() => api().getListProps(nodeProps))), false, true);
|
|
149
|
+
insert(_el$, createComponent(For, {
|
|
150
|
+
each: children,
|
|
151
|
+
children: (item, index) => {
|
|
152
|
+
const itemValue = collection().getNodeValue(item);
|
|
153
|
+
const itemProps = {
|
|
154
|
+
item,
|
|
155
|
+
indexPath: [...indexPath, index()],
|
|
156
|
+
value: [...valuePath, itemValue]
|
|
157
|
+
};
|
|
158
|
+
const itemState = () => api().getItemState(itemProps);
|
|
159
|
+
return (() => {
|
|
160
|
+
var _el$2 = _tmpl$3(), _el$3 = _el$2.firstChild, _el$5 = _el$3.nextSibling;
|
|
161
|
+
spread(_el$2, mergeProps(() => mergeProps$1(() => api().getItemProps(itemProps))), false, true);
|
|
162
|
+
spread(_el$3, mergeProps(() => mergeProps$1(() => api().getItemTextProps(itemProps))), false, true);
|
|
163
|
+
insert(_el$3, () => item.label);
|
|
164
|
+
insert(_el$2, createComponent(Show, {
|
|
165
|
+
get when() {
|
|
166
|
+
return itemState().hasChildren;
|
|
167
|
+
},
|
|
168
|
+
get children() {
|
|
169
|
+
var _el$4 = _tmpl$2();
|
|
170
|
+
insert(_el$4, chevronRight);
|
|
171
|
+
return _el$4;
|
|
172
|
+
}
|
|
173
|
+
}), _el$5);
|
|
174
|
+
spread(_el$5, mergeProps(() => mergeProps$1(() => api().getItemIndicatorProps(itemProps))), false, true);
|
|
175
|
+
insert(_el$5, checkIcon);
|
|
176
|
+
return _el$2;
|
|
177
|
+
})();
|
|
178
|
+
}
|
|
179
|
+
}));
|
|
180
|
+
return _el$;
|
|
181
|
+
})();
|
|
191
182
|
const next = nodeState().highlightedChild;
|
|
192
183
|
return [list, next != null && collection().isBranchNode(next) ? renderColumn(next, [...indexPath, nodeState().highlightedIndex], [...valuePath, collection().getNodeValue(next)]) : null];
|
|
193
184
|
}
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
var _el$9 = _el$8.firstChild;
|
|
198
|
-
var _el$10 = _el$9.nextSibling;
|
|
199
|
-
spread(_el$6, [
|
|
200
|
-
rest,
|
|
201
|
-
() => {
|
|
202
|
-
return mergeProps$1(() => api().getRootProps());
|
|
203
|
-
},
|
|
204
|
-
{ get "data-size"() {
|
|
185
|
+
return (() => {
|
|
186
|
+
var _el$6 = _tmpl$6(), _el$7 = _el$6.firstChild, _el$8 = _el$7.firstChild, _el$9 = _el$8.firstChild, _el$0 = _el$9.nextSibling;
|
|
187
|
+
spread(_el$6, mergeProps(rest, () => mergeProps$1(() => api().getRootProps()), { get ["data-size"]() {
|
|
205
188
|
return own.size ?? "md";
|
|
206
|
-
} }
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
return mergeProps$1(() => api().getControlProps());
|
|
210
|
-
}, true);
|
|
211
|
-
spread(_el$8, () => {
|
|
212
|
-
return mergeProps$1(() => api().getTriggerProps(), {
|
|
189
|
+
} }), false, true);
|
|
190
|
+
spread(_el$7, mergeProps(() => mergeProps$1(() => api().getControlProps())), false, true);
|
|
191
|
+
spread(_el$8, mergeProps(() => mergeProps$1(() => api().getTriggerProps(), {
|
|
213
192
|
"aria-labelledby": id + ":value-text",
|
|
214
193
|
get disabled() {
|
|
215
194
|
return own.disabled || void 0;
|
|
@@ -218,95 +197,76 @@ const CascadeSelect = withSelfRoot(function CascadeSelect(props) {
|
|
|
218
197
|
api().getTriggerProps().onclick?.(event);
|
|
219
198
|
setQuery("");
|
|
220
199
|
}
|
|
221
|
-
});
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
setAttribute(_el$16, "data-selected", _v$);
|
|
292
|
-
});
|
|
293
|
-
return _el$16;
|
|
294
|
-
})()
|
|
295
|
-
});
|
|
296
|
-
}
|
|
297
|
-
});
|
|
298
|
-
},
|
|
299
|
-
get children() {
|
|
300
|
-
return renderColumn(collection().rootNode, [], []);
|
|
301
|
-
}
|
|
302
|
-
}));
|
|
303
|
-
effect(() => filtering() ? "flat" : "columns", (_v$) => {
|
|
304
|
-
setAttribute(_el$14, "data-flow", _v$);
|
|
305
|
-
});
|
|
306
|
-
return _el$11;
|
|
307
|
-
} }), null);
|
|
308
|
-
return _el$6;
|
|
200
|
+
})), false, true);
|
|
201
|
+
spread(_el$9, mergeProps(() => mergeProps$1(() => api().getValueTextProps(), { id: `${id}:value-text` })), false, true);
|
|
202
|
+
insert(_el$9, () => display() ?? own.placeholder ?? "Select…");
|
|
203
|
+
spread(_el$0, mergeProps(() => mergeProps$1(() => api().getIndicatorProps())), false, true);
|
|
204
|
+
insert(_el$0, chevronDown);
|
|
205
|
+
insert(_el$6, createComponent(Portal, { get children() {
|
|
206
|
+
var _el$1 = _tmpl$5(), _el$10 = _el$1.firstChild, _el$12 = _el$10.firstChild;
|
|
207
|
+
spread(_el$1, mergeProps(() => mergeProps$1(() => api().getPositionerProps())), false, true);
|
|
208
|
+
spread(_el$10, mergeProps(() => mergeProps$1(() => api().getContentProps()), { get ["data-size"]() {
|
|
209
|
+
return own.size ?? "md";
|
|
210
|
+
} }), false, true);
|
|
211
|
+
insert(_el$10, createComponent(Show, {
|
|
212
|
+
get when() {
|
|
213
|
+
return own.filterable;
|
|
214
|
+
},
|
|
215
|
+
get children() {
|
|
216
|
+
var _el$11 = _tmpl$4();
|
|
217
|
+
insert(_el$11, createComponent(Input, {
|
|
218
|
+
size: "sm",
|
|
219
|
+
get value() {
|
|
220
|
+
return query();
|
|
221
|
+
},
|
|
222
|
+
onValueChange: setQuery,
|
|
223
|
+
get placeholder() {
|
|
224
|
+
return messages().select.filter;
|
|
225
|
+
},
|
|
226
|
+
get ["aria-label"]() {
|
|
227
|
+
return messages().select.filter;
|
|
228
|
+
}
|
|
229
|
+
}));
|
|
230
|
+
return _el$11;
|
|
231
|
+
}
|
|
232
|
+
}), _el$12);
|
|
233
|
+
insert(_el$12, createComponent(Show, {
|
|
234
|
+
get when() {
|
|
235
|
+
return !filtering();
|
|
236
|
+
},
|
|
237
|
+
get fallback() {
|
|
238
|
+
return createComponent(Show, {
|
|
239
|
+
get when() {
|
|
240
|
+
return matchPaths().length > 0;
|
|
241
|
+
},
|
|
242
|
+
get fallback() {
|
|
243
|
+
return _tmpl$7();
|
|
244
|
+
},
|
|
245
|
+
get children() {
|
|
246
|
+
return createComponent(For, {
|
|
247
|
+
get each() {
|
|
248
|
+
return matchPaths();
|
|
249
|
+
},
|
|
250
|
+
children: (hit) => (() => {
|
|
251
|
+
var _el$14 = _tmpl$8();
|
|
252
|
+
_el$14.$$click = () => pickMatch(hit.path);
|
|
253
|
+
insert(_el$14, () => hit.labels.join(" / "));
|
|
254
|
+
effect(() => setAttribute(_el$14, "data-selected", isSelected(hit.path) || void 0));
|
|
255
|
+
return _el$14;
|
|
256
|
+
})()
|
|
257
|
+
});
|
|
258
|
+
}
|
|
259
|
+
});
|
|
260
|
+
},
|
|
261
|
+
get children() {
|
|
262
|
+
return renderColumn(collection().rootNode, [], []);
|
|
263
|
+
}
|
|
264
|
+
}));
|
|
265
|
+
effect(() => setAttribute(_el$12, "data-flow", filtering() ? "flat" : "columns"));
|
|
266
|
+
return _el$1;
|
|
267
|
+
} }), null);
|
|
268
|
+
return _el$6;
|
|
269
|
+
})();
|
|
309
270
|
});
|
|
310
271
|
delegateEvents(["click"]);
|
|
311
|
-
//#endregion
|
|
312
272
|
export { CascadeSelect };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Checkbox as Checkbox$1, CheckboxRootProps } from "@ark-ui/solid/checkbox";
|
|
2
|
-
//#region src/components/checkbox/index.d.ts
|
|
3
2
|
/** Ark's Checkbox, dressed in the paper-and-ink system: a square-cut seal
|
|
4
3
|
* that fills flat with primary ink when ticked, the mark springing into
|
|
5
4
|
* place. The API is Ark's own — Root, Label, Control, Indicator,
|
|
@@ -27,4 +26,4 @@ type CheckboxParts = Omit<typeof Checkbox$1, "Root"> & {
|
|
|
27
26
|
Root: typeof CheckboxRoot;
|
|
28
27
|
};
|
|
29
28
|
export declare const Checkbox: typeof CheckboxFacade & CheckboxParts;
|
|
30
|
-
|
|
29
|
+
export {};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { t as defineFamily } from "../../family-
|
|
2
|
-
import { r as iconNode } from "../../icon-
|
|
3
|
-
import { t as useElementId } from "../../id-
|
|
4
|
-
import { createComponent, mergeProps } from "
|
|
1
|
+
import { t as defineFamily } from "../../family-B5HtE0on.mjs";
|
|
2
|
+
import { r as iconNode } from "../../icon-DQqYA2fO.mjs";
|
|
3
|
+
import { t as useElementId } from "../../id-DGvz-2rQ.mjs";
|
|
4
|
+
import { createComponent, mergeProps } from "solid-js/web";
|
|
5
5
|
import { injectComponentStyle } from "@bysages/core/styling";
|
|
6
6
|
import { Show, splitProps } from "solid-js";
|
|
7
7
|
import { Checkbox as Checkbox$1 } from "@ark-ui/solid/checkbox";
|
|
8
|
-
|
|
8
|
+
// src/components/checkbox/index.tsx
|
|
9
9
|
function CheckboxRoot(props) {
|
|
10
10
|
const [own, rest] = splitProps(props, ["size"]);
|
|
11
11
|
const id = useElementId("checkbox", () => rest.id);
|
|
@@ -13,7 +13,7 @@ function CheckboxRoot(props) {
|
|
|
13
13
|
get id() {
|
|
14
14
|
return id();
|
|
15
15
|
},
|
|
16
|
-
get "data-size"() {
|
|
16
|
+
get ["data-size"]() {
|
|
17
17
|
return own.size ?? "md";
|
|
18
18
|
}
|
|
19
19
|
}));
|
|
@@ -39,9 +39,7 @@ function CheckboxFacade(props) {
|
|
|
39
39
|
get defaultChecked() {
|
|
40
40
|
return props.defaultValue ?? false;
|
|
41
41
|
}
|
|
42
|
-
}, () => {
|
|
43
|
-
return props.checked === void 0 ? {} : { checked: props.checked };
|
|
44
|
-
}, {
|
|
42
|
+
}, () => props.checked === void 0 ? {} : { checked: props.checked }, {
|
|
45
43
|
onCheckedChange: (details) => props.onCheckedChange?.(details.checked === true),
|
|
46
44
|
get children() {
|
|
47
45
|
return [
|
|
@@ -73,5 +71,4 @@ const Checkbox = defineFamily(CheckboxFacade, {
|
|
|
73
71
|
Root: CheckboxRoot
|
|
74
72
|
});
|
|
75
73
|
injectComponentStyle("checkbox");
|
|
76
|
-
//#endregion
|
|
77
74
|
export { Checkbox };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Checkbox } from "../checkbox/index.mjs";
|
|
2
2
|
import { JSX } from "solid-js";
|
|
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 CheckboxGroupFacadeProps extends JSX.HTMLAttributes<HTMLDivElem
|
|
|
27
26
|
}
|
|
28
27
|
declare function CheckboxGroupFacade(props: CheckboxGroupFacadeProps): JSX.Element;
|
|
29
28
|
export declare const CheckboxGroup: typeof CheckboxGroupFacade & typeof Checkbox;
|
|
30
|
-
|
|
29
|
+
export {};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { t as defineFamily } from "../../family-
|
|
2
|
-
import { r as iconNode } from "../../icon-
|
|
3
|
-
import { t as useElementId } from "../../id-
|
|
1
|
+
import { t as defineFamily } from "../../family-B5HtE0on.mjs";
|
|
2
|
+
import { r as iconNode } from "../../icon-DQqYA2fO.mjs";
|
|
3
|
+
import { t as useElementId } from "../../id-DGvz-2rQ.mjs";
|
|
4
4
|
import { Checkbox as Checkbox$1 } from "../checkbox/index.mjs";
|
|
5
|
-
import { createComponent, mergeProps } from "
|
|
5
|
+
import { createComponent, mergeProps } from "solid-js/web";
|
|
6
6
|
import { injectComponentStyle } from "@bysages/core/styling";
|
|
7
7
|
import { For, splitProps } from "solid-js";
|
|
8
8
|
import { useFieldContext } from "@ark-ui/solid/field";
|
|
9
9
|
import { Checkbox } from "@ark-ui/solid/checkbox";
|
|
10
|
-
|
|
10
|
+
// src/components/checkbox-group/index.tsx
|
|
11
11
|
function checkIcon() {
|
|
12
12
|
return iconNode("check");
|
|
13
13
|
}
|
|
@@ -32,9 +32,7 @@ function CheckboxGroupFacade(props) {
|
|
|
32
32
|
const isDisabled = () => own.disabled || field?.().disabled === true;
|
|
33
33
|
return createComponent(Checkbox.Group, mergeProps(rest, { get id() {
|
|
34
34
|
return id();
|
|
35
|
-
} }, selectedValue === void 0 ? {} : { value: selectedValue }, () => {
|
|
36
|
-
return own.defaultValue === void 0 ? {} : { defaultValue: own.defaultValue };
|
|
37
|
-
}, {
|
|
35
|
+
} }, selectedValue === void 0 ? {} : { value: selectedValue }, () => own.defaultValue === void 0 ? {} : { defaultValue: own.defaultValue }, {
|
|
38
36
|
get disabled() {
|
|
39
37
|
return isDisabled();
|
|
40
38
|
},
|
|
@@ -44,10 +42,10 @@ function CheckboxGroupFacade(props) {
|
|
|
44
42
|
get onValueChange() {
|
|
45
43
|
return own.onValueChange;
|
|
46
44
|
},
|
|
47
|
-
get "data-layout"() {
|
|
45
|
+
get ["data-layout"]() {
|
|
48
46
|
return own.layout ?? "vertical";
|
|
49
47
|
},
|
|
50
|
-
get "data-invalid"() {
|
|
48
|
+
get ["data-invalid"]() {
|
|
51
49
|
return isInvalid() ? "" : void 0;
|
|
52
50
|
},
|
|
53
51
|
get children() {
|
|
@@ -65,7 +63,7 @@ function CheckboxGroupFacade(props) {
|
|
|
65
63
|
hiddenInput: `${id()}:${option.value}:input`
|
|
66
64
|
};
|
|
67
65
|
},
|
|
68
|
-
get "data-size"() {
|
|
66
|
+
get ["data-size"]() {
|
|
69
67
|
return own.size ?? "md";
|
|
70
68
|
},
|
|
71
69
|
get disabled() {
|
|
@@ -90,5 +88,4 @@ function CheckboxGroupFacade(props) {
|
|
|
90
88
|
}));
|
|
91
89
|
}
|
|
92
90
|
const CheckboxGroup = defineFamily(CheckboxGroupFacade, Checkbox$1);
|
|
93
|
-
//#endregion
|
|
94
91
|
export { CheckboxGroup };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { JSX } from "solid-js";
|
|
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 JSX.HTMLAttributes<HTMLSpanElement> {
|
|
@@ -10,5 +9,4 @@ export interface ChipProps extends JSX.HTMLAttributes<HTMLSpanElement> {
|
|
|
10
9
|
}
|
|
11
10
|
export declare const Chip: ((props: ChipProps) => JSX.Element) & {
|
|
12
11
|
Root: (props: ChipProps) => JSX.Element;
|
|
13
|
-
};
|
|
14
|
-
//#endregion
|
|
12
|
+
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { n as withSelfRoot } from "../../family-
|
|
2
|
-
import { insert, memo, spread, template } from "
|
|
1
|
+
import { n as withSelfRoot } from "../../family-B5HtE0on.mjs";
|
|
2
|
+
import { insert, memo, mergeProps, spread, template } from "solid-js/web";
|
|
3
3
|
import { injectComponentStyle } from "@bysages/core/styling";
|
|
4
4
|
import { splitProps } from "solid-js";
|
|
5
|
-
|
|
6
|
-
var _tmpl$ =
|
|
5
|
+
// src/components/chip/index.tsx
|
|
6
|
+
var _tmpl$ = /*#__PURE__*/ template(`<span>`);
|
|
7
7
|
const Chip = withSelfRoot(function Chip(props) {
|
|
8
8
|
injectComponentStyle("chip");
|
|
9
9
|
const [own, rest] = splitProps(props, [
|
|
@@ -12,26 +12,23 @@ const Chip = withSelfRoot(function Chip(props) {
|
|
|
12
12
|
"tone",
|
|
13
13
|
"variant"
|
|
14
14
|
]);
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
})());
|
|
34
|
-
return _el$;
|
|
15
|
+
return (() => {
|
|
16
|
+
var _el$ = _tmpl$();
|
|
17
|
+
spread(_el$, mergeProps(rest, {
|
|
18
|
+
"data-scope": "chip",
|
|
19
|
+
"data-part": "root",
|
|
20
|
+
get ["data-tone"]() {
|
|
21
|
+
return own.tone ?? "ink";
|
|
22
|
+
},
|
|
23
|
+
get ["data-variant"]() {
|
|
24
|
+
return own.variant ?? "solid";
|
|
25
|
+
}
|
|
26
|
+
}), false, true);
|
|
27
|
+
insert(_el$, (() => {
|
|
28
|
+
var _c$ = memo(() => !!(own.max != null && own.value > own.max));
|
|
29
|
+
return () => _c$() ? `${own.max}+` : String(own.value);
|
|
30
|
+
})());
|
|
31
|
+
return _el$;
|
|
32
|
+
})();
|
|
35
33
|
});
|
|
36
|
-
//#endregion
|
|
37
34
|
export { Chip };
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { ClientOnly as ClientOnly$1, ClientOnlyProps } from "@ark-ui/solid/client-only";
|
|
2
|
-
//#region src/components/client-only/index.d.ts
|
|
3
2
|
export declare const ClientOnly: typeof ClientOnly$1 & {
|
|
4
3
|
Root: typeof ClientOnly$1;
|
|
5
4
|
};
|
|
6
|
-
//#endregion
|
|
7
5
|
export type { ClientOnlyProps };
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { n as withSelfRoot } from "../../family-
|
|
1
|
+
import { n as withSelfRoot } from "../../family-B5HtE0on.mjs";
|
|
2
2
|
import { ClientOnly as ClientOnly$1 } from "@ark-ui/solid/client-only";
|
|
3
|
-
|
|
3
|
+
// src/components/client-only/index.ts
|
|
4
4
|
/** Render children on the client only, after hydration — the escape
|
|
5
5
|
* hatch for browser-only widgets inside server-rendered pages. Headless,
|
|
6
6
|
* like the rest of Ark's utilities: no visual layer of our own. */
|
|
7
7
|
const ClientOnly = withSelfRoot(ClientOnly$1);
|
|
8
|
-
//#endregion
|
|
9
8
|
export { ClientOnly };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Clipboard as Clipboard$1, ClipboardRootProps } from "@ark-ui/solid/clipboard";
|
|
2
|
-
//#region src/components/clipboard/index.d.ts
|
|
3
2
|
/** Ark's Clipboard, dressed in the paper-and-ink system: a hairline value
|
|
4
3
|
* field beside an icon-sized copy trigger whose ink turns bamboo while the
|
|
5
4
|
* copy is confirmed. The API is Ark's own — Root, Label, Control, Input,
|
|
@@ -26,4 +25,4 @@ declare function ClipboardFacade(props: ClipboardFacadeProps): import("solid-js"
|
|
|
26
25
|
export declare const Clipboard: typeof ClipboardFacade & Omit<typeof Clipboard$1, "Root"> & {
|
|
27
26
|
Root: typeof ClipboardRoot;
|
|
28
27
|
};
|
|
29
|
-
|
|
28
|
+
export {};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { t as defineFamily } from "../../family-
|
|
2
|
-
import { r as iconNode } from "../../icon-
|
|
3
|
-
import { t as useElementId } from "../../id-
|
|
4
|
-
import { createComponent, memo, mergeProps } from "
|
|
1
|
+
import { t as defineFamily } from "../../family-B5HtE0on.mjs";
|
|
2
|
+
import { r as iconNode } from "../../icon-DQqYA2fO.mjs";
|
|
3
|
+
import { t as useElementId } from "../../id-DGvz-2rQ.mjs";
|
|
4
|
+
import { createComponent, memo, mergeProps } from "solid-js/web";
|
|
5
5
|
import { injectComponentStyle } from "@bysages/core/styling";
|
|
6
6
|
import { splitProps } from "solid-js";
|
|
7
7
|
import { Clipboard as Clipboard$1 } from "@ark-ui/solid/clipboard";
|
|
8
|
-
|
|
8
|
+
// src/components/clipboard/index.tsx
|
|
9
9
|
const ArkRoot = Clipboard$1.Root;
|
|
10
10
|
function ClipboardRoot(props) {
|
|
11
11
|
const [own, rest] = splitProps(props, ["size"]);
|
|
@@ -14,7 +14,7 @@ function ClipboardRoot(props) {
|
|
|
14
14
|
get id() {
|
|
15
15
|
return id();
|
|
16
16
|
},
|
|
17
|
-
get "data-size"() {
|
|
17
|
+
get ["data-size"]() {
|
|
18
18
|
return own.size ?? "md";
|
|
19
19
|
}
|
|
20
20
|
}));
|
|
@@ -29,18 +29,12 @@ function ClipboardFacade(props) {
|
|
|
29
29
|
get defaultValue() {
|
|
30
30
|
return props.defaultValue;
|
|
31
31
|
}
|
|
32
|
-
}, () => {
|
|
33
|
-
return props.value === void 0 ? {} : { value: props.value };
|
|
34
|
-
}, {
|
|
32
|
+
}, () => props.value === void 0 ? {} : { value: props.value }, {
|
|
35
33
|
onValueChange: (details) => props.onValueChange?.(details.value),
|
|
36
34
|
get children() {
|
|
37
|
-
return [memo(() => {
|
|
38
|
-
return
|
|
39
|
-
|
|
40
|
-
})() ? createComponent(Clipboard$1.Label, { get children() {
|
|
41
|
-
return props.label;
|
|
42
|
-
} }) : null;
|
|
43
|
-
}), createComponent(Clipboard$1.Control, { get children() {
|
|
35
|
+
return [memo(() => memo(() => !!props.label)() ? createComponent(Clipboard$1.Label, { get children() {
|
|
36
|
+
return props.label;
|
|
37
|
+
} }) : null), createComponent(Clipboard$1.Control, { get children() {
|
|
44
38
|
return [createComponent(Clipboard$1.Input, {
|
|
45
39
|
get placeholder() {
|
|
46
40
|
return props.placeholder;
|
|
@@ -78,5 +72,4 @@ const Clipboard = defineFamily(ClipboardFacade, {
|
|
|
78
72
|
Root: ClipboardRoot
|
|
79
73
|
});
|
|
80
74
|
injectComponentStyle("clipboard");
|
|
81
|
-
//#endregion
|
|
82
75
|
export { Clipboard };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ComponentProps, JSX } from "solid-js";
|
|
2
2
|
import { Collapsible as Collapsible$1 } from "@ark-ui/solid/collapsible";
|
|
3
|
-
//#region src/components/collapsible/index.d.ts
|
|
4
3
|
/** Ark's Collapsible, dressed in the paper-and-ink system: one control on
|
|
5
4
|
* the paper, its panel dissolving open to the machine's measured height.
|
|
6
5
|
* The API is Ark's own — Root, Trigger, Content, Indicator. */
|
|
@@ -18,4 +17,4 @@ type CollapsibleParts = Omit<typeof Collapsible$1, "Root"> & {
|
|
|
18
17
|
Root: typeof CollapsibleRoot;
|
|
19
18
|
};
|
|
20
19
|
export declare const Collapsible: typeof CollapsibleFacade & CollapsibleParts;
|
|
21
|
-
|
|
20
|
+
export {};
|