@lssm/lib.ui-kit 1.11.1 → 1.41.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/README.md +5 -0
- package/dist/-core/src/utils.js +10 -0
- package/dist/_virtual/rolldown_runtime.js +33 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui/accordion.js +1 -1
- package/dist/ui/alert-dialog.js +1 -1
- package/dist/ui/alert.js +1 -1
- package/dist/ui/atoms/LoadingSpinner/LoadingSpinner.js +3 -3
- package/dist/ui/atoms/Pagination/Pagination.js +4 -1
- package/dist/ui/atoms/SearchInput/SearchInput.js +2 -1
- package/dist/ui/avatar.js +1 -1
- package/dist/ui/badge.js +1 -1
- package/dist/ui/breadcrumb.js +4 -3
- package/dist/ui/button.js +1 -1
- package/dist/ui/card.js +1 -1
- package/dist/ui/checkbox.js +1 -1
- package/dist/ui/context-menu.js +1 -1
- package/dist/ui/date-picker.js +1 -1
- package/dist/ui/date-range-picker.js +1 -1
- package/dist/ui/dialog.js +1 -1
- package/dist/ui/dropdown-menu.js +1 -1
- package/dist/ui/empty-state.js +1 -1
- package/dist/ui/empty.js +1 -1
- package/dist/ui/fab.js +1 -1
- package/dist/ui/field.js +1 -1
- package/dist/ui/form.js +1 -1
- package/dist/ui/hover-card.js +1 -1
- package/dist/ui/input.js +1 -1
- package/dist/ui/label.js +1 -1
- package/dist/ui/link.js +1 -1
- package/dist/ui/marketing/Hero.js +1 -1
- package/dist/ui/marketing/PricingTable.js +1 -1
- package/dist/ui/menubar.js +1 -1
- package/dist/ui/molecules/SearchAndFilter/SearchAndFilter.js +4 -2
- package/dist/ui/nativewind-env.d.js +0 -0
- package/dist/ui/navigation-menu.js +1 -1
- package/dist/ui/organisms/ErrorBoundary/ErrorBoundary.js +5 -3
- package/dist/ui/organisms/ListPage/ListPage.js +12 -7
- package/dist/ui/page-header.js +1 -1
- package/dist/ui/popover.js +1 -1
- package/dist/ui/progress.js +1 -1
- package/dist/ui/radio-group.js +1 -1
- package/dist/ui/select.js +1 -1
- package/dist/ui/separator.js +1 -1
- package/dist/ui/skeleton.js +1 -1
- package/dist/ui/stack.js +1 -1
- package/dist/ui/stepper.js +1 -1
- package/dist/ui/switch.js +1 -1
- package/dist/ui/table.js +1 -1
- package/dist/ui/tabs.js +1 -1
- package/dist/ui/text.js +1 -1
- package/dist/ui/textarea.js +1 -1
- package/dist/ui/time-picker.js +1 -1
- package/dist/ui/toggle-group.js +1 -1
- package/dist/ui/toggle.js +1 -1
- package/dist/ui/tooltip.js +1 -1
- package/dist/ui/typography.js +1 -1
- package/package.json +205 -114
- package/dist/index.d.ts +0 -4
- package/dist/ui/accordion.d.ts +0 -35
- package/dist/ui/alert-dialog.d.ts +0 -71
- package/dist/ui/alert.d.ts +0 -36
- package/dist/ui/aspect-ratio.d.ts +0 -11
- package/dist/ui/atoms/FilterSelect/FilterSelect.d.ts +0 -7
- package/dist/ui/atoms/FilterSelect/index.d.ts +0 -3
- package/dist/ui/atoms/FilterSelect/types.d.ts +0 -18
- package/dist/ui/atoms/LoadingSpinner/LoadingSpinner.d.ts +0 -22
- package/dist/ui/atoms/LoadingSpinner/index.d.ts +0 -2
- package/dist/ui/atoms/Pagination/Pagination.d.ts +0 -7
- package/dist/ui/atoms/Pagination/index.d.ts +0 -3
- package/dist/ui/atoms/Pagination/types.d.ts +0 -15
- package/dist/ui/atoms/SearchInput/SearchInput.d.ts +0 -7
- package/dist/ui/atoms/SearchInput/index.d.ts +0 -3
- package/dist/ui/atoms/SearchInput/types.d.ts +0 -12
- package/dist/ui/avatar.d.ts +0 -27
- package/dist/ui/badge.d.ts +0 -21
- package/dist/ui/breadcrumb.d.ts +0 -38
- package/dist/ui/button.d.ts +0 -25
- package/dist/ui/card.d.ts +0 -43
- package/dist/ui/carousel.d.ts +0 -4
- package/dist/ui/checkbox.d.ts +0 -16
- package/dist/ui/collapsible.d.ts +0 -24
- package/dist/ui/command.d.ts +0 -4
- package/dist/ui/context-menu.d.ts +0 -109
- package/dist/ui/date-picker.d.ts +0 -23
- package/dist/ui/date-range-picker.d.ts +0 -30
- package/dist/ui/datetime-picker.d.ts +0 -27
- package/dist/ui/dialog.d.ts +0 -68
- package/dist/ui/dropdown-menu.d.ts +0 -111
- package/dist/ui/empty-state.d.ts +0 -28
- package/dist/ui/empty.d.ts +0 -36
- package/dist/ui/fab.d.ts +0 -35
- package/dist/ui/field.d.ts +0 -66
- package/dist/ui/form.d.ts +0 -49
- package/dist/ui/hover-card.d.ts +0 -29
- package/dist/ui/icons/Check.d.ts +0 -2
- package/dist/ui/icons/ChevronDown.d.ts +0 -2
- package/dist/ui/icons/ChevronRight.d.ts +0 -2
- package/dist/ui/icons/ChevronUp.d.ts +0 -2
- package/dist/ui/icons/CircleUser.d.ts +0 -2
- package/dist/ui/icons/Info.d.ts +0 -2
- package/dist/ui/icons/Key.d.ts +0 -2
- package/dist/ui/icons/MoonStar.d.ts +0 -2
- package/dist/ui/icons/Sun.d.ts +0 -2
- package/dist/ui/icons/X.d.ts +0 -2
- package/dist/ui/icons/iconWithClassName.d.ts +0 -6
- package/dist/ui/input.d.ts +0 -14
- package/dist/ui/label.d.ts +0 -15
- package/dist/ui/link.d.ts +0 -13
- package/dist/ui/loading-button.d.ts +0 -19
- package/dist/ui/loading-overlay.d.ts +0 -15
- package/dist/ui/loading-screen.d.ts +0 -13
- package/dist/ui/marketing/FeatureGrid.d.ts +0 -20
- package/dist/ui/marketing/Hero.d.ts +0 -27
- package/dist/ui/marketing/PricingTable.d.ts +0 -24
- package/dist/ui/marketing/index.d.ts +0 -4
- package/dist/ui/menubar.d.ts +0 -114
- package/dist/ui/molecules/Autocomplete/index.d.ts +0 -4
- package/dist/ui/molecules/SearchAndFilter/SearchAndFilter.d.ts +0 -7
- package/dist/ui/molecules/SearchAndFilter/index.d.ts +0 -3
- package/dist/ui/molecules/SearchAndFilter/types.d.ts +0 -24
- package/dist/ui/molecules/SkeletonList.d.ts +0 -15
- package/dist/ui/nativewind-env.d.ts +0 -1
- package/dist/ui/navigation-menu.d.ts +0 -67
- package/dist/ui/organisms/ErrorBoundary/ErrorBoundary.d.ts +0 -29
- package/dist/ui/organisms/ErrorBoundary/index.d.ts +0 -2
- package/dist/ui/organisms/ListPage/ListPage.d.ts +0 -28
- package/dist/ui/organisms/ListPage/index.d.ts +0 -3
- package/dist/ui/organisms/ListPage/types.d.ts +0 -41
- package/dist/ui/page-header.d.ts +0 -26
- package/dist/ui/password-strength.d.ts +0 -20
- package/dist/ui/popover.d.ts +0 -29
- package/dist/ui/progress.d.ts +0 -16
- package/dist/ui/radio-group.d.ts +0 -14
- package/dist/ui/select.d.ts +0 -83
- package/dist/ui/separator.d.ts +0 -15
- package/dist/ui/sheet.d.ts +0 -4
- package/dist/ui/sidebar.d.ts +0 -4
- package/dist/ui/skeleton.d.ts +0 -11
- package/dist/ui/stack.d.ts +0 -76
- package/dist/ui/stepper.d.ts +0 -22
- package/dist/ui/switch.d.ts +0 -14
- package/dist/ui/table.d.ts +0 -50
- package/dist/ui/tabs.d.ts +0 -32
- package/dist/ui/text.d.ts +0 -20
- package/dist/ui/textarea.d.ts +0 -9
- package/dist/ui/time-picker.d.ts +0 -21
- package/dist/ui/toggle-group.d.ts +0 -35
- package/dist/ui/toggle.d.ts +0 -33
- package/dist/ui/tooltip.d.ts +0 -31
- package/dist/ui/typography.d.ts +0 -64
- package/dist/ui/useColorScheme.d.ts +0 -11
- package/dist/ui/useListState.d.ts +0 -33
- package/dist/ui/usecases/UseCaseCard.d.ts +0 -18
- package/dist/ui/usecases/UserStoryCard.d.ts +0 -14
- package/dist/ui/usecases/index.d.ts +0 -3
- package/dist/ui/utils.d.ts +0 -6
package/dist/ui/accordion.js
CHANGED
package/dist/ui/alert-dialog.js
CHANGED
package/dist/ui/alert.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { LoaderCircle } from "../../../node_modules/lucide-react/dist/esm/icons/loader-circle.js";
|
|
2
2
|
import { P } from "../../typography.js";
|
|
3
|
+
import { cn } from "../../utils.js";
|
|
3
4
|
import React from "react";
|
|
4
5
|
import { View } from "react-native";
|
|
5
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
-
import { Loader2 } from "lucide-react";
|
|
7
7
|
|
|
8
8
|
//#region ui/atoms/LoadingSpinner/LoadingSpinner.tsx
|
|
9
9
|
const sizeClasses = {
|
|
@@ -15,7 +15,7 @@ const sizeClasses = {
|
|
|
15
15
|
const LoadingSpinner = ({ size = "md", className, text, fullScreen = false }) => {
|
|
16
16
|
const spinner = /* @__PURE__ */ jsxs(View, {
|
|
17
17
|
className: cn("flex flex-col items-center justify-center gap-2", className),
|
|
18
|
-
children: [/* @__PURE__ */ jsx(
|
|
18
|
+
children: [/* @__PURE__ */ jsx(LoaderCircle, { className: cn("text-primary-600 animate-spin", sizeClasses[size]) }), text && /* @__PURE__ */ jsx(P, {
|
|
19
19
|
className: "animate-pulse text-base text-gray-600",
|
|
20
20
|
children: text
|
|
21
21
|
})]
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { Text as Text$1 } from "../../text.js";
|
|
2
2
|
import { Button } from "../../button.js";
|
|
3
|
+
import { ChevronLeft } from "../../../node_modules/lucide-react/dist/esm/icons/chevron-left.js";
|
|
4
|
+
import { ChevronRight } from "../../../node_modules/lucide-react/dist/esm/icons/chevron-right.js";
|
|
5
|
+
import { ChevronsLeft } from "../../../node_modules/lucide-react/dist/esm/icons/chevrons-left.js";
|
|
6
|
+
import { ChevronsRight } from "../../../node_modules/lucide-react/dist/esm/icons/chevrons-right.js";
|
|
3
7
|
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "../../select.js";
|
|
4
8
|
import React from "react";
|
|
5
9
|
import { View } from "react-native";
|
|
6
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
-
import { ChevronLeft, ChevronRight, ChevronsLeft, ChevronsRight } from "lucide-react";
|
|
8
11
|
|
|
9
12
|
//#region ui/atoms/Pagination/Pagination.tsx
|
|
10
13
|
const Pagination = ({ currentPage, totalPages, totalItems, itemsPerPage, onPageChange, onItemsPerPageChange, disabled = false, className = "", showItemsPerPage = true, itemsPerPageOptions = [
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { Text as Text$1 } from "../../text.js";
|
|
2
2
|
import { Button } from "../../button.js";
|
|
3
|
+
import { Search } from "../../../node_modules/lucide-react/dist/esm/icons/search.js";
|
|
4
|
+
import { X } from "../../../node_modules/lucide-react/dist/esm/icons/x.js";
|
|
3
5
|
import { Input } from "../../input.js";
|
|
4
6
|
import React from "react";
|
|
5
7
|
import { View } from "react-native";
|
|
6
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
-
import { Search, X } from "lucide-react";
|
|
8
9
|
|
|
9
10
|
//#region ui/atoms/SearchInput/SearchInput.tsx
|
|
10
11
|
const SearchInput = ({ value, onChange, placeholder = "Rechercher...", onClear, disabled = false, className = "", autoFocus = false }) => {
|
package/dist/ui/avatar.js
CHANGED
package/dist/ui/badge.js
CHANGED
package/dist/ui/breadcrumb.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { cn } from "
|
|
1
|
+
import { cn } from "../-core/src/utils.js";
|
|
2
|
+
import { ChevronRight } from "../node_modules/lucide-react/dist/esm/icons/chevron-right.js";
|
|
3
|
+
import { Ellipsis } from "../node_modules/lucide-react/dist/esm/icons/ellipsis.js";
|
|
2
4
|
import "react";
|
|
3
5
|
import { Text, View } from "react-native";
|
|
4
6
|
import "@rn-primitives/slot";
|
|
5
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
-
import { ChevronRight, MoreHorizontal } from "lucide-react";
|
|
7
8
|
|
|
8
9
|
//#region ui/breadcrumb.tsx
|
|
9
10
|
function Breadcrumb({ ...props }) {
|
|
@@ -61,7 +62,7 @@ function BreadcrumbEllipsis({ className, ...props }) {
|
|
|
61
62
|
"aria-hidden": true,
|
|
62
63
|
className: cn("flex size-9 items-center justify-center", className),
|
|
63
64
|
...props,
|
|
64
|
-
children: [/* @__PURE__ */ jsx(
|
|
65
|
+
children: [/* @__PURE__ */ jsx(Ellipsis, { className: "size-4" }), /* @__PURE__ */ jsx(View, {
|
|
65
66
|
className: "sr-only",
|
|
66
67
|
children: /* @__PURE__ */ jsx(Text, { children: "More" })
|
|
67
68
|
})]
|
package/dist/ui/button.js
CHANGED
package/dist/ui/card.js
CHANGED
package/dist/ui/checkbox.js
CHANGED
package/dist/ui/context-menu.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ChevronDown } from "./icons/ChevronDown.js";
|
|
2
|
-
import { cn } from "
|
|
2
|
+
import { cn } from "../-core/src/utils.js";
|
|
3
3
|
import { TextClassContext } from "./text.js";
|
|
4
4
|
import { Check } from "./icons/Check.js";
|
|
5
5
|
import { ChevronRight } from "./icons/ChevronRight.js";
|
package/dist/ui/date-picker.js
CHANGED
package/dist/ui/dialog.js
CHANGED
package/dist/ui/dropdown-menu.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ChevronDown } from "./icons/ChevronDown.js";
|
|
2
|
-
import { cn } from "
|
|
2
|
+
import { cn } from "../-core/src/utils.js";
|
|
3
3
|
import { TextClassContext } from "./text.js";
|
|
4
4
|
import { Check } from "./icons/Check.js";
|
|
5
5
|
import { ChevronRight } from "./icons/ChevronRight.js";
|
package/dist/ui/empty-state.js
CHANGED
package/dist/ui/empty.js
CHANGED
package/dist/ui/fab.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { cn } from "
|
|
1
|
+
import { cn } from "../-core/src/utils.js";
|
|
2
2
|
import React, { useState } from "react";
|
|
3
3
|
import { Pressable, StyleSheet, View } from "react-native";
|
|
4
4
|
import Animated, { useAnimatedStyle, withSpring, withTiming } from "react-native-reanimated";
|
package/dist/ui/field.js
CHANGED
package/dist/ui/form.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import { cn } from "
|
|
3
|
+
import { cn } from "../-core/src/utils.js";
|
|
4
4
|
import { Label } from "./label.js";
|
|
5
5
|
import { Controller, FormProvider, useFieldArray, useForm, useFormContext, useFormState } from "../node_modules/react-hook-form/dist/index.esm.js";
|
|
6
6
|
import { a } from "../node_modules/@hookform/resolvers/zod/dist/zod.js";
|
package/dist/ui/hover-card.js
CHANGED
package/dist/ui/input.js
CHANGED
package/dist/ui/label.js
CHANGED
package/dist/ui/link.js
CHANGED
package/dist/ui/menubar.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ChevronDown } from "./icons/ChevronDown.js";
|
|
2
|
-
import { cn } from "
|
|
2
|
+
import { cn } from "../-core/src/utils.js";
|
|
3
3
|
import { TextClassContext } from "./text.js";
|
|
4
4
|
import { Check } from "./icons/Check.js";
|
|
5
5
|
import { ChevronRight } from "./icons/ChevronRight.js";
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { Button } from "../../button.js";
|
|
2
|
+
import { ChevronDown } from "../../../node_modules/lucide-react/dist/esm/icons/chevron-down.js";
|
|
3
|
+
import { ChevronUp } from "../../../node_modules/lucide-react/dist/esm/icons/chevron-up.js";
|
|
4
|
+
import { Funnel } from "../../../node_modules/lucide-react/dist/esm/icons/funnel.js";
|
|
2
5
|
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "../../collapsible.js";
|
|
3
6
|
import { FilterSelect } from "../../atoms/FilterSelect/FilterSelect.js";
|
|
4
7
|
import { SearchInput } from "../../atoms/SearchInput/SearchInput.js";
|
|
5
8
|
import React, { useState } from "react";
|
|
6
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
-
import { ChevronDown, ChevronUp, Filter } from "lucide-react";
|
|
8
10
|
|
|
9
11
|
//#region ui/molecules/SearchAndFilter/SearchAndFilter.tsx
|
|
10
12
|
const SearchAndFilter = ({ searchValue, onSearchChange, searchPlaceholder, filters = [], isLoading = false, disabled = false, className = "", collapsible = true, defaultCollapsed = false }) => {
|
|
@@ -53,7 +55,7 @@ const SearchAndFilter = ({ searchValue, onSearchChange, searchPlaceholder, filte
|
|
|
53
55
|
className: "sm:hidden",
|
|
54
56
|
disabled: disabled || isLoading,
|
|
55
57
|
children: [
|
|
56
|
-
/* @__PURE__ */ jsx(
|
|
58
|
+
/* @__PURE__ */ jsx(Funnel, { className: "mr-2 h-4 w-4" }),
|
|
57
59
|
"Filtres",
|
|
58
60
|
activeFiltersCount > 0 && /* @__PURE__ */ jsx("span", {
|
|
59
61
|
className: "bg-primary text-primary-foreground ml-2 flex h-5 w-5 items-center justify-center rounded-full text-sm",
|
|
File without changes
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ChevronDown } from "./icons/ChevronDown.js";
|
|
2
|
-
import { cn } from "
|
|
2
|
+
import { cn } from "../-core/src/utils.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import { Platform, View } from "react-native";
|
|
5
5
|
import Animated, { Extrapolation, FadeInLeft, FadeOutLeft, interpolate, useAnimatedStyle, useDerivedValue, withTiming } from "react-native-reanimated";
|
|
@@ -1,9 +1,11 @@
|
|
|
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";
|
|
4
7
|
import React from "react";
|
|
5
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
-
import { AlertTriangle, Home, RefreshCw } from "lucide-react";
|
|
7
9
|
|
|
8
10
|
//#region ui/organisms/ErrorBoundary/ErrorBoundary.tsx
|
|
9
11
|
const DefaultErrorFallback = ({ error, errorId, resetError }) => {
|
|
@@ -14,7 +16,7 @@ const DefaultErrorFallback = ({ error, errorId, resetError }) => {
|
|
|
14
16
|
children: [
|
|
15
17
|
/* @__PURE__ */ jsx("div", {
|
|
16
18
|
className: "mb-4 flex justify-center",
|
|
17
|
-
children: /* @__PURE__ */ jsx(
|
|
19
|
+
children: /* @__PURE__ */ jsx(TriangleAlert, { className: "h-12 w-12 text-red-500" })
|
|
18
20
|
}),
|
|
19
21
|
/* @__PURE__ */ jsx("h1", {
|
|
20
22
|
className: "mb-2 text-2xl font-semibold text-gray-900",
|
|
@@ -51,7 +53,7 @@ const DefaultErrorFallback = ({ error, errorId, resetError }) => {
|
|
|
51
53
|
onPress: () => window.location.href = "/",
|
|
52
54
|
variant: "secondary",
|
|
53
55
|
className: "flex items-center gap-2",
|
|
54
|
-
children: [/* @__PURE__ */ jsx(
|
|
56
|
+
children: [/* @__PURE__ */ jsx(House, { className: "h-4 w-4" }), "Accueil"]
|
|
55
57
|
})]
|
|
56
58
|
}),
|
|
57
59
|
false
|
|
@@ -1,15 +1,20 @@
|
|
|
1
|
+
import { __toESM } from "../../../_virtual/rolldown_runtime.js";
|
|
1
2
|
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";
|
|
2
7
|
import { Card, CardContent } from "../../card.js";
|
|
3
8
|
import { HStack, VStack } from "../../stack.js";
|
|
4
9
|
import { Separator } from "../../separator.js";
|
|
5
10
|
import { Pagination } from "../../atoms/Pagination/Pagination.js";
|
|
6
11
|
import { SearchAndFilter } from "../../molecules/SearchAndFilter/SearchAndFilter.js";
|
|
12
|
+
import { require_link } from "../../../node_modules/next/link.js";
|
|
7
13
|
import React from "react";
|
|
8
14
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
-
import { AlertTriangle, Loader2, Plus, RefreshCcw } from "lucide-react";
|
|
10
|
-
import Link from "next/link";
|
|
11
15
|
|
|
12
16
|
//#region ui/organisms/ListPage/ListPage.tsx
|
|
17
|
+
var import_link = /* @__PURE__ */ __toESM(require_link());
|
|
13
18
|
function ListPage({ title, description, header, items, totalItems, totalPages, isLoading, isFetching, error, listState, searchPlaceholder, filters = [], onRefresh, primaryAction, toolbar, renderItem, renderEmpty, renderStats, className = "", itemClassName = "" }) {
|
|
14
19
|
const { searchQuery, setSearchQuery, filters: filterValues, setFilter, currentPage, itemsPerPage, setCurrentPage, setItemsPerPage } = listState;
|
|
15
20
|
if (isLoading && !items.length) return /* @__PURE__ */ jsxs(VStack, {
|
|
@@ -27,7 +32,7 @@ function ListPage({ title, description, header, items, totalItems, totalPages, i
|
|
|
27
32
|
className: "flex min-h-[400px] items-center justify-center",
|
|
28
33
|
children: /* @__PURE__ */ jsx(Card, { children: /* @__PURE__ */ jsxs(CardContent, {
|
|
29
34
|
className: "flex items-center gap-4 p-6",
|
|
30
|
-
children: [/* @__PURE__ */ jsx(
|
|
35
|
+
children: [/* @__PURE__ */ jsx(LoaderCircle, { className: "text-primary h-8 w-8 animate-spin" }), /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("h3", {
|
|
31
36
|
className: "font-medium",
|
|
32
37
|
children: "Chargement..."
|
|
33
38
|
}), /* @__PURE__ */ jsx("p", {
|
|
@@ -53,7 +58,7 @@ function ListPage({ title, description, header, items, totalItems, totalPages, i
|
|
|
53
58
|
children: /* @__PURE__ */ jsx(Card, { children: /* @__PURE__ */ jsxs(CardContent, {
|
|
54
59
|
className: "flex flex-col items-center gap-4 p-6 text-center",
|
|
55
60
|
children: [
|
|
56
|
-
/* @__PURE__ */ jsx(
|
|
61
|
+
/* @__PURE__ */ jsx(TriangleAlert, { className: "text-destructive h-12 w-12" }),
|
|
57
62
|
/* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("h3", {
|
|
58
63
|
className: "font-medium",
|
|
59
64
|
children: "Erreur de chargement"
|
|
@@ -101,7 +106,7 @@ function ListPage({ title, description, header, items, totalItems, totalPages, i
|
|
|
101
106
|
toolbar,
|
|
102
107
|
(isLoading || isFetching) && /* @__PURE__ */ jsxs("div", {
|
|
103
108
|
className: "text-muted-foreground flex items-center gap-2 text-base",
|
|
104
|
-
children: [/* @__PURE__ */ jsx(
|
|
109
|
+
children: [/* @__PURE__ */ jsx(LoaderCircle, { className: "h-4 w-4 animate-spin" }), /* @__PURE__ */ jsx("span", {
|
|
105
110
|
className: "hidden sm:inline",
|
|
106
111
|
children: "Mise à jour..."
|
|
107
112
|
})]
|
|
@@ -117,7 +122,7 @@ function ListPage({ title, description, header, items, totalItems, totalPages, i
|
|
|
117
122
|
children: "Rafraîchir"
|
|
118
123
|
})]
|
|
119
124
|
}),
|
|
120
|
-
primaryAction && /* @__PURE__ */ jsx(Fragment, { children: primaryAction.href ? /* @__PURE__ */ jsx(
|
|
125
|
+
primaryAction && /* @__PURE__ */ jsx(Fragment, { children: primaryAction.href ? /* @__PURE__ */ jsx(import_link.default, {
|
|
121
126
|
href: primaryAction.href,
|
|
122
127
|
children: /* @__PURE__ */ jsxs(Button, { children: [
|
|
123
128
|
primaryAction.icon || /* @__PURE__ */ jsx(Plus, { className: "mr-2 h-4 w-4" }),
|
|
@@ -169,7 +174,7 @@ function ListPage({ title, description, header, items, totalItems, totalPages, i
|
|
|
169
174
|
className: "text-muted-foreground text-base",
|
|
170
175
|
children: searchQuery || Object.values(filterValues).some((v) => v) ? "Essayez de modifier vos critères de recherche" : "Commencez par créer votre premier élément"
|
|
171
176
|
})] }),
|
|
172
|
-
primaryAction && !searchQuery && !Object.values(filterValues).some((v) => v) && /* @__PURE__ */ jsx(Fragment, { children: primaryAction.href ? /* @__PURE__ */ jsx(
|
|
177
|
+
primaryAction && !searchQuery && !Object.values(filterValues).some((v) => v) && /* @__PURE__ */ jsx(Fragment, { children: primaryAction.href ? /* @__PURE__ */ jsx(import_link.default, {
|
|
173
178
|
href: primaryAction.href,
|
|
174
179
|
children: /* @__PURE__ */ jsxs(Button, { children: [primaryAction.icon || /* @__PURE__ */ jsx(Plus, { className: "mr-2 h-4 w-4" }), primaryAction.label] })
|
|
175
180
|
}) : /* @__PURE__ */ jsxs(Button, {
|
package/dist/ui/page-header.js
CHANGED
package/dist/ui/popover.js
CHANGED
package/dist/ui/progress.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { cn } from "
|
|
1
|
+
import { cn } from "../-core/src/utils.js";
|
|
2
2
|
import "react";
|
|
3
3
|
import { Platform, View } from "react-native";
|
|
4
4
|
import Animated, { Extrapolation, interpolate, useAnimatedStyle, useDerivedValue, withSpring } from "react-native-reanimated";
|
package/dist/ui/radio-group.js
CHANGED
package/dist/ui/select.js
CHANGED
package/dist/ui/separator.js
CHANGED
package/dist/ui/skeleton.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { cn } from "
|
|
1
|
+
import { cn } from "../-core/src/utils.js";
|
|
2
2
|
import * as React$1 from "react";
|
|
3
3
|
import { View } from "react-native";
|
|
4
4
|
import Animated, { useAnimatedStyle, useSharedValue, withRepeat, withSequence, withTiming } from "react-native-reanimated";
|
package/dist/ui/stack.js
CHANGED
package/dist/ui/stepper.js
CHANGED
package/dist/ui/switch.js
CHANGED
package/dist/ui/table.js
CHANGED
package/dist/ui/tabs.js
CHANGED
package/dist/ui/text.js
CHANGED
package/dist/ui/textarea.js
CHANGED
package/dist/ui/time-picker.js
CHANGED
package/dist/ui/toggle-group.js
CHANGED
package/dist/ui/toggle.js
CHANGED
package/dist/ui/tooltip.js
CHANGED
package/dist/ui/typography.js
CHANGED