@lowdefy/blocks-color-selectors 4.5.2 → 4.7.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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2024 Lowdefy, Inc
2
+ Copyright 2020-2026 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2024 Lowdefy, Inc
2
+ Copyright 2020-2026 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
@@ -41,7 +41,10 @@ const ColorSelector = ({ blockId, components, events, loading, methods, properti
41
41
  onChange: (newColor)=>{
42
42
  methods.setValue(newColor);
43
43
  methods.triggerEvent({
44
- name: 'onChange'
44
+ name: 'onChange',
45
+ event: {
46
+ value: newColor
47
+ }
45
48
  });
46
49
  },
47
50
  size: properties.size,
@@ -0,0 +1,115 @@
1
+ /*
2
+ Copyright 2020-2026 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
+ type: 'object',
17
+ properties: {
18
+ type: 'object',
19
+ properties: {
20
+ title: {
21
+ type: 'string',
22
+ description: 'Title to describe the input component, if no title is specified the block id is displayed.'
23
+ },
24
+ inputStyle: {
25
+ type: 'object',
26
+ description: 'Css style to applied to input.',
27
+ docs: {
28
+ displayType: 'yaml'
29
+ }
30
+ },
31
+ disabled: {
32
+ type: 'boolean',
33
+ default: false,
34
+ description: 'If true, the input is disabled.'
35
+ },
36
+ hideInput: {
37
+ type: 'boolean',
38
+ default: false,
39
+ description: 'If true, the input is hidden.'
40
+ },
41
+ label: {
42
+ type: 'object',
43
+ description: 'Label properties.',
44
+ additionalProperties: false,
45
+ properties: {
46
+ align: {
47
+ type: 'string',
48
+ enum: [
49
+ 'left',
50
+ 'right'
51
+ ],
52
+ default: 'left',
53
+ description: 'Align label left or right when inline.'
54
+ },
55
+ colon: {
56
+ type: 'boolean',
57
+ default: true,
58
+ description: 'Append label with colon.'
59
+ },
60
+ extra: {
61
+ type: 'string',
62
+ description: 'Extra text to display beneath the content.'
63
+ },
64
+ title: {
65
+ type: 'string',
66
+ description: 'Label title.'
67
+ },
68
+ span: {
69
+ type: 'number',
70
+ description: 'Label inline span.'
71
+ },
72
+ disabled: {
73
+ type: 'boolean',
74
+ default: false,
75
+ description: 'Hide input label.'
76
+ },
77
+ hasFeedback: {
78
+ type: 'boolean',
79
+ default: true,
80
+ description: 'Display feedback extra from validation, this does not disable validation.'
81
+ },
82
+ inline: {
83
+ type: 'boolean',
84
+ default: false,
85
+ description: 'Render input and label inline.'
86
+ },
87
+ extraStyle: {
88
+ type: 'object',
89
+ description: 'Css style to applied to label extra.',
90
+ docs: {
91
+ displayType: 'yaml'
92
+ }
93
+ },
94
+ feedbackStyle: {
95
+ type: 'object',
96
+ description: 'Css style to applied to label feedback.',
97
+ docs: {
98
+ displayType: 'yaml'
99
+ }
100
+ }
101
+ }
102
+ }
103
+ }
104
+ },
105
+ events: {
106
+ type: 'object',
107
+ additionalProperties: false,
108
+ properties: {
109
+ onChange: {
110
+ type: 'array',
111
+ description: 'Trigger actions when color is picked.'
112
+ }
113
+ }
114
+ }
115
+ };
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2024 Lowdefy, Inc
2
+ Copyright 2020-2026 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
@@ -28,7 +28,9 @@
28
28
  height: 34px;
29
29
  border-radius: 2px;
30
30
  border: 3px solid #fff;
31
- box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1), inset 0 0 0 1px rgba(0, 0, 0, 0.1);
31
+ box-shadow:
32
+ 0 0 0 1px rgba(0, 0, 0, 0.1),
33
+ inset 0 0 0 1px rgba(0, 0, 0, 0.1);
32
34
  cursor: pointer;
33
35
  }
34
36
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2024 Lowdefy, Inc
2
+ Copyright 2020-2026 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
package/dist/blocks.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2024 Lowdefy, Inc
2
+ Copyright 2020-2026 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
@@ -0,0 +1,15 @@
1
+ /*
2
+ Copyright 2020-2026 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/schema.js';
package/dist/types.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /* eslint-disable import/namespace */ /*
2
- Copyright 2020-2024 Lowdefy, Inc
2
+ Copyright 2020-2026 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lowdefy/blocks-color-selectors",
3
- "version": "4.5.2",
3
+ "version": "4.7.0",
4
4
  "license": "Apache-2.0",
5
5
  "description": "A Lowdefy color selector blocks based on react-color.",
6
6
  "homepage": "https://lowdefy.com",
@@ -36,34 +36,24 @@
36
36
  "exports": {
37
37
  "./*": "./dist/*",
38
38
  "./blocks": "./dist/blocks.js",
39
+ "./schemas": "./dist/schemas.js",
39
40
  "./types": "./dist/types.js"
40
41
  },
41
42
  "files": [
42
43
  "dist/*"
43
44
  ],
44
45
  "dependencies": {
45
- "@lowdefy/block-utils": "4.5.2",
46
- "@lowdefy/blocks-antd": "4.5.2",
46
+ "@lowdefy/block-utils": "4.7.0",
47
+ "@lowdefy/blocks-antd": "4.7.0",
47
48
  "classnames": "2.3.2",
48
49
  "react": "18.2.0",
49
50
  "react-colorful": "5.6.1",
50
51
  "react-dom": "18.2.0"
51
52
  },
52
53
  "devDependencies": {
53
- "@emotion/jest": "11.10.5",
54
- "@lowdefy/block-dev": "4.5.2",
55
- "@lowdefy/jest-yaml-transform": "4.5.2",
56
54
  "@swc/cli": "0.1.63",
57
55
  "@swc/core": "1.3.99",
58
- "@swc/jest": "0.2.29",
59
- "@testing-library/dom": "8.19.1",
60
- "@testing-library/react": "13.4.0",
61
- "@testing-library/user-event": "14.4.3",
62
- "copyfiles": "2.4.1",
63
- "jest": "28.1.3",
64
- "jest-canvas-mock": "2.4.0",
65
- "jest-environment-jsdom": "28.1.3",
66
- "jest-serializer-html": "7.1.0"
56
+ "copyfiles": "2.4.1"
67
57
  },
68
58
  "publishConfig": {
69
59
  "access": "public"
@@ -71,7 +61,6 @@
71
61
  "scripts": {
72
62
  "build": "swc src --out-dir dist --config-file ../../../../.swcrc --delete-dir-on-start && pnpm copyfiles",
73
63
  "clean": "rm -rf dist",
74
- "copyfiles": "copyfiles -u 1 \"./src/**/*\" dist -e \"./src/**/*.js\" -e \"./src/**/*.yaml\" -e \"./src/**/*.snap\"",
75
- "test": "node --experimental-vm-modules node_modules/jest/bin/jest.js"
64
+ "copyfiles": "copyfiles -u 1 \"./src/**/*\" dist -e \"./src/**/*.js\" -e \"./src/**/*.yaml\" -e \"./src/**/*.snap\""
76
65
  }
77
66
  }