@handijitcom/ui 0.0.0-stage → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (878) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +1023 -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 +11 -0
  545. package/build/constants/scale.constants.d.ts +11 -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/enums/ui-size.enum.cjs +2 -0
  555. package/build/enums/ui-size.enum.cjs.map +1 -0
  556. package/build/enums/ui-size.enum.d.cts +12 -0
  557. package/build/enums/ui-size.enum.d.ts +12 -0
  558. package/build/enums/ui-size.enum.js +5 -0
  559. package/build/enums/ui-size.enum.js.map +1 -0
  560. package/build/enums/ui-variant.enum.cjs +2 -0
  561. package/build/enums/ui-variant.enum.cjs.map +1 -0
  562. package/build/enums/ui-variant.enum.d.cts +20 -0
  563. package/build/enums/ui-variant.enum.d.ts +20 -0
  564. package/build/enums/ui-variant.enum.js +5 -0
  565. package/build/enums/ui-variant.enum.js.map +1 -0
  566. package/build/helpers/aria.helper.cjs +2 -0
  567. package/build/helpers/aria.helper.cjs.map +1 -0
  568. package/build/helpers/aria.helper.d.cts +7 -0
  569. package/build/helpers/aria.helper.d.ts +7 -0
  570. package/build/helpers/aria.helper.js +5 -0
  571. package/build/helpers/aria.helper.js.map +1 -0
  572. package/build/helpers/class-name.helper.cjs +2 -0
  573. package/build/helpers/class-name.helper.cjs.map +1 -0
  574. package/build/helpers/class-name.helper.d.cts +3 -0
  575. package/build/helpers/class-name.helper.d.ts +3 -0
  576. package/build/helpers/class-name.helper.js +10 -0
  577. package/build/helpers/class-name.helper.js.map +1 -0
  578. package/build/helpers/component.helper.cjs +2 -0
  579. package/build/helpers/component.helper.cjs.map +1 -0
  580. package/build/helpers/component.helper.d.cts +13 -0
  581. package/build/helpers/component.helper.d.ts +13 -0
  582. package/build/helpers/component.helper.js +5 -0
  583. package/build/helpers/component.helper.js.map +1 -0
  584. package/build/helpers/focus.helper.cjs +2 -0
  585. package/build/helpers/focus.helper.cjs.map +1 -0
  586. package/build/helpers/focus.helper.d.cts +90 -0
  587. package/build/helpers/focus.helper.d.ts +90 -0
  588. package/build/helpers/focus.helper.js +83 -0
  589. package/build/helpers/focus.helper.js.map +1 -0
  590. package/build/helpers/label.helper.cjs +2 -0
  591. package/build/helpers/label.helper.cjs.map +1 -0
  592. package/build/helpers/label.helper.d.cts +11 -0
  593. package/build/helpers/label.helper.d.ts +11 -0
  594. package/build/helpers/label.helper.js +11 -0
  595. package/build/helpers/label.helper.js.map +1 -0
  596. package/build/helpers/portal.helper.cjs +2 -0
  597. package/build/helpers/portal.helper.cjs.map +1 -0
  598. package/build/helpers/portal.helper.d.cts +28 -0
  599. package/build/helpers/portal.helper.d.ts +28 -0
  600. package/build/helpers/portal.helper.js +36 -0
  601. package/build/helpers/portal.helper.js.map +1 -0
  602. package/build/helpers/ref.helper.cjs +2 -0
  603. package/build/helpers/ref.helper.cjs.map +1 -0
  604. package/build/helpers/ref.helper.d.cts +3 -0
  605. package/build/helpers/ref.helper.d.ts +3 -0
  606. package/build/helpers/ref.helper.js +7 -0
  607. package/build/helpers/ref.helper.js.map +1 -0
  608. package/build/helpers/scaled-number.helper.cjs +2 -0
  609. package/build/helpers/scaled-number.helper.cjs.map +1 -0
  610. package/build/helpers/scaled-number.helper.d.cts +55 -0
  611. package/build/helpers/scaled-number.helper.d.ts +55 -0
  612. package/build/helpers/scaled-number.helper.js +34 -0
  613. package/build/helpers/scaled-number.helper.js.map +1 -0
  614. package/build/helpers/scroll.helper.cjs +2 -0
  615. package/build/helpers/scroll.helper.cjs.map +1 -0
  616. package/build/helpers/scroll.helper.d.cts +8 -0
  617. package/build/helpers/scroll.helper.d.ts +8 -0
  618. package/build/helpers/scroll.helper.js +11 -0
  619. package/build/helpers/scroll.helper.js.map +1 -0
  620. package/build/helpers/text.helper.cjs +2 -0
  621. package/build/helpers/text.helper.cjs.map +1 -0
  622. package/build/helpers/text.helper.d.cts +5 -0
  623. package/build/helpers/text.helper.d.ts +5 -0
  624. package/build/helpers/text.helper.js +6 -0
  625. package/build/helpers/text.helper.js.map +1 -0
  626. package/build/helpers/theme.helper.cjs +2 -0
  627. package/build/helpers/theme.helper.cjs.map +1 -0
  628. package/build/helpers/theme.helper.d.cts +18 -0
  629. package/build/helpers/theme.helper.d.ts +18 -0
  630. package/build/helpers/theme.helper.js +37 -0
  631. package/build/helpers/theme.helper.js.map +1 -0
  632. package/build/hooks/useAnnounce.cjs +2 -0
  633. package/build/hooks/useAnnounce.cjs.map +1 -0
  634. package/build/hooks/useAnnounce.d.cts +4 -0
  635. package/build/hooks/useAnnounce.d.ts +4 -0
  636. package/build/hooks/useAnnounce.js +23 -0
  637. package/build/hooks/useAnnounce.js.map +1 -0
  638. package/build/hooks/useAsyncSearch.cjs +2 -0
  639. package/build/hooks/useAsyncSearch.cjs.map +1 -0
  640. package/build/hooks/useAsyncSearch.d.cts +11 -0
  641. package/build/hooks/useAsyncSearch.d.ts +11 -0
  642. package/build/hooks/useAsyncSearch.js +17 -0
  643. package/build/hooks/useAsyncSearch.js.map +1 -0
  644. package/build/hooks/useCopyFeedback.cjs +2 -0
  645. package/build/hooks/useCopyFeedback.cjs.map +1 -0
  646. package/build/hooks/useCopyFeedback.d.cts +10 -0
  647. package/build/hooks/useCopyFeedback.d.ts +10 -0
  648. package/build/hooks/useCopyFeedback.js +25 -0
  649. package/build/hooks/useCopyFeedback.js.map +1 -0
  650. package/build/hooks/useDismissOnEscape.cjs +2 -0
  651. package/build/hooks/useDismissOnEscape.cjs.map +1 -0
  652. package/build/hooks/useDismissOnEscape.d.cts +16 -0
  653. package/build/hooks/useDismissOnEscape.d.ts +16 -0
  654. package/build/hooks/useDismissOnEscape.js +18 -0
  655. package/build/hooks/useDismissOnEscape.js.map +1 -0
  656. package/build/hooks/useListboxNavigation.cjs +2 -0
  657. package/build/hooks/useListboxNavigation.cjs.map +1 -0
  658. package/build/hooks/useListboxNavigation.d.cts +7 -0
  659. package/build/hooks/useListboxNavigation.d.ts +7 -0
  660. package/build/hooks/useListboxNavigation.js +53 -0
  661. package/build/hooks/useListboxNavigation.js.map +1 -0
  662. package/build/hooks/usePortalSurface.cjs +2 -0
  663. package/build/hooks/usePortalSurface.cjs.map +1 -0
  664. package/build/hooks/usePortalSurface.d.cts +25 -0
  665. package/build/hooks/usePortalSurface.d.ts +25 -0
  666. package/build/hooks/usePortalSurface.js +19 -0
  667. package/build/hooks/usePortalSurface.js.map +1 -0
  668. package/build/hooks/usePositioning.cjs +2 -0
  669. package/build/hooks/usePositioning.cjs.map +1 -0
  670. package/build/hooks/usePositioning.d.cts +13 -0
  671. package/build/hooks/usePositioning.d.ts +13 -0
  672. package/build/hooks/usePositioning.js +74 -0
  673. package/build/hooks/usePositioning.js.map +1 -0
  674. package/build/hooks/useScrollLock.cjs +2 -0
  675. package/build/hooks/useScrollLock.cjs.map +1 -0
  676. package/build/hooks/useScrollLock.d.cts +2 -0
  677. package/build/hooks/useScrollLock.d.ts +2 -0
  678. package/build/hooks/useScrollLock.js +34 -0
  679. package/build/hooks/useScrollLock.js.map +1 -0
  680. package/build/hooks/useSheetViewport.cjs +2 -0
  681. package/build/hooks/useSheetViewport.cjs.map +1 -0
  682. package/build/hooks/useSheetViewport.d.cts +6 -0
  683. package/build/hooks/useSheetViewport.d.ts +6 -0
  684. package/build/hooks/useSheetViewport.js +29 -0
  685. package/build/hooks/useSheetViewport.js.map +1 -0
  686. package/build/hooks/useStickToBottom.cjs +2 -0
  687. package/build/hooks/useStickToBottom.cjs.map +1 -0
  688. package/build/hooks/useStickToBottom.d.cts +12 -0
  689. package/build/hooks/useStickToBottom.d.ts +12 -0
  690. package/build/hooks/useStickToBottom.js +39 -0
  691. package/build/hooks/useStickToBottom.js.map +1 -0
  692. package/build/hooks/useUiTheme.cjs +2 -0
  693. package/build/hooks/useUiTheme.cjs.map +1 -0
  694. package/build/hooks/useUiTheme.d.cts +10 -0
  695. package/build/hooks/useUiTheme.d.ts +10 -0
  696. package/build/hooks/useUiTheme.js +42 -0
  697. package/build/hooks/useUiTheme.js.map +1 -0
  698. package/build/hooks/useUiTokens.cjs +2 -0
  699. package/build/hooks/useUiTokens.cjs.map +1 -0
  700. package/build/hooks/useUiTokens.d.cts +11 -0
  701. package/build/hooks/useUiTokens.d.ts +11 -0
  702. package/build/hooks/useUiTokens.js +36 -0
  703. package/build/hooks/useUiTokens.js.map +1 -0
  704. package/build/hooks/useVirtualList.cjs +2 -0
  705. package/build/hooks/useVirtualList.cjs.map +1 -0
  706. package/build/hooks/useVirtualList.d.cts +13 -0
  707. package/build/hooks/useVirtualList.d.ts +13 -0
  708. package/build/hooks/useVirtualList.js +41 -0
  709. package/build/hooks/useVirtualList.js.map +1 -0
  710. package/build/index.cjs +2 -0
  711. package/build/index.cjs.map +1 -0
  712. package/build/index.d.cts +98 -0
  713. package/build/index.d.ts +98 -0
  714. package/build/index.js +209 -0
  715. package/build/index.js.map +1 -0
  716. package/build/scss/_index.scss +7 -0
  717. package/build/scss/_mixins.scss +861 -0
  718. package/build/scss/_variables.scss +245 -0
  719. package/build/styles/base.d.cts +0 -0
  720. package/build/styles/base.d.ts +0 -0
  721. package/build/styles.css +135 -0
  722. package/build/theme/UiProvider.cjs +2 -0
  723. package/build/theme/UiProvider.cjs.map +1 -0
  724. package/build/theme/UiProvider.d.cts +23 -0
  725. package/build/theme/UiProvider.d.ts +23 -0
  726. package/build/theme/UiProvider.js +12 -0
  727. package/build/theme/UiProvider.js.map +1 -0
  728. package/build/theme/UiThemeScript.cjs +2 -0
  729. package/build/theme/UiThemeScript.cjs.map +1 -0
  730. package/build/theme/UiThemeScript.d.cts +22 -0
  731. package/build/theme/UiThemeScript.d.ts +22 -0
  732. package/build/theme/UiThemeScript.js +8 -0
  733. package/build/theme/UiThemeScript.js.map +1 -0
  734. package/build/theme/context.cjs +2 -0
  735. package/build/theme/context.cjs.map +1 -0
  736. package/build/theme/context.d.cts +5 -0
  737. package/build/theme/context.d.ts +5 -0
  738. package/build/theme/context.js +8 -0
  739. package/build/theme/context.js.map +1 -0
  740. package/build/types/calendar/Calendar/EventBlock.d.cts +29 -0
  741. package/build/types/calendar/Calendar/EventBlock.d.ts +29 -0
  742. package/build/types/calendar/Calendar/MonthGrid.d.cts +28 -0
  743. package/build/types/calendar/Calendar/MonthGrid.d.ts +28 -0
  744. package/build/types/calendar/Calendar/TimeGrid.d.cts +37 -0
  745. package/build/types/calendar/Calendar/TimeGrid.d.ts +37 -0
  746. package/build/types/calendar/Calendar/index.d.cts +72 -0
  747. package/build/types/calendar/Calendar/index.d.ts +72 -0
  748. package/build/types/calendar/core/layout.d.cts +43 -0
  749. package/build/types/calendar/core/layout.d.ts +43 -0
  750. package/build/types/calendar/core/moves.d.cts +37 -0
  751. package/build/types/calendar/core/moves.d.ts +37 -0
  752. package/build/types/calendar/core/time.d.cts +19 -0
  753. package/build/types/calendar/core/time.d.ts +19 -0
  754. package/build/types/calendar/core/types.d.cts +75 -0
  755. package/build/types/calendar/core/types.d.ts +75 -0
  756. package/build/types/calendar/core/useCalendarDrag.d.cts +32 -0
  757. package/build/types/calendar/core/useCalendarDrag.d.ts +32 -0
  758. package/build/types/calendar/index.d.cts +13 -0
  759. package/build/types/calendar/index.d.ts +13 -0
  760. package/build/types/charts/AreaChart/index.d.cts +14 -0
  761. package/build/types/charts/AreaChart/index.d.ts +14 -0
  762. package/build/types/charts/BarChart/index.d.cts +16 -0
  763. package/build/types/charts/BarChart/index.d.ts +16 -0
  764. package/build/types/charts/BoxPlot/index.d.cts +43 -0
  765. package/build/types/charts/BoxPlot/index.d.ts +43 -0
  766. package/build/types/charts/ComposedChart/index.d.cts +16 -0
  767. package/build/types/charts/ComposedChart/index.d.ts +16 -0
  768. package/build/types/charts/Heatmap/index.d.cts +30 -0
  769. package/build/types/charts/Heatmap/index.d.ts +30 -0
  770. package/build/types/charts/Histogram/index.d.cts +29 -0
  771. package/build/types/charts/Histogram/index.d.ts +29 -0
  772. package/build/types/charts/LineChart/index.d.cts +14 -0
  773. package/build/types/charts/LineChart/index.d.ts +14 -0
  774. package/build/types/charts/PieChart/index.d.cts +36 -0
  775. package/build/types/charts/PieChart/index.d.ts +36 -0
  776. package/build/types/charts/RadarChart/index.d.cts +40 -0
  777. package/build/types/charts/RadarChart/index.d.ts +40 -0
  778. package/build/types/charts/ScatterPlot/index.d.cts +41 -0
  779. package/build/types/charts/ScatterPlot/index.d.ts +41 -0
  780. package/build/types/charts/core/CartesianChart.d.cts +43 -0
  781. package/build/types/charts/core/CartesianChart.d.ts +43 -0
  782. package/build/types/charts/core/ChartFrame.d.cts +55 -0
  783. package/build/types/charts/core/ChartFrame.d.ts +55 -0
  784. package/build/types/charts/core/axes.d.cts +37 -0
  785. package/build/types/charts/core/axes.d.ts +37 -0
  786. package/build/types/charts/core/cartesian.d.cts +80 -0
  787. package/build/types/charts/core/cartesian.d.ts +80 -0
  788. package/build/types/charts/core/format.d.cts +19 -0
  789. package/build/types/charts/core/format.d.ts +19 -0
  790. package/build/types/charts/core/margins.d.cts +9 -0
  791. package/build/types/charts/core/margins.d.ts +9 -0
  792. package/build/types/charts/core/palette.d.cts +11 -0
  793. package/build/types/charts/core/palette.d.ts +11 -0
  794. package/build/types/charts/core/path.d.cts +24 -0
  795. package/build/types/charts/core/path.d.ts +24 -0
  796. package/build/types/charts/core/scale.d.cts +40 -0
  797. package/build/types/charts/core/scale.d.ts +40 -0
  798. package/build/types/charts/core/series.d.cts +11 -0
  799. package/build/types/charts/core/series.d.ts +11 -0
  800. package/build/types/charts/core/spatial.d.cts +12 -0
  801. package/build/types/charts/core/spatial.d.ts +12 -0
  802. package/build/types/charts/core/stats.d.cts +34 -0
  803. package/build/types/charts/core/stats.d.ts +34 -0
  804. package/build/types/charts/core/types.d.cts +31 -0
  805. package/build/types/charts/core/types.d.ts +31 -0
  806. package/build/types/charts/core/useChartWidth.d.cts +7 -0
  807. package/build/types/charts/core/useChartWidth.d.ts +7 -0
  808. package/build/types/charts/index.d.cts +21 -0
  809. package/build/types/charts/index.d.ts +21 -0
  810. package/build/types/chat/ActionList/index.d.cts +46 -0
  811. package/build/types/chat/ActionList/index.d.ts +46 -0
  812. package/build/types/chat/AppBar/index.d.cts +21 -0
  813. package/build/types/chat/AppBar/index.d.ts +21 -0
  814. package/build/types/chat/ChatMessage/index.d.cts +24 -0
  815. package/build/types/chat/ChatMessage/index.d.ts +24 -0
  816. package/build/types/chat/ChatThread/index.d.cts +24 -0
  817. package/build/types/chat/ChatThread/index.d.ts +24 -0
  818. package/build/types/chat/Citation/index.d.cts +15 -0
  819. package/build/types/chat/Citation/index.d.ts +15 -0
  820. package/build/types/chat/CodeBlock/format.d.cts +7 -0
  821. package/build/types/chat/CodeBlock/format.d.ts +7 -0
  822. package/build/types/chat/CodeBlock/grammars.d.cts +44 -0
  823. package/build/types/chat/CodeBlock/grammars.d.ts +44 -0
  824. package/build/types/chat/CodeBlock/highlight.d.cts +22 -0
  825. package/build/types/chat/CodeBlock/highlight.d.ts +22 -0
  826. package/build/types/chat/CodeBlock/index.d.cts +33 -0
  827. package/build/types/chat/CodeBlock/index.d.ts +33 -0
  828. package/build/types/chat/DescriptionList/index.d.cts +16 -0
  829. package/build/types/chat/DescriptionList/index.d.ts +16 -0
  830. package/build/types/chat/Legend/index.d.cts +21 -0
  831. package/build/types/chat/Legend/index.d.ts +21 -0
  832. package/build/types/chat/MessageActions/index.d.cts +21 -0
  833. package/build/types/chat/MessageActions/index.d.ts +21 -0
  834. package/build/types/chat/PromptInput/index.d.cts +47 -0
  835. package/build/types/chat/PromptInput/index.d.ts +47 -0
  836. package/build/types/chat/PromptSuggestions/index.d.cts +25 -0
  837. package/build/types/chat/PromptSuggestions/index.d.ts +25 -0
  838. package/build/types/chat/Prose/index.d.cts +15 -0
  839. package/build/types/chat/Prose/index.d.ts +15 -0
  840. package/build/types/chat/ReasoningBlock/index.d.cts +24 -0
  841. package/build/types/chat/ReasoningBlock/index.d.ts +24 -0
  842. package/build/types/chat/ReasoningText/index.d.cts +14 -0
  843. package/build/types/chat/ReasoningText/index.d.ts +14 -0
  844. package/build/types/chat/SegmentBar/index.d.cts +46 -0
  845. package/build/types/chat/SegmentBar/index.d.ts +46 -0
  846. package/build/types/chat/SourceList/index.d.cts +25 -0
  847. package/build/types/chat/SourceList/index.d.ts +25 -0
  848. package/build/types/chat/TerminalOutput/index.d.cts +25 -0
  849. package/build/types/chat/TerminalOutput/index.d.ts +25 -0
  850. package/build/types/chat/ToolCall/index.d.cts +41 -0
  851. package/build/types/chat/ToolCall/index.d.ts +41 -0
  852. package/build/types/chat/index.d.cts +26 -0
  853. package/build/types/chat/index.d.ts +26 -0
  854. package/build/types/combobox.type.d.cts +65 -0
  855. package/build/types/combobox.type.d.ts +65 -0
  856. package/build/types/common-element-props.type.d.cts +8 -0
  857. package/build/types/common-element-props.type.d.ts +8 -0
  858. package/build/types/helpers/class-name.helper.d.cts +3 -0
  859. package/build/types/helpers/class-name.helper.d.ts +3 -0
  860. package/build/types/helpers/component.helper.d.cts +13 -0
  861. package/build/types/helpers/component.helper.d.ts +13 -0
  862. package/build/types/helpers/label.helper.d.cts +12 -0
  863. package/build/types/helpers/label.helper.d.ts +12 -0
  864. package/build/types/hook.type.d.cts +36 -0
  865. package/build/types/hook.type.d.ts +36 -0
  866. package/build/types/link.type.d.cts +14 -0
  867. package/build/types/link.type.d.ts +14 -0
  868. package/build/types/positioning.type.d.cts +38 -0
  869. package/build/types/positioning.type.d.ts +38 -0
  870. package/build/types/theme.type.d.cts +197 -0
  871. package/build/types/theme.type.d.ts +197 -0
  872. package/build/types/types/common-element-props.type.d.cts +8 -0
  873. package/build/types/types/common-element-props.type.d.ts +8 -0
  874. package/build/types/types/link.type.d.cts +14 -0
  875. package/build/types/types/link.type.d.ts +14 -0
  876. package/build/types/types/theme.type.d.cts +197 -0
  877. package/build/types/types/theme.type.d.ts +197 -0
  878. package/package.json +905 -4
@@ -0,0 +1,26 @@
1
+ import { ReactElement, ReactNode } from 'react';
2
+ import { FocusTarget } from '../../helpers/focus.helper.js';
3
+ import { PositionAlign, PositionSide } from '../../types/positioning.type.js';
4
+ type Props = {
5
+ /** Tetikleyici. */
6
+ trigger: ReactElement;
7
+ children: ReactNode;
8
+ /** Yüzeyin erişilebilir adı. */
9
+ label: string;
10
+ side?: PositionSide;
11
+ align?: PositionAlign;
12
+ /** Kontrollü kullanım. */
13
+ isOpen?: boolean;
14
+ onOpenChange?: (isOpen: boolean) => void;
15
+ /**
16
+ * Açılınca odaklanacak öğe (yüzeyin içinde). Verilmezse `data-ui-autofocus` taşıyan öğe, o da
17
+ * yoksa ilk odaklanabilir öğe.
18
+ */
19
+ initialFocus?: FocusTarget;
20
+ className?: string;
21
+ testId?: string;
22
+ };
23
+ /** Popover — eylem taşıyabilen, odaklanabilir yüzey. */
24
+ declare const Popover: ({ trigger, children, label, side, align, isOpen: controlledOpen, onOpenChange, initialFocus, className, testId, }: Props) => import("react").JSX.Element | null;
25
+ declare const _default: typeof Popover;
26
+ export default _default;
@@ -0,0 +1,106 @@
1
+ "use client";
2
+ import { jsxs as V, Fragment as W, jsx as $ } from "react/jsx-runtime";
3
+ import { memo as q, useId as z, useRef as m, useState as G, useCallback as K, useEffect as E, isValidElement as H, cloneElement as J } from "react";
4
+ import { createPortal as M } from "react-dom";
5
+ import { cx as O } from "../../helpers/class-name.helper.js";
6
+ import { named as Q } from "../../helpers/component.helper.js";
7
+ import X from "../../hooks/useDismissOnEscape.js";
8
+ import { focusInitial as Y, captureFocus as Z, focusableWithin as _, nextFocusableAfter as C } from "../../helpers/focus.helper.js";
9
+ import tt from "../../hooks/usePortalSurface.js";
10
+ import et from "../../hooks/usePositioning.js";
11
+ const R = {"popover":"ui-popover-VxgiK","popover--top":"ui-popover--top-OUYwo","popover--bottom":"ui-popover--bottom-Q1K4X","popover--left":"ui-popover--left-9Rsjx","popover--right":"ui-popover--right-0TJeo"};
12
+ const ot = ({
13
+ trigger: p,
14
+ children: k,
15
+ label: T,
16
+ side: g = "bottom",
17
+ align: F = "start",
18
+ isOpen: P,
19
+ onOpenChange: u,
20
+ initialFocus: h,
21
+ className: L,
22
+ testId: j
23
+ }) => {
24
+ const w = z(), s = m(null), i = m(null), v = m(!1), b = m(!1), [A, I] = G(!1), y = P !== void 0, o = y ? P : A, l = et(s, i, { side: g, align: F, isOpen: o }), f = tt(o, s, i), n = K(
25
+ (t) => {
26
+ y || I(t), u == null || u(t);
27
+ },
28
+ [y, u]
29
+ );
30
+ E(() => {
31
+ if (!o) return;
32
+ v.current = !1, b.current = !1;
33
+ const t = Z(), e = i.current;
34
+ return () => {
35
+ const r = document.activeElement;
36
+ (!r || r === document.body || e != null && e.contains(r)) && t();
37
+ };
38
+ }, [o]);
39
+ const D = l.isPositioned;
40
+ E(() => {
41
+ if (!o || !D || v.current) return;
42
+ const t = i.current;
43
+ t && (v.current = !0, t.contains(document.activeElement) || Y(t, h));
44
+ }, [o, D, h]);
45
+ const S = K(() => n(!1), [n]);
46
+ X(o, S), E(() => {
47
+ if (!o) return;
48
+ const t = (e) => {
49
+ var c, a;
50
+ const r = e.target;
51
+ (c = i.current) != null && c.contains(r) || (a = s.current) != null && a.contains(r) || n(!1);
52
+ };
53
+ return document.addEventListener("mousedown", t), () => document.removeEventListener("mousedown", t);
54
+ }, [o, n]);
55
+ const B = (t) => {
56
+ if (t.key !== "Tab" || t.defaultPrevented) return;
57
+ const e = t.currentTarget, r = document.activeElement, c = _(e), a = t.shiftKey ? c[0] : c.at(-1), U = a === void 0 || r === a || t.shiftKey && r === e, d = s.current;
58
+ if (!U || !d) return;
59
+ t.preventDefault(), b.current = !0, n(!1), (t.shiftKey ? d : C(d, e) ?? d).focus();
60
+ };
61
+ if (!H(p)) return null;
62
+ const x = p.props, N = J(p, {
63
+ ref: s,
64
+ "aria-expanded": o,
65
+ "aria-haspopup": "dialog",
66
+ "aria-controls": o ? w : void 0,
67
+ onClick: (t) => {
68
+ var e;
69
+ (e = x.onClick) == null || e.call(x, t), n(!o);
70
+ }
71
+ });
72
+ return /* @__PURE__ */ V(W, { children: [
73
+ N,
74
+ o && f.container && M(
75
+ /* @__PURE__ */ $(
76
+ "div",
77
+ {
78
+ ref: i,
79
+ id: w,
80
+ ...f.attributes,
81
+ role: "dialog",
82
+ "aria-label": T,
83
+ className: O(R.popover, R[`popover--${l.side}`], L),
84
+ style: {
85
+ ...l.style,
86
+ ...f.style,
87
+ visibility: l.isPositioned ? "visible" : "hidden"
88
+ },
89
+ "data-testid": j,
90
+ onKeyDown: B,
91
+ onBlur: (t) => {
92
+ var r;
93
+ const e = t.relatedTarget;
94
+ !e || b.current || t.currentTarget.contains(e) || (r = s.current) != null && r.contains(e) || e.closest('[role="listbox"],[role="menu"],[role="dialog"]') || n(!1);
95
+ },
96
+ children: k
97
+ }
98
+ ),
99
+ f.container
100
+ )
101
+ ] });
102
+ }, pt = /* @__PURE__ */ q(/* @__PURE__ */ Q(ot, "Popover"));
103
+ export {
104
+ pt as default
105
+ };
106
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/Popover/index.tsx"],"sourcesContent":["'use client';\n\nimport {\n cloneElement,\n isValidElement,\n type KeyboardEvent,\n memo,\n type ReactElement,\n type ReactNode,\n useCallback,\n useEffect,\n useId,\n useRef,\n useState,\n} from 'react';\nimport { createPortal } from 'react-dom';\n\nimport { cx } from '../../helpers/class-name.helper';\nimport { named } from '../../helpers/component.helper';\nimport useDismissOnEscape from '../../hooks/useDismissOnEscape';\nimport {\n captureFocus,\n type FocusTarget,\n focusableWithin,\n focusInitial,\n nextFocusableAfter,\n} from '../../helpers/focus.helper';\nimport usePortalSurface from '../../hooks/usePortalSurface';\nimport usePositioning from '../../hooks/usePositioning';\n\nimport styles from './index.module.scss';\nimport type { PositionAlign, PositionSide } from '@/types/positioning.type';\n\ntype Props = {\n /** Tetikleyici. */\n trigger: ReactElement;\n children: ReactNode;\n /** Yüzeyin erişilebilir adı. */\n label: string;\n side?: PositionSide;\n align?: PositionAlign;\n /** Kontrollü kullanım. */\n isOpen?: boolean;\n onOpenChange?: (isOpen: boolean) => void;\n /**\n * Açılınca odaklanacak öğe (yüzeyin içinde). Verilmezse `data-ui-autofocus` taşıyan öğe, o da\n * yoksa ilk odaklanabilir öğe.\n */\n initialFocus?: FocusTarget;\n className?: string;\n testId?: string;\n};\n\n/** Popover — eylem taşıyabilen, odaklanabilir yüzey. */\nconst Popover = ({\n trigger,\n children,\n label,\n side = 'bottom',\n align = 'start',\n isOpen: controlledOpen,\n onOpenChange,\n initialFocus,\n className,\n testId,\n}: Props) => {\n const id = useId();\n const anchorRef = useRef<HTMLElement>(null);\n const surfaceRef = useRef<HTMLDivElement>(null);\n /* Bu acilista ilk odak verildi mi: yeniden konumlanma (kaydirma, boyut) odagi tekrar CALMAZ. */\n const hasFocusedRef = useRef(false);\n /* `Tab` ile cikis kapanisi ZATEN bildirdi: ardindan gelen `blur` ikinci kez bildirmez. */\n const isLeavingRef = useRef(false);\n\n const [uncontrolledOpen, setUncontrolledOpen] = useState(false);\n const isControlled = controlledOpen !== undefined;\n const isOpen = isControlled ? controlledOpen : uncontrolledOpen;\n\n const positioning = usePositioning(anchorRef, surfaceRef, { side, align, isOpen });\n\n const portal = usePortalSurface(isOpen, anchorRef, surfaceRef);\n\n const setOpen = useCallback(\n (next: boolean) => {\n if (!isControlled) setUncontrolledOpen(next);\n onOpenChange?.(next);\n },\n [isControlled, onOpenChange],\n );\n\n /*\n * KAPANISTA odak TETIKLEYICIYE doner — ama yalnizca odak yuzeyle birlikte DUSTUYSE (`<body>`) ya da\n * hala icerdeyse. Kullanici `Tab` ile ya da bir alana tiklayarak baska bir yere gectiyse odak orada\n * kalir; eskiden tetikleyiciye geri cekiliyordu.\n */\n useEffect(() => {\n if (!isOpen) return;\n\n hasFocusedRef.current = false;\n isLeavingRef.current = false;\n const restore = captureFocus();\n const surface = surfaceRef.current;\n\n return () => {\n const active = document.activeElement;\n if (!active || active === document.body || surface?.contains(active)) restore();\n };\n }, [isOpen]);\n\n /*\n * ACILIS odagi yuzey KONUMLANDIKTAN SONRA verilir. Yuzey olculene kadar `visibility: hidden`\n * cizilir ve gizli bir ogeye `focus()` tarayicida sessizce yok sayilir: odak tetikleyicide kaliyor,\n * klavye kullanicisi panele hic giremiyordu (masaüstü programi iki `requestAnimationFrame` ile\n * atlatiyordu). jsdom gorunurluk denetlemedigi icin bunu yalnizca tarayici testi gorur.\n */\n const isPositioned = positioning.isPositioned;\n useEffect(() => {\n if (!isOpen || !isPositioned || hasFocusedRef.current) return;\n\n const surface = surfaceRef.current;\n if (!surface) return;\n\n hasFocusedRef.current = true;\n if (!surface.contains(document.activeElement)) focusInitial(surface, initialFocus);\n }, [isOpen, isPositioned, initialFocus]);\n\n const close = useCallback(() => setOpen(false), [setOpen]);\n useDismissOnEscape(isOpen, close);\n\n /*\n * DISARI tiklama da belge duzeyinde: odak yuzeyin icinde olmayabilir (fareyle acilmis bir\n * popover).\n */\n useEffect(() => {\n if (!isOpen) return;\n\n const handlePointerDown = (event: globalThis.MouseEvent) => {\n const target = event.target as Node;\n if (surfaceRef.current?.contains(target)) return;\n if (anchorRef.current?.contains(target)) return;\n setOpen(false);\n };\n\n /* `mousedown`: `click` beklerken kullanici surukleyerek secim yaparsa yuzey kapanmiyordu. */\n document.addEventListener('mousedown', handlePointerDown);\n\n return () => document.removeEventListener('mousedown', handlePointerDown);\n }, [isOpen, setOpen]);\n\n /*\n * `Tab` SINIRDA: yuzey `<body>`nin sonuna portallanmis, tarayicinin kendi sirasi odagi sayfanin\n * disina atiyordu. Son ogeden `Tab` tetikleyiciden SONRAKI durağa, ilk ogeden `Shift+Tab`\n * tetikleyiciye gider; ikisinde de yuzey kapanir (kipsel olmayan yuzeyde odak tuzagi yok).\n */\n const handleKeyDown = (event: KeyboardEvent<HTMLDivElement>) => {\n if (event.key !== 'Tab' || event.defaultPrevented) return;\n\n const surface = event.currentTarget;\n const active = document.activeElement;\n const focusable = focusableWithin(surface);\n const edge = event.shiftKey ? focusable[0] : focusable.at(-1);\n /* Odak yuzeyin KENDISINDEYSE (odaklanabilir ogesi olmayan panel) geri yon de sinirdir. */\n const isAtEdge =\n edge === undefined || active === edge || (event.shiftKey && active === surface);\n const anchor = anchorRef.current;\n if (!isAtEdge || !anchor) return;\n\n event.preventDefault();\n isLeavingRef.current = true;\n setOpen(false);\n const next = event.shiftKey ? anchor : (nextFocusableAfter(anchor, surface) ?? anchor);\n next.focus();\n };\n\n if (!isValidElement(trigger)) return null;\n\n const triggerProps = trigger.props as Record<string, unknown>;\n\n const anchor = cloneElement(trigger as ReactElement<Record<string, unknown>>, {\n ref: anchorRef,\n 'aria-expanded': isOpen,\n 'aria-haspopup': 'dialog',\n 'aria-controls': isOpen ? id : undefined,\n onClick: (event: React.MouseEvent) => {\n (triggerProps.onClick as ((event: React.MouseEvent) => void) | undefined)?.(event);\n setOpen(!isOpen);\n },\n });\n\n return (\n <>\n {anchor}\n\n {isOpen &&\n portal.container &&\n createPortal(\n <div\n ref={surfaceRef}\n id={id}\n /* ⚠ Modal içinden açıldığında üst katman ZORUNLU — `portal.helper`. */\n {...portal.attributes}\n /*\n * `role=\"dialog\"` ama `aria-modal` YOK: yuzey kipsel degil ve `aria-modal=\"true\"`\n * yazmak ekran okuyucuya sayfanin geri kalaninin erisilemez oldugunu…\n */\n role=\"dialog\"\n aria-label={label}\n className={cx(styles.popover, styles[`popover--${positioning.side}`], className)}\n style={{\n ...positioning.style,\n ...portal.style,\n visibility: positioning.isPositioned ? 'visible' : 'hidden',\n }}\n data-testid={testId}\n onKeyDown={handleKeyDown}\n /*\n * Odak yuzeyin DISINA ciktiginda kapanir: kipsel olmayan bir yuzeyde odagi hapsetmek\n * kullaniciyi sayfadan koparirdi.\n * ⚠ AMA \"DISI\" DOM AGACIYLA OLCULEMEZ.\n */\n onBlur={event => {\n const next = event.relatedTarget as HTMLElement | null;\n if (!next || isLeavingRef.current) return;\n if (event.currentTarget.contains(next)) return;\n if (anchorRef.current?.contains(next)) return;\n\n /*\n * Bu yuzeyden PORTALLANMIS bir katman mi? `Menu`/`Select`/ `Combobox` panelleri\n * `aria-controls`/`id` zinciriyle degil, acildiklari an odagi tasiyarak…\n */\n if (next.closest('[role=\"listbox\"],[role=\"menu\"],[role=\"dialog\"]')) return;\n\n setOpen(false);\n }}\n >\n {children}\n </div>,\n portal.container,\n )}\n </>\n );\n};\n\nexport default /*#__PURE__*/ memo(/*#__PURE__*/ named(Popover, 'Popover')) as typeof Popover;\n"],"names":["Popover","trigger","children","label","side","align","controlledOpen","onOpenChange","initialFocus","className","testId","id","useId","anchorRef","useRef","surfaceRef","hasFocusedRef","isLeavingRef","uncontrolledOpen","setUncontrolledOpen","useState","isControlled","isOpen","positioning","usePositioning","portal","usePortalSurface","setOpen","useCallback","next","useEffect","restore","captureFocus","surface","active","isPositioned","focusInitial","close","useDismissOnEscape","handlePointerDown","event","target","_a","_b","handleKeyDown","focusable","focusableWithin","edge","isAtEdge","anchor","nextFocusableAfter","isValidElement","triggerProps","cloneElement","js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100vw - var(--hd-space-6));padding:var(--hd-space-3);border-radius:var(--hd-radius-md);background-color:var(--hd-bg-overlay);border:1px solid var(--hd-border);box-shadow:var(--hd-shadow-2);color:var(--hd-text);font-size:var(--hd-type-small-size);line-height:var(--hd-type-body-line-height);text-align:start}.ui-popover--top-OUYwo{animation:var(--ui-anim-fade-in-up) var(--hd-duration-fast) var(--hd-ease-standard)}.ui-popover--bottom-Q1K4X{animation:var(--ui-anim-fade-in-down) var(--hd-duration-fast) var(--hd-ease-standard)}.ui-popover--left-9Rsjx,.ui-popover--right-0TJeo{animation:var(--ui-anim-fade-in) var(--hd-duration-fast) var(--hd-ease-standard)}@media (prefers-reduced-motion: reduce){.ui-popover-VxgiK{animation:none}}@media (forced-colors: active){.ui-popover-VxgiK{border-color:CanvasText}}}
@@ -0,0 +1,2 @@
1
+ "use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("react/jsx-runtime"),x=require("react"),N=require("../../helpers/class-name.helper.cjs"),h=require("../../helpers/label.helper.cjs"),j=require("../../theme/context.cjs"),r={default:{"price":"ui-price-Oc5Nr","price__current":"ui-price__current-2Xup2","price__currency":"ui-price__currency-32NLN","price__list":"ui-price__list-MlQgT","price__discount":"ui-price__discount-5Yc6W","price--sm":"ui-price--sm-Hd8Oe","price--md":"ui-price--md-JMxlK","price--lg":"ui-price--lg-TFqIF","price--xl":"ui-price--xl-EJBYq"}},y=({value:a,currency:o,listValue:n,discountPercent:t,formatDiscount:d=e=>`%${e}`,isFormatted:m,size:p="md",className:_,testId:f})=>{const{labels:e}=j.useUi(),i=h.resolveLabel("Price.currency",o,e==null?void 0:e.currency),u=c=>{if(!m||!(e!=null&&e.locale)||!/\d/.test(c))return c;const l=Number(c.replace(/[^\d.,-]/g,"").replace(/\.(?=\d{3}\b)/g,"").replace(",","."));if(!Number.isFinite(l))return c;try{return new Intl.NumberFormat(e.locale).format(l)}catch{return c}};return s.jsxs("span",{className:N.cx(r.default.price,r.default[`price--${p}`],_),"data-testid":f,children:[s.jsxs("span",{className:r.default.price__current,children:[u(a),s.jsx("span",{className:r.default.price__currency,children:i})]}),n&&s.jsxs("s",{className:r.default.price__list,children:[u(n),s.jsx("span",{className:r.default.price__currency,children:i})]}),t!==void 0&&t>0&&s.jsx("span",{className:r.default.price__discount,children:d(t)})]})},b=x.memo(y);exports.default=b;
2
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/components/Price/index.tsx"],"sourcesContent":["'use client';\n\nimport { type FC, memo } from 'react';\n\nimport { cx } from '../../helpers/class-name.helper';\nimport { resolveLabel } from '../../helpers/label.helper';\nimport { useUi } from '../../theme/context';\n\nimport styles from './index.module.scss';\n\ntype Props = {\n /** BİÇİMLENMİŞ tutar: \"1.299,90\". */\n value: string;\n /** Para birimi simgesi ya da kodu. */\n currency?: string;\n /** Değeri `Intl.NumberFormat` ile biçimlendirir. */\n isFormatted?: boolean;\n /** Üstü çizili liste fiyatı; indirim varsa verilir (biçimlenmiş). */\n listValue?: string;\n /** İndirim oranı (tam sayı yüzde). */\n discountPercent?: number;\n /** İndirim rozetinin metnini üretir (\"%20\", \"-20%\"). */\n formatDiscount?: (percent: number) => string;\n size?: 'sm' | 'md' | 'lg' | 'xl';\n className?: string;\n testId?: string;\n};\n\n/** Tutar gösterimi. */\nconst Price: FC<Props> = ({\n value,\n currency,\n listValue,\n discountPercent,\n formatDiscount = percent => `%${percent}`,\n isFormatted,\n size = 'md',\n className,\n testId,\n}) => {\n const { labels } = useUi();\n const symbol = resolveLabel('Price.currency', currency, labels?.currency);\n\n /* BICIMLENDIRME OPSIYONEL ve yerel ayara BAGLI. */\n const format = (raw: string): string => {\n if (!isFormatted || !labels?.locale) return raw;\n\n /* RAKAM ICERMEYEN deger biciMLENDIRILMEZ. */\n if (!/\\d/.test(raw)) return raw;\n\n const numeric = Number(\n raw\n .replace(/[^\\d.,-]/g, '')\n .replace(/\\.(?=\\d{3}\\b)/g, '')\n .replace(',', '.'),\n );\n if (!Number.isFinite(numeric)) return raw;\n\n try {\n return new Intl.NumberFormat(labels.locale).format(numeric);\n } catch {\n return raw;\n }\n };\n\n return (\n <span className={cx(styles.price, styles[`price--${size}`], className)} data-testid={testId}>\n <span className={styles.price__current}>\n {format(value)}\n <span className={styles.price__currency}>{symbol}</span>\n </span>\n\n {listValue && (\n <s className={styles.price__list}>\n {format(listValue)}\n <span className={styles.price__currency}>{symbol}</span>\n </s>\n )}\n\n {/* `isDefined` DEGIL acik karsilastirma: handy-utils'in koruyucusu\n `Exclude<any, …>` donuyor ve TypeScript'te daraltma uretmiyor. */}\n {discountPercent !== undefined && discountPercent > 0 && (\n <span className={styles.price__discount}>{formatDiscount(discountPercent)}</span>\n )}\n </span>\n );\n};\n\nexport default /*#__PURE__*/ memo(Price) as typeof Price;\n"],"names":["Price","value","currency","listValue","discountPercent","formatDiscount","percent","isFormatted","size","className","testId","labels","useUi","symbol","resolveLabel","format","raw","numeric","jsxs","cx","styles","jsx","index"],"mappings":"wVA4BMA,EAAmB,CAAC,CACxB,MAAAC,EACA,SAAAC,EACA,UAAAC,EACA,gBAAAC,EACA,eAAAC,EAAiBC,GAAW,IAAIA,CAAO,GACvC,YAAAC,EACA,KAAAC,EAAO,KACP,UAAAC,EACA,OAAAC,CACF,IAAM,CACJ,KAAM,CAAE,OAAAC,CAAA,EAAWC,QAAA,EACbC,EAASC,EAAAA,aAAa,iBAAkBZ,EAAUS,GAAA,YAAAA,EAAQ,QAAQ,EAGlEI,EAAUC,GAAwB,CAItC,GAHI,CAACT,GAAe,EAACI,GAAA,MAAAA,EAAQ,SAGzB,CAAC,KAAK,KAAKK,CAAG,EAAG,OAAOA,EAE5B,MAAMC,EAAU,OACdD,EACG,QAAQ,YAAa,EAAE,EACvB,QAAQ,iBAAkB,EAAE,EAC5B,QAAQ,IAAK,GAAG,CAAA,EAErB,GAAI,CAAC,OAAO,SAASC,CAAO,EAAG,OAAOD,EAEtC,GAAI,CACF,OAAO,IAAI,KAAK,aAAaL,EAAO,MAAM,EAAE,OAAOM,CAAO,CAC5D,MAAQ,CACN,OAAOD,CACT,CACF,EAEA,OACEE,EAAAA,KAAC,OAAA,CAAK,UAAWC,EAAAA,GAAGC,EAAAA,QAAO,MAAOA,EAAAA,QAAO,UAAUZ,CAAI,EAAE,EAAGC,CAAS,EAAG,cAAaC,EACnF,SAAA,CAAAQ,EAAAA,KAAC,OAAA,CAAK,UAAWE,EAAAA,QAAO,eACrB,SAAA,CAAAL,EAAOd,CAAK,EACboB,EAAAA,IAAC,OAAA,CAAK,UAAWD,EAAAA,QAAO,gBAAkB,SAAAP,CAAA,CAAO,CAAA,EACnD,EAECV,GACCe,EAAAA,KAAC,IAAA,CAAE,UAAWE,EAAAA,QAAO,YAClB,SAAA,CAAAL,EAAOZ,CAAS,EACjBkB,EAAAA,IAAC,OAAA,CAAK,UAAWD,EAAAA,QAAO,gBAAkB,SAAAP,CAAA,CAAO,CAAA,EACnD,EAKDT,IAAoB,QAAaA,EAAkB,GAClDiB,EAAAA,IAAC,OAAA,CAAK,UAAWD,EAAAA,QAAO,gBAAkB,SAAAf,EAAeD,CAAe,CAAA,CAAE,CAAA,EAE9E,CAEJ,EAEAkB,SAAkCtB,CAAK"}
@@ -0,0 +1,22 @@
1
+ import { FC } from 'react';
2
+ type Props = {
3
+ /** BİÇİMLENMİŞ tutar: "1.299,90". */
4
+ value: string;
5
+ /** Para birimi simgesi ya da kodu. */
6
+ currency?: string;
7
+ /** Değeri `Intl.NumberFormat` ile biçimlendirir. */
8
+ isFormatted?: boolean;
9
+ /** Üstü çizili liste fiyatı; indirim varsa verilir (biçimlenmiş). */
10
+ listValue?: string;
11
+ /** İndirim oranı (tam sayı yüzde). */
12
+ discountPercent?: number;
13
+ /** İndirim rozetinin metnini üretir ("%20", "-20%"). */
14
+ formatDiscount?: (percent: number) => string;
15
+ size?: 'sm' | 'md' | 'lg' | 'xl';
16
+ className?: string;
17
+ testId?: string;
18
+ };
19
+ /** Tutar gösterimi. */
20
+ declare const Price: FC<Props>;
21
+ declare const _default: typeof Price;
22
+ export default _default;
@@ -0,0 +1,22 @@
1
+ import { FC } from 'react';
2
+ type Props = {
3
+ /** BİÇİMLENMİŞ tutar: "1.299,90". */
4
+ value: string;
5
+ /** Para birimi simgesi ya da kodu. */
6
+ currency?: string;
7
+ /** Değeri `Intl.NumberFormat` ile biçimlendirir. */
8
+ isFormatted?: boolean;
9
+ /** Üstü çizili liste fiyatı; indirim varsa verilir (biçimlenmiş). */
10
+ listValue?: string;
11
+ /** İndirim oranı (tam sayı yüzde). */
12
+ discountPercent?: number;
13
+ /** İndirim rozetinin metnini üretir ("%20", "-20%"). */
14
+ formatDiscount?: (percent: number) => string;
15
+ size?: 'sm' | 'md' | 'lg' | 'xl';
16
+ className?: string;
17
+ testId?: string;
18
+ };
19
+ /** Tutar gösterimi. */
20
+ declare const Price: FC<Props>;
21
+ declare const _default: typeof Price;
22
+ export default _default;
@@ -0,0 +1,46 @@
1
+ "use client";
2
+ import { jsxs as i, jsx as t } from "react/jsx-runtime";
3
+ import { memo as h } from "react";
4
+ import { cx as y } from "../../helpers/class-name.helper.js";
5
+ import { resolveLabel as x } from "../../helpers/label.helper.js";
6
+ import { useUi as b } from "../../theme/context.js";
7
+ const e = {"price":"ui-price-Oc5Nr","price__current":"ui-price__current-2Xup2","price__currency":"ui-price__currency-32NLN","price__list":"ui-price__list-MlQgT","price__discount":"ui-price__discount-5Yc6W","price--sm":"ui-price--sm-Hd8Oe","price--md":"ui-price--md-JMxlK","price--lg":"ui-price--lg-TFqIF","price--xl":"ui-price--xl-EJBYq"};
8
+ const g = ({
9
+ value: p,
10
+ currency: l,
11
+ listValue: n,
12
+ discountPercent: s,
13
+ formatDiscount: u = (r) => `%${r}`,
14
+ isFormatted: d,
15
+ size: f = "md",
16
+ className: _,
17
+ testId: N
18
+ }) => {
19
+ const { labels: r } = b(), m = x("Price.currency", l, r == null ? void 0 : r.currency), o = (c) => {
20
+ if (!d || !(r != null && r.locale) || !/\d/.test(c)) return c;
21
+ const a = Number(
22
+ c.replace(/[^\d.,-]/g, "").replace(/\.(?=\d{3}\b)/g, "").replace(",", ".")
23
+ );
24
+ if (!Number.isFinite(a)) return c;
25
+ try {
26
+ return new Intl.NumberFormat(r.locale).format(a);
27
+ } catch {
28
+ return c;
29
+ }
30
+ };
31
+ return /* @__PURE__ */ i("span", { className: y(e.price, e[`price--${f}`], _), "data-testid": N, children: [
32
+ /* @__PURE__ */ i("span", { className: e.price__current, children: [
33
+ o(p),
34
+ /* @__PURE__ */ t("span", { className: e.price__currency, children: m })
35
+ ] }),
36
+ n && /* @__PURE__ */ i("s", { className: e.price__list, children: [
37
+ o(n),
38
+ /* @__PURE__ */ t("span", { className: e.price__currency, children: m })
39
+ ] }),
40
+ s !== void 0 && s > 0 && /* @__PURE__ */ t("span", { className: e.price__discount, children: u(s) })
41
+ ] });
42
+ }, U = /* @__PURE__ */ h(g);
43
+ export {
44
+ U as default
45
+ };
46
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/Price/index.tsx"],"sourcesContent":["'use client';\n\nimport { type FC, memo } from 'react';\n\nimport { cx } from '../../helpers/class-name.helper';\nimport { resolveLabel } from '../../helpers/label.helper';\nimport { useUi } from '../../theme/context';\n\nimport styles from './index.module.scss';\n\ntype Props = {\n /** BİÇİMLENMİŞ tutar: \"1.299,90\". */\n value: string;\n /** Para birimi simgesi ya da kodu. */\n currency?: string;\n /** Değeri `Intl.NumberFormat` ile biçimlendirir. */\n isFormatted?: boolean;\n /** Üstü çizili liste fiyatı; indirim varsa verilir (biçimlenmiş). */\n listValue?: string;\n /** İndirim oranı (tam sayı yüzde). */\n discountPercent?: number;\n /** İndirim rozetinin metnini üretir (\"%20\", \"-20%\"). */\n formatDiscount?: (percent: number) => string;\n size?: 'sm' | 'md' | 'lg' | 'xl';\n className?: string;\n testId?: string;\n};\n\n/** Tutar gösterimi. */\nconst Price: FC<Props> = ({\n value,\n currency,\n listValue,\n discountPercent,\n formatDiscount = percent => `%${percent}`,\n isFormatted,\n size = 'md',\n className,\n testId,\n}) => {\n const { labels } = useUi();\n const symbol = resolveLabel('Price.currency', currency, labels?.currency);\n\n /* BICIMLENDIRME OPSIYONEL ve yerel ayara BAGLI. */\n const format = (raw: string): string => {\n if (!isFormatted || !labels?.locale) return raw;\n\n /* RAKAM ICERMEYEN deger biciMLENDIRILMEZ. */\n if (!/\\d/.test(raw)) return raw;\n\n const numeric = Number(\n raw\n .replace(/[^\\d.,-]/g, '')\n .replace(/\\.(?=\\d{3}\\b)/g, '')\n .replace(',', '.'),\n );\n if (!Number.isFinite(numeric)) return raw;\n\n try {\n return new Intl.NumberFormat(labels.locale).format(numeric);\n } catch {\n return raw;\n }\n };\n\n return (\n <span className={cx(styles.price, styles[`price--${size}`], className)} data-testid={testId}>\n <span className={styles.price__current}>\n {format(value)}\n <span className={styles.price__currency}>{symbol}</span>\n </span>\n\n {listValue && (\n <s className={styles.price__list}>\n {format(listValue)}\n <span className={styles.price__currency}>{symbol}</span>\n </s>\n )}\n\n {/* `isDefined` DEGIL acik karsilastirma: handy-utils'in koruyucusu\n `Exclude<any, …>` donuyor ve TypeScript'te daraltma uretmiyor. */}\n {discountPercent !== undefined && discountPercent > 0 && (\n <span className={styles.price__discount}>{formatDiscount(discountPercent)}</span>\n )}\n </span>\n );\n};\n\nexport default /*#__PURE__*/ memo(Price) as typeof Price;\n"],"names":["Price","value","currency","listValue","discountPercent","formatDiscount","percent","isFormatted","size","className","testId","labels","useUi","symbol","resolveLabel","format","raw","numeric","jsxs","cx","styles","jsx","index"],"mappings":";;;;;;;AA4BA,MAAMA,IAAmB,CAAC;AAAA,EACxB,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,gBAAAC,IAAiB,CAAAC,MAAW,IAAIA,CAAO;AAAA,EACvC,aAAAC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EAAA,CAAE;AAAA,EAAA,GAE9E;AAEJ,GAEAkB,sBAAkCtB,CAAK;"}
@@ -0,0 +1 @@
1
+ @layer ui{.ui-price-Oc5Nr{display:inline-flex;align-items:baseline;flex-wrap:wrap;gap:var(--hd-space-2)}.ui-price__current-2Xup2{font-family:var(--hd-font-display);font-size:var(--hd-type-h4-size);font-weight:var(--hd-font-weight-bold);font-variant-numeric:tabular-nums;letter-spacing:var(--hd-type-h2-letter-spacing);white-space:nowrap;color:var(--hd-text)}.ui-price__currency-32NLN{font-size:.75em;font-weight:var(--hd-font-weight-semibold);margin-inline-start:2px}.ui-price__list-MlQgT{font-size:var(--hd-type-small-size);color:var(--hd-text-3);font-variant-numeric:tabular-nums;text-decoration-thickness:1px}.ui-price__discount-5Yc6W{font-size:var(--hd-type-caption-size);font-weight:var(--hd-font-weight-bold);color:var(--hd-danger-on-solid);background-color:var(--hd-danger-solid);border-radius:var(--hd-radius-xs);padding:2px var(--hd-space-1);line-height:1}.ui-price--sm-Hd8Oe .ui-price__current-2Xup2{font-size:var(--hd-type-body-size)}.ui-price--md-JMxlK .ui-price__current-2Xup2{font-size:var(--hd-type-h4-size)}.ui-price--lg-TFqIF .ui-price__current-2Xup2,.ui-price--xl-EJBYq .ui-price__current-2Xup2{font-size:var(--hd-type-h2-size)}}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("react/jsx-runtime"),x=require("react"),o=require("../../helpers/class-name.helper.cjs"),b=require("../../helpers/component.helper.cjs"),a={default:{"progress":"ui-progress-99MrX","progress__track":"ui-progress__track-Qbp9t","progress__track--xs":"ui-progress__track--xs-CgHUU","progress__track--sm":"ui-progress__track--sm-dbHZq","progress__track--md":"ui-progress__track--md-v1GdW","progress__track--indeterminate":"ui-progress__track--indeterminate-8fMxl","progress__fill":"ui-progress__fill-Bam55","progress__fill--success":"ui-progress__fill--success-IFuI5","progress__fill--warning":"ui-progress__fill--warning-wIhgi","progress__fill--danger":"ui-progress__fill--danger-cuqj0","progress__value":"ui-progress__value-3FYxj","circle":"ui-circle-9cn2w","circle__svg":"ui-circle__svg-0IwkR","circle__track":"ui-circle__track-zY2qc","circle__fill":"ui-circle__fill-Jbde6","circle__fill--success":"ui-circle__fill--success-HTr0m","circle__fill--warning":"ui-circle__fill--warning-Fkgj2","circle__fill--danger":"ui-circle__fill--danger-4E3Z8","circle--indeterminate":"ui-circle--indeterminate-cITY6","circle__label":"ui-circle__label-A3nJB"}},p=(t,l)=>!Number.isFinite(t)||!Number.isFinite(l)||l<=0?0:Math.min(100,Math.max(0,t/l*100)),N=({value:t,max:l=100,label:n,"aria-labelledby":d,valueText:c,isValueVisible:u,tone:m="brand",size:r="md",className:h,testId:_})=>{const e=t===void 0,i=e?0:p(t,l);return s.jsxs("div",{className:o.cx(a.default.progress,h),"data-testid":_,children:[s.jsx("div",{role:"progressbar","aria-label":n,"aria-labelledby":d,"aria-valuenow":e?void 0:Math.round(i),"aria-valuemin":e?void 0:0,"aria-valuemax":e?void 0:100,"aria-valuetext":e?void 0:c,className:o.cx(a.default.progress__track,a.default[`progress__track--${r}`],e&&a.default["progress__track--indeterminate"]),children:s.jsx("span",{className:o.cx(a.default.progress__fill,a.default[`progress__fill--${m}`]),style:e?void 0:{inlineSize:`${i}%`}})}),u&&!e&&s.jsx("span",{className:a.default.progress__value,"aria-hidden":!0,children:c??`%${Math.round(i)}`})]})},j=x.memo(b.named(N,"Progress")),M=({value:t,max:l=100,label:n,"aria-labelledby":d,valueText:c,isValueVisible:u,tone:m="brand",size:r=44,className:h,testId:_})=>{const e=t===void 0,i=e?25:p(t,l),f=Math.max(3,Math.round(r*.1)),v=(r-f)/2,g=2*Math.PI*v;return s.jsxs("div",{className:o.cx(a.default.circle,e&&a.default["circle--indeterminate"],h),style:{width:r,height:r},"data-testid":_,children:[s.jsxs("svg",{className:a.default.circle__svg,width:r,height:r,viewBox:`0 0 ${r} ${r}`,role:"progressbar","aria-label":n,"aria-labelledby":d,"aria-valuenow":e?void 0:Math.round(i),"aria-valuemin":e?void 0:0,"aria-valuemax":e?void 0:100,"aria-valuetext":e?void 0:c,children:[s.jsx("circle",{className:a.default.circle__track,cx:r/2,cy:r/2,r:v,fill:"none",strokeWidth:f}),s.jsx("circle",{className:o.cx(a.default.circle__fill,a.default[`circle__fill--${m}`]),cx:r/2,cy:r/2,r:v,fill:"none",strokeWidth:f,strokeDasharray:g,strokeDashoffset:g*(1-i/100)})]}),u&&!e&&s.jsx("span",{className:a.default.circle__label,"aria-hidden":!0,children:c??`%${Math.round(i)}`})]})},y=b.named(x.memo(M),"ProgressCircle");exports.ProgressCircle=y;exports.default=j;
2
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/components/Progress/index.tsx"],"sourcesContent":["import { memo } from 'react';\n\nimport { cx } from '../../helpers/class-name.helper';\nimport { named } from '../../helpers/component.helper';\n\nimport styles from './index.module.scss';\n\n/** Yüzdeyi 0-100 aralığına kırpar; ölçek sıfır genişlikteyse 0 döner. */\nconst toPercent = (value: number, max: number): number => {\n if (!Number.isFinite(value) || !Number.isFinite(max) || max <= 0) return 0;\n return Math.min(100, Math.max(0, (value / max) * 100));\n};\n\n/**\n * The accessible name (2.2): `label` (written as `aria-label`), or `aria-labelledby` pointing at\n * text already on screen — a heading or the file name above the bar — so it is not written twice.\n * One of the two is required.\n */\nexport type ProgressNameProps =\n | {\n /** Çubuğun erişilebilir adı (\"Yükleme\", \"Ödeme adımı\"). */\n label: string;\n 'aria-labelledby'?: never;\n }\n | {\n label?: never;\n /** The id(s) of visible text that names the bar (2.2). */\n 'aria-labelledby': string;\n };\n\ntype Props = ProgressNameProps & {\n /**\n * Tamamlanan miktar. `undefined` → BELİRSİZ ilerleme (sonu bilinmiyor); çubuk kendi kendine akar.\n */\n value?: number;\n /** Ölçeğin üst ucu. */\n max?: number;\n /** Ekran okuyucuya okunan METİN karşılığı (\"3 / 5 dosya\"). */\n valueText?: string;\n /** Yüzdeyi çubuğun yanında GÖRÜNÜR olarak yazar. */\n isValueVisible?: boolean;\n /**\n * ⚠ `brand` 5.0'dan beri MÜREKKEP çizer (`selected` — ilerleme bir seçim göstergesi), yeşil\n * DEĞİL: yeşil yalnızca eylem, bağlantı ve odakta. Ad 4.x'ten kaldı; değiştirmek her çağrıyı\n * kırardı ve kazancı yalnızca isim olurdu.\n */\n tone?: 'brand' | 'success' | 'warning' | 'danger';\n /** `xs` 2 px — satır içi gösterge (bağlam doluluğu); etiket yanında okunur. */\n size?: 'xs' | 'sm' | 'md';\n className?: string;\n testId?: string;\n};\n\n/** İlerleme çubuğu — ölçülebilir bekleme. */\nconst Progress = ({\n value,\n max = 100,\n label,\n 'aria-labelledby': labelledBy,\n valueText,\n isValueVisible,\n tone = 'brand',\n size = 'md',\n className,\n testId,\n}: Props) => {\n const isIndeterminate = value === undefined;\n const percent = isIndeterminate ? 0 : toPercent(value, max);\n\n return (\n <div className={cx(styles.progress, className)} data-testid={testId}>\n <div\n role=\"progressbar\"\n aria-label={label}\n aria-labelledby={labelledBy}\n /* BELIRSIZ kipte `aria-valuenow` YAZILMAZ. */\n aria-valuenow={isIndeterminate ? undefined : Math.round(percent)}\n aria-valuemin={isIndeterminate ? undefined : 0}\n aria-valuemax={isIndeterminate ? undefined : 100}\n aria-valuetext={isIndeterminate ? undefined : valueText}\n className={cx(\n styles.progress__track,\n styles[`progress__track--${size}`],\n isIndeterminate && styles['progress__track--indeterminate'],\n )}\n >\n <span\n className={cx(styles.progress__fill, styles[`progress__fill--${tone}`])}\n style={isIndeterminate ? undefined : { inlineSize: `${percent}%` }}\n />\n </div>\n\n {isValueVisible && !isIndeterminate && (\n /*\n * Gorsel yuzde `aria-hidden`: ayni bilgi zaten `progressbar`in degerinde ve iki kez\n * duyurulmasi gurultu.\n */\n <span className={styles.progress__value} aria-hidden>\n {valueText ?? `%${Math.round(percent)}`}\n </span>\n )}\n </div>\n );\n};\n\nexport default /*#__PURE__*/ memo(/*#__PURE__*/ named(Progress, 'Progress')) as typeof Progress;\n\ntype CircleProps = ProgressNameProps & {\n /** Tamamlanan miktar. `undefined` → BELİRSİZ; çember döner. */\n value?: number;\n max?: number;\n valueText?: string;\n /** Yüzdeyi çemberin ortasına yazar. */\n isValueVisible?: boolean;\n /**\n * ⚠ `brand` 5.0'dan beri MÜREKKEP çizer (`selected` — ilerleme bir seçim göstergesi), yeşil\n * DEĞİL: yeşil yalnızca eylem, bağlantı ve odakta. Ad 4.x'ten kaldı; değiştirmek her çağrıyı\n * kırardı ve kazancı yalnızca isim olurdu.\n */\n tone?: 'brand' | 'success' | 'warning' | 'danger';\n /** Dış çap (px). */\n size?: number;\n className?: string;\n testId?: string;\n};\n\n/** Dairesel ilerleme. */\nconst ProgressCircleBase = ({\n value,\n max = 100,\n label,\n 'aria-labelledby': labelledBy,\n valueText,\n isValueVisible,\n tone = 'brand',\n size = 44,\n className,\n testId,\n}: CircleProps) => {\n const isIndeterminate = value === undefined;\n const percent = isIndeterminate ? 25 : toPercent(value, max);\n\n /*\n * Cizgi kalinligi capin ~%10'u: sabit bir kalinlik kucuk cemberde kutuyu dolduruyor, buyugunde\n * sac teline donuyordu.\n */\n const stroke = Math.max(3, Math.round(size * 0.1));\n const radius = (size - stroke) / 2;\n const circumference = 2 * Math.PI * radius;\n\n return (\n <div\n className={cx(styles.circle, isIndeterminate && styles['circle--indeterminate'], className)}\n style={{ width: size, height: size }}\n data-testid={testId}\n >\n <svg\n className={styles.circle__svg}\n width={size}\n height={size}\n viewBox={`0 0 ${size} ${size}`}\n role=\"progressbar\"\n aria-label={label}\n aria-labelledby={labelledBy}\n aria-valuenow={isIndeterminate ? undefined : Math.round(percent)}\n aria-valuemin={isIndeterminate ? undefined : 0}\n aria-valuemax={isIndeterminate ? undefined : 100}\n aria-valuetext={isIndeterminate ? undefined : valueText}\n >\n <circle\n className={styles.circle__track}\n cx={size / 2}\n cy={size / 2}\n r={radius}\n fill=\"none\"\n strokeWidth={stroke}\n />\n <circle\n className={cx(styles.circle__fill, styles[`circle__fill--${tone}`])}\n cx={size / 2}\n cy={size / 2}\n r={radius}\n fill=\"none\"\n strokeWidth={stroke}\n strokeDasharray={circumference}\n strokeDashoffset={circumference * (1 - percent / 100)}\n />\n </svg>\n\n {isValueVisible && !isIndeterminate && (\n <span className={styles.circle__label} aria-hidden>\n {valueText ?? `%${Math.round(percent)}`}\n </span>\n )}\n </div>\n );\n};\n\nexport const ProgressCircle = /*#__PURE__*/ named(\n /*#__PURE__*/ memo(ProgressCircleBase),\n 'ProgressCircle',\n);\n"],"names":["toPercent","value","max","Progress","label","labelledBy","valueText","isValueVisible","tone","size","className","testId","isIndeterminate","percent","jsxs","cx","styles","jsx","memo","named","ProgressCircleBase","stroke","radius","circumference","ProgressCircle"],"mappings":"0SAQMA,EAAY,CAACC,EAAeC,IAC5B,CAAC,OAAO,SAASD,CAAK,GAAK,CAAC,OAAO,SAASC,CAAG,GAAKA,GAAO,EAAU,EAClE,KAAK,IAAI,IAAK,KAAK,IAAI,EAAID,EAAQC,EAAO,GAAG,CAAC,EA4CjDC,EAAW,CAAC,CAChB,MAAAF,EACA,IAAAC,EAAM,IACN,MAAAE,EACA,kBAAmBC,EACnB,UAAAC,EACA,eAAAC,EACA,KAAAC,EAAO,QACP,KAAAC,EAAO,KACP,UAAAC,EACA,OAAAC,CACF,IAAa,CACX,MAAMC,EAAkBX,IAAU,OAC5BY,EAAUD,EAAkB,EAAIZ,EAAUC,EAAOC,CAAG,EAE1D,OACEY,OAAC,OAAI,UAAWC,EAAAA,GAAGC,EAAAA,QAAO,SAAUN,CAAS,EAAG,cAAaC,EAC3D,SAAA,CAAAM,EAAAA,IAAC,MAAA,CACC,KAAK,cACL,aAAYb,EACZ,kBAAiBC,EAEjB,gBAAeO,EAAkB,OAAY,KAAK,MAAMC,CAAO,EAC/D,gBAAeD,EAAkB,OAAY,EAC7C,gBAAeA,EAAkB,OAAY,IAC7C,iBAA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AQA,EACR,QAAS,OAAOA,CAAI,IAAIA,CAAI,GAC5B,KAAK,cACL,aAAYL,EACZ,kBAAiBC,EACjB,gBAAeO,EAAkB,OAAY,KAAK,MAAMC,CAAO,EAC/D,gBAAeD,EAAkB,OAAY,EAC7C,gBAAeA,EAAkB,OAAY,IAC7C,iBAAgBA,EAAkB,OAAYN,EAE9C,SAAA,CAAAW,EAAAA,IAAC,SAAA,CACC,UAAWD,EAAAA,QAAO,cAClB,GAAIP,EAAO,EACX,GAAIA,EAAO,EACX,EAAGa,EACH,KAAK,OACL,YAAaD,CAAA,CAAA,EAEfJ,EAAAA,IAAC,SAAA,CACC,UAAWF,EAAAA,GAAGC,EAAAA,QAAO,aAAcA,EAAAA,QAAO,iBAAiBR,CAAI,EAAE,CAAC,EAClE,GAAIC,EAAO,EACX,GAAIA,EAAO,EACX,EAAGa,EACH,KAAK,OACL,YAAaD,EACb,gBAAiBE,EACjB,iBAAkBA,GAAiB,EAAIV,EAAU,IAAA,CAAA,CACnD,CAAA,CAAA,EAGDN,GAAkB,CAACK,GAClBK,EAAAA,IAAC,OAAA,CAAK,UAAWD,EAAAA,QAAO,cAAe,cAAW,GAC/C,YAAa,IAAI,KAAK,MAAMH,CAAO,CAAC,EAAA,CACvC,CAAA,CAAA,CAAA,CAIR,EAEaW,EAA+BL,EAAAA,aACvBC,CAAkB,EACrC,gBACF"}
@@ -0,0 +1,59 @@
1
+ /**
2
+ * The accessible name (2.2): `label` (written as `aria-label`), or `aria-labelledby` pointing at
3
+ * text already on screen — a heading or the file name above the bar — so it is not written twice.
4
+ * One of the two is required.
5
+ */
6
+ export type ProgressNameProps = {
7
+ /** Çubuğun erişilebilir adı ("Yükleme", "Ödeme adımı"). */
8
+ label: string;
9
+ 'aria-labelledby'?: never;
10
+ } | {
11
+ label?: never;
12
+ /** The id(s) of visible text that names the bar (2.2). */
13
+ 'aria-labelledby': string;
14
+ };
15
+ type Props = ProgressNameProps & {
16
+ /**
17
+ * Tamamlanan miktar. `undefined` → BELİRSİZ ilerleme (sonu bilinmiyor); çubuk kendi kendine akar.
18
+ */
19
+ value?: number;
20
+ /** Ölçeğin üst ucu. */
21
+ max?: number;
22
+ /** Ekran okuyucuya okunan METİN karşılığı ("3 / 5 dosya"). */
23
+ valueText?: string;
24
+ /** Yüzdeyi çubuğun yanında GÖRÜNÜR olarak yazar. */
25
+ isValueVisible?: boolean;
26
+ /**
27
+ * ⚠ `brand` 5.0'dan beri MÜREKKEP çizer (`selected` — ilerleme bir seçim göstergesi), yeşil
28
+ * DEĞİL: yeşil yalnızca eylem, bağlantı ve odakta. Ad 4.x'ten kaldı; değiştirmek her çağrıyı
29
+ * kırardı ve kazancı yalnızca isim olurdu.
30
+ */
31
+ tone?: 'brand' | 'success' | 'warning' | 'danger';
32
+ /** `xs` 2 px — satır içi gösterge (bağlam doluluğu); etiket yanında okunur. */
33
+ size?: 'xs' | 'sm' | 'md';
34
+ className?: string;
35
+ testId?: string;
36
+ };
37
+ /** İlerleme çubuğu — ölçülebilir bekleme. */
38
+ declare const Progress: ({ value, max, label, "aria-labelledby": labelledBy, valueText, isValueVisible, tone, size, className, testId, }: Props) => import("react").JSX.Element;
39
+ declare const _default: typeof Progress;
40
+ export default _default;
41
+ type CircleProps = ProgressNameProps & {
42
+ /** Tamamlanan miktar. `undefined` → BELİRSİZ; çember döner. */
43
+ value?: number;
44
+ max?: number;
45
+ valueText?: string;
46
+ /** Yüzdeyi çemberin ortasına yazar. */
47
+ isValueVisible?: boolean;
48
+ /**
49
+ * ⚠ `brand` 5.0'dan beri MÜREKKEP çizer (`selected` — ilerleme bir seçim göstergesi), yeşil
50
+ * DEĞİL: yeşil yalnızca eylem, bağlantı ve odakta. Ad 4.x'ten kaldı; değiştirmek her çağrıyı
51
+ * kırardı ve kazancı yalnızca isim olurdu.
52
+ */
53
+ tone?: 'brand' | 'success' | 'warning' | 'danger';
54
+ /** Dış çap (px). */
55
+ size?: number;
56
+ className?: string;
57
+ testId?: string;
58
+ };
59
+ export declare const ProgressCircle: import('react').MemoExoticComponent<({ value, max, label, "aria-labelledby": labelledBy, valueText, isValueVisible, tone, size, className, testId, }: CircleProps) => import("react").JSX.Element>;
@@ -0,0 +1,59 @@
1
+ /**
2
+ * The accessible name (2.2): `label` (written as `aria-label`), or `aria-labelledby` pointing at
3
+ * text already on screen — a heading or the file name above the bar — so it is not written twice.
4
+ * One of the two is required.
5
+ */
6
+ export type ProgressNameProps = {
7
+ /** Çubuğun erişilebilir adı ("Yükleme", "Ödeme adımı"). */
8
+ label: string;
9
+ 'aria-labelledby'?: never;
10
+ } | {
11
+ label?: never;
12
+ /** The id(s) of visible text that names the bar (2.2). */
13
+ 'aria-labelledby': string;
14
+ };
15
+ type Props = ProgressNameProps & {
16
+ /**
17
+ * Tamamlanan miktar. `undefined` → BELİRSİZ ilerleme (sonu bilinmiyor); çubuk kendi kendine akar.
18
+ */
19
+ value?: number;
20
+ /** Ölçeğin üst ucu. */
21
+ max?: number;
22
+ /** Ekran okuyucuya okunan METİN karşılığı ("3 / 5 dosya"). */
23
+ valueText?: string;
24
+ /** Yüzdeyi çubuğun yanında GÖRÜNÜR olarak yazar. */
25
+ isValueVisible?: boolean;
26
+ /**
27
+ * ⚠ `brand` 5.0'dan beri MÜREKKEP çizer (`selected` — ilerleme bir seçim göstergesi), yeşil
28
+ * DEĞİL: yeşil yalnızca eylem, bağlantı ve odakta. Ad 4.x'ten kaldı; değiştirmek her çağrıyı
29
+ * kırardı ve kazancı yalnızca isim olurdu.
30
+ */
31
+ tone?: 'brand' | 'success' | 'warning' | 'danger';
32
+ /** `xs` 2 px — satır içi gösterge (bağlam doluluğu); etiket yanında okunur. */
33
+ size?: 'xs' | 'sm' | 'md';
34
+ className?: string;
35
+ testId?: string;
36
+ };
37
+ /** İlerleme çubuğu — ölçülebilir bekleme. */
38
+ declare const Progress: ({ value, max, label, "aria-labelledby": labelledBy, valueText, isValueVisible, tone, size, className, testId, }: Props) => import("react").JSX.Element;
39
+ declare const _default: typeof Progress;
40
+ export default _default;
41
+ type CircleProps = ProgressNameProps & {
42
+ /** Tamamlanan miktar. `undefined` → BELİRSİZ; çember döner. */
43
+ value?: number;
44
+ max?: number;
45
+ valueText?: string;
46
+ /** Yüzdeyi çemberin ortasına yazar. */
47
+ isValueVisible?: boolean;
48
+ /**
49
+ * ⚠ `brand` 5.0'dan beri MÜREKKEP çizer (`selected` — ilerleme bir seçim göstergesi), yeşil
50
+ * DEĞİL: yeşil yalnızca eylem, bağlantı ve odakta. Ad 4.x'ten kaldı; değiştirmek her çağrıyı
51
+ * kırardı ve kazancı yalnızca isim olurdu.
52
+ */
53
+ tone?: 'brand' | 'success' | 'warning' | 'danger';
54
+ /** Dış çap (px). */
55
+ size?: number;
56
+ className?: string;
57
+ testId?: string;
58
+ };
59
+ export declare const ProgressCircle: import('react').MemoExoticComponent<({ value, max, label, "aria-labelledby": labelledBy, valueText, isValueVisible, tone, size, className, testId, }: CircleProps) => import("react").JSX.Element>;
@@ -0,0 +1,124 @@
1
+ import { jsxs as g, jsx as o } from "react/jsx-runtime";
2
+ import { memo as f } from "react";
3
+ import { cx as c } from "../../helpers/class-name.helper.js";
4
+ import { named as N } from "../../helpers/component.helper.js";
5
+ const a = {"progress":"ui-progress-99MrX","progress__track":"ui-progress__track-Qbp9t","progress__track--xs":"ui-progress__track--xs-CgHUU","progress__track--sm":"ui-progress__track--sm-dbHZq","progress__track--md":"ui-progress__track--md-v1GdW","progress__track--indeterminate":"ui-progress__track--indeterminate-8fMxl","progress__fill":"ui-progress__fill-Bam55","progress__fill--success":"ui-progress__fill--success-IFuI5","progress__fill--warning":"ui-progress__fill--warning-wIhgi","progress__fill--danger":"ui-progress__fill--danger-cuqj0","progress__value":"ui-progress__value-3FYxj","circle":"ui-circle-9cn2w","circle__svg":"ui-circle__svg-0IwkR","circle__track":"ui-circle__track-zY2qc","circle__fill":"ui-circle__fill-Jbde6","circle__fill--success":"ui-circle__fill--success-HTr0m","circle__fill--warning":"ui-circle__fill--warning-Fkgj2","circle__fill--danger":"ui-circle__fill--danger-4E3Z8","circle--indeterminate":"ui-circle--indeterminate-cITY6","circle__label":"ui-circle__label-A3nJB"};
6
+ const y = (i, s) => !Number.isFinite(i) || !Number.isFinite(s) || s <= 0 ? 0 : Math.min(100, Math.max(0, i / s * 100)), k = ({
7
+ value: i,
8
+ max: s = 100,
9
+ label: n,
10
+ "aria-labelledby": d,
11
+ valueText: l,
12
+ isValueVisible: m,
13
+ tone: h = "brand",
14
+ size: e = "md",
15
+ className: _,
16
+ testId: v
17
+ }) => {
18
+ const r = i === void 0, t = r ? 0 : y(i, s);
19
+ return /* @__PURE__ */ g("div", { className: c(a.progress, _), "data-testid": v, children: [
20
+ /* @__PURE__ */ o(
21
+ "div",
22
+ {
23
+ role: "progressbar",
24
+ "aria-label": n,
25
+ "aria-labelledby": d,
26
+ "aria-valuenow": r ? void 0 : Math.round(t),
27
+ "aria-valuemin": r ? void 0 : 0,
28
+ "aria-valuemax": r ? void 0 : 100,
29
+ "aria-valuetext": r ? void 0 : l,
30
+ className: c(
31
+ a.progress__track,
32
+ a[`progress__track--${e}`],
33
+ r && a["progress__track--indeterminate"]
34
+ ),
35
+ children: /* @__PURE__ */ o(
36
+ "span",
37
+ {
38
+ className: c(a.progress__fill, a[`progress__fill--${h}`]),
39
+ style: r ? void 0 : { inlineSize: `${t}%` }
40
+ }
41
+ )
42
+ }
43
+ ),
44
+ m && !r && /*
45
+ * Gorsel yuzde `aria-hidden`: ayni bilgi zaten `progressbar`in degerinde ve iki kez
46
+ * duyurulmasi gurultu.
47
+ */
48
+ /* @__PURE__ */ o("span", { className: a.progress__value, "aria-hidden": !0, children: l ?? `%${Math.round(t)}` })
49
+ ] });
50
+ }, I = /* @__PURE__ */ f(/* @__PURE__ */ N(k, "Progress")), x = ({
51
+ value: i,
52
+ max: s = 100,
53
+ label: n,
54
+ "aria-labelledby": d,
55
+ valueText: l,
56
+ isValueVisible: m,
57
+ tone: h = "brand",
58
+ size: e = 44,
59
+ className: _,
60
+ testId: v
61
+ }) => {
62
+ const r = i === void 0, t = r ? 25 : y(i, s), p = Math.max(3, Math.round(e * 0.1)), u = (e - p) / 2, b = 2 * Math.PI * u;
63
+ return /* @__PURE__ */ g(
64
+ "div",
65
+ {
66
+ className: c(a.circle, r && a["circle--indeterminate"], _),
67
+ style: { width: e, height: e },
68
+ "data-testid": v,
69
+ children: [
70
+ /* @__PURE__ */ g(
71
+ "svg",
72
+ {
73
+ className: a.circle__svg,
74
+ width: e,
75
+ height: e,
76
+ viewBox: `0 0 ${e} ${e}`,
77
+ role: "progressbar",
78
+ "aria-label": n,
79
+ "aria-labelledby": d,
80
+ "aria-valuenow": r ? void 0 : Math.round(t),
81
+ "aria-valuemin": r ? void 0 : 0,
82
+ "aria-valuemax": r ? void 0 : 100,
83
+ "aria-valuetext": r ? void 0 : l,
84
+ children: [
85
+ /* @__PURE__ */ o(
86
+ "circle",
87
+ {
88
+ className: a.circle__track,
89
+ cx: e / 2,
90
+ cy: e / 2,
91
+ r: u,
92
+ fill: "none",
93
+ strokeWidth: p
94
+ }
95
+ ),
96
+ /* @__PURE__ */ o(
97
+ "circle",
98
+ {
99
+ className: c(a.circle__fill, a[`circle__fill--${h}`]),
100
+ cx: e / 2,
101
+ cy: e / 2,
102
+ r: u,
103
+ fill: "none",
104
+ strokeWidth: p,
105
+ strokeDasharray: b,
106
+ strokeDashoffset: b * (1 - t / 100)
107
+ }
108
+ )
109
+ ]
110
+ }
111
+ ),
112
+ m && !r && /* @__PURE__ */ o("span", { className: a.circle__label, "aria-hidden": !0, children: l ?? `%${Math.round(t)}` })
113
+ ]
114
+ }
115
+ );
116
+ }, j = /* @__PURE__ */ N(
117
+ /* @__PURE__ */ f(x),
118
+ "ProgressCircle"
119
+ );
120
+ export {
121
+ j as ProgressCircle,
122
+ I as default
123
+ };
124
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/Progress/index.tsx"],"sourcesContent":["import { memo } from 'react';\n\nimport { cx } from '../../helpers/class-name.helper';\nimport { named } from '../../helpers/component.helper';\n\nimport styles from './index.module.scss';\n\n/** Yüzdeyi 0-100 aralığına kırpar; ölçek sıfır genişlikteyse 0 döner. */\nconst toPercent = (value: number, max: number): number => {\n if (!Number.isFinite(value) || !Number.isFinite(max) || max <= 0) return 0;\n return Math.min(100, Math.max(0, (value / max) * 100));\n};\n\n/**\n * The accessible name (2.2): `label` (written as `aria-label`), or `aria-labelledby` pointing at\n * text already on screen — a heading or the file name above the bar — so it is not written twice.\n * One of the two is required.\n */\nexport type ProgressNameProps =\n | {\n /** Çubuğun erişilebilir adı (\"Yükleme\", \"Ödeme adımı\"). */\n label: string;\n 'aria-labelledby'?: never;\n }\n | {\n label?: never;\n /** The id(s) of visible text that names the bar (2.2). */\n 'aria-labelledby': string;\n };\n\ntype Props = ProgressNameProps & {\n /**\n * Tamamlanan miktar. `undefined` → BELİRSİZ ilerleme (sonu bilinmiyor); çubuk kendi kendine akar.\n */\n value?: number;\n /** Ölçeğin üst ucu. */\n max?: number;\n /** Ekran okuyucuya okunan METİN karşılığı (\"3 / 5 dosya\"). */\n valueText?: string;\n /** Yüzdeyi çubuğun yanında GÖRÜNÜR olarak yazar. */\n isValueVisible?: boolean;\n /**\n * ⚠ `brand` 5.0'dan beri MÜREKKEP çizer (`selected` — ilerleme bir seçim göstergesi), yeşil\n * DEĞİL: yeşil yalnızca eylem, bağlantı ve odakta. Ad 4.x'ten kaldı; değiştirmek her çağrıyı\n * kırardı ve kazancı yalnızca isim olurdu.\n */\n tone?: 'brand' | 'success' | 'warning' | 'danger';\n /** `xs` 2 px — satır içi gösterge (bağlam doluluğu); etiket yanında okunur. */\n size?: 'xs' | 'sm' | 'md';\n className?: string;\n testId?: string;\n};\n\n/** İlerleme çubuğu — ölçülebilir bekleme. */\nconst Progress = ({\n value,\n max = 100,\n label,\n 'aria-labelledby': labelledBy,\n valueText,\n isValueVisible,\n tone = 'brand',\n size = 'md',\n className,\n testId,\n}: Props) => {\n const isIndeterminate = value === undefined;\n const percent = isIndeterminate ? 0 : toPercent(value, max);\n\n return (\n <div className={cx(styles.progress, className)} data-testid={testId}>\n <div\n role=\"progressbar\"\n aria-label={label}\n aria-labelledby={labelledBy}\n /* BELIRSIZ kipte `aria-valuenow` YAZILMAZ. */\n aria-valuenow={isIndeterminate ? undefined : Math.round(percent)}\n aria-valuemin={isIndeterminate ? undefined : 0}\n aria-valuemax={isIndeterminate ? undefined : 100}\n aria-valuetext={isIndeterminate ? undefined : valueText}\n className={cx(\n styles.progress__track,\n styles[`progress__track--${size}`],\n isIndeterminate && styles['progress__track--indeterminate'],\n )}\n >\n <span\n className={cx(styles.progress__fill, styles[`progress__fill--${tone}`])}\n style={isIndeterminate ? undefined : { inlineSize: `${percent}%` }}\n />\n </div>\n\n {isValueVisible && !isIndeterminate && (\n /*\n * Gorsel yuzde `aria-hidden`: ayni bilgi zaten `progressbar`in degerinde ve iki kez\n * duyurulmasi gurultu.\n */\n <span className={styles.progress__value} aria-hidden>\n {valueText ?? `%${Math.round(percent)}`}\n </span>\n )}\n </div>\n );\n};\n\nexport default /*#__PURE__*/ memo(/*#__PURE__*/ named(Progress, 'Progress')) as typeof Progress;\n\ntype CircleProps = ProgressNameProps & {\n /** Tamamlanan miktar. `undefined` → BELİRSİZ; çember döner. */\n value?: number;\n max?: number;\n valueText?: string;\n /** Yüzdeyi çemberin ortasına yazar. */\n isValueVisible?: boolean;\n /**\n * ⚠ `brand` 5.0'dan beri MÜREKKEP çizer (`selected` — ilerleme bir seçim göstergesi), yeşil\n * DEĞİL: yeşil yalnızca eylem, bağlantı ve odakta. Ad 4.x'ten kaldı; değiştirmek her çağrıyı\n * kırardı ve kazancı yalnızca isim olurdu.\n */\n tone?: 'brand' | 'success' | 'warning' | 'danger';\n /** Dış çap (px). */\n size?: number;\n className?: string;\n testId?: string;\n};\n\n/** Dairesel ilerleme. */\nconst ProgressCircleBase = ({\n value,\n max = 100,\n label,\n 'aria-labelledby': labelledBy,\n valueText,\n isValueVisible,\n tone = 'brand',\n size = 44,\n className,\n testId,\n}: CircleProps) => {\n const isIndeterminate = value === undefined;\n const percent = isIndeterminate ? 25 : toPercent(value, max);\n\n /*\n * Cizgi kalinligi capin ~%10'u: sabit bir kalinlik kucuk cemberde kutuyu dolduruyor, buyugunde\n * sac teline donuyordu.\n */\n const stroke = Math.max(3, Math.round(size * 0.1));\n const radius = (size - stroke) / 2;\n const circumference = 2 * Math.PI * radius;\n\n return (\n <div\n className={cx(styles.circle, isIndeterminate && styles['circle--indeterminate'], className)}\n style={{ width: size, height: size }}\n data-testid={testId}\n >\n <svg\n className={styles.circle__svg}\n width={size}\n height={size}\n viewBox={`0 0 ${size} ${size}`}\n role=\"progressbar\"\n aria-label={label}\n aria-labelledby={labelledBy}\n aria-valuenow={isIndeterminate ? undefined : Math.round(percent)}\n aria-valuemin={isIndeterminate ? undefined : 0}\n aria-valuemax={isIndeterminate ? undefined : 100}\n aria-valuetext={isIndeterminate ? undefined : valueText}\n >\n <circle\n className={styles.circle__track}\n cx={size / 2}\n cy={size / 2}\n r={radius}\n fill=\"none\"\n strokeWidth={stroke}\n />\n <circle\n className={cx(styles.circle__fill, styles[`circle__fill--${tone}`])}\n cx={size / 2}\n cy={size / 2}\n r={radius}\n fill=\"none\"\n strokeWidth={stroke}\n strokeDasharray={circumference}\n strokeDashoffset={circumference * (1 - percent / 100)}\n />\n </svg>\n\n {isValueVisible && !isIndeterminate && (\n <span className={styles.circle__label} aria-hidden>\n {valueText ?? `%${Math.round(percent)}`}\n </span>\n )}\n </div>\n );\n};\n\nexport const ProgressCircle = /*#__PURE__*/ named(\n /*#__PURE__*/ memo(ProgressCircleBase),\n 'ProgressCircle',\n);\n"],"names":["toPercent","value","max","Progress","label","labelledBy","valueText","isValueVisible","tone","size","className","testId","isIndeterminate","percent","jsxs","cx","styles","jsx","Progress$1","memo","named","ProgressCircleBase","stroke","radius","circumference","ProgressCircle"],"mappings":";;;;;AAQA,M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Y;AAAA,YAC7C,kBAAgBA,IAAkB,SAAYN;AAAA,YAE9C,UAAA;AAAA,cAAA,gBAAAW;AAAA,gBAAC;AAAA,gBAAA;AAAA,kBACC,WAAWD,EAAO;AAAA,kBAClB,IAAIP,IAAO;AAAA,kBACX,IAAIA,IAAO;AAAA,kBACX,GAAGc;AAAA,kBACH,MAAK;AAAA,kBACL,aAAaD;AAAA,gBAAA;AAAA,cAAA;AAAA,cAEf,gBAAAL;AAAA,gBAAC;AAAA,gBAAA;AAAA,kBACC,WAAWF,EAAGC,EAAO,cAAcA,EAAO,iBAAiBR,CAAI,EAAE,CAAC;AAAA,kBAClE,IAAIC,IAAO;AAAA,kBACX,IAAIA,IAAO;AAAA,kBACX,GAAGc;AAAA,kBACH,MAAK;AAAA,kBACL,aAAaD;AAAA,kBACb,iBAAiBE;AAAA,kBACjB,kBAAkBA,KAAiB,IAAIX,IAAU;AAAA,gBAAA;AAAA,cAAA;AAAA,YACnD;AAAA,UAAA;AAAA,QAAA;AAAA,QAGDN,KAAkB,CAACK,KAClB,gBAAAK,EAAC,QAAA,EAAK,WAAWD,EAAO,eAAe,eAAW,IAC/C,eAAa,IAAI,KAAK,MAAMH,CAAO,CAAC,GAAA,CACvC;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAIR,GAEaY,IAA+B,gBAAAL;AAAA,oBACvBC,CAAkB;AAAA,EACrC;AACF;"}
@@ -0,0 +1 @@
1
+ @layer ui{.ui-progress-99MrX{display:flex;align-items:center;gap:var(--hd-space-3);width:100%}.ui-progress__track-Qbp9t{position:relative;flex:1;min-width:0;border-radius:var(--hd-radius-pill);background-color:var(--hd-border);overflow:hidden}.ui-progress__track--xs-CgHUU{height:2px}.ui-progress__track--sm-dbHZq{height:4px}.ui-progress__track--md-v1GdW{height:8px}.ui-progress__track--indeterminate-8fMxl .ui-progress__fill-Bam55{inline-size:40%;animation:var(--ui-anim-progress-slide) 1.4s var(--hd-ease-standard) infinite}@media (prefers-reduced-motion: reduce){.ui-progress__track--indeterminate-8fMxl .ui-progress__fill-Bam55{animation:none;inline-size:50%}}.ui-progress__fill-Bam55{display:block;height:100%;border-radius:var(--hd-radius-pill);background-color:var(--hd-primary);transition:inline-size var(--hd-duration-base) var(--hd-ease-standard)}.ui-progress__fill--success-IFuI5{background-color:var(--hd-success-solid)}.ui-progress__fill--warning-wIhgi{background-color:var(--hd-warning-solid)}.ui-progress__fill--danger-cuqj0{background-color:var(--hd-danger-solid)}@media (prefers-reduced-motion: reduce){.ui-progress__fill-Bam55{transition:none}}@media (forced-colors: active){.ui-progress__fill-Bam55{background-color:Highlight;forced-color-adjust:none}}.ui-progress__value-3FYxj{font-family:var(--hd-font-mono);font-size:var(--hd-type-caption-size);letter-spacing:.02em;flex-shrink:0;color:var(--hd-text-2);font-variant-numeric:tabular-nums}.ui-circle-9cn2w{display:inline-flex;position:relative;flex-shrink:0}.ui-circle__svg-0IwkR{rotate:-90deg}.ui-circle__track-zY2qc{stroke:var(--hd-border)}.ui-circle__fill-Jbde6{stroke:var(--hd-primary);stroke-linecap:round;transition:stroke-dashoffset var(--hd-duration-base) var(--hd-ease-standard)}.ui-circle__fill--success-HTr0m{stroke:var(--hd-success-solid)}.ui-circle__fill--warning-Fkgj2{stroke:var(--hd-warning-solid)}.ui-circle__fill--danger-4E3Z8{stroke:var(--hd-danger-solid)}@media (prefers-reduced-motion: reduce){.ui-circle__fill-Jbde6{transition:none}}@media (forced-colors: active){.ui-circle__fill-Jbde6{stroke:Highlight;forced-color-adjust:none}}.ui-circle--indeterminate-cITY6 .ui-circle__svg-0IwkR{animation:var(--ui-anim-spin) .7s linear infinite}@media (prefers-reduced-motion: reduce){.ui-circle--indeterminate-cITY6 .ui-circle__svg-0IwkR{animation:none}}.ui-circle__label-A3nJB{font-family:var(--hd-font-mono);font-size:var(--hd-type-caption-size);letter-spacing:.02em;position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;color:var(--hd-text);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 t=require("react/jsx-runtime"),r=require("react"),h=require("../../helpers/label.helper.cjs"),p=require("../../theme/context.cjs"),D=require("../../enums/ui-size.enum.cjs"),S=require("../../enums/ui-variant.enum.cjs"),y=require("../Button/index.cjs"),w=require("../Field/index.cjs"),A=require("../Input/index.cjs"),N=require("../Modal/index.cjs"),Y=require("../Textarea/index.cjs"),k={default:{"form":"ui-form-zpZn4"}},F=({isOpen:s,onClose:u,onSubmit:I,title:M,label:_,submitLabel:L,cancelLabel:P,closeLabel:R,description:$,hint:z,placeholder:d,defaultValue:a="",isRequired:m,requiredLabel:E,inputMode:f="text",maxLength:x,rows:B=4})=>{const{labels:e}=p.useUi(),b=r.useId(),[o,c]=r.useState(a),[i,q]=r.useState(!1),g=r.useRef(!1);r.useEffect(()=>{s&&!g.current&&c(a),g.current=s},[s,a]);const j=o.trim(),v=!!m&&j==="",C=n=>f==="multiline"?t.jsx(Y.default,{...n,value:o,onChange:l=>c(l.target.value),placeholder:d,maxLength:x,rows:B}):t.jsx(A.default,{...n,type:f==="number"?"number":"text",value:o,onChange:l=>c(l.target.value),placeholder:d,maxLength:x}),U=async()=>{if(!(v||i)){q(!0);try{await I(j),u()}catch{}finally{q(!1)}}};return t.jsx(N.default,{isOpen:s,onClose:u,title:M,closeLabel:R??(e==null?void 0:e.close),description:$,size:"sm",isDismissable:!i,footer:t.jsxs(t.Fragment,{children:[t.jsx(y.default,{variant:S.default.SECONDARY,size:D.default.MEDIUM,onClick:u,disabled:i,children:h.resolveLabel("PromptDialog.cancelLabel",P,e==null?void 0:e.cancel)}),t.jsx(y.default,{type:"submit",form:b,variant:S.default.PRIMARY,size:D.default.MEDIUM,disabled:v,isLoading:i,children:h.resolveLabel("PromptDialog.submitLabel",L,e==null?void 0:e.submit)})]}),children:t.jsx("form",{id:b,className:k.default.form,onSubmit:n=>{n.preventDefault(),U()},children:t.jsx(w.default,{label:_,hint:z,isRequired:m,requiredLabel:E,children:C})})})},T=r.memo(F);exports.default=T;
2
+ //# sourceMappingURL=index.cjs.map