@webbycrown/advanced-fields 1.0.2 → 1.0.4
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/README.md +28 -1
- package/dist/_chunks/en-BPwepUqK.js +84 -0
- package/{admin/src/translations/en.json → dist/_chunks/en-CJmJkBE0.mjs} +6 -8
- package/dist/_chunks/index-AT-E0hrg.js +129 -0
- package/dist/_chunks/index-C-A6rX1K.mjs +268 -0
- package/dist/_chunks/index-CCaZAiQR.js +268 -0
- package/dist/_chunks/index-DXVpJkpj.mjs +282 -0
- package/dist/_chunks/index-TmoGbq0j.js +282 -0
- package/{admin/src/components/AdvancedInput/index.jsx → dist/_chunks/index-cLPilu5W.mjs} +42 -92
- package/dist/admin/index.js +879 -0
- package/dist/admin/index.mjs +880 -0
- package/package.json +2 -5
- package/admin/jsconfig.json +0 -10
- package/admin/src/components/AdvancedCheckbox/index.jsx +0 -377
- package/admin/src/components/AdvancedRadio/index.jsx +0 -344
- package/admin/src/components/Initializer.jsx +0 -18
- package/admin/src/components/PluginIcon.jsx +0 -108
- package/admin/src/index.js +0 -787
- package/admin/src/pages/App.jsx +0 -13
- package/admin/src/pluginId.js +0 -3
- package/admin/src/utils/getTranslation.js +0 -5
- package/index.js +0 -158
- package/strapi-server.js +0 -186
- package/strapi-server.mjs +0 -74
|
@@ -1,344 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import { useIntl } from "react-intl";
|
|
4
|
-
import { Field, Box, Flex, Typography } from "@strapi/design-system";
|
|
5
|
-
import { useState, useEffect } from "react";
|
|
6
|
-
|
|
7
|
-
const AdvancedRadio = ({
|
|
8
|
-
attribute = {},
|
|
9
|
-
description = { id: "", defaultMessage: "" },
|
|
10
|
-
disabled,
|
|
11
|
-
error,
|
|
12
|
-
intlLabel = { id: "", defaultMessage: "" },
|
|
13
|
-
labelAction,
|
|
14
|
-
name,
|
|
15
|
-
onChange,
|
|
16
|
-
required,
|
|
17
|
-
value,
|
|
18
|
-
}) => {
|
|
19
|
-
const { formatMessage } = useIntl();
|
|
20
|
-
const [selectedValues, setSelectedValues] = useState([]);
|
|
21
|
-
const [validationError, setValidationError] = useState(null);
|
|
22
|
-
const [hasInteracted, setHasInteracted] = useState(false);
|
|
23
|
-
const [isInitialized, setIsInitialized] = useState(false);
|
|
24
|
-
|
|
25
|
-
const {
|
|
26
|
-
selectionType = "single",
|
|
27
|
-
layout = "vertical",
|
|
28
|
-
minChoices = 0,
|
|
29
|
-
maxChoices = 0,
|
|
30
|
-
defaultSelected = "",
|
|
31
|
-
radioOptions = "",
|
|
32
|
-
customErrorMessage = "",
|
|
33
|
-
fieldNote = "",
|
|
34
|
-
} = attribute.options || attribute;
|
|
35
|
-
|
|
36
|
-
// Also check attribute.options for fieldNote
|
|
37
|
-
const fieldNoteFromAttribute = attribute.options?.fieldNote || '';
|
|
38
|
-
|
|
39
|
-
// Parse radio options
|
|
40
|
-
const options = radioOptions
|
|
41
|
-
.split("\n")
|
|
42
|
-
.filter((opt) => opt.trim())
|
|
43
|
-
.map((opt) => {
|
|
44
|
-
const [value, label] = opt.split("|");
|
|
45
|
-
return { value: value?.trim() || "", label: label?.trim() || value?.trim() || "" };
|
|
46
|
-
});
|
|
47
|
-
|
|
48
|
-
// Initialize selected values
|
|
49
|
-
useEffect(() => {
|
|
50
|
-
let initialValues = [];
|
|
51
|
-
|
|
52
|
-
if (value && Array.isArray(value)) {
|
|
53
|
-
initialValues = value;
|
|
54
|
-
} else if (value && typeof value === "string") {
|
|
55
|
-
initialValues = value.split(",").map(v => v.trim()).filter(v => v);
|
|
56
|
-
} else if (defaultSelected) {
|
|
57
|
-
initialValues = defaultSelected.split(",").map(v => v.trim()).filter(v => v);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
setSelectedValues(initialValues);
|
|
61
|
-
|
|
62
|
-
// Validate the initial values
|
|
63
|
-
const validationResult = validateSelection(initialValues);
|
|
64
|
-
setValidationError(validationResult);
|
|
65
|
-
|
|
66
|
-
// Only trigger onChange if we have initial values and it's different from current value
|
|
67
|
-
// AND only if the value prop is not already set (to avoid overriding during publish)
|
|
68
|
-
// AND only if this is the first initialization
|
|
69
|
-
if (onChange && initialValues.length > 0 && (!value || (Array.isArray(value) && value.length === 0)) && !isInitialized) {
|
|
70
|
-
// Use setTimeout to ensure this happens after the component is fully mounted
|
|
71
|
-
setTimeout(() => {
|
|
72
|
-
onChange({
|
|
73
|
-
target: {
|
|
74
|
-
value: initialValues,
|
|
75
|
-
name: name,
|
|
76
|
-
id: name
|
|
77
|
-
}
|
|
78
|
-
});
|
|
79
|
-
setIsInitialized(true);
|
|
80
|
-
}, 0);
|
|
81
|
-
} else if (!isInitialized) {
|
|
82
|
-
setIsInitialized(true);
|
|
83
|
-
}
|
|
84
|
-
}, [value, defaultSelected, onChange, error]);
|
|
85
|
-
|
|
86
|
-
// Validation function - this should match server-side validation
|
|
87
|
-
const validateSelection = (values) => {
|
|
88
|
-
const valArray = Array.isArray(values) ? values : [];
|
|
89
|
-
|
|
90
|
-
// Check required validation first
|
|
91
|
-
if (required && valArray.length === 0) {
|
|
92
|
-
return customErrorMessage || 'This field is required';
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
// If field is empty and not required, no validation error
|
|
96
|
-
if (valArray.length === 0) {
|
|
97
|
-
return null;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
// Check min/max choices validation (only for multiple mode)
|
|
101
|
-
if (selectionType === "multiple") {
|
|
102
|
-
if (minChoices > 0 && valArray.length < minChoices) {
|
|
103
|
-
return customErrorMessage || `Please select at least ${minChoices} option${minChoices > 1 ? 's' : ''}`;
|
|
104
|
-
}
|
|
105
|
-
if (maxChoices > 0 && valArray.length > maxChoices) {
|
|
106
|
-
return customErrorMessage || `Please select at most ${maxChoices} option${maxChoices > 1 ? 's' : ''}`;
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
return null;
|
|
111
|
-
};
|
|
112
|
-
|
|
113
|
-
const handleRadioChange = (optionValue, isChecked) => {
|
|
114
|
-
let newValues;
|
|
115
|
-
|
|
116
|
-
if (selectionType === "single") {
|
|
117
|
-
// Single selection: replace current selection
|
|
118
|
-
newValues = isChecked ? [optionValue] : [];
|
|
119
|
-
} else {
|
|
120
|
-
// Multiple selection: add/remove from array
|
|
121
|
-
if (isChecked) {
|
|
122
|
-
newValues = [...selectedValues, optionValue];
|
|
123
|
-
} else {
|
|
124
|
-
newValues = selectedValues.filter(val => val !== optionValue);
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
setSelectedValues(newValues);
|
|
129
|
-
setHasInteracted(true);
|
|
130
|
-
|
|
131
|
-
// Validate selection only after user interaction
|
|
132
|
-
const error = validateSelection(newValues);
|
|
133
|
-
setValidationError(error);
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
if (onChange) {
|
|
137
|
-
// Create a proper event object with name and id attributes
|
|
138
|
-
const event = {
|
|
139
|
-
target: {
|
|
140
|
-
name: name,
|
|
141
|
-
id: name,
|
|
142
|
-
value: newValues
|
|
143
|
-
}
|
|
144
|
-
};
|
|
145
|
-
onChange(event);
|
|
146
|
-
}
|
|
147
|
-
};
|
|
148
|
-
|
|
149
|
-
// Show validation error - prioritize Strapi's error, then our validation only after user interaction
|
|
150
|
-
const displayError = error || (hasInteracted && validationError);
|
|
151
|
-
|
|
152
|
-
const renderRadios = () => {
|
|
153
|
-
|
|
154
|
-
const radioStyle = {
|
|
155
|
-
display: "flex",
|
|
156
|
-
alignItems: "center",
|
|
157
|
-
gap: "8px",
|
|
158
|
-
padding: "4px 0",
|
|
159
|
-
};
|
|
160
|
-
|
|
161
|
-
const radioInputStyle = {
|
|
162
|
-
width: "16px",
|
|
163
|
-
height: "16px",
|
|
164
|
-
accentColor: "#4945ff",
|
|
165
|
-
margin: "0",
|
|
166
|
-
padding: "0",
|
|
167
|
-
opacity: "1",
|
|
168
|
-
visibility: "visible",
|
|
169
|
-
display: "block",
|
|
170
|
-
position: "relative",
|
|
171
|
-
zIndex: "1",
|
|
172
|
-
cursor: "pointer",
|
|
173
|
-
border: "2px solid #dcdce4",
|
|
174
|
-
borderRadius: "50%",
|
|
175
|
-
backgroundColor: "white",
|
|
176
|
-
transition: "all 0.2s ease",
|
|
177
|
-
};
|
|
178
|
-
|
|
179
|
-
// Custom radio button style for multiple selection
|
|
180
|
-
const customRadioStyle = {
|
|
181
|
-
width: "16px",
|
|
182
|
-
height: "16px",
|
|
183
|
-
borderRadius: "50%",
|
|
184
|
-
borderWidth: "1px",
|
|
185
|
-
borderStyle: "solid",
|
|
186
|
-
backgroundColor: "#ffffff",
|
|
187
|
-
cursor: "pointer",
|
|
188
|
-
transition: "all 0.2s ease",
|
|
189
|
-
position: "relative",
|
|
190
|
-
display: "flex",
|
|
191
|
-
alignItems: "center",
|
|
192
|
-
justifyContent: "center",
|
|
193
|
-
};
|
|
194
|
-
|
|
195
|
-
const customRadioCheckedStyle = {
|
|
196
|
-
...customRadioStyle,
|
|
197
|
-
backgroundColor: "#ffffff",
|
|
198
|
-
borderColor: "#4945ff",
|
|
199
|
-
};
|
|
200
|
-
|
|
201
|
-
const customRadioDotStyle = {
|
|
202
|
-
width: "10px",
|
|
203
|
-
height: "10px",
|
|
204
|
-
borderRadius: "50%",
|
|
205
|
-
backgroundColor: "#4945ff",
|
|
206
|
-
};
|
|
207
|
-
|
|
208
|
-
const radioLabelStyle = {
|
|
209
|
-
fontSize: "14px",
|
|
210
|
-
fontFamily: "inherit",
|
|
211
|
-
cursor: "pointer",
|
|
212
|
-
userSelect: "none",
|
|
213
|
-
color: "#32324d",
|
|
214
|
-
fontWeight: "400",
|
|
215
|
-
lineHeight: "1.5",
|
|
216
|
-
marginLeft: "4px",
|
|
217
|
-
};
|
|
218
|
-
|
|
219
|
-
// If no options are defined, show a message
|
|
220
|
-
if (!options || options.length === 0) {
|
|
221
|
-
return (
|
|
222
|
-
<div style={{ padding: "8px", color: "#666", fontStyle: "italic" }}>
|
|
223
|
-
{formatMessage({
|
|
224
|
-
id: 'advanced-fields.radio.no-options',
|
|
225
|
-
defaultMessage: 'No options defined. Please configure this field in the content type settings.'
|
|
226
|
-
})}
|
|
227
|
-
</div>
|
|
228
|
-
);
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
if (layout === "horizontal") {
|
|
232
|
-
return (
|
|
233
|
-
<Flex wrap="wrap" gap={2}>
|
|
234
|
-
{options.map((option) => (
|
|
235
|
-
<div key={option.value} style={radioStyle}>
|
|
236
|
-
{selectionType === "multiple" ? (
|
|
237
|
-
// Custom radio button appearance for multiple selection
|
|
238
|
-
<div
|
|
239
|
-
style={selectedValues.includes(option.value) ? customRadioCheckedStyle : customRadioStyle}
|
|
240
|
-
onClick={() => handleRadioChange(option.value, !selectedValues.includes(option.value))}
|
|
241
|
-
>
|
|
242
|
-
{selectedValues.includes(option.value) && (
|
|
243
|
-
<div style={customRadioDotStyle} />
|
|
244
|
-
)}
|
|
245
|
-
</div>
|
|
246
|
-
) : (
|
|
247
|
-
// Regular radio button for single selection
|
|
248
|
-
<input
|
|
249
|
-
type="radio"
|
|
250
|
-
id={`${name}-${option.value}`}
|
|
251
|
-
name={name}
|
|
252
|
-
checked={selectedValues.includes(option.value)}
|
|
253
|
-
onChange={(e) => handleRadioChange(option.value, e.target.checked)}
|
|
254
|
-
disabled={disabled}
|
|
255
|
-
style={radioInputStyle}
|
|
256
|
-
/>
|
|
257
|
-
)}
|
|
258
|
-
<label
|
|
259
|
-
htmlFor={selectionType === "single" ? `${name}-${option.value}` : undefined}
|
|
260
|
-
style={radioLabelStyle}
|
|
261
|
-
onClick={selectionType === "multiple" ? () => handleRadioChange(option.value, !selectedValues.includes(option.value)) : undefined}
|
|
262
|
-
>
|
|
263
|
-
{option.label}
|
|
264
|
-
</label>
|
|
265
|
-
</div>
|
|
266
|
-
))}
|
|
267
|
-
</Flex>
|
|
268
|
-
);
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
return (
|
|
272
|
-
<div>
|
|
273
|
-
{options.map((option) => (
|
|
274
|
-
<div key={option.value} style={radioStyle}>
|
|
275
|
-
{selectionType === "multiple" ? (
|
|
276
|
-
// Custom radio button appearance for multiple selection
|
|
277
|
-
<div
|
|
278
|
-
style={selectedValues.includes(option.value) ? customRadioCheckedStyle : customRadioStyle}
|
|
279
|
-
onClick={() => handleRadioChange(option.value, !selectedValues.includes(option.value))}
|
|
280
|
-
>
|
|
281
|
-
{selectedValues.includes(option.value) && (
|
|
282
|
-
<div style={customRadioDotStyle} />
|
|
283
|
-
)}
|
|
284
|
-
</div>
|
|
285
|
-
) : (
|
|
286
|
-
// Regular radio button for single selection
|
|
287
|
-
<input
|
|
288
|
-
type="radio"
|
|
289
|
-
id={`${name}-${option.value}`}
|
|
290
|
-
name={name}
|
|
291
|
-
checked={selectedValues.includes(option.value)}
|
|
292
|
-
onChange={(e) => handleRadioChange(option.value, e.target.checked)}
|
|
293
|
-
disabled={disabled}
|
|
294
|
-
style={radioInputStyle}
|
|
295
|
-
/>
|
|
296
|
-
)}
|
|
297
|
-
<label
|
|
298
|
-
htmlFor={selectionType === "single" ? `${name}-${option.value}` : undefined}
|
|
299
|
-
style={radioLabelStyle}
|
|
300
|
-
onClick={selectionType === "multiple" ? () => handleRadioChange(option.value, !selectedValues.includes(option.value)) : undefined}
|
|
301
|
-
>
|
|
302
|
-
{option.label}
|
|
303
|
-
</label>
|
|
304
|
-
</div>
|
|
305
|
-
))}
|
|
306
|
-
</div>
|
|
307
|
-
);
|
|
308
|
-
};
|
|
309
|
-
|
|
310
|
-
return (
|
|
311
|
-
<Box col={6}>
|
|
312
|
-
<Field.Root name={name} error={displayError}>
|
|
313
|
-
<Field.Label>
|
|
314
|
-
{intlLabel.id ? formatMessage(intlLabel) : intlLabel.defaultMessage || name}
|
|
315
|
-
{required && <span style={{ color: "#d02b20", marginLeft: "4px" }}>*</span>}
|
|
316
|
-
</Field.Label>
|
|
317
|
-
{renderRadios()}
|
|
318
|
-
{displayError && (
|
|
319
|
-
<Field.Error>
|
|
320
|
-
{displayError}
|
|
321
|
-
</Field.Error>
|
|
322
|
-
)}
|
|
323
|
-
{description && (description.id || description.defaultMessage) && (
|
|
324
|
-
<Field.Hint>
|
|
325
|
-
{description.id ? formatMessage(description) : description.defaultMessage}
|
|
326
|
-
</Field.Hint>
|
|
327
|
-
)}
|
|
328
|
-
{(fieldNote || fieldNoteFromAttribute) && (
|
|
329
|
-
<span style={{
|
|
330
|
-
fontStyle: 'italic',
|
|
331
|
-
color: '#666',
|
|
332
|
-
fontSize: '12px',
|
|
333
|
-
display: 'block',
|
|
334
|
-
marginTop: '4px'
|
|
335
|
-
}}>
|
|
336
|
-
{fieldNote || fieldNoteFromAttribute}
|
|
337
|
-
</span>
|
|
338
|
-
)}
|
|
339
|
-
</Field.Root>
|
|
340
|
-
</Box>
|
|
341
|
-
);
|
|
342
|
-
};
|
|
343
|
-
|
|
344
|
-
export default AdvancedRadio;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { useEffect, useRef } from 'react';
|
|
2
|
-
|
|
3
|
-
import { PLUGIN_ID } from '../pluginId';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* @type {import('react').FC<{ setPlugin: (id: string) => void }>}
|
|
7
|
-
*/
|
|
8
|
-
const Initializer = ({ setPlugin }) => {
|
|
9
|
-
const ref = useRef(setPlugin);
|
|
10
|
-
|
|
11
|
-
useEffect(() => {
|
|
12
|
-
ref.current(PLUGIN_ID);
|
|
13
|
-
}, []);
|
|
14
|
-
|
|
15
|
-
return null;
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
export { Initializer };
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import { Box } from '@strapi/design-system';
|
|
2
|
-
|
|
3
|
-
const PluginIcon = (props) => {
|
|
4
|
-
return <AdvancedRadioIcon {...props} />;
|
|
5
|
-
};
|
|
6
|
-
|
|
7
|
-
// Advanced Input Icon - Clean text input with validation indicator
|
|
8
|
-
const AdvancedInputIcon = () => (
|
|
9
|
-
<Box
|
|
10
|
-
style={{
|
|
11
|
-
width: '28px',
|
|
12
|
-
height: '28px',
|
|
13
|
-
display: 'flex',
|
|
14
|
-
alignItems: 'center',
|
|
15
|
-
justifyContent: 'center',
|
|
16
|
-
backgroundColor: '#f8f9fa',
|
|
17
|
-
borderRadius: '6px',
|
|
18
|
-
border: '1px solid #e9ecef',
|
|
19
|
-
}}
|
|
20
|
-
>
|
|
21
|
-
<svg
|
|
22
|
-
width="18"
|
|
23
|
-
height="18"
|
|
24
|
-
viewBox="0 0 32 32"
|
|
25
|
-
fill="none"
|
|
26
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
27
|
-
>
|
|
28
|
-
<rect width="32" height="32" rx="6" fill="#4945FF" fillOpacity="0.1"/>
|
|
29
|
-
<rect x="0.5" y="0.5" width="31" height="31" rx="5.5" stroke="#4945FF" strokeOpacity="0.15"/>
|
|
30
|
-
<path d="M27 11.6364V20.3636C27 20.7494 26.8455 21.1194 26.5704 21.3922C26.2954 21.6649 25.9223 21.8182 25.5333 21.8182H17.1C17.0028 21.8182 16.9095 21.7799 16.8407 21.7117C16.772 21.6435 16.7333 21.551 16.7333 21.4545V10.5455C16.7333 10.449 16.772 10.3565 16.8407 10.2883C16.9095 10.2201 17.0028 10.1818 17.1 10.1818H25.5333C25.9223 10.1818 26.2954 10.3351 26.5704 10.6078C26.8455 10.8806 27 11.2506 27 11.6364ZM15.2667 8.72727V23.2727C15.2667 23.4656 15.1894 23.6506 15.0519 23.787C14.9144 23.9234 14.7278 24 14.5333 24C14.3388 24 14.1523 23.9234 14.0148 23.787C13.8773 23.6506 13.8 23.4656 13.8 23.2727V21.8182H6.46667C6.07768 21.8182 5.70463 21.6649 5.42958 21.3922C5.15452 21.1194 5 20.7494 5 20.3636V11.6364C5 11.2506 5.15452 10.8806 5.42958 10.6078C5.70463 10.3351 6.07768 10.1818 6.46667 10.1818H13.8V8.72727C13.8 8.53439 13.8773 8.3494 14.0148 8.21301C14.1523 8.07662 14.3388 8 14.5333 8C14.7278 8 14.9144 8.07662 15.0519 8.21301C15.1894 8.3494 15.2667 8.53439 15.2667 8.72727ZM12.3333 14.5455C12.3333 14.3526 12.2561 14.1676 12.1185 14.0312C11.981 13.8948 11.7945 13.8182 11.6 13.8182H8.66667C8.47217 13.8182 8.28565 13.8948 8.14812 14.0312C8.0106 14.1676 7.93333 14.3526 7.93333 14.5455C7.93333 14.7383 8.0106 14.9233 8.14812 15.0597C8.28565 15.1961 8.47217 15.2727 8.66667 15.2727H9.4V17.4545C9.4 17.6474 9.47726 17.8324 9.61479 17.9688C9.75232 18.1052 9.93884 18.1818 10.1333 18.1818C10.3278 18.1818 10.5144 18.1052 10.6519 17.9688C10.7894 17.8324 10.8667 17.6474 10.8667 17.4545V15.2727H11.6C11.7945 15.2727 11.981 15.1961 12.1185 15.0597C12.2561 14.9233 12.3333 14.7383 12.3333 14.5455Z" fill="#4945FF"/>
|
|
31
|
-
<mask id="path-4-inside-1_649_85" fill="white">
|
|
32
|
-
<path d="M0 6C0 2.68629 2.68629 0 6 0H10V10H0V6Z"/>
|
|
33
|
-
</mask>
|
|
34
|
-
<path d="M-2 6C-2 1.58172 1.58172 -2 6 -2H10V2H6C3.79086 2 2 3.79086 2 6H-2ZM10 10H0H10ZM-2 10V6C-2 1.58172 1.58172 -2 6 -2V2C3.79086 2 2 3.79086 2 6V10H-2ZM10 0V10V0Z" fill="#4945FF" mask="url(#path-4-inside-1_649_85)"/>
|
|
35
|
-
</svg>
|
|
36
|
-
</Box>
|
|
37
|
-
);
|
|
38
|
-
|
|
39
|
-
// Advanced Checkbox Icon - Modern checkbox with multiple states
|
|
40
|
-
const AdvancedCheckboxIcon = () => (
|
|
41
|
-
<Box
|
|
42
|
-
style={{
|
|
43
|
-
width: '28px',
|
|
44
|
-
height: '28px',
|
|
45
|
-
display: 'flex',
|
|
46
|
-
alignItems: 'center',
|
|
47
|
-
justifyContent: 'center',
|
|
48
|
-
backgroundColor: '#f8f9fa',
|
|
49
|
-
borderRadius: '6px',
|
|
50
|
-
border: '1px solid #e9ecef',
|
|
51
|
-
}}
|
|
52
|
-
>
|
|
53
|
-
<svg
|
|
54
|
-
width="18"
|
|
55
|
-
height="18"
|
|
56
|
-
viewBox="0 0 32 32"
|
|
57
|
-
fill="none"
|
|
58
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
59
|
-
>
|
|
60
|
-
<rect width="32" height="32" rx="6" fill="#4945FF" fillOpacity="0.1"/>
|
|
61
|
-
<rect x="0.5" y="0.5" width="31" height="31" rx="5.5" stroke="#4945FF" strokeOpacity="0.15"/>
|
|
62
|
-
<mask id="path-3-inside-1_649_76" fill="white">
|
|
63
|
-
<path d="M0 6C0 2.68629 2.68629 0 6 0H10V10H0V6Z"/>
|
|
64
|
-
</mask>
|
|
65
|
-
<path d="M-2 6C-2 1.58172 1.58172 -2 6 -2H10V2H6C3.79086 2 2 3.79086 2 6H-2ZM10 10H0H10ZM-2 10V6C-2 1.58172 1.58172 -2 6 -2V2C3.79086 2 2 3.79086 2 6V10H-2ZM10 0V10V0Z" fill="#4945FF" mask="url(#path-3-inside-1_649_76)"/>
|
|
66
|
-
<path d="M14.67 17.71L12.6275 15.6675C12.4533 15.4933 12.2317 15.4062 11.9625 15.4062C11.6933 15.4062 11.4717 15.4933 11.2975 15.6675C11.1233 15.8417 11.0362 16.0633 11.0362 16.3325C11.0362 16.6017 11.1233 16.8233 11.2975 16.9975L14.005 19.705C14.195 19.895 14.4167 19.99 14.67 19.99C14.9233 19.99 15.145 19.895 15.335 19.705L20.7025 14.3375C20.8767 14.1633 20.9637 13.9417 20.9637 13.6725C20.9637 13.4033 20.8767 13.1817 20.7025 13.0075C20.5283 12.8333 20.3067 12.7462 20.0375 12.7462C19.7683 12.7462 19.5467 12.8333 19.3725 13.0075L14.67 17.71ZM16 25.5C14.6858 25.5 13.4508 25.2505 12.295 24.7514C11.1392 24.2523 10.1337 23.5756 9.27875 22.7212C8.42375 21.8669 7.74703 20.8615 7.2486 19.705C6.75017 18.5485 6.50063 17.3135 6.5 16C6.49937 14.6865 6.7489 13.4515 7.2486 12.295C7.7483 11.1385 8.42502 10.1331 9.27875 9.27875C10.1325 8.42438 11.1379 7.74767 12.295 7.2486C13.4521 6.74953 14.6871 6.5 16 6.5C17.3129 6.5 18.5479 6.74953 19.705 7.2486C20.8621 7.74767 21.8675 8.42438 22.7212 9.27875C23.575 10.1331 24.252 11.1385 24.7523 12.295C25.2527 13.4515 25.5019 14.6865 25.5 16C25.4981 17.3135 25.2486 18.5485 24.7514 19.705C24.2542 20.8615 23.5775 21.8669 22.7212 22.7212C21.865 23.5756 20.8596 24.2526 19.705 24.7523C18.5504 25.252 17.3154 25.5013 16 25.5Z" fill="#4945FF"/>
|
|
67
|
-
</svg>
|
|
68
|
-
</Box>
|
|
69
|
-
);
|
|
70
|
-
|
|
71
|
-
// Advanced Radio Icon - Clean radio button with selection states
|
|
72
|
-
const AdvancedRadioIcon = () => (
|
|
73
|
-
<Box
|
|
74
|
-
style={{
|
|
75
|
-
width: '28px',
|
|
76
|
-
height: '28px',
|
|
77
|
-
display: 'flex',
|
|
78
|
-
alignItems: 'center',
|
|
79
|
-
justifyContent: 'center',
|
|
80
|
-
backgroundColor: '#f8f9fa',
|
|
81
|
-
borderRadius: '6px',
|
|
82
|
-
border: '1px solid #e9ecef',
|
|
83
|
-
}}
|
|
84
|
-
>
|
|
85
|
-
<svg
|
|
86
|
-
width="18"
|
|
87
|
-
height="18"
|
|
88
|
-
viewBox="0 0 32 32"
|
|
89
|
-
fill="none"
|
|
90
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
91
|
-
>
|
|
92
|
-
<rect width="32" height="32" rx="6" fill="#4945FF" fillOpacity="0.1"/>
|
|
93
|
-
<rect x="0.5" y="0.5" width="31" height="31" rx="5.5" stroke="#4945FF" strokeOpacity="0.15"/>
|
|
94
|
-
<path d="M16 6.5C10.775 6.5 6.5 10.775 6.5 16C6.5 21.225 10.775 25.5 16 25.5C21.225 25.5 25.5 21.225 25.5 16C25.5 10.775 21.225 6.5 16 6.5ZM23.6 16H19.8C19.8 14.575 19.04 13.34 17.9 12.77L19.8 9.445C22.08 10.775 23.6 13.15 23.6 16ZM16 14.1C17.045 14.1 17.9 14.955 17.9 16C17.9 17.045 17.045 17.9 16 17.9C14.955 17.9 14.1 17.045 14.1 16C14.1 14.955 14.955 14.1 16 14.1ZM12.2 9.445C12.77 10.395 13.435 11.63 14.1 12.77C12.96 13.435 12.2 14.67 12.2 16H8.4C8.4 13.15 9.92 10.775 12.2 9.445ZM12.2 22.555C12.77 21.605 13.435 20.37 14.1 19.23C14.67 19.515 15.335 19.8 16 19.8C16.665 19.8 17.33 19.61 17.9 19.23L19.8 22.555C18.66 23.22 17.425 23.6 16 23.6C14.575 23.6 13.34 23.22 12.2 22.555Z" fill="#4945FF"/>
|
|
95
|
-
<mask id="path-4-inside-1_649_89" fill="white">
|
|
96
|
-
<path d="M0 6C0 2.68629 2.68629 0 6 0H10V10H0V6Z"/>
|
|
97
|
-
</mask>
|
|
98
|
-
<path d="M-2 6C-2 1.58172 1.58172 -2 6 -2H10V2H6C3.79086 2 2 3.79086 2 6H-2ZM10 10H0H10ZM-2 10V6C-2 1.58172 1.58172 -2 6 -2V2C3.79086 2 2 3.79086 2 6V10H-2ZM10 0V10V0Z" fill="#4945FF" mask="url(#path-4-inside-1_649_89)"/>
|
|
99
|
-
</svg>
|
|
100
|
-
</Box>
|
|
101
|
-
);
|
|
102
|
-
|
|
103
|
-
export {
|
|
104
|
-
PluginIcon,
|
|
105
|
-
AdvancedCheckboxIcon,
|
|
106
|
-
AdvancedInputIcon,
|
|
107
|
-
AdvancedRadioIcon
|
|
108
|
-
};
|