lecom-ui 5.2.82 → 5.2.84
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.
|
@@ -0,0 +1,380 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { DayPicker, useDayPicker, labelPrevious, labelNext } from 'react-day-picker';
|
|
3
|
+
import { buttonVariants, Button } from '../Button/Button.js';
|
|
4
|
+
import { cn } from '../../lib/utils.js';
|
|
5
|
+
import { differenceInCalendarDays } from 'date-fns';
|
|
6
|
+
import { ChevronLeft, ChevronRight } from 'lucide-react';
|
|
7
|
+
|
|
8
|
+
function Calendar({
|
|
9
|
+
className,
|
|
10
|
+
showOutsideDays = true,
|
|
11
|
+
showYearSwitcher = true,
|
|
12
|
+
yearRange = 12,
|
|
13
|
+
numberOfMonths,
|
|
14
|
+
components,
|
|
15
|
+
...props
|
|
16
|
+
}) {
|
|
17
|
+
const [navView, setNavView] = React.useState("days");
|
|
18
|
+
const [displayYears, setDisplayYears] = React.useState(
|
|
19
|
+
React.useMemo(() => {
|
|
20
|
+
const currentYear = (/* @__PURE__ */ new Date()).getFullYear();
|
|
21
|
+
return {
|
|
22
|
+
from: currentYear - Math.floor(yearRange / 2 - 1),
|
|
23
|
+
to: currentYear + Math.ceil(yearRange / 2)
|
|
24
|
+
};
|
|
25
|
+
}, [yearRange])
|
|
26
|
+
);
|
|
27
|
+
const { onNextClick, onPrevClick, startMonth, endMonth } = props;
|
|
28
|
+
const columnsDisplayed = navView === "years" ? 1 : numberOfMonths;
|
|
29
|
+
const _monthsClassName = cn("relative flex", props.monthsClassName);
|
|
30
|
+
const _monthCaptionClassName = cn(
|
|
31
|
+
"relative mx-10 flex h-7 items-center justify-center",
|
|
32
|
+
props.monthCaptionClassName
|
|
33
|
+
);
|
|
34
|
+
const _weekdaysClassName = cn("flex flex-row", props.weekdaysClassName);
|
|
35
|
+
const _weekdayClassName = cn(
|
|
36
|
+
"w-8 text-sm font-normal text-muted-foreground",
|
|
37
|
+
props.weekdayClassName
|
|
38
|
+
);
|
|
39
|
+
const _monthClassName = cn("w-full", props.monthClassName);
|
|
40
|
+
const _captionClassName = cn(
|
|
41
|
+
"relative flex items-center justify-center pt-1",
|
|
42
|
+
props.captionClassName
|
|
43
|
+
);
|
|
44
|
+
const _captionLabelClassName = cn(
|
|
45
|
+
"truncate text-sm font-medium",
|
|
46
|
+
props.captionLabelClassName
|
|
47
|
+
);
|
|
48
|
+
const buttonNavClassName = buttonVariants({
|
|
49
|
+
variant: "outlined",
|
|
50
|
+
className: "absolute h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"
|
|
51
|
+
});
|
|
52
|
+
const _buttonNextClassName = cn(
|
|
53
|
+
buttonNavClassName,
|
|
54
|
+
"right-0",
|
|
55
|
+
props.buttonNextClassName
|
|
56
|
+
);
|
|
57
|
+
const _buttonPreviousClassName = cn(
|
|
58
|
+
buttonNavClassName,
|
|
59
|
+
"left-0",
|
|
60
|
+
props.buttonPreviousClassName
|
|
61
|
+
);
|
|
62
|
+
const _navClassName = cn("flex items-start", props.navClassName);
|
|
63
|
+
const _monthGridClassName = cn("mx-auto mt-4", props.monthGridClassName);
|
|
64
|
+
const _weekClassName = cn("mt-2 flex w-max items-start", props.weekClassName);
|
|
65
|
+
const _dayClassName = cn(
|
|
66
|
+
"flex size-8 flex-1 items-center justify-center p-0 text-sm",
|
|
67
|
+
props.dayClassName
|
|
68
|
+
);
|
|
69
|
+
const _dayButtonClassName = cn(
|
|
70
|
+
buttonVariants({ variant: "ghost" }),
|
|
71
|
+
"size-8 rounded-md p-0 font-normal transition-none aria-selected:opacity-100",
|
|
72
|
+
props.dayButtonClassName
|
|
73
|
+
);
|
|
74
|
+
const buttonRangeClassName = "bg-accent [&>button]:bg-primary [&>button]:text-primary-foreground [&>button]:hover:bg-primary [&>button]:hover:text-primary-foreground";
|
|
75
|
+
const _rangeStartClassName = cn(
|
|
76
|
+
buttonRangeClassName,
|
|
77
|
+
"day-range-start rounded-s-md",
|
|
78
|
+
props.rangeStartClassName
|
|
79
|
+
);
|
|
80
|
+
const _rangeEndClassName = cn(
|
|
81
|
+
buttonRangeClassName,
|
|
82
|
+
"day-range-end rounded-e-md",
|
|
83
|
+
props.rangeEndClassName
|
|
84
|
+
);
|
|
85
|
+
const _rangeMiddleClassName = cn(
|
|
86
|
+
"bg-accent !text-foreground [&>button]:bg-transparent [&>button]:!text-foreground [&>button]:hover:bg-transparent [&>button]:hover:!text-foreground",
|
|
87
|
+
props.rangeMiddleClassName
|
|
88
|
+
);
|
|
89
|
+
const _selectedClassName = cn(
|
|
90
|
+
"[&>button]:bg-primary [&>button]:text-primary-foreground [&>button]:hover:bg-primary [&>button]:hover:text-primary-foreground",
|
|
91
|
+
props.selectedClassName
|
|
92
|
+
);
|
|
93
|
+
const _todayClassName = cn(
|
|
94
|
+
"[&>button]:bg-accent [&>button]:text-accent-foreground",
|
|
95
|
+
props.todayClassName
|
|
96
|
+
);
|
|
97
|
+
const _outsideClassName = cn(
|
|
98
|
+
"day-outside text-muted-foreground opacity-50 aria-selected:bg-accent/50 aria-selected:text-muted-foreground aria-selected:opacity-30",
|
|
99
|
+
props.outsideClassName
|
|
100
|
+
);
|
|
101
|
+
const _disabledClassName = cn(
|
|
102
|
+
"text-muted-foreground opacity-50",
|
|
103
|
+
props.disabledClassName
|
|
104
|
+
);
|
|
105
|
+
const _hiddenClassName = cn("invisible flex-1", props.hiddenClassName);
|
|
106
|
+
return /* @__PURE__ */ React.createElement(
|
|
107
|
+
DayPicker,
|
|
108
|
+
{
|
|
109
|
+
showOutsideDays,
|
|
110
|
+
className: cn("p-3", className),
|
|
111
|
+
style: {
|
|
112
|
+
width: 248.8 * (columnsDisplayed ?? 1) + "px"
|
|
113
|
+
},
|
|
114
|
+
classNames: {
|
|
115
|
+
months: _monthsClassName,
|
|
116
|
+
month_caption: _monthCaptionClassName,
|
|
117
|
+
weekdays: _weekdaysClassName,
|
|
118
|
+
weekday: _weekdayClassName,
|
|
119
|
+
month: _monthClassName,
|
|
120
|
+
caption: _captionClassName,
|
|
121
|
+
caption_label: _captionLabelClassName,
|
|
122
|
+
button_next: _buttonNextClassName,
|
|
123
|
+
button_previous: _buttonPreviousClassName,
|
|
124
|
+
nav: _navClassName,
|
|
125
|
+
month_grid: _monthGridClassName,
|
|
126
|
+
week: _weekClassName,
|
|
127
|
+
day: _dayClassName,
|
|
128
|
+
day_button: _dayButtonClassName,
|
|
129
|
+
range_start: _rangeStartClassName,
|
|
130
|
+
range_middle: _rangeMiddleClassName,
|
|
131
|
+
range_end: _rangeEndClassName,
|
|
132
|
+
selected: _selectedClassName,
|
|
133
|
+
today: _todayClassName,
|
|
134
|
+
outside: _outsideClassName,
|
|
135
|
+
disabled: _disabledClassName,
|
|
136
|
+
hidden: _hiddenClassName
|
|
137
|
+
},
|
|
138
|
+
components: {
|
|
139
|
+
Chevron: ({ orientation }) => {
|
|
140
|
+
const Icon = orientation === "left" ? ChevronLeft : ChevronRight;
|
|
141
|
+
return /* @__PURE__ */ React.createElement(Icon, { className: "h-4 w-4" });
|
|
142
|
+
},
|
|
143
|
+
Nav: ({ className: className2 }) => /* @__PURE__ */ React.createElement(
|
|
144
|
+
Nav,
|
|
145
|
+
{
|
|
146
|
+
className: className2,
|
|
147
|
+
displayYears,
|
|
148
|
+
navView,
|
|
149
|
+
setDisplayYears,
|
|
150
|
+
startMonth,
|
|
151
|
+
endMonth,
|
|
152
|
+
onPrevClick,
|
|
153
|
+
onNextClick
|
|
154
|
+
}
|
|
155
|
+
),
|
|
156
|
+
CaptionLabel: (props2) => /* @__PURE__ */ React.createElement(
|
|
157
|
+
CaptionLabel,
|
|
158
|
+
{
|
|
159
|
+
showYearSwitcher,
|
|
160
|
+
navView,
|
|
161
|
+
setNavView,
|
|
162
|
+
displayYears,
|
|
163
|
+
...props2
|
|
164
|
+
}
|
|
165
|
+
),
|
|
166
|
+
MonthGrid: ({ className: className2, children, ...props2 }) => /* @__PURE__ */ React.createElement(
|
|
167
|
+
MonthGrid,
|
|
168
|
+
{
|
|
169
|
+
className: className2,
|
|
170
|
+
displayYears,
|
|
171
|
+
startMonth,
|
|
172
|
+
endMonth,
|
|
173
|
+
navView,
|
|
174
|
+
setNavView,
|
|
175
|
+
...props2
|
|
176
|
+
},
|
|
177
|
+
children
|
|
178
|
+
),
|
|
179
|
+
...components
|
|
180
|
+
},
|
|
181
|
+
numberOfMonths: columnsDisplayed,
|
|
182
|
+
...props
|
|
183
|
+
}
|
|
184
|
+
);
|
|
185
|
+
}
|
|
186
|
+
Calendar.displayName = "Calendar";
|
|
187
|
+
function Nav({
|
|
188
|
+
className,
|
|
189
|
+
navView,
|
|
190
|
+
startMonth,
|
|
191
|
+
endMonth,
|
|
192
|
+
displayYears,
|
|
193
|
+
setDisplayYears,
|
|
194
|
+
onPrevClick,
|
|
195
|
+
onNextClick
|
|
196
|
+
}) {
|
|
197
|
+
const { nextMonth, previousMonth, goToMonth } = useDayPicker();
|
|
198
|
+
const isPreviousDisabled = (() => {
|
|
199
|
+
if (navView === "years") {
|
|
200
|
+
return startMonth && differenceInCalendarDays(
|
|
201
|
+
new Date(displayYears.from - 1, 0, 1),
|
|
202
|
+
startMonth
|
|
203
|
+
) < 0 || endMonth && differenceInCalendarDays(
|
|
204
|
+
new Date(displayYears.from - 1, 0, 1),
|
|
205
|
+
endMonth
|
|
206
|
+
) > 0;
|
|
207
|
+
}
|
|
208
|
+
return !previousMonth;
|
|
209
|
+
})();
|
|
210
|
+
const isNextDisabled = (() => {
|
|
211
|
+
if (navView === "years") {
|
|
212
|
+
return startMonth && differenceInCalendarDays(
|
|
213
|
+
new Date(displayYears.to + 1, 0, 1),
|
|
214
|
+
startMonth
|
|
215
|
+
) < 0 || endMonth && differenceInCalendarDays(
|
|
216
|
+
new Date(displayYears.to + 1, 0, 1),
|
|
217
|
+
endMonth
|
|
218
|
+
) > 0;
|
|
219
|
+
}
|
|
220
|
+
return !nextMonth;
|
|
221
|
+
})();
|
|
222
|
+
const handlePreviousClick = React.useCallback(() => {
|
|
223
|
+
if (!previousMonth) return;
|
|
224
|
+
if (navView === "years") {
|
|
225
|
+
setDisplayYears((prev) => ({
|
|
226
|
+
from: prev.from - (prev.to - prev.from + 1),
|
|
227
|
+
to: prev.to - (prev.to - prev.from + 1)
|
|
228
|
+
}));
|
|
229
|
+
onPrevClick?.(
|
|
230
|
+
new Date(
|
|
231
|
+
displayYears.from - (displayYears.to - displayYears.from),
|
|
232
|
+
0,
|
|
233
|
+
1
|
|
234
|
+
)
|
|
235
|
+
);
|
|
236
|
+
return;
|
|
237
|
+
}
|
|
238
|
+
goToMonth(previousMonth);
|
|
239
|
+
onPrevClick?.(previousMonth);
|
|
240
|
+
}, [previousMonth, goToMonth]);
|
|
241
|
+
const handleNextClick = React.useCallback(() => {
|
|
242
|
+
if (!nextMonth) return;
|
|
243
|
+
if (navView === "years") {
|
|
244
|
+
setDisplayYears((prev) => ({
|
|
245
|
+
from: prev.from + (prev.to - prev.from + 1),
|
|
246
|
+
to: prev.to + (prev.to - prev.from + 1)
|
|
247
|
+
}));
|
|
248
|
+
onNextClick?.(
|
|
249
|
+
new Date(
|
|
250
|
+
displayYears.from + (displayYears.to - displayYears.from),
|
|
251
|
+
0,
|
|
252
|
+
1
|
|
253
|
+
)
|
|
254
|
+
);
|
|
255
|
+
return;
|
|
256
|
+
}
|
|
257
|
+
goToMonth(nextMonth);
|
|
258
|
+
onNextClick?.(nextMonth);
|
|
259
|
+
}, [goToMonth, nextMonth]);
|
|
260
|
+
return /* @__PURE__ */ React.createElement("nav", { className: cn("flex items-center", className) }, /* @__PURE__ */ React.createElement(
|
|
261
|
+
Button,
|
|
262
|
+
{
|
|
263
|
+
variant: "outlined",
|
|
264
|
+
className: "absolute left-0 h-7 w-7 bg-transparent p-0 opacity-80 hover:opacity-100",
|
|
265
|
+
type: "button",
|
|
266
|
+
tabIndex: isPreviousDisabled ? void 0 : -1,
|
|
267
|
+
disabled: isPreviousDisabled,
|
|
268
|
+
"aria-label": navView === "years" ? `Go to the previous ${displayYears.to - displayYears.from + 1} years` : labelPrevious(previousMonth),
|
|
269
|
+
onClick: handlePreviousClick
|
|
270
|
+
},
|
|
271
|
+
/* @__PURE__ */ React.createElement(ChevronLeft, { className: "h-4 w-4" })
|
|
272
|
+
), /* @__PURE__ */ React.createElement(
|
|
273
|
+
Button,
|
|
274
|
+
{
|
|
275
|
+
variant: "outlined",
|
|
276
|
+
className: "absolute right-0 h-7 w-7 bg-transparent p-0 opacity-80 hover:opacity-100",
|
|
277
|
+
type: "button",
|
|
278
|
+
tabIndex: isNextDisabled ? void 0 : -1,
|
|
279
|
+
disabled: isNextDisabled,
|
|
280
|
+
"aria-label": navView === "years" ? `Go to the next ${displayYears.to - displayYears.from + 1} years` : labelNext(nextMonth),
|
|
281
|
+
onClick: handleNextClick
|
|
282
|
+
},
|
|
283
|
+
/* @__PURE__ */ React.createElement(ChevronRight, { className: "h-4 w-4" })
|
|
284
|
+
));
|
|
285
|
+
}
|
|
286
|
+
function CaptionLabel({
|
|
287
|
+
children,
|
|
288
|
+
showYearSwitcher,
|
|
289
|
+
navView,
|
|
290
|
+
setNavView,
|
|
291
|
+
displayYears,
|
|
292
|
+
...props
|
|
293
|
+
}) {
|
|
294
|
+
if (!showYearSwitcher) return /* @__PURE__ */ React.createElement("span", { ...props }, children);
|
|
295
|
+
return /* @__PURE__ */ React.createElement(
|
|
296
|
+
Button,
|
|
297
|
+
{
|
|
298
|
+
className: "h-7 w-full truncate text-sm font-medium",
|
|
299
|
+
variant: "ghost",
|
|
300
|
+
size: "small",
|
|
301
|
+
onClick: () => setNavView((prev) => prev === "days" ? "years" : "days")
|
|
302
|
+
},
|
|
303
|
+
navView === "days" ? children : displayYears.from + " - " + displayYears.to
|
|
304
|
+
);
|
|
305
|
+
}
|
|
306
|
+
function MonthGrid({
|
|
307
|
+
className,
|
|
308
|
+
children,
|
|
309
|
+
displayYears,
|
|
310
|
+
startMonth,
|
|
311
|
+
endMonth,
|
|
312
|
+
navView,
|
|
313
|
+
setNavView,
|
|
314
|
+
...props
|
|
315
|
+
}) {
|
|
316
|
+
if (navView === "years") {
|
|
317
|
+
return /* @__PURE__ */ React.createElement(
|
|
318
|
+
YearGrid,
|
|
319
|
+
{
|
|
320
|
+
displayYears,
|
|
321
|
+
startMonth,
|
|
322
|
+
endMonth,
|
|
323
|
+
setNavView,
|
|
324
|
+
navView,
|
|
325
|
+
className,
|
|
326
|
+
...props
|
|
327
|
+
}
|
|
328
|
+
);
|
|
329
|
+
}
|
|
330
|
+
return /* @__PURE__ */ React.createElement("table", { className, ...props }, children);
|
|
331
|
+
}
|
|
332
|
+
function YearGrid({
|
|
333
|
+
className,
|
|
334
|
+
displayYears,
|
|
335
|
+
startMonth,
|
|
336
|
+
endMonth,
|
|
337
|
+
setNavView,
|
|
338
|
+
navView,
|
|
339
|
+
...props
|
|
340
|
+
}) {
|
|
341
|
+
const { goToMonth, selected } = useDayPicker();
|
|
342
|
+
return /* @__PURE__ */ React.createElement("div", { className: cn("grid grid-cols-4 gap-y-2", className), ...props }, Array.from(
|
|
343
|
+
{ length: displayYears.to - displayYears.from + 1 },
|
|
344
|
+
(_, i) => {
|
|
345
|
+
const isBefore = differenceInCalendarDays(
|
|
346
|
+
new Date(displayYears.from + i, 11, 31),
|
|
347
|
+
startMonth
|
|
348
|
+
) < 0;
|
|
349
|
+
const isAfter = differenceInCalendarDays(
|
|
350
|
+
new Date(displayYears.from + i, 0, 0),
|
|
351
|
+
endMonth
|
|
352
|
+
) > 0;
|
|
353
|
+
const isDisabled = isBefore || isAfter;
|
|
354
|
+
return /* @__PURE__ */ React.createElement(
|
|
355
|
+
Button,
|
|
356
|
+
{
|
|
357
|
+
key: i,
|
|
358
|
+
className: cn(
|
|
359
|
+
"h-7 w-full text-sm font-normal text-foreground",
|
|
360
|
+
displayYears.from + i === (/* @__PURE__ */ new Date()).getFullYear() && "bg-accent font-medium text-accent-foreground"
|
|
361
|
+
),
|
|
362
|
+
variant: "ghost",
|
|
363
|
+
onClick: () => {
|
|
364
|
+
setNavView("days");
|
|
365
|
+
goToMonth(
|
|
366
|
+
new Date(
|
|
367
|
+
displayYears.from + i,
|
|
368
|
+
selected?.getMonth() ?? 0
|
|
369
|
+
)
|
|
370
|
+
);
|
|
371
|
+
},
|
|
372
|
+
disabled: navView === "years" ? isDisabled : void 0
|
|
373
|
+
},
|
|
374
|
+
displayYears.from + i
|
|
375
|
+
);
|
|
376
|
+
}
|
|
377
|
+
));
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
export { Calendar };
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Button } from '../Button/Button.js';
|
|
3
|
+
import { Calendar } from '../Calendar/Calendar.js';
|
|
4
|
+
import { Popover, PopoverTrigger, PopoverContent } from '../Popover/Popover.js';
|
|
5
|
+
import { cn } from '../../lib/utils.js';
|
|
6
|
+
import { format } from 'date-fns';
|
|
7
|
+
import { CalendarIcon } from 'lucide-react';
|
|
8
|
+
|
|
9
|
+
function DatePicker({
|
|
10
|
+
className,
|
|
11
|
+
variant = "outlined",
|
|
12
|
+
locale,
|
|
13
|
+
placeholder = "Pick a date",
|
|
14
|
+
value,
|
|
15
|
+
onChange,
|
|
16
|
+
format: format$1 = "PPP",
|
|
17
|
+
status
|
|
18
|
+
}) {
|
|
19
|
+
const [internalDate, setInternalDate] = React.useState();
|
|
20
|
+
const isControlled = value !== void 0 && onChange !== void 0;
|
|
21
|
+
const date = isControlled ? value : internalDate;
|
|
22
|
+
const handleSelect = (selected) => {
|
|
23
|
+
if (isControlled && onChange) {
|
|
24
|
+
onChange(selected);
|
|
25
|
+
} else {
|
|
26
|
+
setInternalDate(selected);
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
return /* @__PURE__ */ React.createElement(Popover, null, /* @__PURE__ */ React.createElement(PopoverTrigger, { asChild: true }, /* @__PURE__ */ React.createElement(
|
|
30
|
+
Button,
|
|
31
|
+
{
|
|
32
|
+
variant,
|
|
33
|
+
className: cn(
|
|
34
|
+
"w-[240px] justify-start text-left font-normal",
|
|
35
|
+
!date && "text-muted-foreground",
|
|
36
|
+
className,
|
|
37
|
+
status
|
|
38
|
+
)
|
|
39
|
+
},
|
|
40
|
+
/* @__PURE__ */ React.createElement(CalendarIcon, { className: "mr-2 h-4 w-4" }),
|
|
41
|
+
date ? format(date, format$1, { locale }) : /* @__PURE__ */ React.createElement("span", null, placeholder)
|
|
42
|
+
)), /* @__PURE__ */ React.createElement(PopoverContent, { className: "w-auto p-0", align: "start" }, /* @__PURE__ */ React.createElement(
|
|
43
|
+
Calendar,
|
|
44
|
+
{
|
|
45
|
+
mode: "single",
|
|
46
|
+
selected: date,
|
|
47
|
+
onSelect: handleSelect,
|
|
48
|
+
autoFocus: true,
|
|
49
|
+
locale
|
|
50
|
+
}
|
|
51
|
+
)));
|
|
52
|
+
}
|
|
53
|
+
DatePicker.displayName = "DatePicker";
|
|
54
|
+
|
|
55
|
+
export { DatePicker };
|
package/dist/index.d.ts
CHANGED
|
@@ -36,6 +36,7 @@ export { TFunction, default as i18n } from 'i18next';
|
|
|
36
36
|
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
37
37
|
import * as vaul from 'vaul';
|
|
38
38
|
import { Drawer as Drawer$1 } from 'vaul';
|
|
39
|
+
import { Locale } from 'date-fns';
|
|
39
40
|
export { ptBR } from 'date-fns/locale/pt-BR';
|
|
40
41
|
export { enUS } from 'date-fns/locale/en-US';
|
|
41
42
|
export { es } from 'date-fns/locale/es';
|
|
@@ -1154,5 +1155,20 @@ declare const Collapse: React$1.ForwardRefExoticComponent<(AccordionPrimitive.Ac
|
|
|
1154
1155
|
Panel: React$1.ForwardRefExoticComponent<CollapsePanelProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1155
1156
|
};
|
|
1156
1157
|
|
|
1157
|
-
|
|
1158
|
+
interface DatePickerProps {
|
|
1159
|
+
className?: string;
|
|
1160
|
+
variant?: 'outlined' | 'filled' | 'ghost' | null;
|
|
1161
|
+
locale?: Locale;
|
|
1162
|
+
placeholder?: string;
|
|
1163
|
+
value?: Date;
|
|
1164
|
+
onChange?: (date: Date | undefined) => void;
|
|
1165
|
+
format?: string;
|
|
1166
|
+
status?: string;
|
|
1167
|
+
}
|
|
1168
|
+
declare function DatePicker({ className, variant, locale, placeholder, value, onChange, format, status, }: DatePickerProps): React$1.JSX.Element;
|
|
1169
|
+
declare namespace DatePicker {
|
|
1170
|
+
var displayName: string;
|
|
1171
|
+
}
|
|
1172
|
+
|
|
1173
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, CadastroFacil, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Checkbox, Collapse, Combobox, CustomDivider, DataTable, DatePicker, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogScroll, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, ErrorEmptyDisplay, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, Input, Layout, LogoLecom, LogoLecomBrand, ModoTeste, MultiSelect, Notification, Pagination, PaginationContent, PaginationEllipsis, PaginationFirst, PaginationIndex, PaginationItem, PaginationLast, PaginationNext, PaginationPrevious, Popover, PopoverContent, PopoverTrigger, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, Rpa, SairModoTeste, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Skeleton, Spin, Steps, Switch, TOAST_REMOVE_DELAY, Tabs, TabsContent, TabsList, TabsTrigger, Tag, TagInput, Textarea, ToggleGroup, ToggleGroupItem, Tooltip, TooltipArrow, TooltipContent, TooltipPortal, TooltipProvider, TooltipTrigger, Translations, TypeMessageNotification, Typography, Upload, accordionVariants, buttonVariants, collapseTriggerVariants, colors, fonts, initializeI18n, inputVariants, notificationVariants, reducer, tagVariants, textareaVariants, toast, typographyVariants, useFormField, useIsMobile, useNotificationToast, usePagination, useSidebar };
|
|
1158
1174
|
export type { BgColor, BuildCellSelect, BuildColumns, BuildHeaderSelect, ButtonProps, CadastroFacilProps, CalloutNotificationProps, ChartConfig, CheckboxProps, CheckedCell, CheckedCellChange, CheckedHeader, CheckedHeaderChange, Color, ColorToken, Column, ColumnRender, ColumnSort, ColumnSortClient, ColumnTitle, ComboboxGroup, ComboboxOption, ComboboxProps, CustomStyles$1 as CustomStyles, DataTableProps, DialogContentProps, ErrorEmptyDisplayProps, ExpandIconPosition, File, FillColor, Fonts, Header, HeaderProps, InlineNotificationProps, InputProps, LayoutProps, LogoLecomBrandProps, LogoLecomProps, Meta, ModoTesteProps, NotificationProps, PaginationProps, Row, RpaProps, SideBarProps, SpinProps, StepsProps, SwitchProps, TableProps, TagInputProps, TagProps, TagValue, TextColor, TextareaProps, TimelineStepItem, ToastNotificationProps, ToasterToast, TooltipContentProps, TypographyProps, UploadProps, UsePaginationItem };
|
package/dist/index.js
CHANGED
|
@@ -48,12 +48,7 @@ export { Combobox } from './components/Combobox/Combobox.js';
|
|
|
48
48
|
export { TagInput } from './components/TagInput/TagInput.js';
|
|
49
49
|
export { CustomDivider } from './components/CustomDivider/CustomDivider.js';
|
|
50
50
|
export { Collapse, collapseTriggerVariants } from './components/Collapse/Collapse.js';
|
|
51
|
-
|
|
52
|
-
import 'react-day-picker';
|
|
53
|
-
import 'clsx';
|
|
54
|
-
import 'tailwind-merge';
|
|
55
|
-
import 'date-fns';
|
|
56
|
-
import 'lucide-react';
|
|
51
|
+
export { DatePicker } from './components/DatePicker/DatePicker.js';
|
|
57
52
|
export { ptBR } from 'date-fns/locale/pt-BR';
|
|
58
53
|
export { enUS } from 'date-fns/locale/en-US';
|
|
59
54
|
export { es } from 'date-fns/locale/es';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lecom-ui",
|
|
3
|
-
"version": "5.2.
|
|
3
|
+
"version": "5.2.84",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -125,4 +125,4 @@
|
|
|
125
125
|
"react-is": "^19.0.0-rc-69d4b800-20241021"
|
|
126
126
|
},
|
|
127
127
|
"packageManager": "yarn@4.1.0+sha512.5b7bc055cad63273dda27df1570a5d2eb4a9f03b35b394d3d55393c2a5560a17f5cef30944b11d6a48bcbcfc1c3a26d618aae77044774c529ba36cb771ad5b0f"
|
|
128
|
-
}
|
|
128
|
+
}
|