@node-core/ui-components 1.0.1-1b9af3ec9e0268bfc734b2489cbc584fa3edf026 → 1.0.1-1ccf19c1836415b6ec7bc2d63ffba4686b390ca9
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.
- package/Common/AlertBox/index.module.css +46 -47
- package/Common/AlertBox/index.stories.tsx +73 -0
- package/Common/AlertBox/index.tsx +24 -0
- package/Common/AvatarGroup/Avatar/index.module.css +30 -50
- package/Common/AvatarGroup/Avatar/index.stories.tsx +22 -0
- package/Common/AvatarGroup/Avatar/index.tsx +67 -0
- package/Common/AvatarGroup/Overlay/index.module.css +21 -28
- package/Common/AvatarGroup/Overlay/index.stories.tsx +33 -0
- package/Common/AvatarGroup/Overlay/index.tsx +37 -0
- package/Common/AvatarGroup/__tests__/index.test.jsx +55 -0
- package/Common/AvatarGroup/index.module.css +11 -12
- package/Common/AvatarGroup/index.stories.tsx +56 -0
- package/Common/AvatarGroup/index.tsx +83 -0
- package/Common/Badge/index.module.css +26 -34
- package/Common/Badge/index.stories.tsx +38 -0
- package/Common/Badge/index.tsx +35 -0
- package/Common/BadgeGroup/index.module.css +51 -75
- package/Common/BadgeGroup/index.stories.tsx +35 -0
- package/Common/BadgeGroup/index.tsx +35 -0
- package/Common/Banner/index.module.css +27 -30
- package/Common/Banner/index.stories.tsx +29 -0
- package/Common/Banner/index.tsx +18 -0
- package/Common/BaseActiveLink/__tests__/index.test.jsx +52 -0
- package/Common/BaseActiveLink/index.tsx +34 -0
- package/Common/BaseButton/index.module.css +102 -332
- package/Common/BaseButton/index.stories.tsx +67 -0
- package/Common/BaseButton/index.tsx +59 -0
- package/Common/BaseCodeBox/index.module.css +58 -76
- package/Common/BaseCodeBox/index.stories.tsx +39 -0
- package/Common/BaseCodeBox/index.tsx +122 -0
- package/Common/BaseCrossLink/index.module.css +39 -57
- package/Common/BaseCrossLink/index.stories.tsx +38 -0
- package/Common/BaseCrossLink/index.tsx +46 -0
- package/Common/BaseLinkTabs/index.module.css +33 -67
- package/Common/BaseLinkTabs/index.stories.tsx +34 -0
- package/Common/BaseLinkTabs/index.tsx +53 -0
- package/Common/BasePagination/Ellipsis/index.module.css +8 -14
- package/Common/BasePagination/Ellipsis/index.stories.tsx +10 -0
- package/Common/BasePagination/Ellipsis/index.tsx +11 -0
- package/Common/BasePagination/PaginationListItem/__tests__/index.test.jsx +58 -0
- package/Common/BasePagination/PaginationListItem/index.module.css +21 -36
- package/Common/BasePagination/PaginationListItem/index.stories.tsx +40 -0
- package/Common/BasePagination/PaginationListItem/index.tsx +39 -0
- package/Common/BasePagination/PrevNextArrow.tsx +15 -0
- package/Common/BasePagination/__tests__/index.test.jsx +180 -0
- package/Common/BasePagination/index.module.css +26 -27
- package/Common/BasePagination/index.stories.tsx +67 -0
- package/Common/BasePagination/index.tsx +77 -0
- package/Common/BasePagination/useGetPageElements.tsx +132 -0
- package/Common/Blockquote/index.module.css +23 -44
- package/Common/Blockquote/index.stories.tsx +45 -0
- package/Common/Blockquote/index.tsx +11 -0
- package/Common/Breadcrumbs/BreadcrumbHomeLink/index.module.css +3 -3
- package/Common/Breadcrumbs/BreadcrumbHomeLink/index.tsx +30 -0
- package/Common/Breadcrumbs/BreadcrumbItem/index.module.css +27 -38
- package/Common/Breadcrumbs/BreadcrumbItem/index.tsx +42 -0
- package/Common/Breadcrumbs/BreadcrumbLink/index.module.css +16 -26
- package/Common/Breadcrumbs/BreadcrumbLink/index.tsx +37 -0
- package/Common/Breadcrumbs/BreadcrumbRoot/index.module.css +7 -8
- package/Common/Breadcrumbs/BreadcrumbRoot/index.tsx +20 -0
- package/Common/Breadcrumbs/BreadcrumbTruncatedItem/index.tsx +9 -0
- package/Common/Breadcrumbs/index.stories.tsx +94 -0
- package/Common/Breadcrumbs/index.tsx +81 -0
- package/Common/CodeTabs/index.module.css +36 -47
- package/Common/CodeTabs/index.stories.tsx +73 -0
- package/Common/CodeTabs/index.tsx +16 -0
- package/Common/DataTag/index.module.css +32 -30
- package/Common/DataTag/index.stories.tsx +40 -0
- package/Common/DataTag/index.tsx +39 -0
- package/Common/GlowingBackdrop/index.module.css +28 -126
- package/Common/GlowingBackdrop/index.stories.tsx +10 -0
- package/Common/GlowingBackdrop/index.tsx +13 -0
- package/Common/LanguageDropDown/index.module.css +42 -140
- package/Common/LanguageDropDown/index.stories.tsx +19 -0
- package/Common/LanguageDropDown/index.tsx +56 -0
- package/Common/Modal/index.module.css +62 -217
- package/Common/Modal/index.stories.tsx +32 -0
- package/Common/Modal/index.tsx +48 -0
- package/Common/NodejsLogo/index.module.css +4 -3
- package/Common/NodejsLogo/index.stories.tsx +14 -0
- package/Common/NodejsLogo/index.tsx +26 -0
- package/Common/Notification/index.module.css +17 -101
- package/Common/Notification/index.stories.tsx +36 -0
- package/Common/Notification/index.tsx +34 -0
- package/Common/Preview/index.module.css +65 -269
- package/Common/Preview/index.stories.tsx +44 -0
- package/Common/Preview/index.tsx +25 -0
- package/Common/Select/__tests__/index.test.jsx +67 -0
- package/Common/Select/index.module.css +127 -294
- package/Common/Select/index.stories.tsx +111 -0
- package/Common/Select/index.tsx +187 -0
- package/Common/Separator/index.module.css +10 -7
- package/Common/Separator/index.stories.tsx +32 -0
- package/Common/Separator/index.tsx +27 -0
- package/Common/Skeleton/index.module.css +21 -118
- package/Common/Skeleton/index.tsx +39 -0
- package/Common/Tabs/__tests__/index.test.jsx +52 -0
- package/Common/Tabs/index.module.css +40 -58
- package/Common/Tabs/index.stories.tsx +50 -0
- package/Common/Tabs/index.tsx +54 -0
- package/Common/ThemeToggle/__tests__/index.test.jsx +35 -0
- package/Common/ThemeToggle/index.module.css +11 -18
- package/Common/ThemeToggle/index.stories.tsx +10 -0
- package/Common/ThemeToggle/index.tsx +15 -0
- package/Common/Tooltip/index.module.css +29 -119
- package/Common/Tooltip/index.stories.tsx +73 -0
- package/Common/Tooltip/index.tsx +48 -0
- package/Containers/Article/index.module.css +58 -127
- package/Containers/Article/index.stories.tsx +39 -0
- package/Containers/Article/index.tsx +9 -0
- package/Containers/DocSideBar/index.tsx +0 -0
- package/Containers/Footer/index.module.css +36 -51
- package/Containers/Footer/index.stories.tsx +27 -0
- package/Containers/Footer/index.tsx +95 -0
- package/Containers/MetaBar/__tests__/index.test.jsx +63 -0
- package/Containers/MetaBar/index.module.css +69 -101
- package/Containers/MetaBar/index.stories.tsx +80 -0
- package/Containers/MetaBar/index.tsx +72 -0
- package/Containers/NavBar/NavItem/index.module.css +36 -50
- package/Containers/NavBar/NavItem/index.stories.tsx +38 -0
- package/Containers/NavBar/NavItem/index.tsx +44 -0
- package/Containers/NavBar/index.module.css +96 -176
- package/Containers/NavBar/index.stories.tsx +45 -0
- package/Containers/NavBar/index.tsx +94 -0
- package/Containers/Sidebar/ProgressionIcon/index.tsx +16 -0
- package/Containers/Sidebar/SidebarGroup/index.module.css +52 -180
- package/Containers/Sidebar/SidebarGroup/index.stories.tsx +36 -0
- package/Containers/Sidebar/SidebarGroup/index.tsx +49 -0
- package/Containers/Sidebar/SidebarItem/index.module.css +38 -49
- package/Containers/Sidebar/SidebarItem/index.stories.tsx +15 -0
- package/Containers/Sidebar/SidebarItem/index.tsx +43 -0
- package/Containers/Sidebar/index.module.css +24 -42
- package/Containers/Sidebar/index.stories.tsx +88 -0
- package/Containers/Sidebar/index.tsx +67 -0
- package/Icons/HexagonGrid.stories.tsx +10 -0
- package/Icons/HexagonGrid.tsx +1434 -0
- package/Icons/InstallationMethod/Choco.tsx +78 -0
- package/Icons/InstallationMethod/Devbox.tsx +21 -0
- package/Icons/InstallationMethod/Docker.tsx +20 -0
- package/Icons/InstallationMethod/FNM.tsx +132 -0
- package/Icons/InstallationMethod/Homebrew.tsx +69 -0
- package/Icons/InstallationMethod/N.tsx +32 -0
- package/Icons/InstallationMethod/NVM.tsx +63 -0
- package/Icons/InstallationMethod/Volta.tsx +34 -0
- package/Icons/InstallationMethod/{index.js → index.ts} +1 -0
- package/Icons/Logos/JsGreen.tsx +24 -0
- package/Icons/Logos/JsWhite.tsx +37 -0
- package/Icons/Logos/Nodejs.tsx +188 -0
- package/Icons/Logos/NodejsStackedBlack.tsx +98 -0
- package/Icons/Logos/NodejsStackedDark.tsx +124 -0
- package/Icons/Logos/NodejsStackedLight.tsx +123 -0
- package/Icons/Logos/NodejsStackedWhite.tsx +98 -0
- package/Icons/Logos/{index.js → index.ts} +10 -1
- package/Icons/OperatingSystem/AIX.tsx +46 -0
- package/Icons/OperatingSystem/Apple.tsx +23 -0
- package/Icons/OperatingSystem/Linux.tsx +969 -0
- package/Icons/OperatingSystem/Microsoft.tsx +19 -0
- package/Icons/OperatingSystem/{index.js → index.ts} +1 -0
- package/Icons/PackageManager/Npm.tsx +21 -0
- package/Icons/PackageManager/Pnpm.tsx +22 -0
- package/Icons/PackageManager/Yarn.tsx +22 -0
- package/Icons/PackageManager/{index.js → index.ts} +1 -0
- package/Icons/Social/Bluesky.tsx +19 -0
- package/Icons/Social/Discord.tsx +20 -0
- package/Icons/Social/GitHub.tsx +16 -0
- package/Icons/Social/LinkedIn.tsx +16 -0
- package/Icons/Social/Mastodon.tsx +36 -0
- package/Icons/Social/Slack.tsx +31 -0
- package/Icons/Social/X.tsx +16 -0
- package/Icons/Social/{index.js → index.ts} +1 -0
- package/MDX/CodeTabs.tsx +47 -0
- package/package.json +54 -6
- package/stylelint/__tests__/index.test.mjs +80 -0
- package/stylelint/one-utility-class-per-line.mjs +50 -34
- package/stylelint/utils.mjs +25 -19
- package/styles/animations.css +47 -0
- package/styles/base.css +17 -0
- package/styles/effects.css +12 -0
- package/styles/index.css +26 -1127
- package/styles/markdown.css +173 -0
- package/styles/theme.css +175 -0
- package/types.ts +25 -0
- package/Common/AlertBox/index.js +0 -5
- package/Common/AvatarGroup/Avatar/index.js +0 -11
- package/Common/AvatarGroup/Overlay/index.js +0 -6
- package/Common/AvatarGroup/index.js +0 -21
- package/Common/Badge/index.js +0 -7
- package/Common/BadgeGroup/index.js +0 -6
- package/Common/Banner/index.js +0 -4
- package/Common/BaseActiveLink/index.js +0 -14
- package/Common/BaseButton/index.js +0 -10
- package/Common/BaseCodeBox/index.js +0 -50
- package/Common/BaseCrossLink/index.js +0 -12
- package/Common/BaseLinkTabs/index.js +0 -5
- package/Common/BasePagination/Ellipsis/index.js +0 -4
- package/Common/BasePagination/PaginationListItem/index.js +0 -6
- package/Common/BasePagination/PrevNextArrow.js +0 -7
- package/Common/BasePagination/index.js +0 -10
- package/Common/BasePagination/useGetPageElements.js +0 -77
- package/Common/Blockquote/index.js +0 -4
- package/Common/Breadcrumbs/BreadcrumbHomeLink/index.js +0 -9
- package/Common/Breadcrumbs/BreadcrumbItem/index.js +0 -6
- package/Common/Breadcrumbs/BreadcrumbLink/index.js +0 -5
- package/Common/Breadcrumbs/BreadcrumbRoot/index.js +0 -4
- package/Common/Breadcrumbs/BreadcrumbTruncatedItem/index.js +0 -4
- package/Common/Breadcrumbs/index.js +0 -22
- package/Common/ChangeHistory/index.js +0 -9
- package/Common/ChangeHistory/index.module.css +0 -198
- package/Common/CodeTabs/index.js +0 -5
- package/Common/DataTag/index.js +0 -18
- package/Common/GlowingBackdrop/index.js +0 -5
- package/Common/LanguageDropDown/index.js +0 -11
- package/Common/Modal/index.js +0 -10
- package/Common/NodejsLogo/index.js +0 -7
- package/Common/Notification/index.js +0 -6
- package/Common/Preview/index.js +0 -7
- package/Common/Select/index.js +0 -46
- package/Common/Separator/index.js +0 -7
- package/Common/Skeleton/index.js +0 -18
- package/Common/Tabs/index.js +0 -6
- package/Common/ThemeToggle/index.js +0 -7
- package/Common/Tooltip/index.js +0 -8
- package/Containers/Article/index.js +0 -4
- package/Containers/DocSideBar/index.js +0 -1
- package/Containers/Footer/index.js +0 -22
- package/Containers/MetaBar/index.js +0 -12
- package/Containers/NavBar/NavItem/index.js +0 -7
- package/Containers/NavBar/index.js +0 -18
- package/Containers/Sidebar/ProgressionIcon/index.js +0 -3
- package/Containers/Sidebar/SidebarGroup/index.js +0 -9
- package/Containers/Sidebar/SidebarItem/index.js +0 -11
- package/Containers/Sidebar/index.js +0 -15
- package/Icons/HexagonGrid.js +0 -3
- package/Icons/InstallationMethod/Choco.js +0 -3
- package/Icons/InstallationMethod/Devbox.js +0 -3
- package/Icons/InstallationMethod/Docker.js +0 -3
- package/Icons/InstallationMethod/FNM.js +0 -3
- package/Icons/InstallationMethod/Homebrew.js +0 -3
- package/Icons/InstallationMethod/N.js +0 -5
- package/Icons/InstallationMethod/NVM.js +0 -3
- package/Icons/InstallationMethod/Volta.js +0 -3
- package/Icons/Logos/JsGreen.js +0 -3
- package/Icons/Logos/JsWhite.js +0 -3
- package/Icons/Logos/Nodejs.js +0 -6
- package/Icons/Logos/NodejsStackedBlack.js +0 -3
- package/Icons/Logos/NodejsStackedDark.js +0 -3
- package/Icons/Logos/NodejsStackedLight.js +0 -3
- package/Icons/Logos/NodejsStackedWhite.js +0 -3
- package/Icons/OperatingSystem/AIX.js +0 -3
- package/Icons/OperatingSystem/Apple.js +0 -3
- package/Icons/OperatingSystem/Linux.js +0 -3
- package/Icons/OperatingSystem/Microsoft.js +0 -3
- package/Icons/PackageManager/Npm.js +0 -3
- package/Icons/PackageManager/Pnpm.js +0 -3
- package/Icons/PackageManager/Yarn.js +0 -3
- package/Icons/Social/Bluesky.js +0 -3
- package/Icons/Social/Discord.js +0 -3
- package/Icons/Social/GitHub.js +0 -3
- package/Icons/Social/LinkedIn.js +0 -3
- package/Icons/Social/Mastodon.js +0 -3
- package/Icons/Social/Slack.js +0 -3
- package/Icons/Social/X.js +0 -3
- package/MDX/CodeTabs.js +0 -16
- package/types.js +0 -1
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Meta as MetaObj, StoryObj } from '@storybook/react';
|
|
2
|
+
|
|
3
|
+
import NodejsLogo from '#ui/Common/NodejsLogo';
|
|
4
|
+
|
|
5
|
+
type Story = StoryObj<typeof NodejsLogo>;
|
|
6
|
+
type Meta = MetaObj<typeof NodejsLogo>;
|
|
7
|
+
|
|
8
|
+
export const Default: Story = {};
|
|
9
|
+
|
|
10
|
+
export const WithPride: Story = {
|
|
11
|
+
args: { variant: 'pride' },
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export default { component: NodejsLogo } as Meta;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { FC } from 'react';
|
|
2
|
+
|
|
3
|
+
import NodejsIcon from '#ui/Icons/Logos/Nodejs';
|
|
4
|
+
import type { LogoVariant } from '#ui/types';
|
|
5
|
+
|
|
6
|
+
import style from './index.module.css';
|
|
7
|
+
|
|
8
|
+
type NodejsLogoProps = {
|
|
9
|
+
variant?: LogoVariant;
|
|
10
|
+
ariaLabel?: string;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
const NodejsLogo: FC<NodejsLogoProps> = ({
|
|
14
|
+
variant = 'default',
|
|
15
|
+
ariaLabel,
|
|
16
|
+
}) => {
|
|
17
|
+
return (
|
|
18
|
+
<NodejsIcon
|
|
19
|
+
variant={variant}
|
|
20
|
+
className={style.nodejsLogo}
|
|
21
|
+
ariaLabel={ariaLabel}
|
|
22
|
+
/>
|
|
23
|
+
);
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export default NodejsLogo;
|
|
@@ -1,104 +1,20 @@
|
|
|
1
|
-
|
|
1
|
+
@reference "../../styles/index.css";
|
|
2
|
+
|
|
2
3
|
.root {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
16
|
-
&:where([data-theme=dark], [data-theme=dark] *) {
|
|
17
|
-
border-color: var(--color-neutral-800, #556066);
|
|
18
|
-
}
|
|
19
|
-
&:where([data-theme=dark], [data-theme=dark] *) {
|
|
20
|
-
background-color: var(--color-neutral-900, #2c3437);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
4
|
+
@apply m-6
|
|
5
|
+
rounded-sm
|
|
6
|
+
border
|
|
7
|
+
border-neutral-200
|
|
8
|
+
bg-white
|
|
9
|
+
px-4
|
|
10
|
+
py-3
|
|
11
|
+
shadow-lg
|
|
12
|
+
dark:border-neutral-800
|
|
13
|
+
dark:bg-neutral-900;
|
|
14
|
+
}
|
|
15
|
+
|
|
23
16
|
.message {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
&:where([data-theme=dark], [data-theme=dark] *) {
|
|
28
|
-
color: var(--color-white, #fff);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
@property --tw-border-style {
|
|
32
|
-
syntax: "*";
|
|
33
|
-
inherits: false;
|
|
34
|
-
initial-value: solid;
|
|
35
|
-
}
|
|
36
|
-
@property --tw-shadow {
|
|
37
|
-
syntax: "*";
|
|
38
|
-
inherits: false;
|
|
39
|
-
initial-value: 0 0 #0000;
|
|
40
|
-
}
|
|
41
|
-
@property --tw-shadow-color {
|
|
42
|
-
syntax: "*";
|
|
43
|
-
inherits: false;
|
|
44
|
-
}
|
|
45
|
-
@property --tw-shadow-alpha {
|
|
46
|
-
syntax: "<percentage>";
|
|
47
|
-
inherits: false;
|
|
48
|
-
initial-value: 100%;
|
|
49
|
-
}
|
|
50
|
-
@property --tw-inset-shadow {
|
|
51
|
-
syntax: "*";
|
|
52
|
-
inherits: false;
|
|
53
|
-
initial-value: 0 0 #0000;
|
|
54
|
-
}
|
|
55
|
-
@property --tw-inset-shadow-color {
|
|
56
|
-
syntax: "*";
|
|
57
|
-
inherits: false;
|
|
58
|
-
}
|
|
59
|
-
@property --tw-inset-shadow-alpha {
|
|
60
|
-
syntax: "<percentage>";
|
|
61
|
-
inherits: false;
|
|
62
|
-
initial-value: 100%;
|
|
63
|
-
}
|
|
64
|
-
@property --tw-ring-color {
|
|
65
|
-
syntax: "*";
|
|
66
|
-
inherits: false;
|
|
67
|
-
}
|
|
68
|
-
@property --tw-ring-shadow {
|
|
69
|
-
syntax: "*";
|
|
70
|
-
inherits: false;
|
|
71
|
-
initial-value: 0 0 #0000;
|
|
72
|
-
}
|
|
73
|
-
@property --tw-inset-ring-color {
|
|
74
|
-
syntax: "*";
|
|
75
|
-
inherits: false;
|
|
76
|
-
}
|
|
77
|
-
@property --tw-inset-ring-shadow {
|
|
78
|
-
syntax: "*";
|
|
79
|
-
inherits: false;
|
|
80
|
-
initial-value: 0 0 #0000;
|
|
81
|
-
}
|
|
82
|
-
@property --tw-ring-inset {
|
|
83
|
-
syntax: "*";
|
|
84
|
-
inherits: false;
|
|
85
|
-
}
|
|
86
|
-
@property --tw-ring-offset-width {
|
|
87
|
-
syntax: "<length>";
|
|
88
|
-
inherits: false;
|
|
89
|
-
initial-value: 0px;
|
|
90
|
-
}
|
|
91
|
-
@property --tw-ring-offset-color {
|
|
92
|
-
syntax: "*";
|
|
93
|
-
inherits: false;
|
|
94
|
-
initial-value: #fff;
|
|
95
|
-
}
|
|
96
|
-
@property --tw-ring-offset-shadow {
|
|
97
|
-
syntax: "*";
|
|
98
|
-
inherits: false;
|
|
99
|
-
initial-value: 0 0 #0000;
|
|
100
|
-
}
|
|
101
|
-
@property --tw-font-weight {
|
|
102
|
-
syntax: "*";
|
|
103
|
-
inherits: false;
|
|
17
|
+
@apply font-medium
|
|
18
|
+
text-green-600
|
|
19
|
+
dark:text-white;
|
|
104
20
|
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { CodeBracketIcon } from '@heroicons/react/24/solid';
|
|
2
|
+
import type { Meta as MetaObj, StoryObj } from '@storybook/react';
|
|
3
|
+
|
|
4
|
+
import Notification from '#ui/Common/Notification';
|
|
5
|
+
|
|
6
|
+
type Story = StoryObj<typeof Notification>;
|
|
7
|
+
type Meta = MetaObj<typeof Notification>;
|
|
8
|
+
|
|
9
|
+
export const Default: Story = {
|
|
10
|
+
args: {
|
|
11
|
+
open: true,
|
|
12
|
+
duration: 5000,
|
|
13
|
+
children: 'Copied to clipboard!',
|
|
14
|
+
},
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export const TimedNotification: Story = {
|
|
18
|
+
args: {
|
|
19
|
+
duration: 5000,
|
|
20
|
+
children: 'Copied to clipboard!',
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export const WithJSX: Story = {
|
|
25
|
+
args: {
|
|
26
|
+
open: true,
|
|
27
|
+
children: (
|
|
28
|
+
<div className="flex items-center gap-3">
|
|
29
|
+
<CodeBracketIcon className="h-4 w-4" />
|
|
30
|
+
Copied to clipboard!
|
|
31
|
+
</div>
|
|
32
|
+
),
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export default { component: Notification } as Meta;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import * as ToastPrimitive from '@radix-ui/react-toast';
|
|
2
|
+
import classNames from 'classnames';
|
|
3
|
+
import type { FC } from 'react';
|
|
4
|
+
|
|
5
|
+
import styles from './index.module.css';
|
|
6
|
+
|
|
7
|
+
type NotificationProps = {
|
|
8
|
+
open?: boolean;
|
|
9
|
+
duration?: number;
|
|
10
|
+
onChange?: (value: boolean) => void;
|
|
11
|
+
children?: React.ReactNode;
|
|
12
|
+
className?: string;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
const Notification: FC<NotificationProps> = ({
|
|
16
|
+
open,
|
|
17
|
+
duration = 5000,
|
|
18
|
+
onChange,
|
|
19
|
+
children,
|
|
20
|
+
className,
|
|
21
|
+
}: NotificationProps) => (
|
|
22
|
+
<ToastPrimitive.Root
|
|
23
|
+
open={open}
|
|
24
|
+
duration={duration}
|
|
25
|
+
onOpenChange={onChange}
|
|
26
|
+
className={classNames(styles.root, className)}
|
|
27
|
+
>
|
|
28
|
+
<ToastPrimitive.Title className={styles.message}>
|
|
29
|
+
{children}
|
|
30
|
+
</ToastPrimitive.Title>
|
|
31
|
+
</ToastPrimitive.Root>
|
|
32
|
+
);
|
|
33
|
+
|
|
34
|
+
export default Notification;
|
|
@@ -1,283 +1,79 @@
|
|
|
1
|
-
|
|
1
|
+
@reference "../../styles/index.css";
|
|
2
|
+
|
|
2
3
|
.root {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
&::after {
|
|
23
|
-
content: var(--tw-content);
|
|
24
|
-
margin: auto;
|
|
25
|
-
}
|
|
26
|
-
&::after {
|
|
27
|
-
content: var(--tw-content);
|
|
28
|
-
aspect-ratio: 1 / 1;
|
|
29
|
-
}
|
|
30
|
-
&::after {
|
|
31
|
-
content: var(--tw-content);
|
|
32
|
-
width: 33.33333%;
|
|
33
|
-
}
|
|
34
|
-
&::after {
|
|
35
|
-
content: var(--tw-content);
|
|
36
|
-
border-radius: calc(infinity*1px);
|
|
37
|
-
}
|
|
38
|
-
&::after {
|
|
39
|
-
content: var(--tw-content);
|
|
40
|
-
background-image: radial-gradient( var(--tw-gradient-from), var(--tw-gradient-to) );
|
|
41
|
-
}
|
|
42
|
-
&::after {
|
|
43
|
-
content: var(--tw-content);
|
|
44
|
-
--tw-blur: blur(var(--blur-2xl, 40px));
|
|
45
|
-
filter: var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,);
|
|
46
|
-
}
|
|
47
|
-
&::after {
|
|
48
|
-
content: var(--tw-content);
|
|
49
|
-
--tw-content: '';
|
|
50
|
-
content: var(--tw-content);
|
|
51
|
-
}
|
|
4
|
+
@apply after:bg-gradient-radial
|
|
5
|
+
@container/preview
|
|
6
|
+
relative
|
|
7
|
+
flex
|
|
8
|
+
aspect-[1.90/1]
|
|
9
|
+
items-center
|
|
10
|
+
rounded-sm
|
|
11
|
+
border
|
|
12
|
+
border-neutral-900
|
|
13
|
+
bg-neutral-950
|
|
14
|
+
after:absolute
|
|
15
|
+
after:inset-0
|
|
16
|
+
after:m-auto
|
|
17
|
+
after:aspect-square
|
|
18
|
+
after:w-1/3
|
|
19
|
+
after:rounded-full
|
|
20
|
+
after:blur-2xl
|
|
21
|
+
after:content-[''];
|
|
22
|
+
|
|
52
23
|
&.announcements {
|
|
53
|
-
|
|
54
|
-
content: var(--tw-content);
|
|
55
|
-
--tw-gradient-from: color-mix(in srgb, #2c682c 90%, transparent);
|
|
56
|
-
@supports (color: color-mix(in lab, red, red)) {
|
|
57
|
-
--tw-gradient-from: color-mix(in oklab, var(--color-green-700, #2c682c) 90%, transparent);
|
|
58
|
-
}
|
|
59
|
-
--tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));
|
|
60
|
-
}
|
|
24
|
+
@apply after:from-green-700/90;
|
|
61
25
|
}
|
|
26
|
+
|
|
62
27
|
&.release {
|
|
63
|
-
|
|
64
|
-
content: var(--tw-content);
|
|
65
|
-
--tw-gradient-from: color-mix(in srgb, #0c7bb3 90%, transparent);
|
|
66
|
-
@supports (color: color-mix(in lab, red, red)) {
|
|
67
|
-
--tw-gradient-from: color-mix(in oklab, var(--color-info-600, #0c7bb3) 90%, transparent);
|
|
68
|
-
}
|
|
69
|
-
--tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));
|
|
70
|
-
}
|
|
28
|
+
@apply after:from-info-600/90;
|
|
71
29
|
}
|
|
30
|
+
|
|
72
31
|
&.vulnerability {
|
|
73
|
-
|
|
74
|
-
content: var(--tw-content);
|
|
75
|
-
--tw-gradient-from: color-mix(in srgb, #ae5f00 90%, transparent);
|
|
76
|
-
@supports (color: color-mix(in lab, red, red)) {
|
|
77
|
-
--tw-gradient-from: color-mix(in oklab, var(--color-warning-600, #ae5f00) 90%, transparent);
|
|
78
|
-
}
|
|
79
|
-
--tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));
|
|
80
|
-
}
|
|
32
|
+
@apply after:from-warning-600/90;
|
|
81
33
|
}
|
|
34
|
+
|
|
82
35
|
.container {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
@container preview (width >= 28rem) {
|
|
104
|
-
font-size: var(--text-lg, 1.125rem);
|
|
105
|
-
line-height: var(--tw-leading, var(--text-lg--line-height, 1.55556));
|
|
106
|
-
}
|
|
107
|
-
@container preview (width >= 32rem) {
|
|
108
|
-
gap: calc(var(--spacing, 0.25rem)*8);
|
|
109
|
-
}
|
|
110
|
-
@container preview (width >= 32rem) {
|
|
111
|
-
font-size: var(--text-xl, 1.25rem);
|
|
112
|
-
line-height: var(--tw-leading, var(--text-xl--line-height, 1.4));
|
|
113
|
-
}
|
|
114
|
-
@container preview (width >= 36rem) {
|
|
115
|
-
gap: calc(var(--spacing, 0.25rem)*12);
|
|
116
|
-
}
|
|
117
|
-
@container preview (width >= 36rem) {
|
|
118
|
-
font-size: var(--text-2xl, 1.5rem);
|
|
119
|
-
line-height: var(--tw-leading, var(--text-2xl--line-height, 1.33333));
|
|
120
|
-
}
|
|
121
|
-
@container preview (width >= 42rem) {
|
|
122
|
-
font-size: var(--text-3xl, 1.875rem);
|
|
123
|
-
line-height: var(--tw-leading, var(--text-3xl--line-height, 1.2));
|
|
124
|
-
}
|
|
36
|
+
@apply @sm/preview:text-base
|
|
37
|
+
@md/preview:gap-6
|
|
38
|
+
@md/preview:text-lg
|
|
39
|
+
@lg/preview:gap-8
|
|
40
|
+
@lg/preview:text-xl
|
|
41
|
+
@xl/preview:gap-12
|
|
42
|
+
@xl/preview:text-2xl
|
|
43
|
+
@2xl/preview:text-3xl
|
|
44
|
+
z-10
|
|
45
|
+
mx-auto
|
|
46
|
+
flex
|
|
47
|
+
w-2/3
|
|
48
|
+
max-w-xl
|
|
49
|
+
flex-col
|
|
50
|
+
gap-4
|
|
51
|
+
text-center
|
|
52
|
+
text-xs
|
|
53
|
+
font-semibold
|
|
54
|
+
text-white;
|
|
55
|
+
|
|
125
56
|
.hexagon {
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
height: 66.66667%;
|
|
139
|
-
}
|
|
140
|
-
@container preview (width >= 32rem) {
|
|
141
|
-
width: 66.66667%;
|
|
142
|
-
}
|
|
143
|
-
@container preview (width >= 36rem) {
|
|
144
|
-
height: 60%;
|
|
145
|
-
}
|
|
146
|
-
@container preview (width >= 36rem) {
|
|
147
|
-
width: 60%;
|
|
148
|
-
}
|
|
149
|
-
@container preview (width >= 42rem) {
|
|
150
|
-
height: 66.66667%;
|
|
151
|
-
}
|
|
152
|
-
@container preview (width >= 42rem) {
|
|
153
|
-
width: 66.66667%;
|
|
154
|
-
}
|
|
57
|
+
@apply @md/preview:h-3/5
|
|
58
|
+
@md/preview:w-3/5
|
|
59
|
+
@lg/preview:h-2/3
|
|
60
|
+
@lg/preview:w-2/3
|
|
61
|
+
@xl/preview:h-3/5
|
|
62
|
+
@xl/preview:w-3/5
|
|
63
|
+
@2xl/preview:h-2/3
|
|
64
|
+
@2xl/preview:w-2/3
|
|
65
|
+
absolute
|
|
66
|
+
inset-0
|
|
67
|
+
m-auto
|
|
68
|
+
size-full;
|
|
155
69
|
}
|
|
70
|
+
|
|
156
71
|
.logo {
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
height: calc(var(--spacing, 0.25rem)*14);
|
|
163
|
-
}
|
|
164
|
-
@container preview (width >= 32rem) {
|
|
165
|
-
width: calc(var(--spacing, 0.25rem)*16);
|
|
166
|
-
height: calc(var(--spacing, 0.25rem)*16);
|
|
167
|
-
}
|
|
168
|
-
@container preview (width >= 36rem) {
|
|
169
|
-
width: calc(var(--spacing, 0.25rem)*20);
|
|
170
|
-
height: calc(var(--spacing, 0.25rem)*20);
|
|
171
|
-
}
|
|
72
|
+
@apply @md/preview:size-14
|
|
73
|
+
@lg/preview:size-16
|
|
74
|
+
@xl/preview:size-20
|
|
75
|
+
mx-auto
|
|
76
|
+
size-6;
|
|
172
77
|
}
|
|
173
78
|
}
|
|
174
79
|
}
|
|
175
|
-
@property --tw-border-style {
|
|
176
|
-
syntax: "*";
|
|
177
|
-
inherits: false;
|
|
178
|
-
initial-value: solid;
|
|
179
|
-
}
|
|
180
|
-
@property --tw-content {
|
|
181
|
-
syntax: "*";
|
|
182
|
-
initial-value: "";
|
|
183
|
-
inherits: false;
|
|
184
|
-
}
|
|
185
|
-
@property --tw-blur {
|
|
186
|
-
syntax: "*";
|
|
187
|
-
inherits: false;
|
|
188
|
-
}
|
|
189
|
-
@property --tw-brightness {
|
|
190
|
-
syntax: "*";
|
|
191
|
-
inherits: false;
|
|
192
|
-
}
|
|
193
|
-
@property --tw-contrast {
|
|
194
|
-
syntax: "*";
|
|
195
|
-
inherits: false;
|
|
196
|
-
}
|
|
197
|
-
@property --tw-grayscale {
|
|
198
|
-
syntax: "*";
|
|
199
|
-
inherits: false;
|
|
200
|
-
}
|
|
201
|
-
@property --tw-hue-rotate {
|
|
202
|
-
syntax: "*";
|
|
203
|
-
inherits: false;
|
|
204
|
-
}
|
|
205
|
-
@property --tw-invert {
|
|
206
|
-
syntax: "*";
|
|
207
|
-
inherits: false;
|
|
208
|
-
}
|
|
209
|
-
@property --tw-opacity {
|
|
210
|
-
syntax: "*";
|
|
211
|
-
inherits: false;
|
|
212
|
-
}
|
|
213
|
-
@property --tw-saturate {
|
|
214
|
-
syntax: "*";
|
|
215
|
-
inherits: false;
|
|
216
|
-
}
|
|
217
|
-
@property --tw-sepia {
|
|
218
|
-
syntax: "*";
|
|
219
|
-
inherits: false;
|
|
220
|
-
}
|
|
221
|
-
@property --tw-drop-shadow {
|
|
222
|
-
syntax: "*";
|
|
223
|
-
inherits: false;
|
|
224
|
-
}
|
|
225
|
-
@property --tw-drop-shadow-color {
|
|
226
|
-
syntax: "*";
|
|
227
|
-
inherits: false;
|
|
228
|
-
}
|
|
229
|
-
@property --tw-drop-shadow-alpha {
|
|
230
|
-
syntax: "<percentage>";
|
|
231
|
-
inherits: false;
|
|
232
|
-
initial-value: 100%;
|
|
233
|
-
}
|
|
234
|
-
@property --tw-drop-shadow-size {
|
|
235
|
-
syntax: "*";
|
|
236
|
-
inherits: false;
|
|
237
|
-
}
|
|
238
|
-
@property --tw-gradient-position {
|
|
239
|
-
syntax: "*";
|
|
240
|
-
inherits: false;
|
|
241
|
-
}
|
|
242
|
-
@property --tw-gradient-from {
|
|
243
|
-
syntax: "<color>";
|
|
244
|
-
inherits: false;
|
|
245
|
-
initial-value: #0000;
|
|
246
|
-
}
|
|
247
|
-
@property --tw-gradient-via {
|
|
248
|
-
syntax: "<color>";
|
|
249
|
-
inherits: false;
|
|
250
|
-
initial-value: #0000;
|
|
251
|
-
}
|
|
252
|
-
@property --tw-gradient-to {
|
|
253
|
-
syntax: "<color>";
|
|
254
|
-
inherits: false;
|
|
255
|
-
initial-value: #0000;
|
|
256
|
-
}
|
|
257
|
-
@property --tw-gradient-stops {
|
|
258
|
-
syntax: "*";
|
|
259
|
-
inherits: false;
|
|
260
|
-
}
|
|
261
|
-
@property --tw-gradient-via-stops {
|
|
262
|
-
syntax: "*";
|
|
263
|
-
inherits: false;
|
|
264
|
-
}
|
|
265
|
-
@property --tw-gradient-from-position {
|
|
266
|
-
syntax: "<length-percentage>";
|
|
267
|
-
inherits: false;
|
|
268
|
-
initial-value: 0%;
|
|
269
|
-
}
|
|
270
|
-
@property --tw-gradient-via-position {
|
|
271
|
-
syntax: "<length-percentage>";
|
|
272
|
-
inherits: false;
|
|
273
|
-
initial-value: 50%;
|
|
274
|
-
}
|
|
275
|
-
@property --tw-gradient-to-position {
|
|
276
|
-
syntax: "<length-percentage>";
|
|
277
|
-
inherits: false;
|
|
278
|
-
initial-value: 100%;
|
|
279
|
-
}
|
|
280
|
-
@property --tw-font-weight {
|
|
281
|
-
syntax: "*";
|
|
282
|
-
inherits: false;
|
|
283
|
-
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { Meta as MetaObj, StoryObj } from '@storybook/react';
|
|
2
|
+
|
|
3
|
+
import Preview from '#ui/Common/Preview';
|
|
4
|
+
|
|
5
|
+
type Story = StoryObj<typeof Preview>;
|
|
6
|
+
type Meta = MetaObj<typeof Preview>;
|
|
7
|
+
|
|
8
|
+
export const Announcement: Story = {
|
|
9
|
+
args: {
|
|
10
|
+
type: 'announcements',
|
|
11
|
+
title:
|
|
12
|
+
'Changing the End-of-Life Date for Node.js 16 to September 11th, 2023',
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export const Release: Story = {
|
|
17
|
+
args: {
|
|
18
|
+
type: 'release',
|
|
19
|
+
title: 'Node v20.5.0 (Current)',
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export const Vulnerability: Story = {
|
|
24
|
+
args: {
|
|
25
|
+
type: 'vulnerability',
|
|
26
|
+
title: 'OpenSSL update assessment, and Node.js project plans',
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export const CustomSize: Story = {
|
|
31
|
+
args: {
|
|
32
|
+
title:
|
|
33
|
+
'Changing the End-of-Life Date for Node.js 16 to September 11th, 2023',
|
|
34
|
+
},
|
|
35
|
+
decorators: [
|
|
36
|
+
Story => (
|
|
37
|
+
<div className="w-[600px]">
|
|
38
|
+
<Story />
|
|
39
|
+
</div>
|
|
40
|
+
),
|
|
41
|
+
],
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export default { component: Preview } as Meta;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import classNames from 'classnames';
|
|
2
|
+
import type { FC } from 'react';
|
|
3
|
+
|
|
4
|
+
import HexagonGrid from '#ui/Icons/HexagonGrid';
|
|
5
|
+
import JsWhiteIcon from '#ui/Icons/Logos/JsWhite';
|
|
6
|
+
import type { BlogPreviewType } from '#ui/types';
|
|
7
|
+
|
|
8
|
+
import styles from './index.module.css';
|
|
9
|
+
|
|
10
|
+
type PreviewProps = {
|
|
11
|
+
title: string;
|
|
12
|
+
type?: BlogPreviewType;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
const Preview: FC<PreviewProps> = ({ type = 'announcements', title }) => (
|
|
16
|
+
<div className={classNames(styles.root, styles[type])}>
|
|
17
|
+
<div className={styles.container} aria-hidden={true}>
|
|
18
|
+
<HexagonGrid className={styles.hexagon} />
|
|
19
|
+
<JsWhiteIcon className={styles.logo} />
|
|
20
|
+
{title}
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
23
|
+
);
|
|
24
|
+
|
|
25
|
+
export default Preview;
|