@stsdti/funky-ui-kit 1.0.0 → 1.0.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.
- package/dist/funky-ui-kit.css +1 -1
- package/dist/funky-ui-kit.es.js +46 -12
- package/dist/funky-ui-kit.es.js.map +1 -1
- package/package.json +1 -1
package/dist/funky-ui-kit.es.js
CHANGED
|
@@ -23527,34 +23527,68 @@ const _sfc_main$1d = {
|
|
|
23527
23527
|
};
|
|
23528
23528
|
const _hoisted_1$S = {
|
|
23529
23529
|
key: 0,
|
|
23530
|
-
class: "
|
|
23530
|
+
class: "app-link__label"
|
|
23531
23531
|
};
|
|
23532
23532
|
const _sfc_main$1c = {
|
|
23533
23533
|
__name: "AppLink",
|
|
23534
23534
|
props: {
|
|
23535
23535
|
route: {
|
|
23536
|
+
type: [String, Object],
|
|
23537
|
+
default: null
|
|
23538
|
+
},
|
|
23539
|
+
href: {
|
|
23540
|
+
type: String,
|
|
23536
23541
|
default: null
|
|
23537
23542
|
},
|
|
23538
23543
|
label: {
|
|
23544
|
+
type: String,
|
|
23539
23545
|
default: null
|
|
23540
23546
|
}
|
|
23541
23547
|
},
|
|
23542
23548
|
setup(__props) {
|
|
23549
|
+
const props2 = __props;
|
|
23550
|
+
const isExternalUrl = (value) => {
|
|
23551
|
+
if (!value || typeof value !== "string") {
|
|
23552
|
+
return false;
|
|
23553
|
+
}
|
|
23554
|
+
return /^(http?:)?\/\//.test(value);
|
|
23555
|
+
};
|
|
23556
|
+
const externalLink = computed(() => {
|
|
23557
|
+
if (props2.href) {
|
|
23558
|
+
return props2.href;
|
|
23559
|
+
}
|
|
23560
|
+
if (typeof props2.route === "string" && isExternalUrl(props2.route)) {
|
|
23561
|
+
return props2.route;
|
|
23562
|
+
}
|
|
23563
|
+
return null;
|
|
23564
|
+
});
|
|
23565
|
+
const isExternal = computed(() => !!externalLink.value);
|
|
23566
|
+
const hasLink = computed(() => !!props2.route || !!props2.href);
|
|
23567
|
+
const componentType = computed(() => {
|
|
23568
|
+
return isExternal.value ? "a" : "router-link";
|
|
23569
|
+
});
|
|
23570
|
+
const linkBindings = computed(() => {
|
|
23571
|
+
if (isExternal.value) {
|
|
23572
|
+
return {
|
|
23573
|
+
href: externalLink.value,
|
|
23574
|
+
target: "_blank",
|
|
23575
|
+
rel: "noopener noreferrer"
|
|
23576
|
+
};
|
|
23577
|
+
}
|
|
23578
|
+
return {
|
|
23579
|
+
to: props2.route
|
|
23580
|
+
};
|
|
23581
|
+
});
|
|
23543
23582
|
return (_ctx, _cache2) => {
|
|
23544
|
-
|
|
23545
|
-
return __props.route ? (openBlock(), createBlock(_component_router_link, {
|
|
23546
|
-
key: 0,
|
|
23547
|
-
class: "app-link flex-center-vertical",
|
|
23548
|
-
to: __props.route
|
|
23549
|
-
}, {
|
|
23583
|
+
return hasLink.value ? (openBlock(), createBlock(resolveDynamicComponent(componentType.value), mergeProps({ key: 0 }, linkBindings.value, { class: "app-link" }), {
|
|
23550
23584
|
default: withCtx(() => [
|
|
23551
23585
|
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
23552
|
-
__props.label ? (openBlock(), createElementBlock("
|
|
23553
|
-
_cache2[0] || (_cache2[0] = createElementVNode("i", { class: "icon-link" }, null, -1))
|
|
23586
|
+
__props.label ? (openBlock(), createElementBlock("span", _hoisted_1$S, toDisplayString(__props.label), 1)) : createCommentVNode("", true),
|
|
23587
|
+
_cache2[0] || (_cache2[0] = createElementVNode("i", { class: "icon-link app-link__icon" }, null, -1))
|
|
23554
23588
|
])
|
|
23555
23589
|
]),
|
|
23556
23590
|
_: 3
|
|
23557
|
-
},
|
|
23591
|
+
}, 16)) : createCommentVNode("", true);
|
|
23558
23592
|
};
|
|
23559
23593
|
}
|
|
23560
23594
|
};
|
|
@@ -84115,8 +84149,8 @@ function useFormValidation(config) {
|
|
|
84115
84149
|
element == null ? void 0 : element.scrollIntoView({ behavior: "smooth" });
|
|
84116
84150
|
};
|
|
84117
84151
|
const isFieldRequired2 = (fieldName) => {
|
|
84118
|
-
var _a3;
|
|
84119
|
-
const fieldSchema = (_a3 = toValue$2(schema).fields) == null ? void 0 :
|
|
84152
|
+
var _a3, _b2;
|
|
84153
|
+
const fieldSchema = (_b2 = (_a3 = toValue$2(schema)) == null ? void 0 : _a3.fields) == null ? void 0 : _b2[fieldName];
|
|
84120
84154
|
return (fieldSchema == null ? void 0 : fieldSchema.spec.optional) === false;
|
|
84121
84155
|
};
|
|
84122
84156
|
const externalContext = {
|