fina-react-ds 0.0.1 → 1.0.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 -15
- package/dist/components/alert.js +30 -27
- package/dist/components/avatar.js +19 -19
- package/dist/components/badge.js +19 -19
- package/dist/components/button.js +51 -51
- package/dist/components/calendar.d.ts +8 -0
- package/dist/components/calendar.js +206 -0
- package/dist/components/card.js +43 -43
- package/dist/components/checkbox.js +17 -17
- package/dist/components/date-picker.d.ts +6 -0
- package/dist/components/date-picker.js +61 -0
- package/dist/components/dialog.js +43 -46
- package/dist/components/dropdown-menu.js +29 -29
- package/dist/components/input.js +15 -13
- package/dist/components/label.js +17 -17
- package/dist/components/pagination.js +25 -25
- package/dist/components/popover.js +9 -9
- package/dist/components/select.js +38 -33
- package/dist/components/separator.js +29 -0
- package/dist/components/sheet.d.ts +15 -0
- package/dist/components/sheet.js +158 -0
- package/dist/components/sidebar.d.ts +69 -0
- package/dist/components/sidebar.js +620 -0
- package/dist/components/simple-tooltip.d.ts +4 -0
- package/dist/components/simple-tooltip.js +17 -0
- package/dist/components/skeleton.d.ts +2 -0
- package/dist/components/skeleton.js +18 -0
- package/dist/components/sonner.d.ts +3 -0
- package/dist/components/sonner.js +24 -0
- package/dist/components/switch.d.ts +4 -0
- package/dist/components/switch.js +34 -0
- package/dist/components/table.d.ts +10 -0
- package/dist/components/table.js +124 -0
- package/dist/components/tabs.js +27 -27
- package/dist/components/textarea.d.ts +3 -0
- package/dist/components/textarea.js +23 -0
- package/dist/components/tooltip.d.ts +7 -0
- package/dist/components/tooltip.js +61 -0
- package/dist/hooks/use-mobile.js +17 -0
- package/dist/index.d.ts +14 -2
- package/dist/index.js +138 -73
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildFormatLongFn.js +12 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +21 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildMatchFn.js +36 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js +18 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr/_lib/formatDistance.js +72 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr/_lib/formatLong.js +33 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr/_lib/formatRelative.js +13 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr/_lib/localize.js +123 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr/_lib/match.js +112 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr.js +21 -0
- package/dist/node_modules/@radix-ui/react-separator/dist/index.js +27 -0
- package/dist/node_modules/@radix-ui/react-slot/dist/index.js +47 -40
- package/dist/node_modules/@radix-ui/react-switch/dist/index.js +136 -0
- package/dist/node_modules/@radix-ui/react-tooltip/dist/index.js +348 -0
- package/dist/node_modules/@radix-ui/react-visually-hidden/dist/index.js +32 -0
- package/dist/themes/base.css +1679 -585
- package/package.json +4 -19
- package/dist/themes/pro.css +0 -188
- package/dist/themes/puulse-colors.css +0 -388
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
var w = Object.defineProperty;
|
|
2
|
+
var n = (f, o) => w(f, "name", { value: o, configurable: !0 });
|
|
3
|
+
import { jsx as c } from "react/jsx-runtime";
|
|
4
|
+
import * as g from "react";
|
|
5
|
+
import { ChevronLeftIcon as h, ChevronRightIcon as y, ChevronDownIcon as _ } from "lucide-react";
|
|
6
|
+
import { getDefaultClassNames as x, DayPicker as v } from "react-day-picker";
|
|
7
|
+
import { cn as e } from "../lib/utils.js";
|
|
8
|
+
import { buttonVariants as p, Button as z } from "./button.js";
|
|
9
|
+
import { fr as k } from "../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr.js";
|
|
10
|
+
function q({
|
|
11
|
+
className: f,
|
|
12
|
+
classNames: o,
|
|
13
|
+
showOutsideDays: r = !0,
|
|
14
|
+
captionLayout: s = "label",
|
|
15
|
+
buttonVariant: u = "ghost",
|
|
16
|
+
formatters: i,
|
|
17
|
+
components: m,
|
|
18
|
+
...b
|
|
19
|
+
}) {
|
|
20
|
+
const t = x();
|
|
21
|
+
return /* @__PURE__ */ c(
|
|
22
|
+
v,
|
|
23
|
+
{
|
|
24
|
+
locale: k,
|
|
25
|
+
showOutsideDays: r,
|
|
26
|
+
className: e(
|
|
27
|
+
"fc:group/calendar fc:p-3 fc:[--cell-size:--spacing(8)]",
|
|
28
|
+
String.raw`fc:rtl:**:[.rdp-button\_next>svg]:rotate-180`,
|
|
29
|
+
String.raw`fc:rtl:**:[.rdp-button\_previous>svg]:rotate-180`,
|
|
30
|
+
f
|
|
31
|
+
),
|
|
32
|
+
captionLayout: s,
|
|
33
|
+
formatters: {
|
|
34
|
+
formatMonthDropdown: /* @__PURE__ */ n((a) => a.toLocaleString("default", { month: "short" }), "formatMonthDropdown"),
|
|
35
|
+
...i
|
|
36
|
+
},
|
|
37
|
+
classNames: {
|
|
38
|
+
root: e("fc:w-fit", t.root),
|
|
39
|
+
months: e(
|
|
40
|
+
"fc:flex fc:gap-4 fc:flex-col fc:md:flex-row fc:relative",
|
|
41
|
+
t.months
|
|
42
|
+
),
|
|
43
|
+
month: e(
|
|
44
|
+
"fc:flex fc:flex-col fc:w-full fc:gap-4",
|
|
45
|
+
t.month
|
|
46
|
+
),
|
|
47
|
+
nav: e(
|
|
48
|
+
"fc:flex fc:items-center fc:gap-1 fc:w-full fc:absolute fc:top-0 fc:inset-x-0 fc:justify-between",
|
|
49
|
+
t.nav
|
|
50
|
+
),
|
|
51
|
+
button_previous: e(
|
|
52
|
+
p({
|
|
53
|
+
variant: u,
|
|
54
|
+
color: "dark",
|
|
55
|
+
size: "icon"
|
|
56
|
+
}),
|
|
57
|
+
"fc:size-(--cell-size) fc:aria-disabled:opacity-50 fc:p-0 fc:select-none",
|
|
58
|
+
t.button_previous
|
|
59
|
+
),
|
|
60
|
+
button_next: e(
|
|
61
|
+
p({
|
|
62
|
+
variant: u,
|
|
63
|
+
color: "dark",
|
|
64
|
+
size: "icon"
|
|
65
|
+
}),
|
|
66
|
+
"fc:size-(--cell-size) fc:aria-disabled:opacity-50 fc:p-0 fc:select-none",
|
|
67
|
+
t.button_next
|
|
68
|
+
),
|
|
69
|
+
month_caption: e(
|
|
70
|
+
"fc:flex fc:items-center fc:justify-center fc:h-(--cell-size) fc:w-full fc:px-(--cell-size)",
|
|
71
|
+
t.month_caption
|
|
72
|
+
),
|
|
73
|
+
dropdowns: e(
|
|
74
|
+
"fc:w-full fc:flex fc:items-center fc:text-sm fc:font-medium fc:justify-center fc:h-(--cell-size) fc:gap-1.5",
|
|
75
|
+
t.dropdowns
|
|
76
|
+
),
|
|
77
|
+
dropdown_root: e(
|
|
78
|
+
"fc:relative fc:has-focus:border-ring fc:border fc:border-input-border fc:shadow-xs fc:has-focus:ring-ring/50 fc:has-focus:ring-[3px] fc:rounded-md",
|
|
79
|
+
t.dropdown_root
|
|
80
|
+
),
|
|
81
|
+
dropdown: e(
|
|
82
|
+
"fc:absolute fc:bg-popover fc:inset-0 fc:opacity-0",
|
|
83
|
+
t.dropdown
|
|
84
|
+
),
|
|
85
|
+
caption_label: e(
|
|
86
|
+
"select-none font-medium",
|
|
87
|
+
s === "label" ? "fc:text-sm" : "fc:rounded-md fc:pl-2 fc:pr-1 fc:flex fc:items-center fc:gap-1 fc:text-sm fc:h-8 fc:[&>svg]:text-muted fc:[&>svg]:size-3.5",
|
|
88
|
+
t.caption_label
|
|
89
|
+
),
|
|
90
|
+
table: "fc:w-full fc:border-collapse",
|
|
91
|
+
weekdays: e("fc:flex", t.weekdays),
|
|
92
|
+
weekday: e(
|
|
93
|
+
"fc:text-muted fc:rounded-md fc:flex-1 fc:font-normal fc:text-[0.8rem] fc:select-none",
|
|
94
|
+
t.weekday
|
|
95
|
+
),
|
|
96
|
+
week: e("fc:flex fc:w-full fc:mt-2", t.week),
|
|
97
|
+
week_number_header: e(
|
|
98
|
+
"fc:select-none w-(--cell-size)",
|
|
99
|
+
t.week_number_header
|
|
100
|
+
),
|
|
101
|
+
week_number: e(
|
|
102
|
+
"fc:text-[0.8rem] fc:select-none fc:text-muted",
|
|
103
|
+
t.week_number
|
|
104
|
+
),
|
|
105
|
+
day: e(
|
|
106
|
+
"fc:relative fc:w-full fc:h-full fc:p-0 fc:text-center fc:[&:first-child[data-selected=true]_button]:rounded-l-md fc:[&:last-child[data-selected=true]_button]:rounded-r-md fc:group/day fc:aspect-square fc:select-none",
|
|
107
|
+
t.day
|
|
108
|
+
),
|
|
109
|
+
range_start: e(
|
|
110
|
+
"fc:rounded-l-md fc:bg-accent",
|
|
111
|
+
t.range_start
|
|
112
|
+
),
|
|
113
|
+
range_middle: e("fc:rounded-none", t.range_middle),
|
|
114
|
+
range_end: e(
|
|
115
|
+
"fc:rounded-r-md fc:bg-accent",
|
|
116
|
+
t.range_end
|
|
117
|
+
),
|
|
118
|
+
today: e(
|
|
119
|
+
"fc:bg-accent fc:text-accent-foreground fc:rounded-md fc:data-[selected=true]:rounded-none",
|
|
120
|
+
t.today
|
|
121
|
+
),
|
|
122
|
+
outside: e(
|
|
123
|
+
"fc:text-muted fc:aria-selected:text-muted",
|
|
124
|
+
t.outside
|
|
125
|
+
),
|
|
126
|
+
disabled: e(
|
|
127
|
+
"fc:text-muted fc:opacity-50",
|
|
128
|
+
t.disabled
|
|
129
|
+
),
|
|
130
|
+
hidden: e("fc:invisible", t.hidden),
|
|
131
|
+
...o
|
|
132
|
+
},
|
|
133
|
+
components: {
|
|
134
|
+
Root: /* @__PURE__ */ n(({ className: a, rootRef: d, ...l }) => /* @__PURE__ */ c(
|
|
135
|
+
"div",
|
|
136
|
+
{
|
|
137
|
+
"data-slot": "calendar",
|
|
138
|
+
ref: d,
|
|
139
|
+
className: e(a),
|
|
140
|
+
...l
|
|
141
|
+
}
|
|
142
|
+
), "Root"),
|
|
143
|
+
Chevron: /* @__PURE__ */ n(({ className: a, orientation: d, ...l }) => d === "left" ? /* @__PURE__ */ c(
|
|
144
|
+
h,
|
|
145
|
+
{
|
|
146
|
+
className: e("fc:size-4", a),
|
|
147
|
+
...l
|
|
148
|
+
}
|
|
149
|
+
) : d === "right" ? /* @__PURE__ */ c(
|
|
150
|
+
y,
|
|
151
|
+
{
|
|
152
|
+
className: e("fc:size-4", a),
|
|
153
|
+
...l
|
|
154
|
+
}
|
|
155
|
+
) : /* @__PURE__ */ c(
|
|
156
|
+
_,
|
|
157
|
+
{
|
|
158
|
+
className: e("fc:size-4", a),
|
|
159
|
+
...l
|
|
160
|
+
}
|
|
161
|
+
), "Chevron"),
|
|
162
|
+
DayButton: N,
|
|
163
|
+
WeekNumber: /* @__PURE__ */ n(({ children: a, ...d }) => /* @__PURE__ */ c("td", { ...d, children: /* @__PURE__ */ c("div", { className: "fc:flex fc:size-(--cell-size) fc:items-center fc:justify-center fc:text-center", children: a }) }), "WeekNumber"),
|
|
164
|
+
...m
|
|
165
|
+
},
|
|
166
|
+
...b
|
|
167
|
+
}
|
|
168
|
+
);
|
|
169
|
+
}
|
|
170
|
+
n(q, "Calendar");
|
|
171
|
+
function N({
|
|
172
|
+
className: f,
|
|
173
|
+
day: o,
|
|
174
|
+
modifiers: r,
|
|
175
|
+
...s
|
|
176
|
+
}) {
|
|
177
|
+
const u = x(), i = g.useRef(null);
|
|
178
|
+
return g.useEffect(() => {
|
|
179
|
+
var m;
|
|
180
|
+
r.focused && ((m = i.current) == null || m.focus());
|
|
181
|
+
}, [r.focused]), /* @__PURE__ */ c(
|
|
182
|
+
z,
|
|
183
|
+
{
|
|
184
|
+
ref: i,
|
|
185
|
+
variant: "ghost",
|
|
186
|
+
size: "icon",
|
|
187
|
+
color: "dark",
|
|
188
|
+
"data-day": o.date.toLocaleDateString(),
|
|
189
|
+
"data-selected-single": r.selected && !r.range_start && !r.range_end && !r.range_middle,
|
|
190
|
+
"data-range-start": r.range_start,
|
|
191
|
+
"data-range-end": r.range_end,
|
|
192
|
+
"data-range-middle": r.range_middle,
|
|
193
|
+
className: e(
|
|
194
|
+
"fc:data-[selected-single=true]:bg-primary! fc:data-[selected-single=true]:text-primary-foreground! data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 dark:hover:text-accent-foreground flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md [&>span]:text-xs [&>span]:opacity-70",
|
|
195
|
+
u.day,
|
|
196
|
+
f
|
|
197
|
+
),
|
|
198
|
+
...s
|
|
199
|
+
}
|
|
200
|
+
);
|
|
201
|
+
}
|
|
202
|
+
n(N, "CalendarDayButton");
|
|
203
|
+
export {
|
|
204
|
+
q as Calendar,
|
|
205
|
+
N as CalendarDayButton
|
|
206
|
+
};
|
package/dist/components/card.js
CHANGED
|
@@ -1,99 +1,99 @@
|
|
|
1
|
-
var
|
|
2
|
-
var a = (t,
|
|
3
|
-
import { jsx as
|
|
4
|
-
import { cn as
|
|
5
|
-
function
|
|
6
|
-
return /* @__PURE__ */
|
|
1
|
+
var e = Object.defineProperty;
|
|
2
|
+
var a = (t, c) => e(t, "name", { value: c, configurable: !0 });
|
|
3
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
4
|
+
import { cn as o } from "../lib/utils.js";
|
|
5
|
+
function s({ className: t, ...c }) {
|
|
6
|
+
return /* @__PURE__ */ r(
|
|
7
7
|
"div",
|
|
8
8
|
{
|
|
9
9
|
"data-slot": "card",
|
|
10
|
-
className:
|
|
11
|
-
"bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",
|
|
10
|
+
className: o(
|
|
11
|
+
"fc:bg-card fc:text-card-foreground fc:flex fc:flex-col fc:gap-6 fc:rounded-xl fc:border fc:py-6 fc:shadow-sm",
|
|
12
12
|
t
|
|
13
13
|
),
|
|
14
|
-
...
|
|
14
|
+
...c
|
|
15
15
|
}
|
|
16
16
|
);
|
|
17
17
|
}
|
|
18
|
-
a(
|
|
19
|
-
function
|
|
20
|
-
return /* @__PURE__ */
|
|
18
|
+
a(s, "Card");
|
|
19
|
+
function i({ className: t, ...c }) {
|
|
20
|
+
return /* @__PURE__ */ r(
|
|
21
21
|
"div",
|
|
22
22
|
{
|
|
23
23
|
"data-slot": "card-header",
|
|
24
|
-
className:
|
|
25
|
-
"
|
|
24
|
+
className: o(
|
|
25
|
+
"fc:@container/card-header fc:grid fc:auto-rows-min fc:grid-rows-[auto_auto] fc:items-start fc:gap-1.5 fc:px-6 fc:has-data-[slot=card-action]:grid-cols-[1fr_auto] fc:[.border-b]:pb-6",
|
|
26
26
|
t
|
|
27
27
|
),
|
|
28
|
-
...
|
|
28
|
+
...c
|
|
29
29
|
}
|
|
30
30
|
);
|
|
31
31
|
}
|
|
32
|
-
a(
|
|
33
|
-
function
|
|
34
|
-
return /* @__PURE__ */
|
|
32
|
+
a(i, "CardHeader");
|
|
33
|
+
function l({ className: t, ...c }) {
|
|
34
|
+
return /* @__PURE__ */ r(
|
|
35
35
|
"div",
|
|
36
36
|
{
|
|
37
37
|
"data-slot": "card-title",
|
|
38
|
-
className:
|
|
39
|
-
...
|
|
38
|
+
className: o("fc:leading-none fc:font-semibold", t),
|
|
39
|
+
...c
|
|
40
40
|
}
|
|
41
41
|
);
|
|
42
42
|
}
|
|
43
|
-
a(
|
|
44
|
-
function
|
|
45
|
-
return /* @__PURE__ */
|
|
43
|
+
a(l, "CardTitle");
|
|
44
|
+
function u({ className: t, ...c }) {
|
|
45
|
+
return /* @__PURE__ */ r(
|
|
46
46
|
"div",
|
|
47
47
|
{
|
|
48
48
|
"data-slot": "card-description",
|
|
49
|
-
className:
|
|
50
|
-
...
|
|
49
|
+
className: o("fc:text-muted fc:text-sm", t),
|
|
50
|
+
...c
|
|
51
51
|
}
|
|
52
52
|
);
|
|
53
53
|
}
|
|
54
|
-
a(
|
|
55
|
-
function m({ className: t, ...
|
|
56
|
-
return /* @__PURE__ */
|
|
54
|
+
a(u, "CardDescription");
|
|
55
|
+
function m({ className: t, ...c }) {
|
|
56
|
+
return /* @__PURE__ */ r(
|
|
57
57
|
"div",
|
|
58
58
|
{
|
|
59
59
|
"data-slot": "card-action",
|
|
60
|
-
className:
|
|
61
|
-
"col-start-2 row-span-2 row-start-1 self-start justify-self-end",
|
|
60
|
+
className: o(
|
|
61
|
+
"fc:col-start-2 fc:row-span-2 fc:row-start-1 fc:self-start fc:justify-self-end",
|
|
62
62
|
t
|
|
63
63
|
),
|
|
64
|
-
...
|
|
64
|
+
...c
|
|
65
65
|
}
|
|
66
66
|
);
|
|
67
67
|
}
|
|
68
68
|
a(m, "CardAction");
|
|
69
|
-
function p({ className: t, ...
|
|
70
|
-
return /* @__PURE__ */
|
|
69
|
+
function p({ className: t, ...c }) {
|
|
70
|
+
return /* @__PURE__ */ r(
|
|
71
71
|
"div",
|
|
72
72
|
{
|
|
73
73
|
"data-slot": "card-content",
|
|
74
|
-
className:
|
|
75
|
-
...
|
|
74
|
+
className: o("fc:px-6", t),
|
|
75
|
+
...c
|
|
76
76
|
}
|
|
77
77
|
);
|
|
78
78
|
}
|
|
79
79
|
a(p, "CardContent");
|
|
80
|
-
function x({ className: t, ...
|
|
81
|
-
return /* @__PURE__ */
|
|
80
|
+
function x({ className: t, ...c }) {
|
|
81
|
+
return /* @__PURE__ */ r(
|
|
82
82
|
"div",
|
|
83
83
|
{
|
|
84
84
|
"data-slot": "card-footer",
|
|
85
|
-
className:
|
|
86
|
-
...
|
|
85
|
+
className: o("fc:flex fc:items-center fc:px-6 fc:[.border-t]:pt-6", t),
|
|
86
|
+
...c
|
|
87
87
|
}
|
|
88
88
|
);
|
|
89
89
|
}
|
|
90
90
|
a(x, "CardFooter");
|
|
91
91
|
export {
|
|
92
|
-
|
|
92
|
+
s as Card,
|
|
93
93
|
m as CardAction,
|
|
94
94
|
p as CardContent,
|
|
95
|
-
|
|
95
|
+
u as CardDescription,
|
|
96
96
|
x as CardFooter,
|
|
97
|
-
|
|
98
|
-
|
|
97
|
+
i as CardHeader,
|
|
98
|
+
l as CardTitle
|
|
99
99
|
};
|
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
var t = Object.defineProperty;
|
|
2
|
-
var
|
|
3
|
-
import { jsx as
|
|
4
|
-
import { Checkbox as o, CheckboxIndicator as
|
|
5
|
-
import { CheckIcon as
|
|
2
|
+
var i = (c, e) => t(c, "name", { value: e, configurable: !0 });
|
|
3
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
4
|
+
import { Checkbox as o, CheckboxIndicator as a } from "../node_modules/@radix-ui/react-checkbox/dist/index.js";
|
|
5
|
+
import { CheckIcon as f } from "lucide-react";
|
|
6
6
|
import { cn as n } from "../lib/utils.js";
|
|
7
|
-
function
|
|
8
|
-
className:
|
|
9
|
-
...
|
|
7
|
+
function h({
|
|
8
|
+
className: c,
|
|
9
|
+
...e
|
|
10
10
|
}) {
|
|
11
|
-
return /* @__PURE__ */
|
|
11
|
+
return /* @__PURE__ */ r(
|
|
12
12
|
o,
|
|
13
13
|
{
|
|
14
14
|
"data-slot": "checkbox",
|
|
15
15
|
className: n(
|
|
16
|
-
"peer border-input
|
|
17
|
-
|
|
16
|
+
"fc:bg-input fc:peer fc:border-input-border fc:data-[state=checked]:bg-primary fc:data-[state=checked]:text-primary-foreground fc:data-[state=checked]:border-primary fc:focus-visible:border-ring fc:focus-visible:ring-ring/50 fc:aria-invalid:ring-destructive/20 fc:dark:aria-invalid:ring-destructive/40 fc:aria-invalid:border-destructive fc:size-4 fc:shrink-0 fc:rounded-[4px] fc:border fc:shadow-xs fc:transition-shadow fc:outline-none fc:focus-visible:ring-[3px] fc:disabled:cursor-not-allowed fc:disabled:opacity-50",
|
|
17
|
+
c
|
|
18
18
|
),
|
|
19
|
-
...
|
|
20
|
-
children: /* @__PURE__ */
|
|
21
|
-
|
|
19
|
+
...e,
|
|
20
|
+
children: /* @__PURE__ */ r(
|
|
21
|
+
a,
|
|
22
22
|
{
|
|
23
23
|
"data-slot": "checkbox-indicator",
|
|
24
|
-
className: "flex items-center justify-center text-current transition-none",
|
|
25
|
-
children: /* @__PURE__ */
|
|
24
|
+
className: "fc:flex fc:items-center fc:justify-center fc:text-current fc:transition-none",
|
|
25
|
+
children: /* @__PURE__ */ r(f, { className: "fc:size-3.5" })
|
|
26
26
|
}
|
|
27
27
|
)
|
|
28
28
|
}
|
|
29
29
|
);
|
|
30
30
|
}
|
|
31
|
-
|
|
31
|
+
i(h, "Checkbox");
|
|
32
32
|
export {
|
|
33
|
-
|
|
33
|
+
h as Checkbox
|
|
34
34
|
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
var p = Object.defineProperty;
|
|
2
|
+
var c = (i, e) => p(i, "name", { value: e, configurable: !0 });
|
|
3
|
+
import { jsxs as a, jsx as r } from "react/jsx-runtime";
|
|
4
|
+
import * as m from "react";
|
|
5
|
+
import { Calendar as u } from "lucide-react";
|
|
6
|
+
import { Calendar as x } from "./calendar.js";
|
|
7
|
+
import { Popover as b, PopoverTrigger as v, PopoverContent as g } from "./popover.js";
|
|
8
|
+
import { Button as h } from "./button.js";
|
|
9
|
+
function D({
|
|
10
|
+
placeholder: i = "Choisir une date",
|
|
11
|
+
onChange: e,
|
|
12
|
+
value: t,
|
|
13
|
+
isClearable: s = !1,
|
|
14
|
+
...f
|
|
15
|
+
}) {
|
|
16
|
+
const [d, o] = m.useState(!1), l = /* @__PURE__ */ c((n) => {
|
|
17
|
+
e == null || e(n || null), o(!1);
|
|
18
|
+
}, "onSelect");
|
|
19
|
+
return console.log("DatePicker value", t), /* @__PURE__ */ a(b, { onOpenChange: o, open: d, children: [
|
|
20
|
+
/* @__PURE__ */ r(v, { asChild: !0, children: /* @__PURE__ */ a(
|
|
21
|
+
"button",
|
|
22
|
+
{
|
|
23
|
+
"data-empty": !t,
|
|
24
|
+
...f,
|
|
25
|
+
className: "fc:border-input-border fc:flex fc:items-center fc:h-9 fc:w-full fc:min-w-0 fc:rounded-md fc:border fc:bg-input fc:px-3 fc:py-1 fc:text-base fc:shadow-xs fc:focus-visible:border-ring fc:ring-ring/50 fc:focus-visible:ring-[3px] fc:data-[state=open]:ring-[3px] fc:data-[state=open]:border-ring fc:aria-invalid:ring-destructive/20 fc:dark:aria-invalid:ring-destructive/40 fc:aria-invalid:border-destructive! fc:outline-none fc:md:text-sm",
|
|
26
|
+
children: [
|
|
27
|
+
/* @__PURE__ */ r(u, { className: "fc:mr-2 fc:size-4" }),
|
|
28
|
+
t ? /* @__PURE__ */ r("span", { children: "Ma date" }) : /* @__PURE__ */ r("span", { className: "fc:text-placeholder", children: i })
|
|
29
|
+
]
|
|
30
|
+
}
|
|
31
|
+
) }),
|
|
32
|
+
/* @__PURE__ */ a(g, { align: "start", className: "fc:w-auto fc:p-0", children: [
|
|
33
|
+
/* @__PURE__ */ r(
|
|
34
|
+
x,
|
|
35
|
+
{
|
|
36
|
+
mode: "single",
|
|
37
|
+
required: !0,
|
|
38
|
+
selected: t || void 0,
|
|
39
|
+
onSelect: l,
|
|
40
|
+
captionLayout: "dropdown"
|
|
41
|
+
}
|
|
42
|
+
),
|
|
43
|
+
t && s && /* @__PURE__ */ r("div", { className: "flex justify-center border-t", children: /* @__PURE__ */ r(
|
|
44
|
+
h,
|
|
45
|
+
{
|
|
46
|
+
variant: "ghost",
|
|
47
|
+
color: "dark",
|
|
48
|
+
className: "flex w-full",
|
|
49
|
+
onClick: /* @__PURE__ */ c(() => {
|
|
50
|
+
e == null || e(null);
|
|
51
|
+
}, "onClick"),
|
|
52
|
+
children: "Effacer"
|
|
53
|
+
}
|
|
54
|
+
) })
|
|
55
|
+
] })
|
|
56
|
+
] });
|
|
57
|
+
}
|
|
58
|
+
c(D, "DatePicker");
|
|
59
|
+
export {
|
|
60
|
+
D as DatePicker
|
|
61
|
+
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
var
|
|
2
|
-
var o = (t, a) =>
|
|
3
|
-
import { jsx as e, jsxs as
|
|
4
|
-
import { Root as
|
|
1
|
+
var s = Object.defineProperty;
|
|
2
|
+
var o = (t, a) => s(t, "name", { value: a, configurable: !0 });
|
|
3
|
+
import { jsx as e, jsxs as f } from "react/jsx-runtime";
|
|
4
|
+
import { Root as r, Close as n, Content as d, Description as g, Overlay as u, Portal as m, Title as p, Trigger as x } from "../node_modules/@radix-ui/react-dialog/dist/index.js";
|
|
5
5
|
import { XIcon as v } from "lucide-react";
|
|
6
|
-
import { cn as
|
|
6
|
+
import { cn as c } from "../lib/utils.js";
|
|
7
7
|
function C({
|
|
8
8
|
...t
|
|
9
9
|
}) {
|
|
10
|
-
return /* @__PURE__ */ e(
|
|
10
|
+
return /* @__PURE__ */ e(r, { "data-slot": "dialog", ...t });
|
|
11
11
|
}
|
|
12
12
|
o(C, "Dialog");
|
|
13
13
|
function T({
|
|
@@ -25,7 +25,7 @@ o(D, "DialogPortal");
|
|
|
25
25
|
function j({
|
|
26
26
|
...t
|
|
27
27
|
}) {
|
|
28
|
-
return /* @__PURE__ */ e(
|
|
28
|
+
return /* @__PURE__ */ e(n, { "data-slot": "dialog-close", ...t });
|
|
29
29
|
}
|
|
30
30
|
o(j, "DialogClose");
|
|
31
31
|
function h({
|
|
@@ -33,11 +33,11 @@ function h({
|
|
|
33
33
|
...a
|
|
34
34
|
}) {
|
|
35
35
|
return /* @__PURE__ */ e(
|
|
36
|
-
|
|
36
|
+
u,
|
|
37
37
|
{
|
|
38
38
|
"data-slot": "dialog-overlay",
|
|
39
|
-
className:
|
|
40
|
-
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
|
|
39
|
+
className: c(
|
|
40
|
+
"fc:data-[state=open]:animate-in fc:data-[state=closed]:animate-out fc:data-[state=closed]:fade-out-0 fc:data-[state=open]:fade-in-0 fc:fixed fc:inset-0 fc:z-50 fc:bg-black/50 fc:overflow-auto",
|
|
41
41
|
t
|
|
42
42
|
),
|
|
43
43
|
...a
|
|
@@ -48,37 +48,34 @@ o(h, "DialogOverlay");
|
|
|
48
48
|
function k({
|
|
49
49
|
className: t,
|
|
50
50
|
children: a,
|
|
51
|
-
showCloseButton:
|
|
52
|
-
...
|
|
51
|
+
showCloseButton: l = !0,
|
|
52
|
+
...i
|
|
53
53
|
}) {
|
|
54
|
-
return /* @__PURE__ */
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
"data-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
children:
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
}
|
|
80
|
-
)
|
|
81
|
-
] });
|
|
54
|
+
return /* @__PURE__ */ e(D, { "data-slot": "dialog-portal", children: /* @__PURE__ */ e(h, { children: /* @__PURE__ */ f(
|
|
55
|
+
d,
|
|
56
|
+
{
|
|
57
|
+
"data-slot": "dialog-content",
|
|
58
|
+
className: c(
|
|
59
|
+
"fc:relative fc:bg-card fc:data-[state=open]:animate-in fc:data-[state=closed]:animate-out fc:data-[state=closed]:fade-out-0 fc:data-[state=open]:fade-in-0 fc:data-[state=closed]:zoom-out-95 fc:data-[state=open]:zoom-in-95 fc:z-50 fc:grid fc:w-full fc:max-w-[calc(100%-2rem)] fc:gap-4 fc:rounded-lg fc:border fc:p-6 fc:shadow-lg fc:duration-200 fc:sm:max-w-lg fc:mx-auto fc:my-10",
|
|
60
|
+
t
|
|
61
|
+
),
|
|
62
|
+
...i,
|
|
63
|
+
children: [
|
|
64
|
+
a,
|
|
65
|
+
l && /* @__PURE__ */ f(
|
|
66
|
+
n,
|
|
67
|
+
{
|
|
68
|
+
"data-slot": "dialog-close",
|
|
69
|
+
className: "fc:ring-offset-background fc:focus:ring-ring fc:data-[state=open]:bg-accent fc:data-[state=open]:text-muted fc:absolute fc:top-4 fc:right-4 fc:rounded-xs fc:opacity-70 fc:transition-opacity fc:hover:opacity-100 fc:focus:ring-2 fc:focus:ring-offset-2 fc:focus:outline-hidden fc:disabled:pointer-events-none fc:[&_svg]:pointer-events-none fc:[&_svg]:shrink-0 fc:[&_svg:not([class*='size-'])]:size-4",
|
|
70
|
+
children: [
|
|
71
|
+
/* @__PURE__ */ e(v, {}),
|
|
72
|
+
/* @__PURE__ */ e("span", { className: "fc:sr-only", children: "Close" })
|
|
73
|
+
]
|
|
74
|
+
}
|
|
75
|
+
)
|
|
76
|
+
]
|
|
77
|
+
}
|
|
78
|
+
) }) });
|
|
82
79
|
}
|
|
83
80
|
o(k, "DialogContent");
|
|
84
81
|
function _({ className: t, ...a }) {
|
|
@@ -86,7 +83,7 @@ function _({ className: t, ...a }) {
|
|
|
86
83
|
"div",
|
|
87
84
|
{
|
|
88
85
|
"data-slot": "dialog-header",
|
|
89
|
-
className:
|
|
86
|
+
className: c("fc:flex fc:flex-col fc:gap-2 fc:text-center fc:sm:text-left", t),
|
|
90
87
|
...a
|
|
91
88
|
}
|
|
92
89
|
);
|
|
@@ -97,8 +94,8 @@ function O({ className: t, ...a }) {
|
|
|
97
94
|
"div",
|
|
98
95
|
{
|
|
99
96
|
"data-slot": "dialog-footer",
|
|
100
|
-
className:
|
|
101
|
-
"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
|
|
97
|
+
className: c(
|
|
98
|
+
"fc:flex fc:flex-col-reverse fc:gap-2 fc:sm:flex-row fc:sm:justify-end",
|
|
102
99
|
t
|
|
103
100
|
),
|
|
104
101
|
...a
|
|
@@ -114,7 +111,7 @@ function P({
|
|
|
114
111
|
p,
|
|
115
112
|
{
|
|
116
113
|
"data-slot": "dialog-title",
|
|
117
|
-
className:
|
|
114
|
+
className: c("fc:text-lg fc:leading-none fc:font-semibold", t),
|
|
118
115
|
...a
|
|
119
116
|
}
|
|
120
117
|
);
|
|
@@ -125,10 +122,10 @@ function F({
|
|
|
125
122
|
...a
|
|
126
123
|
}) {
|
|
127
124
|
return /* @__PURE__ */ e(
|
|
128
|
-
|
|
125
|
+
g,
|
|
129
126
|
{
|
|
130
127
|
"data-slot": "dialog-description",
|
|
131
|
-
className:
|
|
128
|
+
className: c("fc:text-muted fc:text-sm", t),
|
|
132
129
|
...a
|
|
133
130
|
}
|
|
134
131
|
);
|