fds-vue-core 2.0.3 → 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/Buttons/FdsButtonMinor/FdsButtonMinor.vue.d.ts.map +1 -1
- package/dist/components/Buttons/FdsButtonPrimary/FdsButtonPrimary.vue.d.ts.map +1 -1
- package/dist/components/Buttons/FdsButtonSecondary/FdsButtonSecondary.vue.d.ts.map +1 -1
- package/dist/components/FdsTreeView/TreeNode.vue.d.ts.map +1 -1
- package/dist/fds-vue-core.cjs.js +114 -83
- package/dist/fds-vue-core.cjs.js.map +1 -1
- package/dist/fds-vue-core.css +25 -0
- package/dist/fds-vue-core.es.js +115 -84
- package/dist/fds-vue-core.es.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FdsButtonMinor.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Buttons/FdsButtonMinor/FdsButtonMinor.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FdsButtonMinor.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Buttons/FdsButtonMinor/FdsButtonMinor.vue"],"names":[],"mappings":"AAoGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAA;AAI5D,UAAU,mBAAoB,SAAQ,kBAAkB;IACtD,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB;;;;;;;;;;YADU,OAAO;;;;;;;;AA8LlB,wBAIG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FdsButtonPrimary.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Buttons/FdsButtonPrimary/FdsButtonPrimary.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FdsButtonPrimary.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Buttons/FdsButtonPrimary/FdsButtonPrimary.vue"],"names":[],"mappings":"AAoGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAA;;;;;;;;;;;;;;;;;;AAmM5D,wBAIG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FdsButtonSecondary.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Buttons/FdsButtonSecondary/FdsButtonSecondary.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FdsButtonSecondary.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Buttons/FdsButtonSecondary/FdsButtonSecondary.vue"],"names":[],"mappings":"AAoGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAA;;;;;;;;;;;;;;;;;;AAmM5D,wBAIG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TreeNode.vue.d.ts","sourceRoot":"","sources":["../../../src/components/FdsTreeView/TreeNode.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TreeNode.vue.d.ts","sourceRoot":"","sources":["../../../src/components/FdsTreeView/TreeNode.vue"],"names":[],"mappings":"AAkYA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAQ5C,KAAK,KAAK,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,aAAa,CAAC,CAAC,CAAC,CAAA;AAE1D,KAAK,WAAW,GAAG,KAAK,CAAC;;;;;;;;;;;;;;;;;AAktBzB,wBAGG"}
|
package/dist/fds-vue-core.cjs.js
CHANGED
|
@@ -1188,7 +1188,8 @@ const _hoisted_4$8 = {
|
|
|
1188
1188
|
style: { "max-height": "28px" }
|
|
1189
1189
|
};
|
|
1190
1190
|
const _hoisted_5$6 = { class: "flex flex-col gap-2" };
|
|
1191
|
-
const _hoisted_6$5 =
|
|
1191
|
+
const _hoisted_6$5 = ["onClick"];
|
|
1192
|
+
const _hoisted_7$3 = { key: 0 };
|
|
1192
1193
|
const popoverWidth = 327;
|
|
1193
1194
|
const popoverHeight = 80;
|
|
1194
1195
|
const _sfc_main$o = /* @__PURE__ */ vue.defineComponent({
|
|
@@ -1303,13 +1304,13 @@ const _sfc_main$o = /* @__PURE__ */ vue.defineComponent({
|
|
|
1303
1304
|
firstRadio?.focus();
|
|
1304
1305
|
};
|
|
1305
1306
|
const closePopover = () => {
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1307
|
+
isOpen.value = false;
|
|
1308
|
+
};
|
|
1309
|
+
const onAfterPopoverLeave = () => {
|
|
1310
|
+
window.removeEventListener("scroll", computePopoverCoords, true);
|
|
1311
|
+
window.removeEventListener("resize", computePopoverCoords);
|
|
1312
|
+
document.removeEventListener("pointerdown", handleGlobalPointerDown);
|
|
1313
|
+
document.removeEventListener("keydown", handleGlobalKeydown);
|
|
1313
1314
|
};
|
|
1314
1315
|
const togglePopover = () => {
|
|
1315
1316
|
if (isOpen.value) closePopover();
|
|
@@ -1356,14 +1357,12 @@ const _sfc_main$o = /* @__PURE__ */ vue.defineComponent({
|
|
|
1356
1357
|
return "";
|
|
1357
1358
|
});
|
|
1358
1359
|
const handleOptionClick = (option) => {
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
isOpen.value = false;
|
|
1366
|
-
}, 300);
|
|
1360
|
+
if (option === "parent_and_children") {
|
|
1361
|
+
treeState?.selectNodeAndAllChildren(props.nodeId);
|
|
1362
|
+
} else if (option === "parent") {
|
|
1363
|
+
treeState?.deselectChildrenOnly(props.nodeId);
|
|
1364
|
+
}
|
|
1365
|
+
closePopover();
|
|
1367
1366
|
};
|
|
1368
1367
|
return (_ctx, _cache) => {
|
|
1369
1368
|
const _component_TreeNode = vue.resolveComponent("TreeNode", true);
|
|
@@ -1432,65 +1431,84 @@ const _sfc_main$o = /* @__PURE__ */ vue.defineComponent({
|
|
|
1432
1431
|
onClick: togglePopover,
|
|
1433
1432
|
ariaLabel: `Fler val för ${_ctx.title}`
|
|
1434
1433
|
}, null, 8, ["ariaLabel"]),
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
class: "
|
|
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
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1434
|
+
vue.createVNode(vue.Transition, {
|
|
1435
|
+
"enter-active-class": "transition-opacity duration-200 ease-in-out",
|
|
1436
|
+
"enter-from-class": "opacity-0",
|
|
1437
|
+
"enter-to-class": "opacity-100",
|
|
1438
|
+
"leave-active-class": "transition-opacity duration-500 ease-in-out",
|
|
1439
|
+
"leave-from-class": "opacity-100",
|
|
1440
|
+
"leave-to-class": "opacity-0",
|
|
1441
|
+
onAfterLeave: onAfterPopoverLeave
|
|
1442
|
+
}, {
|
|
1443
|
+
default: vue.withCtx(() => [
|
|
1444
|
+
isOpen.value ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
1445
|
+
key: 0,
|
|
1446
|
+
class: "fixed z-9999",
|
|
1447
|
+
style: vue.normalizeStyle({
|
|
1448
|
+
top: popoverCoords.top + "px",
|
|
1449
|
+
left: popoverCoords.right - popoverWidth - (popoverCoords.right - popoverCoords.left) + "px"
|
|
1450
|
+
})
|
|
1451
|
+
}, [
|
|
1452
|
+
vue.createElementVNode("div", {
|
|
1453
|
+
ref_key: "popoverPanelRef",
|
|
1454
|
+
ref: popoverPanelRef,
|
|
1455
|
+
class: "bg-white rounded-md p-4 shadow-lg flex flex-row justify-between items-start gap-3",
|
|
1456
|
+
style: vue.normalizeStyle({
|
|
1457
|
+
width: popoverWidth + "px",
|
|
1458
|
+
minHeight: popoverHeight + "px"
|
|
1459
|
+
}),
|
|
1460
|
+
onClick: _cache[3] || (_cache[3] = vue.withModifiers(() => {
|
|
1461
|
+
}, ["stop"])),
|
|
1462
|
+
onFocusout: onPanelFocusOut
|
|
1463
|
+
}, [
|
|
1464
|
+
vue.createElementVNode("div", _hoisted_5$6, [
|
|
1465
|
+
(vue.openBlock(), vue.createElementBlock(vue.Fragment, null, vue.renderList(options, (option) => {
|
|
1466
|
+
return vue.createElementVNode("div", {
|
|
1467
|
+
key: option.value,
|
|
1468
|
+
onClick: (e) => {
|
|
1469
|
+
if (e.target.tagName !== "INPUT") {
|
|
1470
|
+
handleOptionClick(option.value);
|
|
1471
|
+
}
|
|
1472
|
+
},
|
|
1473
|
+
class: "cursor-pointer"
|
|
1474
|
+
}, [
|
|
1475
|
+
vue.createVNode(_sfc_main$p, {
|
|
1476
|
+
checked: currentOption.value === option.value,
|
|
1477
|
+
id: `tree-popover-${props.nodeId}-${option.value}`,
|
|
1478
|
+
name: `tree-popover-${props.nodeId}`,
|
|
1479
|
+
value: option.value,
|
|
1480
|
+
onChange: () => handleOptionClick(option.value),
|
|
1481
|
+
onBlur: closePopover,
|
|
1482
|
+
onKeydown: [
|
|
1483
|
+
vue.withKeys(vue.withModifiers(($event) => handleOptionClick(option.value), ["prevent"]), ["enter"]),
|
|
1484
|
+
vue.withKeys(vue.withModifiers(($event) => handleOptionClick(option.value), ["prevent"]), ["space"])
|
|
1485
|
+
]
|
|
1486
|
+
}, {
|
|
1487
|
+
default: vue.withCtx(() => [
|
|
1488
|
+
vue.createTextVNode(vue.toDisplayString(option.label), 1)
|
|
1489
|
+
]),
|
|
1490
|
+
_: 2
|
|
1491
|
+
}, 1032, ["checked", "id", "name", "value", "onChange", "onKeydown"])
|
|
1492
|
+
], 8, _hoisted_6$5);
|
|
1493
|
+
}), 64))
|
|
1494
|
+
]),
|
|
1495
|
+
vue.createVNode(_sfc_main$r, {
|
|
1496
|
+
icon: "cross",
|
|
1497
|
+
id: "tree-popover-close-button",
|
|
1498
|
+
size: "24px",
|
|
1499
|
+
onClick: _cache[2] || (_cache[2] = ($event) => closePopover()),
|
|
1500
|
+
class: "fill-blue-500",
|
|
1501
|
+
ariaLabel: "Stäng"
|
|
1502
|
+
})
|
|
1503
|
+
], 36)
|
|
1504
|
+
], 4)) : vue.createCommentVNode("", true)
|
|
1505
|
+
]),
|
|
1506
|
+
_: 1
|
|
1507
|
+
})
|
|
1490
1508
|
])) : vue.createCommentVNode("", true)
|
|
1491
1509
|
])
|
|
1492
1510
|
], 4),
|
|
1493
|
-
vue.unref(expandedNodes).has(props.nodeId) ? (vue.openBlock(), vue.createElementBlock("div",
|
|
1511
|
+
vue.unref(expandedNodes).has(props.nodeId) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_7$3, [
|
|
1494
1512
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(filteredNodes.value, (child) => {
|
|
1495
1513
|
return vue.openBlock(), vue.createBlock(_component_TreeNode, {
|
|
1496
1514
|
key: child.nodeId,
|
|
@@ -1663,12 +1681,17 @@ const _sfc_main$m = /* @__PURE__ */ vue.defineComponent({
|
|
|
1663
1681
|
}
|
|
1664
1682
|
emit("click", ev);
|
|
1665
1683
|
}
|
|
1684
|
+
const linkAttrs = vue.computed(() => {
|
|
1685
|
+
if (props.as === "a") return { href: props.href };
|
|
1686
|
+
if (props.as === "router-link") return { to: props.href };
|
|
1687
|
+
return {};
|
|
1688
|
+
});
|
|
1666
1689
|
return (_ctx, _cache) => {
|
|
1667
1690
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
1668
1691
|
class: vue.normalizeClass(rootClasses.value),
|
|
1669
1692
|
"aria-disabled": _ctx.disabled ? "true" : null
|
|
1670
1693
|
}, [
|
|
1671
|
-
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.as), vue.mergeProps(
|
|
1694
|
+
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.as), vue.mergeProps(linkAttrs.value, {
|
|
1672
1695
|
type: _ctx.as === "button" ? _ctx.type : void 0,
|
|
1673
1696
|
disabled: _ctx.as === "button" ? _ctx.disabled : void 0,
|
|
1674
1697
|
class: buttonClasses.value,
|
|
@@ -2174,18 +2197,22 @@ const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
|
|
|
2174
2197
|
}
|
|
2175
2198
|
emit("click", ev);
|
|
2176
2199
|
}
|
|
2200
|
+
const linkAttrs = vue.computed(() => {
|
|
2201
|
+
if (props.as === "a") return { href: props.href };
|
|
2202
|
+
if (props.as === "router-link") return { to: props.href };
|
|
2203
|
+
return {};
|
|
2204
|
+
});
|
|
2177
2205
|
return (_ctx, _cache) => {
|
|
2178
2206
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
2179
2207
|
class: vue.normalizeClass(rootClasses.value),
|
|
2180
2208
|
"aria-disabled": _ctx.disabled ? "true" : null
|
|
2181
2209
|
}, [
|
|
2182
|
-
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.as), {
|
|
2183
|
-
href: _ctx.as === "a" ? _ctx.href : void 0,
|
|
2210
|
+
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.as), vue.mergeProps(linkAttrs.value, {
|
|
2184
2211
|
type: _ctx.as === "button" ? _ctx.type : void 0,
|
|
2185
2212
|
disabled: _ctx.as === "button" ? _ctx.disabled : void 0,
|
|
2186
|
-
class:
|
|
2213
|
+
class: buttonClasses.value,
|
|
2187
2214
|
onClick
|
|
2188
|
-
}, {
|
|
2215
|
+
}), {
|
|
2189
2216
|
default: vue.withCtx(() => [
|
|
2190
2217
|
_ctx.loading ? (vue.openBlock(), vue.createBlock(_sfc_main$n, {
|
|
2191
2218
|
key: 0,
|
|
@@ -2206,7 +2233,7 @@ const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
|
|
|
2206
2233
|
vue.createTextVNode(" " + vue.toDisplayString(_ctx.text), 1)
|
|
2207
2234
|
]),
|
|
2208
2235
|
_: 1
|
|
2209
|
-
},
|
|
2236
|
+
}, 16, ["type", "disabled", "class"]))
|
|
2210
2237
|
], 10, _hoisted_1$d);
|
|
2211
2238
|
};
|
|
2212
2239
|
}
|
|
@@ -2263,18 +2290,22 @@ const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
|
|
|
2263
2290
|
}
|
|
2264
2291
|
emit("click", ev);
|
|
2265
2292
|
}
|
|
2293
|
+
const linkAttrs = vue.computed(() => {
|
|
2294
|
+
if (props.as === "a") return { href: props.href };
|
|
2295
|
+
if (props.as === "router-link") return { to: props.href };
|
|
2296
|
+
return {};
|
|
2297
|
+
});
|
|
2266
2298
|
return (_ctx, _cache) => {
|
|
2267
2299
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
2268
2300
|
class: vue.normalizeClass(rootClasses.value),
|
|
2269
2301
|
"aria-disabled": _ctx.disabled ? "true" : null
|
|
2270
2302
|
}, [
|
|
2271
|
-
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.as), {
|
|
2272
|
-
href: _ctx.as === "a" ? _ctx.href : void 0,
|
|
2303
|
+
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.as), vue.mergeProps(linkAttrs.value, {
|
|
2273
2304
|
type: _ctx.as === "button" ? _ctx.type : void 0,
|
|
2274
2305
|
disabled: _ctx.as === "button" ? _ctx.disabled : void 0,
|
|
2275
|
-
class:
|
|
2306
|
+
class: buttonClasses.value,
|
|
2276
2307
|
onClick
|
|
2277
|
-
}, {
|
|
2308
|
+
}), {
|
|
2278
2309
|
default: vue.withCtx(() => [
|
|
2279
2310
|
_ctx.loading ? (vue.openBlock(), vue.createBlock(_sfc_main$n, {
|
|
2280
2311
|
key: 0,
|
|
@@ -2295,7 +2326,7 @@ const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
|
|
|
2295
2326
|
vue.createTextVNode(" " + vue.toDisplayString(_ctx.text), 1)
|
|
2296
2327
|
]),
|
|
2297
2328
|
_: 1
|
|
2298
|
-
},
|
|
2329
|
+
}, 16, ["type", "disabled", "class"]))
|
|
2299
2330
|
], 10, _hoisted_1$c);
|
|
2300
2331
|
};
|
|
2301
2332
|
}
|