@contractspec/lib.ui-kit-web 0.0.0-canary-20260113162409
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/LICENSE +21 -0
- package/README.md +109 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +0 -0
- package/dist/ui/accordion.d.ts +25 -0
- package/dist/ui/accordion.d.ts.map +1 -0
- package/dist/ui/accordion.js +48 -0
- package/dist/ui/accordion.js.map +1 -0
- package/dist/ui/alert-dialog.d.ts +49 -0
- package/dist/ui/alert-dialog.d.ts.map +1 -0
- package/dist/ui/alert-dialog.js +85 -0
- package/dist/ui/alert-dialog.js.map +1 -0
- package/dist/ui/alert.d.ts +25 -0
- package/dist/ui/alert.d.ts.map +1 -0
- package/dist/ui/alert.js +39 -0
- package/dist/ui/alert.js.map +1 -0
- package/dist/ui/aspect-ratio.d.ts +8 -0
- package/dist/ui/aspect-ratio.d.ts.map +1 -0
- package/dist/ui/aspect-ratio.js +10 -0
- package/dist/ui/aspect-ratio.js.map +1 -0
- package/dist/ui/atoms/FilterSelect/FilterSelect.d.ts +8 -0
- package/dist/ui/atoms/FilterSelect/FilterSelect.d.ts.map +1 -0
- package/dist/ui/atoms/FilterSelect/FilterSelect.js +53 -0
- package/dist/ui/atoms/FilterSelect/FilterSelect.js.map +1 -0
- package/dist/ui/atoms/FilterSelect/index.d.ts +3 -0
- package/dist/ui/atoms/FilterSelect/index.js +3 -0
- package/dist/ui/atoms/FilterSelect/types.d.ts +19 -0
- package/dist/ui/atoms/FilterSelect/types.d.ts.map +1 -0
- package/dist/ui/atoms/FilterSelect/types.js +0 -0
- package/dist/ui/atoms/LoadingSpinner/LoadingSpinner.d.ts +23 -0
- package/dist/ui/atoms/LoadingSpinner/LoadingSpinner.d.ts.map +1 -0
- package/dist/ui/atoms/LoadingSpinner/LoadingSpinner.js +46 -0
- package/dist/ui/atoms/LoadingSpinner/LoadingSpinner.js.map +1 -0
- package/dist/ui/atoms/LoadingSpinner/index.d.ts +2 -0
- package/dist/ui/atoms/LoadingSpinner/index.js +3 -0
- package/dist/ui/atoms/Pagination/Pagination.d.ts +8 -0
- package/dist/ui/atoms/Pagination/Pagination.d.ts.map +1 -0
- package/dist/ui/atoms/Pagination/Pagination.js +157 -0
- package/dist/ui/atoms/Pagination/Pagination.js.map +1 -0
- package/dist/ui/atoms/Pagination/index.d.ts +3 -0
- package/dist/ui/atoms/Pagination/index.js +3 -0
- package/dist/ui/atoms/Pagination/types.d.ts +16 -0
- package/dist/ui/atoms/Pagination/types.d.ts.map +1 -0
- package/dist/ui/atoms/Pagination/types.js +0 -0
- package/dist/ui/atoms/SearchInput/SearchInput.d.ts +8 -0
- package/dist/ui/atoms/SearchInput/SearchInput.d.ts.map +1 -0
- package/dist/ui/atoms/SearchInput/SearchInput.js +50 -0
- package/dist/ui/atoms/SearchInput/SearchInput.js.map +1 -0
- package/dist/ui/atoms/SearchInput/index.d.ts +3 -0
- package/dist/ui/atoms/SearchInput/index.js +3 -0
- package/dist/ui/atoms/SearchInput/types.d.ts +13 -0
- package/dist/ui/atoms/SearchInput/types.d.ts.map +1 -0
- package/dist/ui/atoms/SearchInput/types.js +0 -0
- package/dist/ui/avatar.d.ts +20 -0
- package/dist/ui/avatar.d.ts.map +1 -0
- package/dist/ui/avatar.js +33 -0
- package/dist/ui/avatar.js.map +1 -0
- package/dist/ui/badge.d.ts +20 -0
- package/dist/ui/badge.d.ts.map +1 -0
- package/dist/ui/badge.js +27 -0
- package/dist/ui/badge.js.map +1 -0
- package/dist/ui/breadcrumb.d.ts +38 -0
- package/dist/ui/breadcrumb.d.ts.map +1 -0
- package/dist/ui/breadcrumb.js +72 -0
- package/dist/ui/breadcrumb.js.map +1 -0
- package/dist/ui/button.d.ts +21 -0
- package/dist/ui/button.d.ts.map +1 -0
- package/dist/ui/button.js +55 -0
- package/dist/ui/button.js.map +1 -0
- package/dist/ui/calendar.d.ts +27 -0
- package/dist/ui/calendar.d.ts.map +1 -0
- package/dist/ui/calendar.js +109 -0
- package/dist/ui/calendar.js.map +1 -0
- package/dist/ui/card.d.ts +35 -0
- package/dist/ui/card.d.ts.map +1 -0
- package/dist/ui/card.js +58 -0
- package/dist/ui/card.js.map +1 -0
- package/dist/ui/carousel.d.ts +48 -0
- package/dist/ui/carousel.d.ts.map +1 -0
- package/dist/ui/carousel.js +136 -0
- package/dist/ui/carousel.js.map +1 -0
- package/dist/ui/checkbox.d.ts +12 -0
- package/dist/ui/checkbox.d.ts.map +1 -0
- package/dist/ui/checkbox.js +25 -0
- package/dist/ui/checkbox.js.map +1 -0
- package/dist/ui/collapsible.d.ts +16 -0
- package/dist/ui/collapsible.d.ts.map +1 -0
- package/dist/ui/collapsible.js +28 -0
- package/dist/ui/collapsible.js.map +1 -0
- package/dist/ui/command.d.ts +53 -0
- package/dist/ui/command.d.ts.map +1 -0
- package/dist/ui/command.js +90 -0
- package/dist/ui/command.js.map +1 -0
- package/dist/ui/confirm-dialog.d.ts +31 -0
- package/dist/ui/confirm-dialog.d.ts.map +1 -0
- package/dist/ui/confirm-dialog.js +34 -0
- package/dist/ui/confirm-dialog.js.map +1 -0
- package/dist/ui/context-menu.d.ts +35 -0
- package/dist/ui/context-menu.d.ts.map +1 -0
- package/dist/ui/context-menu.js +84 -0
- package/dist/ui/context-menu.js.map +1 -0
- package/dist/ui/cta.d.ts +23 -0
- package/dist/ui/cta.d.ts.map +1 -0
- package/dist/ui/cta.js +39 -0
- package/dist/ui/cta.js.map +1 -0
- package/dist/ui/date-picker.d.ts +26 -0
- package/dist/ui/date-picker.d.ts.map +1 -0
- package/dist/ui/date-picker.js +101 -0
- package/dist/ui/date-picker.js.map +1 -0
- package/dist/ui/date-range-picker.d.ts +26 -0
- package/dist/ui/date-range-picker.d.ts.map +1 -0
- package/dist/ui/date-range-picker.js +54 -0
- package/dist/ui/date-range-picker.js.map +1 -0
- package/dist/ui/datetime-picker.d.ts +28 -0
- package/dist/ui/datetime-picker.d.ts.map +1 -0
- package/dist/ui/datetime-picker.js +44 -0
- package/dist/ui/datetime-picker.js.map +1 -0
- package/dist/ui/dialog.d.ts +48 -0
- package/dist/ui/dialog.d.ts.map +1 -0
- package/dist/ui/dialog.js +90 -0
- package/dist/ui/dialog.js.map +1 -0
- package/dist/ui/drawer.d.ts +45 -0
- package/dist/ui/drawer.d.ts.map +1 -0
- package/dist/ui/drawer.js +82 -0
- package/dist/ui/drawer.js.map +1 -0
- package/dist/ui/dropdown-menu.d.ts +78 -0
- package/dist/ui/dropdown-menu.d.ts.map +1 -0
- package/dist/ui/dropdown-menu.js +127 -0
- package/dist/ui/dropdown-menu.js.map +1 -0
- package/dist/ui/empty-state.d.ts +29 -0
- package/dist/ui/empty-state.d.ts.map +1 -0
- package/dist/ui/empty-state.js +43 -0
- package/dist/ui/empty-state.js.map +1 -0
- package/dist/ui/empty.d.ts +37 -0
- package/dist/ui/empty.d.ts.map +1 -0
- package/dist/ui/empty.js +62 -0
- package/dist/ui/empty.js.map +1 -0
- package/dist/ui/field.d.ts +66 -0
- package/dist/ui/field.d.ts.map +1 -0
- package/dist/ui/field.js +121 -0
- package/dist/ui/field.js.map +1 -0
- package/dist/ui/focus-on-route-change.d.ts +9 -0
- package/dist/ui/focus-on-route-change.d.ts.map +1 -0
- package/dist/ui/focus-on-route-change.js +17 -0
- package/dist/ui/focus-on-route-change.js.map +1 -0
- package/dist/ui/form.d.ts +47 -0
- package/dist/ui/form.d.ts.map +1 -0
- package/dist/ui/form.js +94 -0
- package/dist/ui/form.js.map +1 -0
- package/dist/ui/hover-card.d.ts +20 -0
- package/dist/ui/hover-card.d.ts.map +1 -0
- package/dist/ui/hover-card.js +36 -0
- package/dist/ui/hover-card.js.map +1 -0
- package/dist/ui/input-group.d.ts +44 -0
- package/dist/ui/input-group.d.ts.map +1 -0
- package/dist/ui/input-group.js +89 -0
- package/dist/ui/input-group.js.map +1 -0
- package/dist/ui/input-otp.d.ts +39 -0
- package/dist/ui/input-otp.d.ts.map +1 -0
- package/dist/ui/input-otp.js +46 -0
- package/dist/ui/input-otp.js.map +1 -0
- package/dist/ui/input.d.ts +13 -0
- package/dist/ui/input.d.ts.map +1 -0
- package/dist/ui/input.js +17 -0
- package/dist/ui/input.js.map +1 -0
- package/dist/ui/label.d.ts +12 -0
- package/dist/ui/label.d.ts.map +1 -0
- package/dist/ui/label.js +19 -0
- package/dist/ui/label.js.map +1 -0
- package/dist/ui/link.d.ts +9 -0
- package/dist/ui/link.d.ts.map +1 -0
- package/dist/ui/link.js +18 -0
- package/dist/ui/link.js.map +1 -0
- package/dist/ui/live-region.d.ts +17 -0
- package/dist/ui/live-region.d.ts.map +1 -0
- package/dist/ui/live-region.js +47 -0
- package/dist/ui/live-region.js.map +1 -0
- package/dist/ui/loading-button.d.ts +20 -0
- package/dist/ui/loading-button.d.ts.map +1 -0
- package/dist/ui/loading-button.js +21 -0
- package/dist/ui/loading-button.js.map +1 -0
- package/dist/ui/map/MapBase.d.ts +28 -0
- package/dist/ui/map/MapBase.d.ts.map +1 -0
- package/dist/ui/map/MapBase.js +46 -0
- package/dist/ui/map/MapBase.js.map +1 -0
- package/dist/ui/map/MapGeoJsonOverlay.d.ts +16 -0
- package/dist/ui/map/MapGeoJsonOverlay.d.ts.map +1 -0
- package/dist/ui/map/MapGeoJsonOverlay.js +37 -0
- package/dist/ui/map/MapGeoJsonOverlay.js.map +1 -0
- package/dist/ui/map/MapHeatmapH3.d.ts +18 -0
- package/dist/ui/map/MapHeatmapH3.d.ts.map +1 -0
- package/dist/ui/map/MapHeatmapH3.js +50 -0
- package/dist/ui/map/MapHeatmapH3.js.map +1 -0
- package/dist/ui/map/MapMarkers.d.ts +20 -0
- package/dist/ui/map/MapMarkers.d.ts.map +1 -0
- package/dist/ui/map/MapMarkers.js +39 -0
- package/dist/ui/map/MapMarkers.js.map +1 -0
- package/dist/ui/map/index.d.ts +5 -0
- package/dist/ui/map/index.js +6 -0
- package/dist/ui/marketing/FeatureGrid.d.ts +21 -0
- package/dist/ui/marketing/FeatureGrid.d.ts.map +1 -0
- package/dist/ui/marketing/FeatureGrid.js +35 -0
- package/dist/ui/marketing/FeatureGrid.js.map +1 -0
- package/dist/ui/marketing/Hero.d.ts +28 -0
- package/dist/ui/marketing/Hero.d.ts.map +1 -0
- package/dist/ui/marketing/Hero.js +53 -0
- package/dist/ui/marketing/Hero.js.map +1 -0
- package/dist/ui/marketing/PricingTable.d.ts +25 -0
- package/dist/ui/marketing/PricingTable.d.ts.map +1 -0
- package/dist/ui/marketing/PricingTable.js +60 -0
- package/dist/ui/marketing/PricingTable.js.map +1 -0
- package/dist/ui/marketing/index.d.ts +4 -0
- package/dist/ui/marketing/index.js +5 -0
- package/dist/ui/menubar.d.ts +85 -0
- package/dist/ui/menubar.d.ts.map +1 -0
- package/dist/ui/menubar.js +137 -0
- package/dist/ui/menubar.js.map +1 -0
- package/dist/ui/molecules/Autocomplete/index.d.ts +7 -0
- package/dist/ui/molecules/Autocomplete/index.d.ts.map +1 -0
- package/dist/ui/molecules/Autocomplete/index.js +85 -0
- package/dist/ui/molecules/Autocomplete/index.js.map +1 -0
- package/dist/ui/molecules/SearchAndFilter/SearchAndFilter.d.ts +8 -0
- package/dist/ui/molecules/SearchAndFilter/SearchAndFilter.d.ts.map +1 -0
- package/dist/ui/molecules/SearchAndFilter/SearchAndFilter.js +103 -0
- package/dist/ui/molecules/SearchAndFilter/SearchAndFilter.js.map +1 -0
- package/dist/ui/molecules/SearchAndFilter/index.d.ts +3 -0
- package/dist/ui/molecules/SearchAndFilter/index.js +3 -0
- package/dist/ui/molecules/SearchAndFilter/types.d.ts +24 -0
- package/dist/ui/molecules/SearchAndFilter/types.d.ts.map +1 -0
- package/dist/ui/molecules/SearchAndFilter/types.js +0 -0
- package/dist/ui/molecules/SkeletonList.d.ts +16 -0
- package/dist/ui/molecules/SkeletonList.d.ts.map +1 -0
- package/dist/ui/molecules/SkeletonList.js +15 -0
- package/dist/ui/molecules/SkeletonList.js.map +1 -0
- package/dist/ui/nav-layout.d.ts +71 -0
- package/dist/ui/nav-layout.d.ts.map +1 -0
- package/dist/ui/nav-layout.js +133 -0
- package/dist/ui/nav-layout.js.map +1 -0
- package/dist/ui/navigation-menu.d.ts +47 -0
- package/dist/ui/navigation-menu.d.ts.map +1 -0
- package/dist/ui/navigation-menu.js +83 -0
- package/dist/ui/navigation-menu.js.map +1 -0
- package/dist/ui/organisms/ErrorBoundary/ErrorBoundary.d.ts +30 -0
- package/dist/ui/organisms/ErrorBoundary/ErrorBoundary.d.ts.map +1 -0
- package/dist/ui/organisms/ErrorBoundary/ErrorBoundary.js +107 -0
- package/dist/ui/organisms/ErrorBoundary/ErrorBoundary.js.map +1 -0
- package/dist/ui/organisms/ErrorBoundary/index.d.ts +2 -0
- package/dist/ui/organisms/ErrorBoundary/index.js +3 -0
- package/dist/ui/organisms/ListPage/ListPage.d.ts +29 -0
- package/dist/ui/organisms/ListPage/ListPage.d.ts.map +1 -0
- package/dist/ui/organisms/ListPage/ListPage.js +198 -0
- package/dist/ui/organisms/ListPage/ListPage.js.map +1 -0
- package/dist/ui/organisms/ListPage/index.d.ts +3 -0
- package/dist/ui/organisms/ListPage/index.js +3 -0
- package/dist/ui/organisms/ListPage/types.d.ts +41 -0
- package/dist/ui/organisms/ListPage/types.d.ts.map +1 -0
- package/dist/ui/organisms/ListPage/types.js +0 -0
- package/dist/ui/page-header.d.ts +27 -0
- package/dist/ui/page-header.d.ts.map +1 -0
- package/dist/ui/page-header.js +40 -0
- package/dist/ui/page-header.js.map +1 -0
- package/dist/ui/pagination.d.ts +50 -0
- package/dist/ui/pagination.d.ts.map +1 -0
- package/dist/ui/pagination.js +65 -0
- package/dist/ui/pagination.js.map +1 -0
- package/dist/ui/popover.d.ts +23 -0
- package/dist/ui/popover.d.ts.map +1 -0
- package/dist/ui/popover.js +39 -0
- package/dist/ui/popover.js.map +1 -0
- package/dist/ui/progress.d.ts +13 -0
- package/dist/ui/progress.d.ts.map +1 -0
- package/dist/ui/progress.js +24 -0
- package/dist/ui/progress.js.map +1 -0
- package/dist/ui/radio-group.d.ts +16 -0
- package/dist/ui/radio-group.d.ts.map +1 -0
- package/dist/ui/radio-group.js +32 -0
- package/dist/ui/radio-group.js.map +1 -0
- package/dist/ui/resizable.d.ts +36 -0
- package/dist/ui/resizable.d.ts.map +1 -0
- package/dist/ui/resizable.js +25 -0
- package/dist/ui/resizable.js.map +1 -0
- package/dist/ui/route-announcer.d.ts +11 -0
- package/dist/ui/route-announcer.d.ts.map +1 -0
- package/dist/ui/route-announcer.js +22 -0
- package/dist/ui/route-announcer.js.map +1 -0
- package/dist/ui/scroll-area.d.ts +18 -0
- package/dist/ui/scroll-area.d.ts.map +1 -0
- package/dist/ui/scroll-area.js +40 -0
- package/dist/ui/scroll-area.js.map +1 -0
- package/dist/ui/section.d.ts +27 -0
- package/dist/ui/section.d.ts.map +1 -0
- package/dist/ui/section.js +63 -0
- package/dist/ui/section.js.map +1 -0
- package/dist/ui/select.d.ts +52 -0
- package/dist/ui/select.d.ts.map +1 -0
- package/dist/ui/select.js +100 -0
- package/dist/ui/select.js.map +1 -0
- package/dist/ui/separator.d.ts +14 -0
- package/dist/ui/separator.d.ts.map +1 -0
- package/dist/ui/separator.js +21 -0
- package/dist/ui/separator.js.map +1 -0
- package/dist/ui/sheet.d.ts +41 -0
- package/dist/ui/sheet.d.ts.map +1 -0
- package/dist/ui/sheet.js +86 -0
- package/dist/ui/sheet.js.map +1 -0
- package/dist/ui/sidebar.d.ts +167 -0
- package/dist/ui/sidebar.d.ts.map +1 -0
- package/dist/ui/sidebar.js +379 -0
- package/dist/ui/sidebar.js.map +1 -0
- package/dist/ui/skeleton.d.ts +11 -0
- package/dist/ui/skeleton.d.ts.map +1 -0
- package/dist/ui/skeleton.js +15 -0
- package/dist/ui/skeleton.js.map +1 -0
- package/dist/ui/skip-link.d.ts +17 -0
- package/dist/ui/skip-link.d.ts.map +1 -0
- package/dist/ui/skip-link.js +17 -0
- package/dist/ui/skip-link.js.map +1 -0
- package/dist/ui/slider.d.ts +16 -0
- package/dist/ui/slider.d.ts.map +1 -0
- package/dist/ui/slider.js +40 -0
- package/dist/ui/slider.js.map +1 -0
- package/dist/ui/sonner.d.ts +10 -0
- package/dist/ui/sonner.d.ts.map +1 -0
- package/dist/ui/sonner.js +24 -0
- package/dist/ui/sonner.js.map +1 -0
- package/dist/ui/stack.d.ts +48 -0
- package/dist/ui/stack.d.ts.map +1 -0
- package/dist/ui/stack.js +158 -0
- package/dist/ui/stack.js.map +1 -0
- package/dist/ui/stat-card-group.d.ts +19 -0
- package/dist/ui/stat-card-group.d.ts.map +1 -0
- package/dist/ui/stat-card-group.js +39 -0
- package/dist/ui/stat-card-group.js.map +1 -0
- package/dist/ui/stepper.d.ts +23 -0
- package/dist/ui/stepper.d.ts.map +1 -0
- package/dist/ui/stepper.js +37 -0
- package/dist/ui/stepper.js.map +1 -0
- package/dist/ui/switch.d.ts +15 -0
- package/dist/ui/switch.d.ts.map +1 -0
- package/dist/ui/switch.js +23 -0
- package/dist/ui/switch.js.map +1 -0
- package/dist/ui/table.d.ts +39 -0
- package/dist/ui/table.d.ts.map +1 -0
- package/dist/ui/table.js +71 -0
- package/dist/ui/table.js.map +1 -0
- package/dist/ui/tabs.d.ts +24 -0
- package/dist/ui/tabs.d.ts.map +1 -0
- package/dist/ui/tabs.js +40 -0
- package/dist/ui/tabs.js.map +1 -0
- package/dist/ui/text.d.ts +15 -0
- package/dist/ui/text.d.ts.map +1 -0
- package/dist/ui/text.js +16 -0
- package/dist/ui/text.js.map +1 -0
- package/dist/ui/textarea.d.ts +12 -0
- package/dist/ui/textarea.d.ts.map +1 -0
- package/dist/ui/textarea.js +16 -0
- package/dist/ui/textarea.js.map +1 -0
- package/dist/ui/time-picker.d.ts +22 -0
- package/dist/ui/time-picker.d.ts.map +1 -0
- package/dist/ui/time-picker.js +81 -0
- package/dist/ui/time-picker.js.map +1 -0
- package/dist/ui/toast.d.ts +20 -0
- package/dist/ui/toast.d.ts.map +1 -0
- package/dist/ui/toast.js +62 -0
- package/dist/ui/toast.js.map +1 -0
- package/dist/ui/toaster.d.ts +7 -0
- package/dist/ui/toaster.d.ts.map +1 -0
- package/dist/ui/toaster.js +27 -0
- package/dist/ui/toaster.js.map +1 -0
- package/dist/ui/toggle-group.d.ts +24 -0
- package/dist/ui/toggle-group.d.ts.map +1 -0
- package/dist/ui/toggle-group.js +48 -0
- package/dist/ui/toggle-group.js.map +1 -0
- package/dist/ui/toggle.d.ts +20 -0
- package/dist/ui/toggle.d.ts.map +1 -0
- package/dist/ui/toggle.js +41 -0
- package/dist/ui/toggle.js.map +1 -0
- package/dist/ui/tooltip.d.ts +24 -0
- package/dist/ui/tooltip.d.ts.map +1 -0
- package/dist/ui/tooltip.js +40 -0
- package/dist/ui/tooltip.js.map +1 -0
- package/dist/ui/typography.d.ts +65 -0
- package/dist/ui/typography.d.ts.map +1 -0
- package/dist/ui/typography.js +87 -0
- package/dist/ui/typography.js.map +1 -0
- package/dist/ui/use-media-query.d.ts +5 -0
- package/dist/ui/use-media-query.d.ts.map +1 -0
- package/dist/ui/use-media-query.js +20 -0
- package/dist/ui/use-media-query.js.map +1 -0
- package/dist/ui/use-mobile.d.ts +5 -0
- package/dist/ui/use-mobile.d.ts.map +1 -0
- package/dist/ui/use-mobile.js +21 -0
- package/dist/ui/use-mobile.js.map +1 -0
- package/dist/ui/use-reduced-motion.d.ts +5 -0
- package/dist/ui/use-reduced-motion.d.ts.map +1 -0
- package/dist/ui/use-reduced-motion.js +18 -0
- package/dist/ui/use-reduced-motion.js.map +1 -0
- package/dist/ui/use-toast.d.ts +50 -0
- package/dist/ui/use-toast.d.ts.map +1 -0
- package/dist/ui/use-toast.js +122 -0
- package/dist/ui/use-toast.js.map +1 -0
- package/dist/ui/useListState.d.ts +34 -0
- package/dist/ui/useListState.d.ts.map +1 -0
- package/dist/ui/useListState.js +75 -0
- package/dist/ui/useListState.js.map +1 -0
- package/dist/ui/usecases/UseCaseCard.d.ts +19 -0
- package/dist/ui/usecases/UseCaseCard.d.ts.map +1 -0
- package/dist/ui/usecases/UseCaseCard.js +35 -0
- package/dist/ui/usecases/UseCaseCard.js.map +1 -0
- package/dist/ui/usecases/UserStoryCard.d.ts +15 -0
- package/dist/ui/usecases/UserStoryCard.d.ts.map +1 -0
- package/dist/ui/usecases/UserStoryCard.js +36 -0
- package/dist/ui/usecases/UserStoryCard.js.map +1 -0
- package/dist/ui/usecases/index.d.ts +3 -0
- package/dist/ui/usecases/index.js +4 -0
- package/dist/ui/utils.d.ts +7 -0
- package/dist/ui/utils.d.ts.map +1 -0
- package/dist/ui/utils.js +11 -0
- package/dist/ui/utils.js.map +1 -0
- package/dist/ui/visually-hidden.d.ts +10 -0
- package/dist/ui/visually-hidden.d.ts.map +1 -0
- package/dist/ui/visually-hidden.js +31 -0
- package/dist/ui/visually-hidden.js.map +1 -0
- package/package.json +346 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"field.js","names":["React"],"sources":["../../ui/field.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { cn } from '@contractspec/lib.ui-kit-core/utils';\nimport { Label } from './label';\nimport { Separator } from './separator';\n\nfunction FieldSet({\n className,\n ...props\n}: React.ComponentPropsWithoutRef<'fieldset'>) {\n return (\n <fieldset\n data-slot=\"field-set\"\n className={cn(\n 'flex flex-col gap-6',\n 'has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction FieldLegend({\n className,\n variant = 'legend',\n ...props\n}: React.ComponentPropsWithoutRef<'legend'> & {\n variant?: 'legend' | 'label';\n}) {\n return (\n <legend\n data-slot=\"field-legend\"\n data-variant={variant}\n className={cn(\n 'mb-3 font-medium',\n 'data-[variant=legend]:text-base',\n 'data-[variant=label]:text-sm',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction FieldGroup({\n className,\n ...props\n}: React.ComponentPropsWithoutRef<'div'>) {\n return (\n <div\n data-slot=\"field-group\"\n className={cn(\n 'group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 data-[slot=field-group]:*:gap-4',\n className\n )}\n {...props}\n />\n );\n}\n\nconst fieldVariants = cva(\n 'group/field flex w-full gap-3 data-[invalid=true]:text-destructive',\n {\n variants: {\n orientation: {\n vertical: ['flex-col *:w-full [&>.sr-only]:w-auto'],\n horizontal: [\n 'flex-row items-center',\n 'data-[slot=field-label]:*:flex-auto',\n 'has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px',\n ],\n responsive: [\n 'flex-col *:w-full [&>.sr-only]:w-auto @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto',\n '@md/field-group:data-[slot=field-label]:*:flex-auto',\n '@md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px',\n ],\n },\n },\n defaultVariants: {\n orientation: 'vertical',\n },\n }\n);\n\nfunction Field({\n className,\n orientation = 'vertical',\n ...props\n}: React.ComponentPropsWithoutRef<'div'> & VariantProps<typeof fieldVariants>) {\n return (\n <div\n role=\"group\"\n data-slot=\"field\"\n data-orientation={orientation}\n className={cn(fieldVariants({ orientation }), className)}\n {...props}\n />\n );\n}\n\nfunction FieldContent({\n className,\n ...props\n}: React.ComponentPropsWithoutRef<'div'>) {\n return (\n <div\n data-slot=\"field-content\"\n className={cn(\n 'group/field-content flex flex-1 flex-col gap-1.5 leading-snug',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction FieldLabel({\n className,\n ...props\n}: React.ComponentPropsWithoutRef<typeof Label>) {\n return (\n <Label\n data-slot=\"field-label\"\n className={cn(\n 'group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50',\n 'has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border *:data-[slot=field]:p-4',\n 'has-data-[state=checked]:bg-primary/5 has-data-[state=checked]:border-primary dark:has-data-[state=checked]:bg-primary/10',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction FieldTitle({\n className,\n ...props\n}: React.ComponentPropsWithoutRef<'div'>) {\n return (\n <div\n data-slot=\"field-label\"\n className={cn(\n 'flex w-fit items-center gap-2 text-sm leading-snug font-medium group-data-[disabled=true]/field:opacity-50',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction FieldDescription({\n className,\n ...props\n}: React.ComponentPropsWithoutRef<'p'>) {\n return (\n <p\n data-slot=\"field-description\"\n className={cn(\n 'text-muted-foreground text-sm leading-normal font-normal group-has-data-[orientation=horizontal]/field:text-balance',\n 'last:mt-0 nth-last-2:-mt-1 [[data-variant=legend]+&]:-mt-1.5',\n '[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction FieldSeparator({\n children,\n className,\n ...props\n}: React.ComponentPropsWithoutRef<'div'> & {\n children?: React.ReactNode;\n}) {\n return (\n <div\n data-slot=\"field-separator\"\n data-content={!!children}\n className={cn(\n 'relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2',\n className\n )}\n {...props}\n >\n <Separator className=\"absolute inset-0 top-1/2\" />\n {children && (\n <span\n className=\"bg-background text-muted-foreground relative mx-auto block w-fit px-2\"\n data-slot=\"field-separator-content\"\n >\n {children}\n </span>\n )}\n </div>\n );\n}\n\nfunction FieldError({\n className,\n children,\n errors,\n ...props\n}: React.ComponentPropsWithoutRef<'div'> & {\n errors?: ({ message?: string } | undefined)[];\n}) {\n const content = React.useMemo(() => {\n if (children) {\n return children;\n }\n\n if (!errors?.length) {\n return null;\n }\n\n if (errors?.length == 1) {\n return errors[0]?.message;\n }\n\n return (\n <ul className=\"ml-4 flex list-disc flex-col gap-1\">\n {errors.map(\n (error, index) =>\n error?.message && <li key={index}>{error.message}</li>\n )}\n </ul>\n );\n }, [children, errors]);\n\n if (!content) {\n return null;\n }\n\n return (\n <div\n role=\"alert\"\n data-slot=\"field-error\"\n className={cn('text-destructive text-sm font-normal', className)}\n {...props}\n >\n {content}\n </div>\n );\n}\n\nexport {\n Field,\n FieldLabel,\n FieldDescription,\n FieldError,\n FieldGroup,\n FieldLegend,\n FieldSeparator,\n FieldSet,\n FieldContent,\n FieldTitle,\n};\n"],"mappings":";;;;;;;;;;AASA,SAAS,SAAS,EAChB,WACA,GAAG,SAC0C;AAC7C,QACE,oBAAC;EACC,aAAU;EACV,WAAW,GACT,uBACA,gFACA,UACD;EACD,GAAI;GACJ;;AAIN,SAAS,YAAY,EACnB,WACA,UAAU,UACV,GAAG,SAGF;AACD,QACE,oBAAC;EACC,aAAU;EACV,gBAAc;EACd,WAAW,GACT,oBACA,mCACA,gCACA,UACD;EACD,GAAI;GACJ;;AAIN,SAAS,WAAW,EAClB,WACA,GAAG,SACqC;AACxC,QACE,oBAAC;EACC,aAAU;EACV,WAAW,GACT,wIACA,UACD;EACD,GAAI;GACJ;;AAIN,MAAM,gBAAgB,IACpB,sEACA;CACE,UAAU,EACR,aAAa;EACX,UAAU,CAAC,wCAAwC;EACnD,YAAY;GACV;GACA;GACA;GACD;EACD,YAAY;GACV;GACA;GACA;GACD;EACF,EACF;CACD,iBAAiB,EACf,aAAa,YACd;CACF,CACF;AAED,SAAS,MAAM,EACb,WACA,cAAc,YACd,GAAG,SAC0E;AAC7E,QACE,oBAAC;EACC,MAAK;EACL,aAAU;EACV,oBAAkB;EAClB,WAAW,GAAG,cAAc,EAAE,aAAa,CAAC,EAAE,UAAU;EACxD,GAAI;GACJ;;AAIN,SAAS,aAAa,EACpB,WACA,GAAG,SACqC;AACxC,QACE,oBAAC;EACC,aAAU;EACV,WAAW,GACT,iEACA,UACD;EACD,GAAI;GACJ;;AAIN,SAAS,WAAW,EAClB,WACA,GAAG,SAC4C;AAC/C,QACE,oBAAC;EACC,aAAU;EACV,WAAW,GACT,gHACA,iKACA,6HACA,UACD;EACD,GAAI;GACJ;;AAIN,SAAS,WAAW,EAClB,WACA,GAAG,SACqC;AACxC,QACE,oBAAC;EACC,aAAU;EACV,WAAW,GACT,8GACA,UACD;EACD,GAAI;GACJ;;AAIN,SAAS,iBAAiB,EACxB,WACA,GAAG,SACmC;AACtC,QACE,oBAAC;EACC,aAAU;EACV,WAAW,GACT,uHACA,gEACA,qEACA,UACD;EACD,GAAI;GACJ;;AAIN,SAAS,eAAe,EACtB,UACA,WACA,GAAG,SAGF;AACD,QACE,qBAAC;EACC,aAAU;EACV,gBAAc,CAAC,CAAC;EAChB,WAAW,GACT,6EACA,UACD;EACD,GAAI;aAEJ,oBAAC,aAAU,WAAU,6BAA6B,EACjD,YACC,oBAAC;GACC,WAAU;GACV,aAAU;GAET;IACI;GAEL;;AAIV,SAAS,WAAW,EAClB,WACA,UACA,QACA,GAAG,SAGF;CACD,MAAM,UAAUA,QAAM,cAAc;AAClC,MAAI,SACF,QAAO;AAGT,MAAI,CAAC,QAAQ,OACX,QAAO;AAGT,MAAI,QAAQ,UAAU,EACpB,QAAO,OAAO,IAAI;AAGpB,SACE,oBAAC;GAAG,WAAU;aACX,OAAO,KACL,OAAO,UACN,OAAO,WAAW,oBAAC,kBAAgB,MAAM,WAAd,MAA2B,CACzD;IACE;IAEN,CAAC,UAAU,OAAO,CAAC;AAEtB,KAAI,CAAC,QACH,QAAO;AAGT,QACE,oBAAC;EACC,MAAK;EACL,aAAU;EACV,WAAW,GAAG,wCAAwC,UAAU;EAChE,GAAI;YAEH;GACG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"focus-on-route-change.d.ts","names":[],"sources":["../../ui/focus-on-route-change.tsx"],"sourcesContent":[],"mappings":";iBAEgB,kBAAA;;;EAAA,aAAA,CAAA,EAAA,MAAkB"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React$1 from "react";
|
|
2
|
+
|
|
3
|
+
//#region ui/focus-on-route-change.tsx
|
|
4
|
+
function FocusOnRouteChange({ focusSelector = "h1, [data-page-title], #main" }) {
|
|
5
|
+
React$1.useEffect(() => {
|
|
6
|
+
const el = document.querySelector(focusSelector);
|
|
7
|
+
if (el) {
|
|
8
|
+
el.tabIndex = -1;
|
|
9
|
+
el.focus();
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
return null;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
//#endregion
|
|
16
|
+
export { FocusOnRouteChange };
|
|
17
|
+
//# sourceMappingURL=focus-on-route-change.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"focus-on-route-change.js","names":[],"sources":["../../ui/focus-on-route-change.tsx"],"sourcesContent":["import * as React from 'react';\n\nexport function FocusOnRouteChange({\n focusSelector = 'h1, [data-page-title], #main',\n}: {\n focusSelector?: string;\n}) {\n React.useEffect(() => {\n const el = document.querySelector<HTMLElement>(focusSelector);\n if (el) {\n el.tabIndex = -1;\n el.focus();\n }\n });\n return null;\n}\n"],"mappings":";;;AAEA,SAAgB,mBAAmB,EACjC,gBAAgB,kCAGf;AACD,SAAM,gBAAgB;EACpB,MAAM,KAAK,SAAS,cAA2B,cAAc;AAC7D,MAAI,IAAI;AACN,MAAG,WAAW;AACd,MAAG,OAAO;;GAEZ;AACF,QAAO"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import * as React$1 from "react";
|
|
2
|
+
import * as react_jsx_runtime192 from "react/jsx-runtime";
|
|
3
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
4
|
+
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
5
|
+
import * as react_hook_form0 from "react-hook-form";
|
|
6
|
+
import { ControllerProps, FieldPath, FieldValues, UseFormReturn, useFieldArray, useForm } from "react-hook-form";
|
|
7
|
+
import { zodResolver } from "@hookform/resolvers/zod";
|
|
8
|
+
|
|
9
|
+
//#region ui/form.d.ts
|
|
10
|
+
declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues = TFieldValues>(props: react_hook_form0.FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React$1.JSX.Element;
|
|
11
|
+
declare const FormField: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({
|
|
12
|
+
...props
|
|
13
|
+
}: ControllerProps<TFieldValues, TName>) => react_jsx_runtime192.JSX.Element;
|
|
14
|
+
declare const useFormField: () => {
|
|
15
|
+
invalid: boolean;
|
|
16
|
+
isDirty: boolean;
|
|
17
|
+
isTouched: boolean;
|
|
18
|
+
isValidating: boolean;
|
|
19
|
+
error?: react_hook_form0.FieldError;
|
|
20
|
+
id: string;
|
|
21
|
+
name: string;
|
|
22
|
+
formItemId: string;
|
|
23
|
+
formDescriptionId: string;
|
|
24
|
+
formMessageId: string;
|
|
25
|
+
};
|
|
26
|
+
declare function FormItem({
|
|
27
|
+
className,
|
|
28
|
+
...props
|
|
29
|
+
}: React$1.ComponentPropsWithoutRef<'div'>): react_jsx_runtime192.JSX.Element;
|
|
30
|
+
declare function FormLabel({
|
|
31
|
+
className,
|
|
32
|
+
...props
|
|
33
|
+
}: React$1.ComponentPropsWithoutRef<typeof LabelPrimitive.Root>): react_jsx_runtime192.JSX.Element;
|
|
34
|
+
declare function FormControl({
|
|
35
|
+
...props
|
|
36
|
+
}: React$1.ComponentPropsWithoutRef<typeof Slot>): react_jsx_runtime192.JSX.Element;
|
|
37
|
+
declare function FormDescription({
|
|
38
|
+
className,
|
|
39
|
+
...props
|
|
40
|
+
}: React$1.ComponentPropsWithoutRef<'p'>): react_jsx_runtime192.JSX.Element;
|
|
41
|
+
declare function FormMessage({
|
|
42
|
+
className,
|
|
43
|
+
...props
|
|
44
|
+
}: React$1.ComponentPropsWithoutRef<'p'>): react_jsx_runtime192.JSX.Element | null;
|
|
45
|
+
//#endregion
|
|
46
|
+
export { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, type UseFormReturn, useFieldArray, useForm, useFormField, zodResolver };
|
|
47
|
+
//# sourceMappingURL=form.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form.d.ts","names":[],"sources":["../../ui/form.tsx"],"sourcesContent":[],"mappings":";;;;;;;;;cAqBM,4BAAI,kDAAA,qBAAA,gBAAA,CAAA,kBAAA,cAAA,UAAA,wBAAA,OAAA,CAAA,GAAA,CAAA;cAaJ,iCACiB,cAAc,2BACrB,UAAU,gBAAgB,UAAU;;GAGjD,gBAAgB,cAAc,WAAM,oBAAA,CAAA,GAAA,CAAA;cAQjC;EA1BA,OAAmB,EAAA,OAAA;EAAf,OAAA,EAAA,OAAA;EAAA,SAAA,EAAA,OAAA;EAAA,YAAA,EAAA,OAAA;EAAA,KAAA,CAAA,EA+CT,gBAAA,CAAA,UA/CS;EAAA,EAAA,EAAA,MAAA;EAAA,IAAA,EAAA,MAAA;EAAA,UAAA,EAAA,MAAA;EAAe,iBAAA,EAAA,MAAA;EAanB,aAWL,EAAA,MAAA;CAVsB;iBA2Cd,QAAA,CA3C4B;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EA8ClC,OAAA,CAAM,wBA9C4B,CAAA,KAAA,CAAA,CAAA,EA8CG,oBAAA,CAAA,GAAA,CAAA,OA9CH;iBA4D5B,SAAA,CA3DiB;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EA8DvB,OAAA,CAAM,wBA9DiB,CAAA,OA8De,cAAA,CAAe,IA9D9B,CAAA,CAAA,EA8DmC,oBAAA,CAAA,GAAA,CAAA,OA9DnC;iBA4EjB,WAAA,CA5EO;EAAA,GAAA;AAAA,CAAA,EA8Eb,OAAA,CAAM,wBA9EO,CAAA,OA8EyB,IA9EzB,CAAA,CAAA,EA8E8B,oBAAA,CAAA,GAAA,CAAA,OA9E9B;iBAiGP,eAAA,CAjG2C;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EAoGjD,OAAA,CAAM,wBApG2C,CAAA,GAAA,CAAA,CAAA,EAoGd,oBAAA,CAAA,GAAA,CAAA,OApGc;iBAiH3C,WAAA,CAjHiC;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EAoHvC,OAAA,CAAM,wBApHiC,CAAA,GAAA,CAAA,CAAA,EAoHJ,oBAAA,CAAA,GAAA,CAAA,OAAA,GApHI,IAAA"}
|
package/dist/ui/form.js
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { cn } from "./utils.js";
|
|
4
|
+
import { Label } from "./label.js";
|
|
5
|
+
import * as React$1 from "react";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
8
|
+
import "@radix-ui/react-label";
|
|
9
|
+
import { Controller, FormProvider, useFieldArray, useForm, useFormContext, useFormState } from "react-hook-form";
|
|
10
|
+
import { zodResolver } from "@hookform/resolvers/zod";
|
|
11
|
+
|
|
12
|
+
//#region ui/form.tsx
|
|
13
|
+
const Form = FormProvider;
|
|
14
|
+
const FormFieldContext = React$1.createContext({});
|
|
15
|
+
const FormField = ({ ...props }) => {
|
|
16
|
+
return /* @__PURE__ */ jsx(FormFieldContext.Provider, {
|
|
17
|
+
value: { name: props.name },
|
|
18
|
+
children: /* @__PURE__ */ jsx(Controller, { ...props })
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
const useFormField = () => {
|
|
22
|
+
const fieldContext = React$1.useContext(FormFieldContext);
|
|
23
|
+
const itemContext = React$1.useContext(FormItemContext);
|
|
24
|
+
const { getFieldState } = useFormContext();
|
|
25
|
+
const formState = useFormState({ name: fieldContext.name });
|
|
26
|
+
const fieldState = getFieldState(fieldContext.name, formState);
|
|
27
|
+
if (!fieldContext) throw new Error("useFormField should be used within <FormField>");
|
|
28
|
+
const { id } = itemContext;
|
|
29
|
+
return {
|
|
30
|
+
id,
|
|
31
|
+
name: fieldContext.name,
|
|
32
|
+
formItemId: `${id}-form-item`,
|
|
33
|
+
formDescriptionId: `${id}-form-item-description`,
|
|
34
|
+
formMessageId: `${id}-form-item-message`,
|
|
35
|
+
...fieldState
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
const FormItemContext = React$1.createContext({});
|
|
39
|
+
function FormItem({ className, ...props }) {
|
|
40
|
+
const id = React$1.useId();
|
|
41
|
+
return /* @__PURE__ */ jsx(FormItemContext.Provider, {
|
|
42
|
+
value: { id },
|
|
43
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
44
|
+
"data-slot": "form-item",
|
|
45
|
+
className: cn("grid gap-2", className),
|
|
46
|
+
...props
|
|
47
|
+
})
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
function FormLabel({ className, ...props }) {
|
|
51
|
+
const { error, formItemId } = useFormField();
|
|
52
|
+
return /* @__PURE__ */ jsx(Label, {
|
|
53
|
+
"data-slot": "form-label",
|
|
54
|
+
"data-error": !!error,
|
|
55
|
+
className: cn("data-[error=true]:text-destructive", className),
|
|
56
|
+
htmlFor: formItemId,
|
|
57
|
+
...props
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
function FormControl({ ...props }) {
|
|
61
|
+
const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
|
|
62
|
+
return /* @__PURE__ */ jsx(Slot, {
|
|
63
|
+
"data-slot": "form-control",
|
|
64
|
+
id: formItemId,
|
|
65
|
+
"aria-describedby": !error ? `${formDescriptionId}` : `${formDescriptionId} ${formMessageId}`,
|
|
66
|
+
"aria-invalid": !!error,
|
|
67
|
+
...props
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
function FormDescription({ className, ...props }) {
|
|
71
|
+
const { formDescriptionId } = useFormField();
|
|
72
|
+
return /* @__PURE__ */ jsx("p", {
|
|
73
|
+
"data-slot": "form-description",
|
|
74
|
+
id: formDescriptionId,
|
|
75
|
+
className: cn("text-muted-foreground text-sm", className),
|
|
76
|
+
...props
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
function FormMessage({ className, ...props }) {
|
|
80
|
+
const { error, formMessageId } = useFormField();
|
|
81
|
+
const body = error ? String(error?.message ?? "") : props.children;
|
|
82
|
+
if (!body) return null;
|
|
83
|
+
return /* @__PURE__ */ jsx("p", {
|
|
84
|
+
"data-slot": "form-message",
|
|
85
|
+
id: formMessageId,
|
|
86
|
+
className: cn("text-destructive text-sm", className),
|
|
87
|
+
...props,
|
|
88
|
+
children: body
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
//#endregion
|
|
93
|
+
export { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, useFieldArray, useForm, useFormField, zodResolver };
|
|
94
|
+
//# sourceMappingURL=form.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form.js","names":["React"],"sources":["../../ui/form.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as LabelPrimitive from '@radix-ui/react-label';\nimport { Slot } from '@radix-ui/react-slot';\nimport {\n Controller,\n type ControllerProps,\n type FieldPath,\n type FieldValues,\n FormProvider,\n useFormContext,\n useFormState,\n} from 'react-hook-form';\n\nimport { cn } from './utils';\nimport { Label } from './label';\n\nexport { zodResolver } from '@hookform/resolvers/zod';\nexport { useForm, type UseFormReturn, useFieldArray } from 'react-hook-form';\n\nconst Form = FormProvider;\n\ninterface 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\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\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\ninterface FormItemContextValue {\n id: string;\n}\n\nconst FormItemContext = React.createContext<FormItemContextValue>(\n {} as FormItemContextValue\n);\n\nfunction FormItem({\n className,\n ...props\n}: React.ComponentPropsWithoutRef<'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\nfunction FormLabel({\n className,\n ...props\n}: React.ComponentPropsWithoutRef<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\nfunction FormControl({\n ...props\n}: React.ComponentPropsWithoutRef<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\nfunction FormDescription({\n className,\n ...props\n}: React.ComponentPropsWithoutRef<'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\nfunction FormMessage({\n className,\n ...props\n}: React.ComponentPropsWithoutRef<'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};\n"],"mappings":";;;;;;;;;;;;AAqBA,MAAM,OAAO;AASb,MAAM,mBAAmBA,QAAM,cAC7B,EAAE,CACH;AAED,MAAM,aAGJ,EACA,GAAG,YACuC;AAC1C,QACE,oBAAC,iBAAiB;EAAS,OAAO,EAAE,MAAM,MAAM,MAAM;YACpD,oBAAC,cAAW,GAAI,QAAS;GACC;;AAIhC,MAAM,qBAAqB;CACzB,MAAM,eAAeA,QAAM,WAAW,iBAAiB;CACvD,MAAM,cAAcA,QAAM,WAAW,gBAAgB;CACrD,MAAM,EAAE,kBAAkB,gBAAgB;CAC1C,MAAM,YAAY,aAAa,EAAE,MAAM,aAAa,MAAM,CAAC;CAC3D,MAAM,aAAa,cAAc,aAAa,MAAM,UAAU;AAE9D,KAAI,CAAC,aACH,OAAM,IAAI,MAAM,iDAAiD;CAGnE,MAAM,EAAE,OAAO;AAEf,QAAO;EACL;EACA,MAAM,aAAa;EACnB,YAAY,GAAG,GAAG;EAClB,mBAAmB,GAAG,GAAG;EACzB,eAAe,GAAG,GAAG;EACrB,GAAG;EACJ;;AAOH,MAAM,kBAAkBA,QAAM,cAC5B,EAAE,CACH;AAED,SAAS,SAAS,EAChB,WACA,GAAG,SACqC;CACxC,MAAM,KAAKA,QAAM,OAAO;AAExB,QACE,oBAAC,gBAAgB;EAAS,OAAO,EAAE,IAAI;YACrC,oBAAC;GACC,aAAU;GACV,WAAW,GAAG,cAAc,UAAU;GACtC,GAAI;IACJ;GACuB;;AAI/B,SAAS,UAAU,EACjB,WACA,GAAG,SAC0D;CAC7D,MAAM,EAAE,OAAO,eAAe,cAAc;AAE5C,QACE,oBAAC;EACC,aAAU;EACV,cAAY,CAAC,CAAC;EACd,WAAW,GAAG,sCAAsC,UAAU;EAC9D,SAAS;EACT,GAAI;GACJ;;AAIN,SAAS,YAAY,EACnB,GAAG,SAC2C;CAC9C,MAAM,EAAE,OAAO,YAAY,mBAAmB,kBAC5C,cAAc;AAEhB,QACE,oBAAC;EACC,aAAU;EACV,IAAI;EACJ,oBACE,CAAC,QACG,GAAG,sBACH,GAAG,kBAAkB,GAAG;EAE9B,gBAAc,CAAC,CAAC;EAChB,GAAI;GACJ;;AAIN,SAAS,gBAAgB,EACvB,WACA,GAAG,SACmC;CACtC,MAAM,EAAE,sBAAsB,cAAc;AAE5C,QACE,oBAAC;EACC,aAAU;EACV,IAAI;EACJ,WAAW,GAAG,iCAAiC,UAAU;EACzD,GAAI;GACJ;;AAIN,SAAS,YAAY,EACnB,WACA,GAAG,SACmC;CACtC,MAAM,EAAE,OAAO,kBAAkB,cAAc;CAC/C,MAAM,OAAO,QAAQ,OAAO,OAAO,WAAW,GAAG,GAAG,MAAM;AAE1D,KAAI,CAAC,KACH,QAAO;AAGT,QACE,oBAAC;EACC,aAAU;EACV,IAAI;EACJ,WAAW,GAAG,4BAA4B,UAAU;EACpD,GAAI;YAEH;GACC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as React$1 from "react";
|
|
2
|
+
import * as react_jsx_runtime198 from "react/jsx-runtime";
|
|
3
|
+
import * as HoverCardPrimitive from "@radix-ui/react-hover-card";
|
|
4
|
+
|
|
5
|
+
//#region ui/hover-card.d.ts
|
|
6
|
+
declare function HoverCard({
|
|
7
|
+
...props
|
|
8
|
+
}: React$1.ComponentProps<typeof HoverCardPrimitive.Root>): react_jsx_runtime198.JSX.Element;
|
|
9
|
+
declare function HoverCardTrigger({
|
|
10
|
+
...props
|
|
11
|
+
}: React$1.ComponentProps<typeof HoverCardPrimitive.Trigger>): react_jsx_runtime198.JSX.Element;
|
|
12
|
+
declare function HoverCardContent({
|
|
13
|
+
className,
|
|
14
|
+
align,
|
|
15
|
+
sideOffset,
|
|
16
|
+
...props
|
|
17
|
+
}: React$1.ComponentProps<typeof HoverCardPrimitive.Content>): react_jsx_runtime198.JSX.Element;
|
|
18
|
+
//#endregion
|
|
19
|
+
export { HoverCard, HoverCardContent, HoverCardTrigger };
|
|
20
|
+
//# sourceMappingURL=hover-card.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hover-card.d.ts","names":[],"sources":["../../ui/hover-card.tsx"],"sourcesContent":[],"mappings":";;;;;iBAOS,SAAA;;GAEN,OAAA,CAAM,sBAAsB,kBAAA,CAAmB,QAAK,oBAAA,CAAA,GAAA,CAAA;iBAI9C,gBAAA;;GAEN,OAAA,CAAM,sBAAsB,kBAAA,CAAmB,WAAQ,oBAAA,CAAA,GAAA,CAAA;iBAMjD,gBAAA;;;;;GAKN,OAAA,CAAM,sBAAsB,kBAAA,CAAmB,WAAQ,oBAAA,CAAA,GAAA,CAAA"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import "react";
|
|
4
|
+
import { cn } from "@contractspec/lib.ui-kit-core/utils";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
import * as HoverCardPrimitive from "@radix-ui/react-hover-card";
|
|
7
|
+
|
|
8
|
+
//#region ui/hover-card.tsx
|
|
9
|
+
function HoverCard({ ...props }) {
|
|
10
|
+
return /* @__PURE__ */ jsx(HoverCardPrimitive.Root, {
|
|
11
|
+
"data-slot": "hover-card",
|
|
12
|
+
...props
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
function HoverCardTrigger({ ...props }) {
|
|
16
|
+
return /* @__PURE__ */ jsx(HoverCardPrimitive.Trigger, {
|
|
17
|
+
"data-slot": "hover-card-trigger",
|
|
18
|
+
...props
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
function HoverCardContent({ className, align = "center", sideOffset = 4, ...props }) {
|
|
22
|
+
return /* @__PURE__ */ jsx(HoverCardPrimitive.Portal, {
|
|
23
|
+
"data-slot": "hover-card-portal",
|
|
24
|
+
children: /* @__PURE__ */ jsx(HoverCardPrimitive.Content, {
|
|
25
|
+
"data-slot": "hover-card-content",
|
|
26
|
+
align,
|
|
27
|
+
sideOffset,
|
|
28
|
+
className: cn("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden", className),
|
|
29
|
+
...props
|
|
30
|
+
})
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
//#endregion
|
|
35
|
+
export { HoverCard, HoverCardContent, HoverCardTrigger };
|
|
36
|
+
//# sourceMappingURL=hover-card.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hover-card.js","names":[],"sources":["../../ui/hover-card.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as HoverCardPrimitive from '@radix-ui/react-hover-card';\n\nimport { cn } from '@contractspec/lib.ui-kit-core/utils';\n\nfunction HoverCard({\n ...props\n}: React.ComponentProps<typeof HoverCardPrimitive.Root>) {\n return <HoverCardPrimitive.Root data-slot=\"hover-card\" {...props} />;\n}\n\nfunction HoverCardTrigger({\n ...props\n}: React.ComponentProps<typeof HoverCardPrimitive.Trigger>) {\n return (\n <HoverCardPrimitive.Trigger data-slot=\"hover-card-trigger\" {...props} />\n );\n}\n\nfunction HoverCardContent({\n className,\n align = 'center',\n sideOffset = 4,\n ...props\n}: React.ComponentProps<typeof HoverCardPrimitive.Content>) {\n return (\n <HoverCardPrimitive.Portal data-slot=\"hover-card-portal\">\n <HoverCardPrimitive.Content\n data-slot=\"hover-card-content\"\n align={align}\n sideOffset={sideOffset}\n className={cn(\n 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden',\n className\n )}\n {...props}\n />\n </HoverCardPrimitive.Portal>\n );\n}\n\nexport { HoverCard, HoverCardTrigger, HoverCardContent };\n"],"mappings":";;;;;;;;AAOA,SAAS,UAAU,EACjB,GAAG,SACoD;AACvD,QAAO,oBAAC,mBAAmB;EAAK,aAAU;EAAa,GAAI;GAAS;;AAGtE,SAAS,iBAAiB,EACxB,GAAG,SACuD;AAC1D,QACE,oBAAC,mBAAmB;EAAQ,aAAU;EAAqB,GAAI;GAAS;;AAI5E,SAAS,iBAAiB,EACxB,WACA,QAAQ,UACR,aAAa,GACb,GAAG,SACuD;AAC1D,QACE,oBAAC,mBAAmB;EAAO,aAAU;YACnC,oBAAC,mBAAmB;GAClB,aAAU;GACH;GACK;GACZ,WAAW,GACT,qeACA,UACD;GACD,GAAI;IACJ;GACwB"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { Button } from "./button.js";
|
|
2
|
+
import * as React$1 from "react";
|
|
3
|
+
import * as react_jsx_runtime201 from "react/jsx-runtime";
|
|
4
|
+
import { VariantProps } from "class-variance-authority";
|
|
5
|
+
import * as class_variance_authority_types11 from "class-variance-authority/types";
|
|
6
|
+
|
|
7
|
+
//#region ui/input-group.d.ts
|
|
8
|
+
declare function InputGroup({
|
|
9
|
+
className,
|
|
10
|
+
...props
|
|
11
|
+
}: React$1.ComponentPropsWithoutRef<'div'>): react_jsx_runtime201.JSX.Element;
|
|
12
|
+
declare const inputGroupAddonVariants: (props?: ({
|
|
13
|
+
align?: "inline-start" | "inline-end" | "block-start" | "block-end" | null | undefined;
|
|
14
|
+
} & class_variance_authority_types11.ClassProp) | undefined) => string;
|
|
15
|
+
declare function InputGroupAddon({
|
|
16
|
+
className,
|
|
17
|
+
align,
|
|
18
|
+
...props
|
|
19
|
+
}: React$1.ComponentPropsWithoutRef<'div'> & VariantProps<typeof inputGroupAddonVariants>): react_jsx_runtime201.JSX.Element;
|
|
20
|
+
declare const inputGroupButtonVariants: (props?: ({
|
|
21
|
+
size?: "sm" | "xs" | "icon-xs" | "icon-sm" | null | undefined;
|
|
22
|
+
} & class_variance_authority_types11.ClassProp) | undefined) => string;
|
|
23
|
+
declare function InputGroupButton({
|
|
24
|
+
className,
|
|
25
|
+
type,
|
|
26
|
+
variant,
|
|
27
|
+
size,
|
|
28
|
+
...props
|
|
29
|
+
}: Omit<React$1.ComponentProps<typeof Button>, 'size'> & VariantProps<typeof inputGroupButtonVariants>): react_jsx_runtime201.JSX.Element;
|
|
30
|
+
declare function InputGroupText({
|
|
31
|
+
className,
|
|
32
|
+
...props
|
|
33
|
+
}: React$1.ComponentPropsWithoutRef<'span'>): react_jsx_runtime201.JSX.Element;
|
|
34
|
+
declare function InputGroupInput({
|
|
35
|
+
className,
|
|
36
|
+
...props
|
|
37
|
+
}: React$1.ComponentPropsWithoutRef<'input'>): react_jsx_runtime201.JSX.Element;
|
|
38
|
+
declare function InputGroupTextarea({
|
|
39
|
+
className,
|
|
40
|
+
...props
|
|
41
|
+
}: React$1.ComponentPropsWithoutRef<'textarea'>): react_jsx_runtime201.JSX.Element;
|
|
42
|
+
//#endregion
|
|
43
|
+
export { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea };
|
|
44
|
+
//# sourceMappingURL=input-group.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input-group.d.ts","names":[],"sources":["../../ui/input-group.tsx"],"sourcesContent":[],"mappings":";;;;;;;iBAUS,UAAA;;;GAGN,OAAA,CAAM,kCAA+B,oBAAA,CAAA,GAAA,CAAA;cAwBlC;;IAmBL,gCAAA,CAAA;AAlDiC,iBAoDzB,eAAA,CAhDU;EAAA,SAAA;EAAA,KAAA;EAAA,GAAA;AAAA,CAAA,EAoDhB,OAAA,CAAM,wBApDU,CAAA,KAAA,CAAA,GAqDjB,YArDiB,CAAA,OAqDG,uBArDH,CAAA,CAAA,EAqD2B,oBAAA,CAAA,GAAA,CAAA,OArD3B;cA6Eb,wBA5EJ,EAAA,CAAA,KAEsC,CAFtC,EAAA,CAAA;EAEC,IAAA,CAAM,EAAA,IAAA,GAAA,IAAA,GAAA,SAAA,GAAA,SAAA,GAAA,IAAA,GAAA,SAAA;CAA+B,GA0FvC,gCAAA,CAAA,SA1FuC,CAAA,GAAA,SAAA,EAAA,GAAA,MAAA;iBA4F/B,gBAAA,CA5F+B;EAAA,SAAA;EAAA,IAAA;EAAA,OAAA;EAAA,IAAA;EAAA,GAAA;AAAA,CAAA,EAkGrC,IAlGqC,CAkGhC,OAAA,CAAM,cAlG0B,CAAA,OAkGJ,MAlGI,CAAA,EAAA,MAAA,CAAA,GAmGtC,YAnGsC,CAAA,OAmGlB,wBAnGkB,CAAA,CAAA,EAmGO,oBAAA,CAAA,GAAA,CAAA,OAnGP;AAAA,iBA+G/B,cAAA,CApER;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EAuEE,OAAA,CAAM,wBAvER,CAAA,MAAA,CAAA,CAAA,EAuEwC,oBAAA,CAAA,GAAA,CAAA,OAvExC;iBAmFQ,eAAA,CAjFe;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EAoFrB,OAAA,CAAM,wBApFe,CAAA,OAAA,CAAA,CAAA,EAoFkB,oBAAA,CAAA,GAAA,CAAA,OApFlB;iBAiGf,kBAAA,CAhGP;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EAmGC,OAAA,CAAM,wBAnGP,CAAA,UAAA,CAAA,CAAA,EAmG2C,oBAAA,CAAA,GAAA,CAAA,OAnG3C"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { Button } from "./button.js";
|
|
4
|
+
import { Input } from "./input.js";
|
|
5
|
+
import { Textarea } from "./textarea.js";
|
|
6
|
+
import "react";
|
|
7
|
+
import { cn } from "@contractspec/lib.ui-kit-core/utils";
|
|
8
|
+
import { jsx } from "react/jsx-runtime";
|
|
9
|
+
import { cva } from "class-variance-authority";
|
|
10
|
+
|
|
11
|
+
//#region ui/input-group.tsx
|
|
12
|
+
function InputGroup({ className, ...props }) {
|
|
13
|
+
return /* @__PURE__ */ jsx("div", {
|
|
14
|
+
"data-slot": "input-group",
|
|
15
|
+
role: "group",
|
|
16
|
+
className: cn("group/input-group border-input dark:bg-input/30 relative flex w-full items-center rounded-md border shadow-xs transition-[color,box-shadow] outline-none", "h-9 min-w-0 has-[>textarea]:h-auto", "has-[>[data-align=inline-start]]:[&>input]:pl-2", "has-[>[data-align=inline-end]]:[&>input]:pr-2", "has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3", "has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3", "has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot=input-group-control]:focus-visible]:ring-[3px]", "has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[[data-slot][aria-invalid=true]]:border-destructive dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40", className),
|
|
17
|
+
...props
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
const inputGroupAddonVariants = cva("text-muted-foreground flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium select-none [&>svg:not([class*='size-'])]:size-4 [&>kbd]:rounded-[calc(var(--radius)-5px)] group-data-[disabled=true]/input-group:opacity-50", {
|
|
21
|
+
variants: { align: {
|
|
22
|
+
"inline-start": "order-first pl-3 has-[>button]:ml-[-0.45rem] has-[>kbd]:ml-[-0.35rem]",
|
|
23
|
+
"inline-end": "order-last pr-3 has-[>button]:mr-[-0.45rem] has-[>kbd]:mr-[-0.35rem]",
|
|
24
|
+
"block-start": "order-first w-full justify-start px-3 pt-3 [.border-b]:pb-3 group-has-[>input]/input-group:pt-2.5",
|
|
25
|
+
"block-end": "order-last w-full justify-start px-3 pb-3 [.border-t]:pt-3 group-has-[>input]/input-group:pb-2.5"
|
|
26
|
+
} },
|
|
27
|
+
defaultVariants: { align: "inline-start" }
|
|
28
|
+
});
|
|
29
|
+
function InputGroupAddon({ className, align = "inline-start", ...props }) {
|
|
30
|
+
return /* @__PURE__ */ jsx("div", {
|
|
31
|
+
role: "group",
|
|
32
|
+
"data-slot": "input-group-addon",
|
|
33
|
+
"data-align": align,
|
|
34
|
+
className: cn(inputGroupAddonVariants({ align }), className),
|
|
35
|
+
onClick: (e) => {
|
|
36
|
+
if (e.target.closest("button")) return;
|
|
37
|
+
e.currentTarget.parentElement?.querySelector("input")?.focus();
|
|
38
|
+
},
|
|
39
|
+
onKeyDown: (e) => {
|
|
40
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
41
|
+
e.preventDefault();
|
|
42
|
+
e.currentTarget.parentElement?.querySelector("input")?.focus();
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
...props
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
const inputGroupButtonVariants = cva("text-sm shadow-none flex gap-2 items-center", {
|
|
49
|
+
variants: { size: {
|
|
50
|
+
xs: "h-6 gap-1 px-2 rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-3.5 has-[>svg]:px-2",
|
|
51
|
+
sm: "h-8 px-2.5 gap-1.5 rounded-md has-[>svg]:px-2.5",
|
|
52
|
+
"icon-xs": "size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0",
|
|
53
|
+
"icon-sm": "size-8 p-0 has-[>svg]:p-0"
|
|
54
|
+
} },
|
|
55
|
+
defaultVariants: { size: "xs" }
|
|
56
|
+
});
|
|
57
|
+
function InputGroupButton({ className, type = "button", variant = "ghost", size = "xs", ...props }) {
|
|
58
|
+
return /* @__PURE__ */ jsx(Button, {
|
|
59
|
+
type,
|
|
60
|
+
"data-size": size,
|
|
61
|
+
variant,
|
|
62
|
+
className: cn(inputGroupButtonVariants({ size }), className),
|
|
63
|
+
...props
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
function InputGroupText({ className, ...props }) {
|
|
67
|
+
return /* @__PURE__ */ jsx("span", {
|
|
68
|
+
className: cn("text-muted-foreground flex items-center gap-2 text-sm [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4", className),
|
|
69
|
+
...props
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
function InputGroupInput({ className, ...props }) {
|
|
73
|
+
return /* @__PURE__ */ jsx(Input, {
|
|
74
|
+
"data-slot": "input-group-control",
|
|
75
|
+
className: cn("flex-1 rounded-none border-0 bg-transparent shadow-none focus-visible:ring-0 dark:bg-transparent", className),
|
|
76
|
+
...props
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
function InputGroupTextarea({ className, ...props }) {
|
|
80
|
+
return /* @__PURE__ */ jsx(Textarea, {
|
|
81
|
+
"data-slot": "input-group-control",
|
|
82
|
+
className: cn("flex-1 resize-none rounded-none border-0 bg-transparent py-3 shadow-none focus-visible:ring-0 dark:bg-transparent", className),
|
|
83
|
+
...props
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
//#endregion
|
|
88
|
+
export { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea };
|
|
89
|
+
//# sourceMappingURL=input-group.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input-group.js","names":[],"sources":["../../ui/input-group.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { cn } from '@contractspec/lib.ui-kit-core/utils';\nimport { Button } from './button';\nimport { Input } from './input';\nimport { Textarea } from './textarea';\n\nfunction InputGroup({\n className,\n ...props\n}: React.ComponentPropsWithoutRef<'div'>) {\n return (\n <div\n data-slot=\"input-group\"\n role=\"group\"\n className={cn(\n 'group/input-group border-input dark:bg-input/30 relative flex w-full items-center rounded-md border shadow-xs transition-[color,box-shadow] outline-none',\n 'h-9 min-w-0 has-[>textarea]:h-auto',\n // Variants based on alignment.\n 'has-[>[data-align=inline-start]]:[&>input]:pl-2',\n 'has-[>[data-align=inline-end]]:[&>input]:pr-2',\n 'has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3',\n 'has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3',\n // Focus state.\n 'has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot=input-group-control]:focus-visible]:ring-[3px]',\n // Error state.\n 'has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[[data-slot][aria-invalid=true]]:border-destructive dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40',\n className\n )}\n {...props}\n />\n );\n}\n\nconst inputGroupAddonVariants = cva(\n \"text-muted-foreground flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium select-none [&>svg:not([class*='size-'])]:size-4 [&>kbd]:rounded-[calc(var(--radius)-5px)] group-data-[disabled=true]/input-group:opacity-50\",\n {\n variants: {\n align: {\n 'inline-start':\n 'order-first pl-3 has-[>button]:ml-[-0.45rem] has-[>kbd]:ml-[-0.35rem]',\n 'inline-end':\n 'order-last pr-3 has-[>button]:mr-[-0.45rem] has-[>kbd]:mr-[-0.35rem]',\n 'block-start':\n 'order-first w-full justify-start px-3 pt-3 [.border-b]:pb-3 group-has-[>input]/input-group:pt-2.5',\n 'block-end':\n 'order-last w-full justify-start px-3 pb-3 [.border-t]:pt-3 group-has-[>input]/input-group:pb-2.5',\n },\n },\n defaultVariants: {\n align: 'inline-start',\n },\n }\n);\n\nfunction InputGroupAddon({\n className,\n align = 'inline-start',\n ...props\n}: React.ComponentPropsWithoutRef<'div'> &\n VariantProps<typeof inputGroupAddonVariants>) {\n return (\n <div\n role=\"group\"\n data-slot=\"input-group-addon\"\n data-align={align}\n className={cn(inputGroupAddonVariants({ align }), className)}\n onClick={(e) => {\n if ((e.target as HTMLElement).closest('button')) {\n return;\n }\n e.currentTarget.parentElement?.querySelector('input')?.focus();\n }}\n onKeyDown={(e) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n e.currentTarget.parentElement?.querySelector('input')?.focus();\n }\n }}\n {...props}\n />\n );\n}\n\nconst inputGroupButtonVariants = cva(\n 'text-sm shadow-none flex gap-2 items-center',\n {\n variants: {\n size: {\n xs: \"h-6 gap-1 px-2 rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-3.5 has-[>svg]:px-2\",\n sm: 'h-8 px-2.5 gap-1.5 rounded-md has-[>svg]:px-2.5',\n 'icon-xs':\n 'size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0',\n 'icon-sm': 'size-8 p-0 has-[>svg]:p-0',\n },\n },\n defaultVariants: {\n size: 'xs',\n },\n }\n);\n\nfunction InputGroupButton({\n className,\n type = 'button',\n variant = 'ghost',\n size = 'xs',\n ...props\n}: Omit<React.ComponentProps<typeof Button>, 'size'> &\n VariantProps<typeof inputGroupButtonVariants>) {\n return (\n <Button\n type={type}\n data-size={size}\n variant={variant}\n className={cn(inputGroupButtonVariants({ size }), className)}\n {...props}\n />\n );\n}\n\nfunction InputGroupText({\n className,\n ...props\n}: React.ComponentPropsWithoutRef<'span'>) {\n return (\n <span\n className={cn(\n \"text-muted-foreground flex items-center gap-2 text-sm [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n />\n );\n}\n\nfunction InputGroupInput({\n className,\n ...props\n}: React.ComponentPropsWithoutRef<'input'>) {\n return (\n <Input\n data-slot=\"input-group-control\"\n className={cn(\n 'flex-1 rounded-none border-0 bg-transparent shadow-none focus-visible:ring-0 dark:bg-transparent',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction InputGroupTextarea({\n className,\n ...props\n}: React.ComponentPropsWithoutRef<'textarea'>) {\n return (\n <Textarea\n data-slot=\"input-group-control\"\n className={cn(\n 'flex-1 resize-none rounded-none border-0 bg-transparent py-3 shadow-none focus-visible:ring-0 dark:bg-transparent',\n className\n )}\n {...props}\n />\n );\n}\n\nexport {\n InputGroup,\n InputGroupAddon,\n InputGroupButton,\n InputGroupText,\n InputGroupInput,\n InputGroupTextarea,\n};\n"],"mappings":";;;;;;;;;;;AAUA,SAAS,WAAW,EAClB,WACA,GAAG,SACqC;AACxC,QACE,oBAAC;EACC,aAAU;EACV,MAAK;EACL,WAAW,GACT,4JACA,sCAEA,mDACA,iDACA,kIACA,4HAEA,mMAEA,kLACA,UACD;EACD,GAAI;GACJ;;AAIN,MAAM,0BAA0B,IAC9B,2PACA;CACE,UAAU,EACR,OAAO;EACL,gBACE;EACF,cACE;EACF,eACE;EACF,aACE;EACH,EACF;CACD,iBAAiB,EACf,OAAO,gBACR;CACF,CACF;AAED,SAAS,gBAAgB,EACvB,WACA,QAAQ,gBACR,GAAG,SAE2C;AAC9C,QACE,oBAAC;EACC,MAAK;EACL,aAAU;EACV,cAAY;EACZ,WAAW,GAAG,wBAAwB,EAAE,OAAO,CAAC,EAAE,UAAU;EAC5D,UAAU,MAAM;AACd,OAAK,EAAE,OAAuB,QAAQ,SAAS,CAC7C;AAEF,KAAE,cAAc,eAAe,cAAc,QAAQ,EAAE,OAAO;;EAEhE,YAAY,MAAM;AAChB,OAAI,EAAE,QAAQ,WAAW,EAAE,QAAQ,KAAK;AACtC,MAAE,gBAAgB;AAClB,MAAE,cAAc,eAAe,cAAc,QAAQ,EAAE,OAAO;;;EAGlE,GAAI;GACJ;;AAIN,MAAM,2BAA2B,IAC/B,+CACA;CACE,UAAU,EACR,MAAM;EACJ,IAAI;EACJ,IAAI;EACJ,WACE;EACF,WAAW;EACZ,EACF;CACD,iBAAiB,EACf,MAAM,MACP;CACF,CACF;AAED,SAAS,iBAAiB,EACxB,WACA,OAAO,UACP,UAAU,SACV,OAAO,MACP,GAAG,SAE4C;AAC/C,QACE,oBAAC;EACO;EACN,aAAW;EACF;EACT,WAAW,GAAG,yBAAyB,EAAE,MAAM,CAAC,EAAE,UAAU;EAC5D,GAAI;GACJ;;AAIN,SAAS,eAAe,EACtB,WACA,GAAG,SACsC;AACzC,QACE,oBAAC;EACC,WAAW,GACT,0HACA,UACD;EACD,GAAI;GACJ;;AAIN,SAAS,gBAAgB,EACvB,WACA,GAAG,SACuC;AAC1C,QACE,oBAAC;EACC,aAAU;EACV,WAAW,GACT,oGACA,UACD;EACD,GAAI;GACJ;;AAIN,SAAS,mBAAmB,EAC1B,WACA,GAAG,SAC0C;AAC7C,QACE,oBAAC;EACC,aAAU;EACV,WAAW,GACT,qHACA,UACD;EACD,GAAI;GACJ"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import * as React$1 from "react";
|
|
2
|
+
import * as input_otp0 from "input-otp";
|
|
3
|
+
|
|
4
|
+
//#region ui/input-otp.d.ts
|
|
5
|
+
declare const InputOTP: React$1.ForwardRefExoticComponent<(Omit<Omit<React$1.InputHTMLAttributes<HTMLInputElement>, "value" | "onChange" | "maxLength" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "pasteTransformer" | "containerClassName" | "noScriptCSSFallback"> & {
|
|
6
|
+
value?: string;
|
|
7
|
+
onChange?: (newValue: string) => unknown;
|
|
8
|
+
maxLength: number;
|
|
9
|
+
textAlign?: "left" | "center" | "right";
|
|
10
|
+
onComplete?: (...args: any[]) => unknown;
|
|
11
|
+
pushPasswordManagerStrategy?: "increase-width" | "none";
|
|
12
|
+
pasteTransformer?: (pasted: string) => string;
|
|
13
|
+
containerClassName?: string;
|
|
14
|
+
noScriptCSSFallback?: string | null;
|
|
15
|
+
} & {
|
|
16
|
+
render: (props: input_otp0.RenderProps) => React$1.ReactNode;
|
|
17
|
+
children?: never;
|
|
18
|
+
} & React$1.RefAttributes<HTMLInputElement>, "ref"> | Omit<Omit<React$1.InputHTMLAttributes<HTMLInputElement>, "value" | "onChange" | "maxLength" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "pasteTransformer" | "containerClassName" | "noScriptCSSFallback"> & {
|
|
19
|
+
value?: string;
|
|
20
|
+
onChange?: (newValue: string) => unknown;
|
|
21
|
+
maxLength: number;
|
|
22
|
+
textAlign?: "left" | "center" | "right";
|
|
23
|
+
onComplete?: (...args: any[]) => unknown;
|
|
24
|
+
pushPasswordManagerStrategy?: "increase-width" | "none";
|
|
25
|
+
pasteTransformer?: (pasted: string) => string;
|
|
26
|
+
containerClassName?: string;
|
|
27
|
+
noScriptCSSFallback?: string | null;
|
|
28
|
+
} & {
|
|
29
|
+
render?: never;
|
|
30
|
+
children: React$1.ReactNode;
|
|
31
|
+
} & React$1.RefAttributes<HTMLInputElement>, "ref">) & React$1.RefAttributes<HTMLInputElement>>;
|
|
32
|
+
declare const InputOTPGroup: React$1.ForwardRefExoticComponent<Omit<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
33
|
+
declare const InputOTPSlot: React$1.ForwardRefExoticComponent<Omit<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
34
|
+
index: number;
|
|
35
|
+
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
36
|
+
declare const InputOTPSeparator: React$1.ForwardRefExoticComponent<Omit<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
37
|
+
//#endregion
|
|
38
|
+
export { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot };
|
|
39
|
+
//# sourceMappingURL=input-otp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input-otp.d.ts","names":[],"sources":["../../ui/input-otp.tsx"],"sourcesContent":[],"mappings":";;;;cAQM,UAAQ,OAAA,CAAA,2BAAA,KAAA,KAAA,OAAA,CAAA,oBAAA;;;EAAR,SAAA,EAaJ,MAAA;EAbY,SAAA,CAAA,EAAA,MAAA,GAAA,QAAA,GAAA,OAAA;EAAA,UAAA,CAAA,EAAA,CAAA,GAAA,IAAA,EAAA,GAAA,EAAA,EAAA,GAAA,OAAA;EAAA,2BAAA,CAAA,EAAA,gBAAA,GAAA,MAAA;EAAA,gBAAA,CAAA,EAAA,CAAA,MAAA,EAAA,MAAA,EAAA,GAAA,MAAA;;;;EAAA,MAAA,EAAA,CAAA,KAAA,EAAA,UAAA,CAAA,WAAA,EAAA,oBAAA;;;;;;;;;;EAAA,kBAAA,CAAA,EAAA,MAAA;EAAA,mBAAA,CAAA,EAAA,MAAA,GAAA,IAAA;AAAA,CAAA,GAgBR;EAAa,MAAA,CAAA,EAAA,KAAA;EAAA,QAAA,mBAAA;CAAA,wBAAA,iBAAA,CAAA,EAAA,KAAA,CAAA,CAAA,wBAAA,iBAAA,CAAA,CAAA;cAAb,aAAa,EAAA,OAAA,CAAA,yBAAA,CAAA,IAAA,CAAA,OAAA,CAAA,iBAAA,CAAA,OAAA,CAAA,cAAA,CAAA,cAAA,CAAA,EAAA,cAAA,CAAA,EAAA,KAAA,CAAA,GAAA,OAAA,CAAA,aAAA,CAAA,cAAA,CAAA,CAAA;cAQb,YARa,EAQD,OAAA,CAAA,yBARC,CAQD,IARC,CAQD,OAAA,CAAA,iBARC,CAQD,OAAA,CAAA,cARC,CAQD,cARC,CAAA,EAQD,cARC,CAAA,EAAA,KAAA,CAAA,GAAA;EAAA,KAAA,EAAA,MAAA;CAAA,wBAAA,eAAA,CAAA,CAAA;cAoCb,iBApCa,EAoCI,OAAA,CAAA,yBApCJ,CAoCI,IApCJ,CAoCI,OAAA,CAAA,iBApCJ,CAoCI,OAAA,CAAA,cApCJ,CAoCI,cApCJ,CAAA,EAoCI,cApCJ,CAAA,EAAA,KAAA,CAAA,GAoCI,OAAA,CAAA,aApCJ,CAoCI,cApCJ,CAAA,CAAA"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import * as React$1 from "react";
|
|
4
|
+
import { Dot } from "lucide-react";
|
|
5
|
+
import { cn } from "@contractspec/lib.ui-kit-core/utils";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
import { OTPInput, OTPInputContext } from "input-otp";
|
|
8
|
+
|
|
9
|
+
//#region ui/input-otp.tsx
|
|
10
|
+
const InputOTP = React$1.forwardRef(({ className, containerClassName, ...props }, ref) => /* @__PURE__ */ jsx(OTPInput, {
|
|
11
|
+
ref,
|
|
12
|
+
containerClassName: cn("flex items-center gap-2 has-disabled:opacity-50", containerClassName),
|
|
13
|
+
className: cn("disabled:cursor-not-allowed", className),
|
|
14
|
+
...props
|
|
15
|
+
}));
|
|
16
|
+
InputOTP.displayName = "InputOTP";
|
|
17
|
+
const InputOTPGroup = React$1.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", {
|
|
18
|
+
ref,
|
|
19
|
+
className: cn("flex items-center", className),
|
|
20
|
+
...props
|
|
21
|
+
}));
|
|
22
|
+
InputOTPGroup.displayName = "InputOTPGroup";
|
|
23
|
+
const InputOTPSlot = React$1.forwardRef(({ index, className, ...props }, ref) => {
|
|
24
|
+
const { char, hasFakeCaret, isActive } = React$1.useContext(OTPInputContext).slots[index] || {};
|
|
25
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
26
|
+
ref,
|
|
27
|
+
className: cn("border-input relative flex h-10 w-10 items-center justify-center border-y border-r text-base transition-all first:rounded-l-md first:border-l last:rounded-r-md", isActive && "ring-ring ring-offset-background z-10 ring-2", className),
|
|
28
|
+
...props,
|
|
29
|
+
children: [char, hasFakeCaret && /* @__PURE__ */ jsx("div", {
|
|
30
|
+
className: "pointer-events-none absolute inset-0 flex items-center justify-center",
|
|
31
|
+
children: /* @__PURE__ */ jsx("div", { className: "animate-caret-blink bg-foreground h-4 w-px duration-1000" })
|
|
32
|
+
})]
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
InputOTPSlot.displayName = "InputOTPSlot";
|
|
36
|
+
const InputOTPSeparator = React$1.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsx("div", {
|
|
37
|
+
ref,
|
|
38
|
+
role: "separator",
|
|
39
|
+
...props,
|
|
40
|
+
children: /* @__PURE__ */ jsx(Dot, {})
|
|
41
|
+
}));
|
|
42
|
+
InputOTPSeparator.displayName = "InputOTPSeparator";
|
|
43
|
+
|
|
44
|
+
//#endregion
|
|
45
|
+
export { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot };
|
|
46
|
+
//# sourceMappingURL=input-otp.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input-otp.js","names":["React"],"sources":["../../ui/input-otp.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { OTPInput, OTPInputContext } from 'input-otp';\nimport { Dot } from 'lucide-react';\n\nimport { cn } from '@contractspec/lib.ui-kit-core/utils';\n\nconst InputOTP = React.forwardRef<\n React.ElementRef<typeof OTPInput>,\n React.ComponentPropsWithoutRef<typeof OTPInput>\n>(({ className, containerClassName, ...props }, ref) => (\n <OTPInput\n ref={ref}\n containerClassName={cn(\n 'flex items-center gap-2 has-disabled:opacity-50',\n containerClassName\n )}\n className={cn('disabled:cursor-not-allowed', className)}\n {...props}\n />\n));\nInputOTP.displayName = 'InputOTP';\n\nconst InputOTPGroup = React.forwardRef<\n React.ElementRef<'div'>,\n React.ComponentPropsWithoutRef<'div'>\n>(({ className, ...props }, ref) => (\n <div ref={ref} className={cn('flex items-center', className)} {...props} />\n));\nInputOTPGroup.displayName = 'InputOTPGroup';\n\nconst InputOTPSlot = React.forwardRef<\n React.ElementRef<'div'>,\n React.ComponentPropsWithoutRef<'div'> & { index: number }\n>(({ index, className, ...props }, ref) => {\n const inputOTPContext = React.useContext(OTPInputContext);\n const { char, hasFakeCaret, isActive } = inputOTPContext.slots[index] || {};\n\n return (\n <div\n ref={ref}\n className={cn(\n 'border-input relative flex h-10 w-10 items-center justify-center border-y border-r text-base transition-all first:rounded-l-md first:border-l last:rounded-r-md',\n isActive && 'ring-ring ring-offset-background z-10 ring-2',\n className\n )}\n {...props}\n >\n {char}\n {hasFakeCaret && (\n <div className=\"pointer-events-none absolute inset-0 flex items-center justify-center\">\n <div className=\"animate-caret-blink bg-foreground h-4 w-px duration-1000\" />\n </div>\n )}\n </div>\n );\n});\nInputOTPSlot.displayName = 'InputOTPSlot';\n\nconst InputOTPSeparator = React.forwardRef<\n React.ElementRef<'div'>,\n React.ComponentPropsWithoutRef<'div'>\n>(({ ...props }, ref) => (\n <div ref={ref} role=\"separator\" {...props}>\n <Dot />\n </div>\n));\nInputOTPSeparator.displayName = 'InputOTPSeparator';\n\nexport { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator };\n"],"mappings":";;;;;;;;;AAQA,MAAM,WAAWA,QAAM,YAGpB,EAAE,WAAW,oBAAoB,GAAG,SAAS,QAC9C,oBAAC;CACM;CACL,oBAAoB,GAClB,mDACA,mBACD;CACD,WAAW,GAAG,+BAA+B,UAAU;CACvD,GAAI;EACJ,CACF;AACF,SAAS,cAAc;AAEvB,MAAM,gBAAgBA,QAAM,YAGzB,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC;CAAS;CAAK,WAAW,GAAG,qBAAqB,UAAU;CAAE,GAAI;EAAS,CAC3E;AACF,cAAc,cAAc;AAE5B,MAAM,eAAeA,QAAM,YAGxB,EAAE,OAAO,WAAW,GAAG,SAAS,QAAQ;CAEzC,MAAM,EAAE,MAAM,cAAc,aADJA,QAAM,WAAW,gBAAgB,CACA,MAAM,UAAU,EAAE;AAE3E,QACE,qBAAC;EACM;EACL,WAAW,GACT,mKACA,YAAY,gDACZ,UACD;EACD,GAAI;aAEH,MACA,gBACC,oBAAC;GAAI,WAAU;aACb,oBAAC,SAAI,WAAU,6DAA6D;IACxE;GAEJ;EAER;AACF,aAAa,cAAc;AAE3B,MAAM,oBAAoBA,QAAM,YAG7B,EAAE,GAAG,SAAS,QACf,oBAAC;CAAS;CAAK,MAAK;CAAY,GAAI;WAClC,oBAAC,QAAM;EACH,CACN;AACF,kBAAkB,cAAc"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React$1 from "react";
|
|
2
|
+
import * as react_jsx_runtime7 from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region ui/input.d.ts
|
|
5
|
+
type InputProps = React$1.ComponentPropsWithoutRef<'input'>;
|
|
6
|
+
declare function Input({
|
|
7
|
+
className,
|
|
8
|
+
type,
|
|
9
|
+
...props
|
|
10
|
+
}: InputProps): react_jsx_runtime7.JSX.Element;
|
|
11
|
+
//#endregion
|
|
12
|
+
export { Input, InputProps };
|
|
13
|
+
//# sourceMappingURL=input.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input.d.ts","names":[],"sources":["../../ui/input.tsx"],"sourcesContent":[],"mappings":";;;;KAIY,UAAA,GAAa,OAAA,CAAM;iBAEtB,KAAA;;;;GAAqC,aAAU,kBAAA,CAAA,GAAA,CAAA"}
|
package/dist/ui/input.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import "react";
|
|
2
|
+
import { cn } from "@contractspec/lib.ui-kit-core/utils";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
//#region ui/input.tsx
|
|
6
|
+
function Input({ className, type, ...props }) {
|
|
7
|
+
return /* @__PURE__ */ jsx("input", {
|
|
8
|
+
type,
|
|
9
|
+
"data-slot": "input",
|
|
10
|
+
className: cn("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]", "aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", className),
|
|
11
|
+
...props
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
//#endregion
|
|
16
|
+
export { Input };
|
|
17
|
+
//# sourceMappingURL=input.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input.js","names":[],"sources":["../../ui/input.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { cn } from '@contractspec/lib.ui-kit-core/utils';\n\nexport type InputProps = React.ComponentPropsWithoutRef<'input'>;\n\nfunction Input({ className, type, ...props }: InputProps) {\n return (\n <input\n type={type}\n data-slot=\"input\"\n className={cn(\n 'file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm',\n 'focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]',\n 'aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive',\n className\n )}\n {...props}\n />\n );\n}\n\nexport { Input };\n"],"mappings":";;;;;AAMA,SAAS,MAAM,EAAE,WAAW,MAAM,GAAG,SAAqB;AACxD,QACE,oBAAC;EACO;EACN,aAAU;EACV,WAAW,GACT,8bACA,iFACA,0GACA,UACD;EACD,GAAI;GACJ"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React$1 from "react";
|
|
2
|
+
import * as react_jsx_runtime15 from "react/jsx-runtime";
|
|
3
|
+
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
4
|
+
|
|
5
|
+
//#region ui/label.d.ts
|
|
6
|
+
declare function Label({
|
|
7
|
+
className,
|
|
8
|
+
...props
|
|
9
|
+
}: React$1.ComponentProps<typeof LabelPrimitive.Root>): react_jsx_runtime15.JSX.Element;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { Label };
|
|
12
|
+
//# sourceMappingURL=label.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"label.d.ts","names":[],"sources":["../../ui/label.tsx"],"sourcesContent":[],"mappings":";;;;;iBAOS,KAAA;;;GAGN,OAAA,CAAM,sBAAsB,cAAA,CAAe,QAAK,mBAAA,CAAA,GAAA,CAAA"}
|