@dpa-id-components/dpa-shared-components 14.1.0 → 14.1.1
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.
|
@@ -8185,27 +8185,29 @@ const ys = /* @__PURE__ */ Qa(Wf, [["render", jf]]), Qf = ["data-testid"], Gf =
|
|
|
8185
8185
|
},
|
|
8186
8186
|
emits: ["click"],
|
|
8187
8187
|
setup(e, { emit: t }) {
|
|
8188
|
-
const n = t, r = e, a = F(
|
|
8189
|
-
|
|
8188
|
+
const n = t, r = e, a = F(
|
|
8189
|
+
() => typeof r.to == "string" ? "a" : r.to ? "RouterLink" : "button"
|
|
8190
|
+
), o = F(() => {
|
|
8191
|
+
const i = r.rounded ? "rounded-full" : "rounded-none";
|
|
8190
8192
|
switch (r.disabled ? "disabled" : r.color) {
|
|
8191
8193
|
case "blue":
|
|
8192
|
-
return `${
|
|
8194
|
+
return `${i} text-white bg-blue-default hover:bg-blue-dark`;
|
|
8193
8195
|
case "primary-green":
|
|
8194
|
-
return `${
|
|
8196
|
+
return `${i} text-white bg-green-primary hover:bg-night-green`;
|
|
8195
8197
|
case "transparent":
|
|
8196
|
-
return `${
|
|
8198
|
+
return `${i} text-blue-default bg-transparent border-[1px] border-gray-300 hover:text-blue-dark hover:border-gray-700`;
|
|
8197
8199
|
case "white":
|
|
8198
|
-
return `${
|
|
8200
|
+
return `${i} text-blue-default bg-white border-[1px] border-gray-300 hover:text-blue-dark hover:border-gray-700`;
|
|
8199
8201
|
case "gray":
|
|
8200
|
-
return `${
|
|
8202
|
+
return `${i} text-white bg-gray-700 hover:bg-gray-800`;
|
|
8201
8203
|
case "light-gray":
|
|
8202
|
-
return `${
|
|
8204
|
+
return `${i} text-gray-800 bg-gray-100`;
|
|
8203
8205
|
case "disabled":
|
|
8204
|
-
return r.disabledVariant === "primary" ? `${
|
|
8206
|
+
return r.disabledVariant === "primary" ? `${i} text-gray-400 bg-gray-100 cursor-not-allowed` : `${i} text-gray-400 bg-white cursor-not-allowed border border-gray-400`;
|
|
8205
8207
|
default:
|
|
8206
|
-
return `${
|
|
8208
|
+
return `${i} text-white bg-blue-default hover:bg-blue-dark`;
|
|
8207
8209
|
}
|
|
8208
|
-
}),
|
|
8210
|
+
}), s = F(() => {
|
|
8209
8211
|
switch (r.size) {
|
|
8210
8212
|
case "xs":
|
|
8211
8213
|
return "h-6 text-xs";
|
|
@@ -8218,30 +8220,31 @@ const ys = /* @__PURE__ */ Qa(Wf, [["render", jf]]), Qf = ["data-testid"], Gf =
|
|
|
8218
8220
|
default:
|
|
8219
8221
|
return "h-10 text-base";
|
|
8220
8222
|
}
|
|
8221
|
-
}),
|
|
8222
|
-
return (
|
|
8223
|
+
}), l = F(() => r.size === "xs" ? "xs" : r.size === "small" ? "small" : "medium");
|
|
8224
|
+
return (i, u) => (P(), xe(tn(a.value), {
|
|
8223
8225
|
class: oe(["UiButton focus-visible:outline-blue inline-flex items-center whitespace-nowrap font-medium leading-normal focus:outline-none", {
|
|
8224
|
-
"px-4":
|
|
8225
|
-
"px-2":
|
|
8226
|
-
[
|
|
8227
|
-
[
|
|
8226
|
+
"px-4": i.size !== "xs",
|
|
8227
|
+
"px-2": i.size === "xs",
|
|
8228
|
+
[o.value]: !0,
|
|
8229
|
+
[s.value]: !0
|
|
8228
8230
|
}]),
|
|
8229
|
-
to:
|
|
8230
|
-
|
|
8231
|
-
|
|
8232
|
-
|
|
8231
|
+
to: a.value === "RouterLink" ? i.to : void 0,
|
|
8232
|
+
href: a.value === "a" ? i.to : void 0,
|
|
8233
|
+
type: a.value === "button" ? "button" : void 0,
|
|
8234
|
+
disabled: a.value === "button" ? i.disabled : void 0,
|
|
8235
|
+
onClick: u[0] || (u[0] = (c) => n("click"))
|
|
8233
8236
|
}, {
|
|
8234
8237
|
default: Te(() => [
|
|
8235
|
-
|
|
8238
|
+
i.iconName ? (P(), xe(wt, {
|
|
8236
8239
|
key: 0,
|
|
8237
|
-
name:
|
|
8238
|
-
size:
|
|
8240
|
+
name: i.iconName,
|
|
8241
|
+
size: l.value,
|
|
8239
8242
|
class: "mr-2"
|
|
8240
8243
|
}, null, 8, ["name", "size"])) : j("", !0),
|
|
8241
|
-
se(
|
|
8244
|
+
se(i.$slots, "default")
|
|
8242
8245
|
]),
|
|
8243
8246
|
_: 3
|
|
8244
|
-
}, 8, ["class", "to", "type", "disabled"]));
|
|
8247
|
+
}, 8, ["class", "to", "href", "type", "disabled"]));
|
|
8245
8248
|
}
|
|
8246
8249
|
}), ap = {}, op = { class: "flex [&>*:first-child]:rounded-l-full [&>*:last-child]:rounded-r-full [&>*:last-child]:border-r [&>*]:border [&>*]:border-r-0 [&>*]:border-gray-300" };
|
|
8247
8250
|
function sp(e, t) {
|