@accelint/design-toolkit 9.7.0 → 9.8.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 (890) hide show
  1. package/catalog-info.yaml +4 -4
  2. package/dist/components/accordion/context.d.ts +3 -3
  3. package/dist/components/accordion/context.js +1 -1
  4. package/dist/components/accordion/context.js.map +1 -1
  5. package/dist/components/accordion/group.d.ts +3 -3
  6. package/dist/components/accordion/group.js +1 -1
  7. package/dist/components/accordion/group.js.map +1 -1
  8. package/dist/components/accordion/header.d.ts +3 -3
  9. package/dist/components/accordion/header.js +1 -1
  10. package/dist/components/accordion/header.js.map +1 -1
  11. package/dist/components/accordion/index.d.ts +3 -3
  12. package/dist/components/accordion/index.js +1 -1
  13. package/dist/components/accordion/index.js.map +1 -1
  14. package/dist/components/accordion/panel.d.ts +3 -3
  15. package/dist/components/accordion/panel.js +1 -1
  16. package/dist/components/accordion/panel.js.map +1 -1
  17. package/dist/components/accordion/styles.module.css +1 -1
  18. package/dist/components/accordion/trigger.d.ts +3 -3
  19. package/dist/components/accordion/trigger.js +1 -1
  20. package/dist/components/accordion/trigger.js.map +1 -1
  21. package/dist/components/accordion/types.d.ts +1 -1
  22. package/dist/components/accordion/types.js +1 -1
  23. package/dist/components/action-bar/index.d.ts +3 -3
  24. package/dist/components/action-bar/index.js +1 -1
  25. package/dist/components/action-bar/index.js.map +1 -1
  26. package/dist/components/action-bar/styles.module.css +1 -1
  27. package/dist/components/action-bar/types.d.ts +1 -1
  28. package/dist/components/action-bar/types.js +1 -1
  29. package/dist/components/audio/index.d.ts +3 -3
  30. package/dist/components/audio/index.js +4 -9
  31. package/dist/components/audio/index.js.map +1 -1
  32. package/dist/components/audio/types.d.ts +1 -1
  33. package/dist/components/audio/types.js +1 -1
  34. package/dist/components/avatar/context.d.ts +5 -5
  35. package/dist/components/avatar/context.js +1 -1
  36. package/dist/components/avatar/context.js.map +1 -1
  37. package/dist/components/avatar/index.d.ts +3 -3
  38. package/dist/components/avatar/index.js +1 -1
  39. package/dist/components/avatar/index.js.map +1 -1
  40. package/dist/components/avatar/styles.module.css +1 -1
  41. package/dist/components/avatar/types.d.ts +1 -1
  42. package/dist/components/avatar/types.js +1 -1
  43. package/dist/components/badge/context.d.ts +5 -5
  44. package/dist/components/badge/context.js +1 -1
  45. package/dist/components/badge/context.js.map +1 -1
  46. package/dist/components/badge/index.d.ts +3 -3
  47. package/dist/components/badge/index.js +1 -1
  48. package/dist/components/badge/index.js.map +1 -1
  49. package/dist/components/badge/styles.module.css +1 -1
  50. package/dist/components/badge/types.d.ts +1 -1
  51. package/dist/components/badge/types.js +1 -1
  52. package/dist/components/breadcrumbs/index.d.ts +3 -3
  53. package/dist/components/breadcrumbs/index.js +1 -1
  54. package/dist/components/breadcrumbs/index.js.map +1 -1
  55. package/dist/components/breadcrumbs/item.d.ts +3 -3
  56. package/dist/components/breadcrumbs/item.js +1 -1
  57. package/dist/components/breadcrumbs/item.js.map +1 -1
  58. package/dist/components/breadcrumbs/styles.module.css +1 -1
  59. package/dist/components/breadcrumbs/types.d.ts +1 -1
  60. package/dist/components/breadcrumbs/types.js +1 -1
  61. package/dist/components/button/__internal__/clear.js +1 -1
  62. package/dist/components/button/__internal__/clear.js.map +1 -1
  63. package/dist/components/button/__internal__/styles.module.css +1 -1
  64. package/dist/components/button/context.d.ts +9 -9
  65. package/dist/components/button/context.js +1 -1
  66. package/dist/components/button/context.js.map +1 -1
  67. package/dist/components/button/index.d.ts +3 -3
  68. package/dist/components/button/index.js +1 -1
  69. package/dist/components/button/index.js.map +1 -1
  70. package/dist/components/button/link.d.ts +3 -3
  71. package/dist/components/button/link.js +1 -1
  72. package/dist/components/button/link.js.map +1 -1
  73. package/dist/components/button/styles.module.css +1 -1
  74. package/dist/components/button/toggle.d.ts +3 -3
  75. package/dist/components/button/toggle.js +1 -1
  76. package/dist/components/button/toggle.js.map +1 -1
  77. package/dist/components/button/types.d.ts +1 -1
  78. package/dist/components/button/types.js +1 -1
  79. package/dist/components/checkbox/context.d.ts +4 -4
  80. package/dist/components/checkbox/context.js +1 -1
  81. package/dist/components/checkbox/context.js.map +1 -1
  82. package/dist/components/checkbox/group.d.ts +3 -3
  83. package/dist/components/checkbox/group.js +13 -10
  84. package/dist/components/checkbox/group.js.map +1 -1
  85. package/dist/components/checkbox/index.d.ts +3 -3
  86. package/dist/components/checkbox/index.js +3 -3
  87. package/dist/components/checkbox/index.js.map +1 -1
  88. package/dist/components/checkbox/styles.module.css +8 -2
  89. package/dist/components/checkbox/types.d.ts +5 -1
  90. package/dist/components/checkbox/types.js +1 -1
  91. package/dist/components/chip/context.d.ts +5 -5
  92. package/dist/components/chip/context.js +1 -1
  93. package/dist/components/chip/context.js.map +1 -1
  94. package/dist/components/chip/deletable.d.ts +3 -3
  95. package/dist/components/chip/deletable.js +1 -1
  96. package/dist/components/chip/deletable.js.map +1 -1
  97. package/dist/components/chip/index.d.ts +1 -1
  98. package/dist/components/chip/index.js +1 -1
  99. package/dist/components/chip/index.js.map +1 -1
  100. package/dist/components/chip/list.d.ts +5 -5
  101. package/dist/components/chip/list.js +1 -1
  102. package/dist/components/chip/list.js.map +1 -1
  103. package/dist/components/chip/selectable.d.ts +3 -3
  104. package/dist/components/chip/selectable.js +1 -1
  105. package/dist/components/chip/selectable.js.map +1 -1
  106. package/dist/components/chip/styles.module.css +1 -1
  107. package/dist/components/chip/types.d.ts +1 -1
  108. package/dist/components/chip/types.js +1 -1
  109. package/dist/components/classification-badge/context.d.ts +5 -5
  110. package/dist/components/classification-badge/context.js +1 -1
  111. package/dist/components/classification-badge/context.js.map +1 -1
  112. package/dist/components/classification-badge/index.d.ts +3 -3
  113. package/dist/components/classification-badge/index.js +1 -1
  114. package/dist/components/classification-badge/index.js.map +1 -1
  115. package/dist/components/classification-badge/styles.module.css +1 -1
  116. package/dist/components/classification-badge/types.d.ts +1 -1
  117. package/dist/components/classification-badge/types.js +1 -1
  118. package/dist/components/classification-banner/context.d.ts +5 -5
  119. package/dist/components/classification-banner/context.js +1 -1
  120. package/dist/components/classification-banner/context.js.map +1 -1
  121. package/dist/components/classification-banner/index.d.ts +3 -3
  122. package/dist/components/classification-banner/index.js +1 -1
  123. package/dist/components/classification-banner/index.js.map +1 -1
  124. package/dist/components/classification-banner/styles.module.css +1 -1
  125. package/dist/components/classification-banner/types.d.ts +1 -1
  126. package/dist/components/classification-banner/types.js +1 -1
  127. package/dist/components/clock/index.d.ts +3 -3
  128. package/dist/components/clock/index.js +1 -1
  129. package/dist/components/clock/index.js.map +1 -1
  130. package/dist/components/clock/types.d.ts +1 -1
  131. package/dist/components/clock/types.js +1 -1
  132. package/dist/components/color-picker/index.d.ts +3 -3
  133. package/dist/components/color-picker/index.js +1 -1
  134. package/dist/components/color-picker/index.js.map +1 -1
  135. package/dist/components/color-picker/styles.module.css +1 -1
  136. package/dist/components/color-picker/types.d.ts +1 -1
  137. package/dist/components/color-picker/types.js +1 -1
  138. package/dist/components/combobox-field/context.d.ts +5 -5
  139. package/dist/components/combobox-field/context.js +1 -1
  140. package/dist/components/combobox-field/context.js.map +1 -1
  141. package/dist/components/combobox-field/index.d.ts +3 -3
  142. package/dist/components/combobox-field/index.js +1 -1
  143. package/dist/components/combobox-field/index.js.map +1 -1
  144. package/dist/components/combobox-field/styles.module.css +1 -1
  145. package/dist/components/combobox-field/types.d.ts +1 -1
  146. package/dist/components/combobox-field/types.js +1 -1
  147. package/dist/components/coordinate-field/context.d.ts +7 -7
  148. package/dist/components/coordinate-field/context.js +1 -1
  149. package/dist/components/coordinate-field/context.js.map +1 -1
  150. package/dist/components/coordinate-field/coordinate-utils.d.ts +1 -1
  151. package/dist/components/coordinate-field/coordinate-utils.js +9 -14
  152. package/dist/components/coordinate-field/coordinate-utils.js.map +1 -1
  153. package/dist/components/coordinate-field/index.d.ts +3 -3
  154. package/dist/components/coordinate-field/index.js +2 -3
  155. package/dist/components/coordinate-field/index.js.map +1 -1
  156. package/dist/components/coordinate-field/segment-configs.d.ts +1 -1
  157. package/dist/components/coordinate-field/segment-configs.js +1 -1
  158. package/dist/components/coordinate-field/segment-configs.js.map +1 -1
  159. package/dist/components/coordinate-field/segment.d.ts +3 -3
  160. package/dist/components/coordinate-field/segment.js +1 -1
  161. package/dist/components/coordinate-field/segment.js.map +1 -1
  162. package/dist/components/coordinate-field/styles.module.css +1 -1
  163. package/dist/components/coordinate-field/types.d.ts +1 -1
  164. package/dist/components/coordinate-field/types.js +1 -1
  165. package/dist/components/coordinate-field/types.js.map +1 -1
  166. package/dist/components/coordinate-field/width-utils.d.ts +1 -1
  167. package/dist/components/coordinate-field/width-utils.js +1 -1
  168. package/dist/components/coordinate-field/width-utils.js.map +1 -1
  169. package/dist/components/date-field/index.d.ts +3 -3
  170. package/dist/components/date-field/index.js +1 -1
  171. package/dist/components/date-field/index.js.map +1 -1
  172. package/dist/components/date-field/styles.module.css +1 -1
  173. package/dist/components/date-field/types.d.ts +1 -1
  174. package/dist/components/date-field/types.js +1 -1
  175. package/dist/components/deferred-collection/index.d.ts +3 -3
  176. package/dist/components/deferred-collection/index.js +1 -1
  177. package/dist/components/deferred-collection/index.js.map +1 -1
  178. package/dist/components/deferred-collection/types.d.ts +1 -1
  179. package/dist/components/deferred-collection/types.js +1 -1
  180. package/dist/components/details-list/context.d.ts +5 -5
  181. package/dist/components/details-list/context.js +1 -1
  182. package/dist/components/details-list/context.js.map +1 -1
  183. package/dist/components/details-list/index.d.ts +3 -3
  184. package/dist/components/details-list/index.js +1 -1
  185. package/dist/components/details-list/index.js.map +1 -1
  186. package/dist/components/details-list/label.d.ts +3 -3
  187. package/dist/components/details-list/label.js +1 -1
  188. package/dist/components/details-list/label.js.map +1 -1
  189. package/dist/components/details-list/styles.module.css +1 -1
  190. package/dist/components/details-list/types.d.ts +1 -1
  191. package/dist/components/details-list/types.js +1 -1
  192. package/dist/components/details-list/value.d.ts +3 -3
  193. package/dist/components/details-list/value.js +1 -1
  194. package/dist/components/details-list/value.js.map +1 -1
  195. package/dist/components/dialog/content.d.ts +3 -3
  196. package/dist/components/dialog/content.js +1 -1
  197. package/dist/components/dialog/content.js.map +1 -1
  198. package/dist/components/dialog/context.d.ts +3 -3
  199. package/dist/components/dialog/context.js +1 -1
  200. package/dist/components/dialog/context.js.map +1 -1
  201. package/dist/components/dialog/footer.d.ts +3 -3
  202. package/dist/components/dialog/footer.js +1 -1
  203. package/dist/components/dialog/footer.js.map +1 -1
  204. package/dist/components/dialog/index.d.ts +3 -3
  205. package/dist/components/dialog/index.js +1 -1
  206. package/dist/components/dialog/index.js.map +1 -1
  207. package/dist/components/dialog/styles.module.css +1 -1
  208. package/dist/components/dialog/title.d.ts +3 -3
  209. package/dist/components/dialog/title.js +1 -1
  210. package/dist/components/dialog/title.js.map +1 -1
  211. package/dist/components/dialog/trigger.d.ts +1 -1
  212. package/dist/components/dialog/trigger.js +1 -1
  213. package/dist/components/dialog/trigger.js.map +1 -1
  214. package/dist/components/dialog/types.d.ts +1 -1
  215. package/dist/components/dialog/types.js +1 -1
  216. package/dist/components/divider/context.d.ts +5 -5
  217. package/dist/components/divider/context.js +1 -1
  218. package/dist/components/divider/context.js.map +1 -1
  219. package/dist/components/divider/index.d.ts +3 -3
  220. package/dist/components/divider/index.js +1 -1
  221. package/dist/components/divider/index.js.map +1 -1
  222. package/dist/components/divider/styles.module.css +1 -1
  223. package/dist/components/divider/types.d.ts +1 -1
  224. package/dist/components/divider/types.js +1 -1
  225. package/dist/components/drawer/back.d.ts +3 -3
  226. package/dist/components/drawer/back.js +1 -1
  227. package/dist/components/drawer/back.js.map +1 -1
  228. package/dist/components/drawer/close.d.ts +3 -3
  229. package/dist/components/drawer/close.js +1 -1
  230. package/dist/components/drawer/close.js.map +1 -1
  231. package/dist/components/drawer/content.d.ts +3 -3
  232. package/dist/components/drawer/content.js +1 -1
  233. package/dist/components/drawer/content.js.map +1 -1
  234. package/dist/components/drawer/context.d.ts +3 -3
  235. package/dist/components/drawer/context.js +1 -1
  236. package/dist/components/drawer/context.js.map +1 -1
  237. package/dist/components/drawer/events.js +1 -1
  238. package/dist/components/drawer/events.js.map +1 -1
  239. package/dist/components/drawer/footer.d.ts +3 -3
  240. package/dist/components/drawer/footer.js +1 -1
  241. package/dist/components/drawer/footer.js.map +1 -1
  242. package/dist/components/drawer/header-title.d.ts +3 -3
  243. package/dist/components/drawer/header-title.js +1 -1
  244. package/dist/components/drawer/header-title.js.map +1 -1
  245. package/dist/components/drawer/header.d.ts +3 -3
  246. package/dist/components/drawer/header.js +1 -1
  247. package/dist/components/drawer/header.js.map +1 -1
  248. package/dist/components/drawer/index.d.ts +3 -3
  249. package/dist/components/drawer/index.js +1 -1
  250. package/dist/components/drawer/index.js.map +1 -1
  251. package/dist/components/drawer/layout-main.d.ts +3 -3
  252. package/dist/components/drawer/layout-main.js +1 -1
  253. package/dist/components/drawer/layout-main.js.map +1 -1
  254. package/dist/components/drawer/layout.d.ts +3 -3
  255. package/dist/components/drawer/layout.js +1 -1
  256. package/dist/components/drawer/layout.js.map +1 -1
  257. package/dist/components/drawer/menu-item.d.ts +3 -3
  258. package/dist/components/drawer/menu-item.js +1 -1
  259. package/dist/components/drawer/menu-item.js.map +1 -1
  260. package/dist/components/drawer/menu.d.ts +3 -3
  261. package/dist/components/drawer/menu.js +1 -1
  262. package/dist/components/drawer/menu.js.map +1 -1
  263. package/dist/components/drawer/panel.d.ts +3 -3
  264. package/dist/components/drawer/panel.js +1 -1
  265. package/dist/components/drawer/panel.js.map +1 -1
  266. package/dist/components/drawer/styles.module.css +1 -1
  267. package/dist/components/drawer/trigger.d.ts +3 -3
  268. package/dist/components/drawer/trigger.js +1 -1
  269. package/dist/components/drawer/trigger.js.map +1 -1
  270. package/dist/components/drawer/types.d.ts +1 -1
  271. package/dist/components/drawer/types.js +1 -1
  272. package/dist/components/drawer/view.d.ts +3 -3
  273. package/dist/components/drawer/view.js +1 -1
  274. package/dist/components/drawer/view.js.map +1 -1
  275. package/dist/components/flashcard/index.d.ts +10 -10
  276. package/dist/components/flashcard/index.js +1 -1
  277. package/dist/components/flashcard/index.js.map +1 -1
  278. package/dist/components/flashcard/styles.module.css +1 -1
  279. package/dist/components/flashcard/types.d.ts +1 -1
  280. package/dist/components/flashcard/types.js +1 -1
  281. package/dist/components/floating-card/context.d.ts +36 -0
  282. package/dist/components/floating-card/context.js +33 -0
  283. package/dist/components/floating-card/context.js.map +1 -0
  284. package/dist/components/floating-card/index.d.ts +65 -0
  285. package/dist/components/floating-card/index.js +81 -0
  286. package/dist/components/floating-card/index.js.map +1 -0
  287. package/dist/components/floating-card/provider.d.ts +64 -0
  288. package/dist/components/floating-card/provider.js +198 -0
  289. package/dist/components/floating-card/provider.js.map +1 -0
  290. package/dist/components/floating-card/styles.module.css +60 -0
  291. package/dist/components/hero/context.d.ts +3 -3
  292. package/dist/components/hero/context.js +1 -1
  293. package/dist/components/hero/context.js.map +1 -1
  294. package/dist/components/hero/index.d.ts +3 -3
  295. package/dist/components/hero/index.js +1 -1
  296. package/dist/components/hero/index.js.map +1 -1
  297. package/dist/components/hero/styles.module.css +1 -1
  298. package/dist/components/hero/subtitle.d.ts +3 -3
  299. package/dist/components/hero/subtitle.js +1 -1
  300. package/dist/components/hero/subtitle.js.map +1 -1
  301. package/dist/components/hero/title.d.ts +3 -3
  302. package/dist/components/hero/title.js +1 -1
  303. package/dist/components/hero/title.js.map +1 -1
  304. package/dist/components/hero/types.d.ts +1 -1
  305. package/dist/components/hero/types.js +1 -1
  306. package/dist/components/hotkey/context.d.ts +5 -5
  307. package/dist/components/hotkey/context.js +1 -1
  308. package/dist/components/hotkey/context.js.map +1 -1
  309. package/dist/components/hotkey/index.d.ts +3 -3
  310. package/dist/components/hotkey/index.js +1 -1
  311. package/dist/components/hotkey/index.js.map +1 -1
  312. package/dist/components/hotkey/set.d.ts +3 -3
  313. package/dist/components/hotkey/set.js +1 -1
  314. package/dist/components/hotkey/set.js.map +1 -1
  315. package/dist/components/hotkey/styles.module.css +1 -1
  316. package/dist/components/hotkey/types.d.ts +1 -1
  317. package/dist/components/hotkey/types.js +1 -1
  318. package/dist/components/icon/context.d.ts +5 -5
  319. package/dist/components/icon/context.js +1 -1
  320. package/dist/components/icon/context.js.map +1 -1
  321. package/dist/components/icon/index.d.ts +3 -3
  322. package/dist/components/icon/index.js +1 -1
  323. package/dist/components/icon/index.js.map +1 -1
  324. package/dist/components/icon/styles.module.css +1 -1
  325. package/dist/components/icon/types.d.ts +1 -1
  326. package/dist/components/icon/types.js +1 -1
  327. package/dist/components/input/context.d.ts +3 -3
  328. package/dist/components/input/context.js +1 -1
  329. package/dist/components/input/context.js.map +1 -1
  330. package/dist/components/input/index.d.ts +3 -3
  331. package/dist/components/input/index.js +1 -1
  332. package/dist/components/input/index.js.map +1 -1
  333. package/dist/components/input/styles.module.css +1 -1
  334. package/dist/components/input/types.d.ts +1 -1
  335. package/dist/components/input/types.js +1 -1
  336. package/dist/components/kanban/card-body.d.ts +3 -3
  337. package/dist/components/kanban/card-body.js +1 -1
  338. package/dist/components/kanban/card-body.js.map +1 -1
  339. package/dist/components/kanban/card-header-actions.d.ts +3 -3
  340. package/dist/components/kanban/card-header-actions.js +1 -1
  341. package/dist/components/kanban/card-header-actions.js.map +1 -1
  342. package/dist/components/kanban/card-header-title.d.ts +3 -3
  343. package/dist/components/kanban/card-header-title.js +1 -1
  344. package/dist/components/kanban/card-header-title.js.map +1 -1
  345. package/dist/components/kanban/card-header.d.ts +3 -3
  346. package/dist/components/kanban/card-header.js +1 -1
  347. package/dist/components/kanban/card-header.js.map +1 -1
  348. package/dist/components/kanban/card.d.ts +3 -3
  349. package/dist/components/kanban/card.js +1 -1
  350. package/dist/components/kanban/card.js.map +1 -1
  351. package/dist/components/kanban/column-actions.d.ts +3 -3
  352. package/dist/components/kanban/column-actions.js +1 -1
  353. package/dist/components/kanban/column-actions.js.map +1 -1
  354. package/dist/components/kanban/column-container.d.ts +3 -3
  355. package/dist/components/kanban/column-container.js +1 -1
  356. package/dist/components/kanban/column-container.js.map +1 -1
  357. package/dist/components/kanban/column-content.d.ts +3 -3
  358. package/dist/components/kanban/column-content.js +1 -1
  359. package/dist/components/kanban/column-content.js.map +1 -1
  360. package/dist/components/kanban/column-header-actions.d.ts +3 -3
  361. package/dist/components/kanban/column-header-actions.js +1 -1
  362. package/dist/components/kanban/column-header-actions.js.map +1 -1
  363. package/dist/components/kanban/column-header-drag-handle.d.ts +3 -3
  364. package/dist/components/kanban/column-header-drag-handle.js +1 -1
  365. package/dist/components/kanban/column-header-drag-handle.js.map +1 -1
  366. package/dist/components/kanban/column-header-title.d.ts +3 -3
  367. package/dist/components/kanban/column-header-title.js +1 -1
  368. package/dist/components/kanban/column-header-title.js.map +1 -1
  369. package/dist/components/kanban/column-header.d.ts +3 -3
  370. package/dist/components/kanban/column-header.js +1 -1
  371. package/dist/components/kanban/column-header.js.map +1 -1
  372. package/dist/components/kanban/column.d.ts +3 -3
  373. package/dist/components/kanban/column.js +1 -1
  374. package/dist/components/kanban/column.js.map +1 -1
  375. package/dist/components/kanban/context.d.ts +3 -3
  376. package/dist/components/kanban/context.js +1 -1
  377. package/dist/components/kanban/context.js.map +1 -1
  378. package/dist/components/kanban/header-actions.d.ts +3 -3
  379. package/dist/components/kanban/header-actions.js +1 -1
  380. package/dist/components/kanban/header-actions.js.map +1 -1
  381. package/dist/components/kanban/header-search.d.ts +3 -3
  382. package/dist/components/kanban/header-search.js +1 -1
  383. package/dist/components/kanban/header-search.js.map +1 -1
  384. package/dist/components/kanban/header-title.d.ts +3 -3
  385. package/dist/components/kanban/header-title.js +1 -1
  386. package/dist/components/kanban/header-title.js.map +1 -1
  387. package/dist/components/kanban/header.d.ts +3 -3
  388. package/dist/components/kanban/header.js +1 -1
  389. package/dist/components/kanban/header.js.map +1 -1
  390. package/dist/components/kanban/index.d.ts +1 -1
  391. package/dist/components/kanban/index.js +1 -1
  392. package/dist/components/kanban/kanban.d.ts +5 -5
  393. package/dist/components/kanban/kanban.js +1 -1
  394. package/dist/components/kanban/kanban.js.map +1 -1
  395. package/dist/components/kanban/mock-data.js +1 -1
  396. package/dist/components/kanban/mock-data.js.map +1 -1
  397. package/dist/components/kanban/styles.module.css +1 -1
  398. package/dist/components/kanban/types.d.ts +1 -1
  399. package/dist/components/kanban/types.js +1 -1
  400. package/dist/components/label/context.d.ts +5 -5
  401. package/dist/components/label/context.js +1 -1
  402. package/dist/components/label/context.js.map +1 -1
  403. package/dist/components/label/index.d.ts +3 -3
  404. package/dist/components/label/index.js +1 -1
  405. package/dist/components/label/index.js.map +1 -1
  406. package/dist/components/label/styles.module.css +1 -1
  407. package/dist/components/label/types.d.ts +1 -1
  408. package/dist/components/label/types.js +1 -1
  409. package/dist/components/lines/index.d.ts +3 -3
  410. package/dist/components/lines/index.js +1 -1
  411. package/dist/components/lines/index.js.map +1 -1
  412. package/dist/components/lines/styles.module.css +1 -1
  413. package/dist/components/lines/types.d.ts +1 -1
  414. package/dist/components/lines/types.js +1 -1
  415. package/dist/components/link/context.d.ts +3 -3
  416. package/dist/components/link/context.js +1 -1
  417. package/dist/components/link/context.js.map +1 -1
  418. package/dist/components/link/index.d.ts +3 -3
  419. package/dist/components/link/index.js +1 -1
  420. package/dist/components/link/index.js.map +1 -1
  421. package/dist/components/link/styles.module.css +1 -1
  422. package/dist/components/link/types.d.ts +1 -1
  423. package/dist/components/link/types.js +1 -1
  424. package/dist/components/list/context.d.ts +3 -3
  425. package/dist/components/list/context.js +1 -1
  426. package/dist/components/list/context.js.map +1 -1
  427. package/dist/components/list/index.d.ts +3 -3
  428. package/dist/components/list/index.js +1 -1
  429. package/dist/components/list/index.js.map +1 -1
  430. package/dist/components/list/item-content.d.ts +3 -3
  431. package/dist/components/list/item-content.js +1 -1
  432. package/dist/components/list/item-content.js.map +1 -1
  433. package/dist/components/list/item-description.d.ts +3 -3
  434. package/dist/components/list/item-description.js +1 -1
  435. package/dist/components/list/item-description.js.map +1 -1
  436. package/dist/components/list/item-title.d.ts +3 -3
  437. package/dist/components/list/item-title.js +1 -1
  438. package/dist/components/list/item-title.js.map +1 -1
  439. package/dist/components/list/item.d.ts +3 -3
  440. package/dist/components/list/item.js +1 -1
  441. package/dist/components/list/item.js.map +1 -1
  442. package/dist/components/list/styles.module.css +1 -1
  443. package/dist/components/list/types.d.ts +1 -1
  444. package/dist/components/list/types.js +1 -1
  445. package/dist/components/media-controls/context.d.ts +5 -5
  446. package/dist/components/media-controls/context.js +1 -1
  447. package/dist/components/media-controls/fullscreen-button.d.ts +3 -3
  448. package/dist/components/media-controls/fullscreen-button.js +1 -1
  449. package/dist/components/media-controls/index.d.ts +3 -3
  450. package/dist/components/media-controls/index.js +1 -1
  451. package/dist/components/media-controls/mute-button.d.ts +3 -3
  452. package/dist/components/media-controls/mute-button.js +1 -1
  453. package/dist/components/media-controls/play-button.d.ts +3 -3
  454. package/dist/components/media-controls/play-button.js +1 -1
  455. package/dist/components/media-controls/playback-rate.d.ts +3 -3
  456. package/dist/components/media-controls/playback-rate.js +3 -8
  457. package/dist/components/media-controls/playback-rate.js.map +1 -1
  458. package/dist/components/media-controls/seek-button.d.ts +3 -3
  459. package/dist/components/media-controls/seek-button.js +3 -8
  460. package/dist/components/media-controls/seek-button.js.map +1 -1
  461. package/dist/components/media-controls/time-display.d.ts +3 -3
  462. package/dist/components/media-controls/time-display.js +1 -1
  463. package/dist/components/media-controls/time-range.d.ts +3 -3
  464. package/dist/components/media-controls/time-range.js +1 -1
  465. package/dist/components/media-controls/types.d.ts +1 -1
  466. package/dist/components/media-controls/types.js +1 -1
  467. package/dist/components/media-controls/volume-slider.d.ts +3 -3
  468. package/dist/components/media-controls/volume-slider.js +1 -1
  469. package/dist/components/menu/context.d.ts +3 -3
  470. package/dist/components/menu/context.js +1 -1
  471. package/dist/components/menu/context.js.map +1 -1
  472. package/dist/components/menu/index.d.ts +3 -3
  473. package/dist/components/menu/index.js +1 -1
  474. package/dist/components/menu/index.js.map +1 -1
  475. package/dist/components/menu/item-description.d.ts +3 -3
  476. package/dist/components/menu/item-description.js +1 -1
  477. package/dist/components/menu/item-description.js.map +1 -1
  478. package/dist/components/menu/item-label.d.ts +3 -3
  479. package/dist/components/menu/item-label.js +1 -1
  480. package/dist/components/menu/item-label.js.map +1 -1
  481. package/dist/components/menu/item.d.ts +3 -3
  482. package/dist/components/menu/item.js +1 -1
  483. package/dist/components/menu/item.js.map +1 -1
  484. package/dist/components/menu/section.d.ts +3 -3
  485. package/dist/components/menu/section.js +1 -1
  486. package/dist/components/menu/section.js.map +1 -1
  487. package/dist/components/menu/separator.d.ts +3 -3
  488. package/dist/components/menu/separator.js +1 -1
  489. package/dist/components/menu/separator.js.map +1 -1
  490. package/dist/components/menu/styles.module.css +1 -1
  491. package/dist/components/menu/submenu.d.ts +3 -3
  492. package/dist/components/menu/submenu.js +1 -1
  493. package/dist/components/menu/submenu.js.map +1 -1
  494. package/dist/components/menu/trigger.d.ts +1 -1
  495. package/dist/components/menu/trigger.js +1 -1
  496. package/dist/components/menu/trigger.js.map +1 -1
  497. package/dist/components/menu/types.d.ts +1 -1
  498. package/dist/components/menu/types.js +1 -1
  499. package/dist/components/notice/events.js +1 -1
  500. package/dist/components/notice/events.js.map +1 -1
  501. package/dist/components/notice/index.d.ts +3 -3
  502. package/dist/components/notice/index.js +1 -1
  503. package/dist/components/notice/index.js.map +1 -1
  504. package/dist/components/notice/list.d.ts +3 -3
  505. package/dist/components/notice/list.js +1 -1
  506. package/dist/components/notice/list.js.map +1 -1
  507. package/dist/components/notice/notice-icon.d.ts +3 -3
  508. package/dist/components/notice/notice-icon.js +1 -1
  509. package/dist/components/notice/notice-icon.js.map +1 -1
  510. package/dist/components/notice/styles.module.css +1 -1
  511. package/dist/components/notice/types.d.ts +1 -1
  512. package/dist/components/notice/types.js +1 -1
  513. package/dist/components/notice/utils.d.ts +1 -1
  514. package/dist/components/notice/utils.js +1 -1
  515. package/dist/components/notice/utils.js.map +1 -1
  516. package/dist/components/options/context.d.ts +3 -3
  517. package/dist/components/options/context.js +1 -1
  518. package/dist/components/options/context.js.map +1 -1
  519. package/dist/components/options/index.d.ts +3 -3
  520. package/dist/components/options/index.js +1 -1
  521. package/dist/components/options/index.js.map +1 -1
  522. package/dist/components/options/item-content.d.ts +3 -3
  523. package/dist/components/options/item-content.js +1 -1
  524. package/dist/components/options/item-content.js.map +1 -1
  525. package/dist/components/options/item-description.d.ts +3 -3
  526. package/dist/components/options/item-description.js +1 -1
  527. package/dist/components/options/item-description.js.map +1 -1
  528. package/dist/components/options/item-label.d.ts +3 -3
  529. package/dist/components/options/item-label.js +1 -1
  530. package/dist/components/options/item-label.js.map +1 -1
  531. package/dist/components/options/item.d.ts +3 -3
  532. package/dist/components/options/item.js +1 -1
  533. package/dist/components/options/item.js.map +1 -1
  534. package/dist/components/options/section.d.ts +3 -3
  535. package/dist/components/options/section.js +1 -1
  536. package/dist/components/options/section.js.map +1 -1
  537. package/dist/components/options/styles.module.css +25 -1
  538. package/dist/components/options/types.d.ts +1 -1
  539. package/dist/components/options/types.js +1 -1
  540. package/dist/components/pagination/context.d.ts +3 -3
  541. package/dist/components/pagination/context.js +1 -1
  542. package/dist/components/pagination/context.js.map +1 -1
  543. package/dist/components/pagination/index.d.ts +3 -3
  544. package/dist/components/pagination/index.js +1 -1
  545. package/dist/components/pagination/index.js.map +1 -1
  546. package/dist/components/pagination/next.d.ts +3 -3
  547. package/dist/components/pagination/next.js +1 -1
  548. package/dist/components/pagination/next.js.map +1 -1
  549. package/dist/components/pagination/pages.d.ts +3 -3
  550. package/dist/components/pagination/pages.js +1 -1
  551. package/dist/components/pagination/pages.js.map +1 -1
  552. package/dist/components/pagination/prev.d.ts +3 -3
  553. package/dist/components/pagination/prev.js +1 -1
  554. package/dist/components/pagination/prev.js.map +1 -1
  555. package/dist/components/pagination/styles.module.css +1 -1
  556. package/dist/components/pagination/types.d.ts +1 -1
  557. package/dist/components/pagination/types.js +1 -1
  558. package/dist/components/pagination/utils.js +1 -1
  559. package/dist/components/pagination/utils.js.map +1 -1
  560. package/dist/components/popover/content.d.ts +3 -3
  561. package/dist/components/popover/content.js +1 -1
  562. package/dist/components/popover/content.js.map +1 -1
  563. package/dist/components/popover/footer.d.ts +3 -3
  564. package/dist/components/popover/footer.js +1 -1
  565. package/dist/components/popover/footer.js.map +1 -1
  566. package/dist/components/popover/index.d.ts +3 -3
  567. package/dist/components/popover/index.js +1 -1
  568. package/dist/components/popover/index.js.map +1 -1
  569. package/dist/components/popover/styles.module.css +1 -1
  570. package/dist/components/popover/title.d.ts +3 -3
  571. package/dist/components/popover/title.js +1 -1
  572. package/dist/components/popover/title.js.map +1 -1
  573. package/dist/components/popover/trigger.d.ts +3 -3
  574. package/dist/components/popover/trigger.js +1 -1
  575. package/dist/components/popover/trigger.js.map +1 -1
  576. package/dist/components/popover/types.d.ts +1 -1
  577. package/dist/components/popover/types.js +1 -1
  578. package/dist/components/query-builder/action-element.d.ts +3 -3
  579. package/dist/components/query-builder/action-element.js +1 -1
  580. package/dist/components/query-builder/action-element.js.map +1 -1
  581. package/dist/components/query-builder/actions.d.ts +5 -5
  582. package/dist/components/query-builder/actions.js +1 -1
  583. package/dist/components/query-builder/actions.js.map +1 -1
  584. package/dist/components/query-builder/combinator-selector.d.ts +3 -3
  585. package/dist/components/query-builder/combinator-selector.js +1 -1
  586. package/dist/components/query-builder/combinator-selector.js.map +1 -1
  587. package/dist/components/query-builder/constants.js +1 -1
  588. package/dist/components/query-builder/constants.js.map +1 -1
  589. package/dist/components/query-builder/index.d.ts +3 -3
  590. package/dist/components/query-builder/index.js +1 -1
  591. package/dist/components/query-builder/index.js.map +1 -1
  592. package/dist/components/query-builder/rule-group.d.ts +5 -5
  593. package/dist/components/query-builder/rule-group.js +1 -1
  594. package/dist/components/query-builder/rule-group.js.map +1 -1
  595. package/dist/components/query-builder/rule.d.ts +3 -3
  596. package/dist/components/query-builder/rule.js +1 -1
  597. package/dist/components/query-builder/rule.js.map +1 -1
  598. package/dist/components/query-builder/styles.module.css +1 -1
  599. package/dist/components/query-builder/types.d.ts +1 -1
  600. package/dist/components/query-builder/types.js +1 -1
  601. package/dist/components/query-builder/utils.d.ts +1 -1
  602. package/dist/components/query-builder/utils.js +1 -1
  603. package/dist/components/query-builder/utils.js.map +1 -1
  604. package/dist/components/query-builder/value-editor.d.ts +3 -3
  605. package/dist/components/query-builder/value-editor.js +1 -1
  606. package/dist/components/query-builder/value-editor.js.map +1 -1
  607. package/dist/components/query-builder/value-selector.d.ts +3 -3
  608. package/dist/components/query-builder/value-selector.js +1 -1
  609. package/dist/components/query-builder/value-selector.js.map +1 -1
  610. package/dist/components/radio/context.d.ts +11 -5
  611. package/dist/components/radio/context.js +8 -2
  612. package/dist/components/radio/context.js.map +1 -1
  613. package/dist/components/radio/group.d.ts +3 -3
  614. package/dist/components/radio/group.js +14 -11
  615. package/dist/components/radio/group.js.map +1 -1
  616. package/dist/components/radio/index.d.ts +5 -6
  617. package/dist/components/radio/index.js +8 -4
  618. package/dist/components/radio/index.js.map +1 -1
  619. package/dist/components/radio/styles.module.css +7 -5
  620. package/dist/components/radio/types.d.ts +5 -1
  621. package/dist/components/radio/types.js +1 -1
  622. package/dist/components/search-field/context.d.ts +5 -5
  623. package/dist/components/search-field/context.js +1 -1
  624. package/dist/components/search-field/context.js.map +1 -1
  625. package/dist/components/search-field/index.d.ts +3 -3
  626. package/dist/components/search-field/index.js +1 -1
  627. package/dist/components/search-field/index.js.map +1 -1
  628. package/dist/components/search-field/styles.module.css +1 -1
  629. package/dist/components/search-field/types.d.ts +1 -1
  630. package/dist/components/search-field/types.js +1 -1
  631. package/dist/components/select-field/context.d.ts +5 -5
  632. package/dist/components/select-field/context.js +1 -1
  633. package/dist/components/select-field/context.js.map +1 -1
  634. package/dist/components/select-field/index.d.ts +3 -3
  635. package/dist/components/select-field/index.js +1 -1
  636. package/dist/components/select-field/index.js.map +1 -1
  637. package/dist/components/select-field/styles.module.css +1 -1
  638. package/dist/components/select-field/types.d.ts +1 -1
  639. package/dist/components/select-field/types.js +1 -1
  640. package/dist/components/sidenav/avatar.d.ts +3 -3
  641. package/dist/components/sidenav/avatar.js +1 -1
  642. package/dist/components/sidenav/avatar.js.map +1 -1
  643. package/dist/components/sidenav/content.d.ts +3 -3
  644. package/dist/components/sidenav/content.js +1 -1
  645. package/dist/components/sidenav/content.js.map +1 -1
  646. package/dist/components/sidenav/context.d.ts +3 -3
  647. package/dist/components/sidenav/context.js +1 -1
  648. package/dist/components/sidenav/context.js.map +1 -1
  649. package/dist/components/sidenav/events.js +1 -1
  650. package/dist/components/sidenav/events.js.map +1 -1
  651. package/dist/components/sidenav/footer.d.ts +3 -3
  652. package/dist/components/sidenav/footer.js +1 -1
  653. package/dist/components/sidenav/footer.js.map +1 -1
  654. package/dist/components/sidenav/header.d.ts +3 -3
  655. package/dist/components/sidenav/header.js +1 -1
  656. package/dist/components/sidenav/header.js.map +1 -1
  657. package/dist/components/sidenav/index.d.ts +3 -3
  658. package/dist/components/sidenav/index.js +1 -1
  659. package/dist/components/sidenav/index.js.map +1 -1
  660. package/dist/components/sidenav/item.d.ts +3 -3
  661. package/dist/components/sidenav/item.js +1 -1
  662. package/dist/components/sidenav/item.js.map +1 -1
  663. package/dist/components/sidenav/link.d.ts +3 -3
  664. package/dist/components/sidenav/link.js +1 -1
  665. package/dist/components/sidenav/link.js.map +1 -1
  666. package/dist/components/sidenav/menu-item.d.ts +3 -3
  667. package/dist/components/sidenav/menu-item.js +1 -1
  668. package/dist/components/sidenav/menu-item.js.map +1 -1
  669. package/dist/components/sidenav/menu.d.ts +3 -3
  670. package/dist/components/sidenav/menu.js +1 -1
  671. package/dist/components/sidenav/menu.js.map +1 -1
  672. package/dist/components/sidenav/styles.module.css +1 -1
  673. package/dist/components/sidenav/trigger.d.ts +3 -3
  674. package/dist/components/sidenav/trigger.js +1 -1
  675. package/dist/components/sidenav/trigger.js.map +1 -1
  676. package/dist/components/sidenav/types.d.ts +1 -1
  677. package/dist/components/sidenav/types.js +1 -1
  678. package/dist/components/skeleton/index.d.ts +3 -3
  679. package/dist/components/skeleton/index.js +1 -1
  680. package/dist/components/skeleton/index.js.map +1 -1
  681. package/dist/components/skeleton/styles.module.css +1 -1
  682. package/dist/components/skeleton/types.d.ts +1 -1
  683. package/dist/components/skeleton/types.js +1 -1
  684. package/dist/components/slider/index.d.ts +3 -3
  685. package/dist/components/slider/index.js +1 -1
  686. package/dist/components/slider/index.js.map +1 -1
  687. package/dist/components/slider/styles.module.css +1 -1
  688. package/dist/components/slider/types.d.ts +1 -1
  689. package/dist/components/slider/types.js +1 -1
  690. package/dist/components/status-indicator/index.d.ts +3 -3
  691. package/dist/components/status-indicator/index.js +1 -1
  692. package/dist/components/status-indicator/types.d.ts +1 -1
  693. package/dist/components/status-indicator/types.js +1 -1
  694. package/dist/components/switch/context.d.ts +5 -5
  695. package/dist/components/switch/context.js +1 -1
  696. package/dist/components/switch/context.js.map +1 -1
  697. package/dist/components/switch/index.d.ts +3 -3
  698. package/dist/components/switch/index.js +1 -1
  699. package/dist/components/switch/index.js.map +1 -1
  700. package/dist/components/switch/styles.module.css +1 -1
  701. package/dist/components/switch/types.d.ts +1 -1
  702. package/dist/components/switch/types.js +1 -1
  703. package/dist/components/table/body.d.ts +3 -3
  704. package/dist/components/table/body.js +1 -1
  705. package/dist/components/table/body.js.map +1 -1
  706. package/dist/components/table/cell.d.ts +3 -3
  707. package/dist/components/table/cell.js +1 -1
  708. package/dist/components/table/cell.js.map +1 -1
  709. package/dist/components/table/constants/table.d.ts +1 -1
  710. package/dist/components/table/constants/table.js +1 -1
  711. package/dist/components/table/constants/table.js.map +1 -1
  712. package/dist/components/table/context.d.ts +3 -3
  713. package/dist/components/table/context.js +1 -1
  714. package/dist/components/table/context.js.map +1 -1
  715. package/dist/components/table/header-cell.d.ts +3 -3
  716. package/dist/components/table/header-cell.js +1 -1
  717. package/dist/components/table/header-cell.js.map +1 -1
  718. package/dist/components/table/header.d.ts +3 -3
  719. package/dist/components/table/header.js +1 -1
  720. package/dist/components/table/header.js.map +1 -1
  721. package/dist/components/table/index.d.ts +3 -3
  722. package/dist/components/table/index.js +1 -1
  723. package/dist/components/table/index.js.map +1 -1
  724. package/dist/components/table/row.d.ts +3 -3
  725. package/dist/components/table/row.js +1 -1
  726. package/dist/components/table/row.js.map +1 -1
  727. package/dist/components/table/styles.module.css +1 -1
  728. package/dist/components/table/types.d.ts +1 -1
  729. package/dist/components/table/types.js +1 -1
  730. package/dist/components/tabs/constants.d.ts +1 -1
  731. package/dist/components/tabs/constants.js +1 -1
  732. package/dist/components/tabs/context.d.ts +7 -7
  733. package/dist/components/tabs/context.js +1 -1
  734. package/dist/components/tabs/context.js.map +1 -1
  735. package/dist/components/tabs/index.d.ts +3 -3
  736. package/dist/components/tabs/index.js +1 -1
  737. package/dist/components/tabs/index.js.map +1 -1
  738. package/dist/components/tabs/list.d.ts +3 -3
  739. package/dist/components/tabs/list.js +1 -1
  740. package/dist/components/tabs/list.js.map +1 -1
  741. package/dist/components/tabs/panel.d.ts +3 -3
  742. package/dist/components/tabs/panel.js +1 -1
  743. package/dist/components/tabs/panel.js.map +1 -1
  744. package/dist/components/tabs/styles.module.css +1 -1
  745. package/dist/components/tabs/tab.d.ts +3 -3
  746. package/dist/components/tabs/tab.js +1 -1
  747. package/dist/components/tabs/tab.js.map +1 -1
  748. package/dist/components/tabs/types.d.ts +1 -1
  749. package/dist/components/tabs/types.js +1 -1
  750. package/dist/components/text-area-field/context.d.ts +5 -5
  751. package/dist/components/text-area-field/context.js +1 -1
  752. package/dist/components/text-area-field/context.js.map +1 -1
  753. package/dist/components/text-area-field/index.d.ts +3 -3
  754. package/dist/components/text-area-field/index.js +1 -1
  755. package/dist/components/text-area-field/index.js.map +1 -1
  756. package/dist/components/text-area-field/styles.module.css +1 -1
  757. package/dist/components/text-area-field/types.d.ts +1 -1
  758. package/dist/components/text-area-field/types.js +1 -1
  759. package/dist/components/text-field/context.d.ts +5 -5
  760. package/dist/components/text-field/context.js +1 -1
  761. package/dist/components/text-field/context.js.map +1 -1
  762. package/dist/components/text-field/index.d.ts +3 -3
  763. package/dist/components/text-field/index.js +1 -1
  764. package/dist/components/text-field/index.js.map +1 -1
  765. package/dist/components/text-field/styles.module.css +1 -1
  766. package/dist/components/text-field/types.d.ts +1 -1
  767. package/dist/components/text-field/types.js +1 -1
  768. package/dist/components/time-field/index.d.ts +3 -3
  769. package/dist/components/time-field/index.js +1 -1
  770. package/dist/components/time-field/index.js.map +1 -1
  771. package/dist/components/time-field/styles.module.css +1 -1
  772. package/dist/components/time-field/types.d.ts +1 -1
  773. package/dist/components/time-field/types.js +1 -1
  774. package/dist/components/tooltip/context.d.ts +3 -3
  775. package/dist/components/tooltip/context.js +1 -1
  776. package/dist/components/tooltip/context.js.map +1 -1
  777. package/dist/components/tooltip/index.d.ts +3 -3
  778. package/dist/components/tooltip/index.js +1 -1
  779. package/dist/components/tooltip/index.js.map +1 -1
  780. package/dist/components/tooltip/styles.module.css +1 -1
  781. package/dist/components/tooltip/trigger.d.ts +3 -3
  782. package/dist/components/tooltip/trigger.js +1 -1
  783. package/dist/components/tooltip/trigger.js.map +1 -1
  784. package/dist/components/tooltip/types.d.ts +1 -1
  785. package/dist/components/tooltip/types.js +1 -1
  786. package/dist/components/tree/context.d.ts +4 -4
  787. package/dist/components/tree/context.js +1 -1
  788. package/dist/components/tree/context.js.map +1 -1
  789. package/dist/components/tree/index.d.ts +3 -3
  790. package/dist/components/tree/index.js +1 -1
  791. package/dist/components/tree/index.js.map +1 -1
  792. package/dist/components/tree/item-actions.d.ts +3 -3
  793. package/dist/components/tree/item-actions.js +1 -1
  794. package/dist/components/tree/item-actions.js.map +1 -1
  795. package/dist/components/tree/item-content.d.ts +3 -3
  796. package/dist/components/tree/item-content.js +1 -1
  797. package/dist/components/tree/item-content.js.map +1 -1
  798. package/dist/components/tree/item-description.d.ts +3 -3
  799. package/dist/components/tree/item-description.js +1 -1
  800. package/dist/components/tree/item-description.js.map +1 -1
  801. package/dist/components/tree/item-label.d.ts +3 -3
  802. package/dist/components/tree/item-label.js +1 -1
  803. package/dist/components/tree/item-label.js.map +1 -1
  804. package/dist/components/tree/item-prefix-icon.d.ts +3 -3
  805. package/dist/components/tree/item-prefix-icon.js +1 -1
  806. package/dist/components/tree/item-prefix-icon.js.map +1 -1
  807. package/dist/components/tree/item.d.ts +3 -3
  808. package/dist/components/tree/item.js +1 -1
  809. package/dist/components/tree/item.js.map +1 -1
  810. package/dist/components/tree/lines.d.ts +3 -3
  811. package/dist/components/tree/lines.js +1 -1
  812. package/dist/components/tree/lines.js.map +1 -1
  813. package/dist/components/tree/styles.module.css +1 -1
  814. package/dist/components/tree/types.d.ts +1 -1
  815. package/dist/components/tree/types.js +1 -1
  816. package/dist/components/video/index.d.ts +3 -3
  817. package/dist/components/video/index.js +4 -9
  818. package/dist/components/video/index.js.map +1 -1
  819. package/dist/components/video/types.d.ts +1 -1
  820. package/dist/components/video/types.js +1 -1
  821. package/dist/components/view-stack/context.d.ts +3 -3
  822. package/dist/components/view-stack/context.js +1 -1
  823. package/dist/components/view-stack/context.js.map +1 -1
  824. package/dist/components/view-stack/events.js +1 -1
  825. package/dist/components/view-stack/events.js.map +1 -1
  826. package/dist/components/view-stack/index.d.ts +3 -3
  827. package/dist/components/view-stack/index.js +1 -1
  828. package/dist/components/view-stack/index.js.map +1 -1
  829. package/dist/components/view-stack/trigger.d.ts +3 -3
  830. package/dist/components/view-stack/trigger.js +1 -1
  831. package/dist/components/view-stack/trigger.js.map +1 -1
  832. package/dist/components/view-stack/types.d.ts +1 -1
  833. package/dist/components/view-stack/types.js +1 -1
  834. package/dist/components/view-stack/view.d.ts +3 -3
  835. package/dist/components/view-stack/view.js +1 -1
  836. package/dist/components/view-stack/view.js.map +1 -1
  837. package/dist/hooks/coordinate-field/index.d.ts +1 -1
  838. package/dist/hooks/coordinate-field/index.js +1 -1
  839. package/dist/hooks/coordinate-field/use-coordinate-copy.d.ts +1 -1
  840. package/dist/hooks/coordinate-field/use-coordinate-copy.js +4 -9
  841. package/dist/hooks/coordinate-field/use-coordinate-copy.js.map +1 -1
  842. package/dist/hooks/coordinate-field/use-coordinate-field-state.d.ts +1 -1
  843. package/dist/hooks/coordinate-field/use-coordinate-field-state.js +1 -1
  844. package/dist/hooks/coordinate-field/use-coordinate-field-state.js.map +1 -1
  845. package/dist/hooks/coordinate-field/use-coordinate-field.d.ts +1 -1
  846. package/dist/hooks/coordinate-field/use-coordinate-field.js +1 -1
  847. package/dist/hooks/coordinate-field/use-coordinate-field.js.map +1 -1
  848. package/dist/hooks/coordinate-field/use-coordinate-focus.d.ts +1 -1
  849. package/dist/hooks/coordinate-field/use-coordinate-focus.js +1 -1
  850. package/dist/hooks/coordinate-field/use-coordinate-focus.js.map +1 -1
  851. package/dist/hooks/coordinate-field/use-coordinate-paste.d.ts +1 -1
  852. package/dist/hooks/coordinate-field/use-coordinate-paste.js +1 -1
  853. package/dist/hooks/coordinate-field/use-coordinate-paste.js.map +1 -1
  854. package/dist/hooks/coordinate-field/use-timeout-cleanup.js +1 -1
  855. package/dist/hooks/coordinate-field/use-timeout-cleanup.js.map +1 -1
  856. package/dist/hooks/kanban/index.d.ts +1 -1
  857. package/dist/hooks/kanban/index.js +1 -1
  858. package/dist/hooks/kanban/index.js.map +1 -1
  859. package/dist/hooks/use-frame-delay/index.js +1 -1
  860. package/dist/hooks/use-frame-delay/index.js.map +1 -1
  861. package/dist/hooks/use-tree/actions/cache.d.ts +1 -1
  862. package/dist/hooks/use-tree/actions/cache.js +1 -1
  863. package/dist/hooks/use-tree/actions/cache.js.map +1 -1
  864. package/dist/hooks/use-tree/actions/index.d.ts +1 -1
  865. package/dist/hooks/use-tree/actions/index.js +1 -1
  866. package/dist/hooks/use-tree/actions/index.js.map +1 -1
  867. package/dist/hooks/use-tree/state/index.d.ts +1 -1
  868. package/dist/hooks/use-tree/state/index.js +1 -1
  869. package/dist/hooks/use-tree/state/index.js.map +1 -1
  870. package/dist/hooks/use-tree/state/utils.d.ts +1 -1
  871. package/dist/hooks/use-tree/state/utils.js +1 -1
  872. package/dist/hooks/use-tree/state/utils.js.map +1 -1
  873. package/dist/hooks/use-tree/types.d.ts +1 -1
  874. package/dist/hooks/use-tree/types.js +1 -1
  875. package/dist/index.d.ts +5 -3
  876. package/dist/index.js +5 -3
  877. package/dist/lib/types.d.ts +1 -1
  878. package/dist/lib/types.js +1 -1
  879. package/dist/lib/utils.d.ts +1 -1
  880. package/dist/lib/utils.js +1 -1
  881. package/dist/lib/utils.js.map +1 -1
  882. package/dist/providers/portal.d.ts +3 -3
  883. package/dist/providers/portal.js +1 -1
  884. package/dist/providers/portal.js.map +1 -1
  885. package/dist/providers/theme-provider.d.ts +3 -3
  886. package/dist/providers/theme-provider.js +1 -1
  887. package/dist/providers/theme-provider.js.map +1 -1
  888. package/dist/utils/logger/index.js +31 -0
  889. package/dist/utils/logger/index.js.map +1 -0
  890. package/package.json +18 -10
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["Label","DialogTrigger","Button","Popover","AriaText","Dialog","RadioGroup","Radio"],"sources":["../../../src/components/coordinate-field/index.tsx"],"sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n'use client';\n\nimport { clsx } from '@accelint/design-foundation/lib/utils';\nimport Check from '@accelint/icons/check';\nimport CopyToClipboard from '@accelint/icons/copy-to-clipboard';\nimport GlobalShare from '@accelint/icons/global-share';\nimport { filterDOMProps } from '@react-aria/utils';\nimport 'client-only';\nimport {\n type CSSProperties,\n type ReactNode,\n useCallback,\n useMemo,\n useState,\n} from 'react';\nimport {\n Text as AriaText,\n composeRenderProps,\n FieldError,\n FieldErrorContext,\n GroupContext,\n LabelContext,\n Provider,\n TextContext,\n useContextProps,\n} from 'react-aria-components';\nimport { useCoordinateField } from '../../hooks/coordinate-field';\nimport { Button } from '../button';\nimport { Dialog } from '../dialog';\nimport { DialogContent } from '../dialog/content';\nimport { DialogFooter } from '../dialog/footer';\nimport { DialogTitle } from '../dialog/title';\nimport { DialogTrigger } from '../dialog/trigger';\nimport { Icon } from '../icon';\nimport { Label } from '../label';\nimport { Popover } from '../popover';\nimport { PopoverContent } from '../popover/content';\nimport { PopoverTitle } from '../popover/title';\nimport { Radio } from '../radio';\nimport { RadioGroup } from '../radio/group';\nimport { CoordinateFieldContext, CoordinateFieldStateContext } from './context';\nimport {\n type CoordinateFormatResult,\n getAllCoordinateFormats,\n} from './coordinate-utils';\nimport { CoordinateSegment } from './segment';\nimport { GROUP_SEPARATOR, getSegmentLabel } from './segment-configs';\nimport styles from './styles.module.css';\nimport {\n COORDINATE_FORMAT_LABELS,\n COORDINATE_FORMAT_NAMES,\n COORDINATE_SYSTEMS,\n type CoordinateSystem,\n} from './types';\nimport { calculateMinControlWidth } from './width-utils';\nimport type { CoordinateFieldProps } from './types';\n\n/**\n * CoordinateField - A comprehensive coordinate input component with multiple format support\n *\n * Provides accessible coordinate input functionality with support for multiple coordinate\n * systems (DD, DDM, DMS, MGRS, UTM). All values are normalized to Decimal Degrees internally\n * for consistency.\n *\n * @param props - The coordinate field props.\n * @param props.ref - Reference to the coordinate field element.\n * @param props.classNames - Custom class names for sub-elements.\n * @param props.description - Description text displayed below the field.\n * @param props.label - Label text for the coordinate field.\n * @param props.format - Coordinate format to use (dd, ddm, dms, mgrs, utm).\n * @param props.size - Size variant of the field.\n * @param props.variant - Layout variant (inline or stacked).\n * @param props.showFormatButton - Whether to show the format conversion button.\n * @param props.isDisabled - Whether the field is disabled.\n * @param props.isInvalid - Whether the field is in an invalid state.\n * @param props.isRequired - Whether the field is required.\n * @param props.isReadOnly - Whether the field is read-only.\n * @returns The coordinate field component.\n *\n * @example\n * ```tsx\n * // Basic coordinate field\n * <CoordinateField label=\"Location\" />\n * ```\n *\n * @example\n * ```tsx\n * // Coordinate field with validation\n * <CoordinateField\n * label=\"Target Coordinates\"\n * isRequired\n * isInvalid={hasError}\n * errorMessage=\"Please enter a valid coordinate\"\n * />\n * ```\n *\n * @example\n * ```tsx\n * // Coordinate field with specific format\n * <CoordinateField\n * label=\"Position\"\n * format=\"dms\"\n * description=\"Enter coordinates in Degrees Minutes Seconds format\"\n * />\n * ```\n *\n * @example\n * ```tsx\n * // Compact coordinate field\n * <CoordinateField\n * label=\"Coordinates\"\n * size=\"small\"\n * format=\"dd\"\n * />\n * ```\n *\n * @example\n * ```tsx\n * // Controlled coordinate field\n * <CoordinateField\n * label=\"Selected Location\"\n * value={coordinates}\n * onChange={setCoordinates}\n * />\n * ```\n *\n * @example\n * ```tsx\n * // Coordinate field with error handling\n * <CoordinateField\n * label=\"Target Coordinates\"\n * onError={(message, context) => {\n * // message will be \"Invalid coordinate value\" for validation errors\n * // or \"Invalid coordinate format\" for paste errors\n * setErrorMessage(message);\n * console.error(message, context);\n * }}\n * isInvalid={!!errorMessage}\n * errorMessage={errorMessage}\n * />\n * ```\n */\nexport function CoordinateField({ ref, ...props }: CoordinateFieldProps) {\n [props, ref] = useContextProps(props, ref, CoordinateFieldContext);\n\n const {\n classNames,\n description: descriptionProp,\n label: labelProp,\n format = 'dd',\n size = 'medium',\n variant = 'inline',\n showFormatButton = true,\n isDisabled = false,\n isInvalid: isInvalidProp = false,\n isRequired = false,\n isReadOnly = false,\n ...rest\n } = props;\n\n const isSmall = size === 'small';\n\n const DOMProps = filterDOMProps(rest, { global: true });\n\n // When size is small and label is hidden, use aria-label instead of aria-labelledby\n // to ensure screen readers have an accessible name\n const ariaLabelForSmallSize =\n isSmall && labelProp ? labelProp : rest['aria-label'];\n\n const {\n state,\n focus,\n paste,\n copy,\n registerTimeout,\n fieldProps,\n labelProps,\n descriptionProps,\n errorProps,\n validation,\n effectiveErrorMessage,\n isInvalid,\n } = useCoordinateField(\n props,\n ariaLabelForSmallSize,\n rest['aria-describedby'],\n rest['aria-details'],\n );\n\n const componentState = {\n segmentValues: state.segmentValues,\n format,\n currentValue: state.currentValue,\n validationErrors: state.validationErrors,\n isDisabled,\n isInvalid,\n isRequired,\n size,\n variant,\n registerTimeout,\n };\n\n // Store all coordinate formats, calculated only when popover opens\n const [allCoordinateFormats, setAllCoordinateFormats] = useState<Record<\n CoordinateSystem,\n CoordinateFormatResult\n > | null>(null);\n\n const handlePopoverOpenChange = useCallback(\n (isOpen: boolean) => {\n if (isOpen) {\n setAllCoordinateFormats(getAllCoordinateFormats(state.currentValue));\n }\n },\n [state.currentValue],\n );\n\n // Calculate the minimum width needed for the control container\n // This keeps the outlined container at a fixed width while segments animate\n const minControlWidth = useMemo(\n () =>\n calculateMinControlWidth(\n state.editableSegmentConfigs,\n state.segmentConfigs,\n showFormatButton,\n ),\n [state.editableSegmentConfigs, state.segmentConfigs, showFormatButton],\n );\n\n return (\n <Provider\n values={[\n [CoordinateFieldContext, props],\n [CoordinateFieldStateContext, componentState],\n [GroupContext, fieldProps],\n [LabelContext, labelProps],\n [\n TextContext,\n {\n slots: {\n description: descriptionProps,\n errorMessage: errorProps,\n },\n },\n ],\n [FieldErrorContext, validation],\n ]}\n >\n <div\n {...DOMProps}\n {...fieldProps}\n ref={ref}\n className={clsx(\n 'group/coordinate-field',\n styles.field,\n classNames?.field,\n )}\n data-size={size}\n data-disabled={isDisabled || null}\n data-invalid={isInvalid || null}\n >\n {!isSmall && labelProp && (\n <Label\n className={classNames?.label}\n isDisabled={isDisabled}\n isRequired={isRequired}\n >\n {labelProp}\n </Label>\n )}\n\n <div\n style={\n {\n '--min-width': variant === 'stacked' ? 'unset' : minControlWidth,\n } as CSSProperties\n }\n className={clsx(styles.control, classNames?.control)}\n data-readonly={isReadOnly || null}\n >\n <div\n className={clsx(styles.input, styles[variant], classNames?.input)}\n onPasteCapture={paste.handleInputPaste}\n data-input-container\n >\n {state.segmentConfigs\n .reduce<ReactNode[][]>(\n (acc, config, configIndex) => {\n const currentGroupIndex = acc.length - 1;\n\n if (\n config.value === GROUP_SEPARATOR &&\n variant === 'stacked'\n ) {\n acc.push([]);\n\n return acc;\n }\n\n if (config.type === 'literal') {\n acc[currentGroupIndex]?.push(\n <span\n key={`${format}-literal-${configIndex}-${config.value}`}\n className={styles.literal}\n >\n {config.value}\n </span>,\n );\n\n return acc;\n }\n\n const editableIndex = state.segmentConfigs\n .slice(0, configIndex)\n .filter((c) => c.type !== 'literal').length;\n\n acc[currentGroupIndex]?.push(\n <CoordinateSegment\n key={`${format}-segment-${editableIndex}`}\n value={state.segmentValues[editableIndex] || ''}\n onChange={(newValue) =>\n state.handleSegmentChange(editableIndex, newValue)\n }\n onFocus={() =>\n focus.setFocusedSegmentIndex(editableIndex)\n }\n onBlur={() => {\n focus.setFocusedSegmentIndex(-1);\n state.flushPendingValidation();\n }}\n onKeyDown={(e) =>\n focus.handleSegmentKeyDown(editableIndex, e)\n }\n onAutoAdvance={() =>\n focus.focusNextSegment(editableIndex)\n }\n onAutoRetreat={() =>\n focus.focusPreviousSegment(editableIndex)\n }\n placeholder={config.placeholder}\n maxLength={config.maxLength}\n pad={config.pad}\n className={clsx(styles.segment, classNames?.segment)}\n isDisabled={isDisabled}\n isReadOnly={isReadOnly}\n allowedChars={config.allowedChars}\n segmentRef={focus.segmentRefs[editableIndex]}\n segmentIndex={editableIndex}\n totalSegments={state.editableSegmentConfigs.length}\n ariaLabel={getSegmentLabel(format, editableIndex)}\n />,\n );\n\n return acc;\n },\n [[]],\n )\n .map((group, groupIndex) => (\n <div\n className={clsx(styles.segmentGroup, styles[variant])}\n key={`${format}-group-${\n // biome-ignore lint/suspicious/noArrayIndexKey: intentional\n groupIndex\n }`}\n >\n {group}\n </div>\n ))}\n </div>\n\n {showFormatButton && (\n <DialogTrigger onOpenChange={handlePopoverOpenChange}>\n <Button\n variant='icon'\n size='small'\n color='mono-bold'\n className={clsx(styles.formatButton, classNames?.formatButton)}\n aria-label='View coordinate in all formats'\n isDisabled={!copy.isFormatButtonEnabled}\n >\n <Icon>\n <GlobalShare />\n </Icon>\n </Button>\n <Popover classNames={{ popover: styles.popover }}>\n <PopoverTitle className={styles.popoverTitle}>\n Copy Coordinates\n </PopoverTitle>\n <PopoverContent>\n {allCoordinateFormats &&\n COORDINATE_SYSTEMS.map((formatKey) => {\n const formatResult = allCoordinateFormats[formatKey];\n const isCopied = copy.copiedFormat === formatKey;\n\n return (\n <div key={formatKey} className={styles.formatRow}>\n <div className={styles.formatLabels}>\n <span className={styles.formatLabel}>\n {COORDINATE_FORMAT_LABELS[formatKey]}\n </span>\n <span\n className={styles.formatValue}\n title={formatResult.value}\n >\n {formatResult.value}\n </span>\n </div>\n <Button\n variant='icon'\n color='mono-bold'\n aria-label={`Copy ${COORDINATE_FORMAT_LABELS[formatKey]} format`}\n onClick={() => copy.handleCopyFormat(formatKey)}\n isDisabled={!formatResult.isValid}\n >\n <Icon>\n {isCopied ? <Check /> : <CopyToClipboard />}\n </Icon>\n </Button>\n </div>\n );\n })}\n </PopoverContent>\n </Popover>\n </DialogTrigger>\n )}\n </div>\n\n {/* Description is hidden when field is invalid (unless disabled) to make room for error message */}\n {descriptionProp && !isSmall && (!isInvalid || isDisabled) && (\n <AriaText\n className={clsx(styles.description, classNames?.description)}\n slot='description'\n >\n {descriptionProp}\n </AriaText>\n )}\n\n <FieldError\n className={composeRenderProps(classNames?.error, (className) =>\n clsx(styles.error, className),\n )}\n >\n {effectiveErrorMessage}\n </FieldError>\n\n <DialogTrigger\n isOpen={paste.showDisambiguationModal}\n onOpenChange={paste.setShowDisambiguationModal}\n >\n <Button className={styles.hiddenTrigger}>Hidden Trigger</Button>\n <Dialog size='small'>\n <DialogTitle className={styles.modalTitle}>\n Select Coordinate Format\n </DialogTitle>\n <DialogContent>\n <p className={styles.modalDescription}>\n The pasted value matches multiple coordinate formats. Please\n select the correct interpretation:\n </p>\n\n <RadioGroup\n classNames={{ group: styles.formatOptions }}\n value={paste.selectedDisambiguationFormat}\n onChange={(value) =>\n paste.setSelectedDisambiguationFormat(\n value as CoordinateSystem,\n )\n }\n >\n {paste.disambiguationMatches.map((match) => (\n <Radio key={match.format} value={match.format}>\n <div className={styles.modalOptionContent}>\n <span className={styles.formatOptionLabel}>\n {COORDINATE_FORMAT_NAMES[match.format]}\n </span>\n <span className={styles.formatOptionValue}>\n {match.displayString}\n </span>\n </div>\n </Radio>\n ))}\n </RadioGroup>\n </DialogContent>\n <DialogFooter className={styles.modalActions}>\n <Button\n variant='flat'\n onPress={() => paste.setShowDisambiguationModal(false)}\n >\n Cancel\n </Button>\n <Button onPress={paste.handleDisambiguationSelect}>\n Apply Selected\n </Button>\n </DialogFooter>\n </Dialog>\n </DialogTrigger>\n </div>\n </Provider>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0JA,SAAgB,gBAAgB,EAAE,KAAK,GAAG,SAA+B;AACvE,EAAC,OAAO,OAAO,gBAAgB,OAAO,KAAK,uBAAuB;CAElE,MAAM,EACJ,YACA,aAAa,iBACb,OAAO,WACP,SAAS,MACT,OAAO,UACP,UAAU,UACV,mBAAmB,MACnB,aAAa,OACb,WAAW,gBAAgB,OAC3B,aAAa,OACb,aAAa,OACb,GAAG,SACD;CAEJ,MAAM,UAAU,SAAS;CAEzB,MAAM,WAAW,eAAe,MAAM,EAAE,QAAQ,MAAM,CAAC;CAIvD,MAAM,wBACJ,WAAW,YAAY,YAAY,KAAK;CAE1C,MAAM,EACJ,OACA,OACA,OACA,MACA,iBACA,YACA,YACA,kBACA,YACA,YACA,uBACA,cACE,mBACF,OACA,uBACA,KAAK,qBACL,KAAK,gBACN;CAED,MAAM,iBAAiB;EACrB,eAAe,MAAM;EACrB;EACA,cAAc,MAAM;EACpB,kBA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AAO;qBACrB,MAAM;YACF;WACH;WARI,MAAM,OASV,CACR;SACS,IACC;OAChB,qBAAC;QAAa,WAAW,OAAO;mBAC9B,oBAACL;SACC,SAAQ;SACR,eAAe,MAAM,2BAA2B,MAAM;mBACvD;UAEQ,EACT,oBAACA;SAAO,SAAS,MAAM;mBAA4B;UAE1C;SACI;;OACR;MACK;;IACZ;GACG"}
1
+ {"version":3,"file":"index.js","names":["Label","DialogTrigger","Button","Popover","AriaText","Dialog","RadioGroup","Radio"],"sources":["../../../src/components/coordinate-field/index.tsx"],"sourcesContent":["/*\n * Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n'use client';\n\nimport { clsx } from '@accelint/design-foundation/lib/utils';\nimport Check from '@accelint/icons/check';\nimport CopyToClipboard from '@accelint/icons/copy-to-clipboard';\nimport GlobalShare from '@accelint/icons/global-share';\nimport { filterDOMProps } from '@react-aria/utils';\nimport 'client-only';\nimport {\n type CSSProperties,\n type ReactNode,\n useCallback,\n useMemo,\n useState,\n} from 'react';\nimport {\n Text as AriaText,\n composeRenderProps,\n FieldError,\n FieldErrorContext,\n GroupContext,\n LabelContext,\n Provider,\n TextContext,\n useContextProps,\n} from 'react-aria-components';\nimport { useCoordinateField } from '../../hooks/coordinate-field';\nimport { Button } from '../button';\nimport { Dialog } from '../dialog';\nimport { DialogContent } from '../dialog/content';\nimport { DialogFooter } from '../dialog/footer';\nimport { DialogTitle } from '../dialog/title';\nimport { DialogTrigger } from '../dialog/trigger';\nimport { Icon } from '../icon';\nimport { Label } from '../label';\nimport { Popover } from '../popover';\nimport { PopoverContent } from '../popover/content';\nimport { PopoverTitle } from '../popover/title';\nimport { Radio } from '../radio';\nimport { RadioGroup } from '../radio/group';\nimport { CoordinateFieldContext, CoordinateFieldStateContext } from './context';\nimport {\n type CoordinateFormatResult,\n getAllCoordinateFormats,\n} from './coordinate-utils';\nimport { CoordinateSegment } from './segment';\nimport { GROUP_SEPARATOR, getSegmentLabel } from './segment-configs';\nimport styles from './styles.module.css';\nimport {\n COORDINATE_FORMAT_LABELS,\n COORDINATE_FORMAT_NAMES,\n COORDINATE_SYSTEMS,\n type CoordinateSystem,\n} from './types';\nimport { calculateMinControlWidth } from './width-utils';\nimport type { CoordinateFieldProps } from './types';\n\n/**\n * CoordinateField - A comprehensive coordinate input component with multiple format support\n *\n * Provides accessible coordinate input functionality with support for multiple coordinate\n * systems (DD, DDM, DMS, MGRS, UTM). All values are normalized to Decimal Degrees internally\n * for consistency.\n *\n * @param props - The coordinate field props.\n * @param props.ref - Reference to the coordinate field element.\n * @param props.classNames - Custom class names for sub-elements.\n * @param props.description - Description text displayed below the field.\n * @param props.label - Label text for the coordinate field.\n * @param props.format - Coordinate format to use (dd, ddm, dms, mgrs, utm).\n * @param props.size - Size variant of the field.\n * @param props.variant - Layout variant (inline or stacked).\n * @param props.showFormatButton - Whether to show the format conversion button.\n * @param props.isDisabled - Whether the field is disabled.\n * @param props.isInvalid - Whether the field is in an invalid state.\n * @param props.isRequired - Whether the field is required.\n * @param props.isReadOnly - Whether the field is read-only.\n * @returns The coordinate field component.\n *\n * @example\n * ```tsx\n * // Basic coordinate field\n * <CoordinateField label=\"Location\" />\n * ```\n *\n * @example\n * ```tsx\n * // Coordinate field with validation\n * <CoordinateField\n * label=\"Target Coordinates\"\n * isRequired\n * isInvalid={hasError}\n * errorMessage=\"Please enter a valid coordinate\"\n * />\n * ```\n *\n * @example\n * ```tsx\n * // Coordinate field with specific format\n * <CoordinateField\n * label=\"Position\"\n * format=\"dms\"\n * description=\"Enter coordinates in Degrees Minutes Seconds format\"\n * />\n * ```\n *\n * @example\n * ```tsx\n * // Compact coordinate field\n * <CoordinateField\n * label=\"Coordinates\"\n * size=\"small\"\n * format=\"dd\"\n * />\n * ```\n *\n * @example\n * ```tsx\n * // Controlled coordinate field\n * <CoordinateField\n * label=\"Selected Location\"\n * value={coordinates}\n * onChange={setCoordinates}\n * />\n * ```\n *\n * @example\n * ```tsx\n * // Coordinate field with error handling\n * <CoordinateField\n * label=\"Target Coordinates\"\n * onError={(message, context) => {\n * // message will be \"Invalid coordinate value\" for validation errors\n * // or \"Invalid coordinate format\" for paste errors\n * setErrorMessage(message);\n * console.error(message, context);\n * }}\n * isInvalid={!!errorMessage}\n * errorMessage={errorMessage}\n * />\n * ```\n */\nexport function CoordinateField({ ref, ...props }: CoordinateFieldProps) {\n [props, ref] = useContextProps(props, ref, CoordinateFieldContext);\n\n const {\n classNames,\n description: descriptionProp,\n label: labelProp,\n format = 'dd',\n size = 'medium',\n variant = 'inline',\n showFormatButton = true,\n isDisabled = false,\n isInvalid: isInvalidProp = false,\n isRequired = false,\n isReadOnly = false,\n ...rest\n } = props;\n\n const isSmall = size === 'small';\n\n const DOMProps = filterDOMProps(rest, { global: true });\n\n // When size is small and label is hidden, use aria-label instead of aria-labelledby\n // to ensure screen readers have an accessible name\n const ariaLabelForSmallSize =\n isSmall && labelProp ? labelProp : rest['aria-label'];\n\n const {\n state,\n focus,\n paste,\n copy,\n registerTimeout,\n fieldProps,\n labelProps,\n descriptionProps,\n errorProps,\n validation,\n effectiveErrorMessage,\n isInvalid,\n } = useCoordinateField(\n props,\n ariaLabelForSmallSize,\n rest['aria-describedby'],\n rest['aria-details'],\n );\n\n const componentState = {\n segmentValues: state.segmentValues,\n format,\n currentValue: state.currentValue,\n validationErrors: state.validationErrors,\n isDisabled,\n isInvalid,\n isRequired,\n size,\n variant,\n registerTimeout,\n };\n\n // Store all coordinate formats, calculated only when popover opens\n const [allCoordinateFormats, setAllCoordinateFormats] = useState<Record<\n CoordinateSystem,\n CoordinateFormatResult\n > | null>(null);\n\n const handlePopoverOpenChange = useCallback(\n (isOpen: boolean) => {\n if (isOpen) {\n setAllCoordinateFormats(getAllCoordinateFormats(state.currentValue));\n }\n },\n [state.currentValue],\n );\n\n // Calculate the minimum width needed for the control container\n // This keeps the outlined container at a fixed width while segments animate\n const minControlWidth = useMemo(\n () =>\n calculateMinControlWidth(\n state.editableSegmentConfigs,\n state.segmentConfigs,\n showFormatButton,\n ),\n [state.editableSegmentConfigs, state.segmentConfigs, showFormatButton],\n );\n\n return (\n <Provider\n values={[\n [CoordinateFieldContext, props],\n [CoordinateFieldStateContext, componentState],\n [GroupContext, fieldProps],\n [LabelContext, labelProps],\n [\n TextContext,\n {\n slots: {\n description: descriptionProps,\n errorMessage: errorProps,\n },\n },\n ],\n [FieldErrorContext, validation],\n ]}\n >\n <div\n {...DOMProps}\n {...fieldProps}\n ref={ref}\n className={clsx(\n 'group/coordinate-field',\n styles.field,\n classNames?.field,\n )}\n data-size={size}\n data-disabled={isDisabled || null}\n data-invalid={isInvalid || null}\n >\n {!isSmall && labelProp && (\n <Label\n className={classNames?.label}\n isDisabled={isDisabled}\n isRequired={isRequired}\n >\n {labelProp}\n </Label>\n )}\n\n <div\n style={\n {\n '--min-width': variant === 'stacked' ? 'unset' : minControlWidth,\n } as CSSProperties\n }\n className={clsx(styles.control, classNames?.control)}\n data-readonly={isReadOnly || null}\n >\n <div\n className={clsx(styles.input, styles[variant], classNames?.input)}\n onPasteCapture={paste.handleInputPaste}\n data-input-container\n >\n {state.segmentConfigs\n .reduce<ReactNode[][]>(\n (acc, config, configIndex) => {\n const currentGroupIndex = acc.length - 1;\n\n if (\n config.value === GROUP_SEPARATOR &&\n variant === 'stacked'\n ) {\n acc.push([]);\n\n return acc;\n }\n\n if (config.type === 'literal') {\n acc[currentGroupIndex]?.push(\n <span\n key={`${format}-literal-${configIndex}-${config.value}`}\n className={styles.literal}\n >\n {config.value}\n </span>,\n );\n\n return acc;\n }\n\n const editableIndex = state.segmentConfigs\n .slice(0, configIndex)\n .filter((c) => c.type !== 'literal').length;\n\n acc[currentGroupIndex]?.push(\n <CoordinateSegment\n key={`${format}-segment-${editableIndex}`}\n value={state.segmentValues[editableIndex] || ''}\n onChange={(newValue) =>\n state.handleSegmentChange(editableIndex, newValue)\n }\n onFocus={() =>\n focus.setFocusedSegmentIndex(editableIndex)\n }\n onBlur={() => {\n focus.setFocusedSegmentIndex(-1);\n state.flushPendingValidation();\n }}\n onKeyDown={(e) =>\n focus.handleSegmentKeyDown(editableIndex, e)\n }\n onAutoAdvance={() =>\n focus.focusNextSegment(editableIndex)\n }\n onAutoRetreat={() =>\n focus.focusPreviousSegment(editableIndex)\n }\n placeholder={config.placeholder}\n maxLength={config.maxLength}\n pad={config.pad}\n className={clsx(styles.segment, classNames?.segment)}\n isDisabled={isDisabled}\n isReadOnly={isReadOnly}\n allowedChars={config.allowedChars}\n segmentRef={focus.segmentRefs[editableIndex]}\n segmentIndex={editableIndex}\n totalSegments={state.editableSegmentConfigs.length}\n ariaLabel={getSegmentLabel(format, editableIndex)}\n />,\n );\n\n return acc;\n },\n [[]],\n )\n .map((group, groupIndex) => (\n <div\n className={clsx(styles.segmentGroup, styles[variant])}\n key={`${format}-group-${\n // biome-ignore lint/suspicious/noArrayIndexKey: intentional\n groupIndex\n }`}\n >\n {group}\n </div>\n ))}\n </div>\n\n {showFormatButton && (\n <DialogTrigger onOpenChange={handlePopoverOpenChange}>\n <Button\n variant='icon'\n size='small'\n color='mono-bold'\n className={clsx(styles.formatButton, classNames?.formatButton)}\n aria-label='View coordinate in all formats'\n isDisabled={!copy.isFormatButtonEnabled}\n >\n <Icon>\n <GlobalShare />\n </Icon>\n </Button>\n <Popover classNames={{ popover: styles.popover }}>\n <PopoverTitle className={styles.popoverTitle}>\n Copy Coordinates\n </PopoverTitle>\n <PopoverContent>\n {allCoordinateFormats &&\n COORDINATE_SYSTEMS.map((formatKey) => {\n const formatResult = allCoordinateFormats[formatKey];\n const isCopied = copy.copiedFormat === formatKey;\n\n return (\n <div key={formatKey} className={styles.formatRow}>\n <div className={styles.formatLabels}>\n <span className={styles.formatLabel}>\n {COORDINATE_FORMAT_LABELS[formatKey]}\n </span>\n <span\n className={styles.formatValue}\n title={formatResult.value}\n >\n {formatResult.value}\n </span>\n </div>\n <Button\n variant='icon'\n color='mono-bold'\n aria-label={`Copy ${COORDINATE_FORMAT_LABELS[formatKey]} format`}\n onPress={() => copy.handleCopyFormat(formatKey)}\n isDisabled={!formatResult.isValid}\n >\n <Icon>\n {isCopied ? <Check /> : <CopyToClipboard />}\n </Icon>\n </Button>\n </div>\n );\n })}\n </PopoverContent>\n </Popover>\n </DialogTrigger>\n )}\n </div>\n\n {/* Description is hidden when field is invalid (unless disabled) to make room for error message */}\n {descriptionProp && !isSmall && (!isInvalid || isDisabled) && (\n <AriaText\n className={clsx(styles.description, classNames?.description)}\n slot='description'\n >\n {descriptionProp}\n </AriaText>\n )}\n\n <FieldError\n className={composeRenderProps(classNames?.error, (className) =>\n clsx(styles.error, className),\n )}\n >\n {effectiveErrorMessage}\n </FieldError>\n\n <DialogTrigger\n isOpen={paste.showDisambiguationModal}\n onOpenChange={paste.setShowDisambiguationModal}\n >\n <Button className={styles.hiddenTrigger}>Hidden Trigger</Button>\n <Dialog size='small'>\n <DialogTitle className={styles.modalTitle}>\n Select Coordinate Format\n </DialogTitle>\n <DialogContent>\n <p className={styles.modalDescription}>\n The pasted value matches multiple coordinate formats. Please\n select the correct interpretation:\n </p>\n\n <RadioGroup\n classNames={{ group: styles.formatOptions }}\n value={paste.selectedDisambiguationFormat}\n onChange={(value) =>\n paste.setSelectedDisambiguationFormat(\n value as CoordinateSystem,\n )\n }\n >\n {paste.disambiguationMatches.map((match) => (\n <Radio key={match.format} value={match.format}>\n <div className={styles.modalOptionContent}>\n <span className={styles.formatOptionLabel}>\n {COORDINATE_FORMAT_NAMES[match.format]}\n </span>\n <span className={styles.formatOptionValue}>\n {match.displayString}\n </span>\n </div>\n </Radio>\n ))}\n </RadioGroup>\n </DialogContent>\n <DialogFooter className={styles.modalActions}>\n <Button\n variant='flat'\n onPress={() => paste.setShowDisambiguationModal(false)}\n >\n Cancel\n </Button>\n <Button onPress={paste.handleDisambiguationSelect}>\n Apply Selected\n </Button>\n </DialogFooter>\n </Dialog>\n </DialogTrigger>\n </div>\n </Provider>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0JA,SAAgB,gBAAgB,EAAE,KAAK,GAAG,SAA+B;AACvE,EAAC,OAAO,OAAO,gBAAgB,OAAO,KAAK,uBAAuB;CAElE,MAAM,EACJ,YACA,aAAa,iBACb,OAAO,WACP,SAAS,MACT,OAAO,UACP,UAAU,UACV,mBAAmB,MACnB,aAAa,OACb,WAAW,gBAAgB,OAC3B,aAAa,OACb,aAAa,OACb,GAAG,SACD;CAEJ,MAAM,UAAU,SAAS;CAEzB,MAAM,WAAW,eAAe,MAAM,EAAE,QAAQ,MAAM,CAAC;CAIvD,MAAM,wBACJ,WAAW,YAAY,YAAY,KAAK;CAE1C,MAAM,EACJ,OACA,OACA,OACA,MACA,iBACA,YACA,YACA,kBACA,YACA,YACA,uBACA,cACE,mBACF,OACA,uBACA,KAAK,qBACL,KAAK,gBACN;CAED,MAAM,iBAAiB;EACrB,eAAe,MAAM;EACrB;EACA,cAAc,MAAM;EACpB,kBAAkB,MAAM;EACxB;EACA;EACA;EACA;EACA;EACA;EACD;CAGD,MAAM,CAAC,sBAAsB,2BAA2B,SAG9C,KAAK;CAEf,MAAM,0BAA0B,aAC7B,WAAoB;AACnB,MAAI,OACF,yBAAwB,wBAAwB,MAAM,aAAa,CAAC;IAGxE,CAAC,MAAM,aAAa,CACrB;CAID,MAAM,kBAAkB,cAEpB,yBACE,MAAM,wBACN,MAAM,gBACN,iBACD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copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.
2
+ * Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.
3
3
  * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
4
  * you may not use this file except in compliance with the License. You may obtain a copy
5
5
  * of the License at https://www.apache.org/licenses/LICENSE-2.0
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.
2
+ * Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.
3
3
  * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
4
  * you may not use this file except in compliance with the License. You may obtain a copy
5
5
  * of the License at https://www.apache.org/licenses/LICENSE-2.0
@@ -1 +1 @@
1
- {"version":3,"file":"segment-configs.js","names":["ddSegmentConfigs: SegmentConfig[]","ddmSegmentConfigs: SegmentConfig[]","dmsSegmentConfigs: SegmentConfig[]","mgrsSegmentConfigs: SegmentConfig[]","utmSegmentConfigs: SegmentConfig[]","EXPECTED_SEGMENT_COUNTS: Record<CoordinateSystem, number>"],"sources":["../../../src/components/coordinate-field/segment-configs.ts"],"sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/**\n * Coordinate Field Segment Configurations\n *\n * This file defines the segment layouts for each supported coordinate system format.\n * Each configuration specifies the editable segments and literal separators that make up\n * the coordinate input for that format.\n *\n * Supported formats:\n * - DD (Decimal Degrees) - 2 editable segments\n * - DDM (Degrees Decimal Minutes) - 6 editable segments\n * - DMS (Degrees Minutes Seconds) - 8 editable segments\n * - MGRS (Military Grid Reference System) - 5 editable segments\n * - UTM (Universal Transverse Mercator) - 4 editable segments\n *\n * References:\n * - DD parser: /packages/geo/src/coordinates/latlon/decimal-degrees/parser.ts\n * - DDM parser: /packages/geo/src/coordinates/latlon/degrees-decimal-minutes/parser.ts\n * - DMS parser: /packages/geo/src/coordinates/latlon/degrees-minutes-seconds/parser.ts\n * - MGRS parser: /packages/geo/src/coordinates/mgrs/parser.ts\n * - UTM parser: /packages/geo/src/coordinates/utm/parser.ts\n */\n\nimport type { CoordinateSystem, SegmentConfig } from './types';\n\n/** Padding for numeric segments (0.25ch ≈ quarter character width for visual spacing) */\nconst NUMERIC_PAD = 0.25;\n\n/** Larger padding for final segment to account for container edge (0.5ch ≈ half character) */\nconst LAST_PAD = 0.8;\n\n/** The separator used for the logical field groups. */\nexport const GROUP_SEPARATOR = ', ';\n\n/**\n * DD (Decimal Degrees) Segment Configuration\n *\n * Format: [lat_deg], [lon_deg]\n * Example: 89.765432, -123.456789\n *\n * Segments:\n * - Latitude degrees: -90 to 90, allows negative sign, decimals, 0-9\n * - Longitude degrees: -180 to 180, allows negative sign, decimals, 0-9\n *\n * Total segments: 2 editable\n */\nexport const ddSegmentConfigs: SegmentConfig[] = [\n {\n type: 'numeric',\n placeholder: '00.000000',\n allowedChars: '[0-9\\\\-\\\\.]',\n maxLength: 10, // Max: -90.123456\n pad: NUMERIC_PAD,\n },\n {\n type: 'literal',\n value: GROUP_SEPARATOR,\n },\n {\n type: 'numeric',\n placeholder: '-000.000000',\n allowedChars: '[0-9\\\\-\\\\.]',\n maxLength: 11, // Max: -180.123456\n pad: LAST_PAD,\n },\n];\n\n/**\n * DDM (Degrees Decimal Minutes) Segment Configuration\n *\n * Format: [lat_deg]° [lat_min]' [lat_dir], [lon_deg]° [lon_min]' [lon_dir]\n * Example: 89° 45.9259' N, 123° 27.4073' W\n *\n * Segments:\n * - Latitude degrees: 0-90, whole number only (no decimals)\n * - Latitude minutes: 0-59.9999, decimals allowed\n * - Latitude direction: N or S\n * - Longitude degrees: 0-180, whole number only (no decimals)\n * - Longitude minutes: 0-59.9999, decimals allowed\n * - Longitude direction: E or W\n *\n * Total segments: 6 editable\n */\nexport const ddmSegmentConfigs: SegmentConfig[] = [\n // Latitude degrees\n {\n type: 'numeric',\n placeholder: '00',\n allowedChars: '[0-9]',\n maxLength: 2, // Max: 90\n pad: NUMERIC_PAD,\n },\n {\n type: 'literal',\n value: '°',\n },\n // Latitude minutes (decimal minutes)\n {\n type: 'numeric',\n placeholder: '00.0000',\n allowedChars: '[0-9\\\\.]',\n maxLength: 7, // Max: 59.9999\n pad: NUMERIC_PAD,\n },\n {\n type: 'literal',\n value: \"'\",\n },\n // Latitude direction\n {\n type: 'directional',\n placeholder: 'N',\n allowedChars: '[NS]',\n maxLength: 1,\n pad: 0,\n },\n {\n type: 'literal',\n value: GROUP_SEPARATOR,\n },\n // Longitude degrees\n {\n type: 'numeric',\n placeholder: '000',\n allowedChars: '[0-9]',\n maxLength: 3, // Max: 180\n pad: NUMERIC_PAD,\n },\n {\n type: 'literal',\n value: '°',\n },\n // Longitude minutes (decimal minutes)\n {\n type: 'numeric',\n placeholder: '00.0000',\n allowedChars: '[0-9\\\\.]',\n maxLength: 7, // Max: 59.9999\n pad: LAST_PAD,\n },\n {\n type: 'literal',\n value: \"'\",\n },\n // Longitude direction\n {\n type: 'directional',\n placeholder: 'W',\n allowedChars: '[EW]',\n maxLength: 1,\n pad: 0,\n },\n];\n\n/**\n * DMS (Degrees Minutes Seconds) Segment Configuration\n *\n * Format: [lat_deg]° [lat_min]' [lat_sec]\" [lat_dir], [lon_deg]° [lon_min]' [lon_sec]\" [lon_dir]\n * Example: 89° 45' 55.56\" N, 123° 27' 24.44\" W\n *\n * Segments:\n * - Latitude degrees: 0-90, whole number only (no decimals)\n * - Latitude minutes: 0-59, whole number only (no decimals)\n * - Latitude seconds: 0-59.999, decimals allowed\n * - Latitude direction: N or S\n * - Longitude degrees: 0-180, whole number only (no decimals)\n * - Longitude minutes: 0-59, whole number only (no decimals)\n * - Longitude seconds: 0-59.999, decimals allowed\n * - Longitude direction: E or W\n *\n * Total segments: 8 editable\n */\nexport const dmsSegmentConfigs: SegmentConfig[] = [\n // Latitude degrees\n {\n type: 'numeric',\n placeholder: '00',\n allowedChars: '[0-9]',\n maxLength: 2, // Max: 90\n pad: NUMERIC_PAD,\n },\n {\n type: 'literal',\n value: '°',\n },\n // Latitude minutes (whole number)\n {\n type: 'numeric',\n placeholder: '00',\n allowedChars: '[0-9]',\n maxLength: 2, // Max: 59\n pad: NUMERIC_PAD,\n },\n {\n type: 'literal',\n value: \"'\",\n },\n // Latitude seconds (decimal seconds)\n {\n type: 'numeric',\n placeholder: '00.00',\n allowedChars: '[0-9\\\\.]',\n maxLength: 5, // Max: 59.99\n pad: NUMERIC_PAD,\n },\n {\n type: 'literal',\n value: '\"',\n },\n // Latitude direction\n {\n type: 'directional',\n placeholder: 'N',\n allowedChars: '[NS]',\n maxLength: 1,\n pad: 0,\n },\n {\n type: 'literal',\n value: GROUP_SEPARATOR,\n },\n // Longitude degrees\n {\n type: 'numeric',\n placeholder: '000',\n allowedChars: '[0-9]',\n maxLength: 3, // Max: 180\n pad: NUMERIC_PAD,\n },\n {\n type: 'literal',\n value: '°',\n },\n // Longitude minutes (whole number)\n {\n type: 'numeric',\n placeholder: '00',\n allowedChars: '[0-9]',\n maxLength: 2, // Max: 59\n pad: NUMERIC_PAD,\n },\n {\n type: 'literal',\n value: \"'\",\n },\n // Longitude seconds (decimal seconds)\n {\n type: 'numeric',\n placeholder: '00.00',\n allowedChars: '[0-9\\\\.]',\n maxLength: 5, // Max: 59.99\n pad: NUMERIC_PAD,\n },\n {\n type: 'literal',\n value: '\"',\n },\n // Longitude direction\n {\n type: 'directional',\n placeholder: 'W',\n allowedChars: '[EW]',\n maxLength: 1,\n pad: 0,\n },\n];\n\n/**\n * MGRS (Military Grid Reference System) Segment Configuration\n *\n * Format: [zone][band] [grid_100km] [easting] [northing]\n * Example: 18T WM 12345 67890\n *\n * Segments:\n * - Zone: 1-60, 2 digits\n * - Band: C-X (excluding I and O), 1 letter\n * - Grid 100km: 2 letters (A-Z excluding I and O)\n * - Easting: 5 digits (can be 1-5 based on precision)\n * - Northing: 5 digits (can be 1-5 based on precision)\n *\n * Total segments: 5 editable\n *\n * Reference: /packages/geo/src/coordinates/mgrs/parser.ts\n * Pattern: /^((?:..?)?)(\\w?)\\s*((?:\\w{2})?)\\s*(?:(\\d+(?:\\.\\d*)?)?)\\s*(?:(\\d+(?:\\.\\d*)?)?)$/i\n */\nexport const mgrsSegmentConfigs: SegmentConfig[] = [\n // Zone (1-60)\n {\n type: 'numeric',\n placeholder: '00',\n allowedChars: '[0-9]',\n maxLength: 2, // Max: 60\n pad: NUMERIC_PAD,\n },\n // Band (C-X, excluding I and O)\n {\n type: 'alphanumeric',\n placeholder: 'T',\n allowedChars: '[C-HJ-NP-X]', // Excludes I and O\n maxLength: 1,\n pad: 0,\n },\n {\n type: 'literal',\n value: ' ',\n },\n // Grid 100km identifier (2 letters, A-Z excluding I and O)\n {\n type: 'alphanumeric',\n placeholder: 'WM',\n allowedChars: '[A-HJ-NP-Z]', // Excludes I and O\n maxLength: 2,\n pad: 0,\n },\n {\n type: 'literal',\n value: ' ',\n },\n // Easting (5 digits, can be 1-5 based on precision)\n {\n type: 'numeric',\n placeholder: '00000',\n allowedChars: '[0-9]',\n maxLength: 5,\n pad: NUMERIC_PAD,\n },\n {\n type: 'literal',\n value: ' ',\n },\n // Northing (5 digits, can be 1-5 based on precision)\n {\n type: 'numeric',\n placeholder: '00000',\n allowedChars: '[0-9]',\n maxLength: 5,\n pad: LAST_PAD,\n },\n];\n\n/**\n * UTM (Universal Transverse Mercator) Segment Configuration\n *\n * Format: [zone][hemisphere] [easting] [northing]\n * Example: 18N 585628 4511644\n *\n * Segments:\n * - Zone: 1-60, 2 digits\n * - Hemisphere: N or S, 1 letter\n * - Easting: 6-7 digits\n * - Northing: 7 digits\n *\n * Total segments: 4 editable\n *\n * Reference: /packages/geo/src/coordinates/utm/parser.ts\n * Pattern: /^((?:..)?)\\s*(\\w?)\\s*(?:(\\d+(?:\\.\\d*)?)?)\\s*(?:(\\d+(?:\\.\\d*)?)?)$/i\n */\nexport const utmSegmentConfigs: SegmentConfig[] = [\n // Zone (1-60)\n {\n type: 'numeric',\n placeholder: '00',\n allowedChars: '[0-9]',\n maxLength: 2, // Max: 60\n pad: NUMERIC_PAD,\n },\n // Hemisphere (N or S)\n {\n type: 'directional',\n placeholder: 'N',\n allowedChars: '[NS]',\n maxLength: 1,\n pad: 0,\n },\n {\n type: 'literal',\n value: ' ',\n },\n // Easting (6-7 digits)\n {\n type: 'numeric',\n placeholder: '000000',\n allowedChars: '[0-9]',\n maxLength: 7,\n pad: NUMERIC_PAD,\n },\n {\n type: 'literal',\n value: ' ',\n },\n // Northing (7 digits)\n {\n type: 'numeric',\n placeholder: '0000000',\n allowedChars: '[0-9]',\n maxLength: 7,\n pad: LAST_PAD,\n },\n];\n\n/**\n * Get segment configurations for a specific coordinate system\n *\n * @param format - The coordinate system format\n * @returns Array of segment configurations for the specified format\n */\nexport function getSegmentConfigs(format: CoordinateSystem): SegmentConfig[] {\n switch (format) {\n case 'dd':\n return ddSegmentConfigs;\n case 'ddm':\n return ddmSegmentConfigs;\n case 'dms':\n return dmsSegmentConfigs;\n case 'mgrs':\n return mgrsSegmentConfigs;\n case 'utm':\n return utmSegmentConfigs;\n default:\n // Default to DD format if unknown format provided\n return ddSegmentConfigs;\n }\n}\n\n/**\n * Get format description with example\n *\n * Provides a user-friendly description of the coordinate format with an example value.\n * These descriptions can be used as helper text to guide users on the expected format.\n *\n * @param format - The coordinate system format\n * @returns Description string with format example\n */\nexport function getFormatDescription(format: CoordinateSystem): string {\n switch (format) {\n case 'dd':\n return 'Example: 40.7128, -74.0060 (New York City)';\n case 'ddm':\n return \"Example: 40° 42.768' N, 74° 0.360' W (New York City)\";\n case 'dms':\n return 'Example: 40° 42\\' 46.08\" N, 74° 0\\' 21.60\" W (New York City)';\n case 'mgrs':\n return 'Example: 18T WL 80654 06346 (New York City)';\n case 'utm':\n return 'Example: 18N 585628 4511644 (New York City)';\n default:\n return '';\n }\n}\n\n/**\n * Get editable segment count for a format\n *\n * Returns the number of editable segments (excluding literal separators) for each format.\n * This is useful for initializing segment values and validation.\n *\n * @param format - The coordinate system format\n * @returns Number of editable segments\n */\nexport function getEditableSegmentCount(format: CoordinateSystem): number {\n const configs = getSegmentConfigs(format);\n return configs.filter((config) => config.type !== 'literal').length;\n}\n\n/**\n * Validate segment count for each format\n *\n * Expected editable segment counts:\n * - DD: 2 segments (lat, lon)\n * - DDM: 6 segments (lat_deg, lat_min, lat_dir, lon_deg, lon_min, lon_dir)\n * - DMS: 8 segments (lat_deg, lat_min, lat_sec, lat_dir, lon_deg, lon_min, lon_sec, lon_dir)\n * - MGRS: 5 segments (zone, band, grid, easting, northing)\n * - UTM: 4 segments (zone, hemisphere, easting, northing)\n */\nexport const EXPECTED_SEGMENT_COUNTS: Record<CoordinateSystem, number> = {\n dd: 2,\n ddm: 6,\n dms: 8,\n mgrs: 5,\n utm: 4,\n};\n\n/**\n * Get semantic accessibility label for a segment based on format and editable index\n *\n * Provides descriptive labels for screen readers (e.g., \"Latitude degrees\", \"Longitude minutes\")\n * to improve accessibility beyond generic \"Coordinate segment 1\" announcements.\n *\n * @param format - The coordinate system format\n * @param editableIndex - The index of the editable segment (0-based, excluding literals)\n * @returns Semantic label string for the segment\n */\nexport function getSegmentLabel(\n format: CoordinateSystem,\n editableIndex: number,\n): string {\n switch (format) {\n case 'dd':\n // DD: [lat, lon]\n return editableIndex === 0 ? 'Latitude' : 'Longitude';\n\n case 'ddm':\n // DDM: [lat_deg, lat_min, lat_dir, lon_deg, lon_min, lon_dir]\n switch (editableIndex) {\n case 0:\n return 'Latitude degrees';\n case 1:\n return 'Latitude minutes';\n case 2:\n return 'Latitude direction';\n case 3:\n return 'Longitude degrees';\n case 4:\n return 'Longitude minutes';\n case 5:\n return 'Longitude direction';\n default:\n return `Coordinate segment ${editableIndex + 1}`;\n }\n\n case 'dms':\n // DMS: [lat_deg, lat_min, lat_sec, lat_dir, lon_deg, lon_min, lon_sec, lon_dir]\n switch (editableIndex) {\n case 0:\n return 'Latitude degrees';\n case 1:\n return 'Latitude minutes';\n case 2:\n return 'Latitude seconds';\n case 3:\n return 'Latitude direction';\n case 4:\n return 'Longitude degrees';\n case 5:\n return 'Longitude minutes';\n case 6:\n return 'Longitude seconds';\n case 7:\n return 'Longitude direction';\n default:\n return `Coordinate segment ${editableIndex + 1}`;\n }\n\n case 'mgrs':\n // MGRS: [zone, band, grid, easting, northing]\n switch (editableIndex) {\n case 0:\n return 'MGRS zone';\n case 1:\n return 'MGRS band';\n case 2:\n return 'MGRS grid square';\n case 3:\n return 'MGRS easting';\n case 4:\n return 'MGRS northing';\n default:\n return `Coordinate segment ${editableIndex + 1}`;\n }\n\n case 'utm':\n // UTM: [zone, hemisphere, easting, northing]\n switch (editableIndex) {\n case 0:\n return 'UTM zone';\n case 1:\n return 'UTM hemisphere';\n case 2:\n return 'UTM easting';\n case 3:\n return 'UTM northing';\n default:\n return `Coordinate segment ${editableIndex + 1}`;\n }\n\n default:\n return `Coordinate segment ${editableIndex + 1}`;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;AAqCA,MAAM,cAAc;;AAGpB,MAAM,WAAW;;AAGjB,MAAa,kBAAkB;;;;;;;;;;;;;AAc/B,MAAaA,mBAAoC;CAC/C;EACE,MAAM;EACN,aAAa;EACb,cAAc;EACd,WAAW;EACX,KAAK;EACN;CACD;EACE,MAAM;EACN,OAAO;EACR;CACD;EACE,MAAM;EACN,aAAa;EACb,cAAc;EACd,WAAW;EACX,KAAK;EACN;CACF;;;;;;;;;;;;;;;;;AAkBD,MAAaC,oBAAqC;CAEhD;EACE,MAAM;EACN,aAAa;EACb,cAAc;EACd,WAAW;EACX,KAAK;EACN;CACD;EACE,MAAM;EACN,OAAO;EACR;CAED;EACE,MAAM;EACN,aAAa;EACb,cAAc;EACd,WAAW;EACX,KAAK;EACN;CACD;EACE,MAAM;EACN,OAAO;EACR;CAED;EACE,MAAM;EACN,aAAa;EACb,cAAc;EACd,WAAW;EACX,KAAK;EACN;CACD;EACE,MAAM;EACN,OAAO;EACR;CAED;EACE,MAAM;EACN,aAAa;EACb,cAAc;EACd,WAAW;EACX,KAAK;EACN;CACD;EACE,MAAM;EACN,OAAO;EACR;CAED;EACE,MAAM;EACN,aAAa;EACb,cAAc;EACd,WAAW;EACX,KAAK;EACN;CACD;EACE,MAAM;EACN,OAAO;EACR;CAED;EACE,MAAM;EACN,aAAa;EACb,cAAc;EACd,WAAW;EACX,KAAK;EACN;CACF;;;;;;;;;;;;;;;;;;;AAoBD,MAAaC,oBAAqC;CAEhD;EACE,MAAM;EACN,aAAa;EACb,cAAc;EACd,WAAW;EACX,KAAK;EACN;CACD;EACE,MAAM;EACN,OAAO;EACR;CAED;EACE,MAAM;EACN,aAAa;EACb,cAAc;EACd,WAAW;EACX,KAAK;EACN;CACD;EACE,MAAM;EACN,OAAO;EACR;CAED;EACE,MAAM;EACN,aAAa;EACb,cAAc;EACd,WAAW;EACX,KAAK;EACN;CACD;EACE,MAAM;EACN,OAAO;EACR;CAED;EACE,MAAM;EACN,aAAa;EACb,cAAc;EACd,WAAW;EACX,KAAK;EACN;CACD;EACE,MAAM;EACN,OAAO;EACR;CAED;EACE,MAAM;EACN,aAAa;EACb,cAAc;EACd,WAAW;EACX,KAAK;EACN;CACD;EACE,MAAM;EACN,OAAO;EACR;CAED;EACE,MAAM;EACN,aAAa;EACb,cAAc;EACd,WAAW;EACX,KAAK;EACN;CACD;EACE,MAAM;EACN,OAAO;EACR;CAED;EACE,MAAM;EACN,aAAa;EACb,cAAc;EACd,WAAW;EACX,KAAK;EACN;CACD;EACE,MAAM;EACN,OAAO;EACR;CAED;EACE,MAAM;EACN,aAAa;EACb,cAAc;EACd,WAAW;EACX,KAAK;EACN;CACF;;;;;;;;;;;;;;;;;;;AAoBD,MAAaC,qBAAsC;CAEjD;EACE,MAAM;EACN,aAAa;EACb,cAAc;EACd,WAAW;EACX,KAAK;EACN;CAED;EACE,MAAM;EACN,aAAa;EACb,cAAc;EACd,WAAW;EACX,KAAK;EACN;CACD;EACE,MAAM;EACN,OAAO;EACR;CAED;EACE,MAAM;EACN,aAAa;EACb,cAAc;EACd,WAAW;EACX,KAAK;EACN;CACD;EACE,MAAM;EACN,OAAO;EACR;CAED;EACE,MAAM;EACN,aAAa;EACb,cAAc;EACd,WAAW;EACX,KAAK;EACN;CACD;EACE,MAAM;EACN,OAAO;EACR;CAED;EACE,MAAM;EACN,aAAa;EACb,cAAc;EACd,WAAW;EACX,KAAK;EACN;CACF;;;;;;;;;;;;;;;;;;AAmBD,MAAaC,oBAAqC;CAEhD;EACE,MAAM;EACN,aAAa;EACb,cAAc;EACd,WAAW;EACX,KAAK;EACN;CAED;EACE,MAAM;EACN,aAAa;EACb,cAAc;EACd,WAAW;EACX,KAAK;EACN;CACD;EACE,MAAM;EACN,OAAO;EACR;CAED;EACE,MAAM;EACN,aAAa;EACb,cAAc;EACd,WAAW;EACX,KAAK;EACN;CACD;EACE,MAAM;EACN,OAAO;EACR;CAED;EACE,MAAM;EACN,aAAa;EACb,cAAc;EACd,WAAW;EACX,KAAK;EACN;CACF;;;;;;;AAQD,SAAgB,kBAAkB,QAA2C;AAC3E,SAAQ,QAAR;EACE,KAAK,KACH,QAAO;EACT,KAAK,MACH,QAAO;EACT,KAAK,MACH,QAAO;EACT,KAAK,OACH,QAAO;EACT,KAAK,MACH,QAAO;EACT,QAEE,QAAO;;;;;;;;;;;;AAab,SAAgB,qBAAqB,QAAkC;AACrE,SAAQ,QAAR;EACE,KAAK,KACH,QAAO;EACT,KAAK,MACH,QAAO;EACT,KAAK,MACH,QAAO;EACT,KAAK,OACH,QAAO;EACT,KAAK,MACH,QAAO;EACT,QACE,QAAO;;;;;;;;;;;;AAab,SAAgB,wBAAwB,QAAkC;AAExE,QADgB,kBAAkB,OAAO,CAC1B,QAAQ,WAAW,OAAO,SAAS,UAAU,CAAC;;;;;;;;;;;;AAa/D,MAAaC,0BAA4D;CACvE,IAAI;CACJ,KAAK;CACL,KAAK;CACL,MAAM;CACN,KAAK;CACN;;;;;;;;;;;AAYD,SAAgB,gBACd,QACA,eACQ;AACR,SAAQ,QAAR;EACE,KAAK,KAEH,QAAO,kBAAkB,IAAI,aAAa;EAE5C,KAAK,MAEH,SAAQ,eAAR;GACE,KAAK,EACH,QAAO;GACT,KAAK,EACH,QAAO;GACT,KAAK,EACH,QAAO;GACT,KAAK,EACH,QAAO;GACT,KAAK,EACH,QAAO;GACT,KAAK,EACH,QAAO;GACT,QACE,QAAO,sBAAsB,gBAAgB;;EAGnD,KAAK,MAEH,SAAQ,eAAR;GACE,KAAK,EACH,QAAO;GACT,KAAK,EACH,QAAO;GACT,KAAK,EACH,QAAO;GACT,KAAK,EACH,QAAO;GACT,KAAK,EACH,QAAO;GACT,KAAK,EACH,QAAO;GACT,KAAK,EACH,QAAO;GACT,KAAK,EACH,QAAO;GACT,QACE,QAAO,sBAAsB,gBAAgB;;EAGnD,KAAK,OAEH,SAAQ,eAAR;GACE,KAAK,EACH,QAAO;GACT,KAAK,EACH,QAAO;GACT,KAAK,EACH,QAAO;GACT,KAAK,EACH,QAAO;GACT,KAAK,EACH,QAAO;GACT,QACE,QAAO,sBAAsB,gBAAgB;;EAGnD,KAAK,MAEH,SAAQ,eAAR;GACE,KAAK,EACH,QAAO;GACT,KAAK,EACH,QAAO;GACT,KAAK,EACH,QAAO;GACT,KAAK,EACH,QAAO;GACT,QACE,QAAO,sBAAsB,gBAAgB;;EAGnD,QACE,QAAO,sBAAsB,gBAAgB"}
1
+ {"version":3,"file":"segment-configs.js","names":["ddSegmentConfigs: SegmentConfig[]","ddmSegmentConfigs: SegmentConfig[]","dmsSegmentConfigs: SegmentConfig[]","mgrsSegmentConfigs: SegmentConfig[]","utmSegmentConfigs: SegmentConfig[]","EXPECTED_SEGMENT_COUNTS: Record<CoordinateSystem, number>"],"sources":["../../../src/components/coordinate-field/segment-configs.ts"],"sourcesContent":["/*\n * Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/**\n * Coordinate Field Segment Configurations\n *\n * This file defines the segment layouts for each supported coordinate system format.\n * Each configuration specifies the editable segments and literal separators that make up\n * the coordinate input for that format.\n *\n * Supported formats:\n * - DD (Decimal Degrees) - 2 editable segments\n * - DDM (Degrees Decimal Minutes) - 6 editable segments\n * - DMS (Degrees Minutes Seconds) - 8 editable segments\n * - MGRS (Military Grid Reference System) - 5 editable segments\n * - UTM (Universal Transverse Mercator) - 4 editable segments\n *\n * References:\n * - DD parser: /packages/geo/src/coordinates/latlon/decimal-degrees/parser.ts\n * - DDM parser: /packages/geo/src/coordinates/latlon/degrees-decimal-minutes/parser.ts\n * - DMS parser: /packages/geo/src/coordinates/latlon/degrees-minutes-seconds/parser.ts\n * - MGRS parser: /packages/geo/src/coordinates/mgrs/parser.ts\n * - UTM parser: /packages/geo/src/coordinates/utm/parser.ts\n */\n\nimport type { CoordinateSystem, SegmentConfig } from './types';\n\n/** Padding for numeric segments (0.25ch ≈ quarter character width for visual spacing) */\nconst NUMERIC_PAD = 0.25;\n\n/** Larger padding for final segment to account for container edge (0.5ch ≈ half character) */\nconst LAST_PAD = 0.8;\n\n/** The separator used for the logical field groups. */\nexport const GROUP_SEPARATOR = ', ';\n\n/**\n * DD (Decimal Degrees) Segment Configuration\n *\n * Format: [lat_deg], [lon_deg]\n * Example: 89.765432, -123.456789\n *\n * Segments:\n * - Latitude degrees: -90 to 90, allows negative sign, decimals, 0-9\n * - Longitude degrees: -180 to 180, allows negative sign, decimals, 0-9\n *\n * Total segments: 2 editable\n */\nexport const ddSegmentConfigs: SegmentConfig[] = [\n {\n type: 'numeric',\n placeholder: '00.000000',\n allowedChars: '[0-9\\\\-\\\\.]',\n maxLength: 10, // Max: -90.123456\n pad: NUMERIC_PAD,\n },\n {\n type: 'literal',\n value: GROUP_SEPARATOR,\n },\n {\n type: 'numeric',\n placeholder: '-000.000000',\n allowedChars: '[0-9\\\\-\\\\.]',\n maxLength: 11, // Max: -180.123456\n pad: LAST_PAD,\n },\n];\n\n/**\n * DDM (Degrees Decimal Minutes) Segment Configuration\n *\n * Format: [lat_deg]° [lat_min]' [lat_dir], [lon_deg]° [lon_min]' [lon_dir]\n * Example: 89° 45.9259' N, 123° 27.4073' W\n *\n * Segments:\n * - Latitude degrees: 0-90, whole number only (no decimals)\n * - Latitude minutes: 0-59.9999, decimals allowed\n * - Latitude direction: N or S\n * - Longitude degrees: 0-180, whole number only (no decimals)\n * - Longitude minutes: 0-59.9999, decimals allowed\n * - Longitude direction: E or W\n *\n * Total segments: 6 editable\n */\nexport const ddmSegmentConfigs: SegmentConfig[] = [\n // Latitude degrees\n {\n type: 'numeric',\n placeholder: '00',\n allowedChars: '[0-9]',\n maxLength: 2, // Max: 90\n pad: NUMERIC_PAD,\n },\n {\n type: 'literal',\n value: '°',\n },\n // Latitude minutes (decimal minutes)\n {\n type: 'numeric',\n placeholder: '00.0000',\n allowedChars: '[0-9\\\\.]',\n maxLength: 7, // Max: 59.9999\n pad: NUMERIC_PAD,\n },\n {\n type: 'literal',\n value: \"'\",\n },\n // Latitude direction\n {\n type: 'directional',\n placeholder: 'N',\n allowedChars: '[NS]',\n maxLength: 1,\n pad: 0,\n },\n {\n type: 'literal',\n value: GROUP_SEPARATOR,\n },\n // Longitude degrees\n {\n type: 'numeric',\n placeholder: '000',\n allowedChars: '[0-9]',\n maxLength: 3, // Max: 180\n pad: NUMERIC_PAD,\n },\n {\n type: 'literal',\n value: '°',\n },\n // Longitude minutes (decimal minutes)\n {\n type: 'numeric',\n placeholder: '00.0000',\n allowedChars: '[0-9\\\\.]',\n maxLength: 7, // Max: 59.9999\n pad: LAST_PAD,\n },\n {\n type: 'literal',\n value: \"'\",\n },\n // Longitude direction\n {\n type: 'directional',\n placeholder: 'W',\n allowedChars: '[EW]',\n maxLength: 1,\n pad: 0,\n },\n];\n\n/**\n * DMS (Degrees Minutes Seconds) Segment Configuration\n *\n * Format: [lat_deg]° [lat_min]' [lat_sec]\" [lat_dir], [lon_deg]° [lon_min]' [lon_sec]\" [lon_dir]\n * Example: 89° 45' 55.56\" N, 123° 27' 24.44\" W\n *\n * Segments:\n * - Latitude degrees: 0-90, whole number only (no decimals)\n * - Latitude minutes: 0-59, whole number only (no decimals)\n * - Latitude seconds: 0-59.999, decimals allowed\n * - Latitude direction: N or S\n * - Longitude degrees: 0-180, whole number only (no decimals)\n * - Longitude minutes: 0-59, whole number only (no decimals)\n * - Longitude seconds: 0-59.999, decimals allowed\n * - Longitude direction: E or W\n *\n * Total segments: 8 editable\n */\nexport const dmsSegmentConfigs: SegmentConfig[] = [\n // Latitude degrees\n {\n type: 'numeric',\n placeholder: '00',\n allowedChars: '[0-9]',\n maxLength: 2, // Max: 90\n pad: NUMERIC_PAD,\n },\n {\n type: 'literal',\n value: '°',\n },\n // Latitude minutes (whole number)\n {\n type: 'numeric',\n placeholder: '00',\n allowedChars: '[0-9]',\n maxLength: 2, // Max: 59\n pad: NUMERIC_PAD,\n },\n {\n type: 'literal',\n value: \"'\",\n },\n // Latitude seconds (decimal seconds)\n {\n type: 'numeric',\n placeholder: '00.00',\n allowedChars: '[0-9\\\\.]',\n maxLength: 5, // Max: 59.99\n pad: NUMERIC_PAD,\n },\n {\n type: 'literal',\n value: '\"',\n },\n // Latitude direction\n {\n type: 'directional',\n placeholder: 'N',\n allowedChars: '[NS]',\n maxLength: 1,\n pad: 0,\n },\n {\n type: 'literal',\n value: GROUP_SEPARATOR,\n },\n // Longitude degrees\n {\n type: 'numeric',\n placeholder: '000',\n allowedChars: '[0-9]',\n maxLength: 3, // Max: 180\n pad: NUMERIC_PAD,\n },\n {\n type: 'literal',\n value: '°',\n },\n // Longitude minutes (whole number)\n {\n type: 'numeric',\n placeholder: '00',\n allowedChars: '[0-9]',\n maxLength: 2, // Max: 59\n pad: NUMERIC_PAD,\n },\n {\n type: 'literal',\n value: \"'\",\n },\n // Longitude seconds (decimal seconds)\n {\n type: 'numeric',\n placeholder: '00.00',\n allowedChars: '[0-9\\\\.]',\n maxLength: 5, // Max: 59.99\n pad: NUMERIC_PAD,\n },\n {\n type: 'literal',\n value: '\"',\n },\n // Longitude direction\n {\n type: 'directional',\n placeholder: 'W',\n allowedChars: '[EW]',\n maxLength: 1,\n pad: 0,\n },\n];\n\n/**\n * MGRS (Military Grid Reference System) Segment Configuration\n *\n * Format: [zone][band] [grid_100km] [easting] [northing]\n * Example: 18T WM 12345 67890\n *\n * Segments:\n * - Zone: 1-60, 2 digits\n * - Band: C-X (excluding I and O), 1 letter\n * - Grid 100km: 2 letters (A-Z excluding I and O)\n * - Easting: 5 digits (can be 1-5 based on precision)\n * - Northing: 5 digits (can be 1-5 based on precision)\n *\n * Total segments: 5 editable\n *\n * Reference: /packages/geo/src/coordinates/mgrs/parser.ts\n * Pattern: /^((?:..?)?)(\\w?)\\s*((?:\\w{2})?)\\s*(?:(\\d+(?:\\.\\d*)?)?)\\s*(?:(\\d+(?:\\.\\d*)?)?)$/i\n */\nexport const mgrsSegmentConfigs: SegmentConfig[] = [\n // Zone (1-60)\n {\n type: 'numeric',\n placeholder: '00',\n allowedChars: '[0-9]',\n maxLength: 2, // Max: 60\n pad: NUMERIC_PAD,\n },\n // Band (C-X, excluding I and O)\n {\n type: 'alphanumeric',\n placeholder: 'T',\n allowedChars: '[C-HJ-NP-X]', // Excludes I and O\n maxLength: 1,\n pad: 0,\n },\n {\n type: 'literal',\n value: ' ',\n },\n // Grid 100km identifier (2 letters, A-Z excluding I and O)\n {\n type: 'alphanumeric',\n placeholder: 'WM',\n allowedChars: '[A-HJ-NP-Z]', // Excludes I and O\n maxLength: 2,\n pad: 0,\n },\n {\n type: 'literal',\n value: ' ',\n },\n // Easting (5 digits, can be 1-5 based on precision)\n {\n type: 'numeric',\n placeholder: '00000',\n allowedChars: '[0-9]',\n maxLength: 5,\n pad: NUMERIC_PAD,\n },\n {\n type: 'literal',\n value: ' ',\n },\n // Northing (5 digits, can be 1-5 based on precision)\n {\n type: 'numeric',\n placeholder: '00000',\n allowedChars: '[0-9]',\n maxLength: 5,\n pad: LAST_PAD,\n },\n];\n\n/**\n * UTM (Universal Transverse Mercator) Segment Configuration\n *\n * Format: [zone][hemisphere] [easting] [northing]\n * Example: 18N 585628 4511644\n *\n * Segments:\n * - Zone: 1-60, 2 digits\n * - Hemisphere: N or S, 1 letter\n * - Easting: 6-7 digits\n * - Northing: 7 digits\n *\n * Total segments: 4 editable\n *\n * Reference: /packages/geo/src/coordinates/utm/parser.ts\n * Pattern: /^((?:..)?)\\s*(\\w?)\\s*(?:(\\d+(?:\\.\\d*)?)?)\\s*(?:(\\d+(?:\\.\\d*)?)?)$/i\n */\nexport const utmSegmentConfigs: SegmentConfig[] = [\n // Zone (1-60)\n {\n type: 'numeric',\n placeholder: '00',\n allowedChars: '[0-9]',\n maxLength: 2, // Max: 60\n pad: NUMERIC_PAD,\n },\n // Hemisphere (N or S)\n {\n type: 'directional',\n placeholder: 'N',\n allowedChars: '[NS]',\n maxLength: 1,\n pad: 0,\n },\n {\n type: 'literal',\n value: ' ',\n },\n // Easting (6-7 digits)\n {\n type: 'numeric',\n placeholder: '000000',\n allowedChars: '[0-9]',\n maxLength: 7,\n pad: NUMERIC_PAD,\n },\n {\n type: 'literal',\n value: ' ',\n },\n // Northing (7 digits)\n {\n type: 'numeric',\n placeholder: '0000000',\n allowedChars: '[0-9]',\n maxLength: 7,\n pad: LAST_PAD,\n },\n];\n\n/**\n * Get segment configurations for a specific coordinate system\n *\n * @param format - The coordinate system format\n * @returns Array of segment configurations for the specified format\n */\nexport function getSegmentConfigs(format: CoordinateSystem): SegmentConfig[] {\n switch (format) {\n case 'dd':\n return ddSegmentConfigs;\n case 'ddm':\n return ddmSegmentConfigs;\n case 'dms':\n return dmsSegmentConfigs;\n case 'mgrs':\n return mgrsSegmentConfigs;\n case 'utm':\n return utmSegmentConfigs;\n default:\n // Default to DD format if unknown format provided\n return ddSegmentConfigs;\n }\n}\n\n/**\n * Get format description with example\n *\n * Provides a user-friendly description of the coordinate format with an example value.\n * These descriptions can be used as helper text to guide users on the expected format.\n *\n * @param format - The coordinate system format\n * @returns Description string with format example\n */\nexport function getFormatDescription(format: CoordinateSystem): string {\n switch (format) {\n case 'dd':\n return 'Example: 40.7128, -74.0060 (New York City)';\n case 'ddm':\n return \"Example: 40° 42.768' N, 74° 0.360' W (New York City)\";\n case 'dms':\n return 'Example: 40° 42\\' 46.08\" N, 74° 0\\' 21.60\" W (New York City)';\n case 'mgrs':\n return 'Example: 18T WL 80654 06346 (New York City)';\n case 'utm':\n return 'Example: 18N 585628 4511644 (New York City)';\n default:\n return '';\n }\n}\n\n/**\n * Get editable segment count for a format\n *\n * Returns the number of editable segments (excluding literal separators) for each format.\n * This is useful for initializing segment values and validation.\n *\n * @param format - The coordinate system format\n * @returns Number of editable segments\n */\nexport function getEditableSegmentCount(format: CoordinateSystem): number {\n const configs = getSegmentConfigs(format);\n return configs.filter((config) => config.type !== 'literal').length;\n}\n\n/**\n * Validate segment count for each format\n *\n * Expected editable segment counts:\n * - DD: 2 segments (lat, lon)\n * - DDM: 6 segments (lat_deg, lat_min, lat_dir, lon_deg, lon_min, lon_dir)\n * - DMS: 8 segments (lat_deg, lat_min, lat_sec, lat_dir, lon_deg, lon_min, lon_sec, lon_dir)\n * - MGRS: 5 segments (zone, band, grid, easting, northing)\n * - UTM: 4 segments (zone, hemisphere, easting, northing)\n */\nexport const EXPECTED_SEGMENT_COUNTS: Record<CoordinateSystem, number> = {\n dd: 2,\n ddm: 6,\n dms: 8,\n mgrs: 5,\n utm: 4,\n};\n\n/**\n * Get semantic accessibility label for a segment based on format and editable index\n *\n * Provides descriptive labels for screen readers (e.g., \"Latitude degrees\", \"Longitude minutes\")\n * to improve accessibility beyond generic \"Coordinate segment 1\" announcements.\n *\n * @param format - The coordinate system format\n * @param editableIndex - The index of the editable segment (0-based, excluding literals)\n * @returns Semantic label string for the segment\n */\nexport function getSegmentLabel(\n format: CoordinateSystem,\n editableIndex: number,\n): string {\n switch (format) {\n case 'dd':\n // DD: [lat, lon]\n return editableIndex === 0 ? 'Latitude' : 'Longitude';\n\n case 'ddm':\n // DDM: [lat_deg, lat_min, lat_dir, lon_deg, lon_min, lon_dir]\n switch (editableIndex) {\n case 0:\n return 'Latitude degrees';\n case 1:\n return 'Latitude minutes';\n case 2:\n return 'Latitude direction';\n case 3:\n return 'Longitude degrees';\n case 4:\n return 'Longitude minutes';\n case 5:\n return 'Longitude direction';\n default:\n return `Coordinate segment ${editableIndex + 1}`;\n }\n\n case 'dms':\n // DMS: [lat_deg, lat_min, lat_sec, lat_dir, lon_deg, lon_min, lon_sec, lon_dir]\n switch (editableIndex) {\n case 0:\n return 'Latitude degrees';\n case 1:\n return 'Latitude minutes';\n case 2:\n return 'Latitude seconds';\n case 3:\n return 'Latitude direction';\n case 4:\n return 'Longitude degrees';\n case 5:\n return 'Longitude minutes';\n case 6:\n return 'Longitude seconds';\n case 7:\n return 'Longitude direction';\n default:\n return `Coordinate segment ${editableIndex + 1}`;\n }\n\n case 'mgrs':\n // MGRS: [zone, band, grid, easting, northing]\n switch (editableIndex) {\n case 0:\n return 'MGRS zone';\n case 1:\n return 'MGRS band';\n case 2:\n return 'MGRS grid square';\n case 3:\n return 'MGRS easting';\n case 4:\n return 'MGRS northing';\n default:\n return `Coordinate segment ${editableIndex + 1}`;\n }\n\n case 'utm':\n // UTM: [zone, hemisphere, easting, northing]\n switch (editableIndex) {\n case 0:\n return 'UTM zone';\n case 1:\n return 'UTM hemisphere';\n case 2:\n return 'UTM easting';\n case 3:\n return 'UTM northing';\n default:\n return `Coordinate segment ${editableIndex + 1}`;\n }\n\n default:\n return `Coordinate segment ${editableIndex + 1}`;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;AAqCA,MAAM,cAAc;;AAGpB,MAAM,WAAW;;AAGjB,MAAa,kBAAkB;;;;;;;;;;;;;AAc/B,MAAaA,mBAAoC;CAC/C;EACE,MAAM;EACN,aAAa;EACb,cAAc;EACd,WAAW;EACX,KAAK;EACN;CACD;EACE,MAAM;EACN,OAAO;EACR;CACD;EACE,MAAM;EACN,aAAa;EACb,cAAc;EACd,WAAW;EACX,KAAK;EACN;CACF;;;;;;;;;;;;;;;;;AAkBD,MAAaC,oBAAqC;CAEhD;EACE,MAAM;EACN,aAAa;EACb,cAAc;EACd,WAAW;EACX,KAAK;EACN;CACD;EACE,MAAM;EACN,OAAO;EACR;CAED;EACE,MAAM;EACN,aAAa;EACb,cAAc;EACd,WAAW;EACX,KAAK;EACN;CACD;EACE,MAAM;EACN,OAAO;EACR;CAED;EACE,MAAM;EACN,aAAa;EACb,cAAc;EACd,WAAW;EACX,KAAK;EACN;CACD;EACE,MAAM;EACN,OAAO;EACR;CAED;EACE,MAAM;EACN,aAAa;EACb,cAAc;EACd,WAAW;EACX,KAAK;EACN;CACD;EACE,MAAM;EACN,OAAO;EACR;CAED;EACE,MAAM;EACN,aAAa;EACb,cAAc;EACd,WAAW;EACX,KAAK;EACN;CACD;EACE,MAAM;EACN,OAAO;EACR;CAED;EACE,MAAM;EACN,aAAa;EACb,cAAc;EACd,WAAW;EACX,KAAK;EACN;CACF;;;;;;;;;;;;;;;;;;;AAoBD,MAAaC,oBAAqC;CAEhD;EACE,MAAM;EACN,aAAa;EACb,cAAc;EACd,WAAW;EACX,KAAK;EACN;CACD;EACE,MAAM;EACN,OAAO;EACR;CAED;EACE,MAAM;EACN,aAAa;EACb,cAAc;EACd,WAAW;EACX,KAAK;EACN;CACD;EACE,MAAM;EACN,OAAO;EACR;CAED;EACE,MAAM;EACN,aAAa;EACb,cAAc;EACd,WAAW;EACX,KAAK;EACN;CACD;EACE,MAAM;EACN,OAAO;EACR;CAED;EACE,MAAM;EACN,aAAa;EACb,cAAc;EACd,WAAW;EACX,KAAK;EACN;CACD;EACE,MAAM;EACN,OAAO;EACR;CAED;EACE,MAAM;EACN,aAAa;EACb,cAAc;EACd,WAAW;EACX,KAAK;EACN;CACD;EACE,MAAM;EACN,OAAO;EACR;CAED;EACE,MAAM;EACN,aAAa;EACb,cAAc;EACd,WAAW;EACX,KAAK;EACN;CACD;EACE,MAAM;EACN,OAAO;EACR;CAED;EACE,MAAM;EACN,aAAa;EACb,cAAc;EACd,WAAW;EACX,KAAK;EACN;CACD;EACE,MAAM;EACN,OAAO;EACR;CAED;EACE,MAAM;EACN,aAAa;EACb,cAAc;EACd,WAAW;EACX,KAAK;EACN;CACF;;;;;;;;;;;;;;;;;;;AAoBD,MAAaC,qBAAsC;CAEjD;EACE,MAAM;EACN,aAAa;EACb,cAAc;EACd,WAAW;EACX,KAAK;EACN;CAED;EACE,MAAM;EACN,aAAa;EACb,cAAc;EACd,WAAW;EACX,KAAK;EACN;CACD;EACE,MAAM;EACN,OAAO;EACR;CAED;EACE,MAAM;EACN,aAAa;EACb,cAAc;EACd,WAAW;EACX,KAAK;EACN;CACD;EACE,MAAM;EACN,OAAO;EACR;CAED;EACE,MAAM;EACN,aAAa;EACb,cAAc;EACd,WAAW;EACX,KAAK;EACN;CACD;EACE,MAAM;EACN,OAAO;EACR;CAED;EACE,MAAM;EACN,aAAa;EACb,cAAc;EACd,WAAW;EACX,KAAK;EACN;CACF;;;;;;;;;;;;;;;;;;AAmBD,MAAaC,oBAAqC;CAEhD;EACE,MAAM;EACN,aAAa;EACb,cAAc;EACd,WAAW;EACX,KAAK;EACN;CAED;EACE,MAAM;EACN,aAAa;EACb,cAAc;EACd,WAAW;EACX,KAAK;EACN;CACD;EACE,MAAM;EACN,OA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ACT,KAAK,EACH,QAAO;GACT,QACE,QAAO,sBAAsB,gBAAgB;;EAGnD,KAAK,OAEH,SAAQ,eAAR;GACE,KAAK,EACH,QAAO;GACT,KAAK,EACH,QAAO;GACT,KAAK,EACH,QAAO;GACT,KAAK,EACH,QAAO;GACT,KAAK,EACH,QAAO;GACT,QACE,QAAO,sBAAsB,gBAAgB;;EAGnD,KAAK,MAEH,SAAQ,eAAR;GACE,KAAK,EACH,QAAO;GACT,KAAK,EACH,QAAO;GACT,KAAK,EACH,QAAO;GACT,KAAK,EACH,QAAO;GACT,QACE,QAAO,sBAAsB,gBAAgB;;EAGnD,QACE,QAAO,sBAAsB,gBAAgB"}
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.
2
+ * Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.
3
3
  * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
4
  * you may not use this file except in compliance with the License. You may obtain a copy
5
5
  * of the License at https://www.apache.org/licenses/LICENSE-2.0
@@ -12,7 +12,7 @@
12
12
 
13
13
  import { CoordinateSegmentProps } from "./types.js";
14
14
  import "client-only";
15
- import * as react_jsx_runtime186 from "react/jsx-runtime";
15
+ import * as react_jsx_runtime22 from "react/jsx-runtime";
16
16
 
17
17
  //#region src/components/coordinate-field/segment.d.ts
18
18
 
@@ -91,7 +91,7 @@ declare function CoordinateSegment({
91
91
  onAutoRetreat,
92
92
  pad,
93
93
  ariaLabel
94
- }: CoordinateSegmentProps): react_jsx_runtime186.JSX.Element;
94
+ }: CoordinateSegmentProps): react_jsx_runtime22.JSX.Element;
95
95
  //#endregion
96
96
  export { CoordinateSegment };
97
97
  //# sourceMappingURL=segment.d.ts.map
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.
2
+ * Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.
3
3
  * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
4
  * you may not use this file except in compliance with the License. You may obtain a copy
5
5
  * of the License at https://www.apache.org/licenses/LICENSE-2.0
@@ -1 +1 @@
1
- {"version":3,"file":"segment.js","names":[],"sources":["../../../src/components/coordinate-field/segment.tsx"],"sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n'use client';\n\nimport 'client-only';\nimport { useMemo } from 'react';\nimport { useCoordinateFieldStateContext } from './context';\nimport type { ChangeEvent, FocusEvent, KeyboardEvent } from 'react';\nimport type { CoordinateSegmentProps } from './types';\n\n/**\n * CoordinateSegment - A controlled input component for a single coordinate segment\n *\n * This component represents one editable part of a coordinate (e.g., degrees, minutes, direction).\n * It handles character filtering, focus management, and keyboard navigation.\n *\n * Segment Types (determined by allowedChars):\n * - Numeric: \"[0-9\\\\-\\\\.]\" - for DD degrees, DDM/DMS degrees/minutes/seconds\n * - Directional: \"[NSEW]\" - for DDM/DMS direction indicators\n * - Alphanumeric: \"[0-9A-Z]\" - for MGRS/UTM zone identifiers\n *\n * @param props - The coordinate segment props.\n * @param props.value - Current value of the segment.\n * @param props.onChange - Callback when the segment value changes.\n * @param props.onFocus - Callback when the segment gains focus.\n * @param props.onBlur - Callback when the segment loses focus.\n * @param props.onKeyDown - Callback for key down events.\n * @param props.placeholder - Placeholder text for the segment.\n * @param props.maxLength - Maximum character length for the segment.\n * @param props.className - Additional CSS class name.\n * @param props.isDisabled - Whether the segment is disabled.\n * @param props.isReadOnly - Whether the segment is read-only.\n * @param props.allowedChars - Regex pattern for allowed characters.\n * @param props.segmentRef - Ref for the segment input element.\n * @param props.segmentIndex - Index of this segment within the coordinate field.\n * @param props.totalSegments - Total number of segments in the coordinate field.\n * @param props.onAutoAdvance - Callback to advance focus to the next segment.\n * @param props.onAutoRetreat - Callback to retreat focus to the previous segment.\n * @param props.pad - Padding value for width calculation.\n * @param props.ariaLabel - Accessible label for the segment.\n * @returns The coordinate segment input component.\n *\n * @example\n * ```tsx\n * // Numeric segment (latitude degrees)\n * <CoordinateSegment\n * value={latDegrees}\n * onChange={setLatDegrees}\n * allowedChars=\"[0-9\\\\-\\\\.]\"\n * maxLength={10}\n * placeholder=\"00.00000\"\n * />\n * ```\n *\n * @example\n * ```tsx\n * // Directional segment (latitude direction)\n * <CoordinateSegment\n * value={latDir}\n * onChange={setLatDir}\n * allowedChars=\"[NS]\"\n * maxLength={1}\n * placeholder=\"N\"\n * />\n * ```\n */\nexport function CoordinateSegment({\n value,\n onChange,\n onFocus,\n onBlur,\n onKeyDown,\n placeholder,\n maxLength,\n className,\n isDisabled,\n isReadOnly,\n allowedChars,\n segmentRef,\n segmentIndex,\n totalSegments: _totalSegments,\n onAutoAdvance,\n onAutoRetreat,\n pad,\n ariaLabel,\n}: CoordinateSegmentProps) {\n const contextState = useCoordinateFieldStateContext();\n\n const effectiveIsDisabled = contextState.isDisabled ?? isDisabled;\n\n const allowedCharsRegex = useMemo(() => {\n if (!allowedChars) return null;\n return new RegExp(`^${allowedChars}*$`, 'i');\n }, [allowedChars]);\n\n // Calculate dynamic width based on focus state\n const dynamicWidth = useMemo(() => {\n if (maxLength === undefined) {\n return undefined;\n }\n\n // Default padding to 0.5 if not specified\n const padding = pad ?? 0.5;\n\n // When blurred, use value length (or maxLength if empty) + padding\n const contentLength = value.length > 0 ? value.length : maxLength;\n return contentLength + padding;\n }, [maxLength, pad, value.length]);\n\n const handleChange = (e: ChangeEvent<HTMLInputElement>) => {\n const newValue = e.target.value;\n\n if (allowedCharsRegex && !allowedCharsRegex.test(newValue)) {\n return;\n }\n\n if (maxLength && newValue.length > maxLength) {\n return;\n }\n\n onChange(newValue);\n\n if (maxLength && newValue.length === maxLength && onAutoAdvance) {\n const timeoutId = setTimeout(() => {\n onAutoAdvance();\n }, 0);\n contextState.registerTimeout(timeoutId);\n }\n };\n\n const handlePaste = (e: React.ClipboardEvent<HTMLInputElement>) => {\n const pastedText = e.clipboardData.getData('text');\n\n if (allowedCharsRegex && !allowedCharsRegex.test(pastedText)) {\n e.preventDefault();\n return;\n }\n\n if (maxLength && pastedText.length > maxLength) {\n e.preventDefault();\n onChange(pastedText.slice(0, maxLength));\n return;\n }\n };\n\n const handleKeyDown = (e: KeyboardEvent<HTMLInputElement>) => {\n const input = e.currentTarget;\n const cursorAtStart = input.selectionStart === 0;\n const cursorAtEnd = input.selectionStart === value.length;\n const isEmpty = value.length === 0;\n\n if (e.key === 'Backspace' && isEmpty && onAutoRetreat) {\n e.preventDefault();\n onAutoRetreat();\n return;\n }\n\n if (e.key === 'ArrowLeft' && cursorAtStart && onAutoRetreat) {\n e.preventDefault();\n onAutoRetreat();\n return;\n }\n\n if (e.key === 'ArrowRight' && cursorAtEnd && onAutoAdvance) {\n e.preventDefault();\n onAutoAdvance();\n return;\n }\n\n onKeyDown?.(e);\n };\n\n const handleFocus = (e: FocusEvent<HTMLInputElement>) => {\n e.target.select();\n onFocus?.();\n };\n\n const handleBlur = () => {\n onBlur?.();\n };\n\n return (\n <input\n readOnly={isReadOnly}\n ref={segmentRef}\n tabIndex={isReadOnly ? -1 : 0}\n type='text'\n value={value}\n onChange={handleChange}\n onPaste={handlePaste}\n onKeyDown={handleKeyDown}\n onFocus={handleFocus}\n onBlur={handleBlur}\n placeholder={placeholder}\n maxLength={maxLength}\n className={className}\n disabled={effectiveIsDisabled}\n style={dynamicWidth ? { width: `${dynamicWidth}ch` } : undefined}\n aria-label={\n ariaLabel ||\n `Coordinate segment ${segmentIndex !== undefined ? segmentIndex + 1 : ''}`\n }\n aria-disabled={effectiveIsDisabled}\n autoComplete='off'\n inputMode={\n allowedChars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BAAiB,MAAuC;EAC5D,MAAM,QAAQ,EAAE;EAChB,MAAM,gBAAgB,MAAM,mBAAmB;EAC/C,MAAM,cAAc,MAAM,mBAAmB,MAAM;EACnD,MAAM,UAAU,MAAM,WAAW;AAEjC,MAAI,EAAE,QAAQ,eAAe,WAAW,eAAe;AACrD,KAAE,gBAAgB;AAClB,kBAAe;AACf;;AAGF,MAAI,EAAE,QAAQ,eAAe,iBAAiB,eAAe;AAC3D,KAAE,gBAAgB;AAClB,kBAAe;AACf;;AAGF,MAAI,EAAE,QAAQ,gBAAgB,eAAe,eAAe;AAC1D,KAAE,gBAAgB;AAClB,kBAAe;AACf;;AAGF,cAAY,EAAE;;CAGhB,MAAM,eAAe,MAAoC;AACvD,IAAE,OAAO,QAAQ;AACjB,aAAW;;CAGb,MAAM,mBAAmB;AACvB,YAAU;;AAGZ,QACE,oBAAC;EACC,UAAU;EACV,KAAK;EACL,UAAU,aAAa,KAAK;EAC5B,MAAK;EACE;EACP,UAAU;EACV,SAAS;EACT,WAAW;EACX,SAAS;EACT,QAAQ;EACK;EACF;EACA;EACX,UAAU;EACV,OAAO,eAAe,EAAE,OAAO,GAAG,aAAa,KAAK,GAAG;EACvD,cACE,aACA,sBAAsB,iBAAiB,SAAY,eAAe,IAAI;EAExE,iBAAe;EACf,cAAa;EACb,WACE,cAAc,SAAS,MAAM,GACzB,aAAa,SAAS,SAAS,GAC7B,YACA,YACF;GAEN"}
1
+ {"version":3,"file":"segment.js","names":[],"sources":["../../../src/components/coordinate-field/segment.tsx"],"sourcesContent":["/*\n * Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n'use client';\n\nimport 'client-only';\nimport { useMemo } from 'react';\nimport { useCoordinateFieldStateContext } from './context';\nimport type { ChangeEvent, FocusEvent, KeyboardEvent } from 'react';\nimport type { CoordinateSegmentProps } from './types';\n\n/**\n * CoordinateSegment - A controlled input component for a single coordinate segment\n *\n * This component represents one editable part of a coordinate (e.g., degrees, minutes, direction).\n * It handles character filtering, focus management, and keyboard navigation.\n *\n * Segment Types (determined by allowedChars):\n * - Numeric: \"[0-9\\\\-\\\\.]\" - for DD degrees, DDM/DMS degrees/minutes/seconds\n * - Directional: \"[NSEW]\" - for DDM/DMS direction indicators\n * - Alphanumeric: \"[0-9A-Z]\" - for MGRS/UTM zone identifiers\n *\n * @param props - The coordinate segment props.\n * @param props.value - Current value of the segment.\n * @param props.onChange - Callback when the segment value changes.\n * @param props.onFocus - Callback when the segment gains focus.\n * @param props.onBlur - Callback when the segment loses focus.\n * @param props.onKeyDown - Callback for key down events.\n * @param props.placeholder - Placeholder text for the segment.\n * @param props.maxLength - Maximum character length for the segment.\n * @param props.className - Additional CSS class name.\n * @param props.isDisabled - Whether the segment is disabled.\n * @param props.isReadOnly - Whether the segment is read-only.\n * @param props.allowedChars - Regex pattern for allowed characters.\n * @param props.segmentRef - Ref for the segment input element.\n * @param props.segmentIndex - Index of this segment within the coordinate field.\n * @param props.totalSegments - Total number of segments in the coordinate field.\n * @param props.onAutoAdvance - Callback to advance focus to the next segment.\n * @param props.onAutoRetreat - Callback to retreat focus to the previous segment.\n * @param props.pad - Padding value for width calculation.\n * @param props.ariaLabel - Accessible label for the segment.\n * @returns The coordinate segment input component.\n *\n * @example\n * ```tsx\n * // Numeric segment (latitude degrees)\n * <CoordinateSegment\n * value={latDegrees}\n * onChange={setLatDegrees}\n * allowedChars=\"[0-9\\\\-\\\\.]\"\n * maxLength={10}\n * placeholder=\"00.00000\"\n * />\n * ```\n *\n * @example\n * ```tsx\n * // Directional segment (latitude direction)\n * <CoordinateSegment\n * value={latDir}\n * onChange={setLatDir}\n * allowedChars=\"[NS]\"\n * maxLength={1}\n * placeholder=\"N\"\n * />\n * ```\n */\nexport function CoordinateSegment({\n value,\n onChange,\n onFocus,\n onBlur,\n onKeyDown,\n placeholder,\n maxLength,\n className,\n isDisabled,\n isReadOnly,\n allowedChars,\n segmentRef,\n segmentIndex,\n totalSegments: _totalSegments,\n onAutoAdvance,\n onAutoRetreat,\n pad,\n ariaLabel,\n}: CoordinateSegmentProps) {\n const contextState = useCoordinateFieldStateContext();\n\n const effectiveIsDisabled = contextState.isDisabled ?? isDisabled;\n\n const allowedCharsRegex = useMemo(() => {\n if (!allowedChars) return null;\n return new RegExp(`^${allowedChars}*$`, 'i');\n }, [allowedChars]);\n\n // Calculate dynamic width based on focus state\n const dynamicWidth = useMemo(() => {\n if (maxLength === undefined) {\n return undefined;\n }\n\n // Default padding to 0.5 if not specified\n const padding = pad ?? 0.5;\n\n // When blurred, use value length (or maxLength if empty) + padding\n const contentLength = value.length > 0 ? value.length : maxLength;\n return contentLength + padding;\n }, [maxLength, pad, value.length]);\n\n const handleChange = (e: ChangeEvent<HTMLInputElement>) => {\n const newValue = e.target.value;\n\n if (allowedCharsRegex && !allowedCharsRegex.test(newValue)) {\n return;\n }\n\n if (maxLength && newValue.length > maxLength) {\n return;\n }\n\n onChange(newValue);\n\n if (maxLength && newValue.length === maxLength && onAutoAdvance) {\n const timeoutId = setTimeout(() => {\n onAutoAdvance();\n }, 0);\n contextState.registerTimeout(timeoutId);\n }\n };\n\n const handlePaste = (e: React.ClipboardEvent<HTMLInputElement>) => {\n const pastedText = e.clipboardData.getData('text');\n\n if (allowedCharsRegex && !allowedCharsRegex.test(pastedText)) {\n e.preventDefault();\n return;\n }\n\n if (maxLength && pastedText.length > maxLength) {\n e.preventDefault();\n onChange(pastedText.slice(0, maxLength));\n return;\n }\n };\n\n const handleKeyDown = (e: KeyboardEvent<HTMLInputElement>) => {\n const input = e.currentTarget;\n const cursorAtStart = input.selectionStart === 0;\n const cursorAtEnd = input.selectionStart === value.length;\n const isEmpty = value.length === 0;\n\n if (e.key === 'Backspace' && isEmpty && onAutoRetreat) {\n e.preventDefault();\n onAutoRetreat();\n return;\n }\n\n if (e.key === 'ArrowLeft' && cursorAtStart && onAutoRetreat) {\n e.preventDefault();\n onAutoRetreat();\n return;\n }\n\n if (e.key === 'ArrowRight' && cursorAtEnd && onAutoAdvance) {\n e.preventDefault();\n onAutoAdvance();\n return;\n }\n\n onKeyDown?.(e);\n };\n\n const handleFocus = (e: FocusEvent<HTMLInputElement>) => {\n e.target.select();\n onFocus?.();\n };\n\n const handleBlur = () => {\n onBlur?.();\n };\n\n return (\n <input\n readOnly={isReadOnly}\n ref={segmentRef}\n tabIndex={isReadOnly ? -1 : 0}\n type='text'\n value={value}\n onChange={handleChange}\n onPaste={handlePaste}\n onKeyDown={handleKeyDown}\n onFocus={handleFocus}\n onBlur={handleBlur}\n placeholder={placeholder}\n maxLength={maxLength}\n className={className}\n disabled={effectiveIsDisabled}\n style={dynamicWidth ? { width: `${dynamicWidth}ch` } : undefined}\n aria-label={\n ariaLabel ||\n `Coordinate segment ${segmentIndex !== undefined ? segmentIndex + 1 : ''}`\n }\n aria-disabled={effectiveIsDisabled}\n autoComplete='off'\n inputMode={\n allowedChars?.includes('0-9')\n ? allowedChars.includes('\\\\-\\\\.')\n ? 'decimal'\n : 'numeric'\n : 'text'\n }\n />\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4EA,SAAgB,kBAAkB,EAChC,OACA,UACA,SACA,QACA,WACA,aACA,WACA,WACA,YACA,YACA,cACA,YACA,cACA,eAAe,gBACf,eACA,eACA,KACA,aACyB;CACzB,MAAM,eAAe,gCAAgC;CAErD,MAAM,sBAAsB,aAAa,cAAc;CAEvD,MAAM,oBAAoB,cAAc;AACtC,MAAI,CAAC,aAAc,QAAO;AAC1B,SAA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,MAAoC;AACvD,IAAE,OAAO,QAAQ;AACjB,aAAW;;CAGb,MAAM,mBAAmB;AACvB,YAAU;;AAGZ,QACE,oBAAC;EACC,UAAU;EACV,KAAK;EACL,UAAU,aAAa,KAAK;EAC5B,MAAK;EACE;EACP,UAAU;EACV,SAAS;EACT,WAAW;EACX,SAAS;EACT,QAAQ;EACK;EACF;EACA;EACX,UAAU;EACV,OAAO,eAAe,EAAE,OAAO,GAAG,aAAa,KAAK,GAAG;EACvD,cACE,aACA,sBAAsB,iBAAiB,SAAY,eAAe,IAAI;EAExE,iBAAe;EACf,cAAa;EACb,WACE,cAAc,SAAS,MAAM,GACzB,aAAa,SAAS,SAAS,GAC7B,YACA,YACF;GAEN"}
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.
2
+ * Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.
3
3
  * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
4
  * you may not use this file except in compliance with the License. You may obtain a copy
5
5
  * of the License at https://www.apache.org/licenses/LICENSE-2.0
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.
2
+ * Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.
3
3
  * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
4
  * you may not use this file except in compliance with the License. You may obtain a copy
5
5
  * of the License at https://www.apache.org/licenses/LICENSE-2.0
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.
2
+ * Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.
3
3
  * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
4
  * you may not use this file except in compliance with the License. You may obtain a copy
5
5
  * of the License at https://www.apache.org/licenses/LICENSE-2.0
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":["COORDINATE_FORMAT_LABELS: Record<CoordinateSystem, string>","COORDINATE_FORMAT_NAMES: Record<CoordinateSystem, string>","COORDINATE_SYSTEMS: readonly CoordinateSystem[]"],"sources":["../../../src/components/coordinate-field/types.ts"],"sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport type {\n Dispatch,\n KeyboardEvent,\n RefAttributes,\n SetStateAction,\n} from 'react';\nimport type {\n TextFieldProps as AriaTextFieldProps,\n FieldErrorProps,\n LabelProps,\n} from 'react-aria-components';\n\n/**\n * Supported coordinate systems for display and input\n */\nexport type CoordinateSystem = 'dd' | 'ddm' | 'dms' | 'mgrs' | 'utm';\n\n/**\n * Short labels for coordinate formats (used in popover)\n */\nexport const COORDINATE_FORMAT_LABELS: Record<CoordinateSystem, string> = {\n dd: 'DD',\n ddm: 'DDM',\n dms: 'DMS',\n mgrs: 'MGRS',\n utm: 'UTM',\n};\n\n/**\n * Full names for coordinate formats (used in popover titles/descriptions)\n */\nexport const COORDINATE_FORMAT_NAMES: Record<CoordinateSystem, string> = {\n dd: 'Decimal Degrees',\n ddm: 'Degrees Decimal Minutes',\n dms: 'Degrees Minutes Seconds',\n mgrs: 'Military Grid Reference System',\n utm: 'Universal Transverse Mercator',\n};\n\n/**\n * All supported coordinate systems\n * Use this constant instead of hardcoding the array in multiple places\n */\nexport const COORDINATE_SYSTEMS: readonly CoordinateSystem[] = [\n 'dd',\n 'dms',\n 'ddm',\n 'mgrs',\n 'utm',\n] as const;\n\n/**\n * Coordinate value in Decimal Degrees format (internal representation)\n * All coordinate values are normalized to this format internally\n */\nexport type CoordinateValue = {\n lat: number; // Latitude in decimal degrees (-90 to 90)\n lon: number; // Longitude in decimal degrees (-180 to 180)\n};\n\n/**\n * Types of segments in a coordinate input\n */\nexport type SegmentType =\n | 'numeric'\n | 'directional'\n | 'literal'\n | 'alphanumeric';\n\n/**\n * Configuration for a single coordinate segment\n */\nexport type SegmentConfig = {\n type: SegmentType;\n /** Placeholder text shown when segment is empty */\n placeholder?: string;\n /** Maximum character length for the segment */\n maxLength?: number;\n /** Regex pattern for allowed characters */\n allowedChars?: string;\n /** Fixed value for literal segments (e.g., \", \" or \"º\") */\n value?: string;\n /** Padding in CSS 'ch' units to add to the segment width (defaults to 0.5 if not specified) */\n pad?: number;\n};\n\n/**\n * Result of parsing a pasted coordinate string\n */\nexport type ParsedCoordinateMatch = {\n /** The coordinate system format that matched */\n format: CoordinateSystem;\n /** The coordinate value in DD format */\n value: CoordinateValue;\n /** Display string in the matched format */\n displayString: string;\n};\n\n/**\n * State shared with child components through context\n */\nexport type CoordinateFieldState = {\n segmentValues: string[];\n format: CoordinateFieldProps['format'];\n /**\n * Current coordinate value in DD format\n * - undefined: uncontrolled mode with no default value\n * - null: controlled mode with empty/invalid value\n * - CoordinateValue: valid coordinate\n */\n currentValue?: CoordinateValue | null;\n /** Validation errors from @accelint/geo */\n validationErrors: string[];\n isDisabled: boolean;\n isInvalid: boolean;\n isRequired: boolean;\n /** Size variant of the field */\n size: CoordinateFieldProps['size'];\n /** Whether or not the logical coordinate fields are inlined or stacked */\n variant: CoordinateFieldProps['variant'];\n /** Function to register timeouts for cleanup on unmount */\n registerTimeout: (timeoutId: NodeJS.Timeout) => void;\n};\n\n/**\n * Props for the CoordinateSegment component\n */\nexport type CoordinateSegmentProps = {\n /** Current value of the segment */\n value: string;\n /** Callback when the segment value changes */\n onChange: (value: string) => void;\n /** Callback when the segment receives focus */\n onFocus?: () => void;\n /** Callback when the segment loses focus */\n onBlur?: () => void;\n /** Callback for keyboard events (used for navigation between segments) */\n onKeyDown?: (e: KeyboardEvent<HTMLInputElement>) => void;\n /** Placeholder text to display when segment is empty */\n placeholder?: string;\n /** Maximum character length for the segment */\n maxLength?: number;\n /** Custom className for styling */\n className?: string;\n /** Whether the segment is disabled */\n isDisabled?: boolean;\n /** Whether the segment is read-only */\n isReadOnly?: boolean;\n /** Regex pattern for allowed characters (e.g., \"[0-9\\\\-\\\\.]\" for numeric, \"[NSEW]\" for directional) */\n allowedChars?: string;\n /** Ref to the input element for programmatic focus management */\n segmentRef?: React.RefObject<HTMLInputElement>;\n /** Index of this segment in the parent field (for accessibility) */\n segmentIndex?: number;\n /** Total number of segments (for accessibility) */\n totalSegments?: number;\n /** Callback to trigger auto-advance to next segment */\n onAutoAdvance?: () => void;\n /** Callback to trigger auto-retreat to previous segment */\n onAutoRetreat?: () => void;\n /** Padding in CSS 'ch' units to add to the segment width (defaults to 0.5 if not specified) */\n pad?: number;\n /** Semantic accessibility label for the segment (e.g., \"Latitude degrees\") */\n ariaLabel?: string;\n};\n\n/**\n * Props for the CoordinateField component\n *\n * Extends AriaTextFieldProps to inherit standard form field props (id, isDisabled, isRequired, etc.)\n */\nexport type CoordinateFieldProps = Omit<\n AriaTextFieldProps,\n | 'children'\n | 'className'\n | 'placeholder'\n | 'type'\n | 'pattern'\n | 'value'\n | 'defaultValue'\n | 'onChange'\n | 'name' // Not applicable to multi-segment fields\n> &\n RefAttributes<HTMLDivElement> & {\n /**\n * Custom class names for component slots\n */\n classNames?: {\n field?: string;\n label?: LabelProps['className'];\n control?: string;\n input?: string;\n segment?: string;\n description?: string;\n error?: FieldErrorProps['className'];\n formatButton?: string;\n };\n\n /**\n * Label text displayed above the input (medium size only)\n */\n label?: string;\n\n /**\n * Helper text displayed below the input\n */\n description?: string;\n\n /**\n * Error message to display when the field is invalid\n */\n errorMessage?: string;\n\n /**\n * Display format for coordinate input\n * @default 'dd' (Decimal Degrees)\n */\n format?: CoordinateSystem;\n\n /**\n * Size variant of the field\n * @default 'medium'\n */\n size?: 'small' | 'medium';\n\n /**\n * Whether to show the format button for copying coordinates in different formats\n * @default true\n */\n showFormatButton?: boolean;\n\n /**\n * Controlled value in Decimal Degrees format\n * - undefined: uncontrolled mode\n * - null: controlled mode with no/invalid value\n * - CoordinateValue: controlled mode with valid value\n */\n value?: CoordinateValue | null;\n\n /**\n * Whether or not the input is stacked or inline\n * @default 'inline'\n */\n variant?: 'inline' | 'stacked';\n\n /**\n * Default uncontrolled value in Decimal Degrees format\n */\n defaultValue?: CoordinateValue;\n\n /**\n * Callback fired when the coordinate value changes\n * @param value - The new coordinate value in DD format, or null if invalid\n */\n onChange?:\n | Dispatch<SetStateAction<CoordinateValue | null>>\n | ((value: CoordinateValue | null) => void);\n\n /**\n * Callback fired when validation or paste errors occur\n * @param message - Error message (\"Invalid coordinate value\" for validation errors, \"Invalid coordinate format\" for paste errors)\n * @param context - Additional context about the error:\n * - Validation errors: `{ errors: string[], format: string, segments: string[] }`\n * - Paste errors: `{ pastedText: string }`\n */\n onError?: (message: string, context?: Record<string, unknown>) => void;\n };\n"],"mappings":";;;;;;;;;;;;;;;;;AAgCA,MAAaA,2BAA6D;CACxE,IAAI;CACJ,KAAK;CACL,KAAK;CACL,MAAM;CACN,KAAK;CACN;;;;AAKD,MAAaC,0BAA4D;CACvE,IAAI;CACJ,KAAK;CACL,KAAK;CACL,MAAM;CACN,KAAK;CACN;;;;;AAMD,MAAaC,qBAAkD;CAC7D;CACA;CACA;CACA;CACA;CACD"}
1
+ {"version":3,"file":"types.js","names":["COORDINATE_FORMAT_LABELS: Record<CoordinateSystem, string>","COORDINATE_FORMAT_NAMES: Record<CoordinateSystem, string>","COORDINATE_SYSTEMS: readonly CoordinateSystem[]"],"sources":["../../../src/components/coordinate-field/types.ts"],"sourcesContent":["/*\n * Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport type {\n Dispatch,\n KeyboardEvent,\n RefAttributes,\n SetStateAction,\n} from 'react';\nimport type {\n TextFieldProps as AriaTextFieldProps,\n FieldErrorProps,\n LabelProps,\n} from 'react-aria-components';\n\n/**\n * Supported coordinate systems for display and input\n */\nexport type CoordinateSystem = 'dd' | 'ddm' | 'dms' | 'mgrs' | 'utm';\n\n/**\n * Short labels for coordinate formats (used in popover)\n */\nexport const COORDINATE_FORMAT_LABELS: Record<CoordinateSystem, string> = {\n dd: 'DD',\n ddm: 'DDM',\n dms: 'DMS',\n mgrs: 'MGRS',\n utm: 'UTM',\n};\n\n/**\n * Full names for coordinate formats (used in popover titles/descriptions)\n */\nexport const COORDINATE_FORMAT_NAMES: Record<CoordinateSystem, string> = {\n dd: 'Decimal Degrees',\n ddm: 'Degrees Decimal Minutes',\n dms: 'Degrees Minutes Seconds',\n mgrs: 'Military Grid Reference System',\n utm: 'Universal Transverse Mercator',\n};\n\n/**\n * All supported coordinate systems\n * Use this constant instead of hardcoding the array in multiple places\n */\nexport const COORDINATE_SYSTEMS: readonly CoordinateSystem[] = [\n 'dd',\n 'dms',\n 'ddm',\n 'mgrs',\n 'utm',\n] as const;\n\n/**\n * Coordinate value in Decimal Degrees format (internal representation)\n * All coordinate values are normalized to this format internally\n */\nexport type CoordinateValue = {\n lat: number; // Latitude in decimal degrees (-90 to 90)\n lon: number; // Longitude in decimal degrees (-180 to 180)\n};\n\n/**\n * Types of segments in a coordinate input\n */\nexport type SegmentType =\n | 'numeric'\n | 'directional'\n | 'literal'\n | 'alphanumeric';\n\n/**\n * Configuration for a single coordinate segment\n */\nexport type SegmentConfig = {\n type: SegmentType;\n /** Placeholder text shown when segment is empty */\n placeholder?: string;\n /** Maximum character length for the segment */\n maxLength?: number;\n /** Regex pattern for allowed characters */\n allowedChars?: string;\n /** Fixed value for literal segments (e.g., \", \" or \"º\") */\n value?: string;\n /** Padding in CSS 'ch' units to add to the segment width (defaults to 0.5 if not specified) */\n pad?: number;\n};\n\n/**\n * Result of parsing a pasted coordinate string\n */\nexport type ParsedCoordinateMatch = {\n /** The coordinate system format that matched */\n format: CoordinateSystem;\n /** The coordinate value in DD format */\n value: CoordinateValue;\n /** Display string in the matched format */\n displayString: string;\n};\n\n/**\n * State shared with child components through context\n */\nexport type CoordinateFieldState = {\n segmentValues: string[];\n format: CoordinateFieldProps['format'];\n /**\n * Current coordinate value in DD format\n * - undefined: uncontrolled mode with no default value\n * - null: controlled mode with empty/invalid value\n * - CoordinateValue: valid coordinate\n */\n currentValue?: CoordinateValue | null;\n /** Validation errors from @accelint/geo */\n validationErrors: string[];\n isDisabled: boolean;\n isInvalid: boolean;\n isRequired: boolean;\n /** Size variant of the field */\n size: CoordinateFieldProps['size'];\n /** Whether or not the logical coordinate fields are inlined or stacked */\n variant: CoordinateFieldProps['variant'];\n /** Function to register timeouts for cleanup on unmount */\n registerTimeout: (timeoutId: NodeJS.Timeout) => void;\n};\n\n/**\n * Props for the CoordinateSegment component\n */\nexport type CoordinateSegmentProps = {\n /** Current value of the segment */\n value: string;\n /** Callback when the segment value changes */\n onChange: (value: string) => void;\n /** Callback when the segment receives focus */\n onFocus?: () => void;\n /** Callback when the segment loses focus */\n onBlur?: () => void;\n /** Callback for keyboard events (used for navigation between segments) */\n onKeyDown?: (e: KeyboardEvent<HTMLInputElement>) => void;\n /** Placeholder text to display when segment is empty */\n placeholder?: string;\n /** Maximum character length for the segment */\n maxLength?: number;\n /** Custom className for styling */\n className?: string;\n /** Whether the segment is disabled */\n isDisabled?: boolean;\n /** Whether the segment is read-only */\n isReadOnly?: boolean;\n /** Regex pattern for allowed characters (e.g., \"[0-9\\\\-\\\\.]\" for numeric, \"[NSEW]\" for directional) */\n allowedChars?: string;\n /** Ref to the input element for programmatic focus management */\n segmentRef?: React.RefObject<HTMLInputElement>;\n /** Index of this segment in the parent field (for accessibility) */\n segmentIndex?: number;\n /** Total number of segments (for accessibility) */\n totalSegments?: number;\n /** Callback to trigger auto-advance to next segment */\n onAutoAdvance?: () => void;\n /** Callback to trigger auto-retreat to previous segment */\n onAutoRetreat?: () => void;\n /** Padding in CSS 'ch' units to add to the segment width (defaults to 0.5 if not specified) */\n pad?: number;\n /** Semantic accessibility label for the segment (e.g., \"Latitude degrees\") */\n ariaLabel?: string;\n};\n\n/**\n * Props for the CoordinateField component\n *\n * Extends AriaTextFieldProps to inherit standard form field props (id, isDisabled, isRequired, etc.)\n */\nexport type CoordinateFieldProps = Omit<\n AriaTextFieldProps,\n | 'children'\n | 'className'\n | 'placeholder'\n | 'type'\n | 'pattern'\n | 'value'\n | 'defaultValue'\n | 'onChange'\n | 'name' // Not applicable to multi-segment fields\n> &\n RefAttributes<HTMLDivElement> & {\n /**\n * Custom class names for component slots\n */\n classNames?: {\n field?: string;\n label?: LabelProps['className'];\n control?: string;\n input?: string;\n segment?: string;\n description?: string;\n error?: FieldErrorProps['className'];\n formatButton?: string;\n };\n\n /**\n * Label text displayed above the input (medium size only)\n */\n label?: string;\n\n /**\n * Helper text displayed below the input\n */\n description?: string;\n\n /**\n * Error message to display when the field is invalid\n */\n errorMessage?: string;\n\n /**\n * Display format for coordinate input\n * @default 'dd' (Decimal Degrees)\n */\n format?: CoordinateSystem;\n\n /**\n * Size variant of the field\n * @default 'medium'\n */\n size?: 'small' | 'medium';\n\n /**\n * Whether to show the format button for copying coordinates in different formats\n * @default true\n */\n showFormatButton?: boolean;\n\n /**\n * Controlled value in Decimal Degrees format\n * - undefined: uncontrolled mode\n * - null: controlled mode with no/invalid value\n * - CoordinateValue: controlled mode with valid value\n */\n value?: CoordinateValue | null;\n\n /**\n * Whether or not the input is stacked or inline\n * @default 'inline'\n */\n variant?: 'inline' | 'stacked';\n\n /**\n * Default uncontrolled value in Decimal Degrees format\n */\n defaultValue?: CoordinateValue;\n\n /**\n * Callback fired when the coordinate value changes\n * @param value - The new coordinate value in DD format, or null if invalid\n */\n onChange?:\n | Dispatch<SetStateAction<CoordinateValue | null>>\n | ((value: CoordinateValue | null) => void);\n\n /**\n * Callback fired when validation or paste errors occur\n * @param message - Error message (\"Invalid coordinate value\" for validation errors, \"Invalid coordinate format\" for paste errors)\n * @param context - Additional context about the error:\n * - Validation errors: `{ errors: string[], format: string, segments: string[] }`\n * - Paste errors: `{ pastedText: string }`\n */\n onError?: (message: string, context?: Record<string, unknown>) => void;\n };\n"],"mappings":";;;;;;;;;;;;;;;;;AAgCA,MAAaA,2BAA6D;CACxE,IAAI;CACJ,KAAK;CACL,KAAK;CACL,MAAM;CACN,KAAK;CACN;;;;AAKD,MAAaC,0BAA4D;CACvE,IAAI;CACJ,KAAK;CACL,KAAK;CACL,MAAM;CACN,KAAK;CACN;;;;;AAMD,MAAaC,qBAAkD;CAC7D;CACA;CACA;CACA;CACA;CACD"}
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.
2
+ * Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.
3
3
  * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
4
  * you may not use this file except in compliance with the License. You may obtain a copy
5
5
  * of the License at https://www.apache.org/licenses/LICENSE-2.0
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.
2
+ * Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.
3
3
  * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
4
  * you may not use this file except in compliance with the License. You may obtain a copy
5
5
  * of the License at https://www.apache.org/licenses/LICENSE-2.0
@@ -1 +1 @@
1
- {"version":3,"file":"width-utils.js","names":[],"sources":["../../../src/components/coordinate-field/width-utils.ts"],"sourcesContent":["// __private-exports\n/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport type { SegmentConfig } from './types';\n\n/**\n * Layout spacing constants for coordinate field width calculations.\n * All values are in character widths (ch units) to ensure consistent sizing\n * with monospace coordinate values.\n */\n\n/** Gap spacing between segments (0.5rem = ~0.5ch per gap) */\nexport const SEGMENT_GAP_WIDTH = 0.5;\n\n/** Container padding (px-s = 0.5rem on each side = ~1ch total) */\nexport const CONTAINER_PADDING_WIDTH = 2;\n\n/** Format button width (icon button is roughly 2.5-3ch) */\nexport const FORMAT_BUTTON_WIDTH = 3.5;\n\n/** Gap between input and button (gap-m = 1rem = ~1ch) */\nexport const INPUT_BUTTON_GAP = 1.5;\n\n/**\n * Calculates the minimum width needed for the coordinate field control container.\n * This keeps the outlined container at a fixed width while segments animate.\n *\n * @private\n * @param editableSegmentConfigs - Array of editable segment configurations\n * @param segmentConfigs - Array of all segment configurations (including literals)\n * @param showFormatButton - Whether the format button is displayed\n * @returns The calculated width as a CSS string (e.g., \"25ch\")\n */\nexport function calculateMinControlWidth(\n editableSegmentConfigs: SegmentConfig[],\n segmentConfigs: SegmentConfig[],\n showFormatButton: boolean,\n): string {\n // Sum all editable segment max widths with their padding\n const segmentWidth = editableSegmentConfigs.reduce((sum, config) => {\n const maxLen = config.maxLength || 0;\n const padding = config.pad ?? 0.5;\n return sum + maxLen + padding;\n }, 0);\n\n // Calculate width of literal characters (colons, spaces, etc.)\n const literalWidth = segmentConfigs\n .filter((c) => c.type === 'literal')\n .reduce((sum, c) => sum + (c.value?.length || 0), 0);\n\n // Add gap spacing between segments\n // Number of gaps = number of segments - 1 (minimum 0)\n const gapCount = Math.max(0, segmentConfigs.length - 1);\n const gapWidth = gapCount * SEGMENT_GAP_WIDTH;\n\n // Add container padding\n const paddingWidth = CONTAINER_PADDING_WIDTH;\n\n // Add format button width if shown\n const buttonWidth = showFormatButton ? FORMAT_BUTTON_WIDTH : 0;\n\n // Add gap between input and button if button is shown\n const inputButtonGap = showFormatButton ? INPUT_BUTTON_GAP : 0;\n\n return `${segmentWidth + literalWidth + gapWidth + paddingWidth + buttonWidth + inputButtonGap}ch`;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAsBA,MAAa,oBAAoB;;AAGjC,MAAa,0BAA0B;;AAGvC,MAAa,sBAAsB;;AAGnC,MAAa,mBAAmB;;;;;;;;;;;AAYhC,SAAgB,yBACd,wBACA,gBACA,kBACQ;CAER,MAAM,eAAe,uBAAuB,QAAQ,KAAK,WAAW;EAClE,MAAM,SAAS,OAAO,aAAa;EACnC,MAAM,UAAU,OAAO,OAAO;AAC9B,SAAO,MAAM,SAAS;IACrB,EAAE;CAGL,MAAM,eAAe,eAClB,QAAQ,MAAM,EAAE,SAAS,UAAU,CACnC,QAAQ,KAAK,MAAM,OAAO,EAAE,OAAO,UAAU,IAAI,EAAE;CAKtD,MAAM,WADW,KAAK,IAAI,GAAG,eAAe,SAAS,EAAE,GAC3B;CAG5B,MAAM,eAAe;CAGrB,MAAM,cAAc,mBAAmB,sBAAsB;CAG7D,MAAM,iBAAiB,mBAAmB,mBAAmB;AAE7D,QAAO,GAAG,eAAe,eAAe,WAAW,eAAe,cAAc,eAAe"}
1
+ {"version":3,"file":"width-utils.js","names":[],"sources":["../../../src/components/coordinate-field/width-utils.ts"],"sourcesContent":["// __private-exports\n/*\n * Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport type { SegmentConfig } from './types';\n\n/**\n * Layout spacing constants for coordinate field width calculations.\n * All values are in character widths (ch units) to ensure consistent sizing\n * with monospace coordinate values.\n */\n\n/** Gap spacing between segments (0.5rem = ~0.5ch per gap) */\nexport const SEGMENT_GAP_WIDTH = 0.5;\n\n/** Container padding (px-s = 0.5rem on each side = ~1ch total) */\nexport const CONTAINER_PADDING_WIDTH = 2;\n\n/** Format button width (icon button is roughly 2.5-3ch) */\nexport const FORMAT_BUTTON_WIDTH = 3.5;\n\n/** Gap between input and button (gap-m = 1rem = ~1ch) */\nexport const INPUT_BUTTON_GAP = 1.5;\n\n/**\n * Calculates the minimum width needed for the coordinate field control container.\n * This keeps the outlined container at a fixed width while segments animate.\n *\n * @private\n * @param editableSegmentConfigs - Array of editable segment configurations\n * @param segmentConfigs - Array of all segment configurations (including literals)\n * @param showFormatButton - Whether the format button is displayed\n * @returns The calculated width as a CSS string (e.g., \"25ch\")\n */\nexport function calculateMinControlWidth(\n editableSegmentConfigs: SegmentConfig[],\n segmentConfigs: SegmentConfig[],\n showFormatButton: boolean,\n): string {\n // Sum all editable segment max widths with their padding\n const segmentWidth = editableSegmentConfigs.reduce((sum, config) => {\n const maxLen = config.maxLength || 0;\n const padding = config.pad ?? 0.5;\n return sum + maxLen + padding;\n }, 0);\n\n // Calculate width of literal characters (colons, spaces, etc.)\n const literalWidth = segmentConfigs\n .filter((c) => c.type === 'literal')\n .reduce((sum, c) => sum + (c.value?.length || 0), 0);\n\n // Add gap spacing between segments\n // Number of gaps = number of segments - 1 (minimum 0)\n const gapCount = Math.max(0, segmentConfigs.length - 1);\n const gapWidth = gapCount * SEGMENT_GAP_WIDTH;\n\n // Add container padding\n const paddingWidth = CONTAINER_PADDING_WIDTH;\n\n // Add format button width if shown\n const buttonWidth = showFormatButton ? FORMAT_BUTTON_WIDTH : 0;\n\n // Add gap between input and button if button is shown\n const inputButtonGap = showFormatButton ? INPUT_BUTTON_GAP : 0;\n\n return `${segmentWidth + literalWidth + gapWidth + paddingWidth + buttonWidth + inputButtonGap}ch`;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAsBA,MAAa,oBAAoB;;AAGjC,MAAa,0BAA0B;;AAGvC,MAAa,sBAAsB;;AAGnC,MAAa,mBAAmB;;;;;;;;;;;AAYhC,SAAgB,yBACd,wBACA,gBACA,kBACQ;CAER,MAAM,eAAe,uBAAuB,QAAQ,KAAK,WAAW;EAClE,MAAM,SAAS,OAAO,aAAa;EACnC,MAAM,UAAU,OAAO,OAAO;AAC9B,SAAO,MAAM,SAAS;IACrB,EAAE;CAGL,MAAM,eAAe,eAClB,QAAQ,MAAM,EAAE,SAAS,UAAU,CACnC,QAAQ,KAAK,MAAM,OAAO,EAAE,OAAO,UAAU,IAAI,EAAE;CAKtD,MAAM,WADW,KAAK,IAAI,GAAG,eAAe,SAAS,EAAE,GAC3B;CAG5B,MAAM,eAAe;CAGrB,MAAM,cAAc,mBAAmB,sBAAsB;CAG7D,MAAM,iBAAiB,mBAAmB,mBAAmB;AAE7D,QAAO,GAAG,eAAe,eAAe,WAAW,eAAe,cAAc,eAAe"}
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.
2
+ * Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.
3
3
  * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
4
  * you may not use this file except in compliance with the License. You may obtain a copy
5
5
  * of the License at https://www.apache.org/licenses/LICENSE-2.0
@@ -12,7 +12,7 @@
12
12
 
13
13
  import { DateFieldProps } from "./types.js";
14
14
  import "client-only";
15
- import * as react_jsx_runtime187 from "react/jsx-runtime";
15
+ import * as react_jsx_runtime29 from "react/jsx-runtime";
16
16
  import { DateValue } from "@internationalized/date";
17
17
 
18
18
  //#region src/components/date-field/index.d.ts
@@ -100,7 +100,7 @@ declare function DateField<T extends DateValue>({
100
100
  isRequired,
101
101
  isReadOnly,
102
102
  ...rest
103
- }: DateFieldProps<T>): react_jsx_runtime187.JSX.Element;
103
+ }: DateFieldProps<T>): react_jsx_runtime29.JSX.Element;
104
104
  //#endregion
105
105
  export { DateField };
106
106
  //# sourceMappingURL=index.d.ts.map
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.
2
+ * Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.
3
3
  * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
4
  * you may not use this file except in compliance with the License. You may obtain a copy
5
5
  * of the License at https://www.apache.org/licenses/LICENSE-2.0
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["AriaDateField","Label","isDisabled","AriaDateInput","AriaText"],"sources":["../../../src/components/date-field/index.tsx"],"sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n'use client';\n\nimport 'client-only';\nimport { clsx } from '@accelint/design-foundation/lib/utils';\nimport Calendar from '@accelint/icons/calendar';\nimport {\n DateField as AriaDateField,\n DateInput as AriaDateInput,\n Text as AriaText,\n composeRenderProps,\n DateSegment,\n FieldError,\n} from 'react-aria-components';\nimport { Icon } from '../icon';\nimport { Label } from '../label';\nimport styles from './styles.module.css';\nimport type { DateValue } from '@internationalized/date';\nimport type { DateFieldProps } from './types';\n\nconst months = [\n 'JAN',\n 'FEB',\n 'MAR',\n 'APR',\n 'MAY',\n 'JUN',\n 'JUL',\n 'AUG',\n 'SEP',\n 'OCT',\n 'NOV',\n 'DEC',\n];\n\n/**\n * DateField - A comprehensive date input component with segmented editing\n *\n * Provides accessible date input functionality with separate segments for day,\n * month, and year. Includes calendar icon, validation states, and international\n * date format support with keyboard navigation between segments.\n *\n * @param props - The date field props.\n * @param props.classNames - Custom class names for sub-elements.\n * @param props.description - Helper text displayed below the field.\n * @param props.errorMessage - Error message displayed when invalid.\n * @param props.inputProps - Additional props for the date input element.\n * @param props.label - Label text displayed above the field.\n * @param props.size - Size variant of the field.\n * @param props.shortMonth - When true, displays 3-letter month abbreviation when not editing.\n * @param props.shouldForceLeadingZeros - Whether to force leading zeros in segments.\n * @param props.isDisabled - Whether the field is disabled.\n * @param props.isInvalid - Whether the field is in an invalid state.\n * @param props.isRequired - Whether the field is required.\n * @param props.isReadOnly - Whether the field is read-only.\n * @returns The date field component.\n *\n * @example\n * ```tsx\n * // Basic date field\n * <DateField label=\"Birth Date\" />\n * ```\n *\n * @example\n * ```tsx\n * // Date field with validation\n * <DateField\n * label=\"Event Date\"\n * isRequired\n * isInvalid={hasError}\n * errorMessage=\"Please select a valid date\"\n * />\n * ```\n *\n * @example\n * ```tsx\n * // Date field with custom formatting\n * <DateField\n * label=\"Meeting Date\"\n * shortMonth={false}\n * placeholder=\"Select meeting date\"\n * />\n * ```\n *\n * @example\n * ```tsx\n * // Compact date field\n * <DateField\n * label=\"Due Date\"\n * size=\"small\"\n * description=\"When is this task due?\"\n * />\n * ```\n *\n * @example\n * ```tsx\n * // Controlled date field\n * <DateField\n * label=\"Selected Date\"\n * value={selectedDate}\n * onChange={setSelectedDate}\n * />\n * ```\n */\nexport function DateField<T extends DateValue>({\n classNames,\n description: descriptionProp,\n errorMessage: errorMessageProp,\n inputProps,\n label: labelProp,\n size = 'medium',\n shortMonth = true,\n shouldForceLeadingZeros = true,\n isDisabled,\n isInvalid: isInvalidProp,\n isRequired,\n isReadOnly = false,\n ...rest\n}: DateFieldProps<T>) {\n const errorMessage = errorMessageProp || null; // Protect against empty string\n const isSmall = size === 'small';\n\n return (\n <AriaDateField<T>\n {...rest}\n className={composeRenderProps(classNames?.field, (className) =>\n clsx('group/date-field', styles.field, className),\n )}\n shouldForceLeadingZeros={shouldForceLeadingZeros}\n isDisabled={isDisabled}\n isInvalid={isInvalidProp || (errorMessage ? true : undefined)} // Leave uncontrolled if possible to fallback to validation state\n isRequired={isRequired}\n isReadOnly={isReadOnly}\n aria-label={labelProp}\n data-size={size}\n >\n {(\n { isDisabled }, // Rely on internal state, not props, since state could differ from props\n ) => (\n <>\n {!isSmall && labelProp && (\n <Label\n className={clsx(styles.label, classNames?.label)}\n isDisabled={isDisabled}\n isRequired={isRequired}\n >\n {labelProp}\n </Label>\n )}\n <div\n className={clsx(styles.control, classNames?.control)}\n data-readonly={isReadOnly || null}\n >\n {!isReadOnly && size === 'medium' && (\n <Icon>\n <Calendar />\n </Icon>\n )}\n <AriaDateInput\n {...inputProps}\n className={composeRenderProps(classNames?.input, (className) =>\n clsx(styles.input, className),\n )}\n >\n {(segmentProp) => {\n // Remove extra space and punctuation from input display\n if (segmentProp.type === 'literal') {\n return <>{segmentProp.text === ':' ? ':' : null}</>;\n }\n\n return (\n <DateSegment\n className={composeRenderProps(\n classNames?.segment,\n (className) =>\n clsx(\n styles.segment,\n segmentProp.type === 'month' &&\n shortMonth &&\n styles.shortMonth,\n className,\n ),\n )}\n segment={segmentProp}\n >\n {({\n placeholder,\n text,\n value,\n isFocused,\n isPlaceholder,\n }) => {\n if (isPlaceholder) {\n return placeholder;\n }\n\n return segmentProp.type === 'month' &&\n shortMonth &&\n !isFocused\n ? months[(value ?? 0) - 1]\n : text;\n }}\n </DateSegment>\n );\n }}\n </AriaDateInput>\n </div>\n {descriptionProp && (!(isSmall || isInvalidProp) || isDisabled) && (\n <AriaText\n className={clsx(styles.description, classNames?.description)}\n slot='description'\n >\n {descriptionProp}\n </AriaText>\n )}\n <FieldError\n className={composeRenderProps(classNames?.error, (className) =>\n clsx(styles.error, className),\n )}\n >\n {errorMessage}\n </FieldError>\n </>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cACF,QAAO;AAGT,eAAO,YAAY,SAAS,WAC1B,cACA,CAAC,YACC,QAAQ,SAAS,KAAK,KACtB;;QAEM;;MAGJ;KACZ;GACL,oBAAoB,EAAE,WAAW,kBAAkBD,iBAClD,oBAACE;IACC,WAAW,KAAK,OAAO,aAAa,YAAY,YAAY;IAC5D,MAAK;cAEJ;KACQ;GAEb,oBAAC;IACC,WAAW,mBAAmB,YAAY,QAAQ,cAChD,KAAK,OAAO,OAAO,UAAU,CAC9B;cAEA;KACU;MACZ;GAES"}
1
+ {"version":3,"file":"index.js","names":["AriaDateField","Label","isDisabled","AriaDateInput","AriaText"],"sources":["../../../src/components/date-field/index.tsx"],"sourcesContent":["/*\n * Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n'use client';\n\nimport 'client-only';\nimport { clsx } from '@accelint/design-foundation/lib/utils';\nimport Calendar from '@accelint/icons/calendar';\nimport {\n DateField as AriaDateField,\n DateInput as AriaDateInput,\n Text as AriaText,\n composeRenderProps,\n DateSegment,\n FieldError,\n} from 'react-aria-components';\nimport { Icon } from '../icon';\nimport { Label } from '../label';\nimport styles from './styles.module.css';\nimport type { DateValue } from '@internationalized/date';\nimport type { DateFieldProps } from './types';\n\nconst months = [\n 'JAN',\n 'FEB',\n 'MAR',\n 'APR',\n 'MAY',\n 'JUN',\n 'JUL',\n 'AUG',\n 'SEP',\n 'OCT',\n 'NOV',\n 'DEC',\n];\n\n/**\n * DateField - A comprehensive date input component with segmented editing\n *\n * Provides accessible date input functionality with separate segments for day,\n * month, and year. Includes calendar icon, validation states, and international\n * date format support with keyboard navigation between segments.\n *\n * @param props - The date field props.\n * @param props.classNames - Custom class names for sub-elements.\n * @param props.description - Helper text displayed below the field.\n * @param props.errorMessage - Error message displayed when invalid.\n * @param props.inputProps - Additional props for the date input element.\n * @param props.label - Label text displayed above the field.\n * @param props.size - Size variant of the field.\n * @param props.shortMonth - When true, displays 3-letter month abbreviation when not editing.\n * @param props.shouldForceLeadingZeros - Whether to force leading zeros in segments.\n * @param props.isDisabled - Whether the field is disabled.\n * @param props.isInvalid - Whether the field is in an invalid state.\n * @param props.isRequired - Whether the field is required.\n * @param props.isReadOnly - Whether the field is read-only.\n * @returns The date field component.\n *\n * @example\n * ```tsx\n * // Basic date field\n * <DateField label=\"Birth Date\" />\n * ```\n *\n * @example\n * ```tsx\n * // Date field with validation\n * <DateField\n * label=\"Event Date\"\n * isRequired\n * isInvalid={hasError}\n * errorMessage=\"Please select a valid date\"\n * />\n * ```\n *\n * @example\n * ```tsx\n * // Date field with custom formatting\n * <DateField\n * label=\"Meeting Date\"\n * shortMonth={false}\n * placeholder=\"Select meeting date\"\n * />\n * ```\n *\n * @example\n * ```tsx\n * // Compact date field\n * <DateField\n * label=\"Due Date\"\n * size=\"small\"\n * description=\"When is this task due?\"\n * />\n * ```\n *\n * @example\n * ```tsx\n * // Controlled date field\n * <DateField\n * label=\"Selected Date\"\n * value={selectedDate}\n * onChange={setSelectedDate}\n * />\n * ```\n */\nexport function DateField<T extends DateValue>({\n classNames,\n description: descriptionProp,\n errorMessage: errorMessageProp,\n inputProps,\n label: labelProp,\n size = 'medium',\n shortMonth = true,\n shouldForceLeadingZeros = true,\n isDisabled,\n isInvalid: isInvalidProp,\n isRequired,\n isReadOnly = false,\n ...rest\n}: DateFieldProps<T>) {\n const errorMessage = errorMessageProp || null; // Protect against empty string\n const isSmall = size === 'small';\n\n return (\n <AriaDateField<T>\n {...rest}\n className={composeRenderProps(classNames?.field, (className) =>\n clsx('group/date-field', styles.field, className),\n )}\n shouldForceLeadingZeros={shouldForceLeadingZeros}\n isDisabled={isDisabled}\n isInvalid={isInvalidProp || (errorMessage ? true : undefined)} // Leave uncontrolled if possible to fallback to validation state\n isRequired={isRequired}\n isReadOnly={isReadOnly}\n aria-label={labelProp}\n data-size={size}\n >\n {(\n { isDisabled }, // Rely on internal state, not props, since state could differ from props\n ) => (\n <>\n {!isSmall && labelProp && (\n <Label\n className={clsx(styles.label, classNames?.label)}\n isDisabled={isDisabled}\n isRequired={isRequired}\n >\n {labelProp}\n </Label>\n )}\n <div\n className={clsx(styles.control, classNames?.control)}\n data-readonly={isReadOnly || null}\n >\n {!isReadOnly && size === 'medium' && (\n <Icon>\n <Calendar />\n </Icon>\n )}\n <AriaDateInput\n {...inputProps}\n className={composeRenderProps(classNames?.input, (className) =>\n clsx(styles.input, className),\n )}\n >\n {(segmentProp) => {\n // Remove extra space and punctuation from input display\n if (segmentProp.type === 'literal') {\n return <>{segmentProp.text === ':' ? ':' : null}</>;\n }\n\n return (\n <DateSegment\n className={composeRenderProps(\n classNames?.segment,\n (className) =>\n clsx(\n styles.segment,\n segmentProp.type === 'month' &&\n shortMonth &&\n styles.shortMonth,\n className,\n ),\n )}\n segment={segmentProp}\n >\n {({\n placeholder,\n text,\n value,\n isFocused,\n isPlaceholder,\n }) => {\n if (isPlaceholder) {\n return placeholder;\n }\n\n return segmentProp.type === 'month' &&\n shortMonth &&\n !isFocused\n ? months[(value ?? 0) - 1]\n : text;\n }}\n </DateSegment>\n );\n }}\n </AriaDateInput>\n </div>\n {descriptionProp && (!(isSmall || isInvalidProp) || isDisabled) && (\n <AriaText\n className={clsx(styles.description, classNames?.description)}\n slot='description'\n >\n {descriptionProp}\n </AriaText>\n )}\n <FieldError\n className={composeRenderProps(classNames?.error, (className) =>\n clsx(styles.error, className),\n )}\n >\n {errorMessage}\n </FieldError>\n </>\n )}\n </AriaDateField>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA+BA,MAAM,SAAS;CACb;CACA;CACA;CACA;CACA;CAC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BAAoB,EAAE,WAAW,kBAAkBD,iBAClD,oBAACE;IACC,WAAW,KAAK,OAAO,aAAa,YAAY,YAAY;IAC5D,MAAK;cAEJ;KACQ;GAEb,oBAAC;IACC,WAAW,mBAAmB,YAAY,QAAQ,cAChD,KAAK,OAAO,OAAO,UAAU,CAC9B;cAEA;KACU;MACZ;GAES"}
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.
2
+ * Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.
3
3
  * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
4
  * you may not use this file except in compliance with the License. You may obtain a copy
5
5
  * of the License at https://www.apache.org/licenses/LICENSE-2.0
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.
2
+ * Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.
3
3
  * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
4
  * you may not use this file except in compliance with the License. You may obtain a copy
5
5
  * of the License at https://www.apache.org/licenses/LICENSE-2.0
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.
2
+ * Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.
3
3
  * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
4
  * you may not use this file except in compliance with the License. You may obtain a copy
5
5
  * of the License at https://www.apache.org/licenses/LICENSE-2.0
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.
2
+ * Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.
3
3
  * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
4
  * you may not use this file except in compliance with the License. You may obtain a copy
5
5
  * of the License at https://www.apache.org/licenses/LICENSE-2.0
@@ -11,7 +11,7 @@
11
11
  */
12
12
 
13
13
  import { DeferredCollectionProps } from "./types.js";
14
- import * as react_jsx_runtime189 from "react/jsx-runtime";
14
+ import * as react_jsx_runtime47 from "react/jsx-runtime";
15
15
 
16
16
  //#region src/components/deferred-collection/index.d.ts
17
17
 
@@ -45,7 +45,7 @@ declare function DeferredCollection({
45
45
  children,
46
46
  fallback,
47
47
  deferFrames
48
- }: DeferredCollectionProps): react_jsx_runtime189.JSX.Element;
48
+ }: DeferredCollectionProps): react_jsx_runtime47.JSX.Element;
49
49
  //#endregion
50
50
  export { DeferredCollection, type DeferredCollectionProps };
51
51
  //# sourceMappingURL=index.d.ts.map
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.
2
+ * Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.
3
3
  * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
4
  * you may not use this file except in compliance with the License. You may obtain a copy
5
5
  * of the License at https://www.apache.org/licenses/LICENSE-2.0
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../src/components/deferred-collection/index.tsx"],"sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { useFrameDelay } from '../../hooks/use-frame-delay';\nimport type { DeferredCollectionProps } from './types';\n\n/**\n * DeferredCollection - Defers rendering of large collections to prevent UI freezes.\n *\n * React Aria's collection system processes ALL items synchronously before\n * virtualization begins. This component defers the collection render by a few\n * animation frames, allowing a fallback to display first.\n *\n * @param props - The deferred collection props.\n * @param props.children - Content to render once ready (ReactNode or function returning ReactNode).\n * @param props.fallback - Fallback element to show while deferring render.\n * @param props.deferFrames - Number of animation frames to defer before rendering.\n * @returns The deferred collection component with fallback or children.\n *\n * @example\n * ```tsx\n * <DeferredCollection fallback={<LoadingState />}>\n * {() => (\n * <Virtualizer>\n * <ListBox items={items}>\n * {(item) => <ListBoxItem>{item.name}</ListBoxItem>}\n * </ListBox>\n * </Virtualizer>\n * )}\n * </DeferredCollection>\n * ```\n */\nexport function DeferredCollection({\n children,\n fallback,\n deferFrames,\n}: DeferredCollectionProps) {\n const { isReady } = useFrameDelay({ frames: deferFrames });\n\n if (isReady) {\n return <>{typeof children === 'function' ? children() : children}</>;\n }\n\n return <>{fallback}</>;\n}\n\nexport type { DeferredCollectionProps } from './types';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyCA,SAAgB,mBAAmB,EACjC,UACA,UACA,eAC0B;CAC1B,MAAM,EAAE,YAAY,cAAc,EAAE,QAAQ,aAAa,CAAC;AAE1D,KAAI,QACF,QAAO,0CAAG,OAAO,aAAa,aAAa,UAAU,GAAG,WAAY;AAGtE,QAAO,0CAAG,WAAY"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../src/components/deferred-collection/index.tsx"],"sourcesContent":["/*\n * Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { useFrameDelay } from '../../hooks/use-frame-delay';\nimport type { DeferredCollectionProps } from './types';\n\n/**\n * DeferredCollection - Defers rendering of large collections to prevent UI freezes.\n *\n * React Aria's collection system processes ALL items synchronously before\n * virtualization begins. This component defers the collection render by a few\n * animation frames, allowing a fallback to display first.\n *\n * @param props - The deferred collection props.\n * @param props.children - Content to render once ready (ReactNode or function returning ReactNode).\n * @param props.fallback - Fallback element to show while deferring render.\n * @param props.deferFrames - Number of animation frames to defer before rendering.\n * @returns The deferred collection component with fallback or children.\n *\n * @example\n * ```tsx\n * <DeferredCollection fallback={<LoadingState />}>\n * {() => (\n * <Virtualizer>\n * <ListBox items={items}>\n * {(item) => <ListBoxItem>{item.name}</ListBoxItem>}\n * </ListBox>\n * </Virtualizer>\n * )}\n * </DeferredCollection>\n * ```\n */\nexport function DeferredCollection({\n children,\n fallback,\n deferFrames,\n}: DeferredCollectionProps) {\n const { isReady } = useFrameDelay({ frames: deferFrames });\n\n if (isReady) {\n return <>{typeof children === 'function' ? children() : children}</>;\n }\n\n return <>{fallback}</>;\n}\n\nexport type { DeferredCollectionProps } from './types';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyCA,SAAgB,mBAAmB,EACjC,UACA,UACA,eAC0B;CAC1B,MAAM,EAAE,YAAY,cAAc,EAAE,QAAQ,aAAa,CAAC;AAE1D,KAAI,QACF,QAAO,0CAAG,OAAO,aAAa,aAAa,UAAU,GAAG,WAAY;AAGtE,QAAO,0CAAG,WAAY"}