@knime/kds-components 0.6.2 → 0.6.3
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/EmptyState/KdsEmptyState.vue.d.ts +165 -0
- package/dist/EmptyState/KdsEmptyState.vue.d.ts.map +1 -0
- package/dist/EmptyState/types.d.ts +11 -0
- package/dist/EmptyState/types.d.ts.map +1 -0
- package/dist/buttons/KdsVariableToggleButton.vue.d.ts +1 -1
- package/dist/buttons/index.d.ts +1 -1
- package/dist/buttons/index.d.ts.map +1 -1
- package/dist/buttons/types.d.ts +71 -2
- package/dist/buttons/types.d.ts.map +1 -1
- package/dist/forms/RadioButton/KdsRadioButton.vue.d.ts +1 -1
- package/dist/forms/RadioButton/KdsValueSwitch.vue.d.ts +1 -1
- package/dist/index.css +24 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +193 -98
- package/dist/index.js.map +1 -1
- package/dist/util/isDefinedAndNotEmpty.d.ts +8 -0
- package/dist/util/isDefinedAndNotEmpty.d.ts.map +1 -0
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { shallowRef, watch, defineComponent, toRef, createBlock, createElementBlock, unref, openBlock, resolveDynamicComponent, normalizeClass, computed, withCtx, renderSlot, createCommentVNode, toDisplayString, mergeProps, mergeDefaults, useCssVars, Fragment,
|
|
2
|
-
import { useLocalStorage, useDark, usePreferredDark, useResizeObserver, useElementSize } from '@vueuse/core';
|
|
1
|
+
import { shallowRef, watch, defineComponent, toRef, createBlock, createElementBlock, unref, openBlock, resolveDynamicComponent, normalizeClass, computed, withCtx, renderSlot, createCommentVNode, toDisplayString, mergeProps, h, useSlots, getCurrentInstance, createElementVNode, mergeDefaults, useCssVars, Fragment, createVNode, useTemplateRef, nextTick, ref, withModifiers, mergeModels, useModel, useId, createSlots, renderList, normalizeProps, guardReactiveProps, normalizeStyle, onBeforeUpdate } from 'vue';
|
|
2
|
+
import { isDefined, useLocalStorage, useDark, usePreferredDark, useResizeObserver, useElementSize } from '@vueuse/core';
|
|
3
3
|
|
|
4
4
|
import './index.css';const __variableDynamicImportRuntimeHelper = (glob$1, path$13, segs) => {
|
|
5
5
|
const v = glob$1[path$13];
|
|
@@ -35,7 +35,7 @@ const useIcon = ({
|
|
|
35
35
|
return iconComponent;
|
|
36
36
|
};
|
|
37
37
|
|
|
38
|
-
const _sfc_main$
|
|
38
|
+
const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
39
39
|
__name: "KdsIcon",
|
|
40
40
|
props: {
|
|
41
41
|
name: {},
|
|
@@ -68,7 +68,7 @@ const _export_sfc = (sfc, props) => {
|
|
|
68
68
|
return target;
|
|
69
69
|
};
|
|
70
70
|
|
|
71
|
-
const KdsIcon = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
71
|
+
const KdsIcon = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__scopeId", "data-v-d965b88c"]]);
|
|
72
72
|
|
|
73
73
|
const ID_TO_ICON_MAP = {
|
|
74
74
|
// Flow Variables
|
|
@@ -214,8 +214,8 @@ const typeIconNames = [
|
|
|
214
214
|
"xml-datatype"
|
|
215
215
|
];
|
|
216
216
|
|
|
217
|
-
const _hoisted_1$
|
|
218
|
-
const _sfc_main$
|
|
217
|
+
const _hoisted_1$h = ["title"];
|
|
218
|
+
const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
219
219
|
__name: "KdsDataType",
|
|
220
220
|
props: {
|
|
221
221
|
iconName: { default: "unknown-datatype" },
|
|
@@ -255,18 +255,18 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
255
255
|
"aria-hidden": "true",
|
|
256
256
|
focusable: "false"
|
|
257
257
|
}, null, 8, ["class"]))
|
|
258
|
-
], 10, _hoisted_1$
|
|
258
|
+
], 10, _hoisted_1$h);
|
|
259
259
|
};
|
|
260
260
|
}
|
|
261
261
|
});
|
|
262
262
|
|
|
263
|
-
const KdsDataType = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
263
|
+
const KdsDataType = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["__scopeId", "data-v-f7d93fdf"]]);
|
|
264
264
|
|
|
265
|
-
const _hoisted_1$
|
|
265
|
+
const _hoisted_1$g = {
|
|
266
266
|
key: 0,
|
|
267
267
|
class: "label"
|
|
268
268
|
};
|
|
269
|
-
const _sfc_main$
|
|
269
|
+
const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
270
270
|
__name: "BaseButton",
|
|
271
271
|
props: {
|
|
272
272
|
size: { default: "medium" },
|
|
@@ -325,7 +325,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
325
325
|
size: iconSize.value
|
|
326
326
|
}, null, 8, ["name", "size"])) : createCommentVNode("", true)
|
|
327
327
|
], true),
|
|
328
|
-
props.label ? (openBlock(), createElementBlock("span", _hoisted_1$
|
|
328
|
+
props.label ? (openBlock(), createElementBlock("span", _hoisted_1$g, toDisplayString(props.label), 1)) : createCommentVNode("", true),
|
|
329
329
|
props.trailingIcon && props.label ? (openBlock(), createBlock(KdsIcon, {
|
|
330
330
|
key: 1,
|
|
331
331
|
name: props.trailingIcon,
|
|
@@ -338,9 +338,9 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
338
338
|
}
|
|
339
339
|
});
|
|
340
340
|
|
|
341
|
-
const BaseButton = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
341
|
+
const BaseButton = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["__scopeId", "data-v-ab4824cd"]]);
|
|
342
342
|
|
|
343
|
-
const _sfc_main$
|
|
343
|
+
const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
344
344
|
__name: "KdsButton",
|
|
345
345
|
props: {
|
|
346
346
|
size: {},
|
|
@@ -365,6 +365,165 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
365
365
|
}
|
|
366
366
|
});
|
|
367
367
|
|
|
368
|
+
const getAppInstance = () => {
|
|
369
|
+
const currentInstance = getCurrentInstance();
|
|
370
|
+
return currentInstance?.appContext.app;
|
|
371
|
+
};
|
|
372
|
+
const resolveNuxtLinkComponent = () => {
|
|
373
|
+
const app = getAppInstance();
|
|
374
|
+
const nuxtLinkComponent = app?.component("NuxtLink");
|
|
375
|
+
if (nuxtLinkComponent) {
|
|
376
|
+
return nuxtLinkComponent;
|
|
377
|
+
}
|
|
378
|
+
const routerLinkComponent = app?.component("RouterLink");
|
|
379
|
+
if (routerLinkComponent) {
|
|
380
|
+
return routerLinkComponent;
|
|
381
|
+
}
|
|
382
|
+
const fallbackComponent = defineComponent({
|
|
383
|
+
props: {
|
|
384
|
+
to: {
|
|
385
|
+
type: String,
|
|
386
|
+
default: ""
|
|
387
|
+
}
|
|
388
|
+
},
|
|
389
|
+
render() {
|
|
390
|
+
return h("a", { href: this.to }, [useSlots().default?.()]);
|
|
391
|
+
}
|
|
392
|
+
});
|
|
393
|
+
return fallbackComponent;
|
|
394
|
+
};
|
|
395
|
+
|
|
396
|
+
const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
397
|
+
__name: "KdsLinkButton",
|
|
398
|
+
props: {
|
|
399
|
+
size: {},
|
|
400
|
+
disabled: { type: Boolean },
|
|
401
|
+
title: {},
|
|
402
|
+
variant: { default: "filled" },
|
|
403
|
+
label: {},
|
|
404
|
+
leadingIcon: {},
|
|
405
|
+
trailingIcon: {},
|
|
406
|
+
ariaLabel: {},
|
|
407
|
+
destructive: { type: Boolean },
|
|
408
|
+
to: {},
|
|
409
|
+
download: { type: Boolean, default: void 0 },
|
|
410
|
+
target: { default: null },
|
|
411
|
+
rel: { default: null }
|
|
412
|
+
},
|
|
413
|
+
emits: ["click"],
|
|
414
|
+
setup(__props, { emit: __emit }) {
|
|
415
|
+
const props = __props;
|
|
416
|
+
const component = computed(() => {
|
|
417
|
+
if (props.disabled) {
|
|
418
|
+
return "button";
|
|
419
|
+
}
|
|
420
|
+
return resolveNuxtLinkComponent();
|
|
421
|
+
});
|
|
422
|
+
const emit = __emit;
|
|
423
|
+
return (_ctx, _cache) => {
|
|
424
|
+
return openBlock(), createBlock(BaseButton, mergeProps(props, {
|
|
425
|
+
component: component.value,
|
|
426
|
+
onClick: _cache[0] || (_cache[0] = ($event) => emit("click", $event))
|
|
427
|
+
}), null, 16, ["component"]);
|
|
428
|
+
};
|
|
429
|
+
}
|
|
430
|
+
});
|
|
431
|
+
|
|
432
|
+
function isDefinedAndNotEmpty(obj, field) {
|
|
433
|
+
return isDefined(obj[field]) && obj[field] !== "";
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
const _hoisted_1$f = { class: "kds-empty-state" };
|
|
437
|
+
const _hoisted_2$6 = { class: "kds-empty-state-headline" };
|
|
438
|
+
const _hoisted_3$4 = {
|
|
439
|
+
key: 0,
|
|
440
|
+
class: "kds-empty-state-description"
|
|
441
|
+
};
|
|
442
|
+
const _hoisted_4$3 = {
|
|
443
|
+
key: 1,
|
|
444
|
+
class: "kds-empty-state-action"
|
|
445
|
+
};
|
|
446
|
+
const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
447
|
+
__name: "KdsEmptyState",
|
|
448
|
+
props: {
|
|
449
|
+
headline: {},
|
|
450
|
+
description: {},
|
|
451
|
+
buttonLabel: {},
|
|
452
|
+
buttonLeadingIcon: {},
|
|
453
|
+
buttonTrailingIcon: {},
|
|
454
|
+
buttonAriaLabel: {},
|
|
455
|
+
buttonSize: {},
|
|
456
|
+
buttonDisabled: { type: Boolean },
|
|
457
|
+
buttonTitle: {},
|
|
458
|
+
buttonVariant: {},
|
|
459
|
+
buttonDestructive: { type: Boolean },
|
|
460
|
+
buttonTo: {},
|
|
461
|
+
buttonDownload: { type: Boolean },
|
|
462
|
+
buttonTarget: {},
|
|
463
|
+
buttonRel: {}
|
|
464
|
+
},
|
|
465
|
+
emits: ["buttonClick"],
|
|
466
|
+
setup(__props, { emit: __emit }) {
|
|
467
|
+
const props = __props;
|
|
468
|
+
const emit = __emit;
|
|
469
|
+
const hasButton = computed(() => {
|
|
470
|
+
return isDefinedAndNotEmpty(props, "buttonLabel") || isDefinedAndNotEmpty(props, "buttonLeadingIcon");
|
|
471
|
+
});
|
|
472
|
+
const buttonType = computed(() => {
|
|
473
|
+
if (isDefinedAndNotEmpty(props, "buttonTo")) {
|
|
474
|
+
return _sfc_main$i;
|
|
475
|
+
}
|
|
476
|
+
return _sfc_main$j;
|
|
477
|
+
});
|
|
478
|
+
const mapProps = (mappings) => {
|
|
479
|
+
return Object.fromEntries(
|
|
480
|
+
mappings.map(([targetKey, sourceKey]) => [targetKey, props[sourceKey]]).filter(([, value]) => value !== void 0)
|
|
481
|
+
);
|
|
482
|
+
};
|
|
483
|
+
const buttonProps = computed(() => {
|
|
484
|
+
if (!hasButton.value) {
|
|
485
|
+
return {};
|
|
486
|
+
}
|
|
487
|
+
const baseProps = mapProps([
|
|
488
|
+
["label", "buttonLabel"],
|
|
489
|
+
["leadingIcon", "buttonLeadingIcon"],
|
|
490
|
+
["trailingIcon", "buttonTrailingIcon"],
|
|
491
|
+
["ariaLabel", "buttonAriaLabel"],
|
|
492
|
+
["disabled", "buttonDisabled"],
|
|
493
|
+
["variant", "buttonVariant"],
|
|
494
|
+
["size", "buttonSize"],
|
|
495
|
+
["destructive", "buttonDestructive"],
|
|
496
|
+
["title", "buttonTitle"]
|
|
497
|
+
]);
|
|
498
|
+
if (buttonType.value !== _sfc_main$i) {
|
|
499
|
+
return baseProps;
|
|
500
|
+
}
|
|
501
|
+
return {
|
|
502
|
+
...baseProps,
|
|
503
|
+
...mapProps([
|
|
504
|
+
["to", "buttonTo"],
|
|
505
|
+
["target", "buttonTarget"],
|
|
506
|
+
["rel", "buttonRel"],
|
|
507
|
+
["download", "buttonDownload"]
|
|
508
|
+
])
|
|
509
|
+
};
|
|
510
|
+
});
|
|
511
|
+
return (_ctx, _cache) => {
|
|
512
|
+
return openBlock(), createElementBlock("div", _hoisted_1$f, [
|
|
513
|
+
createElementVNode("p", _hoisted_2$6, toDisplayString(props.headline), 1),
|
|
514
|
+
props.description ? (openBlock(), createElementBlock("p", _hoisted_3$4, toDisplayString(props.description), 1)) : createCommentVNode("", true),
|
|
515
|
+
hasButton.value ? (openBlock(), createElementBlock("div", _hoisted_4$3, [
|
|
516
|
+
(openBlock(), createBlock(resolveDynamicComponent(buttonType.value), mergeProps(buttonProps.value, {
|
|
517
|
+
onClick: _cache[0] || (_cache[0] = ($event) => emit("buttonClick", $event))
|
|
518
|
+
}), null, 16))
|
|
519
|
+
])) : createCommentVNode("", true)
|
|
520
|
+
]);
|
|
521
|
+
};
|
|
522
|
+
}
|
|
523
|
+
});
|
|
524
|
+
|
|
525
|
+
const KdsEmptyState = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-34b52d0e"]]);
|
|
526
|
+
|
|
368
527
|
const modalLayoutPropsDefault = {
|
|
369
528
|
title: "",
|
|
370
529
|
variant: "padded",
|
|
@@ -386,7 +545,7 @@ const _hoisted_4$2 = {
|
|
|
386
545
|
key: 0,
|
|
387
546
|
class: "modal-footer"
|
|
388
547
|
};
|
|
389
|
-
const _sfc_main$
|
|
548
|
+
const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
390
549
|
...{ inheritAttrs: false },
|
|
391
550
|
__name: "KdsModalLayout",
|
|
392
551
|
props: /* @__PURE__ */ mergeDefaults({
|
|
@@ -410,7 +569,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
410
569
|
size: "medium"
|
|
411
570
|
}, null, 8, ["name"])) : createCommentVNode("", true),
|
|
412
571
|
createElementVNode("div", _hoisted_2$5, toDisplayString(props.title), 1),
|
|
413
|
-
createVNode(_sfc_main$
|
|
572
|
+
createVNode(_sfc_main$j, {
|
|
414
573
|
"leading-icon": "x-close",
|
|
415
574
|
variant: "transparent",
|
|
416
575
|
size: "medium",
|
|
@@ -432,10 +591,10 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
432
591
|
}
|
|
433
592
|
});
|
|
434
593
|
|
|
435
|
-
const KdsModalLayout = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
594
|
+
const KdsModalLayout = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-583e34fe"]]);
|
|
436
595
|
|
|
437
596
|
const _hoisted_1$d = ["closedby"];
|
|
438
|
-
const _sfc_main$
|
|
597
|
+
const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
439
598
|
__name: "KdsModal",
|
|
440
599
|
props: /* @__PURE__ */ mergeDefaults({
|
|
441
600
|
icon: {},
|
|
@@ -532,11 +691,11 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
532
691
|
}
|
|
533
692
|
});
|
|
534
693
|
|
|
535
|
-
const KdsModal = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
694
|
+
const KdsModal = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-6fc6d7dd"]]);
|
|
536
695
|
|
|
537
696
|
const _hoisted_1$c = ["id"];
|
|
538
697
|
const _hoisted_2$4 = { class: "subtext-text" };
|
|
539
|
-
const _sfc_main$
|
|
698
|
+
const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
540
699
|
__name: "KdsSubText",
|
|
541
700
|
props: {
|
|
542
701
|
id: {},
|
|
@@ -567,7 +726,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
567
726
|
}
|
|
568
727
|
});
|
|
569
728
|
|
|
570
|
-
const KdsSubText = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
729
|
+
const KdsSubText = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-78af6eac"]]);
|
|
571
730
|
|
|
572
731
|
const _hoisted_1$b = ["disabled", "title", "aria-label", "aria-checked", "aria-describedby", "aria-invalid"];
|
|
573
732
|
const _hoisted_2$3 = { class: "control" };
|
|
@@ -581,7 +740,7 @@ const _hoisted_6$1 = {
|
|
|
581
740
|
key: 0,
|
|
582
741
|
class: "subtext-wrapper"
|
|
583
742
|
};
|
|
584
|
-
const _sfc_main$
|
|
743
|
+
const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
585
744
|
__name: "BaseCheckbox",
|
|
586
745
|
props: /* @__PURE__ */ mergeModels({
|
|
587
746
|
disabled: { type: Boolean, default: false },
|
|
@@ -684,9 +843,9 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
684
843
|
}
|
|
685
844
|
});
|
|
686
845
|
|
|
687
|
-
const BaseCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
846
|
+
const BaseCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-65cb29d7"]]);
|
|
688
847
|
|
|
689
|
-
const _sfc_main$
|
|
848
|
+
const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
690
849
|
__name: "KdsCheckbox",
|
|
691
850
|
props: /* @__PURE__ */ mergeModels({
|
|
692
851
|
disabled: { type: Boolean, default: false },
|
|
@@ -818,7 +977,7 @@ const _hoisted_3$1 = {
|
|
|
818
977
|
key: 0,
|
|
819
978
|
class: "ask-again"
|
|
820
979
|
};
|
|
821
|
-
const _sfc_main$
|
|
980
|
+
const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
822
981
|
__name: "KdsDynamicModalProvider",
|
|
823
982
|
setup(__props) {
|
|
824
983
|
const askAgain = ref(false);
|
|
@@ -874,7 +1033,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
874
1033
|
unref(internal).isTemplateBasedConfirm(unref(config).value) ? (openBlock(), createBlock(resolveDynamicComponent(unref(config).value.component), { key: 0 })) : (openBlock(), createElementBlock("div", _hoisted_1$a, [
|
|
875
1034
|
createElementVNode("div", _hoisted_2$2, toDisplayString(unref(config).value.message), 1),
|
|
876
1035
|
unref(config).value.doNotAskAgain ? (openBlock(), createElementBlock("div", _hoisted_3$1, [
|
|
877
|
-
createVNode(_sfc_main$
|
|
1036
|
+
createVNode(_sfc_main$c, {
|
|
878
1037
|
modelValue: askAgain.value,
|
|
879
1038
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => askAgain.value = $event),
|
|
880
1039
|
label: unref(config).value.doNotAskAgain.label,
|
|
@@ -889,7 +1048,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
889
1048
|
name: "footer",
|
|
890
1049
|
fn: withCtx(() => [
|
|
891
1050
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(config).value.buttons, (button, index) => {
|
|
892
|
-
return openBlock(), createBlock(_sfc_main$
|
|
1051
|
+
return openBlock(), createBlock(_sfc_main$j, {
|
|
893
1052
|
key: index,
|
|
894
1053
|
destructive: button.destructive,
|
|
895
1054
|
autofocus: button.autofocus,
|
|
@@ -919,10 +1078,10 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
919
1078
|
}
|
|
920
1079
|
});
|
|
921
1080
|
|
|
922
|
-
const KdsDynamicModalProvider = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1081
|
+
const KdsDynamicModalProvider = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-c0769cfd"]]);
|
|
923
1082
|
|
|
924
1083
|
const _hoisted_1$9 = ["data-style"];
|
|
925
|
-
const _sfc_main$
|
|
1084
|
+
const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
926
1085
|
__name: "KdsLoadingSpinner",
|
|
927
1086
|
props: {
|
|
928
1087
|
size: { default: "medium" },
|
|
@@ -952,10 +1111,10 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
952
1111
|
}
|
|
953
1112
|
});
|
|
954
1113
|
|
|
955
|
-
const KdsLoadingSpinner = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1114
|
+
const KdsLoadingSpinner = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-13c830ad"]]);
|
|
956
1115
|
|
|
957
1116
|
const _hoisted_1$8 = ["disabled", "title", "aria-label", "aria-pressed"];
|
|
958
|
-
const _sfc_main$
|
|
1117
|
+
const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
959
1118
|
__name: "KdsVariableToggleButton",
|
|
960
1119
|
props: /* @__PURE__ */ mergeModels({
|
|
961
1120
|
disabled: { type: Boolean, default: false },
|
|
@@ -1039,11 +1198,11 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
1039
1198
|
}
|
|
1040
1199
|
});
|
|
1041
1200
|
|
|
1042
|
-
const KdsVariableToggleButton = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1201
|
+
const KdsVariableToggleButton = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-8b6f8b81"]]);
|
|
1043
1202
|
|
|
1044
1203
|
const _hoisted_1$7 = ["disabled", "aria-pressed"];
|
|
1045
1204
|
const TITLE = "Click for more information";
|
|
1046
|
-
const _sfc_main$
|
|
1205
|
+
const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
1047
1206
|
__name: "KdsInfoToggleButton",
|
|
1048
1207
|
props: /* @__PURE__ */ mergeModels({
|
|
1049
1208
|
disabled: { type: Boolean, default: false },
|
|
@@ -1080,71 +1239,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
1080
1239
|
}
|
|
1081
1240
|
});
|
|
1082
1241
|
|
|
1083
|
-
const KdsInfoToggleButton = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1084
|
-
|
|
1085
|
-
const getAppInstance = () => {
|
|
1086
|
-
const currentInstance = getCurrentInstance();
|
|
1087
|
-
return currentInstance?.appContext.app;
|
|
1088
|
-
};
|
|
1089
|
-
const resolveNuxtLinkComponent = () => {
|
|
1090
|
-
const app = getAppInstance();
|
|
1091
|
-
const nuxtLinkComponent = app?.component("NuxtLink");
|
|
1092
|
-
if (nuxtLinkComponent) {
|
|
1093
|
-
return nuxtLinkComponent;
|
|
1094
|
-
}
|
|
1095
|
-
const routerLinkComponent = app?.component("RouterLink");
|
|
1096
|
-
if (routerLinkComponent) {
|
|
1097
|
-
return routerLinkComponent;
|
|
1098
|
-
}
|
|
1099
|
-
const fallbackComponent = defineComponent({
|
|
1100
|
-
props: {
|
|
1101
|
-
to: {
|
|
1102
|
-
type: String,
|
|
1103
|
-
default: ""
|
|
1104
|
-
}
|
|
1105
|
-
},
|
|
1106
|
-
render() {
|
|
1107
|
-
return h("a", { href: this.to }, [useSlots().default?.()]);
|
|
1108
|
-
}
|
|
1109
|
-
});
|
|
1110
|
-
return fallbackComponent;
|
|
1111
|
-
};
|
|
1112
|
-
|
|
1113
|
-
const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
1114
|
-
__name: "KdsLinkButton",
|
|
1115
|
-
props: {
|
|
1116
|
-
size: {},
|
|
1117
|
-
disabled: { type: Boolean },
|
|
1118
|
-
title: {},
|
|
1119
|
-
variant: { default: "filled" },
|
|
1120
|
-
label: {},
|
|
1121
|
-
leadingIcon: {},
|
|
1122
|
-
trailingIcon: {},
|
|
1123
|
-
ariaLabel: {},
|
|
1124
|
-
destructive: { type: Boolean },
|
|
1125
|
-
to: {},
|
|
1126
|
-
download: { type: Boolean, default: void 0 },
|
|
1127
|
-
target: { default: null },
|
|
1128
|
-
rel: { default: null }
|
|
1129
|
-
},
|
|
1130
|
-
emits: ["click"],
|
|
1131
|
-
setup(__props, { emit: __emit }) {
|
|
1132
|
-
const props = __props;
|
|
1133
|
-
const component = computed(() => {
|
|
1134
|
-
if (props.disabled) {
|
|
1135
|
-
return "button";
|
|
1136
|
-
}
|
|
1137
|
-
return resolveNuxtLinkComponent();
|
|
1138
|
-
});
|
|
1139
|
-
const emit = __emit;
|
|
1140
|
-
return (_ctx, _cache) => {
|
|
1141
|
-
return openBlock(), createBlock(BaseButton, mergeProps(props, {
|
|
1142
|
-
component: component.value,
|
|
1143
|
-
onClick: _cache[0] || (_cache[0] = ($event) => emit("click", $event))
|
|
1144
|
-
}), null, 16, ["component"]);
|
|
1145
|
-
};
|
|
1146
|
-
}
|
|
1147
|
-
});
|
|
1242
|
+
const KdsInfoToggleButton = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-24b40e36"]]);
|
|
1148
1243
|
|
|
1149
1244
|
const _hoisted_1$6 = ["data-visible"];
|
|
1150
1245
|
const _hoisted_2$1 = ["data-visible"];
|
|
@@ -1959,5 +2054,5 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1959
2054
|
|
|
1960
2055
|
const KdsValueSwitch = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-e5da4485"]]);
|
|
1961
2056
|
|
|
1962
|
-
export { _sfc_main$
|
|
2057
|
+
export { _sfc_main$j as KdsButton, _sfc_main$c as KdsCheckbox, KdsCheckboxGroup, KdsDataType, KdsDynamicModalProvider, KdsEmptyState, KdsIcon, KdsInfoToggleButton, KdsLabel, _sfc_main$i as KdsLinkButton, KdsLoadingSpinner, KdsModal, KdsModalLayout, KdsProgressButton, KdsRadioButtonGroup, KdsSubText, _sfc_main$6 as KdsToggleButton, KdsValueSwitch, KdsVariableToggleButton, useKdsDarkMode, useKdsDynamicModal, useKdsIsTruncated, useKdsLegacyMode };
|
|
1963
2058
|
//# sourceMappingURL=index.js.map
|