@anguszhu/kroma-ui 0.1.0 → 0.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/dist/kroma-vue.js CHANGED
@@ -1,4 +1,4 @@
1
- import { Fragment as e, Transition as t, computed as n, createBlock as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, createTextVNode as s, createVNode as c, defineComponent as l, inject as u, mergeProps as d, normalizeClass as f, normalizeStyle as p, onBeforeUnmount as m, openBlock as h, provide as g, ref as _, renderList as v, renderSlot as y, toDisplayString as b, unref as x, vModelCheckbox as S, vModelText as C, vShow as w, watch as T, withCtx as E, withDirectives as D, withKeys as O, withModifiers as k } from "vue";
1
+ import { Fragment as e, Transition as t, computed as n, createBlock as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, createTextVNode as s, createVNode as c, defineComponent as l, inject as u, mergeProps as d, normalizeClass as f, normalizeStyle as p, onBeforeUnmount as m, openBlock as h, provide as g, ref as _, renderList as v, renderSlot as y, resolveDynamicComponent as b, toDisplayString as x, unref as S, vModelCheckbox as C, vModelText as w, vShow as T, watch as ee, withCtx as E, withDirectives as D, withKeys as O, withModifiers as k } from "vue";
2
2
  //#endregion
3
3
  //#region src/vue/components/KrButton.vue
4
4
  var A = /* @__PURE__ */ l({
@@ -44,10 +44,10 @@ var A = /* @__PURE__ */ l({
44
44
  _: 3
45
45
  }, 8, ["name"]));
46
46
  }
47
- }), ee = { class: "kr-section" }, te = {
47
+ }), te = { class: "kr-section" }, ne = {
48
48
  key: 0,
49
49
  class: "kr-section__header"
50
- }, ne = {
50
+ }, re = {
51
51
  key: 0,
52
52
  class: "kr-section__title"
53
53
  }, M = {
@@ -60,7 +60,7 @@ var A = /* @__PURE__ */ l({
60
60
  subtitle: {}
61
61
  },
62
62
  setup(e) {
63
- return (t, n) => (h(), a("section", ee, [e.title || e.subtitle ? (h(), a("header", te, [e.title ? (h(), a("h1", ne, b(e.title), 1)) : i("", !0), e.subtitle ? (h(), a("h2", M, b(e.subtitle), 1)) : i("", !0)])) : i("", !0), o("div", N, [y(t.$slots, "default")])]));
63
+ return (t, n) => (h(), a("section", te, [e.title || e.subtitle ? (h(), a("header", ne, [e.title ? (h(), a("h1", re, x(e.title), 1)) : i("", !0), e.subtitle ? (h(), a("h2", M, x(e.subtitle), 1)) : i("", !0)])) : i("", !0), o("div", N, [y(t.$slots, "default")])]));
64
64
  }
65
65
  }), F = ["title"], I = [
66
66
  "name",
@@ -109,7 +109,7 @@ var A = /* @__PURE__ */ l({
109
109
  o("input", {
110
110
  class: "kr-select-item__input",
111
111
  type: "radio",
112
- name: x(c)?.name,
112
+ name: S(c)?.name,
113
113
  value: e.value,
114
114
  checked: l.value,
115
115
  disabled: e.disabled,
@@ -117,7 +117,7 @@ var A = /* @__PURE__ */ l({
117
117
  onChange: g
118
118
  }, null, 40, I),
119
119
  o("div", L, [y(t.$slots, "default")]),
120
- m.value ? (h(), a("div", R, b(m.value), 1)) : i("", !0)
120
+ m.value ? (h(), a("div", R, x(m.value), 1)) : i("", !0)
121
121
  ], 10, F));
122
122
  }
123
123
  }), B = {
@@ -175,7 +175,7 @@ var A = /* @__PURE__ */ l({
175
175
  showItemLabel: n(() => l.showItemLabel),
176
176
  name: d,
177
177
  onSelect: _
178
- }), (n, c) => (h(), a("div", { class: f(["kr-select-group", { "kr-select-group--with-separator": !t.hideSeparator }]) }, [t.title || t.subtitle ? (h(), a("div", B, [t.title ? (h(), a("div", V, b(t.title), 1)) : i("", !0), t.subtitle ? (h(), a("div", H, b(t.subtitle), 1)) : i("", !0)])) : i("", !0), o("div", {
178
+ }), (n, c) => (h(), a("div", { class: f(["kr-select-group", { "kr-select-group--with-separator": !t.hideSeparator }]) }, [t.title || t.subtitle ? (h(), a("div", B, [t.title ? (h(), a("div", V, x(t.title), 1)) : i("", !0), t.subtitle ? (h(), a("div", H, x(t.subtitle), 1)) : i("", !0)])) : i("", !0), o("div", {
179
179
  class: "kr-select-group__items",
180
180
  style: p(m.value)
181
181
  }, [n.$slots.item ? (h(!0), a(e, { key: 0 }, v(t.items, (e) => y(n.$slots, "item", {
@@ -198,7 +198,7 @@ var A = /* @__PURE__ */ l({
198
198
  key: 0,
199
199
  class: "kr-color-swatch",
200
200
  style: p({ background: n.hex })
201
- }, null, 4)) : t.variant === "icon" && n.icon ? (h(), a("svg", U, [o("path", { d: n.icon }, null, 8, W)])) : (h(), a(e, { key: 2 }, [s(b(n.label), 1)], 64))]),
201
+ }, null, 4)) : t.variant === "icon" && n.icon ? (h(), a("svg", U, [o("path", { d: n.icon }, null, 8, W)])) : (h(), a(e, { key: 2 }, [s(x(n.label), 1)], 64))]),
202
202
  _: 2
203
203
  }, 1032, [
204
204
  "value",
@@ -238,10 +238,10 @@ var A = /* @__PURE__ */ l({
238
238
  }), J = ["disabled", "aria-label"], Y = { class: "kr-toggle-row__label" }, X = {
239
239
  key: 0,
240
240
  class: "kr-toggle-row__title"
241
- }, Z = {
241
+ }, ie = {
242
242
  key: 1,
243
243
  class: "kr-toggle-row__subtitle"
244
- }, re = /* @__PURE__ */ l({
244
+ }, ae = /* @__PURE__ */ l({
245
245
  __name: "KrToggleRow",
246
246
  props: {
247
247
  modelValue: {
@@ -280,18 +280,333 @@ var A = /* @__PURE__ */ l({
280
280
  "onUpdate:modelValue": n[0] ||= (e) => l.value = e,
281
281
  disabled: e.disabled,
282
282
  "aria-label": e.title
283
- }, null, 8, J), [[S, l.value]]),
284
- o("div", Y, [e.title ? (h(), a("div", X, b(e.title), 1)) : i("", !0), e.subtitle ? (h(), a("div", Z, b(e.subtitle), 1)) : i("", !0)]),
283
+ }, null, 8, J), [[C, l.value]]),
284
+ o("div", Y, [e.title ? (h(), a("div", X, x(e.title), 1)) : i("", !0), e.subtitle ? (h(), a("div", ie, x(e.subtitle), 1)) : i("", !0)]),
285
285
  c(q, {
286
286
  "model-value": l.value,
287
287
  disabled: e.disabled
288
288
  }, null, 8, ["model-value", "disabled"])
289
289
  ], 2));
290
290
  }
291
- }), ie = { class: "kr-textfield" }, ae = {
291
+ }), oe = [
292
+ "name",
293
+ "value",
294
+ "checked",
295
+ "disabled",
296
+ "aria-label"
297
+ ], se = { class: "kr-radio-row__label" }, ce = {
298
+ key: 0,
299
+ class: "kr-radio-row__title"
300
+ }, le = {
301
+ key: 1,
302
+ class: "kr-radio-row__subtitle"
303
+ }, ue = /* @__PURE__ */ l({
304
+ __name: "KrRadioRow",
305
+ props: {
306
+ modelValue: {
307
+ type: Boolean,
308
+ default: !1
309
+ },
310
+ name: {},
311
+ value: {},
312
+ title: {},
313
+ subtitle: {},
314
+ disabled: {
315
+ type: Boolean,
316
+ default: !1
317
+ },
318
+ hideSeparator: {
319
+ type: Boolean,
320
+ default: !1
321
+ }
322
+ },
323
+ emits: ["update:modelValue"],
324
+ setup(e, { emit: t }) {
325
+ let n = t;
326
+ function r(e) {
327
+ n("update:modelValue", e.target.checked);
328
+ }
329
+ return (t, n) => (h(), a("label", { class: f(["kr-radio-row", {
330
+ "kr-radio-row--with-separator": !e.hideSeparator,
331
+ "kr-radio-row--checked": e.modelValue,
332
+ "kr-radio-row--disabled": e.disabled
333
+ }]) }, [
334
+ o("input", {
335
+ class: "kr-radio-row__native",
336
+ type: "radio",
337
+ name: e.name,
338
+ value: e.value,
339
+ checked: e.modelValue,
340
+ disabled: e.disabled,
341
+ "aria-label": e.title,
342
+ onChange: r
343
+ }, null, 40, oe),
344
+ n[0] ||= o("div", {
345
+ class: "kr-radio-row__radio",
346
+ "aria-hidden": "true"
347
+ }, [o("div", { class: "kr-radio-row__radio-dot" })], -1),
348
+ o("div", se, [e.title ? (h(), a("div", ce, x(e.title), 1)) : i("", !0), e.subtitle ? (h(), a("div", le, x(e.subtitle), 1)) : i("", !0)])
349
+ ], 2));
350
+ }
351
+ }), de = [
352
+ "name",
353
+ "value",
354
+ "checked",
355
+ ".indeterminate",
356
+ "disabled",
357
+ "aria-label"
358
+ ], fe = {
359
+ class: "kr-checkbox-row__checkbox",
360
+ "aria-hidden": "true"
361
+ }, pe = {
362
+ class: "kr-checkbox-row__check",
363
+ viewBox: "0 0 24 24",
364
+ fill: "none"
365
+ }, me = {
366
+ key: 0,
367
+ d: "M5 12h14",
368
+ stroke: "currentColor",
369
+ "stroke-width": "3",
370
+ "stroke-linecap": "round"
371
+ }, he = {
372
+ key: 1,
373
+ d: "M20 6L9 17l-5-5",
374
+ stroke: "currentColor",
375
+ "stroke-width": "3",
376
+ "stroke-linecap": "round",
377
+ "stroke-linejoin": "round"
378
+ }, ge = { class: "kr-checkbox-row__label" }, _e = {
379
+ key: 0,
380
+ class: "kr-checkbox-row__title"
381
+ }, ve = {
382
+ key: 1,
383
+ class: "kr-checkbox-row__subtitle"
384
+ }, ye = /* @__PURE__ */ l({
385
+ __name: "KrCheckboxRow",
386
+ props: {
387
+ modelValue: {
388
+ type: Boolean,
389
+ default: !1
390
+ },
391
+ indeterminate: {
392
+ type: Boolean,
393
+ default: !1
394
+ },
395
+ name: {},
396
+ value: {},
397
+ title: {},
398
+ subtitle: {},
399
+ disabled: {
400
+ type: Boolean,
401
+ default: !1
402
+ },
403
+ hideSeparator: {
404
+ type: Boolean,
405
+ default: !1
406
+ }
407
+ },
408
+ emits: ["update:modelValue"],
409
+ setup(e, { emit: t }) {
410
+ let n = t;
411
+ function r(e) {
412
+ n("update:modelValue", e.target.checked);
413
+ }
414
+ return (t, n) => (h(), a("label", { class: f(["kr-checkbox-row", {
415
+ "kr-checkbox-row--with-separator": !e.hideSeparator,
416
+ "kr-checkbox-row--checked": e.modelValue,
417
+ "kr-checkbox-row--indeterminate": e.indeterminate,
418
+ "kr-checkbox-row--disabled": e.disabled
419
+ }]) }, [
420
+ o("input", {
421
+ class: "kr-checkbox-row__native",
422
+ type: "checkbox",
423
+ name: e.name,
424
+ value: e.value,
425
+ checked: e.modelValue,
426
+ ".indeterminate": e.indeterminate,
427
+ disabled: e.disabled,
428
+ "aria-label": e.title,
429
+ onChange: r
430
+ }, null, 40, de),
431
+ o("div", fe, [(h(), a("svg", pe, [e.indeterminate ? (h(), a("path", me)) : (h(), a("path", he))]))]),
432
+ o("div", ge, [e.title ? (h(), a("div", _e, x(e.title), 1)) : i("", !0), e.subtitle ? (h(), a("div", ve, x(e.subtitle), 1)) : i("", !0)])
433
+ ], 2));
434
+ }
435
+ }), be = { class: "kr-button-row__label" }, xe = {
436
+ key: 0,
437
+ class: "kr-button-row__title"
438
+ }, Se = {
439
+ key: 1,
440
+ class: "kr-button-row__subtitle"
441
+ }, Ce = /* @__PURE__ */ l({
442
+ __name: "KrButtonRow",
443
+ props: {
444
+ title: {},
445
+ subtitle: {},
446
+ buttonLabel: {},
447
+ buttonType: { default: "secondary" },
448
+ disabled: {
449
+ type: Boolean,
450
+ default: !1
451
+ },
452
+ hideSeparator: {
453
+ type: Boolean,
454
+ default: !1
455
+ }
456
+ },
457
+ emits: ["buttonClick"],
458
+ setup(e, { emit: t }) {
459
+ let n = t;
460
+ function r(e) {
461
+ n("buttonClick", e);
462
+ }
463
+ return (t, n) => (h(), a("div", { class: f(["kr-button-row", {
464
+ "kr-button-row--with-separator": !e.hideSeparator,
465
+ "kr-button-row--disabled": e.disabled
466
+ }]) }, [o("div", be, [e.title ? (h(), a("div", xe, x(e.title), 1)) : i("", !0), e.subtitle ? (h(), a("div", Se, x(e.subtitle), 1)) : i("", !0)]), c(A, {
467
+ class: "kr-button-row__button",
468
+ type: e.buttonType,
469
+ disabled: e.disabled,
470
+ onClick: r
471
+ }, {
472
+ default: E(() => [s(x(e.buttonLabel), 1)]),
473
+ _: 1
474
+ }, 8, ["type", "disabled"])], 2));
475
+ }
476
+ }), we = { class: "kr-link-row__label" }, Te = {
477
+ key: 0,
478
+ class: "kr-link-row__title"
479
+ }, Ee = {
480
+ key: 1,
481
+ class: "kr-link-row__subtitle"
482
+ }, De = {
483
+ class: "kr-link-row__icon",
484
+ "aria-hidden": "true"
485
+ }, Oe = /* @__PURE__ */ l({
486
+ __name: "KrLinkRow",
487
+ props: {
488
+ title: {},
489
+ subtitle: {},
490
+ href: {},
491
+ target: { default: "_blank" },
492
+ rel: { default: "noopener noreferrer" },
493
+ disabled: {
494
+ type: Boolean,
495
+ default: !1
496
+ },
497
+ hideSeparator: {
498
+ type: Boolean,
499
+ default: !1
500
+ }
501
+ },
502
+ emits: ["click"],
503
+ setup(e, { emit: t }) {
504
+ let s = e, c = t, l = n(() => s.href ? "a" : "button");
505
+ function u(e) {
506
+ c("click", e);
507
+ }
508
+ return (t, n) => (h(), r(b(l.value), {
509
+ class: f(["kr-link-row", {
510
+ "kr-link-row--with-separator": !e.hideSeparator,
511
+ "kr-link-row--disabled": e.disabled
512
+ }]),
513
+ type: e.href ? void 0 : "button",
514
+ href: e.href && !e.disabled ? e.href : void 0,
515
+ target: e.href ? e.target : void 0,
516
+ rel: e.href ? e.rel : void 0,
517
+ disabled: e.href ? void 0 : e.disabled,
518
+ "aria-disabled": e.href ? e.disabled : void 0,
519
+ onClick: u
520
+ }, {
521
+ default: E(() => [o("div", we, [e.title ? (h(), a("div", Te, x(e.title), 1)) : i("", !0), e.subtitle ? (h(), a("div", Ee, x(e.subtitle), 1)) : i("", !0)]), o("div", De, [y(t.$slots, "icon", {}, () => [n[0] ||= o("svg", {
522
+ viewBox: "0 0 24 24",
523
+ fill: "none",
524
+ width: "1em",
525
+ height: "1em"
526
+ }, [
527
+ o("path", {
528
+ d: "M15 3h6v6",
529
+ stroke: "currentColor",
530
+ "stroke-width": "2",
531
+ "stroke-linecap": "round",
532
+ "stroke-linejoin": "round"
533
+ }),
534
+ o("path", {
535
+ d: "M10 14L21 3",
536
+ stroke: "currentColor",
537
+ "stroke-width": "2",
538
+ "stroke-linecap": "round",
539
+ "stroke-linejoin": "round"
540
+ }),
541
+ o("path", {
542
+ d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",
543
+ stroke: "currentColor",
544
+ "stroke-width": "2",
545
+ "stroke-linecap": "round",
546
+ "stroke-linejoin": "round"
547
+ })
548
+ ], -1)])])]),
549
+ _: 3
550
+ }, 8, [
551
+ "class",
552
+ "type",
553
+ "href",
554
+ "target",
555
+ "rel",
556
+ "disabled",
557
+ "aria-disabled"
558
+ ]));
559
+ }
560
+ }), ke = { class: "kr-chevron" }, Z = /* @__PURE__ */ l({
561
+ __name: "KrChevron",
562
+ setup(e) {
563
+ return (e, t) => (h(), a("div", ke));
564
+ }
565
+ }), Ae = ["disabled"], je = { class: "kr-navigation-row__label" }, Me = {
566
+ key: 0,
567
+ class: "kr-navigation-row__title"
568
+ }, Ne = {
569
+ key: 1,
570
+ class: "kr-navigation-row__subtitle"
571
+ }, Pe = /* @__PURE__ */ l({
572
+ __name: "KrNavigationRow",
573
+ props: {
574
+ title: {},
575
+ subtitle: {},
576
+ disabled: {
577
+ type: Boolean,
578
+ default: !1
579
+ },
580
+ hideSeparator: {
581
+ type: Boolean,
582
+ default: !1
583
+ },
584
+ destructive: {
585
+ type: Boolean,
586
+ default: !1
587
+ }
588
+ },
589
+ emits: ["click"],
590
+ setup(e, { emit: t }) {
591
+ let n = t;
592
+ function r(e) {
593
+ n("click", e);
594
+ }
595
+ return (t, n) => (h(), a("button", {
596
+ type: "button",
597
+ class: f(["kr-navigation-row", {
598
+ "kr-navigation-row--with-separator": !e.hideSeparator,
599
+ "kr-navigation-row--destructive": e.destructive,
600
+ "kr-navigation-row--disabled": e.disabled
601
+ }]),
602
+ disabled: e.disabled,
603
+ onClick: r
604
+ }, [o("div", je, [e.title ? (h(), a("div", Me, x(e.title), 1)) : i("", !0), e.subtitle ? (h(), a("div", Ne, x(e.subtitle), 1)) : i("", !0)]), c(Z, { class: "kr-navigation-row__chevron" })], 10, Ae));
605
+ }
606
+ }), Fe = { class: "kr-textfield" }, Ie = {
292
607
  key: 0,
293
608
  class: "kr-textfield__label-text"
294
- }, oe = /* @__PURE__ */ l({
609
+ }, Le = /* @__PURE__ */ l({
295
610
  __name: "KrTextField",
296
611
  props: {
297
612
  modelValue: {},
@@ -309,18 +624,18 @@ var A = /* @__PURE__ */ l({
309
624
  s("update:modelValue", e);
310
625
  }
311
626
  }), l = { mounted: (e) => r.autofocus && e.focus() };
312
- return (t, n) => (h(), a("label", ie, [e.label ? (h(), a("span", ae, b(e.label), 1)) : i("", !0), D(o("input", d({
627
+ return (t, n) => (h(), a("label", Fe, [e.label ? (h(), a("span", Ie, x(e.label), 1)) : i("", !0), D(o("input", d({
313
628
  type: "text",
314
629
  class: ["kr-textfield__input", { "kr-textfield__input--error": e.error }],
315
630
  "onUpdate:modelValue": n[0] ||= (e) => c.value = e
316
631
  }, t.$attrs), null, 16), [[
317
- C,
632
+ w,
318
633
  c.value,
319
634
  void 0,
320
635
  { trim: !0 }
321
636
  ], [l]])]));
322
637
  }
323
- }), se = { class: "kr-search-input" }, ce = { class: "kr-search-input__icon" }, le = ["autofocus", "aria-label"], ue = ["aria-label"], de = /* @__PURE__ */ l({
638
+ }), Re = { class: "kr-search-input" }, ze = { class: "kr-search-input__icon" }, Be = ["autofocus", "aria-label"], Ve = ["aria-label"], He = /* @__PURE__ */ l({
324
639
  __name: "KrSearchInput",
325
640
  props: {
326
641
  modelValue: { default: "" },
@@ -344,8 +659,8 @@ var A = /* @__PURE__ */ l({
344
659
  function l() {
345
660
  c.value = "";
346
661
  }
347
- return (t, n) => (h(), a("div", se, [
348
- o("div", ce, [y(t.$slots, "icon", {}, () => [n[1] ||= o("svg", {
662
+ return (t, n) => (h(), a("div", Re, [
663
+ o("div", ze, [y(t.$slots, "icon", {}, () => [n[1] ||= o("svg", {
349
664
  viewBox: "0 0 24 24",
350
665
  fill: "none",
351
666
  width: "1em",
@@ -370,7 +685,7 @@ var A = /* @__PURE__ */ l({
370
685
  "onUpdate:modelValue": n[0] ||= (e) => c.value = e,
371
686
  autofocus: e.autofocus,
372
687
  "aria-label": e.label
373
- }, null, 8, le), [[C, c.value]]),
688
+ }, null, 8, Be), [[w, c.value]]),
374
689
  D(o("div", {
375
690
  class: "kr-search-input__icon kr-search-input__icon--clear",
376
691
  onClick: l,
@@ -388,13 +703,13 @@ var A = /* @__PURE__ */ l({
388
703
  stroke: "currentColor",
389
704
  "stroke-width": "2",
390
705
  "stroke-linecap": "round"
391
- })], -1)])], 40, ue), [[w, c.value]])
706
+ })], -1)])], 40, Ve), [[T, c.value]])
392
707
  ]));
393
708
  }
394
709
  });
395
710
  //#endregion
396
711
  //#region src/core/toastTimer.ts
397
- function fe(e) {
712
+ function Ue(e) {
398
713
  let t, n;
399
714
  function r() {
400
715
  t !== void 0 && (clearTimeout(t), t = void 0), n !== void 0 && (clearInterval(n), n = void 0);
@@ -415,29 +730,29 @@ function fe(e) {
415
730
  }
416
731
  //#endregion
417
732
  //#region src/vue/components/KrToast.vue?vue&type=script&setup=true&lang.ts
418
- var pe = {
733
+ var We = {
419
734
  key: 0,
420
735
  class: "kr-toast__icon"
421
- }, me = {
736
+ }, Ge = {
422
737
  key: 0,
423
738
  viewBox: "0 0 24 24",
424
739
  fill: "none",
425
740
  width: "1em",
426
741
  height: "1em"
427
- }, he = {
742
+ }, Ke = {
428
743
  key: 1,
429
744
  viewBox: "0 0 24 24",
430
745
  fill: "none",
431
746
  width: "1em",
432
747
  height: "1em"
433
- }, ge = { class: "kr-toast__text" }, _e = {
748
+ }, qe = { class: "kr-toast__text" }, Je = {
434
749
  key: 1,
435
750
  class: "kr-toast__actions"
436
- }, ve = {
751
+ }, Ye = {
437
752
  key: 0,
438
753
  class: "kr-toast__countdown",
439
754
  "aria-hidden": "true"
440
- }, ye = /* @__PURE__ */ l({
755
+ }, Xe = /* @__PURE__ */ l({
441
756
  __name: "KrToast",
442
757
  props: {
443
758
  show: {
@@ -459,7 +774,7 @@ var pe = {
459
774
  set(e) {
460
775
  l("update:show", e);
461
776
  }
462
- }), d = _(c.timeout), f = fe({
777
+ }), d = _(c.timeout), f = Ue({
463
778
  onTick: (e) => {
464
779
  d.value = e;
465
780
  },
@@ -473,7 +788,7 @@ var pe = {
473
788
  function g() {
474
789
  c.actionText || (u.value = !1);
475
790
  }
476
- return T(() => c.show, (e) => {
791
+ return ee(() => c.show, (e) => {
477
792
  e ? f.start({
478
793
  timeoutSeconds: c.timeout,
479
794
  showCountdown: c.showCountdown
@@ -486,13 +801,13 @@ var pe = {
486
801
  "aria-live": "polite",
487
802
  onClick: g
488
803
  }, [
489
- e.icon ? (h(), a("div", pe, [y(n.$slots, "icon", {}, () => [e.icon === "success" ? (h(), a("svg", me, [...s[0] ||= [o("path", {
804
+ e.icon ? (h(), a("div", We, [y(n.$slots, "icon", {}, () => [e.icon === "success" ? (h(), a("svg", Ge, [...s[0] ||= [o("path", {
490
805
  d: "M20 6L9 17L4 12",
491
806
  stroke: "currentColor",
492
807
  "stroke-width": "2",
493
808
  "stroke-linecap": "round",
494
809
  "stroke-linejoin": "round"
495
- }, null, -1)]])) : (h(), a("svg", he, [...s[1] ||= [
810
+ }, null, -1)]])) : (h(), a("svg", Ke, [...s[1] ||= [
496
811
  o("circle", {
497
812
  cx: "12",
498
813
  cy: "12",
@@ -513,25 +828,25 @@ var pe = {
513
828
  fill: "currentColor"
514
829
  }, null, -1)
515
830
  ]]))])])) : i("", !0),
516
- o("div", ge, b(e.text), 1),
517
- e.actionText ? (h(), a("div", _e, [o("button", {
831
+ o("div", qe, x(e.text), 1),
832
+ e.actionText ? (h(), a("div", Je, [o("button", {
518
833
  class: "kr-toast__action",
519
834
  type: "button",
520
835
  onClick: k(p, ["stop"])
521
- }, b(e.actionText), 1), e.showCountdown ? (h(), a("span", ve, b(d.value) + "s", 1)) : i("", !0)])) : i("", !0)
836
+ }, x(e.actionText), 1), e.showCountdown ? (h(), a("span", Ye, x(d.value) + "s", 1)) : i("", !0)])) : i("", !0)
522
837
  ])) : i("", !0)]),
523
838
  _: 3
524
839
  }));
525
840
  }
526
- }), be = { class: "kr-empty" }, xe = { class: "kr-empty__icon" }, Se = { class: "kr-empty__title" }, Ce = { class: "kr-empty__description" }, we = /* @__PURE__ */ l({
841
+ }), Ze = { class: "kr-empty" }, Qe = { class: "kr-empty__icon" }, $e = { class: "kr-empty__title" }, et = { class: "kr-empty__description" }, tt = /* @__PURE__ */ l({
527
842
  __name: "KrEmpty",
528
843
  props: {
529
844
  title: {},
530
845
  description: {}
531
846
  },
532
847
  setup(e) {
533
- return (t, n) => (h(), a("div", be, [
534
- o("div", xe, [y(t.$slots, "icon", {}, () => [n[0] ||= o("svg", {
848
+ return (t, n) => (h(), a("div", Ze, [
849
+ o("div", Qe, [y(t.$slots, "icon", {}, () => [n[0] ||= o("svg", {
535
850
  viewBox: "0 0 64 64",
536
851
  fill: "none",
537
852
  xmlns: "http://www.w3.org/2000/svg"
@@ -558,18 +873,18 @@ var pe = {
558
873
  "stroke-linecap": "round"
559
874
  })
560
875
  ], -1)])]),
561
- o("h1", Se, b(e.title), 1),
562
- o("p", Ce, b(e.description), 1)
876
+ o("h1", $e, x(e.title), 1),
877
+ o("p", et, x(e.description), 1)
563
878
  ]));
564
879
  }
565
- }), Te = {
880
+ }), nt = {
566
881
  key: 0,
567
882
  class: "kr-menu-item--divider"
568
- }, Ee = ["disabled"], De = { class: "kr-menu-item__content" }, Oe = {
883
+ }, Q = ["disabled"], rt = { class: "kr-menu-item__content" }, it = {
569
884
  key: 0,
570
885
  class: "kr-menu-item__icon",
571
886
  "aria-hidden": "true"
572
- }, Q = /* @__PURE__ */ l({
887
+ }, at = /* @__PURE__ */ l({
573
888
  __name: "KrMenuItem",
574
889
  props: {
575
890
  title: {},
@@ -578,12 +893,12 @@ var pe = {
578
893
  type: {}
579
894
  },
580
895
  setup(e) {
581
- return (t, n) => e.type === "divider" ? (h(), a("hr", Te)) : (h(), a("button", {
896
+ return (t, n) => e.type === "divider" ? (h(), a("hr", nt)) : (h(), a("button", {
582
897
  key: 1,
583
898
  class: "kr-menu-item",
584
899
  disabled: e.disabled,
585
900
  role: "menuitem"
586
- }, [o("div", De, b(e.title), 1), t.$slots.icon ? (h(), a("div", Oe, [y(t.$slots, "icon")])) : i("", !0)], 8, Ee));
901
+ }, [o("div", rt, x(e.title), 1), t.$slots.icon ? (h(), a("div", it, [y(t.$slots, "icon")])) : i("", !0)], 8, Q));
587
902
  }
588
903
  });
589
904
  //#endregion
@@ -591,26 +906,26 @@ var pe = {
591
906
  function $(e) {
592
907
  return Array.from(e?.querySelectorAll("button:not([disabled]), input:not([disabled])") ?? []);
593
908
  }
594
- function ke(e) {
909
+ function ot(e) {
595
910
  let t = $(e), n = t.findIndex((e) => e === document.activeElement);
596
911
  (n === t.length - 1 ? t[0] : t[n + 1])?.focus();
597
912
  }
598
- function Ae(e) {
913
+ function st(e) {
599
914
  let t = $(e), n = t.findIndex((e) => e === document.activeElement);
600
915
  (n <= 0 ? t[t.length - 1] : t[n - 1])?.focus();
601
916
  }
602
917
  //#endregion
603
918
  //#region src/vue/components/KrDialog.vue?vue&type=script&setup=true&lang.ts
604
- var je = ["open", "onKeydown"], Me = {
919
+ var ct = ["open", "onKeydown"], lt = {
605
920
  key: 0,
606
921
  class: "kr-dialog__title"
607
- }, Ne = { class: "kr-dialog__content" }, Pe = {
922
+ }, ut = { class: "kr-dialog__content" }, dt = {
608
923
  key: 0,
609
924
  class: "kr-dialog__content__text"
610
- }, Fe = {
925
+ }, ft = {
611
926
  key: 1,
612
927
  class: "kr-dialog__content__form"
613
- }, Ie = { class: "kr-dialog__actions" }, Le = /* @__PURE__ */ l({
928
+ }, pt = { class: "kr-dialog__actions" }, mt = /* @__PURE__ */ l({
614
929
  __name: "KrDialog",
615
930
  props: {
616
931
  show: {
@@ -650,11 +965,11 @@ var je = ["open", "onKeydown"], Me = {
650
965
  }
651
966
  }
652
967
  let g = _(null);
653
- function x(e) {
654
- e.preventDefault(), ke(g.value);
968
+ function b(e) {
969
+ e.preventDefault(), ot(g.value);
655
970
  }
656
971
  function S(e) {
657
- e.preventDefault(), Ae(g.value);
972
+ e.preventDefault(), st(g.value);
658
973
  }
659
974
  return (n, c) => (h(), r(j, {
660
975
  modelValue: f.value,
@@ -668,39 +983,34 @@ var je = ["open", "onKeydown"], Me = {
668
983
  open: f.value,
669
984
  onKeydown: [
670
985
  c[0] ||= O(k((e) => f.value = !1, ["prevent"]), ["esc"]),
671
- O(k(x, ["exact"]), ["tab"]),
986
+ O(k(b, ["exact"]), ["tab"]),
672
987
  O(k(S, ["shift"]), ["tab"])
673
988
  ]
674
989
  }, [
675
- t.title ? (h(), a("h2", Me, b(t.title), 1)) : i("", !0),
676
- o("div", Ne, [t.text ? (h(), a("div", Pe, b(t.text), 1)) : i("", !0), n.$slots.default ? (h(), a("div", Fe, [y(n.$slots, "default")])) : i("", !0)]),
677
- o("div", Ie, [t.hideCancel ? i("", !0) : (h(), r(A, {
990
+ t.title ? (h(), a("h2", lt, x(t.title), 1)) : i("", !0),
991
+ o("div", ut, [t.text ? (h(), a("div", dt, x(t.text), 1)) : i("", !0), n.$slots.default ? (h(), a("div", ft, [y(n.$slots, "default")])) : i("", !0)]),
992
+ o("div", pt, [t.hideCancel ? i("", !0) : (h(), r(A, {
678
993
  key: 0,
679
994
  type: "secondary",
680
995
  disabled: d.value,
681
996
  onClick: p
682
997
  }, {
683
- default: E(() => [s(b(t.cancelText), 1)]),
998
+ default: E(() => [s(x(t.cancelText), 1)]),
684
999
  _: 1
685
1000
  }, 8, ["disabled"])), (h(!0), a(e, null, v(t.actions, (e) => (h(), r(A, {
686
1001
  key: e.text,
687
1002
  disabled: d.value || e.disabled,
688
1003
  onClick: (t) => m(e.action)
689
1004
  }, {
690
- default: E(() => [s(b(e.text), 1)]),
1005
+ default: E(() => [s(x(e.text), 1)]),
691
1006
  _: 2
692
1007
  }, 1032, ["disabled", "onClick"]))), 128))])
693
- ], 40, je)]),
1008
+ ], 40, ct)]),
694
1009
  _: 3
695
1010
  }, 8, ["modelValue"]));
696
1011
  }
697
- }), Re = { class: "kr-chevron" }, ze = /* @__PURE__ */ l({
698
- __name: "KrChevron",
699
- setup(e) {
700
- return (e, t) => (h(), a("div", Re));
701
- }
702
1012
  });
703
1013
  //#endregion
704
- export { A as KrButton, ze as KrChevron, Le as KrDialog, we as KrEmpty, Q as KrMenuItem, j as KrOverlay, de as KrSearchInput, P as KrSection, G as KrSelectGroup, z as KrSelectItem, q as KrSwitch, oe as KrTextField, ye as KrToast, re as KrToggleRow };
1014
+ export { A as KrButton, Ce as KrButtonRow, ye as KrCheckboxRow, Z as KrChevron, mt as KrDialog, tt as KrEmpty, Oe as KrLinkRow, at as KrMenuItem, Pe as KrNavigationRow, j as KrOverlay, ue as KrRadioRow, He as KrSearchInput, P as KrSection, G as KrSelectGroup, z as KrSelectItem, q as KrSwitch, Le as KrTextField, Xe as KrToast, ae as KrToggleRow };
705
1015
 
706
1016
  //# sourceMappingURL=kroma-vue.js.map