@ntbjs/react-components 2.0.14 → 3.0.0-rc.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 (343) hide show
  1. package/build/data/Alert/Alert.js +18 -33
  2. package/build/data/Alert/Alert.js.map +1 -1
  3. package/build/data/Alert/Alert.styled.js +9 -47
  4. package/build/data/Alert/Alert.styled.js.map +1 -1
  5. package/build/data/Badge/Badge.js +36 -61
  6. package/build/data/Badge/Badge.js.map +1 -1
  7. package/build/data/Badge/Badge.styled.js +21 -70
  8. package/build/data/Badge/Badge.styled.js.map +1 -1
  9. package/build/data/Popover/Popover.js +125 -71
  10. package/build/data/Popover/Popover.js.map +1 -1
  11. package/build/data/Popover/Popover.styled.js +10 -140
  12. package/build/data/Popover/Popover.styled.js.map +1 -1
  13. package/build/data/SeverityBadge/SeverityBadge.js +13 -22
  14. package/build/data/SeverityBadge/SeverityBadge.js.map +1 -1
  15. package/build/data/SeverityBadge/index.js +2 -0
  16. package/build/data/SeverityBadge/index.js.map +1 -0
  17. package/build/data/Tab/Tab.js +7 -13
  18. package/build/data/Tab/Tab.js.map +1 -1
  19. package/build/data/Tab/Tab.styled.js +4 -7
  20. package/build/data/Tab/Tab.styled.js.map +1 -1
  21. package/build/data/Tabs/Tabs.js +30 -32
  22. package/build/data/Tabs/Tabs.js.map +1 -1
  23. package/build/data/Tabs/Tabs.styled.js +21 -57
  24. package/build/data/Tabs/Tabs.styled.js.map +1 -1
  25. package/build/data/Tooltip/Tooltip.js +102 -33
  26. package/build/data/Tooltip/Tooltip.js.map +1 -1
  27. package/build/data/Tooltip/Tooltip.styled.js +9 -22
  28. package/build/data/Tooltip/Tooltip.styled.js.map +1 -1
  29. package/build/data/VerificationStatusIcon/VerificationStatusIcon.js +16 -23
  30. package/build/data/VerificationStatusIcon/VerificationStatusIcon.js.map +1 -1
  31. package/build/data/VerificationStatusIcon/VerificationStatusIcon.styled.js +13 -31
  32. package/build/data/VerificationStatusIcon/VerificationStatusIcon.styled.js.map +1 -1
  33. package/build/data/VerificationStatusIcon/index.js +2 -0
  34. package/build/data/VerificationStatusIcon/index.js.map +1 -0
  35. package/build/data/_shared/FloatingArrow.styled.js +30 -0
  36. package/build/data/_shared/FloatingArrow.styled.js.map +1 -0
  37. package/build/hooks/useEventListner.js.map +1 -1
  38. package/build/hooks/useFloatingPopover.js +187 -0
  39. package/build/hooks/useFloatingPopover.js.map +1 -0
  40. package/build/hooks/useIsomorphicLayoutEffect.js.map +1 -1
  41. package/build/hooks/useOnClickOutside.js.map +1 -1
  42. package/build/hooks/useTooltipAutoShow.js.map +1 -1
  43. package/build/icons/arrow-back.svg.js +3 -3
  44. package/build/icons/arrow-back.svg.js.map +1 -1
  45. package/build/icons/arrow-forward.svg.js +4 -4
  46. package/build/icons/arrow-forward.svg.js.map +1 -1
  47. package/build/icons/check-rectangle-filled.svg.js +3 -3
  48. package/build/icons/check-rectangle-filled.svg.js.map +1 -1
  49. package/build/icons/close.svg.js +3 -3
  50. package/build/icons/close.svg.js.map +1 -1
  51. package/build/icons/edit-note.svg.js +3 -3
  52. package/build/icons/edit-note.svg.js.map +1 -1
  53. package/build/icons/expand-more.svg.js +3 -3
  54. package/build/icons/expand-more.svg.js.map +1 -1
  55. package/build/icons/headset.svg.js +3 -3
  56. package/build/icons/headset.svg.js.map +1 -1
  57. package/build/icons/layers.svg.js +3 -3
  58. package/build/icons/layers.svg.js.map +1 -1
  59. package/build/icons/link.svg.js +3 -3
  60. package/build/icons/link.svg.js.map +1 -1
  61. package/build/icons/play.svg.js +3 -3
  62. package/build/icons/play.svg.js.map +1 -1
  63. package/build/icons/search.svg.js +3 -3
  64. package/build/icons/search.svg.js.map +1 -1
  65. package/build/icons/star-filled.svg.js +3 -3
  66. package/build/icons/star-filled.svg.js.map +1 -1
  67. package/build/icons/star.svg.js +3 -3
  68. package/build/icons/star.svg.js.map +1 -1
  69. package/build/icons/triangle-right.svg.js +3 -3
  70. package/build/icons/triangle-right.svg.js.map +1 -1
  71. package/build/icons/verification.svg.js +3 -3
  72. package/build/icons/verification.svg.js.map +1 -1
  73. package/build/icons/warning-circle.svg.js +3 -3
  74. package/build/icons/warning-circle.svg.js.map +1 -1
  75. package/build/inputs/ActionButton/ActionButton.js +11 -22
  76. package/build/inputs/ActionButton/ActionButton.js.map +1 -1
  77. package/build/inputs/ActionButton/ActionButton.styled.js +5 -54
  78. package/build/inputs/ActionButton/ActionButton.styled.js.map +1 -1
  79. package/build/inputs/Button/Button.js +125 -121
  80. package/build/inputs/Button/Button.js.map +1 -1
  81. package/build/inputs/Button/Button.styled.js +42 -260
  82. package/build/inputs/Button/Button.styled.js.map +1 -1
  83. package/build/inputs/Checkbox/Checkbox.js +45 -61
  84. package/build/inputs/Checkbox/Checkbox.js.map +1 -1
  85. package/build/inputs/Checkbox/Checkbox.styled.js +24 -153
  86. package/build/inputs/Checkbox/Checkbox.styled.js.map +1 -1
  87. package/build/inputs/CompactAutocompleteSelect/CompactAutocompleteSelect.js +106 -111
  88. package/build/inputs/CompactAutocompleteSelect/CompactAutocompleteSelect.js.map +1 -1
  89. package/build/inputs/CompactAutocompleteSelect/CompactAutocompleteSelect.styled.js +88 -273
  90. package/build/inputs/CompactAutocompleteSelect/CompactAutocompleteSelect.styled.js.map +1 -1
  91. package/build/inputs/CompactStarRating/CompactStarRating.js +56 -77
  92. package/build/inputs/CompactStarRating/CompactStarRating.js.map +1 -1
  93. package/build/inputs/CompactStarRating/CompactStarRating.styled.js +32 -211
  94. package/build/inputs/CompactStarRating/CompactStarRating.styled.js.map +1 -1
  95. package/build/inputs/CompactTextInput/CompactTextInput.js +86 -105
  96. package/build/inputs/CompactTextInput/CompactTextInput.js.map +1 -1
  97. package/build/inputs/CompactTextInput/CompactTextInput.styled.js +55 -258
  98. package/build/inputs/CompactTextInput/CompactTextInput.styled.js.map +1 -1
  99. package/build/inputs/MultiLevelCheckbox/MultiLevelCheckbox.js +70 -77
  100. package/build/inputs/MultiLevelCheckbox/MultiLevelCheckbox.js.map +1 -1
  101. package/build/inputs/MultiLevelCheckbox/MultiLevelCheckbox.styled.js +28 -60
  102. package/build/inputs/MultiLevelCheckbox/MultiLevelCheckbox.styled.js.map +1 -1
  103. package/build/inputs/MultiLevelCheckbox/types.js +12 -12
  104. package/build/inputs/MultiLevelCheckbox/types.js.map +1 -1
  105. package/build/inputs/MultiLevelCheckboxSelect/MultiLevelCheckboxSelect.js +69 -73
  106. package/build/inputs/MultiLevelCheckboxSelect/MultiLevelCheckboxSelect.js.map +1 -1
  107. package/build/inputs/MultiLevelCheckboxSelect/MultiLevelCheckboxSelect.styled.js +44 -87
  108. package/build/inputs/MultiLevelCheckboxSelect/MultiLevelCheckboxSelect.styled.js.map +1 -1
  109. package/build/inputs/MultiSelect/MultiSelect.js +69 -79
  110. package/build/inputs/MultiSelect/MultiSelect.js.map +1 -1
  111. package/build/inputs/MultiSelect/MultiSelect.styled.js +70 -76
  112. package/build/inputs/MultiSelect/MultiSelect.styled.js.map +1 -1
  113. package/build/inputs/Radio/Radio.js +20 -33
  114. package/build/inputs/Radio/Radio.js.map +1 -1
  115. package/build/inputs/Radio/Radio.styled.js +15 -96
  116. package/build/inputs/Radio/Radio.styled.js.map +1 -1
  117. package/build/inputs/Switch/Switch.js +28 -40
  118. package/build/inputs/Switch/Switch.js.map +1 -1
  119. package/build/inputs/Switch/Switch.styled.js +24 -94
  120. package/build/inputs/Switch/Switch.styled.js.map +1 -1
  121. package/build/inputs/TextArea/TextArea.js +98 -123
  122. package/build/inputs/TextArea/TextArea.js.map +1 -1
  123. package/build/inputs/TextArea/TextArea.styled.js +64 -379
  124. package/build/inputs/TextArea/TextArea.styled.js.map +1 -1
  125. package/build/inputs/TextInput/TextInput.js +59 -79
  126. package/build/inputs/TextInput/TextInput.js.map +1 -1
  127. package/build/inputs/TextInput/TextInput.styled.js +33 -224
  128. package/build/inputs/TextInput/TextInput.styled.js.map +1 -1
  129. package/build/layout/InputGroup/InputGroup.js +6 -9
  130. package/build/layout/InputGroup/InputGroup.js.map +1 -1
  131. package/build/layout/InputGroup/InputGroup.styled.js +4 -3
  132. package/build/layout/InputGroup/InputGroup.styled.js.map +1 -1
  133. package/build/layout/InputGroup/index.js +2 -0
  134. package/build/layout/InputGroup/index.js.map +1 -0
  135. package/build/layout/SectionSeparator/SectionSeparator.js +5 -9
  136. package/build/layout/SectionSeparator/SectionSeparator.js.map +1 -1
  137. package/build/layout/SectionSeparator/SectionSeparator.styled.js +4 -8
  138. package/build/layout/SectionSeparator/SectionSeparator.styled.js.map +1 -1
  139. package/build/styles/utils/colors-export.d.ts +73 -0
  140. package/build/styles/utils/colors-export.js.map +1 -1
  141. package/build/utils/dateTime.js.map +1 -1
  142. package/build/utils/defaultTheme.js +14 -28
  143. package/build/utils/defaultTheme.js.map +1 -1
  144. package/build/utils/getElementRef.js +14 -0
  145. package/build/utils/getElementRef.js.map +1 -0
  146. package/build/utils/parseTrigger.js +16 -0
  147. package/build/utils/parseTrigger.js.map +1 -0
  148. package/build/widgets/AssetAction/AssetAction.js +26 -33
  149. package/build/widgets/AssetAction/AssetAction.js.map +1 -1
  150. package/build/widgets/AssetAction/AssetAction.styled.js +20 -34
  151. package/build/widgets/AssetAction/AssetAction.styled.js.map +1 -1
  152. package/build/widgets/AssetActionsBase/AssetActionsBase.js +8 -13
  153. package/build/widgets/AssetActionsBase/AssetActionsBase.js.map +1 -1
  154. package/build/widgets/AssetActionsBase/AssetActionsBase.styled.js +4 -9
  155. package/build/widgets/AssetActionsBase/AssetActionsBase.styled.js.map +1 -1
  156. package/build/widgets/AssetGallery/AssetGallery.js +15 -40
  157. package/build/widgets/AssetGallery/AssetGallery.js.map +1 -1
  158. package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryBase.js +55 -70
  159. package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryBase.js.map +1 -1
  160. package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryBase.styled.js +12 -24
  161. package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryBase.styled.js.map +1 -1
  162. package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryCompactCard/AssetGalleryCompactCard.js +146 -122
  163. package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryCompactCard/AssetGalleryCompactCard.js.map +1 -1
  164. package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryCompactCard/AssetGalleryCompactCard.styled.js +99 -286
  165. package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryCompactCard/AssetGalleryCompactCard.styled.js.map +1 -1
  166. package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryGridCard/AssetGalleryGridCard.js +170 -125
  167. package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryGridCard/AssetGalleryGridCard.js.map +1 -1
  168. package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryGridCard/AssetGalleryGridCard.styled.js +135 -364
  169. package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryGridCard/AssetGalleryGridCard.styled.js.map +1 -1
  170. package/build/widgets/AssetPreview/AssetPreviewTopBar/AssetPreviewTopBar.js +20 -21
  171. package/build/widgets/AssetPreview/AssetPreviewTopBar/AssetPreviewTopBar.js.map +1 -1
  172. package/build/widgets/AssetPreview/AssetPreviewTopBar/AssetPreviewTopBar.styled.js +20 -71
  173. package/build/widgets/AssetPreview/AssetPreviewTopBar/AssetPreviewTopBar.styled.js.map +1 -1
  174. package/build/widgets/ContextMenu/ContextMenu.js +12 -11
  175. package/build/widgets/ContextMenu/ContextMenu.js.map +1 -1
  176. package/build/widgets/ContextMenu/ContextMenu.styled.js +4 -4
  177. package/build/widgets/ContextMenu/ContextMenu.styled.js.map +1 -1
  178. package/build/widgets/ContextMenu/ContextMenuItem/ContextMenuItem.js +17 -25
  179. package/build/widgets/ContextMenu/ContextMenuItem/ContextMenuItem.js.map +1 -1
  180. package/build/widgets/ContextMenu/ContextMenuItem/ContextMenuItem.styled.js +16 -71
  181. package/build/widgets/ContextMenu/ContextMenuItem/ContextMenuItem.styled.js.map +1 -1
  182. package/build/widgets/ContextMenu/ContextMenuItemsGroup/ContextMenuItemsGroup.js +7 -11
  183. package/build/widgets/ContextMenu/ContextMenuItemsGroup/ContextMenuItemsGroup.js.map +1 -1
  184. package/build/widgets/ContextMenu/ContextMenuItemsGroup/ContextMenuItemsGroup.styled.js +4 -11
  185. package/build/widgets/ContextMenu/ContextMenuItemsGroup/ContextMenuItemsGroup.styled.js.map +1 -1
  186. package/build/widgets/InfoCard/InfoCard.js +26 -21
  187. package/build/widgets/InfoCard/InfoCard.js.map +1 -1
  188. package/build/widgets/InfoCard/InfoCard.styled.js +36 -84
  189. package/build/widgets/InfoCard/InfoCard.styled.js.map +1 -1
  190. package/build/widgets/InstructionSeverityDisplay/InstructionSeverityDisplay.js +28 -34
  191. package/build/widgets/InstructionSeverityDisplay/InstructionSeverityDisplay.js.map +1 -1
  192. package/build/widgets/InstructionSeverityDisplay/InstructionSeverityDisplay.styled.js +21 -57
  193. package/build/widgets/InstructionSeverityDisplay/InstructionSeverityDisplay.styled.js.map +1 -1
  194. package/build/widgets/InstructionSeverityDisplay/index.js +2 -0
  195. package/build/widgets/InstructionSeverityDisplay/index.js.map +1 -0
  196. package/build/widgets/Instructions/Instructions.js +53 -95
  197. package/build/widgets/Instructions/Instructions.js.map +1 -1
  198. package/build/widgets/Instructions/Instructions.styled.js +27 -26
  199. package/build/widgets/Instructions/Instructions.styled.js.map +1 -1
  200. package/build/widgets/ProgressBar/ProgressBar.js +39 -37
  201. package/build/widgets/ProgressBar/ProgressBar.js.map +1 -1
  202. package/build/widgets/ProgressBar/ProgressBar.styled.js +56 -125
  203. package/build/widgets/ProgressBar/ProgressBar.styled.js.map +1 -1
  204. package/build/widgets/SummaryCard/SummaryCard.js +55 -64
  205. package/build/widgets/SummaryCard/SummaryCard.js.map +1 -1
  206. package/build/widgets/SummaryCard/SummaryCard.styled.js +51 -106
  207. package/build/widgets/SummaryCard/SummaryCard.styled.js.map +1 -1
  208. package/package.json +77 -36
  209. package/styles/utils/colors-export.d.ts +73 -0
  210. package/types/components/data/Alert/Alert.d.ts +76 -0
  211. package/types/components/data/Alert/Alert.styled.d.ts +83 -0
  212. package/types/components/data/Alert/index.d.ts +1 -0
  213. package/types/components/data/Badge/Badge.d.ts +128 -0
  214. package/types/components/data/Badge/Badge.styled.d.ts +132 -0
  215. package/types/components/data/Badge/index.d.ts +1 -0
  216. package/types/components/data/Popover/Popover.d.ts +205 -0
  217. package/types/components/data/Popover/Popover.styled.d.ts +15 -0
  218. package/types/components/data/Popover/index.d.ts +1 -0
  219. package/types/components/data/SeverityBadge/SeverityBadge.d.ts +72 -0
  220. package/types/components/data/SeverityBadge/index.d.ts +1 -0
  221. package/types/components/data/Tab/Tab.d.ts +27 -0
  222. package/types/components/data/Tab/Tab.styled.d.ts +1 -0
  223. package/types/components/data/Tab/index.d.ts +1 -0
  224. package/types/components/data/Tabs/Tabs.d.ts +111 -0
  225. package/types/components/data/Tabs/Tabs.styled.d.ts +42 -0
  226. package/types/components/data/Tabs/index.d.ts +1 -0
  227. package/types/components/data/Tooltip/Tooltip.d.ts +134 -0
  228. package/types/components/data/Tooltip/Tooltip.styled.d.ts +8 -0
  229. package/types/components/data/Tooltip/index.d.ts +1 -0
  230. package/types/components/data/VerificationStatusIcon/VerificationStatusIcon.d.ts +35 -0
  231. package/types/components/data/VerificationStatusIcon/VerificationStatusIcon.styled.d.ts +46 -0
  232. package/types/components/data/VerificationStatusIcon/index.d.ts +1 -0
  233. package/types/components/data/_shared/FloatingArrow.styled.d.ts +129 -0
  234. package/types/components/data/index.d.ts +8 -0
  235. package/types/components/index.d.ts +3 -0
  236. package/types/components/inputs/ActionButton/ActionButton.d.ts +55 -0
  237. package/types/components/inputs/ActionButton/ActionButton.styled.d.ts +34 -0
  238. package/types/components/inputs/ActionButton/index.d.ts +1 -0
  239. package/types/components/inputs/Button/Button.d.ts +82 -0
  240. package/types/components/inputs/Button/Button.styled.d.ts +102 -0
  241. package/types/components/inputs/Button/index.d.ts +1 -0
  242. package/types/components/inputs/Checkbox/Checkbox.d.ts +92 -0
  243. package/types/components/inputs/Checkbox/Checkbox.styled.d.ts +33 -0
  244. package/types/components/inputs/Checkbox/index.d.ts +1 -0
  245. package/types/components/inputs/CompactAutocompleteSelect/CompactAutocompleteSelect.d.ts +242 -0
  246. package/types/components/inputs/CompactAutocompleteSelect/CompactAutocompleteSelect.styled.d.ts +157 -0
  247. package/types/components/inputs/CompactAutocompleteSelect/index.d.ts +1 -0
  248. package/types/components/inputs/CompactStarRating/CompactStarRating.d.ts +96 -0
  249. package/types/components/inputs/CompactStarRating/CompactStarRating.styled.d.ts +86 -0
  250. package/types/components/inputs/CompactStarRating/index.d.ts +1 -0
  251. package/types/components/inputs/CompactTextInput/CompactTextInput.d.ts +116 -0
  252. package/types/components/inputs/CompactTextInput/CompactTextInput.styled.d.ts +70 -0
  253. package/types/components/inputs/CompactTextInput/index.d.ts +1 -0
  254. package/types/components/inputs/MultiLevelCheckbox/MultiLevelCheckbox.d.ts +41 -0
  255. package/types/components/inputs/MultiLevelCheckbox/MultiLevelCheckbox.styled.d.ts +21 -0
  256. package/types/components/inputs/MultiLevelCheckbox/index.d.ts +2 -0
  257. package/types/components/inputs/MultiLevelCheckbox/types.d.ts +72 -0
  258. package/types/components/inputs/MultiLevelCheckboxSelect/MultiLevelCheckboxSelect.d.ts +44 -0
  259. package/types/components/inputs/MultiLevelCheckboxSelect/MultiLevelCheckboxSelect.styled.d.ts +11 -0
  260. package/types/components/inputs/MultiLevelCheckboxSelect/index.d.ts +1 -0
  261. package/types/components/inputs/MultiSelect/MultiSelect.d.ts +172 -0
  262. package/types/components/inputs/MultiSelect/MultiSelect.styled.d.ts +99 -0
  263. package/types/components/inputs/MultiSelect/index.d.ts +1 -0
  264. package/types/components/inputs/Radio/Radio.d.ts +65 -0
  265. package/types/components/inputs/Radio/Radio.styled.d.ts +11 -0
  266. package/types/components/inputs/Radio/index.d.ts +1 -0
  267. package/types/components/inputs/Switch/Switch.d.ts +62 -0
  268. package/types/components/inputs/Switch/Switch.styled.d.ts +20 -0
  269. package/types/components/inputs/Switch/index.d.ts +1 -0
  270. package/types/components/inputs/TextArea/TextArea.d.ts +124 -0
  271. package/types/components/inputs/TextArea/TextArea.styled.d.ts +95 -0
  272. package/types/components/inputs/TextArea/index.d.ts +1 -0
  273. package/types/components/inputs/TextInput/TextInput.d.ts +109 -0
  274. package/types/components/inputs/TextInput/TextInput.styled.d.ts +43 -0
  275. package/types/components/inputs/TextInput/index.d.ts +1 -0
  276. package/types/components/inputs/index.d.ts +13 -0
  277. package/types/components/layout/InputGroup/InputGroup.d.ts +31 -0
  278. package/types/components/layout/InputGroup/InputGroup.styled.d.ts +1 -0
  279. package/types/components/layout/InputGroup/index.d.ts +1 -0
  280. package/types/components/layout/SectionSeparator/SectionSeparator.d.ts +28 -0
  281. package/types/components/layout/SectionSeparator/SectionSeparator.styled.d.ts +14 -0
  282. package/types/components/layout/SectionSeparator/index.d.ts +1 -0
  283. package/types/components/layout/index.d.ts +2 -0
  284. package/types/components/widgets/AssetAction/AssetAction.d.ts +16 -0
  285. package/types/components/widgets/AssetAction/AssetAction.styled.d.ts +20 -0
  286. package/types/components/widgets/AssetAction/index.d.ts +1 -0
  287. package/types/components/widgets/AssetActionsBase/AssetActionsBase.d.ts +25 -0
  288. package/types/components/widgets/AssetActionsBase/AssetActionsBase.styled.d.ts +1 -0
  289. package/types/components/widgets/AssetActionsBase/index.d.ts +1 -0
  290. package/types/components/widgets/AssetGallery/AssetGallery.d.ts +170 -0
  291. package/types/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryBase.d.ts +88 -0
  292. package/types/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryBase.styled.d.ts +3 -0
  293. package/types/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryCompactCard/AssetGalleryCompactCard.d.ts +3 -0
  294. package/types/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryCompactCard/AssetGalleryCompactCard.styled.d.ts +100 -0
  295. package/types/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryGridCard/AssetGalleryGridCard.d.ts +2 -0
  296. package/types/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryGridCard/AssetGalleryGridCard.styled.d.ts +85 -0
  297. package/types/components/widgets/AssetGallery/asset.types.d.ts +446 -0
  298. package/types/components/widgets/AssetGallery/index.d.ts +1 -0
  299. package/types/components/widgets/AssetPreview/AssetPreviewTopBar/AssetPreviewTopBar.d.ts +60 -0
  300. package/types/components/widgets/AssetPreview/AssetPreviewTopBar/AssetPreviewTopBar.styled.d.ts +35 -0
  301. package/types/components/widgets/AssetPreview/AssetPreviewTopBar/index.d.ts +1 -0
  302. package/types/components/widgets/ContextMenu/ContextMenu.d.ts +134 -0
  303. package/types/components/widgets/ContextMenu/ContextMenu.styled.d.ts +1 -0
  304. package/types/components/widgets/ContextMenu/ContextMenuItem/ContextMenuItem.d.ts +45 -0
  305. package/types/components/widgets/ContextMenu/ContextMenuItem/ContextMenuItem.styled.d.ts +26 -0
  306. package/types/components/widgets/ContextMenu/ContextMenuItem/index.d.ts +1 -0
  307. package/types/components/widgets/ContextMenu/ContextMenuItemsGroup/ContextMenuItemsGroup.d.ts +41 -0
  308. package/types/components/widgets/ContextMenu/ContextMenuItemsGroup/ContextMenuItemsGroup.styled.d.ts +1 -0
  309. package/types/components/widgets/ContextMenu/ContextMenuItemsGroup/index.d.ts +1 -0
  310. package/types/components/widgets/ContextMenu/index.d.ts +1 -0
  311. package/types/components/widgets/InfoCard/InfoCard.d.ts +33 -0
  312. package/types/components/widgets/InfoCard/InfoCard.styled.d.ts +45 -0
  313. package/types/components/widgets/InfoCard/index.d.ts +1 -0
  314. package/types/components/widgets/InstructionSeverityDisplay/InstructionSeverityDisplay.d.ts +46 -0
  315. package/types/components/widgets/InstructionSeverityDisplay/InstructionSeverityDisplay.styled.d.ts +40 -0
  316. package/types/components/widgets/InstructionSeverityDisplay/index.d.ts +1 -0
  317. package/types/components/widgets/Instructions/Instructions.d.ts +156 -0
  318. package/types/components/widgets/Instructions/Instructions.styled.d.ts +26 -0
  319. package/types/components/widgets/Instructions/index.d.ts +1 -0
  320. package/types/components/widgets/ProgressBar/ProgressBar.d.ts +30 -0
  321. package/types/components/widgets/ProgressBar/ProgressBar.styled.d.ts +78 -0
  322. package/types/components/widgets/ProgressBar/index.d.ts +1 -0
  323. package/types/components/widgets/SummaryCard/SummaryCard.d.ts +83 -0
  324. package/types/components/widgets/SummaryCard/SummaryCard.styled.d.ts +68 -0
  325. package/types/components/widgets/SummaryCard/index.d.ts +1 -0
  326. package/types/components/widgets/index.d.ts +11 -0
  327. package/types/hooks/useElementSize.d.ts +25 -0
  328. package/types/hooks/useEventListner.d.ts +46 -0
  329. package/types/hooks/useFloatingPopover.d.ts +242 -0
  330. package/types/hooks/useIsomorphicLayoutEffect.d.ts +26 -0
  331. package/types/hooks/useOnClickOutside.d.ts +31 -0
  332. package/types/hooks/useTooltipAutoShow.d.ts +80 -0
  333. package/types/icons/index.d.ts +41 -0
  334. package/types/ssr/index.d.ts +1 -0
  335. package/types/styles/utils/colors-export.d.ts +73 -0
  336. package/types/utils/dateTime.d.ts +13 -0
  337. package/types/utils/defaultTheme.d.ts +174 -0
  338. package/types/utils/getElementRef.d.ts +21 -0
  339. package/types/utils/parseTrigger.d.ts +92 -0
  340. package/build/_virtual/_rollupPluginBabelHelpers.js +0 -12
  341. package/build/_virtual/_rollupPluginBabelHelpers.js.map +0 -1
  342. package/build/widgets/AssetGallery/asset.propType.js +0 -56
  343. package/build/widgets/AssetGallery/asset.propType.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"TextArea.styled.js","sources":["../../../src/components/inputs/TextArea/TextArea.styled.js"],"sourcesContent":["import styled, { css, keyframes } from 'styled-components';\nimport { applyDefaultTheme } from '../../../utils/defaultTheme';\n\nconst fadeInCheck = keyframes`\n from {\n opacity: 0\n }\n to {\n opacity: 1\n }\n`;\n\nconst fadeOutCheck = keyframes`\n from {\n opacity: 1\n }\n to {\n opacity: 0\n }\n`;\n\nconst activeLabel = css`\n font-size: 0.75rem;\n padding: 0 3px;\n top: -7px;\n letter-spacing: 0.03em;\n left: 8px !important;\n opacity: 1 !important;\n`;\n\nconst shouldForwardProp = prop => {\n return prop !== 'theme' && !prop.startsWith('$');\n};\n\nexport const TextAreaContainter = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n display: flex;\n`;\n\nexport const Label = styled.label\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n ${props =>\n props.theme.themeProp(\n 'color',\n props.theme.getColor('white'),\n props.theme.getColor('gray-700')\n )};\n flex-basis: 33.33%;\n font-size: 0.875rem;\n line-height: 1rem;\n height: 19px;\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding-top: 13px;\n ${props =>\n props.disabled &&\n css`\n cursor: not-allowed;\n `}\n`;\n\nexport const InputIconContainer = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n opacity: 0;\n pointer-events: none;\n border-top-right-radius: 3px;\n border-bottom-right-radius: 3px;\n display: flex;\n align-items: flex-start;\n\n position: absolute;\n right: 15px;\n top: 10px;\n bottom: 0;\n > .smallPadingIcon {\n padding: 4px;\n width: 15px;\n height: 15px;\n border-radius: 5px;\n opacity: 1;\n margin-top: -5px;\n ${props =>\n props.theme.themeProp(\n 'background-color',\n props.theme.getColor('gray-900'),\n props.theme.getColor('gray-300'),\n '!important'\n )}\n }\n svg {\n width: 15px;\n opacity: 0.7;\n transition: opacity 250ms;\n\n ${props =>\n props.disabled &&\n css`\n display: none;\n `}\n }\n`;\n\nexport const TextInputField = styled.textarea\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n width: 100%;\n font-family: inherit;\n font-size: 0.875rem;\n border-radius: 3px;\n padding: 5px 10px;\n resize: vertical;\n z-index: 0;\n box-sizing: border-box;\n appearance: none;\n border: 1px solid;\n transition:\n height 550ms ease-in-out,\n border-color 350ms,\n background 350ms;\n\n ${props =>\n props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-100'),\n props.theme.getColor('gray-900')\n )}\n\n ${props =>\n props.$borderRadius &&\n css`\n border-radius: ${props.$borderRadius}px;\n `}\n\n ${props => {\n if (props.$type === 'error') {\n return css`\n ${props.theme.themeProp('color', 'white', 'black')}\n ${props.theme.themeProp('background', '#7f1b1b', '#FBEAE6')}\n ${props.theme.themeProp('border-color', '#7f1b1b', '#FBEAE6')}\n `;\n } else if (props.$type === 'warning') {\n return css`\n ${props.theme.themeProp('color', 'white', 'black')}\n ${props.theme.themeProp('background', '#634E01', '#FFFDE8')}\n ${props.theme.themeProp('border-color', '#634E01', '#FFFDE8')}\n `;\n } else if (props.$type === 'error-border') {\n return css`\n ${props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-100'),\n props.theme.getColor('gray-900')\n )}\n ${props.theme.themeProp(\n 'background',\n props.theme.getColor('gray-900'),\n props.theme.getColor('white')\n )}\n ${props.theme.themeProp(\n 'border-color',\n props.theme.getColor('red-200'),\n props.theme.getColor('red-500')\n )}\n `;\n } else if (props.$type === 'warning-border') {\n return css`\n ${props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-100'),\n props.theme.getColor('gray-900')\n )}\n ${props.theme.themeProp(\n 'background',\n props.theme.getColor('gray-900'),\n props.theme.getColor('white')\n )}\n ${props.theme.themeProp(\n 'border-color',\n props.theme.getColor('red-200'),\n props.theme.getColor('orange-500')\n )}\n `;\n } else {\n return css`\n ${props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-100'),\n props.theme.getColor('gray-900')\n )}\n ${props.theme.themeProp(\n 'background',\n props.theme.getColor('gray-900'),\n props.theme.getColor('white')\n )}\n ${props.theme.themeProp(\n 'border-color',\n props.theme.getColor('gray-500'),\n props.theme.getColor('gray-400')\n )}\n `;\n }\n }}\n\n\n ${props =>\n props.readOnly &&\n css`\n cursor: default;\n border-color: transparent !important;\n padding: 12px 10px;\n `}\n\n ${props =>\n props.disabled &&\n css`\n cursor: not-allowed;\n `}\n\n\n ${props =>\n props.$noBorder &&\n !props.$type &&\n css`\n ${props =>\n props.theme.themeProp(\n 'border-color',\n props.theme.getColor('gray-900'),\n props.theme.getColor('white')\n )}\n `} \n\n ${props =>\n props.$noBorder &&\n props.$type === 'warning' &&\n css`\n ${props => props.theme.themeProp('border-color', '#634E01', '#FFFDE8')}\n `}\n\n ${props =>\n props.$noBorder &&\n props.$type === 'error' &&\n css`\n ${props => props.theme.themeProp('border-color', '#7f1b1b', '#FBEAE6')}\n `}\n\n\n ${props =>\n props.padding === 'small' &&\n css`\n padding: 5px 10px;\n `}\n\n ${props =>\n props.padding === 'medium' &&\n css`\n padding: 13px 15px;\n `}\n\n ${props =>\n props.padding === 'large' &&\n css`\n padding: 15px 55px;\n `}\n\n ${props =>\n props.$hasIcon &&\n css`\n padding-left: 55px;\n padding-right: 35px;\n padding-top: 13.5px;\n `}\n\n\n &&:hover:not(:focus) {\n ${props => {\n if (props.disabled) {\n return '';\n }\n if (props.readOnly) {\n if (props.$type === 'error') {\n return props.theme.themeProp('background', '#7f1b1b', '#FBEAE6');\n } else if (props.$type === 'warning') {\n return props.theme.themeProp('background', '#634E01', '#FFFDE8');\n }\n return '';\n }\n\n if (props.$type === 'error') {\n return props.theme.themeProp('background', '#901d1d', '#F7D5D0');\n } else if (props.$type === 'warning') {\n return props.theme.themeProp('background', '#806403', '#FFFEBF');\n } else if (!props.disabled) {\n return props.theme.themeProp(\n 'background',\n props.theme.getColor('gray-700'),\n props.theme.getColor('gray-100')\n );\n }\n return '';\n }}\n\n ${props =>\n props.$edit &&\n props.theme.themeProp(\n 'border-color',\n props.theme.getColor('gray-700'),\n props.theme.getColor('gray-100')\n )}\n\n ${props =>\n props.$noBorder && !props.readOnly && props.$type !== 'warning' && props.$type !== 'error'\n ? props.theme.themeProp(\n 'background',\n props.theme.getColor('gray-700'),\n props.theme.getColor('gray-100')\n )\n : ''}\n\n & + ${InputIconContainer} {\n opacity: 1;\n ${props =>\n props.$type === 'success' &&\n css`\n opacity: 0;\n `}\n }\n }\n\n&::placeholder {\n ${props => {\n if (props.$type === 'error' || props.$type === 'warning') {\n return css`\n color: ${props.theme.getColor('gray-400')};\n opacity: 0.9;\n `;\n } else {\n return css`\n ${props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-400'),\n props.theme.getColor('gray-500')\n )}\n opacity: 0.6;\n `;\n }\n }}\n}\n\n ${props =>\n props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-300'),\n props.theme.getColor('gray-600')\n )};\n\n\n\n &:focus::placeholder {\n ${props => {\n if (props.$type === 'warning' || props.$type === 'error') {\n return css`\n color: ${props.theme.getColor('gray-500')} !important;\n opacity: 0.8 !important;\n `;\n } else {\n return css`\n ${props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-300'),\n props.theme.getColor('gray-600')\n )}\n `;\n }\n }}\n }\n\n &&:focus {\n outline: none;\n\n ${props => {\n if (props.readOnly) {\n if (props.$type === 'error') {\n return props.theme.themeProp('background', '#7f1b1b', '#FBEAE6');\n } else if (props.$type === 'warning') {\n return props.theme.themeProp('background', '#634E01', '#FFFDE8');\n }\n return '';\n }\n\n if (props.$type === 'error') {\n return css`\n ${props.theme.themeProp('border-color', '#D83018', '#D83018')}\n ${props.theme.themeProp('background', 'white', 'white')}\n ${props.theme.themeProp('color', 'black', 'black')}\n `;\n } else if (props.$type === 'warning') {\n return css`\n ${props.theme.themeProp('border-color', '#F4E21E', '#F4E21E')}\n ${props.theme.themeProp('background', 'white', 'white')}\n ${props.theme.themeProp('color', 'black', 'black')}\n `;\n } else {\n return css`\n border-color: ${props.theme.getColor('gray-600')};\n ${props.theme.themeProp(\n 'background',\n props.theme.getColor('gray-700'),\n props.theme.getColor('gray-100')\n )}\n `;\n }\n }}\n }\n\n &&:not(:hover):not(:focus) {\n ${props => {\n if (props.$edit) {\n if (props.$type === 'error') {\n return props.theme.themeProp('background', '#7f1b1b', '#FEE2E2');\n } else if (props.$type === 'warning') {\n return props.theme.themeProp('background', '#634E01', '#FFFDE8');\n } else {\n return props.theme.themeProp(\n 'background',\n 'rgba(39,39,42, 0.7)',\n 'rgba(244,244,245, 0.3)'\n );\n }\n }\n }}\n\n ${props =>\n props.$edit &&\n props.theme.themeProp('border-color', 'rgba(39,39,42, 0.7)', 'rgba(228,228,231, 0.3)')}\n\n ${props =>\n props.$noBorder &&\n props.$edit &&\n css`\n ${props => props.theme.themeProp('border-color', '#27272A', 'rgba(244,244,245, 0.3)')}\n `}\n }\n`;\n\nexport const TextInputLabel = styled.label\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n position: absolute;\n top: 13px;\n left: 11px;\n line-height: 1.2;\n font-size: 0.875rem;\n transition: all 150ms;\n margin-botton: 50px;\n\n ${props =>\n props.theme.themeProp(\n 'color',\n props.theme.getColor('white'),\n props.theme.getColor('gray-700')\n )};\n\n ${props => props.theme.themeProp('opacity', 0.6, 0.5)}\n\n\n ${props =>\n props.theme.themeProp(\n 'background',\n `linear-gradient(0deg, ${props.theme.getColor('gray-900')} calc(50% + 1px), transparent 50%)`,\n `linear-gradient(0deg, ${props.theme.getColor('white')} calc(50% + 1px), transparent 50%)`\n )}\n\n ${props =>\n !props.$inputIsEmpty &&\n css`\n ${activeLabel}\n `}\n\n ${props =>\n props.$hasPlaceholder &&\n css`\n ${activeLabel};\n `}\n content: \"\";\n\n ${props =>\n props.$hasIcon &&\n css`\n left: 55px;\n `}\n`;\n\nexport const TextInputFieldIcon = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n position: absolute;\n top: 0;\n left: 0;\n height: 2.625rem;\n display: flex;\n padding: 0 10px;\n\n svg {\n width: 15px;\n opacity: 0.6;\n transition: opacity 250ms;\n }\n`;\n\nexport const TextInputFieldIconAlert = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n position: absolute;\n top: 2.8px;\n display: flex;\n padding: 0 10px 0 30px;\n opacity: 0.6;\n transition: opacity 250ms;\n ${props => props.$type === 'warning' && props.theme.themeProp('color', '#EAB308', '#2F2402')}\n svg {\n margin-top: 12px;\n width: 15px;\n }\n`;\n\nexport const TextInput = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n position: relative;\n flex-basis: ${props => (props.$fieldLabel ? '66.66%' : '100%')};\n\n ${props =>\n props.disabled &&\n css`\n opacity: 0.5;\n\n > * {\n cursor: not-allowed;\n }\n `}\n\n &:focus-within {\n ${TextInputLabel} {\n ${activeLabel};\n }\n\n ${TextInputFieldIcon} {\n svg {\n opacity: 1;\n }\n }\n }\n\n ${TextInputField}:not(:placeholder-shown) + ${TextInputLabel} {\n ${activeLabel};\n ${props =>\n props.$type === 'error' &&\n props.theme.themeProp(\n 'color',\n props.theme.getColor('red-200'),\n props.theme.getColor('red-500')\n )}\n }\n`;\n\nexport const Description = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n margin: 8px 0 0 0;\n padding: 0 0.6875rem;\n font-size: 0.75rem;\n line-height: 1.333;\n\n ${props =>\n props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-400'),\n props.theme.getColor('gray-500')\n )};\n\n ${props =>\n (props.$type === 'warning-border' || props.$type === 'warning') &&\n css`\n ${props.theme.themeProp(\n 'color',\n props.theme.getColor('red-200'),\n props.theme.getColor('orange-500')\n )}\n `}\n\n ${props =>\n (props.$type === 'error-border' || props.$type === 'error') &&\n css`\n ${props.theme.themeProp(\n 'color',\n props.theme.getColor('red-200'),\n props.theme.getColor('red-500')\n )}\n `}\n`;\n\nexport const SuccessContainer = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n opacity: 1;\n pointer-events: none;\n opacity: ${props => (props.$fadeIn ? 0 : 1)};\n animation: ${props => (props.$fadeIn ? fadeOutCheck : fadeInCheck)} 0.5s ease-in-out;\n transition: opacity 0.5s ease-in-out;\n position: absolute;\n margin-top: -35px;\n margin-left: 5px;\n width: 15px;\n height: 15px;\n padding: 5px;\n ${props =>\n props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-300'),\n props.theme.getColor('gray-500')\n )}\n\n > svg {\n width: 15px;\n }\n`;\n\nexport const SuccessContainerLabel = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n opacity: 1;\n pointer-events: none;\n opacity: ${props => (props.$fadeIn ? 0 : 1)};\n animation: ${props => (props.$fadeIn ? fadeOutCheck : fadeInCheck)} 0.5s ease-in-out;\n transition: opacity 0.5s ease-in-out;\n margin-right: 5px;\n margin-top: -7px;\n width: 15px;\n height: 15px;\n padding: 5px;\n ${props =>\n props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-300'),\n props.theme.getColor('gray-500')\n )}\n\n > svg {\n width: 13px;\n }\n`;\n"],"names":["fadeInCheck","keyframes","fadeOutCheck","activeLabel","css","shouldForwardProp","prop","startsWith","TextAreaContainter","styled","div","withConfig","attrs","applyDefaultTheme","Label","label","props","theme","themeProp","getColor","disabled","InputIconContainer","TextInputField","textarea","$borderRadius","$type","readOnly","$noBorder","padding","$hasIcon","$edit","TextInputLabel","$inputIsEmpty","$hasPlaceholder","TextInputFieldIcon","TextInputFieldIconAlert","TextInput","$fieldLabel","Description","SuccessContainer","$fadeIn","SuccessContainerLabel"],"mappings":";;;AAGA,MAAMA,WAAW,GAAGC,SAAS,CAAA;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAA;AAED,MAAMC,YAAY,GAAGD,SAAS,CAAA;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAA;AAED,MAAME,WAAW,GAAGC,GAAG,CAAA;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAA;AAED,MAAMC,iBAAiB,GAAGC,IAAI,IAAI;EAChC,OAAOA,IAAI,KAAK,OAAO,IAAI,CAACA,IAAI,CAACC,UA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UAAU,CAAC,EAChCH,KAAK,CAACC,KAAK,CAACE,QAAQ,CAAC,UAAU,CACjC,CAAC,CAAA;AACL;AACA;AACA;AACA;AACA,EAAC;AAEM,MAAMsB,qBAAqB,GAAGhC,MAAM,CAACC,GAAG,CAC5CC,UAAU,CAAC;AACVN,EAAAA,iBAAAA;AACF,CAAC,CAAC,CACDO,KAAK,CAACC,iBAAiB,CAAC,CAAA;AAC3B;AACA;AACA,WAAaG,EAAAA,KAAK,IAAKA,KAAK,CAACwB,OAAO,GAAG,CAAC,GAAG,CAAE,CAAA;AAC7C,aAAexB,EAAAA,KAAK,IAAKA,KAAK,CAACwB,OAAO,GAAGtC,YAAY,GAAGF,WAAY,CAAA;AACpE;AACA;AACA;AACA;AACA;AACA;AACA,EAAIgB,EAAAA,KAAK,IACLA,KAAK,CAACC,KAAK,CAACC,SAAS,CACnB,OAAO,EACPF,KAAK,CAACC,KAAK,CAACE,QAAQ,CAAC,UAAU,CAAC,EAChCH,KAAK,CAACC,KAAK,CAACE,QAAQ,CAAC,UAAU,CACjC,CAAC,CAAA;AACL;AACA;AACA;AACA;AACA;;;;"}
1
+ {"version":3,"file":"TextArea.styled.js","sources":["../../../src/components/inputs/TextArea/TextArea.styled.ts"],"sourcesContent":["/*\n * $-transient-prop pattern: rules in\n * `src/components/layout/SectionSeparator/SectionSeparator.styled.ts`, derivation and\n * measurements in `scripts/TS-MIGRATION-PLAYBOOK.md` §J.\n *\n * The largest styled file in the library: 11 components, 57 errors -> 1. It is mostly the\n * plain pattern applied at volume — 10 distinct `$` props, 9 of the 11 components carrying\n * a generic, no `styled()` of a third-party component, and no nested `css` block that needs\n * its own generic (the four nested ones here read only `props.theme`, §J.7's last line).\n * It is also where the audit found the most defects: FIVE. FOUR are still only commented at\n * their sites, because every available fix for them changes rendered CSS (§J.8):\n *\n * 1. THE PUBLIC `padding` PROP HAS NEVER WORKED. `TextArea.tsx:118` passes `$padding`,\n * `TextInputField` reads `padding`. Three dead rules. Same class as §E.3's\n * `$elevatedverticalPadding`.\n * 2. `themeProp(…, '!important')` at line 206 passes a STRING for `specificity`, which is\n * `number`. That is this file's ONE REMAINING ERROR and it is deliberate — see the\n * note there.\n * 3. `disabled` with no `$` on three components, leaking to the DOM.\n * 4. `readOnly` passed to a `<div>` that never reads it, also leaking.\n *\n * The fifth — `$fadeIn`, four reads and no writer anywhere in the repo's history — IS fixed\n * now that the sweep permits moving the baseline. See the note above `SuccessContainer`.\n */\nimport styled, { css, keyframes } from 'styled-components';\nimport { applyDefaultTheme } from '../../../utils/defaultTheme';\n\n/**\n * `TextArea.tsx`'s `type` prop, verbatim from its\n * `PropTypes.oneOf(['', 'error', 'error-border', 'warning-border', 'warning', 'loading', 'success'])`,\n * carried as `$type` by `TextInputField`, `TextInputFieldIconAlert`, `TextInput` and\n * `Description`.\n *\n * Closed on purpose (§J.6): the templates below branch on this value 26 times, and with a\n * closed union a mistyped state name is TS2367 instead of a rule that silently never\n * fires — which is exactly the failure this file already contains three of. `''` is a\n * member because the component defaults `type = ''` (tsx line 40).\n */\ntype TextAreaType =\n | ''\n | 'error'\n | 'error-border'\n | 'warning-border'\n | 'warning'\n | 'loading'\n | 'success'\n /*\n * NOT IN TextArea's OWN propTypes, AND STILL CORRECT. `Instructions.tsx:329` does\n * `<TextArea type={type} …>` and its own `type` union — verbatim from its propTypes —\n * carries `'instructions-warning'`, which six of `Instructions.stories.tsx`'s stories\n * set. So this value reaches `$type` today; the old propTypes just never said so, and\n * `oneOf` logged nothing because the two components' propTypes were never compared.\n *\n * RECORDING IT CHANGES NO CSS. No rule below matches on it, and crucially the\n * `!props.$type` guard at ~line 392 already distinguishes it from `''` — which is why\n * the alternative \"map it to `''` at the forward site\" was rejected: that WOULD change\n * the emitted border-color and move the baseline. Adding the member documents an\n * existing state; it does not create one.\n */\n | 'instructions-warning';\n\n/**\n * `TextArea.tsx`'s `padding` prop, from `PropTypes.oneOf(['small', 'medium', 'large'])`.\n * See `TextInputFieldStyleProps` for why this type has two members in that interface.\n *\n * `''` IS HERE FOR THE SAME REASON AS `TextAreaType`'s `'instructions-warning'`:\n * `Instructions`' `padding` union is `'' | 'small' | 'medium' | 'large'` and it forwards\n * the value straight through at `Instructions.tsx:354`. Every read of this value below is\n * an `===` against one of the three real sizes, so an extra member changes no comparison\n * result — and all three of those reads are dead anyway (the DEFERRED DEFECT below: the\n * component passes `$padding`, the template reads `padding`).\n */\ntype TextAreaPadding = '' | 'small' | 'medium' | 'large';\n\n/*\n * ====================== DEFERRED DEFECT (DOM leak, §E.4 third case) ====================\n * `disabled` HAS NO `$` ON `Label`, `InputIconContainer` OR `TextInput`, AND THAT IS A\n * DEFECT — declared here, not fixed here.\n *\n * `TextArea.tsx` passes `<S.Label htmlFor={uniqueId} disabled={disabled}>` (tsx:83),\n * `<S.TextInput … disabled={disabled} …>` (tsx:93) and\n * `<S.InputIconContainer disabled={disabled}>` (tsx:145). `disabled` is a member of\n * neither `LabelHTMLAttributes` nor `HTMLAttributes<HTMLDivElement>`, and\n * `shouldForwardProp` forwards every non-`$` prop, so `disabled=\"\"` is on all three\n * rendered elements today and is in the recorded render baseline.\n *\n * Note the contrast with `TextInputField`, which reads `props.disabled` and\n * `props.readOnly` and needs NO declaration for either: on a `<textarea>` both are real\n * `TextareaHTMLAttributes` members, so the reads typecheck with no generic at all. §J.9's\n * first case. That is the same prop name being correct in one place and a leak in another,\n * which is why §E.4 is a triage and not a rename.\n *\n * The fix is `$disabled` at both ends, which REMOVES three DOM attributes and so belongs\n * to C10 with its baseline re-record. `CompactTextInput.styled.ts` and\n * `CompactAutocompleteSelect.styled.ts` carry the identical defect.\n * ======================================================================================\n */\ninterface DisabledStyleProps {\n /** `disabled` — dims and blocks the pointer. Also reaches the DOM; see above. */\n disabled?: boolean;\n}\n\nconst fadeInCheck = keyframes`\n from {\n opacity: 0\n }\n to {\n opacity: 1\n }\n`;\n\n/*\n * A module-scope `css` helper with NO interpolations at all, so it has no props and needs\n * no generic — unlike `CompactAutocompleteSelect`'s `sharedStyle`, and therefore not\n * subject to §J.7's weak-type rule either. Hosts: `TextInputLabel` (twice) and `TextInput`\n * (twice).\n */\nconst activeLabel = css`\n font-size: 0.75rem;\n padding: 0 3px;\n top: -7px;\n letter-spacing: 0.03em;\n left: 8px !important;\n opacity: 1 !important;\n`;\n\n/*\n * Single-argument, and it stays that way — peer floor `styled-components: >=5.1.0`, and\n * the two majors disagree on the second parameter. §J.4. `prop` needs the annotation\n * because `withConfig` takes this by reference, so it gets no contextual typing.\n */\nconst shouldForwardProp = (prop: string): boolean => {\n return prop !== 'theme' && !prop.startsWith('$');\n};\n\nexport const TextAreaContainter = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n display: flex;\n`;\n\nexport const Label = styled.label\n .withConfig({\n shouldForwardProp\n })\n .attrs<DisabledStyleProps>(applyDefaultTheme)`\n ${props =>\n props.theme.themeProp(\n 'color',\n props.theme.getColor('white'),\n props.theme.getColor('gray-700')\n )};\n flex-basis: 33.33%;\n font-size: 0.875rem;\n line-height: 1rem;\n height: 19px;\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding-top: 13px;\n ${props =>\n props.disabled &&\n css`\n cursor: not-allowed;\n `}\n`;\n\nexport const InputIconContainer = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs<DisabledStyleProps>(applyDefaultTheme)`\n opacity: 0;\n pointer-events: none;\n border-top-right-radius: 3px;\n border-bottom-right-radius: 3px;\n display: flex;\n align-items: flex-start;\n\n position: absolute;\n right: 15px;\n top: 10px;\n bottom: 0;\n > .smallPadingIcon {\n padding: 4px;\n width: 15px;\n height: 15px;\n border-radius: 5px;\n opacity: 1;\n margin-top: -5px;\n ${props =>\n /*\n * ================== DEFERRED DEFECT — THIS FILE'S ONE REMAINING ERROR ==============\n * THE 4TH ARGUMENT IS `specificity`, WHICH IS A `number`, AND `'!important'` IS A\n * STRING. TS2345 \"Argument of type 'string' is not assignable to parameter of type\n * 'number'\", and it is the ONLY error left in this file.\n *\n * `utils/defaultTheme.ts`'s `ThemeProp` JSDoc names this exact call site and says the\n * `number` typing is deliberate: the implementation does `Array(specificity).fill('&')`,\n * so a string produces a ONE-element array and specificity 1 instead of the default 2.\n * The intent here was clearly to append `!important` to the declaration, which\n * `themeProp` cannot do at all — there is no parameter for it.\n *\n * So the type is right, the call is wrong, and §E.1 rule 3 says fix the code. Every\n * available fix — drop the argument (specificity 1 -> 2, so the generated selector\n * gains a `&`), pass `1` explicitly (keeps today's CSS but silently endorses a\n * one-`&` selector nobody chose), or write the `!important` into the two colour\n * arguments — is a change to the emitted CSS or to what the file claims. That makes\n * it C9 work with C10's re-record, and NOT a type-only commit's. A suppression is\n * refused for the same reason as §E.3's `themeProp` arity defects.\n * ===================================================================================\n */\n props.theme.themeProp(\n 'background-color',\n props.theme.getColor('gray-900'),\n props.theme.getColor('gray-300'),\n '!important'\n )}\n }\n svg {\n width: 15px;\n opacity: 0.7;\n transition: opacity 250ms;\n\n ${props =>\n props.disabled &&\n css`\n display: none;\n `}\n }\n`;\n\n/**\n * Props of `TextInputField`, the `<textarea>` itself. Six transient props plus the two\n * halves of a defect.\n *\n * `readOnly` and `disabled` are read by the template (7 times between them) and are\n * deliberately ABSENT from this interface: both are real `TextareaHTMLAttributes` members,\n * so those reads already typecheck and declaring them would add nothing. §J.9's first case.\n */\nexport interface TextInputFieldStyleProps {\n /**\n * `borderRadius` (`PropTypes.number`, default `0`) — interpolated as\n * `${props.$borderRadius}px`, so `number` and not `number | string`: a string here would\n * render `border-radius: 4pxpx`. Same reasoning as `SectionSeparator`'s `$margin`.\n */\n $borderRadius?: number;\n /** `type` — see `TextAreaType`. The template branches on it 26 times. */\n $type?: TextAreaType;\n /** `edit` — shows the editable-affordance background and border. */\n $edit?: boolean;\n /** `noBorder` — suppresses the border by matching it to the background. */\n $noBorder?: boolean;\n /** `Boolean(icon)` — makes room on the left for the icon. */\n $hasIcon?: boolean;\n /*\n * ================== DEFERRED DEFECT — THE PUBLIC `padding` PROP IS DEAD ==============\n * BOTH MEMBERS BELOW EXIST BECAUSE THE COMPONENT AND THE TEMPLATE DISAGREE ON THE NAME.\n *\n * `TextArea.tsx:118` passes `$padding={padding}`. This template reads `props.padding`\n * (three rules: `small` -> `5px 10px`, `medium` -> `13px 15px`, `large` -> `15px 55px`).\n * `padding` is never passed, so ALL THREE ARE DEAD, and `$padding` is never read, so it\n * does nothing. The `<textarea>` therefore always keeps the base `padding: 5px 10px` from\n * the top of the template — which happens to equal the `small` value, so THE DOCUMENTED\n * DEFAULT `padding = 'medium'` HAS NEVER BEEN APPLIED and neither has `large`.\n *\n * This is exactly §E.3's `$elevatedverticalPadding` class: a public, documented prop that\n * has never worked. The fix is to repoint the reads to `$padding`, which ACTIVATES three\n * rules and changes the padding of every `TextArea` that does not pass `padding=\"small\"`.\n * That is a visual change — C9 for the fix, C10 for the re-record, not this commit. §J.8.\n *\n * Both halves are declared so the type records the whole defect rather than half of it:\n * `padding` is what the template reads, `$padding` is what the component passes.\n * ====================================================================================\n */\n /** READ by the template, NEVER passed. The dead half — see above. */\n padding?: TextAreaPadding;\n /** PASSED by `TextArea.tsx:118`, never read. The inert half — see above. */\n $padding?: TextAreaPadding;\n}\n\nexport const TextInputField = styled.textarea\n .withConfig({\n shouldForwardProp\n })\n .attrs<TextInputFieldStyleProps>(applyDefaultTheme)`\n width: 100%;\n font-family: inherit;\n font-size: 0.875rem;\n border-radius: 3px;\n padding: 5px 10px;\n resize: vertical;\n z-index: 0;\n box-sizing: border-box;\n appearance: none;\n border: 1px solid;\n transition:\n height 550ms ease-in-out,\n border-color 350ms,\n background 350ms;\n\n ${props =>\n props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-100'),\n props.theme.getColor('gray-900')\n )}\n\n ${props =>\n props.$borderRadius &&\n css`\n border-radius: ${props.$borderRadius}px;\n `}\n\n ${props => {\n if (props.$type === 'error') {\n return css`\n ${props.theme.themeProp('color', 'white', 'black')}\n ${props.theme.themeProp('background', '#7f1b1b', '#FBEAE6')}\n ${props.theme.themeProp('border-color', '#7f1b1b', '#FBEAE6')}\n `;\n } else if (props.$type === 'warning') {\n return css`\n ${props.theme.themeProp('color', 'white', 'black')}\n ${props.theme.themeProp('background', '#634E01', '#FFFDE8')}\n ${props.theme.themeProp('border-color', '#634E01', '#FFFDE8')}\n `;\n } else if (props.$type === 'error-border') {\n return css`\n ${props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-100'),\n props.theme.getColor('gray-900')\n )}\n ${props.theme.themeProp(\n 'background',\n props.theme.getColor('gray-900'),\n props.theme.getColor('white')\n )}\n ${props.theme.themeProp(\n 'border-color',\n props.theme.getColor('red-200'),\n props.theme.getColor('red-500')\n )}\n `;\n } else if (props.$type === 'warning-border') {\n return css`\n ${props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-100'),\n props.theme.getColor('gray-900')\n )}\n ${props.theme.themeProp(\n 'background',\n props.theme.getColor('gray-900'),\n props.theme.getColor('white')\n )}\n ${props.theme.themeProp(\n 'border-color',\n props.theme.getColor('red-200'),\n props.theme.getColor('orange-500')\n )}\n `;\n } else {\n return css`\n ${props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-100'),\n props.theme.getColor('gray-900')\n )}\n ${props.theme.themeProp(\n 'background',\n props.theme.getColor('gray-900'),\n props.theme.getColor('white')\n )}\n ${props.theme.themeProp(\n 'border-color',\n props.theme.getColor('gray-500'),\n props.theme.getColor('gray-400')\n )}\n `;\n }\n }}\n\n\n ${props =>\n props.readOnly &&\n css`\n cursor: default;\n border-color: transparent !important;\n padding: 12px 10px;\n `}\n\n ${props =>\n props.disabled &&\n css`\n cursor: not-allowed;\n `}\n\n\n ${props =>\n props.$noBorder &&\n !props.$type &&\n css`\n ${props =>\n props.theme.themeProp(\n 'border-color',\n props.theme.getColor('gray-900'),\n props.theme.getColor('white')\n )}\n `} \n\n ${props =>\n props.$noBorder &&\n props.$type === 'warning' &&\n css`\n ${props => props.theme.themeProp('border-color', '#634E01', '#FFFDE8')}\n `}\n\n ${props =>\n props.$noBorder &&\n props.$type === 'error' &&\n css`\n ${props => props.theme.themeProp('border-color', '#7f1b1b', '#FBEAE6')}\n `}\n\n\n ${props =>\n props.padding === 'small' &&\n css`\n padding: 5px 10px;\n `}\n\n ${props =>\n props.padding === 'medium' &&\n css`\n padding: 13px 15px;\n `}\n\n ${props =>\n props.padding === 'large' &&\n css`\n padding: 15px 55px;\n `}\n\n ${props =>\n props.$hasIcon &&\n css`\n padding-left: 55px;\n padding-right: 35px;\n padding-top: 13.5px;\n `}\n\n\n &&:hover:not(:focus) {\n ${props => {\n if (props.disabled) {\n return '';\n }\n if (props.readOnly) {\n if (props.$type === 'error') {\n return props.theme.themeProp('background', '#7f1b1b', '#FBEAE6');\n } else if (props.$type === 'warning') {\n return props.theme.themeProp('background', '#634E01', '#FFFDE8');\n }\n return '';\n }\n\n if (props.$type === 'error') {\n return props.theme.themeProp('background', '#901d1d', '#F7D5D0');\n } else if (props.$type === 'warning') {\n return props.theme.themeProp('background', '#806403', '#FFFEBF');\n } else if (!props.disabled) {\n return props.theme.themeProp(\n 'background',\n props.theme.getColor('gray-700'),\n props.theme.getColor('gray-100')\n );\n }\n return '';\n }}\n\n ${props =>\n props.$edit &&\n props.theme.themeProp(\n 'border-color',\n props.theme.getColor('gray-700'),\n props.theme.getColor('gray-100')\n )}\n\n ${props =>\n props.$noBorder && !props.readOnly && props.$type !== 'warning' && props.$type !== 'error'\n ? props.theme.themeProp(\n 'background',\n props.theme.getColor('gray-700'),\n props.theme.getColor('gray-100')\n )\n : ''}\n\n & + ${InputIconContainer} {\n opacity: 1;\n ${props =>\n props.$type === 'success' &&\n css`\n opacity: 0;\n `}\n }\n }\n\n&::placeholder {\n ${props => {\n if (props.$type === 'error' || props.$type === 'warning') {\n return css`\n color: ${props.theme.getColor('gray-400')};\n opacity: 0.9;\n `;\n } else {\n return css`\n ${props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-400'),\n props.theme.getColor('gray-500')\n )}\n opacity: 0.6;\n `;\n }\n }}\n}\n\n ${props =>\n props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-300'),\n props.theme.getColor('gray-600')\n )};\n\n\n\n &:focus::placeholder {\n ${props => {\n if (props.$type === 'warning' || props.$type === 'error') {\n return css`\n color: ${props.theme.getColor('gray-500')} !important;\n opacity: 0.8 !important;\n `;\n } else {\n return css`\n ${props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-300'),\n props.theme.getColor('gray-600')\n )}\n `;\n }\n }}\n }\n\n &&:focus {\n outline: none;\n\n ${props => {\n if (props.readOnly) {\n if (props.$type === 'error') {\n return props.theme.themeProp('background', '#7f1b1b', '#FBEAE6');\n } else if (props.$type === 'warning') {\n return props.theme.themeProp('background', '#634E01', '#FFFDE8');\n }\n return '';\n }\n\n if (props.$type === 'error') {\n return css`\n ${props.theme.themeProp('border-color', '#D83018', '#D83018')}\n ${props.theme.themeProp('background', 'white', 'white')}\n ${props.theme.themeProp('color', 'black', 'black')}\n `;\n } else if (props.$type === 'warning') {\n return css`\n ${props.theme.themeProp('border-color', '#F4E21E', '#F4E21E')}\n ${props.theme.themeProp('background', 'white', 'white')}\n ${props.theme.themeProp('color', 'black', 'black')}\n `;\n } else {\n return css`\n border-color: ${props.theme.getColor('gray-600')};\n ${props.theme.themeProp(\n 'background',\n props.theme.getColor('gray-700'),\n props.theme.getColor('gray-100')\n )}\n `;\n }\n }}\n }\n\n &&:not(:hover):not(:focus) {\n ${props => {\n if (props.$edit) {\n if (props.$type === 'error') {\n return props.theme.themeProp('background', '#7f1b1b', '#FEE2E2');\n } else if (props.$type === 'warning') {\n return props.theme.themeProp('background', '#634E01', '#FFFDE8');\n } else {\n return props.theme.themeProp(\n 'background',\n 'rgba(39,39,42, 0.7)',\n 'rgba(244,244,245, 0.3)'\n );\n }\n }\n }}\n\n ${props =>\n props.$edit &&\n props.theme.themeProp('border-color', 'rgba(39,39,42, 0.7)', 'rgba(228,228,231, 0.3)')}\n\n ${props =>\n props.$noBorder &&\n props.$edit &&\n css`\n ${props => props.theme.themeProp('border-color', '#27272A', 'rgba(244,244,245, 0.3)')}\n `}\n }\n`;\n\n/**\n * Props of `TextInputLabel`, the floating label. All three come from `TextArea.tsx:150-155`.\n */\ninterface TextInputLabelStyleProps {\n /** `inputIsEmpty` state — the label only floats up when the field is NOT empty. */\n $inputIsEmpty?: boolean;\n /** `Boolean(placeholder)` — a placeholder also forces the label up. */\n $hasPlaceholder?: boolean;\n /** `Boolean(icon)` — shifts the label right to clear the icon. */\n $hasIcon?: boolean;\n}\n\nexport const TextInputLabel = styled.label\n .withConfig({\n shouldForwardProp\n })\n .attrs<TextInputLabelStyleProps>(applyDefaultTheme)`\n position: absolute;\n top: 13px;\n left: 11px;\n line-height: 1.2;\n font-size: 0.875rem;\n transition: all 150ms;\n margin-botton: 50px;\n\n ${props =>\n props.theme.themeProp(\n 'color',\n props.theme.getColor('white'),\n props.theme.getColor('gray-700')\n )};\n\n ${props => props.theme.themeProp('opacity', 0.6, 0.5)}\n\n\n ${props =>\n props.theme.themeProp(\n 'background',\n `linear-gradient(0deg, ${props.theme.getColor('gray-900')} calc(50% + 1px), transparent 50%)`,\n `linear-gradient(0deg, ${props.theme.getColor('white')} calc(50% + 1px), transparent 50%)`\n )}\n\n ${props =>\n !props.$inputIsEmpty &&\n css`\n ${activeLabel}\n `}\n\n ${props =>\n props.$hasPlaceholder &&\n css`\n ${activeLabel};\n `}\n content: \"\";\n\n ${props =>\n props.$hasIcon &&\n css`\n left: 55px;\n `}\n`;\n\nexport const TextInputFieldIcon = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n position: absolute;\n top: 0;\n left: 0;\n height: 2.625rem;\n display: flex;\n padding: 0 10px;\n\n svg {\n width: 15px;\n opacity: 0.6;\n transition: opacity 250ms;\n }\n`;\n\nexport const TextInputFieldIconAlert = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs<{ $type?: TextAreaType }>(applyDefaultTheme)`\n position: absolute;\n top: 2.8px;\n display: flex;\n padding: 0 10px 0 30px;\n opacity: 0.6;\n transition: opacity 250ms;\n ${props => props.$type === 'warning' && props.theme.themeProp('color', '#EAB308', '#2F2402')}\n svg {\n margin-top: 12px;\n width: 15px;\n }\n`;\n\n/**\n * Props of `TextInput`, the positioning wrapper. `TextArea.tsx:91-98` renders\n * `<S.TextInput $fieldLabel={…} disabled={disabled} readOnly={readOnly} $type={type} …>`.\n */\ninterface TextInputStyleProps extends DisabledStyleProps {\n /** `!isEmpty(fieldLabel)` — narrows the wrapper to 66.66% so the field label gets a third. */\n $fieldLabel?: boolean;\n /** `type` — only the `error` arm is used here, to recolour the floated label. */\n $type?: TextAreaType;\n /*\n * ============== DEFERRED DEFECT (DOM leak, and nothing even reads it) ================\n * `readOnly` IS PASSED TO THIS `<div>` (tsx:94) AND THIS TEMPLATE NEVER READS IT.\n *\n * So it is not a dead branch — there is no branch — it is a pure DOM leak:\n * `readOnly` is not a member of `HTMLAttributes<HTMLDivElement>`, `shouldForwardProp`\n * forwards every non-`$` prop, and `readonly=\"\"` is therefore on the rendered `<div>` and\n * in the recorded baseline. The `<textarea>` inside it receives its own `readOnly`\n * separately (tsx:110), where the attribute is real and does something.\n *\n * Declared because the component genuinely passes it — §E.4's \"declaring it is accurate\"\n * — and reported rather than fixed: DELETING the prop removes a DOM attribute and moves\n * the baseline, so it is C10 work.\n * ====================================================================================\n */\n /** Passed by `TextArea.tsx:94`, read by nothing. Leaks as `readonly=\"\"`; see above. */\n readOnly?: boolean;\n}\n\nexport const TextInput = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs<TextInputStyleProps>(applyDefaultTheme)`\n position: relative;\n flex-basis: ${props => (props.$fieldLabel ? '66.66%' : '100%')};\n\n ${props =>\n props.disabled &&\n css`\n opacity: 0.5;\n\n > * {\n cursor: not-allowed;\n }\n `}\n\n &:focus-within {\n ${TextInputLabel} {\n ${activeLabel};\n }\n\n ${TextInputFieldIcon} {\n svg {\n opacity: 1;\n }\n }\n }\n\n ${TextInputField}:not(:placeholder-shown) + ${TextInputLabel} {\n ${activeLabel};\n ${props =>\n props.$type === 'error' &&\n props.theme.themeProp(\n 'color',\n props.theme.getColor('red-200'),\n props.theme.getColor('red-500')\n )}\n }\n`;\n\nexport const Description = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs<{ $type?: TextAreaType }>(applyDefaultTheme)`\n margin: 8px 0 0 0;\n padding: 0 0.6875rem;\n font-size: 0.75rem;\n line-height: 1.333;\n\n ${props =>\n props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-400'),\n props.theme.getColor('gray-500')\n )};\n\n ${props =>\n (props.$type === 'warning-border' || props.$type === 'warning') &&\n css`\n ${props.theme.themeProp(\n 'color',\n props.theme.getColor('red-200'),\n props.theme.getColor('orange-500')\n )}\n `}\n\n ${props =>\n (props.$type === 'error-border' || props.$type === 'error') &&\n css`\n ${props.theme.themeProp(\n 'color',\n props.theme.getColor('red-200'),\n props.theme.getColor('red-500')\n )}\n `}\n`;\n\n/*\n * ================== `$fadeIn` IS GONE — DEAD BRANCH REMOVED (§E.4 first case) =============\n * The previous revision of both components below read `props.$fadeIn` twice each:\n *\n * opacity: ${props => (props.$fadeIn ? 0 : 1)};\n * animation: ${props => (props.$fadeIn ? fadeOutCheck : fadeInCheck)} 0.5s ease-in-out;\n *\n * NOTHING HAS EVER PASSED IT. `git log --all -S'fadeIn='` returns no commit that writes the\n * prop anywhere in `src`; `TextArea.tsx` renders `<S.SuccessContainer>` (tsx:275) and\n * `<S.SuccessContainerLabel>` (tsx:221) with no props at all. So `props.$fadeIn` was always\n * `undefined`, `opacity` was always the `1` the line above it already sets, and\n * `fadeOutCheck` was unreachable.\n *\n * IT WAS NOT AN UNIMPLEMENTED FEATURE, IT WAS A MISTYPED IDENTIFIER. `fadeIn` entered the\n * repo in `4ed910a` (\"Fix success and Show More\") in `CompactTextInput.styled.js`, in a\n * `CheckIconContainer` whose sibling line reads `props.success` and whose twin in\n * `CompactStarRating.styled.js` reads `props.success` in BOTH lines. It is a slip of\n * `success`, copy-propagated into `InputSuccessContainer` (`f793c6c`) and from there into\n * this file and two others.\n *\n * WIRING IT UP WAS REJECTED, on the state machines rather than on the history: no component\n * here has a \"success is going away\" transition to hang a fade-out on. `SuccessContainer` is\n * mounted only while `type` is `'loading'`/`'success'` and UNMOUNTS the moment it is not, so\n * there is no element left to fade; `SuccessContainerLabel` is mounted whenever `fieldLabel`\n * is set and merely swaps its children, so fading it would fade an empty 15x15 box. Making\n * either fade out needs a delayed-unmount state machine — a new feature, not a bug fix.\n *\n * `NMB-3183` already settled this exact code: `7e46b9d` deleted the same two lines from\n * `CompactTextInput.styled.js`'s `SuccessContainer` and `InputSuccessContainer`, and\n * `59b0041` deleted the keyframes they orphaned. These three files were the sites that\n * refactor missed.\n *\n * WHAT WAS KEPT AND WHY: the `animation` declaration, now static, because the branch it\n * always took is live and visible — `SuccessContainer` mounts when `type` becomes\n * `'loading'`/`'success'` and the icon genuinely fades in over 0.5s. Deleting that would be\n * a regression dressed as a cleanup. Only the unreachable half is gone, so the emitted\n * `animation` text is byte-identical and the one removed declaration is a duplicate\n * `opacity: 1`.\n * =========================================================================================\n */\nexport const SuccessContainer = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n opacity: 1;\n pointer-events: none;\n animation: ${fadeInCheck} 0.5s ease-in-out;\n transition: opacity 0.5s ease-in-out;\n position: absolute;\n margin-top: -35px;\n margin-left: 5px;\n width: 15px;\n height: 15px;\n padding: 5px;\n ${props =>\n props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-300'),\n props.theme.getColor('gray-500')\n )}\n\n > svg {\n width: 15px;\n }\n`;\n\nexport const SuccessContainerLabel = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n opacity: 1;\n pointer-events: none;\n animation: ${fadeInCheck} 0.5s ease-in-out;\n transition: opacity 0.5s ease-in-out;\n margin-right: 5px;\n margin-top: -7px;\n width: 15px;\n height: 15px;\n padding: 5px;\n ${props =>\n props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-300'),\n props.theme.getColor('gray-500')\n )}\n\n > svg {\n width: 13px;\n }\n`;\n"],"names":["fadeInCheck","keyframes","activeLabel","css","shouldForwardProp","prop","startsWith","TextAreaContainter","styled","div","withConfig","attrs","applyDefaultTheme","displayName","componentId","Label","label","props","theme","themeProp","getColor","disabled","InputIconContainer","TextInputField","textarea","$borderRadius","$type","readOnly","$noBorder","padding","$hasIcon","$edit","TextInputLabel","$inputIsEmpty","$hasPlaceholder","TextInputFieldIcon","TextInputFieldIconAlert","TextInput","$fieldLabel","Description","SuccessContainer","SuccessContainerLabel"],"mappings":";;;AAsGA,MAAMA,WAAW,GAAGC,SAAS,CAAA,CAAA,8BAAA,CAAA,CAO5B;AAQD,MAAMC,WAAW,GAAGC,GAAG,CAAA,CAAA,0GAAA,CAAA,CAOtB;AAOD,MAAMC,iBAAiB,GAAIC,IAAY,IAAc;EACnD,OAAOA,IAAI,KAAK,OAAO,IAAI,CAACA,IAAI,CAACC,UAAU,CAAC,GAAG,CAAC;AAClD,CAAC;AAEM,MAAMC,kBAAkB,GAAGC,MAAM,CAACC,GAAG,CACzCC,UAAU,CAAC;AACVN,EAAAA;AACF,CAAC,CAAC,CACDO,KAAK,CAACC,iBAAiB,CAAC,CAAAF,UAAA,CAAA;EAAAG,WAAA,EAAA,oCAAA;EAAAC,WAAA,EAAA;AAAA,CAAA,CAAA,CAAA,CAAA,eAAA,CAAA;AAIpB,MAAMC,KAAK,GAAGP,MAAM,CAACQ,KAAK,CAC9BN,UAAU,CAAC;AACVN,EAAAA;AACF,CAAC,CAAC,CACDO,KAAK,CAAqBC,iBAAiB,CAAC,CAAAF,UAAA,CAAA;EAAAG,WAAA,EAAA,uBAAA;EAAAC,WAAA,EAAA;AAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAA,oJAAA,EAAA,EAAA,CAAA,EAC3CG,KAAK,IACLA,KAAK,CAACC,KAAK,CAAC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AiB,CAAC,CAAAF,UAAA,CAAA;EAAAG,WAAA,EAAA,uCAAA;EAAAC,WAAA,EAAA;AAAA,CAAA,CAAA,CAAA,CAAA,0CAAA,EAAA,4HAAA,EAAA,qBAAA,CAAA,EAGZd,WAAW,EAOtBiB,KAAK,IACLA,KAAK,CAACC,KAAK,CAACC,SAAS,CACnB,OAAO,EACPF,KAAK,CAACC,KAAK,CAACE,QAAQ,CAAC,UAAU,CAAC,EAChCH,KAAK,CAACC,KAAK,CAACE,QAAQ,CAAC,UAAU,CACjC,CAAC;;;;"}
@@ -1,11 +1,10 @@
1
- import { extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
2
1
  import React__default, { useRef, useState, useMemo } from 'react';
3
2
  import { nanoid } from 'nanoid';
4
- import PropTypes from 'prop-types';
5
3
  import useMergedRefs from '@restart/hooks/useMergedRefs';
6
- import { isBoolean, isEmpty } from 'lodash';
4
+ import { isEmpty } from 'lodash';
7
5
  import { ReactComponent as SvgEditNote } from '../../icons/edit-note.svg.js';
8
6
  import { TextInput as TextInput$1, TextInputFieldIcon, TextInputWrapper, Adornment, TextInputField, InputIconContainer, TextInputLabel, Description } from './TextInput.styled.js';
7
+ import { jsxs, jsx } from 'react/jsx-runtime';
9
8
 
10
9
  const TextInput = React__default.forwardRef(function TextInput({
11
10
  value,
@@ -13,7 +12,7 @@ const TextInput = React__default.forwardRef(function TextInput({
13
12
  name,
14
13
  label,
15
14
  placeholder,
16
- type,
15
+ type = 'text',
17
16
  required,
18
17
  disabled,
19
18
  readOnly,
@@ -27,20 +26,20 @@ const TextInput = React__default.forwardRef(function TextInput({
27
26
  style,
28
27
  onChange,
29
28
  onBlur,
30
- noBorder,
29
+ noBorder = false,
31
30
  ...rest
32
31
  }, forwardedRef) {
33
32
  const textInputDomNode = useRef(null);
34
33
  const textInputRef = useMergedRefs(forwardedRef, textInputDomNode);
35
34
  const [uniqueId] = useState(nanoid());
36
35
  const hasError = useMemo(() => {
37
- if (isBoolean(error)) {
36
+ if (typeof error === 'boolean') {
38
37
  return error;
39
38
  }
40
39
  return !isEmpty(error);
41
40
  }, [error]);
42
41
  const hasWarning = useMemo(() => {
43
- if (isBoolean(warning)) {
42
+ if (typeof warning === 'boolean') {
44
43
  return warning;
45
44
  }
46
45
  return !isEmpty(warning);
@@ -57,83 +56,64 @@ const TextInput = React__default.forwardRef(function TextInput({
57
56
  }
58
57
  return null;
59
58
  }, [description, error, warning]);
60
- return React__default.createElement(TextInput$1, {
59
+ return jsxs(TextInput$1, {
61
60
  $error: hasError,
62
61
  disabled: disabled,
63
62
  $warning: hasWarning,
64
63
  className: className,
65
- style: style
66
- }, typeof icon !== 'undefined' && React__default.createElement(TextInputFieldIcon, null, icon), React__default.createElement(TextInputWrapper, null, typeof adornments?.prefix === 'string' && adornments.prefix.length > 0 && React__default.createElement(Adornment, {
67
- htmlFor: `text-input-${uniqueId}`,
68
- $error: hasError,
69
- $warning: hasWarning,
70
- $isPrefix: true,
71
- onClick: () => textInputDomNode.current.focus()
72
- }, adornments.prefix), React__default.createElement(TextInputField, _extends({
73
- ref: textInputRef,
74
- value: value,
75
- defaultValue: defaultValue,
76
- name: name,
77
- placeholder: placeholder || ' ',
78
- type: type,
79
- required: required,
80
- autoComplete: autoComplete,
81
- $hasIcon: Boolean(icon),
82
- $error: hasError,
83
- $warning: hasWarning,
84
- id: `text-input-${uniqueId}`,
85
- onChange: onChange,
86
- onBlur: onBlur,
87
- readOnly: readOnly,
88
- $noBorder: noBorder
89
- }, rest)), !readOnly && noBorder && React__default.createElement(InputIconContainer, {
90
- $error: hasError,
91
- $warning: hasWarning
92
- }, React__default.createElement(SvgEditNote, null)), label && React__default.createElement(TextInputLabel, {
93
- htmlFor: `text-input-${uniqueId}`,
94
- $hasPlaceholder: Boolean(placeholder),
95
- $hasAdornments: Boolean(typeof adornments?.prefix === 'string' && adornments.prefix.length > 0 || typeof adornments?.suffix === 'string' && adornments.suffix.length > 0),
96
- $hasIcon: Boolean(icon),
97
- $error: hasError
98
- }, label, required && ' *'), typeof adornments?.suffix === 'string' && adornments.suffix.length > 0 && React__default.createElement(Adornment, {
99
- $error: hasError,
100
- $warning: hasWarning,
101
- $isPrefix: false,
102
- onClick: () => textInputDomNode.current.focus()
103
- }, adornments.suffix)), typeof descriptionText === 'string' && descriptionText.length > 0 && React__default.createElement(Description, {
104
- $error: hasError,
105
- $warning: hasWarning
106
- }, descriptionText));
64
+ style: style,
65
+ children: [typeof icon !== 'undefined' && jsx(TextInputFieldIcon, {
66
+ children: icon
67
+ }), jsxs(TextInputWrapper, {
68
+ children: [typeof adornments?.prefix === 'string' && adornments.prefix.length > 0 && jsx(Adornment, {
69
+ htmlFor: `text-input-${uniqueId}`,
70
+ $error: hasError,
71
+ $warning: hasWarning,
72
+ $isPrefix: true,
73
+ onClick: () => textInputDomNode.current.focus(),
74
+ children: adornments.prefix
75
+ }), jsx(TextInputField, {
76
+ ref: textInputRef,
77
+ value: value,
78
+ defaultValue: defaultValue,
79
+ name: name,
80
+ placeholder: placeholder || ' ',
81
+ type: type,
82
+ required: required,
83
+ autoComplete: autoComplete,
84
+ $hasIcon: Boolean(icon),
85
+ $error: hasError,
86
+ $warning: hasWarning,
87
+ id: `text-input-${uniqueId}`,
88
+ onChange: onChange,
89
+ onBlur: onBlur,
90
+ readOnly: readOnly,
91
+ $noBorder: noBorder,
92
+ ...rest
93
+ }), !readOnly && noBorder && jsx(InputIconContainer, {
94
+ $error: hasError,
95
+ $warning: hasWarning,
96
+ children: jsx(SvgEditNote, {})
97
+ }), label && jsxs(TextInputLabel, {
98
+ htmlFor: `text-input-${uniqueId}`,
99
+ $hasPlaceholder: Boolean(placeholder),
100
+ $hasAdornments: Boolean(typeof adornments?.prefix === 'string' && adornments.prefix.length > 0 || typeof adornments?.suffix === 'string' && adornments.suffix.length > 0),
101
+ $hasIcon: Boolean(icon),
102
+ children: [label, required && ' *']
103
+ }), typeof adornments?.suffix === 'string' && adornments.suffix.length > 0 && jsx(Adornment, {
104
+ $error: hasError,
105
+ $warning: hasWarning,
106
+ $isPrefix: false,
107
+ onClick: () => textInputDomNode.current.focus(),
108
+ children: adornments.suffix
109
+ })]
110
+ }), typeof descriptionText === 'string' && descriptionText.length > 0 && jsx(Description, {
111
+ $error: hasError,
112
+ $warning: hasWarning,
113
+ children: descriptionText
114
+ })]
115
+ });
107
116
  });
108
- TextInput.defaultProps = {
109
- type: 'text',
110
- noBorder: false
111
- };
112
- TextInput.propTypes = process.env.NODE_ENV !== "production" ? {
113
- value: PropTypes.string,
114
- defaultValue: PropTypes.string,
115
- name: PropTypes.string,
116
- label: PropTypes.string,
117
- placeholder: PropTypes.string,
118
- type: PropTypes.string,
119
- required: PropTypes.bool,
120
- disabled: PropTypes.bool,
121
- readOnly: PropTypes.bool,
122
- autoComplete: PropTypes.string,
123
- description: PropTypes.string,
124
- error: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),
125
- warning: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),
126
- icon: PropTypes.element,
127
- adornments: PropTypes.shape({
128
- prefix: PropTypes.string,
129
- suffix: PropTypes.string
130
- }),
131
- className: PropTypes.string,
132
- style: PropTypes.object,
133
- onChange: PropTypes.func,
134
- onBlur: PropTypes.func,
135
- noBorder: PropTypes.bool
136
- } : {};
137
117
 
138
118
  export { TextInput as default };
139
119
  //# sourceMappingURL=TextInput.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TextInput.js","sources":["../../../src/components/inputs/TextInput/TextInput.js"],"sourcesContent":["import React, { useMemo, useRef, useState } from 'react';\n\nimport { nanoid } from 'nanoid';\nimport PropTypes from 'prop-types';\n\nimport useMergedRefs from '@restart/hooks/useMergedRefs';\nimport { isBoolean, isEmpty } from 'lodash';\nimport { ReactComponent as EditNoteIcon } from '../../../icons/edit-note.svg';\nimport * as S from './TextInput.styled';\n\n/**\n * Text inputs let users enter and edit text in the UI. They typically appear in forms and dialogs.\n *\n * ### Import\n *\n * ``` js\n * import { TextInput } from '@ntbjs/react-components/inputs'\n * // or\n * import TextInput from '@ntbjs/react-components/inputs/TextInput'\n * ```\n */\nconst TextInput = React.forwardRef(function TextInput(\n {\n value,\n defaultValue,\n name,\n label,\n placeholder,\n type,\n required,\n disabled,\n readOnly,\n autoComplete,\n description,\n error,\n warning,\n icon,\n adornments,\n className,\n style,\n onChange,\n onBlur,\n noBorder,\n ...rest\n },\n forwardedRef\n) {\n const textInputDomNode = useRef(null);\n const textInputRef = useMergedRefs(forwardedRef, textInputDomNode);\n const [uniqueId] = useState(nanoid());\n\n const hasError = useMemo(() => {\n if (isBoolean(error)) {\n return error;\n }\n\n return !isEmpty(error);\n }, [error]);\n\n const hasWarning = useMemo(() => {\n if (isBoolean(warning)) {\n return warning;\n }\n\n return !isEmpty(warning);\n }, [warning]);\n\n const descriptionText = useMemo(() => {\n if (!isEmpty(error)) {\n return error;\n }\n\n if (!isEmpty(warning)) {\n return warning;\n }\n\n if (!isEmpty(description)) {\n return description;\n }\n\n return null;\n }, [description, error, warning]);\n\n return (\n <S.TextInput\n $error={hasError}\n disabled={disabled}\n $warning={hasWarning}\n className={className}\n style={style}\n >\n {typeof icon !== 'undefined' && <S.TextInputFieldIcon>{icon}</S.TextInputFieldIcon>}\n <S.TextInputWrapper>\n {typeof adornments?.prefix === 'string' && adornments.prefix.length > 0 && (\n <S.Adornment\n htmlFor={`text-input-${uniqueId}`}\n $error={hasError}\n $warning={hasWarning}\n $isPrefix={true}\n onClick={() => textInputDomNode.current.focus()}\n >\n {adornments.prefix}\n </S.Adornment>\n )}\n <S.TextInputField\n ref={textInputRef}\n value={value}\n defaultValue={defaultValue}\n name={name}\n placeholder={placeholder || ' '}\n type={type}\n required={required}\n autoComplete={autoComplete}\n $hasIcon={Boolean(icon)}\n $error={hasError}\n $warning={hasWarning}\n id={`text-input-${uniqueId}`}\n onChange={onChange}\n onBlur={onBlur}\n readOnly={readOnly}\n $noBorder={noBorder}\n {...rest}\n />\n {!readOnly && noBorder && (\n <S.InputIconContainer $error={hasError} $warning={hasWarning}>\n <EditNoteIcon />\n </S.InputIconContainer>\n )}\n {label && (\n <S.TextInputLabel\n htmlFor={`text-input-${uniqueId}`}\n $hasPlaceholder={Boolean(placeholder)}\n $hasAdornments={Boolean(\n (typeof adornments?.prefix === 'string' && adornments.prefix.length > 0) ||\n (typeof adornments?.suffix === 'string' && adornments.suffix.length > 0)\n )}\n $hasIcon={Boolean(icon)}\n $error={hasError}\n >\n {label}\n {required && ' *'}\n </S.TextInputLabel>\n )}\n {typeof adornments?.suffix === 'string' && adornments.suffix.length > 0 && (\n <S.Adornment\n $error={hasError}\n $warning={hasWarning}\n $isPrefix={false}\n onClick={() => textInputDomNode.current.focus()}\n >\n {adornments.suffix}\n </S.Adornment>\n )}\n </S.TextInputWrapper>\n {typeof descriptionText === 'string' && descriptionText.length > 0 && (\n <S.Description $error={hasError} $warning={hasWarning}>\n {descriptionText}\n </S.Description>\n )}\n </S.TextInput>\n );\n});\n\nTextInput.defaultProps = {\n type: 'text',\n noBorder: false\n};\n\nTextInput.propTypes = {\n /**\n * Content of the text input field\n */\n value: PropTypes.string,\n\n /**\n * Default content of the text input field\n */\n defaultValue: PropTypes.string,\n\n /**\n * Name of the text input field (used when sending form data)\n */\n name: PropTypes.string,\n\n /**\n * Label text for the text input field. If the text input field is empty (no input and no placeholder)\n * and isn't in focus, the label text will be displayed grayed out in the field itself.\n * Otherwise, the label text will be displayed in the top left corner.\n */\n label: PropTypes.string,\n\n /**\n * Placeholder text to be displayed if the text area is empty (no input)\n */\n placeholder: PropTypes.string,\n\n /**\n * Type of input – e.g. `text`, `email`, `password`, etc.\n */\n type: PropTypes.string,\n\n /**\n * Whether the field is required\n */\n required: PropTypes.bool,\n\n /**\n * Whether the field is disabled\n */\n disabled: PropTypes.bool,\n\n /**\n * Whether the field is read-only\n */\n readOnly: PropTypes.bool,\n\n /**\n * ?\n */\n autoComplete: PropTypes.string,\n\n /**\n * Descriptive text displayed below the text input field\n */\n description: PropTypes.string,\n\n /**\n * Set to `true` to display the text input field with a red border. Set to a string to\n * aslo display the given string as an error message below the field.\n */\n error: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),\n\n /**\n * Set to `true` to display the text input field with a yellow/orange border. Set to a string to\n * aslo display the given string as a warning message below the field.\n */\n warning: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),\n\n /**\n * Optional icon to be displayed left of the text inside the text area\n */\n icon: PropTypes.element,\n\n /**\n * Text to be displayed before/after the user input. Takes an object with two values:\n * `prefix` and `suffix`, where prefix will be displayed before and suffix will be\n * displayed after the user input.\n */\n adornments: PropTypes.shape({ prefix: PropTypes.string, suffix: PropTypes.string }),\n\n /**\n * Add custom class names to the HTML element\n */\n className: PropTypes.string,\n\n /**\n * Add custom CSS styling\n */\n style: PropTypes.object,\n\n /**\n * Optional callback function for the `onChange` event\n */\n onChange: PropTypes.func,\n\n /**\n * Optional callback function for the `onBlur` event\n */\n onBlur: PropTypes.func,\n\n /**\n * Whether to display the text input field without borders when it's not in focus\n */\n noBorder: PropTypes.bool\n};\n\nexport default TextInput;\n"],"names":["TextInput","React","forwardRef","value","defaultValue","name","label","placeholder","type","required","disabled","readOnly","autoComplete","description","error","warning","icon","adornments","className","style","onChange","onBlur","noBorder","rest","forwardedRef","textInputDomNode","useRef","textInputRef","useMergedRefs","uniqueId","useState","nanoid","hasError","useMemo","isBoolean","isEmpty","hasWarning","descriptionText","createElement","S","$error","$warning","prefix","length","htmlFor","$isPrefix","onClick","current","focus","_extends","ref","$hasIcon","Boolean","id","$noBorder","EditNoteIcon","$hasPlaceholder","$hasAdornments","suffix","defaultProps","propTypes","process","env","NODE_ENV","PropTypes","string","bool","oneOfType","element","shape","object","func"],"mappings":";;;;;;;;;AAqBMA,MAAAA,SAAS,GAAGC,cAAK,CAACC,UAAU,CAAC,SAASF,SAASA,CACnD;EACEG,KAAK;EACLC,YAAY;EACZC,IAAI;EACJC,KAAK;EACLC,WAAW;EACXC,IAAI;EACJC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;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M7BnD,EAAAA,KAAK,EAAEkD,SAAS,CAACG,SAAS,CAAC,CAACH,SAAS,CAACE,IAAI,EAAEF,SAAS,CAACC,MAAM,CAAC,CAAC;AAM9DlD,EAAAA,OAAO,EAAEiD,SAAS,CAACG,SAAS,CAAC,CAACH,SAAS,CAACE,IAAI,EAAEF,SAAS,CAACC,MAAM,CAAC,CAAC;EAKhEjD,IAAI,EAAEgD,SAAS,CAACI,OAAO;AAOvBnD,EAAAA,UAAU,EAAE+C,SAAS,CAACK,KAAK,CAAC;IAAE3B,MAAM,EAAEsB,SAAS,CAACC,MAAM;IAAEP,MAAM,EAAEM,SAAS,CAACC,MAAAA;AAAO,GAAC,CAAC;EAKnF/C,SAAS,EAAE8C,SAAS,CAACC,MAAM;EAK3B9C,KAAK,EAAE6C,SAAS,CAACM,MAAM;EAKvBlD,QAAQ,EAAE4C,SAAS,CAACO,IAAI;EAKxBlD,MAAM,EAAE2C,SAAS,CAACO,IAAI;EAKtBjD,QAAQ,EAAE0C,SAAS,CAACE,IAAAA;AACtB,CAAC,GAAA,EAAA;;;;"}
1
+ {"version":3,"file":"TextInput.js","sources":["../../../src/components/inputs/TextInput/TextInput.tsx"],"sourcesContent":["import React, { useMemo, useRef, useState } from 'react';\n\nimport { nanoid } from 'nanoid';\n\nimport useMergedRefs from '@restart/hooks/useMergedRefs';\nimport { isEmpty } from 'lodash';\nimport { ReactComponent as EditNoteIcon } from '../../../icons/edit-note.svg';\nimport * as S from './TextInput.styled';\n\ntype TextInputOwnProps = {\n /**\n * Content of the text input field\n */\n value?: string;\n /**\n * Default content of the text input field\n */\n defaultValue?: string;\n /**\n * Name of the text input field (used when sending form data)\n */\n name?: string;\n /**\n * Label text for the text input field. If the text input field is empty (no input and no placeholder)\n * and isn't in focus, the label text will be displayed grayed out in the field itself.\n * Otherwise, the label text will be displayed in the top left corner.\n */\n label?: string;\n /**\n * Placeholder text to be displayed if the text area is empty (no input)\n */\n placeholder?: string;\n /**\n * Type of input – e.g. `text`, `email`, `password`, etc.\n */\n type?: string;\n /**\n * Whether the field is required\n */\n required?: boolean;\n /**\n * Whether the field is disabled\n */\n disabled?: boolean;\n /**\n * Whether the field is read-only\n */\n readOnly?: boolean;\n /**\n * ?\n */\n autoComplete?: string;\n /**\n * Descriptive text displayed below the text input field\n */\n description?: string;\n /**\n * Set to `true` to display the text input field with a red border. Set to a string to\n * aslo display the given string as an error message below the field.\n */\n error?: boolean | string;\n /**\n * Set to `true` to display the text input field with a yellow/orange border. Set to a string to\n * aslo display the given string as a warning message below the field.\n */\n warning?: boolean | string;\n /**\n * Optional icon to be displayed left of the text inside the text area\n */\n icon?: React.ReactElement<any>;\n /**\n * Text to be displayed before/after the user input. Takes an object with two values:\n * `prefix` and `suffix`, where prefix will be displayed before and suffix will be\n * displayed after the user input.\n */\n adornments?: {\n prefix?: string;\n suffix?: string;\n };\n /**\n * Add custom class names to the HTML element\n */\n className?: string;\n /**\n * Add custom CSS styling\n */\n style?: any;\n /**\n * Optional callback function for the `onChange` event\n */\n onChange?: (...args: any[]) => any;\n /**\n * Optional callback function for the `onBlur` event\n */\n onBlur?: (...args: any[]) => any;\n /**\n * Whether to display the text input field without borders when it's not in focus\n */\n noBorder?: boolean;\n};\n\n/*\n * NMB-3998 §C.2: `rest` is spread onto `S.TextInputField`, so the published type\n * has to admit that target's props too — a closed type here is worse than `any` for the\n * 125 consumer files. Declared members win over the base (`Omit` by `keyof TextInputOwnProps`);\n * a bare `&` would INTERSECT a colliding member instead of overriding it, which narrows\n * it (measured: `rows?: number | string` & `rows?: number`) or empties it to `never`.\n */\ntype Props = Omit<\n React.ComponentPropsWithoutRef<typeof S.TextInputField>,\n keyof TextInputOwnProps\n> &\n TextInputOwnProps;\n\n/**\n * Text inputs let users enter and edit text in the UI. They typically appear in forms and dialogs.\n *\n * ### Import\n *\n * ``` js\n * import { TextInput } from '@ntbjs/react-components/inputs'\n * // or\n * import TextInput from '@ntbjs/react-components/inputs/TextInput'\n * ```\n */\nconst TextInput = React.forwardRef<any, Props>(function TextInput(\n {\n value,\n defaultValue,\n name,\n label,\n placeholder,\n type = 'text',\n required,\n disabled,\n readOnly,\n autoComplete,\n description,\n error,\n warning,\n icon,\n adornments,\n className,\n style,\n onChange,\n onBlur,\n noBorder = false,\n ...rest\n },\n forwardedRef\n) {\n const textInputDomNode = useRef(null);\n const textInputRef = useMergedRefs(forwardedRef, textInputDomNode);\n const [uniqueId] = useState(nanoid());\n\n /*\n * NMB-3998: `typeof x === 'boolean'` here, not lodash `isBoolean(x)`, and the reason is\n * measurable rather than stylistic. `@types/lodash` IS NOT INSTALLED in this repo and\n * lodash 4 ships no types of its own, so `isBoolean` resolves to `any` — and an `any`\n * test narrows nothing. `error` therefore stayed `boolean | string` inside the branch,\n * `return error` widened these hooks to `string | boolean`, and every styled component\n * they feed rejected `$error` / `$warning` against its declared `boolean`. That was 6 of\n * the 7 TS2769 errors in this file, all from one failed narrowing.\n *\n * Both values are ALREADY `boolean` at runtime for every input this API accepts: the\n * branch returns a boolean, and the fallback `!isEmpty(...)` is a negation. So this\n * records existing behaviour instead of widening the styled generics to a `string` they\n * can never receive — playbook §E.3's rule, \"when a type would have to be widened to\n * accommodate existing behaviour, check whether the behaviour is a bug first\".\n *\n * The one input where native `typeof` and lodash differ is a boxed `new Boolean(...)`,\n * which `typeof` calls 'object'. `error` is declared `boolean | string`, so a boxed\n * Boolean is not a legal value and this cannot regress any supported call.\n */\n const hasError = useMemo(() => {\n if (typeof error === 'boolean') {\n return error;\n }\n\n return !isEmpty(error);\n }, [error]);\n\n const hasWarning = useMemo(() => {\n if (typeof warning === 'boolean') {\n return warning;\n }\n\n return !isEmpty(warning);\n }, [warning]);\n\n const descriptionText = useMemo(() => {\n if (!isEmpty(error)) {\n return error;\n }\n\n if (!isEmpty(warning)) {\n return warning;\n }\n\n if (!isEmpty(description)) {\n return description;\n }\n\n return null;\n }, [description, error, warning]);\n\n return (\n <S.TextInput\n $error={hasError}\n disabled={disabled}\n $warning={hasWarning}\n className={className}\n style={style}\n >\n {typeof icon !== 'undefined' && <S.TextInputFieldIcon>{icon}</S.TextInputFieldIcon>}\n <S.TextInputWrapper>\n {typeof adornments?.prefix === 'string' && adornments.prefix.length > 0 && (\n <S.Adornment\n htmlFor={`text-input-${uniqueId}`}\n $error={hasError}\n $warning={hasWarning}\n $isPrefix={true}\n onClick={() => textInputDomNode.current.focus()}\n >\n {adornments.prefix}\n </S.Adornment>\n )}\n <S.TextInputField\n ref={textInputRef}\n value={value}\n defaultValue={defaultValue}\n name={name}\n placeholder={placeholder || ' '}\n type={type}\n required={required}\n autoComplete={autoComplete}\n $hasIcon={Boolean(icon)}\n $error={hasError}\n $warning={hasWarning}\n id={`text-input-${uniqueId}`}\n onChange={onChange}\n onBlur={onBlur}\n readOnly={readOnly}\n $noBorder={noBorder}\n {...rest}\n />\n {!readOnly && noBorder && (\n <S.InputIconContainer $error={hasError} $warning={hasWarning}>\n <EditNoteIcon />\n </S.InputIconContainer>\n )}\n {label && (\n <S.TextInputLabel\n htmlFor={`text-input-${uniqueId}`}\n $hasPlaceholder={Boolean(placeholder)}\n $hasAdornments={Boolean(\n (typeof adornments?.prefix === 'string' && adornments.prefix.length > 0) ||\n (typeof adornments?.suffix === 'string' && adornments.suffix.length > 0)\n )}\n $hasIcon={Boolean(icon)}\n >\n {/*\n * NMB-3998: `$error={hasError}` removed. TextInput.styled.ts:306-313 already\n * documents this pass as dead and prescribes exactly this fix (\"Fix (type-only,\n * but out of this bucket's scope): stop passing it\"): TextInputLabel's template\n * never reads `$error`, and the error colouring of this label is done by the\n * parent's `${TextInputField}:not(:placeholder-shown) + ${TextInputLabel}` rule\n * instead. Provably output-neutral in both directions — the template does not\n * read it, so the generated class is unchanged, and the `$` prefix means\n * shouldForwardProp already kept it out of the DOM.\n */}\n {label}\n {required && ' *'}\n </S.TextInputLabel>\n )}\n {typeof adornments?.suffix === 'string' && adornments.suffix.length > 0 && (\n <S.Adornment\n $error={hasError}\n $warning={hasWarning}\n $isPrefix={false}\n onClick={() => textInputDomNode.current.focus()}\n >\n {adornments.suffix}\n </S.Adornment>\n )}\n </S.TextInputWrapper>\n {typeof descriptionText === 'string' && descriptionText.length > 0 && (\n <S.Description $error={hasError} $warning={hasWarning}>\n {descriptionText}\n </S.Description>\n )}\n </S.TextInput>\n );\n});\n\nexport default TextInput;\n"],"names":["TextInput","React","forwardRef","value","defaultValue","name","label","placeholder","type","required","disabled","readOnly","autoComplete","description","error","warning","icon","adornments","className","style","onChange","onBlur","noBorder","rest","forwardedRef","textInputDomNode","useRef","textInputRef","useMergedRefs","uniqueId","useState","nanoid","hasError","useMemo","isEmpty","hasWarning","descriptionText","_jsxs","S","$error","$warning","children","_jsx","prefix","length","htmlFor","$isPrefix","onClick","current","focus","ref","$hasIcon","Boolean","id","$noBorder","EditNoteIcon","$hasPlaceholder","$hasAdornments","suffix"],"mappings":";;;;;;;;AA6HA,MAAMA,SAAS,GAAGC,cAAK,CAACC,UAAU,CAAa,SAASF,SAASA,CAC/D;EACEG,KAAK;EACLC,YAAY;EACZC,IAAI;EACJC,KAAK;EACLC,WAAW;AACXC,EAAAA,IAAI,GAAG,MAAM;EACbC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,YAAY;EACZC,WAAW;EACXC,KAAK;EACLC,OAAO;EACPC,IAAI;EACJC,UAAU;EACVC,SAAS;EACTC,KAAK;EACLC,QAAQ;EACRC,MAAM;AACNC,EAAAA,QAAQ,GAAG,KAAK;EAChB,GAAGC;AACL,CAAC,EACDC,YAAY,EACZ;AACA,EAAA,MAAMC,gBAAgB,GAAGC,MAAM,CAAC,IAAI,CAAC;AACrC,EAAA,MAAMC,YAAY,GAAGC,aAAa,CAACJ,YAAY,EAAEC,gBAAgB,CAAC;EAClE,MAAM,CAACI,QAAQ,CAAC,GAAGC,QAAQ,CAACC,MAAM,EAAE,CAAC;AAqBrC,EAAA,MAAMC,QAAQ,GAAGC,OAAO,CAAC,MAAM;AAC7B,IAAA,IAAI,OAAOnB,KAAK,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