@pareto-engineering/design-system 5.12.10 → 5.12.12

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 (214) hide show
  1. package/dist/{FormBuilder-BgjYyPAc.js → FormBuilder-U45jur81.js} +7268 -7076
  2. package/dist/assets/Description.css +1 -1
  3. package/dist/assets/DragAndDrop.css +1 -1
  4. package/dist/assets/FormBuilder.css +1 -1
  5. package/dist/assets/Hint.css +1 -0
  6. package/dist/index.js +104 -101
  7. package/dist/stories/a/AppContext.stories.js +7 -6
  8. package/dist/stories/a/AreaChart.stories.js +5 -4
  9. package/dist/stories/a/BarChart.stories.js +5 -4
  10. package/dist/stories/a/BlurOverlay.stories.js +5 -4
  11. package/dist/stories/a/ContentTree.stories.js +7 -6
  12. package/dist/stories/a/Conversation.stories.js +9 -8
  13. package/dist/stories/a/DatePicker.stories.js +5 -4
  14. package/dist/stories/a/DotInfo.stories.js +7 -6
  15. package/dist/stories/a/Figure.stories.js +7 -6
  16. package/dist/stories/a/HamburgerButton.stories.js +7 -6
  17. package/dist/stories/a/IconList.stories.js +7 -6
  18. package/dist/stories/a/Label.stories.js +7 -6
  19. package/dist/stories/a/LoadingCircle.stories.js +7 -6
  20. package/dist/stories/a/MetaCard.stories.js +5 -4
  21. package/dist/stories/a/Notification.stories.js +13 -12
  22. package/dist/stories/a/NotificationStack.stories.js +7 -6
  23. package/dist/stories/a/People.stories.js +15 -14
  24. package/dist/stories/a/PieChart.stories.js +5 -4
  25. package/dist/stories/a/Popover.stories.js +5 -4
  26. package/dist/stories/a/ProgressBar.stories.js +7 -6
  27. package/dist/stories/a/Quote.stories.js +5 -4
  28. package/dist/stories/a/Removable.stories.js +7 -6
  29. package/dist/stories/a/SVG.stories.js +13 -12
  30. package/dist/stories/a/SnapScroller.stories.js +9 -8
  31. package/dist/stories/a/Spinner.stories.js +7 -6
  32. package/dist/stories/a/TextSteps.stories.js +7 -6
  33. package/dist/stories/a/Timestamp.stories.js +5 -4
  34. package/dist/stories/a/Tip.stories.js +5 -4
  35. package/dist/stories/a/ToggleSwitch.stories.js +8 -7
  36. package/dist/stories/a/Tooltip.stories.js +11 -10
  37. package/dist/stories/a/XMLEditor.stories.js +5 -4
  38. package/dist/stories/b/Button/Button.stories.js +7 -6
  39. package/dist/stories/b/Button/Group.stories.js +5 -4
  40. package/dist/stories/b/Card/Card.stories.js +5 -4
  41. package/dist/stories/b/Card/Group.stories.js +5 -4
  42. package/dist/stories/b/Logo.stories.js +8 -7
  43. package/dist/stories/b/Page.stories.js +10 -9
  44. package/dist/stories/b/SocialMediaButton.stories.js +5 -4
  45. package/dist/stories/b/ThemeSelector.stories.js +7 -6
  46. package/dist/stories/b/Title.stories.js +7 -6
  47. package/dist/stories/c/Modal.stories.js +5 -4
  48. package/dist/stories/c/Shortener.stories.js +5 -4
  49. package/dist/stories/c/SocialMediaShareButton.stories.js +5 -4
  50. package/dist/stories/f/Checkbox.stories.js +5 -4
  51. package/dist/stories/f/ChoicesInput.stories.js +70 -37
  52. package/dist/stories/f/Combobox.stories.js +7 -6
  53. package/dist/stories/f/Description.stories.js +5 -4
  54. package/dist/stories/f/DragAndDropFileUpload.stories.js +15 -14
  55. package/dist/stories/f/EditorInput.stories.js +5 -4
  56. package/dist/stories/f/FileUpload.stories.js +11 -10
  57. package/dist/stories/f/HighlightedTextInput.stories.js +166 -0
  58. package/dist/stories/f/Label.stories.js +7 -6
  59. package/dist/stories/f/LinkInput.stories.js +5 -4
  60. package/dist/stories/f/RadioInput.stories.js +7 -6
  61. package/dist/stories/f/RatingsInput.stories.js +5 -4
  62. package/dist/stories/f/SelectInput.stories.js +13 -12
  63. package/dist/stories/f/TextInput.stories.js +5 -4
  64. package/dist/stories/f/TextareaInput.stories.js +8 -7
  65. package/dist/stories/g/DragAndDrop.stories.js +27 -26
  66. package/dist/stories/g/ExpandableLexicalPreview.stories.js +9 -8
  67. package/dist/stories/g/FormBuilder.stories.js +18 -17
  68. package/dist/ui/a/AnimatedGradient/AnimatedGradient.js +1 -1
  69. package/dist/ui/a/AnimatedGradient/index.js +1 -1
  70. package/dist/ui/a/ContentTree/ContentTree.js +1 -1
  71. package/dist/ui/a/ContentTree/common/Tree/Tree.js +4 -3
  72. package/dist/ui/a/ContentTree/common/Tree/index.js +1 -1
  73. package/dist/ui/a/ContentTree/common/index.js +1 -1
  74. package/dist/ui/a/ContentTree/index.js +1 -1
  75. package/dist/ui/a/Conversation/Conversation.js +4 -3
  76. package/dist/ui/a/Conversation/index.js +1 -1
  77. package/dist/ui/a/Notification/Notification.js +4 -3
  78. package/dist/ui/a/Notification/index.js +1 -1
  79. package/dist/ui/a/NotificationStack/NotificationStack.js +1 -1
  80. package/dist/ui/a/NotificationStack/index.js +1 -1
  81. package/dist/ui/a/index.js +1 -1
  82. package/dist/ui/b/Button/Button.js +4 -3
  83. package/dist/ui/b/Button/index.js +1 -1
  84. package/dist/ui/b/Card/Card.js +4 -3
  85. package/dist/ui/b/Card/common/Group/Group.js +4 -3
  86. package/dist/ui/b/Card/common/Group/index.js +1 -1
  87. package/dist/ui/b/Card/common/index.js +1 -1
  88. package/dist/ui/b/Card/index.js +1 -1
  89. package/dist/ui/b/Logo/Logo.js +1 -1
  90. package/dist/ui/b/Logo/index.js +1 -1
  91. package/dist/ui/b/Page/Page.js +1 -1
  92. package/dist/ui/b/Page/common/PageHelmet/PageHelmet.js +2 -2
  93. package/dist/ui/b/Page/common/PageHelmet/index.js +1 -1
  94. package/dist/ui/b/Page/common/index.js +2 -2
  95. package/dist/ui/b/Page/index.js +1 -1
  96. package/dist/ui/b/SocialMediaButton/SocialMediaButton.js +1 -1
  97. package/dist/ui/b/SocialMediaButton/index.js +1 -1
  98. package/dist/ui/b/ThemeSelector/ThemeSelector.js +1 -1
  99. package/dist/ui/b/ThemeSelector/index.js +1 -1
  100. package/dist/ui/b/index.js +1 -1
  101. package/dist/ui/c/Modal/Modal.js +1 -1
  102. package/dist/ui/c/Modal/common/ModalHeader/ModalHeader.js +4 -3
  103. package/dist/ui/c/Modal/common/ModalHeader/index.js +1 -1
  104. package/dist/ui/c/Modal/common/index.js +1 -1
  105. package/dist/ui/c/Modal/index.js +1 -1
  106. package/dist/ui/c/Shortener/Shortener.js +1 -1
  107. package/dist/ui/c/Shortener/index.js +1 -1
  108. package/dist/ui/c/index.js +1 -1
  109. package/dist/ui/f/FormInput/FormInput.js +4 -3
  110. package/dist/ui/f/FormInput/index.js +1 -1
  111. package/dist/ui/f/common/CharacterCount/CharacterCount.js +5 -4
  112. package/dist/ui/f/common/Debugger/Debugger.js +1 -1
  113. package/dist/ui/f/common/Debugger/index.js +1 -1
  114. package/dist/ui/f/common/Description/Description.js +25 -57
  115. package/dist/ui/f/common/Hint/Hint.js +56 -0
  116. package/dist/ui/f/common/Hint/index.js +4 -0
  117. package/dist/ui/f/common/index.js +10 -8
  118. package/dist/ui/f/fields/Checkbox/Checkbox.js +4 -3
  119. package/dist/ui/f/fields/Checkbox/index.js +1 -1
  120. package/dist/ui/f/fields/ChoicesInput/ChoicesInput.js +4 -3
  121. package/dist/ui/f/fields/ChoicesInput/common/Choice/Choice.js +8 -114
  122. package/dist/ui/f/fields/ChoicesInput/common/Choice/common/ImageChoice/ImageChoice.js +88 -0
  123. package/dist/ui/f/fields/ChoicesInput/common/Choice/common/ImageChoice/index.js +4 -0
  124. package/dist/ui/f/fields/ChoicesInput/common/Choice/common/TextChoice/TextChoice.js +66 -0
  125. package/dist/ui/f/fields/ChoicesInput/common/Choice/common/TextChoice/index.js +4 -0
  126. package/dist/ui/f/fields/ChoicesInput/common/Choice/common/index.js +6 -0
  127. package/dist/ui/f/fields/ChoicesInput/index.js +1 -1
  128. package/dist/ui/f/fields/DragAndDropFileUpload/DragAndDropFileUpload.js +4 -3
  129. package/dist/ui/f/fields/DragAndDropFileUpload/index.js +1 -1
  130. package/dist/ui/f/fields/EditorInput/EditorInput.js +4 -3
  131. package/dist/ui/f/fields/EditorInput/common/BlockFormatDropDown/BlockFormatDropDown.js +1 -1
  132. package/dist/ui/f/fields/EditorInput/common/BlockFormatDropDown/index.js +1 -1
  133. package/dist/ui/f/fields/EditorInput/common/ColorPicker/ColorPicker.js +1 -1
  134. package/dist/ui/f/fields/EditorInput/common/ColorPicker/index.js +1 -1
  135. package/dist/ui/f/fields/EditorInput/common/FontSizeDropDown/FontSizeDropDown.js +1 -1
  136. package/dist/ui/f/fields/EditorInput/common/FontSizeDropDown/index.js +1 -1
  137. package/dist/ui/f/fields/EditorInput/common/ToolbarPlugin/ToolbarPlugin.js +1 -1
  138. package/dist/ui/f/fields/EditorInput/common/ToolbarPlugin/index.js +1 -1
  139. package/dist/ui/f/fields/EditorInput/common/index.js +1 -1
  140. package/dist/ui/f/fields/EditorInput/index.js +1 -1
  141. package/dist/ui/f/fields/FileUpload/FileUpload.js +4 -3
  142. package/dist/ui/f/fields/FileUpload/common/Preview/Preview.js +1 -1
  143. package/dist/ui/f/fields/FileUpload/common/Preview/index.js +1 -1
  144. package/dist/ui/f/fields/FileUpload/common/PreviewNewRegistration/PreviewNewRegistration.js +1 -1
  145. package/dist/ui/f/fields/FileUpload/common/PreviewNewRegistration/index.js +1 -1
  146. package/dist/ui/f/fields/FileUpload/common/index.js +1 -1
  147. package/dist/ui/f/fields/FileUpload/index.js +1 -1
  148. package/dist/ui/f/fields/HighlightedTextInput/HighlightedTextInput.js +12 -0
  149. package/dist/ui/f/fields/HighlightedTextInput/index.js +4 -0
  150. package/dist/ui/f/fields/LatexPreviewInput/LatexPreviewInput.js +1 -1
  151. package/dist/ui/f/fields/LatexPreviewInput/index.js +1 -1
  152. package/dist/ui/f/fields/LinkInput/LinkInput.js +4 -3
  153. package/dist/ui/f/fields/LinkInput/index.js +1 -1
  154. package/dist/ui/f/fields/PasswordInput/PasswordInput.js +4 -3
  155. package/dist/ui/f/fields/PasswordInput/index.js +1 -1
  156. package/dist/ui/f/fields/QueryCombobox/QueryCombobox.js +1 -1
  157. package/dist/ui/f/fields/QueryCombobox/common/Combobox/Combobox.js +4 -3
  158. package/dist/ui/f/fields/QueryCombobox/common/Combobox/index.js +1 -1
  159. package/dist/ui/f/fields/QueryCombobox/common/MultipleCombobox/MultipleCombobox.js +4 -3
  160. package/dist/ui/f/fields/QueryCombobox/common/MultipleCombobox/index.js +1 -1
  161. package/dist/ui/f/fields/QueryCombobox/common/index.js +1 -1
  162. package/dist/ui/f/fields/QueryCombobox/index.js +1 -1
  163. package/dist/ui/f/fields/RatingsInput/RatingsInput.js +4 -3
  164. package/dist/ui/f/fields/RatingsInput/index.js +1 -1
  165. package/dist/ui/f/fields/SearchDropdown/SearchDropdown.js +4 -3
  166. package/dist/ui/f/fields/SearchDropdown/index.js +1 -1
  167. package/dist/ui/f/fields/SelectInput/SelectInput.js +1 -1
  168. package/dist/ui/f/fields/SelectInput/common/Menu/Menu.js +1 -1
  169. package/dist/ui/f/fields/SelectInput/common/Menu/index.js +1 -1
  170. package/dist/ui/f/fields/SelectInput/common/Multiple/Multiple.js +4 -3
  171. package/dist/ui/f/fields/SelectInput/common/Multiple/index.js +1 -1
  172. package/dist/ui/f/fields/SelectInput/common/Single/Single.js +4 -3
  173. package/dist/ui/f/fields/SelectInput/common/Single/index.js +1 -1
  174. package/dist/ui/f/fields/SelectInput/common/index.js +1 -1
  175. package/dist/ui/f/fields/SelectInput/index.js +1 -1
  176. package/dist/ui/f/fields/SelectSingle/SelectSingle.js +24 -21
  177. package/dist/ui/f/fields/TextInput/TextInput.js +4 -3
  178. package/dist/ui/f/fields/TextInput/index.js +1 -1
  179. package/dist/ui/f/fields/TextareaInput/TextareaInput.js +4 -3
  180. package/dist/ui/f/fields/TextareaInput/index.js +1 -1
  181. package/dist/ui/f/fields/ToggleInput/ToggleInput.js +4 -3
  182. package/dist/ui/f/fields/ToggleInput/index.js +1 -1
  183. package/dist/ui/f/fields/index.js +21 -20
  184. package/dist/ui/f/index.js +37 -34
  185. package/dist/ui/g/DragAndDrop/common/MultiSectionDragAndDrop/MultiSectionDragAndDrop.js +48 -45
  186. package/dist/ui/g/ExpandableLexicalPreview/ExpandableLexicalPreview.js +4 -3
  187. package/dist/ui/g/ExpandableLexicalPreview/common/NewWindowPortal/NewWindowPortal.js +1 -1
  188. package/dist/ui/g/ExpandableLexicalPreview/common/NewWindowPortal/index.js +1 -1
  189. package/dist/ui/g/ExpandableLexicalPreview/common/index.js +1 -1
  190. package/dist/ui/g/ExpandableLexicalPreview/index.js +1 -1
  191. package/dist/ui/g/FormBuilder/FormBuilder.js +1 -1
  192. package/dist/ui/g/FormBuilder/common/Builder/Builder.js +4 -3
  193. package/dist/ui/g/FormBuilder/common/Builder/common/ActionsContainer/ActionsContainer.js +1 -1
  194. package/dist/ui/g/FormBuilder/common/Builder/common/ActionsContainer/index.js +1 -1
  195. package/dist/ui/g/FormBuilder/common/Builder/common/AutoQASection/AutoQASection.js +1 -1
  196. package/dist/ui/g/FormBuilder/common/Builder/common/AutoQASection/index.js +1 -1
  197. package/dist/ui/g/FormBuilder/common/Builder/common/InputBuilder/InputBuilder.js +4 -3
  198. package/dist/ui/g/FormBuilder/common/Builder/common/InputBuilder/index.js +1 -1
  199. package/dist/ui/g/FormBuilder/common/Builder/common/Section/Section.js +5 -4
  200. package/dist/ui/g/FormBuilder/common/Builder/common/Section/index.js +1 -1
  201. package/dist/ui/g/FormBuilder/common/Builder/common/index.js +1 -1
  202. package/dist/ui/g/FormBuilder/common/Builder/index.js +1 -1
  203. package/dist/ui/g/FormBuilder/common/Renderer/Renderer.js +3 -2
  204. package/dist/ui/g/FormBuilder/common/Renderer/common/Section/Section.js +5 -3
  205. package/dist/ui/g/FormBuilder/common/Renderer/common/Section/index.js +1 -1
  206. package/dist/ui/g/FormBuilder/common/Renderer/common/constants.js +4 -0
  207. package/dist/ui/g/FormBuilder/common/Renderer/common/index.js +1 -1
  208. package/dist/ui/g/FormBuilder/common/Renderer/index.js +1 -1
  209. package/dist/ui/g/FormBuilder/common/index.js +1 -1
  210. package/dist/ui/g/FormBuilder/index.js +1 -1
  211. package/dist/ui/g/index.js +1 -1
  212. package/dist/ui/index.js +104 -101
  213. package/package.json +5 -5
  214. /package/dist/assets/{CharacterCount.css → styles.css} +0 -0
@@ -1,4 +1,4 @@
1
- import { M as r } from "../../../FormBuilder-BgjYyPAc.js";
1
+ import { M as r } from "../../../FormBuilder-U45jur81.js";
2
2
  export {
3
3
  r as Modal
4
4
  };
@@ -2,7 +2,7 @@ import "react/jsx-runtime";
2
2
  import "react";
3
3
  import "../../../index-CxkFVI6N.js";
4
4
  import "../../../exports.module-DmUnHWIJ.js";
5
- import { d as e } from "../../../FormBuilder-BgjYyPAc.js";
5
+ import { d as e } from "../../../FormBuilder-U45jur81.js";
6
6
  import "../../b/Page/Context.js";
7
7
  import "../../b/Title/Title.js";
8
8
  export {
@@ -1,4 +1,4 @@
1
- import { d as o } from "../../../FormBuilder-BgjYyPAc.js";
1
+ import { d as o } from "../../../FormBuilder-U45jur81.js";
2
2
  export {
3
3
  o as Shortener
4
4
  };
@@ -1,4 +1,4 @@
1
- import { M as e, d as r } from "../../FormBuilder-BgjYyPAc.js";
1
+ import { M as e, d as r } from "../../FormBuilder-U45jur81.js";
2
2
  import { default as d } from "./SocialMediaShareButton/SocialMediaShareButton.js";
3
3
  export {
4
4
  e as Modal,
@@ -1,11 +1,12 @@
1
1
  import "react/jsx-runtime";
2
2
  import "react";
3
3
  import "../../../index-CxkFVI6N.js";
4
- import { F as Q } from "../../../FormBuilder-BgjYyPAc.js";
4
+ import { F as R } from "../../../FormBuilder-U45jur81.js";
5
5
  import "../common/Label/Label.js";
6
6
  import "../common/Description/Description.js";
7
+ import "../common/Hint/Hint.js";
7
8
  import "formik";
8
- import "../common/CharacterCount/CharacterCount.js";
9
+ import '../../../assets/styles.css';/* empty css */
9
10
  import "../../a/AppContext/Context.js";
10
11
  import "../../a/AppContext/ContextProvider.js";
11
12
  import "../../a/BlurOverlay/BlurOverlay.js";
@@ -40,5 +41,5 @@ import "../../a/ThroughPutIndicator/ThroughPutIndicator.js";
40
41
  import "../fields/LatexPreviewInput/convertLatexToHtml.js";
41
42
  import "../fields/RadioInput/RadioInput.js";
42
43
  export {
43
- Q as default
44
+ R as default
44
45
  };
@@ -1,4 +1,4 @@
1
- import { F as m } from "../../../FormBuilder-BgjYyPAc.js";
1
+ import { F as m } from "../../../FormBuilder-U45jur81.js";
2
2
  export {
3
3
  m as FormInput
4
4
  };
@@ -1,7 +1,8 @@
1
1
  import { jsxs as m } from "react/jsx-runtime";
2
2
  import { useField as u } from "formik";
3
- import { s as f } from "../../../../exports.module-DmUnHWIJ.js";
4
- import '../../../../assets/CharacterCount.css';const p = f.base, d = "character-count", x = ({
3
+ import { s as p } from "../../../../exports.module-DmUnHWIJ.js";
4
+ import '../../../../assets/styles.css';/* empty css */
5
+ const f = p.base, d = "character-count", b = ({
5
6
  id: a,
6
7
  className: t,
7
8
  style: o,
@@ -18,7 +19,7 @@ import '../../../../assets/CharacterCount.css';const p = f.base, d = "character-
18
19
  className: [
19
20
  e >= r ? "x-error" : "x-paragraph",
20
21
  "c-x",
21
- p,
22
+ f,
22
23
  d,
23
24
  t
24
25
  ].filter((i) => i).join(" "),
@@ -32,5 +33,5 @@ import '../../../../assets/CharacterCount.css';const p = f.base, d = "character-
32
33
  );
33
34
  };
34
35
  export {
35
- x as default
36
+ b as default
36
37
  };
@@ -1,7 +1,7 @@
1
1
  import "react/jsx-runtime";
2
2
  import "react";
3
3
  import "../../../../index-CxkFVI6N.js";
4
- import { D as f } from "../../../../FormBuilder-BgjYyPAc.js";
4
+ import { D as f } from "../../../../FormBuilder-U45jur81.js";
5
5
  import "../../../b/Page/Context.js";
6
6
  import "../../../b/Title/Title.js";
7
7
  import "formik";
@@ -1,4 +1,4 @@
1
- import { D as g } from "../../../../FormBuilder-BgjYyPAc.js";
1
+ import { D as g } from "../../../../FormBuilder-U45jur81.js";
2
2
  export {
3
3
  g as Debugger
4
4
  };
@@ -1,62 +1,30 @@
1
- import { jsx as l } from "react/jsx-runtime";
2
- import "react";
3
- import { useField as d } from "formik";
4
- import { P as r } from "../../../../index-CxkFVI6N.js";
5
- import { s as f } from "../../../../exports.module-DmUnHWIJ.js";
6
- import '../../../../assets/Description.css';const g = f.base, u = "description", o = ({
7
- id: t,
8
- className: i,
9
- style: a,
10
- description: n,
11
- name: m,
12
- color: c
13
- // ...otherProps
14
- }) => {
15
- const [, s] = d(m), e = s.touched && s.error;
16
- return /* @__PURE__ */ l(
17
- "div",
18
- {
19
- id: t,
20
- className: [
21
- g,
22
- u,
23
- i,
24
- e ? "x-error" : `x-${c}`
25
- ].filter((p) => p).join(" "),
26
- style: a,
27
- children: (e ? s.error : n) || ""
28
- }
29
- );
1
+ import { jsx as i } from "react/jsx-runtime";
2
+ import { P as s } from "../../../../index-CxkFVI6N.js";
3
+ import { s as l } from "../../../../exports.module-DmUnHWIJ.js";
4
+ import '../../../../assets/Description.css';const n = l.base, e = ({
5
+ className: a,
6
+ description: r,
7
+ color: o
8
+ }) => r ? /* @__PURE__ */ i(
9
+ "span",
10
+ {
11
+ className: [
12
+ n,
13
+ "field-description",
14
+ a,
15
+ `x-${o}`
16
+ ].filter((t) => t).join(" "),
17
+ children: r
18
+ }
19
+ ) : null;
20
+ e.propTypes = {
21
+ className: s.string,
22
+ color: s.string,
23
+ description: s.string
30
24
  };
31
- o.propTypes = {
32
- /**
33
- * The HTML id for this element
34
- */
35
- id: r.string,
36
- /**
37
- * The HTML class names for this element
38
- */
39
- className: r.string,
40
- /**
41
- * The React-written, css properties for this element.
42
- */
43
- style: r.objectOf(r.string),
44
- /**
45
- * The base color for the description
46
- */
47
- color: r.string,
48
- /**
49
- * Input description - extra description to guide a use in filling the input
50
- */
51
- description: r.string,
52
- /**
53
- * The input name (html - and Formik state)
54
- */
55
- name: r.string.isRequired
56
- };
57
- o.defaultProps = {
25
+ e.defaultProps = {
58
26
  color: "metadata"
59
27
  };
60
28
  export {
61
- o as default
29
+ e as default
62
30
  };
@@ -0,0 +1,56 @@
1
+ import { jsxs as i, jsx as b } from "react/jsx-runtime";
2
+ import "react";
3
+ import { useField as y } from "formik";
4
+ import { P as r } from "../../../../index-CxkFVI6N.js";
5
+ import { s as j } from "../../../../exports.module-DmUnHWIJ.js";
6
+ import '../../../../assets/Hint.css';const v = j.base, P = "hint", l = ({
7
+ id: m,
8
+ className: p,
9
+ style: h,
10
+ description: d,
11
+ name: u,
12
+ color: f,
13
+ maxLength: s,
14
+ shouldShowCharacterCount: C = !0
15
+ }) => {
16
+ var c;
17
+ const [N, t] = y(u), e = t.touched && t.error, o = C && s > 0, a = ((c = N.value) == null ? void 0 : c.length) ?? 0, n = e ? t.error : d, x = !!n || o;
18
+ return /* @__PURE__ */ i(
19
+ "div",
20
+ {
21
+ id: m,
22
+ className: [
23
+ v,
24
+ P,
25
+ p,
26
+ e ? "x-error" : `x-${f}`,
27
+ x ? "" : "empty"
28
+ ].filter((g) => g).join(" "),
29
+ style: h,
30
+ children: [
31
+ /* @__PURE__ */ b("span", { className: "hint-text", "aria-live": "polite", children: n || " " }),
32
+ o && /* @__PURE__ */ i("span", { className: `character-count ${a >= s ? "x-error c-x" : ""}`, children: [
33
+ a,
34
+ "/",
35
+ s
36
+ ] })
37
+ ]
38
+ }
39
+ );
40
+ };
41
+ l.propTypes = {
42
+ id: r.string,
43
+ className: r.string,
44
+ style: r.objectOf(r.string),
45
+ color: r.string,
46
+ description: r.string,
47
+ name: r.string.isRequired,
48
+ maxLength: r.number,
49
+ shouldShowCharacterCount: r.bool
50
+ };
51
+ l.defaultProps = {
52
+ color: "metadata"
53
+ };
54
+ export {
55
+ l as default
56
+ };
@@ -0,0 +1,4 @@
1
+ import { default as e } from "./Hint.js";
2
+ export {
3
+ e as Hint
4
+ };
@@ -1,14 +1,16 @@
1
1
  import { default as e } from "./Label/Label.js";
2
2
  import { default as a } from "./Description/Description.js";
3
- import { default as p } from "./CharacterCount/CharacterCount.js";
4
- import { D as n } from "../../../FormBuilder-BgjYyPAc.js";
5
- import { lookUpInputValueFromOptions as l } from "./utils/lookUpInputValueFromOptions.js";
6
- import { integerAndGreaterThanZero as x } from "./utils/validators.js";
3
+ import { default as f } from "./Hint/Hint.js";
4
+ import { default as n } from "./CharacterCount/CharacterCount.js";
5
+ import { D as l } from "../../../FormBuilder-U45jur81.js";
6
+ import { lookUpInputValueFromOptions as x } from "./utils/lookUpInputValueFromOptions.js";
7
+ import { integerAndGreaterThanZero as i } from "./utils/validators.js";
7
8
  export {
8
- p as CharacterCount,
9
- n as FormDebugger,
9
+ n as CharacterCount,
10
+ l as FormDebugger,
10
11
  a as FormDescription,
12
+ f as FormHint,
11
13
  e as FormLabel,
12
- x as integerAndGreaterThanZero,
13
- l as lookUpInputValueFromOptions
14
+ i as integerAndGreaterThanZero,
15
+ x as lookUpInputValueFromOptions
14
16
  };
@@ -5,8 +5,9 @@ import "../../../../exports.module-DmUnHWIJ.js";
5
5
  import "formik";
6
6
  import "../../common/Label/Label.js";
7
7
  import "../../common/Description/Description.js";
8
- import "../../common/CharacterCount/CharacterCount.js";
9
- import { i as l } from "../../../../FormBuilder-BgjYyPAc.js";
8
+ import "../../common/Hint/Hint.js";
9
+ import '../../../../assets/styles.css';/* empty css */
10
+ import { i as s } from "../../../../FormBuilder-U45jur81.js";
10
11
  export {
11
- l as default
12
+ s as default
12
13
  };
@@ -1,4 +1,4 @@
1
- import { i as r } from "../../../../FormBuilder-BgjYyPAc.js";
1
+ import { i as r } from "../../../../FormBuilder-U45jur81.js";
2
2
  export {
3
3
  r as Checkbox
4
4
  };
@@ -5,9 +5,10 @@ import "../../../../exports.module-DmUnHWIJ.js";
5
5
  import "./common/Choice/Choice.js";
6
6
  import "../../common/Label/Label.js";
7
7
  import "../../common/Description/Description.js";
8
+ import "../../common/Hint/Hint.js";
8
9
  import "formik";
9
- import "../../common/CharacterCount/CharacterCount.js";
10
- import { g as l } from "../../../../FormBuilder-BgjYyPAc.js";
10
+ import '../../../../assets/styles.css';/* empty css */
11
+ import { g as s } from "../../../../FormBuilder-U45jur81.js";
11
12
  export {
12
- l as default
13
+ s as default
13
14
  };
@@ -1,117 +1,11 @@
1
- import { jsxs as N, jsx as a } from "react/jsx-runtime";
1
+ import { jsx as i, Fragment as f } from "react/jsx-runtime";
2
2
  import "react";
3
- import { P as e } from "../../../../../../index-CxkFVI6N.js";
4
- import { useField as y } from "formik";
5
- import { s as h } from "../../../../../../exports.module-DmUnHWIJ.js";
6
- const j = h.base, q = "choice", x = ({
7
- id: i,
8
- className: n,
9
- style: c,
10
- name: r,
11
- label: m,
12
- labelClassName: d,
13
- labelStyle: p,
14
- value: t,
15
- multiple: b,
16
- validate: f,
17
- disabled: l,
18
- required: C,
19
- ...u
20
- }) => {
21
- const o = b ? "checkbox" : "radio", [g] = y({
22
- name: r,
23
- validate: f,
24
- type: o,
25
- value: t
26
- });
27
- return /* @__PURE__ */ N(
28
- "div",
29
- {
30
- className: [
31
- j,
32
- q,
33
- n
34
- ].filter((s) => s).join(" "),
35
- style: c,
36
- children: [
37
- /* @__PURE__ */ a(
38
- "input",
39
- {
40
- type: o,
41
- id: i,
42
- name: r,
43
- ...g,
44
- ...u,
45
- value: t,
46
- disabled: l
47
- }
48
- ),
49
- /* @__PURE__ */ a(
50
- "label",
51
- {
52
- htmlFor: i,
53
- className: [
54
- d,
55
- l && "disabled"
56
- ].filter((s) => s).join(" "),
57
- style: p,
58
- children: m
59
- }
60
- )
61
- ]
62
- }
63
- );
64
- };
65
- x.propTypes = {
66
- /**
67
- * The HTML id for this element
68
- */
69
- id: e.string,
70
- /**
71
- * The HTML class names for this element
72
- */
73
- className: e.string,
74
- /**
75
- * The React-written, css properties for this element.
76
- */
77
- style: e.objectOf(e.string),
78
- /**
79
- * The input name.
80
- */
81
- name: e.string.isRequired,
82
- /**
83
- * The input label.
84
- */
85
- label: e.string.isRequired,
86
- /**
87
- * The input label class name.
88
- */
89
- labelClassName: e.string,
90
- /**
91
- * The input label styles.
92
- */
93
- labelStyle: e.objectOf(e.string),
94
- /**
95
- * The input value.
96
- */
97
- value: e.string.isRequired,
98
- /**
99
- * If the input should be multiple - checkbox
100
- */
101
- multiple: e.bool,
102
- /**
103
- * The input field validator function
104
- */
105
- validate: e.func,
106
- /**
107
- * Whether the radio or checkbox choice should be disabled
108
- */
109
- disabled: e.bool,
110
- /**
111
- * Whether the field is required
112
- */
113
- required: e.bool
114
- };
3
+ import m from "./common/TextChoice/TextChoice.js";
4
+ import p from "./common/ImageChoice/ImageChoice.js";
5
+ const d = ({
6
+ attachmentUrls: o,
7
+ ...e
8
+ }) => /* @__PURE__ */ i(f, { children: o != null && o.length ? /* @__PURE__ */ i(p, { attachmentUrls: o, ...e }) : /* @__PURE__ */ i(m, { ...e }) });
115
9
  export {
116
- x as default
10
+ d as default
117
11
  };
@@ -0,0 +1,88 @@
1
+ import { jsxs as d, jsx as o, Fragment as y } from "react/jsx-runtime";
2
+ import { memo as F } from "react";
3
+ import { useField as I } from "formik";
4
+ import { s as $ } from "../../../../../../../../exports.module-DmUnHWIJ.js";
5
+ const k = $.base, q = "choice", f = (e) => e.replace(/[,;!.?]+$/, ""), v = (e, i) => {
6
+ if (!(i != null && i.length)) return !1;
7
+ const n = f(e);
8
+ return i.some((s) => {
9
+ const r = s == null ? void 0 : s.split("?")[0];
10
+ return n.includes(r) || (r == null ? void 0 : r.includes(n.split("?")[0]));
11
+ });
12
+ }, w = (e, i = []) => {
13
+ if (!e) return { text: e, imageUrl: null };
14
+ const n = /https?:\/\/[^\s]+/gi, s = e.match(n);
15
+ if (!s)
16
+ return { text: e, imageUrl: null };
17
+ const t = s.map((c) => ({ raw: c, clean: f(c) })).find(({ clean: c }) => v(c, i));
18
+ return t ? {
19
+ text: e.replace(t.raw, "").replace(/\s+/g, " ").trim() || null,
20
+ imageUrl: t.clean
21
+ } : { text: e, imageUrl: null };
22
+ }, L = ({
23
+ id: e,
24
+ className: i,
25
+ style: n,
26
+ name: s,
27
+ label: r,
28
+ labelClassName: t,
29
+ labelStyle: u,
30
+ value: c,
31
+ multiple: x,
32
+ validate: h,
33
+ disabled: p,
34
+ required: M,
35
+ attachmentUrls: N,
36
+ ...j
37
+ }) => {
38
+ const g = x ? "checkbox" : "radio", [C] = I({
39
+ name: s,
40
+ validate: h,
41
+ type: g,
42
+ value: c
43
+ }), { text: l, imageUrl: a } = w(r, N);
44
+ return /* @__PURE__ */ d(
45
+ "div",
46
+ {
47
+ className: [
48
+ k,
49
+ q,
50
+ i
51
+ ].filter((m) => m).join(" "),
52
+ style: n,
53
+ children: [
54
+ /* @__PURE__ */ o(
55
+ "input",
56
+ {
57
+ type: g,
58
+ id: e,
59
+ ...C,
60
+ ...j,
61
+ name: s,
62
+ value: c,
63
+ disabled: p
64
+ }
65
+ ),
66
+ /* @__PURE__ */ o(
67
+ "label",
68
+ {
69
+ htmlFor: e,
70
+ className: [
71
+ t,
72
+ p && "disabled",
73
+ a && "has-image"
74
+ ].filter((m) => m).join(" "),
75
+ style: u,
76
+ children: a ? /* @__PURE__ */ d(y, { children: [
77
+ l && /* @__PURE__ */ o("span", { className: "choice-text", children: l }),
78
+ /* @__PURE__ */ o("div", { className: "choice-image-container", children: /* @__PURE__ */ o("img", { src: a, alt: "option", className: "choice-image" }) })
79
+ ] }) : l
80
+ }
81
+ )
82
+ ]
83
+ }
84
+ );
85
+ }, B = F(L);
86
+ export {
87
+ B as default
88
+ };
@@ -0,0 +1,4 @@
1
+ import { default as o } from "./ImageChoice.js";
2
+ export {
3
+ o as ImageChoice
4
+ };
@@ -0,0 +1,66 @@
1
+ import { jsxs as N, jsx as i } from "react/jsx-runtime";
2
+ import { memo as b } from "react";
3
+ import { useField as j } from "formik";
4
+ import { s as u } from "../../../../../../../../exports.module-DmUnHWIJ.js";
5
+ const C = u.base, y = "choice", F = ({
6
+ id: s,
7
+ className: m,
8
+ style: a,
9
+ name: o,
10
+ label: l,
11
+ labelClassName: n,
12
+ labelStyle: f,
13
+ value: t,
14
+ multiple: p,
15
+ validate: d,
16
+ disabled: r,
17
+ required: T,
18
+ ...h
19
+ }) => {
20
+ const c = p ? "checkbox" : "radio", [x] = j({
21
+ name: o,
22
+ validate: d,
23
+ type: c,
24
+ value: t
25
+ });
26
+ return /* @__PURE__ */ N(
27
+ "div",
28
+ {
29
+ className: [
30
+ C,
31
+ y,
32
+ m
33
+ ].filter((e) => e).join(" "),
34
+ style: a,
35
+ children: [
36
+ /* @__PURE__ */ i(
37
+ "input",
38
+ {
39
+ type: c,
40
+ id: s,
41
+ ...x,
42
+ ...h,
43
+ name: o,
44
+ value: t,
45
+ disabled: r
46
+ }
47
+ ),
48
+ /* @__PURE__ */ i(
49
+ "label",
50
+ {
51
+ htmlFor: s,
52
+ className: [
53
+ n,
54
+ r && "disabled"
55
+ ].filter((e) => e).join(" "),
56
+ style: f,
57
+ children: l
58
+ }
59
+ )
60
+ ]
61
+ }
62
+ );
63
+ }, v = b(F);
64
+ export {
65
+ v as default
66
+ };
@@ -0,0 +1,4 @@
1
+ import { default as t } from "./TextChoice.js";
2
+ export {
3
+ t as TextChoice
4
+ };
@@ -0,0 +1,6 @@
1
+ import { default as a } from "./TextChoice/TextChoice.js";
2
+ import { default as f } from "./ImageChoice/ImageChoice.js";
3
+ export {
4
+ f as ImageChoice,
5
+ a as TextChoice
6
+ };
@@ -1,4 +1,4 @@
1
- import { g as p } from "../../../../FormBuilder-BgjYyPAc.js";
1
+ import { g as p } from "../../../../FormBuilder-U45jur81.js";
2
2
  export {
3
3
  p as ChoicesInput
4
4
  };
@@ -2,10 +2,11 @@ import "react/jsx-runtime";
2
2
  import "react";
3
3
  import "formik";
4
4
  import "../../../../exports.module-DmUnHWIJ.js";
5
- import { o as d } from "../../../../FormBuilder-BgjYyPAc.js";
5
+ import { o as l } from "../../../../FormBuilder-U45jur81.js";
6
6
  import "../../common/Label/Label.js";
7
7
  import "../../common/Description/Description.js";
8
- import "../../common/CharacterCount/CharacterCount.js";
8
+ import "../../common/Hint/Hint.js";
9
+ import '../../../../assets/styles.css';/* empty css */
9
10
  export {
10
- d as default
11
+ l as default
11
12
  };
@@ -1,4 +1,4 @@
1
- import { o as a } from "../../../../FormBuilder-BgjYyPAc.js";
1
+ import { o as a } from "../../../../FormBuilder-U45jur81.js";
2
2
  export {
3
3
  a as DragAndDropFileUpload
4
4
  };