@frontify/guideline-blocks-settings 0.13.0 → 0.14.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.
@@ -11,6 +11,7 @@ import { SectionHeadingBlock } from './sectionHeading';
11
11
  import { SliderBlock } from './slider';
12
12
  import { SwitchBlock } from './switch';
13
13
  import { TemplateInputBlock } from './templateInput';
14
+ import { TextareaBlock } from './textarea';
14
15
  export * from './assetInput';
15
16
  export * from './checklist';
16
17
  export * from './choices';
@@ -25,7 +26,8 @@ export * from './sectionHeading';
25
26
  export * from './slider';
26
27
  export * from './switch';
27
28
  export * from './templateInput';
28
- export declare type SimpleSettingBlock = AssetInputBlock | ChecklistBlock | ColorInputBlock | DropdownBlock | InputBlock | LegacyAssetInputBlock | MultiInputBlock | SectionHeadingBlock | SliderBlock | SwitchBlock | TemplateInputBlock | NotificationBlock | LinkChooserBlock;
29
+ export * from './textarea';
30
+ export declare type SimpleSettingBlock = AssetInputBlock | ChecklistBlock | ColorInputBlock | DropdownBlock | InputBlock | LegacyAssetInputBlock | LinkChooserBlock | MultiInputBlock | NotificationBlock | SectionHeadingBlock | SliderBlock | SwitchBlock | TemplateInputBlock | TextareaBlock;
29
31
  export declare type DynamicSupportedBlock = InputBlock | ColorInputBlock | DropdownBlock;
30
32
  export declare type DynamicSettingBlock<T extends DynamicSupportedBlock = DynamicSupportedBlock> = Omit<T, 'value'> & {
31
33
  value?: DynamicSupportedBlock['value'][];
@@ -0,0 +1,7 @@
1
+ import { Rule } from '../validation';
2
+ import { BaseBlock } from './base';
3
+ export declare type TextareaBlock = {
4
+ type: 'textarea';
5
+ placeholder?: string;
6
+ rules?: Rule<string>[];
7
+ } & BaseBlock<string>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@frontify/guideline-blocks-settings",
3
- "version": "0.13.0",
3
+ "version": "0.14.0",
4
4
  "description": "Provides the types for the block settings",
5
5
  "sideEffects": false,
6
6
  "main": "dist/index.umd.js",
@@ -14,12 +14,12 @@
14
14
  "author": "Frontify Developers <developers@frontify.com>",
15
15
  "devDependencies": {
16
16
  "@frontify/eslint-config-typescript": "0.15.2",
17
- "eslint": "8.14.0",
17
+ "eslint": "8.15.0",
18
18
  "prettier": "2.6.2",
19
19
  "react": "17.0.2",
20
20
  "react-dom": "17.0.2",
21
21
  "typescript": "4.6.4",
22
- "vite": "2.9.7",
22
+ "vite": "2.9.8",
23
23
  "vite-plugin-dts": "1.1.1"
24
24
  },
25
25
  "dependencies": {
@@ -28,10 +28,10 @@
28
28
  },
29
29
  "scripts": {
30
30
  "build": "vite build",
31
- "lint": "eslint src",
32
- "lint:fix": "eslint --fix src",
33
- "prettier": "prettier --check src",
34
- "prettier:fix": "prettier --write src",
31
+ "lint": "eslint types",
32
+ "lint:fix": "eslint --fix types",
33
+ "prettier": "prettier --check types",
34
+ "prettier:fix": "prettier --write types",
35
35
  "typecheck": "tsc --noEmit"
36
36
  }
37
37
  }
@@ -13,6 +13,7 @@ import { SectionHeadingBlock } from './sectionHeading';
13
13
  import { SliderBlock } from './slider';
14
14
  import { SwitchBlock } from './switch';
15
15
  import { TemplateInputBlock } from './templateInput';
16
+ import { TextareaBlock } from './textarea';
16
17
 
17
18
  export * from './assetInput';
18
19
  export * from './checklist';
@@ -28,6 +29,7 @@ export * from './sectionHeading';
28
29
  export * from './slider';
29
30
  export * from './switch';
30
31
  export * from './templateInput';
32
+ export * from './textarea';
31
33
 
32
34
  export type SimpleSettingBlock =
33
35
  | AssetInputBlock
@@ -36,13 +38,14 @@ export type SimpleSettingBlock =
36
38
  | DropdownBlock
37
39
  | InputBlock
38
40
  | LegacyAssetInputBlock
41
+ | LinkChooserBlock
39
42
  | MultiInputBlock
43
+ | NotificationBlock
40
44
  | SectionHeadingBlock
41
45
  | SliderBlock
42
46
  | SwitchBlock
43
47
  | TemplateInputBlock
44
- | NotificationBlock
45
- | LinkChooserBlock;
48
+ | TextareaBlock;
46
49
 
47
50
  export type DynamicSupportedBlock = InputBlock | ColorInputBlock | DropdownBlock;
48
51
 
@@ -0,0 +1,10 @@
1
+ /* (c) Copyright Frontify Ltd., all rights reserved. */
2
+
3
+ import { Rule } from '../validation';
4
+ import { BaseBlock } from './base';
5
+
6
+ export type TextareaBlock = {
7
+ type: 'textarea';
8
+ placeholder?: string;
9
+ rules?: Rule<string>[];
10
+ } & BaseBlock<string>;