@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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validate.js","names":[],"sources":["../../../src/components/Form/validate.ts"],"sourcesContent":["/**\n * Rule engine: a behavioural port of the slice of async-validator that\n * rc-field-form uses, for the rule keys `required`, `message`, `validator`,\n * `type`, `max`, `min`, `pattern`, `warningOnly` and `whitespace`, and the\n * `type` values `number`, `string`, `email`, `url` and `object`.\n *\n * Two upstream quirks are reproduced on purpose, because the messages users\n * see depend on them:\n *\n * 1. Method dispatch by key shape. async-validator picks its validator from\n * `Object.keys(rule)` minus `message`: exactly `['required']` uses the bare\n * required check, anything else falls through to `rule.type ?? 'string'`\n * (or `'pattern'` for a RegExp `pattern` without a `type`). So `{ max: 64 }`\n * on a non-string value also reports \"is not a valid string\", and\n * `{ pattern, max }` ignores `max`.\n * 2. `message` replaces, and `''` is a message. Once a rule produces an error,\n * a non-null `rule.message` replaces the generated text, so an empty-string\n * message yields an error state without an error line.\n */\nimport type { RuleObject, RuleType, StoreValue, ValidateMessages } from \"./interface\";\nimport type { InternalNamePath } from \"./namePath\";\nimport { toArray } from \"./namePath\";\nimport { isValidElement, cloneElement } from \"react\";\n\n/** Sentinel used when a validator throws synchronously. */\nconst CODE_LOGIC_ERROR = \"CODE_LOGIC_ERROR\";\n\n// ============================ Message formatting ============================\n\nconst formatRegExp = /%[sdj%]/g;\n\n/**\n * async-validator's `format`. Our templates use `${}` placeholders (resolved\n * later by `replaceMessage`), so in practice this only matters for the\n * function-template form that a locale may supply.\n */\nfunction format(template: any, ...args: any[]): any {\n let i = 0;\n const len = args.length;\n if (typeof template === \"function\") {\n return template(...args);\n }\n if (typeof template === \"string\") {\n return template.replace(formatRegExp, (x) => {\n if (x === \"%%\") return \"%\";\n if (i >= len) return x;\n switch (x) {\n case \"%s\":\n return String(args[i++]);\n case \"%d\":\n return String(Number(args[i++]));\n case \"%j\":\n try {\n return JSON.stringify(args[i++]);\n } catch {\n return \"[Circular]\";\n }\n default:\n return x;\n }\n });\n }\n return template;\n}\n\n/** `I'm ${name}` + `{ name: 'bamboo' }` => `I'm bamboo`. `\\${x}` escapes. */\nfunction replaceMessage(template: string, kv: Record<string, any>): string {\n return template.replace(/\\\\?\\$\\{\\w+\\}/g, (str) => {\n if (str.startsWith(\"\\\\\")) {\n return str.slice(1);\n }\n const key = str.slice(2, -1);\n return kv[key];\n });\n}\n\n// ================================ Type checks ===============================\n\n// http://emailregex.com/ — copied verbatim from async-validator so the same\n// addresses pass/fail as before the migration.\nconst EMAIL_PATTERN =\n /^(([^<>()[\\]\\\\.,;:\\s@\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]+\\.)+[a-zA-Z\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]{2,}))$/;\n\nlet urlReg: RegExp | undefined;\n/** Lazily built URL regex (kevva/url-regex), same construction as upstream. */\nfunction getUrlRegex(): RegExp {\n if (urlReg) return urlReg;\n const v4 =\n \"(?:25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]\\\\d|\\\\d)(?:\\\\.(?:25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]\\\\d|\\\\d)){3}\";\n const v6seg = \"[a-fA-F\\\\d]{1,4}\";\n const v6List = [\n `(?:${v6seg}:){7}(?:${v6seg}|:)`,\n `(?:${v6seg}:){6}(?:${v4}|:${v6seg}|:)`,\n `(?:${v6seg}:){5}(?::${v4}|(?::${v6seg}){1,2}|:)`,\n `(?:${v6seg}:){4}(?:(?::${v6seg}){0,1}:${v4}|(?::${v6seg}){1,3}|:)`,\n `(?:${v6seg}:){3}(?:(?::${v6seg}){0,2}:${v4}|(?::${v6seg}){1,4}|:)`,\n `(?:${v6seg}:){2}(?:(?::${v6seg}){0,3}:${v4}|(?::${v6seg}){1,5}|:)`,\n `(?:${v6seg}:){1}(?:(?::${v6seg}){0,4}:${v4}|(?::${v6seg}){1,6}|:)`,\n `(?::(?:(?::${v6seg}){0,5}:${v4}|(?::${v6seg}){1,7}|:))`,\n ];\n const v6 = `(?:${v6List.join(\"|\")})(?:%[0-9a-zA-Z]{1,})?`;\n const protocol = \"(?:(?:[a-z]+:)?//)\";\n const auth = \"(?:\\\\S+(?::\\\\S*)?@)?\";\n const host = \"(?:(?:[a-z\\\\u00a1-\\\\uffff0-9][-_]*)*[a-z\\\\u00a1-\\\\uffff0-9]+)\";\n const domain = \"(?:\\\\.(?:[a-z\\\\u00a1-\\\\uffff0-9]-*)*[a-z\\\\u00a1-\\\\uffff0-9]+)*\";\n const tld = \"(?:\\\\.(?:[a-z\\\\u00a1-\\\\uffff]{2,}))\";\n const port = \"(?::\\\\d{2,5})?\";\n const path = '(?:[/?#][^\\\\s\"]*)?';\n const regex = `(?:${protocol}|www\\\\.)${auth}(?:localhost|${v4}|${v6}|${host}${domain}${tld})${port}${path}`;\n urlReg = new RegExp(`(?:^${regex}$)`, \"i\");\n return urlReg;\n}\n\nconst TYPE_CHECKS: Partial<Record<string, (value: any) => boolean>> = {\n number: (value) => !isNaN(value) && typeof value === \"number\",\n object: (value) => typeof value === \"object\" && !Array.isArray(value),\n email: (value) =>\n typeof value === \"string\" && value.length <= 320 && EMAIL_PATTERN.test(value),\n url: (value) =>\n typeof value === \"string\" && value.length <= 2048 && getUrlRegex().test(value),\n};\n\n/** Types whose \"empty\" notion includes the empty string. */\nfunction isNativeStringType(type?: string) {\n return type === \"string\" || type === \"url\" || type === \"email\" || type === \"pattern\";\n}\n\nfunction isEmptyValue(value: any, type?: string): boolean {\n if (value === undefined || value === null) return true;\n if (type === \"array\" && Array.isArray(value) && !value.length) return true;\n if (isNativeStringType(type) && typeof value === \"string\" && !value) return true;\n return false;\n}\n\n// ============================= Declarative rules ============================\n\n/**\n * `type` widens to `string` here because the dispatcher normalises it the way\n * async-validator does: an absent type becomes `'string'` and a bare RegExp\n * `pattern` becomes `'pattern'` — neither of which is a public `RuleType`.\n */\ntype NormalizedRule = Omit<RuleObject, \"type\"> & { type?: string };\n\ninterface RuleCtx {\n rule: NormalizedRule;\n value: StoreValue;\n name: string;\n messages: ValidateMessages;\n errors: any[];\n}\n\nfunction checkRequired(\n { rule, value, name, messages, errors }: RuleCtx,\n type?: string,\n) {\n if (rule.required && isEmptyValue(value, type || rule.type)) {\n errors.push(format(messages.required, name));\n }\n}\n\nfunction checkType({ rule, value, name, messages, errors }: RuleCtx) {\n if (rule.required && value === undefined) {\n checkRequired({ rule, value, name, messages, errors });\n return;\n }\n const ruleType = rule.type;\n const custom = TYPE_CHECKS[ruleType as string];\n if (custom) {\n if (!custom(value)) {\n errors.push(format(messages.types?.[ruleType as RuleType], name, ruleType));\n }\n } else if (ruleType && typeof value !== ruleType) {\n errors.push(format(messages.types?.[ruleType as RuleType], name, ruleType));\n }\n}\n\n// Surrogate pairs count as one character, matching upstream's `range`.\nconst SP_REGEXP = /[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/g;\n\nfunction checkRange({ rule, value, name, messages, errors }: RuleCtx) {\n const hasMin = typeof rule.min === \"number\";\n const hasMax = typeof rule.max === \"number\";\n let val: number;\n let key: \"number\" | \"string\" | \"array\";\n if (typeof value === \"number\") {\n key = \"number\";\n val = value;\n } else if (typeof value === \"string\") {\n key = \"string\";\n val = value.replace(SP_REGEXP, \"_\").length;\n } else if (Array.isArray(value)) {\n key = \"array\";\n val = value.length;\n } else {\n // Unsupported type for range validation — upstream bails out silently.\n return;\n }\n const section = messages[key] as Record<string, any> | undefined;\n if (hasMin && !hasMax && val < (rule.min as number)) {\n errors.push(format(section?.min, name, rule.min));\n } else if (hasMax && !hasMin && val > (rule.max as number)) {\n errors.push(format(section?.max, name, rule.max));\n } else if (\n hasMin &&\n hasMax &&\n (val < (rule.min as number) || val > (rule.max as number))\n ) {\n errors.push(format(section?.range, name, rule.min, rule.max));\n }\n}\n\nfunction checkPattern({ rule, value, name, messages, errors }: RuleCtx) {\n if (rule.pattern instanceof RegExp) {\n // Reset in case the RegExp carries the `g` flag — a stateful `lastIndex`\n // makes the same rule pass and fail alternately.\n rule.pattern.lastIndex = 0;\n if (!rule.pattern.test(value)) {\n errors.push(format(messages.pattern?.mismatch, name, value, rule.pattern));\n }\n }\n}\n\nfunction checkWhitespace({ value, name, messages, errors }: RuleCtx) {\n if (/^\\s+$/.test(value) || value === \"\") {\n errors.push(format(messages.whitespace, name));\n }\n}\n\n/**\n * Run the declarative validator async-validator would have selected.\n * `ctx.rule.type` is already normalised by the caller.\n */\nfunction runDeclarative(method: string, ctx: RuleCtx) {\n const { rule, value } = ctx;\n switch (method) {\n case \"required\": {\n checkRequired(ctx, Array.isArray(value) ? \"array\" : typeof value);\n return;\n }\n case \"number\": {\n const numeric = { ...ctx, value: value === \"\" ? undefined : value };\n if (isEmptyValue(numeric.value) && !rule.required) return;\n checkRequired(numeric);\n if (numeric.value !== undefined) {\n checkType(numeric);\n checkRange(numeric);\n }\n return;\n }\n case \"object\": {\n if (isEmptyValue(value) && !rule.required) return;\n checkRequired(ctx);\n if (value !== undefined) {\n checkType(ctx);\n }\n return;\n }\n case \"email\":\n case \"url\": {\n if (isEmptyValue(value, method) && !rule.required) return;\n checkRequired(ctx, method);\n if (!isEmptyValue(value, method)) {\n checkType(ctx);\n }\n return;\n }\n case \"pattern\": {\n if (isEmptyValue(value, \"string\") && !rule.required) return;\n checkRequired(ctx);\n if (!isEmptyValue(value, \"string\")) {\n checkPattern(ctx);\n }\n return;\n }\n // 'string' and anything else fall back to the string validator, which is\n // also async-validator's default when no `type` is declared.\n default: {\n if (isEmptyValue(value, \"string\") && !rule.required) return;\n checkRequired(ctx, \"string\");\n if (!isEmptyValue(value, \"string\")) {\n checkType(ctx);\n checkRange(ctx);\n checkPattern(ctx);\n if (rule.whitespace === true) {\n checkWhitespace(ctx);\n }\n }\n }\n }\n}\n\n// ============================= Custom validators ============================\n\n/**\n * Collapse the promise/callback bridge rc-component's `form` builds around a\n * user `validator` into a single promise for the raw \"callback argument\".\n *\n * Net semantics preserved from the two-layer upstream wrapping:\n * resolve() -> no error\n * reject('msg') / Error -> that message\n * reject() -> one error whose text is a single space, i.e.\n * an error STATE with no readable line\n * callback('msg') -> that message, one microtask later\n * synchronous throw -> the generic `default` message\n * A validator that both returns a promise and calls `callback` has its\n * callback ignored, exactly as upstream warns.\n */\nfunction runCustomValidator(rule: RuleObject, value: StoreValue): Promise<any> {\n return new Promise((resolve) => {\n let settled = false;\n let hasPromise = false;\n const finish = (arg: any) => {\n if (settled) return;\n settled = true;\n resolve(arg);\n };\n const userCallback = (...args: any[]) => {\n Promise.resolve().then(() => {\n if (!hasPromise) {\n finish(args.length ? args[0] : undefined);\n }\n });\n };\n let returned: any;\n try {\n returned = rule.validator!(rule, value, userCallback);\n } catch (error) {\n // Upstream logs and converts a thrown validator into the generic\n // `default` message; swallowing it silently would hide real bugs.\n console.error(error);\n finish(CODE_LOGIC_ERROR);\n return;\n }\n hasPromise =\n !!returned &&\n typeof returned.then === \"function\" &&\n typeof returned.catch === \"function\";\n if (hasPromise) {\n returned.then(\n () => finish(undefined),\n (err: any) => finish(err || \" \"),\n );\n }\n });\n}\n\n// ================================ Rule driver ===============================\n\n/** Which async-validator method would handle this rule? */\nfunction pickMethod(rule: RuleObject): string {\n const keys = Object.keys(rule).filter((key) => key !== \"message\");\n if (keys.length === 1 && keys[0] === \"required\") {\n return \"required\";\n }\n if (rule.type === undefined && rule.pattern instanceof RegExp) {\n return \"pattern\";\n }\n return rule.type ?? \"string\";\n}\n\nasync function validateRule(\n name: string,\n value: StoreValue,\n rule: RuleObject,\n messages: ValidateMessages,\n messageVariables?: Record<string, string>,\n): Promise<any[]> {\n let rawErrors: any[] = [];\n // Kept in sync with the declarative branch so `${type}` interpolates the\n // normalised type, not `undefined`, when the rule's type was inferred.\n let effectiveRule: NormalizedRule = rule;\n\n if (rule.validator) {\n const cbArg = await runCustomValidator(rule, value);\n rawErrors = cbArg === undefined ? [] : Array.isArray(cbArg) ? cbArg : [cbArg];\n } else {\n const method = pickMethod(rule);\n // `getType` normalises the rule's own `type` before the validators read\n // it — `undefined` becomes `'string'`, a bare RegExp becomes `'pattern'`.\n effectiveRule = {\n ...rule,\n type: method === \"required\" ? rule.type : method,\n };\n const ctx: RuleCtx = {\n rule: effectiveRule,\n value,\n name,\n messages,\n errors: [],\n };\n runDeclarative(method, ctx);\n rawErrors = ctx.errors;\n }\n\n // A declared `message` replaces the generated text — including `''`.\n if (rawErrors.length && rule.message !== undefined && rule.message !== null) {\n rawErrors = ([] as any[]).concat(rule.message);\n }\n\n const result = rawErrors.map((entry, index) => {\n // Mirrors async-validator's `isErrorObj` + `complementError`: anything\n // carrying a defined `.message` (an `Error`, a rejected object) is read\n // through it; a thunk is invoked; everything else is the message itself.\n const message =\n entry && entry.message !== undefined\n ? entry.message\n : typeof entry === \"function\"\n ? entry()\n : entry;\n const merged = message === CODE_LOGIC_ERROR ? messages.default : message;\n return isValidElement(merged)\n ? cloneElement(merged as any, { key: `error_${index}` })\n : merged;\n });\n\n // `label` falls back to the field's name, so a template never prints\n // `undefined` for a field rendered without a label.\n const kv: Record<string, any> = {\n ...effectiveRule,\n name,\n label: name,\n ...messageVariables,\n };\n return result.map((error) =>\n typeof error === \"string\" ? replaceMessage(error, kv) : error,\n );\n}\n\n/**\n * Validate one field's value against its rules.\n *\n * ALWAYS REJECTS in the default (parallel) mode — with a `RuleError[]` that\n * may well be empty. This is upstream's contract and both `Field` and\n * `FormStore` are written against it: the caller partitions the array into\n * errors and warnings by each rule's `warningOnly`, and an empty array means\n * \"valid\". `validateFirst === true` instead resolves `[]` on success.\n */\nexport function validateRules(\n namePath: InternalNamePath,\n value: StoreValue,\n rules: RuleObject[],\n messages: ValidateMessages,\n validateFirst?: boolean | \"parallel\",\n messageVariables?: Record<string, string>,\n): Promise<{ errors: any[]; rule: RuleObject }[]> {\n const name = namePath.join(\".\");\n\n // Non-warning rules first; ties keep declaration order. This is what makes\n // a hard error win over a `warningOnly` rule on the same field.\n const filledRules = rules\n .map((rule, ruleIndex) => ({ rule, ruleIndex }))\n .sort((a, b) => {\n if (!!a.rule.warningOnly === !!b.rule.warningOnly) {\n return a.ruleIndex - b.ruleIndex;\n }\n return a.rule.warningOnly ? 1 : -1;\n })\n .map(({ rule }) => rule);\n\n let summaryPromise: Promise<{ errors: any[]; rule: RuleObject }[]>;\n\n if (validateFirst === true) {\n summaryPromise = new Promise((resolve, reject) => {\n (async () => {\n for (let i = 0; i < filledRules.length; i += 1) {\n const rule = filledRules[i]!;\n // Serial ON PURPOSE: `validateFirst` means \"stop at the first\n // failing rule\", so the rules must not run in parallel.\n const errors = await validateRule(\n name,\n value,\n rule,\n messages,\n messageVariables,\n );\n if (errors.length) {\n reject([{ errors, rule }]);\n return;\n }\n }\n resolve([]);\n })();\n });\n } else {\n const rulePromises = filledRules.map((rule) =>\n validateRule(name, value, rule, messages, messageVariables).then((errors) => ({\n errors,\n rule,\n })),\n );\n summaryPromise = (\n validateFirst ? finishOnFirstFailed(rulePromises) : Promise.all(rulePromises)\n ).then((errors) => Promise.reject(errors));\n }\n\n // Keep the rejection from surfacing as an unhandled rejection; every real\n // consumer attaches its own handler.\n summaryPromise.catch((e) => e);\n return summaryPromise;\n}\n\nfunction finishOnFirstFailed(\n rulePromises: Promise<{ errors: any[]; rule: RuleObject }>[],\n): Promise<{ errors: any[]; rule: RuleObject }[]> {\n let count = 0;\n return new Promise((resolve) => {\n rulePromises.forEach((promise) => {\n promise.then((ruleError) => {\n if (ruleError.errors.length) {\n resolve([ruleError]);\n }\n count += 1;\n if (count === rulePromises.length) {\n resolve([]);\n }\n });\n });\n });\n}\n\nexport { toArray };\n"],"mappings":";;;AAyBA,IAAM,IAAmB,oBAInB,IAAe;AAOrB,SAAS,EAAO,GAAe,GAAG,GAAkB;CAClD,IAAI,IAAI,GACF,IAAM,EAAK;CAwBjB,OAvBI,OAAO,KAAa,aACf,EAAS,GAAG,CAAI,IAErB,OAAO,KAAa,WACf,EAAS,QAAQ,IAAe,MAAM;EAC3C,IAAI,MAAM,MAAM,OAAO;EACvB,IAAI,KAAK,GAAK,OAAO;EACrB,QAAQ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ltip';
3
+ export interface IconWithTooltipProps extends Omit<TooltipProps, "children" | "anchorRef"> {
4
+ /** The glyph the tooltip is attached to. */
5
+ icon: ReactNode;
6
+ /**
7
+ * `false` renders the trigger as a plain `<span>` (hover only) instead of a
8
+ * focusable `<button>`. @default true
9
+ */
10
+ focusable?: boolean;
11
+ /** Extra class names on the trigger. */
12
+ className?: string;
13
+ /** Inline styles on the trigger. */
14
+ style?: CSSProperties;
15
+ }
16
+ export declare function IconWithTooltip({ icon, focusable, style, className, ...tooltipProps }: IconWithTooltipProps): import("react").JSX.Element;
17
+ export declare namespace IconWithTooltip {
18
+ var displayName: string;
19
+ }
@@ -0,0 +1,38 @@
1
+ import { nodeToAccessibleLabel as e } from "./accessibleLabel.js";
2
+ /* empty css */
3
+ import { Text as t } from "@astryxdesign/core/Text";
4
+ import { jsx as n } from "react/jsx-runtime";
5
+ import { Tooltip as r } from "@astryxdesign/core/Tooltip";
6
+ //#region src/components/IconWithTooltip/IconWithTooltip.tsx
7
+ function i({ icon: i, focusable: a = !0, style: o, className: s, ...c }) {
8
+ let l = e(c.content) || void 0, u = /* @__PURE__ */ n(t, {
9
+ color: "placeholder",
10
+ className: "uic-icon-with-tooltip__icon",
11
+ children: i
12
+ }), d = (e) => [
13
+ "uic-icon-with-tooltip",
14
+ e,
15
+ s
16
+ ].filter(Boolean).join(" ");
17
+ return /* @__PURE__ */ n(r, {
18
+ ...c,
19
+ children: a ? /* @__PURE__ */ n("button", {
20
+ type: "button",
21
+ "aria-label": l,
22
+ className: d("uic-icon-with-tooltip--button"),
23
+ style: o,
24
+ children: u
25
+ }) : /* @__PURE__ */ n("span", {
26
+ "aria-label": l,
27
+ className: d(""),
28
+ style: o,
29
+ children: u
30
+ })
31
+ });
32
+ }
33
+ i.displayName = "IconWithTooltip";
34
+ //#endregion
35
+ export { i as IconWithTooltip };
36
+
37
+ //# sourceMappingURL=IconWithTooltip2.js.map
38
+ import "../../assets/components/IconWithTooltip/IconWithTooltip.css";
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IconWithTooltip2.js","names":[],"sources":["../../../src/components/IconWithTooltip/IconWithTooltip.tsx"],"sourcesContent":["/**\n * IconWithTooltip\n *\n * A glyph that explains itself on hover and focus: any icon (or a status\n * mark) wrapped in an unstyled, focusable button, so the hint is reachable\n * from the keyboard. The button's accessible name is the tooltip's text.\n *\n * `focusable={false}` renders a plain `<span>` instead (hover only), for use\n * inside another interactive element such as a link or an option, where a\n * nested button is invalid.\n *\n * @example\n * <IconWithTooltip icon={<CircleHelp />} content=\"Counts only running sessions.\" />\n */\nimport type { CSSProperties, ReactNode } from \"react\";\nimport { Text } from \"@astryxdesign/core/Text\";\nimport { Tooltip, type TooltipProps } from \"@astryxdesign/core/Tooltip\";\n\nimport { nodeToAccessibleLabel } from \"./accessibleLabel\";\nimport \"./IconWithTooltip.css\";\n\nexport interface IconWithTooltipProps extends Omit<\n TooltipProps,\n \"children\" | \"anchorRef\"\n> {\n /** The glyph the tooltip is attached to. */\n icon: ReactNode;\n /**\n * `false` renders the trigger as a plain `<span>` (hover only) instead of a\n * focusable `<button>`. @default true\n */\n focusable?: boolean;\n /** Extra class names on the trigger. */\n className?: string;\n /** Inline styles on the trigger. */\n style?: CSSProperties;\n}\n\nexport function IconWithTooltip({\n icon,\n focusable = true,\n style,\n className,\n ...tooltipProps\n}: IconWithTooltipProps) {\n const label = nodeToAccessibleLabel(tooltipProps.content) || undefined;\n const iconNode = (\n <Text color=\"placeholder\" className=\"uic-icon-with-tooltip__icon\">\n {icon}\n </Text>\n );\n const triggerClassName = (base: string) =>\n [\"uic-icon-with-tooltip\", base, className].filter(Boolean).join(\" \");\n\n return (\n <Tooltip {...tooltipProps}>\n {focusable ? (\n <button\n type=\"button\"\n aria-label={label}\n className={triggerClassName(\"uic-icon-with-tooltip--button\")}\n style={style}\n >\n {iconNode}\n </button>\n ) : (\n <span aria-label={label} className={triggerClassName(\"\")} style={style}>\n {iconNode}\n </span>\n )}\n </Tooltip>\n );\n}\n\nIconWithTooltip.displayName = \"IconWithTooltip\";\n"],"mappings":";;;;;;AAsCA,SAAgB,EAAgB,EAC9B,SACA,eAAY,IACZ,UACA,cACA,GAAG,KACoB;CACvB,IAAM,IAAQ,EAAsB,EAAa,OAAO,KAAK,KAAA,GACvD,IACJ,kBAAC,GAAD;EAAM,OAAM;EAAc,WAAU;EACjC,UAAA;CACG,CAAA,GAEF,KAAoB,MACxB;EAAC;EAAyB;EAAM;CAAS,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG;CAErE,OACE,kBAAC,GAAD;EAAS,GAAI;EACV,UAAA,IACC,kBAAC,UAAD;GACE,MAAK;GACL,cAAY;GACZ,WAAW,EAAiB,+BAA+B;GACpD;GAEN,UAAA;EACK,CAAA,IAER,kBAAC,QAAD;GAAM,cAAY;GAAO,WAAW,EAAiB,EAAE;GAAU;GAC9D,UAAA;EACG,CAAA;CAED,CAAA;AAEb;AAEA,EAAgB,cAAc"}
@@ -0,0 +1,2 @@
1
+ import { ReactNode } from 'react';
2
+ export declare function nodeToAccessibleLabel(node: ReactNode): string;
@@ -0,0 +1,33 @@
1
+ import { isValidElement as e } from "react";
2
+ //#region src/components/IconWithTooltip/accessibleLabel.ts
3
+ var t = 6;
4
+ function n(r, i, a) {
5
+ if (r != null && typeof r != "boolean") {
6
+ if (typeof r == "string") {
7
+ r.trim() !== "" && a.push(r);
8
+ return;
9
+ }
10
+ if (typeof r == "number") {
11
+ a.push(String(r));
12
+ return;
13
+ }
14
+ if (!(i >= t)) {
15
+ if (Array.isArray(r)) {
16
+ for (let e of r) n(e, i + 1, a);
17
+ return;
18
+ }
19
+ if (e(r)) {
20
+ let e = r.props;
21
+ n(e?.children, i + 1, a);
22
+ }
23
+ }
24
+ }
25
+ }
26
+ function r(e) {
27
+ let t = [];
28
+ return n(e, 0, t), t.join(" ").replace(/\s+/g, " ").trim();
29
+ }
30
+ //#endregion
31
+ export { r as nodeToAccessibleLabel };
32
+
33
+ //# sourceMappingURL=accessibleLabel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accessibleLabel.js","names":[],"sources":["../../../src/components/IconWithTooltip/accessibleLabel.ts"],"sourcesContent":["/**\n * Flattens a `ReactNode` into plain text for an accessible name: string and\n * number leaves, through fragments, arrays and elements' children, joined by\n * a space. A node with no text (an icon alone) yields `\"\"`. Text carried in\n * props rather than children is invisible to the walk.\n *\n * Internal: not exported from the package.\n */\nimport { isValidElement, type ReactNode } from \"react\";\n\nconst MAX_DEPTH = 6;\n\nfunction walk(node: ReactNode, depth: number, out: string[]): void {\n if (node === null || node === undefined || typeof node === \"boolean\") return;\n if (typeof node === \"string\") {\n if (node.trim() !== \"\") out.push(node);\n return;\n }\n if (typeof node === \"number\") {\n out.push(String(node));\n return;\n }\n if (depth >= MAX_DEPTH) return;\n if (Array.isArray(node)) {\n for (const child of node) walk(child as ReactNode, depth + 1, out);\n return;\n }\n if (isValidElement(node)) {\n const props = node.props as { children?: ReactNode } | undefined;\n walk(props?.children, depth + 1, out);\n }\n}\n\nexport function nodeToAccessibleLabel(node: ReactNode): string {\n const out: string[] = [];\n walk(node, 0, out);\n return out.join(\" \").replace(/\\s+/g, \" \").trim();\n}\n"],"mappings":";;AAUA,IAAM,IAAY;AAElB,SAAS,EAAK,GAAiB,GAAe,GAAqB;CAC7D,SAAS,QAA8B,OAAO,KAAS,WAC3D;MAAI,OAAO,KAAS,UAAU;GAC5B,AAAI,EAAK,KAAK,MAAM,MAAI,EAAI,KAAK,CAAI;GACrC;EACF;EACA,IAAI,OAAO,KAAS,UAAU;GAC5B,EAAI,KAAK,OAAO,CAAI,CAAC;GACrB;EACF;EACI,WAAS,IACb;OAAI,MAAM,QAAQ,CAAI,GAAG;IACvB,KAAK,IAAM,KAAS,GAAM,EAAK,GAAoB,IAAQ,GAAG,CAAG;IACjE;GACF;GACA,IAAI,EAAe,CAAI,GAAG;IACxB,IAAM,IAAQ,EAAK;IACnB,EAAK,GAAO,UAAU,IAAQ,GAAG,CAAG;GACtC;EAJA;CATA;AAcF;AAEA,SAAgB,EAAsB,GAAyB;CAC7D,IAAM,IAAgB,CAAC;CAEvB,OADA,EAAK,GAAM,GAAG,CAAG,GACV,EAAI,KAAK,GAAG,CAAC,CAAC,QAAQ,QAAQ,GAAG,CAAC,CAAC,KAAK;AACjD"}
@@ -0,0 +1,2 @@
1
+ export { IconWithTooltip } from './IconWithTooltip';
2
+ export type { IconWithTooltipProps } from './IconWithTooltip';
@@ -0,0 +1,2 @@
1
+ import { IconWithTooltip as e } from "./IconWithTooltip2.js";
2
+ export { e as IconWithTooltip };
@@ -0,0 +1,11 @@
1
+ import { ImgHTMLAttributes, ReactNode } from 'react';
2
+ export interface ImageWithFallbackProps extends Omit<ImgHTMLAttributes<HTMLImageElement>, "onError"> {
3
+ src: string;
4
+ /** Rendered instead of the image once it fails to load. */
5
+ fallbackIcon: ReactNode;
6
+ alt: string;
7
+ }
8
+ export declare function ImageWithFallback({ src, fallbackIcon, alt, ...props }: ImageWithFallbackProps): import("react").JSX.Element;
9
+ export declare namespace ImageWithFallback {
10
+ var displayName: string;
11
+ }
@@ -0,0 +1,28 @@
1
+ /* empty css */
2
+ import { useState as e } from "react";
3
+ import { jsx as t } from "react/jsx-runtime";
4
+ //#region src/components/ImageWithFallback/ImageWithFallback.tsx
5
+ function n({ src: n, fallbackIcon: r, alt: i, ...a }) {
6
+ let [o, s] = e(null);
7
+ return o === n ? i === "" ? /* @__PURE__ */ t("span", {
8
+ className: "uic-image-with-fallback",
9
+ "aria-hidden": "true",
10
+ children: r
11
+ }) : /* @__PURE__ */ t("span", {
12
+ className: "uic-image-with-fallback",
13
+ role: "img",
14
+ "aria-label": i,
15
+ children: r
16
+ }) : /* @__PURE__ */ t("img", {
17
+ ...a,
18
+ src: n,
19
+ alt: i,
20
+ onError: () => s(n)
21
+ });
22
+ }
23
+ n.displayName = "ImageWithFallback";
24
+ //#endregion
25
+ export { n as ImageWithFallback };
26
+
27
+ //# sourceMappingURL=ImageWithFallback2.js.map
28
+ import "../../assets/components/ImageWithFallback/ImageWithFallback.css";
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ImageWithFallback2.js","names":[],"sources":["../../../src/components/ImageWithFallback/ImageWithFallback.tsx"],"sourcesContent":["/**\n * ImageWithFallback\n *\n * An `<img>` that renders `fallbackIcon` in its place once the image fails to\n * load. The failure is remembered per `src`, so a new `src` gets a fresh try.\n * Astryx's `Avatar` and `Thumbnail` fall back to another image; this falls\n * back to any node, typically an icon.\n *\n * The fallback keeps the image's semantics: it is an `img` named by `alt`, or\n * hidden from assistive technology when `alt` is empty (a decorative image).\n *\n * @example\n * <ImageWithFallback src={logoUrl} alt=\"Vendor\" fallbackIcon={<Cpu />} width={16} />\n */\nimport { useState, type ImgHTMLAttributes, type ReactNode } from \"react\";\n\nimport \"./ImageWithFallback.css\";\n\nexport interface ImageWithFallbackProps extends Omit<\n ImgHTMLAttributes<HTMLImageElement>,\n \"onError\"\n> {\n src: string;\n /** Rendered instead of the image once it fails to load. */\n fallbackIcon: ReactNode;\n alt: string;\n}\n\nexport function ImageWithFallback({\n src,\n fallbackIcon,\n alt,\n ...props\n}: ImageWithFallbackProps) {\n const [errorSrc, setErrorSrc] = useState<string | null>(null);\n\n if (errorSrc === src) {\n return alt === \"\" ? (\n <span className=\"uic-image-with-fallback\" aria-hidden=\"true\">\n {fallbackIcon}\n </span>\n ) : (\n <span className=\"uic-image-with-fallback\" role=\"img\" aria-label={alt}>\n {fallbackIcon}\n </span>\n );\n }\n\n return <img {...props} src={src} alt={alt} onError={() => setErrorSrc(src)} />;\n}\n\nImageWithFallback.displayName = \"ImageWithFallback\";\n"],"mappings":";;;;AA4BA,SAAgB,EAAkB,EAChC,QACA,iBACA,QACA,GAAG,KACsB;CACzB,IAAM,CAAC,GAAU,KAAe,EAAwB,IAAI;CAc5D,OAZI,MAAa,IACR,MAAQ,KACb,kBAAC,QAAD;EAAM,WAAU;EAA0B,eAAY;EACnD,UAAA;CACG,CAAA,IAEN,kBAAC,QAAD;EAAM,WAAU;EAA0B,MAAK;EAAM,cAAY;EAC9D,UAAA;CACG,CAAA,IAIH,kBAAC,OAAD;EAAK,GAAI;EAAY;EAAU;EAAK,eAAe,EAAY,CAAG;CAAI,CAAA;AAC/E;AAEA,EAAkB,cAAc"}
@@ -0,0 +1,2 @@
1
+ export { ImageWithFallback } from './ImageWithFallback';
2
+ export type { ImageWithFallbackProps } from './ImageWithFallback';
@@ -0,0 +1,2 @@
1
+ import { ImageWithFallback as e } from "./ImageWithFallback2.js";
2
+ export { e as ImageWithFallback };
@@ -0,0 +1,17 @@
1
+ import { Key, ReactElement, ReactNode } from 'react';
2
+ import { BannerProps } from '@astryxdesign/core/Banner';
3
+ export interface ListBannerItem {
4
+ /** Default: the item's position. */
5
+ key?: Key | null;
6
+ content: ReactNode;
7
+ }
8
+ export interface ListBannerProps extends Omit<BannerProps, "title" | "description"> {
9
+ title?: ReactNode;
10
+ items: ReadonlyArray<ListBannerItem>;
11
+ /** Height at which the list scrolls. Default: 165 (about seven rows) */
12
+ maxHeight?: number | string;
13
+ }
14
+ export declare function ListBanner({ title, items, maxHeight, ...bannerProps }: ListBannerProps): ReactElement;
15
+ export declare namespace ListBanner {
16
+ var displayName: string;
17
+ }
@@ -0,0 +1,27 @@
1
+ /* empty css */
2
+ import { jsx as e } from "react/jsx-runtime";
3
+ import { Banner as t } from "@astryxdesign/core/Banner";
4
+ //#region src/components/ListBanner/ListBanner.tsx
5
+ var n = 165;
6
+ function r({ title: r, items: i, maxHeight: a = n, ...o }) {
7
+ let s = i.length === 0 ? void 0 : /* @__PURE__ */ e("ul", {
8
+ tabIndex: 0,
9
+ className: "uic-list-banner__list",
10
+ style: {
11
+ "--list-banner-max-height": typeof a == "number" ? `${a}px` : a,
12
+ listStyle: "circle inside"
13
+ },
14
+ children: i.map((t, n) => /* @__PURE__ */ e("li", { children: t.content }, t.key ?? `__index-${n}`))
15
+ }), c = r != null;
16
+ return /* @__PURE__ */ e(t, {
17
+ ...o,
18
+ title: c ? r : s,
19
+ description: c ? s : void 0
20
+ });
21
+ }
22
+ r.displayName = "ListBanner";
23
+ //#endregion
24
+ export { r as ListBanner };
25
+
26
+ //# sourceMappingURL=ListBanner2.js.map
27
+ import "../../assets/components/ListBanner/ListBanner.css";
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ListBanner2.js","names":[],"sources":["../../../src/components/ListBanner/ListBanner.tsx"],"sourcesContent":["/**\n * ListBanner\n *\n * A `Banner` whose description is a list of items, for \"these N things will\n * be affected\" notices in a dialog. The list scrolls once it passes\n * `maxHeight`, so the dialog does not grow with the selection, and the\n * scrolling list is reachable by keyboard. Say how many items there are in\n * the `title`.\n *\n * Without a `title` the list takes the banner's title slot. Without items\n * there is no list.\n *\n * @example\n * <ListBanner\n * status=\"warning\"\n * title={`${users.length} users will be updated`}\n * items={users.map((user) => ({ key: user.id, content: user.email }))}\n * />\n */\nimport type { CSSProperties, Key, ReactElement, ReactNode } from \"react\";\nimport { Banner, type BannerProps } from \"@astryxdesign/core/Banner\";\n\nimport \"./ListBanner.css\";\n\nexport interface ListBannerItem {\n /** Default: the item's position. */\n key?: Key | null;\n content: ReactNode;\n}\n\nexport interface ListBannerProps extends Omit<BannerProps, \"title\" | \"description\"> {\n title?: ReactNode;\n items: ReadonlyArray<ListBannerItem>;\n /** Height at which the list scrolls. Default: 165 (about seven rows) */\n maxHeight?: number | string;\n}\n\nconst DEFAULT_MAX_HEIGHT = 165;\n\nexport function ListBanner({\n title,\n items,\n maxHeight = DEFAULT_MAX_HEIGHT,\n ...bannerProps\n}: ListBannerProps): ReactElement {\n const list =\n items.length === 0 ? undefined : (\n <ul\n // Keyboard users can scroll it.\n tabIndex={0}\n className=\"uic-list-banner__list\"\n style={\n {\n \"--list-banner-max-height\":\n typeof maxHeight === \"number\" ? `${maxHeight}px` : maxHeight,\n // Inline: product sheets reset `ul` unlayered, which beats any layer.\n listStyle: \"circle inside\",\n } as CSSProperties\n }\n >\n {items.map((item, index) => (\n <li key={item.key ?? `__index-${index}`}>{item.content}</li>\n ))}\n </ul>\n );\n const hasTitle = title !== undefined && title !== null;\n\n return (\n <Banner\n {...bannerProps}\n title={hasTitle ? title : list}\n description={hasTitle ? list : undefined}\n />\n );\n}\n\nListBanner.displayName = \"ListBanner\";\n"],"mappings":";;;;AAqCA,IAAM,IAAqB;AAE3B,SAAgB,EAAW,EACzB,UACA,UACA,eAAY,GACZ,GAAG,KAC6B;CAChC,IAAM,IACJ,EAAM,WAAW,IAAI,KAAA,IACnB,kBAAC,MAAD;EAEE,UAAU;EACV,WAAU;EACV,OACE;GACE,4BACE,OAAO,KAAc,WAAW,GAAG,EAAU,MAAM;GAErD,WAAW;EACb;EAGD,UAAA,EAAM,KAAK,GAAM,MAChB,kBAAC,MAAD,EAAA,UAA0C,EAAK,QAAY,GAAlD,EAAK,OAAO,WAAW,GAA2B,CAC5D;CACC,CAAA,GAEF,IAAW,KAAiC;CAElD,OACE,kBAAC,GAAD;EACE,GAAI;EACJ,OAAO,IAAW,IAAQ;EAC1B,aAAa,IAAW,IAAO,KAAA;CAChC,CAAA;AAEL;AAEA,EAAW,cAAc"}
@@ -0,0 +1,2 @@
1
+ export { ListBanner } from './ListBanner';
2
+ export type { ListBannerItem, ListBannerProps } from './ListBanner';
@@ -0,0 +1,2 @@
1
+ import { ListBanner as e } from "./ListBanner2.js";
2
+ export { e as ListBanner };
@@ -0,0 +1,65 @@
1
+ import { ReactNode, Ref } from 'react';
2
+ import { ButtonProps, ButtonVariant } from '@astryxdesign/core/Button';
3
+ import { DialogProps } from '@astryxdesign/core/Dialog';
4
+ /** Props for the primary action button, beyond what `Modal` sets itself. */
5
+ export type ModalActionButtonProps = Partial<Omit<ButtonProps, "label" | "variant" | "clickAction" | "onClick" | "ref">>;
6
+ export interface ModalProps extends Omit<DialogProps, "ref" | "children"> {
7
+ /** Ref to the element carrying `role="dialog"`: a `div`, not a `<dialog>`. */
8
+ ref?: Ref<HTMLDivElement>;
9
+ /** The body. Without `title`, `onAction` or `footer`, the whole surface. */
10
+ children?: ReactNode;
11
+ /**
12
+ * Asks for a z-index inside the modal band. The stack still places a modal
13
+ * opened later above this one, and a value outside the band is ignored.
14
+ */
15
+ zIndex?: number;
16
+ /**
17
+ * Called with the new visibility right after `isOpen` changes, never on
18
+ * mount. There is no exit animation, so a close edge is the end of the
19
+ * close.
20
+ */
21
+ afterOpenChange?: (isOpen: boolean) => void;
22
+ /** Unmount the content, and drop its state, when the modal closes. */
23
+ unmountOnClose?: boolean;
24
+ /** Header title. Names the dialog. A node is rendered as given. */
25
+ title?: ReactNode;
26
+ /** Secondary line under the title. */
27
+ subtitle?: string;
28
+ /** Content before the title, e.g. a back button. */
29
+ headerStartContent?: ReactNode;
30
+ /** Content after the title, before the close button. */
31
+ headerEndContent?: ReactNode;
32
+ /** Whether the header shows a close button. Default: true */
33
+ hasCloseButton?: boolean;
34
+ /** Class name on the generated header, for a product's own header geometry. */
35
+ headerClassName?: string;
36
+ /**
37
+ * Replaces the generated footer. `null` removes the footer. Left
38
+ * `undefined`, a footer is generated when `onAction` is set.
39
+ */
40
+ footer?: ReactNode | null;
41
+ /** Primary action. Returning a promise shows the button pending until it settles. It does not close the modal. */
42
+ onAction?: () => unknown;
43
+ /** Primary action label. Default: the catalog's `uic.common.ok` ("OK") */
44
+ actionLabel?: string;
45
+ /** Primary action variant. Default: "primary" */
46
+ actionVariant?: ButtonVariant;
47
+ /** Shows the primary action as pending, for work the modal does not await. */
48
+ isActionLoading?: boolean;
49
+ /** Disables the primary action. */
50
+ isActionDisabled?: boolean;
51
+ /** More props for the primary action button (`type`, `form`, `icon`, ...). */
52
+ actionButtonProps?: ModalActionButtonProps;
53
+ /** Cancel label. Default: the catalog's `uic.common.cancel` ("Cancel") */
54
+ cancelLabel?: string;
55
+ /** Whether the generated footer has a Cancel button. Default: true */
56
+ hasCancelButton?: boolean;
57
+ /** Class name on the generated footer. */
58
+ footerClassName?: string;
59
+ /** Shows a text skeleton in place of the body. */
60
+ isLoading?: boolean;
61
+ }
62
+ export declare function Modal(props: ModalProps): import("react").JSX.Element;
63
+ export declare namespace Modal {
64
+ var displayName: string;
65
+ }
@@ -0,0 +1,226 @@
1
+ import { useUicTranslator as e } from "../../i18n/useUicTranslator.js";
2
+ import { SkeletonText as t } from "../Skeleton/SkeletonText2.js";
3
+ import { MODAL_OPEN_ATTRIBUTE as n, ModalPortalContext as r, useModalLevel as i } from "./modalStack.js";
4
+ /* empty css */
5
+ import { useContext as a, useEffect as o, useEffectEvent as ee, useId as te, useInsertionEffect as ne, useLayoutEffect as s, useRef as c, useState as re } from "react";
6
+ import { Button as l } from "@astryxdesign/core/Button";
7
+ import { Layout as ie, LayoutContent as ae, LayoutFooter as oe } from "@astryxdesign/core/Layout";
8
+ import { HStack as se } from "@astryxdesign/core/Stack";
9
+ import { createPortal as ce } from "react-dom";
10
+ import { Dialog as u, DialogHeader as le } from "@astryxdesign/core/Dialog";
11
+ import { useFocusTrap as ue, useScrollLock as de } from "@astryxdesign/core/hooks";
12
+ import { useLayerDismissal as fe } from "@astryxdesign/core/Layer";
13
+ import { dataAttr as pe } from "@astryxdesign/core/naming";
14
+ import { useThemeName as me } from "@astryxdesign/core/theme";
15
+ import { devWarn as he, isFocusDetached as d, mergeRefs as ge } from "@astryxdesign/core/utils";
16
+ import { jsx as f, jsxs as p } from "react/jsx-runtime";
17
+ //#region src/components/Modal/Modal.tsx
18
+ var m = "[role=\"heading\"], h1, h2, h3, h4, h5, h6", h = "dialog, [role=\"dialog\"], [role=\"alertdialog\"]";
19
+ function _e(e, t) {
20
+ (d() || t?.contains(document.activeElement) === !0) && e?.isConnected && e.focus();
21
+ }
22
+ function g(e) {
23
+ for (let t of e.querySelectorAll(m)) if (t.closest(h) === e) return t;
24
+ return null;
25
+ }
26
+ function ve(e, t = 16) {
27
+ let n = e.getBoundingClientRect(), r = n.left + n.width / 2 - window.innerWidth / 2, i = n.top + n.height / 2 - window.innerHeight / 2, a = Math.sqrt(r * r + i * i) || 1;
28
+ return {
29
+ x: Math.round(r / a * t),
30
+ y: Math.round(i / a * t)
31
+ };
32
+ }
33
+ function _(e) {
34
+ return typeof e == "number" ? `${e}px` : e;
35
+ }
36
+ function ye(e) {
37
+ let { top: t, bottom: n, start: r, end: i } = e;
38
+ return {
39
+ top: t === void 0 ? "auto" : _(t),
40
+ bottom: n === void 0 ? "auto" : _(n),
41
+ insetInlineStart: r === void 0 ? "auto" : _(r),
42
+ insetInlineEnd: i === void 0 ? "auto" : _(i)
43
+ };
44
+ }
45
+ var v = /* @__PURE__ */ new WeakMap(), y = 0;
46
+ function b(e) {
47
+ if (!e) return "body";
48
+ let t = v.get(e);
49
+ return t || (y += 1, t = `dialog-${y}`, v.set(e, t)), t;
50
+ }
51
+ function x(e) {
52
+ let t = a(r);
53
+ return /* @__PURE__ */ f(S, {
54
+ ...e,
55
+ dialogHost: t
56
+ }, b(t));
57
+ }
58
+ function S({ dialogHost: r, isOpen: a, onOpenChange: d, isInline: m = !1, width: h = 400, maxHeight: v, position: y, variant: b = "standard", purpose: x = "info", padding: S, zIndex: be, afterOpenChange: xe, unmountOnClose: Se = !1, title: C, subtitle: Ce, headerStartContent: w, headerEndContent: T, hasCloseButton: we = !0, headerClassName: Te, footer: E, onAction: D, actionLabel: O, actionVariant: Ee = "primary", isActionLoading: De, isActionDisabled: Oe, actionButtonProps: k, cancelLabel: ke, hasCancelButton: Ae = !0, footerClassName: je, isLoading: Me = !1, role: Ne, children: Pe, xstyle: A, className: j, style: M, ref: Fe, ...N }) {
59
+ let P = e(), [F, I] = re(a);
60
+ a && !F && I(!0);
61
+ let Ie = a || F && !Se, L = c(a), Le = ee((e) => xe?.(e));
62
+ o(() => {
63
+ L.current !== a && (L.current = a, Le(a));
64
+ }, [a]);
65
+ let Re = me(), ze = x !== "required", Be = x === "info", R = N["aria-label"] != null || N["aria-labelledby"] != null, Ve = te(), z = () => d(!1), B = c(null), V = c(null);
66
+ ne(() => {
67
+ if (!a || m) return;
68
+ let e = document.activeElement;
69
+ V.current = e instanceof HTMLElement && !B.current?.contains(e) ? e : null;
70
+ }, [a, m]);
71
+ let H = a && !m, U = i(B, H, be);
72
+ s(() => {
73
+ let e = B.current;
74
+ if (!(!H || !r || typeof e?.showPopover != "function")) return e.showPopover(), () => {
75
+ e.matches(":popover-open") && e.hidePopover();
76
+ };
77
+ }, [H, r]);
78
+ let { containerRef: W, focusFirst: G } = ue({ isActive: H && U });
79
+ fe({
80
+ isActive: H,
81
+ escapeBehavior: ze ? "close" : "block",
82
+ onDismiss: z,
83
+ getContainer: () => W.current
84
+ }), o(() => {
85
+ if (!H) return;
86
+ let e = B.current;
87
+ return () => _e(V.current, e);
88
+ }, [H]), de(H), o(() => {
89
+ let e = W.current;
90
+ if (!H || !e || R) return;
91
+ let t = g(e);
92
+ if (!t) {
93
+ e.removeAttribute("aria-labelledby");
94
+ return;
95
+ }
96
+ t.id ||= Ve, e.setAttribute("aria-labelledby", t.id);
97
+ }), s(() => {
98
+ let e = W.current;
99
+ if (!H || !e) return;
100
+ let t = V.current;
101
+ if (!(typeof window.matchMedia == "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches) && t instanceof HTMLElement && t !== document.body) {
102
+ let { x: n, y: r } = ve(t);
103
+ e.style.setProperty("--modal-dir-x", `${n}px`), e.style.setProperty("--modal-dir-y", `${r}px`);
104
+ }
105
+ return () => {
106
+ e.style.removeProperty("--modal-dir-x"), e.style.removeProperty("--modal-dir-y");
107
+ };
108
+ }, [H, W]), o(() => {
109
+ let e = W.current;
110
+ if (!H || !e) return;
111
+ let t = e.querySelector("[data-autofocus]") ?? g(e);
112
+ t?.focus(), document.activeElement !== t && G();
113
+ }, [
114
+ H,
115
+ W,
116
+ G
117
+ ]);
118
+ let K = c(!1);
119
+ o(() => {
120
+ let e = W.current;
121
+ !H || R || K.current || !e || (g(e) ?? (K.current = !0, he("Modal", "open modal has no accessible name. Pass `title`, render a ModalHeader, or pass `aria-label`/`aria-labelledby`.")));
122
+ }, [
123
+ H,
124
+ R,
125
+ W
126
+ ]);
127
+ let q = c(null), J = c(!1), He = (e) => {
128
+ J.current = e.target === q.current;
129
+ }, Ue = (e) => {
130
+ let t = J.current && e.target === q.current;
131
+ J.current = !1, t && Be && z();
132
+ }, We = C !== void 0 || D !== void 0 || E !== void 0, Ge = D === void 0 ? null : /* @__PURE__ */ p(se, {
133
+ justify: "end",
134
+ align: "center",
135
+ gap: 2,
136
+ children: [Ae && /* @__PURE__ */ f(l, {
137
+ variant: "secondary",
138
+ label: ke ?? P("uic.common.cancel"),
139
+ onClick: z
140
+ }), /* @__PURE__ */ f(l, {
141
+ ...k,
142
+ variant: Ee,
143
+ label: O ?? P("uic.common.ok"),
144
+ isLoading: De ?? k?.isLoading,
145
+ isDisabled: Oe ?? k?.isDisabled,
146
+ clickAction: async () => {
147
+ await D();
148
+ }
149
+ })]
150
+ }), Y = E === void 0 ? Ge : E, X = Me ? /* @__PURE__ */ f(t, { lines: 4 }) : Pe, Z = We ? /* @__PURE__ */ f(ie, {
151
+ header: C !== void 0 || w || T ? /* @__PURE__ */ f(le, {
152
+ hasDivider: !0,
153
+ title: C ?? "",
154
+ subtitle: Ce,
155
+ startContent: w,
156
+ endContent: T,
157
+ onOpenChange: we ? (e) => !e && z() : void 0,
158
+ className: Te
159
+ }) : void 0,
160
+ content: /* @__PURE__ */ f(ae, { children: X }),
161
+ footer: Y ? /* @__PURE__ */ f(oe, {
162
+ hasDivider: !0,
163
+ className: je,
164
+ children: Y
165
+ }) : void 0
166
+ }) : X;
167
+ if (m) return /* @__PURE__ */ f(u, {
168
+ ...N,
169
+ isInline: !0,
170
+ isOpen: a,
171
+ onOpenChange: d,
172
+ width: h,
173
+ maxHeight: v,
174
+ variant: b,
175
+ purpose: x,
176
+ padding: S,
177
+ xstyle: A,
178
+ className: j,
179
+ style: M,
180
+ children: Z
181
+ });
182
+ if (!Ie || typeof document > "u") return null;
183
+ let Q = b === "fullscreen", $ = y != null && !Q;
184
+ return ce(/* @__PURE__ */ p("div", {
185
+ ref: B,
186
+ popover: r ? "manual" : void 0,
187
+ className: ["uic-modal", !a && "uic-modal--closed"].filter(Boolean).join(" "),
188
+ onMouseDown: He,
189
+ onClick: Ue,
190
+ [n]: a ? "" : void 0,
191
+ [pe("theme")]: Re ?? void 0,
192
+ children: [/* @__PURE__ */ f("div", {
193
+ ref: q,
194
+ className: "uic-modal__mask"
195
+ }), /* @__PURE__ */ f("div", {
196
+ ...N,
197
+ ref: ge(Fe, W),
198
+ className: ["uic-modal__wrap", $ && "uic-modal__wrap--positioned"].filter(Boolean).join(" "),
199
+ style: {
200
+ ...$ ? ye(y) : null,
201
+ width: Q ? void 0 : _(h)
202
+ },
203
+ role: a ? Ne ?? (x === "required" ? "alertdialog" : "dialog") : void 0,
204
+ "aria-modal": a && U ? !0 : void 0,
205
+ children: /* @__PURE__ */ f(u, {
206
+ isInline: !0,
207
+ isOpen: !0,
208
+ onOpenChange: d,
209
+ width: "100%",
210
+ maxHeight: v,
211
+ variant: b,
212
+ padding: S,
213
+ xstyle: A,
214
+ className: j,
215
+ style: M,
216
+ children: Z
217
+ })
218
+ })]
219
+ }), r ?? document.body);
220
+ }
221
+ x.displayName = "Modal";
222
+ //#endregion
223
+ export { x as Modal };
224
+
225
+ //# sourceMappingURL=Modal2.js.map
226
+ import "../../assets/components/Modal/Modal.css";