@handijitcom/ui 0.0.0-stage → 1.1.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 (905) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +1025 -2
  3. package/build/base.css +1 -0
  4. package/build/calendar.cjs +2 -0
  5. package/build/calendar.cjs.map +1 -0
  6. package/build/calendar.css +1 -0
  7. package/build/calendar.js +741 -0
  8. package/build/calendar.js.map +1 -0
  9. package/build/charts.cjs +2 -0
  10. package/build/charts.cjs.map +1 -0
  11. package/build/charts.css +1 -0
  12. package/build/charts.js +1866 -0
  13. package/build/charts.js.map +1 -0
  14. package/build/chat.cjs +4 -0
  15. package/build/chat.cjs.map +1 -0
  16. package/build/chat.css +1 -0
  17. package/build/chat.js +1126 -0
  18. package/build/chat.js.map +1 -0
  19. package/build/components/Accordion/index.cjs +2 -0
  20. package/build/components/Accordion/index.cjs.map +1 -0
  21. package/build/components/Accordion/index.d.cts +29 -0
  22. package/build/components/Accordion/index.d.ts +29 -0
  23. package/build/components/Accordion/index.js +42 -0
  24. package/build/components/Accordion/index.js.map +1 -0
  25. package/build/components/Accordion/style.css +1 -0
  26. package/build/components/Alert/index.cjs +2 -0
  27. package/build/components/Alert/index.cjs.map +1 -0
  28. package/build/components/Alert/index.d.cts +15 -0
  29. package/build/components/Alert/index.d.ts +15 -0
  30. package/build/components/Alert/index.js +32 -0
  31. package/build/components/Alert/index.js.map +1 -0
  32. package/build/components/Alert/style.css +1 -0
  33. package/build/components/Avatar/index.cjs +2 -0
  34. package/build/components/Avatar/index.cjs.map +1 -0
  35. package/build/components/Avatar/index.d.cts +26 -0
  36. package/build/components/Avatar/index.d.ts +26 -0
  37. package/build/components/Avatar/index.js +57 -0
  38. package/build/components/Avatar/index.js.map +1 -0
  39. package/build/components/Avatar/style.css +1 -0
  40. package/build/components/Badge/index.cjs +2 -0
  41. package/build/components/Badge/index.cjs.map +1 -0
  42. package/build/components/Badge/index.d.cts +21 -0
  43. package/build/components/Badge/index.d.ts +21 -0
  44. package/build/components/Badge/index.js +26 -0
  45. package/build/components/Badge/index.js.map +1 -0
  46. package/build/components/Badge/style.css +1 -0
  47. package/build/components/BottomSheet/index.cjs +2 -0
  48. package/build/components/BottomSheet/index.cjs.map +1 -0
  49. package/build/components/BottomSheet/index.d.cts +21 -0
  50. package/build/components/BottomSheet/index.d.ts +21 -0
  51. package/build/components/BottomSheet/index.js +85 -0
  52. package/build/components/BottomSheet/index.js.map +1 -0
  53. package/build/components/BottomSheet/style.css +1 -0
  54. package/build/components/Breadcrumb/index.cjs +2 -0
  55. package/build/components/Breadcrumb/index.cjs.map +1 -0
  56. package/build/components/Breadcrumb/index.d.cts +20 -0
  57. package/build/components/Breadcrumb/index.d.ts +20 -0
  58. package/build/components/Breadcrumb/index.js +31 -0
  59. package/build/components/Breadcrumb/index.js.map +1 -0
  60. package/build/components/Breadcrumb/style.css +1 -0
  61. package/build/components/Button/index.cjs +2 -0
  62. package/build/components/Button/index.cjs.map +1 -0
  63. package/build/components/Button/index.d.cts +32 -0
  64. package/build/components/Button/index.d.ts +32 -0
  65. package/build/components/Button/index.js +88 -0
  66. package/build/components/Button/index.js.map +1 -0
  67. package/build/components/Button/style.css +1 -0
  68. package/build/components/Card/index.cjs +2 -0
  69. package/build/components/Card/index.cjs.map +1 -0
  70. package/build/components/Card/index.d.cts +51 -0
  71. package/build/components/Card/index.d.ts +51 -0
  72. package/build/components/Card/index.js +58 -0
  73. package/build/components/Card/index.js.map +1 -0
  74. package/build/components/Card/style.css +1 -0
  75. package/build/components/Carousel/index.cjs +2 -0
  76. package/build/components/Carousel/index.cjs.map +1 -0
  77. package/build/components/Carousel/index.d.cts +24 -0
  78. package/build/components/Carousel/index.d.ts +24 -0
  79. package/build/components/Carousel/index.js +111 -0
  80. package/build/components/Carousel/index.js.map +1 -0
  81. package/build/components/Carousel/style.css +1 -0
  82. package/build/components/Checkbox/index.cjs +2 -0
  83. package/build/components/Checkbox/index.cjs.map +1 -0
  84. package/build/components/Checkbox/index.d.cts +15 -0
  85. package/build/components/Checkbox/index.d.ts +15 -0
  86. package/build/components/Checkbox/index.js +50 -0
  87. package/build/components/Checkbox/index.js.map +1 -0
  88. package/build/components/Checkbox/style.css +1 -0
  89. package/build/components/Chip/index.cjs +2 -0
  90. package/build/components/Chip/index.cjs.map +1 -0
  91. package/build/components/Chip/index.d.cts +27 -0
  92. package/build/components/Chip/index.d.ts +27 -0
  93. package/build/components/Chip/index.js +67 -0
  94. package/build/components/Chip/index.js.map +1 -0
  95. package/build/components/Chip/style.css +1 -0
  96. package/build/components/ChipGroup/index.cjs +2 -0
  97. package/build/components/ChipGroup/index.cjs.map +1 -0
  98. package/build/components/ChipGroup/index.d.cts +53 -0
  99. package/build/components/ChipGroup/index.d.ts +53 -0
  100. package/build/components/ChipGroup/index.js +81 -0
  101. package/build/components/ChipGroup/index.js.map +1 -0
  102. package/build/components/ChipGroup/style.css +1 -0
  103. package/build/components/CodeBadge/index.cjs +2 -0
  104. package/build/components/CodeBadge/index.cjs.map +1 -0
  105. package/build/components/CodeBadge/index.d.cts +36 -0
  106. package/build/components/CodeBadge/index.d.ts +36 -0
  107. package/build/components/CodeBadge/index.js +62 -0
  108. package/build/components/CodeBadge/index.js.map +1 -0
  109. package/build/components/CodeBadge/style.css +1 -0
  110. package/build/components/Combobox/index.cjs +2 -0
  111. package/build/components/Combobox/index.cjs.map +1 -0
  112. package/build/components/Combobox/index.d.cts +8 -0
  113. package/build/components/Combobox/index.d.ts +8 -0
  114. package/build/components/Combobox/index.js +332 -0
  115. package/build/components/Combobox/index.js.map +1 -0
  116. package/build/components/Combobox/style.css +1 -0
  117. package/build/components/CommandPalette/index.cjs +2 -0
  118. package/build/components/CommandPalette/index.cjs.map +1 -0
  119. package/build/components/CommandPalette/index.d.cts +37 -0
  120. package/build/components/CommandPalette/index.d.ts +37 -0
  121. package/build/components/CommandPalette/index.js +181 -0
  122. package/build/components/CommandPalette/index.js.map +1 -0
  123. package/build/components/CommandPalette/style.css +1 -0
  124. package/build/components/ConfirmDialog/index.cjs +2 -0
  125. package/build/components/ConfirmDialog/index.cjs.map +1 -0
  126. package/build/components/ConfirmDialog/index.d.cts +34 -0
  127. package/build/components/ConfirmDialog/index.d.ts +34 -0
  128. package/build/components/ConfirmDialog/index.js +85 -0
  129. package/build/components/ConfirmDialog/index.js.map +1 -0
  130. package/build/components/CopyField/index.cjs +2 -0
  131. package/build/components/CopyField/index.cjs.map +1 -0
  132. package/build/components/CopyField/index.d.cts +20 -0
  133. package/build/components/CopyField/index.d.ts +20 -0
  134. package/build/components/CopyField/index.js +44 -0
  135. package/build/components/CopyField/index.js.map +1 -0
  136. package/build/components/CopyField/style.css +1 -0
  137. package/build/components/DataTable/index.cjs +2 -0
  138. package/build/components/DataTable/index.cjs.map +1 -0
  139. package/build/components/DataTable/index.d.cts +60 -0
  140. package/build/components/DataTable/index.d.ts +60 -0
  141. package/build/components/DataTable/index.js +109 -0
  142. package/build/components/DataTable/index.js.map +1 -0
  143. package/build/components/DataTable/style.css +1 -0
  144. package/build/components/DateField/index.cjs +2 -0
  145. package/build/components/DateField/index.cjs.map +1 -0
  146. package/build/components/DateField/index.d.cts +57 -0
  147. package/build/components/DateField/index.d.ts +57 -0
  148. package/build/components/DateField/index.js +90 -0
  149. package/build/components/DateField/index.js.map +1 -0
  150. package/build/components/DateField/style.css +1 -0
  151. package/build/components/Directory/index.cjs +2 -0
  152. package/build/components/Directory/index.cjs.map +1 -0
  153. package/build/components/Directory/index.d.cts +51 -0
  154. package/build/components/Directory/index.d.ts +51 -0
  155. package/build/components/Directory/index.js +46 -0
  156. package/build/components/Directory/index.js.map +1 -0
  157. package/build/components/Directory/style.css +1 -0
  158. package/build/components/Disclosure/index.cjs +2 -0
  159. package/build/components/Disclosure/index.cjs.map +1 -0
  160. package/build/components/Disclosure/index.d.cts +34 -0
  161. package/build/components/Disclosure/index.d.ts +34 -0
  162. package/build/components/Disclosure/index.js +64 -0
  163. package/build/components/Disclosure/index.js.map +1 -0
  164. package/build/components/Disclosure/style.css +1 -0
  165. package/build/components/Divider/index.cjs +2 -0
  166. package/build/components/Divider/index.cjs.map +1 -0
  167. package/build/components/Divider/index.d.cts +10 -0
  168. package/build/components/Divider/index.d.ts +10 -0
  169. package/build/components/Divider/index.js +24 -0
  170. package/build/components/Divider/index.js.map +1 -0
  171. package/build/components/Divider/style.css +1 -0
  172. package/build/components/Drawer/index.cjs +2 -0
  173. package/build/components/Drawer/index.cjs.map +1 -0
  174. package/build/components/Drawer/index.d.cts +29 -0
  175. package/build/components/Drawer/index.d.ts +29 -0
  176. package/build/components/Drawer/index.js +91 -0
  177. package/build/components/Drawer/index.js.map +1 -0
  178. package/build/components/Drawer/style.css +1 -0
  179. package/build/components/EmptyState/index.cjs +2 -0
  180. package/build/components/EmptyState/index.cjs.map +1 -0
  181. package/build/components/EmptyState/index.d.cts +19 -0
  182. package/build/components/EmptyState/index.d.ts +19 -0
  183. package/build/components/EmptyState/index.js +35 -0
  184. package/build/components/EmptyState/index.js.map +1 -0
  185. package/build/components/EmptyState/style.css +1 -0
  186. package/build/components/Field/index.cjs +2 -0
  187. package/build/components/Field/index.cjs.map +1 -0
  188. package/build/components/Field/index.d.cts +37 -0
  189. package/build/components/Field/index.d.ts +37 -0
  190. package/build/components/Field/index.js +54 -0
  191. package/build/components/Field/index.js.map +1 -0
  192. package/build/components/Field/style.css +1 -0
  193. package/build/components/FileUpload/index.cjs +2 -0
  194. package/build/components/FileUpload/index.cjs.map +1 -0
  195. package/build/components/FileUpload/index.d.cts +42 -0
  196. package/build/components/FileUpload/index.d.ts +42 -0
  197. package/build/components/FileUpload/index.js +145 -0
  198. package/build/components/FileUpload/index.js.map +1 -0
  199. package/build/components/FileUpload/style.css +1 -0
  200. package/build/components/FilterBar/index.cjs +2 -0
  201. package/build/components/FilterBar/index.cjs.map +1 -0
  202. package/build/components/FilterBar/index.d.cts +28 -0
  203. package/build/components/FilterBar/index.d.ts +28 -0
  204. package/build/components/FilterBar/index.js +35 -0
  205. package/build/components/FilterBar/index.js.map +1 -0
  206. package/build/components/FilterBar/style.css +1 -0
  207. package/build/components/IconButton/index.cjs +2 -0
  208. package/build/components/IconButton/index.cjs.map +1 -0
  209. package/build/components/IconButton/index.d.cts +26 -0
  210. package/build/components/IconButton/index.d.ts +26 -0
  211. package/build/components/IconButton/index.js +61 -0
  212. package/build/components/IconButton/index.js.map +1 -0
  213. package/build/components/IconButton/style.css +1 -0
  214. package/build/components/Input/index.cjs +2 -0
  215. package/build/components/Input/index.cjs.map +1 -0
  216. package/build/components/Input/index.d.cts +15 -0
  217. package/build/components/Input/index.d.ts +15 -0
  218. package/build/components/Input/index.js +52 -0
  219. package/build/components/Input/index.js.map +1 -0
  220. package/build/components/Input/style.css +1 -0
  221. package/build/components/Kbd/index.cjs +2 -0
  222. package/build/components/Kbd/index.cjs.map +1 -0
  223. package/build/components/Kbd/index.d.cts +12 -0
  224. package/build/components/Kbd/index.d.ts +12 -0
  225. package/build/components/Kbd/index.js +13 -0
  226. package/build/components/Kbd/index.js.map +1 -0
  227. package/build/components/Kbd/style.css +1 -0
  228. package/build/components/Link/index.cjs +2 -0
  229. package/build/components/Link/index.cjs.map +1 -0
  230. package/build/components/Link/index.d.cts +5 -0
  231. package/build/components/Link/index.d.ts +5 -0
  232. package/build/components/Link/index.js +11 -0
  233. package/build/components/Link/index.js.map +1 -0
  234. package/build/components/Menu/index.cjs +2 -0
  235. package/build/components/Menu/index.cjs.map +1 -0
  236. package/build/components/Menu/index.d.cts +46 -0
  237. package/build/components/Menu/index.d.ts +46 -0
  238. package/build/components/Menu/index.js +241 -0
  239. package/build/components/Menu/index.js.map +1 -0
  240. package/build/components/Menu/style.css +1 -0
  241. package/build/components/Modal/index.cjs +2 -0
  242. package/build/components/Modal/index.cjs.map +1 -0
  243. package/build/components/Modal/index.d.cts +35 -0
  244. package/build/components/Modal/index.d.ts +35 -0
  245. package/build/components/Modal/index.js +95 -0
  246. package/build/components/Modal/index.js.map +1 -0
  247. package/build/components/Modal/style.css +1 -0
  248. package/build/components/MoneyInput/index.cjs +2 -0
  249. package/build/components/MoneyInput/index.cjs.map +1 -0
  250. package/build/components/MoneyInput/index.d.cts +17 -0
  251. package/build/components/MoneyInput/index.d.ts +17 -0
  252. package/build/components/MoneyInput/index.js +22 -0
  253. package/build/components/MoneyInput/index.js.map +1 -0
  254. package/build/components/PageHeader/index.cjs +2 -0
  255. package/build/components/PageHeader/index.cjs.map +1 -0
  256. package/build/components/PageHeader/index.d.cts +24 -0
  257. package/build/components/PageHeader/index.d.ts +24 -0
  258. package/build/components/PageHeader/index.js +34 -0
  259. package/build/components/PageHeader/index.js.map +1 -0
  260. package/build/components/PageHeader/style.css +1 -0
  261. package/build/components/Pagination/index.cjs +2 -0
  262. package/build/components/Pagination/index.cjs.map +1 -0
  263. package/build/components/Pagination/index.d.cts +39 -0
  264. package/build/components/Pagination/index.d.ts +39 -0
  265. package/build/components/Pagination/index.js +128 -0
  266. package/build/components/Pagination/index.js.map +1 -0
  267. package/build/components/Pagination/style.css +1 -0
  268. package/build/components/Panel/index.cjs +2 -0
  269. package/build/components/Panel/index.cjs.map +1 -0
  270. package/build/components/Panel/index.d.cts +43 -0
  271. package/build/components/Panel/index.d.ts +43 -0
  272. package/build/components/Panel/index.js +55 -0
  273. package/build/components/Panel/index.js.map +1 -0
  274. package/build/components/Panel/style.css +1 -0
  275. package/build/components/PasswordInput/index.cjs +2 -0
  276. package/build/components/PasswordInput/index.cjs.map +1 -0
  277. package/build/components/PasswordInput/index.d.cts +14 -0
  278. package/build/components/PasswordInput/index.d.ts +14 -0
  279. package/build/components/PasswordInput/index.js +40 -0
  280. package/build/components/PasswordInput/index.js.map +1 -0
  281. package/build/components/PasswordInput/style.css +1 -0
  282. package/build/components/PercentInput/index.cjs +2 -0
  283. package/build/components/PercentInput/index.cjs.map +1 -0
  284. package/build/components/PercentInput/index.d.cts +10 -0
  285. package/build/components/PercentInput/index.d.ts +10 -0
  286. package/build/components/PercentInput/index.js +14 -0
  287. package/build/components/PercentInput/index.js.map +1 -0
  288. package/build/components/Popover/index.cjs +2 -0
  289. package/build/components/Popover/index.cjs.map +1 -0
  290. package/build/components/Popover/index.d.cts +26 -0
  291. package/build/components/Popover/index.d.ts +26 -0
  292. package/build/components/Popover/index.js +106 -0
  293. package/build/components/Popover/index.js.map +1 -0
  294. package/build/components/Popover/style.css +1 -0
  295. package/build/components/Price/index.cjs +2 -0
  296. package/build/components/Price/index.cjs.map +1 -0
  297. package/build/components/Price/index.d.cts +22 -0
  298. package/build/components/Price/index.d.ts +22 -0
  299. package/build/components/Price/index.js +46 -0
  300. package/build/components/Price/index.js.map +1 -0
  301. package/build/components/Price/style.css +1 -0
  302. package/build/components/Progress/index.cjs +2 -0
  303. package/build/components/Progress/index.cjs.map +1 -0
  304. package/build/components/Progress/index.d.cts +59 -0
  305. package/build/components/Progress/index.d.ts +59 -0
  306. package/build/components/Progress/index.js +124 -0
  307. package/build/components/Progress/index.js.map +1 -0
  308. package/build/components/Progress/style.css +1 -0
  309. package/build/components/PromptDialog/index.cjs +2 -0
  310. package/build/components/PromptDialog/index.cjs.map +1 -0
  311. package/build/components/PromptDialog/index.d.cts +36 -0
  312. package/build/components/PromptDialog/index.d.ts +36 -0
  313. package/build/components/PromptDialog/index.js +119 -0
  314. package/build/components/PromptDialog/index.js.map +1 -0
  315. package/build/components/PromptDialog/style.css +1 -0
  316. package/build/components/QuantityInput/index.cjs +2 -0
  317. package/build/components/QuantityInput/index.cjs.map +1 -0
  318. package/build/components/QuantityInput/index.d.cts +17 -0
  319. package/build/components/QuantityInput/index.d.ts +17 -0
  320. package/build/components/QuantityInput/index.js +23 -0
  321. package/build/components/QuantityInput/index.js.map +1 -0
  322. package/build/components/QuantityStepper/index.cjs +2 -0
  323. package/build/components/QuantityStepper/index.cjs.map +1 -0
  324. package/build/components/QuantityStepper/index.d.cts +37 -0
  325. package/build/components/QuantityStepper/index.d.ts +37 -0
  326. package/build/components/QuantityStepper/index.js +118 -0
  327. package/build/components/QuantityStepper/index.js.map +1 -0
  328. package/build/components/QuantityStepper/style.css +1 -0
  329. package/build/components/Radio/index.cjs +2 -0
  330. package/build/components/Radio/index.cjs.map +1 -0
  331. package/build/components/Radio/index.d.cts +18 -0
  332. package/build/components/Radio/index.d.ts +18 -0
  333. package/build/components/Radio/index.js +53 -0
  334. package/build/components/Radio/index.js.map +1 -0
  335. package/build/components/Radio/style.css +1 -0
  336. package/build/components/RadioCard/index.cjs +2 -0
  337. package/build/components/RadioCard/index.cjs.map +1 -0
  338. package/build/components/RadioCard/index.d.cts +16 -0
  339. package/build/components/RadioCard/index.d.ts +16 -0
  340. package/build/components/RadioCard/index.js +48 -0
  341. package/build/components/RadioCard/index.js.map +1 -0
  342. package/build/components/RadioCard/style.css +1 -0
  343. package/build/components/RangeSlider/index.cjs +2 -0
  344. package/build/components/RangeSlider/index.cjs.map +1 -0
  345. package/build/components/RangeSlider/index.d.cts +45 -0
  346. package/build/components/RangeSlider/index.d.ts +45 -0
  347. package/build/components/RangeSlider/index.js +121 -0
  348. package/build/components/RangeSlider/index.js.map +1 -0
  349. package/build/components/RangeSlider/style.css +1 -0
  350. package/build/components/RateInput/index.cjs +2 -0
  351. package/build/components/RateInput/index.cjs.map +1 -0
  352. package/build/components/RateInput/index.d.cts +9 -0
  353. package/build/components/RateInput/index.d.ts +9 -0
  354. package/build/components/RateInput/index.js +18 -0
  355. package/build/components/RateInput/index.js.map +1 -0
  356. package/build/components/Rating/index.cjs +2 -0
  357. package/build/components/Rating/index.cjs.map +1 -0
  358. package/build/components/Rating/index.d.cts +16 -0
  359. package/build/components/Rating/index.d.ts +16 -0
  360. package/build/components/Rating/index.js +29 -0
  361. package/build/components/Rating/index.js.map +1 -0
  362. package/build/components/Rating/style.css +1 -0
  363. package/build/components/RatingInput/index.cjs +2 -0
  364. package/build/components/RatingInput/index.cjs.map +1 -0
  365. package/build/components/RatingInput/index.d.cts +34 -0
  366. package/build/components/RatingInput/index.d.ts +34 -0
  367. package/build/components/RatingInput/index.js +89 -0
  368. package/build/components/RatingInput/index.js.map +1 -0
  369. package/build/components/RatingInput/style.css +1 -0
  370. package/build/components/ScaledInput/index.cjs +2 -0
  371. package/build/components/ScaledInput/index.cjs.map +1 -0
  372. package/build/components/ScaledInput/index.d.cts +77 -0
  373. package/build/components/ScaledInput/index.d.ts +77 -0
  374. package/build/components/ScaledInput/index.js +77 -0
  375. package/build/components/ScaledInput/index.js.map +1 -0
  376. package/build/components/ScaledInput/style.css +1 -0
  377. package/build/components/ScrollArea/index.cjs +2 -0
  378. package/build/components/ScrollArea/index.cjs.map +1 -0
  379. package/build/components/ScrollArea/index.d.cts +23 -0
  380. package/build/components/ScrollArea/index.d.ts +23 -0
  381. package/build/components/ScrollArea/index.js +65 -0
  382. package/build/components/ScrollArea/index.js.map +1 -0
  383. package/build/components/ScrollArea/style.css +1 -0
  384. package/build/components/SectionHeader/index.cjs +2 -0
  385. package/build/components/SectionHeader/index.cjs.map +1 -0
  386. package/build/components/SectionHeader/index.d.cts +17 -0
  387. package/build/components/SectionHeader/index.d.ts +17 -0
  388. package/build/components/SectionHeader/index.js +25 -0
  389. package/build/components/SectionHeader/index.js.map +1 -0
  390. package/build/components/SectionHeader/style.css +1 -0
  391. package/build/components/SegmentedControl/index.cjs +2 -0
  392. package/build/components/SegmentedControl/index.cjs.map +1 -0
  393. package/build/components/SegmentedControl/index.d.cts +39 -0
  394. package/build/components/SegmentedControl/index.d.ts +39 -0
  395. package/build/components/SegmentedControl/index.js +84 -0
  396. package/build/components/SegmentedControl/index.js.map +1 -0
  397. package/build/components/SegmentedControl/style.css +1 -0
  398. package/build/components/Select/index.cjs +2 -0
  399. package/build/components/Select/index.cjs.map +1 -0
  400. package/build/components/Select/index.d.cts +52 -0
  401. package/build/components/Select/index.d.ts +52 -0
  402. package/build/components/Select/index.js +206 -0
  403. package/build/components/Select/index.js.map +1 -0
  404. package/build/components/Select/style.css +1 -0
  405. package/build/components/Skeleton/index.cjs +2 -0
  406. package/build/components/Skeleton/index.cjs.map +1 -0
  407. package/build/components/Skeleton/index.d.cts +25 -0
  408. package/build/components/Skeleton/index.d.ts +25 -0
  409. package/build/components/Skeleton/index.js +50 -0
  410. package/build/components/Skeleton/index.js.map +1 -0
  411. package/build/components/Skeleton/style.css +1 -0
  412. package/build/components/Spinner/index.cjs +2 -0
  413. package/build/components/Spinner/index.cjs.map +1 -0
  414. package/build/components/Spinner/index.d.cts +16 -0
  415. package/build/components/Spinner/index.d.ts +16 -0
  416. package/build/components/Spinner/index.js +15 -0
  417. package/build/components/Spinner/index.js.map +1 -0
  418. package/build/components/Spinner/style.css +1 -0
  419. package/build/components/Stat/index.cjs +2 -0
  420. package/build/components/Stat/index.cjs.map +1 -0
  421. package/build/components/Stat/index.d.cts +34 -0
  422. package/build/components/Stat/index.d.ts +34 -0
  423. package/build/components/Stat/index.js +72 -0
  424. package/build/components/Stat/index.js.map +1 -0
  425. package/build/components/Stat/style.css +1 -0
  426. package/build/components/StatusDot/index.cjs +2 -0
  427. package/build/components/StatusDot/index.cjs.map +1 -0
  428. package/build/components/StatusDot/index.d.cts +23 -0
  429. package/build/components/StatusDot/index.d.ts +23 -0
  430. package/build/components/StatusDot/index.js +23 -0
  431. package/build/components/StatusDot/index.js.map +1 -0
  432. package/build/components/StatusDot/style.css +1 -0
  433. package/build/components/Steps/index.cjs +2 -0
  434. package/build/components/Steps/index.cjs.map +1 -0
  435. package/build/components/Steps/index.d.cts +23 -0
  436. package/build/components/Steps/index.d.ts +23 -0
  437. package/build/components/Steps/index.js +69 -0
  438. package/build/components/Steps/index.js.map +1 -0
  439. package/build/components/Steps/style.css +1 -0
  440. package/build/components/SummaryCard/index.cjs +2 -0
  441. package/build/components/SummaryCard/index.cjs.map +1 -0
  442. package/build/components/SummaryCard/index.d.cts +24 -0
  443. package/build/components/SummaryCard/index.d.ts +24 -0
  444. package/build/components/SummaryCard/index.js +33 -0
  445. package/build/components/SummaryCard/index.js.map +1 -0
  446. package/build/components/SummaryCard/style.css +1 -0
  447. package/build/components/Switch/index.cjs +2 -0
  448. package/build/components/Switch/index.cjs.map +1 -0
  449. package/build/components/Switch/index.d.cts +21 -0
  450. package/build/components/Switch/index.d.ts +21 -0
  451. package/build/components/Switch/index.js +60 -0
  452. package/build/components/Switch/index.js.map +1 -0
  453. package/build/components/Switch/style.css +1 -0
  454. package/build/components/Table/index.cjs +2 -0
  455. package/build/components/Table/index.cjs.map +1 -0
  456. package/build/components/Table/index.d.cts +28 -0
  457. package/build/components/Table/index.d.ts +28 -0
  458. package/build/components/Table/index.js +58 -0
  459. package/build/components/Table/index.js.map +1 -0
  460. package/build/components/Table/style.css +1 -0
  461. package/build/components/TableCheckbox/index.cjs +2 -0
  462. package/build/components/TableCheckbox/index.cjs.map +1 -0
  463. package/build/components/TableCheckbox/index.d.cts +15 -0
  464. package/build/components/TableCheckbox/index.d.ts +15 -0
  465. package/build/components/TableCheckbox/index.js +31 -0
  466. package/build/components/TableCheckbox/index.js.map +1 -0
  467. package/build/components/TableCheckbox/style.css +1 -0
  468. package/build/components/Tabs/index.cjs +2 -0
  469. package/build/components/Tabs/index.cjs.map +1 -0
  470. package/build/components/Tabs/index.d.cts +27 -0
  471. package/build/components/Tabs/index.d.ts +27 -0
  472. package/build/components/Tabs/index.js +102 -0
  473. package/build/components/Tabs/index.js.map +1 -0
  474. package/build/components/Tabs/style.css +1 -0
  475. package/build/components/TagInput/index.cjs +2 -0
  476. package/build/components/TagInput/index.cjs.map +1 -0
  477. package/build/components/TagInput/index.d.cts +43 -0
  478. package/build/components/TagInput/index.d.ts +43 -0
  479. package/build/components/TagInput/index.js +134 -0
  480. package/build/components/TagInput/index.js.map +1 -0
  481. package/build/components/TagInput/style.css +1 -0
  482. package/build/components/TextLink/index.cjs +2 -0
  483. package/build/components/TextLink/index.cjs.map +1 -0
  484. package/build/components/TextLink/index.d.cts +16 -0
  485. package/build/components/TextLink/index.d.ts +16 -0
  486. package/build/components/TextLink/index.js +32 -0
  487. package/build/components/TextLink/index.js.map +1 -0
  488. package/build/components/TextLink/style.css +1 -0
  489. package/build/components/Textarea/index.cjs +2 -0
  490. package/build/components/Textarea/index.cjs.map +1 -0
  491. package/build/components/Textarea/index.d.cts +20 -0
  492. package/build/components/Textarea/index.d.ts +20 -0
  493. package/build/components/Textarea/index.js +68 -0
  494. package/build/components/Textarea/index.js.map +1 -0
  495. package/build/components/Textarea/style.css +1 -0
  496. package/build/components/Tile/index.cjs +2 -0
  497. package/build/components/Tile/index.cjs.map +1 -0
  498. package/build/components/Tile/index.d.cts +19 -0
  499. package/build/components/Tile/index.d.ts +19 -0
  500. package/build/components/Tile/index.js +24 -0
  501. package/build/components/Tile/index.js.map +1 -0
  502. package/build/components/Tile/style.css +1 -0
  503. package/build/components/Timeline/index.cjs +2 -0
  504. package/build/components/Timeline/index.cjs.map +1 -0
  505. package/build/components/Timeline/index.d.cts +24 -0
  506. package/build/components/Timeline/index.d.ts +24 -0
  507. package/build/components/Timeline/index.js +56 -0
  508. package/build/components/Timeline/index.js.map +1 -0
  509. package/build/components/Timeline/style.css +1 -0
  510. package/build/components/Toast/index.cjs +2 -0
  511. package/build/components/Toast/index.cjs.map +1 -0
  512. package/build/components/Toast/index.d.cts +63 -0
  513. package/build/components/Toast/index.d.ts +63 -0
  514. package/build/components/Toast/index.js +159 -0
  515. package/build/components/Toast/index.js.map +1 -0
  516. package/build/components/Toast/style.css +1 -0
  517. package/build/components/ToastPortal/index.cjs +2 -0
  518. package/build/components/ToastPortal/index.cjs.map +1 -0
  519. package/build/components/ToastPortal/index.d.cts +10 -0
  520. package/build/components/ToastPortal/index.d.ts +10 -0
  521. package/build/components/ToastPortal/index.js +15 -0
  522. package/build/components/ToastPortal/index.js.map +1 -0
  523. package/build/components/Tooltip/index.cjs +2 -0
  524. package/build/components/Tooltip/index.cjs.map +1 -0
  525. package/build/components/Tooltip/index.d.cts +23 -0
  526. package/build/components/Tooltip/index.d.ts +23 -0
  527. package/build/components/Tooltip/index.js +116 -0
  528. package/build/components/Tooltip/index.js.map +1 -0
  529. package/build/components/Tooltip/style.css +1 -0
  530. package/build/constants/breakpoint.constants.cjs +2 -0
  531. package/build/constants/breakpoint.constants.cjs.map +1 -0
  532. package/build/constants/breakpoint.constants.d.cts +15 -0
  533. package/build/constants/breakpoint.constants.d.ts +15 -0
  534. package/build/constants/breakpoint.constants.js +12 -0
  535. package/build/constants/breakpoint.constants.js.map +1 -0
  536. package/build/constants/combobox.constants.cjs +2 -0
  537. package/build/constants/combobox.constants.cjs.map +1 -0
  538. package/build/constants/combobox.constants.d.cts +11 -0
  539. package/build/constants/combobox.constants.d.ts +11 -0
  540. package/build/constants/combobox.constants.js +7 -0
  541. package/build/constants/combobox.constants.js.map +1 -0
  542. package/build/constants/scale.constants.cjs +2 -0
  543. package/build/constants/scale.constants.cjs.map +1 -0
  544. package/build/constants/scale.constants.d.cts +10 -0
  545. package/build/constants/scale.constants.d.ts +10 -0
  546. package/build/constants/scale.constants.js +8 -0
  547. package/build/constants/scale.constants.js.map +1 -0
  548. package/build/constants/scroll.constants.cjs +2 -0
  549. package/build/constants/scroll.constants.cjs.map +1 -0
  550. package/build/constants/scroll.constants.d.cts +7 -0
  551. package/build/constants/scroll.constants.d.ts +7 -0
  552. package/build/constants/scroll.constants.js +5 -0
  553. package/build/constants/scroll.constants.js.map +1 -0
  554. package/build/design/fonts/LICENSE-archivo.txt +93 -0
  555. package/build/design/fonts/LICENSE-ibm-plex-mono.txt +93 -0
  556. package/build/design/fonts/LICENSE-inter.txt +93 -0
  557. package/build/design/fonts/archivo-latin-ext-wdth-normal.woff2 +0 -0
  558. package/build/design/fonts/archivo-latin-wdth-normal.woff2 +0 -0
  559. package/build/design/fonts/ibm-plex-mono-latin-400-normal.woff2 +0 -0
  560. package/build/design/fonts/ibm-plex-mono-latin-500-normal.woff2 +0 -0
  561. package/build/design/fonts/ibm-plex-mono-latin-ext-400-normal.woff2 +0 -0
  562. package/build/design/fonts/ibm-plex-mono-latin-ext-500-normal.woff2 +0 -0
  563. package/build/design/fonts/inter-latin-ext-wght-normal.woff2 +0 -0
  564. package/build/design/fonts/inter-latin-wght-normal.woff2 +0 -0
  565. package/build/design/fonts.css +75 -0
  566. package/build/design/fonts.d.css.ts +1 -0
  567. package/build/design/index.cjs +778 -0
  568. package/build/design/index.cjs.map +1 -0
  569. package/build/design/index.d.cts +263 -0
  570. package/build/design/index.d.mts +263 -0
  571. package/build/design/index.mjs +751 -0
  572. package/build/design/index.mjs.map +1 -0
  573. package/build/design/index.umd.cjs +2 -0
  574. package/build/design/index.umd.cjs.map +1 -0
  575. package/build/design/logos/horizontal.svg +1 -0
  576. package/build/design/logos/mark.svg +1 -0
  577. package/build/design/tokens.css +477 -0
  578. package/build/design/tokens.d.css.ts +1 -0
  579. package/build/design/tokens.json +542 -0
  580. package/build/design/tokens.scss +616 -0
  581. package/build/enums/ui-size.enum.cjs +2 -0
  582. package/build/enums/ui-size.enum.cjs.map +1 -0
  583. package/build/enums/ui-size.enum.d.cts +12 -0
  584. package/build/enums/ui-size.enum.d.ts +12 -0
  585. package/build/enums/ui-size.enum.js +5 -0
  586. package/build/enums/ui-size.enum.js.map +1 -0
  587. package/build/enums/ui-variant.enum.cjs +2 -0
  588. package/build/enums/ui-variant.enum.cjs.map +1 -0
  589. package/build/enums/ui-variant.enum.d.cts +20 -0
  590. package/build/enums/ui-variant.enum.d.ts +20 -0
  591. package/build/enums/ui-variant.enum.js +5 -0
  592. package/build/enums/ui-variant.enum.js.map +1 -0
  593. package/build/helpers/aria.helper.cjs +2 -0
  594. package/build/helpers/aria.helper.cjs.map +1 -0
  595. package/build/helpers/aria.helper.d.cts +7 -0
  596. package/build/helpers/aria.helper.d.ts +7 -0
  597. package/build/helpers/aria.helper.js +5 -0
  598. package/build/helpers/aria.helper.js.map +1 -0
  599. package/build/helpers/class-name.helper.cjs +2 -0
  600. package/build/helpers/class-name.helper.cjs.map +1 -0
  601. package/build/helpers/class-name.helper.d.cts +3 -0
  602. package/build/helpers/class-name.helper.d.ts +3 -0
  603. package/build/helpers/class-name.helper.js +10 -0
  604. package/build/helpers/class-name.helper.js.map +1 -0
  605. package/build/helpers/component.helper.cjs +2 -0
  606. package/build/helpers/component.helper.cjs.map +1 -0
  607. package/build/helpers/component.helper.d.cts +13 -0
  608. package/build/helpers/component.helper.d.ts +13 -0
  609. package/build/helpers/component.helper.js +5 -0
  610. package/build/helpers/component.helper.js.map +1 -0
  611. package/build/helpers/focus.helper.cjs +2 -0
  612. package/build/helpers/focus.helper.cjs.map +1 -0
  613. package/build/helpers/focus.helper.d.cts +90 -0
  614. package/build/helpers/focus.helper.d.ts +90 -0
  615. package/build/helpers/focus.helper.js +83 -0
  616. package/build/helpers/focus.helper.js.map +1 -0
  617. package/build/helpers/label.helper.cjs +2 -0
  618. package/build/helpers/label.helper.cjs.map +1 -0
  619. package/build/helpers/label.helper.d.cts +11 -0
  620. package/build/helpers/label.helper.d.ts +11 -0
  621. package/build/helpers/label.helper.js +11 -0
  622. package/build/helpers/label.helper.js.map +1 -0
  623. package/build/helpers/portal.helper.cjs +2 -0
  624. package/build/helpers/portal.helper.cjs.map +1 -0
  625. package/build/helpers/portal.helper.d.cts +28 -0
  626. package/build/helpers/portal.helper.d.ts +28 -0
  627. package/build/helpers/portal.helper.js +36 -0
  628. package/build/helpers/portal.helper.js.map +1 -0
  629. package/build/helpers/ref.helper.cjs +2 -0
  630. package/build/helpers/ref.helper.cjs.map +1 -0
  631. package/build/helpers/ref.helper.d.cts +3 -0
  632. package/build/helpers/ref.helper.d.ts +3 -0
  633. package/build/helpers/ref.helper.js +7 -0
  634. package/build/helpers/ref.helper.js.map +1 -0
  635. package/build/helpers/scaled-number.helper.cjs +2 -0
  636. package/build/helpers/scaled-number.helper.cjs.map +1 -0
  637. package/build/helpers/scaled-number.helper.d.cts +54 -0
  638. package/build/helpers/scaled-number.helper.d.ts +54 -0
  639. package/build/helpers/scaled-number.helper.js +34 -0
  640. package/build/helpers/scaled-number.helper.js.map +1 -0
  641. package/build/helpers/scroll.helper.cjs +2 -0
  642. package/build/helpers/scroll.helper.cjs.map +1 -0
  643. package/build/helpers/scroll.helper.d.cts +8 -0
  644. package/build/helpers/scroll.helper.d.ts +8 -0
  645. package/build/helpers/scroll.helper.js +11 -0
  646. package/build/helpers/scroll.helper.js.map +1 -0
  647. package/build/helpers/text.helper.cjs +2 -0
  648. package/build/helpers/text.helper.cjs.map +1 -0
  649. package/build/helpers/text.helper.d.cts +5 -0
  650. package/build/helpers/text.helper.d.ts +5 -0
  651. package/build/helpers/text.helper.js +6 -0
  652. package/build/helpers/text.helper.js.map +1 -0
  653. package/build/helpers/theme.helper.cjs +2 -0
  654. package/build/helpers/theme.helper.cjs.map +1 -0
  655. package/build/helpers/theme.helper.d.cts +18 -0
  656. package/build/helpers/theme.helper.d.ts +18 -0
  657. package/build/helpers/theme.helper.js +37 -0
  658. package/build/helpers/theme.helper.js.map +1 -0
  659. package/build/hooks/useAnnounce.cjs +2 -0
  660. package/build/hooks/useAnnounce.cjs.map +1 -0
  661. package/build/hooks/useAnnounce.d.cts +4 -0
  662. package/build/hooks/useAnnounce.d.ts +4 -0
  663. package/build/hooks/useAnnounce.js +23 -0
  664. package/build/hooks/useAnnounce.js.map +1 -0
  665. package/build/hooks/useAsyncSearch.cjs +2 -0
  666. package/build/hooks/useAsyncSearch.cjs.map +1 -0
  667. package/build/hooks/useAsyncSearch.d.cts +11 -0
  668. package/build/hooks/useAsyncSearch.d.ts +11 -0
  669. package/build/hooks/useAsyncSearch.js +17 -0
  670. package/build/hooks/useAsyncSearch.js.map +1 -0
  671. package/build/hooks/useCopyFeedback.cjs +2 -0
  672. package/build/hooks/useCopyFeedback.cjs.map +1 -0
  673. package/build/hooks/useCopyFeedback.d.cts +10 -0
  674. package/build/hooks/useCopyFeedback.d.ts +10 -0
  675. package/build/hooks/useCopyFeedback.js +25 -0
  676. package/build/hooks/useCopyFeedback.js.map +1 -0
  677. package/build/hooks/useDismissOnEscape.cjs +2 -0
  678. package/build/hooks/useDismissOnEscape.cjs.map +1 -0
  679. package/build/hooks/useDismissOnEscape.d.cts +16 -0
  680. package/build/hooks/useDismissOnEscape.d.ts +16 -0
  681. package/build/hooks/useDismissOnEscape.js +18 -0
  682. package/build/hooks/useDismissOnEscape.js.map +1 -0
  683. package/build/hooks/useListboxNavigation.cjs +2 -0
  684. package/build/hooks/useListboxNavigation.cjs.map +1 -0
  685. package/build/hooks/useListboxNavigation.d.cts +7 -0
  686. package/build/hooks/useListboxNavigation.d.ts +7 -0
  687. package/build/hooks/useListboxNavigation.js +53 -0
  688. package/build/hooks/useListboxNavigation.js.map +1 -0
  689. package/build/hooks/usePortalSurface.cjs +2 -0
  690. package/build/hooks/usePortalSurface.cjs.map +1 -0
  691. package/build/hooks/usePortalSurface.d.cts +25 -0
  692. package/build/hooks/usePortalSurface.d.ts +25 -0
  693. package/build/hooks/usePortalSurface.js +19 -0
  694. package/build/hooks/usePortalSurface.js.map +1 -0
  695. package/build/hooks/usePositioning.cjs +2 -0
  696. package/build/hooks/usePositioning.cjs.map +1 -0
  697. package/build/hooks/usePositioning.d.cts +13 -0
  698. package/build/hooks/usePositioning.d.ts +13 -0
  699. package/build/hooks/usePositioning.js +74 -0
  700. package/build/hooks/usePositioning.js.map +1 -0
  701. package/build/hooks/useScrollLock.cjs +2 -0
  702. package/build/hooks/useScrollLock.cjs.map +1 -0
  703. package/build/hooks/useScrollLock.d.cts +2 -0
  704. package/build/hooks/useScrollLock.d.ts +2 -0
  705. package/build/hooks/useScrollLock.js +34 -0
  706. package/build/hooks/useScrollLock.js.map +1 -0
  707. package/build/hooks/useSheetViewport.cjs +2 -0
  708. package/build/hooks/useSheetViewport.cjs.map +1 -0
  709. package/build/hooks/useSheetViewport.d.cts +6 -0
  710. package/build/hooks/useSheetViewport.d.ts +6 -0
  711. package/build/hooks/useSheetViewport.js +29 -0
  712. package/build/hooks/useSheetViewport.js.map +1 -0
  713. package/build/hooks/useStickToBottom.cjs +2 -0
  714. package/build/hooks/useStickToBottom.cjs.map +1 -0
  715. package/build/hooks/useStickToBottom.d.cts +12 -0
  716. package/build/hooks/useStickToBottom.d.ts +12 -0
  717. package/build/hooks/useStickToBottom.js +39 -0
  718. package/build/hooks/useStickToBottom.js.map +1 -0
  719. package/build/hooks/useUiTheme.cjs +2 -0
  720. package/build/hooks/useUiTheme.cjs.map +1 -0
  721. package/build/hooks/useUiTheme.d.cts +10 -0
  722. package/build/hooks/useUiTheme.d.ts +10 -0
  723. package/build/hooks/useUiTheme.js +42 -0
  724. package/build/hooks/useUiTheme.js.map +1 -0
  725. package/build/hooks/useUiTokens.cjs +2 -0
  726. package/build/hooks/useUiTokens.cjs.map +1 -0
  727. package/build/hooks/useUiTokens.d.cts +11 -0
  728. package/build/hooks/useUiTokens.d.ts +11 -0
  729. package/build/hooks/useUiTokens.js +36 -0
  730. package/build/hooks/useUiTokens.js.map +1 -0
  731. package/build/hooks/useVirtualList.cjs +2 -0
  732. package/build/hooks/useVirtualList.cjs.map +1 -0
  733. package/build/hooks/useVirtualList.d.cts +13 -0
  734. package/build/hooks/useVirtualList.d.ts +13 -0
  735. package/build/hooks/useVirtualList.js +41 -0
  736. package/build/hooks/useVirtualList.js.map +1 -0
  737. package/build/index.cjs +2 -0
  738. package/build/index.cjs.map +1 -0
  739. package/build/index.d.cts +98 -0
  740. package/build/index.d.ts +98 -0
  741. package/build/index.js +209 -0
  742. package/build/index.js.map +1 -0
  743. package/build/scss/_index.scss +7 -0
  744. package/build/scss/_mixins.scss +861 -0
  745. package/build/scss/_variables.scss +245 -0
  746. package/build/styles/base.d.cts +0 -0
  747. package/build/styles/base.d.ts +0 -0
  748. package/build/styles.css +135 -0
  749. package/build/theme/UiProvider.cjs +2 -0
  750. package/build/theme/UiProvider.cjs.map +1 -0
  751. package/build/theme/UiProvider.d.cts +23 -0
  752. package/build/theme/UiProvider.d.ts +23 -0
  753. package/build/theme/UiProvider.js +12 -0
  754. package/build/theme/UiProvider.js.map +1 -0
  755. package/build/theme/UiThemeScript.cjs +2 -0
  756. package/build/theme/UiThemeScript.cjs.map +1 -0
  757. package/build/theme/UiThemeScript.d.cts +22 -0
  758. package/build/theme/UiThemeScript.d.ts +22 -0
  759. package/build/theme/UiThemeScript.js +8 -0
  760. package/build/theme/UiThemeScript.js.map +1 -0
  761. package/build/theme/context.cjs +2 -0
  762. package/build/theme/context.cjs.map +1 -0
  763. package/build/theme/context.d.cts +5 -0
  764. package/build/theme/context.d.ts +5 -0
  765. package/build/theme/context.js +8 -0
  766. package/build/theme/context.js.map +1 -0
  767. package/build/types/calendar/Calendar/EventBlock.d.cts +29 -0
  768. package/build/types/calendar/Calendar/EventBlock.d.ts +29 -0
  769. package/build/types/calendar/Calendar/MonthGrid.d.cts +28 -0
  770. package/build/types/calendar/Calendar/MonthGrid.d.ts +28 -0
  771. package/build/types/calendar/Calendar/TimeGrid.d.cts +37 -0
  772. package/build/types/calendar/Calendar/TimeGrid.d.ts +37 -0
  773. package/build/types/calendar/Calendar/index.d.cts +72 -0
  774. package/build/types/calendar/Calendar/index.d.ts +72 -0
  775. package/build/types/calendar/core/layout.d.cts +43 -0
  776. package/build/types/calendar/core/layout.d.ts +43 -0
  777. package/build/types/calendar/core/moves.d.cts +37 -0
  778. package/build/types/calendar/core/moves.d.ts +37 -0
  779. package/build/types/calendar/core/time.d.cts +19 -0
  780. package/build/types/calendar/core/time.d.ts +19 -0
  781. package/build/types/calendar/core/types.d.cts +75 -0
  782. package/build/types/calendar/core/types.d.ts +75 -0
  783. package/build/types/calendar/core/useCalendarDrag.d.cts +32 -0
  784. package/build/types/calendar/core/useCalendarDrag.d.ts +32 -0
  785. package/build/types/calendar/index.d.cts +13 -0
  786. package/build/types/calendar/index.d.ts +13 -0
  787. package/build/types/charts/AreaChart/index.d.cts +14 -0
  788. package/build/types/charts/AreaChart/index.d.ts +14 -0
  789. package/build/types/charts/BarChart/index.d.cts +16 -0
  790. package/build/types/charts/BarChart/index.d.ts +16 -0
  791. package/build/types/charts/BoxPlot/index.d.cts +43 -0
  792. package/build/types/charts/BoxPlot/index.d.ts +43 -0
  793. package/build/types/charts/ComposedChart/index.d.cts +16 -0
  794. package/build/types/charts/ComposedChart/index.d.ts +16 -0
  795. package/build/types/charts/Heatmap/index.d.cts +30 -0
  796. package/build/types/charts/Heatmap/index.d.ts +30 -0
  797. package/build/types/charts/Histogram/index.d.cts +29 -0
  798. package/build/types/charts/Histogram/index.d.ts +29 -0
  799. package/build/types/charts/LineChart/index.d.cts +14 -0
  800. package/build/types/charts/LineChart/index.d.ts +14 -0
  801. package/build/types/charts/PieChart/index.d.cts +36 -0
  802. package/build/types/charts/PieChart/index.d.ts +36 -0
  803. package/build/types/charts/RadarChart/index.d.cts +40 -0
  804. package/build/types/charts/RadarChart/index.d.ts +40 -0
  805. package/build/types/charts/ScatterPlot/index.d.cts +41 -0
  806. package/build/types/charts/ScatterPlot/index.d.ts +41 -0
  807. package/build/types/charts/core/CartesianChart.d.cts +43 -0
  808. package/build/types/charts/core/CartesianChart.d.ts +43 -0
  809. package/build/types/charts/core/ChartFrame.d.cts +55 -0
  810. package/build/types/charts/core/ChartFrame.d.ts +55 -0
  811. package/build/types/charts/core/axes.d.cts +37 -0
  812. package/build/types/charts/core/axes.d.ts +37 -0
  813. package/build/types/charts/core/cartesian.d.cts +80 -0
  814. package/build/types/charts/core/cartesian.d.ts +80 -0
  815. package/build/types/charts/core/format.d.cts +19 -0
  816. package/build/types/charts/core/format.d.ts +19 -0
  817. package/build/types/charts/core/margins.d.cts +9 -0
  818. package/build/types/charts/core/margins.d.ts +9 -0
  819. package/build/types/charts/core/palette.d.cts +11 -0
  820. package/build/types/charts/core/palette.d.ts +11 -0
  821. package/build/types/charts/core/path.d.cts +24 -0
  822. package/build/types/charts/core/path.d.ts +24 -0
  823. package/build/types/charts/core/scale.d.cts +40 -0
  824. package/build/types/charts/core/scale.d.ts +40 -0
  825. package/build/types/charts/core/series.d.cts +11 -0
  826. package/build/types/charts/core/series.d.ts +11 -0
  827. package/build/types/charts/core/spatial.d.cts +12 -0
  828. package/build/types/charts/core/spatial.d.ts +12 -0
  829. package/build/types/charts/core/stats.d.cts +34 -0
  830. package/build/types/charts/core/stats.d.ts +34 -0
  831. package/build/types/charts/core/types.d.cts +31 -0
  832. package/build/types/charts/core/types.d.ts +31 -0
  833. package/build/types/charts/core/useChartWidth.d.cts +7 -0
  834. package/build/types/charts/core/useChartWidth.d.ts +7 -0
  835. package/build/types/charts/index.d.cts +21 -0
  836. package/build/types/charts/index.d.ts +21 -0
  837. package/build/types/chat/ActionList/index.d.cts +46 -0
  838. package/build/types/chat/ActionList/index.d.ts +46 -0
  839. package/build/types/chat/AppBar/index.d.cts +21 -0
  840. package/build/types/chat/AppBar/index.d.ts +21 -0
  841. package/build/types/chat/ChatMessage/index.d.cts +24 -0
  842. package/build/types/chat/ChatMessage/index.d.ts +24 -0
  843. package/build/types/chat/ChatThread/index.d.cts +24 -0
  844. package/build/types/chat/ChatThread/index.d.ts +24 -0
  845. package/build/types/chat/Citation/index.d.cts +15 -0
  846. package/build/types/chat/Citation/index.d.ts +15 -0
  847. package/build/types/chat/CodeBlock/format.d.cts +7 -0
  848. package/build/types/chat/CodeBlock/format.d.ts +7 -0
  849. package/build/types/chat/CodeBlock/grammars.d.cts +44 -0
  850. package/build/types/chat/CodeBlock/grammars.d.ts +44 -0
  851. package/build/types/chat/CodeBlock/highlight.d.cts +22 -0
  852. package/build/types/chat/CodeBlock/highlight.d.ts +22 -0
  853. package/build/types/chat/CodeBlock/index.d.cts +33 -0
  854. package/build/types/chat/CodeBlock/index.d.ts +33 -0
  855. package/build/types/chat/DescriptionList/index.d.cts +16 -0
  856. package/build/types/chat/DescriptionList/index.d.ts +16 -0
  857. package/build/types/chat/Legend/index.d.cts +21 -0
  858. package/build/types/chat/Legend/index.d.ts +21 -0
  859. package/build/types/chat/MessageActions/index.d.cts +21 -0
  860. package/build/types/chat/MessageActions/index.d.ts +21 -0
  861. package/build/types/chat/PromptInput/index.d.cts +47 -0
  862. package/build/types/chat/PromptInput/index.d.ts +47 -0
  863. package/build/types/chat/PromptSuggestions/index.d.cts +25 -0
  864. package/build/types/chat/PromptSuggestions/index.d.ts +25 -0
  865. package/build/types/chat/Prose/index.d.cts +15 -0
  866. package/build/types/chat/Prose/index.d.ts +15 -0
  867. package/build/types/chat/ReasoningBlock/index.d.cts +24 -0
  868. package/build/types/chat/ReasoningBlock/index.d.ts +24 -0
  869. package/build/types/chat/ReasoningText/index.d.cts +14 -0
  870. package/build/types/chat/ReasoningText/index.d.ts +14 -0
  871. package/build/types/chat/SegmentBar/index.d.cts +46 -0
  872. package/build/types/chat/SegmentBar/index.d.ts +46 -0
  873. package/build/types/chat/SourceList/index.d.cts +25 -0
  874. package/build/types/chat/SourceList/index.d.ts +25 -0
  875. package/build/types/chat/TerminalOutput/index.d.cts +25 -0
  876. package/build/types/chat/TerminalOutput/index.d.ts +25 -0
  877. package/build/types/chat/ToolCall/index.d.cts +41 -0
  878. package/build/types/chat/ToolCall/index.d.ts +41 -0
  879. package/build/types/chat/index.d.cts +26 -0
  880. package/build/types/chat/index.d.ts +26 -0
  881. package/build/types/combobox.type.d.cts +65 -0
  882. package/build/types/combobox.type.d.ts +65 -0
  883. package/build/types/common-element-props.type.d.cts +8 -0
  884. package/build/types/common-element-props.type.d.ts +8 -0
  885. package/build/types/helpers/class-name.helper.d.cts +3 -0
  886. package/build/types/helpers/class-name.helper.d.ts +3 -0
  887. package/build/types/helpers/component.helper.d.cts +13 -0
  888. package/build/types/helpers/component.helper.d.ts +13 -0
  889. package/build/types/helpers/label.helper.d.cts +12 -0
  890. package/build/types/helpers/label.helper.d.ts +12 -0
  891. package/build/types/hook.type.d.cts +36 -0
  892. package/build/types/hook.type.d.ts +36 -0
  893. package/build/types/link.type.d.cts +14 -0
  894. package/build/types/link.type.d.ts +14 -0
  895. package/build/types/positioning.type.d.cts +38 -0
  896. package/build/types/positioning.type.d.ts +38 -0
  897. package/build/types/theme.type.d.cts +197 -0
  898. package/build/types/theme.type.d.ts +197 -0
  899. package/build/types/types/common-element-props.type.d.cts +8 -0
  900. package/build/types/types/common-element-props.type.d.ts +8 -0
  901. package/build/types/types/link.type.d.cts +14 -0
  902. package/build/types/types/link.type.d.ts +14 -0
  903. package/build/types/types/theme.type.d.cts +197 -0
  904. package/build/types/types/theme.type.d.ts +197 -0
  905. package/package.json +929 -4
@@ -0,0 +1,29 @@
1
+ "use client";
2
+ import { jsxs as l, jsx as t } from "react/jsx-runtime";
3
+ import { memo as u } from "react";
4
+ import { isDefined as _ } from "@handijitcom/utils";
5
+ import { StarFill as c, StarHalf as h } from "react-bootstrap-icons";
6
+ import { cx as N } from "../../helpers/class-name.helper.js";
7
+ import { resolveFormatter as y } from "../../helpers/label.helper.js";
8
+ import { useUi as j } from "../../theme/context.js";
9
+ const r = {"rating":"ui-rating-94dke","rating__stars":"ui-rating__stars-QkpVU","rating__empty":"ui-rating__empty-Wf6-K","rating__count":"ui-rating__count-pIoEs","rating__srOnly":"ui-rating__srOnly-E9h0d","rating--sm":"ui-rating--sm-AtY7U","rating--md":"ui-rating--md-Q0nxN"};
10
+ const x = ({ value: n, count: s, srLabel: p, size: f = "sm", className: d, testId: g }) => {
11
+ var o;
12
+ const { labels: i } = j(), e = Math.round(n * 2) / 2;
13
+ return /* @__PURE__ */ l("span", { className: N(r.rating, r[`rating--${f}`], d), "data-testid": g, children: [
14
+ /* @__PURE__ */ t("span", { className: r.rating__stars, "aria-hidden": !0, children: Array.from({ length: 5 }, (F, a) => {
15
+ const m = a + 1;
16
+ return e >= m ? /* @__PURE__ */ t(c, {}, a) : e >= m - 0.5 ? /* @__PURE__ */ t(h, {}, a) : /* @__PURE__ */ t(c, { className: r.rating__empty }, a);
17
+ }) }),
18
+ /* @__PURE__ */ t("span", { className: r.rating__srOnly, children: p ?? y("Rating.srLabel", (o = i == null ? void 0 : i.rating) == null ? void 0 : o.srLabel, n, s) }),
19
+ _(s) && /* @__PURE__ */ l("span", { className: r.rating__count, "aria-hidden": !0, children: [
20
+ "(",
21
+ s,
22
+ ")"
23
+ ] })
24
+ ] });
25
+ }, O = /* @__PURE__ */ u(x);
26
+ export {
27
+ O as default
28
+ };
29
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/Rating/index.tsx"],"sourcesContent":["'use client';\n\nimport { type FC, memo } from 'react';\n\nimport { isDefined } from '@handijitcom/utils';\n\nimport { StarFill, StarHalf } from 'react-bootstrap-icons';\n\nimport { cx } from '../../helpers/class-name.helper';\nimport { resolveFormatter } from '../../helpers/label.helper';\nimport { useUi } from '../../theme/context';\n\nimport styles from './index.module.scss';\n\ntype Props = {\n /** 0–5 arası puan. */\n value: number;\n /** Değerlendirme sayısı; verilirse yıldızların yanında gösterilir. */\n count?: number;\n /** Ekran okuyucuya okunan metin. */\n srLabel?: string;\n size?: 'sm' | 'md';\n className?: string;\n testId?: string;\n};\n\n/** Yıldız puanı — salt gösterim. */\nconst Rating: FC<Props> = ({ value, count, srLabel, size = 'sm', className, testId }) => {\n const { labels } = useUi();\n const rounded = Math.round(value * 2) / 2;\n\n return (\n <span className={cx(styles.rating, styles[`rating--${size}`], className)} data-testid={testId}>\n {/*\n * BOS YILDIZ DA DOLU — farkı renk taşır (`rating__empty`), çizgi değil.\n *\n * <p>İçi boş yıldız yalnızca bir konturdur: dolu komşusunun yanında\n * \"eksik çizilmiş\" gibi durur ve küçük boyda kontur tek piksele inip\n * kayboluyordu. Aynı gövde + soluk ton, beş yıldızın silüetini bozmadan\n * doluluğu okutur.\n */}\n <span className={styles.rating__stars} aria-hidden>\n {Array.from({ length: 5 }, (_, index) => {\n const position = index + 1;\n if (rounded >= position) return <StarFill key={index} />;\n if (rounded >= position - 0.5) return <StarHalf key={index} />;\n return <StarFill key={index} className={styles.rating__empty} />;\n })}\n </span>\n\n <span className={styles.rating__srOnly}>\n {srLabel ?? resolveFormatter('Rating.srLabel', labels?.rating?.srLabel, value, count)}\n </span>\n\n {isDefined(count) && (\n <span className={styles.rating__count} aria-hidden>\n ({count})\n </span>\n )}\n </span>\n );\n};\n\nexport default /*#__PURE__*/ memo(Rating) as typeof Rating;\n"],"names":["Rating","value","count","srLabel","size","className","testId","labels","useUi","rounded","jsxs","cx","styles","jsx","_","index","position","StarFill","StarHalf","resolveFormatter","_a","isDefined"],"mappings":";;;;;;;;;AA0BA,MAAMA,IAAoB,CAAC,EAAE,OAAAC,GAAO,OAAAC,GAAO,SAAAC,GAAS,MAAAC,IAAO,MAAM,WAAAC,GAAW,QAAAC,QAAa;;AACvF,QAAM,EAAE,QAAAC,EAAA,IAAWC,EAAA,GACbC,IAAU,KAAK,MAAMR,IAAQ,CAAC,IAAI;AAExC,SACE,gBAAAS,EAAC,QAAA,EAAK,WAAWC,EAAGC,EAAO,QAAQA,EAAO,WAAWR,CAAI,EAAE,GAAGC,CAAS,GAAG,eAAaC,GASrF,UAAA;AAAA,IAAA,gBAAAO,EAAC,QAAA,EAAK,WAAWD,EAAO,eAAe,eAAW,IAC/C,UAAA,MAAM,KAAK,EAAE,QAAQ,EAAA,GAAK,CAACE,GAAGC,MAAU;AACvC,YAAMC,IAAWD,IAAQ;AACzB,aAAIN,KAAWO,IAAiB,gBAAAH,EAACI,OAAcF,CAAO,IAClDN,KAAWO,IAAW,MAAY,gBAAAH,EAACK,OAAcH,CAAO,IACrD,gBAAAF,EAACI,GAAA,EAAqB,WAAWL,EAAO,iBAAzBG,CAAwC;AAAA,IAChE,CAAC,EAAA,CACH;AAAA,IAEA,gBAAAF,EAAC,QAAA,EAAK,WAAWD,EAAO,gBACrB,UAAAT,KAAWgB,EAAiB,mBAAkBC,IAAAb,KAAA,gBAAAA,EAAQ,WAAR,gBAAAa,EAAgB,SAASnB,GAAOC,CAAK,GACtF;AAAA,IAECmB,EAAUnB,CAAK,KACd,gBAAAQ,EAAC,UAAK,WAAWE,EAAO,eAAe,eAAW,IAAC,UAAA;AAAA,MAAA;AAAA,MAC/CV;AAAA,MAAM;AAAA,IAAA,EAAA,CACV;AAAA,EAAA,GAEJ;AAEJ,GAEAa,sBAAkCf,CAAM;"}
@@ -0,0 +1 @@
1
+ @layer ui{.ui-rating-94dke{display:inline-flex;align-items:center;gap:var(--hd-space-2)}.ui-rating__stars-QkpVU{display:inline-flex;gap:1px;color:var(--hd-warning-solid)}.ui-rating__empty-Wf6-K{color:var(--hd-border-strong)}.ui-rating__count-pIoEs{font-size:var(--hd-type-caption-size);color:var(--hd-text-2);font-variant-numeric:tabular-nums}.ui-rating__srOnly-E9h0d{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.ui-rating--sm-AtY7U .ui-rating__stars-QkpVU{font-size:16px}.ui-rating--md-Q0nxN .ui-rating__stars-QkpVU{font-size:18px}}
@@ -0,0 +1,2 @@
1
+ "use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("react/jsx-runtime"),l=require("react"),I=require("react-bootstrap-icons"),_=require("../../helpers/class-name.helper.cjs"),M=require("../../helpers/label.helper.cjs"),C=require("../../theme/context.cjs"),e={default:{"rating":"ui-rating-neNnF","rating--disabled":"ui-rating--disabled-ZKjHa","rating__legend":"ui-rating__legend-uYvFS","rating__caption":"ui-rating__caption-13KFX","rating__star--filled":"ui-rating__star--filled-L3AkT","rating__star":"ui-rating__star-BANFJ","rating--readOnly":"ui-rating--readOnly-wWIFW","rating__stars":"ui-rating__stars-vJFLk","rating__input":"ui-rating__input-s2iiO","rating__srOnly":"ui-rating__srOnly-iSCoz"}},F=[1,2,3,4,5],R=({value:d,onChange:m,label:f,ratingLabels:h,formatStarCount:x,isDisabled:u,isReadOnly:s,id:p,required:j,"aria-describedby":v,"aria-invalid":N,className:q,testId:S})=>{var c;const{labels:n}=C.useUi(),r=h??((c=n==null?void 0:n.rating)==null?void 0:c.scale),b=l.useId(),[y,o]=l.useState(null),i=y??d;return a.jsxs("fieldset",{id:p,className:_.cx(e.default.rating,u&&e.default["rating--disabled"],s&&e.default["rating--readOnly"],q),disabled:u,"aria-describedby":v,"aria-invalid":N||void 0,"data-testid":S,children:[a.jsx("legend",{className:e.default.rating__legend,children:f}),a.jsx("div",{className:e.default.rating__stars,onMouseLeave:()=>o(null),children:F.map(t=>{var g;return a.jsxs("label",{className:_.cx(e.default.rating__star,i!==null&&t<=i&&e.default["rating__star--filled"]),onMouseEnter:()=>!s&&o(t),children:[a.jsx("input",{type:"radio",name:b,value:t,checked:d===t,required:j,onChange:()=>!s&&m(t),className:e.default.rating__input}),a.jsx(I.StarFill,{"aria-hidden":!0}),a.jsxs("span",{className:e.default.rating__srOnly,children:[M.resolveFormatter("RatingInput.formatStarCount",x??((g=n==null?void 0:n.rating)==null?void 0:g.starCount),t)," ","— ",(r==null?void 0:r[t])??""]})]},t)})}),i!==null&&a.jsx("span",{className:e.default.rating__caption,"aria-hidden":!0,children:(r==null?void 0:r[i])??""})]})},T=l.memo(R);exports.default=T;
2
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/components/RatingInput/index.tsx"],"sourcesContent":["'use client';\n\nimport { memo, useId, useState } from 'react';\n\nimport { StarFill } from 'react-bootstrap-icons';\n\nimport { cx } from '../../helpers/class-name.helper';\nimport { resolveFormatter } from '../../helpers/label.helper';\nimport { useUi } from '../../theme/context';\n\nimport styles from './index.module.scss';\n\n/** Beş puanın her birinin ne anlama geldiği. */\nexport type RatingLabels = Record<1 | 2 | 3 | 4 | 5, string>;\n\ntype Props = {\n value: number | null;\n onChange: (value: number) => void;\n /** Grubun erişilebilir adı (\"Ürün puanı\"). */\n label: string;\n /**\n * Puan açıklamaları. Hem ekran okuyucuya okunur hem de seçildiğinde yıldızların altında yazar.\n */\n ratingLabels?: RatingLabels;\n /** Ekran okuyucuda yıldız sayısını okuyan biçimlendirici (\"4 yıldız\"). */\n formatStarCount?: (star: number) => string;\n isDisabled?: boolean;\n /**\n * Read-only (2.2): the stars stay focusable and readable, but neither a press nor the arrow keys\n * change the rating, and hovering previews nothing.\n */\n isReadOnly?: boolean;\n /** The id of the `<fieldset>` (2.2) — the `id` of `Field`'s `FieldChildProps`. */\n id?: string;\n /** Zorunluluk (2.2): the native `required` of the five radios — the group of one name. */\n required?: boolean;\n /** On the `<fieldset>` (2.2), with the error and hint ids of `Field`. */\n 'aria-describedby'?: string;\n /** On the `<fieldset>` (2.2). */\n 'aria-invalid'?: boolean;\n className?: string;\n testId?: string;\n};\n\nconst STARS = [1, 2, 3, 4, 5] as const;\n\n/** Yıldızla puan girişi. */\nconst RatingInput = ({\n value,\n onChange,\n label,\n ratingLabels,\n formatStarCount,\n isDisabled,\n isReadOnly,\n id,\n required,\n 'aria-describedby': describedBy,\n 'aria-invalid': isInvalid,\n className,\n testId,\n}: Props) => {\n const { labels } = useUi();\n const scale = ratingLabels ?? labels?.rating?.scale;\n const name = useId();\n const [hovered, setHovered] = useState<number | null>(null);\n\n // Fare yildizlarin uzerindeyken onizleme gosterilir; ayrilinca gercek secime doner.\n const shown = hovered ?? value;\n\n return (\n <fieldset\n id={id}\n className={cx(\n styles.rating,\n isDisabled && styles['rating--disabled'],\n isReadOnly && styles['rating--readOnly'],\n className,\n )}\n disabled={isDisabled}\n aria-describedby={describedBy}\n aria-invalid={isInvalid || undefined}\n data-testid={testId}\n >\n <legend className={styles.rating__legend}>{label}</legend>\n\n <div className={styles.rating__stars} onMouseLeave={() => setHovered(null)}>\n {STARS.map(star => (\n <label\n key={star}\n className={cx(\n styles.rating__star,\n shown !== null && star <= shown && styles['rating__star--filled'],\n )}\n onMouseEnter={() => !isReadOnly && setHovered(star)}\n >\n <input\n type=\"radio\"\n name={name}\n value={star}\n checked={value === star}\n required={required}\n /* Read-only: the controlled `checked` is not handed on, so React restores it. */\n onChange={() => !isReadOnly && onChange(star)}\n className={styles.rating__input}\n />\n <StarFill aria-hidden />\n <span className={styles.rating__srOnly}>\n {resolveFormatter(\n 'RatingInput.formatStarCount',\n formatStarCount ?? labels?.rating?.starCount,\n star,\n )}{' '}\n — {scale?.[star] ?? ''}\n </span>\n </label>\n ))}\n </div>\n\n {/* Secim metni: `aria-hidden` cunku ayni bilgi radyonun etiketinde var. */}\n {shown !== null && (\n <span className={styles.rating__caption} aria-hidden>\n {scale?.[shown as 1 | 2 | 3 | 4 | 5] ?? ''}\n </span>\n )}\n </fieldset>\n );\n};\n\nexport default /*#__PURE__*/ memo(RatingInput) as typeof RatingInput;\n"],"names":["STARS","RatingInput","value","onChange","label","ratingLabels","formatStarCount","isDisabled","isReadOnly","id","required","describedBy","isInvalid","className","testId","labels","useUi","scale","_a","name","useId","hovered","setHovered","useState","shown","jsxs","cx","styles","jsx","star","StarFill","resolveFormatter","index"],"mappings":"2XA2CMA,EAAQ,CAAC,EAAG,EAAG,EAAG,EAAG,CAAC,EAGtBC,EAAc,CAAC,CACnB,MAAAC,EACA,SAAAC,EACA,MAAAC,EACA,aAAAC,EACA,gBAAAC,EACA,WAAAC,EACA,WAAAC,EACA,GAAAC,EACA,SAAAC,EACA,mBAAoBC,EACpB,eAAgBC,EAChB,UAAAC,EACA,OAAAC,CACF,IAAa,OACX,KAAM,CAAE,OAAAC,CAAA,EAAWC,QAAA,EACbC,EAAQZ,KAAgBa,EAAAH,GAAA,YAAAA,EAAQ,SAAR,YAAAG,EAAgB,OACxCC,EAAOC,EAAAA,MAAA,EACP,CAACC,EAASC,CAAU,EAAIC,EAAAA,SAAwB,IAAI,EAGpDC,EAAQH,GAAWnB,EAEzB,OACEuB,EAAAA,KAAC,WAAA,CACC,GAAAhB,EACA,UAAWiB,EAAAA,GACTC,EAAAA,QAAO,OACPpB,GAAcoB,EAAAA,QAAO,kBAAkB,EACvCnB,GAAcmB,EAAAA,QAAO,kBAAkB,EACvCd,CAAA,EAEF,SAAUN,EACV,mBAAkBI,EAClB,eAAcC,GAAa,OAC3B,cAAaE,EAEb,SAAA,CAAAc,EAAAA,IAAC,SAAA,CAAO,UAAWD,EAAAA,QAAO,eAAiB,SAAAvB,EAAM,EAEjDwB,EAAAA,IAAC,MAAA,CAAI,UAAWD,EAAAA,QAAO,cAAe,aAAc,IAAML,EAAW,IAAI,EACtE,SAAAtB,EAAM,IAAI6B,GAAA,OACTJ,OAAAA,EAAAA,KAAC,QAAA,CAEC,UAAWC,EAAAA,GACTC,EAAAA,QAAO,aACPH,IAAU,MAAQK,GAAQL,GAASG,EAAAA,QAAO,sBAAsB,CAAA,EAElE,aAAc,IAAM,CAACnB,GAAcc,EAAWO,CAAI,EAElD,SAAA,CAAAD,EAAAA,IAAC,QAAA,CACC,KAAK,QACL,KAAAT,EACA,MAAOU,EACP,QAAS3B,IAAU2B,EACnB,SAAAnB,EAEA,SAAU,IAAM,CAACF,GAAcL,EAAS0B,CAAI,EAC5C,UAAWF,EAAAA,QAAO,aAAA,CAAA,EAEpBC,EAAAA,IAACE,EAAAA,SAAA,CAAS,cAAW,EAAA,CAAC,EACtBL,EAAAA,KAAC,OAAA,CAAK,UAAWE,EAAAA,QAAO,eACrB,SAAA,CAAAI,EAAAA,iBACC,8BACAzB,KAAmBY,EAAAH,GAAA,YAAAA,EAAQ,SAAR,YAAAG,EAAgB,WACnCW,CAAA,EACC,IAAI,MACJZ,GAAA,YAAAA,EAAQY,KAAS,EAAA,CAAA,CACtB,CAAA,CAAA,EAzBKA,CAAA,EA2BR,EACH,EAGCL,IAAU,MACTI,EAAAA,IAAC,OAAA,CAAK,UAAWD,EAAAA,QAAO,gBAAiB,cAAW,GACjD,UAAAV,GAAA,YAAAA,EAAQO,KAA+B,EAAA,CAC1C,CAAA,CAAA,CAAA,CAIR,EAEAQ,SAAkC/B,CAAW"}
@@ -0,0 +1,34 @@
1
+ /** Beş puanın her birinin ne anlama geldiği. */
2
+ export type RatingLabels = Record<1 | 2 | 3 | 4 | 5, string>;
3
+ type Props = {
4
+ value: number | null;
5
+ onChange: (value: number) => void;
6
+ /** Grubun erişilebilir adı ("Ürün puanı"). */
7
+ label: string;
8
+ /**
9
+ * Puan açıklamaları. Hem ekran okuyucuya okunur hem de seçildiğinde yıldızların altında yazar.
10
+ */
11
+ ratingLabels?: RatingLabels;
12
+ /** Ekran okuyucuda yıldız sayısını okuyan biçimlendirici ("4 yıldız"). */
13
+ formatStarCount?: (star: number) => string;
14
+ isDisabled?: boolean;
15
+ /**
16
+ * Read-only (2.2): the stars stay focusable and readable, but neither a press nor the arrow keys
17
+ * change the rating, and hovering previews nothing.
18
+ */
19
+ isReadOnly?: boolean;
20
+ /** The id of the `<fieldset>` (2.2) — the `id` of `Field`'s `FieldChildProps`. */
21
+ id?: string;
22
+ /** Zorunluluk (2.2): the native `required` of the five radios — the group of one name. */
23
+ required?: boolean;
24
+ /** On the `<fieldset>` (2.2), with the error and hint ids of `Field`. */
25
+ 'aria-describedby'?: string;
26
+ /** On the `<fieldset>` (2.2). */
27
+ 'aria-invalid'?: boolean;
28
+ className?: string;
29
+ testId?: string;
30
+ };
31
+ /** Yıldızla puan girişi. */
32
+ declare const RatingInput: ({ value, onChange, label, ratingLabels, formatStarCount, isDisabled, isReadOnly, id, required, "aria-describedby": describedBy, "aria-invalid": isInvalid, className, testId, }: Props) => import("react").JSX.Element;
33
+ declare const _default: typeof RatingInput;
34
+ export default _default;
@@ -0,0 +1,34 @@
1
+ /** Beş puanın her birinin ne anlama geldiği. */
2
+ export type RatingLabels = Record<1 | 2 | 3 | 4 | 5, string>;
3
+ type Props = {
4
+ value: number | null;
5
+ onChange: (value: number) => void;
6
+ /** Grubun erişilebilir adı ("Ürün puanı"). */
7
+ label: string;
8
+ /**
9
+ * Puan açıklamaları. Hem ekran okuyucuya okunur hem de seçildiğinde yıldızların altında yazar.
10
+ */
11
+ ratingLabels?: RatingLabels;
12
+ /** Ekran okuyucuda yıldız sayısını okuyan biçimlendirici ("4 yıldız"). */
13
+ formatStarCount?: (star: number) => string;
14
+ isDisabled?: boolean;
15
+ /**
16
+ * Read-only (2.2): the stars stay focusable and readable, but neither a press nor the arrow keys
17
+ * change the rating, and hovering previews nothing.
18
+ */
19
+ isReadOnly?: boolean;
20
+ /** The id of the `<fieldset>` (2.2) — the `id` of `Field`'s `FieldChildProps`. */
21
+ id?: string;
22
+ /** Zorunluluk (2.2): the native `required` of the five radios — the group of one name. */
23
+ required?: boolean;
24
+ /** On the `<fieldset>` (2.2), with the error and hint ids of `Field`. */
25
+ 'aria-describedby'?: string;
26
+ /** On the `<fieldset>` (2.2). */
27
+ 'aria-invalid'?: boolean;
28
+ className?: string;
29
+ testId?: string;
30
+ };
31
+ /** Yıldızla puan girişi. */
32
+ declare const RatingInput: ({ value, onChange, label, ratingLabels, formatStarCount, isDisabled, isReadOnly, id, required, "aria-describedby": describedBy, "aria-invalid": isInvalid, className, testId, }: Props) => import("react").JSX.Element;
33
+ declare const _default: typeof RatingInput;
34
+ export default _default;
@@ -0,0 +1,89 @@
1
+ "use client";
2
+ import { jsxs as s, jsx as a } from "react/jsx-runtime";
3
+ import { memo as j, useId as F, useState as M } from "react";
4
+ import { StarFill as k } from "react-bootstrap-icons";
5
+ import { cx as g } from "../../helpers/class-name.helper.js";
6
+ import { resolveFormatter as w } from "../../helpers/label.helper.js";
7
+ import { useUi as A } from "../../theme/context.js";
8
+ const n = {"rating":"ui-rating-neNnF","rating--disabled":"ui-rating--disabled-ZKjHa","rating__legend":"ui-rating__legend-uYvFS","rating__caption":"ui-rating__caption-13KFX","rating__star--filled":"ui-rating__star--filled-L3AkT","rating__star":"ui-rating__star-BANFJ","rating--readOnly":"ui-rating--readOnly-wWIFW","rating__stars":"ui-rating__stars-vJFLk","rating__input":"ui-rating__input-s2iiO","rating__srOnly":"ui-rating__srOnly-iSCoz"};
9
+ const E = [1, 2, 3, 4, 5], H = ({
10
+ value: d,
11
+ onChange: p,
12
+ label: _,
13
+ ratingLabels: h,
14
+ formatStarCount: f,
15
+ isDisabled: l,
16
+ isReadOnly: o,
17
+ id: v,
18
+ required: N,
19
+ "aria-describedby": x,
20
+ "aria-invalid": S,
21
+ className: y,
22
+ testId: b
23
+ }) => {
24
+ var c;
25
+ const { labels: r } = A(), t = h ?? ((c = r == null ? void 0 : r.rating) == null ? void 0 : c.scale), C = F(), [I, m] = M(null), i = I ?? d;
26
+ return /* @__PURE__ */ s(
27
+ "fieldset",
28
+ {
29
+ id: v,
30
+ className: g(
31
+ n.rating,
32
+ l && n["rating--disabled"],
33
+ o && n["rating--readOnly"],
34
+ y
35
+ ),
36
+ disabled: l,
37
+ "aria-describedby": x,
38
+ "aria-invalid": S || void 0,
39
+ "data-testid": b,
40
+ children: [
41
+ /* @__PURE__ */ a("legend", { className: n.rating__legend, children: _ }),
42
+ /* @__PURE__ */ a("div", { className: n.rating__stars, onMouseLeave: () => m(null), children: E.map((e) => {
43
+ var u;
44
+ return /* @__PURE__ */ s(
45
+ "label",
46
+ {
47
+ className: g(
48
+ n.rating__star,
49
+ i !== null && e <= i && n["rating__star--filled"]
50
+ ),
51
+ onMouseEnter: () => !o && m(e),
52
+ children: [
53
+ /* @__PURE__ */ a(
54
+ "input",
55
+ {
56
+ type: "radio",
57
+ name: C,
58
+ value: e,
59
+ checked: d === e,
60
+ required: N,
61
+ onChange: () => !o && p(e),
62
+ className: n.rating__input
63
+ }
64
+ ),
65
+ /* @__PURE__ */ a(k, { "aria-hidden": !0 }),
66
+ /* @__PURE__ */ s("span", { className: n.rating__srOnly, children: [
67
+ w(
68
+ "RatingInput.formatStarCount",
69
+ f ?? ((u = r == null ? void 0 : r.rating) == null ? void 0 : u.starCount),
70
+ e
71
+ ),
72
+ " ",
73
+ "— ",
74
+ (t == null ? void 0 : t[e]) ?? ""
75
+ ] })
76
+ ]
77
+ },
78
+ e
79
+ );
80
+ }) }),
81
+ i !== null && /* @__PURE__ */ a("span", { className: n.rating__caption, "aria-hidden": !0, children: (t == null ? void 0 : t[i]) ?? "" })
82
+ ]
83
+ }
84
+ );
85
+ }, G = /* @__PURE__ */ j(H);
86
+ export {
87
+ G as default
88
+ };
89
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/RatingInput/index.tsx"],"sourcesContent":["'use client';\n\nimport { memo, useId, useState } from 'react';\n\nimport { StarFill } from 'react-bootstrap-icons';\n\nimport { cx } from '../../helpers/class-name.helper';\nimport { resolveFormatter } from '../../helpers/label.helper';\nimport { useUi } from '../../theme/context';\n\nimport styles from './index.module.scss';\n\n/** Beş puanın her birinin ne anlama geldiği. */\nexport type RatingLabels = Record<1 | 2 | 3 | 4 | 5, string>;\n\ntype Props = {\n value: number | null;\n onChange: (value: number) => void;\n /** Grubun erişilebilir adı (\"Ürün puanı\"). */\n label: string;\n /**\n * Puan açıklamaları. Hem ekran okuyucuya okunur hem de seçildiğinde yıldızların altında yazar.\n */\n ratingLabels?: RatingLabels;\n /** Ekran okuyucuda yıldız sayısını okuyan biçimlendirici (\"4 yıldız\"). */\n formatStarCount?: (star: number) => string;\n isDisabled?: boolean;\n /**\n * Read-only (2.2): the stars stay focusable and readable, but neither a press nor the arrow keys\n * change the rating, and hovering previews nothing.\n */\n isReadOnly?: boolean;\n /** The id of the `<fieldset>` (2.2) — the `id` of `Field`'s `FieldChildProps`. */\n id?: string;\n /** Zorunluluk (2.2): the native `required` of the five radios — the group of one name. */\n required?: boolean;\n /** On the `<fieldset>` (2.2), with the error and hint ids of `Field`. */\n 'aria-describedby'?: string;\n /** On the `<fieldset>` (2.2). */\n 'aria-invalid'?: boolean;\n className?: string;\n testId?: string;\n};\n\nconst STARS = [1, 2, 3, 4, 5] as const;\n\n/** Yıldızla puan girişi. */\nconst RatingInput = ({\n value,\n onChange,\n label,\n ratingLabels,\n formatStarCount,\n isDisabled,\n isReadOnly,\n id,\n required,\n 'aria-describedby': describedBy,\n 'aria-invalid': isInvalid,\n className,\n testId,\n}: Props) => {\n const { labels } = useUi();\n const scale = ratingLabels ?? labels?.rating?.scale;\n const name = useId();\n const [hovered, setHovered] = useState<number | null>(null);\n\n // Fare yildizlarin uzerindeyken onizleme gosterilir; ayrilinca gercek secime doner.\n const shown = hovered ?? value;\n\n return (\n <fieldset\n id={id}\n className={cx(\n styles.rating,\n isDisabled && styles['rating--disabled'],\n isReadOnly && styles['rating--readOnly'],\n className,\n )}\n disabled={isDisabled}\n aria-describedby={describedBy}\n aria-invalid={isInvalid || undefined}\n data-testid={testId}\n >\n <legend className={styles.rating__legend}>{label}</legend>\n\n <div className={styles.rating__stars} onMouseLeave={() => setHovered(null)}>\n {STARS.map(star => (\n <label\n key={star}\n className={cx(\n styles.rating__star,\n shown !== null && star <= shown && styles['rating__star--filled'],\n )}\n onMouseEnter={() => !isReadOnly && setHovered(star)}\n >\n <input\n type=\"radio\"\n name={name}\n value={star}\n checked={value === star}\n required={required}\n /* Read-only: the controlled `checked` is not handed on, so React restores it. */\n onChange={() => !isReadOnly && onChange(star)}\n className={styles.rating__input}\n />\n <StarFill aria-hidden />\n <span className={styles.rating__srOnly}>\n {resolveFormatter(\n 'RatingInput.formatStarCount',\n formatStarCount ?? labels?.rating?.starCount,\n star,\n )}{' '}\n — {scale?.[star] ?? ''}\n </span>\n </label>\n ))}\n </div>\n\n {/* Secim metni: `aria-hidden` cunku ayni bilgi radyonun etiketinde var. */}\n {shown !== null && (\n <span className={styles.rating__caption} aria-hidden>\n {scale?.[shown as 1 | 2 | 3 | 4 | 5] ?? ''}\n </span>\n )}\n </fieldset>\n );\n};\n\nexport default /*#__PURE__*/ memo(RatingInput) as typeof RatingInput;\n"],"names":["STARS","RatingInput","value","onChange","label","ratingLabels","formatStarCount","isDisabled","isReadOnly","id","required","describedBy","isInvalid","className","testId","labels","useUi","scale","_a","name","useId","hovered","setHovered","useState","shown","jsxs","cx","styles","jsx","star","StarFill","resolveFormatter","index"],"mappings":";;;;;;;;AA2CA,MAAMA,IAAQ,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC,GAGtBC,IAAc,CAAC;AAAA,EACnB,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,OAAAC;AAAA,EACA,cAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,YAAAC;AAAA,EACA,YAAAC;AAAA,EACA,IAAAC;AAAA,EACA,UAAAC;AAAA,EACA,oBAAoBC;AAAA,EACpB,gBAAgBC;AAAA,EAChB,WAAAC;AAAA,EACA,QAAAC;AACF,MAAa;;AACX,QAAM,EAAE,QAAAC,EAAA,IAAWC,EAAA,GACbC,IAAQZ,OAAgBa,IAAAH,KAAA,gBAAAA,EAAQ,WAAR,gBAAAG,EAAgB,QACxCC,IAAOC,EAAA,GACP,CAACC,GAASC,CAAU,IAAIC,EAAwB,IAAI,GAGpDC,IAAQH,KAAWnB;AAEzB,SACE,gBAAAuB;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,IAAAhB;AAAA,MACA,WAAWiB;AAAA,QACTC,EAAO;AAAA,QACPpB,KAAcoB,EAAO,kBAAkB;AAAA,QACvCnB,KAAcmB,EAAO,kBAAkB;AAAA,QACvCd;AAAA,MAAA;AAAA,MAEF,UAAUN;AAAA,MACV,oBAAkBI;AAAA,MAClB,gBAAcC,KAAa;AAAA,MAC3B,eAAaE;AAAA,MAEb,UAAA;AAAA,QAAA,gBAAAc,EAAC,UAAA,EAAO,WAAWD,EAAO,gBAAiB,UAAAvB,GAAM;AAAA,QAEjD,gBAAAwB,EAAC,OAAA,EAAI,WAAWD,EAAO,eAAe,cAAc,MAAML,EAAW,IAAI,GACtE,UAAAtB,EAAM,IAAI,CAAA6B,MAAA;;AACT,iCAAAJ;AAAA,YAAC;AAAA,YAAA;AAAA,cAEC,WAAWC;AAAA,gBACTC,EAAO;AAAA,gBACPH,MAAU,QAAQK,KAAQL,KAASG,EAAO,sBAAsB;AAAA,cAAA;AAAA,cAElE,cAAc,MAAM,CAACnB,KAAcc,EAAWO,CAAI;AAAA,cAElD,UAAA;AAAA,gBAAA,gBAAAD;AAAA,kBAAC;AAAA,kBAAA;AAAA,oBACC,MAAK;AAAA,oBACL,MAAAT;AAAA,oBACA,OAAOU;AAAA,oBACP,SAAS3B,MAAU2B;AAAA,oBACnB,UAAAnB;AAAA,oBAEA,UAAU,MAAM,CAACF,KAAcL,EAAS0B,CAAI;AAAA,oBAC5C,WAAWF,EAAO;AAAA,kBAAA;AAAA,gBAAA;AAAA,gBAEpB,gBAAAC,EAACE,GAAA,EAAS,eAAW,GAAA,CAAC;AAAA,gBACtB,gBAAAL,EAAC,QAAA,EAAK,WAAWE,EAAO,gBACrB,UAAA;AAAA,kBAAAI;AAAA,oBACC;AAAA,oBACAzB,OAAmBY,IAAAH,KAAA,gBAAAA,EAAQ,WAAR,gBAAAG,EAAgB;AAAA,oBACnCW;AAAA,kBAAA;AAAA,kBACC;AAAA,kBAAI;AAAA,mBACJZ,KAAA,gBAAAA,EAAQY,OAAS;AAAA,gBAAA,EAAA,CACtB;AAAA,cAAA;AAAA,YAAA;AAAA,YAzBKA;AAAA,UAAA;AAAA,SA2BR,GACH;AAAA,QAGCL,MAAU,QACT,gBAAAI,EAAC,QAAA,EAAK,WAAWD,EAAO,iBAAiB,eAAW,IACjD,WAAAV,KAAA,gBAAAA,EAAQO,OAA+B,GAAA,CAC1C;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAIR,GAEAQ,sBAAkC/B,CAAW;"}
@@ -0,0 +1 @@
1
+ @layer ui{.ui-rating-neNnF{border:none;padding:0;margin:0;display:flex;flex-direction:column;gap:var(--hd-space-2)}.ui-rating--disabled-ZKjHa .ui-rating__legend-uYvFS,.ui-rating--disabled-ZKjHa .ui-rating__caption-13KFX,.ui-rating--disabled-ZKjHa .ui-rating__star--filled-L3AkT{color:var(--hd-text-3)}@media (forced-colors: active){.ui-rating--disabled-ZKjHa .ui-rating__legend-uYvFS,.ui-rating--disabled-ZKjHa .ui-rating__caption-13KFX,.ui-rating--disabled-ZKjHa .ui-rating__star--filled-L3AkT{color:GrayText}}.ui-rating--disabled-ZKjHa .ui-rating__star-BANFJ{cursor:not-allowed}@media (forced-colors: active){.ui-rating--disabled-ZKjHa .ui-rating__star-BANFJ{color:GrayText}}.ui-rating--disabled-ZKjHa .ui-rating__star-BANFJ:hover{transform:none}.ui-rating--readOnly-wWIFW .ui-rating__star-BANFJ{cursor:default}.ui-rating--readOnly-wWIFW .ui-rating__star-BANFJ:hover{transform:none}.ui-rating__legend-uYvFS{padding:0;font-size:var(--hd-type-small-size);font-weight:var(--hd-font-weight-medium);color:var(--hd-text-2)}.ui-rating__stars-vJFLk{display:flex;gap:var(--hd-space-1)}.ui-rating__star-BANFJ{position:relative;display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;font-size:24px;color:var(--hd-border);cursor:pointer;transition:color var(--hd-duration-fast) var(--hd-ease-standard),transform var(--hd-duration-fast) var(--hd-ease-standard)}.ui-rating__star-BANFJ:hover{transform:scale(1.1)}.ui-rating__star--filled-L3AkT{color:var(--hd-warning-solid)}.ui-rating__star-BANFJ:focus-within{outline:var(--ui-ring-width, 2px) solid var(--hd-focus);outline-offset:var(--ui-ring-offset, 2px);border-radius:var(--hd-radius-xs)}@media (prefers-reduced-motion: reduce){.ui-rating__star-BANFJ{transition:none}.ui-rating__star-BANFJ:hover{transform:none}}.ui-rating__input-s2iiO,.ui-rating__srOnly-iSCoz{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.ui-rating__caption-13KFX{font-size:var(--hd-type-small-size);font-weight:var(--hd-font-weight-medium);color:var(--hd-text);min-height:1.4em}}
@@ -0,0 +1,2 @@
1
+ "use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const k=require("react/jsx-runtime"),r=require("react"),A=require("../../helpers/class-name.helper.cjs"),U=require("../../helpers/component.helper.cjs"),G=require("../../helpers/ref.helper.cjs"),s=require("../../helpers/scaled-number.helper.cjs"),O=require("../Input/index.cjs"),P={default:{"scaled":"ui-scaled-5yp41"}},V=r.forwardRef(({value:c,onChange:S,scaleDigits:n,maxFractionDigits:x=n,minFractionDigits:b=0,min:f=0,max:E=Number.MAX_SAFE_INTEGER,className:I,onFocus:i,onBlur:d,onKeyDown:o,"aria-invalid":N,...h},v)=>{const[t,m]=r.useState(null),[l,_]=r.useState(!1),q=r.useRef(null),M=r.useCallback(e=>{q.current=e,G.assignRef(v,e)},[v]);r.useEffect(()=>{var e;l&&((e=q.current)==null||e.select())},[l]);const T=(e,u)=>e===null||!Number.isSafeInteger(e)?"":s.formatScaledValue(e,{scaleDigits:n,minFractionDigits:b,isGrouped:u}),p=t!==null&&t.value===c,j=p?t.text:T(c,!l),C=!l&&p&&t.value===null&&t.text!=="",g=e=>s.readScaledText(e,{scaleDigits:n,maxFractionDigits:x,min:f,max:E}),R=()=>{if(p){if(t.value!==null&&t.value<f){S(f),m(null);return}(t.value!==null||t.text==="")&&m(null)}};return k.jsx(O.default,{ref:M,...h,className:A.cx(P.default.scaled,I),value:j,inputMode:x>0?"decimal":"numeric",autoComplete:"off","aria-invalid":C||N,onChange:e=>{const u=s.cleanScaledText(e.target.value),a=g(u);a!==s.REFUSED&&(m({text:u,value:a}),a!==c&&S(a))},onFocus:e=>{_(!0),i==null||i(e)},onBlur:e=>{_(!1),R(),d==null||d(e)},onKeyDown:e=>{e.key==="Enter"&&R(),o==null||o(e)}})}),X=r.memo(U.named(V,"ScaledInput"));exports.default=X;
2
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/components/ScaledInput/index.tsx"],"sourcesContent":["'use client';\n\nimport {\n type FocusEvent,\n forwardRef,\n type InputHTMLAttributes,\n type KeyboardEvent,\n memo,\n type ReactNode,\n useCallback,\n useEffect,\n useRef,\n useState,\n} from 'react';\n\nimport { cx } from '../../helpers/class-name.helper';\nimport { named } from '../../helpers/component.helper';\nimport { assignRef } from '../../helpers/ref.helper';\nimport {\n cleanScaledText,\n formatScaledValue,\n readScaledText,\n REFUSED,\n type ScaledReading,\n} from '../../helpers/scaled-number.helper';\nimport Input from '../Input';\n\nimport styles from './index.module.scss';\n\n/** Attributes the field owns: the value is a scaled integer, never the native text or number. */\ntype OwnedAttribute =\n | 'value'\n | 'defaultValue'\n | 'onChange'\n | 'type'\n | 'size'\n | 'prefix'\n | 'min'\n | 'max'\n | 'step'\n | 'inputMode';\n\nexport type ScaledInputProps = Omit<InputHTMLAttributes<HTMLInputElement>, OwnedAttribute> & {\n /** The scaled integer (`123456` at 2 is 1.234,56); `null` is an empty field. */\n value: number | null;\n /**\n * Every keystroke that changes the meaning: the scaled integer, or `null` while the field is\n * empty or holds a number still being typed (\"-\", \"1.250.0\").\n */\n onChange: (value: number | null) => void;\n /** Decimal places the integer carries — its scale (`Kurus` 2, `Qty4` 4, `Rate6` 6). */\n scaleDigits: number;\n /** Decimal places a person may type; a further digit is refused. Defaults to `scaleDigits`. */\n maxFractionDigits?: number;\n /** Decimal places always shown at rest (\"12,50\"). Defaults to 0. */\n minFractionDigits?: number;\n /**\n * The smallest scaled value; 0 by default, so a minus sign is refused. A value under a positive\n * `min` is raised to it when the field is left.\n */\n min?: number;\n /** The largest scaled value; a keystroke past it is refused. */\n max?: number;\n /** Before the number (`%`). */\n prefix?: ReactNode;\n /** After the number (a currency code, a unit). */\n suffix?: ReactNode;\n /** `Input.size`. */\n size?: 'sm' | 'md';\n testId?: string;\n};\n\ntype Draft = { text: string; value: number | null };\n\n/**\n * A number field that takes and gives a SCALED INTEGER (2.4) — the money, quantity, rate and\n * percent fields are this one with their scale fixed.\n *\n * ⚠ Not `<input type=\"number\">` (\"Yerel öğe korunur\" asks for the reason): its value is a float\n * (`valueAsNumber` of \"0,1\" + \"0,2\" is not \"0,3\" in cents), Chromium refuses the Turkish decimal\n * comma under an English system locale, and the mouse wheel changes an amount under a scrolling\n * pointer. Here the text is read digit by digit (`helpers/scaled-number.helper.ts`) and nothing\n * goes through a float.\n *\n * At rest the number is grouped (\"1.234,50\"); while focused it is plain (\"1234,50\") and selected,\n * so typing replaces it. A keystroke no number starts with — or one decimal too many, or past\n * `max` — is refused and the text stays as it was.\n */\nconst ScaledInput = /*#__PURE__*/ forwardRef<HTMLInputElement, ScaledInputProps>(\n (\n {\n value,\n onChange,\n scaleDigits,\n maxFractionDigits = scaleDigits,\n minFractionDigits = 0,\n min = 0,\n max = Number.MAX_SAFE_INTEGER,\n className,\n onFocus,\n onBlur,\n onKeyDown,\n 'aria-invalid': ariaInvalid,\n ...rest\n },\n ref,\n ) => {\n const [draft, setDraft] = useState<Draft | null>(null);\n const [isFocused, setIsFocused] = useState(false);\n const inputRef = useRef<HTMLInputElement | null>(null);\n const setRefs = useCallback(\n (node: HTMLInputElement | null) => {\n inputRef.current = node;\n assignRef(ref, node);\n },\n [ref],\n );\n\n /*\n * Selected AFTER focusing re-renders the plain text: selecting in the focus handler is undone\n * when React writes the ungrouped value a moment later.\n */\n useEffect(() => {\n if (isFocused) inputRef.current?.select();\n }, [isFocused]);\n\n const format = (next: number | null, isGrouped: boolean): string =>\n next === null || !Number.isSafeInteger(next)\n ? ''\n : formatScaledValue(next, { scaleDigits, minFractionDigits, isGrouped });\n\n /*\n * The draft is shown only while it still means the value it produced: a value set from\n * outside (a form reset, a computed total) replaces it without an effect.\n */\n const isDraftCurrent = draft !== null && draft.value === value;\n const text = isDraftCurrent ? draft.text : format(value, !isFocused);\n /* A number still being typed that is not one, left behind: say so, keep the text. */\n const isUnreadable = !isFocused && isDraftCurrent && draft.value === null && draft.text !== '';\n\n const read = (input: string): ScaledReading =>\n readScaledText(input, { scaleDigits, maxFractionDigits, min, max });\n\n /** The value raised to `min`, written back and the draft dropped — leaving or pressing Enter. */\n const commit = () => {\n if (!isDraftCurrent) return;\n if (draft.value !== null && draft.value < min) {\n onChange(min);\n setDraft(null);\n return;\n }\n if (draft.value !== null || draft.text === '') setDraft(null);\n };\n\n return (\n <Input\n ref={setRefs}\n {...rest}\n className={cx(styles.scaled, className)}\n value={text}\n inputMode={maxFractionDigits > 0 ? 'decimal' : 'numeric'}\n autoComplete=\"off\"\n aria-invalid={isUnreadable || ariaInvalid}\n onChange={event => {\n const typed = cleanScaledText(event.target.value);\n const next = read(typed);\n if (next === REFUSED) return;\n setDraft({ text: typed, value: next });\n if (next !== value) onChange(next);\n }}\n onFocus={(event: FocusEvent<HTMLInputElement>) => {\n setIsFocused(true);\n onFocus?.(event);\n }}\n onBlur={(event: FocusEvent<HTMLInputElement>) => {\n setIsFocused(false);\n commit();\n onBlur?.(event);\n }}\n onKeyDown={(event: KeyboardEvent<HTMLInputElement>) => {\n if (event.key === 'Enter') commit();\n onKeyDown?.(event);\n }}\n />\n );\n },\n);\n\nexport default /*#__PURE__*/ memo(\n /*#__PURE__*/ named(ScaledInput, 'ScaledInput'),\n) as typeof ScaledInput;\n"],"names":["ScaledInput","forwardRef","value","onChange","scaleDigits","maxFractionDigits","minFractionDigits","min","max","className","onFocus","onBlur","onKeyDown","ariaInvalid","rest","ref","draft","setDraft","useState","isFocused","setIsFocused","inputRef","useRef","setRefs","useCallback","node","assignRef","useEffect","_a","format","next","isGrouped","formatScaledValue","isDraftCurrent","text","isUnreadable","read","input","readScaledText","commit","jsx","Input","cx","styles","event","typed","cleanScaledText","REFUSED","memo","named"],"mappings":"qbAuFMA,EAA4BC,EAAAA,WAChC,CACE,CACE,MAAAC,EACA,SAAAC,EACA,YAAAC,EACA,kBAAAC,EAAoBD,EACpB,kBAAAE,EAAoB,EACpB,IAAAC,EAAM,EACN,IAAAC,EAAM,OAAO,iBACb,UAAAC,EACA,QAAAC,EACA,OAAAC,EACA,UAAAC,EACA,eAAgBC,EAChB,GAAGC,CAAA,EAELC,IACG,CACH,KAAM,CAACC,EAAOC,CAAQ,EAAIC,EAAAA,SAAuB,IAAI,EAC/C,CAACC,EAAWC,CAAY,EAAIF,EAAAA,SAAS,EAAK,EAC1CG,EAAWC,EAAAA,OAAgC,IAAI,EAC/CC,EAAUC,EAAAA,YACbC,GAAkC,CACjCJ,EAAS,QAAUI,EACnBC,EAAAA,UAAUX,EAAKU,CAAI,CACrB,EACA,CAACV,CAAG,CAAA,EAONY,EAAAA,UAAU,IAAM,OACVR,KAAWS,EAAAP,EAAS,UAAT,MAAAO,EAAkB,SACnC,EAAG,CAACT,CAAS,CAAC,EAEd,MAAMU,EAAS,CAACC,EAAqBC,IACnCD,IAAS,MAAQ,CAAC,OAAO,cAAcA,CAAI,EACvC,GACAE,oBAAkBF,EAAM,CAAE,YAAA1B,EAAa,kBAAAE,EAAmB,UAAAyB,EAAW,EAMrEE,EAAiBjB,IAAU,MAAQA,EAAM,QAAUd,EACnDgC,EAAOD,EAAiBjB,EAAM,KAAOa,EAAO3B,EAAO,CAACiB,CAAS,EAE7DgB,EAAe,CAAChB,GAAac,GAAkBjB,EAAM,QAAU,MAAQA,EAAM,OAAS,GAEtFoB,EAAQC,GACZC,iBAAeD,EAAO,CAAE,YAAAjC,EAAa,kBAAAC,EAAmB,IAAAE,EAAK,IAAAC,EAAK,EAG9D+B,EAAS,IAAM,CACnB,GAAKN,EACL,IAAIjB,EAAM,QAAU,MAAQA,EAAM,MAAQT,EAAK,CAC7CJ,EAASI,CAAG,EACZU,EAAS,IAAI,EACb,MACF,EACID,EAAM,QAAU,MAAQA,EAAM,OAAS,OAAa,IAAI,EAC9D,EAEA,OACEwB,EAAAA,IAACC,EAAAA,QAAA,CACC,IAAKlB,EACJ,GAAGT,EACJ,UAAW4B,EAAAA,GAAGC,UAAO,OAAQlC,CAAS,EACtC,MAAOyB,EACP,UAAW7B,EAAoB,EAAI,UAAY,UAC/C,aAAa,MACb,eAAc8B,GAAgBtB,EAC9B,SAAU+B,GAAS,CACjB,MAAMC,EAAQC,EAAAA,gBAAgBF,EAAM,OAAO,KAAK,EAC1Cd,EAAOM,EAAKS,CAAK,EACnBf,IAASiB,EAAAA,UACb9B,EAAS,CAAE,KAAM4B,EAAO,MAAOf,EAAM,EACjCA,IAAS5B,GAAOC,EAAS2B,CAAI,EACnC,EACA,QAAUc,GAAwC,CAChDxB,EAAa,EAAI,EACjBV,GAAA,MAAAA,EAAUkC,EACZ,EACA,OAASA,GAAwC,CAC/CxB,EAAa,EAAK,EAClBmB,EAAA,EACA5B,GAAA,MAAAA,EAASiC,EACX,EACA,UAAYA,GAA2C,CACjDA,EAAM,MAAQ,SAASL,EAAA,EAC3B3B,GAAA,MAAAA,EAAYgC,EACd,CAAA,CAAA,CAGN,CACF,EAEA5C,EAA6BgD,EAAAA,KACbC,EAAAA,MAAMjD,EAAa,aAAa,CAChD"}
@@ -0,0 +1,77 @@
1
+ import { InputHTMLAttributes, ReactNode } from 'react';
2
+ /** Attributes the field owns: the value is a scaled integer, never the native text or number. */
3
+ type OwnedAttribute = 'value' | 'defaultValue' | 'onChange' | 'type' | 'size' | 'prefix' | 'min' | 'max' | 'step' | 'inputMode';
4
+ export type ScaledInputProps = Omit<InputHTMLAttributes<HTMLInputElement>, OwnedAttribute> & {
5
+ /** The scaled integer (`123456` at 2 is 1.234,56); `null` is an empty field. */
6
+ value: number | null;
7
+ /**
8
+ * Every keystroke that changes the meaning: the scaled integer, or `null` while the field is
9
+ * empty or holds a number still being typed ("-", "1.250.0").
10
+ */
11
+ onChange: (value: number | null) => void;
12
+ /** Decimal places the integer carries — its scale (`Kurus` 2, `Qty4` 4, `Rate6` 6). */
13
+ scaleDigits: number;
14
+ /** Decimal places a person may type; a further digit is refused. Defaults to `scaleDigits`. */
15
+ maxFractionDigits?: number;
16
+ /** Decimal places always shown at rest ("12,50"). Defaults to 0. */
17
+ minFractionDigits?: number;
18
+ /**
19
+ * The smallest scaled value; 0 by default, so a minus sign is refused. A value under a positive
20
+ * `min` is raised to it when the field is left.
21
+ */
22
+ min?: number;
23
+ /** The largest scaled value; a keystroke past it is refused. */
24
+ max?: number;
25
+ /** Before the number (`%`). */
26
+ prefix?: ReactNode;
27
+ /** After the number (a currency code, a unit). */
28
+ suffix?: ReactNode;
29
+ /** `Input.size`. */
30
+ size?: 'sm' | 'md';
31
+ testId?: string;
32
+ };
33
+ /**
34
+ * A number field that takes and gives a SCALED INTEGER (2.4) — the money, quantity, rate and
35
+ * percent fields are this one with their scale fixed.
36
+ *
37
+ * ⚠ Not `<input type="number">` ("Yerel öğe korunur" asks for the reason): its value is a float
38
+ * (`valueAsNumber` of "0,1" + "0,2" is not "0,3" in cents), Chromium refuses the Turkish decimal
39
+ * comma under an English system locale, and the mouse wheel changes an amount under a scrolling
40
+ * pointer. Here the text is read digit by digit (`helpers/scaled-number.helper.ts`) and nothing
41
+ * goes through a float.
42
+ *
43
+ * At rest the number is grouped ("1.234,50"); while focused it is plain ("1234,50") and selected,
44
+ * so typing replaces it. A keystroke no number starts with — or one decimal too many, or past
45
+ * `max` — is refused and the text stays as it was.
46
+ */
47
+ declare const ScaledInput: import('react').ForwardRefExoticComponent<Omit<InputHTMLAttributes<HTMLInputElement>, OwnedAttribute> & {
48
+ /** The scaled integer (`123456` at 2 is 1.234,56); `null` is an empty field. */
49
+ value: number | null;
50
+ /**
51
+ * Every keystroke that changes the meaning: the scaled integer, or `null` while the field is
52
+ * empty or holds a number still being typed ("-", "1.250.0").
53
+ */
54
+ onChange: (value: number | null) => void;
55
+ /** Decimal places the integer carries — its scale (`Kurus` 2, `Qty4` 4, `Rate6` 6). */
56
+ scaleDigits: number;
57
+ /** Decimal places a person may type; a further digit is refused. Defaults to `scaleDigits`. */
58
+ maxFractionDigits?: number;
59
+ /** Decimal places always shown at rest ("12,50"). Defaults to 0. */
60
+ minFractionDigits?: number;
61
+ /**
62
+ * The smallest scaled value; 0 by default, so a minus sign is refused. A value under a positive
63
+ * `min` is raised to it when the field is left.
64
+ */
65
+ min?: number;
66
+ /** The largest scaled value; a keystroke past it is refused. */
67
+ max?: number;
68
+ /** Before the number (`%`). */
69
+ prefix?: ReactNode;
70
+ /** After the number (a currency code, a unit). */
71
+ suffix?: ReactNode;
72
+ /** `Input.size`. */
73
+ size?: "sm" | "md";
74
+ testId?: string;
75
+ } & import('react').RefAttributes<HTMLInputElement>>;
76
+ declare const _default: typeof ScaledInput;
77
+ export default _default;
@@ -0,0 +1,77 @@
1
+ import { InputHTMLAttributes, ReactNode } from 'react';
2
+ /** Attributes the field owns: the value is a scaled integer, never the native text or number. */
3
+ type OwnedAttribute = 'value' | 'defaultValue' | 'onChange' | 'type' | 'size' | 'prefix' | 'min' | 'max' | 'step' | 'inputMode';
4
+ export type ScaledInputProps = Omit<InputHTMLAttributes<HTMLInputElement>, OwnedAttribute> & {
5
+ /** The scaled integer (`123456` at 2 is 1.234,56); `null` is an empty field. */
6
+ value: number | null;
7
+ /**
8
+ * Every keystroke that changes the meaning: the scaled integer, or `null` while the field is
9
+ * empty or holds a number still being typed ("-", "1.250.0").
10
+ */
11
+ onChange: (value: number | null) => void;
12
+ /** Decimal places the integer carries — its scale (`Kurus` 2, `Qty4` 4, `Rate6` 6). */
13
+ scaleDigits: number;
14
+ /** Decimal places a person may type; a further digit is refused. Defaults to `scaleDigits`. */
15
+ maxFractionDigits?: number;
16
+ /** Decimal places always shown at rest ("12,50"). Defaults to 0. */
17
+ minFractionDigits?: number;
18
+ /**
19
+ * The smallest scaled value; 0 by default, so a minus sign is refused. A value under a positive
20
+ * `min` is raised to it when the field is left.
21
+ */
22
+ min?: number;
23
+ /** The largest scaled value; a keystroke past it is refused. */
24
+ max?: number;
25
+ /** Before the number (`%`). */
26
+ prefix?: ReactNode;
27
+ /** After the number (a currency code, a unit). */
28
+ suffix?: ReactNode;
29
+ /** `Input.size`. */
30
+ size?: 'sm' | 'md';
31
+ testId?: string;
32
+ };
33
+ /**
34
+ * A number field that takes and gives a SCALED INTEGER (2.4) — the money, quantity, rate and
35
+ * percent fields are this one with their scale fixed.
36
+ *
37
+ * ⚠ Not `<input type="number">` ("Yerel öğe korunur" asks for the reason): its value is a float
38
+ * (`valueAsNumber` of "0,1" + "0,2" is not "0,3" in cents), Chromium refuses the Turkish decimal
39
+ * comma under an English system locale, and the mouse wheel changes an amount under a scrolling
40
+ * pointer. Here the text is read digit by digit (`helpers/scaled-number.helper.ts`) and nothing
41
+ * goes through a float.
42
+ *
43
+ * At rest the number is grouped ("1.234,50"); while focused it is plain ("1234,50") and selected,
44
+ * so typing replaces it. A keystroke no number starts with — or one decimal too many, or past
45
+ * `max` — is refused and the text stays as it was.
46
+ */
47
+ declare const ScaledInput: import('react').ForwardRefExoticComponent<Omit<InputHTMLAttributes<HTMLInputElement>, OwnedAttribute> & {
48
+ /** The scaled integer (`123456` at 2 is 1.234,56); `null` is an empty field. */
49
+ value: number | null;
50
+ /**
51
+ * Every keystroke that changes the meaning: the scaled integer, or `null` while the field is
52
+ * empty or holds a number still being typed ("-", "1.250.0").
53
+ */
54
+ onChange: (value: number | null) => void;
55
+ /** Decimal places the integer carries — its scale (`Kurus` 2, `Qty4` 4, `Rate6` 6). */
56
+ scaleDigits: number;
57
+ /** Decimal places a person may type; a further digit is refused. Defaults to `scaleDigits`. */
58
+ maxFractionDigits?: number;
59
+ /** Decimal places always shown at rest ("12,50"). Defaults to 0. */
60
+ minFractionDigits?: number;
61
+ /**
62
+ * The smallest scaled value; 0 by default, so a minus sign is refused. A value under a positive
63
+ * `min` is raised to it when the field is left.
64
+ */
65
+ min?: number;
66
+ /** The largest scaled value; a keystroke past it is refused. */
67
+ max?: number;
68
+ /** Before the number (`%`). */
69
+ prefix?: ReactNode;
70
+ /** After the number (a currency code, a unit). */
71
+ suffix?: ReactNode;
72
+ /** `Input.size`. */
73
+ size?: "sm" | "md";
74
+ testId?: string;
75
+ } & import('react').RefAttributes<HTMLInputElement>>;
76
+ declare const _default: typeof ScaledInput;
77
+ export default _default;
@@ -0,0 +1,77 @@
1
+ "use client";
2
+ import { jsx as j } from "react/jsx-runtime";
3
+ import { memo as G, forwardRef as V, useState as I, useRef as X, useCallback as $, useEffect as g } from "react";
4
+ import { cx as h } from "../../helpers/class-name.helper.js";
5
+ import { named as q } from "../../helpers/component.helper.js";
6
+ import { assignRef as y } from "../../helpers/ref.helper.js";
7
+ import { cleanScaledText as z, REFUSED as F, formatScaledValue as H, readScaledText as J } from "../../helpers/scaled-number.helper.js";
8
+ import L from "../Input/index.js";
9
+ const O = {"scaled":"ui-scaled-5yp41"};
10
+ const P = /* @__PURE__ */ V(
11
+ ({
12
+ value: u,
13
+ onChange: d,
14
+ scaleDigits: f,
15
+ maxFractionDigits: p = f,
16
+ minFractionDigits: R = 0,
17
+ min: s = 0,
18
+ max: b = Number.MAX_SAFE_INTEGER,
19
+ className: N,
20
+ onFocus: c,
21
+ onBlur: n,
22
+ onKeyDown: m,
23
+ "aria-invalid": C,
24
+ ...T
25
+ }, S) => {
26
+ const [t, o] = I(null), [r, x] = I(!1), v = X(null), k = $(
27
+ (e) => {
28
+ v.current = e, y(S, e);
29
+ },
30
+ [S]
31
+ );
32
+ g(() => {
33
+ var e;
34
+ r && ((e = v.current) == null || e.select());
35
+ }, [r]);
36
+ const A = (e, a) => e === null || !Number.isSafeInteger(e) ? "" : H(e, { scaleDigits: f, minFractionDigits: R, isGrouped: a }), i = t !== null && t.value === u, M = i ? t.text : A(u, !r), U = !r && i && t.value === null && t.text !== "", _ = (e) => J(e, { scaleDigits: f, maxFractionDigits: p, min: s, max: b }), E = () => {
37
+ if (i) {
38
+ if (t.value !== null && t.value < s) {
39
+ d(s), o(null);
40
+ return;
41
+ }
42
+ (t.value !== null || t.text === "") && o(null);
43
+ }
44
+ };
45
+ return /* @__PURE__ */ j(
46
+ L,
47
+ {
48
+ ref: k,
49
+ ...T,
50
+ className: h(O.scaled, N),
51
+ value: M,
52
+ inputMode: p > 0 ? "decimal" : "numeric",
53
+ autoComplete: "off",
54
+ "aria-invalid": U || C,
55
+ onChange: (e) => {
56
+ const a = z(e.target.value), l = _(a);
57
+ l !== F && (o({ text: a, value: l }), l !== u && d(l));
58
+ },
59
+ onFocus: (e) => {
60
+ x(!0), c == null || c(e);
61
+ },
62
+ onBlur: (e) => {
63
+ x(!1), E(), n == null || n(e);
64
+ },
65
+ onKeyDown: (e) => {
66
+ e.key === "Enter" && E(), m == null || m(e);
67
+ }
68
+ }
69
+ );
70
+ }
71
+ ), ee = /* @__PURE__ */ G(
72
+ /* @__PURE__ */ q(P, "ScaledInput")
73
+ );
74
+ export {
75
+ ee as default
76
+ };
77
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/ScaledInput/index.tsx"],"sourcesContent":["'use client';\n\nimport {\n type FocusEvent,\n forwardRef,\n type InputHTMLAttributes,\n type KeyboardEvent,\n memo,\n type ReactNode,\n useCallback,\n useEffect,\n useRef,\n useState,\n} from 'react';\n\nimport { cx } from '../../helpers/class-name.helper';\nimport { named } from '../../helpers/component.helper';\nimport { assignRef } from '../../helpers/ref.helper';\nimport {\n cleanScaledText,\n formatScaledValue,\n readScaledText,\n REFUSED,\n type ScaledReading,\n} from '../../helpers/scaled-number.helper';\nimport Input from '../Input';\n\nimport styles from './index.module.scss';\n\n/** Attributes the field owns: the value is a scaled integer, never the native text or number. */\ntype OwnedAttribute =\n | 'value'\n | 'defaultValue'\n | 'onChange'\n | 'type'\n | 'size'\n | 'prefix'\n | 'min'\n | 'max'\n | 'step'\n | 'inputMode';\n\nexport type ScaledInputProps = Omit<InputHTMLAttributes<HTMLInputElement>, OwnedAttribute> & {\n /** The scaled integer (`123456` at 2 is 1.234,56); `null` is an empty field. */\n value: number | null;\n /**\n * Every keystroke that changes the meaning: the scaled integer, or `null` while the field is\n * empty or holds a number still being typed (\"-\", \"1.250.0\").\n */\n onChange: (value: number | null) => void;\n /** Decimal places the integer carries — its scale (`Kurus` 2, `Qty4` 4, `Rate6` 6). */\n scaleDigits: number;\n /** Decimal places a person may type; a further digit is refused. Defaults to `scaleDigits`. */\n maxFractionDigits?: number;\n /** Decimal places always shown at rest (\"12,50\"). Defaults to 0. */\n minFractionDigits?: number;\n /**\n * The smallest scaled value; 0 by default, so a minus sign is refused. A value under a positive\n * `min` is raised to it when the field is left.\n */\n min?: number;\n /** The largest scaled value; a keystroke past it is refused. */\n max?: number;\n /** Before the number (`%`). */\n prefix?: ReactNode;\n /** After the number (a currency code, a unit). */\n suffix?: ReactNode;\n /** `Input.size`. */\n size?: 'sm' | 'md';\n testId?: string;\n};\n\ntype Draft = { text: string; value: number | null };\n\n/**\n * A number field that takes and gives a SCALED INTEGER (2.4) — the money, quantity, rate and\n * percent fields are this one with their scale fixed.\n *\n * ⚠ Not `<input type=\"number\">` (\"Yerel öğe korunur\" asks for the reason): its value is a float\n * (`valueAsNumber` of \"0,1\" + \"0,2\" is not \"0,3\" in cents), Chromium refuses the Turkish decimal\n * comma under an English system locale, and the mouse wheel changes an amount under a scrolling\n * pointer. Here the text is read digit by digit (`helpers/scaled-number.helper.ts`) and nothing\n * goes through a float.\n *\n * At rest the number is grouped (\"1.234,50\"); while focused it is plain (\"1234,50\") and selected,\n * so typing replaces it. A keystroke no number starts with — or one decimal too many, or past\n * `max` — is refused and the text stays as it was.\n */\nconst ScaledInput = /*#__PURE__*/ forwardRef<HTMLInputElement, ScaledInputProps>(\n (\n {\n value,\n onChange,\n scaleDigits,\n maxFractionDigits = scaleDigits,\n minFractionDigits = 0,\n min = 0,\n max = Number.MAX_SAFE_INTEGER,\n className,\n onFocus,\n onBlur,\n onKeyDown,\n 'aria-invalid': ariaInvalid,\n ...rest\n },\n ref,\n ) => {\n const [draft, setDraft] = useState<Draft | null>(null);\n const [isFocused, setIsFocused] = useState(false);\n const inputRef = useRef<HTMLInputElement | null>(null);\n const setRefs = useCallback(\n (node: HTMLInputElement | null) => {\n inputRef.current = node;\n assignRef(ref, node);\n },\n [ref],\n );\n\n /*\n * Selected AFTER focusing re-renders the plain text: selecting in the focus handler is undone\n * when React writes the ungrouped value a moment later.\n */\n useEffect(() => {\n if (isFocused) inputRef.current?.select();\n }, [isFocused]);\n\n const format = (next: number | null, isGrouped: boolean): string =>\n next === null || !Number.isSafeInteger(next)\n ? ''\n : formatScaledValue(next, { scaleDigits, minFractionDigits, isGrouped });\n\n /*\n * The draft is shown only while it still means the value it produced: a value set from\n * outside (a form reset, a computed total) replaces it without an effect.\n */\n const isDraftCurrent = draft !== null && draft.value === value;\n const text = isDraftCurrent ? draft.text : format(value, !isFocused);\n /* A number still being typed that is not one, left behind: say so, keep the text. */\n const isUnreadable = !isFocused && isDraftCurrent && draft.value === null && draft.text !== '';\n\n const read = (input: string): ScaledReading =>\n readScaledText(input, { scaleDigits, maxFractionDigits, min, max });\n\n /** The value raised to `min`, written back and the draft dropped — leaving or pressing Enter. */\n const commit = () => {\n if (!isDraftCurrent) return;\n if (draft.value !== null && draft.value < min) {\n onChange(min);\n setDraft(null);\n return;\n }\n if (draft.value !== null || draft.text === '') setDraft(null);\n };\n\n return (\n <Input\n ref={setRefs}\n {...rest}\n className={cx(styles.scaled, className)}\n value={text}\n inputMode={maxFractionDigits > 0 ? 'decimal' : 'numeric'}\n autoComplete=\"off\"\n aria-invalid={isUnreadable || ariaInvalid}\n onChange={event => {\n const typed = cleanScaledText(event.target.value);\n const next = read(typed);\n if (next === REFUSED) return;\n setDraft({ text: typed, value: next });\n if (next !== value) onChange(next);\n }}\n onFocus={(event: FocusEvent<HTMLInputElement>) => {\n setIsFocused(true);\n onFocus?.(event);\n }}\n onBlur={(event: FocusEvent<HTMLInputElement>) => {\n setIsFocused(false);\n commit();\n onBlur?.(event);\n }}\n onKeyDown={(event: KeyboardEvent<HTMLInputElement>) => {\n if (event.key === 'Enter') commit();\n onKeyDown?.(event);\n }}\n />\n );\n },\n);\n\nexport default /*#__PURE__*/ memo(\n /*#__PURE__*/ named(ScaledInput, 'ScaledInput'),\n) as typeof ScaledInput;\n"],"names":["ScaledInput","forwardRef","value","onChange","scaleDigits","maxFractionDigits","minFractionDigits","min","max","className","onFocus","onBlur","onKeyDown","ariaInvalid","rest","ref","draft","setDraft","useState","isFocused","setIsFocused","inputRef","useRef","setRefs","useCallback","node","assignRef","useEffect","_a","format","next","isGrouped","formatScaledValue","isDraftCurrent","text","isUnreadable","read","input","readScaledText","commit","jsx","Input","cx","styles","event","typed","cleanScaledText","REFUSED","ScaledInput$1","memo","named"],"mappings":";;;;;;;;;AAuFA,MAAMA,IAA4B,gBAAAC;AAAA,EAChC,CACE;AAAA,IACE,OAAAC;AAAA,IACA,UAAAC;AAAA,IACA,aAAAC;AAAA,IACA,mBAAAC,IAAoBD;AAAA,IACpB,mBAAAE,IAAoB;AAAA,IACpB,KAAAC,IAAM;AAAA,IACN,KAAAC,IAAM,OAAO;AAAA,IACb,WAAAC;AAAA,IACA,SAAAC;AAAA,IACA,QAAAC;AAAA,IACA,WAAAC;AAAA,IACA,gBAAgBC;AAAA,IAChB,GAAGC;AAAA,EAAA,GAELC,MACG;AACH,UAAM,CAACC,GAAOC,CAAQ,IAAIC,EAAuB,IAAI,GAC/C,CAACC,GAAWC,CAAY,IAAIF,EAAS,EAAK,GAC1CG,IAAWC,EAAgC,IAAI,GAC/CC,IAAUC;AAAA,MACd,CAACC,MAAkC;AACjC,QAAAJ,EAAS,UAAUI,GACnBC,EAAUX,GAAKU,CAAI;AAAA,MACrB;AAAA,MACA,CAACV,CAAG;AAAA,IAAA;AAON,IAAAY,EAAU,MAAM;;AACd,MAAIR,OAAWS,IAAAP,EAAS,YAAT,QAAAO,EAAkB;AAAA,IACnC,GAAG,CAACT,CAAS,CAAC;AAEd,UAAMU,IAAS,CAACC,GAAqBC,MACnCD,MAAS,QAAQ,CAAC,OAAO,cAAcA,CAAI,IACvC,KACAE,EAAkBF,GAAM,EAAE,aAAA1B,GAAa,mBAAAE,GAAmB,WAAAyB,GAAW,GAMrEE,IAAiBjB,MAAU,QAAQA,EAAM,UAAUd,GACnDgC,IAAOD,IAAiBjB,EAAM,OAAOa,EAAO3B,GAAO,CAACiB,CAAS,GAE7DgB,IAAe,CAAChB,KAAac,KAAkBjB,EAAM,UAAU,QAAQA,EAAM,SAAS,IAEtFoB,IAAO,CAACC,MACZC,EAAeD,GAAO,EAAE,aAAAjC,GAAa,mBAAAC,GAAmB,KAAAE,GAAK,KAAAC,GAAK,GAG9D+B,IAAS,MAAM;AACnB,UAAKN,GACL;AAAA,YAAIjB,EAAM,UAAU,QAAQA,EAAM,QAAQT,GAAK;AAC7C,UAAAJ,EAASI,CAAG,GACZU,EAAS,IAAI;AACb;AAAA,QACF;AACA,SAAID,EAAM,UAAU,QAAQA,EAAM,SAAS,SAAa,IAAI;AAAA;AAAA,IAC9D;AAEA,WACE,gBAAAwB;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,KAAKlB;AAAA,QACJ,GAAGT;AAAA,QACJ,WAAW4B,EAAGC,EAAO,QAAQlC,CAAS;AAAA,QACtC,OAAOyB;AAAA,QACP,WAAW7B,IAAoB,IAAI,YAAY;AAAA,QAC/C,cAAa;AAAA,QACb,gBAAc8B,KAAgBtB;AAAA,QAC9B,UAAU,CAAA+B,MAAS;AACjB,gBAAMC,IAAQC,EAAgBF,EAAM,OAAO,KAAK,GAC1Cd,IAAOM,EAAKS,CAAK;AACvB,UAAIf,MAASiB,MACb9B,EAAS,EAAE,MAAM4B,GAAO,OAAOf,GAAM,GACjCA,MAAS5B,KAAOC,EAAS2B,CAAI;AAAA,QACnC;AAAA,QACA,SAAS,CAACc,MAAwC;AAChD,UAAAxB,EAAa,EAAI,GACjBV,KAAA,QAAAA,EAAUkC;AAAA,QACZ;AAAA,QACA,QAAQ,CAACA,MAAwC;AAC/C,UAAAxB,EAAa,EAAK,GAClBmB,EAAA,GACA5B,KAAA,QAAAA,EAASiC;AAAA,QACX;AAAA,QACA,WAAW,CAACA,MAA2C;AACrD,UAAIA,EAAM,QAAQ,WAASL,EAAA,GAC3B3B,KAAA,QAAAA,EAAYgC;AAAA,QACd;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF,GAEAI,KAA6B,gBAAAC;AAAA,EACb,gBAAAC,EAAMlD,GAAa,aAAa;AAChD;"}
@@ -0,0 +1 @@
1
+ @layer ui{.ui-scaled-5yp41 input{text-align:end;font-variant-numeric:tabular-nums}}
@@ -0,0 +1,2 @@
1
+ "use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const R=require("react/jsx-runtime"),o=require("react"),_=require("../../helpers/class-name.helper.cjs"),H=require("../../helpers/component.helper.cjs"),W=require("../../hooks/useStickToBottom.cjs"),d={default:{"scrollArea":"ui-scrollArea-Ly-yT","scrollArea--vertical":"ui-scrollArea--vertical-2ujC7","scrollArea--horizontal":"ui-scrollArea--horizontal-e9pu-","scrollArea--both":"ui-scrollArea--both-lv-8W","scrollArea--fade":"ui-scrollArea--fade-01Bbm"}},j=({children:u,label:m,axis:t="vertical",maxHeight:f,hasFade:l,isFollowingEnd:S=!1,className:g,testId:z})=>{const n=o.useRef(null);W.default(n,S&&t!=="horizontal");const[c,p]=o.useState(!1),[v,q]=o.useState({start:!1,end:!1});return o.useEffect(()=>{const e=n.current;if(!e||typeof ResizeObserver>"u")return;const r=()=>{const s=e.scrollHeight>e.clientHeight,h=e.scrollWidth>e.clientWidth;p(t==="horizontal"?h:t==="vertical"?s:s||h);const a=t==="horizontal",A=a?e.clientWidth:e.clientHeight,E=a?e.scrollWidth:e.scrollHeight,b=Math.abs(a?e.scrollLeft:e.scrollTop);q({start:b>1,end:b+A<E-1})};r();const i=new ResizeObserver(r);i.observe(e);for(const s of e.children)i.observe(s);return e.addEventListener("scroll",r,{passive:!0}),()=>{i.disconnect(),e.removeEventListener("scroll",r)}},[t,u]),R.jsx("div",{ref:n,className:_.cx(d.default.scrollArea,d.default[`scrollArea--${t}`],l&&d.default["scrollArea--fade"],g),style:f===void 0?void 0:{maxBlockSize:f},"data-fade-start":l&&v.start?"":void 0,"data-fade-end":l&&v.end?"":void 0,tabIndex:c?0:void 0,role:c?"region":void 0,"aria-label":c?m:void 0,"data-testid":z,children:u})},y=o.memo(H.named(j,"ScrollArea"));exports.default=y;
2
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/components/ScrollArea/index.tsx"],"sourcesContent":["'use client';\n\nimport { type FC, type ReactNode, memo, useEffect, useRef, useState } from 'react';\n\nimport { cx } from '../../helpers/class-name.helper';\nimport { named } from '../../helpers/component.helper';\nimport useStickToBottom from '../../hooks/useStickToBottom';\n\nimport styles from './index.module.scss';\n\ntype Props = {\n children: ReactNode;\n /** Kaydırılabilir bölgenin erişilebilir adı. */\n label: string;\n /** Kaydırma yönü. `both` iki eksende de kaydırır. */\n axis?: 'vertical' | 'horizontal' | 'both';\n /** En fazla yükseklik — dikey kaydırmada zorunlu, yoksa kutu uzar gider. */\n maxHeight?: number | string;\n /** Kenarlarda içeriğin devam ettiğini gösteren solma. */\n hasFade?: boolean;\n /**\n * SONA yapışık kalır — içerik büyüdükçe aşağı iner, kullanıcı yukarı kaydırınca bırakır, sona\n * dönünce yeniden yapışır (akan akıl yürütme, canlı terminal çıktısı). Yalnızca dikey eksende.\n */\n isFollowingEnd?: boolean;\n className?: string;\n testId?: string;\n};\n\n/** Kaydırma kutusu — klavyeyle erişilebilir kaydırma bölgesi. */\nconst ScrollArea: FC<Props> = ({\n children,\n label,\n axis = 'vertical',\n maxHeight,\n hasFade,\n isFollowingEnd = false,\n className,\n testId,\n}) => {\n const ref = useRef<HTMLDivElement>(null);\n useStickToBottom(ref, isFollowingEnd && axis !== 'horizontal');\n const [isScrollable, setIsScrollable] = useState(false);\n /* Solmanin HANGI ucta cizilecegi: yalnizca o yonde gizli icerik varken. */\n const [hiddenEdges, setHiddenEdges] = useState({ start: false, end: false });\n\n /* TASMA OLCULUR, varsayilmaz. */\n useEffect(() => {\n const node = ref.current;\n if (!node || typeof ResizeObserver === 'undefined') return;\n\n const measure = () => {\n const vertical = node.scrollHeight > node.clientHeight;\n const horizontal = node.scrollWidth > node.clientWidth;\n setIsScrollable(\n axis === 'horizontal'\n ? horizontal\n : axis === 'vertical'\n ? vertical\n : vertical || horizontal,\n );\n\n /* Solma tek eksende cizilir (`--fade` kurali `both`u kapsamiyor). */\n const isRow = axis === 'horizontal';\n const size = isRow ? node.clientWidth : node.clientHeight;\n const total = isRow ? node.scrollWidth : node.scrollHeight;\n /* RTL'de `scrollLeft` negatif olabiliyor; onemli olan UZAKLIK. */\n const offset = Math.abs(isRow ? node.scrollLeft : node.scrollTop);\n\n /* 1 px pay: kesirli yerlesimde `offset + size` toplami tam oturmuyor. */\n setHiddenEdges({ start: offset > 1, end: offset + size < total - 1 });\n };\n\n measure();\n\n /* Icerik DE kutu DA degisebiliyor: ikisi de izleniyor. */\n const observer = new ResizeObserver(measure);\n observer.observe(node);\n for (const child of node.children) observer.observe(child);\n\n /* Kaydirma ucu degistiriyor; dinleyici `passive` — olcum cizimi bloklamaz. */\n node.addEventListener('scroll', measure, { passive: true });\n\n return () => {\n observer.disconnect();\n node.removeEventListener('scroll', measure);\n };\n }, [axis, children]);\n\n return (\n <div\n ref={ref}\n className={cx(\n styles.scrollArea,\n styles[`scrollArea--${axis}`],\n hasFade && styles['scrollArea--fade'],\n className,\n )}\n style={maxHeight === undefined ? undefined : { maxBlockSize: maxHeight }}\n /* Solma UC BASINA ve YALNIZCA gizli icerik varken. */\n data-fade-start={hasFade && hiddenEdges.start ? '' : undefined}\n data-fade-end={hasFade && hiddenEdges.end ? '' : undefined}\n /*\n * Bolge YALNIZCA kaydirilabilirken odaklanabilir ve yalnizca o zaman bir ROL tasiyor:\n * sigmayan bir kutu bir \"bolge\" degil, siradan bir sarmalayici.\n */\n tabIndex={isScrollable ? 0 : undefined}\n role={isScrollable ? 'region' : undefined}\n aria-label={isScrollable ? label : undefined}\n data-testid={testId}\n >\n {children}\n </div>\n );\n};\n\nexport default /*#__PURE__*/ memo(\n /*#__PURE__*/ named(ScrollArea, 'ScrollArea'),\n) as typeof ScrollArea;\n"],"names":["ScrollArea","children","label","axis","maxHeight","hasFade","isFollowingEnd","className","testId","ref","useRef","useStickToBottom","isScrollable","setIsScrollable","useState","hiddenEdges","setHiddenEdges","useEffect","node","measure","vertical","horizontal","isRow","size","total","offset","observer","child","jsx","cx","styles","index","memo","named"],"mappings":"qWA6BMA,EAAwB,CAAC,CAC7B,SAAAC,EACA,MAAAC,EACA,KAAAC,EAAO,WACP,UAAAC,EACA,QAAAC,EACA,eAAAC,EAAiB,GACjB,UAAAC,EACA,OAAAC,CACF,IAAM,CACJ,MAAMC,EAAMC,EAAAA,OAAuB,IAAI,EACvCC,EAAAA,QAAiBF,EAAKH,GAAkBH,IAAS,YAAY,EAC7D,KAAM,CAACS,EAAcC,CAAe,EAAIC,EAAAA,SAAS,EAAK,EAEhD,CAACC,EAAaC,CAAc,EAAIF,EAAAA,SAAS,CAAE,MAAO,GAAO,IAAK,GAAO,EAG3EG,OAAAA,EAAAA,UAAU,IAAM,CACd,MAAMC,EAAOT,EAAI,QACjB,GAAI,CAACS,GAAQ,OAAO,eAAmB,IAAa,OAEpD,MAAMC,EAAU,IAAM,CACpB,MAAMC,EAAWF,EAAK,aAAeA,EAAK,aACpCG,EAAaH,EAAK,YAAcA,EAAK,YAC3CL,EACEV,IAAS,aACLkB,EACAlB,IAAS,WACPiB,EACAA,GAAYC,CAAA,EAIpB,MAAMC,EAAQnB,IAAS,aACjBoB,EAAOD,EAAQJ,EAAK,YAAcA,EAAK,aACvCM,EAAQF,EAAQJ,EAAK,YAAcA,EAAK,aAExCO,EAAS,KAAK,IAAIH,EAAQJ,EAAK,WAAaA,EAAK,SAAS,EAGhEF,EAAe,CAAE,MAAOS,EAAS,EAAG,IAAKA,EAASF,EAAOC,EAAQ,EAAG,CACtE,EAEAL,EAAA,EAGA,MAAMO,EAAW,IAAI,eAAeP,CAAO,EAC3CO,EAAS,QAAQR,CAAI,EACrB,UAAWS,KAAST,EAAK,SAAUQ,EAAS,QAAQC,CAAK,EAGzD,OAAAT,EAAK,iBAAiB,SAAUC,EAAS,CAAE,QAAS,GAAM,EAEnD,IAAM,CACXO,EAAS,WAAA,EACTR,EAAK,oBAAoB,SAAUC,CAAO,CAC5C,CACF,EAAG,CAAChB,EAAMF,CAAQ,CAAC,EAGjB2B,EAAAA,IAAC,MAAA,CACC,IAAAnB,EACA,UAAWoB,EAAAA,GACTC,EAAAA,QAAO,WACPA,EAAAA,QAAO,eAAe3B,CAAI,EAAE,EAC5BE,GAAWyB,EAAAA,QAAO,kBAAkB,EACpCvB,CAAA,EAEF,MAAOH,IAAc,OAAY,OAAY,CAAE,aAAcA,CAAA,EAE7D,kBAAiBC,GAAWU,EAAY,MAAQ,GAAK,OACrD,gBAAeV,GAAWU,EAAY,IAAM,GAAK,OAKjD,SAAUH,EAAe,EAAI,OAC7B,KAAMA,EAAe,SAAW,OAChC,aAAYA,EAAeV,EAAQ,OACnC,cAAaM,EAEZ,SAAAP,CAAA,CAAA,CAGP,EAEA8B,EAA6BC,EAAAA,KACbC,EAAAA,MAAMjC,EAAY,YAAY,CAC9C"}
@@ -0,0 +1,23 @@
1
+ import { FC, ReactNode } from 'react';
2
+ type Props = {
3
+ children: ReactNode;
4
+ /** Kaydırılabilir bölgenin erişilebilir adı. */
5
+ label: string;
6
+ /** Kaydırma yönü. `both` iki eksende de kaydırır. */
7
+ axis?: 'vertical' | 'horizontal' | 'both';
8
+ /** En fazla yükseklik — dikey kaydırmada zorunlu, yoksa kutu uzar gider. */
9
+ maxHeight?: number | string;
10
+ /** Kenarlarda içeriğin devam ettiğini gösteren solma. */
11
+ hasFade?: boolean;
12
+ /**
13
+ * SONA yapışık kalır — içerik büyüdükçe aşağı iner, kullanıcı yukarı kaydırınca bırakır, sona
14
+ * dönünce yeniden yapışır (akan akıl yürütme, canlı terminal çıktısı). Yalnızca dikey eksende.
15
+ */
16
+ isFollowingEnd?: boolean;
17
+ className?: string;
18
+ testId?: string;
19
+ };
20
+ /** Kaydırma kutusu — klavyeyle erişilebilir kaydırma bölgesi. */
21
+ declare const ScrollArea: FC<Props>;
22
+ declare const _default: typeof ScrollArea;
23
+ export default _default;
@@ -0,0 +1,23 @@
1
+ import { FC, ReactNode } from 'react';
2
+ type Props = {
3
+ children: ReactNode;
4
+ /** Kaydırılabilir bölgenin erişilebilir adı. */
5
+ label: string;
6
+ /** Kaydırma yönü. `both` iki eksende de kaydırır. */
7
+ axis?: 'vertical' | 'horizontal' | 'both';
8
+ /** En fazla yükseklik — dikey kaydırmada zorunlu, yoksa kutu uzar gider. */
9
+ maxHeight?: number | string;
10
+ /** Kenarlarda içeriğin devam ettiğini gösteren solma. */
11
+ hasFade?: boolean;
12
+ /**
13
+ * SONA yapışık kalır — içerik büyüdükçe aşağı iner, kullanıcı yukarı kaydırınca bırakır, sona
14
+ * dönünce yeniden yapışır (akan akıl yürütme, canlı terminal çıktısı). Yalnızca dikey eksende.
15
+ */
16
+ isFollowingEnd?: boolean;
17
+ className?: string;
18
+ testId?: string;
19
+ };
20
+ /** Kaydırma kutusu — klavyeyle erişilebilir kaydırma bölgesi. */
21
+ declare const ScrollArea: FC<Props>;
22
+ declare const _default: typeof ScrollArea;
23
+ export default _default;