@gov-design-system-ce/components 0.0.35 → 0.0.37

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 (278) hide show
  1. package/dist/cjs/core.cjs.js +1 -1
  2. package/dist/cjs/{form-62c6a8c6.js → form-8c6daa83.js} +8 -8
  3. package/dist/cjs/form-8c6daa83.js.map +1 -0
  4. package/dist/cjs/gov-app.cjs.entry.js +1190 -637
  5. package/dist/cjs/gov-app.cjs.entry.js.map +1 -1
  6. package/dist/cjs/gov-badge.cjs.entry.js +1 -1
  7. package/dist/cjs/gov-badge.cjs.entry.js.map +1 -1
  8. package/dist/cjs/gov-button.cjs.entry.js +1 -1
  9. package/dist/cjs/gov-button.cjs.entry.js.map +1 -1
  10. package/dist/cjs/gov-control-group.cjs.entry.js +62 -0
  11. package/dist/cjs/gov-control-group.cjs.entry.js.map +1 -0
  12. package/dist/cjs/gov-form-checkbox.cjs.entry.js +1 -1
  13. package/dist/cjs/gov-form-control.cjs.entry.js +35 -7
  14. package/dist/cjs/gov-form-control.cjs.entry.js.map +1 -1
  15. package/dist/cjs/gov-form-file.cjs.entry.js +2 -2
  16. package/dist/cjs/gov-form-file.cjs.entry.js.map +1 -1
  17. package/dist/cjs/gov-form-input.cjs.entry.js +6 -6
  18. package/dist/cjs/gov-form-input.cjs.entry.js.map +1 -1
  19. package/dist/cjs/gov-form-label.cjs.entry.js +1 -1
  20. package/dist/cjs/gov-form-label.cjs.entry.js.map +1 -1
  21. package/dist/cjs/gov-form-multi-select.cjs.entry.js +2 -2
  22. package/dist/cjs/gov-form-multi-select.cjs.entry.js.map +1 -1
  23. package/dist/cjs/gov-form-radio.cjs.entry.js +1 -1
  24. package/dist/cjs/gov-form-search.cjs.entry.js +5 -1
  25. package/dist/cjs/gov-form-search.cjs.entry.js.map +1 -1
  26. package/dist/cjs/gov-form-select.cjs.entry.js +13 -8
  27. package/dist/cjs/gov-form-select.cjs.entry.js.map +1 -1
  28. package/dist/cjs/gov-form-switch.cjs.entry.js +1 -1
  29. package/dist/cjs/gov-icon.cjs.entry.js +1 -1
  30. package/dist/cjs/gov-pagination.cjs.entry.js +10 -3
  31. package/dist/cjs/gov-pagination.cjs.entry.js.map +1 -1
  32. package/dist/cjs/gov-wizzard-item.cjs.entry.js +13 -15
  33. package/dist/cjs/gov-wizzard-item.cjs.entry.js.map +1 -1
  34. package/dist/cjs/index-29ac07f6.js +4 -0
  35. package/dist/cjs/loader.cjs.js +1 -1
  36. package/dist/collection/collection-manifest.json +1 -0
  37. package/dist/collection/components/gov-accordion/gov-accordion-item.css +3 -0
  38. package/dist/collection/components/gov-accordion/gov-accordion.css +3 -0
  39. package/dist/collection/components/gov-alert/gov-alert.css +3 -0
  40. package/dist/collection/components/gov-app/gov-app.css +3 -0
  41. package/dist/collection/components/gov-app/gov-app.js +10 -8
  42. package/dist/collection/components/gov-app/gov-app.js.map +1 -1
  43. package/dist/collection/components/gov-attachments/gov-attachments-item.css +3 -0
  44. package/dist/collection/components/gov-attachments/gov-attachments.css +3 -0
  45. package/dist/collection/components/gov-backdrop/gov-backdrop.css +3 -0
  46. package/dist/collection/components/gov-badge/gov-badge.css +6 -3
  47. package/dist/collection/components/gov-breadcrumbs/gov-breadcrumbs.css +3 -0
  48. package/dist/collection/components/gov-button/gov-button.css +3 -3
  49. package/dist/collection/components/gov-card/gov-card.css +3 -0
  50. package/dist/collection/components/gov-container/gov-container.css +3 -0
  51. package/dist/collection/components/gov-control-group/constants.js +7 -0
  52. package/dist/collection/components/gov-control-group/constants.js.map +1 -0
  53. package/dist/collection/components/gov-control-group/gov-control-group.css +268 -0
  54. package/dist/collection/components/gov-control-group/gov-control-group.js +137 -0
  55. package/dist/collection/components/gov-control-group/gov-control-group.js.map +1 -0
  56. package/dist/collection/components/gov-cookiebar/gov-cookiebar.css +3 -0
  57. package/dist/collection/components/gov-empty/gov-empty.css +3 -0
  58. package/dist/collection/components/gov-error-code/gov-error-code.css +3 -0
  59. package/dist/collection/components/gov-form/autocomplete/gov-form-autocomplete.css +3 -0
  60. package/dist/collection/components/gov-form/checkbox/gov-form-checkbox.css +3 -0
  61. package/dist/collection/components/gov-form/control/gov-form-control.css +3 -0
  62. package/dist/collection/components/gov-form/control/gov-form-control.js +35 -10
  63. package/dist/collection/components/gov-form/control/gov-form-control.js.map +1 -1
  64. package/dist/collection/components/gov-form/file/gov-form-file.css +10 -0
  65. package/dist/collection/components/gov-form/group/gov-form-group.css +3 -0
  66. package/dist/collection/components/gov-form/input/constants.js +1 -1
  67. package/dist/collection/components/gov-form/input/constants.js.map +1 -1
  68. package/dist/collection/components/gov-form/input/gov-form-input.css +103 -50
  69. package/dist/collection/components/gov-form/input/gov-form-input.js +9 -9
  70. package/dist/collection/components/gov-form/input/gov-form-input.js.map +1 -1
  71. package/dist/collection/components/gov-form/label/gov-form-label.css +3 -0
  72. package/dist/collection/components/gov-form/label/gov-form-label.js +1 -1
  73. package/dist/collection/components/gov-form/label/gov-form-label.js.map +1 -1
  74. package/dist/collection/components/gov-form/message/gov-form-message.css +3 -0
  75. package/dist/collection/components/gov-form/multiselect/gov-form-multi-select.css +103 -50
  76. package/dist/collection/components/gov-form/password-power/gov-form-password-power.css +3 -0
  77. package/dist/collection/components/gov-form/radio/gov-form-radio.css +3 -0
  78. package/dist/collection/components/gov-form/search/constants.js +3 -0
  79. package/dist/collection/components/gov-form/search/constants.js.map +1 -1
  80. package/dist/collection/components/gov-form/search/gov-form-search.css +9 -1
  81. package/dist/collection/components/gov-form/search/gov-form-search.js +30 -0
  82. package/dist/collection/components/gov-form/search/gov-form-search.js.map +1 -1
  83. package/dist/collection/components/gov-form/select/gov-form-select.css +103 -50
  84. package/dist/collection/components/gov-form/select/gov-form-select.js +12 -5
  85. package/dist/collection/components/gov-form/select/gov-form-select.js.map +1 -1
  86. package/dist/collection/components/gov-form/switch/gov-form-switch.css +3 -0
  87. package/dist/collection/components/gov-grid/gov-grid-item.css +3 -0
  88. package/dist/collection/components/gov-grid/gov-grid.css +3 -0
  89. package/dist/collection/components/gov-icon/gov-icon.css +3 -0
  90. package/dist/collection/components/gov-layout/gov-layout-column.css +3 -0
  91. package/dist/collection/components/gov-layout/gov-layout.css +3 -0
  92. package/dist/collection/components/gov-loading/loading/gov-loading.css +3 -0
  93. package/dist/collection/components/gov-loading/skeleton/gov-skeleton.css +3 -0
  94. package/dist/collection/components/gov-message/gov-message.css +3 -0
  95. package/dist/collection/components/gov-modal/gov-modal.css +3 -0
  96. package/dist/collection/components/gov-nav/gov-nav-item.css +3 -0
  97. package/dist/collection/components/gov-nav/gov-nav.css +3 -0
  98. package/dist/collection/components/gov-pagination/gov-pagination.css +3 -0
  99. package/dist/collection/components/gov-pagination/gov-pagination.js +19 -3
  100. package/dist/collection/components/gov-pagination/gov-pagination.js.map +1 -1
  101. package/dist/collection/components/gov-promp/gov-prompt.css +3 -0
  102. package/dist/collection/components/gov-side-nav/gov-side-nav-item.css +3 -0
  103. package/dist/collection/components/gov-side-nav/gov-side-nav.css +3 -0
  104. package/dist/collection/components/gov-spacer/gov-spacer.css +3 -0
  105. package/dist/collection/components/gov-statsbar/gov-statsbar-item.css +3 -0
  106. package/dist/collection/components/gov-statsbar/gov-statsbar.css +3 -0
  107. package/dist/collection/components/gov-stepper/gov-stepper-item.css +3 -0
  108. package/dist/collection/components/gov-stepper/gov-stepper.css +3 -0
  109. package/dist/collection/components/gov-tabs/gov-tabs-item.css +3 -0
  110. package/dist/collection/components/gov-tabs/gov-tabs.css +3 -0
  111. package/dist/collection/components/gov-tile/container/gov-tiles.css +3 -0
  112. package/dist/collection/components/gov-tile/gov-tile.css +3 -0
  113. package/dist/collection/components/gov-toast/gov-toast.css +3 -0
  114. package/dist/collection/components/gov-tooltip/gov-tooltip-content.css +3 -0
  115. package/dist/collection/components/gov-tooltip/gov-tooltip.css +3 -0
  116. package/dist/collection/components/gov-wizzard/gov-wizzard-item.css +3 -0
  117. package/dist/collection/components/gov-wizzard/gov-wizzard-item.js +29 -36
  118. package/dist/collection/components/gov-wizzard/gov-wizzard-item.js.map +1 -1
  119. package/dist/collection/components/gov-wizzard/gov-wizzard-item.types.js +2 -0
  120. package/dist/collection/components/gov-wizzard/gov-wizzard-item.types.js.map +1 -0
  121. package/dist/collection/components/gov-wizzard/gov-wizzard.css +3 -0
  122. package/dist/collection/pages/Button.js +41 -0
  123. package/dist/collection/pages/Button.js.map +1 -1
  124. package/dist/collection/pages/ControlGroup.js +324 -0
  125. package/dist/collection/pages/ControlGroup.js.map +1 -0
  126. package/dist/collection/pages/Forms.js +369 -206
  127. package/dist/collection/pages/Forms.js.map +1 -1
  128. package/dist/collection/pages/Pagination.js +2 -2
  129. package/dist/collection/pages/Pagination.js.map +1 -1
  130. package/dist/collection/pages/Tooltip.js +24 -0
  131. package/dist/collection/pages/Tooltip.js.map +1 -1
  132. package/dist/components/form.js +16 -16
  133. package/dist/components/form.js.map +1 -1
  134. package/dist/components/gov-app.js +1190 -637
  135. package/dist/components/gov-app.js.map +1 -1
  136. package/dist/components/gov-badge2.js +1 -1
  137. package/dist/components/gov-badge2.js.map +1 -1
  138. package/dist/components/gov-button2.js +1 -1
  139. package/dist/components/gov-button2.js.map +1 -1
  140. package/dist/components/gov-control-group.d.ts +11 -0
  141. package/dist/components/gov-control-group.js +75 -0
  142. package/dist/components/gov-control-group.js.map +1 -0
  143. package/dist/components/gov-form-control.js +35 -7
  144. package/dist/components/gov-form-control.js.map +1 -1
  145. package/dist/components/gov-form-file.js +1 -1
  146. package/dist/components/gov-form-file.js.map +1 -1
  147. package/dist/components/gov-form-input2.js +5 -5
  148. package/dist/components/gov-form-input2.js.map +1 -1
  149. package/dist/components/gov-form-label.js +1 -1
  150. package/dist/components/gov-form-label.js.map +1 -1
  151. package/dist/components/gov-form-multi-select.js +1 -1
  152. package/dist/components/gov-form-multi-select.js.map +1 -1
  153. package/dist/components/gov-form-search.js +8 -2
  154. package/dist/components/gov-form-search.js.map +1 -1
  155. package/dist/components/gov-form-select2.js +12 -7
  156. package/dist/components/gov-form-select2.js.map +1 -1
  157. package/dist/components/gov-icon2.js +1 -1
  158. package/dist/components/gov-pagination.js +10 -3
  159. package/dist/components/gov-pagination.js.map +1 -1
  160. package/dist/components/gov-wizzard-item.js +14 -17
  161. package/dist/components/gov-wizzard-item.js.map +1 -1
  162. package/dist/components/index.d.ts +1 -0
  163. package/dist/components/index.js +1 -0
  164. package/dist/components/index.js.map +1 -1
  165. package/dist/core/core.esm.js +1 -1
  166. package/dist/core/core.esm.js.map +1 -1
  167. package/dist/core/p-00c4dc0d.entry.js +2 -0
  168. package/dist/core/p-00c4dc0d.entry.js.map +1 -0
  169. package/dist/core/p-06e938d7.entry.js +2 -0
  170. package/dist/core/p-06e938d7.entry.js.map +1 -0
  171. package/dist/core/{p-d14130ac.entry.js → p-1bdec1f4.entry.js} +2 -2
  172. package/dist/core/{p-e3b56738.entry.js → p-227a9e9b.entry.js} +2 -2
  173. package/dist/core/p-3a69322b.entry.js +2 -0
  174. package/dist/core/p-3a69322b.entry.js.map +1 -0
  175. package/dist/core/p-61af5a2c.js +2 -0
  176. package/dist/core/p-61af5a2c.js.map +1 -0
  177. package/dist/core/{p-fe1ee53b.entry.js → p-63ef7826.entry.js} +2 -2
  178. package/dist/core/p-63ef7826.entry.js.map +1 -0
  179. package/dist/core/p-6dc65816.entry.js +2 -0
  180. package/dist/core/p-6dc65816.entry.js.map +1 -0
  181. package/dist/core/{p-d1275fa8.entry.js → p-9584f413.entry.js} +2 -2
  182. package/dist/core/p-9584f413.entry.js.map +1 -0
  183. package/dist/core/p-9bd90cc4.entry.js +2 -0
  184. package/dist/core/p-9bd90cc4.entry.js.map +1 -0
  185. package/dist/core/{p-d9b4bc20.entry.js → p-9fbee429.entry.js} +2 -2
  186. package/dist/core/p-9fbee429.entry.js.map +1 -0
  187. package/dist/core/{p-d37f03e0.entry.js → p-bbbc4e43.entry.js} +2 -2
  188. package/dist/core/{p-a8ef7292.entry.js → p-c289af04.entry.js} +2 -2
  189. package/dist/core/p-c289af04.entry.js.map +1 -0
  190. package/dist/core/p-c39004f5.entry.js +2 -0
  191. package/dist/core/p-c39004f5.entry.js.map +1 -0
  192. package/dist/core/{p-5a2a9cde.entry.js → p-c69cd34e.entry.js} +2 -2
  193. package/dist/core/p-cc9e9a31.entry.js +2 -0
  194. package/dist/core/{p-a423b62a.entry.js.map → p-cc9e9a31.entry.js.map} +1 -1
  195. package/dist/core/p-ef7a1780.entry.js +2 -0
  196. package/dist/core/p-ef7a1780.entry.js.map +1 -0
  197. package/dist/core/p-fd555dce.entry.js +2 -0
  198. package/dist/core/{p-35aadeeb.entry.js.map → p-fd555dce.entry.js.map} +1 -1
  199. package/dist/custom-elements/index.d.ts +6 -0
  200. package/dist/custom-elements/index.js +1 -1
  201. package/dist/custom-elements/index.js.map +1 -1
  202. package/dist/esm/core.js +1 -1
  203. package/dist/esm/{form-613741a5.js → form-cd65d95e.js} +8 -8
  204. package/dist/esm/form-cd65d95e.js.map +1 -0
  205. package/dist/esm/gov-app.entry.js +1190 -637
  206. package/dist/esm/gov-app.entry.js.map +1 -1
  207. package/dist/esm/gov-badge.entry.js +1 -1
  208. package/dist/esm/gov-badge.entry.js.map +1 -1
  209. package/dist/esm/gov-button.entry.js +1 -1
  210. package/dist/esm/gov-button.entry.js.map +1 -1
  211. package/dist/esm/gov-control-group.entry.js +58 -0
  212. package/dist/esm/gov-control-group.entry.js.map +1 -0
  213. package/dist/esm/gov-form-checkbox.entry.js +1 -1
  214. package/dist/esm/gov-form-control.entry.js +35 -7
  215. package/dist/esm/gov-form-control.entry.js.map +1 -1
  216. package/dist/esm/gov-form-file.entry.js +2 -2
  217. package/dist/esm/gov-form-file.entry.js.map +1 -1
  218. package/dist/esm/gov-form-input.entry.js +6 -6
  219. package/dist/esm/gov-form-input.entry.js.map +1 -1
  220. package/dist/esm/gov-form-label.entry.js +1 -1
  221. package/dist/esm/gov-form-label.entry.js.map +1 -1
  222. package/dist/esm/gov-form-multi-select.entry.js +2 -2
  223. package/dist/esm/gov-form-multi-select.entry.js.map +1 -1
  224. package/dist/esm/gov-form-radio.entry.js +1 -1
  225. package/dist/esm/gov-form-search.entry.js +5 -1
  226. package/dist/esm/gov-form-search.entry.js.map +1 -1
  227. package/dist/esm/gov-form-select.entry.js +13 -8
  228. package/dist/esm/gov-form-select.entry.js.map +1 -1
  229. package/dist/esm/gov-form-switch.entry.js +1 -1
  230. package/dist/esm/gov-icon.entry.js +1 -1
  231. package/dist/esm/gov-pagination.entry.js +10 -3
  232. package/dist/esm/gov-pagination.entry.js.map +1 -1
  233. package/dist/esm/gov-wizzard-item.entry.js +13 -15
  234. package/dist/esm/gov-wizzard-item.entry.js.map +1 -1
  235. package/dist/esm/index-b010bfb4.js +4 -0
  236. package/dist/esm/loader.js +1 -1
  237. package/dist/hydrate/index.js +1531 -880
  238. package/dist/types/components/gov-app/gov-app.d.ts +9 -8
  239. package/dist/types/components/gov-control-group/constants.d.ts +7 -0
  240. package/dist/types/components/gov-control-group/gov-control-group.d.ts +29 -0
  241. package/dist/types/components/gov-form/control/gov-form-control.d.ts +2 -1
  242. package/dist/types/components/gov-form/input/constants.d.ts +1 -1
  243. package/dist/types/components/gov-form/input/gov-form-input.d.ts +1 -2
  244. package/dist/types/components/gov-form/search/constants.d.ts +4 -0
  245. package/dist/types/components/gov-form/search/gov-form-search.d.ts +5 -0
  246. package/dist/types/components/gov-form/select/gov-form-select.d.ts +2 -0
  247. package/dist/types/components/gov-pagination/gov-pagination.d.ts +1 -0
  248. package/dist/types/components/gov-wizzard/gov-wizzard-item.d.ts +7 -8
  249. package/dist/types/components/gov-wizzard/gov-wizzard-item.types.d.ts +4 -0
  250. package/dist/types/components.d.ts +61 -5
  251. package/dist/types/pages/ControlGroup.d.ts +3 -0
  252. package/package.json +1 -1
  253. package/dist/cjs/form-62c6a8c6.js.map +0 -1
  254. package/dist/core/p-0a300d3e.entry.js +0 -2
  255. package/dist/core/p-0a300d3e.entry.js.map +0 -1
  256. package/dist/core/p-35aadeeb.entry.js +0 -2
  257. package/dist/core/p-37f6b4ef.entry.js +0 -2
  258. package/dist/core/p-37f6b4ef.entry.js.map +0 -1
  259. package/dist/core/p-7e524b49.js +0 -2
  260. package/dist/core/p-7e524b49.js.map +0 -1
  261. package/dist/core/p-a423b62a.entry.js +0 -2
  262. package/dist/core/p-a825183a.entry.js +0 -2
  263. package/dist/core/p-a825183a.entry.js.map +0 -1
  264. package/dist/core/p-a8ef7292.entry.js.map +0 -1
  265. package/dist/core/p-bbc765ca.entry.js +0 -2
  266. package/dist/core/p-bbc765ca.entry.js.map +0 -1
  267. package/dist/core/p-d1275fa8.entry.js.map +0 -1
  268. package/dist/core/p-d9b4bc20.entry.js.map +0 -1
  269. package/dist/core/p-e4bb6114.entry.js +0 -2
  270. package/dist/core/p-e4bb6114.entry.js.map +0 -1
  271. package/dist/core/p-e6904513.entry.js +0 -2
  272. package/dist/core/p-e6904513.entry.js.map +0 -1
  273. package/dist/core/p-fe1ee53b.entry.js.map +0 -1
  274. package/dist/esm/form-613741a5.js.map +0 -1
  275. /package/dist/core/{p-d14130ac.entry.js.map → p-1bdec1f4.entry.js.map} +0 -0
  276. /package/dist/core/{p-e3b56738.entry.js.map → p-227a9e9b.entry.js.map} +0 -0
  277. /package/dist/core/{p-d37f03e0.entry.js.map → p-bbbc4e43.entry.js.map} +0 -0
  278. /package/dist/core/{p-5a2a9cde.entry.js.map → p-c69cd34e.entry.js.map} +0 -0
@@ -81,6 +81,9 @@
81
81
  /*
82
82
  - Variables - Colors
83
83
  */
84
+ /*
85
+ - Variables - Control Group
86
+ */
84
87
  /*
85
88
  - Variables - Cookiebar
86
89
  */
@@ -239,10 +242,8 @@
239
242
  .gov-form-input select,
240
243
  .gov-form-input textarea {
241
244
  width: 100%;
242
- border: var(--gov-form-input-border-width, 0.0625rem solid var(--gov-color-secondary-700));
243
245
  border-radius: var(--gov-border-radius, 0.1875rem);
244
246
  background-color: var(--gov-form-bg-color, var(--gov-color-neutral-white));
245
- color: var(--gov-form-input-color, var(--gov-color-secondary-700));
246
247
  font-family: var(--gov-font-family, "Roboto", sans-serif);
247
248
  }
248
249
  .gov-form-input input:focus,
@@ -279,7 +280,6 @@
279
280
  top: 50%;
280
281
  display: flex;
281
282
  justify-content: center;
282
- color: var(--gov-form-input-icon-color, var(--gov-color-primary));
283
283
  transform: translateY(-50%);
284
284
  pointer-events: none;
285
285
  }
@@ -289,59 +289,38 @@
289
289
  .gov-form-input *[slot=right-icon] {
290
290
  right: 0;
291
291
  }
292
- [disabled=""].gov-form-input, [disabled=true i].gov-form-input, [disabled="1"].gov-form-input {
293
- pointer-events: none;
292
+ [size=s].gov-form-input {
293
+ font-weight: var(--gov-text-s-font-weight);
294
+ font-size: var(--gov-text-s-font-size);
295
+ line-height: var(--gov-text-s-line-height);
296
+ letter-spacing: var(--gov-text-s-letter-spacing);
297
+ gap: 0.5rem var(--gov-form-input-core-s-icon-size, 1rem);
294
298
  }
295
- [disabled=""].gov-form-input input,
296
- [disabled=""].gov-form-input select,
297
- [disabled=""].gov-form-input textarea, [disabled=true i].gov-form-input input,
298
- [disabled=true i].gov-form-input select,
299
- [disabled=true i].gov-form-input textarea, [disabled="1"].gov-form-input input,
300
- [disabled="1"].gov-form-input select,
301
- [disabled="1"].gov-form-input textarea {
302
- border-color: var(--gov-form-state-color-disabled, var(--gov-color-secondary-600));
303
- background: var(--gov-form-input-disabled-bg, var(--gov-color-secondary-300));
304
- color: var(--gov-form-state-color-disabled, var(--gov-color-secondary-600));
305
- }
306
- [disabled=""].gov-form-input *[slot=left-icon],
307
- [disabled=""].gov-form-input *[slot=right-icon], [disabled=true i].gov-form-input *[slot=left-icon],
308
- [disabled=true i].gov-form-input *[slot=right-icon], [disabled="1"].gov-form-input *[slot=left-icon],
309
- [disabled="1"].gov-form-input *[slot=right-icon] {
310
- color: var(--gov-form-state-color-disabled, var(--gov-color-secondary-600));
311
- }
312
- [invalid=""].gov-form-input input,
313
- [invalid=""].gov-form-input select,
314
- [invalid=""].gov-form-input textarea, [invalid=true i].gov-form-input input,
315
- [invalid=true i].gov-form-input select,
316
- [invalid=true i].gov-form-input textarea, [invalid="1"].gov-form-input input,
317
- [invalid="1"].gov-form-input select,
318
- [invalid="1"].gov-form-input textarea {
319
- border-color: var(--gov-form-state-color-error, var(--gov-color-error));
320
- color: var(--gov-form-state-color-error, var(--gov-color-error));
299
+ [size=s].gov-form-input input,
300
+ [size=s].gov-form-input select {
301
+ font-weight: var(--gov-text-s-font-weight);
302
+ font-size: var(--gov-text-s-font-size);
303
+ line-height: var(--gov-text-s-line-height);
304
+ letter-spacing: var(--gov-text-s-letter-spacing);
305
+ height: var(--gov-form-input-core-s-height, 2rem);
306
+ padding: var(--gov-form-input-core-s-padding, 0.25rem 0.75rem);
321
307
  }
322
- [invalid=""].gov-form-input input::-moz-placeholder, [invalid=""].gov-form-input select::-moz-placeholder, [invalid=""].gov-form-input textarea::-moz-placeholder, [invalid=true i].gov-form-input input::-moz-placeholder, [invalid=true i].gov-form-input select::-moz-placeholder, [invalid=true i].gov-form-input textarea::-moz-placeholder, [invalid="1"].gov-form-input input::-moz-placeholder, [invalid="1"].gov-form-input select::-moz-placeholder, [invalid="1"].gov-form-input textarea::-moz-placeholder {
323
- color: var(--gov-form-state-color-error, var(--gov-color-error-300));
308
+ [size=s].gov-form-input *[slot=left-icon],
309
+ [size=s].gov-form-input *[slot=right-icon] {
310
+ width: var(--gov-form-input-core-s-icon-size, 1rem);
311
+ height: var(--gov-form-input-core-s-icon-size, 1rem);
324
312
  }
325
- [invalid=""].gov-form-input input::placeholder,
326
- [invalid=""].gov-form-input select::placeholder,
327
- [invalid=""].gov-form-input textarea::placeholder, [invalid=true i].gov-form-input input::placeholder,
328
- [invalid=true i].gov-form-input select::placeholder,
329
- [invalid=true i].gov-form-input textarea::placeholder, [invalid="1"].gov-form-input input::placeholder,
330
- [invalid="1"].gov-form-input select::placeholder,
331
- [invalid="1"].gov-form-input textarea::placeholder {
332
- color: var(--gov-form-state-color-error, var(--gov-color-error-300));
313
+ [size=s].gov-form-input *[slot=left-icon] {
314
+ left: calc((var(--gov-form-input-core-s-icon-padding, 2rem) - var(--gov-form-input-core-s-icon-size, 1rem)) / 2);
333
315
  }
334
- [invalid=""].gov-form-input *[slot=left-icon],
335
- [invalid=""].gov-form-input *[slot=right-icon], [invalid=true i].gov-form-input *[slot=left-icon],
336
- [invalid=true i].gov-form-input *[slot=right-icon], [invalid="1"].gov-form-input *[slot=left-icon],
337
- [invalid="1"].gov-form-input *[slot=right-icon] {
338
- color: var(--gov-form-state-color-error, var(--gov-color-error));
316
+ [size=s].gov-form-input *[slot=left-icon] ~ input {
317
+ padding-left: var(--gov-form-input-core-s-icon-padding, 2rem);
339
318
  }
340
- [success=""].gov-form-input *[slot=right-icon], [success=true i].gov-form-input *[slot=right-icon], [success="1"].gov-form-input *[slot=right-icon] {
341
- color: var(--gov-form-state-color-success, var(--gov-color-success));
319
+ [size=s].gov-form-input *[slot=right-icon] {
320
+ right: calc((var(--gov-form-input-core-s-icon-padding, 2rem) - var(--gov-form-input-core-s-icon-size, 1rem)) / 2);
342
321
  }
343
- [success=""].gov-form-input *[slot=right-icon]:not(.icon-validation):not(.icon-arrow), [success=true i].gov-form-input *[slot=right-icon]:not(.icon-validation):not(.icon-arrow), [success="1"].gov-form-input *[slot=right-icon]:not(.icon-validation):not(.icon-arrow) {
344
- display: none;
322
+ [size=s].gov-form-input *[slot=right-icon] ~ input, [size=s].gov-form-input *[slot=right-icon] ~ select {
323
+ padding-right: var(--gov-form-input-core-s-icon-padding, 2rem);
345
324
  }
346
325
  [size=m].gov-form-input {
347
326
  font-weight: var(--gov-text-m-font-weight);
@@ -442,6 +421,80 @@
442
421
  [size=xl].gov-form-input *[slot=right-icon] ~ input, [size=xl].gov-form-input *[slot=right-icon] ~ select {
443
422
  padding-right: var(--gov-form-input-core-xl-icon-padding, 3rem);
444
423
  }
424
+ [variant=primary].gov-form-input input,
425
+ [variant=primary].gov-form-input select,
426
+ [variant=primary].gov-form-input textarea {
427
+ color: var(--gov-form-input-color-primary, var(--gov-color-secondary-700));
428
+ border: var(--gov-form-input-border-primary, 0.0625rem solid var(--gov-color-primary-600));
429
+ }
430
+ [variant=primary].gov-form-input *[slot=left-icon],
431
+ [variant=primary].gov-form-input *[slot=right-icon] {
432
+ color: var(--gov-form-input-icon-color-primary, var(--gov-color-primary));
433
+ }
434
+ [variant=secondary].gov-form-input input,
435
+ [variant=secondary].gov-form-input select,
436
+ [variant=secondary].gov-form-input textarea {
437
+ color: var(--gov-form-input-color-secondary, var(--gov-color-secondary-700));
438
+ border: var(--gov-form-input-border-secondary, 0.0625rem solid var(--gov-color-secondary-700));
439
+ }
440
+ [variant=secondary].gov-form-input *[slot=left-icon],
441
+ [variant=secondary].gov-form-input *[slot=right-icon] {
442
+ color: var(--gov-form-input-icon-color-secondary, var(--gov-color-primary));
443
+ }
444
+ [disabled=""].gov-form-input, [disabled=true i].gov-form-input, [disabled="1"].gov-form-input {
445
+ pointer-events: none;
446
+ }
447
+ [disabled=""].gov-form-input input,
448
+ [disabled=""].gov-form-input select,
449
+ [disabled=""].gov-form-input textarea, [disabled=true i].gov-form-input input,
450
+ [disabled=true i].gov-form-input select,
451
+ [disabled=true i].gov-form-input textarea, [disabled="1"].gov-form-input input,
452
+ [disabled="1"].gov-form-input select,
453
+ [disabled="1"].gov-form-input textarea {
454
+ border-color: var(--gov-form-state-color-disabled, var(--gov-color-secondary-600));
455
+ background: var(--gov-form-input-disabled-bg, var(--gov-color-secondary-300));
456
+ color: var(--gov-form-state-color-disabled, var(--gov-color-secondary-600));
457
+ }
458
+ [disabled=""].gov-form-input *[slot=left-icon],
459
+ [disabled=""].gov-form-input *[slot=right-icon], [disabled=true i].gov-form-input *[slot=left-icon],
460
+ [disabled=true i].gov-form-input *[slot=right-icon], [disabled="1"].gov-form-input *[slot=left-icon],
461
+ [disabled="1"].gov-form-input *[slot=right-icon] {
462
+ color: var(--gov-form-state-color-disabled, var(--gov-color-secondary-600));
463
+ }
464
+ [invalid=""].gov-form-input input,
465
+ [invalid=""].gov-form-input select,
466
+ [invalid=""].gov-form-input textarea, [invalid=true i].gov-form-input input,
467
+ [invalid=true i].gov-form-input select,
468
+ [invalid=true i].gov-form-input textarea, [invalid="1"].gov-form-input input,
469
+ [invalid="1"].gov-form-input select,
470
+ [invalid="1"].gov-form-input textarea {
471
+ border-color: var(--gov-form-state-color-error, var(--gov-color-error));
472
+ color: var(--gov-form-state-color-error, var(--gov-color-error));
473
+ }
474
+ [invalid=""].gov-form-input input::-moz-placeholder, [invalid=""].gov-form-input select::-moz-placeholder, [invalid=""].gov-form-input textarea::-moz-placeholder, [invalid=true i].gov-form-input input::-moz-placeholder, [invalid=true i].gov-form-input select::-moz-placeholder, [invalid=true i].gov-form-input textarea::-moz-placeholder, [invalid="1"].gov-form-input input::-moz-placeholder, [invalid="1"].gov-form-input select::-moz-placeholder, [invalid="1"].gov-form-input textarea::-moz-placeholder {
475
+ color: var(--gov-form-state-color-error, var(--gov-color-error-300));
476
+ }
477
+ [invalid=""].gov-form-input input::placeholder,
478
+ [invalid=""].gov-form-input select::placeholder,
479
+ [invalid=""].gov-form-input textarea::placeholder, [invalid=true i].gov-form-input input::placeholder,
480
+ [invalid=true i].gov-form-input select::placeholder,
481
+ [invalid=true i].gov-form-input textarea::placeholder, [invalid="1"].gov-form-input input::placeholder,
482
+ [invalid="1"].gov-form-input select::placeholder,
483
+ [invalid="1"].gov-form-input textarea::placeholder {
484
+ color: var(--gov-form-state-color-error, var(--gov-color-error-300));
485
+ }
486
+ [invalid=""].gov-form-input *[slot=left-icon],
487
+ [invalid=""].gov-form-input *[slot=right-icon], [invalid=true i].gov-form-input *[slot=left-icon],
488
+ [invalid=true i].gov-form-input *[slot=right-icon], [invalid="1"].gov-form-input *[slot=left-icon],
489
+ [invalid="1"].gov-form-input *[slot=right-icon] {
490
+ color: var(--gov-form-state-color-error, var(--gov-color-error));
491
+ }
492
+ [success=""].gov-form-input *[slot=right-icon], [success=true i].gov-form-input *[slot=right-icon], [success="1"].gov-form-input *[slot=right-icon] {
493
+ color: var(--gov-form-state-color-success, var(--gov-color-success));
494
+ }
495
+ [success=""].gov-form-input *[slot=right-icon]:not(.icon-validation):not(.icon-arrow), [success=true i].gov-form-input *[slot=right-icon]:not(.icon-validation):not(.icon-arrow), [success="1"].gov-form-input *[slot=right-icon]:not(.icon-validation):not(.icon-arrow) {
496
+ display: none;
497
+ }
445
498
 
446
499
  .gov-form-input[invalid=""] *[slot=right-icon]:not(.icon-validation):not(.icon-arrow), .gov-form-input[invalid=true i] *[slot=right-icon]:not(.icon-validation):not(.icon-arrow), .gov-form-input[invalid="1"] *[slot=right-icon]:not(.icon-validation):not(.icon-arrow) {
447
500
  display: none;
@@ -1,13 +1,12 @@
1
1
  import { Host, h } from '@stencil/core';
2
- import { FormInputSizes } from './constants';
3
- import { createID } from '../../../utils/string.utils';
2
+ import { govForm } from '../../../helpers/Dom/form';
4
3
  import { govHost, toBoolAttr, toBoolAttrIfDefined, toOnOffAttrIfDefined } from "../../../helpers/Dom/template";
5
- import { FormInputClass, FormInputVariants } from './constants';
6
- import { validateProp } from '../../../helpers/Validate/props';
7
4
  import { canValidateWcagOnRender } from '../../../helpers/Dom/win';
8
- import { delay } from '../../../utils/utils';
5
+ import { validateProp } from '../../../helpers/Validate/props';
9
6
  import { validateWcagLabelFor, validateWcagRef } from '../../../helpers/Validate/wcag';
10
- import { govForm } from '../../../helpers/Dom/form';
7
+ import { createID } from '../../../utils/string.utils';
8
+ import { delay } from '../../../utils/utils';
9
+ import { FormInputClass, FormInputSizes, FormInputVariants } from './constants';
11
10
  var Tags;
12
11
  (function (Tags) {
13
12
  Tags["INPUT"] = "input";
@@ -17,7 +16,7 @@ export class GovFormInput {
17
16
  constructor() {
18
17
  this.value = undefined;
19
18
  this.identifier = undefined;
20
- this.variant = undefined;
19
+ this.variant = 'secondary';
21
20
  this.success = undefined;
22
21
  this.size = 'm';
23
22
  this.name = undefined;
@@ -223,7 +222,8 @@ export class GovFormInput {
223
222
  "text": "Style variation of the form input."
224
223
  },
225
224
  "attribute": "variant",
226
- "reflect": false
225
+ "reflect": false,
226
+ "defaultValue": "'secondary'"
227
227
  },
228
228
  "success": {
229
229
  "type": "boolean",
@@ -247,7 +247,7 @@ export class GovFormInput {
247
247
  "mutable": false,
248
248
  "complexType": {
249
249
  "original": "FormInputSizesType",
250
- "resolved": "\"l\" | \"m\" | \"xl\"",
250
+ "resolved": "\"l\" | \"m\" | \"s\" | \"xl\"",
251
251
  "references": {
252
252
  "FormInputSizesType": {
253
253
  "location": "import",
@@ -1 +1 @@
1
- {"version":3,"file":"gov-form-input.js","sourceRoot":"","sources":["../../../../../../../src/components/gov-form/input/gov-form-input.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAgB,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAE5G,OAAO,EAAE,cAAc,EAAiC,IAAI,EAAE,MAAM,aAAa,CAAA;AACjF,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAA;AACtD,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAA;AAC9G,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAwB,MAAM,aAAa,CAAA;AACrF,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAA;AAC9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAA;AAClE,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAC5C,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAA;AAEtF,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAA;AAGnD,IAAK,IAGJ;AAHD,WAAK,IAAI;EACR,uBAAe,CAAA;EACf,6BAAqB,CAAA;AACtB,CAAC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AC,CAAA;IAChE,oBAAoB,CAAC,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,cAAc,EAAE,cAAc,CAAC,IAAI,CAAC,CAAA;EAChG,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","sourcesContent":["import { Component, Element, Host, h, Prop, Watch, Event, EventEmitter, State, Method } from '@stencil/core'\nimport { GovHost } from '../../../helpers/Dom/template.types'\nimport { FormInputSizes, FormInputSizesType, InputType, Type } from './constants'\nimport { createID } from '../../../utils/string.utils'\nimport { govHost, toBoolAttr, toBoolAttrIfDefined, toOnOffAttrIfDefined } from \"../../../helpers/Dom/template\"\nimport { FormInputClass, FormInputVariants, FormInputVariantType } from './constants'\nimport { validateProp } from '../../../helpers/Validate/props'\nimport { canValidateWcagOnRender } from '../../../helpers/Dom/win'\nimport { delay } from '../../../utils/utils'\nimport { validateWcagLabelFor, validateWcagRef } from '../../../helpers/Validate/wcag'\nimport { GovForm } from '../../../helpers/Dom/form.types'\nimport { govForm } from '../../../helpers/Dom/form'\nimport { FormInputEvent } from './gov-form-input.types'\n\nenum Tags {\n\tINPUT = 'input',\n\tTEXTAREA = 'textarea',\n}\n\n@Component({\n\ttag: 'gov-form-input',\n\tstyleUrl: 'gov-form-input.scss',\n})\nexport class GovFormInput {\n\tprivate f: GovForm\n\tprivate readonly h: GovHost\n\tprivate inputRef?: HTMLInputElement\n\tprivate readonly inputId: string\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.inputId = createID('GovInput')\n\t\tthis.f = govForm(this.h)\n\t}\n\n\t@Element() host: HTMLGovFormInputElement\n\t/**\n\t * Value of input\n\t */\n\t@Prop({ reflect: true, mutable: true }) value: string\n\t/**\n\t * Custom input identifier.\n\t */\n\t@Prop({ attribute: 'identifier' }) readonly identifier: string\n\t/**\n\t * Style variation of the form input.\n\t */\n\t@Prop() readonly variant?: FormInputVariantType\n\t/**\n\t * Indicates the entered value of child form element does conform to the format expected by the application.\n\t */\n\t@Prop() readonly success: boolean\n\t/**\n\t * Input’s size.\n\t */\n\t@Prop() readonly size?: FormInputSizesType = 'm'\n\t/**\n\t * Name of the input.\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Generates a texarea for the possibility of multiple lines\n\t */\n\t@Prop() readonly multiline: boolean\n\t/**\n\t * Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attr-rows\n\t */\n\t@Prop() readonly rows: number\n\t/**\n\t * Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attr-cols\n\t */\n\t@Prop() readonly cols: number\n\t/**\n\t * Set whether the input is required or not. Please note that this is necessary for accessible inputs when the user is required to fill them.\n\t * When using this property you need to also set “novalidate” attribute to your form element to prevent browser from displaying its own validation errors.\n\t */\n\t@Prop() readonly required: boolean = false\n\t/**\n\t * Makes the input component disabled.\n\t * This prevents users from being able to interact with the select, and conveys its inactive state to assistive technologies.\n\t */\n\t@Prop() readonly disabled: boolean\n\t/**\n\t * Text that appears in the form control when it has no value set\n\t */\n\t@Prop() readonly placeholder: string\n\t/**\n\t * The value is not editable\n\t */\n\t@Prop() readonly readonly: boolean\n\t/**\n\t * Minimum length (number of characters) of value\n\t */\n\t@Prop() readonly minlength: number\n\t/**\n\t * Maximum length (number of characters) of value\n\t */\n\t@Prop() readonly maxlength: number\n\t/**\n\t * Minimum value that is acceptable and valid for the input containing the attribute\n\t */\n\t@Prop() readonly min?: string | number\n\t/**\n\t * Maximum value that is acceptable and valid for the input containing the attribute\n\t */\n\t@Prop() readonly max?: string | number\n\t/**\n\t * Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attr-autocomplete\n\t */\n\t@Prop() readonly autocomplete: boolean\n\t/**\n\t * Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attr-autocorrect\n\t */\n\t@Prop() readonly autocorrect: boolean\n\t/**\n\t * Defineds the visual style of input\n\t */\n\t@Prop() readonly type?: Type\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#input_types\n\t */\n\t@Prop() readonly inputType: InputType = 'text'\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/input_role\n\t */\n\t@Prop() readonly role: string\n\t/**\n\t * Indicates the entered value does not conform to the format expected by the application.\n\t */\n\t@Prop() readonly invalid: boolean\n\t/**\n\t * Indicates the id of a component that describes the input.\n\t */\n\t@Prop({ attribute: 'wcag-described-by' }) readonly wcagDescribedBy: string\n\t/**\n\t * Indicates the id of a component that labels the input.\n\t */\n\t@Prop({ attribute: 'wcag-labelled-by' }) readonly wcagLabelledBy: string\n\t/**\n\t * Indicates the id of a component that describes the input.\n\t */\n\t@Prop({ attribute: 'wcag-owns' }) readonly wcagOwns: string\n\t/**\n\t * Indicates whether inputting text could trigger display of one or more predictions of the user's intended value.\n\t */\n\t@Prop({ attribute: 'wcag-autocomplete' }) readonly wcagAutocomplete: string\n\t/**\n\t * Attribute is set on an element to indicate if a control is expanded or collapsed\n\t */\n\t@Prop({ attribute: 'wcag-expanded' }) readonly wcagExpanded: boolean\n\t/**\n\t * Emitted when the input has focus.\n\t */\n\t@Event({ eventName: 'gov-focus' }) govFocus: EventEmitter<FormInputEvent>\n\t/**\n\t * Emitted when the input loses focus.\n\t */\n\t@Event({ eventName: 'gov-blur' }) govBlur: EventEmitter<FormInputEvent>\n\t/**\n\t * Emitted when the input change value.\n\t */\n\t@Event({ eventName: 'gov-input' }) govInput: EventEmitter<FormInputEvent>\n\t/**\n\t * Emitted when the input change value.\n\t */\n\t@Event({ eventName: 'gov-keyup' }) govKeyUp: EventEmitter<FormInputEvent>\n\t/**\n\t * Emitted when the input change value.\n\t */\n\t@Event({ eventName: 'gov-keydown' }) govKeyDown: EventEmitter<FormInputEvent>\n\t@State() focused: boolean\n\n\t@Watch('variant')\n\tvalidateVariant(newValue: string): void {\n\t\tvalidateProp(FormInputVariants, newValue, FormInputClass.root)\n\t}\n\n\t@Watch('size')\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(FormInputSizes, newValue, FormInputClass.root)\n\t}\n\n\t@Watch(\"disabled\")\n\t@Watch(\"invalid\")\n\t@Watch(\"type\")\n\t@Watch(\"size\")\n\twatchDisabled(): void {\n\t\tthis.passControlAttrs()\n\t}\n\n\tprivate passControlAttrs() {\n\t\tthis.f.passAttrToControl(\"size\", this.size)\n\t\tthis.f.passAttrToControl(\"disabled\", toBoolAttr(this.disabled))\n\t\tthis.f.passAttrToControl(\"invalid\", toBoolAttr(this.invalid))\n\t\tthis.f.passAttrToControl('type', this.multiline ? Tags.TEXTAREA : Tags.INPUT)\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.validateVariant(this.variant)\n\t\tthis.validateSize(this.size)\n\t\tthis.passControlAttrs()\n\n\t\tthis.f.passAttrToLabel('required', String(this.required))\n\t}\n\n\tasync componentDidRender() {\n\t\tif (canValidateWcagOnRender()) {\n\t\t\tawait delay(500)\n\t\t\tawait this.validateWcag()\n\t\t}\n\t}\n\n\trender() {\n\t\tconst Tag = this.multiline ? Tags.TEXTAREA : Tags.INPUT\n\n\t\treturn (\n\t\t\t<Host class={FormInputClass.root} size={this.size} variant={this.variant} type={this.type}>\n\t\t\t\t{this.h.hasSlot('prefix') && <slot name=\"prefix\"></slot>}\n\t\t\t\t<span class=\"element\">\n\t\t\t\t\t{this.h.hasSlot('left-icon') && <slot name=\"left-icon\" />}\n\n\t\t\t\t\t{this.h.hasSlot('right-icon') && !(this.success || this.invalid) && <slot name=\"right-icon\" />}\n\n\t\t\t\t\t{this.success && !this.multiline && <gov-icon slot=\"right-icon\" class=\"icon-validation\" name=\"check-lg\"></gov-icon>}\n\t\t\t\t\t{this.invalid && !this.multiline && <gov-icon slot=\"right-icon\" class=\"icon-validation\" name=\"exclamation-lg\"></gov-icon>}\n\t\t\t\t\t<Tag\n\t\t\t\t\t\ttype={this.inputType}\n\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\tid={this.identifier || this.inputId}\n\t\t\t\t\t\tname={this.name}\n\t\t\t\t\t\tonFocus={this.onFocusHandler.bind(this)}\n\t\t\t\t\t\tonInput={this.onInputHandler.bind(this)}\n\t\t\t\t\t\tonBlur={this.onBlurHandler.bind(this)}\n\t\t\t\t\t\tonKeyUp={this.onKeyUpHandler.bind(this)}\n\t\t\t\t\t\tonKeyDown={this.onKeyDownHandler.bind(this)}\n\t\t\t\t\t\tref={el => (this.inputRef = el as HTMLInputElement)}\n\t\t\t\t\t\tplaceholder={this.placeholder}\n\t\t\t\t\t\tvalue={this.value}\n\t\t\t\t\t\treadonly={toBoolAttrIfDefined(this.readonly)}\n\t\t\t\t\t\tautocomplete={toOnOffAttrIfDefined(this.autocomplete)}\n\t\t\t\t\t\tautocorrect={toOnOffAttrIfDefined(this.autocorrect)}\n\t\t\t\t\t\tminlength={this.minlength}\n\t\t\t\t\t\tmaxlength={this.maxlength}\n\t\t\t\t\t\tmin={this.min}\n\t\t\t\t\t\tmax={this.max}\n\t\t\t\t\t\trequired={this.required}\n\t\t\t\t\t\trows={this.rows}\n\t\t\t\t\t\tcols={this.cols}\n\t\t\t\t\t\trole={this.role}\n\t\t\t\t\t\taria-required={toBoolAttrIfDefined(this.required)}\n\t\t\t\t\t\taria-invalid={toBoolAttrIfDefined(this.invalid)}\n\t\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t\t\taria-describedby={this.wcagDescribedBy}\n\t\t\t\t\t\taria-labelledby={this.wcagLabelledBy}\n\t\t\t\t\t\taria-owns={this.wcagOwns}\n\t\t\t\t\t\taria-expanded={toBoolAttrIfDefined(this.wcagExpanded)}\n\t\t\t\t\t\taria-autocomplete={this.wcagAutocomplete}\n\t\t\t\t\t/>\n\t\t\t\t</span>\n\t\t\t\t{this.h.hasSlot('sufix') && <slot name=\"sufix\"></slot>}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onFocusHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.focused = true\n\t\tthis.govFocus.emit({\n\t\t\tcomponent: FormInputClass.root,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onBlurHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.focused = false\n\t\tthis.govBlur.emit({\n\t\t\tcomponent: FormInputClass.root,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onKeyUpHandler(e: KeyboardEvent) {\n\t\te.stopPropagation()\n\t\tthis.govKeyUp.emit({\n\t\t\tcomponent: FormInputClass.root,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onKeyDownHandler(e: KeyboardEvent) {\n\t\te.stopPropagation()\n\t\tthis.govKeyDown.emit({\n\t\t\tcomponent: FormInputClass.root,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onInputHandler(e: InputEvent) {\n\t\tthis.value = (e.target as HTMLInputElement).value\n\t\te.stopPropagation()\n\t\tthis.govInput.emit({\n\t\t\tcomponent: FormInputClass.root,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\t/**\n\t * Returns the current state of the component\n\t */\n\t@Method()\n\tasync setFocus(options?: FocusOptions): Promise<void> {\n\t\treturn this.inputRef.focus(options)\n\t}\n\n\t/**\n\t * Sets the ordered value of the element\n\t */\n\t@Method()\n\tasync setValue(value: string): Promise<void> {\n\t\tthis.value = value\n\t}\n\n\t/**\n\t * Clears input value\n\t */\n\t@Method()\n\tasync clearValue(): Promise<void> {\n\t\tthis.value = ''\n\t\tthis.inputRef.value = ''\n\t}\n\n\t/**\n\t * Returns an instance of the native html input element\n\t */\n\t@Method()\n\tasync getRef(): Promise<HTMLInputElement> {\n\t\treturn this.inputRef\n\t}\n\n\t/**\n\t * Validate the WCAG attributes of the component\n\t */\n\t@Method()\n\tasync validateWcag(): Promise<void> {\n\t\tvalidateWcagRef(this.wcagDescribedBy, 'wcag-described-by', FormInputClass.root)\n\t\tvalidateWcagRef(this.wcagLabelledBy, 'wcag-labelled-by', FormInputClass.root)\n\t\tvalidateWcagRef(this.wcagOwns, 'wcag-owns', FormInputClass.root)\n\t\tvalidateWcagLabelFor(this.identifier || this.inputId, this.wcagLabelledBy, FormInputClass.root)\n\t}\n}\n"]}
1
+ {"version":3,"file":"gov-form-input.js","sourceRoot":"","sources":["../../../../../../../src/components/gov-form/input/gov-form-input.tsx"],"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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","sourcesContent":["import { Component, Element, Event, EventEmitter, Host, Method, Prop, State, Watch, h } from '@stencil/core'\nimport { govForm } from '../../../helpers/Dom/form'\nimport { GovForm } from '../../../helpers/Dom/form.types'\nimport { govHost, toBoolAttr, toBoolAttrIfDefined, toOnOffAttrIfDefined } from \"../../../helpers/Dom/template\"\nimport { GovHost } from '../../../helpers/Dom/template.types'\nimport { canValidateWcagOnRender } from '../../../helpers/Dom/win'\nimport { validateProp } from '../../../helpers/Validate/props'\nimport { validateWcagLabelFor, validateWcagRef } from '../../../helpers/Validate/wcag'\nimport { createID } from '../../../utils/string.utils'\nimport { delay } from '../../../utils/utils'\nimport { FormInputClass, FormInputSizes, FormInputSizesType, FormInputVariantType, FormInputVariants, InputType, Type } from './constants'\nimport { FormInputEvent } from './gov-form-input.types'\n\nenum Tags {\n\tINPUT = 'input',\n\tTEXTAREA = 'textarea',\n}\n\n@Component({\n\ttag: 'gov-form-input',\n\tstyleUrl: 'gov-form-input.scss',\n})\nexport class GovFormInput {\n\tprivate f: GovForm\n\tprivate readonly h: GovHost\n\tprivate inputRef?: HTMLInputElement\n\tprivate readonly inputId: string\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.inputId = createID('GovInput')\n\t\tthis.f = govForm(this.h)\n\t}\n\n\t@Element() host: HTMLGovFormInputElement\n\t/**\n\t * Value of input\n\t */\n\t@Prop({ reflect: true, mutable: true }) value: string\n\t/**\n\t * Custom input identifier.\n\t */\n\t@Prop({ attribute: 'identifier' }) readonly identifier: string\n\t/**\n\t * Style variation of the form input.\n\t */\n\t@Prop() readonly variant?: FormInputVariantType = 'secondary'\n\t/**\n\t * Indicates the entered value of child form element does conform to the format expected by the application.\n\t */\n\t@Prop() readonly success: boolean\n\t/**\n\t * Input’s size.\n\t */\n\t@Prop() readonly size?: FormInputSizesType = 'm'\n\t/**\n\t * Name of the input.\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Generates a texarea for the possibility of multiple lines\n\t */\n\t@Prop() readonly multiline: boolean\n\t/**\n\t * Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attr-rows\n\t */\n\t@Prop() readonly rows: number\n\t/**\n\t * Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attr-cols\n\t */\n\t@Prop() readonly cols: number\n\t/**\n\t * Set whether the input is required or not. Please note that this is necessary for accessible inputs when the user is required to fill them.\n\t * When using this property you need to also set “novalidate” attribute to your form element to prevent browser from displaying its own validation errors.\n\t */\n\t@Prop() readonly required: boolean = false\n\t/**\n\t * Makes the input component disabled.\n\t * This prevents users from being able to interact with the select, and conveys its inactive state to assistive technologies.\n\t */\n\t@Prop() readonly disabled: boolean\n\t/**\n\t * Text that appears in the form control when it has no value set\n\t */\n\t@Prop() readonly placeholder: string\n\t/**\n\t * The value is not editable\n\t */\n\t@Prop() readonly readonly: boolean\n\t/**\n\t * Minimum length (number of characters) of value\n\t */\n\t@Prop() readonly minlength: number\n\t/**\n\t * Maximum length (number of characters) of value\n\t */\n\t@Prop() readonly maxlength: number\n\t/**\n\t * Minimum value that is acceptable and valid for the input containing the attribute\n\t */\n\t@Prop() readonly min?: string | number\n\t/**\n\t * Maximum value that is acceptable and valid for the input containing the attribute\n\t */\n\t@Prop() readonly max?: string | number\n\t/**\n\t * Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attr-autocomplete\n\t */\n\t@Prop() readonly autocomplete: boolean\n\t/**\n\t * Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attr-autocorrect\n\t */\n\t@Prop() readonly autocorrect: boolean\n\t/**\n\t * Defineds the visual style of input\n\t */\n\t@Prop() readonly type?: Type\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#input_types\n\t */\n\t@Prop() readonly inputType: InputType = 'text'\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/input_role\n\t */\n\t@Prop() readonly role: string\n\t/**\n\t * Indicates the entered value does not conform to the format expected by the application.\n\t */\n\t@Prop() readonly invalid: boolean\n\t/**\n\t * Indicates the id of a component that describes the input.\n\t */\n\t@Prop({ attribute: 'wcag-described-by' }) readonly wcagDescribedBy: string\n\t/**\n\t * Indicates the id of a component that labels the input.\n\t */\n\t@Prop({ attribute: 'wcag-labelled-by' }) readonly wcagLabelledBy: string\n\t/**\n\t * Indicates the id of a component that describes the input.\n\t */\n\t@Prop({ attribute: 'wcag-owns' }) readonly wcagOwns: string\n\t/**\n\t * Indicates whether inputting text could trigger display of one or more predictions of the user's intended value.\n\t */\n\t@Prop({ attribute: 'wcag-autocomplete' }) readonly wcagAutocomplete: string\n\t/**\n\t * Attribute is set on an element to indicate if a control is expanded or collapsed\n\t */\n\t@Prop({ attribute: 'wcag-expanded' }) readonly wcagExpanded: boolean\n\t/**\n\t * Emitted when the input has focus.\n\t */\n\t@Event({ eventName: 'gov-focus' }) govFocus: EventEmitter<FormInputEvent>\n\t/**\n\t * Emitted when the input loses focus.\n\t */\n\t@Event({ eventName: 'gov-blur' }) govBlur: EventEmitter<FormInputEvent>\n\t/**\n\t * Emitted when the input change value.\n\t */\n\t@Event({ eventName: 'gov-input' }) govInput: EventEmitter<FormInputEvent>\n\t/**\n\t * Emitted when the input change value.\n\t */\n\t@Event({ eventName: 'gov-keyup' }) govKeyUp: EventEmitter<FormInputEvent>\n\t/**\n\t * Emitted when the input change value.\n\t */\n\t@Event({ eventName: 'gov-keydown' }) govKeyDown: EventEmitter<FormInputEvent>\n\t@State() focused: boolean\n\n\t@Watch('variant')\n\tvalidateVariant(newValue: string): void {\n\t\tvalidateProp(FormInputVariants, newValue, FormInputClass.root)\n\t}\n\n\t@Watch('size')\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(FormInputSizes, newValue, FormInputClass.root)\n\t}\n\n\t@Watch(\"disabled\")\n\t@Watch(\"invalid\")\n\t@Watch(\"type\")\n\t@Watch(\"size\")\n\twatchDisabled(): void {\n\t\tthis.passControlAttrs()\n\t}\n\n\tprivate passControlAttrs() {\n\t\tthis.f.passAttrToControl(\"size\", this.size)\n\t\tthis.f.passAttrToControl(\"disabled\", toBoolAttr(this.disabled))\n\t\tthis.f.passAttrToControl(\"invalid\", toBoolAttr(this.invalid))\n\t\tthis.f.passAttrToControl('type', this.multiline ? Tags.TEXTAREA : Tags.INPUT)\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.validateVariant(this.variant)\n\t\tthis.validateSize(this.size)\n\t\tthis.passControlAttrs()\n\n\t\tthis.f.passAttrToLabel('required', String(this.required))\n\t}\n\n\tasync componentDidRender() {\n\t\tif (canValidateWcagOnRender()) {\n\t\t\tawait delay(500)\n\t\t\tawait this.validateWcag()\n\t\t}\n\t}\n\n\trender() {\n\t\tconst Tag = this.multiline ? Tags.TEXTAREA : Tags.INPUT\n\n\t\treturn (\n\t\t\t<Host class={FormInputClass.root} size={this.size} variant={this.variant} type={this.type}>\n\t\t\t\t{this.h.hasSlot('prefix') && <slot name=\"prefix\"></slot>}\n\t\t\t\t<span class=\"element\">\n\t\t\t\t\t{this.h.hasSlot('left-icon') && <slot name=\"left-icon\" />}\n\n\t\t\t\t\t{this.h.hasSlot('right-icon') && !(this.success || this.invalid) && <slot name=\"right-icon\" />}\n\n\t\t\t\t\t{this.success && !this.multiline && <gov-icon slot=\"right-icon\" class=\"icon-validation\" name=\"check-lg\"></gov-icon>}\n\t\t\t\t\t{this.invalid && !this.multiline && <gov-icon slot=\"right-icon\" class=\"icon-validation\" name=\"exclamation-lg\"></gov-icon>}\n\t\t\t\t\t<Tag\n\t\t\t\t\t\ttype={this.inputType}\n\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\tid={this.identifier || this.inputId}\n\t\t\t\t\t\tname={this.name}\n\t\t\t\t\t\tonFocus={this.onFocusHandler.bind(this)}\n\t\t\t\t\t\tonInput={this.onInputHandler.bind(this)}\n\t\t\t\t\t\tonBlur={this.onBlurHandler.bind(this)}\n\t\t\t\t\t\tonKeyUp={this.onKeyUpHandler.bind(this)}\n\t\t\t\t\t\tonKeyDown={this.onKeyDownHandler.bind(this)}\n\t\t\t\t\t\tref={el => (this.inputRef = el as HTMLInputElement)}\n\t\t\t\t\t\tplaceholder={this.placeholder}\n\t\t\t\t\t\tvalue={this.value}\n\t\t\t\t\t\treadonly={toBoolAttrIfDefined(this.readonly)}\n\t\t\t\t\t\tautocomplete={toOnOffAttrIfDefined(this.autocomplete)}\n\t\t\t\t\t\tautocorrect={toOnOffAttrIfDefined(this.autocorrect)}\n\t\t\t\t\t\tminlength={this.minlength}\n\t\t\t\t\t\tmaxlength={this.maxlength}\n\t\t\t\t\t\tmin={this.min}\n\t\t\t\t\t\tmax={this.max}\n\t\t\t\t\t\trequired={this.required}\n\t\t\t\t\t\trows={this.rows}\n\t\t\t\t\t\tcols={this.cols}\n\t\t\t\t\t\trole={this.role}\n\t\t\t\t\t\taria-required={toBoolAttrIfDefined(this.required)}\n\t\t\t\t\t\taria-invalid={toBoolAttrIfDefined(this.invalid)}\n\t\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t\t\taria-describedby={this.wcagDescribedBy}\n\t\t\t\t\t\taria-labelledby={this.wcagLabelledBy}\n\t\t\t\t\t\taria-owns={this.wcagOwns}\n\t\t\t\t\t\taria-expanded={toBoolAttrIfDefined(this.wcagExpanded)}\n\t\t\t\t\t\taria-autocomplete={this.wcagAutocomplete}\n\t\t\t\t\t/>\n\t\t\t\t</span>\n\t\t\t\t{this.h.hasSlot('sufix') && <slot name=\"sufix\"></slot>}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onFocusHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.focused = true\n\t\tthis.govFocus.emit({\n\t\t\tcomponent: FormInputClass.root,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onBlurHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.focused = false\n\t\tthis.govBlur.emit({\n\t\t\tcomponent: FormInputClass.root,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onKeyUpHandler(e: KeyboardEvent) {\n\t\te.stopPropagation()\n\t\tthis.govKeyUp.emit({\n\t\t\tcomponent: FormInputClass.root,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onKeyDownHandler(e: KeyboardEvent) {\n\t\te.stopPropagation()\n\t\tthis.govKeyDown.emit({\n\t\t\tcomponent: FormInputClass.root,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onInputHandler(e: InputEvent) {\n\t\tthis.value = (e.target as HTMLInputElement).value\n\t\te.stopPropagation()\n\t\tthis.govInput.emit({\n\t\t\tcomponent: FormInputClass.root,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\t/**\n\t * Returns the current state of the component\n\t */\n\t@Method()\n\tasync setFocus(options?: FocusOptions): Promise<void> {\n\t\treturn this.inputRef.focus(options)\n\t}\n\n\t/**\n\t * Sets the ordered value of the element\n\t */\n\t@Method()\n\tasync setValue(value: string): Promise<void> {\n\t\tthis.value = value\n\t}\n\n\t/**\n\t * Clears input value\n\t */\n\t@Method()\n\tasync clearValue(): Promise<void> {\n\t\tthis.value = ''\n\t\tthis.inputRef.value = ''\n\t}\n\n\t/**\n\t * Returns an instance of the native html input element\n\t */\n\t@Method()\n\tasync getRef(): Promise<HTMLInputElement> {\n\t\treturn this.inputRef\n\t}\n\n\t/**\n\t * Validate the WCAG attributes of the component\n\t */\n\t@Method()\n\tasync validateWcag(): Promise<void> {\n\t\tvalidateWcagRef(this.wcagDescribedBy, 'wcag-described-by', FormInputClass.root)\n\t\tvalidateWcagRef(this.wcagLabelledBy, 'wcag-labelled-by', FormInputClass.root)\n\t\tvalidateWcagRef(this.wcagOwns, 'wcag-owns', FormInputClass.root)\n\t\tvalidateWcagLabelFor(this.identifier || this.inputId, this.wcagLabelledBy, FormInputClass.root)\n\t}\n}\n"]}
@@ -81,6 +81,9 @@
81
81
  /*
82
82
  - Variables - Colors
83
83
  */
84
+ /*
85
+ - Variables - Control Group
86
+ */
84
87
  /*
85
88
  - Variables - Cookiebar
86
89
  */
@@ -9,7 +9,7 @@ export class GovFormLabel {
9
9
  }
10
10
  render() {
11
11
  const Tag = this.legend ? 'legend' : 'label';
12
- return (h(Host, { class: FormLabelClass.root, size: this.size }, h(Tag, { class: FormLabelClass.label, htmlFor: this.identifier, onClick: () => this.govClick.emit() }, h("slot", null), this.required ? h("span", { class: "gov-color--error-500" }, "*") : null)));
12
+ return (h(Host, { class: FormLabelClass.root, size: this.size }, h(Tag, { class: FormLabelClass.label, htmlFor: this.identifier, onClick: () => this.govClick.emit() }, h("slot", null), this.required ? h("span", { class: "gov-color--error-500" }, "\u00A0*") : null)));
13
13
  }
14
14
  static get is() { return "gov-form-label"; }
15
15
  static get originalStyleUrls() {
@@ -1 +1 @@
1
- {"version":3,"file":"gov-form-label.js","sourceRoot":"","sources":["../../../../../../../src/components/gov-form/label/gov-form-label.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAgB,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AAC7E,OAAO,EAAE,cAAc,EAAuB,MAAM,aAAa,CAAA;AAMjE,MAAM,OAAO,YAAY;;;gBAQsB,GAAG;oBAIZ,KAAK;kBAKP,KAAK;;EAMxC,MAAM;IACL,MAAM,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAA;IAC5C,OAAO,CACN,EAAC,IAAI,IAAC,KAAK,EAAE,cAAc,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI;MAChD,EAAC,GAAG,IAAC,KAAK,EAAE,cAAc,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,CAAC,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE;QAC9F,eAAa;QACZ,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,YAAM,KAAK,EAAC,sBAAsB,QAAS,CAAC,CAAC,CAAC,IAAI,CAC9D,CACA,CACP,CAAA;EACF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","sourcesContent":["import { Component, Event, EventEmitter, h, Prop, Host } from '@stencil/core'\nimport { FormLabelClass, FormLabelSizesTypes } from './constants'\n\n@Component({\n\ttag: 'gov-form-label',\n\tstyleUrl: 'gov-form-label.scss',\n})\nexport class GovFormLabel {\n\t/**\n\t * Identifier for label.\n\t */\n\t@Prop({ attribute: 'identifier' }) readonly identifier: string\n\t/**\n\t * Label's size.\n\t */\n\t@Prop() readonly size?: FormLabelSizesTypes = 'm'\n\t/**\n\t * Set whether the input is required or not.\n\t */\n\t@Prop() readonly required: boolean = false\n\t/**\n\t * Use label as a legend for better accessibility.\n\t * Note: Don't forget to set the fieldset attribute of the gov-form-control component\n\t */\n\t@Prop() readonly legend: boolean = false\n\t/**\n\t * Emitted when the label click.\n\t */\n\t@Event({ eventName: 'gov-click' }) govClick: EventEmitter<PointerEvent>\n\n\trender() {\n\t\tconst Tag = this.legend ? 'legend' : 'label'\n\t\treturn (\n\t\t\t<Host class={FormLabelClass.root} size={this.size}>\n\t\t\t\t<Tag class={FormLabelClass.label} htmlFor={this.identifier} onClick={() => this.govClick.emit()}>\n\t\t\t\t\t<slot></slot>\n\t\t\t\t\t{this.required ? <span class=\"gov-color--error-500\">*</span> : null}\n\t\t\t\t</Tag>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"]}
1
+ {"version":3,"file":"gov-form-label.js","sourceRoot":"","sources":["../../../../../../../src/components/gov-form/label/gov-form-label.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAgB,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AAC7E,OAAO,EAAE,cAAc,EAAuB,MAAM,aAAa,CAAA;AAMjE,MAAM,OAAO,YAAY;;;gBAQsB,GAAG;oBAIZ,KAAK;kBAKP,KAAK;;EAMxC,MAAM;IACL,MAAM,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAA;IAC5C,OAAO,CACN,EAAC,IAAI,IAAC,KAAK,EAAE,cAAc,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI;MAChD,EAAC,GAAG,IAAC,KAAK,EAAE,cAAc,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,CAAC,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE;QAC9F,eAAa;QACZ,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,YAAM,KAAK,EAAC,sBAAsB,cAAe,CAAC,CAAC,CAAC,IAAI,CACpE,CACA,CACP,CAAA;EACF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","sourcesContent":["import { Component, Event, EventEmitter, h, Prop, Host } from '@stencil/core'\nimport { FormLabelClass, FormLabelSizesTypes } from './constants'\n\n@Component({\n\ttag: 'gov-form-label',\n\tstyleUrl: 'gov-form-label.scss',\n})\nexport class GovFormLabel {\n\t/**\n\t * Identifier for label.\n\t */\n\t@Prop({ attribute: 'identifier' }) readonly identifier: string\n\t/**\n\t * Label's size.\n\t */\n\t@Prop() readonly size?: FormLabelSizesTypes = 'm'\n\t/**\n\t * Set whether the input is required or not.\n\t */\n\t@Prop() readonly required: boolean = false\n\t/**\n\t * Use label as a legend for better accessibility.\n\t * Note: Don't forget to set the fieldset attribute of the gov-form-control component\n\t */\n\t@Prop() readonly legend: boolean = false\n\t/**\n\t * Emitted when the label click.\n\t */\n\t@Event({ eventName: 'gov-click' }) govClick: EventEmitter<PointerEvent>\n\n\trender() {\n\t\tconst Tag = this.legend ? 'legend' : 'label'\n\t\treturn (\n\t\t\t<Host class={FormLabelClass.root} size={this.size}>\n\t\t\t\t<Tag class={FormLabelClass.label} htmlFor={this.identifier} onClick={() => this.govClick.emit()}>\n\t\t\t\t\t<slot></slot>\n\t\t\t\t\t{this.required ? <span class=\"gov-color--error-500\">&nbsp;*</span> : null}\n\t\t\t\t</Tag>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"]}
@@ -81,6 +81,9 @@
81
81
  /*
82
82
  - Variables - Colors
83
83
  */
84
+ /*
85
+ - Variables - Control Group
86
+ */
84
87
  /*
85
88
  - Variables - Cookiebar
86
89
  */
@@ -95,6 +95,9 @@
95
95
  /*
96
96
  - Variables - Colors
97
97
  */
98
+ /*
99
+ - Variables - Control Group
100
+ */
98
101
  /*
99
102
  - Variables - Cookiebar
100
103
  */
@@ -256,10 +259,8 @@
256
259
  .gov-form-multi-select select,
257
260
  .gov-form-multi-select textarea {
258
261
  width: 100%;
259
- border: var(--gov-form-input-border-width, 0.0625rem solid var(--gov-color-secondary-700));
260
262
  border-radius: var(--gov-border-radius, 0.1875rem);
261
263
  background-color: var(--gov-form-bg-color, var(--gov-color-neutral-white));
262
- color: var(--gov-form-input-color, var(--gov-color-secondary-700));
263
264
  font-family: var(--gov-font-family, "Roboto", sans-serif);
264
265
  }
265
266
  .gov-form-multi-select input:focus,
@@ -296,7 +297,6 @@
296
297
  top: 50%;
297
298
  display: flex;
298
299
  justify-content: center;
299
- color: var(--gov-form-input-icon-color, var(--gov-color-primary));
300
300
  transform: translateY(-50%);
301
301
  pointer-events: none;
302
302
  }
@@ -306,59 +306,38 @@
306
306
  .gov-form-multi-select *[slot=right-icon] {
307
307
  right: 0;
308
308
  }
309
- [disabled=""].gov-form-multi-select, [disabled=true i].gov-form-multi-select, [disabled="1"].gov-form-multi-select {
310
- pointer-events: none;
309
+ [size=s].gov-form-multi-select {
310
+ font-weight: var(--gov-text-s-font-weight);
311
+ font-size: var(--gov-text-s-font-size);
312
+ line-height: var(--gov-text-s-line-height);
313
+ letter-spacing: var(--gov-text-s-letter-spacing);
314
+ gap: 0.5rem var(--gov-form-input-core-s-icon-size, 1rem);
311
315
  }
312
- [disabled=""].gov-form-multi-select input,
313
- [disabled=""].gov-form-multi-select select,
314
- [disabled=""].gov-form-multi-select textarea, [disabled=true i].gov-form-multi-select input,
315
- [disabled=true i].gov-form-multi-select select,
316
- [disabled=true i].gov-form-multi-select textarea, [disabled="1"].gov-form-multi-select input,
317
- [disabled="1"].gov-form-multi-select select,
318
- [disabled="1"].gov-form-multi-select textarea {
319
- border-color: var(--gov-form-state-color-disabled, var(--gov-color-secondary-600));
320
- background: var(--gov-form-input-disabled-bg, var(--gov-color-secondary-300));
321
- color: var(--gov-form-state-color-disabled, var(--gov-color-secondary-600));
322
- }
323
- [disabled=""].gov-form-multi-select *[slot=left-icon],
324
- [disabled=""].gov-form-multi-select *[slot=right-icon], [disabled=true i].gov-form-multi-select *[slot=left-icon],
325
- [disabled=true i].gov-form-multi-select *[slot=right-icon], [disabled="1"].gov-form-multi-select *[slot=left-icon],
326
- [disabled="1"].gov-form-multi-select *[slot=right-icon] {
327
- color: var(--gov-form-state-color-disabled, var(--gov-color-secondary-600));
328
- }
329
- [invalid=""].gov-form-multi-select input,
330
- [invalid=""].gov-form-multi-select select,
331
- [invalid=""].gov-form-multi-select textarea, [invalid=true i].gov-form-multi-select input,
332
- [invalid=true i].gov-form-multi-select select,
333
- [invalid=true i].gov-form-multi-select textarea, [invalid="1"].gov-form-multi-select input,
334
- [invalid="1"].gov-form-multi-select select,
335
- [invalid="1"].gov-form-multi-select textarea {
336
- border-color: var(--gov-form-state-color-error, var(--gov-color-error));
337
- color: var(--gov-form-state-color-error, var(--gov-color-error));
316
+ [size=s].gov-form-multi-select input,
317
+ [size=s].gov-form-multi-select select {
318
+ font-weight: var(--gov-text-s-font-weight);
319
+ font-size: var(--gov-text-s-font-size);
320
+ line-height: var(--gov-text-s-line-height);
321
+ letter-spacing: var(--gov-text-s-letter-spacing);
322
+ height: var(--gov-form-input-core-s-height, 2rem);
323
+ padding: var(--gov-form-input-core-s-padding, 0.25rem 0.75rem);
338
324
  }
339
- [invalid=""].gov-form-multi-select input::-moz-placeholder, [invalid=""].gov-form-multi-select select::-moz-placeholder, [invalid=""].gov-form-multi-select textarea::-moz-placeholder, [invalid=true i].gov-form-multi-select input::-moz-placeholder, [invalid=true i].gov-form-multi-select select::-moz-placeholder, [invalid=true i].gov-form-multi-select textarea::-moz-placeholder, [invalid="1"].gov-form-multi-select input::-moz-placeholder, [invalid="1"].gov-form-multi-select select::-moz-placeholder, [invalid="1"].gov-form-multi-select textarea::-moz-placeholder {
340
- color: var(--gov-form-state-color-error, var(--gov-color-error-300));
325
+ [size=s].gov-form-multi-select *[slot=left-icon],
326
+ [size=s].gov-form-multi-select *[slot=right-icon] {
327
+ width: var(--gov-form-input-core-s-icon-size, 1rem);
328
+ height: var(--gov-form-input-core-s-icon-size, 1rem);
341
329
  }
342
- [invalid=""].gov-form-multi-select input::placeholder,
343
- [invalid=""].gov-form-multi-select select::placeholder,
344
- [invalid=""].gov-form-multi-select textarea::placeholder, [invalid=true i].gov-form-multi-select input::placeholder,
345
- [invalid=true i].gov-form-multi-select select::placeholder,
346
- [invalid=true i].gov-form-multi-select textarea::placeholder, [invalid="1"].gov-form-multi-select input::placeholder,
347
- [invalid="1"].gov-form-multi-select select::placeholder,
348
- [invalid="1"].gov-form-multi-select textarea::placeholder {
349
- color: var(--gov-form-state-color-error, var(--gov-color-error-300));
330
+ [size=s].gov-form-multi-select *[slot=left-icon] {
331
+ left: calc((var(--gov-form-input-core-s-icon-padding, 2rem) - var(--gov-form-input-core-s-icon-size, 1rem)) / 2);
350
332
  }
351
- [invalid=""].gov-form-multi-select *[slot=left-icon],
352
- [invalid=""].gov-form-multi-select *[slot=right-icon], [invalid=true i].gov-form-multi-select *[slot=left-icon],
353
- [invalid=true i].gov-form-multi-select *[slot=right-icon], [invalid="1"].gov-form-multi-select *[slot=left-icon],
354
- [invalid="1"].gov-form-multi-select *[slot=right-icon] {
355
- color: var(--gov-form-state-color-error, var(--gov-color-error));
333
+ [size=s].gov-form-multi-select *[slot=left-icon] ~ input {
334
+ padding-left: var(--gov-form-input-core-s-icon-padding, 2rem);
356
335
  }
357
- [success=""].gov-form-multi-select *[slot=right-icon], [success=true i].gov-form-multi-select *[slot=right-icon], [success="1"].gov-form-multi-select *[slot=right-icon] {
358
- color: var(--gov-form-state-color-success, var(--gov-color-success));
336
+ [size=s].gov-form-multi-select *[slot=right-icon] {
337
+ right: calc((var(--gov-form-input-core-s-icon-padding, 2rem) - var(--gov-form-input-core-s-icon-size, 1rem)) / 2);
359
338
  }
360
- [success=""].gov-form-multi-select *[slot=right-icon]:not(.icon-validation):not(.icon-arrow), [success=true i].gov-form-multi-select *[slot=right-icon]:not(.icon-validation):not(.icon-arrow), [success="1"].gov-form-multi-select *[slot=right-icon]:not(.icon-validation):not(.icon-arrow) {
361
- display: none;
339
+ [size=s].gov-form-multi-select *[slot=right-icon] ~ input, [size=s].gov-form-multi-select *[slot=right-icon] ~ select {
340
+ padding-right: var(--gov-form-input-core-s-icon-padding, 2rem);
362
341
  }
363
342
  [size=m].gov-form-multi-select {
364
343
  font-weight: var(--gov-text-m-font-weight);
@@ -459,6 +438,80 @@
459
438
  [size=xl].gov-form-multi-select *[slot=right-icon] ~ input, [size=xl].gov-form-multi-select *[slot=right-icon] ~ select {
460
439
  padding-right: var(--gov-form-input-core-xl-icon-padding, 3rem);
461
440
  }
441
+ [variant=primary].gov-form-multi-select input,
442
+ [variant=primary].gov-form-multi-select select,
443
+ [variant=primary].gov-form-multi-select textarea {
444
+ color: var(--gov-form-input-color-primary, var(--gov-color-secondary-700));
445
+ border: var(--gov-form-input-border-primary, 0.0625rem solid var(--gov-color-primary-600));
446
+ }
447
+ [variant=primary].gov-form-multi-select *[slot=left-icon],
448
+ [variant=primary].gov-form-multi-select *[slot=right-icon] {
449
+ color: var(--gov-form-input-icon-color-primary, var(--gov-color-primary));
450
+ }
451
+ [variant=secondary].gov-form-multi-select input,
452
+ [variant=secondary].gov-form-multi-select select,
453
+ [variant=secondary].gov-form-multi-select textarea {
454
+ color: var(--gov-form-input-color-secondary, var(--gov-color-secondary-700));
455
+ border: var(--gov-form-input-border-secondary, 0.0625rem solid var(--gov-color-secondary-700));
456
+ }
457
+ [variant=secondary].gov-form-multi-select *[slot=left-icon],
458
+ [variant=secondary].gov-form-multi-select *[slot=right-icon] {
459
+ color: var(--gov-form-input-icon-color-secondary, var(--gov-color-primary));
460
+ }
461
+ [disabled=""].gov-form-multi-select, [disabled=true i].gov-form-multi-select, [disabled="1"].gov-form-multi-select {
462
+ pointer-events: none;
463
+ }
464
+ [disabled=""].gov-form-multi-select input,
465
+ [disabled=""].gov-form-multi-select select,
466
+ [disabled=""].gov-form-multi-select textarea, [disabled=true i].gov-form-multi-select input,
467
+ [disabled=true i].gov-form-multi-select select,
468
+ [disabled=true i].gov-form-multi-select textarea, [disabled="1"].gov-form-multi-select input,
469
+ [disabled="1"].gov-form-multi-select select,
470
+ [disabled="1"].gov-form-multi-select textarea {
471
+ border-color: var(--gov-form-state-color-disabled, var(--gov-color-secondary-600));
472
+ background: var(--gov-form-input-disabled-bg, var(--gov-color-secondary-300));
473
+ color: var(--gov-form-state-color-disabled, var(--gov-color-secondary-600));
474
+ }
475
+ [disabled=""].gov-form-multi-select *[slot=left-icon],
476
+ [disabled=""].gov-form-multi-select *[slot=right-icon], [disabled=true i].gov-form-multi-select *[slot=left-icon],
477
+ [disabled=true i].gov-form-multi-select *[slot=right-icon], [disabled="1"].gov-form-multi-select *[slot=left-icon],
478
+ [disabled="1"].gov-form-multi-select *[slot=right-icon] {
479
+ color: var(--gov-form-state-color-disabled, var(--gov-color-secondary-600));
480
+ }
481
+ [invalid=""].gov-form-multi-select input,
482
+ [invalid=""].gov-form-multi-select select,
483
+ [invalid=""].gov-form-multi-select textarea, [invalid=true i].gov-form-multi-select input,
484
+ [invalid=true i].gov-form-multi-select select,
485
+ [invalid=true i].gov-form-multi-select textarea, [invalid="1"].gov-form-multi-select input,
486
+ [invalid="1"].gov-form-multi-select select,
487
+ [invalid="1"].gov-form-multi-select textarea {
488
+ border-color: var(--gov-form-state-color-error, var(--gov-color-error));
489
+ color: var(--gov-form-state-color-error, var(--gov-color-error));
490
+ }
491
+ [invalid=""].gov-form-multi-select input::-moz-placeholder, [invalid=""].gov-form-multi-select select::-moz-placeholder, [invalid=""].gov-form-multi-select textarea::-moz-placeholder, [invalid=true i].gov-form-multi-select input::-moz-placeholder, [invalid=true i].gov-form-multi-select select::-moz-placeholder, [invalid=true i].gov-form-multi-select textarea::-moz-placeholder, [invalid="1"].gov-form-multi-select input::-moz-placeholder, [invalid="1"].gov-form-multi-select select::-moz-placeholder, [invalid="1"].gov-form-multi-select textarea::-moz-placeholder {
492
+ color: var(--gov-form-state-color-error, var(--gov-color-error-300));
493
+ }
494
+ [invalid=""].gov-form-multi-select input::placeholder,
495
+ [invalid=""].gov-form-multi-select select::placeholder,
496
+ [invalid=""].gov-form-multi-select textarea::placeholder, [invalid=true i].gov-form-multi-select input::placeholder,
497
+ [invalid=true i].gov-form-multi-select select::placeholder,
498
+ [invalid=true i].gov-form-multi-select textarea::placeholder, [invalid="1"].gov-form-multi-select input::placeholder,
499
+ [invalid="1"].gov-form-multi-select select::placeholder,
500
+ [invalid="1"].gov-form-multi-select textarea::placeholder {
501
+ color: var(--gov-form-state-color-error, var(--gov-color-error-300));
502
+ }
503
+ [invalid=""].gov-form-multi-select *[slot=left-icon],
504
+ [invalid=""].gov-form-multi-select *[slot=right-icon], [invalid=true i].gov-form-multi-select *[slot=left-icon],
505
+ [invalid=true i].gov-form-multi-select *[slot=right-icon], [invalid="1"].gov-form-multi-select *[slot=left-icon],
506
+ [invalid="1"].gov-form-multi-select *[slot=right-icon] {
507
+ color: var(--gov-form-state-color-error, var(--gov-color-error));
508
+ }
509
+ [success=""].gov-form-multi-select *[slot=right-icon], [success=true i].gov-form-multi-select *[slot=right-icon], [success="1"].gov-form-multi-select *[slot=right-icon] {
510
+ color: var(--gov-form-state-color-success, var(--gov-color-success));
511
+ }
512
+ [success=""].gov-form-multi-select *[slot=right-icon]:not(.icon-validation):not(.icon-arrow), [success=true i].gov-form-multi-select *[slot=right-icon]:not(.icon-validation):not(.icon-arrow), [success="1"].gov-form-multi-select *[slot=right-icon]:not(.icon-validation):not(.icon-arrow) {
513
+ display: none;
514
+ }
462
515
 
463
516
  .gov-form-multi-select {
464
517
  background: none;
@@ -81,6 +81,9 @@
81
81
  /*
82
82
  - Variables - Colors
83
83
  */
84
+ /*
85
+ - Variables - Control Group
86
+ */
84
87
  /*
85
88
  - Variables - Cookiebar
86
89
  */
@@ -81,6 +81,9 @@
81
81
  /*
82
82
  - Variables - Colors
83
83
  */
84
+ /*
85
+ - Variables - Control Group
86
+ */
84
87
  /*
85
88
  - Variables - Cookiebar
86
89
  */
@@ -1,3 +1,6 @@
1
+ import { Variants } from '../../../core/constants/variants';
2
+ import { pick } from '../../../utils/utils';
3
+ export const FormSearchs = pick(Variants, ['PRIMARY', 'SECONDARY']);
1
4
  export const FormSearchClass = {
2
5
  root: 'gov-form-search',
3
6
  input: 'gov-form-search__input',
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../../src/components/gov-form/search/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,eAAe,GAAG;EAC9B,IAAI,EAAE,iBAAiB;EACvB,KAAK,EAAE,wBAAwB;EAC/B,MAAM,EAAE,yBAAyB;CACjC,CAAA","sourcesContent":["export const FormSearchClass = {\n\troot: 'gov-form-search',\n\tinput: 'gov-form-search__input',\n\tbutton: 'gov-form-search__button',\n}\n"]}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../../src/components/gov-form/search/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAA;AAE3D,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAE3C,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC,CAAA;AAGnE,MAAM,CAAC,MAAM,eAAe,GAAG;EAC9B,IAAI,EAAE,iBAAiB;EACvB,KAAK,EAAE,wBAAwB;EAC/B,MAAM,EAAE,yBAAyB;CACjC,CAAA","sourcesContent":["import { Variants } from '../../../core/constants/variants'\nimport { ValueOf } from '../../../types/interfaces'\nimport { pick } from '../../../utils/utils'\n\nexport const FormSearchs = pick(Variants, ['PRIMARY', 'SECONDARY'])\nexport type FormSearchVariantType = `${ValueOf<typeof FormSearchs>}`\n\nexport const FormSearchClass = {\n\troot: 'gov-form-search',\n\tinput: 'gov-form-search__input',\n\tbutton: 'gov-form-search__button',\n}\n"]}