@sprawlify/solid 0.0.18 → 0.0.20
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-BQWRlsZA.d.ts +6 -0
- package/dist/carousel-anatomy-qgnwv0TQ.js +7 -0
- package/dist/checkbox-anatomy-C0imZUAW.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-BT7AHLQr.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-14K1NkX_.jsx → collapsible-hi2814tq.jsx} +8 -8
- package/dist/{collection-CIXQG-Ne.jsx → collection--IEeSstQ.jsx} +2 -2
- package/dist/{collection-BVSLJ8Vb.js → collection--s4jM1D5.js} +2 -2
- package/dist/color-picker-anatomy-BpZRoIAN.js +7 -0
- package/dist/color-picker-anatomy-C_D7Q3pP.d.ts +6 -0
- package/dist/combobox-anatomy-D4OuryoU.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 +4 -4
- 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 +80 -0
- package/dist/components/progress/index.js +163 -0
- package/dist/components/progress/index.jsx +154 -0
- package/dist/components/qr-code/index.d.ts +60 -0
- package/dist/components/qr-code/index.js +124 -0
- package/dist/components/qr-code/index.jsx +117 -0
- package/dist/components/radio-group/index.d.ts +79 -0
- package/dist/components/radio-group/index.js +190 -0
- package/dist/components/radio-group/index.jsx +176 -0
- package/dist/components/rating-group/index.d.ts +69 -0
- package/dist/components/rating-group/index.js +161 -0
- package/dist/components/rating-group/index.jsx +148 -0
- package/dist/components/scroll-area/index.d.ts +64 -0
- package/dist/components/scroll-area/index.js +134 -0
- package/dist/components/scroll-area/index.jsx +124 -0
- package/dist/components/segment-group/index.d.ts +79 -0
- package/dist/components/segment-group/index.js +180 -0
- package/dist/components/segment-group/index.jsx +172 -0
- 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-DAOTTYvh.d.ts +6 -0
- package/dist/date-picker-anatomy-DgrVN3G8.js +7 -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-srnAQg4A.d.ts → factory-47nL1bn3.d.ts} +1 -4
- package/dist/{factory-k8EbNZ7r.js → factory-CRBABr3I.js} +1 -1
- package/dist/{factory-BIJk1mK6.jsx → factory-CWJejsJ5.jsx} +1 -1
- package/dist/factory-CpgiPRji.d.ts +16 -0
- package/dist/{field-CZv3v7K-.js → field-BCordac5.js} +10 -15
- package/dist/{field-CtkmPUb0.jsx → field-NgZys4GU.jsx} +8 -8
- package/dist/field-anatomy-BgbxvZjw.d.ts +6 -0
- package/dist/field-anatomy-CbZd-AfX.js +8 -0
- package/dist/{fieldset-aYQsMWX2.jsx → fieldset-CnzvSH3P.jsx} +8 -8
- package/dist/{fieldset-B2nK8dL5.js → fieldset-DQmh-Ktv.js} +10 -15
- package/dist/fieldset-anatomy-BBa9WoaP.js +8 -0
- package/dist/fieldset-anatomy-CRM45oos.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-Dl22eiVf.d.ts → index-0MuoYCPp.d.ts} +20 -20
- package/dist/{index-Dqmtlqpz.d.ts → index-BYed87Fh.d.ts} +22 -22
- package/dist/{index-utxtRaDW.d.ts → index-CefJ3Mlu.d.ts} +2 -2
- package/dist/index-CkYyW1zB.d.ts +23 -0
- package/dist/{index-DylIyeqd.d.ts → index-Cxus87ws.d.ts} +8 -8
- package/dist/{index-w0NPbRP3.d.ts → index-CyfxegK0.d.ts} +8 -8
- package/dist/{index-BwthXhaG.d.ts → index-DfYcUadF.d.ts} +1 -1
- package/dist/index-SHPRZOqK.d.ts +14 -0
- package/dist/index-k6GG_NQV.d.ts +76 -0
- package/dist/index-puD7Bj_r.d.ts +41 -0
- package/dist/index.d.ts +5 -5
- package/dist/index.js +5 -5
- package/dist/index.jsx +5 -5
- package/dist/listbox-anatomy-Cp0Sg16v.js +7 -0
- package/dist/listbox-anatomy-D_Ty5FBV.d.ts +6 -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-Clrs1hmS.js → presence-NuziQqqg.js} +7 -7
- package/dist/{presence-H4-8_5_s.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-C6VPiSrB.jsx → providers-DsPqz7EL.jsx} +2 -2
- package/dist/{providers-DgUckEdb.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-BlHCR8sl.js → render-strategy-U4x7_Ist.js} +2 -2
- package/dist/{render-strategy-KJFIjVVG.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-B5fYMn2x.js +8 -0
- package/dist/segment-group-anatomy-ByucVeII.d.ts +6 -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-CYe5EO2_.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-LglmO8ZE.d.ts +6 -0
- package/dist/tour-anatomy-dw8E6e1m.js +7 -0
- package/dist/{tree-view-DJgvku6y.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-CyvT0V14.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 +107 -7
- /package/dist/{chunk-BJ7z6UrO.jsx → chunk-DGaS4lLa.js} +0 -0
- /package/dist/{chunk-Bn8mXcTA.js → chunk-DLIiRulR.jsx} +0 -0
- /package/dist/{compose-refs-Cp4AShsY.jsx → compose-refs-11PIsxEa.jsx} +0 -0
- /package/dist/{compose-refs-tCBI7PRJ.js → compose-refs-Chr9AtC3.js} +0 -0
- /package/dist/{core-CRjuRw95.js → core-BgpRwoCt.jsx} +0 -0
- /package/dist/{core-C_FYj4uc.jsx → core-DlJdnFMg.js} +0 -0
- /package/dist/{create-context-BwqlrMqL.jsx → create-context-BpJ2IzPB.jsx} +0 -0
- /package/dist/{create-context-DlXBVMoq.js → create-context-BqG72mig.js} +0 -0
- /package/dist/{create-split-props-BHmgTHSf.js → create-split-props-8J9EAVSk.jsx} +0 -0
- /package/dist/{create-split-props-CKwjjjkD.jsx → create-split-props-L9BbhhCg.js} +0 -0
- /package/dist/{index-DiANe65S.d.ts → index-5ET6GeB1.d.ts} +0 -0
- /package/dist/{index-BLALA3BS.d.ts → index-B3_OUYsI.d.ts} +0 -0
- /package/dist/{render-strategy-BmTDUy3U.d.ts → render-strategy-C62CF-LT.d.ts} +0 -0
- /package/dist/{run-if-fn-C80kt4dU.js → run-if-fn-COsqwaBZ.js} +0 -0
- /package/dist/{run-if-fn-CrJzzDIM.jsx → run-if-fn-D55yVu32.jsx} +0 -0
- /package/dist/{types-mGUbKy2h.d.ts → types-BDfyh3uz.d.ts} +0 -0
- /package/dist/{utils-DSmVDqW7.js → utils-Bq8C05Rs.jsx} +0 -0
- /package/dist/{utils-DhhcJyG-.jsx → utils-Djg7j5f9.js} +0 -0
|
@@ -0,0 +1,124 @@
|
|
|
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 { t as qrCodeAnatomy } from "../../qr-code-anatomy-uajXqPRf.js";
|
|
8
|
+
import { t as createSplitProps } from "../../create-split-props-L9BbhhCg.js";
|
|
9
|
+
import { createMemo, createUniqueId } from "solid-js";
|
|
10
|
+
import { createComponent } from "solid-js/web";
|
|
11
|
+
import * as qrCode from "@sprawlify/primitives/machines/qr-code";
|
|
12
|
+
|
|
13
|
+
//#region src/components/qr-code/use-qr-code-context.ts
|
|
14
|
+
const [QrCodeProvider, useQrCodeContext] = createContext$1({
|
|
15
|
+
hookName: "useQrCodeContext",
|
|
16
|
+
providerName: "<QrCodeProvider />"
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
//#endregion
|
|
20
|
+
//#region src/components/qr-code/qr-code-context.ts
|
|
21
|
+
const QrCodeContext = (props) => props.children(useQrCodeContext());
|
|
22
|
+
|
|
23
|
+
//#endregion
|
|
24
|
+
//#region src/components/qr-code/qr-code-download-trigger.tsx
|
|
25
|
+
const QrCodeDownloadTrigger = (props) => {
|
|
26
|
+
const [downloadTriggerProps, localProps] = createSplitProps()(props, [
|
|
27
|
+
"fileName",
|
|
28
|
+
"mimeType",
|
|
29
|
+
"quality"
|
|
30
|
+
]);
|
|
31
|
+
const qrCode$1 = useQrCodeContext();
|
|
32
|
+
const mergedProps = mergeProps$2(() => qrCode$1().getDownloadTriggerProps(downloadTriggerProps), localProps);
|
|
33
|
+
return createComponent(sprawlify.button, mergedProps);
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
//#endregion
|
|
37
|
+
//#region src/components/qr-code/qr-code-frame.tsx
|
|
38
|
+
const QrCodeFrame = (props) => {
|
|
39
|
+
const qrCode$1 = useQrCodeContext();
|
|
40
|
+
const mergedProps = mergeProps$2(() => qrCode$1().getFrameProps(), props);
|
|
41
|
+
return createComponent(sprawlify.svg, mergedProps);
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
//#endregion
|
|
45
|
+
//#region src/components/qr-code/qr-code-overlay.tsx
|
|
46
|
+
const QrCodeOverlay = (props) => {
|
|
47
|
+
const qrCode$1 = useQrCodeContext();
|
|
48
|
+
const mergedProps = mergeProps$2(() => qrCode$1().getOverlayProps(), props);
|
|
49
|
+
return createComponent(sprawlify.div, mergedProps);
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
//#endregion
|
|
53
|
+
//#region src/components/qr-code/qr-code-pattern.tsx
|
|
54
|
+
const QrCodePattern = (props) => {
|
|
55
|
+
const qrCode$1 = useQrCodeContext();
|
|
56
|
+
const mergedProps = mergeProps$2(() => qrCode$1().getPatternProps(), props);
|
|
57
|
+
return createComponent(sprawlify.path, mergedProps);
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
//#endregion
|
|
61
|
+
//#region src/components/qr-code/use-qr-code.ts
|
|
62
|
+
const useQrCode = (props) => {
|
|
63
|
+
const id = createUniqueId();
|
|
64
|
+
const locale = useLocaleContext();
|
|
65
|
+
const environment = useEnvironmentContext();
|
|
66
|
+
const machineProps = createMemo(() => ({
|
|
67
|
+
id,
|
|
68
|
+
dir: locale().dir,
|
|
69
|
+
getRootNode: environment().getRootNode,
|
|
70
|
+
...runIfFn(props)
|
|
71
|
+
}));
|
|
72
|
+
const service = useMachine(qrCode.machine, machineProps);
|
|
73
|
+
return createMemo(() => qrCode.connect(service, normalizeProps));
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
//#endregion
|
|
77
|
+
//#region src/components/qr-code/qr-code-root.tsx
|
|
78
|
+
const QrCodeRoot = (props) => {
|
|
79
|
+
const [useQrCodeProps, restProps] = createSplitProps()(props, [
|
|
80
|
+
"defaultValue",
|
|
81
|
+
"encoding",
|
|
82
|
+
"id",
|
|
83
|
+
"ids",
|
|
84
|
+
"onValueChange",
|
|
85
|
+
"pixelSize",
|
|
86
|
+
"value"
|
|
87
|
+
]);
|
|
88
|
+
const api = useQrCode(useQrCodeProps);
|
|
89
|
+
const mergedProps = mergeProps$2(() => api().getRootProps(), restProps);
|
|
90
|
+
return createComponent(QrCodeProvider, {
|
|
91
|
+
value: api,
|
|
92
|
+
get children() {
|
|
93
|
+
return createComponent(sprawlify.div, mergedProps);
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
//#endregion
|
|
99
|
+
//#region src/components/qr-code/qr-code-root-provider.tsx
|
|
100
|
+
const QrCodeRootProvider = (props) => {
|
|
101
|
+
const [{ value: qrCode$1 }, localProps] = createSplitProps()(props, ["value"]);
|
|
102
|
+
const mergedProps = mergeProps$2(() => qrCode$1().getRootProps(), localProps);
|
|
103
|
+
return createComponent(QrCodeProvider, {
|
|
104
|
+
value: qrCode$1,
|
|
105
|
+
get children() {
|
|
106
|
+
return createComponent(sprawlify.div, mergedProps);
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
//#endregion
|
|
112
|
+
//#region src/components/qr-code/qr-code.ts
|
|
113
|
+
var qr_code_exports = /* @__PURE__ */ __export({
|
|
114
|
+
Context: () => QrCodeContext,
|
|
115
|
+
DownloadTrigger: () => QrCodeDownloadTrigger,
|
|
116
|
+
Frame: () => QrCodeFrame,
|
|
117
|
+
Overlay: () => QrCodeOverlay,
|
|
118
|
+
Pattern: () => QrCodePattern,
|
|
119
|
+
Root: () => QrCodeRoot,
|
|
120
|
+
RootProvider: () => QrCodeRootProvider
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
//#endregion
|
|
124
|
+
export { qr_code_exports as QrCode, QrCodeContext, QrCodeDownloadTrigger, QrCodeFrame, QrCodeOverlay, QrCodePattern, QrCodeRoot, QrCodeRootProvider, qrCodeAnatomy, useQrCode, useQrCodeContext };
|
|
@@ -0,0 +1,117 @@
|
|
|
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 qrCode from "@sprawlify/primitives/machines/qr-code";
|
|
10
|
+
import { anatomy as qrCodeAnatomy } from "@sprawlify/primitives/machines/qr-code";
|
|
11
|
+
|
|
12
|
+
//#region src/components/qr-code/use-qr-code-context.ts
|
|
13
|
+
const [QrCodeProvider, useQrCodeContext] = createContext$1({
|
|
14
|
+
hookName: "useQrCodeContext",
|
|
15
|
+
providerName: "<QrCodeProvider />"
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
//#endregion
|
|
19
|
+
//#region src/components/qr-code/qr-code-context.ts
|
|
20
|
+
const QrCodeContext = (props) => props.children(useQrCodeContext());
|
|
21
|
+
|
|
22
|
+
//#endregion
|
|
23
|
+
//#region src/components/qr-code/qr-code-download-trigger.tsx
|
|
24
|
+
const QrCodeDownloadTrigger = (props) => {
|
|
25
|
+
const [downloadTriggerProps, localProps] = createSplitProps()(props, [
|
|
26
|
+
"fileName",
|
|
27
|
+
"mimeType",
|
|
28
|
+
"quality"
|
|
29
|
+
]);
|
|
30
|
+
const qrCode$1 = useQrCodeContext();
|
|
31
|
+
const mergedProps = mergeProps$1(() => qrCode$1().getDownloadTriggerProps(downloadTriggerProps), localProps);
|
|
32
|
+
return <sprawlify.button {...mergedProps} />;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
//#endregion
|
|
36
|
+
//#region src/components/qr-code/qr-code-frame.tsx
|
|
37
|
+
const QrCodeFrame = (props) => {
|
|
38
|
+
const qrCode$1 = useQrCodeContext();
|
|
39
|
+
const mergedProps = mergeProps$1(() => qrCode$1().getFrameProps(), props);
|
|
40
|
+
return <sprawlify.svg {...mergedProps} />;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
//#endregion
|
|
44
|
+
//#region src/components/qr-code/qr-code-overlay.tsx
|
|
45
|
+
const QrCodeOverlay = (props) => {
|
|
46
|
+
const qrCode$1 = useQrCodeContext();
|
|
47
|
+
const mergedProps = mergeProps$1(() => qrCode$1().getOverlayProps(), props);
|
|
48
|
+
return <sprawlify.div {...mergedProps} />;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
//#endregion
|
|
52
|
+
//#region src/components/qr-code/qr-code-pattern.tsx
|
|
53
|
+
const QrCodePattern = (props) => {
|
|
54
|
+
const qrCode$1 = useQrCodeContext();
|
|
55
|
+
const mergedProps = mergeProps$1(() => qrCode$1().getPatternProps(), props);
|
|
56
|
+
return <sprawlify.path {...mergedProps} />;
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
//#endregion
|
|
60
|
+
//#region src/components/qr-code/use-qr-code.ts
|
|
61
|
+
const useQrCode = (props) => {
|
|
62
|
+
const id = createUniqueId();
|
|
63
|
+
const locale = useLocaleContext();
|
|
64
|
+
const environment = useEnvironmentContext();
|
|
65
|
+
const machineProps = createMemo(() => ({
|
|
66
|
+
id,
|
|
67
|
+
dir: locale().dir,
|
|
68
|
+
getRootNode: environment().getRootNode,
|
|
69
|
+
...runIfFn(props)
|
|
70
|
+
}));
|
|
71
|
+
const service = useMachine(qrCode.machine, machineProps);
|
|
72
|
+
return createMemo(() => qrCode.connect(service, normalizeProps));
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
//#endregion
|
|
76
|
+
//#region src/components/qr-code/qr-code-root.tsx
|
|
77
|
+
const QrCodeRoot = (props) => {
|
|
78
|
+
const [useQrCodeProps, restProps] = createSplitProps()(props, [
|
|
79
|
+
"defaultValue",
|
|
80
|
+
"encoding",
|
|
81
|
+
"id",
|
|
82
|
+
"ids",
|
|
83
|
+
"onValueChange",
|
|
84
|
+
"pixelSize",
|
|
85
|
+
"value"
|
|
86
|
+
]);
|
|
87
|
+
const api = useQrCode(useQrCodeProps);
|
|
88
|
+
const mergedProps = mergeProps$1(() => api().getRootProps(), restProps);
|
|
89
|
+
return <QrCodeProvider value={api}>
|
|
90
|
+
<sprawlify.div {...mergedProps} />
|
|
91
|
+
</QrCodeProvider>;
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
//#endregion
|
|
95
|
+
//#region src/components/qr-code/qr-code-root-provider.tsx
|
|
96
|
+
const QrCodeRootProvider = (props) => {
|
|
97
|
+
const [{ value: qrCode$1 }, localProps] = createSplitProps()(props, ["value"]);
|
|
98
|
+
const mergedProps = mergeProps$1(() => qrCode$1().getRootProps(), localProps);
|
|
99
|
+
return <QrCodeProvider value={qrCode$1}>
|
|
100
|
+
<sprawlify.div {...mergedProps} />
|
|
101
|
+
</QrCodeProvider>;
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
//#endregion
|
|
105
|
+
//#region src/components/qr-code/qr-code.ts
|
|
106
|
+
var qr_code_exports = /* @__PURE__ */ __export({
|
|
107
|
+
Context: () => QrCodeContext,
|
|
108
|
+
DownloadTrigger: () => QrCodeDownloadTrigger,
|
|
109
|
+
Frame: () => QrCodeFrame,
|
|
110
|
+
Overlay: () => QrCodeOverlay,
|
|
111
|
+
Pattern: () => QrCodePattern,
|
|
112
|
+
Root: () => QrCodeRoot,
|
|
113
|
+
RootProvider: () => QrCodeRootProvider
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
//#endregion
|
|
117
|
+
export { qr_code_exports as QrCode, QrCodeContext, QrCodeDownloadTrigger, QrCodeFrame, QrCodeOverlay, QrCodePattern, QrCodeRoot, QrCodeRootProvider, qrCodeAnatomy, useQrCode, useQrCodeContext };
|
|
@@ -0,0 +1,79 @@
|
|
|
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 radioGroupAnatomy } from "../../radio-group-anatomy-B1UQnu0f.js";
|
|
5
|
+
import * as solid_js443 from "solid-js";
|
|
6
|
+
import { Accessor, JSX } from "solid-js";
|
|
7
|
+
import * as radio from "@sprawlify/primitives/machines/radio-group";
|
|
8
|
+
import { ItemProps, ItemState, ValueChangeDetails, ValueChangeDetails as RadioGroupValueChangeDetails } from "@sprawlify/primitives/machines/radio-group";
|
|
9
|
+
|
|
10
|
+
//#region src/components/radio-group/use-radio-group.d.ts
|
|
11
|
+
interface UseRadioGroupProps extends Optional<Omit<radio.Props, 'dir' | 'getRootNode'>, 'id'> {}
|
|
12
|
+
interface UseRadioGroupReturn extends Accessor<radio.Api<PropTypes>> {}
|
|
13
|
+
declare const useRadioGroup: (props?: MaybeAccessor<UseRadioGroupProps>) => UseRadioGroupReturn;
|
|
14
|
+
//#endregion
|
|
15
|
+
//#region src/components/radio-group/use-radio-group-context.d.ts
|
|
16
|
+
interface UseRadioGroupContext extends UseRadioGroupReturn {}
|
|
17
|
+
//#endregion
|
|
18
|
+
//#region src/components/radio-group/radio-group-context.d.ts
|
|
19
|
+
interface RadioGroupContextProps {
|
|
20
|
+
children: (context: UseRadioGroupContext) => JSX.Element;
|
|
21
|
+
}
|
|
22
|
+
declare const RadioGroupContext: (props: RadioGroupContextProps) => JSX.Element;
|
|
23
|
+
//#endregion
|
|
24
|
+
//#region src/components/radio-group/radio-group-indicator.d.ts
|
|
25
|
+
interface RadioGroupIndicatorBaseProps extends PolymorphicProps<'div'> {}
|
|
26
|
+
interface RadioGroupIndicatorProps extends HTMLProps<'div'>, RadioGroupIndicatorBaseProps {}
|
|
27
|
+
declare const RadioGroupIndicator: (props: RadioGroupIndicatorProps) => solid_js443.JSX.Element;
|
|
28
|
+
//#endregion
|
|
29
|
+
//#region src/components/radio-group/radio-group-item.d.ts
|
|
30
|
+
interface RadioGroupItemBaseProps extends ItemProps, PolymorphicProps<'label'> {}
|
|
31
|
+
interface RadioGroupItemProps extends HTMLProps<'label'>, RadioGroupItemBaseProps {}
|
|
32
|
+
declare const RadioGroupItem: (props: RadioGroupItemProps) => solid_js443.JSX.Element;
|
|
33
|
+
//#endregion
|
|
34
|
+
//#region src/components/radio-group/use-radio-group-item-context.d.ts
|
|
35
|
+
interface UseRadioGroupItemContext extends Accessor<ItemState> {}
|
|
36
|
+
//#endregion
|
|
37
|
+
//#region src/components/radio-group/radio-group-item-context.d.ts
|
|
38
|
+
interface RadioGroupItemContextProps {
|
|
39
|
+
children: (context: UseRadioGroupItemContext) => JSX.Element;
|
|
40
|
+
}
|
|
41
|
+
declare const RadioGroupItemContext: (props: RadioGroupItemContextProps) => JSX.Element;
|
|
42
|
+
//#endregion
|
|
43
|
+
//#region src/components/radio-group/radio-group-item-control.d.ts
|
|
44
|
+
interface RadioGroupItemControlBaseProps extends PolymorphicProps<'div'> {}
|
|
45
|
+
interface RadioGroupItemControlProps extends HTMLProps<'div'>, RadioGroupItemControlBaseProps {}
|
|
46
|
+
declare const RadioGroupItemControl: (props: RadioGroupItemControlProps) => solid_js443.JSX.Element;
|
|
47
|
+
//#endregion
|
|
48
|
+
//#region src/components/radio-group/radio-group-item-hidden-input.d.ts
|
|
49
|
+
interface RadioGroupItemHiddenInputBaseProps extends PolymorphicProps<'input'> {}
|
|
50
|
+
interface RadioGroupItemHiddenInputProps extends HTMLProps<'input'>, RadioGroupItemHiddenInputBaseProps {}
|
|
51
|
+
declare const RadioGroupItemHiddenInput: (props: RadioGroupItemHiddenInputProps) => solid_js443.JSX.Element;
|
|
52
|
+
//#endregion
|
|
53
|
+
//#region src/components/radio-group/radio-group-item-text.d.ts
|
|
54
|
+
interface RadioGroupItemTextBaseProps extends PolymorphicProps<'span'> {}
|
|
55
|
+
interface RadioGroupItemTextProps extends HTMLProps<'span'>, RadioGroupItemTextBaseProps {}
|
|
56
|
+
declare const RadioGroupItemText: (props: RadioGroupItemTextProps) => solid_js443.JSX.Element;
|
|
57
|
+
//#endregion
|
|
58
|
+
//#region src/components/radio-group/radio-group-label.d.ts
|
|
59
|
+
interface RadioGroupLabelBaseProps extends PolymorphicProps<'label'> {}
|
|
60
|
+
interface RadioGroupLabelProps extends HTMLProps<'label'>, RadioGroupLabelBaseProps {}
|
|
61
|
+
declare const RadioGroupLabel: (props: RadioGroupLabelProps) => solid_js443.JSX.Element;
|
|
62
|
+
//#endregion
|
|
63
|
+
//#region src/components/radio-group/radio-group-root.d.ts
|
|
64
|
+
interface RadioGroupRootBaseProps extends UseRadioGroupProps, PolymorphicProps<'div'> {}
|
|
65
|
+
interface RadioGroupRootProps extends HTMLProps<'div'>, RadioGroupRootBaseProps {}
|
|
66
|
+
declare const RadioGroupRoot: (props: RadioGroupRootProps) => solid_js443.JSX.Element;
|
|
67
|
+
//#endregion
|
|
68
|
+
//#region src/components/radio-group/radio-group-root-provider.d.ts
|
|
69
|
+
interface RootProviderProps {
|
|
70
|
+
value: UseRadioGroupReturn;
|
|
71
|
+
}
|
|
72
|
+
interface RadioGroupRootProviderBaseProps extends PolymorphicProps<'div'> {}
|
|
73
|
+
interface RadioGroupRootProviderProps extends HTMLProps<'div'>, RootProviderProps, RadioGroupRootProviderBaseProps {}
|
|
74
|
+
declare const RadioGroupRootProvider: (props: RadioGroupRootProviderProps) => solid_js443.JSX.Element;
|
|
75
|
+
declare namespace radio_group_d_exports {
|
|
76
|
+
export { RadioGroupContext as Context, RadioGroupContext as ContextProps, RadioGroupIndicator as Indicator, RadioGroupIndicatorBaseProps as IndicatorBaseProps, RadioGroupIndicatorProps as IndicatorProps, RadioGroupItem as Item, RadioGroupItemBaseProps as ItemBaseProps, RadioGroupItemContext as ItemContext, RadioGroupItemContext as ItemContextProps, RadioGroupItemControl as ItemControl, RadioGroupItemControlBaseProps as ItemControlBaseProps, RadioGroupItemControlProps as ItemControlProps, RadioGroupItemHiddenInput as ItemHiddenInput, RadioGroupItemHiddenInputBaseProps as ItemHiddenInputBaseProps, RadioGroupItemHiddenInputProps as ItemHiddenInputProps, RadioGroupItemProps as ItemProps, RadioGroupItemText as ItemText, RadioGroupItemTextBaseProps as ItemTextBaseProps, RadioGroupItemTextProps as ItemTextProps, RadioGroupLabel as Label, RadioGroupLabelBaseProps as LabelBaseProps, RadioGroupLabelProps as LabelProps, RadioGroupRoot as Root, RadioGroupRootBaseProps as RootBaseProps, RadioGroupRootProps as RootProps, RadioGroupRootProvider as RootProvider, RadioGroupRootProviderBaseProps as RootProviderBaseProps, RadioGroupRootProviderProps as RootProviderProps, ValueChangeDetails };
|
|
77
|
+
}
|
|
78
|
+
//#endregion
|
|
79
|
+
export { radio_group_d_exports as RadioGroup, RadioGroupContext, type RadioGroupContextProps, RadioGroupIndicator, type RadioGroupIndicatorBaseProps, type RadioGroupIndicatorProps, RadioGroupItem, type RadioGroupItemBaseProps, RadioGroupItemContext, type RadioGroupItemContextProps, RadioGroupItemControl, type RadioGroupItemControlBaseProps, type RadioGroupItemControlProps, RadioGroupItemHiddenInput, type RadioGroupItemHiddenInputBaseProps, type RadioGroupItemHiddenInputProps, type RadioGroupItemProps, RadioGroupItemText, type RadioGroupItemTextBaseProps, type RadioGroupItemTextProps, RadioGroupLabel, type RadioGroupLabelBaseProps, type RadioGroupLabelProps, RadioGroupRoot, type RadioGroupRootBaseProps, type RadioGroupRootProps, RadioGroupRootProvider, type RadioGroupRootProviderBaseProps, type RadioGroupRootProviderProps, type RadioGroupValueChangeDetails, type UseRadioGroupContext, type UseRadioGroupItemContext, type UseRadioGroupProps, type UseRadioGroupReturn, radioGroupAnatomy, useRadioGroup, useRadioGroupContext, useRadioGroupItemContext };
|
|
@@ -0,0 +1,190 @@
|
|
|
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 "../../fieldset-anatomy-BBa9WoaP.js";
|
|
8
|
+
import { t as radioGroupAnatomy } from "../../radio-group-anatomy-C74Bceji.js";
|
|
9
|
+
import { t as createSplitProps } from "../../create-split-props-L9BbhhCg.js";
|
|
10
|
+
import "../../compose-refs-Chr9AtC3.js";
|
|
11
|
+
import { l as useFieldsetContext } from "../../fieldset-DQmh-Ktv.js";
|
|
12
|
+
import { createMemo, createUniqueId } from "solid-js";
|
|
13
|
+
import { createComponent } from "solid-js/web";
|
|
14
|
+
import * as radio from "@sprawlify/primitives/machines/radio-group";
|
|
15
|
+
|
|
16
|
+
//#region src/components/radio-group/use-radio-group-context.ts
|
|
17
|
+
const [RadioGroupProvider, useRadioGroupContext] = createContext$1({
|
|
18
|
+
hookName: "useRadioGroupContext",
|
|
19
|
+
providerName: "<RadioGroupProvider />"
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
//#endregion
|
|
23
|
+
//#region src/components/radio-group/radio-group-context.tsx
|
|
24
|
+
const RadioGroupContext = (props) => props.children(useRadioGroupContext());
|
|
25
|
+
|
|
26
|
+
//#endregion
|
|
27
|
+
//#region src/components/radio-group/radio-group-indicator.tsx
|
|
28
|
+
const RadioGroupIndicator = (props) => {
|
|
29
|
+
const radioGroup = useRadioGroupContext();
|
|
30
|
+
const mergedProps = mergeProps$2(() => radioGroup().getIndicatorProps(), props);
|
|
31
|
+
return createComponent(sprawlify.div, mergedProps);
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
//#endregion
|
|
35
|
+
//#region src/components/radio-group/use-radio-group-item-context.ts
|
|
36
|
+
const [RadioGroupItemProvider, useRadioGroupItemContext] = createContext$1({
|
|
37
|
+
hookName: "useRadioGroupItemContext",
|
|
38
|
+
providerName: "<RadioGroupItemProvider />"
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
//#endregion
|
|
42
|
+
//#region src/components/radio-group/use-radio-group-item-props-context.ts
|
|
43
|
+
const [RadioGroupItemPropsProvider, useRadioGroupItemPropsContext] = createContext$1({
|
|
44
|
+
hookName: "useRadioGroupItemPropsContext",
|
|
45
|
+
providerName: "<RadioGroupItemPropsProvider />"
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
//#endregion
|
|
49
|
+
//#region src/components/radio-group/radio-group-item.tsx
|
|
50
|
+
const RadioGroupItem = (props) => {
|
|
51
|
+
const [itemProps, localProps] = createSplitProps()(props, [
|
|
52
|
+
"value",
|
|
53
|
+
"disabled",
|
|
54
|
+
"invalid"
|
|
55
|
+
]);
|
|
56
|
+
const radioGroup = useRadioGroupContext();
|
|
57
|
+
const mergedProps = mergeProps$2(() => radioGroup().getItemProps(itemProps), localProps);
|
|
58
|
+
const itemState = createMemo(() => radioGroup().getItemState(itemProps));
|
|
59
|
+
return createComponent(RadioGroupItemPropsProvider, {
|
|
60
|
+
value: itemProps,
|
|
61
|
+
get children() {
|
|
62
|
+
return createComponent(RadioGroupItemProvider, {
|
|
63
|
+
value: itemState,
|
|
64
|
+
get children() {
|
|
65
|
+
return createComponent(sprawlify.label, mergedProps);
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
//#endregion
|
|
73
|
+
//#region src/components/radio-group/radio-group-item-context.tsx
|
|
74
|
+
const RadioGroupItemContext = (props) => props.children(useRadioGroupItemContext());
|
|
75
|
+
|
|
76
|
+
//#endregion
|
|
77
|
+
//#region src/components/radio-group/radio-group-item-control.tsx
|
|
78
|
+
const RadioGroupItemControl = (props) => {
|
|
79
|
+
const radioGroup = useRadioGroupContext();
|
|
80
|
+
const itemProps = useRadioGroupItemPropsContext();
|
|
81
|
+
const mergedProps = mergeProps$2(() => radioGroup().getItemControlProps(itemProps), props);
|
|
82
|
+
return createComponent(sprawlify.div, mergedProps);
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
//#endregion
|
|
86
|
+
//#region src/components/radio-group/radio-group-item-hidden-input.tsx
|
|
87
|
+
const RadioGroupItemHiddenInput = (props) => {
|
|
88
|
+
const radioGroup = useRadioGroupContext();
|
|
89
|
+
const itemProps = useRadioGroupItemPropsContext();
|
|
90
|
+
const mergedProps = mergeProps$2(() => radioGroup().getItemHiddenInputProps(itemProps), props);
|
|
91
|
+
return createComponent(sprawlify.input, mergedProps);
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
//#endregion
|
|
95
|
+
//#region src/components/radio-group/radio-group-item-text.tsx
|
|
96
|
+
const RadioGroupItemText = (props) => {
|
|
97
|
+
const radioGroup = useRadioGroupContext();
|
|
98
|
+
const itemProps = useRadioGroupItemPropsContext();
|
|
99
|
+
const mergedProps = mergeProps$2(() => radioGroup().getItemTextProps(itemProps), props);
|
|
100
|
+
return createComponent(sprawlify.span, mergedProps);
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
//#endregion
|
|
104
|
+
//#region src/components/radio-group/radio-group-label.tsx
|
|
105
|
+
const RadioGroupLabel = (props) => {
|
|
106
|
+
const radioGroup = useRadioGroupContext();
|
|
107
|
+
const mergedProps = mergeProps$2(() => radioGroup().getLabelProps(), props);
|
|
108
|
+
return createComponent(sprawlify.label, mergedProps);
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
//#endregion
|
|
112
|
+
//#region src/components/radio-group/use-radio-group.ts
|
|
113
|
+
const useRadioGroup = (props) => {
|
|
114
|
+
const id = createUniqueId();
|
|
115
|
+
const locale = useLocaleContext();
|
|
116
|
+
const environment = useEnvironmentContext();
|
|
117
|
+
const fieldset = useFieldsetContext();
|
|
118
|
+
const machineProps = createMemo(() => {
|
|
119
|
+
const fieldsetContext = fieldset?.();
|
|
120
|
+
return {
|
|
121
|
+
id,
|
|
122
|
+
ids: { label: fieldsetContext?.ids?.legend },
|
|
123
|
+
dir: locale().dir,
|
|
124
|
+
disabled: fieldsetContext?.disabled,
|
|
125
|
+
invalid: fieldsetContext?.invalid,
|
|
126
|
+
getRootNode: environment().getRootNode,
|
|
127
|
+
...runIfFn(props)
|
|
128
|
+
};
|
|
129
|
+
});
|
|
130
|
+
const service = useMachine(radio.machine, machineProps);
|
|
131
|
+
return createMemo(() => radio.connect(service, normalizeProps));
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
//#endregion
|
|
135
|
+
//#region src/components/radio-group/radio-group-root.tsx
|
|
136
|
+
const RadioGroupRoot = (props) => {
|
|
137
|
+
const [useRadioGroupProps, localProps] = createSplitProps()(props, [
|
|
138
|
+
"defaultValue",
|
|
139
|
+
"disabled",
|
|
140
|
+
"form",
|
|
141
|
+
"id",
|
|
142
|
+
"ids",
|
|
143
|
+
"invalid",
|
|
144
|
+
"name",
|
|
145
|
+
"onValueChange",
|
|
146
|
+
"orientation",
|
|
147
|
+
"readOnly",
|
|
148
|
+
"required",
|
|
149
|
+
"value"
|
|
150
|
+
]);
|
|
151
|
+
const radioGroup = useRadioGroup(useRadioGroupProps);
|
|
152
|
+
const mergedProps = mergeProps$2(() => radioGroup().getRootProps(), localProps);
|
|
153
|
+
return createComponent(RadioGroupProvider, {
|
|
154
|
+
value: radioGroup,
|
|
155
|
+
get children() {
|
|
156
|
+
return createComponent(sprawlify.div, mergedProps);
|
|
157
|
+
}
|
|
158
|
+
});
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
//#endregion
|
|
162
|
+
//#region src/components/radio-group/radio-group-root-provider.tsx
|
|
163
|
+
const RadioGroupRootProvider = (props) => {
|
|
164
|
+
const [{ value: radioGroup }, localProps] = createSplitProps()(props, ["value"]);
|
|
165
|
+
const mergedProps = mergeProps$2(() => radioGroup().getRootProps(), localProps);
|
|
166
|
+
return createComponent(RadioGroupProvider, {
|
|
167
|
+
value: radioGroup,
|
|
168
|
+
get children() {
|
|
169
|
+
return createComponent(sprawlify.div, mergedProps);
|
|
170
|
+
}
|
|
171
|
+
});
|
|
172
|
+
};
|
|
173
|
+
|
|
174
|
+
//#endregion
|
|
175
|
+
//#region src/components/radio-group/radio-group.ts
|
|
176
|
+
var radio_group_exports = /* @__PURE__ */ __export({
|
|
177
|
+
Context: () => RadioGroupContext,
|
|
178
|
+
Indicator: () => RadioGroupIndicator,
|
|
179
|
+
Item: () => RadioGroupItem,
|
|
180
|
+
ItemContext: () => RadioGroupItemContext,
|
|
181
|
+
ItemControl: () => RadioGroupItemControl,
|
|
182
|
+
ItemHiddenInput: () => RadioGroupItemHiddenInput,
|
|
183
|
+
ItemText: () => RadioGroupItemText,
|
|
184
|
+
Label: () => RadioGroupLabel,
|
|
185
|
+
Root: () => RadioGroupRoot,
|
|
186
|
+
RootProvider: () => RadioGroupRootProvider
|
|
187
|
+
});
|
|
188
|
+
|
|
189
|
+
//#endregion
|
|
190
|
+
export { radio_group_exports as RadioGroup, RadioGroupContext, RadioGroupIndicator, RadioGroupItem, RadioGroupItemContext, RadioGroupItemControl, RadioGroupItemHiddenInput, RadioGroupItemText, RadioGroupLabel, RadioGroupRoot, RadioGroupRootProvider, radioGroupAnatomy, useRadioGroup, useRadioGroupContext, useRadioGroupItemContext };
|