@n8n/design-system 2.39.1 → 2.40.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.
@@ -18,4 +18,5 @@ export interface CommandBarItem {
18
18
  placeholder?: string;
19
19
  hasMoreChildren?: boolean;
20
20
  matchAnySearchTerm?: boolean;
21
+ disabled?: boolean;
21
22
  }
@@ -12,6 +12,7 @@ declare const __VLS_export: <T = string, D = never>(__VLS_props: NonNullable<Awa
12
12
  expose: (exposed: import('vue').ShallowUnwrapRef<{
13
13
  open: () => void;
14
14
  close: () => void;
15
+ highlightFirstItem: () => void;
15
16
  }>) => void;
16
17
  attrs: any;
17
18
  slots: DropdownMenuSlots<T, D>;
@@ -15,6 +15,7 @@ declare const __VLS_export: <T = string, D = never>(__VLS_props: NonNullable<Awa
15
15
  } ? P : {});
16
16
  expose: (exposed: import('vue').ShallowUnwrapRef<{
17
17
  resetNavigation: () => void;
18
+ highlightFirstItem: () => void;
18
19
  }>) => void;
19
20
  attrs: any;
20
21
  slots: Pick<DropdownMenuSlots<T, D>, "search-prefix" | "search-suffix"> & {
@@ -4,6 +4,7 @@ export type InputNumberControlsPosition = 'both' | 'right';
4
4
  export type InputNumberProps = Omit<NumberFieldRootProps, 'formatOptions'> & {
5
5
  size?: InputNumberSize;
6
6
  precision?: number;
7
+ useGrouping?: boolean;
7
8
  controls?: boolean;
8
9
  controlsPosition?: InputNumberControlsPosition;
9
10
  placeholder?: string;
@@ -12,6 +12,7 @@ declare const __VLS_base: import('vue').DefineComponent<InputNumberProps, InputN
12
12
  size: import('./InputNumber.types').InputNumberSize;
13
13
  step: number;
14
14
  stepSnapping: boolean;
15
+ useGrouping: boolean;
15
16
  controls: boolean;
16
17
  controlsPosition: import('./InputNumber.types').InputNumberControlsPosition;
17
18
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
@@ -7,6 +7,7 @@ type __VLS_Props = {
7
7
  level?: number;
8
8
  open?: boolean;
9
9
  ariaLabel?: string;
10
+ scrollLabelOnOverflow?: boolean;
10
11
  };
11
12
  declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
12
13
  click: () => any;
@@ -10,11 +10,13 @@ export interface Props {
10
10
  isOfficial?: boolean;
11
11
  hideNodeIcon?: boolean;
12
12
  isNew?: boolean;
13
+ disabled?: boolean;
13
14
  }
14
15
  type __VLS_Slots = {
15
16
  icon: {};
16
17
  extraDetails: {};
17
18
  dragContent: {};
19
+ trailing: {};
18
20
  };
19
21
  declare const __VLS_base: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
20
22
  tooltipClick: (e: MouseEvent) => any;
@@ -1,8 +1,12 @@
1
+ import { ResizablePanel } from '../../composables/useResizablePanel';
1
2
  import { Direction, ResizeData } from '../../types';
2
3
  interface ResizeProps {
4
+ resizer?: ResizablePanel;
3
5
  isResizingEnabled?: boolean;
4
6
  height?: number;
5
7
  width?: number;
8
+ defaultHeight?: number;
9
+ defaultWidth?: number;
6
10
  minHeight?: number;
7
11
  maxHeight?: number;
8
12
  minWidth?: number;
@@ -11,10 +15,12 @@ interface ResizeProps {
11
15
  gridSize?: number;
12
16
  supportedDirections?: Direction[];
13
17
  window?: Window;
18
+ allowCollapse?: boolean;
19
+ allowFullWidth?: boolean;
14
20
  }
15
- declare var __VLS_1: {};
21
+ declare var __VLS_8: {};
16
22
  type __VLS_Slots = {} & {
17
- default?: (props: typeof __VLS_1) => any;
23
+ default?: (props: typeof __VLS_8) => any;
18
24
  };
19
25
  declare const __VLS_base: import('vue').DefineComponent<ResizeProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
20
26
  resize: (value: ResizeData) => any;
@@ -36,6 +42,8 @@ declare const __VLS_base: import('vue').DefineComponent<ResizeProps, {}, {}, {},
36
42
  isResizingEnabled: boolean;
37
43
  gridSize: number;
38
44
  supportedDirections: Direction[];
45
+ allowCollapse: boolean;
46
+ allowFullWidth: boolean;
39
47
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
40
48
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
41
49
  declare const _default: typeof __VLS_export;
@@ -0,0 +1,13 @@
1
+ import { ButtonProps } from '../../types/button';
2
+ import { DropdownMenuItemProps } from '../N8nDropdownMenu/DropdownMenu.types';
3
+ export interface SetupConnectionProps {
4
+ connected: boolean;
5
+ valueLabel?: string;
6
+ value?: string;
7
+ actionLabel: string;
8
+ actionVariant?: ButtonProps['variant'];
9
+ actions: DropdownMenuItemProps[];
10
+ actionDisabled?: boolean;
11
+ loading?: boolean;
12
+ disabled?: boolean;
13
+ }
@@ -0,0 +1,24 @@
1
+ import { SetupConnectionProps } from './SetupConnection.types';
2
+ declare var __VLS_26: {}, __VLS_28: {}, __VLS_58: {};
3
+ type __VLS_Slots = {} & {
4
+ default?: (props: typeof __VLS_26) => any;
5
+ } & {
6
+ 'action-leading'?: (props: typeof __VLS_28) => any;
7
+ } & {
8
+ footer?: (props: typeof __VLS_58) => any;
9
+ };
10
+ declare const __VLS_base: import('vue').DefineComponent<SetupConnectionProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
11
+ select: (id: string) => any;
12
+ action: () => any;
13
+ }, string, import('vue').PublicProps, Readonly<SetupConnectionProps> & Readonly<{
14
+ onSelect?: ((id: string) => any) | undefined;
15
+ onAction?: (() => any) | undefined;
16
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
17
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
18
+ declare const _default: typeof __VLS_export;
19
+ export default _default;
20
+ type __VLS_WithSlots<T, S> = T & {
21
+ new (): {
22
+ $slots: S;
23
+ };
24
+ };
@@ -0,0 +1,14 @@
1
+ export interface SetupPanelItem {
2
+ id: string;
3
+ title: string;
4
+ subtitle?: string;
5
+ completed: boolean;
6
+ disabled?: boolean;
7
+ hasAction?: boolean;
8
+ }
9
+ export interface SetupPanelProps {
10
+ items: SetupPanelItem[];
11
+ activeItemId?: string;
12
+ status?: 'incomplete' | 'validating' | 'complete' | 'executing';
13
+ executeDisabled?: boolean;
14
+ }
@@ -0,0 +1,38 @@
1
+ import { SetupPanelProps } from './SetupPanel.types';
2
+ declare var __VLS_46: {
3
+ item: import('./SetupPanel.types').SetupPanelItem;
4
+ }, __VLS_48: {
5
+ item: import('./SetupPanel.types').SetupPanelItem;
6
+ }, __VLS_84: {
7
+ item: import('./SetupPanel.types').SetupPanelItem;
8
+ }, __VLS_86: {
9
+ item: import('./SetupPanel.types').SetupPanelItem;
10
+ };
11
+ type __VLS_Slots = {} & {
12
+ icon?: (props: typeof __VLS_46) => any;
13
+ } & {
14
+ action?: (props: typeof __VLS_48) => any;
15
+ } & {
16
+ icon?: (props: typeof __VLS_84) => any;
17
+ } & {
18
+ detail?: (props: typeof __VLS_86) => any;
19
+ };
20
+ declare const __VLS_base: import('vue').DefineComponent<SetupPanelProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
21
+ "update:activeItemId": (id: string | undefined) => any;
22
+ detailClosed: () => any;
23
+ execute: () => any;
24
+ "update:overlapHeight": (height: number) => any;
25
+ }, string, import('vue').PublicProps, Readonly<SetupPanelProps> & Readonly<{
26
+ "onUpdate:activeItemId"?: ((id: string | undefined) => any) | undefined;
27
+ onDetailClosed?: (() => any) | undefined;
28
+ onExecute?: (() => any) | undefined;
29
+ "onUpdate:overlapHeight"?: ((height: number) => any) | undefined;
30
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
31
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
32
+ declare const _default: typeof __VLS_export;
33
+ export default _default;
34
+ type __VLS_WithSlots<T, S> = T & {
35
+ new (): {
36
+ $slots: S;
37
+ };
38
+ };
@@ -16,10 +16,15 @@ export { default as N8nAvatar } from './N8nAvatar';
16
16
  export { default as N8nBadge } from './N8nBadge';
17
17
  export { default as N8nBlockUi } from './N8nBlockUi';
18
18
  export { default as N8nButton } from './N8nButton';
19
+ export { default as N8nSetupPanel } from './N8nSetupPanel/SetupPanel.vue';
20
+ export type { SetupPanelItem, SetupPanelProps } from './N8nSetupPanel/SetupPanel.types';
21
+ export { default as N8nSetupConnection } from './N8nSetupConnection/SetupConnection.vue';
22
+ export type { SetupConnectionProps } from './N8nSetupConnection/SetupConnection.types';
19
23
  export { default as N8nButtonList } from './N8nButtonList';
20
24
  export type { ButtonListOrientation, ButtonListProps } from './N8nButtonList';
21
25
  export { default as N8nCallout } from './N8nCallout';
22
26
  export { default as N8nCanvasThinkingPill } from './CanvasThinkingPill';
27
+ export { default as N8nCanvasPill } from './CanvasPill';
23
28
  export { default as N8nCanvasCollaborationPill } from './CanvasCollaborationPill';
24
29
  export { default as N8nCard } from './N8nCard';
25
30
  export { default as N8nCircleLoader } from './N8nCircleLoader';
@@ -0,0 +1,47 @@
1
+ import { MaybeRefOrGetter } from 'vue';
2
+ import { ResizeData } from '../types';
3
+ type GetSize = number | ((containerSize: number) => number);
4
+ export interface ResizablePanelDimensionOptions {
5
+ size?: MaybeRefOrGetter<number>;
6
+ defaultSize?: GetSize;
7
+ minSize?: GetSize;
8
+ maxSize?: GetSize;
9
+ snap?: boolean;
10
+ allowCollapse?: MaybeRefOrGetter<boolean>;
11
+ allowFullSize?: MaybeRefOrGetter<boolean>;
12
+ localStorageKey?: string;
13
+ }
14
+ export interface UseResizablePanelOptions {
15
+ container?: MaybeRefOrGetter<HTMLElement | null>;
16
+ width?: ResizablePanelDimensionOptions;
17
+ height?: ResizablePanelDimensionOptions;
18
+ scale?: MaybeRefOrGetter<number>;
19
+ gridSize?: MaybeRefOrGetter<number>;
20
+ }
21
+ export interface ResizablePanelDragCallbacks {
22
+ window?: Window;
23
+ displayedSize?: Pick<ResizeData, 'width' | 'height'>;
24
+ onResizeStart?: () => void;
25
+ onResize?: (data: ResizeData) => void;
26
+ onResizeEnd?: () => void;
27
+ }
28
+ export declare function useResizablePanel(options: UseResizablePanelOptions): {
29
+ width: import('vue').ComputedRef<number>;
30
+ height: import('vue').ComputedRef<number>;
31
+ isCollapsed: import('vue').ComputedRef<boolean>;
32
+ isFullSize: import('vue').ComputedRef<boolean>;
33
+ isWidthCollapsed: import('vue').ComputedRef<boolean>;
34
+ isHeightCollapsed: import('vue').ComputedRef<boolean>;
35
+ isWidthFullSize: import('vue').ComputedRef<boolean>;
36
+ isHeightFullSize: import('vue').ComputedRef<boolean>;
37
+ isResizing: import('vue').ComputedRef<boolean>;
38
+ activeDirection: import('vue').ComputedRef<"right" | "left" | "top" | "bottom" | "topLeft" | "topRight" | "bottomLeft" | "bottomRight" | undefined>;
39
+ startResize: (event: MouseEvent, handlers?: ResizablePanelDragCallbacks) => (() => void) | undefined;
40
+ resetSize: (size?: {
41
+ width?: number | undefined;
42
+ height?: number | undefined;
43
+ }) => void;
44
+ cleanupResize: () => void;
45
+ };
46
+ export type ResizablePanel = ReturnType<typeof useResizablePanel>;
47
+ export {};
@@ -1 +1,2 @@
1
1
  export declare const TOOLTIP_DELAY_MS = 500;
2
+ export declare const OVERLAY_LAYER_SELECTOR = "[data-dismissable-layer]";
@@ -1,6 +1,17 @@
1
1
  import { i as e } from "./plugin-DT0YTbz-.js";
2
2
  //#region src/locale/lang/en.ts
3
3
  var t = /* @__PURE__ */ e({ default: () => n }), n = {
4
+ "setupPanel.label": "Workflow setup",
5
+ "setupPanel.back": "Back to setup checklist",
6
+ "setupPanel.complete": "Complete",
7
+ "setupPanel.credentialSelected": "Credential selected",
8
+ "setupPanel.setupComplete": "Setup complete",
9
+ "setupPanel.execute": "Execute",
10
+ "setupPanel.validating": "Validating…",
11
+ "setupPanel.executing": "Executing…",
12
+ "setupPanel.connected": "Connected",
13
+ "setupPanel.changeConnection": "Change connection",
14
+ "setupPanel.moreOptions": "More options",
4
15
  "generic.retry": "Retry",
5
16
  "generic.cancel": "Cancel",
6
17
  "generic.close": "Close",
@@ -15,6 +26,8 @@ var t = /* @__PURE__ */ e({ default: () => n }), n = {
15
26
  "nds.select.noResults": "No results found",
16
27
  "nds.inputNumber.increase": "Increase",
17
28
  "nds.inputNumber.decrease": "Decrease",
29
+ "resizeWrapper.resize": "Resize",
30
+ "resizeWrapper.drag": "Drag",
18
31
  "notice.showMore": "Show more",
19
32
  "notice.showLess": "Show less",
20
33
  "formInput.validator.fieldRequired": "This field is required",
package/dist/index.d.ts CHANGED
@@ -10,6 +10,8 @@ export { IconBodyLoaderKey, useInjectIconBodyLoader } from './composables/useIco
10
10
  export type { IconBodyLoader } from './composables/useIconBodyLoader';
11
11
  export { useMessage } from './composables/useMessage';
12
12
  export type { MessageBoxConfirmResult } from './composables/useMessage';
13
+ export { useResizablePanel } from './composables/useResizablePanel';
14
+ export type { UseResizablePanelOptions, ResizablePanel, ResizablePanelDimensionOptions, ResizablePanelDragCallbacks, } from './composables/useResizablePanel';
13
15
  export { useProvideTooltipAppendTo } from './composables/useTooltipAppendTo';
14
16
  export { default as N8nSelect2 } from './v2/components/Select/Select.vue';
15
17
  export { default as N8nSelect2Item } from './v2/components/Select/SelectItem.vue';