@doist/reactist 28.7.2 → 28.7.4

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 (470) hide show
  1. package/CHANGELOG.md +1457 -0
  2. package/CODE_OF_CONDUCT.md +83 -0
  3. package/CONTRIBUTING.md +46 -0
  4. package/dist/reactist.cjs.development.js +2091 -3811
  5. package/dist/reactist.cjs.development.js.map +1 -1
  6. package/dist/reactist.cjs.production.min.js +1 -1
  7. package/dist/reactist.cjs.production.min.js.map +1 -1
  8. package/es/avatar/avatar.js +35 -30
  9. package/es/avatar/avatar.js.map +1 -1
  10. package/es/avatar/utils.js +19 -22
  11. package/es/avatar/utils.js.map +1 -1
  12. package/es/badge/badge.js +5 -16
  13. package/es/badge/badge.js.map +1 -1
  14. package/es/banner/banner.js +39 -115
  15. package/es/banner/banner.js.map +1 -1
  16. package/es/banner/banner.module.css.js +1 -1
  17. package/es/base-field/base-field.js +80 -162
  18. package/es/base-field/base-field.js.map +1 -1
  19. package/es/base-field/base-field.module.css.js +1 -1
  20. package/es/box/box.js +61 -137
  21. package/es/box/box.js.map +1 -1
  22. package/es/button/button.js +42 -95
  23. package/es/button/button.js.map +1 -1
  24. package/es/checkbox-field/checkbox-field.js +46 -73
  25. package/es/checkbox-field/checkbox-field.js.map +1 -1
  26. package/es/checkbox-field/checkbox-field.module.css.js +1 -1
  27. package/es/checkbox-field/checkbox-icon.js +28 -55
  28. package/es/checkbox-field/checkbox-icon.js.map +1 -1
  29. package/es/checkbox-field/use-fork-ref.js +29 -25
  30. package/es/checkbox-field/use-fork-ref.js.map +1 -1
  31. package/es/columns/columns.js +22 -46
  32. package/es/columns/columns.js.map +1 -1
  33. package/es/columns/columns.module.css.js +1 -1
  34. package/es/components/color-picker/color-picker.js +45 -66
  35. package/es/components/color-picker/color-picker.js.map +1 -1
  36. package/es/components/deprecated-button/deprecated-button.js +11 -34
  37. package/es/components/deprecated-button/deprecated-button.js.map +1 -1
  38. package/es/components/deprecated-dropdown/dropdown.js +136 -197
  39. package/es/components/deprecated-dropdown/dropdown.js.map +1 -1
  40. package/es/components/deprecated-input/input.js +6 -10
  41. package/es/components/deprecated-input/input.js.map +1 -1
  42. package/es/components/deprecated-select/select.js +7 -31
  43. package/es/components/deprecated-select/select.js.map +1 -1
  44. package/es/components/key-capturer/key-capturer.js +130 -171
  45. package/es/components/key-capturer/key-capturer.js.map +1 -1
  46. package/es/components/keyboard-shortcut/keyboard-shortcut.js +48 -79
  47. package/es/components/keyboard-shortcut/keyboard-shortcut.js.map +1 -1
  48. package/es/components/progress-bar/progress-bar.js +8 -20
  49. package/es/components/progress-bar/progress-bar.js.map +1 -1
  50. package/es/components/time/time-utils.js +52 -64
  51. package/es/components/time/time-utils.js.map +1 -1
  52. package/es/components/time/time.js +90 -114
  53. package/es/components/time/time.js.map +1 -1
  54. package/es/divider/divider.js +4 -13
  55. package/es/divider/divider.js.map +1 -1
  56. package/es/heading/heading.js +19 -28
  57. package/es/heading/heading.js.map +1 -1
  58. package/es/hidden/hidden.js +36 -45
  59. package/es/hidden/hidden.js.map +1 -1
  60. package/es/hidden-visually/hidden-visually.js +7 -13
  61. package/es/hidden-visually/hidden-visually.js.map +1 -1
  62. package/es/icons/alert-icon.js +18 -64
  63. package/es/icons/alert-icon.js.map +1 -1
  64. package/es/icons/banner-icon.js +25 -97
  65. package/es/icons/banner-icon.js.map +1 -1
  66. package/es/icons/close-icon.js +3 -9
  67. package/es/icons/close-icon.js.map +1 -1
  68. package/es/icons/password-hidden-icon.js +6 -23
  69. package/es/icons/password-hidden-icon.js.map +1 -1
  70. package/es/icons/password-visible-icon.js +5 -16
  71. package/es/icons/password-visible-icon.js.map +1 -1
  72. package/es/inline/inline.js +8 -23
  73. package/es/inline/inline.js.map +1 -1
  74. package/es/loading/loading.js +17 -28
  75. package/es/loading/loading.js.map +1 -1
  76. package/es/menu/menu.js +127 -260
  77. package/es/menu/menu.js.map +1 -1
  78. package/es/modal/modal.js +143 -272
  79. package/es/modal/modal.js.map +1 -1
  80. package/es/modal/modal.module.css.js +1 -1
  81. package/es/notice/notice.js +8 -21
  82. package/es/notice/notice.js.map +1 -1
  83. package/es/notice/notice.module.css.js +1 -1
  84. package/es/password-field/password-field.js +10 -24
  85. package/es/password-field/password-field.js.map +1 -1
  86. package/es/prose/prose.js +10 -15
  87. package/es/prose/prose.js.map +1 -1
  88. package/es/select-field/select-field.js +14 -51
  89. package/es/select-field/select-field.js.map +1 -1
  90. package/es/spinner/spinner.js +6 -20
  91. package/es/spinner/spinner.js.map +1 -1
  92. package/es/stack/stack.js +15 -27
  93. package/es/stack/stack.js.map +1 -1
  94. package/es/switch-field/switch-field.js +38 -73
  95. package/es/switch-field/switch-field.js.map +1 -1
  96. package/es/switch-field/switch-field.module.css.js +1 -1
  97. package/es/tabs/tabs.js +120 -207
  98. package/es/tabs/tabs.js.map +1 -1
  99. package/es/text/text.js +16 -25
  100. package/es/text/text.js.map +1 -1
  101. package/es/text-area/text-area.js +54 -111
  102. package/es/text-area/text-area.js.map +1 -1
  103. package/es/text-field/text-field.js +30 -84
  104. package/es/text-field/text-field.js.map +1 -1
  105. package/es/text-link/text-link.js +9 -20
  106. package/es/text-link/text-link.js.map +1 -1
  107. package/es/text-link/text-link.module.css.js +1 -1
  108. package/es/toast/static-toast.js +35 -70
  109. package/es/toast/static-toast.js.map +1 -1
  110. package/es/toast/toast-animation.js +121 -159
  111. package/es/toast/toast-animation.js.map +1 -1
  112. package/es/toast/use-toasts.js +134 -197
  113. package/es/toast/use-toasts.js.map +1 -1
  114. package/es/tooltip/tooltip.js +31 -69
  115. package/es/tooltip/tooltip.js.map +1 -1
  116. package/es/utils/common-helpers.js +9 -13
  117. package/es/utils/common-helpers.js.map +1 -1
  118. package/es/utils/polymorphism.js +7 -8
  119. package/es/utils/polymorphism.js.map +1 -1
  120. package/es/utils/responsive-props.js +57 -66
  121. package/es/utils/responsive-props.js.map +1 -1
  122. package/lib/avatar/avatar.d.ts +21 -21
  123. package/lib/avatar/avatar.js +69 -1
  124. package/lib/avatar/avatar.js.map +1 -1
  125. package/lib/avatar/avatar.module.css.js +7 -1
  126. package/lib/avatar/avatar.module.css.js.map +1 -1
  127. package/lib/avatar/index.d.ts +1 -1
  128. package/lib/avatar/utils.d.ts +3 -3
  129. package/lib/avatar/utils.js +30 -1
  130. package/lib/avatar/utils.js.map +1 -1
  131. package/lib/badge/badge.d.ts +15 -15
  132. package/lib/badge/badge.js +36 -1
  133. package/lib/badge/badge.js.map +1 -1
  134. package/lib/badge/badge.module.css.js +7 -1
  135. package/lib/badge/badge.module.css.js.map +1 -1
  136. package/lib/badge/index.d.ts +1 -1
  137. package/lib/banner/banner.d.ts +87 -87
  138. package/lib/banner/banner.js +79 -1
  139. package/lib/banner/banner.js.map +1 -1
  140. package/lib/banner/banner.module.css.js +7 -1
  141. package/lib/banner/banner.module.css.js.map +1 -1
  142. package/lib/banner/index.d.ts +2 -2
  143. package/lib/banner/story-promo-image.d.ts +4 -4
  144. package/lib/base-field/base-field.d.ts +139 -139
  145. package/lib/base-field/base-field.js +127 -1
  146. package/lib/base-field/base-field.js.map +1 -1
  147. package/lib/base-field/base-field.module.css.js +7 -1
  148. package/lib/base-field/base-field.module.css.js.map +1 -1
  149. package/lib/base-field/index.d.ts +1 -1
  150. package/lib/box/box.d.ts +73 -73
  151. package/lib/box/box.js +103 -1
  152. package/lib/box/box.js.map +1 -1
  153. package/lib/box/box.module.css.js +7 -1
  154. package/lib/box/box.module.css.js.map +1 -1
  155. package/lib/box/gap.module.css.js +7 -1
  156. package/lib/box/gap.module.css.js.map +1 -1
  157. package/lib/box/index.d.ts +1 -1
  158. package/lib/box/margin.module.css.js +7 -1
  159. package/lib/box/margin.module.css.js.map +1 -1
  160. package/lib/box/padding.module.css.js +7 -1
  161. package/lib/box/padding.module.css.js.map +1 -1
  162. package/lib/box/width.module.css.js +7 -1
  163. package/lib/box/width.module.css.js.map +1 -1
  164. package/lib/button/button.d.ts +127 -127
  165. package/lib/button/button.js +86 -1
  166. package/lib/button/button.js.map +1 -1
  167. package/lib/button/button.module.css.js +7 -1
  168. package/lib/button/button.module.css.js.map +1 -1
  169. package/lib/button/index.d.ts +1 -1
  170. package/lib/checkbox-field/checkbox-field.d.ts +40 -40
  171. package/lib/checkbox-field/checkbox-field.js +82 -1
  172. package/lib/checkbox-field/checkbox-field.js.map +1 -1
  173. package/lib/checkbox-field/checkbox-field.module.css.js +7 -1
  174. package/lib/checkbox-field/checkbox-field.module.css.js.map +1 -1
  175. package/lib/checkbox-field/checkbox-icon.d.ts +8 -8
  176. package/lib/checkbox-field/checkbox-icon.js +59 -1
  177. package/lib/checkbox-field/checkbox-icon.js.map +1 -1
  178. package/lib/checkbox-field/index.d.ts +1 -1
  179. package/lib/checkbox-field/use-fork-ref.d.ts +11 -11
  180. package/lib/checkbox-field/use-fork-ref.js +42 -1
  181. package/lib/checkbox-field/use-fork-ref.js.map +1 -1
  182. package/lib/columns/columns.d.ts +20 -20
  183. package/lib/columns/columns.js +57 -1
  184. package/lib/columns/columns.js.map +1 -1
  185. package/lib/columns/columns.module.css.js +7 -1
  186. package/lib/columns/columns.module.css.js.map +1 -1
  187. package/lib/columns/index.d.ts +1 -1
  188. package/lib/components/color-picker/color-picker.d.ts +29 -29
  189. package/lib/components/color-picker/color-picker.js +86 -1
  190. package/lib/components/color-picker/color-picker.js.map +1 -1
  191. package/lib/components/color-picker/index.d.ts +3 -3
  192. package/lib/components/color-picker/index.js +11 -1
  193. package/lib/components/color-picker/index.js.map +1 -1
  194. package/lib/components/deprecated-button/deprecated-button.d.ts +54 -54
  195. package/lib/components/deprecated-button/deprecated-button.js +49 -1
  196. package/lib/components/deprecated-button/deprecated-button.js.map +1 -1
  197. package/lib/components/deprecated-button/index.d.ts +4 -4
  198. package/lib/components/deprecated-button/index.js +9 -1
  199. package/lib/components/deprecated-button/index.js.map +1 -1
  200. package/lib/components/deprecated-dropdown/dropdown.d.ts +55 -55
  201. package/lib/components/deprecated-dropdown/dropdown.js +182 -1
  202. package/lib/components/deprecated-dropdown/dropdown.js.map +1 -1
  203. package/lib/components/deprecated-dropdown/index.d.ts +2 -2
  204. package/lib/components/deprecated-dropdown/index.js +9 -1
  205. package/lib/components/deprecated-dropdown/index.js.map +1 -1
  206. package/lib/components/deprecated-input/index.d.ts +2 -2
  207. package/lib/components/deprecated-input/index.js +9 -1
  208. package/lib/components/deprecated-input/index.js.map +1 -1
  209. package/lib/components/deprecated-input/input.d.ts +10 -10
  210. package/lib/components/deprecated-input/input.js +41 -1
  211. package/lib/components/deprecated-input/input.js.map +1 -1
  212. package/lib/components/deprecated-select/index.d.ts +2 -2
  213. package/lib/components/deprecated-select/index.js +9 -1
  214. package/lib/components/deprecated-select/index.js.map +1 -1
  215. package/lib/components/deprecated-select/select.d.ts +33 -33
  216. package/lib/components/deprecated-select/select.js +43 -1
  217. package/lib/components/deprecated-select/select.js.map +1 -1
  218. package/lib/components/icons/CloseIcon.svg.d.ts +3 -3
  219. package/lib/components/icons/ThinQuestionMarkIcon.svg.d.ts +3 -3
  220. package/lib/components/icons/ThreeDotsIcon.svg.d.ts +12 -12
  221. package/lib/components/key-capturer/index.d.ts +3 -3
  222. package/lib/components/key-capturer/index.js +11 -1
  223. package/lib/components/key-capturer/index.js.map +1 -1
  224. package/lib/components/key-capturer/key-capturer.d.ts +40 -40
  225. package/lib/components/key-capturer/key-capturer.js +171 -1
  226. package/lib/components/key-capturer/key-capturer.js.map +1 -1
  227. package/lib/components/keyboard-shortcut/index.d.ts +2 -2
  228. package/lib/components/keyboard-shortcut/index.js +9 -1
  229. package/lib/components/keyboard-shortcut/index.js.map +1 -1
  230. package/lib/components/keyboard-shortcut/keyboard-shortcut.d.ts +44 -44
  231. package/lib/components/keyboard-shortcut/keyboard-shortcut.js +97 -1
  232. package/lib/components/keyboard-shortcut/keyboard-shortcut.js.map +1 -1
  233. package/lib/components/progress-bar/index.d.ts +2 -2
  234. package/lib/components/progress-bar/index.js +9 -1
  235. package/lib/components/progress-bar/index.js.map +1 -1
  236. package/lib/components/progress-bar/progress-bar.d.ts +14 -14
  237. package/lib/components/progress-bar/progress-bar.js +44 -1
  238. package/lib/components/progress-bar/progress-bar.js.map +1 -1
  239. package/lib/components/progress-bar/progress-bar.module.css.js +7 -1
  240. package/lib/components/progress-bar/progress-bar.module.css.js.map +1 -1
  241. package/lib/components/time/index.d.ts +2 -2
  242. package/lib/components/time/index.js +9 -1
  243. package/lib/components/time/index.js.map +1 -1
  244. package/lib/components/time/time-utils.d.ts +19 -19
  245. package/lib/components/time/time-utils.js +69 -1
  246. package/lib/components/time/time-utils.js.map +1 -1
  247. package/lib/components/time/time.d.ts +39 -39
  248. package/lib/components/time/time.js +124 -1
  249. package/lib/components/time/time.js.map +1 -1
  250. package/lib/divider/divider.d.ts +8 -8
  251. package/lib/divider/divider.js +36 -1
  252. package/lib/divider/divider.js.map +1 -1
  253. package/lib/divider/divider.module.css.js +7 -1
  254. package/lib/divider/divider.module.css.js.map +1 -1
  255. package/lib/divider/index.d.ts +1 -1
  256. package/lib/heading/heading.d.ts +112 -112
  257. package/lib/heading/heading.js +51 -1
  258. package/lib/heading/heading.js.map +1 -1
  259. package/lib/heading/heading.module.css.js +7 -1
  260. package/lib/heading/heading.module.css.js.map +1 -1
  261. package/lib/heading/index.d.ts +1 -1
  262. package/lib/hidden/hidden.d.ts +49 -49
  263. package/lib/hidden/hidden.js +70 -1
  264. package/lib/hidden/hidden.js.map +1 -1
  265. package/lib/hidden/hidden.module.css.js +7 -1
  266. package/lib/hidden/hidden.module.css.js.map +1 -1
  267. package/lib/hidden/index.d.ts +1 -1
  268. package/lib/hidden-visually/hidden-visually.d.ts +11 -11
  269. package/lib/hidden-visually/hidden-visually.js +40 -1
  270. package/lib/hidden-visually/hidden-visually.js.map +1 -1
  271. package/lib/hidden-visually/hidden-visually.module.css.js +7 -1
  272. package/lib/hidden-visually/hidden-visually.module.css.js.map +1 -1
  273. package/lib/hidden-visually/index.d.ts +1 -1
  274. package/lib/hooks/use-previous/index.d.ts +1 -1
  275. package/lib/hooks/use-previous/use-previous.d.ts +15 -15
  276. package/lib/icons/alert-icon.d.ts +6 -6
  277. package/lib/icons/alert-icon.js +56 -1
  278. package/lib/icons/alert-icon.js.map +1 -1
  279. package/lib/icons/banner-icon.d.ts +6 -6
  280. package/lib/icons/banner-icon.js +68 -1
  281. package/lib/icons/banner-icon.js.map +1 -1
  282. package/lib/icons/banner-icon.module.css.js +7 -1
  283. package/lib/icons/banner-icon.module.css.js.map +1 -1
  284. package/lib/icons/close-icon.d.ts +3 -3
  285. package/lib/icons/close-icon.js +33 -1
  286. package/lib/icons/close-icon.js.map +1 -1
  287. package/lib/icons/password-hidden-icon.d.ts +3 -3
  288. package/lib/icons/password-hidden-icon.js +36 -1
  289. package/lib/icons/password-hidden-icon.js.map +1 -1
  290. package/lib/icons/password-visible-icon.d.ts +3 -3
  291. package/lib/icons/password-visible-icon.js +35 -1
  292. package/lib/icons/password-visible-icon.js.map +1 -1
  293. package/lib/index.d.ts +38 -38
  294. package/lib/index.js +106 -1
  295. package/lib/index.js.map +1 -1
  296. package/lib/inline/index.d.ts +1 -1
  297. package/lib/inline/inline.d.ts +12 -12
  298. package/lib/inline/inline.js +40 -1
  299. package/lib/inline/inline.js.map +1 -1
  300. package/lib/loading/index.d.ts +1 -1
  301. package/lib/loading/loading.d.ts +26 -26
  302. package/lib/loading/loading.js +49 -1
  303. package/lib/loading/loading.js.map +1 -1
  304. package/lib/menu/index.d.ts +2 -2
  305. package/lib/menu/menu.d.ts +128 -128
  306. package/lib/menu/menu.js +179 -1
  307. package/lib/menu/menu.js.map +1 -1
  308. package/lib/modal/index.d.ts +1 -1
  309. package/lib/modal/modal-stories-components.d.ts +47 -47
  310. package/lib/modal/modal.d.ts +185 -185
  311. package/lib/modal/modal.js +209 -1
  312. package/lib/modal/modal.js.map +1 -1
  313. package/lib/modal/modal.module.css.js +7 -1
  314. package/lib/modal/modal.module.css.js.map +1 -1
  315. package/lib/notice/index.d.ts +1 -1
  316. package/lib/notice/notice.d.ts +10 -10
  317. package/lib/notice/notice.js +42 -1
  318. package/lib/notice/notice.js.map +1 -1
  319. package/lib/notice/notice.module.css.js +7 -1
  320. package/lib/notice/notice.module.css.js.map +1 -1
  321. package/lib/password-field/index.d.ts +1 -1
  322. package/lib/password-field/password-field.d.ts +10 -10
  323. package/lib/password-field/password-field.js +43 -1
  324. package/lib/password-field/password-field.js.map +1 -1
  325. package/lib/prose/index.d.ts +2 -2
  326. package/lib/prose/prose-example.d.ts +1 -1
  327. package/lib/prose/prose.d.ts +44 -44
  328. package/lib/prose/prose.js +42 -1
  329. package/lib/prose/prose.js.map +1 -1
  330. package/lib/prose/prose.module.css.js +7 -1
  331. package/lib/prose/prose.module.css.js.map +1 -1
  332. package/lib/select-field/index.d.ts +1 -1
  333. package/lib/select-field/select-field.d.ts +7 -7
  334. package/lib/select-field/select-field.js +48 -1
  335. package/lib/select-field/select-field.js.map +1 -1
  336. package/lib/select-field/select-field.module.css.js +7 -1
  337. package/lib/select-field/select-field.module.css.js.map +1 -1
  338. package/lib/spinner/index.d.ts +1 -1
  339. package/lib/spinner/spinner.d.ts +5 -5
  340. package/lib/spinner/spinner.js +36 -1
  341. package/lib/spinner/spinner.js.map +1 -1
  342. package/lib/spinner/spinner.module.css.js +7 -1
  343. package/lib/spinner/spinner.module.css.js.map +1 -1
  344. package/lib/stack/index.d.ts +1 -1
  345. package/lib/stack/stack.d.ts +15 -15
  346. package/lib/stack/stack.js +52 -1
  347. package/lib/stack/stack.js.map +1 -1
  348. package/lib/switch-field/index.d.ts +1 -1
  349. package/lib/switch-field/switch-field.d.ts +19 -19
  350. package/lib/switch-field/switch-field.js +74 -1
  351. package/lib/switch-field/switch-field.js.map +1 -1
  352. package/lib/switch-field/switch-field.module.css.js +7 -1
  353. package/lib/switch-field/switch-field.module.css.js.map +1 -1
  354. package/lib/tabs/index.d.ts +1 -1
  355. package/lib/tabs/tabs.d.ts +125 -125
  356. package/lib/tabs/tabs.js +177 -1
  357. package/lib/tabs/tabs.js.map +1 -1
  358. package/lib/tabs/tabs.module.css.js +7 -1
  359. package/lib/tabs/tabs.module.css.js.map +1 -1
  360. package/lib/text/index.d.ts +1 -1
  361. package/lib/text/text.d.ts +47 -47
  362. package/lib/text/text.js +49 -1
  363. package/lib/text/text.js.map +1 -1
  364. package/lib/text/text.module.css.js +7 -1
  365. package/lib/text/text.module.css.js.map +1 -1
  366. package/lib/text-area/index.d.ts +1 -1
  367. package/lib/text-area/text-area.d.ts +39 -39
  368. package/lib/text-area/text-area.js +92 -1
  369. package/lib/text-area/text-area.js.map +1 -1
  370. package/lib/text-area/text-area.module.css.js +7 -1
  371. package/lib/text-area/text-area.module.css.js.map +1 -1
  372. package/lib/text-field/index.d.ts +1 -1
  373. package/lib/text-field/text-field.d.ts +18 -18
  374. package/lib/text-field/text-field.js +63 -1
  375. package/lib/text-field/text-field.js.map +1 -1
  376. package/lib/text-field/text-field.module.css.js +7 -1
  377. package/lib/text-field/text-field.module.css.js.map +1 -1
  378. package/lib/text-link/index.d.ts +1 -1
  379. package/lib/text-link/text-link.d.ts +9 -9
  380. package/lib/text-link/text-link.js +41 -1
  381. package/lib/text-link/text-link.js.map +1 -1
  382. package/lib/text-link/text-link.module.css.js +7 -1
  383. package/lib/text-link/text-link.module.css.js.map +1 -1
  384. package/lib/toast/index.d.ts +4 -4
  385. package/lib/toast/static-toast.d.ts +63 -63
  386. package/lib/toast/static-toast.js +59 -1
  387. package/lib/toast/static-toast.js.map +1 -1
  388. package/lib/toast/toast-animation.d.ts +50 -50
  389. package/lib/toast/toast-animation.js +141 -1
  390. package/lib/toast/toast-animation.js.map +1 -1
  391. package/lib/toast/toast.module.css.js +7 -1
  392. package/lib/toast/toast.module.css.js.map +1 -1
  393. package/lib/toast/use-toasts.d.ts +132 -132
  394. package/lib/toast/use-toasts.js +166 -1
  395. package/lib/toast/use-toasts.js.map +1 -1
  396. package/lib/tooltip/index.d.ts +2 -2
  397. package/lib/tooltip/tooltip.d.ts +72 -72
  398. package/lib/tooltip/tooltip.js +67 -1
  399. package/lib/tooltip/tooltip.js.map +1 -1
  400. package/lib/tooltip/tooltip.module.css.js +7 -1
  401. package/lib/tooltip/tooltip.module.css.js.map +1 -1
  402. package/lib/utils/common-helpers.d.ts +2 -2
  403. package/lib/utils/common-helpers.js +44 -1
  404. package/lib/utils/common-helpers.js.map +1 -1
  405. package/lib/utils/common-types.d.ts +42 -42
  406. package/lib/utils/polymorphism.d.ts +135 -135
  407. package/lib/utils/polymorphism.js +39 -1
  408. package/lib/utils/polymorphism.js.map +1 -1
  409. package/lib/utils/responsive-props.d.ts +44 -44
  410. package/lib/utils/responsive-props.js +70 -1
  411. package/lib/utils/responsive-props.js.map +1 -1
  412. package/lib/utils/storybook-helper.d.ts +55 -0
  413. package/lib/utils/test-helpers.d.ts +22 -22
  414. package/package.json +32 -26
  415. package/styles/avatar.css +2 -2
  416. package/styles/avatar.module.css.css +1 -1
  417. package/styles/badge.css +2 -2
  418. package/styles/badge.module.css.css +1 -1
  419. package/styles/banner.css +6 -6
  420. package/styles/banner.module.css.css +1 -1
  421. package/styles/base-field.css +4 -4
  422. package/styles/base-field.module.css.css +1 -1
  423. package/styles/box.css +1 -1
  424. package/styles/box.module.css.css +1 -1
  425. package/styles/button.css +4 -4
  426. package/styles/button.module.css.css +1 -1
  427. package/styles/checkbox-field.css +3 -3
  428. package/styles/checkbox-field.module.css.css +1 -1
  429. package/styles/columns.css +1 -1
  430. package/styles/divider.css +1 -1
  431. package/styles/heading.css +2 -2
  432. package/styles/heading.module.css.css +1 -1
  433. package/styles/hidden-visually.css +2 -2
  434. package/styles/hidden-visually.module.css.css +1 -1
  435. package/styles/hidden.css +1 -1
  436. package/styles/index.css +4 -4
  437. package/styles/loading.css +2 -2
  438. package/styles/menu.css +1 -1
  439. package/styles/modal.css +5 -5
  440. package/styles/modal.module.css.css +1 -1
  441. package/styles/notice.css +1 -1
  442. package/styles/password-field.css +7 -7
  443. package/styles/progress-bar.module.css.css +1 -1
  444. package/styles/prose.css +2 -2
  445. package/styles/prose.module.css.css +1 -1
  446. package/styles/reactist.css +30 -30
  447. package/styles/select-field.css +5 -5
  448. package/styles/select-field.module.css.css +1 -1
  449. package/styles/spinner.css +1 -1
  450. package/styles/static-toast.css +6 -6
  451. package/styles/switch-field.css +6 -6
  452. package/styles/switch-field.module.css.css +1 -1
  453. package/styles/tabs.css +2 -2
  454. package/styles/tabs.module.css.css +1 -1
  455. package/styles/text-area.css +5 -5
  456. package/styles/text-area.module.css.css +1 -1
  457. package/styles/text-field.css +5 -5
  458. package/styles/text-field.module.css.css +1 -1
  459. package/styles/text-link.css +2 -2
  460. package/styles/text-link.module.css.css +1 -1
  461. package/styles/text.css +2 -2
  462. package/styles/text.module.css.css +1 -1
  463. package/styles/toast.module.css.css +1 -1
  464. package/styles/tooltip.css +2 -2
  465. package/styles/tooltip.module.css.css +1 -1
  466. package/styles/use-toasts.css +6 -6
  467. package/es/_virtual/_rollupPluginBabelHelpers.js +0 -91
  468. package/es/_virtual/_rollupPluginBabelHelpers.js.map +0 -1
  469. package/lib/_virtual/_rollupPluginBabelHelpers.js +0 -2
  470. package/lib/_virtual/_rollupPluginBabelHelpers.js.map +0 -1
@@ -1,2 +1,93 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../_virtual/_rollupPluginBabelHelpers.js"),t=require("react"),a=require("classnames"),r=require("use-callback-ref"),n=require("../base-field/base-field.js"),l=require("../box/box.js"),u=require("./text-area.module.css.js");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function o(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(a){if("default"!==a){var r=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,r.get?r:{enumerable:!0,get:function(){return e[a]}})}})),t.default=e,t}var s=o(t),d=i(a);const c=["variant","id","label","value","auxiliaryLabel","message","tone","maxWidth","maxLength","hidden","aria-describedby","rows","autoExpand","disableResize","onChange"],f=["onChange"];exports.TextArea=s.forwardRef((function(t,a){let{variant:i="default",id:o,label:b,value:x,auxiliaryLabel:p,message:m,tone:v,maxWidth:h,maxLength:g,hidden:j,"aria-describedby":y,rows:E,autoExpand:R=!1,disableResize:L=!1,onChange:q}=t,C=e.objectWithoutProperties(t,c);const w=s.useRef(null),O=s.useRef(null),P=r.useMergeRefs([a,O]);!function({value:e,autoExpand:t,containerRef:a,internalRef:r}){const n=void 0!==e;s.useEffect((function(){const e=r.current;if(!e||!t||n)return;const l=a.current;function u(e){l&&(l.dataset.replicatedValue=e)}function i(e){u(e.currentTarget.value)}return u(e.value),e.addEventListener("input",i),()=>e.removeEventListener("input",i)}),[t,a,r,n]),s.useEffect((function(){if(!n||!t)return;const r=a.current;r&&(r.dataset.replicatedValue=e)}),[e,a,n,t])}({value:x,autoExpand:R,containerRef:w,internalRef:O});const _=d.default([R?u.default.disableResize:null,L?u.default.disableResize:null]);return s.createElement(n.BaseField,{variant:i,id:o,label:b,value:x,auxiliaryLabel:p,message:m,tone:v,hidden:j,"aria-describedby":y,className:[u.default.textAreaContainer,"error"===v?u.default.error:null,"bordered"===i?u.default.bordered:null],maxWidth:h,maxLength:g},t=>{let{onChange:a}=t,r=e.objectWithoutProperties(t,f);return s.createElement(l.Box,{width:"full",display:"flex",className:u.default.innerContainer,ref:w},s.createElement("textarea",e.objectSpread2(e.objectSpread2(e.objectSpread2({},C),r),{},{ref:P,rows:E,className:_,maxLength:g,onChange:e=>{null==q||q(e),null==a||a(e)}})))})}));
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var tslib = require('tslib');
6
+ var React = require('react');
7
+ var classNames = require('classnames');
8
+ var useCallbackRef = require('use-callback-ref');
9
+ var baseField = require('../base-field/base-field.js');
10
+ var box = require('../box/box.js');
11
+ var textArea_module = require('./text-area.module.css.js');
12
+
13
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
14
+
15
+ function _interopNamespace(e) {
16
+ if (e && e.__esModule) return e;
17
+ var n = Object.create(null);
18
+ if (e) {
19
+ Object.keys(e).forEach(function (k) {
20
+ if (k !== 'default') {
21
+ var d = Object.getOwnPropertyDescriptor(e, k);
22
+ Object.defineProperty(n, k, d.get ? d : {
23
+ enumerable: true,
24
+ get: function () { return e[k]; }
25
+ });
26
+ }
27
+ });
28
+ }
29
+ n["default"] = e;
30
+ return Object.freeze(n);
31
+ }
32
+
33
+ var React__namespace = /*#__PURE__*/_interopNamespace(React);
34
+ var classNames__default = /*#__PURE__*/_interopDefaultLegacy(classNames);
35
+
36
+ var TextArea = React__namespace.forwardRef(function TextArea(_a, ref) {
37
+ var _b = _a.variant, variant = _b === void 0 ? 'default' : _b, id = _a.id, label = _a.label, value = _a.value, auxiliaryLabel = _a.auxiliaryLabel, message = _a.message, tone = _a.tone, maxWidth = _a.maxWidth, maxLength = _a.maxLength, hidden = _a.hidden, ariaDescribedBy = _a["aria-describedby"], rows = _a.rows, _c = _a.autoExpand, autoExpand = _c === void 0 ? false : _c, _d = _a.disableResize, disableResize = _d === void 0 ? false : _d, originalOnChange = _a.onChange, props = tslib.__rest(_a, ["variant", "id", "label", "value", "auxiliaryLabel", "message", "tone", "maxWidth", "maxLength", "hidden", 'aria-describedby', "rows", "autoExpand", "disableResize", "onChange"]);
38
+ var containerRef = React__namespace.useRef(null);
39
+ var internalRef = React__namespace.useRef(null);
40
+ var combinedRef = useCallbackRef.useMergeRefs([ref, internalRef]);
41
+ useAutoExpand({ value: value, autoExpand: autoExpand, containerRef: containerRef, internalRef: internalRef });
42
+ var textAreaClassName = classNames__default["default"]([
43
+ autoExpand ? textArea_module["default"].disableResize : null,
44
+ disableResize ? textArea_module["default"].disableResize : null,
45
+ ]);
46
+ return (React__namespace.createElement(baseField.BaseField, { variant: variant, id: id, label: label, value: value, auxiliaryLabel: auxiliaryLabel, message: message, tone: tone, hidden: hidden, "aria-describedby": ariaDescribedBy, className: [
47
+ textArea_module["default"].textAreaContainer,
48
+ tone === 'error' ? textArea_module["default"].error : null,
49
+ variant === 'bordered' ? textArea_module["default"].bordered : null,
50
+ ], maxWidth: maxWidth, maxLength: maxLength }, function (_a) {
51
+ var onChange = _a.onChange, extraProps = tslib.__rest(_a, ["onChange"]);
52
+ return (React__namespace.createElement(box.Box, { width: "full", display: "flex", className: textArea_module["default"].innerContainer, ref: containerRef },
53
+ React__namespace.createElement("textarea", tslib.__assign({}, props, extraProps, { ref: combinedRef, rows: rows, className: textAreaClassName, maxLength: maxLength, onChange: function (event) {
54
+ originalOnChange === null || originalOnChange === void 0 ? void 0 : originalOnChange(event);
55
+ onChange === null || onChange === void 0 ? void 0 : onChange(event);
56
+ } }))));
57
+ }));
58
+ });
59
+ function useAutoExpand(_a) {
60
+ var value = _a.value, autoExpand = _a.autoExpand, containerRef = _a.containerRef, internalRef = _a.internalRef;
61
+ var isControlled = value !== undefined;
62
+ React__namespace.useEffect(function setupAutoExpandWhenUncontrolled() {
63
+ var textAreaElement = internalRef.current;
64
+ if (!textAreaElement || !autoExpand || isControlled) {
65
+ return undefined;
66
+ }
67
+ var containerElement = containerRef.current;
68
+ function handleAutoExpand(value) {
69
+ if (containerElement) {
70
+ containerElement.dataset.replicatedValue = value;
71
+ }
72
+ }
73
+ function handleInput(event) {
74
+ handleAutoExpand(event.currentTarget.value);
75
+ }
76
+ // Apply change initially, in case the text area has a non-empty initial value
77
+ handleAutoExpand(textAreaElement.value);
78
+ textAreaElement.addEventListener('input', handleInput);
79
+ return function () { return textAreaElement.removeEventListener('input', handleInput); };
80
+ }, [autoExpand, containerRef, internalRef, isControlled]);
81
+ React__namespace.useEffect(function setupAutoExpandWhenControlled() {
82
+ if (!isControlled || !autoExpand) {
83
+ return;
84
+ }
85
+ var containerElement = containerRef.current;
86
+ if (containerElement) {
87
+ containerElement.dataset.replicatedValue = value;
88
+ }
89
+ }, [value, containerRef, isControlled, autoExpand]);
90
+ }
91
+
92
+ exports.TextArea = TextArea;
2
93
  //# sourceMappingURL=text-area.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"text-area.js","sources":["../../src/text-area/text-area.tsx"],"sourcesContent":["import * as React from 'react'\nimport classNames from 'classnames'\nimport { useMergeRefs } from 'use-callback-ref'\nimport { BaseField, BaseFieldVariantProps, FieldComponentProps } from '../base-field'\nimport { Box } from '../box'\nimport styles from './text-area.module.css'\n\ninterface TextAreaProps\n extends Omit<FieldComponentProps<HTMLTextAreaElement>, 'characterCountPosition'>,\n Omit<\n BaseFieldVariantProps,\n 'supportsStartAndEndSlots' | 'endSlot' | 'endSlotPosition' | 'value'\n > {\n /**\n * The value of the text area.\n *\n * If this prop is not specified, the text area will be uncontrolled and the component will\n * manage its own state.\n */\n value?: string\n\n /**\n * The number of visible text lines for the text area.\n *\n * If it is specified, it must be a positive integer. If it is not specified, the default\n * value is 2 (set by the browser).\n *\n * When `autoExpand` is true, this value serves the purpose of specifying the minimum number\n * of rows that the textarea will shrink to when the content is not large enough to make it\n * expand.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attr-rows\n */\n rows?: number\n\n /**\n * If `true`, the textarea will be automatically resized to fit the content, and the ability to\n * manually resize the textarea will be disabled.\n */\n autoExpand?: boolean\n\n /**\n * If `true`, the ability to manually resize the textarea will be disabled.\n *\n * When `autoExpand` is true, this property serves no purpose, because the ability to manually\n * resize the textarea is always disabled when `autoExpand` is true.\n */\n disableResize?: boolean\n}\n\nconst TextArea = React.forwardRef<HTMLTextAreaElement, TextAreaProps>(function TextArea(\n {\n variant = 'default',\n id,\n label,\n value,\n auxiliaryLabel,\n message,\n tone,\n maxWidth,\n maxLength,\n hidden,\n 'aria-describedby': ariaDescribedBy,\n rows,\n autoExpand = false,\n disableResize = false,\n onChange: originalOnChange,\n ...props\n },\n ref,\n) {\n const containerRef = React.useRef<HTMLDivElement>(null)\n const internalRef = React.useRef<HTMLTextAreaElement>(null)\n const combinedRef = useMergeRefs([ref, internalRef])\n\n useAutoExpand({ value, autoExpand, containerRef, internalRef })\n\n const textAreaClassName = classNames([\n autoExpand ? styles.disableResize : null,\n disableResize ? styles.disableResize : null,\n ])\n\n return (\n <BaseField\n variant={variant}\n id={id}\n label={label}\n value={value}\n auxiliaryLabel={auxiliaryLabel}\n message={message}\n tone={tone}\n hidden={hidden}\n aria-describedby={ariaDescribedBy}\n className={[\n styles.textAreaContainer,\n tone === 'error' ? styles.error : null,\n variant === 'bordered' ? styles.bordered : null,\n ]}\n maxWidth={maxWidth}\n maxLength={maxLength}\n >\n {({ onChange, ...extraProps }) => (\n <Box\n width=\"full\"\n display=\"flex\"\n className={styles.innerContainer}\n ref={containerRef}\n >\n <textarea\n {...props}\n {...extraProps}\n ref={combinedRef}\n rows={rows}\n className={textAreaClassName}\n maxLength={maxLength}\n onChange={(event) => {\n originalOnChange?.(event)\n onChange?.(event)\n }}\n />\n </Box>\n )}\n </BaseField>\n )\n})\n\nfunction useAutoExpand({\n value,\n autoExpand,\n containerRef,\n internalRef,\n}: {\n value: string | undefined\n autoExpand: boolean\n containerRef: React.RefObject<HTMLDivElement>\n internalRef: React.RefObject<HTMLTextAreaElement>\n}) {\n const isControlled = value !== undefined\n\n React.useEffect(\n function setupAutoExpandWhenUncontrolled() {\n const textAreaElement = internalRef.current\n if (!textAreaElement || !autoExpand || isControlled) {\n return undefined\n }\n\n const containerElement = containerRef.current\n\n function handleAutoExpand(value: string) {\n if (containerElement) {\n containerElement.dataset.replicatedValue = value\n }\n }\n\n function handleInput(event: Event) {\n handleAutoExpand((event.currentTarget as HTMLTextAreaElement).value)\n }\n\n // Apply change initially, in case the text area has a non-empty initial value\n handleAutoExpand(textAreaElement.value)\n textAreaElement.addEventListener('input', handleInput)\n return () => textAreaElement.removeEventListener('input', handleInput)\n },\n [autoExpand, containerRef, internalRef, isControlled],\n )\n\n React.useEffect(\n function setupAutoExpandWhenControlled() {\n if (!isControlled || !autoExpand) {\n return\n }\n\n const containerElement = containerRef.current\n if (containerElement) {\n containerElement.dataset.replicatedValue = value\n }\n },\n [value, containerRef, isControlled, autoExpand],\n )\n}\n\nexport { TextArea }\nexport type { TextAreaProps }\n"],"names":["React","forwardRef","ref","variant","id","label","value","auxiliaryLabel","message","tone","maxWidth","maxLength","hidden","aria-describedby","ariaDescribedBy","rows","autoExpand","disableResize","onChange","originalOnChange","_ref","props","_objectWithoutProperties","objectWithoutProperties","_excluded","containerRef","useRef","internalRef","combinedRef","useMergeRefs","isControlled","undefined","useEffect","textAreaElement","current","containerElement","handleAutoExpand","dataset","replicatedValue","handleInput","event","currentTarget","addEventListener","removeEventListener","useAutoExpand","textAreaClassName","classNames","styles","createElement","BaseField","className","textAreaContainer","error","bordered","_ref2","extraProps","_excluded2","Box","width","display","innerContainer","_objectSpread","objectSpread2"],"mappings":"y2BAkDiBA,EAAMC,YAA+C,SAmBlEC,EAAAA,GAAG,IAlBHC,QACIA,EAAU,UADdC,GAEIA,EAFJC,MAGIA,EAHJC,MAIIA,EAJJC,eAKIA,EALJC,QAMIA,EANJC,KAOIA,EAPJC,SAQIA,EARJC,UASIA,EATJC,OAUIA,EACAC,mBAAoBC,EAXxBC,KAYIA,EAZJC,WAaIA,GAAa,EAbjBC,cAcIA,GAAgB,EAChBC,SAAUC,GAGXC,EAFIC,EAEJC,EAAAC,wBAAAH,EAAAI,GAEH,MAAMC,EAAezB,EAAM0B,OAAuB,MAC5CC,EAAc3B,EAAM0B,OAA4B,MAChDE,EAAcC,EAAYA,aAAC,CAAC3B,EAAKyB,KAqD3C,UAAuBrB,MACnBA,EADmBU,WAEnBA,EAFmBS,aAGnBA,EAHmBE,YAInBA,IAOA,MAAMG,OAAyBC,IAAVzB,EAErBN,EAAMgC,WACF,WACI,MAAMC,EAAkBN,EAAYO,QACpC,IAAKD,IAAoBjB,GAAcc,EACnC,OAGJ,MAAMK,EAAmBV,EAAaS,QAEtC,SAASE,EAAiB9B,GAClB6B,IACAA,EAAiBE,QAAQC,gBAAkBhC,GAInD,SAASiC,EAAYC,GACjBJ,E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sources":["../../src/text-area/text-area.tsx"],"sourcesContent":[null],"names":["React","__rest","useMergeRefs","classNames","styles","BaseField","Box","__assign"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkDM,IAAA,QAAQ,GAAGA,gBAAK,CAAC,UAAU,CAAqC,SAAS,QAAQ,CACnF,EAiBC,EACD,GAAG,EAAA;AAjBC,IAAA,IAAA,EAAmB,GAAA,EAAA,CAAA,OAAA,EAAnB,OAAO,GAAA,EAAA,KAAA,KAAA,CAAA,GAAG,SAAS,GAAA,EAAA,EACnB,EAAE,GAAA,EAAA,CAAA,EAAA,EACF,KAAK,GAAA,EAAA,CAAA,KAAA,EACL,KAAK,GAAA,EAAA,CAAA,KAAA,EACL,cAAc,GAAA,EAAA,CAAA,cAAA,EACd,OAAO,GAAA,EAAA,CAAA,OAAA,EACP,IAAI,GAAA,EAAA,CAAA,IAAA,EACJ,QAAQ,GAAA,EAAA,CAAA,QAAA,EACR,SAAS,GAAA,EAAA,CAAA,SAAA,EACT,MAAM,GAAA,EAAA,CAAA,MAAA,EACc,eAAe,GAAA,EAAA,CAAA,kBAAA,CAAA,EACnC,IAAI,GAAA,EAAA,CAAA,IAAA,EACJ,EAAkB,GAAA,EAAA,CAAA,UAAA,EAAlB,UAAU,GAAA,EAAA,KAAA,KAAA,CAAA,GAAG,KAAK,GAAA,EAAA,EAClB,EAAA,GAAA,EAAA,CAAA,aAAqB,EAArB,aAAa,GAAG,EAAA,KAAA,KAAA,CAAA,GAAA,KAAK,GAAA,EAAA,EACX,gBAAgB,GAAA,EAAA,CAAA,QAAA,EACvB,KAAK,GAhBZC,YAAA,CAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,OAAA,EAAA,OAAA,EAAA,gBAAA,EAAA,SAAA,EAAA,MAAA,EAAA,UAAA,EAAA,WAAA,EAAA,QAAA,EAAA,kBAAA,EAAA,MAAA,EAAA,YAAA,EAAA,eAAA,EAAA,UAAA,CAiBC,CADW,CAA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,eAAe,GAAG,KAAK,CAAA;AACnD,aAAA;SACJ;QAED,SAAS,WAAW,CAAC,KAAY,EAAA;AAC7B,YAAA,gBAAgB,CAAE,KAAK,CAAC,aAAqC,CAAC,KAAK,CAAC,CAAA;SACvE;;AAGD,QAAA,gBAAgB,CAAC,eAAe,CAAC,KAAK,CAAC,CAAA;AACvC,QAAA,eAAe,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,CAAA;AACtD,QAAA,OAAO,YAAM,EAAA,OAAA,eAAe,CAAC,mBAAmB,CAAC,OAAO,EAAE,WAAW,CAAC,CAAzD,EAAyD,CAAA;KACzE,EACD,CAAC,UAAU,EAAE,YAAY,EAAE,WAAW,EAAE,YAAY,CAAC,CACxD,CAAA;AAED,IAAAA,gBAAK,CAAC,SAAS,CACX,SAAS,6BAA6B,GAAA;AAClC,QAAA,IAAI,CAAC,YAAY,IAAI,CAAC,UAAU,EAAE;YAC9B,OAAM;AACT,SAAA;AAED,QAAA,IAAM,gBAAgB,GAAG,YAAY,CAAC,OAAO,CAAA;AAC7C,QAAA,IAAI,gBAAgB,EAAE;AAClB,YAAA,gBAAgB,CAAC,OAAO,CAAC,eAAe,GAAG,KAAK,CAAA;AACnD,SAAA;KACJ,EACD,CAAC,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,UAAU,CAAC,CAClD,CAAA;AACL;;;;"}
@@ -1,2 +1,8 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default={textAreaContainer:"_1ae68da6",innerContainer:"_8eadb1df",bordered:"_35e7d1ba",error:"_8b028659",disableResize:"_30f6cf3c"};
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var modules_2728c236 = {"textAreaContainer":"_1ae68da6","innerContainer":"_8eadb1df","bordered":"_35e7d1ba","error":"_8b028659","disableResize":"_30f6cf3c"};
6
+
7
+ exports["default"] = modules_2728c236;
2
8
  //# sourceMappingURL=text-area.module.css.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"text-area.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
1
+ {"version":3,"file":"text-area.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -1 +1 @@
1
- export * from './text-field';
1
+ export * from './text-field';
@@ -1,18 +1,18 @@
1
- import * as React from 'react';
2
- import { BaseFieldVariantProps } from '../base-field';
3
- import type { BaseFieldProps, FieldComponentProps } from '../base-field';
4
- type TextFieldType = 'email' | 'search' | 'tel' | 'text' | 'url';
5
- interface TextFieldProps extends Omit<FieldComponentProps<HTMLInputElement>, 'type' | 'supportsStartAndEndSlots'>, BaseFieldVariantProps, Pick<BaseFieldProps, 'characterCountPosition'> {
6
- type?: TextFieldType;
7
- startSlot?: React.ReactElement | string | number;
8
- endSlot?: React.ReactElement | string | number;
9
- /**
10
- * The maximum number of characters that the input field can accept.
11
- * When this limit is reached, the input field will not accept any more characters.
12
- * The counter element will turn red when the number of characters is within 10 of the maximum limit.
13
- */
14
- maxLength?: number;
15
- }
16
- declare const TextField: React.ForwardRefExoticComponent<Omit<TextFieldProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
17
- export { TextField };
18
- export type { TextFieldProps, TextFieldType };
1
+ import * as React from 'react';
2
+ import { BaseFieldVariantProps } from '../base-field';
3
+ import type { BaseFieldProps, FieldComponentProps } from '../base-field';
4
+ type TextFieldType = 'email' | 'search' | 'tel' | 'text' | 'url';
5
+ interface TextFieldProps extends Omit<FieldComponentProps<HTMLInputElement>, 'type' | 'supportsStartAndEndSlots'>, BaseFieldVariantProps, Pick<BaseFieldProps, 'characterCountPosition'> {
6
+ type?: TextFieldType;
7
+ startSlot?: React.ReactElement | string | number;
8
+ endSlot?: React.ReactElement | string | number;
9
+ /**
10
+ * The maximum number of characters that the input field can accept.
11
+ * When this limit is reached, the input field will not accept any more characters.
12
+ * The counter element will turn red when the number of characters is within 10 of the maximum limit.
13
+ */
14
+ maxLength?: number;
15
+ }
16
+ declare const TextField: React.ForwardRefExoticComponent<Omit<TextFieldProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
17
+ export { TextField };
18
+ export type { TextFieldProps, TextFieldType };
@@ -1,2 +1,64 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../_virtual/_rollupPluginBabelHelpers.js"),t=require("react"),r=require("../base-field/base-field.js"),a=require("../box/box.js"),l=require("./text-field.module.css.js"),n=require("use-callback-ref");function o(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var a=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,a.get?a:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,t}var i=o(t);const d=["variant","id","label","value","auxiliaryLabel","message","tone","type","maxWidth","maxLength","hidden","aria-describedby","startSlot","endSlot","onChange","characterCountPosition","endSlotPosition"],u=["onChange","characterCountElement"];exports.TextField=i.forwardRef((function(t,o){let{variant:s="default",id:c,label:b,value:m,auxiliaryLabel:f,message:x,tone:g,type:h="text",maxWidth:p,maxLength:y,hidden:j,"aria-describedby":v,startSlot:S,endSlot:P,onChange:C,characterCountPosition:E="below",endSlotPosition:L="bottom"}=t,O=e.objectWithoutProperties(t,d);const q=i.useRef(null),W=n.useMergeRefs([o,q]);function _(e){var t;e.currentTarget!==W.current&&(null==(t=q.current)||t.focus())}const B=P&&("default"===s||"bordered"===s&&"bottom"===L);return i.createElement(r.BaseField,{variant:s,id:c,label:b,value:m,auxiliaryLabel:f,message:x,tone:g,maxWidth:p,maxLength:y,hidden:j,"aria-describedby":v,characterCountPosition:E,supportsStartAndEndSlots:!0,endSlot:P,endSlotPosition:"bordered"===s?L:void 0},t=>{let{onChange:r,characterCountElement:n}=t,o=e.objectWithoutProperties(t,u);return i.createElement(a.Box,{display:"flex",alignItems:"center",className:[l.default.inputWrapper,"error"===g?l.default.error:null,"bordered"===s?l.default.bordered:null,O.readOnly?l.default.readOnly:null],onClick:_},S?i.createElement(a.Box,{className:l.default.slot,display:"flex",marginRight:"bordered"===s?"xsmall":"-xsmall",marginLeft:"bordered"===s?"-xsmall":"xsmall"},S):null,i.createElement("input",e.objectSpread2(e.objectSpread2(e.objectSpread2({},O),o),{},{type:h,ref:W,maxLength:y,onChange:e=>{null==C||C(e),null==r||r(e)}})),B||n?i.createElement(a.Box,{className:l.default.slot,display:"flex",marginRight:"bordered"===s?"-xsmall":"xsmall",marginLeft:"bordered"===s?"xsmall":"-xsmall"},n,B?P:null):null)})}));
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var tslib = require('tslib');
6
+ var React = require('react');
7
+ var baseField = require('../base-field/base-field.js');
8
+ var box = require('../box/box.js');
9
+ var textField_module = require('./text-field.module.css.js');
10
+ var useCallbackRef = require('use-callback-ref');
11
+
12
+ function _interopNamespace(e) {
13
+ if (e && e.__esModule) return e;
14
+ var n = Object.create(null);
15
+ if (e) {
16
+ Object.keys(e).forEach(function (k) {
17
+ if (k !== 'default') {
18
+ var d = Object.getOwnPropertyDescriptor(e, k);
19
+ Object.defineProperty(n, k, d.get ? d : {
20
+ enumerable: true,
21
+ get: function () { return e[k]; }
22
+ });
23
+ }
24
+ });
25
+ }
26
+ n["default"] = e;
27
+ return Object.freeze(n);
28
+ }
29
+
30
+ var React__namespace = /*#__PURE__*/_interopNamespace(React);
31
+
32
+ var TextField = React__namespace.forwardRef(function TextField(_a, ref) {
33
+ var _b = _a.variant, variant = _b === void 0 ? 'default' : _b, id = _a.id, label = _a.label, value = _a.value, auxiliaryLabel = _a.auxiliaryLabel, message = _a.message, tone = _a.tone, _c = _a.type, type = _c === void 0 ? 'text' : _c, maxWidth = _a.maxWidth, maxLength = _a.maxLength, hidden = _a.hidden, ariaDescribedBy = _a["aria-describedby"], startSlot = _a.startSlot, endSlot = _a.endSlot, originalOnChange = _a.onChange, _d = _a.characterCountPosition, characterCountPosition = _d === void 0 ? 'below' : _d, _e = _a.endSlotPosition, endSlotPosition = _e === void 0 ? 'bottom' : _e, props = tslib.__rest(_a, ["variant", "id", "label", "value", "auxiliaryLabel", "message", "tone", "type", "maxWidth", "maxLength", "hidden", 'aria-describedby', "startSlot", "endSlot", "onChange", "characterCountPosition", "endSlotPosition"]);
34
+ var internalRef = React__namespace.useRef(null);
35
+ var combinedRef = useCallbackRef.useMergeRefs([ref, internalRef]);
36
+ function handleClick(event) {
37
+ var _a;
38
+ if (event.currentTarget === combinedRef.current)
39
+ return;
40
+ (_a = internalRef.current) === null || _a === void 0 ? void 0 : _a.focus();
41
+ }
42
+ var displayEndSlot = endSlot &&
43
+ (variant === 'default' || (variant === 'bordered' && endSlotPosition === 'bottom'));
44
+ return (React__namespace.createElement(baseField.BaseField, { variant: variant, id: id, label: label, value: value, auxiliaryLabel: auxiliaryLabel, message: message, tone: tone, maxWidth: maxWidth, maxLength: maxLength, hidden: hidden, "aria-describedby": ariaDescribedBy, characterCountPosition: characterCountPosition, supportsStartAndEndSlots: true, endSlot: endSlot, endSlotPosition: variant === 'bordered' ? endSlotPosition : undefined }, function (_a) {
45
+ var onChange = _a.onChange, characterCountElement = _a.characterCountElement, extraProps = tslib.__rest(_a, ["onChange", "characterCountElement"]);
46
+ return (React__namespace.createElement(box.Box, { display: "flex", alignItems: "center", className: [
47
+ textField_module["default"].inputWrapper,
48
+ tone === 'error' ? textField_module["default"].error : null,
49
+ variant === 'bordered' ? textField_module["default"].bordered : null,
50
+ props.readOnly ? textField_module["default"].readOnly : null,
51
+ ], onClick: handleClick },
52
+ startSlot ? (React__namespace.createElement(box.Box, { className: textField_module["default"].slot, display: "flex", marginRight: variant === 'bordered' ? 'xsmall' : '-xsmall', marginLeft: variant === 'bordered' ? '-xsmall' : 'xsmall' }, startSlot)) : null,
53
+ React__namespace.createElement("input", tslib.__assign({}, props, extraProps, { type: type, ref: combinedRef, maxLength: maxLength, onChange: function (event) {
54
+ originalOnChange === null || originalOnChange === void 0 ? void 0 : originalOnChange(event);
55
+ onChange === null || onChange === void 0 ? void 0 : onChange(event);
56
+ } })),
57
+ displayEndSlot || characterCountElement ? (React__namespace.createElement(box.Box, { className: textField_module["default"].slot, display: "flex", marginRight: variant === 'bordered' ? '-xsmall' : 'xsmall', marginLeft: variant === 'bordered' ? 'xsmall' : '-xsmall' },
58
+ characterCountElement,
59
+ displayEndSlot ? endSlot : null)) : null));
60
+ }));
61
+ });
62
+
63
+ exports.TextField = TextField;
2
64
  //# sourceMappingURL=text-field.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"text-field.js","sources":["../../src/text-field/text-field.tsx"],"sourcesContent":["import * as React from 'react'\nimport { BaseField, BaseFieldVariantProps } from '../base-field'\nimport { Box } from '../box'\nimport styles from './text-field.module.css'\nimport type { BaseFieldProps, FieldComponentProps } from '../base-field'\nimport { useMergeRefs } from 'use-callback-ref'\n\ntype TextFieldType = 'email' | 'search' | 'tel' | 'text' | 'url'\n\ninterface TextFieldProps\n extends Omit<FieldComponentProps<HTMLInputElement>, 'type' | 'supportsStartAndEndSlots'>,\n BaseFieldVariantProps,\n Pick<BaseFieldProps, 'characterCountPosition'> {\n type?: TextFieldType\n startSlot?: React.ReactElement | string | number\n endSlot?: React.ReactElement | string | number\n /**\n * The maximum number of characters that the input field can accept.\n * When this limit is reached, the input field will not accept any more characters.\n * The counter element will turn red when the number of characters is within 10 of the maximum limit.\n */\n maxLength?: number\n}\n\nconst TextField = React.forwardRef<HTMLInputElement, TextFieldProps>(function TextField(\n {\n variant = 'default',\n id,\n label,\n value,\n auxiliaryLabel,\n message,\n tone,\n type = 'text',\n maxWidth,\n maxLength,\n hidden,\n 'aria-describedby': ariaDescribedBy,\n startSlot,\n endSlot,\n onChange: originalOnChange,\n characterCountPosition = 'below',\n endSlotPosition = 'bottom',\n ...props\n },\n ref,\n) {\n const internalRef = React.useRef<HTMLInputElement>(null)\n const combinedRef = useMergeRefs([ref, internalRef])\n\n function handleClick(event: React.MouseEvent) {\n if (event.currentTarget === combinedRef.current) return\n internalRef.current?.focus()\n }\n\n const displayEndSlot =\n endSlot &&\n (variant === 'default' || (variant === 'bordered' && endSlotPosition === 'bottom'))\n\n return (\n <BaseField\n variant={variant}\n id={id}\n label={label}\n value={value}\n auxiliaryLabel={auxiliaryLabel}\n message={message}\n tone={tone}\n maxWidth={maxWidth}\n maxLength={maxLength}\n hidden={hidden}\n aria-describedby={ariaDescribedBy}\n characterCountPosition={characterCountPosition}\n supportsStartAndEndSlots\n endSlot={endSlot}\n endSlotPosition={variant === 'bordered' ? endSlotPosition : undefined}\n >\n {({ onChange, characterCountElement, ...extraProps }) => (\n <Box\n display=\"flex\"\n alignItems=\"center\"\n className={[\n styles.inputWrapper,\n tone === 'error' ? styles.error : null,\n variant === 'bordered' ? styles.bordered : null,\n props.readOnly ? styles.readOnly : null,\n ]}\n onClick={handleClick}\n >\n {startSlot ? (\n <Box\n className={styles.slot}\n display=\"flex\"\n marginRight={variant === 'bordered' ? 'xsmall' : '-xsmall'}\n marginLeft={variant === 'bordered' ? '-xsmall' : 'xsmall'}\n >\n {startSlot}\n </Box>\n ) : null}\n <input\n {...props}\n {...extraProps}\n type={type}\n ref={combinedRef}\n maxLength={maxLength}\n onChange={(event) => {\n originalOnChange?.(event)\n onChange?.(event)\n }}\n />\n {displayEndSlot || characterCountElement ? (\n <Box\n className={styles.slot}\n display=\"flex\"\n marginRight={variant === 'bordered' ? '-xsmall' : 'xsmall'}\n marginLeft={variant === 'bordered' ? 'xsmall' : '-xsmall'}\n >\n {characterCountElement}\n {displayEndSlot ? endSlot : null}\n </Box>\n ) : null}\n </Box>\n )}\n </BaseField>\n )\n})\n\nexport { TextField }\nexport type { TextFieldProps, TextFieldType }\n"],"names":["React","forwardRef","ref","variant","id","label","value","auxiliaryLabel","message","tone","type","maxWidth","maxLength","hidden","aria-describedby","ariaDescribedBy","startSlot","endSlot","onChange","originalOnChange","characterCountPosition","endSlotPosition","_ref","props","_objectWithoutProperties","objectWithoutProperties","_excluded","internalRef","useRef","combinedRef","useMergeRefs","handleClick","event","_internalRef$current","currentTarget","current","focus","displayEndSlot","BaseField","supportsStartAndEndSlots","undefined","_ref2","characterCountElement","extraProps","_excluded2","createElement","Box","display","alignItems","className","styles","inputWrapper","error","bordered","readOnly","onClick","slot","marginRight","marginLeft"],"mappings":"g0BAwBkBA,EAAMC,YAA6C,SAqBjEC,EAAAA,GAAG,IApBHC,QACIA,EAAU,UADdC,GAEIA,EAFJC,MAGIA,EAHJC,MAIIA,EAJJC,eAKIA,EALJC,QAMIA,EANJC,KAOIA,EAPJC,KAQIA,EAAO,OARXC,SASIA,EATJC,UAUIA,EAVJC,OAWIA,EACAC,mBAAoBC,EAZxBC,UAaIA,EAbJC,QAcIA,EACAC,SAAUC,EAfdC,uBAgBIA,EAAyB,QAhB7BC,gBAiBIA,EAAkB,UAGnBC,EAFIC,EAEJC,EAAAC,wBAAAH,EAAAI,GAEH,MAAMC,EAAc3B,EAAM4B,OAAyB,MAC7CC,EAAcC,EAAYA,aAAC,CAAC5B,EAAKyB,IAEvC,SAASI,EAAYC,GAAuB,IAAAC,EACpCD,EAAME,gBAAkBL,EAAYM,UACxC,OAAAF,EAAAN,EAAYQ,UAAZF,EAAqBG,SAGzB,MAAMC,EACFpB,IACa,YAAZd,GAAsC,aAAZA,GAA8C,WAApBkB,GAEzD,OACIrB,gBAACsC,YAAS,CACNnC,QAASA,EACTC,GAAIA,EACJC,MAAOA,EACPC,MAAOA,EACPC,eAAgBA,EAChBC,QAASA,EACTC,KAAMA,EACNE,SAAUA,EACVC,UAAWA,EACXC,OAAQA,EACUC,mBAAAC,EAClBK,uBAAwBA,EACxBmB,0BACA,EAAAtB,QAASA,EACTI,gBAA6B,aAAZlB,EAAyBkB,OAAkBmB,GAE3DC,IAAA,IAACvB,SAAEA,EAAFwB,sBAAYA,GAAbD,EAAuCE,EAAvCnB,EAAAC,wBAAAgB,EAAAG,GAAA,OACG5C,EAAA6C,cAACC,MACG,CAAAC,QAAQ,OACRC,WAAW,SACXC,UAAW,CACPC,EAAM,QAACC,aACE,UAAT1C,EAAmByC,EAAM,QAACE,MAAQ,KACtB,aAAZjD,EAAyB+C,EAAM,QAACG,SAAW,KAC3C9B,EAAM+B,SAAWJ,EAAM,QAACI,SAAW,MAEvCC,QAASxB,GAERf,EACGhB,gBAAC8C,MAAG,CACAG,UAAWC,EAAM,QAACM,KAClBT,QAAQ,OACRU,YAAyB,aAAZtD,EAAyB,SAAW,UACjDuD,WAAwB,aAAZvD,EAAyB,UAAY,UAEhDa,GAEL,KACJhB,EACQ6C,cAAA,QAAAtB,EAAAA,cAAAA,EAAAA,cAAAA,EAAAA,cAAAA,GAAAA,GACAoB,GAFR,GAAA,CAGIjC,KAAMA,EACNR,IAAK2B,EACLjB,UAAWA,EACXM,SAAWc,IACP,MAAAb,GAAAA,EAAmBa,GACnB,MAAAd,GAAAA,EAAWc,OAGlBK,GAAkBK,EACf1C,EAAA6C,cAACC,EAAAA,IACG,CAAAG,UAAWC,EAAM,QAACM,KAClBT,QAAQ,OACRU,YAAyB,aAAZtD,EAAyB,UAAY,SAClDuD,WAAwB,aAAZvD,EAAyB,SAAW,WAE/CuC,EACAL,EAAiBpB,EAAU,MAEhC"}
1
+ {"version":3,"file":"text-field.js","sources":["../../src/text-field/text-field.tsx"],"sourcesContent":[null],"names":["React","__rest","useMergeRefs","BaseField","Box","styles","__assign"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBM,IAAA,SAAS,GAAGA,gBAAK,CAAC,UAAU,CAAmC,SAAS,SAAS,CACnF,EAmBC,EACD,GAAG,EAAA;AAnBC,IAAA,IAAA,EAAmB,GAAA,EAAA,CAAA,OAAA,EAAnB,OAAO,GAAA,EAAA,KAAA,KAAA,CAAA,GAAG,SAAS,GAAA,EAAA,EACnB,EAAE,GAAA,EAAA,CAAA,EAAA,EACF,KAAK,GAAA,EAAA,CAAA,KAAA,EACL,KAAK,GAAA,EAAA,CAAA,KAAA,EACL,cAAc,GAAA,EAAA,CAAA,cAAA,EACd,OAAO,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Q,EAExD,EAAA,SAAS,CACR,IACN,IAAI;AACR,YAAAL,gBAAA,CAAA,aAAA,CAAA,OAAA,EAAAM,cAAA,CAAA,EAAA,EACQ,KAAK,EACL,UAAU,IACd,IAAI,EAAE,IAAI,EACV,GAAG,EAAE,WAAW,EAChB,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAE,UAAC,KAAK,EAAA;AACZ,oBAAA,gBAAgB,aAAhB,gBAAgB,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAhB,gBAAgB,CAAG,KAAK,CAAC,CAAA;AACzB,oBAAA,QAAQ,aAAR,QAAQ,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAR,QAAQ,CAAG,KAAK,CAAC,CAAA;AACrB,iBAAC,EACH,CAAA,CAAA;YACD,cAAc,IAAI,qBAAqB,IACpCN,gBAAA,CAAA,aAAA,CAACI,OAAG,EACA,EAAA,SAAS,EAAEC,2BAAM,CAAC,IAAI,EACtB,OAAO,EAAC,MAAM,EACd,WAAW,EAAE,OAAO,KAAK,UAAU,GAAG,SAAS,GAAG,QAAQ,EAC1D,UAAU,EAAE,OAAO,KAAK,UAAU,GAAG,QAAQ,GAAG,SAAS,EAAA;gBAExD,qBAAqB;AACrB,gBAAA,cAAc,GAAG,OAAO,GAAG,IAAI,CAC9B,IACN,IAAI,CACN,EACT;AAAA,KAAA,CACO,EACf;AACL,CAAC;;;;"}
@@ -1,2 +1,8 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default={inputWrapper:"_3aa2a591",readOnly:"_88dd4657",bordered:"f9ddac83",error:"_7b4ae67d",slot:"_92010b01"};
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var modules_aaf25250 = {"inputWrapper":"_3aa2a591","readOnly":"_88dd4657","bordered":"f9ddac83","error":"_7b4ae67d","slot":"_92010b01"};
6
+
7
+ exports["default"] = modules_aaf25250;
2
8
  //# sourceMappingURL=text-field.module.css.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"text-field.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
1
+ {"version":3,"file":"text-field.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -1 +1 @@
1
- export * from './text-link';
1
+ export * from './text-link';
@@ -1,9 +1,9 @@
1
- import type { OpenInNewTab } from '../utils/common-types';
2
- type TextLinkColors = 'default' | 'inherit';
3
- type TextLinkProps = OpenInNewTab & {
4
- color?: TextLinkColors;
5
- underline?: boolean;
6
- };
7
- declare const TextLink: import("../utils/polymorphism").PolymorphicComponent<"a", TextLinkProps, "obfuscateClassName">;
8
- export { TextLink };
9
- export type { TextLinkProps };
1
+ import type { OpenInNewTab } from '../utils/common-types';
2
+ type TextLinkColors = 'default' | 'inherit';
3
+ type TextLinkProps = OpenInNewTab & {
4
+ color?: TextLinkColors;
5
+ underline?: boolean;
6
+ };
7
+ declare const TextLink: import("../utils/polymorphism").PolymorphicComponent<"a", TextLinkProps, "obfuscateClassName">;
8
+ export { TextLink };
9
+ export type { TextLinkProps };
@@ -1,2 +1,42 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../_virtual/_rollupPluginBabelHelpers.js"),r=require("react"),t=require("../box/box.js"),n=require("../utils/polymorphism.js"),o=require("./text-link.module.css.js");function l(e){if(e&&e.__esModule)return e;var r=Object.create(null);return e&&Object.keys(e).forEach((function(t){if("default"!==t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})}})),r.default=e,r}var a=l(r);const i=["as","openInNewTab","exceptionallySetClassName","color","underline"];exports.TextLink=n.polymorphicComponent((function(r,n){let{as:l="a",openInNewTab:u=!1,exceptionallySetClassName:s,color:c="default",underline:p=!0}=r,d=e.objectWithoutProperties(r,i);return a.createElement(t.Box,e.objectSpread2(e.objectSpread2({},d),{},{as:l,display:"inline",className:[s,o.default.container,o.default[c],p?o.default.underline:o.default["no-underline"]],ref:n,target:u?"_blank":void 0,rel:u?"noopener noreferrer":void 0}))}));
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var tslib = require('tslib');
6
+ var React = require('react');
7
+ var box = require('../box/box.js');
8
+ var polymorphism = require('../utils/polymorphism.js');
9
+ var textLink_module = require('./text-link.module.css.js');
10
+
11
+ function _interopNamespace(e) {
12
+ if (e && e.__esModule) return e;
13
+ var n = Object.create(null);
14
+ if (e) {
15
+ Object.keys(e).forEach(function (k) {
16
+ if (k !== 'default') {
17
+ var d = Object.getOwnPropertyDescriptor(e, k);
18
+ Object.defineProperty(n, k, d.get ? d : {
19
+ enumerable: true,
20
+ get: function () { return e[k]; }
21
+ });
22
+ }
23
+ });
24
+ }
25
+ n["default"] = e;
26
+ return Object.freeze(n);
27
+ }
28
+
29
+ var React__namespace = /*#__PURE__*/_interopNamespace(React);
30
+
31
+ var TextLink = polymorphism.polymorphicComponent(function TextLink(_a, ref) {
32
+ var _b = _a.as, as = _b === void 0 ? 'a' : _b, _c = _a.openInNewTab, openInNewTab = _c === void 0 ? false : _c, exceptionallySetClassName = _a.exceptionallySetClassName, _d = _a.color, color = _d === void 0 ? 'default' : _d, _e = _a.underline, underline = _e === void 0 ? true : _e, props = tslib.__rest(_a, ["as", "openInNewTab", "exceptionallySetClassName", "color", "underline"]);
33
+ return (React__namespace.createElement(box.Box, tslib.__assign({}, props, { as: as, display: "inline", className: [
34
+ exceptionallySetClassName,
35
+ textLink_module["default"].container,
36
+ textLink_module["default"][color],
37
+ underline ? textLink_module["default"].underline : textLink_module["default"]['no-underline'],
38
+ ], ref: ref, target: openInNewTab ? '_blank' : undefined, rel: openInNewTab ? 'noopener noreferrer' : undefined })));
39
+ });
40
+
41
+ exports.TextLink = TextLink;
2
42
  //# sourceMappingURL=text-link.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"text-link.js","sources":["../../src/text-link/text-link.tsx"],"sourcesContent":["import * as React from 'react'\nimport { Box } from '../box'\nimport { polymorphicComponent } from '../utils/polymorphism'\nimport styles from './text-link.module.css'\nimport type { OpenInNewTab } from '../utils/common-types'\n\ntype TextLinkColors = 'default' | 'inherit'\n\ntype TextLinkProps = OpenInNewTab & {\n color?: TextLinkColors\n underline?: boolean\n}\n\nconst TextLink = polymorphicComponent<'a', TextLinkProps>(function TextLink(\n {\n as = 'a',\n openInNewTab = false,\n exceptionallySetClassName,\n color = 'default',\n underline = true,\n ...props\n },\n ref,\n) {\n return (\n <Box\n {...props}\n as={as}\n display=\"inline\"\n className={[\n exceptionallySetClassName,\n styles.container,\n styles[color],\n underline ? styles.underline : styles['no-underline'],\n ]}\n ref={ref}\n target={openInNewTab ? '_blank' : undefined}\n rel={openInNewTab ? 'noopener noreferrer' : undefined}\n />\n )\n})\n\nexport { TextLink }\nexport type { TextLinkProps }\n"],"names":["polymorphicComponent","_ref","ref","as","openInNewTab","exceptionallySetClassName","color","underline","props","_objectWithoutProperties","objectWithoutProperties","_excluded","React","createElement","Box","display","className","styles","container","target","undefined","rel"],"mappings":"mnBAaiBA,EAAAA,sBAAyC,SAAAC,EAStDC,GAAG,IARHC,GACIA,EAAK,IADTC,aAEIA,GAAe,EAFnBC,0BAGIA,EAHJC,MAIIA,EAAQ,UAJZC,UAKIA,GAAY,GAGbN,EAFIO,EAEJC,EAAAC,wBAAAT,EAAAU,GAEH,OACIC,EAAAC,cAACC,yCACON,GADR,GAAA,CAEIL,GAAIA,EACJY,QAAQ,SACRC,UAAW,CACPX,EACAY,UAAOC,UACPD,EAAAA,QAAOX,GACPC,EAAYU,EAAAA,QAAOV,UAAYU,EAAM,QAAC,iBAE1Cf,IAAKA,EACLiB,OAAQf,EAAe,cAAWgB,EAClCC,IAAKjB,EAAe,2BAAwBgB"}
1
+ {"version":3,"file":"text-link.js","sources":["../../src/text-link/text-link.tsx"],"sourcesContent":[null],"names":["polymorphicComponent","__rest","React","Box","__assign","styles"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAaM,IAAA,QAAQ,GAAGA,iCAAoB,CAAqB,SAAS,QAAQ,CACvE,EAOC,EACD,GAAG,EAAA;AAPC,IAAA,IAAA,EAAQ,GAAA,EAAA,CAAA,EAAA,EAAR,EAAE,GAAA,EAAA,KAAA,KAAA,CAAA,GAAG,GAAG,GAAA,EAAA,EACR,EAAoB,GAAA,EAAA,CAAA,YAAA,EAApB,YAAY,GAAG,EAAA,KAAA,KAAA,CAAA,GAAA,KAAK,GAAA,EAAA,EACpB,yBAAyB,GAAA,EAAA,CAAA,yBAAA,EACzB,EAAiB,GAAA,EAAA,CAAA,KAAA,EAAjB,KAAK,GAAA,EAAA,KAAA,KAAA,CAAA,GAAG,SAAS,GAAA,EAAA,EACjB,EAAgB,GAAA,EAAA,CAAA,SAAA,EAAhB,SAAS,GAAA,EAAA,KAAA,KAAA,CAAA,GAAG,IAAI,GAAA,EAAA,EACb,KAAK,GAAAC,YAAA,CAAA,EAAA,EANZ,yEAOC,CADW,CAAA;AAIZ,IAAA,QACIC,gBAAA,CAAA,aAAA,CAACC,OAAG,EAAAC,cAAA,CAAA,EAAA,EACI,KAAK,EACT,EAAA,EAAE,EAAE,EAAE,EACN,OAAO,EAAC,QAAQ,EAChB,SAAS,EAAE;YACP,yBAAyB;AACzB,YAAAC,0BAAM,CAAC,SAAS;YAChBA,0BAAM,CAAC,KAAK,CAAC;AACb,YAAA,SAAS,GAAGA,0BAAM,CAAC,SAAS,GAAGA,0BAAM,CAAC,cAAc,CAAC;AACxD,SAAA,EACD,GAAG,EAAE,GAAG,EACR,MAAM,EAAE,YAAY,GAAG,QAAQ,GAAG,SAAS,EAC3C,GAAG,EAAE,YAAY,GAAG,qBAAqB,GAAG,SAAS,EAAA,CAAA,CACvD,EACL;AACL,CAAC;;;;"}
@@ -1,2 +1,8 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default={container:"d77fcdc6",default:"_468ce45c",inherit:"_54f92a1e",underline:"cdc8b08c","no-underline":"_06995bac"};
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var modules_3d05deee = {"default":"_468ce45c","inherit":"_54f92a1e","underline":"cdc8b08c","no-underline":"_06995bac","container":"d77fcdc6"};
6
+
7
+ exports["default"] = modules_3d05deee;
2
8
  //# sourceMappingURL=text-link.module.css.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"text-link.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
1
+ {"version":3,"file":"text-link.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -1,4 +1,4 @@
1
- export { StaticToast } from './static-toast';
2
- export { Toast, ToastsProvider, useToasts } from './use-toasts';
3
- export type { StaticToastProps } from './static-toast';
4
- export type { ToastProps, ToastsProviderProps } from './use-toasts';
1
+ export { StaticToast } from './static-toast';
2
+ export { Toast, ToastsProvider, useToasts } from './use-toasts';
3
+ export type { StaticToastProps } from './static-toast';
4
+ export type { ToastProps, ToastsProviderProps } from './use-toasts';
@@ -1,63 +1,63 @@
1
- import React from 'react';
2
- type ToastActionObject = {
3
- label: string;
4
- onClick: () => void;
5
- closeToast?: boolean;
6
- };
7
- type StaticToastProps = {
8
- /**
9
- * The message shown in the toast.
10
- */
11
- message: NonNullable<React.ReactNode>;
12
- /**
13
- * An optional extra description that complements the main message shown in the toast.
14
- */
15
- description?: React.ReactNode;
16
- /**
17
- * An icon to be shown in front of the message.
18
- */
19
- icon?: React.ReactNode;
20
- /**
21
- * The action to call when the user clicks on the dismiss button. If omitted, the dismiss button
22
- * does not appear.
23
- */
24
- onDismiss?: () => void;
25
- /**
26
- * The label for the button that dismisses the toast.
27
- */
28
- dismissLabel?: string;
29
- /**
30
- * What to render in the action slot. Usually a button or link.
31
- *
32
- * You can also pass an object that containst the action label, and a function that performs the
33
- * action. This is used by the toast component to render a button for you.
34
- *
35
- * In general, you should prefer the action object most of the time. But it is possible to pass
36
- * a React element instead, if you need more control over what to render. For instance, you may
37
- * want to render a link instead of a button.
38
- *
39
- * Keep in mind, though, that the default button rendered uses `variant="tertiary"` and
40
- * `size="small"`. In most cases you should stick to the variants `tertiary` or `primary`, which
41
- * are the ones that look better in the toast's dark background. And in all cases you should use
42
- * size `small`.
43
- */
44
- action?: React.ReactElement | ToastActionObject;
45
- };
46
- /**
47
- * A toast that shows a message, and an optional action associated with it.
48
- *
49
- * This component is generally not meant to be used directly. Most of the time you'll want to use
50
- * toasts generated via `useToasts` instead. However, this component is available in case you need
51
- * to take control of rendering a toast under different circumstances than that of notification-like
52
- * floating toasts.
53
- *
54
- * This component makes no assumptions outwardly about how it is positioned on the screen. That is,
55
- * it will not be shown floating or fixed to the viewport edges, as toasts normally show up. It only
56
- * provides the toast look and feel, but you are responsible for positioning it as you want.
57
- *
58
- * @see useToasts
59
- */
60
- declare const StaticToast: React.ForwardRefExoticComponent<StaticToastProps & React.RefAttributes<HTMLDivElement>>;
61
- declare function isActionObject(action: StaticToastProps['action']): action is ToastActionObject;
62
- export { StaticToast, isActionObject };
63
- export type { StaticToastProps };
1
+ import React from 'react';
2
+ type ToastActionObject = {
3
+ label: string;
4
+ onClick: () => void;
5
+ closeToast?: boolean;
6
+ };
7
+ type StaticToastProps = {
8
+ /**
9
+ * The message shown in the toast.
10
+ */
11
+ message: NonNullable<React.ReactNode>;
12
+ /**
13
+ * An optional extra description that complements the main message shown in the toast.
14
+ */
15
+ description?: React.ReactNode;
16
+ /**
17
+ * An icon to be shown in front of the message.
18
+ */
19
+ icon?: React.ReactNode;
20
+ /**
21
+ * The action to call when the user clicks on the dismiss button. If omitted, the dismiss button
22
+ * does not appear.
23
+ */
24
+ onDismiss?: () => void;
25
+ /**
26
+ * The label for the button that dismisses the toast.
27
+ */
28
+ dismissLabel?: string;
29
+ /**
30
+ * What to render in the action slot. Usually a button or link.
31
+ *
32
+ * You can also pass an object that containst the action label, and a function that performs the
33
+ * action. This is used by the toast component to render a button for you.
34
+ *
35
+ * In general, you should prefer the action object most of the time. But it is possible to pass
36
+ * a React element instead, if you need more control over what to render. For instance, you may
37
+ * want to render a link instead of a button.
38
+ *
39
+ * Keep in mind, though, that the default button rendered uses `variant="tertiary"` and
40
+ * `size="small"`. In most cases you should stick to the variants `tertiary` or `primary`, which
41
+ * are the ones that look better in the toast's dark background. And in all cases you should use
42
+ * size `small`.
43
+ */
44
+ action?: React.ReactElement | ToastActionObject;
45
+ };
46
+ /**
47
+ * A toast that shows a message, and an optional action associated with it.
48
+ *
49
+ * This component is generally not meant to be used directly. Most of the time you'll want to use
50
+ * toasts generated via `useToasts` instead. However, this component is available in case you need
51
+ * to take control of rendering a toast under different circumstances than that of notification-like
52
+ * floating toasts.
53
+ *
54
+ * This component makes no assumptions outwardly about how it is positioned on the screen. That is,
55
+ * it will not be shown floating or fixed to the viewport edges, as toasts normally show up. It only
56
+ * provides the toast look and feel, but you are responsible for positioning it as you want.
57
+ *
58
+ * @see useToasts
59
+ */
60
+ declare const StaticToast: React.ForwardRefExoticComponent<StaticToastProps & React.RefAttributes<HTMLDivElement>>;
61
+ declare function isActionObject(action: StaticToastProps['action']): action is ToastActionObject;
62
+ export { StaticToast, isActionObject };
63
+ export type { StaticToastProps };