@node-core/ui-components 1.0.1-a459447336d99556960d6f9e1c997327b29e4974 → 1.0.1-b2d4fae0fc29bf3aeebacb37572f47a0a81dd8ed
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 +1 -76
- package/Common/AvatarGroup/Avatar/index.module.css +1 -59
- package/Common/AvatarGroup/Overlay/index.module.css +1 -37
- package/Common/AvatarGroup/index.module.css +1 -21
- package/Common/Badge/index.js +1 -3
- package/Common/Badge/index.module.css +1 -45
- package/Common/BadgeGroup/index.js +2 -2
- package/Common/BadgeGroup/index.module.css +1 -100
- package/Common/Banner/index.module.css +1 -44
- package/Common/BaseButton/index.module.css +1 -371
- package/Common/BaseCodeBox/index.module.css +1 -95
- package/Common/BaseCrossLink/index.module.css +1 -68
- package/Common/BaseLinkTabs/index.module.css +1 -76
- package/Common/BasePagination/Ellipsis/index.module.css +1 -15
- package/Common/BasePagination/PaginationListItem/index.module.css +1 -41
- package/Common/BasePagination/index.module.css +1 -39
- package/Common/Blockquote/index.module.css +1 -49
- package/Common/Breadcrumbs/BreadcrumbHomeLink/index.module.css +1 -4
- package/Common/Breadcrumbs/BreadcrumbItem/index.module.css +1 -51
- package/Common/Breadcrumbs/BreadcrumbLink/index.module.css +1 -31
- package/Common/Breadcrumbs/BreadcrumbRoot/index.module.css +1 -9
- package/Common/ChangeHistory/index.module.css +1 -197
- package/Common/CodeTabs/index.module.css +1 -66
- package/Common/DataTag/index.module.css +1 -53
- package/Common/GlowingBackdrop/index.module.css +1 -129
- package/Common/LanguageDropDown/index.module.css +1 -150
- package/Common/Modal/index.module.css +1 -233
- package/Common/NodejsLogo/index.module.css +1 -4
- package/Common/Notification/index.module.css +1 -103
- package/Common/Preview/index.module.css +1 -282
- package/Common/Select/index.js +2 -4
- package/Common/Select/index.module.css +1 -327
- package/Common/Separator/index.module.css +1 -12
- package/Common/Skeleton/index.module.css +1 -126
- package/Common/Tabs/index.module.css +1 -71
- package/Common/ThemeToggle/index.module.css +1 -21
- package/Common/Tooltip/index.module.css +1 -132
- package/Containers/Article/index.module.css +1 -138
- package/Containers/Footer/index.js +2 -3
- package/Containers/Footer/index.module.css +1 -60
- package/Containers/MetaBar/index.module.css +1 -122
- package/Containers/NavBar/NavItem/index.module.css +1 -73
- package/Containers/NavBar/index.module.css +1 -204
- package/Containers/Sidebar/SidebarGroup/index.module.css +1 -191
- package/Containers/Sidebar/SidebarItem/index.js +1 -1
- package/Containers/Sidebar/SidebarItem/index.module.css +1 -66
- package/Containers/Sidebar/index.module.css +1 -47
- package/MDX/CodeTabs.js +11 -2
- package/Providers/NotificationProvider/index.js +16 -0
- package/Providers/NotificationProvider/index.module.css +2 -0
- package/package.json +5 -2
- package/styles/index.css +1 -1135
- package/Containers/DocSideBar/index.js +0 -1
|
@@ -1,48 +1,2 @@
|
|
|
1
1
|
/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */
|
|
2
|
-
.wrapper {
|
|
3
|
-
display: flex;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex-direction: column;
|
|
6
|
-
gap: calc(var(--spacing, 0.25rem)*8);
|
|
7
|
-
overflow: auto;
|
|
8
|
-
border-right-style: var(--tw-border-style);
|
|
9
|
-
border-right-width: 0px;
|
|
10
|
-
border-color: var(--color-neutral-200, #e9edf0);
|
|
11
|
-
background-color: var(--color-white, #fff);
|
|
12
|
-
padding-inline: calc(var(--spacing, 0.25rem)*4);
|
|
13
|
-
padding-block: calc(var(--spacing, 0.25rem)*6);
|
|
14
|
-
@media (width >= 40rem) {
|
|
15
|
-
border-right-style: var(--tw-border-style);
|
|
16
|
-
border-right-width: 1px;
|
|
17
|
-
}
|
|
18
|
-
@media (width >= 48rem) {
|
|
19
|
-
max-width: var(--container-xs, 20rem);
|
|
20
|
-
}
|
|
21
|
-
@media (width >= 64rem) {
|
|
22
|
-
padding-inline: calc(var(--spacing, 0.25rem)*6);
|
|
23
|
-
}
|
|
24
|
-
&:where([data-theme=dark], [data-theme=dark] *) {
|
|
25
|
-
border-color: var(--color-neutral-900, #2c3437);
|
|
26
|
-
}
|
|
27
|
-
&:where([data-theme=dark], [data-theme=dark] *) {
|
|
28
|
-
background-color: var(--color-neutral-950, #0d121c);
|
|
29
|
-
}
|
|
30
|
-
.navigation {
|
|
31
|
-
display: none;
|
|
32
|
-
@media (width >= 40rem) {
|
|
33
|
-
display: flex;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
.mobileSelect {
|
|
37
|
-
display: flex;
|
|
38
|
-
width: 100%;
|
|
39
|
-
@media (width >= 40rem) {
|
|
40
|
-
display: none;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
@property --tw-border-style {
|
|
45
|
-
syntax: "*";
|
|
46
|
-
inherits: false;
|
|
47
|
-
initial-value: solid;
|
|
48
|
-
}
|
|
2
|
+
.wrapper{gap:calc(var(--spacing,.25rem)*8);border-right-style:var(--tw-border-style);border-right-width:0;border-color:var(--color-neutral-200,#e9edf0);background-color:var(--color-white,#fff);width:100%;padding-inline:calc(var(--spacing,.25rem)*4);padding-block:calc(var(--spacing,.25rem)*6);flex-direction:column;display:flex;overflow:auto}@media (min-width:40rem){.wrapper{border-right-style:var(--tw-border-style);border-right-width:1px}}@media (min-width:48rem){.wrapper{max-width:var(--container-xs,20rem)}}@media (min-width:64rem){.wrapper{padding-inline:calc(var(--spacing,.25rem)*6)}}.wrapper:where([data-theme=dark],[data-theme=dark] *){border-color:var(--color-neutral-900,#2c3437);background-color:var(--color-neutral-950,#0d121c)}.wrapper .navigation{display:none}@media (min-width:40rem){.wrapper .navigation{display:flex}}.wrapper .mobileSelect{width:100%;display:flex}@media (min-width:40rem){.wrapper .mobileSelect{display:none}}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}
|
package/MDX/CodeTabs.js
CHANGED
|
@@ -1,14 +1,23 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
3
3
|
import CodeTabs from '#ui/Common/CodeTabs';
|
|
4
|
+
const NAME_OVERRIDES = {
|
|
5
|
+
mjs: 'ESM',
|
|
6
|
+
};
|
|
4
7
|
const MDXCodeTabs = ({ languages: rawLanguages, displayNames: rawDisplayNames, children: codes, defaultTab = '0', ...props }) => {
|
|
5
8
|
const languages = rawLanguages.split('|');
|
|
6
9
|
const displayNames = rawDisplayNames?.split('|') ?? [];
|
|
10
|
+
const occurrences = {};
|
|
7
11
|
const tabs = languages.map((language, index) => {
|
|
8
|
-
const
|
|
12
|
+
const base = displayNames[index]?.trim() ||
|
|
13
|
+
NAME_OVERRIDES[language] ||
|
|
14
|
+
language.toUpperCase();
|
|
15
|
+
const count = occurrences[base] ?? 0;
|
|
16
|
+
occurrences[base] = count + 1;
|
|
17
|
+
const label = count > 0 ? `${base} (${count + 1})` : base;
|
|
9
18
|
return {
|
|
10
19
|
key: `${language}-${index}`,
|
|
11
|
-
label:
|
|
20
|
+
label: label,
|
|
12
21
|
};
|
|
13
22
|
});
|
|
14
23
|
return (_jsx(CodeTabs, { tabs: tabs, defaultValue: tabs[Number(defaultTab)].key, ...props, children: languages.map((_, index) => (_jsx(TabsPrimitive.Content, { value: tabs[index].key, children: codes[index] }, tabs[index].key))) }));
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as Toast from '@radix-ui/react-toast';
|
|
3
|
+
import { createContext, useContext, useEffect, useState } from 'react';
|
|
4
|
+
import Notification from '#ui/Common/Notification';
|
|
5
|
+
import styles from './index.module.css';
|
|
6
|
+
const NotificationContext = createContext(null);
|
|
7
|
+
export const NotificationDispatch = createContext(() => { });
|
|
8
|
+
export const useNotification = () => useContext(NotificationDispatch);
|
|
9
|
+
export const NotificationProvider = ({ children }) => {
|
|
10
|
+
const [notification, dispatch] = useState(null);
|
|
11
|
+
useEffect(() => {
|
|
12
|
+
const timeout = setTimeout(() => dispatch(null), notification?.duration);
|
|
13
|
+
return () => clearTimeout(timeout);
|
|
14
|
+
}, [notification]);
|
|
15
|
+
return (_jsx(NotificationContext.Provider, { value: notification, children: _jsx(NotificationDispatch.Provider, { value: dispatch, children: _jsxs(Toast.Provider, { children: [children, notification && (_jsx(Notification, { duration: notification.duration, children: notification.message })), _jsx(Toast.Viewport, { className: styles.viewport })] }) }) }));
|
|
16
|
+
};
|
package/package.json
CHANGED
|
@@ -12,8 +12,11 @@
|
|
|
12
12
|
"@radix-ui/react-tabs": "~1.1.12",
|
|
13
13
|
"@radix-ui/react-toast": "~1.2.14",
|
|
14
14
|
"@radix-ui/react-tooltip": "~1.2.7",
|
|
15
|
+
"@tailwindcss/postcss": "~4.1.11",
|
|
15
16
|
"@vcarl/remark-headings": "~0.1.0",
|
|
16
|
-
"classnames": "~2.5.1"
|
|
17
|
+
"classnames": "~2.5.1",
|
|
18
|
+
"postcss-calc": "^10.1.1",
|
|
19
|
+
"tailwindcss": "~4.0.17"
|
|
17
20
|
},
|
|
18
21
|
"imports": {
|
|
19
22
|
"#ui/*": [
|
|
@@ -23,7 +26,7 @@
|
|
|
23
26
|
"engines": {
|
|
24
27
|
"node": ">=20"
|
|
25
28
|
},
|
|
26
|
-
"version": "1.0.1-
|
|
29
|
+
"version": "1.0.1-b2d4fae0fc29bf3aeebacb37572f47a0a81dd8ed",
|
|
27
30
|
"scripts": {
|
|
28
31
|
"compile:ts": "tsc",
|
|
29
32
|
"compile:css": "postcss --dir dist --base src \"src/**/*.module.css\" src/styles/index.css",
|