@mlw-packages/react-components 1.7.10 → 1.7.11
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 +13 -0
- package/dist/index.d.mts +8 -13
- package/dist/index.d.ts +8 -13
- package/dist/index.js +73 -60
- package/dist/index.mjs +73 -60
- package/package.json +1 -1
package/dist/index.css
CHANGED
|
@@ -4138,6 +4138,14 @@ body {
|
|
|
4138
4138
|
outline: 2px solid transparent;
|
|
4139
4139
|
outline-offset: 2px;
|
|
4140
4140
|
}
|
|
4141
|
+
.focus\:ring-0:focus {
|
|
4142
|
+
--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
|
|
4143
|
+
--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);
|
|
4144
|
+
box-shadow:
|
|
4145
|
+
var(--tw-ring-offset-shadow),
|
|
4146
|
+
var(--tw-ring-shadow),
|
|
4147
|
+
var(--tw-shadow, 0 0 #0000);
|
|
4148
|
+
}
|
|
4141
4149
|
.focus\:ring-1:focus {
|
|
4142
4150
|
--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
|
|
4143
4151
|
--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);
|
|
@@ -5929,6 +5937,11 @@ body {
|
|
|
5929
5937
|
.\[\&\:last-child\>\*\]\:border-b-0:last-child > * {
|
|
5930
5938
|
border-bottom-width: 0px;
|
|
5931
5939
|
}
|
|
5940
|
+
.\[\&\:not\(\.no-active-animation\)\]\:active\:scale-95:active:not(.no-active-animation) {
|
|
5941
|
+
--tw-scale-x: .95;
|
|
5942
|
+
--tw-scale-y: .95;
|
|
5943
|
+
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
|
5944
|
+
}
|
|
5932
5945
|
.\[\&\>\[role\=checkbox\]\]\:translate-y-\[2px\] > [role=checkbox] {
|
|
5933
5946
|
--tw-translate-y: 2px;
|
|
5934
5947
|
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
package/dist/index.d.mts
CHANGED
|
@@ -133,18 +133,21 @@ interface SelectTestIds$1 {
|
|
|
133
133
|
label?: string;
|
|
134
134
|
item?: (value: string) => string;
|
|
135
135
|
}
|
|
136
|
-
interface DefaultSelectProps$1 extends ErrorMessageProps {
|
|
136
|
+
interface DefaultSelectProps$1<T extends string> extends ErrorMessageProps {
|
|
137
|
+
selected: T | null;
|
|
138
|
+
onChange: (value: T) => void;
|
|
137
139
|
placeholder?: string;
|
|
138
|
-
onChange: (value: string) => void;
|
|
139
140
|
disabled?: boolean;
|
|
140
141
|
className?: string;
|
|
142
|
+
label?: string;
|
|
143
|
+
labelClassname?: string;
|
|
141
144
|
}
|
|
142
|
-
interface SelectPropsWithItems$1<T extends string> extends DefaultSelectProps$1 {
|
|
145
|
+
interface SelectPropsWithItems$1<T extends string> extends DefaultSelectProps$1<T> {
|
|
143
146
|
items: SelectItem<T>[];
|
|
144
147
|
groupItems?: never;
|
|
145
148
|
testIds?: SelectTestIds$1;
|
|
146
149
|
}
|
|
147
|
-
interface SelectPropsWithGroupItems$1<T extends string> extends DefaultSelectProps$1 {
|
|
150
|
+
interface SelectPropsWithGroupItems$1<T extends string> extends DefaultSelectProps$1<T> {
|
|
148
151
|
items?: never;
|
|
149
152
|
groupItems: {
|
|
150
153
|
[key: string]: SelectItem<T>[];
|
|
@@ -152,11 +155,7 @@ interface SelectPropsWithGroupItems$1<T extends string> extends DefaultSelectPro
|
|
|
152
155
|
testIds?: SelectTestIds$1;
|
|
153
156
|
}
|
|
154
157
|
type NewSelectProps<T extends string> = SelectPropsWithItems$1<T> | SelectPropsWithGroupItems$1<T>;
|
|
155
|
-
declare function Select<T extends string>({ items, groupItems, placeholder, onChange, error, testIds, disabled, selected, label, labelClassname, className }: NewSelectProps<T>
|
|
156
|
-
selected?: T | null;
|
|
157
|
-
label?: string;
|
|
158
|
-
labelClassname?: string;
|
|
159
|
-
}): react_jsx_runtime.JSX.Element;
|
|
158
|
+
declare function Select<T extends string>({ items, groupItems, placeholder, onChange, error, testIds, disabled, selected, label, labelClassname, className, }: NewSelectProps<T>): react_jsx_runtime.JSX.Element;
|
|
160
159
|
|
|
161
160
|
interface AvatarSelectItem<T extends string> {
|
|
162
161
|
label: string;
|
|
@@ -288,11 +287,8 @@ interface ChartProps {
|
|
|
288
287
|
showLabels?: boolean;
|
|
289
288
|
labelMap?: Record<string, string>;
|
|
290
289
|
valueFormatter?: valueFormatter;
|
|
291
|
-
/** Formata valores categóricos (ex.: "BANANA" -> "Banana") apenas para exibição */
|
|
292
290
|
categoryFormatter?: (value: string | number) => string;
|
|
293
|
-
/** Label a ser exibido abaixo do eixo X */
|
|
294
291
|
xAxisLabel?: string;
|
|
295
|
-
/** Label a ser exibido ao lado do eixo Y */
|
|
296
292
|
yAxisLabel?: string;
|
|
297
293
|
xAxis?: XAxisConfig$1 | string;
|
|
298
294
|
enableHighlights?: boolean;
|
|
@@ -301,7 +297,6 @@ interface ChartProps {
|
|
|
301
297
|
enableDraggableTooltips?: boolean;
|
|
302
298
|
showTooltipTotal?: boolean;
|
|
303
299
|
maxTooltips?: number;
|
|
304
|
-
/** Quando true, formata valores numéricos no formato pt-BR (ex: 00.000,00) */
|
|
305
300
|
formatBR?: boolean;
|
|
306
301
|
}
|
|
307
302
|
declare const Chart: React__default.FC<ChartProps>;
|
package/dist/index.d.ts
CHANGED
|
@@ -133,18 +133,21 @@ interface SelectTestIds$1 {
|
|
|
133
133
|
label?: string;
|
|
134
134
|
item?: (value: string) => string;
|
|
135
135
|
}
|
|
136
|
-
interface DefaultSelectProps$1 extends ErrorMessageProps {
|
|
136
|
+
interface DefaultSelectProps$1<T extends string> extends ErrorMessageProps {
|
|
137
|
+
selected: T | null;
|
|
138
|
+
onChange: (value: T) => void;
|
|
137
139
|
placeholder?: string;
|
|
138
|
-
onChange: (value: string) => void;
|
|
139
140
|
disabled?: boolean;
|
|
140
141
|
className?: string;
|
|
142
|
+
label?: string;
|
|
143
|
+
labelClassname?: string;
|
|
141
144
|
}
|
|
142
|
-
interface SelectPropsWithItems$1<T extends string> extends DefaultSelectProps$1 {
|
|
145
|
+
interface SelectPropsWithItems$1<T extends string> extends DefaultSelectProps$1<T> {
|
|
143
146
|
items: SelectItem<T>[];
|
|
144
147
|
groupItems?: never;
|
|
145
148
|
testIds?: SelectTestIds$1;
|
|
146
149
|
}
|
|
147
|
-
interface SelectPropsWithGroupItems$1<T extends string> extends DefaultSelectProps$1 {
|
|
150
|
+
interface SelectPropsWithGroupItems$1<T extends string> extends DefaultSelectProps$1<T> {
|
|
148
151
|
items?: never;
|
|
149
152
|
groupItems: {
|
|
150
153
|
[key: string]: SelectItem<T>[];
|
|
@@ -152,11 +155,7 @@ interface SelectPropsWithGroupItems$1<T extends string> extends DefaultSelectPro
|
|
|
152
155
|
testIds?: SelectTestIds$1;
|
|
153
156
|
}
|
|
154
157
|
type NewSelectProps<T extends string> = SelectPropsWithItems$1<T> | SelectPropsWithGroupItems$1<T>;
|
|
155
|
-
declare function Select<T extends string>({ items, groupItems, placeholder, onChange, error, testIds, disabled, selected, label, labelClassname, className }: NewSelectProps<T>
|
|
156
|
-
selected?: T | null;
|
|
157
|
-
label?: string;
|
|
158
|
-
labelClassname?: string;
|
|
159
|
-
}): react_jsx_runtime.JSX.Element;
|
|
158
|
+
declare function Select<T extends string>({ items, groupItems, placeholder, onChange, error, testIds, disabled, selected, label, labelClassname, className, }: NewSelectProps<T>): react_jsx_runtime.JSX.Element;
|
|
160
159
|
|
|
161
160
|
interface AvatarSelectItem<T extends string> {
|
|
162
161
|
label: string;
|
|
@@ -288,11 +287,8 @@ interface ChartProps {
|
|
|
288
287
|
showLabels?: boolean;
|
|
289
288
|
labelMap?: Record<string, string>;
|
|
290
289
|
valueFormatter?: valueFormatter;
|
|
291
|
-
/** Formata valores categóricos (ex.: "BANANA" -> "Banana") apenas para exibição */
|
|
292
290
|
categoryFormatter?: (value: string | number) => string;
|
|
293
|
-
/** Label a ser exibido abaixo do eixo X */
|
|
294
291
|
xAxisLabel?: string;
|
|
295
|
-
/** Label a ser exibido ao lado do eixo Y */
|
|
296
292
|
yAxisLabel?: string;
|
|
297
293
|
xAxis?: XAxisConfig$1 | string;
|
|
298
294
|
enableHighlights?: boolean;
|
|
@@ -301,7 +297,6 @@ interface ChartProps {
|
|
|
301
297
|
enableDraggableTooltips?: boolean;
|
|
302
298
|
showTooltipTotal?: boolean;
|
|
303
299
|
maxTooltips?: number;
|
|
304
|
-
/** Quando true, formata valores numéricos no formato pt-BR (ex: 00.000,00) */
|
|
305
300
|
formatBR?: boolean;
|
|
306
301
|
}
|
|
307
302
|
declare const Chart: React__default.FC<ChartProps>;
|
package/dist/index.js
CHANGED
|
@@ -828,7 +828,7 @@ function cn(...inputs) {
|
|
|
828
828
|
var import_react = require("@phosphor-icons/react");
|
|
829
829
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
830
830
|
var buttonVariantsBase = (0, import_class_variance_authority.cva)(
|
|
831
|
-
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive active:scale-95",
|
|
831
|
+
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive [&:not(.no-active-animation)]:active:scale-95",
|
|
832
832
|
{
|
|
833
833
|
variants: {
|
|
834
834
|
variant: {
|
|
@@ -1063,7 +1063,7 @@ var LabelBase_default = LabelBase;
|
|
|
1063
1063
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
1064
1064
|
var ErrorMessage = ({ error }) => {
|
|
1065
1065
|
if (!error) return null;
|
|
1066
|
-
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { className: "text-sm text-destructive
|
|
1066
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { className: "text-sm text-destructive", children: error });
|
|
1067
1067
|
};
|
|
1068
1068
|
var ErrorMessage_default = ErrorMessage;
|
|
1069
1069
|
|
|
@@ -1447,7 +1447,7 @@ function Combobox({
|
|
|
1447
1447
|
},
|
|
1448
1448
|
[selected, onChange]
|
|
1449
1449
|
);
|
|
1450
|
-
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: cn("flex flex-col
|
|
1450
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: cn("flex flex-col w-full min-w-[150px]", className), children: [
|
|
1451
1451
|
label && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(LabelBase_default, { className: labelClassname, children: label }),
|
|
1452
1452
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1453
1453
|
ComboboxBase,
|
|
@@ -2129,7 +2129,7 @@ function Select({
|
|
|
2129
2129
|
className
|
|
2130
2130
|
}) {
|
|
2131
2131
|
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { "data-testid": testIds.root ?? "select-root", children: [
|
|
2132
|
-
label ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("label", { className: cn("
|
|
2132
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("label", { className: cn("block text-sm font-medium", labelClassname), children: label }) : null,
|
|
2133
2133
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
2134
2134
|
SelectBase,
|
|
2135
2135
|
{
|
|
@@ -10380,60 +10380,64 @@ function CalendarBase2({
|
|
|
10380
10380
|
"rounded-md border bg-background p-3 overflow-hidden flex flex-col",
|
|
10381
10381
|
className
|
|
10382
10382
|
),
|
|
10383
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "relative flex-1 flex flex-col min-h-0", children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_framer_motion14.AnimatePresence, { initial: false, mode: "wait", custom: direction, children: /* @__PURE__ */ (0, import_jsx_runtime63.
|
|
10383
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "relative flex-1 flex flex-col min-h-0", children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_framer_motion14.AnimatePresence, { initial: false, mode: "wait", custom: direction, children: /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(
|
|
10384
10384
|
"div",
|
|
10385
10385
|
{
|
|
10386
10386
|
className: "w-full h-full flex flex-col",
|
|
10387
|
-
children:
|
|
10388
|
-
|
|
10389
|
-
|
|
10390
|
-
|
|
10391
|
-
|
|
10392
|
-
|
|
10393
|
-
|
|
10394
|
-
|
|
10395
|
-
|
|
10396
|
-
|
|
10397
|
-
|
|
10398
|
-
|
|
10399
|
-
|
|
10400
|
-
|
|
10401
|
-
|
|
10402
|
-
|
|
10403
|
-
|
|
10404
|
-
|
|
10405
|
-
|
|
10406
|
-
|
|
10407
|
-
|
|
10408
|
-
|
|
10409
|
-
|
|
10410
|
-
|
|
10411
|
-
|
|
10412
|
-
|
|
10413
|
-
|
|
10414
|
-
|
|
10415
|
-
|
|
10416
|
-
|
|
10417
|
-
|
|
10418
|
-
|
|
10419
|
-
|
|
10420
|
-
|
|
10421
|
-
|
|
10422
|
-
|
|
10423
|
-
|
|
10424
|
-
|
|
10425
|
-
|
|
10426
|
-
|
|
10427
|
-
|
|
10428
|
-
|
|
10429
|
-
|
|
10430
|
-
|
|
10431
|
-
|
|
10432
|
-
|
|
10433
|
-
|
|
10434
|
-
|
|
10435
|
-
|
|
10436
|
-
|
|
10387
|
+
children: [
|
|
10388
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "flex items-center justify-end mb-2 -mt-1" }),
|
|
10389
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
10390
|
+
import_react_day_picker2.DayPicker,
|
|
10391
|
+
{
|
|
10392
|
+
showOutsideDays,
|
|
10393
|
+
month,
|
|
10394
|
+
onMonthChange: handleMonthChange,
|
|
10395
|
+
className: "w-full h-full flex flex-col",
|
|
10396
|
+
classNames: {
|
|
10397
|
+
months: "flex flex-col sm:flex-row gap-3 sm:gap-4 w-full",
|
|
10398
|
+
month: "flex-1 min-w-0",
|
|
10399
|
+
caption: "flex items-center justify-between gap-2 pr-1 min-h-[2.25rem] mb-2",
|
|
10400
|
+
caption_label: "text-[clamp(0.85rem,1.4vw,1.125rem)] sm:text-[clamp(0.9rem,1.6vw,1.125rem)] font-semibold capitalize text-left",
|
|
10401
|
+
nav: "flex items-center gap-2",
|
|
10402
|
+
nav_button: cn(
|
|
10403
|
+
buttonVariantsBase({ variant: "outline" }),
|
|
10404
|
+
"h-8 w-8 sm:h-9 sm:w-9 md:h-10 md:w-10 flex items-center justify-center p-0 rounded-md transition-transform duration-150 ease-out focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary/40 active:scale-95"
|
|
10405
|
+
),
|
|
10406
|
+
nav_button_previous: "",
|
|
10407
|
+
nav_button_next: "",
|
|
10408
|
+
table: "w-full min-w-0 flex-1 grid grid-rows-[auto_1fr] gap-2",
|
|
10409
|
+
head_row: "grid grid-cols-7 gap-1 mb-1",
|
|
10410
|
+
head_cell: "text-muted-foreground rounded-md font-semibold text-[clamp(0.575rem,1.2vw,0.75rem)] sm:text-[clamp(0.65rem,1.1vw,0.825rem)] text-center pb-1 uppercase tracking-wider",
|
|
10411
|
+
row: "grid grid-cols-7 gap-1",
|
|
10412
|
+
cell: cn(
|
|
10413
|
+
"min-w-0 h-9 sm:h-10 md:h-10 p-0 relative flex items-center justify-center",
|
|
10414
|
+
"[&:has([aria-selected].day-range-end)]:rounded-r-lg",
|
|
10415
|
+
"[&:has([aria-selected].day-range-start)]:rounded-l-lg",
|
|
10416
|
+
"[&:has([aria-selected].day-outside)]:bg-muted/50",
|
|
10417
|
+
"[&:has([aria-selected])]:bg-muted"
|
|
10418
|
+
),
|
|
10419
|
+
day: cn(
|
|
10420
|
+
buttonVariantsBase({ variant: "ghost" }),
|
|
10421
|
+
"w-full h-full p-0 m-0 flex items-center justify-center text-[clamp(0.775rem,1.2vw,0.95rem)] sm:text-sm",
|
|
10422
|
+
"aria-selected:opacity-100 hover:bg-muted transition-all duration-150 ease-out active:scale-95"
|
|
10423
|
+
),
|
|
10424
|
+
day_selected: "bg-primary text-primary-foreground hover:bg-primary/90 focus:bg-primary/90 font-semibold hover:text-white",
|
|
10425
|
+
day_today: "bg-muted text-foreground font-bold ring-2 ring-primary/30 ring-inset",
|
|
10426
|
+
day_outside: "text-muted-foreground/40 opacity-60 aria-selected:bg-muted/50 aria-selected:text-foreground",
|
|
10427
|
+
day_disabled: "text-muted-foreground/30 opacity-40 cursor-not-allowed",
|
|
10428
|
+
day_range_middle: "aria-selected:bg-muted aria-selected:text-foreground",
|
|
10429
|
+
day_hidden: "invisible",
|
|
10430
|
+
button: "p-0 m-0 border-0 outline-none focus:ring-0",
|
|
10431
|
+
...classNames
|
|
10432
|
+
},
|
|
10433
|
+
components: {
|
|
10434
|
+
IconLeft: () => /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_react41.CaretLeftIcon, { className: "h-4 w-4" }),
|
|
10435
|
+
IconRight: () => /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_react41.CaretRightIcon, { className: "h-4 w-4" })
|
|
10436
|
+
},
|
|
10437
|
+
...props
|
|
10438
|
+
}
|
|
10439
|
+
)
|
|
10440
|
+
]
|
|
10437
10441
|
},
|
|
10438
10442
|
month.toISOString()
|
|
10439
10443
|
) }) })
|
|
@@ -10955,7 +10959,7 @@ function DateTimePicker({
|
|
|
10955
10959
|
{
|
|
10956
10960
|
variant: "outline",
|
|
10957
10961
|
className: cn(
|
|
10958
|
-
"w-full justify-start text-left min-w-0 overflow-hidden ",
|
|
10962
|
+
"w-full justify-start text-left min-w-0 overflow-hidden no-active-animation",
|
|
10959
10963
|
!date && "text-muted-foreground"
|
|
10960
10964
|
),
|
|
10961
10965
|
children: [
|
|
@@ -11000,7 +11004,7 @@ function DateTimePicker({
|
|
|
11000
11004
|
className: cn("w-full", hideTime && "border-0")
|
|
11001
11005
|
}
|
|
11002
11006
|
),
|
|
11003
|
-
!hideTime && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "flex justify-center w-full ", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
|
|
11007
|
+
!hideTime && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "flex justify-center w-full border-b border-r border-l", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
|
|
11004
11008
|
PopoverBase,
|
|
11005
11009
|
{
|
|
11006
11010
|
open: timePickerOpen,
|
|
@@ -11016,7 +11020,7 @@ function DateTimePicker({
|
|
|
11016
11020
|
"text-sm sm:text-base font-semibold w-full",
|
|
11017
11021
|
"bg-background hover:bg-accent",
|
|
11018
11022
|
"transition-all duration-200",
|
|
11019
|
-
"shadow-sm hover:shadow-md active
|
|
11023
|
+
"shadow-sm hover:shadow-md no-active-animation"
|
|
11020
11024
|
),
|
|
11021
11025
|
children: [
|
|
11022
11026
|
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_react45.ClockIcon, { className: "text-primary flex-shrink-0 w-4 h-4 sm:w-5 sm:h-5" }),
|
|
@@ -11051,7 +11055,7 @@ function DateTimePicker({
|
|
|
11051
11055
|
size: "sm",
|
|
11052
11056
|
variant: "destructive",
|
|
11053
11057
|
onClick: () => setTimePickerOpen(false),
|
|
11054
|
-
className: "w-full text-xs sm:text-sm min-h-[36px] sm:min-h-[40px]",
|
|
11058
|
+
className: "w-full text-xs sm:text-sm min-h-[36px] sm:min-h-[40px] no-active-animation",
|
|
11055
11059
|
children: "Fechar"
|
|
11056
11060
|
}
|
|
11057
11061
|
)
|
|
@@ -11060,7 +11064,16 @@ function DateTimePicker({
|
|
|
11060
11064
|
)
|
|
11061
11065
|
]
|
|
11062
11066
|
}
|
|
11063
|
-
) })
|
|
11067
|
+
) }),
|
|
11068
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
11069
|
+
ButtonBase,
|
|
11070
|
+
{
|
|
11071
|
+
variant: "destructive",
|
|
11072
|
+
className: "rounded-t-none no-active-animation",
|
|
11073
|
+
onClick: () => setOpen(false),
|
|
11074
|
+
children: "Fechar"
|
|
11075
|
+
}
|
|
11076
|
+
)
|
|
11064
11077
|
] })
|
|
11065
11078
|
}
|
|
11066
11079
|
)
|
package/dist/index.mjs
CHANGED
|
@@ -495,7 +495,7 @@ function cn(...inputs) {
|
|
|
495
495
|
import { CircleNotchIcon } from "@phosphor-icons/react";
|
|
496
496
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
497
497
|
var buttonVariantsBase = cva(
|
|
498
|
-
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive active:scale-95",
|
|
498
|
+
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive [&:not(.no-active-animation)]:active:scale-95",
|
|
499
499
|
{
|
|
500
500
|
variants: {
|
|
501
501
|
variant: {
|
|
@@ -730,7 +730,7 @@ var LabelBase_default = LabelBase;
|
|
|
730
730
|
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
731
731
|
var ErrorMessage = ({ error }) => {
|
|
732
732
|
if (!error) return null;
|
|
733
|
-
return /* @__PURE__ */ jsx4("p", { className: "text-sm text-destructive
|
|
733
|
+
return /* @__PURE__ */ jsx4("p", { className: "text-sm text-destructive", children: error });
|
|
734
734
|
};
|
|
735
735
|
var ErrorMessage_default = ErrorMessage;
|
|
736
736
|
|
|
@@ -1114,7 +1114,7 @@ function Combobox({
|
|
|
1114
1114
|
},
|
|
1115
1115
|
[selected, onChange]
|
|
1116
1116
|
);
|
|
1117
|
-
return /* @__PURE__ */ jsxs6("div", { className: cn("flex flex-col
|
|
1117
|
+
return /* @__PURE__ */ jsxs6("div", { className: cn("flex flex-col w-full min-w-[150px]", className), children: [
|
|
1118
1118
|
label && /* @__PURE__ */ jsx9(LabelBase_default, { className: labelClassname, children: label }),
|
|
1119
1119
|
/* @__PURE__ */ jsx9(
|
|
1120
1120
|
ComboboxBase,
|
|
@@ -1796,7 +1796,7 @@ function Select({
|
|
|
1796
1796
|
className
|
|
1797
1797
|
}) {
|
|
1798
1798
|
return /* @__PURE__ */ jsxs13("div", { "data-testid": testIds.root ?? "select-root", children: [
|
|
1799
|
-
label ? /* @__PURE__ */ jsx18("label", { className: cn("
|
|
1799
|
+
label ? /* @__PURE__ */ jsx18("label", { className: cn("block text-sm font-medium", labelClassname), children: label }) : null,
|
|
1800
1800
|
/* @__PURE__ */ jsxs13(
|
|
1801
1801
|
SelectBase,
|
|
1802
1802
|
{
|
|
@@ -10149,60 +10149,64 @@ function CalendarBase2({
|
|
|
10149
10149
|
"rounded-md border bg-background p-3 overflow-hidden flex flex-col",
|
|
10150
10150
|
className
|
|
10151
10151
|
),
|
|
10152
|
-
children: /* @__PURE__ */ jsx63("div", { className: "relative flex-1 flex flex-col min-h-0", children: /* @__PURE__ */ jsx63(AnimatePresence9, { initial: false, mode: "wait", custom: direction, children: /* @__PURE__ */
|
|
10152
|
+
children: /* @__PURE__ */ jsx63("div", { className: "relative flex-1 flex flex-col min-h-0", children: /* @__PURE__ */ jsx63(AnimatePresence9, { initial: false, mode: "wait", custom: direction, children: /* @__PURE__ */ jsxs46(
|
|
10153
10153
|
"div",
|
|
10154
10154
|
{
|
|
10155
10155
|
className: "w-full h-full flex flex-col",
|
|
10156
|
-
children:
|
|
10157
|
-
|
|
10158
|
-
|
|
10159
|
-
|
|
10160
|
-
|
|
10161
|
-
|
|
10162
|
-
|
|
10163
|
-
|
|
10164
|
-
|
|
10165
|
-
|
|
10166
|
-
|
|
10167
|
-
|
|
10168
|
-
|
|
10169
|
-
|
|
10170
|
-
|
|
10171
|
-
|
|
10172
|
-
|
|
10173
|
-
|
|
10174
|
-
|
|
10175
|
-
|
|
10176
|
-
|
|
10177
|
-
|
|
10178
|
-
|
|
10179
|
-
|
|
10180
|
-
|
|
10181
|
-
|
|
10182
|
-
|
|
10183
|
-
|
|
10184
|
-
|
|
10185
|
-
|
|
10186
|
-
|
|
10187
|
-
|
|
10188
|
-
|
|
10189
|
-
|
|
10190
|
-
|
|
10191
|
-
|
|
10192
|
-
|
|
10193
|
-
|
|
10194
|
-
|
|
10195
|
-
|
|
10196
|
-
|
|
10197
|
-
|
|
10198
|
-
|
|
10199
|
-
|
|
10200
|
-
|
|
10201
|
-
|
|
10202
|
-
|
|
10203
|
-
|
|
10204
|
-
|
|
10205
|
-
|
|
10156
|
+
children: [
|
|
10157
|
+
/* @__PURE__ */ jsx63("div", { className: "flex items-center justify-end mb-2 -mt-1" }),
|
|
10158
|
+
/* @__PURE__ */ jsx63(
|
|
10159
|
+
DayPicker2,
|
|
10160
|
+
{
|
|
10161
|
+
showOutsideDays,
|
|
10162
|
+
month,
|
|
10163
|
+
onMonthChange: handleMonthChange,
|
|
10164
|
+
className: "w-full h-full flex flex-col",
|
|
10165
|
+
classNames: {
|
|
10166
|
+
months: "flex flex-col sm:flex-row gap-3 sm:gap-4 w-full",
|
|
10167
|
+
month: "flex-1 min-w-0",
|
|
10168
|
+
caption: "flex items-center justify-between gap-2 pr-1 min-h-[2.25rem] mb-2",
|
|
10169
|
+
caption_label: "text-[clamp(0.85rem,1.4vw,1.125rem)] sm:text-[clamp(0.9rem,1.6vw,1.125rem)] font-semibold capitalize text-left",
|
|
10170
|
+
nav: "flex items-center gap-2",
|
|
10171
|
+
nav_button: cn(
|
|
10172
|
+
buttonVariantsBase({ variant: "outline" }),
|
|
10173
|
+
"h-8 w-8 sm:h-9 sm:w-9 md:h-10 md:w-10 flex items-center justify-center p-0 rounded-md transition-transform duration-150 ease-out focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary/40 active:scale-95"
|
|
10174
|
+
),
|
|
10175
|
+
nav_button_previous: "",
|
|
10176
|
+
nav_button_next: "",
|
|
10177
|
+
table: "w-full min-w-0 flex-1 grid grid-rows-[auto_1fr] gap-2",
|
|
10178
|
+
head_row: "grid grid-cols-7 gap-1 mb-1",
|
|
10179
|
+
head_cell: "text-muted-foreground rounded-md font-semibold text-[clamp(0.575rem,1.2vw,0.75rem)] sm:text-[clamp(0.65rem,1.1vw,0.825rem)] text-center pb-1 uppercase tracking-wider",
|
|
10180
|
+
row: "grid grid-cols-7 gap-1",
|
|
10181
|
+
cell: cn(
|
|
10182
|
+
"min-w-0 h-9 sm:h-10 md:h-10 p-0 relative flex items-center justify-center",
|
|
10183
|
+
"[&:has([aria-selected].day-range-end)]:rounded-r-lg",
|
|
10184
|
+
"[&:has([aria-selected].day-range-start)]:rounded-l-lg",
|
|
10185
|
+
"[&:has([aria-selected].day-outside)]:bg-muted/50",
|
|
10186
|
+
"[&:has([aria-selected])]:bg-muted"
|
|
10187
|
+
),
|
|
10188
|
+
day: cn(
|
|
10189
|
+
buttonVariantsBase({ variant: "ghost" }),
|
|
10190
|
+
"w-full h-full p-0 m-0 flex items-center justify-center text-[clamp(0.775rem,1.2vw,0.95rem)] sm:text-sm",
|
|
10191
|
+
"aria-selected:opacity-100 hover:bg-muted transition-all duration-150 ease-out active:scale-95"
|
|
10192
|
+
),
|
|
10193
|
+
day_selected: "bg-primary text-primary-foreground hover:bg-primary/90 focus:bg-primary/90 font-semibold hover:text-white",
|
|
10194
|
+
day_today: "bg-muted text-foreground font-bold ring-2 ring-primary/30 ring-inset",
|
|
10195
|
+
day_outside: "text-muted-foreground/40 opacity-60 aria-selected:bg-muted/50 aria-selected:text-foreground",
|
|
10196
|
+
day_disabled: "text-muted-foreground/30 opacity-40 cursor-not-allowed",
|
|
10197
|
+
day_range_middle: "aria-selected:bg-muted aria-selected:text-foreground",
|
|
10198
|
+
day_hidden: "invisible",
|
|
10199
|
+
button: "p-0 m-0 border-0 outline-none focus:ring-0",
|
|
10200
|
+
...classNames
|
|
10201
|
+
},
|
|
10202
|
+
components: {
|
|
10203
|
+
IconLeft: () => /* @__PURE__ */ jsx63(CaretLeftIcon2, { className: "h-4 w-4" }),
|
|
10204
|
+
IconRight: () => /* @__PURE__ */ jsx63(CaretRightIcon4, { className: "h-4 w-4" })
|
|
10205
|
+
},
|
|
10206
|
+
...props
|
|
10207
|
+
}
|
|
10208
|
+
)
|
|
10209
|
+
]
|
|
10206
10210
|
},
|
|
10207
10211
|
month.toISOString()
|
|
10208
10212
|
) }) })
|
|
@@ -10724,7 +10728,7 @@ function DateTimePicker({
|
|
|
10724
10728
|
{
|
|
10725
10729
|
variant: "outline",
|
|
10726
10730
|
className: cn(
|
|
10727
|
-
"w-full justify-start text-left min-w-0 overflow-hidden ",
|
|
10731
|
+
"w-full justify-start text-left min-w-0 overflow-hidden no-active-animation",
|
|
10728
10732
|
!date && "text-muted-foreground"
|
|
10729
10733
|
),
|
|
10730
10734
|
children: [
|
|
@@ -10769,7 +10773,7 @@ function DateTimePicker({
|
|
|
10769
10773
|
className: cn("w-full", hideTime && "border-0")
|
|
10770
10774
|
}
|
|
10771
10775
|
),
|
|
10772
|
-
!hideTime && /* @__PURE__ */ jsx66("div", { className: "flex justify-center w-full ", children: /* @__PURE__ */ jsxs49(
|
|
10776
|
+
!hideTime && /* @__PURE__ */ jsx66("div", { className: "flex justify-center w-full border-b border-r border-l", children: /* @__PURE__ */ jsxs49(
|
|
10773
10777
|
PopoverBase,
|
|
10774
10778
|
{
|
|
10775
10779
|
open: timePickerOpen,
|
|
@@ -10785,7 +10789,7 @@ function DateTimePicker({
|
|
|
10785
10789
|
"text-sm sm:text-base font-semibold w-full",
|
|
10786
10790
|
"bg-background hover:bg-accent",
|
|
10787
10791
|
"transition-all duration-200",
|
|
10788
|
-
"shadow-sm hover:shadow-md active
|
|
10792
|
+
"shadow-sm hover:shadow-md no-active-animation"
|
|
10789
10793
|
),
|
|
10790
10794
|
children: [
|
|
10791
10795
|
/* @__PURE__ */ jsx66(ClockIcon, { className: "text-primary flex-shrink-0 w-4 h-4 sm:w-5 sm:h-5" }),
|
|
@@ -10820,7 +10824,7 @@ function DateTimePicker({
|
|
|
10820
10824
|
size: "sm",
|
|
10821
10825
|
variant: "destructive",
|
|
10822
10826
|
onClick: () => setTimePickerOpen(false),
|
|
10823
|
-
className: "w-full text-xs sm:text-sm min-h-[36px] sm:min-h-[40px]",
|
|
10827
|
+
className: "w-full text-xs sm:text-sm min-h-[36px] sm:min-h-[40px] no-active-animation",
|
|
10824
10828
|
children: "Fechar"
|
|
10825
10829
|
}
|
|
10826
10830
|
)
|
|
@@ -10829,7 +10833,16 @@ function DateTimePicker({
|
|
|
10829
10833
|
)
|
|
10830
10834
|
]
|
|
10831
10835
|
}
|
|
10832
|
-
) })
|
|
10836
|
+
) }),
|
|
10837
|
+
/* @__PURE__ */ jsx66(
|
|
10838
|
+
ButtonBase,
|
|
10839
|
+
{
|
|
10840
|
+
variant: "destructive",
|
|
10841
|
+
className: "rounded-t-none no-active-animation",
|
|
10842
|
+
onClick: () => setOpen(false),
|
|
10843
|
+
children: "Fechar"
|
|
10844
|
+
}
|
|
10845
|
+
)
|
|
10833
10846
|
] })
|
|
10834
10847
|
}
|
|
10835
10848
|
)
|