@rocketui/vue 0.2.70 → 0.2.71-beta

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.
@@ -1,5 +1,5 @@
1
- import { defineComponent as R, openBlock as t, createElementBlock as r, createElementVNode as Z, unref as J, reactive as y1, Fragment as H1, renderList as d1, normalizeClass as p, renderSlot as h, toDisplayString as b, createVNode as q, computed as f, createCommentVNode as O, mergeProps as I1, createBlock as _, watch as I, getCurrentScope as p2, onScopeDispose as O2, ref as E, watchEffect as f2, onMounted as M2, Teleport as h2, withCtx as k1, withDirectives as i2, withModifiers as t1, withKeys as q1, vModelText as g2, createTextVNode as S1, onUnmounted as k2, normalizeStyle as Q1, vShow as B2, resolveComponent as b2, provide as O1, resolveDynamicComponent as w2, inject as f1 } from "vue";
2
- const v2 = {
1
+ import { defineComponent as E, openBlock as l, createElementBlock as n, createElementVNode as S, unref as L1, reactive as q1, Fragment as i1, renderList as r1, normalizeClass as g, renderSlot as b, toDisplayString as w, createVNode as J, computed as O, createCommentVNode as p, mergeProps as T1, withKeys as p1, withModifiers as o1, createBlock as x, watch as N, createTextVNode as d1, getCurrentScope as v2, onScopeDispose as B2, ref as R, watchEffect as y2, onMounted as j1, Teleport as m2, withCtx as O1, withDirectives as l2, vModelText as o2, nextTick as I1, onUnmounted as w2, Transition as P2, normalizeStyle as X1, resolveComponent as T2, provide as B1, resolveDynamicComponent as F2, inject as y1 } from "vue";
2
+ const R2 = {
3
3
  mdiAbTesting: "M4 2A2 2 0 0 0 2 4V12H4V8H6V12H8V4A2 2 0 0 0 6 2H4M4 4H6V6H4M22 15.5V14A2 2 0 0 0 20 12H16V22H20A2 2 0 0 0 22 20V18.5A1.54 1.54 0 0 0 20.5 17A1.54 1.54 0 0 0 22 15.5M20 20H18V18H20V20M20 16H18V14H20M5.79 21.61L4.21 20.39L18.21 2.39L19.79 3.61Z",
4
4
  mdiAbacus: "M5 5H7V11H5V5M10 5H8V11H10V5M5 19H7V13H5V19M10 13H8V19H10V17H15V15H10V13M2 21H4V3H2V21M20 3V7H13V5H11V11H13V9H20V15H18V13H16V19H18V17H20V21H22V3H20Z",
5
5
  mdiAbjadArabic: "M12 4C10.08 4 8.5 5.58 8.5 7.5C8.5 8.43 8.88 9.28 9.5 9.91C7.97 10.91 7 12.62 7 14.5C7 17.53 9.47 20 12.5 20C14.26 20 16 19.54 17.5 18.66L16.5 16.93C15.28 17.63 13.9 18 12.5 18C10.56 18 9 16.45 9 14.5C9 12.91 10.06 11.53 11.59 11.12L16.8 9.72L16.28 7.79L11.83 9C11.08 8.9 10.5 8.28 10.5 7.5C10.5 6.66 11.16 6 12 6C12.26 6 12.5 6.07 12.75 6.2L13.75 4.47C13.22 4.16 12.61 4 12 4Z",
@@ -7296,7 +7296,7 @@ const v2 = {
7296
7296
  mdiZodiacScorpio: "M17.71,15.29L16.29,16.71L17.59,18H16A2,2 0 0,1 14,16V6A3,3 0 0,0 11,3C10.25,3 9.55,3.29 9,3.78C7.86,2.76 6.14,2.76 5,3.78C4.45,3.28 3.74,3 3,3V5A1,1 0 0,1 4,6V16H6V6A1,1 0 0,1 7,5A1,1 0 0,1 8,6V16H10V6A1,1 0 0,1 11,5A1,1 0 0,1 12,6V16A4,4 0 0,0 16,20H17.59L16.29,21.29L17.71,22.71L21.41,19L17.71,15.29Z",
7297
7297
  mdiZodiacTaurus: "M15.59,9C17.7,7.74 19,5.46 19,3H17A5,5 0 0,1 12,8A5,5 0 0,1 7,3H5C5,5.46 6.3,7.74 8.41,9C5.09,11 4,15.28 6,18.6C7.97,21.92 12.27,23 15.59,21C18.91,19.04 20,14.74 18,11.42C17.42,10.43 16.58,9.59 15.59,9M12,20A5,5 0 0,1 7,15A5,5 0 0,1 12,10A5,5 0 0,1 17,15A5,5 0 0,1 12,20Z",
7298
7298
  mdiZodiacVirgo: "M18.5,19.13C20,17.77 20,15.18 20,14A4,4 0 0,0 16,10C15.3,10 14.6,10.2 14,10.56V6A3,3 0 0,0 11,3C10.25,3 9.55,3.29 9,3.78C7.86,2.76 6.14,2.76 5,3.78C4.45,3.28 3.74,3 3,3V5A1,1 0 0,1 4,6V16H6V6A1,1 0 0,1 7,5A1,1 0 0,1 8,6V16H10V6A1,1 0 0,1 11,5A1,1 0 0,1 12,6V14C12,15.18 12,17.77 13.5,19.13C12.72,19.54 11.88,19.84 11,20V22C12.29,22 14.84,20.74 16,20.13C17.16,20.74 19.71,22 21,22V20C20.12,19.84 19.28,19.54 18.5,19.13M16,12A2,2 0 0,1 18,14C18,16.92 17.46,18 16,18C14.54,18 14,16.92 14,14A2,2 0 0,1 16,12Z"
7299
- }, y2 = ["height", "viewBox", "width"], P2 = ["d"], D = /* @__PURE__ */ R({
7299
+ }, x2 = ["height", "viewBox", "width"], D2 = ["d"], D = /* @__PURE__ */ E({
7300
7300
  __name: "RIcon",
7301
7301
  props: {
7302
7302
  name: { default: "" },
@@ -7305,25 +7305,25 @@ const v2 = {
7305
7305
  },
7306
7306
  setup(H) {
7307
7307
  const V = H;
7308
- return (C, M) => (t(), r("svg", {
7308
+ return (C, M) => (l(), n("svg", {
7309
7309
  class: "r-icon",
7310
7310
  height: V.size,
7311
7311
  viewBox: V.viewBox,
7312
7312
  width: V.size
7313
7313
  }, [
7314
- Z("path", {
7315
- d: J(v2)[V.name]
7316
- }, null, 8, P2)
7317
- ], 8, y2));
7314
+ S("path", {
7315
+ d: L1(R2)[V.name]
7316
+ }, null, 8, D2)
7317
+ ], 8, x2));
7318
7318
  }
7319
- }), T2 = ["data-state", "onClick"], F2 = { class: "r-accordion__header" }, R2 = { class: "r-accordion__title" }, x2 = { class: "r-accordion__icon" }, D2 = { class: "r-accordion__content" }, u0 = /* @__PURE__ */ R({
7319
+ }), E2 = ["data-state", "onClick"], _2 = { class: "r-accordion__header" }, W2 = { class: "r-accordion__title" }, N2 = { class: "r-accordion__icon" }, I2 = { class: "r-accordion__content" }, x0 = /* @__PURE__ */ E({
7320
7320
  __name: "RAccordion",
7321
7321
  props: {
7322
7322
  accordions: {},
7323
7323
  multiple: { type: Boolean }
7324
7324
  },
7325
7325
  setup(H) {
7326
- const V = H, C = y1(
7326
+ const V = H, C = q1(
7327
7327
  V.accordions.map(({ title: i, content: L }, A) => ({
7328
7328
  title: i,
7329
7329
  content: L,
@@ -7342,42 +7342,42 @@ const v2 = {
7342
7342
  });
7343
7343
  }
7344
7344
  }
7345
- return (i, L) => (t(!0), r(H1, null, d1(C, (A, e) => (t(), r("div", {
7346
- key: e,
7347
- class: p(["r-accordion", {
7345
+ return (i, L) => (l(!0), n(i1, null, r1(C, (A, d) => (l(), n("div", {
7346
+ key: d,
7347
+ class: g(["r-accordion", {
7348
7348
  "r-accordion--disabled": A.disabled,
7349
7349
  "cursor-pointer": !A.open
7350
7350
  }]),
7351
7351
  "data-state": A.open ? "opened" : "closed",
7352
- onClick: (d) => M(e)
7352
+ onClick: (e) => M(d)
7353
7353
  }, [
7354
- Z("div", F2, [
7355
- h(i.$slots, "title", { accordion: A }, () => [
7356
- Z("div", R2, b(A.title), 1)
7354
+ S("div", _2, [
7355
+ b(i.$slots, "title", { accordion: A }, () => [
7356
+ S("div", W2, w(A.title), 1)
7357
7357
  ]),
7358
- Z("div", x2, [
7359
- h(i.$slots, "icon", {
7358
+ S("div", N2, [
7359
+ b(i.$slots, "icon", {
7360
7360
  item: A,
7361
7361
  open: A.open
7362
7362
  }, () => [
7363
- q(D, { name: "mdiChevronDown" })
7363
+ J(D, { name: "mdiChevronDown" })
7364
7364
  ])
7365
7365
  ])
7366
7366
  ]),
7367
- Z("div", D2, [
7368
- h(i.$slots, "content", { accordion: A }, () => [
7369
- Z("span", null, b(A.content), 1)
7367
+ S("div", I2, [
7368
+ b(i.$slots, "content", { accordion: A }, () => [
7369
+ S("span", null, w(A.content), 1)
7370
7370
  ])
7371
7371
  ])
7372
- ], 10, T2))), 128));
7372
+ ], 10, E2))), 128));
7373
7373
  }
7374
- }), _2 = { class: "r-alert__icon" }, E2 = { class: "r-alert__content" }, W2 = { class: "r-alert__content__title" }, N2 = {
7374
+ }), $2 = { class: "r-alert__icon" }, Q2 = { class: "r-alert__content" }, G2 = { class: "r-alert__content__title" }, U2 = {
7375
7375
  key: 0,
7376
7376
  class: "r-alert__content__description"
7377
- }, I2 = {
7377
+ }, z2 = {
7378
7378
  key: 0,
7379
7379
  class: "r-alert__close"
7380
- }, S0 = /* @__PURE__ */ R({
7380
+ }, D0 = /* @__PURE__ */ E({
7381
7381
  __name: "RAlert",
7382
7382
  props: {
7383
7383
  type: { default: "info" },
@@ -7389,12 +7389,12 @@ const v2 = {
7389
7389
  },
7390
7390
  emits: ["close"],
7391
7391
  setup(H, { emit: V }) {
7392
- const C = H, M = V, i = f(() => ({
7392
+ const C = H, M = V, i = O(() => ({
7393
7393
  " r-alert": !0,
7394
7394
  [`r-alert--${C.variant}`]: !0,
7395
7395
  "r-alert--block": C.block,
7396
7396
  [`r-alert--${C.variant}--${C.type}`]: !0
7397
- })), L = f(() => ({
7397
+ })), L = O(() => ({
7398
7398
  success: "mdiCheckCircle",
7399
7399
  error: "mdiAlertCircle",
7400
7400
  warning: "mdiAlert",
@@ -7403,83 +7403,83 @@ const v2 = {
7403
7403
  function A() {
7404
7404
  M("close");
7405
7405
  }
7406
- return (e, d) => (t(), r("div", {
7407
- class: p(i.value)
7406
+ return (d, e) => (l(), n("div", {
7407
+ class: g(i.value)
7408
7408
  }, [
7409
- Z("div", _2, [
7410
- h(e.$slots, "alert-icon", {}, () => [
7411
- q(D, {
7409
+ S("div", $2, [
7410
+ b(d.$slots, "alert-icon", {}, () => [
7411
+ J(D, {
7412
7412
  name: L.value,
7413
7413
  size: 24
7414
7414
  }, null, 8, ["name"])
7415
7415
  ])
7416
7416
  ]),
7417
- Z("div", E2, [
7418
- h(e.$slots, "content", {}, () => [
7419
- Z("p", W2, b(C.title), 1),
7420
- C.description ? (t(), r("p", N2, b(C.description), 1)) : O("", !0)
7417
+ S("div", Q2, [
7418
+ b(d.$slots, "content", {}, () => [
7419
+ S("p", G2, w(C.title), 1),
7420
+ C.description ? (l(), n("p", U2, w(C.description), 1)) : p("", !0)
7421
7421
  ])
7422
7422
  ]),
7423
- C.closable ? (t(), r("div", I2, [
7424
- h(e.$slots, "custom-close", {
7423
+ C.closable ? (l(), n("div", z2, [
7424
+ b(d.$slots, "custom-close", {
7425
7425
  close: A,
7426
7426
  slotClass: "r-alert__close__button"
7427
7427
  }, () => [
7428
- q(D, {
7428
+ J(D, {
7429
7429
  class: "r-alert__close__button",
7430
7430
  name: "mdiClose",
7431
7431
  size: 16,
7432
7432
  onClick: A
7433
7433
  })
7434
7434
  ])
7435
- ])) : O("", !0)
7435
+ ])) : p("", !0)
7436
7436
  ], 2));
7437
7437
  }
7438
- }), j1 = "data:image/svg+xml,%3csvg%20width='27'%20height='28'%20viewBox='0%200%2027%2028'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M13.4993%2014C17.1827%2014%2020.166%2011.0167%2020.166%207.33334C20.166%203.65%2017.1827%200.666672%2013.4993%200.666672C9.81602%200.666672%206.83268%203.65%206.83268%207.33334C6.83268%2011.0167%209.81602%2014%2013.4993%2014ZM13.4993%2017.3333C9.04935%2017.3333%200.166016%2019.5667%200.166016%2024V25.6667C0.166016%2026.5833%200.916016%2027.3333%201.83268%2027.3333H25.166C26.0827%2027.3333%2026.8327%2026.5833%2026.8327%2025.6667V24C26.8327%2019.5667%2017.9493%2017.3333%2013.4993%2017.3333Z'%20fill='%234C5BE1'/%3e%3c/svg%3e", Q2 = { class: "r-avatar__wrapper" }, G2 = ["alt", "src"], s0 = /* @__PURE__ */ R({
7438
+ }), V2 = "data:image/svg+xml,%3csvg%20width='27'%20height='28'%20viewBox='0%200%2027%2028'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M13.4993%2014C17.1827%2014%2020.166%2011.0167%2020.166%207.33334C20.166%203.65%2017.1827%200.666672%2013.4993%200.666672C9.81602%200.666672%206.83268%203.65%206.83268%207.33334C6.83268%2011.0167%209.81602%2014%2013.4993%2014ZM13.4993%2017.3333C9.04935%2017.3333%200.166016%2019.5667%200.166016%2024V25.6667C0.166016%2026.5833%200.916016%2027.3333%201.83268%2027.3333H25.166C26.0827%2027.3333%2026.8327%2026.5833%2026.8327%2025.6667V24C26.8327%2019.5667%2017.9493%2017.3333%2013.4993%2017.3333Z'%20fill='%234C5BE1'/%3e%3c/svg%3e", K2 = { class: "r-avatar__wrapper" }, q2 = ["alt", "src"], E0 = /* @__PURE__ */ E({
7439
7439
  __name: "RAvatar",
7440
7440
  props: {
7441
7441
  type: { default: "image" },
7442
- src: { default: j1 },
7442
+ src: { default: V2 },
7443
7443
  alt: { default: "Avatar" },
7444
7444
  size: { default: "2xl" },
7445
7445
  online: { type: Boolean, default: !1 },
7446
7446
  text: { default: "" }
7447
7447
  },
7448
7448
  setup(H) {
7449
- const V = H, C = f(() => ({
7449
+ const V = H, C = O(() => ({
7450
7450
  "r-avatar": !0,
7451
7451
  [`r-avatar--${V.size}`]: !0
7452
- })), M = f(() => V.type === "image" && !V.src), i = f(() => M.value ? j1 : V.src);
7452
+ })), M = O(() => V.type === "image" && !V.src), i = O(() => M.value ? V2 : V.src);
7453
7453
  function L(A) {
7454
- const e = A.split(" ");
7455
- return e.length === 1 ? e[0].substring(0, 2) : `${e[0].charAt(0)}${e[1].charAt(0)}`;
7454
+ const d = A.split(" ");
7455
+ return d.length === 1 ? d[0].substring(0, 2) : `${d[0].charAt(0)}${d[1].charAt(0)}`;
7456
7456
  }
7457
- return (A, e) => (t(), r("div", Q2, [
7458
- Z("div", {
7459
- class: p(C.value)
7457
+ return (A, d) => (l(), n("div", K2, [
7458
+ S("div", {
7459
+ class: g(C.value)
7460
7460
  }, [
7461
- V.type === "text" ? (t(), r("p", {
7461
+ V.type === "text" ? (l(), n("p", {
7462
7462
  key: 0,
7463
- class: p(["r-avatar__text", { [`r-avatar__text--${V.size}`]: !0 }])
7464
- }, b(L(V.text)), 3)) : (t(), r("img", {
7463
+ class: g(["r-avatar__text", { [`r-avatar__text--${V.size}`]: !0 }])
7464
+ }, w(L(V.text)), 3)) : (l(), n("img", {
7465
7465
  key: 1,
7466
7466
  alt: V.alt,
7467
- class: p(["r-avatar__image", {
7467
+ class: g(["r-avatar__image", {
7468
7468
  [`r-avatar__image--${V.size}`]: !0,
7469
7469
  "r-avatar__image--anonymous": M.value
7470
7470
  }]),
7471
7471
  src: i.value
7472
- }, null, 10, G2))
7472
+ }, null, 10, q2))
7473
7473
  ], 2),
7474
- V.online ? (t(), r("span", {
7474
+ V.online ? (l(), n("span", {
7475
7475
  key: 0,
7476
- class: p(["r-avatar__online", {
7476
+ class: g(["r-avatar__online", {
7477
7477
  [`r-avatar__online--${V.size}`]: !0
7478
7478
  }])
7479
- }, null, 2)) : O("", !0)
7479
+ }, null, 2)) : p("", !0)
7480
7480
  ]));
7481
7481
  }
7482
- }), $2 = ["innerHTML"], c0 = /* @__PURE__ */ R({
7482
+ }), j2 = ["innerHTML"], _0 = /* @__PURE__ */ E({
7483
7483
  __name: "RBadge",
7484
7484
  props: {
7485
7485
  variant: { default: "primary" },
@@ -7495,7 +7495,7 @@ const v2 = {
7495
7495
  },
7496
7496
  emits: ["click"],
7497
7497
  setup(H) {
7498
- const V = H, C = f(() => ({
7498
+ const V = H, C = O(() => ({
7499
7499
  "r-badge": !0,
7500
7500
  [`r-badge--content ${V.contentClass}`]: V.content,
7501
7501
  [`r-badge--overlap-${V.placement}`]: V.overlap,
@@ -7505,20 +7505,23 @@ const v2 = {
7505
7505
  [`r-badge--${V.variant}`]: V.variant,
7506
7506
  [V.class]: V.class
7507
7507
  }));
7508
- return (M, i) => (t(), r("div", {
7509
- class: p(["r-badge-wrapper group", [V.wrapperClass]])
7508
+ return (M, i) => (l(), n("div", {
7509
+ class: g(["r-badge-wrapper group", [V.wrapperClass]])
7510
7510
  }, [
7511
- Z("span", {
7512
- class: p([{ "animate-ping-2": V.animation }, C.value])
7511
+ S("span", {
7512
+ class: g([{ "animate-ping-2": V.animation }, C.value])
7513
7513
  }, null, 2),
7514
- Z("span", {
7515
- class: p(C.value),
7514
+ S("span", {
7515
+ class: g(C.value),
7516
7516
  innerHTML: V.content
7517
- }, null, 10, $2),
7518
- h(M.$slots, "default")
7517
+ }, null, 10, j2),
7518
+ b(M.$slots, "default")
7519
7519
  ], 2));
7520
7520
  }
7521
- }), U2 = ["disabled"], p0 = /* @__PURE__ */ R({
7521
+ }), X2 = ["disabled"], Y2 = {
7522
+ key: 0,
7523
+ class: "sr-only"
7524
+ }, W0 = /* @__PURE__ */ E({
7522
7525
  __name: "RButton",
7523
7526
  props: {
7524
7527
  variant: { default: "default" },
@@ -7530,11 +7533,15 @@ const v2 = {
7530
7533
  icon: { type: Boolean, default: !1 },
7531
7534
  size: { default: "medium" },
7532
7535
  height: { default: "" },
7533
- block: { type: Boolean, default: !1 }
7536
+ block: { type: Boolean, default: !1 },
7537
+ ariaLabel: { default: "" },
7538
+ ariaPressed: { type: Boolean },
7539
+ ariaExpanded: { type: Boolean },
7540
+ ariaControls: { default: "" }
7534
7541
  },
7535
7542
  emits: ["click"],
7536
7543
  setup(H) {
7537
- const V = H, C = f(() => ({
7544
+ const V = H, C = O(() => ({
7538
7545
  "r-button": !0,
7539
7546
  [`r-button__${V.variant}`]: !0,
7540
7547
  [`r-button__${V.variant}--${V.variant === "default" && V.color === void 0 ? "primary" : V.color}`]: !0,
@@ -7542,54 +7549,66 @@ const v2 = {
7542
7549
  [`r-button--${V.size || "medium"}`]: !0,
7543
7550
  "r-button--only-icon": V.icon,
7544
7551
  "r-button--block": V.block
7545
- })), M = f(() => ({
7552
+ })), M = O(() => ({
7546
7553
  small: 16,
7547
7554
  medium: 16,
7548
7555
  large: 20
7549
- })[V.size || "medium"]), i = f(() => ({
7556
+ })[V.size || "medium"]), i = O(() => ({
7550
7557
  height: V.height ? `${V.height}px` : ""
7558
+ })), L = O(() => ({
7559
+ "aria-label": V.ariaLabel || void 0,
7560
+ "aria-pressed": V.ariaPressed,
7561
+ "aria-expanded": V.ariaExpanded,
7562
+ "aria-controls": V.ariaControls || void 0,
7563
+ "aria-disabled": V.disabled,
7564
+ "aria-busy": V.loading,
7565
+ role: "button"
7551
7566
  }));
7552
- return (L, A) => (t(), r("button", I1(L.$attrs, {
7567
+ return (A, d) => (l(), n("button", T1({ ...A.$attrs, ...L.value }, {
7553
7568
  class: C.value,
7554
- disabled: L.disabled,
7569
+ disabled: A.disabled,
7555
7570
  style: i.value,
7556
- onClick: A[0] || (A[0] = (e) => L.$emit("click"))
7571
+ onClick: d[0] || (d[0] = (e) => A.$emit("click")),
7572
+ onKeydown: [
7573
+ d[1] || (d[1] = p1((e) => A.$emit("click"), ["enter"])),
7574
+ d[2] || (d[2] = p1(o1((e) => A.$emit("click"), ["prevent"]), ["space"]))
7575
+ ]
7557
7576
  }), [
7558
- h(L.$slots, "prepend", {
7577
+ A.loading ? (l(), n("span", Y2, "Loading")) : p("", !0),
7578
+ b(A.$slots, "prepend", {
7559
7579
  onlyIcon: V.icon
7560
7580
  }, () => [
7561
- V.prependIcon ? (t(), _(D, {
7581
+ V.prependIcon ? (l(), x(D, {
7562
7582
  key: 0,
7563
- class: p(["r-button__prepend-icon", {
7583
+ "aria-hidden": "true",
7584
+ class: g(["r-button__prepend-icon", {
7564
7585
  "r-button__prepend-icon--only": V.icon
7565
7586
  }]),
7566
7587
  name: V.prependIcon,
7567
7588
  size: M.value
7568
- }, null, 8, ["class", "name", "size"])) : O("", !0)
7589
+ }, null, 8, ["class", "name", "size"])) : p("", !0)
7569
7590
  ]),
7570
- h(L.$slots, "default", { disabled: L.disabled }),
7571
- h(L.$slots, "append", {
7591
+ b(A.$slots, "default", { disabled: A.disabled }),
7592
+ b(A.$slots, "append", {
7572
7593
  onlyIcon: V.icon
7573
7594
  }, () => [
7574
- !V.icon && V.appendIcon ? (t(), _(D, {
7595
+ !V.icon && V.appendIcon ? (l(), x(D, {
7575
7596
  key: 0,
7597
+ "aria-hidden": "true",
7576
7598
  class: "r-button__append-icon",
7577
7599
  name: V.appendIcon,
7578
7600
  size: M.value
7579
- }, null, 8, ["name", "size"])) : O("", !0)
7601
+ }, null, 8, ["name", "size"])) : p("", !0)
7580
7602
  ])
7581
- ], 16, U2));
7603
+ ], 16, X2));
7582
7604
  }
7583
- }), z2 = { class: "r-checkbox-wrapper" }, K2 = { class: "r-checkbox-container" }, q2 = ["id", "checked", "disabled", "indeterminate"], j2 = ["data-disabled"], X2 = { class: "r-checkbox-texts" }, Y2 = ["data-disabled", "for"], J2 = {
7605
+ }), J2 = { class: "r-checkbox-wrapper" }, C5 = { class: "r-checkbox-container" }, H5 = ["id", "aria-checked", "aria-describedby", "aria-disabled", "aria-invalid", "aria-label", "aria-required", "checked", "disabled", "indeterminate", "name", "required", "value", "onKeydown"], V5 = ["data-disabled"], L5 = { class: "r-checkbox-texts" }, M5 = ["data-disabled", "for"], i5 = {
7584
7606
  key: 0,
7585
- class: "r-checkbox-texts__details"
7586
- }, C5 = {
7607
+ class: "sr-only"
7608
+ }, A5 = {
7587
7609
  key: 0,
7588
- class: "r-checkbox-texts__error"
7589
- }, H5 = {
7590
- key: 1,
7591
- class: "r-checkbox-texts__hint"
7592
- }, O0 = /* @__PURE__ */ R({
7610
+ class: "r-checkbox-texts__details"
7611
+ }, e5 = ["id"], d5 = ["id"], N0 = /* @__PURE__ */ E({
7593
7612
  __name: "RCheckbox",
7594
7613
  props: {
7595
7614
  id: { default: "" },
@@ -7599,81 +7618,110 @@ const v2 = {
7599
7618
  disabled: { default: !1 },
7600
7619
  hint: { default: "" },
7601
7620
  errorMsg: { default: "" },
7602
- hideDetails: { type: Boolean }
7621
+ hideDetails: { type: Boolean },
7622
+ required: { type: Boolean, default: !1 },
7623
+ ariaLabel: { default: "" },
7624
+ name: { default: "" },
7625
+ value: { type: [String, Number, Boolean], default: "" }
7603
7626
  },
7604
7627
  emits: ["update:modelValue"],
7605
7628
  setup(H, { emit: V }) {
7606
- const C = H, M = V, i = y1({
7629
+ const C = H, M = V, i = q1({
7607
7630
  checked: !1,
7608
7631
  indeterminate: !1
7609
7632
  }), L = {
7610
7633
  checked: "mdiCheck",
7611
7634
  unchecked: "",
7612
7635
  indeterminate: "mdiMinus"
7613
- }, A = f(() => i.indeterminate ? L.indeterminate : i.checked ? L.checked : L.unchecked), e = f(() => ({
7636
+ }, A = O(() => i.indeterminate ? L.indeterminate : i.checked ? L.checked : L.unchecked), d = O(() => ({
7614
7637
  "r-checkbox": !0,
7615
7638
  "r-checkbox--checked": i.checked,
7616
7639
  "r-checkbox--disabled": C.disabled,
7617
7640
  "r-checkbox--indeterminate": i.indeterminate,
7618
7641
  "r-checkbox--error": !!C.errorMsg
7619
7642
  }));
7620
- function d(m) {
7621
- C.disabled || (i.checked = m.target.checked, i.indeterminate = !1, M("update:modelValue", i.checked));
7643
+ function e(a) {
7644
+ C.disabled || (i.checked = a.target.checked, i.indeterminate = !1, M("update:modelValue", i.checked));
7622
7645
  }
7623
- return I(
7646
+ N(
7624
7647
  () => C.indeterminate,
7625
- (m) => {
7626
- i.indeterminate = m, m === !0 && (i.checked = !1, M("update:modelValue", i.checked));
7648
+ (a) => {
7649
+ i.indeterminate = a, a === !0 && (i.checked = !1, M("update:modelValue", i.checked));
7627
7650
  },
7628
7651
  {
7629
7652
  // need immediate to set the state on first render for storybook
7630
7653
  // TODO: find a better way to do this
7631
7654
  immediate: !0
7632
7655
  }
7633
- ), I(
7656
+ ), N(
7634
7657
  () => C.modelValue,
7635
- (m) => {
7636
- i.checked = m;
7658
+ (a) => {
7659
+ i.checked = a;
7637
7660
  },
7638
7661
  {
7639
7662
  // need immediate to set the state on first render for storybook
7640
7663
  // TODO: find a better way to do this
7641
7664
  immediate: !0
7642
7665
  }
7643
- ), (m, n) => (t(), r("div", z2, [
7644
- Z("div", K2, [
7645
- Z("input", {
7646
- id: C.id,
7666
+ );
7667
+ const o = O(() => C.id || `checkbox-${Math.random().toString(36).substr(2, 9)}`);
7668
+ return (a, Z) => (l(), n("div", J2, [
7669
+ S("div", C5, [
7670
+ S("input", {
7671
+ id: o.value,
7672
+ "aria-checked": i.indeterminate ? "mixed" : void 0,
7673
+ "aria-describedby": C.errorMsg ? `${o.value}-error` : C.hint ? `${o.value}-hint` : void 0,
7674
+ "aria-disabled": C.disabled,
7675
+ "aria-invalid": !!C.errorMsg,
7676
+ "aria-label": C.ariaLabel || C.label,
7677
+ "aria-required": C.required,
7647
7678
  checked: i.checked,
7648
7679
  class: "r-checkbox-container__input",
7649
7680
  disabled: C.disabled,
7650
7681
  indeterminate: i.indeterminate,
7682
+ name: a.name,
7683
+ required: a.required,
7651
7684
  type: "checkbox",
7652
- onChange: d
7653
- }, null, 40, q2),
7654
- Z("div", {
7655
- class: p(e.value),
7685
+ value: a.value,
7686
+ onChange: e,
7687
+ onKeydown: p1(o1(e, ["prevent"]), ["space"])
7688
+ }, null, 40, H5),
7689
+ S("div", {
7690
+ "aria-hidden": "true",
7691
+ class: g(d.value),
7656
7692
  "data-disabled": C.disabled
7657
7693
  }, [
7658
- q(D, {
7694
+ J(D, {
7659
7695
  name: A.value,
7660
7696
  size: 24
7661
7697
  }, null, 8, ["name"])
7662
- ], 10, j2)
7698
+ ], 10, V5)
7663
7699
  ]),
7664
- Z("div", X2, [
7665
- Z("label", {
7700
+ S("div", L5, [
7701
+ S("label", {
7666
7702
  class: "r-checkbox-texts__label",
7667
7703
  "data-disabled": C.disabled,
7668
- for: C.id
7669
- }, b(C.label), 9, Y2),
7670
- C.hideDetails ? O("", !0) : (t(), r("div", J2, [
7671
- C.errorMsg ? (t(), r("p", C5, b(C.errorMsg), 1)) : (t(), r("p", H5, b(C.hint), 1))
7672
- ]))
7704
+ for: o.value
7705
+ }, [
7706
+ a.required ? (l(), n("span", i5, "Required - ")) : p("", !0),
7707
+ d1(" " + w(a.label), 1)
7708
+ ], 8, M5),
7709
+ !a.hideDetails && (a.errorMsg || a.hint) ? (l(), n("div", A5, [
7710
+ a.errorMsg ? (l(), n("p", {
7711
+ key: 0,
7712
+ id: `${o.value}-error`,
7713
+ class: "r-checkbox-texts__error",
7714
+ role: "alert"
7715
+ }, w(a.errorMsg), 9, e5)) : a.hint ? (l(), n("p", {
7716
+ key: 1,
7717
+ id: `${o.value}-hint`,
7718
+ class: "r-checkbox-texts__hint"
7719
+ }, w(a.hint), 9, d5)) : p("", !0)
7720
+ ])) : p("", !0)
7673
7721
  ])
7674
7722
  ]));
7675
7723
  }
7676
- }), V5 = /* @__PURE__ */ R({
7724
+ }), t5 = /* @__PURE__ */ E({
7677
7725
  __name: "RChip",
7678
7726
  props: {
7679
7727
  variant: { default: "primary" },
@@ -7687,195 +7735,195 @@ const v2 = {
7687
7735
  },
7688
7736
  emits: ["click:chip", "click:close"],
7689
7737
  setup(H, { emit: V }) {
7690
- const C = H, M = V, i = f(() => ({
7738
+ const C = H, M = V, i = O(() => ({
7691
7739
  "r-chip": !0,
7692
7740
  "r-chip--disabled": C.disabled,
7693
7741
  [`r-chip__${C.variant}`]: C.variant,
7694
7742
  [`r-chip__${C.variant}--ghost`]: C.ghost,
7695
7743
  "r-chip--clearable": C.clearable
7696
7744
  }));
7697
- function L(d) {
7698
- C.clearable && d.stopPropagation(), !C.disabled && M("click:chip", d);
7745
+ function L(e) {
7746
+ C.clearable && e.stopPropagation(), !C.disabled && M("click:chip", e);
7699
7747
  }
7700
- function A(d) {
7701
- C.disabled || !C.clearable || (d.stopPropagation(), M("click:close", d));
7748
+ function A(e) {
7749
+ C.disabled || !C.clearable || (e.stopPropagation(), M("click:close", e));
7702
7750
  }
7703
- const e = f(() => C.clearable ? "mdiClose" : C.appendIcon);
7704
- return (d, m) => (t(), r("div", {
7705
- class: p(i.value)
7751
+ const d = O(() => C.clearable ? "mdiClose" : C.appendIcon);
7752
+ return (e, o) => (l(), n("div", {
7753
+ class: g(i.value)
7706
7754
  }, [
7707
- Z("div", {
7755
+ S("div", {
7708
7756
  class: "r-chip__content",
7709
- onClick: m[0] || (m[0] = (n) => L(n))
7757
+ onClick: o[0] || (o[0] = (a) => L(a))
7710
7758
  }, [
7711
- h(d.$slots, "prepend", {
7759
+ b(e.$slots, "prepend", {
7712
7760
  disabled: C.disabled
7713
7761
  }, () => [
7714
- C.prependIcon ? (t(), _(D, {
7762
+ C.prependIcon ? (l(), x(D, {
7715
7763
  key: 0,
7716
7764
  "aria-disabled": C.disabled,
7717
7765
  class: "r-chip__content__prepend-icon",
7718
7766
  name: C.prependIcon,
7719
7767
  size: 12
7720
- }, null, 8, ["aria-disabled", "name"])) : O("", !0)
7768
+ }, null, 8, ["aria-disabled", "name"])) : p("", !0)
7721
7769
  ]),
7722
- Z("span", {
7723
- class: p(["r-chip__content__label", [C.noWrap && "whitespace-nowrap"]])
7724
- }, b(C.label), 3)
7770
+ S("span", {
7771
+ class: g(["r-chip__content__label", [C.noWrap && "whitespace-nowrap"]])
7772
+ }, w(C.label), 3)
7725
7773
  ]),
7726
- h(d.$slots, "append", {
7774
+ b(e.$slots, "append", {
7727
7775
  disabled: C.disabled
7728
7776
  }, () => [
7729
- e.value ? (t(), _(D, {
7777
+ d.value ? (l(), x(D, {
7730
7778
  key: 0,
7731
7779
  "aria-disabled": C.disabled,
7732
7780
  class: "r-chip__content__append-icon",
7733
- name: e.value,
7781
+ name: d.value,
7734
7782
  size: 12,
7735
- onClick: m[1] || (m[1] = (n) => A(n))
7736
- }, null, 8, ["aria-disabled", "name"])) : O("", !0)
7783
+ onClick: o[1] || (o[1] = (a) => A(a))
7784
+ }, null, 8, ["aria-disabled", "name"])) : p("", !0)
7737
7785
  ])
7738
7786
  ], 2));
7739
7787
  }
7740
7788
  });
7741
- function L5(H) {
7742
- return p2() ? (O2(H), !0) : !1;
7789
+ function m5(H) {
7790
+ return v2() ? (B2(H), !0) : !1;
7743
7791
  }
7744
- function A2(H) {
7745
- return typeof H == "function" ? H() : J(H);
7792
+ function a2(H) {
7793
+ return typeof H == "function" ? H() : L1(H);
7746
7794
  }
7747
- const e2 = typeof window < "u" && typeof document < "u";
7795
+ const r2 = typeof window < "u" && typeof document < "u";
7748
7796
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
7749
- const M5 = Object.prototype.toString, i5 = (H) => M5.call(H) === "[object Object]", D1 = () => {
7750
- }, A5 = /* @__PURE__ */ e5();
7751
- function e5() {
7797
+ const l5 = Object.prototype.toString, o5 = (H) => l5.call(H) === "[object Object]", Q1 = () => {
7798
+ }, a5 = /* @__PURE__ */ r5();
7799
+ function r5() {
7752
7800
  var H;
7753
- return e2 && ((H = window == null ? void 0 : window.navigator) == null ? void 0 : H.userAgent) && /* @__PURE__ */ /iP(ad|hone|od)/.test(window.navigator.userAgent);
7801
+ return r2 && ((H = window == null ? void 0 : window.navigator) == null ? void 0 : H.userAgent) && /* @__PURE__ */ /iP(ad|hone|od)/.test(window.navigator.userAgent);
7754
7802
  }
7755
- function r1(H) {
7803
+ function s1(H) {
7756
7804
  var V;
7757
- const C = A2(H);
7805
+ const C = a2(H);
7758
7806
  return (V = C == null ? void 0 : C.$el) != null ? V : C;
7759
7807
  }
7760
- const d2 = e2 ? window : void 0;
7761
- function x1(...H) {
7808
+ const n2 = r2 ? window : void 0;
7809
+ function $1(...H) {
7762
7810
  let V, C, M, i;
7763
- if (typeof H[0] == "string" || Array.isArray(H[0]) ? ([C, M, i] = H, V = d2) : [V, C, M, i] = H, !V)
7764
- return D1;
7811
+ if (typeof H[0] == "string" || Array.isArray(H[0]) ? ([C, M, i] = H, V = n2) : [V, C, M, i] = H, !V)
7812
+ return Q1;
7765
7813
  Array.isArray(C) || (C = [C]), Array.isArray(M) || (M = [M]);
7766
7814
  const L = [], A = () => {
7767
- L.forEach((n) => n()), L.length = 0;
7768
- }, e = (n, a, o, l) => (n.addEventListener(a, o, l), () => n.removeEventListener(a, o, l)), d = I(
7769
- () => [r1(V), A2(i)],
7770
- ([n, a]) => {
7771
- if (A(), !n)
7815
+ L.forEach((a) => a()), L.length = 0;
7816
+ }, d = (a, Z, r, t) => (a.addEventListener(Z, r, t), () => a.removeEventListener(Z, r, t)), e = N(
7817
+ () => [s1(V), a2(i)],
7818
+ ([a, Z]) => {
7819
+ if (A(), !a)
7772
7820
  return;
7773
- const o = i5(a) ? { ...a } : a;
7821
+ const r = o5(Z) ? { ...Z } : Z;
7774
7822
  L.push(
7775
- ...C.flatMap((l) => M.map((S) => e(n, l, S, o)))
7823
+ ...C.flatMap((t) => M.map((u) => d(a, t, u, r)))
7776
7824
  );
7777
7825
  },
7778
7826
  { immediate: !0, flush: "post" }
7779
- ), m = () => {
7780
- d(), A();
7827
+ ), o = () => {
7828
+ e(), A();
7781
7829
  };
7782
- return L5(m), m;
7830
+ return m5(o), o;
7783
7831
  }
7784
- let X1 = !1;
7785
- function d5(H, V, C = {}) {
7786
- const { window: M = d2, ignore: i = [], capture: L = !0, detectIframe: A = !1 } = C;
7832
+ let L2 = !1;
7833
+ function n5(H, V, C = {}) {
7834
+ const { window: M = n2, ignore: i = [], capture: L = !0, detectIframe: A = !1 } = C;
7787
7835
  if (!M)
7788
7836
  return;
7789
- A5 && !X1 && (X1 = !0, Array.from(M.document.body.children).forEach((o) => o.addEventListener("click", D1)), M.document.documentElement.addEventListener("click", D1));
7790
- let e = !0;
7791
- const d = (o) => i.some((l) => {
7792
- if (typeof l == "string")
7793
- return Array.from(M.document.querySelectorAll(l)).some((S) => S === o.target || o.composedPath().includes(S));
7837
+ a5 && !L2 && (L2 = !0, Array.from(M.document.body.children).forEach((r) => r.addEventListener("click", Q1)), M.document.documentElement.addEventListener("click", Q1));
7838
+ let d = !0;
7839
+ const e = (r) => i.some((t) => {
7840
+ if (typeof t == "string")
7841
+ return Array.from(M.document.querySelectorAll(t)).some((u) => u === r.target || r.composedPath().includes(u));
7794
7842
  {
7795
- const S = r1(l);
7796
- return S && (o.target === S || o.composedPath().includes(S));
7843
+ const u = s1(t);
7844
+ return u && (r.target === u || r.composedPath().includes(u));
7797
7845
  }
7798
- }), n = [
7799
- x1(M, "click", (o) => {
7800
- const l = r1(H);
7801
- if (!(!l || l === o.target || o.composedPath().includes(l))) {
7802
- if (o.detail === 0 && (e = !d(o)), !e) {
7803
- e = !0;
7846
+ }), a = [
7847
+ $1(M, "click", (r) => {
7848
+ const t = s1(H);
7849
+ if (!(!t || t === r.target || r.composedPath().includes(t))) {
7850
+ if (r.detail === 0 && (d = !e(r)), !d) {
7851
+ d = !0;
7804
7852
  return;
7805
7853
  }
7806
- V(o);
7854
+ V(r);
7807
7855
  }
7808
7856
  }, { passive: !0, capture: L }),
7809
- x1(M, "pointerdown", (o) => {
7810
- const l = r1(H);
7811
- e = !d(o) && !!(l && !o.composedPath().includes(l));
7857
+ $1(M, "pointerdown", (r) => {
7858
+ const t = s1(H);
7859
+ d = !e(r) && !!(t && !r.composedPath().includes(t));
7812
7860
  }, { passive: !0 }),
7813
- A && x1(M, "blur", (o) => {
7861
+ A && $1(M, "blur", (r) => {
7814
7862
  setTimeout(() => {
7815
- var l;
7816
- const S = r1(H);
7817
- ((l = M.document.activeElement) == null ? void 0 : l.tagName) === "IFRAME" && !(S != null && S.contains(M.document.activeElement)) && V(o);
7863
+ var t;
7864
+ const u = s1(H);
7865
+ ((t = M.document.activeElement) == null ? void 0 : t.tagName) === "IFRAME" && !(u != null && u.contains(M.document.activeElement)) && V(r);
7818
7866
  }, 0);
7819
7867
  })
7820
7868
  ].filter(Boolean);
7821
- return () => n.forEach((o) => o());
7869
+ return () => a.forEach((r) => r());
7822
7870
  }
7823
- function t5() {
7871
+ function Z5() {
7824
7872
  function H() {
7825
7873
  return ((1 + Math.random()) * 65536 | 0).toString(16).substring(1);
7826
7874
  }
7827
7875
  return `${H() + H()}-${H()}-${H()}-${H()}-${H()}${H()}${H()}`;
7828
7876
  }
7829
- const m5 = ["top", "right", "bottom", "left"], Z1 = Math.min, m1 = Math.max, B1 = Math.round, V1 = (H) => ({
7877
+ const u5 = ["top", "right", "bottom", "left"], f1 = Math.min, n1 = Math.max, F1 = Math.round, A1 = (H) => ({
7830
7878
  x: H,
7831
7879
  y: H
7832
- }), l5 = {
7880
+ }), S5 = {
7833
7881
  left: "right",
7834
7882
  right: "left",
7835
7883
  bottom: "top",
7836
7884
  top: "bottom"
7837
- }, o5 = {
7885
+ }, s5 = {
7838
7886
  start: "end",
7839
7887
  end: "start"
7840
7888
  };
7841
- function _1(H, V, C) {
7842
- return m1(H, Z1(V, C));
7889
+ function G1(H, V, C) {
7890
+ return n1(H, f1(V, C));
7843
7891
  }
7844
- function n1(H, V) {
7892
+ function S1(H, V) {
7845
7893
  return typeof H == "function" ? H(V) : H;
7846
7894
  }
7847
- function e1(H) {
7895
+ function a1(H) {
7848
7896
  return H.split("-")[0];
7849
7897
  }
7850
- function s1(H) {
7898
+ function g1(H) {
7851
7899
  return H.split("-")[1];
7852
7900
  }
7853
- function t2(H) {
7901
+ function Z2(H) {
7854
7902
  return H === "x" ? "y" : "x";
7855
7903
  }
7856
- function G1(H) {
7904
+ function Y1(H) {
7857
7905
  return H === "y" ? "height" : "width";
7858
7906
  }
7859
- function P1(H) {
7860
- return ["top", "bottom"].includes(e1(H)) ? "y" : "x";
7907
+ function E1(H) {
7908
+ return ["top", "bottom"].includes(a1(H)) ? "y" : "x";
7861
7909
  }
7862
- function $1(H) {
7863
- return t2(P1(H));
7910
+ function J1(H) {
7911
+ return Z2(E1(H));
7864
7912
  }
7865
- function n5(H, V, C) {
7913
+ function c5(H, V, C) {
7866
7914
  C === void 0 && (C = !1);
7867
- const M = s1(H), i = $1(H), L = G1(i);
7915
+ const M = g1(H), i = J1(H), L = Y1(i);
7868
7916
  let A = i === "x" ? M === (C ? "end" : "start") ? "right" : "left" : M === "start" ? "bottom" : "top";
7869
- return V.reference[L] > V.floating[L] && (A = b1(A)), [A, b1(A)];
7917
+ return V.reference[L] > V.floating[L] && (A = R1(A)), [A, R1(A)];
7870
7918
  }
7871
- function r5(H) {
7872
- const V = b1(H);
7873
- return [E1(H), V, E1(V)];
7919
+ function p5(H) {
7920
+ const V = R1(H);
7921
+ return [U1(H), V, U1(V)];
7874
7922
  }
7875
- function E1(H) {
7876
- return H.replace(/start|end/g, (V) => o5[V]);
7923
+ function U1(H) {
7924
+ return H.replace(/start|end/g, (V) => s5[V]);
7877
7925
  }
7878
- function a5(H, V, C) {
7926
+ function O5(H, V, C) {
7879
7927
  const M = ["left", "right"], i = ["right", "left"], L = ["top", "bottom"], A = ["bottom", "top"];
7880
7928
  switch (H) {
7881
7929
  case "top":
@@ -7888,15 +7936,15 @@ function a5(H, V, C) {
7888
7936
  return [];
7889
7937
  }
7890
7938
  }
7891
- function Z5(H, V, C, M) {
7892
- const i = s1(H);
7893
- let L = a5(e1(H), C === "start", M);
7894
- return i && (L = L.map((A) => A + "-" + i), V && (L = L.concat(L.map(E1)))), L;
7939
+ function f5(H, V, C, M) {
7940
+ const i = g1(H);
7941
+ let L = O5(a1(H), C === "start", M);
7942
+ return i && (L = L.map((A) => A + "-" + i), V && (L = L.concat(L.map(U1)))), L;
7895
7943
  }
7896
- function b1(H) {
7897
- return H.replace(/left|right|bottom|top/g, (V) => l5[V]);
7944
+ function R1(H) {
7945
+ return H.replace(/left|right|bottom|top/g, (V) => S5[V]);
7898
7946
  }
7899
- function u5(H) {
7947
+ function h5(H) {
7900
7948
  return {
7901
7949
  top: 0,
7902
7950
  right: 0,
@@ -7905,15 +7953,15 @@ function u5(H) {
7905
7953
  ...H
7906
7954
  };
7907
7955
  }
7908
- function m2(H) {
7909
- return typeof H != "number" ? u5(H) : {
7956
+ function u2(H) {
7957
+ return typeof H != "number" ? h5(H) : {
7910
7958
  top: H,
7911
7959
  right: H,
7912
7960
  bottom: H,
7913
7961
  left: H
7914
7962
  };
7915
7963
  }
7916
- function w1(H) {
7964
+ function x1(H) {
7917
7965
  return {
7918
7966
  ...H,
7919
7967
  top: H.y,
@@ -7922,119 +7970,119 @@ function w1(H) {
7922
7970
  bottom: H.y + H.height
7923
7971
  };
7924
7972
  }
7925
- function Y1(H, V, C) {
7973
+ function M2(H, V, C) {
7926
7974
  let {
7927
7975
  reference: M,
7928
7976
  floating: i
7929
7977
  } = H;
7930
- const L = P1(V), A = $1(V), e = G1(A), d = e1(V), m = L === "y", n = M.x + M.width / 2 - i.width / 2, a = M.y + M.height / 2 - i.height / 2, o = M[e] / 2 - i[e] / 2;
7931
- let l;
7932
- switch (d) {
7978
+ const L = E1(V), A = J1(V), d = Y1(A), e = a1(V), o = L === "y", a = M.x + M.width / 2 - i.width / 2, Z = M.y + M.height / 2 - i.height / 2, r = M[d] / 2 - i[d] / 2;
7979
+ let t;
7980
+ switch (e) {
7933
7981
  case "top":
7934
- l = {
7935
- x: n,
7982
+ t = {
7983
+ x: a,
7936
7984
  y: M.y - i.height
7937
7985
  };
7938
7986
  break;
7939
7987
  case "bottom":
7940
- l = {
7941
- x: n,
7988
+ t = {
7989
+ x: a,
7942
7990
  y: M.y + M.height
7943
7991
  };
7944
7992
  break;
7945
7993
  case "right":
7946
- l = {
7994
+ t = {
7947
7995
  x: M.x + M.width,
7948
- y: a
7996
+ y: Z
7949
7997
  };
7950
7998
  break;
7951
7999
  case "left":
7952
- l = {
8000
+ t = {
7953
8001
  x: M.x - i.width,
7954
- y: a
8002
+ y: Z
7955
8003
  };
7956
8004
  break;
7957
8005
  default:
7958
- l = {
8006
+ t = {
7959
8007
  x: M.x,
7960
8008
  y: M.y
7961
8009
  };
7962
8010
  }
7963
- switch (s1(V)) {
8011
+ switch (g1(V)) {
7964
8012
  case "start":
7965
- l[A] -= o * (C && m ? -1 : 1);
8013
+ t[A] -= r * (C && o ? -1 : 1);
7966
8014
  break;
7967
8015
  case "end":
7968
- l[A] += o * (C && m ? -1 : 1);
8016
+ t[A] += r * (C && o ? -1 : 1);
7969
8017
  break;
7970
8018
  }
7971
- return l;
8019
+ return t;
7972
8020
  }
7973
- const S5 = async (H, V, C) => {
8021
+ const g5 = async (H, V, C) => {
7974
8022
  const {
7975
8023
  placement: M = "bottom",
7976
8024
  strategy: i = "absolute",
7977
8025
  middleware: L = [],
7978
8026
  platform: A
7979
- } = C, e = L.filter(Boolean), d = await (A.isRTL == null ? void 0 : A.isRTL(V));
7980
- let m = await A.getElementRects({
8027
+ } = C, d = L.filter(Boolean), e = await (A.isRTL == null ? void 0 : A.isRTL(V));
8028
+ let o = await A.getElementRects({
7981
8029
  reference: H,
7982
8030
  floating: V,
7983
8031
  strategy: i
7984
8032
  }), {
7985
- x: n,
7986
- y: a
7987
- } = Y1(m, M, d), o = M, l = {}, S = 0;
7988
- for (let B = 0; B < e.length; B++) {
8033
+ x: a,
8034
+ y: Z
8035
+ } = M2(o, M, e), r = M, t = {}, u = 0;
8036
+ for (let k = 0; k < d.length; k++) {
7989
8037
  const {
7990
- name: y,
7991
- fn: k
7992
- } = e[B], {
7993
- x: w,
8038
+ name: P,
8039
+ fn: v
8040
+ } = d[k], {
8041
+ x: y,
7994
8042
  y: T,
7995
- data: F,
7996
- reset: P
7997
- } = await k({
7998
- x: n,
7999
- y: a,
8043
+ data: s,
8044
+ reset: B
8045
+ } = await v({
8046
+ x: a,
8047
+ y: Z,
8000
8048
  initialPlacement: M,
8001
- placement: o,
8049
+ placement: r,
8002
8050
  strategy: i,
8003
- middlewareData: l,
8004
- rects: m,
8051
+ middlewareData: t,
8052
+ rects: o,
8005
8053
  platform: A,
8006
8054
  elements: {
8007
8055
  reference: H,
8008
8056
  floating: V
8009
8057
  }
8010
8058
  });
8011
- if (n = w ?? n, a = T ?? a, l = {
8012
- ...l,
8013
- [y]: {
8014
- ...l[y],
8015
- ...F
8059
+ if (a = y ?? a, Z = T ?? Z, t = {
8060
+ ...t,
8061
+ [P]: {
8062
+ ...t[P],
8063
+ ...s
8016
8064
  }
8017
- }, P && S <= 50) {
8018
- S++, typeof P == "object" && (P.placement && (o = P.placement), P.rects && (m = P.rects === !0 ? await A.getElementRects({
8065
+ }, B && u <= 50) {
8066
+ u++, typeof B == "object" && (B.placement && (r = B.placement), B.rects && (o = B.rects === !0 ? await A.getElementRects({
8019
8067
  reference: H,
8020
8068
  floating: V,
8021
8069
  strategy: i
8022
- }) : P.rects), {
8023
- x: n,
8024
- y: a
8025
- } = Y1(m, o, d)), B = -1;
8070
+ }) : B.rects), {
8071
+ x: a,
8072
+ y: Z
8073
+ } = M2(o, r, e)), k = -1;
8026
8074
  continue;
8027
8075
  }
8028
8076
  }
8029
8077
  return {
8030
- x: n,
8031
- y: a,
8032
- placement: o,
8078
+ x: a,
8079
+ y: Z,
8080
+ placement: r,
8033
8081
  strategy: i,
8034
- middlewareData: l
8082
+ middlewareData: t
8035
8083
  };
8036
8084
  };
8037
- async function v1(H, V) {
8085
+ async function D1(H, V) {
8038
8086
  var C;
8039
8087
  V === void 0 && (V = {});
8040
8088
  const {
@@ -8042,42 +8090,42 @@ async function v1(H, V) {
8042
8090
  y: i,
8043
8091
  platform: L,
8044
8092
  rects: A,
8045
- elements: e,
8046
- strategy: d
8093
+ elements: d,
8094
+ strategy: e
8047
8095
  } = H, {
8048
- boundary: m = "clippingAncestors",
8049
- rootBoundary: n = "viewport",
8050
- elementContext: a = "floating",
8051
- altBoundary: o = !1,
8052
- padding: l = 0
8053
- } = n1(V, H), S = m2(l), y = e[o ? a === "floating" ? "reference" : "floating" : a], k = w1(await L.getClippingRect({
8054
- element: (C = await (L.isElement == null ? void 0 : L.isElement(y))) == null || C ? y : y.contextElement || await (L.getDocumentElement == null ? void 0 : L.getDocumentElement(e.floating)),
8055
- boundary: m,
8056
- rootBoundary: n,
8057
- strategy: d
8058
- })), w = a === "floating" ? {
8096
+ boundary: o = "clippingAncestors",
8097
+ rootBoundary: a = "viewport",
8098
+ elementContext: Z = "floating",
8099
+ altBoundary: r = !1,
8100
+ padding: t = 0
8101
+ } = S1(V, H), u = u2(t), P = d[r ? Z === "floating" ? "reference" : "floating" : Z], v = x1(await L.getClippingRect({
8102
+ element: (C = await (L.isElement == null ? void 0 : L.isElement(P))) == null || C ? P : P.contextElement || await (L.getDocumentElement == null ? void 0 : L.getDocumentElement(d.floating)),
8103
+ boundary: o,
8104
+ rootBoundary: a,
8105
+ strategy: e
8106
+ })), y = Z === "floating" ? {
8059
8107
  ...A.floating,
8060
8108
  x: M,
8061
8109
  y: i
8062
- } : A.reference, T = await (L.getOffsetParent == null ? void 0 : L.getOffsetParent(e.floating)), F = await (L.isElement == null ? void 0 : L.isElement(T)) ? await (L.getScale == null ? void 0 : L.getScale(T)) || {
8110
+ } : A.reference, T = await (L.getOffsetParent == null ? void 0 : L.getOffsetParent(d.floating)), s = await (L.isElement == null ? void 0 : L.isElement(T)) ? await (L.getScale == null ? void 0 : L.getScale(T)) || {
8063
8111
  x: 1,
8064
8112
  y: 1
8065
8113
  } : {
8066
8114
  x: 1,
8067
8115
  y: 1
8068
- }, P = w1(L.convertOffsetParentRelativeRectToViewportRelativeRect ? await L.convertOffsetParentRelativeRectToViewportRelativeRect({
8069
- rect: w,
8116
+ }, B = x1(L.convertOffsetParentRelativeRectToViewportRelativeRect ? await L.convertOffsetParentRelativeRectToViewportRelativeRect({
8117
+ rect: y,
8070
8118
  offsetParent: T,
8071
- strategy: d
8072
- }) : w);
8119
+ strategy: e
8120
+ }) : y);
8073
8121
  return {
8074
- top: (k.top - P.top + S.top) / F.y,
8075
- bottom: (P.bottom - k.bottom + S.bottom) / F.y,
8076
- left: (k.left - P.left + S.left) / F.x,
8077
- right: (P.right - k.right + S.right) / F.x
8122
+ top: (v.top - B.top + u.top) / s.y,
8123
+ bottom: (B.bottom - v.bottom + u.bottom) / s.y,
8124
+ left: (v.left - B.left + u.left) / s.x,
8125
+ right: (B.right - v.right + u.right) / s.x
8078
8126
  };
8079
8127
  }
8080
- const s5 = (H) => ({
8128
+ const k5 = (H) => ({
8081
8129
  name: "arrow",
8082
8130
  options: H,
8083
8131
  async fn(V) {
@@ -8087,34 +8135,34 @@ const s5 = (H) => ({
8087
8135
  placement: i,
8088
8136
  rects: L,
8089
8137
  platform: A,
8090
- elements: e,
8091
- middlewareData: d
8138
+ elements: d,
8139
+ middlewareData: e
8092
8140
  } = V, {
8093
- element: m,
8094
- padding: n = 0
8095
- } = n1(H, V) || {};
8096
- if (m == null)
8141
+ element: o,
8142
+ padding: a = 0
8143
+ } = S1(H, V) || {};
8144
+ if (o == null)
8097
8145
  return {};
8098
- const a = m2(n), o = {
8146
+ const Z = u2(a), r = {
8099
8147
  x: C,
8100
8148
  y: M
8101
- }, l = $1(i), S = G1(l), B = await A.getDimensions(m), y = l === "y", k = y ? "top" : "left", w = y ? "bottom" : "right", T = y ? "clientHeight" : "clientWidth", F = L.reference[S] + L.reference[l] - o[l] - L.floating[S], P = o[l] - L.reference[l], U = await (A.getOffsetParent == null ? void 0 : A.getOffsetParent(m));
8102
- let W = U ? U[T] : 0;
8103
- (!W || !await (A.isElement == null ? void 0 : A.isElement(U))) && (W = e.floating[T] || L.floating[S]);
8104
- const g = F / 2 - P / 2, N = W / 2 - B[S] / 2 - 1, i1 = Z1(a[k], N), A1 = Z1(a[w], N), Q = i1, u = W - B[S] - A1, s = W / 2 - B[S] / 2 + g, v = _1(Q, s, u), x = !d.arrow && s1(i) != null && s != v && L.reference[S] / 2 - (s < Q ? i1 : A1) - B[S] / 2 < 0, c = x ? s < Q ? s - Q : s - u : 0;
8149
+ }, t = J1(i), u = Y1(t), k = await A.getDimensions(o), P = t === "y", v = P ? "top" : "left", y = P ? "bottom" : "right", T = P ? "clientHeight" : "clientWidth", s = L.reference[u] + L.reference[t] - r[t] - L.floating[u], B = r[t] - L.reference[t], I = await (A.getOffsetParent == null ? void 0 : A.getOffsetParent(o));
8150
+ let F = I ? I[T] : 0;
8151
+ (!F || !await (A.isElement == null ? void 0 : A.isElement(I))) && (F = d.floating[T] || L.floating[u]);
8152
+ const c = s / 2 - B / 2, $ = F / 2 - k[u] / 2 - 1, m1 = f1(Z[v], $), l1 = f1(Z[y], $), Q = m1, Y = F - k[u] - l1, _ = F / 2 - k[u] / 2 + c, K = G1(Q, _, Y), q = !e.arrow && g1(i) != null && _ != K && L.reference[u] / 2 - (_ < Q ? m1 : l1) - k[u] / 2 < 0, m = q ? _ < Q ? _ - Q : _ - Y : 0;
8105
8153
  return {
8106
- [l]: o[l] + c,
8154
+ [t]: r[t] + m,
8107
8155
  data: {
8108
- [l]: v,
8109
- centerOffset: s - v - c,
8110
- ...x && {
8111
- alignmentOffset: c
8156
+ [t]: K,
8157
+ centerOffset: _ - K - m,
8158
+ ...q && {
8159
+ alignmentOffset: m
8112
8160
  }
8113
8161
  },
8114
- reset: x
8162
+ reset: q
8115
8163
  };
8116
8164
  }
8117
- }), c5 = function(H) {
8165
+ }), b5 = function(H) {
8118
8166
  return H === void 0 && (H = {}), {
8119
8167
  name: "flip",
8120
8168
  options: H,
@@ -8124,61 +8172,61 @@ const s5 = (H) => ({
8124
8172
  placement: i,
8125
8173
  middlewareData: L,
8126
8174
  rects: A,
8127
- initialPlacement: e,
8128
- platform: d,
8129
- elements: m
8175
+ initialPlacement: d,
8176
+ platform: e,
8177
+ elements: o
8130
8178
  } = V, {
8131
- mainAxis: n = !0,
8132
- crossAxis: a = !0,
8133
- fallbackPlacements: o,
8134
- fallbackStrategy: l = "bestFit",
8135
- fallbackAxisSideDirection: S = "none",
8136
- flipAlignment: B = !0,
8137
- ...y
8138
- } = n1(H, V);
8179
+ mainAxis: a = !0,
8180
+ crossAxis: Z = !0,
8181
+ fallbackPlacements: r,
8182
+ fallbackStrategy: t = "bestFit",
8183
+ fallbackAxisSideDirection: u = "none",
8184
+ flipAlignment: k = !0,
8185
+ ...P
8186
+ } = S1(H, V);
8139
8187
  if ((C = L.arrow) != null && C.alignmentOffset)
8140
8188
  return {};
8141
- const k = e1(i), w = e1(e) === e, T = await (d.isRTL == null ? void 0 : d.isRTL(m.floating)), F = o || (w || !B ? [b1(e)] : r5(e));
8142
- !o && S !== "none" && F.push(...Z5(e, B, S, T));
8143
- const P = [e, ...F], U = await v1(V, y), W = [];
8144
- let g = ((M = L.flip) == null ? void 0 : M.overflows) || [];
8145
- if (n && W.push(U[k]), a) {
8146
- const Q = n5(i, A, T);
8147
- W.push(U[Q[0]], U[Q[1]]);
8189
+ const v = a1(i), y = a1(d) === d, T = await (e.isRTL == null ? void 0 : e.isRTL(o.floating)), s = r || (y || !k ? [R1(d)] : p5(d));
8190
+ !r && u !== "none" && s.push(...f5(d, k, u, T));
8191
+ const B = [d, ...s], I = await D1(V, P), F = [];
8192
+ let c = ((M = L.flip) == null ? void 0 : M.overflows) || [];
8193
+ if (a && F.push(I[v]), Z) {
8194
+ const Q = c5(i, A, T);
8195
+ F.push(I[Q[0]], I[Q[1]]);
8148
8196
  }
8149
- if (g = [...g, {
8197
+ if (c = [...c, {
8150
8198
  placement: i,
8151
- overflows: W
8152
- }], !W.every((Q) => Q <= 0)) {
8153
- var N, i1;
8154
- const Q = (((N = L.flip) == null ? void 0 : N.index) || 0) + 1, u = P[Q];
8155
- if (u)
8199
+ overflows: F
8200
+ }], !F.every((Q) => Q <= 0)) {
8201
+ var $, m1;
8202
+ const Q = ((($ = L.flip) == null ? void 0 : $.index) || 0) + 1, Y = B[Q];
8203
+ if (Y)
8156
8204
  return {
8157
8205
  data: {
8158
8206
  index: Q,
8159
- overflows: g
8207
+ overflows: c
8160
8208
  },
8161
8209
  reset: {
8162
- placement: u
8210
+ placement: Y
8163
8211
  }
8164
8212
  };
8165
- let s = (i1 = g.filter((v) => v.overflows[0] <= 0).sort((v, x) => v.overflows[1] - x.overflows[1])[0]) == null ? void 0 : i1.placement;
8166
- if (!s)
8167
- switch (l) {
8213
+ let _ = (m1 = c.filter((K) => K.overflows[0] <= 0).sort((K, q) => K.overflows[1] - q.overflows[1])[0]) == null ? void 0 : m1.placement;
8214
+ if (!_)
8215
+ switch (t) {
8168
8216
  case "bestFit": {
8169
- var A1;
8170
- const v = (A1 = g.map((x) => [x.placement, x.overflows.filter((c) => c > 0).reduce((c, G) => c + G, 0)]).sort((x, c) => x[1] - c[1])[0]) == null ? void 0 : A1[0];
8171
- v && (s = v);
8217
+ var l1;
8218
+ const K = (l1 = c.map((q) => [q.placement, q.overflows.filter((m) => m > 0).reduce((m, f) => m + f, 0)]).sort((q, m) => q[1] - m[1])[0]) == null ? void 0 : l1[0];
8219
+ K && (_ = K);
8172
8220
  break;
8173
8221
  }
8174
8222
  case "initialPlacement":
8175
- s = e;
8223
+ _ = d;
8176
8224
  break;
8177
8225
  }
8178
- if (i !== s)
8226
+ if (i !== _)
8179
8227
  return {
8180
8228
  reset: {
8181
- placement: s
8229
+ placement: _
8182
8230
  }
8183
8231
  };
8184
8232
  }
@@ -8186,7 +8234,7 @@ const s5 = (H) => ({
8186
8234
  }
8187
8235
  };
8188
8236
  };
8189
- function J1(H, V) {
8237
+ function i2(H, V) {
8190
8238
  return {
8191
8239
  top: H.top - V.height,
8192
8240
  right: H.right - V.width,
@@ -8194,10 +8242,10 @@ function J1(H, V) {
8194
8242
  left: H.left - V.width
8195
8243
  };
8196
8244
  }
8197
- function C2(H) {
8198
- return m5.some((V) => H[V] >= 0);
8245
+ function A2(H) {
8246
+ return u5.some((V) => H[V] >= 0);
8199
8247
  }
8200
- const p5 = function(H) {
8248
+ const v5 = function(H) {
8201
8249
  return H === void 0 && (H = {}), {
8202
8250
  name: "hide",
8203
8251
  options: H,
@@ -8207,29 +8255,29 @@ const p5 = function(H) {
8207
8255
  } = V, {
8208
8256
  strategy: M = "referenceHidden",
8209
8257
  ...i
8210
- } = n1(H, V);
8258
+ } = S1(H, V);
8211
8259
  switch (M) {
8212
8260
  case "referenceHidden": {
8213
- const L = await v1(V, {
8261
+ const L = await D1(V, {
8214
8262
  ...i,
8215
8263
  elementContext: "reference"
8216
- }), A = J1(L, C.reference);
8264
+ }), A = i2(L, C.reference);
8217
8265
  return {
8218
8266
  data: {
8219
8267
  referenceHiddenOffsets: A,
8220
- referenceHidden: C2(A)
8268
+ referenceHidden: A2(A)
8221
8269
  }
8222
8270
  };
8223
8271
  }
8224
8272
  case "escaped": {
8225
- const L = await v1(V, {
8273
+ const L = await D1(V, {
8226
8274
  ...i,
8227
8275
  altBoundary: !0
8228
- }), A = J1(L, C.floating);
8276
+ }), A = i2(L, C.floating);
8229
8277
  return {
8230
8278
  data: {
8231
8279
  escapedOffsets: A,
8232
- escaped: C2(A)
8280
+ escaped: A2(A)
8233
8281
  }
8234
8282
  };
8235
8283
  }
@@ -8239,35 +8287,35 @@ const p5 = function(H) {
8239
8287
  }
8240
8288
  };
8241
8289
  };
8242
- async function O5(H, V) {
8290
+ async function B5(H, V) {
8243
8291
  const {
8244
8292
  placement: C,
8245
8293
  platform: M,
8246
8294
  elements: i
8247
- } = H, L = await (M.isRTL == null ? void 0 : M.isRTL(i.floating)), A = e1(C), e = s1(C), d = P1(C) === "y", m = ["left", "top"].includes(A) ? -1 : 1, n = L && d ? -1 : 1, a = n1(V, H);
8295
+ } = H, L = await (M.isRTL == null ? void 0 : M.isRTL(i.floating)), A = a1(C), d = g1(C), e = E1(C) === "y", o = ["left", "top"].includes(A) ? -1 : 1, a = L && e ? -1 : 1, Z = S1(V, H);
8248
8296
  let {
8249
- mainAxis: o,
8250
- crossAxis: l,
8251
- alignmentAxis: S
8252
- } = typeof a == "number" ? {
8253
- mainAxis: a,
8297
+ mainAxis: r,
8298
+ crossAxis: t,
8299
+ alignmentAxis: u
8300
+ } = typeof Z == "number" ? {
8301
+ mainAxis: Z,
8254
8302
  crossAxis: 0,
8255
8303
  alignmentAxis: null
8256
8304
  } : {
8257
8305
  mainAxis: 0,
8258
8306
  crossAxis: 0,
8259
8307
  alignmentAxis: null,
8260
- ...a
8308
+ ...Z
8261
8309
  };
8262
- return e && typeof S == "number" && (l = e === "end" ? S * -1 : S), d ? {
8263
- x: l * n,
8264
- y: o * m
8310
+ return d && typeof u == "number" && (t = d === "end" ? u * -1 : u), e ? {
8311
+ x: t * a,
8312
+ y: r * o
8265
8313
  } : {
8266
- x: o * m,
8267
- y: l * n
8314
+ x: r * o,
8315
+ y: t * a
8268
8316
  };
8269
8317
  }
8270
- const f5 = function(H) {
8318
+ const y5 = function(H) {
8271
8319
  return H === void 0 && (H = 0), {
8272
8320
  name: "offset",
8273
8321
  options: H,
@@ -8275,7 +8323,7 @@ const f5 = function(H) {
8275
8323
  const {
8276
8324
  x: C,
8277
8325
  y: M
8278
- } = V, i = await O5(V, H);
8326
+ } = V, i = await B5(V, H);
8279
8327
  return {
8280
8328
  x: C + i.x,
8281
8329
  y: M + i.y,
@@ -8283,7 +8331,7 @@ const f5 = function(H) {
8283
8331
  };
8284
8332
  }
8285
8333
  };
8286
- }, h5 = function(H) {
8334
+ }, w5 = function(H) {
8287
8335
  return H === void 0 && (H = {}), {
8288
8336
  name: "shift",
8289
8337
  options: H,
@@ -8295,106 +8343,106 @@ const f5 = function(H) {
8295
8343
  } = V, {
8296
8344
  mainAxis: L = !0,
8297
8345
  crossAxis: A = !1,
8298
- limiter: e = {
8299
- fn: (y) => {
8346
+ limiter: d = {
8347
+ fn: (P) => {
8300
8348
  let {
8301
- x: k,
8302
- y: w
8303
- } = y;
8349
+ x: v,
8350
+ y
8351
+ } = P;
8304
8352
  return {
8305
- x: k,
8306
- y: w
8353
+ x: v,
8354
+ y
8307
8355
  };
8308
8356
  }
8309
8357
  },
8310
- ...d
8311
- } = n1(H, V), m = {
8358
+ ...e
8359
+ } = S1(H, V), o = {
8312
8360
  x: C,
8313
8361
  y: M
8314
- }, n = await v1(V, d), a = P1(e1(i)), o = t2(a);
8315
- let l = m[o], S = m[a];
8362
+ }, a = await D1(V, e), Z = E1(a1(i)), r = Z2(Z);
8363
+ let t = o[r], u = o[Z];
8316
8364
  if (L) {
8317
- const y = o === "y" ? "top" : "left", k = o === "y" ? "bottom" : "right", w = l + n[y], T = l - n[k];
8318
- l = _1(w, l, T);
8365
+ const P = r === "y" ? "top" : "left", v = r === "y" ? "bottom" : "right", y = t + a[P], T = t - a[v];
8366
+ t = G1(y, t, T);
8319
8367
  }
8320
8368
  if (A) {
8321
- const y = a === "y" ? "top" : "left", k = a === "y" ? "bottom" : "right", w = S + n[y], T = S - n[k];
8322
- S = _1(w, S, T);
8369
+ const P = Z === "y" ? "top" : "left", v = Z === "y" ? "bottom" : "right", y = u + a[P], T = u - a[v];
8370
+ u = G1(y, u, T);
8323
8371
  }
8324
- const B = e.fn({
8372
+ const k = d.fn({
8325
8373
  ...V,
8326
- [o]: l,
8327
- [a]: S
8374
+ [r]: t,
8375
+ [Z]: u
8328
8376
  });
8329
8377
  return {
8330
- ...B,
8378
+ ...k,
8331
8379
  data: {
8332
- x: B.x - C,
8333
- y: B.y - M
8380
+ x: k.x - C,
8381
+ y: k.y - M
8334
8382
  }
8335
8383
  };
8336
8384
  }
8337
8385
  };
8338
8386
  };
8339
- function L1(H) {
8340
- return l2(H) ? (H.nodeName || "").toLowerCase() : "#document";
8387
+ function e1(H) {
8388
+ return S2(H) ? (H.nodeName || "").toLowerCase() : "#document";
8341
8389
  }
8342
8390
  function z(H) {
8343
8391
  var V;
8344
8392
  return (H == null || (V = H.ownerDocument) == null ? void 0 : V.defaultView) || window;
8345
8393
  }
8346
- function M1(H) {
8394
+ function t1(H) {
8347
8395
  var V;
8348
- return (V = (l2(H) ? H.ownerDocument : H.document) || window.document) == null ? void 0 : V.documentElement;
8396
+ return (V = (S2(H) ? H.ownerDocument : H.document) || window.document) == null ? void 0 : V.documentElement;
8349
8397
  }
8350
- function l2(H) {
8398
+ function S2(H) {
8351
8399
  return H instanceof Node || H instanceof z(H).Node;
8352
8400
  }
8353
- function C1(H) {
8401
+ function M1(H) {
8354
8402
  return H instanceof Element || H instanceof z(H).Element;
8355
8403
  }
8356
- function j(H) {
8404
+ function C1(H) {
8357
8405
  return H instanceof HTMLElement || H instanceof z(H).HTMLElement;
8358
8406
  }
8359
- function H2(H) {
8407
+ function e2(H) {
8360
8408
  return typeof ShadowRoot > "u" ? !1 : H instanceof ShadowRoot || H instanceof z(H).ShadowRoot;
8361
8409
  }
8362
- function c1(H) {
8410
+ function k1(H) {
8363
8411
  const {
8364
8412
  overflow: V,
8365
8413
  overflowX: C,
8366
8414
  overflowY: M,
8367
8415
  display: i
8368
- } = K(H);
8416
+ } = X(H);
8369
8417
  return /auto|scroll|overlay|hidden|clip/.test(V + M + C) && !["inline", "contents"].includes(i);
8370
8418
  }
8371
- function g5(H) {
8372
- return ["table", "td", "th"].includes(L1(H));
8419
+ function P5(H) {
8420
+ return ["table", "td", "th"].includes(e1(H));
8373
8421
  }
8374
- function U1(H) {
8375
- const V = z1(), C = K(H);
8422
+ function C2(H) {
8423
+ const V = H2(), C = X(H);
8376
8424
  return C.transform !== "none" || C.perspective !== "none" || (C.containerType ? C.containerType !== "normal" : !1) || !V && (C.backdropFilter ? C.backdropFilter !== "none" : !1) || !V && (C.filter ? C.filter !== "none" : !1) || ["transform", "perspective", "filter"].some((M) => (C.willChange || "").includes(M)) || ["paint", "layout", "strict", "content"].some((M) => (C.contain || "").includes(M));
8377
8425
  }
8378
- function k5(H) {
8379
- let V = o1(H);
8380
- for (; j(V) && !T1(V); ) {
8381
- if (U1(V))
8426
+ function T5(H) {
8427
+ let V = u1(H);
8428
+ for (; C1(V) && !_1(V); ) {
8429
+ if (C2(V))
8382
8430
  return V;
8383
- V = o1(V);
8431
+ V = u1(V);
8384
8432
  }
8385
8433
  return null;
8386
8434
  }
8387
- function z1() {
8435
+ function H2() {
8388
8436
  return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
8389
8437
  }
8390
- function T1(H) {
8391
- return ["html", "body", "#document"].includes(L1(H));
8438
+ function _1(H) {
8439
+ return ["html", "body", "#document"].includes(e1(H));
8392
8440
  }
8393
- function K(H) {
8441
+ function X(H) {
8394
8442
  return z(H).getComputedStyle(H);
8395
8443
  }
8396
- function F1(H) {
8397
- return C1(H) ? {
8444
+ function W1(H) {
8445
+ return M1(H) ? {
8398
8446
  scrollLeft: H.scrollLeft,
8399
8447
  scrollTop: H.scrollTop
8400
8448
  } : {
@@ -8402,252 +8450,252 @@ function F1(H) {
8402
8450
  scrollTop: H.pageYOffset
8403
8451
  };
8404
8452
  }
8405
- function o1(H) {
8406
- if (L1(H) === "html")
8453
+ function u1(H) {
8454
+ if (e1(H) === "html")
8407
8455
  return H;
8408
8456
  const V = (
8409
8457
  // Step into the shadow DOM of the parent of a slotted node.
8410
8458
  H.assignedSlot || // DOM Element detected.
8411
8459
  H.parentNode || // ShadowRoot detected.
8412
- H2(H) && H.host || // Fallback.
8413
- M1(H)
8460
+ e2(H) && H.host || // Fallback.
8461
+ t1(H)
8414
8462
  );
8415
- return H2(V) ? V.host : V;
8463
+ return e2(V) ? V.host : V;
8416
8464
  }
8417
- function o2(H) {
8418
- const V = o1(H);
8419
- return T1(V) ? H.ownerDocument ? H.ownerDocument.body : H.body : j(V) && c1(V) ? V : o2(V);
8465
+ function s2(H) {
8466
+ const V = u1(H);
8467
+ return _1(V) ? H.ownerDocument ? H.ownerDocument.body : H.body : C1(V) && k1(V) ? V : s2(V);
8420
8468
  }
8421
- function W1(H, V, C) {
8469
+ function z1(H, V, C) {
8422
8470
  var M;
8423
8471
  V === void 0 && (V = []), C === void 0 && (C = !0);
8424
- const i = o2(H), L = i === ((M = H.ownerDocument) == null ? void 0 : M.body), A = z(i);
8425
- return L ? V.concat(A, A.visualViewport || [], c1(i) ? i : [], A.frameElement && C ? W1(A.frameElement) : []) : V.concat(i, W1(i, [], C));
8472
+ const i = s2(H), L = i === ((M = H.ownerDocument) == null ? void 0 : M.body), A = z(i);
8473
+ return L ? V.concat(A, A.visualViewport || [], k1(i) ? i : [], A.frameElement && C ? z1(A.frameElement) : []) : V.concat(i, z1(i, [], C));
8426
8474
  }
8427
- function n2(H) {
8428
- const V = K(H);
8475
+ function c2(H) {
8476
+ const V = X(H);
8429
8477
  let C = parseFloat(V.width) || 0, M = parseFloat(V.height) || 0;
8430
- const i = j(H), L = i ? H.offsetWidth : C, A = i ? H.offsetHeight : M, e = B1(C) !== L || B1(M) !== A;
8431
- return e && (C = L, M = A), {
8478
+ const i = C1(H), L = i ? H.offsetWidth : C, A = i ? H.offsetHeight : M, d = F1(C) !== L || F1(M) !== A;
8479
+ return d && (C = L, M = A), {
8432
8480
  width: C,
8433
8481
  height: M,
8434
- $: e
8482
+ $: d
8435
8483
  };
8436
8484
  }
8437
- function r2(H) {
8438
- return C1(H) ? H : H.contextElement;
8485
+ function p2(H) {
8486
+ return M1(H) ? H : H.contextElement;
8439
8487
  }
8440
- function l1(H) {
8441
- const V = r2(H);
8442
- if (!j(V))
8443
- return V1(1);
8488
+ function Z1(H) {
8489
+ const V = p2(H);
8490
+ if (!C1(V))
8491
+ return A1(1);
8444
8492
  const C = V.getBoundingClientRect(), {
8445
8493
  width: M,
8446
8494
  height: i,
8447
8495
  $: L
8448
- } = n2(V);
8449
- let A = (L ? B1(C.width) : C.width) / M, e = (L ? B1(C.height) : C.height) / i;
8450
- return (!A || !Number.isFinite(A)) && (A = 1), (!e || !Number.isFinite(e)) && (e = 1), {
8496
+ } = c2(V);
8497
+ let A = (L ? F1(C.width) : C.width) / M, d = (L ? F1(C.height) : C.height) / i;
8498
+ return (!A || !Number.isFinite(A)) && (A = 1), (!d || !Number.isFinite(d)) && (d = 1), {
8451
8499
  x: A,
8452
- y: e
8500
+ y: d
8453
8501
  };
8454
8502
  }
8455
- const B5 = /* @__PURE__ */ V1(0);
8456
- function a2(H) {
8503
+ const F5 = /* @__PURE__ */ A1(0);
8504
+ function O2(H) {
8457
8505
  const V = z(H);
8458
- return !z1() || !V.visualViewport ? B5 : {
8506
+ return !H2() || !V.visualViewport ? F5 : {
8459
8507
  x: V.visualViewport.offsetLeft,
8460
8508
  y: V.visualViewport.offsetTop
8461
8509
  };
8462
8510
  }
8463
- function b5(H, V, C) {
8511
+ function R5(H, V, C) {
8464
8512
  return V === void 0 && (V = !1), !C || V && C !== z(H) ? !1 : V;
8465
8513
  }
8466
- function u1(H, V, C, M) {
8514
+ function h1(H, V, C, M) {
8467
8515
  V === void 0 && (V = !1), C === void 0 && (C = !1);
8468
- const i = H.getBoundingClientRect(), L = r2(H);
8469
- let A = V1(1);
8470
- V && (M ? C1(M) && (A = l1(M)) : A = l1(H));
8471
- const e = b5(L, C, M) ? a2(L) : V1(0);
8472
- let d = (i.left + e.x) / A.x, m = (i.top + e.y) / A.y, n = i.width / A.x, a = i.height / A.y;
8516
+ const i = H.getBoundingClientRect(), L = p2(H);
8517
+ let A = A1(1);
8518
+ V && (M ? M1(M) && (A = Z1(M)) : A = Z1(H));
8519
+ const d = R5(L, C, M) ? O2(L) : A1(0);
8520
+ let e = (i.left + d.x) / A.x, o = (i.top + d.y) / A.y, a = i.width / A.x, Z = i.height / A.y;
8473
8521
  if (L) {
8474
- const o = z(L), l = M && C1(M) ? z(M) : M;
8475
- let S = o.frameElement;
8476
- for (; S && M && l !== o; ) {
8477
- const B = l1(S), y = S.getBoundingClientRect(), k = K(S), w = y.left + (S.clientLeft + parseFloat(k.paddingLeft)) * B.x, T = y.top + (S.clientTop + parseFloat(k.paddingTop)) * B.y;
8478
- d *= B.x, m *= B.y, n *= B.x, a *= B.y, d += w, m += T, S = z(S).frameElement;
8522
+ const r = z(L), t = M && M1(M) ? z(M) : M;
8523
+ let u = r.frameElement;
8524
+ for (; u && M && t !== r; ) {
8525
+ const k = Z1(u), P = u.getBoundingClientRect(), v = X(u), y = P.left + (u.clientLeft + parseFloat(v.paddingLeft)) * k.x, T = P.top + (u.clientTop + parseFloat(v.paddingTop)) * k.y;
8526
+ e *= k.x, o *= k.y, a *= k.x, Z *= k.y, e += y, o += T, u = z(u).frameElement;
8479
8527
  }
8480
8528
  }
8481
- return w1({
8482
- width: n,
8483
- height: a,
8484
- x: d,
8485
- y: m
8529
+ return x1({
8530
+ width: a,
8531
+ height: Z,
8532
+ x: e,
8533
+ y: o
8486
8534
  });
8487
8535
  }
8488
- function w5(H) {
8536
+ function x5(H) {
8489
8537
  let {
8490
8538
  rect: V,
8491
8539
  offsetParent: C,
8492
8540
  strategy: M
8493
8541
  } = H;
8494
- const i = j(C), L = M1(C);
8542
+ const i = C1(C), L = t1(C);
8495
8543
  if (C === L)
8496
8544
  return V;
8497
8545
  let A = {
8498
8546
  scrollLeft: 0,
8499
8547
  scrollTop: 0
8500
- }, e = V1(1);
8501
- const d = V1(0);
8502
- if ((i || !i && M !== "fixed") && ((L1(C) !== "body" || c1(L)) && (A = F1(C)), j(C))) {
8503
- const m = u1(C);
8504
- e = l1(C), d.x = m.x + C.clientLeft, d.y = m.y + C.clientTop;
8548
+ }, d = A1(1);
8549
+ const e = A1(0);
8550
+ if ((i || !i && M !== "fixed") && ((e1(C) !== "body" || k1(L)) && (A = W1(C)), C1(C))) {
8551
+ const o = h1(C);
8552
+ d = Z1(C), e.x = o.x + C.clientLeft, e.y = o.y + C.clientTop;
8505
8553
  }
8506
8554
  return {
8507
- width: V.width * e.x,
8508
- height: V.height * e.y,
8509
- x: V.x * e.x - A.scrollLeft * e.x + d.x,
8510
- y: V.y * e.y - A.scrollTop * e.y + d.y
8555
+ width: V.width * d.x,
8556
+ height: V.height * d.y,
8557
+ x: V.x * d.x - A.scrollLeft * d.x + e.x,
8558
+ y: V.y * d.y - A.scrollTop * d.y + e.y
8511
8559
  };
8512
8560
  }
8513
- function v5(H) {
8561
+ function D5(H) {
8514
8562
  return Array.from(H.getClientRects());
8515
8563
  }
8516
- function Z2(H) {
8517
- return u1(M1(H)).left + F1(H).scrollLeft;
8564
+ function f2(H) {
8565
+ return h1(t1(H)).left + W1(H).scrollLeft;
8518
8566
  }
8519
- function y5(H) {
8520
- const V = M1(H), C = F1(H), M = H.ownerDocument.body, i = m1(V.scrollWidth, V.clientWidth, M.scrollWidth, M.clientWidth), L = m1(V.scrollHeight, V.clientHeight, M.scrollHeight, M.clientHeight);
8521
- let A = -C.scrollLeft + Z2(H);
8522
- const e = -C.scrollTop;
8523
- return K(M).direction === "rtl" && (A += m1(V.clientWidth, M.clientWidth) - i), {
8567
+ function E5(H) {
8568
+ const V = t1(H), C = W1(H), M = H.ownerDocument.body, i = n1(V.scrollWidth, V.clientWidth, M.scrollWidth, M.clientWidth), L = n1(V.scrollHeight, V.clientHeight, M.scrollHeight, M.clientHeight);
8569
+ let A = -C.scrollLeft + f2(H);
8570
+ const d = -C.scrollTop;
8571
+ return X(M).direction === "rtl" && (A += n1(V.clientWidth, M.clientWidth) - i), {
8524
8572
  width: i,
8525
8573
  height: L,
8526
8574
  x: A,
8527
- y: e
8575
+ y: d
8528
8576
  };
8529
8577
  }
8530
- function P5(H, V) {
8531
- const C = z(H), M = M1(H), i = C.visualViewport;
8532
- let L = M.clientWidth, A = M.clientHeight, e = 0, d = 0;
8578
+ function _5(H, V) {
8579
+ const C = z(H), M = t1(H), i = C.visualViewport;
8580
+ let L = M.clientWidth, A = M.clientHeight, d = 0, e = 0;
8533
8581
  if (i) {
8534
8582
  L = i.width, A = i.height;
8535
- const m = z1();
8536
- (!m || m && V === "fixed") && (e = i.offsetLeft, d = i.offsetTop);
8583
+ const o = H2();
8584
+ (!o || o && V === "fixed") && (d = i.offsetLeft, e = i.offsetTop);
8537
8585
  }
8538
8586
  return {
8539
8587
  width: L,
8540
8588
  height: A,
8541
- x: e,
8542
- y: d
8589
+ x: d,
8590
+ y: e
8543
8591
  };
8544
8592
  }
8545
- function T5(H, V) {
8546
- const C = u1(H, !0, V === "fixed"), M = C.top + H.clientTop, i = C.left + H.clientLeft, L = j(H) ? l1(H) : V1(1), A = H.clientWidth * L.x, e = H.clientHeight * L.y, d = i * L.x, m = M * L.y;
8593
+ function W5(H, V) {
8594
+ const C = h1(H, !0, V === "fixed"), M = C.top + H.clientTop, i = C.left + H.clientLeft, L = C1(H) ? Z1(H) : A1(1), A = H.clientWidth * L.x, d = H.clientHeight * L.y, e = i * L.x, o = M * L.y;
8547
8595
  return {
8548
8596
  width: A,
8549
- height: e,
8550
- x: d,
8551
- y: m
8597
+ height: d,
8598
+ x: e,
8599
+ y: o
8552
8600
  };
8553
8601
  }
8554
- function V2(H, V, C) {
8602
+ function d2(H, V, C) {
8555
8603
  let M;
8556
8604
  if (V === "viewport")
8557
- M = P5(H, C);
8605
+ M = _5(H, C);
8558
8606
  else if (V === "document")
8559
- M = y5(M1(H));
8560
- else if (C1(V))
8561
- M = T5(V, C);
8607
+ M = E5(t1(H));
8608
+ else if (M1(V))
8609
+ M = W5(V, C);
8562
8610
  else {
8563
- const i = a2(H);
8611
+ const i = O2(H);
8564
8612
  M = {
8565
8613
  ...V,
8566
8614
  x: V.x - i.x,
8567
8615
  y: V.y - i.y
8568
8616
  };
8569
8617
  }
8570
- return w1(M);
8618
+ return x1(M);
8571
8619
  }
8572
- function u2(H, V) {
8573
- const C = o1(H);
8574
- return C === V || !C1(C) || T1(C) ? !1 : K(C).position === "fixed" || u2(C, V);
8620
+ function h2(H, V) {
8621
+ const C = u1(H);
8622
+ return C === V || !M1(C) || _1(C) ? !1 : X(C).position === "fixed" || h2(C, V);
8575
8623
  }
8576
- function F5(H, V) {
8624
+ function N5(H, V) {
8577
8625
  const C = V.get(H);
8578
8626
  if (C)
8579
8627
  return C;
8580
- let M = W1(H, [], !1).filter((e) => C1(e) && L1(e) !== "body"), i = null;
8581
- const L = K(H).position === "fixed";
8582
- let A = L ? o1(H) : H;
8583
- for (; C1(A) && !T1(A); ) {
8584
- const e = K(A), d = U1(A);
8585
- !d && e.position === "fixed" && (i = null), (L ? !d && !i : !d && e.position === "static" && !!i && ["absolute", "fixed"].includes(i.position) || c1(A) && !d && u2(H, A)) ? M = M.filter((n) => n !== A) : i = e, A = o1(A);
8628
+ let M = z1(H, [], !1).filter((d) => M1(d) && e1(d) !== "body"), i = null;
8629
+ const L = X(H).position === "fixed";
8630
+ let A = L ? u1(H) : H;
8631
+ for (; M1(A) && !_1(A); ) {
8632
+ const d = X(A), e = C2(A);
8633
+ !e && d.position === "fixed" && (i = null), (L ? !e && !i : !e && d.position === "static" && !!i && ["absolute", "fixed"].includes(i.position) || k1(A) && !e && h2(H, A)) ? M = M.filter((a) => a !== A) : i = d, A = u1(A);
8586
8634
  }
8587
8635
  return V.set(H, M), M;
8588
8636
  }
8589
- function R5(H) {
8637
+ function I5(H) {
8590
8638
  let {
8591
8639
  element: V,
8592
8640
  boundary: C,
8593
8641
  rootBoundary: M,
8594
8642
  strategy: i
8595
8643
  } = H;
8596
- const A = [...C === "clippingAncestors" ? F5(V, this._c) : [].concat(C), M], e = A[0], d = A.reduce((m, n) => {
8597
- const a = V2(V, n, i);
8598
- return m.top = m1(a.top, m.top), m.right = Z1(a.right, m.right), m.bottom = Z1(a.bottom, m.bottom), m.left = m1(a.left, m.left), m;
8599
- }, V2(V, e, i));
8644
+ const A = [...C === "clippingAncestors" ? N5(V, this._c) : [].concat(C), M], d = A[0], e = A.reduce((o, a) => {
8645
+ const Z = d2(V, a, i);
8646
+ return o.top = n1(Z.top, o.top), o.right = f1(Z.right, o.right), o.bottom = f1(Z.bottom, o.bottom), o.left = n1(Z.left, o.left), o;
8647
+ }, d2(V, d, i));
8600
8648
  return {
8601
- width: d.right - d.left,
8602
- height: d.bottom - d.top,
8603
- x: d.left,
8604
- y: d.top
8649
+ width: e.right - e.left,
8650
+ height: e.bottom - e.top,
8651
+ x: e.left,
8652
+ y: e.top
8605
8653
  };
8606
8654
  }
8607
- function x5(H) {
8608
- return n2(H);
8655
+ function $5(H) {
8656
+ return c2(H);
8609
8657
  }
8610
- function D5(H, V, C) {
8611
- const M = j(V), i = M1(V), L = C === "fixed", A = u1(H, !0, L, V);
8612
- let e = {
8658
+ function Q5(H, V, C) {
8659
+ const M = C1(V), i = t1(V), L = C === "fixed", A = h1(H, !0, L, V);
8660
+ let d = {
8613
8661
  scrollLeft: 0,
8614
8662
  scrollTop: 0
8615
8663
  };
8616
- const d = V1(0);
8664
+ const e = A1(0);
8617
8665
  if (M || !M && !L)
8618
- if ((L1(V) !== "body" || c1(i)) && (e = F1(V)), M) {
8619
- const m = u1(V, !0, L, V);
8620
- d.x = m.x + V.clientLeft, d.y = m.y + V.clientTop;
8666
+ if ((e1(V) !== "body" || k1(i)) && (d = W1(V)), M) {
8667
+ const o = h1(V, !0, L, V);
8668
+ e.x = o.x + V.clientLeft, e.y = o.y + V.clientTop;
8621
8669
  } else
8622
- i && (d.x = Z2(i));
8670
+ i && (e.x = f2(i));
8623
8671
  return {
8624
- x: A.left + e.scrollLeft - d.x,
8625
- y: A.top + e.scrollTop - d.y,
8672
+ x: A.left + d.scrollLeft - e.x,
8673
+ y: A.top + d.scrollTop - e.y,
8626
8674
  width: A.width,
8627
8675
  height: A.height
8628
8676
  };
8629
8677
  }
8630
- function L2(H, V) {
8631
- return !j(H) || K(H).position === "fixed" ? null : V ? V(H) : H.offsetParent;
8678
+ function t2(H, V) {
8679
+ return !C1(H) || X(H).position === "fixed" ? null : V ? V(H) : H.offsetParent;
8632
8680
  }
8633
- function S2(H, V) {
8681
+ function g2(H, V) {
8634
8682
  const C = z(H);
8635
- if (!j(H))
8683
+ if (!C1(H))
8636
8684
  return C;
8637
- let M = L2(H, V);
8638
- for (; M && g5(M) && K(M).position === "static"; )
8639
- M = L2(M, V);
8640
- return M && (L1(M) === "html" || L1(M) === "body" && K(M).position === "static" && !U1(M)) ? C : M || k5(H) || C;
8685
+ let M = t2(H, V);
8686
+ for (; M && P5(M) && X(M).position === "static"; )
8687
+ M = t2(M, V);
8688
+ return M && (e1(M) === "html" || e1(M) === "body" && X(M).position === "static" && !C2(M)) ? C : M || T5(H) || C;
8641
8689
  }
8642
- const _5 = async function(H) {
8690
+ const G5 = async function(H) {
8643
8691
  let {
8644
8692
  reference: V,
8645
8693
  floating: C,
8646
8694
  strategy: M
8647
8695
  } = H;
8648
- const i = this.getOffsetParent || S2, L = this.getDimensions;
8696
+ const i = this.getOffsetParent || g2, L = this.getDimensions;
8649
8697
  return {
8650
- reference: D5(V, await i(C), M),
8698
+ reference: Q5(V, await i(C), M),
8651
8699
  floating: {
8652
8700
  x: 0,
8653
8701
  y: 0,
@@ -8655,82 +8703,82 @@ const _5 = async function(H) {
8655
8703
  }
8656
8704
  };
8657
8705
  };
8658
- function E5(H) {
8659
- return K(H).direction === "rtl";
8706
+ function U5(H) {
8707
+ return X(H).direction === "rtl";
8660
8708
  }
8661
- const W5 = {
8662
- convertOffsetParentRelativeRectToViewportRelativeRect: w5,
8663
- getDocumentElement: M1,
8664
- getClippingRect: R5,
8665
- getOffsetParent: S2,
8666
- getElementRects: _5,
8667
- getClientRects: v5,
8668
- getDimensions: x5,
8669
- getScale: l1,
8670
- isElement: C1,
8671
- isRTL: E5
8672
- }, N5 = (H, V, C) => {
8709
+ const z5 = {
8710
+ convertOffsetParentRelativeRectToViewportRelativeRect: x5,
8711
+ getDocumentElement: t1,
8712
+ getClippingRect: I5,
8713
+ getOffsetParent: g2,
8714
+ getElementRects: G5,
8715
+ getClientRects: D5,
8716
+ getDimensions: $5,
8717
+ getScale: Z1,
8718
+ isElement: M1,
8719
+ isRTL: U5
8720
+ }, K5 = (H, V, C) => {
8673
8721
  const M = /* @__PURE__ */ new Map(), i = {
8674
- platform: W5,
8722
+ platform: z5,
8675
8723
  ...C
8676
8724
  }, L = {
8677
8725
  ...i.platform,
8678
8726
  _c: M
8679
8727
  };
8680
- return S5(H, V, {
8728
+ return g5(H, V, {
8681
8729
  ...i,
8682
8730
  platform: L
8683
8731
  });
8684
8732
  };
8685
- var s2 = /* @__PURE__ */ ((H) => (H.Top = "top", H.Bottom = "bottom", H.Left = "left", H.Right = "right", H.TopStart = "top-start", H.TopEnd = "top-end", H.RightStart = "right-start", H.RightEnd = "right-end", H.BottomStart = "bottom-start", H.BottomEnd = "bottom-end", H.LeftStart = "left-start", H.LeftEnd = "left-end", H))(s2 || {}), Y = /* @__PURE__ */ ((H) => (H.Click = "click", H.Hover = "hover", H.Manual = "manual", H))(Y || {}), N1 = /* @__PURE__ */ ((H) => (H.Tooltip = "tooltip", H.Popover = "popover", H.Dropdown = "dropdown", H))(N1 || {});
8686
- async function I5({ value: H }, { value: V }, { value: C }, M, i, L, A = 300, e) {
8687
- !H || !V || N5(H, V, {
8733
+ var k2 = /* @__PURE__ */ ((H) => (H.Top = "top", H.Bottom = "bottom", H.Left = "left", H.Right = "right", H.TopStart = "top-start", H.TopEnd = "top-end", H.RightStart = "right-start", H.RightEnd = "right-end", H.BottomStart = "bottom-start", H.BottomEnd = "bottom-end", H.LeftStart = "left-start", H.LeftEnd = "left-end", H))(k2 || {}), V1 = /* @__PURE__ */ ((H) => (H.Click = "click", H.Hover = "hover", H.Manual = "manual", H))(V1 || {}), K1 = /* @__PURE__ */ ((H) => (H.Tooltip = "tooltip", H.Popover = "popover", H.Dropdown = "dropdown", H))(K1 || {});
8734
+ async function q5({ value: H }, { value: V }, { value: C }, M, i, L, A = 300, d) {
8735
+ !H || !V || K5(H, V, {
8688
8736
  placement: M,
8689
8737
  middleware: [
8690
- f5(i),
8691
- h5({ padding: L }),
8692
- s5({ element: C }),
8693
- c5(),
8694
- p5()
8738
+ y5(i),
8739
+ w5({ padding: L }),
8740
+ k5({ element: C }),
8741
+ b5(),
8742
+ v5()
8695
8743
  ]
8696
- }).then(({ x: d, y: m, placement: n, middlewareData: a }) => {
8697
- var S, B;
8744
+ }).then(({ x: e, y: o, placement: a, middlewareData: Z }) => {
8745
+ var u, k;
8698
8746
  if (!V)
8699
8747
  return;
8700
- a.flip && V.setAttribute("data-placement", n);
8701
- const o = (S = H.offsetParent) == null ? void 0 : S.getBoundingClientRect().left, l = (B = H.offsetParent) == null ? void 0 : B.getBoundingClientRect().width;
8748
+ Z.flip && V.setAttribute("data-placement", a);
8749
+ const r = (u = H.offsetParent) == null ? void 0 : u.getBoundingClientRect().left, t = (k = H.offsetParent) == null ? void 0 : k.getBoundingClientRect().width;
8702
8750
  if (Object.assign(V.style, {
8703
- maxWidth: e === "dropdown" ? `${l}px` : "auto",
8704
- left: e === "dropdown" ? `${o}px` : `${d}px`,
8705
- top: `${m}px`,
8751
+ maxWidth: d === "dropdown" ? `${t}px` : "auto",
8752
+ left: d === "dropdown" ? `${r}px` : `${e}px`,
8753
+ top: `${o}px`,
8706
8754
  animation: `r-tooltip-show ${A}ms ease-in-out forwards`,
8707
8755
  transformOrigin: "start"
8708
- }), C && a.arrow) {
8709
- const { x: y, y: k } = a.arrow, w = {
8756
+ }), C && Z.arrow) {
8757
+ const { x: P, y: v } = Z.arrow, y = {
8710
8758
  top: "bottom",
8711
8759
  right: "left",
8712
8760
  bottom: "top",
8713
8761
  left: "right"
8714
8762
  /* Right */
8715
- }[n.split("-")[0]];
8763
+ }[a.split("-")[0]];
8716
8764
  Object.assign(C.style, {
8717
- left: d != null ? `${y}px` : "",
8718
- top: m != null ? `${k}px` : "",
8765
+ left: e != null ? `${P}px` : "",
8766
+ top: o != null ? `${v}px` : "",
8719
8767
  right: "",
8720
8768
  bottom: "",
8721
- [`${w}`]: "-4px"
8769
+ [`${y}`]: "-4px"
8722
8770
  });
8723
8771
  }
8724
8772
  });
8725
8773
  }
8726
- const Q5 = ["aria-disabled"], G5 = ["innerHTML"], $5 = ["id"], U5 = /* @__PURE__ */ R({
8774
+ const j5 = ["aria-disabled"], X5 = ["innerHTML"], Y5 = ["id"], J5 = /* @__PURE__ */ E({
8727
8775
  __name: "RTooltip",
8728
8776
  props: {
8729
- placement: { default: s2.Top },
8777
+ placement: { default: k2.Top },
8730
8778
  text: { default: "" },
8731
8779
  dark: { type: Boolean, default: !0 },
8732
8780
  light: { type: Boolean, default: !1 },
8733
- triggers: { default: () => [Y.Hover] },
8781
+ triggers: { default: () => [V1.Hover] },
8734
8782
  autoHide: { type: Boolean, default: !0 },
8735
8783
  hideDelay: { default: 3e3 },
8736
8784
  showDelay: { default: 300 },
@@ -8743,143 +8791,143 @@ const Q5 = ["aria-disabled"], G5 = ["innerHTML"], $5 = ["id"], U5 = /* @__PURE__
8743
8791
  resizable: { type: Boolean, default: !0 },
8744
8792
  triggerClass: { default: "" },
8745
8793
  tooltipClass: { default: "" },
8746
- type: { default: N1.Tooltip }
8794
+ type: { default: K1.Tooltip }
8747
8795
  },
8748
8796
  emits: ["show", "hide"],
8749
8797
  setup(H, { emit: V }) {
8750
- const C = H, M = V, i = E(), L = E(), A = E(), e = t5();
8751
- async function d() {
8798
+ const C = H, M = V, i = R(), L = R(), A = R(), d = Z5();
8799
+ async function e() {
8752
8800
  if (C.disabled || !L.value)
8753
8801
  return;
8754
- const k = document.querySelectorAll(".r-tooltip--active");
8755
- k.length > 0 && k.forEach((w) => {
8756
- w.style.display = "", w.classList.remove("r-tooltip--active"), w.dataset.show = "false", M("hide", w.id);
8757
- }), L.value.classList.contains("r-tooltip--active") ? m() : (B(), L.value.style.display = "block", L.value.classList.add("r-tooltip--active"), L.value.dataset.show = "true", M("show", L.value.id), n());
8802
+ const v = document.querySelectorAll(".r-tooltip--active");
8803
+ v.length > 0 && v.forEach((y) => {
8804
+ y.style.display = "", y.classList.remove("r-tooltip--active"), y.dataset.show = "false", M("hide", y.id);
8805
+ }), L.value.classList.contains("r-tooltip--active") ? o() : (k(), L.value.style.display = "block", L.value.classList.add("r-tooltip--active"), L.value.dataset.show = "true", M("show", L.value.id), a());
8758
8806
  }
8759
- function m(k = null) {
8807
+ function o(v = null) {
8760
8808
  C.disabled || !L.value || (L.value.style.display = "", L.value.classList.remove("r-tooltip--active"), L.value.dataset.show = "false", M("hide", L.value.id));
8761
8809
  }
8762
- function n() {
8810
+ function a() {
8763
8811
  C.autoHide && setTimeout(() => {
8764
- m();
8812
+ o();
8765
8813
  }, C.hideDelay);
8766
8814
  }
8767
- function a(k) {
8768
- C.disabled || C.triggers.includes(Y.Click) && (L.value.style.display === "block" ? m() : d());
8815
+ function Z(v) {
8816
+ C.disabled || C.triggers.includes(V1.Click) && (L.value.style.display === "block" ? o() : e());
8769
8817
  }
8770
- function o() {
8771
- C.disabled || C.triggers.includes(Y.Hover) && d();
8818
+ function r() {
8819
+ C.disabled || C.triggers.includes(V1.Hover) && e();
8772
8820
  }
8773
- function l() {
8774
- C.disabled || (L.value.style.display === "" && C.triggers.includes(Y.Hover) ? d() : L.value.style.display !== "" && C.triggers.includes(Y.Hover) && m());
8821
+ function t() {
8822
+ C.disabled || (L.value.style.display === "" && C.triggers.includes(V1.Hover) ? e() : L.value.style.display !== "" && C.triggers.includes(V1.Hover) && o());
8775
8823
  }
8776
- function S() {
8777
- C.triggers.includes(Y.Hover) && B();
8824
+ function u() {
8825
+ C.triggers.includes(V1.Hover) && k();
8778
8826
  }
8779
- function B(k) {
8780
- const { placement: w, offset: T, padding: F, disabled: P, showDelay: U, type: W } = C;
8781
- P || I5(i, L, A, w, T, F, U, W);
8827
+ function k(v) {
8828
+ const { placement: y, offset: T, padding: s, disabled: B, showDelay: I, type: F } = C;
8829
+ B || q5(i, L, A, y, T, s, I, F);
8782
8830
  }
8783
- const y = f(() => ({
8831
+ const P = O(() => ({
8784
8832
  "r-tooltip": !0,
8785
8833
  "r-tooltip--dark": C.dark && !C.light,
8786
8834
  "r-tooltip--light": C.light
8787
8835
  }));
8788
8836
  return window.onresize = () => {
8789
- C.resizable && B();
8790
- }, f2(
8837
+ C.resizable && k();
8838
+ }, y2(
8791
8839
  () => {
8792
- C.disabled || (C.shown && C.triggers.includes(Y.Manual) ? d() : !C.shown && C.triggers.includes(Y.Manual) && m());
8840
+ C.disabled || (C.shown && C.triggers.includes(V1.Manual) ? e() : !C.shown && C.triggers.includes(V1.Manual) && o());
8793
8841
  },
8794
8842
  { flush: "post" }
8795
8843
  // this is important to avoid infinite loop & for fire on mounted
8796
- ), M2(() => {
8797
- var k, w;
8798
- C.resizable && ((w = (k = i.value) == null ? void 0 : k.parentElement) == null || w.parentElement.addEventListener("scroll", B())), d5(i, (T) => {
8799
- L.value.classList.contains("r-tooltip--active") && m(T);
8800
- }, { ignore: [L] }), C.type === N1.Dropdown && document.addEventListener("scroll", () => {
8801
- B();
8844
+ ), j1(() => {
8845
+ var v, y;
8846
+ C.resizable && ((y = (v = i.value) == null ? void 0 : v.parentElement) == null || y.parentElement.addEventListener("scroll", k())), n5(i, (T) => {
8847
+ L.value.classList.contains("r-tooltip--active") && o(T);
8848
+ }, { ignore: [L] }), C.type === K1.Dropdown && document.addEventListener("scroll", () => {
8849
+ k();
8802
8850
  });
8803
- }), (k, w) => (t(), r(H1, null, [
8804
- Z("div", {
8851
+ }), (v, y) => (l(), n(i1, null, [
8852
+ S("div", {
8805
8853
  ref_key: "trigger",
8806
8854
  ref: i,
8807
8855
  "aria-disabled": C.disabled,
8808
- class: p(["r-tooltip-trigger", k.triggerClass]),
8809
- onClick: a,
8810
- onMouseenter: o,
8811
- onMouseleave: l,
8812
- onMousemove: S
8856
+ class: g(["r-tooltip-trigger", v.triggerClass]),
8857
+ onClick: Z,
8858
+ onMouseenter: r,
8859
+ onMouseleave: t,
8860
+ onMousemove: u
8813
8861
  }, [
8814
- h(k.$slots, "default", {
8862
+ b(v.$slots, "default", {
8815
8863
  activators: {
8816
- click: a,
8817
- mouseenter: o,
8818
- mouseleave: l,
8819
- mousemove: S
8864
+ click: Z,
8865
+ mouseenter: r,
8866
+ mouseleave: t,
8867
+ mousemove: u
8820
8868
  },
8821
- tooltipId: J(e),
8822
- updatePosition: B
8869
+ tooltipId: L1(d),
8870
+ updatePosition: k
8823
8871
  }, () => [
8824
- Z("div", {
8872
+ S("div", {
8825
8873
  innerHTML: C.triggerContent
8826
- }, null, 8, G5)
8874
+ }, null, 8, X5)
8827
8875
  ])
8828
- ], 42, Q5),
8829
- (t(), _(h2, { to: "body" }, [
8830
- Z("div", {
8831
- id: J(e),
8876
+ ], 42, j5),
8877
+ (l(), x(m2, { to: "body" }, [
8878
+ S("div", {
8879
+ id: L1(d),
8832
8880
  ref_key: "tooltip",
8833
8881
  ref: L,
8834
- class: p([y.value, k.tooltipClass]),
8882
+ class: g([P.value, v.tooltipClass]),
8835
8883
  "data-show": "false",
8836
8884
  role: "tooltip"
8837
8885
  }, [
8838
- h(k.$slots, "content", {
8839
- hide: m,
8840
- updatePosition: B
8886
+ b(v.$slots, "content", {
8887
+ hide: o,
8888
+ updatePosition: k
8841
8889
  }, () => [
8842
- C.text ? (t(), r("div", {
8890
+ C.text ? (l(), n("div", {
8843
8891
  key: 0,
8844
- class: p(["r-tooltip__content", {
8892
+ class: g(["r-tooltip__content", {
8845
8893
  "r-tooltip__content--dark": C.dark,
8846
8894
  "r-tooltip__content--light": C.light
8847
8895
  }])
8848
- }, b(C.text), 3)) : O("", !0),
8849
- C.text ? (t(), r("div", {
8896
+ }, w(C.text), 3)) : p("", !0),
8897
+ C.text ? (l(), n("div", {
8850
8898
  key: 1,
8851
8899
  id: "arrow",
8852
8900
  ref_key: "arrowElement",
8853
8901
  ref: A,
8854
- class: p(["r-tooltip__arrow", {
8902
+ class: g(["r-tooltip__arrow", {
8855
8903
  "r-tooltip__arrow--dark": C.dark,
8856
8904
  "r-tooltip__arrow--light": C.light
8857
8905
  }])
8858
- }, null, 2)) : O("", !0)
8906
+ }, null, 2)) : p("", !0)
8859
8907
  ])
8860
- ], 10, $5)
8908
+ ], 10, Y5)
8861
8909
  ]))
8862
8910
  ], 64));
8863
8911
  }
8864
- }), z5 = ["id", "onClick"], K5 = { class: "r-dropdown__selections" }, q5 = { class: "flex flex-wrap items-center gap-2 text-sm" }, j5 = {
8912
+ }), C3 = ["id", "onClick"], H3 = { class: "r-dropdown__selections" }, V3 = { class: "flex flex-wrap items-center gap-2 text-sm" }, L3 = {
8865
8913
  key: 0,
8866
- class: "text-sm text-gray-600"
8867
- }, X5 = ["id", "autocomplete", "disabled", "placeholder", "readonly", "onInput", "onKeydown"], Y5 = ["data-has-value", "onClick"], J5 = ["onClick"], C3 = { class: "flex items-center" }, H3 = { class: "r-dropdown-options__option__label" }, V3 = {
8914
+ class: "r-dropdown__remaining-count-text"
8915
+ }, M3 = ["id", "aria-controls", "aria-describedby", "aria-disabled", "aria-expanded", "aria-invalid", "aria-label", "aria-required", "autocomplete", "disabled", "name", "placeholder", "readonly", "required", "onInput", "onKeydown"], i3 = ["data-has-value", "onClick"], A3 = ["id", "aria-multiselectable"], e3 = ["aria-selected", "onClick"], d3 = { class: "flex items-center" }, t3 = { class: "r-dropdown-options__option__label" }, m3 = {
8868
8916
  key: 1,
8869
8917
  class: "r-dropdown-options__divider"
8870
- }, L3 = ["aria-disabled", "onClick"], M3 = { class: "flex items-center" }, i3 = {
8918
+ }, l3 = ["onClick"], o3 = { class: "flex items-center" }, a3 = {
8871
8919
  key: 2,
8872
8920
  class: "r-dropdown-options__no-option"
8873
- }, A3 = {
8921
+ }, r3 = {
8874
8922
  key: 0,
8875
8923
  class: "r-dropdown-details"
8876
- }, e3 = {
8924
+ }, n3 = {
8877
8925
  key: 0,
8878
8926
  class: "r-dropdown-error"
8879
- }, d3 = {
8927
+ }, Z3 = {
8880
8928
  key: 1,
8881
8929
  class: "r-dropdown-hint"
8882
- }, t3 = /* @__PURE__ */ R({
8930
+ }, u3 = /* @__PURE__ */ E({
8883
8931
  __name: "RDropdown",
8884
8932
  props: {
8885
8933
  options: { default: () => [] },
@@ -8908,349 +8956,390 @@ const Q5 = ["aria-disabled"], G5 = ["innerHTML"], $5 = ["id"], U5 = /* @__PURE__
8908
8956
  showSelectAll: { type: Boolean, default: !1 },
8909
8957
  selectAllText: { default: "Select all" },
8910
8958
  disableDeselect: { type: Boolean, default: !1 },
8911
- maxVisibleChips: { default: 2 }
8959
+ maxVisibleChips: { default: 2 },
8960
+ label: { default: "" },
8961
+ required: { type: Boolean, default: !1 },
8962
+ ariaLabel: { default: "" },
8963
+ name: { default: "" }
8912
8964
  },
8913
8965
  emits: ["update:modelValue", "clear", "removeOption"],
8914
8966
  setup(H, { emit: V }) {
8915
- const C = H, M = V, i = E({}), L = E([]), A = E(!1), e = E("");
8916
- function d(u) {
8917
- if (!u || typeof u == "object" || typeof u == "function" || typeof u == "symbol" || typeof u > "u" || Array.isArray(u))
8967
+ const C = H, M = V, i = R({}), L = R([]), A = R(!1), d = R("");
8968
+ function e(m) {
8969
+ if (!m || typeof m == "object" || typeof m == "function" || typeof m == "symbol" || typeof m > "u" || Array.isArray(m))
8918
8970
  return !0;
8919
- const [s] = Object == null ? void 0 : Object.keys(u);
8920
- return ["label", "value"].includes(s);
8971
+ const [f] = Object == null ? void 0 : Object.keys(m);
8972
+ return ["label", "value"].includes(f);
8921
8973
  }
8922
- const m = f(() => {
8923
- const u = C.options;
8924
- return d(u[0]) ? u : u.map((s) => ({
8925
- value: s,
8926
- label: String(s)
8974
+ const o = O(() => {
8975
+ const m = C.options;
8976
+ return e(m[0]) ? m : m.map((f) => ({
8977
+ value: f,
8978
+ label: String(f)
8927
8979
  }));
8928
- }), n = f(() => {
8929
- const u = C.modelValue;
8930
- return d(u) ? u : {
8931
- value: u,
8932
- label: String(u)
8980
+ }), a = O(() => {
8981
+ const m = C.modelValue;
8982
+ return e(m) ? m : {
8983
+ value: m,
8984
+ label: String(m)
8933
8985
  };
8934
- }), a = E(), o = E(), l = E();
8935
- function S(u) {
8936
- var x, c, G, K1;
8986
+ }), Z = R(), r = R(), t = R();
8987
+ function u(m) {
8988
+ var U, h, j, b1;
8937
8989
  if (C.disabled)
8938
8990
  return;
8939
- const s = document.getElementById(u);
8940
- document.querySelectorAll(".r-dropdown--active").forEach(($) => {
8941
- var p1;
8942
- $.id !== ((p1 = a.value) == null ? void 0 : p1.id) && $.classList.contains("r-dropdown--active") && ($.childNodes.forEach((X) => {
8943
- X != null && X.classList && (Object == null || Object.values(X == null ? void 0 : X.classList).filter((R1) => R1.includes("--active")).forEach((R1) => {
8944
- X == null || X.classList.remove(R1);
8991
+ const f = document.getElementById(m);
8992
+ document.querySelectorAll(".r-dropdown--active").forEach((G) => {
8993
+ var v1;
8994
+ G.id !== ((v1 = Z.value) == null ? void 0 : v1.id) && G.classList.contains("r-dropdown--active") && (G.childNodes.forEach((H1) => {
8995
+ H1 != null && H1.classList && (Object == null || Object.values(H1 == null ? void 0 : H1.classList).filter((N1) => N1.includes("--active")).forEach((N1) => {
8996
+ H1 == null || H1.classList.remove(N1);
8945
8997
  }));
8946
- }), $.classList.remove("r-dropdown--active"));
8947
- }), s != null && s.classList.contains("r-dropdown--active") ? (s.classList.remove("r-dropdown--active"), A.value = !1, (x = a.value) == null || x.blur(), (c = o.value) == null || c.blur()) : (s == null || s.classList.add("r-dropdown--active"), A.value = !0, (G = a.value) == null || G.focus(), (K1 = o.value) == null || K1.focus(), s == null || s.childNodes.forEach(($) => {
8948
- $ != null && $.classList && (Object == null || Object.values($ == null ? void 0 : $.classList).forEach((p1) => {
8949
- $ == null || $.classList.add(`${p1}--active`);
8998
+ }), G.classList.remove("r-dropdown--active"));
8999
+ }), f != null && f.classList.contains("r-dropdown--active") ? (f.classList.remove("r-dropdown--active"), A.value = !1, (U = Z.value) == null || U.blur(), (h = r.value) == null || h.blur()) : (f == null || f.classList.add("r-dropdown--active"), A.value = !0, (j = Z.value) == null || j.focus(), (b1 = r.value) == null || b1.focus(), f == null || f.childNodes.forEach((G) => {
9000
+ G != null && G.classList && (Object == null || Object.values(G == null ? void 0 : G.classList).forEach((v1) => {
9001
+ G == null || G.classList.add(`${v1}--active`);
8950
9002
  }));
8951
9003
  }));
8952
9004
  }
8953
- function B(u) {
8954
- const s = document.getElementById(u);
8955
- s == null || s.classList.remove("r-dropdown--active"), A.value = !1;
9005
+ function k(m) {
9006
+ const f = document.getElementById(m);
9007
+ f == null || f.classList.remove("r-dropdown--active"), A.value = !1;
8956
9008
  }
8957
- function y(u, s, v, x) {
8958
- var c;
8959
- if (x(), !s.disabled) {
8960
- if (s.value === "select-all") {
8961
- i1();
9009
+ function P(m, f, W, U) {
9010
+ var h;
9011
+ if (U(), !f.disabled) {
9012
+ if (f.value === "select-all") {
9013
+ m1();
8962
9014
  return;
8963
9015
  }
8964
9016
  if (C.multiple) {
8965
- L.value.find((G) => G.value === s.value) ? (L.value.splice(L.value.indexOf(s), 1), M("removeOption", s)) : L.value.push(s), e.value = "", C.searchable && ((c = o.value) == null || c.focus());
9017
+ L.value.find((j) => j.value === f.value) ? (L.value.splice(L.value.indexOf(f), 1), M("removeOption", f)) : L.value.push(f), d.value = "", C.searchable && ((h = r.value) == null || h.focus());
8966
9018
  return;
8967
9019
  }
8968
- k(u, s), C.closeOnSelect && v();
9020
+ v(m, f), C.closeOnSelect && W();
8969
9021
  }
8970
9022
  }
8971
- function k(u, s) {
8972
- if (i.value.value === s.value && !C.disableDeselect) {
8973
- i.value = {}, e.value = "", M("update:modelValue", ""), M("removeOption", s);
9023
+ function v(m, f) {
9024
+ if (i.value.value === f.value && !C.disableDeselect) {
9025
+ i.value = {}, d.value = "", M("update:modelValue", ""), M("removeOption", f);
8974
9026
  return;
8975
9027
  }
8976
- e.value = s.label, i.value = s, M("update:modelValue", s);
9028
+ d.value = f.label, i.value = f, M("update:modelValue", f);
8977
9029
  }
8978
- function w(u, s, v) {
8979
- if (u instanceof KeyboardEvent && u.key !== "Backspace" || e.value !== "")
9030
+ function y(m, f, W) {
9031
+ if (m instanceof KeyboardEvent && m.key !== "Backspace" || d.value !== "")
8980
9032
  return;
8981
- u.stopPropagation(), v();
8982
- const x = L.value.findIndex((c) => c.value === s.value);
8983
- L.value.splice(x, 1), M("removeOption", s), M("update:modelValue", L.value);
9033
+ m.stopPropagation(), W();
9034
+ const U = L.value.findIndex((h) => h.value === f.value);
9035
+ L.value.splice(U, 1), M("removeOption", f), M("update:modelValue", L.value);
8984
9036
  }
8985
- function T(u, s) {
8986
- var c;
9037
+ function T(m, f) {
9038
+ var h;
8987
9039
  if (!C.multiple)
8988
9040
  return;
8989
- u.stopPropagation(), s();
8990
- const v = e.value;
8991
- if (v === "")
9041
+ m.stopPropagation(), f();
9042
+ const W = d.value;
9043
+ if (W === "")
8992
9044
  return;
8993
- m.value.find((G) => G.label === v) || (L.value.push({ value: v, label: v }), e.value = "", (c = o.value) == null || c.focus());
9045
+ o.value.find((j) => j.label === W) || (L.value.push({ value: W, label: W }), d.value = "", (h = r.value) == null || h.focus());
8994
9046
  }
8995
- function F(u) {
8996
- var s;
8997
- return !u || (u == null ? void 0 : u.value) === void 0 || (u == null ? void 0 : u.value) === null ? !1 : C.multiple ? L.value.find((v) => (v == null ? void 0 : v.value) === (u == null ? void 0 : u.value)) : ((s = i.value) == null ? void 0 : s.value) === (u == null ? void 0 : u.value);
9047
+ const s = O(() => !C.searchable || i.value.label === d.value ? o.value : o.value.filter((f) => f.label.toLowerCase().includes(d.value.toLowerCase())));
9048
+ function B(m) {
9049
+ return m.value === "select-all" ? L.value.length === s.value.length : C.multiple ? L.value.some((f) => f.value === m.value) : C.modelValue === m.value;
8998
9050
  }
8999
- const P = f(() => !C.searchable || i.value.label === e.value ? m.value : m.value.filter((s) => s.label.toLowerCase().includes(e.value.toLowerCase()))), U = f(() => !C.searchable);
9000
- function W() {
9001
- n.value ? C.multiple ? L.value = n.value : (i.value = n.value, e.value = n.value.label) : (i.value = {}, L.value.splice(0, L.value.length));
9051
+ const I = O(() => !C.searchable);
9052
+ function F() {
9053
+ a.value ? C.multiple ? L.value = a.value : (i.value = a.value, d.value = a.value.label) : (i.value = {}, L.value.splice(0, L.value.length));
9002
9054
  }
9003
- function g(u) {
9004
- C.searchable && u(), !C.multiple && e.value === "" && (i.value = {}, M("update:modelValue", ""), M("removeOption", i.value));
9055
+ function c(m) {
9056
+ C.searchable && m(), !C.multiple && d.value === "" && (i.value = {}, M("update:modelValue", ""), M("removeOption", i.value));
9005
9057
  }
9006
- function N(u, s) {
9007
- if (u.stopPropagation(), s(), C.multiple) {
9058
+ function $(m, f) {
9059
+ if (m.stopPropagation(), f(), C.multiple) {
9008
9060
  L.value.splice(0, L.value.length), M("clear", L.value);
9009
9061
  return;
9010
9062
  }
9011
- i.value = {}, e.value = "", M("update:modelValue", ""), M("clear", i.value);
9063
+ i.value = {}, d.value = "", M("update:modelValue", ""), M("clear", i.value);
9012
9064
  }
9013
- function i1() {
9014
- if (L.value.length === P.value.length) {
9065
+ function m1() {
9066
+ if (L.value.length === s.value.length) {
9015
9067
  L.value.splice(0, L.value.length);
9016
9068
  return;
9017
9069
  }
9018
- L.value = P.value;
9070
+ L.value = s.value;
9019
9071
  }
9020
- const A1 = f(() => !C.multiple || !Array.isArray(C.modelValue) ? [] : C.modelValue.slice(0, C.maxVisibleChips)), Q = f(() => !C.multiple || !Array.isArray(C.modelValue) ? 0 : Math.max(0, C.modelValue.length - C.maxVisibleChips));
9021
- return M2(() => {
9022
- W(), navigator.userAgent.includes("iPhone") && document.querySelector("[name=viewport]").setAttribute("content", "width=device-width, initial-scale=1, maximum-scale=1");
9023
- }), I(
9072
+ const l1 = O(() => !C.multiple || !Array.isArray(C.modelValue) ? [] : C.modelValue.slice(0, C.maxVisibleChips)), Q = O(() => !C.multiple || !Array.isArray(C.modelValue) ? 0 : Math.max(0, C.modelValue.length - C.maxVisibleChips));
9073
+ j1(() => {
9074
+ F(), navigator.userAgent.includes("iPhone") && document.querySelector("[name=viewport]").setAttribute("content", "width=device-width, initial-scale=1, maximum-scale=1");
9075
+ }), N(
9024
9076
  L,
9025
- (u) => {
9026
- M("update:modelValue", u);
9077
+ (m) => {
9078
+ M("update:modelValue", m);
9027
9079
  },
9028
9080
  {
9029
9081
  deep: !0
9030
9082
  }
9031
- ), I(() => n.value, (u) => {
9032
- W();
9033
- }), (u, s) => (t(), r("div", {
9083
+ ), N(() => a.value, (m) => {
9084
+ F();
9085
+ });
9086
+ const Y = O(() => C.id || `dropdown-${Math.random().toString(36).substr(2, 9)}`), _ = O(() => `${Y.value}-listbox`), K = O(() => ({
9087
+ "aria-label": C.ariaLabel || C.label,
9088
+ "aria-expanded": A.value,
9089
+ "aria-haspopup": "listbox",
9090
+ "aria-controls": _.value,
9091
+ "aria-required": C.required || void 0,
9092
+ "aria-disabled": C.disabled || void 0,
9093
+ "aria-invalid": !!C.errorMsg,
9094
+ "aria-describedby": C.errorMsg ? `${Y.value}-error` : C.hint ? `${Y.value}-hint` : void 0,
9095
+ role: "combobox"
9096
+ }));
9097
+ function q(m, f) {
9098
+ return {
9099
+ role: "option",
9100
+ id: `${_.value}-${f}`,
9101
+ "aria-selected": B(m),
9102
+ "aria-disabled": m.disabled
9103
+ };
9104
+ }
9105
+ return (m, f) => (l(), n("div", {
9034
9106
  ref_key: "wrapper",
9035
- ref: l,
9107
+ ref: t,
9036
9108
  class: "r-dropdown-wrapper"
9037
9109
  }, [
9038
- q(U5, {
9110
+ J(J5, {
9039
9111
  "auto-hide": !1,
9040
9112
  offset: 0,
9041
9113
  placement: "bottom",
9042
9114
  resizable: "",
9043
- "tooltip-class": ["w-full", C.tooltipClass],
9115
+ "tooltip-class": ["w-full", m.tooltipClass],
9044
9116
  "trigger-class": "w-full",
9045
9117
  triggers: ["click"],
9046
9118
  type: "dropdown",
9047
- onHide: s[1] || (s[1] = (v) => {
9048
- B(v);
9049
- })
9119
+ onHide: k
9050
9120
  }, {
9051
- default: k1(({ updatePosition: v, tooltipId: x }) => [
9052
- Z("div", {
9053
- id: x,
9121
+ default: O1(({ updatePosition: W, tooltipId: U }) => [
9122
+ S("div", T1({
9123
+ id: U,
9054
9124
  ref_key: "dropdown",
9055
- ref: a,
9056
- class: p(["r-dropdown", {
9057
- "r-dropdown--disabled": C.disabled,
9058
- "r-dropdown--loading": C.loading,
9059
- [C.dropdownClass]: C.dropdownClass,
9060
- "r-dropdown--error": C.errorMsg,
9061
- group: e.value !== "" || L.value.length
9062
- }]),
9063
- role: "select",
9064
- onClick: (c) => S(x)
9065
- }, [
9066
- C.prependIcon || u.$slots.prepend ? (t(), r("div", {
9125
+ ref: Z,
9126
+ class: ["r-dropdown", {
9127
+ "r-dropdown--disabled": m.disabled,
9128
+ "r-dropdown--loading": m.loading,
9129
+ [m.dropdownClass]: m.dropdownClass,
9130
+ "r-dropdown--error": m.errorMsg,
9131
+ group: d.value !== "" || L.value.length
9132
+ }]
9133
+ }, K.value, {
9134
+ onClick: (h) => u(U)
9135
+ }), [
9136
+ m.prependIcon || m.$slots.prepend ? (l(), n("div", {
9067
9137
  key: 0,
9068
- class: p(["r-dropdown__prepend-icon", {
9138
+ class: g(["r-dropdown__prepend-icon", {
9069
9139
  "r-dropdown__prepend-icon--active": A.value,
9070
- "r-dropdown__prepend-icon--error": C.errorMsg
9140
+ "r-dropdown__prepend-icon--error": m.errorMsg
9071
9141
  }])
9072
9142
  }, [
9073
- h(u.$slots, "prepend", {
9143
+ b(m.$slots, "prepend", {
9074
9144
  active: A.value,
9075
- disabled: C.disabled,
9076
- error: C.errorMsg.length,
9077
- loading: C.loading
9145
+ disabled: m.disabled,
9146
+ error: !!m.errorMsg,
9147
+ loading: m.loading
9078
9148
  }, () => [
9079
- C.prependIcon ? (t(), _(D, {
9149
+ m.prependIcon ? (l(), x(D, {
9080
9150
  key: 0,
9081
- name: C.prependIcon
9082
- }, null, 8, ["name"])) : O("", !0)
9151
+ "aria-hidden": "true",
9152
+ name: m.prependIcon
9153
+ }, null, 8, ["name"])) : p("", !0)
9083
9154
  ])
9084
- ], 2)) : O("", !0),
9085
- Z("div", K5, [
9086
- h(u.$slots, "selection", {
9087
- removeOption: w,
9155
+ ], 2)) : p("", !0),
9156
+ S("div", H3, [
9157
+ b(m.$slots, "selection", {
9158
+ removeOption: y,
9088
9159
  selected: L.value
9089
9160
  }, () => [
9090
- Z("div", q5, [
9091
- C.multiple && C.chips ? (t(), r(H1, { key: 0 }, [
9092
- (t(!0), r(H1, null, d1(A1.value, (c) => (t(), _(V5, {
9093
- key: c.value,
9094
- clearable: "",
9161
+ S("div", V3, [
9162
+ m.multiple && m.chips ? (l(), n(i1, { key: 0 }, [
9163
+ (l(!0), n(i1, null, r1(l1.value, (h) => (l(), x(t5, {
9164
+ key: h.value,
9165
+ clearable: !m.hideChipClear,
9095
9166
  ghost: "",
9096
- label: c.label,
9167
+ label: h.label,
9097
9168
  variant: "primary",
9098
- "onClick:close": (G) => w(G, c, v)
9099
- }, null, 8, ["label", "onClick:close"]))), 128)),
9100
- Q.value > 0 ? (t(), r("span", j5, " +" + b(Q.value), 1)) : O("", !0)
9101
- ], 64)) : C.multiple ? (t(!0), r(H1, { key: 1 }, d1(L.value, (c, G) => (t(), r("span", {
9102
- key: c.value
9103
- }, b(c.label) + b(G < L.value.length - 1 ? ", " : ""), 1))), 128)) : O("", !0)
9169
+ "onClick:close": (j) => y(j, h, W)
9170
+ }, null, 8, ["clearable", "label", "onClick:close"]))), 128)),
9171
+ b(m.$slots, "remaining-count", { count: Q.value }, () => [
9172
+ Q.value > 0 ? (l(), n("span", L3, " +" + w(Q.value), 1)) : p("", !0)
9173
+ ])
9174
+ ], 64)) : m.multiple ? (l(!0), n(i1, { key: 1 }, r1(L.value, (h, j) => (l(), n("span", {
9175
+ key: h.value
9176
+ }, w(h.label) + w(j < L.value.length - 1 ? ", " : ""), 1))), 128)) : p("", !0)
9104
9177
  ])
9105
9178
  ]),
9106
- i2(Z("input", {
9107
- id: C.id,
9179
+ l2(S("input", {
9180
+ id: m.id,
9108
9181
  ref_key: "input",
9109
- ref: o,
9110
- "onUpdate:modelValue": s[0] || (s[0] = (c) => e.value = c),
9111
- autocomplete: C.autocomplete,
9112
- class: p(["r-dropdown__input", {
9113
- "r-dropdown__input--loading": C.loading
9182
+ ref: r,
9183
+ "onUpdate:modelValue": f[0] || (f[0] = (h) => d.value = h),
9184
+ "aria-controls": _.value,
9185
+ "aria-describedby": m.errorMsg ? `${Y.value}-error` : m.hint ? `${Y.value}-hint` : void 0,
9186
+ "aria-disabled": m.disabled,
9187
+ "aria-expanded": A.value,
9188
+ "aria-invalid": !!m.errorMsg,
9189
+ "aria-label": m.ariaLabel || m.label,
9190
+ "aria-required": m.required,
9191
+ autocomplete: m.autocomplete,
9192
+ class: g(["r-dropdown__input", {
9193
+ "r-dropdown__input--loading": m.loading
9114
9194
  }]),
9115
- disabled: C.disabled,
9116
- placeholder: C.placeholder,
9117
- readonly: U.value,
9118
- role: "presentation",
9195
+ disabled: m.disabled,
9196
+ name: m.name,
9197
+ placeholder: m.placeholder,
9198
+ readonly: I.value,
9199
+ required: m.required,
9200
+ role: "combobox",
9119
9201
  type: "text",
9120
- onInput: t1((c) => g(v), ["prevent"]),
9202
+ onInput: o1((h) => c(W), ["prevent"]),
9121
9203
  onKeydown: [
9122
- q1((c) => w(c, L.value[L.value.length - 1], v), ["backspace"]),
9123
- q1((c) => T(c, v), ["enter"])
9204
+ p1((h) => y(h, L.value[L.value.length - 1], W), ["backspace"]),
9205
+ p1((h) => T(h, W), ["enter"])
9124
9206
  ]
9125
- }, null, 42, X5), [
9126
- [g2, e.value]
9207
+ }, null, 42, M3), [
9208
+ [o2, d.value]
9127
9209
  ])
9128
9210
  ]),
9129
- C.clearable ? (t(), r("div", {
9211
+ m.clearable ? (l(), n("div", {
9130
9212
  key: 1,
9131
9213
  class: "r-dropdown__clearable",
9132
- "data-has-value": (e.value !== "" || L.value.length) && A.value,
9133
- onClick: (c) => N(c, v)
9214
+ "data-has-value": (d.value !== "" || L.value.length) && A.value,
9215
+ onClick: (h) => $(h, W)
9134
9216
  }, [
9135
- h(u.$slots, "clearable", {}, () => [
9136
- q(D, {
9217
+ b(m.$slots, "clearable", {}, () => [
9218
+ J(D, {
9219
+ "aria-hidden": "true",
9137
9220
  name: "mdiCloseCircle",
9138
9221
  size: "18"
9139
9222
  })
9140
9223
  ])
9141
- ], 8, Y5)) : O("", !0),
9142
- C.appendIcon || u.$slots.append ? (t(), r("div", {
9224
+ ], 8, i3)) : p("", !0),
9225
+ m.appendIcon || m.$slots.append ? (l(), n("div", {
9143
9226
  key: 2,
9144
- class: p(["r-dropdown__append-icon", {
9227
+ class: g(["r-dropdown__append-icon", {
9145
9228
  "r-dropdown__append-icon--active": A.value,
9146
- "r-dropdown__append-icon--error": C.errorMsg
9229
+ "r-dropdown__append-icon--error": m.errorMsg
9147
9230
  }])
9148
9231
  }, [
9149
- h(u.$slots, "append", {
9232
+ b(m.$slots, "append", {
9150
9233
  active: A.value,
9151
- disabled: C.disabled,
9152
- error: C.errorMsg.length,
9153
- loading: C.loading
9234
+ disabled: m.disabled,
9235
+ error: !!m.errorMsg,
9236
+ loading: m.loading
9154
9237
  }, () => [
9155
- C.appendIcon ? (t(), _(D, {
9238
+ m.appendIcon ? (l(), x(D, {
9156
9239
  key: 0,
9157
- name: C.appendIcon
9158
- }, null, 8, ["name"])) : O("", !0)
9240
+ "aria-hidden": "true",
9241
+ name: m.appendIcon
9242
+ }, null, 8, ["name"])) : p("", !0)
9159
9243
  ])
9160
- ], 2)) : O("", !0)
9161
- ], 10, z5)
9244
+ ], 2)) : p("", !0)
9245
+ ], 16, C3)
9162
9246
  ]),
9163
- content: k1(({ hide: v, updatePosition: x }) => [
9164
- Z("ul", {
9165
- class: p(["r-dropdown-options", {
9247
+ content: O1(({ hide: W, updatePosition: U }) => [
9248
+ S("ul", {
9249
+ id: _.value,
9250
+ "aria-multiselectable": m.multiple,
9251
+ class: g(["r-dropdown-options", {
9166
9252
  "r-dropdown-options--active": A.value,
9167
- [C.optionsClass]: C.optionsClass
9168
- }])
9253
+ [m.optionsClass]: m.optionsClass
9254
+ }]),
9255
+ role: "listbox"
9169
9256
  }, [
9170
- C.showSelectAll && C.multiple && P.value.length > 0 ? (t(), r("li", {
9257
+ m.showSelectAll && m.multiple && s.value.length > 0 ? (l(), n("li", {
9171
9258
  key: 0,
9172
- class: p(["r-dropdown-options__option", {
9173
- "r-dropdown-options__option--active": L.value.length === P.value.length,
9174
- "r-dropdown-options__option--disabled": !1
9259
+ "aria-selected": L.value.length === s.value.length,
9260
+ class: g(["r-dropdown-options__option", {
9261
+ "r-dropdown-options__option--active": L.value.length === s.value.length
9175
9262
  }]),
9176
- onClick: t1((c) => y(c, { label: C.selectAllText, value: "select-all" }, v, x), ["prevent"])
9263
+ role: "option",
9264
+ onClick: o1((h) => P(h, { label: m.selectAllText, value: "select-all" }, W, U), ["prevent"])
9177
9265
  }, [
9178
- Z("div", C3, [
9179
- Z("p", H3, b(C.selectAllText), 1)
9266
+ S("div", d3, [
9267
+ S("p", t3, w(m.selectAllText), 1)
9180
9268
  ]),
9181
- L.value.length === P.value.length && !C.hideOptionCheckIcon ? (t(), _(D, {
9269
+ L.value.length === s.value.length && !m.hideOptionCheckIcon ? (l(), x(D, {
9182
9270
  key: 0,
9183
- class: p(["r-dropdown-options__option__append-icon", {
9184
- "r-dropdown-options__option__append-icon--active": L.value.length === P.value.length
9271
+ "aria-hidden": "true",
9272
+ class: g(["r-dropdown-options__option__append-icon", {
9273
+ "r-dropdown-options__option__append-icon--active": L.value.length === s.value.length
9185
9274
  }]),
9186
9275
  name: "mdiCheck"
9187
- }, null, 8, ["class"])) : O("", !0)
9188
- ], 10, J5)) : O("", !0),
9189
- C.showSelectAll && P.value.length > 0 ? (t(), r("hr", V3)) : O("", !0),
9190
- (t(!0), r(H1, null, d1(P.value, (c) => (t(), r("li", {
9191
- key: c.value,
9192
- "aria-disabled": c.disabled,
9193
- class: p(["r-dropdown-options__option", {
9194
- "r-dropdown-options__option--active": F(c),
9195
- "r-dropdown-options__option--disabled": c.disabled,
9196
- "r-dropdown-options__option--deselect": F(c) && C.disableDeselect
9197
- }]),
9198
- onClick: t1((G) => y(G, c, v, x), ["prevent"])
9199
- }, [
9200
- h(u.$slots, "option", {
9201
- disabled: c.disabled,
9202
- isSelected: F(c),
9203
- item: c
9276
+ }, null, 8, ["class"])) : p("", !0)
9277
+ ], 10, e3)) : p("", !0),
9278
+ m.showSelectAll && s.value.length > 0 ? (l(), n("hr", m3)) : p("", !0),
9279
+ (l(!0), n(i1, null, r1(s.value, (h, j) => (l(), n("li", T1({
9280
+ key: h.value
9281
+ }, q(h, j), {
9282
+ class: ["r-dropdown-options__option", {
9283
+ "r-dropdown-options__option--active": B(h),
9284
+ "r-dropdown-options__option--disabled": h.disabled,
9285
+ "r-dropdown-options__option--deselect": B(h) && C.disableDeselect
9286
+ }],
9287
+ onClick: o1((b1) => P(b1, h, W, U), ["prevent"])
9288
+ }), [
9289
+ b(m.$slots, "option", {
9290
+ disabled: h.disabled,
9291
+ isSelected: B(h),
9292
+ item: h
9204
9293
  }, () => [
9205
- Z("div", M3, [
9206
- h(u.$slots, "option-prepend", {
9207
- disabled: c.disabled,
9208
- isSelected: F(c)
9294
+ S("div", o3, [
9295
+ b(m.$slots, "option-prepend", {
9296
+ disabled: h.disabled,
9297
+ isSelected: B(h)
9209
9298
  }, () => [
9210
- c.prependIcon ? (t(), _(D, {
9299
+ h.prependIcon ? (l(), x(D, {
9211
9300
  key: 0,
9212
- class: p(["r-dropdown-options__option__prepend-icon", {
9213
- "r-dropdown-options__option__prepend-icon--active": F(c)
9301
+ class: g(["r-dropdown-options__option__prepend-icon", {
9302
+ "r-dropdown-options__option__prepend-icon--active": B(h)
9214
9303
  }]),
9215
- name: c.prependIcon
9216
- }, null, 8, ["class", "name"])) : O("", !0)
9304
+ name: h.prependIcon
9305
+ }, null, 8, ["class", "name"])) : p("", !0)
9217
9306
  ]),
9218
- Z("p", {
9219
- class: p(["r-dropdown-options__option__label", {
9220
- "r-dropdown-options__option__label--active": F(c)
9307
+ S("p", {
9308
+ class: g(["r-dropdown-options__option__label", {
9309
+ "r-dropdown-options__option__label--active": B(h)
9221
9310
  }])
9222
- }, b(c.label), 3)
9311
+ }, w(h.label), 3)
9223
9312
  ]),
9224
- h(u.$slots, "option-append", {
9225
- disabled: c.disabled,
9226
- isSelected: F(c)
9313
+ b(m.$slots, "option-append", {
9314
+ disabled: h.disabled,
9315
+ isSelected: B(h)
9227
9316
  }, () => [
9228
- F(c) && !C.hideOptionCheckIcon ? (t(), _(D, {
9317
+ B(h) && !C.hideOptionCheckIcon ? (l(), x(D, {
9229
9318
  key: 0,
9230
- class: p(["r-dropdown-options__option__append-icon", {
9231
- "r-dropdown-options__option__append-icon--active": F(c)
9319
+ class: g(["r-dropdown-options__option__append-icon", {
9320
+ "r-dropdown-options__option__append-icon--active": B(h)
9232
9321
  }]),
9233
9322
  name: "mdiCheck"
9234
- }, null, 8, ["class"])) : O("", !0)
9323
+ }, null, 8, ["class"])) : p("", !0)
9235
9324
  ])
9236
9325
  ])
9237
- ], 10, L3))), 128)),
9238
- P.value.length === 0 ? (t(), r("li", i3, [
9239
- h(u.$slots, "not-options", {}, () => [
9240
- S1(b(C.noOptionsText), 1)
9326
+ ], 16, l3))), 128)),
9327
+ s.value.length === 0 ? (l(), n("li", a3, [
9328
+ b(m.$slots, "not-options", {}, () => [
9329
+ d1(w(C.noOptionsText), 1)
9241
9330
  ])
9242
- ])) : O("", !0)
9243
- ], 2)
9331
+ ])) : p("", !0)
9332
+ ], 10, A3)
9244
9333
  ]),
9245
9334
  _: 3
9246
9335
  }, 8, ["tooltip-class"]),
9247
- u.$props.hideDetails ? O("", !0) : (t(), r("div", A3, [
9248
- C.errorMsg ? (t(), r("div", e3, b(C.errorMsg), 1)) : O("", !0),
9249
- C.hint ? (t(), r("div", d3, b(C.hint), 1)) : O("", !0)
9250
- ]))
9336
+ !C.hideDetails && (C.errorMsg || C.hint) ? (l(), n("div", r3, [
9337
+ C.errorMsg ? (l(), n("div", n3, w(C.errorMsg), 1)) : p("", !0),
9338
+ C.hint ? (l(), n("div", Z3, w(C.hint), 1)) : p("", !0)
9339
+ ])) : p("", !0)
9251
9340
  ], 512));
9252
9341
  }
9253
- }), m3 = ["id", "for"], c2 = /* @__PURE__ */ R({
9342
+ }), S3 = ["id", "for"], b2 = /* @__PURE__ */ E({
9254
9343
  __name: "RLabel",
9255
9344
  props: {
9256
9345
  id: { default: "" },
@@ -9259,26 +9348,23 @@ const Q5 = ["aria-disabled"], G5 = ["innerHTML"], $5 = ["id"], U5 = /* @__PURE__
9259
9348
  },
9260
9349
  setup(H) {
9261
9350
  const V = H;
9262
- return (C, M) => (t(), r("label", {
9351
+ return (C, M) => (l(), n("label", {
9263
9352
  id: V.id,
9264
9353
  class: "r-label",
9265
9354
  for: V.for
9266
9355
  }, [
9267
- h(C.$slots, "default", {}, () => [
9268
- S1(b(V.text), 1)
9356
+ b(C.$slots, "default", {}, () => [
9357
+ d1(w(V.text), 1)
9269
9358
  ])
9270
- ], 8, m3));
9359
+ ], 8, S3));
9271
9360
  }
9272
- }), l3 = ["onClick"], o3 = ["open"], n3 = { class: "r-dialog__header" }, r3 = {
9361
+ }), s3 = ["id"], c3 = {
9273
9362
  key: 0,
9274
- class: "icon"
9275
- }, a3 = {
9363
+ class: "r-dialog__header"
9364
+ }, p3 = { class: "r-dialog__header-content" }, O3 = { class: "r-dialog__texts" }, f3 = ["id"], h3 = ["id"], g3 = {
9276
9365
  key: 1,
9277
- class: "title"
9278
- }, Z3 = {
9279
- key: 2,
9280
- class: "description"
9281
- }, u3 = { class: "r-dialog__body" }, S3 = { class: "r-dialog__actions" }, f0 = /* @__PURE__ */ R({
9366
+ class: "r-dialog__actions"
9367
+ }, I0 = /* @__PURE__ */ E({
9282
9368
  __name: "RModal",
9283
9369
  props: {
9284
9370
  modelValue: { type: Boolean, default: !1 },
@@ -9293,61 +9379,146 @@ const Q5 = ["aria-disabled"], G5 = ["innerHTML"], $5 = ["id"], U5 = /* @__PURE__
9293
9379
  class: { default: "" },
9294
9380
  overlayClass: { default: "" },
9295
9381
  style: { default: "" },
9296
- allowBodyScroll: { type: Boolean, default: !1 }
9382
+ allowBodyScroll: { type: Boolean, default: !1 },
9383
+ id: { default: void 0 },
9384
+ ariaLabel: { default: "" },
9385
+ ariaDescription: { default: "" }
9297
9386
  },
9298
9387
  emits: ["update:modelValue"],
9299
9388
  setup(H, { emit: V }) {
9300
- const C = H, M = V, i = f(() => ({
9389
+ const C = H, M = V, i = O(() => ({
9301
9390
  "r-dialog": !0,
9302
9391
  "r-dialog--block": C.block,
9303
9392
  "p-0 gap-0": C.clearContent,
9304
9393
  [`${C.class}`]: !0
9305
- })), L = f(() => ({
9394
+ })), L = O(() => ({
9306
9395
  width: C.width,
9307
9396
  height: C.height
9308
9397
  }));
9309
- function A(e) {
9310
- C.outsideClick && e.target === e.currentTarget && M("update:modelValue", !1);
9398
+ function A(s) {
9399
+ C.outsideClick && s.target === s.currentTarget && M("update:modelValue", !1);
9311
9400
  }
9312
- return k2(() => {
9313
- !C.modelValue && C.allowBodyScroll && (document.body.style.overflow = "auto");
9314
- }), window.addEventListener("keydown", (e) => {
9315
- e.key === "Escape" && C.modelValue && C.outsideClick && M("update:modelValue", !1);
9316
- }), (e, d) => i2((t(), r("div", {
9317
- class: p(["r-modal-overlay", e.overlayClass]),
9318
- onClick: t1(A, ["stop"])
9319
- }, [
9320
- Z("div", {
9321
- "aria-modal": "true",
9322
- class: p(i.value),
9323
- open: C.modelValue,
9324
- role: "dialog",
9325
- style: Q1(L.value)
9326
- }, [
9327
- h(e.$slots, "wrapper", {}, () => [
9328
- Z("div", n3, [
9329
- h(e.$slots, "header"),
9330
- C.icon ? (t(), r("div", r3, [
9331
- q(D, {
9332
- name: C.icon
9333
- }, null, 8, ["name"])
9334
- ])) : O("", !0),
9335
- C.title ? (t(), r("div", a3, b(C.title), 1)) : O("", !0),
9336
- C.description ? (t(), r("div", Z3, b(C.description), 1)) : O("", !0)
9337
- ]),
9338
- Z("div", u3, [
9339
- h(e.$slots, "default")
9340
- ]),
9341
- Z("div", S3, [
9342
- h(e.$slots, "actions")
9343
- ])
9344
- ])
9345
- ], 14, o3)
9346
- ], 10, l3)), [
9347
- [B2, e.modelValue]
9348
- ]);
9401
+ const d = R(C.id || `modal-${Math.random().toString(36).substr(2, 9)}`), e = R(`${d.value}-title`), o = R(`${d.value}-description`), a = R(null), Z = R(null), r = R(null), t = R(null), u = O(() => ({
9402
+ role: "dialog",
9403
+ "aria-modal": "true",
9404
+ "aria-labelledby": C.title ? e.value : void 0,
9405
+ "aria-describedby": C.description ? o.value : void 0,
9406
+ "aria-label": C.title ? void 0 : C.ariaLabel
9407
+ }));
9408
+ function k() {
9409
+ if (!Z.value)
9410
+ return;
9411
+ const s = Z.value.querySelectorAll(
9412
+ 'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
9413
+ );
9414
+ r.value = s[0], t.value = s[s.length - 1];
9415
+ }
9416
+ function P(s) {
9417
+ !C.modelValue || !r.value || !t.value || !(s.key === "Tab") || (s.shiftKey ? document.activeElement === r.value && (s.preventDefault(), t.value.focus()) : document.activeElement === t.value && (s.preventDefault(), r.value.focus()));
9418
+ }
9419
+ function v(s) {
9420
+ s.key === "Escape" && C.modelValue && C.outsideClick && (s.preventDefault(), M("update:modelValue", !1));
9421
+ }
9422
+ function y(s) {
9423
+ P(s), v(s);
9424
+ }
9425
+ const T = R(null);
9426
+ return N(() => C.modelValue, async (s) => {
9427
+ var B, I;
9428
+ if (s) {
9429
+ a.value = document.activeElement, document.body.style.overflow = C.allowBodyScroll ? "auto" : "hidden", await I1(), k(), (B = r.value) == null || B.focus(), Z.value && !T.value && (T.value = new MutationObserver(() => {
9430
+ I1(() => {
9431
+ k();
9432
+ });
9433
+ }), T.value.observe(Z.value, {
9434
+ childList: !0,
9435
+ subtree: !0
9436
+ }));
9437
+ const F = document.createElement("div");
9438
+ F.setAttribute("role", "status"), F.setAttribute("aria-live", "polite"), F.textContent = `Dialog ${C.title || ""} opened`, document.body.appendChild(F), setTimeout(() => F.remove(), 1e3);
9439
+ } else {
9440
+ document.body.style.overflow = "auto", (I = a.value) == null || I.focus();
9441
+ const F = document.createElement("div");
9442
+ F.setAttribute("role", "status"), F.setAttribute("aria-live", "polite"), F.textContent = `Dialog ${C.title || ""} closed`, document.body.appendChild(F), setTimeout(() => F.remove(), 1e3);
9443
+ }
9444
+ }), j1(() => {
9445
+ C.modelValue && I1(() => {
9446
+ var s;
9447
+ k(), (s = r.value) == null || s.focus();
9448
+ });
9449
+ }), w2(() => {
9450
+ var s;
9451
+ document.body.style.overflow = "auto", (s = T.value) == null || s.disconnect();
9452
+ }), (s, B) => (l(), x(m2, { to: "body" }, [
9453
+ J(P2, { name: "modal" }, {
9454
+ default: O1(() => [
9455
+ s.modelValue ? (l(), n("div", T1({
9456
+ key: 0,
9457
+ id: d.value,
9458
+ ref_key: "modalRef",
9459
+ ref: Z,
9460
+ class: ["r-modal-overlay", [`${s.overlayClass}`]]
9461
+ }, u.value, {
9462
+ tabindex: "-1",
9463
+ onClick: A,
9464
+ onKeydown: y
9465
+ }), [
9466
+ S("div", {
9467
+ class: g(i.value),
9468
+ role: "document",
9469
+ style: X1(L.value)
9470
+ }, [
9471
+ s.clearContent ? p("", !0) : (l(), n("div", c3, [
9472
+ S("div", p3, [
9473
+ s.icon ? (l(), x(D, {
9474
+ key: 0,
9475
+ "aria-hidden": "true",
9476
+ class: "r-dialog__icon",
9477
+ name: s.icon
9478
+ }, null, 8, ["name"])) : p("", !0),
9479
+ S("div", O3, [
9480
+ s.title ? (l(), n("h2", {
9481
+ key: 0,
9482
+ id: e.value,
9483
+ class: "r-dialog__title"
9484
+ }, w(s.title), 9, f3)) : p("", !0),
9485
+ s.description ? (l(), n("p", {
9486
+ key: 1,
9487
+ id: o.value,
9488
+ class: "r-dialog__description"
9489
+ }, w(s.description), 9, h3)) : p("", !0)
9490
+ ])
9491
+ ]),
9492
+ s.outsideClick ? (l(), n("button", {
9493
+ key: 0,
9494
+ "aria-label": "Close dialog",
9495
+ class: "r-dialog__close",
9496
+ onClick: B[0] || (B[0] = (I) => s.$emit("update:modelValue", !1))
9497
+ }, [
9498
+ J(D, {
9499
+ "aria-hidden": "true",
9500
+ name: "mdiClose"
9501
+ })
9502
+ ])) : p("", !0)
9503
+ ])),
9504
+ S("div", {
9505
+ class: g(["r-dialog__body", {
9506
+ "r-dialog__body--clear": s.clearContent
9507
+ }])
9508
+ }, [
9509
+ b(s.$slots, "default")
9510
+ ], 2),
9511
+ !s.clearContent && s.$slots.actions ? (l(), n("div", g3, [
9512
+ b(s.$slots, "actions")
9513
+ ])) : p("", !0)
9514
+ ], 6)
9515
+ ], 16, s3)) : p("", !0)
9516
+ ]),
9517
+ _: 3
9518
+ })
9519
+ ]));
9349
9520
  }
9350
- }), s3 = ["data-open"], c3 = ["data-open"], p3 = ["data-open"], h0 = /* @__PURE__ */ R({
9521
+ }), k3 = ["data-open"], b3 = ["data-open"], v3 = ["data-open"], $0 = /* @__PURE__ */ E({
9351
9522
  __name: "RSidebar",
9352
9523
  props: {
9353
9524
  modelValue: { type: Boolean, default: !1 },
@@ -9359,33 +9530,33 @@ const Q5 = ["aria-disabled"], G5 = ["innerHTML"], $5 = ["id"], U5 = /* @__PURE__
9359
9530
  emits: ["update:modelValue"],
9360
9531
  setup(H, { emit: V }) {
9361
9532
  const C = H, M = V;
9362
- return (i, L) => (t(), r("div", {
9363
- class: p(["r-sidebar__wrapper", [i.$props.wrapperClass]]),
9533
+ return (i, L) => (l(), n("div", {
9534
+ class: g(["r-sidebar__wrapper", [i.$props.wrapperClass]]),
9364
9535
  "data-open": C.modelValue
9365
9536
  }, [
9366
- Z("aside", {
9367
- class: p(["r-sidebar", [C.class]]),
9537
+ S("aside", {
9538
+ class: g(["r-sidebar", [C.class]]),
9368
9539
  "data-open": C.modelValue
9369
9540
  }, [
9370
- h(i.$slots, "default", {
9541
+ b(i.$slots, "default", {
9371
9542
  open: C.modelValue
9372
9543
  })
9373
- ], 10, c3),
9374
- C.showTrigger ? (t(), r("div", {
9544
+ ], 10, b3),
9545
+ C.showTrigger ? (l(), n("div", {
9375
9546
  key: 0,
9376
- class: p(["r-sidebar__trigger", [C.triggerClass]]),
9547
+ class: g(["r-sidebar__trigger", [C.triggerClass]]),
9377
9548
  "data-open": C.modelValue,
9378
9549
  onClick: L[0] || (L[0] = (A) => M("update:modelValue", !C.modelValue))
9379
9550
  }, [
9380
- h(i.$slots, "trigger", {
9551
+ b(i.$slots, "trigger", {
9381
9552
  open: C.modelValue
9382
9553
  }, () => [
9383
- S1(" > ")
9554
+ d1(" > ")
9384
9555
  ])
9385
- ], 10, p3)) : O("", !0)
9386
- ], 10, s3));
9556
+ ], 10, v3)) : p("", !0)
9557
+ ], 10, k3));
9387
9558
  }
9388
- }), O3 = { class: "r-snackbar__text" }, g0 = /* @__PURE__ */ R({
9559
+ }), B3 = { class: "r-snackbar__text" }, Q0 = /* @__PURE__ */ E({
9389
9560
  __name: "RSnackbar",
9390
9561
  props: {
9391
9562
  modelValue: { type: Boolean, default: !1 },
@@ -9399,7 +9570,7 @@ const Q5 = ["aria-disabled"], G5 = ["innerHTML"], $5 = ["id"], U5 = /* @__PURE__
9399
9570
  emits: ["action", "update:modelValue"],
9400
9571
  setup(H, { emit: V }) {
9401
9572
  const C = H, M = V;
9402
- I(
9573
+ N(
9403
9574
  () => C.modelValue,
9404
9575
  () => {
9405
9576
  C.timeout > 0 && C.modelValue && setTimeout(() => {
@@ -9410,137 +9581,182 @@ const Q5 = ["aria-disabled"], G5 = ["innerHTML"], $5 = ["id"], U5 = /* @__PURE__
9410
9581
  immediate: !0
9411
9582
  }
9412
9583
  );
9413
- const i = f(() => ({
9584
+ const i = O(() => ({
9414
9585
  "r-snackbar": !0,
9415
9586
  [`r-snackbar--${C.variant}`]: !0,
9416
9587
  [C.left ? "r-snackbar__left" : "r-snackbar__right"]: !0,
9417
9588
  [C.modelValue ? "r-snackbar--shown" : "r-snackbar--hidden"]: !0,
9418
9589
  [C.top ? "r-snackbar__top" : "r-snackbar__bottom"]: !0,
9419
9590
  "r-snackbar--closable": C.closable
9420
- })), L = f(() => ({
9591
+ })), L = O(() => ({
9421
9592
  success: "mdiCheckCircle",
9422
9593
  error: "mdiAlertCircle",
9423
9594
  warning: "mdiAlert",
9424
9595
  info: "mdiInformation"
9425
9596
  })[C.variant || "info"]);
9426
- return (A, e) => (t(), r("div", {
9427
- class: p(i.value)
9597
+ return (A, d) => (l(), n("div", {
9598
+ class: g(i.value)
9428
9599
  }, [
9429
- h(A.$slots, "icon", {}, () => [
9430
- C.variant ? (t(), _(D, {
9600
+ b(A.$slots, "icon", {}, () => [
9601
+ C.variant ? (l(), x(D, {
9431
9602
  key: 0,
9432
9603
  class: "r-snackbar__icon",
9433
9604
  name: L.value
9434
- }, null, 8, ["name"])) : O("", !0)
9605
+ }, null, 8, ["name"])) : p("", !0)
9435
9606
  ]),
9436
- Z("div", O3, [
9437
- h(A.$slots, "default", {}, () => [
9438
- S1(b(C.text), 1)
9607
+ S("div", B3, [
9608
+ b(A.$slots, "default", {}, () => [
9609
+ d1(w(C.text), 1)
9439
9610
  ])
9440
9611
  ]),
9441
- C.closable ? (t(), r("div", {
9612
+ C.closable ? (l(), n("div", {
9442
9613
  key: 0,
9443
9614
  class: "r-snackbar__close",
9444
- onClick: e[0] || (e[0] = t1((d) => A.$emit("update:modelValue", !1), ["stop"]))
9615
+ onClick: d[0] || (d[0] = o1((e) => A.$emit("update:modelValue", !1), ["stop"]))
9445
9616
  }, [
9446
- h(A.$slots, "close", {}, () => [
9447
- q(D, {
9617
+ b(A.$slots, "close", {}, () => [
9618
+ J(D, {
9448
9619
  name: "mdiClose",
9449
9620
  size: 16
9450
9621
  })
9451
9622
  ])
9452
- ])) : O("", !0)
9623
+ ])) : p("", !0)
9453
9624
  ], 2));
9454
9625
  }
9455
- }), f3 = ["id", "checked", "disabled", "name"], h3 = /* @__PURE__ */ Z("span", { class: "slider round" }, null, -1), g3 = ["id", "for"], k3 = {
9626
+ }), y3 = ["id", "aria-checked", "aria-controls", "aria-describedby", "aria-disabled", "aria-expanded", "aria-invalid", "aria-label", "aria-pressed", "aria-required", "checked", "disabled", "name", "required"], w3 = {
9627
+ "aria-hidden": "true",
9628
+ class: "slider round"
9629
+ }, P3 = {
9456
9630
  key: 0,
9457
- class: "r-switch-texts__details"
9458
- }, B3 = {
9631
+ class: "sr-only"
9632
+ }, T3 = ["id", "for"], F3 = {
9459
9633
  key: 0,
9460
- class: "r-switch-texts__error"
9461
- }, b3 = {
9462
- key: 1,
9463
- class: "r-switch-texts__hint"
9464
- }, k0 = /* @__PURE__ */ R({
9634
+ class: "sr-only"
9635
+ }, R3 = {
9636
+ key: 0,
9637
+ class: "r-switch-texts__details"
9638
+ }, x3 = ["id"], D3 = ["id"], G0 = /* @__PURE__ */ E({
9465
9639
  __name: "RSwitch",
9466
9640
  props: {
9467
9641
  id: { default: "switch" },
9468
- modelValue: { default: !1 },
9642
+ modelValue: { type: Boolean, default: !1 },
9469
9643
  disabled: { default: !1 },
9470
9644
  label: { default: "" },
9471
9645
  hint: { default: "" },
9472
9646
  errorMsg: { default: "" },
9473
9647
  size: { default: "medium" },
9474
- hideDetails: { type: Boolean },
9648
+ hideDetails: { type: Boolean, default: !1 },
9475
9649
  reverse: { type: Boolean },
9476
- name: {}
9650
+ name: {},
9651
+ required: { type: Boolean, default: !1 },
9652
+ ariaLabel: { default: "" },
9653
+ onText: { default: "" },
9654
+ offText: { default: "" },
9655
+ ariaControls: { default: "" },
9656
+ ariaExpanded: { type: Boolean, default: void 0 },
9657
+ usePressedState: { type: Boolean, default: !1 }
9477
9658
  },
9478
9659
  emits: ["update:modelValue"],
9479
9660
  setup(H, { emit: V }) {
9480
- const C = H, M = V, i = E({
9481
- checked: !1
9482
- }), L = f(() => ({
9661
+ const C = H, M = V, i = R(!1), L = O(() => ({
9483
9662
  "r-switch": !0,
9484
9663
  "r-switch--disabled": C.disabled,
9485
9664
  [`r-switch--${C.size}`]: C.size,
9486
9665
  "r-switch--error": C.errorMsg
9487
9666
  }));
9488
9667
  function A(e) {
9489
- C.disabled || (i.value.checked = e.target.checked, M("update:modelValue", i.value.checked));
9668
+ if (C.disabled)
9669
+ return;
9670
+ const o = e.target;
9671
+ i.value = o.checked, M("update:modelValue", o.checked);
9672
+ }
9673
+ function d(e) {
9674
+ if (!C.disabled) {
9675
+ if (e.key === " " || e.key === "Enter")
9676
+ e.preventDefault(), i.value = !i.value, M("update:modelValue", i.value);
9677
+ else if (e.key === "Tab")
9678
+ return !0;
9679
+ }
9490
9680
  }
9491
- return I(
9681
+ return N(
9492
9682
  () => C.modelValue,
9493
9683
  (e) => {
9494
- i.value.checked = e;
9684
+ i.value = e ?? !1;
9495
9685
  },
9496
9686
  {
9497
- // need immediate to set the state on first render for storybook
9498
- // TODO: find a better way to do this
9499
- immediate: !0
9687
+ immediate: !0,
9688
+ flush: "sync"
9689
+ // Ensure immediate updates for testing
9500
9690
  }
9501
- ), (e, d) => (t(), r("div", {
9502
- class: p(["r-switch-container", {
9503
- "r-switch-container--reverse": C.reverse,
9504
- "r-switch-container--hide-details": C.hideDetails
9691
+ ), (e, o) => (l(), n("div", {
9692
+ class: g(["r-switch-container", {
9693
+ "r-switch-container--reverse": e.reverse,
9694
+ "r-switch-container--hide-details": e.hideDetails
9505
9695
  }])
9506
9696
  }, [
9507
- Z("div", {
9508
- class: p(L.value)
9697
+ S("div", {
9698
+ class: g(L.value)
9509
9699
  }, [
9510
- Z("input", {
9511
- id: C.id,
9512
- checked: i.value.checked,
9700
+ S("input", {
9701
+ id: e.id,
9702
+ "aria-checked": e.usePressedState ? void 0 : i.value ? "true" : "false",
9703
+ "aria-controls": e.ariaControls,
9704
+ "aria-describedby": e.errorMsg ? `${e.id}-error` : e.hint ? `${e.id}-hint` : void 0,
9705
+ "aria-disabled": e.disabled ? "true" : void 0,
9706
+ "aria-expanded": e.ariaExpanded,
9707
+ "aria-invalid": e.errorMsg ? "true" : void 0,
9708
+ "aria-label": e.ariaLabel || e.label,
9709
+ "aria-pressed": e.usePressedState ? i.value ? "true" : "false" : void 0,
9710
+ "aria-required": e.required ? "true" : void 0,
9711
+ checked: i.value,
9513
9712
  class: "r-switch__input",
9514
- disabled: C.disabled,
9515
- name: C.name,
9713
+ disabled: e.disabled,
9714
+ name: e.name,
9715
+ required: e.required,
9716
+ role: "switch",
9516
9717
  type: "checkbox",
9517
- onChange: A
9518
- }, null, 40, f3),
9519
- h3
9718
+ onChange: A,
9719
+ onKeydown: d
9720
+ }, null, 40, y3),
9721
+ S("span", w3, [
9722
+ e.onText || e.offText ? (l(), n("span", P3, w(i.value ? e.onText : e.offText), 1)) : p("", !0)
9723
+ ])
9520
9724
  ], 2),
9521
- Z("div", {
9522
- class: p(["r-switch-texts", {
9523
- [`r-switch-texts--${C.size}`]: !0
9725
+ S("div", {
9726
+ class: g(["r-switch-texts", {
9727
+ [`r-switch-texts--${e.size}`]: !0
9524
9728
  }])
9525
9729
  }, [
9526
- Z("label", {
9527
- id: `${C.id}-label`,
9730
+ S("label", {
9731
+ id: `${e.id}-label`,
9528
9732
  class: "r-switch-texts__label",
9529
- for: C.id
9530
- }, b(C.label), 9, g3),
9531
- C.hideDetails ? O("", !0) : (t(), r("div", k3, [
9532
- C.errorMsg ? (t(), r("p", B3, b(C.errorMsg), 1)) : (t(), r("p", b3, b(C.hint), 1))
9533
- ]))
9733
+ for: e.id
9734
+ }, [
9735
+ e.required ? (l(), n("span", F3, "Required -")) : p("", !0),
9736
+ d1(" " + w(e.label), 1)
9737
+ ], 8, T3),
9738
+ !e.hideDetails && (e.errorMsg || e.hint) ? (l(), n("div", R3, [
9739
+ e.errorMsg ? (l(), n("p", {
9740
+ key: 0,
9741
+ id: `${e.id}-error`,
9742
+ class: "r-switch-texts__error",
9743
+ role: "alert"
9744
+ }, w(e.errorMsg), 9, x3)) : e.hint ? (l(), n("p", {
9745
+ key: 1,
9746
+ id: `${e.id}-hint`,
9747
+ class: "r-switch-texts__hint"
9748
+ }, w(e.hint), 9, D3)) : p("", !0)
9749
+ ])) : p("", !0)
9534
9750
  ], 2)
9535
9751
  ], 2));
9536
9752
  }
9537
9753
  });
9538
- var a1 = /* @__PURE__ */ ((H) => (H.DEFAULT = "default", H.TEXT = "text", H.ICON = "icon", H))(a1 || {});
9539
- const w3 = ["aria-disabled", "aria-selected", "disabled"], v3 = { key: 0 }, y3 = /* @__PURE__ */ R({
9754
+ var c1 = /* @__PURE__ */ ((H) => (H.DEFAULT = "default", H.TEXT = "text", H.ICON = "icon", H))(c1 || {});
9755
+ const E3 = ["aria-disabled", "aria-selected", "disabled"], _3 = { key: 0 }, W3 = /* @__PURE__ */ E({
9540
9756
  __name: "RTabItem",
9541
9757
  props: {
9542
9758
  id: {},
9543
- variant: { default: a1.DEFAULT },
9759
+ variant: { default: c1.DEFAULT },
9544
9760
  label: { default: "" },
9545
9761
  prependIcon: { default: "" },
9546
9762
  appendIcon: { default: "" },
@@ -9552,57 +9768,57 @@ const w3 = ["aria-disabled", "aria-selected", "disabled"], v3 = { key: 0 }, y3 =
9552
9768
  },
9553
9769
  emits: ["update:modelValue"],
9554
9770
  setup(H, { emit: V }) {
9555
- const C = H, M = V, i = f(() => ({
9771
+ const C = H, M = V, i = O(() => ({
9556
9772
  "r-tab-item": !0,
9557
9773
  [`r-tab-item--${C.variant}`]: !0,
9558
9774
  "r-tab-item--tile": C.tile,
9559
9775
  "r-tab-item--block": C.block
9560
- })), L = f(() => ({
9776
+ })), L = O(() => ({
9561
9777
  color: C.color
9562
- })), A = f(() => C.modelValue === C.id);
9563
- function e(d) {
9564
- M("update:modelValue", d);
9778
+ })), A = O(() => C.modelValue === C.id);
9779
+ function d(e) {
9780
+ M("update:modelValue", e);
9565
9781
  }
9566
- return (d, m) => (t(), r("button", {
9782
+ return (e, o) => (l(), n("button", {
9567
9783
  "aria-disabled": C.disabled,
9568
9784
  "aria-selected": A.value,
9569
- class: p(i.value),
9785
+ class: g(i.value),
9570
9786
  disabled: C.disabled,
9571
- style: Q1(L.value),
9572
- onClick: m[0] || (m[0] = t1((n) => e(C.id), ["stop"]))
9787
+ style: X1(L.value),
9788
+ onClick: o[0] || (o[0] = o1((a) => d(C.id), ["stop"]))
9573
9789
  }, [
9574
- h(d.$slots, "prepend", {
9790
+ b(e.$slots, "prepend", {
9575
9791
  active: A.value,
9576
9792
  disabled: C.disabled
9577
9793
  }, () => [
9578
- C.variant !== J(a1).TEXT && C.prependIcon ? (t(), _(D, {
9794
+ C.variant !== L1(c1).TEXT && C.prependIcon ? (l(), x(D, {
9579
9795
  key: 0,
9580
9796
  class: "r-tab-item__prepend-icon",
9581
9797
  name: C.prependIcon,
9582
9798
  size: 16
9583
- }, null, 8, ["name"])) : O("", !0)
9799
+ }, null, 8, ["name"])) : p("", !0)
9584
9800
  ]),
9585
- C.variant !== J(a1).ICON ? (t(), r("span", v3, [
9586
- h(d.$slots, "default", {
9801
+ C.variant !== L1(c1).ICON ? (l(), n("span", _3, [
9802
+ b(e.$slots, "default", {
9587
9803
  label: C.label
9588
9804
  }, () => [
9589
- S1(b(C.label), 1)
9805
+ d1(w(C.label), 1)
9590
9806
  ])
9591
- ])) : O("", !0),
9592
- h(d.$slots, "append", {
9807
+ ])) : p("", !0),
9808
+ b(e.$slots, "append", {
9593
9809
  active: A.value,
9594
9810
  disabled: C.disabled
9595
9811
  }, () => [
9596
- C.variant !== J(a1).TEXT && C.appendIcon ? (t(), _(D, {
9812
+ C.variant !== L1(c1).TEXT && C.appendIcon ? (l(), x(D, {
9597
9813
  key: 0,
9598
9814
  class: "r-tab-item__append-icon",
9599
9815
  name: C.appendIcon,
9600
9816
  size: 16
9601
- }, null, 8, ["name"])) : O("", !0)
9817
+ }, null, 8, ["name"])) : p("", !0)
9602
9818
  ])
9603
- ], 14, w3));
9819
+ ], 14, E3));
9604
9820
  }
9605
- }), B0 = /* @__PURE__ */ R({
9821
+ }), U0 = /* @__PURE__ */ E({
9606
9822
  __name: "RTabs",
9607
9823
  props: {
9608
9824
  tabs: { default: () => [] },
@@ -9613,16 +9829,16 @@ const w3 = ["aria-disabled", "aria-selected", "disabled"], v3 = { key: 0 }, y3 =
9613
9829
  },
9614
9830
  emits: ["update:modelValue"],
9615
9831
  setup(H, { emit: V }) {
9616
- const C = H, M = V, i = E(C.modelValue || C.tabs[0].id), L = f(() => ({
9832
+ const C = H, M = V, i = R(C.modelValue || C.tabs[0].id), L = O(() => ({
9617
9833
  "r-tabs": !0,
9618
9834
  "r-tabs--tile": C.tile
9619
9835
  }));
9620
- return I(
9836
+ return N(
9621
9837
  () => i.value,
9622
9838
  () => {
9623
9839
  M("update:modelValue", i.value);
9624
9840
  }
9625
- ), I(
9841
+ ), N(
9626
9842
  () => C.modelValue,
9627
9843
  () => {
9628
9844
  i.value = C.modelValue;
@@ -9630,106 +9846,139 @@ const w3 = ["aria-disabled", "aria-selected", "disabled"], v3 = { key: 0 }, y3 =
9630
9846
  {
9631
9847
  immediate: !0
9632
9848
  }
9633
- ), (A, e) => (t(), r("div", {
9634
- class: p(L.value)
9849
+ ), (A, d) => (l(), n("div", {
9850
+ class: g(L.value)
9635
9851
  }, [
9636
- Z("div", {
9637
- class: p(["flex", [{
9852
+ S("div", {
9853
+ class: g(["flex", [{
9638
9854
  "w-full": C.block,
9639
9855
  "overflow-x-auto": C.scrollable,
9640
9856
  "gap-0.5": C.tile
9641
9857
  }]])
9642
9858
  }, [
9643
- h(A.$slots, "default", { activeTab: i.value }, () => [
9644
- (t(!0), r(H1, null, d1(C.tabs, (d, m) => (t(), _(y3, {
9645
- id: d.id,
9646
- key: m,
9859
+ b(A.$slots, "default", { activeTab: i.value }, () => [
9860
+ (l(!0), n(i1, null, r1(C.tabs, (e, o) => (l(), x(W3, {
9861
+ id: e.id,
9862
+ key: o,
9647
9863
  modelValue: i.value,
9648
- "onUpdate:modelValue": e[0] || (e[0] = (n) => i.value = n),
9649
- active: m === i.value,
9650
- "append-icon": d.appendIcon,
9864
+ "onUpdate:modelValue": d[0] || (d[0] = (a) => i.value = a),
9865
+ active: o === i.value,
9866
+ "append-icon": e.appendIcon,
9651
9867
  block: A.block,
9652
- disabled: d.disabled,
9653
- label: d.label,
9654
- "prepend-icon": d.prependIcon,
9868
+ disabled: e.disabled,
9869
+ label: e.label,
9870
+ "prepend-icon": e.prependIcon,
9655
9871
  tile: A.tile,
9656
- variant: d.variant
9872
+ variant: e.variant
9657
9873
  }, null, 8, ["id", "modelValue", "active", "append-icon", "block", "disabled", "label", "prepend-icon", "tile", "variant"]))), 128))
9658
9874
  ])
9659
9875
  ], 2)
9660
9876
  ], 2));
9661
9877
  }
9662
- }), P3 = { class: "r-textarea-wrapper" }, T3 = ["id", "disabled", "placeholder", "value"], F3 = {
9878
+ }), N3 = { class: "r-textarea-wrapper" }, I3 = { class: "r-textarea-container" }, $3 = ["id", "aria-describedby", "aria-disabled", "aria-invalid", "aria-label", "aria-readonly", "aria-required", "disabled", "maxlength", "minlength", "name", "placeholder", "readonly", "required", "rows"], Q3 = {
9663
9879
  key: 1,
9664
9880
  class: "r-textarea__details"
9665
- }, R3 = {
9666
- key: 0,
9667
- class: "r-textarea__error"
9668
- }, x3 = {
9669
- key: 1,
9670
- class: "r-textarea__hint"
9671
- }, b0 = /* @__PURE__ */ R({
9881
+ }, G3 = ["id"], U3 = ["id"], z0 = /* @__PURE__ */ E({
9672
9882
  __name: "RTextArea",
9673
9883
  props: {
9674
9884
  id: { default: "" },
9675
9885
  modelValue: { default: "" },
9676
9886
  label: { default: "" },
9677
9887
  placeholder: { default: "" },
9678
- disabled: { default: !1 },
9679
- hint: { default: "" },
9680
9888
  errorMsg: { default: "" },
9681
- hideDetails: { type: Boolean }
9889
+ hint: { default: "" },
9890
+ disabled: { type: Boolean, default: !1 },
9891
+ readonly: { type: Boolean, default: !1 },
9892
+ required: { type: Boolean, default: !1 },
9893
+ name: { default: "" },
9894
+ maxLength: {},
9895
+ minLength: {},
9896
+ rows: { default: 3 },
9897
+ autoResize: { type: Boolean, default: !1 },
9898
+ hideDetails: { type: Boolean, default: !1 },
9899
+ ariaLabel: { default: "" }
9682
9900
  },
9683
- emits: ["update:modelValue"],
9901
+ emits: ["update:modelValue", "input", "focus", "blur"],
9684
9902
  setup(H, { emit: V }) {
9685
- const C = H, M = V, i = y1({
9686
- value: ""
9687
- });
9688
- function L(A) {
9689
- M("update:modelValue", A.target.value);
9903
+ const C = H, M = V, i = R(), L = R(!1), A = R(C.modelValue), d = O(() => !!C.errorMsg), e = O(() => ({
9904
+ "r-textarea": !0,
9905
+ "r-textarea--focused": L.value,
9906
+ "r-textarea--disabled": C.disabled,
9907
+ "r-textarea--readonly": C.readonly,
9908
+ "r-textarea--error": d.value,
9909
+ "r-textarea--auto-resize": C.autoResize
9910
+ }));
9911
+ function o(t) {
9912
+ const u = t.target;
9913
+ A.value = u.value, M("input", t), C.autoResize && r();
9690
9914
  }
9691
- return I(
9692
- () => C.modelValue,
9693
- (A) => {
9694
- i.value = A;
9695
- },
9696
- {
9697
- immediate: !0
9698
- }
9699
- ), (A, e) => (t(), r("div", P3, [
9700
- C.label ? (t(), _(c2, {
9915
+ function a(t) {
9916
+ L.value = !0, M("focus", t);
9917
+ }
9918
+ function Z(t) {
9919
+ L.value = !1, M("blur", t);
9920
+ }
9921
+ function r() {
9922
+ i.value && (i.value.style.height = "auto", i.value.style.height = `${i.value.scrollHeight}px`);
9923
+ }
9924
+ return N(() => C.modelValue, (t) => {
9925
+ A.value = t, C.autoResize && r();
9926
+ }), N(() => A.value, (t) => {
9927
+ M("update:modelValue", t);
9928
+ }), (t, u) => (l(), n("div", N3, [
9929
+ t.label ? (l(), x(b2, {
9701
9930
  key: 0,
9702
9931
  id: `${C.id}-label`,
9703
9932
  class: "r-textarea__label",
9704
- for: "textarea",
9705
- text: C.label
9706
- }, null, 8, ["id", "text"])) : O("", !0),
9707
- Z("textarea", I1(A.$attrs, {
9708
- id: C.id,
9709
- class: ["r-textarea", {
9710
- "r-textarea--error": C.errorMsg,
9711
- "r-textarea--disabled": C.disabled
9712
- }],
9713
- disabled: C.disabled,
9714
- placeholder: C.placeholder,
9715
- value: i.value,
9716
- onInput: L
9717
- }), null, 16, T3),
9718
- C.hideDetails ? O("", !0) : (t(), r("div", F3, [
9719
- C.errorMsg ? (t(), r("p", R3, b(C.errorMsg), 1)) : (t(), r("p", x3, b(C.hint), 1))
9720
- ]))
9933
+ for: C.id,
9934
+ text: t.label
9935
+ }, null, 8, ["id", "for", "text"])) : p("", !0),
9936
+ S("div", I3, [
9937
+ l2(S("textarea", {
9938
+ id: C.id,
9939
+ ref_key: "textareaRef",
9940
+ ref: i,
9941
+ "onUpdate:modelValue": u[0] || (u[0] = (k) => A.value = k),
9942
+ "aria-describedby": d.value ? `${C.id}-error` : t.hint ? `${C.id}-hint` : void 0,
9943
+ "aria-disabled": t.disabled,
9944
+ "aria-invalid": d.value,
9945
+ "aria-label": t.ariaLabel || t.label,
9946
+ "aria-readonly": t.readonly,
9947
+ "aria-required": t.required,
9948
+ class: g(e.value),
9949
+ disabled: t.disabled,
9950
+ maxlength: t.maxLength,
9951
+ minlength: t.minLength,
9952
+ name: t.name,
9953
+ placeholder: t.placeholder,
9954
+ readonly: t.readonly,
9955
+ required: t.required,
9956
+ rows: t.rows,
9957
+ onBlur: Z,
9958
+ onFocus: a,
9959
+ onInput: o
9960
+ }, null, 42, $3), [
9961
+ [o2, A.value]
9962
+ ])
9963
+ ]),
9964
+ !t.hideDetails && (t.errorMsg || t.hint) ? (l(), n("div", Q3, [
9965
+ t.errorMsg ? (l(), n("p", {
9966
+ key: 0,
9967
+ id: `${C.id}-error`,
9968
+ class: "r-textarea__error",
9969
+ role: "alert"
9970
+ }, w(t.errorMsg), 9, G3)) : t.hint ? (l(), n("p", {
9971
+ key: 1,
9972
+ id: `${C.id}-hint`,
9973
+ class: "r-textarea__hint"
9974
+ }, w(t.hint), 9, U3)) : p("", !0)
9975
+ ])) : p("", !0)
9721
9976
  ]));
9722
9977
  }
9723
- }), D3 = { class: "r-textfield__wrapper" }, _3 = { class: "input-wrapper" }, E3 = ["id", "disabled", "max", "min", "placeholder", "readonly", "role", "type", "value"], W3 = {
9978
+ }), z3 = { class: "r-textfield__wrapper" }, K3 = { class: "input-wrapper" }, q3 = ["id", "aria-describedby", "aria-disabled", "aria-invalid", "aria-label", "aria-readonly", "aria-required", "disabled", "max", "min", "name", "placeholder", "readonly", "required", "type", "value"], j3 = {
9724
9979
  key: 0,
9725
9980
  class: "r-textfield__details"
9726
- }, N3 = {
9727
- key: 0,
9728
- class: "r-textfield__error"
9729
- }, I3 = {
9730
- key: 1,
9731
- class: "r-textfield__hint"
9732
- }, w0 = /* @__PURE__ */ R({
9981
+ }, X3 = ["id"], Y3 = ["id"], K0 = /* @__PURE__ */ E({
9733
9982
  __name: "RTextfield",
9734
9983
  props: {
9735
9984
  id: { default: "" },
@@ -9748,7 +9997,11 @@ const w3 = ["aria-disabled", "aria-selected", "disabled"], v3 = { key: 0 }, y3 =
9748
9997
  max: {},
9749
9998
  hideDetails: { type: Boolean, default: !1 },
9750
9999
  role: { default: "" },
9751
- readonly: { type: Boolean, default: !1 }
10000
+ readonly: { type: Boolean, default: !1 },
10001
+ ariaLabel: { default: "" },
10002
+ required: { type: Boolean, default: !1 },
10003
+ autocomplete: { default: "off" },
10004
+ name: { default: "" }
9752
10005
  },
9753
10006
  emits: [
9754
10007
  "update:modelValue",
@@ -9759,160 +10012,182 @@ const w3 = ["aria-disabled", "aria-selected", "disabled"], v3 = { key: 0 }, y3 =
9759
10012
  "click:clear"
9760
10013
  ],
9761
10014
  setup(H, { emit: V }) {
9762
- const C = H, M = V, i = E(), L = y1({
10015
+ const C = H, M = V, i = R(), L = q1({
9763
10016
  value: ""
9764
- }), A = E(C.type), e = {
10017
+ }), A = R(C.type), d = {
9765
10018
  password: "mdiLock",
9766
10019
  email: "mdiEmailOutline",
9767
10020
  tel: "mdiPhone",
9768
10021
  url: "mdiLink",
9769
10022
  number: "mdiNumeric",
9770
10023
  text: ""
9771
- }, d = E(!1), m = f(() => !!L.value), n = f(() => L.value.length > 0), a = f(() => {
9772
- var g;
9773
- return (g = C.errorMsg) == null ? void 0 : g.length;
9774
- }), o = f(() => C.clearable && n.value), l = f(() => {
9775
- const { disabled: g, loading: N } = C;
10024
+ }, e = R(!1), o = O(() => !!L.value), a = O(() => L.value.length > 0), Z = O(() => !!C.errorMsg), r = O(() => C.clearable && a.value), t = O(() => {
10025
+ const { disabled: c, loading: $ } = C;
9776
10026
  return {
9777
10027
  "r-textfield": !0,
9778
- "r-textfield--error": a.value,
9779
- "r-textfield--loading": N,
9780
- "r-textfield--disabled": g,
9781
- "r-textfield--clearable": o.value,
9782
- "r-textfield--focus": d.value,
9783
- "r-textfield--filled": m.value
10028
+ "r-textfield--error": Z.value,
10029
+ "r-textfield--loading": $,
10030
+ "r-textfield--disabled": c,
10031
+ "r-textfield--clearable": r.value,
10032
+ "r-textfield--focus": e.value,
10033
+ "r-textfield--filled": o.value
9784
10034
  };
9785
- }), S = f(() => ({
10035
+ }), u = O(() => ({
9786
10036
  "r-textfield__prepend-icon": !0,
9787
10037
  "r-textfield__prepend-icon--loading": C.loading,
9788
- "r-textfield__prepend-icon--error": a.value && m.value
9789
- })), B = f(() => ({
10038
+ "r-textfield__prepend-icon--error": Z.value && o.value
10039
+ })), k = O(() => ({
9790
10040
  "r-textfield__append-icon": !0,
9791
- "r-textfield__append-icon--clear": o.value,
9792
- "r-textfield__append-icon--error": a.value
9793
- })), y = f(() => {
9794
- const { prependIcon: g, type: N } = C;
9795
- return g === "none" ? "" : g || e[N];
9796
- }), k = f(() => {
9797
- const { appendIcon: g, type: N } = C;
9798
- return g === "none" ? "" : a.value ? "mdiAlertCircleOutline" : o.value && ["text", "email"].includes(N) ? "mdiClose" : N === "password" && A.value === "password" ? "mdiEyeOutline" : N === "password" && A.value === "text" ? "mdiEyeOffOutline" : g;
10041
+ "r-textfield__append-icon--clear": r.value,
10042
+ "r-textfield__append-icon--error": Z.value
10043
+ })), P = O(() => {
10044
+ const { prependIcon: c, type: $ } = C;
10045
+ return c === "none" ? "" : c || d[$];
10046
+ }), v = O(() => {
10047
+ const { appendIcon: c, type: $ } = C;
10048
+ return c === "none" ? "" : Z.value ? "mdiAlertCircleOutline" : r.value && ["text", "email"].includes($) ? "mdiClose" : $ === "password" && A.value === "password" ? "mdiEyeOutline" : $ === "password" && A.value === "text" ? "mdiEyeOffOutline" : c;
9799
10049
  });
9800
- function w(g) {
9801
- d.value = !0, M("focus", g);
10050
+ function y(c) {
10051
+ e.value = !0, M("focus", c);
9802
10052
  }
9803
- function T(g) {
9804
- d.value = !1, M("blur", g);
10053
+ function T(c) {
10054
+ e.value = !1, M("blur", c);
9805
10055
  }
9806
- function F(g) {
9807
- L.value = g.target.value, M("input", g);
10056
+ function s(c) {
10057
+ L.value = c.target.value, M("input", c);
9808
10058
  }
9809
- function P() {
9810
- var g;
9811
- if (o.value) {
9812
- L.value = "", (g = i.value) == null || g.focus(), M("click:clear", {
10059
+ function B() {
10060
+ var c;
10061
+ if (r.value) {
10062
+ L.value = "", (c = i.value) == null || c.focus(), M("click:clear", {
9813
10063
  value: A.value === "number" ? +L.value : L.value
9814
10064
  });
9815
10065
  return;
9816
10066
  }
9817
10067
  M("click:icon", {
9818
10068
  value: A.value === "number" ? +L.value : L.value
9819
- }), C.type === "password" && U();
10069
+ }), C.type === "password" && I();
9820
10070
  }
9821
- function U() {
10071
+ function I() {
9822
10072
  A.value = A.value === "password" ? "text" : "password";
9823
10073
  }
9824
- function W() {
9825
- var g;
9826
- (g = i.value) == null || g.focus();
10074
+ function F() {
10075
+ var c;
10076
+ (c = i.value) == null || c.focus();
9827
10077
  }
9828
- return I(
10078
+ return N(
10079
+ () => C.type,
10080
+ (c) => {
10081
+ A.value = c;
10082
+ },
10083
+ {
10084
+ immediate: !0
10085
+ }
10086
+ ), N(
9829
10087
  () => C.modelValue,
9830
- (g) => {
9831
- L.value = g;
10088
+ (c) => {
10089
+ L.value = c;
9832
10090
  },
9833
10091
  {
9834
10092
  immediate: !0
9835
10093
  }
9836
- ), I(
10094
+ ), N(
9837
10095
  () => L.value,
9838
- (g) => {
10096
+ (c) => {
9839
10097
  M(
9840
10098
  "update:modelValue",
9841
- A.value === "number" ? +g : g
10099
+ A.value === "number" ? +c : c
9842
10100
  );
9843
10101
  }
9844
- ), (g, N) => (t(), r("div", D3, [
9845
- C.label ? (t(), _(c2, {
10102
+ ), (c, $) => (l(), n("div", z3, [
10103
+ c.label ? (l(), x(b2, {
9846
10104
  key: 0,
9847
10105
  id: `${C.id}-label`,
9848
10106
  class: "r-textfield__label",
9849
10107
  for: C.id,
9850
- text: C.label,
9851
- onClick: W
9852
- }, null, 8, ["id", "for", "text"])) : O("", !0),
9853
- Z("div", _3, [
9854
- Z("div", {
9855
- class: p(l.value)
10108
+ text: c.label,
10109
+ onClick: F
10110
+ }, null, 8, ["id", "for", "text"])) : p("", !0),
10111
+ S("div", K3, [
10112
+ S("div", {
10113
+ class: g(t.value)
9856
10114
  }, [
9857
- h(g.$slots, "prepend", {
9858
- disabled: C.disabled,
9859
- error: a.value,
9860
- loading: C.loading
10115
+ b(c.$slots, "prepend", {
10116
+ disabled: c.disabled,
10117
+ error: Z.value,
10118
+ loading: c.loading
9861
10119
  }, () => [
9862
- y.value ? (t(), _(D, {
10120
+ P.value ? (l(), x(D, {
9863
10121
  key: 0,
9864
- class: p(S.value),
9865
- name: y.value,
10122
+ "aria-hidden": "true",
10123
+ class: g(u.value),
10124
+ name: P.value,
9866
10125
  size: 20
9867
- }, null, 8, ["class", "name"])) : O("", !0)
10126
+ }, null, 8, ["class", "name"])) : p("", !0)
9868
10127
  ]),
9869
- Z("input", {
10128
+ S("input", {
9870
10129
  id: C.id,
9871
10130
  ref_key: "inputRef",
9872
10131
  ref: i,
9873
- disabled: C.disabled,
9874
- max: C.max,
9875
- min: C.min,
9876
- placeholder: C.placeholder,
9877
- readonly: C.readonly,
9878
- role: C.role,
10132
+ "aria-describedby": Z.value ? `${C.id}-error` : c.hint ? `${C.id}-hint` : void 0,
10133
+ "aria-disabled": c.disabled,
10134
+ "aria-invalid": Z.value || void 0,
10135
+ "aria-label": c.ariaLabel || c.label,
10136
+ "aria-readonly": c.readonly,
10137
+ "aria-required": c.required,
10138
+ disabled: c.disabled,
10139
+ max: c.max,
10140
+ min: c.min,
10141
+ name: c.name,
10142
+ placeholder: c.placeholder,
10143
+ readonly: c.readonly,
10144
+ required: c.required,
9879
10145
  type: A.value,
9880
10146
  value: L.value,
9881
10147
  onBlur: T,
9882
- onFocus: w,
9883
- onInput: F
9884
- }, null, 40, E3),
9885
- h(g.$slots, "append", {
9886
- disabled: C.disabled,
9887
- error: a.value,
9888
- loading: C.loading
10148
+ onFocus: y,
10149
+ onInput: s
10150
+ }, null, 40, q3),
10151
+ b(c.$slots, "append", {
10152
+ disabled: c.disabled,
10153
+ error: Z.value,
10154
+ loading: c.loading
9889
10155
  }, () => [
9890
- g.$props.type === "password" && a.value ? (t(), _(D, {
10156
+ c.type === "password" ? (l(), x(D, {
9891
10157
  key: 0,
10158
+ "aria-hidden": "true",
9892
10159
  name: A.value === "password" ? "mdiEyeOutline" : "mdiEyeOffOutline",
9893
10160
  size: 20,
9894
- onClick: P
9895
- }, null, 8, ["name"])) : O("", !0),
9896
- k.value && !g.$slots.append || a.value ? (t(), _(D, {
10161
+ onClick: B
10162
+ }, null, 8, ["name"])) : v.value && !c.$slots.append || Z.value ? (l(), x(D, {
9897
10163
  key: 1,
9898
- class: p(B.value),
9899
- name: `${k.value}`,
10164
+ "aria-hidden": "true",
10165
+ class: g(k.value),
10166
+ name: v.value,
9900
10167
  size: 20,
9901
- onClick: P
9902
- }, null, 8, ["class", "name"])) : O("", !0)
10168
+ onClick: B
10169
+ }, null, 8, ["class", "name"])) : p("", !0)
9903
10170
  ])
9904
10171
  ], 2),
9905
- C.hideDetails ? O("", !0) : (t(), r("div", W3, [
9906
- C.errorMsg ? (t(), r("p", N3, b(C.errorMsg), 1)) : O("", !0),
9907
- !C.errorMsg && C.hint ? (t(), r("p", I3, b(C.hint), 1)) : O("", !0)
9908
- ]))
10172
+ !c.hideDetails && (c.errorMsg || c.hint) ? (l(), n("div", j3, [
10173
+ c.errorMsg ? (l(), n("p", {
10174
+ key: 0,
10175
+ id: `${C.id}-error`,
10176
+ class: "r-textfield__error",
10177
+ role: "alert"
10178
+ }, w(c.errorMsg), 9, X3)) : c.hint ? (l(), n("p", {
10179
+ key: 1,
10180
+ id: `${C.id}-hint`,
10181
+ class: "r-textfield__hint"
10182
+ }, w(c.hint), 9, Y3)) : p("", !0)
10183
+ ])) : p("", !0)
9909
10184
  ])
9910
10185
  ]));
9911
10186
  }
9912
- }), Q3 = { class: "r-breadcrumb" }, G3 = {
10187
+ }), J3 = { class: "r-breadcrumb" }, C0 = {
9913
10188
  key: 0,
9914
10189
  class: "r-breadcrumb__title"
9915
- }, v0 = /* @__PURE__ */ R({
10190
+ }, q0 = /* @__PURE__ */ E({
9916
10191
  __name: "RBreadcrumb",
9917
10192
  props: {
9918
10193
  items: { default: () => [] },
@@ -9921,69 +10196,69 @@ const w3 = ["aria-disabled", "aria-selected", "disabled"], v3 = { key: 0 }, y3 =
9921
10196
  setup(H) {
9922
10197
  const V = H;
9923
10198
  return (C, M) => {
9924
- const i = b2("router-link");
9925
- return t(), r("div", Q3, [
9926
- (t(!0), r(H1, null, d1(V.items, (L, A) => (t(), r("div", {
10199
+ const i = T2("router-link");
10200
+ return l(), n("div", J3, [
10201
+ (l(!0), n(i1, null, r1(V.items, (L, A) => (l(), n("div", {
9927
10202
  key: A,
9928
10203
  class: "r-breadcrumb__item"
9929
10204
  }, [
9930
- q(i, {
10205
+ J(i, {
9931
10206
  class: "r-breadcrumb__link",
9932
10207
  to: L.to
9933
10208
  }, {
9934
- default: k1(() => [
9935
- h(C.$slots, "item-icon", {}, () => [
9936
- L.icon ? (t(), _(D, {
10209
+ default: O1(() => [
10210
+ b(C.$slots, "item-icon", {}, () => [
10211
+ L.icon ? (l(), x(D, {
9937
10212
  key: 0,
9938
10213
  name: L.icon
9939
- }, null, 8, ["name"])) : O("", !0)
10214
+ }, null, 8, ["name"])) : p("", !0)
9940
10215
  ]),
9941
- L.onlyIcon ? O("", !0) : (t(), r("span", G3, b(L.title), 1))
10216
+ L.onlyIcon ? p("", !0) : (l(), n("span", C0, w(L.title), 1))
9942
10217
  ]),
9943
10218
  _: 2
9944
10219
  }, 1032, ["to"]),
9945
- h(C.$slots, "custom-seperator", {}, () => [
9946
- A !== C.items.length - 1 && V.seperator ? (t(), _(D, {
10220
+ b(C.$slots, "custom-seperator", {}, () => [
10221
+ A !== C.items.length - 1 && V.seperator ? (l(), x(D, {
9947
10222
  key: 0,
9948
10223
  class: "r-breadcrumb__separator",
9949
10224
  name: V.seperator
9950
- }, null, 8, ["name"])) : O("", !0)
10225
+ }, null, 8, ["name"])) : p("", !0)
9951
10226
  ])
9952
10227
  ]))), 128))
9953
10228
  ]);
9954
10229
  };
9955
10230
  }
9956
- }), $3 = { class: "r-pagination__paginator" }, U3 = { class: "r-pagination__paginator__per-page" }, z3 = { class: "r-pagination__paginator__info" }, K3 = ["disabled"], q3 = /* @__PURE__ */ Z("path", {
10231
+ }), H0 = { class: "r-pagination__paginator" }, V0 = { class: "r-pagination__paginator__per-page" }, L0 = { class: "r-pagination__paginator__info" }, M0 = ["disabled"], i0 = /* @__PURE__ */ S("path", {
9957
10232
  d: "M0 0h24v24H0z",
9958
10233
  fill: "none",
9959
10234
  stroke: "none"
9960
- }, null, -1), j3 = /* @__PURE__ */ Z("path", { d: "M7 6v12" }, null, -1), X3 = /* @__PURE__ */ Z("path", { d: "M18 6l-6 6l6 6" }, null, -1), Y3 = [
9961
- q3,
9962
- j3,
9963
- X3
9964
- ], J3 = ["disabled"], C0 = /* @__PURE__ */ Z("path", {
10235
+ }, null, -1), A0 = /* @__PURE__ */ S("path", { d: "M7 6v12" }, null, -1), e0 = /* @__PURE__ */ S("path", { d: "M18 6l-6 6l6 6" }, null, -1), d0 = [
10236
+ i0,
10237
+ A0,
10238
+ e0
10239
+ ], t0 = ["disabled"], m0 = /* @__PURE__ */ S("path", {
9965
10240
  d: "M0 0h24v24H0z",
9966
10241
  fill: "none",
9967
10242
  stroke: "none"
9968
- }, null, -1), H0 = /* @__PURE__ */ Z("path", { d: "M15 6l-6 6l6 6" }, null, -1), V0 = [
9969
- C0,
9970
- H0
9971
- ], L0 = ["disabled"], M0 = /* @__PURE__ */ Z("path", {
10243
+ }, null, -1), l0 = /* @__PURE__ */ S("path", { d: "M15 6l-6 6l6 6" }, null, -1), o0 = [
10244
+ m0,
10245
+ l0
10246
+ ], a0 = ["disabled"], r0 = /* @__PURE__ */ S("path", {
9972
10247
  d: "M0 0h24v24H0z",
9973
10248
  fill: "none",
9974
10249
  stroke: "none"
9975
- }, null, -1), i0 = /* @__PURE__ */ Z("path", { d: "M9 6l6 6l-6 6" }, null, -1), A0 = [
9976
- M0,
9977
- i0
9978
- ], e0 = ["disabled"], d0 = /* @__PURE__ */ Z("path", {
10250
+ }, null, -1), n0 = /* @__PURE__ */ S("path", { d: "M9 6l6 6l-6 6" }, null, -1), Z0 = [
10251
+ r0,
10252
+ n0
10253
+ ], u0 = ["disabled"], S0 = /* @__PURE__ */ S("path", {
9979
10254
  d: "M0 0h24v24H0z",
9980
10255
  fill: "none",
9981
10256
  stroke: "none"
9982
- }, null, -1), t0 = /* @__PURE__ */ Z("path", { d: "M6 6l6 6l-6 6" }, null, -1), m0 = /* @__PURE__ */ Z("path", { d: "M17 5v13" }, null, -1), l0 = [
9983
- d0,
9984
- t0,
9985
- m0
9986
- ], y0 = /* @__PURE__ */ R({
10257
+ }, null, -1), s0 = /* @__PURE__ */ S("path", { d: "M6 6l6 6l-6 6" }, null, -1), c0 = /* @__PURE__ */ S("path", { d: "M17 5v13" }, null, -1), p0 = [
10258
+ S0,
10259
+ s0,
10260
+ c0
10261
+ ], j0 = /* @__PURE__ */ E({
9987
10262
  __name: "RPagination",
9988
10263
  props: {
9989
10264
  page: { default: 1 },
@@ -9996,37 +10271,37 @@ const w3 = ["aria-disabled", "aria-selected", "disabled"], v3 = { key: 0 }, y3 =
9996
10271
  },
9997
10272
  emits: ["update:page", "update:perPage", "update:info"],
9998
10273
  setup(H, { emit: V }) {
9999
- const C = H, M = V, i = E(C.perPage || 10), L = f(() => Math.ceil(C.totalItems / C.perPage)), A = f(() => ({
10274
+ const C = H, M = V, i = R(C.perPage || 10), L = O(() => Math.ceil(C.totalItems / C.perPage)), A = O(() => ({
10000
10275
  start: C.page * C.perPage - C.perPage,
10001
10276
  end: C.page * C.perPage
10002
- })), e = f(() => C.infoText || `${A.value.start + 1}-${A.value.end} of ${C.totalItems}`), d = f(() => +C.page == +L.value), m = f(() => +C.page == 1);
10003
- I(() => A.value, () => {
10277
+ })), d = O(() => C.infoText || `${A.value.start + 1}-${A.value.end} of ${C.totalItems}`), e = O(() => +C.page == +L.value), o = O(() => +C.page == 1);
10278
+ N(() => A.value, () => {
10004
10279
  M("update:info", A.value);
10005
- }), I(() => C.perPage, () => {
10006
- i.value = C.perPage, n(1);
10280
+ }), N(() => C.perPage, () => {
10281
+ i.value = C.perPage, a(1);
10007
10282
  });
10008
- function n(o) {
10009
- const l = Math.ceil(o);
10010
- l < 1 || l > L.value || M("update:page", l);
10283
+ function a(r) {
10284
+ const t = Math.ceil(r);
10285
+ t < 1 || t > L.value || M("update:page", t);
10011
10286
  }
10012
- function a({ value: o }) {
10013
- if (o) {
10014
- M("update:perPage", o);
10287
+ function Z({ value: r }) {
10288
+ if (r) {
10289
+ M("update:perPage", r);
10015
10290
  return;
10016
10291
  }
10017
10292
  M("update:perPage", 10);
10018
10293
  }
10019
- return (o, l) => (t(), r("div", {
10020
- class: p(["r-pagination", [`r-pagination--${C.position}`]])
10294
+ return (r, t) => (l(), n("div", {
10295
+ class: g(["r-pagination", [`r-pagination--${C.position}`]])
10021
10296
  }, [
10022
- Z("div", $3, [
10023
- Z("div", U3, [
10024
- Z("span", null, b(C.itemsPerPageText), 1),
10025
- q(t3, {
10297
+ S("div", H0, [
10298
+ S("div", V0, [
10299
+ S("span", null, w(C.itemsPerPageText), 1),
10300
+ J(u3, {
10026
10301
  modelValue: i.value,
10027
10302
  "onUpdate:modelValue": [
10028
- l[0] || (l[0] = (S) => i.value = S),
10029
- a
10303
+ t[0] || (t[0] = (u) => i.value = u),
10304
+ Z
10030
10305
  ],
10031
10306
  class: "w-24",
10032
10307
  "hide-details": "",
@@ -10034,15 +10309,15 @@ const w3 = ["aria-disabled", "aria-selected", "disabled"], v3 = { key: 0 }, y3 =
10034
10309
  options: C.perPageOptions
10035
10310
  }, null, 8, ["modelValue", "options"])
10036
10311
  ]),
10037
- Z("span", z3, b(e.value), 1),
10038
- Z("button", {
10312
+ S("span", L0, w(d.value), 1),
10313
+ S("button", {
10039
10314
  class: "r-pagination__paginator__first",
10040
- disabled: m.value,
10041
- onClick: l[1] || (l[1] = (S) => n(1))
10315
+ disabled: o.value,
10316
+ onClick: t[1] || (t[1] = (u) => a(1))
10042
10317
  }, [
10043
- h(o.$slots, "first", {}, () => [
10044
- (t(), r("svg", {
10045
- class: p(["icon icon-tabler icon-tabler-chevron-left-pipe", { "stroke-gray-400": m.value }]),
10318
+ b(r.$slots, "first", {}, () => [
10319
+ (l(), n("svg", {
10320
+ class: g(["icon icon-tabler icon-tabler-chevron-left-pipe", { "stroke-gray-400": o.value }]),
10046
10321
  fill: "none",
10047
10322
  height: "20",
10048
10323
  stroke: "#000000",
@@ -10052,17 +10327,17 @@ const w3 = ["aria-disabled", "aria-selected", "disabled"], v3 = { key: 0 }, y3 =
10052
10327
  viewBox: "0 0 24 24",
10053
10328
  width: "20",
10054
10329
  xmlns: "http://www.w3.org/2000/svg"
10055
- }, Y3, 2))
10330
+ }, d0, 2))
10056
10331
  ])
10057
- ], 8, K3),
10058
- Z("button", {
10332
+ ], 8, M0),
10333
+ S("button", {
10059
10334
  class: "r-pagination__paginator__prev",
10060
- disabled: m.value,
10061
- onClick: l[2] || (l[2] = (S) => n(+C.page - 1))
10335
+ disabled: o.value,
10336
+ onClick: t[2] || (t[2] = (u) => a(+C.page - 1))
10062
10337
  }, [
10063
- h(o.$slots, "prev", {}, () => [
10064
- (t(), r("svg", {
10065
- class: p(["icon icon-tabler icon-tabler-chevron-left", { "stroke-gray-400": m.value }]),
10338
+ b(r.$slots, "prev", {}, () => [
10339
+ (l(), n("svg", {
10340
+ class: g(["icon icon-tabler icon-tabler-chevron-left", { "stroke-gray-400": o.value }]),
10066
10341
  fill: "none",
10067
10342
  height: "20",
10068
10343
  stroke: "#000000",
@@ -10072,17 +10347,17 @@ const w3 = ["aria-disabled", "aria-selected", "disabled"], v3 = { key: 0 }, y3 =
10072
10347
  viewBox: "0 0 24 24",
10073
10348
  width: "20",
10074
10349
  xmlns: "http://www.w3.org/2000/svg"
10075
- }, V0, 2))
10350
+ }, o0, 2))
10076
10351
  ])
10077
- ], 8, J3),
10078
- Z("button", {
10352
+ ], 8, t0),
10353
+ S("button", {
10079
10354
  class: "r-pagination__paginator__next",
10080
- disabled: d.value,
10081
- onClick: l[3] || (l[3] = (S) => n(+C.page + 1))
10355
+ disabled: e.value,
10356
+ onClick: t[3] || (t[3] = (u) => a(+C.page + 1))
10082
10357
  }, [
10083
- h(o.$slots, "next", {}, () => [
10084
- (t(), r("svg", {
10085
- class: p(["icon icon-tabler icon-tabler-chevron-right", { "stroke-gray-400": d.value }]),
10358
+ b(r.$slots, "next", {}, () => [
10359
+ (l(), n("svg", {
10360
+ class: g(["icon icon-tabler icon-tabler-chevron-right", { "stroke-gray-400": e.value }]),
10086
10361
  fill: "none",
10087
10362
  height: "20",
10088
10363
  stroke: "#000000",
@@ -10092,17 +10367,17 @@ const w3 = ["aria-disabled", "aria-selected", "disabled"], v3 = { key: 0 }, y3 =
10092
10367
  viewBox: "0 0 24 24",
10093
10368
  width: "20",
10094
10369
  xmlns: "http://www.w3.org/2000/svg"
10095
- }, A0, 2))
10370
+ }, Z0, 2))
10096
10371
  ])
10097
- ], 8, L0),
10098
- Z("button", {
10372
+ ], 8, a0),
10373
+ S("button", {
10099
10374
  class: "r-pagination__paginator__last",
10100
10375
  disabled: C.page === L.value,
10101
- onClick: l[4] || (l[4] = (S) => n(L.value))
10376
+ onClick: t[4] || (t[4] = (u) => a(L.value))
10102
10377
  }, [
10103
- h(o.$slots, "last", {}, () => [
10104
- (t(), r("svg", {
10105
- class: p(["icon icon-tabler icon-tabler-chevron-right-pipe", { "stroke-gray-400": d.value }]),
10378
+ b(r.$slots, "last", {}, () => [
10379
+ (l(), n("svg", {
10380
+ class: g(["icon icon-tabler icon-tabler-chevron-right-pipe", { "stroke-gray-400": e.value }]),
10106
10381
  fill: "none",
10107
10382
  height: "20",
10108
10383
  stroke: "#000000",
@@ -10112,13 +10387,13 @@ const w3 = ["aria-disabled", "aria-selected", "disabled"], v3 = { key: 0 }, y3 =
10112
10387
  viewBox: "0 0 24 24",
10113
10388
  width: "20",
10114
10389
  xmlns: "http://www.w3.org/2000/svg"
10115
- }, l0, 2))
10390
+ }, p0, 2))
10116
10391
  ])
10117
- ], 8, e0)
10392
+ ], 8, u0)
10118
10393
  ])
10119
10394
  ], 2));
10120
10395
  }
10121
- }), o0 = ["value"], P0 = /* @__PURE__ */ R({
10396
+ }), O0 = ["value"], X0 = /* @__PURE__ */ E({
10122
10397
  __name: "RProgressbar",
10123
10398
  props: {
10124
10399
  value: { default: 0 },
@@ -10126,16 +10401,16 @@ const w3 = ["aria-disabled", "aria-selected", "disabled"], v3 = { key: 0 }, y3 =
10126
10401
  },
10127
10402
  setup(H) {
10128
10403
  const V = H;
10129
- return (C, M) => (t(), r("progress", {
10404
+ return (C, M) => (l(), n("progress", {
10130
10405
  "aria-valuemax": 100,
10131
10406
  class: "r-progressbar",
10132
10407
  max: 100,
10133
10408
  role: "progressbar",
10134
- style: Q1({ height: `${V.height}px` }),
10409
+ style: X1({ height: `${V.height}px` }),
10135
10410
  value: V.value
10136
- }, null, 12, o0));
10411
+ }, null, 12, O0));
10137
10412
  }
10138
- }), h1 = "rocket-ui:r-item-group", T0 = /* @__PURE__ */ R({
10413
+ }), w1 = "rocket-ui:r-item-group", Y0 = /* @__PURE__ */ E({
10139
10414
  __name: "RItemGroup",
10140
10415
  props: {
10141
10416
  modelValue: { default: () => [] },
@@ -10148,141 +10423,161 @@ const w3 = ["aria-disabled", "aria-selected", "disabled"], v3 = { key: 0 }, y3 =
10148
10423
  },
10149
10424
  emits: ["update:modelValue"],
10150
10425
  setup(H, { emit: V }) {
10151
- const C = H, M = V, i = E(C.as ?? "div"), L = E(C.modelValue), A = f(() => C.selectedClass);
10152
- O1(`${h1}:selectedClass`, A.value);
10153
- function e(n) {
10154
- return L.value.includes(n);
10426
+ const C = H, M = V, i = R(C.as ?? "div"), L = R(C.modelValue), A = O(() => C.selectedClass);
10427
+ B1(`${w1}:selectedClass`, A.value);
10428
+ function d(a) {
10429
+ return L.value.includes(a);
10155
10430
  }
10156
- O1(`${h1}:isSelected`, e);
10157
- function d(n, a) {
10158
- C.disabled || C.mandatory && L.value.length === 1 && !a || C.max && L.value.length === C.max && a || (C.multiple ? a ? L.value.push(n) : L.value = L.value.filter((o) => o !== n) : L.value = n ? [n] : [], M("update:modelValue", L.value));
10431
+ B1(`${w1}:isSelected`, d);
10432
+ function e(a, Z) {
10433
+ C.disabled || C.mandatory && L.value.length === 1 && !Z || C.max && L.value.length === C.max && Z || (C.multiple ? Z ? L.value.push(a) : L.value = L.value.filter((r) => r !== a) : L.value = a ? [a] : [], M("update:modelValue", L.value));
10159
10434
  }
10160
- O1(`${h1}:select`, d);
10161
- function m() {
10435
+ B1(`${w1}:select`, e);
10436
+ function o() {
10162
10437
  return C.disabled;
10163
10438
  }
10164
- return O1(`${h1}:isDisabled`, m), I(() => C.modelValue, () => {
10439
+ return B1(`${w1}:isDisabled`, o), N(() => C.modelValue, () => {
10165
10440
  L.value = C.modelValue;
10166
- }), (n, a) => (t(), _(w2(i.value), null, {
10167
- default: k1(() => [
10168
- h(n.$slots, "default", {
10169
- isSelected: e,
10170
- select: d,
10441
+ }), (a, Z) => (l(), x(F2(i.value), null, {
10442
+ default: O1(() => [
10443
+ b(a.$slots, "default", {
10444
+ isSelected: d,
10445
+ select: e,
10171
10446
  selected: L.value
10172
10447
  })
10173
10448
  ]),
10174
10449
  _: 3
10175
10450
  }));
10176
10451
  }
10177
- }), g1 = "rocket-ui:r-item-group", F0 = /* @__PURE__ */ R({
10452
+ }), P1 = "rocket-ui:r-item-group", J0 = /* @__PURE__ */ E({
10178
10453
  __name: "RItem",
10179
10454
  props: {
10180
10455
  value: { default: null },
10181
10456
  selectedClass: { default: "" }
10182
10457
  },
10183
10458
  setup(H) {
10184
- const V = H, C = f1(`${g1}:isSelected`), M = f1(`${g1}:selectedClass`, ""), i = f1(`${g1}:select`), L = f1(`${g1}:isDisabled`), A = f(() => C(V.value) && [M, V.selectedClass]);
10185
- function e() {
10459
+ const V = H, C = y1(`${P1}:isSelected`), M = y1(`${P1}:selectedClass`, ""), i = y1(`${P1}:select`), L = y1(`${P1}:isDisabled`), A = O(() => C(V.value) && [M, V.selectedClass]);
10460
+ function d() {
10186
10461
  V.disabled || i(V.value, !C(V.value));
10187
10462
  }
10188
- function d() {
10463
+ function e() {
10189
10464
  V.disabled || i(V.value, !0);
10190
10465
  }
10191
- return (m, n) => h(m.$slots, "default", {
10192
- disabled: J(L)(V.value),
10193
- isSelected: J(C)(V.value),
10194
- select: d,
10466
+ return (o, a) => b(o.$slots, "default", {
10467
+ disabled: L1(L)(V.value),
10468
+ isSelected: L1(C)(V.value),
10469
+ select: e,
10195
10470
  selectedClass: A.value,
10196
- toggle: e
10471
+ toggle: d
10197
10472
  });
10198
10473
  }
10199
- }), n0 = ["id", "checked", "disabled", "name", "value"], r0 = { class: "flex flex-col" }, a0 = {
10200
- key: 1,
10201
- class: "r-radio__error"
10202
- }, R0 = /* @__PURE__ */ R({
10474
+ }), f0 = { class: "r-radio-wrapper" }, h0 = { class: "r-radio-container" }, g0 = ["id", "aria-describedby", "aria-disabled", "aria-invalid", "aria-label", "aria-required", "checked", "disabled", "name", "required", "value"], k0 = ["data-disabled"], b0 = /* @__PURE__ */ S("div", { class: "r-radio__inner" }, null, -1), v0 = [
10475
+ b0
10476
+ ], B0 = { class: "r-radio-texts" }, y0 = ["data-disabled", "for"], w0 = {
10477
+ key: 0,
10478
+ class: "sr-only"
10479
+ }, P0 = {
10480
+ key: 0,
10481
+ class: "r-radio-texts__details"
10482
+ }, T0 = ["id"], F0 = ["id"], C7 = /* @__PURE__ */ E({
10203
10483
  __name: "RRadio",
10204
10484
  props: {
10205
- id: { default: "radio-id" },
10206
- modelValue: { type: Boolean, default: !1 },
10207
- name: { default: "radio-group" },
10208
- disabled: { type: Boolean, default: !1 },
10485
+ id: { default: "" },
10486
+ value: {},
10487
+ modelValue: { default: void 0 },
10209
10488
  label: { default: "" },
10210
- hint: { default: "" },
10489
+ disabled: { type: Boolean, default: !1 },
10490
+ required: { type: Boolean, default: !1 },
10491
+ name: { default: "" },
10211
10492
  errorMsg: { default: "" },
10212
- title: { default: "" },
10213
- value: { default: "" }
10493
+ hint: { default: "" },
10494
+ hideDetails: { type: Boolean, default: !1 },
10495
+ ariaLabel: { default: "" }
10214
10496
  },
10215
10497
  emits: ["update:modelValue"],
10216
- setup(H) {
10217
- const V = H, C = E(V.modelValue), M = f(() => [
10218
- "r-radio group",
10219
- {
10220
- "r-radio--disabled": V.disabled,
10221
- "r-radio--error": V.errorMsg
10222
- }
10223
- ]);
10224
- return I(() => V.modelValue, (i) => {
10225
- C.value = i;
10226
- }, { immediate: !0 }), (i, L) => (t(), r("div", {
10227
- class: p(M.value)
10228
- }, [
10229
- Z("input", I1(i.$attrs, {
10230
- id: V.id,
10231
- checked: C.value,
10232
- class: "r-radio__input",
10233
- disabled: V.disabled,
10234
- name: V.name,
10235
- type: "radio",
10236
- value: V.value,
10237
- onChange: L[0] || (L[0] = (A) => i.$emit("update:modelValue"))
10238
- }), null, 16, n0),
10239
- Z("span", {
10240
- class: p(["r-radio__label", [V.errorMsg && "r-radio__label--error"]]),
10241
- onClick: L[1] || (L[1] = (A) => i.$emit("update:modelValue"))
10242
- }, [
10243
- Z("span", {
10244
- class: p(["r-radio__custom", [V.errorMsg && "r-radio__custom--error", V.disabled && "r-radio__custom--disabled"]])
10245
- }, null, 2),
10246
- Z("div", r0, [
10247
- V.title ? (t(), r("span", {
10498
+ setup(H, { emit: V }) {
10499
+ const C = H, M = V, i = O(() => C.id || `radio-${Math.random().toString(36).substr(2, 9)}`), L = O(() => C.modelValue === C.value), A = O(() => ({
10500
+ "r-radio": !0,
10501
+ "r-radio--checked": L.value,
10502
+ "r-radio--disabled": C.disabled,
10503
+ "r-radio--error": !!C.errorMsg
10504
+ }));
10505
+ function d() {
10506
+ C.disabled || M("update:modelValue", C.value);
10507
+ }
10508
+ return (e, o) => (l(), n("div", f0, [
10509
+ S("div", h0, [
10510
+ S("input", {
10511
+ id: i.value,
10512
+ "aria-describedby": e.errorMsg ? `${i.value}-error` : e.hint ? `${i.value}-hint` : void 0,
10513
+ "aria-disabled": e.disabled,
10514
+ "aria-invalid": !!e.errorMsg,
10515
+ "aria-label": e.ariaLabel || e.label,
10516
+ "aria-required": e.required,
10517
+ checked: L.value,
10518
+ class: "r-radio-container__input",
10519
+ disabled: e.disabled,
10520
+ name: e.name,
10521
+ required: e.required,
10522
+ type: "radio",
10523
+ value: e.value,
10524
+ onChange: d
10525
+ }, null, 40, g0),
10526
+ S("div", {
10527
+ "aria-hidden": "true",
10528
+ class: g(A.value),
10529
+ "data-disabled": e.disabled
10530
+ }, v0, 10, k0)
10531
+ ]),
10532
+ S("div", B0, [
10533
+ S("label", {
10534
+ class: "r-radio-texts__label",
10535
+ "data-disabled": e.disabled,
10536
+ for: i.value
10537
+ }, [
10538
+ e.required ? (l(), n("span", w0, "Required - ")) : p("", !0),
10539
+ d1(" " + w(e.label), 1)
10540
+ ], 8, y0),
10541
+ !e.hideDetails && (e.errorMsg || e.hint) ? (l(), n("div", P0, [
10542
+ e.errorMsg ? (l(), n("p", {
10248
10543
  key: 0,
10249
- class: p(["r-radio__title", [V.errorMsg && "r-radio__title--error", V.disabled && "r-radio__title--disabled"]])
10250
- }, b(V.title), 3)) : O("", !0),
10251
- Z("span", null, b(V.label), 1)
10252
- ])
10253
- ], 2),
10254
- V.hint && !V.errorMsg ? (t(), r("span", {
10255
- key: 0,
10256
- class: p(["r-radio__hint", [V.disabled && "r-radio__hint--disabled"]])
10257
- }, b(V.hint), 3)) : O("", !0),
10258
- V.errorMsg ? (t(), r("span", a0, b(V.errorMsg), 1)) : O("", !0)
10259
- ], 2));
10544
+ id: `${i.value}-error`,
10545
+ class: "r-radio-texts__error",
10546
+ role: "alert"
10547
+ }, w(e.errorMsg), 9, T0)) : e.hint ? (l(), n("p", {
10548
+ key: 1,
10549
+ id: `${i.value}-hint`,
10550
+ class: "r-radio-texts__hint"
10551
+ }, w(e.hint), 9, F0)) : p("", !0)
10552
+ ])) : p("", !0)
10553
+ ])
10554
+ ]));
10260
10555
  }
10261
10556
  });
10262
10557
  export {
10263
- u0 as RAccordion,
10264
- S0 as RAlert,
10265
- s0 as RAvatar,
10266
- c0 as RBadge,
10267
- v0 as RBreadcrumb,
10268
- p0 as RButton,
10269
- O0 as RCheckbox,
10270
- V5 as RChip,
10271
- t3 as RDropdown,
10558
+ x0 as RAccordion,
10559
+ D0 as RAlert,
10560
+ E0 as RAvatar,
10561
+ _0 as RBadge,
10562
+ q0 as RBreadcrumb,
10563
+ W0 as RButton,
10564
+ N0 as RCheckbox,
10565
+ t5 as RChip,
10566
+ u3 as RDropdown,
10272
10567
  D as RIcon,
10273
- F0 as RItem,
10274
- T0 as RItemGroup,
10275
- c2 as RLabel,
10276
- f0 as RModal,
10277
- y0 as RPagination,
10278
- P0 as RProgressbar,
10279
- R0 as RRadio,
10280
- h0 as RSidebar,
10281
- g0 as RSnackbar,
10282
- k0 as RSwitch,
10283
- y3 as RTabItem,
10284
- B0 as RTabs,
10285
- b0 as RTextArea,
10286
- w0 as RTextfield,
10287
- U5 as RTooltip
10568
+ J0 as RItem,
10569
+ Y0 as RItemGroup,
10570
+ b2 as RLabel,
10571
+ I0 as RModal,
10572
+ j0 as RPagination,
10573
+ X0 as RProgressbar,
10574
+ C7 as RRadio,
10575
+ $0 as RSidebar,
10576
+ Q0 as RSnackbar,
10577
+ G0 as RSwitch,
10578
+ W3 as RTabItem,
10579
+ U0 as RTabs,
10580
+ z0 as RTextArea,
10581
+ K0 as RTextfield,
10582
+ J5 as RTooltip
10288
10583
  };