@assemblyvoting/ui-library 2.1.19-alpha.3 → 2.1.19-alpha.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -21107,7 +21107,7 @@ const n$ = /* @__PURE__ */ Q(t$, [["__scopeId", "data-v-9a6218e9"]]), s$ = { cla
21107
21107
  };
21108
21108
  }
21109
21109
  });
21110
- const l$ = /* @__PURE__ */ Q(r$, [["__scopeId", "data-v-a4539298"]]), JT = (e) => (D1("data-v-879171a8"), e = e(), O1(), e), o$ = ["aria-label"], f$ = {
21110
+ const l$ = /* @__PURE__ */ Q(r$, [["__scopeId", "data-v-a4539298"]]), JT = (e) => (D1("data-v-731a54e3"), e = e(), O1(), e), o$ = ["aria-label"], f$ = {
21111
21111
  key: 0,
21112
21112
  "aria-hidden": "true"
21113
21113
  }, u$ = {
@@ -21142,7 +21142,7 @@ const l$ = /* @__PURE__ */ Q(r$, [["__scopeId", "data-v-a4539298"]]), JT = (e) =
21142
21142
  }
21143
21143
  },
21144
21144
  setup(e) {
21145
- const c = e, a = E2("i18n"), t = E(() => a.global.locale), n = E(() => c.rank ? document.getElementsByTagName("html")[0].dir === "rtl" ? `${c.rank} ${a.global.messages[t.value].js.components.AVOptionSelect.aria_label}` : `${a.global.messages[t.value].js.components.AVOptionSelect.aria_label} ${c.rank}` : "");
21145
+ const c = e, a = E2("i18n"), t = E(() => a.global.locale.value || a.global.locale), n = E(() => c.rank ? document.getElementsByTagName("html")[0].dir === "rtl" ? `${c.rank} ${a.global.messages[t.value].js.components.AVOptionSelect.aria_label}` : `${a.global.messages[t.value].js.components.AVOptionSelect.aria_label} ${c.rank}` : "");
21146
21146
  return (s, i) => S1((p(), H("div", {
21147
21147
  class: "AVOptionSelect",
21148
21148
  "aria-label": n.value
@@ -21153,7 +21153,7 @@ const l$ = /* @__PURE__ */ Q(r$, [["__scopeId", "data-v-a4539298"]]), JT = (e) =
21153
21153
  ]);
21154
21154
  }
21155
21155
  });
21156
- const h$ = /* @__PURE__ */ Q(p$, [["__scopeId", "data-v-879171a8"]]), V$ = { class: "AVOptionCheckbox--container" }, z$ = {
21156
+ const h$ = /* @__PURE__ */ Q(p$, [["__scopeId", "data-v-731a54e3"]]), V$ = { class: "AVOptionCheckbox--container" }, z$ = {
21157
21157
  key: 0,
21158
21158
  class: "AVOptionCheckbox--exclusive-container"
21159
21159
  }, H$ = { class: "AVOptionCheckbox--exclusive" }, M$ = ["aria-checked", "tabindex", "aria-disabled", "disabled", "onClick", "onKeydown"], g$ = /* @__PURE__ */ Y({
@@ -21186,15 +21186,15 @@ const h$ = /* @__PURE__ */ Q(p$, [["__scopeId", "data-v-879171a8"]]), V$ = { cla
21186
21186
  },
21187
21187
  emits: ["toggled"],
21188
21188
  setup(e, { emit: c }) {
21189
- const a = e, t = E2("i18n"), { t: n } = t.global, s = E(() => t.global.locale.value || t.global.locale), i = () => c("toggled"), r = E(() => a.optionReference ? {
21189
+ const a = e, t = E2("i18n"), { t: n } = t.global, s = () => c("toggled"), i = E(() => a.optionReference ? {
21190
21190
  id: `option_${a.optionReference}_checkbox_${a.checkBoxIndex}`,
21191
21191
  role: "checkbox",
21192
21192
  "aria-labelledby": `option_${a.optionReference}_title option_${a.optionReference}_tick option_${a.optionReference}_subtitle`,
21193
21193
  "aria-describedby": `option_${a.optionReference}_description option_${a.optionReference}_handle`,
21194
21194
  tabindex: 0
21195
21195
  } : {});
21196
- return (l, o) => {
21197
- const f = D("AVOptionSelect");
21196
+ return (r, l) => {
21197
+ const o = D("AVOptionSelect");
21198
21198
  return p(), H("div", V$, [
21199
21199
  e.exclusiveError && e.checked ? (p(), H("div", z$, [
21200
21200
  u("div", H$, S(F(n)("js.components.AVOptionCheckbox.exclusive_option")), 1)
@@ -21210,23 +21210,22 @@ const h$ = /* @__PURE__ */ Q(p$, [["__scopeId", "data-v-879171a8"]]), V$ = { cla
21210
21210
  tabindex: e.disabled ? null : 0,
21211
21211
  "aria-disabled": e.disabled,
21212
21212
  disabled: e.disabled
21213
- }, r.value, {
21214
- onClick: A1(i, ["stop"]),
21215
- onKeydown: rs(A1(i, ["prevent"]), ["space", "enter"])
21213
+ }, i.value, {
21214
+ onClick: A1(s, ["stop"]),
21215
+ onKeydown: rs(A1(s, ["prevent"]), ["space", "enter"])
21216
21216
  }), [
21217
- e.checked ? (p(), X(f, {
21217
+ e.checked ? (p(), X(o, {
21218
21218
  key: 0,
21219
21219
  id: `option_${e.optionReference}_tick`,
21220
21220
  rank: e.rank,
21221
- checked: e.checked,
21222
- locale: s.value
21223
- }, null, 8, ["id", "rank", "checked", "locale"])) : O("", !0)
21221
+ checked: e.checked
21222
+ }, null, 8, ["id", "rank", "checked"])) : O("", !0)
21224
21223
  ], 16, M$)
21225
21224
  ]);
21226
21225
  };
21227
21226
  }
21228
21227
  });
21229
- const C$ = /* @__PURE__ */ Q(g$, [["__scopeId", "data-v-f93882d9"]]), b$ = /* @__PURE__ */ Y({
21228
+ const C$ = /* @__PURE__ */ Q(g$, [["__scopeId", "data-v-e100fdc9"]]), b$ = /* @__PURE__ */ Y({
21230
21229
  __name: "AVTransitionSlide",
21231
21230
  props: {
21232
21231
  skipTransition: {
@@ -21736,7 +21735,7 @@ const mU = /* @__PURE__ */ Q(uU, [["__scopeId", "data-v-c682a2cf"]]), dU = ["ari
21736
21735
  }
21737
21736
  },
21738
21737
  setup(e) {
21739
- const c = e, a = E2("i18n"), { t } = a.global, n = E(() => a.global.locale), s = E(
21738
+ const c = e, a = E2("i18n"), { t } = a.global, n = E(() => a.global.locale.value || a.global.locale), s = E(
21740
21739
  () => {
21741
21740
  var l, o;
21742
21741
  return ((l = c.option) == null ? void 0 : l.crosses) && ((o = c.option) == null ? void 0 : o.crosses) > 1 && c.multipleVotesAllowed && !c.blank;
@@ -21860,7 +21859,7 @@ const MU = ["id", "href", "aria-labelledby"], gU = ["aria-label"], CU = { class:
21860
21859
  },
21861
21860
  emits: ["accordion-open", "checked"],
21862
21861
  setup(e, { emit: c }) {
21863
- const a = e, t = E2("i18n"), { t: n } = t.global, s = E(() => t.global.locale), { eventBus: i } = eI(), r = J(!1), l = J(null), o = E(
21862
+ const a = e, t = E2("i18n"), { t: n } = t.global, s = E(() => t.global.locale.value || t.global.locale), { eventBus: i } = eI(), r = J(!1), l = J(null), o = E(
21864
21863
  () => document.getElementsByTagName("html")[0].dir === "rtl"
21865
21864
  ), f = E(
21866
21865
  () => a.contest.markingType.voteVariation === "ranked"
@@ -21868,7 +21867,7 @@ const MU = ["id", "href", "aria-labelledby"], gU = ["aria-label"], CU = { class:
21868
21867
  () => a.selections.filter(
21869
21868
  (U) => U.reference === a.option.reference
21870
21869
  ).length
21871
- ), m = E(() => (console.log(s.value), a.option.title[s.value] ?? "")), h = E(
21870
+ ), m = E(() => a.option.title[s.value] ?? ""), h = E(
21872
21871
  () => {
21873
21872
  var U;
21874
21873
  return ((U = a.option.description) == null ? void 0 : U[s.value]) ?? "";
@@ -22059,11 +22058,10 @@ const MU = ["id", "href", "aria-labelledby"], gU = ["aria-label"], CU = { class:
22059
22058
  contest: e.contest,
22060
22059
  invalid: e.invalid,
22061
22060
  disabled: e.disabled || e.observerMode,
22062
- locale: s.value,
22063
22061
  "partial-results": e.partialResults,
22064
22062
  onChecked: f2[0] || (f2[0] = (u2) => c("checked", u2)),
22065
22063
  onAccordionOpen: () => z2(!0, !1)
22066
- }, null, 8, ["option", "selections", "contest", "invalid", "disabled", "locale", "partial-results", "onAccordionOpen"]))), 128))
22064
+ }, null, 8, ["option", "selections", "contest", "invalid", "disabled", "partial-results", "onAccordionOpen"]))), 128))
22067
22065
  ])) : O("", !0)
22068
22066
  ]),
22069
22067
  _: 2
@@ -22088,7 +22086,7 @@ const MU = ["id", "href", "aria-labelledby"], gU = ["aria-label"], CU = { class:
22088
22086
  };
22089
22087
  }
22090
22088
  });
22091
- const UU = /* @__PURE__ */ Q($U, [["__scopeId", "data-v-bd52675c"]]), qU = ["aria-label"], WU = {
22089
+ const UU = /* @__PURE__ */ Q($U, [["__scopeId", "data-v-ed8367c3"]]), qU = ["aria-label"], WU = {
22092
22090
  class: "AVBlankOption--header",
22093
22091
  "aria-hidden": "true"
22094
22092
  }, GU = { class: "AVBlankOption--title" }, YU = { class: "AVBlankOption--checkbox" }, QU = {
@@ -22273,7 +22271,7 @@ const nq = /* @__PURE__ */ Q(tq, [["__scopeId", "data-v-3712ac77"]]), sq = ["ari
22273
22271
  };
22274
22272
  }
22275
22273
  });
22276
- const pq = /* @__PURE__ */ Q(vq, [["__scopeId", "data-v-339c4975"]]), hq = (e) => (D1("data-v-da4b329d"), e = e(), O1(), e), Vq = { class: "AVSubmissionHelper" }, zq = { key: 0 }, Hq = ["textContent"], Mq = /* @__PURE__ */ hq(() => /* @__PURE__ */ u("hr", { class: "AVSubmissionHelper--separator" }, null, -1)), gq = { key: 1 }, Cq = { class: "AVSubmissionHelper--help" }, bq = { key: 0 }, Lq = { key: 1 }, _q = {
22274
+ const pq = /* @__PURE__ */ Q(vq, [["__scopeId", "data-v-339c4975"]]), hq = (e) => (D1("data-v-5116b856"), e = e(), O1(), e), Vq = { class: "AVSubmissionHelper" }, zq = { key: 0 }, Hq = ["textContent"], Mq = /* @__PURE__ */ hq(() => /* @__PURE__ */ u("hr", { class: "AVSubmissionHelper--separator" }, null, -1)), gq = { key: 1 }, Cq = { class: "AVSubmissionHelper--help" }, bq = { key: 0 }, Lq = { key: 1 }, _q = {
22277
22275
  key: 2,
22278
22276
  class: "AVSubmissionHelper--count"
22279
22277
  }, yq = { key: 2 }, Nq = /* @__PURE__ */ Y({
@@ -22297,7 +22295,7 @@ const pq = /* @__PURE__ */ Q(vq, [["__scopeId", "data-v-339c4975"]]), hq = (e) =
22297
22295
  }
22298
22296
  },
22299
22297
  setup(e) {
22300
- const c = e, a = E2("i18n"), { t } = a.global, n = E(() => a.global.locale), s = E(() => c.errors.map(
22298
+ const c = e, a = E2("i18n"), { t } = a.global, n = E(() => a.global.locale.value || a.global.locale), s = E(() => c.errors.map(
22301
22299
  (i) => a.global.messages[n.value].js.components.AVSubmissionHelper.errors[i]
22302
22300
  ));
22303
22301
  return (i, r) => (p(), H("div", Vq, [
@@ -22337,7 +22335,7 @@ const pq = /* @__PURE__ */ Q(vq, [["__scopeId", "data-v-339c4975"]]), hq = (e) =
22337
22335
  ]));
22338
22336
  }
22339
22337
  });
22340
- const Aq = /* @__PURE__ */ Q(Nq, [["__scopeId", "data-v-da4b329d"]]);
22338
+ const Aq = /* @__PURE__ */ Q(Nq, [["__scopeId", "data-v-5116b856"]]);
22341
22339
  function xq(e, c, a) {
22342
22340
  if (typeof a != "function")
22343
22341
  throw new Error("search_by must be a function that returns a string");
@@ -22367,7 +22365,7 @@ const Sq = ["aria-label"], kq = { class: "AVSearchBallot--form-group" }, wq = ["
22367
22365
  }
22368
22366
  },
22369
22367
  setup(e) {
22370
- const c = e, a = E2("i18n"), { t } = a.global, n = E(() => a.global.locale), { eventBusEmit: s } = eI(), i = J(""), r = E(() => i.value.trim() === "" ? [] : xq(
22368
+ const c = e, a = E2("i18n"), { t } = a.global, n = E(() => a.global.locale.value || a.global.locale), { eventBusEmit: s } = eI(), i = J(""), r = E(() => i.value.trim() === "" ? [] : xq(
22371
22369
  c.options,
22372
22370
  i.value,
22373
22371
  (f) => f.title[n.value]
@@ -22428,7 +22426,7 @@ const Sq = ["aria-label"], kq = { class: "AVSearchBallot--form-group" }, wq = ["
22428
22426
  ], 40, Sq));
22429
22427
  }
22430
22428
  });
22431
- const Rq = /* @__PURE__ */ Q(Fq, [["__scopeId", "data-v-e57f1448"]]), jq = { class: "AVSplitWeightHelper" }, $q = { class: "AVSplitWeightHelper--box" }, Uq = { class: "AVSplitWeightHelper--box" }, qq = { class: "AVSplitWeightHelper--box" }, Wq = /* @__PURE__ */ Y({
22429
+ const Rq = /* @__PURE__ */ Q(Fq, [["__scopeId", "data-v-184b7059"]]), jq = { class: "AVSplitWeightHelper" }, $q = { class: "AVSplitWeightHelper--box" }, Uq = { class: "AVSplitWeightHelper--box" }, qq = { class: "AVSplitWeightHelper--box" }, Wq = /* @__PURE__ */ Y({
22432
22430
  __name: "AVSplitWeightHelper",
22433
22431
  props: {
22434
22432
  assignedWeight: {
@@ -22714,7 +22712,7 @@ var _W = (
22714
22712
  }, e;
22715
22713
  }()
22716
22714
  ), cI = C9.default = _W;
22717
- const yW = (e) => (D1("data-v-0673c0f8"), e = e(), O1(), e), NW = ["aria-label", "aria-describedby"], AW = ["id"], xW = /* @__PURE__ */ yW(() => /* @__PURE__ */ u("hr", { class: "AVBallot--separator" }, null, -1)), SW = ["aria-label"], kW = /* @__PURE__ */ Y({
22715
+ const yW = (e) => (D1("data-v-ddd6eac8"), e = e(), O1(), e), NW = ["aria-label", "aria-describedby"], AW = ["id"], xW = /* @__PURE__ */ yW(() => /* @__PURE__ */ u("hr", { class: "AVBallot--separator" }, null, -1)), SW = ["aria-label"], kW = /* @__PURE__ */ Y({
22718
22716
  __name: "AVBallot",
22719
22717
  props: {
22720
22718
  contest: {
@@ -22744,7 +22742,7 @@ const yW = (e) => (D1("data-v-0673c0f8"), e = e(), O1(), e), NW = ["aria-label",
22744
22742
  },
22745
22743
  emits: ["update:selectionPile"],
22746
22744
  setup(e, { emit: c }) {
22747
- const a = e, t = E2("i18n"), { t: n } = t.global, s = E(() => t.global.locale), i = J(!1), r = J(""), l = J(""), o = J(null), f = E(() => a.selectionPile.optionSelections), d = E(() => new cI(a.contest)), m = E(() => d.value.validate(a.selectionPile)), h = E(() => m.value.length === 0), b = E(() => {
22745
+ const a = e, t = E2("i18n"), { t: n } = t.global, s = E(() => t.global.locale.value || t.global.locale), i = J(!1), r = J(""), l = J(""), o = J(null), f = E(() => a.selectionPile.optionSelections), d = E(() => new cI(a.contest)), m = E(() => d.value.validate(a.selectionPile)), h = E(() => m.value.length === 0), b = E(() => {
22748
22746
  var C;
22749
22747
  return (C = a.contest.question) == null ? void 0 : C[s.value];
22750
22748
  }), x = J(function() {
@@ -22858,7 +22856,7 @@ const yW = (e) => (D1("data-v-0673c0f8"), e = e(), O1(), e), NW = ["aria-label",
22858
22856
  };
22859
22857
  }
22860
22858
  });
22861
- const wW = /* @__PURE__ */ Q(kW, [["__scopeId", "data-v-0673c0f8"]]), TW = (e) => (D1("data-v-f7e176a2"), e = e(), O1(), e), IW = {
22859
+ const wW = /* @__PURE__ */ Q(kW, [["__scopeId", "data-v-ddd6eac8"]]), TW = (e) => (D1("data-v-c2fb4622"), e = e(), O1(), e), IW = {
22862
22860
  key: 0,
22863
22861
  class: "AVPileSummary--summary"
22864
22862
  }, EW = {
@@ -22907,7 +22905,7 @@ const wW = /* @__PURE__ */ Q(kW, [["__scopeId", "data-v-0673c0f8"]]), TW = (e) =
22907
22905
  },
22908
22906
  emits: ["editCurrentSelection", "deleteSelection"],
22909
22907
  setup(e, { emit: c }) {
22910
- const a = e, t = E2("i18n"), { t: n } = t.global, s = E(() => t.global.locale), i = J(!1), r = J([]), l = E(() => a.selectionPile.optionSelections.length === 0), o = E(() => !a.maximumOptionsShown || i.value ? a.selectionPile.optionSelections : a.selectionPile.optionSelections.slice(
22908
+ const a = e, t = E2("i18n"), { t: n } = t.global, s = E(() => t.global.locale.value || t.global.locale), i = J(!1), r = J([]), l = E(() => a.selectionPile.optionSelections.length === 0), o = E(() => !a.maximumOptionsShown || i.value ? a.selectionPile.optionSelections : a.selectionPile.optionSelections.slice(
22911
22909
  0,
22912
22910
  a.maximumOptionsShown
22913
22911
  )), f = E(() => a.selectionPile.optionSelections.length - o.value.length), d = (h) => {
@@ -23032,7 +23030,7 @@ const wW = /* @__PURE__ */ Q(kW, [["__scopeId", "data-v-0673c0f8"]]), TW = (e) =
23032
23030
  };
23033
23031
  }
23034
23032
  });
23035
- const QW = /* @__PURE__ */ Q(YW, [["__scopeId", "data-v-f7e176a2"]]);
23033
+ const QW = /* @__PURE__ */ Q(YW, [["__scopeId", "data-v-c2fb4622"]]);
23036
23034
  var aI = {}, ts = D4 && D4.__spreadArray || function(e, c, a) {
23037
23035
  if (a || arguments.length === 2)
23038
23036
  for (var t = 0, n = c.length, s; t < n; t++)
@@ -23103,7 +23101,7 @@ const JW = {
23103
23101
  "update:activePile"
23104
23102
  ],
23105
23103
  setup(e, { emit: c }) {
23106
- const a = e, t = E2("i18n"), { t: n } = t.global, s = E(() => t.global.locale), i = J(null), r = J({
23104
+ const a = e, t = E2("i18n"), { t: n } = t.global, s = E(() => t.global.locale.value || t.global.locale), i = J(null), r = J({
23107
23105
  multiplier: 1,
23108
23106
  optionSelections: [],
23109
23107
  explicitBlank: !1
@@ -23345,7 +23343,7 @@ const JW = {
23345
23343
  };
23346
23344
  }
23347
23345
  });
23348
- const gG = /* @__PURE__ */ Q(MG, [["__scopeId", "data-v-e4e1d9b1"]]);
23346
+ const gG = /* @__PURE__ */ Q(MG, [["__scopeId", "data-v-04c1c6c0"]]);
23349
23347
  var CG = {}, bG = /* @__PURE__ */ u("a", { href: "#" }, "LOGO", -1), LG = { class: "flex items-center" }, _G = { class: "flex flex-col items-center justify-center p-3 w-full" }, yG = /* @__PURE__ */ u("h2", { class: "mb-4" }, "Election Name", -1), NG = /* @__PURE__ */ u("div", null, [
23350
23348
  /* @__PURE__ */ u("p", null, " Curabitur et augue in nibh mollis faucibus. Mauris semper cursus felis, vitae porta dui faucibus eu. Suspendisse potenti. Ut sit amet arcu non quam eleifend interdum. Sed vitae sagittis nunc. Nullam faucibus mattis mauris sed tincidunt. Nulla convallis lobortis semper. Curabitur varius neque vel sapien mattis mattis. Integer mollis fringilla nibh, facilisis rutrum risus. In volutpat sem in lacus vestibulum, sollicitudin efficitur dui luctus. Donec fringilla diam tortor, posuere lacinia erat consequat ut. Mauris nec nibh tortor. "),
23351
23349
  /* @__PURE__ */ u("br"),