@comercti/react-components-hmg 0.23.15 → 0.23.17
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/comerc-style-guide.cjs.js +1 -1
- package/comerc-style-guide.es.js +7 -5
- package/comerc-style-guide.umd.js +1 -1
- package/index.d.ts +8 -0
- package/package.json +1 -1
package/comerc-style-guide.es.js
CHANGED
|
@@ -8345,8 +8345,8 @@ const wu = /* @__PURE__ */ X({
|
|
|
8345
8345
|
zt(() => {
|
|
8346
8346
|
e.allOpen ? a.value = e.items.map(() => !0) : e.openTheFirst ? a.value = e.items.map((m, g) => g === 0) : a.value = e.items.map(() => !1), e.closeCollapse && (a.value[e.closeCollapse] = !1);
|
|
8347
8347
|
});
|
|
8348
|
-
const o = (m) => {
|
|
8349
|
-
a.value[m] = !a.value[m], n.value.some((
|
|
8348
|
+
const o = (m, g) => {
|
|
8349
|
+
a.value[m] = !a.value[m], n.value.some((h) => h.index === m) ? n.value = n.value.filter((h) => h.index !== m) : n.value.push({ index: m, value: a.value[m], item: g }), t("toggle-collapse", n.value);
|
|
8350
8350
|
}, l = (m) => a.value[m], u = U(() => {
|
|
8351
8351
|
if (e.variant === "accordion" && e.direction === "column")
|
|
8352
8352
|
return "flex flex-col";
|
|
@@ -8378,7 +8378,7 @@ const wu = /* @__PURE__ */ X({
|
|
|
8378
8378
|
},
|
|
8379
8379
|
containerClasses: u
|
|
8380
8380
|
};
|
|
8381
|
-
}, d2 = { class: "flex gap-2 items-center p-4 text-left focus:outline-none justify-between" }, u2 = ["onClick"], c2 = {
|
|
8381
|
+
}, d2 = { class: "flex gap-2 items-center p-4 text-left focus:outline-none justify-between" }, u2 = ["onClick", "disabled"], c2 = {
|
|
8382
8382
|
key: 0,
|
|
8383
8383
|
class: "py-1"
|
|
8384
8384
|
}, f2 = /* @__PURE__ */ X({
|
|
@@ -8389,7 +8389,8 @@ const wu = /* @__PURE__ */ X({
|
|
|
8389
8389
|
allOpen: { type: Boolean, default: !1 },
|
|
8390
8390
|
variant: { default: "accordion" },
|
|
8391
8391
|
direction: { default: "row" },
|
|
8392
|
-
closeCollapse: { default: null }
|
|
8392
|
+
closeCollapse: { default: null },
|
|
8393
|
+
disabled: { default: () => ({ field: "", value: "" }) }
|
|
8393
8394
|
},
|
|
8394
8395
|
emits: ["toggle-collapse"],
|
|
8395
8396
|
setup(e, { emit: t }) {
|
|
@@ -8410,7 +8411,8 @@ const wu = /* @__PURE__ */ X({
|
|
|
8410
8411
|
s("div", d2, [
|
|
8411
8412
|
N(g.$slots, "header", { item: k }),
|
|
8412
8413
|
s("button", {
|
|
8413
|
-
onClick: (y) => r(l)(v),
|
|
8414
|
+
onClick: (y) => r(l)(v, k),
|
|
8415
|
+
disabled: k[e.disabled.field] === e.disabled.value,
|
|
8414
8416
|
class: "text-left focus:outline-none",
|
|
8415
8417
|
type: "button"
|
|
8416
8418
|
}, [
|