@sats-group/ui-lib 80.4.0 → 81.0.1

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 (657) hide show
  1. package/package.json +6 -2
  2. package/react/add-bem-modifiers.d.ts +10 -0
  3. package/react/add-bem-modifiers.js +2 -0
  4. package/react/add-bem-modifiers.js.map +7 -0
  5. package/react/badge/badge.d.ts +7 -0
  6. package/react/badge/badge.js +2 -0
  7. package/react/badge/badge.js.map +7 -0
  8. package/react/badge/badge.types.d.ts +29 -0
  9. package/react/badge/badge.types.js +2 -0
  10. package/react/badge/badge.types.js.map +7 -0
  11. package/react/badge/index.js +2 -0
  12. package/react/badge/index.js.map +7 -0
  13. package/react/banner/banner.d.ts +4 -0
  14. package/react/banner/banner.js +2 -0
  15. package/react/banner/banner.js.map +7 -0
  16. package/react/banner/banner.types.d.ts +13 -0
  17. package/react/banner/banner.types.js +1 -0
  18. package/react/banner/banner.types.js.map +7 -0
  19. package/react/banner/index.js +2 -0
  20. package/react/banner/index.js.map +7 -0
  21. package/react/bomb/bomb.d.ts +4 -0
  22. package/react/bomb/bomb.js +2 -0
  23. package/react/bomb/bomb.js.map +7 -0
  24. package/react/bomb/bomb.types.d.ts +4 -0
  25. package/react/bomb/bomb.types.js +1 -0
  26. package/react/bomb/bomb.types.js.map +7 -0
  27. package/react/bomb/index.js +2 -0
  28. package/react/bomb/index.js.map +7 -0
  29. package/react/button/button.d.ts +9 -0
  30. package/react/button/button.js +2 -0
  31. package/react/button/button.js.map +7 -0
  32. package/react/button/{button.types.ts → button.types.d.ts} +0 -1
  33. package/react/button/button.types.js +1 -0
  34. package/react/button/button.types.js.map +7 -0
  35. package/react/button/index.js +2 -0
  36. package/react/button/index.js.map +7 -0
  37. package/react/checkbox/checkbox.d.ts +20 -0
  38. package/react/checkbox/checkbox.js +2 -0
  39. package/react/checkbox/checkbox.js.map +7 -0
  40. package/react/checkbox/checkbox.types.d.ts +17 -0
  41. package/react/checkbox/checkbox.types.js +2 -0
  42. package/react/checkbox/checkbox.types.js.map +7 -0
  43. package/react/checkbox/index.js +2 -0
  44. package/react/checkbox/index.js.map +7 -0
  45. package/react/chip/chip.d.ts +4 -0
  46. package/react/chip/chip.js +2 -0
  47. package/react/chip/chip.js.map +7 -0
  48. package/react/chip/chip.types.d.ts +18 -0
  49. package/react/chip/chip.types.js +1 -0
  50. package/react/chip/chip.types.js.map +7 -0
  51. package/react/chip/index.js +2 -0
  52. package/react/chip/index.js.map +7 -0
  53. package/react/chip/remove.d.ts +3 -0
  54. package/react/chip/remove.js +2 -0
  55. package/react/chip/remove.js.map +7 -0
  56. package/react/chip-selected/chip-selected.d.ts +4 -0
  57. package/react/chip-selected/chip-selected.js +2 -0
  58. package/react/chip-selected/chip-selected.js.map +7 -0
  59. package/react/chip-selected/chip-selected.types.d.ts +10 -0
  60. package/react/chip-selected/chip-selected.types.js +1 -0
  61. package/react/chip-selected/chip-selected.types.js.map +7 -0
  62. package/react/chip-selected/index.js +2 -0
  63. package/react/chip-selected/index.js.map +7 -0
  64. package/react/collapse/collapse.d.ts +1134 -0
  65. package/react/collapse/collapse.js +2 -0
  66. package/react/collapse/collapse.js.map +7 -0
  67. package/react/collapse/collapse.types.d.ts +13 -0
  68. package/react/collapse/collapse.types.js +1 -0
  69. package/react/collapse/collapse.types.js.map +7 -0
  70. package/react/collapse/index.js +2 -0
  71. package/react/collapse/index.js.map +7 -0
  72. package/react/components.d.ts +2 -0
  73. package/react/components.js +2 -0
  74. package/react/components.js.map +7 -0
  75. package/react/confirmation/confirmation.d.ts +4 -0
  76. package/react/confirmation/confirmation.js +2 -0
  77. package/react/confirmation/confirmation.js.map +7 -0
  78. package/react/confirmation/confirmation.types.d.ts +22 -0
  79. package/react/confirmation/confirmation.types.js +1 -0
  80. package/react/confirmation/confirmation.types.js.map +7 -0
  81. package/react/confirmation/index.js +2 -0
  82. package/react/confirmation/index.js.map +7 -0
  83. package/react/context-menu/context-menu.d.ts +7 -0
  84. package/react/context-menu/context-menu.js +2 -0
  85. package/react/context-menu/context-menu.js.map +7 -0
  86. package/react/context-menu/context-menu.types.d.ts +64 -0
  87. package/react/context-menu/context-menu.types.js +2 -0
  88. package/react/context-menu/context-menu.types.js.map +7 -0
  89. package/react/context-menu/index.js +2 -0
  90. package/react/context-menu/index.js.map +7 -0
  91. package/react/cropped-image/cropped-image.d.ts +7 -0
  92. package/react/cropped-image/cropped-image.js +2 -0
  93. package/react/cropped-image/cropped-image.js.map +7 -0
  94. package/react/cropped-image/cropped-image.types.d.ts +23 -0
  95. package/react/cropped-image/cropped-image.types.js +2 -0
  96. package/react/cropped-image/cropped-image.types.js.map +7 -0
  97. package/react/cropped-image/index.js +2 -0
  98. package/react/cropped-image/index.js.map +7 -0
  99. package/react/div-button/div-button.d.ts +8 -0
  100. package/react/div-button/div-button.js +2 -0
  101. package/react/div-button/div-button.js.map +7 -0
  102. package/react/div-button/{div-button.types.ts → div-button.types.d.ts} +0 -1
  103. package/react/div-button/div-button.types.js +1 -0
  104. package/react/div-button/div-button.types.js.map +7 -0
  105. package/react/div-button/index.js +2 -0
  106. package/react/div-button/index.js.map +7 -0
  107. package/react/dropdown-list/dropdown-list.d.ts +6 -0
  108. package/react/dropdown-list/dropdown-list.js +2 -0
  109. package/react/dropdown-list/dropdown-list.js.map +7 -0
  110. package/react/dropdown-list/dropdown-list.types.d.ts +15 -0
  111. package/react/dropdown-list/dropdown-list.types.js +2 -0
  112. package/react/dropdown-list/dropdown-list.types.js.map +7 -0
  113. package/react/dropdown-list/index.js +2 -0
  114. package/react/dropdown-list/index.js.map +7 -0
  115. package/react/expander/expander.d.ts +6 -0
  116. package/react/expander/expander.js +2 -0
  117. package/react/expander/expander.js.map +7 -0
  118. package/react/expander/expander.types.d.ts +30 -0
  119. package/react/expander/expander.types.js +2 -0
  120. package/react/expander/expander.types.js.map +7 -0
  121. package/react/expander/index.js +2 -0
  122. package/react/expander/index.js.map +7 -0
  123. package/react/filter/filter.d.ts +4 -0
  124. package/react/filter/filter.js +2 -0
  125. package/react/filter/filter.js.map +7 -0
  126. package/react/filter/filter.types.d.ts +9 -0
  127. package/react/filter/filter.types.js +1 -0
  128. package/react/filter/filter.types.js.map +7 -0
  129. package/react/filter/index.js +2 -0
  130. package/react/filter/index.js.map +7 -0
  131. package/react/filter-wrapper/filter-wrapper.d.ts +4 -0
  132. package/react/filter-wrapper/filter-wrapper.js +2 -0
  133. package/react/filter-wrapper/filter-wrapper.js.map +7 -0
  134. package/react/filter-wrapper/filter-wrapper.types.d.ts +8 -0
  135. package/react/filter-wrapper/filter-wrapper.types.js +2 -0
  136. package/react/filter-wrapper/filter-wrapper.types.js.map +7 -0
  137. package/react/filter-wrapper/index.js +2 -0
  138. package/react/filter-wrapper/index.js.map +7 -0
  139. package/react/flag/flag.d.ts +7 -0
  140. package/react/flag/flag.js +2 -0
  141. package/react/flag/flag.js.map +7 -0
  142. package/react/flag/flag.types.d.ts +14 -0
  143. package/react/flag/flag.types.js +2 -0
  144. package/react/flag/flag.types.js.map +7 -0
  145. package/react/flag/index.js +2 -0
  146. package/react/flag/index.js.map +7 -0
  147. package/react/form-content/checkbox-category.d.ts +4 -0
  148. package/react/form-content/checkbox-category.js +2 -0
  149. package/react/form-content/checkbox-category.js.map +7 -0
  150. package/react/form-content/form-content.checkbox-list.d.ts +4 -0
  151. package/react/form-content/form-content.checkbox-list.js +2 -0
  152. package/react/form-content/form-content.checkbox-list.js.map +7 -0
  153. package/react/form-content/form-content.checkbox-list.types.d.ts +35 -0
  154. package/react/form-content/form-content.checkbox-list.types.js +1 -0
  155. package/react/form-content/form-content.checkbox-list.types.js.map +7 -0
  156. package/react/form-content/form-content.d.ts +4 -0
  157. package/react/form-content/form-content.js +2 -0
  158. package/react/form-content/form-content.js.map +7 -0
  159. package/react/form-content/form-content.radio-list.d.ts +4 -0
  160. package/react/form-content/form-content.radio-list.js +2 -0
  161. package/react/form-content/form-content.radio-list.js.map +7 -0
  162. package/react/form-content/form-content.range.d.ts +4 -0
  163. package/react/form-content/form-content.range.js +2 -0
  164. package/react/form-content/form-content.range.js.map +7 -0
  165. package/react/form-content/{form-content.range.types.ts → form-content.range.types.d.ts} +7 -8
  166. package/react/form-content/form-content.range.types.js +1 -0
  167. package/react/form-content/form-content.range.types.js.map +7 -0
  168. package/react/form-content/form-content.search.d.ts +4 -0
  169. package/react/form-content/form-content.search.js +2 -0
  170. package/react/form-content/form-content.search.js.map +7 -0
  171. package/react/form-content/form-content.types.d.ts +49 -0
  172. package/react/form-content/form-content.types.js +2 -0
  173. package/react/form-content/form-content.types.js.map +7 -0
  174. package/react/form-content/index.js +2 -0
  175. package/react/form-content/index.js.map +7 -0
  176. package/react/hidden-input/{hidden-input.tsx → hidden-input.d.ts} +1 -6
  177. package/react/hidden-input/hidden-input.js +2 -0
  178. package/react/hidden-input/hidden-input.js.map +7 -0
  179. package/react/hidden-input/{hidden-input.types.ts → hidden-input.types.d.ts} +2 -3
  180. package/react/hidden-input/hidden-input.types.js +1 -0
  181. package/react/hidden-input/hidden-input.types.js.map +7 -0
  182. package/react/hidden-input/index.js +2 -0
  183. package/react/hidden-input/index.js.map +7 -0
  184. package/react/hooks/focus-previous-element.d.ts +3 -0
  185. package/react/hooks/focus-previous-element.js +2 -0
  186. package/react/hooks/focus-previous-element.js.map +7 -0
  187. package/react/hooks/is-running-on-client.d.ts +2 -0
  188. package/react/hooks/is-running-on-client.js +2 -0
  189. package/react/hooks/is-running-on-client.js.map +7 -0
  190. package/react/hooks/use-click-outside.d.ts +4 -0
  191. package/react/hooks/use-click-outside.js +2 -0
  192. package/react/hooks/use-click-outside.js.map +7 -0
  193. package/react/hooks/use-escape.d.ts +2 -0
  194. package/react/hooks/use-escape.js +2 -0
  195. package/react/hooks/use-escape.js.map +7 -0
  196. package/react/hooks/use-event.d.ts +2 -0
  197. package/react/hooks/use-event.js +2 -0
  198. package/react/hooks/use-event.js.map +7 -0
  199. package/react/hooks/use-is-mounted.d.ts +1 -0
  200. package/react/hooks/use-is-mounted.js +2 -0
  201. package/react/hooks/use-is-mounted.js.map +7 -0
  202. package/react/hooks/use-toggle.d.ts +2 -0
  203. package/react/hooks/use-toggle.js +2 -0
  204. package/react/hooks/use-toggle.js.map +7 -0
  205. package/react/icons/16/add.d.ts +3 -0
  206. package/react/icons/16/add.js +2 -0
  207. package/react/icons/16/add.js.map +7 -0
  208. package/react/icons/16/close.d.ts +3 -0
  209. package/react/icons/16/close.js +2 -0
  210. package/react/icons/16/close.js.map +7 -0
  211. package/react/icons/16/error.d.ts +3 -0
  212. package/react/icons/16/error.js +2 -0
  213. package/react/icons/16/error.js.map +7 -0
  214. package/react/icons/16/fistbump.d.ts +3 -0
  215. package/react/icons/16/fistbump.js +2 -0
  216. package/react/icons/16/fistbump.js.map +7 -0
  217. package/react/icons/16/info.d.ts +3 -0
  218. package/react/icons/16/info.js +2 -0
  219. package/react/icons/16/info.js.map +7 -0
  220. package/react/icons/16/send.d.ts +3 -0
  221. package/react/icons/16/send.js +2 -0
  222. package/react/icons/16/send.js.map +7 -0
  223. package/react/icons/18/arrow-down.d.ts +3 -0
  224. package/react/icons/18/arrow-down.js +2 -0
  225. package/react/icons/18/arrow-down.js.map +7 -0
  226. package/react/icons/18/close.d.ts +3 -0
  227. package/react/icons/18/close.js +2 -0
  228. package/react/icons/18/close.js.map +7 -0
  229. package/react/icons/18/confirm.d.ts +3 -0
  230. package/react/icons/18/confirm.js +2 -0
  231. package/react/icons/18/confirm.js.map +7 -0
  232. package/react/icons/18/error.d.ts +3 -0
  233. package/react/icons/18/error.js +2 -0
  234. package/react/icons/18/error.js.map +7 -0
  235. package/react/icons/18/info.d.ts +3 -0
  236. package/react/icons/18/info.js +2 -0
  237. package/react/icons/18/info.js.map +7 -0
  238. package/react/icons/18/warning-sign.d.ts +3 -0
  239. package/react/icons/18/warning-sign.js +2 -0
  240. package/react/icons/18/warning-sign.js.map +7 -0
  241. package/react/icons/24/arrow-down.d.ts +3 -0
  242. package/react/icons/24/arrow-down.js +2 -0
  243. package/react/icons/24/arrow-down.js.map +7 -0
  244. package/react/icons/24/arrow-right.d.ts +3 -0
  245. package/react/icons/24/arrow-right.js +2 -0
  246. package/react/icons/24/arrow-right.js.map +7 -0
  247. package/react/icons/24/arrow-up.d.ts +3 -0
  248. package/react/icons/24/arrow-up.js +2 -0
  249. package/react/icons/24/arrow-up.js.map +7 -0
  250. package/react/icons/24/close.d.ts +3 -0
  251. package/react/icons/24/close.js +2 -0
  252. package/react/icons/24/close.js.map +7 -0
  253. package/react/icons/24/remove.d.ts +3 -0
  254. package/react/icons/24/remove.js +2 -0
  255. package/react/icons/24/remove.js.map +7 -0
  256. package/react/icons/24/search.d.ts +3 -0
  257. package/react/icons/24/search.js +2 -0
  258. package/react/icons/24/search.js.map +7 -0
  259. package/react/indexed-access-type.js +1 -0
  260. package/react/indexed-access-type.js.map +7 -0
  261. package/react/link/index.js +2 -0
  262. package/react/link/index.js.map +7 -0
  263. package/react/link/link.d.ts +9 -0
  264. package/react/link/link.js +2 -0
  265. package/react/link/link.js.map +7 -0
  266. package/react/link/link.types.d.ts +29 -0
  267. package/react/link/link.types.js +2 -0
  268. package/react/link/link.types.js.map +7 -0
  269. package/react/link-button/index.js +2 -0
  270. package/react/link-button/index.js.map +7 -0
  271. package/react/link-button/link-button.d.ts +8 -0
  272. package/react/link-button/link-button.js +2 -0
  273. package/react/link-button/link-button.js.map +7 -0
  274. package/react/link-button/{link-button.types.ts → link-button.types.d.ts} +0 -1
  275. package/react/link-button/link-button.types.js +1 -0
  276. package/react/link-button/link-button.types.js.map +7 -0
  277. package/react/link-card/index.js +2 -0
  278. package/react/link-card/index.js.map +7 -0
  279. package/react/link-card/link-card.d.ts +4 -0
  280. package/react/link-card/link-card.js +2 -0
  281. package/react/link-card/link-card.js.map +7 -0
  282. package/react/link-card/link-card.types.d.ts +5 -0
  283. package/react/link-card/link-card.types.js +1 -0
  284. package/react/link-card/link-card.types.js.map +7 -0
  285. package/react/logos/e-avatar.d.ts +3 -0
  286. package/react/logos/e-avatar.js +2 -0
  287. package/react/logos/e-avatar.js.map +7 -0
  288. package/react/logos/elixia-anniversary-light.d.ts +3 -0
  289. package/react/logos/elixia-anniversary-light.js +2 -0
  290. package/react/logos/elixia-anniversary-light.js.map +7 -0
  291. package/react/logos/elixia-letter.d.ts +3 -0
  292. package/react/logos/elixia-letter.js +2 -0
  293. package/react/logos/elixia-letter.js.map +7 -0
  294. package/react/logos/elixia-pride-dark.d.ts +3 -0
  295. package/react/logos/elixia-pride-dark.js +2 -0
  296. package/react/logos/elixia-pride-dark.js.map +7 -0
  297. package/react/logos/elixia-pride-light.d.ts +3 -0
  298. package/react/logos/elixia-pride-light.js +2 -0
  299. package/react/logos/elixia-pride-light.js.map +7 -0
  300. package/react/logos/elixia-small.d.ts +3 -0
  301. package/react/logos/elixia-small.js +2 -0
  302. package/react/logos/elixia-small.js.map +7 -0
  303. package/react/logos/elixia.d.ts +3 -0
  304. package/react/logos/elixia.js +2 -0
  305. package/react/logos/elixia.js.map +7 -0
  306. package/react/logos/index.js +2 -0
  307. package/react/logos/index.js.map +7 -0
  308. package/react/logos/s-avatar.d.ts +3 -0
  309. package/react/logos/s-avatar.js +2 -0
  310. package/react/logos/s-avatar.js.map +7 -0
  311. package/react/logos/sats-anniversary-light.d.ts +3 -0
  312. package/react/logos/sats-anniversary-light.js +2 -0
  313. package/react/logos/sats-anniversary-light.js.map +7 -0
  314. package/react/logos/sats-letter.d.ts +3 -0
  315. package/react/logos/sats-letter.js +2 -0
  316. package/react/logos/sats-letter.js.map +7 -0
  317. package/react/logos/sats-pride-dark.d.ts +3 -0
  318. package/react/logos/sats-pride-dark.js +2 -0
  319. package/react/logos/sats-pride-dark.js.map +7 -0
  320. package/react/logos/sats-pride-light.d.ts +3 -0
  321. package/react/logos/sats-pride-light.js +2 -0
  322. package/react/logos/sats-pride-light.js.map +7 -0
  323. package/react/logos/sats-small.d.ts +3 -0
  324. package/react/logos/sats-small.js +2 -0
  325. package/react/logos/sats-small.js.map +7 -0
  326. package/react/logos/sats.d.ts +3 -0
  327. package/react/logos/sats.js +2 -0
  328. package/react/logos/sats.js.map +7 -0
  329. package/react/message/hook/use-message.d.ts +3 -0
  330. package/react/message/hook/use-message.js +2 -0
  331. package/react/message/hook/use-message.js.map +7 -0
  332. package/react/message/index.js +2 -0
  333. package/react/message/index.js.map +7 -0
  334. package/react/message/message.d.ts +6 -0
  335. package/react/message/message.js +2 -0
  336. package/react/message/message.js.map +7 -0
  337. package/react/message/message.types.d.ts +23 -0
  338. package/react/message/message.types.js +2 -0
  339. package/react/message/message.types.js.map +7 -0
  340. package/react/message/publish.d.ts +3 -0
  341. package/react/message/publish.js +2 -0
  342. package/react/message/publish.js.map +7 -0
  343. package/react/message-field/index.js +2 -0
  344. package/react/message-field/index.js.map +7 -0
  345. package/react/message-field/message-field.d.ts +7 -0
  346. package/react/message-field/message-field.js +2 -0
  347. package/react/message-field/message-field.js.map +7 -0
  348. package/react/message-field/message-field.types.d.ts +21 -0
  349. package/react/message-field/message-field.types.js +2 -0
  350. package/react/message-field/message-field.types.js.map +7 -0
  351. package/react/modal/index.js +2 -0
  352. package/react/modal/index.js.map +7 -0
  353. package/react/modal/modal.d.ts +6 -0
  354. package/react/modal/modal.js +2 -0
  355. package/react/modal/modal.js.map +7 -0
  356. package/react/modal/modal.types.d.ts +32 -0
  357. package/react/modal/modal.types.js +2 -0
  358. package/react/modal/modal.types.js.map +7 -0
  359. package/react/modal/tab-trapper.d.ts +6 -0
  360. package/react/modal/tab-trapper.js +2 -0
  361. package/react/modal/tab-trapper.js.map +7 -0
  362. package/react/progress-bar/index.js +2 -0
  363. package/react/progress-bar/index.js.map +7 -0
  364. package/react/progress-bar/progress-bar.d.ts +9 -0
  365. package/react/progress-bar/progress-bar.js +2 -0
  366. package/react/progress-bar/progress-bar.js.map +7 -0
  367. package/react/progress-bar/progress-bar.types.d.ts +30 -0
  368. package/react/progress-bar/progress-bar.types.js +2 -0
  369. package/react/progress-bar/progress-bar.types.js.map +7 -0
  370. package/react/radio/index.js +2 -0
  371. package/react/radio/index.js.map +7 -0
  372. package/react/radio/radio.d.ts +17 -0
  373. package/react/radio/radio.js +2 -0
  374. package/react/radio/radio.js.map +7 -0
  375. package/react/radio/radio.types.d.ts +13 -0
  376. package/react/radio/radio.types.js +2 -0
  377. package/react/radio/radio.types.js.map +7 -0
  378. package/react/scale-bar/index.js +2 -0
  379. package/react/scale-bar/index.js.map +7 -0
  380. package/react/scale-bar/scale-bar.d.ts +4 -0
  381. package/react/scale-bar/scale-bar.js +2 -0
  382. package/react/scale-bar/scale-bar.js.map +7 -0
  383. package/react/scale-bar/scale-bar.types.d.ts +4 -0
  384. package/react/scale-bar/scale-bar.types.js +1 -0
  385. package/react/scale-bar/scale-bar.types.js.map +7 -0
  386. package/react/search/index.js +2 -0
  387. package/react/search/index.js.map +7 -0
  388. package/react/search/search.d.ts +28 -0
  389. package/react/search/search.js +2 -0
  390. package/react/search/search.js.map +7 -0
  391. package/react/search/search.types.d.ts +39 -0
  392. package/react/search/search.types.js +2 -0
  393. package/react/search/search.types.js.map +7 -0
  394. package/react/select/index.js +2 -0
  395. package/react/select/index.js.map +7 -0
  396. package/react/select/select.d.ts +10 -0
  397. package/react/select/select.js +2 -0
  398. package/react/select/select.js.map +7 -0
  399. package/react/select/select.types.d.ts +21 -0
  400. package/react/select/select.types.js +2 -0
  401. package/react/select/select.types.js.map +7 -0
  402. package/react/select-option/index.js +2 -0
  403. package/react/select-option/index.js.map +7 -0
  404. package/react/select-option/{select-option.tsx → select-option.d.ts} +1 -12
  405. package/react/select-option/select-option.js +2 -0
  406. package/react/select-option/select-option.js.map +7 -0
  407. package/react/select-option/select-option.types.d.ts +6 -0
  408. package/react/select-option/select-option.types.js +1 -0
  409. package/react/select-option/select-option.types.js.map +7 -0
  410. package/react/tag/index.js +2 -0
  411. package/react/tag/index.js.map +7 -0
  412. package/react/tag/tag.d.ts +7 -0
  413. package/react/tag/tag.js +2 -0
  414. package/react/tag/tag.js.map +7 -0
  415. package/react/tag/tag.types.d.ts +26 -0
  416. package/react/tag/tag.types.js +2 -0
  417. package/react/tag/tag.types.js.map +7 -0
  418. package/react/text/index.js +2 -0
  419. package/react/text/index.js.map +7 -0
  420. package/react/text/text.d.ts +7 -0
  421. package/react/text/text.js +2 -0
  422. package/react/text/text.js.map +7 -0
  423. package/react/text/text.types.d.ts +27 -0
  424. package/react/text/text.types.js +2 -0
  425. package/react/text/text.types.js.map +7 -0
  426. package/react/text-area/index.js +2 -0
  427. package/react/text-area/index.js.map +7 -0
  428. package/react/text-area/text-area.d.ts +20 -0
  429. package/react/text-area/text-area.js +2 -0
  430. package/react/text-area/text-area.js.map +7 -0
  431. package/react/text-area/text-area.types.d.ts +21 -0
  432. package/react/text-area/text-area.types.js +2 -0
  433. package/react/text-area/text-area.types.js.map +7 -0
  434. package/react/text-input/index.js +2 -0
  435. package/react/text-input/index.js.map +7 -0
  436. package/react/text-input/text-input.d.ts +18 -0
  437. package/react/text-input/text-input.js +2 -0
  438. package/react/text-input/text-input.js.map +7 -0
  439. package/react/text-input/text-input.scss +3 -9
  440. package/react/text-input/text-input.types.d.ts +21 -0
  441. package/react/text-input/text-input.types.js +2 -0
  442. package/react/text-input/text-input.types.js.map +7 -0
  443. package/react/toggle/index.js +2 -0
  444. package/react/toggle/index.js.map +7 -0
  445. package/react/toggle/toggle.d.ts +13 -0
  446. package/react/toggle/toggle.js +2 -0
  447. package/react/toggle/toggle.js.map +7 -0
  448. package/react/toggle/toggle.types.d.ts +10 -0
  449. package/react/toggle/toggle.types.js +1 -0
  450. package/react/toggle/toggle.types.js.map +7 -0
  451. package/react/toolbox/index.js +2 -0
  452. package/react/toolbox/index.js.map +7 -0
  453. package/react/toolbox/toolbox.d.ts +4 -0
  454. package/react/toolbox/toolbox.js +2 -0
  455. package/react/toolbox/toolbox.js.map +7 -0
  456. package/react/toolbox/toolbox.types.d.ts +34 -0
  457. package/react/toolbox/toolbox.types.js +2 -0
  458. package/react/toolbox/toolbox.types.js.map +7 -0
  459. package/react/ts/debounce.d.ts +1 -0
  460. package/react/ts/debounce.js +2 -0
  461. package/react/ts/debounce.js.map +7 -0
  462. package/react/{types.ts → types.d.ts} +4 -19
  463. package/react/types.js +1 -0
  464. package/react/types.js.map +7 -0
  465. package/react/use-input-validation.d.ts +4 -0
  466. package/react/use-input-validation.js +2 -0
  467. package/react/use-input-validation.js.map +7 -0
  468. package/react/use-input-validation.types.d.ts +13 -0
  469. package/react/use-input-validation.types.js +1 -0
  470. package/react/use-input-validation.types.js.map +7 -0
  471. package/react/visually-button/index.js +2 -0
  472. package/react/visually-button/index.js.map +7 -0
  473. package/react/visually-button/maps.d.ts +6 -0
  474. package/react/visually-button/maps.js +2 -0
  475. package/react/visually-button/maps.js.map +7 -0
  476. package/react/visually-button/visually-button.d.ts +8 -0
  477. package/react/visually-button/visually-button.js +2 -0
  478. package/react/visually-button/visually-button.js.map +7 -0
  479. package/react/visually-button/visually-button.types.d.ts +46 -0
  480. package/react/visually-button/visually-button.types.js +2 -0
  481. package/react/visually-button/visually-button.types.js.map +7 -0
  482. package/react/visually-hidden/index.js +2 -0
  483. package/react/visually-hidden/index.js.map +7 -0
  484. package/react/visually-hidden/visually-hidden.d.ts +3 -0
  485. package/react/visually-hidden/visually-hidden.js +2 -0
  486. package/react/visually-hidden/visually-hidden.js.map +7 -0
  487. package/.nvmrc +0 -1
  488. package/catalog-info.yaml +0 -14
  489. package/eslint.config.mjs +0 -93
  490. package/react/add-bem-modifiers.ts +0 -51
  491. package/react/badge/badge.tsx +0 -28
  492. package/react/badge/badge.types.ts +0 -34
  493. package/react/banner/banner.tsx +0 -93
  494. package/react/banner/banner.types.ts +0 -10
  495. package/react/bomb/bomb.tsx +0 -19
  496. package/react/bomb/bomb.types.ts +0 -1
  497. package/react/button/button.tsx +0 -23
  498. package/react/checkbox/checkbox.tsx +0 -176
  499. package/react/checkbox/checkbox.types.ts +0 -19
  500. package/react/chip/chip.tsx +0 -37
  501. package/react/chip/chip.types.ts +0 -18
  502. package/react/chip/remove.tsx +0 -14
  503. package/react/chip-selected/chip-selected.tsx +0 -102
  504. package/react/chip-selected/chip-selected.types.ts +0 -11
  505. package/react/collapse/collapse.tsx +0 -179
  506. package/react/collapse/collapse.types.ts +0 -13
  507. package/react/components.ts +0 -83
  508. package/react/confirmation/confirmation.tsx +0 -90
  509. package/react/confirmation/confirmation.types.ts +0 -25
  510. package/react/context-menu/context-menu.tsx +0 -201
  511. package/react/context-menu/context-menu.types.ts +0 -71
  512. package/react/cropped-image/cropped-image.tsx +0 -36
  513. package/react/cropped-image/cropped-image.types.ts +0 -26
  514. package/react/div-button/div-button.tsx +0 -15
  515. package/react/dropdown-list/dropdown-list.tsx +0 -116
  516. package/react/dropdown-list/dropdown-list.types.ts +0 -17
  517. package/react/expander/expander.tsx +0 -170
  518. package/react/expander/expander.types.ts +0 -33
  519. package/react/filter/filter.tsx +0 -99
  520. package/react/filter/filter.types.ts +0 -8
  521. package/react/filter-wrapper/filter-wrapper.tsx +0 -24
  522. package/react/filter-wrapper/filter-wrapper.types.ts +0 -10
  523. package/react/flag/flag.tsx +0 -27
  524. package/react/flag/flag.types.ts +0 -17
  525. package/react/form-content/checkbox-category.tsx +0 -183
  526. package/react/form-content/form-content.checkbox-list.tsx +0 -126
  527. package/react/form-content/form-content.checkbox-list.types.ts +0 -36
  528. package/react/form-content/form-content.radio-list.tsx +0 -58
  529. package/react/form-content/form-content.range.tsx +0 -20
  530. package/react/form-content/form-content.search.tsx +0 -47
  531. package/react/form-content/form-content.tsx +0 -96
  532. package/react/form-content/form-content.types.ts +0 -55
  533. package/react/hooks/focus-previous-element.ts +0 -30
  534. package/react/hooks/is-running-on-client.ts +0 -1
  535. package/react/hooks/use-click-outside.ts +0 -23
  536. package/react/hooks/use-escape.ts +0 -18
  537. package/react/hooks/use-event.ts +0 -29
  538. package/react/hooks/use-is-mounted.ts +0 -11
  539. package/react/hooks/use-toggle.ts +0 -19
  540. package/react/icons/16/add.tsx +0 -13
  541. package/react/icons/16/close.tsx +0 -12
  542. package/react/icons/16/error.tsx +0 -23
  543. package/react/icons/16/fistbump.tsx +0 -13
  544. package/react/icons/16/info.tsx +0 -17
  545. package/react/icons/16/send.tsx +0 -13
  546. package/react/icons/18/arrow-down.tsx +0 -13
  547. package/react/icons/18/close.tsx +0 -18
  548. package/react/icons/18/confirm.tsx +0 -19
  549. package/react/icons/18/error.tsx +0 -23
  550. package/react/icons/18/info.tsx +0 -17
  551. package/react/icons/18/warning-sign.tsx +0 -23
  552. package/react/icons/24/arrow-down.tsx +0 -14
  553. package/react/icons/24/arrow-right.tsx +0 -14
  554. package/react/icons/24/arrow-up.tsx +0 -14
  555. package/react/icons/24/close.tsx +0 -12
  556. package/react/icons/24/remove.tsx +0 -12
  557. package/react/icons/24/search.tsx +0 -10
  558. package/react/icons/icons.md +0 -3
  559. package/react/link/link.tsx +0 -62
  560. package/react/link/link.types.ts +0 -37
  561. package/react/link-button/link-button.tsx +0 -17
  562. package/react/link-card/link-card.tsx +0 -24
  563. package/react/link-card/link-card.types.ts +0 -5
  564. package/react/logos/e-avatar.tsx +0 -12
  565. package/react/logos/elixia-anniversary-light.tsx +0 -70
  566. package/react/logos/elixia-letter.tsx +0 -12
  567. package/react/logos/elixia-pride-dark.tsx +0 -102
  568. package/react/logos/elixia-pride-light.tsx +0 -102
  569. package/react/logos/elixia-small.tsx +0 -12
  570. package/react/logos/elixia.tsx +0 -12
  571. package/react/logos/s-avatar.tsx +0 -12
  572. package/react/logos/sats-anniversary-light.tsx +0 -76
  573. package/react/logos/sats-letter.tsx +0 -12
  574. package/react/logos/sats-pride-dark.tsx +0 -102
  575. package/react/logos/sats-pride-light.tsx +0 -102
  576. package/react/logos/sats-small.tsx +0 -12
  577. package/react/logos/sats.tsx +0 -12
  578. package/react/message/hook/use-message.ts +0 -22
  579. package/react/message/message.tsx +0 -60
  580. package/react/message/message.types.ts +0 -39
  581. package/react/message/publish.ts +0 -19
  582. package/react/message-field/message-field.tsx +0 -70
  583. package/react/message-field/message-field.types.ts +0 -24
  584. package/react/modal/modal.tsx +0 -131
  585. package/react/modal/modal.types.ts +0 -36
  586. package/react/modal/tab-trapper.tsx +0 -68
  587. package/react/progress-bar/progress-bar.tsx +0 -81
  588. package/react/progress-bar/progress-bar.types.ts +0 -35
  589. package/react/radio/radio.tsx +0 -87
  590. package/react/radio/radio.types.ts +0 -15
  591. package/react/scale-bar/scale-bar.tsx +0 -29
  592. package/react/scale-bar/scale-bar.types.ts +0 -4
  593. package/react/search/search.tsx +0 -267
  594. package/react/search/search.types.ts +0 -44
  595. package/react/select/select.tsx +0 -139
  596. package/react/select/select.types.ts +0 -26
  597. package/react/select-option/select-option.types.ts +0 -8
  598. package/react/tag/tag.tsx +0 -26
  599. package/react/tag/tag.types.ts +0 -30
  600. package/react/text/text.tsx +0 -40
  601. package/react/text/text.types.ts +0 -29
  602. package/react/text-area/text-area.tsx +0 -153
  603. package/react/text-area/text-area.types.ts +0 -24
  604. package/react/text-input/text-input.tsx +0 -160
  605. package/react/text-input/text-input.types.ts +0 -24
  606. package/react/toggle/toggle.tsx +0 -85
  607. package/react/toggle/toggle.types.ts +0 -11
  608. package/react/toolbox/toolbox.tsx +0 -43
  609. package/react/toolbox/toolbox.types.ts +0 -39
  610. package/react/ts/debounce.ts +0 -12
  611. package/react/use-input-validation.ts +0 -60
  612. package/react/use-input-validation.types.ts +0 -13
  613. package/react/visually-button/maps.ts +0 -36
  614. package/react/visually-button/visually-button.tsx +0 -111
  615. package/react/visually-button/visually-button.types.ts +0 -59
  616. package/react/visually-hidden/visually-hidden.tsx +0 -10
  617. /package/react/badge/{index.ts → index.d.ts} +0 -0
  618. /package/react/banner/{index.ts → index.d.ts} +0 -0
  619. /package/react/bomb/{index.ts → index.d.ts} +0 -0
  620. /package/react/button/{index.ts → index.d.ts} +0 -0
  621. /package/react/checkbox/{index.ts → index.d.ts} +0 -0
  622. /package/react/chip/{index.ts → index.d.ts} +0 -0
  623. /package/react/chip-selected/{index.ts → index.d.ts} +0 -0
  624. /package/react/collapse/{index.ts → index.d.ts} +0 -0
  625. /package/react/confirmation/{index.ts → index.d.ts} +0 -0
  626. /package/react/context-menu/{index.ts → index.d.ts} +0 -0
  627. /package/react/cropped-image/{index.ts → index.d.ts} +0 -0
  628. /package/react/div-button/{index.ts → index.d.ts} +0 -0
  629. /package/react/dropdown-list/{index.ts → index.d.ts} +0 -0
  630. /package/react/expander/{index.ts → index.d.ts} +0 -0
  631. /package/react/filter/{index.ts → index.d.ts} +0 -0
  632. /package/react/filter-wrapper/{index.ts → index.d.ts} +0 -0
  633. /package/react/flag/{index.ts → index.d.ts} +0 -0
  634. /package/react/form-content/{index.ts → index.d.ts} +0 -0
  635. /package/react/hidden-input/{index.ts → index.d.ts} +0 -0
  636. /package/react/{indexed-access-type.ts → indexed-access-type.d.ts} +0 -0
  637. /package/react/link/{index.ts → index.d.ts} +0 -0
  638. /package/react/link-button/{index.ts → index.d.ts} +0 -0
  639. /package/react/link-card/{index.ts → index.d.ts} +0 -0
  640. /package/react/logos/{index.ts → index.d.ts} +0 -0
  641. /package/react/message/{index.ts → index.d.ts} +0 -0
  642. /package/react/message-field/{index.ts → index.d.ts} +0 -0
  643. /package/react/modal/{index.ts → index.d.ts} +0 -0
  644. /package/react/progress-bar/{index.ts → index.d.ts} +0 -0
  645. /package/react/radio/{index.ts → index.d.ts} +0 -0
  646. /package/react/scale-bar/{index.ts → index.d.ts} +0 -0
  647. /package/react/search/{index.ts → index.d.ts} +0 -0
  648. /package/react/select/{index.ts → index.d.ts} +0 -0
  649. /package/react/select-option/{index.ts → index.d.ts} +0 -0
  650. /package/react/tag/{index.ts → index.d.ts} +0 -0
  651. /package/react/text/{index.ts → index.d.ts} +0 -0
  652. /package/react/text-area/{index.ts → index.d.ts} +0 -0
  653. /package/react/text-input/{index.ts → index.d.ts} +0 -0
  654. /package/react/toggle/{index.ts → index.d.ts} +0 -0
  655. /package/react/toolbox/{index.ts → index.d.ts} +0 -0
  656. /package/react/visually-button/{index.ts → index.d.ts} +0 -0
  657. /package/react/visually-hidden/{index.ts → index.d.ts} +0 -0
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../react/text-area/text-area.tsx"],
4
+ "sourcesContent": ["import cn from 'classnames';\nimport * as React from 'react';\n\nimport Text from '../text';\nimport useInputValidation from '../use-input-validation';\n\nimport { TextArea as Props, themes, sizes } from './text-area.types';\n\nconst RefTextArea = React.forwardRef<\n HTMLTextAreaElement,\n React.PropsWithChildren<Props>\n>(\n (\n {\n children,\n helpText,\n label,\n name,\n placeholder,\n disabled,\n required,\n isLabelVisible = true,\n helpIcon,\n size = sizes.default,\n theme = themes.light,\n isShort,\n maxLength,\n defaultValue,\n ...restProps\n },\n ref,\n ) => {\n const [onChange, onInvalid, error] = useInputValidation();\n const [count, setCount] = React.useState(0);\n\n React.useEffect(() => {\n if (defaultValue) {\n if (typeof defaultValue === 'string') {\n setCount(defaultValue.length);\n } else if (typeof defaultValue === 'number') {\n setCount(defaultValue);\n }\n }\n }, [restProps]);\n\n return (\n <label className=\"text-area\">\n <div className=\"text-area__wrapper\">\n {isLabelVisible ? (\n <div className=\"text-area__header\">\n <Text\n theme={Text.themes.emphasis}\n size={\n size === sizes.default ? Text.sizes.basic : Text.sizes.small\n }\n className={cn('text-area__label', {\n [`text-area__label--theme-${theme}-disabled`]: disabled,\n [`text-area__label--theme-${theme}`]: theme,\n })}\n >\n {label}\n {required ? (\n <span\n className={cn('text-area__asterisk', {\n [`text-area__asterisk--theme-${theme}-disabled`]:\n disabled,\n [`text-area__asterisk--theme-${theme}`]: theme,\n })}\n >\n *\n </span>\n ) : null}\n {children}\n </Text>\n {maxLength ? (\n <Text className=\"text-area__max\" size={Text.sizes.small}>\n {count}/{maxLength}\n </Text>\n ) : null}\n </div>\n ) : null}\n <textarea\n className={cn('text-area__input', {\n [`text-area__input--theme-${theme}`]: theme,\n [`text-area__input--theme-${theme}-error`]: error,\n [`text-area__input--size-${size}-short`]: isShort,\n [`text-area__input--size-${size}`]: size,\n })}\n aria-label={isLabelVisible ? label : undefined}\n name={name}\n maxLength={maxLength}\n ref={ref}\n cols={1}\n required={required}\n defaultValue={defaultValue}\n rows={isShort ? 1 : 2}\n onChange={e => {\n // NOTE: To not break compatibility\n if (restProps.onChange) {\n restProps.onChange(e);\n }\n onChange(e);\n if (maxLength) {\n setCount(e.target.value.length);\n }\n }}\n onInvalid={e => {\n // NOTE: To not break compatibility\n if (restProps.onInvalid) restProps.onInvalid(e);\n onInvalid(e);\n }}\n placeholder={placeholder}\n disabled={disabled}\n {...restProps}\n />\n </div>\n\n {helpText ? (\n <div className=\"text-area__help\">\n <Text\n size={Text.sizes.interface}\n className={cn('text-area__help-text', {\n [`text-area__help-text--theme-${theme}-error`]: error,\n [`text-area__help-text--theme-${theme}`]: theme,\n })}\n >\n {helpIcon ? helpIcon : null}\n {helpText}\n </Text>\n </div>\n ) : null}\n\n {/* NOTE: This is aria-hidden because reporting of validation errors is handled by the browser */}\n {error && (\n <div aria-hidden=\"true\" className=\"text-area__error\">\n <Text>{error}</Text>\n </div>\n )}\n </label>\n );\n },\n);\n\n// NOTE: If this isn't set, stack traces say \"forwardRef\" instead of \"TextArea\"\nRefTextArea.displayName = 'TextArea';\n// NOTE: The component is redeclared here because TypeScript doesn't accept assigning extra properties to `RefComponent` when it's declared\n\nconst TextArea: typeof RefTextArea & {\n themes: typeof themes;\n sizes: typeof sizes;\n} = Object.assign(RefTextArea, { themes, sizes });\n\nexport default TextArea;\n"],
5
+ "mappings": "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",
6
+ "names": ["cn", "React", "Text", "useInputValidation", "themes", "sizes", "RefTextArea", "_a", "ref", "_b", "children", "helpText", "label", "name", "placeholder", "disabled", "required", "isLabelVisible", "helpIcon", "size", "theme", "isShort", "maxLength", "defaultValue", "restProps", "__objRest", "onChange", "onInvalid", "error", "count", "setCount", "__spreadValues", "e", "TextArea", "text_area_default"]
7
+ }
@@ -0,0 +1,21 @@
1
+ import type { ReactElement } from 'react';
2
+ import type { ObjectValues, TextAreaHtmlProps } from '../types';
3
+ export declare const themes: {
4
+ readonly light: "light";
5
+ readonly dark: "dark";
6
+ };
7
+ export declare const sizes: {
8
+ readonly default: "default";
9
+ readonly small: "small";
10
+ };
11
+ export type TextArea = {
12
+ helpText?: string;
13
+ label: string;
14
+ theme?: ObjectValues<typeof themes>;
15
+ size?: ObjectValues<typeof sizes>;
16
+ isLabelVisible?: boolean;
17
+ helpIcon?: ReactElement;
18
+ isShort?: boolean;
19
+ name: string;
20
+ defaultValue?: string;
21
+ } & TextAreaHtmlProps;
@@ -0,0 +1,2 @@
1
+ const e={light:"light",dark:"dark"},t={default:"default",small:"small"};export{t as sizes,e as themes};
2
+ //# sourceMappingURL=text-area.types.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../react/text-area/text-area.types.ts"],
4
+ "sourcesContent": ["import type { ReactElement } from 'react';\nimport type { ObjectValues, TextAreaHtmlProps } from '../types';\n\nexport const themes = {\n light: 'light',\n dark: 'dark',\n} as const;\n\nexport const sizes = {\n default: 'default',\n small: 'small',\n} as const;\n\nexport type TextArea = {\n helpText?: string;\n label: string;\n theme?: ObjectValues<typeof themes>;\n size?: ObjectValues<typeof sizes>;\n isLabelVisible?: boolean;\n helpIcon?: ReactElement;\n isShort?: boolean;\n name: string;\n defaultValue?: string;\n} & TextAreaHtmlProps;\n"],
5
+ "mappings": "AAGO,MAAMA,EAAS,CACpB,MAAO,QACP,KAAM,MACR,EAEaC,EAAQ,CACnB,QAAS,UACT,MAAO,OACT",
6
+ "names": ["themes", "sizes"]
7
+ }
@@ -0,0 +1,2 @@
1
+ import t from"./text-input";var o=t;export{o as default};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../react/text-input/index.ts"],
4
+ "sourcesContent": ["import TextInput from './text-input';\nexport default TextInput;\n"],
5
+ "mappings": "AAAA,OAAOA,MAAe,eACtB,IAAOC,EAAQD",
6
+ "names": ["TextInput", "text_input_default"]
7
+ }
@@ -0,0 +1,18 @@
1
+ import * as React from 'react';
2
+ import { themes, variants } from './text-input.types';
3
+ declare const RefTextInput: React.ForwardRefExoticComponent<{
4
+ customErrorMessages?: import("../use-input-validation.types").Messages;
5
+ hasError?: boolean;
6
+ helpText?: string;
7
+ label: string;
8
+ leadingIcon?: React.ReactNode;
9
+ name: string;
10
+ theme?: import("../types").ObjectValues<typeof themes>;
11
+ trailingIcon?: React.ReactNode;
12
+ variant?: import("../types").ObjectValues<typeof variants>;
13
+ } & import("../types").InputHtmlProps & React.RefAttributes<HTMLInputElement>>;
14
+ declare const TextInput: typeof RefTextInput & {
15
+ themes: typeof themes;
16
+ variants: typeof variants;
17
+ };
18
+ export default TextInput;
@@ -0,0 +1,2 @@
1
+ var F=Object.defineProperty;var m=Object.getOwnPropertySymbols;var w=Object.prototype.hasOwnProperty,S=Object.prototype.propertyIsEnumerable;var I=(i,e,s)=>e in i?F(i,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):i[e]=s,k=(i,e)=>{for(var s in e||(e={}))w.call(e,s)&&I(i,s,e[s]);if(m)for(var s of m(e))S.call(e,s)&&I(i,s,e[s]);return i};var C=(i,e)=>{var s={};for(var n in i)w.call(i,n)&&e.indexOf(n)<0&&(s[n]=i[n]);if(i!=null&&m)for(var n of m(i))e.indexOf(n)<0&&S.call(i,n)&&(s[n]=i[n]);return s};import G from"classnames";import*as t from"react";import p from"../text";import J from"../use-input-validation";import K from"../icons/16/info";import L from"../icons/16/error";import{themes as _,variants as l}from"./text-input.types";import{useEffect as M}from"react";const E=t.forwardRef((U,q)=>{var b=U,{customErrorMessages:i,defaultValue:e,disabled:s,hasError:n,helpText:h,label:N,leadingIcon:o,maxLength:a,name:O,onChange:j=()=>{},placeholder:H,required:c,theme:z,trailingIcon:d,type:P="text",variant:u=l.large}=b,T=C(b,["customErrorMessages","defaultValue","disabled","hasError","helpText","label","leadingIcon","maxLength","name","onChange","placeholder","required","theme","trailingIcon","type","variant"]);const[A,f]=t.useState(0),[g,y]=t.useState(n),[B,D,x]=J(i,i?i.defaultError:void 0,g),v=a?a>0:void 0;return t.useEffect(()=>{e&&(typeof e=="string"?f(e.length):typeof e=="number"&&f(e))},[T]),M(()=>{y(n)},[n]),t.createElement("label",{className:G("text-input",{"text-input--theme-dark":z===_.dark,"text-input--theme-light":z===_.light,"text-input--disabled":s,"text-input--error":x||g,"text-input--icon":o||d,"text-input--variant-small":u===l.small,"text-input--variant-large":u===l.large})},t.createElement("div",{className:"text-input__wrapper"},t.createElement("div",{className:"text-input__label-wrapper"},t.createElement(p,{className:"text-input__label",theme:p.themes.emphasis,size:u===l.small?p.sizes.small:p.sizes.basic},N,c?t.createElement("span",{className:"text-input__asterisk"},"*"):null),v?t.createElement("div",{className:"text-input__length-counter"},t.createElement(p,{size:u===l.small?p.sizes.small:p.sizes.basic},A,"/",a)):null),t.createElement("div",{className:"text-input__input-wrapper"},o?t.createElement("div",{className:"text-input__icon"},o):null,t.createElement("input",k({className:"text-input__input",defaultValue:e,disabled:s,required:c,name:O,maxLength:v?a:void 0,onInvalid:r=>D(r),onChange:r=>{j(r),B(r),y(!1),v&&f(r.target.value.length)},placeholder:H,ref:q,type:P,"aria-label":N},T)),d?t.createElement("div",{className:"text-input__icon"},d):null),h?t.createElement("div",{className:"text-input__help"},t.createElement(K,null),t.createElement(p,{size:p.sizes.interface},h)):null,x?t.createElement("div",{"aria-hidden":"true",className:"text-input__error"},t.createElement(L,null),t.createElement(p,{size:p.sizes.interface},x)):null))});E.displayName="TextInput";const Q=Object.assign(E,{themes:_,variants:l});var it=Q;export{it as default};
2
+ //# sourceMappingURL=text-input.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../react/text-input/text-input.tsx"],
4
+ "sourcesContent": ["import cn from 'classnames';\nimport * as React from 'react';\n\nimport Text from '../text';\nimport useInputValidation from '../use-input-validation';\nimport SvgInfo from '../icons/16/info';\nimport SvgError from '../icons/16/error';\n\nimport { themes, variants, TextInput as Props } from './text-input.types';\nimport { useEffect } from 'react';\n\nconst RefTextInput = React.forwardRef<HTMLInputElement, Props>(\n (\n {\n customErrorMessages,\n defaultValue,\n disabled,\n hasError,\n helpText,\n label,\n leadingIcon,\n maxLength,\n name,\n onChange = () => {},\n placeholder,\n required,\n theme,\n trailingIcon,\n type = 'text',\n variant = variants.large,\n ...restProps\n },\n ref,\n ) => {\n const [count, setCount] = React.useState(0);\n const [isError, setIsError] = React.useState(hasError);\n const [validationOnChange, onInvalid, error] = useInputValidation(\n customErrorMessages,\n customErrorMessages ? customErrorMessages.defaultError : undefined,\n isError,\n );\n const isMaxLengthValid = maxLength ? maxLength > 0 : undefined;\n\n React.useEffect(() => {\n if (defaultValue) {\n if (typeof defaultValue === 'string') {\n setCount(defaultValue.length);\n } else if (typeof defaultValue === 'number') {\n setCount(defaultValue);\n }\n }\n }, [restProps]);\n\n useEffect(() => {\n setIsError(hasError);\n }, [hasError]);\n\n return (\n <label\n className={cn('text-input', {\n 'text-input--theme-dark': theme === themes.dark,\n 'text-input--theme-light': theme === themes.light,\n 'text-input--disabled': disabled,\n 'text-input--error': error || isError,\n 'text-input--icon': leadingIcon || trailingIcon,\n 'text-input--variant-small': variant === variants.small,\n 'text-input--variant-large': variant === variants.large,\n })}\n >\n <div className=\"text-input__wrapper\">\n <div className=\"text-input__label-wrapper\">\n <Text\n className=\"text-input__label\"\n theme={Text.themes.emphasis}\n size={\n variant === variants.small ? Text.sizes.small : Text.sizes.basic\n }\n >\n {label}\n {required ? (\n <span className=\"text-input__asterisk\">*</span>\n ) : null}\n </Text>\n {isMaxLengthValid ? (\n <div className=\"text-input__length-counter\">\n <Text\n size={\n variant === variants.small\n ? Text.sizes.small\n : Text.sizes.basic\n }\n >\n {count}/{maxLength}\n </Text>\n </div>\n ) : null}\n </div>\n\n <div className=\"text-input__input-wrapper\">\n {leadingIcon ? (\n <div className=\"text-input__icon\">{leadingIcon}</div>\n ) : null}\n <input\n className=\"text-input__input\"\n defaultValue={defaultValue}\n disabled={disabled}\n required={required}\n name={name}\n maxLength={isMaxLengthValid ? maxLength : undefined}\n onInvalid={e => onInvalid(e)}\n onChange={e => {\n onChange(e);\n validationOnChange(e);\n setIsError(false); // NOTE: We want to reset error state on change to not confuse users.\n if (isMaxLengthValid) {\n setCount(e.target.value.length);\n }\n }}\n placeholder={placeholder}\n ref={ref}\n type={type}\n aria-label={label}\n {...restProps}\n />\n {trailingIcon ? (\n <div className=\"text-input__icon\">{trailingIcon}</div>\n ) : null}\n </div>\n {helpText ? (\n <div className=\"text-input__help\">\n <SvgInfo />\n <Text size={Text.sizes.interface}>{helpText}</Text>\n </div>\n ) : null}\n {/* NOTE: This is aria-hidden because reporting of validation errors is handled by the browser */}\n {error ? (\n <div aria-hidden=\"true\" className=\"text-input__error\">\n <SvgError />\n <Text size={Text.sizes.interface}>{error}</Text>\n </div>\n ) : null}\n </div>\n </label>\n );\n },\n);\n\n// NOTE: If this isn't set, stack traces say \"forwardRef\" instead of \"TextInput\"\nRefTextInput.displayName = 'TextInput';\n\nconst TextInput: typeof RefTextInput & {\n themes: typeof themes;\n variants: typeof variants;\n} = Object.assign(RefTextInput, { themes, variants });\n\nexport default TextInput;\n"],
5
+ "mappings": "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",
6
+ "names": ["cn", "React", "Text", "useInputValidation", "SvgInfo", "SvgError", "themes", "variants", "useEffect", "RefTextInput", "_a", "ref", "_b", "customErrorMessages", "defaultValue", "disabled", "hasError", "helpText", "label", "leadingIcon", "maxLength", "name", "onChange", "placeholder", "required", "theme", "trailingIcon", "type", "variant", "restProps", "__objRest", "count", "setCount", "isError", "setIsError", "validationOnChange", "onInvalid", "error", "isMaxLengthValid", "__spreadValues", "e", "TextInput", "text_input_default"]
7
+ }
@@ -110,9 +110,10 @@
110
110
  &__error {
111
111
  display: flex;
112
112
  gap: spacing.$xs;
113
+ align-items: center;
113
114
 
114
- > * {
115
- align-self: flex-start;
115
+ > svg {
116
+ flex-shrink: 0;
116
117
  }
117
118
  }
118
119
 
@@ -124,17 +125,10 @@
124
125
  color: light.$on-surface-error;
125
126
  }
126
127
 
127
- &__help-icon,
128
- &__error-icon,
129
128
  &__icon {
130
129
  flex-shrink: 0;
131
130
  }
132
131
 
133
- &__help-icon,
134
- &__error-icon {
135
- height: 16px; // Matches icon height. Otherwise, the auto height acts weirdly, by making the wrapper too tall.
136
- }
137
-
138
132
  &__asterisk {
139
133
  color: light.$on-surface-featured;
140
134
  margin-left: spacing.$xs;
@@ -0,0 +1,21 @@
1
+ import { InputHtmlProps, ObjectValues } from '../types';
2
+ import { Messages } from '../use-input-validation.types';
3
+ export declare const themes: {
4
+ readonly dark: "dark";
5
+ readonly light: "light";
6
+ };
7
+ export declare const variants: {
8
+ small: string;
9
+ large: string;
10
+ };
11
+ export type TextInput = {
12
+ customErrorMessages?: Messages;
13
+ hasError?: boolean;
14
+ helpText?: string;
15
+ label: string;
16
+ leadingIcon?: React.ReactNode;
17
+ name: string;
18
+ theme?: ObjectValues<typeof themes>;
19
+ trailingIcon?: React.ReactNode;
20
+ variant?: ObjectValues<typeof variants>;
21
+ } & InputHtmlProps;
@@ -0,0 +1,2 @@
1
+ const o={dark:"dark",light:"light"},l={small:"small",large:"large"};export{o as themes,l as variants};
2
+ //# sourceMappingURL=text-input.types.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../react/text-input/text-input.types.ts"],
4
+ "sourcesContent": ["import { InputHtmlProps, ObjectValues } from '../types';\nimport { Messages } from '../use-input-validation.types';\n\nexport const themes = {\n dark: 'dark',\n light: 'light',\n} as const;\n\nexport const variants = {\n small: 'small',\n large: 'large',\n};\n\nexport type TextInput = {\n customErrorMessages?: Messages;\n hasError?: boolean;\n helpText?: string;\n label: string;\n leadingIcon?: React.ReactNode;\n name: string;\n theme?: ObjectValues<typeof themes>;\n trailingIcon?: React.ReactNode;\n variant?: ObjectValues<typeof variants>;\n} & InputHtmlProps;\n"],
5
+ "mappings": "AAGO,MAAMA,EAAS,CACpB,KAAM,OACN,MAAO,OACT,EAEaC,EAAW,CACtB,MAAO,QACP,MAAO,OACT",
6
+ "names": ["themes", "variants"]
7
+ }
@@ -0,0 +1,2 @@
1
+ import o from"./toggle";var r=o;export{r as default};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../react/toggle/index.ts"],
4
+ "sourcesContent": ["import Toggle from './toggle';\nexport default Toggle;\n"],
5
+ "mappings": "AAAA,OAAOA,MAAY,WACnB,IAAOC,EAAQD",
6
+ "names": ["Toggle", "toggle_default"]
7
+ }
@@ -0,0 +1,13 @@
1
+ import * as React from 'react';
2
+ declare const Toggle: React.ForwardRefExoticComponent<Omit<import("../types").InputHtmlProps, "value"> & {
3
+ isLabelVisible?: boolean;
4
+ label: string;
5
+ labelPosition?: "left" | "right";
6
+ name: string;
7
+ value: string;
8
+ spaceBetween?: boolean;
9
+ testId?: string;
10
+ } & {
11
+ children?: React.ReactNode | undefined;
12
+ } & React.RefAttributes<HTMLInputElement>>;
13
+ export default Toggle;
@@ -0,0 +1,2 @@
1
+ var w=Object.defineProperty;var r=Object.getOwnPropertySymbols;var m=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable;var d=(o,n,e)=>n in o?w(o,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[n]=e,p=(o,n)=>{for(var e in n||(n={}))m.call(n,e)&&d(o,e,n[e]);if(r)for(var e of r(n))s.call(n,e)&&d(o,e,n[e]);return o};var _=(o,n)=>{var e={};for(var t in o)m.call(o,t)&&n.indexOf(t)<0&&(e[t]=o[t]);if(o!=null&&r)for(var t of r(o))n.indexOf(t)<0&&s.call(o,t)&&(e[t]=o[t]);return e};import v from"classnames";import*as a from"react";import f from"../text";import P from"../use-input-validation";const b=a.forwardRef((k,I)=>{var i=k,{children:o,isLabelVisible:n=!0,label:e,labelPosition:t="right",name:u,value:h="",spaceBetween:N,testId:c}=i,l=_(i,["children","isLabelVisible","label","labelPosition","name","value","spaceBetween","testId"]);const[T,x,C]=P();return a.createElement("div",{className:v("toggle",{"toggle--error":C})},a.createElement("label",{className:v("toggle__content",{"toggle__content--space-between":N}),"data-testid":c},n&&t==="left"&&a.createElement("div",{className:"toggle__label"},a.createElement(f,null,e),o),a.createElement("div",{className:"toggle__button-wrap"},a.createElement("input",p({"aria-label":n?void 0:e,className:"toggle__input",type:"checkbox",name:u,onChange:g=>{l.onChange&&l.onChange(g),T(g)},onInvalid:g=>{l.onInvalid&&l.onInvalid(g),x(g)},ref:I,value:h},l)),a.createElement("span",{className:"toggle__slider"},a.createElement("div",{className:"toggle__slider-element"}))),n&&t==="right"&&a.createElement("div",{className:"toggle__label"},a.createElement(f,null,e),o)))});var q=b;export{q as default};
2
+ //# sourceMappingURL=toggle.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../react/toggle/toggle.tsx"],
4
+ "sourcesContent": ["import cn from 'classnames';\nimport * as React from 'react';\n\nimport Text from '../text';\nimport useInputValidation from '../use-input-validation';\n\nimport { Toggle as Props } from './toggle.types';\n\nconst Toggle = React.forwardRef<\n HTMLInputElement,\n React.PropsWithChildren<Props>\n>(\n (\n {\n children,\n isLabelVisible = true,\n label,\n labelPosition = 'right',\n name,\n value = '',\n spaceBetween,\n testId,\n ...rest\n },\n ref,\n ) => {\n const [onChange, onInvalid, error] = useInputValidation();\n\n return (\n <div\n className={cn('toggle', {\n 'toggle--error': error,\n })}\n >\n <label\n className={cn('toggle__content', {\n 'toggle__content--space-between': spaceBetween,\n })}\n data-testid={testId}\n >\n {isLabelVisible && labelPosition === 'left' && (\n <div className=\"toggle__label\">\n <Text>{label}</Text>\n {children}\n </div>\n )}\n\n <div className=\"toggle__button-wrap\">\n <input\n aria-label={isLabelVisible ? undefined : label}\n className=\"toggle__input\"\n type=\"checkbox\"\n name={name}\n onChange={e => {\n // NOTE: If props specify an `onChange`, we need to call that too\n if (rest.onChange) rest.onChange(e);\n onChange(e);\n }}\n onInvalid={e => {\n // NOTE: If props specify an `onInvalid`, we need to call that too\n if (rest.onInvalid) rest.onInvalid(e);\n onInvalid(e);\n }}\n ref={ref}\n value={value}\n {...rest}\n />\n <span className=\"toggle__slider\">\n <div className=\"toggle__slider-element\"></div>\n </span>\n </div>\n\n {isLabelVisible && labelPosition === 'right' && (\n <div className=\"toggle__label\">\n <Text>{label}</Text>\n {children}\n </div>\n )}\n </label>\n </div>\n );\n },\n);\n\nexport default Toggle;\n"],
5
+ "mappings": "2fAAA,OAAOA,MAAQ,aACf,UAAYC,MAAW,QAEvB,OAAOC,MAAU,UACjB,OAAOC,MAAwB,0BAI/B,MAAMC,EAASH,EAAM,WAInB,CACEI,EAWAC,IACG,CAZH,IAAAC,EAAAF,EACE,UAAAG,EACA,eAAAC,EAAiB,GACjB,MAAAC,EACA,cAAAC,EAAgB,QAChB,KAAAC,EACA,MAAAC,EAAQ,GACR,aAAAC,EACA,OAAAC,CArBN,EAaIR,EASKS,EAAAC,EATLV,EASK,CARH,WACA,iBACA,QACA,gBACA,OACA,QACA,eACA,WAKF,KAAM,CAACW,EAAUC,EAAWC,CAAK,EAAIjB,EAAmB,EAExD,OACEF,EAAA,cAAC,OACC,UAAWD,EAAG,SAAU,CACtB,gBAAiBoB,CACnB,CAAC,GAEDnB,EAAA,cAAC,SACC,UAAWD,EAAG,kBAAmB,CAC/B,iCAAkCc,CACpC,CAAC,EACD,cAAaC,GAEZN,GAAkBE,IAAkB,QACnCV,EAAA,cAAC,OAAI,UAAU,iBACbA,EAAA,cAACC,EAAA,KAAMQ,CAAM,EACZF,CACH,EAGFP,EAAA,cAAC,OAAI,UAAU,uBACbA,EAAA,cAAC,QAAAoB,EAAA,CACC,aAAYZ,EAAiB,OAAYC,EACzC,UAAU,gBACV,KAAK,WACL,KAAME,EACN,SAAUU,GAAK,CAETN,EAAK,UAAUA,EAAK,SAASM,CAAC,EAClCJ,EAASI,CAAC,CACZ,EACA,UAAWA,GAAK,CAEVN,EAAK,WAAWA,EAAK,UAAUM,CAAC,EACpCH,EAAUG,CAAC,CACb,EACA,IAAKhB,EACL,MAAOO,GACHG,EACN,EACAf,EAAA,cAAC,QAAK,UAAU,kBACdA,EAAA,cAAC,OAAI,UAAU,yBAAyB,CAC1C,CACF,EAECQ,GAAkBE,IAAkB,SACnCV,EAAA,cAAC,OAAI,UAAU,iBACbA,EAAA,cAACC,EAAA,KAAMQ,CAAM,EACZF,CACH,CAEJ,CACF,CAEJ,CACF,EAEA,IAAOe,EAAQnB",
6
+ "names": ["cn", "React", "Text", "useInputValidation", "Toggle", "_a", "ref", "_b", "children", "isLabelVisible", "label", "labelPosition", "name", "value", "spaceBetween", "testId", "rest", "__objRest", "onChange", "onInvalid", "error", "__spreadValues", "e", "toggle_default"]
7
+ }
@@ -0,0 +1,10 @@
1
+ import { InputHtmlProps } from '../types';
2
+ export type Toggle = Omit<InputHtmlProps, 'value'> & {
3
+ isLabelVisible?: boolean;
4
+ label: string;
5
+ labelPosition?: 'left' | 'right';
6
+ name: string;
7
+ value: string;
8
+ spaceBetween?: boolean;
9
+ testId?: string;
10
+ };
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=toggle.types.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "sourcesContent": [],
5
+ "mappings": "",
6
+ "names": []
7
+ }
@@ -0,0 +1,2 @@
1
+ import o from"./toolbox";var t=o;export{t as default};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../react/toolbox/index.ts"],
4
+ "sourcesContent": ["import Toolbox from './toolbox';\nexport default Toolbox;\n"],
5
+ "mappings": "AAAA,OAAOA,MAAa,YACpB,IAAOC,EAAQD",
6
+ "names": ["Toolbox", "toolbox_default"]
7
+ }
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { type Toolbox as Props } from './toolbox.types';
3
+ declare const Toolbox: React.FunctionComponent<Props>;
4
+ export default Toolbox;
@@ -0,0 +1,2 @@
1
+ var x=Object.defineProperty,b=Object.defineProperties;var u=Object.getOwnPropertyDescriptors;var e=Object.getOwnPropertySymbols;var f=Object.prototype.hasOwnProperty,_=Object.prototype.propertyIsEnumerable;var n=(p,o,s)=>o in p?x(p,o,{enumerable:!0,configurable:!0,writable:!0,value:s}):p[o]=s,l=(p,o)=>{for(var s in o||(o={}))f.call(o,s)&&n(p,s,o[s]);if(e)for(var s of e(o))_.call(o,s)&&n(p,s,o[s]);return p},a=(p,o)=>b(p,u(o));import t from"react";import{Types as T}from"./toolbox.types";import r from"../text";import y from"../hidden-input";const N=({items:p})=>t.createElement("div",{className:"toolbox"},p.map(({item:o,icon:s},d)=>t.createElement("div",{className:"toolbox__item-wrapper",key:d},o.type===T.Link?t.createElement("a",a(l({},o.props.link),{className:"toolbox__item"}),s||null,t.createElement(r,{size:r.sizes.small},o.props.text)):t.createElement("form",l({onSubmit:o.props.handleSubmit,method:"POST",className:"toolbox__list-item-form"},o.props.form),t.createElement("button",l({className:"toolbox__item","data-testid":o.props.testId},o.props.button),s||null,t.createElement(r,{size:r.sizes.small},o.props.text)),o.props.hiddenInputs?o.props.hiddenInputs.map((m,i)=>t.createElement(y,l({key:m.name+i},m))):null))));var P=N;export{P as default};
2
+ //# sourceMappingURL=toolbox.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../react/toolbox/toolbox.tsx"],
4
+ "sourcesContent": ["import React from 'react';\n\nimport { Types, type Toolbox as Props } from './toolbox.types';\nimport Text from '../text';\nimport HiddenInput from '../hidden-input';\n\nconst Toolbox: React.FunctionComponent<Props> = ({ items }) => (\n <div className=\"toolbox\">\n {items.map(({ item, icon }, i) => (\n <div className=\"toolbox__item-wrapper\" key={i}>\n {item.type === Types.Link ? (\n <a {...item.props.link} className=\"toolbox__item\">\n {icon ? icon : null}\n <Text size={Text.sizes.small}>{item.props.text}</Text>\n </a>\n ) : (\n <form\n onSubmit={item.props.handleSubmit}\n method=\"POST\"\n className=\"toolbox__list-item-form\"\n {...item.props.form}\n >\n <button\n className=\"toolbox__item\"\n data-testid={item.props.testId}\n {...item.props.button}\n >\n {icon ? icon : null}\n <Text size={Text.sizes.small}>{item.props.text}</Text>\n </button>\n {item.props.hiddenInputs\n ? item.props.hiddenInputs.map((input, index) => (\n <HiddenInput key={input.name + index} {...input} />\n ))\n : null}\n </form>\n )}\n </div>\n ))}\n </div>\n);\n\nexport default Toolbox;\n"],
5
+ "mappings": "6aAAA,OAAOA,MAAW,QAElB,OAAS,SAAAC,MAAoC,kBAC7C,OAAOC,MAAU,UACjB,OAAOC,MAAiB,kBAExB,MAAMC,EAA0C,CAAC,CAAE,MAAAC,CAAM,IACvDL,EAAA,cAAC,OAAI,UAAU,WACZK,EAAM,IAAI,CAAC,CAAE,KAAAC,EAAM,KAAAC,CAAK,EAAGC,IAC1BR,EAAA,cAAC,OAAI,UAAU,wBAAwB,IAAKQ,GACzCF,EAAK,OAASL,EAAM,KACnBD,EAAA,cAAC,IAAAS,EAAAC,EAAA,GAAMJ,EAAK,MAAM,MAAjB,CAAuB,UAAU,kBAC/BC,GAAc,KACfP,EAAA,cAACE,EAAA,CAAK,KAAMA,EAAK,MAAM,OAAQI,EAAK,MAAM,IAAK,CACjD,EAEAN,EAAA,cAAC,OAAAU,EAAA,CACC,SAAUJ,EAAK,MAAM,aACrB,OAAO,OACP,UAAU,2BACNA,EAAK,MAAM,MAEfN,EAAA,cAAC,SAAAU,EAAA,CACC,UAAU,gBACV,cAAaJ,EAAK,MAAM,QACpBA,EAAK,MAAM,QAEdC,GAAc,KACfP,EAAA,cAACE,EAAA,CAAK,KAAMA,EAAK,MAAM,OAAQI,EAAK,MAAM,IAAK,CACjD,EACCA,EAAK,MAAM,aACRA,EAAK,MAAM,aAAa,IAAI,CAACK,EAAOC,IAClCZ,EAAA,cAACG,EAAAO,EAAA,CAAY,IAAKC,EAAM,KAAOC,GAAWD,EAAO,CAClD,EACD,IACN,CAEJ,CACD,CACH,EAGF,IAAOE,EAAQT",
6
+ "names": ["React", "Types", "Text", "HiddenInput", "Toolbox", "items", "item", "icon", "i", "__spreadProps", "__spreadValues", "input", "index", "toolbox_default"]
7
+ }
@@ -0,0 +1,34 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { HiddenInput } from '../hidden-input/hidden-input.types';
3
+ import type { ButtonHtmlProps, FormHtmlProps, LinkHtmlProps } from '../types';
4
+ export declare enum Types {
5
+ Button = "Button",
6
+ Link = "Link"
7
+ }
8
+ type LinkItem = {
9
+ type: Types.Link;
10
+ props: {
11
+ text: string;
12
+ link: LinkHtmlProps;
13
+ testId?: string;
14
+ };
15
+ };
16
+ type FormItem = {
17
+ type: Types.Button;
18
+ props: {
19
+ text: string;
20
+ form: FormHtmlProps;
21
+ button: ButtonHtmlProps;
22
+ handleSubmit?: () => void;
23
+ hiddenInputs?: HiddenInput[];
24
+ testId?: string;
25
+ };
26
+ };
27
+ type MenuItem = {
28
+ icon?: ReactNode;
29
+ item: LinkItem | FormItem;
30
+ };
31
+ export type Toolbox = {
32
+ items: MenuItem[];
33
+ };
34
+ export {};
@@ -0,0 +1,2 @@
1
+ var e=(t=>(t.Button="Button",t.Link="Link",t))(e||{});export{e as Types};
2
+ //# sourceMappingURL=toolbox.types.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../react/toolbox/toolbox.types.ts"],
4
+ "sourcesContent": ["import type { ReactNode } from 'react';\n\nimport type { HiddenInput } from '../hidden-input/hidden-input.types';\nimport type { ButtonHtmlProps, FormHtmlProps, LinkHtmlProps } from '../types';\n\nexport enum Types {\n Button = 'Button',\n Link = 'Link',\n}\n\ntype LinkItem = {\n type: Types.Link;\n props: {\n text: string;\n link: LinkHtmlProps;\n testId?: string;\n };\n};\n\ntype FormItem = {\n type: Types.Button;\n props: {\n text: string;\n form: FormHtmlProps;\n button: ButtonHtmlProps;\n handleSubmit?: () => void;\n hiddenInputs?: HiddenInput[];\n testId?: string;\n };\n};\n\ntype MenuItem = {\n icon?: ReactNode;\n item: LinkItem | FormItem;\n};\n\nexport type Toolbox = {\n items: MenuItem[];\n};\n"],
5
+ "mappings": "AAKO,IAAKA,OACVA,EAAA,OAAS,SACTA,EAAA,KAAO,OAFGA,OAAA",
6
+ "names": ["Types"]
7
+ }
@@ -0,0 +1 @@
1
+ export default function debounce<T extends any[]>(callback: (...args: T) => void, wait: number): (...args: T) => void;
@@ -0,0 +1,2 @@
1
+ function u(t,n){let e;return(...r)=>{clearTimeout(e),e=window.setTimeout(()=>t(...r),n)}}export{u as default};
2
+ //# sourceMappingURL=debounce.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../react/ts/debounce.ts"],
4
+ "sourcesContent": ["// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport default function debounce<T extends any[]>(\n callback: (...args: T) => void,\n wait: number,\n) {\n let timerRef: number;\n\n return (...args: T) => {\n clearTimeout(timerRef);\n timerRef = window.setTimeout(() => callback(...args), wait);\n };\n}\n"],
5
+ "mappings": "AACe,SAARA,EACLC,EACAC,EACA,CACA,IAAIC,EAEJ,MAAO,IAAIC,IAAY,CACrB,aAAaD,CAAQ,EACrBA,EAAW,OAAO,WAAW,IAAMF,EAAS,GAAGG,CAAI,EAAGF,CAAI,CAC5D,CACF",
6
+ "names": ["debounce", "callback", "wait", "timerRef", "args"]
7
+ }
@@ -1,15 +1,4 @@
1
- import {
2
- AnchorHTMLAttributes,
3
- ButtonHTMLAttributes,
4
- HTMLAttributes,
5
- ImgHTMLAttributes,
6
- InputHTMLAttributes,
7
- OptionHTMLAttributes,
8
- SelectHTMLAttributes,
9
- TextareaHTMLAttributes,
10
- FormHTMLAttributes,
11
- } from 'react';
12
-
1
+ import { AnchorHTMLAttributes, ButtonHTMLAttributes, HTMLAttributes, ImgHTMLAttributes, InputHTMLAttributes, OptionHTMLAttributes, SelectHTMLAttributes, TextareaHTMLAttributes, FormHTMLAttributes } from 'react';
13
2
  /** Removes any generics from type, resulting in only the raw type:
14
3
  ```ts
15
4
  // In editors, this type will sometimes show up as `NonNullable<{ a: string | null }>`
@@ -20,15 +9,11 @@ type X = NonNullable<{
20
9
  type Y = Flatten<X>;
21
10
  ```
22
11
  */
23
- // eslint-disable-next-line
24
- export type Flatten<T> = T extends infer T
25
- ? { [key in keyof T]: T[key] }
26
- : never;
27
-
12
+ export type Flatten<T> = T extends infer T ? {
13
+ [key in keyof T]: T[key];
14
+ } : never;
28
15
  /** Extracts the property value types from an object */
29
16
  export type ObjectValues<T> = Flatten<T[keyof T]>;
30
-
31
- // NOTE: The below types include all of the supported props for "html" react components (like `button` or `a`).
32
17
  export type ButtonHtmlProps = ButtonHTMLAttributes<HTMLButtonElement>;
33
18
  export type DivHtmlProps = HTMLAttributes<HTMLDivElement>;
34
19
  export type LinkHtmlProps = AnchorHTMLAttributes<HTMLAnchorElement>;
package/react/types.js ADDED
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "sourcesContent": [],
5
+ "mappings": "",
6
+ "names": []
7
+ }
@@ -0,0 +1,4 @@
1
+ import { Messages } from './use-input-validation.types';
2
+ type SupportedElement = HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement;
3
+ declare const _default: (customMessages?: Messages, defaultError?: string, isError?: boolean) => [(e: React.ChangeEvent<SupportedElement>) => void, (e: React.FormEvent<SupportedElement>) => void, string | undefined];
4
+ export default _default;
@@ -0,0 +1,2 @@
1
+ import{useRef as s,useState as c,useEffect as l}from"react";const f=(t,e)=>{if(t.badInput)return e.badInput;if(t.customError)return e.customError;if(t.patternMismatch)return e.patternMismatch;if(t.rangeOverflow)return e.rangeOverflow;if(t.rangeUnderflow)return e.rangeUnderflow;if(t.stepMismatch)return e.stepMismatch;if(t.tooLong)return e.tooLong;if(t.tooShort)return e.tooShort;if(t.typeMismatch)return e.typeMismatch;if(t.valueMissing)return e.valueMissing};var E=(t={},e,u)=>{const[i,o]=c(),p=s(!1);return l(()=>{o(u&&e?e:void 0)},[u,e]),[n=>{var r;const a=f(n.target.validity,t);o(a||((r=n.target)==null?void 0:r.validationMessage)||void 0)},n=>{var r;p.current=!0;const a=f(n.target.validity,t);o(a||((r=n.target)==null?void 0:r.validationMessage))},i]};export{E as default};
2
+ //# sourceMappingURL=use-input-validation.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../react/use-input-validation.ts"],
4
+ "sourcesContent": ["import { useRef, useState, useEffect } from 'react';\n\nimport { Messages } from './use-input-validation.types';\n\ntype SupportedElement =\n | HTMLInputElement\n | HTMLSelectElement\n | HTMLTextAreaElement;\n\nconst getCustomMessage = (validity: ValidityState, messages: Messages) => {\n if (validity.badInput) return messages.badInput;\n if (validity.customError) return messages.customError;\n if (validity.patternMismatch) return messages.patternMismatch;\n if (validity.rangeOverflow) return messages.rangeOverflow;\n if (validity.rangeUnderflow) return messages.rangeUnderflow;\n if (validity.stepMismatch) return messages.stepMismatch;\n if (validity.tooLong) return messages.tooLong;\n if (validity.tooShort) return messages.tooShort;\n if (validity.typeMismatch) return messages.typeMismatch;\n if (validity.valueMissing) return messages.valueMissing;\n return undefined;\n};\n\nexport default (\n customMessages: Messages = {},\n defaultError?: string,\n isError?: boolean,\n) => {\n const [error, setError] = useState<string | undefined>();\n const validationEnabled = useRef(false);\n\n useEffect(() => {\n if (isError && defaultError) {\n setError(defaultError);\n } else {\n setError(undefined);\n }\n }, [isError, defaultError]);\n\n const onInvalid = (e: React.FormEvent<SupportedElement>) => {\n validationEnabled.current = true;\n\n const message = getCustomMessage(\n (e.target as HTMLInputElement).validity,\n customMessages,\n );\n setError(message || (e.target as HTMLInputElement)?.validationMessage);\n };\n\n const onChange = (e: React.ChangeEvent<SupportedElement>) => {\n const message = getCustomMessage(e.target.validity, customMessages);\n setError(message || e.target?.validationMessage || undefined);\n };\n\n return [onChange, onInvalid, error] as [\n typeof onChange,\n typeof onInvalid,\n typeof error,\n ];\n};\n"],
5
+ "mappings": "AAAA,OAAS,UAAAA,EAAQ,YAAAC,EAAU,aAAAC,MAAiB,QAS5C,MAAMC,EAAmB,CAACC,EAAyBC,IAAuB,CACxE,GAAID,EAAS,SAAU,OAAOC,EAAS,SACvC,GAAID,EAAS,YAAa,OAAOC,EAAS,YAC1C,GAAID,EAAS,gBAAiB,OAAOC,EAAS,gBAC9C,GAAID,EAAS,cAAe,OAAOC,EAAS,cAC5C,GAAID,EAAS,eAAgB,OAAOC,EAAS,eAC7C,GAAID,EAAS,aAAc,OAAOC,EAAS,aAC3C,GAAID,EAAS,QAAS,OAAOC,EAAS,QACtC,GAAID,EAAS,SAAU,OAAOC,EAAS,SACvC,GAAID,EAAS,aAAc,OAAOC,EAAS,aAC3C,GAAID,EAAS,aAAc,OAAOC,EAAS,YAE7C,EAEA,IAAOC,EAAQ,CACbC,EAA2B,CAAC,EAC5BC,EACAC,IACG,CACH,KAAM,CAACC,EAAOC,CAAQ,EAAIV,EAA6B,EACjDW,EAAoBZ,EAAO,EAAK,EAEtC,OAAAE,EAAU,IAAM,CAEZS,EADEF,GAAWD,EACJA,EAEA,MAFY,CAIzB,EAAG,CAACC,EAASD,CAAY,CAAC,EAiBnB,CALWK,GAA2C,CAjD/D,IAAAC,EAkDI,MAAMC,EAAUZ,EAAiBU,EAAE,OAAO,SAAUN,CAAc,EAClEI,EAASI,KAAWD,EAAAD,EAAE,SAAF,YAAAC,EAAU,oBAAqB,MAAS,CAC9D,EAbmBD,GAAyC,CAvC9D,IAAAC,EAwCIF,EAAkB,QAAU,GAE5B,MAAMG,EAAUZ,EACbU,EAAE,OAA4B,SAC/BN,CACF,EACAI,EAASI,KAAYD,EAAAD,EAAE,SAAF,YAAAC,EAA+B,kBAAiB,CACvE,EAO6BJ,CAAK,CAKpC",
6
+ "names": ["useRef", "useState", "useEffect", "getCustomMessage", "validity", "messages", "use_input_validation_default", "customMessages", "defaultError", "isError", "error", "setError", "validationEnabled", "e", "_a", "message"]
7
+ }
@@ -0,0 +1,13 @@
1
+ export type Messages = {
2
+ badInput?: string;
3
+ customError?: string;
4
+ defaultError?: string;
5
+ patternMismatch?: string;
6
+ rangeOverflow?: string;
7
+ rangeUnderflow?: string;
8
+ stepMismatch?: string;
9
+ tooLong?: string;
10
+ tooShort?: string;
11
+ typeMismatch?: string;
12
+ valueMissing?: string;
13
+ };
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=use-input-validation.types.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "sourcesContent": [],
5
+ "mappings": "",
6
+ "names": []
7
+ }
@@ -0,0 +1,2 @@
1
+ import t from"./visually-button";var l=t;export{l as default};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../react/visually-button/index.ts"],
4
+ "sourcesContent": ["import VisuallyButton from './visually-button';\nexport default VisuallyButton;\n"],
5
+ "mappings": "AAAA,OAAOA,MAAoB,oBAC3B,IAAOC,EAAQD",
6
+ "names": ["VisuallyButton", "visually_button_default"]
7
+ }
@@ -0,0 +1,6 @@
1
+ import type { ValueOf } from '../indexed-access-type';
2
+ import { sizes as textSizes, themes as textThemes } from '../text/text.types';
3
+ import { variants, sizes } from './visually-button.types';
4
+ export declare const italicMap: Partial<Record<ValueOf<typeof variants>, true>>;
5
+ export declare const sizeMap: Record<keyof typeof sizes, keyof typeof textSizes>;
6
+ export declare const themeMap: Record<ValueOf<typeof variants>, keyof typeof textThemes>;
@@ -0,0 +1,2 @@
1
+ import{sizes as s,themes as e}from"../text/text.types";const o={cta:!0,"cta-secondary":!0,"cta-secondary-white":!0},p={small:s.small,basic:s.basic,large:s.large},c={complete:e.emphasis,cta:e.headline,"cta-secondary":e.headline,"cta-secondary-white":e.headline,primary:e.emphasis,"primary-destructive":e.emphasis,"primary-white":e.emphasis,secondary:e.emphasis,"secondary-white":e.emphasis,"secondary-destructive":e.emphasis,tertiary:e.emphasis,"tertiary-destructive":e.emphasis,"fixed-tertiary":e.emphasis,waitlist:e.emphasis,"waitlist-secondary":e.emphasis};export{o as italicMap,p as sizeMap,c as themeMap};
2
+ //# sourceMappingURL=maps.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../react/visually-button/maps.ts"],
4
+ "sourcesContent": ["import type { ValueOf } from '../indexed-access-type';\nimport { sizes as textSizes, themes as textThemes } from '../text/text.types';\nimport { variants, sizes } from './visually-button.types';\n\nexport const italicMap: Partial<Record<ValueOf<typeof variants>, true>> = {\n cta: true,\n 'cta-secondary': true,\n 'cta-secondary-white': true,\n};\n\nexport const sizeMap: Record<keyof typeof sizes, keyof typeof textSizes> = {\n small: textSizes.small,\n basic: textSizes.basic,\n large: textSizes.large,\n};\n\nexport const themeMap: Record<\n ValueOf<typeof variants>,\n keyof typeof textThemes\n> = {\n complete: textThemes.emphasis,\n cta: textThemes.headline,\n 'cta-secondary': textThemes.headline,\n 'cta-secondary-white': textThemes.headline,\n primary: textThemes.emphasis,\n 'primary-destructive': textThemes.emphasis,\n 'primary-white': textThemes.emphasis,\n secondary: textThemes.emphasis,\n 'secondary-white': textThemes.emphasis,\n 'secondary-destructive': textThemes.emphasis,\n tertiary: textThemes.emphasis,\n 'tertiary-destructive': textThemes.emphasis,\n 'fixed-tertiary': textThemes.emphasis,\n waitlist: textThemes.emphasis,\n 'waitlist-secondary': textThemes.emphasis,\n};\n"],
5
+ "mappings": "AACA,OAAS,SAASA,EAAW,UAAUC,MAAkB,qBAGlD,MAAMC,EAA6D,CACxE,IAAK,GACL,gBAAiB,GACjB,sBAAuB,EACzB,EAEaC,EAA8D,CACzE,MAAOH,EAAU,MACjB,MAAOA,EAAU,MACjB,MAAOA,EAAU,KACnB,EAEaI,EAGT,CACF,SAAUH,EAAW,SACrB,IAAKA,EAAW,SAChB,gBAAiBA,EAAW,SAC5B,sBAAuBA,EAAW,SAClC,QAASA,EAAW,SACpB,sBAAuBA,EAAW,SAClC,gBAAiBA,EAAW,SAC5B,UAAWA,EAAW,SACtB,kBAAmBA,EAAW,SAC9B,wBAAyBA,EAAW,SACpC,SAAUA,EAAW,SACrB,uBAAwBA,EAAW,SACnC,iBAAkBA,EAAW,SAC7B,SAAUA,EAAW,SACrB,qBAAsBA,EAAW,QACnC",
6
+ "names": ["textSizes", "textThemes", "italicMap", "sizeMap", "themeMap"]
7
+ }
@@ -0,0 +1,8 @@
1
+ import * as React from 'react';
2
+ import { sizes, variants, type VisuallyButton as Props } from './visually-button.types';
3
+ declare const VisuallyButtonRef: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLElement>>;
4
+ declare const VisuallyButton: typeof VisuallyButtonRef & {
5
+ sizes: typeof sizes;
6
+ variants: typeof variants;
7
+ };
8
+ export default VisuallyButton;
@@ -0,0 +1,2 @@
1
+ var z=Object.defineProperty,L=Object.defineProperties;var T=Object.getOwnPropertyDescriptors;var u=Object.getOwnPropertySymbols;var c=Object.prototype.hasOwnProperty,d=Object.prototype.propertyIsEnumerable;var m=(t,s,l)=>s in t?z(t,s,{enumerable:!0,configurable:!0,writable:!0,value:l}):t[s]=l,b=(t,s)=>{for(var l in s||(s={}))c.call(s,l)&&m(t,l,s[l]);if(u)for(var l of u(s))d.call(s,l)&&m(t,l,s[l]);return t},f=(t,s)=>L(t,T(s));var h=(t,s)=>{var l={};for(var o in t)c.call(t,o)&&s.indexOf(o)<0&&(l[o]=t[o]);if(t!=null&&u)for(var o of u(t))s.indexOf(o)<0&&d.call(t,o)&&(l[o]=t[o]);return l};import j from"classnames";import*as i from"react";import E from"../text";import{italicMap as P,sizeMap as $,themeMap as g}from"./maps";import{sizes as x,variants as _}from"./visually-button.types";const C=i.forwardRef((O,M)=>{var v=O,{iconOnly:t,className:s,elementName:l,leadingIcon:o,trailingIcon:e,hasStackedIcon:w,size:r=x.basic,spinning:p,testId:B,text:y,variant:n=_.primary,wide:N}=v,k=h(v,["iconOnly","className","elementName","leadingIcon","trailingIcon","hasStackedIcon","size","spinning","testId","text","variant","wide"]);const a=!!(t&&!!(o||e)),V=a&&l==="div"?"img":void 0;return i.createElement(l,f(b({"aria-label":a?y:void 0,className:j("visually-button",{"visually-button--icon":a,"visually-button--icon-text":(o||e)&&!t,"visually-button--icon-text--stacked":w,[`visually-button--size-${r}`]:r,"visually-button--spinning":p,[`visually-button--variant-${n}`]:n,"visually-button--wide":N},s),"data-testid":B,role:V},k),{ref:M}),o?i.createElement("div",{className:"visually-button__icon"},o):null,a?null:i.createElement(E,{className:"visually-button__text",italic:P[n],size:$[r],theme:g[n],elementName:"span"},y),e?i.createElement("div",{className:"visually-button__icon"},e):null,p?i.createElement("div",{className:"visually-button__spinner"},i.createElement("svg",{className:"visually-button__spinner-icon",width:"24px",height:"24px",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",xmlns:"http://www.w3.org/2000/svg"},i.createElement("circle",{opacity:"0.1",cx:"12",cy:"12",r:"10"}),i.createElement("path",{d:"M12 2C13.9778 2 15.9112 2.58649 17.5557 3.6853C19.2002 4.78412 20.4819 6.3459 21.2388 8.17316C21.9957 10.0004 22.1937 12.0111 21.8079 13.9509C21.422 15.8907 20.4696 17.6725 19.0711 19.0711C17.6725 20.4696 15.8907 21.422 13.9509 21.8079C12.0111 22.1937 10.0004 21.9957 8.17317 21.2388C6.3459 20.4819 4.78412 19.2002 3.6853 17.5557C2.58649 15.9112 2 13.9778 2 12",strokeLinecap:"round",strokeLinejoin:"round"}))):null)});C.displayName="VisuallyButton";const H=Object.assign(C,{sizes:x,variants:_});var J=H;export{J as default};
2
+ //# sourceMappingURL=visually-button.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../react/visually-button/visually-button.tsx"],
4
+ "sourcesContent": ["import cn from 'classnames';\nimport * as React from 'react';\n\nimport Text from '../text';\n\nimport { italicMap, sizeMap, themeMap } from './maps';\nimport {\n sizes,\n variants,\n type VisuallyButton as Props,\n} from './visually-button.types';\n\nconst VisuallyButtonRef = React.forwardRef<HTMLElement, Props>(\n (\n {\n iconOnly,\n className,\n elementName,\n leadingIcon,\n trailingIcon,\n hasStackedIcon,\n size = sizes.basic,\n spinning,\n testId,\n text,\n variant = variants.primary,\n wide,\n ...rest\n },\n ref,\n ) => {\n const hasIcon = Boolean(leadingIcon || trailingIcon);\n const renderIconOnly = Boolean(iconOnly && hasIcon);\n const role = renderIconOnly && elementName === 'div' ? 'img' : undefined;\n\n return React.createElement(\n elementName,\n {\n 'aria-label': renderIconOnly ? text : undefined,\n className: cn(\n 'visually-button',\n {\n 'visually-button--icon': renderIconOnly,\n 'visually-button--icon-text':\n (leadingIcon || trailingIcon) && !iconOnly,\n 'visually-button--icon-text--stacked': hasStackedIcon,\n [`visually-button--size-${size}`]: size,\n 'visually-button--spinning': spinning,\n [`visually-button--variant-${variant}`]: variant,\n 'visually-button--wide': wide,\n },\n className,\n ),\n 'data-testid': testId,\n role,\n ...rest,\n ref,\n },\n leadingIcon ? (\n <div className=\"visually-button__icon\">{leadingIcon}</div>\n ) : null,\n renderIconOnly ? null : (\n <Text\n className=\"visually-button__text\"\n italic={italicMap[variant]}\n size={sizeMap[size]}\n theme={themeMap[variant]}\n elementName=\"span\"\n >\n {text}\n </Text>\n ),\n trailingIcon ? (\n <div className=\"visually-button__icon\">{trailingIcon}</div>\n ) : null,\n spinning ? (\n <div className=\"visually-button__spinner\">\n <svg\n className=\"visually-button__spinner-icon\"\n width=\"24px\"\n height=\"24px\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <circle opacity=\"0.1\" cx=\"12\" cy=\"12\" r=\"10\" />\n <path\n d=\"M12 2C13.9778 2 15.9112 2.58649 17.5557 3.6853C19.2002 4.78412 20.4819 6.3459 21.2388 8.17316C21.9957 10.0004 22.1937 12.0111 21.8079 13.9509C21.422 15.8907 20.4696 17.6725 19.0711 19.0711C17.6725 20.4696 15.8907 21.422 13.9509 21.8079C12.0111 22.1937 10.0004 21.9957 8.17317 21.2388C6.3459 20.4819 4.78412 19.2002 3.6853 17.5557C2.58649 15.9112 2 13.9778 2 12\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n </div>\n ) : null,\n );\n },\n);\n\nVisuallyButtonRef.displayName = 'VisuallyButton';\n\nconst VisuallyButton: typeof VisuallyButtonRef & {\n sizes: typeof sizes;\n variants: typeof variants;\n} = Object.assign(VisuallyButtonRef, {\n sizes,\n variants,\n});\n\nexport default VisuallyButton;\n"],
5
+ "mappings": "+kBAAA,OAAOA,MAAQ,aACf,UAAYC,MAAW,QAEvB,OAAOC,MAAU,UAEjB,OAAS,aAAAC,EAAW,WAAAC,EAAS,YAAAC,MAAgB,SAC7C,OACE,SAAAC,EACA,YAAAC,MAEK,0BAEP,MAAMC,EAAoBP,EAAM,WAC9B,CACEQ,EAeAC,IACG,CAhBH,IAAAC,EAAAF,EACE,UAAAG,EACA,UAAAC,EACA,YAAAC,EACA,YAAAC,EACA,aAAAC,EACA,eAAAC,EACA,KAAAC,EAAOZ,EAAM,MACb,SAAAa,EACA,OAAAC,EACA,KAAAC,EACA,QAAAC,EAAUf,EAAS,QACnB,KAAAgB,CA1BN,EAcIZ,EAaKa,EAAAC,EAbLd,EAaK,CAZH,WACA,YACA,cACA,cACA,eACA,iBACA,OACA,WACA,SACA,OACA,UACA,SAMF,MAAMe,EAAiB,GAAQd,GADf,GAAQG,GAAeC,IAEjCW,EAAOD,GAAkBZ,IAAgB,MAAQ,MAAQ,OAE/D,OAAOb,EAAM,cACXa,EACAc,EAAAC,EAAA,CACE,aAAcH,EAAiBL,EAAO,OACtC,UAAWrB,EACT,kBACA,CACE,wBAAyB0B,EACzB,8BACGX,GAAeC,IAAiB,CAACJ,EACpC,sCAAuCK,EACvC,CAAC,yBAAyBC,CAAI,EAAE,EAAGA,EACnC,4BAA6BC,EAC7B,CAAC,4BAA4BG,CAAO,EAAE,EAAGA,EACzC,wBAAyBC,CAC3B,EACAV,CACF,EACA,cAAeO,EACf,KAAAO,GACGH,GAlBL,CAmBE,IAAAd,CACF,GACAK,EACEd,EAAA,cAAC,OAAI,UAAU,yBAAyBc,CAAY,EAClD,KACJW,EAAiB,KACfzB,EAAA,cAACC,EAAA,CACC,UAAU,wBACV,OAAQC,EAAUmB,CAAO,EACzB,KAAMlB,EAAQc,CAAI,EAClB,MAAOb,EAASiB,CAAO,EACvB,YAAY,QAEXD,CACH,EAEFL,EACEf,EAAA,cAAC,OAAI,UAAU,yBAAyBe,CAAa,EACnD,KACJG,EACElB,EAAA,cAAC,OAAI,UAAU,4BACbA,EAAA,cAAC,OACC,UAAU,gCACV,MAAM,OACN,OAAO,OACP,QAAQ,YACR,KAAK,OACL,OAAO,eACP,YAAY,IACZ,MAAM,8BAENA,EAAA,cAAC,UAAO,QAAQ,MAAM,GAAG,KAAK,GAAG,KAAK,EAAE,KAAK,EAC7CA,EAAA,cAAC,QACC,EAAE,2WACF,cAAc,QACd,eAAe,QACjB,CACF,CACF,EACE,IACN,CACF,CACF,EAEAO,EAAkB,YAAc,iBAEhC,MAAMsB,EAGF,OAAO,OAAOtB,EAAmB,CACnC,MAAAF,EACA,SAAAC,CACF,CAAC,EAED,IAAOwB,EAAQD",
6
+ "names": ["cn", "React", "Text", "italicMap", "sizeMap", "themeMap", "sizes", "variants", "VisuallyButtonRef", "_a", "ref", "_b", "iconOnly", "className", "elementName", "leadingIcon", "trailingIcon", "hasStackedIcon", "size", "spinning", "testId", "text", "variant", "wide", "rest", "__objRest", "renderIconOnly", "role", "__spreadProps", "__spreadValues", "VisuallyButton", "visually_button_default"]
7
+ }