@dsfrkit/react 0.1.0 → 0.1.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.md +9 -0
- package/dist/chunk-6BDCXBQS.mjs +27 -0
- package/dist/chunk-7NALFLW6.mjs +95 -0
- package/dist/chunk-AHDO2MCS.mjs +88 -0
- package/dist/chunk-EPFYVPO6.mjs +522 -0
- package/dist/chunk-F4PM3VZD.mjs +209 -0
- package/dist/chunk-GMPYN676.mjs +95 -0
- package/dist/chunk-HNPRD7VC.mjs +364 -0
- package/dist/chunk-HO2KRQRO.mjs +134 -0
- package/dist/chunk-KEZIWRJZ.mjs +69 -0
- package/dist/chunk-NBXR5G4X.mjs +519 -0
- package/dist/chunk-NYOO7SXJ.mjs +621 -0
- package/dist/chunk-P2WVLCXW.mjs +624 -0
- package/dist/chunk-SBRYNTUT.mjs +21 -0
- package/dist/chunk-X3BFUS2Y.mjs +519 -0
- package/dist/chunk-Z3ZF5L2F.mjs +519 -0
- package/dist/chunk-ZKFNSQBN.mjs +27 -0
- package/dist/components/navigation/index.d.mts +9 -62
- package/dist/components/navigation/index.d.ts +9 -62
- package/dist/components/navigation/index.js +179 -61
- package/dist/components/navigation/index.mjs +1 -1
- package/dist/components/ui/alert.js +14 -2
- package/dist/components/ui/alert.mjs +1 -1
- package/dist/components/ui/indicator.d.mts +1 -1
- package/dist/components/ui/indicator.d.ts +1 -1
- package/dist/components/ui/input.js +12 -33
- package/dist/components/ui/input.mjs +1 -1
- package/dist/components/ui/progress.d.mts +1 -1
- package/dist/components/ui/progress.d.ts +1 -1
- package/dist/components/ui/progress.js +36 -39
- package/dist/components/ui/progress.mjs +1 -1
- package/dist/components/ui/skeleton.d.mts +2 -2
- package/dist/components/ui/skeleton.d.ts +2 -2
- package/dist/components/ui/skeleton.js +8 -8
- package/dist/components/ui/skeleton.mjs +1 -1
- package/dist/components/ui/tabs.js +2 -9
- package/dist/components/ui/tabs.mjs +1 -1
- package/dist/components/ui/tile.js +2 -14
- package/dist/components/ui/tile.mjs +1 -1
- package/dist/index.js +449 -362
- package/dist/index.mjs +8 -8
- package/package.json +12 -12
- package/src/components/navigation/header.tsx +197 -101
- package/src/components/navigation/navigation.tsx +2 -2
- package/src/components/ui/alert.tsx +8 -2
- package/src/components/ui/input.tsx +100 -26
- package/src/components/ui/progress.tsx +37 -40
- package/src/components/ui/skeleton.tsx +8 -8
- package/src/components/ui/tabs.tsx +2 -6
- package/src/components/ui/tile.tsx +2 -12
package/LICENSE.md
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
Le contenu de ce dépôt est placé sous licence MIT License, à l'exception de la fonte Marianne.
|
|
2
|
+
|
|
3
|
+
The content of this repository is under MIT License, except for the Marianne font.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
+
|
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { cn } from './chunk-SZOFVBTZ.mjs';
|
|
2
|
+
import { cva } from 'class-variance-authority';
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
var skeletonVariants = cva("overflow-hidden relative", {
|
|
6
|
+
variants: {
|
|
7
|
+
variant: {
|
|
8
|
+
default: "bg-muted",
|
|
9
|
+
subtle: "bg-muted/50"
|
|
10
|
+
},
|
|
11
|
+
animation: {
|
|
12
|
+
pulse: "animate-pulse",
|
|
13
|
+
wave: 'after:content-[""] after:absolute after:inset-0 after:translate-x-[-100%] after:animate-skeleton-wave after:bg-gradient-to-r after:from-transparent after:via-muted-foreground/10 after:to-transparent',
|
|
14
|
+
shimmer: 'after:content-[""] after:absolute after:inset-0 after:translate-x-[-100%] after:animate-skeleton-shimmer after:bg-gradient-to-r after:from-transparent after:via-muted-foreground/15 after:to-transparent after:skew-x-[-20deg]',
|
|
15
|
+
none: ""
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
defaultVariants: {
|
|
19
|
+
variant: "default",
|
|
20
|
+
animation: "pulse"
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
function Skeleton({ className, variant, animation, ...props }) {
|
|
24
|
+
return /* @__PURE__ */ jsx("div", { className: cn(skeletonVariants({ variant, animation }), className), ...props });
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export { Skeleton };
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { cn } from './chunk-SZOFVBTZ.mjs';
|
|
2
|
+
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { jsx } from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
var Tabs = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
7
|
+
TabsPrimitive.Root,
|
|
8
|
+
{
|
|
9
|
+
ref,
|
|
10
|
+
className: cn(className),
|
|
11
|
+
...props
|
|
12
|
+
}
|
|
13
|
+
));
|
|
14
|
+
Tabs.displayName = TabsPrimitive.Root.displayName;
|
|
15
|
+
var TabsList = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
16
|
+
TabsPrimitive.List,
|
|
17
|
+
{
|
|
18
|
+
ref,
|
|
19
|
+
className: cn(
|
|
20
|
+
"flex gap-1 p-0",
|
|
21
|
+
// ── Horizontal (défaut) ──────────────────────────────────────────────
|
|
22
|
+
"data-[orientation=horizontal]:flex-row data-[orientation=horizontal]:flex-nowrap data-[orientation=horizontal]:items-end data-[orientation=horizontal]:justify-start",
|
|
23
|
+
"data-[orientation=horizontal]:w-full data-[orientation=horizontal]:overflow-x-auto",
|
|
24
|
+
"data-[orientation=horizontal]:px-4",
|
|
25
|
+
"data-[orientation=horizontal]:shadow-[inset_0_-1px_0_0_var(--border-default-grey)]",
|
|
26
|
+
// ── Vertical ────────────────────────────────────────────────────────
|
|
27
|
+
"data-[orientation=vertical]:flex-col data-[orientation=vertical]:items-stretch data-[orientation=vertical]:justify-start",
|
|
28
|
+
"data-[orientation=vertical]:py-4 data-[orientation=vertical]:border-r data-[orientation=vertical]:border-[var(--border-default-grey)]",
|
|
29
|
+
// Masquer scrollbar
|
|
30
|
+
"[&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]",
|
|
31
|
+
className
|
|
32
|
+
),
|
|
33
|
+
...props
|
|
34
|
+
}
|
|
35
|
+
));
|
|
36
|
+
TabsList.displayName = TabsPrimitive.List.displayName;
|
|
37
|
+
var TabsTrigger = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
38
|
+
TabsPrimitive.Trigger,
|
|
39
|
+
{
|
|
40
|
+
ref,
|
|
41
|
+
className: cn(
|
|
42
|
+
// ── Base commune ────────────────────────────────────────────────────
|
|
43
|
+
"inline-flex items-center whitespace-nowrap px-4 py-2 text-base font-medium transition-colors shrink-0",
|
|
44
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--blue-france-sun-113-625)] focus-visible:ring-offset-2 focus-visible:z-10",
|
|
45
|
+
"disabled:pointer-events-none disabled:opacity-50",
|
|
46
|
+
// ── Horizontal ──────────────────────────────────────────────────────
|
|
47
|
+
"data-[orientation=horizontal]:justify-center data-[orientation=horizontal]:min-h-[48px]",
|
|
48
|
+
"data-[orientation=horizontal]:border-x data-[orientation=horizontal]:border-t-2 data-[orientation=horizontal]:border-b-0 data-[orientation=horizontal]:border-transparent",
|
|
49
|
+
"data-[orientation=horizontal]:bg-[var(--background-action-low-blue-france)]",
|
|
50
|
+
"data-[orientation=horizontal]:text-[var(--text-action-high-grey)]",
|
|
51
|
+
"data-[orientation=horizontal]:hover:bg-[var(--background-action-low-blue-france-hover)]",
|
|
52
|
+
// Actif horizontal
|
|
53
|
+
"data-[orientation=horizontal]:data-[state=active]:bg-background",
|
|
54
|
+
"data-[orientation=horizontal]:data-[state=active]:text-[var(--text-active-blue-france)]",
|
|
55
|
+
"data-[orientation=horizontal]:data-[state=active]:font-bold",
|
|
56
|
+
"data-[orientation=horizontal]:data-[state=active]:border-x-[var(--border-default-grey)]",
|
|
57
|
+
"data-[orientation=horizontal]:data-[state=active]:border-t-[var(--border-active-blue-france)]",
|
|
58
|
+
// Le shadow de bg-background masque la bordure de TabsList
|
|
59
|
+
"data-[orientation=horizontal]:data-[state=active]:shadow-[0_1px_0_0_var(--background-default-grey)]",
|
|
60
|
+
// ── Vertical ────────────────────────────────────────────────────────
|
|
61
|
+
"data-[orientation=vertical]:justify-start data-[orientation=vertical]:min-h-[44px]",
|
|
62
|
+
"data-[orientation=vertical]:border-y data-[orientation=vertical]:border-l-2 data-[orientation=vertical]:border-r-0 data-[orientation=vertical]:border-transparent",
|
|
63
|
+
"data-[orientation=vertical]:bg-[var(--background-action-low-blue-france)]",
|
|
64
|
+
"data-[orientation=vertical]:text-[var(--text-action-high-grey)]",
|
|
65
|
+
"data-[orientation=vertical]:hover:bg-[var(--background-action-low-blue-france-hover)]",
|
|
66
|
+
// Actif vertical
|
|
67
|
+
"data-[orientation=vertical]:data-[state=active]:-mr-[1px]",
|
|
68
|
+
"data-[orientation=vertical]:data-[state=active]:bg-background",
|
|
69
|
+
"data-[orientation=vertical]:data-[state=active]:text-[var(--text-active-blue-france)]",
|
|
70
|
+
"data-[orientation=vertical]:data-[state=active]:font-bold",
|
|
71
|
+
"data-[orientation=vertical]:data-[state=active]:border-y-[var(--border-default-grey)]",
|
|
72
|
+
"data-[orientation=vertical]:data-[state=active]:border-l-[var(--border-active-blue-france)]",
|
|
73
|
+
"data-[orientation=vertical]:data-[state=active]:shadow-[1px_0_0_0_var(--background-default-grey)]",
|
|
74
|
+
className
|
|
75
|
+
),
|
|
76
|
+
...props
|
|
77
|
+
}
|
|
78
|
+
));
|
|
79
|
+
TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
|
|
80
|
+
var TabsContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
81
|
+
TabsPrimitive.Content,
|
|
82
|
+
{
|
|
83
|
+
ref,
|
|
84
|
+
className: cn(
|
|
85
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--blue-france-sun-113-625)] focus-visible:ring-offset-2",
|
|
86
|
+
"p-4 md:p-8 border-b border-x border-border",
|
|
87
|
+
"data-[orientation=vertical]:border data-[orientation=vertical]:border-l-0 data-[orientation=vertical]:border-[var(--border-default-grey)]",
|
|
88
|
+
className
|
|
89
|
+
),
|
|
90
|
+
...props
|
|
91
|
+
}
|
|
92
|
+
));
|
|
93
|
+
TabsContent.displayName = TabsPrimitive.Content.displayName;
|
|
94
|
+
|
|
95
|
+
export { Tabs, TabsContent, TabsList, TabsTrigger };
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { cn } from './chunk-SZOFVBTZ.mjs';
|
|
2
|
+
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { jsx } from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
var Tabs = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(TabsPrimitive.Root, { ref, className: cn(className), ...props }));
|
|
7
|
+
Tabs.displayName = TabsPrimitive.Root.displayName;
|
|
8
|
+
var TabsList = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
9
|
+
TabsPrimitive.List,
|
|
10
|
+
{
|
|
11
|
+
ref,
|
|
12
|
+
className: cn(
|
|
13
|
+
"flex gap-1 p-0",
|
|
14
|
+
// ── Horizontal (défaut) ──────────────────────────────────────────────
|
|
15
|
+
"data-[orientation=horizontal]:flex-row data-[orientation=horizontal]:flex-nowrap data-[orientation=horizontal]:items-end data-[orientation=horizontal]:justify-start",
|
|
16
|
+
"data-[orientation=horizontal]:w-full data-[orientation=horizontal]:overflow-x-auto",
|
|
17
|
+
"data-[orientation=horizontal]:px-4",
|
|
18
|
+
"data-[orientation=horizontal]:shadow-[inset_0_-1px_0_0_var(--border-default-grey)]",
|
|
19
|
+
// ── Vertical ────────────────────────────────────────────────────────
|
|
20
|
+
"data-[orientation=vertical]:flex-col data-[orientation=vertical]:items-stretch data-[orientation=vertical]:justify-start",
|
|
21
|
+
"data-[orientation=vertical]:py-4 data-[orientation=vertical]:border-r data-[orientation=vertical]:border-[var(--border-default-grey)]",
|
|
22
|
+
// Masquer scrollbar
|
|
23
|
+
"[&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]",
|
|
24
|
+
className
|
|
25
|
+
),
|
|
26
|
+
...props
|
|
27
|
+
}
|
|
28
|
+
));
|
|
29
|
+
TabsList.displayName = TabsPrimitive.List.displayName;
|
|
30
|
+
var TabsTrigger = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
31
|
+
TabsPrimitive.Trigger,
|
|
32
|
+
{
|
|
33
|
+
ref,
|
|
34
|
+
className: cn(
|
|
35
|
+
// ── Base commune ────────────────────────────────────────────────────
|
|
36
|
+
"inline-flex items-center whitespace-nowrap px-4 py-2 text-base font-medium transition-colors shrink-0",
|
|
37
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--blue-france-sun-113-625)] focus-visible:ring-offset-2 focus-visible:z-10",
|
|
38
|
+
"disabled:pointer-events-none disabled:opacity-50",
|
|
39
|
+
// ── Horizontal ──────────────────────────────────────────────────────
|
|
40
|
+
"data-[orientation=horizontal]:justify-center data-[orientation=horizontal]:min-h-[48px]",
|
|
41
|
+
"data-[orientation=horizontal]:border-x data-[orientation=horizontal]:border-t-2 data-[orientation=horizontal]:border-b-0 data-[orientation=horizontal]:border-transparent",
|
|
42
|
+
"data-[orientation=horizontal]:bg-[var(--background-action-low-blue-france)]",
|
|
43
|
+
"data-[orientation=horizontal]:text-[var(--text-action-high-grey)]",
|
|
44
|
+
"data-[orientation=horizontal]:hover:bg-[var(--background-action-low-blue-france-hover)]",
|
|
45
|
+
// Actif horizontal
|
|
46
|
+
"data-[orientation=horizontal]:data-[state=active]:bg-background",
|
|
47
|
+
"data-[orientation=horizontal]:data-[state=active]:text-[var(--text-active-blue-france)]",
|
|
48
|
+
"data-[orientation=horizontal]:data-[state=active]:font-bold",
|
|
49
|
+
"data-[orientation=horizontal]:data-[state=active]:border-x-[var(--border-default-grey)]",
|
|
50
|
+
"data-[orientation=horizontal]:data-[state=active]:border-t-[var(--border-active-blue-france)]",
|
|
51
|
+
// Le shadow de bg-background masque la bordure de TabsList
|
|
52
|
+
"data-[orientation=horizontal]:data-[state=active]:shadow-[0_1px_0_0_var(--background-default-grey)]",
|
|
53
|
+
// ── Vertical ────────────────────────────────────────────────────────
|
|
54
|
+
"data-[orientation=vertical]:justify-start data-[orientation=vertical]:min-h-[44px]",
|
|
55
|
+
"data-[orientation=vertical]:border-y data-[orientation=vertical]:border-l-2 data-[orientation=vertical]:border-r-0 data-[orientation=vertical]:border-transparent",
|
|
56
|
+
"data-[orientation=vertical]:bg-[var(--background-action-low-blue-france)]",
|
|
57
|
+
"data-[orientation=vertical]:text-[var(--text-action-high-grey)]",
|
|
58
|
+
"data-[orientation=vertical]:hover:bg-[var(--background-action-low-blue-france-hover)]",
|
|
59
|
+
// Actif vertical
|
|
60
|
+
"data-[orientation=vertical]:data-[state=active]:-mr-[1px]",
|
|
61
|
+
"data-[orientation=vertical]:data-[state=active]:bg-background",
|
|
62
|
+
"data-[orientation=vertical]:data-[state=active]:text-[var(--text-active-blue-france)]",
|
|
63
|
+
"data-[orientation=vertical]:data-[state=active]:font-bold",
|
|
64
|
+
"data-[orientation=vertical]:data-[state=active]:border-y-[var(--border-default-grey)]",
|
|
65
|
+
"data-[orientation=vertical]:data-[state=active]:border-l-[var(--border-active-blue-france)]",
|
|
66
|
+
"data-[orientation=vertical]:data-[state=active]:shadow-[1px_0_0_0_var(--background-default-grey)]",
|
|
67
|
+
className
|
|
68
|
+
),
|
|
69
|
+
...props
|
|
70
|
+
}
|
|
71
|
+
));
|
|
72
|
+
TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
|
|
73
|
+
var TabsContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
74
|
+
TabsPrimitive.Content,
|
|
75
|
+
{
|
|
76
|
+
ref,
|
|
77
|
+
className: cn(
|
|
78
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--blue-france-sun-113-625)] focus-visible:ring-offset-2",
|
|
79
|
+
"p-4 md:p-8 border-b border-x border-border",
|
|
80
|
+
"data-[orientation=vertical]:border data-[orientation=vertical]:border-l-0 data-[orientation=vertical]:border-[var(--border-default-grey)]",
|
|
81
|
+
className
|
|
82
|
+
),
|
|
83
|
+
...props
|
|
84
|
+
}
|
|
85
|
+
));
|
|
86
|
+
TabsContent.displayName = TabsPrimitive.Content.displayName;
|
|
87
|
+
|
|
88
|
+
export { Tabs, TabsContent, TabsList, TabsTrigger };
|