fds-vue-core 2.0.34 → 2.0.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"FdsBlockInfo.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Blocks/FdsBlockInfo/FdsBlockInfo.vue"],"names":[],"mappings":"AAwEA,OAAO,EAAY,KAAK,IAAI,EAAE,MAAM,KAAK,CAAA;AAEzC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAqBhD,KAAK,WAAW,GAAG;IACjB,OAAO,CAAC,EAAE,IAAI,CAAA;IACd,MAAM,CAAC,EAAE,IAAI,CAAA;IACb,UAAU,CAAC,EAAE,IAAI,CAAA;CAClB,CAAC;AAsKF,QAAA,MAAM,eAAe;;;;4EAGnB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAY1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"FdsBlockInfo.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Blocks/FdsBlockInfo/FdsBlockInfo.vue"],"names":[],"mappings":"AA8EA,OAAO,EAAsB,KAAK,IAAI,EAAE,MAAM,KAAK,CAAA;AAEnD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAyBhD,KAAK,WAAW,GAAG;IACjB,OAAO,CAAC,EAAE,IAAI,CAAA;IACd,MAAM,CAAC,EAAE,IAAI,CAAA;IACb,UAAU,CAAC,EAAE,IAAI,CAAA;CAClB,CAAC;AA6KF,QAAA,MAAM,eAAe;;;;4EAGnB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAY1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"FdsModal.vue.d.ts","sourceRoot":"","sources":["../../../src/components/FdsModal/FdsModal.vue"],"names":[],"mappings":"AAqPA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAkV5C,QAAA,IAAI,QAAQ,IAAW,EAAE,QAAQ,IAAY,CAAE;AAC/C,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GAC7C;IAAE,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,CAAC;AA8BvD,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;4EAInB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAY1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"FdsModal.vue.d.ts","sourceRoot":"","sources":["../../../src/components/FdsModal/FdsModal.vue"],"names":[],"mappings":"AAyPA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AA+U5C,QAAA,IAAI,QAAQ,IAAW,EAAE,QAAQ,IAAY,CAAE;AAC/C,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GAC7C;IAAE,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,CAAC;AA+BvD,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;4EAInB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAY1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -439,7 +439,7 @@ const _sfc_main$v = /* @__PURE__ */ vue.defineComponent({
439
439
  ]);
440
440
  const checkboxClasses = vue.computed(() => [
441
441
  "rounded-md transition-colors duration-200 accent-blue-500 m-[3px]",
442
- "peer z-40 bg-white min-w-[18px] min-h-[18px] focus-visible:outline-none",
442
+ "peer z-2 bg-white min-w-[18px] min-h-[18px] focus-visible:outline-none",
443
443
  props.disabled && "cursor-not-allowed"
444
444
  ]);
445
445
  const autoId = `fds-checkbox-${Math.random().toString(36).slice(2, 9)}`;
@@ -1174,7 +1174,7 @@ const _sfc_main$s = /* @__PURE__ */ vue.defineComponent({
1174
1174
  props.disabled && "hover:bg-transparent active:bg-transparent"
1175
1175
  ]);
1176
1176
  const inputClasses = vue.computed(() => [
1177
- "peer z-40 bg-white min-w-[18px] min-h-[18px] focus-visible:outline-none rounded-full accent-blue-500",
1177
+ "peer z-2 bg-white min-w-[18px] min-h-[18px] focus-visible:outline-none rounded-full accent-blue-500",
1178
1178
  props.disabled && "cursor-not-allowed"
1179
1179
  ]);
1180
1180
  return (_ctx, _cache) => {
@@ -2863,11 +2863,10 @@ const _hoisted_5$1 = { class: "flex items-start justify-between gap-4" };
2863
2863
  const _hoisted_6 = { class: "m-0 text-base font-main font-bold tracking-wide" };
2864
2864
  const _hoisted_7 = { class: "flex items-start gap-3" };
2865
2865
  const _hoisted_8 = { key: 1 };
2866
- const _hoisted_9 = { class: "mb-4" };
2867
- const _hoisted_10 = { class: "flex items-start justify-between gap-4" };
2868
- const _hoisted_11 = { class: "flex items-center gap-3" };
2869
- const _hoisted_12 = { class: "m-0 text-base font-main font-bold tracking-wide" };
2870
- const _hoisted_13 = { class: "flex items-start gap-3" };
2866
+ const _hoisted_9 = { class: "flex items-start justify-between gap-4" };
2867
+ const _hoisted_10 = { class: "flex items-center gap-3" };
2868
+ const _hoisted_11 = { class: "m-0 text-base font-main font-bold tracking-wide" };
2869
+ const _hoisted_12 = { class: "flex items-start gap-3" };
2871
2870
  const smallIconSize = 24;
2872
2871
  const largeIconSize = 48;
2873
2872
  const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
@@ -2880,9 +2879,12 @@ const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
2880
2879
  },
2881
2880
  setup(__props) {
2882
2881
  const props = __props;
2882
+ const hasDefaultSlot = vue.computed(() => !!vue.useSlots().default);
2883
2883
  const contentClasses = vue.computed(() => [
2884
2884
  "rounded-md bg-blue_t-100 mb-4",
2885
- props.size === "small" && "p-4 pb-6",
2885
+ !hasDefaultSlot.value && "mb-0!",
2886
+ props.size === "small" && "p-4",
2887
+ props.size === "small" && hasDefaultSlot.value && "pb-6",
2886
2888
  props.size === "large" && props.icon && "p-6"
2887
2889
  ]);
2888
2890
  const autoId = `fds-content-block-${Math.random().toString(36).slice(2, 9)}`;
@@ -2907,25 +2909,27 @@ const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
2907
2909
  ])
2908
2910
  ])
2909
2911
  ]),
2910
- vue.renderSlot(_ctx.$slots, "default")
2912
+ hasDefaultSlot.value ? vue.renderSlot(_ctx.$slots, "default", { key: 0 }) : vue.createCommentVNode("", true)
2911
2913
  ])
2912
2914
  ])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_8, [
2913
- vue.createElementVNode("div", _hoisted_9, [
2914
- vue.createElementVNode("header", _hoisted_10, [
2915
- vue.createElementVNode("div", _hoisted_11, [
2915
+ vue.createElementVNode("div", {
2916
+ class: vue.normalizeClass({ "mb-4": hasDefaultSlot.value })
2917
+ }, [
2918
+ vue.createElementVNode("header", _hoisted_9, [
2919
+ vue.createElementVNode("div", _hoisted_10, [
2916
2920
  _ctx.icon && _ctx.size === "small" ? (vue.openBlock(), vue.createBlock(_sfc_main$u, {
2917
2921
  key: 0,
2918
2922
  name: _ctx.icon,
2919
2923
  size: smallIconSize,
2920
2924
  class: "fill-blue-500"
2921
2925
  }, null, 8, ["name"])) : vue.createCommentVNode("", true),
2922
- vue.createElementVNode("h3", _hoisted_12, vue.toDisplayString(_ctx.heading), 1)
2926
+ vue.createElementVNode("h3", _hoisted_11, vue.toDisplayString(_ctx.heading), 1)
2923
2927
  ]),
2924
- vue.createElementVNode("div", _hoisted_13, [
2928
+ vue.createElementVNode("div", _hoisted_12, [
2925
2929
  vue.renderSlot(_ctx.$slots, "headerInfo")
2926
2930
  ])
2927
2931
  ])
2928
- ]),
2932
+ ], 2),
2929
2933
  vue.renderSlot(_ctx.$slots, "default")
2930
2934
  ]))
2931
2935
  ], 10, _hoisted_1$9);
@@ -3438,12 +3442,16 @@ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
3438
3442
  const slots = vue.useSlots();
3439
3443
  const isOpen = vue.ref(props.open);
3440
3444
  let cleanupFocusTrap = null;
3445
+ const hasFooter = vue.computed(() => !!slots["modal-footer"]);
3446
+ const modalOuterClasses = vue.computed(() => [
3447
+ "fixed top-0 left-0 w-full h-full overflow-auto z-100"
3448
+ ]);
3441
3449
  const modalInnerClasses = vue.computed(() => [
3442
- "fixed min-w-[288px] w-[calc(100%-5rem)] max-h-[80%] bg-white rounded-lg overflow-auto z-[99999] shadow-[0_16px_32px_rgba(12,72,153,0.12)] p-6",
3443
- "translate-x-[-50%]",
3450
+ "relative min-w-[288px] w-[calc(100%-5rem)] bg-white rounded-lg overflow-auto z-[99999] shadow-lg p-6 left-1/2",
3451
+ "top-1/2 translate-x-[-50%]",
3452
+ props.alignTop ? "max-h-[60%] top-[10rem]" : "max-h-[80%] translate-y-[-50%]",
3453
+ hasFooter.value ? "pb-0" : "",
3444
3454
  {
3445
- "left-1/2 top-1/2 translate-y-[-50%]": !props.alignTop,
3446
- "top-[10rem]": props.alignTop,
3447
3455
  "max-w-[480px]": props.size === "sm",
3448
3456
  "max-w-[588px]": props.size === "md",
3449
3457
  "max-w-[768px]": props.size === "lg",
@@ -3468,13 +3476,12 @@ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
3468
3476
  const closeLabel = vue.computed(
3469
3477
  () => props.locale === "sv" ? "Stäng dialogruta" : "Close modal window"
3470
3478
  );
3471
- const hasFooter = vue.computed(() => !!slots["modal-footer"]);
3472
3479
  const footerClasses = vue.computed(() => [
3473
3480
  "mt-6 flex flex-col gap-4 pb-8",
3474
3481
  {
3475
3482
  "sm:flex-row sm:justify-end": !props.alignLeftFooter,
3476
3483
  "sm:flex-row sm:justify-start": props.alignLeftFooter,
3477
- "sticky pt-4 pb-6 mt-4 bottom-0 bg-white shadow-[0px_-8px_16px_0px_rgba(255,255,255,0.59)] z-[2]": props.stickyFooter
3484
+ "sticky p-6 -mx-6 bg-white bottom-0 shadow-[0px_-8px_16px_0px_rgba(255,255,255,0.59)] z-[2]": props.stickyFooter
3478
3485
  }
3479
3486
  ]);
3480
3487
  const handleBackdropClick = () => {
@@ -3500,7 +3507,7 @@ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
3500
3507
  const trapFocus = () => {
3501
3508
  if (!isOpen.value) return;
3502
3509
  vue.nextTick(() => {
3503
- const modal = document.querySelector(".fds-modal__inner");
3510
+ const modal = document.querySelector(".fds-modal-inner");
3504
3511
  if (!modal) return;
3505
3512
  const tabList = getTabList(modal);
3506
3513
  if (tabList.length > 0) {
@@ -3565,12 +3572,12 @@ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
3565
3572
  return vue.openBlock(), vue.createBlock(vue.Teleport, { to: "body" }, [
3566
3573
  isOpen.value ? (vue.openBlock(), vue.createElementBlock("div", {
3567
3574
  key: 0,
3568
- class: "fixed top-0 left-0 w-full h-full overflow-auto z-100",
3569
- onClick: handleBackdropClick
3575
+ onClick: handleBackdropClick,
3576
+ class: vue.normalizeClass(modalOuterClasses.value)
3570
3577
  }, [
3571
3578
  _cache[2] || (_cache[2] = vue.createElementVNode("div", { class: "fixed top-0 left-0 w-full h-full bg-black/34 z-99" }, null, -1)),
3572
3579
  vue.createElementVNode("div", {
3573
- class: vue.normalizeClass(["fds-modal__inner", modalInnerClasses.value]),
3580
+ class: vue.normalizeClass(["fds-modal-inner", modalInnerClasses.value]),
3574
3581
  role: "alertdialog",
3575
3582
  "aria-modal": "true",
3576
3583
  onClick: _cache[1] || (_cache[1] = vue.withModifiers(() => {
@@ -3608,12 +3615,12 @@ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
3608
3615
  vue.renderSlot(_ctx.$slots, "modal-footer", {}, void 0, true)
3609
3616
  ], 2)) : vue.createCommentVNode("", true)
3610
3617
  ], 2)
3611
- ])) : vue.createCommentVNode("", true)
3618
+ ], 2)) : vue.createCommentVNode("", true)
3612
3619
  ]);
3613
3620
  };
3614
3621
  }
3615
3622
  });
3616
- const FdsModal = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-8b537fc0"]]);
3623
+ const FdsModal = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-9a84f324"]]);
3617
3624
  const _hoisted_1$3 = ["id"];
3618
3625
  const _hoisted_2$1 = { class: "flex items-center justify-start gap-1 w-[100px]" };
3619
3626
  const _hoisted_3 = { class: "flex items-center justify-center w-auto gap-2 order-0 sm:order-0" };