@node-core/ui-components 1.0.1-bc3f4a79ab5f54e7ed1ee525005e7e9f1030495c → 1.0.1-cc5c2626b0639fe2088a736f54169ea3e10ed325
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 +50 -44
- package/Common/AlertBox/index.stories.tsx +96 -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 +105 -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/ChangeHistory/index.module.css +66 -181
- package/Common/ChangeHistory/index.stories.tsx +130 -0
- package/Common/ChangeHistory/index.tsx +67 -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 +34 -0
- package/Common/Modal/index.tsx +50 -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 +70 -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 +372 -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/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
|
@@ -1,151 +1,53 @@
|
|
|
1
|
-
|
|
1
|
+
@reference "../../styles/index.css";
|
|
2
|
+
|
|
2
3
|
.languageDropdown {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
transition-duration: var(--tw-duration, var(--default-transition-duration, 150ms));
|
|
12
|
-
}
|
|
13
|
-
&:where([data-theme=dark], [data-theme=dark] *) {
|
|
14
|
-
color: var(--color-neutral-300, #d9e1e4);
|
|
15
|
-
}
|
|
4
|
+
@apply h-9
|
|
5
|
+
w-9
|
|
6
|
+
rounded-md
|
|
7
|
+
p-2
|
|
8
|
+
text-neutral-700
|
|
9
|
+
motion-safe:transition-colors
|
|
10
|
+
dark:text-neutral-300;
|
|
11
|
+
|
|
16
12
|
&:hover {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
background-color: var(--color-neutral-900, #2c3437);
|
|
20
|
-
}
|
|
13
|
+
@apply bg-neutral-100
|
|
14
|
+
dark:bg-neutral-900;
|
|
21
15
|
}
|
|
22
16
|
}
|
|
17
|
+
|
|
23
18
|
.dropDownContent {
|
|
24
|
-
max-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
-
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
37
|
-
&:where([data-theme=dark], [data-theme=dark] *) {
|
|
38
|
-
border-color: var(--color-neutral-900, #2c3437);
|
|
39
|
-
}
|
|
40
|
-
&:where([data-theme=dark], [data-theme=dark] *) {
|
|
41
|
-
background-color: var(--color-neutral-950, #0d121c);
|
|
42
|
-
}
|
|
19
|
+
@apply max-h-80
|
|
20
|
+
w-48
|
|
21
|
+
overflow-hidden
|
|
22
|
+
rounded-sm
|
|
23
|
+
border
|
|
24
|
+
border-neutral-200
|
|
25
|
+
bg-white
|
|
26
|
+
shadow-lg
|
|
27
|
+
dark:border-neutral-900
|
|
28
|
+
dark:bg-neutral-950;
|
|
29
|
+
|
|
43
30
|
> div {
|
|
44
|
-
max-
|
|
45
|
-
|
|
46
|
-
|
|
31
|
+
@apply max-h-80
|
|
32
|
+
w-48
|
|
33
|
+
overflow-y-auto;
|
|
47
34
|
}
|
|
48
35
|
}
|
|
36
|
+
|
|
49
37
|
.dropDownItem {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
outline-offset: 2px;
|
|
63
|
-
}
|
|
64
|
-
&[data-highlighted] {
|
|
65
|
-
background-color: var(--color-green-600, #417e38);
|
|
66
|
-
}
|
|
67
|
-
&[data-highlighted] {
|
|
68
|
-
color: var(--color-white, #fff);
|
|
69
|
-
}
|
|
70
|
-
&:where([data-theme=dark], [data-theme=dark] *) {
|
|
71
|
-
color: var(--color-white, #fff);
|
|
72
|
-
}
|
|
73
|
-
}
|
|
38
|
+
@apply outline-hidden
|
|
39
|
+
cursor-pointer
|
|
40
|
+
px-2.5
|
|
41
|
+
py-1.5
|
|
42
|
+
text-sm
|
|
43
|
+
font-medium
|
|
44
|
+
text-neutral-800
|
|
45
|
+
data-[highlighted]:bg-green-600
|
|
46
|
+
data-[highlighted]:text-white
|
|
47
|
+
dark:text-white;
|
|
48
|
+
}
|
|
49
|
+
|
|
74
50
|
.currentDropDown {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
}
|
|
78
|
-
@property --tw-border-style {
|
|
79
|
-
syntax: "*";
|
|
80
|
-
inherits: false;
|
|
81
|
-
initial-value: solid;
|
|
82
|
-
}
|
|
83
|
-
@property --tw-shadow {
|
|
84
|
-
syntax: "*";
|
|
85
|
-
inherits: false;
|
|
86
|
-
initial-value: 0 0 #0000;
|
|
87
|
-
}
|
|
88
|
-
@property --tw-shadow-color {
|
|
89
|
-
syntax: "*";
|
|
90
|
-
inherits: false;
|
|
91
|
-
}
|
|
92
|
-
@property --tw-shadow-alpha {
|
|
93
|
-
syntax: "<percentage>";
|
|
94
|
-
inherits: false;
|
|
95
|
-
initial-value: 100%;
|
|
96
|
-
}
|
|
97
|
-
@property --tw-inset-shadow {
|
|
98
|
-
syntax: "*";
|
|
99
|
-
inherits: false;
|
|
100
|
-
initial-value: 0 0 #0000;
|
|
101
|
-
}
|
|
102
|
-
@property --tw-inset-shadow-color {
|
|
103
|
-
syntax: "*";
|
|
104
|
-
inherits: false;
|
|
105
|
-
}
|
|
106
|
-
@property --tw-inset-shadow-alpha {
|
|
107
|
-
syntax: "<percentage>";
|
|
108
|
-
inherits: false;
|
|
109
|
-
initial-value: 100%;
|
|
110
|
-
}
|
|
111
|
-
@property --tw-ring-color {
|
|
112
|
-
syntax: "*";
|
|
113
|
-
inherits: false;
|
|
114
|
-
}
|
|
115
|
-
@property --tw-ring-shadow {
|
|
116
|
-
syntax: "*";
|
|
117
|
-
inherits: false;
|
|
118
|
-
initial-value: 0 0 #0000;
|
|
119
|
-
}
|
|
120
|
-
@property --tw-inset-ring-color {
|
|
121
|
-
syntax: "*";
|
|
122
|
-
inherits: false;
|
|
123
|
-
}
|
|
124
|
-
@property --tw-inset-ring-shadow {
|
|
125
|
-
syntax: "*";
|
|
126
|
-
inherits: false;
|
|
127
|
-
initial-value: 0 0 #0000;
|
|
128
|
-
}
|
|
129
|
-
@property --tw-ring-inset {
|
|
130
|
-
syntax: "*";
|
|
131
|
-
inherits: false;
|
|
132
|
-
}
|
|
133
|
-
@property --tw-ring-offset-width {
|
|
134
|
-
syntax: "<length>";
|
|
135
|
-
inherits: false;
|
|
136
|
-
initial-value: 0px;
|
|
137
|
-
}
|
|
138
|
-
@property --tw-ring-offset-color {
|
|
139
|
-
syntax: "*";
|
|
140
|
-
inherits: false;
|
|
141
|
-
initial-value: #fff;
|
|
142
|
-
}
|
|
143
|
-
@property --tw-ring-offset-shadow {
|
|
144
|
-
syntax: "*";
|
|
145
|
-
inherits: false;
|
|
146
|
-
initial-value: 0 0 #0000;
|
|
147
|
-
}
|
|
148
|
-
@property --tw-font-weight {
|
|
149
|
-
syntax: "*";
|
|
150
|
-
inherits: false;
|
|
51
|
+
@apply bg-green-600
|
|
52
|
+
text-white;
|
|
151
53
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Meta as MetaObj, StoryObj } from '@storybook/react';
|
|
2
|
+
|
|
3
|
+
import LanguageDropDown from '#ui/Common/LanguageDropDown';
|
|
4
|
+
|
|
5
|
+
type Story = StoryObj<typeof LanguageDropDown>;
|
|
6
|
+
type Meta = MetaObj<typeof LanguageDropDown>;
|
|
7
|
+
|
|
8
|
+
export const Default: Story = {
|
|
9
|
+
args: {
|
|
10
|
+
availableLanguages: [
|
|
11
|
+
{ name: 'English', code: 'en', localName: 'English' },
|
|
12
|
+
{ name: 'French', code: 'fr', localName: 'Français' },
|
|
13
|
+
{ name: 'Spanish', code: 'es', localName: 'Español' },
|
|
14
|
+
],
|
|
15
|
+
currentLanguage: 'en',
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export default { component: LanguageDropDown } as Meta;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { LanguageIcon } from '@heroicons/react/24/outline';
|
|
2
|
+
import * as DropdownMenu from '@radix-ui/react-dropdown-menu';
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
import type { FC } from 'react';
|
|
5
|
+
|
|
6
|
+
import type { SimpleLocaleConfig } from '#ui/types';
|
|
7
|
+
|
|
8
|
+
import styles from './index.module.css';
|
|
9
|
+
|
|
10
|
+
type LanguageDropDownProps = {
|
|
11
|
+
onChange?: (newLocale: SimpleLocaleConfig) => void;
|
|
12
|
+
currentLanguage: string;
|
|
13
|
+
availableLanguages: Array<SimpleLocaleConfig>;
|
|
14
|
+
ariaLabel: string;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
const LanguageDropdown: FC<LanguageDropDownProps> = ({
|
|
18
|
+
onChange = () => {},
|
|
19
|
+
currentLanguage,
|
|
20
|
+
availableLanguages,
|
|
21
|
+
ariaLabel,
|
|
22
|
+
}) => {
|
|
23
|
+
return (
|
|
24
|
+
<DropdownMenu.Root>
|
|
25
|
+
<DropdownMenu.Trigger asChild>
|
|
26
|
+
<button className={styles.languageDropdown} aria-label={ariaLabel}>
|
|
27
|
+
<LanguageIcon height="20" />
|
|
28
|
+
</button>
|
|
29
|
+
</DropdownMenu.Trigger>
|
|
30
|
+
|
|
31
|
+
<DropdownMenu.Portal>
|
|
32
|
+
<DropdownMenu.Content
|
|
33
|
+
align="start"
|
|
34
|
+
className={styles.dropDownContent}
|
|
35
|
+
sideOffset={5}
|
|
36
|
+
>
|
|
37
|
+
<div>
|
|
38
|
+
{availableLanguages.map(({ name, code, localName }) => (
|
|
39
|
+
<DropdownMenu.Item
|
|
40
|
+
key={code}
|
|
41
|
+
onClick={() => onChange({ name, code, localName })}
|
|
42
|
+
className={classNames(styles.dropDownItem, {
|
|
43
|
+
[styles.currentDropDown]: code === currentLanguage,
|
|
44
|
+
})}
|
|
45
|
+
>
|
|
46
|
+
{localName}
|
|
47
|
+
</DropdownMenu.Item>
|
|
48
|
+
))}
|
|
49
|
+
</div>
|
|
50
|
+
</DropdownMenu.Content>
|
|
51
|
+
</DropdownMenu.Portal>
|
|
52
|
+
</DropdownMenu.Root>
|
|
53
|
+
);
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
export default LanguageDropdown;
|
|
@@ -1,234 +1,79 @@
|
|
|
1
|
-
|
|
1
|
+
@reference "../../styles/index.css";
|
|
2
|
+
|
|
2
3
|
.overlay {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
--tw-backdrop-blur: blur(2px);
|
|
12
|
-
-webkit-backdrop-filter: var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);
|
|
13
|
-
backdrop-filter: var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);
|
|
14
|
-
&:where([data-theme=dark], [data-theme=dark] *) {
|
|
15
|
-
background-color: color-mix(in srgb, #0d121c 40%, transparent);
|
|
16
|
-
@supports (color: color-mix(in lab, red, red)) {
|
|
17
|
-
background-color: color-mix(in oklab, var(--color-neutral-950, #0d121c) 40%, transparent);
|
|
18
|
-
}
|
|
19
|
-
}
|
|
4
|
+
@apply fixed
|
|
5
|
+
inset-0
|
|
6
|
+
flex
|
|
7
|
+
justify-center
|
|
8
|
+
bg-white/40
|
|
9
|
+
backdrop-blur-[2px]
|
|
10
|
+
dark:bg-neutral-950/40;
|
|
11
|
+
|
|
20
12
|
.content {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
@media (width >= 670px) {
|
|
40
|
-
padding: calc(var(--spacing, 0.25rem)*6);
|
|
41
|
-
}
|
|
42
|
-
@media (width >= 40rem) {
|
|
43
|
-
margin-block: calc(var(--spacing, 0.25rem)*20);
|
|
44
|
-
}
|
|
45
|
-
@media (width >= 80rem) {
|
|
46
|
-
padding: calc(var(--spacing, 0.25rem)*12);
|
|
47
|
-
}
|
|
48
|
-
&:where([data-theme=dark], [data-theme=dark] *) {
|
|
49
|
-
background-color: var(--color-neutral-950, #0d121c);
|
|
50
|
-
}
|
|
13
|
+
@apply xs:p-6
|
|
14
|
+
relative
|
|
15
|
+
m-4
|
|
16
|
+
inline-flex
|
|
17
|
+
w-full
|
|
18
|
+
max-w-3xl
|
|
19
|
+
flex-col
|
|
20
|
+
gap-2
|
|
21
|
+
overflow-y-auto
|
|
22
|
+
rounded
|
|
23
|
+
border
|
|
24
|
+
border-neutral-200
|
|
25
|
+
bg-white
|
|
26
|
+
p-8
|
|
27
|
+
focus:outline-none
|
|
28
|
+
sm:my-20
|
|
29
|
+
xl:p-12
|
|
30
|
+
dark:bg-neutral-950;
|
|
51
31
|
}
|
|
32
|
+
|
|
52
33
|
.close {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
&:focus {
|
|
68
|
-
--tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);
|
|
69
|
-
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
70
|
-
}
|
|
71
|
-
&:focus {
|
|
72
|
-
--tw-ring-color: var(--color-neutral-200, #e9edf0);
|
|
73
|
-
}
|
|
74
|
-
&:focus {
|
|
75
|
-
--tw-outline-style: none;
|
|
76
|
-
outline-style: none;
|
|
77
|
-
}
|
|
78
|
-
&:where([data-theme=dark], [data-theme=dark] *) {
|
|
79
|
-
&:hover {
|
|
80
|
-
@media (hover: hover) {
|
|
81
|
-
background-color: var(--color-neutral-900, #2c3437);
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
&:where([data-theme=dark], [data-theme=dark] *) {
|
|
86
|
-
&:focus {
|
|
87
|
-
--tw-ring-color: var(--color-neutral-900, #2c3437);
|
|
88
|
-
}
|
|
89
|
-
}
|
|
34
|
+
@apply absolute
|
|
35
|
+
right-3
|
|
36
|
+
top-3
|
|
37
|
+
block
|
|
38
|
+
size-7
|
|
39
|
+
cursor-pointer
|
|
40
|
+
rounded-sm
|
|
41
|
+
p-1
|
|
42
|
+
hover:bg-neutral-100
|
|
43
|
+
focus:outline-none
|
|
44
|
+
focus:ring-2
|
|
45
|
+
focus:ring-neutral-200
|
|
46
|
+
dark:hover:bg-neutral-900
|
|
47
|
+
dark:focus:ring-neutral-900;
|
|
90
48
|
}
|
|
49
|
+
|
|
91
50
|
.title {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
color: var(--color-neutral-900, #2c3437);
|
|
97
|
-
&:where([data-theme=dark], [data-theme=dark] *) {
|
|
98
|
-
color: var(--color-white, #fff);
|
|
99
|
-
}
|
|
51
|
+
@apply text-3xl
|
|
52
|
+
font-semibold
|
|
53
|
+
text-neutral-900
|
|
54
|
+
dark:text-white;
|
|
100
55
|
}
|
|
56
|
+
|
|
101
57
|
.description {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
color: var(--color-neutral-800, #556066);
|
|
108
|
-
&:where([data-theme=dark], [data-theme=dark] *) {
|
|
109
|
-
color: var(--color-neutral-200, #e9edf0);
|
|
110
|
-
}
|
|
58
|
+
@apply font-regular
|
|
59
|
+
mb-2
|
|
60
|
+
text-lg
|
|
61
|
+
text-neutral-800
|
|
62
|
+
dark:text-neutral-200;
|
|
111
63
|
}
|
|
64
|
+
|
|
112
65
|
.wrapper {
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
66
|
+
@apply flex
|
|
67
|
+
flex-col
|
|
68
|
+
gap-4;
|
|
69
|
+
|
|
116
70
|
pre {
|
|
117
|
-
overflow
|
|
71
|
+
@apply overflow-auto;
|
|
118
72
|
}
|
|
73
|
+
|
|
119
74
|
code,
|
|
120
75
|
a {
|
|
121
|
-
|
|
76
|
+
@apply break-words;
|
|
122
77
|
}
|
|
123
78
|
}
|
|
124
79
|
}
|
|
125
|
-
@property --tw-backdrop-blur {
|
|
126
|
-
syntax: "*";
|
|
127
|
-
inherits: false;
|
|
128
|
-
}
|
|
129
|
-
@property --tw-backdrop-brightness {
|
|
130
|
-
syntax: "*";
|
|
131
|
-
inherits: false;
|
|
132
|
-
}
|
|
133
|
-
@property --tw-backdrop-contrast {
|
|
134
|
-
syntax: "*";
|
|
135
|
-
inherits: false;
|
|
136
|
-
}
|
|
137
|
-
@property --tw-backdrop-grayscale {
|
|
138
|
-
syntax: "*";
|
|
139
|
-
inherits: false;
|
|
140
|
-
}
|
|
141
|
-
@property --tw-backdrop-hue-rotate {
|
|
142
|
-
syntax: "*";
|
|
143
|
-
inherits: false;
|
|
144
|
-
}
|
|
145
|
-
@property --tw-backdrop-invert {
|
|
146
|
-
syntax: "*";
|
|
147
|
-
inherits: false;
|
|
148
|
-
}
|
|
149
|
-
@property --tw-backdrop-opacity {
|
|
150
|
-
syntax: "*";
|
|
151
|
-
inherits: false;
|
|
152
|
-
}
|
|
153
|
-
@property --tw-backdrop-saturate {
|
|
154
|
-
syntax: "*";
|
|
155
|
-
inherits: false;
|
|
156
|
-
}
|
|
157
|
-
@property --tw-backdrop-sepia {
|
|
158
|
-
syntax: "*";
|
|
159
|
-
inherits: false;
|
|
160
|
-
}
|
|
161
|
-
@property --tw-border-style {
|
|
162
|
-
syntax: "*";
|
|
163
|
-
inherits: false;
|
|
164
|
-
initial-value: solid;
|
|
165
|
-
}
|
|
166
|
-
@property --tw-shadow {
|
|
167
|
-
syntax: "*";
|
|
168
|
-
inherits: false;
|
|
169
|
-
initial-value: 0 0 #0000;
|
|
170
|
-
}
|
|
171
|
-
@property --tw-shadow-color {
|
|
172
|
-
syntax: "*";
|
|
173
|
-
inherits: false;
|
|
174
|
-
}
|
|
175
|
-
@property --tw-shadow-alpha {
|
|
176
|
-
syntax: "<percentage>";
|
|
177
|
-
inherits: false;
|
|
178
|
-
initial-value: 100%;
|
|
179
|
-
}
|
|
180
|
-
@property --tw-inset-shadow {
|
|
181
|
-
syntax: "*";
|
|
182
|
-
inherits: false;
|
|
183
|
-
initial-value: 0 0 #0000;
|
|
184
|
-
}
|
|
185
|
-
@property --tw-inset-shadow-color {
|
|
186
|
-
syntax: "*";
|
|
187
|
-
inherits: false;
|
|
188
|
-
}
|
|
189
|
-
@property --tw-inset-shadow-alpha {
|
|
190
|
-
syntax: "<percentage>";
|
|
191
|
-
inherits: false;
|
|
192
|
-
initial-value: 100%;
|
|
193
|
-
}
|
|
194
|
-
@property --tw-ring-color {
|
|
195
|
-
syntax: "*";
|
|
196
|
-
inherits: false;
|
|
197
|
-
}
|
|
198
|
-
@property --tw-ring-shadow {
|
|
199
|
-
syntax: "*";
|
|
200
|
-
inherits: false;
|
|
201
|
-
initial-value: 0 0 #0000;
|
|
202
|
-
}
|
|
203
|
-
@property --tw-inset-ring-color {
|
|
204
|
-
syntax: "*";
|
|
205
|
-
inherits: false;
|
|
206
|
-
}
|
|
207
|
-
@property --tw-inset-ring-shadow {
|
|
208
|
-
syntax: "*";
|
|
209
|
-
inherits: false;
|
|
210
|
-
initial-value: 0 0 #0000;
|
|
211
|
-
}
|
|
212
|
-
@property --tw-ring-inset {
|
|
213
|
-
syntax: "*";
|
|
214
|
-
inherits: false;
|
|
215
|
-
}
|
|
216
|
-
@property --tw-ring-offset-width {
|
|
217
|
-
syntax: "<length>";
|
|
218
|
-
inherits: false;
|
|
219
|
-
initial-value: 0px;
|
|
220
|
-
}
|
|
221
|
-
@property --tw-ring-offset-color {
|
|
222
|
-
syntax: "*";
|
|
223
|
-
inherits: false;
|
|
224
|
-
initial-value: #fff;
|
|
225
|
-
}
|
|
226
|
-
@property --tw-ring-offset-shadow {
|
|
227
|
-
syntax: "*";
|
|
228
|
-
inherits: false;
|
|
229
|
-
initial-value: 0 0 #0000;
|
|
230
|
-
}
|
|
231
|
-
@property --tw-font-weight {
|
|
232
|
-
syntax: "*";
|
|
233
|
-
inherits: false;
|
|
234
|
-
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { Meta as MetaObj, StoryObj } from '@storybook/react';
|
|
2
|
+
|
|
3
|
+
import { Modal, Title, Description, Content } from '#ui/Common/Modal';
|
|
4
|
+
|
|
5
|
+
type Story = StoryObj<typeof Modal>;
|
|
6
|
+
type Meta = MetaObj<typeof Modal>;
|
|
7
|
+
|
|
8
|
+
export const Default: Story = {
|
|
9
|
+
args: {
|
|
10
|
+
open: true,
|
|
11
|
+
children: (
|
|
12
|
+
<Content>
|
|
13
|
+
<Title>Node.js Versions Information</Title>
|
|
14
|
+
<Description>
|
|
15
|
+
Get all information about Node.js versions and their changes.
|
|
16
|
+
</Description>
|
|
17
|
+
<p>
|
|
18
|
+
Lorem ipsum dolor sit amet consectetur adipisicing elit. Architecto
|
|
19
|
+
atque sint doloremque, sapiente recusandae debitis libero nostrum
|
|
20
|
+
repudiandae explicabo suscipit ipsam eos dolorem, necessitatibus odit
|
|
21
|
+
quos delectus natus sunt sit!
|
|
22
|
+
</p>
|
|
23
|
+
<p>
|
|
24
|
+
Lorem ipsum dolor sit amet consectetur, adipisicing elit. Earum
|
|
25
|
+
asperiores corporis tempore neque, officiis fuga est facere deserunt
|
|
26
|
+
amet minus sit architecto blanditiis hic sed odit cumque numquam
|
|
27
|
+
dignissimos delectus.
|
|
28
|
+
</p>
|
|
29
|
+
</Content>
|
|
30
|
+
),
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export default { component: Modal } as Meta;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { XMarkIcon } from '@heroicons/react/24/outline';
|
|
4
|
+
import * as Dialog from '@radix-ui/react-dialog';
|
|
5
|
+
import type { FC, PropsWithChildren } from 'react';
|
|
6
|
+
|
|
7
|
+
import styles from './index.module.css';
|
|
8
|
+
|
|
9
|
+
type ModalProps = PropsWithChildren<{
|
|
10
|
+
open?: boolean;
|
|
11
|
+
onOpenChange?: (open: boolean) => void;
|
|
12
|
+
}>;
|
|
13
|
+
|
|
14
|
+
const Modal: FC<ModalProps> = ({
|
|
15
|
+
children,
|
|
16
|
+
open = false,
|
|
17
|
+
onOpenChange = () => {},
|
|
18
|
+
}) => (
|
|
19
|
+
<Dialog.Root open={open} onOpenChange={onOpenChange}>
|
|
20
|
+
<Dialog.Portal>
|
|
21
|
+
<Dialog.Overlay className={styles.overlay}>
|
|
22
|
+
<Dialog.Content className={styles.content}>
|
|
23
|
+
<Dialog.Trigger className={styles.close}>
|
|
24
|
+
<XMarkIcon />
|
|
25
|
+
</Dialog.Trigger>
|
|
26
|
+
|
|
27
|
+
{children}
|
|
28
|
+
|
|
29
|
+
<Dialog.Close />
|
|
30
|
+
</Dialog.Content>
|
|
31
|
+
</Dialog.Overlay>
|
|
32
|
+
</Dialog.Portal>
|
|
33
|
+
</Dialog.Root>
|
|
34
|
+
);
|
|
35
|
+
|
|
36
|
+
const Title = ({ children }: PropsWithChildren) => (
|
|
37
|
+
<Dialog.Title className={styles.title}>{children}</Dialog.Title>
|
|
38
|
+
);
|
|
39
|
+
|
|
40
|
+
const Description = ({ children }: PropsWithChildren) => (
|
|
41
|
+
<Dialog.Description className={styles.description}>
|
|
42
|
+
{children}
|
|
43
|
+
</Dialog.Description>
|
|
44
|
+
);
|
|
45
|
+
|
|
46
|
+
const Content = ({ children }: PropsWithChildren) => (
|
|
47
|
+
<main className={styles.wrapper}>{children}</main>
|
|
48
|
+
);
|
|
49
|
+
|
|
50
|
+
export { Modal, Title, Description, Content };
|
|
@@ -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;
|