@idds/vue 1.3.5 → 1.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { defineComponent, inject, ref, computed, onMounted, onUnmounted, watch, createElementBlock, openBlock, normalizeClass, createElementVNode, renderSlot, createTextVNode, toDisplayString, createVNode, createCommentVNode, createBlock, resolveDynamicComponent, Transition, withCtx, provide, withModifiers, normalizeStyle, nextTick, h, unref, Fragment, renderList, mergeProps, withDirectives, vModelDynamic, withKeys, vModelText, Teleport, createStaticVNode, vModelRadio, useAttrs } from "vue";
1
+ import { defineComponent, inject, ref, computed, onMounted, onUnmounted, watch, createElementBlock, openBlock, normalizeClass, createElementVNode, renderSlot, createTextVNode, toDisplayString, createVNode, createCommentVNode, createBlock, resolveDynamicComponent, Transition, withCtx, provide, withModifiers, normalizeStyle, nextTick, h, unref, Fragment, renderList, mergeProps, useAttrs, withDirectives, vModelDynamic, withKeys, vModelText, Teleport, createStaticVNode, vModelRadio } from "vue";
2
2
  const iddsColorTokens = {
3
3
  // Neutral Colors
4
4
  "neutral-25": "var(--ina-neutral-25)",
@@ -572,7 +572,7 @@ const _hoisted_7$j = {
572
572
  key: 0,
573
573
  class: "ina-accordion-card__subtitle"
574
574
  };
575
- const _hoisted_8$f = ["id", "aria-labelledby"];
575
+ const _hoisted_8$e = ["id", "aria-labelledby"];
576
576
  const _hoisted_9$b = { class: "ina-accordion-card__body" };
577
577
  const _sfc_main$N = /* @__PURE__ */ defineComponent({
578
578
  __name: "AccordionCard",
@@ -667,7 +667,7 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
667
667
  createElementVNode("div", _hoisted_9$b, [
668
668
  renderSlot(_ctx.$slots, "default", {}, void 0, true)
669
669
  ])
670
- ], 8, _hoisted_8$f)) : createCommentVNode("", true)
670
+ ], 8, _hoisted_8$e)) : createCommentVNode("", true)
671
671
  ]),
672
672
  _: 3
673
673
  })
@@ -1103,6 +1103,20 @@ var IconClock = createVueComponent("outline", "clock", "Clock", [["path", { "d":
1103
1103
  * See the LICENSE file in the root directory of this source tree.
1104
1104
  */
1105
1105
  var IconCube3dSphere = createVueComponent("outline", "cube-3d-sphere", "Cube3dSphere", [["path", { "d": "M6 17.6l-2 -1.1v-2.5", "key": "svg-0" }], ["path", { "d": "M4 10v-2.5l2 -1.1", "key": "svg-1" }], ["path", { "d": "M10 4.1l2 -1.1l2 1.1", "key": "svg-2" }], ["path", { "d": "M18 6.4l2 1.1v2.5", "key": "svg-3" }], ["path", { "d": "M20 14v2.5l-2 1.12", "key": "svg-4" }], ["path", { "d": "M14 19.9l-2 1.1l-2 -1.1", "key": "svg-5" }], ["path", { "d": "M12 12l2 -1.1", "key": "svg-6" }], ["path", { "d": "M18 8.6l2 -1.1", "key": "svg-7" }], ["path", { "d": "M12 12l0 2.5", "key": "svg-8" }], ["path", { "d": "M12 18.5l0 2.5", "key": "svg-9" }], ["path", { "d": "M12 12l-2 -1.12", "key": "svg-10" }], ["path", { "d": "M6 8.6l-2 -1.1", "key": "svg-11" }]]);
1106
+ /**
1107
+ * @license @tabler/icons-vue v3.35.0 - MIT
1108
+ *
1109
+ * This source code is licensed under the MIT license.
1110
+ * See the LICENSE file in the root directory of this source tree.
1111
+ */
1112
+ var IconFileTypePdf = createVueComponent("outline", "file-type-pdf", "FileTypePdf", [["path", { "d": "M14 3v4a1 1 0 0 0 1 1h4", "key": "svg-0" }], ["path", { "d": "M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4", "key": "svg-1" }], ["path", { "d": "M5 18h1.5a1.5 1.5 0 0 0 0 -3h-1.5v6", "key": "svg-2" }], ["path", { "d": "M17 18h2", "key": "svg-3" }], ["path", { "d": "M20 15h-3v6", "key": "svg-4" }], ["path", { "d": "M11 15v6h1a2 2 0 0 0 2 -2v-2a2 2 0 0 0 -2 -2h-1z", "key": "svg-5" }]]);
1113
+ /**
1114
+ * @license @tabler/icons-vue v3.35.0 - MIT
1115
+ *
1116
+ * This source code is licensed under the MIT license.
1117
+ * See the LICENSE file in the root directory of this source tree.
1118
+ */
1119
+ var IconFile = createVueComponent("outline", "file", "File", [["path", { "d": "M14 3v4a1 1 0 0 0 1 1h4", "key": "svg-0" }], ["path", { "d": "M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z", "key": "svg-1" }]]);
1106
1120
  /**
1107
1121
  * @license @tabler/icons-vue v3.35.0 - MIT
1108
1122
  *
@@ -1124,6 +1138,13 @@ var IconLoader2 = createVueComponent("outline", "loader-2", "Loader2", [["path",
1124
1138
  * See the LICENSE file in the root directory of this source tree.
1125
1139
  */
1126
1140
  var IconMoon = createVueComponent("outline", "moon", "Moon", [["path", { "d": "M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z", "key": "svg-0" }]]);
1141
+ /**
1142
+ * @license @tabler/icons-vue v3.35.0 - MIT
1143
+ *
1144
+ * This source code is licensed under the MIT license.
1145
+ * See the LICENSE file in the root directory of this source tree.
1146
+ */
1147
+ var IconPhoto = createVueComponent("outline", "photo", "Photo", [["path", { "d": "M15 8h.01", "key": "svg-0" }], ["path", { "d": "M3 6a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v12a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3v-12z", "key": "svg-1" }], ["path", { "d": "M3 16l5 -5c.928 -.893 2.072 -.893 3 0l5 5", "key": "svg-2" }], ["path", { "d": "M14 14l1 -1c.928 -.893 2.072 -.893 3 0l3 3", "key": "svg-3" }]]);
1127
1148
  /**
1128
1149
  * @license @tabler/icons-vue v3.35.0 - MIT
1129
1150
  *
@@ -1694,7 +1715,7 @@ const _hoisted_6$i = {
1694
1715
  class: "ina-card__avatar"
1695
1716
  };
1696
1717
  const _hoisted_7$h = ["src", "alt"];
1697
- const _hoisted_8$e = {
1718
+ const _hoisted_8$d = {
1698
1719
  key: 0,
1699
1720
  class: "ina-card__title"
1700
1721
  };
@@ -1716,7 +1737,7 @@ const _hoisted_13$6 = {
1716
1737
  class: "ina-card__media"
1717
1738
  };
1718
1739
  const _hoisted_14$5 = ["src", "alt"];
1719
- const _hoisted_15$4 = {
1740
+ const _hoisted_15$3 = {
1720
1741
  key: 4,
1721
1742
  class: "ina-card__media"
1722
1743
  };
@@ -1843,7 +1864,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
1843
1864
  ])
1844
1865
  ])) : createCommentVNode("", true),
1845
1866
  createElementVNode("div", null, [
1846
- __props.title || _ctx.$slots.title ? (openBlock(), createElementBlock("h3", _hoisted_8$e, [
1867
+ __props.title || _ctx.$slots.title ? (openBlock(), createElementBlock("h3", _hoisted_8$d, [
1847
1868
  renderSlot(_ctx.$slots, "title", {}, () => [
1848
1869
  createTextVNode(toDisplayString(__props.title), 1)
1849
1870
  ])
@@ -1888,7 +1909,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
1888
1909
  }, null, 8, _hoisted_14$5)) : createCommentVNode("", true)
1889
1910
  ])
1890
1911
  ])) : createCommentVNode("", true),
1891
- __props.variant === "horizontal" && computedMediaPosition.value === "right" ? (openBlock(), createElementBlock("div", _hoisted_15$4, [
1912
+ __props.variant === "horizontal" && computedMediaPosition.value === "right" ? (openBlock(), createElementBlock("div", _hoisted_15$3, [
1892
1913
  renderSlot(_ctx.$slots, "media", {}, () => [
1893
1914
  __props.mediaSrc ? (openBlock(), createElementBlock("img", {
1894
1915
  key: 0,
@@ -2317,7 +2338,7 @@ const _hoisted_4$n = {
2317
2338
  key: 0,
2318
2339
  class: "ina-text-field__prefix-icon"
2319
2340
  };
2320
- const _hoisted_5$j = ["id", "type", "placeholder", "disabled", "readonly", "maxlength", "autocomplete", "spellcheck", "autocapitalize", "autocorrect", "inputmode", "dir"];
2341
+ const _hoisted_5$j = ["id", "name", "type", "placeholder", "disabled", "readonly", "maxlength", "autocomplete", "spellcheck", "autocapitalize", "autocorrect", "inputmode", "dir"];
2321
2342
  const _hoisted_6$g = {
2322
2343
  key: 1,
2323
2344
  class: "ina-text-field__char-count"
@@ -2354,6 +2375,7 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
2354
2375
  setup(__props, { emit: __emit }) {
2355
2376
  const props = __props;
2356
2377
  const emit = __emit;
2378
+ const attrs = useAttrs();
2357
2379
  const inputRef = ref();
2358
2380
  const inputValue = ref(getInitialValue());
2359
2381
  const debounceTimer = ref();
@@ -2367,9 +2389,20 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
2367
2389
  }
2368
2390
  return value;
2369
2391
  }
2370
- const inputId = computed(
2371
- () => `text-field-${Math.random().toString(36).substr(2, 9)}`
2372
- );
2392
+ const inputId = computed(() => {
2393
+ const providedId = attrs.id || attrs.name;
2394
+ if (providedId) {
2395
+ return String(providedId);
2396
+ }
2397
+ if (props.label) {
2398
+ return String(props.label).toLowerCase();
2399
+ }
2400
+ return `text-field-${Math.random().toString(36).substr(2, 9)}`;
2401
+ });
2402
+ const filteredAttrs = computed(() => {
2403
+ const { id, name, ...rest } = attrs;
2404
+ return rest;
2405
+ });
2373
2406
  const wrapperClasses = computed(() => {
2374
2407
  const classes = ["ina-text-field__wrapper"];
2375
2408
  classes.push(`ina-text-field__wrapper--size-${props.size}`);
@@ -2538,11 +2571,12 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
2538
2571
  __props.prefixIcon ? (openBlock(), createElementBlock("div", _hoisted_4$n, [
2539
2572
  (openBlock(), createBlock(resolveDynamicComponent(__props.prefixIcon), { size: 16 }))
2540
2573
  ])) : createCommentVNode("", true),
2541
- withDirectives(createElementVNode("input", mergeProps(_ctx.$attrs, {
2574
+ withDirectives(createElementVNode("input", mergeProps(filteredAttrs.value, {
2542
2575
  id: inputId.value,
2543
2576
  ref_key: "inputRef",
2544
2577
  ref: inputRef,
2545
2578
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inputValue.value = $event),
2579
+ name: unref(attrs).name || void 0,
2546
2580
  type: __props.type,
2547
2581
  placeholder: __props.placeholder,
2548
2582
  disabled: __props.disabled,
@@ -3336,7 +3370,7 @@ const _hoisted_4$j = { class: "ina-file-upload__icon" };
3336
3370
  const _hoisted_5$h = { class: "ina-file-upload__text" };
3337
3371
  const _hoisted_6$f = { class: "ina-file-upload__title" };
3338
3372
  const _hoisted_7$f = { class: "ina-file-upload__description" };
3339
- const _hoisted_8$d = ["disabled"];
3373
+ const _hoisted_8$c = ["disabled"];
3340
3374
  const _hoisted_9$9 = { class: "ina-file-upload__files" };
3341
3375
  const _hoisted_10$8 = { class: "ina-file-upload__file-indicator" };
3342
3376
  const _hoisted_11$8 = {
@@ -3355,7 +3389,7 @@ const _hoisted_14$4 = {
3355
3389
  key: 3,
3356
3390
  class: "ina-file-upload__file-icon-wrapper ina-file-upload__file-icon-wrapper--success"
3357
3391
  };
3358
- const _hoisted_15$3 = { class: "ina-file-upload__file-info" };
3392
+ const _hoisted_15$2 = { class: "ina-file-upload__file-info" };
3359
3393
  const _hoisted_16$2 = { class: "ina-file-upload__file-name" };
3360
3394
  const _hoisted_17$2 = { class: "ina-file-upload__file-size" };
3361
3395
  const _hoisted_18$2 = {
@@ -3618,7 +3652,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
3618
3652
  class: "ina-file-upload__button",
3619
3653
  disabled: __props.disabled,
3620
3654
  onClick: withModifiers(triggerFileInput, ["stop"])
3621
- }, " Pilih File ", 8, _hoisted_8$d)
3655
+ }, " Pilih File ", 8, _hoisted_8$c)
3622
3656
  ])
3623
3657
  ], 34),
3624
3658
  files.value.length > 0 ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
@@ -3635,27 +3669,27 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
3635
3669
  createElementVNode("div", _hoisted_10$8, [
3636
3670
  uploadedFile.status === "uploading" ? (openBlock(), createElementBlock("div", _hoisted_11$8, [
3637
3671
  createVNode(unref(IconLoader2), {
3638
- size: 16,
3672
+ size: 20,
3639
3673
  class: "ina-file-upload__file-icon--spinning"
3640
3674
  })
3641
3675
  ])) : uploadedFile.status === "success" ? (openBlock(), createElementBlock("div", _hoisted_12$7, [
3642
3676
  createVNode(unref(IconCircleCheck), {
3643
- size: 16,
3677
+ size: 20,
3644
3678
  stroke: "2"
3645
3679
  })
3646
3680
  ])) : uploadedFile.status === "error" ? (openBlock(), createElementBlock("div", _hoisted_13$5, [
3647
3681
  createVNode(unref(IconCircleX), {
3648
- size: 16,
3682
+ size: 20,
3649
3683
  stroke: "2"
3650
3684
  })
3651
3685
  ])) : uploadedFile.status === "idle" ? (openBlock(), createElementBlock("div", _hoisted_14$4, [
3652
3686
  createVNode(unref(IconCircleCheck), {
3653
- size: 16,
3687
+ size: 20,
3654
3688
  stroke: "2"
3655
3689
  })
3656
3690
  ])) : createCommentVNode("", true)
3657
3691
  ]),
3658
- createElementVNode("div", _hoisted_15$3, [
3692
+ createElementVNode("div", _hoisted_15$2, [
3659
3693
  createElementVNode("div", _hoisted_16$2, toDisplayString(unref(sanitizeFileName)(uploadedFile.file.name)), 1),
3660
3694
  createElementVNode("div", _hoisted_17$2, toDisplayString(unref(formatFileSize)(uploadedFile.file.size)), 1),
3661
3695
  uploadedFile.error ? (openBlock(), createElementBlock("div", _hoisted_18$2, toDisplayString(uploadedFile.error), 1)) : createCommentVNode("", true)
@@ -3668,7 +3702,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
3668
3702
  class: "ina-file-upload__file-retry",
3669
3703
  onClick: ($event) => updateFileStatus(getOriginalIndex(uploadedFile), "idle")
3670
3704
  }, [
3671
- createVNode(unref(IconRotateClockwise), { size: 16 })
3705
+ createVNode(unref(IconRotateClockwise), { size: 20 })
3672
3706
  ], 8, _hoisted_20$2),
3673
3707
  createElementVNode("button", {
3674
3708
  title: "Hapus file",
@@ -3676,7 +3710,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
3676
3710
  class: "ina-file-upload__file-remove",
3677
3711
  onClick: ($event) => removeFile(getOriginalIndex(uploadedFile))
3678
3712
  }, [
3679
- createVNode(unref(IconTrash), { size: 16 })
3713
+ createVNode(unref(IconTrash), { size: 20 })
3680
3714
  ], 8, _hoisted_21$2)
3681
3715
  ], 64)) : uploadedFile.status === "uploading" ? (openBlock(), createElementBlock("button", {
3682
3716
  key: 1,
@@ -3685,7 +3719,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
3685
3719
  class: "ina-file-upload__file-remove",
3686
3720
  onClick: ($event) => removeFile(getOriginalIndex(uploadedFile))
3687
3721
  }, [
3688
- createVNode(unref(IconX), { size: 16 })
3722
+ createVNode(unref(IconX), { size: 20 })
3689
3723
  ], 8, _hoisted_22$1)) : uploadedFile.status === "success" ? (openBlock(), createElementBlock("button", {
3690
3724
  key: 2,
3691
3725
  title: "Hapus file",
@@ -3693,7 +3727,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
3693
3727
  class: "ina-file-upload__file-remove",
3694
3728
  onClick: ($event) => removeFile(getOriginalIndex(uploadedFile))
3695
3729
  }, [
3696
- createVNode(unref(IconTrash), { size: 16 })
3730
+ createVNode(unref(IconTrash), { size: 20 })
3697
3731
  ], 8, _hoisted_23$1)) : uploadedFile.status === "idle" ? (openBlock(), createElementBlock("button", {
3698
3732
  key: 3,
3699
3733
  title: "Hapus file",
@@ -3701,7 +3735,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
3701
3735
  class: "ina-file-upload__file-remove",
3702
3736
  onClick: ($event) => removeFile(getOriginalIndex(uploadedFile))
3703
3737
  }, [
3704
- createVNode(unref(IconTrash), { size: 16 })
3738
+ createVNode(unref(IconTrash), { size: 20 })
3705
3739
  ], 8, _hoisted_24$1)) : createCommentVNode("", true)
3706
3740
  ])
3707
3741
  ], 2);
@@ -3948,7 +3982,7 @@ const _hoisted_4$h = ["id"];
3948
3982
  const _hoisted_5$g = ["aria-label"];
3949
3983
  const _hoisted_6$e = { class: "ina-modal__body" };
3950
3984
  const _hoisted_7$e = ["id"];
3951
- const _hoisted_8$c = {
3985
+ const _hoisted_8$b = {
3952
3986
  key: 1,
3953
3987
  class: "ina-modal__footer"
3954
3988
  };
@@ -4084,7 +4118,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
4084
4118
  }, toDisplayString(__props.description), 9, _hoisted_7$e)) : createCommentVNode("", true),
4085
4119
  renderSlot(_ctx.$slots, "default", {}, void 0, true)
4086
4120
  ]),
4087
- __props.showFooter ? (openBlock(), createElementBlock("div", _hoisted_8$c, [
4121
+ __props.showFooter ? (openBlock(), createElementBlock("div", _hoisted_8$b, [
4088
4122
  renderSlot(_ctx.$slots, "footer", {}, void 0, true)
4089
4123
  ])) : createCommentVNode("", true)
4090
4124
  ], 10, _hoisted_2$o)
@@ -4116,15 +4150,14 @@ const _hoisted_2$n = {
4116
4150
  key: 0,
4117
4151
  class: "ina-month-picker__required"
4118
4152
  };
4119
- const _hoisted_3$l = { class: "ina-month-picker__wrapper" };
4120
- const _hoisted_4$g = ["id", "disabled", "aria-expanded", "aria-labelledby"];
4121
- const _hoisted_5$f = {
4153
+ const _hoisted_3$l = ["id", "disabled", "aria-expanded", "aria-labelledby"];
4154
+ const _hoisted_4$g = {
4122
4155
  key: 0,
4123
4156
  class: "ina-month-picker__prefix-icon"
4124
4157
  };
4125
- const _hoisted_6$d = { class: "ina-month-picker__trigger-text" };
4126
- const _hoisted_7$d = { class: "ina-month-picker__grid" };
4127
- const _hoisted_8$b = ["disabled", "onClick", "onMouseenter"];
4158
+ const _hoisted_5$f = { class: "ina-month-picker__trigger-text" };
4159
+ const _hoisted_6$d = { class: "ina-month-picker__grid" };
4160
+ const _hoisted_7$d = ["disabled", "onClick", "onMouseenter"];
4128
4161
  const _sfc_main$s = /* @__PURE__ */ defineComponent({
4129
4162
  __name: "MonthPicker",
4130
4163
  props: {
@@ -4144,6 +4177,7 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
4144
4177
  setup(__props, { emit: __emit }) {
4145
4178
  const props = __props;
4146
4179
  const emit = __emit;
4180
+ const containerRef = ref();
4147
4181
  const triggerRef = ref();
4148
4182
  const panelRef = ref();
4149
4183
  const isOpen = ref(false);
@@ -4240,39 +4274,23 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
4240
4274
  let leftValue = void 0;
4241
4275
  let rightValue = void 0;
4242
4276
  if (isMobile) {
4243
- const threshold = 16;
4244
- const triggerCenter = triggerRect.left + triggerRect.width / 2;
4245
- const viewportCenter = viewportWidth / 2;
4246
- if (triggerRect.right > viewportWidth - threshold) {
4247
- shouldUseRight = true;
4248
- rightValue = `${viewportWidth - triggerRect.right}px`;
4249
- leftValue = void 0;
4250
- } else if (triggerRect.left < threshold) {
4251
- shouldUseRight = false;
4252
- leftValue = `${triggerRect.left}px`;
4253
- rightValue = void 0;
4254
- } else if (Math.abs(triggerCenter - viewportCenter) < panelWidthValue / 2) {
4255
- const panelLeft = triggerRect.left - (panelWidthValue - triggerRect.width) / 2;
4256
- if (panelLeft < 0) {
4257
- leftValue = "0";
4258
- rightValue = void 0;
4259
- } else if (panelLeft + panelWidthValue > viewportWidth) {
4260
- rightValue = "0";
4261
- leftValue = void 0;
4262
- } else {
4263
- leftValue = `${panelLeft}px`;
4264
- rightValue = void 0;
4277
+ const panelCenterX = viewportWidth / 2;
4278
+ const panelLeftFromViewport = panelCenterX - panelWidthValue / 2;
4279
+ if (containerRef.value) {
4280
+ const containerRect = containerRef.value.getBoundingClientRect();
4281
+ const leftRelativeToContainer = panelLeftFromViewport - containerRect.left;
4282
+ let calculatedLeft = Math.max(0, leftRelativeToContainer);
4283
+ const maxLeft = viewportWidth - panelWidthValue - containerRect.left;
4284
+ if (leftRelativeToContainer > maxLeft) {
4285
+ calculatedLeft = Math.max(0, maxLeft);
4265
4286
  }
4287
+ leftValue = `${calculatedLeft}px`;
4288
+ rightValue = void 0;
4266
4289
  shouldUseRight = false;
4267
4290
  } else {
4268
- shouldUseRight = panelWidthValue > availableSpaceRight;
4269
- if (shouldUseRight) {
4270
- rightValue = `${viewportWidth - triggerRect.right}px`;
4271
- leftValue = void 0;
4272
- } else {
4273
- leftValue = `${triggerRect.left}px`;
4274
- rightValue = void 0;
4275
- }
4291
+ leftValue = `${Math.max(0, panelLeftFromViewport)}px`;
4292
+ rightValue = void 0;
4293
+ shouldUseRight = false;
4276
4294
  }
4277
4295
  } else {
4278
4296
  shouldUseRight = panelWidthValue > availableSpaceRight;
@@ -4377,6 +4395,8 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
4377
4395
  });
4378
4396
  return (_ctx, _cache) => {
4379
4397
  return openBlock(), createElementBlock("div", {
4398
+ ref_key: "containerRef",
4399
+ ref: containerRef,
4380
4400
  class: normalizeClass(["ina-month-picker", containerClasses.value])
4381
4401
  }, [
4382
4402
  __props.label ? (openBlock(), createElementBlock("label", {
@@ -4387,94 +4407,92 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
4387
4407
  createTextVNode(toDisplayString(__props.label) + " ", 1),
4388
4408
  __props.required ? (openBlock(), createElementBlock("span", _hoisted_2$n, "*")) : createCommentVNode("", true)
4389
4409
  ], 8, _hoisted_1$o)) : createCommentVNode("", true),
4390
- createElementVNode("div", _hoisted_3$l, [
4391
- createElementVNode("button", {
4392
- id: triggerId.value,
4393
- ref_key: "triggerRef",
4394
- ref: triggerRef,
4410
+ createElementVNode("button", {
4411
+ id: triggerId.value,
4412
+ ref_key: "triggerRef",
4413
+ ref: triggerRef,
4414
+ type: "button",
4415
+ class: normalizeClass(triggerClasses.value),
4416
+ disabled: __props.disabled || __props.readonly,
4417
+ "aria-expanded": isOpen.value,
4418
+ "aria-haspopup": true,
4419
+ "aria-labelledby": __props.label ? `${triggerId.value}-label` : void 0,
4420
+ onClick: togglePanel,
4421
+ onKeydown: handleKeydown
4422
+ }, [
4423
+ __props.showIcon ? (openBlock(), createElementBlock("div", _hoisted_4$g, [..._cache[1] || (_cache[1] = [
4424
+ createStaticVNode('<svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-f53ade24><rect x="3" y="4" width="18" height="18" rx="2" ry="2" stroke="currentColor" stroke-width="2" data-v-f53ade24></rect><line x1="16" y1="2" x2="16" y2="6" stroke="currentColor" stroke-width="2" stroke-linecap="round" data-v-f53ade24></line><line x1="8" y1="2" x2="8" y2="6" stroke="currentColor" stroke-width="2" stroke-linecap="round" data-v-f53ade24></line><line x1="3" y1="10" x2="21" y2="10" stroke="currentColor" stroke-width="2" stroke-linecap="round" data-v-f53ade24></line></svg>', 1)
4425
+ ])])) : createCommentVNode("", true),
4426
+ createElementVNode("span", _hoisted_5$f, toDisplayString(selectedMonthDisplay.value || __props.placeholder), 1),
4427
+ __props.showClearButton && selectedMonth.value !== void 0 && !__props.disabled && !__props.readonly ? (openBlock(), createElementBlock("button", {
4428
+ key: 1,
4395
4429
  type: "button",
4396
- class: normalizeClass(triggerClasses.value),
4397
- disabled: __props.disabled || __props.readonly,
4398
- "aria-expanded": isOpen.value,
4399
- "aria-haspopup": true,
4400
- "aria-labelledby": __props.label ? `${triggerId.value}-label` : void 0,
4401
- onClick: togglePanel,
4402
- onKeydown: handleKeydown
4403
- }, [
4404
- __props.showIcon ? (openBlock(), createElementBlock("div", _hoisted_5$f, [..._cache[1] || (_cache[1] = [
4405
- createStaticVNode('<svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-452431d5><rect x="3" y="4" width="18" height="18" rx="2" ry="2" stroke="currentColor" stroke-width="2" data-v-452431d5></rect><line x1="16" y1="2" x2="16" y2="6" stroke="currentColor" stroke-width="2" stroke-linecap="round" data-v-452431d5></line><line x1="8" y1="2" x2="8" y2="6" stroke="currentColor" stroke-width="2" stroke-linecap="round" data-v-452431d5></line><line x1="3" y1="10" x2="21" y2="10" stroke="currentColor" stroke-width="2" stroke-linecap="round" data-v-452431d5></line></svg>', 1)
4406
- ])])) : createCommentVNode("", true),
4407
- createElementVNode("span", _hoisted_6$d, toDisplayString(selectedMonthDisplay.value || __props.placeholder), 1),
4408
- __props.showClearButton && selectedMonth.value !== void 0 && !__props.disabled && !__props.readonly ? (openBlock(), createElementBlock("button", {
4409
- key: 1,
4410
- type: "button",
4411
- class: "ina-month-picker__clear-button",
4412
- onClick: withModifiers(handleClear, ["stop"])
4413
- }, [..._cache[2] || (_cache[2] = [
4414
- createElementVNode("svg", {
4415
- width: "16",
4416
- height: "16",
4417
- viewBox: "0 0 24 24",
4418
- fill: "none",
4419
- xmlns: "http://www.w3.org/2000/svg"
4420
- }, [
4421
- createElementVNode("path", {
4422
- d: "M18 6L6 18M6 6L18 18",
4423
- stroke: "currentColor",
4424
- "stroke-width": "2",
4425
- "stroke-linecap": "round",
4426
- "stroke-linejoin": "round"
4427
- })
4428
- ], -1)
4429
- ])])) : createCommentVNode("", true),
4430
- (openBlock(), createElementBlock("svg", {
4431
- class: normalizeClass(["ina-month-picker__chevron", { "ina-month-picker__chevron--open": isOpen.value }]),
4430
+ class: "ina-month-picker__clear-button",
4431
+ onClick: withModifiers(handleClear, ["stop"])
4432
+ }, [..._cache[2] || (_cache[2] = [
4433
+ createElementVNode("svg", {
4432
4434
  width: "16",
4433
4435
  height: "16",
4434
4436
  viewBox: "0 0 24 24",
4435
4437
  fill: "none",
4436
4438
  xmlns: "http://www.w3.org/2000/svg"
4437
- }, [..._cache[3] || (_cache[3] = [
4439
+ }, [
4438
4440
  createElementVNode("path", {
4439
- d: "M6 9L12 15L18 9",
4441
+ d: "M18 6L6 18M6 6L18 18",
4440
4442
  stroke: "currentColor",
4441
4443
  "stroke-width": "2",
4442
4444
  "stroke-linecap": "round",
4443
4445
  "stroke-linejoin": "round"
4444
- }, null, -1)
4445
- ])], 2))
4446
- ], 42, _hoisted_4$g),
4447
- createVNode(Transition, { name: "panel" }, {
4448
- default: withCtx(() => [
4449
- isOpen.value ? (openBlock(), createElementBlock("div", {
4450
- key: 0,
4451
- ref_key: "panelRef",
4452
- ref: panelRef,
4453
- class: normalizeClass([
4454
- "ina-month-picker__panel",
4455
- { "ina-month-picker__panel--open": isOpen.value },
4456
- { "ina-month-picker__panel--right-aligned": useRightPositioning.value }
4457
- ]),
4458
- style: normalizeStyle(panelStyle.value)
4459
- }, [
4460
- createElementVNode("div", _hoisted_7$d, [
4461
- (openBlock(), createElementBlock(Fragment, null, renderList(monthNames, (month, index2) => {
4462
- return createElementVNode("button", {
4463
- key: index2,
4464
- type: "button",
4465
- class: normalizeClass(getMonthClasses(index2)),
4466
- disabled: props.disabled,
4467
- onClick: ($event) => selectMonth(index2),
4468
- onMouseenter: ($event) => !props.disabled && (hoveredMonth.value = index2),
4469
- onMouseleave: _cache[0] || (_cache[0] = ($event) => hoveredMonth.value = null)
4470
- }, toDisplayString(month), 43, _hoisted_8$b);
4471
- }), 64))
4472
- ])
4473
- ], 6)) : createCommentVNode("", true)
4474
- ]),
4475
- _: 1
4476
- })
4477
- ]),
4446
+ })
4447
+ ], -1)
4448
+ ])])) : createCommentVNode("", true),
4449
+ (openBlock(), createElementBlock("svg", {
4450
+ class: normalizeClass(["ina-month-picker__chevron", { "ina-month-picker__chevron--open": isOpen.value }]),
4451
+ width: "16",
4452
+ height: "16",
4453
+ viewBox: "0 0 24 24",
4454
+ fill: "none",
4455
+ xmlns: "http://www.w3.org/2000/svg"
4456
+ }, [..._cache[3] || (_cache[3] = [
4457
+ createElementVNode("path", {
4458
+ d: "M6 9L12 15L18 9",
4459
+ stroke: "currentColor",
4460
+ "stroke-width": "2",
4461
+ "stroke-linecap": "round",
4462
+ "stroke-linejoin": "round"
4463
+ }, null, -1)
4464
+ ])], 2))
4465
+ ], 42, _hoisted_3$l),
4466
+ createVNode(Transition, { name: "panel" }, {
4467
+ default: withCtx(() => [
4468
+ isOpen.value ? (openBlock(), createElementBlock("div", {
4469
+ key: 0,
4470
+ ref_key: "panelRef",
4471
+ ref: panelRef,
4472
+ class: normalizeClass([
4473
+ "ina-month-picker__panel",
4474
+ { "ina-month-picker__panel--open": isOpen.value },
4475
+ { "ina-month-picker__panel--right-aligned": useRightPositioning.value }
4476
+ ]),
4477
+ style: normalizeStyle(panelStyle.value)
4478
+ }, [
4479
+ createElementVNode("div", _hoisted_6$d, [
4480
+ (openBlock(), createElementBlock(Fragment, null, renderList(monthNames, (month, index2) => {
4481
+ return createElementVNode("button", {
4482
+ key: index2,
4483
+ type: "button",
4484
+ class: normalizeClass(getMonthClasses(index2)),
4485
+ disabled: props.disabled,
4486
+ onClick: ($event) => selectMonth(index2),
4487
+ onMouseenter: ($event) => !props.disabled && (hoveredMonth.value = index2),
4488
+ onMouseleave: _cache[0] || (_cache[0] = ($event) => hoveredMonth.value = null)
4489
+ }, toDisplayString(month), 43, _hoisted_7$d);
4490
+ }), 64))
4491
+ ])
4492
+ ], 6)) : createCommentVNode("", true)
4493
+ ]),
4494
+ _: 1
4495
+ }),
4478
4496
  __props.statusMessage ? (openBlock(), createElementBlock("div", {
4479
4497
  key: 1,
4480
4498
  class: normalizeClass(statusClasses.value)
@@ -4483,7 +4501,7 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
4483
4501
  };
4484
4502
  }
4485
4503
  });
4486
- const MonthPicker = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["__scopeId", "data-v-452431d5"]]);
4504
+ const MonthPicker = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["__scopeId", "data-v-f53ade24"]]);
4487
4505
  const _hoisted_1$n = {
4488
4506
  key: 0,
4489
4507
  class: "ina-multiple-choice-grid__title"
@@ -5588,6 +5606,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
5588
5606
  setup(__props, { emit: __emit }) {
5589
5607
  const props = __props;
5590
5608
  const emit = __emit;
5609
+ const containerRef = ref();
5591
5610
  const triggerRef = ref();
5592
5611
  const panelRef = ref();
5593
5612
  const isOpen = ref(false);
@@ -5683,48 +5702,32 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
5683
5702
  const panelRect = panelRef.value.getBoundingClientRect();
5684
5703
  const viewportWidth = window.innerWidth;
5685
5704
  const viewportHeight = window.innerHeight;
5686
- const defaultPanelWidth = 320;
5705
+ const isMobile = viewportWidth <= 640;
5706
+ const defaultPanelWidth = isMobile ? 200 : 320;
5687
5707
  const panelWidthValue = panelRect.width || defaultPanelWidth;
5688
5708
  const availableSpaceRight = viewportWidth - triggerRect.right;
5689
5709
  triggerRect.left;
5690
- const isMobile = viewportWidth <= 640;
5691
5710
  let shouldUseRight = false;
5692
5711
  let leftValue = void 0;
5693
5712
  let rightValue = void 0;
5694
5713
  if (isMobile) {
5695
- const threshold = 16;
5696
- const triggerCenter = triggerRect.left + triggerRect.width / 2;
5697
- const viewportCenter = viewportWidth / 2;
5698
- if (triggerRect.right > viewportWidth - threshold) {
5699
- shouldUseRight = true;
5700
- rightValue = `${viewportWidth - triggerRect.right}px`;
5701
- leftValue = void 0;
5702
- } else if (triggerRect.left < threshold) {
5703
- shouldUseRight = false;
5704
- leftValue = `${triggerRect.left}px`;
5705
- rightValue = void 0;
5706
- } else if (Math.abs(triggerCenter - viewportCenter) < panelWidthValue / 2) {
5707
- const panelLeft = triggerRect.left - (panelWidthValue - triggerRect.width) / 2;
5708
- if (panelLeft < 0) {
5709
- leftValue = "0";
5710
- rightValue = void 0;
5711
- } else if (panelLeft + panelWidthValue > viewportWidth) {
5712
- rightValue = "0";
5713
- leftValue = void 0;
5714
- } else {
5715
- leftValue = `${panelLeft}px`;
5716
- rightValue = void 0;
5714
+ const panelCenterX = viewportWidth / 2;
5715
+ const panelLeftFromViewport = panelCenterX - panelWidthValue / 2;
5716
+ if (containerRef.value) {
5717
+ const containerRect = containerRef.value.getBoundingClientRect();
5718
+ const leftRelativeToContainer = panelLeftFromViewport - containerRect.left;
5719
+ let calculatedLeft = Math.max(0, leftRelativeToContainer);
5720
+ const maxLeft = viewportWidth - panelWidthValue - containerRect.left;
5721
+ if (leftRelativeToContainer > maxLeft) {
5722
+ calculatedLeft = Math.max(0, maxLeft);
5717
5723
  }
5724
+ leftValue = `${calculatedLeft}px`;
5725
+ rightValue = void 0;
5718
5726
  shouldUseRight = false;
5719
5727
  } else {
5720
- shouldUseRight = panelWidthValue > availableSpaceRight;
5721
- if (shouldUseRight) {
5722
- rightValue = `${viewportWidth - triggerRect.right}px`;
5723
- leftValue = void 0;
5724
- } else {
5725
- leftValue = `${triggerRect.left}px`;
5726
- rightValue = void 0;
5727
- }
5728
+ leftValue = `${Math.max(0, panelLeftFromViewport)}px`;
5729
+ rightValue = void 0;
5730
+ shouldUseRight = false;
5728
5731
  }
5729
5732
  } else {
5730
5733
  shouldUseRight = panelWidthValue > availableSpaceRight;
@@ -5848,6 +5851,8 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
5848
5851
  });
5849
5852
  return (_ctx, _cache) => {
5850
5853
  return openBlock(), createElementBlock("div", {
5854
+ ref_key: "containerRef",
5855
+ ref: containerRef,
5851
5856
  class: normalizeClass(["ina-year-picker", containerClasses.value])
5852
5857
  }, [
5853
5858
  __props.label ? (openBlock(), createElementBlock("label", {
@@ -5873,7 +5878,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
5873
5878
  onKeydown: handleKeydown
5874
5879
  }, [
5875
5880
  __props.showIcon ? (openBlock(), createElementBlock("div", _hoisted_5$9, [..._cache[1] || (_cache[1] = [
5876
- createStaticVNode('<svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-3336f854><rect x="3" y="4" width="18" height="18" rx="2" ry="2" stroke="currentColor" stroke-width="2" data-v-3336f854></rect><line x1="16" y1="2" x2="16" y2="6" stroke="currentColor" stroke-width="2" stroke-linecap="round" data-v-3336f854></line><line x1="8" y1="2" x2="8" y2="6" stroke="currentColor" stroke-width="2" stroke-linecap="round" data-v-3336f854></line><line x1="3" y1="10" x2="21" y2="10" stroke="currentColor" stroke-width="2" stroke-linecap="round" data-v-3336f854></line></svg>', 1)
5881
+ createStaticVNode('<svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-6e7c1cdf><rect x="3" y="4" width="18" height="18" rx="2" ry="2" stroke="currentColor" stroke-width="2" data-v-6e7c1cdf></rect><line x1="16" y1="2" x2="16" y2="6" stroke="currentColor" stroke-width="2" stroke-linecap="round" data-v-6e7c1cdf></line><line x1="8" y1="2" x2="8" y2="6" stroke="currentColor" stroke-width="2" stroke-linecap="round" data-v-6e7c1cdf></line><line x1="3" y1="10" x2="21" y2="10" stroke="currentColor" stroke-width="2" stroke-linecap="round" data-v-6e7c1cdf></line></svg>', 1)
5877
5882
  ])])) : createCommentVNode("", true),
5878
5883
  createElementVNode("span", _hoisted_6$8, toDisplayString(selectedYear.value || __props.placeholder), 1),
5879
5884
  __props.showClearButton && selectedYear.value && !__props.disabled && !__props.readonly ? (openBlock(), createElementBlock("button", {
@@ -5957,7 +5962,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
5957
5962
  };
5958
5963
  }
5959
5964
  });
5960
- const YearPicker = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["__scopeId", "data-v-3336f854"]]);
5965
+ const YearPicker = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["__scopeId", "data-v-6e7c1cdf"]]);
5961
5966
  const _hoisted_1$g = ["for"];
5962
5967
  const _hoisted_2$g = {
5963
5968
  key: 0,
@@ -5978,17 +5983,19 @@ const _hoisted_11$4 = { class: "ina-date-picker__day-number" };
5978
5983
  const _hoisted_12$3 = { class: "ina-date-picker__calendar-container" };
5979
5984
  const _hoisted_13$3 = { class: "ina-date-picker__calendar-header" };
5980
5985
  const _hoisted_14$2 = { class: "ina-date-picker__header-controls" };
5981
- const _hoisted_15$2 = { class: "ina-date-picker__dropdown-container" };
5986
+ const _hoisted_15$1 = { class: "ina-date-picker__dropdown-container" };
5982
5987
  const _hoisted_16$1 = { class: "ina-date-picker__dropdown-container" };
5983
5988
  const _hoisted_17$1 = { class: "ina-date-picker__calendar-grid" };
5984
5989
  const _hoisted_18$1 = ["disabled", "onClick"];
5985
- const _hoisted_19$1 = { class: "ina-date-picker__calendar" };
5986
- const _hoisted_20$1 = { class: "ina-date-picker__next-month-header" };
5987
- const _hoisted_21$1 = { class: "ina-date-picker__next-month-controls" };
5988
- const _hoisted_22 = { class: "ina-date-picker__dropdown-container" };
5990
+ const _hoisted_19$1 = { class: "ina-date-picker__day-number" };
5991
+ const _hoisted_20$1 = { class: "ina-date-picker__calendar" };
5992
+ const _hoisted_21$1 = { class: "ina-date-picker__next-month-header" };
5993
+ const _hoisted_22 = { class: "ina-date-picker__next-month-controls" };
5989
5994
  const _hoisted_23 = { class: "ina-date-picker__dropdown-container" };
5990
- const _hoisted_24 = { class: "ina-date-picker__calendar-grid" };
5991
- const _hoisted_25 = ["disabled", "onClick"];
5995
+ const _hoisted_24 = { class: "ina-date-picker__dropdown-container" };
5996
+ const _hoisted_25 = { class: "ina-date-picker__calendar-grid" };
5997
+ const _hoisted_26 = ["disabled", "onClick"];
5998
+ const _hoisted_27 = { class: "ina-date-picker__day-number" };
5992
5999
  const _sfc_main$j = /* @__PURE__ */ defineComponent({
5993
6000
  __name: "DatePicker",
5994
6001
  props: {
@@ -6012,7 +6019,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
6012
6019
  disabledFutureDate: { type: Boolean },
6013
6020
  disabledDateBefore: {},
6014
6021
  disabledDateAfter: {},
6015
- triggerWidth: { default: "100%" },
6022
+ triggerWidth: { default: "" },
6016
6023
  panelMaxHeight: { default: void 0 },
6017
6024
  panelClassName: { default: "" },
6018
6025
  triggerClassname: { default: "" },
@@ -6894,7 +6901,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
6894
6901
  })
6895
6902
  ]),
6896
6903
  createElementVNode("div", _hoisted_14$2, [
6897
- createElementVNode("div", _hoisted_15$2, [
6904
+ createElementVNode("div", _hoisted_15$1, [
6898
6905
  createVNode(MonthPicker, {
6899
6906
  "model-value": currentMonth.value,
6900
6907
  disabled: __props.disabled,
@@ -6941,12 +6948,14 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
6941
6948
  class: normalizeClass(getDayClasses(day)),
6942
6949
  disabled: isDayDisabled(day.date),
6943
6950
  onClick: ($event) => selectDay(day)
6944
- }, toDisplayString(day.date.getDate()), 11, _hoisted_18$1);
6951
+ }, [
6952
+ createElementVNode("span", _hoisted_19$1, toDisplayString(day.date.getDate()), 1)
6953
+ ], 10, _hoisted_18$1);
6945
6954
  }), 128))
6946
6955
  ])
6947
6956
  ]),
6948
- createElementVNode("div", _hoisted_19$1, [
6949
- createElementVNode("div", _hoisted_20$1, [
6957
+ createElementVNode("div", _hoisted_20$1, [
6958
+ createElementVNode("div", _hoisted_21$1, [
6950
6959
  createElementVNode("button", {
6951
6960
  type: "button",
6952
6961
  class: "ina-date-picker__nav-button",
@@ -6957,8 +6966,8 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
6957
6966
  class: "ina-date-picker__nav-icon"
6958
6967
  })
6959
6968
  ]),
6960
- createElementVNode("div", _hoisted_21$1, [
6961
- createElementVNode("div", _hoisted_22, [
6969
+ createElementVNode("div", _hoisted_22, [
6970
+ createElementVNode("div", _hoisted_23, [
6962
6971
  createVNode(MonthPicker, {
6963
6972
  "model-value": nextMonth.value,
6964
6973
  disabled: __props.disabled,
@@ -6967,7 +6976,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
6967
6976
  "onUpdate:modelValue": handleNextMonthChange
6968
6977
  }, null, 8, ["model-value", "disabled", "readonly"])
6969
6978
  ]),
6970
- createElementVNode("div", _hoisted_23, [
6979
+ createElementVNode("div", _hoisted_24, [
6971
6980
  createVNode(YearPicker, {
6972
6981
  "model-value": nextYear.value,
6973
6982
  "min-year": 1900,
@@ -6991,7 +7000,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
6991
7000
  })
6992
7001
  ])
6993
7002
  ]),
6994
- createElementVNode("div", _hoisted_24, [
7003
+ createElementVNode("div", _hoisted_25, [
6995
7004
  (openBlock(), createElementBlock(Fragment, null, renderList(dayNames, (day) => {
6996
7005
  return createElementVNode("div", {
6997
7006
  key: `rh-${day}`,
@@ -7005,7 +7014,9 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
7005
7014
  class: normalizeClass(getDayClasses(day)),
7006
7015
  disabled: isDayDisabled(day.date),
7007
7016
  onClick: ($event) => selectDay(day)
7008
- }, toDisplayString(day.date.getDate()), 11, _hoisted_25);
7017
+ }, [
7018
+ createElementVNode("span", _hoisted_27, toDisplayString(day.date.getDate()), 1)
7019
+ ], 10, _hoisted_26);
7009
7020
  }), 128))
7010
7021
  ])
7011
7022
  ])
@@ -7020,7 +7031,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
7020
7031
  };
7021
7032
  }
7022
7033
  });
7023
- const DatePicker = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-9cd9726e"]]);
7034
+ const DatePicker = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-d43f3297"]]);
7024
7035
  const _hoisted_1$f = ["disabled"];
7025
7036
  const _hoisted_2$f = {
7026
7037
  key: 0,
@@ -7050,7 +7061,7 @@ const _hoisted_11$3 = { class: "ina-select-dropdown__preview-item-text" };
7050
7061
  const _hoisted_12$2 = ["aria-label"];
7051
7062
  const _hoisted_13$2 = ["disabled", "onClick"];
7052
7063
  const _hoisted_14$1 = { class: "ina-select-dropdown__option-content" };
7053
- const _hoisted_15$1 = { class: "ina-select-dropdown__option-label" };
7064
+ const _hoisted_15 = { class: "ina-select-dropdown__option-label" };
7054
7065
  const _hoisted_16 = {
7055
7066
  key: 0,
7056
7067
  class: "ina-select-dropdown__option-check-indicator"
@@ -7103,7 +7114,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
7103
7114
  showPreviewValue: { type: Boolean, default: true },
7104
7115
  searchable: { type: Boolean, default: true }
7105
7116
  },
7106
- emits: ["update:modelValue", "change", "clear"],
7117
+ emits: ["update:modelValue", "change", "clear", "update:selectedRaw", "selectedRawChange"],
7107
7118
  setup(__props, { emit: __emit }) {
7108
7119
  const props = __props;
7109
7120
  const emit = __emit;
@@ -7114,6 +7125,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
7114
7125
  const isOpen = ref(false);
7115
7126
  const internalSearchTerm = ref("");
7116
7127
  const searchTimeoutRef = ref(null);
7128
+ const selectedLabelsCache = ref(/* @__PURE__ */ new Map());
7117
7129
  const isSearchControlled = computed(() => props.searchValue !== void 0);
7118
7130
  const searchTerm = computed(
7119
7131
  () => isSearchControlled.value ? props.searchValue || "" : internalSearchTerm.value
@@ -7195,16 +7207,94 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
7195
7207
  const singleSelected = computed(
7196
7208
  () => !props.multiple ? props.modelValue : null
7197
7209
  );
7210
+ const getLabelForValue = (value) => {
7211
+ if (selectedLabelsCache.value.has(value)) {
7212
+ return selectedLabelsCache.value.get(value) || null;
7213
+ }
7214
+ const found = props.options.find((o) => o.value === value);
7215
+ if (found) {
7216
+ selectedLabelsCache.value.set(value, found.label);
7217
+ return found.label;
7218
+ }
7219
+ return null;
7220
+ };
7221
+ const getOptionLabelByValue = (value) => {
7222
+ const label = getLabelForValue(value);
7223
+ return label || value;
7224
+ };
7225
+ watch(
7226
+ () => props.options,
7227
+ (newOptions) => {
7228
+ newOptions.forEach((option) => {
7229
+ if (selectedLabelsCache.value.has(option.value)) {
7230
+ selectedLabelsCache.value.set(option.value, option.label);
7231
+ }
7232
+ });
7233
+ },
7234
+ { deep: true }
7235
+ );
7236
+ const getOptionForValue = (value) => {
7237
+ const label = getLabelForValue(value);
7238
+ if (label !== null) {
7239
+ return { label, value };
7240
+ }
7241
+ const found = props.options.find((o) => o.value === value);
7242
+ return found || null;
7243
+ };
7244
+ watch(
7245
+ () => [props.modelValue, props.multiple],
7246
+ () => {
7247
+ const cache = selectedLabelsCache.value;
7248
+ if (props.multiple && Array.isArray(props.modelValue)) {
7249
+ props.modelValue.forEach((value) => {
7250
+ if (!cache.has(value)) {
7251
+ const found = props.options.find((o) => o.value === value);
7252
+ if (found) {
7253
+ cache.set(value, found.label);
7254
+ }
7255
+ }
7256
+ });
7257
+ cache.forEach((_, value) => {
7258
+ if (!props.modelValue.includes(value)) {
7259
+ cache.delete(value);
7260
+ }
7261
+ });
7262
+ } else if (props.modelValue !== null && props.modelValue !== void 0 && props.modelValue !== "") {
7263
+ if (!cache.has(props.modelValue)) {
7264
+ const found = props.options.find((o) => o.value === props.modelValue);
7265
+ if (found) {
7266
+ cache.set(props.modelValue, found.label);
7267
+ }
7268
+ }
7269
+ } else {
7270
+ cache.clear();
7271
+ }
7272
+ let selectedRaw = null;
7273
+ if (props.multiple && Array.isArray(props.modelValue)) {
7274
+ if (props.modelValue.length > 0) {
7275
+ const rawOptions = props.modelValue.map((val) => getOptionForValue(val)).filter((opt) => opt !== null);
7276
+ selectedRaw = rawOptions.length > 0 ? rawOptions : null;
7277
+ }
7278
+ } else if (props.modelValue !== null && props.modelValue !== void 0 && props.modelValue !== "") {
7279
+ selectedRaw = getOptionForValue(props.modelValue);
7280
+ }
7281
+ emit("update:selectedRaw", selectedRaw);
7282
+ emit("selectedRawChange", selectedRaw);
7283
+ },
7284
+ { deep: true, immediate: true }
7285
+ );
7198
7286
  const triggerLabel = computed(() => {
7199
7287
  if (props.multiple) {
7200
7288
  if (!selectedArray.value.length) return props.placeholder;
7201
7289
  else if (selectedArray.value.length > 3)
7202
7290
  return `${selectedArray.value.length} data terpilih`;
7203
- else
7204
- return props.options.filter((o) => selectedArray.value.includes(o.value)).map((o) => o.label).join(", ");
7291
+ else {
7292
+ const labels = selectedArray.value.map((val) => getLabelForValue(val)).filter((label) => label !== null);
7293
+ return labels.length > 0 ? labels.join(", ") : props.placeholder;
7294
+ }
7205
7295
  } else {
7206
- const found = props.options.find((o) => o.value === singleSelected.value);
7207
- return found ? found.label : props.placeholder;
7296
+ const label = getLabelForValue(singleSelected.value);
7297
+ return label || props.placeholder;
7208
7298
  }
7209
7299
  });
7210
7300
  const filteredOptions = computed(() => {
@@ -7231,10 +7321,6 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
7231
7321
  const getOptionLabel = (option) => {
7232
7322
  return option.label;
7233
7323
  };
7234
- const getOptionLabelByValue = (value) => {
7235
- const option = props.options.find((o) => o.value === value);
7236
- return option ? option.label : value;
7237
- };
7238
7324
  const isSelected = (option) => {
7239
7325
  if (props.multiple) {
7240
7326
  return selectedArray.value.includes(option.value);
@@ -7255,11 +7341,23 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
7255
7341
  if (props.disabled) return;
7256
7342
  if (props.multiple) {
7257
7343
  const prev = Array.isArray(props.modelValue) ? [...props.modelValue] : [];
7258
- const newValue = prev.includes(option.value) ? prev.filter((v) => v !== option.value) : [...prev, option.value];
7344
+ const isCurrentlySelected = prev.includes(option.value);
7345
+ const newValue = isCurrentlySelected ? prev.filter((v) => v !== option.value) : [...prev, option.value];
7346
+ if (isCurrentlySelected) {
7347
+ selectedLabelsCache.value.delete(option.value);
7348
+ } else {
7349
+ selectedLabelsCache.value.set(option.value, option.label);
7350
+ }
7259
7351
  emit("update:modelValue", newValue);
7260
7352
  emit("change", newValue);
7261
7353
  } else {
7262
- const newValue = isSelected(option) ? null : option.value;
7354
+ const isCurrentlySelected = isSelected(option);
7355
+ const newValue = isCurrentlySelected ? null : option.value;
7356
+ if (isCurrentlySelected) {
7357
+ selectedLabelsCache.value.delete(option.value);
7358
+ } else {
7359
+ selectedLabelsCache.value.set(option.value, option.label);
7360
+ }
7263
7361
  emit("update:modelValue", newValue);
7264
7362
  emit("change", newValue);
7265
7363
  isOpen.value = false;
@@ -7271,6 +7369,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
7271
7369
  }
7272
7370
  };
7273
7371
  const removeSelectedItem = (value) => {
7372
+ selectedLabelsCache.value.delete(value);
7274
7373
  if (props.onRemoveSelected) {
7275
7374
  props.onRemoveSelected(value);
7276
7375
  } else {
@@ -7440,7 +7539,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
7440
7539
  option,
7441
7540
  selected: isSelected(option)
7442
7541
  }, () => [
7443
- createElementVNode("span", _hoisted_15$1, toDisplayString(getOptionLabel(option)), 1)
7542
+ createElementVNode("span", _hoisted_15, toDisplayString(getOptionLabel(option)), 1)
7444
7543
  ], true)
7445
7544
  ]),
7446
7545
  __props.multiple ? (openBlock(), createElementBlock("div", {
@@ -7499,7 +7598,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
7499
7598
  };
7500
7599
  }
7501
7600
  });
7502
- const SelectDropdown = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-5e6f9f90"]]);
7601
+ const SelectDropdown = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-e3f2a508"]]);
7503
7602
  const _hoisted_1$e = ["aria-labelledby", "aria-describedby"];
7504
7603
  const _hoisted_2$e = {
7505
7604
  key: 0,
@@ -7617,10 +7716,10 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
7617
7716
  return openBlock(), createBlock(Teleport, { to: "body" }, [
7618
7717
  createVNode(Transition, { name: "drawer" }, {
7619
7718
  default: withCtx(() => [
7620
- isOpen.value ? (openBlock(), createElementBlock("div", {
7719
+ isOpen.value ? (openBlock(), createElementBlock("div", mergeProps({
7621
7720
  key: 0,
7622
- class: normalizeClass(["ina-drawer", drawerClasses.value])
7623
- }, [
7721
+ class: ["ina-drawer", drawerClasses.value]
7722
+ }, _ctx.$attrs), [
7624
7723
  createElementVNode("div", {
7625
7724
  class: "ina-drawer__backdrop",
7626
7725
  onClick: handleBackdropClick
@@ -7681,7 +7780,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
7681
7780
  renderSlot(_ctx.$slots, "footer", {}, void 0, true)
7682
7781
  ])) : createCommentVNode("", true)
7683
7782
  ], 10, _hoisted_1$e)
7684
- ], 2)) : createCommentVNode("", true)
7783
+ ], 16)) : createCommentVNode("", true)
7685
7784
  ]),
7686
7785
  _: 3
7687
7786
  })
@@ -7689,7 +7788,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
7689
7788
  };
7690
7789
  }
7691
7790
  });
7692
- const Drawer = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-cdbda5b3"]]);
7791
+ const Drawer = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-a924d690"]]);
7693
7792
  const _sfc_main$g = /* @__PURE__ */ defineComponent({
7694
7793
  __name: "Skeleton",
7695
7794
  props: {
@@ -8720,7 +8819,7 @@ const _hoisted_2$8 = {
8720
8819
  key: 0,
8721
8820
  class: "ina-text-area__required"
8722
8821
  };
8723
- const _hoisted_3$6 = ["id", "placeholder", "disabled", "readonly", "maxlength", "rows", "autocomplete", "spellcheck", "autocapitalize", "autocorrect", "dir"];
8822
+ const _hoisted_3$6 = ["id", "name", "placeholder", "disabled", "readonly", "maxlength", "rows", "autocomplete", "spellcheck", "autocapitalize", "autocorrect", "dir"];
8724
8823
  const _sfc_main$9 = /* @__PURE__ */ defineComponent({
8725
8824
  __name: "TextArea",
8726
8825
  props: {
@@ -8751,6 +8850,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
8751
8850
  setup(__props, { emit: __emit }) {
8752
8851
  const props = __props;
8753
8852
  const emit = __emit;
8853
+ const attrs = useAttrs();
8754
8854
  const textareaRef = ref();
8755
8855
  const inputValue = ref(getInitialValue());
8756
8856
  const validationError = ref(null);
@@ -8763,9 +8863,20 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
8763
8863
  }
8764
8864
  return value;
8765
8865
  }
8766
- const textareaId = computed(
8767
- () => `text-area-${Math.random().toString(36).substr(2, 9)}`
8768
- );
8866
+ const textareaId = computed(() => {
8867
+ const providedId = attrs.id || attrs.name;
8868
+ if (providedId) {
8869
+ return String(providedId);
8870
+ }
8871
+ if (props.label) {
8872
+ return String(props.label).toLowerCase();
8873
+ }
8874
+ return `text-area-${Math.random().toString(36).substr(2, 9)}`;
8875
+ });
8876
+ const filteredAttrs = computed(() => {
8877
+ const { id, name, ...rest } = attrs;
8878
+ return rest;
8879
+ });
8769
8880
  const containerClasses = computed(() => {
8770
8881
  const classes = ["ina-text-area"];
8771
8882
  if (props.disabled) {
@@ -8923,11 +9034,12 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
8923
9034
  createElementVNode("div", {
8924
9035
  class: normalizeClass(["ina-text-area__wrapper", wrapperClasses.value])
8925
9036
  }, [
8926
- withDirectives(createElementVNode("textarea", mergeProps({
9037
+ withDirectives(createElementVNode("textarea", mergeProps(filteredAttrs.value, {
8927
9038
  id: textareaId.value,
8928
9039
  ref_key: "textareaRef",
8929
9040
  ref: textareaRef,
8930
9041
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inputValue.value = $event),
9042
+ name: unref(attrs).name || void 0,
8931
9043
  placeholder: __props.placeholder,
8932
9044
  disabled: __props.disabled,
8933
9045
  readonly: __props.readonly,
@@ -8938,8 +9050,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
8938
9050
  autocapitalize: __props.autoCapitalize,
8939
9051
  autocorrect: __props.autoCorrect,
8940
9052
  dir: __props.dir,
8941
- class: textareaClasses.value
8942
- }, _ctx.$attrs, {
9053
+ class: textareaClasses.value,
8943
9054
  onInput: handleInput,
8944
9055
  onBlur: handleBlur,
8945
9056
  onFocus: handleFocus
@@ -10475,40 +10586,18 @@ if (typeof window !== "undefined") {
10475
10586
  }
10476
10587
  const _hoisted_1 = ["accept", "disabled"];
10477
10588
  const _hoisted_2 = ["tabindex", "aria-label"];
10478
- const _hoisted_3 = { class: "ina-single-file-upload__content" };
10479
- const _hoisted_4 = { class: "ina-single-file-upload__title" };
10480
- const _hoisted_5 = { class: "ina-single-file-upload__description" };
10481
- const _hoisted_6 = { class: "ina-single-file-upload__progress" };
10482
- const _hoisted_7 = { class: "ina-single-file-upload__progress-bar" };
10483
- const _hoisted_8 = { class: "ina-single-file-upload__progress-text" };
10484
- const _hoisted_9 = { class: "ina-single-file-upload__icon-wrapper ina-single-file-upload__icon-wrapper--file" };
10485
- const _hoisted_10 = {
10486
- key: 0,
10487
- width: "16",
10488
- height: "16",
10489
- viewBox: "0 0 24 24",
10490
- fill: "none",
10491
- xmlns: "http://www.w3.org/2000/svg"
10492
- };
10493
- const _hoisted_11 = {
10494
- key: 1,
10495
- width: "16",
10496
- height: "16",
10497
- viewBox: "0 0 24 24",
10498
- fill: "none",
10499
- xmlns: "http://www.w3.org/2000/svg"
10500
- };
10501
- const _hoisted_12 = {
10502
- key: 2,
10503
- width: "16",
10504
- height: "16",
10505
- viewBox: "0 0 24 24",
10506
- fill: "none",
10507
- xmlns: "http://www.w3.org/2000/svg"
10508
- };
10509
- const _hoisted_13 = { class: "ina-single-file-upload__content" };
10510
- const _hoisted_14 = { class: "ina-single-file-upload__title" };
10511
- const _hoisted_15 = { class: "ina-single-file-upload__description" };
10589
+ const _hoisted_3 = { class: "ina-single-file-upload__icon-wrapper ina-single-file-upload__icon-wrapper--default" };
10590
+ const _hoisted_4 = { class: "ina-single-file-upload__content" };
10591
+ const _hoisted_5 = { class: "ina-single-file-upload__title" };
10592
+ const _hoisted_6 = { class: "ina-single-file-upload__description" };
10593
+ const _hoisted_7 = { class: "ina-single-file-upload__icon-wrapper ina-single-file-upload__icon-wrapper--default" };
10594
+ const _hoisted_8 = { class: "ina-single-file-upload__progress" };
10595
+ const _hoisted_9 = { class: "ina-single-file-upload__progress-bar" };
10596
+ const _hoisted_10 = { class: "ina-single-file-upload__progress-text" };
10597
+ const _hoisted_11 = { class: "ina-single-file-upload__icon-wrapper ina-single-file-upload__icon-wrapper--file" };
10598
+ const _hoisted_12 = { class: "ina-single-file-upload__content" };
10599
+ const _hoisted_13 = { class: "ina-single-file-upload__title" };
10600
+ const _hoisted_14 = { class: "ina-single-file-upload__description" };
10512
10601
  const _sfc_main = /* @__PURE__ */ defineComponent({
10513
10602
  __name: "SingleFileUpload",
10514
10603
  props: {
@@ -10546,16 +10635,28 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
10546
10635
  "ina-single-file-upload__container--disabled": props.disabled
10547
10636
  }
10548
10637
  ]);
10549
- const isPdfFile = computed(() => {
10638
+ computed(() => {
10550
10639
  if (!file.value) return false;
10551
10640
  const fileType = file.value.type;
10552
10641
  const fileName = file.value.name.toLowerCase();
10553
10642
  return fileType === "application/pdf" || fileName.endsWith(".pdf");
10554
10643
  });
10555
- const isImageFile = computed(() => {
10644
+ computed(() => {
10556
10645
  if (!file.value) return false;
10557
10646
  return file.value.type.startsWith("image/");
10558
10647
  });
10648
+ const fileIconComponent = computed(() => {
10649
+ if (!file.value) return null;
10650
+ const fileType = file.value.type;
10651
+ const fileName = file.value.name.toLowerCase();
10652
+ if (fileType === "application/pdf" || fileName.endsWith(".pdf")) {
10653
+ return IconFileTypePdf;
10654
+ }
10655
+ if (fileType.startsWith("image/")) {
10656
+ return IconPhoto;
10657
+ }
10658
+ return IconFile;
10659
+ });
10559
10660
  const triggerFileInput = () => {
10560
10661
  var _a;
10561
10662
  if (props.disabled || file.value) return;
@@ -10778,79 +10879,44 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
10778
10879
  onDrop: handleDrop
10779
10880
  }, [
10780
10881
  !file.value && status.value === "idle" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
10781
- _cache[0] || (_cache[0] = createStaticVNode('<div class="ina-single-file-upload__icon-wrapper ina-single-file-upload__icon-wrapper--default"><svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M21 15V19C21 19.5304 20.7893 20.0391 20.4142 20.4142C20.0391 20.7893 19.5304 21 19 21H5C4.46957 21 3.96086 20.7893 3.58579 20.4142C3.21071 20.0391 3 19.5304 3 19V15" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path><path d="M7 10L12 15L17 10" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path><path d="M12 15V3" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path></svg></div>', 1)),
10782
10882
  createElementVNode("div", _hoisted_3, [
10783
- createElementVNode("div", _hoisted_4, toDisplayString(props.title), 1),
10784
- createElementVNode("div", _hoisted_5, toDisplayString(props.description), 1)
10883
+ createVNode(unref(IconUpload), { size: 24 })
10884
+ ]),
10885
+ createElementVNode("div", _hoisted_4, [
10886
+ createElementVNode("div", _hoisted_5, toDisplayString(props.title), 1),
10887
+ createElementVNode("div", _hoisted_6, toDisplayString(props.description), 1)
10785
10888
  ])
10786
10889
  ], 64)) : createCommentVNode("", true),
10787
10890
  !file.value && status.value === "uploading" ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
10788
- _cache[1] || (_cache[1] = createStaticVNode('<div class="ina-single-file-upload__icon-wrapper ina-single-file-upload__icon-wrapper--default"><svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M21 15V19C21 19.5304 20.7893 20.0391 20.4142 20.4142C20.0391 20.7893 19.5304 21 19 21H5C4.46957 21 3.96086 20.7893 3.58579 20.4142C3.21071 20.0391 3 19.5304 3 19V15" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path><path d="M7 10L12 15L17 10" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path><path d="M12 15V3" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path></svg></div>', 1)),
10789
- createElementVNode("div", _hoisted_6, [
10790
- createElementVNode("div", _hoisted_7, [
10891
+ createElementVNode("div", _hoisted_7, [
10892
+ createVNode(unref(IconUpload), { size: 24 })
10893
+ ]),
10894
+ createElementVNode("div", _hoisted_8, [
10895
+ createElementVNode("div", _hoisted_9, [
10791
10896
  createElementVNode("div", {
10792
10897
  class: "ina-single-file-upload__progress-fill",
10793
10898
  style: normalizeStyle({ width: `${progress.value}%` })
10794
10899
  }, null, 4)
10795
10900
  ]),
10796
- createElementVNode("div", _hoisted_8, " Uploading... " + toDisplayString(progress.value) + "% ", 1)
10901
+ createElementVNode("div", _hoisted_10, " Uploading... " + toDisplayString(progress.value) + "% ", 1)
10797
10902
  ])
10798
10903
  ], 64)) : createCommentVNode("", true),
10799
10904
  file.value && status.value === "success" ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
10800
- createElementVNode("div", _hoisted_9, [
10801
- isPdfFile.value ? (openBlock(), createElementBlock("svg", _hoisted_10, [..._cache[2] || (_cache[2] = [
10802
- createStaticVNode('<path d="M14 2H6C5.46957 2 4.96086 2.21071 4.58579 2.58579C4.21071 2.96086 4 3.46957 4 4V20C4 20.5304 4.21071 21.0391 4.58579 21.4142C4.96086 21.7893 5.46957 22 6 22H18C18.5304 22 19.0391 21.7893 19.4142 21.4142C19.7893 21.0391 20 20.5304 20 20V8L14 2Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path><path d="M14 2V8H20" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path><path d="M16 13H8" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path><path d="M16 17H8" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path><path d="M10 9H9H8" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>', 5)
10803
- ])])) : isImageFile.value ? (openBlock(), createElementBlock("svg", _hoisted_11, [..._cache[3] || (_cache[3] = [
10804
- createElementVNode("path", {
10805
- d: "M21 19V5C21 4.46957 20.7893 3.96086 20.4142 3.58579C20.0391 3.21071 19.5304 3 19 3H5C4.46957 3 3.96086 3.21071 3.58579 3.58579C3.21071 3.96086 3 4.46957 3 5V19C3 19.5304 3.21071 20.0391 3.58579 20.4142C3.96086 20.7893 4.46957 21 5 21H19C19.5304 21 20.0391 20.7893 20.4142 20.4142C20.7893 20.0391 21 19.5304 21 19Z",
10806
- stroke: "currentColor",
10807
- "stroke-width": "2",
10808
- "stroke-linecap": "round",
10809
- "stroke-linejoin": "round"
10810
- }, null, -1),
10811
- createElementVNode("path", {
10812
- d: "M9 9C9.55228 9 10 8.55228 10 8C10 7.44772 9.55228 7 9 7C8.44772 7 8 7.44772 8 8C8 8.55228 8.44772 9 9 9Z",
10813
- stroke: "currentColor",
10814
- "stroke-width": "2",
10815
- "stroke-linecap": "round",
10816
- "stroke-linejoin": "round"
10817
- }, null, -1),
10818
- createElementVNode("path", {
10819
- d: "M21 15L16 10L5 21",
10820
- stroke: "currentColor",
10821
- "stroke-width": "2",
10822
- "stroke-linecap": "round",
10823
- "stroke-linejoin": "round"
10824
- }, null, -1)
10825
- ])])) : (openBlock(), createElementBlock("svg", _hoisted_12, [..._cache[4] || (_cache[4] = [
10826
- createElementVNode("path", {
10827
- d: "M14 2H6C5.46957 2 4.96086 2.21071 4.58579 2.58579C4.21071 2.96086 4 3.46957 4 4V20C4 20.5304 4.21071 21.0391 4.58579 21.4142C4.96086 21.7893 5.46957 22 6 22H18C18.5304 22 19.0391 21.7893 19.4142 21.4142C19.7893 21.0391 20 20.5304 20 20V8L14 2Z",
10828
- stroke: "currentColor",
10829
- "stroke-width": "2",
10830
- "stroke-linecap": "round",
10831
- "stroke-linejoin": "round"
10832
- }, null, -1),
10833
- createElementVNode("path", {
10834
- d: "M14 2V8H20",
10835
- stroke: "currentColor",
10836
- "stroke-width": "2",
10837
- "stroke-linecap": "round",
10838
- "stroke-linejoin": "round"
10839
- }, null, -1)
10840
- ])]))
10905
+ createElementVNode("div", _hoisted_11, [
10906
+ (openBlock(), createBlock(resolveDynamicComponent(fileIconComponent.value), { size: 16 }))
10841
10907
  ]),
10842
- createElementVNode("div", _hoisted_13, [
10843
- createElementVNode("div", _hoisted_14, toDisplayString(file.value.name), 1),
10844
- createElementVNode("div", _hoisted_15, toDisplayString(props.description), 1)
10908
+ createElementVNode("div", _hoisted_12, [
10909
+ createElementVNode("div", _hoisted_13, toDisplayString(file.value.name), 1),
10910
+ createElementVNode("div", _hoisted_14, toDisplayString(props.description), 1)
10845
10911
  ]),
10846
10912
  createElementVNode("button", {
10847
10913
  type: "button",
10848
10914
  class: "ina-single-file-upload__delete-button",
10849
10915
  "aria-label": "Remove file",
10850
10916
  onClick: withModifiers(handleRemove, ["stop"])
10851
- }, [..._cache[5] || (_cache[5] = [
10852
- createStaticVNode('<svg width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M3 6H5H21" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path><path d="M8 6V4C8 3.46957 8.21071 2.96086 8.58579 2.58579C8.96086 2.21071 9.46957 2 10 2H14C14.5304 2 15.0391 2.21071 15.4142 2.58579C15.7893 2.96086 16 3.46957 16 4V6M19 6V20C19 20.5304 18.7893 21.0391 18.4142 21.4142C18.0391 21.7893 17.5304 22 17 22H7C6.46957 22 5.96086 21.7893 5.58579 21.4142C5.21071 21.0391 5 20.5304 5 20V6H19Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path><path d="M10 11V17" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path><path d="M14 11V17" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path></svg>', 1)
10853
- ])])
10917
+ }, [
10918
+ createVNode(unref(IconTrash), { size: 18 })
10919
+ ])
10854
10920
  ], 64)) : createCommentVNode("", true)
10855
10921
  ], 42, _hoisted_2)
10856
10922
  ], 2);