@konstructio/ui 0.1.2-alpha.40 → 0.1.2-alpha.41
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.
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "../Item/Item.js";
|
|
2
|
-
import { List as
|
|
2
|
+
import { List as N } from "../List/List.js";
|
|
3
3
|
import { jsxs as m, jsx as e } from "react/jsx-runtime";
|
|
4
4
|
import * as c from "react";
|
|
5
|
-
import { forwardRef as
|
|
5
|
+
import { forwardRef as S, useId as b, useImperativeHandle as C } from "react";
|
|
6
6
|
import { S as O } from "../../../../loader-juvMSJ9L.js";
|
|
7
7
|
import { cn as t } from "../../../../utils/index.js";
|
|
8
8
|
import { useMultiSelectDropdown as k } from "../../hooks/useMultiSelectDropdown.js";
|
|
@@ -10,16 +10,16 @@ import { labelVariants as D, multiSelectDropdownVariants as M, wrapperVariants a
|
|
|
10
10
|
import { C as y } from "../../../../chevron-up-CRyLc5Ml.js";
|
|
11
11
|
import { useMultiSelectDropdown as I } from "../../contexts/MultiSelectDropdown.hook.js";
|
|
12
12
|
import { Tag as V } from "../../../Tag/Tag.js";
|
|
13
|
-
const j = (r) => /* @__PURE__ */ c.createElement("svg", { width: 9, height: 9, viewBox: "0 0 9 9", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...r }, /* @__PURE__ */ c.createElement("path", { d: "M8.16667 0.8225L7.34417 0L4.08333 3.26083L0.8225 0L0 0.8225L3.26083 4.08333L0 7.34417L0.8225 8.16667L4.08333 4.90583L7.34417 8.16667L8.16667 7.34417L4.90583 4.08333L8.16667 0.8225Z", fill: "#364153" })), E =
|
|
13
|
+
const j = (r) => /* @__PURE__ */ c.createElement("svg", { width: 9, height: 9, viewBox: "0 0 9 9", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...r }, /* @__PURE__ */ c.createElement("path", { d: "M8.16667 0.8225L7.34417 0L4.08333 3.26083L0.8225 0L0 0.8225L3.26083 4.08333L0 7.34417L0.8225 8.16667L4.08333 4.90583L7.34417 8.16667L8.16667 7.34417L4.90583 4.08333L8.16667 0.8225Z", fill: "#364153" })), E = S(
|
|
14
14
|
({ label: r, labelClassName: p, name: l, placeholder: d = "", theme: h, wrapperClassName: f }, u) => {
|
|
15
|
-
const o =
|
|
15
|
+
const o = b(), {
|
|
16
16
|
selectedOptions: n,
|
|
17
17
|
isOpen: s,
|
|
18
18
|
onOpen: w,
|
|
19
19
|
onRemoveOption: L,
|
|
20
20
|
inputRef: i,
|
|
21
21
|
isLoading: g
|
|
22
|
-
} = I(), { wrapperRef: x, handleOpen:
|
|
22
|
+
} = I(), { wrapperRef: x, handleOpen: v } = k();
|
|
23
23
|
return C(u, () => i.current, [i]), /* @__PURE__ */ m(
|
|
24
24
|
"div",
|
|
25
25
|
{
|
|
@@ -50,14 +50,14 @@ const j = (r) => /* @__PURE__ */ c.createElement("svg", { width: 9, height: 9, v
|
|
|
50
50
|
id: l ?? o,
|
|
51
51
|
className: t(M()),
|
|
52
52
|
role: "combobox",
|
|
53
|
-
onClick:
|
|
53
|
+
onClick: v,
|
|
54
54
|
"aria-expanded": s,
|
|
55
55
|
children: [
|
|
56
56
|
n.length === 0 ? /* @__PURE__ */ e("span", { className: "text-base text-inherit select-none", children: d }) : /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-2", children: n.map((a) => /* @__PURE__ */ e(
|
|
57
57
|
V,
|
|
58
58
|
{
|
|
59
59
|
id: a.id,
|
|
60
|
-
label: a.
|
|
60
|
+
label: a.value || a.tagLabel || "",
|
|
61
61
|
color: a.tagColor || "gray-800",
|
|
62
62
|
className: "select-none gap-2",
|
|
63
63
|
rightIcon: /* @__PURE__ */ e(
|
|
@@ -93,7 +93,7 @@ const j = (r) => /* @__PURE__ */ c.createElement("svg", { width: 9, height: 9, v
|
|
|
93
93
|
readOnly: !0
|
|
94
94
|
}
|
|
95
95
|
),
|
|
96
|
-
s ? /* @__PURE__ */ e(
|
|
96
|
+
s ? /* @__PURE__ */ e(N, {}) : null
|
|
97
97
|
]
|
|
98
98
|
}
|
|
99
99
|
);
|
package/dist/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@konstructio/ui",
|
|
3
3
|
"description": "A set of reusable and customizable React components built for konstruct.io",
|
|
4
4
|
"private": false,
|
|
5
|
-
"version": "0.1.2-alpha.
|
|
5
|
+
"version": "0.1.2-alpha.40",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"main": "dist/index.js",
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@konstructio/ui",
|
|
3
3
|
"description": "A set of reusable and customizable React components built for konstruct.io",
|
|
4
4
|
"private": false,
|
|
5
|
-
"version": "0.1.2-alpha.
|
|
5
|
+
"version": "0.1.2-alpha.41",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"main": "dist/index.js",
|