@mlw-packages/react-components 1.7.23 → 1.7.25
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/index.css +3 -3
- package/dist/index.d.mts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +49 -56
- package/dist/index.mjs +50 -57
- package/package.json +1 -1
package/dist/index.css
CHANGED
|
@@ -1911,6 +1911,9 @@ body {
|
|
|
1911
1911
|
border-top-left-radius: 0.75rem;
|
|
1912
1912
|
border-top-right-radius: 0.75rem;
|
|
1913
1913
|
}
|
|
1914
|
+
.rounded-bl-md {
|
|
1915
|
+
border-bottom-left-radius: calc(var(--radius) - 2px);
|
|
1916
|
+
}
|
|
1914
1917
|
.rounded-tl-sm {
|
|
1915
1918
|
border-top-left-radius: calc(var(--radius) - 4px);
|
|
1916
1919
|
}
|
|
@@ -5582,9 +5585,6 @@ body {
|
|
|
5582
5585
|
.dark\:hover\:bg-emerald-400\/20:hover:is(.dark *) {
|
|
5583
5586
|
background-color: rgb(52 211 153 / 0.2);
|
|
5584
5587
|
}
|
|
5585
|
-
.dark\:hover\:bg-input\/50:hover:is(.dark *) {
|
|
5586
|
-
background-color: hsl(var(--input) / 0.5);
|
|
5587
|
-
}
|
|
5588
5588
|
.dark\:hover\:bg-orange-400\/20:hover:is(.dark *) {
|
|
5589
5589
|
background-color: rgb(251 146 60 / 0.2);
|
|
5590
5590
|
}
|
package/dist/index.d.mts
CHANGED
|
@@ -792,7 +792,8 @@ type BannerProps = {
|
|
|
792
792
|
interface DateTimePickerProps extends ErrorMessageProps {
|
|
793
793
|
label?: string;
|
|
794
794
|
date: Date | undefined;
|
|
795
|
-
onChange
|
|
795
|
+
onChange?: (date: Date | undefined) => void;
|
|
796
|
+
onConfirm?: (date: Date | undefined) => void;
|
|
796
797
|
displayFormat?: boolean;
|
|
797
798
|
hideTime?: boolean;
|
|
798
799
|
hideSeconds?: boolean;
|
|
@@ -802,7 +803,7 @@ interface DateTimePickerProps extends ErrorMessageProps {
|
|
|
802
803
|
className?: string;
|
|
803
804
|
error?: string;
|
|
804
805
|
}
|
|
805
|
-
declare function DateTimePicker({ label, date, onChange, displayFormat, hideTime, hideSeconds, fromDate, toDate, disabled, className, error, }: DateTimePickerProps): react_jsx_runtime.JSX.Element;
|
|
806
|
+
declare function DateTimePicker({ label, date, onChange, onConfirm, displayFormat, hideTime, hideSeconds, fromDate, toDate, disabled, className, error, }: DateTimePickerProps): react_jsx_runtime.JSX.Element;
|
|
806
807
|
|
|
807
808
|
interface RangePickerProps extends ErrorMessageProps {
|
|
808
809
|
value?: DateRange;
|
package/dist/index.d.ts
CHANGED
|
@@ -792,7 +792,8 @@ type BannerProps = {
|
|
|
792
792
|
interface DateTimePickerProps extends ErrorMessageProps {
|
|
793
793
|
label?: string;
|
|
794
794
|
date: Date | undefined;
|
|
795
|
-
onChange
|
|
795
|
+
onChange?: (date: Date | undefined) => void;
|
|
796
|
+
onConfirm?: (date: Date | undefined) => void;
|
|
796
797
|
displayFormat?: boolean;
|
|
797
798
|
hideTime?: boolean;
|
|
798
799
|
hideSeconds?: boolean;
|
|
@@ -802,7 +803,7 @@ interface DateTimePickerProps extends ErrorMessageProps {
|
|
|
802
803
|
className?: string;
|
|
803
804
|
error?: string;
|
|
804
805
|
}
|
|
805
|
-
declare function DateTimePicker({ label, date, onChange, displayFormat, hideTime, hideSeconds, fromDate, toDate, disabled, className, error, }: DateTimePickerProps): react_jsx_runtime.JSX.Element;
|
|
806
|
+
declare function DateTimePicker({ label, date, onChange, onConfirm, displayFormat, hideTime, hideSeconds, fromDate, toDate, disabled, className, error, }: DateTimePickerProps): react_jsx_runtime.JSX.Element;
|
|
806
807
|
|
|
807
808
|
interface RangePickerProps extends ErrorMessageProps {
|
|
808
809
|
value?: DateRange;
|
package/dist/index.js
CHANGED
|
@@ -7864,6 +7864,7 @@ function DateTimePicker({
|
|
|
7864
7864
|
label,
|
|
7865
7865
|
date,
|
|
7866
7866
|
onChange,
|
|
7867
|
+
onConfirm,
|
|
7867
7868
|
displayFormat,
|
|
7868
7869
|
hideTime,
|
|
7869
7870
|
hideSeconds,
|
|
@@ -7880,18 +7881,18 @@ function DateTimePicker({
|
|
|
7880
7881
|
if (!newDay) return;
|
|
7881
7882
|
if (!internalDate) {
|
|
7882
7883
|
setInternalDate(newDay);
|
|
7883
|
-
onChange(newDay);
|
|
7884
|
+
onChange?.(newDay);
|
|
7884
7885
|
return;
|
|
7885
7886
|
}
|
|
7886
7887
|
const diff = newDay.getTime() - internalDate.getTime();
|
|
7887
7888
|
const diffInDays = diff / (1e3 * 60 * 60 * 24);
|
|
7888
7889
|
const newDateFull = (0, import_date_fns.add)(internalDate, { days: Math.ceil(diffInDays) });
|
|
7889
7890
|
setInternalDate(newDateFull);
|
|
7890
|
-
onChange(newDateFull);
|
|
7891
|
+
onChange?.(newDateFull);
|
|
7891
7892
|
};
|
|
7892
7893
|
const handleTimeChange = (newDate) => {
|
|
7893
7894
|
setInternalDate(newDate);
|
|
7894
|
-
onChange(newDate);
|
|
7895
|
+
onChange?.(newDate);
|
|
7895
7896
|
};
|
|
7896
7897
|
const getTimeFormat = () => {
|
|
7897
7898
|
if (hideTime) return "";
|
|
@@ -7918,10 +7919,11 @@ function DateTimePicker({
|
|
|
7918
7919
|
disabled,
|
|
7919
7920
|
asChild: true,
|
|
7920
7921
|
className: cn(error && "border-red-500"),
|
|
7921
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime59.
|
|
7922
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
|
|
7922
7923
|
ButtonBase,
|
|
7923
7924
|
{
|
|
7924
7925
|
variant: "outline",
|
|
7926
|
+
disabled,
|
|
7925
7927
|
className: cn(
|
|
7926
7928
|
"w-full justify-start text-left min-w-0 overflow-hidden",
|
|
7927
7929
|
!date && "text-muted-foreground"
|
|
@@ -7943,7 +7945,7 @@ function DateTimePicker({
|
|
|
7943
7945
|
className: "-mr-3",
|
|
7944
7946
|
onClick: () => {
|
|
7945
7947
|
setInternalDate(void 0);
|
|
7946
|
-
onChange(void 0);
|
|
7948
|
+
onChange?.(void 0);
|
|
7947
7949
|
setOpen(false);
|
|
7948
7950
|
}
|
|
7949
7951
|
}
|
|
@@ -7951,7 +7953,7 @@ function DateTimePicker({
|
|
|
7951
7953
|
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_react43.CalendarBlankIcon, { className: "flex-shrink-0 w-5 h-5 sm:w-6 sm:h-6" })
|
|
7952
7954
|
]
|
|
7953
7955
|
}
|
|
7954
|
-
)
|
|
7956
|
+
)
|
|
7955
7957
|
}
|
|
7956
7958
|
),
|
|
7957
7959
|
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(ErrorMessage_default, { error }),
|
|
@@ -8044,7 +8046,7 @@ function DateTimePicker({
|
|
|
8044
8046
|
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
8045
8047
|
ButtonBase,
|
|
8046
8048
|
{
|
|
8047
|
-
className: "no-active-animation rounded-none bg-
|
|
8049
|
+
className: "no-active-animation rounded-none rounded-bl-md bg-background text-gray-800 border-b-2 border-l-2 hover:bg-muted/50 overflow-y-hidden",
|
|
8048
8050
|
onClick: () => setOpen(false),
|
|
8049
8051
|
children: "Cancelar"
|
|
8050
8052
|
}
|
|
@@ -8055,7 +8057,7 @@ function DateTimePicker({
|
|
|
8055
8057
|
className: "no-active-animation rounded-none bg-emerald-600 hover:bg-emerald-700",
|
|
8056
8058
|
onClick: () => {
|
|
8057
8059
|
setOpen(false);
|
|
8058
|
-
|
|
8060
|
+
onConfirm?.(internalDate);
|
|
8059
8061
|
},
|
|
8060
8062
|
children: "Confirmar"
|
|
8061
8063
|
}
|
|
@@ -8088,7 +8090,6 @@ function RangePicker({
|
|
|
8088
8090
|
}) {
|
|
8089
8091
|
const [open, setOpen] = React40.useState(false);
|
|
8090
8092
|
const [range, setRange] = React40.useState(value);
|
|
8091
|
-
const controls = (0, import_framer_motion13.useAnimation)();
|
|
8092
8093
|
React40.useEffect(() => {
|
|
8093
8094
|
setRange(value);
|
|
8094
8095
|
}, [value]);
|
|
@@ -8101,46 +8102,37 @@ function RangePicker({
|
|
|
8101
8102
|
onChange?.(void 0);
|
|
8102
8103
|
};
|
|
8103
8104
|
return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(PopoverBase, { open, onOpenChange: setOpen, children: [
|
|
8104
|
-
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(PopoverTriggerBase, { asChild: true, className: cn(error && "border-red-500"), children: /* @__PURE__ */ (0, import_jsx_runtime60.
|
|
8105
|
-
|
|
8105
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(PopoverTriggerBase, { asChild: true, className: cn(error && "border-red-500"), children: /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
|
|
8106
|
+
ButtonBase,
|
|
8106
8107
|
{
|
|
8107
|
-
|
|
8108
|
-
|
|
8109
|
-
|
|
8110
|
-
|
|
8111
|
-
|
|
8112
|
-
|
|
8113
|
-
|
|
8114
|
-
|
|
8115
|
-
|
|
8116
|
-
!range && "text-muted-foreground"
|
|
8117
|
-
|
|
8118
|
-
|
|
8119
|
-
|
|
8120
|
-
|
|
8121
|
-
|
|
8122
|
-
|
|
8123
|
-
|
|
8124
|
-
|
|
8125
|
-
|
|
8126
|
-
|
|
8127
|
-
|
|
8128
|
-
|
|
8129
|
-
|
|
8130
|
-
|
|
8131
|
-
|
|
8132
|
-
|
|
8133
|
-
|
|
8134
|
-
|
|
8135
|
-
{
|
|
8136
|
-
animate: open ? { rotate: 8, scale: 1.15 } : { rotate: 0, scale: 1 },
|
|
8137
|
-
transition: { type: "spring", stiffness: 300, damping: 18 },
|
|
8138
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react44.CalendarBlankIcon, { className: "flex-shrink-0 w-5 h-5 sm:w-6 sm:h-6" })
|
|
8139
|
-
}
|
|
8140
|
-
)
|
|
8141
|
-
]
|
|
8142
|
-
}
|
|
8143
|
-
)
|
|
8108
|
+
variant: "outline",
|
|
8109
|
+
className: cn(
|
|
8110
|
+
"w-full justify-start text-left min-w-0 overflow-hidden",
|
|
8111
|
+
!range && "text-muted-foreground"
|
|
8112
|
+
),
|
|
8113
|
+
children: [
|
|
8114
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
8115
|
+
"span",
|
|
8116
|
+
{
|
|
8117
|
+
className: cn("truncate flex-1", !range && "text-muted-foreground"),
|
|
8118
|
+
children: range?.from && range?.to ? `${(0, import_date_fns2.format)(range.from, "P", {
|
|
8119
|
+
locale: dateFnsLocale
|
|
8120
|
+
})} - ${(0, import_date_fns2.format)(range.to, "P", { locale: dateFnsLocale })}` : label
|
|
8121
|
+
}
|
|
8122
|
+
),
|
|
8123
|
+
range && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
8124
|
+
ClearButton,
|
|
8125
|
+
{
|
|
8126
|
+
className: "-mr-3",
|
|
8127
|
+
onClick: () => {
|
|
8128
|
+
setRange(void 0);
|
|
8129
|
+
onChange?.(void 0);
|
|
8130
|
+
setOpen(false);
|
|
8131
|
+
}
|
|
8132
|
+
}
|
|
8133
|
+
),
|
|
8134
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react44.CalendarBlankIcon, { className: "flex-shrink-0 w-5 h-5 sm:w-6 sm:h-6" })
|
|
8135
|
+
]
|
|
8144
8136
|
}
|
|
8145
8137
|
) }),
|
|
8146
8138
|
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(ErrorMessage_default, { error }),
|
|
@@ -8340,7 +8332,7 @@ function Agenda({
|
|
|
8340
8332
|
(0, import_date_fns3.isToday)(day) ? "border-blue-200" : ""
|
|
8341
8333
|
),
|
|
8342
8334
|
children: [
|
|
8343
|
-
/* @__PURE__ */ (0, import_jsx_runtime61.
|
|
8335
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
|
|
8344
8336
|
"span",
|
|
8345
8337
|
{
|
|
8346
8338
|
className: (0, import_tailwind_merge2.twMerge)(
|
|
@@ -8348,10 +8340,13 @@ function Agenda({
|
|
|
8348
8340
|
(0, import_date_fns3.isToday)(day) ? "text-blue-500" : ""
|
|
8349
8341
|
),
|
|
8350
8342
|
"data-today": (0, import_date_fns3.isToday)(day) || void 0,
|
|
8351
|
-
children:
|
|
8352
|
-
|
|
8353
|
-
|
|
8354
|
-
|
|
8343
|
+
children: [
|
|
8344
|
+
(() => {
|
|
8345
|
+
const s = (0, import_date_fns3.format)(day, "d MMM, EEEE", { locale: import_locale2.ptBR });
|
|
8346
|
+
return s.split(" ").map((w) => w ? w[0].toUpperCase() + w.slice(1) : w).join(" ");
|
|
8347
|
+
})(),
|
|
8348
|
+
(0, import_date_fns3.isToday)(day) ? " - Hoje" : ""
|
|
8349
|
+
]
|
|
8355
8350
|
}
|
|
8356
8351
|
),
|
|
8357
8352
|
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "mt-6 space-y-2", children: dayEvents.map((event) => /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
@@ -13501,7 +13496,7 @@ function MultiSelectTriggerBase({
|
|
|
13501
13496
|
"aria-disabled": disabled || void 0,
|
|
13502
13497
|
disabled,
|
|
13503
13498
|
className: cn(
|
|
13504
|
-
"flex h-auto max-h-9 min-h-9 w-full items-center justify-between gap-2 overflow-hidden rounded-md border border-input bg-background px-3 py-1.5 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[placeholder]:text-muted-foreground
|
|
13499
|
+
"flex h-auto max-h-9 min-h-9 w-full items-center justify-between gap-2 overflow-hidden rounded-md border border-input bg-background px-3 py-1.5 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[placeholder]:text-muted-foreground dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",
|
|
13505
13500
|
error ? "border-destructive focus:ring-1 focus:ring-destructive" : "border-input focus:ring-1 focus:ring-ring",
|
|
13506
13501
|
className
|
|
13507
13502
|
),
|
|
@@ -13689,8 +13684,6 @@ function MultiSelectItemBase({
|
|
|
13689
13684
|
children: /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
13690
13685
|
import_framer_motion16.motion.div,
|
|
13691
13686
|
{
|
|
13692
|
-
whileHover: { scale: 1.02 },
|
|
13693
|
-
whileTap: { scale: 0.98 },
|
|
13694
13687
|
transition: { duration: 0.1 },
|
|
13695
13688
|
children: [
|
|
13696
13689
|
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
package/dist/index.mjs
CHANGED
|
@@ -7548,6 +7548,7 @@ function DateTimePicker({
|
|
|
7548
7548
|
label,
|
|
7549
7549
|
date,
|
|
7550
7550
|
onChange,
|
|
7551
|
+
onConfirm,
|
|
7551
7552
|
displayFormat,
|
|
7552
7553
|
hideTime,
|
|
7553
7554
|
hideSeconds,
|
|
@@ -7564,18 +7565,18 @@ function DateTimePicker({
|
|
|
7564
7565
|
if (!newDay) return;
|
|
7565
7566
|
if (!internalDate) {
|
|
7566
7567
|
setInternalDate(newDay);
|
|
7567
|
-
onChange(newDay);
|
|
7568
|
+
onChange?.(newDay);
|
|
7568
7569
|
return;
|
|
7569
7570
|
}
|
|
7570
7571
|
const diff = newDay.getTime() - internalDate.getTime();
|
|
7571
7572
|
const diffInDays = diff / (1e3 * 60 * 60 * 24);
|
|
7572
7573
|
const newDateFull = add(internalDate, { days: Math.ceil(diffInDays) });
|
|
7573
7574
|
setInternalDate(newDateFull);
|
|
7574
|
-
onChange(newDateFull);
|
|
7575
|
+
onChange?.(newDateFull);
|
|
7575
7576
|
};
|
|
7576
7577
|
const handleTimeChange = (newDate) => {
|
|
7577
7578
|
setInternalDate(newDate);
|
|
7578
|
-
onChange(newDate);
|
|
7579
|
+
onChange?.(newDate);
|
|
7579
7580
|
};
|
|
7580
7581
|
const getTimeFormat = () => {
|
|
7581
7582
|
if (hideTime) return "";
|
|
@@ -7602,10 +7603,11 @@ function DateTimePicker({
|
|
|
7602
7603
|
disabled,
|
|
7603
7604
|
asChild: true,
|
|
7604
7605
|
className: cn(error && "border-red-500"),
|
|
7605
|
-
children: /* @__PURE__ */
|
|
7606
|
+
children: /* @__PURE__ */ jsxs40(
|
|
7606
7607
|
ButtonBase,
|
|
7607
7608
|
{
|
|
7608
7609
|
variant: "outline",
|
|
7610
|
+
disabled,
|
|
7609
7611
|
className: cn(
|
|
7610
7612
|
"w-full justify-start text-left min-w-0 overflow-hidden",
|
|
7611
7613
|
!date && "text-muted-foreground"
|
|
@@ -7627,7 +7629,7 @@ function DateTimePicker({
|
|
|
7627
7629
|
className: "-mr-3",
|
|
7628
7630
|
onClick: () => {
|
|
7629
7631
|
setInternalDate(void 0);
|
|
7630
|
-
onChange(void 0);
|
|
7632
|
+
onChange?.(void 0);
|
|
7631
7633
|
setOpen(false);
|
|
7632
7634
|
}
|
|
7633
7635
|
}
|
|
@@ -7635,7 +7637,7 @@ function DateTimePicker({
|
|
|
7635
7637
|
/* @__PURE__ */ jsx59(CalendarBlankIcon, { className: "flex-shrink-0 w-5 h-5 sm:w-6 sm:h-6" })
|
|
7636
7638
|
]
|
|
7637
7639
|
}
|
|
7638
|
-
)
|
|
7640
|
+
)
|
|
7639
7641
|
}
|
|
7640
7642
|
),
|
|
7641
7643
|
/* @__PURE__ */ jsx59(ErrorMessage_default, { error }),
|
|
@@ -7728,7 +7730,7 @@ function DateTimePicker({
|
|
|
7728
7730
|
/* @__PURE__ */ jsx59(
|
|
7729
7731
|
ButtonBase,
|
|
7730
7732
|
{
|
|
7731
|
-
className: "no-active-animation rounded-none bg-
|
|
7733
|
+
className: "no-active-animation rounded-none rounded-bl-md bg-background text-gray-800 border-b-2 border-l-2 hover:bg-muted/50 overflow-y-hidden",
|
|
7732
7734
|
onClick: () => setOpen(false),
|
|
7733
7735
|
children: "Cancelar"
|
|
7734
7736
|
}
|
|
@@ -7739,7 +7741,7 @@ function DateTimePicker({
|
|
|
7739
7741
|
className: "no-active-animation rounded-none bg-emerald-600 hover:bg-emerald-700",
|
|
7740
7742
|
onClick: () => {
|
|
7741
7743
|
setOpen(false);
|
|
7742
|
-
|
|
7744
|
+
onConfirm?.(internalDate);
|
|
7743
7745
|
},
|
|
7744
7746
|
children: "Confirmar"
|
|
7745
7747
|
}
|
|
@@ -7764,7 +7766,7 @@ import {
|
|
|
7764
7766
|
CaretRightIcon as CaretRightIcon6,
|
|
7765
7767
|
CalendarBlankIcon as CalendarBlankIcon2
|
|
7766
7768
|
} from "@phosphor-icons/react";
|
|
7767
|
-
import { motion as motion12, AnimatePresence as AnimatePresence9
|
|
7769
|
+
import { motion as motion12, AnimatePresence as AnimatePresence9 } from "framer-motion";
|
|
7768
7770
|
import { CalendarDotIcon } from "@phosphor-icons/react/dist/ssr";
|
|
7769
7771
|
import { jsx as jsx60, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
7770
7772
|
var dateFnsLocale = ptBR2?.default ?? ptBR2;
|
|
@@ -7778,7 +7780,6 @@ function RangePicker({
|
|
|
7778
7780
|
}) {
|
|
7779
7781
|
const [open, setOpen] = React40.useState(false);
|
|
7780
7782
|
const [range, setRange] = React40.useState(value);
|
|
7781
|
-
const controls = useAnimation();
|
|
7782
7783
|
React40.useEffect(() => {
|
|
7783
7784
|
setRange(value);
|
|
7784
7785
|
}, [value]);
|
|
@@ -7791,46 +7792,37 @@ function RangePicker({
|
|
|
7791
7792
|
onChange?.(void 0);
|
|
7792
7793
|
};
|
|
7793
7794
|
return /* @__PURE__ */ jsxs41(PopoverBase, { open, onOpenChange: setOpen, children: [
|
|
7794
|
-
/* @__PURE__ */ jsx60(PopoverTriggerBase, { asChild: true, className: cn(error && "border-red-500"), children: /* @__PURE__ */
|
|
7795
|
-
|
|
7795
|
+
/* @__PURE__ */ jsx60(PopoverTriggerBase, { asChild: true, className: cn(error && "border-red-500"), children: /* @__PURE__ */ jsxs41(
|
|
7796
|
+
ButtonBase,
|
|
7796
7797
|
{
|
|
7797
|
-
|
|
7798
|
-
|
|
7799
|
-
|
|
7800
|
-
|
|
7801
|
-
|
|
7802
|
-
|
|
7803
|
-
|
|
7804
|
-
|
|
7805
|
-
|
|
7806
|
-
!range && "text-muted-foreground"
|
|
7807
|
-
|
|
7808
|
-
|
|
7809
|
-
|
|
7810
|
-
|
|
7811
|
-
|
|
7812
|
-
|
|
7813
|
-
|
|
7814
|
-
|
|
7815
|
-
|
|
7816
|
-
|
|
7817
|
-
|
|
7818
|
-
|
|
7819
|
-
|
|
7820
|
-
|
|
7821
|
-
|
|
7822
|
-
|
|
7823
|
-
|
|
7824
|
-
|
|
7825
|
-
{
|
|
7826
|
-
animate: open ? { rotate: 8, scale: 1.15 } : { rotate: 0, scale: 1 },
|
|
7827
|
-
transition: { type: "spring", stiffness: 300, damping: 18 },
|
|
7828
|
-
children: /* @__PURE__ */ jsx60(CalendarBlankIcon2, { className: "flex-shrink-0 w-5 h-5 sm:w-6 sm:h-6" })
|
|
7829
|
-
}
|
|
7830
|
-
)
|
|
7831
|
-
]
|
|
7832
|
-
}
|
|
7833
|
-
)
|
|
7798
|
+
variant: "outline",
|
|
7799
|
+
className: cn(
|
|
7800
|
+
"w-full justify-start text-left min-w-0 overflow-hidden",
|
|
7801
|
+
!range && "text-muted-foreground"
|
|
7802
|
+
),
|
|
7803
|
+
children: [
|
|
7804
|
+
/* @__PURE__ */ jsx60(
|
|
7805
|
+
"span",
|
|
7806
|
+
{
|
|
7807
|
+
className: cn("truncate flex-1", !range && "text-muted-foreground"),
|
|
7808
|
+
children: range?.from && range?.to ? `${format2(range.from, "P", {
|
|
7809
|
+
locale: dateFnsLocale
|
|
7810
|
+
})} - ${format2(range.to, "P", { locale: dateFnsLocale })}` : label
|
|
7811
|
+
}
|
|
7812
|
+
),
|
|
7813
|
+
range && /* @__PURE__ */ jsx60(
|
|
7814
|
+
ClearButton,
|
|
7815
|
+
{
|
|
7816
|
+
className: "-mr-3",
|
|
7817
|
+
onClick: () => {
|
|
7818
|
+
setRange(void 0);
|
|
7819
|
+
onChange?.(void 0);
|
|
7820
|
+
setOpen(false);
|
|
7821
|
+
}
|
|
7822
|
+
}
|
|
7823
|
+
),
|
|
7824
|
+
/* @__PURE__ */ jsx60(CalendarBlankIcon2, { className: "flex-shrink-0 w-5 h-5 sm:w-6 sm:h-6" })
|
|
7825
|
+
]
|
|
7834
7826
|
}
|
|
7835
7827
|
) }),
|
|
7836
7828
|
/* @__PURE__ */ jsx60(ErrorMessage_default, { error }),
|
|
@@ -8036,7 +8028,7 @@ function Agenda({
|
|
|
8036
8028
|
isToday(day) ? "border-blue-200" : ""
|
|
8037
8029
|
),
|
|
8038
8030
|
children: [
|
|
8039
|
-
/* @__PURE__ */
|
|
8031
|
+
/* @__PURE__ */ jsxs42(
|
|
8040
8032
|
"span",
|
|
8041
8033
|
{
|
|
8042
8034
|
className: twMerge2(
|
|
@@ -8044,10 +8036,13 @@ function Agenda({
|
|
|
8044
8036
|
isToday(day) ? "text-blue-500" : ""
|
|
8045
8037
|
),
|
|
8046
8038
|
"data-today": isToday(day) || void 0,
|
|
8047
|
-
children:
|
|
8048
|
-
|
|
8049
|
-
|
|
8050
|
-
|
|
8039
|
+
children: [
|
|
8040
|
+
(() => {
|
|
8041
|
+
const s = format3(day, "d MMM, EEEE", { locale: ptBR3 });
|
|
8042
|
+
return s.split(" ").map((w) => w ? w[0].toUpperCase() + w.slice(1) : w).join(" ");
|
|
8043
|
+
})(),
|
|
8044
|
+
isToday(day) ? " - Hoje" : ""
|
|
8045
|
+
]
|
|
8051
8046
|
}
|
|
8052
8047
|
),
|
|
8053
8048
|
/* @__PURE__ */ jsx61("div", { className: "mt-6 space-y-2", children: dayEvents.map((event) => /* @__PURE__ */ jsx61(
|
|
@@ -13320,7 +13315,7 @@ function MultiSelectTriggerBase({
|
|
|
13320
13315
|
"aria-disabled": disabled || void 0,
|
|
13321
13316
|
disabled,
|
|
13322
13317
|
className: cn(
|
|
13323
|
-
"flex h-auto max-h-9 min-h-9 w-full items-center justify-between gap-2 overflow-hidden rounded-md border border-input bg-background px-3 py-1.5 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[placeholder]:text-muted-foreground
|
|
13318
|
+
"flex h-auto max-h-9 min-h-9 w-full items-center justify-between gap-2 overflow-hidden rounded-md border border-input bg-background px-3 py-1.5 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[placeholder]:text-muted-foreground dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",
|
|
13324
13319
|
error ? "border-destructive focus:ring-1 focus:ring-destructive" : "border-input focus:ring-1 focus:ring-ring",
|
|
13325
13320
|
className
|
|
13326
13321
|
),
|
|
@@ -13508,8 +13503,6 @@ function MultiSelectItemBase({
|
|
|
13508
13503
|
children: /* @__PURE__ */ jsxs61(
|
|
13509
13504
|
motion15.div,
|
|
13510
13505
|
{
|
|
13511
|
-
whileHover: { scale: 1.02 },
|
|
13512
|
-
whileTap: { scale: 0.98 },
|
|
13513
13506
|
transition: { duration: 0.1 },
|
|
13514
13507
|
children: [
|
|
13515
13508
|
/* @__PURE__ */ jsx84("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx84(
|