@strapi/plugin-color-picker 0.0.0-next.f4ff842a3cb7b83db540bee67554b704e042b042 → 0.0.0-next.f5312617ca16b870c2bf1adcea2c69b676979e29
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.
- package/LICENSE +34 -12
- package/dist/_chunks/ColorPickerInput-B07RliGP.js +153 -0
- package/dist/_chunks/ColorPickerInput-B07RliGP.js.map +1 -0
- package/dist/_chunks/ColorPickerInput-CMg-0_-G.mjs +134 -0
- package/dist/_chunks/ColorPickerInput-CMg-0_-G.mjs.map +1 -0
- package/dist/_chunks/{cs-4GdZY0p6.js → cs-CKl0OyEH.js} +1 -1
- package/dist/_chunks/cs-CKl0OyEH.js.map +1 -0
- package/dist/_chunks/{cs-A2xRj-2-.mjs → cs-DMmE6LK7.mjs} +1 -1
- package/dist/_chunks/cs-DMmE6LK7.mjs.map +1 -0
- package/dist/_chunks/{en-L6ZZWDJv.mjs → en-BlDau3us.mjs} +1 -1
- package/dist/_chunks/en-BlDau3us.mjs.map +1 -0
- package/dist/_chunks/{en-WeRHjVEB.js → en-Ct0C5cA2.js} +1 -1
- package/dist/_chunks/en-Ct0C5cA2.js.map +1 -0
- package/dist/_chunks/{index-uOrtnJpz.mjs → index-B9LkgZbo.mjs} +13 -8
- package/dist/_chunks/index-B9LkgZbo.mjs.map +1 -0
- package/dist/_chunks/{index-OJYEuoCq.js → index-BeQLcDEb.js} +13 -10
- package/dist/_chunks/index-BeQLcDEb.js.map +1 -0
- package/dist/_chunks/{ru-UXN_ByI9.js → ru-Wrg-npZz.js} +1 -1
- package/dist/_chunks/ru-Wrg-npZz.js.map +1 -0
- package/dist/_chunks/{ru-LLXYEOwl.mjs → ru-aOnA-eym.mjs} +1 -1
- package/dist/_chunks/ru-aOnA-eym.mjs.map +1 -0
- package/dist/_chunks/{sv-QqRPNQLw.mjs → sv-BaFDND79.mjs} +1 -1
- package/dist/_chunks/sv-BaFDND79.mjs.map +1 -0
- package/dist/_chunks/{sv-3-Yk9bKb.js → sv-CKY6es_6.js} +1 -1
- package/dist/_chunks/sv-CKY6es_6.js.map +1 -0
- package/dist/_chunks/{tr-qYGSw8gH.mjs → tr-CHHW_hYI.mjs} +1 -1
- package/dist/_chunks/tr-CHHW_hYI.mjs.map +1 -0
- package/dist/_chunks/{tr-AbD-f8F0.js → tr-DcLzQS-J.js} +1 -1
- package/dist/_chunks/tr-DcLzQS-J.js.map +1 -0
- package/dist/_chunks/{zh-fPTOIT6s.mjs → zh-DBH6uCXb.mjs} +1 -1
- package/dist/_chunks/zh-DBH6uCXb.mjs.map +1 -0
- package/dist/_chunks/{zh-c23gv_oM.js → zh-T5cJzhPD.js} +1 -1
- package/dist/_chunks/zh-T5cJzhPD.js.map +1 -0
- package/dist/admin/index.js +1 -6
- package/dist/admin/index.js.map +1 -1
- package/dist/admin/index.mjs +1 -6
- package/dist/admin/index.mjs.map +1 -1
- package/dist/admin/src/components/ColorPickerInput.d.ts +3 -28
- package/dist/admin/src/utils/prefixPluginTranslations.d.ts +3 -0
- package/package.json +21 -23
- package/dist/_chunks/ColorPickerInput-0lOoTrf0.js +0 -206
- package/dist/_chunks/ColorPickerInput-0lOoTrf0.js.map +0 -1
- package/dist/_chunks/ColorPickerInput-fKB6YXW8.mjs +0 -185
- package/dist/_chunks/ColorPickerInput-fKB6YXW8.mjs.map +0 -1
- package/dist/_chunks/cs-4GdZY0p6.js.map +0 -1
- package/dist/_chunks/cs-A2xRj-2-.mjs.map +0 -1
- package/dist/_chunks/en-L6ZZWDJv.mjs.map +0 -1
- package/dist/_chunks/en-WeRHjVEB.js.map +0 -1
- package/dist/_chunks/index-OJYEuoCq.js.map +0 -1
- package/dist/_chunks/index-uOrtnJpz.mjs.map +0 -1
- package/dist/_chunks/ru-LLXYEOwl.mjs.map +0 -1
- package/dist/_chunks/ru-UXN_ByI9.js.map +0 -1
- package/dist/_chunks/sv-3-Yk9bKb.js.map +0 -1
- package/dist/_chunks/sv-QqRPNQLw.mjs.map +0 -1
- package/dist/_chunks/tr-AbD-f8F0.js.map +0 -1
- package/dist/_chunks/tr-qYGSw8gH.mjs.map +0 -1
- package/dist/_chunks/zh-c23gv_oM.js.map +0 -1
- package/dist/_chunks/zh-fPTOIT6s.mjs.map +0 -1
- package/dist/admin/src/hooks/useComposeRefs.d.ts +0 -29
- package/strapi-server.js +0 -3
package/LICENSE
CHANGED
|
@@ -1,15 +1,37 @@
|
|
|
1
1
|
Copyright (c) 2015-present Strapi Solutions SAS
|
|
2
|
-
|
|
2
|
+
|
|
3
3
|
Portions of the Strapi software are licensed as follows:
|
|
4
|
-
|
|
5
|
-
*
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
|
|
5
|
+
* All software that resides under an "ee/" directory (the “EE Software”), if that directory exists, is licensed under the license defined below.
|
|
6
|
+
|
|
7
|
+
Enterprise License
|
|
8
|
+
|
|
9
|
+
If you or the company you represent has entered into a written agreement referencing the Enterprise Edition of the Strapi source code available at
|
|
10
|
+
https://github.com/strapi/strapi, then such agreement applies to your use of the Enterprise Edition of the Strapi Software. If you or the company you
|
|
11
|
+
represent is using the Enterprise Edition of the Strapi Software in connection with a subscription to our cloud offering, then the agreement you have
|
|
12
|
+
agreed to with respect to our cloud offering and the licenses included in such agreement apply to your use of the Enterprise Edition of the Strapi Software.
|
|
13
|
+
Otherwise, the Strapi Enterprise Software License Agreement (found here https://strapi.io/enterprise-terms) applies to your use of the Enterprise Edition of the Strapi Software.
|
|
14
|
+
|
|
15
|
+
BY ACCESSING OR USING THE ENTERPRISE EDITION OF THE STRAPI SOFTWARE, YOU ARE AGREEING TO BE BOUND BY THE RELEVANT REFERENCED AGREEMENT.
|
|
16
|
+
IF YOU ARE NOT AUTHORIZED TO ACCEPT THESE TERMS ON BEHALF OF THE COMPANY YOU REPRESENT OR IF YOU DO NOT AGREE TO ALL OF THE RELEVANT TERMS AND CONDITIONS REFERENCED AND YOU
|
|
17
|
+
HAVE NOT OTHERWISE EXECUTED A WRITTEN AGREEMENT WITH STRAPI, YOU ARE NOT AUTHORIZED TO ACCESS OR USE OR ALLOW ANY USER TO ACCESS OR USE ANY PART OF
|
|
18
|
+
THE ENTERPRISE EDITION OF THE STRAPI SOFTWARE. YOUR ACCESS RIGHTS ARE CONDITIONAL ON YOUR CONSENT TO THE RELEVANT REFERENCED TERMS TO THE EXCLUSION OF ALL OTHER TERMS;
|
|
19
|
+
IF THE RELEVANT REFERENCED TERMS ARE CONSIDERED AN OFFER BY YOU, ACCEPTANCE IS EXPRESSLY LIMITED TO THE RELEVANT REFERENCED TERMS.
|
|
20
|
+
|
|
21
|
+
* All software outside of the above-mentioned directories or restrictions above is available under the "MIT Expat" license as set forth below.
|
|
22
|
+
|
|
9
23
|
MIT Expat License
|
|
10
|
-
|
|
11
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
24
|
+
|
|
25
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
26
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
27
|
+
in the Software without restriction, including without limitation the rights
|
|
28
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
29
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
30
|
+
furnished to do so, subject to the following conditions:
|
|
31
|
+
|
|
32
|
+
The above copyright notice and this permission notice shall be included in all
|
|
33
|
+
copies or substantial portions of the Software.
|
|
34
|
+
|
|
35
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
36
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
37
|
+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const React = require("react");
|
|
5
|
+
const designSystem = require("@strapi/design-system");
|
|
6
|
+
const icons = require("@strapi/icons");
|
|
7
|
+
const reactColorful = require("react-colorful");
|
|
8
|
+
const reactIntl = require("react-intl");
|
|
9
|
+
const styledComponents = require("styled-components");
|
|
10
|
+
const index = require("./index-BeQLcDEb.js");
|
|
11
|
+
function _interopNamespace(e) {
|
|
12
|
+
if (e && e.__esModule)
|
|
13
|
+
return e;
|
|
14
|
+
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
15
|
+
if (e) {
|
|
16
|
+
for (const k in e) {
|
|
17
|
+
if (k !== "default") {
|
|
18
|
+
const d = Object.getOwnPropertyDescriptor(e, k);
|
|
19
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
20
|
+
enumerable: true,
|
|
21
|
+
get: () => e[k]
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
n.default = e;
|
|
27
|
+
return Object.freeze(n);
|
|
28
|
+
}
|
|
29
|
+
const React__namespace = /* @__PURE__ */ _interopNamespace(React);
|
|
30
|
+
const ColorPreview = styledComponents.styled.div`
|
|
31
|
+
border-radius: 50%;
|
|
32
|
+
width: 20px;
|
|
33
|
+
height: 20px;
|
|
34
|
+
margin-right: 10px;
|
|
35
|
+
background-color: ${(props) => props.color};
|
|
36
|
+
border: 1px solid rgba(0, 0, 0, 0.1);
|
|
37
|
+
`;
|
|
38
|
+
const ColorPicker = styledComponents.styled(reactColorful.HexColorPicker)`
|
|
39
|
+
&& {
|
|
40
|
+
width: 100%;
|
|
41
|
+
aspect-ratio: 1.5;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.react-colorful__pointer {
|
|
45
|
+
width: ${({ theme }) => theme.spaces[3]};
|
|
46
|
+
height: ${({ theme }) => theme.spaces[3]};
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.react-colorful__saturation {
|
|
50
|
+
border-radius: ${({ theme }) => theme.spaces[1]};
|
|
51
|
+
border-bottom: none;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.react-colorful__hue {
|
|
55
|
+
border-radius: 10px;
|
|
56
|
+
height: ${({ theme }) => theme.spaces[3]};
|
|
57
|
+
margin-top: ${({ theme }) => theme.spaces[2]};
|
|
58
|
+
}
|
|
59
|
+
`;
|
|
60
|
+
const ColorPickerToggle = styledComponents.styled(designSystem.Button)`
|
|
61
|
+
& > span {
|
|
62
|
+
display: flex;
|
|
63
|
+
justify-content: space-between;
|
|
64
|
+
align-items: center;
|
|
65
|
+
width: 100%;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
svg {
|
|
69
|
+
width: ${({ theme }) => theme.spaces[2]};
|
|
70
|
+
height: ${({ theme }) => theme.spaces[2]};
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
svg > path {
|
|
74
|
+
fill: ${({ theme }) => theme.colors.neutral500};
|
|
75
|
+
justify-self: flex-end;
|
|
76
|
+
}
|
|
77
|
+
`;
|
|
78
|
+
const ColorPickerPopover = styledComponents.styled(designSystem.Popover.Content)`
|
|
79
|
+
padding: ${({ theme }) => theme.spaces[2]};
|
|
80
|
+
min-height: 270px;
|
|
81
|
+
`;
|
|
82
|
+
const ColorPickerInput = React__namespace.forwardRef(
|
|
83
|
+
({ hint, disabled = false, labelAction, label, name, required = false, onChange, value, error }, forwardedRef) => {
|
|
84
|
+
const [showColorPicker, setShowColorPicker] = React__namespace.useState(false);
|
|
85
|
+
const colorPickerButtonRef = React__namespace.useRef(null);
|
|
86
|
+
const { formatMessage } = reactIntl.useIntl();
|
|
87
|
+
const color = value || "#000000";
|
|
88
|
+
const composedRefs = designSystem.useComposedRefs(forwardedRef, colorPickerButtonRef);
|
|
89
|
+
return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Root, { name, id: name, error, hint, required, children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", alignItems: "stretch", gap: 1, children: [
|
|
90
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Label, { action: labelAction, children: label }),
|
|
91
|
+
/* @__PURE__ */ jsxRuntime.jsxs(designSystem.Popover.Root, { onOpenChange: setShowColorPicker, children: [
|
|
92
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Popover.Trigger, { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
93
|
+
ColorPickerToggle,
|
|
94
|
+
{
|
|
95
|
+
ref: composedRefs,
|
|
96
|
+
"aria-label": formatMessage({
|
|
97
|
+
id: index.getTrad("color-picker.toggle.aria-label"),
|
|
98
|
+
defaultMessage: "Color picker toggle"
|
|
99
|
+
}),
|
|
100
|
+
"aria-controls": "color-picker-value",
|
|
101
|
+
"aria-haspopup": "dialog",
|
|
102
|
+
"aria-expanded": showColorPicker,
|
|
103
|
+
"aria-disabled": disabled,
|
|
104
|
+
disabled,
|
|
105
|
+
variant: "tertiary",
|
|
106
|
+
size: "L",
|
|
107
|
+
children: [
|
|
108
|
+
/* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { children: [
|
|
109
|
+
/* @__PURE__ */ jsxRuntime.jsx(ColorPreview, { color }),
|
|
110
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
111
|
+
designSystem.Typography,
|
|
112
|
+
{
|
|
113
|
+
style: { textTransform: "uppercase" },
|
|
114
|
+
textColor: value ? void 0 : "neutral600",
|
|
115
|
+
variant: "omega",
|
|
116
|
+
children: color
|
|
117
|
+
}
|
|
118
|
+
)
|
|
119
|
+
] }),
|
|
120
|
+
/* @__PURE__ */ jsxRuntime.jsx(icons.CaretDown, { "aria-hidden": true })
|
|
121
|
+
]
|
|
122
|
+
}
|
|
123
|
+
) }),
|
|
124
|
+
/* @__PURE__ */ jsxRuntime.jsxs(ColorPickerPopover, { sideOffset: 4, children: [
|
|
125
|
+
/* @__PURE__ */ jsxRuntime.jsx(ColorPicker, { color, onChange: (hexValue) => onChange(name, hexValue) }),
|
|
126
|
+
/* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { paddingTop: 3, paddingLeft: 4, justifyContent: "flex-end", children: [
|
|
127
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { paddingRight: 2, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "omega", tag: "label", textColor: "neutral600", children: formatMessage({
|
|
128
|
+
id: index.getTrad("color-picker.input.format"),
|
|
129
|
+
defaultMessage: "HEX"
|
|
130
|
+
}) }) }),
|
|
131
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Root, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
132
|
+
designSystem.Field.Input,
|
|
133
|
+
{
|
|
134
|
+
"aria-label": formatMessage({
|
|
135
|
+
id: index.getTrad("color-picker.input.aria-label"),
|
|
136
|
+
defaultMessage: "Color picker input"
|
|
137
|
+
}),
|
|
138
|
+
style: { textTransform: "uppercase" },
|
|
139
|
+
value,
|
|
140
|
+
placeholder: "#000000",
|
|
141
|
+
onChange
|
|
142
|
+
}
|
|
143
|
+
) })
|
|
144
|
+
] })
|
|
145
|
+
] })
|
|
146
|
+
] }),
|
|
147
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Hint, {}),
|
|
148
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Error, {})
|
|
149
|
+
] }) });
|
|
150
|
+
}
|
|
151
|
+
);
|
|
152
|
+
exports.ColorPickerInput = ColorPickerInput;
|
|
153
|
+
//# sourceMappingURL=ColorPickerInput-B07RliGP.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ColorPickerInput-B07RliGP.js","sources":["../../admin/src/components/ColorPickerInput.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport {\n Button,\n Box,\n Field,\n Flex,\n Popover,\n Typography,\n useComposedRefs,\n} from '@strapi/design-system';\nimport { CaretDown } from '@strapi/icons';\nimport { useField, type InputProps, type FieldValue } from '@strapi/strapi/admin';\nimport { HexColorPicker } from 'react-colorful';\nimport { useIntl } from 'react-intl';\nimport { styled } from 'styled-components';\n\nimport { getTrad } from '../utils/getTrad';\n\nconst ColorPreview = styled.div`\n border-radius: 50%;\n width: 20px;\n height: 20px;\n margin-right: 10px;\n background-color: ${(props) => props.color};\n border: 1px solid rgba(0, 0, 0, 0.1);\n`;\n\nconst ColorPicker = styled(HexColorPicker)`\n && {\n width: 100%;\n aspect-ratio: 1.5;\n }\n\n .react-colorful__pointer {\n width: ${({ theme }) => theme.spaces[3]};\n height: ${({ theme }) => theme.spaces[3]};\n }\n\n .react-colorful__saturation {\n border-radius: ${({ theme }) => theme.spaces[1]};\n border-bottom: none;\n }\n\n .react-colorful__hue {\n border-radius: 10px;\n height: ${({ theme }) => theme.spaces[3]};\n margin-top: ${({ theme }) => theme.spaces[2]};\n }\n`;\n\nconst ColorPickerToggle = styled(Button)`\n & > span {\n display: flex;\n justify-content: space-between;\n align-items: center;\n width: 100%;\n }\n\n svg {\n width: ${({ theme }) => theme.spaces[2]};\n height: ${({ theme }) => theme.spaces[2]};\n }\n\n svg > path {\n fill: ${({ theme }) => theme.colors.neutral500};\n justify-self: flex-end;\n }\n`;\n\nconst ColorPickerPopover = styled(Popover.Content)`\n padding: ${({ theme }) => theme.spaces[2]};\n min-height: 270px;\n`;\n\ntype ColorPickerInputProps = InputProps &\n FieldValue & {\n labelAction?: React.ReactNode;\n };\n\nexport const ColorPickerInput = React.forwardRef<HTMLButtonElement, ColorPickerInputProps>(\n (\n { hint, disabled = false, labelAction, label, name, required = false, onChange, value, error },\n forwardedRef\n ) => {\n const [showColorPicker, setShowColorPicker] = React.useState(false);\n const colorPickerButtonRef = React.useRef<HTMLButtonElement>(null!);\n const { formatMessage } = useIntl();\n const color = value || '#000000';\n\n const composedRefs = useComposedRefs(forwardedRef, colorPickerButtonRef);\n\n return (\n <Field.Root name={name} id={name} error={error} hint={hint} required={required}>\n <Flex direction=\"column\" alignItems=\"stretch\" gap={1}>\n <Field.Label action={labelAction}>{label}</Field.Label>\n <Popover.Root onOpenChange={setShowColorPicker}>\n <Popover.Trigger>\n <ColorPickerToggle\n ref={composedRefs}\n aria-label={formatMessage({\n id: getTrad('color-picker.toggle.aria-label'),\n defaultMessage: 'Color picker toggle',\n })}\n aria-controls=\"color-picker-value\"\n aria-haspopup=\"dialog\"\n aria-expanded={showColorPicker}\n aria-disabled={disabled}\n disabled={disabled}\n variant=\"tertiary\"\n size=\"L\"\n >\n <Flex>\n <ColorPreview color={color} />\n <Typography\n style={{ textTransform: 'uppercase' }}\n textColor={value ? undefined : 'neutral600'}\n variant=\"omega\"\n >\n {color}\n </Typography>\n </Flex>\n <CaretDown aria-hidden />\n </ColorPickerToggle>\n </Popover.Trigger>\n <ColorPickerPopover sideOffset={4}>\n <ColorPicker color={color} onChange={(hexValue) => onChange(name, hexValue)} />\n <Flex paddingTop={3} paddingLeft={4} justifyContent=\"flex-end\">\n <Box paddingRight={2}>\n <Typography variant=\"omega\" tag=\"label\" textColor=\"neutral600\">\n {formatMessage({\n id: getTrad('color-picker.input.format'),\n defaultMessage: 'HEX',\n })}\n </Typography>\n </Box>\n <Field.Root>\n <Field.Input\n aria-label={formatMessage({\n id: getTrad('color-picker.input.aria-label'),\n defaultMessage: 'Color picker input',\n })}\n style={{ textTransform: 'uppercase' }}\n value={value}\n placeholder=\"#000000\"\n onChange={onChange}\n />\n </Field.Root>\n </Flex>\n </ColorPickerPopover>\n </Popover.Root>\n <Field.Hint />\n <Field.Error />\n </Flex>\n </Field.Root>\n );\n }\n);\n"],"names":["styled","HexColorPicker","Button","Popover","React","useInt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C9B,UAAA;AAAA,UAACD,+BAAA,aAAA,EAAY,OAAc,UAAU,CAAC,aAAa,SAAS,MAAM,QAAQ,GAAG;AAAA,0CAC5ED,aAAAA,MAAK,EAAA,YAAY,GAAG,aAAa,GAAG,gBAAe,YAClD,UAAA;AAAA,YAACC,2BAAA,IAAAK,aAAA,KAAA,EAAI,cAAc,GACjB,UAACL,2BAAAA,IAAAG,aAAA,YAAA,EAAW,SAAQ,SAAQ,KAAI,SAAQ,WAAU,cAC/C,UAAc,cAAA;AAAA,cACb,IAAID,cAAQ,2BAA2B;AAAA,cACvC,gBAAgB;AAAA,YAAA,CACjB,GACH,EACF,CAAA;AAAA,YACAF,2BAAAA,IAACF,aAAM,MAAA,MAAN,EACC,UAAAE,2BAAA;AAAA,cAACF,aAAAA,MAAM;AAAA,cAAN;AAAA,gBACC,cAAY,cAAc;AAAA,kBACxB,IAAII,cAAQ,+BAA+B;AAAA,kBAC3C,gBAAgB;AAAA,gBAAA,CACjB;AAAA,gBACD,OAAO,EAAE,eAAe,YAAY;AAAA,gBACpC;AAAA,gBACA,aAAY;AAAA,gBACZ;AAAA,cAAA;AAAA,YAAA,GAEJ;AAAA,UAAA,GACF;AAAA,QAAA,GACF;AAAA,MAAA,GACF;AAAA,MACAF,+BAACF,aAAAA,MAAM,MAAN,EAAW;AAAA,MACZE,+BAACF,aAAAA,MAAM,OAAN,EAAY;AAAA,IAAA,EACf,CAAA,EACF,CAAA;AAAA,EAEJ;AACF;;"}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { Button, Popover, useComposedRefs, Field, Flex, Typography, Box } from "@strapi/design-system";
|
|
4
|
+
import { CaretDown } from "@strapi/icons";
|
|
5
|
+
import { HexColorPicker } from "react-colorful";
|
|
6
|
+
import { useIntl } from "react-intl";
|
|
7
|
+
import { styled } from "styled-components";
|
|
8
|
+
import { g as getTrad } from "./index-B9LkgZbo.mjs";
|
|
9
|
+
const ColorPreview = styled.div`
|
|
10
|
+
border-radius: 50%;
|
|
11
|
+
width: 20px;
|
|
12
|
+
height: 20px;
|
|
13
|
+
margin-right: 10px;
|
|
14
|
+
background-color: ${(props) => props.color};
|
|
15
|
+
border: 1px solid rgba(0, 0, 0, 0.1);
|
|
16
|
+
`;
|
|
17
|
+
const ColorPicker = styled(HexColorPicker)`
|
|
18
|
+
&& {
|
|
19
|
+
width: 100%;
|
|
20
|
+
aspect-ratio: 1.5;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.react-colorful__pointer {
|
|
24
|
+
width: ${({ theme }) => theme.spaces[3]};
|
|
25
|
+
height: ${({ theme }) => theme.spaces[3]};
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.react-colorful__saturation {
|
|
29
|
+
border-radius: ${({ theme }) => theme.spaces[1]};
|
|
30
|
+
border-bottom: none;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.react-colorful__hue {
|
|
34
|
+
border-radius: 10px;
|
|
35
|
+
height: ${({ theme }) => theme.spaces[3]};
|
|
36
|
+
margin-top: ${({ theme }) => theme.spaces[2]};
|
|
37
|
+
}
|
|
38
|
+
`;
|
|
39
|
+
const ColorPickerToggle = styled(Button)`
|
|
40
|
+
& > span {
|
|
41
|
+
display: flex;
|
|
42
|
+
justify-content: space-between;
|
|
43
|
+
align-items: center;
|
|
44
|
+
width: 100%;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
svg {
|
|
48
|
+
width: ${({ theme }) => theme.spaces[2]};
|
|
49
|
+
height: ${({ theme }) => theme.spaces[2]};
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
svg > path {
|
|
53
|
+
fill: ${({ theme }) => theme.colors.neutral500};
|
|
54
|
+
justify-self: flex-end;
|
|
55
|
+
}
|
|
56
|
+
`;
|
|
57
|
+
const ColorPickerPopover = styled(Popover.Content)`
|
|
58
|
+
padding: ${({ theme }) => theme.spaces[2]};
|
|
59
|
+
min-height: 270px;
|
|
60
|
+
`;
|
|
61
|
+
const ColorPickerInput = React.forwardRef(
|
|
62
|
+
({ hint, disabled = false, labelAction, label, name, required = false, onChange, value, error }, forwardedRef) => {
|
|
63
|
+
const [showColorPicker, setShowColorPicker] = React.useState(false);
|
|
64
|
+
const colorPickerButtonRef = React.useRef(null);
|
|
65
|
+
const { formatMessage } = useIntl();
|
|
66
|
+
const color = value || "#000000";
|
|
67
|
+
const composedRefs = useComposedRefs(forwardedRef, colorPickerButtonRef);
|
|
68
|
+
return /* @__PURE__ */ jsx(Field.Root, { name, id: name, error, hint, required, children: /* @__PURE__ */ jsxs(Flex, { direction: "column", alignItems: "stretch", gap: 1, children: [
|
|
69
|
+
/* @__PURE__ */ jsx(Field.Label, { action: labelAction, children: label }),
|
|
70
|
+
/* @__PURE__ */ jsxs(Popover.Root, { onOpenChange: setShowColorPicker, children: [
|
|
71
|
+
/* @__PURE__ */ jsx(Popover.Trigger, { children: /* @__PURE__ */ jsxs(
|
|
72
|
+
ColorPickerToggle,
|
|
73
|
+
{
|
|
74
|
+
ref: composedRefs,
|
|
75
|
+
"aria-label": formatMessage({
|
|
76
|
+
id: getTrad("color-picker.toggle.aria-label"),
|
|
77
|
+
defaultMessage: "Color picker toggle"
|
|
78
|
+
}),
|
|
79
|
+
"aria-controls": "color-picker-value",
|
|
80
|
+
"aria-haspopup": "dialog",
|
|
81
|
+
"aria-expanded": showColorPicker,
|
|
82
|
+
"aria-disabled": disabled,
|
|
83
|
+
disabled,
|
|
84
|
+
variant: "tertiary",
|
|
85
|
+
size: "L",
|
|
86
|
+
children: [
|
|
87
|
+
/* @__PURE__ */ jsxs(Flex, { children: [
|
|
88
|
+
/* @__PURE__ */ jsx(ColorPreview, { color }),
|
|
89
|
+
/* @__PURE__ */ jsx(
|
|
90
|
+
Typography,
|
|
91
|
+
{
|
|
92
|
+
style: { textTransform: "uppercase" },
|
|
93
|
+
textColor: value ? void 0 : "neutral600",
|
|
94
|
+
variant: "omega",
|
|
95
|
+
children: color
|
|
96
|
+
}
|
|
97
|
+
)
|
|
98
|
+
] }),
|
|
99
|
+
/* @__PURE__ */ jsx(CaretDown, { "aria-hidden": true })
|
|
100
|
+
]
|
|
101
|
+
}
|
|
102
|
+
) }),
|
|
103
|
+
/* @__PURE__ */ jsxs(ColorPickerPopover, { sideOffset: 4, children: [
|
|
104
|
+
/* @__PURE__ */ jsx(ColorPicker, { color, onChange: (hexValue) => onChange(name, hexValue) }),
|
|
105
|
+
/* @__PURE__ */ jsxs(Flex, { paddingTop: 3, paddingLeft: 4, justifyContent: "flex-end", children: [
|
|
106
|
+
/* @__PURE__ */ jsx(Box, { paddingRight: 2, children: /* @__PURE__ */ jsx(Typography, { variant: "omega", tag: "label", textColor: "neutral600", children: formatMessage({
|
|
107
|
+
id: getTrad("color-picker.input.format"),
|
|
108
|
+
defaultMessage: "HEX"
|
|
109
|
+
}) }) }),
|
|
110
|
+
/* @__PURE__ */ jsx(Field.Root, { children: /* @__PURE__ */ jsx(
|
|
111
|
+
Field.Input,
|
|
112
|
+
{
|
|
113
|
+
"aria-label": formatMessage({
|
|
114
|
+
id: getTrad("color-picker.input.aria-label"),
|
|
115
|
+
defaultMessage: "Color picker input"
|
|
116
|
+
}),
|
|
117
|
+
style: { textTransform: "uppercase" },
|
|
118
|
+
value,
|
|
119
|
+
placeholder: "#000000",
|
|
120
|
+
onChange
|
|
121
|
+
}
|
|
122
|
+
) })
|
|
123
|
+
] })
|
|
124
|
+
] })
|
|
125
|
+
] }),
|
|
126
|
+
/* @__PURE__ */ jsx(Field.Hint, {}),
|
|
127
|
+
/* @__PURE__ */ jsx(Field.Error, {})
|
|
128
|
+
] }) });
|
|
129
|
+
}
|
|
130
|
+
);
|
|
131
|
+
export {
|
|
132
|
+
ColorPickerInput
|
|
133
|
+
};
|
|
134
|
+
//# sourceMappingURL=ColorPickerInput-CMg-0_-G.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ColorPickerInput-CMg-0_-G.mjs","sources":["../../admin/src/components/ColorPickerInput.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport {\n Button,\n Box,\n Field,\n Flex,\n Popover,\n Typography,\n useComposedRefs,\n} from '@strapi/design-system';\nimport { CaretDown } from '@strapi/icons';\nimport { useField, type InputProps, type FieldValue } from '@strapi/strapi/admin';\nimport { HexColorPicker } from 'react-colorful';\nimport { useIntl } from 'react-intl';\nimport { styled } from 'styled-components';\n\nimport { getTrad } from '../utils/getTrad';\n\nconst ColorPreview = styled.div`\n border-radius: 50%;\n width: 20px;\n height: 20px;\n margin-right: 10px;\n background-color: ${(props) => props.color};\n border: 1px solid rgba(0, 0, 0, 0.1);\n`;\n\nconst ColorPicker = styled(HexColorPicker)`\n && {\n width: 100%;\n aspect-ratio: 1.5;\n }\n\n .react-colorful__pointer {\n width: ${({ theme }) => theme.spaces[3]};\n height: ${({ theme }) => theme.spaces[3]};\n }\n\n .react-colorful__saturation {\n border-radius: ${({ theme }) => theme.spaces[1]};\n border-bottom: none;\n }\n\n .react-colorful__hue {\n border-radius: 10px;\n height: ${({ theme }) => theme.spaces[3]};\n margin-top: ${({ theme }) => theme.spaces[2]};\n }\n`;\n\nconst ColorPickerToggle = styled(Button)`\n & > span {\n display: flex;\n justify-content: space-between;\n align-items: center;\n width: 100%;\n }\n\n svg {\n width: ${({ theme }) => theme.spaces[2]};\n height: ${({ theme }) => theme.spaces[2]};\n }\n\n svg > path {\n fill: ${({ theme }) => theme.colors.neutral500};\n justify-self: flex-end;\n }\n`;\n\nconst ColorPickerPopover = styled(Popover.Content)`\n padding: ${({ theme }) => theme.spaces[2]};\n min-height: 270px;\n`;\n\ntype ColorPickerInputProps = InputProps &\n FieldValue & {\n labelAction?: React.ReactNode;\n };\n\nexport const ColorPickerInput = React.forwardRef<HTMLButtonElement, ColorPickerInputProps>(\n (\n { hint, disabled = false, labelAction, label, name, required = false, onChange, value, error },\n forwardedRef\n ) => {\n const [showColorPicker, setShowColorPicker] = React.useState(false);\n const colorPickerButtonRef = React.useRef<HTMLButtonElement>(null!);\n const { formatMessage } = useIntl();\n const color = value || '#000000';\n\n const composedRefs = useComposedRefs(forwardedRef, colorPickerButtonRef);\n\n return (\n <Field.Root name={name} id={name} error={error} hint={hint} required={required}>\n <Flex direction=\"column\" alignItems=\"stretch\" gap={1}>\n <Field.Label action={labelAction}>{label}</Field.Label>\n <Popover.Root onOpenChange={setShowColorPicker}>\n <Popover.Trigger>\n <ColorPickerToggle\n ref={composedRefs}\n aria-label={formatMessage({\n id: getTrad('color-picker.toggle.aria-label'),\n defaultMessage: 'Color picker toggle',\n })}\n aria-controls=\"color-picker-value\"\n aria-haspopup=\"dialog\"\n aria-expanded={showColorPicker}\n aria-disabled={disabled}\n disabled={disabled}\n variant=\"tertiary\"\n size=\"L\"\n >\n <Flex>\n <ColorPreview color={color} />\n <Typography\n style={{ textTransform: 'uppercase' }}\n textColor={value ? undefined : 'neutral600'}\n variant=\"omega\"\n >\n {color}\n </Typography>\n </Flex>\n <CaretDown aria-hidden />\n </ColorPickerToggle>\n </Popover.Trigger>\n <ColorPickerPopover sideOffset={4}>\n <ColorPicker color={color} onChange={(hexValue) => onChange(name, hexValue)} />\n <Flex paddingTop={3} paddingLeft={4} justifyContent=\"flex-end\">\n <Box paddingRight={2}>\n <Typography variant=\"omega\" tag=\"label\" textColor=\"neutral600\">\n {formatMessage({\n id: getTrad('color-picker.input.format'),\n defaultMessage: 'HEX',\n })}\n </Typography>\n </Box>\n <Field.Root>\n <Field.Input\n aria-label={formatMessage({\n id: getTrad('color-picker.input.aria-label'),\n defaultMessage: 'Color picker input',\n })}\n style={{ textTransform: 'uppercase' }}\n value={value}\n placeholder=\"#000000\"\n onChange={onChange}\n />\n </Field.Root>\n </Flex>\n </ColorPickerPopover>\n </Popover.Root>\n <Field.Hint />\n <Field.Error />\n </Flex>\n </Field.Root>\n );\n }\n);\n"],"names":[],"mappings":";;;;;;;;AAmBA,MAAM,eAAe,OAAO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2BAA2B;AAAA,cACvC,gBAAgB;AAAA,YAAA,CACjB,GACH,EACF,CAAA;AAAA,YACA,oBAAC,MAAM,MAAN,EACC,UAAA;AAAA,cAAC,MAAM;AAAA,cAAN;AAAA,gBACC,cAAY,cAAc;AAAA,kBACxB,IAAI,QAAQ,+BAA+B;AAAA,kBAC3C,gBAAgB;AAAA,gBAAA,CACjB;AAAA,gBACD,OAAO,EAAE,eAAe,YAAY;AAAA,gBACpC;AAAA,gBACA,aAAY;AAAA,gBACZ;AAAA,cAAA;AAAA,YAAA,GAEJ;AAAA,UAAA,GACF;AAAA,QAAA,GACF;AAAA,MAAA,GACF;AAAA,MACA,oBAAC,MAAM,MAAN,EAAW;AAAA,MACZ,oBAAC,MAAM,OAAN,EAAY;AAAA,IAAA,EACf,CAAA,EACF,CAAA;AAAA,EAEJ;AACF;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cs-CKl0OyEH.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cs-DMmE6LK7.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"en-BlDau3us.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"en-Ct0C5cA2.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { prefixPluginTranslations } from "@strapi/helper-plugin";
|
|
2
1
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import { Flex
|
|
4
|
-
import {
|
|
5
|
-
import styled from "styled-components";
|
|
2
|
+
import { Flex } from "@strapi/design-system";
|
|
3
|
+
import { PaintBrush } from "@strapi/icons";
|
|
4
|
+
import { styled } from "styled-components";
|
|
6
5
|
const __variableDynamicImportRuntimeHelper = (glob, path) => {
|
|
7
6
|
const v = glob[path];
|
|
8
7
|
if (v) {
|
|
@@ -23,10 +22,16 @@ const IconBox = styled(Flex)`
|
|
|
23
22
|
}
|
|
24
23
|
`;
|
|
25
24
|
const ColorPickerIcon = () => {
|
|
26
|
-
return /* @__PURE__ */ jsx(IconBox, { justifyContent: "center", alignItems: "center", width: 7, height: 6, hasRadius: true, "aria-hidden": true, children: /* @__PURE__ */ jsx(
|
|
25
|
+
return /* @__PURE__ */ jsx(IconBox, { justifyContent: "center", alignItems: "center", width: 7, height: 6, hasRadius: true, "aria-hidden": true, children: /* @__PURE__ */ jsx(PaintBrush, {}) });
|
|
27
26
|
};
|
|
28
27
|
const pluginId = "color-picker";
|
|
29
28
|
const getTrad = (id) => `${pluginId}.${id}`;
|
|
29
|
+
const prefixPluginTranslations = (trad, pluginId2) => {
|
|
30
|
+
return Object.keys(trad).reduce((acc, current) => {
|
|
31
|
+
acc[`${pluginId2}.${current}`] = trad[current];
|
|
32
|
+
return acc;
|
|
33
|
+
}, {});
|
|
34
|
+
};
|
|
30
35
|
const index = {
|
|
31
36
|
/**
|
|
32
37
|
* TODO: we need to have the type for StrapiApp done from `@strapi/admin` package.
|
|
@@ -47,7 +52,7 @@ const index = {
|
|
|
47
52
|
defaultMessage: "Select any color"
|
|
48
53
|
},
|
|
49
54
|
components: {
|
|
50
|
-
Input: async () => import("./ColorPickerInput-
|
|
55
|
+
Input: async () => import("./ColorPickerInput-CMg-0_-G.mjs").then((module) => ({
|
|
51
56
|
default: module.ColorPickerInput
|
|
52
57
|
}))
|
|
53
58
|
},
|
|
@@ -93,7 +98,7 @@ const index = {
|
|
|
93
98
|
async registerTrads({ locales }) {
|
|
94
99
|
const importedTrads = await Promise.all(
|
|
95
100
|
locales.map((locale) => {
|
|
96
|
-
return __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "./translations/cs.json": () => import("./cs-
|
|
101
|
+
return __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "./translations/cs.json": () => import("./cs-DMmE6LK7.mjs"), "./translations/en.json": () => import("./en-BlDau3us.mjs"), "./translations/ru.json": () => import("./ru-aOnA-eym.mjs"), "./translations/sv.json": () => import("./sv-BaFDND79.mjs"), "./translations/tr.json": () => import("./tr-CHHW_hYI.mjs"), "./translations/zh.json": () => import("./zh-DBH6uCXb.mjs") }), `./translations/${locale}.json`).then(({ default: data }) => {
|
|
97
102
|
return {
|
|
98
103
|
data: prefixPluginTranslations(data, pluginId),
|
|
99
104
|
locale
|
|
@@ -113,4 +118,4 @@ export {
|
|
|
113
118
|
getTrad as g,
|
|
114
119
|
index as i
|
|
115
120
|
};
|
|
116
|
-
//# sourceMappingURL=index-
|
|
121
|
+
//# sourceMappingURL=index-B9LkgZbo.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-B9LkgZbo.mjs","sources":["../../admin/src/components/ColorPickerIcon.tsx","../../admin/src/pluginId.ts","../../admin/src/utils/getTrad.ts","../../admin/src/utils/prefixPluginTranslations.ts","../../admin/src/index.ts"],"sourcesContent":["import { Flex } from '@strapi/design-system';\nimport { PaintBrush } from '@strapi/icons';\nimport { styled } from 'styled-components';\n\nconst IconBox = styled(Flex)`\n /* Hard code color values */\n /* to stay consistent between themes */\n background-color: #f0f0ff; /* primary100 */\n border: 1px solid #d9d8ff; /* primary200 */\n\n svg > path {\n fill: #4945ff; /* primary600 */\n }\n`;\n\nexport const ColorPickerIcon = () => {\n return (\n <IconBox justifyContent=\"center\" alignItems=\"center\" width={7} height={6} hasRadius aria-hidden>\n <PaintBrush />\n </IconBox>\n );\n};\n","export const pluginId = 'color-picker';\n","import { pluginId } from '../pluginId';\n\nexport const getTrad = (id: string) => `${pluginId}.${id}`;\n","type TradOptions = Record<string, string>;\n\nconst prefixPluginTranslations = (trad: TradOptions, pluginId: string): TradOptions => {\n if (!pluginId) {\n throw new TypeError(\"pluginId can't be empty\");\n }\n return Object.keys(trad).reduce((acc, current) => {\n acc[`${pluginId}.${current}`] = trad[current];\n return acc;\n }, {} as TradOptions);\n};\n\nexport { prefixPluginTranslations };\n","import { ColorPickerIcon } from './components/ColorPickerIcon';\nimport { pluginId } from './pluginId';\nimport { getTrad } from './utils/getTrad';\nimport { prefixPluginTranslations } from './utils/prefixPluginTranslations';\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n /**\n * TODO: we need to have the type for StrapiApp done from `@strapi/admin` package.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n register(app: any) {\n app.customFields.register({\n name: 'color',\n pluginId: 'color-picker',\n type: 'string',\n icon: ColorPickerIcon,\n intlLabel: {\n id: getTrad('color-picker.label'),\n defaultMessage: 'Color',\n },\n intlDescription: {\n id: getTrad('color-picker.description'),\n defaultMessage: 'Select any color',\n },\n components: {\n Input: async () =>\n import('./components/ColorPickerInput').then((module) => ({\n default: module.ColorPickerInput,\n })),\n },\n options: {\n advanced: [\n {\n intlLabel: {\n id: getTrad('color-picker.options.advanced.regex'),\n defaultMessage: 'RegExp pattern',\n },\n name: 'regex',\n type: 'text',\n defaultValue: '^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$',\n description: {\n id: getTrad('color-picker.options.advanced.regex.description'),\n defaultMessage: 'The text of the regular expression',\n },\n },\n {\n sectionTitle: {\n id: 'global.settings',\n defaultMessage: 'Settings',\n },\n items: [\n {\n name: 'required',\n type: 'checkbox',\n intlLabel: {\n id: getTrad('color-picker.options.advanced.requiredField'),\n defaultMessage: 'Required field',\n },\n description: {\n id: getTrad('color-picker.options.advanced.requiredField.description'),\n defaultMessage: \"You won't be able to create an entry if this field is empty\",\n },\n },\n ],\n },\n ],\n },\n });\n },\n async registerTrads({ locales }: { locales: string[] }) {\n const importedTrads = await Promise.all(\n locales.map((locale) => {\n return import(`./translations/${locale}.json`)\n .then(({ default: data }) => {\n return {\n data: prefixPluginTranslations(data, pluginId),\n locale,\n };\n })\n .catch(() => {\n return {\n data: {},\n locale,\n };\n });\n })\n );\n\n return Promise.resolve(importedTrads);\n },\n};\n"],"names":["pluginId"],"mappings":";;;;;;;;;;;;;AAIA,MAAM,UAAU,OAAO,IAAI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAWpB,MAAM,kBAAkB,MAAM;AACnC,6BACG,SAAQ,EAAA,gBAAe,UAAS,YAAW,UAAS,OAAO,GAAG,QAAQ,GAAG,WAAS,MAAC,eAAW,MAC7F,UAAA,oBAAC,cAAW,EACd,CAAA;AAEJ;ACrBO,MAAM,WAAW;ACEjB,MAAM,UAAU,CAAC,OAAe,GAAG,QAAQ,IAAI,EAAE;ACAxD,MAAM,2BAA2B,CAAC,MAAmBA,cAAkC;AAIrF,SAAO,OAAO,KAAK,IAAI,EAAE,OAAO,CAAC,KAAK,YAAY;AAChD,QAAI,GAAGA,SAAQ,IAAI,OAAO,EAAE,IAAI,KAAK,OAAO;AACrC,WAAA;AAAA,EACT,GAAG,CAAiB,CAAA;AACtB;ACJA,MAAe,QAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAKb,SAAS,KAAU;AACjB,QAAI,aAAa,SAAS;AAAA,MACxB,MAAM;AAAA,MACN,UAAU;AAAA,MACV,MAAM;AAAA,MACN,MAAM;AAAA,MACN,WAAW;AAAA,QACT,IAAI,QAAQ,oBAAoB;AAAA,QAChC,gBAAgB;AAAA,MAClB;AAAA,MACA,iBAAiB;AAAA,QACf,IAAI,QAAQ,0BAA0B;AAAA,QACtC,gBAAgB;AAAA,MAClB;AAAA,MACA,YAAY;AAAA,QACV,OAAO,YACL,OAAO,iCAA+B,EAAE,KAAK,CAAC,YAAY;AAAA,UACxD,SAAS,OAAO;AAAA,QAAA,EAChB;AAAA,MACN;AAAA,MACA,SAAS;AAAA,QACP,UAAU;AAAA,UACR;AAAA,YACE,WAAW;AAAA,cACT,IAAI,QAAQ,qCAAqC;AAAA,cACjD,g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"}
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const helperPlugin = require("@strapi/helper-plugin");
|
|
3
2
|
const jsxRuntime = require("react/jsx-runtime");
|
|
4
3
|
const designSystem = require("@strapi/design-system");
|
|
5
4
|
const icons = require("@strapi/icons");
|
|
6
|
-
const
|
|
7
|
-
const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
|
|
8
|
-
const styled__default = /* @__PURE__ */ _interopDefault(styled);
|
|
5
|
+
const styledComponents = require("styled-components");
|
|
9
6
|
const __variableDynamicImportRuntimeHelper = (glob, path) => {
|
|
10
7
|
const v = glob[path];
|
|
11
8
|
if (v) {
|
|
@@ -15,7 +12,7 @@ const __variableDynamicImportRuntimeHelper = (glob, path) => {
|
|
|
15
12
|
(typeof queueMicrotask === "function" ? queueMicrotask : setTimeout)(reject.bind(null, new Error("Unknown variable dynamic import: " + path)));
|
|
16
13
|
});
|
|
17
14
|
};
|
|
18
|
-
const IconBox =
|
|
15
|
+
const IconBox = styledComponents.styled(designSystem.Flex)`
|
|
19
16
|
/* Hard code color values */
|
|
20
17
|
/* to stay consistent between themes */
|
|
21
18
|
background-color: #f0f0ff; /* primary100 */
|
|
@@ -26,10 +23,16 @@ const IconBox = styled__default.default(designSystem.Flex)`
|
|
|
26
23
|
}
|
|
27
24
|
`;
|
|
28
25
|
const ColorPickerIcon = () => {
|
|
29
|
-
return /* @__PURE__ */ jsxRuntime.jsx(IconBox, { justifyContent: "center", alignItems: "center", width: 7, height: 6, hasRadius: true, "aria-hidden": true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
26
|
+
return /* @__PURE__ */ jsxRuntime.jsx(IconBox, { justifyContent: "center", alignItems: "center", width: 7, height: 6, hasRadius: true, "aria-hidden": true, children: /* @__PURE__ */ jsxRuntime.jsx(icons.PaintBrush, {}) });
|
|
30
27
|
};
|
|
31
28
|
const pluginId = "color-picker";
|
|
32
29
|
const getTrad = (id) => `${pluginId}.${id}`;
|
|
30
|
+
const prefixPluginTranslations = (trad, pluginId2) => {
|
|
31
|
+
return Object.keys(trad).reduce((acc, current) => {
|
|
32
|
+
acc[`${pluginId2}.${current}`] = trad[current];
|
|
33
|
+
return acc;
|
|
34
|
+
}, {});
|
|
35
|
+
};
|
|
33
36
|
const index = {
|
|
34
37
|
/**
|
|
35
38
|
* TODO: we need to have the type for StrapiApp done from `@strapi/admin` package.
|
|
@@ -50,7 +53,7 @@ const index = {
|
|
|
50
53
|
defaultMessage: "Select any color"
|
|
51
54
|
},
|
|
52
55
|
components: {
|
|
53
|
-
Input: async () => Promise.resolve().then(() => require("./ColorPickerInput-
|
|
56
|
+
Input: async () => Promise.resolve().then(() => require("./ColorPickerInput-B07RliGP.js")).then((module2) => ({
|
|
54
57
|
default: module2.ColorPickerInput
|
|
55
58
|
}))
|
|
56
59
|
},
|
|
@@ -96,9 +99,9 @@ const index = {
|
|
|
96
99
|
async registerTrads({ locales }) {
|
|
97
100
|
const importedTrads = await Promise.all(
|
|
98
101
|
locales.map((locale) => {
|
|
99
|
-
return __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "./translations/cs.json": () => Promise.resolve().then(() => require("./cs-
|
|
102
|
+
return __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "./translations/cs.json": () => Promise.resolve().then(() => require("./cs-CKl0OyEH.js")), "./translations/en.json": () => Promise.resolve().then(() => require("./en-Ct0C5cA2.js")), "./translations/ru.json": () => Promise.resolve().then(() => require("./ru-Wrg-npZz.js")), "./translations/sv.json": () => Promise.resolve().then(() => require("./sv-CKY6es_6.js")), "./translations/tr.json": () => Promise.resolve().then(() => require("./tr-DcLzQS-J.js")), "./translations/zh.json": () => Promise.resolve().then(() => require("./zh-T5cJzhPD.js")) }), `./translations/${locale}.json`).then(({ default: data }) => {
|
|
100
103
|
return {
|
|
101
|
-
data:
|
|
104
|
+
data: prefixPluginTranslations(data, pluginId),
|
|
102
105
|
locale
|
|
103
106
|
};
|
|
104
107
|
}).catch(() => {
|
|
@@ -114,4 +117,4 @@ const index = {
|
|
|
114
117
|
};
|
|
115
118
|
exports.getTrad = getTrad;
|
|
116
119
|
exports.index = index;
|
|
117
|
-
//# sourceMappingURL=index-
|
|
120
|
+
//# sourceMappingURL=index-BeQLcDEb.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-BeQLcDEb.js","sources":["../../admin/src/components/ColorPickerIcon.tsx","../../admin/src/pluginId.ts","../../admin/src/utils/getTrad.ts","../../admin/src/utils/prefixPluginTranslations.ts","../../admin/src/index.ts"],"sourcesContent":["import { Flex } from '@strapi/design-system';\nimport { PaintBrush } from '@strapi/icons';\nimport { styled } from 'styled-components';\n\nconst IconBox = styled(Flex)`\n /* Hard code color values */\n /* to stay consistent between themes */\n background-color: #f0f0ff; /* primary100 */\n border: 1px solid #d9d8ff; /* primary200 */\n\n svg > path {\n fill: #4945ff; /* primary600 */\n }\n`;\n\nexport const ColorPickerIcon = () => {\n return (\n <IconBox justifyContent=\"center\" alignItems=\"center\" width={7} height={6} hasRadius aria-hidden>\n <PaintBrush />\n </IconBox>\n );\n};\n","export const pluginId = 'color-picker';\n","import { pluginId } from '../pluginId';\n\nexport const getTrad = (id: string) => `${pluginId}.${id}`;\n","type TradOptions = Record<string, string>;\n\nconst prefixPluginTranslations = (trad: TradOptions, pluginId: string): TradOptions => {\n if (!pluginId) {\n throw new TypeError(\"pluginId can't be empty\");\n }\n return Object.keys(trad).reduce((acc, current) => {\n acc[`${pluginId}.${current}`] = trad[current];\n return acc;\n }, {} as TradOptions);\n};\n\nexport { prefixPluginTranslations };\n","import { ColorPickerIcon } from './components/ColorPickerIcon';\nimport { pluginId } from './pluginId';\nimport { getTrad } from './utils/getTrad';\nimport { prefixPluginTranslations } from './utils/prefixPluginTranslations';\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n /**\n * TODO: we need to have the type for StrapiApp done from `@strapi/admin` package.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n register(app: any) {\n app.customFields.register({\n name: 'color',\n pluginId: 'color-picker',\n type: 'string',\n icon: ColorPickerIcon,\n intlLabel: {\n id: getTrad('color-picker.label'),\n defaultMessage: 'Color',\n },\n intlDescription: {\n id: getTrad('color-picker.description'),\n defaultMessage: 'Select any color',\n },\n components: {\n Input: async () =>\n import('./components/ColorPickerInput').then((module) => ({\n default: module.ColorPickerInput,\n })),\n },\n options: {\n advanced: [\n {\n intlLabel: {\n id: getTrad('color-picker.options.advanced.regex'),\n defaultMessage: 'RegExp pattern',\n },\n name: 'regex',\n type: 'text',\n defaultValue: '^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$',\n description: {\n id: getTrad('color-picker.options.advanced.regex.description'),\n defaultMessage: 'The text of the regular expression',\n },\n },\n {\n sectionTitle: {\n id: 'global.settings',\n defaultMessage: 'Settings',\n },\n items: [\n {\n name: 'required',\n type: 'checkbox',\n intlLabel: {\n id: getTrad('color-picker.options.advanced.requiredField'),\n defaultMessage: 'Required field',\n },\n description: {\n id: getTrad('color-picker.options.advanced.requiredField.description'),\n defaultMessage: \"You won't be able to create an entry if this field is empty\",\n },\n },\n ],\n },\n ],\n },\n });\n },\n async registerTrads({ locales }: { locales: string[] }) {\n const importedTrads = await Promise.all(\n locales.map((locale) => {\n return import(`./translations/${locale}.json`)\n .then(({ default: data }) => {\n return {\n data: prefixPluginTranslations(data, pluginId),\n locale,\n };\n })\n .catch(() => {\n return {\n data: {},\n locale,\n };\n });\n })\n );\n\n return Promise.resolve(importedTrads);\n },\n};\n"],"names":["styled","Flex","jsx","PaintBrush","pluginId","module"],"mappings":";;;;;;;;;;;;;;AAIA,MAAM,UAAUA,iBAAAA,OAAOC,aAAAA,IAAI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAWpB,MAAM,kBAAkB,MAAM;AACnC,wCACG,SAAQ,EAAA,gBAAe,UAAS,YAAW,UAAS,OAAO,GAAG,QAAQ,GAAG,WAAS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Zz.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ru-aOnA-eym.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sv-BaFDND79.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sv-CKY6es_6.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;"}
|