@cfx-dev/ui-components 1.0.0 → 2.0.0

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 (479) hide show
  1. package/README.md +1 -1
  2. package/dist/{Combination-Dp_plIQU.js → Combination-BRUj3CHE.js} +42 -43
  3. package/dist/Logos.types-Bdec3F0Q.js +6 -0
  4. package/dist/Rail-rtPENZs2.js +81 -0
  5. package/dist/assets/Avatar.css +1 -1
  6. package/dist/assets/Badge.css +1 -1
  7. package/dist/assets/Button.css +1 -1
  8. package/dist/assets/ButtonBar.css +1 -0
  9. package/dist/assets/Checkbox.css +1 -1
  10. package/dist/assets/ClipboardButton.css +1 -0
  11. package/dist/assets/ColorShowcase.css +1 -0
  12. package/dist/assets/ColorVariationsShowcase.css +1 -0
  13. package/dist/assets/ColorsShowcase.css +1 -0
  14. package/dist/assets/ControlHeightShowcase.css +1 -0
  15. package/dist/assets/Dot.css +1 -1
  16. package/dist/assets/Flex.css +1 -1
  17. package/dist/assets/Flyout.css +1 -1
  18. package/dist/assets/IconBig.css +1 -0
  19. package/dist/assets/IconButton.css +1 -0
  20. package/dist/assets/InfoPanel.css +1 -1
  21. package/dist/assets/Input.css +1 -1
  22. package/dist/assets/InputDropzone.css +1 -1
  23. package/dist/assets/Island.css +1 -1
  24. package/dist/assets/ItemPreview.css +1 -1
  25. package/dist/assets/Modal.css +1 -1
  26. package/dist/assets/NavList.css +1 -1
  27. package/dist/assets/OffsetShowcase.css +1 -0
  28. package/dist/assets/Pad.css +1 -1
  29. package/dist/assets/Popover.css +1 -1
  30. package/dist/assets/PopoverShowcase.css +1 -0
  31. package/dist/assets/Prose.css +1 -1
  32. package/dist/assets/QuantShowcase.css +1 -0
  33. package/dist/assets/Radio.css +1 -1
  34. package/dist/assets/Rail.css +1 -1
  35. package/dist/assets/RichInput.css +1 -1
  36. package/dist/assets/Select.css +1 -1
  37. package/dist/assets/Separator.css +1 -1
  38. package/dist/assets/Spacer.css +1 -1
  39. package/dist/assets/Switch.css +1 -1
  40. package/dist/assets/Tabular.css +1 -1
  41. package/dist/assets/Text.css +1 -1
  42. package/dist/assets/TextShowcase.css +1 -0
  43. package/dist/assets/Textarea.css +1 -1
  44. package/dist/assets/Title.css +1 -1
  45. package/dist/assets/ToggleGroup.css +1 -0
  46. package/dist/assets/global.css +1 -1
  47. package/dist/assets/themes.css +1 -1
  48. package/dist/cfxIcons-BlbKR-zU.js +86 -0
  49. package/dist/cfxIconsBig-CNY8zL27.js +14 -0
  50. package/dist/components/Avatar/Avatar.d.ts +5 -1
  51. package/dist/components/Avatar/Avatar.js +31 -16
  52. package/dist/components/Avatar/AvatarShowcase.d.ts +5 -0
  53. package/dist/components/Avatar/AvatarShowcase.js +33 -0
  54. package/dist/components/Avatar/index.d.ts +2 -0
  55. package/dist/components/Avatar/index.js +4 -0
  56. package/dist/components/BackdropPortal/BackdropPortal.js +9 -6
  57. package/dist/components/Badge/Badge.d.ts +4 -1
  58. package/dist/components/Badge/Badge.js +23 -13
  59. package/dist/components/Badge/BadgeShowcase.d.ts +5 -0
  60. package/dist/components/Badge/BadgeShowcase.js +56 -0
  61. package/dist/components/Badge/index.d.ts +2 -0
  62. package/dist/components/Badge/index.js +4 -0
  63. package/dist/components/Button/Button.d.ts +4 -6
  64. package/dist/components/Button/Button.js +84 -84
  65. package/dist/components/Button/ButtonBar.d.ts +3 -2
  66. package/dist/components/Button/ButtonBar.js +27 -9
  67. package/dist/components/Button/ButtonShowcase.d.ts +5 -0
  68. package/dist/components/Button/ButtonShowcase.js +89 -0
  69. package/dist/components/Button/index.d.ts +6 -0
  70. package/dist/components/Button/index.js +10 -0
  71. package/dist/components/Checkbox/Checkbox.d.ts +10 -9
  72. package/dist/components/Checkbox/Checkbox.js +249 -37
  73. package/dist/components/Checkbox/index.d.ts +2 -0
  74. package/dist/components/Checkbox/index.js +4 -0
  75. package/dist/components/ClipboardButton/ClipboardButton.d.ts +16 -0
  76. package/dist/components/ClipboardButton/ClipboardButton.js +50 -0
  77. package/dist/components/ClipboardButton/index.d.ts +0 -0
  78. package/dist/components/ClipboardButton/index.js +1 -0
  79. package/dist/components/Dot/Dot.d.ts +5 -2
  80. package/dist/components/Dot/Dot.js +25 -10
  81. package/dist/components/Dot/index.d.ts +2 -0
  82. package/dist/components/Dot/index.js +4 -0
  83. package/dist/components/Flyout/Flyout.js +47 -46
  84. package/dist/components/Icon/Icon.d.ts +7 -6
  85. package/dist/components/Icon/Icon.js +31 -19
  86. package/dist/components/Icon/index.d.ts +3 -0
  87. package/dist/components/Icon/index.js +4 -0
  88. package/dist/components/IconBig/IconBig.d.ts +12 -0
  89. package/dist/components/IconBig/IconBig.js +69 -0
  90. package/dist/components/IconBig/index.d.ts +2 -0
  91. package/dist/components/IconBig/index.js +4 -0
  92. package/dist/components/IconButton/IconButton.d.ts +16 -0
  93. package/dist/components/IconButton/IconButton.js +35 -0
  94. package/dist/components/IconButton/index.d.ts +2 -0
  95. package/dist/components/IconButton/index.js +4 -0
  96. package/dist/components/Icons/Icons.types.d.ts +4 -0
  97. package/dist/components/Icons/Icons.types.js +1 -0
  98. package/dist/components/Icons/IconsShowcase.js +101 -0
  99. package/dist/components/Icons/cfx-icons/Close.d.ts +5 -0
  100. package/dist/components/Icons/cfx-icons/Close.js +27 -0
  101. package/dist/components/Icons/cfx-icons/Controller.d.ts +5 -0
  102. package/dist/components/Icons/cfx-icons/Controller.js +31 -0
  103. package/dist/components/Icons/cfx-icons/Copy.d.ts +5 -0
  104. package/dist/components/Icons/cfx-icons/Copy.js +27 -0
  105. package/dist/components/Icons/cfx-icons/DownArrow.d.ts +5 -0
  106. package/dist/components/Icons/cfx-icons/DownArrow.js +27 -0
  107. package/dist/components/Icons/cfx-icons/DownChevron.d.ts +5 -0
  108. package/dist/components/Icons/cfx-icons/DownChevron.js +27 -0
  109. package/dist/components/Icons/cfx-icons/Download.d.ts +5 -0
  110. package/dist/components/Icons/cfx-icons/Download.js +27 -0
  111. package/dist/components/Icons/cfx-icons/Expand.d.ts +5 -0
  112. package/dist/components/Icons/cfx-icons/Expand.js +26 -0
  113. package/dist/components/Icons/cfx-icons/ExternalLink.d.ts +5 -0
  114. package/dist/components/Icons/cfx-icons/ExternalLink.js +27 -0
  115. package/dist/components/Icons/cfx-icons/Heart.d.ts +5 -0
  116. package/dist/components/Icons/cfx-icons/Heart.js +25 -0
  117. package/dist/components/Icons/cfx-icons/HeartFilled.d.ts +5 -0
  118. package/dist/components/Icons/cfx-icons/HeartFilled.js +25 -0
  119. package/dist/components/Icons/cfx-icons/Help.d.ts +5 -0
  120. package/dist/components/Icons/cfx-icons/Help.js +27 -0
  121. package/dist/components/Icons/cfx-icons/LeftArrow.d.ts +5 -0
  122. package/dist/components/Icons/cfx-icons/LeftArrow.js +27 -0
  123. package/dist/components/Icons/cfx-icons/LeftChevron.d.ts +5 -0
  124. package/dist/components/Icons/cfx-icons/LeftChevron.js +27 -0
  125. package/dist/components/Icons/cfx-icons/Map.d.ts +5 -0
  126. package/dist/components/Icons/cfx-icons/Map.js +39 -0
  127. package/dist/components/Icons/cfx-icons/Menu.d.ts +5 -0
  128. package/dist/components/Icons/cfx-icons/Menu.js +49 -0
  129. package/dist/components/Icons/cfx-icons/Minus.d.ts +5 -0
  130. package/dist/components/Icons/cfx-icons/Minus.js +27 -0
  131. package/dist/components/Icons/cfx-icons/More.d.ts +5 -0
  132. package/dist/components/Icons/cfx-icons/More.js +27 -0
  133. package/dist/components/Icons/cfx-icons/MoreInfo.d.ts +5 -0
  134. package/dist/components/Icons/cfx-icons/MoreInfo.js +27 -0
  135. package/dist/components/Icons/cfx-icons/Pencil.d.ts +5 -0
  136. package/dist/components/Icons/cfx-icons/Pencil.js +25 -0
  137. package/dist/components/Icons/cfx-icons/Play.d.ts +5 -0
  138. package/dist/components/Icons/cfx-icons/Play.js +25 -0
  139. package/dist/components/Icons/cfx-icons/Plus.d.ts +5 -0
  140. package/dist/components/Icons/cfx-icons/Plus.js +27 -0
  141. package/dist/components/Icons/cfx-icons/Refresh.d.ts +5 -0
  142. package/dist/components/Icons/cfx-icons/Refresh.js +27 -0
  143. package/dist/components/Icons/cfx-icons/RightArrow.d.ts +5 -0
  144. package/dist/components/Icons/cfx-icons/RightArrow.js +27 -0
  145. package/dist/components/Icons/cfx-icons/RightChevron.d.ts +5 -0
  146. package/dist/components/Icons/cfx-icons/RightChevron.js +27 -0
  147. package/dist/components/Icons/cfx-icons/Search.d.ts +5 -0
  148. package/dist/components/Icons/cfx-icons/Search.js +27 -0
  149. package/dist/components/Icons/cfx-icons/Sort.d.ts +5 -0
  150. package/dist/components/Icons/cfx-icons/Sort.js +27 -0
  151. package/dist/components/Icons/cfx-icons/Square.d.ts +5 -0
  152. package/dist/components/Icons/cfx-icons/Square.js +18 -0
  153. package/dist/components/Icons/cfx-icons/SquareCheck.d.ts +5 -0
  154. package/dist/components/Icons/cfx-icons/SquareCheck.js +27 -0
  155. package/dist/components/Icons/cfx-icons/Stop.d.ts +5 -0
  156. package/dist/components/Icons/cfx-icons/Stop.js +27 -0
  157. package/dist/components/Icons/cfx-icons/Tick.d.ts +5 -0
  158. package/dist/components/Icons/cfx-icons/Tick.js +27 -0
  159. package/dist/components/Icons/cfx-icons/Transfer.d.ts +5 -0
  160. package/dist/components/Icons/cfx-icons/Transfer.js +27 -0
  161. package/dist/components/Icons/cfx-icons/Trash.d.ts +5 -0
  162. package/dist/components/Icons/cfx-icons/Trash.js +23 -0
  163. package/dist/components/Icons/cfx-icons/Undo.d.ts +5 -0
  164. package/dist/components/Icons/cfx-icons/Undo.js +27 -0
  165. package/dist/components/Icons/cfx-icons/UpArrow.d.ts +5 -0
  166. package/dist/components/Icons/cfx-icons/UpArrow.js +27 -0
  167. package/dist/components/Icons/cfx-icons/UpChevron.d.ts +5 -0
  168. package/dist/components/Icons/cfx-icons/UpChevron.js +27 -0
  169. package/dist/components/Icons/cfx-icons/Upload.d.ts +5 -0
  170. package/dist/components/Icons/cfx-icons/Upload.js +27 -0
  171. package/dist/components/Icons/cfx-icons/Users.d.ts +5 -0
  172. package/dist/components/Icons/cfx-icons/Users.js +43 -0
  173. package/dist/components/Icons/cfx-icons/Visibility.d.ts +5 -0
  174. package/dist/components/Icons/cfx-icons/Visibility.js +23 -0
  175. package/dist/components/Icons/cfx-icons/VisibilityOff.d.ts +5 -0
  176. package/dist/components/Icons/cfx-icons/VisibilityOff.js +23 -0
  177. package/dist/components/Icons/cfx-icons/Warning.d.ts +5 -0
  178. package/dist/components/Icons/cfx-icons/Warning.js +27 -0
  179. package/dist/components/Icons/cfx-icons-big/Like.d.ts +5 -0
  180. package/dist/components/Icons/cfx-icons-big/Like.js +25 -0
  181. package/dist/components/Icons/cfx-icons-big/Subscriptions.d.ts +5 -0
  182. package/dist/components/Icons/cfx-icons-big/Subscriptions.js +33 -0
  183. package/dist/components/Icons/cfx-icons-big/Upload.d.ts +5 -0
  184. package/dist/components/Icons/cfx-icons-big/Upload.js +27 -0
  185. package/dist/components/Icons/cfx-icons-big/Warning.d.ts +5 -0
  186. package/dist/components/Icons/cfx-icons-big/Warning.js +27 -0
  187. package/dist/components/Icons/cfxIcons.d.ts +40 -0
  188. package/dist/components/Icons/cfxIcons.js +82 -0
  189. package/dist/components/Icons/cfxIconsBig.d.ts +4 -0
  190. package/dist/components/Icons/cfxIconsBig.js +10 -0
  191. package/dist/components/Icons/index.d.ts +3 -0
  192. package/dist/components/Icons/index.js +6 -0
  193. package/dist/components/InfoPanel/InfoPanel.d.ts +10 -7
  194. package/dist/components/InfoPanel/InfoPanel.js +50 -28
  195. package/dist/components/InfoPanel/InfoPanelShowcase.d.ts +5 -0
  196. package/dist/components/InfoPanel/InfoPanelShowcase.js +47 -0
  197. package/dist/components/InfoPanel/index.d.ts +2 -0
  198. package/dist/components/InfoPanel/index.js +4 -0
  199. package/dist/components/Input/Input.d.ts +16 -19
  200. package/dist/components/Input/Input.js +73 -81
  201. package/dist/components/Input/InputShowcase.d.ts +5 -0
  202. package/dist/components/Input/InputShowcase.js +90 -0
  203. package/dist/components/Input/RichInput.d.ts +2 -1
  204. package/dist/components/Input/RichInput.js +37 -35
  205. package/dist/components/Input/index.d.ts +4 -0
  206. package/dist/components/Input/index.js +6 -0
  207. package/dist/components/InputDropzone/InputDropzone.d.ts +6 -3
  208. package/dist/components/InputDropzone/InputDropzone.js +260 -259
  209. package/dist/components/InputDropzone/InputDropzoneShowcase.d.ts +5 -0
  210. package/dist/components/InputDropzone/InputDropzoneShowcase.js +27 -0
  211. package/dist/components/InputDropzone/ItemPreview.d.ts +5 -1
  212. package/dist/components/InputDropzone/ItemPreview.js +20 -17
  213. package/dist/components/InputDropzone/index.d.ts +4 -0
  214. package/dist/components/InputDropzone/index.js +6 -0
  215. package/dist/components/Interactive/Interactive.d.ts +1 -0
  216. package/dist/components/Interactive/Interactive.js +10 -9
  217. package/dist/components/Island/Island.js +23 -23
  218. package/dist/components/Layout/Flex/Flex.js +46 -43
  219. package/dist/components/Layout/Pad/Pad.js +29 -26
  220. package/dist/components/Layout/Scrollable/Rail.d.ts +1 -2
  221. package/dist/components/Layout/Scrollable/Rail.js +2 -3
  222. package/dist/components/Layout/Scrollable/Scrollable.js +23 -23
  223. package/dist/components/Layout/Scrollable/ScrollableShowcase.d.ts +5 -0
  224. package/dist/components/Layout/Scrollable/ScrollableShowcase.js +112 -0
  225. package/dist/components/Layout/Scrollable/VirtualScrollable.js +6 -7
  226. package/dist/components/Layout/Scrollable/index.d.ts +6 -0
  227. package/dist/components/Layout/Scrollable/index.js +8 -0
  228. package/dist/components/Logos/Logos.types.d.ts +26 -0
  229. package/dist/components/Logos/Logos.types.js +1 -0
  230. package/dist/components/Logos/LogosShowcase.d.ts +5 -0
  231. package/dist/components/Logos/LogosShowcase.js +430 -0
  232. package/dist/components/Logos/cfx/CompositeLogo.d.ts +5 -0
  233. package/dist/components/Logos/cfx/CompositeLogo.js +91 -0
  234. package/dist/components/Logos/cfx/Icon.d.ts +5 -0
  235. package/dist/components/Logos/cfx/Icon.js +23 -0
  236. package/dist/components/Logos/cfx/Logo.d.ts +5 -0
  237. package/dist/components/Logos/cfx/Logo.js +70 -0
  238. package/dist/components/Logos/cfx/Wordmark.d.ts +5 -0
  239. package/dist/components/Logos/cfx/Wordmark.js +60 -0
  240. package/dist/components/Logos/cfx/index.d.ts +4 -0
  241. package/dist/components/Logos/cfx/index.js +10 -0
  242. package/dist/components/Logos/cfxbazaar/CompositeLogo.d.ts +5 -0
  243. package/dist/components/Logos/cfxbazaar/CompositeLogo.js +102 -0
  244. package/dist/components/Logos/cfxbazaar/Wordmark.d.ts +5 -0
  245. package/dist/components/Logos/cfxbazaar/Wordmark.js +81 -0
  246. package/dist/components/Logos/cfxbazaar/index.d.ts +2 -0
  247. package/dist/components/Logos/cfxbazaar/index.js +6 -0
  248. package/dist/components/Logos/discord/Icon.d.ts +5 -0
  249. package/dist/components/Logos/discord/Icon.js +23 -0
  250. package/dist/components/Logos/discord/index.d.ts +1 -0
  251. package/dist/components/Logos/discord/index.js +4 -0
  252. package/dist/components/Logos/esx/Icon.d.ts +5 -0
  253. package/dist/components/Logos/esx/Icon.js +26 -0
  254. package/dist/components/Logos/esx/index.d.ts +1 -0
  255. package/dist/components/Logos/esx/index.js +4 -0
  256. package/dist/components/Logos/fivem/CompositeLogo.d.ts +5 -0
  257. package/dist/components/Logos/fivem/CompositeLogo.js +98 -0
  258. package/dist/components/Logos/fivem/Icon.d.ts +5 -0
  259. package/dist/components/Logos/fivem/Icon.js +39 -0
  260. package/dist/components/Logos/fivem/LockupLandscape.d.ts +5 -0
  261. package/dist/components/Logos/fivem/LockupLandscape.js +81 -0
  262. package/dist/components/Logos/fivem/LockupPortrait.d.ts +5 -0
  263. package/dist/components/Logos/fivem/LockupPortrait.js +140 -0
  264. package/dist/components/Logos/fivem/Logo.d.ts +5 -0
  265. package/dist/components/Logos/fivem/Logo.js +63 -0
  266. package/dist/components/Logos/fivem/Wordmark.d.ts +5 -0
  267. package/dist/components/Logos/fivem/Wordmark.js +39 -0
  268. package/dist/components/Logos/fivem/index.d.ts +6 -0
  269. package/dist/components/Logos/fivem/index.js +14 -0
  270. package/dist/components/Logos/google/Icon.d.ts +5 -0
  271. package/dist/components/Logos/google/Icon.js +46 -0
  272. package/dist/components/Logos/google/Wordmark.d.ts +5 -0
  273. package/dist/components/Logos/google/Wordmark.js +63 -0
  274. package/dist/components/Logos/google/index.d.ts +2 -0
  275. package/dist/components/Logos/google/index.js +6 -0
  276. package/dist/components/Logos/index.d.ts +29 -0
  277. package/dist/components/Logos/index.js +33 -0
  278. package/dist/components/Logos/patreon/Icon.d.ts +5 -0
  279. package/dist/components/Logos/patreon/Icon.js +23 -0
  280. package/dist/components/Logos/patreon/Wordmark.d.ts +5 -0
  281. package/dist/components/Logos/patreon/Wordmark.js +32 -0
  282. package/dist/components/Logos/patreon/index.d.ts +2 -0
  283. package/dist/components/Logos/patreon/index.js +6 -0
  284. package/dist/components/Logos/qbcore/Icon.d.ts +5 -0
  285. package/dist/components/Logos/qbcore/Icon.js +26 -0
  286. package/dist/components/Logos/qbcore/index.d.ts +1 -0
  287. package/dist/components/Logos/qbcore/index.js +4 -0
  288. package/dist/components/Logos/redemrp/Icon.d.ts +5 -0
  289. package/dist/components/Logos/redemrp/Icon.js +26 -0
  290. package/dist/components/Logos/redemrp/index.d.ts +1 -0
  291. package/dist/components/Logos/redemrp/index.js +4 -0
  292. package/dist/components/Logos/redm/CompositeLogo.d.ts +5 -0
  293. package/dist/components/Logos/redm/CompositeLogo.js +250 -0
  294. package/dist/components/Logos/redm/Icon.d.ts +5 -0
  295. package/dist/components/Logos/redm/Icon.js +88 -0
  296. package/dist/components/Logos/redm/LockupLandscape.d.ts +5 -0
  297. package/dist/components/Logos/redm/LockupLandscape.js +231 -0
  298. package/dist/components/Logos/redm/LockupPortrait.d.ts +5 -0
  299. package/dist/components/Logos/redm/LockupPortrait.js +182 -0
  300. package/dist/components/Logos/redm/Logo.d.ts +5 -0
  301. package/dist/components/Logos/redm/Logo.js +214 -0
  302. package/dist/components/Logos/redm/Wordmark.d.ts +5 -0
  303. package/dist/components/Logos/redm/Wordmark.js +35 -0
  304. package/dist/components/Logos/redm/index.d.ts +6 -0
  305. package/dist/components/Logos/redm/index.js +14 -0
  306. package/dist/components/Logos/rockstar/Icon.d.ts +5 -0
  307. package/dist/components/Logos/rockstar/Icon.js +32 -0
  308. package/dist/components/Logos/rockstar/index.d.ts +1 -0
  309. package/dist/components/Logos/rockstar/index.js +4 -0
  310. package/dist/components/Logos/tebex/Icon.d.ts +5 -0
  311. package/dist/components/Logos/tebex/Icon.js +23 -0
  312. package/dist/components/Logos/tebex/Wordmark.d.ts +5 -0
  313. package/dist/components/Logos/tebex/Wordmark.js +34 -0
  314. package/dist/components/Logos/tebex/index.d.ts +2 -0
  315. package/dist/components/Logos/tebex/index.js +6 -0
  316. package/dist/components/Logos/vorpcore/Icon.d.ts +5 -0
  317. package/dist/components/Logos/vorpcore/Icon.js +26 -0
  318. package/dist/components/Logos/vorpcore/index.d.ts +1 -0
  319. package/dist/components/Logos/vorpcore/index.js +4 -0
  320. package/dist/components/Modal/Modal.d.ts +13 -6
  321. package/dist/components/Modal/Modal.js +75 -34
  322. package/dist/components/Modal/ModalShowcase.d.ts +5 -0
  323. package/dist/components/Modal/ModalShowcase.js +52 -0
  324. package/dist/components/Modal/index.d.ts +2 -0
  325. package/dist/components/Modal/index.js +4 -0
  326. package/dist/components/NavList/NavList.js +5 -5
  327. package/dist/components/OnScreenSensor.js +13 -10
  328. package/dist/components/Overlay/Overlay.js +10 -8
  329. package/dist/components/Popover/Popover.d.ts +5 -3
  330. package/dist/components/Popover/Popover.js +32 -26
  331. package/dist/components/Popover/PopoverShowcase.d.ts +5 -0
  332. package/dist/components/Popover/PopoverShowcase.js +53 -0
  333. package/dist/components/Popover/index.d.ts +2 -0
  334. package/dist/components/Popover/index.js +4 -0
  335. package/dist/components/Prose/Prose.js +1 -1
  336. package/dist/components/Radio/Radio.js +20 -20
  337. package/dist/components/Select/Select.d.ts +5 -3
  338. package/dist/components/Select/Select.js +1997 -2230
  339. package/dist/components/Select/SelectShowcase.d.ts +5 -0
  340. package/dist/components/Select/SelectShowcase.js +121 -0
  341. package/dist/components/Select/index.d.ts +2 -0
  342. package/dist/components/Select/index.js +4 -0
  343. package/dist/components/Separator/Separator.d.ts +2 -0
  344. package/dist/components/Separator/Separator.js +33 -22
  345. package/dist/components/Shroud/Shroud.js +11 -8
  346. package/dist/components/Spacer/Spacer.d.ts +3 -1
  347. package/dist/components/Spacer/Spacer.js +22 -18
  348. package/dist/components/Switch/Switch.d.ts +6 -15
  349. package/dist/components/Switch/Switch.js +119 -62
  350. package/dist/components/Switch/index.d.ts +2 -0
  351. package/dist/components/Switch/index.js +4 -0
  352. package/dist/components/Table/Table.js +41 -35
  353. package/dist/components/Tabular/Tabular.d.ts +20 -15
  354. package/dist/components/Tabular/Tabular.js +84 -54
  355. package/dist/components/Tabular/TabularShowcase.d.ts +5 -0
  356. package/dist/components/Tabular/TabularShowcase.js +47 -0
  357. package/dist/components/Tabular/index.d.ts +2 -0
  358. package/dist/components/Tabular/index.js +4 -0
  359. package/dist/components/Text/BodyShowcase.d.ts +5 -0
  360. package/dist/components/Text/BodyShowcase.js +133 -0
  361. package/dist/components/Text/HeadingShowcase.d.ts +5 -0
  362. package/dist/components/Text/HeadingShowcase.js +101 -0
  363. package/dist/components/Text/Text.d.ts +5 -3
  364. package/dist/components/Text/Text.js +59 -47
  365. package/dist/components/Text/Text.types.d.ts +11 -9
  366. package/dist/components/Text/TextShowcase.d.ts +12 -0
  367. package/dist/components/Text/TextShowcase.js +46 -0
  368. package/dist/components/Text/index.d.ts +2 -0
  369. package/dist/components/Text/index.js +8 -0
  370. package/dist/components/Textarea/Textarea.js +35 -35
  371. package/dist/components/Title/Title.d.ts +6 -2
  372. package/dist/components/Title/Title.js +89 -83
  373. package/dist/components/Title/TitleShowcase.d.ts +5 -0
  374. package/dist/components/Title/TitleShowcase.js +22 -0
  375. package/dist/components/ToggleGroup/ToggleGroup.d.ts +17 -0
  376. package/dist/components/ToggleGroup/ToggleGroup.js +65 -0
  377. package/dist/iconBase-C6DV9qqL.js +60 -0
  378. package/dist/{index-C1KmDBa6.js → index-2hJuj4UN.js} +939 -939
  379. package/dist/index-BCMIaGt2.js +10 -0
  380. package/dist/index-BFDtbr-9.js +8 -0
  381. package/dist/index-BgyFvlVL.js +14 -0
  382. package/dist/index-Bj7QGXdt.js +10 -0
  383. package/dist/index-CjWRnNpt.js +210 -0
  384. package/dist/index-CndZSWbO.js +8 -0
  385. package/dist/index-Cy4ZbWBL.js +8 -0
  386. package/dist/index-D7JPdg13.js +18 -0
  387. package/dist/index-DXAZagKA.js +8 -0
  388. package/dist/index-DmiGJpGO.js +8 -0
  389. package/dist/index-DwfZyjnS.js +8 -0
  390. package/dist/index-Jh-MtE10.js +18 -0
  391. package/dist/index-kbBuAY0m.js +10 -0
  392. package/dist/index-zDYfHjPd.js +10 -0
  393. package/dist/inheritsLoose-CyjgKRgL.js +21 -0
  394. package/dist/main.d.ts +36 -19
  395. package/dist/main.js +166 -148
  396. package/dist/style-guide/Colors/ColorShowcase.d.ts +21 -0
  397. package/dist/style-guide/Colors/ColorShowcase.js +1881 -0
  398. package/dist/style-guide/Colors/ColorVariationsShowcase.d.ts +5 -0
  399. package/dist/style-guide/Colors/ColorVariationsShowcase.js +43 -0
  400. package/dist/style-guide/Colors/ColorsShowcase.d.ts +5 -0
  401. package/dist/style-guide/Colors/ColorsShowcase.js +43 -0
  402. package/dist/style-guide/Layout/ControlHeightShowcase.d.ts +5 -0
  403. package/dist/style-guide/Layout/ControlHeightShowcase.js +27 -0
  404. package/dist/style-guide/Layout/OffsetShowcase.d.ts +5 -0
  405. package/dist/style-guide/Layout/OffsetShowcase.js +32 -0
  406. package/dist/style-guide/Layout/QuantShowcase.d.ts +5 -0
  407. package/dist/style-guide/Layout/QuantShowcase.js +36 -0
  408. package/dist/styles-scss/_typography.scss +52 -0
  409. package/dist/styles-scss/_ui.scss +126 -9
  410. package/dist/styles-scss/assets/fonts/HelveticaNow/HelveticaNowDisplay.ttf +0 -0
  411. package/dist/styles-scss/assets/fonts/HelveticaNow/HelveticaNowDisplay.woff +0 -0
  412. package/dist/styles-scss/assets/fonts/HelveticaNow/HelveticaNowDisplay.woff2 +0 -0
  413. package/dist/styles-scss/assets/fonts/HelveticaNow/HelveticaNowDisplayBold.ttf +0 -0
  414. package/dist/styles-scss/assets/fonts/HelveticaNow/HelveticaNowDisplayBold.woff +0 -0
  415. package/dist/styles-scss/assets/fonts/HelveticaNow/HelveticaNowDisplayBold.woff2 +0 -0
  416. package/dist/styles-scss/assets/fonts/HelveticaNow/HelveticaNowText.ttf +0 -0
  417. package/dist/styles-scss/assets/fonts/HelveticaNow/HelveticaNowText.woff +0 -0
  418. package/dist/styles-scss/assets/fonts/HelveticaNow/HelveticaNowText.woff2 +0 -0
  419. package/dist/styles-scss/assets/fonts/HelveticaNow/HelveticaNowTextBold.ttf +0 -0
  420. package/dist/styles-scss/assets/fonts/HelveticaNow/HelveticaNowTextBold.woff +0 -0
  421. package/dist/styles-scss/assets/fonts/HelveticaNow/HelveticaNowTextBold.woff2 +0 -0
  422. package/dist/styles-scss/assets/fonts/HelveticaNow/HelveticaNowTextIt.ttf +0 -0
  423. package/dist/styles-scss/assets/fonts/HelveticaNow/HelveticaNowTextIt.woff +0 -0
  424. package/dist/styles-scss/assets/fonts/HelveticaNow/HelveticaNowTextIt.woff2 +0 -0
  425. package/dist/styles-scss/global.scss +94 -41
  426. package/dist/styles-scss/themes/theme_cfx.scss +32 -0
  427. package/dist/styles-scss/themes/theme_fivem.scss +32 -0
  428. package/dist/styles-scss/themes/theme_redm.scss +32 -0
  429. package/dist/styles-scss/themes/theme_wireframe.scss +32 -0
  430. package/dist/styles-scss/themes.scss +4 -2
  431. package/dist/styles-scss/tokens.scss +269 -190
  432. package/dist/types/Offset.d.ts +1 -0
  433. package/dist/types/Offset.js +1 -0
  434. package/dist/utils/color.d.ts +9 -0
  435. package/dist/utils/color.js +18 -0
  436. package/dist/utils/hooks/index.d.ts +8 -0
  437. package/dist/utils/hooks/index.js +16 -0
  438. package/dist/utils/hooks/useDynamicRef.d.ts +3 -0
  439. package/dist/utils/hooks/useDynamicRef.js +8 -0
  440. package/dist/utils/hooks/useGlobalKeyboardEvent.d.ts +6 -0
  441. package/dist/utils/hooks/useGlobalKeyboardEvent.js +29 -0
  442. package/dist/utils/hooks/useInstance.d.ts +1 -0
  443. package/dist/utils/hooks/useInstance.js +9 -0
  444. package/dist/utils/hooks/useKeyboardClose.d.ts +4 -0
  445. package/dist/utils/hooks/useKeyboardClose.js +12 -0
  446. package/dist/utils/hooks/useOutlet.d.ts +4 -0
  447. package/dist/utils/hooks/useOutlet.js +26 -0
  448. package/dist/utils/hooks/usePopoverController.d.ts +9 -0
  449. package/dist/utils/hooks/usePopoverController.js +35 -0
  450. package/dist/utils/hooks/useWindowResize.d.ts +1 -0
  451. package/dist/utils/hooks/useWindowResize.js +12 -0
  452. package/dist/utils/loremipsum.d.ts +1 -0
  453. package/dist/utils/loremipsum.js +4 -0
  454. package/dist/utils/random.d.ts +3 -0
  455. package/dist/utils/random.js +14 -0
  456. package/package.json +5 -6
  457. package/dist/Button.module-Z6njvP9Z.js +0 -17
  458. package/dist/Icons-BlBKvJD8.js +0 -104
  459. package/dist/Rail-CCuyJpf6.js +0 -89
  460. package/dist/extends-hS2Bh-Yp.js +0 -12
  461. package/dist/index.esm-BkynlSN6.js +0 -72
  462. package/dist/inheritsLoose-A8WKSWDx.js +0 -11
  463. package/dist/style-guide/Colours/DarkThemeSwatches.d.ts +0 -2
  464. package/dist/style-guide/Colours/DarkThemeSwatches.js +0 -110
  465. package/dist/style-guide/Colours/LightThemeSwatches.d.ts +0 -2
  466. package/dist/style-guide/Colours/LightThemeSwatches.js +0 -105
  467. package/dist/style-guide/Colours/Swatches.d.ts +0 -6
  468. package/dist/style-guide/Colours/Swatches.js +0 -48
  469. package/dist/style-guide/Icons/IconDisplayGrid.js +0 -42
  470. package/dist/style-guide/Icons/Icons.d.ts +0 -38
  471. package/dist/style-guide/Icons/Icons.js +0 -7
  472. package/dist/styles-scss/assets/images/bgpat.png +0 -0
  473. package/dist/styles-scss/assets/images/checkered_dark.svg +0 -7
  474. package/dist/styles-scss/assets/images/checkered_light.svg +0 -7
  475. package/dist/styles-scss/theme_dark.scss +0 -24
  476. package/dist/styles-scss/theme_light.scss +0 -54
  477. package/dist/utils/hooks.d.ts +0 -15
  478. package/dist/utils/hooks.js +0 -79
  479. /package/dist/{style-guide/Icons/IconDisplayGrid.d.ts → components/Icons/IconsShowcase.d.ts} +0 -0
@@ -0,0 +1,4 @@
1
+ export { default as Like } from './cfx-icons-big/Like';
2
+ export { default as Subscriptions } from './cfx-icons-big/Subscriptions';
3
+ export { default as Upload } from './cfx-icons-big/Upload';
4
+ export { default as Warni } from './cfx-icons-big/Warning';
@@ -0,0 +1,10 @@
1
+ import { default as r } from "./cfx-icons-big/Like.js";
2
+ import { default as t } from "./cfx-icons-big/Subscriptions.js";
3
+ import { default as p } from "./cfx-icons-big/Upload.js";
4
+ import { default as d } from "./cfx-icons-big/Warning.js";
5
+ export {
6
+ r as Like,
7
+ t as Subscriptions,
8
+ p as Upload,
9
+ d as Warni
10
+ };
@@ -0,0 +1,3 @@
1
+ export * as Icons from './cfxIcons';
2
+ export * as IconsBig from './cfxIconsBig';
3
+ export type { IconName, IconBigName } from './Icons.types';
@@ -0,0 +1,6 @@
1
+ import { I as s } from "../../cfxIcons-BlbKR-zU.js";
2
+ import { I as a } from "../../cfxIconsBig-CNY8zL27.js";
3
+ export {
4
+ s as Icons,
5
+ a as IconsBig
6
+ };
@@ -1,13 +1,16 @@
1
1
  import { default as React } from 'react';
2
+ import { IconName } from '../Icon';
2
3
 
3
- export type InfoPanelType = 'default' | 'error' | 'success' | 'warning';
4
- export type InfoPanelSize = 'auto' | 'small' | 'normal' | 'large';
5
- export interface InfoPanelProps {
4
+ export type InfoPanelType = 'neutral' | 'error' | 'success' | 'warning';
5
+ export type InfoPanelSize = 'small' | 'normal' | 'large';
6
+ export interface InfoPanelProps extends React.PropsWithChildren {
6
7
  type?: InfoPanelType;
7
8
  size?: InfoPanelSize;
8
- icon?: React.ReactNode;
9
- children?: React.ReactNode;
9
+ icon?: IconName;
10
10
  className?: string;
11
- inline?: boolean;
11
+ onClick?: () => void;
12
+ ariaLabel?: string;
12
13
  }
13
- export declare function InfoPanel(props: InfoPanelProps): import("react/jsx-runtime").JSX.Element;
14
+ declare function InfoPanel(props: InfoPanelProps): import("react/jsx-runtime").JSX.Element;
15
+ declare const _default: React.MemoExoticComponent<typeof InfoPanel>;
16
+ export default _default;
@@ -1,34 +1,56 @@
1
- import { jsxs as a, jsx as e } from "react/jsx-runtime";
2
- import { clsx as m } from "../../utils/clsx.js";
3
- import '../../assets/InfoPanel.css';const p = "_root_43rns_1", y = "_inline_43rns_37", d = "_icon_43rns_58", f = "_content_43rns_61", n = {
4
- root: p,
5
- "type-default": "_type-default_43rns_11",
6
- "type-error": "_type-error_43rns_15",
7
- "type-success": "_type-success_43rns_19",
8
- "type-warning": "_type-warning_43rns_23",
9
- "size-small": "_size-small_43rns_27",
10
- "size-normal": "_size-normal_43rns_30",
11
- "size-large": "_size-large_43rns_33",
12
- inline: y,
1
+ import { jsxs as p, jsx as o } from "react/jsx-runtime";
2
+ import u from "react";
3
+ import { Icon as l } from "../Icon/Icon.js";
4
+ import { clsx as v } from "../../utils/clsx.js";
5
+ import '../../assets/InfoPanel.css';const y = "_rootUnset_10ll9_1", f = "_root_10ll9_1", x = "_interactive_10ll9_19", z = "_interactiveIcon_10ll9_22", d = "_icon_10ll9_69", I = "_content_10ll9_73", t = {
6
+ rootUnset: y,
7
+ root: f,
8
+ interactive: x,
9
+ interactiveIcon: z,
10
+ "type-neutral": "_type-neutral_10ll9_34",
11
+ "type-error": "_type-error_10ll9_41",
12
+ "type-success": "_type-success_10ll9_48",
13
+ "type-warning": "_type-warning_10ll9_55",
14
+ "size-small": "_size-small_10ll9_62",
15
+ "size-large": "_size-large_10ll9_65",
13
16
  icon: d,
14
- content: f
17
+ content: I
15
18
  };
16
- function N(o) {
19
+ function N(s) {
17
20
  const {
18
- type: t = "default",
19
- size: r = "auto",
20
- icon: s,
21
- children: i,
22
- className: _,
23
- inline: c = !1
24
- } = o, l = m(n.root, _, n[`type-${t}`], n[`size-${r}`], {
25
- [n.inline]: c
26
- });
27
- return /* @__PURE__ */ a("div", { className: l, children: [
28
- !!s && /* @__PURE__ */ e("div", { className: n.icon, children: s }),
29
- /* @__PURE__ */ e("div", { className: n.content, children: i })
30
- ] });
21
+ type: c = "neutral",
22
+ size: r = "normal",
23
+ className: a,
24
+ onClick: e,
25
+ ariaLabel: i,
26
+ icon: n,
27
+ children: _
28
+ } = s, m = v(
29
+ t.rootUnset,
30
+ t.root,
31
+ a,
32
+ t[`type-${c}`],
33
+ t[`size-${r}`],
34
+ {
35
+ [t.interactive]: !!e
36
+ }
37
+ );
38
+ return /* @__PURE__ */ p(
39
+ e ? "button" : "div",
40
+ {
41
+ type: e ? "button" : void 0,
42
+ className: m,
43
+ onClick: e,
44
+ "aria-label": i,
45
+ children: [
46
+ n && /* @__PURE__ */ o(l, { size: "xxsmall", name: n, className: t.icon }),
47
+ /* @__PURE__ */ o("div", { className: t.content, children: _ }),
48
+ e && /* @__PURE__ */ o(l, { size: "xxsmall", name: "LeftArrow", className: t.interactiveIcon })
49
+ ]
50
+ }
51
+ );
31
52
  }
53
+ const R = u.memo(N);
32
54
  export {
33
- N as InfoPanel
55
+ R as default
34
56
  };
@@ -0,0 +1,5 @@
1
+ import { default as React } from 'react';
2
+
3
+ declare function InfoPanelShowcase(): import("react/jsx-runtime").JSX.Element;
4
+ declare const _default: React.MemoExoticComponent<typeof InfoPanelShowcase>;
5
+ export default _default;
@@ -0,0 +1,47 @@
1
+ import { jsxs as e, jsx as r } from "react/jsx-runtime";
2
+ import o from "react";
3
+ import { Flex as n } from "../Layout/Flex/Flex.js";
4
+ import { Text as i } from "../Text/Text.js";
5
+ import { LOREM_IPSUM as t } from "../../utils/loremipsum.js";
6
+ import l from "./InfoPanel.js";
7
+ function c() {
8
+ return /* @__PURE__ */ r(i, { size: "small", children: t });
9
+ }
10
+ const a = () => {
11
+ };
12
+ function h() {
13
+ return /* @__PURE__ */ e(n, { gap: "large", vertical: !0, children: [
14
+ /* @__PURE__ */ e(n, { gap: "normal", vertical: !0, children: [
15
+ /* @__PURE__ */ r(i, { children: "Default" }),
16
+ /* @__PURE__ */ r(l, { onClick: a, icon: "Warning", children: /* @__PURE__ */ r(c, {}) })
17
+ ] }),
18
+ /* @__PURE__ */ e(n, { gap: "normal", vertical: !0, children: [
19
+ /* @__PURE__ */ r(i, { children: "Success" }),
20
+ /* @__PURE__ */ r(l, { onClick: a, type: "success", icon: "Close", children: /* @__PURE__ */ r(c, {}) })
21
+ ] }),
22
+ /* @__PURE__ */ e(n, { gap: "normal", vertical: !0, children: [
23
+ /* @__PURE__ */ r(i, { children: "Error" }),
24
+ /* @__PURE__ */ r(l, { onClick: a, type: "error", icon: "Users", children: /* @__PURE__ */ r(c, {}) })
25
+ ] }),
26
+ /* @__PURE__ */ e(n, { gap: "normal", vertical: !0, children: [
27
+ /* @__PURE__ */ r(i, { children: "Warning" }),
28
+ /* @__PURE__ */ r(l, { onClick: a, type: "warning", icon: "Search", children: /* @__PURE__ */ r(c, {}) })
29
+ ] }),
30
+ /* @__PURE__ */ e(n, { gap: "normal", vertical: !0, children: [
31
+ /* @__PURE__ */ r(i, { children: "Small" }),
32
+ /* @__PURE__ */ r(l, { onClick: a, size: "small", icon: "Warning", children: /* @__PURE__ */ r(c, {}) })
33
+ ] }),
34
+ /* @__PURE__ */ e(n, { gap: "normal", vertical: !0, children: [
35
+ /* @__PURE__ */ r(i, { children: "Large" }),
36
+ /* @__PURE__ */ r(l, { onClick: a, size: "large", icon: "Warning", children: /* @__PURE__ */ r(c, {}) })
37
+ ] }),
38
+ /* @__PURE__ */ e(n, { gap: "normal", vertical: !0, children: [
39
+ /* @__PURE__ */ r(i, { children: "Not interactive" }),
40
+ /* @__PURE__ */ r(l, { icon: "Warning", children: /* @__PURE__ */ r(c, {}) })
41
+ ] })
42
+ ] });
43
+ }
44
+ const f = o.memo(h);
45
+ export {
46
+ f as default
47
+ };
@@ -0,0 +1,2 @@
1
+ export { default as InfoPanel } from './InfoPanel';
2
+ export type { InfoPanelProps, InfoPanelType, InfoPanelSize, } from './InfoPanel';
@@ -0,0 +1,4 @@
1
+ import { default as f } from "./InfoPanel.js";
2
+ export {
3
+ f as InfoPanel
4
+ };
@@ -1,37 +1,34 @@
1
1
  import { default as React } from 'react';
2
+ import { IconName } from '../Icon';
2
3
 
3
4
  export type InputSize = 'small' | 'normal' | 'large';
4
- type TypeSpecific = {
5
+ type InputTypeSpecificProps = {
5
6
  type?: 'text' | 'password' | 'search';
6
- value: string;
7
- onChange(value: string): void;
7
+ value?: string;
8
8
  } | {
9
9
  type: 'number';
10
10
  min?: number | string;
11
11
  max?: number | string;
12
- value: number | string;
13
- onChange(value: string): void;
12
+ value?: number | string;
14
13
  };
15
- export type InputProps = TypeSpecific & {
16
- fullWidth?: boolean;
14
+ export type InputProps = InputTypeSpecificProps & {
15
+ id?: string;
17
16
  size?: InputSize;
18
17
  tabIndex?: number;
19
- disabled?: boolean;
20
18
  autofocus?: boolean;
21
19
  pattern?: RegExp;
20
+ fullWidth?: boolean;
22
21
  className?: string;
23
- backdropBlur?: boolean;
24
- inputClassName?: string;
25
- inputRef?: React.Ref<HTMLInputElement>;
26
- label?: React.ReactNode;
27
22
  placeholder?: string;
28
- description?: React.ReactNode;
29
- error?: boolean;
23
+ placeholderIcon?: IconName;
24
+ disabled?: boolean;
25
+ loading?: boolean;
26
+ backdropBlur?: boolean;
27
+ spellCheck?: boolean;
30
28
  decorator?: React.ReactNode | (() => React.ReactNode);
29
+ onChange?: (value: string) => void;
31
30
  onSubmit?: () => void;
32
- onKeyDown?(event: React.KeyboardEvent<HTMLInputElement>): void | boolean;
33
- showLoader?: boolean;
34
- noSpellCheck?: boolean;
31
+ onKeyDown?(event: React.KeyboardEvent<HTMLInputElement>): void;
35
32
  };
36
- export declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLDivElement>>;
37
- export {};
33
+ declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
34
+ export default Input;
@@ -1,96 +1,88 @@
1
- import { jsxs as r, jsx as c } from "react/jsx-runtime";
2
- import n from "react";
3
- import { Indicator as q } from "../Indicator/Indicator.js";
4
- import { clsx as H } from "../../utils/clsx.js";
5
- import { getValue as J } from "../../utils/getValue.js";
6
- import { useDynamicRef as i } from "../../utils/hooks.js";
7
- import '../../assets/Input.css';const O = "_root_gmtev_1", P = "_input_gmtev_1", Q = "_small_gmtev_8", U = "_large_gmtev_12", Y = "_decorator_gmtev_60", Z = "_error_gmtev_68", $ = "_disabled_gmtev_72", ee = "_description_gmtev_106", e = {
8
- root: O,
9
- input: P,
10
- small: Q,
11
- large: U,
12
- "full-width": "_full-width_gmtev_57",
13
- decorator: Y,
14
- error: Z,
15
- disabled: $,
16
- description: ee,
17
- "backdrop-blur": "_backdrop-blur_gmtev_111"
18
- }, ce = n.forwardRef(function(t, g) {
1
+ import { jsxs as h, jsx as f } from "react/jsx-runtime";
2
+ import t from "react";
3
+ import { Icon as j } from "../Icon/Icon.js";
4
+ import { Indicator as G } from "../Indicator/Indicator.js";
5
+ import { clsx as T } from "../../utils/clsx.js";
6
+ import { getValue as z } from "../../utils/getValue.js";
7
+ import '../../assets/Input.css';const B = "_root_osypq_1", W = "_input_osypq_1", X = "_small_osypq_5", $ = "_large_osypq_9", H = "_placeholderIcon_osypq_75", J = "_empty_osypq_151", L = "_decorator_osypq_156", e = {
8
+ root: B,
9
+ input: W,
10
+ small: X,
11
+ large: $,
12
+ placeholderIcon: H,
13
+ "full-width": "_full-width_osypq_145",
14
+ empty: J,
15
+ decorator: L,
16
+ "backdrop-blur": "_backdrop-blur_osypq_173"
17
+ }, oe = t.forwardRef(function(a, b) {
19
18
  const {
20
- label: d,
21
- value: v,
22
- onChange: N,
23
- onSubmit: C,
24
- onKeyDown: k = () => !1,
25
- pattern: a,
26
- tabIndex: w,
27
- error: y = !1,
28
- fullWidth: I = !1,
29
- showLoader: u = !1,
30
- noSpellCheck: R = !1,
31
- autofocus: x = !1,
32
- disabled: m = !1,
33
- className: E = "",
34
- placeholder: D = "",
35
- inputClassName: S = "",
36
- inputRef: F,
37
- description: _ = "",
38
- type: K = "text",
39
- size: A = "normal",
40
- decorator: l,
41
- backdropBlur: j = !1
42
- } = t, G = t.type === "number" && (t.min ?? Number.MIN_SAFE_INTEGER) || void 0, M = t.type === "number" && (t.max ?? Number.MAX_SAFE_INTEGER) || void 0, f = n.useId(), p = i(N), T = i(k), b = i(C), V = n.useCallback(
19
+ id: I,
20
+ fullWidth: N = !1,
21
+ value: l,
22
+ onChange: s,
23
+ onSubmit: c,
24
+ onKeyDown: u,
25
+ pattern: d,
26
+ tabIndex: g,
27
+ loading: y = !1,
28
+ spellCheck: k = !0,
29
+ autofocus: q = !1,
30
+ disabled: w = !1,
31
+ className: x = "",
32
+ placeholder: n = "",
33
+ placeholderIcon: r,
34
+ type: C = "text",
35
+ size: E = "normal",
36
+ decorator: i,
37
+ backdropBlur: v = !1
38
+ } = a, [m, R] = t.useState(l), V = typeof m < "u" && m !== "" && m !== null || typeof l < "u" && l !== "" && l !== null, S = a.type === "number" && (a.min ?? Number.MIN_SAFE_INTEGER) || void 0, A = a.type === "number" && (a.max ?? Number.MAX_SAFE_INTEGER) || void 0, p = t.useCallback((o) => {
39
+ R(o), s && s(o);
40
+ }, [s]), D = t.useCallback(
43
41
  (o) => {
44
42
  const {
45
- value: s
43
+ value: _
46
44
  } = o.target;
47
- if (a) {
48
- a.test(s) && p.current(s);
45
+ if (d) {
46
+ d.test(_) && p(_);
49
47
  return;
50
48
  }
51
- return p.current(s);
49
+ p(_);
52
50
  },
53
- [a]
54
- ), z = n.useCallback((o) => {
55
- T.current(o) || b.current && o.key === "Enter" && b.current();
56
- }, []), B = u || l ? /* @__PURE__ */ r("div", { className: e.decorator, children: [
57
- !!u && /* @__PURE__ */ c(q, {}),
58
- !!l && J(l)
59
- ] }) : null, h = /* @__PURE__ */ r("div", { className: e.input, children: [
60
- /* @__PURE__ */ c(
51
+ [p, d]
52
+ ), F = t.useCallback((o) => {
53
+ u && u(o), c && o.key === "Enter" && c();
54
+ }, [u, c]), K = T(e.root, e[E], x, {
55
+ [e["full-width"]]: N,
56
+ [e["backdrop-blur"]]: v,
57
+ [e.empty]: !V
58
+ }), M = t.useMemo(() => n ? r ? ` ${n.trim()}` : n.trim() : "", [n, r]);
59
+ return /* @__PURE__ */ h("div", { className: K, children: [
60
+ /* @__PURE__ */ f(
61
61
  "input",
62
62
  {
63
- id: f,
64
- ref: F,
65
- type: K,
66
- tabIndex: w,
67
- autoFocus: x,
68
- className: S,
69
- value: v,
70
- placeholder: D,
71
- disabled: m,
72
- onChange: V,
73
- onKeyDown: z,
74
- spellCheck: !R,
75
- min: G,
76
- max: M
63
+ id: I,
64
+ ref: b,
65
+ type: C,
66
+ tabIndex: g,
67
+ autoFocus: q,
68
+ className: e.input,
69
+ value: l,
70
+ placeholder: M,
71
+ disabled: w,
72
+ onChange: D,
73
+ onKeyDown: F,
74
+ spellCheck: k,
75
+ min: S,
76
+ max: A
77
77
  }
78
78
  ),
79
- B
80
- ] }), L = _ ? /* @__PURE__ */ c("div", { className: e.description, children: _ }) : null, W = d ? /* @__PURE__ */ r("label", { htmlFor: f, children: [
81
- d,
82
- h
83
- ] }) : h, X = H(e.root, e[A], E, {
84
- [e["full-width"]]: I,
85
- [e.error]: y,
86
- [e.disabled]: m,
87
- [e["backdrop-blur"]]: j
88
- });
89
- return /* @__PURE__ */ r("div", { ref: g, className: X, children: [
90
- W,
91
- L
79
+ r && /* @__PURE__ */ f(j, { name: r, className: e.placeholderIcon }),
80
+ (y || !!i) && /* @__PURE__ */ h("div", { className: e.decorator, children: [
81
+ !!y && /* @__PURE__ */ f(G, {}),
82
+ !!i && z(i)
83
+ ] })
92
84
  ] });
93
85
  });
94
86
  export {
95
- ce as Input
87
+ oe as default
96
88
  };
@@ -0,0 +1,5 @@
1
+ import { default as React } from 'react';
2
+
3
+ declare function InputShowcase(): import("react/jsx-runtime").JSX.Element;
4
+ declare const _default: React.MemoExoticComponent<typeof InputShowcase>;
5
+ export default _default;
@@ -0,0 +1,90 @@
1
+ import { jsxs as l, jsx as e } from "react/jsx-runtime";
2
+ import i from "react";
3
+ import { Flex as r } from "../Layout/Flex/Flex.js";
4
+ import { Text as a } from "../Text/Text.js";
5
+ import c from "./Input.js";
6
+ const p = /^\+?[0-9]*$/;
7
+ function u() {
8
+ const [d, o] = i.useState(""), [n, h] = i.useState(0);
9
+ return /* @__PURE__ */ l(r, { gap: "large", vertical: !0, children: [
10
+ /* @__PURE__ */ l(r, { gap: "normal", vertical: !0, children: [
11
+ /* @__PURE__ */ e(a, { children: "Small" }),
12
+ /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(c, { placeholder: "Placeholder", size: "small" }) })
13
+ ] }),
14
+ /* @__PURE__ */ l(r, { gap: "normal", vertical: !0, children: [
15
+ /* @__PURE__ */ e(a, { children: "Normal" }),
16
+ /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(c, { placeholder: "Placeholder" }) })
17
+ ] }),
18
+ /* @__PURE__ */ l(r, { gap: "normal", vertical: !0, children: [
19
+ /* @__PURE__ */ e(a, { children: "Large" }),
20
+ /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(c, { placeholder: "Placeholder", size: "large" }) })
21
+ ] }),
22
+ /* @__PURE__ */ l(r, { gap: "normal", vertical: !0, children: [
23
+ /* @__PURE__ */ e(a, { children: "Disabled" }),
24
+ /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(c, { placeholder: "Placeholder", size: "large", disabled: !0 }) }),
25
+ /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(c, { placeholder: "Placeholder", size: "large", disabled: !0, value: "Some input value" }) })
26
+ ] }),
27
+ /* @__PURE__ */ l(r, { gap: "normal", vertical: !0, children: [
28
+ /* @__PURE__ */ e(a, { children: "With placrholder icon" }),
29
+ /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(c, { placeholder: "Placeholder", size: "large", placeholderIcon: "Tick" }) })
30
+ ] }),
31
+ /* @__PURE__ */ l(r, { gap: "normal", vertical: !0, children: [
32
+ /* @__PURE__ */ e(a, { children: "BackdropBlur" }),
33
+ /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(c, { backdropBlur: !0, placeholder: "Placeholder", size: "large", placeholderIcon: "Tick" }) })
34
+ ] }),
35
+ /* @__PURE__ */ l(r, { gap: "normal", vertical: !0, children: [
36
+ /* @__PURE__ */ e(a, { children: "Full width" }),
37
+ /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(c, { fullWidth: !0, placeholder: "Placeholder", size: "large", placeholderIcon: "Tick" }) })
38
+ ] }),
39
+ /* @__PURE__ */ l(r, { gap: "normal", vertical: !0, children: [
40
+ /* @__PURE__ */ e(a, { children: "Loading" }),
41
+ /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(c, { disabled: !0, loading: !0, placeholder: "Placeholder", size: "large", placeholderIcon: "Tick" }) })
42
+ ] }),
43
+ /* @__PURE__ */ l(r, { gap: "normal", vertical: !0, children: [
44
+ /* @__PURE__ */ e(a, { children: "With phone pattern Regex" }),
45
+ /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(
46
+ c,
47
+ {
48
+ pattern: p,
49
+ placeholder: "Placeholder",
50
+ size: "large",
51
+ placeholderIcon: "Tick",
52
+ value: d,
53
+ onChange: o
54
+ }
55
+ ) })
56
+ ] }),
57
+ /* @__PURE__ */ l(r, { gap: "normal", vertical: !0, children: [
58
+ /* @__PURE__ */ e(a, { children: "Decorator" }),
59
+ /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(
60
+ c,
61
+ {
62
+ placeholder: "Placeholder",
63
+ size: "large",
64
+ placeholderIcon: "Tick",
65
+ decorator: /* @__PURE__ */ e(a, { size: "xxsmall", children: "Decorator" })
66
+ }
67
+ ) })
68
+ ] }),
69
+ /* @__PURE__ */ l(r, { gap: "normal", vertical: !0, children: [
70
+ /* @__PURE__ */ e(a, { children: "Number input with min=1 max=100" }),
71
+ /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(
72
+ c,
73
+ {
74
+ placeholder: "Placeholder",
75
+ size: "large",
76
+ placeholderIcon: "Tick",
77
+ type: "number",
78
+ min: 1,
79
+ max: 100,
80
+ value: n,
81
+ onChange: (t) => h(Number(t))
82
+ }
83
+ ) })
84
+ ] })
85
+ ] });
86
+ }
87
+ const z = i.memo(u);
88
+ export {
89
+ z as default
90
+ };
@@ -15,4 +15,5 @@ export interface RichInputProps {
15
15
  autoFocus?: boolean;
16
16
  withClearButton?: boolean;
17
17
  }
18
- export declare const RichInput: React.ForwardRefExoticComponent<RichInputProps & React.RefAttributes<HTMLDivElement>>;
18
+ declare const RichInput: React.ForwardRefExoticComponent<RichInputProps & React.RefAttributes<HTMLDivElement>>;
19
+ export default RichInput;
@@ -1,63 +1,65 @@
1
- import { jsxs as B, jsx as o } from "react/jsx-runtime";
2
- import r from "react";
3
- import { Button as D } from "../Button/Button.js";
4
- import { I as F } from "../../Icons-BlBKvJD8.js";
5
- import { clsx as L } from "../../utils/clsx.js";
6
- import { useDynamicRef as i } from "../../utils/hooks.js";
7
- import '../../assets/RichInput.css';const T = "_root_16on4_1", j = "_renderer_16on4_1", z = "_small_16on4_8", E = "_large_16on4_13", H = "_clear_16on4_95", t = {
8
- root: T,
9
- renderer: j,
10
- small: z,
1
+ import { jsxs as D, jsx as n } from "react/jsx-runtime";
2
+ import t from "react";
3
+ import { Button as F } from "../Button/Button.js";
4
+ import { clsx as I } from "../../utils/clsx.js";
5
+ import { useDynamicRef as i } from "../../utils/hooks/useDynamicRef.js";
6
+ import "../../utils/hooks/useGlobalKeyboardEvent.js";
7
+ import "../../utils/hooks/useKeyboardClose.js";
8
+ import "../../index-2hJuj4UN.js";
9
+ import '../../assets/RichInput.css';const L = "_root_ttyw6_1", T = "_renderer_ttyw6_1", j = "_small_ttyw6_5", E = "_large_ttyw6_10", z = "_clear_ttyw6_144", o = {
10
+ root: L,
11
+ renderer: T,
12
+ small: j,
11
13
  large: E,
12
- clear: H
13
- }, O = r.forwardRef(function(f, m) {
14
+ clear: z
15
+ }, P = t.forwardRef(function(f, m) {
14
16
  const {
15
17
  size: d = "normal",
16
18
  value: c,
17
19
  onChange: p,
18
20
  onFocus: _,
19
21
  onBlur: h,
20
- onSelect: g,
21
- onKeyDown: C,
22
+ onSelect: C,
23
+ onKeyDown: g,
22
24
  className: R,
23
- rendered: S,
24
- placeholder: x,
25
- autoFocus: k,
26
- withClearButton: I = !1
27
- } = f, s = r.useRef(null), n = r.useRef(null), a = i(p), u = i(g), N = r.useCallback((e) => {
25
+ rendered: w,
26
+ placeholder: y,
27
+ autoFocus: S,
28
+ withClearButton: k = !1
29
+ } = f, s = t.useRef(null), r = t.useRef(null), a = i(p), u = i(C), x = t.useCallback((e) => {
28
30
  a.current(e.target.value);
29
- }, []), b = r.useCallback(() => {
31
+ }, []), N = t.useCallback(() => {
30
32
  var e;
31
33
  a.current(""), (e = s.current) == null || e.focus();
32
- }, []), v = r.useCallback((e) => {
34
+ }, []), b = t.useCallback((e) => {
33
35
  if (!u.current || !(e.target instanceof HTMLInputElement))
34
36
  return;
35
37
  const l = e.target;
36
38
  u.current(l.selectionStart, l.selectionEnd, l.selectionDirection);
37
- }, []), w = r.useCallback((e) => {
38
- n.current && (n.current.scrollTop = e.target.scrollTop, n.current.scrollLeft = e.target.scrollLeft);
39
- }, []), y = L(t.root, R, t[d]);
40
- return /* @__PURE__ */ B("div", { ref: m, className: y, children: [
41
- /* @__PURE__ */ o(
39
+ }, []), v = t.useCallback((e) => {
40
+ r.current && (r.current.scrollTop = e.target.scrollTop, r.current.scrollLeft = e.target.scrollLeft);
41
+ }, []), B = I(o.root, R, o[d]);
42
+ return /* @__PURE__ */ D("div", { ref: m, className: B, children: [
43
+ /* @__PURE__ */ n(
42
44
  "input",
43
45
  {
44
46
  ref: s,
45
- autoFocus: k,
47
+ autoFocus: S,
46
48
  type: "text",
47
49
  value: c,
48
- onChange: N,
49
- placeholder: x,
50
+ onChange: x,
51
+ placeholder: y,
50
52
  onBlur: h,
51
53
  onFocus: _,
52
- onScroll: w,
53
- onSelect: v,
54
- onKeyDown: C
54
+ onScroll: v,
55
+ onSelect: b,
56
+ onKeyDown: g
55
57
  }
56
58
  ),
57
- /* @__PURE__ */ o("div", { ref: n, className: t.renderer, children: S }),
58
- I && c && /* @__PURE__ */ o("div", { className: t.clear, children: /* @__PURE__ */ o(D, { size: "small", icon: F.exit, onClick: b }) })
59
+ /* @__PURE__ */ n("div", { ref: r, className: o.renderer, children: w }),
60
+ k && c && /* @__PURE__ */ n("div", { className: o.clear, children: /* @__PURE__ */ n(F, { icon: "Close", onClick: N }) })
59
61
  ] });
60
62
  });
61
63
  export {
62
- O as RichInput
64
+ P as default
63
65
  };
@@ -0,0 +1,4 @@
1
+ export { default as Input } from './Input';
2
+ export { default as RichInput } from './RichInput';
3
+ export type { InputSize, InputProps } from './Input';
4
+ export type { RichInputProps } from './RichInput';