@useinsider/ab-components 0.0.156 → 0.0.157

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.
@@ -3046,7 +3046,7 @@ const dr = ["id"], pr = { class: "ab-onsite-activity-card__content" }, fr = {
3046
3046
  ]))
3047
3047
  ], 64));
3048
3048
  }
3049
- }), Su = ["value", "placeholder", "aria-label"], Tu = { class: "ab-calendar__header" }, Mu = ["aria-label"], Eu = { class: "ab-calendar__month" }, Ou = ["aria-label"], Bu = { class: "ab-calendar__weekdays" }, Iu = { class: "ab-calendar__grid" }, Vu = ["data-date", "aria-label"], zu = ["data-disabled", "data-date", "aria-label", "aria-pressed", "disabled", "onClick"], Ru = { class: "ab-calendar__footer" }, Du = /* @__PURE__ */ G({
3049
+ }), Su = ["aria-label", "placeholder", "value"], Tu = { class: "ab-calendar__header" }, Mu = ["aria-label"], Eu = { class: "ab-calendar__month" }, Ou = ["aria-label"], Bu = { class: "ab-calendar__weekdays" }, Iu = { class: "ab-calendar__grid" }, Vu = ["aria-label", "data-date"], zu = ["aria-label", "aria-pressed", "data-date", "data-disabled", "disabled", "onClick"], Ru = { class: "ab-calendar__footer" }, Du = /* @__PURE__ */ G({
3050
3050
  __name: "Calendar",
3051
3051
  props: {
3052
3052
  modelValue: { default: "" },
@@ -3125,11 +3125,9 @@ const dr = ["id"], pr = { class: "ab-onsite-activity-card__content" }, fr = {
3125
3125
  ee(() => t.modelValue, C), ee(A, (L) => {
3126
3126
  L && ($.value = { year: L.getFullYear(), month: L.getMonth() });
3127
3127
  });
3128
- const Z = w(
3129
- () => new Intl.DateTimeFormat(t.locale, { month: "short", year: "numeric" }).format(
3130
- new Date($.value.year, $.value.month, 1)
3131
- )
3132
- ), q = w(() => {
3128
+ const Z = w(() => new Intl.DateTimeFormat(t.locale, { month: "short", year: "numeric" }).format(
3129
+ new Date($.value.year, $.value.month, 1)
3130
+ )), q = w(() => {
3133
3131
  const L = new Intl.DateTimeFormat(t.locale, { weekday: "short" }), M = [];
3134
3132
  for (let E = 0; E < 7; E++) {
3135
3133
  const D = (t.firstDayOfWeek + E) % 7;
@@ -3163,15 +3161,16 @@ const dr = ["id"], pr = { class: "ab-onsite-activity-card__content" }, fr = {
3163
3161
  L.disabled || (_.value = L.display);
3164
3162
  }
3165
3163
  function Y(L) {
3166
- const M = t.format, E = a[M], D = s[M], N = E.map((fe) => o[fe]), K = N.reduce((fe, Me) => fe + Me, 0), ne = L.split(D);
3164
+ const { format: M } = t, E = a[M], D = s[M], N = E.map((fe) => o[fe]), K = N.reduce((fe, Me) => fe + Me, 0), ne = L.split(D);
3167
3165
  for (let fe = 0; fe < ne.length - 1; fe++)
3168
3166
  N[fe] === 2 && /^\d$/.test(ne[fe]) && (ne[fe] = `0${ne[fe]}`);
3169
3167
  const ae = ne.join("").replace(/\D/g, "").slice(0, K), te = [];
3170
3168
  let ye = 0;
3171
- for (const fe of N)
3169
+ N.forEach((fe) => {
3172
3170
  te.push(ae.slice(ye, ye + fe)), ye += fe;
3171
+ });
3173
3172
  const he = L.endsWith(D);
3174
- let we = te[0];
3173
+ let [we] = te;
3175
3174
  for (let fe = 1; fe < te.length; fe++)
3176
3175
  if (te[fe])
3177
3176
  we += D + te[fe];
@@ -3197,22 +3196,22 @@ const dr = ["id"], pr = { class: "ab-onsite-activity-card__content" }, fr = {
3197
3196
  style: pe({ width: `${L.width}px` })
3198
3197
  }, [
3199
3198
  b("input", {
3200
- value: _.value,
3201
- type: "text",
3199
+ autocomplete: "off",
3202
3200
  class: "ab-calendar__input",
3203
3201
  "data-testid": "calendar-input",
3204
- placeholder: L.placeholder,
3205
- "aria-label": L.inputAriaLabel || L.placeholder || void 0,
3206
3202
  inputmode: "numeric",
3207
3203
  maxlength: "10",
3208
- autocomplete: "off",
3204
+ type: "text",
3205
+ "aria-label": L.inputAriaLabel || L.placeholder || void 0,
3206
+ placeholder: L.placeholder,
3207
+ value: _.value,
3209
3208
  onInput: P
3210
3209
  }, null, 40, Su),
3211
3210
  b("div", Tu, [
3212
3211
  b("button", {
3213
- type: "button",
3214
3212
  class: "ab-calendar__nav",
3215
3213
  "data-testid": "calendar-prev",
3214
+ type: "button",
3216
3215
  "aria-label": L.prevMonthLabel,
3217
3216
  onClick: R
3218
3217
  }, [
@@ -3224,9 +3223,9 @@ const dr = ["id"], pr = { class: "ab-onsite-activity-card__content" }, fr = {
3224
3223
  ], 8, Mu),
3225
3224
  b("span", Eu, I(Z.value), 1),
3226
3225
  b("button", {
3227
- type: "button",
3228
3226
  class: "ab-calendar__nav",
3229
3227
  "data-testid": "calendar-next",
3228
+ type: "button",
3230
3229
  "aria-label": L.nextMonthLabel,
3231
3230
  onClick: S
3232
3231
  }, [
@@ -3250,35 +3249,35 @@ const dr = ["id"], pr = { class: "ab-onsite-activity-card__content" }, fr = {
3250
3249
  E.disabled && L.disabledDateTooltip ? (p(), Q(St, {
3251
3250
  key: 0,
3252
3251
  id: `calendar-disabled-${E.key}`,
3253
- text: L.disabledDateTooltip,
3254
- placement: "top"
3252
+ placement: "top",
3253
+ text: L.disabledDateTooltip
3255
3254
  }, {
3256
3255
  default: ue(() => [
3257
3256
  b("button", {
3258
- type: "button",
3257
+ disabled: "",
3258
+ "aria-disabled": "true",
3259
3259
  class: h(["ab-calendar__day ab-calendar__day--disabled", { "ab-calendar__day--muted": !E.inCurrentMonth }]),
3260
- "data-testid": "calendar-day",
3261
3260
  "data-disabled": "true",
3262
- "data-date": E.key,
3261
+ "data-testid": "calendar-day",
3262
+ type: "button",
3263
3263
  "aria-label": E.display,
3264
- "aria-disabled": "true",
3265
- disabled: ""
3264
+ "data-date": E.key
3266
3265
  }, I(E.label), 11, Vu)
3267
3266
  ]),
3268
3267
  _: 2
3269
3268
  }, 1032, ["id", "text"])) : (p(), m("button", {
3270
3269
  key: 1,
3271
- type: "button",
3272
3270
  class: h(["ab-calendar__day", {
3273
3271
  "ab-calendar__day--muted": !E.inCurrentMonth,
3274
3272
  "ab-calendar__day--selected": E.selected,
3275
3273
  "ab-calendar__day--disabled": E.disabled
3276
3274
  }]),
3277
3275
  "data-testid": "calendar-day",
3278
- "data-disabled": E.disabled ? "true" : "false",
3279
- "data-date": E.key,
3276
+ type: "button",
3280
3277
  "aria-label": E.display,
3281
3278
  "aria-pressed": E.selected,
3279
+ "data-date": E.key,
3280
+ "data-disabled": E.disabled ? "true" : "false",
3282
3281
  disabled: E.disabled,
3283
3282
  onClick: (D) => B(E)
3284
3283
  }, I(E.label), 11, zu))
@@ -3286,28 +3285,28 @@ const dr = ["id"], pr = { class: "ab-onsite-activity-card__content" }, fr = {
3286
3285
  ]),
3287
3286
  b("div", Ru, [
3288
3287
  H(be, {
3289
- variant: "ghost",
3290
3288
  color: "secondary",
3291
- size: "default",
3292
3289
  "custom-class": "ab-calendar__btn ab-calendar__btn--cancel",
3293
3290
  "data-testid": "calendar-cancel",
3291
+ size: "default",
3292
+ variant: "ghost",
3294
3293
  label: L.cancelLabel,
3295
3294
  onClick: k
3296
3295
  }, null, 8, ["label"]),
3297
3296
  H(be, {
3298
- variant: "solid",
3299
3297
  color: "primary",
3300
- size: "default",
3301
3298
  "custom-class": "ab-calendar__btn ab-calendar__btn--apply",
3302
3299
  "data-testid": "calendar-apply",
3303
- label: L.applyLabel,
3300
+ size: "default",
3301
+ variant: "solid",
3304
3302
  disabled: !v.value,
3303
+ label: L.applyLabel,
3305
3304
  onClick: z
3306
- }, null, 8, ["label", "disabled"])
3305
+ }, null, 8, ["disabled", "label"])
3307
3306
  ])
3308
3307
  ], 4));
3309
3308
  }
3310
- }), h4 = /* @__PURE__ */ de(Du, [["__scopeId", "data-v-5a5c1e69"]]), Fu = "_chip__label_u9tpm_1", Pu = "_chip_u9tpm_1", Hu = "_chip__remove_u9tpm_57", Nu = "_chip__icon_u9tpm_74", qu = "_chip__thumbnail_u9tpm_83", Uu = "_chip__thumbnailImage_u9tpm_92", Bt = {
3309
+ }), h4 = /* @__PURE__ */ de(Du, [["__scopeId", "data-v-fac8026d"]]), Fu = "_chip__label_u9tpm_1", Pu = "_chip_u9tpm_1", Hu = "_chip__remove_u9tpm_57", Nu = "_chip__icon_u9tpm_74", qu = "_chip__thumbnail_u9tpm_83", Uu = "_chip__thumbnailImage_u9tpm_92", Bt = {
3311
3310
  chip__label: Fu,
3312
3311
  chip: Pu,
3313
3312
  chip__remove: Hu,
@@ -6187,7 +6186,7 @@ function gf() {
6187
6186
  return Qe.css || (Qe.css = (await import("./css-BCREMVL9.js")).default), Qe.css(...n);
6188
6187
  },
6189
6188
  async liquid(...n) {
6190
- return Qe.liquid || (Qe.liquid = (await import("./liquid-CuFa4zAl.js")).default), Qe.liquid(...n);
6189
+ return Qe.liquid || (Qe.liquid = (await import("./liquid-CvqKJ54v.js")).default), Qe.liquid(...n);
6191
6190
  }
6192
6191
  };
6193
6192
  }
@@ -13878,4 +13877,4 @@ export {
13878
13877
  da as y,
13879
13878
  ll as z
13880
13879
  };
13881
- //# sourceMappingURL=index-WZn_Dd7a.js.map
13880
+ //# sourceMappingURL=index-DgEFAlKD.js.map