fds-vue-core 2.0.2 → 2.0.4
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/components/Blocks/FdsAlertBlock/FdsAlertBlock.vue.d.ts +1 -1
- package/dist/components/Buttons/{FdsButton/types.d.ts → ButtonBaseProps.d.ts} +4 -5
- package/dist/components/Buttons/ButtonBaseProps.d.ts.map +1 -0
- package/dist/components/Buttons/FdsButtonCopy/FdsButtonCopy.stories.d.ts +7 -0
- package/dist/components/Buttons/FdsButtonCopy/FdsButtonCopy.stories.d.ts.map +1 -0
- package/dist/components/Buttons/{FdsCopyButton/FdsCopyButton.vue.d.ts → FdsButtonCopy/FdsButtonCopy.vue.d.ts} +1 -1
- package/dist/components/Buttons/FdsButtonCopy/FdsButtonCopy.vue.d.ts.map +1 -0
- package/dist/components/Buttons/{FdsCopyButton → FdsButtonCopy}/types.d.ts +0 -1
- package/dist/components/Buttons/FdsButtonCopy/types.d.ts.map +1 -0
- package/dist/components/Buttons/FdsButtonIcon/FdsButtonIcon.stories.d.ts +7 -0
- package/dist/components/Buttons/FdsButtonIcon/FdsButtonIcon.stories.d.ts.map +1 -0
- package/dist/components/Buttons/{FdsIconButton/FdsIconButton.vue.d.ts → FdsButtonIcon/FdsButtonIcon.vue.d.ts} +1 -1
- package/dist/components/Buttons/FdsButtonIcon/FdsButtonIcon.vue.d.ts.map +1 -0
- package/dist/components/Buttons/{FdsIconButton → FdsButtonIcon}/types.d.ts +1 -2
- package/dist/components/Buttons/FdsButtonIcon/types.d.ts.map +1 -0
- package/dist/components/Buttons/FdsButtonMinor/FdsButtonMinor.stories.d.ts +7 -0
- package/dist/components/Buttons/FdsButtonMinor/FdsButtonMinor.stories.d.ts.map +1 -0
- package/dist/components/Buttons/FdsButtonMinor/FdsButtonMinor.vue.d.ts +23 -0
- package/dist/components/Buttons/FdsButtonMinor/FdsButtonMinor.vue.d.ts.map +1 -0
- package/dist/components/Buttons/FdsButtonPrimary/FdsButtonPrimary.stories.d.ts +9 -0
- package/dist/components/Buttons/FdsButtonPrimary/FdsButtonPrimary.stories.d.ts.map +1 -0
- package/dist/components/Buttons/FdsButtonPrimary/FdsButtonPrimary.vue.d.ts +20 -0
- package/dist/components/Buttons/FdsButtonPrimary/FdsButtonPrimary.vue.d.ts.map +1 -0
- package/dist/components/Buttons/FdsButtonSecondary/FdsButtonSecondary.stories.d.ts +7 -0
- package/dist/components/Buttons/FdsButtonSecondary/FdsButtonSecondary.stories.d.ts.map +1 -0
- package/dist/components/Buttons/FdsButtonSecondary/FdsButtonSecondary.vue.d.ts +20 -0
- package/dist/components/Buttons/FdsButtonSecondary/FdsButtonSecondary.vue.d.ts.map +1 -0
- package/dist/components/FdsModal/FdsModal.stories.d.ts.map +1 -1
- package/dist/components/FdsTreeView/TreeNode.vue.d.ts.map +1 -1
- package/dist/components/FdsTruncatedText/FdsTruncatedText.vue.d.ts.map +1 -1
- package/dist/components/Form/FdsInput/FdsInput.vue.d.ts.map +1 -1
- package/dist/components/Tabs/FdsTabs/FdsTabs.vue.d.ts +1 -1
- package/dist/fds-vue-core.cjs.js +495 -308
- package/dist/fds-vue-core.cjs.js.map +1 -1
- package/dist/fds-vue-core.css +40 -18
- package/dist/fds-vue-core.es.js +496 -309
- package/dist/fds-vue-core.es.js.map +1 -1
- package/dist/index.d.ts +10 -6
- package/dist/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/components/Buttons/FdsButton/FdsButton.stories.d.ts +0 -14
- package/dist/components/Buttons/FdsButton/FdsButton.stories.d.ts.map +0 -1
- package/dist/components/Buttons/FdsButton/FdsButton.vue.d.ts +0 -31
- package/dist/components/Buttons/FdsButton/FdsButton.vue.d.ts.map +0 -1
- package/dist/components/Buttons/FdsButton/types.d.ts.map +0 -1
- package/dist/components/Buttons/FdsCopyButton/FdsCopyButton.stories.d.ts +0 -9
- package/dist/components/Buttons/FdsCopyButton/FdsCopyButton.stories.d.ts.map +0 -1
- package/dist/components/Buttons/FdsCopyButton/FdsCopyButton.vue.d.ts.map +0 -1
- package/dist/components/Buttons/FdsCopyButton/types.d.ts.map +0 -1
- package/dist/components/Buttons/FdsIconButton/FdsIconButton.stories.d.ts +0 -9
- package/dist/components/Buttons/FdsIconButton/FdsIconButton.stories.d.ts.map +0 -1
- package/dist/components/Buttons/FdsIconButton/FdsIconButton.vue.d.ts.map +0 -1
- package/dist/components/Buttons/FdsIconButton/types.d.ts.map +0 -1
package/dist/fds-vue-core.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { reactive, ref, watch, computed, defineComponent, useSlots, nextTick, createElementBlock, openBlock, normalizeClass, withDirectives, createCommentVNode, createElementVNode, vModelCheckbox, renderSlot, normalizeStyle, createBlock, inject, resolveComponent, createVNode, unref, withCtx, Fragment, createTextVNode, toDisplayString, withModifiers, renderList, withKeys, watchEffect, resolveDynamicComponent, mergeProps, vModelDynamic, provide, vModelText, vModelSelect,
|
|
1
|
+
import { reactive, ref, watch, computed, defineComponent, useSlots, nextTick, createElementBlock, openBlock, normalizeClass, withDirectives, createCommentVNode, createElementVNode, vModelCheckbox, renderSlot, normalizeStyle, createBlock, inject, resolveComponent, createVNode, unref, withCtx, Fragment, createTextVNode, toDisplayString, Transition, withModifiers, renderList, withKeys, watchEffect, resolveDynamicComponent, mergeProps, vModelDynamic, provide, onMounted, vModelText, vModelSelect, vShow, onBeforeUnmount, Teleport } from "vue";
|
|
2
2
|
const getTitleFromProperties = (node, titleTemplate) => {
|
|
3
3
|
if (!titleTemplate) {
|
|
4
4
|
return node.title;
|
|
@@ -403,9 +403,9 @@ const useTreeState = (options = {}) => {
|
|
|
403
403
|
isEmptySearchResult
|
|
404
404
|
};
|
|
405
405
|
};
|
|
406
|
-
const _hoisted_1$
|
|
406
|
+
const _hoisted_1$n = ["id", "name", "value", "disabled", "required"];
|
|
407
407
|
const _hoisted_2$d = ["for"];
|
|
408
|
-
const _sfc_main$
|
|
408
|
+
const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
409
409
|
__name: "FdsCheckbox",
|
|
410
410
|
props: {
|
|
411
411
|
checked: { type: Boolean, default: false },
|
|
@@ -474,7 +474,7 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
474
474
|
checkboxClasses.value
|
|
475
475
|
]),
|
|
476
476
|
onChange: handleChange
|
|
477
|
-
}, null, 42, _hoisted_1$
|
|
477
|
+
}, null, 42, _hoisted_1$n), [
|
|
478
478
|
[vModelCheckbox, internalChecked.value]
|
|
479
479
|
]),
|
|
480
480
|
slots.default ? (openBlock(), createElementBlock("label", {
|
|
@@ -1000,8 +1000,8 @@ const icons = {
|
|
|
1000
1000
|
</defs>
|
|
1001
1001
|
</svg>`
|
|
1002
1002
|
};
|
|
1003
|
-
const _hoisted_1$
|
|
1004
|
-
const _sfc_main$
|
|
1003
|
+
const _hoisted_1$m = ["innerHTML"];
|
|
1004
|
+
const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
1005
1005
|
__name: "FdsIcon",
|
|
1006
1006
|
props: {
|
|
1007
1007
|
name: {},
|
|
@@ -1027,7 +1027,7 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
1027
1027
|
class: "inline-flex items-center justify-center align-middle",
|
|
1028
1028
|
style: normalizeStyle({ width: pixelSize.value, height: pixelSize.value }),
|
|
1029
1029
|
innerHTML: svgHtml.value
|
|
1030
|
-
}, null, 12, _hoisted_1$
|
|
1030
|
+
}, null, 12, _hoisted_1$m);
|
|
1031
1031
|
};
|
|
1032
1032
|
}
|
|
1033
1033
|
});
|
|
@@ -1038,10 +1038,10 @@ const _export_sfc = (sfc, props) => {
|
|
|
1038
1038
|
}
|
|
1039
1039
|
return target;
|
|
1040
1040
|
};
|
|
1041
|
-
const FdsIcon = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1042
|
-
const _hoisted_1$
|
|
1043
|
-
const _sfc_main$
|
|
1044
|
-
__name: "
|
|
1041
|
+
const FdsIcon = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["__scopeId", "data-v-e24163cd"]]);
|
|
1042
|
+
const _hoisted_1$l = ["id", "type", "disabled", "aria-label", "aria-disabled"];
|
|
1043
|
+
const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
1044
|
+
__name: "FdsButtonIcon",
|
|
1045
1045
|
props: {
|
|
1046
1046
|
icon: {},
|
|
1047
1047
|
size: { default: "24px" },
|
|
@@ -1087,11 +1087,11 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
1087
1087
|
name: "spinner",
|
|
1088
1088
|
class: "animate-spin"
|
|
1089
1089
|
}, null, 8, ["size"]))
|
|
1090
|
-
], 10, _hoisted_1$
|
|
1090
|
+
], 10, _hoisted_1$l);
|
|
1091
1091
|
};
|
|
1092
1092
|
}
|
|
1093
1093
|
});
|
|
1094
|
-
const _sfc_main$
|
|
1094
|
+
const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
1095
1095
|
__name: "FdsText",
|
|
1096
1096
|
props: {
|
|
1097
1097
|
type: { default: "default" }
|
|
@@ -1117,10 +1117,10 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
1117
1117
|
};
|
|
1118
1118
|
}
|
|
1119
1119
|
});
|
|
1120
|
-
const _hoisted_1$
|
|
1120
|
+
const _hoisted_1$k = { class: "block p-[2px] mb-2 last:mb-0 relative min-h-[28px]" };
|
|
1121
1121
|
const _hoisted_2$c = ["id", "name", "value", "checked", "disabled", "required"];
|
|
1122
1122
|
const _hoisted_3$b = ["for"];
|
|
1123
|
-
const _sfc_main$
|
|
1123
|
+
const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
1124
1124
|
__name: "FdsRadio",
|
|
1125
1125
|
props: {
|
|
1126
1126
|
checked: { type: Boolean, default: false },
|
|
@@ -1148,7 +1148,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
1148
1148
|
accentClass.value
|
|
1149
1149
|
]);
|
|
1150
1150
|
return (_ctx, _cache) => {
|
|
1151
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
1151
|
+
return openBlock(), createElementBlock("div", _hoisted_1$k, [
|
|
1152
1152
|
createElementVNode("input", {
|
|
1153
1153
|
id: inputId.value,
|
|
1154
1154
|
name: _ctx.name,
|
|
@@ -1175,17 +1175,22 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
1175
1175
|
};
|
|
1176
1176
|
}
|
|
1177
1177
|
});
|
|
1178
|
-
const _hoisted_1$
|
|
1178
|
+
const _hoisted_1$j = { class: "flex items-start" };
|
|
1179
1179
|
const _hoisted_2$b = ["innerHTML"];
|
|
1180
|
-
const _hoisted_3$a = {
|
|
1180
|
+
const _hoisted_3$a = {
|
|
1181
|
+
key: 1,
|
|
1182
|
+
style: { "line-height": "25px" }
|
|
1183
|
+
};
|
|
1181
1184
|
const _hoisted_4$8 = {
|
|
1182
1185
|
key: 2,
|
|
1183
1186
|
style: { "max-height": "28px" }
|
|
1184
1187
|
};
|
|
1185
|
-
const _hoisted_5$6 = {
|
|
1188
|
+
const _hoisted_5$6 = { class: "flex flex-col gap-2" };
|
|
1189
|
+
const _hoisted_6$5 = ["onClick"];
|
|
1190
|
+
const _hoisted_7$3 = { key: 0 };
|
|
1186
1191
|
const popoverWidth = 327;
|
|
1187
1192
|
const popoverHeight = 80;
|
|
1188
|
-
const _sfc_main$
|
|
1193
|
+
const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
1189
1194
|
...{
|
|
1190
1195
|
name: "TreeNode"
|
|
1191
1196
|
},
|
|
@@ -1297,13 +1302,13 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
1297
1302
|
firstRadio?.focus();
|
|
1298
1303
|
};
|
|
1299
1304
|
const closePopover = () => {
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1305
|
+
isOpen.value = false;
|
|
1306
|
+
};
|
|
1307
|
+
const onAfterPopoverLeave = () => {
|
|
1308
|
+
window.removeEventListener("scroll", computePopoverCoords, true);
|
|
1309
|
+
window.removeEventListener("resize", computePopoverCoords);
|
|
1310
|
+
document.removeEventListener("pointerdown", handleGlobalPointerDown);
|
|
1311
|
+
document.removeEventListener("keydown", handleGlobalKeydown);
|
|
1307
1312
|
};
|
|
1308
1313
|
const togglePopover = () => {
|
|
1309
1314
|
if (isOpen.value) closePopover();
|
|
@@ -1350,14 +1355,12 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
1350
1355
|
return "";
|
|
1351
1356
|
});
|
|
1352
1357
|
const handleOptionClick = (option) => {
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
isOpen.value = false;
|
|
1360
|
-
}, 300);
|
|
1358
|
+
if (option === "parent_and_children") {
|
|
1359
|
+
treeState?.selectNodeAndAllChildren(props.nodeId);
|
|
1360
|
+
} else if (option === "parent") {
|
|
1361
|
+
treeState?.deselectChildrenOnly(props.nodeId);
|
|
1362
|
+
}
|
|
1363
|
+
closePopover();
|
|
1361
1364
|
};
|
|
1362
1365
|
return (_ctx, _cache) => {
|
|
1363
1366
|
const _component_TreeNode = resolveComponent("TreeNode", true);
|
|
@@ -1368,30 +1371,30 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
1368
1371
|
style: normalizeStyle(indent.value),
|
|
1369
1372
|
class: normalizeClass("pt-2 pb-2")
|
|
1370
1373
|
}, [
|
|
1371
|
-
createElementVNode("div", _hoisted_1$
|
|
1372
|
-
hasChildrenNodes.value ? (openBlock(), createBlock(_sfc_main$
|
|
1374
|
+
createElementVNode("div", _hoisted_1$j, [
|
|
1375
|
+
hasChildrenNodes.value ? (openBlock(), createBlock(_sfc_main$r, {
|
|
1373
1376
|
key: 0,
|
|
1374
1377
|
onClick: _cache[0] || (_cache[0] = ($event) => unref(treeState)?.toggleExpandNode(props.nodeId)),
|
|
1375
1378
|
ariaLabel: childrenToggleAriaLabel(props.title),
|
|
1376
1379
|
icon: unref(treeState)?.getNodeIcon(props.nodeId, props.nodeExpandIcon, props.nodeCollapseIcon) ?? props.nodeExpandIcon,
|
|
1377
|
-
size: "
|
|
1380
|
+
size: "24px",
|
|
1378
1381
|
class: "fill-blue-500 mr-3"
|
|
1379
1382
|
}, null, 8, ["ariaLabel", "icon"])) : createCommentVNode("", true),
|
|
1380
1383
|
!hasChildrenNodes.value ? (openBlock(), createElementBlock("div", {
|
|
1381
1384
|
key: 1,
|
|
1382
1385
|
style: normalizeStyle({ minWidth: `${_ctx.indentation}px` })
|
|
1383
1386
|
}, null, 4)) : createCommentVNode("", true),
|
|
1384
|
-
createVNode(_sfc_main$
|
|
1387
|
+
createVNode(_sfc_main$t, {
|
|
1385
1388
|
id: `checkbox-${props.nodeId}`,
|
|
1386
1389
|
checked: unref(treeState)?.isNodeSelected(props.nodeId),
|
|
1387
1390
|
indeterminate: _ctx.showIndeterminate && (unref(treeState)?.isNodeIndeterminateById(props.nodeId) ?? false),
|
|
1388
1391
|
onChange: _cache[1] || (_cache[1] = ($event) => unref(treeState)?.toggleSelectNode(props.nodeId, props.title, props.data)),
|
|
1389
|
-
class: "pl-0 flex-1 flex items-
|
|
1392
|
+
class: "pl-0 flex-1 flex items-start"
|
|
1390
1393
|
}, {
|
|
1391
1394
|
default: withCtx(() => [
|
|
1392
1395
|
createElementVNode("div", null, [
|
|
1393
1396
|
_ctx.title ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
1394
|
-
_ctx.searchHighlighting && _ctx.searchEnabled && unref(treeState)?.searchTerm?.value && String(unref(treeState)?.searchTerm?.value || "").trim().length >= (unref(treeState)?.triggerLength ?? 1) ? (openBlock(), createBlock(_sfc_main$
|
|
1397
|
+
_ctx.searchHighlighting && _ctx.searchEnabled && unref(treeState)?.searchTerm?.value && String(unref(treeState)?.searchTerm?.value || "").trim().length >= (unref(treeState)?.triggerLength ?? 1) ? (openBlock(), createBlock(_sfc_main$q, {
|
|
1395
1398
|
key: 0,
|
|
1396
1399
|
type: "default"
|
|
1397
1400
|
}, {
|
|
@@ -1401,8 +1404,9 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
1401
1404
|
}, null, 8, _hoisted_2$b)
|
|
1402
1405
|
]),
|
|
1403
1406
|
_: 1
|
|
1404
|
-
})) : (openBlock(), createBlock(_sfc_main$
|
|
1407
|
+
})) : (openBlock(), createBlock(_sfc_main$q, {
|
|
1405
1408
|
key: 1,
|
|
1409
|
+
style: { "line-height": "25px" },
|
|
1406
1410
|
type: "default"
|
|
1407
1411
|
}, {
|
|
1408
1412
|
default: withCtx(() => [
|
|
@@ -1417,7 +1421,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
1417
1421
|
_: 1
|
|
1418
1422
|
}, 8, ["id", "checked", "indeterminate"]),
|
|
1419
1423
|
unref(treeState)?.isParentOrChildrenSelected(props.nodeId) && !(unref(treeState)?.isNodeIndeterminateById(props.nodeId) ?? false) ? (openBlock(), createElementBlock("div", _hoisted_4$8, [
|
|
1420
|
-
createVNode(_sfc_main$
|
|
1424
|
+
createVNode(_sfc_main$r, {
|
|
1421
1425
|
ref_key: "triggerRef",
|
|
1422
1426
|
ref: triggerRef,
|
|
1423
1427
|
icon: "more",
|
|
@@ -1425,66 +1429,84 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
1425
1429
|
onClick: togglePopover,
|
|
1426
1430
|
ariaLabel: `Fler val för ${_ctx.title}`
|
|
1427
1431
|
}, null, 8, ["ariaLabel"]),
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
class: "
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
}, [
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
},
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1432
|
+
createVNode(Transition, {
|
|
1433
|
+
"enter-active-class": "transition-opacity duration-200 ease-in-out",
|
|
1434
|
+
"enter-from-class": "opacity-0",
|
|
1435
|
+
"enter-to-class": "opacity-100",
|
|
1436
|
+
"leave-active-class": "transition-opacity duration-500 ease-in-out",
|
|
1437
|
+
"leave-from-class": "opacity-100",
|
|
1438
|
+
"leave-to-class": "opacity-0",
|
|
1439
|
+
onAfterLeave: onAfterPopoverLeave
|
|
1440
|
+
}, {
|
|
1441
|
+
default: withCtx(() => [
|
|
1442
|
+
isOpen.value ? (openBlock(), createElementBlock("div", {
|
|
1443
|
+
key: 0,
|
|
1444
|
+
class: "fixed z-9999",
|
|
1445
|
+
style: normalizeStyle({
|
|
1446
|
+
top: popoverCoords.top + "px",
|
|
1447
|
+
left: popoverCoords.right - popoverWidth - (popoverCoords.right - popoverCoords.left) + "px"
|
|
1448
|
+
})
|
|
1449
|
+
}, [
|
|
1450
|
+
createElementVNode("div", {
|
|
1451
|
+
ref_key: "popoverPanelRef",
|
|
1452
|
+
ref: popoverPanelRef,
|
|
1453
|
+
class: "bg-white rounded-md p-4 shadow-lg flex flex-row justify-between items-start gap-3",
|
|
1454
|
+
style: normalizeStyle({
|
|
1455
|
+
width: popoverWidth + "px",
|
|
1456
|
+
minHeight: popoverHeight + "px"
|
|
1457
|
+
}),
|
|
1458
|
+
onClick: _cache[3] || (_cache[3] = withModifiers(() => {
|
|
1459
|
+
}, ["stop"])),
|
|
1460
|
+
onFocusout: onPanelFocusOut
|
|
1461
|
+
}, [
|
|
1462
|
+
createElementVNode("div", _hoisted_5$6, [
|
|
1463
|
+
(openBlock(), createElementBlock(Fragment, null, renderList(options, (option) => {
|
|
1464
|
+
return createElementVNode("div", {
|
|
1465
|
+
key: option.value,
|
|
1466
|
+
onClick: (e) => {
|
|
1467
|
+
if (e.target.tagName !== "INPUT") {
|
|
1468
|
+
handleOptionClick(option.value);
|
|
1469
|
+
}
|
|
1470
|
+
},
|
|
1471
|
+
class: "cursor-pointer"
|
|
1472
|
+
}, [
|
|
1473
|
+
createVNode(_sfc_main$p, {
|
|
1474
|
+
checked: currentOption.value === option.value,
|
|
1475
|
+
id: `tree-popover-${props.nodeId}-${option.value}`,
|
|
1476
|
+
name: `tree-popover-${props.nodeId}`,
|
|
1477
|
+
value: option.value,
|
|
1478
|
+
onChange: () => handleOptionClick(option.value),
|
|
1479
|
+
onBlur: closePopover,
|
|
1480
|
+
onKeydown: [
|
|
1481
|
+
withKeys(withModifiers(($event) => handleOptionClick(option.value), ["prevent"]), ["enter"]),
|
|
1482
|
+
withKeys(withModifiers(($event) => handleOptionClick(option.value), ["prevent"]), ["space"])
|
|
1483
|
+
]
|
|
1484
|
+
}, {
|
|
1485
|
+
default: withCtx(() => [
|
|
1486
|
+
createTextVNode(toDisplayString(option.label), 1)
|
|
1487
|
+
]),
|
|
1488
|
+
_: 2
|
|
1489
|
+
}, 1032, ["checked", "id", "name", "value", "onChange", "onKeydown"])
|
|
1490
|
+
], 8, _hoisted_6$5);
|
|
1491
|
+
}), 64))
|
|
1492
|
+
]),
|
|
1493
|
+
createVNode(_sfc_main$r, {
|
|
1494
|
+
icon: "cross",
|
|
1495
|
+
id: "tree-popover-close-button",
|
|
1496
|
+
size: "24px",
|
|
1497
|
+
onClick: _cache[2] || (_cache[2] = ($event) => closePopover()),
|
|
1498
|
+
class: "fill-blue-500",
|
|
1499
|
+
ariaLabel: "Stäng"
|
|
1500
|
+
})
|
|
1501
|
+
], 36)
|
|
1502
|
+
], 4)) : createCommentVNode("", true)
|
|
1503
|
+
]),
|
|
1504
|
+
_: 1
|
|
1505
|
+
})
|
|
1484
1506
|
])) : createCommentVNode("", true)
|
|
1485
1507
|
])
|
|
1486
1508
|
], 4),
|
|
1487
|
-
unref(expandedNodes).has(props.nodeId) ? (openBlock(), createElementBlock("div",
|
|
1509
|
+
unref(expandedNodes).has(props.nodeId) ? (openBlock(), createElementBlock("div", _hoisted_7$3, [
|
|
1488
1510
|
(openBlock(true), createElementBlock(Fragment, null, renderList(filteredNodes.value, (child) => {
|
|
1489
1511
|
return openBlock(), createBlock(_component_TreeNode, {
|
|
1490
1512
|
key: child.nodeId,
|
|
@@ -1531,8 +1553,8 @@ function useElementFinalSize(elementRef, onFinalSize, delay = 100) {
|
|
|
1531
1553
|
onCleanup(() => clearTimeout(timeoutId));
|
|
1532
1554
|
});
|
|
1533
1555
|
}
|
|
1534
|
-
const _hoisted_1$
|
|
1535
|
-
const _sfc_main$
|
|
1556
|
+
const _hoisted_1$i = ["aria-label"];
|
|
1557
|
+
const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
1536
1558
|
__name: "FdsSpinner",
|
|
1537
1559
|
props: {
|
|
1538
1560
|
size: { default: "48px" },
|
|
@@ -1604,23 +1626,24 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
1604
1626
|
key: 0,
|
|
1605
1627
|
class: normalizeClass(_ctx.labelPosition === "bottom" ? "font-bold" : "")
|
|
1606
1628
|
}, toDisplayString(_ctx.label), 3)) : createCommentVNode("", true)
|
|
1607
|
-
], 10, _hoisted_1$
|
|
1629
|
+
], 10, _hoisted_1$i);
|
|
1608
1630
|
};
|
|
1609
1631
|
}
|
|
1610
1632
|
});
|
|
1611
|
-
const _hoisted_1$
|
|
1612
|
-
const elBase = "box-border appearance-none inline-flex items-center justify-center cursor-pointer
|
|
1613
|
-
const _sfc_main$
|
|
1614
|
-
__name: "
|
|
1633
|
+
const _hoisted_1$h = ["aria-disabled"];
|
|
1634
|
+
const elBase$2 = "box-border appearance-none inline-flex items-center justify-center cursor-pointer shadow-none p-1 text-base h-7 select-none m-0 rounded-md textcenter align-middle whitespace-nowrap no-underline transition-[box-shadow,border-color,background-color] duration-200 font-main font-bold text-base leading-5 tracking-normal focus-visible:outline-dashed focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-blue-500";
|
|
1635
|
+
const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
1636
|
+
__name: "FdsButtonMinor",
|
|
1615
1637
|
props: {
|
|
1616
|
-
|
|
1638
|
+
invert: { type: Boolean, default: false },
|
|
1639
|
+
text: {},
|
|
1617
1640
|
loading: { type: Boolean, default: false },
|
|
1618
1641
|
disabled: { type: Boolean, default: false },
|
|
1619
1642
|
block: { type: Boolean, default: false },
|
|
1620
1643
|
state: { default: void 0 },
|
|
1621
1644
|
icon: { default: void 0 },
|
|
1622
1645
|
iconPos: { default: "left" },
|
|
1623
|
-
size: {
|
|
1646
|
+
size: {},
|
|
1624
1647
|
textSelection: { type: Boolean, default: false },
|
|
1625
1648
|
as: { default: "button" },
|
|
1626
1649
|
href: { default: void 0 },
|
|
@@ -1630,39 +1653,25 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
1630
1653
|
setup(__props, { emit: __emit }) {
|
|
1631
1654
|
const props = __props;
|
|
1632
1655
|
const emit = __emit;
|
|
1633
|
-
const slots = useSlots();
|
|
1634
1656
|
const rootClasses = computed(() => [
|
|
1635
1657
|
"inline-block transition-opacity duration-200",
|
|
1636
1658
|
props.disabled && "opacity-20 pointer-events-none",
|
|
1637
1659
|
props.block && "block w-full"
|
|
1638
1660
|
]);
|
|
1639
|
-
const
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
l: "text-lg h-[68px] px-6"
|
|
1643
|
-
};
|
|
1644
|
-
const variantClasses = {
|
|
1645
|
-
primary: "bg-red-600 border border-red-700 text-white hover:bg-red-700 active:bg-red-800 active:border-red-800",
|
|
1646
|
-
secondary: "bg-white border-2 border-blue-500 text-blue-600 hover:border-blue-600 active:bg-blue-600 active:border-blue-600 active:text-white",
|
|
1647
|
-
minor: "h-auto border-0 shadow-none font-normal px-0! text-blue-600 p-0 bg-transparent rounded focus-visible:outline-dashed focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-blue-500 hover:bg-blue_t-100 active:bg-blue_t-200",
|
|
1648
|
-
"minor-invert": "h-auto border-0 shadow-none font-normal text-white p-0 bg-transparent rounded focus-visible:outline-dashed focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-white hover:bg-white-100 active:bg-white-200"
|
|
1649
|
-
};
|
|
1661
|
+
const variantClasses2 = computed(
|
|
1662
|
+
() => props.invert ? "border-0 font-normal text-white bg-transparent focus-visible:outline-dashed focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-white hover:bg-white-100 active:bg-white-200" : "border-0 font-normal text-blue-600 bg-transparent focus-visible:outline-dashed focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-blue-500 hover:bg-blue_t-100 active:bg-blue_t-200"
|
|
1663
|
+
);
|
|
1650
1664
|
const blockElClasses = computed(() => props.block && "w-full justify-center");
|
|
1651
|
-
const onlyIcon = computed(() => !slots.default || String(slots.default()).trim() === "");
|
|
1652
1665
|
const iconOrderClasses = computed(
|
|
1653
1666
|
() => props.icon && props.iconPos === "right" ? "order-2 ml-2 mr-0" : props.icon && "mr-2"
|
|
1654
1667
|
);
|
|
1655
1668
|
const buttonClasses = computed(() => [
|
|
1656
|
-
elBase,
|
|
1657
|
-
|
|
1658
|
-
variantClasses[props.variant],
|
|
1669
|
+
elBase$2,
|
|
1670
|
+
variantClasses2.value,
|
|
1659
1671
|
blockElClasses.value,
|
|
1660
|
-
props.textSelection && "select-text"
|
|
1661
|
-
onlyIcon.value ? "" : ""
|
|
1672
|
+
props.textSelection && "select-text"
|
|
1662
1673
|
]);
|
|
1663
|
-
const
|
|
1664
|
-
() => props.variant === "primary" || props.variant === "minor-invert" ? "fill-white" : "fill-blue-500"
|
|
1665
|
-
);
|
|
1674
|
+
const iconFillClass2 = computed(() => props.invert ? "fill-white" : "fill-blue-500");
|
|
1666
1675
|
function onClick(ev) {
|
|
1667
1676
|
if (props.disabled || props.loading) {
|
|
1668
1677
|
ev.preventDefault();
|
|
@@ -1670,20 +1679,24 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
1670
1679
|
}
|
|
1671
1680
|
emit("click", ev);
|
|
1672
1681
|
}
|
|
1682
|
+
const linkAttrs = computed(() => {
|
|
1683
|
+
if (props.as === "a") return { href: props.href };
|
|
1684
|
+
if (props.as === "router-link") return { to: props.href };
|
|
1685
|
+
return {};
|
|
1686
|
+
});
|
|
1673
1687
|
return (_ctx, _cache) => {
|
|
1674
1688
|
return openBlock(), createElementBlock("div", {
|
|
1675
1689
|
class: normalizeClass(rootClasses.value),
|
|
1676
1690
|
"aria-disabled": _ctx.disabled ? "true" : null
|
|
1677
1691
|
}, [
|
|
1678
|
-
(openBlock(), createBlock(resolveDynamicComponent(_ctx.as), {
|
|
1679
|
-
href: _ctx.as === "a" ? _ctx.href : void 0,
|
|
1692
|
+
(openBlock(), createBlock(resolveDynamicComponent(_ctx.as), mergeProps(linkAttrs.value, {
|
|
1680
1693
|
type: _ctx.as === "button" ? _ctx.type : void 0,
|
|
1681
1694
|
disabled: _ctx.as === "button" ? _ctx.disabled : void 0,
|
|
1682
|
-
class:
|
|
1695
|
+
class: buttonClasses.value,
|
|
1683
1696
|
onClick
|
|
1684
|
-
}, {
|
|
1697
|
+
}), {
|
|
1685
1698
|
default: withCtx(() => [
|
|
1686
|
-
_ctx.loading ? (openBlock(), createBlock(_sfc_main$
|
|
1699
|
+
_ctx.loading ? (openBlock(), createBlock(_sfc_main$n, {
|
|
1687
1700
|
key: 0,
|
|
1688
1701
|
class: "mr-2",
|
|
1689
1702
|
size: "24px",
|
|
@@ -1694,20 +1707,20 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
1694
1707
|
"aria-hidden": "true"
|
|
1695
1708
|
}, [
|
|
1696
1709
|
createVNode(FdsIcon, {
|
|
1697
|
-
class: normalizeClass(
|
|
1710
|
+
class: normalizeClass(iconFillClass2.value),
|
|
1698
1711
|
name: _ctx.icon,
|
|
1699
1712
|
size: 24
|
|
1700
1713
|
}, null, 8, ["class", "name"])
|
|
1701
1714
|
], 2)) : createCommentVNode("", true),
|
|
1702
|
-
|
|
1715
|
+
createTextVNode(" " + toDisplayString(_ctx.text), 1)
|
|
1703
1716
|
]),
|
|
1704
|
-
_:
|
|
1705
|
-
},
|
|
1706
|
-
], 10, _hoisted_1$
|
|
1717
|
+
_: 1
|
|
1718
|
+
}, 16, ["type", "disabled", "class"]))
|
|
1719
|
+
], 10, _hoisted_1$h);
|
|
1707
1720
|
};
|
|
1708
1721
|
}
|
|
1709
1722
|
});
|
|
1710
|
-
const _hoisted_1$
|
|
1723
|
+
const _hoisted_1$g = { class: "flex flex-col" };
|
|
1711
1724
|
const _hoisted_2$a = ["for"];
|
|
1712
1725
|
const _hoisted_3$9 = { class: "w-full" };
|
|
1713
1726
|
const _hoisted_4$7 = { class: "relative" };
|
|
@@ -1716,7 +1729,7 @@ const _hoisted_6$4 = {
|
|
|
1716
1729
|
key: 0,
|
|
1717
1730
|
class: "text-red-600 font-bold mt-1"
|
|
1718
1731
|
};
|
|
1719
|
-
const _sfc_main$
|
|
1732
|
+
const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
1720
1733
|
__name: "FdsInput",
|
|
1721
1734
|
props: {
|
|
1722
1735
|
value: { default: "" },
|
|
@@ -1750,7 +1763,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
1750
1763
|
const isInvalid = computed(() => props.valid === "false" && !props.optional && !props.disabled);
|
|
1751
1764
|
const isValid = computed(() => props.valid === "true");
|
|
1752
1765
|
const showPasswordToggle = computed(
|
|
1753
|
-
() => isPasswordType.value &&
|
|
1766
|
+
() => isPasswordType.value && internalValue.value.length > 0
|
|
1754
1767
|
);
|
|
1755
1768
|
const inputClasses = computed(() => [
|
|
1756
1769
|
"block w-full rounded-md border border-gray-300 px-3 py-2",
|
|
@@ -1778,24 +1791,15 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
1778
1791
|
}
|
|
1779
1792
|
const showPassword = ref(false);
|
|
1780
1793
|
const isPasswordType = computed(() => props.type === "password");
|
|
1781
|
-
const passwordToggleLabels = computed(() => {
|
|
1782
|
-
const labels = props.passwordLabels ?? [];
|
|
1783
|
-
const off = (labels[0] ?? "Visa").toString().trim();
|
|
1784
|
-
const on = (labels[1] ?? "Dölj").toString().trim();
|
|
1785
|
-
return { off, on };
|
|
1786
|
-
});
|
|
1787
1794
|
function toggleShowPassword() {
|
|
1788
1795
|
showPassword.value = !showPassword.value;
|
|
1789
1796
|
}
|
|
1790
|
-
const hasPasswordLabels = computed(
|
|
1791
|
-
() => Array.isArray(props.passwordLabels) && props.passwordLabels.some((l) => (l ?? "").toString().trim().length > 0)
|
|
1792
|
-
);
|
|
1793
1797
|
return (_ctx, _cache) => {
|
|
1794
1798
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
1795
1799
|
createElementVNode("div", {
|
|
1796
1800
|
class: normalizeClass(["w-full", { "flex flex-row gap-4": _ctx.labelLeft }])
|
|
1797
1801
|
}, [
|
|
1798
|
-
createElementVNode("div", _hoisted_1$
|
|
1802
|
+
createElementVNode("div", _hoisted_1$g, [
|
|
1799
1803
|
_ctx.label ? (openBlock(), createElementBlock("label", {
|
|
1800
1804
|
key: 0,
|
|
1801
1805
|
for: inputId.value,
|
|
@@ -1834,23 +1838,18 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
1834
1838
|
key: 1,
|
|
1835
1839
|
name: "bigSuccess"
|
|
1836
1840
|
})) : createCommentVNode("", true),
|
|
1837
|
-
_ctx.clearButton && !!internalValue.value && !_ctx.disabled ? (openBlock(), createBlock(_sfc_main$
|
|
1841
|
+
_ctx.clearButton && !!internalValue.value && !_ctx.disabled ? (openBlock(), createBlock(_sfc_main$r, {
|
|
1838
1842
|
key: 2,
|
|
1839
1843
|
icon: "cross",
|
|
1840
1844
|
ariaLabel: clearButtonLabel.value,
|
|
1841
1845
|
onClick: onClear
|
|
1842
1846
|
}, null, 8, ["ariaLabel"])) : createCommentVNode("", true),
|
|
1843
|
-
showPasswordToggle.value ? (openBlock(), createBlock(_sfc_main$
|
|
1847
|
+
showPasswordToggle.value ? (openBlock(), createBlock(_sfc_main$m, {
|
|
1844
1848
|
key: 3,
|
|
1845
|
-
variant: "minor",
|
|
1846
1849
|
icon: showPassword.value ? "viewOff" : "viewOn",
|
|
1850
|
+
text: "",
|
|
1847
1851
|
onClick: toggleShowPassword
|
|
1848
|
-
},
|
|
1849
|
-
default: withCtx(() => [
|
|
1850
|
-
createTextVNode(toDisplayString(showPassword.value ? passwordToggleLabels.value.off : passwordToggleLabels.value.on), 1)
|
|
1851
|
-
]),
|
|
1852
|
-
_: 1
|
|
1853
|
-
}, 8, ["icon"])) : createCommentVNode("", true)
|
|
1852
|
+
}, null, 8, ["icon"])) : createCommentVNode("", true)
|
|
1854
1853
|
], 2)
|
|
1855
1854
|
])
|
|
1856
1855
|
])
|
|
@@ -1860,7 +1859,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
1860
1859
|
};
|
|
1861
1860
|
}
|
|
1862
1861
|
});
|
|
1863
|
-
const _hoisted_1$
|
|
1862
|
+
const _hoisted_1$f = ["id"];
|
|
1864
1863
|
const _hoisted_2$9 = {
|
|
1865
1864
|
key: 0,
|
|
1866
1865
|
class: "flex items-start gap-4"
|
|
@@ -1874,7 +1873,7 @@ const _hoisted_8$1 = { class: "flex items-center gap-3" };
|
|
|
1874
1873
|
const _hoisted_9$1 = { class: "flex items-start gap-3" };
|
|
1875
1874
|
const smallIconSize = 24;
|
|
1876
1875
|
const largeIconSize = 48;
|
|
1877
|
-
const _sfc_main$
|
|
1876
|
+
const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
1878
1877
|
__name: "FdsContentBlock",
|
|
1879
1878
|
props: {
|
|
1880
1879
|
variant: { default: "primary" },
|
|
@@ -1980,11 +1979,11 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
1980
1979
|
], 2),
|
|
1981
1980
|
renderSlot(_ctx.$slots, "default")
|
|
1982
1981
|
]))
|
|
1983
|
-
], 14, _hoisted_1$
|
|
1982
|
+
], 14, _hoisted_1$f);
|
|
1984
1983
|
};
|
|
1985
1984
|
}
|
|
1986
1985
|
});
|
|
1987
|
-
const _hoisted_1$
|
|
1986
|
+
const _hoisted_1$e = { key: 0 };
|
|
1988
1987
|
const _hoisted_2$8 = {
|
|
1989
1988
|
key: 0,
|
|
1990
1989
|
class: "text-xl"
|
|
@@ -1993,7 +1992,7 @@ const _hoisted_3$7 = {
|
|
|
1993
1992
|
key: 1,
|
|
1994
1993
|
class: "text-xl"
|
|
1995
1994
|
};
|
|
1996
|
-
const _sfc_main$
|
|
1995
|
+
const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
1997
1996
|
__name: "FdsTreeView",
|
|
1998
1997
|
props: {
|
|
1999
1998
|
nodeExpandIcon: {},
|
|
@@ -2074,7 +2073,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
2074
2073
|
ref: searchContainerRef,
|
|
2075
2074
|
class: "pb-4"
|
|
2076
2075
|
}, [
|
|
2077
|
-
createVNode(_sfc_main$
|
|
2076
|
+
createVNode(_sfc_main$l, {
|
|
2078
2077
|
value: unref(treeState)?.searchTerm?.value ?? "",
|
|
2079
2078
|
onInput: _cache[0] || (_cache[0] = ($event) => unref(treeState)?.setSearchTerm($event.target.value)),
|
|
2080
2079
|
class: "w-full",
|
|
@@ -2087,11 +2086,11 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
2087
2086
|
])]),
|
|
2088
2087
|
_: 1
|
|
2089
2088
|
}, 8, ["value", "label"]),
|
|
2090
|
-
props.searchCountTemplate || props.searchCountTemplateUnfiltered ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
2089
|
+
props.searchCountTemplate || props.searchCountTemplateUnfiltered ? (openBlock(), createElementBlock("div", _hoisted_1$e, [
|
|
2091
2090
|
props.searchCountTemplate && unref(treeState)?.searchTerm?.value && String(unref(treeState)?.searchTerm?.value || "").trim().length >= (unref(treeState)?.triggerLength ?? 1) ? (openBlock(), createElementBlock("h2", _hoisted_2$8, toDisplayString(props.searchCountTemplate.replace("[[filteredNodes]]", unref(treeState)?.filteredMatchCount.value.toString()).replace("[[totalNodes]]", totalNodeCount.value.toString())), 1)) : (openBlock(), createElementBlock("h2", _hoisted_3$7, toDisplayString(props.searchCountTemplateUnfiltered?.replace("[[totalNodes]]", totalNodeCount.value.toString()).replace("[[totalNodes]]", totalNodeCount.value.toString())), 1))
|
|
2092
2091
|
])) : createCommentVNode("", true)
|
|
2093
2092
|
], 512)) : createCommentVNode("", true),
|
|
2094
|
-
unref(treeState)?.isEmptySearchResult?.value ? (openBlock(), createBlock(_sfc_main$
|
|
2093
|
+
unref(treeState)?.isEmptySearchResult?.value ? (openBlock(), createBlock(_sfc_main$k, {
|
|
2095
2094
|
key: 1,
|
|
2096
2095
|
variant: "secondary",
|
|
2097
2096
|
icon: "information",
|
|
@@ -2101,7 +2100,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
2101
2100
|
createTextVNode(toDisplayString(props.searchResultNoMatchesTitle), 1)
|
|
2102
2101
|
]),
|
|
2103
2102
|
default: withCtx(() => [
|
|
2104
|
-
createVNode(_sfc_main$
|
|
2103
|
+
createVNode(_sfc_main$q, null, {
|
|
2105
2104
|
default: withCtx(() => [
|
|
2106
2105
|
createTextVNode(toDisplayString(props.searchResultNoMatchesBody), 1)
|
|
2107
2106
|
]),
|
|
@@ -2113,7 +2112,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
2113
2112
|
createElementVNode("div", {
|
|
2114
2113
|
class: normalizeClass(["rounded-md", { "overflow-x-auto bg-white-solid": props.horizontalScroll }])
|
|
2115
2114
|
}, [
|
|
2116
|
-
props.data && !unref(treeState)?.isEmptySearchResult?.value ? (openBlock(), createBlock(_sfc_main$
|
|
2115
|
+
props.data && !unref(treeState)?.isEmptySearchResult?.value ? (openBlock(), createBlock(_sfc_main$o, {
|
|
2117
2116
|
key: 0,
|
|
2118
2117
|
style: { container: "bg-white-solid px-3 py-2" },
|
|
2119
2118
|
nodes: props.data.children || [],
|
|
@@ -2144,6 +2143,272 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
2144
2143
|
};
|
|
2145
2144
|
}
|
|
2146
2145
|
});
|
|
2146
|
+
const _hoisted_1$d = ["aria-disabled"];
|
|
2147
|
+
const elBase$1 = "box-border appearance-none inline-flex items-center justify-center cursor-pointer select-none min-h-0 min-w-12 h-12 m-0 rounded-lg text-center align-middle whitespace-nowrap no-underline shadow-[0_2px_4px_rgba(12,72,153,0.12)] transition-[box-shadow,border-color,background-color] duration-200 font-main font-bold text-base leading-5 tracking-normal focus-visible:outline-dashed focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-blue-500";
|
|
2148
|
+
const variantClasses$1 = "bg-red-600 border border-red-700 text-white hover:bg-red-700 active:bg-red-800 active:border-red-800";
|
|
2149
|
+
const iconFillClass$1 = "fill-white";
|
|
2150
|
+
const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
2151
|
+
__name: "FdsButtonPrimary",
|
|
2152
|
+
props: {
|
|
2153
|
+
text: {},
|
|
2154
|
+
loading: { type: Boolean, default: false },
|
|
2155
|
+
disabled: { type: Boolean, default: false },
|
|
2156
|
+
block: { type: Boolean, default: false },
|
|
2157
|
+
state: { default: void 0 },
|
|
2158
|
+
icon: { default: void 0 },
|
|
2159
|
+
iconPos: { default: "left" },
|
|
2160
|
+
size: { default: "m" },
|
|
2161
|
+
textSelection: { type: Boolean, default: false },
|
|
2162
|
+
as: { default: "button" },
|
|
2163
|
+
href: { default: void 0 },
|
|
2164
|
+
type: { default: "button" }
|
|
2165
|
+
},
|
|
2166
|
+
emits: ["click"],
|
|
2167
|
+
setup(__props, { emit: __emit }) {
|
|
2168
|
+
const props = __props;
|
|
2169
|
+
const emit = __emit;
|
|
2170
|
+
const rootClasses = computed(() => [
|
|
2171
|
+
"inline-block transition-opacity duration-200",
|
|
2172
|
+
props.disabled && "opacity-20 pointer-events-none",
|
|
2173
|
+
props.block && "block w-full"
|
|
2174
|
+
]);
|
|
2175
|
+
const sizeClasses = {
|
|
2176
|
+
s: "text-sm h-7 px-3",
|
|
2177
|
+
m: "text-base h-12 px-4",
|
|
2178
|
+
l: "text-lg h-[68px] px-6"
|
|
2179
|
+
};
|
|
2180
|
+
const blockElClasses = computed(() => props.block && "w-full justify-center");
|
|
2181
|
+
const iconOrderClasses = computed(
|
|
2182
|
+
() => props.icon && props.iconPos === "right" ? "order-2 ml-2 mr-0" : props.icon && "mr-2"
|
|
2183
|
+
);
|
|
2184
|
+
const buttonClasses = computed(() => [
|
|
2185
|
+
elBase$1,
|
|
2186
|
+
sizeClasses[props.size || "m"],
|
|
2187
|
+
variantClasses$1,
|
|
2188
|
+
blockElClasses.value,
|
|
2189
|
+
props.textSelection && "select-text"
|
|
2190
|
+
]);
|
|
2191
|
+
function onClick(ev) {
|
|
2192
|
+
if (props.disabled || props.loading) {
|
|
2193
|
+
ev.preventDefault();
|
|
2194
|
+
return;
|
|
2195
|
+
}
|
|
2196
|
+
emit("click", ev);
|
|
2197
|
+
}
|
|
2198
|
+
const linkAttrs = computed(() => {
|
|
2199
|
+
if (props.as === "a") return { href: props.href };
|
|
2200
|
+
if (props.as === "router-link") return { to: props.href };
|
|
2201
|
+
return {};
|
|
2202
|
+
});
|
|
2203
|
+
return (_ctx, _cache) => {
|
|
2204
|
+
return openBlock(), createElementBlock("div", {
|
|
2205
|
+
class: normalizeClass(rootClasses.value),
|
|
2206
|
+
"aria-disabled": _ctx.disabled ? "true" : null
|
|
2207
|
+
}, [
|
|
2208
|
+
(openBlock(), createBlock(resolveDynamicComponent(_ctx.as), mergeProps(linkAttrs.value, {
|
|
2209
|
+
type: _ctx.as === "button" ? _ctx.type : void 0,
|
|
2210
|
+
disabled: _ctx.as === "button" ? _ctx.disabled : void 0,
|
|
2211
|
+
class: buttonClasses.value,
|
|
2212
|
+
onClick
|
|
2213
|
+
}), {
|
|
2214
|
+
default: withCtx(() => [
|
|
2215
|
+
_ctx.loading ? (openBlock(), createBlock(_sfc_main$n, {
|
|
2216
|
+
key: 0,
|
|
2217
|
+
class: "mr-2",
|
|
2218
|
+
size: "24px",
|
|
2219
|
+
color: "inherit"
|
|
2220
|
+
})) : _ctx.icon ? (openBlock(), createElementBlock("span", {
|
|
2221
|
+
key: 1,
|
|
2222
|
+
class: normalizeClass(iconOrderClasses.value),
|
|
2223
|
+
"aria-hidden": "true"
|
|
2224
|
+
}, [
|
|
2225
|
+
createVNode(FdsIcon, {
|
|
2226
|
+
class: normalizeClass(iconFillClass$1),
|
|
2227
|
+
name: _ctx.icon,
|
|
2228
|
+
size: 24
|
|
2229
|
+
}, null, 8, ["name"])
|
|
2230
|
+
], 2)) : createCommentVNode("", true),
|
|
2231
|
+
createTextVNode(" " + toDisplayString(_ctx.text), 1)
|
|
2232
|
+
]),
|
|
2233
|
+
_: 1
|
|
2234
|
+
}, 16, ["type", "disabled", "class"]))
|
|
2235
|
+
], 10, _hoisted_1$d);
|
|
2236
|
+
};
|
|
2237
|
+
}
|
|
2238
|
+
});
|
|
2239
|
+
const _hoisted_1$c = ["aria-disabled"];
|
|
2240
|
+
const elBase = "box-border appearance-none inline-flex items-center justify-center cursor-pointer select-none min-h-0 min-w-12 h-12 m-0 rounded-lg text-center align-middle whitespace-nowrap no-underline shadow-[0_2px_4px_rgba(12,72,153,0.12)] transition-[box-shadow,border-color,background-color] duration-200 font-main font-bold text-base leading-5 tracking-normal focus-visible:outline-dashed focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-blue-500";
|
|
2241
|
+
const variantClasses = "bg-white border-2 border-blue-500 text-blue-600 hover:border-blue-600 active:bg-blue-600 active:border-blue-600 active:text-white";
|
|
2242
|
+
const iconFillClass = "fill-blue-500";
|
|
2243
|
+
const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
2244
|
+
__name: "FdsButtonSecondary",
|
|
2245
|
+
props: {
|
|
2246
|
+
text: {},
|
|
2247
|
+
loading: { type: Boolean, default: false },
|
|
2248
|
+
disabled: { type: Boolean, default: false },
|
|
2249
|
+
block: { type: Boolean, default: false },
|
|
2250
|
+
state: { default: void 0 },
|
|
2251
|
+
icon: { default: void 0 },
|
|
2252
|
+
iconPos: { default: "left" },
|
|
2253
|
+
size: { default: "m" },
|
|
2254
|
+
textSelection: { type: Boolean, default: false },
|
|
2255
|
+
as: { default: "button" },
|
|
2256
|
+
href: { default: void 0 },
|
|
2257
|
+
type: { default: "button" }
|
|
2258
|
+
},
|
|
2259
|
+
emits: ["click"],
|
|
2260
|
+
setup(__props, { emit: __emit }) {
|
|
2261
|
+
const props = __props;
|
|
2262
|
+
const emit = __emit;
|
|
2263
|
+
const rootClasses = computed(() => [
|
|
2264
|
+
"inline-block transition-opacity duration-200",
|
|
2265
|
+
props.disabled && "opacity-20 pointer-events-none",
|
|
2266
|
+
props.block && "block w-full"
|
|
2267
|
+
]);
|
|
2268
|
+
const sizeClasses = {
|
|
2269
|
+
s: "text-sm h-7 px-3",
|
|
2270
|
+
m: "text-base h-12 px-4",
|
|
2271
|
+
l: "text-lg h-[68px] px-6"
|
|
2272
|
+
};
|
|
2273
|
+
const blockElClasses = computed(() => props.block && "w-full justify-center");
|
|
2274
|
+
const iconOrderClasses = computed(
|
|
2275
|
+
() => props.icon && props.iconPos === "right" ? "order-2 ml-2 mr-0" : props.icon && "mr-2"
|
|
2276
|
+
);
|
|
2277
|
+
const buttonClasses = computed(() => [
|
|
2278
|
+
elBase,
|
|
2279
|
+
sizeClasses[props.size || "m"],
|
|
2280
|
+
variantClasses,
|
|
2281
|
+
blockElClasses.value,
|
|
2282
|
+
props.textSelection && "select-text"
|
|
2283
|
+
]);
|
|
2284
|
+
function onClick(ev) {
|
|
2285
|
+
if (props.disabled || props.loading) {
|
|
2286
|
+
ev.preventDefault();
|
|
2287
|
+
return;
|
|
2288
|
+
}
|
|
2289
|
+
emit("click", ev);
|
|
2290
|
+
}
|
|
2291
|
+
const linkAttrs = computed(() => {
|
|
2292
|
+
if (props.as === "a") return { href: props.href };
|
|
2293
|
+
if (props.as === "router-link") return { to: props.href };
|
|
2294
|
+
return {};
|
|
2295
|
+
});
|
|
2296
|
+
return (_ctx, _cache) => {
|
|
2297
|
+
return openBlock(), createElementBlock("div", {
|
|
2298
|
+
class: normalizeClass(rootClasses.value),
|
|
2299
|
+
"aria-disabled": _ctx.disabled ? "true" : null
|
|
2300
|
+
}, [
|
|
2301
|
+
(openBlock(), createBlock(resolveDynamicComponent(_ctx.as), mergeProps(linkAttrs.value, {
|
|
2302
|
+
type: _ctx.as === "button" ? _ctx.type : void 0,
|
|
2303
|
+
disabled: _ctx.as === "button" ? _ctx.disabled : void 0,
|
|
2304
|
+
class: buttonClasses.value,
|
|
2305
|
+
onClick
|
|
2306
|
+
}), {
|
|
2307
|
+
default: withCtx(() => [
|
|
2308
|
+
_ctx.loading ? (openBlock(), createBlock(_sfc_main$n, {
|
|
2309
|
+
key: 0,
|
|
2310
|
+
class: "mr-2",
|
|
2311
|
+
size: "24px",
|
|
2312
|
+
color: "inherit"
|
|
2313
|
+
})) : _ctx.icon ? (openBlock(), createElementBlock("span", {
|
|
2314
|
+
key: 1,
|
|
2315
|
+
class: normalizeClass(iconOrderClasses.value),
|
|
2316
|
+
"aria-hidden": "true"
|
|
2317
|
+
}, [
|
|
2318
|
+
createVNode(FdsIcon, {
|
|
2319
|
+
class: normalizeClass(iconFillClass),
|
|
2320
|
+
name: _ctx.icon,
|
|
2321
|
+
size: 24
|
|
2322
|
+
}, null, 8, ["name"])
|
|
2323
|
+
], 2)) : createCommentVNode("", true),
|
|
2324
|
+
createTextVNode(" " + toDisplayString(_ctx.text), 1)
|
|
2325
|
+
]),
|
|
2326
|
+
_: 1
|
|
2327
|
+
}, 16, ["type", "disabled", "class"]))
|
|
2328
|
+
], 10, _hoisted_1$c);
|
|
2329
|
+
};
|
|
2330
|
+
}
|
|
2331
|
+
});
|
|
2332
|
+
const _hoisted_1$b = {
|
|
2333
|
+
key: 0,
|
|
2334
|
+
class: "flex items-center gap-2 h-7"
|
|
2335
|
+
};
|
|
2336
|
+
const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
2337
|
+
__name: "FdsButtonCopy",
|
|
2338
|
+
props: {
|
|
2339
|
+
value: { default: "" },
|
|
2340
|
+
targetId: {},
|
|
2341
|
+
label: { default: "Kopiera" },
|
|
2342
|
+
copiedLabel: { default: "Kopierat!" },
|
|
2343
|
+
timeoutMs: { default: 800 },
|
|
2344
|
+
disabled: { type: Boolean, default: false }
|
|
2345
|
+
},
|
|
2346
|
+
emits: ["click"],
|
|
2347
|
+
setup(__props) {
|
|
2348
|
+
const props = __props;
|
|
2349
|
+
const isCopied = ref(false);
|
|
2350
|
+
let resetTimer = null;
|
|
2351
|
+
async function copyToClipboard(text) {
|
|
2352
|
+
try {
|
|
2353
|
+
if (navigator.clipboard && navigator.clipboard.writeText) {
|
|
2354
|
+
await navigator.clipboard.writeText(text);
|
|
2355
|
+
return true;
|
|
2356
|
+
}
|
|
2357
|
+
} catch {
|
|
2358
|
+
}
|
|
2359
|
+
const textarea = document.createElement("textarea");
|
|
2360
|
+
textarea.value = text;
|
|
2361
|
+
textarea.style.position = "fixed";
|
|
2362
|
+
textarea.style.opacity = "0";
|
|
2363
|
+
document.body.appendChild(textarea);
|
|
2364
|
+
textarea.focus();
|
|
2365
|
+
textarea.select();
|
|
2366
|
+
let ok = false;
|
|
2367
|
+
try {
|
|
2368
|
+
ok = document.execCommand("copy");
|
|
2369
|
+
} catch {
|
|
2370
|
+
ok = false;
|
|
2371
|
+
}
|
|
2372
|
+
document.body.removeChild(textarea);
|
|
2373
|
+
return ok;
|
|
2374
|
+
}
|
|
2375
|
+
async function onClick() {
|
|
2376
|
+
if (props.disabled) return;
|
|
2377
|
+
let textToCopy = props.value;
|
|
2378
|
+
if (props.targetId) {
|
|
2379
|
+
const el = document.getElementById(props.targetId);
|
|
2380
|
+
if (el) {
|
|
2381
|
+
textToCopy = el.innerText || el.textContent || "";
|
|
2382
|
+
}
|
|
2383
|
+
}
|
|
2384
|
+
if (!textToCopy) return;
|
|
2385
|
+
const ok = await copyToClipboard(textToCopy);
|
|
2386
|
+
if (!ok) return;
|
|
2387
|
+
isCopied.value = true;
|
|
2388
|
+
if (resetTimer) clearTimeout(resetTimer);
|
|
2389
|
+
resetTimer = setTimeout(() => isCopied.value = false, props.timeoutMs);
|
|
2390
|
+
}
|
|
2391
|
+
onMounted(() => {
|
|
2392
|
+
if (resetTimer) {
|
|
2393
|
+
clearTimeout(resetTimer);
|
|
2394
|
+
resetTimer = null;
|
|
2395
|
+
}
|
|
2396
|
+
});
|
|
2397
|
+
return (_ctx, _cache) => {
|
|
2398
|
+
return isCopied.value ? (openBlock(), createElementBlock("div", _hoisted_1$b, [
|
|
2399
|
+
createVNode(FdsIcon, { name: "bigSuccess" }),
|
|
2400
|
+
createElementVNode("span", null, toDisplayString(props.copiedLabel), 1)
|
|
2401
|
+
])) : (openBlock(), createBlock(_sfc_main$m, {
|
|
2402
|
+
key: 1,
|
|
2403
|
+
type: "button",
|
|
2404
|
+
disabled: props.disabled,
|
|
2405
|
+
icon: "copy",
|
|
2406
|
+
text: isCopied.value ? props.copiedLabel : props.label,
|
|
2407
|
+
onClick
|
|
2408
|
+
}, null, 8, ["disabled", "text"]));
|
|
2409
|
+
};
|
|
2410
|
+
}
|
|
2411
|
+
});
|
|
2147
2412
|
const _hoisted_1$a = { class: "w-full" };
|
|
2148
2413
|
const _hoisted_2$7 = ["for"];
|
|
2149
2414
|
const _hoisted_3$6 = {
|
|
@@ -2160,7 +2425,7 @@ const _hoisted_7$1 = {
|
|
|
2160
2425
|
key: 0,
|
|
2161
2426
|
class: "sr-only"
|
|
2162
2427
|
};
|
|
2163
|
-
const _sfc_main$
|
|
2428
|
+
const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
2164
2429
|
__name: "FdsTextarea",
|
|
2165
2430
|
props: {
|
|
2166
2431
|
value: { default: "" },
|
|
@@ -2267,7 +2532,7 @@ const _hoisted_9 = {
|
|
|
2267
2532
|
key: 2,
|
|
2268
2533
|
class: "text-red-600 font-bold mt-1"
|
|
2269
2534
|
};
|
|
2270
|
-
const _sfc_main$
|
|
2535
|
+
const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
2271
2536
|
__name: "FdsSelect",
|
|
2272
2537
|
props: {
|
|
2273
2538
|
value: { default: "" },
|
|
@@ -2361,7 +2626,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
2361
2626
|
};
|
|
2362
2627
|
}
|
|
2363
2628
|
});
|
|
2364
|
-
const _sfc_main$
|
|
2629
|
+
const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
2365
2630
|
__name: "FdsTable",
|
|
2366
2631
|
props: {
|
|
2367
2632
|
bordered: { type: Boolean, default: false },
|
|
@@ -2383,8 +2648,8 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
2383
2648
|
};
|
|
2384
2649
|
}
|
|
2385
2650
|
});
|
|
2386
|
-
const FdsTable = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2387
|
-
const _sfc_main$
|
|
2651
|
+
const FdsTable = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-9bc82042"]]);
|
|
2652
|
+
const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
2388
2653
|
__name: "FdsTableHead",
|
|
2389
2654
|
props: {
|
|
2390
2655
|
sortable: { type: Boolean, default: false },
|
|
@@ -2428,83 +2693,6 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
2428
2693
|
};
|
|
2429
2694
|
}
|
|
2430
2695
|
});
|
|
2431
|
-
const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
2432
|
-
__name: "FdsCopyButton",
|
|
2433
|
-
props: {
|
|
2434
|
-
value: { default: "" },
|
|
2435
|
-
targetId: {},
|
|
2436
|
-
label: { default: "Kopiera" },
|
|
2437
|
-
copiedLabel: { default: "Kopierat!" },
|
|
2438
|
-
timeoutMs: { default: 1500 },
|
|
2439
|
-
disabled: { type: Boolean, default: false }
|
|
2440
|
-
},
|
|
2441
|
-
emits: ["click"],
|
|
2442
|
-
setup(__props) {
|
|
2443
|
-
const props = __props;
|
|
2444
|
-
const isCopied = ref(false);
|
|
2445
|
-
let resetTimer = null;
|
|
2446
|
-
async function copyToClipboard(text) {
|
|
2447
|
-
try {
|
|
2448
|
-
if (navigator.clipboard && navigator.clipboard.writeText) {
|
|
2449
|
-
await navigator.clipboard.writeText(text);
|
|
2450
|
-
return true;
|
|
2451
|
-
}
|
|
2452
|
-
} catch {
|
|
2453
|
-
}
|
|
2454
|
-
const textarea = document.createElement("textarea");
|
|
2455
|
-
textarea.value = text;
|
|
2456
|
-
textarea.style.position = "fixed";
|
|
2457
|
-
textarea.style.opacity = "0";
|
|
2458
|
-
document.body.appendChild(textarea);
|
|
2459
|
-
textarea.focus();
|
|
2460
|
-
textarea.select();
|
|
2461
|
-
let ok = false;
|
|
2462
|
-
try {
|
|
2463
|
-
ok = document.execCommand("copy");
|
|
2464
|
-
} catch {
|
|
2465
|
-
ok = false;
|
|
2466
|
-
}
|
|
2467
|
-
document.body.removeChild(textarea);
|
|
2468
|
-
return ok;
|
|
2469
|
-
}
|
|
2470
|
-
async function onClick() {
|
|
2471
|
-
if (props.disabled) return;
|
|
2472
|
-
let textToCopy = props.value;
|
|
2473
|
-
if (props.targetId) {
|
|
2474
|
-
const el = document.getElementById(props.targetId);
|
|
2475
|
-
if (el) {
|
|
2476
|
-
textToCopy = el.innerText || el.textContent || "";
|
|
2477
|
-
}
|
|
2478
|
-
}
|
|
2479
|
-
if (!textToCopy) return;
|
|
2480
|
-
const ok = await copyToClipboard(textToCopy);
|
|
2481
|
-
if (!ok) return;
|
|
2482
|
-
isCopied.value = true;
|
|
2483
|
-
if (resetTimer) clearTimeout(resetTimer);
|
|
2484
|
-
resetTimer = setTimeout(() => isCopied.value = false, props.timeoutMs);
|
|
2485
|
-
}
|
|
2486
|
-
onMounted(() => {
|
|
2487
|
-
if (resetTimer) {
|
|
2488
|
-
clearTimeout(resetTimer);
|
|
2489
|
-
resetTimer = null;
|
|
2490
|
-
}
|
|
2491
|
-
});
|
|
2492
|
-
return (_ctx, _cache) => {
|
|
2493
|
-
return openBlock(), createBlock(_sfc_main$k, {
|
|
2494
|
-
variant: "minor",
|
|
2495
|
-
type: "button",
|
|
2496
|
-
disabled: props.disabled,
|
|
2497
|
-
icon: isCopied.value ? "bigSuccess" : "copy",
|
|
2498
|
-
onClick
|
|
2499
|
-
}, {
|
|
2500
|
-
default: withCtx(() => [
|
|
2501
|
-
createTextVNode(toDisplayString(isCopied.value ? props.copiedLabel : props.label), 1)
|
|
2502
|
-
]),
|
|
2503
|
-
_: 1
|
|
2504
|
-
}, 8, ["disabled", "icon"]);
|
|
2505
|
-
};
|
|
2506
|
-
}
|
|
2507
|
-
});
|
|
2508
2696
|
const _hoisted_1$8 = ["id"];
|
|
2509
2697
|
const _hoisted_2$5 = { class: "flex items-center gap-2" };
|
|
2510
2698
|
const _hoisted_3$4 = { class: "relative" };
|
|
@@ -2539,7 +2727,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
2539
2727
|
isVisible.value = v;
|
|
2540
2728
|
}
|
|
2541
2729
|
);
|
|
2542
|
-
const
|
|
2730
|
+
const variantClasses2 = {
|
|
2543
2731
|
info: "bg-blue_t-100",
|
|
2544
2732
|
warning: "bg-yellow-200 border-yellow-300"
|
|
2545
2733
|
};
|
|
@@ -2547,7 +2735,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
2547
2735
|
info: "information",
|
|
2548
2736
|
warning: "alert"
|
|
2549
2737
|
};
|
|
2550
|
-
const alertClasses = computed(() => ["rounded-md p-4",
|
|
2738
|
+
const alertClasses = computed(() => ["rounded-md p-4", variantClasses2[props.variant]]);
|
|
2551
2739
|
const autoId = `fds-alert-${Math.random().toString(36).slice(2, 9)}`;
|
|
2552
2740
|
const alertId = computed(() => props.id ?? autoId);
|
|
2553
2741
|
const iconName = computed(() => iconMap[props.variant]);
|
|
@@ -2583,7 +2771,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
2583
2771
|
createElementVNode("span", null, toDisplayString(_ctx.label), 1)
|
|
2584
2772
|
]),
|
|
2585
2773
|
createElementVNode("div", _hoisted_3$4, [
|
|
2586
|
-
_ctx.closeable ? (openBlock(), createBlock(_sfc_main$
|
|
2774
|
+
_ctx.closeable ? (openBlock(), createBlock(_sfc_main$r, {
|
|
2587
2775
|
key: 0,
|
|
2588
2776
|
icon: "cross",
|
|
2589
2777
|
size: "24px",
|
|
@@ -2591,7 +2779,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
2591
2779
|
ariaLabel: closeLabel.value,
|
|
2592
2780
|
class: normalizeClass(["fill-gray-900! hover:bg-gray-100 active:bg-gray-200"])
|
|
2593
2781
|
}, null, 8, ["ariaLabel"])) : createCommentVNode("", true),
|
|
2594
|
-
_ctx.collapsable ? (openBlock(), createBlock(_sfc_main$
|
|
2782
|
+
_ctx.collapsable ? (openBlock(), createBlock(_sfc_main$r, {
|
|
2595
2783
|
key: 1,
|
|
2596
2784
|
icon: "arrowDown",
|
|
2597
2785
|
size: "24px",
|
|
@@ -2614,7 +2802,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
2614
2802
|
};
|
|
2615
2803
|
}
|
|
2616
2804
|
});
|
|
2617
|
-
const FdsAlertBlock = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-
|
|
2805
|
+
const FdsAlertBlock = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-6aea4869"]]);
|
|
2618
2806
|
const _hoisted_1$7 = { class: "inline-flex items-center" };
|
|
2619
2807
|
const _hoisted_2$4 = {
|
|
2620
2808
|
key: 0,
|
|
@@ -3164,7 +3352,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
3164
3352
|
}, null, 8, ["name", "class"])) : createCommentVNode("", true),
|
|
3165
3353
|
createTextVNode(" " + toDisplayString(_ctx.heading), 1)
|
|
3166
3354
|
], 2),
|
|
3167
|
-
!_ctx.strict ? (openBlock(), createBlock(_sfc_main$
|
|
3355
|
+
!_ctx.strict ? (openBlock(), createBlock(_sfc_main$r, {
|
|
3168
3356
|
key: 0,
|
|
3169
3357
|
icon: "cross",
|
|
3170
3358
|
size: "24px",
|
|
@@ -3188,7 +3376,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
3188
3376
|
};
|
|
3189
3377
|
}
|
|
3190
3378
|
});
|
|
3191
|
-
const FdsModal = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-
|
|
3379
|
+
const FdsModal = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-8405e00f"]]);
|
|
3192
3380
|
const _hoisted_1$3 = { class: "my-6 flex items-between justify-between gap-2" };
|
|
3193
3381
|
const _hoisted_2$1 = { class: "flex items-center justify-start gap-1 w-[100px]" };
|
|
3194
3382
|
const _hoisted_3$1 = { class: "flex items-center justify-center w-auto gap-2 order-0 sm:order-0" };
|
|
@@ -3270,11 +3458,11 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
3270
3458
|
return (_ctx, _cache) => {
|
|
3271
3459
|
return openBlock(), createElementBlock("div", _hoisted_1$3, [
|
|
3272
3460
|
createElementVNode("div", _hoisted_2$1, [
|
|
3273
|
-
_ctx.loading && loadingIndicator.value === "start" ? (openBlock(), createBlock(_sfc_main$
|
|
3461
|
+
_ctx.loading && loadingIndicator.value === "start" ? (openBlock(), createBlock(_sfc_main$n, {
|
|
3274
3462
|
key: 0,
|
|
3275
3463
|
size: "32px",
|
|
3276
3464
|
color: "blue"
|
|
3277
|
-
})) : (openBlock(), createBlock(_sfc_main$
|
|
3465
|
+
})) : (openBlock(), createBlock(_sfc_main$r, {
|
|
3278
3466
|
key: 1,
|
|
3279
3467
|
icon: "first",
|
|
3280
3468
|
size: "24px",
|
|
@@ -3283,11 +3471,11 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
3283
3471
|
class: normalizeClass({ hidden: _ctx.current === 1 }),
|
|
3284
3472
|
onClick: _cache[0] || (_cache[0] = ($event) => handlePagination("start"))
|
|
3285
3473
|
}, null, 8, ["disabled", "ariaDisabled", "class"])),
|
|
3286
|
-
_ctx.loading && loadingIndicator.value === "prev" ? (openBlock(), createBlock(_sfc_main$
|
|
3474
|
+
_ctx.loading && loadingIndicator.value === "prev" ? (openBlock(), createBlock(_sfc_main$n, {
|
|
3287
3475
|
key: 2,
|
|
3288
3476
|
size: "24px",
|
|
3289
3477
|
color: "blue"
|
|
3290
|
-
})) : (openBlock(), createBlock(_sfc_main$
|
|
3478
|
+
})) : (openBlock(), createBlock(_sfc_main$r, {
|
|
3291
3479
|
key: 3,
|
|
3292
3480
|
icon: "arrowLeft",
|
|
3293
3481
|
size: "24px",
|
|
@@ -3298,14 +3486,14 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
3298
3486
|
}, null, 8, ["disabled", "ariaDisabled", "class"]))
|
|
3299
3487
|
]),
|
|
3300
3488
|
createElementVNode("div", _hoisted_3$1, [
|
|
3301
|
-
_ctx.loading && loadingIndicator.value === "input" ? (openBlock(), createBlock(_sfc_main$
|
|
3489
|
+
_ctx.loading && loadingIndicator.value === "input" ? (openBlock(), createBlock(_sfc_main$n, {
|
|
3302
3490
|
key: 0,
|
|
3303
3491
|
size: "24px",
|
|
3304
3492
|
color: "blue",
|
|
3305
3493
|
label: "Laddar",
|
|
3306
3494
|
"label-position": "right"
|
|
3307
3495
|
})) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
3308
|
-
createVNode(_sfc_main$
|
|
3496
|
+
createVNode(_sfc_main$l, {
|
|
3309
3497
|
value: internalValue.value.toString(),
|
|
3310
3498
|
type: "text",
|
|
3311
3499
|
size: _ctx.max.toString().length,
|
|
@@ -3317,11 +3505,11 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
3317
3505
|
], 64))
|
|
3318
3506
|
]),
|
|
3319
3507
|
createElementVNode("div", _hoisted_5$1, [
|
|
3320
|
-
_ctx.loading && loadingIndicator.value === "next" ? (openBlock(), createBlock(_sfc_main$
|
|
3508
|
+
_ctx.loading && loadingIndicator.value === "next" ? (openBlock(), createBlock(_sfc_main$n, {
|
|
3321
3509
|
key: 0,
|
|
3322
3510
|
size: "24px",
|
|
3323
3511
|
color: "blue"
|
|
3324
|
-
})) : (openBlock(), createBlock(_sfc_main$
|
|
3512
|
+
})) : (openBlock(), createBlock(_sfc_main$r, {
|
|
3325
3513
|
key: 1,
|
|
3326
3514
|
icon: "arrowRight",
|
|
3327
3515
|
size: "24px",
|
|
@@ -3330,11 +3518,11 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
3330
3518
|
class: normalizeClass({ hidden: _ctx.current === _ctx.max }),
|
|
3331
3519
|
onClick: _cache[2] || (_cache[2] = ($event) => handlePagination("next"))
|
|
3332
3520
|
}, null, 8, ["disabled", "ariaDisabled", "class"])),
|
|
3333
|
-
_ctx.loading && loadingIndicator.value === "end" ? (openBlock(), createBlock(_sfc_main$
|
|
3521
|
+
_ctx.loading && loadingIndicator.value === "end" ? (openBlock(), createBlock(_sfc_main$n, {
|
|
3334
3522
|
key: 2,
|
|
3335
3523
|
size: "24px",
|
|
3336
3524
|
color: "blue"
|
|
3337
|
-
})) : (openBlock(), createBlock(_sfc_main$
|
|
3525
|
+
})) : (openBlock(), createBlock(_sfc_main$r, {
|
|
3338
3526
|
key: 3,
|
|
3339
3527
|
icon: "last",
|
|
3340
3528
|
size: "24px",
|
|
@@ -3348,7 +3536,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
3348
3536
|
};
|
|
3349
3537
|
}
|
|
3350
3538
|
});
|
|
3351
|
-
const FdsPagination = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-
|
|
3539
|
+
const FdsPagination = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-df967fb4"]]);
|
|
3352
3540
|
const _hoisted_1$2 = { class: "block mb-4" };
|
|
3353
3541
|
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
3354
3542
|
__name: "FdsTruncatedText",
|
|
@@ -3416,23 +3604,18 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
3416
3604
|
class: normalizeClass(["content", { open: isOpen.value }]),
|
|
3417
3605
|
style: normalizeStyle({ maxWidth: `${containerWidth.value}px` })
|
|
3418
3606
|
}, toDisplayString(_ctx.content), 7)),
|
|
3419
|
-
shouldShowButton.value ? (openBlock(), createBlock(_sfc_main$
|
|
3607
|
+
shouldShowButton.value ? (openBlock(), createBlock(_sfc_main$m, {
|
|
3420
3608
|
key: 2,
|
|
3421
|
-
variant: "minor",
|
|
3422
3609
|
icon: isOpen.value ? "arrowUp" : "arrowDown",
|
|
3423
|
-
|
|
3610
|
+
iconPos: "right",
|
|
3611
|
+
text: isOpen.value ? _ctx.btnCollapse : _ctx.btnExpand,
|
|
3424
3612
|
onClick: toggleComponent
|
|
3425
|
-
},
|
|
3426
|
-
default: withCtx(() => [
|
|
3427
|
-
createTextVNode(toDisplayString(isOpen.value ? _ctx.btnCollapse : _ctx.btnExpand), 1)
|
|
3428
|
-
]),
|
|
3429
|
-
_: 1
|
|
3430
|
-
}, 8, ["icon"])) : createCommentVNode("", true)
|
|
3613
|
+
}, null, 8, ["icon", "text"])) : createCommentVNode("", true)
|
|
3431
3614
|
]);
|
|
3432
3615
|
};
|
|
3433
3616
|
}
|
|
3434
3617
|
});
|
|
3435
|
-
const FdsTruncatedText = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-
|
|
3618
|
+
const FdsTruncatedText = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-7c1d8d51"]]);
|
|
3436
3619
|
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
3437
3620
|
__name: "FdsHeading",
|
|
3438
3621
|
props: {
|
|
@@ -3531,7 +3714,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
3531
3714
|
};
|
|
3532
3715
|
return (_ctx, _cache) => {
|
|
3533
3716
|
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
3534
|
-
_ctx.loading ? (openBlock(), createBlock(_sfc_main$
|
|
3717
|
+
_ctx.loading ? (openBlock(), createBlock(_sfc_main$n, {
|
|
3535
3718
|
key: 0,
|
|
3536
3719
|
size: "24px",
|
|
3537
3720
|
color: "blue",
|
|
@@ -3547,20 +3730,22 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
3547
3730
|
});
|
|
3548
3731
|
const FdsVueCorePlugin = {
|
|
3549
3732
|
install(app) {
|
|
3550
|
-
app.component("FdsTreeView", _sfc_main$
|
|
3551
|
-
app.component("
|
|
3733
|
+
app.component("FdsTreeView", _sfc_main$j);
|
|
3734
|
+
app.component("FdsButtonPrimary", _sfc_main$i);
|
|
3735
|
+
app.component("FdsButtonSecondary", _sfc_main$h);
|
|
3736
|
+
app.component("FdsButtonMinor", _sfc_main$m);
|
|
3737
|
+
app.component("FdsButtonIcon", _sfc_main$r);
|
|
3738
|
+
app.component("FdsButtonCopy", _sfc_main$g);
|
|
3552
3739
|
app.component("FdsIcon", FdsIcon);
|
|
3553
|
-
app.component("FdsSpinner", _sfc_main$
|
|
3554
|
-
app.component("FdsRadio", _sfc_main$
|
|
3555
|
-
app.component("FdsCheckbox", _sfc_main$
|
|
3556
|
-
app.component("FdsTextarea", _sfc_main$
|
|
3557
|
-
app.component("FdsSelect", _sfc_main$
|
|
3740
|
+
app.component("FdsSpinner", _sfc_main$n);
|
|
3741
|
+
app.component("FdsRadio", _sfc_main$p);
|
|
3742
|
+
app.component("FdsCheckbox", _sfc_main$t);
|
|
3743
|
+
app.component("FdsTextarea", _sfc_main$f);
|
|
3744
|
+
app.component("FdsSelect", _sfc_main$e);
|
|
3558
3745
|
app.component("FdsTable", FdsTable);
|
|
3559
|
-
app.component("FdsTableHead", _sfc_main$
|
|
3560
|
-
app.component("FdsInput", _sfc_main$
|
|
3561
|
-
app.component("
|
|
3562
|
-
app.component("FdsCopyButton", _sfc_main$c);
|
|
3563
|
-
app.component("FdsContentBlock", _sfc_main$i);
|
|
3746
|
+
app.component("FdsTableHead", _sfc_main$c);
|
|
3747
|
+
app.component("FdsInput", _sfc_main$l);
|
|
3748
|
+
app.component("FdsContentBlock", _sfc_main$k);
|
|
3564
3749
|
app.component("FdsAlertBlock", FdsAlertBlock);
|
|
3565
3750
|
app.component("FdsExpanderBlock", FdsExpanderBlock);
|
|
3566
3751
|
app.component("FdsInteractionBlock", FdsInteractionBlock);
|
|
@@ -3572,37 +3757,39 @@ const FdsVueCorePlugin = {
|
|
|
3572
3757
|
app.component("FdsTruncatedText", FdsTruncatedText);
|
|
3573
3758
|
app.component("FdsHeading", _sfc_main$2);
|
|
3574
3759
|
app.component("FdsSeparator", FdsSeparator);
|
|
3575
|
-
app.component("FdsText", _sfc_main$
|
|
3760
|
+
app.component("FdsText", _sfc_main$q);
|
|
3576
3761
|
app.component("FdsListHeading", _sfc_main);
|
|
3577
3762
|
}
|
|
3578
3763
|
};
|
|
3579
3764
|
export {
|
|
3580
3765
|
FdsAlertBlock,
|
|
3581
|
-
_sfc_main$
|
|
3582
|
-
_sfc_main$r as
|
|
3583
|
-
_sfc_main$
|
|
3584
|
-
_sfc_main$
|
|
3766
|
+
_sfc_main$g as FdsButtonCopy,
|
|
3767
|
+
_sfc_main$r as FdsButtonIcon,
|
|
3768
|
+
_sfc_main$m as FdsButtonMinor,
|
|
3769
|
+
_sfc_main$i as FdsButtonPrimary,
|
|
3770
|
+
_sfc_main$h as FdsButtonSecondary,
|
|
3771
|
+
_sfc_main$t as FdsCheckbox,
|
|
3772
|
+
_sfc_main$k as FdsContentBlock,
|
|
3585
3773
|
FdsExpanderBlock,
|
|
3586
3774
|
_sfc_main$2 as FdsHeading,
|
|
3587
3775
|
FdsIcon,
|
|
3588
|
-
_sfc_main$
|
|
3589
|
-
_sfc_main$j as FdsInput,
|
|
3776
|
+
_sfc_main$l as FdsInput,
|
|
3590
3777
|
FdsInteractionBlock,
|
|
3591
3778
|
_sfc_main as FdsListHeading,
|
|
3592
3779
|
FdsModal,
|
|
3593
3780
|
FdsPagination,
|
|
3594
|
-
_sfc_main$
|
|
3595
|
-
_sfc_main$
|
|
3781
|
+
_sfc_main$p as FdsRadio,
|
|
3782
|
+
_sfc_main$e as FdsSelect,
|
|
3596
3783
|
FdsSeparator,
|
|
3597
|
-
_sfc_main$
|
|
3784
|
+
_sfc_main$n as FdsSpinner,
|
|
3598
3785
|
_sfc_main$8 as FdsSticker,
|
|
3599
3786
|
FdsTable,
|
|
3600
|
-
_sfc_main$
|
|
3787
|
+
_sfc_main$c as FdsTableHead,
|
|
3601
3788
|
_sfc_main$7 as FdsTabs,
|
|
3602
3789
|
_sfc_main$6 as FdsTabsItem,
|
|
3603
|
-
_sfc_main$
|
|
3604
|
-
_sfc_main$
|
|
3605
|
-
_sfc_main$
|
|
3790
|
+
_sfc_main$q as FdsText,
|
|
3791
|
+
_sfc_main$f as FdsTextarea,
|
|
3792
|
+
_sfc_main$j as FdsTreeView,
|
|
3606
3793
|
FdsTruncatedText,
|
|
3607
3794
|
FdsVueCorePlugin as default,
|
|
3608
3795
|
useTreeState
|