@knime/kds-components 8.1.0 → 8.2.0
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/CHANGELOG.md +12 -0
- package/dist/index.css +24 -19
- package/dist/index.js +193 -230
- package/dist/index.js.map +1 -1
- package/dist/src/components/forms/Checkbox/BaseCheckbox.vue.d.ts +0 -4
- package/dist/src/components/forms/Checkbox/BaseCheckbox.vue.d.ts.map +1 -1
- package/dist/src/components/forms/Checkbox/KdsCheckboxGroup.vue.d.ts.map +1 -1
- package/dist/src/components/forms/Checkbox/types.d.ts +0 -5
- package/dist/src/components/forms/Checkbox/types.d.ts.map +1 -1
- package/dist/src/components/forms/inputs/ZonedDateTimeInput/KdsZonedDateTimeInput.vue.d.ts.map +1 -1
- package/dist/src/components/forms/inputs/ZonedDateTimeInput/types.d.ts +6 -0
- package/dist/src/components/forms/inputs/ZonedDateTimeInput/types.d.ts.map +1 -1
- package/package.json +7 -7
- package/dist/src/components/forms/Checkbox/useCheckboxRovingFocus.d.ts +0 -15
- package/dist/src/components/forms/Checkbox/useCheckboxRovingFocus.d.ts.map +0 -1
package/dist/index.js
CHANGED
|
@@ -28,7 +28,7 @@ var _hoisted_1$85 = [
|
|
|
28
28
|
"aria-label",
|
|
29
29
|
"data-color"
|
|
30
30
|
];
|
|
31
|
-
var _hoisted_2$
|
|
31
|
+
var _hoisted_2$52 = ["src"];
|
|
32
32
|
var _hoisted_3$37 = {
|
|
33
33
|
key: 1,
|
|
34
34
|
class: "kds-avatar-initials",
|
|
@@ -93,14 +93,14 @@ var KdsAvatar_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PU
|
|
|
93
93
|
alt: "",
|
|
94
94
|
"aria-hidden": "true",
|
|
95
95
|
onError: onImageError
|
|
96
|
-
}, null, 40, _hoisted_2$
|
|
96
|
+
}, null, 40, _hoisted_2$52)) : (openBlock(), createElementBlock("div", _hoisted_3$37, [createElementVNode("span", null, toDisplayString(displayedInitials.value), 1)]))], 10, _hoisted_1$85)), [[unref(vKdsTooltip), hasTitle.value ? accessibleTitle.value : void 0]]);
|
|
97
97
|
};
|
|
98
98
|
}
|
|
99
99
|
}), [["__scopeId", "data-v-971c1c8a"]]);
|
|
100
100
|
//#endregion
|
|
101
101
|
//#region src/components/accessories/Avatar/KdsAvatarCounter.vue?vue&type=script&setup=true&lang.ts
|
|
102
102
|
var _hoisted_1$84 = ["aria-label"];
|
|
103
|
-
var _hoisted_2$
|
|
103
|
+
var _hoisted_2$51 = { class: "avatars" };
|
|
104
104
|
var _hoisted_3$36 = {
|
|
105
105
|
key: 0,
|
|
106
106
|
class: "more-count",
|
|
@@ -131,7 +131,7 @@ var KdsAvatarCounter_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/
|
|
|
131
131
|
class: "kds-avatar-counter",
|
|
132
132
|
role: "group",
|
|
133
133
|
"aria-label": ariaLabel.value
|
|
134
|
-
}, [createElementVNode("div", _hoisted_2$
|
|
134
|
+
}, [createElementVNode("div", _hoisted_2$51, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.avatars, (avatar, index) => {
|
|
135
135
|
return openBlock(), createBlock(KdsAvatar_default, mergeProps({
|
|
136
136
|
key: index,
|
|
137
137
|
"aria-hidden": "true",
|
|
@@ -6775,7 +6775,7 @@ var _hoisted_1$80 = [
|
|
|
6775
6775
|
"data-type",
|
|
6776
6776
|
"stroke-width"
|
|
6777
6777
|
];
|
|
6778
|
-
var _hoisted_2$
|
|
6778
|
+
var _hoisted_2$50 = [
|
|
6779
6779
|
"r",
|
|
6780
6780
|
"data-type",
|
|
6781
6781
|
"stroke-width"
|
|
@@ -6846,7 +6846,7 @@ var KdsPortIcon_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__
|
|
|
6846
6846
|
class: normalizeClass({ optional: __props.optional }),
|
|
6847
6847
|
"data-type": __props.type,
|
|
6848
6848
|
"stroke-width": unref(PORT_STROKE_WIDTH)
|
|
6849
|
-
}, null, 10, _hoisted_2$
|
|
6849
|
+
}, null, 10, _hoisted_2$50)) : (openBlock(), createElementBlock("rect", {
|
|
6850
6850
|
key: 2,
|
|
6851
6851
|
width: unref(8) - unref(PORT_STROKE_WIDTH),
|
|
6852
6852
|
height: unref(8) - unref(PORT_STROKE_WIDTH),
|
|
@@ -9584,7 +9584,7 @@ var KdsKeyboardShortcut_default = /*#__PURE__*/ _plugin_vue_export_helper_defaul
|
|
|
9584
9584
|
//#endregion
|
|
9585
9585
|
//#region src/components/accessories/LiveStatus/KdsLiveStatus.vue?vue&type=script&setup=true&lang.ts
|
|
9586
9586
|
var _hoisted_1$79 = ["aria-label"];
|
|
9587
|
-
var _hoisted_2$
|
|
9587
|
+
var _hoisted_2$49 = {
|
|
9588
9588
|
key: 0,
|
|
9589
9589
|
class: "label"
|
|
9590
9590
|
};
|
|
@@ -9614,7 +9614,7 @@ var KdsLiveStatus_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @
|
|
|
9614
9614
|
]),
|
|
9615
9615
|
role: "img",
|
|
9616
9616
|
"aria-label": accessibleTitle.value
|
|
9617
|
-
}, [_cache[0] || (_cache[0] = createElementVNode("span", { class: "dot" }, null, -1)), __props.label ? withDirectives((openBlock(), createElementBlock("span", _hoisted_2$
|
|
9617
|
+
}, [_cache[0] || (_cache[0] = createElementVNode("span", { class: "dot" }, null, -1)), __props.label ? withDirectives((openBlock(), createElementBlock("span", _hoisted_2$49, [createTextVNode(toDisplayString(__props.label), 1)])), [[
|
|
9618
9618
|
unref(vKdsTooltip),
|
|
9619
9619
|
__props.label,
|
|
9620
9620
|
"truncated"
|
|
@@ -9693,7 +9693,7 @@ var KdsMissingValueIcon_default = /*#__PURE__*/ _plugin_vue_export_helper_defaul
|
|
|
9693
9693
|
//#endregion
|
|
9694
9694
|
//#region src/components/accessories/Text/KdsTextHighlight/KdsTextHighlight.vue?vue&type=script&setup=true&lang.ts
|
|
9695
9695
|
var _hoisted_1$77 = { class: "kds-highlighted-text" };
|
|
9696
|
-
var _hoisted_2$
|
|
9696
|
+
var _hoisted_2$48 = {
|
|
9697
9697
|
key: 0,
|
|
9698
9698
|
class: "kds-highlighted-text-match"
|
|
9699
9699
|
};
|
|
@@ -9738,7 +9738,7 @@ var KdsTextHighlight_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/
|
|
|
9738
9738
|
});
|
|
9739
9739
|
return (_ctx, _cache) => {
|
|
9740
9740
|
return openBlock(), createElementBlock("span", _hoisted_1$77, [(openBlock(true), createElementBlock(Fragment, null, renderList(segments.value, (segment, index) => {
|
|
9741
|
-
return openBlock(), createElementBlock(Fragment, { key: index }, [segment.match ? (openBlock(), createElementBlock("mark", _hoisted_2$
|
|
9741
|
+
return openBlock(), createElementBlock(Fragment, { key: index }, [segment.match ? (openBlock(), createElementBlock("mark", _hoisted_2$48, toDisplayString(segment.text), 1)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode(toDisplayString(segment.text), 1)], 64))], 64);
|
|
9742
9742
|
}), 128))]);
|
|
9743
9743
|
};
|
|
9744
9744
|
}
|
|
@@ -10040,7 +10040,7 @@ kdsModalHeight.AUTO, kdsModalWidth.MEDIUM, kdsModalClosedBy.CLOSEREQUEST, { ...k
|
|
|
10040
10040
|
//#endregion
|
|
10041
10041
|
//#region src/layouts/overlays/Modal/KdsModalLayout.vue?vue&type=script&setup=true&lang.ts
|
|
10042
10042
|
var _hoisted_1$74 = { class: "modal-header" };
|
|
10043
|
-
var _hoisted_2$
|
|
10043
|
+
var _hoisted_2$47 = { class: "modal-header-headline" };
|
|
10044
10044
|
var _hoisted_3$34 = ["data-variant"];
|
|
10045
10045
|
var _hoisted_4$30 = {
|
|
10046
10046
|
key: 0,
|
|
@@ -10073,7 +10073,7 @@ var KdsModalLayout_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
|
|
|
10073
10073
|
name: props.leadingIcon,
|
|
10074
10074
|
size: "medium"
|
|
10075
10075
|
}, null, 8, ["name"])) : createCommentVNode("", true),
|
|
10076
|
-
createElementVNode("div", _hoisted_2$
|
|
10076
|
+
createElementVNode("div", _hoisted_2$47, toDisplayString(__props.headline), 1),
|
|
10077
10077
|
createVNode(KdsButton_default, {
|
|
10078
10078
|
"leading-icon": "x-close",
|
|
10079
10079
|
variant: "transparent",
|
|
@@ -10186,7 +10186,7 @@ var KdsModal_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PUR
|
|
|
10186
10186
|
//#endregion
|
|
10187
10187
|
//#region src/components/forms/_helper/KdsSubText.vue?vue&type=script&setup=true&lang.ts
|
|
10188
10188
|
var _hoisted_1$72 = ["id"];
|
|
10189
|
-
var _hoisted_2$
|
|
10189
|
+
var _hoisted_2$46 = { class: "subtext-text" };
|
|
10190
10190
|
//#endregion
|
|
10191
10191
|
//#region src/components/forms/_helper/KdsSubText.vue
|
|
10192
10192
|
var KdsSubText_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
@@ -10242,7 +10242,7 @@ var KdsSubText_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__P
|
|
|
10242
10242
|
size: "small",
|
|
10243
10243
|
variant: "onSurface",
|
|
10244
10244
|
"aria-hidden": "true"
|
|
10245
|
-
})) : createCommentVNode("", true), createElementVNode("span", _hoisted_2$
|
|
10245
|
+
})) : createCommentVNode("", true), createElementVNode("span", _hoisted_2$46, toDisplayString(props.subText), 1)], 10, _hoisted_1$72)) : createCommentVNode("", true);
|
|
10246
10246
|
};
|
|
10247
10247
|
}
|
|
10248
10248
|
}), [["__scopeId", "data-v-1bd6d710"]]);
|
|
@@ -10253,10 +10253,9 @@ var _hoisted_1$71 = [
|
|
|
10253
10253
|
"aria-label",
|
|
10254
10254
|
"aria-checked",
|
|
10255
10255
|
"aria-describedby",
|
|
10256
|
-
"aria-invalid"
|
|
10257
|
-
"tabindex"
|
|
10256
|
+
"aria-invalid"
|
|
10258
10257
|
];
|
|
10259
|
-
var _hoisted_2$
|
|
10258
|
+
var _hoisted_2$45 = { class: "control" };
|
|
10260
10259
|
var _hoisted_3$33 = {
|
|
10261
10260
|
key: 0,
|
|
10262
10261
|
class: "content"
|
|
@@ -10284,8 +10283,7 @@ var BaseCheckbox_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @_
|
|
|
10284
10283
|
preserveSubTextSpace: { type: Boolean },
|
|
10285
10284
|
label: {},
|
|
10286
10285
|
tooltip: {},
|
|
10287
|
-
helperText: {}
|
|
10288
|
-
tabIndex: {}
|
|
10286
|
+
helperText: {}
|
|
10289
10287
|
}, {
|
|
10290
10288
|
"modelValue": { default: false },
|
|
10291
10289
|
"modelModifiers": {}
|
|
@@ -10331,11 +10329,10 @@ var BaseCheckbox_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @_
|
|
|
10331
10329
|
"aria-checked": ariaChecked.value,
|
|
10332
10330
|
"aria-describedby": ariaDescribedBy.value,
|
|
10333
10331
|
"aria-invalid": __props.error,
|
|
10334
|
-
tabindex: props.tabIndex,
|
|
10335
10332
|
type: "button",
|
|
10336
10333
|
role: "checkbox",
|
|
10337
10334
|
onClick: handleClick
|
|
10338
|
-
}, [createElementVNode("div", _hoisted_2$
|
|
10335
|
+
}, [createElementVNode("div", _hoisted_2$45, [icon.value ? (openBlock(), createBlock(KdsIcon_default, {
|
|
10339
10336
|
key: 0,
|
|
10340
10337
|
name: icon.value,
|
|
10341
10338
|
class: "icon",
|
|
@@ -10357,7 +10354,7 @@ var BaseCheckbox_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @_
|
|
|
10357
10354
|
])])) : createCommentVNode("", true)]);
|
|
10358
10355
|
};
|
|
10359
10356
|
}
|
|
10360
|
-
}), [["__scopeId", "data-v-
|
|
10357
|
+
}), [["__scopeId", "data-v-74caccc8"]]);
|
|
10361
10358
|
//#endregion
|
|
10362
10359
|
//#region src/components/forms/Checkbox/KdsCheckbox.vue
|
|
10363
10360
|
var KdsCheckbox_default = /* @__PURE__ */ defineComponent({
|
|
@@ -10501,7 +10498,7 @@ var _hoisted_1$70 = {
|
|
|
10501
10498
|
key: 1,
|
|
10502
10499
|
class: "confirmation"
|
|
10503
10500
|
};
|
|
10504
|
-
var _hoisted_2$
|
|
10501
|
+
var _hoisted_2$44 = { class: "message" };
|
|
10505
10502
|
var _hoisted_3$32 = {
|
|
10506
10503
|
key: 0,
|
|
10507
10504
|
class: "ask-again"
|
|
@@ -10553,7 +10550,7 @@ var KdsDynamicModalProvider_default = /*#__PURE__*/ _plugin_vue_export_helper_de
|
|
|
10553
10550
|
return openBlock(), createBlock(KdsModal_default, mergeProps({ class: "confirm-modal" }, kdsModalProps.value), createSlots({ _: 2 }, [
|
|
10554
10551
|
unref(config)?.type === "confirm" ? {
|
|
10555
10552
|
name: "body",
|
|
10556
|
-
fn: withCtx(() => [unref(internal).isTemplateBasedConfirm(unref(config).value) ? (openBlock(), createBlock(resolveDynamicComponent(unref(config).value.component), { key: 0 })) : (openBlock(), createElementBlock("div", _hoisted_1$70, [createElementVNode("div", _hoisted_2$
|
|
10553
|
+
fn: withCtx(() => [unref(internal).isTemplateBasedConfirm(unref(config).value) ? (openBlock(), createBlock(resolveDynamicComponent(unref(config).value.component), { key: 0 })) : (openBlock(), createElementBlock("div", _hoisted_1$70, [createElementVNode("div", _hoisted_2$44, toDisplayString(unref(config).value.message), 1), unref(config).value.doNotAskAgain ? (openBlock(), createElementBlock("div", _hoisted_3$32, [createVNode(KdsCheckbox_default, {
|
|
10557
10554
|
modelValue: askAgain.value,
|
|
10558
10555
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => askAgain.value = $event),
|
|
10559
10556
|
label: unref(config).value.doNotAskAgain.label,
|
|
@@ -10637,7 +10634,7 @@ var KdsSideDrawer_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @
|
|
|
10637
10634
|
//#endregion
|
|
10638
10635
|
//#region src/components/buttons/links/KdsLink/KdsLink.vue?vue&type=script&setup=true&lang.ts
|
|
10639
10636
|
var _hoisted_1$68 = { class: "label" };
|
|
10640
|
-
var _hoisted_2$
|
|
10637
|
+
var _hoisted_2$43 = {
|
|
10641
10638
|
key: 0,
|
|
10642
10639
|
class: "file-size"
|
|
10643
10640
|
};
|
|
@@ -10721,7 +10718,7 @@ var KdsLink_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE
|
|
|
10721
10718
|
"aria-disabled": __props.disabled ? "true" : void 0,
|
|
10722
10719
|
onClick
|
|
10723
10720
|
}, {
|
|
10724
|
-
default: withCtx(() => [createElementVNode("span", _hoisted_1$68, toDisplayString(__props.label), 1), normalizedFileSize.value ? (openBlock(), createElementBlock("span", _hoisted_2$
|
|
10721
|
+
default: withCtx(() => [createElementVNode("span", _hoisted_1$68, toDisplayString(__props.label), 1), normalizedFileSize.value ? (openBlock(), createElementBlock("span", _hoisted_2$43, toDisplayString(normalizedFileSize.value), 1)) : createCommentVNode("", true)]),
|
|
10725
10722
|
_: 1
|
|
10726
10723
|
}, 8, [
|
|
10727
10724
|
"class",
|
|
@@ -10791,7 +10788,7 @@ var kdsToggleButtonVariants = Object.values(kdsToggleButtonVariant);
|
|
|
10791
10788
|
//#endregion
|
|
10792
10789
|
//#region src/components/buttons/KdsProgressButton/KdsProgressButton.vue?vue&type=script&setup=true&lang.ts
|
|
10793
10790
|
var _hoisted_1$67 = ["data-visible"];
|
|
10794
|
-
var _hoisted_2$
|
|
10791
|
+
var _hoisted_2$42 = ["data-visible"];
|
|
10795
10792
|
//#endregion
|
|
10796
10793
|
//#region src/components/buttons/KdsProgressButton/KdsProgressButton.vue
|
|
10797
10794
|
var KdsProgressButton_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
@@ -10857,7 +10854,7 @@ var KdsProgressButton_default = /*#__PURE__*/ _plugin_vue_export_helper_default(
|
|
|
10857
10854
|
}, [createVNode(KdsLoadingSpinner_default, {
|
|
10858
10855
|
size: iconSize.value,
|
|
10859
10856
|
variant: __props.variant === "filled" ? "onPrimary" : "onSurface"
|
|
10860
|
-
}, null, 8, ["size", "variant"])], 8, _hoisted_2$
|
|
10857
|
+
}, null, 8, ["size", "variant"])], 8, _hoisted_2$42)], 2)]),
|
|
10861
10858
|
_: 1
|
|
10862
10859
|
}, 16, ["data-kds-progress-state"]);
|
|
10863
10860
|
};
|
|
@@ -11012,7 +11009,7 @@ var _hoisted_1$66 = [
|
|
|
11012
11009
|
"aria-selected",
|
|
11013
11010
|
"aria-disabled"
|
|
11014
11011
|
];
|
|
11015
|
-
var _hoisted_2$
|
|
11012
|
+
var _hoisted_2$41 = {
|
|
11016
11013
|
key: 0,
|
|
11017
11014
|
class: "accessory"
|
|
11018
11015
|
};
|
|
@@ -11125,7 +11122,7 @@ var KdsListItem_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__
|
|
|
11125
11122
|
]),
|
|
11126
11123
|
onClick
|
|
11127
11124
|
}, [
|
|
11128
|
-
props.accessory ? (openBlock(), createElementBlock("span", _hoisted_2$
|
|
11125
|
+
props.accessory ? (openBlock(), createElementBlock("span", _hoisted_2$41, [createVNode(_Accessory_default, {
|
|
11129
11126
|
accessory: props.accessory,
|
|
11130
11127
|
size: accessorySize.value,
|
|
11131
11128
|
disabled: __props.disabled
|
|
@@ -11182,7 +11179,7 @@ var KdsListItem_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__
|
|
|
11182
11179
|
//#endregion
|
|
11183
11180
|
//#region src/components/lists/ListContainer/ListItem/ListItemSectionTitle/ListItemSectionTitle.vue?vue&type=script&setup=true&lang.ts
|
|
11184
11181
|
var _hoisted_1$65 = { class: "kds-list-item-section-title" };
|
|
11185
|
-
var _hoisted_2$
|
|
11182
|
+
var _hoisted_2$40 = {
|
|
11186
11183
|
key: 0,
|
|
11187
11184
|
class: "icon"
|
|
11188
11185
|
};
|
|
@@ -11198,7 +11195,7 @@ var ListItemSectionTitle_default = /*#__PURE__*/ _plugin_vue_export_helper_defau
|
|
|
11198
11195
|
setup(__props) {
|
|
11199
11196
|
const props = __props;
|
|
11200
11197
|
return (_ctx, _cache) => {
|
|
11201
|
-
return openBlock(), createElementBlock("div", _hoisted_1$65, [props.leadingIcon ? (openBlock(), createElementBlock("span", _hoisted_2$
|
|
11198
|
+
return openBlock(), createElementBlock("div", _hoisted_1$65, [props.leadingIcon ? (openBlock(), createElementBlock("span", _hoisted_2$40, [createVNode(KdsIcon_default, {
|
|
11202
11199
|
name: props.leadingIcon,
|
|
11203
11200
|
size: "small"
|
|
11204
11201
|
}, null, 8, ["name"])])) : createCommentVNode("", true), withDirectives((openBlock(), createElementBlock("span", _hoisted_3$30, [createTextVNode(toDisplayString(props.label), 1)])), [[
|
|
@@ -11392,7 +11389,7 @@ var _hoisted_1$64 = [
|
|
|
11392
11389
|
"aria-label",
|
|
11393
11390
|
"aria-activedescendant"
|
|
11394
11391
|
];
|
|
11395
|
-
var _hoisted_2$
|
|
11392
|
+
var _hoisted_2$39 = ["id"];
|
|
11396
11393
|
//#endregion
|
|
11397
11394
|
//#region src/components/lists/MenuContainer/KdsMenuContainer.vue
|
|
11398
11395
|
var KdsMenuContainer_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
@@ -11670,7 +11667,7 @@ var KdsMenuContainer_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/
|
|
|
11670
11667
|
"id",
|
|
11671
11668
|
"ariaLabel",
|
|
11672
11669
|
"items"
|
|
11673
|
-
])], 44, _hoisted_2$
|
|
11670
|
+
])], 44, _hoisted_2$39)]),
|
|
11674
11671
|
_: 2
|
|
11675
11672
|
}, 1032, [
|
|
11676
11673
|
"item",
|
|
@@ -11928,7 +11925,7 @@ var ActionButton_default = /* @__PURE__ */ defineComponent({
|
|
|
11928
11925
|
//#endregion
|
|
11929
11926
|
//#region src/components/feedback/EmptyState/KdsEmptyState.vue?vue&type=script&setup=true&lang.ts
|
|
11930
11927
|
var _hoisted_1$63 = ["aria-disabled"];
|
|
11931
|
-
var _hoisted_2$
|
|
11928
|
+
var _hoisted_2$38 = { class: "kds-empty-state-headline" };
|
|
11932
11929
|
var _hoisted_3$29 = {
|
|
11933
11930
|
key: 1,
|
|
11934
11931
|
class: "kds-empty-state-description"
|
|
@@ -11975,7 +11972,7 @@ var KdsEmptyState_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @
|
|
|
11975
11972
|
variant: "onSurface",
|
|
11976
11973
|
"aria-hidden": "true"
|
|
11977
11974
|
})) : createCommentVNode("", true),
|
|
11978
|
-
createElementVNode("p", _hoisted_2$
|
|
11975
|
+
createElementVNode("p", _hoisted_2$38, toDisplayString(props.headline), 1),
|
|
11979
11976
|
props.description ? (openBlock(), createElementBlock("p", _hoisted_3$29, toDisplayString(props.description), 1)) : createCommentVNode("", true),
|
|
11980
11977
|
resolvedPrimaryAction.value ? (openBlock(), createElementBlock("div", _hoisted_4$27, [createVNode(ActionButton_default, mergeProps(resolvedPrimaryAction.value, { size: "small" }), null, 16), resolvedSecondaryAction.value ? (openBlock(), createBlock(ActionButton_default, mergeProps({ key: 0 }, resolvedSecondaryAction.value, { size: "small" }), null, 16)) : createCommentVNode("", true)])) : createCommentVNode("", true)
|
|
11981
11978
|
], 10, _hoisted_1$63);
|
|
@@ -12212,7 +12209,7 @@ var KdsListContainer_default = /*#__PURE__*/ _plugin_vue_export_helper_default(K
|
|
|
12212
12209
|
//#endregion
|
|
12213
12210
|
//#region src/components/lists/ListContainer/ListItem/ListItemButton/KdsListItemButton.vue?vue&type=script&setup=true&lang.ts
|
|
12214
12211
|
var _hoisted_1$61 = ["disabled"];
|
|
12215
|
-
var _hoisted_2$
|
|
12212
|
+
var _hoisted_2$37 = { class: "label" };
|
|
12216
12213
|
//#endregion
|
|
12217
12214
|
//#region src/components/lists/ListContainer/ListItem/ListItemButton/KdsListItemButton.vue
|
|
12218
12215
|
var KdsListItemButton_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
@@ -12239,7 +12236,7 @@ var KdsListItemButton_default = /*#__PURE__*/ _plugin_vue_export_helper_default(
|
|
|
12239
12236
|
name: props.leadingIcon,
|
|
12240
12237
|
size: "small",
|
|
12241
12238
|
disabled: __props.disabled
|
|
12242
|
-
}, null, 8, ["name", "disabled"]), withDirectives((openBlock(), createElementBlock("span", _hoisted_2$
|
|
12239
|
+
}, null, 8, ["name", "disabled"]), withDirectives((openBlock(), createElementBlock("span", _hoisted_2$37, [createTextVNode(toDisplayString(props.label), 1)])), [[
|
|
12243
12240
|
unref(vKdsTooltip),
|
|
12244
12241
|
props.label,
|
|
12245
12242
|
"truncated"
|
|
@@ -12823,7 +12820,7 @@ var _hoisted_1$60 = {
|
|
|
12823
12820
|
key: 0,
|
|
12824
12821
|
class: "icon-wrapper leading"
|
|
12825
12822
|
};
|
|
12826
|
-
var _hoisted_2$
|
|
12823
|
+
var _hoisted_2$36 = {
|
|
12827
12824
|
key: 1,
|
|
12828
12825
|
class: "leading-slot"
|
|
12829
12826
|
};
|
|
@@ -13020,7 +13017,7 @@ focus: focusInput });
|
|
|
13020
13017
|
key: 0,
|
|
13021
13018
|
name: props.leadingIcon
|
|
13022
13019
|
}, null, 8, ["name"])) : createCommentVNode("", true)])) : createCommentVNode("", true),
|
|
13023
|
-
_ctx.$slots.leading ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
13020
|
+
_ctx.$slots.leading ? (openBlock(), createElementBlock("div", _hoisted_2$36, [renderSlot(_ctx.$slots, "leading", {}, void 0, true)])) : createCommentVNode("", true),
|
|
13024
13021
|
createElementVNode("input", {
|
|
13025
13022
|
id: props.id,
|
|
13026
13023
|
ref: "input",
|
|
@@ -13135,7 +13132,7 @@ var countSearchableOptions = (options) => options.filter((option) => !option.sec
|
|
|
13135
13132
|
//#endregion
|
|
13136
13133
|
//#region src/components/forms/selects/Dropdown/MultiSelectDropdownContainer.vue?vue&type=script&setup=true&lang.ts
|
|
13137
13134
|
var _hoisted_1$59 = { class: "kds-multi-select-dropdown-options" };
|
|
13138
|
-
var _hoisted_2$
|
|
13135
|
+
var _hoisted_2$35 = {
|
|
13139
13136
|
key: 0,
|
|
13140
13137
|
class: "kds-multi-select-dropdown-search"
|
|
13141
13138
|
};
|
|
@@ -13278,7 +13275,7 @@ var MultiSelectDropdownContainer_default = /*#__PURE__*/ _plugin_vue_export_help
|
|
|
13278
13275
|
} });
|
|
13279
13276
|
return (_ctx, _cache) => {
|
|
13280
13277
|
return openBlock(), createElementBlock("div", _hoisted_1$59, [
|
|
13281
|
-
searchable.value ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
13278
|
+
searchable.value ? (openBlock(), createElementBlock("div", _hoisted_2$35, [createVNode(BaseInput_default, {
|
|
13282
13279
|
ref_key: "searchEl",
|
|
13283
13280
|
ref: searchEl,
|
|
13284
13281
|
modelValue: searchValue.value,
|
|
@@ -13508,7 +13505,7 @@ var KdsMultiSelectButton_default = /* @__PURE__ */ defineComponent({
|
|
|
13508
13505
|
//#endregion
|
|
13509
13506
|
//#region src/components/forms/selects/Dropdown/DropdownContainer.vue?vue&type=script&setup=true&lang.ts
|
|
13510
13507
|
var _hoisted_1$58 = { class: "kds-dropdown-container" };
|
|
13511
|
-
var _hoisted_2$
|
|
13508
|
+
var _hoisted_2$34 = {
|
|
13512
13509
|
key: 0,
|
|
13513
13510
|
class: "kds-dropdown-container-sticky-top"
|
|
13514
13511
|
};
|
|
@@ -13570,7 +13567,7 @@ var DropdownContainer_default = /*#__PURE__*/ _plugin_vue_export_helper_default(
|
|
|
13570
13567
|
listContainerRef.value?.scrollSelectedIntoView();
|
|
13571
13568
|
} });
|
|
13572
13569
|
return (_ctx, _cache) => {
|
|
13573
|
-
return openBlock(), createElementBlock("div", _hoisted_1$58, [searchable.value ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
13570
|
+
return openBlock(), createElementBlock("div", _hoisted_1$58, [searchable.value ? (openBlock(), createElementBlock("div", _hoisted_2$34, [createVNode(BaseInput_default, {
|
|
13574
13571
|
ref_key: "searchEl",
|
|
13575
13572
|
ref: searchEl,
|
|
13576
13573
|
modelValue: searchValue.value,
|
|
@@ -14030,7 +14027,7 @@ var _hoisted_1$56 = {
|
|
|
14030
14027
|
key: 1,
|
|
14031
14028
|
class: "breadcrumb-label"
|
|
14032
14029
|
};
|
|
14033
|
-
var _hoisted_2$
|
|
14030
|
+
var _hoisted_2$33 = ["aria-label", "aria-current"];
|
|
14034
14031
|
var _hoisted_3$26 = {
|
|
14035
14032
|
key: 1,
|
|
14036
14033
|
class: "breadcrumb-label"
|
|
@@ -14094,7 +14091,7 @@ var BreadcrumbItem_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
|
|
|
14094
14091
|
unref(vKdsTooltip),
|
|
14095
14092
|
__props.item.title,
|
|
14096
14093
|
"truncated"
|
|
14097
|
-
]]) : createCommentVNode("", true)], 8, _hoisted_2$
|
|
14094
|
+
]]) : createCommentVNode("", true)], 8, _hoisted_2$33)) : (openBlock(), createElementBlock("span", {
|
|
14098
14095
|
key: 2,
|
|
14099
14096
|
class: "kds-breadcrumb-item",
|
|
14100
14097
|
"aria-label": __props.item.ariaLabel,
|
|
@@ -14301,7 +14298,7 @@ var BaseMessage_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__
|
|
|
14301
14298
|
//#endregion
|
|
14302
14299
|
//#region src/components/feedback/Banner/KdsBanner.vue?vue&type=script&setup=true&lang.ts
|
|
14303
14300
|
var _hoisted_1$53 = { class: "icon-wrapper" };
|
|
14304
|
-
var _hoisted_2$
|
|
14301
|
+
var _hoisted_2$32 = { class: "content" };
|
|
14305
14302
|
var _hoisted_3$25 = { class: "description" };
|
|
14306
14303
|
var _hoisted_4$24 = {
|
|
14307
14304
|
key: 0,
|
|
@@ -14328,7 +14325,7 @@ var KdsBanner_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PU
|
|
|
14328
14325
|
class: "kds-feedback-icon",
|
|
14329
14326
|
name: iconName.value,
|
|
14330
14327
|
size: "medium"
|
|
14331
|
-
}, null, 8, ["name"])]), createElementVNode("div", _hoisted_2$
|
|
14328
|
+
}, null, 8, ["name"])]), createElementVNode("div", _hoisted_2$32, [createElementVNode("div", _hoisted_3$25, toDisplayString(props.description), 1), __props.actions?.length ? (openBlock(), createElementBlock("div", _hoisted_4$24, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.actions, (button) => {
|
|
14332
14329
|
return openBlock(), createBlock(ActionButton_default, mergeProps({ key: button.props.label ?? button.props.ariaLabel }, { ref_for: true }, button, { size: "small" }), null, 16);
|
|
14333
14330
|
}), 128))])) : createCommentVNode("", true)])]),
|
|
14334
14331
|
_: 1
|
|
@@ -14348,7 +14345,7 @@ var kdsFeedbackVariants = Object.values(kdsFeedbackVariant);
|
|
|
14348
14345
|
//#endregion
|
|
14349
14346
|
//#region src/components/feedback/InlineMessage/KdsInlineMessage.vue?vue&type=script&setup=true&lang.ts
|
|
14350
14347
|
var _hoisted_1$52 = { class: "header" };
|
|
14351
|
-
var _hoisted_2$
|
|
14348
|
+
var _hoisted_2$31 = { class: "headline" };
|
|
14352
14349
|
var _hoisted_3$24 = {
|
|
14353
14350
|
key: 0,
|
|
14354
14351
|
class: "body"
|
|
@@ -14380,7 +14377,7 @@ var KdsInlineMessage_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/
|
|
|
14380
14377
|
class: "kds-feedback-icon",
|
|
14381
14378
|
name: iconName.value,
|
|
14382
14379
|
size: "small"
|
|
14383
|
-
}, null, 8, ["name"]), createElementVNode("div", _hoisted_2$
|
|
14380
|
+
}, null, 8, ["name"]), createElementVNode("div", _hoisted_2$31, toDisplayString(props.headline), 1)]),
|
|
14384
14381
|
props.description ? (openBlock(), createElementBlock("div", _hoisted_3$24, toDisplayString(props.description), 1)) : createCommentVNode("", true),
|
|
14385
14382
|
__props.actions?.length ? (openBlock(), createElementBlock("div", _hoisted_4$23, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.actions, (button) => {
|
|
14386
14383
|
return openBlock(), createBlock(ActionButton_default, mergeProps({ key: button.props.label ?? button.props.ariaLabel }, { ref_for: true }, button, { size: "small" }), null, 16);
|
|
@@ -14420,7 +14417,7 @@ var _hoisted_1$51 = {
|
|
|
14420
14417
|
key: 0,
|
|
14421
14418
|
class: "header"
|
|
14422
14419
|
};
|
|
14423
|
-
var _hoisted_2$
|
|
14420
|
+
var _hoisted_2$30 = {
|
|
14424
14421
|
key: 0,
|
|
14425
14422
|
class: "headline"
|
|
14426
14423
|
};
|
|
@@ -14541,7 +14538,7 @@ var KdsLimitBar_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__
|
|
|
14541
14538
|
const descriptionId = useId();
|
|
14542
14539
|
return (_ctx, _cache) => {
|
|
14543
14540
|
return withDirectives((openBlock(), createElementBlock("div", { class: normalizeClass(["kds-limit-bar", stateClass.value]) }, [
|
|
14544
|
-
showHeader.value ? (openBlock(), createElementBlock("div", _hoisted_1$51, [__props.headline ? (openBlock(), createElementBlock("span", _hoisted_2$
|
|
14541
|
+
showHeader.value ? (openBlock(), createElementBlock("div", _hoisted_1$51, [__props.headline ? (openBlock(), createElementBlock("span", _hoisted_2$30, toDisplayString(__props.headline), 1)) : createCommentVNode("", true), activeThreshold.value ? (openBlock(), createBlock(unref(KdsBadge_default), {
|
|
14545
14542
|
key: 1,
|
|
14546
14543
|
class: "badge",
|
|
14547
14544
|
size: "xxsmall",
|
|
@@ -14592,7 +14589,7 @@ var _hoisted_1$50 = {
|
|
|
14592
14589
|
key: 0,
|
|
14593
14590
|
class: "kds-loading-skeleton-headline-with-paragraph"
|
|
14594
14591
|
};
|
|
14595
|
-
var _hoisted_2$
|
|
14592
|
+
var _hoisted_2$29 = { class: "kds-loading-skeleton-paragraph-lines" };
|
|
14596
14593
|
var _hoisted_3$22 = {
|
|
14597
14594
|
key: 1,
|
|
14598
14595
|
class: "kds-loading-skeleton-input-with-label"
|
|
@@ -14618,7 +14615,7 @@ var KdsLoadingSkeleton_default = /*#__PURE__*/ _plugin_vue_export_helper_default
|
|
|
14618
14615
|
return openBlock(), createElementBlock(Fragment, { key: `skeleton-${index}` }, [__props.variant === "headline-with-paragraph" ? (openBlock(), createElementBlock("div", _hoisted_1$50, [createVNode(LoadingSkeletonItem_default, {
|
|
14619
14616
|
shape: "text",
|
|
14620
14617
|
class: "headline"
|
|
14621
|
-
}), createElementVNode("div", _hoisted_2$
|
|
14618
|
+
}), createElementVNode("div", _hoisted_2$29, [
|
|
14622
14619
|
createVNode(LoadingSkeletonItem_default, { shape: "text" }),
|
|
14623
14620
|
createVNode(LoadingSkeletonItem_default, { shape: "text" }),
|
|
14624
14621
|
createVNode(LoadingSkeletonItem_default, { shape: "text" })
|
|
@@ -14711,7 +14708,7 @@ var KdsProgressBar_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
|
|
|
14711
14708
|
//#endregion
|
|
14712
14709
|
//#region src/components/forms/_helper/KdsLabel.vue?vue&type=script&setup=true&lang.ts
|
|
14713
14710
|
var _hoisted_1$48 = { class: "kds-label-wrapper" };
|
|
14714
|
-
var _hoisted_2$
|
|
14711
|
+
var _hoisted_2$28 = ["id", "for"];
|
|
14715
14712
|
//#endregion
|
|
14716
14713
|
//#region src/components/forms/_helper/KdsLabel.vue
|
|
14717
14714
|
var KdsLabel_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
@@ -14734,7 +14731,7 @@ var KdsLabel_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PUR
|
|
|
14734
14731
|
id: props.id,
|
|
14735
14732
|
for: props.for,
|
|
14736
14733
|
class: "label"
|
|
14737
|
-
}, [createTextVNode(toDisplayString(props.label), 1)], 8, _hoisted_2$
|
|
14734
|
+
}, [createTextVNode(toDisplayString(props.label), 1)], 8, _hoisted_2$28)), [[
|
|
14738
14735
|
unref(vKdsTooltip),
|
|
14739
14736
|
props.label,
|
|
14740
14737
|
"truncated"
|
|
@@ -14755,7 +14752,7 @@ var _hoisted_1$47 = [
|
|
|
14755
14752
|
"aria-labelledby",
|
|
14756
14753
|
"aria-describedby"
|
|
14757
14754
|
];
|
|
14758
|
-
var _hoisted_2$
|
|
14755
|
+
var _hoisted_2$27 = ["id"];
|
|
14759
14756
|
var _hoisted_3$21 = { class: "legend-text" };
|
|
14760
14757
|
var _hoisted_4$20 = { class: "kds-fieldset-content" };
|
|
14761
14758
|
//#endregion
|
|
@@ -14804,7 +14801,7 @@ var BaseFieldsetWrapper_default = /*#__PURE__*/ _plugin_vue_export_helper_defaul
|
|
|
14804
14801
|
key: 0,
|
|
14805
14802
|
content: props.description,
|
|
14806
14803
|
hidden: !isHovered.value
|
|
14807
|
-
}, null, 8, ["content", "hidden"])) : createCommentVNode("", true)], 8, _hoisted_2$
|
|
14804
|
+
}, null, 8, ["content", "hidden"])) : createCommentVNode("", true)], 8, _hoisted_2$27)) : createCommentVNode("", true),
|
|
14808
14805
|
createElementVNode("div", _hoisted_4$20, [renderSlot(_ctx.$slots, "default", {}, void 0, true)]),
|
|
14809
14806
|
createVNode(KdsSubText_default, {
|
|
14810
14807
|
id: subTextId.value,
|
|
@@ -14824,116 +14821,6 @@ var BaseFieldsetWrapper_default = /*#__PURE__*/ _plugin_vue_export_helper_defaul
|
|
|
14824
14821
|
}
|
|
14825
14822
|
}), [["__scopeId", "data-v-70509f83"]]);
|
|
14826
14823
|
//#endregion
|
|
14827
|
-
//#region src/components/forms/_helper/useRovingFocus.ts
|
|
14828
|
-
/**
|
|
14829
|
-
* Shared roving-tabindex keyboard behaviour for a group of buttons (radio
|
|
14830
|
-
* buttons, checkboxes): the group is a single tab stop and
|
|
14831
|
-
* the arrow keys / Home / End move focus between the enabled options, skipping
|
|
14832
|
-
* disabled ones and wrapping around.
|
|
14833
|
-
*
|
|
14834
|
-
* Deciding which option is the tab stop or what happens on
|
|
14835
|
-
* focus move is handled by each group itself.
|
|
14836
|
-
*/
|
|
14837
|
-
var useRovingFocus = ({ options, role, preferredIndex, globalDisable, globalError, optionContainer, onNavigate, onActivate }) => {
|
|
14838
|
-
const isIndexDisabled = (index) => globalDisable?.value || options.value[index]?.disabled === true;
|
|
14839
|
-
const hasError = computed(() => globalError?.value || options.value.some((o) => o.error));
|
|
14840
|
-
const firstEnabledIndex = computed(() => options.value.findIndex((_, index) => !isIndexDisabled(index)));
|
|
14841
|
-
const lastEnabledIndex = computed(() => options.value.findLastIndex((_, index) => !isIndexDisabled(index)));
|
|
14842
|
-
/**
|
|
14843
|
-
* The single option that participates in the tab sequence. A preferred index
|
|
14844
|
-
* pointing at a disabled option is ignored — otherwise that option would be
|
|
14845
|
-
* skipped by `tabIndexForOption` while still claiming the tab stop, leaving
|
|
14846
|
-
* the group with no tab stop at all and unreachable by keyboard.
|
|
14847
|
-
*/
|
|
14848
|
-
const rovingIndex = computed(() => preferredIndex.value >= 0 && !isIndexDisabled(preferredIndex.value) ? preferredIndex.value : firstEnabledIndex.value);
|
|
14849
|
-
const focusOptionAtIndex = (index) => {
|
|
14850
|
-
(optionContainer?.value?.querySelectorAll(`button[role="${role}"]`))?.[index]?.focus();
|
|
14851
|
-
};
|
|
14852
|
-
const tabIndexForOption = (index) => {
|
|
14853
|
-
if (isIndexDisabled(index)) return;
|
|
14854
|
-
return rovingIndex.value === index ? 0 : -1;
|
|
14855
|
-
};
|
|
14856
|
-
const nextEnabledIndex = (startIndex, direction) => {
|
|
14857
|
-
const total = options.value.length;
|
|
14858
|
-
if (total === 0) return -1;
|
|
14859
|
-
let index = startIndex;
|
|
14860
|
-
for (let i = 0; i < total; i++) {
|
|
14861
|
-
index = (index + direction + total) % total;
|
|
14862
|
-
if (!isIndexDisabled(index)) return index;
|
|
14863
|
-
}
|
|
14864
|
-
return -1;
|
|
14865
|
-
};
|
|
14866
|
-
const navigateTo = (index) => {
|
|
14867
|
-
if (index < 0) return;
|
|
14868
|
-
onNavigate(index);
|
|
14869
|
-
focusOptionAtIndex(index);
|
|
14870
|
-
};
|
|
14871
|
-
const handleKeyDown = (event, currentIndex) => {
|
|
14872
|
-
if (globalDisable?.value) return;
|
|
14873
|
-
if (event.ctrlKey || event.metaKey || event.altKey || event.shiftKey) return;
|
|
14874
|
-
switch (event.key) {
|
|
14875
|
-
case "ArrowDown":
|
|
14876
|
-
case "ArrowRight":
|
|
14877
|
-
event.preventDefault();
|
|
14878
|
-
navigateTo(nextEnabledIndex(currentIndex, 1));
|
|
14879
|
-
return;
|
|
14880
|
-
case "ArrowUp":
|
|
14881
|
-
case "ArrowLeft":
|
|
14882
|
-
event.preventDefault();
|
|
14883
|
-
navigateTo(nextEnabledIndex(currentIndex, -1));
|
|
14884
|
-
return;
|
|
14885
|
-
case "Home":
|
|
14886
|
-
event.preventDefault();
|
|
14887
|
-
navigateTo(firstEnabledIndex.value);
|
|
14888
|
-
return;
|
|
14889
|
-
case "End":
|
|
14890
|
-
event.preventDefault();
|
|
14891
|
-
navigateTo(lastEnabledIndex.value);
|
|
14892
|
-
return;
|
|
14893
|
-
case " ":
|
|
14894
|
-
case "Enter": if (onActivate) {
|
|
14895
|
-
event.preventDefault();
|
|
14896
|
-
onActivate(currentIndex);
|
|
14897
|
-
}
|
|
14898
|
-
}
|
|
14899
|
-
};
|
|
14900
|
-
return {
|
|
14901
|
-
hasError,
|
|
14902
|
-
tabIndexForOption,
|
|
14903
|
-
handleKeyDown
|
|
14904
|
-
};
|
|
14905
|
-
};
|
|
14906
|
-
//#endregion
|
|
14907
|
-
//#region src/components/forms/Checkbox/useCheckboxRovingFocus.ts
|
|
14908
|
-
var useCheckboxRovingFocus = ({ options, selectedIds, globalDisable, globalError, optionContainer }) => {
|
|
14909
|
-
const isOptionDisabled = (index) => globalDisable?.value || options.value[index]?.disabled === true;
|
|
14910
|
-
/** The option that last held focus, and is thus the group's tab stop. */
|
|
14911
|
-
const focusedIndex = ref(-1);
|
|
14912
|
-
const enabledFocusedIndex = computed(() => focusedIndex.value >= 0 && options.value[focusedIndex.value] && !isOptionDisabled(focusedIndex.value) ? focusedIndex.value : -1);
|
|
14913
|
-
const firstCheckedEnabledIndex = computed(() => options.value.findIndex((option, index) => !isOptionDisabled(index) && selectedIds.value.includes(option.id)));
|
|
14914
|
-
const { hasError, tabIndexForOption, handleKeyDown } = useRovingFocus({
|
|
14915
|
-
options,
|
|
14916
|
-
role: "checkbox",
|
|
14917
|
-
preferredIndex: computed(() => enabledFocusedIndex.value >= 0 ? enabledFocusedIndex.value : firstCheckedEnabledIndex.value),
|
|
14918
|
-
globalDisable,
|
|
14919
|
-
globalError,
|
|
14920
|
-
optionContainer,
|
|
14921
|
-
onNavigate: (index) => {
|
|
14922
|
-
focusedIndex.value = index;
|
|
14923
|
-
}
|
|
14924
|
-
});
|
|
14925
|
-
/** Keeps the tab stop in sync when an option is focused directly (e.g. by mouse). */
|
|
14926
|
-
const handleFocus = (index) => {
|
|
14927
|
-
if (!isOptionDisabled(index)) focusedIndex.value = index;
|
|
14928
|
-
};
|
|
14929
|
-
return {
|
|
14930
|
-
hasError,
|
|
14931
|
-
tabIndexForOption,
|
|
14932
|
-
handleFocus,
|
|
14933
|
-
handleKeyDown
|
|
14934
|
-
};
|
|
14935
|
-
};
|
|
14936
|
-
//#endregion
|
|
14937
14824
|
//#region src/components/forms/Checkbox/KdsCheckboxGroup.vue
|
|
14938
14825
|
var KdsCheckboxGroup_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
14939
14826
|
__name: "KdsCheckboxGroup",
|
|
@@ -14973,14 +14860,7 @@ var KdsCheckboxGroup_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/
|
|
|
14973
14860
|
return o;
|
|
14974
14861
|
}));
|
|
14975
14862
|
const isHorizontal = computed(() => __props.alignment === "horizontal");
|
|
14976
|
-
const
|
|
14977
|
-
const { tabIndexForOption, handleFocus, handleKeyDown, hasError } = useCheckboxRovingFocus({
|
|
14978
|
-
options: possibleValues,
|
|
14979
|
-
selectedIds: modelValue,
|
|
14980
|
-
globalDisable: computed(() => __props.disabled),
|
|
14981
|
-
globalError: computed(() => __props.error),
|
|
14982
|
-
optionContainer
|
|
14983
|
-
});
|
|
14863
|
+
const hasError = computed(() => __props.error || possibleValues.value.some((o) => o.error));
|
|
14984
14864
|
const isChecked = (id) => modelValue.value.includes(id);
|
|
14985
14865
|
const handleCheckboxChange = (index, checked) => {
|
|
14986
14866
|
const option = possibleValues.value[index];
|
|
@@ -14996,13 +14876,9 @@ var KdsCheckboxGroup_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/
|
|
|
14996
14876
|
label: props.label,
|
|
14997
14877
|
"sub-text": props.subText,
|
|
14998
14878
|
"preserve-sub-text-space": props.preserveSubTextSpace,
|
|
14999
|
-
error:
|
|
14879
|
+
error: hasError.value
|
|
15000
14880
|
}, {
|
|
15001
|
-
default: withCtx(() => [createElementVNode("div", {
|
|
15002
|
-
ref_key: "optionContainer",
|
|
15003
|
-
ref: optionContainer,
|
|
15004
|
-
class: normalizeClass(["options", { horizontal: isHorizontal.value }])
|
|
15005
|
-
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(possibleValues.value, (option, index) => {
|
|
14881
|
+
default: withCtx(() => [createElementVNode("div", { class: normalizeClass(["options", { horizontal: isHorizontal.value }]) }, [(openBlock(true), createElementBlock(Fragment, null, renderList(possibleValues.value, (option, index) => {
|
|
15006
14882
|
return openBlock(), createElementBlock("div", {
|
|
15007
14883
|
key: option.id,
|
|
15008
14884
|
class: "option"
|
|
@@ -15012,20 +14888,14 @@ var KdsCheckboxGroup_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/
|
|
|
15012
14888
|
"helper-text": option.helperText,
|
|
15013
14889
|
label: option.text,
|
|
15014
14890
|
"model-value": isChecked(option.id),
|
|
15015
|
-
"
|
|
15016
|
-
"onUpdate:modelValue": (checked) => handleCheckboxChange(index, checked),
|
|
15017
|
-
onKeydown: (e) => unref(handleKeyDown)(e, index),
|
|
15018
|
-
onFocusin: () => unref(handleFocus)(index)
|
|
14891
|
+
"onUpdate:modelValue": (checked) => handleCheckboxChange(index, checked)
|
|
15019
14892
|
}, null, 8, [
|
|
15020
14893
|
"disabled",
|
|
15021
14894
|
"error",
|
|
15022
14895
|
"helper-text",
|
|
15023
14896
|
"label",
|
|
15024
14897
|
"model-value",
|
|
15025
|
-
"
|
|
15026
|
-
"onUpdate:modelValue",
|
|
15027
|
-
"onKeydown",
|
|
15028
|
-
"onFocusin"
|
|
14898
|
+
"onUpdate:modelValue"
|
|
15029
14899
|
])]);
|
|
15030
14900
|
}), 128))], 2)]),
|
|
15031
14901
|
_: 1
|
|
@@ -15038,7 +14908,7 @@ var KdsCheckboxGroup_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/
|
|
|
15038
14908
|
]);
|
|
15039
14909
|
};
|
|
15040
14910
|
}
|
|
15041
|
-
}), [["__scopeId", "data-v-
|
|
14911
|
+
}), [["__scopeId", "data-v-6429653c"]]);
|
|
15042
14912
|
//#endregion
|
|
15043
14913
|
//#region src/components/forms/Checkbox/enums.ts
|
|
15044
14914
|
var kdsCheckboxGroupAlignment = {
|
|
@@ -15071,7 +14941,7 @@ var _hoisted_1$46 = [
|
|
|
15071
14941
|
"aria-label",
|
|
15072
14942
|
"aria-checked"
|
|
15073
14943
|
];
|
|
15074
|
-
var _hoisted_2$
|
|
14944
|
+
var _hoisted_2$26 = { class: "control" };
|
|
15075
14945
|
var _hoisted_3$20 = {
|
|
15076
14946
|
class: "knob",
|
|
15077
14947
|
"aria-hidden": "true"
|
|
@@ -15130,7 +15000,7 @@ var KdsToggleSwitch_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
|
|
|
15130
15000
|
type: "button",
|
|
15131
15001
|
role: "switch",
|
|
15132
15002
|
onClick: handleClick
|
|
15133
|
-
}, [createElementVNode("div", _hoisted_2$
|
|
15003
|
+
}, [createElementVNode("div", _hoisted_2$26, [createElementVNode("div", _hoisted_3$20, [createVNode(KdsIcon_default, {
|
|
15134
15004
|
name: isChecked.value ? "checkmark" : "x-close",
|
|
15135
15005
|
size: __props.size === "small" ? "xsmall" : "small"
|
|
15136
15006
|
}, null, 8, ["name", "size"])])]), props.label ? (openBlock(), createElementBlock("div", _hoisted_4$19, [createElementVNode("span", _hoisted_5$12, toDisplayString(props.label), 1)])) : createCommentVNode("", true)], 10, _hoisted_1$46);
|
|
@@ -15145,7 +15015,7 @@ var _hoisted_1$45 = [
|
|
|
15145
15015
|
"aria-invalid",
|
|
15146
15016
|
"disabled"
|
|
15147
15017
|
];
|
|
15148
|
-
var _hoisted_2$
|
|
15018
|
+
var _hoisted_2$25 = { class: "control" };
|
|
15149
15019
|
var _hoisted_3$19 = {
|
|
15150
15020
|
key: 0,
|
|
15151
15021
|
class: "dot",
|
|
@@ -15203,7 +15073,7 @@ var KdsRadioButton_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
|
|
|
15203
15073
|
role: "radio",
|
|
15204
15074
|
type: "button",
|
|
15205
15075
|
onClick: handleClick
|
|
15206
|
-
}, [createElementVNode("div", _hoisted_2$
|
|
15076
|
+
}, [createElementVNode("div", _hoisted_2$25, [modelValue.value ? (openBlock(), createElementBlock("svg", _hoisted_3$19, [..._cache[0] || (_cache[0] = [createElementVNode("circle", {
|
|
15207
15077
|
cx: "1",
|
|
15208
15078
|
cy: "1",
|
|
15209
15079
|
r: "1"
|
|
@@ -15216,6 +15086,86 @@ var KdsRadioButton_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
|
|
|
15216
15086
|
}
|
|
15217
15087
|
}), [["__scopeId", "data-v-fdb5a895"]]);
|
|
15218
15088
|
//#endregion
|
|
15089
|
+
//#region src/components/forms/_helper/useRovingFocus.ts
|
|
15090
|
+
/**
|
|
15091
|
+
* Shared roving-tabindex keyboard behaviour for a group of buttons (radio
|
|
15092
|
+
* buttons, checkboxes): the group is a single tab stop and
|
|
15093
|
+
* the arrow keys / Home / End move focus between the enabled options, skipping
|
|
15094
|
+
* disabled ones and wrapping around.
|
|
15095
|
+
*
|
|
15096
|
+
* Deciding which option is the tab stop or what happens on
|
|
15097
|
+
* focus move is handled by each group itself.
|
|
15098
|
+
*/
|
|
15099
|
+
var useRovingFocus = ({ options, role, preferredIndex, globalDisable, globalError, optionContainer, onNavigate, onActivate }) => {
|
|
15100
|
+
const isIndexDisabled = (index) => globalDisable?.value || options.value[index]?.disabled === true;
|
|
15101
|
+
const hasError = computed(() => globalError?.value || options.value.some((o) => o.error));
|
|
15102
|
+
const firstEnabledIndex = computed(() => options.value.findIndex((_, index) => !isIndexDisabled(index)));
|
|
15103
|
+
const lastEnabledIndex = computed(() => options.value.findLastIndex((_, index) => !isIndexDisabled(index)));
|
|
15104
|
+
/**
|
|
15105
|
+
* The single option that participates in the tab sequence. A preferred index
|
|
15106
|
+
* pointing at a disabled option is ignored — otherwise that option would be
|
|
15107
|
+
* skipped by `tabIndexForOption` while still claiming the tab stop, leaving
|
|
15108
|
+
* the group with no tab stop at all and unreachable by keyboard.
|
|
15109
|
+
*/
|
|
15110
|
+
const rovingIndex = computed(() => preferredIndex.value >= 0 && !isIndexDisabled(preferredIndex.value) ? preferredIndex.value : firstEnabledIndex.value);
|
|
15111
|
+
const focusOptionAtIndex = (index) => {
|
|
15112
|
+
(optionContainer?.value?.querySelectorAll(`button[role="${role}"]`))?.[index]?.focus();
|
|
15113
|
+
};
|
|
15114
|
+
const tabIndexForOption = (index) => {
|
|
15115
|
+
if (isIndexDisabled(index)) return;
|
|
15116
|
+
return rovingIndex.value === index ? 0 : -1;
|
|
15117
|
+
};
|
|
15118
|
+
const nextEnabledIndex = (startIndex, direction) => {
|
|
15119
|
+
const total = options.value.length;
|
|
15120
|
+
if (total === 0) return -1;
|
|
15121
|
+
let index = startIndex;
|
|
15122
|
+
for (let i = 0; i < total; i++) {
|
|
15123
|
+
index = (index + direction + total) % total;
|
|
15124
|
+
if (!isIndexDisabled(index)) return index;
|
|
15125
|
+
}
|
|
15126
|
+
return -1;
|
|
15127
|
+
};
|
|
15128
|
+
const navigateTo = (index) => {
|
|
15129
|
+
if (index < 0) return;
|
|
15130
|
+
onNavigate(index);
|
|
15131
|
+
focusOptionAtIndex(index);
|
|
15132
|
+
};
|
|
15133
|
+
const handleKeyDown = (event, currentIndex) => {
|
|
15134
|
+
if (globalDisable?.value) return;
|
|
15135
|
+
if (event.ctrlKey || event.metaKey || event.altKey || event.shiftKey) return;
|
|
15136
|
+
switch (event.key) {
|
|
15137
|
+
case "ArrowDown":
|
|
15138
|
+
case "ArrowRight":
|
|
15139
|
+
event.preventDefault();
|
|
15140
|
+
navigateTo(nextEnabledIndex(currentIndex, 1));
|
|
15141
|
+
return;
|
|
15142
|
+
case "ArrowUp":
|
|
15143
|
+
case "ArrowLeft":
|
|
15144
|
+
event.preventDefault();
|
|
15145
|
+
navigateTo(nextEnabledIndex(currentIndex, -1));
|
|
15146
|
+
return;
|
|
15147
|
+
case "Home":
|
|
15148
|
+
event.preventDefault();
|
|
15149
|
+
navigateTo(firstEnabledIndex.value);
|
|
15150
|
+
return;
|
|
15151
|
+
case "End":
|
|
15152
|
+
event.preventDefault();
|
|
15153
|
+
navigateTo(lastEnabledIndex.value);
|
|
15154
|
+
return;
|
|
15155
|
+
case " ":
|
|
15156
|
+
case "Enter": if (onActivate) {
|
|
15157
|
+
event.preventDefault();
|
|
15158
|
+
onActivate(currentIndex);
|
|
15159
|
+
}
|
|
15160
|
+
}
|
|
15161
|
+
};
|
|
15162
|
+
return {
|
|
15163
|
+
hasError,
|
|
15164
|
+
tabIndexForOption,
|
|
15165
|
+
handleKeyDown
|
|
15166
|
+
};
|
|
15167
|
+
};
|
|
15168
|
+
//#endregion
|
|
15219
15169
|
//#region src/components/forms/RadioButton/useRadioSelection.ts
|
|
15220
15170
|
var useRadioSelection = ({ selectedId, options, globalDisable, globalError, optionContainer }) => {
|
|
15221
15171
|
const selectedIndex = computed(() => options.value.findIndex((o) => o.id === selectedId.value));
|
|
@@ -15341,7 +15291,7 @@ var _hoisted_1$44 = [
|
|
|
15341
15291
|
"disabled",
|
|
15342
15292
|
"tabindex"
|
|
15343
15293
|
];
|
|
15344
|
-
var _hoisted_2$
|
|
15294
|
+
var _hoisted_2$24 = {
|
|
15345
15295
|
key: 1,
|
|
15346
15296
|
class: "option-label"
|
|
15347
15297
|
};
|
|
@@ -15391,7 +15341,7 @@ var ValueSwitchItem_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
|
|
|
15391
15341
|
name: props.leadingIcon,
|
|
15392
15342
|
size: __props.size
|
|
15393
15343
|
}, null, 8, ["name", "size"])) : createCommentVNode("", true),
|
|
15394
|
-
props.text ? withDirectives((openBlock(), createElementBlock("span", _hoisted_2$
|
|
15344
|
+
props.text ? withDirectives((openBlock(), createElementBlock("span", _hoisted_2$24, [createTextVNode(toDisplayString(props.text), 1)])), [[
|
|
15395
15345
|
unref(vKdsTooltip),
|
|
15396
15346
|
props.text,
|
|
15397
15347
|
"truncated"
|
|
@@ -16401,7 +16351,7 @@ var ColorPickerSlider_default = /*#__PURE__*/ _plugin_vue_export_helper_default(
|
|
|
16401
16351
|
//#endregion
|
|
16402
16352
|
//#region src/components/forms/inputs/ColorInput/ColorPicker/ColorPicker.vue?vue&type=script&setup=true&lang.ts
|
|
16403
16353
|
var _hoisted_1$42 = { class: "kds-color-picker" };
|
|
16404
|
-
var _hoisted_2$
|
|
16354
|
+
var _hoisted_2$23 = ["aria-valuetext"];
|
|
16405
16355
|
var _hoisted_3$18 = { class: "value-inputs" };
|
|
16406
16356
|
var DEFAULT_HUE_DEG = 270;
|
|
16407
16357
|
var DEFAULT_SATURATION = .8;
|
|
@@ -16570,7 +16520,7 @@ var ColorPicker_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__
|
|
|
16570
16520
|
}, [createElementVNode("div", {
|
|
16571
16521
|
class: "handle",
|
|
16572
16522
|
style: normalizeStyle(colorspaceHandleStyle.value)
|
|
16573
|
-
}, null, 4)], 44, _hoisted_2$
|
|
16523
|
+
}, null, 4)], 44, _hoisted_2$23),
|
|
16574
16524
|
createVNode(ColorPickerSlider_default, {
|
|
16575
16525
|
modelValue: hue.value,
|
|
16576
16526
|
"onUpdate:modelValue": [_cache[4] || (_cache[4] = ($event) => hue.value = $event), setModelValueFromHsv],
|
|
@@ -20587,7 +20537,7 @@ var _hoisted_1$41 = {
|
|
|
20587
20537
|
role: "row",
|
|
20588
20538
|
class: "kds-date-picker-header-row"
|
|
20589
20539
|
};
|
|
20590
|
-
var _hoisted_2$
|
|
20540
|
+
var _hoisted_2$22 = ["aria-label"];
|
|
20591
20541
|
var _hoisted_3$17 = { class: "kds-date-picker-day-grid" };
|
|
20592
20542
|
var _hoisted_4$17 = [
|
|
20593
20543
|
"aria-selected",
|
|
@@ -20849,7 +20799,7 @@ var DatePickerDayGrid_default = /*#__PURE__*/ _plugin_vue_export_helper_default(
|
|
|
20849
20799
|
role: "columnheader",
|
|
20850
20800
|
"aria-label": unref(DAY_FULL_LABELS)[i],
|
|
20851
20801
|
class: "kds-date-picker-weekday"
|
|
20852
|
-
}, toDisplayString(day), 9, _hoisted_2$
|
|
20802
|
+
}, toDisplayString(day), 9, _hoisted_2$22);
|
|
20853
20803
|
}), 128))]), createElementVNode("div", _hoisted_3$17, [(openBlock(true), createElementBlock(Fragment, null, renderList(weeks.value, (week, wi) => {
|
|
20854
20804
|
return openBlock(), createElementBlock("div", {
|
|
20855
20805
|
key: wi,
|
|
@@ -21201,7 +21151,7 @@ var DatePickerYearGrid_default = /*#__PURE__*/ _plugin_vue_export_helper_default
|
|
|
21201
21151
|
//#endregion
|
|
21202
21152
|
//#region src/components/forms/inputs/DateInput/KdsDatePicker.vue?vue&type=script&setup=true&lang.ts
|
|
21203
21153
|
var _hoisted_1$38 = { class: "kds-date-picker" };
|
|
21204
|
-
var _hoisted_2$
|
|
21154
|
+
var _hoisted_2$21 = { class: "kds-date-picker-header" };
|
|
21205
21155
|
var _hoisted_3$16 = { class: "kds-date-picker-nav-block" };
|
|
21206
21156
|
var _hoisted_4$16 = {
|
|
21207
21157
|
key: 1,
|
|
@@ -21363,7 +21313,7 @@ var KdsDatePicker_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @
|
|
|
21363
21313
|
});
|
|
21364
21314
|
__expose({ focus });
|
|
21365
21315
|
return (_ctx, _cache) => {
|
|
21366
|
-
return openBlock(), createElementBlock("div", _hoisted_1$38, [createElementVNode("div", _hoisted_2$
|
|
21316
|
+
return openBlock(), createElementBlock("div", _hoisted_1$38, [createElementVNode("div", _hoisted_2$21, [
|
|
21367
21317
|
createElementVNode("div", _hoisted_3$16, [view.value === "day" ? (openBlock(), createBlock(KdsButton_default, {
|
|
21368
21318
|
key: 0,
|
|
21369
21319
|
variant: "transparent",
|
|
@@ -22509,7 +22459,7 @@ var KdsTextarea_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__
|
|
|
22509
22459
|
//#endregion
|
|
22510
22460
|
//#region src/components/forms/inputs/TimeInput/TimePicker.vue?vue&type=script&setup=true&lang.ts
|
|
22511
22461
|
var _hoisted_1$35 = { class: "kds-time-picker" };
|
|
22512
|
-
var _hoisted_2$
|
|
22462
|
+
var _hoisted_2$20 = { class: "kds-time-picker-fields" };
|
|
22513
22463
|
var _hoisted_3$15 = { class: "kds-time-picker-fields" };
|
|
22514
22464
|
var _hoisted_4$15 = {
|
|
22515
22465
|
key: 0,
|
|
@@ -22599,7 +22549,7 @@ var TimePicker_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__P
|
|
|
22599
22549
|
__expose({ focus });
|
|
22600
22550
|
return (_ctx, _cache) => {
|
|
22601
22551
|
return openBlock(), createElementBlock("div", _hoisted_1$35, [
|
|
22602
|
-
createElementVNode("div", _hoisted_2$
|
|
22552
|
+
createElementVNode("div", _hoisted_2$20, [createVNode(KdsNumberInput_default, {
|
|
22603
22553
|
ref: "hourInput",
|
|
22604
22554
|
modelValue: hour.value,
|
|
22605
22555
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => hour.value = $event),
|
|
@@ -23210,7 +23160,7 @@ var toTitleCase = (key) => key.charAt(0).toUpperCase() + key.slice(1).toLowerCas
|
|
|
23210
23160
|
//#endregion
|
|
23211
23161
|
//#region src/components/forms/inputs/IntervalInput/IntervalInputPopover.vue?vue&type=script&setup=true&lang.ts
|
|
23212
23162
|
var _hoisted_1$34 = { class: "kds-interval-popover" };
|
|
23213
|
-
var _hoisted_2$
|
|
23163
|
+
var _hoisted_2$19 = { class: "kds-interval-popover-header" };
|
|
23214
23164
|
var _hoisted_3$14 = { class: "kds-interval-popover-content" };
|
|
23215
23165
|
var _hoisted_4$14 = { class: "kds-interval-popover-grid" };
|
|
23216
23166
|
//#endregion
|
|
@@ -23305,7 +23255,7 @@ var IntervalInputPopover_default = /*#__PURE__*/ _plugin_vue_export_helper_defau
|
|
|
23305
23255
|
});
|
|
23306
23256
|
return (_ctx, _cache) => {
|
|
23307
23257
|
return openBlock(), createElementBlock("div", _hoisted_1$34, [
|
|
23308
|
-
createElementVNode("div", _hoisted_2$
|
|
23258
|
+
createElementVNode("div", _hoisted_2$19, [_cache[2] || (_cache[2] = createElementVNode("span", { class: "kds-interval-popover-title" }, "Interval value", -1)), props.format === unref(kdsIntervalInputFormat).DATE_OR_TIME ? (openBlock(), createBlock(unref(KdsValueSwitch_default), {
|
|
23309
23259
|
key: 0,
|
|
23310
23260
|
modelValue: mode.value,
|
|
23311
23261
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => mode.value = $event),
|
|
@@ -23719,7 +23669,7 @@ var _hoisted_1$32 = [
|
|
|
23719
23669
|
"aria-controls",
|
|
23720
23670
|
"disabled"
|
|
23721
23671
|
];
|
|
23722
|
-
var _hoisted_2$
|
|
23672
|
+
var _hoisted_2$18 = {
|
|
23723
23673
|
key: 0,
|
|
23724
23674
|
class: "leading",
|
|
23725
23675
|
"aria-hidden": "true"
|
|
@@ -23821,7 +23771,7 @@ focus: () => triggerEl.value?.focus() });
|
|
|
23821
23771
|
onClick: _cache[0] || (_cache[0] = ($event) => !__props.disabled && emit("click")),
|
|
23822
23772
|
onKeydown
|
|
23823
23773
|
}, [
|
|
23824
|
-
props.accessory ? (openBlock(), createElementBlock("span", _hoisted_2$
|
|
23774
|
+
props.accessory ? (openBlock(), createElementBlock("span", _hoisted_2$18, [createVNode(_Accessory_default, {
|
|
23825
23775
|
accessory: props.accessory,
|
|
23826
23776
|
size: "medium"
|
|
23827
23777
|
}, null, 8, ["accessory"])])) : createCommentVNode("", true),
|
|
@@ -23994,7 +23944,7 @@ focus: () => baseDropdownEl.value?.focus() });
|
|
|
23994
23944
|
//#endregion
|
|
23995
23945
|
//#region src/components/forms/inputs/ZonedDateTimeInput/KdsZonedDateTimeInput.vue?vue&type=script&setup=true&lang.ts
|
|
23996
23946
|
var _hoisted_1$31 = { class: "kds-zoned-date-time-input" };
|
|
23997
|
-
var
|
|
23947
|
+
var FALLBACK_TIME_ZONE = "UTC";
|
|
23998
23948
|
//#endregion
|
|
23999
23949
|
//#region src/components/forms/inputs/ZonedDateTimeInput/KdsZonedDateTimeInput.vue
|
|
24000
23950
|
var KdsZonedDateTimeInput_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
@@ -24019,7 +23969,11 @@ var KdsZonedDateTimeInput_default = /*#__PURE__*/ _plugin_vue_export_helper_defa
|
|
|
24019
23969
|
default: false
|
|
24020
23970
|
},
|
|
24021
23971
|
maxGranularity: { default: "minute" },
|
|
24022
|
-
possibleValues: {}
|
|
23972
|
+
possibleValues: {},
|
|
23973
|
+
showTime: {
|
|
23974
|
+
type: Boolean,
|
|
23975
|
+
default: true
|
|
23976
|
+
}
|
|
24023
23977
|
}, {
|
|
24024
23978
|
"modelValue": { default: null },
|
|
24025
23979
|
"modelModifiers": {},
|
|
@@ -24032,25 +23986,39 @@ var KdsZonedDateTimeInput_default = /*#__PURE__*/ _plugin_vue_export_helper_defa
|
|
|
24032
23986
|
const modelValue = useModel(__props, "modelValue");
|
|
24033
23987
|
/** The granularity of the time portion (minute, second, or millisecond). */
|
|
24034
23988
|
const granularity = useModel(__props, "granularity");
|
|
23989
|
+
const FALLBACK_DATE = Temporal.PlainDate.from("1970-01-01");
|
|
24035
23990
|
const dateInput = useTemplateRef("dateInput");
|
|
24036
23991
|
const timeInput = useTemplateRef("timeInput");
|
|
23992
|
+
watch([() => __props.showTime, modelValue], () => {
|
|
23993
|
+
if (__props.showTime || !modelValue.value) return;
|
|
23994
|
+
const startOfDay = modelValue.value.startOfDay();
|
|
23995
|
+
if (!modelValue.value.equals(startOfDay)) modelValue.value = startOfDay;
|
|
23996
|
+
}, { immediate: true });
|
|
23997
|
+
/**
|
|
23998
|
+
* Builds the zoned value from its parts. Without a time input there is no time to keep, so
|
|
23999
|
+
* the result is the start of the day: 00:00, except on the days a time zone starts daylight
|
|
24000
|
+
* saving time at 00:00 and therefore has none.
|
|
24001
|
+
*
|
|
24002
|
+
* Throws when `timeZone` is not a known zone id.
|
|
24003
|
+
*/
|
|
24004
|
+
const buildZonedDateTime = (date, time, timeZone) => {
|
|
24005
|
+
const plainDate = date ?? FALLBACK_DATE;
|
|
24006
|
+
return __props.showTime && time ? plainDate.toPlainDateTime(time).toZonedDateTime(timeZone) : plainDate.toZonedDateTime(timeZone);
|
|
24007
|
+
};
|
|
24037
24008
|
const datePart = computed({
|
|
24038
24009
|
get: () => modelValue.value?.toPlainDate() ?? null,
|
|
24039
24010
|
set: (value) => {
|
|
24040
24011
|
const time = modelValue.value?.toPlainTime() ?? null;
|
|
24041
24012
|
const timeZone = modelValue.value?.timeZoneId ?? "";
|
|
24042
|
-
if (value === null && time === null) {
|
|
24013
|
+
if (value === null && (!__props.showTime || time === null)) {
|
|
24043
24014
|
modelValue.value = null;
|
|
24044
24015
|
return;
|
|
24045
24016
|
}
|
|
24046
|
-
const d = value ?? Temporal.PlainDate.from("1970-01-01");
|
|
24047
|
-
const t = time ?? Temporal.PlainTime.from("00:00:00");
|
|
24048
|
-
const dt = d.toPlainDateTime(t);
|
|
24049
24017
|
if (timeZone) try {
|
|
24050
|
-
modelValue.value =
|
|
24018
|
+
modelValue.value = buildZonedDateTime(value, time, timeZone);
|
|
24051
24019
|
return;
|
|
24052
24020
|
} catch {}
|
|
24053
|
-
modelValue.value =
|
|
24021
|
+
modelValue.value = buildZonedDateTime(value, time, FALLBACK_TIME_ZONE);
|
|
24054
24022
|
}
|
|
24055
24023
|
});
|
|
24056
24024
|
const timePart = computed({
|
|
@@ -24062,14 +24030,11 @@ var KdsZonedDateTimeInput_default = /*#__PURE__*/ _plugin_vue_export_helper_defa
|
|
|
24062
24030
|
modelValue.value = null;
|
|
24063
24031
|
return;
|
|
24064
24032
|
}
|
|
24065
|
-
const d = date ?? Temporal.PlainDate.from("1970-01-01");
|
|
24066
|
-
const t = value ?? Temporal.PlainTime.from("00:00:00");
|
|
24067
|
-
const dt = d.toPlainDateTime(t);
|
|
24068
24033
|
if (timeZone) try {
|
|
24069
|
-
modelValue.value =
|
|
24034
|
+
modelValue.value = buildZonedDateTime(date, value, timeZone);
|
|
24070
24035
|
return;
|
|
24071
24036
|
} catch {}
|
|
24072
|
-
modelValue.value =
|
|
24037
|
+
modelValue.value = buildZonedDateTime(date, value, FALLBACK_TIME_ZONE);
|
|
24073
24038
|
}
|
|
24074
24039
|
});
|
|
24075
24040
|
const timeZonePart = computed({
|
|
@@ -24079,11 +24044,8 @@ var KdsZonedDateTimeInput_default = /*#__PURE__*/ _plugin_vue_export_helper_defa
|
|
|
24079
24044
|
const date = modelValue.value?.toPlainDate() ?? null;
|
|
24080
24045
|
const time = modelValue.value?.toPlainTime() ?? null;
|
|
24081
24046
|
if (date === null && time === null) return;
|
|
24082
|
-
const d = date ?? Temporal.PlainDate.from("1970-01-01");
|
|
24083
|
-
const t = time ?? Temporal.PlainTime.from("00:00:00");
|
|
24084
|
-
const dt = d.toPlainDateTime(t);
|
|
24085
24047
|
try {
|
|
24086
|
-
modelValue.value =
|
|
24048
|
+
modelValue.value = buildZonedDateTime(date, time, timeZone);
|
|
24087
24049
|
} catch {}
|
|
24088
24050
|
}
|
|
24089
24051
|
});
|
|
@@ -24116,7 +24078,7 @@ var KdsZonedDateTimeInput_default = /*#__PURE__*/ _plugin_vue_export_helper_defa
|
|
|
24116
24078
|
validating: __props.validating,
|
|
24117
24079
|
"preserve-sub-text-space": __props.preserveSubTextSpace
|
|
24118
24080
|
}, {
|
|
24119
|
-
default: withCtx(() => [createElementVNode("div", _hoisted_1$31, [createElementVNode("div",
|
|
24081
|
+
default: withCtx(() => [createElementVNode("div", _hoisted_1$31, [createElementVNode("div", { class: normalizeClass(["date-time-row", { "no-time": !__props.showTime }]) }, [createVNode(KdsDateInput_default, {
|
|
24120
24082
|
ref_key: "dateInput",
|
|
24121
24083
|
ref: dateInput,
|
|
24122
24084
|
"aria-label": "Date",
|
|
@@ -24128,7 +24090,8 @@ var KdsZonedDateTimeInput_default = /*#__PURE__*/ _plugin_vue_export_helper_defa
|
|
|
24128
24090
|
"model-value",
|
|
24129
24091
|
"disabled",
|
|
24130
24092
|
"error"
|
|
24131
|
-
]),
|
|
24093
|
+
]), __props.showTime ? (openBlock(), createBlock(KdsTimeInput_default, {
|
|
24094
|
+
key: 0,
|
|
24132
24095
|
ref_key: "timeInput",
|
|
24133
24096
|
ref: timeInput,
|
|
24134
24097
|
"aria-label": "Time",
|
|
@@ -24145,7 +24108,7 @@ var KdsZonedDateTimeInput_default = /*#__PURE__*/ _plugin_vue_export_helper_defa
|
|
|
24145
24108
|
"max-granularity",
|
|
24146
24109
|
"disabled",
|
|
24147
24110
|
"error"
|
|
24148
|
-
])]), createVNode(KdsDropdown_default, {
|
|
24111
|
+
])) : createCommentVNode("", true)], 2), createVNode(KdsDropdown_default, {
|
|
24149
24112
|
modelValue: timeZonePart.value,
|
|
24150
24113
|
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => timeZonePart.value = $event),
|
|
24151
24114
|
"possible-values": __props.possibleValues ?? [...unref(zoneAliases), ...unref(timezones)],
|
|
@@ -24171,7 +24134,7 @@ var KdsZonedDateTimeInput_default = /*#__PURE__*/ _plugin_vue_export_helper_defa
|
|
|
24171
24134
|
]);
|
|
24172
24135
|
};
|
|
24173
24136
|
}
|
|
24174
|
-
}), [["__scopeId", "data-v-
|
|
24137
|
+
}), [["__scopeId", "data-v-a2ebc0e7"]]);
|
|
24175
24138
|
//#endregion
|
|
24176
24139
|
//#region src/components/forms/FileSelector/KdsFileSelector.vue?vue&type=script&setup=true&lang.ts
|
|
24177
24140
|
var _hoisted_1$30 = { class: "kds-file-selector" };
|