@machinerd/js-module 0.9.0 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +132 -63
- package/dist/align-CdK8Ar2w.mjs +1 -0
- package/dist/align-Dp4avXIm.cjs +1 -0
- package/dist/{api-client-C3o2pO0q.cjs → api-client-BXH8Rm-J.cjs} +1 -1
- package/dist/{api-client-C0sbSOQf.mjs → api-client-xK3Ua3Gr.mjs} +1 -1
- package/dist/basic-image-D26zahpC.mjs +1 -0
- package/dist/basic-image-Wl0IBgOX.cjs +1 -0
- package/dist/country-flag-8HG6HZPi.cjs +1 -0
- package/dist/country-flag-Bypgu_rR.mjs +1 -0
- package/dist/custom-heading-By14y5ug.cjs +1 -0
- package/dist/custom-heading-eGRLcDQZ.mjs +1 -0
- package/dist/dnd-CeWNVM-V.mjs +1 -0
- package/dist/dnd-DHNRwFj8.cjs +1 -0
- package/dist/editor/extensions/align/index.cjs +1 -0
- package/dist/editor/extensions/align/index.d.cts +2 -0
- package/dist/editor/extensions/align/index.d.mts +2 -0
- package/dist/editor/extensions/align/index.mjs +1 -0
- package/dist/editor/extensions/table-controls/index.cjs +1 -0
- package/dist/editor/extensions/table-controls/index.d.cts +2 -0
- package/dist/editor/extensions/table-controls/index.d.mts +2 -0
- package/dist/editor/extensions/table-controls/index.mjs +1 -0
- package/dist/editor/extensions/table-resize/index.cjs +1 -0
- package/dist/editor/extensions/table-resize/index.d.cts +2 -0
- package/dist/editor/extensions/table-resize/index.d.mts +2 -0
- package/dist/editor/extensions/table-resize/index.mjs +1 -0
- package/dist/editor/index.cjs +1 -1
- package/dist/editor/index.d.cts +51 -73
- package/dist/editor/index.d.mts +51 -73
- package/dist/editor/index.mjs +1 -1
- package/dist/editor/nodes/basic-image/index.cjs +1 -0
- package/dist/editor/nodes/basic-image/index.d.cts +4 -0
- package/dist/editor/nodes/basic-image/index.d.mts +4 -0
- package/dist/editor/nodes/basic-image/index.mjs +1 -0
- package/dist/editor/nodes/custom-heading/index.cjs +1 -0
- package/dist/editor/nodes/custom-heading/index.d.cts +2 -0
- package/dist/editor/nodes/custom-heading/index.d.mts +2 -0
- package/dist/editor/nodes/custom-heading/index.mjs +1 -0
- package/dist/editor/nodes/menu-wrapper/index.cjs +1 -0
- package/dist/editor/nodes/menu-wrapper/index.d.cts +54 -0
- package/dist/editor/nodes/menu-wrapper/index.d.mts +54 -0
- package/dist/editor/nodes/menu-wrapper/index.mjs +1 -0
- package/dist/editor/nodes/node-resize/index.cjs +1 -0
- package/dist/editor/nodes/node-resize/index.d.cts +27 -0
- package/dist/editor/nodes/node-resize/index.d.mts +27 -0
- package/dist/editor/nodes/node-resize/index.mjs +1 -0
- package/dist/editor/nodes/node-size/index.cjs +1 -0
- package/dist/editor/nodes/node-size/index.d.cts +3 -0
- package/dist/editor/nodes/node-size/index.d.mts +3 -0
- package/dist/editor/nodes/node-size/index.mjs +1 -0
- package/dist/editor/nodes/node-view-context/index.cjs +1 -0
- package/dist/editor/nodes/node-view-context/index.d.cts +2 -0
- package/dist/editor/nodes/node-view-context/index.d.mts +2 -0
- package/dist/editor/nodes/node-view-context/index.mjs +1 -0
- package/dist/editor/nodes/subset-image/index.cjs +1 -0
- package/dist/editor/nodes/subset-image/index.d.cts +5 -0
- package/dist/editor/nodes/subset-image/index.d.mts +5 -0
- package/dist/editor/nodes/subset-image/index.mjs +1 -0
- package/dist/editor/nodes/table/index.cjs +1 -0
- package/dist/editor/nodes/table/index.d.cts +2 -0
- package/dist/editor/nodes/table/index.d.mts +2 -0
- package/dist/editor/nodes/table/index.mjs +1 -0
- package/dist/editor/nodes/tabs/index.cjs +1 -0
- package/dist/editor/nodes/tabs/index.d.cts +2 -0
- package/dist/editor/nodes/tabs/index.d.mts +2 -0
- package/dist/editor/nodes/tabs/index.mjs +1 -0
- package/dist/editor-CHuJTM4H.mjs +1 -0
- package/dist/editor-DvLUotoh.cjs +1 -0
- package/dist/{file-B-UJkabO.mjs → file-CapBKYce.mjs} +1 -1
- package/dist/file-DeZ1OKdy.cjs +1 -0
- package/dist/hooks/use-delay-unmount/index.cjs +1 -0
- package/dist/hooks/use-delay-unmount/index.d.cts +4 -0
- package/dist/hooks/use-delay-unmount/index.d.mts +4 -0
- package/dist/hooks/use-delay-unmount/index.mjs +1 -0
- package/dist/hooks/use-dialog-stack/index.cjs +1 -0
- package/dist/hooks/use-dialog-stack/index.d.cts +4 -0
- package/dist/hooks/use-dialog-stack/index.d.mts +4 -0
- package/dist/hooks/use-dialog-stack/index.mjs +1 -0
- package/dist/hooks/use-drag-resize/index.cjs +1 -0
- package/dist/hooks/use-drag-resize/index.d.cts +2 -0
- package/dist/hooks/use-drag-resize/index.d.mts +2 -0
- package/dist/hooks/use-drag-resize/index.mjs +1 -0
- package/dist/hooks/use-drag-scroll/index.cjs +1 -0
- package/dist/hooks/use-drag-scroll/index.d.cts +13 -0
- package/dist/hooks/use-drag-scroll/index.d.mts +13 -0
- package/dist/hooks/use-drag-scroll/index.mjs +1 -0
- package/dist/hooks/use-effect-once/index.cjs +1 -0
- package/dist/hooks/use-effect-once/index.d.cts +7 -0
- package/dist/hooks/use-effect-once/index.d.mts +7 -0
- package/dist/hooks/use-effect-once/index.mjs +1 -0
- package/dist/hooks/use-outside-click/index.cjs +1 -0
- package/dist/hooks/use-outside-click/index.d.cts +13 -0
- package/dist/hooks/use-outside-click/index.d.mts +13 -0
- package/dist/hooks/use-outside-click/index.mjs +1 -0
- package/dist/hooks/use-scroll-lock/index.cjs +1 -0
- package/dist/hooks/use-scroll-lock/index.d.cts +12 -0
- package/dist/hooks/use-scroll-lock/index.d.mts +12 -0
- package/dist/hooks/use-scroll-lock/index.mjs +1 -0
- package/dist/hooks/use-scroll-top/index.cjs +1 -0
- package/dist/hooks/use-scroll-top/index.d.cts +17 -0
- package/dist/hooks/use-scroll-top/index.d.mts +17 -0
- package/dist/hooks/use-scroll-top/index.mjs +1 -0
- package/dist/hooks/use-snackbar/index.cjs +1 -0
- package/dist/hooks/{use-snackbar.d.cts → use-snackbar/index.d.cts} +1 -1
- package/dist/hooks/{use-snackbar.d.mts → use-snackbar/index.d.mts} +1 -1
- package/dist/hooks/use-sticky/index.cjs +1 -0
- package/dist/hooks/use-sticky/index.d.cts +9 -0
- package/dist/hooks/use-sticky/index.d.mts +9 -0
- package/dist/hooks/use-sticky/index.mjs +1 -0
- package/dist/hooks/use-subset-image/index.cjs +1 -0
- package/dist/hooks/use-subset-image/index.d.cts +2 -0
- package/dist/hooks/use-subset-image/index.d.mts +2 -0
- package/dist/hooks/use-subset-image/index.mjs +1 -0
- package/dist/hooks/use-window-size/index.cjs +1 -0
- package/dist/hooks/use-window-size/index.d.cts +6 -0
- package/dist/hooks/use-window-size/index.d.mts +6 -0
- package/dist/hooks/use-window-size/index.mjs +1 -0
- package/dist/image-CAEWHuaM.mjs +1 -0
- package/dist/image-kIL2PjTS.cjs +1 -0
- package/dist/index-90Zl6qBK.d.cts +17 -0
- package/dist/index-BD2sHM7a.d.cts +34 -0
- package/dist/index-BJgz2hkX.d.cts +56 -0
- package/dist/index-BKqI0jBF.d.mts +43 -0
- package/dist/index-BMZtFPh-.d.cts +43 -0
- package/dist/index-BT7Y7xkm.d.cts +7 -0
- package/dist/index-BTUIpavj.d.mts +34 -0
- package/dist/index-BlQhHmTa.d.cts +31 -0
- package/dist/index-BoJg4HO3.d.mts +56 -0
- package/dist/{util/fetcher.d.cts → index-Bpp6ufv-.d.cts} +2 -2
- package/dist/index-BxqkZ148.d.cts +18 -0
- package/dist/index-C3wA7a3i.d.mts +7 -0
- package/dist/index-CLxl-tUO.d.cts +41 -0
- package/dist/index-CV-nhdHd.d.mts +43 -0
- package/dist/{util/fetcher.d.mts → index-C_5zGF-K.d.mts} +2 -2
- package/dist/index-C_YTuhwX.d.mts +11 -0
- package/dist/index-CcpFy_mT.d.mts +17 -0
- package/dist/{index-B1YNV_Vm.d.cts → index-CqZGdObz.d.mts} +47 -15
- package/dist/index-Cxc49Lmr.d.mts +19 -0
- package/dist/index-D-NPxMFr.d.cts +11 -0
- package/dist/index-D0Uuydfo.d.cts +6 -0
- package/dist/index-D5uh7klO.d.mts +18 -0
- package/dist/{index-C8chDULk.d.mts → index-DCzaZKG0.d.cts} +47 -15
- package/dist/index-DDG8MvPD.d.mts +31 -0
- package/dist/index-DEolXbf5.d.cts +26 -0
- package/dist/index-DHXj3w9p.d.mts +40 -0
- package/dist/{use-subset-image-Dygkyw-W.d.mts → index-DHyXKIBX.d.cts} +1 -1
- package/dist/index-DSVr-P8y.d.mts +45 -0
- package/dist/index-DTtrJ-ei.d.cts +10 -0
- package/dist/index-D_Hfb-z2.d.cts +45 -0
- package/dist/index-DeXwS1TW.d.mts +10 -0
- package/dist/index-Dhkwd0rJ.d.cts +19 -0
- package/dist/index-DrUJZDtK.d.cts +43 -0
- package/dist/index-DvEtYdm4.d.cts +40 -0
- package/dist/{use-subset-image-bDB5TSd4.d.cts → index-DxW8JBva.d.mts} +1 -1
- package/dist/index-X2XMkoEC.d.mts +26 -0
- package/dist/index-aA4ojwuQ.d.mts +6 -0
- package/dist/index-wiRVGgrx.d.mts +41 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +1 -1
- package/dist/label-DeEAgKAc.mjs +1 -0
- package/dist/label-jZuNIGyF.cjs +1 -0
- package/dist/node-resize-Cs4wR_HY.mjs +1 -0
- package/dist/node-resize-dantnBzP.cjs +1 -0
- package/dist/node-size-BQQGo7t7.cjs +1 -0
- package/dist/node-size-Bg-g2Png.mjs +1 -0
- package/dist/node-view-context-D-1j5isf.mjs +1 -0
- package/dist/node-view-context-YTl_1gGD.cjs +1 -0
- package/dist/providers/api-client/index.cjs +1 -1
- package/dist/providers/api-client/index.d.cts +3 -3
- package/dist/providers/api-client/index.d.mts +3 -3
- package/dist/providers/api-client/index.mjs +1 -1
- package/dist/providers/editor/index.cjs +1 -0
- package/dist/providers/editor/index.d.cts +21 -0
- package/dist/providers/editor/index.d.mts +21 -0
- package/dist/providers/editor/index.mjs +1 -0
- package/dist/providers/noti-stack/index.cjs +1 -1
- package/dist/providers/noti-stack/index.d.cts +2 -2
- package/dist/providers/noti-stack/index.mjs +1 -1
- package/dist/select-field-CoNJTWRb.cjs +1 -0
- package/dist/select-field-DeyQlWxq.mjs +1 -0
- package/dist/skeleton-7P1IZD3G.cjs +1 -0
- package/dist/skeleton-D4Q9wT-o.mjs +1 -0
- package/dist/src-BB55dPBE.mjs +1 -0
- package/dist/src-Dz1mULYA.cjs +1 -0
- package/dist/styles/admin.css +2424 -0
- package/dist/styles/editor.css +2917 -63
- package/dist/styles/index.css +788 -184
- package/dist/subset-image-AaZA0RuB.cjs +1 -0
- package/dist/subset-image-Co0fWefj.mjs +1 -0
- package/dist/subset-image-DnZ2TqZY.mjs +1 -0
- package/dist/subset-image-P2NQM0-3.cjs +0 -0
- package/dist/switch-BDdSF3lu.cjs +1 -0
- package/dist/switch-DTQt7BzY.mjs +1 -0
- package/dist/table-CKVL_ezW.mjs +1 -0
- package/dist/table-DmwOZtdl.cjs +1 -0
- package/dist/table-controls-CQmqnc4R.cjs +1 -0
- package/dist/table-controls-CpCGiLvR.mjs +1 -0
- package/dist/table-resize-DI2Pf2Mi.cjs +1 -0
- package/dist/table-resize-w9EsReKV.mjs +1 -0
- package/dist/tabs-DQ1db_eg.mjs +1 -0
- package/dist/tabs-DiryrHZ7.cjs +1 -0
- package/dist/text-field-CTxoUkAg.cjs +1 -0
- package/dist/text-field-D2x9nugT.mjs +1 -0
- package/dist/ui/admin/async-select-field/index.cjs +1 -0
- package/dist/ui/admin/async-select-field/index.d.cts +35 -0
- package/dist/ui/admin/async-select-field/index.d.mts +35 -0
- package/dist/ui/admin/async-select-field/index.mjs +1 -0
- package/dist/ui/admin/country-select/index.cjs +1 -0
- package/dist/ui/admin/country-select/index.d.cts +47 -0
- package/dist/ui/admin/country-select/index.d.mts +47 -0
- package/dist/ui/admin/country-select/index.mjs +1 -0
- package/dist/ui/admin/dropzone-field/index.cjs +1 -0
- package/dist/ui/admin/dropzone-field/index.d.cts +110 -0
- package/dist/ui/admin/dropzone-field/index.d.mts +110 -0
- package/dist/ui/admin/dropzone-field/index.mjs +1 -0
- package/dist/ui/admin/email-field/index.cjs +1 -0
- package/dist/ui/admin/email-field/index.d.cts +9 -0
- package/dist/ui/admin/email-field/index.d.mts +9 -0
- package/dist/ui/admin/email-field/index.mjs +1 -0
- package/dist/ui/admin/file-field/index.cjs +1 -0
- package/dist/ui/admin/file-field/index.d.cts +36 -0
- package/dist/ui/admin/file-field/index.d.mts +36 -0
- package/dist/ui/admin/file-field/index.mjs +1 -0
- package/dist/ui/admin/image-list-field/index.cjs +1 -0
- package/dist/ui/admin/image-list-field/index.d.cts +53 -0
- package/dist/ui/admin/image-list-field/index.d.mts +53 -0
- package/dist/ui/admin/image-list-field/index.mjs +1 -0
- package/dist/ui/admin/label/index.cjs +1 -0
- package/dist/ui/admin/label/index.d.cts +2 -0
- package/dist/ui/admin/label/index.d.mts +2 -0
- package/dist/ui/admin/label/index.mjs +1 -0
- package/dist/ui/admin/priority-field/index.cjs +1 -0
- package/dist/ui/admin/priority-field/index.d.cts +19 -0
- package/dist/ui/admin/priority-field/index.d.mts +19 -0
- package/dist/ui/admin/priority-field/index.mjs +1 -0
- package/dist/ui/admin/select-field/index.cjs +1 -0
- package/dist/ui/admin/select-field/index.d.cts +3 -0
- package/dist/ui/admin/select-field/index.d.mts +3 -0
- package/dist/ui/admin/select-field/index.mjs +1 -0
- package/dist/ui/admin/series-field/index.cjs +1 -0
- package/dist/ui/admin/series-field/index.d.cts +37 -0
- package/dist/ui/admin/series-field/index.d.mts +37 -0
- package/dist/ui/admin/series-field/index.mjs +1 -0
- package/dist/ui/admin/sns-field/index.cjs +1 -0
- package/dist/ui/admin/sns-field/index.d.cts +50 -0
- package/dist/ui/admin/sns-field/index.d.mts +50 -0
- package/dist/ui/admin/sns-field/index.mjs +1 -0
- package/dist/ui/admin/source-field/index.cjs +1 -0
- package/dist/ui/admin/source-field/index.d.cts +34 -0
- package/dist/ui/admin/source-field/index.d.mts +34 -0
- package/dist/ui/admin/source-field/index.mjs +1 -0
- package/dist/ui/admin/text-area-field/index.cjs +1 -0
- package/dist/ui/admin/text-area-field/index.d.cts +20 -0
- package/dist/ui/admin/text-area-field/index.d.mts +20 -0
- package/dist/ui/admin/text-area-field/index.mjs +1 -0
- package/dist/ui/admin/text-field/index.cjs +1 -0
- package/dist/ui/admin/text-field/index.d.cts +3 -0
- package/dist/ui/admin/text-field/index.d.mts +3 -0
- package/dist/ui/admin/text-field/index.mjs +1 -0
- package/dist/ui/admin/url-field/index.cjs +1 -0
- package/dist/ui/admin/url-field/index.d.cts +9 -0
- package/dist/ui/admin/url-field/index.d.mts +9 -0
- package/dist/ui/admin/url-field/index.mjs +1 -0
- package/dist/ui/admin/video-field/index.cjs +1 -0
- package/dist/ui/admin/video-field/index.d.cts +24 -0
- package/dist/ui/admin/video-field/index.d.mts +24 -0
- package/dist/ui/admin/video-field/index.mjs +1 -0
- package/dist/ui/admin/with-extra-field/index.cjs +1 -0
- package/dist/ui/admin/with-extra-field/index.d.cts +19 -0
- package/dist/ui/admin/with-extra-field/index.d.mts +19 -0
- package/dist/ui/admin/with-extra-field/index.mjs +1 -0
- package/dist/ui/bottom-app-bar/index.cjs +1 -0
- package/dist/ui/bottom-app-bar/index.d.cts +21 -0
- package/dist/ui/bottom-app-bar/index.d.mts +21 -0
- package/dist/ui/bottom-app-bar/index.mjs +1 -0
- package/dist/ui/button/index.cjs +1 -0
- package/dist/{button-DHvx-GAg.d.cts → ui/button/index.d.cts} +11 -11
- package/dist/{button-DRIyBtEB.d.mts → ui/button/index.d.mts} +13 -13
- package/dist/ui/button/index.mjs +1 -0
- package/dist/ui/carousel/index.cjs +1 -1
- package/dist/ui/carousel/index.d.cts +9 -9
- package/dist/ui/carousel/index.mjs +1 -1
- package/dist/ui/conditional-wrapper/index.cjs +1 -0
- package/dist/ui/conditional-wrapper/index.d.cts +29 -0
- package/dist/ui/conditional-wrapper/index.d.mts +29 -0
- package/dist/ui/conditional-wrapper/index.mjs +1 -0
- package/dist/ui/country-flag/index.cjs +1 -0
- package/dist/ui/country-flag/index.d.cts +13 -0
- package/dist/ui/country-flag/index.d.mts +13 -0
- package/dist/ui/country-flag/index.mjs +1 -0
- package/dist/ui/dialog/index.cjs +1 -1
- package/dist/ui/dialog/index.d.cts +5 -5
- package/dist/ui/dialog/index.d.mts +7 -7
- package/dist/ui/dialog/index.mjs +1 -1
- package/dist/ui/dnd/index.cjs +1 -1
- package/dist/ui/dnd/index.d.cts +2 -2
- package/dist/ui/dnd/index.mjs +1 -1
- package/dist/ui/dropdown/index.cjs +1 -1
- package/dist/ui/dropdown/index.d.cts +16 -44
- package/dist/ui/dropdown/index.d.mts +16 -44
- package/dist/ui/dropdown/index.mjs +1 -1
- package/dist/ui/image/index.cjs +1 -1
- package/dist/ui/image/index.d.cts +3 -45
- package/dist/ui/image/index.d.mts +3 -45
- package/dist/ui/image/index.mjs +1 -1
- package/dist/ui/input/index.cjs +1 -0
- package/dist/ui/input/index.d.cts +22 -0
- package/dist/ui/input/index.d.mts +22 -0
- package/dist/ui/input/index.mjs +1 -0
- package/dist/ui/motion-dialog/index.cjs +1 -1
- package/dist/ui/motion-dialog/index.mjs +1 -1
- package/dist/ui/radius-handler/index.cjs +1 -0
- package/dist/ui/radius-handler/index.d.cts +17 -0
- package/dist/ui/radius-handler/index.d.mts +17 -0
- package/dist/ui/radius-handler/index.mjs +1 -0
- package/dist/ui/sheet/index.cjs +1 -1
- package/dist/ui/sheet/index.d.cts +2 -2
- package/dist/ui/sheet/index.d.mts +2 -2
- package/dist/ui/sheet/index.mjs +1 -1
- package/dist/ui/skeleton/index.cjs +1 -0
- package/dist/ui/skeleton/index.d.cts +26 -0
- package/dist/ui/skeleton/index.d.mts +26 -0
- package/dist/ui/skeleton/index.mjs +1 -0
- package/dist/ui/stable-text/index.cjs +1 -0
- package/dist/ui/stable-text/index.d.cts +13 -0
- package/dist/ui/stable-text/index.d.mts +13 -0
- package/dist/ui/stable-text/index.mjs +1 -0
- package/dist/ui/switch/index.cjs +1 -1
- package/dist/ui/switch/index.d.cts +1 -15
- package/dist/ui/switch/index.d.mts +1 -15
- package/dist/ui/switch/index.mjs +1 -1
- package/dist/ui/tooltip/index.cjs +1 -1
- package/dist/ui/tooltip/index.d.cts +2 -2
- package/dist/ui/tooltip/index.d.mts +2 -2
- package/dist/ui/tooltip/index.mjs +1 -1
- package/dist/use-delay-unmount-CNNJXNX5.cjs +1 -0
- package/dist/use-delay-unmount-_wzkutyv.mjs +1 -0
- package/dist/use-drag-resize--3PrrhJj.mjs +1 -0
- package/dist/use-drag-resize-BO3zANv3.cjs +1 -0
- package/dist/use-outside-click-BS2UOXoV.cjs +1 -0
- package/dist/use-outside-click-tsaJo3cz.mjs +1 -0
- package/dist/use-subset-image-B9ZSiVjx.mjs +1 -0
- package/dist/use-subset-image-BUurDItP.cjs +1 -0
- package/dist/util/browser/index.cjs +1 -0
- package/dist/util/{browser.d.cts → browser/index.d.cts} +1 -1
- package/dist/util/{browser.d.mts → browser/index.d.mts} +1 -1
- package/dist/util/common/index.cjs +1 -0
- package/dist/util/{common.d.cts → common/index.d.cts} +5 -5
- package/dist/util/{common.d.mts → common/index.d.mts} +5 -5
- package/dist/{common-ZUMpASnc.mjs → util/common/index.mjs} +1 -1
- package/dist/util/date/index.cjs +1 -0
- package/dist/util/{date.d.cts → date/index.d.cts} +1 -1
- package/dist/util/{date.d.mts → date/index.d.mts} +1 -1
- package/dist/util/editor/index.cjs +1 -0
- package/dist/util/editor/index.d.cts +55 -0
- package/dist/util/editor/index.d.mts +55 -0
- package/dist/util/editor/index.mjs +1 -0
- package/dist/util/fetcher/index.d.cts +2 -0
- package/dist/util/fetcher/index.d.mts +2 -0
- package/dist/util/file/index.cjs +1 -0
- package/dist/util/{file.d.mts → file/index.d.cts} +2 -2
- package/dist/util/{file.d.cts → file/index.d.mts} +2 -2
- package/dist/util/file/index.mjs +1 -0
- package/dist/util/format/index.cjs +1 -0
- package/dist/util/format/index.d.cts +6 -0
- package/dist/util/format/index.d.mts +6 -0
- package/dist/util/format/index.mjs +1 -0
- package/dist/util/generator/index.cjs +1 -0
- package/dist/util/{generator.d.cts → generator/index.d.cts} +1 -1
- package/dist/util/{generator.d.mts → generator/index.d.mts} +1 -1
- package/dist/util/phone/index.cjs +1 -0
- package/dist/util/{phone.d.cts → phone/index.d.cts} +1 -1
- package/dist/util/{phone.d.mts → phone/index.d.mts} +1 -1
- package/package.json +151 -108
- package/dist/button-CQZuaIU7.mjs +0 -1
- package/dist/button-ChX3XGbR.cjs +0 -1
- package/dist/common-B8HXyhZa.cjs +0 -1
- package/dist/common-CWHkXe0F.mjs +0 -1
- package/dist/common-D4sUwkFd.cjs +0 -1
- package/dist/file-5mweNdAM.cjs +0 -1
- package/dist/format-1_RTNUQv.mjs +0 -1
- package/dist/format-DEuImTYJ.cjs +0 -1
- package/dist/hooks/common/index.cjs +0 -1
- package/dist/hooks/common/index.d.cts +0 -72
- package/dist/hooks/common/index.d.mts +0 -72
- package/dist/hooks/common/index.mjs +0 -1
- package/dist/hooks/use-snackbar.cjs +0 -1
- package/dist/skeleton-B5ZccRFX.cjs +0 -1
- package/dist/skeleton-Y22bmaaB.mjs +0 -1
- package/dist/src-6KfzqI9Z.cjs +0 -1
- package/dist/src-CIMlbgv1.mjs +0 -1
- package/dist/ui/index.cjs +0 -1
- package/dist/ui/index.d.cts +0 -92
- package/dist/ui/index.d.mts +0 -92
- package/dist/ui/index.mjs +0 -1
- package/dist/ui/preserve-focus-button/index.cjs +0 -1
- package/dist/ui/preserve-focus-button/index.d.cts +0 -12
- package/dist/ui/preserve-focus-button/index.d.mts +0 -12
- package/dist/ui/preserve-focus-button/index.mjs +0 -1
- package/dist/ui-Bs9PP9eC.cjs +0 -1
- package/dist/ui-D2DoC_0E.mjs +0 -1
- package/dist/use-drag-resize-BdeLdulk.mjs +0 -1
- package/dist/use-drag-resize-DEgcua2U.d.cts +0 -48
- package/dist/use-drag-resize-DRHPv5RK.d.mts +0 -48
- package/dist/use-drag-resize-DeDqPC4h.cjs +0 -1
- package/dist/use-subset-image-Df2fCrtH.mjs +0 -1
- package/dist/use-subset-image-o_gmC1HL.cjs +0 -1
- package/dist/util/browser.cjs +0 -1
- package/dist/util/common.cjs +0 -1
- package/dist/util/common.mjs +0 -1
- package/dist/util/date.cjs +0 -1
- package/dist/util/editor.cjs +0 -1
- package/dist/util/editor.d.cts +0 -21
- package/dist/util/editor.d.mts +0 -21
- package/dist/util/editor.mjs +0 -1
- package/dist/util/file.cjs +0 -1
- package/dist/util/file.mjs +0 -1
- package/dist/util/format.cjs +0 -1
- package/dist/util/format.d.cts +0 -34
- package/dist/util/format.d.mts +0 -34
- package/dist/util/format.mjs +0 -1
- package/dist/util/generator.cjs +0 -1
- package/dist/util/phone.cjs +0 -1
- /package/dist/hooks/{use-snackbar.mjs → use-snackbar/index.mjs} +0 -0
- /package/dist/{use-dialog-stack-YiLs-sNf.cjs → use-dialog-stack-CH2nhH1Q.cjs} +0 -0
- /package/dist/{use-dialog-stack-Crj8YWJl.mjs → use-dialog-stack-nI1GTvfl.mjs} +0 -0
- /package/dist/util/{browser.mjs → browser/index.mjs} +0 -0
- /package/dist/util/{date.mjs → date/index.mjs} +0 -0
- /package/dist/util/{fetcher.cjs → fetcher/index.cjs} +0 -0
- /package/dist/util/{fetcher.mjs → fetcher/index.mjs} +0 -0
- /package/dist/util/{generator.mjs → generator/index.mjs} +0 -0
- /package/dist/util/{phone.mjs → phone/index.mjs} +0 -0
package/dist/ui/dialog/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";const e=require(`../../chunk-Bmb41Sf3.cjs`)
|
|
1
|
+
"use client";const e=require(`../../chunk-Bmb41Sf3.cjs`),t=require(`../../use-delay-unmount-CNNJXNX5.cjs`),n=require(`../../use-dialog-stack-CH2nhH1Q.cjs`);let r=require(`class-variance-authority`),i=require(`react`),a=require(`react/jsx-runtime`);const o=(0,r.cva)(`komc:relative komc:z-10 komc:flex komc:min-h-0 komc:flex-col komc:overflow-hidden komc:w-full komc:max-h-full komc:min-w-0 komc:transition-all komc:duration-300 komc:ease-in-out`,{variants:{padding:{sm:`komc:p-2`,md:`komc:p-4`,lg:`komc:p-6`,none:`komc:p-0`},maxWidth:{sm:`komc:max-w-sm`,md:`komc:max-w-md`,lg:`komc:max-w-lg`,xl:`komc:max-w-xl`,"2xl":`komc:max-w-2xl`,full:`komc:max-w-full`}},defaultVariants:{padding:`sm`,maxWidth:`md`}});function s({closeOnBackdropClick:e=!0,isOpen:r,zIndex:s=1e4,padding:c,maxWidth:l,className:u,onClose:d,children:f,...p}){let m=t.t(r,300),[h,g]=(0,i.useState)(!1);n.t(r,d),(0,i.useEffect)(()=>{if(r&&m){let e=setTimeout(()=>g(!0),10);return()=>clearTimeout(e)}else r||g(!1)},[r,m]);let _=(0,i.useCallback)(()=>{e&&d()},[e,d]);return m?(0,a.jsx)(`div`,{"data-komc":!0,className:`komc:fixed komc:inset-0 komc:flex komc:min-h-0 komc:flex-col komc:overflow-hidden`,style:{zIndex:s},children:(0,a.jsxs)(`div`,{className:`komc:relative komc:flex komc:min-h-0 komc:flex-1 komc:w-full komc:items-center komc:justify-center`,children:[(0,a.jsx)(`button`,{type:`button`,"data-state":h?`open`:`closed`,className:`komc:fixed komc:inset-0 komc:z-0 komc:cursor-default komc:bg-black/50 komc:transition-opacity komc:duration-300 komc:ease-in-out komc:data-[state=closed]:opacity-0 komc:data-[state=open]:opacity-100`,onClick:_,"aria-label":`close dialog`}),(0,a.jsx)(`div`,{"data-state":h?`open`:`closed`,className:`${o({padding:c,maxWidth:l,className:u})} komc:data-[state=closed]:opacity-0 komc:data-[state=open]:opacity-100 komc:data-[state=closed]:scale-95 komc:data-[state=open]:scale-100`,role:`dialog`,"aria-modal":`true`,...p,children:f})]})}):null}exports.Dialog=s;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
1
2
|
import { HTMLAttributes, ReactNode } from "react";
|
|
2
|
-
import * as class_variance_authority_types0 from "class-variance-authority/types";
|
|
3
3
|
import { VariantProps } from "class-variance-authority";
|
|
4
|
-
import * as
|
|
4
|
+
import * as class_variance_authority_types0 from "class-variance-authority/types";
|
|
5
5
|
|
|
6
6
|
//#region src/ui/dialog/dialog.d.ts
|
|
7
7
|
declare const classes: (props?: ({
|
|
8
|
-
padding?: "
|
|
9
|
-
maxWidth?: "sm" | "
|
|
8
|
+
padding?: "none" | "sm" | "lg" | "md" | null | undefined;
|
|
9
|
+
maxWidth?: "sm" | "lg" | "md" | "xl" | "2xl" | "full" | null | undefined;
|
|
10
10
|
} & class_variance_authority_types0.ClassProp) | undefined) => string;
|
|
11
11
|
interface DialogProps extends HTMLAttributes<HTMLDivElement>, VariantProps<typeof classes> {
|
|
12
12
|
closeOnBackdropClick?: boolean;
|
|
@@ -25,6 +25,6 @@ declare function Dialog({
|
|
|
25
25
|
onClose,
|
|
26
26
|
children,
|
|
27
27
|
...rest
|
|
28
|
-
}: DialogProps):
|
|
28
|
+
}: DialogProps): react_jsx_runtime0.JSX.Element | null;
|
|
29
29
|
//#endregion
|
|
30
30
|
export { Dialog, type DialogProps };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { HTMLAttributes, ReactNode } from "react";
|
|
2
|
-
import * as react_jsx_runtime8 from "react/jsx-runtime";
|
|
3
1
|
import { VariantProps } from "class-variance-authority";
|
|
4
|
-
import
|
|
2
|
+
import { HTMLAttributes, ReactNode } from "react";
|
|
3
|
+
import * as react_jsx_runtime20 from "react/jsx-runtime";
|
|
4
|
+
import * as class_variance_authority_types5 from "class-variance-authority/types";
|
|
5
5
|
|
|
6
6
|
//#region src/ui/dialog/dialog.d.ts
|
|
7
7
|
declare const classes: (props?: ({
|
|
8
|
-
padding?: "
|
|
9
|
-
maxWidth?: "sm" | "
|
|
10
|
-
} &
|
|
8
|
+
padding?: "none" | "sm" | "lg" | "md" | null | undefined;
|
|
9
|
+
maxWidth?: "sm" | "lg" | "md" | "xl" | "2xl" | "full" | null | undefined;
|
|
10
|
+
} & class_variance_authority_types5.ClassProp) | undefined) => string;
|
|
11
11
|
interface DialogProps extends HTMLAttributes<HTMLDivElement>, VariantProps<typeof classes> {
|
|
12
12
|
closeOnBackdropClick?: boolean;
|
|
13
13
|
isOpen: boolean;
|
|
@@ -25,6 +25,6 @@ declare function Dialog({
|
|
|
25
25
|
onClose,
|
|
26
26
|
children,
|
|
27
27
|
...rest
|
|
28
|
-
}: DialogProps):
|
|
28
|
+
}: DialogProps): react_jsx_runtime20.JSX.Element | null;
|
|
29
29
|
//#endregion
|
|
30
30
|
export { Dialog, type DialogProps };
|
package/dist/ui/dialog/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import
|
|
1
|
+
"use client";import{t as e}from"../../use-delay-unmount-_wzkutyv.mjs";import{t}from"../../use-dialog-stack-nI1GTvfl.mjs";import{cva as n}from"class-variance-authority";import{useCallback as r,useEffect as i,useState as a}from"react";import{jsx as o,jsxs as s}from"react/jsx-runtime";const c=n(`komc:relative komc:z-10 komc:flex komc:min-h-0 komc:flex-col komc:overflow-hidden komc:w-full komc:max-h-full komc:min-w-0 komc:transition-all komc:duration-300 komc:ease-in-out`,{variants:{padding:{sm:`komc:p-2`,md:`komc:p-4`,lg:`komc:p-6`,none:`komc:p-0`},maxWidth:{sm:`komc:max-w-sm`,md:`komc:max-w-md`,lg:`komc:max-w-lg`,xl:`komc:max-w-xl`,"2xl":`komc:max-w-2xl`,full:`komc:max-w-full`}},defaultVariants:{padding:`sm`,maxWidth:`md`}});function l({closeOnBackdropClick:n=!0,isOpen:l,zIndex:u=1e4,padding:d,maxWidth:f,className:p,onClose:m,children:h,...g}){let _=e(l,300),[v,y]=a(!1);t(l,m),i(()=>{if(l&&_){let e=setTimeout(()=>y(!0),10);return()=>clearTimeout(e)}else l||y(!1)},[l,_]);let b=r(()=>{n&&m()},[n,m]);return _?o(`div`,{"data-komc":!0,className:`komc:fixed komc:inset-0 komc:flex komc:min-h-0 komc:flex-col komc:overflow-hidden`,style:{zIndex:u},children:s(`div`,{className:`komc:relative komc:flex komc:min-h-0 komc:flex-1 komc:w-full komc:items-center komc:justify-center`,children:[o(`button`,{type:`button`,"data-state":v?`open`:`closed`,className:`komc:fixed komc:inset-0 komc:z-0 komc:cursor-default komc:bg-black/50 komc:transition-opacity komc:duration-300 komc:ease-in-out komc:data-[state=closed]:opacity-0 komc:data-[state=open]:opacity-100`,onClick:b,"aria-label":`close dialog`}),o(`div`,{"data-state":v?`open`:`closed`,className:`${c({padding:d,maxWidth:f,className:p})} komc:data-[state=closed]:opacity-0 komc:data-[state=open]:opacity-100 komc:data-[state=closed]:scale-95 komc:data-[state=open]:scale-100`,role:`dialog`,"aria-modal":`true`,...g,children:h})]})}):null}export{l as Dialog};
|
package/dist/ui/dnd/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";const e=require(`../../
|
|
1
|
+
"use client";const e=require(`../../dnd-DHNRwFj8.cjs`);exports.DndItem=e.t;
|
package/dist/ui/dnd/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import * as react_jsx_runtime3 from "react/jsx-runtime";
|
|
1
2
|
import { ReactNode } from "react";
|
|
2
|
-
import * as react_jsx_runtime10 from "react/jsx-runtime";
|
|
3
3
|
import { DraggableAttributes } from "@dnd-kit/core";
|
|
4
4
|
import { useSortable } from "@dnd-kit/sortable";
|
|
5
5
|
|
|
@@ -12,6 +12,6 @@ interface DndItemProps {
|
|
|
12
12
|
declare function DndItem({
|
|
13
13
|
id,
|
|
14
14
|
render
|
|
15
|
-
}: DndItemProps):
|
|
15
|
+
}: DndItemProps): react_jsx_runtime3.JSX.Element;
|
|
16
16
|
//#endregion
|
|
17
17
|
export { DndItem };
|
package/dist/ui/dnd/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{
|
|
1
|
+
"use client";import{t as e}from"../../dnd-CeWNVM-V.mjs";export{e as DndItem};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";const e=require(`../../chunk-Bmb41Sf3.cjs`),t=require(`../../
|
|
1
|
+
"use client";const e=require(`../../chunk-Bmb41Sf3.cjs`),t=require(`../../use-dialog-stack-CH2nhH1Q.cjs`);let n=require(`react`),r=require(`clsx`);r=e.t(r);let i=require(`react/jsx-runtime`),a=require(`@floating-ui/react`);const o=(0,n.createContext)(null);function s(){return(0,n.useContext)(o)||{open:!1,setOpen:()=>{},close:()=>{}}}function c({trigger:e,reference:s,children:c,placement:l=`bottom-start`,boundary:u,offset:d=8,maxWidth:f,maxHeight:p=300,className:m,open:h,onOpenChange:g,preserveFocus:_=!0,zIndex:v=99999}){let y=h!==void 0,[b,x]=(0,n.useState)(!1),S=y?h:b,C=(0,n.useCallback)(e=>{y||x(e),g?.(e)},[y,g]),w=(0,n.useCallback)(()=>C(!1),[C]),T=(0,n.useMemo)(()=>({open:S,setOpen:C,close:w}),[S,C,w]);t.t(S,w);let{refs:{setReference:E,setFloating:D,setPositionReference:O},floatingStyles:k,isPositioned:A,context:j}=(0,a.useFloating)({open:S,onOpenChange:C,placement:l,strategy:`fixed`,whileElementsMounted:a.autoUpdate,middleware:[(0,a.offset)(d),(0,a.flip)({boundary:u??void 0,fallbackStrategy:`initialPlacement`,padding:8}),(0,a.shift)({boundary:u??void 0,padding:8}),(0,a.size)({boundary:u??void 0,padding:8,apply({availableHeight:e,availableWidth:t,elements:n}){let r={maxHeight:`${Math.min(e,p??1/0)}px`,overflowY:`auto`};f!=null&&(r.maxWidth=`${Math.min(t,f)}px`),Object.assign(n.floating.style,r)}})]}),{getReferenceProps:M,getFloatingProps:N}=(0,a.useInteractions)([(0,a.useClick)(j,{enabled:!!e}),(0,a.useDismiss)(j,{outsidePress:!1,escapeKey:!1}),(0,a.useRole)(j,{role:`menu`})]);return(0,n.useLayoutEffect)(()=>{s&&(O(s),e||E(s))},[s,O,E,e]),(0,i.jsxs)(i.Fragment,{children:[e!=null&&e!==!1&&(0,i.jsx)(`span`,{"data-komc":!0,className:`komc:inline-flex`,ref:E,...M(),children:e}),S&&(0,i.jsx)(a.FloatingPortal,{children:(0,i.jsxs)(`div`,{"data-komc":!0,className:`komc:fixed komc:inset-0`,style:{zIndex:v},children:[(0,i.jsx)(`button`,{type:`button`,tabIndex:-1,"aria-label":`Close dropdown`,className:`komc:absolute komc:inset-0 komc:cursor-default komc:bg-transparent`,onPointerDown:e=>{e.preventDefault(),C(!1)}}),(0,i.jsx)(`div`,{ref:D,style:{...k,visibility:A?`visible`:`hidden`},className:(0,r.default)(`komc:mt-0.5 komc:drop-shadow-md`,m),...N({tabIndex:-1,onPointerDown:_?e=>{e.preventDefault()}:void 0}),children:(0,i.jsx)(o.Provider,{value:T,children:c})})]})})]})}exports.Dropdown=c,exports.useDropdown=s;
|
|
@@ -1,11 +1,18 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { Placement, VirtualElement
|
|
1
|
+
import * as react_jsx_runtime53 from "react/jsx-runtime";
|
|
2
|
+
import { ReactNode } from "react";
|
|
3
|
+
import { Placement, VirtualElement } from "@floating-ui/react";
|
|
4
4
|
|
|
5
5
|
//#region src/ui/dropdown/dropdown.d.ts
|
|
6
|
+
type DropdownReference = VirtualElement;
|
|
7
|
+
interface DropdownContextValue {
|
|
8
|
+
open: boolean;
|
|
9
|
+
setOpen: (open: boolean) => void;
|
|
10
|
+
close: () => void;
|
|
11
|
+
}
|
|
12
|
+
declare function useDropdown(): DropdownContextValue;
|
|
6
13
|
interface DropdownProps {
|
|
7
|
-
trigger?:
|
|
8
|
-
reference?:
|
|
14
|
+
trigger?: ReactNode;
|
|
15
|
+
reference?: DropdownReference | null;
|
|
9
16
|
children: ReactNode;
|
|
10
17
|
placement?: Placement;
|
|
11
18
|
boundary?: Element | null;
|
|
@@ -16,7 +23,7 @@ interface DropdownProps {
|
|
|
16
23
|
open?: boolean;
|
|
17
24
|
onOpenChange?: (open: boolean) => void;
|
|
18
25
|
preserveFocus?: boolean;
|
|
19
|
-
|
|
26
|
+
zIndex?: number;
|
|
20
27
|
}
|
|
21
28
|
declare function Dropdown({
|
|
22
29
|
trigger,
|
|
@@ -31,42 +38,7 @@ declare function Dropdown({
|
|
|
31
38
|
open: controlledOpen,
|
|
32
39
|
onOpenChange,
|
|
33
40
|
preserveFocus,
|
|
34
|
-
|
|
35
|
-
}: DropdownProps):
|
|
36
|
-
//#endregion
|
|
37
|
-
//#region src/ui/dropdown/dropdown-trigger.d.ts
|
|
38
|
-
interface DropdownTriggerProps extends ComponentProps<'button'> {
|
|
39
|
-
asChild?: boolean;
|
|
40
|
-
}
|
|
41
|
-
declare function DropdownTrigger({
|
|
42
|
-
asChild,
|
|
43
|
-
className,
|
|
44
|
-
type,
|
|
45
|
-
...rest
|
|
46
|
-
}: DropdownTriggerProps): react_jsx_runtime17.JSX.Element;
|
|
47
|
-
//#endregion
|
|
48
|
-
//#region src/ui/dropdown/dropdown-content.d.ts
|
|
49
|
-
type DropdownContentProps = ComponentProps<'div'>;
|
|
50
|
-
declare function DropdownContent({
|
|
51
|
-
className,
|
|
52
|
-
children,
|
|
53
|
-
onMouseDown,
|
|
54
|
-
onClick,
|
|
55
|
-
...rest
|
|
56
|
-
}: DropdownContentProps): react_jsx_runtime17.JSX.Element | null;
|
|
57
|
-
//#endregion
|
|
58
|
-
//#region src/ui/dropdown/dropdown-context.d.ts
|
|
59
|
-
interface DropdownContextValue {
|
|
60
|
-
open: boolean;
|
|
61
|
-
setOpen: (open: boolean) => void;
|
|
62
|
-
close: () => void;
|
|
63
|
-
refs: ReturnType<typeof useFloating>['refs'];
|
|
64
|
-
floatingStyles: CSSProperties;
|
|
65
|
-
getReferenceProps: ReturnType<typeof useInteractions>['getReferenceProps'];
|
|
66
|
-
getFloatingProps: ReturnType<typeof useInteractions>['getFloatingProps'];
|
|
67
|
-
preserveFocus: boolean;
|
|
68
|
-
}
|
|
69
|
-
declare function useDropdown(): DropdownContextValue;
|
|
70
|
-
declare function useOptionalDropdown(): DropdownContextValue | null;
|
|
41
|
+
zIndex
|
|
42
|
+
}: DropdownProps): react_jsx_runtime53.JSX.Element;
|
|
71
43
|
//#endregion
|
|
72
|
-
export { Dropdown,
|
|
44
|
+
export { Dropdown, type DropdownProps, type DropdownReference, useDropdown };
|
|
@@ -1,11 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import * as
|
|
3
|
-
import { Placement, VirtualElement
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
import * as react_jsx_runtime46 from "react/jsx-runtime";
|
|
3
|
+
import { Placement, VirtualElement } from "@floating-ui/react";
|
|
4
4
|
|
|
5
5
|
//#region src/ui/dropdown/dropdown.d.ts
|
|
6
|
+
type DropdownReference = VirtualElement;
|
|
7
|
+
interface DropdownContextValue {
|
|
8
|
+
open: boolean;
|
|
9
|
+
setOpen: (open: boolean) => void;
|
|
10
|
+
close: () => void;
|
|
11
|
+
}
|
|
12
|
+
declare function useDropdown(): DropdownContextValue;
|
|
6
13
|
interface DropdownProps {
|
|
7
|
-
trigger?:
|
|
8
|
-
reference?:
|
|
14
|
+
trigger?: ReactNode;
|
|
15
|
+
reference?: DropdownReference | null;
|
|
9
16
|
children: ReactNode;
|
|
10
17
|
placement?: Placement;
|
|
11
18
|
boundary?: Element | null;
|
|
@@ -16,7 +23,7 @@ interface DropdownProps {
|
|
|
16
23
|
open?: boolean;
|
|
17
24
|
onOpenChange?: (open: boolean) => void;
|
|
18
25
|
preserveFocus?: boolean;
|
|
19
|
-
|
|
26
|
+
zIndex?: number;
|
|
20
27
|
}
|
|
21
28
|
declare function Dropdown({
|
|
22
29
|
trigger,
|
|
@@ -31,42 +38,7 @@ declare function Dropdown({
|
|
|
31
38
|
open: controlledOpen,
|
|
32
39
|
onOpenChange,
|
|
33
40
|
preserveFocus,
|
|
34
|
-
|
|
35
|
-
}: DropdownProps):
|
|
36
|
-
//#endregion
|
|
37
|
-
//#region src/ui/dropdown/dropdown-trigger.d.ts
|
|
38
|
-
interface DropdownTriggerProps extends ComponentProps<'button'> {
|
|
39
|
-
asChild?: boolean;
|
|
40
|
-
}
|
|
41
|
-
declare function DropdownTrigger({
|
|
42
|
-
asChild,
|
|
43
|
-
className,
|
|
44
|
-
type,
|
|
45
|
-
...rest
|
|
46
|
-
}: DropdownTriggerProps): react_jsx_runtime5.JSX.Element;
|
|
47
|
-
//#endregion
|
|
48
|
-
//#region src/ui/dropdown/dropdown-content.d.ts
|
|
49
|
-
type DropdownContentProps = ComponentProps<'div'>;
|
|
50
|
-
declare function DropdownContent({
|
|
51
|
-
className,
|
|
52
|
-
children,
|
|
53
|
-
onMouseDown,
|
|
54
|
-
onClick,
|
|
55
|
-
...rest
|
|
56
|
-
}: DropdownContentProps): react_jsx_runtime5.JSX.Element | null;
|
|
57
|
-
//#endregion
|
|
58
|
-
//#region src/ui/dropdown/dropdown-context.d.ts
|
|
59
|
-
interface DropdownContextValue {
|
|
60
|
-
open: boolean;
|
|
61
|
-
setOpen: (open: boolean) => void;
|
|
62
|
-
close: () => void;
|
|
63
|
-
refs: ReturnType<typeof useFloating>['refs'];
|
|
64
|
-
floatingStyles: CSSProperties;
|
|
65
|
-
getReferenceProps: ReturnType<typeof useInteractions>['getReferenceProps'];
|
|
66
|
-
getFloatingProps: ReturnType<typeof useInteractions>['getFloatingProps'];
|
|
67
|
-
preserveFocus: boolean;
|
|
68
|
-
}
|
|
69
|
-
declare function useDropdown(): DropdownContextValue;
|
|
70
|
-
declare function useOptionalDropdown(): DropdownContextValue | null;
|
|
41
|
+
zIndex
|
|
42
|
+
}: DropdownProps): react_jsx_runtime46.JSX.Element;
|
|
71
43
|
//#endregion
|
|
72
|
-
export { Dropdown,
|
|
44
|
+
export { Dropdown, type DropdownProps, type DropdownReference, useDropdown };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{
|
|
1
|
+
"use client";import{t as e}from"../../use-dialog-stack-nI1GTvfl.mjs";import{createContext as t,useCallback as n,useContext as r,useLayoutEffect as i,useMemo as a,useState as o}from"react";import s from"clsx";import{Fragment as c,jsx as l,jsxs as u}from"react/jsx-runtime";import{FloatingPortal as d,autoUpdate as f,flip as p,offset as m,shift as h,size as g,useClick as _,useDismiss as v,useFloating as y,useInteractions as b,useRole as x}from"@floating-ui/react";const S=t(null);function C(){return r(S)||{open:!1,setOpen:()=>{},close:()=>{}}}function w({trigger:t,reference:r,children:C,placement:w=`bottom-start`,boundary:T,offset:E=8,maxWidth:D,maxHeight:O=300,className:k,open:A,onOpenChange:j,preserveFocus:M=!0,zIndex:N=99999}){let P=A!==void 0,[F,I]=o(!1),L=P?A:F,R=n(e=>{P||I(e),j?.(e)},[P,j]),z=n(()=>R(!1),[R]),B=a(()=>({open:L,setOpen:R,close:z}),[L,R,z]);e(L,z);let{refs:{setReference:V,setFloating:H,setPositionReference:U},floatingStyles:W,isPositioned:G,context:K}=y({open:L,onOpenChange:R,placement:w,strategy:`fixed`,whileElementsMounted:f,middleware:[m(E),p({boundary:T??void 0,fallbackStrategy:`initialPlacement`,padding:8}),h({boundary:T??void 0,padding:8}),g({boundary:T??void 0,padding:8,apply({availableHeight:e,availableWidth:t,elements:n}){let r={maxHeight:`${Math.min(e,O??1/0)}px`,overflowY:`auto`};D!=null&&(r.maxWidth=`${Math.min(t,D)}px`),Object.assign(n.floating.style,r)}})]}),{getReferenceProps:q,getFloatingProps:J}=b([_(K,{enabled:!!t}),v(K,{outsidePress:!1,escapeKey:!1}),x(K,{role:`menu`})]);return i(()=>{r&&(U(r),t||V(r))},[r,U,V,t]),u(c,{children:[t!=null&&t!==!1&&l(`span`,{"data-komc":!0,className:`komc:inline-flex`,ref:V,...q(),children:t}),L&&l(d,{children:u(`div`,{"data-komc":!0,className:`komc:fixed komc:inset-0`,style:{zIndex:N},children:[l(`button`,{type:`button`,tabIndex:-1,"aria-label":`Close dropdown`,className:`komc:absolute komc:inset-0 komc:cursor-default komc:bg-transparent`,onPointerDown:e=>{e.preventDefault(),R(!1)}}),l(`div`,{ref:H,style:{...W,visibility:G?`visible`:`hidden`},className:s(`komc:mt-0.5 komc:drop-shadow-md`,k),...J({tabIndex:-1,onPointerDown:M?e=>{e.preventDefault()}:void 0}),children:l(S.Provider,{value:B,children:C})})]})})]})}export{w as Dropdown,C as useDropdown};
|
package/dist/ui/image/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";
|
|
1
|
+
"use client";require(`../../src-Dz1mULYA.cjs`),require(`../../file-DeZ1OKdy.cjs`),require(`../../api-client-BXH8Rm-J.cjs`),require(`../../use-subset-image-BUurDItP.cjs`),require(`../../skeleton-7P1IZD3G.cjs`);const e=require(`../../image-kIL2PjTS.cjs`);exports.BaseImage=e.t,exports.EmptyNode=e.n,exports.Image=e.r;
|
|
@@ -1,45 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
//#region src/ui/image/image.d.ts
|
|
6
|
-
interface ImageSubsetProps {
|
|
7
|
-
layout?: 'intrinsic' | 'stretch';
|
|
8
|
-
skeleton?: boolean;
|
|
9
|
-
emptyNode?: React.ReactNode;
|
|
10
|
-
emptyNodeClassName?: string;
|
|
11
|
-
skeletonClassName?: string;
|
|
12
|
-
}
|
|
13
|
-
type ImageProps = UseSubsetImageProps & ImageSubsetProps;
|
|
14
|
-
declare const BaseImage: react1.ForwardRefExoticComponent<(Omit<BaseProps & {
|
|
15
|
-
fill: true;
|
|
16
|
-
sizes: string;
|
|
17
|
-
width?: never;
|
|
18
|
-
height?: never;
|
|
19
|
-
}, "ref"> | Omit<BaseProps & {
|
|
20
|
-
fill?: false;
|
|
21
|
-
sizes?: never;
|
|
22
|
-
width: number;
|
|
23
|
-
height: number;
|
|
24
|
-
}, "ref">) & react1.RefAttributes<HTMLImageElement>>;
|
|
25
|
-
declare const Image: react1.ForwardRefExoticComponent<(Omit<BaseProps & {
|
|
26
|
-
fill: true;
|
|
27
|
-
sizes: string;
|
|
28
|
-
width?: never;
|
|
29
|
-
height?: never;
|
|
30
|
-
} & ImageSubsetProps, "ref"> | Omit<BaseProps & {
|
|
31
|
-
fill?: false;
|
|
32
|
-
sizes?: never;
|
|
33
|
-
width: number;
|
|
34
|
-
height: number;
|
|
35
|
-
} & ImageSubsetProps, "ref">) & react1.RefAttributes<HTMLImageElement>>;
|
|
36
|
-
interface EmptyNodeProps {
|
|
37
|
-
children: React.ReactNode;
|
|
38
|
-
className?: string;
|
|
39
|
-
}
|
|
40
|
-
declare const EmptyNode: ({
|
|
41
|
-
children,
|
|
42
|
-
className
|
|
43
|
-
}: EmptyNodeProps) => react_jsx_runtime15.JSX.Element;
|
|
44
|
-
//#endregion
|
|
45
|
-
export { BaseImage, EmptyNode, type EmptyNodeProps, Image, type ImageProps, type ImageSubsetProps };
|
|
1
|
+
import "../../index-DHyXKIBX.cjs";
|
|
2
|
+
import { a as ImageProps, i as Image, n as EmptyNode, o as ImageSubsetProps, r as EmptyNodeProps, t as BaseImage } from "../../index-D_Hfb-z2.cjs";
|
|
3
|
+
export { BaseImage, EmptyNode, EmptyNodeProps, Image, ImageProps, ImageSubsetProps };
|
|
@@ -1,45 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
//#region src/ui/image/image.d.ts
|
|
6
|
-
interface ImageSubsetProps {
|
|
7
|
-
layout?: 'intrinsic' | 'stretch';
|
|
8
|
-
skeleton?: boolean;
|
|
9
|
-
emptyNode?: React.ReactNode;
|
|
10
|
-
emptyNodeClassName?: string;
|
|
11
|
-
skeletonClassName?: string;
|
|
12
|
-
}
|
|
13
|
-
type ImageProps = UseSubsetImageProps & ImageSubsetProps;
|
|
14
|
-
declare const BaseImage: react1.ForwardRefExoticComponent<(Omit<BaseProps & {
|
|
15
|
-
fill: true;
|
|
16
|
-
sizes: string;
|
|
17
|
-
width?: never;
|
|
18
|
-
height?: never;
|
|
19
|
-
}, "ref"> | Omit<BaseProps & {
|
|
20
|
-
fill?: false;
|
|
21
|
-
sizes?: never;
|
|
22
|
-
width: number;
|
|
23
|
-
height: number;
|
|
24
|
-
}, "ref">) & react1.RefAttributes<HTMLImageElement>>;
|
|
25
|
-
declare const Image: react1.ForwardRefExoticComponent<(Omit<BaseProps & {
|
|
26
|
-
fill: true;
|
|
27
|
-
sizes: string;
|
|
28
|
-
width?: never;
|
|
29
|
-
height?: never;
|
|
30
|
-
} & ImageSubsetProps, "ref"> | Omit<BaseProps & {
|
|
31
|
-
fill?: false;
|
|
32
|
-
sizes?: never;
|
|
33
|
-
width: number;
|
|
34
|
-
height: number;
|
|
35
|
-
} & ImageSubsetProps, "ref">) & react1.RefAttributes<HTMLImageElement>>;
|
|
36
|
-
interface EmptyNodeProps {
|
|
37
|
-
children: React.ReactNode;
|
|
38
|
-
className?: string;
|
|
39
|
-
}
|
|
40
|
-
declare const EmptyNode: ({
|
|
41
|
-
children,
|
|
42
|
-
className
|
|
43
|
-
}: EmptyNodeProps) => react_jsx_runtime3.JSX.Element;
|
|
44
|
-
//#endregion
|
|
45
|
-
export { BaseImage, EmptyNode, type EmptyNodeProps, Image, type ImageProps, type ImageSubsetProps };
|
|
1
|
+
import "../../index-DxW8JBva.mjs";
|
|
2
|
+
import { a as ImageProps, i as Image, n as EmptyNode, o as ImageSubsetProps, r as EmptyNodeProps, t as BaseImage } from "../../index-DSVr-P8y.mjs";
|
|
3
|
+
export { BaseImage, EmptyNode, EmptyNodeProps, Image, ImageProps, ImageSubsetProps };
|
package/dist/ui/image/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import"../../src-
|
|
1
|
+
"use client";import"../../src-BB55dPBE.mjs";import"../../file-CapBKYce.mjs";import"../../api-client-xK3Ua3Gr.mjs";import"../../use-subset-image-B9ZSiVjx.mjs";import"../../skeleton-D4Q9wT-o.mjs";import{n as e,r as t,t as n}from"../../image-CAEWHuaM.mjs";export{n as BaseImage,e as EmptyNode,t as Image};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`../../chunk-Bmb41Sf3.cjs`);let t=require(`class-variance-authority`),n=require(`react`),r=require(`clsx`);r=e.t(r);let i=require(`react/jsx-runtime`);const a=(0,t.cva)((0,r.default)(`komc:flex komc:items-center komc:w-full komc:px-2`,`komc:[&>input]:outline-none komc:[&>input]:w-full`,`komc:[&>input]:focus:ring-0 komc:[&>input]:focus:ring-offset-0`,`komc:[&>input]:h-full`),{variants:{size:{xs:`komc:h-7.5`,sm:`komc:h-8`,base:`komc:h-9`,md:`komc:h-10`,lg:`komc:h-11`,xl:`komc:h-12`,"2xl":`komc:h-13`,"3xl":`komc:h-14`},gap:{none:`komc:gap-0`,xs:`komc:gap-1`,sm:`komc:gap-2`,md:`komc:gap-3`,lg:`komc:gap-4`,xl:`komc:gap-5`},outline:{line:`komc:border`,solid:`komc:border-transparent`,clear:`komc:border-none`,dashed:`komc:border-dashed`,dotted:`komc:border-dotted`},rounded:{none:`komc:rounded-none`,sm:`komc:rounded-sm`,md:`komc:rounded-md`,lg:`komc:rounded-lg`,xl:`komc:rounded-xl`,"2xl":`komc:rounded-2xl`}}}),o=(0,n.forwardRef)(({prefix:e=null,surffix:t=null,size:n=`lg`,gap:r=`xl`,outline:o=`line`,rounded:s=`lg`,className:c,...l},u)=>(0,i.jsxs)(`div`,{"data-komc":!0,className:a({size:n,gap:r,outline:o,rounded:s,className:c}),children:[e,(0,i.jsx)(`input`,{ref:u,type:`text`,...l}),t]}));var s=o;exports.Input=s;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as react36 from "react";
|
|
2
|
+
import { VariantProps } from "class-variance-authority";
|
|
3
|
+
import * as class_variance_authority_types10 from "class-variance-authority/types";
|
|
4
|
+
|
|
5
|
+
//#region src/ui/input/input.d.ts
|
|
6
|
+
declare const classes: (props?: ({
|
|
7
|
+
size?: "xs" | "sm" | "base" | "lg" | "md" | "xl" | "2xl" | "3xl" | null | undefined;
|
|
8
|
+
gap?: "none" | "xs" | "sm" | "lg" | "md" | "xl" | null | undefined;
|
|
9
|
+
outline?: "line" | "solid" | "clear" | "dashed" | "dotted" | null | undefined;
|
|
10
|
+
rounded?: "none" | "sm" | "lg" | "md" | "xl" | "2xl" | null | undefined;
|
|
11
|
+
} & class_variance_authority_types10.ClassProp) | undefined) => string;
|
|
12
|
+
interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'prefix' | 'surffix' | 'size'>, VariantProps<typeof classes> {
|
|
13
|
+
size?: VariantProps<typeof classes>['size'];
|
|
14
|
+
gap?: VariantProps<typeof classes>['gap'];
|
|
15
|
+
outline?: VariantProps<typeof classes>['outline'];
|
|
16
|
+
rounded?: VariantProps<typeof classes>['rounded'];
|
|
17
|
+
prefix?: React.ReactNode;
|
|
18
|
+
surffix?: React.ReactNode;
|
|
19
|
+
}
|
|
20
|
+
declare const Input: react36.ForwardRefExoticComponent<InputProps & react36.RefAttributes<HTMLInputElement>>;
|
|
21
|
+
//#endregion
|
|
22
|
+
export { Input, type InputProps };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { VariantProps } from "class-variance-authority";
|
|
2
|
+
import * as react34 from "react";
|
|
3
|
+
import * as class_variance_authority_types9 from "class-variance-authority/types";
|
|
4
|
+
|
|
5
|
+
//#region src/ui/input/input.d.ts
|
|
6
|
+
declare const classes: (props?: ({
|
|
7
|
+
size?: "xs" | "sm" | "base" | "lg" | "md" | "xl" | "2xl" | "3xl" | null | undefined;
|
|
8
|
+
gap?: "none" | "xs" | "sm" | "lg" | "md" | "xl" | null | undefined;
|
|
9
|
+
outline?: "line" | "solid" | "clear" | "dashed" | "dotted" | null | undefined;
|
|
10
|
+
rounded?: "none" | "sm" | "lg" | "md" | "xl" | "2xl" | null | undefined;
|
|
11
|
+
} & class_variance_authority_types9.ClassProp) | undefined) => string;
|
|
12
|
+
interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'prefix' | 'surffix' | 'size'>, VariantProps<typeof classes> {
|
|
13
|
+
size?: VariantProps<typeof classes>['size'];
|
|
14
|
+
gap?: VariantProps<typeof classes>['gap'];
|
|
15
|
+
outline?: VariantProps<typeof classes>['outline'];
|
|
16
|
+
rounded?: VariantProps<typeof classes>['rounded'];
|
|
17
|
+
prefix?: React.ReactNode;
|
|
18
|
+
surffix?: React.ReactNode;
|
|
19
|
+
}
|
|
20
|
+
declare const Input: react34.ForwardRefExoticComponent<InputProps & react34.RefAttributes<HTMLInputElement>>;
|
|
21
|
+
//#endregion
|
|
22
|
+
export { Input, type InputProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{cva as e}from"class-variance-authority";import{forwardRef as t}from"react";import n from"clsx";import{jsx as r,jsxs as i}from"react/jsx-runtime";const a=e(n(`komc:flex komc:items-center komc:w-full komc:px-2`,`komc:[&>input]:outline-none komc:[&>input]:w-full`,`komc:[&>input]:focus:ring-0 komc:[&>input]:focus:ring-offset-0`,`komc:[&>input]:h-full`),{variants:{size:{xs:`komc:h-7.5`,sm:`komc:h-8`,base:`komc:h-9`,md:`komc:h-10`,lg:`komc:h-11`,xl:`komc:h-12`,"2xl":`komc:h-13`,"3xl":`komc:h-14`},gap:{none:`komc:gap-0`,xs:`komc:gap-1`,sm:`komc:gap-2`,md:`komc:gap-3`,lg:`komc:gap-4`,xl:`komc:gap-5`},outline:{line:`komc:border`,solid:`komc:border-transparent`,clear:`komc:border-none`,dashed:`komc:border-dashed`,dotted:`komc:border-dotted`},rounded:{none:`komc:rounded-none`,sm:`komc:rounded-sm`,md:`komc:rounded-md`,lg:`komc:rounded-lg`,xl:`komc:rounded-xl`,"2xl":`komc:rounded-2xl`}}});var o=t(({prefix:e=null,surffix:t=null,size:n=`lg`,gap:o=`xl`,outline:s=`line`,rounded:c=`lg`,className:l,...u},d)=>i(`div`,{"data-komc":!0,className:a({size:n,gap:o,outline:s,rounded:c,className:l}),children:[e,r(`input`,{ref:d,type:`text`,...u}),t]}));export{o as Input};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";const e=require(`../../chunk-Bmb41Sf3.cjs`),t=require(`../../
|
|
1
|
+
"use client";const e=require(`../../chunk-Bmb41Sf3.cjs`),t=require(`../../use-dialog-stack-CH2nhH1Q.cjs`);let n=require(`class-variance-authority`),r=require(`react`);r=e.t(r);let i=require(`clsx`);i=e.t(i);let a=require(`react/jsx-runtime`),o=require(`motion/react`),s=require(`react-dom`);const c={sm:`komc:max-w-md`,md:`komc:max-w-lg`,lg:`komc:max-w-2xl`,xl:`komc:max-w-4xl`,"2xl":`komc:max-w-6xl`,full:`komc:max-w-full komc:mx-4`},l={scale:{hidden:{opacity:0,scale:.8,y:20},visible:{opacity:1,scale:1,y:0,transition:{type:`spring`,damping:25,stiffness:300}},exit:{opacity:0,scale:.8,y:20,transition:{duration:.2}}},slide:{hidden:{opacity:0,x:300},visible:{opacity:1,x:0,transition:{type:`spring`,damping:25,stiffness:300}},exit:{opacity:0,x:300,transition:{duration:.3}}},fade:{hidden:{opacity:0},visible:{opacity:1,transition:{duration:.3}},exit:{opacity:0,transition:{duration:.2}}},"slide-up":{hidden:{opacity:0,y:100},visible:{opacity:1,y:0,transition:{type:`spring`,damping:25,stiffness:300}},exit:{opacity:0,y:100,transition:{duration:.3}}}},u={hidden:{opacity:0},visible:{opacity:1},exit:{opacity:0}},d=(0,n.cva)(`komc:flex komc:items-center komc:justify-between`,{variants:{padding:{none:void 0,sm:`komc:p-2`,md:`komc:p-4`,lg:`komc:p-6`},border:{none:``,default:`komc:border-b komc:border-gray-200`},closeButtonPosition:{none:void 0,fixed:`komc:[&>button]:absolute komc:[&>button]:right-6 komc:[&>button]:top-10`}},defaultVariants:{padding:`lg`,border:`default`,closeButtonPosition:`none`}}),f=(0,r.forwardRef)(({isOpen:e,onClose:n,children:f,title:p,footer:m,size:h=`md`,animation:g=`scale`,showCloseButton:_=!0,closeOnBackdropClick:v=!0,className:y=``,showBackdrop:b=!0,isScrollableContent:x=!1,zIndex:S=1e4,customAnimation:C,headerClassName:w,onExitComplete:T},E)=>{let D=(0,r.useId)(),[O,k]=(0,r.useState)(!1);t.t(e,n),(0,r.useEffect)(()=>{k(!0)},[]);let A=()=>{v&&n()},j=C||l[g];return O?(0,s.createPortal)((0,a.jsx)(o.AnimatePresence,{mode:`wait`,onExitComplete:T,children:e&&(0,a.jsxs)(o.motion.div,{"data-komc":!0,className:`komc:fixed komc:inset-0 komc:flex komc:items-center komc:justify-center komc:p-4`,style:{zIndex:S},variants:u,initial:`hidden`,animate:`visible`,exit:`exit`,children:[b&&(0,a.jsx)(o.motion.div,{className:`komc:absolute komc:bg-black/50`,style:{zIndex:-1,top:`50%`,left:`50%`,width:`100vw`,height:`100vh`,transform:`translate(-50%, -50%)`},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:A}),(0,a.jsxs)(o.motion.div,{ref:E,id:D,role:`dialog`,"aria-modal":`true`,"aria-labelledby":typeof p==`string`?`${D}-title`:void 0,className:(0,i.default)(`komc:relative komc:bg-white komc:rounded-lg komc:shadow-xl komc:pointer-events-auto`,h===`full`?`komc:w-full komc:h-full`:(0,i.default)(c[h],`komc:w-full`),y),variants:j,initial:`hidden`,animate:`visible`,exit:`exit`,layout:!0,children:[(p||_)&&(0,a.jsxs)(o.motion.div,{className:d({padding:w?.padding,border:w?.border,closeButtonPosition:w?.closeButtonPosition}),initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{delay:.1},children:[p&&(typeof p==`string`?(0,a.jsx)(`h2`,{id:`${D}-title`,className:`komc:text-lg komc:font-semibold komc:text-gray-900`,children:p}):p),_&&(0,a.jsx)(o.motion.button,{type:`button`,onClick:n,className:`komc:p-1 komc:rounded-full komc:hover:bg-gray-100 komc:transition-colors`,"aria-label":`Close dialog`,whileHover:{scale:1.1},whileTap:{scale:.9},children:(0,a.jsx)(`svg`,{className:`komc:w-5 komc:h-5 komc:text-neutral-500`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`,children:(0,a.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M6 18L18 6M6 6l12 12`})})})]}),(0,a.jsx)(o.motion.div,{className:(0,i.default)(`komc:@container/dialog-content`,`komc:p-6`,x&&`komc:overflow-y-auto komc:h-[60vh]`),initial:{opacity:0},animate:{opacity:1},transition:{delay:.2},children:f}),m&&(0,a.jsx)(o.motion.div,{className:`komc:flex komc:items-center komc:justify-between komc:p-6 komc:border-t komc:border-gray-200`,initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.3},children:m})]})]})}),document.body):null});var p=f;exports.MotionDialog=p;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{
|
|
1
|
+
"use client";import{t as e}from"../../use-dialog-stack-nI1GTvfl.mjs";import{cva as t}from"class-variance-authority";import n,{forwardRef as r,useEffect as i,useId as a,useState as o}from"react";import s from"clsx";import{jsx as c,jsxs as l}from"react/jsx-runtime";import{AnimatePresence as u,motion as d}from"motion/react";import{createPortal as f}from"react-dom";const p={sm:`komc:max-w-md`,md:`komc:max-w-lg`,lg:`komc:max-w-2xl`,xl:`komc:max-w-4xl`,"2xl":`komc:max-w-6xl`,full:`komc:max-w-full komc:mx-4`},m={scale:{hidden:{opacity:0,scale:.8,y:20},visible:{opacity:1,scale:1,y:0,transition:{type:`spring`,damping:25,stiffness:300}},exit:{opacity:0,scale:.8,y:20,transition:{duration:.2}}},slide:{hidden:{opacity:0,x:300},visible:{opacity:1,x:0,transition:{type:`spring`,damping:25,stiffness:300}},exit:{opacity:0,x:300,transition:{duration:.3}}},fade:{hidden:{opacity:0},visible:{opacity:1,transition:{duration:.3}},exit:{opacity:0,transition:{duration:.2}}},"slide-up":{hidden:{opacity:0,y:100},visible:{opacity:1,y:0,transition:{type:`spring`,damping:25,stiffness:300}},exit:{opacity:0,y:100,transition:{duration:.3}}}},h={hidden:{opacity:0},visible:{opacity:1},exit:{opacity:0}},g=t(`komc:flex komc:items-center komc:justify-between`,{variants:{padding:{none:void 0,sm:`komc:p-2`,md:`komc:p-4`,lg:`komc:p-6`},border:{none:``,default:`komc:border-b komc:border-gray-200`},closeButtonPosition:{none:void 0,fixed:`komc:[&>button]:absolute komc:[&>button]:right-6 komc:[&>button]:top-10`}},defaultVariants:{padding:`lg`,border:`default`,closeButtonPosition:`none`}});var _=r(({isOpen:t,onClose:n,children:r,title:_,footer:v,size:y=`md`,animation:b=`scale`,showCloseButton:x=!0,closeOnBackdropClick:S=!0,className:C=``,showBackdrop:w=!0,isScrollableContent:T=!1,zIndex:E=1e4,customAnimation:D,headerClassName:O,onExitComplete:k},A)=>{let j=a(),[M,N]=o(!1);e(t,n),i(()=>{N(!0)},[]);let P=()=>{S&&n()},F=D||m[b];return M?f(c(u,{mode:`wait`,onExitComplete:k,children:t&&l(d.div,{"data-komc":!0,className:`komc:fixed komc:inset-0 komc:flex komc:items-center komc:justify-center komc:p-4`,style:{zIndex:E},variants:h,initial:`hidden`,animate:`visible`,exit:`exit`,children:[w&&c(d.div,{className:`komc:absolute komc:bg-black/50`,style:{zIndex:-1,top:`50%`,left:`50%`,width:`100vw`,height:`100vh`,transform:`translate(-50%, -50%)`},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:P}),l(d.div,{ref:A,id:j,role:`dialog`,"aria-modal":`true`,"aria-labelledby":typeof _==`string`?`${j}-title`:void 0,className:s(`komc:relative komc:bg-white komc:rounded-lg komc:shadow-xl komc:pointer-events-auto`,y===`full`?`komc:w-full komc:h-full`:s(p[y],`komc:w-full`),C),variants:F,initial:`hidden`,animate:`visible`,exit:`exit`,layout:!0,children:[(_||x)&&l(d.div,{className:g({padding:O?.padding,border:O?.border,closeButtonPosition:O?.closeButtonPosition}),initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{delay:.1},children:[_&&(typeof _==`string`?c(`h2`,{id:`${j}-title`,className:`komc:text-lg komc:font-semibold komc:text-gray-900`,children:_}):_),x&&c(d.button,{type:`button`,onClick:n,className:`komc:p-1 komc:rounded-full komc:hover:bg-gray-100 komc:transition-colors`,"aria-label":`Close dialog`,whileHover:{scale:1.1},whileTap:{scale:.9},children:c(`svg`,{className:`komc:w-5 komc:h-5 komc:text-neutral-500`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`,children:c(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M6 18L18 6M6 6l12 12`})})})]}),c(d.div,{className:s(`komc:@container/dialog-content`,`komc:p-6`,T&&`komc:overflow-y-auto komc:h-[60vh]`),initial:{opacity:0},animate:{opacity:1},transition:{delay:.2},children:r}),v&&c(d.div,{className:`komc:flex komc:items-center komc:justify-between komc:p-6 komc:border-t komc:border-gray-200`,initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.3},children:v})]})]})}),document.body):null});export{_ as MotionDialog};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";const e=require(`../../chunk-Bmb41Sf3.cjs`);let t=require(`react`),n=require(`clsx`);n=e.t(n);let r=require(`react/jsx-runtime`),i=require(`motion/react`);const a=12;function o({min:e=0,max:a=100,value:o=0,onChange:c=()=>{}}){let[l,u]=(0,t.useState)(!1),d=(0,t.useRef)(null),f=(0,i.useMotionValue)(0);return(0,t.useEffect)(()=>{if(d.current){let t=d.current.offsetWidth-12,n=Math.min(o,a);n!==o&&c?.(n);let r=(n-e)/(a-e)*t;f.set(r)}},[o,e,a,f,c]),(0,r.jsx)(`div`,{className:`flex items-center w-full h-7 bg-neutral-50 rounded-md px-1 shadow-sm`,onDragStart:e=>e.preventDefault(),children:(0,r.jsx)(`div`,{ref:d,className:`flex w-full h-2 bg-white rounded-full relative select-none touch-none`,children:(0,r.jsx)(i.motion.div,{className:`flex shrink-0 aspect-square top-0 left-0 z-2 absolute select-none touch-none`,style:{x:f,width:`12px`,height:`12px`},drag:`x`,dragElastic:0,dragMomentum:!1,dragConstraints:d,onDragStart:()=>{u(!0)},onDrag:(t,n)=>{if(!d.current)return;let r=d.current.offsetWidth-12,i=n.point.x-d.current.getBoundingClientRect().left-10;i=Math.max(0,Math.min(r,i));let o=Math.round(i/r*(a-e)+e);c?.(Math.max(e,Math.min(a,o)))},onDragEnd:(e,t)=>{if(u(!1),!d.current)return;let n=d.current.offsetWidth-12,r=t.point.x-d.current.getBoundingClientRect().left-10;r=Math.max(0,Math.min(n,r)),f.set(r)},children:(0,r.jsx)(`div`,{className:(0,n.default)(`w-full h-full bg-orange-500 rounded-full absolute -top-0.5 left-0 cursor-grab`,l&&`cursor-grabbing`),children:(0,r.jsx)(s,{isDragging:l,value:o})})})})})}const s=({isDragging:e,value:t})=>(0,r.jsxs)(`div`,{className:(0,n.default)(`flex w-fit bg-white text-xs rounded-md px-2 relative`,`absolute bottom-full left-1/2 -translate-x-1/2 -translate-y-1 drop-shadow-md`,e?`visible`:`invisible`),children:[`${t}%`,(0,r.jsx)(`div`,{className:`absolute top-full left-1/2 -translate-x-1/2 w-0 h-0`,style:{borderLeft:`4px solid transparent`,borderRight:`4px solid transparent`,borderTop:`4px solid white`}})]});exports.RadiusHandler=o;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as react_jsx_runtime13 from "react/jsx-runtime";
|
|
2
|
+
|
|
3
|
+
//#region src/ui/radius-handler/radius-handler.d.ts
|
|
4
|
+
interface RadiusHandlerProps {
|
|
5
|
+
min?: number;
|
|
6
|
+
max?: number;
|
|
7
|
+
value?: number;
|
|
8
|
+
onChange?: (value: number) => void;
|
|
9
|
+
}
|
|
10
|
+
declare function RadiusHandler({
|
|
11
|
+
min,
|
|
12
|
+
max,
|
|
13
|
+
value,
|
|
14
|
+
onChange
|
|
15
|
+
}: RadiusHandlerProps): react_jsx_runtime13.JSX.Element;
|
|
16
|
+
//#endregion
|
|
17
|
+
export { RadiusHandler, type RadiusHandlerProps };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as react_jsx_runtime45 from "react/jsx-runtime";
|
|
2
|
+
|
|
3
|
+
//#region src/ui/radius-handler/radius-handler.d.ts
|
|
4
|
+
interface RadiusHandlerProps {
|
|
5
|
+
min?: number;
|
|
6
|
+
max?: number;
|
|
7
|
+
value?: number;
|
|
8
|
+
onChange?: (value: number) => void;
|
|
9
|
+
}
|
|
10
|
+
declare function RadiusHandler({
|
|
11
|
+
min,
|
|
12
|
+
max,
|
|
13
|
+
value,
|
|
14
|
+
onChange
|
|
15
|
+
}: RadiusHandlerProps): react_jsx_runtime45.JSX.Element;
|
|
16
|
+
//#endregion
|
|
17
|
+
export { RadiusHandler, type RadiusHandlerProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{useEffect as e,useRef as t,useState as n}from"react";import r from"clsx";import{jsx as i,jsxs as a}from"react/jsx-runtime";import{motion as o,useMotionValue as s}from"motion/react";function c({min:a=0,max:c=100,value:u=0,onChange:d=()=>{}}){let[f,p]=n(!1),m=t(null),h=s(0);return e(()=>{if(m.current){let e=m.current.offsetWidth-12,t=Math.min(u,c);t!==u&&d?.(t);let n=(t-a)/(c-a)*e;h.set(n)}},[u,a,c,h,d]),i(`div`,{className:`flex items-center w-full h-7 bg-neutral-50 rounded-md px-1 shadow-sm`,onDragStart:e=>e.preventDefault(),children:i(`div`,{ref:m,className:`flex w-full h-2 bg-white rounded-full relative select-none touch-none`,children:i(o.div,{className:`flex shrink-0 aspect-square top-0 left-0 z-2 absolute select-none touch-none`,style:{x:h,width:`12px`,height:`12px`},drag:`x`,dragElastic:0,dragMomentum:!1,dragConstraints:m,onDragStart:()=>{p(!0)},onDrag:(e,t)=>{if(!m.current)return;let n=m.current.offsetWidth-12,r=t.point.x-m.current.getBoundingClientRect().left-10;r=Math.max(0,Math.min(n,r));let i=Math.round(r/n*(c-a)+a);d?.(Math.max(a,Math.min(c,i)))},onDragEnd:(e,t)=>{if(p(!1),!m.current)return;let n=m.current.offsetWidth-12,r=t.point.x-m.current.getBoundingClientRect().left-10;r=Math.max(0,Math.min(n,r)),h.set(r)},children:i(`div`,{className:r(`w-full h-full bg-orange-500 rounded-full absolute -top-0.5 left-0 cursor-grab`,f&&`cursor-grabbing`),children:i(l,{isDragging:f,value:u})})})})})}const l=({isDragging:e,value:t})=>a(`div`,{className:r(`flex w-fit bg-white text-xs rounded-md px-2 relative`,`absolute bottom-full left-1/2 -translate-x-1/2 -translate-y-1 drop-shadow-md`,e?`visible`:`invisible`),children:[`${t}%`,i(`div`,{className:`absolute top-full left-1/2 -translate-x-1/2 w-0 h-0`,style:{borderLeft:`4px solid transparent`,borderRight:`4px solid transparent`,borderTop:`4px solid white`}})]});export{c as RadiusHandler};
|
package/dist/ui/sheet/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";const e=require(`../../chunk-Bmb41Sf3.cjs`)
|
|
1
|
+
"use client";const e=require(`../../chunk-Bmb41Sf3.cjs`),t=require(`../../use-delay-unmount-CNNJXNX5.cjs`),n=require(`../../use-dialog-stack-CH2nhH1Q.cjs`);let r=require(`class-variance-authority`),i=require(`react`);i=e.t(i);let a=require(`clsx`);a=e.t(a);let o=require(`react/jsx-runtime`);const s=(0,r.cva)((0,a.default)(`komc:absolute komc:bg-white komc:flex komc:flex-col komc:shadow-2xl`,`komc:transition-transform komc:duration-300 komc:ease-in-out`),{variants:{direction:{top:`komc:top-0 komc:left-0 komc:right-0 komc:-translate-y-full komc:data-[state=open]:translate-y-0`,bottom:`komc:bottom-0 komc:left-0 komc:right-0 komc:translate-y-full komc:data-[state=open]:translate-y-0`,left:`komc:top-0 komc:bottom-0 komc:left-0 komc:-translate-x-full komc:data-[state=open]:translate-x-0`,right:`komc:top-0 komc:bottom-0 komc:right-0 komc:translate-x-full komc:data-[state=open]:translate-x-0`}}}),c=(0,r.cva)(``,{variants:{size:{full:``,half:``,auto:``},direction:{top:``,bottom:``,left:``,right:``}},compoundVariants:[{size:`full`,direction:`top`,className:`komc:h-full`},{size:`full`,direction:`bottom`,className:`komc:h-full`},{size:`full`,direction:`left`,className:`komc:w-full`},{size:`full`,direction:`right`,className:`komc:w-full`},{size:`half`,direction:`top`,className:`komc:h-[50dvh]`},{size:`half`,direction:`bottom`,className:`komc:h-[50dvh]`},{size:`half`,direction:`left`,className:`komc:w-[50dvw]`},{size:`half`,direction:`right`,className:`komc:w-[50dvw]`},{size:`auto`,direction:`top`,className:`komc:h-auto komc:max-h-[90dvh]`},{size:`auto`,direction:`bottom`,className:`komc:h-auto komc:max-h-[90dvh]`},{size:`auto`,direction:`left`,className:`komc:w-auto komc:max-w-[90dvw]`},{size:`auto`,direction:`right`,className:`komc:w-auto komc:max-w-[90dvw]`}]});function l({isOpen:e,onClose:r,direction:l=`bottom`,size:u=`full`,children:d,className:f,closeOnBackdropClick:p=!0,zIndex:m=1001}){let h=t.t(e,300),[g,_]=(0,i.useState)(!1);n.t(e,r),(0,i.useEffect)(()=>{if(e&&h){let e=setTimeout(()=>_(!0),10);return()=>clearTimeout(e)}else e||_(!1)},[e,h]);let v=(0,i.useCallback)(()=>{p&&r()},[p,r]);return h?(0,o.jsxs)(`aside`,{"data-komc":!0,className:`komc:fixed komc:inset-0 komc:flex komc:justify-center komc:items-center`,style:{zIndex:m},children:[(0,o.jsx)(`button`,{type:`button`,"data-state":g?`open`:`closed`,className:(0,a.default)(`komc:absolute komc:inset-0 komc:w-full komc:h-full komc:bg-black/40 komc:cursor-default`,`komc:transition-opacity komc:duration-300 komc:ease-in-out`,`komc:opacity-0 komc:data-[state=open]:opacity-100`),onClick:v,"aria-label":`close sheet`}),(0,o.jsx)(`section`,{"data-state":g?`open`:`closed`,className:(0,a.default)(s({direction:l,className:f}),c({direction:l,size:u})),role:`dialog`,"aria-modal":`true`,children:d})]}):null}exports.Sheet=l;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import * as react_jsx_runtime51 from "react/jsx-runtime";
|
|
1
2
|
import React from "react";
|
|
2
|
-
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/ui/sheet/sheet.d.ts
|
|
5
5
|
type Direction = 'top' | 'bottom' | 'left' | 'right';
|
|
@@ -23,6 +23,6 @@ declare function Sheet({
|
|
|
23
23
|
className,
|
|
24
24
|
closeOnBackdropClick,
|
|
25
25
|
zIndex
|
|
26
|
-
}: SheetProps):
|
|
26
|
+
}: SheetProps): react_jsx_runtime51.JSX.Element | null;
|
|
27
27
|
//#endregion
|
|
28
28
|
export { Sheet, type SheetProps };
|