fds-vue-core 4.0.1 → 4.1.0

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.
@@ -546,7 +546,7 @@ const icons = {
546
546
  </defs>
547
547
  </svg>`
548
548
  };
549
- const _hoisted_1$p = ["innerHTML"];
549
+ const _hoisted_1$q = ["innerHTML"];
550
550
  const _sfc_main$y = /* @__PURE__ */ vue.defineComponent({
551
551
  __name: "FdsIcon",
552
552
  props: {
@@ -580,7 +580,7 @@ const _sfc_main$y = /* @__PURE__ */ vue.defineComponent({
580
580
  return vue.openBlock(), vue.createElementBlock("span", vue.mergeProps({
581
581
  class: "flex items-center justify-center align-middle",
582
582
  style: { width: pixelSize.value, height: pixelSize.value }
583
- }, rootAttrs.value, { innerHTML: svgHtml.value }), null, 16, _hoisted_1$p);
583
+ }, rootAttrs.value, { innerHTML: svgHtml.value }), null, 16, _hoisted_1$q);
584
584
  };
585
585
  }
586
586
  });
@@ -644,7 +644,7 @@ const _sfc_main$x = /* @__PURE__ */ vue.defineComponent({
644
644
  };
645
645
  }
646
646
  });
647
- const _hoisted_1$o = { class: "flex items-start gap-2" };
647
+ const _hoisted_1$p = { class: "flex items-start gap-2" };
648
648
  const _hoisted_2$j = { class: "h-7 flex items-center" };
649
649
  const _hoisted_3$c = { class: "leading-7" };
650
650
  const _hoisted_4$b = { class: "relative h-7" };
@@ -708,7 +708,7 @@ const _sfc_main$w = /* @__PURE__ */ vue.defineComponent({
708
708
  key: 0,
709
709
  class: vue.normalizeClass(["font-bold w-full justify-between items-start flex gap-2", { "mb-2": (isExpanded.value || !__props.collapsable) && vue.unref(hasSlot) }])
710
710
  }, [
711
- vue.createElementVNode("div", _hoisted_1$o, [
711
+ vue.createElementVNode("div", _hoisted_1$p, [
712
712
  vue.createElementVNode("div", _hoisted_2$j, [
713
713
  vue.createVNode(_sfc_main$y, {
714
714
  name: "alert",
@@ -748,7 +748,7 @@ const _sfc_main$w = /* @__PURE__ */ vue.defineComponent({
748
748
  };
749
749
  }
750
750
  });
751
- const _hoisted_1$n = ["id"];
751
+ const _hoisted_1$o = ["id"];
752
752
  const _hoisted_2$i = {
753
753
  key: 0,
754
754
  class: "flex items-start justify-between gap-4 mb-4"
@@ -813,7 +813,7 @@ const _sfc_main$v = /* @__PURE__ */ vue.defineComponent({
813
813
  vue.createElementVNode("div", _hoisted_5$9, [
814
814
  vue.renderSlot(_ctx.$slots, "default")
815
815
  ])
816
- ], 16, _hoisted_1$n);
816
+ ], 16, _hoisted_1$o);
817
817
  };
818
818
  }
819
819
  });
@@ -865,7 +865,7 @@ const _sfc_main$u = /* @__PURE__ */ vue.defineComponent({
865
865
  };
866
866
  }
867
867
  });
868
- const _hoisted_1$m = { class: "leading-6 w-full flex justify-between gap-4" };
868
+ const _hoisted_1$n = { class: "leading-6 w-full flex justify-between gap-4" };
869
869
  const _hoisted_2$h = {
870
870
  key: 0,
871
871
  class: "flex items-center mr-4"
@@ -947,7 +947,7 @@ const _sfc_main$t = /* @__PURE__ */ vue.defineComponent({
947
947
  vue.createElementVNode("span", {
948
948
  class: vue.normalizeClass(buttonRowClasses.value)
949
949
  }, [
950
- vue.createElementVNode("span", _hoisted_1$m, [
950
+ vue.createElementVNode("span", _hoisted_1$n, [
951
951
  vue.createElementVNode("span", {
952
952
  class: vue.normalizeClass({ "inline-flex items-start": __props.preIcon })
953
953
  }, [
@@ -998,7 +998,7 @@ const _sfc_main$t = /* @__PURE__ */ vue.defineComponent({
998
998
  };
999
999
  }
1000
1000
  });
1001
- const _hoisted_1$l = ["id"];
1001
+ const _hoisted_1$m = ["id"];
1002
1002
  const _hoisted_2$g = {
1003
1003
  key: 0,
1004
1004
  class: "flex items-start gap-4"
@@ -1098,11 +1098,11 @@ const _sfc_main$s = /* @__PURE__ */ vue.defineComponent({
1098
1098
  vue.renderSlot(_ctx.$slots, "default")
1099
1099
  ])
1100
1100
  ]))
1101
- ], 16, _hoisted_1$l);
1101
+ ], 16, _hoisted_1$m);
1102
1102
  };
1103
1103
  }
1104
1104
  });
1105
- const _hoisted_1$k = { class: "mb-0-last-child" };
1105
+ const _hoisted_1$l = { class: "mb-0-last-child" };
1106
1106
  const _hoisted_2$f = {
1107
1107
  key: 0,
1108
1108
  class: "flex items-end"
@@ -1215,7 +1215,7 @@ const _sfc_main$r = /* @__PURE__ */ vue.defineComponent({
1215
1215
  vue.createElementVNode("div", {
1216
1216
  class: vue.normalizeClass(slotWrapperClasses.value)
1217
1217
  }, [
1218
- vue.createElementVNode("div", _hoisted_1$k, [
1218
+ vue.createElementVNode("div", _hoisted_1$l, [
1219
1219
  vue.renderSlot(_ctx.$slots, "default")
1220
1220
  ]),
1221
1221
  vue.unref(hasStickerSlot) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$f, [
@@ -1236,7 +1236,7 @@ const _sfc_main$r = /* @__PURE__ */ vue.defineComponent({
1236
1236
  };
1237
1237
  }
1238
1238
  });
1239
- const _hoisted_1$j = ["aria-label"];
1239
+ const _hoisted_1$k = ["aria-label"];
1240
1240
  const _sfc_main$q = /* @__PURE__ */ vue.defineComponent({
1241
1241
  __name: "FdsSpinner",
1242
1242
  props: {
@@ -1317,11 +1317,11 @@ const _sfc_main$q = /* @__PURE__ */ vue.defineComponent({
1317
1317
  key: 0,
1318
1318
  class: vue.normalizeClass(__props.labelPosition === "bottom" ? "font-bold" : "")
1319
1319
  }, vue.toDisplayString(__props.label), 3)) : vue.createCommentVNode("", true)
1320
- ], 16, _hoisted_1$j);
1320
+ ], 16, _hoisted_1$k);
1321
1321
  };
1322
1322
  }
1323
1323
  });
1324
- const _hoisted_1$i = ["aria-disabled"];
1324
+ const _hoisted_1$j = ["aria-disabled"];
1325
1325
  const _hoisted_2$e = { class: "pt-0.5" };
1326
1326
  const elBase$2 = "box-border appearance-none inline-flex items-start justify-center w-fit shadow-none p-0.5 text-base select-none m-0 rounded-md text-left align-start no-underline transition-[box-shadow,border-color,background-color] duration-200 font-main font-bold text-base leading-5 tracking-normal focus-visible:outline-dashed focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-blue-500";
1327
1327
  const _sfc_main$p = /* @__PURE__ */ vue.defineComponent({
@@ -1423,11 +1423,11 @@ const _sfc_main$p = /* @__PURE__ */ vue.defineComponent({
1423
1423
  ]),
1424
1424
  _: 1
1425
1425
  }, 16, ["type", "disabled", "target", "rel", "data-testid", "class"]))
1426
- ], 10, _hoisted_1$i);
1426
+ ], 10, _hoisted_1$j);
1427
1427
  };
1428
1428
  }
1429
1429
  });
1430
- const _hoisted_1$h = {
1430
+ const _hoisted_1$i = {
1431
1431
  key: 0,
1432
1432
  class: "flex items-center gap-2 h-7"
1433
1433
  };
@@ -1493,7 +1493,7 @@ const _sfc_main$o = /* @__PURE__ */ vue.defineComponent({
1493
1493
  }
1494
1494
  });
1495
1495
  return (_ctx, _cache) => {
1496
- return isCopied.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$h, [
1496
+ return isCopied.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$i, [
1497
1497
  vue.createVNode(_sfc_main$y, { name: "bigSuccess" }),
1498
1498
  vue.createElementVNode("span", null, vue.toDisplayString(props.copiedText), 1)
1499
1499
  ])) : (vue.openBlock(), vue.createBlock(_sfc_main$p, {
@@ -4131,7 +4131,7 @@ function useDownload() {
4131
4131
  isDownloading
4132
4132
  };
4133
4133
  }
4134
- const _hoisted_1$g = ["disabled", "aria-disabled"];
4134
+ const _hoisted_1$h = ["disabled", "aria-disabled"];
4135
4135
  const _sfc_main$n = /* @__PURE__ */ vue.defineComponent({
4136
4136
  __name: "FdsButtonDownload",
4137
4137
  props: {
@@ -4240,11 +4240,11 @@ const _sfc_main$n = /* @__PURE__ */ vue.defineComponent({
4240
4240
  }, null, 8, ["class"])
4241
4241
  ], 2),
4242
4242
  vue.createTextVNode(" " + vue.toDisplayString(__props.text), 1)
4243
- ], 16, _hoisted_1$g);
4243
+ ], 16, _hoisted_1$h);
4244
4244
  };
4245
4245
  }
4246
4246
  });
4247
- const _hoisted_1$f = ["aria-disabled"];
4247
+ const _hoisted_1$g = ["aria-disabled"];
4248
4248
  const _hoisted_2$d = { key: 2 };
4249
4249
  const elBase$1 = "fds-button-primary box-border appearance-none inline-flex items-center justify-center select-none w-full min-h-0 min-w-12 m-0 rounded-lg text-center align-middle whitespace-nowrap no-underline shadow-[0_2px_4px_rgba(12,72,153,0.12)] transition-[box-shadow,border-color,background-color] duration-200 font-main font-bold text-base leading-5 tracking-normal focus-visible:outline-dashed focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-blue-500";
4250
4250
  const variantClasses$1 = "bg-red-600 border border-red-700 text-white hover:bg-red-700 active:bg-red-800 active:border-red-800";
@@ -4346,11 +4346,11 @@ const _sfc_main$m = /* @__PURE__ */ vue.defineComponent({
4346
4346
  ]),
4347
4347
  _: 1
4348
4348
  }, 16, ["type", "disabled", "data-testid", "class"]))
4349
- ], 10, _hoisted_1$f);
4349
+ ], 10, _hoisted_1$g);
4350
4350
  };
4351
4351
  }
4352
4352
  });
4353
- const _hoisted_1$e = ["aria-disabled"];
4353
+ const _hoisted_1$f = ["aria-disabled"];
4354
4354
  const _hoisted_2$c = { key: 2 };
4355
4355
  const elBase = "fds-button-secondary box-border appearance-none inline-flex items-center justify-center select-none w-full min-h-0 min-w-12 m-0 rounded-lg text-center align-middle whitespace-nowrap no-underline shadow-[0_2px_4px_rgba(12,72,153,0.12)] transition-[box-shadow,border-color,background-color] duration-200 font-main font-bold text-base leading-5 tracking-normal focus-visible:outline-dashed focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-blue-500";
4356
4356
  const variantClasses = "bg-white border-2 border-blue-500 text-blue-600 hover:bg-blue_t-100 hover:border-blue-500 hover:text-blue-600 active:bg-blue_t-200 active:border-blue-500 active:text-blue-600";
@@ -4453,7 +4453,7 @@ const _sfc_main$l = /* @__PURE__ */ vue.defineComponent({
4453
4453
  ]),
4454
4454
  _: 1
4455
4455
  }, 16, ["type", "disabled", "data-testid", "class"]))
4456
- ], 10, _hoisted_1$e);
4456
+ ], 10, _hoisted_1$f);
4457
4457
  };
4458
4458
  }
4459
4459
  });
@@ -4482,7 +4482,46 @@ function useDevMode() {
4482
4482
  }
4483
4483
  return devModeInstance;
4484
4484
  }
4485
- const _hoisted_1$d = { class: "flex justify-between mb-4" };
4485
+ const breakpoints = [
4486
+ { key: "2xs", min: 320 },
4487
+ { key: "xs", min: 360 },
4488
+ { key: "sm", min: 480 },
4489
+ { key: "md", min: 588 },
4490
+ { key: "lg", min: 824 },
4491
+ { key: "xl", min: 920 },
4492
+ { key: "2xl", min: 964 },
4493
+ { key: "3xl", min: 1068 },
4494
+ { key: "4xl", min: 1268 },
4495
+ { key: "5xl", min: 1436 }
4496
+ ];
4497
+ function useViewportBreakpoint() {
4498
+ const currentBreakpoint = vue.ref(null);
4499
+ const windowWidth = vue.ref(0);
4500
+ const updateBreakpoint = () => {
4501
+ if (typeof window === "undefined") return;
4502
+ windowWidth.value = window.innerWidth;
4503
+ let activeBreakpoint = null;
4504
+ for (const bp of breakpoints) {
4505
+ if (windowWidth.value >= bp.min) {
4506
+ activeBreakpoint = bp.key;
4507
+ }
4508
+ }
4509
+ currentBreakpoint.value = activeBreakpoint;
4510
+ };
4511
+ vue.onMounted(() => {
4512
+ updateBreakpoint();
4513
+ window.addEventListener("resize", updateBreakpoint);
4514
+ });
4515
+ vue.onUnmounted(() => {
4516
+ window.removeEventListener("resize", updateBreakpoint);
4517
+ });
4518
+ return {
4519
+ currentBreakpoint,
4520
+ windowWidth,
4521
+ breakpoints
4522
+ };
4523
+ }
4524
+ const _hoisted_1$e = { class: "flex justify-between mb-4" };
4486
4525
  const _hoisted_2$b = { class: "mb-0-last-child" };
4487
4526
  const _sfc_main$k = /* @__PURE__ */ vue.defineComponent({
4488
4527
  __name: "FdsModal",
@@ -4672,7 +4711,7 @@ const _sfc_main$k = /* @__PURE__ */ vue.defineComponent({
4672
4711
  onClick: _cache[1] || (_cache[1] = vue.withModifiers(() => {
4673
4712
  }, ["stop"]))
4674
4713
  }), [
4675
- vue.createElementVNode("div", _hoisted_1$d, [
4714
+ vue.createElementVNode("div", _hoisted_1$e, [
4676
4715
  vue.createElementVNode("h3", {
4677
4716
  tabindex: "-1",
4678
4717
  class: vue.normalizeClass(headerTitleClasses.value)
@@ -4855,7 +4894,7 @@ const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
4855
4894
  };
4856
4895
  }
4857
4896
  });
4858
- const _hoisted_1$c = { class: "space-y-6" };
4897
+ const _hoisted_1$d = { class: "space-y-6" };
4859
4898
  const _hoisted_2$a = {
4860
4899
  key: 0,
4861
4900
  class: "text-sm text-gray-600"
@@ -5078,7 +5117,7 @@ const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
5078
5117
  "onUpdate:open": handleOpenChange
5079
5118
  }, {
5080
5119
  default: vue.withCtx(() => [
5081
- vue.createElementVNode("div", _hoisted_1$c, [
5120
+ vue.createElementVNode("div", _hoisted_1$d, [
5082
5121
  vue.createVNode(_sfc_main$j, { variant: "primary" }, {
5083
5122
  default: vue.withCtx(() => [
5084
5123
  vue.createVNode(_sfc_main$i, {
@@ -5347,6 +5386,7 @@ const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
5347
5386
  };
5348
5387
  }
5349
5388
  });
5389
+ const _hoisted_1$c = ["title"];
5350
5390
  const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
5351
5391
  __name: "FdsDevMode",
5352
5392
  props: {
@@ -5355,6 +5395,7 @@ const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
5355
5395
  setup(__props) {
5356
5396
  const props = __props;
5357
5397
  const { isDevMode, toggleDevMode } = useDevMode();
5398
+ const { currentBreakpoint, windowWidth } = useViewportBreakpoint();
5358
5399
  const hideEnvBanner = vue.ref(false);
5359
5400
  const isStorageModalOpen = vue.ref(false);
5360
5401
  const environmentKey = vue.computed(() => props.environment ?? null);
@@ -5416,6 +5457,11 @@ const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
5416
5457
  key: 0,
5417
5458
  class: vue.normalizeClass(["fixed bottom-0 right-12 font-bold m-6 px-3 py-1 rounded-xl z-50 flex items-center gap-1", envBannerClasses.value])
5418
5459
  }, [
5460
+ vue.unref(currentBreakpoint) ? (vue.openBlock(), vue.createElementBlock("span", {
5461
+ key: 0,
5462
+ class: "mx-1 px-2 py-1 rounded text-xs font-mono bg-white bg-opacity-20 text-black",
5463
+ title: `${vue.unref(windowWidth)}px`
5464
+ }, vue.toDisplayString(vue.unref(currentBreakpoint)), 9, _hoisted_1$c)) : vue.createCommentVNode("", true),
5419
5465
  vue.createElementVNode("span", null, vue.toDisplayString(environmentText.value), 1),
5420
5466
  vue.createElementVNode("button", {
5421
5467
  onClick: _cache[0] || (_cache[0] = //@ts-ignore
@@ -8737,7 +8783,7 @@ const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
8737
8783
  maxlength.value ? "" : "w-full",
8738
8784
  inputPaddingRight.value,
8739
8785
  "focus:outline-2 focus:outline-blue-500 -outline-offset-2 focus:border-transparent",
8740
- props.disabled ? "text-gray-600 outline-dashed outline-2 outline-gray-400 cursor-not-allowed border-transparent" : "bg-white",
8786
+ props.disabled ? "text-gray-800 outline-dashed outline-2 outline-gray-400 cursor-not-allowed border-transparent" : "bg-white",
8741
8787
  isInvalid.value && "outline-2 outline-red-600",
8742
8788
  props.inputClass
8743
8789
  ]);
@@ -11133,7 +11179,7 @@ const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
11133
11179
  "block w-full rounded-md border border-gray-500 px-3 py-2 pr-10 h-12",
11134
11180
  "focus:outline-2 focus:outline-blue-500 focus:border-transparent",
11135
11181
  "appearance-none",
11136
- disabled.value ? "outline-dashed text-gray-600 outline-2 -outline-offset-2 outline-gray-400 cursor-not-allowed border-transparent" : "bg-white cursor-pointer",
11182
+ disabled.value ? "outline-dashed text-gray-800 outline-2 -outline-offset-2 outline-gray-400 cursor-not-allowed border-transparent" : "bg-white cursor-pointer",
11137
11183
  isInvalid.value && !disabled.value && "outline-2 -outline-offset-2 outline-red-600 text-red-600",
11138
11184
  props.inputClass
11139
11185
  ]);
@@ -11268,7 +11314,7 @@ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
11268
11314
  const inputClasses = vue.computed(() => [
11269
11315
  "block w-full rounded-md border border-gray-500 px-3 py-2",
11270
11316
  "focus:outline-2 focus:outline-blue-500 focus:border-transparent",
11271
- disabled.value ? "text-gray-600 outline-dashed outline-2 -outline-offset-2 outline-gray-400 cursor-not-allowed border-transparent bg-gray-50" : "bg-white",
11317
+ disabled.value ? "text-gray-800 outline-dashed outline-2 -outline-offset-2 outline-gray-400 cursor-not-allowed border-transparent bg-gray-50" : "bg-white",
11272
11318
  isInvalid.value && "outline-2 -outline-offset-2 outline-red-600",
11273
11319
  props.inputClass
11274
11320
  ]);
@@ -11689,4 +11735,5 @@ exports.useFileSizeValidation = useFileSizeValidation;
11689
11735
  exports.useFileValidation = useFileValidation;
11690
11736
  exports.useIsPid = useIsPid;
11691
11737
  exports.useTreeState = useTreeState;
11738
+ exports.useViewportBreakpoint = useViewportBreakpoint;
11692
11739
  //# sourceMappingURL=fds-vue-core.cjs.js.map