sanity-plugin-all-in-one-accessibility 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +160 -0
  3. package/dist/index.d.mts +7 -0
  4. package/dist/index.d.ts +7 -0
  5. package/dist/index.js +1096 -0
  6. package/dist/index.js.map +1 -0
  7. package/dist/index.mjs +1099 -0
  8. package/dist/index.mjs.map +1 -0
  9. package/package.json +99 -0
  10. package/sanity.json +8 -0
  11. package/src/assets/css/bootstrap.min.css +11722 -0
  12. package/src/assets/css/style.css +3204 -0
  13. package/src/assets/css/style.css--06-Nov-2023.css +1102 -0
  14. package/src/assets/css/style.css.map +1 -0
  15. package/src/assets/css/style.scss +2730 -0
  16. package/src/assets/images/ada.svg +17 -0
  17. package/src/assets/images/aioa-icon-type-1.svg +1 -0
  18. package/src/assets/images/aioa-icon-type-10.svg +1 -0
  19. package/src/assets/images/aioa-icon-type-11.svg +1 -0
  20. package/src/assets/images/aioa-icon-type-12.svg +1 -0
  21. package/src/assets/images/aioa-icon-type-13.svg +1 -0
  22. package/src/assets/images/aioa-icon-type-14.svg +29 -0
  23. package/src/assets/images/aioa-icon-type-15.svg +26 -0
  24. package/src/assets/images/aioa-icon-type-16.svg +17 -0
  25. package/src/assets/images/aioa-icon-type-17.svg +24 -0
  26. package/src/assets/images/aioa-icon-type-18.svg +20 -0
  27. package/src/assets/images/aioa-icon-type-19.svg +25 -0
  28. package/src/assets/images/aioa-icon-type-1_new.svg +1 -0
  29. package/src/assets/images/aioa-icon-type-2.svg +1 -0
  30. package/src/assets/images/aioa-icon-type-20.svg +24 -0
  31. package/src/assets/images/aioa-icon-type-21.svg +28 -0
  32. package/src/assets/images/aioa-icon-type-22.svg +21 -0
  33. package/src/assets/images/aioa-icon-type-23.svg +21 -0
  34. package/src/assets/images/aioa-icon-type-24.svg +21 -0
  35. package/src/assets/images/aioa-icon-type-25.svg +15 -0
  36. package/src/assets/images/aioa-icon-type-26.svg +23 -0
  37. package/src/assets/images/aioa-icon-type-27.svg +21 -0
  38. package/src/assets/images/aioa-icon-type-28.svg +27 -0
  39. package/src/assets/images/aioa-icon-type-29.svg +25 -0
  40. package/src/assets/images/aioa-icon-type-3.svg +1 -0
  41. package/src/assets/images/aioa-icon-type-4.svg +16 -0
  42. package/src/assets/images/aioa-icon-type-5.svg +1 -0
  43. package/src/assets/images/aioa-icon-type-6.svg +1 -0
  44. package/src/assets/images/aioa-icon-type-7.svg +1 -0
  45. package/src/assets/images/aioa-icon-type-8.svg +1 -0
  46. package/src/assets/images/aioa-icon-type-9.svg +1 -0
  47. package/src/assets/images/all-in-one-accessibility-logo.svg +43 -0
  48. package/src/assets/images/checkbox.svg +14 -0
  49. package/src/assets/images/error.svg +18 -0
  50. package/src/assets/images/large-site-icon.svg +1 -0
  51. package/src/assets/images/medium-site-icon.svg +1 -0
  52. package/src/assets/images/no-ada.svg +17 -0
  53. package/src/assets/images/noun-digital-enterprise.svg +9 -0
  54. package/src/assets/images/small-site-icon.svg +1 -0
  55. package/src/assets/images/success.svg +13 -0
  56. package/src/assets.zip +0 -0
  57. package/src/icon.tsx +2 -0
  58. package/src/index.ts +76 -0
  59. package/src/plugin.tsx +1816 -0
  60. package/v2-incompatible.js +11 -0
package/dist/index.mjs ADDED
@@ -0,0 +1,1099 @@
1
+ import { useCurrentUser, definePlugin } from "sanity";
2
+ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
3
+ import { useState, useEffect } from "react";
4
+ import { Image, Form, Row, Col, InputGroup, FormControl, Button } from "react-bootstrap";
5
+ const PluginIcon = () => /* @__PURE__ */ jsx("img", { src: "https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-1.svg", alt: "All in One Accessibility", height: 20, width: 20 }), aioaicontype1 = "https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-1.svg", aioaicontype2 = "https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-2.svg", aioaicontype3 = "https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-3.svg", aioaicontype4 = "https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-4.svg", aioaicontype5 = "https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-5.svg", aioaicontype6 = "https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-6.svg", aioaicontype7 = "https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-7.svg", aioaicontype8 = "https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-8.svg", aioaicontype9 = "https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-9.svg", aioaicontype10 = "https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-10.svg", aioaicontype11 = "https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-11.svg", aioaicontype12 = "https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-12.svg", aioaicontype13 = "https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-13.svg", aioaicontype14 = "https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-14.svg", aioaicontype15 = "https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-15.svg", aioaicontype16 = "https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-16.svg", aioaicontype17 = "https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-17.svg", aioaicontype18 = "https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-18.svg", aioaicontype19 = "https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-19.svg", aioaicontype20 = "https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-20.svg", aioaicontype21 = "https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-21.svg", aioaicontype22 = "https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-22.svg", aioaicontype23 = "https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-23.svg", aioaicontype24 = "https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-24.svg", aioaicontype25 = "https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-25.svg", aioaicontype26 = "https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-26.svg", aioaicontype27 = "https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-27.svg", aioaicontype28 = "https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-28.svg", aioaicontype29 = "https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-29.svg", allinoneaccessibilitylogo = "https://sanity.skynettechnologies.us/assets/images/all-in-one-accessibility-logo.svg", HomePage = () => {
6
+ const [isValid, setIsValid] = useState(!1);
7
+ useState("");
8
+ const [parameters, setParameters] = useState({
9
+ hexaColor: "",
10
+ widget_size: "0",
11
+ position: "bottom_right",
12
+ icontype: "aioa-icon-type-1",
13
+ iconsize: "aioa-default-icon"
14
+ }), [widgetSettings, setWidgetSettings] = useState({
15
+ widget_icon_size_custom: "",
16
+ custom_position_x_value: "",
17
+ custom_position_y_value: "",
18
+ custom_position_left_right: "To the top",
19
+ custom_position_top_bottom: "To the left"
20
+ }), [isSwitcherEnabled, setSwitcherEnabled] = useState(!1), [isSizeSwitcherEnabled, setSizeSwitcherEnabled] = useState(!1), [iconsize, setIconSize] = useState(aioaicontype1), [settingList, setSetting] = useState({});
21
+ useState(!1);
22
+ const [showSuccessMessage, setShowSuccessMessage] = useState(!1), [userData, setUserData] = useState(null);
23
+ useEffect(() => {
24
+ console.log("settingList (outside): ", settingList), Object.keys(settingList).length !== 0 && (console.log("Color Code", settingList.Color_Code), console.log("Icon Position", settingList.Icon_Position), console.log("Icon Type", settingList.Icon_Type), console.log("Icon Size", settingList.Icon_Size), setParameters({
25
+ hexaColor: settingList.Color_Code,
26
+ position: settingList.Icon_Position,
27
+ icontype: settingList.Icon_Type,
28
+ iconsize: settingList.Icon_Size,
29
+ widget_size: "0"
30
+ }), settingList.Icon_Type === "aioa-icon-type-2" ? setIconSize(aioaicontype2) : settingList.Icon_Type === "aioa-icon-type-3" ? setIconSize(aioaicontype3) : setIconSize(aioaicontype1)), getAPIData();
31
+ }, [settingList]), useEffect(() => {
32
+ console.log(parameters), console.log("parameters.position : ", parameters.position === "bottom_center");
33
+ }, [parameters]), useEffect(() => {
34
+ }, []);
35
+ const currentUser = useCurrentUser();
36
+ useEffect(() => {
37
+ currentUser && setUserData({
38
+ name: currentUser.name,
39
+ email: currentUser.email
40
+ });
41
+ }, [currentUser]);
42
+ const onSaveChanges = async () => {
43
+ saveData(parameters);
44
+ }, saveData = (data) => {
45
+ const formdata = new FormData(), widget_icon_size_custom = document.getElementById("widget_icon_size_custom")?.value || "", custom_position_x_value = document.getElementById("custom_position_x_value")?.value || "", custom_position_y_value = document.getElementById("custom_position_y_value")?.value || "", custom_position_left_right = document.getElementById("custom_position_left_right")?.value || "";
46
+ document.getElementById("custom_position_top_bottom")?.value;
47
+ let widget_position_right = "", widget_position_left = "", widget_position_top = "", widget_position_bottom = "";
48
+ custom_position_left_right == "To the right" ? widget_position_right = custom_position_x_value : widget_position_left = custom_position_x_value, custom_position_left_right == "To the bottom" ? widget_position_bottom = custom_position_y_value : widget_position_top = custom_position_y_value, formdata.append("u", window.location.hostname), formdata.append("widget_position", data.position), formdata.append("widget_color_code", data.hexaColor), formdata.append("widget_icon_type", data.icontype), formdata.append("widget_icon_size", data.iconsize), formdata.append("widget_size", data.widget_size), formdata.append("is_widget_custom_position", isSwitcherEnabled == !0 ? "1" : "0"), formdata.append("is_widget_custom_size", isSizeSwitcherEnabled == !0 ? "1" : "0"), formdata.append("widget_icon_size_custom", widget_icon_size_custom), formdata.append("widget_position_right", widget_position_right), formdata.append("widget_position_left", widget_position_left), formdata.append("widget_position_top", widget_position_top), formdata.append("widget_position_bottom", widget_position_bottom), fetch("https://ada.skynettechnologies.us/api/widget-setting-update-platform", {
49
+ method: "POST",
50
+ body: formdata
51
+ }).then((response) => response.json()).then(async (response) => {
52
+ console.log("response Save Data", response), setShowSuccessMessage(!0), setTimeout(() => {
53
+ setShowSuccessMessage(!1);
54
+ }, 3e3);
55
+ }).catch((error) => console.log("error", error));
56
+ }, getAPIData = () => {
57
+ const formdata = new FormData();
58
+ formdata.append("website_url", window.location.hostname), fetch("https://ada.skynettechnologies.us/api/widget-settings", {
59
+ method: "POST",
60
+ body: formdata
61
+ }).then((response) => response.json()).then((response) => {
62
+ Object.keys(response.Data).length !== 0 ? (setIsValid(!0), setParameters({
63
+ hexaColor: response.Data.widget_color_code,
64
+ position: response.Data.widget_position,
65
+ icontype: response.Data.widget_icon_type,
66
+ iconsize: response.Data.widget_icon_size,
67
+ widget_size: response.Data.widget_size
68
+ }), setSizeSwitcherEnabled(response.Data.is_widget_custom_size != "0"), setSwitcherEnabled(response.Data.is_widget_custom_position != "0"), setWidgetSettings({
69
+ widget_icon_size_custom: response.Data.widget_icon_size_custom || "",
70
+ custom_position_x_value: parseInt(response.Data.widget_position_left) > 0 ? response.Data.widget_position_left : response.Data.widget_position_right,
71
+ custom_position_y_value: parseInt(response.Data.widget_position_bottom) > 0 ? response.Data.widget_position_bottom : response.Data.widget_position_top,
72
+ custom_position_left_right: parseInt(response.Data.widget_position_left) > 0 ? "To the left" : "To the right",
73
+ custom_position_top_bottom: parseInt(response.Data.widget_position_bottom) > 0 ? "To the bottom" : "To the top"
74
+ }), console.log("setWidgetSettings : ", widgetSettings)) : setIsValid(!1);
75
+ }).catch((error) => console.log("error", error));
76
+ }, onIconChange = (e) => {
77
+ switch (setParameters({ ...parameters, icontype: e.target.value }), e.target.value) {
78
+ case "aioa-icon-type-2":
79
+ setIconSize(aioaicontype2);
80
+ break;
81
+ case "aioa-icon-type-3":
82
+ setIconSize(aioaicontype3);
83
+ break;
84
+ case "aioa-icon-type-4":
85
+ setIconSize(aioaicontype4);
86
+ break;
87
+ case "aioa-icon-type-5":
88
+ setIconSize(aioaicontype5);
89
+ break;
90
+ case "aioa-icon-type-6":
91
+ setIconSize(aioaicontype6);
92
+ break;
93
+ case "aioa-icon-type-7":
94
+ setIconSize(aioaicontype7);
95
+ break;
96
+ case "aioa-icon-type-8":
97
+ setIconSize(aioaicontype8);
98
+ break;
99
+ case "aioa-icon-type-9":
100
+ setIconSize(aioaicontype9);
101
+ break;
102
+ case "aioa-icon-type-10":
103
+ setIconSize(aioaicontype10);
104
+ break;
105
+ case "aioa-icon-type-11":
106
+ setIconSize(aioaicontype11);
107
+ break;
108
+ case "aioa-icon-type-12":
109
+ setIconSize(aioaicontype12);
110
+ break;
111
+ case "aioa-icon-type-13":
112
+ setIconSize(aioaicontype13);
113
+ break;
114
+ case "aioa-icon-type-14":
115
+ setIconSize(aioaicontype14);
116
+ break;
117
+ case "aioa-icon-type-15":
118
+ setIconSize(aioaicontype15);
119
+ break;
120
+ case "aioa-icon-type-16":
121
+ setIconSize(aioaicontype16);
122
+ break;
123
+ case "aioa-icon-type-17":
124
+ setIconSize(aioaicontype17);
125
+ break;
126
+ case "aioa-icon-type-18":
127
+ setIconSize(aioaicontype18);
128
+ break;
129
+ case "aioa-icon-type-19":
130
+ setIconSize(aioaicontype19);
131
+ break;
132
+ case "aioa-icon-type-20":
133
+ setIconSize(aioaicontype20);
134
+ break;
135
+ case "aioa-icon-type-21":
136
+ setIconSize(aioaicontype21);
137
+ break;
138
+ case "aioa-icon-type-22":
139
+ setIconSize(aioaicontype22);
140
+ break;
141
+ case "aioa-icon-type-23":
142
+ setIconSize(aioaicontype23);
143
+ break;
144
+ case "aioa-icon-type-24":
145
+ setIconSize(aioaicontype24);
146
+ break;
147
+ case "aioa-icon-type-25":
148
+ setIconSize(aioaicontype25);
149
+ break;
150
+ case "aioa-icon-type-26":
151
+ setIconSize(aioaicontype26);
152
+ break;
153
+ case "aioa-icon-type-27":
154
+ setIconSize(aioaicontype27);
155
+ break;
156
+ case "aioa-icon-type-28":
157
+ setIconSize(aioaicontype28);
158
+ break;
159
+ case "aioa-icon-type-29":
160
+ setIconSize(aioaicontype29);
161
+ break;
162
+ default:
163
+ setIconSize(aioaicontype1);
164
+ }
165
+ }, elementStyle = {
166
+ marginTop: "0px",
167
+ display: "flex",
168
+ justifyContent: "center",
169
+ alignItems: "center",
170
+ flexDirection: "column"
171
+ }, handleInput = (e) => {
172
+ e.target.value = Math.min(Math.max(Number(e.target.value), 0), 250).toString();
173
+ }, handleInput2 = (e) => {
174
+ e.target.value = Math.min(Math.max(Number(e.target.value), 0), 250).toString();
175
+ }, handleInput1 = (e) => {
176
+ e.target.value = Math.min(Math.max(Number(e.target.value), 20), 150).toString();
177
+ };
178
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
179
+ /* @__PURE__ */ jsx("meta", { charSet: "utf-8" }),
180
+ /* @__PURE__ */ jsx("meta", { name: "viewport", content: "width=device-width, initial-scale=1" }),
181
+ /* @__PURE__ */ jsx("title", { children: "All In One Accessibility Sanity" }),
182
+ /* @__PURE__ */ jsx("meta", { name: "description", content: "Sanity App" }),
183
+ /* @__PURE__ */ jsx(
184
+ "link",
185
+ {
186
+ rel: "stylesheet",
187
+ type: "text/css",
188
+ href: "https://sanity.skynettechnologies.us/assets/css/style.css"
189
+ }
190
+ ),
191
+ /* @__PURE__ */ jsx("div", { style: elementStyle, children: /* @__PURE__ */ jsx("div", { className: "all-in-one-accessibility-strapi-container", children: /* @__PURE__ */ jsx("div", { className: "container", children: /* @__PURE__ */ jsx("div", { className: "set-width", children: /* @__PURE__ */ jsx("div", { className: "all-in-one-accessibility-wrap", children: /* @__PURE__ */ jsxs("div", { className: "accessibility-settings", children: [
192
+ /* @__PURE__ */ jsx(
193
+ Image,
194
+ {
195
+ src: allinoneaccessibilitylogo,
196
+ alt: "All in One Accessibility - Skynet Technologies",
197
+ style: {
198
+ display: "block",
199
+ justifyContent: "center",
200
+ alignItems: "center",
201
+ textAlign: "center",
202
+ marginLeft: "auto",
203
+ marginRight: "auto",
204
+ width: "50%"
205
+ }
206
+ }
207
+ ),
208
+ /* @__PURE__ */ jsx("h3", { children: /* @__PURE__ */ jsx("b", {}) }),
209
+ /* @__PURE__ */ jsx("div", { className: "all-one-accessibility-form", children: /* @__PURE__ */ jsxs(Form, { onSubmit: onSaveChanges, children: [
210
+ !isValid && // Conditionally render the view based on API data
211
+ /* @__PURE__ */ jsx(Form.Group, { className: "mb-30 row", children: /* @__PURE__ */ jsx(Form.Label, { className: "col-sm-12 col-form-label", children: /* @__PURE__ */ jsxs(
212
+ "div",
213
+ {
214
+ className: `form-text col-sm-12 col-form-label ${isValid ? "d-none" : ""}`,
215
+ style: {
216
+ display: "flex",
217
+ justifyContent: "center",
218
+ alignItems: "center",
219
+ textAlign: "center"
220
+ },
221
+ children: [
222
+ "Please",
223
+ " ",
224
+ /* @__PURE__ */ jsx(
225
+ "a",
226
+ {
227
+ href: "https://ada.skynettechnologies.us/trial-subscription",
228
+ target: "_blank",
229
+ rel: "noopener noreferrer",
230
+ children: "\xA0Upgrade\xA0"
231
+ }
232
+ ),
233
+ " ",
234
+ "to the full version of All in One Accessibility Pro."
235
+ ]
236
+ }
237
+ ) }) }),
238
+ /* @__PURE__ */ jsxs(Form.Group, { className: "mb-30 row", children: [
239
+ /* @__PURE__ */ jsx(Form.Label, { htmlFor: "inputPassword", className: "col-sm-3 col-form-label", children: "Hex color code:" }),
240
+ /* @__PURE__ */ jsx("div", { className: "col-sm-9", children: /* @__PURE__ */ jsx(
241
+ Form.Control,
242
+ {
243
+ value: parameters.hexaColor,
244
+ className: "form-control",
245
+ id: "colorcode",
246
+ name: "colorcode",
247
+ onChange: (e) => setParameters({
248
+ ...parameters,
249
+ hexaColor: e.target.value
250
+ })
251
+ }
252
+ ) }),
253
+ /* @__PURE__ */ jsx("div", { className: "col-sm-3" }),
254
+ /* @__PURE__ */ jsx("div", { className: "form-text col-sm-9", children: "You can customize the ADA Widget color. For example: FF5733" })
255
+ ] }),
256
+ /* @__PURE__ */ jsxs(Form.Group, { className: "mb-30 row", children: [
257
+ /* @__PURE__ */ jsx(Form.Label, { className: "col-sm-12 col-form-label", children: "Select Widget Size:" }),
258
+ /* @__PURE__ */ jsxs("div", { className: "col-sm-12 three-col", children: [
259
+ /* @__PURE__ */ jsx("div", { className: "js-form-item form-item js-form-type-radio form-type-radio js-form-item-position form-item-position", children: /* @__PURE__ */ jsx(
260
+ Form.Check,
261
+ {
262
+ type: "radio",
263
+ id: "edit-widget-size-regularsize",
264
+ label: "Regular Size",
265
+ name: "widget_size",
266
+ value: "0",
267
+ onChange: (e) => setParameters({
268
+ ...parameters,
269
+ widget_size: e.target.value
270
+ }),
271
+ checked: parameters.widget_size == "0",
272
+ className: "form-radio"
273
+ }
274
+ ) }),
275
+ /* @__PURE__ */ jsx("div", { className: "js-form-item form-item js-form-type-radio form-type-radio js-form-item-position form-item-position", children: /* @__PURE__ */ jsx(
276
+ Form.Check,
277
+ {
278
+ type: "radio",
279
+ id: "edit-widget-size-oversize",
280
+ label: "Over Size",
281
+ name: "widget_size",
282
+ value: "1",
283
+ onChange: (e) => setParameters({
284
+ ...parameters,
285
+ widget_size: e.target.value
286
+ }),
287
+ checked: parameters.widget_size == "1",
288
+ className: "form-radio"
289
+ }
290
+ ) })
291
+ ] })
292
+ ] }),
293
+ /* @__PURE__ */ jsx(Form.Group, { className: "mb-30 row", children: /* @__PURE__ */ jsx("div", { className: "icon-custom-position-wrapper mb-3", children: /* @__PURE__ */ jsxs("div", { className: "mb-2", children: [
294
+ /* @__PURE__ */ jsxs(Row, { className: "align-items-center mb-30", children: [
295
+ /* @__PURE__ */ jsx(Col, { children: /* @__PURE__ */ jsx(Form.Label, { className: "col-sm-12 col-form-label", children: "Enable precise accessibility widget icon position:" }) }),
296
+ /* @__PURE__ */ jsx(Col, { xs: "auto", children: /* @__PURE__ */ jsx(
297
+ Form.Check,
298
+ {
299
+ type: "switch",
300
+ id: "custom-position-switcher",
301
+ className: "custom-switcher",
302
+ checked: isSwitcherEnabled,
303
+ onChange: () => setSwitcherEnabled(!isSwitcherEnabled),
304
+ style: {
305
+ transform: "scale(1.5)"
306
+ // Increase the switch size
307
+ }
308
+ }
309
+ ) })
310
+ ] }),
311
+ !isSwitcherEnabled && /* @__PURE__ */ jsxs(Form.Group, { className: "mb-30 row widget-position", children: [
312
+ /* @__PURE__ */ jsx(Form.Label, { className: "col-sm-12 col-form-label", children: "Where would you like to place the accessibility icon on your site?:" }),
313
+ /* @__PURE__ */ jsxs("div", { className: "col-sm-12 three-col", children: [
314
+ /* @__PURE__ */ jsx("div", { className: "js-form-item form-item js-form-type-radio form-type-radio js-form-item-position form-item-position", children: /* @__PURE__ */ jsx(
315
+ Form.Check,
316
+ {
317
+ type: "radio",
318
+ id: "edit-position-top-left",
319
+ label: "Top left",
320
+ name: "position",
321
+ value: "top_left",
322
+ onChange: (e) => setParameters({
323
+ ...parameters,
324
+ position: e.target.value
325
+ }),
326
+ checked: parameters.position == "top_left",
327
+ className: "form-radio"
328
+ }
329
+ ) }),
330
+ /* @__PURE__ */ jsx("div", { className: "js-form-item form-item js-form-type-radio form-type-radio js-form-item-position form-item-position", children: /* @__PURE__ */ jsx(
331
+ Form.Check,
332
+ {
333
+ type: "radio",
334
+ id: "edit-position-top-center",
335
+ label: "Top Center",
336
+ name: "position",
337
+ value: "top_center",
338
+ onChange: (e) => setParameters({
339
+ ...parameters,
340
+ position: e.target.value
341
+ }),
342
+ checked: parameters.position == "top_center",
343
+ className: "form-radio"
344
+ }
345
+ ) }),
346
+ /* @__PURE__ */ jsx("div", { className: "js-form-item form-item js-form-type-radio form-type-radio js-form-item-position form-item-position", children: /* @__PURE__ */ jsx(
347
+ Form.Check,
348
+ {
349
+ type: "radio",
350
+ id: "edit-position-top-right",
351
+ label: "Top Right",
352
+ name: "position",
353
+ value: "top_right",
354
+ onChange: (e) => setParameters({
355
+ ...parameters,
356
+ position: e.target.value
357
+ }),
358
+ checked: parameters.position == "top_right",
359
+ className: "form-radio"
360
+ }
361
+ ) }),
362
+ /* @__PURE__ */ jsx("div", { className: "js-form-item form-item js-form-type-radio form-type-radio js-form-item-position form-item-position", children: /* @__PURE__ */ jsx(
363
+ Form.Check,
364
+ {
365
+ type: "radio",
366
+ id: "edit-position-middel-left",
367
+ label: "Middle left",
368
+ name: "position",
369
+ value: "middle_left",
370
+ onChange: (e) => setParameters({
371
+ ...parameters,
372
+ position: e.target.value
373
+ }),
374
+ checked: parameters.position == "middle_left",
375
+ className: "form-radio"
376
+ }
377
+ ) }),
378
+ /* @__PURE__ */ jsx("div", { className: "js-form-item form-item js-form-type-radio form-type-radio js-form-item-position form-item-position", children: /* @__PURE__ */ jsx(
379
+ Form.Check,
380
+ {
381
+ type: "radio",
382
+ id: "edit-position-middel-right",
383
+ label: "Middle Right",
384
+ name: "position",
385
+ value: "middle_right",
386
+ onChange: (e) => setParameters({
387
+ ...parameters,
388
+ position: e.target.value
389
+ }),
390
+ checked: parameters.position == "middle_right",
391
+ className: "form-radio"
392
+ }
393
+ ) }),
394
+ /* @__PURE__ */ jsx("div", { className: "js-form-item form-item js-form-type-radio form-type-radio js-form-item-position form-item-position", children: /* @__PURE__ */ jsx(
395
+ Form.Check,
396
+ {
397
+ type: "radio",
398
+ id: "edit-position-bottom-left",
399
+ label: "Bottom left",
400
+ name: "position",
401
+ value: "bottom_left",
402
+ onChange: (e) => setParameters({
403
+ ...parameters,
404
+ position: e.target.value
405
+ }),
406
+ checked: parameters.position == "bottom_left",
407
+ className: "form-radio"
408
+ }
409
+ ) }),
410
+ /* @__PURE__ */ jsx("div", { className: "js-form-item form-item js-form-type-radio form-type-radio js-form-item-position form-item-position", children: /* @__PURE__ */ jsx(
411
+ Form.Check,
412
+ {
413
+ type: "radio",
414
+ id: "edit-position-bottom-center",
415
+ label: "Bottom Center",
416
+ name: "position",
417
+ value: "bottom_center",
418
+ onChange: (e) => setParameters({
419
+ ...parameters,
420
+ position: e.target.value
421
+ }),
422
+ checked: parameters.position == "bottom_center",
423
+ className: "form-radio"
424
+ }
425
+ ) }),
426
+ /* @__PURE__ */ jsx("div", { className: "js-form-item form-item js-form-type-radio form-type-radio js-form-item-position form-item-position", children: /* @__PURE__ */ jsx(
427
+ Form.Check,
428
+ {
429
+ type: "radio",
430
+ id: "edit-position-bottom-right",
431
+ label: "Bottom Right",
432
+ name: "position",
433
+ value: "bottom_right",
434
+ onChange: (e) => setParameters({
435
+ ...parameters,
436
+ position: e.target.value
437
+ }),
438
+ checked: parameters.position == "bottom_right",
439
+ className: "form-radio"
440
+ }
441
+ ) })
442
+ ] })
443
+ ] }),
444
+ isSwitcherEnabled && /* @__PURE__ */ jsxs("div", { className: "custom-position-controls", children: [
445
+ /* @__PURE__ */ jsxs(Row, { className: "mb-3", children: [
446
+ /* @__PURE__ */ jsx(Col, { xs: "auto", children: /* @__PURE__ */ jsxs(InputGroup, { children: [
447
+ /* @__PURE__ */ jsx(
448
+ FormControl,
449
+ {
450
+ type: "number",
451
+ min: "0",
452
+ max: "250",
453
+ id: "custom_position_x_value",
454
+ "aria-label": "Value in pixels",
455
+ onInput: handleInput,
456
+ defaultValue: widgetSettings.custom_position_x_value
457
+ }
458
+ ),
459
+ /* @__PURE__ */ jsx(InputGroup.Text, { children: "PX" })
460
+ ] }) }),
461
+ /* @__PURE__ */ jsx(Col, { xs: "auto", children: /* @__PURE__ */ jsxs(
462
+ Form.Select,
463
+ {
464
+ id: "custom_position_left_right",
465
+ "aria-label": "Position select",
466
+ value: widgetSettings.custom_position_left_right,
467
+ children: [
468
+ /* @__PURE__ */ jsx("option", { value: "cust-pos-to-the-right", children: "To the right" }),
469
+ /* @__PURE__ */ jsx("option", { value: "cust-pos-to-the-left", children: "To the left" })
470
+ ]
471
+ }
472
+ ) })
473
+ ] }),
474
+ /* @__PURE__ */ jsxs(Row, { className: "mb-3", children: [
475
+ /* @__PURE__ */ jsx(Col, { xs: "auto", children: /* @__PURE__ */ jsxs(InputGroup, { children: [
476
+ /* @__PURE__ */ jsx(
477
+ FormControl,
478
+ {
479
+ type: "number",
480
+ min: "0",
481
+ max: "250",
482
+ id: "custom_position_y_value",
483
+ "aria-label": "Value in pixels",
484
+ onInput: handleInput2,
485
+ defaultValue: widgetSettings.custom_position_y_value
486
+ }
487
+ ),
488
+ /* @__PURE__ */ jsx(InputGroup.Text, { children: "PX" })
489
+ ] }) }),
490
+ /* @__PURE__ */ jsx(Col, { xs: "auto", children: /* @__PURE__ */ jsxs(
491
+ Form.Select,
492
+ {
493
+ id: "custom_position_top_bottom",
494
+ "aria-label": "Position select",
495
+ value: widgetSettings.custom_position_top_bottom,
496
+ children: [
497
+ /* @__PURE__ */ jsx("option", { value: "cust-pos-to-the-lower", children: "To the bottom" }),
498
+ /* @__PURE__ */ jsx("option", { value: "cust-pos-to-the-upper", children: "To the top" })
499
+ ]
500
+ }
501
+ ) })
502
+ ] }),
503
+ /* @__PURE__ */ jsx("div", { className: "description", children: "0 - 250px are permitted values" })
504
+ ] })
505
+ ] }) }) }),
506
+ /* @__PURE__ */ jsxs(Form.Group, { className: `icon-type-wrapper row ${isValid ? null : "d-none"}`, children: [
507
+ /* @__PURE__ */ jsx(Form.Label, { className: "fcol-sm-12 col-form-label", children: "Select icon type:" }),
508
+ /* @__PURE__ */ jsx("div", { className: "col-sm-12", children: /* @__PURE__ */ jsxs("div", { className: "row", children: [
509
+ /* @__PURE__ */ jsx("div", { className: "col-auto mb-30", children: /* @__PURE__ */ jsx("div", { className: "js-form-item form-item js-form-type-radio form-type-radio js-form-item-position form-item-position", children: /* @__PURE__ */ jsxs(Form.Check, { type: "radio", id: "edit-type-1", children: [
510
+ /* @__PURE__ */ jsx(
511
+ Form.Check.Input,
512
+ {
513
+ type: "radio",
514
+ name: "aioa_icon_type",
515
+ value: "aioa-icon-type-1",
516
+ onChange: onIconChange,
517
+ checked: parameters.icontype == "aioa-icon-type-1",
518
+ className: "form-radio"
519
+ }
520
+ ),
521
+ /* @__PURE__ */ jsx(Form.Check.Label, { className: "option", children: /* @__PURE__ */ jsx(Image, { src: aioaicontype1, alt: "", width: "65", height: "65" }) })
522
+ ] }) }) }),
523
+ /* @__PURE__ */ jsx("div", { className: "col-auto mb-30", children: /* @__PURE__ */ jsx("div", { className: "js-form-item form-item js-form-type-radio form-type-radio js-form-item-position form-item-position", children: /* @__PURE__ */ jsxs(Form.Check, { type: "radio", id: "edit-type-2", children: [
524
+ /* @__PURE__ */ jsx(
525
+ Form.Check.Input,
526
+ {
527
+ type: "radio",
528
+ name: "aioa_icon_type",
529
+ value: "aioa-icon-type-2",
530
+ onChange: onIconChange,
531
+ checked: parameters.icontype == "aioa-icon-type-2",
532
+ className: "form-radio"
533
+ }
534
+ ),
535
+ /* @__PURE__ */ jsx(Form.Check.Label, { className: "option", children: /* @__PURE__ */ jsx(Image, { src: aioaicontype2, alt: "", width: "65", height: "65" }) })
536
+ ] }) }) }),
537
+ /* @__PURE__ */ jsx("div", { className: "col-auto mb-30", children: /* @__PURE__ */ jsx("div", { className: "js-form-item form-item js-form-type-radio form-type-radio js-form-item-position form-item-position", children: /* @__PURE__ */ jsxs(Form.Check, { type: "radio", id: "edit-type-3", children: [
538
+ /* @__PURE__ */ jsx(
539
+ Form.Check.Input,
540
+ {
541
+ type: "radio",
542
+ name: "aioa_icon_type",
543
+ value: "aioa-icon-type-3",
544
+ onChange: onIconChange,
545
+ checked: parameters.icontype == "aioa-icon-type-3",
546
+ className: "form-radio"
547
+ }
548
+ ),
549
+ /* @__PURE__ */ jsx(Form.Check.Label, { className: "option", children: /* @__PURE__ */ jsx(Image, { src: aioaicontype3, alt: "", width: "65", height: "65" }) })
550
+ ] }) }) }),
551
+ /* @__PURE__ */ jsx("div", { className: "col-auto mb-30", children: /* @__PURE__ */ jsx("div", { className: "js-form-item form-item js-form-type-radio form-type-radio js-form-item-position form-item-position", children: /* @__PURE__ */ jsxs(Form.Check, { type: "radio", id: "edit-type-4", children: [
552
+ /* @__PURE__ */ jsx(
553
+ Form.Check.Input,
554
+ {
555
+ type: "radio",
556
+ name: "aioa_icon_type",
557
+ value: "aioa-icon-type-4",
558
+ onChange: onIconChange,
559
+ checked: parameters.icontype == "aioa-icon-type-4",
560
+ className: "form-radio"
561
+ }
562
+ ),
563
+ /* @__PURE__ */ jsx(Form.Check.Label, { className: "option", children: /* @__PURE__ */ jsx(Image, { src: aioaicontype4, alt: "", width: "65", height: "65" }) })
564
+ ] }) }) }),
565
+ /* @__PURE__ */ jsx("div", { className: "col-auto mb-30", children: /* @__PURE__ */ jsx("div", { className: "js-form-item form-item js-form-type-radio form-type-radio js-form-item-position form-item-position", children: /* @__PURE__ */ jsxs(Form.Check, { type: "radio", id: "edit-type-5", children: [
566
+ /* @__PURE__ */ jsx(
567
+ Form.Check.Input,
568
+ {
569
+ type: "radio",
570
+ name: "aioa_icon_type",
571
+ value: "aioa-icon-type-5",
572
+ onChange: onIconChange,
573
+ checked: parameters.icontype == "aioa-icon-type-5",
574
+ className: "form-radio"
575
+ }
576
+ ),
577
+ /* @__PURE__ */ jsx(Form.Check.Label, { className: "option", children: /* @__PURE__ */ jsx(Image, { src: aioaicontype5, alt: "", width: "65", height: "65" }) })
578
+ ] }) }) }),
579
+ /* @__PURE__ */ jsx("div", { className: "col-auto mb-30", children: /* @__PURE__ */ jsx("div", { className: "js-form-item form-item js-form-type-radio form-type-radio js-form-item-position form-item-position", children: /* @__PURE__ */ jsxs(Form.Check, { type: "radio", id: "edit-type-6", children: [
580
+ /* @__PURE__ */ jsx(
581
+ Form.Check.Input,
582
+ {
583
+ type: "radio",
584
+ name: "aioa_icon_type",
585
+ value: "aioa-icon-type-6",
586
+ onChange: onIconChange,
587
+ checked: parameters.icontype == "aioa-icon-type-6",
588
+ className: "form-radio"
589
+ }
590
+ ),
591
+ /* @__PURE__ */ jsx(Form.Check.Label, { className: "option", children: /* @__PURE__ */ jsx(Image, { src: aioaicontype6, alt: "", width: "65", height: "65" }) })
592
+ ] }) }) }),
593
+ /* @__PURE__ */ jsx("div", { className: "col-auto mb-30", children: /* @__PURE__ */ jsx("div", { className: "js-form-item form-item js-form-type-radio form-type-radio js-form-item-position form-item-position", children: /* @__PURE__ */ jsxs(Form.Check, { type: "radio", id: "edit-type-7", children: [
594
+ /* @__PURE__ */ jsx(
595
+ Form.Check.Input,
596
+ {
597
+ type: "radio",
598
+ name: "aioa_icon_type",
599
+ value: "aioa-icon-type-7",
600
+ onChange: onIconChange,
601
+ checked: parameters.icontype == "aioa-icon-type-7",
602
+ className: "form-radio"
603
+ }
604
+ ),
605
+ /* @__PURE__ */ jsx(Form.Check.Label, { className: "option", children: /* @__PURE__ */ jsx(Image, { src: aioaicontype7, alt: "", width: "65", height: "65" }) })
606
+ ] }) }) }),
607
+ /* @__PURE__ */ jsx("div", { className: "col-auto mb-30", children: /* @__PURE__ */ jsx("div", { className: "js-form-item form-item js-form-type-radio form-type-radio js-form-item-position form-item-position", children: /* @__PURE__ */ jsxs(Form.Check, { type: "radio", id: "edit-type-8", children: [
608
+ /* @__PURE__ */ jsx(
609
+ Form.Check.Input,
610
+ {
611
+ type: "radio",
612
+ name: "aioa_icon_type",
613
+ value: "aioa-icon-type-8",
614
+ onChange: onIconChange,
615
+ checked: parameters.icontype == "aioa-icon-type-8",
616
+ className: "form-radio"
617
+ }
618
+ ),
619
+ /* @__PURE__ */ jsx(Form.Check.Label, { className: "option", children: /* @__PURE__ */ jsx(Image, { src: aioaicontype8, alt: "", width: "65", height: "65" }) })
620
+ ] }) }) }),
621
+ /* @__PURE__ */ jsx("div", { className: "col-auto mb-30", children: /* @__PURE__ */ jsx("div", { className: "js-form-item form-item js-form-type-radio form-type-radio js-form-item-position form-item-position", children: /* @__PURE__ */ jsxs(Form.Check, { type: "radio", id: "edit-type-9", children: [
622
+ /* @__PURE__ */ jsx(
623
+ Form.Check.Input,
624
+ {
625
+ type: "radio",
626
+ name: "aioa_icon_type",
627
+ value: "aioa-icon-type-9",
628
+ onChange: onIconChange,
629
+ checked: parameters.icontype == "aioa-icon-type-9",
630
+ className: "form-radio"
631
+ }
632
+ ),
633
+ /* @__PURE__ */ jsx(Form.Check.Label, { className: "option", children: /* @__PURE__ */ jsx(Image, { src: aioaicontype9, alt: "", width: "65", height: "65" }) })
634
+ ] }) }) }),
635
+ /* @__PURE__ */ jsx("div", { className: "col-auto mb-30", children: /* @__PURE__ */ jsx("div", { className: "js-form-item form-item js-form-type-radio form-type-radio js-form-item-position form-item-position", children: /* @__PURE__ */ jsxs(Form.Check, { type: "radio", id: "edit-type-10", children: [
636
+ /* @__PURE__ */ jsx(
637
+ Form.Check.Input,
638
+ {
639
+ type: "radio",
640
+ name: "aioa_icon_type",
641
+ value: "aioa-icon-type-10",
642
+ onChange: onIconChange,
643
+ checked: parameters.icontype == "aioa-icon-type-10",
644
+ className: "form-radio"
645
+ }
646
+ ),
647
+ /* @__PURE__ */ jsx(Form.Check.Label, { className: "option", children: /* @__PURE__ */ jsx(Image, { src: aioaicontype10, alt: "", width: "65", height: "65" }) })
648
+ ] }) }) }),
649
+ /* @__PURE__ */ jsx("div", { className: "col-auto mb-30", children: /* @__PURE__ */ jsx("div", { className: "js-form-item form-item js-form-type-radio form-type-radio js-form-item-position form-item-position", children: /* @__PURE__ */ jsxs(Form.Check, { type: "radio", id: "edit-type-11", children: [
650
+ /* @__PURE__ */ jsx(
651
+ Form.Check.Input,
652
+ {
653
+ type: "radio",
654
+ name: "aioa_icon_type",
655
+ value: "aioa-icon-type-11",
656
+ onChange: onIconChange,
657
+ checked: parameters.icontype == "aioa-icon-type-11",
658
+ className: "form-radio"
659
+ }
660
+ ),
661
+ /* @__PURE__ */ jsx(Form.Check.Label, { className: "option", children: /* @__PURE__ */ jsx(Image, { src: aioaicontype11, alt: "", width: "65", height: "65" }) })
662
+ ] }) }) }),
663
+ /* @__PURE__ */ jsx("div", { className: "col-auto mb-30", children: /* @__PURE__ */ jsx("div", { className: "js-form-item form-item js-form-type-radio form-type-radio js-form-item-position form-item-position", children: /* @__PURE__ */ jsxs(Form.Check, { type: "radio", id: "edit-type-12", children: [
664
+ /* @__PURE__ */ jsx(
665
+ Form.Check.Input,
666
+ {
667
+ type: "radio",
668
+ name: "aioa_icon_type",
669
+ value: "aioa-icon-type-12",
670
+ onChange: onIconChange,
671
+ checked: parameters.icontype == "aioa-icon-type-12",
672
+ className: "form-radio"
673
+ }
674
+ ),
675
+ /* @__PURE__ */ jsx(Form.Check.Label, { className: "option", children: /* @__PURE__ */ jsx(Image, { src: aioaicontype12, alt: "", width: "65", height: "65" }) })
676
+ ] }) }) }),
677
+ /* @__PURE__ */ jsx("div", { className: "col-auto mb-30", children: /* @__PURE__ */ jsx("div", { className: "js-form-item form-item js-form-type-radio form-type-radio js-form-item-position form-item-position", children: /* @__PURE__ */ jsxs(Form.Check, { type: "radio", id: "edit-type-13", children: [
678
+ /* @__PURE__ */ jsx(
679
+ Form.Check.Input,
680
+ {
681
+ type: "radio",
682
+ name: "aioa_icon_type",
683
+ value: "aioa-icon-type-13",
684
+ onChange: onIconChange,
685
+ checked: parameters.icontype == "aioa-icon-type-13",
686
+ className: "form-radio"
687
+ }
688
+ ),
689
+ /* @__PURE__ */ jsx(Form.Check.Label, { className: "option", children: /* @__PURE__ */ jsx(Image, { src: aioaicontype13, alt: "", width: "65", height: "65" }) })
690
+ ] }) }) }),
691
+ /* @__PURE__ */ jsx("div", { className: "col-auto mb-30", children: /* @__PURE__ */ jsx("div", { className: "js-form-item form-item js-form-type-radio form-type-radio js-form-item-position form-item-position", children: /* @__PURE__ */ jsxs(Form.Check, { type: "radio", id: "edit-type-14", children: [
692
+ /* @__PURE__ */ jsx(
693
+ Form.Check.Input,
694
+ {
695
+ type: "radio",
696
+ name: "aioa_icon_type",
697
+ value: "aioa-icon-type-14",
698
+ onChange: onIconChange,
699
+ checked: parameters.icontype == "aioa-icon-type-14",
700
+ className: "form-radio"
701
+ }
702
+ ),
703
+ /* @__PURE__ */ jsx(Form.Check.Label, { className: "option", children: /* @__PURE__ */ jsx(Image, { src: aioaicontype14, alt: "", width: "65", height: "65" }) })
704
+ ] }) }) }),
705
+ /* @__PURE__ */ jsx("div", { className: "col-auto mb-30", children: /* @__PURE__ */ jsx("div", { className: "js-form-item form-item js-form-type-radio form-type-radio js-form-item-position form-item-position", children: /* @__PURE__ */ jsxs(Form.Check, { type: "radio", id: "edit-type-15", children: [
706
+ /* @__PURE__ */ jsx(
707
+ Form.Check.Input,
708
+ {
709
+ type: "radio",
710
+ name: "aioa_icon_type",
711
+ value: "aioa-icon-type-15",
712
+ onChange: onIconChange,
713
+ checked: parameters.icontype == "aioa-icon-type-15",
714
+ className: "form-radio"
715
+ }
716
+ ),
717
+ /* @__PURE__ */ jsx(Form.Check.Label, { className: "option", children: /* @__PURE__ */ jsx(Image, { src: aioaicontype15, alt: "", width: "65", height: "65" }) })
718
+ ] }) }) }),
719
+ /* @__PURE__ */ jsx("div", { className: "col-auto mb-30", children: /* @__PURE__ */ jsx("div", { className: "js-form-item form-item js-form-type-radio form-type-radio js-form-item-position form-item-position", children: /* @__PURE__ */ jsxs(Form.Check, { type: "radio", id: "edit-type-16", children: [
720
+ /* @__PURE__ */ jsx(
721
+ Form.Check.Input,
722
+ {
723
+ type: "radio",
724
+ name: "aioa_icon_type",
725
+ value: "aioa-icon-type-16",
726
+ onChange: onIconChange,
727
+ checked: parameters.icontype == "aioa-icon-type-16",
728
+ className: "form-radio"
729
+ }
730
+ ),
731
+ /* @__PURE__ */ jsx(Form.Check.Label, { className: "option", children: /* @__PURE__ */ jsx(Image, { src: aioaicontype16, alt: "", width: "65", height: "65" }) })
732
+ ] }) }) }),
733
+ /* @__PURE__ */ jsx("div", { className: "col-auto mb-30", children: /* @__PURE__ */ jsx("div", { className: "js-form-item form-item js-form-type-radio form-type-radio js-form-item-position form-item-position", children: /* @__PURE__ */ jsxs(Form.Check, { type: "radio", id: "edit-type-17", children: [
734
+ /* @__PURE__ */ jsx(
735
+ Form.Check.Input,
736
+ {
737
+ type: "radio",
738
+ name: "aioa_icon_type",
739
+ value: "aioa-icon-type-17",
740
+ onChange: onIconChange,
741
+ checked: parameters.icontype == "aioa-icon-type-17",
742
+ className: "form-radio"
743
+ }
744
+ ),
745
+ /* @__PURE__ */ jsx(Form.Check.Label, { className: "option", children: /* @__PURE__ */ jsx(Image, { src: aioaicontype17, alt: "", width: "65", height: "65" }) })
746
+ ] }) }) }),
747
+ /* @__PURE__ */ jsx("div", { className: "col-auto mb-30", children: /* @__PURE__ */ jsx("div", { className: "js-form-item form-item js-form-type-radio form-type-radio js-form-item-position form-item-position", children: /* @__PURE__ */ jsxs(Form.Check, { type: "radio", id: "edit-type-18", children: [
748
+ /* @__PURE__ */ jsx(
749
+ Form.Check.Input,
750
+ {
751
+ type: "radio",
752
+ name: "aioa_icon_type",
753
+ value: "aioa-icon-type-18",
754
+ onChange: onIconChange,
755
+ checked: parameters.icontype == "aioa-icon-type-18",
756
+ className: "form-radio"
757
+ }
758
+ ),
759
+ /* @__PURE__ */ jsx(Form.Check.Label, { className: "option", children: /* @__PURE__ */ jsx(Image, { src: aioaicontype18, alt: "", width: "65", height: "65" }) })
760
+ ] }) }) }),
761
+ /* @__PURE__ */ jsx("div", { className: "col-auto mb-30", children: /* @__PURE__ */ jsx("div", { className: "js-form-item form-item js-form-type-radio form-type-radio js-form-item-position form-item-position", children: /* @__PURE__ */ jsxs(Form.Check, { type: "radio", id: "edit-type-19", children: [
762
+ /* @__PURE__ */ jsx(
763
+ Form.Check.Input,
764
+ {
765
+ type: "radio",
766
+ name: "aioa_icon_type",
767
+ value: "aioa-icon-type-19",
768
+ onChange: onIconChange,
769
+ checked: parameters.icontype == "aioa-icon-type-19",
770
+ className: "form-radio"
771
+ }
772
+ ),
773
+ /* @__PURE__ */ jsx(Form.Check.Label, { className: "option", children: /* @__PURE__ */ jsx(Image, { src: aioaicontype19, alt: "", width: "65", height: "65" }) })
774
+ ] }) }) }),
775
+ /* @__PURE__ */ jsx("div", { className: "col-auto mb-30", children: /* @__PURE__ */ jsx("div", { className: "js-form-item form-item js-form-type-radio form-type-radio js-form-item-position form-item-position", children: /* @__PURE__ */ jsxs(Form.Check, { type: "radio", id: "edit-type-20", children: [
776
+ /* @__PURE__ */ jsx(
777
+ Form.Check.Input,
778
+ {
779
+ type: "radio",
780
+ name: "aioa_icon_type",
781
+ value: "aioa-icon-type-20",
782
+ onChange: onIconChange,
783
+ checked: parameters.icontype == "aioa-icon-type-20",
784
+ className: "form-radio"
785
+ }
786
+ ),
787
+ /* @__PURE__ */ jsx(Form.Check.Label, { className: "option", children: /* @__PURE__ */ jsx(Image, { src: aioaicontype20, alt: "", width: "65", height: "65" }) })
788
+ ] }) }) }),
789
+ /* @__PURE__ */ jsx("div", { className: "col-auto mb-30", children: /* @__PURE__ */ jsx("div", { className: "js-form-item form-item js-form-type-radio form-type-radio js-form-item-position form-item-position", children: /* @__PURE__ */ jsxs(Form.Check, { type: "radio", id: "edit-type-21", children: [
790
+ /* @__PURE__ */ jsx(
791
+ Form.Check.Input,
792
+ {
793
+ type: "radio",
794
+ name: "aioa_icon_type",
795
+ value: "aioa-icon-type-21",
796
+ onChange: onIconChange,
797
+ checked: parameters.icontype == "aioa-icon-type-21",
798
+ className: "form-radio"
799
+ }
800
+ ),
801
+ /* @__PURE__ */ jsx(Form.Check.Label, { className: "option", children: /* @__PURE__ */ jsx(Image, { src: aioaicontype21, alt: "", width: "65", height: "65" }) })
802
+ ] }) }) }),
803
+ /* @__PURE__ */ jsx("div", { className: "col-auto mb-30", children: /* @__PURE__ */ jsx("div", { className: "js-form-item form-item js-form-type-radio form-type-radio js-form-item-position form-item-position", children: /* @__PURE__ */ jsxs(Form.Check, { type: "radio", id: "edit-type-22", children: [
804
+ /* @__PURE__ */ jsx(
805
+ Form.Check.Input,
806
+ {
807
+ type: "radio",
808
+ name: "aioa_icon_type",
809
+ value: "aioa-icon-type-22",
810
+ onChange: onIconChange,
811
+ checked: parameters.icontype == "aioa-icon-type-22",
812
+ className: "form-radio"
813
+ }
814
+ ),
815
+ /* @__PURE__ */ jsx(Form.Check.Label, { className: "option", children: /* @__PURE__ */ jsx(Image, { src: aioaicontype22, alt: "", width: "65", height: "65" }) })
816
+ ] }) }) }),
817
+ /* @__PURE__ */ jsx("div", { className: "col-auto mb-30", children: /* @__PURE__ */ jsx("div", { className: "js-form-item form-item js-form-type-radio form-type-radio js-form-item-position form-item-position", children: /* @__PURE__ */ jsxs(Form.Check, { type: "radio", id: "edit-type-23", children: [
818
+ /* @__PURE__ */ jsx(
819
+ Form.Check.Input,
820
+ {
821
+ type: "radio",
822
+ name: "aioa_icon_type",
823
+ value: "aioa-icon-type-23",
824
+ onChange: onIconChange,
825
+ checked: parameters.icontype == "aioa-icon-type-23",
826
+ className: "form-radio"
827
+ }
828
+ ),
829
+ /* @__PURE__ */ jsx(Form.Check.Label, { className: "option", children: /* @__PURE__ */ jsx(Image, { src: aioaicontype23, alt: "", width: "65", height: "65" }) })
830
+ ] }) }) }),
831
+ /* @__PURE__ */ jsx("div", { className: "col-auto mb-30", children: /* @__PURE__ */ jsx("div", { className: "js-form-item form-item js-form-type-radio form-type-radio js-form-item-position form-item-position", children: /* @__PURE__ */ jsxs(Form.Check, { type: "radio", id: "edit-type-24", children: [
832
+ /* @__PURE__ */ jsx(
833
+ Form.Check.Input,
834
+ {
835
+ type: "radio",
836
+ name: "aioa_icon_type",
837
+ value: "aioa-icon-type-24",
838
+ onChange: onIconChange,
839
+ checked: parameters.icontype == "aioa-icon-type-24",
840
+ className: "form-radio"
841
+ }
842
+ ),
843
+ /* @__PURE__ */ jsx(Form.Check.Label, { className: "option", children: /* @__PURE__ */ jsx(Image, { src: aioaicontype24, alt: "", width: "65", height: "65" }) })
844
+ ] }) }) }),
845
+ /* @__PURE__ */ jsx("div", { className: "col-auto mb-30", children: /* @__PURE__ */ jsx("div", { className: "js-form-item form-item js-form-type-radio form-type-radio js-form-item-position form-item-position", children: /* @__PURE__ */ jsxs(Form.Check, { type: "radio", id: "edit-type-25", children: [
846
+ /* @__PURE__ */ jsx(
847
+ Form.Check.Input,
848
+ {
849
+ type: "radio",
850
+ name: "aioa_icon_type",
851
+ value: "aioa-icon-type-25",
852
+ onChange: onIconChange,
853
+ checked: parameters.icontype == "aioa-icon-type-25",
854
+ className: "form-radio"
855
+ }
856
+ ),
857
+ /* @__PURE__ */ jsx(Form.Check.Label, { className: "option", children: /* @__PURE__ */ jsx(Image, { src: aioaicontype25, alt: "", width: "65", height: "65" }) })
858
+ ] }) }) }),
859
+ /* @__PURE__ */ jsx("div", { className: "col-auto mb-30", children: /* @__PURE__ */ jsx("div", { className: "js-form-item form-item js-form-type-radio form-type-radio js-form-item-position form-item-position", children: /* @__PURE__ */ jsxs(Form.Check, { type: "radio", id: "edit-type-26", children: [
860
+ /* @__PURE__ */ jsx(
861
+ Form.Check.Input,
862
+ {
863
+ type: "radio",
864
+ name: "aioa_icon_type",
865
+ value: "aioa-icon-type-26",
866
+ onChange: onIconChange,
867
+ checked: parameters.icontype == "aioa-icon-type-26",
868
+ className: "form-radio"
869
+ }
870
+ ),
871
+ /* @__PURE__ */ jsx(Form.Check.Label, { className: "option", children: /* @__PURE__ */ jsx(Image, { src: aioaicontype26, alt: "", width: "65", height: "65" }) })
872
+ ] }) }) }),
873
+ /* @__PURE__ */ jsx("div", { className: "col-auto mb-30", children: /* @__PURE__ */ jsx("div", { className: "js-form-item form-item js-form-type-radio form-type-radio js-form-item-position form-item-position", children: /* @__PURE__ */ jsxs(Form.Check, { type: "radio", id: "edit-type-27", children: [
874
+ /* @__PURE__ */ jsx(
875
+ Form.Check.Input,
876
+ {
877
+ type: "radio",
878
+ name: "aioa_icon_type",
879
+ value: "aioa-icon-type-27",
880
+ onChange: onIconChange,
881
+ checked: parameters.icontype == "aioa-icon-type-27",
882
+ className: "form-radio"
883
+ }
884
+ ),
885
+ /* @__PURE__ */ jsx(Form.Check.Label, { className: "option", children: /* @__PURE__ */ jsx(Image, { src: aioaicontype27, alt: "", width: "65", height: "65" }) })
886
+ ] }) }) }),
887
+ /* @__PURE__ */ jsx("div", { className: "col-auto mb-30", children: /* @__PURE__ */ jsx("div", { className: "js-form-item form-item js-form-type-radio form-type-radio js-form-item-position form-item-position", children: /* @__PURE__ */ jsxs(Form.Check, { type: "radio", id: "edit-type-28", children: [
888
+ /* @__PURE__ */ jsx(
889
+ Form.Check.Input,
890
+ {
891
+ type: "radio",
892
+ name: "aioa_icon_type",
893
+ value: "aioa-icon-type-28",
894
+ onChange: onIconChange,
895
+ checked: parameters.icontype == "aioa-icon-type-28",
896
+ className: "form-radio"
897
+ }
898
+ ),
899
+ /* @__PURE__ */ jsx(Form.Check.Label, { className: "option", children: /* @__PURE__ */ jsx(Image, { src: aioaicontype28, alt: "", width: "65", height: "65" }) })
900
+ ] }) }) }),
901
+ /* @__PURE__ */ jsx("div", { className: "col-auto mb-30", children: /* @__PURE__ */ jsx("div", { className: "js-form-item form-item js-form-type-radio form-type-radio js-form-item-position form-item-position", children: /* @__PURE__ */ jsxs(Form.Check, { type: "radio", id: "edit-type-29", children: [
902
+ /* @__PURE__ */ jsx(
903
+ Form.Check.Input,
904
+ {
905
+ type: "radio",
906
+ name: "aioa_icon_type",
907
+ value: "aioa-icon-type-29",
908
+ onChange: onIconChange,
909
+ checked: parameters.icontype == "aioa-icon-type-29",
910
+ className: "form-radio"
911
+ }
912
+ ),
913
+ /* @__PURE__ */ jsx(Form.Check.Label, { className: "option", children: /* @__PURE__ */ jsx(Image, { src: aioaicontype29, alt: "", width: "65", height: "65" }) })
914
+ ] }) }) })
915
+ ] }) })
916
+ ] }),
917
+ /* @__PURE__ */ jsx(Form.Group, { className: "mb-30 row", children: /* @__PURE__ */ jsxs("div", { className: "icon-custom-size-wrapper mb-3", children: [
918
+ /* @__PURE__ */ jsxs(Row, { className: "align-items-center mb-30", children: [
919
+ /* @__PURE__ */ jsx(Col, { children: /* @__PURE__ */ jsx(Form.Label, { className: "col-sm-12 col-form-label", children: "Enable icon custom size:" }) }),
920
+ /* @__PURE__ */ jsx(Col, { xs: "auto", children: /* @__PURE__ */ jsx(
921
+ Form.Check,
922
+ {
923
+ type: "switch",
924
+ id: "custom-size-switcher",
925
+ className: "custom-switcher_inp_2",
926
+ checked: isSizeSwitcherEnabled,
927
+ onChange: () => setSizeSwitcherEnabled(!isSizeSwitcherEnabled),
928
+ style: {
929
+ transform: "scale(1.5)"
930
+ // Increase the switch size
931
+ }
932
+ }
933
+ ) })
934
+ ] }),
935
+ !isSizeSwitcherEnabled && /* @__PURE__ */ jsxs(
936
+ Form.Group,
937
+ {
938
+ className: `icon-size-wrapper row ${isValid ? null : "d-none"}`,
939
+ children: [
940
+ /* @__PURE__ */ jsx(Form.Label, { className: "fcol-sm-12 col-form-label", children: "Select icon size:" }),
941
+ /* @__PURE__ */ jsx("div", { className: "col-sm-12", children: /* @__PURE__ */ jsxs("div", { className: "row", children: [
942
+ /* @__PURE__ */ jsx("div", { className: "col-auto mb-30", children: /* @__PURE__ */ jsx("div", { className: "js-form-item form-item js-form-type-radio form-type-radio js-form-item-position form-item-position", children: /* @__PURE__ */ jsxs(Form.Check, { type: "radio", id: "edit-size-big", children: [
943
+ /* @__PURE__ */ jsx(
944
+ Form.Check.Input,
945
+ {
946
+ type: "radio",
947
+ name: "aioa_icon_size",
948
+ value: "aioa-big-icon",
949
+ onChange: (e) => setParameters({
950
+ ...parameters,
951
+ iconsize: e.target.value
952
+ }),
953
+ checked: parameters.iconsize == "aioa-big-icon",
954
+ className: "form-radio"
955
+ }
956
+ ),
957
+ /* @__PURE__ */ jsx(Form.Check.Label, { className: "option", children: /* @__PURE__ */ jsx(Image, { src: iconsize, alt: "", width: "75", height: "75" }) })
958
+ ] }) }) }),
959
+ /* @__PURE__ */ jsx("div", { className: "col-auto mb-30", children: /* @__PURE__ */ jsx("div", { className: "js-form-item form-item js-form-type-radio form-type-radio js-form-item-position form-item-position", children: /* @__PURE__ */ jsxs(Form.Check, { type: "radio", id: "edit-size-medium", children: [
960
+ /* @__PURE__ */ jsx(
961
+ Form.Check.Input,
962
+ {
963
+ type: "radio",
964
+ name: "aioa_icon_size",
965
+ value: "aioa-medium-icon",
966
+ onChange: (e) => setParameters({
967
+ ...parameters,
968
+ iconsize: e.target.value
969
+ }),
970
+ checked: parameters.iconsize == "aioa-medium-icon",
971
+ className: "form-radio"
972
+ }
973
+ ),
974
+ /* @__PURE__ */ jsx(Form.Check.Label, { className: "option", children: /* @__PURE__ */ jsx(Image, { src: iconsize, alt: "", width: "65", height: "65" }) })
975
+ ] }) }) }),
976
+ /* @__PURE__ */ jsx("div", { className: "col-auto mb-30", children: /* @__PURE__ */ jsx("div", { className: "js-form-item form-item js-form-type-radio form-type-radio js-form-item-position form-item-position", children: /* @__PURE__ */ jsxs(Form.Check, { type: "radio", id: "edit-size-default", children: [
977
+ /* @__PURE__ */ jsx(
978
+ Form.Check.Input,
979
+ {
980
+ type: "radio",
981
+ name: "aioa_icon_size",
982
+ value: "aioa-default-icon",
983
+ onChange: (e) => setParameters({
984
+ ...parameters,
985
+ iconsize: e.target.value
986
+ }),
987
+ checked: parameters.iconsize == "aioa-default-icon",
988
+ className: "form-radio"
989
+ }
990
+ ),
991
+ /* @__PURE__ */ jsx(Form.Check.Label, { className: "option", children: /* @__PURE__ */ jsx(Image, { src: iconsize, alt: "", width: "55", height: "55" }) })
992
+ ] }) }) }),
993
+ /* @__PURE__ */ jsx("div", { className: "col-auto mb-30", children: /* @__PURE__ */ jsx("div", { className: "js-form-item form-item js-form-type-radio form-type-radio js-form-item-position form-item-position", children: /* @__PURE__ */ jsxs(Form.Check, { type: "radio", id: "edit-size-small", children: [
994
+ /* @__PURE__ */ jsx(
995
+ Form.Check.Input,
996
+ {
997
+ type: "radio",
998
+ name: "aioa_icon_size",
999
+ value: "aioa-small-icon",
1000
+ onChange: (e) => setParameters({
1001
+ ...parameters,
1002
+ iconsize: e.target.value
1003
+ }),
1004
+ checked: parameters.iconsize == "aioa-small-icon",
1005
+ className: "form-radio"
1006
+ }
1007
+ ),
1008
+ /* @__PURE__ */ jsx(Form.Check.Label, { className: "option", children: /* @__PURE__ */ jsx(Image, { src: iconsize, alt: "", width: "45", height: "45" }) })
1009
+ ] }) }) }),
1010
+ /* @__PURE__ */ jsx("div", { className: "col-auto mb-30", children: /* @__PURE__ */ jsx("div", { className: "js-form-item form-item js-form-type-radio form-type-radio js-form-item-position form-item-position", children: /* @__PURE__ */ jsxs(Form.Check, { type: "radio", id: "edit-size-extra-small", children: [
1011
+ /* @__PURE__ */ jsx(
1012
+ Form.Check.Input,
1013
+ {
1014
+ type: "radio",
1015
+ name: "aioa_icon_size",
1016
+ value: "aioa-extra-small-icon",
1017
+ onChange: (e) => setParameters({
1018
+ ...parameters,
1019
+ iconsize: e.target.value
1020
+ }),
1021
+ checked: parameters.iconsize == "aioa-extra-small-icon",
1022
+ className: "form-radio"
1023
+ }
1024
+ ),
1025
+ /* @__PURE__ */ jsx(Form.Check.Label, { className: "option", children: /* @__PURE__ */ jsx(Image, { src: iconsize, alt: "", width: "35", height: "35" }) })
1026
+ ] }) }) })
1027
+ ] }) })
1028
+ ]
1029
+ }
1030
+ ),
1031
+ isSizeSwitcherEnabled && /* @__PURE__ */ jsx("div", { className: "custom-size-controls mt-3", children: /* @__PURE__ */ jsx(Row, { children: /* @__PURE__ */ jsxs(Col, { xs: "auto", className: "controls", children: [
1032
+ /* @__PURE__ */ jsx(
1033
+ Form.Label,
1034
+ {
1035
+ htmlFor: "widget_icon_size_custom",
1036
+ className: "fcol-sm-12 col-form-label",
1037
+ children: "Select exact icon size:"
1038
+ }
1039
+ ),
1040
+ /* @__PURE__ */ jsxs(InputGroup, { className: "mb-2", children: [
1041
+ /* @__PURE__ */ jsx(
1042
+ FormControl,
1043
+ {
1044
+ type: "number",
1045
+ id: "widget_icon_size_custom",
1046
+ name: "widget_icon_size_custom",
1047
+ "aria-label": "Value in pixels",
1048
+ "aria-describedby": "size-value-input_1",
1049
+ style: { height: "auto" },
1050
+ min: "20",
1051
+ max: "150",
1052
+ onInput: handleInput1,
1053
+ defaultValue: widgetSettings.widget_icon_size_custom
1054
+ }
1055
+ ),
1056
+ /* @__PURE__ */ jsx(
1057
+ InputGroup.Text,
1058
+ {
1059
+ style: { height: "auto" },
1060
+ id: "size-value-input_1",
1061
+ children: "PX"
1062
+ }
1063
+ )
1064
+ ] }),
1065
+ /* @__PURE__ */ jsx("div", { className: "description", children: "20 - 150px are permitted values" })
1066
+ ] }) }) })
1067
+ ] }) }),
1068
+ /* @__PURE__ */ jsxs("div", { className: "save-changes-btn", children: [
1069
+ /* @__PURE__ */ jsx(
1070
+ Button,
1071
+ {
1072
+ variant: "primary",
1073
+ size: "lg",
1074
+ id: "submit",
1075
+ onClick: onSaveChanges,
1076
+ className: "btn btn-primary",
1077
+ children: "Save Changes"
1078
+ }
1079
+ ),
1080
+ /* @__PURE__ */ jsx(Form.Group, { className: "mt-30 row", children: showSuccessMessage && /* @__PURE__ */ jsx("div", { className: "success-message", children: "Settings successfully saved!" }) })
1081
+ ] })
1082
+ ] }) })
1083
+ ] }) }) }) }) }) })
1084
+ ] });
1085
+ }, plugin = {
1086
+ icon: PluginIcon,
1087
+ name: "sanity-plugin-all-in-one-accessibility",
1088
+ title: "All in One Accessibility"
1089
+ }, tool = {
1090
+ ...plugin,
1091
+ component: HomePage
1092
+ }, AllinOneAccessibilityPlugin = definePlugin((options) => ({
1093
+ name: "sanity-plugin-all-in-one-accessibility",
1094
+ tools: (prev) => [...prev, tool]
1095
+ }));
1096
+ export {
1097
+ AllinOneAccessibilityPlugin
1098
+ };
1099
+ //# sourceMappingURL=index.mjs.map