@motor-hero/ui-kit 0.31.0 → 0.32.0
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.js
CHANGED
|
@@ -1053,13 +1053,18 @@ function MultiCombobox({
|
|
|
1053
1053
|
import * as PopoverPrimitive3 from "@radix-ui/react-popover";
|
|
1054
1054
|
import { ChevronsUpDown as ChevronsUpDown3, X as X3 } from "lucide-react";
|
|
1055
1055
|
import * as React8 from "react";
|
|
1056
|
-
import {
|
|
1056
|
+
import {
|
|
1057
|
+
HexAlphaColorPicker,
|
|
1058
|
+
HexColorInput,
|
|
1059
|
+
HexColorPicker
|
|
1060
|
+
} from "react-colorful";
|
|
1057
1061
|
import { jsx as jsx19, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
1058
1062
|
function ColorPicker({
|
|
1059
1063
|
value,
|
|
1060
1064
|
onChange,
|
|
1061
1065
|
placeholder = "Selecionar cor",
|
|
1062
1066
|
clearable = true,
|
|
1067
|
+
alpha = false,
|
|
1063
1068
|
disabled,
|
|
1064
1069
|
id,
|
|
1065
1070
|
className,
|
|
@@ -1093,12 +1098,11 @@ function ColorPicker({
|
|
|
1093
1098
|
"span",
|
|
1094
1099
|
{
|
|
1095
1100
|
"aria-hidden": true,
|
|
1096
|
-
className:
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
backgroundImage: "linear-gradient(45deg,var(--color-muted) 25%,transparent 25%,transparent 75%,var(--color-muted) 75%),linear-gradient(45deg,var(--color-muted) 25%,transparent 25%,transparent 75%,var(--color-muted) 75%)"
|
|
1101
|
+
className: "h-5 w-5 shrink-0 rounded border border-border bg-[length:8px_8px] bg-[position:0_0,4px_4px]",
|
|
1102
|
+
style: {
|
|
1103
|
+
// The checkerboard stays under the color layer so a
|
|
1104
|
+
// translucent value reads as translucent in the swatch.
|
|
1105
|
+
backgroundImage: `${color ? `linear-gradient(${color},${color}),` : ""}linear-gradient(45deg,var(--color-muted) 25%,transparent 25%,transparent 75%,var(--color-muted) 75%),linear-gradient(45deg,var(--color-muted) 25%,transparent 25%,transparent 75%,var(--color-muted) 75%)`
|
|
1102
1106
|
}
|
|
1103
1107
|
}
|
|
1104
1108
|
),
|
|
@@ -1133,7 +1137,7 @@ function ColorPicker({
|
|
|
1133
1137
|
sideOffset: 4,
|
|
1134
1138
|
className: "z-50 w-56 rounded-md border bg-popover p-3 text-popover-foreground shadow-md",
|
|
1135
1139
|
children: /* @__PURE__ */ jsxs17("div", { className: "mh-color-picker flex flex-col gap-3", children: [
|
|
1136
|
-
/* @__PURE__ */ jsx19(HexColorPicker, { color, onChange }),
|
|
1140
|
+
alpha ? /* @__PURE__ */ jsx19(HexAlphaColorPicker, { color, onChange }) : /* @__PURE__ */ jsx19(HexColorPicker, { color, onChange }),
|
|
1137
1141
|
/* @__PURE__ */ jsxs17("div", { className: "flex items-center gap-2", children: [
|
|
1138
1142
|
/* @__PURE__ */ jsx19("span", { className: "text-sm text-muted-foreground", children: "#" }),
|
|
1139
1143
|
/* @__PURE__ */ jsx19(
|
|
@@ -1142,6 +1146,7 @@ function ColorPicker({
|
|
|
1142
1146
|
color,
|
|
1143
1147
|
onChange,
|
|
1144
1148
|
prefixed: false,
|
|
1149
|
+
alpha,
|
|
1145
1150
|
className: "flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm uppercase shadow-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
1146
1151
|
}
|
|
1147
1152
|
)
|