@node-core/ui-components 1.0.1-345c7d19144bec7138956e6ae7f5b20cfa2e2450 → 1.0.1-4ebead0c76b580d1bf722ebcd0f644e82dc06c0d

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 (32) hide show
  1. package/Common/AlertBox/index.module.css +7 -0
  2. package/Common/AlertBox/index.stories.tsx +23 -0
  3. package/Common/AvatarGroup/index.module.css +4 -8
  4. package/Common/AvatarGroup/index.tsx +1 -5
  5. package/Common/BaseButton/index.module.css +4 -1
  6. package/Common/ChangeHistory/index.module.css +83 -0
  7. package/Common/ChangeHistory/index.stories.tsx +130 -0
  8. package/Common/ChangeHistory/index.tsx +67 -0
  9. package/Common/DataTag/index.module.css +56 -0
  10. package/Common/DataTag/index.stories.tsx +40 -0
  11. package/Common/DataTag/index.tsx +39 -0
  12. package/Common/Modal/index.module.css +3 -3
  13. package/Common/Modal/index.stories.tsx +7 -5
  14. package/Common/Modal/index.tsx +16 -14
  15. package/{Common/ProgressionSidebar/ProgressionSidebarIcon → Containers/Sidebar/ProgressionIcon}/index.tsx +2 -2
  16. package/Containers/Sidebar/SidebarGroup/index.module.css +54 -16
  17. package/Containers/Sidebar/SidebarGroup/index.tsx +21 -2
  18. package/Containers/Sidebar/SidebarItem/index.module.css +39 -18
  19. package/Containers/Sidebar/SidebarItem/index.tsx +25 -8
  20. package/Containers/Sidebar/index.module.css +5 -6
  21. package/Containers/Sidebar/index.stories.tsx +78 -74
  22. package/Containers/Sidebar/index.tsx +17 -5
  23. package/Icons/Logos/Nodejs.tsx +201 -17
  24. package/package.json +28 -31
  25. package/styles/markdown.css +1 -1
  26. package/Common/ProgressionSidebar/ProgressionSidebarGroup/index.module.css +0 -47
  27. package/Common/ProgressionSidebar/ProgressionSidebarGroup/index.tsx +0 -35
  28. package/Common/ProgressionSidebar/ProgressionSidebarItem/index.module.css +0 -39
  29. package/Common/ProgressionSidebar/ProgressionSidebarItem/index.tsx +0 -32
  30. package/Common/ProgressionSidebar/index.module.css +0 -30
  31. package/Common/ProgressionSidebar/index.stories.tsx +0 -79
  32. package/Common/ProgressionSidebar/index.tsx +0 -59
@@ -1,59 +0,0 @@
1
- 'use client';
2
-
3
- import { useRef, type ComponentProps, type FC } from 'react';
4
-
5
- import ProgressionSidebarGroup from '#ui/Common/ProgressionSidebar/ProgressionSidebarGroup';
6
- import Select from '#ui/Common/Select';
7
- import type { LinkLike } from '#ui/types';
8
-
9
- import styles from './index.module.css';
10
-
11
- type ProgressionSidebarProps = {
12
- groups: Array<ComponentProps<typeof ProgressionSidebarGroup>>;
13
- pathname?: string;
14
- title: string;
15
- onSelect: (value: string) => void;
16
- as?: LinkLike;
17
- };
18
-
19
- const ProgressionSidebar: FC<ProgressionSidebarProps> = ({
20
- groups,
21
- pathname,
22
- title,
23
- onSelect,
24
- as,
25
- }) => {
26
- const ref = useRef<HTMLElement>(null);
27
- const selectItems = groups.map(({ items, groupName }) => ({
28
- label: groupName,
29
- items: items.map(({ label, link }) => ({ value: link, label })),
30
- }));
31
-
32
- const currentItem = selectItems
33
- .map(item => item.items)
34
- .flat()
35
- .find(item => pathname === item.value);
36
-
37
- return (
38
- <nav className={styles.wrapper} ref={ref}>
39
- <Select
40
- label={title}
41
- onChange={onSelect}
42
- values={selectItems}
43
- defaultValue={currentItem?.value}
44
- />
45
-
46
- {groups.map(({ groupName, items }) => (
47
- <ProgressionSidebarGroup
48
- key={groupName.toString()}
49
- groupName={groupName}
50
- items={items}
51
- as={as}
52
- pathname={pathname}
53
- />
54
- ))}
55
- </nav>
56
- );
57
- };
58
-
59
- export default ProgressionSidebar;