@strapi/plugin-color-picker 0.0.0-next.f5107c72369ee86a8ec1b6782f2e890925033ca3 → 0.0.0-next.f5b09a8e61e059f02784478e27c310c6290be088

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.
Files changed (61) hide show
  1. package/dist/_chunks/ColorPickerInput-0d985ad5.mjs +277 -0
  2. package/dist/_chunks/ColorPickerInput-0d985ad5.mjs.map +1 -0
  3. package/dist/_chunks/ColorPickerInput-8875b370.js +298 -0
  4. package/dist/_chunks/ColorPickerInput-8875b370.js.map +1 -0
  5. package/{admin/src/translations/cs.json → dist/_chunks/cs-32e5b75a.mjs} +6 -2
  6. package/dist/_chunks/cs-32e5b75a.mjs.map +1 -0
  7. package/dist/_chunks/cs-c22467c6.js +16 -0
  8. package/dist/_chunks/cs-c22467c6.js.map +1 -0
  9. package/{admin/src/translations/en.json → dist/_chunks/en-2230584b.mjs} +6 -2
  10. package/dist/_chunks/en-2230584b.mjs.map +1 -0
  11. package/dist/_chunks/en-eb6717ab.js +19 -0
  12. package/dist/_chunks/en-eb6717ab.js.map +1 -0
  13. package/dist/_chunks/index-214132a2.mjs +124 -0
  14. package/dist/_chunks/index-214132a2.mjs.map +1 -0
  15. package/dist/_chunks/index-9695efa4.js +125 -0
  16. package/dist/_chunks/index-9695efa4.js.map +1 -0
  17. package/{admin/src/translations/ru.json → dist/_chunks/ru-0bf57448.mjs} +6 -2
  18. package/dist/_chunks/ru-0bf57448.mjs.map +1 -0
  19. package/dist/_chunks/ru-1d1cf8a8.js +19 -0
  20. package/dist/_chunks/ru-1d1cf8a8.js.map +1 -0
  21. package/dist/_chunks/sv-6e7fa200.js +16 -0
  22. package/dist/_chunks/sv-6e7fa200.js.map +1 -0
  23. package/{admin/src/translations/sv.json → dist/_chunks/sv-de6a785a.mjs} +6 -2
  24. package/dist/_chunks/sv-de6a785a.mjs.map +1 -0
  25. package/{admin/src/translations/tr.json → dist/_chunks/tr-4d632eac.mjs} +6 -2
  26. package/dist/_chunks/tr-4d632eac.mjs.map +1 -0
  27. package/dist/_chunks/tr-67b6e192.js +16 -0
  28. package/dist/_chunks/tr-67b6e192.js.map +1 -0
  29. package/{admin/src/translations/zh.json → dist/_chunks/zh-5ba3e025.mjs} +6 -2
  30. package/dist/_chunks/zh-5ba3e025.mjs.map +1 -0
  31. package/dist/_chunks/zh-e5010f8b.js +16 -0
  32. package/dist/_chunks/zh-e5010f8b.js.map +1 -0
  33. package/dist/admin/components/ColorPickerIcon.d.ts +1 -0
  34. package/dist/admin/components/ColorPickerInput.d.ts +32 -0
  35. package/dist/admin/hooks/useComposeRefs.d.ts +29 -0
  36. package/dist/admin/index.d.ts +18 -0
  37. package/dist/admin/index.js +9 -0
  38. package/dist/admin/index.js.map +1 -0
  39. package/dist/admin/index.mjs +10 -0
  40. package/dist/admin/index.mjs.map +1 -0
  41. package/dist/admin/pluginId.d.ts +1 -0
  42. package/dist/admin/utils/getTrad.d.ts +1 -0
  43. package/dist/server/index.d.ts +1 -0
  44. package/dist/server/index.d.ts.map +1 -0
  45. package/dist/server/index.js +11 -5
  46. package/dist/server/index.js.map +1 -1
  47. package/dist/server/index.mjs +14 -0
  48. package/dist/server/index.mjs.map +1 -0
  49. package/dist/server/register.d.ts +1 -0
  50. package/dist/server/register.d.ts.map +1 -0
  51. package/package.json +67 -48
  52. package/admin/src/components/ColorPicker/ColorPickerIcon/index.js +0 -26
  53. package/admin/src/components/ColorPicker/ColorPickerInput/index.js +0 -206
  54. package/admin/src/components/tests/__snapshots__/color-picker-input.test.js.snap +0 -238
  55. package/admin/src/components/tests/color-picker-input.test.js +0 -65
  56. package/admin/src/index.js +0 -88
  57. package/admin/src/pluginId.js +0 -5
  58. package/admin/src/utils/getTrad.js +0 -5
  59. package/dist/server/register.js +0 -12
  60. package/dist/server/register.js.map +0 -1
  61. package/strapi-admin.js +0 -3
@@ -2,3 +2,4 @@ declare const _default: {
2
2
  register: ({ strapi }: any) => void;
3
3
  };
4
4
  export default _default;
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../server/src/index.ts"],"names":[],"mappings":";;;AAEA,wBAEE"}
@@ -1,7 +1,13 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const register_1 = require("./register");
4
- exports.default = {
5
- register: register_1.register,
2
+ const register = ({ strapi }) => {
3
+ strapi.customFields.register({
4
+ name: "color",
5
+ plugin: "color-picker",
6
+ type: "string"
7
+ });
6
8
  };
7
- //# sourceMappingURL=index.js.map
9
+ const index = {
10
+ register
11
+ };
12
+ module.exports = index;
13
+ //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../server/src/index.ts"],"names":[],"mappings":";;AAAA,yCAAsC;AAEtC,kBAAe;IACb,QAAQ,EAAR,mBAAQ;CACT,CAAC"}
1
+ {"version":3,"file":"index.js","sources":["../../server/src/register.ts","../../server/src/index.ts"],"sourcesContent":["export const register = ({ strapi }: any) => {\n strapi.customFields.register({\n name: 'color',\n plugin: 'color-picker',\n type: 'string',\n });\n};\n","import { register } from './register';\n\nexport default {\n register,\n};\n"],"names":[],"mappings":";AAAO,MAAM,WAAW,CAAC,EAAE,aAAkB;AAC3C,SAAO,aAAa,SAAS;AAAA,IAC3B,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,MAAM;AAAA,EAAA,CACP;AACH;ACJA,MAAe,QAAA;AAAA,EACb;AACF;;"}
@@ -0,0 +1,14 @@
1
+ const register = ({ strapi }) => {
2
+ strapi.customFields.register({
3
+ name: "color",
4
+ plugin: "color-picker",
5
+ type: "string"
6
+ });
7
+ };
8
+ const index = {
9
+ register
10
+ };
11
+ export {
12
+ index as default
13
+ };
14
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sources":["../../server/src/register.ts","../../server/src/index.ts"],"sourcesContent":["export const register = ({ strapi }: any) => {\n strapi.customFields.register({\n name: 'color',\n plugin: 'color-picker',\n type: 'string',\n });\n};\n","import { register } from './register';\n\nexport default {\n register,\n};\n"],"names":[],"mappings":"AAAO,MAAM,WAAW,CAAC,EAAE,aAAkB;AAC3C,SAAO,aAAa,SAAS;AAAA,IAC3B,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,MAAM;AAAA,EAAA,CACP;AACH;ACJA,MAAe,QAAA;AAAA,EACb;AACF;"}
@@ -1 +1,2 @@
1
1
  export declare const register: ({ strapi }: any) => void;
2
+ //# sourceMappingURL=register.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../server/src/register.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,eAAgB,GAAG,SAMvC,CAAC"}
package/package.json CHANGED
@@ -1,27 +1,76 @@
1
1
  {
2
2
  "name": "@strapi/plugin-color-picker",
3
- "version": "0.0.0-next.f5107c72369ee86a8ec1b6782f2e890925033ca3",
3
+ "version": "0.0.0-next.f5b09a8e61e059f02784478e27c310c6290be088",
4
4
  "description": "Strapi maintained Custom Fields",
5
- "strapi": {
6
- "name": "color-picker",
7
- "description": "Color picker custom field",
8
- "kind": "plugin",
9
- "displayName": "Color Picker"
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "https://github.com/strapi/strapi.git",
8
+ "directory": "packages/plugins/color-picker"
9
+ },
10
+ "license": "SEE LICENSE IN LICENSE",
11
+ "author": {
12
+ "name": "Strapi Solutions SAS",
13
+ "email": "hi@strapi.io",
14
+ "url": "https://strapi.io"
15
+ },
16
+ "maintainers": [
17
+ {
18
+ "name": "Strapi Solutions SAS",
19
+ "email": "hi@strapi.io",
20
+ "url": "https://strapi.io"
21
+ }
22
+ ],
23
+ "exports": {
24
+ "./strapi-admin": {
25
+ "types": "./dist/admin/index.d.ts",
26
+ "source": "./admin/src/index.ts",
27
+ "import": "./dist/admin/index.mjs",
28
+ "require": "./dist/admin/index.js",
29
+ "default": "./dist/admin/index.js"
30
+ },
31
+ "./strapi-server": {
32
+ "types": "./dist/server/index.d.ts",
33
+ "source": "./server/src/index.ts",
34
+ "import": "./dist/server/index.mjs",
35
+ "require": "./dist/server/index.js",
36
+ "default": "./dist/server/index.js"
37
+ },
38
+ "./package.json": "./package.json"
39
+ },
40
+ "files": [
41
+ "./dist",
42
+ "strapi-server.js"
43
+ ],
44
+ "scripts": {
45
+ "build": "strapi plugin:build --force",
46
+ "clean": "run -T rimraf ./dist",
47
+ "lint": "run -T eslint .",
48
+ "prepublishOnly": "yarn clean && yarn build",
49
+ "test:front": "run -T cross-env IS_EE=true jest --config ./jest.config.front.js",
50
+ "test:front:ce": "run -T cross-env IS_EE=false jest --config ./jest.config.front.js",
51
+ "test:front:watch": "run -T cross-env IS_EE=true jest --config ./jest.config.front.js --watchAll",
52
+ "test:front:watch:ce": "run -T cross-env IS_EE=false jest --config ./jest.config.front.js --watchAll",
53
+ "test:ts:front": "run -T tsc -p admin/tsconfig.json",
54
+ "watch": "strapi plugin:watch"
10
55
  },
11
56
  "dependencies": {
12
- "@strapi/design-system": "1.8.2",
13
- "@strapi/helper-plugin": "0.0.0-next.f5107c72369ee86a8ec1b6782f2e890925033ca3",
14
- "@strapi/icons": "1.8.2",
57
+ "@strapi/design-system": "1.13.0",
58
+ "@strapi/helper-plugin": "0.0.0-next.f5b09a8e61e059f02784478e27c310c6290be088",
59
+ "@strapi/icons": "1.13.0",
15
60
  "prop-types": "^15.8.1",
16
61
  "react-colorful": "5.6.1",
17
62
  "react-intl": "6.4.1"
18
63
  },
19
64
  "devDependencies": {
65
+ "@strapi/strapi": "0.0.0-next.f5b09a8e61e059f02784478e27c310c6290be088",
20
66
  "@testing-library/react": "14.0.0",
67
+ "@testing-library/user-event": "14.4.3",
68
+ "@types/styled-components": "5.1.26",
21
69
  "react": "^18.2.0",
22
70
  "react-dom": "^18.2.0",
23
71
  "react-router-dom": "5.3.4",
24
- "styled-components": "5.3.3"
72
+ "styled-components": "5.3.3",
73
+ "typescript": "5.2.2"
25
74
  },
26
75
  "peerDependencies": {
27
76
  "@strapi/strapi": "^4.4.0",
@@ -30,45 +79,15 @@
30
79
  "react-router-dom": "5.3.4",
31
80
  "styled-components": "5.3.3"
32
81
  },
33
- "files": [
34
- "./dist",
35
- "./admin",
36
- "strapi-admin.js",
37
- "strapi-server.js"
38
- ],
39
- "scripts": {
40
- "build": "run -T tsc -p server/tsconfig.json --outDir ./dist/server",
41
- "build:ts": "run build",
42
- "watch": "run -T tsc -w --preserveWatchOutput",
43
- "clean": "run -T rimraf ./dist",
44
- "prepublishOnly": "yarn clean && yarn build",
45
- "test:front": "run -T cross-env IS_EE=true jest --config ./jest.config.front.js",
46
- "test:front:watch": "run -T cross-env IS_EE=true jest --config ./jest.config.front.js --watchAll",
47
- "test:front:ce": "run -T cross-env IS_EE=false jest --config ./jest.config.front.js",
48
- "test:front:watch:ce": "run -T cross-env IS_EE=false jest --config ./jest.config.front.js --watchAll",
49
- "lint": "run -T eslint ."
50
- },
51
- "repository": {
52
- "type": "git",
53
- "url": "https://github.com/strapi/strapi.git",
54
- "directory": "packages/plugins/color-picker"
55
- },
56
- "license": "SEE LICENSE IN LICENSE",
57
- "author": {
58
- "name": "Strapi Solutions SAS",
59
- "email": "hi@strapi.io",
60
- "url": "https://strapi.io"
61
- },
62
- "maintainers": [
63
- {
64
- "name": "Strapi Solutions SAS",
65
- "email": "hi@strapi.io",
66
- "url": "https://strapi.io"
67
- }
68
- ],
69
82
  "engines": {
70
- "node": ">=16.0.0 <=20.x.x",
83
+ "node": ">=18.0.0 <=20.x.x",
71
84
  "npm": ">=6.0.0"
72
85
  },
73
- "gitHead": "f5107c72369ee86a8ec1b6782f2e890925033ca3"
86
+ "strapi": {
87
+ "name": "color-picker",
88
+ "description": "Color picker custom field",
89
+ "kind": "plugin",
90
+ "displayName": "Color Picker"
91
+ },
92
+ "gitHead": "f5b09a8e61e059f02784478e27c310c6290be088"
74
93
  }
@@ -1,26 +0,0 @@
1
- import React from 'react';
2
-
3
- import { Flex, Icon } from '@strapi/design-system';
4
- import { Paint } from '@strapi/icons';
5
- import styled from 'styled-components';
6
-
7
- const IconBox = styled(Flex)`
8
- /* Hard code color values */
9
- /* to stay consistent between themes */
10
- background-color: #f0f0ff; /* primary100 */
11
- border: 1px solid #d9d8ff; /* primary200 */
12
-
13
- svg > path {
14
- fill: #4945ff; /* primary600 */
15
- }
16
- `;
17
-
18
- const ColorPickerIcon = () => {
19
- return (
20
- <IconBox justifyContent="center" alignItems="center" width={7} height={6} hasRadius aria-hidden>
21
- <Icon as={Paint} />
22
- </IconBox>
23
- );
24
- };
25
-
26
- export default ColorPickerIcon;
@@ -1,206 +0,0 @@
1
- import React, { useRef, useState } from 'react';
2
-
3
- import {
4
- BaseButton,
5
- Box,
6
- Field,
7
- FieldError,
8
- FieldHint,
9
- FieldInput,
10
- FieldLabel,
11
- Flex,
12
- FocusTrap,
13
- Popover,
14
- Typography,
15
- } from '@strapi/design-system';
16
- import { CarretDown } from '@strapi/icons';
17
- import PropTypes from 'prop-types';
18
- import { HexColorPicker } from 'react-colorful';
19
- import { useIntl } from 'react-intl';
20
- import styled from 'styled-components';
21
-
22
- import getTrad from '../../../utils/getTrad';
23
-
24
- const ColorPreview = styled.div`
25
- border-radius: 50%;
26
- width: 20px;
27
- height: 20px;
28
- margin-right: 10px;
29
- background-color: ${(props) => props.color};
30
- border: 1px solid rgba(0, 0, 0, 0.1);
31
- `;
32
-
33
- const ColorPicker = styled(HexColorPicker)`
34
- && {
35
- width: 100%;
36
- aspect-ratio: 1.5;
37
- }
38
-
39
- .react-colorful__pointer {
40
- width: ${({ theme }) => theme.spaces[3]};
41
- height: ${({ theme }) => theme.spaces[3]};
42
- }
43
-
44
- .react-colorful__saturation {
45
- border-radius: ${({ theme }) => theme.spaces[1]};
46
- border-bottom: none;
47
- }
48
-
49
- .react-colorful__hue {
50
- border-radius: 10px;
51
- height: ${({ theme }) => theme.spaces[3]};
52
- margin-top: ${({ theme }) => theme.spaces[2]};
53
- }
54
- `;
55
-
56
- const ColorPickerToggle = styled(BaseButton)`
57
- display: flex;
58
- justify-content: space-between;
59
- align-items: center;
60
-
61
- svg {
62
- width: ${({ theme }) => theme.spaces[2]};
63
- height: ${({ theme }) => theme.spaces[2]};
64
- }
65
-
66
- svg > path {
67
- fill: ${({ theme }) => theme.colors.neutral500};
68
- justify-self: flex-end;
69
- }
70
- `;
71
-
72
- const ColorPickerPopover = styled(Popover)`
73
- padding: ${({ theme }) => theme.spaces[2]};
74
- min-height: 270px;
75
- `;
76
-
77
- const ColorPickerInput = ({
78
- attribute,
79
- description,
80
- disabled,
81
- error,
82
- intlLabel,
83
- labelAction,
84
- name,
85
- onChange,
86
- required,
87
- value,
88
- }) => {
89
- const [showColorPicker, setShowColorPicker] = useState(false);
90
- const colorPickerButtonRef = useRef();
91
- const { formatMessage } = useIntl();
92
- const color = value || '#000000';
93
- const styleUppercase = { textTransform: 'uppercase' };
94
-
95
- const handleBlur = (e) => {
96
- e.preventDefault();
97
-
98
- if (!e.currentTarget.contains(e.relatedTarget)) {
99
- setShowColorPicker(false);
100
- }
101
- };
102
-
103
- return (
104
- <Field
105
- name={name}
106
- id={name}
107
- // GenericInput calls formatMessage and returns a string for the error
108
- error={error}
109
- hint={description && formatMessage(description)}
110
- required={required}
111
- >
112
- <Flex direction="column" alignItems="stretch" gap={1}>
113
- <FieldLabel action={labelAction}>{formatMessage(intlLabel)}</FieldLabel>
114
- <ColorPickerToggle
115
- ref={colorPickerButtonRef}
116
- aria-label={formatMessage({
117
- id: getTrad('color-picker.toggle.aria-label'),
118
- defaultMessage: 'Color picker toggle',
119
- })}
120
- aria-controls="color-picker-value"
121
- aria-haspopup="dialog"
122
- aria-expanded={showColorPicker}
123
- aria-disabled={disabled}
124
- disabled={disabled}
125
- onClick={() => setShowColorPicker(!showColorPicker)}
126
- >
127
- <Flex>
128
- <ColorPreview color={color} />
129
- <Typography
130
- style={styleUppercase}
131
- textColor={value ? null : 'neutral600'}
132
- variant="omega"
133
- >
134
- {color}
135
- </Typography>
136
- </Flex>
137
- <CarretDown aria-hidden />
138
- </ColorPickerToggle>
139
- {showColorPicker && (
140
- <ColorPickerPopover
141
- onBlur={handleBlur}
142
- role="dialog"
143
- source={colorPickerButtonRef}
144
- spacing={4}
145
- >
146
- <FocusTrap onEscape={() => setShowColorPicker(false)}>
147
- <ColorPicker
148
- color={color}
149
- onChange={(hexValue) =>
150
- onChange({ target: { name, value: hexValue, type: attribute.type } })
151
- }
152
- />
153
- <Flex paddingTop={3} paddingLeft={4} justifyContent="flex-end">
154
- <Box paddingRight={2}>
155
- <Typography variant="omega" as="label" textColor="neutral600">
156
- {formatMessage({
157
- id: getTrad('color-picker.input.format'),
158
- defaultMessage: 'HEX',
159
- })}
160
- </Typography>
161
- </Box>
162
- <FieldInput
163
- id="color-picker-value"
164
- aria-label={formatMessage({
165
- id: getTrad('color-picker.input.aria-label'),
166
- defaultMessage: 'Color picker input',
167
- })}
168
- style={styleUppercase}
169
- value={value}
170
- placeholder="#000000"
171
- onChange={onChange}
172
- />
173
- </Flex>
174
- </FocusTrap>
175
- </ColorPickerPopover>
176
- )}
177
- <FieldHint />
178
- <FieldError />
179
- </Flex>
180
- </Field>
181
- );
182
- };
183
-
184
- ColorPickerInput.defaultProps = {
185
- description: null,
186
- disabled: false,
187
- error: null,
188
- labelAction: null,
189
- required: false,
190
- value: '',
191
- };
192
-
193
- ColorPickerInput.propTypes = {
194
- intlLabel: PropTypes.object.isRequired,
195
- onChange: PropTypes.func.isRequired,
196
- attribute: PropTypes.object.isRequired,
197
- name: PropTypes.string.isRequired,
198
- description: PropTypes.object,
199
- disabled: PropTypes.bool,
200
- error: PropTypes.string,
201
- labelAction: PropTypes.object,
202
- required: PropTypes.bool,
203
- value: PropTypes.string,
204
- };
205
-
206
- export default ColorPickerInput;
@@ -1,238 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`<ColorPickerInput /> renders and matches the snapshot 1`] = `
4
- .c9 {
5
- border: 0;
6
- -webkit-clip: rect(0 0 0 0);
7
- clip: rect(0 0 0 0);
8
- height: 1px;
9
- margin: -1px;
10
- overflow: hidden;
11
- padding: 0;
12
- position: absolute;
13
- width: 1px;
14
- }
15
-
16
- .c1 {
17
- font-size: 0.75rem;
18
- line-height: 1.33;
19
- font-weight: 600;
20
- color: #32324d;
21
- }
22
-
23
- .c8 {
24
- font-size: 0.875rem;
25
- line-height: 1.43;
26
- color: #666687;
27
- }
28
-
29
- .c3 {
30
- background: #ffffff;
31
- padding: 8px;
32
- border-radius: 4px;
33
- border-color: #dcdce4;
34
- border: 1px solid #dcdce4;
35
- cursor: pointer;
36
- }
37
-
38
- .c0 {
39
- -webkit-align-items: stretch;
40
- -webkit-box-align: stretch;
41
- -ms-flex-align: stretch;
42
- align-items: stretch;
43
- display: -webkit-box;
44
- display: -webkit-flex;
45
- display: -ms-flexbox;
46
- display: flex;
47
- -webkit-flex-direction: column;
48
- -ms-flex-direction: column;
49
- flex-direction: column;
50
- gap: 4px;
51
- }
52
-
53
- .c4 {
54
- -webkit-align-items: center;
55
- -webkit-box-align: center;
56
- -ms-flex-align: center;
57
- align-items: center;
58
- display: -webkit-box;
59
- display: -webkit-flex;
60
- display: -ms-flexbox;
61
- display: flex;
62
- -webkit-flex-direction: row;
63
- -ms-flex-direction: row;
64
- flex-direction: row;
65
- }
66
-
67
- .c5 {
68
- position: relative;
69
- outline: none;
70
- }
71
-
72
- .c5 > svg {
73
- height: 12px;
74
- width: 12px;
75
- }
76
-
77
- .c5 > svg > g,
78
- .c5 > svg path {
79
- fill: #ffffff;
80
- }
81
-
82
- .c5[aria-disabled='true'] {
83
- pointer-events: none;
84
- }
85
-
86
- .c5:after {
87
- -webkit-transition-property: all;
88
- transition-property: all;
89
- -webkit-transition-duration: 0.2s;
90
- transition-duration: 0.2s;
91
- border-radius: 8px;
92
- content: '';
93
- position: absolute;
94
- top: -4px;
95
- bottom: -4px;
96
- left: -4px;
97
- right: -4px;
98
- border: 2px solid transparent;
99
- }
100
-
101
- .c5:focus-visible {
102
- outline: none;
103
- }
104
-
105
- .c5:focus-visible:after {
106
- border-radius: 8px;
107
- content: '';
108
- position: absolute;
109
- top: -5px;
110
- bottom: -5px;
111
- left: -5px;
112
- right: -5px;
113
- border: 2px solid #4945ff;
114
- }
115
-
116
- .c2 {
117
- display: -webkit-box;
118
- display: -webkit-flex;
119
- display: -ms-flexbox;
120
- display: flex;
121
- -webkit-align-items: center;
122
- -webkit-box-align: center;
123
- -ms-flex-align: center;
124
- align-items: center;
125
- }
126
-
127
- .c7 {
128
- border-radius: 50%;
129
- width: 20px;
130
- height: 20px;
131
- margin-right: 10px;
132
- background-color: #000000;
133
- border: 1px solid rgba(0,0,0,0.1);
134
- }
135
-
136
- .c6 {
137
- display: -webkit-box;
138
- display: -webkit-flex;
139
- display: -ms-flexbox;
140
- display: flex;
141
- -webkit-box-pack: justify;
142
- -webkit-justify-content: space-between;
143
- -ms-flex-pack: justify;
144
- justify-content: space-between;
145
- -webkit-align-items: center;
146
- -webkit-box-align: center;
147
- -ms-flex-align: center;
148
- align-items: center;
149
- }
150
-
151
- .c6 svg {
152
- width: 8px;
153
- height: 8px;
154
- }
155
-
156
- .c6 svg > path {
157
- fill: #8e8ea9;
158
- justify-self: flex-end;
159
- }
160
-
161
- <div>
162
- <div
163
- class=""
164
- >
165
- <div
166
- class="c0"
167
- >
168
- <label
169
- class="c1 c2"
170
- for="color"
171
- >
172
- color-picker
173
- </label>
174
- <button
175
- aria-controls="color-picker-value"
176
- aria-disabled="false"
177
- aria-expanded="false"
178
- aria-haspopup="dialog"
179
- aria-label="Color picker toggle"
180
- class="c3 c4 c5 c6"
181
- type="button"
182
- >
183
- <div
184
- class="c4"
185
- >
186
- <div
187
- class="c7"
188
- color="#000000"
189
- />
190
- <span
191
- class="c8"
192
- style="text-transform: uppercase;"
193
- >
194
- #000000
195
- </span>
196
- </div>
197
- <svg
198
- aria-hidden="true"
199
- fill="none"
200
- height="1rem"
201
- viewBox="0 0 14 8"
202
- width="1rem"
203
- xmlns="http://www.w3.org/2000/svg"
204
- >
205
- <path
206
- clip-rule="evenodd"
207
- d="M14 .889a.86.86 0 0 1-.26.625L7.615 7.736A.834.834 0 0 1 7 8a.834.834 0 0 1-.615-.264L.26 1.514A.861.861 0 0 1 0 .889c0-.24.087-.45.26-.625A.834.834 0 0 1 .875 0h12.25c.237 0 .442.088.615.264a.86.86 0 0 1 .26.625Z"
208
- fill="#32324D"
209
- fill-rule="evenodd"
210
- />
211
- </svg>
212
- </button>
213
- </div>
214
- </div>
215
- <div
216
- class="c9"
217
- >
218
- <p
219
- aria-live="polite"
220
- aria-relevant="all"
221
- id="live-region-log"
222
- role="log"
223
- />
224
- <p
225
- aria-live="polite"
226
- aria-relevant="all"
227
- id="live-region-status"
228
- role="status"
229
- />
230
- <p
231
- aria-live="assertive"
232
- aria-relevant="all"
233
- id="live-region-alert"
234
- role="alert"
235
- />
236
- </div>
237
- </div>
238
- `;