@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,15 @@
|
|
|
1
|
+
import * as React$1 from "react";
|
|
2
|
+
import * as react_jsx_runtime226 from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region ui/text.d.ts
|
|
5
|
+
type TextProps = React$1.ComponentPropsWithoutRef<'p'> & {
|
|
6
|
+
asChild?: boolean;
|
|
7
|
+
};
|
|
8
|
+
declare function Text({
|
|
9
|
+
className,
|
|
10
|
+
asChild,
|
|
11
|
+
...props
|
|
12
|
+
}: TextProps): react_jsx_runtime226.JSX.Element;
|
|
13
|
+
//#endregion
|
|
14
|
+
export { Text, TextProps };
|
|
15
|
+
//# sourceMappingURL=text.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text.d.ts","names":[],"sources":["../../ui/text.tsx"],"sourcesContent":[],"mappings":";;;;KAIY,SAAA,GAAY,OAAA,CAAM;;;AAA9B,iBAIS,IAAA,CAJY;EAAA,SAAG;EAAA,OAAM;EAAA,GAAA;AAAwB,CAAxB,EAI0B,SAJF,CAAA,EAIW,oBAAA,CAAA,GAAA,CAAA,OAJX"}
|
package/dist/ui/text.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import "react";
|
|
2
|
+
import { cn } from "@contractspec/lib.ui-kit-core/utils";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
5
|
+
|
|
6
|
+
//#region ui/text.tsx
|
|
7
|
+
function Text({ className, asChild = false, ...props }) {
|
|
8
|
+
return /* @__PURE__ */ jsx(asChild ? Slot : "p", {
|
|
9
|
+
className: cn("text-foreground web:select-text text-base", className),
|
|
10
|
+
...props
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
//#endregion
|
|
15
|
+
export { Text };
|
|
16
|
+
//# sourceMappingURL=text.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text.js","names":[],"sources":["../../ui/text.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\nimport * as React from 'react';\nimport { cn } from '@contractspec/lib.ui-kit-core/utils';\n\nexport type TextProps = React.ComponentPropsWithoutRef<'p'> & {\n asChild?: boolean;\n};\n\nfunction Text({ className, asChild = false, ...props }: TextProps) {\n const Component = asChild ? Slot : 'p';\n return (\n <Component\n className={cn('text-foreground web:select-text text-base', className)}\n {...props}\n />\n );\n}\n\nexport { Text };\n"],"mappings":";;;;;;AAQA,SAAS,KAAK,EAAE,WAAW,UAAU,OAAO,GAAG,SAAoB;AAEjE,QACE,oBAFgB,UAAU,OAAO;EAG/B,WAAW,GAAG,6CAA6C,UAAU;EACrE,GAAI;GACJ"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React$1 from "react";
|
|
2
|
+
import * as react_jsx_runtime227 from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region ui/textarea.d.ts
|
|
5
|
+
type TextareaProps = React$1.ComponentPropsWithoutRef<'textarea'>;
|
|
6
|
+
declare function Textarea({
|
|
7
|
+
className,
|
|
8
|
+
...props
|
|
9
|
+
}: TextareaProps): react_jsx_runtime227.JSX.Element;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { Textarea, TextareaProps };
|
|
12
|
+
//# sourceMappingURL=textarea.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"textarea.d.ts","names":[],"sources":["../../ui/textarea.tsx"],"sourcesContent":[],"mappings":";;;;KAIY,aAAA,GAAgB,OAAA,CAAM;iBAEzB,QAAA;;;GAAkC,gBAAa,oBAAA,CAAA,GAAA,CAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import "react";
|
|
2
|
+
import { cn } from "@contractspec/lib.ui-kit-core/utils";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
//#region ui/textarea.tsx
|
|
6
|
+
function Textarea({ className, ...props }) {
|
|
7
|
+
return /* @__PURE__ */ jsx("textarea", {
|
|
8
|
+
"data-slot": "textarea",
|
|
9
|
+
className: cn("aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-2xs outline-hidden transition-[color,box-shadow] focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", className),
|
|
10
|
+
...props
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
//#endregion
|
|
15
|
+
export { Textarea };
|
|
16
|
+
//# sourceMappingURL=textarea.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"textarea.js","names":[],"sources":["../../ui/textarea.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { cn } from '@contractspec/lib.ui-kit-core/utils';\n\nexport type TextareaProps = React.ComponentPropsWithoutRef<'textarea'>;\n\nfunction Textarea({ className, ...props }: TextareaProps) {\n return (\n <textarea\n data-slot=\"textarea\"\n className={cn(\n 'aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-2xs outline-hidden transition-[color,box-shadow] focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm',\n className\n )}\n {...props}\n />\n );\n}\n\nexport { Textarea };\n"],"mappings":";;;;;AAMA,SAAS,SAAS,EAAE,WAAW,GAAG,SAAwB;AACxD,QACE,oBAAC;EACC,aAAU;EACV,WAAW,GACT,0cACA,UACD;EACD,GAAI;GACJ"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as react_jsx_runtime228 from "react/jsx-runtime";
|
|
2
|
+
|
|
3
|
+
//#region ui/time-picker.d.ts
|
|
4
|
+
interface TimePickerProps {
|
|
5
|
+
value: Date | null;
|
|
6
|
+
onChange: (date: Date | null) => void;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
placeholder?: string;
|
|
9
|
+
is24Hour?: boolean;
|
|
10
|
+
className?: string;
|
|
11
|
+
}
|
|
12
|
+
declare function TimePicker({
|
|
13
|
+
value,
|
|
14
|
+
onChange,
|
|
15
|
+
disabled,
|
|
16
|
+
placeholder,
|
|
17
|
+
is24Hour,
|
|
18
|
+
className
|
|
19
|
+
}: TimePickerProps): react_jsx_runtime228.JSX.Element;
|
|
20
|
+
//#endregion
|
|
21
|
+
export { TimePicker, TimePickerProps };
|
|
22
|
+
//# sourceMappingURL=time-picker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"time-picker.d.ts","names":[],"sources":["../../ui/time-picker.tsx"],"sourcesContent":[],"mappings":";;;UAOiB,eAAA;SACR;mBACU;EAFF,QAAA,CAAA,EAAA,OAAe;EAkBhB,WAAA,CAAA,EAAU,MAAA;EACxB,QAAA,CAAA,EAAA,OAAA;EACA,SAAA,CAAA,EAAA,MAAA;;AAEA,iBAJc,UAAA,CAId;EAAA,KAAA;EAAA,QAAA;EAAA,QAAA;EAAA,WAAA;EAAA,QAAA;EAAA;AAAA,CAAA,EAGC,eAHD,CAAA,EAGgB,oBAAA,CAAA,GAAA,CAAA,OAHhB"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { Button } from "./button.js";
|
|
4
|
+
import { Popover, PopoverContent, PopoverTrigger } from "./popover.js";
|
|
5
|
+
import * as React$1 from "react";
|
|
6
|
+
import { cn } from "@contractspec/lib.ui-kit-core/utils";
|
|
7
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
|
|
9
|
+
//#region ui/time-picker.tsx
|
|
10
|
+
function formatTime(d, is24Hour) {
|
|
11
|
+
if (!d) return "";
|
|
12
|
+
return d.toLocaleTimeString([], {
|
|
13
|
+
hour: "2-digit",
|
|
14
|
+
minute: "2-digit",
|
|
15
|
+
hour12: !is24Hour
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
function TimePicker({ value, onChange, disabled, placeholder = "Select time", is24Hour = true, className }) {
|
|
19
|
+
const [open, setOpen] = React$1.useState(false);
|
|
20
|
+
const [hours, setHours] = React$1.useState(() => value ? String(value.getHours()).padStart(2, "0") : "");
|
|
21
|
+
const [minutes, setMinutes] = React$1.useState(() => value ? String(value.getMinutes()).padStart(2, "0") : "");
|
|
22
|
+
const commit = (h, m) => {
|
|
23
|
+
const base = value ?? /* @__PURE__ */ new Date();
|
|
24
|
+
const next = new Date(base);
|
|
25
|
+
next.setHours(h, m, 0, 0);
|
|
26
|
+
onChange(next);
|
|
27
|
+
setOpen(false);
|
|
28
|
+
};
|
|
29
|
+
return /* @__PURE__ */ jsxs(Popover, {
|
|
30
|
+
open,
|
|
31
|
+
onOpenChange: setOpen,
|
|
32
|
+
children: [/* @__PURE__ */ jsx(PopoverTrigger, {
|
|
33
|
+
asChild: true,
|
|
34
|
+
children: /* @__PURE__ */ jsx(Button, {
|
|
35
|
+
type: "button",
|
|
36
|
+
variant: "outline",
|
|
37
|
+
disabled,
|
|
38
|
+
className: cn("w-full justify-start text-left font-normal", className),
|
|
39
|
+
children: value ? formatTime(value, is24Hour) : /* @__PURE__ */ jsx("span", {
|
|
40
|
+
className: "opacity-50",
|
|
41
|
+
children: placeholder
|
|
42
|
+
})
|
|
43
|
+
})
|
|
44
|
+
}), /* @__PURE__ */ jsx(PopoverContent, {
|
|
45
|
+
className: "w-56",
|
|
46
|
+
align: "start",
|
|
47
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
48
|
+
className: "flex items-center gap-2",
|
|
49
|
+
children: [
|
|
50
|
+
/* @__PURE__ */ jsx("input", {
|
|
51
|
+
type: "number",
|
|
52
|
+
min: 0,
|
|
53
|
+
max: is24Hour ? 23 : 12,
|
|
54
|
+
value: hours,
|
|
55
|
+
onChange: (e) => setHours(e.target.value),
|
|
56
|
+
className: "border-input bg-background w-16 rounded-md border px-2 py-1 text-center"
|
|
57
|
+
}),
|
|
58
|
+
/* @__PURE__ */ jsx("span", { children: ":" }),
|
|
59
|
+
/* @__PURE__ */ jsx("input", {
|
|
60
|
+
type: "number",
|
|
61
|
+
min: 0,
|
|
62
|
+
max: 59,
|
|
63
|
+
value: minutes,
|
|
64
|
+
onChange: (e) => setMinutes(e.target.value),
|
|
65
|
+
className: "border-input bg-background w-16 rounded-md border px-2 py-1 text-center"
|
|
66
|
+
}),
|
|
67
|
+
/* @__PURE__ */ jsx(Button, {
|
|
68
|
+
type: "button",
|
|
69
|
+
onClick: () => commit(Number(hours || 0), Number(minutes || 0)),
|
|
70
|
+
className: "ml-auto",
|
|
71
|
+
children: "Set"
|
|
72
|
+
})
|
|
73
|
+
]
|
|
74
|
+
})
|
|
75
|
+
})]
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
//#endregion
|
|
80
|
+
export { TimePicker };
|
|
81
|
+
//# sourceMappingURL=time-picker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"time-picker.js","names":["React"],"sources":["../../ui/time-picker.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { Popover, PopoverContent, PopoverTrigger } from './popover';\nimport { Button } from './button';\nimport { cn } from '@contractspec/lib.ui-kit-core/utils';\n\nexport interface TimePickerProps {\n value: Date | null;\n onChange: (date: Date | null) => void;\n disabled?: boolean;\n placeholder?: string;\n is24Hour?: boolean;\n className?: string;\n}\n\nfunction formatTime(d: Date | null, is24Hour?: boolean) {\n if (!d) return '';\n return d.toLocaleTimeString([], {\n hour: '2-digit',\n minute: '2-digit',\n hour12: !is24Hour,\n });\n}\n\nexport function TimePicker({\n value,\n onChange,\n disabled,\n placeholder = 'Select time',\n is24Hour = true,\n className,\n}: TimePickerProps) {\n const [open, setOpen] = React.useState(false);\n const [hours, setHours] = React.useState<string>(() =>\n value ? String(value.getHours()).padStart(2, '0') : ''\n );\n const [minutes, setMinutes] = React.useState<string>(() =>\n value ? String(value.getMinutes()).padStart(2, '0') : ''\n );\n\n const commit = (h: number, m: number) => {\n const base = value ?? new Date();\n const next = new Date(base);\n next.setHours(h, m, 0, 0);\n onChange(next);\n setOpen(false);\n };\n\n return (\n <Popover open={open} onOpenChange={setOpen}>\n <PopoverTrigger asChild>\n <Button\n type=\"button\"\n variant=\"outline\"\n disabled={disabled}\n className={cn(\n 'w-full justify-start text-left font-normal',\n className\n )}\n >\n {value ? (\n formatTime(value, is24Hour)\n ) : (\n <span className=\"opacity-50\">{placeholder}</span>\n )}\n </Button>\n </PopoverTrigger>\n <PopoverContent className=\"w-56\" align=\"start\">\n <div className=\"flex items-center gap-2\">\n <input\n type=\"number\"\n min={0}\n max={is24Hour ? 23 : 12}\n value={hours}\n onChange={(e) => setHours(e.target.value)}\n className=\"border-input bg-background w-16 rounded-md border px-2 py-1 text-center\"\n />\n <span>:</span>\n <input\n type=\"number\"\n min={0}\n max={59}\n value={minutes}\n onChange={(e) => setMinutes(e.target.value)}\n className=\"border-input bg-background w-16 rounded-md border px-2 py-1 text-center\"\n />\n <Button\n type=\"button\"\n onClick={() => commit(Number(hours || 0), Number(minutes || 0))}\n className=\"ml-auto\"\n >\n Set\n </Button>\n </div>\n </PopoverContent>\n </Popover>\n );\n}\n"],"mappings":";;;;;;;;;AAgBA,SAAS,WAAW,GAAgB,UAAoB;AACtD,KAAI,CAAC,EAAG,QAAO;AACf,QAAO,EAAE,mBAAmB,EAAE,EAAE;EAC9B,MAAM;EACN,QAAQ;EACR,QAAQ,CAAC;EACV,CAAC;;AAGJ,SAAgB,WAAW,EACzB,OACA,UACA,UACA,cAAc,eACd,WAAW,MACX,aACkB;CAClB,MAAM,CAAC,MAAM,WAAWA,QAAM,SAAS,MAAM;CAC7C,MAAM,CAAC,OAAO,YAAYA,QAAM,eAC9B,QAAQ,OAAO,MAAM,UAAU,CAAC,CAAC,SAAS,GAAG,IAAI,GAAG,GACrD;CACD,MAAM,CAAC,SAAS,cAAcA,QAAM,eAClC,QAAQ,OAAO,MAAM,YAAY,CAAC,CAAC,SAAS,GAAG,IAAI,GAAG,GACvD;CAED,MAAM,UAAU,GAAW,MAAc;EACvC,MAAM,OAAO,yBAAS,IAAI,MAAM;EAChC,MAAM,OAAO,IAAI,KAAK,KAAK;AAC3B,OAAK,SAAS,GAAG,GAAG,GAAG,EAAE;AACzB,WAAS,KAAK;AACd,UAAQ,MAAM;;AAGhB,QACE,qBAAC;EAAc;EAAM,cAAc;aACjC,oBAAC;GAAe;aACd,oBAAC;IACC,MAAK;IACL,SAAQ;IACE;IACV,WAAW,GACT,8CACA,UACD;cAEA,QACC,WAAW,OAAO,SAAS,GAE3B,oBAAC;KAAK,WAAU;eAAc;MAAmB;KAE5C;IACM,EACjB,oBAAC;GAAe,WAAU;GAAO,OAAM;aACrC,qBAAC;IAAI,WAAU;;KACb,oBAAC;MACC,MAAK;MACL,KAAK;MACL,KAAK,WAAW,KAAK;MACrB,OAAO;MACP,WAAW,MAAM,SAAS,EAAE,OAAO,MAAM;MACzC,WAAU;OACV;KACF,oBAAC,oBAAK,MAAQ;KACd,oBAAC;MACC,MAAK;MACL,KAAK;MACL,KAAK;MACL,OAAO;MACP,WAAW,MAAM,WAAW,EAAE,OAAO,MAAM;MAC3C,WAAU;OACV;KACF,oBAAC;MACC,MAAK;MACL,eAAe,OAAO,OAAO,SAAS,EAAE,EAAE,OAAO,WAAW,EAAE,CAAC;MAC/D,WAAU;gBACX;OAEQ;;KACL;IACS;GACT"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as React$1 from "react";
|
|
2
|
+
import { VariantProps } from "class-variance-authority";
|
|
3
|
+
import * as ToastPrimitives from "@radix-ui/react-toast";
|
|
4
|
+
import * as class_variance_authority_types21 from "class-variance-authority/types";
|
|
5
|
+
|
|
6
|
+
//#region ui/toast.d.ts
|
|
7
|
+
declare const ToastProvider: React$1.FC<ToastPrimitives.ToastProviderProps>;
|
|
8
|
+
declare const ToastViewport: React$1.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastViewportProps & React$1.RefAttributes<HTMLOListElement>, "ref"> & React$1.RefAttributes<HTMLOListElement>>;
|
|
9
|
+
declare const Toast: React$1.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastProps & React$1.RefAttributes<HTMLLIElement>, "ref"> & VariantProps<(props?: ({
|
|
10
|
+
variant?: "default" | "destructive" | null | undefined;
|
|
11
|
+
} & class_variance_authority_types21.ClassProp) | undefined) => string> & React$1.RefAttributes<HTMLLIElement>>;
|
|
12
|
+
declare const ToastAction: React$1.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastActionProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
13
|
+
declare const ToastClose: React$1.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastCloseProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
14
|
+
declare const ToastTitle: React$1.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastTitleProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
15
|
+
declare const ToastDescription: React$1.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastDescriptionProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
16
|
+
type ToastProps = React$1.ComponentPropsWithoutRef<typeof Toast>;
|
|
17
|
+
type ToastActionElement = React$1.ReactElement<typeof ToastAction>;
|
|
18
|
+
//#endregion
|
|
19
|
+
export { Toast, ToastAction, type ToastActionElement, ToastClose, ToastDescription, type ToastProps, ToastProvider, ToastTitle, ToastViewport };
|
|
20
|
+
//# sourceMappingURL=toast.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toast.d.ts","names":[],"sources":["../../ui/toast.tsx"],"sourcesContent":[],"mappings":";;;;;;cASM,eAAa,OAAA,CAAA,GAAA,eAAA,CAAA;cAEb,eAAa,OAAA,CAAA,0BAAA,KAAA,eAAA,CAAA,qBAAA,OAAA,CAAA,cAAA,4BAAA,OAAA,CAAA,cAAA;cA+Bb,OAAK,OAAA,CAAA,0BAAA,KAAA,eAAA,CAAA,aAAA,OAAA,CAAA,cAAA,yBAAA,mBAnBT;EAdI,OAAA,CAAA,EAAA,SAAwC,GAAA,aAA3B,GAAA,IAAA,GAAA,SAAA;AAAA,CAAA,GAiCR,gCAAA,CAAA,SAnBT,CAAA,GAAA,SAAA,EAAA,GAAA,MAAA,CAAA,wBAAA,cAAA,CAAA,CAAA;cAkCI,WA9Ca,EA8CF,OAAA,CAAA,yBA9CE,CA8CF,IA9CE,CA8CF,eAAA,CAAA,gBA9CE,GA8CF,OAAA,CAAA,aA9CE,CA8CF,iBA9CE,CAAA,EAAA,KAAA,CAAA,GA8CF,OAAA,CAAA,aA9CE,CA8CF,iBA9CE,CAAA,CAAA;cA6Db,UA7Da,EA6DH,OAAA,CAAA,yBA7DG,CA6DH,IA7DG,CA6DH,eAAA,CAAA,eA7DG,GA6DH,OAAA,CAAA,aA7DG,CA6DH,iBA7DG,CAAA,EAAA,KAAA,CAAA,GA6DH,OAAA,CAAA,aA7DG,CA6DH,iBA7DG,CAAA,CAAA;cA+Eb,UA/Ea,EA+EH,OAAA,CAAA,yBA/EG,CA+EH,IA/EG,CA+EH,eAAA,CAAA,eA/EG,GA+EH,OAAA,CAAA,aA/EG,CA+EH,cA/EG,CAAA,EAAA,KAAA,CAAA,GA+EH,OAAA,CAAA,aA/EG,CA+EH,cA/EG,CAAA,CAAA;cA2Fb,gBA3Fa,EA2FG,OAAA,CAAA,yBA3FH,CA2FG,IA3FH,CA2FG,eAAA,CAAA,qBA3FH,GA2FG,OAAA,CAAA,aA3FH,CA2FG,cA3FH,CAAA,EAAA,KAAA,CAAA,GA2FG,OAAA,CAAA,aA3FH,CA2FG,cA3FH,CAAA,CAAA;KAuGd,UAAA,GAAa,OAAA,CAAM,wBAvGL,CAAA,OAuGqC,KAvGrC,CAAA;KAyGd,kBAAA,GAAqB,OAAA,CAAM,YAzGb,CAAA,OAyGiC,WAzGjC,CAAA"}
|
package/dist/ui/toast.js
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import * as React$1 from "react";
|
|
4
|
+
import { X } from "lucide-react";
|
|
5
|
+
import { cn } from "@contractspec/lib.ui-kit-core/utils";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
import { cva } from "class-variance-authority";
|
|
8
|
+
import * as ToastPrimitives from "@radix-ui/react-toast";
|
|
9
|
+
|
|
10
|
+
//#region ui/toast.tsx
|
|
11
|
+
const ToastProvider = ToastPrimitives.Provider;
|
|
12
|
+
const ToastViewport = React$1.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(ToastPrimitives.Viewport, {
|
|
13
|
+
ref,
|
|
14
|
+
className: cn("fixed top-0 z-100 flex max-h-screen w-full flex-col-reverse p-4 sm:top-auto sm:right-0 sm:bottom-0 sm:flex-col md:max-w-[420px]", className),
|
|
15
|
+
...props
|
|
16
|
+
}));
|
|
17
|
+
ToastViewport.displayName = ToastPrimitives.Viewport.displayName;
|
|
18
|
+
const toastVariants = cva("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-(--radix-toast-swipe-end-x) data-[swipe=move]:translate-x-(--radix-toast-swipe-move-x) data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full sm:data-[state=open]:slide-in-from-bottom-full", {
|
|
19
|
+
variants: { variant: {
|
|
20
|
+
default: "border bg-background text-foreground",
|
|
21
|
+
destructive: "destructive group border-destructive bg-destructive text-destructive-foreground"
|
|
22
|
+
} },
|
|
23
|
+
defaultVariants: { variant: "default" }
|
|
24
|
+
});
|
|
25
|
+
const Toast = React$1.forwardRef(({ className, variant, ...props }, ref) => {
|
|
26
|
+
return /* @__PURE__ */ jsx(ToastPrimitives.Root, {
|
|
27
|
+
ref,
|
|
28
|
+
className: cn(toastVariants({ variant }), className),
|
|
29
|
+
...props
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
Toast.displayName = ToastPrimitives.Root.displayName;
|
|
33
|
+
const ToastAction = React$1.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(ToastPrimitives.Action, {
|
|
34
|
+
ref,
|
|
35
|
+
className: cn("ring-offset-background hover:bg-secondary focus:ring-ring group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-base font-medium transition-colors focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none disabled:opacity-50", className),
|
|
36
|
+
...props
|
|
37
|
+
}));
|
|
38
|
+
ToastAction.displayName = ToastPrimitives.Action.displayName;
|
|
39
|
+
const ToastClose = React$1.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(ToastPrimitives.Close, {
|
|
40
|
+
ref,
|
|
41
|
+
className: cn("text-foreground/50 hover:text-foreground absolute top-2 right-2 rounded-md p-1 opacity-0 transition-opacity group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 focus:opacity-100 focus:ring-2 focus:outline-hidden group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600", className),
|
|
42
|
+
"toast-close": "",
|
|
43
|
+
...props,
|
|
44
|
+
children: /* @__PURE__ */ jsx(X, { className: "h-4 w-4" })
|
|
45
|
+
}));
|
|
46
|
+
ToastClose.displayName = ToastPrimitives.Close.displayName;
|
|
47
|
+
const ToastTitle = React$1.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(ToastPrimitives.Title, {
|
|
48
|
+
ref,
|
|
49
|
+
className: cn("text-base font-semibold", className),
|
|
50
|
+
...props
|
|
51
|
+
}));
|
|
52
|
+
ToastTitle.displayName = ToastPrimitives.Title.displayName;
|
|
53
|
+
const ToastDescription = React$1.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(ToastPrimitives.Description, {
|
|
54
|
+
ref,
|
|
55
|
+
className: cn("text-base opacity-90", className),
|
|
56
|
+
...props
|
|
57
|
+
}));
|
|
58
|
+
ToastDescription.displayName = ToastPrimitives.Description.displayName;
|
|
59
|
+
|
|
60
|
+
//#endregion
|
|
61
|
+
export { Toast, ToastAction, ToastClose, ToastDescription, ToastProvider, ToastTitle, ToastViewport };
|
|
62
|
+
//# sourceMappingURL=toast.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toast.js","names":["React"],"sources":["../../ui/toast.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as ToastPrimitives from '@radix-ui/react-toast';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { X } from 'lucide-react';\n\nimport { cn } from '@contractspec/lib.ui-kit-core/utils';\n\nconst ToastProvider = ToastPrimitives.Provider;\n\nconst ToastViewport = React.forwardRef<\n React.ElementRef<typeof ToastPrimitives.Viewport>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Viewport>\n>(({ className, ...props }, ref) => (\n <ToastPrimitives.Viewport\n ref={ref}\n className={cn(\n 'fixed top-0 z-100 flex max-h-screen w-full flex-col-reverse p-4 sm:top-auto sm:right-0 sm:bottom-0 sm:flex-col md:max-w-[420px]',\n className\n )}\n {...props}\n />\n));\nToastViewport.displayName = ToastPrimitives.Viewport.displayName;\n\nconst toastVariants = cva(\n 'group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-(--radix-toast-swipe-end-x) data-[swipe=move]:translate-x-(--radix-toast-swipe-move-x) data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full sm:data-[state=open]:slide-in-from-bottom-full',\n {\n variants: {\n variant: {\n default: 'border bg-background text-foreground',\n destructive:\n 'destructive group border-destructive bg-destructive text-destructive-foreground',\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n }\n);\n\nconst Toast = React.forwardRef<\n React.ElementRef<typeof ToastPrimitives.Root>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Root> &\n VariantProps<typeof toastVariants>\n>(({ className, variant, ...props }, ref) => {\n return (\n <ToastPrimitives.Root\n ref={ref}\n className={cn(toastVariants({ variant }), className)}\n {...props}\n />\n );\n});\nToast.displayName = ToastPrimitives.Root.displayName;\n\nconst ToastAction = React.forwardRef<\n React.ElementRef<typeof ToastPrimitives.Action>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Action>\n>(({ className, ...props }, ref) => (\n <ToastPrimitives.Action\n ref={ref}\n className={cn(\n 'ring-offset-background hover:bg-secondary focus:ring-ring group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-base font-medium transition-colors focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none disabled:opacity-50',\n className\n )}\n {...props}\n />\n));\nToastAction.displayName = ToastPrimitives.Action.displayName;\n\nconst ToastClose = React.forwardRef<\n React.ElementRef<typeof ToastPrimitives.Close>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Close>\n>(({ className, ...props }, ref) => (\n <ToastPrimitives.Close\n ref={ref}\n className={cn(\n 'text-foreground/50 hover:text-foreground absolute top-2 right-2 rounded-md p-1 opacity-0 transition-opacity group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 focus:opacity-100 focus:ring-2 focus:outline-hidden group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600',\n className\n )}\n toast-close=\"\"\n {...props}\n >\n <X className=\"h-4 w-4\" />\n </ToastPrimitives.Close>\n));\nToastClose.displayName = ToastPrimitives.Close.displayName;\n\nconst ToastTitle = React.forwardRef<\n React.ElementRef<typeof ToastPrimitives.Title>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Title>\n>(({ className, ...props }, ref) => (\n <ToastPrimitives.Title\n ref={ref}\n className={cn('text-base font-semibold', className)}\n {...props}\n />\n));\nToastTitle.displayName = ToastPrimitives.Title.displayName;\n\nconst ToastDescription = React.forwardRef<\n React.ElementRef<typeof ToastPrimitives.Description>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Description>\n>(({ className, ...props }, ref) => (\n <ToastPrimitives.Description\n ref={ref}\n className={cn('text-base opacity-90', className)}\n {...props}\n />\n));\nToastDescription.displayName = ToastPrimitives.Description.displayName;\n\ntype ToastProps = React.ComponentPropsWithoutRef<typeof Toast>;\n\ntype ToastActionElement = React.ReactElement<typeof ToastAction>;\n\nexport {\n type ToastProps,\n type ToastActionElement,\n ToastProvider,\n ToastViewport,\n Toast,\n ToastTitle,\n ToastDescription,\n ToastClose,\n ToastAction,\n};\n"],"mappings":";;;;;;;;;;AASA,MAAM,gBAAgB,gBAAgB;AAEtC,MAAM,gBAAgBA,QAAM,YAGzB,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,gBAAgB;CACV;CACL,WAAW,GACT,mIACA,UACD;CACD,GAAI;EACJ,CACF;AACF,cAAc,cAAc,gBAAgB,SAAS;AAErD,MAAM,gBAAgB,IACpB,mlBACA;CACE,UAAU,EACR,SAAS;EACP,SAAS;EACT,aACE;EACH,EACF;CACD,iBAAiB,EACf,SAAS,WACV;CACF,CACF;AAED,MAAM,QAAQA,QAAM,YAIjB,EAAE,WAAW,SAAS,GAAG,SAAS,QAAQ;AAC3C,QACE,oBAAC,gBAAgB;EACV;EACL,WAAW,GAAG,cAAc,EAAE,SAAS,CAAC,EAAE,UAAU;EACpD,GAAI;GACJ;EAEJ;AACF,MAAM,cAAc,gBAAgB,KAAK;AAEzC,MAAM,cAAcA,QAAM,YAGvB,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,gBAAgB;CACV;CACL,WAAW,GACT,0gBACA,UACD;CACD,GAAI;EACJ,CACF;AACF,YAAY,cAAc,gBAAgB,OAAO;AAEjD,MAAM,aAAaA,QAAM,YAGtB,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,gBAAgB;CACV;CACL,WAAW,GACT,2VACA,UACD;CACD,eAAY;CACZ,GAAI;WAEJ,oBAAC,KAAE,WAAU,YAAY;EACH,CACxB;AACF,WAAW,cAAc,gBAAgB,MAAM;AAE/C,MAAM,aAAaA,QAAM,YAGtB,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,gBAAgB;CACV;CACL,WAAW,GAAG,2BAA2B,UAAU;CACnD,GAAI;EACJ,CACF;AACF,WAAW,cAAc,gBAAgB,MAAM;AAE/C,MAAM,mBAAmBA,QAAM,YAG5B,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,gBAAgB;CACV;CACL,WAAW,GAAG,wBAAwB,UAAU;CAChD,GAAI;EACJ,CACF;AACF,iBAAiB,cAAc,gBAAgB,YAAY"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toaster.d.ts","names":[],"sources":["../../ui/toaster.tsx"],"sourcesContent":[],"mappings":";;;iBAYgB,OAAA,CAAA,GAAO,oBAAA,CAAA,GAAA,CAAA"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { Toast, ToastClose, ToastDescription, ToastProvider, ToastTitle, ToastViewport } from "./toast.js";
|
|
4
|
+
import { useToast } from "./use-toast.js";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
|
|
7
|
+
//#region ui/toaster.tsx
|
|
8
|
+
function Toaster() {
|
|
9
|
+
const { toasts } = useToast();
|
|
10
|
+
return /* @__PURE__ */ jsxs(ToastProvider, { children: [toasts.map(function({ id, title, description, action, ...props }) {
|
|
11
|
+
return /* @__PURE__ */ jsxs(Toast, {
|
|
12
|
+
...props,
|
|
13
|
+
children: [
|
|
14
|
+
/* @__PURE__ */ jsxs("div", {
|
|
15
|
+
className: "grid gap-1",
|
|
16
|
+
children: [title && /* @__PURE__ */ jsx(ToastTitle, { children: title }), description && /* @__PURE__ */ jsx(ToastDescription, { children: description })]
|
|
17
|
+
}),
|
|
18
|
+
action,
|
|
19
|
+
/* @__PURE__ */ jsx(ToastClose, {})
|
|
20
|
+
]
|
|
21
|
+
}, id);
|
|
22
|
+
}), /* @__PURE__ */ jsx(ToastViewport, {})] });
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
//#endregion
|
|
26
|
+
export { Toaster };
|
|
27
|
+
//# sourceMappingURL=toaster.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toaster.js","names":[],"sources":["../../ui/toaster.tsx"],"sourcesContent":["'use client';\n\nimport { useToast } from './use-toast';\nimport {\n Toast,\n ToastClose,\n ToastDescription,\n ToastProvider,\n ToastTitle,\n ToastViewport,\n} from './toast';\n\nexport function Toaster() {\n const { toasts } = useToast();\n\n return (\n <ToastProvider>\n {toasts.map(function ({ id, title, description, action, ...props }) {\n return (\n <Toast key={id} {...props}>\n <div className=\"grid gap-1\">\n {title && <ToastTitle>{title}</ToastTitle>}\n {description && (\n <ToastDescription>{description}</ToastDescription>\n )}\n </div>\n {action}\n <ToastClose />\n </Toast>\n );\n })}\n <ToastViewport />\n </ToastProvider>\n );\n}\n"],"mappings":";;;;;;;AAYA,SAAgB,UAAU;CACxB,MAAM,EAAE,WAAW,UAAU;AAE7B,QACE,qBAAC,4BACE,OAAO,IAAI,SAAU,EAAE,IAAI,OAAO,aAAa,QAAQ,GAAG,SAAS;AAClE,SACE,qBAAC;GAAe,GAAI;;IAClB,qBAAC;KAAI,WAAU;gBACZ,SAAS,oBAAC,wBAAY,QAAmB,EACzC,eACC,oBAAC,8BAAkB,cAA+B;MAEhD;IACL;IACD,oBAAC,eAAa;;KARJ,GASJ;GAEV,EACF,oBAAC,kBAAgB,IACH"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { toggleVariants } from "./toggle.js";
|
|
2
|
+
import * as React$1 from "react";
|
|
3
|
+
import * as react_jsx_runtime229 from "react/jsx-runtime";
|
|
4
|
+
import { VariantProps } from "class-variance-authority";
|
|
5
|
+
import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
|
|
6
|
+
|
|
7
|
+
//#region ui/toggle-group.d.ts
|
|
8
|
+
declare function ToggleGroup({
|
|
9
|
+
className,
|
|
10
|
+
variant,
|
|
11
|
+
size,
|
|
12
|
+
children,
|
|
13
|
+
...props
|
|
14
|
+
}: React$1.ComponentProps<typeof ToggleGroupPrimitive.Root> & VariantProps<typeof toggleVariants>): react_jsx_runtime229.JSX.Element;
|
|
15
|
+
declare function ToggleGroupItem({
|
|
16
|
+
className,
|
|
17
|
+
children,
|
|
18
|
+
variant,
|
|
19
|
+
size,
|
|
20
|
+
...props
|
|
21
|
+
}: React$1.ComponentProps<typeof ToggleGroupPrimitive.Item> & VariantProps<typeof toggleVariants>): react_jsx_runtime229.JSX.Element;
|
|
22
|
+
//#endregion
|
|
23
|
+
export { ToggleGroup, ToggleGroupItem };
|
|
24
|
+
//# sourceMappingURL=toggle-group.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toggle-group.d.ts","names":[],"sources":["../../ui/toggle-group.tsx"],"sourcesContent":[],"mappings":";;;;;;;iBAgBS,WAAA;;;;;;GAMN,OAAA,CAAM,sBAAsB,oBAAA,CAAqB,QAClD,oBAAoB,kBAAe,oBAAA,CAAA,GAAA,CAAA;iBAmB5B,eAAA;;;;;;GAMN,OAAA,CAAM,sBAAsB,oBAAA,CAAqB,QAClD,oBAAoB,kBAAe,oBAAA,CAAA,GAAA,CAAA"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { toggleVariants } from "./toggle.js";
|
|
4
|
+
import * as React$1 from "react";
|
|
5
|
+
import { cn } from "@contractspec/lib.ui-kit-core/utils";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
import "class-variance-authority";
|
|
8
|
+
import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
|
|
9
|
+
|
|
10
|
+
//#region ui/toggle-group.tsx
|
|
11
|
+
const ToggleGroupContext = React$1.createContext({
|
|
12
|
+
size: "default",
|
|
13
|
+
variant: "default"
|
|
14
|
+
});
|
|
15
|
+
function ToggleGroup({ className, variant, size, children, ...props }) {
|
|
16
|
+
return /* @__PURE__ */ jsx(ToggleGroupPrimitive.Root, {
|
|
17
|
+
"data-slot": "toggle-group",
|
|
18
|
+
"data-variant": variant,
|
|
19
|
+
"data-size": size,
|
|
20
|
+
className: cn("group/toggle-group flex w-fit items-center rounded-md data-[variant=outline]:shadow-2xs", className),
|
|
21
|
+
...props,
|
|
22
|
+
children: /* @__PURE__ */ jsx(ToggleGroupContext.Provider, {
|
|
23
|
+
value: {
|
|
24
|
+
variant,
|
|
25
|
+
size
|
|
26
|
+
},
|
|
27
|
+
children
|
|
28
|
+
})
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
function ToggleGroupItem({ className, children, variant, size, ...props }) {
|
|
32
|
+
const context = React$1.useContext(ToggleGroupContext);
|
|
33
|
+
return /* @__PURE__ */ jsx(ToggleGroupPrimitive.Item, {
|
|
34
|
+
"data-slot": "toggle-group-item",
|
|
35
|
+
"data-variant": context.variant || variant,
|
|
36
|
+
"data-size": context.size || size,
|
|
37
|
+
className: cn(toggleVariants({
|
|
38
|
+
variant: context.variant || variant,
|
|
39
|
+
size: context.size || size
|
|
40
|
+
}), "min-w-0 flex-1 shrink-0 rounded-none shadow-none first:rounded-l-md last:rounded-r-md focus:z-10 focus-visible:z-10 data-[variant=outline]:border-l-0 data-[variant=outline]:first:border-l", className),
|
|
41
|
+
...props,
|
|
42
|
+
children
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
//#endregion
|
|
47
|
+
export { ToggleGroup, ToggleGroupItem };
|
|
48
|
+
//# sourceMappingURL=toggle-group.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toggle-group.js","names":["React"],"sources":["../../ui/toggle-group.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';\nimport { type VariantProps } from 'class-variance-authority';\n\nimport { cn } from '@contractspec/lib.ui-kit-core/utils';\nimport { toggleVariants } from './toggle';\n\nconst ToggleGroupContext = React.createContext<\n VariantProps<typeof toggleVariants>\n>({\n size: 'default',\n variant: 'default',\n});\n\nfunction ToggleGroup({\n className,\n variant,\n size,\n children,\n ...props\n}: React.ComponentProps<typeof ToggleGroupPrimitive.Root> &\n VariantProps<typeof toggleVariants>) {\n return (\n <ToggleGroupPrimitive.Root\n data-slot=\"toggle-group\"\n data-variant={variant}\n data-size={size}\n className={cn(\n 'group/toggle-group flex w-fit items-center rounded-md data-[variant=outline]:shadow-2xs',\n className\n )}\n {...props}\n >\n <ToggleGroupContext.Provider value={{ variant, size }}>\n {children}\n </ToggleGroupContext.Provider>\n </ToggleGroupPrimitive.Root>\n );\n}\n\nfunction ToggleGroupItem({\n className,\n children,\n variant,\n size,\n ...props\n}: React.ComponentProps<typeof ToggleGroupPrimitive.Item> &\n VariantProps<typeof toggleVariants>) {\n const context = React.useContext(ToggleGroupContext);\n\n return (\n <ToggleGroupPrimitive.Item\n data-slot=\"toggle-group-item\"\n data-variant={context.variant || variant}\n data-size={context.size || size}\n className={cn(\n toggleVariants({\n variant: context.variant || variant,\n size: context.size || size,\n }),\n 'min-w-0 flex-1 shrink-0 rounded-none shadow-none first:rounded-l-md last:rounded-r-md focus:z-10 focus-visible:z-10 data-[variant=outline]:border-l-0 data-[variant=outline]:first:border-l',\n className\n )}\n {...props}\n >\n {children}\n </ToggleGroupPrimitive.Item>\n );\n}\n\nexport { ToggleGroup, ToggleGroupItem };\n"],"mappings":";;;;;;;;;;AASA,MAAM,qBAAqBA,QAAM,cAE/B;CACA,MAAM;CACN,SAAS;CACV,CAAC;AAEF,SAAS,YAAY,EACnB,WACA,SACA,MACA,UACA,GAAG,SAEkC;AACrC,QACE,oBAAC,qBAAqB;EACpB,aAAU;EACV,gBAAc;EACd,aAAW;EACX,WAAW,GACT,2FACA,UACD;EACD,GAAI;YAEJ,oBAAC,mBAAmB;GAAS,OAAO;IAAE;IAAS;IAAM;GAClD;IAC2B;GACJ;;AAIhC,SAAS,gBAAgB,EACvB,WACA,UACA,SACA,MACA,GAAG,SAEkC;CACrC,MAAM,UAAUA,QAAM,WAAW,mBAAmB;AAEpD,QACE,oBAAC,qBAAqB;EACpB,aAAU;EACV,gBAAc,QAAQ,WAAW;EACjC,aAAW,QAAQ,QAAQ;EAC3B,WAAW,GACT,eAAe;GACb,SAAS,QAAQ,WAAW;GAC5B,MAAM,QAAQ,QAAQ;GACvB,CAAC,EACF,+LACA,UACD;EACD,GAAI;EAEH;GACyB"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as React$1 from "react";
|
|
2
|
+
import * as react_jsx_runtime221 from "react/jsx-runtime";
|
|
3
|
+
import { VariantProps } from "class-variance-authority";
|
|
4
|
+
import * as TogglePrimitive from "@radix-ui/react-toggle";
|
|
5
|
+
import * as class_variance_authority_types20 from "class-variance-authority/types";
|
|
6
|
+
|
|
7
|
+
//#region ui/toggle.d.ts
|
|
8
|
+
declare const toggleVariants: (props?: ({
|
|
9
|
+
variant?: "default" | "outline" | null | undefined;
|
|
10
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
11
|
+
} & class_variance_authority_types20.ClassProp) | undefined) => string;
|
|
12
|
+
declare function Toggle({
|
|
13
|
+
className,
|
|
14
|
+
variant,
|
|
15
|
+
size,
|
|
16
|
+
...props
|
|
17
|
+
}: React$1.ComponentProps<typeof TogglePrimitive.Root> & VariantProps<typeof toggleVariants>): react_jsx_runtime221.JSX.Element;
|
|
18
|
+
//#endregion
|
|
19
|
+
export { Toggle, toggleVariants };
|
|
20
|
+
//# sourceMappingURL=toggle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toggle.d.ts","names":[],"sources":["../../ui/toggle.tsx"],"sourcesContent":[],"mappings":";;;;;;;cAQM;;;IAoBL,gCAAA,CAAA;AAxBiE,iBA0BzD,MAAA,CAFR;EAAA,SAAA;EAAA,OAAA;EAAA,IAAA;EAAA,GAAA;AAAA,CAAA,EAOE,OAAA,CAAM,cAPR,CAAA,OAO8B,eAAA,CAAgB,IAP9C,CAAA,GAQC,YARD,CAAA,OAQqB,cARrB,CAAA,CAAA,EAQoC,oBAAA,CAAA,GAAA,CAAA,OARpC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
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 { cva } from "class-variance-authority";
|
|
7
|
+
import * as TogglePrimitive from "@radix-ui/react-toggle";
|
|
8
|
+
|
|
9
|
+
//#region ui/toggle.tsx
|
|
10
|
+
const toggleVariants = cva("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-hidden transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap", {
|
|
11
|
+
variants: {
|
|
12
|
+
variant: {
|
|
13
|
+
default: "bg-transparent",
|
|
14
|
+
outline: "border border-input bg-transparent shadow-2xs hover:bg-accent hover:text-accent-foreground"
|
|
15
|
+
},
|
|
16
|
+
size: {
|
|
17
|
+
default: "h-9 px-2 min-w-9",
|
|
18
|
+
sm: "h-8 px-1.5 min-w-8",
|
|
19
|
+
lg: "h-10 px-2.5 min-w-10"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
defaultVariants: {
|
|
23
|
+
variant: "default",
|
|
24
|
+
size: "default"
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
function Toggle({ className, variant, size, ...props }) {
|
|
28
|
+
return /* @__PURE__ */ jsx(TogglePrimitive.Root, {
|
|
29
|
+
"data-slot": "toggle",
|
|
30
|
+
className: cn(toggleVariants({
|
|
31
|
+
variant,
|
|
32
|
+
size,
|
|
33
|
+
className
|
|
34
|
+
})),
|
|
35
|
+
...props
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
//#endregion
|
|
40
|
+
export { Toggle, toggleVariants };
|
|
41
|
+
//# sourceMappingURL=toggle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toggle.js","names":[],"sources":["../../ui/toggle.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as TogglePrimitive from '@radix-ui/react-toggle';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { cn } from '@contractspec/lib.ui-kit-core/utils';\n\nconst toggleVariants = cva(\n \"inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-hidden transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap\",\n {\n variants: {\n variant: {\n default: 'bg-transparent',\n outline:\n 'border border-input bg-transparent shadow-2xs hover:bg-accent hover:text-accent-foreground',\n },\n size: {\n default: 'h-9 px-2 min-w-9',\n sm: 'h-8 px-1.5 min-w-8',\n lg: 'h-10 px-2.5 min-w-10',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n }\n);\n\nfunction Toggle({\n className,\n variant,\n size,\n ...props\n}: React.ComponentProps<typeof TogglePrimitive.Root> &\n VariantProps<typeof toggleVariants>) {\n return (\n <TogglePrimitive.Root\n data-slot=\"toggle\"\n className={cn(toggleVariants({ variant, size, className }))}\n {...props}\n />\n );\n}\n\nexport { Toggle, toggleVariants };\n"],"mappings":";;;;;;;;;AAQA,MAAM,iBAAiB,IACrB,mjBACA;CACE,UAAU;EACR,SAAS;GACP,SAAS;GACT,SACE;GACH;EACD,MAAM;GACJ,SAAS;GACT,IAAI;GACJ,IAAI;GACL;EACF;CACD,iBAAiB;EACf,SAAS;EACT,MAAM;EACP;CACF,CACF;AAED,SAAS,OAAO,EACd,WACA,SACA,MACA,GAAG,SAEkC;AACrC,QACE,oBAAC,gBAAgB;EACf,aAAU;EACV,WAAW,GAAG,eAAe;GAAE;GAAS;GAAM;GAAW,CAAC,CAAC;EAC3D,GAAI;GACJ"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as React$1 from "react";
|
|
2
|
+
import * as react_jsx_runtime231 from "react/jsx-runtime";
|
|
3
|
+
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
4
|
+
|
|
5
|
+
//#region ui/tooltip.d.ts
|
|
6
|
+
declare function TooltipProvider({
|
|
7
|
+
delayDuration,
|
|
8
|
+
...props
|
|
9
|
+
}: React$1.ComponentProps<typeof TooltipPrimitive.Provider>): react_jsx_runtime231.JSX.Element;
|
|
10
|
+
declare function Tooltip({
|
|
11
|
+
...props
|
|
12
|
+
}: React$1.ComponentProps<typeof TooltipPrimitive.Root>): react_jsx_runtime231.JSX.Element;
|
|
13
|
+
declare function TooltipTrigger({
|
|
14
|
+
...props
|
|
15
|
+
}: React$1.ComponentProps<typeof TooltipPrimitive.Trigger>): react_jsx_runtime231.JSX.Element;
|
|
16
|
+
declare function TooltipContent({
|
|
17
|
+
className,
|
|
18
|
+
sideOffset,
|
|
19
|
+
children,
|
|
20
|
+
...props
|
|
21
|
+
}: React$1.ComponentProps<typeof TooltipPrimitive.Content>): react_jsx_runtime231.JSX.Element;
|
|
22
|
+
//#endregion
|
|
23
|
+
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
|
|
24
|
+
//# sourceMappingURL=tooltip.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tooltip.d.ts","names":[],"sources":["../../ui/tooltip.tsx"],"sourcesContent":[],"mappings":";;;;;iBAOS,eAAA;;;GAGN,OAAA,CAAM,sBAAsB,gBAAA,CAAiB,YAAS,oBAAA,CAAA,GAAA,CAAA;iBAUhD,OAAA;;GAEN,OAAA,CAAM,sBAAsB,gBAAA,CAAiB,QAAK,oBAAA,CAAA,GAAA,CAAA;iBAQ5C,cAAA;;GAEN,OAAA,CAAM,sBAAsB,gBAAA,CAAiB,WAAQ,oBAAA,CAAA,GAAA,CAAA;AA7BI,iBAiCnD,cAAA,CA7Be;EAAA,SAAA;EAAA,UAAA;EAAA,QAAA;EAAA,GAAA;AAAA,CAAA,EAkCrB,OAAA,CAAM,cAlCe,CAAA,OAkCO,gBAAA,CAAiB,OAlCxB,CAAA,CAAA,EAkCgC,oBAAA,CAAA,GAAA,CAAA,OAlChC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import "react";
|
|
4
|
+
import { cn } from "@contractspec/lib.ui-kit-core/utils";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
7
|
+
|
|
8
|
+
//#region ui/tooltip.tsx
|
|
9
|
+
function TooltipProvider({ delayDuration = 0, ...props }) {
|
|
10
|
+
return /* @__PURE__ */ jsx(TooltipPrimitive.Provider, {
|
|
11
|
+
"data-slot": "tooltip-provider",
|
|
12
|
+
delayDuration,
|
|
13
|
+
...props
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
function Tooltip({ ...props }) {
|
|
17
|
+
return /* @__PURE__ */ jsx(TooltipProvider, { children: /* @__PURE__ */ jsx(TooltipPrimitive.Root, {
|
|
18
|
+
"data-slot": "tooltip",
|
|
19
|
+
...props
|
|
20
|
+
}) });
|
|
21
|
+
}
|
|
22
|
+
function TooltipTrigger({ ...props }) {
|
|
23
|
+
return /* @__PURE__ */ jsx(TooltipPrimitive.Trigger, {
|
|
24
|
+
"data-slot": "tooltip-trigger",
|
|
25
|
+
...props
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
function TooltipContent({ className, sideOffset = 0, children, ...props }) {
|
|
29
|
+
return /* @__PURE__ */ jsx(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsxs(TooltipPrimitive.Content, {
|
|
30
|
+
"data-slot": "tooltip-content",
|
|
31
|
+
sideOffset,
|
|
32
|
+
className: cn("bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance", className),
|
|
33
|
+
...props,
|
|
34
|
+
children: [children, /* @__PURE__ */ jsx(TooltipPrimitive.Arrow, { className: "bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px]" })]
|
|
35
|
+
}) });
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
//#endregion
|
|
39
|
+
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
|
|
40
|
+
//# sourceMappingURL=tooltip.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tooltip.js","names":[],"sources":["../../ui/tooltip.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as TooltipPrimitive from '@radix-ui/react-tooltip';\n\nimport { cn } from '@contractspec/lib.ui-kit-core/utils';\n\nfunction TooltipProvider({\n delayDuration = 0,\n ...props\n}: React.ComponentProps<typeof TooltipPrimitive.Provider>) {\n return (\n <TooltipPrimitive.Provider\n data-slot=\"tooltip-provider\"\n delayDuration={delayDuration}\n {...props}\n />\n );\n}\n\nfunction Tooltip({\n ...props\n}: React.ComponentProps<typeof TooltipPrimitive.Root>) {\n return (\n <TooltipProvider>\n <TooltipPrimitive.Root data-slot=\"tooltip\" {...props} />\n </TooltipProvider>\n );\n}\n\nfunction TooltipTrigger({\n ...props\n}: React.ComponentProps<typeof TooltipPrimitive.Trigger>) {\n return <TooltipPrimitive.Trigger data-slot=\"tooltip-trigger\" {...props} />;\n}\n\nfunction TooltipContent({\n className,\n sideOffset = 0,\n children,\n ...props\n}: React.ComponentProps<typeof TooltipPrimitive.Content>) {\n return (\n <TooltipPrimitive.Portal>\n <TooltipPrimitive.Content\n data-slot=\"tooltip-content\"\n sideOffset={sideOffset}\n className={cn(\n 'bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance',\n className\n )}\n {...props}\n >\n {children}\n <TooltipPrimitive.Arrow className=\"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px]\" />\n </TooltipPrimitive.Content>\n </TooltipPrimitive.Portal>\n );\n}\n\nexport { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };\n"],"mappings":";;;;;;;;AAOA,SAAS,gBAAgB,EACvB,gBAAgB,GAChB,GAAG,SACsD;AACzD,QACE,oBAAC,iBAAiB;EAChB,aAAU;EACK;EACf,GAAI;GACJ;;AAIN,SAAS,QAAQ,EACf,GAAG,SACkD;AACrD,QACE,oBAAC,6BACC,oBAAC,iBAAiB;EAAK,aAAU;EAAU,GAAI;GAAS,GACxC;;AAItB,SAAS,eAAe,EACtB,GAAG,SACqD;AACxD,QAAO,oBAAC,iBAAiB;EAAQ,aAAU;EAAkB,GAAI;GAAS;;AAG5E,SAAS,eAAe,EACtB,WACA,aAAa,GACb,UACA,GAAG,SACqD;AACxD,QACE,oBAAC,iBAAiB,oBAChB,qBAAC,iBAAiB;EAChB,aAAU;EACE;EACZ,WAAW,GACT,qaACA,UACD;EACD,GAAI;aAEH,UACD,oBAAC,iBAAiB,SAAM,WAAU,qGAAqG;GAC9G,GACH"}
|