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