@strapi/plugin-color-picker 4.7.1 → 4.7.2-exp.24dd7d95972fa822bf43e9b095b51027402c229e

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.
@@ -2,7 +2,6 @@ import React, { useState, useRef } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import styled from 'styled-components';
4
4
  import {
5
- Stack,
6
5
  Typography,
7
6
  Flex,
8
7
  Box,
@@ -109,7 +108,7 @@ const ColorPickerInput = ({
109
108
  hint={description && formatMessage(description)}
110
109
  required={required}
111
110
  >
112
- <Stack spacing={1}>
111
+ <Flex direction="column" alignItems="stretch" gap={1}>
113
112
  <FieldLabel action={labelAction}>{formatMessage(intlLabel)}</FieldLabel>
114
113
  <ColorPickerToggle
115
114
  ref={colorPickerButtonRef}
@@ -176,7 +175,7 @@ const ColorPickerInput = ({
176
175
  )}
177
176
  <FieldHint />
178
177
  <FieldError />
179
- </Stack>
178
+ </Flex>
180
179
  </Field>
181
180
  );
182
181
  };
@@ -1,14 +1,14 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
3
  exports[`<ColorPickerInput /> renders and matches the snapshot 1`] = `
4
- .c2 {
4
+ .c1 {
5
5
  font-size: 0.75rem;
6
6
  line-height: 1.33;
7
7
  font-weight: 600;
8
8
  color: #32324d;
9
9
  }
10
10
 
11
- .c7 {
11
+ .c6 {
12
12
  font-size: 0.875rem;
13
13
  line-height: 1.43;
14
14
  color: #666687;
@@ -26,9 +26,10 @@ exports[`<ColorPickerInput /> renders and matches the snapshot 1`] = `
26
26
  -webkit-flex-direction: column;
27
27
  -ms-flex-direction: column;
28
28
  flex-direction: column;
29
+ gap: 4px;
29
30
  }
30
31
 
31
- .c3 {
32
+ .c2 {
32
33
  -webkit-align-items: center;
33
34
  -webkit-box-align: center;
34
35
  -ms-flex-align: center;
@@ -42,16 +43,7 @@ exports[`<ColorPickerInput /> renders and matches the snapshot 1`] = `
42
43
  flex-direction: row;
43
44
  }
44
45
 
45
- .c1 > * {
46
- margin-top: 0;
47
- margin-bottom: 0;
48
- }
49
-
50
- .c1 > * + * {
51
- margin-top: 4px;
52
- }
53
-
54
- .c4 {
46
+ .c3 {
55
47
  display: -webkit-box;
56
48
  display: -webkit-flex;
57
49
  display: -ms-flexbox;
@@ -65,21 +57,21 @@ exports[`<ColorPickerInput /> renders and matches the snapshot 1`] = `
65
57
  outline: none;
66
58
  }
67
59
 
68
- .c4 svg {
60
+ .c3 svg {
69
61
  height: 12px;
70
62
  width: 12px;
71
63
  }
72
64
 
73
- .c4 svg > g,
74
- .c4 svg path {
65
+ .c3 svg > g,
66
+ .c3 svg path {
75
67
  fill: #ffffff;
76
68
  }
77
69
 
78
- .c4[aria-disabled='true'] {
70
+ .c3[aria-disabled='true'] {
79
71
  pointer-events: none;
80
72
  }
81
73
 
82
- .c4:after {
74
+ .c3:after {
83
75
  -webkit-transition-property: all;
84
76
  transition-property: all;
85
77
  -webkit-transition-duration: 0.2s;
@@ -94,11 +86,11 @@ exports[`<ColorPickerInput /> renders and matches the snapshot 1`] = `
94
86
  border: 2px solid transparent;
95
87
  }
96
88
 
97
- .c4:focus-visible {
89
+ .c3:focus-visible {
98
90
  outline: none;
99
91
  }
100
92
 
101
- .c4:focus-visible:after {
93
+ .c3:focus-visible:after {
102
94
  border-radius: 8px;
103
95
  content: '';
104
96
  position: absolute;
@@ -109,7 +101,7 @@ exports[`<ColorPickerInput /> renders and matches the snapshot 1`] = `
109
101
  border: 2px solid #4945ff;
110
102
  }
111
103
 
112
- .c8 {
104
+ .c7 {
113
105
  border: 0;
114
106
  -webkit-clip: rect(0 0 0 0);
115
107
  clip: rect(0 0 0 0);
@@ -121,7 +113,7 @@ exports[`<ColorPickerInput /> renders and matches the snapshot 1`] = `
121
113
  width: 1px;
122
114
  }
123
115
 
124
- .c6 {
116
+ .c5 {
125
117
  border-radius: 50%;
126
118
  width: 20px;
127
119
  height: 20px;
@@ -130,7 +122,7 @@ exports[`<ColorPickerInput /> renders and matches the snapshot 1`] = `
130
122
  border: 1px solid rgba(0,0,0,0.1);
131
123
  }
132
124
 
133
- .c5 {
125
+ .c4 {
134
126
  display: -webkit-box;
135
127
  display: -webkit-flex;
136
128
  display: -ms-flexbox;
@@ -145,12 +137,12 @@ exports[`<ColorPickerInput /> renders and matches the snapshot 1`] = `
145
137
  align-items: center;
146
138
  }
147
139
 
148
- .c5 svg {
140
+ .c4 svg {
149
141
  width: 8px;
150
142
  height: 8px;
151
143
  }
152
144
 
153
- .c5 svg > path {
145
+ .c4 svg > path {
154
146
  fill: #8e8ea9;
155
147
  justify-self: flex-end;
156
148
  }
@@ -158,14 +150,14 @@ exports[`<ColorPickerInput /> renders and matches the snapshot 1`] = `
158
150
  <div>
159
151
  <div>
160
152
  <div
161
- class="c0 c1"
153
+ class="c0"
162
154
  >
163
155
  <label
164
- class="c2"
156
+ class="c1"
165
157
  for="color"
166
158
  >
167
159
  <div
168
- class="c3"
160
+ class="c2"
169
161
  >
170
162
  color-picker
171
163
  </div>
@@ -176,18 +168,18 @@ exports[`<ColorPickerInput /> renders and matches the snapshot 1`] = `
176
168
  aria-expanded="false"
177
169
  aria-haspopup="dialog"
178
170
  aria-label="Color picker toggle"
179
- class="c4 c5"
171
+ class="c3 c4"
180
172
  type="button"
181
173
  >
182
174
  <div
183
- class="c3"
175
+ class="c2"
184
176
  >
185
177
  <div
186
- class="c6"
178
+ class="c5"
187
179
  color="#000000"
188
180
  />
189
181
  <span
190
- class="c7"
182
+ class="c6"
191
183
  style="text-transform: uppercase;"
192
184
  >
193
185
  #000000
@@ -212,7 +204,7 @@ exports[`<ColorPickerInput /> renders and matches the snapshot 1`] = `
212
204
  </div>
213
205
  </div>
214
206
  <div
215
- class="c8"
207
+ class="c7"
216
208
  >
217
209
  <p
218
210
  aria-live="polite"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@strapi/plugin-color-picker",
3
- "version": "4.7.1",
3
+ "version": "4.7.2-exp.24dd7d95972fa822bf43e9b095b51027402c229e",
4
4
  "description": "Strapi maintained Custom Fields",
5
5
  "strapi": {
6
6
  "name": "color-picker",
@@ -9,12 +9,26 @@
9
9
  "displayName": "Color Picker"
10
10
  },
11
11
  "dependencies": {
12
- "react": "^17.0.2",
12
+ "@strapi/design-system": "1.6.3",
13
+ "@strapi/helper-plugin": "4.7.2-exp.24dd7d95972fa822bf43e9b095b51027402c229e",
14
+ "@strapi/icons": "1.6.3",
15
+ "prop-types": "^15.7.2",
13
16
  "react-colorful": "5.6.1",
14
- "react-dom": "^17.0.2"
17
+ "react-intl": "6.2.8"
18
+ },
19
+ "devDependencies": {
20
+ "@testing-library/react": "12.1.4",
21
+ "react": "^17.0.2",
22
+ "react-dom": "^17.0.2",
23
+ "react-router-dom": "5.3.4",
24
+ "styled-components": "5.3.3"
15
25
  },
16
26
  "peerDependencies": {
17
- "@strapi/strapi": "^4.4.0"
27
+ "@strapi/strapi": "^4.4.0",
28
+ "react": "^17.0.2",
29
+ "react-dom": "^17.0.2",
30
+ "react-router-dom": "5.3.4",
31
+ "styled-components": "5.3.3"
18
32
  },
19
33
  "repository": {
20
34
  "type": "git",
@@ -38,5 +52,5 @@
38
52
  "node": ">=14.19.1 <=18.x.x",
39
53
  "npm": ">=6.0.0"
40
54
  },
41
- "gitHead": "0307fb4bf7b006c4cd902412967d3987d7810ed8"
55
+ "gitHead": "24dd7d95972fa822bf43e9b095b51027402c229e"
42
56
  }