@globalpayments/vega 2.39.0 → 2.40.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 (249) hide show
  1. package/dist/cjs/{app-globals-dd3e7925.js → app-globals-cdd0972c.js} +12 -1
  2. package/dist/cjs/check-box-required-rule-1ee54b9a.js +70 -0
  3. package/dist/cjs/date-required-rule-4e1f84fd.js +92 -0
  4. package/dist/cjs/{element-appender-slimmer-c6e0f4ca.js → element-appender-slimmer-4f0dc8c6.js} +9 -5
  5. package/dist/cjs/file-uploader-required-rule-313ec9e3.js +21 -0
  6. package/dist/cjs/{form-field-controller-slimmer-48c0ad0b.js → form-field-controller-slimmer-d92e8212.js} +28 -1
  7. package/dist/cjs/index.cjs.js +22 -1
  8. package/dist/cjs/input-phone-number-required-rule-2668fdf1.js +65 -0
  9. package/dist/cjs/input-range-required-rule-5b9c2a95.js +63 -0
  10. package/dist/cjs/internal-form-field-validation-rule.abstract-07cdff46.js +15 -0
  11. package/dist/cjs/loader.cjs.js +3 -2
  12. package/dist/cjs/{min-number-rule-115c5a3b.js → min-number-rule-5bcccc8f.js} +7 -4
  13. package/dist/cjs/{min-string-length-rule-75f24a48.js → min-string-length-rule-af215976.js} +8 -4
  14. package/dist/cjs/public-rules-90b972e5.js +42 -0
  15. package/dist/cjs/{required-field-rule-7f9945fa.js → required-field-rule-d73c1d8c.js} +6 -3
  16. package/dist/cjs/rich-text-editor-required-rule-cacc5fe0.js +64 -0
  17. package/dist/cjs/time-required-rule-ccf178e7.js +141 -0
  18. package/dist/cjs/toggle-switch-required-rule-88a51b36.js +66 -0
  19. package/dist/cjs/{valid-credit-card-number-rule-4a9ae5d9.js → valid-credit-card-number-rule-4a1b00b8.js} +3 -2
  20. package/dist/cjs/vega-checkbox_2.cjs.entry.js +11 -79
  21. package/dist/cjs/vega-color-picker.cjs.entry.js +3 -2
  22. package/dist/cjs/vega-combo-box.cjs.entry.js +3 -2
  23. package/dist/cjs/vega-date-picker_2.cjs.entry.js +8 -90
  24. package/dist/cjs/vega-dialog_2.cjs.entry.js +29 -1
  25. package/dist/cjs/vega-dropdown_5.cjs.entry.js +1 -1
  26. package/dist/cjs/vega-env-manager-23b8b23c.js +2 -2
  27. package/dist/cjs/vega-file-uploader.cjs.entry.js +5 -19
  28. package/dist/cjs/vega-form.cjs.entry.js +2 -1
  29. package/dist/cjs/vega-image-uploader.cjs.entry.js +3 -2
  30. package/dist/cjs/vega-input-credit-card.cjs.entry.js +4 -3
  31. package/dist/cjs/vega-input-numeric.cjs.entry.js +3 -2
  32. package/dist/cjs/vega-input-phone-number.cjs.entry.js +7 -63
  33. package/dist/cjs/vega-input-range.cjs.entry.js +6 -61
  34. package/dist/cjs/vega-input-select.cjs.entry.js +3 -2
  35. package/dist/cjs/vega-input.cjs.entry.js +7 -6
  36. package/dist/cjs/vega-popover_2.cjs.entry.js +1 -1
  37. package/dist/cjs/vega-radio_2.cjs.entry.js +3 -2
  38. package/dist/cjs/vega-rich-text-editor_4.cjs.entry.js +4 -60
  39. package/dist/cjs/vega-selection-chip_2.cjs.entry.js +3 -2
  40. package/dist/cjs/vega-selection-tile_2.cjs.entry.js +3 -2
  41. package/dist/cjs/vega-signature-capture.cjs.entry.js +3 -2
  42. package/dist/cjs/vega-stepper.cjs.entry.js +3 -2
  43. package/dist/cjs/vega-textarea.cjs.entry.js +4 -3
  44. package/dist/cjs/vega-time-picker_2.cjs.entry.js +11 -140
  45. package/dist/cjs/vega-toggle-switch.cjs.entry.js +4 -63
  46. package/dist/cjs/vega-tooltip_2.cjs.entry.js +53 -12
  47. package/dist/cjs/vega.cjs.js +3 -2
  48. package/dist/collection/components/vega-checkbox/vega-checkbox.css +82 -33
  49. package/dist/collection/components/vega-checkbox/vega-checkbox.js +8 -13
  50. package/dist/collection/components/vega-file-uploader/vega-file-uploader.js +2 -2
  51. package/dist/collection/components/vega-modal/slimmers/controllers/vega-modal-layout-controller.js +9 -0
  52. package/dist/collection/components/vega-modal/slimmers/controllers/vega-modal-scroll-controller.js +16 -0
  53. package/dist/collection/components/vega-modal/vega-modal.js +6 -0
  54. package/dist/collection/components/vega-tooltip/slimmers/controllers/vega-tooltip-element-appender-controller.js +45 -11
  55. package/dist/collection/components/vega-tooltip/vega-tooltip.js +12 -0
  56. package/dist/collection/global/scripts/before-vega-load.js +11 -0
  57. package/dist/collection/helpers/slimmers/element-appender-slimmer.js +8 -5
  58. package/dist/collection/helpers/slimmers/test/element-appender-slimmer.test.js +2 -0
  59. package/dist/collection/helpers/ui/element-appender.js +1 -0
  60. package/dist/collection/helpers/ui/test/element-appender.test.js +1 -0
  61. package/dist/collection/helpers/validator/form-field-controller.js +28 -1
  62. package/dist/collection/helpers/validator/public-rules.js +10 -0
  63. package/dist/collection/helpers/validator/rules/check-box-required-rule.js +4 -3
  64. package/dist/collection/helpers/validator/rules/date-range-rule.js +2 -1
  65. package/dist/collection/helpers/validator/rules/date-required-rule.js +5 -3
  66. package/dist/collection/helpers/validator/rules/email-field-rule.js +3 -2
  67. package/dist/collection/helpers/validator/rules/{object-array-required-rule.js → file-uploader-required-rule.js} +1 -1
  68. package/dist/collection/helpers/validator/rules/input-phone-number-required-rule.js +5 -3
  69. package/dist/collection/helpers/validator/rules/input-range-min-and-max-rule.js +3 -1
  70. package/dist/collection/helpers/validator/rules/input-range-required-rule.js +5 -4
  71. package/dist/collection/helpers/validator/rules/internal-form-field-validation-rule.abstract.js +11 -0
  72. package/dist/collection/helpers/validator/rules/max-number-rule.js +4 -2
  73. package/dist/collection/helpers/validator/rules/max-string-length-rule.js +4 -2
  74. package/dist/collection/helpers/validator/rules/min-and-max-date-rule.js +3 -1
  75. package/dist/collection/helpers/validator/rules/min-number-rule.js +4 -2
  76. package/dist/collection/helpers/validator/rules/min-string-length-rule.js +4 -2
  77. package/dist/collection/helpers/validator/rules/required-field-rule.js +5 -3
  78. package/dist/collection/helpers/validator/rules/rich-text-editor-required-rule.js +4 -3
  79. package/dist/collection/helpers/validator/rules/time-range-required-rule.js +5 -3
  80. package/dist/collection/helpers/validator/rules/time-range-rule.js +3 -1
  81. package/dist/collection/helpers/validator/rules/time-required-rule.js +5 -3
  82. package/dist/collection/helpers/validator/rules/toggle-switch-required-rule.js +4 -3
  83. package/dist/collection/helpers/validator/rules/valid-credit-card-number-rule.js +3 -2
  84. package/dist/collection/helpers/validator/rules/valid-phone-number-rule.js +4 -2
  85. package/dist/collection/helpers/validator/test/rules/file-uploader-required-rule.test.js +7 -0
  86. package/dist/collection/helpers/validator/test/rules/public-rules.test.js +80 -0
  87. package/dist/collection/index.js +1 -0
  88. package/dist/esm/{app-globals-c954167a.js → app-globals-88fa3549.js} +12 -1
  89. package/dist/esm/check-box-required-rule-cb0aa339.js +68 -0
  90. package/dist/esm/{date-732bc749.js → date-c55b97f0.js} +1 -1
  91. package/dist/esm/date-required-rule-8944f3bf.js +90 -0
  92. package/dist/esm/{element-appender-slimmer-f5e703f3.js → element-appender-slimmer-d9155ee0.js} +9 -5
  93. package/dist/esm/file-uploader-required-rule-ad886d01.js +19 -0
  94. package/dist/esm/{form-field-controller-slimmer-7a9f2b2e.js → form-field-controller-slimmer-bb64dec7.js} +28 -1
  95. package/dist/esm/index.js +12 -1
  96. package/dist/esm/input-phone-number-required-rule-be6a5572.js +63 -0
  97. package/dist/esm/input-range-required-rule-3ad74776.js +61 -0
  98. package/dist/esm/internal-form-field-validation-rule.abstract-f5b6bdbf.js +13 -0
  99. package/dist/esm/loader.js +3 -2
  100. package/dist/esm/{min-number-rule-31d48b22.js → min-number-rule-a6082418.js} +7 -4
  101. package/dist/esm/{min-string-length-rule-c6a69eeb.js → min-string-length-rule-c31c89f4.js} +8 -4
  102. package/dist/esm/public-rules-413f6a17.js +27 -0
  103. package/dist/esm/{required-field-rule-368b31fa.js → required-field-rule-ab4bdc47.js} +6 -3
  104. package/dist/esm/rich-text-editor-required-rule-75cc2db0.js +62 -0
  105. package/dist/esm/time-required-rule-a01163b5.js +138 -0
  106. package/dist/esm/toggle-switch-required-rule-b3cf4302.js +64 -0
  107. package/dist/esm/{valid-credit-card-number-rule-2aef3ad5.js → valid-credit-card-number-rule-cc497bec.js} +3 -2
  108. package/dist/esm/vega-calendar_3.entry.js +1 -1
  109. package/dist/esm/vega-checkbox_2.entry.js +11 -79
  110. package/dist/esm/vega-color-picker.entry.js +3 -2
  111. package/dist/esm/vega-combo-box.entry.js +3 -2
  112. package/dist/esm/vega-date-picker_2.entry.js +8 -90
  113. package/dist/esm/vega-dialog_2.entry.js +29 -1
  114. package/dist/esm/vega-dropdown_5.entry.js +1 -1
  115. package/dist/esm/vega-env-manager-8f8dc473.js +2 -2
  116. package/dist/esm/vega-file-uploader.entry.js +5 -19
  117. package/dist/esm/vega-form.entry.js +2 -1
  118. package/dist/esm/vega-image-uploader.entry.js +3 -2
  119. package/dist/esm/vega-input-credit-card.entry.js +4 -3
  120. package/dist/esm/vega-input-numeric.entry.js +3 -2
  121. package/dist/esm/vega-input-phone-number.entry.js +6 -62
  122. package/dist/esm/vega-input-range.entry.js +5 -60
  123. package/dist/esm/vega-input-select.entry.js +3 -2
  124. package/dist/esm/vega-input.entry.js +7 -6
  125. package/dist/esm/vega-popover_2.entry.js +1 -1
  126. package/dist/esm/vega-radio_2.entry.js +3 -2
  127. package/dist/esm/vega-rich-text-editor_4.entry.js +3 -59
  128. package/dist/esm/vega-selection-chip_2.entry.js +3 -2
  129. package/dist/esm/vega-selection-tile_2.entry.js +3 -2
  130. package/dist/esm/vega-signature-capture.entry.js +3 -2
  131. package/dist/esm/vega-stepper.entry.js +3 -2
  132. package/dist/esm/vega-textarea.entry.js +4 -3
  133. package/dist/esm/vega-time-picker_2.entry.js +7 -136
  134. package/dist/esm/vega-toggle-switch.entry.js +3 -62
  135. package/dist/esm/vega-tooltip_2.entry.js +53 -12
  136. package/dist/esm/vega.js +3 -2
  137. package/dist/types/components/vega-modal/slimmers/controllers/vega-modal-layout-controller.d.ts +4 -0
  138. package/dist/types/components/vega-modal/slimmers/controllers/vega-modal-scroll-controller.d.ts +5 -0
  139. package/dist/types/components/vega-modal/vega-modal.d.ts +1 -0
  140. package/dist/types/components/vega-tooltip/slimmers/controllers/vega-tooltip-element-appender-controller.d.ts +18 -0
  141. package/dist/types/components/vega-tooltip/vega-tooltip.d.ts +4 -0
  142. package/dist/types/helpers/slimmers/element-appender-slimmer.d.ts +1 -0
  143. package/dist/types/helpers/slimmers/form-field-controller-slimmer.d.ts +2 -1
  144. package/dist/types/helpers/validator/form-field-controller.d.ts +10 -0
  145. package/dist/types/helpers/validator/public-rules.d.ts +10 -0
  146. package/dist/types/helpers/validator/rules/check-box-required-rule.d.ts +7 -6
  147. package/dist/types/helpers/validator/rules/date-range-rule.d.ts +3 -2
  148. package/dist/types/helpers/validator/rules/date-required-rule.d.ts +7 -6
  149. package/dist/types/helpers/validator/rules/email-field-rule.d.ts +4 -3
  150. package/dist/types/helpers/validator/rules/{object-array-required-rule.d.ts → file-uploader-required-rule.d.ts} +1 -1
  151. package/dist/types/helpers/validator/rules/input-phone-number-required-rule.d.ts +7 -6
  152. package/dist/types/helpers/validator/rules/input-range-min-and-max-rule.d.ts +3 -2
  153. package/dist/types/helpers/validator/rules/input-range-required-rule.d.ts +8 -7
  154. package/dist/types/helpers/validator/rules/internal-form-field-validation-rule.abstract.d.ts +19 -0
  155. package/dist/types/helpers/validator/rules/max-number-rule.d.ts +4 -3
  156. package/dist/types/helpers/validator/rules/max-string-length-rule.d.ts +4 -3
  157. package/dist/types/helpers/validator/rules/min-and-max-date-rule.d.ts +3 -2
  158. package/dist/types/helpers/validator/rules/min-number-rule.d.ts +4 -3
  159. package/dist/types/helpers/validator/rules/min-string-length-rule.d.ts +4 -3
  160. package/dist/types/helpers/validator/rules/required-field-rule.d.ts +7 -6
  161. package/dist/types/helpers/validator/rules/rich-text-editor-required-rule.d.ts +7 -6
  162. package/dist/types/helpers/validator/rules/time-range-required-rule.d.ts +7 -6
  163. package/dist/types/helpers/validator/rules/time-range-rule.d.ts +3 -2
  164. package/dist/types/helpers/validator/rules/time-required-rule.d.ts +7 -6
  165. package/dist/types/helpers/validator/rules/toggle-switch-required-rule.d.ts +5 -4
  166. package/dist/types/helpers/validator/rules/valid-credit-card-number-rule.d.ts +4 -3
  167. package/dist/types/helpers/validator/rules/valid-phone-number-rule.d.ts +4 -3
  168. package/dist/types/helpers/validator/test/rules/public-rules.test.d.ts +1 -0
  169. package/dist/types/index.d.ts +1 -0
  170. package/dist/types/types/public-api.d.ts +1 -1
  171. package/dist/vega/index.esm.js +1 -1
  172. package/dist/vega/p-04c72f30.entry.js +1 -0
  173. package/dist/vega/p-07c2725a.js +1 -0
  174. package/dist/vega/{p-b5990090.js → p-08835909.js} +1 -1
  175. package/dist/vega/p-0b6d4561.entry.js +1 -0
  176. package/dist/vega/p-0bb860cc.js +1 -0
  177. package/dist/vega/p-113cd659.entry.js +1 -0
  178. package/dist/vega/{p-64e49394.entry.js → p-154d262e.entry.js} +1 -1
  179. package/dist/vega/p-17598aac.entry.js +1 -0
  180. package/dist/vega/p-23130825.entry.js +1 -0
  181. package/dist/vega/p-280cbcdb.js +1 -0
  182. package/dist/vega/{p-4b19706c.entry.js → p-3299c30b.entry.js} +1 -1
  183. package/dist/vega/p-3fd9d39f.entry.js +1 -0
  184. package/dist/vega/p-42a949f5.entry.js +1 -0
  185. package/dist/vega/p-4bd1b877.entry.js +1 -0
  186. package/dist/vega/p-590fd123.js +1 -0
  187. package/dist/vega/{p-d2e6090a.js → p-5a7eabcc.js} +1 -1
  188. package/dist/vega/p-5e56f3bd.js +1 -0
  189. package/dist/vega/p-5f377954.js +1 -1
  190. package/dist/vega/p-612c9374.entry.js +1 -0
  191. package/dist/vega/{p-9ee23f34.entry.js → p-6585bddc.entry.js} +2 -2
  192. package/dist/vega/p-6603081a.entry.js +1 -0
  193. package/dist/vega/p-6f90d444.js +1 -0
  194. package/dist/vega/p-7303fff2.entry.js +1 -0
  195. package/dist/vega/p-7b648a05.entry.js +1 -0
  196. package/dist/vega/p-7c0b4c36.js +1 -0
  197. package/dist/vega/p-81b21503.entry.js +1 -0
  198. package/dist/vega/p-8fae8f9e.js +1 -0
  199. package/dist/vega/p-924b4e24.js +1 -0
  200. package/dist/vega/{p-ea78ddfa.entry.js → p-94459733.entry.js} +1 -1
  201. package/dist/vega/p-a05ca459.entry.js +1 -0
  202. package/dist/vega/p-a3e80fb2.entry.js +1 -0
  203. package/dist/vega/p-a7a46358.entry.js +1 -0
  204. package/dist/vega/p-abd7aeaa.js +1 -0
  205. package/dist/vega/p-b24da503.entry.js +1 -0
  206. package/dist/vega/p-b44f3309.js +1 -0
  207. package/dist/vega/p-b9051ad2.js +1 -0
  208. package/dist/vega/{p-4ab0d645.js → p-c253d09c.js} +1 -1
  209. package/dist/vega/p-c56acdd5.entry.js +1 -0
  210. package/dist/vega/p-cdbbdcc2.js +1 -0
  211. package/dist/vega/p-d1a06058.entry.js +1 -0
  212. package/dist/vega/p-d51b04ce.entry.js +1 -0
  213. package/dist/vega/p-e0446879.js +1 -0
  214. package/dist/vega/p-e08b6542.entry.js +1 -0
  215. package/dist/vega/p-f396c69a.js +1 -0
  216. package/dist/vega/p-fda6c178.entry.js +1 -0
  217. package/dist/vega/p-ffac4b8c.entry.js +1 -0
  218. package/dist/vega/vega.esm.js +1 -1
  219. package/package.json +1 -1
  220. package/dist/collection/helpers/validator/test/rules/object-array-required-rule.test.js +0 -7
  221. package/dist/vega/p-0b697841.entry.js +0 -1
  222. package/dist/vega/p-257b1bc2.entry.js +0 -1
  223. package/dist/vega/p-3152031c.js +0 -1
  224. package/dist/vega/p-3c85a11b.entry.js +0 -1
  225. package/dist/vega/p-49bf2b3a.js +0 -1
  226. package/dist/vega/p-4a8db510.entry.js +0 -1
  227. package/dist/vega/p-4e436842.entry.js +0 -1
  228. package/dist/vega/p-59834ea4.entry.js +0 -1
  229. package/dist/vega/p-59cfed37.entry.js +0 -1
  230. package/dist/vega/p-60e1ebe1.entry.js +0 -1
  231. package/dist/vega/p-629bd266.entry.js +0 -1
  232. package/dist/vega/p-64e0c944.entry.js +0 -1
  233. package/dist/vega/p-66b9e86d.entry.js +0 -1
  234. package/dist/vega/p-74958b1a.js +0 -1
  235. package/dist/vega/p-74ff73d6.entry.js +0 -1
  236. package/dist/vega/p-8120e7a1.entry.js +0 -1
  237. package/dist/vega/p-894c067a.entry.js +0 -1
  238. package/dist/vega/p-989b36a2.entry.js +0 -1
  239. package/dist/vega/p-a8a809e1.entry.js +0 -1
  240. package/dist/vega/p-b6bffdf3.entry.js +0 -1
  241. package/dist/vega/p-bf6d3c00.entry.js +0 -1
  242. package/dist/vega/p-c00fde35.entry.js +0 -1
  243. package/dist/vega/p-c2e96537.entry.js +0 -1
  244. package/dist/vega/p-ce94a9c5.entry.js +0 -1
  245. package/dist/vega/p-d03945cb.entry.js +0 -1
  246. package/dist/vega/p-f41102cd.js +0 -1
  247. package/dist/vega/p-f5b0ce61.js +0 -1
  248. package/dist/vega/p-fc49a98e.entry.js +0 -1
  249. /package/dist/types/helpers/validator/test/rules/{object-array-required-rule.test.d.ts → file-uploader-required-rule.test.d.ts} +0 -0
@@ -1,12 +1,15 @@
1
1
  'use strict';
2
2
 
3
+ const internalFormFieldValidationRule_abstract = require('./internal-form-field-validation-rule.abstract-07cdff46.js');
4
+
3
5
  /**
4
6
  * A rule that checks if a string is empty or not
5
7
  *
6
- * @implements {FormFieldValidationRule<string>}
8
+ * @augments {InternalFormFieldValidationRule<string>}
7
9
  */
8
- class RequiredFieldRule {
10
+ class RequiredFieldRule extends internalFormFieldValidationRule_abstract.InternalFormFieldValidationRule {
9
11
  constructor() {
12
+ super(...arguments);
10
13
  /**
11
14
  * A function that checks if the item is a string, number, or boolean.
12
15
  *
@@ -19,7 +22,7 @@ class RequiredFieldRule {
19
22
  * If the input is a number or a boolean, return true. If the input is a string, return true if the string is not empty
20
23
  *
21
24
  * @param {FormFieldValueType | Array<FormFieldValueType>} input - The input to be evaluated.
22
- * @returns {EvaluateResultTranslation} An object with two properties: isValid and message.
25
+ * @returns {EvaluateResult} An object with two properties: isValid and message.
23
26
  */
24
27
  evaluate(input) {
25
28
  if (!this.isAcceptedInputType(input)) {
@@ -0,0 +1,64 @@
1
+ 'use strict';
2
+
3
+ const contentState = require('./content-state-c5b47ca1.js');
4
+ const internalFormFieldValidationRule_abstract = require('./internal-form-field-validation-rule.abstract-07cdff46.js');
5
+
6
+ /**
7
+ * A rule that checks if the input range is empty or not
8
+ *
9
+ * @augments {InternalFormFieldValidationRule<string[]>}
10
+ */
11
+ class RichTextEditorRequiredRule extends internalFormFieldValidationRule_abstract.InternalFormFieldValidationRule {
12
+ /**
13
+ * It checks if the input is a valid value.
14
+ *
15
+ * @param {string[]} input - The value of the input field.
16
+ * @returns {EvaluateResult} An object with two properties: isValid and message.
17
+ */
18
+ evaluate(input) {
19
+ var _a, _b;
20
+ if (!this.isAcceptedInputType(input)) {
21
+ throw new Error(`Invalid value ${input} for rich text editor`);
22
+ }
23
+ const isValid = ((_a = input === null || input === void 0 ? void 0 : input.blocks) === null || _a === void 0 ? void 0 : _a.length) > 1 || // isValid: true when the length is greater than 1 to keep the same behavior as vega-textarea
24
+ (((_b = input === null || input === void 0 ? void 0 : input.blocks) === null || _b === void 0 ? void 0 : _b.length) === 1 && input.blocks.some((block) => block.isNotEmpty()));
25
+ return {
26
+ isValid,
27
+ message: isValid ? '' : 'This field is required',
28
+ };
29
+ }
30
+ /**
31
+ * If the input is accepted and the status is not disabled and visible, then return true
32
+ *
33
+ * @param {unknown} input - The input to be evaluated.
34
+ * @param {FormFieldStatusMeta} [status] - FormFieldStatusMeta
35
+ * @returns {boolean} A boolean value.
36
+ */
37
+ canEvaluate(input, status) {
38
+ return status
39
+ ? this.isAcceptedInputType(input) && !status.disabled && status.visible
40
+ : this.isAcceptedInputType(input);
41
+ }
42
+ /**
43
+ * If the field is not disabled, visible, and has been touched or modified, then show the error
44
+ *
45
+ * @param {FormFieldStatusMeta} status - FormFieldStatusMeta
46
+ * @returns {boolean} A boolean value.
47
+ */
48
+ shouldShowError(status) {
49
+ return !status.disabled && status.visible && (status.touched || status.modified);
50
+ }
51
+ /**
52
+ * If the input is undefined or null, return true, otherwise return true if the input is a VegaRTEContent.
53
+ *
54
+ * @param {unknown} input - The input value to be validated.
55
+ * @returns {boolean} A boolean.
56
+ */
57
+ isAcceptedInputType(input) {
58
+ if (input === undefined || input === null)
59
+ return true;
60
+ return input instanceof contentState.VegaRTEContent;
61
+ }
62
+ }
63
+
64
+ exports.RichTextEditorRequiredRule = RichTextEditorRequiredRule;
@@ -0,0 +1,141 @@
1
+ 'use strict';
2
+
3
+ const date = require('./date-0a6bb035.js');
4
+ const internalFormFieldValidationRule_abstract = require('./internal-form-field-validation-rule.abstract-07cdff46.js');
5
+
6
+ /**
7
+ * A rule that checks if time is empty or not
8
+ *
9
+ * @augments {InternalFormFieldValidationRule<string[]>}
10
+ */
11
+ class TimeRangeRequiredRule extends internalFormFieldValidationRule_abstract.InternalFormFieldValidationRule {
12
+ /**
13
+ * It creates a new instance of the class with the given config.
14
+ *
15
+ * @param {{ timeFormat: TimeFormat }} config - config including the timeFormat for time value
16
+ * @param {TimeFormat} config.timeFormat - The timeFormat for time value
17
+ */
18
+ constructor(config) {
19
+ super();
20
+ this.config = config;
21
+ }
22
+ /**
23
+ * It checks if the input is a valid time string.
24
+ *
25
+ * @param {string} input - The value of the input field.
26
+ * @returns {EvaluateResult} An object with two properties: isValid and message.
27
+ */
28
+ evaluate(input) {
29
+ if (!this.isAcceptedInputType(input)) {
30
+ throw new Error(`Invalid time value ${input} for range mode`);
31
+ }
32
+ const isValid = Array.isArray(input) &&
33
+ input.length === 2 &&
34
+ input.every((item) => date.isTimeStr(item, this.config.timeFormat));
35
+ return {
36
+ isValid,
37
+ message: isValid ? '' : 'This field is required',
38
+ };
39
+ }
40
+ /**
41
+ * If the input is accepted and the status is not disabled and visible, then return true
42
+ *
43
+ * @param {unknown} input - The input to be evaluated.
44
+ * @param {FormFieldStatusMeta} [status] - FormFieldStatusMeta
45
+ * @returns {boolean} A boolean value.
46
+ */
47
+ canEvaluate(input, status) {
48
+ return status
49
+ ? this.isAcceptedInputType(input) && !status.disabled && status.visible
50
+ : this.isAcceptedInputType(input);
51
+ }
52
+ /**
53
+ * If the field is not disabled, visible, and has been touched or modified, then show the error
54
+ *
55
+ * @param {FormFieldStatusMeta} status - FormFieldStatusMeta
56
+ * @returns {boolean} A boolean value.
57
+ */
58
+ shouldShowError(status) {
59
+ return !status.disabled && status.visible && (status.touched || status.modified);
60
+ }
61
+ /**
62
+ * If the input is undefined or null, return true, otherwise return true if the input is a string.
63
+ *
64
+ * @param {unknown} input - The input value to be validated.
65
+ * @returns {boolean}A boolean.
66
+ */
67
+ isAcceptedInputType(input) {
68
+ if (input === undefined || input === null)
69
+ return true;
70
+ return Array.isArray(input);
71
+ }
72
+ }
73
+
74
+ /**
75
+ * A rule that checks if time is empty or not
76
+ *
77
+ * @augments {InternalFormFieldValidationRule<string>}
78
+ */
79
+ class TimeRequiredRule extends internalFormFieldValidationRule_abstract.InternalFormFieldValidationRule {
80
+ /**
81
+ * It creates a new instance of the class with the given config.
82
+ *
83
+ * @param {{ timeFormat: TimeFormat }} config - config including the timeFormat for time value
84
+ * @param {TimeFormat} config.timeFormat - The timeFormat for time value
85
+ */
86
+ constructor(config) {
87
+ super();
88
+ this.config = config;
89
+ }
90
+ /**
91
+ * It checks if the input is a valid time string.
92
+ *
93
+ * @param {string} input - The value of the input field.
94
+ * @returns {EvaluateResult} An object with two properties: isValid and message.
95
+ */
96
+ evaluate(input) {
97
+ if (!this.isAcceptedInputType(input)) {
98
+ throw new Error(`Invalid time value ${input}`);
99
+ }
100
+ const isValid = date.isTimeStr(input, this.config.timeFormat);
101
+ return {
102
+ isValid,
103
+ message: isValid ? '' : 'This field is required',
104
+ };
105
+ }
106
+ /**
107
+ * If the input is accepted and the status is not disabled and visible, then return true
108
+ *
109
+ * @param {unknown} input - The input to be evaluated.
110
+ * @param {FormFieldStatusMeta} [status] - FormFieldStatusMeta
111
+ * @returns {boolean} A boolean value.
112
+ */
113
+ canEvaluate(input, status) {
114
+ return status
115
+ ? this.isAcceptedInputType(input) && !status.disabled && status.visible
116
+ : this.isAcceptedInputType(input);
117
+ }
118
+ /**
119
+ * If the field is not disabled, visible, and has been touched or modified, then show the error
120
+ *
121
+ * @param {FormFieldStatusMeta} status - FormFieldStatusMeta
122
+ * @returns {boolean} A boolean value.
123
+ */
124
+ shouldShowError(status) {
125
+ return !status.disabled && status.visible && (status.touched || status.modified);
126
+ }
127
+ /**
128
+ * If the input is undefined or null, return true, otherwise return true if the input is a string.
129
+ *
130
+ * @param {unknown} input - The input value to be validated.
131
+ * @returns {boolean}A boolean.
132
+ */
133
+ isAcceptedInputType(input) {
134
+ if (input === undefined || input === null)
135
+ return true;
136
+ return typeof input === 'string';
137
+ }
138
+ }
139
+
140
+ exports.TimeRangeRequiredRule = TimeRangeRequiredRule;
141
+ exports.TimeRequiredRule = TimeRequiredRule;
@@ -0,0 +1,66 @@
1
+ 'use strict';
2
+
3
+ const internalFormFieldValidationRule_abstract = require('./internal-form-field-validation-rule.abstract-07cdff46.js');
4
+
5
+ /**
6
+ * A rule that checks if the toggle switch is required to switch on
7
+ *
8
+ * @augments {InternalFormFieldValidationRule<boolean>}
9
+ */
10
+ class ToggleSwitchRequiredRule extends internalFormFieldValidationRule_abstract.InternalFormFieldValidationRule {
11
+ /**
12
+ * If the input is a boolean, return a boolean. If the
13
+ * input is anything else, return false
14
+ *
15
+ * @param {unknown} input - The input to be evaluated.
16
+ * @returns {EvaluateResult} - An object with two properties: isValid and message.
17
+ */
18
+ evaluate(input) {
19
+ if (typeof input === 'boolean') {
20
+ return {
21
+ isValid: input,
22
+ message: input ? '' : 'This field is required',
23
+ };
24
+ }
25
+ else {
26
+ return {
27
+ isValid: false,
28
+ message: 'This field is required',
29
+ };
30
+ }
31
+ }
32
+ /**
33
+ * If the input is accepted and the status is not disabled and visible, then return true
34
+ *
35
+ * @param {unknown} input - The input to be evaluated.
36
+ * @param {FormFieldStatusMeta} [status] - FormFieldStatusMeta
37
+ * @returns {boolean} The return value is a boolean that indicates whether the input can be evaluated.
38
+ */
39
+ canEvaluate(input, status) {
40
+ return status
41
+ ? this.isAcceptedInputType(input) && !status.disabled && status.visible
42
+ : this.isAcceptedInputType(input);
43
+ }
44
+ /**
45
+ * If the field is not disabled, visible, and has been touched or modified, then show the error
46
+ *
47
+ * @param {FormFieldStatusMeta} status - FormFieldStatusMeta
48
+ * @returns {boolean} A boolean value.
49
+ */
50
+ shouldShowError(status) {
51
+ return !status.disabled && status.visible && (status.touched || status.modified);
52
+ }
53
+ /**
54
+ * If the input is undefined or null, return true, otherwise return true if the input is a boolean.
55
+ *
56
+ * @param {unknown} input - The input value to be validated.
57
+ * @returns {boolean} A boolean.
58
+ */
59
+ isAcceptedInputType(input) {
60
+ if (input === undefined || input === null)
61
+ return true;
62
+ return typeof input === 'boolean';
63
+ }
64
+ }
65
+
66
+ exports.ToggleSwitchRequiredRule = ToggleSwitchRequiredRule;
@@ -2,13 +2,14 @@
2
2
 
3
3
  const regex = require('./regex-c1f70fd4.js');
4
4
  const number = require('./number-4816603d.js');
5
+ const internalFormFieldValidationRule_abstract = require('./internal-form-field-validation-rule.abstract-07cdff46.js');
5
6
 
6
7
  /**
7
8
  * A rule that checks if it's a valid credit card number
8
9
  *
9
- * @implements {FormFieldValidationRule<string>}
10
+ * @augments {InternalFormFieldValidationRule<string>}
10
11
  */
11
- class ValidCreditCardNumberRule {
12
+ class ValidCreditCardNumberRule extends internalFormFieldValidationRule_abstract.InternalFormFieldValidationRule {
12
13
  /**
13
14
  * It takes a string, maps it to an array of numbers, reverses the array, checks the length of the
14
15
  * array, maps the even digits to a new array, sums the new array, and returns true if the sum is
@@ -5,20 +5,22 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-09acd3c9.js');
6
6
  const accessibility = require('./accessibility-bfa227f6.js');
7
7
  const component = require('./component-73a88c4e.js');
8
+ const checkBoxRequiredRule = require('./check-box-required-rule-1ee54b9a.js');
8
9
  const changeManager = require('./change-manager-a297e4d2.js');
9
10
  const staticSubjectTitle = require('./static-subject-title-c589a1bd.js');
10
11
  const observer = require('./observer-f49483e8.js');
11
12
  const ui = require('./ui-5fd9b267.js');
12
13
  const globalSlimmerRegistry = require('./global-slimmer-registry-b3bce7e0.js');
13
14
  const componentUsageRuntimeMetrics = require('./component-usage-runtime-metrics-dcb32c24.js');
14
- const formFieldControllerSlimmer = require('./form-field-controller-slimmer-48c0ad0b.js');
15
+ const formFieldControllerSlimmer = require('./form-field-controller-slimmer-d92e8212.js');
15
16
  const eventEmitSlimmer = require('./event-emit-slimmer-208a19e4.js');
16
17
  const domNodeSubjectFactory = require('./dom-node-subject-factory-ce1777a9.js');
17
18
  const vegaInternalEventId = require('./vega-internal-event-id-bda63e14.js');
18
19
  const childNodesEventPreventSlimmer = require('./child-nodes-event-prevent-slimmer-af2addec.js');
19
- const requiredFieldRule = require('./required-field-rule-7f9945fa.js');
20
+ const requiredFieldRule = require('./required-field-rule-d73c1d8c.js');
20
21
  const componentLoadRequired = require('./component-load-required-16d76afa.js');
21
22
  const childNodesNotifyObserverSlimmer = require('./child-nodes-notify-observer-slimmer-4e60a929.js');
23
+ require('./internal-form-field-validation-rule.abstract-07cdff46.js');
22
24
  require('./string-21427167.js');
23
25
  require('./create-public-api-runtime-metrics-slimmer-54c3f73b.js');
24
26
  require('./dynamic-slimmer-f31fdfd7.js');
@@ -38,71 +40,6 @@ require('./feature-flag-controller-7b22e598.js');
38
40
  require('./index-8b247c17.js');
39
41
  require('./_commonjsHelpers-537d719a.js');
40
42
 
41
- /**
42
- * A rule that checks if a string is empty or not
43
- *
44
- * @implements {FormFieldValidationRule<string>}
45
- */
46
- class CheckBoxRequiredRule {
47
- /**
48
- * If the input is a boolean, return a boolean. If the input is a string, return a boolean. If the
49
- * input is anything else, return false
50
- *
51
- * @param {string | boolean} input - The input to be evaluated.
52
- * @returns {EvaluateResultTranslation} - An object with two properties: isValid and message.
53
- */
54
- evaluate(input) {
55
- if (typeof input === 'boolean') {
56
- return {
57
- isValid: input,
58
- message: input ? '' : 'This field is required',
59
- };
60
- }
61
- else if (typeof input === 'string') {
62
- return {
63
- isValid: input !== '',
64
- message: input !== '' ? '' : 'This field is required',
65
- };
66
- }
67
- else {
68
- return {
69
- isValid: false,
70
- message: 'This field is required',
71
- };
72
- }
73
- }
74
- /**
75
- * If the input is accepted and the status is not disabled and visible, then return true
76
- *
77
- * @param {unknown} input - The input to be evaluated.
78
- * @param {FormFieldStatusMeta} [status] - FormFieldStatusMeta
79
- * @returns {boolean} The return value is a boolean that indicates whether the input can be evaluated.
80
- */
81
- canEvaluate(input, status) {
82
- return status
83
- ? this.isAcceptedInputType(input) && !status.disabled && status.visible
84
- : this.isAcceptedInputType(input);
85
- }
86
- /**
87
- * If the field is not disabled, visible, and has been touched or modified, then show the error
88
- *
89
- * @param {FormFieldStatusMeta} status - FormFieldStatusMeta
90
- * @returns {boolean} A boolean value.
91
- */
92
- shouldShowError(status) {
93
- return !status.disabled && status.visible && (status.touched || status.modified);
94
- }
95
- /**
96
- * If the input is a string, number, boolean, or null, return true, otherwise return false.
97
- *
98
- * @param {unknown} input - The input value to be validated.
99
- * @returns {boolean} a boolean value.
100
- */
101
- isAcceptedInputType(input) {
102
- return typeof input === 'string' || typeof input === 'boolean' || input === null;
103
- }
104
- }
105
-
106
43
  var __decorate$2 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
107
44
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
108
45
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -157,7 +94,7 @@ __decorate$2([
157
94
  globalSlimmerRegistry.MapToComponentMethod('disconnectedCallback')
158
95
  ], VegaCheckboxShowErrorController.prototype, "disconnectedCallback", null);
159
96
 
160
- const vegaCheckboxCss = ":host{display:inline-block;vertical-align:middle}.vega-checkbox-container{position:relative;display:flex;-webkit-tap-highlight-color:transparent}.vega-checkbox-container>input[type=checkbox]{position:absolute;left:0px;top:0px;opacity:0;width:24px;height:24px;padding:0px;margin:0px}.vega-checkbox-container>.vega-checkbox-icon{display:inline-block;box-sizing:border-box;width:24px;height:24px;border-style:solid;border-width:2px;border-color:rgba(var(--v-border-color-action-active, 29, 65, 195, 1));position:relative;left:0px;background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));border:1px solid rgba(var(--v-border-input-field, 171, 198, 216, 1));border-radius:4px;min-width:24px;color:rgba(var(--v-text-inverted-primary, 252, 252, 252, 1))}.vega-checkbox-container>.vega-checkbox-icon.vega-checkbox-small{width:16px;height:16px;min-width:16px;border-radius:2px}.vega-checkbox-container>.vega-checkbox-icon:hover{border:1px solid rgba(var(--v-border-input-field-hover, 115, 160, 190, 1))}:host(.checked) .vega-checkbox-container>.vega-checkbox-icon{background-color:rgba(var(--v-bg-action, 19, 98, 226, 1))}:host(.checked) .vega-checkbox-container>.vega-checkbox-icon:hover{background-color:rgba(var(--v-bg-action-hover, 4, 112, 236, 1))}.vega-checkbox-container>input[type=checkbox]:focus-visible+.vega-checkbox-icon{box-shadow:0 0 0 4px rgba(var(--v-ring-input-focus, 19, 98, 226, 0.25));border:1px solid rgba(var(--v-border-input-field-focus, 19, 98, 226, 1));outline:none}.vega-checkbox-container>.vega-checkbox-icon:active{border-width:1px;border-style:solid;border-color:rgba(var(--v-border-color-action-active, 29, 65, 195, 1))}:host(.checked) .vega-checkbox-container>.vega-checkbox-icon:active{background-color:rgba(var(--v-bg-action-active, 29, 65, 195, 1))}:host(.checked) .vega-checkbox-container>.vega-checkbox-icon{display:inline-flex;align-items:center;justify-content:center}:host(.disabled) .vega-checkbox-container{cursor:not-allowed}:host(:not(.disabled)) .vega-checkbox-container{cursor:pointer}.vega-checkbox-container .vega-require{color:rgba(var(--v-text-error, 189, 41, 71, 1));margin-left:4px;vertical-align:middle}.vega-checkbox-container.error>.vega-checkbox-icon{background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1))}:host(.checked) .vega-checkbox-container.error>.vega-checkbox-icon{background-color:rgba(var(--v-bg-danger, 189, 41, 71, 1))}.vega-checkbox-container.error>.vega-checkbox-icon:hover{border:1px solid rgba(var(--v-border-input-field-danger-hover, 255, 87, 114, 1))}:host(.checked) .vega-checkbox-container.error>.vega-checkbox-icon:hover{background-color:rgba(var(--v-bg-danger-hover, 233, 71, 104, 1))}.vega-checkbox-container.error>input[type=checkbox]:focus-visible+.vega-checkbox-icon{box-shadow:0 0 0 4px rgba(var(--v-ring-input-danger-focus, 230, 50, 87, 0.25));border:1px solid rgba(var(--v-border-input-field-danger-focus, 233, 71, 104, 1));outline:none}:host(.checked) .vega-checkbox-container.error>.vega-checkbox-icon:active{background-color:rgba(var(--v-bg-danger-active, 230, 50, 87, 1))}.vega-checkbox-container.error>.vega-checkbox-icon:active{border-width:1px;border-style:solid;border-color:rgba(var(--v-border-color-danger-active, 189, 41, 71, 1))}:host(.disabled) .vega-checkbox-container>.vega-checkbox-icon{background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1));border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1))}:host(.checked.disabled) .vega-checkbox-container>.vega-checkbox-icon{background-color:rgba(var(--v-bg-disabled, 176, 180, 181, 1));border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1))}:host(.checked.disabled) .vega-checkbox-container>.vega-checkbox-icon>vega-icon{color:rgba(var(--v-text-inverted-primary, 252, 252, 252, 1))}.vega-checkbox-container>.vega-checkbox-label-container{display:inline-block;margin-left:12px;color:rgba(var(--v-text-primary, 32, 54, 69, 1));font-family:\"Inter\", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-checkbox-container>.vega-checkbox-label-container{font-family:\"Inter\", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-checkbox-container>.vega-checkbox-label-container{font-family:\"Inter\", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-checkbox-container>.vega-checkbox-label-container{font-family:\"Inter\", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}.vega-checkbox-container>.vega-checkbox-label-container.vega-checkbox-label-small{margin-left:8px;font-family:\"Inter\", sans-serif;font-size:14px;font-weight:400;line-height:18px}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-checkbox-container>.vega-checkbox-label-container.vega-checkbox-label-small{font-family:\"Inter\", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-checkbox-container>.vega-checkbox-label-container.vega-checkbox-label-small{font-family:\"Inter\", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-checkbox-container>.vega-checkbox-label-container.vega-checkbox-label-small{font-family:\"Inter\", sans-serif;font-size:14px;font-weight:400;line-height:18px}}:host(.disabled) .vega-checkbox-container>.vega-checkbox-label-container{color:rgba(var(--v-text-disabled, 176, 180, 181, 1))}.vega-error{display:block;margin-top:12px;font-family:\"Inter\", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-error, 189, 41, 71, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-error{font-family:\"Inter\", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-error{font-family:\"Inter\", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-error{font-family:\"Inter\", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}.vega-checkbox-label-container.vega-hidden{display:none}.vega-hidden{display:none}";
97
+ const vegaCheckboxCss = ":host{display:inline-block;vertical-align:middle}.vega-checkbox-container{position:relative;display:flex;-webkit-tap-highlight-color:transparent}.vega-checkbox-container>input[type=checkbox]{position:absolute;left:0px;top:0px;opacity:0;width:24px;height:24px;padding:0px;margin:0px}.vega-checkbox-container>.vega-checkbox-icon{display:inline-block;box-sizing:border-box;width:24px;height:24px;border-style:solid;border-width:2px;border-color:rgba(var(--v-border-color-action-active, 29, 65, 195, 1));position:relative;left:0px;background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));border:1px solid rgba(var(--v-border-input-field, 171, 198, 216, 1));border-radius:4px;min-width:24px;color:rgba(var(--v-text-inverted-primary, 252, 252, 252, 1))}.vega-checkbox-container>.vega-checkbox-icon:hover{border:1px solid rgba(var(--v-border-input-field-hover, 115, 160, 190, 1))}:host(.checked) .vega-checkbox-container>.vega-checkbox-icon{background-color:rgba(var(--v-bg-action, 19, 98, 226, 1))}:host(.checked) .vega-checkbox-container>.vega-checkbox-icon:hover{background-color:rgba(var(--v-bg-action-hover, 4, 112, 236, 1))}.vega-checkbox-container>input[type=checkbox]:focus-visible+.vega-checkbox-icon{box-shadow:0 0 0 4px rgba(var(--v-ring-input-focus, 19, 98, 226, 0.25));border:1px solid rgba(var(--v-border-input-field-focus, 19, 98, 226, 1));outline:none}.vega-checkbox-container>.vega-checkbox-icon:active{border-width:1px;border-style:solid;border-color:rgba(var(--v-border-color-action-active, 29, 65, 195, 1))}:host(.checked) .vega-checkbox-container>.vega-checkbox-icon:active{background-color:rgba(var(--v-bg-action-active, 29, 65, 195, 1))}:host(.checked) .vega-checkbox-container>.vega-checkbox-icon{display:inline-flex;align-items:center;justify-content:center}:host(.disabled) .vega-checkbox-container{cursor:not-allowed}:host(:not(.disabled)) .vega-checkbox-container{cursor:pointer}.vega-checkbox-container .vega-require{color:rgba(var(--v-text-error, 189, 41, 71, 1));margin-left:4px;vertical-align:middle}.vega-checkbox-container.error>.vega-checkbox-icon{background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1))}:host(.checked) .vega-checkbox-container.error>.vega-checkbox-icon{background-color:rgba(var(--v-bg-danger, 189, 41, 71, 1))}.vega-checkbox-container.error>.vega-checkbox-icon:hover{border:1px solid rgba(var(--v-border-input-field-danger-hover, 255, 87, 114, 1))}:host(.checked) .vega-checkbox-container.error>.vega-checkbox-icon:hover{background-color:rgba(var(--v-bg-danger-hover, 233, 71, 104, 1))}.vega-checkbox-container.error>input[type=checkbox]:focus-visible+.vega-checkbox-icon{box-shadow:0 0 0 4px rgba(var(--v-ring-input-danger-focus, 230, 50, 87, 0.25));border:1px solid rgba(var(--v-border-input-field-danger-focus, 233, 71, 104, 1));outline:none}:host(.checked) .vega-checkbox-container.error>.vega-checkbox-icon:active{background-color:rgba(var(--v-bg-danger-active, 230, 50, 87, 1))}.vega-checkbox-container.error>.vega-checkbox-icon:active{border-width:1px;border-style:solid;border-color:rgba(var(--v-border-color-danger-active, 189, 41, 71, 1))}:host(.disabled) .vega-checkbox-container>.vega-checkbox-icon{background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1));border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1))}:host(.checked.disabled) .vega-checkbox-container>.vega-checkbox-icon{background-color:rgba(var(--v-bg-disabled, 176, 180, 181, 1));border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1))}:host(.checked.disabled) .vega-checkbox-container>.vega-checkbox-icon>vega-icon{color:rgba(var(--v-text-inverted-primary, 252, 252, 252, 1))}.vega-checkbox-container>.vega-checkbox-label-container{display:inline-block;margin-left:12px;color:rgba(var(--v-text-primary, 32, 54, 69, 1));font-family:\"Inter\", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-checkbox-container>.vega-checkbox-label-container{font-family:\"Inter\", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-checkbox-container>.vega-checkbox-label-container{font-family:\"Inter\", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-checkbox-container>.vega-checkbox-label-container{font-family:\"Inter\", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}:host(.disabled) .vega-checkbox-container>.vega-checkbox-label-container{color:rgba(var(--v-text-disabled, 176, 180, 181, 1))}.vega-error{display:block;margin-top:12px;font-family:\"Inter\", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-error, 189, 41, 71, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-error{font-family:\"Inter\", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-error{font-family:\"Inter\", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-error{font-family:\"Inter\", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}.vega-checkbox-label-container.vega-hidden{display:none}.vega-hidden{display:none}.size-default input[type=checkbox]{width:24px;height:24px}.size-default .vega-checkbox-icon{width:24px;height:24px;min-width:24px;border-radius:4px}.size-default .vega-checkbox-label-container{margin-left:12px;font-family:\"Inter\", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}@media screen and (min-width: 768px) and (max-width: 1023px){.size-default .vega-checkbox-label-container{font-family:\"Inter\", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.size-default .vega-checkbox-label-container{font-family:\"Inter\", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.size-default .vega-checkbox-label-container{font-family:\"Inter\", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}.size-small input[type=checkbox]{width:16px;height:16px}.size-small .vega-checkbox-icon{width:16px;height:16px;min-width:16px;border-radius:2px}.size-small .vega-checkbox-label-container{margin-left:8px;font-family:\"Inter\", sans-serif;font-size:14px;font-weight:400;line-height:18px}@media screen and (min-width: 768px) and (max-width: 1023px){.size-small .vega-checkbox-label-container{font-family:\"Inter\", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.size-small .vega-checkbox-label-container{font-family:\"Inter\", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.size-small .vega-checkbox-label-container{font-family:\"Inter\", sans-serif;font-size:14px;font-weight:400;line-height:18px}}";
161
98
 
162
99
  var __decorate$1 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
163
100
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
@@ -180,7 +117,7 @@ const VegaCheckbox = class {
180
117
  propertyRules: [
181
118
  {
182
119
  propertyName: 'required',
183
- ruleFactory: (isRequired) => (isRequired ? new CheckBoxRequiredRule() : null),
120
+ ruleFactory: (isRequired) => (isRequired ? new checkBoxRequiredRule.CheckBoxRequiredRule() : null),
184
121
  },
185
122
  ],
186
123
  defaultValue: (target) => (target.identifier === '' ? false : ''),
@@ -311,16 +248,11 @@ const VegaCheckbox = class {
311
248
  'vega-flex-shrink-0 v-min-w-min': this.host.parentElement.nodeName == 'VEGA-CHECKBOX-GROUP',
312
249
  'checked': this.checked,
313
250
  'disabled': this.isDisabled(),
314
- } }, index.h("label", { class: {
315
- 'vega-checkbox-container': true,
316
- 'error': this.showError,
317
- }, ref: (e) => (this.inputContainerRef = e) }, index.h("input", { ref: (e) => (this.inputRef = e), type: "checkbox", checked: this.checked, value: this.identifier, onChange: this.onCheckBoxChange, "aria-label": this.identifier || 'No label defined', disabled: this.isDisabled(), role: 'button', tabIndex: 0, onKeyDown: accessibility.createEnterKeyHandlerToTriggerClick() }), index.h("span", { class: {
318
- 'vega-checkbox-icon': true,
319
- 'vega-checkbox-small': this.size === 'small',
320
- }, onClick: this.onSelectedIconClick, tabIndex: -1 }, this.renderIconDom()), index.h("div", { class: {
321
- 'vega-checkbox-label-container': true,
322
- 'vega-checkbox-label-small': this.size === 'small',
323
- }, ref: (el) => (this.labelElement = el) }, this.renderLabelDom(), this.renderRequireDom()))), this.host);
251
+ } }, index.h("label", { class: ui.arrayToClassString([
252
+ 'vega-checkbox-container',
253
+ this.showError && 'error',
254
+ this.size && `size-${this.size}`,
255
+ ]), ref: (e) => (this.inputContainerRef = e) }, index.h("input", { ref: (e) => (this.inputRef = e), type: "checkbox", checked: this.checked, value: this.identifier, onChange: this.onCheckBoxChange, "aria-label": this.identifier || 'No label defined', disabled: this.isDisabled(), role: 'button', tabIndex: 0, onKeyDown: accessibility.createEnterKeyHandlerToTriggerClick() }), index.h("span", { class: "vega-checkbox-icon", onClick: this.onSelectedIconClick, tabIndex: -1 }, this.renderIconDom()), index.h("div", { class: "vega-checkbox-label-container", ref: (el) => (this.labelElement = el) }, this.renderLabelDom(), this.renderRequireDom()))), this.host);
324
256
  }
325
257
  renderIconDom() {
326
258
  return this.checked ? (index.h("vega-icon", { icon: "checkmark", size: this.size === 'small' ? 'size-12' : 'size-16' })) : null;
@@ -3,17 +3,18 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-09acd3c9.js');
6
- const requiredFieldRule = require('./required-field-rule-7f9945fa.js');
6
+ const requiredFieldRule = require('./required-field-rule-d73c1d8c.js');
7
7
  const accessibility = require('./accessibility-bfa227f6.js');
8
8
  const component = require('./component-73a88c4e.js');
9
9
  const ui = require('./ui-5fd9b267.js');
10
- const formFieldControllerSlimmer = require('./form-field-controller-slimmer-48c0ad0b.js');
10
+ const formFieldControllerSlimmer = require('./form-field-controller-slimmer-d92e8212.js');
11
11
  const globalSlimmerRegistry = require('./global-slimmer-registry-b3bce7e0.js');
12
12
  const componentUsageRuntimeMetrics = require('./component-usage-runtime-metrics-dcb32c24.js');
13
13
  const staticSubjectTitle = require('./static-subject-title-c589a1bd.js');
14
14
  const eventEmitSlimmer = require('./event-emit-slimmer-208a19e4.js');
15
15
  const changeManager = require('./change-manager-a297e4d2.js');
16
16
  const domNodeSubjectFactory = require('./dom-node-subject-factory-ce1777a9.js');
17
+ require('./internal-form-field-validation-rule.abstract-07cdff46.js');
17
18
  require('./string-21427167.js');
18
19
  require('./observer-f49483e8.js');
19
20
  require('./create-public-api-runtime-metrics-slimmer-54c3f73b.js');
@@ -3,12 +3,12 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-09acd3c9.js');
6
- const requiredFieldRule = require('./required-field-rule-7f9945fa.js');
6
+ const requiredFieldRule = require('./required-field-rule-d73c1d8c.js');
7
7
  const component = require('./component-73a88c4e.js');
8
8
  const typeGuard = require('./type-guard-4ba85fdc.js');
9
9
  const globalSlimmerRegistry = require('./global-slimmer-registry-b3bce7e0.js');
10
10
  const componentUsageRuntimeMetrics = require('./component-usage-runtime-metrics-dcb32c24.js');
11
- const formFieldControllerSlimmer = require('./form-field-controller-slimmer-48c0ad0b.js');
11
+ const formFieldControllerSlimmer = require('./form-field-controller-slimmer-d92e8212.js');
12
12
  const childNodesEventPreventSlimmer = require('./child-nodes-event-prevent-slimmer-af2addec.js');
13
13
  const eventEmitSlimmer = require('./event-emit-slimmer-208a19e4.js');
14
14
  const domNodeSubjectFactory = require('./dom-node-subject-factory-ce1777a9.js');
@@ -21,6 +21,7 @@ const keyboardManagerSlimmer = require('./keyboard-manager-slimmer-feba3a83.js')
21
21
  const ui = require('./ui-5fd9b267.js');
22
22
  const mutationObserverSlimmer = require('./mutation-observer-slimmer-895b3d3e.js');
23
23
  const mutationObserverFilters = require('./mutation-observer-filters-e5a7f85a.js');
24
+ require('./internal-form-field-validation-rule.abstract-07cdff46.js');
24
25
  require('./breakpoints-ebde4837.js');
25
26
  require('./ui-32e69595.js');
26
27
  require('./regex-c1f70fd4.js');