@lssm/lib.ui-kit 1.42.0 → 1.42.1
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 +13 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -0
- package/dist/ui/accordion.d.ts +36 -0
- package/dist/ui/accordion.d.ts.map +1 -0
- package/dist/ui/accordion.js +3 -2
- package/dist/ui/accordion.js.map +1 -0
- package/dist/ui/alert-dialog.d.ts +72 -0
- package/dist/ui/alert-dialog.d.ts.map +1 -0
- package/dist/ui/alert-dialog.js +3 -2
- package/dist/ui/alert-dialog.js.map +1 -0
- package/dist/ui/alert.d.ts +37 -0
- package/dist/ui/alert.d.ts.map +1 -0
- package/dist/ui/alert.js +3 -2
- package/dist/ui/alert.js.map +1 -0
- package/dist/ui/aspect-ratio.d.ts +12 -0
- package/dist/ui/aspect-ratio.d.ts.map +1 -0
- package/dist/ui/aspect-ratio.js +2 -1
- package/dist/ui/aspect-ratio.js.map +1 -0
- package/dist/ui/atoms/FilterSelect/FilterSelect.d.ts +8 -0
- package/dist/ui/atoms/FilterSelect/FilterSelect.d.ts.map +1 -0
- package/dist/ui/atoms/FilterSelect/FilterSelect.js +2 -1
- package/dist/ui/atoms/FilterSelect/FilterSelect.js.map +1 -0
- package/dist/ui/atoms/FilterSelect/index.d.ts +3 -0
- package/dist/ui/atoms/FilterSelect/types.d.ts +19 -0
- package/dist/ui/atoms/FilterSelect/types.d.ts.map +1 -0
- package/dist/ui/atoms/LoadingSpinner/LoadingSpinner.d.ts +23 -0
- package/dist/ui/atoms/LoadingSpinner/LoadingSpinner.d.ts.map +1 -0
- package/dist/ui/atoms/LoadingSpinner/LoadingSpinner.js +4 -3
- package/dist/ui/atoms/LoadingSpinner/LoadingSpinner.js.map +1 -0
- package/dist/ui/atoms/LoadingSpinner/index.d.ts +2 -0
- package/dist/ui/atoms/Pagination/Pagination.d.ts +8 -0
- package/dist/ui/atoms/Pagination/Pagination.d.ts.map +1 -0
- package/dist/ui/atoms/Pagination/Pagination.js +3 -5
- package/dist/ui/atoms/Pagination/Pagination.js.map +1 -0
- package/dist/ui/atoms/Pagination/index.d.ts +3 -0
- package/dist/ui/atoms/Pagination/types.d.ts +16 -0
- package/dist/ui/atoms/Pagination/types.d.ts.map +1 -0
- package/dist/ui/atoms/SearchInput/SearchInput.d.ts +8 -0
- package/dist/ui/atoms/SearchInput/SearchInput.d.ts.map +1 -0
- package/dist/ui/atoms/SearchInput/SearchInput.js +4 -5
- package/dist/ui/atoms/SearchInput/SearchInput.js.map +1 -0
- package/dist/ui/atoms/SearchInput/index.d.ts +3 -0
- package/dist/ui/atoms/SearchInput/types.d.ts +13 -0
- package/dist/ui/atoms/SearchInput/types.d.ts.map +1 -0
- package/dist/ui/avatar.d.ts +28 -0
- package/dist/ui/avatar.d.ts.map +1 -0
- package/dist/ui/avatar.js +3 -2
- package/dist/ui/avatar.js.map +1 -0
- package/dist/ui/badge.d.ts +22 -0
- package/dist/ui/badge.d.ts.map +1 -0
- package/dist/ui/badge.js +3 -2
- package/dist/ui/badge.js.map +1 -0
- package/dist/ui/breadcrumb.d.ts +39 -0
- package/dist/ui/breadcrumb.d.ts.map +1 -0
- package/dist/ui/breadcrumb.js +5 -6
- package/dist/ui/breadcrumb.js.map +1 -0
- package/dist/ui/button.d.ts +26 -0
- package/dist/ui/button.d.ts.map +1 -0
- package/dist/ui/button.js +3 -2
- package/dist/ui/button.js.map +1 -0
- package/dist/ui/card.d.ts +44 -0
- package/dist/ui/card.d.ts.map +1 -0
- package/dist/ui/card.js +3 -2
- package/dist/ui/card.js.map +1 -0
- package/dist/ui/carousel.d.ts +5 -0
- package/dist/ui/carousel.d.ts.map +1 -0
- package/dist/ui/carousel.js +2 -1
- package/dist/ui/carousel.js.map +1 -0
- package/dist/ui/checkbox.d.ts +17 -0
- package/dist/ui/checkbox.d.ts.map +1 -0
- package/dist/ui/checkbox.js +3 -2
- package/dist/ui/checkbox.js.map +1 -0
- package/dist/ui/collapsible.d.ts +25 -0
- package/dist/ui/collapsible.d.ts.map +1 -0
- package/dist/ui/collapsible.js +2 -1
- package/dist/ui/collapsible.js.map +1 -0
- package/dist/ui/command.d.ts +5 -0
- package/dist/ui/command.d.ts.map +1 -0
- package/dist/ui/command.js +2 -1
- package/dist/ui/command.js.map +1 -0
- package/dist/ui/context-menu.d.ts +110 -0
- package/dist/ui/context-menu.d.ts.map +1 -0
- package/dist/ui/context-menu.js +3 -2
- package/dist/ui/context-menu.js.map +1 -0
- package/dist/ui/date-picker.d.ts +24 -0
- package/dist/ui/date-picker.d.ts.map +1 -0
- package/dist/ui/date-picker.js +3 -2
- package/dist/ui/date-picker.js.map +1 -0
- package/dist/ui/date-range-picker.d.ts +31 -0
- package/dist/ui/date-range-picker.d.ts.map +1 -0
- package/dist/ui/date-range-picker.js +4 -3
- package/dist/ui/date-range-picker.js.map +1 -0
- package/dist/ui/datetime-picker.d.ts +28 -0
- package/dist/ui/datetime-picker.d.ts.map +1 -0
- package/dist/ui/datetime-picker.js +2 -1
- package/dist/ui/datetime-picker.js.map +1 -0
- package/dist/ui/dialog.d.ts +69 -0
- package/dist/ui/dialog.d.ts.map +1 -0
- package/dist/ui/dialog.js +3 -2
- package/dist/ui/dialog.js.map +1 -0
- package/dist/ui/dropdown-menu.d.ts +112 -0
- package/dist/ui/dropdown-menu.d.ts.map +1 -0
- package/dist/ui/dropdown-menu.js +3 -2
- package/dist/ui/dropdown-menu.js.map +1 -0
- package/dist/ui/empty-state.d.ts +29 -0
- package/dist/ui/empty-state.d.ts.map +1 -0
- package/dist/ui/empty-state.js +3 -2
- package/dist/ui/empty-state.js.map +1 -0
- package/dist/ui/empty.d.ts +37 -0
- package/dist/ui/empty.d.ts.map +1 -0
- package/dist/ui/empty.js +3 -2
- package/dist/ui/empty.js.map +1 -0
- package/dist/ui/fab.d.ts +36 -0
- package/dist/ui/fab.d.ts.map +1 -0
- package/dist/ui/fab.js +3 -2
- package/dist/ui/fab.js.map +1 -0
- package/dist/ui/field.d.ts +67 -0
- package/dist/ui/field.d.ts.map +1 -0
- package/dist/ui/field.js +3 -2
- package/dist/ui/field.js.map +1 -0
- package/dist/ui/form.d.ts +50 -0
- package/dist/ui/form.d.ts.map +1 -0
- package/dist/ui/form.js +5 -4
- package/dist/ui/form.js.map +1 -0
- package/dist/ui/hover-card.d.ts +30 -0
- package/dist/ui/hover-card.d.ts.map +1 -0
- package/dist/ui/hover-card.js +3 -2
- package/dist/ui/hover-card.js.map +1 -0
- package/dist/ui/icons/Check.d.ts +2 -0
- package/dist/ui/icons/Check.js +2 -1
- package/dist/ui/icons/Check.js.map +1 -0
- package/dist/ui/icons/ChevronDown.d.ts +2 -0
- package/dist/ui/icons/ChevronDown.js +2 -1
- package/dist/ui/icons/ChevronDown.js.map +1 -0
- package/dist/ui/icons/ChevronRight.d.ts +2 -0
- package/dist/ui/icons/ChevronRight.js +2 -1
- package/dist/ui/icons/ChevronRight.js.map +1 -0
- package/dist/ui/icons/ChevronUp.d.ts +2 -0
- package/dist/ui/icons/ChevronUp.js +2 -1
- package/dist/ui/icons/ChevronUp.js.map +1 -0
- package/dist/ui/icons/CircleUser.d.ts +2 -0
- package/dist/ui/icons/CircleUser.js +2 -1
- package/dist/ui/icons/CircleUser.js.map +1 -0
- package/dist/ui/icons/Info.d.ts +2 -0
- package/dist/ui/icons/Info.js +2 -1
- package/dist/ui/icons/Info.js.map +1 -0
- package/dist/ui/icons/Key.d.ts +2 -0
- package/dist/ui/icons/Key.js +2 -1
- package/dist/ui/icons/Key.js.map +1 -0
- package/dist/ui/icons/MoonStar.d.ts +2 -0
- package/dist/ui/icons/MoonStar.js +2 -1
- package/dist/ui/icons/MoonStar.js.map +1 -0
- package/dist/ui/icons/Sun.d.ts +2 -0
- package/dist/ui/icons/Sun.js +2 -1
- package/dist/ui/icons/Sun.js.map +1 -0
- package/dist/ui/icons/X.d.ts +2 -0
- package/dist/ui/icons/X.js +2 -1
- package/dist/ui/icons/X.js.map +1 -0
- package/dist/ui/icons/iconWithClassName.d.ts +7 -0
- package/dist/ui/icons/iconWithClassName.d.ts.map +1 -0
- package/dist/ui/icons/iconWithClassName.js +2 -1
- package/dist/ui/icons/iconWithClassName.js.map +1 -0
- package/dist/ui/input.d.ts +15 -0
- package/dist/ui/input.d.ts.map +1 -0
- package/dist/ui/input.js +3 -2
- package/dist/ui/input.js.map +1 -0
- package/dist/ui/label.d.ts +16 -0
- package/dist/ui/label.d.ts.map +1 -0
- package/dist/ui/label.js +3 -2
- package/dist/ui/label.js.map +1 -0
- package/dist/ui/link.d.ts +14 -0
- package/dist/ui/link.d.ts.map +1 -0
- package/dist/ui/link.js +3 -2
- package/dist/ui/link.js.map +1 -0
- package/dist/ui/loading-button.d.ts +20 -0
- package/dist/ui/loading-button.d.ts.map +1 -0
- package/dist/ui/loading-button.js +2 -1
- package/dist/ui/loading-button.js.map +1 -0
- package/dist/ui/loading-overlay.d.ts +16 -0
- package/dist/ui/loading-overlay.d.ts.map +1 -0
- package/dist/ui/loading-overlay.js +2 -1
- package/dist/ui/loading-overlay.js.map +1 -0
- package/dist/ui/loading-screen.d.ts +14 -0
- package/dist/ui/loading-screen.d.ts.map +1 -0
- package/dist/ui/loading-screen.js +2 -1
- package/dist/ui/loading-screen.js.map +1 -0
- package/dist/ui/marketing/FeatureGrid.d.ts +21 -0
- package/dist/ui/marketing/FeatureGrid.d.ts.map +1 -0
- package/dist/ui/marketing/FeatureGrid.js +2 -1
- package/dist/ui/marketing/FeatureGrid.js.map +1 -0
- package/dist/ui/marketing/Hero.d.ts +28 -0
- package/dist/ui/marketing/Hero.d.ts.map +1 -0
- package/dist/ui/marketing/Hero.js +2 -1
- package/dist/ui/marketing/Hero.js.map +1 -0
- package/dist/ui/marketing/PricingTable.d.ts +25 -0
- package/dist/ui/marketing/PricingTable.d.ts.map +1 -0
- package/dist/ui/marketing/PricingTable.js +2 -1
- package/dist/ui/marketing/PricingTable.js.map +1 -0
- package/dist/ui/marketing/index.d.ts +4 -0
- package/dist/ui/menubar.d.ts +115 -0
- package/dist/ui/menubar.d.ts.map +1 -0
- package/dist/ui/menubar.js +3 -2
- package/dist/ui/menubar.js.map +1 -0
- package/dist/ui/molecules/Autocomplete/index.d.ts +5 -0
- package/dist/ui/molecules/Autocomplete/index.d.ts.map +1 -0
- package/dist/ui/molecules/Autocomplete/index.js +2 -1
- package/dist/ui/molecules/Autocomplete/index.js.map +1 -0
- package/dist/ui/molecules/SearchAndFilter/SearchAndFilter.d.ts +8 -0
- package/dist/ui/molecules/SearchAndFilter/SearchAndFilter.d.ts.map +1 -0
- package/dist/ui/molecules/SearchAndFilter/SearchAndFilter.js +6 -5
- package/dist/ui/molecules/SearchAndFilter/SearchAndFilter.js.map +1 -0
- package/dist/ui/molecules/SearchAndFilter/index.d.ts +3 -0
- package/dist/ui/molecules/SearchAndFilter/types.d.ts +25 -0
- package/dist/ui/molecules/SearchAndFilter/types.d.ts.map +1 -0
- package/dist/ui/molecules/SkeletonList.d.ts +16 -0
- package/dist/ui/molecules/SkeletonList.d.ts.map +1 -0
- package/dist/ui/molecules/SkeletonList.js +2 -1
- package/dist/ui/molecules/SkeletonList.js.map +1 -0
- package/dist/ui/nativewind-env.d.ts +1 -0
- package/dist/ui/navigation-menu.d.ts +68 -0
- package/dist/ui/navigation-menu.d.ts.map +1 -0
- package/dist/ui/navigation-menu.js +3 -2
- package/dist/ui/navigation-menu.js.map +1 -0
- package/dist/ui/organisms/ErrorBoundary/ErrorBoundary.d.ts +30 -0
- package/dist/ui/organisms/ErrorBoundary/ErrorBoundary.d.ts.map +1 -0
- package/dist/ui/organisms/ErrorBoundary/ErrorBoundary.js +5 -6
- package/dist/ui/organisms/ErrorBoundary/ErrorBoundary.js.map +1 -0
- package/dist/ui/organisms/ErrorBoundary/index.d.ts +2 -0
- package/dist/ui/organisms/ListPage/ListPage.d.ts +29 -0
- package/dist/ui/organisms/ListPage/ListPage.d.ts.map +1 -0
- package/dist/ui/organisms/ListPage/ListPage.js +12 -14
- package/dist/ui/organisms/ListPage/ListPage.js.map +1 -0
- package/dist/ui/organisms/ListPage/index.d.ts +3 -0
- package/dist/ui/organisms/ListPage/types.d.ts +42 -0
- package/dist/ui/organisms/ListPage/types.d.ts.map +1 -0
- package/dist/ui/page-header.d.ts +27 -0
- package/dist/ui/page-header.d.ts.map +1 -0
- package/dist/ui/page-header.js +3 -2
- package/dist/ui/page-header.js.map +1 -0
- package/dist/ui/password-strength.d.ts +21 -0
- package/dist/ui/password-strength.d.ts.map +1 -0
- package/dist/ui/password-strength.js +4 -3
- package/dist/ui/password-strength.js.map +1 -0
- package/dist/ui/popover.d.ts +30 -0
- package/dist/ui/popover.d.ts.map +1 -0
- package/dist/ui/popover.js +3 -2
- package/dist/ui/popover.js.map +1 -0
- package/dist/ui/progress.d.ts +17 -0
- package/dist/ui/progress.d.ts.map +1 -0
- package/dist/ui/progress.js +3 -2
- package/dist/ui/progress.js.map +1 -0
- package/dist/ui/radio-group.d.ts +15 -0
- package/dist/ui/radio-group.d.ts.map +1 -0
- package/dist/ui/radio-group.js +3 -2
- package/dist/ui/radio-group.js.map +1 -0
- package/dist/ui/select.d.ts +84 -0
- package/dist/ui/select.d.ts.map +1 -0
- package/dist/ui/select.js +3 -2
- package/dist/ui/select.js.map +1 -0
- package/dist/ui/separator.d.ts +16 -0
- package/dist/ui/separator.d.ts.map +1 -0
- package/dist/ui/separator.js +3 -2
- package/dist/ui/separator.js.map +1 -0
- package/dist/ui/sheet.d.ts +5 -0
- package/dist/ui/sheet.d.ts.map +1 -0
- package/dist/ui/sheet.js +2 -1
- package/dist/ui/sheet.js.map +1 -0
- package/dist/ui/sidebar.d.ts +5 -0
- package/dist/ui/sidebar.d.ts.map +1 -0
- package/dist/ui/sidebar.js +2 -1
- package/dist/ui/sidebar.js.map +1 -0
- package/dist/ui/skeleton.d.ts +12 -0
- package/dist/ui/skeleton.d.ts.map +1 -0
- package/dist/ui/skeleton.js +3 -2
- package/dist/ui/skeleton.js.map +1 -0
- package/dist/ui/stack.d.ts +77 -0
- package/dist/ui/stack.d.ts.map +1 -0
- package/dist/ui/stack.js +3 -2
- package/dist/ui/stack.js.map +1 -0
- package/dist/ui/stepper.d.ts +23 -0
- package/dist/ui/stepper.d.ts.map +1 -0
- package/dist/ui/stepper.js +3 -2
- package/dist/ui/stepper.js.map +1 -0
- package/dist/ui/switch.d.ts +15 -0
- package/dist/ui/switch.d.ts.map +1 -0
- package/dist/ui/switch.js +3 -2
- package/dist/ui/switch.js.map +1 -0
- package/dist/ui/table.d.ts +51 -0
- package/dist/ui/table.d.ts.map +1 -0
- package/dist/ui/table.js +3 -2
- package/dist/ui/table.js.map +1 -0
- package/dist/ui/tabs.d.ts +33 -0
- package/dist/ui/tabs.d.ts.map +1 -0
- package/dist/ui/tabs.js +3 -2
- package/dist/ui/tabs.js.map +1 -0
- package/dist/ui/text.d.ts +21 -0
- package/dist/ui/text.d.ts.map +1 -0
- package/dist/ui/text.js +3 -2
- package/dist/ui/text.js.map +1 -0
- package/dist/ui/textarea.d.ts +10 -0
- package/dist/ui/textarea.d.ts.map +1 -0
- package/dist/ui/textarea.js +3 -2
- package/dist/ui/textarea.js.map +1 -0
- package/dist/ui/time-picker.d.ts +22 -0
- package/dist/ui/time-picker.d.ts.map +1 -0
- package/dist/ui/time-picker.js +3 -2
- package/dist/ui/time-picker.js.map +1 -0
- package/dist/ui/toggle-group.d.ts +36 -0
- package/dist/ui/toggle-group.d.ts.map +1 -0
- package/dist/ui/toggle-group.js +3 -2
- package/dist/ui/toggle-group.js.map +1 -0
- package/dist/ui/toggle.d.ts +34 -0
- package/dist/ui/toggle.d.ts.map +1 -0
- package/dist/ui/toggle.js +3 -2
- package/dist/ui/toggle.js.map +1 -0
- package/dist/ui/tooltip.d.ts +32 -0
- package/dist/ui/tooltip.d.ts.map +1 -0
- package/dist/ui/tooltip.js +3 -2
- package/dist/ui/tooltip.js.map +1 -0
- package/dist/ui/typography.d.ts +65 -0
- package/dist/ui/typography.d.ts.map +1 -0
- package/dist/ui/typography.js +3 -2
- package/dist/ui/typography.js.map +1 -0
- package/dist/ui/useColorScheme.d.ts +12 -0
- package/dist/ui/useColorScheme.d.ts.map +1 -0
- package/dist/ui/useColorScheme.js +2 -1
- package/dist/ui/useColorScheme.js.map +1 -0
- package/dist/ui/useListState.d.ts +34 -0
- package/dist/ui/useListState.d.ts.map +1 -0
- package/dist/ui/useListState.js +2 -1
- package/dist/ui/useListState.js.map +1 -0
- package/dist/ui/usecases/UseCaseCard.d.ts +19 -0
- package/dist/ui/usecases/UseCaseCard.d.ts.map +1 -0
- package/dist/ui/usecases/UseCaseCard.js +2 -1
- package/dist/ui/usecases/UseCaseCard.js.map +1 -0
- package/dist/ui/usecases/UserStoryCard.d.ts +15 -0
- package/dist/ui/usecases/UserStoryCard.d.ts.map +1 -0
- package/dist/ui/usecases/UserStoryCard.js +2 -1
- package/dist/ui/usecases/UserStoryCard.js.map +1 -0
- package/dist/ui/usecases/index.d.ts +3 -0
- package/dist/ui/utils.d.ts +7 -0
- package/dist/ui/utils.d.ts.map +1 -0
- package/dist/ui/utils.js +2 -1
- package/dist/ui/utils.js.map +1 -0
- package/package.json +113 -105
- package/dist/-core/src/utils.js +0 -10
- package/dist/_virtual/rolldown_runtime.js +0 -33
- package/dist/tsconfig.tsbuildinfo +0 -1
- package/dist/ui/nativewind-env.d.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SkeletonList.js","names":[],"sources":["../../../ui/molecules/SkeletonList.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Skeleton } from '../skeleton';\n\ninterface Props {\n count?: number;\n className?: string;\n itemClassName?: string;\n}\n\nexport function SkeletonList({\n count = 6,\n className = '',\n itemClassName = '',\n}: Props) {\n return (\n <div className={`space-y-3 ${className}`}>\n {Array.from({ length: count }).map((_, i) => (\n <Skeleton key={i} className={`h-20 rounded-md ${itemClassName}`} />\n ))}\n </div>\n );\n}\n"],"mappings":";;;;;AASA,SAAgB,aAAa,EAC3B,QAAQ,GACR,YAAY,IACZ,gBAAgB,MACR;AACR,QACE,oBAAC;EAAI,WAAW,aAAa;YAC1B,MAAM,KAAK,EAAE,QAAQ,OAAO,CAAC,CAAC,KAAK,GAAG,MACrC,oBAAC,YAAiB,WAAW,mBAAmB,mBAAjC,EAAoD,CACnE;GACE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import * as React$1 from "react";
|
|
2
|
+
import * as react_native33 from "react-native";
|
|
3
|
+
import { View } from "react-native";
|
|
4
|
+
import * as react_jsx_runtime102 from "react/jsx-runtime";
|
|
5
|
+
import * as NavigationMenuPrimitive from "@rn-primitives/navigation-menu";
|
|
6
|
+
import * as class_variance_authority_types6 from "class-variance-authority/types";
|
|
7
|
+
|
|
8
|
+
//#region ui/navigation-menu.d.ts
|
|
9
|
+
declare function NavigationMenu({
|
|
10
|
+
className,
|
|
11
|
+
children,
|
|
12
|
+
...props
|
|
13
|
+
}: NavigationMenuPrimitive.RootProps & {
|
|
14
|
+
ref?: React$1.RefObject<NavigationMenuPrimitive.RootRef>;
|
|
15
|
+
}): react_jsx_runtime102.JSX.Element;
|
|
16
|
+
declare function NavigationMenuList({
|
|
17
|
+
className,
|
|
18
|
+
...props
|
|
19
|
+
}: NavigationMenuPrimitive.ListProps & {
|
|
20
|
+
ref?: React$1.RefObject<NavigationMenuPrimitive.ListRef>;
|
|
21
|
+
}): react_jsx_runtime102.JSX.Element;
|
|
22
|
+
declare const NavigationMenuItem: React$1.ForwardRefExoticComponent<react_native33.ViewProps & {
|
|
23
|
+
asChild?: boolean;
|
|
24
|
+
} & {
|
|
25
|
+
value: string | undefined;
|
|
26
|
+
} & React$1.RefAttributes<View>>;
|
|
27
|
+
declare const navigationMenuTriggerStyle: (props?: class_variance_authority_types6.ClassProp | undefined) => string;
|
|
28
|
+
declare function NavigationMenuTrigger({
|
|
29
|
+
className,
|
|
30
|
+
children,
|
|
31
|
+
...props
|
|
32
|
+
}: Omit<NavigationMenuPrimitive.TriggerProps, 'children'> & {
|
|
33
|
+
children?: React$1.ReactNode;
|
|
34
|
+
ref?: React$1.RefObject<NavigationMenuPrimitive.TriggerRef>;
|
|
35
|
+
}): react_jsx_runtime102.JSX.Element;
|
|
36
|
+
declare function NavigationMenuContent({
|
|
37
|
+
className,
|
|
38
|
+
children,
|
|
39
|
+
portalHost,
|
|
40
|
+
...props
|
|
41
|
+
}: NavigationMenuPrimitive.ContentProps & {
|
|
42
|
+
portalHost?: string;
|
|
43
|
+
ref?: React$1.RefObject<NavigationMenuPrimitive.ContentRef>;
|
|
44
|
+
}): react_jsx_runtime102.JSX.Element;
|
|
45
|
+
declare const NavigationMenuLink: React$1.ForwardRefExoticComponent<Omit<react_native33.PressableProps & React$1.RefAttributes<View>, "ref"> & {
|
|
46
|
+
asChild?: boolean;
|
|
47
|
+
} & {
|
|
48
|
+
onKeyDown?: (ev: React$1.KeyboardEvent) => void;
|
|
49
|
+
onKeyUp?: (ev: React$1.KeyboardEvent) => void;
|
|
50
|
+
} & {
|
|
51
|
+
active?: boolean;
|
|
52
|
+
} & React$1.RefAttributes<View>>;
|
|
53
|
+
declare function NavigationMenuViewport({
|
|
54
|
+
className,
|
|
55
|
+
...props
|
|
56
|
+
}: NavigationMenuPrimitive.ViewportProps & {
|
|
57
|
+
ref?: React$1.RefObject<NavigationMenuPrimitive.ViewportRef>;
|
|
58
|
+
}): react_jsx_runtime102.JSX.Element;
|
|
59
|
+
declare function NavigationMenuIndicator({
|
|
60
|
+
ref,
|
|
61
|
+
className,
|
|
62
|
+
...props
|
|
63
|
+
}: NavigationMenuPrimitive.IndicatorProps & {
|
|
64
|
+
ref?: React$1.RefObject<NavigationMenuPrimitive.IndicatorRef>;
|
|
65
|
+
}): react_jsx_runtime102.JSX.Element;
|
|
66
|
+
//#endregion
|
|
67
|
+
export { NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, navigationMenuTriggerStyle };
|
|
68
|
+
//# sourceMappingURL=navigation-menu.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"navigation-menu.d.ts","names":[],"sources":["../../ui/navigation-menu.tsx"],"sourcesContent":[],"mappings":";;;;;;;;iBAgBS,cAAA;;;;GAIN,uBAAA,CAAwB;QACnB,OAAA,CAAM,UAAU,uBAAA,CAAwB;IAC/C,oBAAA,CAAA,GAAA,CAAA;iBAeQ,kBAAA;;;AAlCqC,GAqC3C,uBAAA,CAAwB;QACnB,OAAA,CAAM,UAAU,uBAAA,CAAwB;AAtCF,CAAA,CAAA,EAuC7C,oBAAA,CAAA,GAAA,CAAA,OA1BsB;cAsCjB,kBArCJ,EAqCsB,OAAA,CAAA,yBArCtB,CAqCqD,cAAA,CAA/B,SAAA,GArCtB;EACA,OAAA,CAAA,EAAA,OAAA;CAEC,GAAA;EACqB,KAAA,EAAA,MAAA,GAAA,SAAwB;CAAxC,wBAAM,KAAA,CAAA,CAAA;cAmCR,0BAlCL,EAAA,CAAA,KAAA,CAAA,EAoCA,+BAAA,CAF+B,SAAA,GAlC/B,SAAA,EAAA,GAAA,MAAA;iBAsCQ,qBAAA,CAtCR;EAAA,SAAA;EAAA,QAAA;EAAA,GAAA;CAAA,EA0CE,IA1CF,CA0CO,uBAAA,CAAwB,YA1C/B,EAAA,UAAA,CAAA,GAAA;EAeQ,QAAA,CAAA,EA4BI,OAAA,CAAM,SA5BQ;EACzB,GAAA,CAAA,EA4BM,OAAA,CAAM,SA5BZ,CA4BsB,uBAAA,CAAwB,UA5B9C,CAAA;CAEC,CAAA,EA2BF,oBAAA,CAAA,GAAA,CAAA,OA3B0B;iBAiElB,qBAAA,CAhEuC;EAAA,SAAA;EAAA,QAAA;EAAA,UAAA;EAAA,GAAA;CAAA,EAqE7C,uBAAA,CAAwB,YArEqB,GAAA;EAAxC,UAAM,CAAA,EAAA,MAAA;EACb,GAAA,CAAA,EAsEO,OAAA,CAAM,SAtEb,CAsEuB,uBAAA,CAAwB,UAtE/C,CAAA;CAAA,CAAA,EAuEA,oBAAA,CAAA,GAAA,CAAA,OAvEA;AAAA,cAiGK,kBArFiD,EAqF/B,OAAA,CAAA,yBArF+B,CAqF/B,IArF+B,CAqFA,cAAA,CAA/B,cAAA,GAAA,OAAA,CAAA,aArF+B,CAqF/B,IArF+B,CAAA,EAAA,KAAA,CAAA,GAAA;EAAA,OAAA,CAAA,EAAA,OAA/B;;;EAAA,OAAA,CAAA,EAAA,CAAA,EAAA,uBAAA,EAAA,GAAA,IAAA;CAAA,GAAA;EAElB,MAAA,CAAA,EAAA,OAAA;AAA0B,CAAA,wBAIvB,KAAqB,CAAA,CAAA;iBAiFrB,sBAAA,CAhFP;EAAA,SAAA;EAAA,GAAA;CAAA,EAmFC,uBAAA,CAAwB,aAnFzB,GAAA;EACA,GAAA,CAAA,EAmFM,OAAA,CAAM,SAnFZ,CAmFsB,uBAAA,CAAwB,WAnF9C,CAAA;CAEM,CAAA,EAkFP,oBAAA,CAAA,GAAA,CAAA,OAlF+B;iBAkGvB,uBAAA,CAlGN;EAAA,GAAA;EAAA,SAAA;EAAA,GAAA;CAAA,EAsGA,uBAAA,CAAwB,cAtGxB,GAAA;EACU,GAAA,CAAA,EAsGL,OAAA,CAAM,SAtGK,CAsGK,uBAAA,CAAwB,YAtG7B,CAAA;CACK,CAAA,EAsGvB,oBAAA,CAAA,GAAA,CAAA,OAtG+C"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ChevronDown } from "./icons/ChevronDown.js";
|
|
2
|
-
import { cn } from "../-core/src/utils.js";
|
|
3
2
|
import "react";
|
|
4
3
|
import { Platform, View } from "react-native";
|
|
5
4
|
import Animated, { Extrapolation, FadeInLeft, FadeOutLeft, interpolate, useAnimatedStyle, useDerivedValue, withTiming } from "react-native-reanimated";
|
|
5
|
+
import { cn } from "@lssm/lib.ui-kit-core/utils";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
import { cva } from "class-variance-authority";
|
|
8
8
|
import * as NavigationMenuPrimitive from "@rn-primitives/navigation-menu";
|
|
@@ -83,4 +83,5 @@ function NavigationMenuIndicator({ ref, className, ...props }) {
|
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
//#endregion
|
|
86
|
-
export { NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, navigationMenuTriggerStyle };
|
|
86
|
+
export { NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, navigationMenuTriggerStyle };
|
|
87
|
+
//# sourceMappingURL=navigation-menu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"navigation-menu.js","names":[],"sources":["../../ui/navigation-menu.tsx"],"sourcesContent":["import * as NavigationMenuPrimitive from '@rn-primitives/navigation-menu';\nimport { cva } from 'class-variance-authority';\nimport * as React from 'react';\nimport { Platform, View } from 'react-native';\nimport Animated, {\n Extrapolation,\n FadeInLeft,\n FadeOutLeft,\n interpolate,\n useAnimatedStyle,\n useDerivedValue,\n withTiming,\n} from 'react-native-reanimated';\nimport { ChevronDown } from './icons/ChevronDown';\nimport { cn } from '@lssm/lib.ui-kit-core/utils';\n\nfunction NavigationMenu({\n className,\n children,\n ...props\n}: NavigationMenuPrimitive.RootProps & {\n ref?: React.RefObject<NavigationMenuPrimitive.RootRef>;\n}) {\n return (\n <NavigationMenuPrimitive.Root\n className={cn(\n 'relative z-10 flex max-w-max flex-row items-center justify-center',\n className\n )}\n {...props}\n >\n {children}\n {Platform.OS === 'web' && <NavigationMenuViewport />}\n </NavigationMenuPrimitive.Root>\n );\n}\n\nfunction NavigationMenuList({\n className,\n ...props\n}: NavigationMenuPrimitive.ListProps & {\n ref?: React.RefObject<NavigationMenuPrimitive.ListRef>;\n}) {\n return (\n <NavigationMenuPrimitive.List\n className={cn(\n 'web:group web:list-none flex flex-1 flex-row items-center justify-center gap-1',\n className\n )}\n {...props}\n />\n );\n}\n\nconst NavigationMenuItem = NavigationMenuPrimitive.Item;\n\nconst navigationMenuTriggerStyle = cva(\n 'web:group web:inline-flex flex-row h-10 native:h-12 native:px-3 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium web:transition-colors web:hover:bg-accent active:bg-accent web:hover:text-accent-foreground web:focus:bg-accent web:focus:text-accent-foreground web:focus:outline-hidden web:disabled:pointer-events-none disabled:opacity-50 web:data-active:bg-accent/50 web:data-[state=open]:bg-accent/50'\n);\n\nfunction NavigationMenuTrigger({\n className,\n children,\n ...props\n}: Omit<NavigationMenuPrimitive.TriggerProps, 'children'> & {\n children?: React.ReactNode;\n ref?: React.RefObject<NavigationMenuPrimitive.TriggerRef>;\n}) {\n const { value } = NavigationMenuPrimitive.useRootContext();\n const { value: itemValue } = NavigationMenuPrimitive.useItemContext();\n\n const progress = useDerivedValue(() =>\n value === itemValue\n ? withTiming(1, { duration: 250 })\n : withTiming(0, { duration: 200 })\n );\n const chevronStyle = useAnimatedStyle(() => ({\n transform: [{ rotate: `${progress.value * 180}deg` }],\n opacity: interpolate(progress.value, [0, 1], [1, 0.8], Extrapolation.CLAMP),\n }));\n\n return (\n <NavigationMenuPrimitive.Trigger\n className={cn(\n navigationMenuTriggerStyle(),\n 'web:group gap-1.5',\n value === itemValue && 'bg-accent',\n className\n )}\n {...props}\n >\n {children}\n <Animated.View style={chevronStyle}>\n <ChevronDown\n size={12}\n className={cn(\n 'text-foreground web:transition web:duration-200 relative h-3 w-3'\n )}\n aria-hidden={true}\n />\n </Animated.View>\n </NavigationMenuPrimitive.Trigger>\n );\n}\n\nfunction NavigationMenuContent({\n className,\n children,\n portalHost,\n ...props\n}: NavigationMenuPrimitive.ContentProps & {\n portalHost?: string;\n ref?: React.RefObject<NavigationMenuPrimitive.ContentRef>;\n}) {\n const { value } = NavigationMenuPrimitive.useRootContext();\n const { value: itemValue } = NavigationMenuPrimitive.useItemContext();\n return (\n <NavigationMenuPrimitive.Portal hostName={portalHost}>\n <NavigationMenuPrimitive.Content\n className={cn(\n 'native:border native:border-border native:rounded-lg native:shadow-lg native:bg-popover native:text-popover-foreground native:overflow-hidden w-full',\n value === itemValue\n ? 'web:animate-in web:fade-in web:slide-in-from-right-20'\n : 'web:animate-out web:fade-out web:slide-out-to-left-20',\n className\n )}\n {...props}\n >\n <Animated.View\n entering={Platform.OS !== 'web' ? FadeInLeft : undefined}\n exiting={Platform.OS !== 'web' ? FadeOutLeft : undefined}\n >\n {children}\n </Animated.View>\n </NavigationMenuPrimitive.Content>\n </NavigationMenuPrimitive.Portal>\n );\n}\n\nconst NavigationMenuLink = NavigationMenuPrimitive.Link;\n\nfunction NavigationMenuViewport({\n className,\n ...props\n}: NavigationMenuPrimitive.ViewportProps & {\n ref?: React.RefObject<NavigationMenuPrimitive.ViewportRef>;\n}) {\n return (\n <View className={cn('absolute top-full left-0 flex justify-center')}>\n <View\n className={cn(\n 'web:origin-top-center border-border bg-popover text-popover-foreground web:h-(--radix-navigation-menu-viewport-height) web:animate-in web:zoom-in-90 relative mt-1.5 w-full overflow-hidden rounded-md border shadow-lg',\n className\n )}\n {...props}\n >\n <NavigationMenuPrimitive.Viewport />\n </View>\n </View>\n );\n}\n\nfunction NavigationMenuIndicator({\n ref,\n className,\n ...props\n}: NavigationMenuPrimitive.IndicatorProps & {\n ref?: React.RefObject<NavigationMenuPrimitive.IndicatorRef>;\n}) {\n const { value } = NavigationMenuPrimitive.useRootContext();\n const { value: itemValue } = NavigationMenuPrimitive.useItemContext();\n\n return (\n <NavigationMenuPrimitive.Indicator\n ref={ref}\n className={cn(\n 'top-full z-1 flex h-1.5 items-end justify-center overflow-hidden',\n value === itemValue\n ? 'web:animate-in web:fade-in'\n : 'web:animate-out web:fade-out',\n className\n )}\n {...props}\n >\n <View className=\"bg-border shadow-foreground/5 relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm shadow-md\" />\n </NavigationMenuPrimitive.Indicator>\n );\n}\n\nexport {\n NavigationMenu,\n NavigationMenuContent,\n NavigationMenuIndicator,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n NavigationMenuTrigger,\n navigationMenuTriggerStyle,\n NavigationMenuViewport,\n};\n"],"mappings":";;;;;;;;;;AAgBA,SAAS,eAAe,EACtB,WACA,UACA,GAAG,SAGF;AACD,QACE,qBAAC,wBAAwB;EACvB,WAAW,GACT,qEACA,UACD;EACD,GAAI;aAEH,UACA,SAAS,OAAO,SAAS,oBAAC,2BAAyB;GACvB;;AAInC,SAAS,mBAAmB,EAC1B,WACA,GAAG,SAGF;AACD,QACE,oBAAC,wBAAwB;EACvB,WAAW,GACT,kFACA,UACD;EACD,GAAI;GACJ;;AAIN,MAAM,qBAAqB,wBAAwB;AAEnD,MAAM,6BAA6B,IACjC,0bACD;AAED,SAAS,sBAAsB,EAC7B,WACA,UACA,GAAG,SAIF;CACD,MAAM,EAAE,UAAU,wBAAwB,gBAAgB;CAC1D,MAAM,EAAE,OAAO,cAAc,wBAAwB,gBAAgB;CAErE,MAAM,WAAW,sBACf,UAAU,YACN,WAAW,GAAG,EAAE,UAAU,KAAK,CAAC,GAChC,WAAW,GAAG,EAAE,UAAU,KAAK,CAAC,CACrC;CACD,MAAM,eAAe,wBAAwB;EAC3C,WAAW,CAAC,EAAE,QAAQ,GAAG,SAAS,QAAQ,IAAI,MAAM,CAAC;EACrD,SAAS,YAAY,SAAS,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,GAAI,EAAE,cAAc,MAAM;EAC5E,EAAE;AAEH,QACE,qBAAC,wBAAwB;EACvB,WAAW,GACT,4BAA4B,EAC5B,qBACA,UAAU,aAAa,aACvB,UACD;EACD,GAAI;aAEH,UACD,oBAAC,SAAS;GAAK,OAAO;aACpB,oBAAC;IACC,MAAM;IACN,WAAW,GACT,mEACD;IACD,eAAa;KACb;IACY;GACgB;;AAItC,SAAS,sBAAsB,EAC7B,WACA,UACA,YACA,GAAG,SAIF;CACD,MAAM,EAAE,UAAU,wBAAwB,gBAAgB;CAC1D,MAAM,EAAE,OAAO,cAAc,wBAAwB,gBAAgB;AACrE,QACE,oBAAC,wBAAwB;EAAO,UAAU;YACxC,oBAAC,wBAAwB;GACvB,WAAW,GACT,wJACA,UAAU,YACN,0DACA,yDACJ,UACD;GACD,GAAI;aAEJ,oBAAC,SAAS;IACR,UAAU,SAAS,OAAO,QAAQ,aAAa;IAC/C,SAAS,SAAS,OAAO,QAAQ,cAAc;IAE9C;KACa;IACgB;GACH;;AAIrC,MAAM,qBAAqB,wBAAwB;AAEnD,SAAS,uBAAuB,EAC9B,WACA,GAAG,SAGF;AACD,QACE,oBAAC;EAAK,WAAW,GAAG,+CAA+C;YACjE,oBAAC;GACC,WAAW,GACT,2NACA,UACD;GACD,GAAI;aAEJ,oBAAC,wBAAwB,aAAW;IAC/B;GACF;;AAIX,SAAS,wBAAwB,EAC/B,KACA,WACA,GAAG,SAGF;CACD,MAAM,EAAE,UAAU,wBAAwB,gBAAgB;CAC1D,MAAM,EAAE,OAAO,cAAc,wBAAwB,gBAAgB;AAErE,QACE,oBAAC,wBAAwB;EAClB;EACL,WAAW,GACT,oEACA,UAAU,YACN,+BACA,gCACJ,UACD;EACD,GAAI;YAEJ,oBAAC,QAAK,WAAU,+FAA+F;GAC7E"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import * as react_jsx_runtime156 from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region ui/organisms/ErrorBoundary/ErrorBoundary.d.ts
|
|
5
|
+
interface ErrorBoundaryState {
|
|
6
|
+
hasError: boolean;
|
|
7
|
+
error: Error | null;
|
|
8
|
+
errorId: string | null;
|
|
9
|
+
}
|
|
10
|
+
interface ErrorBoundaryProps {
|
|
11
|
+
children: React.ReactNode;
|
|
12
|
+
fallback?: React.ComponentType<ErrorFallbackProps>;
|
|
13
|
+
onError?: (error: Error, errorInfo: React.ErrorInfo) => void;
|
|
14
|
+
}
|
|
15
|
+
interface ErrorFallbackProps {
|
|
16
|
+
error: Error;
|
|
17
|
+
errorId: string | null;
|
|
18
|
+
resetError: () => void;
|
|
19
|
+
}
|
|
20
|
+
declare class ErrorBoundary extends React.Component<ErrorBoundaryProps, ErrorBoundaryState> {
|
|
21
|
+
constructor(props: ErrorBoundaryProps);
|
|
22
|
+
static getDerivedStateFromError(error: Error): Partial<ErrorBoundaryState>;
|
|
23
|
+
componentDidCatch(error: Error, errorInfo: React.ErrorInfo): void;
|
|
24
|
+
resetError: () => void;
|
|
25
|
+
render(): string | number | bigint | boolean | react_jsx_runtime156.JSX.Element | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | null | undefined;
|
|
26
|
+
}
|
|
27
|
+
declare const useErrorHandler: () => (error: Error) => never;
|
|
28
|
+
//#endregion
|
|
29
|
+
export { ErrorBoundary, type ErrorBoundaryProps, type ErrorFallbackProps, useErrorHandler };
|
|
30
|
+
//# sourceMappingURL=ErrorBoundary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ErrorBoundary.d.ts","names":[],"sources":["../../../../ui/organisms/ErrorBoundary/ErrorBoundary.tsx"],"sourcesContent":[],"mappings":";;;;UAOU,kBAAA;;SAED;EAFC,OAAA,EAAA,MAAA,GAAA,IAAkB;AAEd;UAIJ,kBAAA,CACQ;EACe,QAAA,EADrB,KAAA,CAAM,SACe;EAApB,QAAM,CAAA,EAAN,KAAA,CAAM,aAAA,CAAc,kBAAd,CAAA;EACC,OAAA,CAAA,EAAA,CAAA,KAAA,EAAA,KAAA,EAAA,SAAA,EAAkB,KAAA,CAAM,SAAxB,EAAA,GAAA,IAAA;;UAGV,kBAAA,CAH2C;EAG3C,KAAA,EACD,KADC;EAmEG,OAAA,EAAA,MAAA,GAAc,IAAA;EACzB,UAAA,EAAA,GAAA,GAAA,IAAA;;AAGmB,cAJR,aAAA,SAAsB,KAAA,CAAM,SAIpB,CAHnB,kBAGmB,EAFnB,kBAEmB,CAAA,CAAA;EASoB,WAAA,CAAA,KAAA,EATpB,kBASoB;EAAgB,OAAA,wBAAA,CAAA,KAAA,EAAhB,KAAgB,CAAA,EAAR,OAAQ,CAAA,kBAAA,CAAA;EAAR,iBAAA,CAAA,KAAA,EAOtB,KAPsB,EAAA,SAAA,EAOJ,KAAA,CAAM,SAPF,CAAA,EAAA,IAAA;EAOtB,UAAA,EAAA,GAAA,GAAA,IAAA;EAAkB,MAAM,CAAA,CAAA,EAAA,MAAA,GAAA,MAAA,GAAA,MAAA,GAAA,OAAA,GAgC3C,oBAAA,CAAA,GAAA,CAAA,OAAA,GAAA,QAhC2C,CAgC3C,KAAA,CAAA,SAhC2C,CAAA,GAgC3C,OAhC2C,CAAA,MAAA,GAAA,MAAA,GAAA,MAAA,GAAA,OAAA,GAgC3C,KAAA,CAAA,WAhC2C,GAgC3C,KAAA,CAAA,YAhC2C,CAAA,OAAA,EAAA,MAAA,GAgC3C,KAAA,CAAA,qBAhC2C,CAAA,GAAA,CAAA,CAAA,GAgC3C,QAhC2C,CAgC3C,KAAA,CAAA,SAhC2C,CAAA,GAAA,IAAA,GAAA,SAAA,CAAA,GAAA,IAAA,GAAA,SAAA;;AAgC3C,cAkBK,eAlBL,EAAA,GAAA,GAAA,CAAA,KAAA,EAmB2B,KAnB3B,EAAA,GAAA,KAAA"}
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import { Button } from "../../button.js";
|
|
4
|
-
import { House } from "../../../node_modules/lucide-react/dist/esm/icons/house.js";
|
|
5
|
-
import { RefreshCw } from "../../../node_modules/lucide-react/dist/esm/icons/refresh-cw.js";
|
|
6
|
-
import { TriangleAlert } from "../../../node_modules/lucide-react/dist/esm/icons/triangle-alert.js";
|
|
7
4
|
import React from "react";
|
|
8
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { AlertTriangle, Home, RefreshCw } from "lucide-react";
|
|
9
7
|
|
|
10
8
|
//#region ui/organisms/ErrorBoundary/ErrorBoundary.tsx
|
|
11
9
|
const DefaultErrorFallback = ({ error, errorId, resetError }) => {
|
|
@@ -16,7 +14,7 @@ const DefaultErrorFallback = ({ error, errorId, resetError }) => {
|
|
|
16
14
|
children: [
|
|
17
15
|
/* @__PURE__ */ jsx("div", {
|
|
18
16
|
className: "mb-4 flex justify-center",
|
|
19
|
-
children: /* @__PURE__ */ jsx(
|
|
17
|
+
children: /* @__PURE__ */ jsx(AlertTriangle, { className: "h-12 w-12 text-red-500" })
|
|
20
18
|
}),
|
|
21
19
|
/* @__PURE__ */ jsx("h1", {
|
|
22
20
|
className: "mb-2 text-2xl font-semibold text-gray-900",
|
|
@@ -53,7 +51,7 @@ const DefaultErrorFallback = ({ error, errorId, resetError }) => {
|
|
|
53
51
|
onPress: () => window.location.href = "/",
|
|
54
52
|
variant: "secondary",
|
|
55
53
|
className: "flex items-center gap-2",
|
|
56
|
-
children: [/* @__PURE__ */ jsx(
|
|
54
|
+
children: [/* @__PURE__ */ jsx(Home, { className: "h-4 w-4" }), "Accueil"]
|
|
57
55
|
})]
|
|
58
56
|
}),
|
|
59
57
|
false
|
|
@@ -105,4 +103,5 @@ const useErrorHandler = () => {
|
|
|
105
103
|
};
|
|
106
104
|
|
|
107
105
|
//#endregion
|
|
108
|
-
export { ErrorBoundary, useErrorHandler };
|
|
106
|
+
export { ErrorBoundary, useErrorHandler };
|
|
107
|
+
//# sourceMappingURL=ErrorBoundary.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ErrorBoundary.js","names":["DefaultErrorFallback: React.FC<ErrorFallbackProps>"],"sources":["../../../../ui/organisms/ErrorBoundary/ErrorBoundary.tsx"],"sourcesContent":["'use client';\n\nimport React from 'react';\n// import * as Sentry from '@sentry/nextjs';\nimport { AlertTriangle, RefreshCw, Home } from 'lucide-react';\nimport { Button } from '../../button';\n\ninterface ErrorBoundaryState {\n hasError: boolean;\n error: Error | null;\n errorId: string | null;\n}\n\ninterface ErrorBoundaryProps {\n children: React.ReactNode;\n fallback?: React.ComponentType<ErrorFallbackProps>;\n onError?: (error: Error, errorInfo: React.ErrorInfo) => void;\n}\n\ninterface ErrorFallbackProps {\n error: Error;\n errorId: string | null;\n resetError: () => void;\n}\n\nconst DefaultErrorFallback: React.FC<ErrorFallbackProps> = ({\n error,\n errorId,\n resetError,\n}) => {\n const isDevelopment = process.env.NODE_ENV === 'development';\n\n return (\n <div className=\"flex min-h-screen items-center justify-center bg-gray-50 px-4\">\n <div className=\"w-full max-w-md rounded-lg bg-white p-6 text-center shadow-lg\">\n <div className=\"mb-4 flex justify-center\">\n <AlertTriangle className=\"h-12 w-12 text-red-500\" />\n </div>\n\n <h1 className=\"mb-2 text-2xl font-semibold text-gray-900\">\n Une erreur s'est produite\n </h1>\n\n <p className=\"mb-6 text-gray-600\">\n Nous nous excusons pour ce désagrément. Notre équipe a été notifiée et\n travaille à résoudre le problème.\n </p>\n\n {isDevelopment && (\n <div className=\"mb-6 rounded-md bg-red-50 p-4 text-left\">\n <p className=\"mb-2 text-base font-medium text-red-800\">\n Erreur de développement:\n </p>\n <p className=\"font-mono text-sm break-all text-red-700\">\n {error.message}\n </p>\n {errorId && (\n <p className=\"mt-2 text-sm text-red-600\">ID: {errorId}</p>\n )}\n </div>\n )}\n\n <div className=\"flex flex-col justify-center gap-3 sm:flex-row\">\n <Button onPress={resetError} className=\"flex items-center gap-2\">\n <RefreshCw className=\"h-4 w-4\" />\n Réessayer\n </Button>\n\n <Button\n onPress={() => (window.location.href = '/')}\n variant=\"secondary\"\n className=\"flex items-center gap-2\"\n >\n <Home className=\"h-4 w-4\" />\n Accueil\n </Button>\n </div>\n\n {!isDevelopment && errorId && (\n <p className=\"mt-4 text-sm text-gray-500\">Code d'erreur: {errorId}</p>\n )}\n </div>\n </div>\n );\n};\n\nexport class ErrorBoundary extends React.Component<\n ErrorBoundaryProps,\n ErrorBoundaryState\n> {\n constructor(props: ErrorBoundaryProps) {\n super(props);\n this.state = {\n hasError: false,\n error: null,\n errorId: null,\n };\n }\n\n static getDerivedStateFromError(error: Error): Partial<ErrorBoundaryState> {\n return {\n hasError: true,\n error,\n };\n }\n\n componentDidCatch(error: Error, errorInfo: React.ErrorInfo) {\n // Generate unique error ID\n const errorId = `err_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`;\n\n // Log to Sentry with additional context\n // Sentry.withScope((scope) => {\n // scope.setTag('errorBoundary', true);\n // scope.setContext('errorInfo', { ...errorInfo });\n // scope.setContext('errorId', { errorId });\n // Sentry.captureException(error);\n // });\n\n // Update state with error ID\n this.setState({ errorId });\n\n // Call custom error handler if provided\n this.props.onError?.(error, errorInfo);\n\n // Log to console in development\n if (process.env.NODE_ENV === 'development') {\n console.error('ErrorBoundary caught an error:', error, errorInfo);\n }\n }\n\n resetError = () => {\n this.setState({\n hasError: false,\n error: null,\n errorId: null,\n });\n };\n\n render() {\n if (this.state.hasError && this.state.error) {\n const FallbackComponent = this.props.fallback || DefaultErrorFallback;\n\n return (\n <FallbackComponent\n error={this.state.error}\n errorId={this.state.errorId}\n resetError={this.resetError}\n />\n );\n }\n\n return this.props.children;\n }\n}\n\n// Hook for functional components to trigger error boundary\nexport const useErrorHandler = () => {\n return React.useCallback((error: Error) => {\n // This will be caught by the nearest error boundary\n throw error;\n }, []);\n};\n\nexport type { ErrorBoundaryProps, ErrorFallbackProps };\n"],"mappings":";;;;;;;;AAyBA,MAAMA,wBAAsD,EAC1D,OACA,SACA,iBACI;AAGJ,QACE,oBAAC;EAAI,WAAU;YACb,qBAAC;GAAI,WAAU;;IACb,oBAAC;KAAI,WAAU;eACb,oBAAC,iBAAc,WAAU,2BAA2B;MAChD;IAEN,oBAAC;KAAG,WAAU;eAA4C;MAErD;IAEL,oBAAC;KAAE,WAAU;eAAqB;MAG9B;IAGF,qBAAC;KAAI,WAAU;;MACb,oBAAC;OAAE,WAAU;iBAA0C;QAEnD;MACJ,oBAAC;OAAE,WAAU;iBACV,MAAM;QACL;MACH,WACC,qBAAC;OAAE,WAAU;kBAA4B,QAAK;QAAY;;MAExD;IAGR,qBAAC;KAAI,WAAU;gBACb,qBAAC;MAAO,SAAS;MAAY,WAAU;iBACrC,oBAAC,aAAU,WAAU,YAAY;OAE1B,EAET,qBAAC;MACC,eAAgB,OAAO,SAAS,OAAO;MACvC,SAAQ;MACR,WAAU;iBAEV,oBAAC,QAAK,WAAU,YAAY;OAErB;MACL;IAEL;;IAGG;GACF;;AAIV,IAAa,gBAAb,cAAmC,MAAM,UAGvC;CACA,YAAY,OAA2B;AACrC,QAAM,MAAM;AACZ,OAAK,QAAQ;GACX,UAAU;GACV,OAAO;GACP,SAAS;GACV;;CAGH,OAAO,yBAAyB,OAA2C;AACzE,SAAO;GACL,UAAU;GACV;GACD;;CAGH,kBAAkB,OAAc,WAA4B;EAE1D,MAAM,UAAU,OAAO,KAAK,KAAK,CAAC,GAAG,KAAK,QAAQ,CAAC,SAAS,GAAG,CAAC,OAAO,GAAG,EAAE;AAW5E,OAAK,SAAS,EAAE,SAAS,CAAC;AAG1B,OAAK,MAAM,UAAU,OAAO,UAAU;AAIpC,UAAQ,MAAM,kCAAkC,OAAO,UAAU;;CAIrE,mBAAmB;AACjB,OAAK,SAAS;GACZ,UAAU;GACV,OAAO;GACP,SAAS;GACV,CAAC;;CAGJ,SAAS;AACP,MAAI,KAAK,MAAM,YAAY,KAAK,MAAM,MAGpC,QACE,oBAHwB,KAAK,MAAM,YAAY;GAI7C,OAAO,KAAK,MAAM;GAClB,SAAS,KAAK,MAAM;GACpB,YAAY,KAAK;IACjB;AAIN,SAAO,KAAK,MAAM;;;AAKtB,MAAa,wBAAwB;AACnC,QAAO,MAAM,aAAa,UAAiB;AAEzC,QAAM;IACL,EAAE,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ListPageProps } from "./types.js";
|
|
2
|
+
import * as react_jsx_runtime157 from "react/jsx-runtime";
|
|
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_runtime157.JSX.Element;
|
|
27
|
+
//#endregion
|
|
28
|
+
export { ListPage };
|
|
29
|
+
//# sourceMappingURL=ListPage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ListPage.d.ts","names":[],"sources":["../../../../ui/organisms/ListPage/ListPage.tsx"],"sourcesContent":[],"mappings":";;;;iBAYgB;;;;;;;;;;;;;;;;;;;;;GAqBb,cAAc,KAAE,oBAAA,CAAA,GAAA,CAAA"}
|
|
@@ -1,20 +1,17 @@
|
|
|
1
|
-
import { __toESM } from "../../../_virtual/rolldown_runtime.js";
|
|
2
1
|
import { Button } from "../../button.js";
|
|
3
|
-
import { LoaderCircle } from "../../../node_modules/lucide-react/dist/esm/icons/loader-circle.js";
|
|
4
|
-
import { Plus } from "../../../node_modules/lucide-react/dist/esm/icons/plus.js";
|
|
5
|
-
import { RefreshCcw } from "../../../node_modules/lucide-react/dist/esm/icons/refresh-ccw.js";
|
|
6
|
-
import { TriangleAlert } from "../../../node_modules/lucide-react/dist/esm/icons/triangle-alert.js";
|
|
7
2
|
import { Card, CardContent } from "../../card.js";
|
|
8
3
|
import { HStack, VStack } from "../../stack.js";
|
|
9
4
|
import { Separator } from "../../separator.js";
|
|
10
|
-
import { require_link } from "../../../node_modules/next/link.js";
|
|
11
|
-
import { SearchAndFilter } from "../../molecules/SearchAndFilter/SearchAndFilter.js";
|
|
12
5
|
import { Pagination } from "../../atoms/Pagination/Pagination.js";
|
|
6
|
+
import "../../atoms/Pagination/index.js";
|
|
7
|
+
import { SearchAndFilter } from "../../molecules/SearchAndFilter/SearchAndFilter.js";
|
|
8
|
+
import "../../molecules/SearchAndFilter/index.js";
|
|
13
9
|
import React from "react";
|
|
14
10
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
11
|
+
import { AlertTriangle, Loader2, Plus, RefreshCcw } from "lucide-react";
|
|
12
|
+
import Link from "next/link";
|
|
15
13
|
|
|
16
14
|
//#region ui/organisms/ListPage/ListPage.tsx
|
|
17
|
-
var import_link = /* @__PURE__ */ __toESM(require_link());
|
|
18
15
|
function ListPage({ title, description, header, items, totalItems, totalPages, isLoading, isFetching, error, listState, searchPlaceholder, filters = [], onRefresh, primaryAction, toolbar, renderItem, renderEmpty, renderStats, className = "", itemClassName = "" }) {
|
|
19
16
|
const { searchQuery, setSearchQuery, filters: filterValues, setFilter, currentPage, itemsPerPage, setCurrentPage, setItemsPerPage } = listState;
|
|
20
17
|
if (isLoading && !items.length) return /* @__PURE__ */ jsxs(VStack, {
|
|
@@ -32,7 +29,7 @@ function ListPage({ title, description, header, items, totalItems, totalPages, i
|
|
|
32
29
|
className: "flex min-h-[400px] items-center justify-center",
|
|
33
30
|
children: /* @__PURE__ */ jsx(Card, { children: /* @__PURE__ */ jsxs(CardContent, {
|
|
34
31
|
className: "flex items-center gap-4 p-6",
|
|
35
|
-
children: [/* @__PURE__ */ jsx(
|
|
32
|
+
children: [/* @__PURE__ */ jsx(Loader2, { className: "text-primary h-8 w-8 animate-spin" }), /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("h3", {
|
|
36
33
|
className: "font-medium",
|
|
37
34
|
children: "Chargement..."
|
|
38
35
|
}), /* @__PURE__ */ jsx("p", {
|
|
@@ -58,7 +55,7 @@ function ListPage({ title, description, header, items, totalItems, totalPages, i
|
|
|
58
55
|
children: /* @__PURE__ */ jsx(Card, { children: /* @__PURE__ */ jsxs(CardContent, {
|
|
59
56
|
className: "flex flex-col items-center gap-4 p-6 text-center",
|
|
60
57
|
children: [
|
|
61
|
-
/* @__PURE__ */ jsx(
|
|
58
|
+
/* @__PURE__ */ jsx(AlertTriangle, { className: "text-destructive h-12 w-12" }),
|
|
62
59
|
/* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("h3", {
|
|
63
60
|
className: "font-medium",
|
|
64
61
|
children: "Erreur de chargement"
|
|
@@ -106,7 +103,7 @@ function ListPage({ title, description, header, items, totalItems, totalPages, i
|
|
|
106
103
|
toolbar,
|
|
107
104
|
(isLoading || isFetching) && /* @__PURE__ */ jsxs("div", {
|
|
108
105
|
className: "text-muted-foreground flex items-center gap-2 text-base",
|
|
109
|
-
children: [/* @__PURE__ */ jsx(
|
|
106
|
+
children: [/* @__PURE__ */ jsx(Loader2, { className: "h-4 w-4 animate-spin" }), /* @__PURE__ */ jsx("span", {
|
|
110
107
|
className: "hidden sm:inline",
|
|
111
108
|
children: "Mise à jour..."
|
|
112
109
|
})]
|
|
@@ -122,7 +119,7 @@ function ListPage({ title, description, header, items, totalItems, totalPages, i
|
|
|
122
119
|
children: "Rafraîchir"
|
|
123
120
|
})]
|
|
124
121
|
}),
|
|
125
|
-
primaryAction && /* @__PURE__ */ jsx(Fragment, { children: primaryAction.href ? /* @__PURE__ */ jsx(
|
|
122
|
+
primaryAction && /* @__PURE__ */ jsx(Fragment, { children: primaryAction.href ? /* @__PURE__ */ jsx(Link, {
|
|
126
123
|
href: primaryAction.href,
|
|
127
124
|
children: /* @__PURE__ */ jsxs(Button, { children: [
|
|
128
125
|
primaryAction.icon || /* @__PURE__ */ jsx(Plus, { className: "mr-2 h-4 w-4" }),
|
|
@@ -174,7 +171,7 @@ function ListPage({ title, description, header, items, totalItems, totalPages, i
|
|
|
174
171
|
className: "text-muted-foreground text-base",
|
|
175
172
|
children: searchQuery || Object.values(filterValues).some((v) => v) ? "Essayez de modifier vos critères de recherche" : "Commencez par créer votre premier élément"
|
|
176
173
|
})] }),
|
|
177
|
-
primaryAction && !searchQuery && !Object.values(filterValues).some((v) => v) && /* @__PURE__ */ jsx(Fragment, { children: primaryAction.href ? /* @__PURE__ */ jsx(
|
|
174
|
+
primaryAction && !searchQuery && !Object.values(filterValues).some((v) => v) && /* @__PURE__ */ jsx(Fragment, { children: primaryAction.href ? /* @__PURE__ */ jsx(Link, {
|
|
178
175
|
href: primaryAction.href,
|
|
179
176
|
children: /* @__PURE__ */ jsxs(Button, { children: [primaryAction.icon || /* @__PURE__ */ jsx(Plus, { className: "mr-2 h-4 w-4" }), primaryAction.label] })
|
|
180
177
|
}) : /* @__PURE__ */ jsxs(Button, {
|
|
@@ -199,4 +196,5 @@ function ListPage({ title, description, header, items, totalItems, totalPages, i
|
|
|
199
196
|
}
|
|
200
197
|
|
|
201
198
|
//#endregion
|
|
202
|
-
export { ListPage };
|
|
199
|
+
export { ListPage };
|
|
200
|
+
//# sourceMappingURL=ListPage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ListPage.js","names":[],"sources":["../../../../ui/organisms/ListPage/ListPage.tsx"],"sourcesContent":["import React from 'react';\nimport Link from 'next/link';\nimport { AlertTriangle, Loader2, Plus, RefreshCcw } from 'lucide-react';\nimport { Button } from '../../button';\nimport { Card, CardContent } from '../../card';\nimport { VStack, HStack } from '../../stack';\nimport { Separator } from '../../separator';\nimport { SearchAndFilter } from '../../molecules/SearchAndFilter';\nimport { Pagination } from '../../atoms/Pagination';\nimport type { ListPageProps } from './types';\nimport type { FilterOption } from '../../atoms/FilterSelect/types';\n\nexport function ListPage<T>({\n title,\n description,\n header,\n items,\n totalItems,\n totalPages,\n isLoading,\n isFetching,\n error,\n listState,\n searchPlaceholder,\n filters = [],\n onRefresh,\n primaryAction,\n toolbar,\n renderItem,\n renderEmpty,\n renderStats,\n className = '',\n itemClassName = '',\n}: ListPageProps<T>) {\n const {\n searchQuery,\n setSearchQuery,\n filters: filterValues,\n setFilter,\n currentPage,\n itemsPerPage,\n setCurrentPage,\n setItemsPerPage,\n } = listState;\n\n // Loading state with no items\n if (isLoading && !items.length) {\n return (\n <VStack className={`space-y-4 md:space-y-6 ${className}`}>\n {header ? (\n header\n ) : (\n <VStack className=\"gap-1\">\n <h1 className=\"text-2xl font-bold md:text-3xl\">{title}</h1>\n {description && (\n <p className=\"text-muted-foreground text-base\">{description}</p>\n )}\n </VStack>\n )}\n\n <div className=\"flex min-h-[400px] items-center justify-center\">\n <Card>\n <CardContent className=\"flex items-center gap-4 p-6\">\n <Loader2 className=\"text-primary h-8 w-8 animate-spin\" />\n <div>\n <h3 className=\"font-medium\">Chargement...</h3>\n <p className=\"text-muted-foreground text-base\">\n Récupération des données en cours\n </p>\n </div>\n </CardContent>\n </Card>\n </div>\n </VStack>\n );\n }\n\n // Error state with no items\n if (error && !items.length) {\n return (\n <VStack className={`space-y-4 md:space-y-6 ${className}`}>\n {header ? (\n header\n ) : (\n <VStack className=\"gap-1\">\n <h1 className=\"text-2xl font-bold md:text-3xl\">{title}</h1>\n {description && (\n <p className=\"text-muted-foreground text-base\">{description}</p>\n )}\n </VStack>\n )}\n\n <div className=\"flex min-h-[400px] items-center justify-center\">\n <Card>\n <CardContent className=\"flex flex-col items-center gap-4 p-6 text-center\">\n <AlertTriangle className=\"text-destructive h-12 w-12\" />\n <div>\n <h3 className=\"font-medium\">Erreur de chargement</h3>\n <p className=\"text-muted-foreground text-base\">\n {error.message || 'Une erreur est survenue'}\n </p>\n </div>\n {onRefresh && (\n <Button onPress={onRefresh} variant=\"outline\" size=\"sm\">\n <RefreshCcw className=\"mr-2 h-4 w-4\" />\n Réessayer\n </Button>\n )}\n </CardContent>\n </Card>\n </div>\n </VStack>\n );\n }\n\n // Prepare filter configurations\n const filterConfigs = filters.map((filter) => ({\n key: filter.key,\n label: filter.label,\n value: filterValues[filter.key] || '',\n options: filter.options,\n onChange: (value: FilterOption | undefined) => {\n setFilter(filter.key, value?.value || '');\n },\n showCounts: filter.showCounts,\n }));\n\n return (\n <VStack className={`space-y-4 md:space-y-6 ${className}`}>\n {/* Header */}\n {header ? (\n header\n ) : (\n <HStack className=\"items-center justify-between\">\n <VStack className=\"gap-1\">\n <h1 className=\"text-2xl font-bold md:text-3xl\">{title}</h1>\n {description && (\n <p className=\"text-muted-foreground text-base\">{description}</p>\n )}\n </VStack>\n\n <HStack className=\"items-center gap-4\">\n {toolbar}\n {(isLoading || isFetching) && (\n <div className=\"text-muted-foreground flex items-center gap-2 text-base\">\n <Loader2 className=\"h-4 w-4 animate-spin\" />\n <span className=\"hidden sm:inline\">Mise à jour...</span>\n </div>\n )}\n\n {onRefresh && (\n <Button\n variant=\"outline\"\n size=\"sm\"\n onPress={onRefresh}\n disabled={Boolean(isLoading)}\n aria-label=\"Rafraîchir\"\n >\n <RefreshCcw\n className={`mr-2 h-4 w-4 ${isLoading || isFetching ? 'animate-spin' : ''}`}\n />\n <span className=\"hidden sm:inline\">Rafraîchir</span>\n </Button>\n )}\n\n {primaryAction && (\n <>\n {primaryAction.href ? (\n <Link href={primaryAction.href}>\n <Button>\n {primaryAction.icon || <Plus className=\"mr-2 h-4 w-4\" />}\n <span className=\"hidden sm:inline\">\n {primaryAction.label}\n </span>\n <span className=\"sm:hidden\">Nouveau</span>\n </Button>\n </Link>\n ) : (\n <Button onPress={primaryAction.onClick}>\n {primaryAction.icon || <Plus className=\"mr-2 h-4 w-4\" />}\n <span className=\"hidden sm:inline\">\n {primaryAction.label}\n </span>\n <span className=\"sm:hidden\">Nouveau</span>\n </Button>\n )}\n </>\n )}\n </HStack>\n </HStack>\n )}\n\n {/* Stats (optional) */}\n {renderStats && (\n <>\n {renderStats(items)}\n <Separator />\n </>\n )}\n\n {/* Search and Filters */}\n <SearchAndFilter\n searchValue={searchQuery}\n onSearchChange={setSearchQuery}\n searchPlaceholder={searchPlaceholder}\n filters={filterConfigs}\n isLoading={isLoading}\n />\n\n {/* Content */}\n {items.length === 0 && !isLoading ? (\n renderEmpty ? (\n renderEmpty()\n ) : (\n <Card>\n <CardContent className=\"flex flex-col items-center gap-4 p-8 text-center\">\n <div className=\"bg-muted flex h-12 w-12 items-center justify-center rounded-full\">\n <div className=\"bg-muted-foreground/20 h-6 w-6 rounded-full\" />\n </div>\n <div>\n <h3 className=\"font-medium\">Aucun élément trouvé</h3>\n <p className=\"text-muted-foreground text-base\">\n {searchQuery || Object.values(filterValues).some((v) => v)\n ? 'Essayez de modifier vos critères de recherche'\n : 'Commencez par créer votre premier élément'}\n </p>\n </div>\n {primaryAction &&\n !searchQuery &&\n !Object.values(filterValues).some((v) => v) && (\n <>\n {primaryAction.href ? (\n <Link href={primaryAction.href}>\n <Button>\n {primaryAction.icon || (\n <Plus className=\"mr-2 h-4 w-4\" />\n )}\n {primaryAction.label}\n </Button>\n </Link>\n ) : (\n <Button onPress={primaryAction.onClick}>\n {primaryAction.icon || (\n <Plus className=\"mr-2 h-4 w-4\" />\n )}\n {primaryAction.label}\n </Button>\n )}\n </>\n )}\n </CardContent>\n </Card>\n )\n ) : (\n <>\n {/* Items List */}\n <div className={`space-y-4 ${itemClassName}`}>\n {items.map((item, index) => renderItem(item, index))}\n </div>\n\n {/* Pagination */}\n {totalPages > 1 && (\n <Pagination\n currentPage={currentPage}\n totalPages={totalPages}\n totalItems={totalItems}\n itemsPerPage={itemsPerPage}\n onPageChange={setCurrentPage}\n onItemsPerPageChange={setItemsPerPage}\n disabled={isLoading}\n />\n )}\n </>\n )}\n </VStack>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;AAYA,SAAgB,SAAY,EAC1B,OACA,aACA,QACA,OACA,YACA,YACA,WACA,YACA,OACA,WACA,mBACA,UAAU,EAAE,EACZ,WACA,eACA,SACA,YACA,aACA,aACA,YAAY,IACZ,gBAAgB,MACG;CACnB,MAAM,EACJ,aACA,gBACA,SAAS,cACT,WACA,aACA,cACA,gBACA,oBACE;AAGJ,KAAI,aAAa,CAAC,MAAM,OACtB,QACE,qBAAC;EAAO,WAAW,0BAA0B;aAC1C,SACC,SAEA,qBAAC;GAAO,WAAU;cAChB,oBAAC;IAAG,WAAU;cAAkC;KAAW,EAC1D,eACC,oBAAC;IAAE,WAAU;cAAmC;KAAgB;IAE3D,EAGX,oBAAC;GAAI,WAAU;aACb,oBAAC,kBACC,qBAAC;IAAY,WAAU;eACrB,oBAAC,WAAQ,WAAU,sCAAsC,EACzD,qBAAC,oBACC,oBAAC;KAAG,WAAU;eAAc;MAAkB,EAC9C,oBAAC;KAAE,WAAU;eAAkC;MAE3C,IACA;KACM,GACT;IACH;GACC;AAKb,KAAI,SAAS,CAAC,MAAM,OAClB,QACE,qBAAC;EAAO,WAAW,0BAA0B;aAC1C,SACC,SAEA,qBAAC;GAAO,WAAU;cAChB,oBAAC;IAAG,WAAU;cAAkC;KAAW,EAC1D,eACC,oBAAC;IAAE,WAAU;cAAmC;KAAgB;IAE3D,EAGX,oBAAC;GAAI,WAAU;aACb,oBAAC,kBACC,qBAAC;IAAY,WAAU;;KACrB,oBAAC,iBAAc,WAAU,+BAA+B;KACxD,qBAAC,oBACC,oBAAC;MAAG,WAAU;gBAAc;OAAyB,EACrD,oBAAC;MAAE,WAAU;gBACV,MAAM,WAAW;OAChB,IACA;KACL,aACC,qBAAC;MAAO,SAAS;MAAW,SAAQ;MAAU,MAAK;iBACjD,oBAAC,cAAW,WAAU,iBAAiB;OAEhC;;KAEC,GACT;IACH;GACC;CAKb,MAAM,gBAAgB,QAAQ,KAAK,YAAY;EAC7C,KAAK,OAAO;EACZ,OAAO,OAAO;EACd,OAAO,aAAa,OAAO,QAAQ;EACnC,SAAS,OAAO;EAChB,WAAW,UAAoC;AAC7C,aAAU,OAAO,KAAK,OAAO,SAAS,GAAG;;EAE3C,YAAY,OAAO;EACpB,EAAE;AAEH,QACE,qBAAC;EAAO,WAAW,0BAA0B;;GAE1C,SACC,SAEA,qBAAC;IAAO,WAAU;eAChB,qBAAC;KAAO,WAAU;gBAChB,oBAAC;MAAG,WAAU;gBAAkC;OAAW,EAC1D,eACC,oBAAC;MAAE,WAAU;gBAAmC;OAAgB;MAE3D,EAET,qBAAC;KAAO,WAAU;;MACf;OACC,aAAa,eACb,qBAAC;OAAI,WAAU;kBACb,oBAAC,WAAQ,WAAU,yBAAyB,EAC5C,oBAAC;QAAK,WAAU;kBAAmB;SAAqB;QACpD;MAGP,aACC,qBAAC;OACC,SAAQ;OACR,MAAK;OACL,SAAS;OACT,UAAU,QAAQ,UAAU;OAC5B,cAAW;kBAEX,oBAAC,cACC,WAAW,gBAAgB,aAAa,aAAa,iBAAiB,OACtE,EACF,oBAAC;QAAK,WAAU;kBAAmB;SAAiB;QAC7C;MAGV,iBACC,0CACG,cAAc,OACb,oBAAC;OAAK,MAAM,cAAc;iBACxB,qBAAC;QACE,cAAc,QAAQ,oBAAC,QAAK,WAAU,iBAAiB;QACxD,oBAAC;SAAK,WAAU;mBACb,cAAc;UACV;QACP,oBAAC;SAAK,WAAU;mBAAY;UAAc;WACnC;QACJ,GAEP,qBAAC;OAAO,SAAS,cAAc;;QAC5B,cAAc,QAAQ,oBAAC,QAAK,WAAU,iBAAiB;QACxD,oBAAC;SAAK,WAAU;mBACb,cAAc;UACV;QACP,oBAAC;SAAK,WAAU;mBAAY;UAAc;;QACnC,GAEV;;MAEE;KACF;GAIV,eACC,4CACG,YAAY,MAAM,EACnB,oBAAC,cAAY,IACZ;GAIL,oBAAC;IACC,aAAa;IACb,gBAAgB;IACG;IACnB,SAAS;IACE;KACX;GAGD,MAAM,WAAW,KAAK,CAAC,YACtB,cACE,aAAa,GAEb,oBAAC,kBACC,qBAAC;IAAY,WAAU;;KACrB,oBAAC;MAAI,WAAU;gBACb,oBAAC,SAAI,WAAU,gDAAgD;OAC3D;KACN,qBAAC,oBACC,oBAAC;MAAG,WAAU;gBAAc;OAAyB,EACrD,oBAAC;MAAE,WAAU;gBACV,eAAe,OAAO,OAAO,aAAa,CAAC,MAAM,MAAM,EAAE,GACtD,kDACA;OACF,IACA;KACL,iBACC,CAAC,eACD,CAAC,OAAO,OAAO,aAAa,CAAC,MAAM,MAAM,EAAE,IACzC,0CACG,cAAc,OACb,oBAAC;MAAK,MAAM,cAAc;gBACxB,qBAAC,qBACE,cAAc,QACb,oBAAC,QAAK,WAAU,iBAAiB,EAElC,cAAc,SACR;OACJ,GAEP,qBAAC;MAAO,SAAS,cAAc;iBAC5B,cAAc,QACb,oBAAC,QAAK,WAAU,iBAAiB,EAElC,cAAc;OACR,GAEV;;KAEK,GACT,GAGT,4CAEE,oBAAC;IAAI,WAAW,aAAa;cAC1B,MAAM,KAAK,MAAM,UAAU,WAAW,MAAM,MAAM,CAAC;KAChD,EAGL,aAAa,KACZ,oBAAC;IACc;IACD;IACA;IACE;IACd,cAAc;IACd,sBAAsB;IACtB,UAAU;KACV,IAEH;;GAEE"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { FilterOption } from "../../atoms/FilterSelect/types.js";
|
|
2
|
+
import "../../atoms/FilterSelect/index.js";
|
|
3
|
+
import { UseListStateReturn } from "../../useListState.js";
|
|
4
|
+
import { ReactNode } from "react";
|
|
5
|
+
|
|
6
|
+
//#region ui/organisms/ListPage/types.d.ts
|
|
7
|
+
interface ListPageFilter {
|
|
8
|
+
key: string;
|
|
9
|
+
label: string;
|
|
10
|
+
options: FilterOption[];
|
|
11
|
+
showCounts?: boolean;
|
|
12
|
+
}
|
|
13
|
+
interface ListPageProps<T = unknown> {
|
|
14
|
+
title: string;
|
|
15
|
+
description?: string;
|
|
16
|
+
header?: ReactNode;
|
|
17
|
+
items: T[];
|
|
18
|
+
totalItems: number;
|
|
19
|
+
totalPages: number;
|
|
20
|
+
isLoading: boolean;
|
|
21
|
+
isFetching?: boolean;
|
|
22
|
+
error?: Error | null;
|
|
23
|
+
listState: UseListStateReturn;
|
|
24
|
+
searchPlaceholder?: string;
|
|
25
|
+
filters?: ListPageFilter[];
|
|
26
|
+
onRefresh?: () => void;
|
|
27
|
+
primaryAction?: {
|
|
28
|
+
label: string;
|
|
29
|
+
href?: string;
|
|
30
|
+
onClick?: () => void;
|
|
31
|
+
icon?: ReactNode;
|
|
32
|
+
};
|
|
33
|
+
toolbar?: ReactNode;
|
|
34
|
+
renderItem: (item: T, index: number) => ReactNode;
|
|
35
|
+
renderEmpty?: () => ReactNode;
|
|
36
|
+
renderStats?: (items: T[]) => ReactNode;
|
|
37
|
+
className?: string;
|
|
38
|
+
itemClassName?: string;
|
|
39
|
+
}
|
|
40
|
+
//#endregion
|
|
41
|
+
export { ListPageFilter, ListPageProps };
|
|
42
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","names":[],"sources":["../../../../ui/organisms/ListPage/types.ts"],"sourcesContent":[],"mappings":";;;;;;UAGiB,cAAA;;;EAAA,OAAA,EAGN,YAHoB,EAAA;EAOd,UAAA,CAAA,EAAA,OAAa;;AAOrB,UAPQ,aAOR,CAAA,IAAA,OAAA,CAAA,CAAA;EAKC,KAAA,EAAA,MAAA;EAGG,WAAA,CAAA,EAAA,MAAA;EAID,MAAA,CAAA,EAfD,SAeC;EAQD,KAAA,EApBF,CAoBE,EAAA;EAEC,UAAA,EAAA,MAAA;EAGS,UAAA,EAAA,MAAA;EAAqB,SAAA,EAAA,OAAA;EACpB,UAAA,CAAA,EAAA,OAAA;EACE,KAAA,CAAA,EAtBd,KAsBc,GAAA,IAAA;EAAQ,SAAA,EAnBnB,kBAmBmB;EAAS,iBAAA,CAAA,EAAA,MAAA;YAf7B;;;;;;WAQD;;YAEC;qBAGS,qBAAqB;sBACpB;wBACE,QAAQ"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as React$1 from "react";
|
|
2
|
+
import * as react_jsx_runtime108 from "react/jsx-runtime";
|
|
3
|
+
import { VariantProps } from "class-variance-authority";
|
|
4
|
+
import * as class_variance_authority_types7 from "class-variance-authority/types";
|
|
5
|
+
|
|
6
|
+
//#region ui/page-header.d.ts
|
|
7
|
+
declare const headerVariants: (props?: ({
|
|
8
|
+
spacing?: "sm" | "lg" | "md" | null | undefined;
|
|
9
|
+
} & class_variance_authority_types7.ClassProp) | undefined) => string;
|
|
10
|
+
interface PageHeaderProps extends VariantProps<typeof headerVariants> {
|
|
11
|
+
breadcrumb?: React$1.ReactNode;
|
|
12
|
+
title: React$1.ReactNode;
|
|
13
|
+
subtitle?: React$1.ReactNode;
|
|
14
|
+
actions?: React$1.ReactNode;
|
|
15
|
+
className?: string;
|
|
16
|
+
}
|
|
17
|
+
declare function PageHeader({
|
|
18
|
+
breadcrumb,
|
|
19
|
+
title,
|
|
20
|
+
subtitle,
|
|
21
|
+
actions,
|
|
22
|
+
spacing,
|
|
23
|
+
className
|
|
24
|
+
}: PageHeaderProps): react_jsx_runtime108.JSX.Element;
|
|
25
|
+
//#endregion
|
|
26
|
+
export { PageHeader, PageHeaderProps };
|
|
27
|
+
//# sourceMappingURL=page-header.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page-header.d.ts","names":[],"sources":["../../ui/page-header.tsx"],"sourcesContent":[],"mappings":";;;;;;cAMM;;IAWJ,+BAAA,CAAA;UAEe,eAAA,SAAwB,oBAAoB;EAbvD,UAAA,CAAA,EAcS,OAAA,CAAM,SAHnB;EAEe,KAAA,EAER,OAAA,CAAM,SAFkB;EAA4B,QAAA,CAAA,EAGhD,OAAA,CAAM,SAH0C;EAC9C,OAAM,CAAA,EAGT,OAAA,CAAM,SAHG;EACZ,SAAM,CAAA,EAAA,MAAA;;AAEH,iBAII,UAAA,CAJE;EAAA,UAAA;EAAA,KAAA;EAAA,QAAA;EAAA,OAAA;EAAA,OAAA;EAAA;AAAA,CAAA,EAWf,eAXe,CAAA,EAWA,oBAAA,CAAA,GAAA,CAAA,OAXA"}
|
package/dist/ui/page-header.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { cn } from "../-core/src/utils.js";
|
|
2
1
|
import { HStack, VStack } from "./stack.js";
|
|
3
2
|
import { H1, P } from "./typography.js";
|
|
4
3
|
import "react";
|
|
4
|
+
import { cn } from "@lssm/lib.ui-kit-core/utils";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import { cva } from "class-variance-authority";
|
|
7
7
|
|
|
@@ -37,4 +37,5 @@ function PageHeader({ breadcrumb, title, subtitle, actions, spacing, className }
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
//#endregion
|
|
40
|
-
export { PageHeader };
|
|
40
|
+
export { PageHeader };
|
|
41
|
+
//# sourceMappingURL=page-header.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page-header.js","names":[],"sources":["../../ui/page-header.tsx"],"sourcesContent":["import * as React from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '@lssm/lib.ui-kit-core/utils';\nimport { HStack, VStack } from './stack';\nimport { H1, P } from './typography';\n\nconst headerVariants = cva('', {\n variants: {\n spacing: {\n sm: 'gap-1',\n md: 'gap-2',\n lg: 'gap-3',\n },\n },\n defaultVariants: {\n spacing: 'md',\n },\n});\n\nexport interface PageHeaderProps extends VariantProps<typeof headerVariants> {\n breadcrumb?: React.ReactNode;\n title: React.ReactNode;\n subtitle?: React.ReactNode;\n actions?: React.ReactNode;\n className?: string;\n}\n\nexport function PageHeader({\n breadcrumb,\n title,\n subtitle,\n actions,\n spacing,\n className,\n}: PageHeaderProps) {\n return (\n <VStack className={cn(headerVariants({ spacing }), className)}>\n {breadcrumb}\n <HStack className=\"items-start justify-between\">\n <VStack className=\"gap-1\">\n <H1 className=\"text-2xl font-semibold md:text-3xl\">{title}</H1>\n {subtitle ? (\n <P className=\"text-muted-foreground text-base\">{subtitle}</P>\n ) : null}\n </VStack>\n {actions ? (\n <HStack className=\"flex items-center gap-2\">{actions}</HStack>\n ) : null}\n </HStack>\n </VStack>\n );\n}\n"],"mappings":";;;;;;;;AAMA,MAAM,iBAAiB,IAAI,IAAI;CAC7B,UAAU,EACR,SAAS;EACP,IAAI;EACJ,IAAI;EACJ,IAAI;EACL,EACF;CACD,iBAAiB,EACf,SAAS,MACV;CACF,CAAC;AAUF,SAAgB,WAAW,EACzB,YACA,OACA,UACA,SACA,SACA,aACkB;AAClB,QACE,qBAAC;EAAO,WAAW,GAAG,eAAe,EAAE,SAAS,CAAC,EAAE,UAAU;aAC1D,YACD,qBAAC;GAAO,WAAU;cAChB,qBAAC;IAAO,WAAU;eAChB,oBAAC;KAAG,WAAU;eAAsC;MAAW,EAC9D,WACC,oBAAC;KAAE,WAAU;eAAmC;MAAa,GAC3D;KACG,EACR,UACC,oBAAC;IAAO,WAAU;cAA2B;KAAiB,GAC5D;IACG;GACF"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as react_jsx_runtime109 from "react/jsx-runtime";
|
|
2
|
+
import * as z from "zod";
|
|
3
|
+
|
|
4
|
+
//#region ui/password-strength.d.ts
|
|
5
|
+
declare const passwordSchema: z.ZodString;
|
|
6
|
+
declare function getPasswordStrength(password: string): {
|
|
7
|
+
score: number;
|
|
8
|
+
feedback: string[];
|
|
9
|
+
isValid: boolean;
|
|
10
|
+
};
|
|
11
|
+
interface PasswordStrengthProps {
|
|
12
|
+
password: string;
|
|
13
|
+
showFeedback?: boolean;
|
|
14
|
+
}
|
|
15
|
+
declare function PasswordStrength({
|
|
16
|
+
password,
|
|
17
|
+
showFeedback
|
|
18
|
+
}: PasswordStrengthProps): react_jsx_runtime109.JSX.Element | null;
|
|
19
|
+
//#endregion
|
|
20
|
+
export { PasswordStrength, getPasswordStrength, passwordSchema };
|
|
21
|
+
//# sourceMappingURL=password-strength.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"password-strength.d.ts","names":[],"sources":["../../ui/password-strength.tsx"],"sourcesContent":[],"mappings":";;;;cAMa,gBAAc,CAAA,CAAA;iBASX,mBAAA;;EATH,QAAA,EAAA,MAAA,EAMoD;EAGjD,OAAA,EAAA,OAAA;AA+Cf,CAAA;AAOD,UALU,qBAAA,CAKsB;EAC9B,QAAA,EAAA,MAAA;EACA,YAAA,CAAA,EAAA,OAAA;;AACsB,iBAHR,gBAAA,CAGQ;EAAA,QAAA;EAAA;AAAA,CAAA,EAArB,qBAAqB,CAAA,EAAA,oBAAA,CAAA,GAAA,CAAA,OAAA,GAAA,IAAA"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Text as Text$1 } from "./text.js";
|
|
2
2
|
import { HStack, VStack } from "./stack.js";
|
|
3
|
-
import { string } from "../node_modules/zod/v4/classic/schemas.js";
|
|
4
3
|
import React from "react";
|
|
5
4
|
import { View } from "react-native";
|
|
6
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import * as z from "zod";
|
|
7
7
|
|
|
8
8
|
//#region ui/password-strength.tsx
|
|
9
|
-
const passwordSchema = string().min(8, "Password must be at least 8 characters").max(128, "Password is too long").regex(/(?=.*[a-z])/, "Password must contain at least one lowercase letter").regex(/(?=.*[A-Z])/, "Password must contain at least one uppercase letter").regex(/(?=.*\d)/, "Password must contain at least one number");
|
|
9
|
+
const passwordSchema = z.string().min(8, "Password must be at least 8 characters").max(128, "Password is too long").regex(/(?=.*[a-z])/, "Password must contain at least one lowercase letter").regex(/(?=.*[A-Z])/, "Password must contain at least one uppercase letter").regex(/(?=.*\d)/, "Password must contain at least one number");
|
|
10
10
|
function getPasswordStrength(password) {
|
|
11
11
|
const feedback = [];
|
|
12
12
|
let score = 0;
|
|
@@ -95,4 +95,5 @@ function PasswordStrength({ password, showFeedback = true }) {
|
|
|
95
95
|
}
|
|
96
96
|
|
|
97
97
|
//#endregion
|
|
98
|
-
export { PasswordStrength, getPasswordStrength, passwordSchema };
|
|
98
|
+
export { PasswordStrength, getPasswordStrength, passwordSchema };
|
|
99
|
+
//# sourceMappingURL=password-strength.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"password-strength.js","names":["feedback: string[]","score","Text"],"sources":["../../ui/password-strength.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { HStack, VStack } from './stack';\nimport { Text } from './text';\nimport * as z from 'zod';\n\nexport const passwordSchema = z\n .string()\n .min(8, 'Password must be at least 8 characters')\n .max(128, 'Password is too long')\n .regex(/(?=.*[a-z])/, 'Password must contain at least one lowercase letter')\n .regex(/(?=.*[A-Z])/, 'Password must contain at least one uppercase letter')\n .regex(/(?=.*\\d)/, 'Password must contain at least one number');\n\n// Password strength indicator\nexport function getPasswordStrength(password: string): {\n score: number;\n feedback: string[];\n isValid: boolean;\n} {\n const feedback: string[] = [];\n let score = 0;\n\n if (password.length >= 8) {\n score += 1;\n } else {\n feedback.push('At least 8 characters');\n }\n\n if (/[a-z]/.test(password)) {\n score += 1;\n } else {\n feedback.push('One lowercase letter');\n }\n\n if (/[A-Z]/.test(password)) {\n score += 1;\n } else {\n feedback.push('One uppercase letter');\n }\n\n if (/\\d/.test(password)) {\n score += 1;\n } else {\n feedback.push('One number');\n }\n\n if (/[!@#$%^&*()_+\\-=[\\]{};':\"\\\\|,.<>/?]/.test(password)) {\n score += 1;\n }\n\n if (password.length >= 12) {\n score += 1;\n }\n\n const isValid = passwordSchema.safeParse(password).success;\n\n return {\n score: Math.min(score, 5),\n feedback,\n isValid,\n };\n}\n\ninterface PasswordStrengthProps {\n password: string;\n showFeedback?: boolean;\n}\n\nexport function PasswordStrength({\n password,\n showFeedback = true,\n}: PasswordStrengthProps) {\n const { score, feedback, isValid } = getPasswordStrength(password);\n\n if (!password) return null;\n\n const getStrengthColor = (score: number) => {\n if (score <= 1) return '#ef4444'; // red-500\n if (score <= 2) return '#f97316'; // orange-500\n if (score <= 3) return '#eab308'; // yellow-500\n if (score <= 4) return '#22c55e'; // green-500\n return '#16a34a'; // green-600\n };\n\n const getStrengthText = (score: number) => {\n if (score <= 1) return 'Very Weak';\n if (score <= 2) return 'Weak';\n if (score <= 3) return 'Fair';\n if (score <= 4) return 'Good';\n return 'Strong';\n };\n\n return (\n <VStack className=\"gap-y-2\">\n {/* Strength Bar */}\n <VStack className=\"gap-y-1\">\n <HStack className=\"items-center justify-between\">\n <Text className=\"text-muted-foreground text-xs\">\n Password Strength\n </Text>\n <Text\n className=\"text-xs font-medium\"\n style={{ color: getStrengthColor(score) }}\n >\n {getStrengthText(score)}\n </Text>\n </HStack>\n\n <View className=\"h-2 overflow-hidden rounded-full bg-gray-200\">\n <View\n className=\"h-full rounded-full transition-all duration-300\"\n style={{\n width: `${(score / 5) * 100}%`,\n backgroundColor: getStrengthColor(score),\n }}\n />\n </View>\n </VStack>\n\n {/* Feedback */}\n {showFeedback && feedback.length > 0 && (\n <VStack className=\"gap-y-1\">\n <Text className=\"text-muted-foreground text-xs\">Required:</Text>\n {feedback.map((item, index) => (\n <HStack key={index} className=\"items-center gap-x-2\">\n <View className=\"bg-muted-foreground h-1 w-1 rounded-full\" />\n <Text className=\"text-muted-foreground text-xs\">{item}</Text>\n </HStack>\n ))}\n </VStack>\n )}\n\n {/* Valid indicator */}\n {isValid && (\n <HStack className=\"items-center gap-x-2\">\n <View className=\"h-2 w-2 rounded-full bg-green-500\" />\n <Text className=\"text-xs text-green-600\">Meets requirements</Text>\n </HStack>\n )}\n </VStack>\n );\n}\n"],"mappings":";;;;;;;;AAMA,MAAa,iBAAiB,EAC3B,QAAQ,CACR,IAAI,GAAG,yCAAyC,CAChD,IAAI,KAAK,uBAAuB,CAChC,MAAM,eAAe,sDAAsD,CAC3E,MAAM,eAAe,sDAAsD,CAC3E,MAAM,YAAY,4CAA4C;AAGjE,SAAgB,oBAAoB,UAIlC;CACA,MAAMA,WAAqB,EAAE;CAC7B,IAAI,QAAQ;AAEZ,KAAI,SAAS,UAAU,EACrB,UAAS;KAET,UAAS,KAAK,wBAAwB;AAGxC,KAAI,QAAQ,KAAK,SAAS,CACxB,UAAS;KAET,UAAS,KAAK,uBAAuB;AAGvC,KAAI,QAAQ,KAAK,SAAS,CACxB,UAAS;KAET,UAAS,KAAK,uBAAuB;AAGvC,KAAI,KAAK,KAAK,SAAS,CACrB,UAAS;KAET,UAAS,KAAK,aAAa;AAG7B,KAAI,sCAAsC,KAAK,SAAS,CACtD,UAAS;AAGX,KAAI,SAAS,UAAU,GACrB,UAAS;CAGX,MAAM,UAAU,eAAe,UAAU,SAAS,CAAC;AAEnD,QAAO;EACL,OAAO,KAAK,IAAI,OAAO,EAAE;EACzB;EACA;EACD;;AAQH,SAAgB,iBAAiB,EAC/B,UACA,eAAe,QACS;CACxB,MAAM,EAAE,OAAO,UAAU,YAAY,oBAAoB,SAAS;AAElE,KAAI,CAAC,SAAU,QAAO;CAEtB,MAAM,oBAAoB,YAAkB;AAC1C,MAAIC,WAAS,EAAG,QAAO;AACvB,MAAIA,WAAS,EAAG,QAAO;AACvB,MAAIA,WAAS,EAAG,QAAO;AACvB,MAAIA,WAAS,EAAG,QAAO;AACvB,SAAO;;CAGT,MAAM,mBAAmB,YAAkB;AACzC,MAAIA,WAAS,EAAG,QAAO;AACvB,MAAIA,WAAS,EAAG,QAAO;AACvB,MAAIA,WAAS,EAAG,QAAO;AACvB,MAAIA,WAAS,EAAG,QAAO;AACvB,SAAO;;AAGT,QACE,qBAAC;EAAO,WAAU;;GAEhB,qBAAC;IAAO,WAAU;eAChB,qBAAC;KAAO,WAAU;gBAChB,oBAACC;MAAK,WAAU;gBAAgC;OAEzC,EACP,oBAACA;MACC,WAAU;MACV,OAAO,EAAE,OAAO,iBAAiB,MAAM,EAAE;gBAExC,gBAAgB,MAAM;OAClB;MACA,EAET,oBAAC;KAAK,WAAU;eACd,oBAAC;MACC,WAAU;MACV,OAAO;OACL,OAAO,GAAI,QAAQ,IAAK,IAAI;OAC5B,iBAAiB,iBAAiB,MAAM;OACzC;OACD;MACG;KACA;GAGR,gBAAgB,SAAS,SAAS,KACjC,qBAAC;IAAO,WAAU;eAChB,oBAACA;KAAK,WAAU;eAAgC;MAAgB,EAC/D,SAAS,KAAK,MAAM,UACnB,qBAAC;KAAmB,WAAU;gBAC5B,oBAAC,QAAK,WAAU,6CAA6C,EAC7D,oBAACA;MAAK,WAAU;gBAAiC;OAAY;OAFlD,MAGJ,CACT;KACK;GAIV,WACC,qBAAC;IAAO,WAAU;eAChB,oBAAC,QAAK,WAAU,sCAAsC,EACtD,oBAACA;KAAK,WAAU;eAAyB;MAAyB;KAC3D;;GAEJ"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as react8 from "react";
|
|
2
|
+
import * as react_native35 from "react-native";
|
|
3
|
+
import * as react_jsx_runtime110 from "react/jsx-runtime";
|
|
4
|
+
import * as _rn_primitives_popover0 from "@rn-primitives/popover";
|
|
5
|
+
|
|
6
|
+
//#region ui/popover.d.ts
|
|
7
|
+
declare const Popover: react8.ForwardRefExoticComponent<react_native35.ViewProps & {
|
|
8
|
+
asChild?: boolean;
|
|
9
|
+
} & {
|
|
10
|
+
onOpenChange?: (open: boolean) => void;
|
|
11
|
+
} & react8.RefAttributes<react_native35.View>>;
|
|
12
|
+
declare const PopoverTrigger: react8.ForwardRefExoticComponent<Omit<react_native35.PressableProps & react8.RefAttributes<react_native35.View>, "ref"> & {
|
|
13
|
+
asChild?: boolean;
|
|
14
|
+
} & {
|
|
15
|
+
onKeyDown?: (ev: React.KeyboardEvent) => void;
|
|
16
|
+
onKeyUp?: (ev: React.KeyboardEvent) => void;
|
|
17
|
+
} & react8.RefAttributes<_rn_primitives_popover0.TriggerRef>>;
|
|
18
|
+
declare function PopoverContent({
|
|
19
|
+
className,
|
|
20
|
+
align,
|
|
21
|
+
sideOffset,
|
|
22
|
+
portalHost,
|
|
23
|
+
...props
|
|
24
|
+
}: _rn_primitives_popover0.ContentProps & {
|
|
25
|
+
ref?: React.RefObject<_rn_primitives_popover0.ContentRef>;
|
|
26
|
+
portalHost?: string;
|
|
27
|
+
}): react_jsx_runtime110.JSX.Element;
|
|
28
|
+
//#endregion
|
|
29
|
+
export { Popover, PopoverContent, PopoverTrigger };
|
|
30
|
+
//# sourceMappingURL=popover.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"popover.d.ts","names":[],"sources":["../../ui/popover.tsx"],"sourcesContent":[],"mappings":";;;;;;cAMM,gBAAO,0BAAwB,cAAA,CAAxB,SAAA;;;;yBAAA,cAAA,CAAA,IAAA;AAN8C,cAQrD,cAF+B,SAEjB,yBAFiB,CAEjB,IAFiB,CAEU,cAAA,CAA3B,cAAA,GAAA,MAAA,CAAA,aAFiB,CAEjB,cAAA,CAAA,IAAA,CAFiB,EAAA,KAAA,CAAA,GAAA;EAAA,OAAA,CAAA,EAAA,OAAxB;CAAA,GAAA;;SAAA,CAAA,EAAA,CAAA,EAAA,qBAAA,EAAA,GAAA,IAAA;CAAA,uBAAA,oCAAA,CAAA;AAAA,iBAIJ,cAAA,CAFsC;EAAA,SAAA;EAAA,KAAA;EAAA,UAAA;EAAA,UAAA;EAAA,GAAA;CAAA,EAQ5C,uBAAA,CAAiB,YAR2B,GAAA;EAAA,GAAA,CAAA,EASvC,KAAA,CAAM,SATM,CASI,uBAAA,CAAiB,UATrB,CAAA;EAAA,UAAA,CAAA,EAAA,MAAA;CAAA,CAAA,EAWnB,oBAAA,CAAA,GAAA,CAAA,OAXmB"}
|
package/dist/ui/popover.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { cn } from "../-core/src/utils.js";
|
|
2
1
|
import { TextClassContext } from "./text.js";
|
|
3
2
|
import { Platform, StyleSheet } from "react-native";
|
|
4
3
|
import Animated, { FadeIn, FadeOut } from "react-native-reanimated";
|
|
4
|
+
import { cn } from "@lssm/lib.ui-kit-core/utils";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
import * as PopoverPrimitive from "@rn-primitives/popover";
|
|
7
7
|
|
|
@@ -31,4 +31,5 @@ function PopoverContent({ className, align = "center", sideOffset = 4, portalHos
|
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
//#endregion
|
|
34
|
-
export { Popover, PopoverContent, PopoverTrigger };
|
|
34
|
+
export { Popover, PopoverContent, PopoverTrigger };
|
|
35
|
+
//# sourceMappingURL=popover.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"popover.js","names":[],"sources":["../../ui/popover.tsx"],"sourcesContent":["import * as PopoverPrimitive from '@rn-primitives/popover';\nimport { Platform, StyleSheet } from 'react-native';\nimport Animated, { FadeIn, FadeOut } from 'react-native-reanimated';\nimport { cn } from '@lssm/lib.ui-kit-core/utils';\nimport { TextClassContext } from './text';\n\nconst Popover = PopoverPrimitive.Root;\n\nconst PopoverTrigger = PopoverPrimitive.Trigger;\n\nfunction PopoverContent({\n className,\n align = 'center',\n sideOffset = 4,\n portalHost,\n ...props\n}: PopoverPrimitive.ContentProps & {\n ref?: React.RefObject<PopoverPrimitive.ContentRef>;\n portalHost?: string;\n}) {\n return (\n <PopoverPrimitive.Portal hostName={portalHost}>\n <PopoverPrimitive.Overlay\n style={Platform.OS !== 'web' ? StyleSheet.absoluteFill : undefined}\n >\n <Animated.View entering={FadeIn.duration(200)} exiting={FadeOut}>\n <TextClassContext.Provider value=\"text-popover-foreground\">\n <PopoverPrimitive.Content\n align={align}\n sideOffset={sideOffset}\n className={cn(\n 'border-border bg-popover shadow-foreground/5 web:cursor-auto web:outline-hidden web:animate-in web:fade-in-0 web:zoom-in-95 web:data-[side=bottom]:slide-in-from-top-2 web:data-[side=left]:slide-in-from-right-2 web:data-[side=right]:slide-in-from-left-2 web:data-[side=top]:slide-in-from-bottom-2 z-50 w-72 rounded-md border p-4 shadow-md',\n className\n )}\n {...props}\n />\n </TextClassContext.Provider>\n </Animated.View>\n </PopoverPrimitive.Overlay>\n </PopoverPrimitive.Portal>\n );\n}\n\nexport { Popover, PopoverContent, PopoverTrigger };\n"],"mappings":";;;;;;;;AAMA,MAAM,UAAU,iBAAiB;AAEjC,MAAM,iBAAiB,iBAAiB;AAExC,SAAS,eAAe,EACtB,WACA,QAAQ,UACR,aAAa,GACb,YACA,GAAG,SAIF;AACD,QACE,oBAAC,iBAAiB;EAAO,UAAU;YACjC,oBAAC,iBAAiB;GAChB,OAAO,SAAS,OAAO,QAAQ,WAAW,eAAe;aAEzD,oBAAC,SAAS;IAAK,UAAU,OAAO,SAAS,IAAI;IAAE,SAAS;cACtD,oBAAC,iBAAiB;KAAS,OAAM;eAC/B,oBAAC,iBAAiB;MACT;MACK;MACZ,WAAW,GACT,qVACA,UACD;MACD,GAAI;OACJ;MACwB;KACd;IACS;GACH"}
|