@omnifyjp/ui 0.5.3 → 1.0.1
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 +3 -6
- package/dist/chunk-2C2HRGM7.js +51 -0
- package/dist/chunk-2C2HRGM7.js.map +1 -0
- package/dist/chunk-2TUWDXAC.js +196 -0
- package/dist/chunk-2TUWDXAC.js.map +1 -0
- package/dist/chunk-34ARZSNP.js +63 -0
- package/dist/chunk-34ARZSNP.js.map +1 -0
- package/dist/chunk-35DNN46W.js +13 -0
- package/dist/chunk-35DNN46W.js.map +1 -0
- package/dist/chunk-35U6QG4P.js +116 -0
- package/dist/chunk-35U6QG4P.js.map +1 -0
- package/dist/chunk-3EOHW4QN.js +35 -0
- package/dist/chunk-3EOHW4QN.js.map +1 -0
- package/dist/chunk-3VU56V66.js +41 -0
- package/dist/chunk-3VU56V66.js.map +1 -0
- package/dist/chunk-55E7D2HR.js +99 -0
- package/dist/chunk-55E7D2HR.js.map +1 -0
- package/dist/chunk-67YUL2ZS.js +53 -0
- package/dist/chunk-67YUL2ZS.js.map +1 -0
- package/dist/chunk-6DIDQ4TB.js +131 -0
- package/dist/chunk-6DIDQ4TB.js.map +1 -0
- package/dist/chunk-6GWVQB3Q.js +155 -0
- package/dist/chunk-6GWVQB3Q.js.map +1 -0
- package/dist/chunk-75WZR6HF.js +44 -0
- package/dist/chunk-75WZR6HF.js.map +1 -0
- package/dist/chunk-7IRLBU2I.js +114 -0
- package/dist/chunk-7IRLBU2I.js.map +1 -0
- package/dist/chunk-7RMTPT6O.js +99 -0
- package/dist/chunk-7RMTPT6O.js.map +1 -0
- package/dist/chunk-7XH3MGBR.js +128 -0
- package/dist/chunk-7XH3MGBR.js.map +1 -0
- package/dist/chunk-A3BB5ZOC.js +77 -0
- package/dist/chunk-A3BB5ZOC.js.map +1 -0
- package/dist/chunk-BAQWGQJG.js +106 -0
- package/dist/chunk-BAQWGQJG.js.map +1 -0
- package/dist/chunk-BRSM3SZP.js +46 -0
- package/dist/chunk-BRSM3SZP.js.map +1 -0
- package/dist/chunk-C34KSTWA.js +43 -0
- package/dist/chunk-C34KSTWA.js.map +1 -0
- package/dist/chunk-C5NZAOA7.js +54 -0
- package/dist/chunk-C5NZAOA7.js.map +1 -0
- package/dist/chunk-CUZR4JWM.js +23 -0
- package/dist/chunk-CUZR4JWM.js.map +1 -0
- package/dist/chunk-DGPY4WP3.js +11 -0
- package/dist/chunk-DGPY4WP3.js.map +1 -0
- package/dist/chunk-EWBCV7VA.js +65 -0
- package/dist/chunk-EWBCV7VA.js.map +1 -0
- package/dist/chunk-F2ZJLKDP.js +119 -0
- package/dist/chunk-F2ZJLKDP.js.map +1 -0
- package/dist/chunk-FLWMT4DB.js +66 -0
- package/dist/chunk-FLWMT4DB.js.map +1 -0
- package/dist/chunk-FRKG7JQY.js +48 -0
- package/dist/chunk-FRKG7JQY.js.map +1 -0
- package/dist/chunk-G7HTZBUR.js +187 -0
- package/dist/chunk-G7HTZBUR.js.map +1 -0
- package/dist/chunk-IAWKX5W4.js +219 -0
- package/dist/chunk-IAWKX5W4.js.map +1 -0
- package/dist/chunk-INLM7UJC.js +238 -0
- package/dist/chunk-INLM7UJC.js.map +1 -0
- package/dist/chunk-JAJMM32I.js +18 -0
- package/dist/chunk-JAJMM32I.js.map +1 -0
- package/dist/chunk-JJSVA3TH.js +61 -0
- package/dist/chunk-JJSVA3TH.js.map +1 -0
- package/dist/chunk-JLTBUACL.js +121 -0
- package/dist/chunk-JLTBUACL.js.map +1 -0
- package/dist/chunk-JRU2QX7T.js +38 -0
- package/dist/chunk-JRU2QX7T.js.map +1 -0
- package/dist/chunk-JXGRW2MR.js +17 -0
- package/dist/chunk-JXGRW2MR.js.map +1 -0
- package/dist/chunk-LMT327XH.js +56 -0
- package/dist/chunk-LMT327XH.js.map +1 -0
- package/dist/chunk-LTTNCAAA.js +138 -0
- package/dist/chunk-LTTNCAAA.js.map +1 -0
- package/dist/chunk-MJLFJPUG.js +143 -0
- package/dist/chunk-MJLFJPUG.js.map +1 -0
- package/dist/chunk-MZ2P566X.js +65 -0
- package/dist/chunk-MZ2P566X.js.map +1 -0
- package/dist/chunk-N47H4MHX.js +41 -0
- package/dist/chunk-N47H4MHX.js.map +1 -0
- package/dist/chunk-NNJTKHCE.js +160 -0
- package/dist/chunk-NNJTKHCE.js.map +1 -0
- package/dist/chunk-NPL2R5LD.js +171 -0
- package/dist/chunk-NPL2R5LD.js.map +1 -0
- package/dist/chunk-NU56GKGM.js +44 -0
- package/dist/chunk-NU56GKGM.js.map +1 -0
- package/dist/chunk-P3M5TZD2.js +24 -0
- package/dist/chunk-P3M5TZD2.js.map +1 -0
- package/dist/chunk-PGWNOZDX.js +28 -0
- package/dist/chunk-PGWNOZDX.js.map +1 -0
- package/dist/chunk-QB3UWRZH.js +92 -0
- package/dist/chunk-QB3UWRZH.js.map +1 -0
- package/dist/chunk-R2CDE5DO.js +33 -0
- package/dist/chunk-R2CDE5DO.js.map +1 -0
- package/dist/chunk-RQNZDWY3.js +65 -0
- package/dist/chunk-RQNZDWY3.js.map +1 -0
- package/dist/chunk-S6PDRGR5.js +109 -0
- package/dist/chunk-S6PDRGR5.js.map +1 -0
- package/dist/chunk-TGYQ3AKH.js +95 -0
- package/dist/chunk-TGYQ3AKH.js.map +1 -0
- package/dist/chunk-TJMK2KBE.js +112 -0
- package/dist/chunk-TJMK2KBE.js.map +1 -0
- package/dist/chunk-USIHM7FV.js +211 -0
- package/dist/chunk-USIHM7FV.js.map +1 -0
- package/dist/chunk-VVYSAGB3.js +104 -0
- package/dist/chunk-VVYSAGB3.js.map +1 -0
- package/dist/chunk-WD5KZE25.js +25 -0
- package/dist/chunk-WD5KZE25.js.map +1 -0
- package/dist/chunk-WL4ZO2H3.js +33 -0
- package/dist/chunk-WL4ZO2H3.js.map +1 -0
- package/dist/chunk-WRCHR4AK.js +23 -0
- package/dist/chunk-WRCHR4AK.js.map +1 -0
- package/dist/chunk-WS6E7HBT.js +39 -0
- package/dist/chunk-WS6E7HBT.js.map +1 -0
- package/dist/chunk-XOJJBNDX.js +33 -0
- package/dist/chunk-XOJJBNDX.js.map +1 -0
- package/dist/chunk-YBMEQZX7.js +164 -0
- package/dist/chunk-YBMEQZX7.js.map +1 -0
- package/dist/chunk-Z2QAABLM.js +86 -0
- package/dist/chunk-Z2QAABLM.js.map +1 -0
- package/dist/chunk-ZHEKDP5X.js +41 -0
- package/dist/chunk-ZHEKDP5X.js.map +1 -0
- package/dist/chunk-ZPMXRW2A.js +63 -0
- package/dist/chunk-ZPMXRW2A.js.map +1 -0
- package/dist/chunk-ZYEGBF7G.js +25 -0
- package/dist/chunk-ZYEGBF7G.js.map +1 -0
- package/dist/components/accordion.d.ts +37 -0
- package/dist/components/accordion.js +4 -0
- package/dist/components/accordion.js.map +1 -0
- package/dist/components/alert-dialog.d.ts +56 -0
- package/dist/components/alert-dialog.js +5 -0
- package/dist/components/alert-dialog.js.map +1 -0
- package/dist/components/alert.d.ts +68 -0
- package/dist/components/alert.js +4 -0
- package/dist/components/alert.js.map +1 -0
- package/dist/components/aspect-ratio.d.ts +23 -0
- package/dist/components/aspect-ratio.js +3 -0
- package/dist/components/aspect-ratio.js.map +1 -0
- package/dist/components/avatar.d.ts +48 -0
- package/dist/components/avatar.js +4 -0
- package/dist/components/avatar.js.map +1 -0
- package/dist/components/badge.d.ts +52 -0
- package/dist/components/badge.js +4 -0
- package/dist/components/badge.js.map +1 -0
- package/dist/components/breadcrumb.d.ts +50 -0
- package/dist/components/breadcrumb.js +4 -0
- package/dist/components/breadcrumb.js.map +1 -0
- package/dist/components/button.d.ts +81 -0
- package/dist/components/button.js +4 -0
- package/dist/components/button.js.map +1 -0
- package/dist/components/calendar-category-badge.d.ts +24 -0
- package/dist/components/calendar-category-badge.js +5 -0
- package/dist/components/calendar-category-badge.js.map +1 -0
- package/dist/components/calendar-event-chip.d.ts +41 -0
- package/dist/components/calendar-event-chip.js +30 -0
- package/dist/components/calendar-event-chip.js.map +1 -0
- package/dist/components/calendar-event-sheet.d.ts +68 -0
- package/dist/components/calendar-event-sheet.js +83 -0
- package/dist/components/calendar-event-sheet.js.map +1 -0
- package/dist/components/calendar-mini.d.ts +65 -0
- package/dist/components/calendar-mini.js +93 -0
- package/dist/components/calendar-mini.js.map +1 -0
- package/dist/components/calendar-toolbar.d.ts +58 -0
- package/dist/components/calendar-toolbar.js +54 -0
- package/dist/components/calendar-toolbar.js.map +1 -0
- package/dist/components/calendar.d.ts +19 -0
- package/dist/components/calendar.js +5 -0
- package/dist/components/calendar.js.map +1 -0
- package/dist/components/card.d.ts +43 -0
- package/dist/components/card.js +4 -0
- package/dist/components/card.js.map +1 -0
- package/dist/components/carousel.d.ts +53 -0
- package/dist/components/carousel.js +5 -0
- package/dist/components/carousel.js.map +1 -0
- package/dist/components/chart.d.ts +125 -0
- package/dist/components/chart.js +239 -0
- package/dist/components/chart.js.map +1 -0
- package/dist/components/checkbox.d.ts +24 -0
- package/dist/components/checkbox.js +4 -0
- package/dist/components/checkbox.js.map +1 -0
- package/dist/components/collapsible.d.ts +28 -0
- package/dist/components/collapsible.js +3 -0
- package/dist/components/collapsible.js.map +1 -0
- package/dist/components/color-picker.d.ts +35 -0
- package/dist/components/color-picker.js +7 -0
- package/dist/components/color-picker.js.map +1 -0
- package/dist/components/combobox.d.ts +98 -0
- package/dist/components/combobox.js +8 -0
- package/dist/components/combobox.js.map +1 -0
- package/dist/components/command.d.ts +63 -0
- package/dist/components/command.js +5 -0
- package/dist/components/command.js.map +1 -0
- package/dist/components/context-menu.d.ts +70 -0
- package/dist/components/context-menu.js +4 -0
- package/dist/components/context-menu.js.map +1 -0
- package/dist/components/date-picker.d.ts +71 -0
- package/dist/components/date-picker.js +90 -0
- package/dist/components/date-picker.js.map +1 -0
- package/dist/components/dialog.d.ts +58 -0
- package/dist/components/dialog.js +4 -0
- package/dist/components/dialog.js.map +1 -0
- package/dist/components/drawer.d.ts +60 -0
- package/dist/components/drawer.js +4 -0
- package/dist/components/drawer.js.map +1 -0
- package/dist/components/dropdown-menu.d.ts +76 -0
- package/dist/components/dropdown-menu.js +4 -0
- package/dist/components/dropdown-menu.js.map +1 -0
- package/dist/components/file-upload.d.ts +44 -0
- package/dist/components/file-upload.js +5 -0
- package/dist/components/file-upload.js.map +1 -0
- package/dist/components/form.d.ts +67 -0
- package/dist/components/form.js +111 -0
- package/dist/components/form.js.map +1 -0
- package/dist/components/hover-card.d.ts +43 -0
- package/dist/components/hover-card.js +4 -0
- package/dist/components/hover-card.js.map +1 -0
- package/dist/components/input-otp.d.ts +38 -0
- package/dist/components/input-otp.js +4 -0
- package/dist/components/input-otp.js.map +1 -0
- package/dist/components/input.d.ts +38 -0
- package/dist/components/input.js +4 -0
- package/dist/components/input.js.map +1 -0
- package/dist/components/label.d.ts +20 -0
- package/dist/components/label.js +4 -0
- package/dist/components/label.js.map +1 -0
- package/dist/components/menubar.d.ts +82 -0
- package/dist/components/menubar.js +4 -0
- package/dist/components/menubar.js.map +1 -0
- package/dist/components/navigation-menu.d.ts +64 -0
- package/dist/components/navigation-menu.js +4 -0
- package/dist/components/navigation-menu.js.map +1 -0
- package/dist/components/pagination.d.ts +59 -0
- package/dist/components/pagination.js +5 -0
- package/dist/components/pagination.js.map +1 -0
- package/dist/components/password-input.d.ts +32 -0
- package/dist/components/password-input.js +5 -0
- package/dist/components/password-input.js.map +1 -0
- package/dist/components/permission-grid.d.ts +67 -0
- package/dist/components/permission-grid.js +5 -0
- package/dist/components/permission-grid.js.map +1 -0
- package/dist/components/popover.d.ts +37 -0
- package/dist/components/popover.js +4 -0
- package/dist/components/popover.js.map +1 -0
- package/dist/components/progress.d.ts +20 -0
- package/dist/components/progress.js +4 -0
- package/dist/components/progress.js.map +1 -0
- package/dist/components/radio-group.d.ts +38 -0
- package/dist/components/radio-group.js +4 -0
- package/dist/components/radio-group.js.map +1 -0
- package/dist/components/rating.d.ts +35 -0
- package/dist/components/rating.js +4 -0
- package/dist/components/rating.js.map +1 -0
- package/dist/components/resizable.d.ts +36 -0
- package/dist/components/resizable.js +4 -0
- package/dist/components/resizable.js.map +1 -0
- package/dist/components/scope-tree.d.ts +78 -0
- package/dist/components/scope-tree.js +5 -0
- package/dist/components/scope-tree.js.map +1 -0
- package/dist/components/scope-type-badge.d.ts +35 -0
- package/dist/components/scope-type-badge.js +5 -0
- package/dist/components/scope-type-badge.js.map +1 -0
- package/dist/components/scroll-area.d.ts +29 -0
- package/dist/components/scroll-area.js +4 -0
- package/dist/components/scroll-area.js.map +1 -0
- package/dist/components/select.d.ts +52 -0
- package/dist/components/select.js +4 -0
- package/dist/components/select.js.map +1 -0
- package/dist/components/separator.d.ts +24 -0
- package/dist/components/separator.js +4 -0
- package/dist/components/separator.js.map +1 -0
- package/dist/components/sheet.d.ts +51 -0
- package/dist/components/sheet.js +4 -0
- package/dist/components/sheet.js.map +1 -0
- package/dist/components/skeleton.d.ts +25 -0
- package/dist/components/skeleton.js +4 -0
- package/dist/components/skeleton.js.map +1 -0
- package/dist/components/slider.d.ts +24 -0
- package/dist/components/slider.js +4 -0
- package/dist/components/slider.js.map +1 -0
- package/dist/components/slug-input.d.ts +50 -0
- package/dist/components/slug-input.js +6 -0
- package/dist/components/slug-input.js.map +1 -0
- package/dist/components/sonner.d.ts +22 -0
- package/dist/components/sonner.js +3 -0
- package/dist/components/sonner.js.map +1 -0
- package/dist/components/stage-type-badge.d.ts +30 -0
- package/dist/components/stage-type-badge.js +5 -0
- package/dist/components/stage-type-badge.js.map +1 -0
- package/dist/components/switch.d.ts +26 -0
- package/dist/components/switch.js +4 -0
- package/dist/components/switch.js.map +1 -0
- package/dist/components/table.d.ts +57 -0
- package/dist/components/table.js +4 -0
- package/dist/components/table.js.map +1 -0
- package/dist/components/tabs.d.ts +39 -0
- package/dist/components/tabs.js +4 -0
- package/dist/components/tabs.js.map +1 -0
- package/dist/components/tag-input.d.ts +40 -0
- package/dist/components/tag-input.js +5 -0
- package/dist/components/tag-input.js.map +1 -0
- package/dist/components/textarea.d.ts +21 -0
- package/dist/components/textarea.js +4 -0
- package/dist/components/textarea.js.map +1 -0
- package/dist/components/time-picker.d.ts +57 -0
- package/dist/components/time-picker.js +8 -0
- package/dist/components/time-picker.js.map +1 -0
- package/dist/components/toggle-group.d.ts +45 -0
- package/dist/components/toggle-group.js +5 -0
- package/dist/components/toggle-group.js.map +1 -0
- package/dist/components/toggle.d.ts +31 -0
- package/dist/components/toggle.js +4 -0
- package/dist/components/toggle.js.map +1 -0
- package/dist/components/tooltip.d.ts +34 -0
- package/dist/components/tooltip.js +4 -0
- package/dist/components/tooltip.js.map +1 -0
- package/dist/components/workflow-category-badge.d.ts +32 -0
- package/dist/components/workflow-category-badge.js +5 -0
- package/dist/components/workflow-category-badge.js.map +1 -0
- package/dist/components/workflow-diagram.d.ts +63 -0
- package/dist/components/workflow-diagram.js +5 -0
- package/dist/components/workflow-diagram.js.map +1 -0
- package/dist/components/workflow-status-badge.d.ts +30 -0
- package/dist/components/workflow-status-badge.js +5 -0
- package/dist/components/workflow-status-badge.js.map +1 -0
- package/dist/components/workflow-stepper.d.ts +52 -0
- package/dist/components/workflow-stepper.js +4 -0
- package/dist/components/workflow-stepper.js.map +1 -0
- package/dist/hooks/use-mobile.d.ts +3 -3
- package/dist/hooks/use-mobile.js +1 -1
- package/dist/hooks/use-mobile.js.map +1 -1
- package/dist/index.d.ts +98 -16
- package/dist/index.js +62 -13
- package/dist/lib/types.d.ts +84 -1
- package/dist/lib/types.js +1 -1
- package/dist/lib/types.js.map +1 -1
- package/dist/lib/utils.d.ts +5 -1
- package/dist/lib/utils.js +1 -1
- package/dist/lib/utils.js.map +1 -1
- package/package.json +68 -31
- package/src/styles/fonts.css +0 -0
- package/src/styles/index.css +3 -1
- package/src/styles/tailwind.css +4 -0
- package/src/styles/theme.css +461 -0
- package/dist/chunk-2GN4WIOV.js +0 -240
- package/dist/chunk-2GN4WIOV.js.map +0 -1
- package/dist/chunk-5BL4VFRJ.js +0 -57
- package/dist/chunk-5BL4VFRJ.js.map +0 -1
- package/dist/chunk-735JNJJO.js +0 -27
- package/dist/chunk-735JNJJO.js.map +0 -1
- package/dist/chunk-EJEVW4RO.js +0 -49
- package/dist/chunk-EJEVW4RO.js.map +0 -1
- package/dist/chunk-FVOQZTHE.js +0 -191
- package/dist/chunk-FVOQZTHE.js.map +0 -1
- package/dist/chunk-ITXOZ4IR.js +0 -85
- package/dist/chunk-ITXOZ4IR.js.map +0 -1
- package/dist/chunk-NVPNMQSR.js +0 -30
- package/dist/chunk-NVPNMQSR.js.map +0 -1
- package/dist/chunk-O25D7DCP.js +0 -72
- package/dist/chunk-O25D7DCP.js.map +0 -1
- package/dist/chunk-O2ADW2GC.js +0 -224
- package/dist/chunk-O2ADW2GC.js.map +0 -1
- package/dist/chunk-OY3PSPA5.js +0 -661
- package/dist/chunk-OY3PSPA5.js.map +0 -1
- package/dist/chunk-UASABUQA.js +0 -39
- package/dist/chunk-UASABUQA.js.map +0 -1
- package/dist/chunk-UR2QLIS2.js +0 -93
- package/dist/chunk-UR2QLIS2.js.map +0 -1
- package/dist/chunk-XDXGUPCR.js +0 -123
- package/dist/chunk-XDXGUPCR.js.map +0 -1
- package/dist/components/AppShell.d.ts +0 -27
- package/dist/components/AppShell.js +0 -13
- package/dist/components/AppShell.js.map +0 -1
- package/dist/components/Header.d.ts +0 -11
- package/dist/components/Header.js +0 -9
- package/dist/components/Header.js.map +0 -1
- package/dist/components/LanguageSelector.d.ts +0 -11
- package/dist/components/LanguageSelector.js +0 -5
- package/dist/components/LanguageSelector.js.map +0 -1
- package/dist/components/OrganizationSelector.d.ts +0 -8
- package/dist/components/OrganizationSelector.js +0 -4
- package/dist/components/OrganizationSelector.js.map +0 -1
- package/dist/components/OrganizationSetupModal.d.ts +0 -5
- package/dist/components/OrganizationSetupModal.js +0 -4
- package/dist/components/OrganizationSetupModal.js.map +0 -1
- package/dist/components/PageContainer.d.ts +0 -105
- package/dist/components/PageContainer.js +0 -3
- package/dist/components/PageContainer.js.map +0 -1
- package/dist/components/ServiceMenu.d.ts +0 -11
- package/dist/components/ServiceMenu.js +0 -3
- package/dist/components/ServiceMenu.js.map +0 -1
- package/dist/components/Sidebar.d.ts +0 -11
- package/dist/components/Sidebar.js +0 -5
- package/dist/components/Sidebar.js.map +0 -1
- package/dist/contexts/LanguageContext.d.ts +0 -17
- package/dist/contexts/LanguageContext.js +0 -4
- package/dist/contexts/LanguageContext.js.map +0 -1
- package/dist/contexts/OrganizationContext.d.ts +0 -28
- package/dist/contexts/OrganizationContext.js +0 -3
- package/dist/contexts/OrganizationContext.js.map +0 -1
- package/dist/contexts/ThemeContext.d.ts +0 -14
- package/dist/contexts/ThemeContext.js +0 -3
- package/dist/contexts/ThemeContext.js.map +0 -1
- package/dist/hooks/useDateFormat.d.ts +0 -28
- package/dist/hooks/useDateFormat.js +0 -4
- package/dist/hooks/useDateFormat.js.map +0 -1
- package/dist/i18n.d.ts +0 -38
- package/dist/i18n.js +0 -3
- package/dist/i18n.js.map +0 -1
- package/dist/types.d.ts +0 -91
- package/dist/types.js +0 -3
- package/dist/types.js.map +0 -1
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { Drawer as Drawer$1 } from 'vaul';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Swipeable drawer component built on Vaul.
|
|
7
|
+
*
|
|
8
|
+
* Slides from any edge of the screen and can be dismissed by swiping.
|
|
9
|
+
* Set the `direction` prop on the root to control direction (`"top"`, `"bottom"`,
|
|
10
|
+
* `"left"`, `"right"`). Always wrap content in `DrawerBody` for proper scrolling.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```tsx
|
|
14
|
+
* <Drawer open={open} onOpenChange={setOpen}>
|
|
15
|
+
* <DrawerTrigger asChild>
|
|
16
|
+
* <Button variant="outline">Open Drawer</Button>
|
|
17
|
+
* </DrawerTrigger>
|
|
18
|
+
* <DrawerContent>
|
|
19
|
+
* <DrawerHeader>
|
|
20
|
+
* <DrawerTitle>Task Details</DrawerTitle>
|
|
21
|
+
* <DrawerDescription>
|
|
22
|
+
* View and edit task information.
|
|
23
|
+
* </DrawerDescription>
|
|
24
|
+
* </DrawerHeader>
|
|
25
|
+
* <DrawerBody>
|
|
26
|
+
* <p>Scrollable content goes here.</p>
|
|
27
|
+
* </DrawerBody>
|
|
28
|
+
* <DrawerFooter>
|
|
29
|
+
* <Button>Save</Button>
|
|
30
|
+
* <DrawerClose asChild>
|
|
31
|
+
* <Button variant="outline">Cancel</Button>
|
|
32
|
+
* </DrawerClose>
|
|
33
|
+
* </DrawerFooter>
|
|
34
|
+
* </DrawerContent>
|
|
35
|
+
* </Drawer>
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
declare function Drawer({ ...props }: React.ComponentProps<typeof Drawer$1.Root>): react_jsx_runtime.JSX.Element;
|
|
39
|
+
/** Element that opens the drawer when clicked. Use `asChild` to merge into your own button. */
|
|
40
|
+
declare function DrawerTrigger({ ...props }: React.ComponentProps<typeof Drawer$1.Trigger>): react_jsx_runtime.JSX.Element;
|
|
41
|
+
/** Portal that renders drawer content outside the DOM hierarchy. */
|
|
42
|
+
declare function DrawerPortal({ ...props }: React.ComponentProps<typeof Drawer$1.Portal>): react_jsx_runtime.JSX.Element;
|
|
43
|
+
/** Button that closes the drawer. Use `asChild` to merge into your own button. */
|
|
44
|
+
declare function DrawerClose({ ...props }: React.ComponentProps<typeof Drawer$1.Close>): react_jsx_runtime.JSX.Element;
|
|
45
|
+
/** Semi-transparent backdrop rendered behind the drawer panel. */
|
|
46
|
+
declare function DrawerOverlay({ className, ...props }: React.ComponentProps<typeof Drawer$1.Overlay>): react_jsx_runtime.JSX.Element;
|
|
47
|
+
/** Drawer content panel that slides in from the configured direction. Includes a drag handle for bottom drawers. */
|
|
48
|
+
declare function DrawerContent({ className, children, ...props }: React.ComponentProps<typeof Drawer$1.Content>): react_jsx_runtime.JSX.Element;
|
|
49
|
+
/** Container for DrawerTitle and DrawerDescription at the top of the drawer. */
|
|
50
|
+
declare function DrawerHeader({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
51
|
+
/** Scrollable body area for drawer content. Always wrap main content in this component. */
|
|
52
|
+
declare function DrawerBody({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
53
|
+
/** Container for action buttons at the bottom of the drawer. Pushed to the bottom via `mt-auto`. */
|
|
54
|
+
declare function DrawerFooter({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
55
|
+
/** Accessible title rendered inside DrawerHeader. */
|
|
56
|
+
declare function DrawerTitle({ className, ...props }: React.ComponentProps<typeof Drawer$1.Title>): react_jsx_runtime.JSX.Element;
|
|
57
|
+
/** Accessible description rendered inside DrawerHeader below the title. */
|
|
58
|
+
declare function DrawerDescription({ className, ...props }: React.ComponentProps<typeof Drawer$1.Description>): react_jsx_runtime.JSX.Element;
|
|
59
|
+
|
|
60
|
+
export { Drawer, DrawerBody, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { Drawer, DrawerBody, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger } from '../chunk-7XH3MGBR.js';
|
|
2
|
+
import '../chunk-DGPY4WP3.js';
|
|
3
|
+
//# sourceMappingURL=drawer.js.map
|
|
4
|
+
//# sourceMappingURL=drawer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"drawer.js"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Dropdown menu component built on Radix UI DropdownMenu.
|
|
7
|
+
*
|
|
8
|
+
* Displays a menu of actions or options triggered by a button click.
|
|
9
|
+
* Supports items, checkbox items, radio items, sub-menus, separators,
|
|
10
|
+
* labels, shortcuts, and destructive variants.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```tsx
|
|
14
|
+
* <DropdownMenu>
|
|
15
|
+
* <DropdownMenuTrigger asChild>
|
|
16
|
+
* <Button variant="outline">Actions</Button>
|
|
17
|
+
* </DropdownMenuTrigger>
|
|
18
|
+
* <DropdownMenuContent>
|
|
19
|
+
* <DropdownMenuLabel>My Account</DropdownMenuLabel>
|
|
20
|
+
* <DropdownMenuSeparator />
|
|
21
|
+
* <DropdownMenuItem>
|
|
22
|
+
* <UserIcon className="size-4" />
|
|
23
|
+
* Profile
|
|
24
|
+
* <DropdownMenuShortcut>Ctrl+P</DropdownMenuShortcut>
|
|
25
|
+
* </DropdownMenuItem>
|
|
26
|
+
* <DropdownMenuItem>
|
|
27
|
+
* <SettingsIcon className="size-4" />
|
|
28
|
+
* Settings
|
|
29
|
+
* </DropdownMenuItem>
|
|
30
|
+
* <DropdownMenuSeparator />
|
|
31
|
+
* <DropdownMenuItem variant="destructive">
|
|
32
|
+
* <TrashIcon className="size-4" />
|
|
33
|
+
* Delete
|
|
34
|
+
* </DropdownMenuItem>
|
|
35
|
+
* </DropdownMenuContent>
|
|
36
|
+
* </DropdownMenu>
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
declare function DropdownMenu({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
40
|
+
/** Portal that renders dropdown content outside the DOM hierarchy. */
|
|
41
|
+
declare function DropdownMenuPortal({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>): react_jsx_runtime.JSX.Element;
|
|
42
|
+
/** Element that opens the dropdown menu when clicked. Use `asChild` to merge into your own button. */
|
|
43
|
+
declare function DropdownMenuTrigger({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>): react_jsx_runtime.JSX.Element;
|
|
44
|
+
/** Floating container for menu items, positioned relative to the trigger. */
|
|
45
|
+
declare function DropdownMenuContent({ className, sideOffset, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Content>): react_jsx_runtime.JSX.Element;
|
|
46
|
+
/** Groups related menu items together for accessibility. */
|
|
47
|
+
declare function DropdownMenuGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Group>): react_jsx_runtime.JSX.Element;
|
|
48
|
+
/** Actionable menu item. Set `variant="destructive"` for dangerous actions, `inset` for left-padding alignment. */
|
|
49
|
+
declare function DropdownMenuItem({ className, inset, variant, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {
|
|
50
|
+
inset?: boolean;
|
|
51
|
+
variant?: "default" | "destructive";
|
|
52
|
+
}): react_jsx_runtime.JSX.Element;
|
|
53
|
+
/** Menu item with a checkbox indicator for toggling options. */
|
|
54
|
+
declare function DropdownMenuCheckboxItem({ className, children, checked, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>): react_jsx_runtime.JSX.Element;
|
|
55
|
+
/** Container for radio menu items where only one can be selected at a time. */
|
|
56
|
+
declare function DropdownMenuRadioGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>): react_jsx_runtime.JSX.Element;
|
|
57
|
+
/** Menu item with a radio indicator for single-selection groups. */
|
|
58
|
+
declare function DropdownMenuRadioItem({ className, children, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem>): react_jsx_runtime.JSX.Element;
|
|
59
|
+
/** Non-interactive label used to title a group of menu items. */
|
|
60
|
+
declare function DropdownMenuLabel({ className, inset, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Label> & {
|
|
61
|
+
inset?: boolean;
|
|
62
|
+
}): react_jsx_runtime.JSX.Element;
|
|
63
|
+
/** Visual divider between groups of menu items. */
|
|
64
|
+
declare function DropdownMenuSeparator({ className, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Separator>): react_jsx_runtime.JSX.Element;
|
|
65
|
+
/** Keyboard shortcut hint displayed at the end of a menu item. */
|
|
66
|
+
declare function DropdownMenuShortcut({ className, ...props }: React.ComponentProps<"span">): react_jsx_runtime.JSX.Element;
|
|
67
|
+
/** Container for a nested sub-menu within the dropdown. */
|
|
68
|
+
declare function DropdownMenuSub({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>): react_jsx_runtime.JSX.Element;
|
|
69
|
+
/** Menu item that opens a sub-menu on hover. Displays a chevron indicator. */
|
|
70
|
+
declare function DropdownMenuSubTrigger({ className, inset, children, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {
|
|
71
|
+
inset?: boolean;
|
|
72
|
+
}): react_jsx_runtime.JSX.Element;
|
|
73
|
+
/** Floating container for sub-menu items. */
|
|
74
|
+
declare function DropdownMenuSubContent({ className, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>): react_jsx_runtime.JSX.Element;
|
|
75
|
+
|
|
76
|
+
export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger } from '../chunk-IAWKX5W4.js';
|
|
2
|
+
import '../chunk-DGPY4WP3.js';
|
|
3
|
+
//# sourceMappingURL=dropdown-menu.js.map
|
|
4
|
+
//# sourceMappingURL=dropdown-menu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"dropdown-menu.js"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
interface FileUploadProps {
|
|
4
|
+
/** Array of currently uploaded File objects. */
|
|
5
|
+
value?: File[];
|
|
6
|
+
/** Callback fired when files are added or removed. */
|
|
7
|
+
onChange?: (files: File[]) => void;
|
|
8
|
+
/** Accepted file types (e.g., `"image/*,.pdf"`). Maps to the HTML `accept` attribute. */
|
|
9
|
+
accept?: string;
|
|
10
|
+
/** Whether multiple files can be selected at once. Defaults to `false`. */
|
|
11
|
+
multiple?: boolean;
|
|
12
|
+
/** Maximum file size in bytes. Defaults to 10 MB. */
|
|
13
|
+
maxSize?: number;
|
|
14
|
+
/** Maximum number of files allowed. */
|
|
15
|
+
maxFiles?: number;
|
|
16
|
+
/** Whether the upload area is disabled. */
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
/** Additional CSS class for the outer wrapper. */
|
|
19
|
+
className?: string;
|
|
20
|
+
/** Whether to show the file list with previews below the drop zone. Defaults to `true`. */
|
|
21
|
+
showPreview?: boolean;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* File upload component with drag-and-drop support and file previews.
|
|
25
|
+
* Validates file size and count, shows image thumbnails, and provides remove buttons.
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```tsx
|
|
29
|
+
* const [files, setFiles] = useState<File[]>([]);
|
|
30
|
+
*
|
|
31
|
+
* <FileUpload
|
|
32
|
+
* value={files}
|
|
33
|
+
* onChange={setFiles}
|
|
34
|
+
* accept="image/*,.pdf"
|
|
35
|
+
* multiple
|
|
36
|
+
* maxSize={5 * 1024 * 1024}
|
|
37
|
+
* maxFiles={3}
|
|
38
|
+
* />
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
declare function FileUpload({ value, onChange, accept, multiple, maxSize, // 10MB default
|
|
42
|
+
maxFiles, disabled, className, showPreview, }: FileUploadProps): react_jsx_runtime.JSX.Element;
|
|
43
|
+
|
|
44
|
+
export { FileUpload };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"file-upload.js"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as react_hook_form from 'react-hook-form';
|
|
3
|
+
import { FieldValues, FieldPath, ControllerProps } from 'react-hook-form';
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
6
|
+
import { Slot } from '@radix-ui/react-slot';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Form provider component built on react-hook-form's FormProvider.
|
|
10
|
+
* Wraps form fields and provides form context for validation, error display, and accessibility.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```tsx
|
|
14
|
+
* const form = useForm({ defaultValues: { email: "" } });
|
|
15
|
+
*
|
|
16
|
+
* <Form {...form}>
|
|
17
|
+
* <form onSubmit={form.handleSubmit(onSubmit)}>
|
|
18
|
+
* <FormField
|
|
19
|
+
* control={form.control}
|
|
20
|
+
* name="email"
|
|
21
|
+
* render={({ field }) => (
|
|
22
|
+
* <FormItem>
|
|
23
|
+
* <FormLabel>Email</FormLabel>
|
|
24
|
+
* <FormControl>
|
|
25
|
+
* <Input placeholder="you@example.com" {...field} />
|
|
26
|
+
* </FormControl>
|
|
27
|
+
* <FormDescription>Your work email address.</FormDescription>
|
|
28
|
+
* <FormMessage />
|
|
29
|
+
* </FormItem>
|
|
30
|
+
* )}
|
|
31
|
+
* />
|
|
32
|
+
* <Button type="submit">Submit</Button>
|
|
33
|
+
* </form>
|
|
34
|
+
* </Form>
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues = TFieldValues>(props: react_hook_form.FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React.JSX.Element;
|
|
38
|
+
/** Connects a form field to react-hook-form's Controller and provides field context. */
|
|
39
|
+
declare const FormField: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ ...props }: ControllerProps<TFieldValues, TName>) => react_jsx_runtime.JSX.Element;
|
|
40
|
+
/**
|
|
41
|
+
* Hook that returns field state, IDs, and error information for the current form field.
|
|
42
|
+
* Must be used within a `FormField` component.
|
|
43
|
+
*/
|
|
44
|
+
declare const useFormField: () => {
|
|
45
|
+
invalid: boolean;
|
|
46
|
+
isDirty: boolean;
|
|
47
|
+
isTouched: boolean;
|
|
48
|
+
isValidating: boolean;
|
|
49
|
+
error?: react_hook_form.FieldError;
|
|
50
|
+
id: string;
|
|
51
|
+
name: string;
|
|
52
|
+
formItemId: string;
|
|
53
|
+
formDescriptionId: string;
|
|
54
|
+
formMessageId: string;
|
|
55
|
+
};
|
|
56
|
+
/** Container for a single form field, grouping label, control, description, and message. */
|
|
57
|
+
declare function FormItem({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
58
|
+
/** Label for a form field that turns red on validation error. */
|
|
59
|
+
declare function FormLabel({ className, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
60
|
+
/** Slot wrapper that wires up aria attributes for the form control. */
|
|
61
|
+
declare function FormControl({ ...props }: React.ComponentProps<typeof Slot>): react_jsx_runtime.JSX.Element;
|
|
62
|
+
/** Helper text displayed below the form control. */
|
|
63
|
+
declare function FormDescription({ className, ...props }: React.ComponentProps<"p">): react_jsx_runtime.JSX.Element;
|
|
64
|
+
/** Displays the validation error message for the form field. */
|
|
65
|
+
declare function FormMessage({ className, ...props }: React.ComponentProps<"p">): react_jsx_runtime.JSX.Element | null;
|
|
66
|
+
|
|
67
|
+
export { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, useFormField };
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { Label } from '../chunk-P3M5TZD2.js';
|
|
2
|
+
import { cn } from '../chunk-DGPY4WP3.js';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { Slot } from '@radix-ui/react-slot';
|
|
5
|
+
import { FormProvider, Controller, useFormContext, useFormState } from 'react-hook-form';
|
|
6
|
+
import { jsx } from 'react/jsx-runtime';
|
|
7
|
+
|
|
8
|
+
var Form = FormProvider;
|
|
9
|
+
var FormFieldContext = React.createContext(
|
|
10
|
+
{}
|
|
11
|
+
);
|
|
12
|
+
var FormField = ({
|
|
13
|
+
...props
|
|
14
|
+
}) => {
|
|
15
|
+
return /* @__PURE__ */ jsx(FormFieldContext.Provider, { value: { name: props.name }, children: /* @__PURE__ */ jsx(Controller, { ...props }) });
|
|
16
|
+
};
|
|
17
|
+
var useFormField = () => {
|
|
18
|
+
const fieldContext = React.useContext(FormFieldContext);
|
|
19
|
+
const itemContext = React.useContext(FormItemContext);
|
|
20
|
+
const { getFieldState } = useFormContext();
|
|
21
|
+
const formState = useFormState({ name: fieldContext.name });
|
|
22
|
+
const fieldState = getFieldState(fieldContext.name, formState);
|
|
23
|
+
if (!fieldContext) {
|
|
24
|
+
throw new Error("useFormField should be used within <FormField>");
|
|
25
|
+
}
|
|
26
|
+
const { id } = itemContext;
|
|
27
|
+
return {
|
|
28
|
+
id,
|
|
29
|
+
name: fieldContext.name,
|
|
30
|
+
formItemId: `${id}-form-item`,
|
|
31
|
+
formDescriptionId: `${id}-form-item-description`,
|
|
32
|
+
formMessageId: `${id}-form-item-message`,
|
|
33
|
+
...fieldState
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
var FormItemContext = React.createContext(
|
|
37
|
+
{}
|
|
38
|
+
);
|
|
39
|
+
function FormItem({ className, ...props }) {
|
|
40
|
+
const id = React.useId();
|
|
41
|
+
return /* @__PURE__ */ jsx(FormItemContext.Provider, { value: { id }, children: /* @__PURE__ */ jsx(
|
|
42
|
+
"div",
|
|
43
|
+
{
|
|
44
|
+
"data-slot": "form-item",
|
|
45
|
+
className: cn("grid gap-2", className),
|
|
46
|
+
...props
|
|
47
|
+
}
|
|
48
|
+
) });
|
|
49
|
+
}
|
|
50
|
+
function FormLabel({
|
|
51
|
+
className,
|
|
52
|
+
...props
|
|
53
|
+
}) {
|
|
54
|
+
const { error, formItemId } = useFormField();
|
|
55
|
+
return /* @__PURE__ */ jsx(
|
|
56
|
+
Label,
|
|
57
|
+
{
|
|
58
|
+
"data-slot": "form-label",
|
|
59
|
+
"data-error": !!error,
|
|
60
|
+
className: cn("data-[error=true]:text-destructive", className),
|
|
61
|
+
htmlFor: formItemId,
|
|
62
|
+
...props
|
|
63
|
+
}
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
function FormControl({ ...props }) {
|
|
67
|
+
const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
|
|
68
|
+
return /* @__PURE__ */ jsx(
|
|
69
|
+
Slot,
|
|
70
|
+
{
|
|
71
|
+
"data-slot": "form-control",
|
|
72
|
+
id: formItemId,
|
|
73
|
+
"aria-describedby": !error ? `${formDescriptionId}` : `${formDescriptionId} ${formMessageId}`,
|
|
74
|
+
"aria-invalid": !!error,
|
|
75
|
+
...props
|
|
76
|
+
}
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
function FormDescription({ className, ...props }) {
|
|
80
|
+
const { formDescriptionId } = useFormField();
|
|
81
|
+
return /* @__PURE__ */ jsx(
|
|
82
|
+
"p",
|
|
83
|
+
{
|
|
84
|
+
"data-slot": "form-description",
|
|
85
|
+
id: formDescriptionId,
|
|
86
|
+
className: cn("text-muted-foreground text-sm", className),
|
|
87
|
+
...props
|
|
88
|
+
}
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
function FormMessage({ className, ...props }) {
|
|
92
|
+
const { error, formMessageId } = useFormField();
|
|
93
|
+
const body = error ? String(error?.message ?? "") : props.children;
|
|
94
|
+
if (!body) {
|
|
95
|
+
return null;
|
|
96
|
+
}
|
|
97
|
+
return /* @__PURE__ */ jsx(
|
|
98
|
+
"p",
|
|
99
|
+
{
|
|
100
|
+
"data-slot": "form-message",
|
|
101
|
+
id: formMessageId,
|
|
102
|
+
className: cn("text-destructive text-sm", className),
|
|
103
|
+
...props,
|
|
104
|
+
children: body
|
|
105
|
+
}
|
|
106
|
+
);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, useFormField };
|
|
110
|
+
//# sourceMappingURL=form.js.map
|
|
111
|
+
//# sourceMappingURL=form.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/form.tsx"],"names":[],"mappings":";;;;;;;AA6CA,IAAM,IAAA,GAAO;AASb,IAAM,gBAAA,GAAyB,KAAA,CAAA,aAAA;AAAA,EAC7B;AACF,CAAA;AAGA,IAAM,YAAY,CAGhB;AAAA,EACA,GAAG;AACL,CAAA,KAA4C;AAC1C,EAAA,uBACE,GAAA,CAAC,gBAAA,CAAiB,QAAA,EAAjB,EAA0B,OAAO,EAAE,IAAA,EAAM,KAAA,CAAM,IAAA,EAAK,EACnD,QAAA,kBAAA,GAAA,CAAC,UAAA,EAAA,EAAY,GAAG,OAAO,CAAA,EACzB,CAAA;AAEJ;AAMA,IAAM,eAAe,MAAM;AACzB,EAAA,MAAM,YAAA,GAAqB,iBAAW,gBAAgB,CAAA;AACtD,EAAA,MAAM,WAAA,GAAoB,iBAAW,eAAe,CAAA;AACpD,EAAA,MAAM,EAAE,aAAA,EAAc,GAAI,cAAA,EAAe;AACzC,EAAA,MAAM,YAAY,YAAA,CAAa,EAAE,IAAA,EAAM,YAAA,CAAa,MAAM,CAAA;AAC1D,EAAA,MAAM,UAAA,GAAa,aAAA,CAAc,YAAA,CAAa,IAAA,EAAM,SAAS,CAAA;AAE7D,EAAA,IAAI,CAAC,YAAA,EAAc;AACjB,IAAA,MAAM,IAAI,MAAM,gDAAgD,CAAA;AAAA,EAClE;AAEA,EAAA,MAAM,EAAE,IAAG,GAAI,WAAA;AAEf,EAAA,OAAO;AAAA,IACL,EAAA;AAAA,IACA,MAAM,YAAA,CAAa,IAAA;AAAA,IACnB,UAAA,EAAY,GAAG,EAAE,CAAA,UAAA,CAAA;AAAA,IACjB,iBAAA,EAAmB,GAAG,EAAE,CAAA,sBAAA,CAAA;AAAA,IACxB,aAAA,EAAe,GAAG,EAAE,CAAA,kBAAA,CAAA;AAAA,IACpB,GAAG;AAAA,GACL;AACF;AAMA,IAAM,eAAA,GAAwB,KAAA,CAAA,aAAA;AAAA,EAC5B;AACF,CAAA;AAGA,SAAS,QAAA,CAAS,EAAE,SAAA,EAAW,GAAG,OAAM,EAAgC;AACtE,EAAA,MAAM,KAAW,KAAA,CAAA,KAAA,EAAM;AAEvB,EAAA,2BACG,eAAA,CAAgB,QAAA,EAAhB,EAAyB,KAAA,EAAO,EAAE,IAAG,EACpC,QAAA,kBAAA,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,WAAA,EAAU,WAAA;AAAA,MACV,SAAA,EAAW,EAAA,CAAG,YAAA,EAAc,SAAS,CAAA;AAAA,MACpC,GAAG;AAAA;AAAA,GACN,EACF,CAAA;AAEJ;AAGA,SAAS,SAAA,CAAU;AAAA,EACjB,SAAA;AAAA,EACA,GAAG;AACL,CAAA,EAAqD;AACnD,EAAA,MAAM,EAAE,KAAA,EAAO,UAAA,EAAW,GAAI,YAAA,EAAa;AAE3C,EAAA,uBACE,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,WAAA,EAAU,YAAA;AAAA,MACV,YAAA,EAAY,CAAC,CAAC,KAAA;AAAA,MACd,SAAA,EAAW,EAAA,CAAG,oCAAA,EAAsC,SAAS,CAAA;AAAA,MAC7D,OAAA,EAAS,UAAA;AAAA,MACR,GAAG;AAAA;AAAA,GACN;AAEJ;AAGA,SAAS,WAAA,CAAY,EAAE,GAAG,KAAA,EAAM,EAAsC;AACpE,EAAA,MAAM,EAAE,KAAA,EAAO,UAAA,EAAY,iBAAA,EAAmB,aAAA,KAC5C,YAAA,EAAa;AAEf,EAAA,uBACE,GAAA;AAAA,IAAC,IAAA;AAAA,IAAA;AAAA,MACC,WAAA,EAAU,cAAA;AAAA,MACV,EAAA,EAAI,UAAA;AAAA,MACJ,kBAAA,EACE,CAAC,KAAA,GACG,CAAA,EAAG,iBAAiB,CAAA,CAAA,GACpB,CAAA,EAAG,iBAAiB,CAAA,CAAA,EAAI,aAAa,CAAA,CAAA;AAAA,MAE3C,cAAA,EAAc,CAAC,CAAC,KAAA;AAAA,MACf,GAAG;AAAA;AAAA,GACN;AAEJ;AAGA,SAAS,eAAA,CAAgB,EAAE,SAAA,EAAW,GAAG,OAAM,EAA8B;AAC3E,EAAA,MAAM,EAAE,iBAAA,EAAkB,GAAI,YAAA,EAAa;AAE3C,EAAA,uBACE,GAAA;AAAA,IAAC,GAAA;AAAA,IAAA;AAAA,MACC,WAAA,EAAU,kBAAA;AAAA,MACV,EAAA,EAAI,iBAAA;AAAA,MACJ,SAAA,EAAW,EAAA,CAAG,+BAAA,EAAiC,SAAS,CAAA;AAAA,MACvD,GAAG;AAAA;AAAA,GACN;AAEJ;AAGA,SAAS,WAAA,CAAY,EAAE,SAAA,EAAW,GAAG,OAAM,EAA8B;AACvE,EAAA,MAAM,EAAE,KAAA,EAAO,aAAA,EAAc,GAAI,YAAA,EAAa;AAC9C,EAAA,MAAM,OAAO,KAAA,GAAQ,MAAA,CAAO,OAAO,OAAA,IAAW,EAAE,IAAI,KAAA,CAAM,QAAA;AAE1D,EAAA,IAAI,CAAC,IAAA,EAAM;AACT,IAAA,OAAO,IAAA;AAAA,EACT;AAEA,EAAA,uBACE,GAAA;AAAA,IAAC,GAAA;AAAA,IAAA;AAAA,MACC,WAAA,EAAU,cAAA;AAAA,MACV,EAAA,EAAI,aAAA;AAAA,MACJ,SAAA,EAAW,EAAA,CAAG,0BAAA,EAA4B,SAAS,CAAA;AAAA,MAClD,GAAG,KAAA;AAAA,MAEH,QAAA,EAAA;AAAA;AAAA,GACH;AAEJ","file":"form.js","sourcesContent":["import * as React from \"react\";\nimport * as LabelPrimitive from \"@radix-ui/react-label\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport {\n Controller,\n FormProvider,\n useFormContext,\n useFormState,\n type ControllerProps,\n type FieldPath,\n type FieldValues,\n} from \"react-hook-form\";\n\nimport { cn } from \"../lib/utils\";\nimport { Label } from \"./label\";\n\n/**\n * Form provider component built on react-hook-form's FormProvider.\n * Wraps form fields and provides form context for validation, error display, and accessibility.\n *\n * @example\n * ```tsx\n * const form = useForm({ defaultValues: { email: \"\" } });\n *\n * <Form {...form}>\n * <form onSubmit={form.handleSubmit(onSubmit)}>\n * <FormField\n * control={form.control}\n * name=\"email\"\n * render={({ field }) => (\n * <FormItem>\n * <FormLabel>Email</FormLabel>\n * <FormControl>\n * <Input placeholder=\"you@example.com\" {...field} />\n * </FormControl>\n * <FormDescription>Your work email address.</FormDescription>\n * <FormMessage />\n * </FormItem>\n * )}\n * />\n * <Button type=\"submit\">Submit</Button>\n * </form>\n * </Form>\n * ```\n */\nconst Form = FormProvider;\n\ntype FormFieldContextValue<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n> = {\n name: TName;\n};\n\nconst FormFieldContext = React.createContext<FormFieldContextValue>(\n {} as FormFieldContextValue,\n);\n\n/** Connects a form field to react-hook-form's Controller and provides field context. */\nconst FormField = <\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n>({\n ...props\n}: ControllerProps<TFieldValues, TName>) => {\n return (\n <FormFieldContext.Provider value={{ name: props.name }}>\n <Controller {...props} />\n </FormFieldContext.Provider>\n );\n};\n\n/**\n * Hook that returns field state, IDs, and error information for the current form field.\n * Must be used within a `FormField` component.\n */\nconst useFormField = () => {\n const fieldContext = React.useContext(FormFieldContext);\n const itemContext = React.useContext(FormItemContext);\n const { getFieldState } = useFormContext();\n const formState = useFormState({ name: fieldContext.name });\n const fieldState = getFieldState(fieldContext.name, formState);\n\n if (!fieldContext) {\n throw new Error(\"useFormField should be used within <FormField>\");\n }\n\n const { id } = itemContext;\n\n return {\n id,\n name: fieldContext.name,\n formItemId: `${id}-form-item`,\n formDescriptionId: `${id}-form-item-description`,\n formMessageId: `${id}-form-item-message`,\n ...fieldState,\n };\n};\n\ntype FormItemContextValue = {\n id: string;\n};\n\nconst FormItemContext = React.createContext<FormItemContextValue>(\n {} as FormItemContextValue,\n);\n\n/** Container for a single form field, grouping label, control, description, and message. */\nfunction FormItem({ className, ...props }: React.ComponentProps<\"div\">) {\n const id = React.useId();\n\n return (\n <FormItemContext.Provider value={{ id }}>\n <div\n data-slot=\"form-item\"\n className={cn(\"grid gap-2\", className)}\n {...props}\n />\n </FormItemContext.Provider>\n );\n}\n\n/** Label for a form field that turns red on validation error. */\nfunction FormLabel({\n className,\n ...props\n}: React.ComponentProps<typeof LabelPrimitive.Root>) {\n const { error, formItemId } = useFormField();\n\n return (\n <Label\n data-slot=\"form-label\"\n data-error={!!error}\n className={cn(\"data-[error=true]:text-destructive\", className)}\n htmlFor={formItemId}\n {...props}\n />\n );\n}\n\n/** Slot wrapper that wires up aria attributes for the form control. */\nfunction FormControl({ ...props }: React.ComponentProps<typeof Slot>) {\n const { error, formItemId, formDescriptionId, formMessageId } =\n useFormField();\n\n return (\n <Slot\n data-slot=\"form-control\"\n id={formItemId}\n aria-describedby={\n !error\n ? `${formDescriptionId}`\n : `${formDescriptionId} ${formMessageId}`\n }\n aria-invalid={!!error}\n {...props}\n />\n );\n}\n\n/** Helper text displayed below the form control. */\nfunction FormDescription({ className, ...props }: React.ComponentProps<\"p\">) {\n const { formDescriptionId } = useFormField();\n\n return (\n <p\n data-slot=\"form-description\"\n id={formDescriptionId}\n className={cn(\"text-muted-foreground text-sm\", className)}\n {...props}\n />\n );\n}\n\n/** Displays the validation error message for the form field. */\nfunction FormMessage({ className, ...props }: React.ComponentProps<\"p\">) {\n const { error, formMessageId } = useFormField();\n const body = error ? String(error?.message ?? \"\") : props.children;\n\n if (!body) {\n return null;\n }\n\n return (\n <p\n data-slot=\"form-message\"\n id={formMessageId}\n className={cn(\"text-destructive text-sm\", className)}\n {...props}\n >\n {body}\n </p>\n );\n}\n\nexport {\n useFormField,\n Form,\n FormItem,\n FormLabel,\n FormControl,\n FormDescription,\n FormMessage,\n FormField,\n};"]}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import * as HoverCardPrimitive from '@radix-ui/react-hover-card';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Hover-activated floating card built on Radix UI HoverCard.
|
|
7
|
+
*
|
|
8
|
+
* Displays a preview card when the user hovers over a trigger element.
|
|
9
|
+
* Ideal for showing user profiles, link previews, or supplementary info
|
|
10
|
+
* without requiring a click.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```tsx
|
|
14
|
+
* <HoverCard>
|
|
15
|
+
* <HoverCardTrigger asChild>
|
|
16
|
+
* <a href="/user/john" className="underline">
|
|
17
|
+
* @john
|
|
18
|
+
* </a>
|
|
19
|
+
* </HoverCardTrigger>
|
|
20
|
+
* <HoverCardContent>
|
|
21
|
+
* <div className="flex gap-4">
|
|
22
|
+
* <Avatar>
|
|
23
|
+
* <AvatarImage src="/avatars/john.png" />
|
|
24
|
+
* <AvatarFallback>JD</AvatarFallback>
|
|
25
|
+
* </Avatar>
|
|
26
|
+
* <div>
|
|
27
|
+
* <h4 className="text-sm font-semibold">John Doe</h4>
|
|
28
|
+
* <p className="text-sm text-muted-foreground">
|
|
29
|
+
* Software Engineer
|
|
30
|
+
* </p>
|
|
31
|
+
* </div>
|
|
32
|
+
* </div>
|
|
33
|
+
* </HoverCardContent>
|
|
34
|
+
* </HoverCard>
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
declare function HoverCard({ ...props }: React.ComponentProps<typeof HoverCardPrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
38
|
+
/** Element that shows the hover card on mouse enter. Use `asChild` to merge into your own element. */
|
|
39
|
+
declare function HoverCardTrigger({ ...props }: React.ComponentProps<typeof HoverCardPrimitive.Trigger>): react_jsx_runtime.JSX.Element;
|
|
40
|
+
/** Floating content panel that appears on hover. */
|
|
41
|
+
declare function HoverCardContent({ className, align, sideOffset, ...props }: React.ComponentProps<typeof HoverCardPrimitive.Content>): react_jsx_runtime.JSX.Element;
|
|
42
|
+
|
|
43
|
+
export { HoverCard, HoverCardContent, HoverCardTrigger };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"hover-card.js"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { OTPInput } from 'input-otp';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* One-time password input component built on the `input-otp` library.
|
|
7
|
+
* Renders a segmented input for entering verification codes.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```tsx
|
|
11
|
+
* <InputOTP maxLength={6} value={otp} onChange={setOtp}>
|
|
12
|
+
* <InputOTPGroup>
|
|
13
|
+
* <InputOTPSlot index={0} />
|
|
14
|
+
* <InputOTPSlot index={1} />
|
|
15
|
+
* <InputOTPSlot index={2} />
|
|
16
|
+
* </InputOTPGroup>
|
|
17
|
+
* <InputOTPSeparator />
|
|
18
|
+
* <InputOTPGroup>
|
|
19
|
+
* <InputOTPSlot index={3} />
|
|
20
|
+
* <InputOTPSlot index={4} />
|
|
21
|
+
* <InputOTPSlot index={5} />
|
|
22
|
+
* </InputOTPGroup>
|
|
23
|
+
* </InputOTP>
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
declare function InputOTP({ className, containerClassName, ...props }: React.ComponentProps<typeof OTPInput> & {
|
|
27
|
+
containerClassName?: string;
|
|
28
|
+
}): react_jsx_runtime.JSX.Element;
|
|
29
|
+
/** Groups adjacent OTP slots together visually. */
|
|
30
|
+
declare function InputOTPGroup({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
31
|
+
/** Individual character slot within an OTP group. */
|
|
32
|
+
declare function InputOTPSlot({ index, className, ...props }: React.ComponentProps<"div"> & {
|
|
33
|
+
index: number;
|
|
34
|
+
}): react_jsx_runtime.JSX.Element;
|
|
35
|
+
/** Visual separator (dash) between OTP groups. */
|
|
36
|
+
declare function InputOTPSeparator({ ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
37
|
+
|
|
38
|
+
export { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"input-otp.js"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { VariantProps } from 'class-variance-authority';
|
|
4
|
+
|
|
5
|
+
declare const inputVariants: (props?: ({
|
|
6
|
+
size?: "default" | "xs" | "sm" | "lg" | "xl" | null | undefined;
|
|
7
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
8
|
+
interface InputProps extends Omit<React.ComponentProps<"input">, "size">, VariantProps<typeof inputVariants> {
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Text input component with multiple size variants.
|
|
12
|
+
*
|
|
13
|
+
* Extends native `<input>` — all standard HTML input attributes are supported.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```tsx
|
|
17
|
+
* // Default input
|
|
18
|
+
* <Input placeholder="Enter text..." />
|
|
19
|
+
*
|
|
20
|
+
* // Sizes: xs (24px) | sm (28px) | default (32px) | lg (36px) | xl (44px)
|
|
21
|
+
* <Input size="xs" placeholder="Tiny" />
|
|
22
|
+
* <Input size="sm" placeholder="Small" />
|
|
23
|
+
* <Input size="lg" placeholder="Large" />
|
|
24
|
+
* <Input size="xl" placeholder="Extra large" />
|
|
25
|
+
*
|
|
26
|
+
* // With type
|
|
27
|
+
* <Input type="email" placeholder="email@example.com" />
|
|
28
|
+
* <Input type="number" placeholder="0" />
|
|
29
|
+
* <Input type="date" />
|
|
30
|
+
*
|
|
31
|
+
* // Disabled / invalid
|
|
32
|
+
* <Input disabled placeholder="Disabled" />
|
|
33
|
+
* <Input aria-invalid placeholder="Error state" />
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
declare const Input: React.ForwardRefExoticComponent<Omit<InputProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
37
|
+
|
|
38
|
+
export { Input, type InputProps, inputVariants };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"input.js"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
3
|
+
|
|
4
|
+
type LabelProps = React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root>;
|
|
5
|
+
/**
|
|
6
|
+
* Accessible label for form controls, automatically associated via `htmlFor`.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```tsx
|
|
10
|
+
* // With an input
|
|
11
|
+
* <Label htmlFor="email">Email address</Label>
|
|
12
|
+
* <Input id="email" type="email" />
|
|
13
|
+
*
|
|
14
|
+
* // Disabled state (responds to group/peer disabled)
|
|
15
|
+
* <Label htmlFor="name">Name</Label>
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
declare const Label: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & React.RefAttributes<HTMLLabelElement>>;
|
|
19
|
+
|
|
20
|
+
export { Label, type LabelProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"label.js"}
|