@node-core/ui-components 0.0.1 → 1.0.1-1b9af3ec9e0268bfc734b2489cbc584fa3edf026
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.js +5 -0
- package/Common/AlertBox/index.module.css +77 -0
- package/Common/AvatarGroup/Avatar/index.js +11 -0
- package/Common/AvatarGroup/Avatar/index.module.css +60 -0
- package/Common/AvatarGroup/Overlay/index.js +6 -0
- package/Common/AvatarGroup/Overlay/index.module.css +38 -0
- package/Common/AvatarGroup/index.js +21 -0
- package/Common/AvatarGroup/index.module.css +22 -0
- package/Common/Badge/index.js +7 -0
- package/Common/Badge/index.module.css +46 -0
- package/Common/BadgeGroup/index.js +6 -0
- package/Common/BadgeGroup/index.module.css +101 -0
- package/Common/Banner/index.js +4 -0
- package/Common/Banner/index.module.css +45 -0
- package/Common/BaseActiveLink/index.js +14 -0
- package/Common/BaseButton/index.js +10 -0
- package/Common/BaseButton/index.module.css +372 -0
- package/Common/BaseCodeBox/index.js +50 -0
- package/Common/BaseCodeBox/index.module.css +96 -0
- package/Common/BaseCrossLink/index.js +12 -0
- package/Common/BaseCrossLink/index.module.css +69 -0
- package/Common/BaseLinkTabs/index.js +5 -0
- package/Common/BaseLinkTabs/index.module.css +77 -0
- package/Common/BasePagination/Ellipsis/index.js +4 -0
- package/Common/BasePagination/Ellipsis/index.module.css +16 -0
- package/Common/BasePagination/PaginationListItem/index.js +6 -0
- package/Common/BasePagination/PaginationListItem/index.module.css +42 -0
- package/Common/BasePagination/PrevNextArrow.js +7 -0
- package/Common/BasePagination/index.js +10 -0
- package/Common/BasePagination/index.module.css +40 -0
- package/Common/BasePagination/useGetPageElements.js +77 -0
- package/Common/Blockquote/index.js +4 -0
- package/Common/Blockquote/index.module.css +50 -0
- package/Common/Breadcrumbs/BreadcrumbHomeLink/index.js +9 -0
- package/Common/Breadcrumbs/BreadcrumbHomeLink/index.module.css +5 -0
- package/Common/Breadcrumbs/BreadcrumbItem/index.js +6 -0
- package/Common/Breadcrumbs/BreadcrumbItem/index.module.css +52 -0
- package/Common/Breadcrumbs/BreadcrumbLink/index.js +5 -0
- package/Common/Breadcrumbs/BreadcrumbLink/index.module.css +32 -0
- package/Common/Breadcrumbs/BreadcrumbRoot/index.js +4 -0
- package/Common/Breadcrumbs/BreadcrumbRoot/index.module.css +10 -0
- package/Common/Breadcrumbs/BreadcrumbTruncatedItem/index.js +4 -0
- package/Common/Breadcrumbs/index.js +22 -0
- package/Common/ChangeHistory/index.js +9 -0
- package/Common/ChangeHistory/index.module.css +198 -0
- package/Common/CodeTabs/index.js +5 -0
- package/Common/CodeTabs/index.module.css +67 -0
- package/Common/DataTag/index.js +18 -0
- package/Common/DataTag/index.module.css +54 -0
- package/Common/GlowingBackdrop/index.js +5 -0
- package/Common/GlowingBackdrop/index.module.css +130 -0
- package/Common/LanguageDropDown/index.js +11 -0
- package/Common/LanguageDropDown/index.module.css +151 -0
- package/Common/Modal/index.js +10 -0
- package/Common/Modal/index.module.css +234 -0
- package/Common/NodejsLogo/index.js +7 -0
- package/Common/NodejsLogo/index.module.css +5 -0
- package/Common/Notification/index.js +6 -0
- package/Common/Notification/index.module.css +104 -0
- package/Common/Preview/index.js +7 -0
- package/Common/Preview/index.module.css +283 -0
- package/Common/Select/index.js +46 -0
- package/Common/Select/index.module.css +328 -0
- package/Common/Separator/index.js +7 -0
- package/Common/Separator/index.module.css +13 -0
- package/Common/Skeleton/index.js +18 -0
- package/Common/Skeleton/index.module.css +127 -0
- package/Common/Tabs/index.js +6 -0
- package/Common/Tabs/index.module.css +72 -0
- package/Common/ThemeToggle/index.js +7 -0
- package/Common/ThemeToggle/index.module.css +22 -0
- package/Common/Tooltip/index.js +8 -0
- package/Common/Tooltip/index.module.css +133 -0
- package/Containers/Article/index.js +4 -0
- package/Containers/Article/index.module.css +139 -0
- package/Containers/DocSideBar/index.js +1 -0
- package/Containers/Footer/index.js +22 -0
- package/Containers/Footer/index.module.css +61 -0
- package/Containers/MetaBar/index.js +12 -0
- package/Containers/MetaBar/index.module.css +123 -0
- package/Containers/NavBar/NavItem/index.js +7 -0
- package/Containers/NavBar/NavItem/index.module.css +74 -0
- package/Containers/NavBar/index.js +18 -0
- package/Containers/NavBar/index.module.css +205 -0
- package/Containers/Sidebar/ProgressionIcon/index.js +3 -0
- package/Containers/Sidebar/SidebarGroup/index.js +9 -0
- package/Containers/Sidebar/SidebarGroup/index.module.css +192 -0
- package/Containers/Sidebar/SidebarItem/index.js +11 -0
- package/Containers/Sidebar/SidebarItem/index.module.css +67 -0
- package/Containers/Sidebar/index.js +15 -0
- package/Containers/Sidebar/index.module.css +48 -0
- package/Icons/HexagonGrid.js +3 -0
- package/Icons/InstallationMethod/Choco.js +3 -0
- package/Icons/InstallationMethod/Devbox.js +3 -0
- package/Icons/InstallationMethod/Docker.js +3 -0
- package/Icons/InstallationMethod/FNM.js +3 -0
- package/Icons/InstallationMethod/Homebrew.js +3 -0
- package/Icons/InstallationMethod/N.js +5 -0
- package/Icons/InstallationMethod/NVM.js +3 -0
- package/Icons/InstallationMethod/Volta.js +3 -0
- package/Icons/InstallationMethod/index.js +9 -0
- package/Icons/Logos/JsGreen.js +3 -0
- package/Icons/Logos/JsWhite.js +3 -0
- package/Icons/Logos/Nodejs.js +6 -0
- package/Icons/Logos/NodejsStackedBlack.js +3 -0
- package/Icons/Logos/NodejsStackedDark.js +3 -0
- package/Icons/Logos/NodejsStackedLight.js +3 -0
- package/Icons/Logos/NodejsStackedWhite.js +3 -0
- package/Icons/Logos/index.js +8 -0
- package/Icons/OperatingSystem/AIX.js +3 -0
- package/Icons/OperatingSystem/Apple.js +3 -0
- package/Icons/OperatingSystem/Linux.js +3 -0
- package/Icons/OperatingSystem/Microsoft.js +3 -0
- package/Icons/OperatingSystem/index.js +5 -0
- package/Icons/PackageManager/Npm.js +3 -0
- package/Icons/PackageManager/Pnpm.js +3 -0
- package/Icons/PackageManager/Yarn.js +3 -0
- package/Icons/PackageManager/index.js +4 -0
- package/Icons/Social/Bluesky.js +3 -0
- package/Icons/Social/Discord.js +3 -0
- package/Icons/Social/GitHub.js +3 -0
- package/Icons/Social/LinkedIn.js +3 -0
- package/Icons/Social/Mastodon.js +3 -0
- package/Icons/Social/Slack.js +3 -0
- package/Icons/Social/X.js +3 -0
- package/Icons/Social/index.js +8 -0
- package/LICENSE +21 -0
- package/MDX/CodeTabs.js +16 -0
- package/package.json +39 -5
- package/stylelint/one-utility-class-per-line.mjs +48 -0
- package/stylelint/utils.mjs +47 -0
- package/styles/index.css +1139 -0
- package/types.js +1 -0
- package/README.md +0 -1
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import classNames from 'classnames';
|
|
3
|
+
import styles from './index.module.css';
|
|
4
|
+
const AlertBox = ({ level, title, children, size = 'default', }) => (_jsxs("div", { className: classNames(styles.alertBox, styles[level], styles[size]), children: [_jsx("span", { className: styles.title, children: title }), _jsx("span", { children: children })] }));
|
|
5
|
+
export default AlertBox;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */
|
|
2
|
+
.alertBox {
|
|
3
|
+
display: flex;
|
|
4
|
+
flex-direction: row;
|
|
5
|
+
align-items: center;
|
|
6
|
+
gap: calc(var(--spacing, 0.25rem)*2);
|
|
7
|
+
border-radius: var(--radius-sm, 0.25rem);
|
|
8
|
+
padding-inline: calc(var(--spacing, 0.25rem)*4);
|
|
9
|
+
padding-block: calc(var(--spacing, 0.25rem)*3);
|
|
10
|
+
font-size: var(--text-sm, 0.875rem);
|
|
11
|
+
line-height: var(--tw-leading, var(--text-sm--line-height, 1.42857));
|
|
12
|
+
color: var(--color-white, #fff);
|
|
13
|
+
a {
|
|
14
|
+
--tw-font-weight: var(--font-weight-bold, 700);
|
|
15
|
+
font-weight: var(--font-weight-bold, 700);
|
|
16
|
+
color: var(--color-white, #fff);
|
|
17
|
+
text-decoration-line: underline;
|
|
18
|
+
&:hover {
|
|
19
|
+
@media (hover: hover) {
|
|
20
|
+
color: var(--color-white, #fff);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
&:hover {
|
|
24
|
+
text-decoration-line: none;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
&.small {
|
|
28
|
+
gap: calc(var(--spacing, 0.25rem)*1);
|
|
29
|
+
padding-block: calc(var(--spacing, 0.25rem)*2);
|
|
30
|
+
font-size: var(--text-xs, 0.75rem);
|
|
31
|
+
line-height: var(--tw-leading, var(--text-xs--line-height, 1.33333));
|
|
32
|
+
.title {
|
|
33
|
+
padding-inline: calc(var(--spacing, 0.25rem)*1);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
.title {
|
|
37
|
+
border-radius: var(--radius-xs, 0.125rem);
|
|
38
|
+
padding-inline: calc(var(--spacing, 0.25rem)*1.5);
|
|
39
|
+
}
|
|
40
|
+
svg {
|
|
41
|
+
display: inline;
|
|
42
|
+
width: calc(var(--spacing, 0.25rem)*5);
|
|
43
|
+
height: calc(var(--spacing, 0.25rem)*5);
|
|
44
|
+
}
|
|
45
|
+
&.info {
|
|
46
|
+
background-color: var(--color-info-600, #0c7bb3);
|
|
47
|
+
.title {
|
|
48
|
+
background-color: var(--color-info-700, #066291);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
&.success {
|
|
52
|
+
background-color: var(--color-green-600, #417e38);
|
|
53
|
+
.title {
|
|
54
|
+
background-color: var(--color-green-700, #2c682c);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
&.warning {
|
|
58
|
+
background-color: var(--color-warning-600, #ae5f00);
|
|
59
|
+
.title {
|
|
60
|
+
background-color: var(--color-warning-700, #8b4d04);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
&.danger {
|
|
64
|
+
background-color: var(--color-danger-600, #de1a1b);
|
|
65
|
+
.title {
|
|
66
|
+
background-color: var(--color-danger-700, #b80c0c);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
code {
|
|
70
|
+
all: unset;
|
|
71
|
+
font-family: var(--font-ibm-plex-mono, var(--font-ibm-plex-mono));
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
@property --tw-font-weight {
|
|
75
|
+
syntax: "*";
|
|
76
|
+
inherits: false;
|
|
77
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as RadixAvatar from '@radix-ui/react-avatar';
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
import { forwardRef } from 'react';
|
|
5
|
+
import styles from './index.module.css';
|
|
6
|
+
const Avatar = forwardRef(({ image, nickname, name, fallback, url, size = 'small', as: Component = 'a', ...props }, ref) => {
|
|
7
|
+
if (!url)
|
|
8
|
+
Component = 'div';
|
|
9
|
+
return (_jsx(RadixAvatar.Root, { ...props, ref: ref, className: classNames(styles.avatar, styles[size], props.className), children: _jsxs(Component, { href: url || undefined, target: url ? '_blank' : undefined, className: styles.wrapper, children: [_jsx(RadixAvatar.Image, { loading: "lazy", decoding: "async", src: image, alt: name || nickname, className: styles.item }), _jsx(RadixAvatar.Fallback, { className: classNames(styles.item, styles[size]), children: fallback })] }) }));
|
|
10
|
+
});
|
|
11
|
+
export default Avatar;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */
|
|
2
|
+
.item {
|
|
3
|
+
display: flex;
|
|
4
|
+
height: 100%;
|
|
5
|
+
max-height: calc(var(--spacing, 0.25rem)*12);
|
|
6
|
+
width: 100%;
|
|
7
|
+
max-width: calc(var(--spacing, 0.25rem)*12);
|
|
8
|
+
align-items: center;
|
|
9
|
+
justify-content: center;
|
|
10
|
+
border-radius: calc(infinity*1px);
|
|
11
|
+
border-style: var(--tw-border-style);
|
|
12
|
+
border-width: 2px;
|
|
13
|
+
border-color: transparent;
|
|
14
|
+
background-color: var(--color-neutral-100, #f6f7f9);
|
|
15
|
+
object-fit: cover;
|
|
16
|
+
font-size: var(--text-xs, 0.75rem);
|
|
17
|
+
line-height: var(--tw-leading, var(--text-xs--line-height, 1.33333));
|
|
18
|
+
color: var(--color-neutral-800, #556066);
|
|
19
|
+
@media (width >= 670px) {
|
|
20
|
+
max-height: calc(var(--spacing, 0.25rem)*10);
|
|
21
|
+
}
|
|
22
|
+
@media (width >= 670px) {
|
|
23
|
+
max-width: calc(var(--spacing, 0.25rem)*10);
|
|
24
|
+
}
|
|
25
|
+
&:where([data-theme=dark], [data-theme=dark] *) {
|
|
26
|
+
background-color: var(--color-neutral-900, #2c3437);
|
|
27
|
+
}
|
|
28
|
+
&:where([data-theme=dark], [data-theme=dark] *) {
|
|
29
|
+
color: var(--color-neutral-300, #d9e1e4);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
.avatar {
|
|
33
|
+
width: calc(var(--spacing, 0.25rem)*8);
|
|
34
|
+
height: calc(var(--spacing, 0.25rem)*8);
|
|
35
|
+
.wrapper {
|
|
36
|
+
@media (width < 670px) {
|
|
37
|
+
display: block;
|
|
38
|
+
}
|
|
39
|
+
@media (width < 670px) {
|
|
40
|
+
padding-block: calc(var(--spacing, 0.25rem)*0);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
.small {
|
|
45
|
+
width: calc(var(--spacing, 0.25rem)*10);
|
|
46
|
+
height: calc(var(--spacing, 0.25rem)*10);
|
|
47
|
+
@media (width >= 670px) {
|
|
48
|
+
width: calc(var(--spacing, 0.25rem)*8);
|
|
49
|
+
height: calc(var(--spacing, 0.25rem)*8);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
.medium {
|
|
53
|
+
width: calc(var(--spacing, 0.25rem)*10);
|
|
54
|
+
height: calc(var(--spacing, 0.25rem)*10);
|
|
55
|
+
}
|
|
56
|
+
@property --tw-border-style {
|
|
57
|
+
syntax: "*";
|
|
58
|
+
inherits: false;
|
|
59
|
+
initial-value: solid;
|
|
60
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { ArrowUpRightIcon } from '@heroicons/react/24/solid';
|
|
3
|
+
import Avatar from '#ui/Common/AvatarGroup/Avatar';
|
|
4
|
+
import styles from './index.module.css';
|
|
5
|
+
const AvatarOverlay = ({ image, name, nickname, fallback, url, as: Component = 'a', }) => (_jsxs(Component, { className: styles.overlay, href: url, target: "_blank", children: [_jsx(Avatar, { image: image, name: name, nickname: nickname, fallback: fallback, size: "medium" }), _jsxs("div", { className: styles.user, children: [name && _jsx("div", { className: styles.name, children: name }), nickname && _jsx("div", { className: styles.nickname, children: nickname })] }), _jsx(ArrowUpRightIcon, { className: styles.arrow })] }));
|
|
6
|
+
export default AvatarOverlay;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */
|
|
2
|
+
.overlay {
|
|
3
|
+
display: flex;
|
|
4
|
+
min-width: calc(var(--spacing, 0.25rem)*56);
|
|
5
|
+
align-items: center;
|
|
6
|
+
gap: calc(var(--spacing, 0.25rem)*2);
|
|
7
|
+
padding: calc(var(--spacing, 0.25rem)*3);
|
|
8
|
+
}
|
|
9
|
+
.user {
|
|
10
|
+
flex-grow: 1;
|
|
11
|
+
}
|
|
12
|
+
.name {
|
|
13
|
+
--tw-font-weight: var(--font-weight-semibold, 600);
|
|
14
|
+
font-weight: var(--font-weight-semibold, 600);
|
|
15
|
+
color: var(--color-neutral-900, #2c3437);
|
|
16
|
+
&:where([data-theme=dark], [data-theme=dark] *) {
|
|
17
|
+
color: var(--color-neutral-300, #d9e1e4);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
.nickname {
|
|
21
|
+
--tw-font-weight: var(--font-weight-medium, 500);
|
|
22
|
+
font-weight: var(--font-weight-medium, 500);
|
|
23
|
+
color: var(--color-neutral-700, #6e7b83);
|
|
24
|
+
&:where([data-theme=dark], [data-theme=dark] *) {
|
|
25
|
+
color: var(--color-neutral-500, #b1bcc2);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
.arrow {
|
|
29
|
+
width: calc(var(--spacing, 0.25rem)*3);
|
|
30
|
+
fill: var(--color-neutral-600, #929fa5);
|
|
31
|
+
&:where([data-theme=dark], [data-theme=dark] *) {
|
|
32
|
+
fill: var(--color-white, #fff);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
@property --tw-font-weight {
|
|
36
|
+
syntax: "*";
|
|
37
|
+
inherits: false;
|
|
38
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
import { useState, useMemo } from 'react';
|
|
5
|
+
import Avatar from '#ui/Common/AvatarGroup/Avatar';
|
|
6
|
+
import avatarstyles from '#ui/Common/AvatarGroup/Avatar/index.module.css';
|
|
7
|
+
import AvatarOverlay from '#ui/Common/AvatarGroup/Overlay';
|
|
8
|
+
import Tooltip from '#ui/Common/Tooltip';
|
|
9
|
+
import styles from './index.module.css';
|
|
10
|
+
const AvatarGroup = ({ avatars, limit = 10, isExpandable = true, size = 'small', container, as, }) => {
|
|
11
|
+
const [showMore, setShowMore] = useState(false);
|
|
12
|
+
const renderAvatars = useMemo(() => avatars.slice(0, showMore ? avatars.length : limit), [avatars, limit, showMore]);
|
|
13
|
+
const handleShowMoreClick = isExpandable
|
|
14
|
+
? () => setShowMore(prev => !prev)
|
|
15
|
+
: undefined;
|
|
16
|
+
return (_jsxs("div", { className: classNames(styles.avatarGroup, styles[size]), children: [renderAvatars.map(avatar => (_jsx(Tooltip, { asChild: true, container: container, content: _jsx(AvatarOverlay, { ...avatar, as: as }), children: _jsx(Avatar, { ...avatar, size: size, className: classNames({
|
|
17
|
+
'cursor-pointer': avatar.url,
|
|
18
|
+
'pointer-events-none': !avatar.url,
|
|
19
|
+
}), as: as }) }, avatar.nickname))), avatars.length > limit && (_jsx("span", { onClick: handleShowMoreClick, className: classNames(avatarstyles.avatar, avatarstyles[size], 'cursor-pointer'), children: _jsx("span", { className: avatarstyles.item, children: `${showMore ? '-' : '+'}${avatars.length - limit}` }) }))] }));
|
|
20
|
+
};
|
|
21
|
+
export default AvatarGroup;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */
|
|
2
|
+
.avatarGroup {
|
|
3
|
+
display: flex;
|
|
4
|
+
flex-wrap: wrap;
|
|
5
|
+
align-items: center;
|
|
6
|
+
}
|
|
7
|
+
.small {
|
|
8
|
+
> span {
|
|
9
|
+
margin-left: calc(var(--spacing, 0.25rem)*-2);
|
|
10
|
+
&:first-child {
|
|
11
|
+
margin-left: calc(var(--spacing, 0.25rem)*0);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
.medium {
|
|
16
|
+
> span {
|
|
17
|
+
margin-left: calc(var(--spacing, 0.25rem)*-2.5);
|
|
18
|
+
&:first-child {
|
|
19
|
+
margin-left: calc(var(--spacing, 0.25rem)*0);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import classNames from 'classnames';
|
|
3
|
+
import styles from './index.module.css';
|
|
4
|
+
const Badge = ({ kind = 'default', size = 'medium', className, children, ...props }) => {
|
|
5
|
+
return (_jsx("span", { className: classNames(styles.badge, styles[kind], styles[size], className), ...props, children: children }));
|
|
6
|
+
};
|
|
7
|
+
export default Badge;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */
|
|
2
|
+
.badge {
|
|
3
|
+
border-radius: calc(infinity*1px);
|
|
4
|
+
border-style: var(--tw-border-style);
|
|
5
|
+
border-width: 1px;
|
|
6
|
+
text-align: center;
|
|
7
|
+
color: var(--color-white, #fff);
|
|
8
|
+
&.small {
|
|
9
|
+
padding-inline: calc(var(--spacing, 0.25rem)*1.5);
|
|
10
|
+
padding-block: calc(var(--spacing, 0.25rem)*0.5);
|
|
11
|
+
font-size: var(--text-xs, 0.75rem);
|
|
12
|
+
line-height: var(--tw-leading, var(--text-xs--line-height, 1.33333));
|
|
13
|
+
}
|
|
14
|
+
&.medium {
|
|
15
|
+
padding-inline: calc(var(--spacing, 0.25rem)*2.5);
|
|
16
|
+
padding-block: calc(var(--spacing, 0.25rem)*0.5);
|
|
17
|
+
font-size: var(--text-base, 1rem);
|
|
18
|
+
line-height: var(--tw-leading, var(--text-base--line-height, 1.5));
|
|
19
|
+
}
|
|
20
|
+
&.default {
|
|
21
|
+
border-color: var(--color-green-200, #c5e5b4);
|
|
22
|
+
background-color: var(--color-green-600, #417e38);
|
|
23
|
+
&:where([data-theme=dark], [data-theme=dark] *) {
|
|
24
|
+
border-color: var(--color-green-800, #2c682c);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
&.error {
|
|
28
|
+
border-color: var(--color-danger-200, #fad3d4);
|
|
29
|
+
background-color: var(--color-danger-600, #de1a1b);
|
|
30
|
+
&:where([data-theme=dark], [data-theme=dark] *) {
|
|
31
|
+
border-color: var(--color-danger-800, #900e0e);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
&.warning {
|
|
35
|
+
border-color: var(--color-warning-200, #fad9b0);
|
|
36
|
+
background-color: var(--color-warning-600, #ae5f00);
|
|
37
|
+
&:where([data-theme=dark], [data-theme=dark] *) {
|
|
38
|
+
border-color: var(--color-warning-600, #ae5f00);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
@property --tw-border-style {
|
|
43
|
+
syntax: "*";
|
|
44
|
+
inherits: false;
|
|
45
|
+
initial-value: solid;
|
|
46
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import ArrowRightIcon from '@heroicons/react/24/solid/ArrowRightIcon';
|
|
3
|
+
import Badge from '#ui/Common/Badge';
|
|
4
|
+
import styles from './index.module.css';
|
|
5
|
+
const BadgeGroup = ({ kind = 'default', badgeText, children, as: Component = 'a', ...args }) => (_jsxs(Component, { className: `${styles.wrapper} ${styles[kind]}`, ...args, children: [badgeText && (_jsx(Badge, { kind: kind, className: styles.badge, children: badgeText })), _jsx("span", { className: styles.message, children: children }), args.href && _jsx(ArrowRightIcon, { className: styles.icon })] }));
|
|
6
|
+
export default BadgeGroup;
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */
|
|
2
|
+
.wrapper {
|
|
3
|
+
display: flex;
|
|
4
|
+
width: fit-content;
|
|
5
|
+
align-items: center;
|
|
6
|
+
border-radius: calc(infinity*1px);
|
|
7
|
+
border-style: var(--tw-border-style);
|
|
8
|
+
border-width: 1px;
|
|
9
|
+
padding-block: calc(var(--spacing, 0.25rem)*1);
|
|
10
|
+
padding-right: calc(var(--spacing, 0.25rem)*2.5);
|
|
11
|
+
padding-left: calc(var(--spacing, 0.25rem)*1);
|
|
12
|
+
font-size: var(--text-sm, 0.875rem);
|
|
13
|
+
line-height: var(--tw-leading, var(--text-sm--line-height, 1.42857));
|
|
14
|
+
--tw-font-weight: var(--font-weight-medium, 500);
|
|
15
|
+
font-weight: var(--font-weight-medium, 500);
|
|
16
|
+
.icon {
|
|
17
|
+
width: calc(var(--spacing, 0.25rem)*4);
|
|
18
|
+
height: calc(var(--spacing, 0.25rem)*4);
|
|
19
|
+
}
|
|
20
|
+
.badge {
|
|
21
|
+
margin-right: calc(var(--spacing, 0.25rem)*2);
|
|
22
|
+
}
|
|
23
|
+
.message {
|
|
24
|
+
margin-right: calc(var(--spacing, 0.25rem)*1);
|
|
25
|
+
}
|
|
26
|
+
&.default {
|
|
27
|
+
border-color: var(--color-green-200, #c5e5b4);
|
|
28
|
+
background-color: var(--color-green-100, #edf2eb);
|
|
29
|
+
&:where([data-theme=dark], [data-theme=dark] *) {
|
|
30
|
+
border-color: var(--color-green-700, #2c682c);
|
|
31
|
+
}
|
|
32
|
+
&:where([data-theme=dark], [data-theme=dark] *) {
|
|
33
|
+
background-color: var(--color-neutral-900, #2c3437);
|
|
34
|
+
}
|
|
35
|
+
.icon {
|
|
36
|
+
color: var(--color-green-500, #5fa04e);
|
|
37
|
+
&:where([data-theme=dark], [data-theme=dark] *) {
|
|
38
|
+
color: var(--color-green-300, #99cc7d);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
.message {
|
|
42
|
+
color: var(--color-green-700, #2c682c);
|
|
43
|
+
&:where([data-theme=dark], [data-theme=dark] *) {
|
|
44
|
+
color: var(--color-green-300, #99cc7d);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
&.error {
|
|
49
|
+
border-color: var(--color-danger-200, #fad3d4);
|
|
50
|
+
background-color: var(--color-danger-100, #fbf1f0);
|
|
51
|
+
&:where([data-theme=dark], [data-theme=dark] *) {
|
|
52
|
+
border-color: var(--color-danger-700, #b80c0c);
|
|
53
|
+
}
|
|
54
|
+
&:where([data-theme=dark], [data-theme=dark] *) {
|
|
55
|
+
background-color: var(--color-neutral-900, #2c3437);
|
|
56
|
+
}
|
|
57
|
+
.icon {
|
|
58
|
+
color: var(--color-danger-500, #f65354);
|
|
59
|
+
&:where([data-theme=dark], [data-theme=dark] *) {
|
|
60
|
+
color: var(--color-danger-300, #fab6b7);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
.message {
|
|
64
|
+
color: var(--color-danger-700, #b80c0c);
|
|
65
|
+
&:where([data-theme=dark], [data-theme=dark] *) {
|
|
66
|
+
color: var(--color-danger-300, #fab6b7);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
&.warning {
|
|
71
|
+
border-color: var(--color-warning-200, #fad9b0);
|
|
72
|
+
background-color: var(--color-warning-100, #fdf3e7);
|
|
73
|
+
&:where([data-theme=dark], [data-theme=dark] *) {
|
|
74
|
+
border-color: var(--color-warning-700, #8b4d04);
|
|
75
|
+
}
|
|
76
|
+
&:where([data-theme=dark], [data-theme=dark] *) {
|
|
77
|
+
background-color: var(--color-neutral-900, #2c3437);
|
|
78
|
+
}
|
|
79
|
+
.icon {
|
|
80
|
+
color: var(--color-warning-500, #d07912);
|
|
81
|
+
&:where([data-theme=dark], [data-theme=dark] *) {
|
|
82
|
+
color: var(--color-warning-300, #f5bc75);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
.message {
|
|
86
|
+
color: var(--color-warning-700, #8b4d04);
|
|
87
|
+
&:where([data-theme=dark], [data-theme=dark] *) {
|
|
88
|
+
color: var(--color-warning-300, #f5bc75);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
@property --tw-border-style {
|
|
94
|
+
syntax: "*";
|
|
95
|
+
inherits: false;
|
|
96
|
+
initial-value: solid;
|
|
97
|
+
}
|
|
98
|
+
@property --tw-font-weight {
|
|
99
|
+
syntax: "*";
|
|
100
|
+
inherits: false;
|
|
101
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import styles from './index.module.css';
|
|
3
|
+
const Banner = ({ type = 'default', children, }) => (_jsx("div", { className: `${styles.banner} ${styles[type] || styles.default}`, children: children }));
|
|
4
|
+
export default Banner;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */
|
|
2
|
+
.banner {
|
|
3
|
+
display: flex;
|
|
4
|
+
width: 100%;
|
|
5
|
+
flex-direction: row;
|
|
6
|
+
align-items: center;
|
|
7
|
+
justify-content: center;
|
|
8
|
+
gap: calc(var(--spacing, 0.25rem)*2);
|
|
9
|
+
padding-inline: calc(var(--spacing, 0.25rem)*8);
|
|
10
|
+
padding-block: calc(var(--spacing, 0.25rem)*3);
|
|
11
|
+
font-size: var(--text-sm, 0.875rem);
|
|
12
|
+
line-height: var(--tw-leading, var(--text-sm--line-height, 1.42857));
|
|
13
|
+
&,
|
|
14
|
+
a {
|
|
15
|
+
color: var(--color-white, #fff);
|
|
16
|
+
&:where([data-theme=dark], [data-theme=dark] *) {
|
|
17
|
+
color: var(--color-white, #fff);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
a {
|
|
21
|
+
width: fit-content;
|
|
22
|
+
text-decoration-line: underline;
|
|
23
|
+
text-decoration-color: color-mix(in srgb, #fff 50%, transparent);
|
|
24
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
25
|
+
text-decoration-color: color-mix(in oklab, var(--color-white, #fff) 50%, transparent);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
svg {
|
|
29
|
+
width: calc(var(--spacing, 0.25rem)*4);
|
|
30
|
+
height: calc(var(--spacing, 0.25rem)*4);
|
|
31
|
+
color: color-mix(in srgb, #fff 50%, transparent);
|
|
32
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
33
|
+
color: color-mix(in oklab, var(--color-white, #fff) 50%, transparent);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
.default {
|
|
38
|
+
background-color: var(--color-green-600, #417e38);
|
|
39
|
+
}
|
|
40
|
+
.error {
|
|
41
|
+
background-color: var(--color-danger-600, #de1a1b);
|
|
42
|
+
}
|
|
43
|
+
.warning {
|
|
44
|
+
background-color: var(--color-warning-600, #ae5f00);
|
|
45
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import classNames from 'classnames';
|
|
3
|
+
const BaseActiveLink = ({ activeClassName = 'active', allowSubPath = false, className, href = '', pathname = '/', as: Component = 'a', ...props }) => {
|
|
4
|
+
const finalClassName = classNames(className, {
|
|
5
|
+
[activeClassName]: allowSubPath
|
|
6
|
+
? // When using allowSubPath we want only to check if
|
|
7
|
+
// the current pathname starts with the utmost upper level
|
|
8
|
+
// of an href (e.g. /docs/...)
|
|
9
|
+
pathname.startsWith(`/${href.toString().split('/')[1]}`)
|
|
10
|
+
: href.toString() === pathname,
|
|
11
|
+
});
|
|
12
|
+
return _jsx(Component, { className: finalClassName, href: href, ...props });
|
|
13
|
+
};
|
|
14
|
+
export default BaseActiveLink;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import classNames from 'classnames';
|
|
3
|
+
import styles from './index.module.css';
|
|
4
|
+
const BaseButton = ({ kind = 'primary', size = 'default', disabled = false, className, as: Component = 'a', ...props }) => {
|
|
5
|
+
if ('href' in props && Component) {
|
|
6
|
+
return (_jsx(Component, { role: "button", href: disabled ? undefined : props.href, "aria-disabled": disabled, className: classNames(styles.button, styles[kind], styles[size], className), tabIndex: disabled ? -1 : 0, ...props }));
|
|
7
|
+
}
|
|
8
|
+
return (_jsx("button", { disabled: disabled, className: classNames(styles.button, styles[kind], styles[size], className), type: "button", ...props }));
|
|
9
|
+
};
|
|
10
|
+
export default BaseButton;
|