fds-vue-core 2.1.39 → 2.1.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.
- package/dist/fds-vue-core.cjs.js +33 -29
- package/dist/fds-vue-core.cjs.js.map +1 -1
- package/dist/fds-vue-core.css +1 -1
- package/dist/fds-vue-core.es.js +33 -29
- package/dist/fds-vue-core.es.js.map +1 -1
- package/package.json +1 -1
- package/src/assets/icons.ts +4 -4
- package/src/components/Blocks/FdsBlockAlert/FdsBlockAlert.vue +9 -7
- package/src/components/Form/FdsInput/FdsInput.vue +2 -2
- package/src/components/Form/FdsSelect/FdsSelect.vue +9 -10
package/dist/fds-vue-core.cjs.js
CHANGED
|
@@ -393,13 +393,13 @@ const icons = {
|
|
|
393
393
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M12 2.5002C12.3316 2.49979 12.6474 2.64223 12.8665 2.89111L17.7834 8.48008C18.1066 8.86527 18.0632 9.43804 17.6857 9.77013C17.3081 10.1022 16.7345 10.0722 16.3937 9.70242L12.0942 4.81507C12.0704 4.78793 12.0361 4.77237 12 4.77237C11.9639 4.77237 11.9296 4.78793 11.9058 4.81507L7.6063 9.70242C7.26552 10.0722 6.6919 10.1022 6.31433 9.77013C5.93676 9.43804 5.89336 8.86527 6.21658 8.48008L11.132 2.89311C11.3515 2.64363 11.6677 2.50052 12 2.5002Z" />
|
|
394
394
|
</svg>`,
|
|
395
395
|
ascending: () => `
|
|
396
|
-
<svg width="24" height="24"
|
|
397
|
-
<path fill-rule="evenodd"
|
|
396
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewbox="0 0 24 24">
|
|
397
|
+
<path fill-rule="evenodd" d="M12 15.75c-.332 0-.647-.142-.867-.39L6.217 9.77a.926.926 0 0 1 1.39-1.222l4.299 4.888a.125.125 0 0 0 .188 0l4.3-4.888a.926.926 0 0 1 1.39 1.223l-4.916 5.587c-.22.25-.536.392-.868.393Z" clip-rule="evenodd"/>
|
|
398
398
|
</svg>
|
|
399
399
|
`,
|
|
400
400
|
descending: () => `
|
|
401
|
-
<svg width="24" height="24"
|
|
402
|
-
<path fill-rule="evenodd"
|
|
401
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewbox="0 0 24 24">
|
|
402
|
+
<path fill-rule="evenodd" d="M12 8.25c.332 0 .647.141.867.39l4.916 5.59a.926.926 0 0 1-1.39 1.222l-4.299-4.888a.125.125 0 0 0-.188 0l-4.3 4.888a.926.926 0 0 1-1.39-1.223l4.916-5.587c.22-.25.536-.392.868-.393Z" clip-rule="evenodd"/>
|
|
403
403
|
</svg>
|
|
404
404
|
`,
|
|
405
405
|
switchUser: () => `
|
|
@@ -633,9 +633,11 @@ const _sfc_main$v = /* @__PURE__ */ vue.defineComponent({
|
|
|
633
633
|
}
|
|
634
634
|
});
|
|
635
635
|
const _hoisted_1$o = ["id"];
|
|
636
|
-
const _hoisted_2$j = { class: "flex items-
|
|
637
|
-
const _hoisted_3$b = { class: "
|
|
638
|
-
const _hoisted_4$a = {
|
|
636
|
+
const _hoisted_2$j = { class: "flex items-start gap-2" };
|
|
637
|
+
const _hoisted_3$b = { class: "h-7 flex items-center" };
|
|
638
|
+
const _hoisted_4$a = { class: "leading-7" };
|
|
639
|
+
const _hoisted_5$9 = { class: "relative h-7" };
|
|
640
|
+
const _hoisted_6$6 = {
|
|
639
641
|
key: 1,
|
|
640
642
|
class: "fds-block-alert-slot mb-0-last-child"
|
|
641
643
|
};
|
|
@@ -694,27 +696,29 @@ const _sfc_main$u = /* @__PURE__ */ vue.defineComponent({
|
|
|
694
696
|
vue.createElementVNode("div", null, [
|
|
695
697
|
__props.label ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
696
698
|
key: 0,
|
|
697
|
-
class: vue.normalizeClass(["font-bold w-full justify-between items-
|
|
699
|
+
class: vue.normalizeClass(["font-bold w-full justify-between items-start flex gap-2", { "mb-4": (isExpanded.value || !__props.collapsable) && vue.unref(hasSlot) }])
|
|
698
700
|
}, [
|
|
699
701
|
vue.createElementVNode("div", _hoisted_2$j, [
|
|
700
|
-
vue.
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
702
|
+
vue.createElementVNode("div", _hoisted_3$b, [
|
|
703
|
+
vue.createVNode(_sfc_main$w, {
|
|
704
|
+
name: "alert",
|
|
705
|
+
size: 24,
|
|
706
|
+
class: "fill-yellow-700"
|
|
707
|
+
})
|
|
708
|
+
]),
|
|
709
|
+
vue.createElementVNode("span", _hoisted_4$a, vue.toDisplayString(__props.label), 1)
|
|
706
710
|
]),
|
|
707
|
-
vue.createElementVNode("div",
|
|
711
|
+
vue.createElementVNode("div", _hoisted_5$9, [
|
|
708
712
|
__props.closeable ? (vue.openBlock(), vue.createBlock(_sfc_main$v, vue.mergeProps({
|
|
709
713
|
key: 0,
|
|
710
714
|
icon: "cross",
|
|
711
|
-
size:
|
|
715
|
+
size: 28,
|
|
712
716
|
onClick: handleClose
|
|
713
717
|
}, { "aria-label": closeLabel.value }, { class: ["fill-gray-900! hover:bg-gray-100 active:bg-gray-200"] }), null, 16)) : vue.createCommentVNode("", true),
|
|
714
718
|
__props.collapsable ? (vue.openBlock(), vue.createBlock(_sfc_main$v, vue.mergeProps({
|
|
715
719
|
key: 1,
|
|
716
720
|
icon: "arrowDown",
|
|
717
|
-
size:
|
|
721
|
+
size: 28,
|
|
718
722
|
onClick: handleToggle
|
|
719
723
|
}, { "aria-label": isExpanded.value ? collapseLabel.value : expandLabel.value }, {
|
|
720
724
|
class: [
|
|
@@ -725,7 +729,7 @@ const _sfc_main$u = /* @__PURE__ */ vue.defineComponent({
|
|
|
725
729
|
}), null, 16, ["class"])) : vue.createCommentVNode("", true)
|
|
726
730
|
])
|
|
727
731
|
], 2)) : vue.createCommentVNode("", true),
|
|
728
|
-
isExpanded.value || !__props.collapsable ? (vue.openBlock(), vue.createElementBlock("div",
|
|
732
|
+
isExpanded.value || !__props.collapsable ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6$6, [
|
|
729
733
|
vue.renderSlot(_ctx.$slots, "default")
|
|
730
734
|
])) : vue.createCommentVNode("", true)
|
|
731
735
|
])
|
|
@@ -7845,8 +7849,8 @@ const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
|
|
|
7845
7849
|
};
|
|
7846
7850
|
});
|
|
7847
7851
|
const clearButtonLabel = vue.computed(() => props.locale === "sv" ? "Rensa input" : "Clear input");
|
|
7848
|
-
const passwordButtonShowLabel = vue.computed(() => props.locale === "sv" ? "Visa
|
|
7849
|
-
const passwordButtonHideLabel = vue.computed(() => props.locale === "sv" ? "Dölj
|
|
7852
|
+
const passwordButtonShowLabel = vue.computed(() => props.locale === "sv" ? "Visa" : "Show");
|
|
7853
|
+
const passwordButtonHideLabel = vue.computed(() => props.locale === "sv" ? "Dölj" : "Hide");
|
|
7850
7854
|
const showInvalidMessage = vue.computed(() => props.valid === false && !props.optional && props.invalidMessage);
|
|
7851
7855
|
const isInvalid = vue.computed(() => props.valid === false && !props.optional && !disabled.value);
|
|
7852
7856
|
const isValid = vue.computed(() => props.valid === true);
|
|
@@ -10116,7 +10120,7 @@ const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
|
|
|
10116
10120
|
const modelValue = vue.useModel(__props, "modelValue");
|
|
10117
10121
|
const props = __props;
|
|
10118
10122
|
const emit = __emit;
|
|
10119
|
-
const { id, placeholder, attrs } = useAttrsWithDefaults(props);
|
|
10123
|
+
const { id, placeholder, attrs, disabled } = useAttrsWithDefaults(props);
|
|
10120
10124
|
const autoId = `fds-select-${Math.random().toString(36).slice(2, 9)}`;
|
|
10121
10125
|
const selectId = vue.computed(() => id.value && id.value.trim() !== "" ? id.value : autoId);
|
|
10122
10126
|
const labelAttrs = vue.computed(() => {
|
|
@@ -10139,7 +10143,7 @@ const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
|
|
|
10139
10143
|
return {
|
|
10140
10144
|
...filtered,
|
|
10141
10145
|
id: selectId.value,
|
|
10142
|
-
disabled:
|
|
10146
|
+
disabled: disabled.value,
|
|
10143
10147
|
"aria-invalid": props.valid === false ? "true" : void 0
|
|
10144
10148
|
};
|
|
10145
10149
|
});
|
|
@@ -10147,15 +10151,15 @@ const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
|
|
|
10147
10151
|
const hasDefaultSlot = vue.computed(() => !!slots.default);
|
|
10148
10152
|
const externalClass = vue.computed(() => attrs.class);
|
|
10149
10153
|
const showInvalidMessage = vue.computed(
|
|
10150
|
-
() => props.valid === false && !props.optional && props.invalidMessage && !
|
|
10154
|
+
() => props.valid === false && !props.optional && props.invalidMessage && !disabled.value
|
|
10151
10155
|
);
|
|
10152
|
-
const isInvalid = vue.computed(() => props.valid === false && !props.optional && !
|
|
10156
|
+
const isInvalid = vue.computed(() => props.valid === false && !props.optional && !disabled.value);
|
|
10153
10157
|
const selectClasses = vue.computed(() => [
|
|
10154
10158
|
"block w-full rounded-md border border-gray-500 px-3 py-2 pr-10 h-12",
|
|
10155
10159
|
"focus:outline-2 focus:outline-blue-500 focus:border-transparent",
|
|
10156
10160
|
"appearance-none",
|
|
10157
|
-
|
|
10158
|
-
isInvalid.value && !
|
|
10161
|
+
disabled.value ? "outline-dashed text-gray-600 outline-2 -outline-offset-2 outline-gray-400 cursor-not-allowed border-transparent" : "bg-white cursor-pointer",
|
|
10162
|
+
isInvalid.value && !disabled.value && "outline-2 -outline-offset-2 outline-red-600 text-red-600"
|
|
10159
10163
|
]);
|
|
10160
10164
|
const internalValue = vue.computed({
|
|
10161
10165
|
get: () => modelValue.value !== void 0 ? modelValue.value : props.value ?? "",
|
|
@@ -10204,9 +10208,9 @@ const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
|
|
|
10204
10208
|
name: "arrowDown",
|
|
10205
10209
|
size: 24,
|
|
10206
10210
|
class: vue.normalizeClass({
|
|
10207
|
-
"fill-gray-500":
|
|
10208
|
-
"fill-red-500": isInvalid.value && !
|
|
10209
|
-
"fill-blue-500": !
|
|
10211
|
+
"fill-gray-500": vue.unref(disabled),
|
|
10212
|
+
"fill-red-500": isInvalid.value && !vue.unref(disabled),
|
|
10213
|
+
"fill-blue-500": !vue.unref(disabled) && !isInvalid.value
|
|
10210
10214
|
})
|
|
10211
10215
|
}, null, 8, ["class"])
|
|
10212
10216
|
])
|