@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
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Chaman Ventures, SASU
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
# @contractspec/lib.ui-kit-web
|
|
2
|
+
|
|
3
|
+
`@contractspec/lib.ui-kit-web` provides web UI components for React and Next surfaces, with accessible building blocks, Radix-based primitives, layout helpers, and web-specific UX utilities exposed through `./ui/*` subpaths.
|
|
4
|
+
|
|
5
|
+
Website: https://contractspec.io
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
`bun add @contractspec/lib.ui-kit-web`
|
|
10
|
+
|
|
11
|
+
or
|
|
12
|
+
|
|
13
|
+
`npm install @contractspec/lib.ui-kit-web`
|
|
14
|
+
|
|
15
|
+
## What belongs here
|
|
16
|
+
|
|
17
|
+
This package owns the web-first component layer:
|
|
18
|
+
|
|
19
|
+
- Radix-backed web UI components.
|
|
20
|
+
- Web-only accessibility helpers and route-announcement primitives.
|
|
21
|
+
- Map, marketing, list-page, and visualization building blocks.
|
|
22
|
+
- Web form, navigation, and layout primitives.
|
|
23
|
+
|
|
24
|
+
Use this package for browser and Next.js surfaces. Do not use it for native or Expo UI work.
|
|
25
|
+
|
|
26
|
+
## Core workflows
|
|
27
|
+
|
|
28
|
+
### Import a web component by subpath
|
|
29
|
+
|
|
30
|
+
```ts
|
|
31
|
+
import { Button } from "@contractspec/lib.ui-kit-web/ui/button";
|
|
32
|
+
import { Form } from "@contractspec/lib.ui-kit-web/ui/form";
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Wire accessibility helpers at the app root
|
|
36
|
+
|
|
37
|
+
```tsx
|
|
38
|
+
import {
|
|
39
|
+
SRLiveRegionProvider,
|
|
40
|
+
useSRLiveRegion,
|
|
41
|
+
} from "@contractspec/lib.ui-kit-web/ui/live-region";
|
|
42
|
+
import { SkipLink } from "@contractspec/lib.ui-kit-web/ui/skip-link";
|
|
43
|
+
import { RouteAnnouncer } from "@contractspec/lib.ui-kit-web/ui/route-announcer";
|
|
44
|
+
import { FocusOnRouteChange } from "@contractspec/lib.ui-kit-web/ui/focus-on-route-change";
|
|
45
|
+
|
|
46
|
+
function AppShell({ title, children }: { title: string; children: React.ReactNode }) {
|
|
47
|
+
return (
|
|
48
|
+
<SRLiveRegionProvider>
|
|
49
|
+
<SkipLink targetId="main" />
|
|
50
|
+
<RouteAnnouncer title={title} />
|
|
51
|
+
<main id="main">
|
|
52
|
+
<FocusOnRouteChange />
|
|
53
|
+
{children}
|
|
54
|
+
</main>
|
|
55
|
+
</SRLiveRegionProvider>
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### Render the canonical account grid
|
|
61
|
+
|
|
62
|
+
The canonical data-table example lives in
|
|
63
|
+
[`@contractspec/example.data-grid-showcase`](../../examples/data-grid-showcase/README.md).
|
|
64
|
+
Its raw browser lane renders `@contractspec/lib.ui-kit-web/ui/data-table`
|
|
65
|
+
directly:
|
|
66
|
+
|
|
67
|
+
```tsx
|
|
68
|
+
import { DataTable } from '@contractspec/lib.ui-kit-web/ui/data-table';
|
|
69
|
+
import { useContractTable } from '@contractspec/lib.presentation-runtime-react';
|
|
70
|
+
|
|
71
|
+
import { SHOWCASE_ROWS } from '@contractspec/example.data-grid-showcase/ui/data-grid-showcase.data';
|
|
72
|
+
import { useShowcaseColumns } from '@contractspec/example.data-grid-showcase/ui/data-grid-showcase.columns';
|
|
73
|
+
import {
|
|
74
|
+
ExpandedRowContent,
|
|
75
|
+
ShowcaseToolbar,
|
|
76
|
+
} from '@contractspec/example.data-grid-showcase/ui/data-grid-showcase.parts';
|
|
77
|
+
|
|
78
|
+
export function WebAccountGrid() {
|
|
79
|
+
const columns = useShowcaseColumns();
|
|
80
|
+
|
|
81
|
+
const controller = useContractTable({
|
|
82
|
+
data: SHOWCASE_ROWS,
|
|
83
|
+
columns,
|
|
84
|
+
selectionMode: 'single',
|
|
85
|
+
initialState: {
|
|
86
|
+
sorting: [{ id: 'lastActivityAt', desc: true }],
|
|
87
|
+
pagination: { pageIndex: 0, pageSize: 4 },
|
|
88
|
+
columnVisibility: { notes: false },
|
|
89
|
+
columnPinning: { left: ['account'], right: [] },
|
|
90
|
+
},
|
|
91
|
+
renderExpandedContent: (row) => <ExpandedRowContent row={row} />,
|
|
92
|
+
getCanExpand: () => true,
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
return (
|
|
96
|
+
<DataTable
|
|
97
|
+
controller={controller}
|
|
98
|
+
toolbar={
|
|
99
|
+
<ShowcaseToolbar
|
|
100
|
+
controller={controller}
|
|
101
|
+
label="Web primitive"
|
|
102
|
+
primaryColumnId="account"
|
|
103
|
+
toggleColumnId="notes"
|
|
104
|
+
pinColumnId="owner"
|
|
105
|
+
sortColumnIds={['arr', 'renewalDate']}
|
|
106
|
+
/>
|
|
107
|
+
}
|
|
108
|
+
loading={false}
|
|
109
|
+
emptyState={<div>No rows available.</div>}
|
|
110
|
+
footer={\`Rows \${controller.totalItems}\`}
|
|
111
|
+
/>
|
|
112
|
+
);
|
|
113
|
+
}
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
Cells receive overflow behavior from the table controller. Web renderers use a
|
|
117
|
+
compact truncating wrapper for `truncate` and `expand`, multiline wrapping for
|
|
118
|
+
`wrap`, and preserve caller rendering for `none`.
|
|
119
|
+
|
|
120
|
+
Use the web primitive when you want direct control over the render surface.
|
|
121
|
+
For higher-level search, active chips, selection summary, and hidden-column
|
|
122
|
+
recovery, keep this primitive lean and layer
|
|
123
|
+
`@contractspec/lib.design-system` `DataTableToolbar` into the `toolbar` slot.
|
|
124
|
+
|
|
125
|
+
## API map
|
|
126
|
+
|
|
127
|
+
### Controls and forms
|
|
128
|
+
|
|
129
|
+
- `./ui/button`
|
|
130
|
+
- `./ui/button-group`
|
|
131
|
+
- `./ui/input`
|
|
132
|
+
- `./ui/input-password`
|
|
133
|
+
- `./ui/textarea`
|
|
134
|
+
- `./ui/select`
|
|
135
|
+
- `./ui/native-select`
|
|
136
|
+
- `./ui/field`
|
|
137
|
+
- `./ui/form`
|
|
138
|
+
|
|
139
|
+
`./ui/input-password` composes the shared input group, masked input, and
|
|
140
|
+
right-side visibility toggle while preserving `current-password` and
|
|
141
|
+
`new-password` autocomplete hints for password managers.
|
|
142
|
+
- `./ui/combobox`
|
|
143
|
+
|
|
144
|
+
`./ui/combobox` keeps the select-style button API compatible and also supports
|
|
145
|
+
editable autocomplete usage with query control, listbox ARIA wiring, loading,
|
|
146
|
+
empty, error, disabled-option, description, and multi-select chip states.
|
|
147
|
+
- `./ui/input-group`
|
|
148
|
+
- `./ui/input-otp`
|
|
149
|
+
- `./ui/spinner`
|
|
150
|
+
- `./ui/kbd`
|
|
151
|
+
|
|
152
|
+
### Overlays, menus, and navigation
|
|
153
|
+
|
|
154
|
+
- `./ui/dialog`
|
|
155
|
+
- `./ui/drawer`
|
|
156
|
+
- `./ui/dropdown-menu`
|
|
157
|
+
- `./ui/popover`
|
|
158
|
+
- `./ui/navigation-menu`
|
|
159
|
+
- `./ui/nav-layout`
|
|
160
|
+
- `./ui/link`
|
|
161
|
+
|
|
162
|
+
### Data display and layout
|
|
163
|
+
|
|
164
|
+
- `./ui/table`
|
|
165
|
+
- `./ui/data-table`
|
|
166
|
+
- `./ui/page-header`
|
|
167
|
+
- `./ui/section`
|
|
168
|
+
- `./ui/sidebar`
|
|
169
|
+
- `./ui/item`
|
|
170
|
+
- `./ui/chart`
|
|
171
|
+
- `./ui/direction`
|
|
172
|
+
|
|
173
|
+
### Accessibility helpers
|
|
174
|
+
|
|
175
|
+
- `./ui/skip-link`
|
|
176
|
+
- `./ui/live-region`
|
|
177
|
+
- `./ui/route-announcer`
|
|
178
|
+
- `./ui/focus-on-route-change`
|
|
179
|
+
- `./ui/visually-hidden`
|
|
180
|
+
|
|
181
|
+
### Hooks and grouped surfaces
|
|
182
|
+
|
|
183
|
+
- `./ui/use-media-query`
|
|
184
|
+
- `./ui/use-mobile`
|
|
185
|
+
- `./ui/use-reduced-motion`
|
|
186
|
+
- `./ui/use-toast`
|
|
187
|
+
- `./ui/utils`
|
|
188
|
+
- grouped subpaths under `./ui/map`, `./ui/marketing`, `./ui/usecases`, `./ui/organisms/ListPage`, and `./ui/visualization`
|
|
189
|
+
- shared semantic contracts are defined in `@contractspec/lib.ui-kit-core/interfaces`
|
|
190
|
+
|
|
191
|
+
## Public surface
|
|
192
|
+
|
|
193
|
+
The package publishes a root entry, but the meaningful consumer surface is `./ui/*`.
|
|
194
|
+
|
|
195
|
+
Consumers should import grouped subpaths directly. The public surface is best understood by category:
|
|
196
|
+
|
|
197
|
+
- controls and forms
|
|
198
|
+
- shadcn/Radix-style `Field` and `InputGroup` primitives for accessible labels, descriptions, errors, legends, addons, and grouped controls
|
|
199
|
+
- overlays and menus
|
|
200
|
+
- layout and navigation
|
|
201
|
+
- accessibility helpers
|
|
202
|
+
- data display
|
|
203
|
+
- grouped map, marketing, organisms, use-case, and visualization surfaces
|
|
204
|
+
- hooks and utilities
|
|
205
|
+
|
|
206
|
+
Use `package.json` as the exhaustive export map.
|
|
207
|
+
|
|
208
|
+
## Operational semantics and gotchas
|
|
209
|
+
|
|
210
|
+
- Components rely on Radix and browser or Next assumptions.
|
|
211
|
+
- `./ui/link` is based on `next/link`.
|
|
212
|
+
- `./ui/skip-link`, live-region helpers, and route announcers are first-class web-only APIs in this package.
|
|
213
|
+
- Storybook scripts exist here, unlike the other UI packages in this rewrite set.
|
|
214
|
+
- The package has optional map-related peer dependencies; map features should stay opt-in and not become implicit hard requirements.
|
|
215
|
+
- The root entry is not the meaningful consumer surface today.
|
|
216
|
+
|
|
217
|
+
## When not to use this package
|
|
218
|
+
|
|
219
|
+
- Do not use it for native or Expo surfaces.
|
|
220
|
+
- Do not use it for token orchestration or platform abstraction.
|
|
221
|
+
- Do not use it for framework-agnostic linking.
|
|
222
|
+
|
|
223
|
+
## Related packages
|
|
224
|
+
|
|
225
|
+
- `@contractspec/lib.ui-kit-core`: shared low-level utilities used across UI packages.
|
|
226
|
+
- `@contractspec/lib.ui-kit`: native-first component package for Expo and React Native surfaces.
|
|
227
|
+
- `@contractspec/lib.design-system`: higher-level design-system and composition layer built on top of the UI packages.
|
|
228
|
+
|
|
229
|
+
## Local commands
|
|
230
|
+
|
|
231
|
+
- `bun run lint:check`
|
|
232
|
+
- `bun run typecheck`
|
|
233
|
+
- `bun run test`
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=((a)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(a,{get:(b,c)=>(typeof require<"u"?require:b)[c]}):a)(function(a){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+a+'" is not supported')});var h=void 0;export{h as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var H=((f)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(f,{get:(y,B)=>(typeof require<"u"?require:y)[B]}):f)(function(f){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+f+'" is not supported')});import{cn as E}from"@contractspec/lib.ui-kit-core/utils";import*as q from"@radix-ui/react-accordion";import{ChevronDownIcon as F}from"lucide-react";import{jsx as z,jsxs as G}from"react/jsx-runtime";function M({...f}){return z(q.Root,{"data-slot":"accordion",...f})}function O({className:f,...y}){return z(q.Item,{"data-slot":"accordion-item",className:E("border-b last:border-b-0",f),...y})}function P({className:f,children:y,...B}){return z(q.Header,{className:"flex",children:G(q.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",f),...B,children:[y,z(F,{className:"pointer-events-none size-4 shrink-0 translate-y-0.5 text-muted-foreground transition-transform duration-200"})]})})}function Q({className:f,children:y,...B}){return z(q.Content,{"data-slot":"accordion-content",className:"overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...B,children:z("div",{className:E("pt-0 pb-4",f),children:y})})}export{P as AccordionTrigger,O as AccordionItem,Q as AccordionContent,M as Accordion};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var S=((q)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(q,{get:(w,K)=>(typeof require<"u"?require:w)[K]}):q)(function(q){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+q+'" is not supported')});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 L 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=L.forwardRef(({className:q,variant:w,size:K,asChild:M=!1,...Q},R)=>{return Z(M?W:"button",{ref:R,"data-slot":"button",className:U(J({variant:w,size:K,className:q})),...Q})});Y.displayName="Button";import{cn as I}from"@contractspec/lib.ui-kit-core/utils";import*as E from"@radix-ui/react-alert-dialog";import{jsx as G,jsxs as F}from"react/jsx-runtime";function y({...q}){return G(E.Root,{"data-slot":"alert-dialog",...q})}function C({...q}){return G(E.Trigger,{"data-slot":"alert-dialog-trigger",...q})}function _({...q}){return G(E.Portal,{"data-slot":"alert-dialog-portal",...q})}function $({className:q,...w}){return G(E.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),...w})}function V({className:q,...w}){return F(_,{children:[G($,{}),G(E.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),...w})]})}function d({className:q,...w}){return G("div",{"data-slot":"alert-dialog-header",className:I("flex flex-col gap-2 text-center sm:text-left",q),...w})}function v({className:q,...w}){return G("div",{"data-slot":"alert-dialog-footer",className:I("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",q),...w})}function b({className:q,...w}){return G(E.Title,{"data-slot":"alert-dialog-title",className:I("font-semibold text-lg",q),...w})}function A({className:q,...w}){return G(E.Description,{"data-slot":"alert-dialog-description",className:I("text-muted-foreground text-sm",q),...w})}function D({className:q,...w}){return G(E.Action,{className:I(J(),q),...w})}function g({className:q,...w}){return G(E.Cancel,{className:I(J({variant:"outline"}),q),...w})}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 @@
|
|
|
1
|
+
var C=((d)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(d,{get:(f,g)=>(typeof require<"u"?require:f)[g]}):d)(function(d){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+d+'" is not supported')});import{cn as q}from"@contractspec/lib.ui-kit-core/utils";import{cva as z}from"class-variance-authority";import{jsx as w}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,...g}){return w("div",{"data-slot":"alert",role:"alert",className:q(B({variant:f}),d),...g})}function I({className:d,...f}){return w("div",{"data-slot":"alert-title",className:q("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",d),...f})}function J({className:d,...f}){return w("div",{"data-slot":"alert-description",className:q("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 @@
|
|
|
1
|
+
var s=((t)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(o,e)=>(typeof require<"u"?require:o)[e]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});import*as i from"@radix-ui/react-aspect-ratio";var p=i.Root;export{p as AspectRatio};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var _=((e)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(d,m)=>(typeof require<"u"?require:d)[m]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});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,...d}){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),...d})}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 g,jsxs as R}from"react/jsx-runtime";function A({...e}){return g(f.Root,{"data-slot":"select",...e})}function S({...e}){return g(f.Group,{"data-slot":"select-group",...e})}function E({...e}){return g(f.Value,{"data-slot":"select-value",...e})}function H({className:e,size:d="default",children:m,...F}){return R(f.Trigger,{"data-slot":"select-trigger","data-size":d,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,g(f.Icon,{asChild:!0,children:g(q,{className:"size-4 opacity-50"})})]})}function J({className:e,children:d,position:m="popper",...F}){return g(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:[g(Y,{}),g(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:d}),g(Z,{})]})})}function U({className:e,...d}){return g(f.Label,{"data-slot":"select-label",className:u("px-2 py-1.5 text-muted-foreground text-xs",e),...d})}function P({className:e,children:d,...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:[g("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:g(f.ItemIndicator,{children:g(W,{className:"size-4"})})}),g(f.ItemText,{children:d})]})}function B({className:e,...d}){return g(f.Separator,{"data-slot":"select-separator",className:u("pointer-events-none -mx-1 my-1 h-px bg-border",e),...d})}function Y({className:e,...d}){return g(f.ScrollUpButton,{"data-slot":"select-scroll-up-button",className:u("flex cursor-default items-center justify-center py-1",e),...d,children:g(X,{className:"size-4"})})}function Z({className:e,...d}){return g(f.ScrollDownButton,{"data-slot":"select-scroll-down-button",className:u("flex cursor-default items-center justify-center py-1",e),...d,children:g(q,{className:"size-4"})})}import{jsx as b,jsxs as y}from"react/jsx-runtime";var N=({value:e,options:d,onChange:m,placeholder:F="Sélectionner...",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:["(",d.reduce((v,M)=>v+(M.count||0),0),")"]})]}),d.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 @@
|
|
|
1
|
+
var k=((f)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(f,{get:(t,d)=>(typeof require<"u"?require:t)[d]}):f)(function(f){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+f+'" is not supported')});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,...t}){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),...t})}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 m,jsxs as b}from"react/jsx-runtime";function q({...f}){return m(e.Root,{"data-slot":"select",...f})}function I({...f}){return m(e.Group,{"data-slot":"select-group",...f})}function A({...f}){return m(e.Value,{"data-slot":"select-value",...f})}function E({className:f,size:t="default",children:d,...F}){return b(e.Trigger,{"data-slot":"select-trigger","data-size":t,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,m(e.Icon,{asChild:!0,children:m($,{className:"size-4 opacity-50"})})]})}function H({className:f,children:t,position:d="popper",...F}){return m(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:[m(Y,{}),m(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:t}),m(Z,{})]})})}function U({className:f,...t}){return m(e.Label,{"data-slot":"select-label",className:g("px-2 py-1.5 text-muted-foreground text-xs",f),...t})}function P({className:f,children:t,...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:[m("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:m(e.ItemIndicator,{children:m(W,{className:"size-4"})})}),m(e.ItemText,{children:t})]})}function B({className:f,...t}){return m(e.Separator,{"data-slot":"select-separator",className:g("pointer-events-none -mx-1 my-1 h-px bg-border",f),...t})}function Y({className:f,...t}){return m(e.ScrollUpButton,{"data-slot":"select-scroll-up-button",className:g("flex cursor-default items-center justify-center py-1",f),...t,children:m(X,{className:"size-4"})})}function Z({className:f,...t}){return m(e.ScrollDownButton,{"data-slot":"select-scroll-down-button",className:g("flex cursor-default items-center justify-center py-1",f),...t,children:m($,{className:"size-4"})})}import{jsx as v,jsxs as y}from"react/jsx-runtime";var _=({value:f,options:t,onChange:d,placeholder:F="Sélectionner...",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:["(",t.reduce((u,L)=>u+(L.count||0),0),")"]})]}),t.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};
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var F=((V)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(V,{get:(y,C)=>(typeof require<"u"?require:y)[C]}):V)(function(V){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+V+'" is not supported')});import{clsx as A}from"clsx";import{twMerge as B}from"tailwind-merge";function M(...V){return B(A(V))}import{Loader2 as D}from"lucide-react";import{jsx as p,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:V="md",className:y,text:C,fullScreen:g=!1})=>{let h=q("div",{className:M("flex flex-col items-center justify-center gap-2",y),children:[p(D,{className:M("animate-spin text-primary-600",E[V])}),C&&p("p",{className:"animate-pulse text-base text-gray-600",children:C})]});if(g)return p("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-white/80 backdrop-blur-xs",children:h});return h},f=({className:V})=>p("div",{className:M("h-4 animate-pulse rounded-xs bg-gray-200",V)}),Q=({className:V})=>q("div",{className:M("animate-pulse space-y-3 rounded-lg bg-gray-200 p-4",V),children:[p(f,{className:"h-6 w-3/4"}),p(f,{className:"h-4 w-full"}),p(f,{className:"h-4 w-2/3"})]}),R=({rows:V=5,cols:y=4})=>p("div",{className:"space-y-3",children:Array.from({length:V}).map((C,g)=>p("div",{className:"flex space-x-4",children:Array.from({length:y}).map((h,v)=>p(f,{className:"flex-1"},v))},g))});export{R as SkeletonTable,f as SkeletonLine,Q as SkeletonCard,P as LoadingSpinner};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var l=((e)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(n,o)=>(typeof require<"u"?require:n)[o]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});export{d as SkeletonTable,k as SkeletonLine,i as SkeletonCard,a as LoadingSpinner};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var S=((m)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(m,{get:(f,n)=>(typeof require<"u"?require:f)[n]}):m)(function(m){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+m+'" is not supported')});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:f,size:n,asChild:y=!1,...u},h)=>{return V(y?K:"button",{ref:h,"data-slot":"button",className:J(Q({variant:f,size:n,className:m})),...u})});k.displayName="Button";import{cn as N}from"@contractspec/lib.ui-kit-core/utils";import*as d 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(d.Root,{"data-slot":"select",...m})}function j({...m}){return i(d.Group,{"data-slot":"select-group",...m})}function F({...m}){return i(d.Value,{"data-slot":"select-value",...m})}function G({className:m,size:f="default",children:n,...y}){return A(d.Trigger,{"data-slot":"select-trigger","data-size":f,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(d.Icon,{asChild:!0,children:i(z,{className:"size-4 opacity-50"})})]})}function L({className:m,children:f,position:n="popper",...y}){return i(d.Portal,{children:A(d.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(d.Viewport,{className:N("p-1",n==="popper"&&"h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width) scroll-my-1"),children:f}),i(Z,{})]})})}function mm({className:m,...f}){return i(d.Label,{"data-slot":"select-label",className:N("px-2 py-1.5 text-muted-foreground text-xs",m),...f})}function M({className:m,children:f,...n}){return A(d.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(d.ItemIndicator,{children:i(W,{className:"size-4"})})}),i(d.ItemText,{children:f})]})}function fm({className:m,...f}){return i(d.Separator,{"data-slot":"select-separator",className:N("pointer-events-none -mx-1 my-1 h-px bg-border",m),...f})}function Y({className:m,...f}){return i(d.ScrollUpButton,{"data-slot":"select-scroll-up-button",className:N("flex cursor-default items-center justify-center py-1",m),...f,children:i(X,{className:"size-4"})})}function Z({className:m,...f}){return i(d.ScrollDownButton,{"data-slot":"select-scroll-down-button",className:N("flex cursor-default items-center justify-center py-1",m),...f,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:f,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<f&&!b,H=()=>{if(f<=7)return Array.from({length:f},(v,R)=>R+1);if(m<=3)return[1,2,3,4,5,-1,f];if(m>=f-2)return[1,-1,f-4,f-3,f-2,f-1,f];return[1,-1,m-1,m,m+1,-1,f]};if(f===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," à ",E," sur ",n," résultats"]}),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ère 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écédente"})]}),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(f),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ère 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 @@
|
|
|
1
|
+
var S=((m)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(m,{get:(f,n)=>(typeof require<"u"?require:f)[n]}):m)(function(m){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+m+'" is not supported')});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:f,size:n,asChild:y=!1,...t},b)=>{return Q(y?J:"button",{ref:b,"data-slot":"button",className:H(O({variant:f,size:n,className:m})),...t})});u.displayName="Button";import{cn as N}from"@contractspec/lib.ui-kit-core/utils";import*as i 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(i.Root,{"data-slot":"select",...m})}function mm({...m}){return d(i.Group,{"data-slot":"select-group",...m})}function C({...m}){return d(i.Value,{"data-slot":"select-value",...m})}function F({className:m,size:f="default",children:n,...y}){return R(i.Trigger,{"data-slot":"select-trigger","data-size":f,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(i.Icon,{asChild:!0,children:d(r,{className:"size-4 opacity-50"})})]})}function G({className:m,children:f,position:n="popper",...y}){return d(i.Portal,{children:R(i.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(i.Viewport,{className:N("p-1",n==="popper"&&"h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width) scroll-my-1"),children:f}),d(Y,{})]})})}function fm({className:m,...f}){return d(i.Label,{"data-slot":"select-label",className:N("px-2 py-1.5 text-muted-foreground text-xs",m),...f})}function L({className:m,children:f,...n}){return R(i.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(i.ItemIndicator,{children:d(V,{className:"size-4"})})}),d(i.ItemText,{children:f})]})}function im({className:m,...f}){return d(i.Separator,{"data-slot":"select-separator",className:N("pointer-events-none -mx-1 my-1 h-px bg-border",m),...f})}function X({className:m,...f}){return d(i.ScrollUpButton,{"data-slot":"select-scroll-up-button",className:N("flex cursor-default items-center justify-center py-1",m),...f,children:d(W,{className:"size-4"})})}function Y({className:m,...f}){return d(i.ScrollDownButton,{"data-slot":"select-scroll-down-button",className:N("flex cursor-default items-center justify-center py-1",m),...f,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:f,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<f&&!k,E=()=>{if(f<=7)return Array.from({length:f},(v,h)=>h+1);if(m<=3)return[1,2,3,4,5,-1,f];if(m>=f-2)return[1,-1,f-4,f-3,f-2,f-1,f];return[1,-1,m-1,m,m+1,-1,f]};if(f===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," à ",B," sur ",n," résultats"]}),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ère 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écédente"})]}),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(f),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ère 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};
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var b=((e)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(o,t)=>(typeof require<"u"?require:o)[t]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});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:t,asChild:r=!1,...m},n)=>{return N(r?y:"button",{ref:n,"data-slot":"button",className:u(w({variant:o,size:t,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:t,...r}){return I("input",{ref:t,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 l,jsxs as p}from"react/jsx-runtime";var H=({value:e,onChange:o,placeholder:t="Rechercher...",onClear:r,disabled:m=!1,className:n="",autoFocus:a=!1})=>{let v=()=>{o(""),r?.()};return p("div",{className:`relative w-full ${n}`,children:[l("div",{className:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3",children:l(R,{className:"h-4 w-4 text-muted-foreground"})}),l(f,{type:"text",value:e,onChange:(g)=>o(g.target.value),placeholder:t,disabled:m,autoFocus:a,className:"pr-10 pl-10"}),e&&l("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:[l(S,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"}),l("span",{className:"sr-only",children:"Effacer la recherche"})]})})]})};export{H as SearchInput};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var b=((e)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(o,t)=>(typeof require<"u"?require:o)[t]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});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:t,asChild:p=!1,...l},m)=>{return I(p?y:"button",{ref:m,"data-slot":"button",className:g(s({variant:o,size:t,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:t,...p}){return w("input",{ref:t,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 r,jsxs as d}from"react/jsx-runtime";var R=({value:e,onChange:o,placeholder:t="Rechercher...",onClear:p,disabled:l=!1,className:m="",autoFocus:h=!1})=>{let u=()=>{o(""),p?.()};return d("div",{className:`relative w-full ${m}`,children:[r("div",{className:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3",children:r(N,{className:"h-4 w-4 text-muted-foreground"})}),r(f,{type:"text",value:e,onChange:(v)=>o(v.target.value),placeholder:t,disabled:l,autoFocus:h,className:"pr-10 pl-10"}),e&&r("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:[r(P,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"}),r("span",{className:"sr-only",children:"Effacer la recherche"})]})})]})};export{R as SearchInput};
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var n=((a)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(a,{get:(t,o)=>(typeof require<"u"?require:t)[o]}):a)(function(a){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+a+'" is not supported')});import{clsx as l}from"clsx";import{twMerge as m}from"tailwind-merge";function r(...a){return m(l(a))}import*as e from"@radix-ui/react-avatar";import{jsx as i}from"react/jsx-runtime";function p({className:a,...t}){return i(e.Root,{"data-slot":"avatar",className:r("relative flex size-8 shrink-0 overflow-hidden rounded-full",a),...t})}function d({className:a,...t}){return i(e.Image,{"data-slot":"avatar-image",className:r("aspect-square size-full",a),...t})}function A({className:a,...t}){return i(e.Fallback,{"data-slot":"avatar-fallback",className:r("flex size-full items-center justify-center rounded-full bg-muted",a),...t})}export{d as AvatarImage,A as AvatarFallback,p as Avatar};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var I=((f)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(f,{get:(q,w)=>(typeof require<"u"?require:q)[w]}):f)(function(f){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+f+'" is not supported')});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 @@
|
|
|
1
|
+
var O=((f)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(f,{get:(q,A)=>(typeof require<"u"?require:q)[A]}):f)(function(f){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+f+'" is not supported')});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 @@
|
|
|
1
|
+
var v=((d)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(d,{get:(f,g)=>(typeof require<"u"?require:f)[g]}):d)(function(d){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+d+'" is not supported')});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 @@
|
|
|
1
|
+
var O=((g)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(g,{get:(q,w)=>(typeof require<"u"?require:q)[w]}):g)(function(g){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+g+'" is not supported')});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 A 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=A.forwardRef(({className:g,variant:q,size:w,asChild:D=!1,...E},F)=>{return L(D?H:"button",{ref:F,"data-slot":"button",className:G(J({variant:q,size:w,className:g})),...E})});K.displayName="Button";export{J as buttonVariants,K as Button};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var L=((F)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(F,{get:(J,E)=>(typeof require<"u"?require:J)[E]}):F)(function(F){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+F+'" is not supported')});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:F,variant:J,size:E,asChild:K=!1,...M},Q)=>{return g(K?z:"button",{ref:Q,"data-slot":"button",className:S(W({variant:J,size:E,className:F})),...M})});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 H}from"react/jsx-runtime";function f({className:F,classNames:J,showOutsideDays:E=!0,captionLayout:K="label",buttonVariant:M="ghost",formatters:Q,components:Z,...P}){let A=$();return H(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`,F),captionLayout:K,formatters:{formatMonthDropdown:(G)=>G.toLocaleString("default",{month:"short"}),...Q},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:M}),"size-(--cell-size) select-none p-0 aria-disabled:opacity-50",A.button_previous),button_next:q(W({variant:M}),"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",K==="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),...J},components:{Root:({className:G,rootRef:T,...U})=>{return H("div",{"data-slot":"calendar",ref:T,className:q(G),...U})},Chevron:({className:G,orientation:T,...U})=>{if(T==="left")return H(I,{className:q("size-4",G),...U});if(T==="right")return H(R,{className:q("size-4",G),...U});return H(w,{className:q("size-4",G),...U})},DayButton:B,WeekNumber:({children:G,...T})=>{return H("td",{...T,children:H("div",{className:"flex size-(--cell-size) items-center justify-center text-center",children:G})})},...Z},...P})}function B({className:F,day:J,modifiers:E,...K}){let M=$(),Q=X.useRef(null);return X.useEffect(()=>{if(E.focused)Q.current?.focus()},[E.focused]),H(Y,{ref:Q,variant:"ghost",size:"icon","data-day":J.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",M.day,F),...K})}export{B as CalendarDayButton,f as Calendar};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var w=((f)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(f,{get:(g,v)=>(typeof require<"u"?require:g)[v]}):f)(function(f){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+f+'" is not supported')});import{cn as h}from"@contractspec/lib.ui-kit-core/utils";import{jsx as q}from"react/jsx-runtime";function B({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 E({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 G({className:f,...g}){return q("div",{"data-slot":"card-title",className:h("font-semibold leading-none",f),...g})}function I({className:f,...g}){return q("div",{"data-slot":"card-description",className:h("text-muted-foreground text-sm",f),...g})}function J({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 K({className:f,...g}){return q("div",{"data-slot":"card-content",className:h("px-6",f),...g})}function L({className:f,...g}){return q("div",{"data-slot":"card-footer",className:h("flex items-center px-6 [.border-t]:pt-6",f),...g})}export{G as CardTitle,E as CardHeader,L as CardFooter,I as CardDescription,K as CardContent,J as CardAction,B as Card};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var L=((e)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(o,t)=>(typeof require<"u"?require:o)[t]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});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:o,size:t,asChild:a=!1,...u},i)=>{return A(a?g:"button",{ref:i,"data-slot":"button",className:E(k({variant:o,size:t,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 r from"react";import{jsx as n,jsxs as R}from"react/jsx-runtime";var y=r.createContext(null);function m(){let e=r.useContext(y);if(!e)throw Error("useCarousel must be used within a <Carousel />");return e}function Z({orientation:e="horizontal",opts:o,setApi:t,plugins:a,className:u,children:i,...c}){let[b,l]=U({...o,axis:e==="horizontal"?"x":"y"},a),[N,h]=r.useState(!1),[x,w]=r.useState(!1),C=r.useCallback((s)=>{if(!s)return;h(s.canScrollPrev()),w(s.canScrollNext())},[]),d=r.useCallback(()=>{l?.scrollPrev()},[l]),v=r.useCallback(()=>{l?.scrollNext()},[l]),S=r.useCallback((s)=>{if(s.key==="ArrowLeft")s.preventDefault(),d();else if(s.key==="ArrowRight")s.preventDefault(),v()},[d,v]);return r.useEffect(()=>{if(!l||!t)return;t(l)},[l,t]),r.useEffect(()=>{if(!l)return;return C(l),l.on("reInit",C),l.on("select",C),()=>{l?.off("select",C)}},[l,C]),n(y.Provider,{value:{carouselRef:b,api:l,opts:o,orientation:e||(o?.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,...o}){let{carouselRef:t,orientation:a}=m();return n("div",{ref:t,className:"overflow-hidden","data-slot":"carousel-content",children:n("div",{className:p("flex",a==="horizontal"?"-ml-4":"-mt-4 flex-col",e),...o})})}function $({className:e,...o}){let{orientation:t}=m();return n("div",{role:"group","aria-roledescription":"slide","data-slot":"carousel-item",className:p("min-w-0 shrink-0 grow-0 basis-full",t==="horizontal"?"pl-4":"pt-4",e),...o})}function j({className:e,variant:o="outline",size:t="icon",...a}){let{orientation:u,scrollPrev:i,canScrollPrev:c}=m();return R(f,{"data-slot":"carousel-previous",variant:o,size:t,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:o="outline",size:t="icon",...a}){let{orientation:u,scrollNext:i,canScrollNext:c}=m();return R(f,{"data-slot":"carousel-next",variant:o,size:t,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 @@
|
|
|
1
|
+
var _=((q)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(q,{get:(w,z)=>(typeof require<"u"?require:w)[z]}):q)(function(q){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+q+'" is not supported')});import{cn as P}from"@contractspec/lib.ui-kit-core/utils";import*as Q from"react";import{jsx as B,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,[z,A])=>{if(A.color)w[`--color-${z}`]=A.color;if(A.theme?.light)w[`--color-${z}-light`]=A.theme.light;if(A.theme?.dark)w[`--color-${z}-dark`]=A.theme.dark;return w},{})}function I({config:q,className:w,style:z,...A}){return B(U.Provider,{value:{config:q},children:B("div",{"data-slot":"chart",className:P("flex aspect-video justify-center text-xs",w),style:{...Z(q),...z},...A})})}function W(){let q=Q.useContext(U);if(!q)throw Error("useChart must be used within a ChartContainer.");return q}function L(q){return B("div",{"data-slot":"chart-tooltip",...q})}function E({className:q,label:w,payload:z,hideLabel:A,hideIndicator:H,labelKey:D,nameKey:J,indicator:R="dot",...M}){let{config:S}=W();if(!z?.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:[!A&&w?B("div",{className:"font-medium",children:D?G(S,D)?.label??w:w}):null,B("div",{className:"grid gap-1",children:z.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?B("span",{className:P("shrink-0 rounded-full",R==="line"?"h-2.5 w-5":"size-2.5"),style:{backgroundColor:F.color??T?.color}}):null,B("span",{className:"text-muted-foreground",children:J?G(S,J)?.label??F.name:T?.label??F.name})]}),B("span",{className:"font-medium",children:F.value})]},Y)})})]})}function N(q){return B("div",{"data-slot":"chart-legend",...q})}function h({className:q,payload:w,nameKey:z,...A}){let{config:H}=W();if(!w?.length)return null;return B("div",{"data-slot":"chart-legend-content",className:P("flex flex-wrap items-center gap-4",q),...A,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:[B("span",{className:"size-2.5 rounded-full",style:{backgroundColor:D.color??M?.color}}),B("span",{className:"text-muted-foreground text-sm",children:z?G(H,z)?.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 @@
|
|
|
1
|
+
var A=((f)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(f,{get:(q,w)=>(typeof require<"u"?require:q)[w]}):f)(function(f){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+f+'" is not supported')});import{cn as y}from"@contractspec/lib.ui-kit-core/utils";import*as g from"@radix-ui/react-checkbox";import{CheckIcon as z}from"lucide-react";import{jsx as v}from"react/jsx-runtime";function F({className:f,...q}){return v(g.Root,{"data-slot":"checkbox",className:y("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",f),...q,children:v(g.Indicator,{"data-slot":"checkbox-indicator",className:"grid place-content-center text-current transition-none",children:v(z,{className:"size-3.5"})})})}export{F as Checkbox};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var p=((l)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(l,{get:(e,t)=>(typeof require<"u"?require:e)[t]}):l)(function(l){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+l+'" is not supported')});import*as i from"@radix-ui/react-collapsible";import{jsx as o}from"react/jsx-runtime";function r({...l}){return o(i.Root,{"data-slot":"collapsible",...l})}function n({...l}){return o(i.CollapsibleTrigger,{"data-slot":"collapsible-trigger",...l})}function s({...l}){return o(i.CollapsibleContent,{"data-slot":"collapsible-content",...l})}export{n as CollapsibleTrigger,s as CollapsibleContent,r as Collapsible};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var xJ=((J)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(J,{get:(K,F)=>(typeof require<"u"?require:K)[F]}):J)(function(J){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+J+'" is not supported')});import{cn as DJ}from"@contractspec/lib.ui-kit-core/utils";import{Slot as IJ}from"@radix-ui/react-slot";import{cva as bJ}from"class-variance-authority";import*as o from"react";import{jsx as VJ}from"react/jsx-runtime";var OJ=bJ("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"}}),x=o.forwardRef(({className:J,variant:K,size:F,asChild:$=!1,...X},w)=>{return VJ($?IJ:"button",{ref:w,"data-slot":"button",className:DJ(OJ({variant:K,size:F,className:J})),...X})});x.displayName="Button";import{cn as A}from"@contractspec/lib.ui-kit-core/utils";import*as _ from"@radix-ui/react-dialog";import{XIcon as yJ}from"lucide-react";import{jsx as z,jsxs as m}from"react/jsx-runtime";function e({...J}){return z(_.Root,{"data-slot":"dialog",...J})}function aJ({...J}){return z(_.Trigger,{"data-slot":"dialog-trigger",...J})}function NJ({...J}){return z(_.Portal,{"data-slot":"dialog-portal",...J})}function nJ({...J}){return z(_.Close,{"data-slot":"dialog-close",...J})}function hJ({className:J,...K}){return z(_.Overlay,{"data-slot":"dialog-overlay",className:A("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",J),...K})}function JJ({className:J,children:K,showCloseButton:F=!0,...$}){return m(NJ,{"data-slot":"dialog-portal",children:[z(hJ,{}),m(_.Content,{"data-slot":"dialog-content",className:A("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",J),...$,children:[K,F&&m(_.Close,{"data-slot":"dialog-close",className:"absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",children:[z(yJ,{}),z("span",{className:"sr-only",children:"Close"})]})]})]})}function KJ({className:J,...K}){return z("div",{"data-slot":"dialog-header",className:A("flex flex-col gap-2 text-center sm:text-left",J),...K})}function sJ({className:J,...K}){return z("div",{"data-slot":"dialog-footer",className:A("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",J),...K})}function WJ({className:J,...K}){return z(_.Title,{"data-slot":"dialog-title",className:A("font-semibold text-lg leading-none",J),...K})}function YJ({className:J,...K}){return z(_.Description,{"data-slot":"dialog-description",className:A("text-muted-foreground text-sm",J),...K})}import{cn as S}from"@contractspec/lib.ui-kit-core/utils";import{Command as q}from"cmdk";import{SearchIcon as PJ}from"lucide-react";import{jsx as U,jsxs as u}from"react/jsx-runtime";function d({className:J,...K}){return U(q,{"data-slot":"command",className:S("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",J),...K})}function YK({title:J="Command Palette",description:K="Search for a command to run...",children:F,className:$,showCloseButton:X=!0,...w}){return u(e,{...w,children:[u(KJ,{className:"sr-only",children:[U(WJ,{children:J}),U(YJ,{children:K})]}),U(JJ,{className:S("overflow-hidden p-0",$),showCloseButton:X,children:U(d,{className:"**:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:F})})]})}function ZJ({className:J,...K}){return u("div",{"data-slot":"command-input-wrapper",className:"flex h-9 items-center gap-2 border-b px-3",children:[U(PJ,{className:"size-4 shrink-0 opacity-50"}),U(q.Input,{"data-slot":"command-input",className:S("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",J),...K})]})}function _J({className:J,...K}){return U(q.List,{"data-slot":"command-list",className:S("max-h-[300px] scroll-py-1 overflow-y-auto overflow-x-hidden",J),...K})}function $J({...J}){return U(q.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...J})}function FJ({className:J,...K}){return U(q.Group,{"data-slot":"command-group",className:S("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group-heading]]:text-xs",J),...K})}function ZK({className:J,...K}){return U(q.Separator,{"data-slot":"command-separator",className:S("-mx-1 h-px bg-border",J),...K})}function UJ({className:J,...K}){return U(q.Item,{"data-slot":"command-item",className:S("relative flex cursor-default select-none items-center gap-2 rounded-xs px-2 py-1.5 text-sm outline-hidden data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0",J),...K})}function _K({className:J,...K}){return U("span",{"data-slot":"command-shortcut",className:S("ml-auto text-muted-foreground text-xs tracking-widest",J),...K})}import{cn as CJ}from"@contractspec/lib.ui-kit-core/utils";import*as L from"@radix-ui/react-popover";import{jsx as I}from"react/jsx-runtime";function zJ({...J}){return I(L.Root,{"data-slot":"popover",...J})}function GJ({...J}){return I(L.Trigger,{"data-slot":"popover-trigger",...J})}function HJ({className:J,align:K="center",sideOffset:F=4,...$}){return I(L.Portal,{children:I(L.Content,{"data-slot":"popover-content",align:K,sideOffset:F,className:CJ("data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-hidden data-[state=closed]:animate-out data-[state=open]:animate-in",J),...$})})}function zK({...J}){return I(L.Anchor,{"data-slot":"popover-anchor",...J})}import{cn as B}from"@contractspec/lib.ui-kit-core/utils";import{Check as LJ,ChevronsUpDown as gJ,X as vJ}from"lucide-react";import*as G from"react";import{createPortal as jJ}from"react-dom";import{jsx as Z,jsxs as Q}from"react/jsx-runtime";function h(J){return String(J.value)}function P(J,K,F){if(!J.length)return-1;for(let $=1;$<=J.length;$+=1){let X=(K+F*$+J.length)%J.length;if(!J[X]?.disabled)return X}return-1}function RK({options:J,value:K,onValueChange:F,selectedValues:$,onRemoveValue:X,query:w,onQueryChange:C,placeholder:c="Select option",searchPlaceholder:r="Search option...",emptyText:l="No option found.",loadingText:XJ="Loading options...",errorText:MJ="Unable to load options.",error:b,loading:O,multiple:V,readOnly:y,disabled:k,id:QJ,name:wJ,"aria-invalid":EJ,"aria-describedby":RJ,className:p}){let[E,R]=G.useState(!1),[i,f]=G.useState(-1),[SJ,qJ]=G.useState(),a=G.useRef(null),AJ=G.useId().replace(/:/g,""),n=QJ??`combobox-${AJ}`,N=`${n}-listbox`,g=J.find((W)=>W.value===K),BJ=new Set($??(K?[String(K)]:[])),kJ=w!==void 0&&w.length>0?w:g?.label??"",v=w!==void 0||C!==void 0||V!==void 0||$!==void 0||X!==void 0||O!==void 0||b!==void 0,M=G.useCallback(()=>{let W=a.current;if(!W)return;let T=W.getBoundingClientRect();qJ({left:T.left,position:"fixed",top:T.bottom+4,width:T.width,zIndex:50})},[]);G.useEffect(()=>{if(!E||!v)return;return M(),window.addEventListener("resize",M),window.addEventListener("scroll",M,!0),()=>{window.removeEventListener("resize",M),window.removeEventListener("scroll",M,!0)}},[v,E,M]);let s=()=>{if(k||y)return;M(),R(!0),f((W)=>W>=0?W:P(J,-1,1))},t=(W)=>{if(k||y||W.disabled)return;if(F?.(h(W)),!V)R(!1)};if(v){let W=J[i],T=O?XJ:b?b??MJ:l,fJ=Z("div",{id:N,role:"listbox","aria-busy":O||void 0,"aria-multiselectable":V||void 0,className:"max-h-[300px] w-full overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md",children:J.length&&!O&&!b?J.map((Y,H)=>{let D=h(Y),j=BJ.has(D);return Q("div",{id:`${N}-${D}`,role:"option","aria-selected":j,"aria-disabled":Y.disabled||void 0,"data-active":i===H||void 0,"data-selected":j||void 0,className:B("flex cursor-default select-none items-start gap-2 rounded-xs px-2 py-1.5 text-sm outline-hidden","data-[active=true]:bg-accent data-[active=true]:text-accent-foreground",Y.disabled&&"pointer-events-none opacity-50"),onMouseDown:(TJ)=>TJ.preventDefault(),onMouseEnter:()=>f(H),onClick:()=>t(Y),children:[Z(LJ,{className:B("mt-0.5 size-4 shrink-0",j?"opacity-100":"opacity-0")}),Q("span",{className:"min-w-0",children:[Z("span",{className:"block truncate",children:Y.label}),Y.description?Z("span",{className:"block truncate text-muted-foreground text-xs",children:Y.description}):null]})]},D)}):Z("div",{className:"px-2 py-6 text-center text-muted-foreground text-sm",children:T})});return Q("div",{className:B("relative w-full min-w-0 space-y-2",p),children:[Z("input",{ref:a,id:n,name:wJ,type:"text",role:"combobox","aria-autocomplete":"list","aria-controls":N,"aria-expanded":E,"aria-activedescendant":E&&W?`${N}-${h(W)}`:void 0,"aria-invalid":EJ,"aria-describedby":RJ,value:kJ,placeholder:r??c,readOnly:y,disabled:k,className:"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm outline-hidden ring-offset-background placeholder:text-muted-foreground focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",onFocus:s,onBlur:()=>{globalThis.setTimeout(()=>R(!1),0)},onChange:(Y)=>{C?.(Y.currentTarget.value),s(),f(P(J,-1,1))},onKeyDown:(Y)=>{if(Y.key==="Escape"){R(!1);return}if(Y.key==="ArrowDown"){Y.preventDefault(),M(),R(!0),f((H)=>P(J,H,1));return}if(Y.key==="ArrowUp"){Y.preventDefault(),M(),R(!0),f((H)=>P(J,H<0?J.length:H,-1));return}if(Y.key==="Enter"&&E&&W)Y.preventDefault(),t(W)}}),E?jJ(Z("div",{"data-slot":"popover-content",className:"z-50 w-(--radix-popover-trigger-width) p-0",style:SJ,children:fJ}),document.body):null,V&&$?.length?Z("div",{className:"flex flex-wrap gap-2",children:$.map((Y)=>{let H=J.find((D)=>h(D)===Y);return Q("button",{type:"button",className:"inline-flex h-8 max-w-full items-center rounded-md border border-input px-2 text-sm disabled:opacity-50","aria-label":`Remove ${H?.label??Y}`,disabled:k||y,onClick:()=>X?.(Y),children:[Z("span",{className:"truncate",children:H?.label??Y}),Z(vJ,{className:"ml-1 size-3 shrink-0","aria-hidden":"true"})]},`selected-${Y}`)})}):null]})}return Q(zJ,{open:E,onOpenChange:R,children:[Z(GJ,{asChild:!0,children:Q(x,{type:"button",variant:"outline",role:"combobox","aria-expanded":E,disabled:k,className:B("w-full justify-between",p),children:[Z("span",{className:B(!g&&"text-muted-foreground"),children:g?.label??c}),Z(gJ,{className:"ml-2 size-4 shrink-0 opacity-50"})]})}),Z(HJ,{className:"w-(--radix-popover-trigger-width) p-0",children:Q(d,{children:[Z(ZJ,{placeholder:r}),Q(_J,{children:[Z($J,{children:l}),Z(FJ,{children:J.map((W)=>Q(UJ,{value:[W.value,W.label,...W.keywords??[]].join(" "),disabled:W.disabled,onSelect:()=>{F?.(W.value),R(!1)},children:[Z(LJ,{className:B("mr-2 size-4",K===W.value?"opacity-100":"opacity-0")}),W.label]},W.value))})]})]})})]})}export{RK as Combobox};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var k=((f)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(f,{get:(q,R)=>(typeof require<"u"?require:q)[R]}):f)(function(f){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+f+'" is not supported')});import{cn as Q}from"@contractspec/lib.ui-kit-core/utils";import*as z from"@radix-ui/react-dialog";import{XIcon as L}from"lucide-react";import{jsx as J,jsxs as V}from"react/jsx-runtime";function Y({...f}){return J(z.Root,{"data-slot":"dialog",...f})}function w({...f}){return J(z.Trigger,{"data-slot":"dialog-trigger",...f})}function X({...f}){return J(z.Portal,{"data-slot":"dialog-portal",...f})}function B({...f}){return J(z.Close,{"data-slot":"dialog-close",...f})}function b({className:f,...q}){return J(z.Overlay,{"data-slot":"dialog-overlay",className:Q("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",f),...q})}function Z({className:f,children:q,showCloseButton:R=!0,...U}){return V(X,{"data-slot":"dialog-portal",children:[J(b,{}),V(z.Content,{"data-slot":"dialog-content",className:Q("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",f),...U,children:[q,R&&V(z.Close,{"data-slot":"dialog-close",className:"absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",children:[J(L,{}),J("span",{className:"sr-only",children:"Close"})]})]})]})}function _({className:f,...q}){return J("div",{"data-slot":"dialog-header",className:Q("flex flex-col gap-2 text-center sm:text-left",f),...q})}function I({className:f,...q}){return J("div",{"data-slot":"dialog-footer",className:Q("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",f),...q})}function $({className:f,...q}){return J(z.Title,{"data-slot":"dialog-title",className:Q("font-semibold text-lg leading-none",f),...q})}function E({className:f,...q}){return J(z.Description,{"data-slot":"dialog-description",className:Q("text-muted-foreground text-sm",f),...q})}import{cn as K}from"@contractspec/lib.ui-kit-core/utils";import{Command as M}from"cmdk";import{SearchIcon as H}from"lucide-react";import{jsx as A,jsxs as W}from"react/jsx-runtime";function O({className:f,...q}){return A(M,{"data-slot":"command",className:K("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",f),...q})}function C({title:f="Command Palette",description:q="Search for a command to run...",children:R,className:U,showCloseButton:F=!0,...G}){return W(Y,{...G,children:[W(_,{className:"sr-only",children:[A($,{children:f}),A(E,{children:q})]}),A(Z,{className:K("overflow-hidden p-0",U),showCloseButton:F,children:A(O,{className:"**:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:R})})]})}function N({className:f,...q}){return W("div",{"data-slot":"command-input-wrapper",className:"flex h-9 items-center gap-2 border-b px-3",children:[A(H,{className:"size-4 shrink-0 opacity-50"}),A(M.Input,{"data-slot":"command-input",className:K("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",f),...q})]})}function d({className:f,...q}){return A(M.List,{"data-slot":"command-list",className:K("max-h-[300px] scroll-py-1 overflow-y-auto overflow-x-hidden",f),...q})}function j({...f}){return A(M.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...f})}function x({className:f,...q}){return A(M.Group,{"data-slot":"command-group",className:K("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group-heading]]:text-xs",f),...q})}function n({className:f,...q}){return A(M.Separator,{"data-slot":"command-separator",className:K("-mx-1 h-px bg-border",f),...q})}function t({className:f,...q}){return A(M.Item,{"data-slot":"command-item",className:K("relative flex cursor-default select-none items-center gap-2 rounded-xs px-2 py-1.5 text-sm outline-hidden data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0",f),...q})}function l({className:f,...q}){return A("span",{"data-slot":"command-shortcut",className:K("ml-auto text-muted-foreground text-xs tracking-widest",f),...q})}export{l as CommandShortcut,n as CommandSeparator,d as CommandList,t as CommandItem,N as CommandInput,x as CommandGroup,j as CommandEmpty,C as CommandDialog,O as Command};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var Y=((e)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(d,g)=>(typeof require<"u"?require:d)[g]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});import{cn as J}from"@contractspec/lib.ui-kit-core/utils";import{Slot as K}from"@radix-ui/react-slot";import{cva as M}from"class-variance-authority";import*as T from"react";import{jsx as O}from"react/jsx-runtime";var D=M("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"}}),l=T.forwardRef(({className:e,variant:d,size:g,asChild:C=!1,...R},t)=>{return O(C?K:"button",{ref:t,"data-slot":"button",className:J(D({variant:d,size:g,className:e})),...R})});l.displayName="Button";import{cn as o}from"@contractspec/lib.ui-kit-core/utils";import*as n from"@radix-ui/react-alert-dialog";import{jsx as i,jsxs as W}from"react/jsx-runtime";function w({...e}){return i(n.Root,{"data-slot":"alert-dialog",...e})}function F({...e}){return i(n.Trigger,{"data-slot":"alert-dialog-trigger",...e})}function Q({...e}){return i(n.Portal,{"data-slot":"alert-dialog-portal",...e})}function U({className:e,...d}){return i(n.Overlay,{"data-slot":"alert-dialog-overlay",className:o("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",e),...d})}function H({className:e,...d}){return W(Q,{children:[i(U,{}),i(n.Content,{"data-slot":"alert-dialog-content",className:o("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",e),...d})]})}function L({className:e,...d}){return i("div",{"data-slot":"alert-dialog-header",className:o("flex flex-col gap-2 text-center sm:text-left",e),...d})}function P({className:e,...d}){return i("div",{"data-slot":"alert-dialog-footer",className:o("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...d})}function q({className:e,...d}){return i(n.Title,{"data-slot":"alert-dialog-title",className:o("font-semibold text-lg",e),...d})}function B({className:e,...d}){return i(n.Description,{"data-slot":"alert-dialog-description",className:o("text-muted-foreground text-sm",e),...d})}function E({className:e,...d}){return i(n.Action,{className:o(D(),e),...d})}function G({className:e,...d}){return i(n.Cancel,{className:o(D({variant:"outline"}),e),...d})}import{jsx as f,jsxs as A}from"react/jsx-runtime";function c({open:e,onOpenChange:d,title:g,description:C,confirmLabel:R="Confirmer",cancelLabel:t="Annuler",variant:v="default",isLoading:h,onConfirm:I,trigger:b}){return A(w,{open:e,onOpenChange:d,children:[b?f(F,{asChild:!0,children:b}):null,A(H,{children:[A(L,{children:[f(q,{children:g}),C?f(B,{children:C}):null]}),A(P,{children:[f(G,{disabled:h,children:t}),f(E,{asChild:!0,children:f(l,{onClick:async()=>{await I()},disabled:h,className:v==="destructive"?"bg-destructive text-destructive-foreground hover:bg-destructive/90":void 0,children:h?"...":R})})]})]})]})}export{c as ConfirmDialog};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var l=((t)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(n,i)=>(typeof require<"u"?require:n)[i]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});import{clsx as c}from"clsx";import{twMerge as m}from"tailwind-merge";function a(...t){return m(c(t))}import*as e from"@radix-ui/react-context-menu";import{CheckIcon as s,ChevronRightIcon as p}from"lucide-react";import{jsx as o,jsxs as u}from"react/jsx-runtime";function M({...t}){return o(e.Root,{"data-slot":"context-menu",...t})}function b({className:t,...n}){return o(e.Trigger,{"data-slot":"context-menu-trigger",className:a("select-none",t),...n})}function h({...t}){return o(e.Group,{"data-slot":"context-menu-group",...t})}function R({...t}){return o(e.Portal,{"data-slot":"context-menu-portal",...t})}function y({...t}){return o(e.Sub,{"data-slot":"context-menu-sub",...t})}function I({...t}){return o(e.RadioGroup,{"data-slot":"context-menu-radio-group",...t})}function z({className:t,...n}){return o(e.Portal,{children:o(e.Content,{"data-slot":"context-menu-content",className:a("data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-context-menu-content-available-height) min-w-36 origin-(--radix-context-menu-content-transform-origin) overflow-y-auto overflow-x-hidden rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-closed:animate-out data-open:animate-in",t),...n})})}function S({className:t,inset:n,variant:i="default",...r}){return o(e.Item,{"data-slot":"context-menu-item","data-inset":n,"data-variant":i,className:a("group/context-menu-item relative flex cursor-default select-none items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-inset:pl-7 data-[variant=destructive]:text-destructive data-disabled:opacity-50 data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0 focus:*:[svg]:text-accent-foreground data-[variant=destructive]:*:[svg]:text-destructive",t),...r})}function k({className:t,inset:n,children:i,...r}){return u(e.SubTrigger,{"data-slot":"context-menu-sub-trigger","data-inset":n,className:a("flex cursor-default select-none items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-open:bg-accent data-inset:pl-7 data-open:text-accent-foreground [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",t),...r,children:[i,o(p,{className:"cn-rtl-flip ml-auto"})]})}function N({className:t,...n}){return o(e.SubContent,{"data-slot":"context-menu-sub-content",className:a("data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-32 origin-(--radix-context-menu-content-transform-origin) overflow-hidden rounded-lg border bg-popover p-1 text-popover-foreground shadow-lg duration-100 data-closed:animate-out data-open:animate-in",t),...n})}function _({className:t,children:n,checked:i,inset:r,...d}){return u(e.CheckboxItem,{"data-slot":"context-menu-checkbox-item","data-inset":r,className:a("relative flex cursor-default select-none items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-inset:pl-7 data-disabled:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",t),checked:i,...d,children:[o("span",{className:"pointer-events-none absolute right-2",children:o(e.ItemIndicator,{children:o(s,{})})}),n]})}function w({className:t,children:n,inset:i,...r}){return u(e.RadioItem,{"data-slot":"context-menu-radio-item","data-inset":i,className:a("relative flex cursor-default select-none items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-inset:pl-7 data-disabled:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",t),...r,children:[o("span",{className:"pointer-events-none absolute right-2",children:o(e.ItemIndicator,{children:o(s,{})})}),n]})}function T({className:t,inset:n,...i}){return o(e.Label,{"data-slot":"context-menu-label","data-inset":n,className:a("px-1.5 py-1 font-medium text-muted-foreground text-xs data-inset:pl-7",t),...i})}function G({className:t,...n}){return o(e.Separator,{"data-slot":"context-menu-separator",className:a("-mx-1 my-1 h-px bg-border",t),...n})}function L({className:t,...n}){return o("span",{"data-slot":"context-menu-shortcut",className:a("ml-auto text-muted-foreground text-xs tracking-widest group-focus/context-menu-item:text-accent-foreground",t),...n})}export{b as ContextMenuTrigger,k as ContextMenuSubTrigger,N as ContextMenuSubContent,y as ContextMenuSub,L as ContextMenuShortcut,G as ContextMenuSeparator,w as ContextMenuRadioItem,I as ContextMenuRadioGroup,R as ContextMenuPortal,T as ContextMenuLabel,S as ContextMenuItem,h as ContextMenuGroup,z as ContextMenuContent,_ as ContextMenuCheckboxItem,M as ContextMenu};
|
|
File without changes
|