fds-vue-core 8.5.1 → 8.6.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.
package/components.d.ts CHANGED
@@ -12,6 +12,7 @@ import type { FdsExpanderBlockProps } from './dist/components/Blocks/FdsBlockExp
12
12
  import type { FdsBlockInfoProps } from './dist/components/Blocks/FdsBlockInfo/types'
13
13
  import type { FdsInteractionBlockProps } from './dist/components/Blocks/FdsBlockLink/types'
14
14
  import type { FdsButtonBaseProps } from './dist/components/Buttons/ButtonBaseProps'
15
+ import type { FdsButtonTertiaryProps } from './dist/components/Buttons/FdsButtonTertiary/types'
15
16
  import type { FdsCopyButtonProps } from './dist/components/Buttons/FdsButtonCopy/types'
16
17
  import type { FdsButtonDownloadProps } from './dist/components/Buttons/FdsButtonDownload/types'
17
18
  import type { FdsIconButtonProps } from './dist/components/Buttons/FdsButtonIcon/types'
@@ -54,7 +55,7 @@ declare module 'vue' {
54
55
  FdsTreeView: DefineComponent<WrapperProps>
55
56
  FdsButtonPrimary: DefineComponent<FdsButtonBaseProps>
56
57
  FdsButtonSecondary: DefineComponent<FdsButtonBaseProps>
57
- FdsButtonTertiary: DefineComponent<FdsButtonBaseProps>
58
+ FdsButtonTertiary: DefineComponent<FdsButtonTertiaryProps>
58
59
  FdsButtonMinor: DefineComponent<FdsButtonBaseProps>
59
60
  FdsButtonIcon: DefineComponent<FdsIconButtonProps>
60
61
  FdsButtonCopy: DefineComponent<FdsCopyButtonProps>
@@ -1,11 +1,11 @@
1
- import { FdsButtonBaseProps } from '../ButtonBaseProps';
2
- declare const _default: import('vue').DefineComponent<FdsButtonBaseProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
1
+ import { FdsButtonTertiaryProps } from './types';
2
+ declare const _default: import('vue').DefineComponent<FdsButtonTertiaryProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
3
3
  click: (ev: MouseEvent) => any;
4
- }, string, import('vue').PublicProps, Readonly<FdsButtonBaseProps> & Readonly<{
4
+ }, string, import('vue').PublicProps, Readonly<FdsButtonTertiaryProps> & Readonly<{
5
5
  onClick?: ((ev: MouseEvent) => any) | undefined;
6
6
  }>, {
7
7
  type: "button" | "submit" | "reset";
8
- size: "sm" | "md" | "lg";
8
+ size: "sm" | "md";
9
9
  dataTestid: string;
10
10
  icon: string;
11
11
  loading: boolean;
@@ -0,0 +1,4 @@
1
+ import { FdsButtonBaseProps } from '../ButtonBaseProps';
2
+ export interface FdsButtonTertiaryProps extends Omit<FdsButtonBaseProps, 'size'> {
3
+ size?: 'sm' | 'md';
4
+ }
@@ -4,8 +4,10 @@ declare function __VLS_template(): {
4
4
  attrs: Partial<{}>;
5
5
  slots: Readonly<{
6
6
  default?: Slot;
7
+ 'drawer-footer'?: Slot;
7
8
  }> & {
8
9
  default?: Slot;
10
+ 'drawer-footer'?: Slot;
9
11
  };
10
12
  refs: {
11
13
  drawerInnerRef: HTMLDivElement;
@@ -5584,6 +5584,7 @@ const _sfc_main$B = /* @__PURE__ */ vue.defineComponent({
5584
5584
  },
5585
5585
  __name: "FdsButtonTertiary",
5586
5586
  props: {
5587
+ size: { default: "md" },
5587
5588
  text: {},
5588
5589
  loading: { type: Boolean, default: false },
5589
5590
  disabled: { type: Boolean },
@@ -5592,7 +5593,6 @@ const _sfc_main$B = /* @__PURE__ */ vue.defineComponent({
5592
5593
  icon: { default: void 0 },
5593
5594
  iconPos: { default: "left" },
5594
5595
  iconSize: { default: 24 },
5595
- size: { default: "md" },
5596
5596
  textSelection: { type: Boolean, default: false },
5597
5597
  as: { default: "button" },
5598
5598
  href: {},
@@ -5610,9 +5610,8 @@ const _sfc_main$B = /* @__PURE__ */ vue.defineComponent({
5610
5610
  const rootClasses = vue.computed(() => ["inline-block transition-opacity duration-200", props.block && "block w-full"]);
5611
5611
  const externalClass = vue.computed(() => attrs.class);
5612
5612
  const sizeClasses = {
5613
- sm: "text-sm h-7 px-4",
5614
- md: "text-base h-12 px-6",
5615
- lg: "text-lg h-[68px] px-8"
5613
+ sm: "py-1 px-3",
5614
+ md: "text-base py-1 px-4 leading-6"
5616
5615
  };
5617
5616
  const blockElClasses = vue.computed(() => props.block && "w-full justify-center");
5618
5617
  const iconOrderClasses = vue.computed(() => props.icon && props.iconPos === "right" ? "order-2" : "");
@@ -5624,7 +5623,7 @@ const _sfc_main$B = /* @__PURE__ */ vue.defineComponent({
5624
5623
  props.textSelection && "select-text",
5625
5624
  (props.icon || props.text) && "gap-2",
5626
5625
  props.loading && "bg-blue_t-200!",
5627
- disabled.value ? "cursor-not-allowed" : "cursor-pointer"
5626
+ disabled.value ? "cursor-not-allowed opacity-50" : "cursor-pointer"
5628
5627
  ]);
5629
5628
  const onClick = (ev) => {
5630
5629
  if (disabled.value || props.loading) {
@@ -11625,6 +11624,7 @@ const _sfc_main$n = /* @__PURE__ */ vue.defineComponent({
11625
11624
  const drawerInnerRef = vue.ref(null);
11626
11625
  const previouslyFocusedElement = vue.ref(null);
11627
11626
  const { activate: activateFocusTrap, deactivate: deactivateFocusTrap } = useFocusTrap();
11627
+ const hasFooterSlot = useHasSlot("drawer-footer");
11628
11628
  const { t } = useFdsI18n();
11629
11629
  const drawerOuterClasses = vue.computed(() => ["fixed top-0 left-0 w-full h-full z-100"]);
11630
11630
  const drawerInnerClasses = vue.computed(() => [
@@ -11641,7 +11641,15 @@ const _sfc_main$n = /* @__PURE__ */ vue.defineComponent({
11641
11641
  }
11642
11642
  ]);
11643
11643
  const headerClasses = vue.computed(() => ["shrink-0 flex justify-between bg-white p-6", "rounded-t-lg md:rounded-none"]);
11644
- const contentClasses = vue.computed(() => ["flex-1 min-h-0 overflow-auto px-6 pb-6 mb-0-last-child"]);
11644
+ const contentClasses = vue.computed(() => [
11645
+ "flex-1 min-h-0 overflow-auto px-6 mb-0-last-child",
11646
+ hasFooterSlot.value ? "pb-4" : "pb-6"
11647
+ ]);
11648
+ const footerClasses = vue.computed(() => [
11649
+ "shrink-0 flex flex-col gap-4 px-6 pb-6 pt-4 bg-white z-[2]",
11650
+ "sm:flex-row sm:justify-end",
11651
+ "shadow-[0px_-8px_16px_0px_rgba(255,255,255,0.59)]"
11652
+ ]);
11645
11653
  const headerTitleClasses = vue.computed(() => ["m-0"]);
11646
11654
  const iconName = vue.computed(() => {
11647
11655
  if (props.info === "valid") return "check";
@@ -11776,7 +11784,13 @@ const _sfc_main$n = /* @__PURE__ */ vue.defineComponent({
11776
11784
  class: vue.normalizeClass(contentClasses.value)
11777
11785
  }, [
11778
11786
  vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
11779
- ], 2)
11787
+ ], 2),
11788
+ vue.unref(hasFooterSlot) ? (vue.openBlock(), vue.createElementBlock("div", {
11789
+ key: 0,
11790
+ class: vue.normalizeClass(footerClasses.value)
11791
+ }, [
11792
+ vue.renderSlot(_ctx.$slots, "drawer-footer", {}, void 0, true)
11793
+ ], 2)) : vue.createCommentVNode("", true)
11780
11794
  ], 16)
11781
11795
  ], 2)) : vue.createCommentVNode("", true)
11782
11796
  ]),
@@ -11793,7 +11807,7 @@ const _export_sfc = (sfc, props) => {
11793
11807
  }
11794
11808
  return target;
11795
11809
  };
11796
- const FdsDrawer = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["__scopeId", "data-v-afc45d1a"]]);
11810
+ const FdsDrawer = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["__scopeId", "data-v-d72556a2"]]);
11797
11811
  function debounce(fn, delayMs) {
11798
11812
  let timeoutId;
11799
11813
  const debounced = (...args) => {