@cube-dev/ui-kit 0.145.4 → 0.146.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (532) hide show
  1. package/dist/CHANGELOG.md +6 -0
  2. package/dist/_internal/hooks/use-chained-callback.js +1 -1
  3. package/dist/_internal/hooks/use-debounced-value.js +1 -1
  4. package/dist/_internal/hooks/use-deprecation-warning.js +1 -1
  5. package/dist/_internal/hooks/use-event.js +1 -1
  6. package/dist/_internal/hooks/use-is-first-render.js +1 -1
  7. package/dist/_internal/hooks/use-sync-ref.js +1 -1
  8. package/dist/_internal/hooks/use-timer/timer.js +1 -1
  9. package/dist/_internal/hooks/use-timer/use-timer.js +1 -1
  10. package/dist/_internal/hooks/use-warn.js +1 -1
  11. package/dist/components/Block.js +1 -1
  12. package/dist/components/CollectionItem.js +1 -1
  13. package/dist/components/GlobalStyles.js +1 -1
  14. package/dist/components/GridProvider.js +1 -1
  15. package/dist/components/HiddenInput.js +1 -1
  16. package/dist/components/Root.d.ts +8 -0
  17. package/dist/components/Root.js +35 -30
  18. package/dist/components/Root.js.map +1 -1
  19. package/dist/components/actions/Action/Action.js +1 -1
  20. package/dist/components/actions/Banner/Banner.js +4 -2
  21. package/dist/components/actions/Banner/Banner.js.map +1 -1
  22. package/dist/components/actions/Button/Button.js +1 -1
  23. package/dist/components/actions/ButtonGroup/ButtonGroup.js +1 -1
  24. package/dist/components/actions/ButtonSplit/ButtonSplit.js +1 -1
  25. package/dist/components/actions/ButtonSplit/context.js +1 -1
  26. package/dist/components/actions/CommandMenu/CommandMenu.js +4 -2
  27. package/dist/components/actions/CommandMenu/CommandMenu.js.map +1 -1
  28. package/dist/components/actions/CommandMenu/styled.js +1 -1
  29. package/dist/components/actions/ItemAction/ItemAction.js +1 -1
  30. package/dist/components/actions/ItemActionContext.js +1 -1
  31. package/dist/components/actions/ItemButton/ItemButton.js +1 -1
  32. package/dist/components/actions/Link/Link.js +1 -1
  33. package/dist/components/actions/Menu/Menu.js +1 -1
  34. package/dist/components/actions/Menu/MenuItem.js +1 -1
  35. package/dist/components/actions/Menu/MenuSection.js +1 -1
  36. package/dist/components/actions/Menu/MenuTrigger.js +1 -1
  37. package/dist/components/actions/Menu/SubMenuTrigger.js +1 -1
  38. package/dist/components/actions/Menu/SubmenuTriggerContext.js +1 -1
  39. package/dist/components/actions/Menu/context.js +1 -1
  40. package/dist/components/actions/Menu/styled.js +1 -1
  41. package/dist/components/actions/index.js +1 -1
  42. package/dist/components/actions/use-action.js +1 -1
  43. package/dist/components/actions/use-anchored-menu.js +6 -3
  44. package/dist/components/actions/use-anchored-menu.js.map +1 -1
  45. package/dist/components/actions/use-context-menu.js +6 -3
  46. package/dist/components/actions/use-context-menu.js.map +1 -1
  47. package/dist/components/content/ActiveZone/ActiveZone.js +1 -1
  48. package/dist/components/content/Alert/Alert.js +1 -1
  49. package/dist/components/content/Alert/use-alert.js +1 -1
  50. package/dist/components/content/Avatar/Avatar.js +1 -1
  51. package/dist/components/content/Badge/Badge.js +1 -1
  52. package/dist/components/content/Card/Card.js +1 -1
  53. package/dist/components/content/Content.js +1 -1
  54. package/dist/components/content/CopyPasteBlock/CopyPasteBlock.js +7 -6
  55. package/dist/components/content/CopyPasteBlock/CopyPasteBlock.js.map +1 -1
  56. package/dist/components/content/CopySnippet/CopySnippet.js +9 -9
  57. package/dist/components/content/CopySnippet/CopySnippet.js.map +1 -1
  58. package/dist/components/content/Disclosure/Disclosure.js +1 -1
  59. package/dist/components/content/Divider.js +1 -1
  60. package/dist/components/content/Footer.js +1 -1
  61. package/dist/components/content/Header.js +1 -1
  62. package/dist/components/content/HotKeys/HotKeys.js +1 -1
  63. package/dist/components/content/InlineInput/InlineInput.js +1 -1
  64. package/dist/components/content/Item/Item.js +1 -1
  65. package/dist/components/content/ItemBadge/ItemBadge.js +1 -1
  66. package/dist/components/content/ItemCard/ItemCard.js +1 -1
  67. package/dist/components/content/Layout/GridLayout.js +1 -1
  68. package/dist/components/content/Layout/Layout.js +1 -1
  69. package/dist/components/content/Layout/LayoutBlock.js +1 -1
  70. package/dist/components/content/Layout/LayoutCenter.js +1 -1
  71. package/dist/components/content/Layout/LayoutContainer.js +1 -1
  72. package/dist/components/content/Layout/LayoutContent.js +1 -1
  73. package/dist/components/content/Layout/LayoutContext.js +1 -1
  74. package/dist/components/content/Layout/LayoutFlex.js +1 -1
  75. package/dist/components/content/Layout/LayoutFooter.js +1 -1
  76. package/dist/components/content/Layout/LayoutGrid.js +1 -1
  77. package/dist/components/content/Layout/LayoutHeader.js +4 -2
  78. package/dist/components/content/Layout/LayoutHeader.js.map +1 -1
  79. package/dist/components/content/Layout/LayoutPane.js +1 -1
  80. package/dist/components/content/Layout/LayoutPanel.js +1 -1
  81. package/dist/components/content/Layout/LayoutPanelHeader.js +9 -6
  82. package/dist/components/content/Layout/LayoutPanelHeader.js.map +1 -1
  83. package/dist/components/content/Layout/LayoutToolbar.js +1 -1
  84. package/dist/components/content/Layout/hooks/useTinyScrollbar.js +1 -1
  85. package/dist/components/content/Layout/index.js +1 -1
  86. package/dist/components/content/Layout/utils.js +1 -1
  87. package/dist/components/content/Paragraph.js +1 -1
  88. package/dist/components/content/Placeholder/Placeholder.js +4 -2
  89. package/dist/components/content/Placeholder/Placeholder.js.map +1 -1
  90. package/dist/components/content/PrismCode/PrismCode.js +1 -1
  91. package/dist/components/content/PrismCode/prismSetup.js +1 -1
  92. package/dist/components/content/PrismDiffCode/PrismDiffCode.js +1 -1
  93. package/dist/components/content/Result/Result.js +1 -1
  94. package/dist/components/content/Skeleton/Skeleton.js +1 -1
  95. package/dist/components/content/Tag/Tag.js +4 -2
  96. package/dist/components/content/Tag/Tag.js.map +1 -1
  97. package/dist/components/content/Text.d.ts +7 -7
  98. package/dist/components/content/Text.js +1 -1
  99. package/dist/components/content/TextItem/TextItem.js +1 -1
  100. package/dist/components/content/Title.js +1 -1
  101. package/dist/components/content/Tree/Tree.js +1 -1
  102. package/dist/components/content/Tree/TreeNode.js +4 -2
  103. package/dist/components/content/Tree/TreeNode.js.map +1 -1
  104. package/dist/components/content/Tree/styled.js +1 -1
  105. package/dist/components/content/Tree/tree-index.js +1 -1
  106. package/dist/components/content/Tree/use-checkbox-tree.js +1 -1
  107. package/dist/components/content/Tree/use-load-data.js +1 -1
  108. package/dist/components/content/highlightText.js +1 -1
  109. package/dist/components/content/use-auto-tooltip.js +1 -1
  110. package/dist/components/fields/Checkbox/Checkbox.js +1 -1
  111. package/dist/components/fields/Checkbox/CheckboxGroup.js +1 -1
  112. package/dist/components/fields/Checkbox/context.js +1 -1
  113. package/dist/components/fields/ComboBox/ComboBox.js +5 -3
  114. package/dist/components/fields/ComboBox/ComboBox.js.map +1 -1
  115. package/dist/components/fields/CommandTextArea/CommandTextArea.js +1 -1
  116. package/dist/components/fields/CommandTextArea/caretPosition.js +1 -1
  117. package/dist/components/fields/CommandTextArea/useCaretAnchor.js +1 -1
  118. package/dist/components/fields/DatePicker/DateInput.js +1 -1
  119. package/dist/components/fields/DatePicker/DateInputBase.js +1 -1
  120. package/dist/components/fields/DatePicker/DatePicker.js +4 -3
  121. package/dist/components/fields/DatePicker/DatePicker.js.map +1 -1
  122. package/dist/components/fields/DatePicker/DatePickerButton.js +1 -1
  123. package/dist/components/fields/DatePicker/DatePickerElement.js +1 -1
  124. package/dist/components/fields/DatePicker/DatePickerInput.js +1 -1
  125. package/dist/components/fields/DatePicker/DatePickerSegment.js +1 -1
  126. package/dist/components/fields/DatePicker/DateRangePicker.js +5 -4
  127. package/dist/components/fields/DatePicker/DateRangePicker.js.map +1 -1
  128. package/dist/components/fields/DatePicker/DateRangeSeparatedPicker.js +6 -5
  129. package/dist/components/fields/DatePicker/DateRangeSeparatedPicker.js.map +1 -1
  130. package/dist/components/fields/DatePicker/TimeInput.js +1 -1
  131. package/dist/components/fields/DatePicker/parseDate.js +1 -1
  132. package/dist/components/fields/DatePicker/props.js +1 -1
  133. package/dist/components/fields/DatePicker/utils.js +1 -1
  134. package/dist/components/fields/FileInput/FileInput.js +5 -3
  135. package/dist/components/fields/FileInput/FileInput.js.map +1 -1
  136. package/dist/components/fields/FilterListBox/FilterListBox.js +9 -6
  137. package/dist/components/fields/FilterListBox/FilterListBox.js.map +1 -1
  138. package/dist/components/fields/FilterPicker/FilterPicker.js +5 -3
  139. package/dist/components/fields/FilterPicker/FilterPicker.js.map +1 -1
  140. package/dist/components/fields/Input/Input.js +1 -1
  141. package/dist/components/fields/ListBox/DraggableListBox.js +1 -1
  142. package/dist/components/fields/ListBox/ListBox.js +9 -5
  143. package/dist/components/fields/ListBox/ListBox.js.map +1 -1
  144. package/dist/components/fields/ListBoxPopover/ListBoxPopover.js +4 -2
  145. package/dist/components/fields/ListBoxPopover/ListBoxPopover.js.map +1 -1
  146. package/dist/components/fields/ListBoxPopover/listNavigation.js +1 -1
  147. package/dist/components/fields/ListBoxPopover/useCompositeFocus.js +1 -1
  148. package/dist/components/fields/NumberInput/NumberInput.js +1 -1
  149. package/dist/components/fields/NumberInput/StepButton.js +5 -2
  150. package/dist/components/fields/NumberInput/StepButton.js.map +1 -1
  151. package/dist/components/fields/PasswordInput/PasswordInput.js +4 -2
  152. package/dist/components/fields/PasswordInput/PasswordInput.js.map +1 -1
  153. package/dist/components/fields/Picker/Picker.js +5 -3
  154. package/dist/components/fields/Picker/Picker.js.map +1 -1
  155. package/dist/components/fields/RadioGroup/Radio.js +1 -1
  156. package/dist/components/fields/RadioGroup/RadioGroup.js +1 -1
  157. package/dist/components/fields/RadioGroup/context.js +1 -1
  158. package/dist/components/fields/SearchInput/SearchInput.js +1 -1
  159. package/dist/components/fields/Select/Select.js +1 -1
  160. package/dist/components/fields/Slider/Gradation.js +1 -1
  161. package/dist/components/fields/Slider/HueSlider.js +1 -1
  162. package/dist/components/fields/Slider/RangeSlider.js +1 -1
  163. package/dist/components/fields/Slider/Slider.js +1 -1
  164. package/dist/components/fields/Slider/SliderBase.js +1 -1
  165. package/dist/components/fields/Slider/SliderThumb.js +1 -1
  166. package/dist/components/fields/Slider/SliderTrack.js +1 -1
  167. package/dist/components/fields/Slider/elements.js +1 -1
  168. package/dist/components/fields/Slider/index.js +1 -1
  169. package/dist/components/fields/Switch/Switch.js +1 -1
  170. package/dist/components/fields/TextArea/TextArea.js +1 -1
  171. package/dist/components/fields/TextInput/TextInput.js +1 -1
  172. package/dist/components/fields/TextInput/TextInputBase.js +1 -1
  173. package/dist/components/fields/TextInputMapper/TextInputMapper.js +7 -5
  174. package/dist/components/fields/TextInputMapper/TextInputMapper.js.map +1 -1
  175. package/dist/components/form/FieldWrapper/FieldWrapper.js +1 -1
  176. package/dist/components/form/FieldWrapper/extract-field-wrapper-props.js +1 -1
  177. package/dist/components/form/Form/Field.js +1 -1
  178. package/dist/components/form/Form/Form.js +1 -1
  179. package/dist/components/form/Form/ResetButton/ResetButton.js +1 -1
  180. package/dist/components/form/Form/SubmitButton/SubmitButton.js +1 -1
  181. package/dist/components/form/Form/SubmitError.js +4 -2
  182. package/dist/components/form/Form/SubmitError.js.map +1 -1
  183. package/dist/components/form/Form/index.js +1 -1
  184. package/dist/components/form/Form/use-field/use-field-props.js +1 -1
  185. package/dist/components/form/Form/use-field/use-field.js +1 -1
  186. package/dist/components/form/Form/use-form.js +1 -1
  187. package/dist/components/form/Form/validation.js +1 -1
  188. package/dist/components/form/Label.js +6 -8
  189. package/dist/components/form/Label.js.map +1 -1
  190. package/dist/components/form/wrapper.js +1 -1
  191. package/dist/components/helpers/DisplayTransition/DisplayTransition.js +1 -1
  192. package/dist/components/helpers/IconSwitch/IconSwitch.js +1 -1
  193. package/dist/components/layout/Board/Board.js +1 -1
  194. package/dist/components/layout/Board/BoardProvider.js +1 -1
  195. package/dist/components/layout/Board/BoardResponsive.js +1 -1
  196. package/dist/components/layout/Board/Widget.js +1 -1
  197. package/dist/components/layout/Board/WidgetHost.js +1 -1
  198. package/dist/components/layout/Board/board-context.js +1 -1
  199. package/dist/components/layout/Board/board-store.js +1 -1
  200. package/dist/components/layout/Board/grid-core/calculate.js +1 -1
  201. package/dist/components/layout/Board/grid-core/collision.js +1 -1
  202. package/dist/components/layout/Board/grid-core/compactors.js +1 -1
  203. package/dist/components/layout/Board/grid-core/constraints.js +1 -1
  204. package/dist/components/layout/Board/grid-core/layout.js +1 -1
  205. package/dist/components/layout/Board/grid-core/sort.js +1 -1
  206. package/dist/components/layout/Board/index.js +1 -1
  207. package/dist/components/layout/Board/responsive-utils.js +1 -1
  208. package/dist/components/layout/Board/use-board-layout.js +1 -1
  209. package/dist/components/layout/Board/use-board-registry.js +1 -1
  210. package/dist/components/layout/Flex.js +1 -1
  211. package/dist/components/layout/Flow.js +1 -1
  212. package/dist/components/layout/Grid.js +1 -1
  213. package/dist/components/layout/Panel.js +1 -1
  214. package/dist/components/layout/Prefix.js +1 -1
  215. package/dist/components/layout/ResizablePanel.js +1 -1
  216. package/dist/components/layout/Space.js +1 -1
  217. package/dist/components/layout/Suffix.js +1 -1
  218. package/dist/components/navigation/Tabs/DraggableTabList.js +1 -1
  219. package/dist/components/navigation/Tabs/TabButton.js +7 -4
  220. package/dist/components/navigation/Tabs/TabButton.js.map +1 -1
  221. package/dist/components/navigation/Tabs/TabDropIndicator.js +1 -1
  222. package/dist/components/navigation/Tabs/TabPanel.js +1 -1
  223. package/dist/components/navigation/Tabs/TabPicker.js +5 -3
  224. package/dist/components/navigation/Tabs/TabPicker.js.map +1 -1
  225. package/dist/components/navigation/Tabs/Tabs.js +1 -1
  226. package/dist/components/navigation/Tabs/TabsAction.js +1 -1
  227. package/dist/components/navigation/Tabs/TabsContext.js +1 -1
  228. package/dist/components/navigation/Tabs/popover-placement.js +1 -1
  229. package/dist/components/navigation/Tabs/styled.js +1 -1
  230. package/dist/components/navigation/Tabs/types.js +1 -1
  231. package/dist/components/navigation/Tabs/use-tab-editing.js +1 -1
  232. package/dist/components/navigation/Tabs/use-tab-indicator.js +1 -1
  233. package/dist/components/organisms/FileTabs/FileTabs.js +1 -1
  234. package/dist/components/organisms/StatsCard/StatsCard.js +1 -1
  235. package/dist/components/other/Calendar/Calendar.js +1 -1
  236. package/dist/components/other/Calendar/CalendarCell.js +1 -1
  237. package/dist/components/other/Calendar/CalendarGrid.js +1 -1
  238. package/dist/components/other/Calendar/RangeCalendar.js +1 -1
  239. package/dist/components/other/CloudLogo/CloudLogo.js +1 -1
  240. package/dist/components/overlays/AlertDialog/AlertDialog.js +8 -6
  241. package/dist/components/overlays/AlertDialog/AlertDialog.js.map +1 -1
  242. package/dist/components/overlays/AlertDialog/AlertDialogApiProvider.js +1 -1
  243. package/dist/components/overlays/AlertDialog/AlertDialogZone.js +1 -1
  244. package/dist/components/overlays/Dialog/Dialog.js +5 -8
  245. package/dist/components/overlays/Dialog/Dialog.js.map +1 -1
  246. package/dist/components/overlays/Dialog/DialogContainer.js +1 -1
  247. package/dist/components/overlays/Dialog/DialogForm.js +5 -3
  248. package/dist/components/overlays/Dialog/DialogForm.js.map +1 -1
  249. package/dist/components/overlays/Dialog/DialogTrigger.js +1 -1
  250. package/dist/components/overlays/Dialog/context.js +1 -1
  251. package/dist/components/overlays/Dialog/use-dialog-container.js +1 -1
  252. package/dist/components/overlays/Modal/Modal.js +1 -1
  253. package/dist/components/overlays/Modal/OpenTransitionContext.js +1 -1
  254. package/dist/components/overlays/Modal/Overlay.js +1 -1
  255. package/dist/components/overlays/Modal/Popover.js +1 -1
  256. package/dist/components/overlays/Modal/Tray.js +1 -1
  257. package/dist/components/overlays/Modal/Underlay.js +1 -1
  258. package/dist/components/overlays/Notifications/Notification.js +1 -1
  259. package/dist/components/overlays/Notifications/NotificationAction.js +1 -1
  260. package/dist/components/overlays/Notifications/NotificationCard.js +4 -2
  261. package/dist/components/overlays/Notifications/NotificationCard.js.map +1 -1
  262. package/dist/components/overlays/Notifications/NotificationContext.js +1 -1
  263. package/dist/components/overlays/Notifications/NotificationItem.js +1 -1
  264. package/dist/components/overlays/Notifications/OverlayContainer.js +1 -1
  265. package/dist/components/overlays/Notifications/OverlayProvider.js +1 -1
  266. package/dist/components/overlays/Notifications/PersistentNotificationsList.js +17 -8
  267. package/dist/components/overlays/Notifications/PersistentNotificationsList.js.map +1 -1
  268. package/dist/components/overlays/Notifications/dismissed-storage.js +1 -1
  269. package/dist/components/overlays/Notifications/format-relative-time.d.ts +9 -3
  270. package/dist/components/overlays/Notifications/format-relative-time.js +20 -12
  271. package/dist/components/overlays/Notifications/format-relative-time.js.map +1 -1
  272. package/dist/components/overlays/Notifications/index.js +1 -1
  273. package/dist/components/overlays/Notifications/use-notification-state.js +1 -1
  274. package/dist/components/overlays/Notifications/use-notifications.js +1 -1
  275. package/dist/components/overlays/Notifications/use-overlay-timers.js +1 -1
  276. package/dist/components/overlays/Notifications/use-persistent-notifications.js +1 -1
  277. package/dist/components/overlays/Notifications/use-persistent-state.js +1 -1
  278. package/dist/components/overlays/Notifications/use-toast-state.js +1 -1
  279. package/dist/components/overlays/Toast/ToastItem.js +1 -1
  280. package/dist/components/overlays/Toast/index.js +1 -1
  281. package/dist/components/overlays/Toast/useProgressToast.js +6 -3
  282. package/dist/components/overlays/Toast/useProgressToast.js.map +1 -1
  283. package/dist/components/overlays/Toast/useToast.js +1 -1
  284. package/dist/components/overlays/Tooltip/Tooltip.js +1 -1
  285. package/dist/components/overlays/Tooltip/TooltipProvider.js +1 -1
  286. package/dist/components/overlays/Tooltip/TooltipTrigger.js +1 -1
  287. package/dist/components/overlays/Tooltip/context.js +1 -1
  288. package/dist/components/portal/Portal.js +1 -1
  289. package/dist/components/portal/PortalProvider.js +1 -1
  290. package/dist/components/portal/usePortal.js +1 -1
  291. package/dist/components/shared/DraggableCollection.js +1 -1
  292. package/dist/components/shared/InvalidIcon.js +1 -1
  293. package/dist/components/shared/ValidIcon.js +1 -1
  294. package/dist/components/status/LoadingAnimation/LoadingAnimation.js +4 -2
  295. package/dist/components/status/LoadingAnimation/LoadingAnimation.js.map +1 -1
  296. package/dist/components/status/Spin/Cube.js +1 -1
  297. package/dist/components/status/Spin/InternalSpinner.js +1 -1
  298. package/dist/components/status/Spin/Spin.js +1 -1
  299. package/dist/components/status/Spin/SpinsContainer.js +1 -1
  300. package/dist/data/item-themes.js +1 -1
  301. package/dist/data/themes.js +1 -1
  302. package/dist/i18n/I18nProvider.d.ts +29 -0
  303. package/dist/i18n/I18nProvider.js +46 -0
  304. package/dist/i18n/I18nProvider.js.map +1 -0
  305. package/dist/i18n/createFormatter.d.ts +59 -0
  306. package/dist/i18n/createFormatter.js +148 -0
  307. package/dist/i18n/createFormatter.js.map +1 -0
  308. package/dist/i18n/index.d.ts +18 -0
  309. package/dist/i18n/index.js +21 -0
  310. package/dist/i18n/index.js.map +1 -0
  311. package/dist/i18n/instance.d.ts +22 -0
  312. package/dist/i18n/instance.js +78 -0
  313. package/dist/i18n/instance.js.map +1 -0
  314. package/dist/i18n/locales/de-DE/uikit.js +112 -0
  315. package/dist/i18n/locales/de-DE/uikit.js.map +1 -0
  316. package/dist/i18n/locales/en-US/uikit.js +112 -0
  317. package/dist/i18n/locales/en-US/uikit.js.map +1 -0
  318. package/dist/i18n/locales/en-US/uikit.json.d.ts +140 -0
  319. package/dist/i18n/locales/es-ES/uikit.js +112 -0
  320. package/dist/i18n/locales/es-ES/uikit.js.map +1 -0
  321. package/dist/i18n/locales/es-MX/uikit.js +112 -0
  322. package/dist/i18n/locales/es-MX/uikit.js.map +1 -0
  323. package/dist/i18n/locales/fr-FR/uikit.js +112 -0
  324. package/dist/i18n/locales/fr-FR/uikit.js.map +1 -0
  325. package/dist/i18n/locales/it-IT/uikit.js +112 -0
  326. package/dist/i18n/locales/it-IT/uikit.js.map +1 -0
  327. package/dist/i18n/locales/ja-JP/uikit.js +112 -0
  328. package/dist/i18n/locales/ja-JP/uikit.js.map +1 -0
  329. package/dist/i18n/locales/nb-NO/uikit.js +112 -0
  330. package/dist/i18n/locales/nb-NO/uikit.js.map +1 -0
  331. package/dist/i18n/locales/pt-BR/uikit.js +112 -0
  332. package/dist/i18n/locales/pt-BR/uikit.js.map +1 -0
  333. package/dist/i18n/locales/pt-PT/uikit.js +112 -0
  334. package/dist/i18n/locales/pt-PT/uikit.js.map +1 -0
  335. package/dist/i18n/locales/sv-SE/uikit.js +112 -0
  336. package/dist/i18n/locales/sv-SE/uikit.js.map +1 -0
  337. package/dist/i18n/locales/vi-VN/uikit.js +112 -0
  338. package/dist/i18n/locales/vi-VN/uikit.js.map +1 -0
  339. package/dist/i18n/locales.d.ts +17 -0
  340. package/dist/i18n/locales.js +45 -0
  341. package/dist/i18n/locales.js.map +1 -0
  342. package/dist/i18n/useFormatter.d.ts +26 -0
  343. package/dist/i18n/useFormatter.js +32 -0
  344. package/dist/i18n/useFormatter.js.map +1 -0
  345. package/dist/i18n/useI18n.d.ts +2 -0
  346. package/dist/i18n/useI18n.js +18 -0
  347. package/dist/i18n/useI18n.js.map +1 -0
  348. package/dist/icons/AdjustmentsHorizontalIcon.js +1 -1
  349. package/dist/icons/AdjustmentsIcon.js +1 -1
  350. package/dist/icons/AiIcon.js +1 -1
  351. package/dist/icons/AreaChartIcon.js +1 -1
  352. package/dist/icons/BackwardIcon.js +1 -1
  353. package/dist/icons/BarChartIcon.js +1 -1
  354. package/dist/icons/BellFilledIcon.js +1 -1
  355. package/dist/icons/BellIcon.js +1 -1
  356. package/dist/icons/BooleanIcon.js +1 -1
  357. package/dist/icons/CalendarEditIcon.js +1 -1
  358. package/dist/icons/CalendarIcon.js +1 -1
  359. package/dist/icons/CaretDownIcon.js +1 -1
  360. package/dist/icons/CaretUpIcon.js +1 -1
  361. package/dist/icons/ChartAreaStackedIcon.js +1 -1
  362. package/dist/icons/ChartAreaStackedPercentageIcon.js +1 -1
  363. package/dist/icons/ChartBarGroupedHorizontalIcon.js +1 -1
  364. package/dist/icons/ChartBarGroupedIcon.js +1 -1
  365. package/dist/icons/ChartBarHorizontalIcon.js +1 -1
  366. package/dist/icons/ChartBarLineIcon.js +1 -1
  367. package/dist/icons/ChartBarStackedHorizontalIcon.js +1 -1
  368. package/dist/icons/ChartBarStackedIcon.js +1 -1
  369. package/dist/icons/ChartBarStackedPercentageHorizontalIcon.js +1 -1
  370. package/dist/icons/ChartBarStackedPercentageIcon.js +1 -1
  371. package/dist/icons/ChartBoxPlot2Icon.js +1 -1
  372. package/dist/icons/ChartBoxPlotIcon.js +1 -1
  373. package/dist/icons/ChartBubbleIcon.js +1 -1
  374. package/dist/icons/ChartDonut2Icon.js +1 -1
  375. package/dist/icons/ChartFunnelIcon.js +1 -1
  376. package/dist/icons/ChartHeatmapIcon.js +1 -1
  377. package/dist/icons/ChartKPIIcon.js +1 -1
  378. package/dist/icons/ChartPie2Icon.js +1 -1
  379. package/dist/icons/ChartScatterIcon.js +1 -1
  380. package/dist/icons/CheckCircleFilledIcon.js +1 -1
  381. package/dist/icons/CheckCircleIcon.js +1 -1
  382. package/dist/icons/CheckIcon.js +1 -1
  383. package/dist/icons/CircleFilledIcon.js +1 -1
  384. package/dist/icons/ClearIcon.js +1 -1
  385. package/dist/icons/CloseCircleFilledIcon.js +1 -1
  386. package/dist/icons/CloseCircleIcon.js +1 -1
  387. package/dist/icons/CloseIcon.js +1 -1
  388. package/dist/icons/CodeIcon.js +1 -1
  389. package/dist/icons/ColumnTotalIcon.js +1 -1
  390. package/dist/icons/CopyIcon.js +1 -1
  391. package/dist/icons/CountIcon.js +1 -1
  392. package/dist/icons/CubeIcon.js +1 -1
  393. package/dist/icons/CubePauseIcon.js +1 -1
  394. package/dist/icons/CubePlayIcon.js +1 -1
  395. package/dist/icons/CurrencyDollarIcon.js +1 -1
  396. package/dist/icons/DangerIcon.js +1 -1
  397. package/dist/icons/DashboardIcon.js +1 -1
  398. package/dist/icons/DatabaseIcon.js +1 -1
  399. package/dist/icons/DecimalDecreaseIcon.js +1 -1
  400. package/dist/icons/DecimalIncreaseIcon.js +1 -1
  401. package/dist/icons/DirectionIcon.js +1 -1
  402. package/dist/icons/DonutIcon.js +1 -1
  403. package/dist/icons/DownIcon.js +1 -1
  404. package/dist/icons/EditIcon.js +1 -1
  405. package/dist/icons/ExclamationCircleFilledIcon.js +1 -1
  406. package/dist/icons/ExclamationCircleIcon.js +1 -1
  407. package/dist/icons/ExclamationIcon.js +1 -1
  408. package/dist/icons/EyeIcon.js +1 -1
  409. package/dist/icons/EyeInvisibleIcon.js +1 -1
  410. package/dist/icons/FilterIcon.js +1 -1
  411. package/dist/icons/FolderFilledIcon.js +1 -1
  412. package/dist/icons/FolderIcon.js +1 -1
  413. package/dist/icons/FolderOpenFilledIcon.js +1 -1
  414. package/dist/icons/FolderOpenIcon.js +1 -1
  415. package/dist/icons/ForwardIcon.js +1 -1
  416. package/dist/icons/GripVerticalIcon.js +1 -1
  417. package/dist/icons/HierarchyIcon.js +1 -1
  418. package/dist/icons/HierarchyOpenIcon.js +1 -1
  419. package/dist/icons/Icon.js +1 -1
  420. package/dist/icons/InfoCircleIcon.js +1 -1
  421. package/dist/icons/InfoIcon.js +1 -1
  422. package/dist/icons/KeyIcon.js +1 -1
  423. package/dist/icons/LeftIcon.js +1 -1
  424. package/dist/icons/LineChartIcon.js +1 -1
  425. package/dist/icons/LoadingIcon.js +1 -1
  426. package/dist/icons/LockFilledIcon.js +1 -1
  427. package/dist/icons/LockIcon.js +1 -1
  428. package/dist/icons/MoreIcon.js +1 -1
  429. package/dist/icons/NotAllowedIcon.js +1 -1
  430. package/dist/icons/Number123Icon.js +1 -1
  431. package/dist/icons/NumberIcon.js +1 -1
  432. package/dist/icons/PauseCircleFilledIcon.js +1 -1
  433. package/dist/icons/PauseCircleIcon.js +1 -1
  434. package/dist/icons/PauseIcon.js +1 -1
  435. package/dist/icons/PercentageIcon.js +1 -1
  436. package/dist/icons/PieChartIcon.js +1 -1
  437. package/dist/icons/PlayCircleIcon.js +1 -1
  438. package/dist/icons/PlayIcon.js +1 -1
  439. package/dist/icons/PlusIcon.js +1 -1
  440. package/dist/icons/ProgressBarIcon.js +1 -1
  441. package/dist/icons/ReloadIcon.js +1 -1
  442. package/dist/icons/ReportIcon.js +1 -1
  443. package/dist/icons/ReturnIcon.js +1 -1
  444. package/dist/icons/RightIcon.js +1 -1
  445. package/dist/icons/RowTotalsIcon.js +1 -1
  446. package/dist/icons/SchemeIcon.js +1 -1
  447. package/dist/icons/SearchIcon.js +1 -1
  448. package/dist/icons/SemanticQueryIcon.js +1 -1
  449. package/dist/icons/SettingsIcon.js +1 -1
  450. package/dist/icons/ShieldFilledIcon.js +1 -1
  451. package/dist/icons/ShieldIcon.js +1 -1
  452. package/dist/icons/SlashIcon.js +1 -1
  453. package/dist/icons/SparklesIcon.js +1 -1
  454. package/dist/icons/SqlIcon.js +1 -1
  455. package/dist/icons/StatsIcon.js +1 -1
  456. package/dist/icons/StopIcon.js +1 -1
  457. package/dist/icons/StringIcon.js +1 -1
  458. package/dist/icons/SubtotalsIcon.js +1 -1
  459. package/dist/icons/SwitchIcon.js +1 -1
  460. package/dist/icons/TableIcon.js +1 -1
  461. package/dist/icons/ThumbsDownIcon.js +1 -1
  462. package/dist/icons/ThumbsUpIcon.js +1 -1
  463. package/dist/icons/ThunderboltCrossedIcon.js +1 -1
  464. package/dist/icons/ThunderboltFilledIcon.js +1 -1
  465. package/dist/icons/ThunderboltIcon.js +1 -1
  466. package/dist/icons/TimeIcon.js +1 -1
  467. package/dist/icons/TrashIcon.js +1 -1
  468. package/dist/icons/UnlockIcon.js +1 -1
  469. package/dist/icons/UpIcon.js +1 -1
  470. package/dist/icons/UserGroupIcon.js +1 -1
  471. package/dist/icons/UserIcon.js +1 -1
  472. package/dist/icons/UserLockIcon.js +1 -1
  473. package/dist/icons/ViewIcon.js +1 -1
  474. package/dist/icons/WarningFilledIcon.js +1 -1
  475. package/dist/icons/WarningIcon.js +1 -1
  476. package/dist/icons/wrap-icon.js +1 -1
  477. package/dist/index.d.ts +10 -1
  478. package/dist/index.js +11 -2
  479. package/dist/index.js.map +1 -1
  480. package/dist/provider.js +1 -1
  481. package/dist/providers/TrackingProvider.js +1 -1
  482. package/dist/providers/navigationAdapter.default.js +1 -1
  483. package/dist/tokens/base.js +1 -1
  484. package/dist/tokens/colors.js +1 -1
  485. package/dist/tokens/index.js +1 -1
  486. package/dist/tokens/layout.js +1 -1
  487. package/dist/tokens/palette.js +1 -1
  488. package/dist/tokens/shadows.js +1 -1
  489. package/dist/tokens/sizes.js +1 -1
  490. package/dist/tokens/spacing.js +1 -1
  491. package/dist/tokens/typography.js +1 -1
  492. package/dist/utils/ResizeSensor.js +1 -1
  493. package/dist/utils/is-dev-env.js +1 -1
  494. package/dist/utils/modules.js +1 -1
  495. package/dist/utils/promise.js +1 -1
  496. package/dist/utils/raf.js +1 -1
  497. package/dist/utils/random.js +1 -1
  498. package/dist/utils/range.js +1 -1
  499. package/dist/utils/react/RenderCache.js +1 -1
  500. package/dist/utils/react/Slots.js +1 -1
  501. package/dist/utils/react/chain.js +1 -1
  502. package/dist/utils/react/forwardRefWithGenerics.js +1 -1
  503. package/dist/utils/react/index.js +1 -1
  504. package/dist/utils/react/interactions.js +1 -1
  505. package/dist/utils/react/isTextOnly.js +1 -1
  506. package/dist/utils/react/mapProps.js +1 -1
  507. package/dist/utils/react/mergeProps.js +1 -1
  508. package/dist/utils/react/nullableValue.js +1 -1
  509. package/dist/utils/react/resolveIcon.js +1 -1
  510. package/dist/utils/react/sharedStore.js +1 -1
  511. package/dist/utils/react/useCombinedRefs.js +1 -1
  512. package/dist/utils/react/useControlledFocusVisible.js +1 -1
  513. package/dist/utils/react/useEventBus.js +1 -1
  514. package/dist/utils/react/useId.js +1 -1
  515. package/dist/utils/react/useIsDarwin.js +1 -1
  516. package/dist/utils/react/useKeySymbols.js +1 -1
  517. package/dist/utils/react/useLayoutEffect.js +1 -1
  518. package/dist/utils/react/useLocalStorage.js +1 -1
  519. package/dist/utils/react/useMergeStyles.js +1 -1
  520. package/dist/utils/react/usePopoverSync.js +1 -1
  521. package/dist/utils/react/useQaProps.js +1 -1
  522. package/dist/utils/react/useViewportSize.js +1 -1
  523. package/dist/utils/react/wrapNodeIfPlain.js +1 -1
  524. package/dist/utils/selection.js +1 -1
  525. package/dist/utils/styles.js +1 -1
  526. package/dist/utils/tree.js +1 -1
  527. package/dist/utils/warnings.js +1 -1
  528. package/dist/version.js +2 -2
  529. package/docs/components/Root.md +15 -1
  530. package/package.json +3 -1
  531. package/dist/components/fields/DatePicker/intl.js +0 -11
  532. package/dist/components/fields/DatePicker/intl.js.map +0 -1
@@ -0,0 +1,59 @@
1
+
2
+ //#region src/i18n/createFormatter.d.ts
3
+ /**
4
+ * A value acceptable to the date/time formatters. Named `FormatDateInput` (not
5
+ * `DateInput`) to avoid clashing with the exported `DateInput` DatePicker field.
6
+ */
7
+ type FormatDateInput = Date | number | string;
8
+ interface RelativeTimeOptions {
9
+ /** Reference point the value is compared against. Defaults to `Date.now()`. */
10
+ now?: FormatDateInput;
11
+ /** Passed to `Intl.RelativeTimeFormat`. Defaults to `'auto'` ("yesterday"). */
12
+ numeric?: Intl.RelativeTimeFormatNumeric;
13
+ /** Passed to `Intl.RelativeTimeFormat`. Defaults to `'long'`. */
14
+ style?: Intl.RelativeTimeFormatStyle;
15
+ }
16
+ interface CurrencyOptions extends Intl.NumberFormatOptions {
17
+ /** ISO 4217 currency code. Defaults to `'USD'`. */
18
+ currency?: string;
19
+ }
20
+ interface BytesOptions {
21
+ /** How the unit label is displayed. Defaults to `'short'` ("MB"). */
22
+ unitDisplay?: Intl.NumberFormatOptions['unitDisplay'];
23
+ /** Max fraction digits. Defaults to `1`. */
24
+ maximumFractionDigits?: number;
25
+ /** Min fraction digits. Defaults to `0`. */
26
+ minimumFractionDigits?: number;
27
+ }
28
+ /** The bundle of locale-bound formatting helpers. */
29
+ interface Formatter {
30
+ /** The BCP-47 locale every helper below formats for. */
31
+ locale: string;
32
+ /** Date only, defaults to `{ dateStyle: 'medium' }` ("Jan 15, 2024"). */
33
+ formatDate: (value: FormatDateInput, options?: Intl.DateTimeFormatOptions) => string;
34
+ /** Time only, defaults to `{ timeStyle: 'short' }` ("2:30 PM"). */
35
+ formatTime: (value: FormatDateInput, options?: Intl.DateTimeFormatOptions) => string;
36
+ /** Date + time, defaults to `{ dateStyle: 'medium', timeStyle: 'short' }`. */
37
+ formatDateTime: (value: FormatDateInput, options?: Intl.DateTimeFormatOptions) => string;
38
+ /** Relative time via `Intl.RelativeTimeFormat` ("5 minutes ago"). */
39
+ formatRelativeTime: (value: FormatDateInput, options?: RelativeTimeOptions) => string;
40
+ /** A number via `Intl.NumberFormat`. */
41
+ formatNumber: (value: number, options?: Intl.NumberFormatOptions) => string;
42
+ /** A currency amount, defaults to USD. */
43
+ formatCurrency: (value: number, options?: CurrencyOptions) => string;
44
+ /** A percentage. Input is a fraction: `0.5` → "50%". */
45
+ formatPercent: (value: number, options?: Intl.NumberFormatOptions) => string;
46
+ /** A byte count with a localized, auto-scaled unit ("1.5 MB"). Decimal (1000-based). */
47
+ formatBytes: (value: number, options?: BytesOptions) => string;
48
+ /** A list via `Intl.ListFormat` ("A, B, and C"). */
49
+ formatList: (items: Iterable<string>, options?: Intl.ListFormatOptions) => string;
50
+ }
51
+ /**
52
+ * Builds a bundle of formatting helpers bound to `locale`. Used by both
53
+ * `useFormatter()` (locale from React Aria context) and the pure top-level
54
+ * helpers (locale from the module mirror). All `Intl.*` instances are memoized.
55
+ */
56
+ declare function createFormatter(locale: string): Formatter;
57
+ //#endregion
58
+ export { BytesOptions, CurrencyOptions, FormatDateInput, Formatter, RelativeTimeOptions, createFormatter };
59
+ //# sourceMappingURL=createFormatter.d.ts.map
@@ -0,0 +1,148 @@
1
+ /** @license MIT | @cube-dev/ui-kit v0.146.0 | Cube Dev Team */
2
+ //#region src/i18n/createFormatter.ts
3
+ const cache = /* @__PURE__ */ new Map();
4
+ function getIntl(kind, Ctor, locale, options) {
5
+ const key = `${locale}|${kind}|${options ? JSON.stringify(options) : ""}`;
6
+ let instance = cache.get(key);
7
+ if (!instance) {
8
+ instance = new Ctor(locale, options);
9
+ cache.set(key, instance);
10
+ }
11
+ return instance;
12
+ }
13
+ function toDate(value) {
14
+ const date = value instanceof Date ? value : new Date(value);
15
+ return Number.isNaN(date.getTime()) ? null : date;
16
+ }
17
+ const BYTE_UNITS = [
18
+ "byte",
19
+ "kilobyte",
20
+ "megabyte",
21
+ "gigabyte",
22
+ "terabyte",
23
+ "petabyte"
24
+ ];
25
+ const RELATIVE_DIVISIONS = [
26
+ {
27
+ amount: 60,
28
+ unit: "second"
29
+ },
30
+ {
31
+ amount: 60,
32
+ unit: "minute"
33
+ },
34
+ {
35
+ amount: 24,
36
+ unit: "hour"
37
+ },
38
+ {
39
+ amount: 7,
40
+ unit: "day"
41
+ },
42
+ {
43
+ amount: 4.34524,
44
+ unit: "week"
45
+ },
46
+ {
47
+ amount: 12,
48
+ unit: "month"
49
+ },
50
+ {
51
+ amount: Number.POSITIVE_INFINITY,
52
+ unit: "year"
53
+ }
54
+ ];
55
+ /**
56
+ * Builds a bundle of formatting helpers bound to `locale`. Used by both
57
+ * `useFormatter()` (locale from React Aria context) and the pure top-level
58
+ * helpers (locale from the module mirror). All `Intl.*` instances are memoized.
59
+ */
60
+ function createFormatter(locale) {
61
+ const formatDate = (value, options) => {
62
+ const date = toDate(value);
63
+ if (!date) return "";
64
+ return getIntl("date", Intl.DateTimeFormat, locale, {
65
+ dateStyle: "medium",
66
+ ...options
67
+ }).format(date);
68
+ };
69
+ const formatTime = (value, options) => {
70
+ const date = toDate(value);
71
+ if (!date) return "";
72
+ return getIntl("date", Intl.DateTimeFormat, locale, {
73
+ timeStyle: "short",
74
+ ...options
75
+ }).format(date);
76
+ };
77
+ const formatDateTime = (value, options) => {
78
+ const date = toDate(value);
79
+ if (!date) return "";
80
+ return getIntl("date", Intl.DateTimeFormat, locale, {
81
+ dateStyle: "medium",
82
+ timeStyle: "short",
83
+ ...options
84
+ }).format(date);
85
+ };
86
+ const formatRelativeTime = (value, options) => {
87
+ const date = toDate(value);
88
+ if (!date) return "";
89
+ const now = options?.now != null ? toDate(options.now) : /* @__PURE__ */ new Date();
90
+ if (!now) return "";
91
+ const rtf = getIntl("relative", Intl.RelativeTimeFormat, locale, {
92
+ numeric: options?.numeric ?? "auto",
93
+ style: options?.style ?? "long"
94
+ });
95
+ let duration = (date.getTime() - now.getTime()) / 1e3;
96
+ for (const division of RELATIVE_DIVISIONS) {
97
+ if (Math.abs(duration) < division.amount) return rtf.format(Math.round(duration), division.unit);
98
+ duration /= division.amount;
99
+ }
100
+ return rtf.format(Math.round(duration), "year");
101
+ };
102
+ const formatNumber = (value, options) => getIntl("number", Intl.NumberFormat, locale, options).format(value);
103
+ const formatCurrency = (value, options) => {
104
+ const { currency = "USD", ...rest } = options ?? {};
105
+ return getIntl("number", Intl.NumberFormat, locale, {
106
+ style: "currency",
107
+ currency,
108
+ ...rest
109
+ }).format(value);
110
+ };
111
+ const formatPercent = (value, options) => getIntl("number", Intl.NumberFormat, locale, {
112
+ style: "percent",
113
+ ...options
114
+ }).format(value);
115
+ const formatBytes = (value, options) => {
116
+ const sign = value < 0 ? -1 : 1;
117
+ let bytes = Math.abs(value);
118
+ let unitIndex = 0;
119
+ while (bytes >= 1e3 && unitIndex < BYTE_UNITS.length - 1) {
120
+ bytes /= 1e3;
121
+ unitIndex++;
122
+ }
123
+ return getIntl("number", Intl.NumberFormat, locale, {
124
+ style: "unit",
125
+ unit: BYTE_UNITS[unitIndex],
126
+ unitDisplay: options?.unitDisplay ?? "short",
127
+ minimumFractionDigits: options?.minimumFractionDigits ?? 0,
128
+ maximumFractionDigits: options?.maximumFractionDigits ?? (unitIndex === 0 ? 0 : 1)
129
+ }).format(sign * bytes);
130
+ };
131
+ const formatList = (items, options) => getIntl("list", Intl.ListFormat, locale, options).format(items);
132
+ return {
133
+ locale,
134
+ formatDate,
135
+ formatTime,
136
+ formatDateTime,
137
+ formatRelativeTime,
138
+ formatNumber,
139
+ formatCurrency,
140
+ formatPercent,
141
+ formatBytes,
142
+ formatList
143
+ };
144
+ }
145
+
146
+ //#endregion
147
+ export { createFormatter };
148
+ //# sourceMappingURL=createFormatter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createFormatter.js","names":[],"sources":["../../src/i18n/createFormatter.ts"],"sourcesContent":["/**\n * A value acceptable to the date/time formatters. Named `FormatDateInput` (not\n * `DateInput`) to avoid clashing with the exported `DateInput` DatePicker field.\n */\nexport type FormatDateInput = Date | number | string;\n\nexport interface RelativeTimeOptions {\n /** Reference point the value is compared against. Defaults to `Date.now()`. */\n now?: FormatDateInput;\n /** Passed to `Intl.RelativeTimeFormat`. Defaults to `'auto'` (\"yesterday\"). */\n numeric?: Intl.RelativeTimeFormatNumeric;\n /** Passed to `Intl.RelativeTimeFormat`. Defaults to `'long'`. */\n style?: Intl.RelativeTimeFormatStyle;\n}\n\nexport interface CurrencyOptions extends Intl.NumberFormatOptions {\n /** ISO 4217 currency code. Defaults to `'USD'`. */\n currency?: string;\n}\n\nexport interface BytesOptions {\n /** How the unit label is displayed. Defaults to `'short'` (\"MB\"). */\n unitDisplay?: Intl.NumberFormatOptions['unitDisplay'];\n /** Max fraction digits. Defaults to `1`. */\n maximumFractionDigits?: number;\n /** Min fraction digits. Defaults to `0`. */\n minimumFractionDigits?: number;\n}\n\n/** The bundle of locale-bound formatting helpers. */\nexport interface Formatter {\n /** The BCP-47 locale every helper below formats for. */\n locale: string;\n /** Date only, defaults to `{ dateStyle: 'medium' }` (\"Jan 15, 2024\"). */\n formatDate: (\n value: FormatDateInput,\n options?: Intl.DateTimeFormatOptions,\n ) => string;\n /** Time only, defaults to `{ timeStyle: 'short' }` (\"2:30 PM\"). */\n formatTime: (\n value: FormatDateInput,\n options?: Intl.DateTimeFormatOptions,\n ) => string;\n /** Date + time, defaults to `{ dateStyle: 'medium', timeStyle: 'short' }`. */\n formatDateTime: (\n value: FormatDateInput,\n options?: Intl.DateTimeFormatOptions,\n ) => string;\n /** Relative time via `Intl.RelativeTimeFormat` (\"5 minutes ago\"). */\n formatRelativeTime: (\n value: FormatDateInput,\n options?: RelativeTimeOptions,\n ) => string;\n /** A number via `Intl.NumberFormat`. */\n formatNumber: (value: number, options?: Intl.NumberFormatOptions) => string;\n /** A currency amount, defaults to USD. */\n formatCurrency: (value: number, options?: CurrencyOptions) => string;\n /** A percentage. Input is a fraction: `0.5` → \"50%\". */\n formatPercent: (value: number, options?: Intl.NumberFormatOptions) => string;\n /** A byte count with a localized, auto-scaled unit (\"1.5 MB\"). Decimal (1000-based). */\n formatBytes: (value: number, options?: BytesOptions) => string;\n /** A list via `Intl.ListFormat` (\"A, B, and C\"). */\n formatList: (\n items: Iterable<string>,\n options?: Intl.ListFormatOptions,\n ) => string;\n}\n\ntype IntlCtor =\n | typeof Intl.DateTimeFormat\n | typeof Intl.NumberFormat\n | typeof Intl.RelativeTimeFormat\n | typeof Intl.ListFormat;\n\n// `Intl.*` constructors are expensive, so instances are memoized by\n// locale + kind + options. Shared by both the hook and the pure helpers.\nconst cache = new Map<string, unknown>();\n\nfunction getIntl<T>(\n kind: string,\n Ctor: IntlCtor,\n locale: string,\n options: object | undefined,\n): T {\n const key = `${locale}|${kind}|${options ? JSON.stringify(options) : ''}`;\n let instance = cache.get(key);\n\n if (!instance) {\n instance = new (Ctor as new (locale: string, options?: object) => unknown)(\n locale,\n options,\n );\n cache.set(key, instance);\n }\n\n return instance as T;\n}\n\nfunction toDate(value: FormatDateInput): Date | null {\n const date =\n value instanceof Date ? value : new Date(value as string | number);\n\n return Number.isNaN(date.getTime()) ? null : date;\n}\n\n// Decimal (1000-based) byte units. `Intl` localizes the unit label itself, so we\n// only pick which one fits the magnitude.\nconst BYTE_UNITS = [\n 'byte',\n 'kilobyte',\n 'megabyte',\n 'gigabyte',\n 'terabyte',\n 'petabyte',\n] as const;\n\n// Largest-fitting-unit thresholds for relative time. Each `amount` is how many\n// of the current unit make up the next one.\nconst RELATIVE_DIVISIONS: {\n amount: number;\n unit: Intl.RelativeTimeFormatUnit;\n}[] = [\n { amount: 60, unit: 'second' },\n { amount: 60, unit: 'minute' },\n { amount: 24, unit: 'hour' },\n { amount: 7, unit: 'day' },\n { amount: 4.34524, unit: 'week' },\n { amount: 12, unit: 'month' },\n { amount: Number.POSITIVE_INFINITY, unit: 'year' },\n];\n\n/**\n * Builds a bundle of formatting helpers bound to `locale`. Used by both\n * `useFormatter()` (locale from React Aria context) and the pure top-level\n * helpers (locale from the module mirror). All `Intl.*` instances are memoized.\n */\nexport function createFormatter(locale: string): Formatter {\n const formatDate: Formatter['formatDate'] = (value, options) => {\n const date = toDate(value);\n if (!date) return '';\n\n return getIntl<Intl.DateTimeFormat>('date', Intl.DateTimeFormat, locale, {\n dateStyle: 'medium',\n ...options,\n }).format(date);\n };\n\n const formatTime: Formatter['formatTime'] = (value, options) => {\n const date = toDate(value);\n if (!date) return '';\n\n return getIntl<Intl.DateTimeFormat>('date', Intl.DateTimeFormat, locale, {\n timeStyle: 'short',\n ...options,\n }).format(date);\n };\n\n const formatDateTime: Formatter['formatDateTime'] = (value, options) => {\n const date = toDate(value);\n if (!date) return '';\n\n return getIntl<Intl.DateTimeFormat>('date', Intl.DateTimeFormat, locale, {\n dateStyle: 'medium',\n timeStyle: 'short',\n ...options,\n }).format(date);\n };\n\n const formatRelativeTime: Formatter['formatRelativeTime'] = (\n value,\n options,\n ) => {\n const date = toDate(value);\n if (!date) return '';\n\n const now = options?.now != null ? toDate(options.now) : new Date();\n if (!now) return '';\n\n const rtf = getIntl<Intl.RelativeTimeFormat>(\n 'relative',\n Intl.RelativeTimeFormat,\n locale,\n {\n numeric: options?.numeric ?? 'auto',\n style: options?.style ?? 'long',\n },\n );\n\n let duration = (date.getTime() - now.getTime()) / 1000;\n\n for (const division of RELATIVE_DIVISIONS) {\n if (Math.abs(duration) < division.amount) {\n return rtf.format(Math.round(duration), division.unit);\n }\n duration /= division.amount;\n }\n\n return rtf.format(Math.round(duration), 'year');\n };\n\n const formatNumber: Formatter['formatNumber'] = (value, options) =>\n getIntl<Intl.NumberFormat>(\n 'number',\n Intl.NumberFormat,\n locale,\n options,\n ).format(value);\n\n const formatCurrency: Formatter['formatCurrency'] = (value, options) => {\n const { currency = 'USD', ...rest } = options ?? {};\n\n return getIntl<Intl.NumberFormat>('number', Intl.NumberFormat, locale, {\n style: 'currency',\n currency,\n ...rest,\n }).format(value);\n };\n\n const formatPercent: Formatter['formatPercent'] = (value, options) =>\n getIntl<Intl.NumberFormat>('number', Intl.NumberFormat, locale, {\n style: 'percent',\n ...options,\n }).format(value);\n\n const formatBytes: Formatter['formatBytes'] = (value, options) => {\n const sign = value < 0 ? -1 : 1;\n let bytes = Math.abs(value);\n let unitIndex = 0;\n\n while (bytes >= 1000 && unitIndex < BYTE_UNITS.length - 1) {\n bytes /= 1000;\n unitIndex++;\n }\n\n return getIntl<Intl.NumberFormat>('number', Intl.NumberFormat, locale, {\n style: 'unit',\n unit: BYTE_UNITS[unitIndex],\n unitDisplay: options?.unitDisplay ?? 'short',\n // Bytes (the base unit) are integers; scaled units get 1 fraction digit.\n minimumFractionDigits: options?.minimumFractionDigits ?? 0,\n maximumFractionDigits:\n options?.maximumFractionDigits ?? (unitIndex === 0 ? 0 : 1),\n }).format(sign * bytes);\n };\n\n const formatList: Formatter['formatList'] = (items, options) =>\n getIntl<Intl.ListFormat>('list', Intl.ListFormat, locale, options).format(\n items,\n );\n\n return {\n locale,\n formatDate,\n formatTime,\n formatDateTime,\n formatRelativeTime,\n formatNumber,\n formatCurrency,\n formatPercent,\n formatBytes,\n formatList,\n };\n}\n"],"mappings":";;AA4EA,MAAM,wBAAQ,IAAI,KAAsB;AAExC,SAAS,QACP,MACA,MACA,QACA,SACG;CACH,MAAM,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,UAAU,KAAK,UAAU,QAAQ,GAAG;CACrE,IAAI,WAAW,MAAM,IAAI,IAAI;AAE7B,KAAI,CAAC,UAAU;AACb,aAAW,IAAK,KACd,QACA,QACD;AACD,QAAM,IAAI,KAAK,SAAS;;AAG1B,QAAO;;AAGT,SAAS,OAAO,OAAqC;CACnD,MAAM,OACJ,iBAAiB,OAAO,QAAQ,IAAI,KAAK,MAAyB;AAEpE,QAAO,OAAO,MAAM,KAAK,SAAS,CAAC,GAAG,OAAO;;AAK/C,MAAM,aAAa;CACjB;CACA;CACA;CACA;CACA;CACA;CACD;AAID,MAAM,qBAGA;CACJ;EAAE,QAAQ;EAAI,MAAM;EAAU;CAC9B;EAAE,QAAQ;EAAI,MAAM;EAAU;CAC9B;EAAE,QAAQ;EAAI,MAAM;EAAQ;CAC5B;EAAE,QAAQ;EAAG,MAAM;EAAO;CAC1B;EAAE,QAAQ;EAAS,MAAM;EAAQ;CACjC;EAAE,QAAQ;EAAI,MAAM;EAAS;CAC7B;EAAE,QAAQ,OAAO;EAAmB,MAAM;EAAQ;CACnD;;;;;;AAOD,SAAgB,gBAAgB,QAA2B;CACzD,MAAM,cAAuC,OAAO,YAAY;EAC9D,MAAM,OAAO,OAAO,MAAM;AAC1B,MAAI,CAAC,KAAM,QAAO;AAElB,SAAO,QAA6B,QAAQ,KAAK,gBAAgB,QAAQ;GACvE,WAAW;GACX,GAAG;GACJ,CAAC,CAAC,OAAO,KAAK;;CAGjB,MAAM,cAAuC,OAAO,YAAY;EAC9D,MAAM,OAAO,OAAO,MAAM;AAC1B,MAAI,CAAC,KAAM,QAAO;AAElB,SAAO,QAA6B,QAAQ,KAAK,gBAAgB,QAAQ;GACvE,WAAW;GACX,GAAG;GACJ,CAAC,CAAC,OAAO,KAAK;;CAGjB,MAAM,kBAA+C,OAAO,YAAY;EACtE,MAAM,OAAO,OAAO,MAAM;AAC1B,MAAI,CAAC,KAAM,QAAO;AAElB,SAAO,QAA6B,QAAQ,KAAK,gBAAgB,QAAQ;GACvE,WAAW;GACX,WAAW;GACX,GAAG;GACJ,CAAC,CAAC,OAAO,KAAK;;CAGjB,MAAM,sBACJ,OACA,YACG;EACH,MAAM,OAAO,OAAO,MAAM;AAC1B,MAAI,CAAC,KAAM,QAAO;EAElB,MAAM,MAAM,SAAS,OAAO,OAAO,OAAO,QAAQ,IAAI,mBAAG,IAAI,MAAM;AACnE,MAAI,CAAC,IAAK,QAAO;EAEjB,MAAM,MAAM,QACV,YACA,KAAK,oBACL,QACA;GACE,SAAS,SAAS,WAAW;GAC7B,OAAO,SAAS,SAAS;GAC1B,CACF;EAED,IAAI,YAAY,KAAK,SAAS,GAAG,IAAI,SAAS,IAAI;AAElD,OAAK,MAAM,YAAY,oBAAoB;AACzC,OAAI,KAAK,IAAI,SAAS,GAAG,SAAS,OAChC,QAAO,IAAI,OAAO,KAAK,MAAM,SAAS,EAAE,SAAS,KAAK;AAExD,eAAY,SAAS;;AAGvB,SAAO,IAAI,OAAO,KAAK,MAAM,SAAS,EAAE,OAAO;;CAGjD,MAAM,gBAA2C,OAAO,YACtD,QACE,UACA,KAAK,cACL,QACA,QACD,CAAC,OAAO,MAAM;CAEjB,MAAM,kBAA+C,OAAO,YAAY;EACtE,MAAM,EAAE,WAAW,OAAO,GAAG,SAAS,WAAW,EAAE;AAEnD,SAAO,QAA2B,UAAU,KAAK,cAAc,QAAQ;GACrE,OAAO;GACP;GACA,GAAG;GACJ,CAAC,CAAC,OAAO,MAAM;;CAGlB,MAAM,iBAA6C,OAAO,YACxD,QAA2B,UAAU,KAAK,cAAc,QAAQ;EAC9D,OAAO;EACP,GAAG;EACJ,CAAC,CAAC,OAAO,MAAM;CAElB,MAAM,eAAyC,OAAO,YAAY;EAChE,MAAM,OAAO,QAAQ,IAAI,KAAK;EAC9B,IAAI,QAAQ,KAAK,IAAI,MAAM;EAC3B,IAAI,YAAY;AAEhB,SAAO,SAAS,OAAQ,YAAY,WAAW,SAAS,GAAG;AACzD,YAAS;AACT;;AAGF,SAAO,QAA2B,UAAU,KAAK,cAAc,QAAQ;GACrE,OAAO;GACP,MAAM,WAAW;GACjB,aAAa,SAAS,eAAe;GAErC,uBAAuB,SAAS,yBAAyB;GACzD,uBACE,SAAS,0BAA0B,cAAc,IAAI,IAAI;GAC5D,CAAC,CAAC,OAAO,OAAO,MAAM;;CAGzB,MAAM,cAAuC,OAAO,YAClD,QAAyB,QAAQ,KAAK,YAAY,QAAQ,QAAQ,CAAC,OACjE,MACD;AAEH,QAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD"}
@@ -0,0 +1,18 @@
1
+
2
+ import { UIKIT_I18N_NAMESPACE, UIKitResources, createUIKitI18n, getI18n } from "./instance.js";
3
+ import "./useI18n.js";
4
+ import { I18nProvider, I18nProviderProps } from "./I18nProvider.js";
5
+ import { BytesOptions, CurrencyOptions, FormatDateInput, Formatter, RelativeTimeOptions, createFormatter } from "./createFormatter.js";
6
+ import { useFormatter } from "./useFormatter.js";
7
+ import { LOCALE_LABELS, SUPPORTED_LOCALES, SupportedLocale, isSupportedLocale } from "./locales.js";
8
+
9
+ //#region src/i18n/index.d.ts
10
+ /**
11
+ * Register (or override) the UI Kit translation bundle for a locale. Use this
12
+ * to add languages beyond the ones the UI Kit ships, or to override individual
13
+ * strings. Applied to the shared instance so it takes effect immediately.
14
+ */
15
+ declare function addUIKitLocale(locale: string, resources: Partial<UIKitResources>): void;
16
+ //#endregion
17
+ export { addUIKitLocale };
18
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,21 @@
1
+ /** @license MIT | @cube-dev/ui-kit v0.146.0 | Cube Dev Team */
2
+ import { LOCALE_LABELS, SUPPORTED_LOCALES, isSupportedLocale } from "./locales.js";
3
+ import { UIKIT_I18N_NAMESPACE, createUIKitI18n, getI18n } from "./instance.js";
4
+ import { useI18n } from "./useI18n.js";
5
+ import { I18nProvider } from "./I18nProvider.js";
6
+ import { createFormatter } from "./createFormatter.js";
7
+ import { useFormatter } from "./useFormatter.js";
8
+
9
+ //#region src/i18n/index.ts
10
+ /**
11
+ * Register (or override) the UI Kit translation bundle for a locale. Use this
12
+ * to add languages beyond the ones the UI Kit ships, or to override individual
13
+ * strings. Applied to the shared instance so it takes effect immediately.
14
+ */
15
+ function addUIKitLocale(locale, resources) {
16
+ getI18n().addResourceBundle(locale, UIKIT_I18N_NAMESPACE, resources, true, true);
17
+ }
18
+
19
+ //#endregion
20
+ export { addUIKitLocale };
21
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../src/i18n/index.ts"],"sourcesContent":["import { getI18n, UIKIT_I18N_NAMESPACE } from './instance';\n\nimport type { UIKitResources } from './instance';\n\nexport { createUIKitI18n, getI18n, UIKIT_I18N_NAMESPACE } from './instance';\nexport type { UIKitResources } from './instance';\n// Internal hook — used by UI Kit components to read their own strings. Not part\n// of the public barrel (`src/index.ts`); hosts use the re-exported\n// `useTranslation` for their own strings.\nexport { useI18n } from './useI18n';\nexport { I18nProvider } from './I18nProvider';\nexport type { I18nProviderProps } from './I18nProvider';\nexport { createFormatter } from './createFormatter';\nexport type {\n Formatter,\n FormatDateInput,\n RelativeTimeOptions,\n CurrencyOptions,\n BytesOptions,\n} from './createFormatter';\nexport { useFormatter } from './useFormatter';\nexport { SUPPORTED_LOCALES, LOCALE_LABELS, isSupportedLocale } from './locales';\nexport type { SupportedLocale } from './locales';\n\n/**\n * Register (or override) the UI Kit translation bundle for a locale. Use this\n * to add languages beyond the ones the UI Kit ships, or to override individual\n * strings. Applied to the shared instance so it takes effect immediately.\n */\nexport function addUIKitLocale(\n locale: string,\n resources: Partial<UIKitResources>,\n): void {\n getI18n().addResourceBundle(\n locale,\n UIKIT_I18N_NAMESPACE,\n resources,\n true,\n true,\n );\n}\n"],"mappings":";;;;;;;;;;;;;;AA6BA,SAAgB,eACd,QACA,WACM;AACN,UAAS,CAAC,kBACR,QACA,sBACA,WACA,MACA,KACD"}
@@ -0,0 +1,22 @@
1
+
2
+ import { __json_default_export } from "./locales/en-US/uikit.json.js";
3
+ import { i18n } from "i18next";
4
+
5
+ //#region src/i18n/instance.d.ts
6
+ /** The dedicated namespace all UI Kit strings live under. */
7
+ declare const UIKIT_I18N_NAMESPACE = "uikit";
8
+ /** Shape of the UI Kit translation bundle (the `en-US` source of truth). */
9
+ type UIKitResources = typeof __json_default_export;
10
+ /**
11
+ * Creates an isolated, synchronously initialized UI Kit i18next instance.
12
+ *
13
+ * Create one per server request and pass it to `<Root i18n={instance}>` (or
14
+ * `<I18nProvider i18n={instance}>`). Its language can then be changed without
15
+ * racing with another request rendered by the same server process.
16
+ */
17
+ declare function createUIKitI18n(locale?: string): i18n;
18
+ /** Returns the shared UI Kit i18next instance. */
19
+ declare function getI18n(): i18n;
20
+ //#endregion
21
+ export { UIKIT_I18N_NAMESPACE, UIKitResources, createUIKitI18n, getI18n };
22
+ //# sourceMappingURL=instance.d.ts.map
@@ -0,0 +1,78 @@
1
+ /** @license MIT | @cube-dev/ui-kit v0.146.0 | Cube Dev Team */
2
+ import { SUPPORTED_LOCALES } from "./locales.js";
3
+ import uikit_default from "./locales/de-DE/uikit.js";
4
+ import uikit_default$1 from "./locales/en-US/uikit.js";
5
+ import uikit_default$2 from "./locales/es-ES/uikit.js";
6
+ import uikit_default$3 from "./locales/es-MX/uikit.js";
7
+ import uikit_default$4 from "./locales/fr-FR/uikit.js";
8
+ import uikit_default$5 from "./locales/it-IT/uikit.js";
9
+ import uikit_default$6 from "./locales/ja-JP/uikit.js";
10
+ import uikit_default$7 from "./locales/nb-NO/uikit.js";
11
+ import uikit_default$8 from "./locales/pt-BR/uikit.js";
12
+ import uikit_default$9 from "./locales/pt-PT/uikit.js";
13
+ import uikit_default$10 from "./locales/sv-SE/uikit.js";
14
+ import uikit_default$11 from "./locales/vi-VN/uikit.js";
15
+ import i18next from "i18next";
16
+ import { initReactI18next } from "react-i18next";
17
+
18
+ //#region src/i18n/instance.ts
19
+ /** The dedicated namespace all UI Kit strings live under. */
20
+ const UIKIT_I18N_NAMESPACE = "uikit";
21
+ const BUNDLES = {
22
+ "en-US": uikit_default$1,
23
+ "de-DE": uikit_default,
24
+ "es-ES": uikit_default$2,
25
+ "es-MX": uikit_default$3,
26
+ "fr-FR": uikit_default$4,
27
+ "it-IT": uikit_default$5,
28
+ "ja-JP": uikit_default$6,
29
+ "nb-NO": uikit_default$7,
30
+ "pt-BR": uikit_default$8,
31
+ "pt-PT": uikit_default$9,
32
+ "sv-SE": uikit_default$10,
33
+ "vi-VN": uikit_default$11
34
+ };
35
+ const DEFAULT_OPTIONS = {
36
+ resources: Object.fromEntries(SUPPORTED_LOCALES.map((locale) => [locale, { [UIKIT_I18N_NAMESPACE]: BUNDLES[locale] }])),
37
+ lng: "en-US",
38
+ fallbackLng: "en-US",
39
+ load: "currentOnly",
40
+ defaultNS: UIKIT_I18N_NAMESPACE,
41
+ ns: [UIKIT_I18N_NAMESPACE],
42
+ interpolation: { escapeValue: false },
43
+ returnNull: false,
44
+ returnEmptyString: true,
45
+ initAsync: false,
46
+ react: { useSuspense: false },
47
+ enableSelector: true
48
+ };
49
+ /**
50
+ * Creates an isolated, synchronously initialized UI Kit i18next instance.
51
+ *
52
+ * Create one per server request and pass it to `<Root i18n={instance}>` (or
53
+ * `<I18nProvider i18n={instance}>`). Its language can then be changed without
54
+ * racing with another request rendered by the same server process.
55
+ */
56
+ function createUIKitI18n(locale = "en-US") {
57
+ const isolatedInstance = i18next.createInstance();
58
+ isolatedInstance.init({
59
+ ...DEFAULT_OPTIONS,
60
+ lng: locale
61
+ });
62
+ return isolatedInstance;
63
+ }
64
+ /**
65
+ * The browser-friendly default instance. Existing hosts can continue to drive
66
+ * it through `getI18n()`. Concurrent server renders must use a request-local
67
+ * instance from `createUIKitI18n()` instead.
68
+ */
69
+ const instance = i18next.createInstance();
70
+ instance.use(initReactI18next).init(DEFAULT_OPTIONS);
71
+ /** Returns the shared UI Kit i18next instance. */
72
+ function getI18n() {
73
+ return instance;
74
+ }
75
+
76
+ //#endregion
77
+ export { UIKIT_I18N_NAMESPACE, createUIKitI18n, getI18n };
78
+ //# sourceMappingURL=instance.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"instance.js","names":["enUS","deDE","esES","esMX","frFR","itIT","jaJP","nbNO","ptBR","ptPT","svSE","viVN"],"sources":["../../src/i18n/instance.ts"],"sourcesContent":["import i18next from 'i18next';\nimport { initReactI18next } from 'react-i18next';\n\nimport { SUPPORTED_LOCALES } from './locales';\nimport deDE from './locales/de-DE/uikit.json';\nimport enUS from './locales/en-US/uikit.json';\nimport esES from './locales/es-ES/uikit.json';\nimport esMX from './locales/es-MX/uikit.json';\nimport frFR from './locales/fr-FR/uikit.json';\nimport itIT from './locales/it-IT/uikit.json';\nimport jaJP from './locales/ja-JP/uikit.json';\nimport nbNO from './locales/nb-NO/uikit.json';\nimport ptBR from './locales/pt-BR/uikit.json';\nimport ptPT from './locales/pt-PT/uikit.json';\nimport svSE from './locales/sv-SE/uikit.json';\nimport viVN from './locales/vi-VN/uikit.json';\n\nimport type { i18n as I18nInstance, InitOptions } from 'i18next';\n\n/** The dedicated namespace all UI Kit strings live under. */\nexport const UIKIT_I18N_NAMESPACE = 'uikit';\n\n/** Shape of the UI Kit translation bundle (the `en-US` source of truth). */\nexport type UIKitResources = typeof enUS;\n\nconst BUNDLES: Record<(typeof SUPPORTED_LOCALES)[number], UIKitResources> = {\n 'en-US': enUS,\n 'de-DE': deDE,\n 'es-ES': esES,\n 'es-MX': esMX,\n 'fr-FR': frFR,\n 'it-IT': itIT,\n 'ja-JP': jaJP,\n 'nb-NO': nbNO,\n 'pt-BR': ptBR,\n 'pt-PT': ptPT,\n 'sv-SE': svSE,\n 'vi-VN': viVN,\n};\n\n// Every locale is tiny (~40 keys), so all are registered eagerly at init —\n// no code-splitting/loader machinery is needed.\nconst resources = Object.fromEntries(\n SUPPORTED_LOCALES.map((locale) => [\n locale,\n { [UIKIT_I18N_NAMESPACE]: BUNDLES[locale] },\n ]),\n);\n\nconst DEFAULT_OPTIONS: InitOptions = {\n resources,\n lng: 'en-US',\n fallbackLng: 'en-US',\n // Full BCP-47 codes only — don't let i18next strip `es-ES` to a bare `es`\n // bundle (which we don't ship); an unmatched code falls back to `en-US`.\n load: 'currentOnly',\n defaultNS: UIKIT_I18N_NAMESPACE,\n ns: [UIKIT_I18N_NAMESPACE],\n interpolation: { escapeValue: false },\n returnNull: false,\n returnEmptyString: true,\n // All resources are bundled synchronously at init, so the instance is ready\n // immediately — disable Suspense so components (and unit tests / SSR) render\n // translated text on the first pass without a Suspense boundary.\n initAsync: false,\n react: { useSuspense: false },\n // Proxy-based selector API (`t($ => $.a.b)`). UI Kit components use plain\n // string keys, but Cube Cloud drives this same instance with the selector\n // form, so enabling it here preserves that contract once Cloud consumes the\n // exported instance.\n enableSelector: true,\n};\n\n/**\n * Creates an isolated, synchronously initialized UI Kit i18next instance.\n *\n * Create one per server request and pass it to `<Root i18n={instance}>` (or\n * `<I18nProvider i18n={instance}>`). Its language can then be changed without\n * racing with another request rendered by the same server process.\n */\nexport function createUIKitI18n(locale = 'en-US'): I18nInstance {\n const isolatedInstance = i18next.createInstance();\n\n void isolatedInstance.init({\n ...DEFAULT_OPTIONS,\n lng: locale,\n });\n\n return isolatedInstance;\n}\n\n/**\n * The browser-friendly default instance. Existing hosts can continue to drive\n * it through `getI18n()`. Concurrent server renders must use a request-local\n * instance from `createUIKitI18n()` instead.\n */\nconst instance: I18nInstance = i18next.createInstance();\n\nvoid instance.use(initReactI18next).init(DEFAULT_OPTIONS);\n\n/** Returns the shared UI Kit i18next instance. */\nexport function getI18n(): I18nInstance {\n return instance;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAoBA,MAAa,uBAAuB;AAKpC,MAAM,UAAsE;CAC1E,SAASA;CACT,SAASC;CACT,SAASC;CACT,SAASC;CACT,SAASC;CACT,SAASC;CACT,SAASC;CACT,SAASC;CACT,SAASC;CACT,SAASC;CACT,SAASC;CACT,SAASC;CACV;AAWD,MAAM,kBAA+B;CACnC,WARgB,OAAO,YACvB,kBAAkB,KAAK,WAAW,CAChC,QACA,GAAG,uBAAuB,QAAQ,SAAS,CAC5C,CAAC,CACH;CAIC,KAAK;CACL,aAAa;CAGb,MAAM;CACN,WAAW;CACX,IAAI,CAAC,qBAAqB;CAC1B,eAAe,EAAE,aAAa,OAAO;CACrC,YAAY;CACZ,mBAAmB;CAInB,WAAW;CACX,OAAO,EAAE,aAAa,OAAO;CAK7B,gBAAgB;CACjB;;;;;;;;AASD,SAAgB,gBAAgB,SAAS,SAAuB;CAC9D,MAAM,mBAAmB,QAAQ,gBAAgB;AAEjD,CAAK,iBAAiB,KAAK;EACzB,GAAG;EACH,KAAK;EACN,CAAC;AAEF,QAAO;;;;;;;AAQT,MAAM,WAAyB,QAAQ,gBAAgB;AAElD,SAAS,IAAI,iBAAiB,CAAC,KAAK,gBAAgB;;AAGzD,SAAgB,UAAwB;AACtC,QAAO"}
@@ -0,0 +1,112 @@
1
+ /** @license MIT | @cube-dev/ui-kit v0.146.0 | Cube Dev Team */
2
+ //#region src/i18n/locales/de-DE/uikit.json
3
+ var uikit_default = {
4
+ alertDialog: {
5
+ "confirm": "OK",
6
+ "cancel": "Abbrechen"
7
+ },
8
+ dialog: { "dismiss": "Schließen" },
9
+ dialogForm: {
10
+ "submit": "Absenden",
11
+ "cancel": "Abbrechen"
12
+ },
13
+ form: {
14
+ "required": "(erforderlich)",
15
+ "optional": "(optional)",
16
+ "internalError": "Interner Fehler"
17
+ },
18
+ notifications: {
19
+ "dismiss": "Schließen",
20
+ "ariaLabel": "Benachrichtigungen",
21
+ "empty": "Keine Benachrichtigungen"
22
+ },
23
+ relativeTime: {
24
+ "justNow": "gerade eben",
25
+ "minAgo": "vor {{count}} Min.",
26
+ "hoursAgo": "vor {{count}} Std.",
27
+ "daysAgo": "vor {{count}} T.",
28
+ "weeksAgo": "vor {{count}} Wo.",
29
+ "monthsAgo": "vor {{count}} Mon.",
30
+ "yearsAgo": "vor {{count}} J."
31
+ },
32
+ toast: { "hide": "Ausblenden" },
33
+ listBox: {
34
+ "selectAll": "Alle auswählen",
35
+ "noItems": "Keine Einträge"
36
+ },
37
+ filterListBox: {
38
+ "searchPlaceholder": "Suchen...",
39
+ "noResults": "Keine Ergebnisse gefunden",
40
+ "noItems": "Keine Einträge",
41
+ "customValue": "Benutzerdefinierter Wert",
42
+ "filteredItems": "Gefilterte Einträge"
43
+ },
44
+ picker: {
45
+ "all": "Alle",
46
+ "pickerAriaLabel": "Auswahl"
47
+ },
48
+ comboBox: {
49
+ "clearValue": "Wert löschen",
50
+ "showOptions": "Optionen anzeigen"
51
+ },
52
+ commandMenu: {
53
+ "searchPlaceholder": "Befehle suchen...",
54
+ "empty": "Keine Befehle gefunden"
55
+ },
56
+ listBoxPopover: { "options": "Optionen" },
57
+ datePicker: {
58
+ "time": "Uhrzeit",
59
+ "startTime": "Startzeit",
60
+ "endTime": "Endzeit",
61
+ "showEndCalendar": "Kalender für das Enddatum anzeigen"
62
+ },
63
+ fileInput: {
64
+ "chooseFile": "Datei auswählen",
65
+ "noFileSelected": "Keine Datei ausgewählt"
66
+ },
67
+ passwordInput: { "toggleMasking": "Maskierung umschalten" },
68
+ numberInput: {
69
+ "stepUp": "Erhöhen",
70
+ "stepDown": "Verringern"
71
+ },
72
+ textInputMapper: {
73
+ "key": "Schlüssel",
74
+ "value": "Wert",
75
+ "removeMapping": "Zuordnung entfernen"
76
+ },
77
+ copySnippet: {
78
+ "title": "Codebeispiel",
79
+ "copyToClipboard": "{{title}} in die Zwischenablage kopieren",
80
+ "showHiddenParts": "Ausgeblendete Teile anzeigen",
81
+ "copied": "{{title}} kopiert"
82
+ },
83
+ copyPasteBlock: {
84
+ "copyToClipboard": "{{title}} in die Zwischenablage kopieren",
85
+ "selectAndPaste": "Auswählen und einfügen",
86
+ "invalidData": "Ungültige Daten",
87
+ "copied": "{{title}} kopiert",
88
+ "defaultTitle": "Text"
89
+ },
90
+ tag: { "close": "Schließen" },
91
+ placeholder: { "contentIsLoading": "Inhalt wird geladen" },
92
+ loadingAnimation: { "ariaLabel": "Ladeanimation" },
93
+ layout: {
94
+ "closePanel": "Panel schließen",
95
+ "goBack": "Zurück"
96
+ },
97
+ tree: { "actions": "Aktionen" },
98
+ banner: { "hideBanner": "Banner ausblenden" },
99
+ tabs: {
100
+ "close": "Schließen",
101
+ "editTabTitle": "Tab-Titel bearbeiten",
102
+ "selectTab": "Tab auswählen"
103
+ },
104
+ contextMenu: {
105
+ "openContextMenu": "Kontextmenü öffnen",
106
+ "contextMenu": "context-menu"
107
+ }
108
+ };
109
+
110
+ //#endregion
111
+ export { uikit_default as default };
112
+ //# sourceMappingURL=uikit.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uikit.js","names":[],"sources":["../../../../src/i18n/locales/de-DE/uikit.json"],"sourcesContent":[""],"mappings":""}
@@ -0,0 +1,112 @@
1
+ /** @license MIT | @cube-dev/ui-kit v0.146.0 | Cube Dev Team */
2
+ //#region src/i18n/locales/en-US/uikit.json
3
+ var uikit_default = {
4
+ alertDialog: {
5
+ "confirm": "Ok",
6
+ "cancel": "Cancel"
7
+ },
8
+ dialog: { "dismiss": "Dismiss" },
9
+ dialogForm: {
10
+ "submit": "Submit",
11
+ "cancel": "Cancel"
12
+ },
13
+ form: {
14
+ "required": "(required)",
15
+ "optional": "(optional)",
16
+ "internalError": "Internal error"
17
+ },
18
+ notifications: {
19
+ "dismiss": "Dismiss",
20
+ "ariaLabel": "Notifications",
21
+ "empty": "No notifications"
22
+ },
23
+ relativeTime: {
24
+ "justNow": "just now",
25
+ "minAgo": "{{count}} min ago",
26
+ "hoursAgo": "{{count}} h ago",
27
+ "daysAgo": "{{count}} d ago",
28
+ "weeksAgo": "{{count}} w ago",
29
+ "monthsAgo": "{{count}} mo ago",
30
+ "yearsAgo": "{{count}} y ago"
31
+ },
32
+ toast: { "hide": "Hide" },
33
+ listBox: {
34
+ "selectAll": "Select All",
35
+ "noItems": "No items"
36
+ },
37
+ filterListBox: {
38
+ "searchPlaceholder": "Search...",
39
+ "noResults": "No results found",
40
+ "noItems": "No items",
41
+ "customValue": "Custom value",
42
+ "filteredItems": "Filtered items"
43
+ },
44
+ picker: {
45
+ "all": "All",
46
+ "pickerAriaLabel": "Picker"
47
+ },
48
+ comboBox: {
49
+ "clearValue": "Clear value",
50
+ "showOptions": "Show options"
51
+ },
52
+ commandMenu: {
53
+ "searchPlaceholder": "Search commands...",
54
+ "empty": "No commands found"
55
+ },
56
+ listBoxPopover: { "options": "Options" },
57
+ datePicker: {
58
+ "time": "Time",
59
+ "startTime": "Start time",
60
+ "endTime": "End time",
61
+ "showEndCalendar": "Show calendar for the end date"
62
+ },
63
+ fileInput: {
64
+ "chooseFile": "Choose file",
65
+ "noFileSelected": "No file selected"
66
+ },
67
+ passwordInput: { "toggleMasking": "Toggle masking" },
68
+ numberInput: {
69
+ "stepUp": "Step up",
70
+ "stepDown": "Step down"
71
+ },
72
+ textInputMapper: {
73
+ "key": "Key",
74
+ "value": "Value",
75
+ "removeMapping": "Remove mapping"
76
+ },
77
+ copySnippet: {
78
+ "title": "Code example",
79
+ "copyToClipboard": "Copy {{title}} to clipboard",
80
+ "showHiddenParts": "Show hidden parts",
81
+ "copied": "{{title}} copied"
82
+ },
83
+ copyPasteBlock: {
84
+ "copyToClipboard": "Copy {{title}} to clipboard",
85
+ "selectAndPaste": "Select and paste",
86
+ "invalidData": "Invalid data",
87
+ "copied": "{{title}} copied",
88
+ "defaultTitle": "Text"
89
+ },
90
+ tag: { "close": "Close" },
91
+ placeholder: { "contentIsLoading": "Content is loading" },
92
+ loadingAnimation: { "ariaLabel": "Loading animation" },
93
+ layout: {
94
+ "closePanel": "Close panel",
95
+ "goBack": "Go back"
96
+ },
97
+ tree: { "actions": "Actions" },
98
+ banner: { "hideBanner": "Hide banner" },
99
+ tabs: {
100
+ "close": "Close",
101
+ "editTabTitle": "Edit tab title",
102
+ "selectTab": "Select tab"
103
+ },
104
+ contextMenu: {
105
+ "openContextMenu": "Open context menu",
106
+ "contextMenu": "context-menu"
107
+ }
108
+ };
109
+
110
+ //#endregion
111
+ export { uikit_default as default };
112
+ //# sourceMappingURL=uikit.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uikit.js","names":[],"sources":["../../../../src/i18n/locales/en-US/uikit.json"],"sourcesContent":[""],"mappings":""}