@dbcdk/react-components 0.0.103 → 0.0.104

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 (354) hide show
  1. package/dist/assets/logo.cjs +87 -0
  2. package/dist/assets/logo.js +85 -0
  3. package/dist/client.cjs +587 -0
  4. package/dist/client.d.ts +83 -0
  5. package/dist/client.js +84 -0
  6. package/dist/components/accordion/Accordion.cjs +103 -0
  7. package/dist/components/accordion/Accordion.js +97 -0
  8. package/dist/components/accordion/Accordion.module.css +41 -0
  9. package/dist/components/accordion/components/AccordionRow.cjs +115 -0
  10. package/dist/components/accordion/components/AccordionRow.js +109 -0
  11. package/dist/components/accordion/components/AccordionRow.module.css +99 -0
  12. package/dist/components/alert/Alert.cjs +52 -0
  13. package/dist/components/alert/Alert.d.ts +2 -1
  14. package/dist/components/alert/Alert.js +46 -0
  15. package/dist/components/alert/Alert.module.css +97 -0
  16. package/dist/components/app-header/AppHeader.cjs +14 -0
  17. package/dist/components/app-header/AppHeader.js +8 -0
  18. package/dist/components/app-header/AppHeader.module.css +74 -0
  19. package/dist/components/attribute-chip/AttributeChip.cjs +22 -0
  20. package/dist/components/attribute-chip/AttributeChip.js +16 -0
  21. package/dist/components/attribute-chip/AttributeChip.module.css +65 -0
  22. package/dist/components/avatar/Avatar.cjs +111 -0
  23. package/dist/components/avatar/Avatar.js +86 -0
  24. package/dist/components/avatar/Avatar.module.css +91 -0
  25. package/dist/components/breadcrumbs/Breadcrumbs.cjs +24 -0
  26. package/dist/components/breadcrumbs/Breadcrumbs.js +18 -0
  27. package/dist/components/breadcrumbs/Breadcrumbs.module.css +80 -0
  28. package/dist/components/button/Button.cjs +149 -0
  29. package/dist/components/button/Button.js +124 -0
  30. package/dist/components/button/Button.module.css +260 -0
  31. package/dist/components/button-select/ButtonSelect.cjs +35 -0
  32. package/dist/components/button-select/ButtonSelect.js +29 -0
  33. package/dist/components/button-select/ButtonSelect.module.css +40 -0
  34. package/dist/components/card/Card.cjs +112 -0
  35. package/dist/components/card/Card.d.ts +2 -1
  36. package/dist/components/card/Card.js +106 -0
  37. package/dist/components/card/Card.module.css +187 -0
  38. package/dist/components/card/components/CardMeta.cjs +62 -0
  39. package/dist/components/card/components/CardMeta.js +55 -0
  40. package/dist/components/card/components/CardMeta.module.css +55 -0
  41. package/dist/components/card-container/CardContainer.cjs +34 -0
  42. package/dist/components/card-container/CardContainer.js +28 -0
  43. package/dist/components/card-container/CardContainer.module.css +63 -0
  44. package/dist/components/chip/Chip.cjs +65 -0
  45. package/dist/components/chip/Chip.js +59 -0
  46. package/dist/components/chip/Chip.module.css +236 -0
  47. package/dist/components/circle/Circle.cjs +33 -0
  48. package/dist/components/circle/Circle.js +27 -0
  49. package/dist/components/circle/Circle.module.css +128 -0
  50. package/dist/components/clear-button/ClearButton.cjs +33 -0
  51. package/dist/components/clear-button/ClearButton.d.ts +2 -1
  52. package/dist/components/clear-button/ClearButton.js +27 -0
  53. package/dist/components/clear-button/ClearButton.module.css +26 -0
  54. package/dist/components/code-block/CodeBlock.cjs +97 -0
  55. package/dist/components/code-block/CodeBlock.js +91 -0
  56. package/dist/components/code-block/CodeBlock.module.css +124 -0
  57. package/dist/components/copy-button/CopyButton.cjs +139 -0
  58. package/dist/components/copy-button/CopyButton.js +133 -0
  59. package/dist/components/copy-button/CopyButton.module.css +22 -0
  60. package/dist/components/datetime-picker/DateTimePicker.cjs +559 -0
  61. package/dist/components/datetime-picker/DateTimePicker.js +553 -0
  62. package/dist/components/datetime-picker/DateTimePicker.module.css +155 -0
  63. package/dist/components/datetime-picker/dateTimeHelpers.cjs +179 -0
  64. package/dist/components/datetime-picker/dateTimeHelpers.js +160 -0
  65. package/dist/components/divider/Divider.cjs +22 -0
  66. package/dist/components/divider/Divider.js +20 -0
  67. package/dist/components/filter-field/FilterField.cjs +296 -0
  68. package/dist/components/filter-field/FilterField.js +289 -0
  69. package/dist/components/filter-field/FilterField.module.css +379 -0
  70. package/dist/components/filtering/chip-multi-toggle/ChipMultiToggle.cjs +115 -0
  71. package/dist/components/filtering/chip-multi-toggle/ChipMultiToggle.js +108 -0
  72. package/dist/components/filtering/chip-multi-toggle/ChipMultiToggle.module.css +59 -0
  73. package/dist/components/forms/checkbox/Checkbox.cjs +88 -0
  74. package/dist/components/forms/checkbox/Checkbox.js +82 -0
  75. package/dist/components/forms/checkbox/Checkbox.module.css +104 -0
  76. package/dist/components/forms/checkbox-group/CheckboxGroup.cjs +121 -0
  77. package/dist/components/forms/checkbox-group/CheckboxGroup.js +115 -0
  78. package/dist/components/forms/checkbox-group/CheckboxGroup.module.css +115 -0
  79. package/dist/components/forms/form-select/FormSelect.cjs +191 -0
  80. package/dist/components/forms/form-select/FormSelect.js +166 -0
  81. package/dist/components/forms/form-select/FormSelect.module.css +236 -0
  82. package/dist/components/forms/input/Input.cjs +188 -0
  83. package/dist/components/forms/input/Input.d.ts +1 -0
  84. package/dist/components/forms/input/Input.js +182 -0
  85. package/dist/components/forms/input/Input.module.css +468 -0
  86. package/dist/components/forms/input-container/InputContainer.cjs +72 -0
  87. package/dist/components/forms/input-container/InputContainer.js +66 -0
  88. package/dist/components/forms/input-container/InputContainer.module.css +59 -0
  89. package/dist/components/forms/multi-select/MultiSelect.cjs +227 -0
  90. package/dist/components/forms/multi-select/MultiSelect.js +225 -0
  91. package/dist/components/forms/radio-buttons/RadioButton.cjs +91 -0
  92. package/dist/components/forms/radio-buttons/RadioButton.js +85 -0
  93. package/dist/components/forms/radio-buttons/RadioButtonGroup.cjs +74 -0
  94. package/dist/components/forms/radio-buttons/RadioButtonGroup.js +72 -0
  95. package/dist/components/forms/radio-buttons/RadioButtons.module.css +118 -0
  96. package/dist/components/forms/select/Select.cjs +286 -0
  97. package/dist/components/forms/select/Select.js +280 -0
  98. package/dist/components/forms/select/Select.module.css +32 -0
  99. package/dist/components/forms/text-area/Textarea.cjs +116 -0
  100. package/dist/components/forms/text-area/Textarea.js +110 -0
  101. package/dist/components/forms/text-area/Textarea.module.css +70 -0
  102. package/dist/components/forms/typeahead/Typeahead.cjs +792 -0
  103. package/dist/components/forms/typeahead/Typeahead.js +768 -0
  104. package/dist/components/forms/typeahead/Typeahead.module.css +38 -0
  105. package/dist/components/grid/Grid.cjs +45 -0
  106. package/dist/components/grid/Grid.js +38 -0
  107. package/dist/components/grid/Grid.module.css +35 -0
  108. package/dist/components/headline/CollapsibleHeadline.cjs +80 -0
  109. package/dist/components/headline/CollapsibleHeadline.js +74 -0
  110. package/dist/components/headline/Headline.cjs +59 -0
  111. package/dist/components/headline/Headline.js +53 -0
  112. package/dist/components/headline/Headline.module.css +185 -0
  113. package/dist/components/hyperlink/Hyperlink.cjs +107 -0
  114. package/dist/components/hyperlink/Hyperlink.js +82 -0
  115. package/dist/components/hyperlink/Hyperlink.module.css +121 -0
  116. package/dist/components/icon/Icon.cjs +27 -0
  117. package/dist/components/icon/Icon.js +20 -0
  118. package/dist/components/icon/Icon.module.css +36 -0
  119. package/dist/components/inline-status/InlineStatus.cjs +39 -0
  120. package/dist/components/inline-status/InlineStatus.js +33 -0
  121. package/dist/components/inline-status/InlineStatus.module.css +92 -0
  122. package/dist/components/interval-select/IntervalSelect.cjs +203 -0
  123. package/dist/components/interval-select/IntervalSelect.js +201 -0
  124. package/dist/components/json-viewer/HighlightedText.cjs +13 -0
  125. package/dist/components/json-viewer/HighlightedText.js +11 -0
  126. package/dist/components/json-viewer/JsonNode.cjs +124 -0
  127. package/dist/components/json-viewer/JsonNode.js +118 -0
  128. package/dist/components/json-viewer/JsonViewer.cjs +164 -0
  129. package/dist/components/json-viewer/JsonViewer.js +158 -0
  130. package/dist/components/json-viewer/JsonViewer.module.css +346 -0
  131. package/dist/components/json-viewer/types.cjs +2 -0
  132. package/dist/components/json-viewer/types.js +1 -0
  133. package/dist/components/json-viewer/useClipboardStatus.cjs +15 -0
  134. package/dist/components/json-viewer/useClipboardStatus.js +13 -0
  135. package/dist/components/json-viewer/utils.cjs +126 -0
  136. package/dist/components/json-viewer/utils.js +111 -0
  137. package/dist/components/media-card/MediaCard.cjs +60 -0
  138. package/dist/components/media-card/MediaCard.d.ts +19 -0
  139. package/dist/components/media-card/MediaCard.js +54 -0
  140. package/dist/components/media-card/MediaCard.module.css +92 -0
  141. package/dist/components/menu/Menu.cjs +287 -0
  142. package/dist/components/menu/Menu.js +262 -0
  143. package/dist/components/menu/Menu.module.css +220 -0
  144. package/dist/components/meta-bar/MetaBar.cjs +28 -0
  145. package/dist/components/meta-bar/MetaBar.js +22 -0
  146. package/dist/components/meta-bar/MetaBar.module.css +27 -0
  147. package/dist/components/nav-bar/NavBar.cjs +95 -0
  148. package/dist/components/nav-bar/NavBar.d.ts +1 -1
  149. package/dist/components/nav-bar/NavBar.js +89 -0
  150. package/dist/components/nav-bar/NavBar.module.css +225 -0
  151. package/dist/components/overlay/fade-overlay/FadeOverlay.cjs +30 -0
  152. package/dist/components/overlay/fade-overlay/FadeOverlay.js +24 -0
  153. package/dist/components/overlay/fade-overlay/FadeOverlay.module.css +54 -0
  154. package/dist/components/overlay/modal/Modal.cjs +189 -0
  155. package/dist/components/overlay/modal/Modal.d.ts +2 -1
  156. package/dist/components/overlay/modal/Modal.js +183 -0
  157. package/dist/components/overlay/modal/Modal.module.css +112 -0
  158. package/dist/components/overlay/modal/provider/ModalProvider.cjs +98 -0
  159. package/dist/components/overlay/modal/provider/ModalProvider.js +95 -0
  160. package/dist/components/overlay/side-panel/SidePanel.cjs +173 -0
  161. package/dist/components/overlay/side-panel/SidePanel.js +167 -0
  162. package/dist/components/overlay/side-panel/SidePanel.module.css +177 -0
  163. package/dist/components/overlay/side-panel/useSidePanel.cjs +16 -0
  164. package/dist/components/overlay/side-panel/useSidePanel.js +14 -0
  165. package/dist/components/overlay/tooltip/Tooltip.cjs +34 -0
  166. package/dist/components/overlay/tooltip/Tooltip.js +32 -0
  167. package/dist/components/overlay/tooltip/Tooltip.module.css +104 -0
  168. package/dist/components/overlay/tooltip/TooltipProvider.cjs +238 -0
  169. package/dist/components/overlay/tooltip/TooltipProvider.js +231 -0
  170. package/dist/components/overlay/tooltip/useTooltipTrigger.cjs +117 -0
  171. package/dist/components/overlay/tooltip/useTooltipTrigger.js +115 -0
  172. package/dist/components/page/Page.cjs +63 -0
  173. package/dist/components/page/Page.js +57 -0
  174. package/dist/components/page/Page.module.css +95 -0
  175. package/dist/components/page-layout/PageLayout.cjs +97 -0
  176. package/dist/components/page-layout/PageLayout.d.ts +0 -5
  177. package/dist/components/page-layout/PageLayout.js +91 -0
  178. package/dist/components/page-layout/PageLayout.module.css +236 -0
  179. package/dist/components/page-layout/components/footer/Footer.cjs +53 -0
  180. package/dist/components/page-layout/components/footer/Footer.js +47 -0
  181. package/dist/components/page-layout/components/footer/Footer.module.css +89 -0
  182. package/dist/components/pagination/Pagination.cjs +160 -0
  183. package/dist/components/pagination/Pagination.js +154 -0
  184. package/dist/components/pagination/Pagination.module.css +25 -0
  185. package/dist/components/panel/Panel.cjs +38 -0
  186. package/dist/components/panel/Panel.js +32 -0
  187. package/dist/components/panel/Panel.module.css +30 -0
  188. package/dist/components/popover/Popover.cjs +331 -0
  189. package/dist/components/popover/Popover.js +307 -0
  190. package/dist/components/popover/Popover.module.css +52 -0
  191. package/dist/components/search-box/SearchBox.cjs +274 -0
  192. package/dist/components/search-box/SearchBox.js +268 -0
  193. package/dist/components/search-box/SearchBox.module.css +27 -0
  194. package/dist/components/segmented-progress-bar/SegmentedProgressBar.cjs +127 -0
  195. package/dist/components/segmented-progress-bar/SegmentedProgressBar.js +121 -0
  196. package/dist/components/segmented-progress-bar/SegmentedProgressBar.module.css +174 -0
  197. package/dist/components/sidebar/Sidebar.cjs +39 -0
  198. package/dist/components/sidebar/Sidebar.js +37 -0
  199. package/dist/components/sidebar/components/SidebarItem.cjs +29 -0
  200. package/dist/components/sidebar/components/SidebarItem.js +27 -0
  201. package/dist/components/sidebar/components/SidebarItem.module.css +0 -0
  202. package/dist/components/sidebar/components/expandable-sidebar-item/ExpandableSidebarItem.cjs +133 -0
  203. package/dist/components/sidebar/components/expandable-sidebar-item/ExpandableSidebarItem.js +127 -0
  204. package/dist/components/sidebar/components/expandable-sidebar-item/ExpandableSidebarItem.module.css +29 -0
  205. package/dist/components/sidebar/components/sidebar-container/SidebarContainer.cjs +214 -0
  206. package/dist/components/sidebar/components/sidebar-container/SidebarContainer.js +207 -0
  207. package/dist/components/sidebar/components/sidebar-container/SidebarContainer.module.css +260 -0
  208. package/dist/components/sidebar/components/sidebar-item-content/SidebarItemContent.cjs +54 -0
  209. package/dist/components/sidebar/components/sidebar-item-content/SidebarItemContent.js +47 -0
  210. package/dist/components/sidebar/components/sidebar-item-content/SidebarItemContent.module.css +106 -0
  211. package/dist/components/sidebar/components/sidebar-items/SidebarItems.cjs +61 -0
  212. package/dist/components/sidebar/components/sidebar-items/SidebarItems.js +55 -0
  213. package/dist/components/sidebar/components/sidebar-items/SidebarItems.module.css +20 -0
  214. package/dist/components/sidebar/components/sidenav-filteirng/SidenavFiltering.cjs +97 -0
  215. package/dist/components/sidebar/components/sidenav-filteirng/SidenavFiltering.js +91 -0
  216. package/dist/components/sidebar/providers/SidebarProvider.cjs +223 -0
  217. package/dist/components/sidebar/providers/SidebarProvider.js +220 -0
  218. package/dist/components/skeleton-loader/SkeletonLoader.cjs +442 -0
  219. package/dist/components/skeleton-loader/SkeletonLoader.js +440 -0
  220. package/dist/components/skeleton-loader/skeleton-loader-item/SkeletonLoaderItem.cjs +42 -0
  221. package/dist/components/skeleton-loader/skeleton-loader-item/SkeletonLoaderItem.js +36 -0
  222. package/dist/components/skeleton-loader/skeleton-loader-item/SkeletonLoaderItem.module.css +51 -0
  223. package/dist/components/split-button/SplitButton.cjs +46 -0
  224. package/dist/components/split-button/SplitButton.js +40 -0
  225. package/dist/components/split-button/SplitButton.module.css +32 -0
  226. package/dist/components/split-pane/SplitPane.cjs +177 -0
  227. package/dist/components/split-pane/SplitPane.js +168 -0
  228. package/dist/components/split-pane/SplitPane.module.css +111 -0
  229. package/dist/components/split-pane/provider/SplitPaneContext.cjs +129 -0
  230. package/dist/components/split-pane/provider/SplitPaneContext.js +121 -0
  231. package/dist/components/stack/Stack.cjs +47 -0
  232. package/dist/components/stack/Stack.d.ts +1 -1
  233. package/dist/components/stack/Stack.js +41 -0
  234. package/dist/components/stack/Stack.module.css +61 -0
  235. package/dist/components/state-page/StatePage.cjs +48 -0
  236. package/dist/components/state-page/StatePage.js +42 -0
  237. package/dist/components/state-page/StatePage.module.css +9 -0
  238. package/dist/components/state-page/empty.cjs +664 -0
  239. package/dist/components/state-page/empty.js +662 -0
  240. package/dist/components/state-page/error.cjs +310 -0
  241. package/dist/components/state-page/error.js +308 -0
  242. package/dist/components/state-page/notFound.cjs +243 -0
  243. package/dist/components/state-page/notFound.js +241 -0
  244. package/dist/components/sticky-footer-layout/StickyFooterLayout.cjs +98 -0
  245. package/dist/components/sticky-footer-layout/StickyFooterLayout.js +96 -0
  246. package/dist/components/table/Table.cjs +216 -0
  247. package/dist/components/table/Table.js +210 -0
  248. package/dist/components/table/Table.module.css +534 -0
  249. package/dist/components/table/Table.types.cjs +2 -0
  250. package/dist/components/table/Table.types.js +1 -0
  251. package/dist/components/table/TanstackTable.cjs +172 -0
  252. package/dist/components/table/TanstackTable.js +147 -0
  253. package/dist/components/table/components/TableBody.cjs +50 -0
  254. package/dist/components/table/components/TableBody.js +44 -0
  255. package/dist/components/table/components/TableHeader.cjs +56 -0
  256. package/dist/components/table/components/TableHeader.js +50 -0
  257. package/dist/components/table/components/TableHeaderCell.cjs +69 -0
  258. package/dist/components/table/components/TableHeaderCell.js +63 -0
  259. package/dist/components/table/components/TableLoadingBody.cjs +35 -0
  260. package/dist/components/table/components/TableLoadingBody.js +29 -0
  261. package/dist/components/table/components/TablePagination.cjs +2 -0
  262. package/dist/components/table/components/TablePagination.js +1 -0
  263. package/dist/components/table/components/TableRow.cjs +151 -0
  264. package/dist/components/table/components/TableRow.js +145 -0
  265. package/dist/components/table/components/TableSelectionCell.cjs +41 -0
  266. package/dist/components/table/components/TableSelectionCell.js +35 -0
  267. package/dist/components/table/components/column-resizer/ColumnResizer.cjs +25 -0
  268. package/dist/components/table/components/column-resizer/ColumnResizer.js +19 -0
  269. package/dist/components/table/components/column-resizer/ColumnResizer.module.css +22 -0
  270. package/dist/components/table/components/empty-state/EmptyState.cjs +33 -0
  271. package/dist/components/table/components/empty-state/EmptyState.js +31 -0
  272. package/dist/components/table/components/empty-state/EmptyState.module.css +4 -0
  273. package/dist/components/table/components/table-settings/TableSettings.cjs +139 -0
  274. package/dist/components/table/components/table-settings/TableSettings.js +137 -0
  275. package/dist/components/table/hooks/useTableRowInteractions.cjs +46 -0
  276. package/dist/components/table/hooks/useTableRowInteractions.js +44 -0
  277. package/dist/components/table/table.classes.cjs +49 -0
  278. package/dist/components/table/table.classes.js +40 -0
  279. package/dist/components/table/table.utils.cjs +57 -0
  280. package/dist/components/table/table.utils.js +45 -0
  281. package/dist/components/table/tanstackTable.utils.cjs +166 -0
  282. package/dist/components/table/tanstackTable.utils.js +159 -0
  283. package/dist/components/tabs/Tabs.cjs +172 -0
  284. package/dist/components/tabs/Tabs.js +166 -0
  285. package/dist/components/tabs/Tabs.module.css +261 -0
  286. package/dist/components/theme-button/ThemeButton.cjs +78 -0
  287. package/dist/components/theme-button/ThemeButton.js +75 -0
  288. package/dist/components/toast/Toast.cjs +68 -0
  289. package/dist/components/toast/Toast.js +62 -0
  290. package/dist/components/toast/Toast.module.css +161 -0
  291. package/dist/components/toast/provider/ToastProvider.cjs +105 -0
  292. package/dist/components/toast/provider/ToastProvider.js +97 -0
  293. package/dist/components/user-display/UserDisplay.cjs +22 -0
  294. package/dist/components/user-display/UserDisplay.js +16 -0
  295. package/dist/components/user-display/UserDisplay.module.css +25 -0
  296. package/dist/constants/chart-colors.cjs +10 -0
  297. package/dist/constants/chart-colors.js +8 -0
  298. package/dist/constants/chart-colors.types.cjs +2 -0
  299. package/dist/constants/chart-colors.types.js +1 -0
  300. package/dist/constants/severity.cjs +30 -0
  301. package/dist/constants/severity.js +26 -0
  302. package/dist/constants/severity.types.cjs +2 -0
  303. package/dist/constants/severity.types.js +1 -0
  304. package/dist/constants/sizes.cjs +11 -0
  305. package/dist/constants/sizes.js +9 -0
  306. package/dist/hooks/useDeviceSize.cjs +35 -0
  307. package/dist/hooks/useDeviceSize.js +33 -0
  308. package/dist/hooks/useListNavigation.cjs +237 -0
  309. package/dist/hooks/useListNavigation.js +235 -0
  310. package/dist/hooks/usePagination.cjs +144 -0
  311. package/dist/hooks/usePagination.js +142 -0
  312. package/dist/hooks/useSorting.cjs +119 -0
  313. package/dist/hooks/useSorting.js +117 -0
  314. package/dist/hooks/useTableData.cjs +53 -0
  315. package/dist/hooks/useTableData.js +51 -0
  316. package/dist/hooks/useTableSelection.cjs +172 -0
  317. package/dist/hooks/useTableSelection.js +170 -0
  318. package/dist/hooks/useTableSettings.cjs +90 -0
  319. package/dist/hooks/useTableSettings.js +87 -0
  320. package/dist/hooks/useTheme.cjs +64 -0
  321. package/dist/hooks/useTheme.js +62 -0
  322. package/dist/hooks/useTimeDuration.cjs +72 -0
  323. package/dist/hooks/useTimeDuration.js +70 -0
  324. package/dist/hooks/useViewportFill.cjs +82 -0
  325. package/dist/hooks/useViewportFill.js +80 -0
  326. package/dist/index.cjs +161 -12908
  327. package/dist/index.css +67 -7357
  328. package/dist/index.d.ts +0 -58
  329. package/dist/index.js +24 -12809
  330. package/dist/styles/animation.cjs +9 -0
  331. package/dist/styles/animation.js +7 -0
  332. package/dist/styles/themes/dbc/colors.css +5 -0
  333. package/dist/styles/themes/types.cjs +2 -0
  334. package/dist/styles/themes/types.js +1 -0
  335. package/dist/tanstack.cjs +18 -2717
  336. package/dist/tanstack.js +3 -2701
  337. package/dist/types/a11y-props.types.cjs +2 -0
  338. package/dist/types/a11y-props.types.js +1 -0
  339. package/dist/types/assets.d.cjs +2 -0
  340. package/dist/types/assets.d.js +1 -0
  341. package/dist/types/css.d.cjs +2 -0
  342. package/dist/types/css.d.js +1 -0
  343. package/dist/types/sizes.types.cjs +2 -0
  344. package/dist/types/sizes.types.js +1 -0
  345. package/dist/utils/arrays/nested-filtering.cjs +40 -0
  346. package/dist/utils/arrays/nested-filtering.js +38 -0
  347. package/dist/utils/date/formatDate.cjs +35 -0
  348. package/dist/utils/date/formatDate.js +33 -0
  349. package/dist/utils/localStorage.utils.cjs +53 -0
  350. package/dist/utils/localStorage.utils.js +49 -0
  351. package/dist/utils/text/get-highlighted-segments.cjs +49 -0
  352. package/dist/utils/text/get-highlighted-segments.js +47 -0
  353. package/package.json +8 -3
  354. package/dist/tanstack.css +0 -1385
@@ -0,0 +1,126 @@
1
+ 'use strict';
2
+
3
+ function isJsonArray(value) {
4
+ return Array.isArray(value);
5
+ }
6
+ function isJsonObject(value) {
7
+ return value !== null && typeof value === "object" && !Array.isArray(value);
8
+ }
9
+ function isJsonValue(value) {
10
+ if (value === null) return true;
11
+ if (Array.isArray(value)) return value.every(isJsonValue);
12
+ if (typeof value === "object") {
13
+ return Object.values(value).every(isJsonValue);
14
+ }
15
+ return typeof value === "string" || typeof value === "number" || typeof value === "boolean";
16
+ }
17
+ function getValueType(value) {
18
+ if (value === null) return "null";
19
+ if (Array.isArray(value)) return "array";
20
+ if (typeof value === "object") return "object";
21
+ if (typeof value === "string") return "string";
22
+ if (typeof value === "number") return "number";
23
+ if (typeof value === "boolean") return "boolean";
24
+ return "string";
25
+ }
26
+ function formatPrimitive(value) {
27
+ if (value === null) return "null";
28
+ if (typeof value === "string") return JSON.stringify(value);
29
+ return String(value);
30
+ }
31
+ function getPrimitiveRawValue(value) {
32
+ if (value === null) return "null";
33
+ return String(value);
34
+ }
35
+ function getSummary(value) {
36
+ if (isJsonArray(value)) {
37
+ return `${value.length} element${value.length === 1 ? "" : "er"}`;
38
+ }
39
+ if (!isJsonObject(value)) return "0 felter";
40
+ const count = Object.keys(value).length;
41
+ return `${count} felt${count === 1 ? "" : "er"}`;
42
+ }
43
+ function getNodeId(path) {
44
+ return path.length === 0 ? "$" : `$.${path.join(".")}`;
45
+ }
46
+ function getPathLabel(path) {
47
+ return getNodeId(path);
48
+ }
49
+ function normalizeSearch(value) {
50
+ return value.trim().toLowerCase();
51
+ }
52
+ function capitalize(value) {
53
+ return value.charAt(0).toUpperCase() + value.slice(1);
54
+ }
55
+ function valueToSearchString(value) {
56
+ return value === null ? "null" : String(value).toLowerCase();
57
+ }
58
+ function collectSearchMatches(value, query, path = [], key) {
59
+ const matches = /* @__PURE__ */ new Map();
60
+ const visit = (current, currentPath, currentKey) => {
61
+ const nodeId = getNodeId(currentPath);
62
+ const pathLabel = getPathLabel(currentPath).toLowerCase();
63
+ const keyLabel = (currentKey != null ? currentKey : "").toLowerCase();
64
+ let self = keyLabel.includes(query) || pathLabel.includes(query);
65
+ let descendant = false;
66
+ if (isJsonArray(current)) {
67
+ current.forEach((item, index) => {
68
+ const childMatches = visit(item, [...currentPath, String(index)], String(index));
69
+ descendant = descendant || childMatches;
70
+ });
71
+ } else if (isJsonObject(current)) {
72
+ Object.entries(current).forEach(([childKey, childValue]) => {
73
+ const childMatches = visit(childValue, [...currentPath, childKey], childKey);
74
+ descendant = descendant || childMatches;
75
+ });
76
+ } else {
77
+ self = self || valueToSearchString(current).includes(query);
78
+ }
79
+ const any = self || descendant;
80
+ if (any) {
81
+ matches.set(nodeId, { self, descendant });
82
+ }
83
+ return any;
84
+ };
85
+ visit(value, path, key);
86
+ return matches;
87
+ }
88
+ function collectExpandableNodeIds(value, path = []) {
89
+ if (!isJsonArray(value) && !isJsonObject(value)) return [];
90
+ const nodeId = getNodeId(path);
91
+ const childEntries = isJsonArray(value) ? value.map((item, index) => [String(index), item]) : Object.entries(value);
92
+ return [
93
+ nodeId,
94
+ ...childEntries.flatMap(
95
+ ([childKey, childValue]) => collectExpandableNodeIds(childValue, [...path, childKey])
96
+ )
97
+ ];
98
+ }
99
+ function collectInitiallyExpandedNodeIds(value, defaultExpandedDepth, expandAll, depth = 0, path = []) {
100
+ if (!isJsonArray(value) && !isJsonObject(value)) return [];
101
+ const nodeId = getNodeId(path);
102
+ const childEntries = isJsonArray(value) ? value.map((item, index) => [String(index), item]) : Object.entries(value);
103
+ const includeNode = expandAll || depth < defaultExpandedDepth;
104
+ const nested = childEntries.flatMap(
105
+ ([childKey, childValue]) => collectInitiallyExpandedNodeIds(childValue, defaultExpandedDepth, expandAll, depth + 1, [
106
+ ...path,
107
+ childKey
108
+ ])
109
+ );
110
+ return includeNode ? [nodeId, ...nested] : nested;
111
+ }
112
+
113
+ exports.capitalize = capitalize;
114
+ exports.collectExpandableNodeIds = collectExpandableNodeIds;
115
+ exports.collectInitiallyExpandedNodeIds = collectInitiallyExpandedNodeIds;
116
+ exports.collectSearchMatches = collectSearchMatches;
117
+ exports.formatPrimitive = formatPrimitive;
118
+ exports.getNodeId = getNodeId;
119
+ exports.getPathLabel = getPathLabel;
120
+ exports.getPrimitiveRawValue = getPrimitiveRawValue;
121
+ exports.getSummary = getSummary;
122
+ exports.getValueType = getValueType;
123
+ exports.isJsonArray = isJsonArray;
124
+ exports.isJsonObject = isJsonObject;
125
+ exports.isJsonValue = isJsonValue;
126
+ exports.normalizeSearch = normalizeSearch;
@@ -0,0 +1,111 @@
1
+ function isJsonArray(value) {
2
+ return Array.isArray(value);
3
+ }
4
+ function isJsonObject(value) {
5
+ return value !== null && typeof value === "object" && !Array.isArray(value);
6
+ }
7
+ function isJsonValue(value) {
8
+ if (value === null) return true;
9
+ if (Array.isArray(value)) return value.every(isJsonValue);
10
+ if (typeof value === "object") {
11
+ return Object.values(value).every(isJsonValue);
12
+ }
13
+ return typeof value === "string" || typeof value === "number" || typeof value === "boolean";
14
+ }
15
+ function getValueType(value) {
16
+ if (value === null) return "null";
17
+ if (Array.isArray(value)) return "array";
18
+ if (typeof value === "object") return "object";
19
+ if (typeof value === "string") return "string";
20
+ if (typeof value === "number") return "number";
21
+ if (typeof value === "boolean") return "boolean";
22
+ return "string";
23
+ }
24
+ function formatPrimitive(value) {
25
+ if (value === null) return "null";
26
+ if (typeof value === "string") return JSON.stringify(value);
27
+ return String(value);
28
+ }
29
+ function getPrimitiveRawValue(value) {
30
+ if (value === null) return "null";
31
+ return String(value);
32
+ }
33
+ function getSummary(value) {
34
+ if (isJsonArray(value)) {
35
+ return `${value.length} element${value.length === 1 ? "" : "er"}`;
36
+ }
37
+ if (!isJsonObject(value)) return "0 felter";
38
+ const count = Object.keys(value).length;
39
+ return `${count} felt${count === 1 ? "" : "er"}`;
40
+ }
41
+ function getNodeId(path) {
42
+ return path.length === 0 ? "$" : `$.${path.join(".")}`;
43
+ }
44
+ function getPathLabel(path) {
45
+ return getNodeId(path);
46
+ }
47
+ function normalizeSearch(value) {
48
+ return value.trim().toLowerCase();
49
+ }
50
+ function capitalize(value) {
51
+ return value.charAt(0).toUpperCase() + value.slice(1);
52
+ }
53
+ function valueToSearchString(value) {
54
+ return value === null ? "null" : String(value).toLowerCase();
55
+ }
56
+ function collectSearchMatches(value, query, path = [], key) {
57
+ const matches = /* @__PURE__ */ new Map();
58
+ const visit = (current, currentPath, currentKey) => {
59
+ const nodeId = getNodeId(currentPath);
60
+ const pathLabel = getPathLabel(currentPath).toLowerCase();
61
+ const keyLabel = (currentKey != null ? currentKey : "").toLowerCase();
62
+ let self = keyLabel.includes(query) || pathLabel.includes(query);
63
+ let descendant = false;
64
+ if (isJsonArray(current)) {
65
+ current.forEach((item, index) => {
66
+ const childMatches = visit(item, [...currentPath, String(index)], String(index));
67
+ descendant = descendant || childMatches;
68
+ });
69
+ } else if (isJsonObject(current)) {
70
+ Object.entries(current).forEach(([childKey, childValue]) => {
71
+ const childMatches = visit(childValue, [...currentPath, childKey], childKey);
72
+ descendant = descendant || childMatches;
73
+ });
74
+ } else {
75
+ self = self || valueToSearchString(current).includes(query);
76
+ }
77
+ const any = self || descendant;
78
+ if (any) {
79
+ matches.set(nodeId, { self, descendant });
80
+ }
81
+ return any;
82
+ };
83
+ visit(value, path, key);
84
+ return matches;
85
+ }
86
+ function collectExpandableNodeIds(value, path = []) {
87
+ if (!isJsonArray(value) && !isJsonObject(value)) return [];
88
+ const nodeId = getNodeId(path);
89
+ const childEntries = isJsonArray(value) ? value.map((item, index) => [String(index), item]) : Object.entries(value);
90
+ return [
91
+ nodeId,
92
+ ...childEntries.flatMap(
93
+ ([childKey, childValue]) => collectExpandableNodeIds(childValue, [...path, childKey])
94
+ )
95
+ ];
96
+ }
97
+ function collectInitiallyExpandedNodeIds(value, defaultExpandedDepth, expandAll, depth = 0, path = []) {
98
+ if (!isJsonArray(value) && !isJsonObject(value)) return [];
99
+ const nodeId = getNodeId(path);
100
+ const childEntries = isJsonArray(value) ? value.map((item, index) => [String(index), item]) : Object.entries(value);
101
+ const includeNode = expandAll || depth < defaultExpandedDepth;
102
+ const nested = childEntries.flatMap(
103
+ ([childKey, childValue]) => collectInitiallyExpandedNodeIds(childValue, defaultExpandedDepth, expandAll, depth + 1, [
104
+ ...path,
105
+ childKey
106
+ ])
107
+ );
108
+ return includeNode ? [nodeId, ...nested] : nested;
109
+ }
110
+
111
+ export { capitalize, collectExpandableNodeIds, collectInitiallyExpandedNodeIds, collectSearchMatches, formatPrimitive, getNodeId, getPathLabel, getPrimitiveRawValue, getSummary, getValueType, isJsonArray, isJsonObject, isJsonValue, normalizeSearch };
@@ -0,0 +1,60 @@
1
+ 'use client';
2
+ 'use strict';
3
+
4
+ var jsxRuntime = require('react/jsx-runtime');
5
+ var styles = require('./MediaCard.module.css');
6
+ var SkeletonLoaderItem = require('../skeleton-loader/skeleton-loader-item/SkeletonLoaderItem');
7
+
8
+ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
9
+
10
+ var styles__default = /*#__PURE__*/_interopDefault(styles);
11
+
12
+ function MediaCard({
13
+ src,
14
+ alt,
15
+ href,
16
+ loading = false,
17
+ aspectRatio = "1 / 1",
18
+ objectFit = "cover",
19
+ objectPosition = "center",
20
+ caption,
21
+ meta,
22
+ showCaption = Boolean(caption || meta),
23
+ className,
24
+ imageClassName,
25
+ linkProps
26
+ }) {
27
+ const isInteractive = Boolean(href);
28
+ const hasCaption = showCaption && (caption || meta);
29
+ const content = /* @__PURE__ */ jsxRuntime.jsx(
30
+ "figure",
31
+ {
32
+ className: [styles__default.default.root, isInteractive ? styles__default.default.interactive : "", className != null ? className : ""].join(" "),
33
+ style: { "--media-card-aspect-ratio": aspectRatio },
34
+ children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles__default.default.media, children: [
35
+ loading || !src ? /* @__PURE__ */ jsxRuntime.jsx(SkeletonLoaderItem.SkeletonLoaderItem, { height: "100%" }) : /* @__PURE__ */ jsxRuntime.jsx(
36
+ "img",
37
+ {
38
+ src,
39
+ alt,
40
+ className: [styles__default.default.image, imageClassName != null ? imageClassName : ""].join(" "),
41
+ style: {
42
+ objectFit,
43
+ objectPosition
44
+ }
45
+ }
46
+ ),
47
+ !loading && hasCaption && /* @__PURE__ */ jsxRuntime.jsxs("figcaption", { className: styles__default.default.caption, children: [
48
+ caption && /* @__PURE__ */ jsxRuntime.jsx("span", { className: styles__default.default.captionText, children: caption }),
49
+ meta && /* @__PURE__ */ jsxRuntime.jsx("span", { className: styles__default.default.meta, children: meta })
50
+ ] })
51
+ ] })
52
+ }
53
+ );
54
+ if (!href) {
55
+ return content;
56
+ }
57
+ return /* @__PURE__ */ jsxRuntime.jsx("a", { href, className: styles__default.default.link, ...linkProps, children: content });
58
+ }
59
+
60
+ exports.MediaCard = MediaCard;
@@ -0,0 +1,19 @@
1
+ import type { AnchorHTMLAttributes, CSSProperties, ReactNode } from 'react';
2
+ type AspectRatio = '1 / 1' | '4 / 3' | '3 / 4' | '16 / 9' | string;
3
+ export type MediaCardProps = {
4
+ src?: string;
5
+ alt: string;
6
+ href?: string;
7
+ loading?: boolean;
8
+ aspectRatio?: AspectRatio;
9
+ objectFit?: CSSProperties['objectFit'];
10
+ objectPosition?: CSSProperties['objectPosition'];
11
+ caption?: ReactNode;
12
+ meta?: ReactNode;
13
+ showCaption?: boolean;
14
+ className?: string;
15
+ imageClassName?: string;
16
+ linkProps?: Omit<AnchorHTMLAttributes<HTMLAnchorElement>, 'href' | 'children'>;
17
+ };
18
+ export declare function MediaCard({ src, alt, href, loading, aspectRatio, objectFit, objectPosition, caption, meta, showCaption, className, imageClassName, linkProps, }: MediaCardProps): import("react/jsx-runtime").JSX.Element;
19
+ export {};
@@ -0,0 +1,54 @@
1
+ 'use client';
2
+ import { jsx, jsxs } from 'react/jsx-runtime';
3
+ import styles from './MediaCard.module.css';
4
+ import { SkeletonLoaderItem } from '../skeleton-loader/skeleton-loader-item/SkeletonLoaderItem';
5
+
6
+ function MediaCard({
7
+ src,
8
+ alt,
9
+ href,
10
+ loading = false,
11
+ aspectRatio = "1 / 1",
12
+ objectFit = "cover",
13
+ objectPosition = "center",
14
+ caption,
15
+ meta,
16
+ showCaption = Boolean(caption || meta),
17
+ className,
18
+ imageClassName,
19
+ linkProps
20
+ }) {
21
+ const isInteractive = Boolean(href);
22
+ const hasCaption = showCaption && (caption || meta);
23
+ const content = /* @__PURE__ */ jsx(
24
+ "figure",
25
+ {
26
+ className: [styles.root, isInteractive ? styles.interactive : "", className != null ? className : ""].join(" "),
27
+ style: { "--media-card-aspect-ratio": aspectRatio },
28
+ children: /* @__PURE__ */ jsxs("div", { className: styles.media, children: [
29
+ loading || !src ? /* @__PURE__ */ jsx(SkeletonLoaderItem, { height: "100%" }) : /* @__PURE__ */ jsx(
30
+ "img",
31
+ {
32
+ src,
33
+ alt,
34
+ className: [styles.image, imageClassName != null ? imageClassName : ""].join(" "),
35
+ style: {
36
+ objectFit,
37
+ objectPosition
38
+ }
39
+ }
40
+ ),
41
+ !loading && hasCaption && /* @__PURE__ */ jsxs("figcaption", { className: styles.caption, children: [
42
+ caption && /* @__PURE__ */ jsx("span", { className: styles.captionText, children: caption }),
43
+ meta && /* @__PURE__ */ jsx("span", { className: styles.meta, children: meta })
44
+ ] })
45
+ ] })
46
+ }
47
+ );
48
+ if (!href) {
49
+ return content;
50
+ }
51
+ return /* @__PURE__ */ jsx("a", { href, className: styles.link, ...linkProps, children: content });
52
+ }
53
+
54
+ export { MediaCard };
@@ -0,0 +1,92 @@
1
+ .root {
2
+ --media-card-aspect-ratio: 1 / 1;
3
+
4
+ position: relative;
5
+ margin: 0;
6
+ }
7
+
8
+ .link {
9
+ display: block;
10
+ width: 100%;
11
+ color: inherit;
12
+ text-decoration: none;
13
+ border-radius: var(--border-radius-md);
14
+ }
15
+
16
+ .link:focus-visible {
17
+ outline: none;
18
+ box-shadow: var(--focus-ring);
19
+ }
20
+
21
+ .media {
22
+ position: relative;
23
+ aspect-ratio: var(--media-card-aspect-ratio);
24
+ width: 100%;
25
+ overflow: hidden;
26
+ border-radius: var(--border-radius-md);
27
+ background: var(--card-bg-subtle);
28
+ box-shadow: var(--shadow-sm);
29
+ }
30
+
31
+ .image {
32
+ display: block;
33
+ height: 100%;
34
+ width: 100%;
35
+ }
36
+
37
+ .interactive .image {
38
+ transition:
39
+ transform var(--transition-fast) var(--ease-standard),
40
+ filter var(--transition-fast) var(--ease-standard);
41
+ }
42
+
43
+ .link:hover .interactive .image {
44
+ transform: scale(1.02);
45
+ }
46
+
47
+ .caption {
48
+ position: absolute;
49
+ right: 0;
50
+ bottom: 0;
51
+ left: 0;
52
+
53
+ display: flex;
54
+ align-items: flex-end;
55
+ justify-content: space-between;
56
+ gap: var(--spacing-xs);
57
+
58
+ padding-block: var(--spacing-xs);
59
+ padding-inline: var(--spacing-sm);
60
+
61
+ color: var(--color-fg-inverse);
62
+ background: var(--overlay-scrim);
63
+ backdrop-filter: blur(var(--backdrop-blur));
64
+
65
+ font-size: var(--font-size-md);
66
+ font-weight: var(--font-weight-bold);
67
+ line-height: var(--line-height-tight);
68
+ letter-spacing: var(--letter-spacing-wide);
69
+ }
70
+
71
+ .captionText {
72
+ min-width: 0;
73
+ overflow: hidden;
74
+ text-overflow: ellipsis;
75
+ white-space: nowrap;
76
+ }
77
+
78
+ .meta {
79
+ flex-shrink: 0;
80
+ opacity: 0.8;
81
+ font-weight: var(--font-weight-default);
82
+ }
83
+
84
+ @media (prefers-reduced-motion: reduce) {
85
+ .interactive .image {
86
+ transition: none;
87
+ }
88
+
89
+ .link:hover .interactive .image {
90
+ transform: none;
91
+ }
92
+ }