@handijit/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 (658) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +872 -2
  3. package/build/base.css +1 -0
  4. package/build/charts.cjs +2 -0
  5. package/build/charts.cjs.map +1 -0
  6. package/build/charts.css +1 -0
  7. package/build/charts.js +1865 -0
  8. package/build/charts.js.map +1 -0
  9. package/build/chat.cjs +4 -0
  10. package/build/chat.cjs.map +1 -0
  11. package/build/chat.css +1 -0
  12. package/build/chat.js +1120 -0
  13. package/build/chat.js.map +1 -0
  14. package/build/components/Accordion/index.cjs +2 -0
  15. package/build/components/Accordion/index.cjs.map +1 -0
  16. package/build/components/Accordion/index.d.ts +29 -0
  17. package/build/components/Accordion/index.js +42 -0
  18. package/build/components/Accordion/index.js.map +1 -0
  19. package/build/components/Accordion/style.css +1 -0
  20. package/build/components/Alert/index.cjs +2 -0
  21. package/build/components/Alert/index.cjs.map +1 -0
  22. package/build/components/Alert/index.d.ts +15 -0
  23. package/build/components/Alert/index.js +30 -0
  24. package/build/components/Alert/index.js.map +1 -0
  25. package/build/components/Alert/style.css +1 -0
  26. package/build/components/Avatar/index.cjs +2 -0
  27. package/build/components/Avatar/index.cjs.map +1 -0
  28. package/build/components/Avatar/index.d.ts +26 -0
  29. package/build/components/Avatar/index.js +57 -0
  30. package/build/components/Avatar/index.js.map +1 -0
  31. package/build/components/Avatar/style.css +1 -0
  32. package/build/components/Badge/index.cjs +2 -0
  33. package/build/components/Badge/index.cjs.map +1 -0
  34. package/build/components/Badge/index.d.ts +26 -0
  35. package/build/components/Badge/index.js +26 -0
  36. package/build/components/Badge/index.js.map +1 -0
  37. package/build/components/Badge/style.css +1 -0
  38. package/build/components/BottomSheet/index.cjs +2 -0
  39. package/build/components/BottomSheet/index.cjs.map +1 -0
  40. package/build/components/BottomSheet/index.d.ts +21 -0
  41. package/build/components/BottomSheet/index.js +85 -0
  42. package/build/components/BottomSheet/index.js.map +1 -0
  43. package/build/components/BottomSheet/style.css +1 -0
  44. package/build/components/Breadcrumb/index.cjs +2 -0
  45. package/build/components/Breadcrumb/index.cjs.map +1 -0
  46. package/build/components/Breadcrumb/index.d.ts +20 -0
  47. package/build/components/Breadcrumb/index.js +31 -0
  48. package/build/components/Breadcrumb/index.js.map +1 -0
  49. package/build/components/Breadcrumb/style.css +1 -0
  50. package/build/components/Button/index.cjs +2 -0
  51. package/build/components/Button/index.cjs.map +1 -0
  52. package/build/components/Button/index.d.ts +32 -0
  53. package/build/components/Button/index.js +88 -0
  54. package/build/components/Button/index.js.map +1 -0
  55. package/build/components/Button/style.css +1 -0
  56. package/build/components/Card/index.cjs +2 -0
  57. package/build/components/Card/index.cjs.map +1 -0
  58. package/build/components/Card/index.d.ts +51 -0
  59. package/build/components/Card/index.js +58 -0
  60. package/build/components/Card/index.js.map +1 -0
  61. package/build/components/Card/style.css +1 -0
  62. package/build/components/Carousel/index.cjs +2 -0
  63. package/build/components/Carousel/index.cjs.map +1 -0
  64. package/build/components/Carousel/index.d.ts +24 -0
  65. package/build/components/Carousel/index.js +111 -0
  66. package/build/components/Carousel/index.js.map +1 -0
  67. package/build/components/Carousel/style.css +1 -0
  68. package/build/components/Checkbox/index.cjs +2 -0
  69. package/build/components/Checkbox/index.cjs.map +1 -0
  70. package/build/components/Checkbox/index.d.ts +10 -0
  71. package/build/components/Checkbox/index.js +33 -0
  72. package/build/components/Checkbox/index.js.map +1 -0
  73. package/build/components/Checkbox/style.css +1 -0
  74. package/build/components/Chip/index.cjs +2 -0
  75. package/build/components/Chip/index.cjs.map +1 -0
  76. package/build/components/Chip/index.d.ts +27 -0
  77. package/build/components/Chip/index.js +67 -0
  78. package/build/components/Chip/index.js.map +1 -0
  79. package/build/components/Chip/style.css +1 -0
  80. package/build/components/ChipGroup/index.cjs +2 -0
  81. package/build/components/ChipGroup/index.cjs.map +1 -0
  82. package/build/components/ChipGroup/index.d.ts +34 -0
  83. package/build/components/ChipGroup/index.js +64 -0
  84. package/build/components/ChipGroup/index.js.map +1 -0
  85. package/build/components/ChipGroup/style.css +1 -0
  86. package/build/components/CodeBadge/index.cjs +2 -0
  87. package/build/components/CodeBadge/index.cjs.map +1 -0
  88. package/build/components/CodeBadge/index.d.ts +36 -0
  89. package/build/components/CodeBadge/index.js +62 -0
  90. package/build/components/CodeBadge/index.js.map +1 -0
  91. package/build/components/CodeBadge/style.css +1 -0
  92. package/build/components/Combobox/index.cjs +2 -0
  93. package/build/components/Combobox/index.cjs.map +1 -0
  94. package/build/components/Combobox/index.d.ts +6 -0
  95. package/build/components/Combobox/index.js +302 -0
  96. package/build/components/Combobox/index.js.map +1 -0
  97. package/build/components/Combobox/style.css +1 -0
  98. package/build/components/CommandPalette/index.cjs +2 -0
  99. package/build/components/CommandPalette/index.cjs.map +1 -0
  100. package/build/components/CommandPalette/index.d.ts +37 -0
  101. package/build/components/CommandPalette/index.js +181 -0
  102. package/build/components/CommandPalette/index.js.map +1 -0
  103. package/build/components/CommandPalette/style.css +1 -0
  104. package/build/components/ConfirmDialog/index.cjs +2 -0
  105. package/build/components/ConfirmDialog/index.cjs.map +1 -0
  106. package/build/components/ConfirmDialog/index.d.ts +34 -0
  107. package/build/components/ConfirmDialog/index.js +85 -0
  108. package/build/components/ConfirmDialog/index.js.map +1 -0
  109. package/build/components/CopyField/index.cjs +2 -0
  110. package/build/components/CopyField/index.cjs.map +1 -0
  111. package/build/components/CopyField/index.d.ts +20 -0
  112. package/build/components/CopyField/index.js +44 -0
  113. package/build/components/CopyField/index.js.map +1 -0
  114. package/build/components/CopyField/style.css +1 -0
  115. package/build/components/DataTable/index.cjs +2 -0
  116. package/build/components/DataTable/index.cjs.map +1 -0
  117. package/build/components/DataTable/index.d.ts +60 -0
  118. package/build/components/DataTable/index.js +109 -0
  119. package/build/components/DataTable/index.js.map +1 -0
  120. package/build/components/DataTable/style.css +1 -0
  121. package/build/components/DateField/index.cjs +2 -0
  122. package/build/components/DateField/index.cjs.map +1 -0
  123. package/build/components/DateField/index.d.ts +44 -0
  124. package/build/components/DateField/index.js +79 -0
  125. package/build/components/DateField/index.js.map +1 -0
  126. package/build/components/DateField/style.css +1 -0
  127. package/build/components/Directory/index.cjs +2 -0
  128. package/build/components/Directory/index.cjs.map +1 -0
  129. package/build/components/Directory/index.d.ts +51 -0
  130. package/build/components/Directory/index.js +46 -0
  131. package/build/components/Directory/index.js.map +1 -0
  132. package/build/components/Directory/style.css +1 -0
  133. package/build/components/Disclosure/index.cjs +2 -0
  134. package/build/components/Disclosure/index.cjs.map +1 -0
  135. package/build/components/Disclosure/index.d.ts +34 -0
  136. package/build/components/Disclosure/index.js +64 -0
  137. package/build/components/Disclosure/index.js.map +1 -0
  138. package/build/components/Disclosure/style.css +1 -0
  139. package/build/components/Divider/index.cjs +2 -0
  140. package/build/components/Divider/index.cjs.map +1 -0
  141. package/build/components/Divider/index.d.ts +10 -0
  142. package/build/components/Divider/index.js +24 -0
  143. package/build/components/Divider/index.js.map +1 -0
  144. package/build/components/Divider/style.css +1 -0
  145. package/build/components/Drawer/index.cjs +2 -0
  146. package/build/components/Drawer/index.cjs.map +1 -0
  147. package/build/components/Drawer/index.d.ts +22 -0
  148. package/build/components/Drawer/index.js +88 -0
  149. package/build/components/Drawer/index.js.map +1 -0
  150. package/build/components/Drawer/style.css +1 -0
  151. package/build/components/EmptyState/index.cjs +2 -0
  152. package/build/components/EmptyState/index.cjs.map +1 -0
  153. package/build/components/EmptyState/index.d.ts +19 -0
  154. package/build/components/EmptyState/index.js +35 -0
  155. package/build/components/EmptyState/index.js.map +1 -0
  156. package/build/components/EmptyState/style.css +1 -0
  157. package/build/components/Field/index.cjs +2 -0
  158. package/build/components/Field/index.cjs.map +1 -0
  159. package/build/components/Field/index.d.ts +31 -0
  160. package/build/components/Field/index.js +52 -0
  161. package/build/components/Field/index.js.map +1 -0
  162. package/build/components/Field/style.css +1 -0
  163. package/build/components/FileUpload/index.cjs +2 -0
  164. package/build/components/FileUpload/index.cjs.map +1 -0
  165. package/build/components/FileUpload/index.d.ts +42 -0
  166. package/build/components/FileUpload/index.js +145 -0
  167. package/build/components/FileUpload/index.js.map +1 -0
  168. package/build/components/FileUpload/style.css +1 -0
  169. package/build/components/FilterBar/index.cjs +2 -0
  170. package/build/components/FilterBar/index.cjs.map +1 -0
  171. package/build/components/FilterBar/index.d.ts +28 -0
  172. package/build/components/FilterBar/index.js +35 -0
  173. package/build/components/FilterBar/index.js.map +1 -0
  174. package/build/components/FilterBar/style.css +1 -0
  175. package/build/components/IconButton/index.cjs +2 -0
  176. package/build/components/IconButton/index.cjs.map +1 -0
  177. package/build/components/IconButton/index.d.ts +22 -0
  178. package/build/components/IconButton/index.js +61 -0
  179. package/build/components/IconButton/index.js.map +1 -0
  180. package/build/components/IconButton/style.css +1 -0
  181. package/build/components/Input/index.cjs +2 -0
  182. package/build/components/Input/index.cjs.map +1 -0
  183. package/build/components/Input/index.d.ts +15 -0
  184. package/build/components/Input/index.js +52 -0
  185. package/build/components/Input/index.js.map +1 -0
  186. package/build/components/Input/style.css +1 -0
  187. package/build/components/Kbd/index.cjs +2 -0
  188. package/build/components/Kbd/index.cjs.map +1 -0
  189. package/build/components/Kbd/index.d.ts +12 -0
  190. package/build/components/Kbd/index.js +13 -0
  191. package/build/components/Kbd/index.js.map +1 -0
  192. package/build/components/Kbd/style.css +1 -0
  193. package/build/components/Link/index.cjs +2 -0
  194. package/build/components/Link/index.cjs.map +1 -0
  195. package/build/components/Link/index.d.ts +5 -0
  196. package/build/components/Link/index.js +11 -0
  197. package/build/components/Link/index.js.map +1 -0
  198. package/build/components/Menu/index.cjs +2 -0
  199. package/build/components/Menu/index.cjs.map +1 -0
  200. package/build/components/Menu/index.d.ts +46 -0
  201. package/build/components/Menu/index.js +241 -0
  202. package/build/components/Menu/index.js.map +1 -0
  203. package/build/components/Menu/style.css +1 -0
  204. package/build/components/Modal/index.cjs +2 -0
  205. package/build/components/Modal/index.cjs.map +1 -0
  206. package/build/components/Modal/index.d.ts +28 -0
  207. package/build/components/Modal/index.js +92 -0
  208. package/build/components/Modal/index.js.map +1 -0
  209. package/build/components/Modal/style.css +1 -0
  210. package/build/components/PageHeader/index.cjs +2 -0
  211. package/build/components/PageHeader/index.cjs.map +1 -0
  212. package/build/components/PageHeader/index.d.ts +24 -0
  213. package/build/components/PageHeader/index.js +34 -0
  214. package/build/components/PageHeader/index.js.map +1 -0
  215. package/build/components/PageHeader/style.css +1 -0
  216. package/build/components/Pagination/index.cjs +2 -0
  217. package/build/components/Pagination/index.cjs.map +1 -0
  218. package/build/components/Pagination/index.d.ts +39 -0
  219. package/build/components/Pagination/index.js +128 -0
  220. package/build/components/Pagination/index.js.map +1 -0
  221. package/build/components/Pagination/style.css +1 -0
  222. package/build/components/Panel/index.cjs +2 -0
  223. package/build/components/Panel/index.cjs.map +1 -0
  224. package/build/components/Panel/index.d.ts +43 -0
  225. package/build/components/Panel/index.js +55 -0
  226. package/build/components/Panel/index.js.map +1 -0
  227. package/build/components/Panel/style.css +1 -0
  228. package/build/components/PasswordInput/index.cjs +2 -0
  229. package/build/components/PasswordInput/index.cjs.map +1 -0
  230. package/build/components/PasswordInput/index.d.ts +14 -0
  231. package/build/components/PasswordInput/index.js +40 -0
  232. package/build/components/PasswordInput/index.js.map +1 -0
  233. package/build/components/PasswordInput/style.css +1 -0
  234. package/build/components/Popover/index.cjs +2 -0
  235. package/build/components/Popover/index.cjs.map +1 -0
  236. package/build/components/Popover/index.d.ts +20 -0
  237. package/build/components/Popover/index.js +91 -0
  238. package/build/components/Popover/index.js.map +1 -0
  239. package/build/components/Popover/style.css +1 -0
  240. package/build/components/Price/index.cjs +2 -0
  241. package/build/components/Price/index.cjs.map +1 -0
  242. package/build/components/Price/index.d.ts +22 -0
  243. package/build/components/Price/index.js +46 -0
  244. package/build/components/Price/index.js.map +1 -0
  245. package/build/components/Price/style.css +1 -0
  246. package/build/components/Progress/index.cjs +2 -0
  247. package/build/components/Progress/index.cjs.map +1 -0
  248. package/build/components/Progress/index.d.ts +49 -0
  249. package/build/components/Progress/index.js +120 -0
  250. package/build/components/Progress/index.js.map +1 -0
  251. package/build/components/Progress/style.css +1 -0
  252. package/build/components/PromptDialog/index.cjs +2 -0
  253. package/build/components/PromptDialog/index.cjs.map +1 -0
  254. package/build/components/PromptDialog/index.d.ts +36 -0
  255. package/build/components/PromptDialog/index.js +119 -0
  256. package/build/components/PromptDialog/index.js.map +1 -0
  257. package/build/components/PromptDialog/style.css +1 -0
  258. package/build/components/QuantityStepper/index.cjs +2 -0
  259. package/build/components/QuantityStepper/index.cjs.map +1 -0
  260. package/build/components/QuantityStepper/index.d.ts +21 -0
  261. package/build/components/QuantityStepper/index.js +106 -0
  262. package/build/components/QuantityStepper/index.js.map +1 -0
  263. package/build/components/QuantityStepper/style.css +1 -0
  264. package/build/components/Radio/index.cjs +2 -0
  265. package/build/components/Radio/index.cjs.map +1 -0
  266. package/build/components/Radio/index.d.ts +12 -0
  267. package/build/components/Radio/index.js +35 -0
  268. package/build/components/Radio/index.js.map +1 -0
  269. package/build/components/Radio/style.css +1 -0
  270. package/build/components/RadioCard/index.cjs +2 -0
  271. package/build/components/RadioCard/index.cjs.map +1 -0
  272. package/build/components/RadioCard/index.d.ts +16 -0
  273. package/build/components/RadioCard/index.js +48 -0
  274. package/build/components/RadioCard/index.js.map +1 -0
  275. package/build/components/RadioCard/style.css +1 -0
  276. package/build/components/RangeSlider/index.cjs +2 -0
  277. package/build/components/RangeSlider/index.cjs.map +1 -0
  278. package/build/components/RangeSlider/index.d.ts +26 -0
  279. package/build/components/RangeSlider/index.js +102 -0
  280. package/build/components/RangeSlider/index.js.map +1 -0
  281. package/build/components/RangeSlider/style.css +1 -0
  282. package/build/components/Rating/index.cjs +2 -0
  283. package/build/components/Rating/index.cjs.map +1 -0
  284. package/build/components/Rating/index.d.ts +16 -0
  285. package/build/components/Rating/index.js +29 -0
  286. package/build/components/Rating/index.js.map +1 -0
  287. package/build/components/Rating/style.css +1 -0
  288. package/build/components/RatingInput/index.cjs +2 -0
  289. package/build/components/RatingInput/index.cjs.map +1 -0
  290. package/build/components/RatingInput/index.d.ts +21 -0
  291. package/build/components/RatingInput/index.js +75 -0
  292. package/build/components/RatingInput/index.js.map +1 -0
  293. package/build/components/RatingInput/style.css +1 -0
  294. package/build/components/ScrollArea/index.cjs +2 -0
  295. package/build/components/ScrollArea/index.cjs.map +1 -0
  296. package/build/components/ScrollArea/index.d.ts +23 -0
  297. package/build/components/ScrollArea/index.js +65 -0
  298. package/build/components/ScrollArea/index.js.map +1 -0
  299. package/build/components/ScrollArea/style.css +1 -0
  300. package/build/components/SectionHeader/index.cjs +2 -0
  301. package/build/components/SectionHeader/index.cjs.map +1 -0
  302. package/build/components/SectionHeader/index.d.ts +17 -0
  303. package/build/components/SectionHeader/index.js +25 -0
  304. package/build/components/SectionHeader/index.js.map +1 -0
  305. package/build/components/SectionHeader/style.css +1 -0
  306. package/build/components/SegmentedControl/index.cjs +2 -0
  307. package/build/components/SegmentedControl/index.cjs.map +1 -0
  308. package/build/components/SegmentedControl/index.d.ts +24 -0
  309. package/build/components/SegmentedControl/index.js +69 -0
  310. package/build/components/SegmentedControl/index.js.map +1 -0
  311. package/build/components/SegmentedControl/style.css +1 -0
  312. package/build/components/Select/index.cjs +2 -0
  313. package/build/components/Select/index.cjs.map +1 -0
  314. package/build/components/Select/index.d.ts +39 -0
  315. package/build/components/Select/index.js +179 -0
  316. package/build/components/Select/index.js.map +1 -0
  317. package/build/components/Select/style.css +1 -0
  318. package/build/components/Skeleton/index.cjs +2 -0
  319. package/build/components/Skeleton/index.cjs.map +1 -0
  320. package/build/components/Skeleton/index.d.ts +25 -0
  321. package/build/components/Skeleton/index.js +50 -0
  322. package/build/components/Skeleton/index.js.map +1 -0
  323. package/build/components/Skeleton/style.css +1 -0
  324. package/build/components/Spinner/index.cjs +2 -0
  325. package/build/components/Spinner/index.cjs.map +1 -0
  326. package/build/components/Spinner/index.d.ts +11 -0
  327. package/build/components/Spinner/index.js +15 -0
  328. package/build/components/Spinner/index.js.map +1 -0
  329. package/build/components/Spinner/style.css +1 -0
  330. package/build/components/Stat/index.cjs +2 -0
  331. package/build/components/Stat/index.cjs.map +1 -0
  332. package/build/components/Stat/index.d.ts +34 -0
  333. package/build/components/Stat/index.js +72 -0
  334. package/build/components/Stat/index.js.map +1 -0
  335. package/build/components/Stat/style.css +1 -0
  336. package/build/components/StatusDot/index.cjs +2 -0
  337. package/build/components/StatusDot/index.cjs.map +1 -0
  338. package/build/components/StatusDot/index.d.ts +23 -0
  339. package/build/components/StatusDot/index.js +23 -0
  340. package/build/components/StatusDot/index.js.map +1 -0
  341. package/build/components/StatusDot/style.css +1 -0
  342. package/build/components/Steps/index.cjs +2 -0
  343. package/build/components/Steps/index.cjs.map +1 -0
  344. package/build/components/Steps/index.d.ts +23 -0
  345. package/build/components/Steps/index.js +69 -0
  346. package/build/components/Steps/index.js.map +1 -0
  347. package/build/components/Steps/style.css +1 -0
  348. package/build/components/SummaryCard/index.cjs +2 -0
  349. package/build/components/SummaryCard/index.cjs.map +1 -0
  350. package/build/components/SummaryCard/index.d.ts +24 -0
  351. package/build/components/SummaryCard/index.js +33 -0
  352. package/build/components/SummaryCard/index.js.map +1 -0
  353. package/build/components/SummaryCard/style.css +1 -0
  354. package/build/components/Switch/index.cjs +2 -0
  355. package/build/components/Switch/index.cjs.map +1 -0
  356. package/build/components/Switch/index.d.ts +16 -0
  357. package/build/components/Switch/index.js +42 -0
  358. package/build/components/Switch/index.js.map +1 -0
  359. package/build/components/Switch/style.css +1 -0
  360. package/build/components/Table/index.cjs +2 -0
  361. package/build/components/Table/index.cjs.map +1 -0
  362. package/build/components/Table/index.d.ts +28 -0
  363. package/build/components/Table/index.js +58 -0
  364. package/build/components/Table/index.js.map +1 -0
  365. package/build/components/Table/style.css +1 -0
  366. package/build/components/TableCheckbox/index.cjs +2 -0
  367. package/build/components/TableCheckbox/index.cjs.map +1 -0
  368. package/build/components/TableCheckbox/index.d.ts +15 -0
  369. package/build/components/TableCheckbox/index.js +31 -0
  370. package/build/components/TableCheckbox/index.js.map +1 -0
  371. package/build/components/TableCheckbox/style.css +1 -0
  372. package/build/components/Tabs/index.cjs +2 -0
  373. package/build/components/Tabs/index.cjs.map +1 -0
  374. package/build/components/Tabs/index.d.ts +27 -0
  375. package/build/components/Tabs/index.js +102 -0
  376. package/build/components/Tabs/index.js.map +1 -0
  377. package/build/components/Tabs/style.css +1 -0
  378. package/build/components/TagInput/index.cjs +2 -0
  379. package/build/components/TagInput/index.cjs.map +1 -0
  380. package/build/components/TagInput/index.d.ts +25 -0
  381. package/build/components/TagInput/index.js +124 -0
  382. package/build/components/TagInput/index.js.map +1 -0
  383. package/build/components/TagInput/style.css +1 -0
  384. package/build/components/TextLink/index.cjs +2 -0
  385. package/build/components/TextLink/index.cjs.map +1 -0
  386. package/build/components/TextLink/index.d.ts +16 -0
  387. package/build/components/TextLink/index.js +32 -0
  388. package/build/components/TextLink/index.js.map +1 -0
  389. package/build/components/TextLink/style.css +1 -0
  390. package/build/components/Textarea/index.cjs +2 -0
  391. package/build/components/Textarea/index.cjs.map +1 -0
  392. package/build/components/Textarea/index.d.ts +20 -0
  393. package/build/components/Textarea/index.js +68 -0
  394. package/build/components/Textarea/index.js.map +1 -0
  395. package/build/components/Textarea/style.css +1 -0
  396. package/build/components/Tile/index.cjs +2 -0
  397. package/build/components/Tile/index.cjs.map +1 -0
  398. package/build/components/Tile/index.d.ts +19 -0
  399. package/build/components/Tile/index.js +24 -0
  400. package/build/components/Tile/index.js.map +1 -0
  401. package/build/components/Tile/style.css +1 -0
  402. package/build/components/Timeline/index.cjs +2 -0
  403. package/build/components/Timeline/index.cjs.map +1 -0
  404. package/build/components/Timeline/index.d.ts +24 -0
  405. package/build/components/Timeline/index.js +56 -0
  406. package/build/components/Timeline/index.js.map +1 -0
  407. package/build/components/Timeline/style.css +1 -0
  408. package/build/components/Toast/index.cjs +2 -0
  409. package/build/components/Toast/index.cjs.map +1 -0
  410. package/build/components/Toast/index.d.ts +43 -0
  411. package/build/components/Toast/index.js +136 -0
  412. package/build/components/Toast/index.js.map +1 -0
  413. package/build/components/Toast/style.css +1 -0
  414. package/build/components/ToastPortal/index.cjs +2 -0
  415. package/build/components/ToastPortal/index.cjs.map +1 -0
  416. package/build/components/ToastPortal/index.d.ts +8 -0
  417. package/build/components/ToastPortal/index.js +15 -0
  418. package/build/components/ToastPortal/index.js.map +1 -0
  419. package/build/components/Tooltip/index.cjs +2 -0
  420. package/build/components/Tooltip/index.cjs.map +1 -0
  421. package/build/components/Tooltip/index.d.ts +23 -0
  422. package/build/components/Tooltip/index.js +116 -0
  423. package/build/components/Tooltip/index.js.map +1 -0
  424. package/build/components/Tooltip/style.css +1 -0
  425. package/build/constants/breakpoint.constants.cjs +2 -0
  426. package/build/constants/breakpoint.constants.cjs.map +1 -0
  427. package/build/constants/breakpoint.constants.d.ts +8 -0
  428. package/build/constants/breakpoint.constants.js +9 -0
  429. package/build/constants/breakpoint.constants.js.map +1 -0
  430. package/build/constants/combobox.constants.cjs +2 -0
  431. package/build/constants/combobox.constants.cjs.map +1 -0
  432. package/build/constants/combobox.constants.d.ts +11 -0
  433. package/build/constants/combobox.constants.js +7 -0
  434. package/build/constants/combobox.constants.js.map +1 -0
  435. package/build/constants/scroll.constants.cjs +2 -0
  436. package/build/constants/scroll.constants.cjs.map +1 -0
  437. package/build/constants/scroll.constants.d.ts +7 -0
  438. package/build/constants/scroll.constants.js +5 -0
  439. package/build/constants/scroll.constants.js.map +1 -0
  440. package/build/enums/ui-size.enum.cjs +2 -0
  441. package/build/enums/ui-size.enum.cjs.map +1 -0
  442. package/build/enums/ui-size.enum.d.ts +9 -0
  443. package/build/enums/ui-size.enum.js +5 -0
  444. package/build/enums/ui-size.enum.js.map +1 -0
  445. package/build/enums/ui-variant.enum.cjs +2 -0
  446. package/build/enums/ui-variant.enum.cjs.map +1 -0
  447. package/build/enums/ui-variant.enum.d.ts +20 -0
  448. package/build/enums/ui-variant.enum.js +5 -0
  449. package/build/enums/ui-variant.enum.js.map +1 -0
  450. package/build/helpers/class-name.helper.cjs +2 -0
  451. package/build/helpers/class-name.helper.cjs.map +1 -0
  452. package/build/helpers/class-name.helper.d.ts +3 -0
  453. package/build/helpers/class-name.helper.js +10 -0
  454. package/build/helpers/class-name.helper.js.map +1 -0
  455. package/build/helpers/component.helper.cjs +2 -0
  456. package/build/helpers/component.helper.cjs.map +1 -0
  457. package/build/helpers/component.helper.d.ts +13 -0
  458. package/build/helpers/component.helper.js +5 -0
  459. package/build/helpers/component.helper.js.map +1 -0
  460. package/build/helpers/focus.helper.cjs +2 -0
  461. package/build/helpers/focus.helper.cjs.map +1 -0
  462. package/build/helpers/focus.helper.d.ts +42 -0
  463. package/build/helpers/focus.helper.js +65 -0
  464. package/build/helpers/focus.helper.js.map +1 -0
  465. package/build/helpers/label.helper.cjs +2 -0
  466. package/build/helpers/label.helper.cjs.map +1 -0
  467. package/build/helpers/label.helper.d.ts +11 -0
  468. package/build/helpers/label.helper.js +11 -0
  469. package/build/helpers/label.helper.js.map +1 -0
  470. package/build/helpers/portal.helper.cjs +2 -0
  471. package/build/helpers/portal.helper.cjs.map +1 -0
  472. package/build/helpers/portal.helper.d.ts +28 -0
  473. package/build/helpers/portal.helper.js +36 -0
  474. package/build/helpers/portal.helper.js.map +1 -0
  475. package/build/helpers/scroll.helper.cjs +2 -0
  476. package/build/helpers/scroll.helper.cjs.map +1 -0
  477. package/build/helpers/scroll.helper.d.ts +8 -0
  478. package/build/helpers/scroll.helper.js +11 -0
  479. package/build/helpers/scroll.helper.js.map +1 -0
  480. package/build/helpers/text.helper.cjs +2 -0
  481. package/build/helpers/text.helper.cjs.map +1 -0
  482. package/build/helpers/text.helper.d.ts +5 -0
  483. package/build/helpers/text.helper.js +6 -0
  484. package/build/helpers/text.helper.js.map +1 -0
  485. package/build/helpers/theme.helper.cjs +24 -0
  486. package/build/helpers/theme.helper.cjs.map +1 -0
  487. package/build/helpers/theme.helper.d.ts +49 -0
  488. package/build/helpers/theme.helper.js +75 -0
  489. package/build/helpers/theme.helper.js.map +1 -0
  490. package/build/hooks/useAnnounce.cjs +2 -0
  491. package/build/hooks/useAnnounce.cjs.map +1 -0
  492. package/build/hooks/useAnnounce.d.ts +4 -0
  493. package/build/hooks/useAnnounce.js +23 -0
  494. package/build/hooks/useAnnounce.js.map +1 -0
  495. package/build/hooks/useAsyncSearch.cjs +2 -0
  496. package/build/hooks/useAsyncSearch.cjs.map +1 -0
  497. package/build/hooks/useAsyncSearch.d.ts +11 -0
  498. package/build/hooks/useAsyncSearch.js +17 -0
  499. package/build/hooks/useAsyncSearch.js.map +1 -0
  500. package/build/hooks/useCopyFeedback.cjs +2 -0
  501. package/build/hooks/useCopyFeedback.cjs.map +1 -0
  502. package/build/hooks/useCopyFeedback.d.ts +10 -0
  503. package/build/hooks/useCopyFeedback.js +25 -0
  504. package/build/hooks/useCopyFeedback.js.map +1 -0
  505. package/build/hooks/useDismissOnEscape.cjs +2 -0
  506. package/build/hooks/useDismissOnEscape.cjs.map +1 -0
  507. package/build/hooks/useDismissOnEscape.d.ts +12 -0
  508. package/build/hooks/useDismissOnEscape.js +18 -0
  509. package/build/hooks/useDismissOnEscape.js.map +1 -0
  510. package/build/hooks/useListboxNavigation.cjs +2 -0
  511. package/build/hooks/useListboxNavigation.cjs.map +1 -0
  512. package/build/hooks/useListboxNavigation.d.ts +7 -0
  513. package/build/hooks/useListboxNavigation.js +53 -0
  514. package/build/hooks/useListboxNavigation.js.map +1 -0
  515. package/build/hooks/usePortalSurface.cjs +2 -0
  516. package/build/hooks/usePortalSurface.cjs.map +1 -0
  517. package/build/hooks/usePortalSurface.d.ts +25 -0
  518. package/build/hooks/usePortalSurface.js +19 -0
  519. package/build/hooks/usePortalSurface.js.map +1 -0
  520. package/build/hooks/usePositioning.cjs +2 -0
  521. package/build/hooks/usePositioning.cjs.map +1 -0
  522. package/build/hooks/usePositioning.d.ts +13 -0
  523. package/build/hooks/usePositioning.js +74 -0
  524. package/build/hooks/usePositioning.js.map +1 -0
  525. package/build/hooks/useScrollLock.cjs +2 -0
  526. package/build/hooks/useScrollLock.cjs.map +1 -0
  527. package/build/hooks/useScrollLock.d.ts +2 -0
  528. package/build/hooks/useScrollLock.js +34 -0
  529. package/build/hooks/useScrollLock.js.map +1 -0
  530. package/build/hooks/useSheetViewport.cjs +2 -0
  531. package/build/hooks/useSheetViewport.cjs.map +1 -0
  532. package/build/hooks/useSheetViewport.d.ts +6 -0
  533. package/build/hooks/useSheetViewport.js +29 -0
  534. package/build/hooks/useSheetViewport.js.map +1 -0
  535. package/build/hooks/useStickToBottom.cjs +2 -0
  536. package/build/hooks/useStickToBottom.cjs.map +1 -0
  537. package/build/hooks/useStickToBottom.d.ts +12 -0
  538. package/build/hooks/useStickToBottom.js +39 -0
  539. package/build/hooks/useStickToBottom.js.map +1 -0
  540. package/build/hooks/useUiTheme.cjs +2 -0
  541. package/build/hooks/useUiTheme.cjs.map +1 -0
  542. package/build/hooks/useUiTheme.d.ts +7 -0
  543. package/build/hooks/useUiTheme.js +36 -0
  544. package/build/hooks/useUiTheme.js.map +1 -0
  545. package/build/hooks/useUiTokens.cjs +2 -0
  546. package/build/hooks/useUiTokens.cjs.map +1 -0
  547. package/build/hooks/useUiTokens.d.ts +11 -0
  548. package/build/hooks/useUiTokens.js +39 -0
  549. package/build/hooks/useUiTokens.js.map +1 -0
  550. package/build/hooks/useVirtualList.cjs +2 -0
  551. package/build/hooks/useVirtualList.cjs.map +1 -0
  552. package/build/hooks/useVirtualList.d.ts +13 -0
  553. package/build/hooks/useVirtualList.js +41 -0
  554. package/build/hooks/useVirtualList.js.map +1 -0
  555. package/build/index.cjs +2 -0
  556. package/build/index.cjs.map +1 -0
  557. package/build/index.d.ts +95 -0
  558. package/build/index.js +207 -0
  559. package/build/index.js.map +1 -0
  560. package/build/scss/_colors.generated.scss +119 -0
  561. package/build/scss/_index.scss +6 -0
  562. package/build/scss/_metrics.generated.scss +49 -0
  563. package/build/scss/_mixins.scss +710 -0
  564. package/build/scss/_variables.scss +51 -0
  565. package/build/styles/base.d.ts +0 -0
  566. package/build/styles.css +133 -0
  567. package/build/theme/UiProvider.cjs +2 -0
  568. package/build/theme/UiProvider.cjs.map +1 -0
  569. package/build/theme/UiProvider.d.ts +22 -0
  570. package/build/theme/UiProvider.js +30 -0
  571. package/build/theme/UiProvider.js.map +1 -0
  572. package/build/theme/UiThemeScript.cjs +2 -0
  573. package/build/theme/UiThemeScript.cjs.map +1 -0
  574. package/build/theme/UiThemeScript.d.ts +19 -0
  575. package/build/theme/UiThemeScript.js +8 -0
  576. package/build/theme/UiThemeScript.js.map +1 -0
  577. package/build/theme/context.cjs +2 -0
  578. package/build/theme/context.cjs.map +1 -0
  579. package/build/theme/context.d.ts +5 -0
  580. package/build/theme/context.js +8 -0
  581. package/build/theme/context.js.map +1 -0
  582. package/build/theme/initUi.cjs +2 -0
  583. package/build/theme/initUi.cjs.map +1 -0
  584. package/build/theme/initUi.d.ts +7 -0
  585. package/build/theme/initUi.js +10 -0
  586. package/build/theme/initUi.js.map +1 -0
  587. package/build/theme/palette.cjs +2 -0
  588. package/build/theme/palette.cjs.map +1 -0
  589. package/build/theme/palette.d.ts +219 -0
  590. package/build/theme/palette.js +148 -0
  591. package/build/theme/palette.js.map +1 -0
  592. package/build/theme/tokens.cjs +2 -0
  593. package/build/theme/tokens.cjs.map +1 -0
  594. package/build/theme/tokens.d.ts +225 -0
  595. package/build/theme/tokens.js +384 -0
  596. package/build/theme/tokens.js.map +1 -0
  597. package/build/types/charts/AreaChart/index.d.ts +14 -0
  598. package/build/types/charts/BarChart/index.d.ts +16 -0
  599. package/build/types/charts/BoxPlot/index.d.ts +43 -0
  600. package/build/types/charts/ComposedChart/index.d.ts +16 -0
  601. package/build/types/charts/Heatmap/index.d.ts +30 -0
  602. package/build/types/charts/Histogram/index.d.ts +29 -0
  603. package/build/types/charts/LineChart/index.d.ts +14 -0
  604. package/build/types/charts/PieChart/index.d.ts +36 -0
  605. package/build/types/charts/RadarChart/index.d.ts +40 -0
  606. package/build/types/charts/ScatterPlot/index.d.ts +41 -0
  607. package/build/types/charts/core/CartesianChart.d.ts +43 -0
  608. package/build/types/charts/core/ChartFrame.d.ts +55 -0
  609. package/build/types/charts/core/axes.d.ts +37 -0
  610. package/build/types/charts/core/cartesian.d.ts +80 -0
  611. package/build/types/charts/core/format.d.ts +19 -0
  612. package/build/types/charts/core/margins.d.ts +9 -0
  613. package/build/types/charts/core/palette.d.ts +13 -0
  614. package/build/types/charts/core/path.d.ts +24 -0
  615. package/build/types/charts/core/scale.d.ts +40 -0
  616. package/build/types/charts/core/series.d.ts +11 -0
  617. package/build/types/charts/core/spatial.d.ts +12 -0
  618. package/build/types/charts/core/stats.d.ts +34 -0
  619. package/build/types/charts/core/types.d.ts +31 -0
  620. package/build/types/charts/core/useChartWidth.d.ts +7 -0
  621. package/build/types/charts/index.d.ts +21 -0
  622. package/build/types/chat/ActionList/index.d.ts +46 -0
  623. package/build/types/chat/AppBar/index.d.ts +21 -0
  624. package/build/types/chat/ChatMessage/index.d.ts +24 -0
  625. package/build/types/chat/ChatThread/index.d.ts +24 -0
  626. package/build/types/chat/Citation/index.d.ts +15 -0
  627. package/build/types/chat/CodeBlock/format.d.ts +7 -0
  628. package/build/types/chat/CodeBlock/grammars.d.ts +44 -0
  629. package/build/types/chat/CodeBlock/highlight.d.ts +22 -0
  630. package/build/types/chat/CodeBlock/index.d.ts +33 -0
  631. package/build/types/chat/DescriptionList/index.d.ts +16 -0
  632. package/build/types/chat/Legend/index.d.ts +20 -0
  633. package/build/types/chat/MessageActions/index.d.ts +21 -0
  634. package/build/types/chat/PromptInput/index.d.ts +47 -0
  635. package/build/types/chat/PromptSuggestions/index.d.ts +25 -0
  636. package/build/types/chat/Prose/index.d.ts +15 -0
  637. package/build/types/chat/ReasoningBlock/index.d.ts +24 -0
  638. package/build/types/chat/ReasoningText/index.d.ts +14 -0
  639. package/build/types/chat/SegmentBar/index.d.ts +46 -0
  640. package/build/types/chat/SourceList/index.d.ts +25 -0
  641. package/build/types/chat/TerminalOutput/index.d.ts +25 -0
  642. package/build/types/chat/ToolCall/index.d.ts +41 -0
  643. package/build/types/chat/index.d.ts +26 -0
  644. package/build/types/combobox.type.d.ts +49 -0
  645. package/build/types/common-element-props.type.d.ts +8 -0
  646. package/build/types/helpers/class-name.helper.d.ts +3 -0
  647. package/build/types/helpers/component.helper.d.ts +13 -0
  648. package/build/types/helpers/label.helper.d.ts +12 -0
  649. package/build/types/hook.type.d.ts +36 -0
  650. package/build/types/link.type.d.ts +14 -0
  651. package/build/types/positioning.type.d.ts +38 -0
  652. package/build/types/theme/palette.d.ts +219 -0
  653. package/build/types/theme/tokens.d.ts +225 -0
  654. package/build/types/theme.type.d.ts +223 -0
  655. package/build/types/types/common-element-props.type.d.ts +8 -0
  656. package/build/types/types/link.type.d.ts +14 -0
  657. package/build/types/types/theme.type.d.ts +223 -0
  658. package/package.json +487 -4
@@ -0,0 +1,109 @@
1
+ "use client";
2
+ import { jsxs as s, jsx as r, Fragment as S } from "react/jsx-runtime";
3
+ import { memo as w, Children as C } from "react";
4
+ import { ExclamationCircleFill as v } from "react-bootstrap-icons";
5
+ import { cx as i } from "../../helpers/class-name.helper.js";
6
+ import { named as R } from "../../helpers/component.helper.js";
7
+ import { resolveLabel as y } from "../../helpers/label.helper.js";
8
+ import { useUi as j } from "../../theme/context.js";
9
+ const e = {"wrapper":"ui-wrapper-KXCZg","wrapper--capped":"ui-wrapper--capped-M2QUJ","table":"ui-table-LF5Ow","state":"ui-state-YPPb0","state--error":"ui-state--error-A492d","state__message":"ui-state__message-wwbIW","row--warning":"ui-row--warning-BAUN2","srOnly":"ui-srOnly-Oia8c","sort":"ui-sort-3Q6Fx","sort__arrow":"ui-sort__arrow-MITWb","sort__arrow--ascending":"ui-sort__arrow--ascending-85T5d","sort__arrow--descending":"ui-sort__arrow--descending-gs3VU","sticky":"ui-sticky-KDEvQ","bulkBar":"ui-bulkBar-62qk0"};
10
+ const F = ({
11
+ columns: l,
12
+ label: o,
13
+ children: d,
14
+ isLoading: p,
15
+ error: m,
16
+ emptyMessage: f,
17
+ loadingMessage: x,
18
+ hasViewportCap: T,
19
+ onSort: n,
20
+ bulkBar: b,
21
+ className: D,
22
+ testId: _
23
+ }) => {
24
+ var g, N;
25
+ const { labels: t } = j(), k = C.count(d), h = (a, c) => /* @__PURE__ */ r("tr", { children: /* @__PURE__ */ r(
26
+ "td",
27
+ {
28
+ colSpan: l.length,
29
+ className: i(e.state, c && e[`state--${c}`]),
30
+ children: a
31
+ }
32
+ ) });
33
+ return /* @__PURE__ */ s(
34
+ "div",
35
+ {
36
+ className: i(e.wrapper, T && e["wrapper--capped"], D),
37
+ "data-testid": _,
38
+ children: [
39
+ b && /* @__PURE__ */ r("div", { className: e.bulkBar, children: b }),
40
+ /* @__PURE__ */ s("table", { className: e.table, "aria-label": o, children: [
41
+ /* @__PURE__ */ r("thead", { children: /* @__PURE__ */ r("tr", { children: l.map((a) => {
42
+ const c = !!(a.isSortable && n), L = a.ariaSort === "ascending" ? "descending" : "ascending";
43
+ return /* @__PURE__ */ r(
44
+ "th",
45
+ {
46
+ scope: "col",
47
+ "aria-sort": a.ariaSort,
48
+ className: i(a.className, a.isSticky && e.sticky),
49
+ children: c ? (
50
+ /* Siralama bir DUGME, ` `ye yazilan `onClick` degil. */
51
+ /* @__PURE__ */ s(
52
+ "button",
53
+ {
54
+ type: "button",
55
+ className: e.sort,
56
+ onClick: () => n == null ? void 0 : n(a.key, L),
57
+ children: [
58
+ a.label,
59
+ a.srLabel && /* @__PURE__ */ r("span", { className: e.srOnly, children: a.srLabel }),
60
+ /* @__PURE__ */ r(
61
+ "span",
62
+ {
63
+ "aria-hidden": !0,
64
+ className: i(
65
+ e.sort__arrow,
66
+ a.ariaSort && e[`sort__arrow--${a.ariaSort}`]
67
+ ),
68
+ children: a.ariaSort === "descending" ? "▾" : "▴"
69
+ }
70
+ )
71
+ ]
72
+ }
73
+ )
74
+ ) : /* @__PURE__ */ s(S, { children: [
75
+ a.label,
76
+ a.srLabel && /* @__PURE__ */ r("span", { className: e.srOnly, children: a.srLabel })
77
+ ] })
78
+ },
79
+ a.key
80
+ );
81
+ }) }) }),
82
+ /* @__PURE__ */ r("tbody", { children: m ? h(
83
+ /* @__PURE__ */ s("span", { role: "alert", className: e.state__message, children: [
84
+ /* @__PURE__ */ r(v, { "aria-hidden": !0 }),
85
+ m
86
+ ] }),
87
+ "error"
88
+ ) : p ? h(
89
+ y(
90
+ "DataTable.loadingMessage",
91
+ x,
92
+ (g = t == null ? void 0 : t.dataTable) == null ? void 0 : g.loading
93
+ )
94
+ ) : k === 0 ? h(
95
+ y("DataTable.emptyMessage", f, (N = t == null ? void 0 : t.dataTable) == null ? void 0 : N.empty)
96
+ ) : d })
97
+ ] })
98
+ ]
99
+ }
100
+ );
101
+ }, A = /* @__PURE__ */ R(
102
+ /* @__PURE__ */ w(({ isWarning: l, className: o, children: d, ...p }) => /* @__PURE__ */ r("tr", { className: i(l && e["row--warning"], o), ...p, children: d })),
103
+ "DataTableRow"
104
+ ), G = /* @__PURE__ */ w(F);
105
+ export {
106
+ A as DataTableRow,
107
+ G as default
108
+ };
109
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/DataTable/index.tsx"],"sourcesContent":["'use client';\n\nimport { Children, type FC, type HTMLAttributes, memo, type ReactNode } from 'react';\n\nimport { ExclamationCircleFill } from 'react-bootstrap-icons';\n\nimport { cx } from '../../helpers/class-name.helper';\nimport { named } from '../../helpers/component.helper';\nimport { resolveLabel } from '../../helpers/label.helper';\nimport { useUi } from '../../theme/context';\n\nimport styles from './index.module.scss';\n\nexport type DataTableColumn = {\n /** Sütun kimliği (React key). */\n key: string;\n /** Başlık hücresinin içeriği. */\n label?: ReactNode;\n /** Görsel başlığı olmayan sütunun erişilebilir adı (eylem sütunu gibi). */\n srLabel?: string;\n /** Sıralanabilir sütunun yönü (`aria-sort`). */\n ariaSort?: 'ascending' | 'descending';\n /**\n * Sütun sıralanabilir. `DataTable.onSort` ile birlikte anlamlı; ikisinden biri eksikse başlık düz\n * metin kalır\n */\n isSortable?: boolean;\n /** Sütun yatay kaydırmada YERİNDE kalır. */\n isSticky?: boolean;\n className?: string;\n};\n\ntype Props = {\n columns: DataTableColumn[];\n /**\n * Tablonun erişilebilir adı (\"Bekleyen siparişler\").\n * ⚠ ADSIZ TABLO EKRAN OKUYUCUDA YALNIZCA \"tablo\" DİYE OKUNUR.\n */\n label?: string;\n /**\n * Gövde satırları (` `). Ekranların özel hücreleri, bağlantıları ve satır tintleri burada yaşar;\n * tablo yalnızca kabuğu ve durum satırlarını üstlenir.\n */\n children?: ReactNode;\n /** Satır yokken gösterilen metin. */\n emptyMessage?: string;\n /** Yükleme sürerken gösterilen metin. */\n loadingMessage?: string;\n isLoading?: boolean;\n /**\n * Liste ÇEKİLEMEDİ. \"Yüklenemedi\" ile \"boş\" ayrı durumlardır: hata verilmişken boş mesajı asla\n * çizilmez\n */\n error?: string | null;\n /** Gövde `100dvh - <bant>` ile sınırlanır ve başlık satırı kendi kaydırma alanına yapışır. */\n hasViewportCap?: boolean;\n /** Sıralanabilir bir başlığa basıldığında çağrılır. */\n onSort?: (key: string, direction: 'ascending' | 'descending') => void;\n /** Satır seçildiğinde beliren TOPLU EYLEM şeridi. */\n bulkBar?: ReactNode;\n className?: string;\n testId?: string;\n};\n\n/** Operasyon veri tablosu — durum satırlı tablo sözleşmesi. */\nconst DataTable: FC<Props> = ({\n columns,\n label,\n children,\n isLoading,\n error,\n emptyMessage,\n loadingMessage,\n hasViewportCap,\n onSort,\n bulkBar,\n className,\n testId,\n}) => {\n /* Bosluk karari satir SAYISINDAN verilir; cagiranin ayrica `isEmpty` gecmesi gerekmez. */\n const { labels } = useUi();\n const rowCount = Children.count(children);\n\n const renderStateRow = (content: ReactNode, modifier?: 'error') => (\n <tr>\n <td\n colSpan={columns.length}\n className={cx(styles.state, modifier && styles[`state--${modifier}`])}\n >\n {content}\n </td>\n </tr>\n );\n\n return (\n <div\n className={cx(styles.wrapper, hasViewportCap && styles['wrapper--capped'], className)}\n data-testid={testId}\n >\n {bulkBar && <div className={styles.bulkBar}>{bulkBar}</div>}\n\n <table className={styles.table} aria-label={label}>\n <thead>\n <tr>\n {columns.map(column => {\n const isSortable = Boolean(column.isSortable && onSort);\n /* Ilk tikta ARTAN; ikinci tik yonu cevirir. */\n const nextDirection = column.ariaSort === 'ascending' ? 'descending' : 'ascending';\n\n return (\n <th\n key={column.key}\n scope=\"col\"\n aria-sort={column.ariaSort}\n className={cx(column.className, column.isSticky && styles.sticky)}\n >\n {isSortable ? (\n /* Siralama bir DUGME, ` `ye yazilan `onClick` degil. */\n <button\n type=\"button\"\n className={styles.sort}\n onClick={() => onSort?.(column.key, nextDirection)}\n >\n {column.label}\n {column.srLabel && <span className={styles.srOnly}>{column.srLabel}</span>}\n\n {/*\n Yon oku: `aria-hidden` cunku ayni bilgi `aria-sort`ta.\n Siralanabilir ama siralanmamis sutunda SOLUK bir cift\n ok duruyor — sutunun siralanabildigi ancak uzerine\n gelince anlasiliyordu.\n */}\n <span\n aria-hidden\n className={cx(\n styles.sort__arrow,\n column.ariaSort && styles[`sort__arrow--${column.ariaSort}`],\n )}\n >\n {column.ariaSort === 'descending' ? '▾' : '▴'}\n </span>\n </button>\n ) : (\n <>\n {column.label}\n {column.srLabel && <span className={styles.srOnly}>{column.srLabel}</span>}\n </>\n )}\n </th>\n );\n })}\n </tr>\n </thead>\n <tbody>\n {error\n ? renderStateRow(\n <span role=\"alert\" className={styles.state__message}>\n <ExclamationCircleFill aria-hidden />\n {error}\n </span>,\n 'error',\n )\n : isLoading\n ? renderStateRow(\n resolveLabel(\n 'DataTable.loadingMessage',\n loadingMessage,\n labels?.dataTable?.loading,\n ),\n )\n : rowCount === 0\n ? renderStateRow(\n resolveLabel('DataTable.emptyMessage', emptyMessage, labels?.dataTable?.empty),\n )\n : children}\n </tbody>\n </table>\n </div>\n );\n};\n\ntype RowProps = HTMLAttributes<HTMLTableRowElement> & {\n children: ReactNode;\n /** Satır dikkat bekleyen iş taşıyor (kritik stok, karar bekleyen talep). */\n isWarning?: boolean;\n};\n\nexport const DataTableRow: FC<RowProps> = /*#__PURE__*/ named(\n /*#__PURE__*/ memo(({ isWarning, className, children, ...rest }) => (\n <tr className={cx(isWarning && styles['row--warning'], className)} {...rest}>\n {children}\n </tr>\n )),\n 'DataTableRow',\n);\n\nexport default /*#__PURE__*/ memo(DataTable) as typeof DataTable;\n"],"names":["DataTable","columns","label","children","isLoading","error","emptyMessage","loadingMessage","hasViewportCap","onSort","bulkBar","className","testId","labels","useUi","rowCount","Children","renderStateRow","content","modifier","jsx","cx","styles","jsxs","column","isSortable","nextDirection","Fragment","ExclamationCircleFill","resolveLabel","_a","_b","DataTableRow","named","memo","isWarning","rest","index"],"mappings":";;;;;;;;;AAgEA,MAAMA,IAAuB,CAAC;AAAA,EAC5B,SAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,OAAAC;AAAA,EACA,cAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,QAAAC;AAAA,EACA,SAAAC;AAAA,EACA,WAAAC;AAAA,EACA,QAAAC;AACF,MAAM;;AAEJ,QAAM,EAAE,QAAAC,EAAA,IAAWC,EAAA,GACbC,IAAWC,EAAS,MAAMb,CAAQ,GAElCc,IAAiB,CAACC,GAAoBC,wBACzC,MAAA,EACC,UAAA,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,SAASnB,EAAQ;AAAA,MACjB,WAAWoB,EAAGC,EAAO,OAAOH,KAAYG,EAAO,UAAUH,CAAQ,EAAE,CAAC;AAAA,MAEnE,UAAAD;AAAA,IAAA;AAAA,EAAA,GAEL;AAGF,SACE,gBAAAK;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWF,EAAGC,EAAO,SAASd,KAAkBc,EAAO,iBAAiB,GAAGX,CAAS;AAAA,MACpF,eAAaC;AAAA,MAEZ,UAAA;AAAA,QAAAF,KAAW,gBAAAU,EAAC,OAAA,EAAI,WAAWE,EAAO,SAAU,UAAAZ,GAAQ;AAAA,0BAEpD,SAAA,EAAM,WAAWY,EAAO,OAAO,cAAYpB,GAC1C,UAAA;AAAA,UAAA,gBAAAkB,EAAC,SAAA,EACC,UAAA,gBAAAA,EAAC,MAAA,EACE,UAAAnB,EAAQ,IAAI,CAAAuB,MAAU;AACrB,kBAAMC,IAAa,GAAQD,EAAO,cAAcf,IAE1CiB,IAAgBF,EAAO,aAAa,cAAc,eAAe;AAEvE,mBACE,gBAAAJ;AAAA,cAAC;AAAA,cAAA;AAAA,gBAEC,OAAM;AAAA,gBACN,aAAWI,EAAO;AAAA,gBAClB,WAAWH,EAAGG,EAAO,WAAWA,EAAO,YAAYF,EAAO,MAAM;AAAA,gBAE/D,UAAAG;AAAA;AAAA,kBAEC,gBAAAF;AAAA,oBAAC;AAAA,oBAAA;AAAA,sBACC,MAAK;AAAA,sBACL,WAAWD,EAAO;AAAA,sBAClB,SAAS,MAAMb,KAAA,gBAAAA,EAASe,EAAO,KAAKE;AAAA,sBAEnC,UAAA;AAAA,wBAAAF,EAAO;AAAA,wBACPA,EAAO,WAAW,gBAAAJ,EAAC,QAAA,EAAK,WAAWE,EAAO,QAAS,YAAO,QAAA,CAAQ;AAAA,wBAQnE,gBAAAF;AAAA,0BAAC;AAAA,0BAAA;AAAA,4BACC,eAAW;AAAA,4BACX,WAAWC;AAAA,8BACTC,EAAO;AAAA,8BACPE,EAAO,YAAYF,EAAO,gBAAgBE,EAAO,QAAQ,EAAE;AAAA,4BAAA;AAAA,4BAG5D,UAAAA,EAAO,aAAa,eAAe,MAAM;AAAA,0BAAA;AAAA,wBAAA;AAAA,sBAC5C;AAAA,oBAAA;AAAA,kBAAA;AAAA,oBAGF,gBAAAD,EAAAI,GAAA,EACG,UAAA;AAAA,kBAAAH,EAAO;AAAA,kBACPA,EAAO,WAAW,gBAAAJ,EAAC,QAAA,EAAK,WAAWE,EAAO,QAAS,YAAO,QAAA,CAAQ;AAAA,gBAAA,EAAA,CACrE;AAAA,cAAA;AAAA,cAnCGE,EAAO;AAAA,YAAA;AAAA,UAuClB,CAAC,GACH,GACF;AAAA,UACA,gBAAAJ,EAAC,WACE,UAAAf,IACGY;AAAA,8BACG,QAAA,EAAK,MAAK,SAAQ,WAAWK,EAAO,gBACnC,UAAA;AAAA,cAAA,gBAAAF,EAACQ,GAAA,EAAsB,eAAW,GAAA,CAAC;AAAA,cAClCvB;AAAA,YAAA,GACH;AAAA,YACA;AAAA,UAAA,IAEFD,IACEa;AAAA,YACEY;AAAA,cACE;AAAA,cACAtB;AAAA,eACAuB,IAAAjB,KAAA,gBAAAA,EAAQ,cAAR,gBAAAiB,EAAmB;AAAA,YAAA;AAAA,UACrB,IAEFf,MAAa,IACXE;AAAA,YACEY,EAAa,0BAA0BvB,IAAcyB,IAAAlB,KAAA,gBAAAA,EAAQ,cAAR,gBAAAkB,EAAmB,KAAK;AAAA,UAAA,IAE/E5B,EAAA,CACV;AAAA,QAAA,EAAA,CACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN,GAQa6B,IAA2C,gBAAAC;AAAA,EACxC,gBAAAC,EAAK,CAAC,EAAE,WAAAC,GAAW,WAAAxB,GAAW,UAAAR,GAAU,GAAGiC,EAAA,MACvD,gBAAAhB,EAAC,MAAA,EAAG,WAAWC,EAAGc,KAAab,EAAO,cAAc,GAAGX,CAAS,GAAI,GAAGyB,GACpE,UAAAjC,EAAA,CACH,CACD;AAAA,EACD;AACF,GAEAkC,sBAAkCrC,CAAS;"}
@@ -0,0 +1 @@
1
+ @charset "UTF-8";@layer ui{.ui-wrapper-KXCZg{overflow:auto;position:relative;background-color:var(--ui-surface);border:1px solid var(--ui-border);border-radius:var(--ui-radius-md)}.ui-wrapper--capped-M2QUJ{max-height:calc(100dvh - var(--ui-header-height, 0px) - var(--ui-space-8))}.ui-wrapper--capped-M2QUJ .ui-table-LF5Ow thead th{position:sticky;top:0;z-index:10}.ui-table-LF5Ow{width:100%;border-collapse:collapse;font-family:var(--ui-font-body);font-size:var(--ui-font-size-sm)}.ui-table-LF5Ow th,.ui-table-LF5Ow td{padding:var(--ui-space-3);text-align:start;border-bottom:1px solid var(--ui-border);vertical-align:middle}.ui-table-LF5Ow thead th{background-color:var(--ui-surface-2);font-weight:600;color:var(--ui-text-2);white-space:nowrap}.ui-table-LF5Ow tbody tr:hover{background-color:var(--ui-surface-inset)}.ui-state-YPPb0{text-align:center;color:var(--ui-text-2);padding-block:var(--ui-space-6)}.ui-state--error-A492d{color:var(--ui-bad-fg)}.ui-state__message-wwbIW{display:inline-flex;align-items:center;gap:var(--ui-space-2)}.ui-state__message-wwbIW svg{font-size:var(--ui-icon-md);flex-shrink:0}.ui-row--warning-BAUN2{background-color:var(--ui-warn-bg)}.ui-row--warning-BAUN2 td:first-child{box-shadow:inset 3px 0 0 var(--ui-warn-fg)}.ui-srOnly-Oia8c{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.ui-sort-3Q6Fx{display:inline-flex;align-items:center;gap:var(--ui-space-1);width:100%;padding:0;border:none;background:none;cursor:pointer;font:inherit;color:inherit;text-align:inherit}.ui-sort-3Q6Fx:hover .ui-sort__arrow-MITWb:not(.ui-sort__arrow--ascending-85T5d,.ui-sort__arrow--descending-gs3VU){color:var(--ui-text)}.ui-sort-3Q6Fx:focus-visible{outline:var(--ui-ring-width, 2px) solid var(--ui-ring-color);outline-offset:var(--ui-ring-offset, -2px)}.ui-sort__arrow-MITWb{flex-shrink:0;font-size:var(--ui-font-size-2xs);color:var(--ui-text-3);transition:color var(--ui-duration-fast) var(--ui-ease-out)}@media (forced-colors: active){.ui-sort__arrow-MITWb{color:GrayText}}.ui-sort__arrow--ascending-85T5d,.ui-sort__arrow--descending-gs3VU{color:var(--ui-text)}@media (prefers-reduced-motion: reduce){.ui-sort__arrow-MITWb{transition:none}}.ui-sticky-KDEvQ{position:sticky;left:0;z-index:1;background-color:var(--ui-surface)}[dir=rtl] .ui-sticky-KDEvQ{left:auto;right:0}.ui-sticky-KDEvQ:after{content:"";position:absolute;inset-block:0;inset-inline-end:0;width:1px;background-color:var(--ui-border)}thead .ui-sticky-KDEvQ{background-color:var(--ui-surface-2)}.ui-bulkBar-62qk0{display:flex;align-items:center;gap:var(--ui-space-3);position:sticky;top:0;z-index:10;padding:var(--ui-space-2) var(--ui-space-3);border-bottom:1px solid var(--ui-border-strong);background-color:var(--ui-selected-tint);font-size:var(--ui-font-size-sm);color:var(--ui-text)}}
@@ -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"),m=require("react"),x=require("../../helpers/class-name.helper.cjs"),h=require("../../helpers/component.helper.cjs"),p=require("../../theme/context.cjs"),a={default:{"dateField":"ui-dateField-UnUwe","dateField--sm":"ui-dateField--sm-bcDe9","range":"ui-range-nGuRH","range__row":"ui-range__row--debA","range__separator":"ui-range__separator-fEqqr","range__field":"ui-range__field-tmoNH","range__summary":"ui-range__summary-L6v1T"}},o=m.forwardRef(({type:e="date",size:r="md",className:c,testId:i,...s},d)=>t.jsx("input",{ref:d,type:e,className:x.cx(a.default.dateField,r==="sm"&&a.default["dateField--sm"],c),"data-testid":i,...s})),q=m.memo(h.named(o,"DateField")),R=({value:e,onChange:r,startLabel:c,endLabel:i,separator:s="–",min:d,max:u,isSummaryVisible:j,size:f,isDisabled:g,className:D,testId:N})=>{const{labels:l}=p.useUi(),_=(()=>{if(!j||!(l!=null&&l.locale)||e.start===""||e.end==="")return null;try{const n=new Intl.DateTimeFormat(l.locale,{dateStyle:"medium"});return`${n.format(new Date(e.start))} ${s} ${n.format(new Date(e.end))}`}catch{return null}})();return t.jsxs("div",{className:x.cx(a.default.range,D),"data-testid":N,children:[t.jsxs("div",{className:a.default.range__row,children:[t.jsx(o,{className:a.default.range__field,"aria-label":c,size:f,value:e.start,min:d,max:e.end||u,disabled:g,onChange:n=>r({...e,start:n.target.value})}),t.jsx("span",{className:a.default.range__separator,"aria-hidden":!0,children:s}),t.jsx(o,{className:a.default.range__field,"aria-label":i,size:f,value:e.end,min:e.start||d,max:u,disabled:g,onChange:n=>r({...e,end:n.target.value})})]}),_&&t.jsx("span",{className:a.default.range__summary,children:_})]})},w=h.named(m.memo(R),"DateRange");exports.DateRange=w;exports.default=q;
2
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/components/DateField/index.tsx"],"sourcesContent":["'use client';\n\nimport { forwardRef, type InputHTMLAttributes, memo } from 'react';\n\nimport { cx } from '../../helpers/class-name.helper';\nimport { named } from '../../helpers/component.helper';\nimport { useUi } from '../../theme/context';\n\nimport styles from './index.module.scss';\n\n/* `size` yerel ozellikte karakter genisligi (`number`); burada olcu adi — `Input` ile ayni. */\ntype Props = Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'size'> & {\n /** `date` (varsayılan) · `datetime-local` · `month` · `time`. */\n type?: 'date' | 'datetime-local' | 'month' | 'time';\n /** `sm` yoğun şeritler içindir (araç çubuğu, `Select size=\"sm\"` yanında); varsayılan form ölçüsü `md`. */\n size?: 'sm' | 'md';\n testId?: string;\n};\n\n/** Tarih alanı — yerel `<input type=\"date\">`. */\nconst DateField = forwardRef<HTMLInputElement, Props>(\n ({ type = 'date', size = 'md', className, testId, ...rest }, ref) => (\n <input\n ref={ref}\n type={type}\n className={cx(styles.dateField, size === 'sm' && styles['dateField--sm'], className)}\n data-testid={testId}\n {...rest}\n />\n ),\n);\n\nexport default /*#__PURE__*/ memo(/*#__PURE__*/ named(DateField, 'DateField')) as typeof DateField;\n\nexport type DateRangeValue = {\n /** ISO tarih (`YYYY-MM-DD`) ya da boş dize. */\n start: string;\n end: string;\n};\n\ntype RangeProps = {\n value: DateRangeValue;\n onChange: (value: DateRangeValue) => void;\n /** Başlangıç alanının erişilebilir adı (\"Başlangıç\"). */\n startLabel: string;\n /** Bitiş alanının erişilebilir adı (\"Bitiş\"). */\n endLabel: string;\n /** İki alanın arasındaki ayraç. */\n separator?: string;\n /** Ölçeğin uçları; ikisi de yerel öğeye geçer. */\n min?: string;\n max?: string;\n /** Seçilen aralığın okunur özetini gösterir. */\n isSummaryVisible?: boolean;\n /** İki alanın ölçüsü — `DateField.size`. */\n size?: Props['size'];\n isDisabled?: boolean;\n className?: string;\n testId?: string;\n};\n\n/** Tarih aralığı — iki yerel alan, taklit takvim değil. */\nconst DateRangeBase = ({\n value,\n onChange,\n startLabel,\n endLabel,\n separator = '–',\n min,\n max,\n isSummaryVisible,\n size,\n isDisabled,\n className,\n testId,\n}: RangeProps) => {\n const { labels } = useUi();\n\n /* OZET `Intl` ile ve `labels.locale`den. */\n const summary = (() => {\n if (!isSummaryVisible || !labels?.locale || value.start === '' || value.end === '') return null;\n\n try {\n const format = new Intl.DateTimeFormat(labels.locale, { dateStyle: 'medium' });\n return `${format.format(new Date(value.start))} ${separator} ${format.format(new Date(value.end))}`;\n } catch {\n /* Gecersiz yerel ayar ya da tarih: ozet cizilmez, alanlar calismaya devam eder. */\n return null;\n }\n })();\n\n return (\n <div className={cx(styles.range, className)} data-testid={testId}>\n <div className={styles.range__row}>\n <DateField\n className={styles.range__field}\n aria-label={startLabel}\n size={size}\n value={value.start}\n min={min}\n /* Baslangic bitisi GECEMEZ: tarayici gecersiz araligi en bastan sectirmiyor. */\n max={value.end || max}\n disabled={isDisabled}\n onChange={event => onChange({ ...value, start: event.target.value })}\n />\n\n <span className={styles.range__separator} aria-hidden>\n {separator}\n </span>\n\n <DateField\n className={styles.range__field}\n aria-label={endLabel}\n size={size}\n value={value.end}\n min={value.start || min}\n max={max}\n disabled={isDisabled}\n onChange={event => onChange({ ...value, end: event.target.value })}\n />\n </div>\n\n {summary && <span className={styles.range__summary}>{summary}</span>}\n </div>\n );\n};\n\nexport const DateRange = /*#__PURE__*/ named(/*#__PURE__*/ memo(DateRangeBase), 'DateRange');\n"],"names":["DateField","forwardRef","type","size","className","testId","rest","ref","jsx","cx","styles","index","memo","named","DateRangeBase","value","onChange","startLabel","endLabel","separator","min","max","isSummaryVisible","isDisabled","labels","useUi","summary","format","jsxs","event","DateRange"],"mappings":"4VAmBMA,EAAYC,EAAAA,WAChB,CAAC,CAAE,KAAAC,EAAO,OAAQ,KAAAC,EAAO,KAAM,UAAAC,EAAW,OAAAC,EAAQ,GAAGC,GAAQC,IAC3DC,EAAAA,IAAC,QAAA,CACC,IAAAD,EACA,KAAAL,EACA,UAAWO,EAAAA,GAAGC,EAAAA,QAAO,UAAWP,IAAS,MAAQO,EAAAA,QAAO,eAAe,EAAGN,CAAS,EACnF,cAAaC,EACZ,GAAGC,CAAA,CAAA,CAGV,EAEAK,EAA6BC,OAAmBC,EAAAA,MAAMb,EAAW,WAAW,CAAC,EA8BvEc,EAAgB,CAAC,CACrB,MAAAC,EACA,SAAAC,EACA,WAAAC,EACA,SAAAC,EACA,UAAAC,EAAY,IACZ,IAAAC,EACA,IAAAC,EACA,iBAAAC,EACA,KAAAnB,EACA,WAAAoB,EACA,UAAAnB,EACA,OAAAC,CACF,IAAkB,CAChB,KAAM,CAAE,OAAAmB,CAAA,EAAWC,QAAA,EAGbC,GAAW,IAAM,CACrB,GAAI,CAACJ,GAAoB,EAACE,GAAA,MAAAA,EAAQ,SAAUT,EAAM,QAAU,IAAMA,EAAM,MAAQ,GAAI,OAAO,KAE3F,GAAI,CACF,MAAMY,EAAS,IAAI,KAAK,eAAeH,EAAO,OAAQ,CAAE,UAAW,SAAU,EAC7E,MAAO,GAAGG,EAAO,OAAO,IAAI,KAAKZ,EAAM,KAAK,CAAC,CAAC,IAAII,CAAS,IAAIQ,EAAO,OAAO,IAAI,KAAKZ,EAAM,GAAG,CAAC,CAAC,EACnG,MAAQ,CAEN,OAAO,IACT,CACF,GAAA,EAEA,OACEa,OAAC,OAAI,UAAWnB,EAAAA,GAAGC,EAAAA,QAAO,MAAON,CAAS,EAAG,cAAaC,EACxD,SAAA,CAAAuB,EAAAA,KAAC,MAAA,CAAI,UAAWlB,EAAAA,QAAO,WACrB,SAAA,CAAAF,EAAAA,IAACR,EAAA,CACC,UAAWU,EAAAA,QAAO,aAClB,aAAYO,EACZ,KAAAd,EACA,MAAOY,EAAM,MACb,IAAAK,EAEA,IAAKL,EAAM,KAAOM,EAClB,SAAUE,EACV,SAAUM,GAASb,EAAS,CAAE,GAAGD,EAAO,MAAOc,EAAM,OAAO,KAAA,CAAO,CAAA,CAAA,QAGpE,OAAA,CAAK,UAAWnB,EAAAA,QAAO,iBAAkB,cAAW,GAClD,SAAAS,EACH,EAEAX,EAAAA,IAACR,EAAA,CACC,UAAWU,EAAAA,QAAO,aAClB,aAAYQ,EACZ,KAAAf,EACA,MAAOY,EAAM,IACb,IAAKA,EAAM,OAASK,EACpB,IAAAC,EACA,SAAUE,EACV,SAAUM,GAASb,EAAS,CAAE,GAAGD,EAAO,IAAKc,EAAM,OAAO,KAAA,CAAO,CAAA,CAAA,CACnE,EACF,EAECH,GAAWlB,EAAAA,IAAC,OAAA,CAAK,UAAWE,EAAAA,QAAO,eAAiB,SAAAgB,CAAA,CAAQ,CAAA,EAC/D,CAEJ,EAEaI,EAA0BjB,EAAAA,MAAoBD,OAAKE,CAAa,EAAG,WAAW"}
@@ -0,0 +1,44 @@
1
+ import { InputHTMLAttributes } from 'react';
2
+ type Props = Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'size'> & {
3
+ /** `date` (varsayılan) · `datetime-local` · `month` · `time`. */
4
+ type?: 'date' | 'datetime-local' | 'month' | 'time';
5
+ /** `sm` yoğun şeritler içindir (araç çubuğu, `Select size="sm"` yanında); varsayılan form ölçüsü `md`. */
6
+ size?: 'sm' | 'md';
7
+ testId?: string;
8
+ };
9
+ /** Tarih alanı — yerel `<input type="date">`. */
10
+ declare const DateField: import('react').ForwardRefExoticComponent<Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "size"> & {
11
+ /** `date` (varsayılan) · `datetime-local` · `month` · `time`. */
12
+ type?: "date" | "datetime-local" | "month" | "time";
13
+ /** `sm` yoğun şeritler içindir (araç çubuğu, `Select size="sm"` yanında); varsayılan form ölçüsü `md`. */
14
+ size?: "sm" | "md";
15
+ testId?: string;
16
+ } & import('react').RefAttributes<HTMLInputElement>>;
17
+ declare const _default: typeof DateField;
18
+ export default _default;
19
+ export type DateRangeValue = {
20
+ /** ISO tarih (`YYYY-MM-DD`) ya da boş dize. */
21
+ start: string;
22
+ end: string;
23
+ };
24
+ type RangeProps = {
25
+ value: DateRangeValue;
26
+ onChange: (value: DateRangeValue) => void;
27
+ /** Başlangıç alanının erişilebilir adı ("Başlangıç"). */
28
+ startLabel: string;
29
+ /** Bitiş alanının erişilebilir adı ("Bitiş"). */
30
+ endLabel: string;
31
+ /** İki alanın arasındaki ayraç. */
32
+ separator?: string;
33
+ /** Ölçeğin uçları; ikisi de yerel öğeye geçer. */
34
+ min?: string;
35
+ max?: string;
36
+ /** Seçilen aralığın okunur özetini gösterir. */
37
+ isSummaryVisible?: boolean;
38
+ /** İki alanın ölçüsü — `DateField.size`. */
39
+ size?: Props['size'];
40
+ isDisabled?: boolean;
41
+ className?: string;
42
+ testId?: string;
43
+ };
44
+ export declare const DateRange: import('react').MemoExoticComponent<({ value, onChange, startLabel, endLabel, separator, min, max, isSummaryVisible, size, isDisabled, className, testId, }: RangeProps) => import("react").JSX.Element>;
@@ -0,0 +1,79 @@
1
+ "use client";
2
+ import { jsx as r, jsxs as _ } from "react/jsx-runtime";
3
+ import { memo as u, forwardRef as y } from "react";
4
+ import { cx as h } from "../../helpers/class-name.helper.js";
5
+ import { named as D } from "../../helpers/component.helper.js";
6
+ import { useUi as F } from "../../theme/context.js";
7
+ const a = {"dateField":"ui-dateField-UnUwe","dateField--sm":"ui-dateField--sm-bcDe9","range":"ui-range-nGuRH","range__row":"ui-range__row--debA","range__separator":"ui-range__separator-fEqqr","range__field":"ui-range__field-tmoNH","range__summary":"ui-range__summary-L6v1T"};
8
+ const l = y(
9
+ ({ type: e = "date", size: n = "md", className: i, testId: o, ...s }, d) => /* @__PURE__ */ r(
10
+ "input",
11
+ {
12
+ ref: d,
13
+ type: e,
14
+ className: h(a.dateField, n === "sm" && a["dateField--sm"], i),
15
+ "data-testid": o,
16
+ ...s
17
+ }
18
+ )
19
+ ), S = /* @__PURE__ */ u(/* @__PURE__ */ D(l, "DateField")), R = ({
20
+ value: e,
21
+ onChange: n,
22
+ startLabel: i,
23
+ endLabel: o,
24
+ separator: s = "–",
25
+ min: d,
26
+ max: c,
27
+ isSummaryVisible: N,
28
+ size: f,
29
+ isDisabled: g,
30
+ className: w,
31
+ testId: x
32
+ }) => {
33
+ const { labels: m } = F(), p = (() => {
34
+ if (!N || !(m != null && m.locale) || e.start === "" || e.end === "") return null;
35
+ try {
36
+ const t = new Intl.DateTimeFormat(m.locale, { dateStyle: "medium" });
37
+ return `${t.format(new Date(e.start))} ${s} ${t.format(new Date(e.end))}`;
38
+ } catch {
39
+ return null;
40
+ }
41
+ })();
42
+ return /* @__PURE__ */ _("div", { className: h(a.range, w), "data-testid": x, children: [
43
+ /* @__PURE__ */ _("div", { className: a.range__row, children: [
44
+ /* @__PURE__ */ r(
45
+ l,
46
+ {
47
+ className: a.range__field,
48
+ "aria-label": i,
49
+ size: f,
50
+ value: e.start,
51
+ min: d,
52
+ max: e.end || c,
53
+ disabled: g,
54
+ onChange: (t) => n({ ...e, start: t.target.value })
55
+ }
56
+ ),
57
+ /* @__PURE__ */ r("span", { className: a.range__separator, "aria-hidden": !0, children: s }),
58
+ /* @__PURE__ */ r(
59
+ l,
60
+ {
61
+ className: a.range__field,
62
+ "aria-label": o,
63
+ size: f,
64
+ value: e.end,
65
+ min: e.start || d,
66
+ max: c,
67
+ disabled: g,
68
+ onChange: (t) => n({ ...e, end: t.target.value })
69
+ }
70
+ )
71
+ ] }),
72
+ p && /* @__PURE__ */ r("span", { className: a.range__summary, children: p })
73
+ ] });
74
+ }, T = /* @__PURE__ */ D(/* @__PURE__ */ u(R), "DateRange");
75
+ export {
76
+ T as DateRange,
77
+ S as default
78
+ };
79
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/DateField/index.tsx"],"sourcesContent":["'use client';\n\nimport { forwardRef, type InputHTMLAttributes, memo } from 'react';\n\nimport { cx } from '../../helpers/class-name.helper';\nimport { named } from '../../helpers/component.helper';\nimport { useUi } from '../../theme/context';\n\nimport styles from './index.module.scss';\n\n/* `size` yerel ozellikte karakter genisligi (`number`); burada olcu adi — `Input` ile ayni. */\ntype Props = Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'size'> & {\n /** `date` (varsayılan) · `datetime-local` · `month` · `time`. */\n type?: 'date' | 'datetime-local' | 'month' | 'time';\n /** `sm` yoğun şeritler içindir (araç çubuğu, `Select size=\"sm\"` yanında); varsayılan form ölçüsü `md`. */\n size?: 'sm' | 'md';\n testId?: string;\n};\n\n/** Tarih alanı — yerel `<input type=\"date\">`. */\nconst DateField = forwardRef<HTMLInputElement, Props>(\n ({ type = 'date', size = 'md', className, testId, ...rest }, ref) => (\n <input\n ref={ref}\n type={type}\n className={cx(styles.dateField, size === 'sm' && styles['dateField--sm'], className)}\n data-testid={testId}\n {...rest}\n />\n ),\n);\n\nexport default /*#__PURE__*/ memo(/*#__PURE__*/ named(DateField, 'DateField')) as typeof DateField;\n\nexport type DateRangeValue = {\n /** ISO tarih (`YYYY-MM-DD`) ya da boş dize. */\n start: string;\n end: string;\n};\n\ntype RangeProps = {\n value: DateRangeValue;\n onChange: (value: DateRangeValue) => void;\n /** Başlangıç alanının erişilebilir adı (\"Başlangıç\"). */\n startLabel: string;\n /** Bitiş alanının erişilebilir adı (\"Bitiş\"). */\n endLabel: string;\n /** İki alanın arasındaki ayraç. */\n separator?: string;\n /** Ölçeğin uçları; ikisi de yerel öğeye geçer. */\n min?: string;\n max?: string;\n /** Seçilen aralığın okunur özetini gösterir. */\n isSummaryVisible?: boolean;\n /** İki alanın ölçüsü — `DateField.size`. */\n size?: Props['size'];\n isDisabled?: boolean;\n className?: string;\n testId?: string;\n};\n\n/** Tarih aralığı — iki yerel alan, taklit takvim değil. */\nconst DateRangeBase = ({\n value,\n onChange,\n startLabel,\n endLabel,\n separator = '–',\n min,\n max,\n isSummaryVisible,\n size,\n isDisabled,\n className,\n testId,\n}: RangeProps) => {\n const { labels } = useUi();\n\n /* OZET `Intl` ile ve `labels.locale`den. */\n const summary = (() => {\n if (!isSummaryVisible || !labels?.locale || value.start === '' || value.end === '') return null;\n\n try {\n const format = new Intl.DateTimeFormat(labels.locale, { dateStyle: 'medium' });\n return `${format.format(new Date(value.start))} ${separator} ${format.format(new Date(value.end))}`;\n } catch {\n /* Gecersiz yerel ayar ya da tarih: ozet cizilmez, alanlar calismaya devam eder. */\n return null;\n }\n })();\n\n return (\n <div className={cx(styles.range, className)} data-testid={testId}>\n <div className={styles.range__row}>\n <DateField\n className={styles.range__field}\n aria-label={startLabel}\n size={size}\n value={value.start}\n min={min}\n /* Baslangic bitisi GECEMEZ: tarayici gecersiz araligi en bastan sectirmiyor. */\n max={value.end || max}\n disabled={isDisabled}\n onChange={event => onChange({ ...value, start: event.target.value })}\n />\n\n <span className={styles.range__separator} aria-hidden>\n {separator}\n </span>\n\n <DateField\n className={styles.range__field}\n aria-label={endLabel}\n size={size}\n value={value.end}\n min={value.start || min}\n max={max}\n disabled={isDisabled}\n onChange={event => onChange({ ...value, end: event.target.value })}\n />\n </div>\n\n {summary && <span className={styles.range__summary}>{summary}</span>}\n </div>\n );\n};\n\nexport const DateRange = /*#__PURE__*/ named(/*#__PURE__*/ memo(DateRangeBase), 'DateRange');\n"],"names":["DateField","forwardRef","type","size","className","testId","rest","ref","jsx","cx","styles","index","memo","named","DateRangeBase","value","onChange","startLabel","endLabel","separator","min","max","isSummaryVisible","isDisabled","labels","useUi","summary","format","jsxs","event","DateRange"],"mappings":";;;;;;;AAmBA,MAAMA,IAAYC;AAAA,EAChB,CAAC,EAAE,MAAAC,IAAO,QAAQ,MAAAC,IAAO,MAAM,WAAAC,GAAW,QAAAC,GAAQ,GAAGC,KAAQC,MAC3D,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,KAAAD;AAAA,MACA,MAAAL;AAAA,MACA,WAAWO,EAAGC,EAAO,WAAWP,MAAS,QAAQO,EAAO,eAAe,GAAGN,CAAS;AAAA,MACnF,eAAaC;AAAA,MACZ,GAAGC;AAAA,IAAA;AAAA,EAAA;AAGV,GAEAK,IAA6B,gBAAAC,EAAmB,gBAAAC,EAAMb,GAAW,WAAW,CAAC,GA8BvEc,IAAgB,CAAC;AAAA,EACrB,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,YAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC,IAAY;AAAA,EACZ,KAAAC;AAAA,EACA,KAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,MAAAnB;AAAA,EACA,YAAAoB;AAAA,EACA,WAAAnB;AAAA,EACA,QAAAC;AACF,MAAkB;AAChB,QAAM,EAAE,QAAAmB,EAAA,IAAWC,EAAA,GAGbC,KAAW,MAAM;AACrB,QAAI,CAACJ,KAAoB,EAACE,KAAA,QAAAA,EAAQ,WAAUT,EAAM,UAAU,MAAMA,EAAM,QAAQ,GAAI,QAAO;AAE3F,QAAI;AACF,YAAMY,IAAS,IAAI,KAAK,eAAeH,EAAO,QAAQ,EAAE,WAAW,UAAU;AAC7E,aAAO,GAAGG,EAAO,OAAO,IAAI,KAAKZ,EAAM,KAAK,CAAC,CAAC,IAAII,CAAS,IAAIQ,EAAO,OAAO,IAAI,KAAKZ,EAAM,GAAG,CAAC,CAAC;AAAA,IACnG,QAAQ;AAEN,aAAO;AAAA,IACT;AAAA,EACF,GAAA;AAEA,SACE,gBAAAa,EAAC,SAAI,WAAWnB,EAAGC,EAAO,OAAON,CAAS,GAAG,eAAaC,GACxD,UAAA;AAAA,IAAA,gBAAAuB,EAAC,OAAA,EAAI,WAAWlB,EAAO,YACrB,UAAA;AAAA,MAAA,gBAAAF;AAAA,QAACR;AAAA,QAAA;AAAA,UACC,WAAWU,EAAO;AAAA,UAClB,cAAYO;AAAA,UACZ,MAAAd;AAAA,UACA,OAAOY,EAAM;AAAA,UACb,KAAAK;AAAA,UAEA,KAAKL,EAAM,OAAOM;AAAA,UAClB,UAAUE;AAAA,UACV,UAAU,CAAAM,MAASb,EAAS,EAAE,GAAGD,GAAO,OAAOc,EAAM,OAAO,MAAA,CAAO;AAAA,QAAA;AAAA,MAAA;AAAA,wBAGpE,QAAA,EAAK,WAAWnB,EAAO,kBAAkB,eAAW,IAClD,UAAAS,GACH;AAAA,MAEA,gBAAAX;AAAA,QAACR;AAAA,QAAA;AAAA,UACC,WAAWU,EAAO;AAAA,UAClB,cAAYQ;AAAA,UACZ,MAAAf;AAAA,UACA,OAAOY,EAAM;AAAA,UACb,KAAKA,EAAM,SAASK;AAAA,UACpB,KAAAC;AAAA,UACA,UAAUE;AAAA,UACV,UAAU,CAAAM,MAASb,EAAS,EAAE,GAAGD,GAAO,KAAKc,EAAM,OAAO,MAAA,CAAO;AAAA,QAAA;AAAA,MAAA;AAAA,IACnE,GACF;AAAA,IAECH,KAAW,gBAAAlB,EAAC,QAAA,EAAK,WAAWE,EAAO,gBAAiB,UAAAgB,EAAA,CAAQ;AAAA,EAAA,GAC/D;AAEJ,GAEaI,IAA0B,gBAAAjB,EAAoB,gBAAAD,EAAKE,CAAa,GAAG,WAAW;"}
@@ -0,0 +1 @@
1
+ @layer ui{.ui-dateField-UnUwe{width:100%;font-family:var(--ui-font-body);font-size:var(--ui-font-size-control);line-height:var(--ui-leading-snug);color:var(--ui-text);background-color:var(--ui-surface);border:1px solid var(--ui-border-strong);border-radius:var(--ui-radius-md);padding:var(--ui-space-3) var(--ui-space-4);min-height:44px;transition:border-color var(--ui-duration-fast) var(--ui-ease-out),box-shadow var(--ui-duration-fast) var(--ui-ease-out)}.ui-dateField-UnUwe::placeholder{color:var(--ui-placeholder, var(--ui-text-3))}.ui-dateField-UnUwe:hover:not(:disabled):not([aria-invalid=true]){border-color:color-mix(in oklab,var(--ui-border-strong),var(--ui-text) 30%)}.ui-dateField-UnUwe:focus{outline:none;border-color:var(--ui-ring-color);box-shadow:var(--ui-ring)}.ui-dateField-UnUwe:disabled{background-color:var(--ui-surface-2);border-color:var(--ui-border);cursor:not-allowed;color:var(--ui-text-3)}@media (forced-colors: active){.ui-dateField-UnUwe:disabled{color:GrayText;border-color:GrayText}}.ui-dateField-UnUwe[aria-invalid=true]{border-color:var(--ui-danger-solid)}.ui-dateField-UnUwe[aria-invalid=true]:focus{box-shadow:var(--ui-ring-danger)}@media (prefers-reduced-motion: reduce){.ui-dateField-UnUwe{transition:none}}.ui-dateField-UnUwe::-webkit-calendar-picker-indicator{border-radius:var(--ui-radius-sm);cursor:pointer}.ui-dateField-UnUwe::-webkit-calendar-picker-indicator:hover{background-color:var(--ui-surface-2)}.ui-dateField-UnUwe:invalid,.ui-dateField-UnUwe:not(:focus):placeholder-shown{color:var(--ui-text-2)}.ui-dateField--sm-bcDe9{min-height:36px;padding-block:0;padding-inline:var(--ui-space-3);font-size:var(--ui-font-size-sm)}@media (max-width: 640px){.ui-dateField--sm-bcDe9{font-size:var(--ui-font-size-control)}}@media (hover: none) and (pointer: coarse){.ui-dateField--sm-bcDe9{font-size:var(--ui-font-size-control)}}.ui-range-nGuRH{display:flex;flex-direction:column;gap:var(--ui-space-2)}.ui-range__row--debA{display:flex;align-items:center;gap:var(--ui-space-2);flex-wrap:wrap}.ui-range__separator-fEqqr{flex-shrink:0;color:var(--ui-text-3)}.ui-range__field-tmoNH{flex:1;min-width:140px}.ui-range__summary-L6v1T{font-size:var(--ui-font-size-xs);color:var(--ui-text-2);order:var(--ui-field-message-order, 0)}.ui-range__error-XbnqQ{font-size:var(--ui-font-size-xs);color:var(--ui-bad-fg);order:var(--ui-field-message-order, 0)}}
@@ -0,0 +1,2 @@
1
+ "use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),t=require("react"),i=require("../../helpers/class-name.helper.cjs"),n=require("../../helpers/component.helper.cjs"),m=require("../../helpers/label.helper.cjs"),p=require("../../theme/context.cjs"),d=require("../Link/index.cjs"),r={default:{"directory":"ui-directory-badEd","group":"ui-group-i6An9","group__header":"ui-group__header-rc19c","group__label":"ui-group__label-vQTcs","group__link":"ui-group__link-es5V7","group__meta":"ui-group__meta-LtC-u","group__list":"ui-group__list-YxBCG","row":"ui-row-3LH7X","row__media":"ui-row__media-AxZEh","row__name":"ui-row__name-75Wbq","row__marker":"ui-row__marker-RYHb-","jump":"ui-jump-vpGwB","jump__link":"ui-jump__link-rRnT6"}},_=({children:a,className:l})=>e.jsx("div",{className:i.cx(r.default.directory,l),children:a}),x=n.named(t.memo(({label:a,href:l,linkProps:o,meta:s,children:c,id:u})=>e.jsxs("section",{className:r.default.group,id:u,children:[e.jsxs("header",{className:r.default.group__header,children:[e.jsx("h2",{className:r.default.group__label,children:l?e.jsx(d.default,{href:l,className:r.default.group__link,...o,children:a}):a}),s&&e.jsx("span",{className:r.default.group__meta,children:s})]}),e.jsx("ul",{className:r.default.group__list,children:c})]})),"DirectoryGroup"),h=n.named(t.memo(({href:a,name:l,media:o,marker:s,linkProps:c,className:u})=>e.jsx("li",{children:e.jsxs(d.default,{href:a,className:i.cx(r.default.row,u),...c,children:[o&&e.jsx("span",{className:r.default.row__media,children:o}),e.jsx("span",{className:r.default.row__name,children:l}),s&&e.jsx("span",{className:r.default.row__marker,children:s})]})})),"DirectoryRow"),j=n.named(t.memo(({labels:a,toId:l,label:o})=>{const{labels:s}=p.useUi();return e.jsx("nav",{className:r.default.jump,"aria-label":m.resolveLabel("DirectoryJump.label",o,s==null?void 0:s.directoryJump),children:a.map(c=>e.jsx("a",{href:`#${l(c)}`,className:r.default.jump__link,children:c},c))})}),"DirectoryJump"),f=t.memo(_);exports.DirectoryGroup=x;exports.DirectoryJump=j;exports.DirectoryRow=h;exports.default=f;
2
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/components/Directory/index.tsx"],"sourcesContent":["'use client';\n\nimport { type FC, memo, type ReactNode } from 'react';\n\nimport { cx } from '../../helpers/class-name.helper';\nimport { named } from '../../helpers/component.helper';\nimport { resolveLabel } from '../../helpers/label.helper';\nimport { useUi } from '../../theme/context';\nimport type { UiLinkExtraProps } from '../../types/link.type';\nimport UiLink from '../Link';\n\nimport styles from './index.module.scss';\n\ntype DirectoryProps = {\n children: ReactNode;\n className?: string;\n};\n\n/**\n * Dizin — harf veya konu başlıklı, gruplanmış bağlantı listesi.\n * @example <Directory> <DirectoryGroup label=\"A\"> <DirectoryRow href=\"/marka/ate\" name=\"ATE\"…\n */\nconst Directory: FC<DirectoryProps> = ({ children, className }) => (\n <div className={cx(styles.directory, className)}>{children}</div>\n);\n\ntype DirectoryGroupProps = {\n /** Grup başlığı: harf (\"A\", \"0-9\") veya konu (\"Fren sistemi\"). */\n label: string;\n /** Başlık kendisi bir hedefe götürüyorsa. */\n href?: string;\n /** Yönlendiriciye geçirilecek ek props. */\n linkProps?: UiLinkExtraProps;\n /** Başlığın sağında duran sayaç (\"14 alt kategori\"). */\n meta?: ReactNode;\n children: ReactNode;\n /** Çıpa hedefi: alfabe şeridinden atlamak için. */\n id?: string;\n};\n\n/** Dizin grubu. */\nexport const DirectoryGroup: FC<DirectoryGroupProps> = /*#__PURE__*/ named(\n /*#__PURE__*/ memo(({ label, href, linkProps, meta, children, id }) => (\n <section className={styles.group} id={id}>\n <header className={styles.group__header}>\n <h2 className={styles.group__label}>\n {href ? (\n <UiLink href={href} className={styles.group__link} {...linkProps}>\n {label}\n </UiLink>\n ) : (\n label\n )}\n </h2>\n {meta && <span className={styles.group__meta}>{meta}</span>}\n </header>\n\n <ul className={styles.group__list}>{children}</ul>\n </section>\n )),\n 'DirectoryGroup',\n);\n\ntype DirectoryRowProps = {\n href: string;\n name: string;\n /** Logo, ikon veya baş harf madalyonu. */\n media?: ReactNode;\n /** Sağ uçta duran işaret: rozet, kayıt sayısı. */\n marker?: ReactNode;\n /** Yönlendiriciye geçirilecek ek props. */\n linkProps?: UiLinkExtraProps;\n className?: string;\n};\n\n/** Dizin satırı — tek bir bağlantı. */\nexport const DirectoryRow: FC<DirectoryRowProps> = /*#__PURE__*/ named(\n /*#__PURE__*/ memo(({ href, name, media, marker, linkProps, className }) => (\n <li>\n <UiLink href={href} className={cx(styles.row, className)} {...linkProps}>\n {media && <span className={styles.row__media}>{media}</span>}\n <span className={styles.row__name}>{name}</span>\n {marker && <span className={styles.row__marker}>{marker}</span>}\n </UiLink>\n </li>\n )),\n 'DirectoryRow',\n);\n\ntype DirectoryJumpProps = {\n /** Grup etiketleri; her biri kendi çıpasına bağlanır. */\n labels: string[];\n /** Çıpa kimliğini üretir; `DirectoryGroup id` ile aynı olmalı. */\n toId: (label: string) => string;\n /** Şeridin erişilebilir adı. */\n label?: string;\n};\n\n/** Alfabe atlama şeridi. */\nexport const DirectoryJump: FC<DirectoryJumpProps> = /*#__PURE__*/ named(\n /*#__PURE__*/ memo(({ labels, toId, label }) => {\n /*\n * Prop adi `labels` (grup etiketleri) config'in adiyla cakisiyor; config `config` olarak\n * alinir.\n */\n const { labels: config } = useUi();\n\n return (\n <nav\n className={styles.jump}\n aria-label={resolveLabel('DirectoryJump.label', label, config?.directoryJump)}\n >\n {labels.map(item => (\n <a key={item} href={`#${toId(item)}`} className={styles.jump__link}>\n {item}\n </a>\n ))}\n </nav>\n );\n }),\n 'DirectoryJump',\n);\n\nexport default /*#__PURE__*/ memo(Directory) as typeof Directory;\n"],"names":["Directory","children","className","jsx","cx","styles","DirectoryGroup","named","memo","label","href","linkProps","meta","id","jsxs","UiLink","DirectoryRow","name","media","marker","DirectoryJump","labels","toId","config","useUi","resolveLabel","item","index"],"mappings":"uaAqBMA,EAAgC,CAAC,CAAE,SAAAC,EAAU,UAAAC,KACjDC,EAAAA,IAAC,MAAA,CAAI,UAAWC,EAAAA,GAAGC,EAAAA,QAAO,UAAWH,CAAS,EAAI,SAAAD,CAAA,CAAS,EAkBhDK,EAAwDC,EAAAA,MACrDC,EAAAA,KAAK,CAAC,CAAE,MAAAC,EAAO,KAAAC,EAAM,UAAAC,EAAW,KAAAC,EAAM,SAAAX,EAAU,GAAAY,CAAA,IAC5DC,EAAAA,KAAC,UAAA,CAAQ,UAAWT,EAAAA,QAAO,MAAO,GAAAQ,EAChC,SAAA,CAAAC,EAAAA,KAAC,SAAA,CAAO,UAAWT,EAAAA,QAAO,cACxB,SAAA,CAAAF,MAAC,KAAA,CAAG,UAAWE,EAAAA,QAAO,aACnB,WACCF,EAAAA,IAACY,EAAAA,QAAA,CAAO,KAAAL,EAAY,UAAWL,UAAO,YAAc,GAAGM,EACpD,SAAAF,CAAA,CACH,EAEAA,EAEJ,EACCG,GAAQT,EAAAA,IAAC,OAAA,CAAK,UAAWE,EAAAA,QAAO,YAAc,SAAAO,CAAA,CAAK,CAAA,EACtD,EAEAT,EAAAA,IAAC,KAAA,CAAG,UAAWE,EAAAA,QAAO,YAAc,SAAAJ,CAAA,CAAS,CAAA,CAAA,CAC/C,CACD,EACD,gBACF,EAeae,EAAoDT,EAAAA,MACjDC,EAAAA,KAAK,CAAC,CAAE,KAAAE,EAAM,KAAAO,EAAM,MAAAC,EAAO,OAAAC,EAAQ,UAAAR,EAAW,UAAAT,CAAA,IAC1DC,EAAAA,IAAC,MACC,SAAAW,EAAAA,KAACC,UAAA,CAAO,KAAAL,EAAY,UAAWN,EAAAA,GAAGC,UAAO,IAAKH,CAAS,EAAI,GAAGS,EAC3D,SAAA,CAAAO,GAASf,EAAAA,IAAC,OAAA,CAAK,UAAWE,EAAAA,QAAO,WAAa,SAAAa,EAAM,EACrDf,EAAAA,IAAC,OAAA,CAAK,UAAWE,EAAAA,QAAO,UAAY,SAAAY,EAAK,EACxCE,GAAUhB,EAAAA,IAAC,OAAA,CAAK,UAAWE,EAAAA,QAAO,YAAc,SAAAc,CAAA,CAAO,CAAA,CAAA,CAC1D,EACF,CACD,EACD,cACF,EAYaC,EAAsDb,EAAAA,aAC9C,CAAC,CAAE,OAAAc,EAAQ,KAAAC,EAAM,MAAAb,KAAY,CAK9C,KAAM,CAAE,OAAQc,CAAA,EAAWC,QAAA,EAE3B,OACErB,EAAAA,IAAC,MAAA,CACC,UAAWE,EAAAA,QAAO,KAClB,aAAYoB,EAAAA,aAAa,sBAAuBhB,EAAOc,GAAA,YAAAA,EAAQ,aAAa,EAE3E,WAAO,IAAIG,GACVvB,EAAAA,IAAC,IAAA,CAAa,KAAM,IAAImB,EAAKI,CAAI,CAAC,GAAI,UAAWrB,EAAAA,QAAO,WACrD,SAAAqB,CAAA,EADKA,CAER,CACD,CAAA,CAAA,CAGP,CAAC,EACD,eACF,EAEAC,SAAkC3B,CAAS"}
@@ -0,0 +1,51 @@
1
+ import { FC, ReactNode } from 'react';
2
+ import { UiLinkExtraProps } from '../../types/link.type';
3
+ type DirectoryProps = {
4
+ children: ReactNode;
5
+ className?: string;
6
+ };
7
+ /**
8
+ * Dizin — harf veya konu başlıklı, gruplanmış bağlantı listesi.
9
+ * @example <Directory> <DirectoryGroup label="A"> <DirectoryRow href="/marka/ate" name="ATE"…
10
+ */
11
+ declare const Directory: FC<DirectoryProps>;
12
+ type DirectoryGroupProps = {
13
+ /** Grup başlığı: harf ("A", "0-9") veya konu ("Fren sistemi"). */
14
+ label: string;
15
+ /** Başlık kendisi bir hedefe götürüyorsa. */
16
+ href?: string;
17
+ /** Yönlendiriciye geçirilecek ek props. */
18
+ linkProps?: UiLinkExtraProps;
19
+ /** Başlığın sağında duran sayaç ("14 alt kategori"). */
20
+ meta?: ReactNode;
21
+ children: ReactNode;
22
+ /** Çıpa hedefi: alfabe şeridinden atlamak için. */
23
+ id?: string;
24
+ };
25
+ /** Dizin grubu. */
26
+ export declare const DirectoryGroup: FC<DirectoryGroupProps>;
27
+ type DirectoryRowProps = {
28
+ href: string;
29
+ name: string;
30
+ /** Logo, ikon veya baş harf madalyonu. */
31
+ media?: ReactNode;
32
+ /** Sağ uçta duran işaret: rozet, kayıt sayısı. */
33
+ marker?: ReactNode;
34
+ /** Yönlendiriciye geçirilecek ek props. */
35
+ linkProps?: UiLinkExtraProps;
36
+ className?: string;
37
+ };
38
+ /** Dizin satırı — tek bir bağlantı. */
39
+ export declare const DirectoryRow: FC<DirectoryRowProps>;
40
+ type DirectoryJumpProps = {
41
+ /** Grup etiketleri; her biri kendi çıpasına bağlanır. */
42
+ labels: string[];
43
+ /** Çıpa kimliğini üretir; `DirectoryGroup id` ile aynı olmalı. */
44
+ toId: (label: string) => string;
45
+ /** Şeridin erişilebilir adı. */
46
+ label?: string;
47
+ };
48
+ /** Alfabe atlama şeridi. */
49
+ export declare const DirectoryJump: FC<DirectoryJumpProps>;
50
+ declare const _default: typeof Directory;
51
+ export default _default;
@@ -0,0 +1,46 @@
1
+ "use client";
2
+ import { jsx as e, jsxs as n } from "react/jsx-runtime";
3
+ import { memo as i } from "react";
4
+ import { cx as p } from "../../helpers/class-name.helper.js";
5
+ import { named as t } from "../../helpers/component.helper.js";
6
+ import { resolveLabel as u } from "../../helpers/label.helper.js";
7
+ import { useUi as _ } from "../../theme/context.js";
8
+ import d from "../Link/index.js";
9
+ const r = {"directory":"ui-directory-badEd","group":"ui-group-i6An9","group__header":"ui-group__header-rc19c","group__label":"ui-group__label-vQTcs","group__link":"ui-group__link-es5V7","group__meta":"ui-group__meta-LtC-u","group__list":"ui-group__list-YxBCG","row":"ui-row-3LH7X","row__media":"ui-row__media-AxZEh","row__name":"ui-row__name-75Wbq","row__marker":"ui-row__marker-RYHb-","jump":"ui-jump-vpGwB","jump__link":"ui-jump__link-rRnT6"};
10
+ const h = ({ children: s, className: a }) => /* @__PURE__ */ e("div", { className: p(r.directory, a), children: s }), j = /* @__PURE__ */ t(
11
+ /* @__PURE__ */ i(({ label: s, href: a, linkProps: l, meta: o, children: c, id: m }) => /* @__PURE__ */ n("section", { className: r.group, id: m, children: [
12
+ /* @__PURE__ */ n("header", { className: r.group__header, children: [
13
+ /* @__PURE__ */ e("h2", { className: r.group__label, children: a ? /* @__PURE__ */ e(d, { href: a, className: r.group__link, ...l, children: s }) : s }),
14
+ o && /* @__PURE__ */ e("span", { className: r.group__meta, children: o })
15
+ ] }),
16
+ /* @__PURE__ */ e("ul", { className: r.group__list, children: c })
17
+ ] })),
18
+ "DirectoryGroup"
19
+ ), J = /* @__PURE__ */ t(
20
+ /* @__PURE__ */ i(({ href: s, name: a, media: l, marker: o, linkProps: c, className: m }) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ n(d, { href: s, className: p(r.row, m), ...c, children: [
21
+ l && /* @__PURE__ */ e("span", { className: r.row__media, children: l }),
22
+ /* @__PURE__ */ e("span", { className: r.row__name, children: a }),
23
+ o && /* @__PURE__ */ e("span", { className: r.row__marker, children: o })
24
+ ] }) })),
25
+ "DirectoryRow"
26
+ ), k = /* @__PURE__ */ t(
27
+ /* @__PURE__ */ i(({ labels: s, toId: a, label: l }) => {
28
+ const { labels: o } = _();
29
+ return /* @__PURE__ */ e(
30
+ "nav",
31
+ {
32
+ className: r.jump,
33
+ "aria-label": u("DirectoryJump.label", l, o == null ? void 0 : o.directoryJump),
34
+ children: s.map((c) => /* @__PURE__ */ e("a", { href: `#${a(c)}`, className: r.jump__link, children: c }, c))
35
+ }
36
+ );
37
+ }),
38
+ "DirectoryJump"
39
+ ), v = /* @__PURE__ */ i(h);
40
+ export {
41
+ j as DirectoryGroup,
42
+ k as DirectoryJump,
43
+ J as DirectoryRow,
44
+ v as default
45
+ };
46
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/Directory/index.tsx"],"sourcesContent":["'use client';\n\nimport { type FC, memo, type ReactNode } from 'react';\n\nimport { cx } from '../../helpers/class-name.helper';\nimport { named } from '../../helpers/component.helper';\nimport { resolveLabel } from '../../helpers/label.helper';\nimport { useUi } from '../../theme/context';\nimport type { UiLinkExtraProps } from '../../types/link.type';\nimport UiLink from '../Link';\n\nimport styles from './index.module.scss';\n\ntype DirectoryProps = {\n children: ReactNode;\n className?: string;\n};\n\n/**\n * Dizin — harf veya konu başlıklı, gruplanmış bağlantı listesi.\n * @example <Directory> <DirectoryGroup label=\"A\"> <DirectoryRow href=\"/marka/ate\" name=\"ATE\"…\n */\nconst Directory: FC<DirectoryProps> = ({ children, className }) => (\n <div className={cx(styles.directory, className)}>{children}</div>\n);\n\ntype DirectoryGroupProps = {\n /** Grup başlığı: harf (\"A\", \"0-9\") veya konu (\"Fren sistemi\"). */\n label: string;\n /** Başlık kendisi bir hedefe götürüyorsa. */\n href?: string;\n /** Yönlendiriciye geçirilecek ek props. */\n linkProps?: UiLinkExtraProps;\n /** Başlığın sağında duran sayaç (\"14 alt kategori\"). */\n meta?: ReactNode;\n children: ReactNode;\n /** Çıpa hedefi: alfabe şeridinden atlamak için. */\n id?: string;\n};\n\n/** Dizin grubu. */\nexport const DirectoryGroup: FC<DirectoryGroupProps> = /*#__PURE__*/ named(\n /*#__PURE__*/ memo(({ label, href, linkProps, meta, children, id }) => (\n <section className={styles.group} id={id}>\n <header className={styles.group__header}>\n <h2 className={styles.group__label}>\n {href ? (\n <UiLink href={href} className={styles.group__link} {...linkProps}>\n {label}\n </UiLink>\n ) : (\n label\n )}\n </h2>\n {meta && <span className={styles.group__meta}>{meta}</span>}\n </header>\n\n <ul className={styles.group__list}>{children}</ul>\n </section>\n )),\n 'DirectoryGroup',\n);\n\ntype DirectoryRowProps = {\n href: string;\n name: string;\n /** Logo, ikon veya baş harf madalyonu. */\n media?: ReactNode;\n /** Sağ uçta duran işaret: rozet, kayıt sayısı. */\n marker?: ReactNode;\n /** Yönlendiriciye geçirilecek ek props. */\n linkProps?: UiLinkExtraProps;\n className?: string;\n};\n\n/** Dizin satırı — tek bir bağlantı. */\nexport const DirectoryRow: FC<DirectoryRowProps> = /*#__PURE__*/ named(\n /*#__PURE__*/ memo(({ href, name, media, marker, linkProps, className }) => (\n <li>\n <UiLink href={href} className={cx(styles.row, className)} {...linkProps}>\n {media && <span className={styles.row__media}>{media}</span>}\n <span className={styles.row__name}>{name}</span>\n {marker && <span className={styles.row__marker}>{marker}</span>}\n </UiLink>\n </li>\n )),\n 'DirectoryRow',\n);\n\ntype DirectoryJumpProps = {\n /** Grup etiketleri; her biri kendi çıpasına bağlanır. */\n labels: string[];\n /** Çıpa kimliğini üretir; `DirectoryGroup id` ile aynı olmalı. */\n toId: (label: string) => string;\n /** Şeridin erişilebilir adı. */\n label?: string;\n};\n\n/** Alfabe atlama şeridi. */\nexport const DirectoryJump: FC<DirectoryJumpProps> = /*#__PURE__*/ named(\n /*#__PURE__*/ memo(({ labels, toId, label }) => {\n /*\n * Prop adi `labels` (grup etiketleri) config'in adiyla cakisiyor; config `config` olarak\n * alinir.\n */\n const { labels: config } = useUi();\n\n return (\n <nav\n className={styles.jump}\n aria-label={resolveLabel('DirectoryJump.label', label, config?.directoryJump)}\n >\n {labels.map(item => (\n <a key={item} href={`#${toId(item)}`} className={styles.jump__link}>\n {item}\n </a>\n ))}\n </nav>\n );\n }),\n 'DirectoryJump',\n);\n\nexport default /*#__PURE__*/ memo(Directory) as typeof Directory;\n"],"names":["Directory","children","className","jsx","cx","styles","DirectoryGroup","named","memo","label","href","linkProps","meta","id","jsxs","UiLink","DirectoryRow","name","media","marker","DirectoryJump","labels","toId","config","useUi","resolveLabel","item","index"],"mappings":";;;;;;;;;AAqBA,MAAMA,IAAgC,CAAC,EAAE,UAAAC,GAAU,WAAAC,QACjD,gBAAAC,EAAC,OAAA,EAAI,WAAWC,EAAGC,EAAO,WAAWH,CAAS,GAAI,UAAAD,EAAA,CAAS,GAkBhDK,IAAwD,gBAAAC;AAAA,EACrD,gBAAAC,EAAK,CAAC,EAAE,OAAAC,GAAO,MAAAC,GAAM,WAAAC,GAAW,MAAAC,GAAM,UAAAX,GAAU,IAAAY,EAAA,MAC5D,gBAAAC,EAAC,WAAA,EAAQ,WAAWT,EAAO,OAAO,IAAAQ,GAChC,UAAA;AAAA,IAAA,gBAAAC,EAAC,UAAA,EAAO,WAAWT,EAAO,eACxB,UAAA;AAAA,MAAA,gBAAAF,EAAC,MAAA,EAAG,WAAWE,EAAO,cACnB,cACC,gBAAAF,EAACY,GAAA,EAAO,MAAAL,GAAY,WAAWL,EAAO,aAAc,GAAGM,GACpD,UAAAF,EAAA,CACH,IAEAA,GAEJ;AAAA,MACCG,KAAQ,gBAAAT,EAAC,QAAA,EAAK,WAAWE,EAAO,aAAc,UAAAO,EAAA,CAAK;AAAA,IAAA,GACtD;AAAA,IAEA,gBAAAT,EAAC,MAAA,EAAG,WAAWE,EAAO,aAAc,UAAAJ,EAAA,CAAS;AAAA,EAAA,EAAA,CAC/C,CACD;AAAA,EACD;AACF,GAeae,IAAoD,gBAAAT;AAAA,EACjD,gBAAAC,EAAK,CAAC,EAAE,MAAAE,GAAM,MAAAO,GAAM,OAAAC,GAAO,QAAAC,GAAQ,WAAAR,GAAW,WAAAT,EAAA,MAC1D,gBAAAC,EAAC,QACC,UAAA,gBAAAW,EAACC,GAAA,EAAO,MAAAL,GAAY,WAAWN,EAAGC,EAAO,KAAKH,CAAS,GAAI,GAAGS,GAC3D,UAAA;AAAA,IAAAO,KAAS,gBAAAf,EAAC,QAAA,EAAK,WAAWE,EAAO,YAAa,UAAAa,GAAM;AAAA,IACrD,gBAAAf,EAAC,QAAA,EAAK,WAAWE,EAAO,WAAY,UAAAY,GAAK;AAAA,IACxCE,KAAU,gBAAAhB,EAAC,QAAA,EAAK,WAAWE,EAAO,aAAc,UAAAc,EAAA,CAAO;AAAA,EAAA,EAAA,CAC1D,GACF,CACD;AAAA,EACD;AACF,GAYaC,IAAsD,gBAAAb;AAAA,oBAC9C,CAAC,EAAE,QAAAc,GAAQ,MAAAC,GAAM,OAAAb,QAAY;AAK9C,UAAM,EAAE,QAAQc,EAAA,IAAWC,EAAA;AAE3B,WACE,gBAAArB;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,WAAWE,EAAO;AAAA,QAClB,cAAYoB,EAAa,uBAAuBhB,GAAOc,KAAA,gBAAAA,EAAQ,aAAa;AAAA,QAE3E,YAAO,IAAI,CAAAG,MACV,gBAAAvB,EAAC,KAAA,EAAa,MAAM,IAAImB,EAAKI,CAAI,CAAC,IAAI,WAAWrB,EAAO,YACrD,UAAAqB,EAAA,GADKA,CAER,CACD;AAAA,MAAA;AAAA,IAAA;AAAA,EAGP,CAAC;AAAA,EACD;AACF,GAEAC,sBAAkC3B,CAAS;"}
@@ -0,0 +1 @@
1
+ @layer ui{.ui-directory-badEd{display:flex;flex-direction:column;gap:var(--ui-space-6)}.ui-group-i6An9{scroll-margin-top:0}.ui-group__header-rc19c{display:flex;align-items:center;gap:var(--ui-space-3);justify-content:space-between;padding-bottom:var(--ui-space-2);margin-bottom:var(--ui-space-3);border-bottom:1px solid var(--ui-border);position:sticky;top:var(--ui-header-height, 0px);z-index:1;background-color:var(--ui-page)}.ui-group__label-vQTcs{font-size:var(--ui-font-size-lg);font-weight:700;line-height:var(--ui-leading-tight);color:var(--ui-text);font-family:var(--ui-font-heading);letter-spacing:-.011em;margin:0;min-width:0}.ui-group__link-es5V7{color:inherit;text-decoration:none;transition:color var(--ui-duration-fast) var(--ui-ease-out)}.ui-group__link-es5V7:hover{color:var(--ui-link);text-decoration:underline;text-underline-offset:3px}@media (prefers-reduced-motion: reduce){.ui-group__link-es5V7{transition:none}}.ui-group__meta-LtC-u{font-size:var(--ui-font-size-xs);line-height:var(--ui-leading-normal);color:var(--ui-text-2);font-variant-numeric:tabular-nums;flex-shrink:0;white-space:nowrap}.ui-group__list-YxBCG{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:var(--ui-space-1);list-style:none;margin:0;padding:0}.ui-row-3LH7X{display:flex;align-items:center;gap:var(--ui-space-3);min-height:44px;padding:calc(var(--ui-space-2) + 1px) calc(var(--ui-space-3) + 1px);border-radius:var(--ui-radius-md);text-decoration:none;color:inherit;background-color:transparent;transition:background-color var(--ui-duration-fast) var(--ui-ease-out),translate var(--ui-duration-instant) var(--ui-ease-out)}.ui-row-3LH7X:hover:not(:disabled):not([aria-disabled=true]){background-color:var(--ui-surface-2)}.ui-row-3LH7X:active:not(:disabled):not([aria-disabled=true]){background-color:var(--ui-surface-3);translate:0 1px}@media (prefers-reduced-motion: reduce){.ui-row-3LH7X{transition:none}.ui-row-3LH7X:active:not(:disabled):not([aria-disabled=true]){translate:none}}.ui-row-3LH7X:focus-visible{outline:var(--ui-ring-width, 2px) solid var(--ui-ring-color);outline-offset:var(--ui-ring-offset, -2px)}@media (prefers-reduced-motion: reduce){.ui-row-3LH7X{transition:none}}.ui-row__media-AxZEh{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;flex-shrink:0;border-radius:var(--ui-radius-sm);background-color:var(--ui-surface-2);color:var(--ui-text-2);font-family:var(--ui-font-body);font-size:var(--ui-font-size-sm);font-weight:600;overflow:hidden}.ui-row__media-AxZEh img{object-fit:contain;width:100%;height:100%}.ui-row__name-75Wbq{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;flex:1;font-size:var(--ui-font-size-sm);color:var(--ui-text);transition:color var(--ui-duration-fast) var(--ui-ease-out)}@media (prefers-reduced-motion: reduce){.ui-row__name-75Wbq{transition:none}}.ui-row__marker-RYHb-{display:inline-flex;align-items:center;flex-shrink:0;font-size:var(--ui-font-size-xs);color:var(--ui-text-2);font-variant-numeric:tabular-nums}.ui-jump-vpGwB{display:flex;gap:var(--ui-space-1);position:relative;overflow-x:auto;scroll-snap-type:x proximity;-webkit-overflow-scrolling:touch;padding-block:var(--ui-space-1) var(--ui-space-3);scrollbar-width:none;-ms-overflow-style:none}.ui-jump-vpGwB::-webkit-scrollbar{display:none}.ui-jump-vpGwB>*{scroll-snap-align:start;flex-shrink:0}.ui-jump-vpGwB{position:sticky;top:var(--ui-header-height, 0px);z-index:10;background-color:var(--ui-page);border-bottom:1px solid var(--ui-border)}.ui-jump__link-rRnT6{display:inline-flex;align-items:center;justify-content:center;min-width:32px;min-height:32px;padding-inline:var(--ui-space-2);border-radius:var(--ui-radius-sm);font-family:var(--ui-font-body);font-size:var(--ui-font-size-sm);font-weight:600;color:var(--ui-text-2);text-decoration:none;transition:background-color var(--ui-duration-fast) var(--ui-ease-out),color var(--ui-duration-fast) var(--ui-ease-out)}.ui-jump__link-rRnT6:hover{background-color:var(--ui-surface-2);color:var(--ui-link)}.ui-jump__link-rRnT6:focus-visible{outline:var(--ui-ring-width, 2px) solid var(--ui-ring-color);outline-offset:var(--ui-ring-offset, 2px)}@media (prefers-reduced-motion: reduce){.ui-jump__link-rRnT6{transition:none}}.ui-jump-vpGwB~.ui-directory-badEd .ui-group-i6An9{scroll-margin-top:49px}.ui-jump-vpGwB~.ui-directory-badEd .ui-group__header-rc19c{top:calc(var(--ui-header-height, 0px) + 49px)}}
@@ -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"),r=require("react"),q=require("react-bootstrap-icons"),h=require("../../helpers/class-name.helper.cjs"),R=require("../../helpers/component.helper.cjs"),e={default:{"disclosure":"ui-disclosure-8-hqp","disclosure--framed":"ui-disclosure--framed-9MEX3","disclosure--disabled":"ui-disclosure--disabled-PuIjA","disclosure__summary":"ui-disclosure__summary-jIf2Z","disclosure__title":"ui-disclosure__title-ybejN","disclosure__meta":"ui-disclosure__meta-pnUle","disclosure__marker":"ui-disclosure__marker-8ZZ93","disclosure__panel":"ui-disclosure__panel-lQjb8","disclosure__content":"ui-disclosure__content-x33OL"}},y=({summary:f,meta:o,children:m,isOpen:d,isDefaultOpen:_=!1,onOpenChange:l,isDisabled:t,variant:x="framed",className:p,testId:j})=>{const[N,v]=r.useState(_),n=d!==void 0,c=n?d:N,u=r.useRef(null);return r.useEffect(()=>{u.current&&(u.current.open=c)}),s.jsxs("details",{ref:u,className:h.cx(e.default.disclosure,e.default[`disclosure--${x}`],t&&e.default["disclosure--disabled"],p),open:c,onToggle:a=>{const i=a.currentTarget.open;i!==c&&(n||v(i),l==null||l(i))},"data-testid":j,children:[s.jsxs("summary",{className:e.default.disclosure__summary,"aria-disabled":t,tabIndex:t?-1:void 0,onClick:a=>t&&a.preventDefault(),children:[s.jsx(q.CaretRightFill,{"aria-hidden":!0,className:e.default.disclosure__marker}),s.jsx("span",{className:e.default.disclosure__title,children:f}),o&&s.jsx("span",{className:e.default.disclosure__meta,children:o})]}),s.jsx("div",{className:e.default.disclosure__panel,children:s.jsx("div",{className:e.default.disclosure__content,children:m})})]})},S=r.memo(R.named(y,"Disclosure"));exports.default=S;
2
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/components/Disclosure/index.tsx"],"sourcesContent":["'use client';\n\nimport { type FC, memo, type ReactNode, useEffect, useRef, useState } from 'react';\n\nimport { CaretRightFill } from 'react-bootstrap-icons';\n\nimport { cx } from '../../helpers/class-name.helper';\nimport { named } from '../../helpers/component.helper';\n\nimport styles from './index.module.scss';\n\nexport type DisclosureVariant = 'framed' | 'plain';\n\ntype Props = {\n /** Başlık satırı — tıklanabilir olan bu. */\n summary: ReactNode;\n /** Başlığın sağında duran ikincil bilgi (süre, sayaç, rozet). */\n meta?: ReactNode;\n children: ReactNode;\n /**\n * Kontrollü kullanım; `onOpenChange` ile birlikte verilir.\n * ⚠ Ebeveyn `onOpenChange`i yok sayarsa DOM bir sonraki render'da prop'a döner, AYNI tuş vuruşunda\n * değil: `toggle` olayı eşzamansız ve anında geri çevirmek kendi `toggle`ıyla yarışıyordu.\n */\n isOpen?: boolean;\n /** Kontrolsüz kullanımda açılış durumu (boolean prop adı `is*` — API kuralı). */\n isDefaultOpen?: boolean;\n onOpenChange?: (isOpen: boolean) => void;\n isDisabled?: boolean;\n /** `framed` kendi kenarlığı ve zemini olan kutu; `plain` kenarlıksız satır (liste içinde). */\n variant?: DisclosureVariant;\n className?: string;\n testId?: string;\n};\n\n/**\n * Tek başına açılır-kapanır bölüm — yerel `<details>` / `<summary>`.\n *\n * Klavye: `Enter` / `Space` başlıkta açar-kapar (tarayıcının kendi davranışı).\n *\n * ⚠ Yerel öğe bilinçli: odak, klavye ve ekran okuyucunun \"genişletildi / daraltıldı\" duyurusu\n * tarayıcıdan geliyor. Taklit bir `button[aria-expanded]` bunları yeniden yazmak demekti.\n */\nconst Disclosure: FC<Props> = ({\n summary,\n meta,\n children,\n isOpen: controlledOpen,\n isDefaultOpen = false,\n onOpenChange,\n isDisabled,\n variant = 'framed',\n className,\n testId,\n}) => {\n const [uncontrolledOpen, setUncontrolledOpen] = useState(isDefaultOpen);\n\n const isControlled = controlledOpen !== undefined;\n const isOpen = isControlled ? controlledOpen : uncontrolledOpen;\n\n /*\n * `<details>` YERLI bir aciliyor/kapaniyor ogesi: kullanici tikladiginda DOM ozelligini TARAYICI\n * degistirir. `open` PROP'U TEK BASINA YETMEZ — React ayni degeri ikinci kez yazmadigi icin\n * kontrollu kipte kalici desenkronizasyon uretiyordu; surekliligi bu effect tutar.\n */\n const detailsRef = useRef<HTMLDetailsElement>(null);\n\n useEffect(() => {\n if (detailsRef.current) detailsRef.current.open = isOpen;\n });\n\n return (\n <details\n ref={detailsRef}\n className={cx(\n styles.disclosure,\n styles[`disclosure--${variant}`],\n isDisabled && styles['disclosure--disabled'],\n className,\n )}\n /* Ilk boyama ve SSR icin. */\n open={isOpen}\n /*\n * `onToggle` YEREL olaydir ve tarayici durumu DEGISTIRDIKTEN sonra dusuyor. `onClick` ile\n * yakalamak yetmiyordu: klavyeyle acilan bolum (Enter/Space) da buradan gecer.\n */\n onToggle={event => {\n const next = (event.currentTarget as HTMLDetailsElement).open;\n if (next === isOpen) return;\n\n if (!isControlled) setUncontrolledOpen(next);\n onOpenChange?.(next);\n }}\n data-testid={testId}\n >\n <summary\n className={styles.disclosure__summary}\n /* Pasif bolum: `<summary>`nin `disabled` hali YOK. */\n aria-disabled={isDisabled}\n tabIndex={isDisabled ? -1 : undefined}\n onClick={event => isDisabled && event.preventDefault()}\n >\n <CaretRightFill aria-hidden className={styles.disclosure__marker} />\n\n <span className={styles.disclosure__title}>{summary}</span>\n {meta && <span className={styles.disclosure__meta}>{meta}</span>}\n </summary>\n\n {/*\n Ic sarmalayici ZORUNLU: yukseklik gecisi `<details>`in KENDISINE verilemez (isaretcinin\n yuksekligi de gecise girip basligi titretiyordu).\n */}\n <div className={styles.disclosure__panel}>\n <div className={styles.disclosure__content}>{children}</div>\n </div>\n </details>\n );\n};\n\nexport default /*#__PURE__*/ memo(\n /*#__PURE__*/ named(Disclosure, 'Disclosure'),\n) as typeof Disclosure;\n"],"names":["Disclosure","summary","meta","children","controlledOpen","isDefaultOpen","onOpenChange","isDisabled","variant","className","testId","uncontrolledOpen","setUncontrolledOpen","useState","isControlled","isOpen","detailsRef","useRef","useEffect","jsxs","cx","styles","event","next","jsx","CaretRightFill","memo","named"],"mappings":"0VA0CMA,EAAwB,CAAC,CAC7B,QAAAC,EACA,KAAAC,EACA,SAAAC,EACA,OAAQC,EACR,cAAAC,EAAgB,GAChB,aAAAC,EACA,WAAAC,EACA,QAAAC,EAAU,SACV,UAAAC,EACA,OAAAC,CACF,IAAM,CACJ,KAAM,CAACC,EAAkBC,CAAmB,EAAIC,EAAAA,SAASR,CAAa,EAEhES,EAAeV,IAAmB,OAClCW,EAASD,EAAeV,EAAiBO,EAOzCK,EAAaC,EAAAA,OAA2B,IAAI,EAElDC,OAAAA,EAAAA,UAAU,IAAM,CACVF,EAAW,UAASA,EAAW,QAAQ,KAAOD,EACpD,CAAC,EAGCI,EAAAA,KAAC,UAAA,CACC,IAAKH,EACL,UAAWI,EAAAA,GACTC,EAAAA,QAAO,WACPA,EAAAA,QAAO,eAAeb,CAAO,EAAE,EAC/BD,GAAcc,EAAAA,QAAO,sBAAsB,EAC3CZ,CAAA,EAGF,KAAMM,EAKN,SAAUO,GAAS,CACjB,MAAMC,EAAQD,EAAM,cAAqC,KACrDC,IAASR,IAERD,GAAcF,EAAoBW,CAAI,EAC3CjB,GAAA,MAAAA,EAAeiB,GACjB,EACA,cAAab,EAEb,SAAA,CAAAS,EAAAA,KAAC,UAAA,CACC,UAAWE,EAAAA,QAAO,oBAElB,gBAAed,EACf,SAAUA,EAAa,GAAK,OAC5B,QAASe,GAASf,GAAce,EAAM,eAAA,EAEtC,SAAA,CAAAE,EAAAA,IAACC,EAAAA,eAAA,CAAe,cAAW,GAAC,UAAWJ,EAAAA,QAAO,mBAAoB,EAElEG,EAAAA,IAAC,OAAA,CAAK,UAAWH,EAAAA,QAAO,kBAAoB,SAAApB,EAAQ,EACnDC,GAAQsB,EAAAA,IAAC,OAAA,CAAK,UAAWH,EAAAA,QAAO,iBAAmB,SAAAnB,CAAA,CAAK,CAAA,CAAA,CAAA,EAO3DsB,EAAAA,IAAC,MAAA,CAAI,UAAWH,EAAAA,QAAO,kBACrB,SAAAG,EAAAA,IAAC,MAAA,CAAI,UAAWH,EAAAA,QAAO,oBAAsB,SAAAlB,CAAA,CAAS,CAAA,CACxD,CAAA,CAAA,CAAA,CAGN,EAEAH,EAA6B0B,EAAAA,KACbC,EAAAA,MAAM3B,EAAY,YAAY,CAC9C"}
@@ -0,0 +1,34 @@
1
+ import { FC, ReactNode } from 'react';
2
+ export type DisclosureVariant = 'framed' | 'plain';
3
+ type Props = {
4
+ /** Başlık satırı — tıklanabilir olan bu. */
5
+ summary: ReactNode;
6
+ /** Başlığın sağında duran ikincil bilgi (süre, sayaç, rozet). */
7
+ meta?: ReactNode;
8
+ children: ReactNode;
9
+ /**
10
+ * Kontrollü kullanım; `onOpenChange` ile birlikte verilir.
11
+ * ⚠ Ebeveyn `onOpenChange`i yok sayarsa DOM bir sonraki render'da prop'a döner, AYNI tuş vuruşunda
12
+ * değil: `toggle` olayı eşzamansız ve anında geri çevirmek kendi `toggle`ıyla yarışıyordu.
13
+ */
14
+ isOpen?: boolean;
15
+ /** Kontrolsüz kullanımda açılış durumu (boolean prop adı `is*` — API kuralı). */
16
+ isDefaultOpen?: boolean;
17
+ onOpenChange?: (isOpen: boolean) => void;
18
+ isDisabled?: boolean;
19
+ /** `framed` kendi kenarlığı ve zemini olan kutu; `plain` kenarlıksız satır (liste içinde). */
20
+ variant?: DisclosureVariant;
21
+ className?: string;
22
+ testId?: string;
23
+ };
24
+ /**
25
+ * Tek başına açılır-kapanır bölüm — yerel `<details>` / `<summary>`.
26
+ *
27
+ * Klavye: `Enter` / `Space` başlıkta açar-kapar (tarayıcının kendi davranışı).
28
+ *
29
+ * ⚠ Yerel öğe bilinçli: odak, klavye ve ekran okuyucunun "genişletildi / daraltıldı" duyurusu
30
+ * tarayıcıdan geliyor. Taklit bir `button[aria-expanded]` bunları yeniden yazmak demekti.
31
+ */
32
+ declare const Disclosure: FC<Props>;
33
+ declare const _default: typeof Disclosure;
34
+ export default _default;
@@ -0,0 +1,64 @@
1
+ "use client";
2
+ import { jsxs as m, jsx as s } from "react/jsx-runtime";
3
+ import { memo as y, useState as R, useRef as j, useEffect as k } from "react";
4
+ import { CaretRightFill as T } from "react-bootstrap-icons";
5
+ import { cx as $ } from "../../helpers/class-name.helper.js";
6
+ import { named as D } from "../../helpers/component.helper.js";
7
+ const e = {"disclosure":"ui-disclosure-8-hqp","disclosure--framed":"ui-disclosure--framed-9MEX3","disclosure--disabled":"ui-disclosure--disabled-PuIjA","disclosure__summary":"ui-disclosure__summary-jIf2Z","disclosure__title":"ui-disclosure__title-ybejN","disclosure__meta":"ui-disclosure__meta-pnUle","disclosure__marker":"ui-disclosure__marker-8ZZ93","disclosure__panel":"ui-disclosure__panel-lQjb8","disclosure__content":"ui-disclosure__content-x33OL"};
8
+ const E = ({
9
+ summary: u,
10
+ meta: a,
11
+ children: f,
12
+ isOpen: d,
13
+ isDefaultOpen: p = !1,
14
+ onOpenChange: t,
15
+ isDisabled: r,
16
+ variant: _ = "framed",
17
+ className: N,
18
+ testId: x
19
+ }) => {
20
+ const [v, h] = R(p), n = d !== void 0, l = n ? d : v, o = j(null);
21
+ return k(() => {
22
+ o.current && (o.current.open = l);
23
+ }), /* @__PURE__ */ m(
24
+ "details",
25
+ {
26
+ ref: o,
27
+ className: $(
28
+ e.disclosure,
29
+ e[`disclosure--${_}`],
30
+ r && e["disclosure--disabled"],
31
+ N
32
+ ),
33
+ open: l,
34
+ onToggle: (c) => {
35
+ const i = c.currentTarget.open;
36
+ i !== l && (n || h(i), t == null || t(i));
37
+ },
38
+ "data-testid": x,
39
+ children: [
40
+ /* @__PURE__ */ m(
41
+ "summary",
42
+ {
43
+ className: e.disclosure__summary,
44
+ "aria-disabled": r,
45
+ tabIndex: r ? -1 : void 0,
46
+ onClick: (c) => r && c.preventDefault(),
47
+ children: [
48
+ /* @__PURE__ */ s(T, { "aria-hidden": !0, className: e.disclosure__marker }),
49
+ /* @__PURE__ */ s("span", { className: e.disclosure__title, children: u }),
50
+ a && /* @__PURE__ */ s("span", { className: e.disclosure__meta, children: a })
51
+ ]
52
+ }
53
+ ),
54
+ /* @__PURE__ */ s("div", { className: e.disclosure__panel, children: /* @__PURE__ */ s("div", { className: e.disclosure__content, children: f }) })
55
+ ]
56
+ }
57
+ );
58
+ }, q = /* @__PURE__ */ y(
59
+ /* @__PURE__ */ D(E, "Disclosure")
60
+ );
61
+ export {
62
+ q as default
63
+ };
64
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/Disclosure/index.tsx"],"sourcesContent":["'use client';\n\nimport { type FC, memo, type ReactNode, useEffect, useRef, useState } from 'react';\n\nimport { CaretRightFill } from 'react-bootstrap-icons';\n\nimport { cx } from '../../helpers/class-name.helper';\nimport { named } from '../../helpers/component.helper';\n\nimport styles from './index.module.scss';\n\nexport type DisclosureVariant = 'framed' | 'plain';\n\ntype Props = {\n /** Başlık satırı — tıklanabilir olan bu. */\n summary: ReactNode;\n /** Başlığın sağında duran ikincil bilgi (süre, sayaç, rozet). */\n meta?: ReactNode;\n children: ReactNode;\n /**\n * Kontrollü kullanım; `onOpenChange` ile birlikte verilir.\n * ⚠ Ebeveyn `onOpenChange`i yok sayarsa DOM bir sonraki render'da prop'a döner, AYNI tuş vuruşunda\n * değil: `toggle` olayı eşzamansız ve anında geri çevirmek kendi `toggle`ıyla yarışıyordu.\n */\n isOpen?: boolean;\n /** Kontrolsüz kullanımda açılış durumu (boolean prop adı `is*` — API kuralı). */\n isDefaultOpen?: boolean;\n onOpenChange?: (isOpen: boolean) => void;\n isDisabled?: boolean;\n /** `framed` kendi kenarlığı ve zemini olan kutu; `plain` kenarlıksız satır (liste içinde). */\n variant?: DisclosureVariant;\n className?: string;\n testId?: string;\n};\n\n/**\n * Tek başına açılır-kapanır bölüm — yerel `<details>` / `<summary>`.\n *\n * Klavye: `Enter` / `Space` başlıkta açar-kapar (tarayıcının kendi davranışı).\n *\n * ⚠ Yerel öğe bilinçli: odak, klavye ve ekran okuyucunun \"genişletildi / daraltıldı\" duyurusu\n * tarayıcıdan geliyor. Taklit bir `button[aria-expanded]` bunları yeniden yazmak demekti.\n */\nconst Disclosure: FC<Props> = ({\n summary,\n meta,\n children,\n isOpen: controlledOpen,\n isDefaultOpen = false,\n onOpenChange,\n isDisabled,\n variant = 'framed',\n className,\n testId,\n}) => {\n const [uncontrolledOpen, setUncontrolledOpen] = useState(isDefaultOpen);\n\n const isControlled = controlledOpen !== undefined;\n const isOpen = isControlled ? controlledOpen : uncontrolledOpen;\n\n /*\n * `<details>` YERLI bir aciliyor/kapaniyor ogesi: kullanici tikladiginda DOM ozelligini TARAYICI\n * degistirir. `open` PROP'U TEK BASINA YETMEZ — React ayni degeri ikinci kez yazmadigi icin\n * kontrollu kipte kalici desenkronizasyon uretiyordu; surekliligi bu effect tutar.\n */\n const detailsRef = useRef<HTMLDetailsElement>(null);\n\n useEffect(() => {\n if (detailsRef.current) detailsRef.current.open = isOpen;\n });\n\n return (\n <details\n ref={detailsRef}\n className={cx(\n styles.disclosure,\n styles[`disclosure--${variant}`],\n isDisabled && styles['disclosure--disabled'],\n className,\n )}\n /* Ilk boyama ve SSR icin. */\n open={isOpen}\n /*\n * `onToggle` YEREL olaydir ve tarayici durumu DEGISTIRDIKTEN sonra dusuyor. `onClick` ile\n * yakalamak yetmiyordu: klavyeyle acilan bolum (Enter/Space) da buradan gecer.\n */\n onToggle={event => {\n const next = (event.currentTarget as HTMLDetailsElement).open;\n if (next === isOpen) return;\n\n if (!isControlled) setUncontrolledOpen(next);\n onOpenChange?.(next);\n }}\n data-testid={testId}\n >\n <summary\n className={styles.disclosure__summary}\n /* Pasif bolum: `<summary>`nin `disabled` hali YOK. */\n aria-disabled={isDisabled}\n tabIndex={isDisabled ? -1 : undefined}\n onClick={event => isDisabled && event.preventDefault()}\n >\n <CaretRightFill aria-hidden className={styles.disclosure__marker} />\n\n <span className={styles.disclosure__title}>{summary}</span>\n {meta && <span className={styles.disclosure__meta}>{meta}</span>}\n </summary>\n\n {/*\n Ic sarmalayici ZORUNLU: yukseklik gecisi `<details>`in KENDISINE verilemez (isaretcinin\n yuksekligi de gecise girip basligi titretiyordu).\n */}\n <div className={styles.disclosure__panel}>\n <div className={styles.disclosure__content}>{children}</div>\n </div>\n </details>\n );\n};\n\nexport default /*#__PURE__*/ memo(\n /*#__PURE__*/ named(Disclosure, 'Disclosure'),\n) as typeof Disclosure;\n"],"names":["Disclosure","summary","meta","children","controlledOpen","isDefaultOpen","onOpenChange","isDisabled","variant","className","testId","uncontrolledOpen","setUncontrolledOpen","useState","isControlled","isOpen","detailsRef","useRef","useEffect","jsxs","cx","styles","event","next","jsx","CaretRightFill","Disclosure$1","memo","named"],"mappings":";;;;;;;AA0CA,MAAMA,IAAwB,CAAC;AAAA,EAC7B,SAAAC;AAAA,EACA,MAAAC;AAAA,EACA,UAAAC;AAAA,EACA,QAAQC;AAAA,EACR,eAAAC,IAAgB;AAAA,EAChB,cAAAC;AAAA,EACA,YAAAC;AAAA,EACA,SAAAC,IAAU;AAAA,EACV,WAAAC;AAAA,EACA,QAAAC;AACF,MAAM;AACJ,QAAM,CAACC,GAAkBC,CAAmB,IAAIC,EAASR,CAAa,GAEhES,IAAeV,MAAmB,QAClCW,IAASD,IAAeV,IAAiBO,GAOzCK,IAAaC,EAA2B,IAAI;AAElD,SAAAC,EAAU,MAAM;AACd,IAAIF,EAAW,YAASA,EAAW,QAAQ,OAAOD;AAAA,EACpD,CAAC,GAGC,gBAAAI;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,KAAKH;AAAA,MACL,WAAWI;AAAA,QACTC,EAAO;AAAA,QACPA,EAAO,eAAeb,CAAO,EAAE;AAAA,QAC/BD,KAAcc,EAAO,sBAAsB;AAAA,QAC3CZ;AAAA,MAAA;AAAA,MAGF,MAAMM;AAAA,MAKN,UAAU,CAAAO,MAAS;AACjB,cAAMC,IAAQD,EAAM,cAAqC;AACzD,QAAIC,MAASR,MAERD,KAAcF,EAAoBW,CAAI,GAC3CjB,KAAA,QAAAA,EAAeiB;AAAA,MACjB;AAAA,MACA,eAAab;AAAA,MAEb,UAAA;AAAA,QAAA,gBAAAS;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,WAAWE,EAAO;AAAA,YAElB,iBAAed;AAAA,YACf,UAAUA,IAAa,KAAK;AAAA,YAC5B,SAAS,CAAAe,MAASf,KAAce,EAAM,eAAA;AAAA,YAEtC,UAAA;AAAA,cAAA,gBAAAE,EAACC,GAAA,EAAe,eAAW,IAAC,WAAWJ,EAAO,oBAAoB;AAAA,cAElE,gBAAAG,EAAC,QAAA,EAAK,WAAWH,EAAO,mBAAoB,UAAApB,GAAQ;AAAA,cACnDC,KAAQ,gBAAAsB,EAAC,QAAA,EAAK,WAAWH,EAAO,kBAAmB,UAAAnB,EAAA,CAAK;AAAA,YAAA;AAAA,UAAA;AAAA,QAAA;AAAA,QAO3D,gBAAAsB,EAAC,OAAA,EAAI,WAAWH,EAAO,mBACrB,UAAA,gBAAAG,EAAC,OAAA,EAAI,WAAWH,EAAO,qBAAsB,UAAAlB,EAAA,CAAS,EAAA,CACxD;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN,GAEAuB,IAA6B,gBAAAC;AAAA,EACb,gBAAAC,EAAM5B,GAAY,YAAY;AAC9C;"}