@mlw-packages/react-components 1.3.10 → 1.3.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 +4 -16
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +14 -14
- package/dist/index.mjs +14 -14
- package/package.json +1 -1
package/dist/index.css
CHANGED
|
@@ -549,9 +549,6 @@ body {
|
|
|
549
549
|
.-mt-4 {
|
|
550
550
|
margin-top: -1rem;
|
|
551
551
|
}
|
|
552
|
-
.mb-1 {
|
|
553
|
-
margin-bottom: 0.25rem;
|
|
554
|
-
}
|
|
555
552
|
.mb-2 {
|
|
556
553
|
margin-bottom: 0.5rem;
|
|
557
554
|
}
|
|
@@ -885,10 +882,6 @@ body {
|
|
|
885
882
|
.w-auto {
|
|
886
883
|
width: auto;
|
|
887
884
|
}
|
|
888
|
-
.w-fit {
|
|
889
|
-
width: -moz-fit-content;
|
|
890
|
-
width: fit-content;
|
|
891
|
-
}
|
|
892
885
|
.w-full {
|
|
893
886
|
width: 100%;
|
|
894
887
|
}
|
|
@@ -908,9 +901,6 @@ body {
|
|
|
908
901
|
.min-w-\[150px\] {
|
|
909
902
|
min-width: 150px;
|
|
910
903
|
}
|
|
911
|
-
.min-w-\[200px\] {
|
|
912
|
-
min-width: 200px;
|
|
913
|
-
}
|
|
914
904
|
.min-w-\[8rem\] {
|
|
915
905
|
min-width: 8rem;
|
|
916
906
|
}
|
|
@@ -1061,9 +1051,6 @@ body {
|
|
|
1061
1051
|
.flex-wrap {
|
|
1062
1052
|
flex-wrap: wrap;
|
|
1063
1053
|
}
|
|
1064
|
-
.place-items-end {
|
|
1065
|
-
place-items: end;
|
|
1066
|
-
}
|
|
1067
1054
|
.content-start {
|
|
1068
1055
|
align-content: flex-start;
|
|
1069
1056
|
}
|
|
@@ -1079,9 +1066,6 @@ body {
|
|
|
1079
1066
|
.justify-start {
|
|
1080
1067
|
justify-content: flex-start;
|
|
1081
1068
|
}
|
|
1082
|
-
.justify-end {
|
|
1083
|
-
justify-content: flex-end;
|
|
1084
|
-
}
|
|
1085
1069
|
.justify-center {
|
|
1086
1070
|
justify-content: center;
|
|
1087
1071
|
}
|
|
@@ -1406,6 +1390,10 @@ body {
|
|
|
1406
1390
|
.bg-primary\/20 {
|
|
1407
1391
|
background-color: hsl(var(--primary) / 0.2);
|
|
1408
1392
|
}
|
|
1393
|
+
.bg-red-500 {
|
|
1394
|
+
--tw-bg-opacity: 1;
|
|
1395
|
+
background-color: rgb(239 68 68 / var(--tw-bg-opacity, 1));
|
|
1396
|
+
}
|
|
1409
1397
|
.bg-secondary {
|
|
1410
1398
|
background-color: hsl(var(--secondary));
|
|
1411
1399
|
}
|
package/dist/index.d.mts
CHANGED
|
@@ -473,7 +473,7 @@ interface MultiComboboxProps<T extends string> extends Omit<ComboboxProps<T>, "s
|
|
|
473
473
|
onChange: (value: T[]) => void;
|
|
474
474
|
labelClassname?: string;
|
|
475
475
|
}
|
|
476
|
-
declare function MultiCombobox<T extends string>({ items, selected, onChange, placeholder, searchPlaceholder, label, labelClassname }: MultiComboboxProps<T>): react_jsx_runtime.JSX.Element;
|
|
476
|
+
declare function MultiCombobox<T extends string>({ items, selected, onChange, placeholder, searchPlaceholder, label, labelClassname, }: MultiComboboxProps<T>): react_jsx_runtime.JSX.Element;
|
|
477
477
|
|
|
478
478
|
interface SelectItem$1<T extends string> {
|
|
479
479
|
label: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -473,7 +473,7 @@ interface MultiComboboxProps<T extends string> extends Omit<ComboboxProps<T>, "s
|
|
|
473
473
|
onChange: (value: T[]) => void;
|
|
474
474
|
labelClassname?: string;
|
|
475
475
|
}
|
|
476
|
-
declare function MultiCombobox<T extends string>({ items, selected, onChange, placeholder, searchPlaceholder, label, labelClassname }: MultiComboboxProps<T>): react_jsx_runtime.JSX.Element;
|
|
476
|
+
declare function MultiCombobox<T extends string>({ items, selected, onChange, placeholder, searchPlaceholder, label, labelClassname, }: MultiComboboxProps<T>): react_jsx_runtime.JSX.Element;
|
|
477
477
|
|
|
478
478
|
interface SelectItem$1<T extends string> {
|
|
479
479
|
label: string;
|
package/dist/index.js
CHANGED
|
@@ -217,7 +217,7 @@ var buttonVariantsBase = (0, import_class_variance_authority.cva)(
|
|
|
217
217
|
focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2
|
|
218
218
|
disabled:pointer-events-none disabled:opacity-50
|
|
219
219
|
active:scale-[0.97]
|
|
220
|
-
[&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0
|
|
220
|
+
[&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 border border-transparent
|
|
221
221
|
`,
|
|
222
222
|
{
|
|
223
223
|
variants: {
|
|
@@ -230,9 +230,9 @@ var buttonVariantsBase = (0, import_class_variance_authority.cva)(
|
|
|
230
230
|
link: "text-primary underline-offset-4 hover:underline"
|
|
231
231
|
},
|
|
232
232
|
size: {
|
|
233
|
-
default: "
|
|
234
|
-
sm: "
|
|
235
|
-
lg: "
|
|
233
|
+
default: "px-4 py-1.5",
|
|
234
|
+
sm: "rounded-md px-3 text-xs",
|
|
235
|
+
lg: "rounded-md px-8",
|
|
236
236
|
icon: "h-9 w-9"
|
|
237
237
|
}
|
|
238
238
|
},
|
|
@@ -632,7 +632,7 @@ var InputBase = React6.forwardRef(
|
|
|
632
632
|
{
|
|
633
633
|
className: cn(
|
|
634
634
|
"flex items-center rounded-md transition focus-within:ring-1 focus-within:ring-ring focus-within:border-ring bg-white dark:bg-[hsl(231,15%,19%)] overflow-hidden",
|
|
635
|
-
type !== "
|
|
635
|
+
type !== "file" && "border"
|
|
636
636
|
),
|
|
637
637
|
children: [
|
|
638
638
|
leftIcon && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "flex items-center justify-center px-2", children: leftIcon }),
|
|
@@ -641,7 +641,7 @@ var InputBase = React6.forwardRef(
|
|
|
641
641
|
{
|
|
642
642
|
type,
|
|
643
643
|
className: cn(
|
|
644
|
-
"w-full flex-1 text-sm
|
|
644
|
+
"w-full flex-1 text-sm py-1.5 px-3 focus:outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50 bg-white dark:bg-[hsl(231,15%,19%)]",
|
|
645
645
|
className
|
|
646
646
|
),
|
|
647
647
|
ref,
|
|
@@ -1442,7 +1442,7 @@ function ComboboxBase({
|
|
|
1442
1442
|
role: "combobox",
|
|
1443
1443
|
"aria-expanded": open,
|
|
1444
1444
|
className: cn(
|
|
1445
|
-
"flex
|
|
1445
|
+
"flex items-start gap-2 justify-between h-full",
|
|
1446
1446
|
errorMessage && "border-red-500"
|
|
1447
1447
|
),
|
|
1448
1448
|
children: [
|
|
@@ -1504,10 +1504,9 @@ function Combobox({
|
|
|
1504
1504
|
labelClassname
|
|
1505
1505
|
}) {
|
|
1506
1506
|
const selectedItem = items.find((item) => item.value === selected);
|
|
1507
|
-
const renderSelected = (0, import_react5.useMemo)(
|
|
1508
|
-
()
|
|
1509
|
-
|
|
1510
|
-
);
|
|
1507
|
+
const renderSelected = (0, import_react5.useMemo)(() => {
|
|
1508
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: cn("truncate", !selectedItem && "text-gray-500"), children: selectedItem?.label ?? placeholder ?? "Selecione uma op\xE7\xE3o..." });
|
|
1509
|
+
}, [placeholder, selectedItem]);
|
|
1511
1510
|
const checkIsSelected = (0, import_react5.useCallback)(
|
|
1512
1511
|
(value) => selected == null ? false : selected == value,
|
|
1513
1512
|
[selected]
|
|
@@ -1563,8 +1562,9 @@ function MultiCombobox({
|
|
|
1563
1562
|
[selected, onChange]
|
|
1564
1563
|
);
|
|
1565
1564
|
const renderSelected = (0, import_react6.useMemo)(() => {
|
|
1566
|
-
if (selectedItems.length === 0)
|
|
1567
|
-
return placeholder ?? "Selecione uma op\xE7\xE3o...";
|
|
1565
|
+
if (selectedItems.length === 0) {
|
|
1566
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "text-gray-500", children: placeholder ?? "Selecione uma op\xE7\xE3o..." });
|
|
1567
|
+
}
|
|
1568
1568
|
const items2 = selectedItems.map((item) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
1569
1569
|
"div",
|
|
1570
1570
|
{
|
|
@@ -3027,7 +3027,7 @@ SlideBase.displayName = "SlideBase";
|
|
|
3027
3027
|
var import_phosphor_react15 = require("phosphor-react");
|
|
3028
3028
|
var import_sonner = require("sonner");
|
|
3029
3029
|
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
3030
|
-
var iconBaseClass = "w-
|
|
3030
|
+
var iconBaseClass = "w-5 h-auto";
|
|
3031
3031
|
var Toaster = ({ ...props }) => {
|
|
3032
3032
|
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
3033
3033
|
import_sonner.Toaster,
|
package/dist/index.mjs
CHANGED
|
@@ -24,7 +24,7 @@ var buttonVariantsBase = cva(
|
|
|
24
24
|
focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2
|
|
25
25
|
disabled:pointer-events-none disabled:opacity-50
|
|
26
26
|
active:scale-[0.97]
|
|
27
|
-
[&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0
|
|
27
|
+
[&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 border border-transparent
|
|
28
28
|
`,
|
|
29
29
|
{
|
|
30
30
|
variants: {
|
|
@@ -37,9 +37,9 @@ var buttonVariantsBase = cva(
|
|
|
37
37
|
link: "text-primary underline-offset-4 hover:underline"
|
|
38
38
|
},
|
|
39
39
|
size: {
|
|
40
|
-
default: "
|
|
41
|
-
sm: "
|
|
42
|
-
lg: "
|
|
40
|
+
default: "px-4 py-1.5",
|
|
41
|
+
sm: "rounded-md px-3 text-xs",
|
|
42
|
+
lg: "rounded-md px-8",
|
|
43
43
|
icon: "h-9 w-9"
|
|
44
44
|
}
|
|
45
45
|
},
|
|
@@ -439,7 +439,7 @@ var InputBase = React6.forwardRef(
|
|
|
439
439
|
{
|
|
440
440
|
className: cn(
|
|
441
441
|
"flex items-center rounded-md transition focus-within:ring-1 focus-within:ring-ring focus-within:border-ring bg-white dark:bg-[hsl(231,15%,19%)] overflow-hidden",
|
|
442
|
-
type !== "
|
|
442
|
+
type !== "file" && "border"
|
|
443
443
|
),
|
|
444
444
|
children: [
|
|
445
445
|
leftIcon && /* @__PURE__ */ jsx7("div", { className: "flex items-center justify-center px-2", children: leftIcon }),
|
|
@@ -448,7 +448,7 @@ var InputBase = React6.forwardRef(
|
|
|
448
448
|
{
|
|
449
449
|
type,
|
|
450
450
|
className: cn(
|
|
451
|
-
"w-full flex-1 text-sm
|
|
451
|
+
"w-full flex-1 text-sm py-1.5 px-3 focus:outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50 bg-white dark:bg-[hsl(231,15%,19%)]",
|
|
452
452
|
className
|
|
453
453
|
),
|
|
454
454
|
ref,
|
|
@@ -1249,7 +1249,7 @@ function ComboboxBase({
|
|
|
1249
1249
|
role: "combobox",
|
|
1250
1250
|
"aria-expanded": open,
|
|
1251
1251
|
className: cn(
|
|
1252
|
-
"flex
|
|
1252
|
+
"flex items-start gap-2 justify-between h-full",
|
|
1253
1253
|
errorMessage && "border-red-500"
|
|
1254
1254
|
),
|
|
1255
1255
|
children: [
|
|
@@ -1311,10 +1311,9 @@ function Combobox({
|
|
|
1311
1311
|
labelClassname
|
|
1312
1312
|
}) {
|
|
1313
1313
|
const selectedItem = items.find((item) => item.value === selected);
|
|
1314
|
-
const renderSelected = useMemo(
|
|
1315
|
-
()
|
|
1316
|
-
|
|
1317
|
-
);
|
|
1314
|
+
const renderSelected = useMemo(() => {
|
|
1315
|
+
return /* @__PURE__ */ jsx17("span", { className: cn("truncate", !selectedItem && "text-gray-500"), children: selectedItem?.label ?? placeholder ?? "Selecione uma op\xE7\xE3o..." });
|
|
1316
|
+
}, [placeholder, selectedItem]);
|
|
1318
1317
|
const checkIsSelected = useCallback(
|
|
1319
1318
|
(value) => selected == null ? false : selected == value,
|
|
1320
1319
|
[selected]
|
|
@@ -1370,8 +1369,9 @@ function MultiCombobox({
|
|
|
1370
1369
|
[selected, onChange]
|
|
1371
1370
|
);
|
|
1372
1371
|
const renderSelected = useMemo2(() => {
|
|
1373
|
-
if (selectedItems.length === 0)
|
|
1374
|
-
return placeholder ?? "Selecione uma op\xE7\xE3o...";
|
|
1372
|
+
if (selectedItems.length === 0) {
|
|
1373
|
+
return /* @__PURE__ */ jsx18("span", { className: "text-gray-500", children: placeholder ?? "Selecione uma op\xE7\xE3o..." });
|
|
1374
|
+
}
|
|
1375
1375
|
const items2 = selectedItems.map((item) => /* @__PURE__ */ jsxs11(
|
|
1376
1376
|
"div",
|
|
1377
1377
|
{
|
|
@@ -2838,7 +2838,7 @@ SlideBase.displayName = "SlideBase";
|
|
|
2838
2838
|
import { CheckCircle, XCircle, Info, Warning, Spinner } from "phosphor-react";
|
|
2839
2839
|
import { Toaster as Sonner, toast as sonnertoast } from "sonner";
|
|
2840
2840
|
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
2841
|
-
var iconBaseClass = "w-
|
|
2841
|
+
var iconBaseClass = "w-5 h-auto";
|
|
2842
2842
|
var Toaster = ({ ...props }) => {
|
|
2843
2843
|
return /* @__PURE__ */ jsx33(
|
|
2844
2844
|
Sonner,
|