@contractspec/lib.ui-kit 1.56.1 → 1.58.0
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/dist/browser/index.js +5 -0
- package/dist/browser/ui/accordion.js +160 -0
- package/dist/browser/ui/alert-dialog.js +205 -0
- package/dist/browser/ui/alert.js +85 -0
- package/dist/browser/ui/aspect-ratio.js +6 -0
- package/dist/browser/ui/atoms/FilterSelect/FilterSelect.js +527 -0
- package/dist/browser/ui/atoms/FilterSelect/index.js +527 -0
- package/dist/browser/ui/atoms/FilterSelect/types.js +0 -0
- package/dist/browser/ui/atoms/LoadingSpinner/LoadingSpinner.js +193 -0
- package/dist/browser/ui/atoms/LoadingSpinner/index.js +193 -0
- package/dist/browser/ui/atoms/Pagination/Pagination.js +442 -0
- package/dist/browser/ui/atoms/Pagination/index.js +442 -0
- package/dist/browser/ui/atoms/Pagination/types.js +0 -0
- package/dist/browser/ui/atoms/SearchInput/SearchInput.js +155 -0
- package/dist/browser/ui/atoms/SearchInput/index.js +155 -0
- package/dist/browser/ui/atoms/SearchInput/types.js +0 -0
- package/dist/browser/ui/avatar.js +37 -0
- package/dist/browser/ui/badge.js +28 -0
- package/dist/browser/ui/breadcrumb.js +102 -0
- package/dist/browser/ui/button.js +88 -0
- package/dist/browser/ui/card.js +90 -0
- package/dist/browser/ui/carousel.js +5 -0
- package/dist/browser/ui/checkbox.js +21 -0
- package/dist/browser/ui/collapsible.js +10 -0
- package/dist/browser/ui/command.js +5 -0
- package/dist/browser/ui/context-menu.js +214 -0
- package/dist/browser/ui/date-picker.js +85 -0
- package/dist/browser/ui/date-range-picker.js +348 -0
- package/dist/browser/ui/datetime-picker.js +439 -0
- package/dist/browser/ui/dialog.js +126 -0
- package/dist/browser/ui/dropdown-menu.js +218 -0
- package/dist/browser/ui/empty-state.js +411 -0
- package/dist/browser/ui/empty.js +71 -0
- package/dist/browser/ui/fab.js +141 -0
- package/dist/browser/ui/field.js +559 -0
- package/dist/browser/ui/form.js +150 -0
- package/dist/browser/ui/hover-card.js +57 -0
- package/dist/browser/ui/icons/Check.js +20 -0
- package/dist/browser/ui/icons/ChevronDown.js +20 -0
- package/dist/browser/ui/icons/ChevronRight.js +20 -0
- package/dist/browser/ui/icons/ChevronUp.js +20 -0
- package/dist/browser/ui/icons/CircleUser.js +20 -0
- package/dist/browser/ui/icons/Info.js +20 -0
- package/dist/browser/ui/icons/Key.js +20 -0
- package/dist/browser/ui/icons/MoonStar.js +20 -0
- package/dist/browser/ui/icons/Sun.js +20 -0
- package/dist/browser/ui/icons/X.js +20 -0
- package/dist/browser/ui/icons/iconWithClassName.js +16 -0
- package/dist/browser/ui/input.js +18 -0
- package/dist/browser/ui/label.js +32 -0
- package/dist/browser/ui/link.js +16 -0
- package/dist/browser/ui/loading-button.js +350 -0
- package/dist/browser/ui/loading-overlay.js +398 -0
- package/dist/browser/ui/loading-screen.js +537 -0
- package/dist/browser/ui/marketing/FeatureGrid.js +42 -0
- package/dist/browser/ui/marketing/Hero.js +146 -0
- package/dist/browser/ui/marketing/PricingTable.js +158 -0
- package/dist/browser/ui/marketing/index.js +247 -0
- package/dist/browser/ui/menubar.js +225 -0
- package/dist/browser/ui/molecules/Autocomplete/index.js +5 -0
- package/dist/browser/ui/molecules/SearchAndFilter/SearchAndFilter.js +784 -0
- package/dist/browser/ui/molecules/SearchAndFilter/index.js +784 -0
- package/dist/browser/ui/molecules/SearchAndFilter/types.js +0 -0
- package/dist/browser/ui/molecules/SkeletonList.js +46 -0
- package/dist/browser/ui/nativewind-env.d.js +0 -0
- package/dist/browser/ui/navigation-menu.js +147 -0
- package/dist/browser/ui/organisms/ErrorBoundary/ErrorBoundary.js +222 -0
- package/dist/browser/ui/organisms/ErrorBoundary/index.js +222 -0
- package/dist/browser/ui/organisms/ListPage/ListPage.js +1375 -0
- package/dist/browser/ui/organisms/ListPage/index.js +1375 -0
- package/dist/browser/ui/organisms/ListPage/types.js +0 -0
- package/dist/browser/ui/page-header.js +405 -0
- package/dist/browser/ui/password-strength.js +400 -0
- package/dist/browser/ui/popover.js +59 -0
- package/dist/browser/ui/progress.js +57 -0
- package/dist/browser/ui/radio-group.js +32 -0
- package/dist/browser/ui/select.js +172 -0
- package/dist/browser/ui/separator.js +20 -0
- package/dist/browser/ui/sheet.js +5 -0
- package/dist/browser/ui/sidebar.js +5 -0
- package/dist/browser/ui/skeleton.js +32 -0
- package/dist/browser/ui/stack.js +243 -0
- package/dist/browser/ui/stepper.js +274 -0
- package/dist/browser/ui/switch.js +84 -0
- package/dist/browser/ui/table.js +100 -0
- package/dist/browser/ui/tabs.js +30 -0
- package/dist/browser/ui/text.js +23 -0
- package/dist/browser/ui/textarea.js +18 -0
- package/dist/browser/ui/time-picker.js +83 -0
- package/dist/browser/ui/toggle-group.js +150 -0
- package/dist/browser/ui/toggle.js +90 -0
- package/dist/browser/ui/tooltip.js +57 -0
- package/dist/browser/ui/typography.js +124 -0
- package/dist/browser/ui/useColorScheme.js +15 -0
- package/dist/browser/ui/useListState.js +68 -0
- package/dist/browser/ui/usecases/UseCaseCard.js +359 -0
- package/dist/browser/ui/usecases/UserStoryCard.js +274 -0
- package/dist/browser/ui/usecases/index.js +394 -0
- package/dist/browser/ui/utils.js +9 -0
- package/dist/index.d.ts +1 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -5
- package/dist/ui/accordion.d.ts +15 -34
- package/dist/ui/accordion.d.ts.map +1 -1
- package/dist/ui/accordion.js +154 -86
- package/dist/ui/alert-dialog.d.ts +36 -67
- package/dist/ui/alert-dialog.d.ts.map +1 -1
- package/dist/ui/alert-dialog.js +192 -84
- package/dist/ui/alert.d.ts +15 -34
- package/dist/ui/alert.d.ts.map +1 -1
- package/dist/ui/alert.js +80 -44
- package/dist/ui/aspect-ratio.d.ts +4 -10
- package/dist/ui/aspect-ratio.d.ts.map +1 -1
- package/dist/ui/aspect-ratio.js +6 -7
- package/dist/ui/atoms/FilterSelect/FilterSelect.d.ts +3 -7
- package/dist/ui/atoms/FilterSelect/FilterSelect.d.ts.map +1 -1
- package/dist/ui/atoms/FilterSelect/FilterSelect.js +526 -56
- package/dist/ui/atoms/FilterSelect/index.d.ts +3 -3
- package/dist/ui/atoms/FilterSelect/index.d.ts.map +1 -0
- package/dist/ui/atoms/FilterSelect/index.js +527 -2
- package/dist/ui/atoms/FilterSelect/types.d.ts +13 -16
- package/dist/ui/atoms/FilterSelect/types.d.ts.map +1 -1
- package/dist/ui/atoms/FilterSelect/types.js +1 -0
- package/dist/ui/atoms/LoadingSpinner/LoadingSpinner.d.ts +14 -17
- package/dist/ui/atoms/LoadingSpinner/LoadingSpinner.d.ts.map +1 -1
- package/dist/ui/atoms/LoadingSpinner/LoadingSpinner.js +191 -45
- package/dist/ui/atoms/LoadingSpinner/index.d.ts +2 -2
- package/dist/ui/atoms/LoadingSpinner/index.d.ts.map +1 -0
- package/dist/ui/atoms/LoadingSpinner/index.js +193 -2
- package/dist/ui/atoms/Pagination/Pagination.d.ts +3 -7
- package/dist/ui/atoms/Pagination/Pagination.d.ts.map +1 -1
- package/dist/ui/atoms/Pagination/Pagination.js +441 -161
- package/dist/ui/atoms/Pagination/index.d.ts +3 -3
- package/dist/ui/atoms/Pagination/index.d.ts.map +1 -0
- package/dist/ui/atoms/Pagination/index.js +442 -2
- package/dist/ui/atoms/Pagination/types.d.ts +11 -14
- package/dist/ui/atoms/Pagination/types.d.ts.map +1 -1
- package/dist/ui/atoms/Pagination/types.js +1 -0
- package/dist/ui/atoms/SearchInput/SearchInput.d.ts +3 -7
- package/dist/ui/atoms/SearchInput/SearchInput.d.ts.map +1 -1
- package/dist/ui/atoms/SearchInput/SearchInput.js +154 -47
- package/dist/ui/atoms/SearchInput/index.d.ts +3 -3
- package/dist/ui/atoms/SearchInput/index.d.ts.map +1 -0
- package/dist/ui/atoms/SearchInput/index.js +156 -3
- package/dist/ui/atoms/SearchInput/types.d.ts +8 -11
- package/dist/ui/atoms/SearchInput/types.d.ts.map +1 -1
- package/dist/ui/atoms/SearchInput/types.js +1 -0
- package/dist/ui/avatar.d.ts +12 -26
- package/dist/ui/avatar.d.ts.map +1 -1
- package/dist/ui/avatar.js +34 -24
- package/dist/ui/badge.d.ts +8 -18
- package/dist/ui/badge.d.ts.map +1 -1
- package/dist/ui/badge.js +24 -21
- package/dist/ui/breadcrumb.d.ts +12 -38
- package/dist/ui/breadcrumb.d.ts.map +1 -1
- package/dist/ui/breadcrumb.js +93 -62
- package/dist/ui/button.d.ts +13 -23
- package/dist/ui/button.d.ts.map +1 -1
- package/dist/ui/button.js +83 -69
- package/dist/ui/card.d.ts +22 -43
- package/dist/ui/card.d.ts.map +1 -1
- package/dist/ui/card.js +84 -45
- package/dist/ui/carousel.d.ts +1 -4
- package/dist/ui/carousel.d.ts.map +1 -1
- package/dist/ui/carousel.js +6 -6
- package/dist/ui/checkbox.d.ts +9 -13
- package/dist/ui/checkbox.d.ts.map +1 -1
- package/dist/ui/checkbox.js +20 -19
- package/dist/ui/collapsible.d.ts +16 -22
- package/dist/ui/collapsible.d.ts.map +1 -1
- package/dist/ui/collapsible.js +10 -9
- package/dist/ui/command.d.ts +1 -4
- package/dist/ui/command.d.ts.map +1 -1
- package/dist/ui/command.js +6 -6
- package/dist/ui/context-menu.d.ts +64 -105
- package/dist/ui/context-menu.d.ts.map +1 -1
- package/dist/ui/context-menu.js +203 -96
- package/dist/ui/date-picker.d.ts +9 -22
- package/dist/ui/date-picker.d.ts.map +1 -1
- package/dist/ui/date-picker.js +81 -49
- package/dist/ui/date-range-picker.d.ts +15 -28
- package/dist/ui/date-range-picker.d.ts.map +1 -1
- package/dist/ui/date-range-picker.js +344 -81
- package/dist/ui/datetime-picker.d.ts +11 -26
- package/dist/ui/datetime-picker.d.ts.map +1 -1
- package/dist/ui/datetime-picker.js +437 -42
- package/dist/ui/dialog.d.ts +37 -63
- package/dist/ui/dialog.d.ts.map +1 -1
- package/dist/ui/dialog.js +114 -68
- package/dist/ui/dropdown-menu.d.ts +65 -107
- package/dist/ui/dropdown-menu.d.ts.map +1 -1
- package/dist/ui/dropdown-menu.js +207 -98
- package/dist/ui/empty-state.d.ts +13 -26
- package/dist/ui/empty-state.d.ts.map +1 -1
- package/dist/ui/empty-state.js +409 -43
- package/dist/ui/empty.d.ts +11 -35
- package/dist/ui/empty.d.ts.map +1 -1
- package/dist/ui/empty.js +59 -50
- package/dist/ui/fab.d.ts +17 -31
- package/dist/ui/fab.d.ts.map +1 -1
- package/dist/ui/fab.js +138 -100
- package/dist/ui/field.d.ts +25 -65
- package/dist/ui/field.d.ts.map +1 -1
- package/dist/ui/field.js +548 -111
- package/dist/ui/form.d.ts +26 -47
- package/dist/ui/form.d.ts.map +1 -1
- package/dist/ui/form.js +139 -83
- package/dist/ui/hover-card.d.ts +16 -26
- package/dist/ui/hover-card.d.ts.map +1 -1
- package/dist/ui/hover-card.js +55 -30
- package/dist/ui/icons/Check.d.ts +3 -2
- package/dist/ui/icons/Check.d.ts.map +1 -0
- package/dist/ui/icons/Check.js +19 -7
- package/dist/ui/icons/ChevronDown.d.ts +3 -2
- package/dist/ui/icons/ChevronDown.d.ts.map +1 -0
- package/dist/ui/icons/ChevronDown.js +19 -7
- package/dist/ui/icons/ChevronRight.d.ts +3 -2
- package/dist/ui/icons/ChevronRight.d.ts.map +1 -0
- package/dist/ui/icons/ChevronRight.js +19 -7
- package/dist/ui/icons/ChevronUp.d.ts +3 -2
- package/dist/ui/icons/ChevronUp.d.ts.map +1 -0
- package/dist/ui/icons/ChevronUp.js +19 -7
- package/dist/ui/icons/CircleUser.d.ts +3 -2
- package/dist/ui/icons/CircleUser.d.ts.map +1 -0
- package/dist/ui/icons/CircleUser.js +19 -7
- package/dist/ui/icons/Info.d.ts +3 -2
- package/dist/ui/icons/Info.d.ts.map +1 -0
- package/dist/ui/icons/Info.js +19 -7
- package/dist/ui/icons/Key.d.ts +3 -2
- package/dist/ui/icons/Key.d.ts.map +1 -0
- package/dist/ui/icons/Key.js +19 -7
- package/dist/ui/icons/MoonStar.d.ts +3 -2
- package/dist/ui/icons/MoonStar.d.ts.map +1 -0
- package/dist/ui/icons/MoonStar.js +19 -7
- package/dist/ui/icons/Sun.d.ts +3 -2
- package/dist/ui/icons/Sun.d.ts.map +1 -0
- package/dist/ui/icons/Sun.js +19 -7
- package/dist/ui/icons/X.d.ts +3 -2
- package/dist/ui/icons/X.d.ts.map +1 -0
- package/dist/ui/icons/X.js +19 -7
- package/dist/ui/icons/iconWithClassName.d.ts +2 -6
- package/dist/ui/icons/iconWithClassName.d.ts.map +1 -1
- package/dist/ui/icons/iconWithClassName.js +14 -13
- package/dist/ui/input.d.ts +5 -13
- package/dist/ui/input.d.ts.map +1 -1
- package/dist/ui/input.js +16 -14
- package/dist/ui/label.d.ts +2 -14
- package/dist/ui/label.d.ts.map +1 -1
- package/dist/ui/label.js +30 -21
- package/dist/ui/link.d.ts +5 -12
- package/dist/ui/link.d.ts.map +1 -1
- package/dist/ui/link.js +15 -14
- package/dist/ui/loading-button.d.ts +7 -17
- package/dist/ui/loading-button.d.ts.map +1 -1
- package/dist/ui/loading-button.js +349 -20
- package/dist/ui/loading-overlay.d.ts +5 -13
- package/dist/ui/loading-overlay.d.ts.map +1 -1
- package/dist/ui/loading-overlay.js +399 -44
- package/dist/ui/loading-screen.d.ts +4 -11
- package/dist/ui/loading-screen.d.ts.map +1 -1
- package/dist/ui/loading-screen.js +536 -91
- package/dist/ui/marketing/FeatureGrid.d.ts +10 -19
- package/dist/ui/marketing/FeatureGrid.d.ts.map +1 -1
- package/dist/ui/marketing/FeatureGrid.js +41 -33
- package/dist/ui/marketing/Hero.d.ts +16 -27
- package/dist/ui/marketing/Hero.d.ts.map +1 -1
- package/dist/ui/marketing/Hero.js +145 -50
- package/dist/ui/marketing/PricingTable.d.ts +15 -23
- package/dist/ui/marketing/PricingTable.d.ts.map +1 -1
- package/dist/ui/marketing/PricingTable.js +157 -58
- package/dist/ui/marketing/index.d.ts +4 -4
- package/dist/ui/marketing/index.d.ts.map +1 -0
- package/dist/ui/marketing/index.js +247 -4
- package/dist/ui/menubar.d.ts +64 -110
- package/dist/ui/menubar.d.ts.map +1 -1
- package/dist/ui/menubar.js +212 -106
- package/dist/ui/molecules/Autocomplete/index.d.ts +1 -4
- package/dist/ui/molecules/Autocomplete/index.d.ts.map +1 -1
- package/dist/ui/molecules/Autocomplete/index.js +6 -6
- package/dist/ui/molecules/SearchAndFilter/SearchAndFilter.d.ts +3 -7
- package/dist/ui/molecules/SearchAndFilter/SearchAndFilter.d.ts.map +1 -1
- package/dist/ui/molecules/SearchAndFilter/SearchAndFilter.js +783 -104
- package/dist/ui/molecules/SearchAndFilter/index.d.ts +3 -3
- package/dist/ui/molecules/SearchAndFilter/index.d.ts.map +1 -0
- package/dist/ui/molecules/SearchAndFilter/index.js +784 -2
- package/dist/ui/molecules/SearchAndFilter/types.d.ts +18 -23
- package/dist/ui/molecules/SearchAndFilter/types.d.ts.map +1 -1
- package/dist/ui/molecules/SearchAndFilter/types.js +1 -0
- package/dist/ui/molecules/SkeletonList.d.ts +5 -13
- package/dist/ui/molecules/SkeletonList.d.ts.map +1 -1
- package/dist/ui/molecules/SkeletonList.js +46 -14
- package/dist/ui/nativewind-env.d.js +1 -0
- package/dist/ui/navigation-menu.d.ts +35 -64
- package/dist/ui/navigation-menu.d.ts.map +1 -1
- package/dist/ui/navigation-menu.js +140 -79
- package/dist/ui/organisms/ErrorBoundary/ErrorBoundary.d.ts +18 -22
- package/dist/ui/organisms/ErrorBoundary/ErrorBoundary.d.ts.map +1 -1
- package/dist/ui/organisms/ErrorBoundary/ErrorBoundary.js +220 -104
- package/dist/ui/organisms/ErrorBoundary/index.d.ts +3 -2
- package/dist/ui/organisms/ErrorBoundary/index.d.ts.map +1 -0
- package/dist/ui/organisms/ErrorBoundary/index.js +222 -2
- package/dist/ui/organisms/ListPage/ListPage.d.ts +2 -28
- package/dist/ui/organisms/ListPage/ListPage.d.ts.map +1 -1
- package/dist/ui/organisms/ListPage/ListPage.js +1374 -196
- package/dist/ui/organisms/ListPage/index.d.ts +3 -3
- package/dist/ui/organisms/ListPage/index.d.ts.map +1 -0
- package/dist/ui/organisms/ListPage/index.js +1375 -2
- package/dist/ui/organisms/ListPage/types.d.ts +34 -39
- package/dist/ui/organisms/ListPage/types.d.ts.map +1 -1
- package/dist/ui/organisms/ListPage/types.js +1 -0
- package/dist/ui/page-header.d.ts +12 -24
- package/dist/ui/page-header.d.ts.map +1 -1
- package/dist/ui/page-header.js +403 -38
- package/dist/ui/password-strength.d.ts +10 -17
- package/dist/ui/password-strength.d.ts.map +1 -1
- package/dist/ui/password-strength.js +396 -94
- package/dist/ui/popover.d.ts +14 -26
- package/dist/ui/popover.d.ts.map +1 -1
- package/dist/ui/popover.js +57 -32
- package/dist/ui/progress.d.ts +6 -15
- package/dist/ui/progress.d.ts.map +1 -1
- package/dist/ui/progress.js +54 -36
- package/dist/ui/radio-group.d.ts +3 -13
- package/dist/ui/radio-group.d.ts.map +1 -1
- package/dist/ui/radio-group.js +29 -19
- package/dist/ui/select.d.ts +43 -75
- package/dist/ui/select.d.ts.map +1 -1
- package/dist/ui/select.js +163 -101
- package/dist/ui/separator.d.ts +5 -14
- package/dist/ui/separator.d.ts.map +1 -1
- package/dist/ui/separator.js +19 -16
- package/dist/ui/sheet.d.ts +1 -4
- package/dist/ui/sheet.d.ts.map +1 -1
- package/dist/ui/sheet.js +6 -6
- package/dist/ui/sidebar.d.ts +1 -4
- package/dist/ui/sidebar.d.ts.map +1 -1
- package/dist/ui/sidebar.js +6 -6
- package/dist/ui/skeleton.d.ts +3 -10
- package/dist/ui/skeleton.d.ts.map +1 -1
- package/dist/ui/skeleton.js +31 -22
- package/dist/ui/stack.d.ts +34 -67
- package/dist/ui/stack.d.ts.map +1 -1
- package/dist/ui/stack.js +235 -229
- package/dist/ui/stepper.d.ts +10 -20
- package/dist/ui/stepper.d.ts.map +1 -1
- package/dist/ui/stepper.js +269 -32
- package/dist/ui/switch.d.ts +5 -12
- package/dist/ui/switch.d.ts.map +1 -1
- package/dist/ui/switch.js +79 -48
- package/dist/ui/table.d.ts +24 -50
- package/dist/ui/table.d.ts.map +1 -1
- package/dist/ui/table.js +99 -55
- package/dist/ui/tabs.d.ts +23 -28
- package/dist/ui/tabs.d.ts.map +1 -1
- package/dist/ui/tabs.js +27 -25
- package/dist/ui/text.d.ts +11 -19
- package/dist/ui/text.d.ts.map +1 -1
- package/dist/ui/text.js +21 -16
- package/dist/ui/textarea.d.ts +5 -8
- package/dist/ui/textarea.d.ts.map +1 -1
- package/dist/ui/textarea.js +15 -16
- package/dist/ui/time-picker.d.ts +8 -20
- package/dist/ui/time-picker.d.ts.map +1 -1
- package/dist/ui/time-picker.js +79 -48
- package/dist/ui/toggle-group.d.ts +14 -34
- package/dist/ui/toggle-group.d.ts.map +1 -1
- package/dist/ui/toggle-group.js +144 -48
- package/dist/ui/toggle.d.ts +16 -30
- package/dist/ui/toggle.d.ts.map +1 -1
- package/dist/ui/toggle.js +85 -61
- package/dist/ui/tooltip.d.ts +18 -28
- package/dist/ui/tooltip.d.ts.map +1 -1
- package/dist/ui/tooltip.js +55 -38
- package/dist/ui/typography.d.ts +15 -63
- package/dist/ui/typography.d.ts.map +1 -1
- package/dist/ui/typography.js +101 -64
- package/dist/ui/useColorScheme.d.ts +5 -10
- package/dist/ui/useColorScheme.d.ts.map +1 -1
- package/dist/ui/useColorScheme.js +14 -15
- package/dist/ui/useListState.d.ts +23 -31
- package/dist/ui/useListState.d.ts.map +1 -1
- package/dist/ui/useListState.js +67 -73
- package/dist/ui/usecases/UseCaseCard.d.ts +7 -18
- package/dist/ui/usecases/UseCaseCard.d.ts.map +1 -1
- package/dist/ui/usecases/UseCaseCard.js +359 -34
- package/dist/ui/usecases/UserStoryCard.d.ts +5 -14
- package/dist/ui/usecases/UserStoryCard.d.ts.map +1 -1
- package/dist/ui/usecases/UserStoryCard.js +274 -35
- package/dist/ui/usecases/index.d.ts +3 -3
- package/dist/ui/usecases/index.d.ts.map +1 -0
- package/dist/ui/usecases/index.js +394 -3
- package/dist/ui/utils.d.ts +2 -6
- package/dist/ui/utils.d.ts.map +1 -1
- package/dist/ui/utils.js +6 -7
- package/package.json +775 -209
- package/dist/index.js.map +0 -1
- package/dist/ui/accordion.js.map +0 -1
- package/dist/ui/alert-dialog.js.map +0 -1
- package/dist/ui/alert.js.map +0 -1
- package/dist/ui/aspect-ratio.js.map +0 -1
- package/dist/ui/atoms/FilterSelect/FilterSelect.js.map +0 -1
- package/dist/ui/atoms/LoadingSpinner/LoadingSpinner.js.map +0 -1
- package/dist/ui/atoms/Pagination/Pagination.js.map +0 -1
- package/dist/ui/atoms/SearchInput/SearchInput.js.map +0 -1
- package/dist/ui/avatar.js.map +0 -1
- package/dist/ui/badge.js.map +0 -1
- package/dist/ui/breadcrumb.js.map +0 -1
- package/dist/ui/button.js.map +0 -1
- package/dist/ui/card.js.map +0 -1
- package/dist/ui/carousel.js.map +0 -1
- package/dist/ui/checkbox.js.map +0 -1
- package/dist/ui/collapsible.js.map +0 -1
- package/dist/ui/command.js.map +0 -1
- package/dist/ui/context-menu.js.map +0 -1
- package/dist/ui/date-picker.js.map +0 -1
- package/dist/ui/date-range-picker.js.map +0 -1
- package/dist/ui/datetime-picker.js.map +0 -1
- package/dist/ui/dialog.js.map +0 -1
- package/dist/ui/dropdown-menu.js.map +0 -1
- package/dist/ui/empty-state.js.map +0 -1
- package/dist/ui/empty.js.map +0 -1
- package/dist/ui/fab.js.map +0 -1
- package/dist/ui/field.js.map +0 -1
- package/dist/ui/form.js.map +0 -1
- package/dist/ui/hover-card.js.map +0 -1
- package/dist/ui/icons/Check.js.map +0 -1
- package/dist/ui/icons/ChevronDown.js.map +0 -1
- package/dist/ui/icons/ChevronRight.js.map +0 -1
- package/dist/ui/icons/ChevronUp.js.map +0 -1
- package/dist/ui/icons/CircleUser.js.map +0 -1
- package/dist/ui/icons/Info.js.map +0 -1
- package/dist/ui/icons/Key.js.map +0 -1
- package/dist/ui/icons/MoonStar.js.map +0 -1
- package/dist/ui/icons/Sun.js.map +0 -1
- package/dist/ui/icons/X.js.map +0 -1
- package/dist/ui/icons/iconWithClassName.js.map +0 -1
- package/dist/ui/input.js.map +0 -1
- package/dist/ui/label.js.map +0 -1
- package/dist/ui/link.js.map +0 -1
- package/dist/ui/loading-button.js.map +0 -1
- package/dist/ui/loading-overlay.js.map +0 -1
- package/dist/ui/loading-screen.js.map +0 -1
- package/dist/ui/marketing/FeatureGrid.js.map +0 -1
- package/dist/ui/marketing/Hero.js.map +0 -1
- package/dist/ui/marketing/PricingTable.js.map +0 -1
- package/dist/ui/menubar.js.map +0 -1
- package/dist/ui/molecules/Autocomplete/index.js.map +0 -1
- package/dist/ui/molecules/SearchAndFilter/SearchAndFilter.js.map +0 -1
- package/dist/ui/molecules/SkeletonList.js.map +0 -1
- package/dist/ui/nativewind-env.d.ts +0 -1
- package/dist/ui/navigation-menu.js.map +0 -1
- package/dist/ui/organisms/ErrorBoundary/ErrorBoundary.js.map +0 -1
- package/dist/ui/organisms/ListPage/ListPage.js.map +0 -1
- package/dist/ui/page-header.js.map +0 -1
- package/dist/ui/password-strength.js.map +0 -1
- package/dist/ui/popover.js.map +0 -1
- package/dist/ui/progress.js.map +0 -1
- package/dist/ui/radio-group.js.map +0 -1
- package/dist/ui/select.js.map +0 -1
- package/dist/ui/separator.js.map +0 -1
- package/dist/ui/sheet.js.map +0 -1
- package/dist/ui/sidebar.js.map +0 -1
- package/dist/ui/skeleton.js.map +0 -1
- package/dist/ui/stack.js.map +0 -1
- package/dist/ui/stepper.js.map +0 -1
- package/dist/ui/switch.js.map +0 -1
- package/dist/ui/table.js.map +0 -1
- package/dist/ui/tabs.js.map +0 -1
- package/dist/ui/text.js.map +0 -1
- package/dist/ui/textarea.js.map +0 -1
- package/dist/ui/time-picker.js.map +0 -1
- package/dist/ui/toggle-group.js.map +0 -1
- package/dist/ui/toggle.js.map +0 -1
- package/dist/ui/tooltip.js.map +0 -1
- package/dist/ui/typography.js.map +0 -1
- package/dist/ui/useColorScheme.js.map +0 -1
- package/dist/ui/useListState.js.map +0 -1
- package/dist/ui/usecases/UseCaseCard.js.map +0 -1
- package/dist/ui/usecases/UserStoryCard.js.map +0 -1
- package/dist/ui/utils.js.map +0 -1
|
@@ -1,107 +1,223 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
import React from "react";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
1
|
+
// @bun
|
|
2
|
+
// ui/text.tsx
|
|
3
|
+
import * as Slot from "@rn-primitives/slot";
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
import { Text as RNText } from "react-native";
|
|
6
|
+
import { cn } from "@contractspec/lib.ui-kit-core/utils";
|
|
7
|
+
import { jsxDEV } from "react/jsx-dev-runtime";
|
|
8
|
+
var TextClassContext = React.createContext(undefined);
|
|
9
|
+
function Text2({
|
|
10
|
+
className,
|
|
11
|
+
asChild = false,
|
|
12
|
+
...props
|
|
13
|
+
}) {
|
|
14
|
+
const textClass = React.useContext(TextClassContext);
|
|
15
|
+
const Component = asChild ? Slot.Text : RNText;
|
|
16
|
+
return /* @__PURE__ */ jsxDEV(Component, {
|
|
17
|
+
className: cn("text-foreground web:select-text text-base", textClass, className),
|
|
18
|
+
...props
|
|
19
|
+
}, undefined, false, undefined, this);
|
|
20
|
+
}
|
|
21
|
+
// ui/button.tsx
|
|
22
|
+
import { cva } from "class-variance-authority";
|
|
23
|
+
import { Pressable } from "react-native";
|
|
24
|
+
import { cn as cn2 } from "@contractspec/lib.ui-kit-core/utils";
|
|
25
|
+
import { jsxDEV as jsxDEV2 } from "react/jsx-dev-runtime";
|
|
26
|
+
var buttonVariants = cva("group flex items-center justify-center rounded-md web:ring-offset-background web:transition-colors web:focus-visible:outline-hidden web:focus-visible:ring-2 web:focus-visible:ring-ring web:focus-visible:ring-offset-2", {
|
|
27
|
+
variants: {
|
|
28
|
+
variant: {
|
|
29
|
+
default: "bg-primary web:hover:opacity-90 active:opacity-90",
|
|
30
|
+
destructive: "bg-destructive web:hover:opacity-90 active:opacity-90",
|
|
31
|
+
outline: "border border-input bg-background web:hover:bg-accent web:hover:text-accent-foreground active:bg-accent",
|
|
32
|
+
secondary: "bg-secondary web:hover:opacity-80 active:opacity-80",
|
|
33
|
+
ghost: "web:hover:bg-accent web:hover:text-accent-foreground active:bg-accent",
|
|
34
|
+
link: "web:underline-offset-4 web:hover:underline web:focus:underline"
|
|
35
|
+
},
|
|
36
|
+
size: {
|
|
37
|
+
default: "h-10 px-4 py-2 native:h-12 native:px-5 native:py-3",
|
|
38
|
+
sm: "h-9 rounded-md px-3",
|
|
39
|
+
lg: "h-11 rounded-md px-8 native:h-14",
|
|
40
|
+
icon: "h-10 w-10"
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
defaultVariants: {
|
|
44
|
+
variant: "default",
|
|
45
|
+
size: "default"
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
var buttonTextVariants = cva("web:whitespace-nowrap text-sm native:text-base font-medium text-foreground web:transition-colors", {
|
|
49
|
+
variants: {
|
|
50
|
+
variant: {
|
|
51
|
+
default: "text-primary-foreground",
|
|
52
|
+
destructive: "text-destructive-foreground",
|
|
53
|
+
outline: "group-active:text-accent-foreground",
|
|
54
|
+
secondary: "text-secondary-foreground group-active:text-secondary-foreground",
|
|
55
|
+
ghost: "group-active:text-accent-foreground",
|
|
56
|
+
link: "text-primary group-active:underline"
|
|
57
|
+
},
|
|
58
|
+
size: {
|
|
59
|
+
default: "",
|
|
60
|
+
sm: "",
|
|
61
|
+
lg: "native:text-lg",
|
|
62
|
+
icon: ""
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
defaultVariants: {
|
|
66
|
+
variant: "default",
|
|
67
|
+
size: "default"
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
function Button({ ref, className, variant, size, ...props }) {
|
|
71
|
+
return /* @__PURE__ */ jsxDEV2(TextClassContext.Provider, {
|
|
72
|
+
value: buttonTextVariants({
|
|
73
|
+
variant,
|
|
74
|
+
size,
|
|
75
|
+
className: "web:pointer-events-none"
|
|
76
|
+
}),
|
|
77
|
+
children: /* @__PURE__ */ jsxDEV2(Pressable, {
|
|
78
|
+
className: cn2(props.disabled && "web:pointer-events-none opacity-50", buttonVariants({ variant, size, className })),
|
|
79
|
+
ref,
|
|
80
|
+
role: "button",
|
|
81
|
+
...props
|
|
82
|
+
}, undefined, false, undefined, this)
|
|
83
|
+
}, undefined, false, undefined, this);
|
|
84
|
+
}
|
|
85
|
+
// ui/organisms/ErrorBoundary/ErrorBoundary.tsx
|
|
86
|
+
import React2 from "react";
|
|
87
|
+
import { AlertTriangle, RefreshCw, Home } from "lucide-react";
|
|
88
|
+
import { jsxDEV as jsxDEV3 } from "react/jsx-dev-runtime";
|
|
89
|
+
"use client";
|
|
90
|
+
var DefaultErrorFallback = ({
|
|
91
|
+
error,
|
|
92
|
+
errorId,
|
|
93
|
+
resetError
|
|
94
|
+
}) => {
|
|
95
|
+
const isDevelopment = true;
|
|
96
|
+
return /* @__PURE__ */ jsxDEV3("div", {
|
|
97
|
+
className: "flex min-h-screen items-center justify-center bg-gray-50 px-4",
|
|
98
|
+
children: /* @__PURE__ */ jsxDEV3("div", {
|
|
99
|
+
className: "w-full max-w-md rounded-lg bg-white p-6 text-center shadow-lg",
|
|
100
|
+
children: [
|
|
101
|
+
/* @__PURE__ */ jsxDEV3("div", {
|
|
102
|
+
className: "mb-4 flex justify-center",
|
|
103
|
+
children: /* @__PURE__ */ jsxDEV3(AlertTriangle, {
|
|
104
|
+
className: "h-12 w-12 text-red-500"
|
|
105
|
+
}, undefined, false, undefined, this)
|
|
106
|
+
}, undefined, false, undefined, this),
|
|
107
|
+
/* @__PURE__ */ jsxDEV3("h1", {
|
|
108
|
+
className: "mb-2 text-2xl font-semibold text-gray-900",
|
|
109
|
+
children: "Une erreur s'est produite"
|
|
110
|
+
}, undefined, false, undefined, this),
|
|
111
|
+
/* @__PURE__ */ jsxDEV3("p", {
|
|
112
|
+
className: "mb-6 text-gray-600",
|
|
113
|
+
children: "Nous nous excusons pour ce d\xE9sagr\xE9ment. Notre \xE9quipe a \xE9t\xE9 notifi\xE9e et travaille \xE0 r\xE9soudre le probl\xE8me."
|
|
114
|
+
}, undefined, false, undefined, this),
|
|
115
|
+
isDevelopment && /* @__PURE__ */ jsxDEV3("div", {
|
|
116
|
+
className: "mb-6 rounded-md bg-red-50 p-4 text-left",
|
|
117
|
+
children: [
|
|
118
|
+
/* @__PURE__ */ jsxDEV3("p", {
|
|
119
|
+
className: "mb-2 text-base font-medium text-red-800",
|
|
120
|
+
children: "Erreur de d\xE9veloppement:"
|
|
121
|
+
}, undefined, false, undefined, this),
|
|
122
|
+
/* @__PURE__ */ jsxDEV3("p", {
|
|
123
|
+
className: "font-mono text-sm break-all text-red-700",
|
|
124
|
+
children: error.message
|
|
125
|
+
}, undefined, false, undefined, this),
|
|
126
|
+
errorId && /* @__PURE__ */ jsxDEV3("p", {
|
|
127
|
+
className: "mt-2 text-sm text-red-600",
|
|
128
|
+
children: [
|
|
129
|
+
"ID: ",
|
|
130
|
+
errorId
|
|
131
|
+
]
|
|
132
|
+
}, undefined, true, undefined, this)
|
|
133
|
+
]
|
|
134
|
+
}, undefined, true, undefined, this),
|
|
135
|
+
/* @__PURE__ */ jsxDEV3("div", {
|
|
136
|
+
className: "flex flex-col justify-center gap-3 sm:flex-row",
|
|
137
|
+
children: [
|
|
138
|
+
/* @__PURE__ */ jsxDEV3(Button, {
|
|
139
|
+
onPress: resetError,
|
|
140
|
+
className: "flex items-center gap-2",
|
|
141
|
+
children: [
|
|
142
|
+
/* @__PURE__ */ jsxDEV3(RefreshCw, {
|
|
143
|
+
className: "h-4 w-4"
|
|
144
|
+
}, undefined, false, undefined, this),
|
|
145
|
+
"R\xE9essayer"
|
|
146
|
+
]
|
|
147
|
+
}, undefined, true, undefined, this),
|
|
148
|
+
/* @__PURE__ */ jsxDEV3(Button, {
|
|
149
|
+
onPress: () => window.location.href = "/",
|
|
150
|
+
variant: "secondary",
|
|
151
|
+
className: "flex items-center gap-2",
|
|
152
|
+
children: [
|
|
153
|
+
/* @__PURE__ */ jsxDEV3(Home, {
|
|
154
|
+
className: "h-4 w-4"
|
|
155
|
+
}, undefined, false, undefined, this),
|
|
156
|
+
"Accueil"
|
|
157
|
+
]
|
|
158
|
+
}, undefined, true, undefined, this)
|
|
159
|
+
]
|
|
160
|
+
}, undefined, true, undefined, this),
|
|
161
|
+
!isDevelopment && errorId && /* @__PURE__ */ jsxDEV3("p", {
|
|
162
|
+
className: "mt-4 text-sm text-gray-500",
|
|
163
|
+
children: [
|
|
164
|
+
"Code d'erreur: ",
|
|
165
|
+
errorId
|
|
166
|
+
]
|
|
167
|
+
}, undefined, true, undefined, this)
|
|
168
|
+
]
|
|
169
|
+
}, undefined, true, undefined, this)
|
|
170
|
+
}, undefined, false, undefined, this);
|
|
61
171
|
};
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
172
|
+
|
|
173
|
+
class ErrorBoundary extends React2.Component {
|
|
174
|
+
constructor(props) {
|
|
175
|
+
super(props);
|
|
176
|
+
this.state = {
|
|
177
|
+
hasError: false,
|
|
178
|
+
error: null,
|
|
179
|
+
errorId: null
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
static getDerivedStateFromError(error) {
|
|
183
|
+
return {
|
|
184
|
+
hasError: true,
|
|
185
|
+
error
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
componentDidCatch(error, errorInfo) {
|
|
189
|
+
const errorId = `err_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`;
|
|
190
|
+
this.setState({ errorId });
|
|
191
|
+
this.props.onError?.(error, errorInfo);
|
|
192
|
+
if (true) {
|
|
193
|
+
console.error("ErrorBoundary caught an error:", error, errorInfo);
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
resetError = () => {
|
|
197
|
+
this.setState({
|
|
198
|
+
hasError: false,
|
|
199
|
+
error: null,
|
|
200
|
+
errorId: null
|
|
201
|
+
});
|
|
202
|
+
};
|
|
203
|
+
render() {
|
|
204
|
+
if (this.state.hasError && this.state.error) {
|
|
205
|
+
const FallbackComponent = this.props.fallback || DefaultErrorFallback;
|
|
206
|
+
return /* @__PURE__ */ jsxDEV3(FallbackComponent, {
|
|
207
|
+
error: this.state.error,
|
|
208
|
+
errorId: this.state.errorId,
|
|
209
|
+
resetError: this.resetError
|
|
210
|
+
}, undefined, false, undefined, this);
|
|
211
|
+
}
|
|
212
|
+
return this.props.children;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
var useErrorHandler = () => {
|
|
216
|
+
return React2.useCallback((error) => {
|
|
217
|
+
throw error;
|
|
218
|
+
}, []);
|
|
98
219
|
};
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
}, []);
|
|
220
|
+
export {
|
|
221
|
+
useErrorHandler,
|
|
222
|
+
ErrorBoundary
|
|
103
223
|
};
|
|
104
|
-
|
|
105
|
-
//#endregion
|
|
106
|
-
export { ErrorBoundary, useErrorHandler };
|
|
107
|
-
//# sourceMappingURL=ErrorBoundary.js.map
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
export {
|
|
1
|
+
export { ErrorBoundary, useErrorHandler } from './ErrorBoundary';
|
|
2
|
+
export type { ErrorBoundaryProps, ErrorFallbackProps } from './ErrorBoundary';
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../ui/organisms/ErrorBoundary/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACjE,YAAY,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -1,3 +1,223 @@
|
|
|
1
|
-
|
|
1
|
+
// @bun
|
|
2
|
+
// ui/text.tsx
|
|
3
|
+
import * as Slot from "@rn-primitives/slot";
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
import { Text as RNText } from "react-native";
|
|
6
|
+
import { cn } from "@contractspec/lib.ui-kit-core/utils";
|
|
7
|
+
import { jsxDEV } from "react/jsx-dev-runtime";
|
|
8
|
+
var TextClassContext = React.createContext(undefined);
|
|
9
|
+
function Text2({
|
|
10
|
+
className,
|
|
11
|
+
asChild = false,
|
|
12
|
+
...props
|
|
13
|
+
}) {
|
|
14
|
+
const textClass = React.useContext(TextClassContext);
|
|
15
|
+
const Component = asChild ? Slot.Text : RNText;
|
|
16
|
+
return /* @__PURE__ */ jsxDEV(Component, {
|
|
17
|
+
className: cn("text-foreground web:select-text text-base", textClass, className),
|
|
18
|
+
...props
|
|
19
|
+
}, undefined, false, undefined, this);
|
|
20
|
+
}
|
|
21
|
+
// ui/button.tsx
|
|
22
|
+
import { cva } from "class-variance-authority";
|
|
23
|
+
import { Pressable } from "react-native";
|
|
24
|
+
import { cn as cn2 } from "@contractspec/lib.ui-kit-core/utils";
|
|
25
|
+
import { jsxDEV as jsxDEV2 } from "react/jsx-dev-runtime";
|
|
26
|
+
var buttonVariants = cva("group flex items-center justify-center rounded-md web:ring-offset-background web:transition-colors web:focus-visible:outline-hidden web:focus-visible:ring-2 web:focus-visible:ring-ring web:focus-visible:ring-offset-2", {
|
|
27
|
+
variants: {
|
|
28
|
+
variant: {
|
|
29
|
+
default: "bg-primary web:hover:opacity-90 active:opacity-90",
|
|
30
|
+
destructive: "bg-destructive web:hover:opacity-90 active:opacity-90",
|
|
31
|
+
outline: "border border-input bg-background web:hover:bg-accent web:hover:text-accent-foreground active:bg-accent",
|
|
32
|
+
secondary: "bg-secondary web:hover:opacity-80 active:opacity-80",
|
|
33
|
+
ghost: "web:hover:bg-accent web:hover:text-accent-foreground active:bg-accent",
|
|
34
|
+
link: "web:underline-offset-4 web:hover:underline web:focus:underline"
|
|
35
|
+
},
|
|
36
|
+
size: {
|
|
37
|
+
default: "h-10 px-4 py-2 native:h-12 native:px-5 native:py-3",
|
|
38
|
+
sm: "h-9 rounded-md px-3",
|
|
39
|
+
lg: "h-11 rounded-md px-8 native:h-14",
|
|
40
|
+
icon: "h-10 w-10"
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
defaultVariants: {
|
|
44
|
+
variant: "default",
|
|
45
|
+
size: "default"
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
var buttonTextVariants = cva("web:whitespace-nowrap text-sm native:text-base font-medium text-foreground web:transition-colors", {
|
|
49
|
+
variants: {
|
|
50
|
+
variant: {
|
|
51
|
+
default: "text-primary-foreground",
|
|
52
|
+
destructive: "text-destructive-foreground",
|
|
53
|
+
outline: "group-active:text-accent-foreground",
|
|
54
|
+
secondary: "text-secondary-foreground group-active:text-secondary-foreground",
|
|
55
|
+
ghost: "group-active:text-accent-foreground",
|
|
56
|
+
link: "text-primary group-active:underline"
|
|
57
|
+
},
|
|
58
|
+
size: {
|
|
59
|
+
default: "",
|
|
60
|
+
sm: "",
|
|
61
|
+
lg: "native:text-lg",
|
|
62
|
+
icon: ""
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
defaultVariants: {
|
|
66
|
+
variant: "default",
|
|
67
|
+
size: "default"
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
function Button({ ref, className, variant, size, ...props }) {
|
|
71
|
+
return /* @__PURE__ */ jsxDEV2(TextClassContext.Provider, {
|
|
72
|
+
value: buttonTextVariants({
|
|
73
|
+
variant,
|
|
74
|
+
size,
|
|
75
|
+
className: "web:pointer-events-none"
|
|
76
|
+
}),
|
|
77
|
+
children: /* @__PURE__ */ jsxDEV2(Pressable, {
|
|
78
|
+
className: cn2(props.disabled && "web:pointer-events-none opacity-50", buttonVariants({ variant, size, className })),
|
|
79
|
+
ref,
|
|
80
|
+
role: "button",
|
|
81
|
+
...props
|
|
82
|
+
}, undefined, false, undefined, this)
|
|
83
|
+
}, undefined, false, undefined, this);
|
|
84
|
+
}
|
|
85
|
+
// ui/organisms/ErrorBoundary/ErrorBoundary.tsx
|
|
86
|
+
import React2 from "react";
|
|
87
|
+
import { AlertTriangle, RefreshCw, Home } from "lucide-react";
|
|
88
|
+
import { jsxDEV as jsxDEV3 } from "react/jsx-dev-runtime";
|
|
89
|
+
"use client";
|
|
90
|
+
var DefaultErrorFallback = ({
|
|
91
|
+
error,
|
|
92
|
+
errorId,
|
|
93
|
+
resetError
|
|
94
|
+
}) => {
|
|
95
|
+
const isDevelopment = true;
|
|
96
|
+
return /* @__PURE__ */ jsxDEV3("div", {
|
|
97
|
+
className: "flex min-h-screen items-center justify-center bg-gray-50 px-4",
|
|
98
|
+
children: /* @__PURE__ */ jsxDEV3("div", {
|
|
99
|
+
className: "w-full max-w-md rounded-lg bg-white p-6 text-center shadow-lg",
|
|
100
|
+
children: [
|
|
101
|
+
/* @__PURE__ */ jsxDEV3("div", {
|
|
102
|
+
className: "mb-4 flex justify-center",
|
|
103
|
+
children: /* @__PURE__ */ jsxDEV3(AlertTriangle, {
|
|
104
|
+
className: "h-12 w-12 text-red-500"
|
|
105
|
+
}, undefined, false, undefined, this)
|
|
106
|
+
}, undefined, false, undefined, this),
|
|
107
|
+
/* @__PURE__ */ jsxDEV3("h1", {
|
|
108
|
+
className: "mb-2 text-2xl font-semibold text-gray-900",
|
|
109
|
+
children: "Une erreur s'est produite"
|
|
110
|
+
}, undefined, false, undefined, this),
|
|
111
|
+
/* @__PURE__ */ jsxDEV3("p", {
|
|
112
|
+
className: "mb-6 text-gray-600",
|
|
113
|
+
children: "Nous nous excusons pour ce d\xE9sagr\xE9ment. Notre \xE9quipe a \xE9t\xE9 notifi\xE9e et travaille \xE0 r\xE9soudre le probl\xE8me."
|
|
114
|
+
}, undefined, false, undefined, this),
|
|
115
|
+
isDevelopment && /* @__PURE__ */ jsxDEV3("div", {
|
|
116
|
+
className: "mb-6 rounded-md bg-red-50 p-4 text-left",
|
|
117
|
+
children: [
|
|
118
|
+
/* @__PURE__ */ jsxDEV3("p", {
|
|
119
|
+
className: "mb-2 text-base font-medium text-red-800",
|
|
120
|
+
children: "Erreur de d\xE9veloppement:"
|
|
121
|
+
}, undefined, false, undefined, this),
|
|
122
|
+
/* @__PURE__ */ jsxDEV3("p", {
|
|
123
|
+
className: "font-mono text-sm break-all text-red-700",
|
|
124
|
+
children: error.message
|
|
125
|
+
}, undefined, false, undefined, this),
|
|
126
|
+
errorId && /* @__PURE__ */ jsxDEV3("p", {
|
|
127
|
+
className: "mt-2 text-sm text-red-600",
|
|
128
|
+
children: [
|
|
129
|
+
"ID: ",
|
|
130
|
+
errorId
|
|
131
|
+
]
|
|
132
|
+
}, undefined, true, undefined, this)
|
|
133
|
+
]
|
|
134
|
+
}, undefined, true, undefined, this),
|
|
135
|
+
/* @__PURE__ */ jsxDEV3("div", {
|
|
136
|
+
className: "flex flex-col justify-center gap-3 sm:flex-row",
|
|
137
|
+
children: [
|
|
138
|
+
/* @__PURE__ */ jsxDEV3(Button, {
|
|
139
|
+
onPress: resetError,
|
|
140
|
+
className: "flex items-center gap-2",
|
|
141
|
+
children: [
|
|
142
|
+
/* @__PURE__ */ jsxDEV3(RefreshCw, {
|
|
143
|
+
className: "h-4 w-4"
|
|
144
|
+
}, undefined, false, undefined, this),
|
|
145
|
+
"R\xE9essayer"
|
|
146
|
+
]
|
|
147
|
+
}, undefined, true, undefined, this),
|
|
148
|
+
/* @__PURE__ */ jsxDEV3(Button, {
|
|
149
|
+
onPress: () => window.location.href = "/",
|
|
150
|
+
variant: "secondary",
|
|
151
|
+
className: "flex items-center gap-2",
|
|
152
|
+
children: [
|
|
153
|
+
/* @__PURE__ */ jsxDEV3(Home, {
|
|
154
|
+
className: "h-4 w-4"
|
|
155
|
+
}, undefined, false, undefined, this),
|
|
156
|
+
"Accueil"
|
|
157
|
+
]
|
|
158
|
+
}, undefined, true, undefined, this)
|
|
159
|
+
]
|
|
160
|
+
}, undefined, true, undefined, this),
|
|
161
|
+
!isDevelopment && errorId && /* @__PURE__ */ jsxDEV3("p", {
|
|
162
|
+
className: "mt-4 text-sm text-gray-500",
|
|
163
|
+
children: [
|
|
164
|
+
"Code d'erreur: ",
|
|
165
|
+
errorId
|
|
166
|
+
]
|
|
167
|
+
}, undefined, true, undefined, this)
|
|
168
|
+
]
|
|
169
|
+
}, undefined, true, undefined, this)
|
|
170
|
+
}, undefined, false, undefined, this);
|
|
171
|
+
};
|
|
2
172
|
|
|
3
|
-
|
|
173
|
+
class ErrorBoundary extends React2.Component {
|
|
174
|
+
constructor(props) {
|
|
175
|
+
super(props);
|
|
176
|
+
this.state = {
|
|
177
|
+
hasError: false,
|
|
178
|
+
error: null,
|
|
179
|
+
errorId: null
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
static getDerivedStateFromError(error) {
|
|
183
|
+
return {
|
|
184
|
+
hasError: true,
|
|
185
|
+
error
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
componentDidCatch(error, errorInfo) {
|
|
189
|
+
const errorId = `err_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`;
|
|
190
|
+
this.setState({ errorId });
|
|
191
|
+
this.props.onError?.(error, errorInfo);
|
|
192
|
+
if (true) {
|
|
193
|
+
console.error("ErrorBoundary caught an error:", error, errorInfo);
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
resetError = () => {
|
|
197
|
+
this.setState({
|
|
198
|
+
hasError: false,
|
|
199
|
+
error: null,
|
|
200
|
+
errorId: null
|
|
201
|
+
});
|
|
202
|
+
};
|
|
203
|
+
render() {
|
|
204
|
+
if (this.state.hasError && this.state.error) {
|
|
205
|
+
const FallbackComponent = this.props.fallback || DefaultErrorFallback;
|
|
206
|
+
return /* @__PURE__ */ jsxDEV3(FallbackComponent, {
|
|
207
|
+
error: this.state.error,
|
|
208
|
+
errorId: this.state.errorId,
|
|
209
|
+
resetError: this.resetError
|
|
210
|
+
}, undefined, false, undefined, this);
|
|
211
|
+
}
|
|
212
|
+
return this.props.children;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
var useErrorHandler = () => {
|
|
216
|
+
return React2.useCallback((error) => {
|
|
217
|
+
throw error;
|
|
218
|
+
}, []);
|
|
219
|
+
};
|
|
220
|
+
export {
|
|
221
|
+
useErrorHandler,
|
|
222
|
+
ErrorBoundary
|
|
223
|
+
};
|
|
@@ -1,29 +1,3 @@
|
|
|
1
|
-
import { ListPageProps } from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
//#region ui/organisms/ListPage/ListPage.d.ts
|
|
5
|
-
declare function ListPage<T>({
|
|
6
|
-
title,
|
|
7
|
-
description,
|
|
8
|
-
header,
|
|
9
|
-
items,
|
|
10
|
-
totalItems,
|
|
11
|
-
totalPages,
|
|
12
|
-
isLoading,
|
|
13
|
-
isFetching,
|
|
14
|
-
error,
|
|
15
|
-
listState,
|
|
16
|
-
searchPlaceholder,
|
|
17
|
-
filters,
|
|
18
|
-
onRefresh,
|
|
19
|
-
primaryAction,
|
|
20
|
-
toolbar,
|
|
21
|
-
renderItem,
|
|
22
|
-
renderEmpty,
|
|
23
|
-
renderStats,
|
|
24
|
-
className,
|
|
25
|
-
itemClassName
|
|
26
|
-
}: ListPageProps<T>): react_jsx_runtime36.JSX.Element;
|
|
27
|
-
//#endregion
|
|
28
|
-
export { ListPage };
|
|
1
|
+
import type { ListPageProps } from './types';
|
|
2
|
+
export declare function ListPage<T>({ title, description, header, items, totalItems, totalPages, isLoading, isFetching, error, listState, searchPlaceholder, filters, onRefresh, primaryAction, toolbar, renderItem, renderEmpty, renderStats, className, itemClassName, }: ListPageProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
29
3
|
//# sourceMappingURL=ListPage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListPage.d.ts","
|
|
1
|
+
{"version":3,"file":"ListPage.d.ts","sourceRoot":"","sources":["../../../../ui/organisms/ListPage/ListPage.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAG7C,wBAAgB,QAAQ,CAAC,CAAC,EAAE,EAC1B,KAAK,EACL,WAAW,EACX,MAAM,EACN,KAAK,EACL,UAAU,EACV,UAAU,EACV,SAAS,EACT,UAAU,EACV,KAAK,EACL,SAAS,EACT,iBAAiB,EACjB,OAAY,EACZ,SAAS,EACT,aAAa,EACb,OAAO,EACP,UAAU,EACV,WAAW,EACX,WAAW,EACX,SAAc,EACd,aAAkB,GACnB,EAAE,aAAa,CAAC,CAAC,CAAC,2CAmPlB"}
|