fds-vue-core 2.1.31 → 2.1.33

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.
@@ -980,7 +980,7 @@ const _hoisted_4$7 = {
980
980
  const _hoisted_5$6 = { class: "flex items-start justify-between gap-4" };
981
981
  const _hoisted_6$4 = { class: "m-0 text-base font-main font-bold tracking-wide" };
982
982
  const _hoisted_7$3 = { class: "flex items-start gap-3" };
983
- const _hoisted_8$3 = {
983
+ const _hoisted_8$2 = {
984
984
  key: 1,
985
985
  class: "mb-0-last-child"
986
986
  };
@@ -1033,7 +1033,7 @@ const _sfc_main$q = /* @__PURE__ */ vue.defineComponent({
1033
1033
  ])
1034
1034
  ])
1035
1035
  ])) : vue.createCommentVNode("", true),
1036
- vue.unref(hasSlot) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_8$3, [
1036
+ vue.unref(hasSlot) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_8$2, [
1037
1037
  vue.renderSlot(_ctx.$slots, "default")
1038
1038
  ])) : vue.createCommentVNode("", true)
1039
1039
  ])
@@ -7850,7 +7850,7 @@ const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
7850
7850
  const showPasswordToggle = vue.computed(
7851
7851
  () => inputType.value === "password" && internalValue.value !== void 0 && internalValue.value !== null && String(internalValue.value).length > 0
7852
7852
  );
7853
- const wrapperClass = vue.computed(() => attrs.class);
7853
+ const externalClass = vue.computed(() => attrs.class);
7854
7854
  const inputClasses = vue.computed(() => [
7855
7855
  "block rounded-md border border-gray-500 px-3 py-[calc(0.75rem-1px)]",
7856
7856
  maxlength.value ? "" : "w-full",
@@ -7961,7 +7961,7 @@ const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
7961
7961
  );
7962
7962
  return (_ctx, _cache) => {
7963
7963
  return vue.openBlock(), vue.createElementBlock("div", {
7964
- class: vue.normalizeClass(["w-full mb-4", wrapperClass.value])
7964
+ class: vue.normalizeClass(["w-full mb-6", externalClass.value])
7965
7965
  }, [
7966
7966
  vue.createElementVNode("div", {
7967
7967
  class: vue.normalizeClass({ "flex flex-row gap-4": props.labelLeft })
@@ -8251,7 +8251,7 @@ const _hoisted_7$2 = {
8251
8251
  key: 0,
8252
8252
  class: "block m-0 font-light p-6 border-b border-gray-200 rounded-t-md"
8253
8253
  };
8254
- const _hoisted_8$2 = {
8254
+ const _hoisted_8$1 = {
8255
8255
  key: 1,
8256
8256
  class: "block m-0 font-light p-4 border-b border-gray-200 rounded-t-md"
8257
8257
  };
@@ -8688,7 +8688,7 @@ const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
8688
8688
  size: "48px"
8689
8689
  })
8690
8690
  ])) : displayedItems.value && displayedItems.value.length ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
8691
- searchTerm.value && searchTerm.value.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_7$2, vue.toDisplayString(displayedItems.value.length) + " " + vue.toDisplayString(__props.searchContext.linkWord) + " " + vue.toDisplayString(totalCount.value) + " " + vue.toDisplayString(__props.searchContext.context), 1)) : !searchTerm.value.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_8$2, vue.toDisplayString(totalCount.value) + " " + vue.toDisplayString(__props.searchContext.context), 1)) : vue.createCommentVNode("", true),
8691
+ searchTerm.value && searchTerm.value.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_7$2, vue.toDisplayString(displayedItems.value.length) + " " + vue.toDisplayString(__props.searchContext.linkWord) + " " + vue.toDisplayString(totalCount.value) + " " + vue.toDisplayString(__props.searchContext.context), 1)) : !searchTerm.value.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_8$1, vue.toDisplayString(totalCount.value) + " " + vue.toDisplayString(__props.searchContext.context), 1)) : vue.createCommentVNode("", true),
8692
8692
  vue.createElementVNode("ul", {
8693
8693
  class: "block m-0 list-none p-0",
8694
8694
  role: "listbox",
@@ -9199,6 +9199,7 @@ const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
9199
9199
  };
9200
9200
  });
9201
9201
  const hasLabelSlot = useHasSlot();
9202
+ const externalClass = vue.computed(() => attrs.class);
9202
9203
  const wrapperClasses = vue.computed(() => ["block relative flex items-center mb-2 last:mb-0"]);
9203
9204
  const innerWrapperClasses = vue.computed(() => [
9204
9205
  "flex p-0.5 items-start rounded-md",
@@ -9275,7 +9276,7 @@ const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
9275
9276
  );
9276
9277
  return (_ctx, _cache) => {
9277
9278
  return vue.openBlock(), vue.createElementBlock("div", {
9278
- class: vue.normalizeClass(wrapperClasses.value)
9279
+ class: vue.normalizeClass([wrapperClasses.value, externalClass.value])
9279
9280
  }, [
9280
9281
  vue.createElementVNode("label", vue.mergeProps({
9281
9282
  for: inputId.value,
@@ -9305,7 +9306,7 @@ const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
9305
9306
  }
9306
9307
  });
9307
9308
  const _hoisted_1$8 = ["for"];
9308
- const _hoisted_2$6 = ["name", "value", "disabled", "required"];
9309
+ const _hoisted_2$6 = ["name", "value", "checked", "disabled", "required"];
9309
9310
  const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
9310
9311
  ...{
9311
9312
  inheritAttrs: false
@@ -9322,7 +9323,7 @@ const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
9322
9323
  "modelValue": { default: void 0, required: false },
9323
9324
  "modelModifiers": {}
9324
9325
  }),
9325
- emits: /* @__PURE__ */ vue.mergeModels(["update:modelValue", "change", "input"], ["update:modelValue"]),
9326
+ emits: /* @__PURE__ */ vue.mergeModels(["update:modelValue", "update:checked", "change", "input"], ["update:modelValue"]),
9326
9327
  setup(__props, { emit: __emit }) {
9327
9328
  const modelValue = vue.useModel(__props, "modelValue");
9328
9329
  const props = __props;
@@ -9353,16 +9354,34 @@ const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
9353
9354
  };
9354
9355
  });
9355
9356
  const hasLabelSlot = useHasSlot();
9356
- const radioModel = vue.computed({
9357
- get() {
9358
- return modelValue.value;
9359
- },
9360
- set(newChecked) {
9361
- emit("update:modelValue", newChecked);
9362
- emit("change", newChecked);
9363
- emit("input", newChecked);
9357
+ const externalClass = vue.computed(() => attrs.class);
9358
+ const isChecked = vue.computed(() => {
9359
+ if (modelValue.value === void 0) {
9360
+ return props.checked ?? false;
9364
9361
  }
9362
+ if (props.value !== void 0) {
9363
+ return modelValue.value === props.value;
9364
+ }
9365
+ return false;
9365
9366
  });
9367
+ function handleChange(e) {
9368
+ const target = e.target;
9369
+ const val = props.value;
9370
+ if (modelValue.value === void 0) {
9371
+ if (target.checked && val !== void 0) {
9372
+ emit("update:checked", true);
9373
+ emit("change", val);
9374
+ emit("input", val);
9375
+ } else {
9376
+ emit("update:checked", false);
9377
+ emit("change", val ?? false);
9378
+ }
9379
+ } else if (target.checked && val !== void 0) {
9380
+ emit("update:modelValue", val);
9381
+ emit("change", val);
9382
+ emit("input", val);
9383
+ }
9384
+ }
9366
9385
  const wrapperClasses = vue.computed(() => ["block relative flex items-center mb-2 last:mb-0"]);
9367
9386
  const innerWrapperClasses = vue.computed(() => [
9368
9387
  "flex p-0.5 items-start rounded-l-xl rounded-r-md",
@@ -9376,23 +9395,22 @@ const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
9376
9395
  ]);
9377
9396
  return (_ctx, _cache) => {
9378
9397
  return vue.openBlock(), vue.createElementBlock("div", {
9379
- class: vue.normalizeClass(wrapperClasses.value)
9398
+ class: vue.normalizeClass([wrapperClasses.value, externalClass.value])
9380
9399
  }, [
9381
9400
  vue.createElementVNode("label", vue.mergeProps({
9382
9401
  for: inputId.value,
9383
9402
  class: [innerWrapperClasses.value, { "cursor-not-allowed": props.disabled }]
9384
9403
  }, labelAttrs.value), [
9385
- vue.withDirectives(vue.createElementVNode("input", vue.mergeProps(inputAttrs.value, {
9404
+ vue.createElementVNode("input", vue.mergeProps(inputAttrs.value, {
9386
9405
  name: vue.unref(name),
9387
9406
  value: props.value,
9388
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => radioModel.value = $event),
9407
+ checked: isChecked.value,
9408
+ onChange: handleChange,
9389
9409
  disabled: props.disabled,
9390
9410
  required: props.required,
9391
9411
  type: "radio",
9392
9412
  class: [inputClasses.value, "m-[2px]"]
9393
- }), null, 16, _hoisted_2$6), [
9394
- [vue.vModelRadio, radioModel.value]
9395
- ]),
9413
+ }), null, 16, _hoisted_2$6),
9396
9414
  vue.unref(hasLabelSlot) || props.label ? (vue.openBlock(), vue.createElementBlock("span", {
9397
9415
  key: 0,
9398
9416
  class: vue.normalizeClass(["relative inline-block leading-6 pl-1 select-none", { "cursor-not-allowed": props.disabled }])
@@ -9416,7 +9434,7 @@ const _hoisted_6$2 = {
9416
9434
  class: "items-center max-h-[28px]"
9417
9435
  };
9418
9436
  const _hoisted_7$1 = { class: "flex flex-col gap-2" };
9419
- const _hoisted_8$1 = ["onClick"];
9437
+ const _hoisted_8 = ["onClick"];
9420
9438
  const _hoisted_9 = { key: 0 };
9421
9439
  const popoverWidth = 327;
9422
9440
  const popoverHeight = 80;
@@ -9713,7 +9731,7 @@ const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
9713
9731
  onBlur: closePopover,
9714
9732
  label: option.label
9715
9733
  }, null, 8, ["modelValue", "id", "name", "value", "label"])
9716
- ], 8, _hoisted_8$1);
9734
+ ], 8, _hoisted_8);
9717
9735
  }), 64))
9718
9736
  ]),
9719
9737
  vue.createVNode(_sfc_main$v, vue.mergeProps({
@@ -10046,21 +10064,20 @@ const _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({
10046
10064
  };
10047
10065
  }
10048
10066
  });
10049
- const _hoisted_1$4 = { class: "w-fit mb-4" };
10050
- const _hoisted_2$3 = ["for"];
10051
- const _hoisted_3$2 = {
10067
+ const _hoisted_1$4 = ["for"];
10068
+ const _hoisted_2$3 = {
10052
10069
  key: 1,
10053
10070
  class: "font-thin mb-1"
10054
10071
  };
10055
- const _hoisted_4$2 = { class: "flex relative" };
10056
- const _hoisted_5$2 = {
10072
+ const _hoisted_3$2 = { class: "flex relative" };
10073
+ const _hoisted_4$2 = {
10057
10074
  key: 0,
10058
10075
  value: "",
10059
10076
  disabled: ""
10060
10077
  };
10061
- const _hoisted_6$1 = ["value", "disabled"];
10062
- const _hoisted_7 = { class: "absolute right-3 top-1/2 -translate-y-1/2 pointer-events-none" };
10063
- const _hoisted_8 = {
10078
+ const _hoisted_5$2 = ["value", "disabled"];
10079
+ const _hoisted_6$1 = { class: "absolute right-3 top-1/2 -translate-y-1/2 pointer-events-none" };
10080
+ const _hoisted_7 = {
10064
10081
  key: 2,
10065
10082
  class: "text-red-600 font-bold mt-1"
10066
10083
  };
@@ -10118,6 +10135,7 @@ const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
10118
10135
  });
10119
10136
  const slots = vue.useSlots();
10120
10137
  const hasDefaultSlot = vue.computed(() => !!slots.default);
10138
+ const externalClass = vue.computed(() => attrs.class);
10121
10139
  const showInvalidMessage = vue.computed(
10122
10140
  () => props.valid === false && !props.optional && props.invalidMessage && !props.disabled
10123
10141
  );
@@ -10143,14 +10161,16 @@ const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
10143
10161
  emit("input", ev);
10144
10162
  }
10145
10163
  return (_ctx, _cache) => {
10146
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$4, [
10164
+ return vue.openBlock(), vue.createElementBlock("div", {
10165
+ class: vue.normalizeClass(["w-fit mb-6", externalClass.value])
10166
+ }, [
10147
10167
  __props.label ? (vue.openBlock(), vue.createElementBlock("label", vue.mergeProps({
10148
10168
  key: 0,
10149
10169
  for: selectId.value,
10150
10170
  class: ["block font-bold text-gray-900 cursor-pointer", { "mb-0": __props.meta, "mb-1": !__props.meta }]
10151
- }, labelAttrs.value), vue.toDisplayString(__props.label), 17, _hoisted_2$3)) : vue.createCommentVNode("", true),
10152
- __props.meta ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$2, vue.toDisplayString(__props.meta), 1)) : vue.createCommentVNode("", true),
10153
- vue.createElementVNode("div", _hoisted_4$2, [
10171
+ }, labelAttrs.value), vue.toDisplayString(__props.label), 17, _hoisted_1$4)) : vue.createCommentVNode("", true),
10172
+ __props.meta ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$3, vue.toDisplayString(__props.meta), 1)) : vue.createCommentVNode("", true),
10173
+ vue.createElementVNode("div", _hoisted_3$2, [
10154
10174
  vue.withDirectives(vue.createElementVNode("select", vue.mergeProps({
10155
10175
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => internalValue.value = $event),
10156
10176
  class: selectClasses.value
@@ -10158,18 +10178,18 @@ const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
10158
10178
  onChange: handleChange,
10159
10179
  onInput: _cache[1] || (_cache[1] = (e) => emit("input", e))
10160
10180
  }), [
10161
- vue.unref(placeholder) && !hasDefaultSlot.value ? (vue.openBlock(), vue.createElementBlock("option", _hoisted_5$2, vue.toDisplayString(vue.unref(placeholder)), 1)) : vue.createCommentVNode("", true),
10181
+ vue.unref(placeholder) && !hasDefaultSlot.value ? (vue.openBlock(), vue.createElementBlock("option", _hoisted_4$2, vue.toDisplayString(vue.unref(placeholder)), 1)) : vue.createCommentVNode("", true),
10162
10182
  !hasDefaultSlot.value && __props.options ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 1 }, vue.renderList(__props.options, (option) => {
10163
10183
  return vue.openBlock(), vue.createElementBlock("option", {
10164
10184
  key: option.value,
10165
10185
  value: option.value,
10166
10186
  disabled: option.disabled
10167
- }, vue.toDisplayString(option.label), 9, _hoisted_6$1);
10187
+ }, vue.toDisplayString(option.label), 9, _hoisted_5$2);
10168
10188
  }), 128)) : vue.renderSlot(_ctx.$slots, "default", { key: 2 })
10169
10189
  ], 16), [
10170
10190
  [vue.vModelSelect, internalValue.value]
10171
10191
  ]),
10172
- vue.createElementVNode("div", _hoisted_7, [
10192
+ vue.createElementVNode("div", _hoisted_6$1, [
10173
10193
  vue.createVNode(_sfc_main$w, {
10174
10194
  name: "arrowDown",
10175
10195
  size: 24,
@@ -10181,8 +10201,8 @@ const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
10181
10201
  }, null, 8, ["class"])
10182
10202
  ])
10183
10203
  ]),
10184
- showInvalidMessage.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_8, vue.toDisplayString(__props.invalidMessage), 1)) : vue.createCommentVNode("", true)
10185
- ]);
10204
+ showInvalidMessage.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_7, vue.toDisplayString(__props.invalidMessage), 1)) : vue.createCommentVNode("", true)
10205
+ ], 2);
10186
10206
  };
10187
10207
  }
10188
10208
  });
@@ -10223,7 +10243,7 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
10223
10243
  const props = __props;
10224
10244
  const emit = __emit;
10225
10245
  const { id, rows, attrs } = useAttrsWithDefaults(props);
10226
- const wrapperClass = vue.computed(() => attrs.class);
10246
+ const externalClass = vue.computed(() => attrs.class);
10227
10247
  const autoId = `fds-textarea-${Math.random().toString(36).slice(2, 9)}`;
10228
10248
  const textareaId = vue.computed(() => id.value && id.value.trim() !== "" ? id.value : autoId);
10229
10249
  const labelAttrs = vue.computed(() => {
@@ -10286,7 +10306,7 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
10286
10306
  }
10287
10307
  return (_ctx, _cache) => {
10288
10308
  return vue.openBlock(), vue.createElementBlock("div", {
10289
- class: vue.normalizeClass(["w-full mb-4", wrapperClass.value])
10309
+ class: vue.normalizeClass(["w-full mb-6", externalClass.value])
10290
10310
  }, [
10291
10311
  __props.label ? (vue.openBlock(), vue.createElementBlock("label", vue.mergeProps({
10292
10312
  key: 0,