@strictly/react-form 0.0.1 → 0.0.3

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 (173) hide show
  1. package/.out/core/mobx/field_adapter.d.ts +7 -6
  2. package/.out/core/mobx/field_adapter_builder.d.ts +12 -13
  3. package/.out/core/mobx/field_adapter_builder.js +8 -12
  4. package/.out/core/mobx/field_adapters_of_values.d.ts +4 -0
  5. package/.out/core/mobx/flattened_adapters_of_fields.d.ts +2 -2
  6. package/.out/core/mobx/flattened_list_types_of_type.d.ts +8 -0
  7. package/.out/core/mobx/form_fields_of_field_adapters.d.ts +8 -0
  8. package/.out/core/mobx/form_presenter.d.ts +21 -24
  9. package/.out/core/mobx/form_presenter.js +64 -69
  10. package/.out/core/mobx/merge_field_adapters_with_two_way_converter.d.ts +13 -0
  11. package/.out/core/mobx/merge_field_adapters_with_two_way_converter.js +11 -0
  12. package/.out/core/mobx/merge_field_adapters_with_validators.d.ts +11 -0
  13. package/.out/core/mobx/merge_field_adapters_with_validators.js +45 -0
  14. package/.out/core/mobx/specs/fixtures.d.ts +7 -0
  15. package/.out/core/mobx/specs/fixtures.js +20 -0
  16. package/.out/core/mobx/specs/flattened_adapters_of_fields.tests.js +5 -2
  17. package/.out/core/mobx/specs/{flattened_list_type_defs_of.tests.js → flattened_list_types_of_types.tests.js} +7 -7
  18. package/.out/core/mobx/specs/form_presenter.tests.js +162 -60
  19. package/.out/core/mobx/specs/merge_field_adapters_with_two_way_converter.js +89 -0
  20. package/.out/core/mobx/specs/merge_field_adapters_with_validators.tests.js +172 -0
  21. package/.out/core/mobx/types.d.ts +2 -2
  22. package/.out/field_converters/chain_field_converter.d.ts +3 -3
  23. package/.out/field_converters/chain_field_converter.js +17 -12
  24. package/.out/field_converters/identity_converter.d.ts +3 -3
  25. package/.out/field_converters/identity_converter.js +10 -6
  26. package/.out/field_converters/integer_to_string_converter.d.ts +5 -4
  27. package/.out/field_converters/integer_to_string_converter.js +13 -6
  28. package/.out/field_converters/list_converter.d.ts +2 -2
  29. package/.out/field_converters/list_converter.js +6 -1
  30. package/.out/field_converters/maybe_identity_converter.d.ts +3 -3
  31. package/.out/field_converters/maybe_identity_converter.js +3 -1
  32. package/.out/field_converters/nullable_to_boolean_converter.d.ts +9 -8
  33. package/.out/field_converters/nullable_to_boolean_converter.js +13 -7
  34. package/.out/field_converters/select_value_type_converter.d.ts +20 -15
  35. package/.out/field_converters/select_value_type_converter.js +29 -14
  36. package/.out/field_converters/specs/chain_field_converter.tests.d.ts +1 -0
  37. package/.out/field_converters/specs/chain_field_converter.tests.js +251 -0
  38. package/.out/field_converters/trimming_string_converter.d.ts +3 -3
  39. package/.out/field_converters/trimming_string_converter.js +7 -3
  40. package/.out/field_converters/validating_converter.d.ts +3 -3
  41. package/.out/field_converters/validating_converter.js +7 -5
  42. package/.out/index.d.ts +9 -2
  43. package/.out/index.js +9 -2
  44. package/.out/mantine/create_checkbox.d.ts +2 -3
  45. package/.out/mantine/create_checkbox.js +6 -5
  46. package/.out/mantine/create_pill.js +2 -2
  47. package/.out/mantine/create_radio.js +1 -1
  48. package/.out/mantine/create_radio_group.d.ts +2 -3
  49. package/.out/mantine/create_radio_group.js +4 -3
  50. package/.out/mantine/create_text_input.d.ts +2 -3
  51. package/.out/mantine/create_text_input.js +6 -5
  52. package/.out/mantine/create_value_input.d.ts +2 -3
  53. package/.out/mantine/create_value_input.js +6 -5
  54. package/.out/mantine/error_renderer.d.ts +6 -0
  55. package/.out/mantine/error_renderer.js +5 -0
  56. package/.out/mantine/hooks.d.ts +9 -13
  57. package/.out/mantine/hooks.js +10 -15
  58. package/.out/mantine/specs/checkbox_hooks.stories.d.ts +7 -2
  59. package/.out/mantine/specs/checkbox_hooks.stories.js +33 -6
  60. package/.out/mantine/specs/list_hooks.stories.js +2 -2
  61. package/.out/mantine/specs/radio_group_hooks.stories.d.ts +7 -2
  62. package/.out/mantine/specs/radio_group_hooks.stories.js +33 -6
  63. package/.out/mantine/specs/select_hooks.stories.d.ts +8 -2
  64. package/.out/mantine/specs/select_hooks.stories.js +45 -8
  65. package/.out/mantine/specs/text_input_hooks.stories.d.ts +5 -1
  66. package/.out/mantine/specs/text_input_hooks.stories.js +23 -8
  67. package/.out/mantine/specs/value_input_hooks.stories.d.ts +7 -2
  68. package/.out/mantine/specs/value_input_hooks.stories.js +49 -15
  69. package/.out/mantine/types.d.ts +4 -1
  70. package/.out/tsconfig.tsbuildinfo +1 -1
  71. package/.out/types/error_of_field.d.ts +2 -0
  72. package/.out/types/error_of_field.js +1 -0
  73. package/.out/types/field.d.ts +1 -1
  74. package/.out/types/field_converters.d.ts +17 -10
  75. package/.out/types/field_converters.js +5 -5
  76. package/.out/types/flattened_validators_of_fields.d.ts +8 -0
  77. package/.out/types/flattened_validators_of_fields.js +1 -0
  78. package/.out/types/merge_validators.d.ts +7 -0
  79. package/.out/types/merge_validators.js +38 -0
  80. package/.out/types/specs/flattened_validators_of_fields.tests.d.ts +1 -0
  81. package/.out/types/specs/flattened_validators_of_fields.tests.js +16 -0
  82. package/.out/types/specs/merge_validators.tests.d.ts +1 -0
  83. package/.out/types/specs/merge_validators.tests.js +192 -0
  84. package/.out/util/partial.d.ts +11 -5
  85. package/.out/util/partial.js +55 -15
  86. package/.turbo/turbo-build.log +9 -9
  87. package/.turbo/turbo-check-types.log +1 -1
  88. package/.turbo/turbo-release$colon$exports.log +1 -1
  89. package/README.md +5 -1
  90. package/core/mobx/field_adapter.ts +15 -7
  91. package/core/mobx/field_adapter_builder.ts +39 -75
  92. package/core/mobx/field_adapters_of_values.ts +17 -0
  93. package/core/mobx/flattened_adapters_of_fields.ts +3 -3
  94. package/core/mobx/flattened_list_types_of_type.ts +17 -0
  95. package/core/mobx/form_fields_of_field_adapters.ts +16 -0
  96. package/core/mobx/form_presenter.ts +117 -104
  97. package/core/mobx/merge_field_adapters_with_two_way_converter.ts +68 -0
  98. package/core/mobx/merge_field_adapters_with_validators.ts +99 -0
  99. package/core/mobx/specs/fixtures.ts +73 -0
  100. package/core/mobx/specs/flattened_adapters_of_fields.tests.ts +23 -2
  101. package/core/mobx/specs/flattened_list_types_of_types.tests.ts +35 -0
  102. package/core/mobx/specs/form_presenter.tests.ts +248 -124
  103. package/core/mobx/specs/merge_field_adapters_with_two_way_converter.ts +140 -0
  104. package/core/mobx/specs/merge_field_adapters_with_validators.tests.ts +259 -0
  105. package/core/mobx/types.ts +3 -3
  106. package/dist/index.cjs +527 -10412
  107. package/dist/index.d.cts +153 -111
  108. package/dist/index.d.ts +153 -111
  109. package/dist/index.js +527 -10420
  110. package/field_converters/chain_field_converter.ts +37 -23
  111. package/field_converters/identity_converter.ts +14 -10
  112. package/field_converters/integer_to_string_converter.ts +15 -9
  113. package/field_converters/list_converter.ts +8 -3
  114. package/field_converters/maybe_identity_converter.ts +7 -4
  115. package/field_converters/nullable_to_boolean_converter.ts +23 -16
  116. package/field_converters/select_value_type_converter.ts +86 -26
  117. package/field_converters/specs/chain_field_converter.tests.ts +302 -0
  118. package/field_converters/trimming_string_converter.ts +11 -6
  119. package/field_converters/validating_converter.ts +21 -11
  120. package/index.ts +9 -2
  121. package/mantine/create_checkbox.tsx +15 -8
  122. package/mantine/create_list.tsx +1 -4
  123. package/mantine/create_pill.tsx +2 -2
  124. package/mantine/create_radio.tsx +1 -1
  125. package/mantine/create_radio_group.tsx +8 -6
  126. package/mantine/create_text_input.tsx +20 -8
  127. package/mantine/create_value_input.tsx +17 -8
  128. package/mantine/error_renderer.ts +15 -0
  129. package/mantine/hooks.tsx +25 -51
  130. package/mantine/specs/__snapshots__/checkbox_hooks.tests.tsx.snap +126 -0
  131. package/mantine/specs/__snapshots__/radio_group_hooks.tests.tsx.snap +356 -0
  132. package/mantine/specs/__snapshots__/select_hooks.tests.tsx.snap +208 -12
  133. package/mantine/specs/__snapshots__/text_input_hooks.tests.tsx.snap +45 -0
  134. package/mantine/specs/__snapshots__/value_input_hooks.tests.tsx.snap +194 -8
  135. package/mantine/specs/checkbox_hooks.stories.tsx +47 -7
  136. package/mantine/specs/list_hooks.stories.tsx +2 -2
  137. package/mantine/specs/radio_group_hooks.stories.tsx +47 -7
  138. package/mantine/specs/select_hooks.stories.tsx +55 -8
  139. package/mantine/specs/text_input_hooks.stories.tsx +32 -7
  140. package/mantine/specs/value_input_hooks.stories.tsx +57 -16
  141. package/mantine/types.ts +5 -1
  142. package/package.json +20 -7
  143. package/tsconfig.json +1 -0
  144. package/types/error_of_field.ts +3 -0
  145. package/types/field.ts +1 -1
  146. package/types/field_converters.ts +21 -10
  147. package/types/flattened_validators_of_fields.ts +34 -0
  148. package/types/merge_validators.ts +80 -0
  149. package/types/specs/error_type_of_field.tests.ts +2 -2
  150. package/types/specs/flattened_validators_of_fields.tests.ts +93 -0
  151. package/types/specs/merge_validators.tests.ts +267 -0
  152. package/util/partial.tsx +200 -16
  153. package/.out/core/mobx/flattened_list_type_defs_of.d.ts +0 -8
  154. package/.out/field_validators/minimum_string_length_field_validator.d.ts +0 -2
  155. package/.out/field_validators/minimum_string_length_field_validator.js +0 -8
  156. package/.out/types/error_type_of_field.d.ts +0 -2
  157. package/.out/types/field_validator.d.ts +0 -3
  158. package/.out/types/flattened_form_fields_of.d.ts +0 -9
  159. package/.out/types/specs/flattened_form_fields_of.tests.js +0 -13
  160. package/core/mobx/flattened_list_type_defs_of.ts +0 -17
  161. package/core/mobx/specs/flattened_list_type_defs_of.tests.ts +0 -35
  162. package/field_validators/minimum_string_length_field_validator.ts +0 -13
  163. package/mantine/specs/__snapshots__/check_box_hooks.tests.tsx.snap +0 -227
  164. package/types/error_type_of_field.ts +0 -3
  165. package/types/field_validator.ts +0 -7
  166. package/types/flattened_form_fields_of.ts +0 -16
  167. package/types/specs/flattened_form_fields_of.tests.ts +0 -43
  168. /package/.out/core/mobx/{flattened_list_type_defs_of.js → field_adapters_of_values.js} +0 -0
  169. /package/.out/core/mobx/{specs/flattened_list_type_defs_of.tests.d.ts → flattened_list_types_of_type.js} +0 -0
  170. /package/.out/{types/error_type_of_field.js → core/mobx/form_fields_of_field_adapters.js} +0 -0
  171. /package/.out/{types/field_validator.js → core/mobx/specs/flattened_list_types_of_types.tests.d.ts} +0 -0
  172. /package/.out/{types/flattened_form_fields_of.js → core/mobx/specs/merge_field_adapters_with_two_way_converter.d.ts} +0 -0
  173. /package/.out/{types/specs/flattened_form_fields_of.tests.d.ts → core/mobx/specs/merge_field_adapters_with_validators.tests.d.ts} +0 -0
@@ -1,5 +1,183 @@
1
1
  // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
2
2
 
3
+ exports[`mantine radio group hooks > renders CustomError 1`] = `
4
+ <div>
5
+ <style
6
+ data-mantine-styles="classes"
7
+ >
8
+ @media (max-width: 35.99375em) {.mantine-visible-from-xs {display: none !important;}}@media (min-width: 36em) {.mantine-hidden-from-xs {display: none !important;}}@media (max-width: 47.99375em) {.mantine-visible-from-sm {display: none !important;}}@media (min-width: 48em) {.mantine-hidden-from-sm {display: none !important;}}@media (max-width: 61.99375em) {.mantine-visible-from-md {display: none !important;}}@media (min-width: 62em) {.mantine-hidden-from-md {display: none !important;}}@media (max-width: 74.99375em) {.mantine-visible-from-lg {display: none !important;}}@media (min-width: 75em) {.mantine-hidden-from-lg {display: none !important;}}@media (max-width: 87.99375em) {.mantine-visible-from-xl {display: none !important;}}@media (min-width: 88em) {.mantine-hidden-from-xl {display: none !important;}}
9
+ </style>
10
+ <div
11
+ class="m_46b77525 mantine-InputWrapper-root mantine-RadioGroup-root"
12
+ data-error="true"
13
+ >
14
+ <div
15
+ class="m_8fdc1311 mantine-InputWrapper-label mantine-RadioGroup-label"
16
+ id="mantine-1fu8n1fu8-label"
17
+ >
18
+ Radio Group
19
+ </div>
20
+ <div
21
+ aria-describedby="mantine-1fu8n1fu8-error"
22
+ aria-labelledby="mantine-1fu8n1fu8-label"
23
+ role="radiogroup"
24
+ >
25
+ <div
26
+ class="m_6d731127 mantine-Stack-root"
27
+ style="--stack-gap: var(--mantine-spacing-md); --stack-align: stretch; --stack-justify: flex-start;"
28
+ >
29
+ <div
30
+ class="m_f3f1af94 mantine-Radio-root m_5f75b09e mantine-Radio-root"
31
+ data-label-position="right"
32
+ style="--radio-color: var(--mantine-color-blue-filled);"
33
+ >
34
+ <div
35
+ class="m_5f6e695e mantine-Radio-body"
36
+ >
37
+ <div
38
+ class="m_89c4f5e4 mantine-Radio-inner"
39
+ data-label-position="right"
40
+ >
41
+ <input
42
+ class="mantine-focus-auto m_8a3dbb89 mantine-Radio-radio"
43
+ id="mantine-0cyk5rcyk"
44
+ name="$"
45
+ type="radio"
46
+ value="1"
47
+ />
48
+ <svg
49
+ aria-hidden="true"
50
+ class="m_f3ed6b2b mantine-Radio-icon"
51
+ fill="none"
52
+ viewBox="0 0 5 5"
53
+ xmlns="http://www.w3.org/2000/svg"
54
+ >
55
+ <circle
56
+ cx="2.5"
57
+ cy="2.5"
58
+ fill="currentColor"
59
+ r="2.5"
60
+ />
61
+ </svg>
62
+ </div>
63
+ <div
64
+ class="m_d3ea56bb mantine-Radio-labelWrapper"
65
+ >
66
+ <label
67
+ class="m_8ee546b8 mantine-Radio-label"
68
+ for="mantine-0cyk5rcyk"
69
+ >
70
+ One
71
+ </label>
72
+ </div>
73
+ </div>
74
+ </div>
75
+ <div
76
+ class="m_f3f1af94 mantine-Radio-root m_5f75b09e mantine-Radio-root"
77
+ data-checked="true"
78
+ data-label-position="right"
79
+ style="--radio-color: var(--mantine-color-blue-filled);"
80
+ >
81
+ <div
82
+ class="m_5f6e695e mantine-Radio-body"
83
+ >
84
+ <div
85
+ class="m_89c4f5e4 mantine-Radio-inner"
86
+ data-label-position="right"
87
+ >
88
+ <input
89
+ checked=""
90
+ class="mantine-focus-auto m_8a3dbb89 mantine-Radio-radio"
91
+ id="mantine-0px4bipx4"
92
+ name="$"
93
+ type="radio"
94
+ value="2"
95
+ />
96
+ <svg
97
+ aria-hidden="true"
98
+ class="m_f3ed6b2b mantine-Radio-icon"
99
+ fill="none"
100
+ viewBox="0 0 5 5"
101
+ xmlns="http://www.w3.org/2000/svg"
102
+ >
103
+ <circle
104
+ cx="2.5"
105
+ cy="2.5"
106
+ fill="currentColor"
107
+ r="2.5"
108
+ />
109
+ </svg>
110
+ </div>
111
+ <div
112
+ class="m_d3ea56bb mantine-Radio-labelWrapper"
113
+ >
114
+ <label
115
+ class="m_8ee546b8 mantine-Radio-label"
116
+ for="mantine-0px4bipx4"
117
+ >
118
+ Two
119
+ </label>
120
+ </div>
121
+ </div>
122
+ </div>
123
+ <div
124
+ class="m_f3f1af94 mantine-Radio-root m_5f75b09e mantine-Radio-root"
125
+ data-label-position="right"
126
+ style="--radio-color: var(--mantine-color-blue-filled);"
127
+ >
128
+ <div
129
+ class="m_5f6e695e mantine-Radio-body"
130
+ >
131
+ <div
132
+ class="m_89c4f5e4 mantine-Radio-inner"
133
+ data-label-position="right"
134
+ >
135
+ <input
136
+ class="mantine-focus-auto m_8a3dbb89 mantine-Radio-radio"
137
+ id="mantine-12voha2vo"
138
+ name="$"
139
+ type="radio"
140
+ value="3"
141
+ />
142
+ <svg
143
+ aria-hidden="true"
144
+ class="m_f3ed6b2b mantine-Radio-icon"
145
+ fill="none"
146
+ viewBox="0 0 5 5"
147
+ xmlns="http://www.w3.org/2000/svg"
148
+ >
149
+ <circle
150
+ cx="2.5"
151
+ cy="2.5"
152
+ fill="currentColor"
153
+ r="2.5"
154
+ />
155
+ </svg>
156
+ </div>
157
+ <div
158
+ class="m_d3ea56bb mantine-Radio-labelWrapper"
159
+ >
160
+ <label
161
+ class="m_8ee546b8 mantine-Radio-label"
162
+ for="mantine-12voha2vo"
163
+ >
164
+ Three
165
+ </label>
166
+ </div>
167
+ </div>
168
+ </div>
169
+ </div>
170
+ </div>
171
+ <p
172
+ class="m_8f816625 mantine-InputWrapper-error mantine-RadioGroup-error"
173
+ id="mantine-1fu8n1fu8-error"
174
+ >
175
+ custom error
176
+ </p>
177
+ </div>
178
+ </div>
179
+ `;
180
+
3
181
  exports[`mantine radio group hooks > renders Disabled 1`] = `
4
182
  <div>
5
183
  <style
@@ -347,6 +525,184 @@ exports[`mantine radio group hooks > renders Empty 1`] = `
347
525
  </div>
348
526
  `;
349
527
 
528
+ exports[`mantine radio group hooks > renders Error 1`] = `
529
+ <div>
530
+ <style
531
+ data-mantine-styles="classes"
532
+ >
533
+ @media (max-width: 35.99375em) {.mantine-visible-from-xs {display: none !important;}}@media (min-width: 36em) {.mantine-hidden-from-xs {display: none !important;}}@media (max-width: 47.99375em) {.mantine-visible-from-sm {display: none !important;}}@media (min-width: 48em) {.mantine-hidden-from-sm {display: none !important;}}@media (max-width: 61.99375em) {.mantine-visible-from-md {display: none !important;}}@media (min-width: 62em) {.mantine-hidden-from-md {display: none !important;}}@media (max-width: 74.99375em) {.mantine-visible-from-lg {display: none !important;}}@media (min-width: 75em) {.mantine-hidden-from-lg {display: none !important;}}@media (max-width: 87.99375em) {.mantine-visible-from-xl {display: none !important;}}@media (min-width: 88em) {.mantine-hidden-from-xl {display: none !important;}}
534
+ </style>
535
+ <div
536
+ class="m_46b77525 mantine-InputWrapper-root mantine-RadioGroup-root"
537
+ data-error="true"
538
+ >
539
+ <div
540
+ class="m_8fdc1311 mantine-InputWrapper-label mantine-RadioGroup-label"
541
+ id="mantine-1fu8n1fu8-label"
542
+ >
543
+ Radio Group
544
+ </div>
545
+ <div
546
+ aria-describedby="mantine-1fu8n1fu8-error"
547
+ aria-labelledby="mantine-1fu8n1fu8-label"
548
+ role="radiogroup"
549
+ >
550
+ <div
551
+ class="m_6d731127 mantine-Stack-root"
552
+ style="--stack-gap: var(--mantine-spacing-md); --stack-align: stretch; --stack-justify: flex-start;"
553
+ >
554
+ <div
555
+ class="m_f3f1af94 mantine-Radio-root m_5f75b09e mantine-Radio-root"
556
+ data-label-position="right"
557
+ style="--radio-color: var(--mantine-color-blue-filled);"
558
+ >
559
+ <div
560
+ class="m_5f6e695e mantine-Radio-body"
561
+ >
562
+ <div
563
+ class="m_89c4f5e4 mantine-Radio-inner"
564
+ data-label-position="right"
565
+ >
566
+ <input
567
+ class="mantine-focus-auto m_8a3dbb89 mantine-Radio-radio"
568
+ id="mantine-0cyk5rcyk"
569
+ name="$"
570
+ type="radio"
571
+ value="1"
572
+ />
573
+ <svg
574
+ aria-hidden="true"
575
+ class="m_f3ed6b2b mantine-Radio-icon"
576
+ fill="none"
577
+ viewBox="0 0 5 5"
578
+ xmlns="http://www.w3.org/2000/svg"
579
+ >
580
+ <circle
581
+ cx="2.5"
582
+ cy="2.5"
583
+ fill="currentColor"
584
+ r="2.5"
585
+ />
586
+ </svg>
587
+ </div>
588
+ <div
589
+ class="m_d3ea56bb mantine-Radio-labelWrapper"
590
+ >
591
+ <label
592
+ class="m_8ee546b8 mantine-Radio-label"
593
+ for="mantine-0cyk5rcyk"
594
+ >
595
+ One
596
+ </label>
597
+ </div>
598
+ </div>
599
+ </div>
600
+ <div
601
+ class="m_f3f1af94 mantine-Radio-root m_5f75b09e mantine-Radio-root"
602
+ data-checked="true"
603
+ data-label-position="right"
604
+ style="--radio-color: var(--mantine-color-blue-filled);"
605
+ >
606
+ <div
607
+ class="m_5f6e695e mantine-Radio-body"
608
+ >
609
+ <div
610
+ class="m_89c4f5e4 mantine-Radio-inner"
611
+ data-label-position="right"
612
+ >
613
+ <input
614
+ checked=""
615
+ class="mantine-focus-auto m_8a3dbb89 mantine-Radio-radio"
616
+ id="mantine-0px4bipx4"
617
+ name="$"
618
+ type="radio"
619
+ value="2"
620
+ />
621
+ <svg
622
+ aria-hidden="true"
623
+ class="m_f3ed6b2b mantine-Radio-icon"
624
+ fill="none"
625
+ viewBox="0 0 5 5"
626
+ xmlns="http://www.w3.org/2000/svg"
627
+ >
628
+ <circle
629
+ cx="2.5"
630
+ cy="2.5"
631
+ fill="currentColor"
632
+ r="2.5"
633
+ />
634
+ </svg>
635
+ </div>
636
+ <div
637
+ class="m_d3ea56bb mantine-Radio-labelWrapper"
638
+ >
639
+ <label
640
+ class="m_8ee546b8 mantine-Radio-label"
641
+ for="mantine-0px4bipx4"
642
+ >
643
+ Two
644
+ </label>
645
+ </div>
646
+ </div>
647
+ </div>
648
+ <div
649
+ class="m_f3f1af94 mantine-Radio-root m_5f75b09e mantine-Radio-root"
650
+ data-label-position="right"
651
+ style="--radio-color: var(--mantine-color-blue-filled);"
652
+ >
653
+ <div
654
+ class="m_5f6e695e mantine-Radio-body"
655
+ >
656
+ <div
657
+ class="m_89c4f5e4 mantine-Radio-inner"
658
+ data-label-position="right"
659
+ >
660
+ <input
661
+ class="mantine-focus-auto m_8a3dbb89 mantine-Radio-radio"
662
+ id="mantine-12voha2vo"
663
+ name="$"
664
+ type="radio"
665
+ value="3"
666
+ />
667
+ <svg
668
+ aria-hidden="true"
669
+ class="m_f3ed6b2b mantine-Radio-icon"
670
+ fill="none"
671
+ viewBox="0 0 5 5"
672
+ xmlns="http://www.w3.org/2000/svg"
673
+ >
674
+ <circle
675
+ cx="2.5"
676
+ cy="2.5"
677
+ fill="currentColor"
678
+ r="2.5"
679
+ />
680
+ </svg>
681
+ </div>
682
+ <div
683
+ class="m_d3ea56bb mantine-Radio-labelWrapper"
684
+ >
685
+ <label
686
+ class="m_8ee546b8 mantine-Radio-label"
687
+ for="mantine-12voha2vo"
688
+ >
689
+ Three
690
+ </label>
691
+ </div>
692
+ </div>
693
+ </div>
694
+ </div>
695
+ </div>
696
+ <p
697
+ class="m_8f816625 mantine-InputWrapper-error mantine-RadioGroup-error"
698
+ id="mantine-1fu8n1fu8-error"
699
+ >
700
+ error
701
+ </p>
702
+ </div>
703
+ </div>
704
+ `;
705
+
350
706
  exports[`mantine radio group hooks > renders Populated 1`] = `
351
707
  <div>
352
708
  <style
@@ -1,6 +1,6 @@
1
1
  // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
2
2
 
3
- exports[`mantine select hooks > renders EmptySelect 1`] = `
3
+ exports[`mantine select hooks > renders CustomErrorSelect 1`] = `
4
4
  <div>
5
5
  <style
6
6
  data-mantine-styles="classes"
@@ -9,12 +9,13 @@ exports[`mantine select hooks > renders EmptySelect 1`] = `
9
9
  </style>
10
10
  <div
11
11
  class="m_46b77525 mantine-InputWrapper-root mantine-Select-root"
12
+ data-error="true"
12
13
  >
13
14
  <label
14
15
  class="m_8fdc1311 mantine-InputWrapper-label mantine-Select-label"
15
16
  data-required="true"
16
- for="mantine-1fu8n1fu8"
17
- id="mantine-1fu8n1fu8-label"
17
+ for="mantine-12voha2vo"
18
+ id="mantine-12voha2vo-label"
18
19
  >
19
20
  Select
20
21
  <span
@@ -24,6 +25,147 @@ exports[`mantine select hooks > renders EmptySelect 1`] = `
24
25
  *
25
26
  </span>
26
27
  </label>
28
+ <div
29
+ class="m_6c018570 mantine-Input-wrapper mantine-Select-wrapper"
30
+ data-error="true"
31
+ data-pointer="true"
32
+ data-variant="default"
33
+ data-with-right-section="true"
34
+ style="--input-margin-bottom: calc(var(--mantine-spacing-xs) / 2); --input-right-section-pointer-events: none;"
35
+ >
36
+ <input
37
+ aria-describedby="mantine-12voha2vo-error"
38
+ aria-haspopup="listbox"
39
+ aria-invalid="true"
40
+ autocomplete="off"
41
+ class="m_8fb7ebe7 mantine-Input-input mantine-Select-input"
42
+ data-error="true"
43
+ data-variant="default"
44
+ id="mantine-12voha2vo"
45
+ readonly=""
46
+ required=""
47
+ value="c"
48
+ />
49
+ <div
50
+ class="m_82577fc2 mantine-Input-section mantine-Select-section"
51
+ data-position="right"
52
+ >
53
+ <svg
54
+ class="m_2943220b mantine-ComboboxChevron-chevron"
55
+ data-combobox-chevron="true"
56
+ data-error="[object Object]"
57
+ fill="none"
58
+ viewBox="0 0 15 15"
59
+ xmlns="http://www.w3.org/2000/svg"
60
+ >
61
+ <path
62
+ clip-rule="evenodd"
63
+ d="M4.93179 5.43179C4.75605 5.60753 4.75605 5.89245 4.93179 6.06819C5.10753 6.24392 5.39245 6.24392 5.56819 6.06819L7.49999 4.13638L9.43179 6.06819C9.60753 6.24392 9.89245 6.24392 10.0682 6.06819C10.2439 5.89245 10.2439 5.60753 10.0682 5.43179L7.81819 3.18179C7.73379 3.0974 7.61933 3.04999 7.49999 3.04999C7.38064 3.04999 7.26618 3.0974 7.18179 3.18179L4.93179 5.43179ZM10.0682 9.56819C10.2439 9.39245 10.2439 9.10753 10.0682 8.93179C9.89245 8.75606 9.60753 8.75606 9.43179 8.93179L7.49999 10.8636L5.56819 8.93179C5.39245 8.75606 5.10753 8.75606 4.93179 8.93179C4.75605 9.10753 4.75605 9.39245 4.93179 9.56819L7.18179 11.8182C7.35753 11.9939 7.64245 11.9939 7.81819 11.8182L10.0682 9.56819Z"
64
+ fill="currentColor"
65
+ fill-rule="evenodd"
66
+ />
67
+ </svg>
68
+ </div>
69
+ </div>
70
+ <p
71
+ class="m_8f816625 mantine-InputWrapper-error mantine-Select-error"
72
+ id="mantine-12voha2vo-error"
73
+ >
74
+ custom error
75
+ </p>
76
+ </div>
77
+ <input
78
+ name="$"
79
+ type="hidden"
80
+ value="c"
81
+ />
82
+ </div>
83
+ `;
84
+
85
+ exports[`mantine select hooks > renders DisabledSelect 1`] = `
86
+ <div>
87
+ <style
88
+ data-mantine-styles="classes"
89
+ >
90
+ @media (max-width: 35.99375em) {.mantine-visible-from-xs {display: none !important;}}@media (min-width: 36em) {.mantine-hidden-from-xs {display: none !important;}}@media (max-width: 47.99375em) {.mantine-visible-from-sm {display: none !important;}}@media (min-width: 48em) {.mantine-hidden-from-sm {display: none !important;}}@media (max-width: 61.99375em) {.mantine-visible-from-md {display: none !important;}}@media (min-width: 62em) {.mantine-hidden-from-md {display: none !important;}}@media (max-width: 74.99375em) {.mantine-visible-from-lg {display: none !important;}}@media (min-width: 75em) {.mantine-hidden-from-lg {display: none !important;}}@media (max-width: 87.99375em) {.mantine-visible-from-xl {display: none !important;}}@media (min-width: 88em) {.mantine-hidden-from-xl {display: none !important;}}
91
+ </style>
92
+ <div
93
+ class="m_46b77525 mantine-InputWrapper-root mantine-Select-root"
94
+ >
95
+ <label
96
+ class="m_8fdc1311 mantine-InputWrapper-label mantine-Select-label"
97
+ for="mantine-12voha2vo"
98
+ id="mantine-12voha2vo-label"
99
+ >
100
+ Select
101
+ </label>
102
+ <div
103
+ class="m_6c018570 mantine-Input-wrapper mantine-Select-wrapper"
104
+ data-disabled="true"
105
+ data-pointer="true"
106
+ data-variant="default"
107
+ data-with-right-section="true"
108
+ style="--input-right-section-pointer-events: none;"
109
+ >
110
+ <input
111
+ aria-haspopup="listbox"
112
+ aria-invalid="false"
113
+ autocomplete="off"
114
+ class="m_8fb7ebe7 mantine-Input-input mantine-Select-input"
115
+ data-disabled="true"
116
+ data-variant="default"
117
+ disabled=""
118
+ id="mantine-12voha2vo"
119
+ readonly=""
120
+ value="a"
121
+ />
122
+ <div
123
+ class="m_82577fc2 mantine-Input-section mantine-Select-section"
124
+ data-position="right"
125
+ >
126
+ <svg
127
+ class="m_2943220b mantine-ComboboxChevron-chevron"
128
+ data-combobox-chevron="true"
129
+ fill="none"
130
+ viewBox="0 0 15 15"
131
+ xmlns="http://www.w3.org/2000/svg"
132
+ >
133
+ <path
134
+ clip-rule="evenodd"
135
+ d="M4.93179 5.43179C4.75605 5.60753 4.75605 5.89245 4.93179 6.06819C5.10753 6.24392 5.39245 6.24392 5.56819 6.06819L7.49999 4.13638L9.43179 6.06819C9.60753 6.24392 9.89245 6.24392 10.0682 6.06819C10.2439 5.89245 10.2439 5.60753 10.0682 5.43179L7.81819 3.18179C7.73379 3.0974 7.61933 3.04999 7.49999 3.04999C7.38064 3.04999 7.26618 3.0974 7.18179 3.18179L4.93179 5.43179ZM10.0682 9.56819C10.2439 9.39245 10.2439 9.10753 10.0682 8.93179C9.89245 8.75606 9.60753 8.75606 9.43179 8.93179L7.49999 10.8636L5.56819 8.93179C5.39245 8.75606 5.10753 8.75606 4.93179 8.93179C4.75605 9.10753 4.75605 9.39245 4.93179 9.56819L7.18179 11.8182C7.35753 11.9939 7.64245 11.9939 7.81819 11.8182L10.0682 9.56819Z"
136
+ fill="currentColor"
137
+ fill-rule="evenodd"
138
+ />
139
+ </svg>
140
+ </div>
141
+ </div>
142
+ </div>
143
+ <input
144
+ disabled=""
145
+ name="$"
146
+ type="hidden"
147
+ value="a"
148
+ />
149
+ </div>
150
+ `;
151
+
152
+ exports[`mantine select hooks > renders EmptySelect 1`] = `
153
+ <div>
154
+ <style
155
+ data-mantine-styles="classes"
156
+ >
157
+ @media (max-width: 35.99375em) {.mantine-visible-from-xs {display: none !important;}}@media (min-width: 36em) {.mantine-hidden-from-xs {display: none !important;}}@media (max-width: 47.99375em) {.mantine-visible-from-sm {display: none !important;}}@media (min-width: 48em) {.mantine-hidden-from-sm {display: none !important;}}@media (max-width: 61.99375em) {.mantine-visible-from-md {display: none !important;}}@media (min-width: 62em) {.mantine-hidden-from-md {display: none !important;}}@media (max-width: 74.99375em) {.mantine-visible-from-lg {display: none !important;}}@media (min-width: 75em) {.mantine-hidden-from-lg {display: none !important;}}@media (max-width: 87.99375em) {.mantine-visible-from-xl {display: none !important;}}@media (min-width: 88em) {.mantine-hidden-from-xl {display: none !important;}}
158
+ </style>
159
+ <div
160
+ class="m_46b77525 mantine-InputWrapper-root mantine-Select-root"
161
+ >
162
+ <label
163
+ class="m_8fdc1311 mantine-InputWrapper-label mantine-Select-label"
164
+ for="mantine-1fu8n1fu8"
165
+ id="mantine-1fu8n1fu8-label"
166
+ >
167
+ Select
168
+ </label>
27
169
  <div
28
170
  class="m_6c018570 mantine-Input-wrapper mantine-Select-wrapper"
29
171
  data-pointer="true"
@@ -39,7 +181,6 @@ exports[`mantine select hooks > renders EmptySelect 1`] = `
39
181
  data-variant="default"
40
182
  id="mantine-1fu8n1fu8"
41
183
  readonly=""
42
- required=""
43
184
  value=""
44
185
  />
45
186
  <div
@@ -84,17 +225,10 @@ exports[`mantine select hooks > renders InvalidSelect 1`] = `
84
225
  >
85
226
  <label
86
227
  class="m_8fdc1311 mantine-InputWrapper-label mantine-Select-label"
87
- data-required="true"
88
228
  for="mantine-12voha2vo"
89
229
  id="mantine-12voha2vo-label"
90
230
  >
91
231
  Select
92
- <span
93
- aria-hidden="true"
94
- class="m_78a94662 mantine-InputWrapper-required mantine-Select-required"
95
- >
96
- *
97
- </span>
98
232
  </label>
99
233
  <div
100
234
  class="m_6c018570 mantine-Input-wrapper mantine-Select-wrapper"
@@ -114,7 +248,6 @@ exports[`mantine select hooks > renders InvalidSelect 1`] = `
114
248
  data-variant="default"
115
249
  id="mantine-12voha2vo"
116
250
  readonly=""
117
- required=""
118
251
  value=""
119
252
  />
120
253
  <div
@@ -154,6 +287,69 @@ exports[`mantine select hooks > renders InvalidSelect 1`] = `
154
287
  `;
155
288
 
156
289
  exports[`mantine select hooks > renders PopulatedSelect 1`] = `
290
+ <div>
291
+ <style
292
+ data-mantine-styles="classes"
293
+ >
294
+ @media (max-width: 35.99375em) {.mantine-visible-from-xs {display: none !important;}}@media (min-width: 36em) {.mantine-hidden-from-xs {display: none !important;}}@media (max-width: 47.99375em) {.mantine-visible-from-sm {display: none !important;}}@media (min-width: 48em) {.mantine-hidden-from-sm {display: none !important;}}@media (max-width: 61.99375em) {.mantine-visible-from-md {display: none !important;}}@media (min-width: 62em) {.mantine-hidden-from-md {display: none !important;}}@media (max-width: 74.99375em) {.mantine-visible-from-lg {display: none !important;}}@media (min-width: 75em) {.mantine-hidden-from-lg {display: none !important;}}@media (max-width: 87.99375em) {.mantine-visible-from-xl {display: none !important;}}@media (min-width: 88em) {.mantine-hidden-from-xl {display: none !important;}}
295
+ </style>
296
+ <div
297
+ class="m_46b77525 mantine-InputWrapper-root mantine-Select-root"
298
+ >
299
+ <label
300
+ class="m_8fdc1311 mantine-InputWrapper-label mantine-Select-label"
301
+ for="mantine-12voha2vo"
302
+ id="mantine-12voha2vo-label"
303
+ >
304
+ Select
305
+ </label>
306
+ <div
307
+ class="m_6c018570 mantine-Input-wrapper mantine-Select-wrapper"
308
+ data-pointer="true"
309
+ data-variant="default"
310
+ data-with-right-section="true"
311
+ style="--input-right-section-pointer-events: none;"
312
+ >
313
+ <input
314
+ aria-haspopup="listbox"
315
+ aria-invalid="false"
316
+ autocomplete="off"
317
+ class="m_8fb7ebe7 mantine-Input-input mantine-Select-input"
318
+ data-variant="default"
319
+ id="mantine-12voha2vo"
320
+ readonly=""
321
+ value="a"
322
+ />
323
+ <div
324
+ class="m_82577fc2 mantine-Input-section mantine-Select-section"
325
+ data-position="right"
326
+ >
327
+ <svg
328
+ class="m_2943220b mantine-ComboboxChevron-chevron"
329
+ data-combobox-chevron="true"
330
+ fill="none"
331
+ viewBox="0 0 15 15"
332
+ xmlns="http://www.w3.org/2000/svg"
333
+ >
334
+ <path
335
+ clip-rule="evenodd"
336
+ d="M4.93179 5.43179C4.75605 5.60753 4.75605 5.89245 4.93179 6.06819C5.10753 6.24392 5.39245 6.24392 5.56819 6.06819L7.49999 4.13638L9.43179 6.06819C9.60753 6.24392 9.89245 6.24392 10.0682 6.06819C10.2439 5.89245 10.2439 5.60753 10.0682 5.43179L7.81819 3.18179C7.73379 3.0974 7.61933 3.04999 7.49999 3.04999C7.38064 3.04999 7.26618 3.0974 7.18179 3.18179L4.93179 5.43179ZM10.0682 9.56819C10.2439 9.39245 10.2439 9.10753 10.0682 8.93179C9.89245 8.75606 9.60753 8.75606 9.43179 8.93179L7.49999 10.8636L5.56819 8.93179C5.39245 8.75606 5.10753 8.75606 4.93179 8.93179C4.75605 9.10753 4.75605 9.39245 4.93179 9.56819L7.18179 11.8182C7.35753 11.9939 7.64245 11.9939 7.81819 11.8182L10.0682 9.56819Z"
337
+ fill="currentColor"
338
+ fill-rule="evenodd"
339
+ />
340
+ </svg>
341
+ </div>
342
+ </div>
343
+ </div>
344
+ <input
345
+ name="$"
346
+ type="hidden"
347
+ value="a"
348
+ />
349
+ </div>
350
+ `;
351
+
352
+ exports[`mantine select hooks > renders RequiredSelect 1`] = `
157
353
  <div>
158
354
  <style
159
355
  data-mantine-styles="classes"
@@ -1,5 +1,50 @@
1
1
  // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
2
2
 
3
+ exports[`mantine checkbox hooks > renders CustomError 1`] = `
4
+ <div>
5
+ <style
6
+ data-mantine-styles="classes"
7
+ >
8
+ @media (max-width: 35.99375em) {.mantine-visible-from-xs {display: none !important;}}@media (min-width: 36em) {.mantine-hidden-from-xs {display: none !important;}}@media (max-width: 47.99375em) {.mantine-visible-from-sm {display: none !important;}}@media (min-width: 48em) {.mantine-hidden-from-sm {display: none !important;}}@media (max-width: 61.99375em) {.mantine-visible-from-md {display: none !important;}}@media (min-width: 62em) {.mantine-hidden-from-md {display: none !important;}}@media (max-width: 74.99375em) {.mantine-visible-from-lg {display: none !important;}}@media (min-width: 75em) {.mantine-hidden-from-lg {display: none !important;}}@media (max-width: 87.99375em) {.mantine-visible-from-xl {display: none !important;}}@media (min-width: 88em) {.mantine-hidden-from-xl {display: none !important;}}
9
+ </style>
10
+ <div
11
+ class="m_46b77525 mantine-InputWrapper-root mantine-TextInput-root"
12
+ data-error="true"
13
+ >
14
+ <label
15
+ class="m_8fdc1311 mantine-InputWrapper-label mantine-TextInput-label"
16
+ for="mantine-0cyk5rcyk"
17
+ id="mantine-0cyk5rcyk-label"
18
+ >
19
+ Text Input
20
+ </label>
21
+ <div
22
+ class="m_6c018570 mantine-Input-wrapper mantine-TextInput-wrapper"
23
+ data-error="true"
24
+ data-variant="default"
25
+ style="--input-margin-bottom: calc(var(--mantine-spacing-xs) / 2);"
26
+ >
27
+ <input
28
+ aria-describedby="mantine-0cyk5rcyk-error"
29
+ aria-invalid="true"
30
+ class="m_8fb7ebe7 mantine-Input-input mantine-TextInput-input"
31
+ data-error="true"
32
+ data-variant="default"
33
+ id="mantine-0cyk5rcyk"
34
+ name="$"
35
+ value="xxx"
36
+ />
37
+ </div>
38
+ <p
39
+ class="m_8f816625 mantine-InputWrapper-error mantine-TextInput-error"
40
+ id="mantine-0cyk5rcyk-error"
41
+ >
42
+ custom error
43
+ </p>
44
+ </div>
45
+ </div>
46
+ `;
47
+
3
48
  exports[`mantine checkbox hooks > renders Disabled 1`] = `
4
49
  <div>
5
50
  <style