@lowdefy/blocks-color-selectors 4.0.0-alpha.4 → 4.0.0-alpha.5

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.
@@ -16,7 +16,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
16
16
  */ import React, { useState } from 'react';
17
17
  import { ChromePicker } from 'react-color';
18
18
  import { blockDefaultProps } from '@lowdefy/block-utils';
19
- import Label from '@lowdefy/blocks-antd/dist/blocks/Label/Label.js';
19
+ import Label from '@lowdefy/blocks-antd/blocks/Label/Label.js';
20
20
  const Selector = ({ blockId , loading , methods , properties , required , validation , value })=>{
21
21
  const [color, setColor] = useState(value || properties.defaultColor || '#000000');
22
22
  return(/*#__PURE__*/ _jsx(Label, {
@@ -55,4 +55,18 @@ const Selector = ({ blockId , loading , methods , properties , required , valida
55
55
  }));
56
56
  };
57
57
  Selector.defaultProps = blockDefaultProps;
58
+ Selector.meta = {
59
+ valueType: 'object',
60
+ category: 'input',
61
+ loading: {
62
+ type: 'Skeleton',
63
+ properties: {
64
+ width: 225,
65
+ height: 240
66
+ }
67
+ }
68
+ };
69
+ Selector.styles = [
70
+ 'blocks/ChromeColorSelector/style.less'
71
+ ];
58
72
  export default Selector;
@@ -16,7 +16,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
16
16
  */ import React from 'react';
17
17
  import { CirclePicker } from 'react-color';
18
18
  import { blockDefaultProps } from '@lowdefy/block-utils';
19
- import Label from '@lowdefy/blocks-antd/dist/blocks/Label/Label.js';
19
+ import Label from '@lowdefy/blocks-antd/blocks/Label/Label.js';
20
20
  const Selector = ({ blockId , loading , methods , properties , required , validation , value })=>{
21
21
  return(/*#__PURE__*/ _jsx(Label, {
22
22
  blockId: blockId,
@@ -74,4 +74,17 @@ const Selector = ({ blockId , loading , methods , properties , required , valida
74
74
  }));
75
75
  };
76
76
  Selector.defaultProps = blockDefaultProps;
77
+ Selector.meta = {
78
+ valueType: 'string',
79
+ category: 'input',
80
+ loading: {
81
+ type: 'Skeleton',
82
+ properties: {
83
+ height: 42
84
+ }
85
+ }
86
+ };
87
+ Selector.styles = [
88
+ 'blocks/CircleColorSelector/style.less'
89
+ ];
77
90
  export default Selector;
@@ -16,7 +16,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
16
16
  */ import React from 'react';
17
17
  import { BlockPicker } from 'react-color';
18
18
  import { blockDefaultProps } from '@lowdefy/block-utils';
19
- import Label from '@lowdefy/blocks-antd/dist/blocks/Label/Label.js';
19
+ import Label from '@lowdefy/blocks-antd/blocks/Label/Label.js';
20
20
  const Selector = ({ blockId , loading , methods , properties , required , validation , value })=>{
21
21
  return(/*#__PURE__*/ _jsx(Label, {
22
22
  blockId: blockId,
@@ -53,4 +53,17 @@ const Selector = ({ blockId , loading , methods , properties , required , valida
53
53
  }));
54
54
  };
55
55
  Selector.defaultProps = blockDefaultProps;
56
+ Selector.meta = {
57
+ valueType: 'string',
58
+ category: 'input',
59
+ loading: {
60
+ type: 'Skeleton',
61
+ properties: {
62
+ height: 216
63
+ }
64
+ }
65
+ };
66
+ Selector.styles = [
67
+ 'blocks/ColorSelector/style.less'
68
+ ];
56
69
  export default Selector;
@@ -16,7 +16,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
16
16
  */ import React from 'react';
17
17
  import { CompactPicker } from 'react-color';
18
18
  import { blockDefaultProps } from '@lowdefy/block-utils';
19
- import Label from '@lowdefy/blocks-antd/dist/blocks/Label/Label.js';
19
+ import Label from '@lowdefy/blocks-antd/blocks/Label/Label.js';
20
20
  const Selector = ({ blockId , loading , methods , properties , required , validation , value })=>{
21
21
  return(/*#__PURE__*/ _jsx(Label, {
22
22
  blockId: blockId,
@@ -51,4 +51,18 @@ const Selector = ({ blockId , loading , methods , properties , required , valida
51
51
  }));
52
52
  };
53
53
  Selector.defaultProps = blockDefaultProps;
54
+ Selector.meta = {
55
+ valueType: 'string',
56
+ category: 'input',
57
+ loading: {
58
+ type: 'Skeleton',
59
+ properties: {
60
+ width: 245,
61
+ height: 90
62
+ }
63
+ }
64
+ };
65
+ Selector.styles = [
66
+ 'blocks/CompactColorSelector/style.less'
67
+ ];
54
68
  export default Selector;
@@ -16,7 +16,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
16
16
  */ import React from 'react';
17
17
  import { GithubPicker } from 'react-color';
18
18
  import { blockDefaultProps } from '@lowdefy/block-utils';
19
- import Label from '@lowdefy/blocks-antd/dist/blocks/Label/Label.js';
19
+ import Label from '@lowdefy/blocks-antd/blocks/Label/Label.js';
20
20
  const Selector = ({ blockId , loading , methods , properties , required , validation , value })=>{
21
21
  return(/*#__PURE__*/ _jsx(Label, {
22
22
  blockId: blockId,
@@ -53,4 +53,18 @@ const Selector = ({ blockId , loading , methods , properties , required , valida
53
53
  }));
54
54
  };
55
55
  Selector.defaultProps = blockDefaultProps;
56
+ Selector.meta = {
57
+ valueType: 'string',
58
+ category: 'input',
59
+ loading: {
60
+ type: 'Skeleton',
61
+ properties: {
62
+ width: 216,
63
+ height: 62
64
+ }
65
+ }
66
+ };
67
+ Selector.styles = [
68
+ 'blocks/GithubColorSelector/style.less'
69
+ ];
56
70
  export default Selector;
@@ -16,7 +16,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
16
16
  */ import React from 'react';
17
17
  import { SliderPicker } from 'react-color';
18
18
  import { blockDefaultProps } from '@lowdefy/block-utils';
19
- import Label from '@lowdefy/blocks-antd/dist/blocks/Label/Label.js';
19
+ import Label from '@lowdefy/blocks-antd/blocks/Label/Label.js';
20
20
  const Selector = ({ blockId , loading , methods , properties , required , validation , value })=>{
21
21
  return(/*#__PURE__*/ _jsx(Label, {
22
22
  blockId: blockId,
@@ -50,4 +50,17 @@ const Selector = ({ blockId , loading , methods , properties , required , valida
50
50
  }));
51
51
  };
52
52
  Selector.defaultProps = blockDefaultProps;
53
+ Selector.meta = {
54
+ valueType: 'string',
55
+ category: 'input',
56
+ loading: {
57
+ type: 'Skeleton',
58
+ properties: {
59
+ height: 44
60
+ }
61
+ }
62
+ };
63
+ Selector.styles = [
64
+ 'blocks/SliderColorSelector/style.less'
65
+ ];
53
66
  export default Selector;
@@ -16,7 +16,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
16
16
  */ import React from 'react';
17
17
  import { SwatchesPicker } from 'react-color';
18
18
  import { blockDefaultProps } from '@lowdefy/block-utils';
19
- import Label from '@lowdefy/blocks-antd/dist/blocks/Label/Label.js';
19
+ import Label from '@lowdefy/blocks-antd/blocks/Label/Label.js';
20
20
  const Selector = ({ blockId , loading , methods , properties , required , validation , value })=>{
21
21
  return(/*#__PURE__*/ _jsx(Label, {
22
22
  blockId: blockId,
@@ -53,4 +53,17 @@ const Selector = ({ blockId , loading , methods , properties , required , valida
53
53
  }));
54
54
  };
55
55
  Selector.defaultProps = blockDefaultProps;
56
+ Selector.meta = {
57
+ valueType: 'string',
58
+ category: 'input',
59
+ loading: {
60
+ type: 'Skeleton',
61
+ properties: {
62
+ height: 175
63
+ }
64
+ }
65
+ };
66
+ Selector.styles = [
67
+ 'blocks/SwatchesColorSelector/style.less'
68
+ ];
56
69
  export default Selector;
@@ -16,7 +16,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
16
16
  */ import React from 'react';
17
17
  import { TwitterPicker } from 'react-color';
18
18
  import { blockDefaultProps } from '@lowdefy/block-utils';
19
- import Label from '@lowdefy/blocks-antd/dist/blocks/Label/Label.js';
19
+ import Label from '@lowdefy/blocks-antd/blocks/Label/Label.js';
20
20
  const Selector = ({ blockId , loading , methods , properties , required , validation , value })=>{
21
21
  return(/*#__PURE__*/ _jsx(Label, {
22
22
  blockId: blockId,
@@ -47,4 +47,17 @@ const Selector = ({ blockId , loading , methods , properties , required , valida
47
47
  }));
48
48
  };
49
49
  Selector.defaultProps = blockDefaultProps;
50
+ Selector.meta = {
51
+ valueType: 'string',
52
+ category: 'input',
53
+ loading: {
54
+ type: 'Skeleton',
55
+ properties: {
56
+ height: 96
57
+ }
58
+ }
59
+ };
60
+ Selector.styles = [
61
+ 'blocks/TwitterColorSelector/style.less'
62
+ ];
50
63
  export default Selector;
package/dist/blocks.js ADDED
@@ -0,0 +1,22 @@
1
+ /*
2
+ Copyright 2020-2021 Lowdefy, Inc
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+ */ export { default as ColorSelector } from './blocks/ColorSelector/ColorSelector.js';
16
+ export { default as ChromeColorSelector } from './blocks/ChromeColorSelector/ChromeColorSelector.js';
17
+ export { default as CircleColorSelector } from './blocks/CircleColorSelector/CircleColorSelector.js';
18
+ export { default as CompactColorSelector } from './blocks/CompactColorSelector/CompactColorSelector.js';
19
+ export { default as GithubColorSelector } from './blocks/GithubColorSelector/GithubColorSelector.js';
20
+ export { default as SliderColorSelector } from './blocks/SliderColorSelector/SliderColorSelector.js';
21
+ export { default as SwatchesColorSelector } from './blocks/SwatchesColorSelector/SwatchesColorSelector.js';
22
+ export { default as TwitterColorSelector } from './blocks/TwitterColorSelector/TwitterColorSelector.js';
@@ -1,4 +1,4 @@
1
- /*
1
+ /* eslint-disable import/namespace */ /*
2
2
  Copyright 2020-2021 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
@@ -12,21 +12,16 @@
12
12
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
13
  See the License for the specific language governing permissions and
14
14
  limitations under the License.
15
- */ export default {
16
- import: {
17
- block: 'blocks/ColorSelector/ColorSelector.js',
18
- styles: [
19
- 'blocks/ColorSelector/style.less'
20
- ]
21
- },
22
- meta: {
23
- valueType: 'string',
24
- category: 'input',
25
- loading: {
26
- type: 'Skeleton',
27
- properties: {
28
- height: 216
29
- }
30
- }
15
+ */ import * as blocks from './blocks.js';
16
+ const styles = {
17
+ };
18
+ Object.keys(blocks).forEach((block)=>{
19
+ styles[block] = blocks[block].styles || [];
20
+ });
21
+ export default {
22
+ blocks: Object.keys(blocks),
23
+ styles: {
24
+ default: [],
25
+ ...styles
31
26
  }
32
27
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lowdefy/blocks-color-selectors",
3
- "version": "4.0.0-alpha.4",
3
+ "version": "4.0.0-alpha.5",
4
4
  "license": "Apache-2.0",
5
5
  "description": "A Lowdefy color selector blocks based on react-color.",
6
6
  "homepage": "https://lowdefy.com",
@@ -28,7 +28,11 @@
28
28
  "url": "https://github.com/lowdefy/lowdefy.git"
29
29
  },
30
30
  "type": "module",
31
- "exports": "./dist/index.js",
31
+ "exports": {
32
+ "./*": "./dist/*",
33
+ "./blocks": "./dist/blocks.js",
34
+ "./types": "./dist/types.js"
35
+ },
32
36
  "files": [
33
37
  "dist/*"
34
38
  ],
@@ -42,8 +46,8 @@
42
46
  "test": "jest --coverage"
43
47
  },
44
48
  "dependencies": {
45
- "@lowdefy/block-utils": "4.0.0-alpha.4",
46
- "@lowdefy/blocks-antd": "4.0.0-alpha.4",
49
+ "@lowdefy/block-utils": "4.0.0-alpha.5",
50
+ "@lowdefy/blocks-antd": "4.0.0-alpha.5",
47
51
  "react": "18.0.0-alpha-327d5c484-20211106",
48
52
  "react-color": "2.19.3",
49
53
  "react-dom": "18.0.0-alpha-327d5c484-20211106"
@@ -51,7 +55,7 @@
51
55
  "devDependencies": {
52
56
  "@babel/preset-react": "7.16.0",
53
57
  "@emotion/jest": "11.5.0",
54
- "@lowdefy/block-dev": "4.0.0-alpha.4",
58
+ "@lowdefy/block-dev": "4.0.0-alpha.5",
55
59
  "@swc/cli": "0.1.52",
56
60
  "@swc/core": "1.2.112",
57
61
  "@swc/jest": "0.2.9",
@@ -67,5 +71,5 @@
67
71
  "publishConfig": {
68
72
  "access": "public"
69
73
  },
70
- "gitHead": "537d166ba3f6e017b8a61c2a7e5c12fd0a48bf67"
74
+ "gitHead": "995fcdb020927f3cdc626fc99c15a2e4137bd962"
71
75
  }
@@ -1,33 +0,0 @@
1
- /*
2
- Copyright 2020-2021 Lowdefy, Inc
3
-
4
- Licensed under the Apache License, Version 2.0 (the "License");
5
- you may not use this file except in compliance with the License.
6
- You may obtain a copy of the License at
7
-
8
- http://www.apache.org/licenses/LICENSE-2.0
9
-
10
- Unless required by applicable law or agreed to in writing, software
11
- distributed under the License is distributed on an "AS IS" BASIS,
12
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- See the License for the specific language governing permissions and
14
- limitations under the License.
15
- */ export default {
16
- import: {
17
- block: 'blocks/ChromeColorSelector/ChromeColorSelector.js',
18
- styles: [
19
- 'blocks/ChromeColorSelector/style.less'
20
- ]
21
- },
22
- meta: {
23
- valueType: 'object',
24
- category: 'input',
25
- loading: {
26
- type: 'Skeleton',
27
- properties: {
28
- width: 225,
29
- height: 240
30
- }
31
- }
32
- }
33
- };
@@ -1,32 +0,0 @@
1
- /*
2
- Copyright 2020-2021 Lowdefy, Inc
3
-
4
- Licensed under the Apache License, Version 2.0 (the "License");
5
- you may not use this file except in compliance with the License.
6
- You may obtain a copy of the License at
7
-
8
- http://www.apache.org/licenses/LICENSE-2.0
9
-
10
- Unless required by applicable law or agreed to in writing, software
11
- distributed under the License is distributed on an "AS IS" BASIS,
12
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- See the License for the specific language governing permissions and
14
- limitations under the License.
15
- */ export default {
16
- import: {
17
- block: 'blocks/CircleColorSelector/CircleColorSelector.js',
18
- styles: [
19
- 'blocks/CircleColorSelector/style.less'
20
- ]
21
- },
22
- meta: {
23
- valueType: 'string',
24
- category: 'input',
25
- loading: {
26
- type: 'Skeleton',
27
- properties: {
28
- height: 42
29
- }
30
- }
31
- }
32
- };
@@ -1,33 +0,0 @@
1
- /*
2
- Copyright 2020-2021 Lowdefy, Inc
3
-
4
- Licensed under the Apache License, Version 2.0 (the "License");
5
- you may not use this file except in compliance with the License.
6
- You may obtain a copy of the License at
7
-
8
- http://www.apache.org/licenses/LICENSE-2.0
9
-
10
- Unless required by applicable law or agreed to in writing, software
11
- distributed under the License is distributed on an "AS IS" BASIS,
12
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- See the License for the specific language governing permissions and
14
- limitations under the License.
15
- */ export default {
16
- import: {
17
- block: 'blocks/CompactColorSelector/CompactColorSelector.js',
18
- styles: [
19
- 'blocks/CompactColorSelector/style.less'
20
- ]
21
- },
22
- meta: {
23
- valueType: 'string',
24
- category: 'input',
25
- loading: {
26
- type: 'Skeleton',
27
- properties: {
28
- width: 245,
29
- height: 90
30
- }
31
- }
32
- }
33
- };
@@ -1,33 +0,0 @@
1
- /*
2
- Copyright 2020-2021 Lowdefy, Inc
3
-
4
- Licensed under the Apache License, Version 2.0 (the "License");
5
- you may not use this file except in compliance with the License.
6
- You may obtain a copy of the License at
7
-
8
- http://www.apache.org/licenses/LICENSE-2.0
9
-
10
- Unless required by applicable law or agreed to in writing, software
11
- distributed under the License is distributed on an "AS IS" BASIS,
12
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- See the License for the specific language governing permissions and
14
- limitations under the License.
15
- */ export default {
16
- import: {
17
- block: 'blocks/GithubColorSelector/GithubColorSelector.js',
18
- styles: [
19
- 'blocks/GithubColorSelector/style.less'
20
- ]
21
- },
22
- meta: {
23
- valueType: 'string',
24
- category: 'input',
25
- loading: {
26
- type: 'Skeleton',
27
- properties: {
28
- width: 216,
29
- height: 62
30
- }
31
- }
32
- }
33
- };
@@ -1,32 +0,0 @@
1
- /*
2
- Copyright 2020-2021 Lowdefy, Inc
3
-
4
- Licensed under the Apache License, Version 2.0 (the "License");
5
- you may not use this file except in compliance with the License.
6
- You may obtain a copy of the License at
7
-
8
- http://www.apache.org/licenses/LICENSE-2.0
9
-
10
- Unless required by applicable law or agreed to in writing, software
11
- distributed under the License is distributed on an "AS IS" BASIS,
12
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- See the License for the specific language governing permissions and
14
- limitations under the License.
15
- */ export default {
16
- import: {
17
- block: 'blocks/SliderColorSelector/SliderColorSelector.js',
18
- styles: [
19
- 'blocks/SliderColorSelector/style.less'
20
- ]
21
- },
22
- meta: {
23
- valueType: 'string',
24
- category: 'input',
25
- loading: {
26
- type: 'Skeleton',
27
- properties: {
28
- height: 44
29
- }
30
- }
31
- }
32
- };
@@ -1,32 +0,0 @@
1
- /*
2
- Copyright 2020-2021 Lowdefy, Inc
3
-
4
- Licensed under the Apache License, Version 2.0 (the "License");
5
- you may not use this file except in compliance with the License.
6
- You may obtain a copy of the License at
7
-
8
- http://www.apache.org/licenses/LICENSE-2.0
9
-
10
- Unless required by applicable law or agreed to in writing, software
11
- distributed under the License is distributed on an "AS IS" BASIS,
12
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- See the License for the specific language governing permissions and
14
- limitations under the License.
15
- */ export default {
16
- import: {
17
- block: 'blocks/SwatchesColorSelector/SwatchesColorSelector.js',
18
- styles: [
19
- 'blocks/SwatchesColorSelector/style.less'
20
- ]
21
- },
22
- meta: {
23
- valueType: 'string',
24
- category: 'input',
25
- loading: {
26
- type: 'Skeleton',
27
- properties: {
28
- height: 175
29
- }
30
- }
31
- }
32
- };
@@ -1,32 +0,0 @@
1
- /*
2
- Copyright 2020-2021 Lowdefy, Inc
3
-
4
- Licensed under the Apache License, Version 2.0 (the "License");
5
- you may not use this file except in compliance with the License.
6
- You may obtain a copy of the License at
7
-
8
- http://www.apache.org/licenses/LICENSE-2.0
9
-
10
- Unless required by applicable law or agreed to in writing, software
11
- distributed under the License is distributed on an "AS IS" BASIS,
12
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- See the License for the specific language governing permissions and
14
- limitations under the License.
15
- */ export default {
16
- import: {
17
- block: 'blocks/TwitterColorSelector/TwitterColorSelector.js',
18
- styles: [
19
- 'blocks/TwitterColorSelector/style.less'
20
- ]
21
- },
22
- meta: {
23
- valueType: 'string',
24
- category: 'input',
25
- loading: {
26
- type: 'Skeleton',
27
- properties: {
28
- height: 96
29
- }
30
- }
31
- }
32
- };
package/dist/index.js DELETED
@@ -1,37 +0,0 @@
1
- /*
2
- Copyright 2020-2021 Lowdefy, Inc
3
-
4
- Licensed under the Apache License, Version 2.0 (the "License");
5
- you may not use this file except in compliance with the License.
6
- You may obtain a copy of the License at
7
-
8
- http://www.apache.org/licenses/LICENSE-2.0
9
-
10
- Unless required by applicable law or agreed to in writing, software
11
- distributed under the License is distributed on an "AS IS" BASIS,
12
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- See the License for the specific language governing permissions and
14
- limitations under the License.
15
- */ import ColorSelector from './blocks/ColorSelector';
16
- import ChromeColorSelector from './blocks/ChromeColorSelector';
17
- import CircleColorSelector from './blocks/CircleColorSelector';
18
- import CompactColorSelector from './blocks/CompactColorSelector';
19
- import GithubColorSelector from './blocks/GithubColorSelector';
20
- import SliderColorSelector from './blocks/SliderColorSelector';
21
- import SwatchesColorSelector from './blocks/SwatchesColorSelector';
22
- import TwitterColorSelector from './blocks/TwitterColorSelector';
23
- export default {
24
- blocks: {
25
- ColorSelector,
26
- ChromeColorSelector,
27
- CircleColorSelector,
28
- CompactColorSelector,
29
- GithubColorSelector,
30
- SliderColorSelector,
31
- SwatchesColorSelector,
32
- TwitterColorSelector
33
- },
34
- import: {
35
- styles: []
36
- }
37
- };