@lablup/ui-common 0.1.0-alpha.9 → 0.2.0-alpha.15

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 (909) hide show
  1. package/NOTICE +62 -0
  2. package/README.md +490 -68
  3. package/astryx/components/AlertModal.doc.mjs +91 -0
  4. package/astryx/components/AlertModal.tsx +3 -0
  5. package/astryx/components/BoardItemTitle.doc.mjs +51 -0
  6. package/astryx/components/BoardItemTitle.tsx +3 -0
  7. package/astryx/components/BooleanToken.doc.mjs +57 -0
  8. package/astryx/components/BooleanToken.tsx +3 -0
  9. package/astryx/components/BulkEditFormItem.doc.mjs +68 -0
  10. package/astryx/components/BulkEditFormItem.tsx +3 -0
  11. package/astryx/components/BulkErrorModal.doc.mjs +75 -0
  12. package/astryx/components/BulkErrorModal.tsx +3 -0
  13. package/astryx/components/ColorPicker.doc.mjs +88 -0
  14. package/astryx/components/ColorPicker.tsx +3 -0
  15. package/astryx/components/ConfirmPopover.doc.mjs +99 -0
  16. package/astryx/components/ConfirmPopover.tsx +3 -0
  17. package/astryx/components/CountBadge.doc.mjs +93 -0
  18. package/astryx/components/CountBadge.tsx +3 -0
  19. package/astryx/components/CountdownBorder.doc.mjs +57 -0
  20. package/astryx/components/CountdownBorder.tsx +3 -0
  21. package/astryx/components/DataGrid.doc.mjs +166 -0
  22. package/astryx/components/DataGrid.tsx +3 -0
  23. package/astryx/components/DeleteConfirmModal.doc.mjs +163 -0
  24. package/astryx/components/DeleteConfirmModal.tsx +3 -0
  25. package/astryx/components/DividedRow.doc.mjs +85 -0
  26. package/astryx/components/DividedRow.tsx +3 -0
  27. package/astryx/components/DoubleBadge.doc.mjs +40 -0
  28. package/astryx/components/DoubleBadge.tsx +3 -0
  29. package/astryx/components/DoubleToken.doc.mjs +38 -0
  30. package/astryx/components/DoubleToken.tsx +3 -0
  31. package/astryx/components/Form.doc.mjs +113 -0
  32. package/astryx/components/Form.tsx +3 -0
  33. package/astryx/components/IconWithTooltip.doc.mjs +57 -0
  34. package/astryx/components/IconWithTooltip.tsx +3 -0
  35. package/astryx/components/ImageWithFallback.doc.mjs +47 -0
  36. package/astryx/components/ImageWithFallback.tsx +3 -0
  37. package/astryx/components/ListBanner.doc.mjs +50 -0
  38. package/astryx/components/ListBanner.tsx +3 -0
  39. package/astryx/components/Modal.doc.mjs +176 -0
  40. package/astryx/components/Modal.tsx +3 -0
  41. package/astryx/components/NotificationItem.doc.mjs +52 -0
  42. package/astryx/components/NotificationItem.tsx +3 -0
  43. package/astryx/components/NotificationStack.doc.mjs +66 -0
  44. package/astryx/components/NotificationStack.tsx +3 -0
  45. package/astryx/components/OverlayScrollbar.doc.mjs +49 -0
  46. package/astryx/components/OverlayScrollbar.tsx +3 -0
  47. package/astryx/components/PageHeader.doc.mjs +94 -0
  48. package/astryx/components/PageHeader.tsx +3 -0
  49. package/astryx/components/PagedSelector.doc.mjs +183 -0
  50. package/astryx/components/PagedSelector.tsx +3 -0
  51. package/astryx/components/ProgressWithLabel.doc.mjs +69 -0
  52. package/astryx/components/ProgressWithLabel.tsx +3 -0
  53. package/astryx/components/SelectionLabel.doc.mjs +55 -0
  54. package/astryx/components/SelectionLabel.tsx +3 -0
  55. package/astryx/components/Statistic.doc.mjs +84 -0
  56. package/astryx/components/Statistic.tsx +3 -0
  57. package/astryx/components/StepNumberInput.doc.mjs +102 -0
  58. package/astryx/components/StepNumberInput.tsx +3 -0
  59. package/astryx/components/TextHighlighter.doc.mjs +47 -0
  60. package/astryx/components/TextHighlighter.tsx +3 -0
  61. package/astryx/components/TokenList.doc.mjs +58 -0
  62. package/astryx/components/TokenList.tsx +3 -0
  63. package/astryx/components/TokenRow.doc.mjs +62 -0
  64. package/astryx/components/TokenRow.tsx +3 -0
  65. package/astryx/components/UncontrolledInput.doc.mjs +68 -0
  66. package/astryx/components/UncontrolledInput.tsx +3 -0
  67. package/astryx/components/UnitGrid.doc.mjs +107 -0
  68. package/astryx/components/UnitGrid.tsx +3 -0
  69. package/astryx/docs/ui-common.doc.mjs +112 -0
  70. package/astryx.integration.mjs +35 -0
  71. package/dist/assets/components/BoardItemTitle/BoardItemTitle.css +2 -0
  72. package/dist/assets/components/BulkErrorModal/BulkErrorModal.css +2 -0
  73. package/dist/assets/components/ColorPicker/ColorPicker.css +2 -0
  74. package/dist/assets/components/CountBadge/CountBadge.css +2 -0
  75. package/dist/assets/components/CountdownBorder/CountdownBorder.css +2 -0
  76. package/dist/assets/components/DataGrid/DataGrid.css +2 -0
  77. package/dist/assets/components/DeleteConfirmModal/DeleteConfirmModal.css +2 -0
  78. package/dist/assets/components/DigitPopIn/DigitPopIn.css +2 -0
  79. package/dist/assets/components/DividedRow/DividedRow.css +2 -0
  80. package/dist/assets/components/DoubleBadge/DoubleBadge.css +2 -0
  81. package/dist/assets/components/DoubleToken/DoubleToken.css +2 -0
  82. package/dist/assets/components/ErrorState/ErrorState.css +2 -1
  83. package/dist/assets/components/Form/FormItemVisual.css +2 -0
  84. package/dist/assets/components/IconWithTooltip/IconWithTooltip.css +2 -0
  85. package/dist/assets/components/ImageWithFallback/ImageWithFallback.css +2 -0
  86. package/dist/assets/components/ListBanner/ListBanner.css +2 -0
  87. package/dist/assets/components/Modal/Modal.css +2 -0
  88. package/dist/assets/components/NotificationItem/NotificationItem.css +2 -0
  89. package/dist/assets/components/NotificationStack/NotificationStack.css +2 -0
  90. package/dist/assets/components/OverlayScrollbar/OverlayScrollbar.css +2 -0
  91. package/dist/assets/components/PageHeader/PageHeader.css +2 -1
  92. package/dist/assets/components/PageLayout/PageLayout.css +2 -1
  93. package/dist/assets/components/PagedSelector/PagedSelector.css +2 -0
  94. package/dist/assets/components/ProgressWithLabel/ProgressWithLabel.css +2 -0
  95. package/dist/assets/components/Skeleton/SkeletonCard.css +2 -1
  96. package/dist/assets/components/Skeleton/SkeletonChart.css +2 -1
  97. package/dist/assets/components/Skeleton/SkeletonRow.css +2 -1
  98. package/dist/assets/components/Skeleton/SkeletonShape.css +2 -0
  99. package/dist/assets/components/Skeleton/SkeletonText.css +2 -1
  100. package/dist/assets/components/SmoothHeight/SmoothHeight.css +2 -1
  101. package/dist/assets/components/StatCard/StatCard.css +2 -1
  102. package/dist/assets/components/Statistic/Statistic.css +2 -0
  103. package/dist/assets/components/StepNumberInput/NumberStepper.css +2 -0
  104. package/dist/assets/components/TextHighlighter/TextHighlighter.css +2 -0
  105. package/dist/assets/components/TokenList/TokenList.css +2 -0
  106. package/dist/assets/components/TokenRow/TokenRow.css +2 -0
  107. package/dist/assets/components/UnitGrid/UnitGrid.css +2 -0
  108. package/dist/astryx/AppShell.d.ts +1 -0
  109. package/dist/astryx/AppShell.js +1 -0
  110. package/dist/astryx/AspectRatio.d.ts +1 -0
  111. package/dist/astryx/AspectRatio.js +1 -0
  112. package/dist/astryx/Avatar.d.ts +1 -0
  113. package/dist/astryx/Avatar.js +1 -0
  114. package/dist/astryx/AvatarGroup.d.ts +1 -0
  115. package/dist/astryx/AvatarGroup.js +1 -0
  116. package/dist/astryx/Badge.d.ts +1 -0
  117. package/dist/astryx/Badge.js +1 -0
  118. package/dist/astryx/Banner.d.ts +1 -0
  119. package/dist/astryx/Banner.js +1 -0
  120. package/dist/astryx/BaseProps.d.ts +1 -0
  121. package/dist/astryx/BaseProps.js +1 -0
  122. package/dist/astryx/Blockquote.d.ts +1 -0
  123. package/dist/astryx/Blockquote.js +1 -0
  124. package/dist/astryx/BottomSheet.d.ts +1 -0
  125. package/dist/astryx/BottomSheet.js +1 -0
  126. package/dist/astryx/Breadcrumbs.d.ts +1 -0
  127. package/dist/astryx/Breadcrumbs.js +1 -0
  128. package/dist/astryx/Button.d.ts +1 -0
  129. package/dist/astryx/Button.js +1 -0
  130. package/dist/astryx/ButtonGroup.d.ts +1 -0
  131. package/dist/astryx/ButtonGroup.js +1 -0
  132. package/dist/astryx/Calendar/utils.d.ts +1 -0
  133. package/dist/astryx/Calendar/utils.js +1 -0
  134. package/dist/astryx/Calendar.d.ts +1 -0
  135. package/dist/astryx/Calendar.js +1 -0
  136. package/dist/astryx/Card.d.ts +1 -0
  137. package/dist/astryx/Card.js +1 -0
  138. package/dist/astryx/Carousel.d.ts +1 -0
  139. package/dist/astryx/Carousel.js +1 -0
  140. package/dist/astryx/Center.d.ts +1 -0
  141. package/dist/astryx/Center.js +1 -0
  142. package/dist/astryx/Chat.d.ts +1 -0
  143. package/dist/astryx/Chat.js +1 -0
  144. package/dist/astryx/CheckboxInput.d.ts +1 -0
  145. package/dist/astryx/CheckboxInput.js +1 -0
  146. package/dist/astryx/CheckboxList.d.ts +1 -0
  147. package/dist/astryx/CheckboxList.js +1 -0
  148. package/dist/astryx/Citation.d.ts +1 -0
  149. package/dist/astryx/Citation.js +1 -0
  150. package/dist/astryx/ClickableCard.d.ts +1 -0
  151. package/dist/astryx/ClickableCard.js +1 -0
  152. package/dist/astryx/Code.d.ts +1 -0
  153. package/dist/astryx/Code.js +1 -0
  154. package/dist/astryx/CodeBlock.d.ts +1 -0
  155. package/dist/astryx/CodeBlock.js +1 -0
  156. package/dist/astryx/Collapsible.d.ts +1 -0
  157. package/dist/astryx/Collapsible.js +1 -0
  158. package/dist/astryx/CommandPalette.d.ts +1 -0
  159. package/dist/astryx/CommandPalette.js +1 -0
  160. package/dist/astryx/ContextMenu.d.ts +1 -0
  161. package/dist/astryx/ContextMenu.js +1 -0
  162. package/dist/astryx/DateInput.d.ts +1 -0
  163. package/dist/astryx/DateInput.js +1 -0
  164. package/dist/astryx/DateRangeInput.d.ts +1 -0
  165. package/dist/astryx/DateRangeInput.js +1 -0
  166. package/dist/astryx/DateTimeInput.d.ts +1 -0
  167. package/dist/astryx/DateTimeInput.js +1 -0
  168. package/dist/astryx/Divider.d.ts +1 -0
  169. package/dist/astryx/Divider.js +1 -0
  170. package/dist/astryx/DropdownMenu.d.ts +1 -0
  171. package/dist/astryx/DropdownMenu.js +1 -0
  172. package/dist/astryx/EmptyState.d.ts +1 -0
  173. package/dist/astryx/EmptyState.js +1 -0
  174. package/dist/astryx/Field.d.ts +1 -0
  175. package/dist/astryx/Field.js +1 -0
  176. package/dist/astryx/FieldStatus.d.ts +1 -0
  177. package/dist/astryx/FieldStatus.js +1 -0
  178. package/dist/astryx/FileInput.d.ts +1 -0
  179. package/dist/astryx/FileInput.js +1 -0
  180. package/dist/astryx/FormLayout.d.ts +1 -0
  181. package/dist/astryx/FormLayout.js +1 -0
  182. package/dist/astryx/Grid.d.ts +1 -0
  183. package/dist/astryx/Grid.js +1 -0
  184. package/dist/astryx/HStack.d.ts +1 -0
  185. package/dist/astryx/HStack.js +1 -0
  186. package/dist/astryx/Heading.d.ts +1 -0
  187. package/dist/astryx/Heading.js +1 -0
  188. package/dist/astryx/HoverCard.d.ts +1 -0
  189. package/dist/astryx/HoverCard.js +1 -0
  190. package/dist/astryx/Icon.d.ts +1 -0
  191. package/dist/astryx/Icon.js +1 -0
  192. package/dist/astryx/IconButton.d.ts +1 -0
  193. package/dist/astryx/IconButton.js +1 -0
  194. package/dist/astryx/Indicator.d.ts +1 -0
  195. package/dist/astryx/Indicator.js +1 -0
  196. package/dist/astryx/InputGroup.d.ts +1 -0
  197. package/dist/astryx/InputGroup.js +1 -0
  198. package/dist/astryx/InteractiveRoleContext.d.ts +1 -0
  199. package/dist/astryx/InteractiveRoleContext.js +1 -0
  200. package/dist/astryx/Item.d.ts +1 -0
  201. package/dist/astryx/Item.js +1 -0
  202. package/dist/astryx/Kbd.d.ts +1 -0
  203. package/dist/astryx/Kbd.js +1 -0
  204. package/dist/astryx/Layer.d.ts +1 -0
  205. package/dist/astryx/Layer.js +1 -0
  206. package/dist/astryx/Layout.d.ts +1 -0
  207. package/dist/astryx/Layout.js +1 -0
  208. package/dist/astryx/Lightbox.d.ts +1 -0
  209. package/dist/astryx/Lightbox.js +1 -0
  210. package/dist/astryx/Link.d.ts +1 -0
  211. package/dist/astryx/Link.js +1 -0
  212. package/dist/astryx/List.d.ts +1 -0
  213. package/dist/astryx/List.js +1 -0
  214. package/dist/astryx/Markdown/utils.d.ts +1 -0
  215. package/dist/astryx/Markdown/utils.js +1 -0
  216. package/dist/astryx/Markdown.d.ts +1 -0
  217. package/dist/astryx/Markdown.js +1 -0
  218. package/dist/astryx/MetadataList.d.ts +1 -0
  219. package/dist/astryx/MetadataList.js +1 -0
  220. package/dist/astryx/MobileNav.d.ts +1 -0
  221. package/dist/astryx/MobileNav.js +1 -0
  222. package/dist/astryx/MoreMenu.d.ts +1 -0
  223. package/dist/astryx/MoreMenu.js +1 -0
  224. package/dist/astryx/MultiSelector.d.ts +1 -0
  225. package/dist/astryx/MultiSelector.js +1 -0
  226. package/dist/astryx/NavIcon.d.ts +1 -0
  227. package/dist/astryx/NavIcon.js +1 -0
  228. package/dist/astryx/NavMenu.d.ts +1 -0
  229. package/dist/astryx/NavMenu.js +1 -0
  230. package/dist/astryx/NumberInput.d.ts +1 -0
  231. package/dist/astryx/NumberInput.js +1 -0
  232. package/dist/astryx/Outline.d.ts +1 -0
  233. package/dist/astryx/Outline.js +1 -0
  234. package/dist/astryx/OverflowList.d.ts +1 -0
  235. package/dist/astryx/OverflowList.js +1 -0
  236. package/dist/astryx/Overlay.d.ts +1 -0
  237. package/dist/astryx/Overlay.js +1 -0
  238. package/dist/astryx/Pagination.d.ts +1 -0
  239. package/dist/astryx/Pagination.js +1 -0
  240. package/dist/astryx/Popover.d.ts +1 -0
  241. package/dist/astryx/Popover.js +1 -0
  242. package/dist/astryx/PowerSearch/utils.d.ts +1 -0
  243. package/dist/astryx/PowerSearch/utils.js +1 -0
  244. package/dist/astryx/PowerSearch.d.ts +1 -0
  245. package/dist/astryx/PowerSearch.js +1 -0
  246. package/dist/astryx/ProgressBar.d.ts +1 -0
  247. package/dist/astryx/ProgressBar.js +1 -0
  248. package/dist/astryx/RadioList.d.ts +1 -0
  249. package/dist/astryx/RadioList.js +1 -0
  250. package/dist/astryx/Resizable/utils.d.ts +1 -0
  251. package/dist/astryx/Resizable/utils.js +1 -0
  252. package/dist/astryx/Resizable.d.ts +1 -0
  253. package/dist/astryx/Resizable.js +1 -0
  254. package/dist/astryx/ScrollableArea.d.ts +1 -0
  255. package/dist/astryx/ScrollableArea.js +1 -0
  256. package/dist/astryx/Section.d.ts +1 -0
  257. package/dist/astryx/Section.js +1 -0
  258. package/dist/astryx/SegmentedControl.d.ts +1 -0
  259. package/dist/astryx/SegmentedControl.js +1 -0
  260. package/dist/astryx/SelectableCard.d.ts +1 -0
  261. package/dist/astryx/SelectableCard.js +1 -0
  262. package/dist/astryx/Selector/utils.d.ts +1 -0
  263. package/dist/astryx/Selector/utils.js +1 -0
  264. package/dist/astryx/Selector.d.ts +1 -0
  265. package/dist/astryx/Selector.js +1 -0
  266. package/dist/astryx/SideNav.d.ts +1 -0
  267. package/dist/astryx/SideNav.js +1 -0
  268. package/dist/astryx/SizeContext.d.ts +1 -0
  269. package/dist/astryx/SizeContext.js +1 -0
  270. package/dist/astryx/Skeleton.d.ts +1 -0
  271. package/dist/astryx/Skeleton.js +1 -0
  272. package/dist/astryx/Slider.d.ts +1 -0
  273. package/dist/astryx/Slider.js +1 -0
  274. package/dist/astryx/Spinner.d.ts +1 -0
  275. package/dist/astryx/Spinner.js +1 -0
  276. package/dist/astryx/Stack.d.ts +1 -0
  277. package/dist/astryx/Stack.js +1 -0
  278. package/dist/astryx/StatusDot.d.ts +1 -0
  279. package/dist/astryx/StatusDot.js +1 -0
  280. package/dist/astryx/Stepper.d.ts +1 -0
  281. package/dist/astryx/Stepper.js +1 -0
  282. package/dist/astryx/Switch.d.ts +1 -0
  283. package/dist/astryx/Switch.js +1 -0
  284. package/dist/astryx/TabList.d.ts +1 -0
  285. package/dist/astryx/TabList.js +1 -0
  286. package/dist/astryx/Table/utils.d.ts +1 -0
  287. package/dist/astryx/Table/utils.js +1 -0
  288. package/dist/astryx/Table.d.ts +1 -0
  289. package/dist/astryx/Table.js +1 -0
  290. package/dist/astryx/Text.d.ts +1 -0
  291. package/dist/astryx/Text.js +1 -0
  292. package/dist/astryx/TextArea.d.ts +1 -0
  293. package/dist/astryx/TextArea.js +1 -0
  294. package/dist/astryx/TextInput.d.ts +1 -0
  295. package/dist/astryx/TextInput.js +1 -0
  296. package/dist/astryx/Thumbnail.d.ts +1 -0
  297. package/dist/astryx/Thumbnail.js +1 -0
  298. package/dist/astryx/TimeInput.d.ts +1 -0
  299. package/dist/astryx/TimeInput.js +1 -0
  300. package/dist/astryx/Timestamp.d.ts +1 -0
  301. package/dist/astryx/Timestamp.js +1 -0
  302. package/dist/astryx/Toast.d.ts +1 -0
  303. package/dist/astryx/Toast.js +1 -0
  304. package/dist/astryx/ToggleButton.d.ts +1 -0
  305. package/dist/astryx/ToggleButton.js +1 -0
  306. package/dist/astryx/Token.d.ts +1 -0
  307. package/dist/astryx/Token.js +1 -0
  308. package/dist/astryx/Tokenizer.d.ts +1 -0
  309. package/dist/astryx/Tokenizer.js +1 -0
  310. package/dist/astryx/Toolbar.d.ts +1 -0
  311. package/dist/astryx/Toolbar.js +1 -0
  312. package/dist/astryx/Tooltip.d.ts +1 -0
  313. package/dist/astryx/Tooltip.js +1 -0
  314. package/dist/astryx/TopNav.d.ts +1 -0
  315. package/dist/astryx/TopNav.js +1 -0
  316. package/dist/astryx/TreeList.d.ts +1 -0
  317. package/dist/astryx/TreeList.js +1 -0
  318. package/dist/astryx/Typeahead/utils.d.ts +1 -0
  319. package/dist/astryx/Typeahead/utils.js +1 -0
  320. package/dist/astryx/Typeahead.d.ts +1 -0
  321. package/dist/astryx/Typeahead.js +1 -0
  322. package/dist/astryx/VStack.d.ts +1 -0
  323. package/dist/astryx/VStack.js +1 -0
  324. package/dist/astryx/VisuallyHidden.d.ts +1 -0
  325. package/dist/astryx/VisuallyHidden.js +1 -0
  326. package/dist/astryx/astryx.css +3 -0
  327. package/dist/astryx/hooks.d.ts +1 -0
  328. package/dist/astryx/hooks.js +1 -0
  329. package/dist/astryx/i18n.d.ts +1 -0
  330. package/dist/astryx/i18n.js +1 -0
  331. package/dist/astryx/lab/lab.css +3 -0
  332. package/dist/astryx/lab.d.ts +6 -0
  333. package/dist/astryx/lab.js +6 -0
  334. package/dist/astryx/naming.d.ts +1 -0
  335. package/dist/astryx/naming.js +1 -0
  336. package/dist/astryx/reset.css +3 -0
  337. package/dist/astryx/tailwind-theme.css +3 -0
  338. package/dist/astryx/theme/neutral/built.d.ts +1 -0
  339. package/dist/astryx/theme/neutral/built.js +1 -0
  340. package/dist/astryx/theme/neutral/theme.css +3 -0
  341. package/dist/astryx/theme/neutral.d.ts +1 -0
  342. package/dist/astryx/theme/neutral.js +1 -0
  343. package/dist/astryx/theme/syntax.d.ts +1 -0
  344. package/dist/astryx/theme/syntax.js +1 -0
  345. package/dist/astryx/theme/tokens.d.ts +1 -0
  346. package/dist/astryx/theme/tokens.js +1 -0
  347. package/dist/astryx/theme/tokens.stylex.d.ts +1 -0
  348. package/dist/astryx/theme/tokens.stylex.js +1 -0
  349. package/dist/astryx/theme.d.ts +1 -0
  350. package/dist/astryx/theme.js +1 -0
  351. package/dist/astryx/utils.d.ts +1 -0
  352. package/dist/astryx/utils.js +1 -0
  353. package/dist/components/AlertModal/AlertModal.d.ts +14 -0
  354. package/dist/components/AlertModal/AlertModal.js +56 -0
  355. package/dist/components/AlertModal/AlertModal.js.map +1 -0
  356. package/dist/components/AlertModal/index.d.ts +2 -0
  357. package/dist/components/AlertModal/index.js +2 -0
  358. package/dist/components/BoardItemTitle/BoardItemTitle.d.ts +15 -0
  359. package/dist/components/BoardItemTitle/BoardItemTitle2.js +42 -0
  360. package/dist/components/BoardItemTitle/BoardItemTitle2.js.map +1 -0
  361. package/dist/components/BoardItemTitle/index.d.ts +2 -0
  362. package/dist/components/BoardItemTitle/index.js +2 -0
  363. package/dist/components/BooleanToken/BooleanToken.d.ts +15 -0
  364. package/dist/components/BooleanToken/BooleanToken.js +19 -0
  365. package/dist/components/BooleanToken/BooleanToken.js.map +1 -0
  366. package/dist/components/BooleanToken/BooleanToken.messages.d.ts +10 -0
  367. package/dist/components/BooleanToken/BooleanToken.messages.js +16 -0
  368. package/dist/components/BooleanToken/BooleanToken.messages.js.map +1 -0
  369. package/dist/components/BooleanToken/index.d.ts +2 -0
  370. package/dist/components/BooleanToken/index.js +2 -0
  371. package/dist/components/BulkEditFormItem/BulkEditFormItem.d.ts +24 -0
  372. package/dist/components/BulkEditFormItem/BulkEditFormItem.js +93 -0
  373. package/dist/components/BulkEditFormItem/BulkEditFormItem.js.map +1 -0
  374. package/dist/components/BulkEditFormItem/BulkEditFormItem.messages.d.ts +14 -0
  375. package/dist/components/BulkEditFormItem/BulkEditFormItem.messages.js +20 -0
  376. package/dist/components/BulkEditFormItem/BulkEditFormItem.messages.js.map +1 -0
  377. package/dist/components/BulkEditFormItem/index.d.ts +2 -0
  378. package/dist/components/BulkEditFormItem/index.js +2 -0
  379. package/dist/components/BulkErrorModal/BulkErrorModal.d.ts +23 -0
  380. package/dist/components/BulkErrorModal/BulkErrorModal.messages.d.ts +10 -0
  381. package/dist/components/BulkErrorModal/BulkErrorModal.messages.js +16 -0
  382. package/dist/components/BulkErrorModal/BulkErrorModal.messages.js.map +1 -0
  383. package/dist/components/BulkErrorModal/BulkErrorModal2.js +55 -0
  384. package/dist/components/BulkErrorModal/BulkErrorModal2.js.map +1 -0
  385. package/dist/components/BulkErrorModal/index.d.ts +2 -0
  386. package/dist/components/BulkErrorModal/index.js +2 -0
  387. package/dist/components/ColorPicker/ColorPicker.d.ts +43 -0
  388. package/dist/components/ColorPicker/ColorPicker.messages.d.ts +18 -0
  389. package/dist/components/ColorPicker/ColorPicker.messages.js +24 -0
  390. package/dist/components/ColorPicker/ColorPicker.messages.js.map +1 -0
  391. package/dist/components/ColorPicker/ColorPicker2.js +117 -0
  392. package/dist/components/ColorPicker/ColorPicker2.js.map +1 -0
  393. package/dist/components/ColorPicker/index.d.ts +2 -0
  394. package/dist/components/ColorPicker/index.js +2 -0
  395. package/dist/components/ConfirmPopover/ConfirmPopover.d.ts +35 -0
  396. package/dist/components/ConfirmPopover/ConfirmPopover.js +75 -0
  397. package/dist/components/ConfirmPopover/ConfirmPopover.js.map +1 -0
  398. package/dist/components/ConfirmPopover/index.d.ts +2 -0
  399. package/dist/components/ConfirmPopover/index.js +2 -0
  400. package/dist/components/CountBadge/CountBadge.d.ts +24 -0
  401. package/dist/components/CountBadge/CountBadge2.js +35 -0
  402. package/dist/components/CountBadge/CountBadge2.js.map +1 -0
  403. package/dist/components/CountBadge/index.d.ts +2 -0
  404. package/dist/components/CountBadge/index.js +2 -0
  405. package/dist/components/CountdownBorder/CountdownBorder.d.ts +22 -0
  406. package/dist/components/CountdownBorder/CountdownBorder2.js +63 -0
  407. package/dist/components/CountdownBorder/CountdownBorder2.js.map +1 -0
  408. package/dist/components/CountdownBorder/index.d.ts +2 -0
  409. package/dist/components/CountdownBorder/index.js +2 -0
  410. package/dist/components/DataGrid/DataGrid.d.ts +212 -0
  411. package/dist/components/DataGrid/DataGrid.messages.d.ts +70 -0
  412. package/dist/components/DataGrid/DataGrid.messages.js +76 -0
  413. package/dist/components/DataGrid/DataGrid.messages.js.map +1 -0
  414. package/dist/components/DataGrid/DataGrid2.js +447 -0
  415. package/dist/components/DataGrid/DataGrid2.js.map +1 -0
  416. package/dist/components/DataGrid/DataGridExportModal.d.ts +30 -0
  417. package/dist/components/DataGrid/DataGridExportModal.js +125 -0
  418. package/dist/components/DataGrid/DataGridExportModal.js.map +1 -0
  419. package/dist/components/DataGrid/DataGridSettingsModal.d.ts +36 -0
  420. package/dist/components/DataGrid/DataGridSettingsModal.js +177 -0
  421. package/dist/components/DataGrid/DataGridSettingsModal.js.map +1 -0
  422. package/dist/components/DataGrid/index.d.ts +6 -0
  423. package/dist/components/DataGrid/index.js +4 -0
  424. package/dist/components/DataGrid/nodeToPlainText.d.ts +6 -0
  425. package/dist/components/DataGrid/nodeToPlainText.js +9 -0
  426. package/dist/components/DataGrid/nodeToPlainText.js.map +1 -0
  427. package/dist/components/DeleteConfirmModal/DeleteConfirmModal.d.ts +78 -0
  428. package/dist/components/DeleteConfirmModal/DeleteConfirmModal.messages.d.ts +30 -0
  429. package/dist/components/DeleteConfirmModal/DeleteConfirmModal.messages.js +36 -0
  430. package/dist/components/DeleteConfirmModal/DeleteConfirmModal.messages.js.map +1 -0
  431. package/dist/components/DeleteConfirmModal/DeleteConfirmModal2.js +102 -0
  432. package/dist/components/DeleteConfirmModal/DeleteConfirmModal2.js.map +1 -0
  433. package/dist/components/DeleteConfirmModal/index.d.ts +2 -0
  434. package/dist/components/DeleteConfirmModal/index.js +2 -0
  435. package/dist/components/DigitPopIn/DigitPopIn.d.ts +8 -0
  436. package/dist/components/DigitPopIn/DigitPopIn2.js +30 -0
  437. package/dist/components/DigitPopIn/DigitPopIn2.js.map +1 -0
  438. package/dist/components/DigitPopIn/index.d.ts +2 -0
  439. package/dist/components/DigitPopIn/index.js +2 -0
  440. package/dist/components/DividedRow/DividedRow.d.ts +27 -0
  441. package/dist/components/DividedRow/DividedRow2.js +63 -0
  442. package/dist/components/DividedRow/DividedRow2.js.map +1 -0
  443. package/dist/components/DividedRow/index.d.ts +2 -0
  444. package/dist/components/DividedRow/index.js +2 -0
  445. package/dist/components/DoubleBadge/DoubleBadge.d.ts +14 -0
  446. package/dist/components/DoubleBadge/DoubleBadge2.js +28 -0
  447. package/dist/components/DoubleBadge/DoubleBadge2.js.map +1 -0
  448. package/dist/components/DoubleBadge/index.d.ts +2 -0
  449. package/dist/components/DoubleBadge/index.js +2 -0
  450. package/dist/components/DoubleToken/DoubleToken.d.ts +24 -0
  451. package/dist/components/DoubleToken/DoubleToken2.js +38 -0
  452. package/dist/components/DoubleToken/DoubleToken2.js.map +1 -0
  453. package/dist/components/DoubleToken/index.d.ts +2 -0
  454. package/dist/components/DoubleToken/index.js +2 -0
  455. package/dist/components/ErrorState/ErrorState.d.ts +7 -16
  456. package/dist/components/ErrorState/ErrorState2.js +33 -33
  457. package/dist/components/ErrorState/ErrorState2.js.map +1 -1
  458. package/dist/components/Form/ErrorList.d.ts +13 -0
  459. package/dist/components/Form/ErrorList.js +21 -0
  460. package/dist/components/Form/ErrorList.js.map +1 -0
  461. package/dist/components/Form/Field.d.ts +88 -0
  462. package/dist/components/Form/Field.js +212 -0
  463. package/dist/components/Form/Field.js.map +1 -0
  464. package/dist/components/Form/Form.d.ts +70 -0
  465. package/dist/components/Form/Form.js +130 -0
  466. package/dist/components/Form/Form.js.map +1 -0
  467. package/dist/components/Form/Form.messages.d.ts +96 -0
  468. package/dist/components/Form/Form.messages.js +96 -0
  469. package/dist/components/Form/Form.messages.js.map +1 -0
  470. package/dist/components/Form/FormConfigProvider.d.ts +20 -0
  471. package/dist/components/Form/FormConfigProvider.js +31 -0
  472. package/dist/components/Form/FormConfigProvider.js.map +1 -0
  473. package/dist/components/Form/FormItem.d.ts +56 -0
  474. package/dist/components/Form/FormItem.js +164 -0
  475. package/dist/components/Form/FormItem.js.map +1 -0
  476. package/dist/components/Form/FormItemVisual.d.ts +56 -0
  477. package/dist/components/Form/FormItemVisual2.js +117 -0
  478. package/dist/components/Form/FormItemVisual2.js.map +1 -0
  479. package/dist/components/Form/FormStore.d.ts +109 -0
  480. package/dist/components/Form/FormStore.js +494 -0
  481. package/dist/components/Form/FormStore.js.map +1 -0
  482. package/dist/components/Form/List.d.ts +22 -0
  483. package/dist/components/Form/List.js +65 -0
  484. package/dist/components/Form/List.js.map +1 -0
  485. package/dist/components/Form/context.d.ts +91 -0
  486. package/dist/components/Form/context.js +34 -0
  487. package/dist/components/Form/context.js.map +1 -0
  488. package/dist/components/Form/feedbackIcons.d.ts +13 -0
  489. package/dist/components/Form/feedbackIcons.js +45 -0
  490. package/dist/components/Form/feedbackIcons.js.map +1 -0
  491. package/dist/components/Form/index.d.ts +30 -0
  492. package/dist/components/Form/index.js +18 -0
  493. package/dist/components/Form/index.js.map +1 -0
  494. package/dist/components/Form/interface.d.ts +212 -0
  495. package/dist/components/Form/isEqual.d.ts +1 -0
  496. package/dist/components/Form/isEqual.js +61 -0
  497. package/dist/components/Form/isEqual.js.map +1 -0
  498. package/dist/components/Form/messages.d.ts +15 -0
  499. package/dist/components/Form/messages.js +52 -0
  500. package/dist/components/Form/messages.js.map +1 -0
  501. package/dist/components/Form/namePath.d.ts +78 -0
  502. package/dist/components/Form/namePath.js +120 -0
  503. package/dist/components/Form/namePath.js.map +1 -0
  504. package/dist/components/Form/useWatch.d.ts +11 -0
  505. package/dist/components/Form/useWatch.js +43 -0
  506. package/dist/components/Form/useWatch.js.map +1 -0
  507. package/dist/components/Form/validate.d.ts +16 -0
  508. package/dist/components/Form/validate.js +214 -0
  509. package/dist/components/Form/validate.js.map +1 -0
  510. package/dist/components/IconWithTooltip/IconWithTooltip.d.ts +19 -0
  511. package/dist/components/IconWithTooltip/IconWithTooltip2.js +38 -0
  512. package/dist/components/IconWithTooltip/IconWithTooltip2.js.map +1 -0
  513. package/dist/components/IconWithTooltip/accessibleLabel.d.ts +2 -0
  514. package/dist/components/IconWithTooltip/accessibleLabel.js +33 -0
  515. package/dist/components/IconWithTooltip/accessibleLabel.js.map +1 -0
  516. package/dist/components/IconWithTooltip/index.d.ts +2 -0
  517. package/dist/components/IconWithTooltip/index.js +2 -0
  518. package/dist/components/ImageWithFallback/ImageWithFallback.d.ts +11 -0
  519. package/dist/components/ImageWithFallback/ImageWithFallback2.js +28 -0
  520. package/dist/components/ImageWithFallback/ImageWithFallback2.js.map +1 -0
  521. package/dist/components/ImageWithFallback/index.d.ts +2 -0
  522. package/dist/components/ImageWithFallback/index.js +2 -0
  523. package/dist/components/ListBanner/ListBanner.d.ts +17 -0
  524. package/dist/components/ListBanner/ListBanner2.js +27 -0
  525. package/dist/components/ListBanner/ListBanner2.js.map +1 -0
  526. package/dist/components/ListBanner/index.d.ts +2 -0
  527. package/dist/components/ListBanner/index.js +2 -0
  528. package/dist/components/Modal/Modal.d.ts +65 -0
  529. package/dist/components/Modal/Modal2.js +226 -0
  530. package/dist/components/Modal/Modal2.js.map +1 -0
  531. package/dist/components/Modal/index.d.ts +15 -0
  532. package/dist/components/Modal/index.js +4 -0
  533. package/dist/components/Modal/modalStack.d.ts +64 -0
  534. package/dist/components/Modal/modalStack.js +81 -0
  535. package/dist/components/Modal/modalStack.js.map +1 -0
  536. package/dist/components/NotificationItem/NotificationItem.d.ts +14 -0
  537. package/dist/components/NotificationItem/NotificationItem2.js +40 -0
  538. package/dist/components/NotificationItem/NotificationItem2.js.map +1 -0
  539. package/dist/components/NotificationItem/index.d.ts +2 -0
  540. package/dist/components/NotificationItem/index.js +2 -0
  541. package/dist/components/NotificationStack/NotificationStack.d.ts +56 -0
  542. package/dist/components/NotificationStack/NotificationStack.messages.d.ts +6 -0
  543. package/dist/components/NotificationStack/NotificationStack.messages.js +10 -0
  544. package/dist/components/NotificationStack/NotificationStack.messages.js.map +1 -0
  545. package/dist/components/NotificationStack/NotificationStack2.js +154 -0
  546. package/dist/components/NotificationStack/NotificationStack2.js.map +1 -0
  547. package/dist/components/NotificationStack/index.d.ts +2 -0
  548. package/dist/components/NotificationStack/index.js +2 -0
  549. package/dist/components/OverlayScrollbar/OverlayScrollbar.d.ts +13 -0
  550. package/dist/components/OverlayScrollbar/OverlayScrollbar2.js +69 -0
  551. package/dist/components/OverlayScrollbar/OverlayScrollbar2.js.map +1 -0
  552. package/dist/components/OverlayScrollbar/index.d.ts +2 -0
  553. package/dist/components/OverlayScrollbar/index.js +2 -0
  554. package/dist/components/PageHeader/PageHeader.d.ts +24 -8
  555. package/dist/components/PageHeader/PageHeader.messages.d.ts +6 -0
  556. package/dist/components/PageHeader/PageHeader.messages.js +10 -0
  557. package/dist/components/PageHeader/PageHeader.messages.js.map +1 -0
  558. package/dist/components/PageHeader/PageHeader2.js +57 -30
  559. package/dist/components/PageHeader/PageHeader2.js.map +1 -1
  560. package/dist/components/PageLayout/PageLayout2.js +2 -2
  561. package/dist/components/PageLayout/PageLayout2.js.map +1 -1
  562. package/dist/components/PagedSelector/PagedSelector.d.ts +107 -0
  563. package/dist/components/PagedSelector/PagedSelector.messages.d.ts +30 -0
  564. package/dist/components/PagedSelector/PagedSelector.messages.js +36 -0
  565. package/dist/components/PagedSelector/PagedSelector.messages.js.map +1 -0
  566. package/dist/components/PagedSelector/PagedSelector2.js +220 -0
  567. package/dist/components/PagedSelector/PagedSelector2.js.map +1 -0
  568. package/dist/components/PagedSelector/PanelSearchInput.d.ts +22 -0
  569. package/dist/components/PagedSelector/PanelSearchInput.js +95 -0
  570. package/dist/components/PagedSelector/PanelSearchInput.js.map +1 -0
  571. package/dist/components/PagedSelector/index.d.ts +2 -0
  572. package/dist/components/PagedSelector/index.js +2 -0
  573. package/dist/components/ProgressWithLabel/ProgressWithLabel.d.ts +26 -0
  574. package/dist/components/ProgressWithLabel/ProgressWithLabel2.js +44 -0
  575. package/dist/components/ProgressWithLabel/ProgressWithLabel2.js.map +1 -0
  576. package/dist/components/ProgressWithLabel/index.d.ts +2 -0
  577. package/dist/components/ProgressWithLabel/index.js +2 -0
  578. package/dist/components/SelectionLabel/SelectionLabel.d.ts +23 -0
  579. package/dist/components/SelectionLabel/SelectionLabel.js +29 -0
  580. package/dist/components/SelectionLabel/SelectionLabel.js.map +1 -0
  581. package/dist/components/SelectionLabel/SelectionLabel.messages.d.ts +10 -0
  582. package/dist/components/SelectionLabel/SelectionLabel.messages.js +16 -0
  583. package/dist/components/SelectionLabel/SelectionLabel.messages.js.map +1 -0
  584. package/dist/components/SelectionLabel/index.d.ts +2 -0
  585. package/dist/components/SelectionLabel/index.js +2 -0
  586. package/dist/components/Skeleton/Skeleton.messages.d.ts +18 -0
  587. package/dist/components/Skeleton/Skeleton.messages.js +24 -0
  588. package/dist/components/Skeleton/Skeleton.messages.js.map +1 -0
  589. package/dist/components/Skeleton/SkeletonCard.d.ts +4 -9
  590. package/dist/components/Skeleton/SkeletonCard2.js +53 -53
  591. package/dist/components/Skeleton/SkeletonCard2.js.map +1 -1
  592. package/dist/components/Skeleton/SkeletonChart.d.ts +5 -11
  593. package/dist/components/Skeleton/SkeletonChart2.js +51 -45
  594. package/dist/components/Skeleton/SkeletonChart2.js.map +1 -1
  595. package/dist/components/Skeleton/SkeletonRow.d.ts +5 -10
  596. package/dist/components/Skeleton/SkeletonRow2.js +35 -34
  597. package/dist/components/Skeleton/SkeletonRow2.js.map +1 -1
  598. package/dist/components/Skeleton/SkeletonShape.d.ts +10 -0
  599. package/dist/components/Skeleton/SkeletonShape2.js +23 -0
  600. package/dist/components/Skeleton/SkeletonShape2.js.map +1 -0
  601. package/dist/components/Skeleton/SkeletonText.d.ts +4 -9
  602. package/dist/components/Skeleton/SkeletonText2.js +22 -17
  603. package/dist/components/Skeleton/SkeletonText2.js.map +1 -1
  604. package/dist/components/Skeleton/index.d.ts +3 -5
  605. package/dist/components/Skeleton/index.js +4 -5
  606. package/dist/components/SmoothHeight/SmoothHeight2.js +2 -2
  607. package/dist/components/SmoothHeight/SmoothHeight2.js.map +1 -1
  608. package/dist/components/StatCard/StatCard.d.ts +28 -16
  609. package/dist/components/StatCard/StatCard2.js +96 -89
  610. package/dist/components/StatCard/StatCard2.js.map +1 -1
  611. package/dist/components/StatCard/index.d.ts +1 -1
  612. package/dist/components/Statistic/Statistic.d.ts +30 -0
  613. package/dist/components/Statistic/Statistic.messages.d.ts +6 -0
  614. package/dist/components/Statistic/Statistic.messages.js +10 -0
  615. package/dist/components/Statistic/Statistic.messages.js.map +1 -0
  616. package/dist/components/Statistic/Statistic2.js +75 -0
  617. package/dist/components/Statistic/Statistic2.js.map +1 -0
  618. package/dist/components/Statistic/index.d.ts +2 -0
  619. package/dist/components/Statistic/index.js +2 -0
  620. package/dist/components/StepNumberInput/NumberStepper.d.ts +29 -0
  621. package/dist/components/StepNumberInput/NumberStepper.messages.d.ts +10 -0
  622. package/dist/components/StepNumberInput/NumberStepper.messages.js +16 -0
  623. package/dist/components/StepNumberInput/NumberStepper.messages.js.map +1 -0
  624. package/dist/components/StepNumberInput/NumberStepper2.js +50 -0
  625. package/dist/components/StepNumberInput/NumberStepper2.js.map +1 -0
  626. package/dist/components/StepNumberInput/StepNumberInput.d.ts +33 -0
  627. package/dist/components/StepNumberInput/StepNumberInput.js +48 -0
  628. package/dist/components/StepNumberInput/StepNumberInput.js.map +1 -0
  629. package/dist/components/StepNumberInput/index.d.ts +4 -0
  630. package/dist/components/StepNumberInput/index.js +3 -0
  631. package/dist/components/TextHighlighter/TextHighlighter.d.ts +14 -0
  632. package/dist/components/TextHighlighter/TextHighlighter2.js +29 -0
  633. package/dist/components/TextHighlighter/TextHighlighter2.js.map +1 -0
  634. package/dist/components/TextHighlighter/index.d.ts +2 -0
  635. package/dist/components/TextHighlighter/index.js +2 -0
  636. package/dist/components/TokenList/TokenList.d.ts +18 -0
  637. package/dist/components/TokenList/TokenList2.js +55 -0
  638. package/dist/components/TokenList/TokenList2.js.map +1 -0
  639. package/dist/components/TokenList/index.d.ts +2 -0
  640. package/dist/components/TokenList/index.js +2 -0
  641. package/dist/components/TokenRow/TokenRow.d.ts +27 -0
  642. package/dist/components/TokenRow/TokenRow.messages.d.ts +6 -0
  643. package/dist/components/TokenRow/TokenRow.messages.js +10 -0
  644. package/dist/components/TokenRow/TokenRow.messages.js.map +1 -0
  645. package/dist/components/TokenRow/TokenRow2.js +29 -0
  646. package/dist/components/TokenRow/TokenRow2.js.map +1 -0
  647. package/dist/components/TokenRow/index.d.ts +2 -0
  648. package/dist/components/TokenRow/index.js +2 -0
  649. package/dist/components/UncontrolledInput/UncontrolledInput.d.ts +29 -0
  650. package/dist/components/UncontrolledInput/UncontrolledInput.js +49 -0
  651. package/dist/components/UncontrolledInput/UncontrolledInput.js.map +1 -0
  652. package/dist/components/UncontrolledInput/UncontrolledInput.messages.d.ts +6 -0
  653. package/dist/components/UncontrolledInput/UncontrolledInput.messages.js +10 -0
  654. package/dist/components/UncontrolledInput/UncontrolledInput.messages.js.map +1 -0
  655. package/dist/components/UncontrolledInput/index.d.ts +2 -0
  656. package/dist/components/UncontrolledInput/index.js +2 -0
  657. package/dist/components/UnitGrid/UnitGrid.d.ts +56 -0
  658. package/dist/components/UnitGrid/UnitGrid.geometry.d.ts +102 -0
  659. package/dist/components/UnitGrid/UnitGrid.geometry.js +172 -0
  660. package/dist/components/UnitGrid/UnitGrid.geometry.js.map +1 -0
  661. package/dist/components/UnitGrid/UnitGrid.messages.d.ts +14 -0
  662. package/dist/components/UnitGrid/UnitGrid.messages.js +20 -0
  663. package/dist/components/UnitGrid/UnitGrid.messages.js.map +1 -0
  664. package/dist/components/UnitGrid/UnitGrid2.js +393 -0
  665. package/dist/components/UnitGrid/UnitGrid2.js.map +1 -0
  666. package/dist/components/UnitGrid/UnitGridSkeleton.d.ts +9 -0
  667. package/dist/components/UnitGrid/UnitGridSkeleton.js +73 -0
  668. package/dist/components/UnitGrid/UnitGridSkeleton.js.map +1 -0
  669. package/dist/components/UnitGrid/index.d.ts +4 -0
  670. package/dist/components/UnitGrid/index.js +3 -0
  671. package/dist/forks/ComplexSelector/ComplexSelector.d.ts +144 -0
  672. package/dist/forks/ComplexSelector/ComplexSelector.js +157 -0
  673. package/dist/forks/ComplexSelector/ComplexSelector.js.map +1 -0
  674. package/dist/forks/ComplexSelector/ComplexSelector.styles.d.ts +125 -0
  675. package/dist/forks/ComplexSelector/ComplexSelector.styles.js +129 -0
  676. package/dist/forks/ComplexSelector/ComplexSelector.styles.js.map +1 -0
  677. package/dist/forks/ComplexSelector/index.d.ts +7 -0
  678. package/dist/forks/ComplexSelector/index.js +2 -0
  679. package/dist/forks/Drawer/Drawer.d.ts +98 -0
  680. package/dist/forks/Drawer/Drawer.js +94 -0
  681. package/dist/forks/Drawer/Drawer.js.map +1 -0
  682. package/dist/forks/Drawer/Drawer.styles.d.ts +99 -0
  683. package/dist/forks/Drawer/Drawer.styles.js +94 -0
  684. package/dist/forks/Drawer/Drawer.styles.js.map +1 -0
  685. package/dist/forks/Drawer/index.d.ts +6 -0
  686. package/dist/forks/Drawer/index.js +2 -0
  687. package/dist/forks/Drawer/useDrawerDialogPresence.d.ts +19 -0
  688. package/dist/forks/Drawer/useDrawerDialogPresence.js +62 -0
  689. package/dist/forks/Drawer/useDrawerDialogPresence.js.map +1 -0
  690. package/dist/forks/Tour/Tour.d.ts +58 -0
  691. package/dist/forks/Tour/Tour.js +55 -0
  692. package/dist/forks/Tour/Tour.js.map +1 -0
  693. package/dist/forks/Tour/TourContext.d.ts +37 -0
  694. package/dist/forks/Tour/TourContext.js +8 -0
  695. package/dist/forks/Tour/TourContext.js.map +1 -0
  696. package/dist/forks/Tour/TourStep.d.ts +43 -0
  697. package/dist/forks/Tour/TourStep.js +134 -0
  698. package/dist/forks/Tour/TourStep.js.map +1 -0
  699. package/dist/forks/Tour/TourStep.styles.d.ts +23 -0
  700. package/dist/forks/Tour/TourStep.styles.js +28 -0
  701. package/dist/forks/Tour/TourStep.styles.js.map +1 -0
  702. package/dist/forks/Tour/index.d.ts +11 -0
  703. package/dist/forks/Tour/index.js +4 -0
  704. package/dist/forks/Tour/useTour.d.ts +26 -0
  705. package/dist/forks/Tour/useTour.js +20 -0
  706. package/dist/forks/Tour/useTour.js.map +1 -0
  707. package/dist/forks/compiled.d.ts +5 -0
  708. package/dist/forks/compiled.js +8 -0
  709. package/dist/forks/compiled.js.map +1 -0
  710. package/dist/i18n/catalog.d.ts +12 -0
  711. package/dist/i18n/catalog.js +46 -0
  712. package/dist/i18n/catalog.js.map +1 -0
  713. package/dist/i18n/common.messages.d.ts +31 -0
  714. package/dist/i18n/common.messages.js +32 -0
  715. package/dist/i18n/common.messages.js.map +1 -0
  716. package/dist/i18n/index.d.ts +21 -0
  717. package/dist/i18n/index.js +3 -0
  718. package/dist/i18n/locales/de-DE.js +331 -0
  719. package/dist/i18n/locales/de-DE.js.map +1 -0
  720. package/dist/i18n/locales/el-GR.js +331 -0
  721. package/dist/i18n/locales/el-GR.js.map +1 -0
  722. package/dist/i18n/locales/es-ES.js +331 -0
  723. package/dist/i18n/locales/es-ES.js.map +1 -0
  724. package/dist/i18n/locales/fi-FI.js +331 -0
  725. package/dist/i18n/locales/fi-FI.js.map +1 -0
  726. package/dist/i18n/locales/fr-FR.js +331 -0
  727. package/dist/i18n/locales/fr-FR.js.map +1 -0
  728. package/dist/i18n/locales/id-ID.js +331 -0
  729. package/dist/i18n/locales/id-ID.js.map +1 -0
  730. package/dist/i18n/locales/it-IT.js +331 -0
  731. package/dist/i18n/locales/it-IT.js.map +1 -0
  732. package/dist/i18n/locales/ja-JP.js +351 -0
  733. package/dist/i18n/locales/ja-JP.js.map +1 -0
  734. package/dist/i18n/locales/ko-KR.js +351 -0
  735. package/dist/i18n/locales/ko-KR.js.map +1 -0
  736. package/dist/i18n/locales/mn-MN.js +327 -0
  737. package/dist/i18n/locales/mn-MN.js.map +1 -0
  738. package/dist/i18n/locales/ms-MY.js +331 -0
  739. package/dist/i18n/locales/ms-MY.js.map +1 -0
  740. package/dist/i18n/locales/pl-PL.js +331 -0
  741. package/dist/i18n/locales/pl-PL.js.map +1 -0
  742. package/dist/i18n/locales/pt-BR.js +331 -0
  743. package/dist/i18n/locales/pt-BR.js.map +1 -0
  744. package/dist/i18n/locales/pt-PT.js +331 -0
  745. package/dist/i18n/locales/pt-PT.js.map +1 -0
  746. package/dist/i18n/locales/ru-RU.js +331 -0
  747. package/dist/i18n/locales/ru-RU.js.map +1 -0
  748. package/dist/i18n/locales/th-TH.js +331 -0
  749. package/dist/i18n/locales/th-TH.js.map +1 -0
  750. package/dist/i18n/locales/tr-TR.js +331 -0
  751. package/dist/i18n/locales/tr-TR.js.map +1 -0
  752. package/dist/i18n/locales/vi-VN.js +331 -0
  753. package/dist/i18n/locales/vi-VN.js.map +1 -0
  754. package/dist/i18n/locales/zh-CN.js +331 -0
  755. package/dist/i18n/locales/zh-CN.js.map +1 -0
  756. package/dist/i18n/locales/zh-TW.js +331 -0
  757. package/dist/i18n/locales/zh-TW.js.map +1 -0
  758. package/dist/i18n/messages.d.ts +13 -0
  759. package/dist/i18n/messages.js +63 -0
  760. package/dist/i18n/messages.js.map +1 -0
  761. package/dist/i18n/translateWithNodes.d.ts +3 -0
  762. package/dist/i18n/translateWithNodes.js +14 -0
  763. package/dist/i18n/translateWithNodes.js.map +1 -0
  764. package/dist/i18n/useUicTranslator.d.ts +5 -0
  765. package/dist/i18n/useUicTranslator.js +38 -0
  766. package/dist/i18n/useUicTranslator.js.map +1 -0
  767. package/dist/index.d.ts +101 -27
  768. package/dist/index.js +63 -23
  769. package/dist/instance.d.ts +31 -0
  770. package/dist/instance.js +33 -0
  771. package/dist/instance.js.map +1 -0
  772. package/dist/legacy-tokens.css +177 -0
  773. package/dist/locales/af-ZA.json +954 -0
  774. package/dist/locales/ar-SA.json +994 -0
  775. package/dist/locales/ca-ES.json +970 -0
  776. package/dist/locales/cs-CZ.json +986 -0
  777. package/dist/locales/da-DK.json +962 -0
  778. package/dist/locales/de-DE.json +962 -0
  779. package/dist/locales/el-GR.json +986 -0
  780. package/dist/locales/en.json +1482 -0
  781. package/dist/locales/es-ES.json +974 -0
  782. package/dist/locales/fi-FI.json +986 -0
  783. package/dist/locales/fr-FR.json +950 -0
  784. package/dist/locales/he-IL.json +986 -0
  785. package/dist/locales/hu-HU.json +986 -0
  786. package/dist/locales/it-IT.json +974 -0
  787. package/dist/locales/ja-JP.json +994 -0
  788. package/dist/locales/ko-KR.json +986 -0
  789. package/dist/locales/nl-NL.json +950 -0
  790. package/dist/locales/no-NO.json +974 -0
  791. package/dist/locales/pl-PL.json +978 -0
  792. package/dist/locales/pseudo.json +1112 -0
  793. package/dist/locales/pt-BR.json +978 -0
  794. package/dist/locales/pt-PT.json +978 -0
  795. package/dist/locales/ro-RO.json +978 -0
  796. package/dist/locales/ru-RU.json +986 -0
  797. package/dist/locales/sr-SP.json +986 -0
  798. package/dist/locales/sv-SE.json +982 -0
  799. package/dist/locales/tr-TR.json +986 -0
  800. package/dist/locales/uk-UA.json +986 -0
  801. package/dist/locales/vi-VN.json +982 -0
  802. package/dist/locales/zh-CN.json +994 -0
  803. package/dist/locales/zh-TW.json +994 -0
  804. package/dist/styles/base.css +24 -2
  805. package/dist/styles/themes/orange-dark.css +4 -0
  806. package/dist/styles/themes/orange-light.css +4 -0
  807. package/dist/theme/lablup/built/lablup.d.ts +13 -0
  808. package/dist/theme/lablup/built/lablup.js +567 -0
  809. package/dist/theme/lablup/built/lablup.variants.d.ts +16 -0
  810. package/dist/theme/lablup/built/theme.css +716 -0
  811. package/dist/theme/lablup/index.d.ts +9 -0
  812. package/dist/theme/lablup/index.js +2 -0
  813. package/dist/theme/lablup/lablupTheme.d.ts +10 -0
  814. package/dist/theme/lablup/lablupTheme.js +21 -0
  815. package/dist/theme/lablup/lablupTheme.js.map +1 -0
  816. package/dist/ui-common-locales/de-DE.json +326 -0
  817. package/dist/ui-common-locales/el-GR.json +326 -0
  818. package/dist/ui-common-locales/en.json +346 -0
  819. package/dist/ui-common-locales/es-ES.json +326 -0
  820. package/dist/ui-common-locales/fi-FI.json +326 -0
  821. package/dist/ui-common-locales/fr-FR.json +326 -0
  822. package/dist/ui-common-locales/id-ID.json +326 -0
  823. package/dist/ui-common-locales/it-IT.json +326 -0
  824. package/dist/ui-common-locales/ja-JP.json +346 -0
  825. package/dist/ui-common-locales/ko-KR.json +346 -0
  826. package/dist/ui-common-locales/mn-MN.json +322 -0
  827. package/dist/ui-common-locales/ms-MY.json +326 -0
  828. package/dist/ui-common-locales/pl-PL.json +326 -0
  829. package/dist/ui-common-locales/pt-BR.json +326 -0
  830. package/dist/ui-common-locales/pt-PT.json +326 -0
  831. package/dist/ui-common-locales/ru-RU.json +326 -0
  832. package/dist/ui-common-locales/th-TH.json +326 -0
  833. package/dist/ui-common-locales/tr-TR.json +326 -0
  834. package/dist/ui-common-locales/vi-VN.json +326 -0
  835. package/dist/ui-common-locales/zh-CN.json +326 -0
  836. package/dist/ui-common-locales/zh-TW.json +326 -0
  837. package/dist/ui-common.css +51 -0
  838. package/exports.customs.json +62 -0
  839. package/exports.exclude.json +47 -0
  840. package/package.json +565 -21
  841. package/dist/assets/components/Badge/Badge.css +0 -1
  842. package/dist/assets/components/BaseCard/BaseCard.css +0 -1
  843. package/dist/assets/components/Button/Button.css +0 -1
  844. package/dist/assets/components/DataTable/DataTable.css +0 -1
  845. package/dist/assets/components/Drawer/Drawer.css +0 -1
  846. package/dist/assets/components/EmptyState/EmptyState.css +0 -1
  847. package/dist/assets/components/ProgressBar/ProgressBar.css +0 -1
  848. package/dist/assets/components/Skeleton/Skeleton.css +0 -1
  849. package/dist/assets/components/StatusTag/StatusTag.css +0 -1
  850. package/dist/assets/components/Tabs/Tabs.css +0 -1
  851. package/dist/assets/components/Tooltip/Tooltip.css +0 -1
  852. package/dist/components/Badge/Badge.d.ts +0 -7
  853. package/dist/components/Badge/Badge2.js +0 -20
  854. package/dist/components/Badge/Badge2.js.map +0 -1
  855. package/dist/components/Badge/index.d.ts +0 -2
  856. package/dist/components/Badge/index.js +0 -2
  857. package/dist/components/BaseCard/BaseCard.d.ts +0 -57
  858. package/dist/components/BaseCard/BaseCard2.js +0 -37
  859. package/dist/components/BaseCard/BaseCard2.js.map +0 -1
  860. package/dist/components/BaseCard/index.d.ts +0 -2
  861. package/dist/components/BaseCard/index.js +0 -2
  862. package/dist/components/Button/Button.d.ts +0 -54
  863. package/dist/components/Button/Button2.js +0 -75
  864. package/dist/components/Button/Button2.js.map +0 -1
  865. package/dist/components/Button/index.d.ts +0 -5
  866. package/dist/components/Button/index.js +0 -2
  867. package/dist/components/DataTable/DataTable.d.ts +0 -144
  868. package/dist/components/DataTable/DataTable2.js +0 -244
  869. package/dist/components/DataTable/DataTable2.js.map +0 -1
  870. package/dist/components/DataTable/index.d.ts +0 -2
  871. package/dist/components/DataTable/index.js +0 -2
  872. package/dist/components/Drawer/Drawer.d.ts +0 -25
  873. package/dist/components/Drawer/Drawer2.js +0 -107
  874. package/dist/components/Drawer/Drawer2.js.map +0 -1
  875. package/dist/components/Drawer/index.d.ts +0 -2
  876. package/dist/components/Drawer/index.js +0 -2
  877. package/dist/components/EmptyState/EmptyState.d.ts +0 -52
  878. package/dist/components/EmptyState/EmptyState.example.d.ts +0 -8
  879. package/dist/components/EmptyState/EmptyState2.js +0 -62
  880. package/dist/components/EmptyState/EmptyState2.js.map +0 -1
  881. package/dist/components/EmptyState/index.d.ts +0 -10
  882. package/dist/components/EmptyState/index.js +0 -2
  883. package/dist/components/ProgressBar/ProgressBar.d.ts +0 -22
  884. package/dist/components/ProgressBar/ProgressBar2.js +0 -37
  885. package/dist/components/ProgressBar/ProgressBar2.js.map +0 -1
  886. package/dist/components/ProgressBar/index.d.ts +0 -2
  887. package/dist/components/ProgressBar/index.js +0 -2
  888. package/dist/components/Skeleton/Skeleton.d.ts +0 -25
  889. package/dist/components/Skeleton/Skeleton2.js +0 -27
  890. package/dist/components/Skeleton/Skeleton2.js.map +0 -1
  891. package/dist/components/StatusTag/StatusTag.d.ts +0 -38
  892. package/dist/components/StatusTag/StatusTag2.js +0 -45
  893. package/dist/components/StatusTag/StatusTag2.js.map +0 -1
  894. package/dist/components/StatusTag/index.d.ts +0 -2
  895. package/dist/components/StatusTag/index.js +0 -2
  896. package/dist/components/Tabs/Tabs.d.ts +0 -94
  897. package/dist/components/Tabs/Tabs2.js +0 -412
  898. package/dist/components/Tabs/Tabs2.js.map +0 -1
  899. package/dist/components/Tabs/index.d.ts +0 -2
  900. package/dist/components/Tabs/index.js +0 -2
  901. package/dist/components/Tooltip/Tooltip.d.ts +0 -16
  902. package/dist/components/Tooltip/Tooltip2.js +0 -68
  903. package/dist/components/Tooltip/Tooltip2.js.map +0 -1
  904. package/dist/components/Tooltip/index.d.ts +0 -2
  905. package/dist/components/Tooltip/index.js +0 -2
  906. package/dist/hooks/index.js +0 -2
  907. package/dist/icons/AlertCircleIcon.d.ts +0 -11
  908. package/dist/icons/AlertCircleIcon.js +0 -26
  909. package/dist/icons/AlertCircleIcon.js.map +0 -1
@@ -1,13 +1,7 @@
1
1
  import { ReactNode } from 'react';
2
2
  /**
3
- * How the error reads, not what it is about.
4
- *
5
- * This prop used to be a union of five names: network, configuration, model,
6
- * permission, generic. Two of those, and "model" in particular, are one
7
- * product's categories rather than anything a shared component can reason
8
- * about, and all five resolved to three colours anyway: network and permission
9
- * were the same amber, model and generic the same red. A consumer decides
10
- * which of its own error categories reads as which tone.
3
+ * How the error reads, not what it is about. A consumer maps its own error
4
+ * categories onto these three.
11
5
  */
12
6
  export type ErrorTone = "danger" | "warning" | "accent";
13
7
  export interface ErrorAction {
@@ -17,22 +11,19 @@ export interface ErrorAction {
17
11
  export interface ErrorStateProps {
18
12
  /** How the error reads. Defaults to `danger`. */
19
13
  tone?: ErrorTone;
20
- /** Replaces the default alert icon. */
14
+ /** Replaces the default icon (Astryx's `error` glyph). */
21
15
  icon?: ReactNode;
22
- /** Error title - main heading */
16
+ /** Error title, the region's heading */
23
17
  title: string;
24
18
  /** Detailed error message */
25
19
  message: string;
26
- /** Primary action button (e.g., Retry, Go to Settings) */
20
+ /** Primary action button (e.g. Retry, Go to settings) */
27
21
  primaryAction?: ErrorAction;
28
- /** Secondary action button (e.g., View Logs, Report Issue) */
22
+ /** Secondary action button (e.g. View logs, Report issue) */
29
23
  secondaryAction?: ErrorAction;
30
24
  /** Additional CSS classes */
31
25
  className?: string;
32
- /** Whether to show error icon */
26
+ /** Whether to show the icon. Default: true */
33
27
  showIcon?: boolean;
34
28
  }
35
- /**
36
- * ErrorState Component
37
- */
38
29
  export declare function ErrorState({ tone, icon, title, message, primaryAction, secondaryAction, className, showIcon, }: ErrorStateProps): import("react").JSX.Element;
@@ -1,56 +1,56 @@
1
- import { Button as e } from "../Button/Button2.js";
2
- import { AlertCircleIcon as t } from "../../icons/AlertCircleIcon.js";
3
1
  /* empty css */
4
- import { useCallback as n } from "react";
2
+ import { Button as e } from "@astryxdesign/core/Button";
3
+ import { Heading as t } from "@astryxdesign/core/Heading";
4
+ import { Text as n } from "@astryxdesign/core/Text";
5
5
  import { jsx as r, jsxs as i } from "react/jsx-runtime";
6
+ import { Icon as a } from "@astryxdesign/core/Icon";
6
7
  //#region src/components/ErrorState/ErrorState.tsx
7
- function a({ tone: a = "danger", icon: o, title: s, message: c, primaryAction: l, secondaryAction: u, className: d = "", showIcon: f = !0 }) {
8
- let p = n(() => {
9
- l?.onClick();
10
- }, [l]), m = n(() => {
11
- u?.onClick();
12
- }, [u]), h = [
13
- "error-state",
14
- `error-state--${a}`,
15
- d
8
+ function o({ tone: o = "danger", icon: s, title: c, message: l, primaryAction: u, secondaryAction: d, className: f = "", showIcon: p = !0 }) {
9
+ let m = [
10
+ "uic-error-state",
11
+ `uic-error-state--${o}`,
12
+ f
16
13
  ].filter(Boolean).join(" ");
17
14
  return /* @__PURE__ */ i("div", {
18
- className: h,
15
+ className: m,
19
16
  role: "alert",
20
17
  "aria-live": "polite",
21
18
  children: [
22
- f && /* @__PURE__ */ r("div", {
23
- className: "error-state__icon",
19
+ p && /* @__PURE__ */ r("div", {
20
+ className: "uic-error-state__icon",
24
21
  "aria-hidden": "true",
25
- children: o ?? /* @__PURE__ */ r(t, { size: 48 })
22
+ children: s ?? /* @__PURE__ */ r(a, { icon: "error" })
26
23
  }),
27
- /* @__PURE__ */ r("h2", {
28
- className: "error-state__title",
29
- children: s
30
- }),
31
- /* @__PURE__ */ r("p", {
32
- className: "error-state__message",
24
+ /* @__PURE__ */ r(t, {
25
+ level: 2,
26
+ className: "uic-error-state__title",
33
27
  children: c
34
28
  }),
35
- (l || u) && /* @__PURE__ */ i("div", {
36
- className: "error-state__actions",
37
- children: [l && /* @__PURE__ */ r(e, {
29
+ /* @__PURE__ */ r(n, {
30
+ as: "p",
31
+ color: "secondary",
32
+ className: "uic-error-state__message",
33
+ children: l
34
+ }),
35
+ (u || d) && /* @__PURE__ */ i("div", {
36
+ className: "uic-error-state__actions",
37
+ children: [u && /* @__PURE__ */ r(e, {
38
38
  variant: "primary",
39
- onClick: p,
40
- className: "error-state__action-btn error-state__action-btn--primary",
41
- children: l.label
42
- }), u && /* @__PURE__ */ r(e, {
39
+ label: u.label,
40
+ onClick: () => u.onClick(),
41
+ className: "uic-error-state__action uic-error-state__action--primary"
42
+ }), d && /* @__PURE__ */ r(e, {
43
43
  variant: "secondary",
44
- onClick: m,
45
- className: "error-state__action-btn error-state__action-btn--secondary",
46
- children: u.label
44
+ label: d.label,
45
+ onClick: () => d.onClick(),
46
+ className: "uic-error-state__action uic-error-state__action--secondary"
47
47
  })]
48
48
  })
49
49
  ]
50
50
  });
51
51
  }
52
52
  //#endregion
53
- export { a as ErrorState };
53
+ export { o as ErrorState };
54
54
 
55
55
  //# sourceMappingURL=ErrorState2.js.map
56
56
  import "../../assets/components/ErrorState/ErrorState.css";
@@ -1 +1 @@
1
- {"version":3,"file":"ErrorState2.js","names":[],"sources":["../../../src/components/ErrorState/ErrorState.tsx"],"sourcesContent":["/**\n * ErrorState Component\n *\n * Unified error state component with recovery actions.\n * Provides consistent error presentation across all pages with actionable buttons.\n *\n * Features:\n * - Three visual tones\n * - Primary and secondary action buttons\n * - Accessible (ARIA attributes, focus management)\n * - Dark/light theme support\n */\n\nimport type { ReactNode } from \"react\";\nimport { useCallback } from \"react\";\nimport { AlertCircleIcon } from \"../../icons/AlertCircleIcon\";\nimport { Button } from \"../Button\";\nimport \"./ErrorState.css\";\n\n/**\n * How the error reads, not what it is about.\n *\n * This prop used to be a union of five names: network, configuration, model,\n * permission, generic. Two of those, and \"model\" in particular, are one\n * product's categories rather than anything a shared component can reason\n * about, and all five resolved to three colours anyway: network and permission\n * were the same amber, model and generic the same red. A consumer decides\n * which of its own error categories reads as which tone.\n */\nexport type ErrorTone = \"danger\" | \"warning\" | \"accent\";\n\nexport interface ErrorAction {\n label: string;\n onClick: () => void;\n}\n\nexport interface ErrorStateProps {\n /** How the error reads. Defaults to `danger`. */\n tone?: ErrorTone;\n /** Replaces the default alert icon. */\n icon?: ReactNode;\n /** Error title - main heading */\n title: string;\n /** Detailed error message */\n message: string;\n /** Primary action button (e.g., Retry, Go to Settings) */\n primaryAction?: ErrorAction;\n /** Secondary action button (e.g., View Logs, Report Issue) */\n secondaryAction?: ErrorAction;\n /** Additional CSS classes */\n className?: string;\n /** Whether to show error icon */\n showIcon?: boolean;\n}\n\n/**\n * ErrorState Component\n */\nexport function ErrorState({\n tone = \"danger\",\n icon,\n title,\n message,\n primaryAction,\n secondaryAction,\n className = \"\",\n showIcon = true,\n}: ErrorStateProps) {\n const handlePrimaryAction = useCallback(() => {\n primaryAction?.onClick();\n }, [primaryAction]);\n\n const handleSecondaryAction = useCallback(() => {\n secondaryAction?.onClick();\n }, [secondaryAction]);\n\n const containerClass = [\"error-state\", `error-state--${tone}`, className]\n .filter(Boolean)\n .join(\" \");\n\n return (\n <div className={containerClass} role=\"alert\" aria-live=\"polite\">\n {showIcon && (\n <div className=\"error-state__icon\" aria-hidden=\"true\">\n {icon ?? <AlertCircleIcon size={48} />}\n </div>\n )}\n\n <h2 className=\"error-state__title\">{title}</h2>\n\n <p className=\"error-state__message\">{message}</p>\n\n {(primaryAction || secondaryAction) && (\n <div className=\"error-state__actions\">\n {primaryAction && (\n <Button\n variant=\"primary\"\n onClick={handlePrimaryAction}\n className=\"error-state__action-btn error-state__action-btn--primary\"\n >\n {primaryAction.label}\n </Button>\n )}\n\n {secondaryAction && (\n <Button\n variant=\"secondary\"\n onClick={handleSecondaryAction}\n className=\"error-state__action-btn error-state__action-btn--secondary\"\n >\n {secondaryAction.label}\n </Button>\n )}\n </div>\n )}\n </div>\n );\n}\n"],"mappings":";;;;;;AA0DA,SAAgB,EAAW,EACzB,UAAO,UACP,SACA,UACA,YACA,kBACA,oBACA,eAAY,IACZ,cAAW,MACO;CAClB,IAAM,IAAsB,QAAkB;EAC5C,GAAe,QAAQ;CACzB,GAAG,CAAC,CAAa,CAAC,GAEZ,IAAwB,QAAkB;EAC9C,GAAiB,QAAQ;CAC3B,GAAG,CAAC,CAAe,CAAC,GAEd,IAAiB;EAAC;EAAe,gBAAgB;EAAQ;CAAS,CAAC,CACtE,OAAO,OAAO,CAAC,CACf,KAAK,GAAG;CAEX,OACE,kBAAC,OAAD;EAAK,WAAW;EAAgB,MAAK;EAAQ,aAAU;EAAvD,UAAA;GACG,KACC,kBAAC,OAAD;IAAK,WAAU;IAAoB,eAAY;IAC5C,UAAA,KAAQ,kBAAC,GAAD,EAAiB,MAAM,GAAK,CAAA;GAClC,CAAA;GAGP,kBAAC,MAAD;IAAI,WAAU;IAAsB,UAAA;GAAU,CAAA;GAE9C,kBAAC,KAAD;IAAG,WAAU;IAAwB,UAAA;GAAW,CAAA;IAE9C,KAAiB,MACjB,kBAAC,OAAD;IAAK,WAAU;IAAf,UAAA,CACG,KACC,kBAAC,GAAD;KACE,SAAQ;KACR,SAAS;KACT,WAAU;KAET,UAAA,EAAc;IACT,CAAA,GAGT,KACC,kBAAC,GAAD;KACE,SAAQ;KACR,SAAS;KACT,WAAU;KAET,UAAA,EAAgB;IACX,CAAA,CAEP;;EAEJ;;AAET"}
1
+ {"version":3,"file":"ErrorState2.js","names":[],"sources":["../../../src/components/ErrorState/ErrorState.tsx"],"sourcesContent":["/**\n * ErrorState\n *\n * A full-area error with a title, a message and up to two recovery actions.\n * Built on Astryx `Icon`, `Heading`, `Text` and `Button`.\n *\n * @example\n * <ErrorState\n * tone=\"warning\"\n * title=\"Connection error\"\n * message=\"Could not reach the server.\"\n * primaryAction={{ label: \"Retry\", onClick: retry }}\n * />\n */\nimport type { ReactNode } from \"react\";\nimport { Button } from \"@astryxdesign/core/Button\";\nimport { Heading } from \"@astryxdesign/core/Heading\";\nimport { Icon } from \"@astryxdesign/core/Icon\";\nimport { Text } from \"@astryxdesign/core/Text\";\n\nimport \"./ErrorState.css\";\n\n/**\n * How the error reads, not what it is about. A consumer maps its own error\n * categories onto these three.\n */\nexport type ErrorTone = \"danger\" | \"warning\" | \"accent\";\n\nexport interface ErrorAction {\n label: string;\n onClick: () => void;\n}\n\nexport interface ErrorStateProps {\n /** How the error reads. Defaults to `danger`. */\n tone?: ErrorTone;\n /** Replaces the default icon (Astryx's `error` glyph). */\n icon?: ReactNode;\n /** Error title, the region's heading */\n title: string;\n /** Detailed error message */\n message: string;\n /** Primary action button (e.g. Retry, Go to settings) */\n primaryAction?: ErrorAction;\n /** Secondary action button (e.g. View logs, Report issue) */\n secondaryAction?: ErrorAction;\n /** Additional CSS classes */\n className?: string;\n /** Whether to show the icon. Default: true */\n showIcon?: boolean;\n}\n\nexport function ErrorState({\n tone = \"danger\",\n icon,\n title,\n message,\n primaryAction,\n secondaryAction,\n className = \"\",\n showIcon = true,\n}: ErrorStateProps) {\n const containerClass = [\"uic-error-state\", `uic-error-state--${tone}`, className]\n .filter(Boolean)\n .join(\" \");\n\n return (\n <div className={containerClass} role=\"alert\" aria-live=\"polite\">\n {showIcon && (\n <div className=\"uic-error-state__icon\" aria-hidden=\"true\">\n {icon ?? <Icon icon=\"error\" />}\n </div>\n )}\n\n <Heading level={2} className=\"uic-error-state__title\">\n {title}\n </Heading>\n\n <Text as=\"p\" color=\"secondary\" className=\"uic-error-state__message\">\n {message}\n </Text>\n\n {(primaryAction || secondaryAction) && (\n <div className=\"uic-error-state__actions\">\n {primaryAction && (\n <Button\n variant=\"primary\"\n label={primaryAction.label}\n onClick={() => primaryAction.onClick()}\n className=\"uic-error-state__action uic-error-state__action--primary\"\n />\n )}\n {secondaryAction && (\n <Button\n variant=\"secondary\"\n label={secondaryAction.label}\n onClick={() => secondaryAction.onClick()}\n className=\"uic-error-state__action uic-error-state__action--secondary\"\n />\n )}\n </div>\n )}\n </div>\n );\n}\n"],"mappings":";;;;;;;AAoDA,SAAgB,EAAW,EACzB,UAAO,UACP,SACA,UACA,YACA,kBACA,oBACA,eAAY,IACZ,cAAW,MACO;CAClB,IAAM,IAAiB;EAAC;EAAmB,oBAAoB;EAAQ;CAAS,CAAC,CAC9E,OAAO,OAAO,CAAC,CACf,KAAK,GAAG;CAEX,OACE,kBAAC,OAAD;EAAK,WAAW;EAAgB,MAAK;EAAQ,aAAU;EAAvD,UAAA;GACG,KACC,kBAAC,OAAD;IAAK,WAAU;IAAwB,eAAY;IAChD,UAAA,KAAQ,kBAAC,GAAD,EAAM,MAAK,QAAS,CAAA;GAC1B,CAAA;GAGP,kBAAC,GAAD;IAAS,OAAO;IAAG,WAAU;IAC1B,UAAA;GACM,CAAA;GAET,kBAAC,GAAD;IAAM,IAAG;IAAI,OAAM;IAAY,WAAU;IACtC,UAAA;GACG,CAAA;IAEJ,KAAiB,MACjB,kBAAC,OAAD;IAAK,WAAU;IAAf,UAAA,CACG,KACC,kBAAC,GAAD;KACE,SAAQ;KACR,OAAO,EAAc;KACrB,eAAe,EAAc,QAAQ;KACrC,WAAU;IACX,CAAA,GAEF,KACC,kBAAC,GAAD;KACE,SAAQ;KACR,OAAO,EAAgB;KACvB,eAAe,EAAgB,QAAQ;KACvC,WAAU;IACX,CAAA,CAEA;;EAEJ;;AAET"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * `Form.ErrorList`: the errors of a list-level rule, which belong to the
3
+ * collection rather than to any row. Uses the item shell's explain classes.
4
+ */
5
+ import * as React from "react";
6
+ export interface ErrorListProps {
7
+ errors?: React.ReactNode[];
8
+ warnings?: React.ReactNode[];
9
+ className?: string;
10
+ style?: React.CSSProperties;
11
+ }
12
+ declare const ErrorList: React.FC<ErrorListProps>;
13
+ export default ErrorList;
@@ -0,0 +1,21 @@
1
+ /* empty css */
2
+ import "react";
3
+ import { jsx as e, jsxs as t } from "react/jsx-runtime";
4
+ //#region src/components/Form/ErrorList.tsx
5
+ var n = ({ errors: n = [], warnings: r = [], className: i, style: a }) => !n.length && !r.length ? null : /* @__PURE__ */ t("div", {
6
+ className: ["uic-form-item__explain", i].filter(Boolean).join(" "),
7
+ role: "alert",
8
+ style: a,
9
+ children: [n.map((t, n) => /* @__PURE__ */ e("div", {
10
+ className: "uic-form-item__explain-error",
11
+ children: t
12
+ }, `e-${n}`)), r.map((t, n) => /* @__PURE__ */ e("div", {
13
+ className: "uic-form-item__explain-warning",
14
+ children: t
15
+ }, `w-${n}`))]
16
+ });
17
+ //#endregion
18
+ export { n as default };
19
+
20
+ //# sourceMappingURL=ErrorList.js.map
21
+ import "../../assets/components/Form/FormItemVisual.css";
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ErrorList.js","names":[],"sources":["../../../src/components/Form/ErrorList.tsx"],"sourcesContent":["/**\n * `Form.ErrorList`: the errors of a list-level rule, which belong to the\n * collection rather than to any row. Uses the item shell's explain classes.\n */\nimport * as React from \"react\";\n\nimport \"./FormItemVisual.css\";\n\nexport interface ErrorListProps {\n errors?: React.ReactNode[];\n warnings?: React.ReactNode[];\n className?: string;\n style?: React.CSSProperties;\n}\n\nconst ErrorList: React.FC<ErrorListProps> = ({\n errors = [],\n warnings = [],\n className,\n style,\n}) => {\n if (!errors.length && !warnings.length) {\n return null;\n }\n return (\n <div\n className={[\"uic-form-item__explain\", className].filter(Boolean).join(\" \")}\n role=\"alert\"\n style={style}\n >\n {errors.map((error, index) => (\n <div key={`e-${index}`} className=\"uic-form-item__explain-error\">\n {error}\n </div>\n ))}\n {warnings.map((warning, index) => (\n <div key={`w-${index}`} className=\"uic-form-item__explain-warning\">\n {warning}\n </div>\n ))}\n </div>\n );\n};\n\nexport default ErrorList;\n"],"mappings":";;;;AAeA,IAAM,KAAuC,EAC3C,YAAS,CAAC,GACV,cAAW,CAAC,GACZ,cACA,eAEI,CAAC,EAAO,UAAU,CAAC,EAAS,SACvB,OAGP,kBAAC,OAAD;CACE,WAAW,CAAC,0BAA0B,CAAS,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG;CACzE,MAAK;CACE;CAHT,UAAA,CAKG,EAAO,KAAK,GAAO,MAClB,kBAAC,OAAD;EAAwB,WAAU;EAC/B,UAAA;CACE,GAFK,KAAK,GAEV,CACN,GACA,EAAS,KAAK,GAAS,MACtB,kBAAC,OAAD;EAAwB,WAAU;EAC/B,UAAA;CACE,GAFK,KAAK,GAEV,CACN,CACE"}
@@ -0,0 +1,88 @@
1
+ import { FieldEntity, InternalFormInstance, InternalValidateOptions, Meta, NotifyInfo, Rule, RuleError, StoreValue } from './interface';
2
+ import { InternalNamePath, NamePath, Store } from './namePath';
3
+ import * as React from "react";
4
+ export interface FieldProps {
5
+ name?: NamePath;
6
+ children?: React.ReactNode | ((control: Record<string, any>, meta: Meta, form: InternalFormInstance) => React.ReactNode);
7
+ rules?: Rule[];
8
+ dependencies?: NamePath[];
9
+ shouldUpdate?: boolean | ((prev: Store, next: Store, info: {
10
+ source?: string;
11
+ }) => boolean);
12
+ initialValue?: any;
13
+ preserve?: boolean;
14
+ trigger?: string;
15
+ validateTrigger?: string | string[] | false;
16
+ validateFirst?: boolean | "parallel";
17
+ valuePropName?: string;
18
+ getValueProps?: (value: StoreValue) => Record<string, unknown>;
19
+ getValueFromEvent?: (...args: any[]) => StoreValue;
20
+ messageVariables?: Record<string, string>;
21
+ isListField?: boolean;
22
+ isList?: boolean;
23
+ onReset?: () => void;
24
+ onMetaChange?: (meta: Meta & {
25
+ destroy?: boolean;
26
+ }) => void;
27
+ }
28
+ interface InternalFieldProps extends Omit<FieldProps, "name"> {
29
+ name?: InternalNamePath;
30
+ fieldContext: InternalFormInstance;
31
+ }
32
+ declare class Field extends React.PureComponent<InternalFieldProps, {
33
+ resetCount: number;
34
+ }> implements FieldEntity {
35
+ static contextType: React.Context<InternalFormInstance>;
36
+ state: {
37
+ resetCount: number;
38
+ };
39
+ private cancelRegisterFunc;
40
+ private mounted;
41
+ /**
42
+ * Kept off React state on purpose: these must be readable synchronously
43
+ * during the same tick they change, before React has re-rendered.
44
+ */
45
+ private touched;
46
+ /** Touched OR validated. Only `dependencies` re-validation consults it. */
47
+ private dirty;
48
+ private validatePromise;
49
+ private errors;
50
+ private warnings;
51
+ private metaCache;
52
+ constructor(props: InternalFieldProps);
53
+ componentDidMount(): void;
54
+ componentWillUnmount(): void;
55
+ private cancelRegister;
56
+ getNamePath: () => InternalNamePath;
57
+ private getRules;
58
+ private reRender;
59
+ /** Remount the child subtree (used on reset so uncontrolled inputs clear). */
60
+ private refresh;
61
+ private triggerMetaEvent;
62
+ onStoreChange: (prevStore: Store, namePathList: InternalNamePath[] | null, info: NotifyInfo) => void;
63
+ validateRules: (options?: InternalValidateOptions) => Promise<RuleError[]>;
64
+ isFieldValidating: () => boolean;
65
+ isFieldTouched: () => boolean;
66
+ isFieldDirty: () => boolean;
67
+ getErrors: () => string[];
68
+ getWarnings: () => string[];
69
+ isListField: () => boolean | undefined;
70
+ isList: () => boolean | undefined;
71
+ isPreserve: () => boolean | undefined;
72
+ getMeta: () => Meta;
73
+ private getValue;
74
+ private getOnlyChild;
75
+ getControlled: (childProps?: Record<string, any>) => Record<string, any>;
76
+ render(): React.JSX.Element;
77
+ }
78
+ /**
79
+ * Normalises `name` and resolves the list/field contexts before handing off
80
+ * to the class. The `key` trick matters: a NON-list field is keyed by its
81
+ * path, so renaming it remounts a clean field instead of carrying the old
82
+ * one's touched/error state onto a different name.
83
+ */
84
+ declare const WrapperField: React.FC<FieldProps & {
85
+ fieldContext?: InternalFormInstance;
86
+ }>;
87
+ export default WrapperField;
88
+ export { Field as InternalField };
@@ -0,0 +1,212 @@
1
+ import { FieldContext as e, HOOK_MARK as t, ListContext as n } from "./context.js";
2
+ import { containsNamePath as r, defaultGetValueFromEvent as i, getNamePath as a, getValue as o, toArray as s } from "./namePath.js";
3
+ import { delayFrame as c } from "./FormStore.js";
4
+ import { validateRules as l } from "./validate.js";
5
+ import { isEqual as u } from "./isEqual.js";
6
+ import * as d from "react";
7
+ import { jsx as f } from "react/jsx-runtime";
8
+ //#region src/components/Form/Field.tsx
9
+ var p = [];
10
+ function m(e, t, n, r, i, a) {
11
+ return typeof e == "function" ? e(t, n, "source" in a ? { source: a.source } : {}) : r !== i;
12
+ }
13
+ var h = class extends d.PureComponent {
14
+ static contextType = e;
15
+ state = { resetCount: 0 };
16
+ cancelRegisterFunc = null;
17
+ mounted = !1;
18
+ touched = !1;
19
+ dirty = !1;
20
+ validatePromise;
21
+ errors = p;
22
+ warnings = p;
23
+ metaCache = null;
24
+ constructor(e) {
25
+ super(e), e.fieldContext && e.fieldContext.getInternalHooks(t)?.initEntityValue(this);
26
+ }
27
+ componentDidMount() {
28
+ let { shouldUpdate: e, fieldContext: n } = this.props;
29
+ if (this.mounted = !0, n) {
30
+ let e = n.getInternalHooks(t);
31
+ this.cancelRegisterFunc = e?.registerField(this) ?? null;
32
+ }
33
+ e === !0 && this.reRender();
34
+ }
35
+ componentWillUnmount() {
36
+ this.cancelRegister(), this.triggerMetaEvent(!0), this.mounted = !1;
37
+ }
38
+ cancelRegister = () => {
39
+ let { preserve: e, isListField: t, name: n } = this.props;
40
+ this.cancelRegisterFunc?.(t, e, a(n)), this.cancelRegisterFunc = null;
41
+ };
42
+ getNamePath = () => {
43
+ let { name: e, fieldContext: t } = this.props, { prefixName: n = [] } = t;
44
+ return e === void 0 ? [] : [...n, ...e];
45
+ };
46
+ getRules = () => {
47
+ let { rules: e = [], fieldContext: t } = this.props;
48
+ return e.map((e) => typeof e == "function" ? e(t) : e);
49
+ };
50
+ reRender() {
51
+ this.mounted && this.forceUpdate();
52
+ }
53
+ refresh = () => {
54
+ this.mounted && this.setState(({ resetCount: e }) => ({ resetCount: e + 1 }));
55
+ };
56
+ triggerMetaEvent = (e) => {
57
+ let { onMetaChange: t } = this.props;
58
+ if (t) {
59
+ let n = {
60
+ ...this.getMeta(),
61
+ destroy: e
62
+ };
63
+ u(this.metaCache, n) || t(n), this.metaCache = n;
64
+ } else this.metaCache = null;
65
+ };
66
+ onStoreChange = (e, t, n) => {
67
+ let { shouldUpdate: i, dependencies: o = [], onReset: s } = this.props, { store: c } = n, l = this.getNamePath(), d = this.getValue(e), f = this.getValue(c), h = t && r(t, l);
68
+ switch (n.type === "valueUpdate" && n.source === "external" && !u(d, f) && (this.touched = !0, this.dirty = !0, this.validatePromise = null, this.errors = p, this.warnings = p, this.triggerMetaEvent()), n.type) {
69
+ case "reset":
70
+ if (!t || h) {
71
+ this.touched = !1, this.dirty = !1, this.validatePromise = void 0, this.errors = p, this.warnings = p, this.triggerMetaEvent(), s?.(), this.refresh();
72
+ return;
73
+ }
74
+ break;
75
+ case "remove":
76
+ if (i && m(i, e, c, d, f, n)) {
77
+ this.reRender();
78
+ return;
79
+ }
80
+ break;
81
+ case "setField": {
82
+ let { data: a } = n;
83
+ if (h) {
84
+ "touched" in a && (this.touched = a.touched), "validating" in a && !("originRCField" in a) && (this.validatePromise = a.validating ? Promise.resolve([]) : null), "errors" in a && (this.errors = a.errors || p), "warnings" in a && (this.warnings = a.warnings || p), this.dirty = !0, this.triggerMetaEvent(), this.reRender();
85
+ return;
86
+ }
87
+ if ("value" in a && r(t, l, !0)) {
88
+ this.reRender();
89
+ return;
90
+ }
91
+ if (i && !l.length && m(i, e, c, d, f, n)) {
92
+ this.reRender();
93
+ return;
94
+ }
95
+ break;
96
+ }
97
+ case "dependenciesUpdate":
98
+ if (o.map(a).some((e) => r(n.relatedFields, e))) {
99
+ this.reRender();
100
+ return;
101
+ }
102
+ break;
103
+ default: if (h || (!o.length || l.length || i) && m(i, e, c, d, f, n)) {
104
+ this.reRender();
105
+ return;
106
+ }
107
+ }
108
+ i === !0 && this.reRender();
109
+ };
110
+ validateRules = (e) => {
111
+ let t = this.getNamePath(), n = this.getValue(), { triggerName: r, validateOnly: i = !1, delayFrame: a } = e || {}, o = Promise.resolve().then(async () => {
112
+ if (!this.mounted) return [];
113
+ let { validateFirst: i = !1, messageVariables: u } = this.props;
114
+ a && await c();
115
+ let d = this.getRules();
116
+ r && (d = d.filter((e) => e).filter((e) => {
117
+ let { validateTrigger: t } = e;
118
+ return !t || s(t).includes(r);
119
+ }));
120
+ let f = l(t, n, d, e?.validateMessages ?? {}, i, u);
121
+ return f.catch((e) => e).then((e = []) => {
122
+ if (this.validatePromise === o) {
123
+ this.validatePromise = null;
124
+ let t = [], n = [];
125
+ e.forEach?.(({ rule: { warningOnly: e }, errors: r = [] }) => {
126
+ e ? n.push(...r) : t.push(...r);
127
+ }), this.errors = t, this.warnings = n, this.triggerMetaEvent(), this.reRender();
128
+ }
129
+ }), f;
130
+ });
131
+ return i ? o : (this.validatePromise = o, this.dirty = !0, this.errors = p, this.warnings = p, this.triggerMetaEvent(), this.reRender(), o);
132
+ };
133
+ isFieldValidating = () => !!this.validatePromise;
134
+ isFieldTouched = () => this.touched;
135
+ isFieldDirty = () => this.dirty || this.props.initialValue !== void 0 ? !0 : this.props.fieldContext.getInternalHooks(t)?.getInitialValue(this.getNamePath()) !== void 0;
136
+ getErrors = () => this.errors;
137
+ getWarnings = () => this.warnings;
138
+ isListField = () => this.props.isListField;
139
+ isList = () => this.props.isList;
140
+ isPreserve = () => this.props.preserve;
141
+ getMeta = () => ({
142
+ touched: this.isFieldTouched(),
143
+ validating: this.isFieldValidating(),
144
+ errors: this.errors,
145
+ warnings: this.warnings,
146
+ name: this.getNamePath(),
147
+ validated: this.validatePromise === null
148
+ });
149
+ getValue = (e) => {
150
+ let { getFieldsValue: t } = this.props.fieldContext;
151
+ return o(e || t(!0), this.getNamePath());
152
+ };
153
+ getOnlyChild = (e) => {
154
+ if (typeof e == "function") {
155
+ let t = this.getMeta();
156
+ return {
157
+ ...this.getOnlyChild(e(this.getControlled(), t, this.props.fieldContext)),
158
+ isFunction: !0
159
+ };
160
+ }
161
+ let t = d.Children.toArray(e);
162
+ return t.length !== 1 || !d.isValidElement(t[0]) ? {
163
+ child: t,
164
+ isFunction: !1
165
+ } : {
166
+ child: t[0],
167
+ isFunction: !1
168
+ };
169
+ };
170
+ getControlled = (e = {}) => {
171
+ let { name: n, trigger: r = "onChange", validateTrigger: a, getValueFromEvent: o, valuePropName: c = "value", getValueProps: l, fieldContext: u } = this.props, d = a === void 0 ? u.validateTrigger : a, f = this.getNamePath(), p = u.getInternalHooks(t)?.dispatch, m = this.getValue(), h = l || ((e) => ({ [c]: e })), g = e[r], _ = n === void 0 ? {} : h(m), v = {
172
+ ...e,
173
+ ..._
174
+ };
175
+ return v[r] = (...e) => {
176
+ this.touched = !0, this.dirty = !0, this.triggerMetaEvent();
177
+ let t = o ? o(...e) : i(c, ...e);
178
+ t !== m && p?.({
179
+ type: "updateValue",
180
+ namePath: f,
181
+ value: t
182
+ }), g?.(...e);
183
+ }, s(d || []).forEach((e) => {
184
+ let t = v[e];
185
+ v[e] = (...n) => {
186
+ t?.(...n);
187
+ let { rules: r } = this.props;
188
+ r && r.length && p?.({
189
+ type: "validateField",
190
+ namePath: f,
191
+ triggerName: e
192
+ });
193
+ };
194
+ }), v;
195
+ };
196
+ render() {
197
+ let { resetCount: e } = this.state, { children: t } = this.props, { child: n, isFunction: r } = this.getOnlyChild(t), i;
198
+ return i = r ? n : d.isValidElement(n) ? d.cloneElement(n, this.getControlled(n.props)) : n, /* @__PURE__ */ f(d.Fragment, { children: i }, e);
199
+ }
200
+ }, g = ({ name: t, ...r }) => {
201
+ let i = d.useContext(e), o = d.useContext(n), s = t === void 0 ? void 0 : a(t), c = r.isListField ?? !!o, l = c ? "keep" : `_${(s || []).join("_")}`;
202
+ return /* @__PURE__ */ f(h, {
203
+ ...r,
204
+ name: s,
205
+ isListField: c,
206
+ fieldContext: r.fieldContext ?? i
207
+ }, l);
208
+ };
209
+ //#endregion
210
+ export { h as InternalField, g as default };
211
+
212
+ //# sourceMappingURL=Field.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Field.js","names":[],"sources":["../../../src/components/Form/Field.tsx"],"sourcesContent":["/**\n * `Field`: the state half of a form item. It renders no DOM of its own: it\n * clones its single child with `value` / `onChange` (or the declared\n * `valuePropName` / `trigger`), owns that field's meta, and decides when to\n * re-render. Everything visual lives in `FormItem`.\n *\n * A class component because the store holds a reference to each mounted field\n * and calls imperative methods on it (`validateRules`, `getMeta`,\n * `onStoreChange`, `isFieldDirty`).\n *\n * The re-render decision in `onStoreChange` matches upstream on purpose:\n * making it more precise changes when a component that reads values during\n * render without subscribing to them updates.\n */\nimport { delayFrame } from \"./FormStore\";\nimport { FieldContext, ListContext, HOOK_MARK, type ListContextValue } from \"./context\";\nimport type {\n FieldEntity,\n InternalFormInstance,\n InternalValidateOptions,\n Meta,\n NotifyInfo,\n Rule,\n RuleError,\n RuleObject,\n StoreValue,\n} from \"./interface\";\nimport {\n containsNamePath,\n defaultGetValueFromEvent,\n getNamePath,\n getValue,\n toArray,\n type InternalNamePath,\n type NamePath,\n type Store,\n} from \"./namePath\";\nimport { validateRules } from \"./validate\";\nimport { isEqual } from \"./isEqual\";\nimport * as React from \"react\";\n\nconst EMPTY_ERRORS: string[] = [];\n\nexport interface FieldProps {\n name?: NamePath;\n children?:\n | React.ReactNode\n | ((\n control: Record<string, any>,\n meta: Meta,\n form: InternalFormInstance,\n ) => React.ReactNode);\n rules?: Rule[];\n dependencies?: NamePath[];\n shouldUpdate?:\n boolean | ((prev: Store, next: Store, info: { source?: string }) => boolean);\n initialValue?: any;\n preserve?: boolean;\n trigger?: string;\n validateTrigger?: string | string[] | false;\n validateFirst?: boolean | \"parallel\";\n valuePropName?: string;\n getValueProps?: (value: StoreValue) => Record<string, unknown>;\n getValueFromEvent?: (...args: any[]) => StoreValue;\n messageVariables?: Record<string, string>;\n isListField?: boolean;\n isList?: boolean;\n onReset?: () => void;\n onMetaChange?: (meta: Meta & { destroy?: boolean }) => void;\n}\n\ninterface InternalFieldProps extends Omit<FieldProps, \"name\"> {\n name?: InternalNamePath;\n fieldContext: InternalFormInstance;\n}\n\nfunction requireUpdate(\n shouldUpdate: FieldProps[\"shouldUpdate\"],\n prev: Store,\n next: Store,\n prevValue: any,\n nextValue: any,\n info: NotifyInfo,\n): boolean {\n if (typeof shouldUpdate === \"function\") {\n // Only a value update carries a `source`; upstream passes `{}` otherwise,\n // and comparators destructure it.\n return shouldUpdate(prev, next, \"source\" in info ? { source: info.source } : {});\n }\n return prevValue !== nextValue;\n}\n\nclass Field\n extends React.PureComponent<InternalFieldProps, { resetCount: number }>\n implements FieldEntity\n{\n static override contextType = FieldContext;\n\n override state = { resetCount: 0 };\n\n private cancelRegisterFunc:\n | ((\n isListField?: boolean,\n preserve?: boolean,\n subNamePath?: InternalNamePath,\n ) => void)\n | null = null;\n\n private mounted = false;\n\n /**\n * Kept off React state on purpose: these must be readable synchronously\n * during the same tick they change, before React has re-rendered.\n */\n private touched = false;\n\n /** Touched OR validated. Only `dependencies` re-validation consults it. */\n private dirty = false;\n\n private validatePromise: Promise<any> | null | undefined;\n\n private errors: string[] = EMPTY_ERRORS;\n\n private warnings: string[] = EMPTY_ERRORS;\n\n private metaCache: (Meta & { destroy?: boolean }) | null = null;\n\n constructor(props: InternalFieldProps) {\n super(props);\n // Write `initialValue` into the store during construction, before the\n // first render reads it — otherwise the control paints empty once.\n if (props.fieldContext) {\n props.fieldContext.getInternalHooks(HOOK_MARK)?.initEntityValue(this);\n }\n }\n\n override componentDidMount() {\n const { shouldUpdate, fieldContext } = this.props;\n this.mounted = true;\n if (fieldContext) {\n const hooks = fieldContext.getInternalHooks(HOOK_MARK);\n this.cancelRegisterFunc = hooks?.registerField(this) ?? null;\n }\n // `shouldUpdate === true` means \"render me again on anything\"; the extra\n // pass makes sure the first paint sees sibling fields that mounted after.\n if (shouldUpdate === true) {\n this.reRender();\n }\n }\n\n override componentWillUnmount() {\n this.cancelRegister();\n this.triggerMetaEvent(true);\n this.mounted = false;\n }\n\n private cancelRegister = () => {\n const { preserve, isListField, name } = this.props;\n this.cancelRegisterFunc?.(isListField, preserve, getNamePath(name));\n this.cancelRegisterFunc = null;\n };\n\n // ================================ Utils =================================\n\n getNamePath = (): InternalNamePath => {\n const { name, fieldContext } = this.props;\n const { prefixName = [] } = fieldContext;\n // `prefixName` is what makes a Form.List child's `name` RELATIVE while\n // its `dependencies` stay absolute.\n return name !== undefined ? [...prefixName, ...name] : [];\n };\n\n private getRules = (): RuleObject[] => {\n const { rules = [], fieldContext } = this.props;\n return rules.map((rule) =>\n typeof rule === \"function\" ? rule(fieldContext) : rule,\n );\n };\n\n private reRender() {\n if (!this.mounted) return;\n this.forceUpdate();\n }\n\n /** Remount the child subtree (used on reset so uncontrolled inputs clear). */\n private refresh = () => {\n if (!this.mounted) return;\n this.setState(({ resetCount }) => ({ resetCount: resetCount + 1 }));\n };\n\n private triggerMetaEvent = (destroy?: boolean) => {\n const { onMetaChange } = this.props;\n if (onMetaChange) {\n const meta = { ...this.getMeta(), destroy };\n if (!isEqual(this.metaCache, meta)) {\n onMetaChange(meta);\n }\n this.metaCache = meta;\n } else {\n this.metaCache = null;\n }\n };\n\n // ========================= Field entity API =============================\n\n onStoreChange = (\n prevStore: Store,\n namePathList: InternalNamePath[] | null,\n info: NotifyInfo,\n ) => {\n const { shouldUpdate, dependencies = [], onReset } = this.props;\n const { store } = info;\n const namePath = this.getNamePath();\n const prevValue = this.getValue(prevStore);\n const curValue = this.getValue(store);\n const namePathMatch = namePathList && containsNamePath(namePathList, namePath);\n\n // `setFieldsValue` is treated as user input: it marks the field touched\n // and clears any error the previous value had produced.\n if (\n info.type === \"valueUpdate\" &&\n info.source === \"external\" &&\n !isEqual(prevValue, curValue)\n ) {\n this.touched = true;\n this.dirty = true;\n this.validatePromise = null;\n this.errors = EMPTY_ERRORS;\n this.warnings = EMPTY_ERRORS;\n this.triggerMetaEvent();\n }\n\n switch (info.type) {\n case \"reset\":\n if (!namePathList || namePathMatch) {\n this.touched = false;\n this.dirty = false;\n this.validatePromise = undefined;\n this.errors = EMPTY_ERRORS;\n this.warnings = EMPTY_ERRORS;\n this.triggerMetaEvent();\n onReset?.();\n this.refresh();\n return;\n }\n break;\n\n case \"remove\": {\n // A `preserve: false` field disappearing can cascade: A hides B hides C.\n if (\n shouldUpdate &&\n requireUpdate(shouldUpdate, prevStore, store, prevValue, curValue, info)\n ) {\n this.reRender();\n return;\n }\n break;\n }\n\n case \"setField\": {\n const { data } = info;\n if (namePathMatch) {\n if (\"touched\" in data) {\n this.touched = data.touched as boolean;\n }\n if (\"validating\" in data && !(\"originRCField\" in data)) {\n this.validatePromise = data.validating ? Promise.resolve([]) : null;\n }\n if (\"errors\" in data) {\n this.errors = data.errors || EMPTY_ERRORS;\n }\n if (\"warnings\" in data) {\n this.warnings = data.warnings || EMPTY_ERRORS;\n }\n this.dirty = true;\n this.triggerMetaEvent();\n this.reRender();\n return;\n }\n if (\"value\" in data && containsNamePath(namePathList, namePath, true)) {\n this.reRender();\n return;\n }\n if (\n shouldUpdate &&\n !namePath.length &&\n requireUpdate(shouldUpdate, prevStore, store, prevValue, curValue, info)\n ) {\n this.reRender();\n return;\n }\n break;\n }\n\n case \"dependenciesUpdate\": {\n const dependencyList = dependencies.map(getNamePath);\n if (\n dependencyList.some((dependency) =>\n containsNamePath(info.relatedFields, dependency),\n )\n ) {\n this.reRender();\n return;\n }\n break;\n }\n\n default:\n // A field re-renders when its own path changed, or — for a field with\n // no `dependencies` shortcut — when `shouldUpdate` says so.\n if (\n namePathMatch ||\n ((!dependencies.length || namePath.length || shouldUpdate) &&\n requireUpdate(shouldUpdate, prevStore, store, prevValue, curValue, info))\n ) {\n this.reRender();\n return;\n }\n break;\n }\n\n if (shouldUpdate === true) {\n this.reRender();\n }\n };\n\n validateRules = (options?: InternalValidateOptions): Promise<RuleError[]> => {\n // Snapshot both, so a `form.setFieldValue` mid-validation cannot swap the\n // value out from under the rules.\n const namePath = this.getNamePath();\n const currentValue = this.getValue();\n const {\n triggerName,\n validateOnly = false,\n delayFrame: showDelayFrame,\n } = options || {};\n\n const rootPromise = Promise.resolve().then(async () => {\n if (!this.mounted) {\n return [] as RuleError[];\n }\n const { validateFirst = false, messageVariables } = this.props;\n\n if (showDelayFrame) {\n await delayFrame();\n }\n\n let filteredRules = this.getRules();\n if (triggerName) {\n filteredRules = filteredRules\n .filter((rule) => rule)\n .filter((rule) => {\n const { validateTrigger } = rule;\n if (!validateTrigger) {\n return true;\n }\n return toArray(validateTrigger).includes(triggerName);\n });\n }\n\n const promise = validateRules(\n namePath,\n currentValue,\n filteredRules,\n options?.validateMessages ?? {},\n validateFirst,\n messageVariables,\n );\n\n promise\n .catch((e) => e)\n .then((ruleErrors: RuleError[] = []) => {\n // Ignore a stale run: only the latest validation may publish.\n if (this.validatePromise === rootPromise) {\n this.validatePromise = null;\n const nextErrors: string[] = [];\n const nextWarnings: string[] = [];\n ruleErrors.forEach?.(({ rule: { warningOnly }, errors = [] }) => {\n if (warningOnly) {\n nextWarnings.push(...errors);\n } else {\n nextErrors.push(...errors);\n }\n });\n this.errors = nextErrors;\n this.warnings = nextWarnings;\n this.triggerMetaEvent();\n this.reRender();\n }\n });\n\n return promise;\n });\n\n if (validateOnly) {\n return rootPromise as Promise<RuleError[]>;\n }\n\n this.validatePromise = rootPromise;\n this.dirty = true;\n this.errors = EMPTY_ERRORS;\n this.warnings = EMPTY_ERRORS;\n this.triggerMetaEvent();\n this.reRender();\n\n return rootPromise as Promise<RuleError[]>;\n };\n\n isFieldValidating = () => !!this.validatePromise;\n\n isFieldTouched = () => this.touched;\n\n isFieldDirty = () => {\n if (this.dirty || this.props.initialValue !== undefined) {\n return true;\n }\n const hooks = this.props.fieldContext.getInternalHooks(HOOK_MARK);\n return hooks?.getInitialValue(this.getNamePath()) !== undefined;\n };\n\n getErrors = () => this.errors;\n\n getWarnings = () => this.warnings;\n\n isListField = () => this.props.isListField;\n\n isList = () => this.props.isList;\n\n isPreserve = () => this.props.preserve;\n\n getMeta = (): Meta => ({\n touched: this.isFieldTouched(),\n validating: this.isFieldValidating(),\n errors: this.errors,\n warnings: this.warnings,\n name: this.getNamePath(),\n validated: this.validatePromise === null,\n });\n\n // ============================ Field control =============================\n\n private getValue = (store?: Store) => {\n const { getFieldsValue } = this.props.fieldContext;\n return getValue(store || getFieldsValue(true), this.getNamePath());\n };\n\n private getOnlyChild = (\n children: InternalFieldProps[\"children\"],\n ): { child: React.ReactNode; isFunction: boolean } => {\n if (typeof children === \"function\") {\n const meta = this.getMeta();\n return {\n ...this.getOnlyChild(\n children(this.getControlled(), meta, this.props.fieldContext),\n ),\n isFunction: true,\n };\n }\n const childList = React.Children.toArray(children);\n if (childList.length !== 1 || !React.isValidElement(childList[0])) {\n return { child: childList, isFunction: false };\n }\n return { child: childList[0], isFunction: false };\n };\n\n getControlled = (childProps: Record<string, any> = {}) => {\n const {\n name,\n trigger = \"onChange\",\n validateTrigger,\n getValueFromEvent,\n valuePropName = \"value\",\n getValueProps,\n fieldContext,\n } = this.props;\n const mergedValidateTrigger =\n validateTrigger !== undefined ? validateTrigger : fieldContext.validateTrigger;\n const namePath = this.getNamePath();\n const dispatch = fieldContext.getInternalHooks(HOOK_MARK)?.dispatch;\n const value = this.getValue();\n const mergedGetValueProps =\n getValueProps || ((val: StoreValue) => ({ [valuePropName]: val }));\n const originTriggerFunc = childProps[trigger];\n // A layout-only Field (no `name`) must not inject `value` into its child.\n const valueProps = name !== undefined ? mergedGetValueProps(value) : {};\n\n const control: Record<string, any> = { ...childProps, ...valueProps };\n\n control[trigger] = (...args: any[]) => {\n this.touched = true;\n this.dirty = true;\n this.triggerMetaEvent();\n const newValue = getValueFromEvent\n ? getValueFromEvent(...args)\n : defaultGetValueFromEvent(valuePropName, ...args);\n if (newValue !== value) {\n dispatch?.({ type: \"updateValue\", namePath, value: newValue });\n }\n originTriggerFunc?.(...args);\n };\n\n toArray(mergedValidateTrigger || []).forEach((triggerName) => {\n const originTrigger = control[triggerName];\n control[triggerName] = (...args: any[]) => {\n originTrigger?.(...args);\n // Read `rules` at call time — a `dependencies`-driven rule swap must\n // take effect immediately, not on the next render.\n const { rules } = this.props;\n if (rules && rules.length) {\n dispatch?.({ type: \"validateField\", namePath, triggerName });\n }\n };\n });\n\n return control;\n };\n\n override render() {\n const { resetCount } = this.state;\n const { children } = this.props;\n const { child, isFunction } = this.getOnlyChild(children);\n\n let returnChildNode: React.ReactNode;\n if (isFunction) {\n returnChildNode = child;\n } else if (React.isValidElement(child)) {\n returnChildNode = React.cloneElement(\n child,\n this.getControlled((child as React.ReactElement<any>).props),\n );\n } else {\n returnChildNode = child;\n }\n\n return <React.Fragment key={resetCount}>{returnChildNode}</React.Fragment>;\n }\n}\n\n/**\n * Normalises `name` and resolves the list/field contexts before handing off\n * to the class. The `key` trick matters: a NON-list field is keyed by its\n * path, so renaming it remounts a clean field instead of carrying the old\n * one's touched/error state onto a different name.\n */\nconst WrapperField: React.FC<FieldProps & { fieldContext?: InternalFormInstance }> = ({\n name,\n ...restProps\n}) => {\n const fieldContext = React.useContext(FieldContext);\n const listContext = React.useContext<ListContextValue | null>(ListContext);\n const namePath = name !== undefined ? getNamePath(name) : undefined;\n const isMergedListField = restProps.isListField ?? !!listContext;\n\n const key = isMergedListField ? \"keep\" : `_${(namePath || []).join(\"_\")}`;\n\n return (\n <Field\n key={key}\n {...restProps}\n name={namePath}\n isListField={isMergedListField}\n fieldContext={restProps.fieldContext ?? fieldContext}\n />\n );\n};\n\nexport default WrapperField;\nexport { Field as InternalField };\n"],"mappings":"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"}
@@ -0,0 +1,70 @@
1
+ import { default as useForm, FormStore } from './FormStore';
2
+ import { FormItemCol, FormLayout, FormSize, RequiredMark } from './context';
3
+ import { Callbacks, FieldData, FormInstance, ValidateMessages } from './interface';
4
+ import { Store } from './namePath';
5
+ import * as React from "react";
6
+ export interface FormProps<Values = any> extends Omit<React.FormHTMLAttributes<HTMLFormElement>, "onSubmit" | "children" | "onChange" | "onReset"> {
7
+ form?: FormInstance<Values>;
8
+ name?: string;
9
+ initialValues?: Store;
10
+ /** `false` drops unmounted fields' values; the default `true` keeps them. */
11
+ preserve?: boolean;
12
+ layout?: FormLayout;
13
+ requiredMark?: RequiredMark;
14
+ disabled?: boolean;
15
+ size?: FormSize;
16
+ labelCol?: FormItemCol;
17
+ wrapperCol?: FormItemCol;
18
+ colon?: boolean;
19
+ labelAlign?: "left" | "right";
20
+ labelWrap?: boolean;
21
+ validateMessages?: ValidateMessages;
22
+ validateTrigger?: string | string[] | false;
23
+ scrollToFirstError?: boolean | Record<string, unknown>;
24
+ clearOnDestroy?: boolean;
25
+ onValuesChange?: Callbacks<Values>["onValuesChange"];
26
+ onFieldsChange?: Callbacks<Values>["onFieldsChange"];
27
+ onFinish?: Callbacks<Values>["onFinish"];
28
+ onFinishFailed?: Callbacks<Values>["onFinishFailed"];
29
+ /** `false` renders no wrapper element at all (context only). */
30
+ component?: React.ComponentType<any> | string | false;
31
+ children?: React.ReactNode;
32
+ }
33
+ /**
34
+ * What `<Form ref>` hands back. `nativeElement` is OPTIONAL on purpose: call
35
+ * sites declare `useRef<FormInstance>(null)`, and a required extra member
36
+ * would make that ref type unassignable to the element's `ref` prop.
37
+ */
38
+ export type FormRef<Values = any> = FormInstance<Values> & {
39
+ nativeElement?: HTMLElement | null;
40
+ };
41
+ /**
42
+ * The ref is declared as `Ref<FormInstance<Values>>`, not `Ref<FormRef<…>>`:
43
+ * call sites write `useRef<FormInstance<MyValues>>(null)`, and inference
44
+ * through the plain generic recovers `Values` from that, where an
45
+ * intersection type does not. The runtime object still carries
46
+ * `nativeElement`, which `FormRef` describes for anyone who wants it.
47
+ */
48
+ declare const Form: <Values = any>(props: FormProps<Values> & {
49
+ ref?: React.Ref<FormInstance<Values>>;
50
+ }) => React.ReactElement;
51
+ export interface FormProviderProps {
52
+ validateMessages?: ValidateMessages;
53
+ onFormChange?: (name: string | undefined, info: {
54
+ changedFields: FieldData[];
55
+ forms: Record<string, FormInstance>;
56
+ }) => void;
57
+ onFormFinish?: (name: string | undefined, info: {
58
+ values: Store;
59
+ forms: Record<string, FormInstance>;
60
+ }) => void;
61
+ children?: React.ReactNode;
62
+ }
63
+ /**
64
+ * Cross-form listener. `onFormChange` is wired to `onFieldsChange`, NOT to
65
+ * `onValuesChange`, so it observes programmatic mutations (`setFieldValue`,
66
+ * `setFieldsValue`, `setFields`) as well as user edits.
67
+ */
68
+ export declare const FormProvider: React.FC<FormProviderProps>;
69
+ export { useForm, FormStore };
70
+ export default Form;