@sprawlify/solid 0.0.19 → 0.0.21
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/accordion-anatomy-LuKj41ZJ.d.ts +2 -0
- package/dist/accordion-anatomy-o_xoA0Gf.js +3 -0
- package/dist/angle-slider-anatomy-BD5b55Bt.d.ts +2 -0
- package/dist/angle-slider-anatomy-wS0r05BJ.js +3 -0
- package/dist/avatar-anatomy-CSxGcJN_.js +3 -0
- package/dist/avatar-anatomy-DLMajwZs.d.ts +2 -0
- package/dist/bottom-sheet-anatomy-3kADPmIs.js +3 -0
- package/dist/bottom-sheet-anatomy-BCF96W4Y.d.ts +2 -0
- package/dist/carousel-anatomy-Ch6LtSfE.d.ts +6 -0
- package/dist/carousel-anatomy-qgnwv0TQ.js +7 -0
- package/dist/checkbox-anatomy-CiduuF8h.d.ts +6 -0
- package/dist/checkbox-anatomy-D0IYQC5y.js +7 -0
- package/dist/clipboard-anatomy-DIutBwme.d.ts +2 -0
- package/dist/clipboard-anatomy-bgEYg52s.js +3 -0
- package/dist/{collapsible-ACshHp__.js → collapsible-D_07zDrL.js} +9 -10
- package/dist/collapsible-anatomy-BnKium1r.d.ts +2 -0
- package/dist/collapsible-anatomy-DWYi0ZA_.js +3 -0
- package/dist/{collapsible-CKkCMXuJ.jsx → collapsible-hi2814tq.jsx} +8 -8
- package/dist/{collection-DpPs7_vA.jsx → collection--IEeSstQ.jsx} +2 -2
- package/dist/{collection-CJLbf7-L.js → collection--s4jM1D5.js} +2 -2
- package/dist/color-picker-anatomy-BpZRoIAN.js +7 -0
- package/dist/color-picker-anatomy-DbyNbKb9.d.ts +6 -0
- package/dist/combobox-anatomy-BfeX-80l.d.ts +6 -0
- package/dist/combobox-anatomy-DvY6g9hK.js +7 -0
- package/dist/components/accordion/index.d.ts +13 -12
- package/dist/components/accordion/index.js +10 -10
- package/dist/components/accordion/index.jsx +9 -9
- package/dist/components/anatomy.d.ts +51 -0
- package/dist/components/anatomy.js +53 -0
- package/dist/components/angle-slider/index.d.ts +15 -14
- package/dist/components/angle-slider/index.js +8 -8
- package/dist/components/angle-slider/index.jsx +7 -7
- package/dist/components/avatar/index.d.ts +10 -9
- package/dist/components/avatar/index.js +8 -8
- package/dist/components/avatar/index.jsx +7 -7
- package/dist/components/bottom-sheet/index.d.ts +15 -14
- package/dist/components/bottom-sheet/index.js +11 -11
- package/dist/components/bottom-sheet/index.jsx +10 -10
- package/dist/components/carousel/index.d.ts +16 -19
- package/dist/components/carousel/index.js +8 -12
- package/dist/components/carousel/index.jsx +7 -7
- package/dist/components/checkbox/index.d.ts +13 -16
- package/dist/components/checkbox/index.js +13 -15
- package/dist/components/checkbox/index.jsx +10 -10
- package/dist/components/clipboard/index.d.ts +13 -12
- package/dist/components/clipboard/index.js +8 -8
- package/dist/components/clipboard/index.jsx +7 -7
- package/dist/components/collapsible/index.d.ts +12 -11
- package/dist/components/collapsible/index.js +8 -7
- package/dist/components/collapsible/index.jsx +7 -7
- package/dist/components/collection/index.d.ts +2 -2
- package/dist/components/collection/index.js +2 -2
- package/dist/components/collection/index.jsx +2 -2
- package/dist/components/color-picker/index.d.ts +35 -38
- package/dist/components/color-picker/index.js +16 -17
- package/dist/components/color-picker/index.jsx +12 -12
- package/dist/components/combobox/index.d.ts +22 -25
- package/dist/components/combobox/index.js +16 -18
- package/dist/components/combobox/index.jsx +13 -13
- package/dist/components/date-picker/index.d.ts +32 -35
- package/dist/components/date-picker/index.js +12 -15
- package/dist/components/date-picker/index.jsx +10 -10
- package/dist/components/dialog/index.d.ts +15 -14
- package/dist/components/dialog/index.js +11 -11
- package/dist/components/dialog/index.jsx +10 -10
- package/dist/components/download-trigger/index.d.ts +2 -2
- package/dist/components/download-trigger/index.js +4 -4
- package/dist/components/download-trigger/index.jsx +4 -4
- package/dist/components/editable/index.d.ts +16 -15
- package/dist/components/editable/index.js +13 -11
- package/dist/components/editable/index.jsx +10 -10
- package/dist/components/field/index.d.ts +14 -17
- package/dist/components/field/index.js +10 -8
- package/dist/components/field/index.jsx +8 -8
- package/dist/components/fieldset/index.d.ts +11 -14
- package/dist/components/fieldset/index.js +8 -7
- package/dist/components/fieldset/index.jsx +7 -7
- package/dist/components/file-upload/index.d.ts +20 -19
- package/dist/components/file-upload/index.js +13 -11
- package/dist/components/file-upload/index.jsx +10 -10
- package/dist/components/floating-panel/index.d.ts +19 -18
- package/dist/components/floating-panel/index.js +11 -11
- package/dist/components/floating-panel/index.jsx +10 -10
- package/dist/components/focus-trap/index.d.ts +2 -2
- package/dist/components/focus-trap/index.js +4 -4
- package/dist/components/focus-trap/index.jsx +4 -4
- package/dist/components/format/index.d.ts +4 -4
- package/dist/components/format/index.js +3 -3
- package/dist/components/format/index.jsx +3 -3
- package/dist/components/frame/index.d.ts +1 -1
- package/dist/components/frame/index.js +3 -3
- package/dist/components/frame/index.jsx +3 -3
- package/dist/components/highlight/index.d.ts +3 -3
- package/dist/components/highlight/index.js +2 -2
- package/dist/components/highlight/index.jsx +2 -2
- package/dist/components/hover-card/index.d.ts +13 -12
- package/dist/components/hover-card/index.js +11 -11
- package/dist/components/hover-card/index.jsx +10 -10
- package/dist/components/image-cropper/index.d.ts +13 -12
- package/dist/components/image-cropper/index.js +9 -8
- package/dist/components/image-cropper/index.jsx +7 -7
- package/dist/components/json-tree-view/index.d.ts +6 -6
- package/dist/components/json-tree-view/index.js +10 -10
- package/dist/components/json-tree-view/index.jsx +10 -10
- package/dist/components/listbox/index.d.ts +17 -20
- package/dist/components/listbox/index.js +9 -13
- package/dist/components/listbox/index.jsx +8 -8
- package/dist/components/marquee/index.d.ts +11 -10
- package/dist/components/marquee/index.js +8 -8
- package/dist/components/marquee/index.jsx +7 -7
- package/dist/components/menu/index.d.ts +27 -26
- package/dist/components/menu/index.js +11 -11
- package/dist/components/menu/index.jsx +10 -10
- package/dist/components/navigation-menu/index.d.ts +19 -18
- package/dist/components/navigation-menu/index.js +11 -11
- package/dist/components/navigation-menu/index.jsx +10 -10
- package/dist/components/number-input/index.d.ts +15 -14
- package/dist/components/number-input/index.js +13 -11
- package/dist/components/number-input/index.jsx +10 -10
- package/dist/components/pagination/index.d.ts +14 -13
- package/dist/components/pagination/index.js +8 -8
- package/dist/components/pagination/index.jsx +7 -7
- package/dist/components/password-input/index.d.ts +11 -10
- package/dist/components/password-input/index.js +13 -11
- package/dist/components/password-input/index.jsx +10 -10
- package/dist/components/pin-input/index.d.ts +12 -11
- package/dist/components/pin-input/index.js +13 -11
- package/dist/components/pin-input/index.jsx +10 -10
- package/dist/components/popover/index.d.ts +18 -17
- package/dist/components/popover/index.js +11 -11
- package/dist/components/popover/index.jsx +10 -10
- package/dist/components/presence/index.d.ts +4 -4
- package/dist/components/presence/index.js +7 -7
- package/dist/components/presence/index.jsx +7 -7
- package/dist/components/progress/index.d.ts +16 -15
- package/dist/components/progress/index.js +8 -8
- package/dist/components/progress/index.jsx +7 -7
- package/dist/components/qr-code/index.d.ts +12 -11
- package/dist/components/qr-code/index.js +8 -8
- package/dist/components/qr-code/index.jsx +7 -7
- package/dist/components/radio-group/index.d.ts +14 -13
- package/dist/components/radio-group/index.js +11 -10
- package/dist/components/radio-group/index.jsx +9 -9
- package/dist/components/rating-group/index.d.ts +12 -11
- package/dist/components/rating-group/index.js +13 -11
- package/dist/components/rating-group/index.jsx +10 -10
- package/dist/components/scroll-area/index.d.ts +13 -12
- package/dist/components/scroll-area/index.js +7 -7
- package/dist/components/scroll-area/index.jsx +6 -6
- package/dist/components/segment-group/index.d.ts +13 -16
- package/dist/components/segment-group/index.js +8 -13
- package/dist/components/segment-group/index.jsx +7 -7
- package/dist/components/select/index.d.ts +24 -23
- package/dist/components/select/index.js +16 -14
- package/dist/components/select/index.jsx +13 -13
- package/dist/components/signature-pad/index.d.ts +70 -0
- package/dist/components/signature-pad/index.js +185 -0
- package/dist/components/signature-pad/index.jsx +156 -0
- package/dist/components/slider/index.d.ts +90 -0
- package/dist/components/slider/index.js +210 -0
- package/dist/components/slider/index.jsx +196 -0
- package/dist/components/splitter/index.d.ts +55 -0
- package/dist/components/splitter/index.js +133 -0
- package/dist/components/splitter/index.jsx +122 -0
- package/dist/components/steps/index.d.ts +102 -0
- package/dist/components/steps/index.js +218 -0
- package/dist/components/steps/index.jsx +203 -0
- package/dist/components/switch/index.d.ts +60 -0
- package/dist/components/switch/index.js +142 -0
- package/dist/components/switch/index.jsx +131 -0
- package/dist/components/tabs/index.d.ts +61 -0
- package/dist/components/tabs/index.js +161 -0
- package/dist/components/tabs/index.jsx +137 -0
- package/dist/components/tags-input/index.d.ts +99 -0
- package/dist/components/tags-input/index.js +251 -0
- package/dist/components/tags-input/index.jsx +234 -0
- package/dist/components/timer/index.d.ts +65 -0
- package/dist/components/timer/index.js +132 -0
- package/dist/components/timer/index.jsx +123 -0
- package/dist/components/toast/index.d.ts +63 -0
- package/dist/components/toast/index.js +134 -0
- package/dist/components/toast/index.jsx +118 -0
- package/dist/components/toggle/index.d.ts +38 -0
- package/dist/components/toggle/index.js +81 -0
- package/dist/components/toggle/index.jsx +71 -0
- package/dist/components/toggle-group/index.d.ts +45 -0
- package/dist/components/toggle-group/index.js +97 -0
- package/dist/components/toggle-group/index.jsx +90 -0
- package/dist/components/tooltip/index.d.ts +71 -0
- package/dist/components/tooltip/index.js +171 -0
- package/dist/components/tooltip/index.jsx +139 -0
- package/dist/components/tour/index.d.ts +106 -0
- package/dist/components/tour/index.js +258 -0
- package/dist/components/tour/index.jsx +196 -0
- package/dist/components/tree-view/index.d.ts +7 -6
- package/dist/components/tree-view/index.js +10 -9
- package/dist/components/tree-view/index.jsx +9 -9
- package/dist/date-picker-anatomy-DgrVN3G8.js +7 -0
- package/dist/date-picker-anatomy-b46nMEZN.d.ts +6 -0
- package/dist/dialog-anatomy-Bw3Zw-Sk.d.ts +2 -0
- package/dist/dialog-anatomy-MGSvHVHZ.js +3 -0
- package/dist/editable-anatomy-B3_vixL9.js +3 -0
- package/dist/editable-anatomy-Ds52botR.d.ts +2 -0
- package/dist/{factory-JAbO6zq9.d.ts → factory-47nL1bn3.d.ts} +1 -4
- package/dist/{factory-Cw0jOohn.js → factory-CRBABr3I.js} +1 -1
- package/dist/{factory-CaQWQo9S.jsx → factory-CWJejsJ5.jsx} +1 -1
- package/dist/factory-CpgiPRji.d.ts +16 -0
- package/dist/{field-CF9yh37t.js → field-BCordac5.js} +10 -15
- package/dist/{field-HJX3--SZ.jsx → field-NgZys4GU.jsx} +8 -8
- package/dist/field-anatomy-C7JDIxYF.d.ts +6 -0
- package/dist/field-anatomy-CbZd-AfX.js +8 -0
- package/dist/{fieldset-GRdimTgu.jsx → fieldset-CnzvSH3P.jsx} +8 -8
- package/dist/{fieldset-QCHS-iMi.js → fieldset-DQmh-Ktv.js} +10 -15
- package/dist/fieldset-anatomy-BBa9WoaP.js +8 -0
- package/dist/fieldset-anatomy-BJXQ98fR.d.ts +6 -0
- package/dist/file-upload-anatomy-BLwYqz4f.js +3 -0
- package/dist/file-upload-anatomy-CZLamYyS.d.ts +2 -0
- package/dist/floating-panel-anatomy-DAwu9cP2.d.ts +2 -0
- package/dist/floating-panel-anatomy-DdzzXyoS.js +3 -0
- package/dist/hover-card-anatomy-BJZ9YpS5.d.ts +2 -0
- package/dist/hover-card-anatomy-DB-eZzNF.js +3 -0
- package/dist/image-cropper-anatomy-B4J-qCPo.js +3 -0
- package/dist/image-cropper-anatomy-Cm1QxL0W.d.ts +2 -0
- package/dist/{index-BGVwqZq5.d.ts → index-BEeuO-R1.d.ts} +20 -20
- package/dist/{index-BIlfNQle.d.ts → index-BrCCjQgv.d.ts} +2 -2
- package/dist/{index-PYTR4Rcx.d.ts → index-C6xlgM7v.d.ts} +22 -22
- package/dist/index-CkYyW1zB.d.ts +23 -0
- package/dist/{index-BRkEGZOE.d.ts → index-DFppBh2T.d.ts} +2 -2
- package/dist/{index-CWs-F296.d.ts → index-DX1BMhgw.d.ts} +7 -7
- package/dist/{index-CXTRMyIJ.d.ts → index-DfYcUadF.d.ts} +1 -1
- package/dist/{index-DD3lUYha.d.ts → index-Ds5KmW7H.d.ts} +8 -8
- package/dist/index-SHPRZOqK.d.ts +14 -0
- package/dist/index-k6GG_NQV.d.ts +76 -0
- package/dist/index.d.ts +5 -5
- package/dist/index.js +5 -5
- package/dist/index.jsx +5 -5
- package/dist/listbox-anatomy-CUR4zqGi.d.ts +6 -0
- package/dist/listbox-anatomy-Cp0Sg16v.js +7 -0
- package/dist/marquee-anatomy-VZnfKxxg.js +3 -0
- package/dist/marquee-anatomy-oa1gn_nx.d.ts +2 -0
- package/dist/menu-anatomy-C7nmgGfd.js +3 -0
- package/dist/menu-anatomy-Yex6fsPC.d.ts +2 -0
- package/dist/navigation-menu-anatomy-COzWk1C_.js +3 -0
- package/dist/navigation-menu-anatomy-Dfg6aSrU.d.ts +2 -0
- package/dist/number-input-anatomy-DlxJhB02.js +3 -0
- package/dist/number-input-anatomy-DsdB6-Mz.d.ts +2 -0
- package/dist/pagination-anatomy-CFKd-0pG.d.ts +2 -0
- package/dist/pagination-anatomy-DxmOWDig.js +3 -0
- package/dist/password-input-anatomy-D0kCe_JJ.js +3 -0
- package/dist/password-input-anatomy-DDNW5_5q.d.ts +2 -0
- package/dist/pin-input-anatomy--9FMYbY_.d.ts +2 -0
- package/dist/pin-input-anatomy-BEIU-Y30.js +3 -0
- package/dist/popover-anatomy-B2SFhoUT.js +3 -0
- package/dist/popover-anatomy-C0MzJZ3B.d.ts +2 -0
- package/dist/{presence-DghVNXji.js → presence-NuziQqqg.js} +7 -7
- package/dist/{presence-w97672yk.jsx → presence-ZCUJRZyo.jsx} +7 -7
- package/dist/progress-anatomy-BrjbAgaZ.d.ts +2 -0
- package/dist/progress-anatomy-hBCAAkqh.js +3 -0
- package/dist/{providers--4jSRiKF.jsx → providers-DsPqz7EL.jsx} +2 -2
- package/dist/{providers-DU0gn4Pj.js → providers-PrTpHfBr.js} +2 -2
- package/dist/qr-code-anatomy-BGfk37hp.d.ts +2 -0
- package/dist/qr-code-anatomy-uajXqPRf.js +3 -0
- package/dist/radio-group-anatomy-B1UQnu0f.d.ts +2 -0
- package/dist/radio-group-anatomy-C74Bceji.js +3 -0
- package/dist/rating-group-anatomy-ARHgMm5d.js +3 -0
- package/dist/rating-group-anatomy-DETUNHP0.d.ts +2 -0
- package/dist/render-strategy-DZynJsi2.d.ts +9 -0
- package/dist/{render-strategy-CDrX5Nbw.js → render-strategy-U4x7_Ist.js} +2 -2
- package/dist/{render-strategy-Bv1Mb0YK.jsx → render-strategy-_PhwzAgZ.jsx} +2 -2
- package/dist/scroll-area-anatomy-DbGNdc9h.js +3 -0
- package/dist/scroll-area-anatomy-DpNDBTCh.d.ts +2 -0
- package/dist/segment-group-anatomy-B1__vwFf.d.ts +6 -0
- package/dist/segment-group-anatomy-B5fYMn2x.js +8 -0
- package/dist/select-anatomy-C-C6kOOF.d.ts +2 -0
- package/dist/select-anatomy-D-hDwjng.js +3 -0
- package/dist/signature-pad-anatomy-BPRzD8r2.js +3 -0
- package/dist/signature-pad-anatomy-DmdvoOSX.d.ts +2 -0
- package/dist/slider-anatomy-BhIPuHNN.d.ts +2 -0
- package/dist/slider-anatomy-KVOUw4Rb.js +3 -0
- package/dist/splitter-anatomy-BONfxWi-.d.ts +2 -0
- package/dist/splitter-anatomy-D6AP25Kw.js +3 -0
- package/dist/steps-anatomy-DIg2DYw-.d.ts +2 -0
- package/dist/steps-anatomy-DadglyM4.js +3 -0
- package/dist/switch-anatomy-B9kSLgdn.d.ts +2 -0
- package/dist/switch-anatomy-dc2hdWBY.js +3 -0
- package/dist/tabs-anatomy-CHgCEJsD.js +3 -0
- package/dist/tabs-anatomy-nslgxs56.d.ts +2 -0
- package/dist/tags-input-anatomy-BLnjypXf.d.ts +2 -0
- package/dist/tags-input-anatomy-DeQcN1NX.js +3 -0
- package/dist/timer-anatomy-C7PWvKv1.d.ts +2 -0
- package/dist/timer-anatomy-UMWybMgG.js +3 -0
- package/dist/toast-anatomy-DLI_UJyj.js +3 -0
- package/dist/toast-anatomy-DPPfbzb8.d.ts +2 -0
- package/dist/toggle-anatomy-CBNs2JYD.d.ts +6 -0
- package/dist/toggle-anatomy-Tvx2zJXX.js +8 -0
- package/dist/toggle-group-anatomy-CzlIeJrP.js +3 -0
- package/dist/toggle-group-anatomy-D0bmgEEb.d.ts +2 -0
- package/dist/tooltip-anatomy-bM3dzYCm.js +3 -0
- package/dist/tooltip-anatomy-dy8p3xbe.d.ts +2 -0
- package/dist/tour-anatomy-ZOIiV784.d.ts +6 -0
- package/dist/tour-anatomy-dw8E6e1m.js +7 -0
- package/dist/{tree-view-Z565ZOf5.jsx → tree-view-Bd-Avra8.jsx} +9 -9
- package/dist/tree-view-anatomy-DCvheYGf.js +3 -0
- package/dist/tree-view-anatomy-DNpQsIjf.d.ts +2 -0
- package/dist/{tree-view-DdWaaT-E.js → tree-view-dpzsuFjQ.js} +10 -11
- package/dist/types-BuJXW13N.d.ts +9 -0
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.js +2 -2
- package/dist/utils/index.jsx +2 -2
- package/package.json +72 -2
- /package/dist/{chunk-D5dGY5zD.jsx → chunk-DGaS4lLa.js} +0 -0
- /package/dist/{chunk-Dcpub2IO.js → chunk-DLIiRulR.jsx} +0 -0
- /package/dist/{compose-refs-D9EoLzZW.js → compose-refs-11PIsxEa.jsx} +0 -0
- /package/dist/{compose-refs-DhhUBbcq.jsx → compose-refs-Chr9AtC3.js} +0 -0
- /package/dist/{core-7JOW6ue9.jsx → core-BgpRwoCt.jsx} +0 -0
- /package/dist/{core-D7Nb-duK.js → core-DlJdnFMg.js} +0 -0
- /package/dist/{create-context-BxYEOGb8.js → create-context-BpJ2IzPB.jsx} +0 -0
- /package/dist/{create-context-CnA1wNMK.jsx → create-context-BqG72mig.js} +0 -0
- /package/dist/{create-split-props-CdETNVwB.jsx → create-split-props-8J9EAVSk.jsx} +0 -0
- /package/dist/{create-split-props-u4BuKc2i.js → create-split-props-L9BbhhCg.js} +0 -0
- /package/dist/{index-BF_h-dhb.d.ts → index-5ET6GeB1.d.ts} +0 -0
- /package/dist/{index-tbMcVIMv.d.ts → index-B3_OUYsI.d.ts} +0 -0
- /package/dist/{render-strategy-BYpcY4CF.d.ts → render-strategy-C62CF-LT.d.ts} +0 -0
- /package/dist/{run-if-fn-B-2chXMn.js → run-if-fn-COsqwaBZ.js} +0 -0
- /package/dist/{run-if-fn-D59uI-12.jsx → run-if-fn-D55yVu32.jsx} +0 -0
- /package/dist/{types-DPhuMU2R.d.ts → types-BDfyh3uz.d.ts} +0 -0
- /package/dist/{utils-CM1Hmr0J.js → utils-Bq8C05Rs.jsx} +0 -0
- /package/dist/{utils-DWEfyavN.jsx → utils-Djg7j5f9.js} +0 -0
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
import { t as __export } from "../../chunk-DLIiRulR.jsx";
|
|
2
|
+
import { i as useMachine, n as normalizeProps, r as mergeProps$1 } from "../../core-BgpRwoCt.jsx";
|
|
3
|
+
import { t as runIfFn } from "../../run-if-fn-D55yVu32.jsx";
|
|
4
|
+
import { t as createContext$1 } from "../../create-context-BpJ2IzPB.jsx";
|
|
5
|
+
import { i as useLocaleContext, o as useEnvironmentContext } from "../../providers-DsPqz7EL.jsx";
|
|
6
|
+
import { t as sprawlify } from "../../factory-CWJejsJ5.jsx";
|
|
7
|
+
import { t as createSplitProps } from "../../create-split-props-8J9EAVSk.jsx";
|
|
8
|
+
import { createMemo, createUniqueId } from "solid-js";
|
|
9
|
+
import * as steps from "@sprawlify/primitives/machines/steps";
|
|
10
|
+
import { anatomy as stepsAnatomy } from "@sprawlify/primitives/machines/steps";
|
|
11
|
+
|
|
12
|
+
//#region src/components/steps/use-steps-context.ts
|
|
13
|
+
const [StepsProvider, useStepsContext] = createContext$1({
|
|
14
|
+
hookName: "useStepsContext",
|
|
15
|
+
providerName: "<StepsProvider />"
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
//#endregion
|
|
19
|
+
//#region src/components/steps/steps-completed-content.tsx
|
|
20
|
+
const StepsCompletedContent = (props) => {
|
|
21
|
+
const steps$1 = useStepsContext();
|
|
22
|
+
const mergedProps = mergeProps$1(() => steps$1().getContentProps({ index: steps$1().count }), props);
|
|
23
|
+
return <sprawlify.div {...mergedProps} />;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
//#endregion
|
|
27
|
+
//#region src/components/steps/steps-content.tsx
|
|
28
|
+
const StepsContent = (props) => {
|
|
29
|
+
const [itemProps, localProps] = createSplitProps()(props, ["index"]);
|
|
30
|
+
const steps$1 = useStepsContext();
|
|
31
|
+
const mergedProps = mergeProps$1(() => steps$1().getContentProps(itemProps), localProps);
|
|
32
|
+
return <sprawlify.div {...mergedProps} />;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
//#endregion
|
|
36
|
+
//#region src/components/steps/steps-context.tsx
|
|
37
|
+
const StepsContext = (props) => {
|
|
38
|
+
const context = useStepsContext();
|
|
39
|
+
return props.children(context);
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
//#endregion
|
|
43
|
+
//#region src/components/steps/use-steps-item-props-context.ts
|
|
44
|
+
const [StepsItemPropsProvider, useStepsItemPropsContext] = createContext$1({
|
|
45
|
+
hookName: "useStepsItemPropsContext",
|
|
46
|
+
providerName: "<StepsItemPropsProvider />"
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
//#endregion
|
|
50
|
+
//#region src/components/steps/steps-indicator.tsx
|
|
51
|
+
const StepsIndicator = (props) => {
|
|
52
|
+
const steps$1 = useStepsContext();
|
|
53
|
+
const itemProps = useStepsItemPropsContext();
|
|
54
|
+
const mergedProps = mergeProps$1(() => steps$1().getIndicatorProps(itemProps), props);
|
|
55
|
+
return <sprawlify.div {...mergedProps} />;
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
//#endregion
|
|
59
|
+
//#region src/components/steps/use-steps-item-context.ts
|
|
60
|
+
const [StepsItemProvider, useStepsItemContext] = createContext$1({
|
|
61
|
+
hookName: "useStepsItemContext",
|
|
62
|
+
providerName: "<StepsItem />"
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
//#endregion
|
|
66
|
+
//#region src/components/steps/steps-item.tsx
|
|
67
|
+
const StepsItem = (props) => {
|
|
68
|
+
const [itemProps, localProps] = createSplitProps()(props, ["index"]);
|
|
69
|
+
const steps$1 = useStepsContext();
|
|
70
|
+
const mergedProps = mergeProps$1(() => steps$1().getItemProps(itemProps), localProps);
|
|
71
|
+
const itemState = createMemo(() => steps$1().getItemState(itemProps));
|
|
72
|
+
return <StepsItemPropsProvider value={itemProps}>
|
|
73
|
+
<StepsItemProvider value={itemState}>
|
|
74
|
+
<sprawlify.div {...mergedProps} />
|
|
75
|
+
</StepsItemProvider>
|
|
76
|
+
</StepsItemPropsProvider>;
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
//#endregion
|
|
80
|
+
//#region src/components/steps/steps-item-context.tsx
|
|
81
|
+
const StepsItemContext = (props) => {
|
|
82
|
+
return props.children(useStepsItemContext());
|
|
83
|
+
};
|
|
84
|
+
StepsItemContext.displayName = "StepsItemContext";
|
|
85
|
+
|
|
86
|
+
//#endregion
|
|
87
|
+
//#region src/components/steps/steps-list.tsx
|
|
88
|
+
const StepsList = (props) => {
|
|
89
|
+
const steps$1 = useStepsContext();
|
|
90
|
+
const mergedProps = mergeProps$1(() => steps$1().getListProps(), props);
|
|
91
|
+
return <sprawlify.div {...mergedProps} />;
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
//#endregion
|
|
95
|
+
//#region src/components/steps/steps-next-trigger.tsx
|
|
96
|
+
const StepsNextTrigger = (props) => {
|
|
97
|
+
const steps$1 = useStepsContext();
|
|
98
|
+
const mergedProps = mergeProps$1(() => steps$1().getNextTriggerProps(), props);
|
|
99
|
+
return <sprawlify.button {...mergedProps} />;
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
//#endregion
|
|
103
|
+
//#region src/components/steps/steps-prev-trigger.tsx
|
|
104
|
+
const StepsPrevTrigger = (props) => {
|
|
105
|
+
const steps$1 = useStepsContext();
|
|
106
|
+
const mergedProps = mergeProps$1(() => steps$1().getPrevTriggerProps(), props);
|
|
107
|
+
return <sprawlify.button {...mergedProps} />;
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
//#endregion
|
|
111
|
+
//#region src/components/steps/steps-progress.tsx
|
|
112
|
+
const StepsProgress = (props) => {
|
|
113
|
+
const steps$1 = useStepsContext();
|
|
114
|
+
const mergedProps = mergeProps$1(() => steps$1().getProgressProps(), props);
|
|
115
|
+
return <sprawlify.div {...mergedProps} />;
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
//#endregion
|
|
119
|
+
//#region src/components/steps/use-steps.ts
|
|
120
|
+
function useSteps(props) {
|
|
121
|
+
const id = createUniqueId();
|
|
122
|
+
const environment = useEnvironmentContext();
|
|
123
|
+
const locale = useLocaleContext();
|
|
124
|
+
const machineProps = createMemo(() => ({
|
|
125
|
+
id,
|
|
126
|
+
dir: locale().dir,
|
|
127
|
+
getRootNode: environment().getRootNode,
|
|
128
|
+
...runIfFn(props)
|
|
129
|
+
}));
|
|
130
|
+
const service = useMachine(steps.machine, machineProps);
|
|
131
|
+
return createMemo(() => steps.connect(service, normalizeProps));
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
//#endregion
|
|
135
|
+
//#region src/components/steps/steps-root.tsx
|
|
136
|
+
const StepsRoot = (props) => {
|
|
137
|
+
const [useStepsProps, localProps] = createSplitProps()(props, [
|
|
138
|
+
"defaultStep",
|
|
139
|
+
"id",
|
|
140
|
+
"ids",
|
|
141
|
+
"count",
|
|
142
|
+
"linear",
|
|
143
|
+
"onStepChange",
|
|
144
|
+
"onStepComplete",
|
|
145
|
+
"orientation",
|
|
146
|
+
"step"
|
|
147
|
+
]);
|
|
148
|
+
const steps$1 = useSteps(useStepsProps);
|
|
149
|
+
const mergedProps = mergeProps$1(() => steps$1().getRootProps(), localProps);
|
|
150
|
+
return <StepsProvider value={steps$1}>
|
|
151
|
+
<sprawlify.div {...mergedProps} />
|
|
152
|
+
</StepsProvider>;
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
//#endregion
|
|
156
|
+
//#region src/components/steps/steps-root-provider.tsx
|
|
157
|
+
const StepsRootProvider = (props) => {
|
|
158
|
+
const [{ value: steps$1 }, rootProps] = createSplitProps()(props, ["value"]);
|
|
159
|
+
const mergedProps = mergeProps$1(() => steps$1().getRootProps(), rootProps);
|
|
160
|
+
return <StepsProvider value={steps$1}>
|
|
161
|
+
<sprawlify.div {...mergedProps}>{props.children}</sprawlify.div>
|
|
162
|
+
</StepsProvider>;
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
//#endregion
|
|
166
|
+
//#region src/components/steps/steps-separator.tsx
|
|
167
|
+
const StepsSeparator = (props) => {
|
|
168
|
+
const steps$1 = useStepsContext();
|
|
169
|
+
const itemProps = useStepsItemPropsContext();
|
|
170
|
+
const mergedProps = mergeProps$1(() => steps$1().getSeparatorProps(itemProps), props);
|
|
171
|
+
return <sprawlify.div {...mergedProps} />;
|
|
172
|
+
};
|
|
173
|
+
|
|
174
|
+
//#endregion
|
|
175
|
+
//#region src/components/steps/steps-trigger.tsx
|
|
176
|
+
const StepsTrigger = (props) => {
|
|
177
|
+
const steps$1 = useStepsContext();
|
|
178
|
+
const itemProps = useStepsItemPropsContext();
|
|
179
|
+
const mergedProps = mergeProps$1(() => steps$1().getTriggerProps(itemProps), props);
|
|
180
|
+
return <sprawlify.button {...mergedProps} />;
|
|
181
|
+
};
|
|
182
|
+
|
|
183
|
+
//#endregion
|
|
184
|
+
//#region src/components/steps/steps.ts
|
|
185
|
+
var steps_exports = /* @__PURE__ */ __export({
|
|
186
|
+
CompletedContent: () => StepsCompletedContent,
|
|
187
|
+
Content: () => StepsContent,
|
|
188
|
+
Context: () => StepsContext,
|
|
189
|
+
Indicator: () => StepsIndicator,
|
|
190
|
+
Item: () => StepsItem,
|
|
191
|
+
ItemContext: () => StepsItemContext,
|
|
192
|
+
List: () => StepsList,
|
|
193
|
+
NextTrigger: () => StepsNextTrigger,
|
|
194
|
+
PrevTrigger: () => StepsPrevTrigger,
|
|
195
|
+
Progress: () => StepsProgress,
|
|
196
|
+
Root: () => StepsRoot,
|
|
197
|
+
RootProvider: () => StepsRootProvider,
|
|
198
|
+
Separator: () => StepsSeparator,
|
|
199
|
+
Trigger: () => StepsTrigger
|
|
200
|
+
});
|
|
201
|
+
|
|
202
|
+
//#endregion
|
|
203
|
+
export { steps_exports as Steps, StepsCompletedContent, StepsContent, StepsContext, StepsIndicator, StepsItem, StepsItemContext, StepsList, StepsNextTrigger, StepsPrevTrigger, StepsProgress, StepsRoot, StepsRootProvider, StepsSeparator, StepsTrigger, stepsAnatomy, useSteps, useStepsContext, useStepsItemContext };
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { n as PropTypes } from "../../index-CkYyW1zB.js";
|
|
2
|
+
import { i as Optional, n as MaybeAccessor } from "../../types-BDfyh3uz.js";
|
|
3
|
+
import { r as PolymorphicProps, t as HTMLProps } from "../../factory-47nL1bn3.js";
|
|
4
|
+
import { t as switchAnatomy } from "../../switch-anatomy-B9kSLgdn.js";
|
|
5
|
+
import * as solid_js153 from "solid-js";
|
|
6
|
+
import { Accessor, JSX } from "solid-js";
|
|
7
|
+
import * as zagSwitch from "@sprawlify/primitives/machines/switch";
|
|
8
|
+
import { CheckedChangeDetails, CheckedChangeDetails as SwitchCheckedChangeDetails } from "@sprawlify/primitives/machines/switch";
|
|
9
|
+
|
|
10
|
+
//#region src/components/switch/use-switch.d.ts
|
|
11
|
+
interface UseSwitchProps extends Optional<Omit<zagSwitch.Props, 'dir' | 'getRootNode'>, 'id'> {}
|
|
12
|
+
interface UseSwitchReturn extends Accessor<zagSwitch.Api<PropTypes>> {}
|
|
13
|
+
declare const useSwitch: (props?: MaybeAccessor<UseSwitchProps>) => UseSwitchReturn;
|
|
14
|
+
//#endregion
|
|
15
|
+
//#region src/components/switch/use-switch-context.d.ts
|
|
16
|
+
interface UseSwitchContext extends UseSwitchReturn {}
|
|
17
|
+
//#endregion
|
|
18
|
+
//#region src/components/switch/switch-context.d.ts
|
|
19
|
+
interface SwitchContextProps {
|
|
20
|
+
children: (context: UseSwitchContext) => JSX.Element;
|
|
21
|
+
}
|
|
22
|
+
declare const SwitchContext: (props: SwitchContextProps) => JSX.Element;
|
|
23
|
+
//#endregion
|
|
24
|
+
//#region src/components/switch/switch-control.d.ts
|
|
25
|
+
interface SwitchControlBaseProps extends PolymorphicProps<'span'> {}
|
|
26
|
+
interface SwitchControlProps extends HTMLProps<'span'>, SwitchControlBaseProps {}
|
|
27
|
+
declare const SwitchControl: (props: SwitchControlProps) => solid_js153.JSX.Element;
|
|
28
|
+
//#endregion
|
|
29
|
+
//#region src/components/switch/switch-hidden-input.d.ts
|
|
30
|
+
interface SwitchHiddenInputBaseProps extends PolymorphicProps<'input'> {}
|
|
31
|
+
interface SwitchHiddenInputProps extends HTMLProps<'input'>, SwitchHiddenInputBaseProps {}
|
|
32
|
+
declare const SwitchHiddenInput: (props: SwitchHiddenInputProps) => solid_js153.JSX.Element;
|
|
33
|
+
//#endregion
|
|
34
|
+
//#region src/components/switch/switch-label.d.ts
|
|
35
|
+
interface SwitchLabelBaseProps extends PolymorphicProps<'span'> {}
|
|
36
|
+
interface SwitchLabelProps extends HTMLProps<'span'>, SwitchLabelBaseProps {}
|
|
37
|
+
declare const SwitchLabel: (props: SwitchLabelProps) => solid_js153.JSX.Element;
|
|
38
|
+
//#endregion
|
|
39
|
+
//#region src/components/switch/switch-root.d.ts
|
|
40
|
+
interface SwitchRootBaseProps extends UseSwitchProps, PolymorphicProps<'label'> {}
|
|
41
|
+
interface SwitchRootProps extends HTMLProps<'label'>, SwitchRootBaseProps {}
|
|
42
|
+
declare const SwitchRoot: (props: SwitchRootProps) => solid_js153.JSX.Element;
|
|
43
|
+
//#endregion
|
|
44
|
+
//#region src/components/switch/switch-root-provider.d.ts
|
|
45
|
+
interface RootProviderProps {
|
|
46
|
+
value: UseSwitchReturn;
|
|
47
|
+
}
|
|
48
|
+
interface SwitchRootProviderBaseProps extends PolymorphicProps<'label'> {}
|
|
49
|
+
interface SwitchRootProviderProps extends HTMLProps<'label'>, RootProviderProps, SwitchRootProviderBaseProps {}
|
|
50
|
+
declare const SwitchRootProvider: (props: SwitchRootProviderProps) => solid_js153.JSX.Element;
|
|
51
|
+
//#endregion
|
|
52
|
+
//#region src/components/switch/switch-thumb.d.ts
|
|
53
|
+
interface SwitchThumbBaseProps extends PolymorphicProps<'span'> {}
|
|
54
|
+
interface SwitchThumbProps extends HTMLProps<'span'>, SwitchThumbBaseProps {}
|
|
55
|
+
declare const SwitchThumb: (props: SwitchThumbProps) => solid_js153.JSX.Element;
|
|
56
|
+
declare namespace switch_d_exports {
|
|
57
|
+
export { CheckedChangeDetails, SwitchContext as Context, SwitchContextProps as ContextProps, SwitchControl as Control, SwitchControlBaseProps as ControlBaseProps, SwitchControlProps as ControlProps, SwitchHiddenInput as HiddenInput, SwitchHiddenInputBaseProps as HiddenInputBaseProps, SwitchHiddenInputProps as HiddenInputProps, SwitchLabel as Label, SwitchLabelBaseProps as LabelBaseProps, SwitchLabelProps as LabelProps, SwitchRoot as Root, SwitchRootBaseProps as RootBaseProps, SwitchRootProps as RootProps, SwitchRootProvider as RootProvider, SwitchRootProviderBaseProps as RootProviderBaseProps, SwitchRootProviderProps as RootProviderProps, SwitchThumb as Thumb, SwitchThumbBaseProps as ThumbBaseProps, SwitchThumbProps as ThumbProps };
|
|
58
|
+
}
|
|
59
|
+
//#endregion
|
|
60
|
+
export { switch_d_exports as Switch, type SwitchCheckedChangeDetails, SwitchContext, type SwitchContextProps, SwitchControl, type SwitchControlBaseProps, type SwitchControlProps, SwitchHiddenInput, type SwitchHiddenInputBaseProps, type SwitchHiddenInputProps, SwitchLabel, type SwitchLabelBaseProps, type SwitchLabelProps, SwitchRoot, type SwitchRootBaseProps, type SwitchRootProps, SwitchRootProvider, type SwitchRootProviderBaseProps, type SwitchRootProviderProps, SwitchThumb, type SwitchThumbBaseProps, type SwitchThumbProps, type UseSwitchContext, type UseSwitchProps, type UseSwitchReturn, switchAnatomy, useSwitch, useSwitchContext };
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { t as __export } from "../../chunk-DGaS4lLa.js";
|
|
2
|
+
import { i as useMachine, n as normalizeProps, r as mergeProps$2 } from "../../core-DlJdnFMg.js";
|
|
3
|
+
import { t as runIfFn } from "../../run-if-fn-COsqwaBZ.js";
|
|
4
|
+
import { t as createContext$1 } from "../../create-context-BqG72mig.js";
|
|
5
|
+
import { i as useLocaleContext, o as useEnvironmentContext } from "../../providers-PrTpHfBr.js";
|
|
6
|
+
import { t as sprawlify } from "../../factory-CRBABr3I.js";
|
|
7
|
+
import "../../field-anatomy-CbZd-AfX.js";
|
|
8
|
+
import "../../fieldset-anatomy-BBa9WoaP.js";
|
|
9
|
+
import { t as switchAnatomy } from "../../switch-anatomy-dc2hdWBY.js";
|
|
10
|
+
import { t as createSplitProps } from "../../create-split-props-L9BbhhCg.js";
|
|
11
|
+
import "../../compose-refs-Chr9AtC3.js";
|
|
12
|
+
import "../../fieldset-DQmh-Ktv.js";
|
|
13
|
+
import { p as useFieldContext } from "../../field-BCordac5.js";
|
|
14
|
+
import { createMemo, createUniqueId } from "solid-js";
|
|
15
|
+
import { createComponent, mergeProps as mergeProps$1 } from "solid-js/web";
|
|
16
|
+
import * as zagSwitch from "@sprawlify/primitives/machines/switch";
|
|
17
|
+
|
|
18
|
+
//#region src/components/switch/use-switch-context.ts
|
|
19
|
+
const [SwitchProvider, useSwitchContext] = createContext$1({
|
|
20
|
+
hookName: "useSwitchContext",
|
|
21
|
+
providerName: "<SwitchProvider />"
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
//#endregion
|
|
25
|
+
//#region src/components/switch/switch-context.tsx
|
|
26
|
+
const SwitchContext = (props) => props.children(useSwitchContext());
|
|
27
|
+
|
|
28
|
+
//#endregion
|
|
29
|
+
//#region src/components/switch/switch-control.tsx
|
|
30
|
+
const SwitchControl = (props) => {
|
|
31
|
+
const api = useSwitchContext();
|
|
32
|
+
const mergedProps = mergeProps$2(() => api().getControlProps(), props);
|
|
33
|
+
return createComponent(sprawlify.span, mergedProps);
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
//#endregion
|
|
37
|
+
//#region src/components/switch/switch-hidden-input.tsx
|
|
38
|
+
const SwitchHiddenInput = (props) => {
|
|
39
|
+
const api = useSwitchContext();
|
|
40
|
+
const mergedProps = mergeProps$2(() => api().getHiddenInputProps(), props);
|
|
41
|
+
const field = useFieldContext();
|
|
42
|
+
return createComponent(sprawlify.input, mergeProps$1({ get ["aria-describedby"]() {
|
|
43
|
+
return field?.().ariaDescribedby;
|
|
44
|
+
} }, mergedProps));
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
//#endregion
|
|
48
|
+
//#region src/components/switch/switch-label.tsx
|
|
49
|
+
const SwitchLabel = (props) => {
|
|
50
|
+
const api = useSwitchContext();
|
|
51
|
+
const mergedProps = mergeProps$2(() => api().getLabelProps(), props);
|
|
52
|
+
return createComponent(sprawlify.span, mergedProps);
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
//#endregion
|
|
56
|
+
//#region src/components/switch/use-switch.ts
|
|
57
|
+
const useSwitch = (props) => {
|
|
58
|
+
const id = createUniqueId();
|
|
59
|
+
const locale = useLocaleContext();
|
|
60
|
+
const environment = useEnvironmentContext();
|
|
61
|
+
const field = useFieldContext();
|
|
62
|
+
const machineProps = createMemo(() => ({
|
|
63
|
+
id,
|
|
64
|
+
ids: {
|
|
65
|
+
label: field?.().ids.label,
|
|
66
|
+
hiddenInput: field?.().ids.control
|
|
67
|
+
},
|
|
68
|
+
disabled: field?.().disabled,
|
|
69
|
+
readOnly: field?.().readOnly,
|
|
70
|
+
invalid: field?.().invalid,
|
|
71
|
+
required: field?.().required,
|
|
72
|
+
dir: locale().dir,
|
|
73
|
+
getRootNode: environment().getRootNode,
|
|
74
|
+
...runIfFn(props)
|
|
75
|
+
}));
|
|
76
|
+
const service = useMachine(zagSwitch.machine, machineProps);
|
|
77
|
+
return createMemo(() => zagSwitch.connect(service, normalizeProps));
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
//#endregion
|
|
81
|
+
//#region src/components/switch/switch-root.tsx
|
|
82
|
+
const SwitchRoot = (props) => {
|
|
83
|
+
const [switchProps, localProps] = createSplitProps()(props, [
|
|
84
|
+
"checked",
|
|
85
|
+
"defaultChecked",
|
|
86
|
+
"disabled",
|
|
87
|
+
"form",
|
|
88
|
+
"id",
|
|
89
|
+
"ids",
|
|
90
|
+
"invalid",
|
|
91
|
+
"label",
|
|
92
|
+
"name",
|
|
93
|
+
"onCheckedChange",
|
|
94
|
+
"readOnly",
|
|
95
|
+
"required",
|
|
96
|
+
"value"
|
|
97
|
+
]);
|
|
98
|
+
const api = useSwitch(switchProps);
|
|
99
|
+
const mergedProps = mergeProps$2(() => api().getRootProps(), localProps);
|
|
100
|
+
return createComponent(SwitchProvider, {
|
|
101
|
+
value: api,
|
|
102
|
+
get children() {
|
|
103
|
+
return createComponent(sprawlify.label, mergedProps);
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
//#endregion
|
|
109
|
+
//#region src/components/switch/switch-root-provider.tsx
|
|
110
|
+
const SwitchRootProvider = (props) => {
|
|
111
|
+
const [{ value: api }, localProps] = createSplitProps()(props, ["value"]);
|
|
112
|
+
const mergedProps = mergeProps$2(() => api().getRootProps(), localProps);
|
|
113
|
+
return createComponent(SwitchProvider, {
|
|
114
|
+
value: api,
|
|
115
|
+
get children() {
|
|
116
|
+
return createComponent(sprawlify.label, mergedProps);
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
//#endregion
|
|
122
|
+
//#region src/components/switch/switch-thumb.tsx
|
|
123
|
+
const SwitchThumb = (props) => {
|
|
124
|
+
const api = useSwitchContext();
|
|
125
|
+
const mergedProps = mergeProps$2(() => api().getThumbProps(), props);
|
|
126
|
+
return createComponent(sprawlify.span, mergedProps);
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
//#endregion
|
|
130
|
+
//#region src/components/switch/switch.ts
|
|
131
|
+
var switch_exports = /* @__PURE__ */ __export({
|
|
132
|
+
Context: () => SwitchContext,
|
|
133
|
+
Control: () => SwitchControl,
|
|
134
|
+
HiddenInput: () => SwitchHiddenInput,
|
|
135
|
+
Label: () => SwitchLabel,
|
|
136
|
+
Root: () => SwitchRoot,
|
|
137
|
+
RootProvider: () => SwitchRootProvider,
|
|
138
|
+
Thumb: () => SwitchThumb
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
//#endregion
|
|
142
|
+
export { switch_exports as Switch, SwitchContext, SwitchControl, SwitchHiddenInput, SwitchLabel, SwitchRoot, SwitchRootProvider, SwitchThumb, switchAnatomy, useSwitch, useSwitchContext };
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { t as __export } from "../../chunk-DLIiRulR.jsx";
|
|
2
|
+
import { i as useMachine, n as normalizeProps, r as mergeProps$1 } from "../../core-BgpRwoCt.jsx";
|
|
3
|
+
import { t as runIfFn } from "../../run-if-fn-D55yVu32.jsx";
|
|
4
|
+
import { t as createContext$1 } from "../../create-context-BpJ2IzPB.jsx";
|
|
5
|
+
import { i as useLocaleContext, o as useEnvironmentContext } from "../../providers-DsPqz7EL.jsx";
|
|
6
|
+
import { t as sprawlify } from "../../factory-CWJejsJ5.jsx";
|
|
7
|
+
import { t as createSplitProps } from "../../create-split-props-8J9EAVSk.jsx";
|
|
8
|
+
import "../../compose-refs-11PIsxEa.jsx";
|
|
9
|
+
import "../../fieldset-CnzvSH3P.jsx";
|
|
10
|
+
import { m as useFieldContext } from "../../field-NgZys4GU.jsx";
|
|
11
|
+
import { createMemo, createUniqueId } from "solid-js";
|
|
12
|
+
import * as zagSwitch from "@sprawlify/primitives/machines/switch";
|
|
13
|
+
import { anatomy as switchAnatomy } from "@sprawlify/primitives/machines/switch";
|
|
14
|
+
|
|
15
|
+
//#region src/components/switch/use-switch-context.ts
|
|
16
|
+
const [SwitchProvider, useSwitchContext] = createContext$1({
|
|
17
|
+
hookName: "useSwitchContext",
|
|
18
|
+
providerName: "<SwitchProvider />"
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
//#endregion
|
|
22
|
+
//#region src/components/switch/switch-context.tsx
|
|
23
|
+
const SwitchContext = (props) => props.children(useSwitchContext());
|
|
24
|
+
|
|
25
|
+
//#endregion
|
|
26
|
+
//#region src/components/switch/switch-control.tsx
|
|
27
|
+
const SwitchControl = (props) => {
|
|
28
|
+
const api = useSwitchContext();
|
|
29
|
+
const mergedProps = mergeProps$1(() => api().getControlProps(), props);
|
|
30
|
+
return <sprawlify.span {...mergedProps} />;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
//#endregion
|
|
34
|
+
//#region src/components/switch/switch-hidden-input.tsx
|
|
35
|
+
const SwitchHiddenInput = (props) => {
|
|
36
|
+
const api = useSwitchContext();
|
|
37
|
+
const mergedProps = mergeProps$1(() => api().getHiddenInputProps(), props);
|
|
38
|
+
const field = useFieldContext();
|
|
39
|
+
return <sprawlify.input aria-describedby={field?.().ariaDescribedby} {...mergedProps} />;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
//#endregion
|
|
43
|
+
//#region src/components/switch/switch-label.tsx
|
|
44
|
+
const SwitchLabel = (props) => {
|
|
45
|
+
const api = useSwitchContext();
|
|
46
|
+
const mergedProps = mergeProps$1(() => api().getLabelProps(), props);
|
|
47
|
+
return <sprawlify.span {...mergedProps} />;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
//#endregion
|
|
51
|
+
//#region src/components/switch/use-switch.ts
|
|
52
|
+
const useSwitch = (props) => {
|
|
53
|
+
const id = createUniqueId();
|
|
54
|
+
const locale = useLocaleContext();
|
|
55
|
+
const environment = useEnvironmentContext();
|
|
56
|
+
const field = useFieldContext();
|
|
57
|
+
const machineProps = createMemo(() => ({
|
|
58
|
+
id,
|
|
59
|
+
ids: {
|
|
60
|
+
label: field?.().ids.label,
|
|
61
|
+
hiddenInput: field?.().ids.control
|
|
62
|
+
},
|
|
63
|
+
disabled: field?.().disabled,
|
|
64
|
+
readOnly: field?.().readOnly,
|
|
65
|
+
invalid: field?.().invalid,
|
|
66
|
+
required: field?.().required,
|
|
67
|
+
dir: locale().dir,
|
|
68
|
+
getRootNode: environment().getRootNode,
|
|
69
|
+
...runIfFn(props)
|
|
70
|
+
}));
|
|
71
|
+
const service = useMachine(zagSwitch.machine, machineProps);
|
|
72
|
+
return createMemo(() => zagSwitch.connect(service, normalizeProps));
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
//#endregion
|
|
76
|
+
//#region src/components/switch/switch-root.tsx
|
|
77
|
+
const SwitchRoot = (props) => {
|
|
78
|
+
const [switchProps, localProps] = createSplitProps()(props, [
|
|
79
|
+
"checked",
|
|
80
|
+
"defaultChecked",
|
|
81
|
+
"disabled",
|
|
82
|
+
"form",
|
|
83
|
+
"id",
|
|
84
|
+
"ids",
|
|
85
|
+
"invalid",
|
|
86
|
+
"label",
|
|
87
|
+
"name",
|
|
88
|
+
"onCheckedChange",
|
|
89
|
+
"readOnly",
|
|
90
|
+
"required",
|
|
91
|
+
"value"
|
|
92
|
+
]);
|
|
93
|
+
const api = useSwitch(switchProps);
|
|
94
|
+
const mergedProps = mergeProps$1(() => api().getRootProps(), localProps);
|
|
95
|
+
return <SwitchProvider value={api}>
|
|
96
|
+
<sprawlify.label {...mergedProps} />
|
|
97
|
+
</SwitchProvider>;
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
//#endregion
|
|
101
|
+
//#region src/components/switch/switch-root-provider.tsx
|
|
102
|
+
const SwitchRootProvider = (props) => {
|
|
103
|
+
const [{ value: api }, localProps] = createSplitProps()(props, ["value"]);
|
|
104
|
+
const mergedProps = mergeProps$1(() => api().getRootProps(), localProps);
|
|
105
|
+
return <SwitchProvider value={api}>
|
|
106
|
+
<sprawlify.label {...mergedProps} />
|
|
107
|
+
</SwitchProvider>;
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
//#endregion
|
|
111
|
+
//#region src/components/switch/switch-thumb.tsx
|
|
112
|
+
const SwitchThumb = (props) => {
|
|
113
|
+
const api = useSwitchContext();
|
|
114
|
+
const mergedProps = mergeProps$1(() => api().getThumbProps(), props);
|
|
115
|
+
return <sprawlify.span {...mergedProps} />;
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
//#endregion
|
|
119
|
+
//#region src/components/switch/switch.ts
|
|
120
|
+
var switch_exports = /* @__PURE__ */ __export({
|
|
121
|
+
Context: () => SwitchContext,
|
|
122
|
+
Control: () => SwitchControl,
|
|
123
|
+
HiddenInput: () => SwitchHiddenInput,
|
|
124
|
+
Label: () => SwitchLabel,
|
|
125
|
+
Root: () => SwitchRoot,
|
|
126
|
+
RootProvider: () => SwitchRootProvider,
|
|
127
|
+
Thumb: () => SwitchThumb
|
|
128
|
+
});
|
|
129
|
+
|
|
130
|
+
//#endregion
|
|
131
|
+
export { switch_exports as Switch, SwitchContext, SwitchControl, SwitchHiddenInput, SwitchLabel, SwitchRoot, SwitchRootProvider, SwitchThumb, switchAnatomy, useSwitch, useSwitchContext };
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { n as PropTypes } from "../../index-CkYyW1zB.js";
|
|
2
|
+
import { i as Optional, n as MaybeAccessor, t as Assign } from "../../types-BDfyh3uz.js";
|
|
3
|
+
import { r as PolymorphicProps, t as HTMLProps } from "../../factory-47nL1bn3.js";
|
|
4
|
+
import { t as RenderStrategyProps } from "../../render-strategy-DZynJsi2.js";
|
|
5
|
+
import { t as tabsAnatomy } from "../../tabs-anatomy-nslgxs56.js";
|
|
6
|
+
import * as solid_js371 from "solid-js";
|
|
7
|
+
import { Accessor, JSX } from "solid-js";
|
|
8
|
+
import * as tabs from "@sprawlify/primitives/machines/tabs";
|
|
9
|
+
import { ContentProps, FocusChangeDetails, FocusChangeDetails as TabsFocusChangeDetails, TriggerProps, ValueChangeDetails, ValueChangeDetails as TabsValueChangeDetails } from "@sprawlify/primitives/machines/tabs";
|
|
10
|
+
|
|
11
|
+
//#region src/components/tabs/tab-content.d.ts
|
|
12
|
+
interface TabContentBaseProps extends ContentProps, PolymorphicProps<'div'> {}
|
|
13
|
+
interface TabContentProps extends HTMLProps<'div'>, TabContentBaseProps {}
|
|
14
|
+
declare const TabContent: (props: TabContentProps) => solid_js371.JSX.Element;
|
|
15
|
+
//#endregion
|
|
16
|
+
//#region src/components/tabs/tab-indicator.d.ts
|
|
17
|
+
interface TabIndicatorBaseProps extends PolymorphicProps<'div'> {}
|
|
18
|
+
interface TabIndicatorProps extends HTMLProps<'div'>, TabIndicatorBaseProps {}
|
|
19
|
+
declare const TabIndicator: (props: TabIndicatorProps) => solid_js371.JSX.Element;
|
|
20
|
+
//#endregion
|
|
21
|
+
//#region src/components/tabs/tab-list.d.ts
|
|
22
|
+
interface TabListBaseProps extends PolymorphicProps<'div'> {}
|
|
23
|
+
interface TabListProps extends HTMLProps<'div'>, TabListBaseProps {}
|
|
24
|
+
declare const TabList: (props: TabListProps) => solid_js371.JSX.Element;
|
|
25
|
+
//#endregion
|
|
26
|
+
//#region src/components/tabs/tab-trigger.d.ts
|
|
27
|
+
interface TabTriggerBaseProps extends TriggerProps, PolymorphicProps<'button'> {}
|
|
28
|
+
interface TabTriggerProps extends Assign<HTMLProps<'button'>, TabTriggerBaseProps> {}
|
|
29
|
+
declare const TabTrigger: (props: TabTriggerProps) => solid_js371.JSX.Element;
|
|
30
|
+
//#endregion
|
|
31
|
+
//#region src/components/tabs/use-tabs.d.ts
|
|
32
|
+
interface UseTabsProps extends Optional<Omit<tabs.Props, 'dir' | 'getRootNode'>, 'id'> {}
|
|
33
|
+
interface UseTabsReturn extends Accessor<tabs.Api<PropTypes>> {}
|
|
34
|
+
declare const useTabs: (props?: MaybeAccessor<UseTabsProps>) => UseTabsReturn;
|
|
35
|
+
//#endregion
|
|
36
|
+
//#region src/components/tabs/use-tabs-context.d.ts
|
|
37
|
+
interface UseTabsContext extends UseTabsReturn {}
|
|
38
|
+
//#endregion
|
|
39
|
+
//#region src/components/tabs/tabs-context.d.ts
|
|
40
|
+
interface TabsContextProps {
|
|
41
|
+
children: (context: UseTabsContext) => JSX.Element;
|
|
42
|
+
}
|
|
43
|
+
declare const TabsContext: (props: TabsContextProps) => JSX.Element;
|
|
44
|
+
//#endregion
|
|
45
|
+
//#region src/components/tabs/tabs-root.d.ts
|
|
46
|
+
interface TabsRootBaseProps extends UseTabsProps, RenderStrategyProps, PolymorphicProps<'div'> {}
|
|
47
|
+
interface TabsRootProps extends HTMLProps<'div'>, TabsRootBaseProps {}
|
|
48
|
+
declare const TabsRoot: (props: TabsRootProps) => solid_js371.JSX.Element;
|
|
49
|
+
//#endregion
|
|
50
|
+
//#region src/components/tabs/tabs-root-provider.d.ts
|
|
51
|
+
interface RootProviderProps {
|
|
52
|
+
value: UseTabsReturn;
|
|
53
|
+
}
|
|
54
|
+
interface TabsRootProviderBaseProps extends RootProviderProps, RenderStrategyProps, PolymorphicProps<'div'> {}
|
|
55
|
+
interface TabsRootProviderProps extends HTMLProps<'div'>, TabsRootProviderBaseProps {}
|
|
56
|
+
declare const TabsRootProvider: (props: TabsRootProviderProps) => solid_js371.JSX.Element;
|
|
57
|
+
declare namespace tabs_d_exports {
|
|
58
|
+
export { TabContent as Content, TabContentBaseProps as ContentBaseProps, TabContentProps as ContentProps, TabsContext as Context, TabsContextProps as ContextProps, FocusChangeDetails, TabIndicator as Indicator, TabIndicatorBaseProps as IndicatorBaseProps, TabIndicatorProps as IndicatorProps, TabList as List, TabListBaseProps as ListBaseProps, TabListProps as ListProps, TabsRoot as Root, TabsRootBaseProps as RootBaseProps, TabsRootProps as RootProps, TabsRootProvider as RootProvider, TabsRootProviderBaseProps as RootProviderBaseProps, TabsRootProviderProps as RootProviderProps, TabTrigger as Trigger, TabTriggerBaseProps as TriggerBaseProps, TabTriggerProps as TriggerProps, ValueChangeDetails };
|
|
59
|
+
}
|
|
60
|
+
//#endregion
|
|
61
|
+
export { TabContent, type TabContentBaseProps, type TabContentProps, TabIndicator, type TabIndicatorBaseProps, type TabIndicatorProps, TabList, type TabListBaseProps, type TabListProps, TabTrigger, type TabTriggerBaseProps, type TabTriggerProps, tabs_d_exports as Tabs, TabsContext, type TabsContextProps, type TabsFocusChangeDetails, TabsRoot, type TabsRootBaseProps, type TabsRootProps, TabsRootProvider, type TabsRootProviderBaseProps, type TabsRootProviderProps, type TabsValueChangeDetails, type UseTabsContext, type UseTabsProps, type UseTabsReturn, tabsAnatomy, useTabs, useTabsContext };
|