@lssm-tech/lib.ui-kit-web 3.13.4
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 +233 -0
- package/dist/browser/index.js +1 -0
- package/dist/browser/ui/accordion.js +1 -0
- package/dist/browser/ui/alert-dialog.js +1 -0
- package/dist/browser/ui/alert.js +1 -0
- package/dist/browser/ui/aspect-ratio.js +1 -0
- package/dist/browser/ui/atoms/FilterSelect/FilterSelect.js +1 -0
- package/dist/browser/ui/atoms/FilterSelect/index.js +1 -0
- package/dist/browser/ui/atoms/FilterSelect/types.js +0 -0
- package/dist/browser/ui/atoms/LoadingSpinner/LoadingSpinner.js +1 -0
- package/dist/browser/ui/atoms/LoadingSpinner/index.js +1 -0
- package/dist/browser/ui/atoms/Pagination/Pagination.js +1 -0
- package/dist/browser/ui/atoms/Pagination/index.js +1 -0
- package/dist/browser/ui/atoms/Pagination/types.js +0 -0
- package/dist/browser/ui/atoms/SearchInput/SearchInput.js +1 -0
- package/dist/browser/ui/atoms/SearchInput/index.js +1 -0
- package/dist/browser/ui/atoms/SearchInput/types.js +0 -0
- package/dist/browser/ui/avatar.js +1 -0
- package/dist/browser/ui/badge.js +1 -0
- package/dist/browser/ui/breadcrumb.js +1 -0
- package/dist/browser/ui/button-group.js +1 -0
- package/dist/browser/ui/button.js +1 -0
- package/dist/browser/ui/calendar.js +1 -0
- package/dist/browser/ui/card.js +1 -0
- package/dist/browser/ui/carousel.js +1 -0
- package/dist/browser/ui/chart.js +1 -0
- package/dist/browser/ui/checkbox.js +1 -0
- package/dist/browser/ui/collapsible.js +1 -0
- package/dist/browser/ui/combobox.js +1 -0
- package/dist/browser/ui/command.js +1 -0
- package/dist/browser/ui/confirm-dialog.js +1 -0
- package/dist/browser/ui/context-menu.js +1 -0
- package/dist/browser/ui/contracts.typecheck.js +0 -0
- package/dist/browser/ui/cta.js +1 -0
- package/dist/browser/ui/data-table.js +1 -0
- package/dist/browser/ui/data-table.parts.js +1 -0
- package/dist/browser/ui/date-picker.js +1 -0
- package/dist/browser/ui/date-range-picker.js +1 -0
- package/dist/browser/ui/datetime-picker.js +1 -0
- package/dist/browser/ui/dialog.js +1 -0
- package/dist/browser/ui/direction.js +1 -0
- package/dist/browser/ui/drawer.js +1 -0
- package/dist/browser/ui/dropdown-menu.js +1 -0
- package/dist/browser/ui/empty-state.js +1 -0
- package/dist/browser/ui/empty.js +1 -0
- package/dist/browser/ui/field.js +1 -0
- package/dist/browser/ui/focus-on-route-change.js +1 -0
- package/dist/browser/ui/form.js +1 -0
- package/dist/browser/ui/hover-card.js +1 -0
- package/dist/browser/ui/input-group.js +1 -0
- package/dist/browser/ui/input-otp.js +1 -0
- package/dist/browser/ui/input-password.js +1 -0
- package/dist/browser/ui/input.js +1 -0
- package/dist/browser/ui/item.js +1 -0
- package/dist/browser/ui/kbd.js +1 -0
- package/dist/browser/ui/label.js +1 -0
- package/dist/browser/ui/link.js +1 -0
- package/dist/browser/ui/list.js +1 -0
- package/dist/browser/ui/live-region.js +1 -0
- package/dist/browser/ui/loading-button.js +1 -0
- package/dist/browser/ui/map/MapBase.js +1 -0
- package/dist/browser/ui/map/MapGeoJsonOverlay.js +1 -0
- package/dist/browser/ui/map/MapHeatmapH3.js +1 -0
- package/dist/browser/ui/map/MapMarkers.js +1 -0
- package/dist/browser/ui/map/index.js +1 -0
- package/dist/browser/ui/marketing/FeatureGrid.js +1 -0
- package/dist/browser/ui/marketing/Hero.js +1 -0
- package/dist/browser/ui/marketing/PricingTable.js +1 -0
- package/dist/browser/ui/marketing/index.js +1 -0
- package/dist/browser/ui/menubar.js +1 -0
- package/dist/browser/ui/molecules/Autocomplete/index.js +1 -0
- package/dist/browser/ui/molecules/SearchAndFilter/SearchAndFilter.js +1 -0
- package/dist/browser/ui/molecules/SearchAndFilter/index.js +1 -0
- package/dist/browser/ui/molecules/SearchAndFilter/types.js +0 -0
- package/dist/browser/ui/molecules/SkeletonList.js +1 -0
- package/dist/browser/ui/native-select.js +1 -0
- package/dist/browser/ui/nav-layout.js +1 -0
- package/dist/browser/ui/navigation-menu.js +1 -0
- package/dist/browser/ui/organisms/ErrorBoundary/ErrorBoundary.js +1 -0
- package/dist/browser/ui/organisms/ErrorBoundary/index.js +1 -0
- package/dist/browser/ui/organisms/ListPage/ListPage.js +1 -0
- package/dist/browser/ui/organisms/ListPage/index.js +1 -0
- package/dist/browser/ui/organisms/ListPage/types.js +0 -0
- package/dist/browser/ui/page-header.js +1 -0
- package/dist/browser/ui/pagination.js +1 -0
- package/dist/browser/ui/popover.js +1 -0
- package/dist/browser/ui/progress.js +1 -0
- package/dist/browser/ui/radio-group.js +1 -0
- package/dist/browser/ui/resizable.js +1 -0
- package/dist/browser/ui/route-announcer.js +1 -0
- package/dist/browser/ui/scroll-area.js +1 -0
- package/dist/browser/ui/section.js +1 -0
- package/dist/browser/ui/select.js +1 -0
- package/dist/browser/ui/separator.js +1 -0
- package/dist/browser/ui/sheet.js +1 -0
- package/dist/browser/ui/sidebar.js +1 -0
- package/dist/browser/ui/skeleton.js +1 -0
- package/dist/browser/ui/skip-link.js +1 -0
- package/dist/browser/ui/slider.js +1 -0
- package/dist/browser/ui/sonner.js +1 -0
- package/dist/browser/ui/spinner.js +1 -0
- package/dist/browser/ui/stack.js +1 -0
- package/dist/browser/ui/stat-card-group.js +1 -0
- package/dist/browser/ui/stepper.js +1 -0
- package/dist/browser/ui/switch.js +1 -0
- package/dist/browser/ui/table.js +1 -0
- package/dist/browser/ui/tabs.js +1 -0
- package/dist/browser/ui/text.js +1 -0
- package/dist/browser/ui/textarea.js +1 -0
- package/dist/browser/ui/time-picker.js +1 -0
- package/dist/browser/ui/toast.js +1 -0
- package/dist/browser/ui/toaster.js +1 -0
- package/dist/browser/ui/toggle-group.js +1 -0
- package/dist/browser/ui/toggle.js +1 -0
- package/dist/browser/ui/tooltip.js +1 -0
- package/dist/browser/ui/typography.js +1 -0
- package/dist/browser/ui/use-media-query.js +1 -0
- package/dist/browser/ui/use-mobile.js +1 -0
- package/dist/browser/ui/use-reduced-motion.js +1 -0
- package/dist/browser/ui/use-toast.js +1 -0
- package/dist/browser/ui/useListState.js +1 -0
- package/dist/browser/ui/usecases/UseCaseCard.js +1 -0
- package/dist/browser/ui/usecases/UserStoryCard.js +1 -0
- package/dist/browser/ui/usecases/index.js +1 -0
- package/dist/browser/ui/utils.js +1 -0
- package/dist/browser/ui/visualization/Visualization.js +1 -0
- package/dist/browser/ui/visualization/Visualization.support.js +1 -0
- package/dist/browser/ui/visualization/index.js +1 -0
- package/dist/browser/ui/visually-hidden.js +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -0
- package/dist/ui/accordion.d.ts +7 -0
- package/dist/ui/accordion.js +2 -0
- package/dist/ui/alert-dialog.d.ts +14 -0
- package/dist/ui/alert-dialog.js +2 -0
- package/dist/ui/alert.d.ts +9 -0
- package/dist/ui/alert.js +2 -0
- package/dist/ui/aspect-ratio.d.ts +3 -0
- package/dist/ui/aspect-ratio.js +2 -0
- package/dist/ui/atoms/FilterSelect/FilterSelect.d.ts +3 -0
- package/dist/ui/atoms/FilterSelect/FilterSelect.js +2 -0
- package/dist/ui/atoms/FilterSelect/index.d.ts +2 -0
- package/dist/ui/atoms/FilterSelect/index.js +2 -0
- package/dist/ui/atoms/FilterSelect/types.d.ts +5 -0
- package/dist/ui/atoms/FilterSelect/types.js +1 -0
- package/dist/ui/atoms/LoadingSpinner/LoadingSpinner.d.ts +19 -0
- package/dist/ui/atoms/LoadingSpinner/LoadingSpinner.js +2 -0
- package/dist/ui/atoms/LoadingSpinner/index.d.ts +1 -0
- package/dist/ui/atoms/LoadingSpinner/index.js +2 -0
- package/dist/ui/atoms/Pagination/Pagination.d.ts +3 -0
- package/dist/ui/atoms/Pagination/Pagination.js +2 -0
- package/dist/ui/atoms/Pagination/index.d.ts +2 -0
- package/dist/ui/atoms/Pagination/index.js +2 -0
- package/dist/ui/atoms/Pagination/types.d.ts +3 -0
- package/dist/ui/atoms/Pagination/types.js +1 -0
- package/dist/ui/atoms/SearchInput/SearchInput.d.ts +3 -0
- package/dist/ui/atoms/SearchInput/SearchInput.js +2 -0
- package/dist/ui/atoms/SearchInput/index.d.ts +2 -0
- package/dist/ui/atoms/SearchInput/index.js +2 -0
- package/dist/ui/atoms/SearchInput/types.d.ts +3 -0
- package/dist/ui/atoms/SearchInput/types.js +1 -0
- package/dist/ui/avatar.d.ts +6 -0
- package/dist/ui/avatar.js +2 -0
- package/dist/ui/badge.d.ts +9 -0
- package/dist/ui/badge.js +2 -0
- package/dist/ui/breadcrumb.d.ts +11 -0
- package/dist/ui/breadcrumb.js +2 -0
- package/dist/ui/button-group.d.ts +5 -0
- package/dist/ui/button-group.js +2 -0
- package/dist/ui/button.d.ts +17 -0
- package/dist/ui/button.js +2 -0
- package/dist/ui/calendar.d.ts +8 -0
- package/dist/ui/calendar.js +2 -0
- package/dist/ui/card.d.ts +9 -0
- package/dist/ui/card.js +2 -0
- package/dist/ui/carousel.d.ts +19 -0
- package/dist/ui/carousel.js +2 -0
- package/dist/ui/chart.d.ts +45 -0
- package/dist/ui/chart.js +2 -0
- package/dist/ui/checkbox.d.ts +4 -0
- package/dist/ui/checkbox.js +2 -0
- package/dist/ui/collapsible.d.ts +5 -0
- package/dist/ui/collapsible.js +2 -0
- package/dist/ui/combobox.d.ts +32 -0
- package/dist/ui/combobox.js +2 -0
- package/dist/ui/combobox.test.d.ts +1 -0
- package/dist/ui/command.d.ts +18 -0
- package/dist/ui/command.js +2 -0
- package/dist/ui/confirm-dialog.d.ts +14 -0
- package/dist/ui/confirm-dialog.js +2 -0
- package/dist/ui/context-menu.d.ts +31 -0
- package/dist/ui/context-menu.js +2 -0
- package/dist/ui/contracts.typecheck.d.ts +1 -0
- package/dist/ui/contracts.typecheck.js +1 -0
- package/dist/ui/cta.d.ts +12 -0
- package/dist/ui/cta.js +2 -0
- package/dist/ui/data-table.d.ts +8 -0
- package/dist/ui/data-table.js +2 -0
- package/dist/ui/data-table.parts.d.ts +19 -0
- package/dist/ui/data-table.parts.js +2 -0
- package/dist/ui/data-table.test.d.ts +1 -0
- package/dist/ui/date-picker.d.ts +5 -0
- package/dist/ui/date-picker.js +2 -0
- package/dist/ui/date-range-picker.d.ts +6 -0
- package/dist/ui/date-range-picker.js +2 -0
- package/dist/ui/datetime-picker.d.ts +6 -0
- package/dist/ui/datetime-picker.js +2 -0
- package/dist/ui/dialog.d.ts +15 -0
- package/dist/ui/dialog.js +2 -0
- package/dist/ui/direction.d.ts +9 -0
- package/dist/ui/direction.js +2 -0
- package/dist/ui/drawer.d.ts +13 -0
- package/dist/ui/drawer.js +2 -0
- package/dist/ui/dropdown-menu.d.ts +25 -0
- package/dist/ui/dropdown-menu.js +2 -0
- package/dist/ui/empty-state.d.ts +9 -0
- package/dist/ui/empty-state.js +2 -0
- package/dist/ui/empty.d.ts +12 -0
- package/dist/ui/empty.js +2 -0
- package/dist/ui/field.d.ts +20 -0
- package/dist/ui/field.js +2 -0
- package/dist/ui/focus-on-route-change.d.ts +3 -0
- package/dist/ui/focus-on-route-change.js +2 -0
- package/dist/ui/form.d.ts +26 -0
- package/dist/ui/form.js +2 -0
- package/dist/ui/hover-card.d.ts +6 -0
- package/dist/ui/hover-card.js +2 -0
- package/dist/ui/input-group.d.ts +18 -0
- package/dist/ui/input-group.js +2 -0
- package/dist/ui/input-otp.d.ts +16 -0
- package/dist/ui/input-otp.js +2 -0
- package/dist/ui/input-password.d.ts +11 -0
- package/dist/ui/input-password.js +2 -0
- package/dist/ui/input-password.test.d.ts +1 -0
- package/dist/ui/input.d.ts +7 -0
- package/dist/ui/input.js +2 -0
- package/dist/ui/item.d.ts +23 -0
- package/dist/ui/item.js +2 -0
- package/dist/ui/kbd.d.ts +3 -0
- package/dist/ui/kbd.js +2 -0
- package/dist/ui/label.d.ts +4 -0
- package/dist/ui/label.js +2 -0
- package/dist/ui/link.d.ts +6 -0
- package/dist/ui/link.js +2 -0
- package/dist/ui/list.d.ts +20 -0
- package/dist/ui/list.js +2 -0
- package/dist/ui/live-region.d.ts +10 -0
- package/dist/ui/live-region.js +2 -0
- package/dist/ui/loading-button.d.ts +9 -0
- package/dist/ui/loading-button.js +2 -0
- package/dist/ui/map/MapBase.d.ts +22 -0
- package/dist/ui/map/MapBase.js +2 -0
- package/dist/ui/map/MapGeoJsonOverlay.d.ts +10 -0
- package/dist/ui/map/MapGeoJsonOverlay.js +2 -0
- package/dist/ui/map/MapHeatmapH3.d.ts +12 -0
- package/dist/ui/map/MapHeatmapH3.js +2 -0
- package/dist/ui/map/MapMarkers.d.ts +12 -0
- package/dist/ui/map/MapMarkers.js +2 -0
- package/dist/ui/map/index.d.ts +4 -0
- package/dist/ui/map/index.js +2 -0
- package/dist/ui/marketing/FeatureGrid.d.ts +4 -0
- package/dist/ui/marketing/FeatureGrid.js +2 -0
- package/dist/ui/marketing/Hero.d.ts +16 -0
- package/dist/ui/marketing/Hero.js +2 -0
- package/dist/ui/marketing/PricingTable.d.ts +4 -0
- package/dist/ui/marketing/PricingTable.js +2 -0
- package/dist/ui/marketing/index.d.ts +3 -0
- package/dist/ui/marketing/index.js +2 -0
- package/dist/ui/menubar.d.ts +26 -0
- package/dist/ui/menubar.js +2 -0
- package/dist/ui/molecules/Autocomplete/index.d.ts +1 -0
- package/dist/ui/molecules/Autocomplete/index.js +2 -0
- package/dist/ui/molecules/SearchAndFilter/SearchAndFilter.d.ts +3 -0
- package/dist/ui/molecules/SearchAndFilter/SearchAndFilter.js +2 -0
- package/dist/ui/molecules/SearchAndFilter/index.d.ts +2 -0
- package/dist/ui/molecules/SearchAndFilter/index.js +2 -0
- package/dist/ui/molecules/SearchAndFilter/types.d.ts +3 -0
- package/dist/ui/molecules/SearchAndFilter/types.js +1 -0
- package/dist/ui/molecules/SkeletonList.d.ts +7 -0
- package/dist/ui/molecules/SkeletonList.js +2 -0
- package/dist/ui/native-select.d.ts +4 -0
- package/dist/ui/native-select.js +2 -0
- package/dist/ui/nav-layout.d.ts +47 -0
- package/dist/ui/nav-layout.js +2 -0
- package/dist/ui/navigation-menu.d.ts +14 -0
- package/dist/ui/navigation-menu.js +2 -0
- package/dist/ui/organisms/ErrorBoundary/ErrorBoundary.d.ts +25 -0
- package/dist/ui/organisms/ErrorBoundary/ErrorBoundary.js +2 -0
- package/dist/ui/organisms/ErrorBoundary/index.d.ts +2 -0
- package/dist/ui/organisms/ErrorBoundary/index.js +2 -0
- package/dist/ui/organisms/ListPage/ListPage.d.ts +2 -0
- package/dist/ui/organisms/ListPage/ListPage.js +2 -0
- package/dist/ui/organisms/ListPage/index.d.ts +2 -0
- package/dist/ui/organisms/ListPage/index.js +2 -0
- package/dist/ui/organisms/ListPage/types.d.ts +37 -0
- package/dist/ui/organisms/ListPage/types.js +1 -0
- package/dist/ui/page-header.d.ts +9 -0
- package/dist/ui/page-header.js +2 -0
- package/dist/ui/pagination.d.ts +17 -0
- package/dist/ui/pagination.js +2 -0
- package/dist/ui/popover.d.ts +7 -0
- package/dist/ui/popover.js +2 -0
- package/dist/ui/progress.d.ts +4 -0
- package/dist/ui/progress.js +2 -0
- package/dist/ui/radio-group.d.ts +5 -0
- package/dist/ui/radio-group.js +2 -0
- package/dist/ui/resizable.d.ts +8 -0
- package/dist/ui/resizable.js +2 -0
- package/dist/ui/route-announcer.d.ts +3 -0
- package/dist/ui/route-announcer.js +2 -0
- package/dist/ui/scroll-area.d.ts +5 -0
- package/dist/ui/scroll-area.js +2 -0
- package/dist/ui/section.d.ts +15 -0
- package/dist/ui/section.js +2 -0
- package/dist/ui/select.d.ts +15 -0
- package/dist/ui/select.js +2 -0
- package/dist/ui/select.test.d.ts +1 -0
- package/dist/ui/separator.d.ts +4 -0
- package/dist/ui/separator.js +2 -0
- package/dist/ui/sheet.d.ts +13 -0
- package/dist/ui/sheet.js +2 -0
- package/dist/ui/sidebar.d.ts +69 -0
- package/dist/ui/sidebar.js +2 -0
- package/dist/ui/skeleton.d.ts +3 -0
- package/dist/ui/skeleton.js +2 -0
- package/dist/ui/skip-link.d.ts +7 -0
- package/dist/ui/skip-link.js +2 -0
- package/dist/ui/slider.d.ts +4 -0
- package/dist/ui/slider.js +2 -0
- package/dist/ui/sonner.d.ts +3 -0
- package/dist/ui/sonner.js +2 -0
- package/dist/ui/spinner.d.ts +5 -0
- package/dist/ui/spinner.js +2 -0
- package/dist/ui/stack.d.ts +35 -0
- package/dist/ui/stack.js +2 -0
- package/dist/ui/stat-card-group.d.ts +10 -0
- package/dist/ui/stat-card-group.js +2 -0
- package/dist/ui/stepper.d.ts +10 -0
- package/dist/ui/stepper.js +2 -0
- package/dist/ui/switch.d.ts +6 -0
- package/dist/ui/switch.js +2 -0
- package/dist/ui/table.d.ts +10 -0
- package/dist/ui/table.js +2 -0
- package/dist/ui/tabs.d.ts +7 -0
- package/dist/ui/tabs.js +2 -0
- package/dist/ui/text.d.ts +6 -0
- package/dist/ui/text.js +2 -0
- package/dist/ui/textarea.d.ts +5 -0
- package/dist/ui/textarea.js +2 -0
- package/dist/ui/time-picker.d.ts +4 -0
- package/dist/ui/time-picker.js +2 -0
- package/dist/ui/toast.d.ts +28 -0
- package/dist/ui/toast.js +2 -0
- package/dist/ui/toaster.d.ts +1 -0
- package/dist/ui/toaster.js +2 -0
- package/dist/ui/toggle-group.d.ts +7 -0
- package/dist/ui/toggle-group.js +2 -0
- package/dist/ui/toggle.d.ts +9 -0
- package/dist/ui/toggle.js +2 -0
- package/dist/ui/tooltip.d.ts +7 -0
- package/dist/ui/tooltip.js +2 -0
- package/dist/ui/typography.d.ts +16 -0
- package/dist/ui/typography.js +2 -0
- package/dist/ui/use-media-query.d.ts +1 -0
- package/dist/ui/use-media-query.js +2 -0
- package/dist/ui/use-mobile.d.ts +1 -0
- package/dist/ui/use-mobile.js +2 -0
- package/dist/ui/use-reduced-motion.d.ts +1 -0
- package/dist/ui/use-reduced-motion.js +2 -0
- package/dist/ui/use-toast.d.ts +44 -0
- package/dist/ui/use-toast.js +2 -0
- package/dist/ui/useListState.d.ts +6 -0
- package/dist/ui/useListState.js +2 -0
- package/dist/ui/usecases/UseCaseCard.d.ts +7 -0
- package/dist/ui/usecases/UseCaseCard.js +2 -0
- package/dist/ui/usecases/UserStoryCard.d.ts +5 -0
- package/dist/ui/usecases/UserStoryCard.js +2 -0
- package/dist/ui/usecases/index.d.ts +2 -0
- package/dist/ui/usecases/index.js +2 -0
- package/dist/ui/utils.d.ts +2 -0
- package/dist/ui/utils.js +2 -0
- package/dist/ui/visualization/Visualization.d.ts +7 -0
- package/dist/ui/visualization/Visualization.js +2 -0
- package/dist/ui/visualization/Visualization.support.d.ts +15 -0
- package/dist/ui/visualization/Visualization.support.js +2 -0
- package/dist/ui/visualization/index.d.ts +1 -0
- package/dist/ui/visualization/index.js +2 -0
- package/dist/ui/visually-hidden.d.ts +8 -0
- package/dist/ui/visually-hidden.js +2 -0
- package/package.json +1691 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var F=((f)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(f,{get:(b,t)=>(typeof require<"u"?require:b)[t]}):f)(function(f){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+f+'" is not supported')});import*as M from"react";import J,{NavigationControl as O,ScaleControl as G}from"react-map-gl/maplibre";import{jsx as H,jsxs as U,Fragment as D}from"react/jsx-runtime";var V="https://basemaps.cartocdn.com/gl/positron-gl-style/style.json";function X(f){let{initialViewState:b={longitude:2.3522,latitude:48.8566,zoom:5},styleUrl:t=V,style:y,showControls:k=!0,showCssLink:w=!0,onMapRef:R,children:g}=f,p=M.useRef(null);return M.useEffect(()=>{R?.(p.current)},[p.current]),U("div",{style:{position:"relative",width:"100%",height:"100%",...y||{}},children:[w&&H("link",{href:"https://unpkg.com/maplibre-gl@4.7.0/dist/maplibre-gl.css",rel:"stylesheet"}),U(J,{ref:p,mapLib:import("maplibre-gl"),initialViewState:b,style:{width:"100%",height:"100%"},mapStyle:t,maplibreLogo:!1,children:[k&&U(D,{children:[H(G,{position:"bottom-left"}),H(O,{position:"bottom-left"})]}),g]})]})}import{Layer as I,Source as N}from"react-map-gl/maplibre";import{jsx as K,jsxs as h}from"react/jsx-runtime";function Y(f){let{id:b="geojson-overlay",data:t,fillColor:y="#2563eb",fillOpacity:k=0.25,lineColor:w="#1e40af",lineWidth:R=1.5,lineOpacity:g=0.8}=f,p={id:`${b}-fill`,type:"fill",paint:{"fill-color":y,"fill-opacity":k}},A={id:`${b}-outline`,type:"line",paint:{"line-color":w,"line-width":R,"line-opacity":g}};return h(N,{id:b,type:"geojson",data:t,children:[K(I,{...p}),K(I,{...A})]})}import{Marker as P}from"react-map-gl/maplibre";import{jsx as n,Fragment as c}from"react/jsx-runtime";function _({points:f}){return n(c,{children:f.map((b)=>n(P,{longitude:b.lng,latitude:b.lat,anchor:"bottom",children:n("button",{role:b.onClick?"button":void 0,tabIndex:b.onClick?0:-1,"aria-label":b.ariaLabel||"marker",onClick:b.onClick,onKeyDown:(t)=>{if(t.key==="Enter"||t.key===" ")t.preventDefault(),b.onClick?.()},style:{width:b.size??14,height:b.size??14,background:b.color??"#2563eb",border:"2px solid white",borderRadius:9999,boxShadow:"0 1px 3px rgba(0,0,0,0.35)",cursor:b.onClick?"pointer":"default"}})},b.id))})}import{formatVisualizationValue as q}from"@contractspec/lib.presentation-runtime-core";import{cn as Q}from"@contractspec/lib.ui-kit-core/utils";import*as T from"echarts/core";import{jsx as S,jsxs as L}from"react/jsx-runtime";function Z({className:f,model:b}){return L("div",{className:Q("space-y-2",f),children:[S("div",{className:"text-muted-foreground text-sm",children:b.metric?.label??b.title}),S("div",{className:"font-semibold text-3xl",children:q(b.metric?.value,b.metric?.format)}),b.metric?.comparisonValue!=null?L("div",{className:"text-muted-foreground text-sm",children:["Comparison:"," ",q(b.metric.comparisonValue,b.metric.format)]}):null,S(E,{model:b})]})}function E({model:f}){if(!f.table.columns.length||!f.table.rows.length)return null;return L("details",{className:"rounded-md border p-3 text-sm",children:[S("summary",{className:"cursor-pointer font-medium",children:"Data summary"}),S("div",{className:"mt-3 overflow-x-auto",children:L("table",{className:"w-full text-left",children:[S("thead",{children:S("tr",{children:f.table.columns.map((b)=>S("th",{className:"px-2 py-1 font-medium",children:b.label},b.key))})}),S("tbody",{children:f.table.rows.slice(0,8).map((b,t)=>S("tr",{children:f.table.columns.map((y)=>S("td",{className:"px-2 py-1",children:String(b[y.key]??"—")},y.key))},`summary-row-${t}`))})]})})]})}function $({className:f,model:b,reason:t}){return L("div",{className:Q("space-y-3",f),children:[S("p",{className:"text-muted-foreground text-sm",children:t}),S(E,{model:b})]})}function W(f){if(f.kind==="metric")return!1;if(f.kind==="geo"&&f.geo?.mode==="slippy-map")return!1;if(f.kind==="geo"&&f.geo?.geoJson?.type==="url")return!1;return!0}function z(f){if(f.kind!=="geo"||f.geo?.geoJson?.type!=="inline")return;x(f.geo.geoJson)}function x(f){if(f.type!=="inline")return;T.registerMap("contractspec-visualization-geo",f.data)}import{jsx as d}from"react/jsx-runtime";var j={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"};function C({as:f="span",style:b,children:t,ref:y,...k}){return d(f,{ref:y,style:{...j,...b},...k,children:t})}import{buildVisualizationEChartsOption as e}from"@contractspec/lib.presentation-runtime-core";import{cn as v}from"@contractspec/lib.ui-kit-core/utils";import{BarChart as a,FunnelChart as o,HeatmapChart as l,LineChart as m,MapChart as s,PieChart as ff,ScatterChart as bf}from"echarts/charts";import{AriaComponent as tf,GeoComponent as yf,GridComponent as wf,LegendComponent as Sf,TitleComponent as kf,TooltipComponent as uf,VisualMapComponent as Rf}from"echarts/components";import*as r from"echarts/core";import{CanvasRenderer as gf}from"echarts/renderers";import*as i from"react";import{jsx as u,jsxs as B}from"react/jsx-runtime";r.use([tf,kf,uf,wf,Sf,Rf,yf,gf,m,a,ff,bf,l,o,s]);function pf(){if(typeof document>"u")return!1;let f=document.createElement("canvas");return typeof f.getContext==="function"&&f.getContext("2d")!==null}function Vf({model:f,className:b,height:t=280,onDataPointPress:y}){let k=i.useRef(null),w=i.useMemo(()=>e(f),[f]);if(i.useEffect(()=>{if(!W(f)||!k.current||!pf())return;z(f);let R=r.init(k.current,void 0,{renderer:"canvas"});if(R.setOption(w),y)R.on("click",y);let g=new ResizeObserver(()=>R.resize());return g.observe(k.current),()=>{if(g.disconnect(),y)R.off("click",y);R.dispose()}},[f,y,w]),f.kind==="metric")return u(Z,{className:b,model:f});if(f.kind==="geo"&&f.geo?.mode==="slippy-map")return u(Lf,{className:b,height:t,model:f});if(f.kind==="geo"&&f.geo?.geoJson?.type==="url")return u($,{className:b,model:f,reason:"Geo URL sources currently fall back to the summary table."});return B("div",{className:v("space-y-3",b),children:[u(C,{children:f.summary}),u("div",{ref:k,"aria-label":f.summary,className:"w-full rounded-md",style:{height:t}}),u(E,{model:f})]})}function Lf({className:f,height:b,model:t}){let y=t.series.flatMap((k)=>k.points.filter((w)=>w.latitude!=null&&w.longitude!=null).map((w)=>({id:w.id,lat:w.latitude,lng:w.longitude,ariaLabel:w.name})));return B("div",{className:v("space-y-3",f),children:[u("div",{style:{height:b},children:B(X,{children:[y.length>0?u(_,{points:y}):null,t.geo?.geoJson?.type==="inline"?u(Y,{data:t.geo.geoJson.data}):null]})}),u(E,{model:t})]})}export{Vf as Visualization};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var O=((q)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(q,{get:(y,C)=>(typeof require<"u"?require:y)[C]}):q)(function(q){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+q+'" is not supported')});import{formatVisualizationValue as F}from"@contractspec/lib.presentation-runtime-core";import{cn as G}from"@contractspec/lib.ui-kit-core/utils";import*as H from"echarts/core";import{jsx as B,jsxs as D}from"react/jsx-runtime";function S({className:q,model:y}){return D("div",{className:G("space-y-2",q),children:[B("div",{className:"text-muted-foreground text-sm",children:y.metric?.label??y.title}),B("div",{className:"font-semibold text-3xl",children:F(y.metric?.value,y.metric?.format)}),y.metric?.comparisonValue!=null?D("div",{className:"text-muted-foreground text-sm",children:["Comparison:"," ",F(y.metric.comparisonValue,y.metric.format)]}):null,B(K,{model:y})]})}function K({model:q}){if(!q.table.columns.length||!q.table.rows.length)return null;return D("details",{className:"rounded-md border p-3 text-sm",children:[B("summary",{className:"cursor-pointer font-medium",children:"Data summary"}),B("div",{className:"mt-3 overflow-x-auto",children:D("table",{className:"w-full text-left",children:[B("thead",{children:B("tr",{children:q.table.columns.map((y)=>B("th",{className:"px-2 py-1 font-medium",children:y.label},y.key))})}),B("tbody",{children:q.table.rows.slice(0,8).map((y,C)=>B("tr",{children:q.table.columns.map((E)=>B("td",{className:"px-2 py-1",children:String(y[E.key]??"—")},E.key))},`summary-row-${C}`))})]})})]})}function U({className:q,model:y,reason:C}){return D("div",{className:G("space-y-3",q),children:[B("p",{className:"text-muted-foreground text-sm",children:C}),B(K,{model:y})]})}function W(q){if(q.kind==="metric")return!1;if(q.kind==="geo"&&q.geo?.mode==="slippy-map")return!1;if(q.kind==="geo"&&q.geo?.geoJson?.type==="url")return!1;return!0}function X(q){if(q.kind!=="geo"||q.geo?.geoJson?.type!=="inline")return;L(q.geo.geoJson)}function L(q){if(q.type!=="inline")return;H.registerMap("contractspec-visualization-geo",q.data)}export{W as shouldRenderEChart,X as registerGeoMap,K as TableAlternative,S as MetricVisualization,U as FallbackVisualization};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var o=((i)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(i,{get:(a,t)=>(typeof require<"u"?require:a)[t]}):i)(function(i){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+i+'" is not supported')});export{l as Visualization};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var s=((e)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,o)=>(typeof require<"u"?require:t)[o]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});import{jsx as n}from"react/jsx-runtime";var r={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"};function c({as:e="span",style:t,children:o,ref:i,...p}){return n(e,{ref:i,style:{...r,...t},...p,children:o})}export{c as VisuallyHidden};
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare function Accordion({ ...props }: React.ComponentProps<typeof AccordionPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function AccordionItem({ className, ...props }: React.ComponentProps<typeof AccordionPrimitive.Item>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function AccordionTrigger({ className, children, ...props }: React.ComponentProps<typeof AccordionPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function AccordionContent({ className, children, ...props }: React.ComponentProps<typeof AccordionPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
var H=import.meta.require;import{cn as E}from"@contractspec/lib.ui-kit-core/utils";import*as f from"@radix-ui/react-accordion";import{ChevronDownIcon as F}from"lucide-react";import{jsx as y,jsxs as G}from"react/jsx-runtime";function M({...q}){return y(f.Root,{"data-slot":"accordion",...q})}function O({className:q,...z}){return y(f.Item,{"data-slot":"accordion-item",className:E("border-b last:border-b-0",q),...z})}function P({className:q,children:z,...B}){return y(f.Header,{className:"flex",children:G(f.Trigger,{"data-slot":"accordion-trigger",className:E("flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left font-medium text-sm outline-hidden transition-all hover:underline focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",q),...B,children:[z,y(F,{className:"pointer-events-none size-4 shrink-0 translate-y-0.5 text-muted-foreground transition-transform duration-200"})]})})}function Q({className:q,children:z,...B}){return y(f.Content,{"data-slot":"accordion-content",className:"overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...B,children:y("div",{className:E("pt-0 pb-4",q),children:z})})}export{P as AccordionTrigger,O as AccordionItem,Q as AccordionContent,M as Accordion};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare function AlertDialog({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function AlertDialogTrigger({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function AlertDialogPortal({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Portal>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function AlertDialogOverlay({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Overlay>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare function AlertDialogContent({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare function AlertDialogHeader({ className, ...props }: React.ComponentPropsWithoutRef<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare function AlertDialogFooter({ className, ...props }: React.ComponentPropsWithoutRef<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare function AlertDialogTitle({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Title>): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare function AlertDialogDescription({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Description>): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare function AlertDialogAction({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Action>): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare function AlertDialogCancel({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Cancel>): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
var S=import.meta.require;import{cn as U}from"@contractspec/lib.ui-kit-core/utils";import{Slot as W}from"@radix-ui/react-slot";import{cva as X}from"class-variance-authority";import*as K from"react";import{jsx as Z}from"react/jsx-runtime";var J=X("inline-flex shrink-0 items-center justify-center gap-2 whitespace-nowrap rounded-md font-medium text-sm outline-hidden transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40",outline:"border bg-background shadow-2xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}}),Y=K.forwardRef(({className:q,variant:E,size:L,asChild:M=!1,...Q},R)=>{return Z(M?W:"button",{ref:R,"data-slot":"button",className:U(J({variant:E,size:L,className:q})),...Q})});Y.displayName="Button";import{cn as I}from"@contractspec/lib.ui-kit-core/utils";import*as w from"@radix-ui/react-alert-dialog";import{jsx as G,jsxs as F}from"react/jsx-runtime";function y({...q}){return G(w.Root,{"data-slot":"alert-dialog",...q})}function C({...q}){return G(w.Trigger,{"data-slot":"alert-dialog-trigger",...q})}function _({...q}){return G(w.Portal,{"data-slot":"alert-dialog-portal",...q})}function $({className:q,...E}){return G(w.Overlay,{"data-slot":"alert-dialog-overlay",className:I("data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=open]:animate-in",q),...E})}function V({className:q,...E}){return F(_,{children:[G($,{}),G(w.Content,{"data-slot":"alert-dialog-content",className:I("data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-6 shadow-lg duration-200 data-[state=closed]:animate-out data-[state=open]:animate-in sm:max-w-lg",q),...E})]})}function d({className:q,...E}){return G("div",{"data-slot":"alert-dialog-header",className:I("flex flex-col gap-2 text-center sm:text-left",q),...E})}function v({className:q,...E}){return G("div",{"data-slot":"alert-dialog-footer",className:I("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",q),...E})}function b({className:q,...E}){return G(w.Title,{"data-slot":"alert-dialog-title",className:I("font-semibold text-lg",q),...E})}function A({className:q,...E}){return G(w.Description,{"data-slot":"alert-dialog-description",className:I("text-muted-foreground text-sm",q),...E})}function D({className:q,...E}){return G(w.Action,{className:I(J(),q),...E})}function g({className:q,...E}){return G(w.Cancel,{className:I(J({variant:"outline"}),q),...E})}export{C as AlertDialogTrigger,b as AlertDialogTitle,_ as AlertDialogPortal,$ as AlertDialogOverlay,d as AlertDialogHeader,v as AlertDialogFooter,A as AlertDialogDescription,V as AlertDialogContent,g as AlertDialogCancel,D as AlertDialogAction,y as AlertDialog};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare const alertVariants: (props?: ({
|
|
4
|
+
variant?: "default" | "destructive" | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
|
+
declare function Alert({ className, variant, ...props }: React.ComponentPropsWithoutRef<'div'> & VariantProps<typeof alertVariants>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare function AlertTitle({ className, ...props }: React.ComponentPropsWithoutRef<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare function AlertDescription({ className, ...props }: React.ComponentPropsWithoutRef<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export { Alert, AlertDescription, AlertTitle };
|
package/dist/ui/alert.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
var C=import.meta.require;import{cn as g}from"@contractspec/lib.ui-kit-core/utils";import{cva as z}from"class-variance-authority";import{jsx as q}from"react/jsx-runtime";var B=z("relative grid w-full grid-cols-[0_1fr] items-start gap-y-0.5 rounded-lg border px-4 py-3 text-sm has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] has-[>svg]:gap-x-3 [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 [&>svg]:text-current"}},defaultVariants:{variant:"default"}});function H({className:d,variant:f,...w}){return q("div",{"data-slot":"alert",role:"alert",className:g(B({variant:f}),d),...w})}function I({className:d,...f}){return q("div",{"data-slot":"alert-title",className:g("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",d),...f})}function J({className:d,...f}){return q("div",{"data-slot":"alert-description",className:g("col-start-2 grid justify-items-start gap-1 text-muted-foreground text-sm [&_p]:leading-relaxed",d),...f})}export{I as AlertTitle,J as AlertDescription,H as Alert};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
var _=import.meta.require;import{cn as O}from"@contractspec/lib.ui-kit-core/utils";import*as V from"@radix-ui/react-label";import{jsx as Q}from"react/jsx-runtime";function $({className:e,...g}){return Q(V.Root,{"data-slot":"label",className:O("flex select-none items-center gap-2 font-medium text-sm leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-50 group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50",e),...g})}import{cn as u}from"@contractspec/lib.ui-kit-core/utils";import*as f from"@radix-ui/react-select";import{CheckIcon as W,ChevronDownIcon as q,ChevronUpIcon as X}from"lucide-react";import{jsx as d,jsxs as R}from"react/jsx-runtime";function A({...e}){return d(f.Root,{"data-slot":"select",...e})}function S({...e}){return d(f.Group,{"data-slot":"select-group",...e})}function E({...e}){return d(f.Value,{"data-slot":"select-value",...e})}function H({className:e,size:g="default",children:m,...F}){return R(f.Trigger,{"data-slot":"select-trigger","data-size":g,className:u("flex w-fit items-center justify-between gap-2 whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-2xs outline-hidden transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[size=default]:h-9 data-[size=sm]:h-8 data-placeholder:text-muted-foreground *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 dark:bg-input/30 dark:aria-invalid:ring-destructive/40 dark:hover:bg-input/50 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0",e),...F,children:[m,d(f.Icon,{asChild:!0,children:d(q,{className:"size-4 opacity-50"})})]})}function J({className:e,children:g,position:m="popper",...F}){return d(f.Portal,{children:R(f.Content,{"data-slot":"select-content",className:u("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 relative z-50 max-h-(--radix-select-content-available-height) min-w-32 origin-(--radix-select-content-transform-origin) overflow-y-auto overflow-x-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=closed]:animate-out data-[state=open]:animate-in",m==="popper"&&"data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=bottom]:translate-y-1 data-[side=top]:-translate-y-1",e),position:m,...F,children:[d(Y,{}),d(f.Viewport,{className:u("p-1",m==="popper"&&"h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width) scroll-my-1"),children:g}),d(Z,{})]})})}function U({className:e,...g}){return d(f.Label,{"data-slot":"select-label",className:u("px-2 py-1.5 text-muted-foreground text-xs",e),...g})}function P({className:e,children:g,...m}){return R(f.Item,{"data-slot":"select-item",className:u("relative flex w-full cursor-default select-none items-center gap-2 rounded-xs py-1.5 pr-8 pl-2 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...m,children:[d("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:d(f.ItemIndicator,{children:d(W,{className:"size-4"})})}),d(f.ItemText,{children:g})]})}function B({className:e,...g}){return d(f.Separator,{"data-slot":"select-separator",className:u("pointer-events-none -mx-1 my-1 h-px bg-border",e),...g})}function Y({className:e,...g}){return d(f.ScrollUpButton,{"data-slot":"select-scroll-up-button",className:u("flex cursor-default items-center justify-center py-1",e),...g,children:d(X,{className:"size-4"})})}function Z({className:e,...g}){return d(f.ScrollDownButton,{"data-slot":"select-scroll-down-button",className:u("flex cursor-default items-center justify-center py-1",e),...g,children:d(q,{className:"size-4"})})}import{jsx as b,jsxs as y}from"react/jsx-runtime";var N=({value:e,options:g,onChange:m,placeholder:F="S\xE9lectionner...",label:T,disabled:K=!1,className:L="",showCounts:t=!1})=>{return y("div",{className:`space-y-2 ${L}`,children:[T&&b($,{className:"font-medium text-base text-foreground",children:T}),y(A,{value:e,onValueChange:m,disabled:K,children:[b(H,{className:"w-full",children:b(E,{placeholder:F})}),y(J,{className:"bg-background",children:[y(P,{value:"all",children:["Tous",t&&y("span",{className:"ml-2 text-muted-foreground text-sm",children:["(",g.reduce((v,M)=>v+(M.count||0),0),")"]})]}),g.map((v)=>b(P,{value:v.value,children:y("div",{className:"flex w-full items-center justify-between",children:[b("span",{children:v.label}),t&&v.count!==void 0&&y("span",{className:"ml-2 text-muted-foreground text-sm",children:["(",v.count,")"]})]})},v.value))]})]})]})};export{N as FilterSelect};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
var k=import.meta.require;import{cn as M}from"@contractspec/lib.ui-kit-core/utils";import*as O from"@radix-ui/react-label";import{jsx as Q}from"react/jsx-runtime";function V({className:f,...m}){return Q(O.Root,{"data-slot":"label",className:M("flex select-none items-center gap-2 font-medium text-sm leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-50 group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50",f),...m})}import{cn as g}from"@contractspec/lib.ui-kit-core/utils";import*as e from"@radix-ui/react-select";import{CheckIcon as W,ChevronDownIcon as $,ChevronUpIcon as X}from"lucide-react";import{jsx as t,jsxs as b}from"react/jsx-runtime";function q({...f}){return t(e.Root,{"data-slot":"select",...f})}function I({...f}){return t(e.Group,{"data-slot":"select-group",...f})}function A({...f}){return t(e.Value,{"data-slot":"select-value",...f})}function E({className:f,size:m="default",children:d,...F}){return b(e.Trigger,{"data-slot":"select-trigger","data-size":m,className:g("flex w-fit items-center justify-between gap-2 whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-2xs outline-hidden transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[size=default]:h-9 data-[size=sm]:h-8 data-placeholder:text-muted-foreground *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 dark:bg-input/30 dark:aria-invalid:ring-destructive/40 dark:hover:bg-input/50 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0",f),...F,children:[d,t(e.Icon,{asChild:!0,children:t($,{className:"size-4 opacity-50"})})]})}function H({className:f,children:m,position:d="popper",...F}){return t(e.Portal,{children:b(e.Content,{"data-slot":"select-content",className:g("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 relative z-50 max-h-(--radix-select-content-available-height) min-w-32 origin-(--radix-select-content-transform-origin) overflow-y-auto overflow-x-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=closed]:animate-out data-[state=open]:animate-in",d==="popper"&&"data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=bottom]:translate-y-1 data-[side=top]:-translate-y-1",f),position:d,...F,children:[t(Y,{}),t(e.Viewport,{className:g("p-1",d==="popper"&&"h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width) scroll-my-1"),children:m}),t(Z,{})]})})}function U({className:f,...m}){return t(e.Label,{"data-slot":"select-label",className:g("px-2 py-1.5 text-muted-foreground text-xs",f),...m})}function P({className:f,children:m,...d}){return b(e.Item,{"data-slot":"select-item",className:g("relative flex w-full cursor-default select-none items-center gap-2 rounded-xs py-1.5 pr-8 pl-2 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",f),...d,children:[t("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:t(e.ItemIndicator,{children:t(W,{className:"size-4"})})}),t(e.ItemText,{children:m})]})}function B({className:f,...m}){return t(e.Separator,{"data-slot":"select-separator",className:g("pointer-events-none -mx-1 my-1 h-px bg-border",f),...m})}function Y({className:f,...m}){return t(e.ScrollUpButton,{"data-slot":"select-scroll-up-button",className:g("flex cursor-default items-center justify-center py-1",f),...m,children:t(X,{className:"size-4"})})}function Z({className:f,...m}){return t(e.ScrollDownButton,{"data-slot":"select-scroll-down-button",className:g("flex cursor-default items-center justify-center py-1",f),...m,children:t($,{className:"size-4"})})}import{jsx as v,jsxs as y}from"react/jsx-runtime";var _=({value:f,options:m,onChange:d,placeholder:F="S\xE9lectionner...",label:R,disabled:J=!1,className:K="",showCounts:T=!1})=>{return y("div",{className:`space-y-2 ${K}`,children:[R&&v(V,{className:"font-medium text-base text-foreground",children:R}),y(q,{value:f,onValueChange:d,disabled:J,children:[v(E,{className:"w-full",children:v(A,{placeholder:F})}),y(H,{className:"bg-background",children:[y(P,{value:"all",children:["Tous",T&&y("span",{className:"ml-2 text-muted-foreground text-sm",children:["(",m.reduce((u,L)=>u+(L.count||0),0),")"]})]}),m.map((u)=>v(P,{value:u.value,children:y("div",{className:"flex w-full items-center justify-between",children:[v("span",{children:u.label}),T&&u.count!==void 0&&y("span",{className:"ml-2 text-muted-foreground text-sm",children:["(",u.count,")"]})]})},u.value))]})]})]})};export{_ as FilterSelect};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
// @bun
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface LoadingSpinnerProps {
|
|
3
|
+
size?: 'sm' | 'md' | 'lg' | 'xl';
|
|
4
|
+
className?: string;
|
|
5
|
+
text?: string;
|
|
6
|
+
fullScreen?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare const LoadingSpinner: React.FC<LoadingSpinnerProps>;
|
|
9
|
+
export declare const SkeletonLine: React.FC<{
|
|
10
|
+
className?: string;
|
|
11
|
+
}>;
|
|
12
|
+
export declare const SkeletonCard: React.FC<{
|
|
13
|
+
className?: string;
|
|
14
|
+
}>;
|
|
15
|
+
export declare const SkeletonTable: React.FC<{
|
|
16
|
+
rows?: number;
|
|
17
|
+
cols?: number;
|
|
18
|
+
}>;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
var F=import.meta.require;import{clsx as A}from"clsx";import{twMerge as B}from"tailwind-merge";function y(...p){return B(A(p))}import{Loader2 as D}from"lucide-react";import{jsx as V,jsxs as q}from"react/jsx-runtime";var E={sm:"h-4 w-4",md:"h-6 w-6",lg:"h-8 w-8",xl:"h-12 w-12"},P=({size:p="md",className:M,text:f,fullScreen:g=!1})=>{let h=q("div",{className:y("flex flex-col items-center justify-center gap-2",M),children:[V(D,{className:y("animate-spin text-primary-600",E[p])}),f&&V("p",{className:"animate-pulse text-base text-gray-600",children:f})]});if(g)return V("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-white/80 backdrop-blur-xs",children:h});return h},C=({className:p})=>V("div",{className:y("h-4 animate-pulse rounded-xs bg-gray-200",p)}),Q=({className:p})=>q("div",{className:y("animate-pulse space-y-3 rounded-lg bg-gray-200 p-4",p),children:[V(C,{className:"h-6 w-3/4"}),V(C,{className:"h-4 w-full"}),V(C,{className:"h-4 w-2/3"})]}),R=({rows:p=5,cols:M=4})=>V("div",{className:"space-y-3",children:Array.from({length:p}).map((f,g)=>V("div",{className:"flex space-x-4",children:Array.from({length:M}).map((h,v)=>V(C,{className:"flex-1"},v))},g))});export{R as SkeletonTable,C as SkeletonLine,Q as SkeletonCard,P as LoadingSpinner};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { LoadingSpinner, SkeletonCard, SkeletonLine, SkeletonTable, } from './LoadingSpinner';
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
var S=import.meta.require;import{cn as J}from"@contractspec/lib.ui-kit-core/utils";import{Slot as K}from"@radix-ui/react-slot";import{cva as O}from"class-variance-authority";import*as t from"react";import{jsx as V}from"react/jsx-runtime";var Q=O("inline-flex shrink-0 items-center justify-center gap-2 whitespace-nowrap rounded-md font-medium text-sm outline-hidden transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40",outline:"border bg-background shadow-2xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}}),k=t.forwardRef(({className:m,variant:d,size:n,asChild:y=!1,...u},h)=>{return V(y?K:"button",{ref:h,"data-slot":"button",className:J(Q({variant:d,size:n,className:m})),...u})});k.displayName="Button";import{cn as N}from"@contractspec/lib.ui-kit-core/utils";import*as f from"@radix-ui/react-select";import{CheckIcon as W,ChevronDownIcon as z,ChevronUpIcon as X}from"lucide-react";import{jsx as i,jsxs as A}from"react/jsx-runtime";function C({...m}){return i(f.Root,{"data-slot":"select",...m})}function j({...m}){return i(f.Group,{"data-slot":"select-group",...m})}function F({...m}){return i(f.Value,{"data-slot":"select-value",...m})}function G({className:m,size:d="default",children:n,...y}){return A(f.Trigger,{"data-slot":"select-trigger","data-size":d,className:N("flex w-fit items-center justify-between gap-2 whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-2xs outline-hidden transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[size=default]:h-9 data-[size=sm]:h-8 data-placeholder:text-muted-foreground *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 dark:bg-input/30 dark:aria-invalid:ring-destructive/40 dark:hover:bg-input/50 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0",m),...y,children:[n,i(f.Icon,{asChild:!0,children:i(z,{className:"size-4 opacity-50"})})]})}function L({className:m,children:d,position:n="popper",...y}){return i(f.Portal,{children:A(f.Content,{"data-slot":"select-content",className:N("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 relative z-50 max-h-(--radix-select-content-available-height) min-w-32 origin-(--radix-select-content-transform-origin) overflow-y-auto overflow-x-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=closed]:animate-out data-[state=open]:animate-in",n==="popper"&&"data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=bottom]:translate-y-1 data-[side=top]:-translate-y-1",m),position:n,...y,children:[i(Y,{}),i(f.Viewport,{className:N("p-1",n==="popper"&&"h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width) scroll-my-1"),children:d}),i(Z,{})]})})}function mm({className:m,...d}){return i(f.Label,{"data-slot":"select-label",className:N("px-2 py-1.5 text-muted-foreground text-xs",m),...d})}function M({className:m,children:d,...n}){return A(f.Item,{"data-slot":"select-item",className:N("relative flex w-full cursor-default select-none items-center gap-2 rounded-xs py-1.5 pr-8 pl-2 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",m),...n,children:[i("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:i(f.ItemIndicator,{children:i(W,{className:"size-4"})})}),i(f.ItemText,{children:d})]})}function fm({className:m,...d}){return i(f.Separator,{"data-slot":"select-separator",className:N("pointer-events-none -mx-1 my-1 h-px bg-border",m),...d})}function Y({className:m,...d}){return i(f.ScrollUpButton,{"data-slot":"select-scroll-up-button",className:N("flex cursor-default items-center justify-center py-1",m),...d,children:i(X,{className:"size-4"})})}function Z({className:m,...d}){return i(f.ScrollDownButton,{"data-slot":"select-scroll-down-button",className:N("flex cursor-default items-center justify-center py-1",m),...d,children:i(z,{className:"size-4"})})}import{ChevronLeft as I,ChevronRight as D,ChevronsLeft as U,ChevronsRight as r}from"lucide-react";import{jsx as e,jsxs as w}from"react/jsx-runtime";var ym=({currentPage:m,totalPages:d,totalItems:n,itemsPerPage:y,onPageChange:u,onItemsPerPageChange:h,disabled:b=!1,className:T="",showItemsPerPage:_=!0,itemsPerPageOptions:q=[10,25,50,100]})=>{let B=(m-1)*y+1,E=Math.min(m*y,n),l=m>1&&!b,$=m<d&&!b,H=()=>{if(d<=7)return Array.from({length:d},(v,R)=>R+1);if(m<=3)return[1,2,3,4,5,-1,d];if(m>=d-2)return[1,-1,d-4,d-3,d-2,d-1,d];return[1,-1,m-1,m,m+1,-1,d]};if(d===0)return null;return w("div",{className:`flex flex-col items-center justify-between gap-4 sm:flex-row ${T}`,children:[w("div",{className:"order-2 text-base text-muted-foreground sm:order-1",children:["Affichage de ",B," \xE0 ",E," sur ",n," r\xE9sultats"]}),w("div",{className:"order-1 flex items-center gap-2 sm:order-2",children:[w(k,{variant:"outline",size:"sm",onClick:()=>u(1),disabled:!l,className:"hidden h-8 w-8 p-0 sm:flex",children:[e(U,{className:"h-4 w-4"}),e("span",{className:"sr-only",children:"Premi\xE8re page"})]}),w(k,{variant:"outline",size:"sm",onClick:()=>u(m-1),disabled:!l,className:"h-8 w-8 p-0",children:[e(I,{className:"h-4 w-4"}),e("span",{className:"sr-only",children:"Page pr\xE9c\xE9dente"})]}),e("div",{className:"flex items-center gap-1",children:H().map((v,R)=>{if(v===-1)return e("span",{className:"px-2 py-1 text-muted-foreground",children:"..."},`ellipsis-${R}`);return e(k,{variant:v===m?"default":"outline",size:"sm",onClick:()=>u(v),disabled:b,className:"h-8 min-w-8 px-2",children:v},v)})}),w(k,{variant:"outline",size:"sm",onClick:()=>u(m+1),disabled:!$,className:"h-8 w-8 p-0",children:[e(D,{className:"h-4 w-4"}),e("span",{className:"sr-only",children:"Page suivante"})]}),w(k,{variant:"outline",size:"sm",onClick:()=>u(d),disabled:!$,className:"hidden h-8 w-8 p-0 sm:flex",children:[e(r,{className:"h-4 w-4"}),e("span",{className:"sr-only",children:"Derni\xE8re page"})]})]}),_&&h&&w("div",{className:"order-3 flex items-center gap-2 text-base",children:[e("span",{className:"text-muted-foreground",children:"Afficher:"}),w(C,{value:y.toString(),onValueChange:(v)=>h(parseInt(v)),disabled:b,children:[e(G,{className:"h-8 w-16",children:e(F,{})}),e(L,{className:"bg-background",children:q.map((v)=>e(M,{value:v.toString(),children:v},v))})]})]})]})};export{ym as Pagination};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
var S=import.meta.require;import{cn as H}from"@contractspec/lib.ui-kit-core/utils";import{Slot as J}from"@radix-ui/react-slot";import{cva as K}from"class-variance-authority";import*as $ from"react";import{jsx as Q}from"react/jsx-runtime";var O=K("inline-flex shrink-0 items-center justify-center gap-2 whitespace-nowrap rounded-md font-medium text-sm outline-hidden transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40",outline:"border bg-background shadow-2xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}}),u=$.forwardRef(({className:m,variant:i,size:n,asChild:y=!1,...t},b)=>{return Q(y?J:"button",{ref:b,"data-slot":"button",className:H(O({variant:i,size:n,className:m})),...t})});u.displayName="Button";import{cn as N}from"@contractspec/lib.ui-kit-core/utils";import*as f from"@radix-ui/react-select";import{CheckIcon as V,ChevronDownIcon as r,ChevronUpIcon as W}from"lucide-react";import{jsx as d,jsxs as R}from"react/jsx-runtime";function z({...m}){return d(f.Root,{"data-slot":"select",...m})}function mm({...m}){return d(f.Group,{"data-slot":"select-group",...m})}function C({...m}){return d(f.Value,{"data-slot":"select-value",...m})}function F({className:m,size:i="default",children:n,...y}){return R(f.Trigger,{"data-slot":"select-trigger","data-size":i,className:N("flex w-fit items-center justify-between gap-2 whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-2xs outline-hidden transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[size=default]:h-9 data-[size=sm]:h-8 data-placeholder:text-muted-foreground *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 dark:bg-input/30 dark:aria-invalid:ring-destructive/40 dark:hover:bg-input/50 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0",m),...y,children:[n,d(f.Icon,{asChild:!0,children:d(r,{className:"size-4 opacity-50"})})]})}function G({className:m,children:i,position:n="popper",...y}){return d(f.Portal,{children:R(f.Content,{"data-slot":"select-content",className:N("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 relative z-50 max-h-(--radix-select-content-available-height) min-w-32 origin-(--radix-select-content-transform-origin) overflow-y-auto overflow-x-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=closed]:animate-out data-[state=open]:animate-in",n==="popper"&&"data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=bottom]:translate-y-1 data-[side=top]:-translate-y-1",m),position:n,...y,children:[d(X,{}),d(f.Viewport,{className:N("p-1",n==="popper"&&"h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width) scroll-my-1"),children:i}),d(Y,{})]})})}function fm({className:m,...i}){return d(f.Label,{"data-slot":"select-label",className:N("px-2 py-1.5 text-muted-foreground text-xs",m),...i})}function L({className:m,children:i,...n}){return R(f.Item,{"data-slot":"select-item",className:N("relative flex w-full cursor-default select-none items-center gap-2 rounded-xs py-1.5 pr-8 pl-2 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",m),...n,children:[d("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:d(f.ItemIndicator,{children:d(V,{className:"size-4"})})}),d(f.ItemText,{children:i})]})}function im({className:m,...i}){return d(f.Separator,{"data-slot":"select-separator",className:N("pointer-events-none -mx-1 my-1 h-px bg-border",m),...i})}function X({className:m,...i}){return d(f.ScrollUpButton,{"data-slot":"select-scroll-up-button",className:N("flex cursor-default items-center justify-center py-1",m),...i,children:d(W,{className:"size-4"})})}function Y({className:m,...i}){return d(f.ScrollDownButton,{"data-slot":"select-scroll-down-button",className:N("flex cursor-default items-center justify-center py-1",m),...i,children:d(r,{className:"size-4"})})}import{ChevronLeft as Z,ChevronRight as I,ChevronsLeft as D,ChevronsRight as U}from"lucide-react";import{jsx as e,jsxs as w}from"react/jsx-runtime";var a=({currentPage:m,totalPages:i,totalItems:n,itemsPerPage:y,onPageChange:t,onItemsPerPageChange:b,disabled:k=!1,className:M="",showItemsPerPage:T=!0,itemsPerPageOptions:_=[10,25,50,100]})=>{let q=(m-1)*y+1,B=Math.min(m*y,n),A=m>1&&!k,l=m<i&&!k,E=()=>{if(i<=7)return Array.from({length:i},(v,h)=>h+1);if(m<=3)return[1,2,3,4,5,-1,i];if(m>=i-2)return[1,-1,i-4,i-3,i-2,i-1,i];return[1,-1,m-1,m,m+1,-1,i]};if(i===0)return null;return w("div",{className:`flex flex-col items-center justify-between gap-4 sm:flex-row ${M}`,children:[w("div",{className:"order-2 text-base text-muted-foreground sm:order-1",children:["Affichage de ",q," \xE0 ",B," sur ",n," r\xE9sultats"]}),w("div",{className:"order-1 flex items-center gap-2 sm:order-2",children:[w(u,{variant:"outline",size:"sm",onClick:()=>t(1),disabled:!A,className:"hidden h-8 w-8 p-0 sm:flex",children:[e(D,{className:"h-4 w-4"}),e("span",{className:"sr-only",children:"Premi\xE8re page"})]}),w(u,{variant:"outline",size:"sm",onClick:()=>t(m-1),disabled:!A,className:"h-8 w-8 p-0",children:[e(Z,{className:"h-4 w-4"}),e("span",{className:"sr-only",children:"Page pr\xE9c\xE9dente"})]}),e("div",{className:"flex items-center gap-1",children:E().map((v,h)=>{if(v===-1)return e("span",{className:"px-2 py-1 text-muted-foreground",children:"..."},`ellipsis-${h}`);return e(u,{variant:v===m?"default":"outline",size:"sm",onClick:()=>t(v),disabled:k,className:"h-8 min-w-8 px-2",children:v},v)})}),w(u,{variant:"outline",size:"sm",onClick:()=>t(m+1),disabled:!l,className:"h-8 w-8 p-0",children:[e(I,{className:"h-4 w-4"}),e("span",{className:"sr-only",children:"Page suivante"})]}),w(u,{variant:"outline",size:"sm",onClick:()=>t(i),disabled:!l,className:"hidden h-8 w-8 p-0 sm:flex",children:[e(U,{className:"h-4 w-4"}),e("span",{className:"sr-only",children:"Derni\xE8re page"})]})]}),T&&b&&w("div",{className:"order-3 flex items-center gap-2 text-base",children:[e("span",{className:"text-muted-foreground",children:"Afficher:"}),w(z,{value:y.toString(),onValueChange:(v)=>b(parseInt(v)),disabled:k,children:[e(F,{className:"h-8 w-16",children:e(C,{})}),e(G,{className:"bg-background",children:_.map((v)=>e(L,{value:v.toString(),children:v},v))})]})]})]})};export{a as Pagination};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
// @bun
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
var b=import.meta.require;import{cn as u}from"@contractspec/lib.ui-kit-core/utils";import{Slot as y}from"@radix-ui/react-slot";import{cva as c}from"class-variance-authority";import*as d from"react";import{jsx as N}from"react/jsx-runtime";var w=c("inline-flex shrink-0 items-center justify-center gap-2 whitespace-nowrap rounded-md font-medium text-sm outline-hidden transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40",outline:"border bg-background shadow-2xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}}),h=d.forwardRef(({className:e,variant:o,size:l,asChild:r=!1,...m},n)=>{return N(r?y:"button",{ref:n,"data-slot":"button",className:u(w({variant:o,size:l,className:e})),...m})});h.displayName="Button";import{cn as s}from"@contractspec/lib.ui-kit-core/utils";import{jsx as I}from"react/jsx-runtime";function f({className:e,type:o,ref:l,...r}){return I("input",{ref:l,type:o,"data-slot":"input",className:s("h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs outline-none transition-[color,box-shadow] selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:font-medium file:text-foreground file:text-sm placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30","focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50","aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",e),...r})}import{Search as R,X as S}from"lucide-react";import{jsx as t,jsxs as p}from"react/jsx-runtime";var H=({value:e,onChange:o,placeholder:l="Rechercher...",onClear:r,disabled:m=!1,className:n="",autoFocus:a=!1})=>{let v=()=>{o(""),r?.()};return p("div",{className:`relative w-full ${n}`,children:[t("div",{className:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3",children:t(R,{className:"h-4 w-4 text-muted-foreground"})}),t(f,{type:"text",value:e,onChange:(g)=>o(g.target.value),placeholder:l,disabled:m,autoFocus:a,className:"pr-10 pl-10"}),e&&t("div",{className:"absolute inset-y-0 right-0 flex items-center pr-3",children:p(h,{type:"button",variant:"ghost",size:"sm",onClick:v,disabled:m,className:"h-6 w-6 p-0 hover:bg-transparent",children:[t(S,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"}),t("span",{className:"sr-only",children:"Effacer la recherche"})]})})]})};export{H as SearchInput};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
var b=import.meta.require;import{cn as g}from"@contractspec/lib.ui-kit-core/utils";import{Slot as y}from"@radix-ui/react-slot";import{cva as c}from"class-variance-authority";import*as a from"react";import{jsx as I}from"react/jsx-runtime";var s=c("inline-flex shrink-0 items-center justify-center gap-2 whitespace-nowrap rounded-md font-medium text-sm outline-hidden transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40",outline:"border bg-background shadow-2xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}}),n=a.forwardRef(({className:e,variant:o,size:r,asChild:p=!1,...l},m)=>{return I(p?y:"button",{ref:m,"data-slot":"button",className:g(s({variant:o,size:r,className:e})),...l})});n.displayName="Button";import{cn as S}from"@contractspec/lib.ui-kit-core/utils";import{jsx as w}from"react/jsx-runtime";function f({className:e,type:o,ref:r,...p}){return w("input",{ref:r,type:o,"data-slot":"input",className:S("h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs outline-none transition-[color,box-shadow] selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:font-medium file:text-foreground file:text-sm placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30","focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50","aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",e),...p})}import{Search as N,X as P}from"lucide-react";import{jsx as t,jsxs as d}from"react/jsx-runtime";var R=({value:e,onChange:o,placeholder:r="Rechercher...",onClear:p,disabled:l=!1,className:m="",autoFocus:h=!1})=>{let u=()=>{o(""),p?.()};return d("div",{className:`relative w-full ${m}`,children:[t("div",{className:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3",children:t(N,{className:"h-4 w-4 text-muted-foreground"})}),t(f,{type:"text",value:e,onChange:(v)=>o(v.target.value),placeholder:r,disabled:l,autoFocus:h,className:"pr-10 pl-10"}),e&&t("div",{className:"absolute inset-y-0 right-0 flex items-center pr-3",children:d(n,{type:"button",variant:"ghost",size:"sm",onClick:u,disabled:l,className:"h-6 w-6 p-0 hover:bg-transparent",children:[t(P,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"}),t("span",{className:"sr-only",children:"Effacer la recherche"})]})})]})};export{R as SearchInput};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
// @bun
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as AvatarPrimitive from '@radix-ui/react-avatar';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare function Avatar({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function AvatarImage({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Image>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function AvatarFallback({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Fallback>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export { Avatar, AvatarFallback, AvatarImage };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
var m=import.meta.require;import{clsx as o}from"clsx";import{twMerge as l}from"tailwind-merge";function r(...a){return l(o(a))}import*as t from"@radix-ui/react-avatar";import{jsx as i}from"react/jsx-runtime";function u({className:a,...e}){return i(t.Root,{"data-slot":"avatar",className:r("relative flex size-8 shrink-0 overflow-hidden rounded-full",a),...e})}function p({className:a,...e}){return i(t.Image,{"data-slot":"avatar-image",className:r("aspect-square size-full",a),...e})}function d({className:a,...e}){return i(t.Fallback,{"data-slot":"avatar-fallback",className:r("flex size-full items-center justify-center rounded-full bg-muted",a),...e})}export{p as AvatarImage,d as AvatarFallback,u as Avatar};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare const badgeVariants: (props?: ({
|
|
4
|
+
variant?: "default" | "destructive" | "outline" | "secondary" | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
|
+
declare function Badge({ className, variant, asChild, ...props }: React.ComponentPropsWithoutRef<'span'> & VariantProps<typeof badgeVariants> & {
|
|
7
|
+
asChild?: boolean;
|
|
8
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export { Badge, badgeVariants };
|
package/dist/ui/badge.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
var I=import.meta.require;import{cn as A}from"@contractspec/lib.ui-kit-core/utils";import{Slot as D}from"@radix-ui/react-slot";import{cva as E}from"class-variance-authority";import{jsx as G}from"react/jsx-runtime";var F=E("inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden whitespace-nowrap rounded-md border px-2 py-0.5 font-medium text-xs transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40 [a&]:hover:bg-destructive/90",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function O({className:f,variant:q,asChild:w=!1,...z}){return G(w?D:"span",{"data-slot":"badge",className:A(F({variant:q}),f),...z})}export{F as badgeVariants,O as Badge};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
declare function Breadcrumb({ ...props }: React.ComponentPropsWithoutRef<'nav'>): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare function BreadcrumbList({ className, ...props }: React.ComponentPropsWithoutRef<'ol'>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function BreadcrumbItem({ className, ...props }: React.ComponentPropsWithoutRef<'li'>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function BreadcrumbLink({ asChild, className, ...props }: React.ComponentPropsWithoutRef<'a'> & {
|
|
6
|
+
asChild?: boolean;
|
|
7
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare function BreadcrumbPage({ className, ...props }: React.ComponentPropsWithoutRef<'span'>): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare function BreadcrumbSeparator({ children, className, ...props }: React.ComponentPropsWithoutRef<'li'>): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare function BreadcrumbEllipsis({ className, ...props }: React.ComponentPropsWithoutRef<'span'>): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
var O=import.meta.require;import{cn as y}from"@contractspec/lib.ui-kit-core/utils";import{Slot as D}from"@radix-ui/react-slot";import{ChevronRight as F,MoreHorizontal as G}from"lucide-react";import{jsx as w,jsxs as J}from"react/jsx-runtime";function W({...f}){return w("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",...f})}function X({className:f,...q}){return w("ol",{"data-slot":"breadcrumb-list",className:y("flex flex-wrap items-center gap-1.5 break-words text-muted-foreground text-sm sm:gap-2.5",f),...q})}function Y({className:f,...q}){return w("li",{"data-slot":"breadcrumb-item",className:y("inline-flex items-center gap-1.5",f),...q})}function Z({asChild:f,className:q,...A}){return w(f?D:"a",{"data-slot":"breadcrumb-link",className:y("transition-colors hover:text-foreground",q),...A})}function _({className:f,...q}){return w("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:y("font-normal text-foreground",f),...q})}function $({children:f,className:q,...A}){return w("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:y("[&>svg]:size-3.5",q),...A,children:f??w(F,{})})}function v({className:f,...q}){return J("span",{"data-slot":"breadcrumb-ellipsis",role:"presentation","aria-hidden":"true",className:y("flex size-9 items-center justify-center",f),...q,children:[w(G,{className:"size-4"}),w("span",{className:"sr-only",children:"More"})]})}export{$ as BreadcrumbSeparator,_ as BreadcrumbPage,X as BreadcrumbList,Z as BreadcrumbLink,Y as BreadcrumbItem,v as BreadcrumbEllipsis,W as Breadcrumb};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
export interface ButtonGroupProps extends React.ComponentPropsWithoutRef<'div'> {
|
|
3
|
+
orientation?: 'horizontal' | 'vertical';
|
|
4
|
+
}
|
|
5
|
+
export declare function ButtonGroup({ className, orientation, ...props }: ButtonGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
var v=import.meta.require;import{cn as h}from"@contractspec/lib.ui-kit-core/utils";import{jsx as q}from"react/jsx-runtime";function z({className:d,orientation:f="horizontal",...g}){return q("div",{"data-slot":"button-group","data-orientation":f,className:h("inline-flex items-stretch overflow-hidden rounded-md","data-[orientation=horizontal]:flex-row data-[orientation=vertical]:flex-col","[&>[data-slot=button]:not(:first-child)]:rounded-none","[&>[data-slot=button]:first-child:not(:last-child)]:rounded-r-none","[&>[data-slot=button]:last-child:not(:first-child)]:rounded-l-none","[&>[data-slot=button]:not(:last-child)]:border-r-0","data-[orientation=vertical]:[&>[data-slot=button]:not(:last-child)]:border-r","data-[orientation=vertical]:[&>[data-slot=button]:not(:last-child)]:border-b-0","data-[orientation=vertical]:[&>[data-slot=button]:first-child:not(:last-child)]:rounded-b-none","data-[orientation=vertical]:[&>[data-slot=button]:last-child:not(:first-child)]:rounded-t-none",d),...g})}export{z as ButtonGroup};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { SharedButtonProps } from '@contractspec/lib.ui-kit-core/interfaces';
|
|
2
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
declare const buttonVariants: (props?: ({
|
|
5
|
+
variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
|
|
6
|
+
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
7
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
|
+
export type ButtonProps = SharedButtonProps & React.ComponentPropsWithoutRef<'button'> & VariantProps<typeof buttonVariants> & {
|
|
9
|
+
asChild?: boolean;
|
|
10
|
+
};
|
|
11
|
+
declare const Button: React.ForwardRefExoticComponent<SharedButtonProps & Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & VariantProps<(props?: ({
|
|
12
|
+
variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
|
|
13
|
+
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
14
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string> & {
|
|
15
|
+
asChild?: boolean;
|
|
16
|
+
} & React.RefAttributes<HTMLButtonElement>>;
|
|
17
|
+
export { Button, buttonVariants };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
var O=import.meta.require;import{cn as G}from"@contractspec/lib.ui-kit-core/utils";import{Slot as H}from"@radix-ui/react-slot";import{cva as I}from"class-variance-authority";import*as g from"react";import{jsx as L}from"react/jsx-runtime";var J=I("inline-flex shrink-0 items-center justify-center gap-2 whitespace-nowrap rounded-md font-medium text-sm outline-hidden transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40",outline:"border bg-background shadow-2xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}}),K=g.forwardRef(({className:q,variant:w,size:A,asChild:D=!1,...E},F)=>{return L(D?H:"button",{ref:F,"data-slot":"button",className:G(J({variant:w,size:A,className:q})),...E})});K.displayName="Button";export{J as buttonVariants,K as Button};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { DayButton, DayPicker } from 'react-day-picker';
|
|
3
|
+
import { Button } from './button';
|
|
4
|
+
declare function Calendar({ className, classNames, showOutsideDays, captionLayout, buttonVariant, formatters, components, ...props }: React.ComponentProps<typeof DayPicker> & {
|
|
5
|
+
buttonVariant?: React.ComponentProps<typeof Button>['variant'];
|
|
6
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare function CalendarDayButton({ className, day, modifiers, ...props }: React.ComponentProps<typeof DayButton>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export { Calendar, CalendarDayButton };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
var L=import.meta.require;import{cn as S}from"@contractspec/lib.ui-kit-core/utils";import{Slot as z}from"@radix-ui/react-slot";import{cva as O}from"class-variance-authority";import*as _ from"react";import{jsx as g}from"react/jsx-runtime";var W=O("inline-flex shrink-0 items-center justify-center gap-2 whitespace-nowrap rounded-md font-medium text-sm outline-hidden transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40",outline:"border bg-background shadow-2xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}}),Y=_.forwardRef(({className:Q,variant:T,size:E,asChild:H=!1,...J},K)=>{return g(H?z:"button",{ref:K,"data-slot":"button",className:S(W({variant:T,size:E,className:Q})),...J})});Y.displayName="Button";import{cn as q}from"@contractspec/lib.ui-kit-core/utils";import{ChevronDownIcon as w,ChevronLeftIcon as I,ChevronRightIcon as R}from"lucide-react";import*as X from"react";import{DayPicker as k,getDefaultClassNames as $}from"react-day-picker";import{jsx as G}from"react/jsx-runtime";function f({className:Q,classNames:T,showOutsideDays:E=!0,captionLayout:H="label",buttonVariant:J="ghost",formatters:K,components:Z,...P}){let A=$();return G(k,{showOutsideDays:E,className:q("group/calendar bg-background in-data-[slot=card-content]:bg-transparent in-data-[slot=popover-content]:bg-transparent p-3 [--cell-size:--spacing(8)]",String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,Q),captionLayout:H,formatters:{formatMonthDropdown:(F)=>F.toLocaleString("default",{month:"short"}),...K},classNames:{root:q("w-fit",A.root),months:q("relative flex flex-col gap-4 md:flex-row",A.months),month:q("flex w-full flex-col gap-4",A.month),nav:q("absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1",A.nav),button_previous:q(W({variant:J}),"size-(--cell-size) select-none p-0 aria-disabled:opacity-50",A.button_previous),button_next:q(W({variant:J}),"size-(--cell-size) select-none p-0 aria-disabled:opacity-50",A.button_next),month_caption:q("flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)",A.month_caption),dropdowns:q("flex h-(--cell-size) w-full items-center justify-center gap-1.5 font-medium text-sm",A.dropdowns),dropdown_root:q("relative rounded-md border border-input shadow-2xs has-focus:border-ring has-focus:ring-[3px] has-focus:ring-ring/50",A.dropdown_root),dropdown:q("absolute inset-0 bg-popover opacity-0",A.dropdown),caption_label:q("select-none font-medium",H==="label"?"text-sm":"flex h-8 items-center gap-1 rounded-md pr-1 pl-2 text-sm [&>svg]:size-3.5 [&>svg]:text-muted-foreground",A.caption_label),table:"w-full border-collapse",weekdays:q("flex",A.weekdays),weekday:q("flex-1 select-none rounded-md font-normal text-[0.8rem] text-muted-foreground",A.weekday),week:q("mt-2 flex w-full",A.week),week_number_header:q("w-(--cell-size) select-none",A.week_number_header),week_number:q("select-none text-[0.8rem] text-muted-foreground",A.week_number),day:q("group/day relative aspect-square h-full w-full select-none p-0 text-center [&:first-child[data-selected=true]_button]:rounded-l-md [&:last-child[data-selected=true]_button]:rounded-r-md",A.day),range_start:q("rounded-l-md bg-accent",A.range_start),range_middle:q("rounded-none",A.range_middle),range_end:q("rounded-r-md bg-accent",A.range_end),today:q("rounded-md bg-accent text-accent-foreground data-[selected=true]:rounded-none",A.today),outside:q("text-muted-foreground aria-selected:text-muted-foreground",A.outside),disabled:q("text-muted-foreground opacity-50",A.disabled),hidden:q("invisible",A.hidden),...T},components:{Root:({className:F,rootRef:M,...U})=>{return G("div",{"data-slot":"calendar",ref:M,className:q(F),...U})},Chevron:({className:F,orientation:M,...U})=>{if(M==="left")return G(I,{className:q("size-4",F),...U});if(M==="right")return G(R,{className:q("size-4",F),...U});return G(w,{className:q("size-4",F),...U})},DayButton:B,WeekNumber:({children:F,...M})=>{return G("td",{...M,children:G("div",{className:"flex size-(--cell-size) items-center justify-center text-center",children:F})})},...Z},...P})}function B({className:Q,day:T,modifiers:E,...H}){let J=$(),K=X.useRef(null);return X.useEffect(()=>{if(E.focused)K.current?.focus()},[E.focused]),G(Y,{ref:K,variant:"ghost",size:"icon","data-day":T.date.toLocaleDateString(),"data-selected-single":E.selected&&!E.range_start&&!E.range_end&&!E.range_middle,"data-range-start":E.range_start,"data-range-end":E.range_end,"data-range-middle":E.range_middle,className:q("flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 font-normal leading-none data-[range-end=true]:rounded-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-start=true]:rounded-l-md data-[range-end=true]:bg-primary data-[range-middle=true]:bg-accent data-[range-start=true]:bg-primary data-[selected-single=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-middle=true]:text-accent-foreground data-[range-start=true]:text-primary-foreground data-[selected-single=true]:text-primary-foreground group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-[3px] group-data-[focused=true]/day:ring-ring/50 dark:hover:text-accent-foreground [&>span]:text-xs [&>span]:opacity-70",J.day,Q),...H})}export{B as CalendarDayButton,f as Calendar};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
declare function Card({ className, ...props }: React.ComponentPropsWithoutRef<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare function CardHeader({ className, ...props }: React.ComponentPropsWithoutRef<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function CardTitle({ className, ...props }: React.ComponentPropsWithoutRef<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function CardDescription({ className, ...props }: React.ComponentPropsWithoutRef<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function CardAction({ className, ...props }: React.ComponentPropsWithoutRef<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare function CardContent({ className, ...props }: React.ComponentPropsWithoutRef<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare function CardFooter({ className, ...props }: React.ComponentPropsWithoutRef<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, };
|
package/dist/ui/card.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
var v=import.meta.require;import{cn as h}from"@contractspec/lib.ui-kit-core/utils";import{jsx as q}from"react/jsx-runtime";function z({className:f,...g}){return q("div",{"data-slot":"card",className:h("flex flex-col gap-6 rounded-xl border bg-card py-6 text-card-foreground shadow-2xs",f),...g})}function B({className:f,...g}){return q("div",{"data-slot":"card-header",className:h("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",f),...g})}function E({className:f,...g}){return q("div",{"data-slot":"card-title",className:h("font-semibold leading-none",f),...g})}function G({className:f,...g}){return q("div",{"data-slot":"card-description",className:h("text-muted-foreground text-sm",f),...g})}function I({className:f,...g}){return q("div",{"data-slot":"card-action",className:h("col-start-2 row-span-2 row-start-1 self-start justify-self-end",f),...g})}function J({className:f,...g}){return q("div",{"data-slot":"card-content",className:h("px-6",f),...g})}function K({className:f,...g}){return q("div",{"data-slot":"card-footer",className:h("flex items-center px-6 [.border-t]:pt-6",f),...g})}export{E as CardTitle,B as CardHeader,K as CardFooter,G as CardDescription,J as CardContent,I as CardAction,z as Card};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import useEmblaCarousel, { type UseEmblaCarouselType } from 'embla-carousel-react';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { Button } from './button';
|
|
4
|
+
type CarouselApi = UseEmblaCarouselType[1];
|
|
5
|
+
type UseCarouselParameters = Parameters<typeof useEmblaCarousel>;
|
|
6
|
+
type CarouselOptions = UseCarouselParameters[0];
|
|
7
|
+
type CarouselPlugin = UseCarouselParameters[1];
|
|
8
|
+
interface CarouselProps {
|
|
9
|
+
opts?: CarouselOptions;
|
|
10
|
+
plugins?: CarouselPlugin;
|
|
11
|
+
orientation?: 'horizontal' | 'vertical';
|
|
12
|
+
setApi?: (api: CarouselApi) => void;
|
|
13
|
+
}
|
|
14
|
+
declare function Carousel({ orientation, opts, setApi, plugins, className, children, ...props }: React.ComponentPropsWithoutRef<'div'> & CarouselProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
declare function CarouselContent({ className, ...props }: React.ComponentPropsWithoutRef<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
declare function CarouselItem({ className, ...props }: React.ComponentPropsWithoutRef<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
declare function CarouselPrevious({ className, variant, size, ...props }: React.ComponentProps<typeof Button>): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
declare function CarouselNext({ className, variant, size, ...props }: React.ComponentProps<typeof Button>): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export { Carousel, type CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
var L=import.meta.require;import{cn as E}from"@contractspec/lib.ui-kit-core/utils";import{Slot as g}from"@radix-ui/react-slot";import{cva as z}from"class-variance-authority";import*as P from"react";import{jsx as A}from"react/jsx-runtime";var k=z("inline-flex shrink-0 items-center justify-center gap-2 whitespace-nowrap rounded-md font-medium text-sm outline-hidden transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40",outline:"border bg-background shadow-2xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}}),f=P.forwardRef(({className:e,variant:r,size:l,asChild:a=!1,...u},i)=>{return A(a?g:"button",{ref:i,"data-slot":"button",className:E(k({variant:r,size:l,className:e})),...u})});f.displayName="Button";import{clsx as D}from"clsx";import{twMerge as T}from"tailwind-merge";function p(...e){return T(D(e))}import U from"embla-carousel-react";import{ArrowLeft as B,ArrowRight as K}from"lucide-react";import*as o from"react";import{jsx as n,jsxs as R}from"react/jsx-runtime";var y=o.createContext(null);function m(){let e=o.useContext(y);if(!e)throw Error("useCarousel must be used within a <Carousel />");return e}function Z({orientation:e="horizontal",opts:r,setApi:l,plugins:a,className:u,children:i,...c}){let[b,t]=U({...r,axis:e==="horizontal"?"x":"y"},a),[N,h]=o.useState(!1),[x,w]=o.useState(!1),C=o.useCallback((s)=>{if(!s)return;h(s.canScrollPrev()),w(s.canScrollNext())},[]),d=o.useCallback(()=>{t?.scrollPrev()},[t]),v=o.useCallback(()=>{t?.scrollNext()},[t]),S=o.useCallback((s)=>{if(s.key==="ArrowLeft")s.preventDefault(),d();else if(s.key==="ArrowRight")s.preventDefault(),v()},[d,v]);return o.useEffect(()=>{if(!t||!l)return;l(t)},[t,l]),o.useEffect(()=>{if(!t)return;return C(t),t.on("reInit",C),t.on("select",C),()=>{t?.off("select",C)}},[t,C]),n(y.Provider,{value:{carouselRef:b,api:t,opts:r,orientation:e||(r?.axis==="y"?"vertical":"horizontal"),scrollPrev:d,scrollNext:v,canScrollPrev:N,canScrollNext:x},children:n("div",{onKeyDownCapture:S,className:p("relative",u),role:"region","aria-roledescription":"carousel","data-slot":"carousel",...c,children:i})})}function _({className:e,...r}){let{carouselRef:l,orientation:a}=m();return n("div",{ref:l,className:"overflow-hidden","data-slot":"carousel-content",children:n("div",{className:p("flex",a==="horizontal"?"-ml-4":"-mt-4 flex-col",e),...r})})}function $({className:e,...r}){let{orientation:l}=m();return n("div",{role:"group","aria-roledescription":"slide","data-slot":"carousel-item",className:p("min-w-0 shrink-0 grow-0 basis-full",l==="horizontal"?"pl-4":"pt-4",e),...r})}function j({className:e,variant:r="outline",size:l="icon",...a}){let{orientation:u,scrollPrev:i,canScrollPrev:c}=m();return R(f,{"data-slot":"carousel-previous",variant:r,size:l,className:p("absolute size-8 rounded-full",u==="horizontal"?"top-1/2 -left-12 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",e),disabled:!c,onClick:i,...a,children:[n(B,{}),n("span",{className:"sr-only",children:"Previous slide"})]})}function ee({className:e,variant:r="outline",size:l="icon",...a}){let{orientation:u,scrollNext:i,canScrollNext:c}=m();return R(f,{"data-slot":"carousel-next",variant:r,size:l,className:p("absolute size-8 rounded-full",u==="horizontal"?"top-1/2 -right-12 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",e),disabled:!c,onClick:i,...a,children:[n(K,{}),n("span",{className:"sr-only",children:"Next slide"})]})}export{j as CarouselPrevious,ee as CarouselNext,$ as CarouselItem,_ as CarouselContent,Z as Carousel};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
type ChartTheme = {
|
|
3
|
+
light?: string;
|
|
4
|
+
dark?: string;
|
|
5
|
+
};
|
|
6
|
+
export type ChartConfig = Record<string, {
|
|
7
|
+
label?: React.ReactNode;
|
|
8
|
+
icon?: React.ComponentType<{
|
|
9
|
+
className?: string;
|
|
10
|
+
}>;
|
|
11
|
+
color?: string;
|
|
12
|
+
theme?: ChartTheme;
|
|
13
|
+
}>;
|
|
14
|
+
type ChartPayloadItem = {
|
|
15
|
+
name?: string;
|
|
16
|
+
dataKey?: string;
|
|
17
|
+
value?: React.ReactNode;
|
|
18
|
+
color?: string;
|
|
19
|
+
payload?: Record<string, unknown>;
|
|
20
|
+
};
|
|
21
|
+
export interface ChartContainerProps extends React.ComponentPropsWithoutRef<'div'> {
|
|
22
|
+
config: ChartConfig;
|
|
23
|
+
}
|
|
24
|
+
export declare function ChartContainer({ config, className, style, ...props }: ChartContainerProps): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export declare function useChart(): {
|
|
26
|
+
config: ChartConfig;
|
|
27
|
+
};
|
|
28
|
+
export declare function ChartTooltip(props: React.ComponentPropsWithoutRef<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
export interface ChartTooltipContentProps extends React.ComponentPropsWithoutRef<'div'> {
|
|
30
|
+
label?: React.ReactNode;
|
|
31
|
+
payload?: ChartPayloadItem[];
|
|
32
|
+
hideLabel?: boolean;
|
|
33
|
+
hideIndicator?: boolean;
|
|
34
|
+
labelKey?: string;
|
|
35
|
+
nameKey?: string;
|
|
36
|
+
indicator?: 'line' | 'dot';
|
|
37
|
+
}
|
|
38
|
+
export declare function ChartTooltipContent({ className, label, payload, hideLabel, hideIndicator, labelKey, nameKey, indicator, ...props }: ChartTooltipContentProps): import("react/jsx-runtime").JSX.Element | null;
|
|
39
|
+
export declare function ChartLegend(props: React.ComponentPropsWithoutRef<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
40
|
+
export interface ChartLegendContentProps extends React.ComponentPropsWithoutRef<'div'> {
|
|
41
|
+
payload?: ChartPayloadItem[];
|
|
42
|
+
nameKey?: string;
|
|
43
|
+
}
|
|
44
|
+
export declare function ChartLegendContent({ className, payload, nameKey, ...props }: ChartLegendContentProps): import("react/jsx-runtime").JSX.Element | null;
|
|
45
|
+
export {};
|
package/dist/ui/chart.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
var _=import.meta.require;import{cn as P}from"@contractspec/lib.ui-kit-core/utils";import*as Q from"react";import{jsx as A,jsxs as O}from"react/jsx-runtime";var U=Q.createContext(null);function G(q,w){return w?q[w]:void 0}function Z(q){return Object.entries(q).reduce((w,[B,z])=>{if(z.color)w[`--color-${B}`]=z.color;if(z.theme?.light)w[`--color-${B}-light`]=z.theme.light;if(z.theme?.dark)w[`--color-${B}-dark`]=z.theme.dark;return w},{})}function I({config:q,className:w,style:B,...z}){return A(U.Provider,{value:{config:q},children:A("div",{"data-slot":"chart",className:P("flex aspect-video justify-center text-xs",w),style:{...Z(q),...B},...z})})}function W(){let q=Q.useContext(U);if(!q)throw Error("useChart must be used within a ChartContainer.");return q}function L(q){return A("div",{"data-slot":"chart-tooltip",...q})}function E({className:q,label:w,payload:B,hideLabel:z,hideIndicator:H,labelKey:D,nameKey:J,indicator:R="dot",...M}){let{config:S}=W();if(!B?.length)return null;return O("div",{"data-slot":"chart-tooltip-content",className:P("grid min-w-40 gap-2 rounded-lg border bg-background p-2 shadow-md",q),...M,children:[!z&&w?A("div",{className:"font-medium",children:D?G(S,D)?.label??w:w}):null,A("div",{className:"grid gap-1",children:B.map((F,X)=>{let Y=String(F.dataKey??F.name??X),T=G(S,F.dataKey??F.name);return O("div",{className:"flex items-center justify-between gap-2",children:[O("div",{className:"flex items-center gap-2",children:[!H?A("span",{className:P("shrink-0 rounded-full",R==="line"?"h-2.5 w-5":"size-2.5"),style:{backgroundColor:F.color??T?.color}}):null,A("span",{className:"text-muted-foreground",children:J?G(S,J)?.label??F.name:T?.label??F.name})]}),A("span",{className:"font-medium",children:F.value})]},Y)})})]})}function N(q){return A("div",{"data-slot":"chart-legend",...q})}function h({className:q,payload:w,nameKey:B,...z}){let{config:H}=W();if(!w?.length)return null;return A("div",{"data-slot":"chart-legend-content",className:P("flex flex-wrap items-center gap-4",q),...z,children:w.map((D,J)=>{let R=String(D.dataKey??D.name??J),M=G(H,D.dataKey??D.name);return O("div",{className:"flex items-center gap-2",children:[A("span",{className:"size-2.5 rounded-full",style:{backgroundColor:D.color??M?.color}}),A("span",{className:"text-muted-foreground text-sm",children:B?G(H,B)?.label??D.name:M?.label??D.name})]},R)})})}export{W as useChart,E as ChartTooltipContent,L as ChartTooltip,h as ChartLegendContent,N as ChartLegend,I as ChartContainer};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
var z=import.meta.require;import{cn as w}from"@contractspec/lib.ui-kit-core/utils";import*as f from"@radix-ui/react-checkbox";import{CheckIcon as y}from"lucide-react";import{jsx as g}from"react/jsx-runtime";function E({className:q,...v}){return g(f.Root,{"data-slot":"checkbox",className:w("peer size-4 shrink-0 rounded-[4px] border border-input shadow-xs outline-none transition-shadow focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:bg-input/30 dark:data-[state=checked]:bg-primary dark:aria-invalid:ring-destructive/40",q),...v,children:g(f.Indicator,{"data-slot":"checkbox-indicator",className:"grid place-content-center text-current transition-none",children:g(y,{className:"size-3.5"})})})}export{E as Checkbox};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as CollapsiblePrimitive from '@radix-ui/react-collapsible';
|
|
2
|
+
declare function Collapsible({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare function CollapsibleTrigger({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleTrigger>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function CollapsibleContent({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleContent>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export { Collapsible, CollapsibleContent, CollapsibleTrigger };
|