@node-core/ui-components 1.0.1-c0bc4dd7eb49f97f35ce0983849d17702404c76a → 1.0.1-da75492230302b0f459aab323d2f6fdac6269a06
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 +2 -76
- package/Common/AvatarGroup/Avatar/index.js +11 -0
- package/Common/AvatarGroup/Avatar/index.module.css +2 -40
- package/Common/AvatarGroup/Overlay/index.js +6 -0
- package/Common/AvatarGroup/Overlay/index.module.css +2 -31
- package/Common/AvatarGroup/index.js +21 -0
- package/Common/AvatarGroup/index.module.css +2 -21
- package/Common/Badge/index.js +5 -0
- package/Common/Badge/index.module.css +2 -38
- package/Common/BadgeGroup/index.js +6 -0
- package/Common/BadgeGroup/index.module.css +2 -77
- package/Common/Banner/index.js +4 -0
- package/Common/Banner/index.module.css +2 -42
- package/Common/BaseActiveLink/index.js +14 -0
- package/Common/BaseButton/index.js +10 -0
- package/Common/BaseButton/index.module.css +2 -142
- package/Common/BaseCodeBox/index.js +50 -0
- package/Common/BaseCodeBox/index.module.css +2 -78
- package/Common/BaseCrossLink/index.js +12 -0
- package/Common/BaseCrossLink/index.module.css +2 -51
- package/Common/BaseLinkTabs/index.js +5 -0
- package/Common/BaseLinkTabs/index.module.css +2 -43
- package/Common/BasePagination/Ellipsis/index.js +4 -0
- package/Common/BasePagination/Ellipsis/index.module.css +2 -10
- package/Common/BasePagination/PaginationListItem/index.js +6 -0
- package/Common/BasePagination/PaginationListItem/index.module.css +2 -27
- package/Common/BasePagination/PrevNextArrow.js +7 -0
- package/Common/BasePagination/index.js +10 -0
- package/Common/BasePagination/index.module.css +2 -39
- package/Common/BasePagination/useGetPageElements.js +77 -0
- package/Common/Blockquote/index.js +4 -0
- package/Common/Blockquote/index.module.css +2 -29
- package/Common/Breadcrumbs/BreadcrumbHomeLink/index.js +9 -0
- package/Common/Breadcrumbs/BreadcrumbHomeLink/index.module.css +2 -5
- package/Common/Breadcrumbs/BreadcrumbItem/index.js +6 -0
- package/Common/Breadcrumbs/BreadcrumbItem/index.module.css +2 -41
- package/Common/Breadcrumbs/BreadcrumbLink/index.js +5 -0
- package/Common/Breadcrumbs/BreadcrumbLink/index.module.css +2 -22
- package/Common/Breadcrumbs/BreadcrumbRoot/index.js +4 -0
- package/Common/Breadcrumbs/BreadcrumbRoot/index.module.css +2 -9
- 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 +2 -83
- package/Common/CodeTabs/index.js +5 -0
- package/Common/CodeTabs/index.module.css +2 -56
- package/Common/DataTag/index.js +18 -0
- package/Common/DataTag/index.module.css +2 -56
- package/Common/GlowingBackdrop/index.js +5 -0
- package/Common/GlowingBackdrop/index.module.css +2 -32
- package/Common/LanguageDropDown/index.js +11 -0
- package/Common/LanguageDropDown/index.module.css +2 -53
- package/Common/Modal/index.js +10 -0
- package/Common/Modal/index.module.css +2 -79
- package/Common/NodejsLogo/index.js +7 -0
- package/Common/NodejsLogo/index.module.css +2 -6
- package/Common/Notification/index.js +6 -0
- package/Common/Notification/index.module.css +2 -20
- package/Common/Preview/index.js +7 -0
- package/Common/Preview/index.module.css +2 -79
- package/Common/Select/index.js +47 -0
- package/Common/Select/index.module.css +2 -161
- package/Common/Separator/index.js +7 -0
- package/Common/Separator/index.module.css +2 -16
- package/Common/Skeleton/index.js +18 -0
- package/Common/Skeleton/index.module.css +2 -30
- package/Common/Tabs/index.js +6 -0
- package/Common/Tabs/index.module.css +2 -54
- package/Common/ThemeToggle/index.js +7 -0
- package/Common/ThemeToggle/index.module.css +2 -15
- package/Common/Tooltip/index.js +8 -0
- package/Common/Tooltip/index.module.css +2 -43
- package/Containers/Article/index.js +4 -0
- package/Containers/Article/index.module.css +2 -70
- package/Containers/Footer/index.js +21 -0
- package/Containers/Footer/index.module.css +2 -46
- package/Containers/MetaBar/index.js +12 -0
- package/Containers/MetaBar/index.module.css +2 -91
- package/Containers/NavBar/NavItem/index.js +7 -0
- package/Containers/NavBar/NavItem/index.module.css +2 -60
- package/Containers/NavBar/index.js +18 -0
- package/Containers/NavBar/index.module.css +2 -125
- package/Containers/Sidebar/ProgressionIcon/index.js +3 -0
- package/Containers/Sidebar/SidebarGroup/index.js +9 -0
- package/Containers/Sidebar/SidebarGroup/index.module.css +2 -64
- package/Containers/Sidebar/SidebarItem/index.js +11 -0
- package/Containers/Sidebar/SidebarItem/index.module.css +2 -56
- package/Containers/Sidebar/index.js +15 -0
- package/Containers/Sidebar/index.module.css +2 -30
- 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.ts → index.js} +0 -1
- package/Icons/Logos/JsWhite.js +3 -0
- package/Icons/Logos/Nodejs.js +12 -0
- package/Icons/Logos/index.js +3 -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.ts → index.js} +0 -1
- 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.ts → index.js} +0 -1
- 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.ts → index.js} +0 -1
- package/MDX/CodeTabs.js +25 -0
- package/Providers/NotificationProvider/index.js +16 -0
- package/Providers/NotificationProvider/index.module.css +2 -0
- package/package.json +6 -51
- package/stylelint/one-utility-class-per-line.mjs +34 -50
- package/stylelint/utils.mjs +19 -25
- package/styles/index.css +2 -38
- package/types.js +1 -0
- package/Common/AlertBox/index.stories.tsx +0 -73
- package/Common/AlertBox/index.tsx +0 -24
- package/Common/AvatarGroup/Avatar/index.stories.tsx +0 -22
- package/Common/AvatarGroup/Avatar/index.tsx +0 -67
- package/Common/AvatarGroup/Overlay/index.stories.tsx +0 -33
- package/Common/AvatarGroup/Overlay/index.tsx +0 -37
- package/Common/AvatarGroup/__tests__/index.test.jsx +0 -55
- package/Common/AvatarGroup/index.stories.tsx +0 -56
- package/Common/AvatarGroup/index.tsx +0 -83
- package/Common/Badge/index.stories.tsx +0 -38
- package/Common/Badge/index.tsx +0 -35
- package/Common/BadgeGroup/index.stories.tsx +0 -35
- package/Common/BadgeGroup/index.tsx +0 -35
- package/Common/Banner/index.stories.tsx +0 -29
- package/Common/Banner/index.tsx +0 -18
- package/Common/BaseActiveLink/__tests__/index.test.jsx +0 -52
- package/Common/BaseActiveLink/index.tsx +0 -34
- package/Common/BaseButton/index.stories.tsx +0 -67
- package/Common/BaseButton/index.tsx +0 -59
- package/Common/BaseCodeBox/index.stories.tsx +0 -39
- package/Common/BaseCodeBox/index.tsx +0 -122
- package/Common/BaseCrossLink/index.stories.tsx +0 -38
- package/Common/BaseCrossLink/index.tsx +0 -46
- package/Common/BaseLinkTabs/index.stories.tsx +0 -34
- package/Common/BaseLinkTabs/index.tsx +0 -53
- package/Common/BasePagination/Ellipsis/index.stories.tsx +0 -10
- package/Common/BasePagination/Ellipsis/index.tsx +0 -11
- package/Common/BasePagination/PaginationListItem/__tests__/index.test.jsx +0 -58
- package/Common/BasePagination/PaginationListItem/index.stories.tsx +0 -40
- package/Common/BasePagination/PaginationListItem/index.tsx +0 -39
- package/Common/BasePagination/PrevNextArrow.tsx +0 -15
- package/Common/BasePagination/__tests__/index.test.jsx +0 -180
- package/Common/BasePagination/index.stories.tsx +0 -67
- package/Common/BasePagination/index.tsx +0 -77
- package/Common/BasePagination/useGetPageElements.tsx +0 -132
- package/Common/Blockquote/index.stories.tsx +0 -45
- package/Common/Blockquote/index.tsx +0 -11
- package/Common/Breadcrumbs/BreadcrumbHomeLink/index.tsx +0 -30
- package/Common/Breadcrumbs/BreadcrumbItem/index.tsx +0 -42
- package/Common/Breadcrumbs/BreadcrumbLink/index.tsx +0 -37
- package/Common/Breadcrumbs/BreadcrumbRoot/index.tsx +0 -20
- package/Common/Breadcrumbs/BreadcrumbTruncatedItem/index.tsx +0 -9
- package/Common/Breadcrumbs/index.stories.tsx +0 -94
- package/Common/Breadcrumbs/index.tsx +0 -81
- package/Common/ChangeHistory/index.stories.tsx +0 -130
- package/Common/ChangeHistory/index.tsx +0 -67
- package/Common/CodeTabs/index.stories.tsx +0 -73
- package/Common/CodeTabs/index.tsx +0 -16
- package/Common/DataTag/index.stories.tsx +0 -40
- package/Common/DataTag/index.tsx +0 -39
- package/Common/GlowingBackdrop/index.stories.tsx +0 -10
- package/Common/GlowingBackdrop/index.tsx +0 -13
- package/Common/LanguageDropDown/index.stories.tsx +0 -19
- package/Common/LanguageDropDown/index.tsx +0 -56
- package/Common/Modal/index.stories.tsx +0 -32
- package/Common/Modal/index.tsx +0 -48
- package/Common/NodejsLogo/index.stories.tsx +0 -14
- package/Common/NodejsLogo/index.tsx +0 -26
- package/Common/Notification/index.stories.tsx +0 -36
- package/Common/Notification/index.tsx +0 -34
- package/Common/Preview/index.stories.tsx +0 -44
- package/Common/Preview/index.tsx +0 -25
- package/Common/Select/__tests__/index.test.jsx +0 -67
- package/Common/Select/index.stories.tsx +0 -111
- package/Common/Select/index.tsx +0 -187
- package/Common/Separator/index.stories.tsx +0 -32
- package/Common/Separator/index.tsx +0 -27
- package/Common/Skeleton/index.tsx +0 -39
- package/Common/Tabs/__tests__/index.test.jsx +0 -52
- package/Common/Tabs/index.stories.tsx +0 -50
- package/Common/Tabs/index.tsx +0 -54
- package/Common/ThemeToggle/__tests__/index.test.jsx +0 -35
- package/Common/ThemeToggle/index.stories.tsx +0 -10
- package/Common/ThemeToggle/index.tsx +0 -15
- package/Common/Tooltip/index.stories.tsx +0 -73
- package/Common/Tooltip/index.tsx +0 -48
- package/Containers/Article/index.stories.tsx +0 -39
- package/Containers/Article/index.tsx +0 -9
- package/Containers/DocSideBar/index.tsx +0 -0
- package/Containers/Footer/index.stories.tsx +0 -27
- package/Containers/Footer/index.tsx +0 -95
- package/Containers/MetaBar/__tests__/index.test.jsx +0 -63
- package/Containers/MetaBar/index.stories.tsx +0 -80
- package/Containers/MetaBar/index.tsx +0 -72
- package/Containers/NavBar/NavItem/index.stories.tsx +0 -38
- package/Containers/NavBar/NavItem/index.tsx +0 -44
- package/Containers/NavBar/index.stories.tsx +0 -45
- package/Containers/NavBar/index.tsx +0 -94
- package/Containers/Sidebar/ProgressionIcon/index.tsx +0 -16
- package/Containers/Sidebar/SidebarGroup/index.stories.tsx +0 -36
- package/Containers/Sidebar/SidebarGroup/index.tsx +0 -49
- package/Containers/Sidebar/SidebarItem/index.stories.tsx +0 -15
- package/Containers/Sidebar/SidebarItem/index.tsx +0 -43
- package/Containers/Sidebar/index.stories.tsx +0 -88
- package/Containers/Sidebar/index.tsx +0 -70
- package/Icons/HexagonGrid.stories.tsx +0 -10
- package/Icons/HexagonGrid.tsx +0 -1434
- package/Icons/InstallationMethod/Choco.tsx +0 -78
- package/Icons/InstallationMethod/Devbox.tsx +0 -21
- package/Icons/InstallationMethod/Docker.tsx +0 -20
- package/Icons/InstallationMethod/FNM.tsx +0 -132
- package/Icons/InstallationMethod/Homebrew.tsx +0 -69
- package/Icons/InstallationMethod/N.tsx +0 -32
- package/Icons/InstallationMethod/NVM.tsx +0 -63
- package/Icons/InstallationMethod/Volta.tsx +0 -34
- package/Icons/Logos/JsGreen.tsx +0 -24
- package/Icons/Logos/JsWhite.tsx +0 -37
- package/Icons/Logos/Nodejs.tsx +0 -372
- package/Icons/Logos/NodejsStackedBlack.tsx +0 -98
- package/Icons/Logos/NodejsStackedDark.tsx +0 -124
- package/Icons/Logos/NodejsStackedLight.tsx +0 -123
- package/Icons/Logos/NodejsStackedWhite.tsx +0 -98
- package/Icons/Logos/index.ts +0 -17
- package/Icons/OperatingSystem/AIX.tsx +0 -46
- package/Icons/OperatingSystem/Apple.tsx +0 -23
- package/Icons/OperatingSystem/Linux.tsx +0 -969
- package/Icons/OperatingSystem/Microsoft.tsx +0 -19
- package/Icons/PackageManager/Npm.tsx +0 -21
- package/Icons/PackageManager/Pnpm.tsx +0 -22
- package/Icons/PackageManager/Yarn.tsx +0 -22
- package/Icons/Social/Bluesky.tsx +0 -19
- package/Icons/Social/Discord.tsx +0 -20
- package/Icons/Social/GitHub.tsx +0 -16
- package/Icons/Social/LinkedIn.tsx +0 -16
- package/Icons/Social/Mastodon.tsx +0 -36
- package/Icons/Social/Slack.tsx +0 -31
- package/Icons/Social/X.tsx +0 -16
- package/MDX/CodeTabs.tsx +0 -47
- package/stylelint/__tests__/index.test.mjs +0 -80
- package/styles/animations.css +0 -47
- package/styles/base.css +0 -17
- package/styles/effects.css +0 -12
- package/styles/markdown.css +0 -173
- package/styles/theme.css +0 -175
- package/types.ts +0 -25
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import { ChevronDownIcon, ChevronUpIcon } from '@heroicons/react/24/outline';
|
|
4
|
+
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
5
|
+
import classNames from 'classnames';
|
|
6
|
+
import { useEffect, useId, useMemo, useState } from 'react';
|
|
7
|
+
import Skeleton from '#ui/Common/Skeleton';
|
|
8
|
+
import styles from './index.module.css';
|
|
9
|
+
const isStringArray = (values) => Boolean(values[0] && typeof values[0] === 'string');
|
|
10
|
+
const isValuesArray = (values) => Boolean(values[0] && typeof values[0] === 'object' && 'value' in values[0]);
|
|
11
|
+
const Select = ({ values = [], defaultValue, placeholder, label, inline, onChange, className, dropdownClassName, ariaLabel, loading = false, disabled = false, }) => {
|
|
12
|
+
const id = useId();
|
|
13
|
+
const [value, setValue] = useState(defaultValue);
|
|
14
|
+
useEffect(() => setValue(defaultValue), [defaultValue]);
|
|
15
|
+
const mappedValues = useMemo(() => {
|
|
16
|
+
let mappedValues = values;
|
|
17
|
+
if (isStringArray(mappedValues)) {
|
|
18
|
+
mappedValues = mappedValues.map(value => ({
|
|
19
|
+
label: value,
|
|
20
|
+
value: value,
|
|
21
|
+
}));
|
|
22
|
+
}
|
|
23
|
+
if (isValuesArray(mappedValues)) {
|
|
24
|
+
return [{ items: mappedValues }];
|
|
25
|
+
}
|
|
26
|
+
return mappedValues;
|
|
27
|
+
}, [values]);
|
|
28
|
+
// We render the actual item slotted to fix/prevent the issue
|
|
29
|
+
// of the tirgger flashing on the initial render
|
|
30
|
+
const currentItem = useMemo(() => mappedValues
|
|
31
|
+
.flatMap(({ items }) => items)
|
|
32
|
+
.find(item => item.value === value), [mappedValues, value]);
|
|
33
|
+
const memoizedMappedValues = useMemo(() => {
|
|
34
|
+
return mappedValues.map(({ label, items }, key) => (_jsxs(SelectPrimitive.Group, { children: [label && (_jsx(SelectPrimitive.Label, { className: classNames(styles.item, styles.label), children: label })), items.map(({ value, label, iconImage, disabled }) => (_jsx(SelectPrimitive.Item, { value: value, disabled: disabled, className: classNames(styles.item, styles.text), children: _jsxs(SelectPrimitive.ItemText, { children: [iconImage, _jsx("span", { children: label })] }) }, value)))] }, label?.toString() ?? key)));
|
|
35
|
+
// We explicitly want to recalculate these values only when the values themselves changed
|
|
36
|
+
// This is to prevent re-rendering and re-calcukating the values on every render
|
|
37
|
+
}, [JSON.stringify(values)]);
|
|
38
|
+
// Both change the internal state and emit the change event
|
|
39
|
+
const handleChange = (value) => {
|
|
40
|
+
setValue(value);
|
|
41
|
+
if (typeof onChange === 'function') {
|
|
42
|
+
onChange(value);
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
return (_jsx(Skeleton, { loading: loading, children: _jsxs("span", { className: classNames(styles.select, { [styles.inline]: inline }, className), children: [label && (_jsx("label", { className: styles.label, htmlFor: id, children: label })), _jsxs(SelectPrimitive.Root, { value: currentItem !== undefined ? value : undefined, onValueChange: handleChange, disabled: disabled, children: [_jsxs(SelectPrimitive.Trigger, { className: styles.trigger, "aria-label": ariaLabel, id: id, children: [_jsx(SelectPrimitive.Value, { placeholder: placeholder, children: currentItem !== undefined && (_jsxs(_Fragment, { children: [currentItem.iconImage, _jsx("span", { children: currentItem.label })] })) }), _jsx(ChevronDownIcon, { className: styles.icon })] }), _jsx(SelectPrimitive.Portal, { children: _jsxs(SelectPrimitive.Content, { position: inline ? 'popper' : 'item-aligned', className: classNames(styles.dropdown, { [styles.inline]: inline }, dropdownClassName), children: [_jsx(SelectPrimitive.ScrollUpButton, { children: _jsx(ChevronUpIcon, { className: styles.scrollIcon }) }), _jsx(SelectPrimitive.Viewport, { children: memoizedMappedValues }), _jsx(SelectPrimitive.ScrollDownButton, { children: _jsx(ChevronDownIcon, { className: styles.scrollIcon }) })] }) })] })] }) }));
|
|
46
|
+
};
|
|
47
|
+
export default Select;
|
|
@@ -1,161 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
.select {
|
|
4
|
-
@apply inline-flex
|
|
5
|
-
flex-col
|
|
6
|
-
gap-1.5;
|
|
7
|
-
|
|
8
|
-
.label {
|
|
9
|
-
@apply block
|
|
10
|
-
w-full
|
|
11
|
-
text-sm
|
|
12
|
-
font-medium
|
|
13
|
-
text-neutral-800
|
|
14
|
-
dark:text-neutral-200;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.trigger {
|
|
18
|
-
@apply shadow-xs
|
|
19
|
-
outline-hidden
|
|
20
|
-
inline-flex
|
|
21
|
-
h-11
|
|
22
|
-
w-full
|
|
23
|
-
min-w-[17rem]
|
|
24
|
-
items-center
|
|
25
|
-
justify-between
|
|
26
|
-
gap-2
|
|
27
|
-
rounded-sm
|
|
28
|
-
border
|
|
29
|
-
border-neutral-300
|
|
30
|
-
bg-white
|
|
31
|
-
px-3.5
|
|
32
|
-
py-2.5
|
|
33
|
-
text-left
|
|
34
|
-
text-base
|
|
35
|
-
font-medium
|
|
36
|
-
text-neutral-900
|
|
37
|
-
focus:border-neutral-500
|
|
38
|
-
focus:ring-1
|
|
39
|
-
focus:ring-neutral-500
|
|
40
|
-
data-[placeholder]:text-neutral-800
|
|
41
|
-
dark:border-neutral-800
|
|
42
|
-
dark:bg-neutral-950
|
|
43
|
-
dark:text-white
|
|
44
|
-
dark:focus:border-neutral-600
|
|
45
|
-
dark:focus:ring-neutral-600
|
|
46
|
-
dark:data-[placeholder]:text-neutral-200;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.trigger span {
|
|
50
|
-
@apply flex
|
|
51
|
-
h-5
|
|
52
|
-
items-center
|
|
53
|
-
gap-2;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.icon {
|
|
57
|
-
@apply size-5
|
|
58
|
-
text-neutral-600
|
|
59
|
-
dark:text-neutral-400;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.dropdown {
|
|
64
|
-
@apply max-h-48
|
|
65
|
-
max-w-xs
|
|
66
|
-
overflow-hidden
|
|
67
|
-
overflow-y-auto
|
|
68
|
-
rounded-md
|
|
69
|
-
border
|
|
70
|
-
border-neutral-200
|
|
71
|
-
bg-white
|
|
72
|
-
shadow-lg
|
|
73
|
-
dark:border-neutral-800
|
|
74
|
-
dark:bg-neutral-950;
|
|
75
|
-
|
|
76
|
-
.item {
|
|
77
|
-
@apply select-none
|
|
78
|
-
truncate
|
|
79
|
-
px-2.5
|
|
80
|
-
py-1.5
|
|
81
|
-
text-sm
|
|
82
|
-
font-medium;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
.text {
|
|
86
|
-
@apply data-[highlighted]:outline-hidden
|
|
87
|
-
text-neutral-800
|
|
88
|
-
data-[highlighted]:bg-green-500
|
|
89
|
-
data-[highlighted]:text-white
|
|
90
|
-
dark:text-neutral-200
|
|
91
|
-
dark:data-[highlighted]:bg-green-600
|
|
92
|
-
dark:data-[highlighted]:text-white;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
.text > span {
|
|
96
|
-
@apply flex
|
|
97
|
-
items-center
|
|
98
|
-
gap-2;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
.text > span > span {
|
|
102
|
-
@apply max-w-64
|
|
103
|
-
truncate
|
|
104
|
-
text-wrap;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
.label {
|
|
108
|
-
@apply text-neutral-600
|
|
109
|
-
dark:text-neutral-400;
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
.dropdown:has(.label) .text > span {
|
|
114
|
-
&:has(svg) > svg {
|
|
115
|
-
@apply ml-3;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
&:not(&:has(svg)) > span {
|
|
119
|
-
@apply ml-3;
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
.inline {
|
|
124
|
-
.trigger {
|
|
125
|
-
@apply h-auto
|
|
126
|
-
min-w-fit
|
|
127
|
-
px-2.5
|
|
128
|
-
py-2
|
|
129
|
-
text-sm
|
|
130
|
-
font-medium;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
.icon {
|
|
134
|
-
@apply size-4;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
.text {
|
|
138
|
-
@apply text-neutral-900
|
|
139
|
-
data-[highlighted]:bg-neutral-100
|
|
140
|
-
data-[disabled]:text-neutral-600
|
|
141
|
-
data-[highlighted]:text-neutral-900
|
|
142
|
-
dark:text-white
|
|
143
|
-
dark:data-[highlighted]:bg-neutral-900
|
|
144
|
-
dark:data-[disabled]:text-neutral-700
|
|
145
|
-
dark:data-[highlighted]:text-white;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
&.dropdown {
|
|
149
|
-
@apply mt-1
|
|
150
|
-
w-[calc(100%+1.5rem)]
|
|
151
|
-
rounded;
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
.scrollIcon {
|
|
156
|
-
@apply mx-auto
|
|
157
|
-
my-1
|
|
158
|
-
size-4
|
|
159
|
-
text-neutral-700
|
|
160
|
-
dark:text-neutral-200;
|
|
161
|
-
}
|
|
1
|
+
/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */
|
|
2
|
+
.select{gap:calc(var(--spacing,.25rem)*1.5);flex-direction:column;display:inline-flex}.select .label{width:100%;font-size:var(--text-sm,.875rem);line-height:var(--tw-leading,var(--text-sm--line-height,1.42857));--tw-font-weight:var(--font-weight-medium,500);font-weight:var(--font-weight-medium,500);color:var(--color-neutral-800,#556066);display:block}.select .label:where([data-theme=dark],[data-theme=dark] *){color:var(--color-neutral-200,#e9edf0)}.select .trigger{height:calc(var(--spacing,.25rem)*11);justify-content:space-between;align-items:center;gap:calc(var(--spacing,.25rem)*2);border-radius:var(--radius-sm,.25rem);border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-neutral-300,#d9e1e4);background-color:var(--color-white,#fff);width:100%;min-width:17rem;padding-inline:calc(var(--spacing,.25rem)*3.5);padding-block:calc(var(--spacing,.25rem)*2.5);text-align:left;font-size:var(--text-base,1rem);line-height:var(--tw-leading,var(--text-base--line-height,1.5));--tw-font-weight:var(--font-weight-medium,500);font-weight:var(--font-weight-medium,500);color:var(--color-neutral-900,#2c3437);--tw-shadow:0px 1px 2px 0px var(--tw-shadow-color,#1018280d);display:inline-flex}@supports (color:color-mix(in lab, red, red)){.select .trigger{--tw-shadow:0px 1px 2px 0px var(--tw-shadow-color,color-mix(in oklab,var(--color-shadow,#101828)5%,transparent))}}.select .trigger{box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.select .trigger{outline-offset:2px;outline:2px solid #0000}}.select .trigger:focus{border-color:var(--color-neutral-500,#b1bcc2);--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);--tw-ring-color:var(--color-neutral-500,#b1bcc2)}.select .trigger[data-placeholder]{color:var(--color-neutral-800,#556066)}.select .trigger:where([data-theme=dark],[data-theme=dark] *){border-color:var(--color-neutral-800,#556066);background-color:var(--color-neutral-950,#0d121c);color:var(--color-white,#fff)}.select .trigger:where([data-theme=dark],[data-theme=dark] *):focus{border-color:var(--color-neutral-600,#929fa5);--tw-ring-color:var(--color-neutral-600,#929fa5)}.select .trigger:where([data-theme=dark],[data-theme=dark] *)[data-placeholder]{color:var(--color-neutral-200,#e9edf0)}.select .trigger span{height:calc(var(--spacing,.25rem)*5);align-items:center;gap:calc(var(--spacing,.25rem)*2);display:flex}.select .icon{width:calc(var(--spacing,.25rem)*5);height:calc(var(--spacing,.25rem)*5);color:var(--color-neutral-600,#929fa5)}.select .icon:where([data-theme=dark],[data-theme=dark] *){color:var(--color-neutral-400,#cbd4d9)}.dropdown{max-height:calc(var(--spacing,.25rem)*48);max-width:var(--container-xs,20rem);border-radius:var(--radius-md,.375rem);border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-neutral-200,#e9edf0);background-color:var(--color-white,#fff);--tw-shadow:0px 4px 6px -2px var(--tw-shadow-color,#10182808),0px 12px 16px -4px var(--tw-shadow-color,#10182814);overflow:hidden auto}@supports (color:color-mix(in lab, red, red)){.dropdown{--tw-shadow:0px 4px 6px -2px var(--tw-shadow-color,color-mix(in oklab,var(--color-shadow,#101828)3%,transparent)),0px 12px 16px -4px var(--tw-shadow-color,color-mix(in oklab,var(--color-shadow,#101828)8%,transparent))}}.dropdown{box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.dropdown:where([data-theme=dark],[data-theme=dark] *){border-color:var(--color-neutral-800,#556066);background-color:var(--color-neutral-950,#0d121c)}.dropdown .item{text-overflow:ellipsis;white-space:nowrap;padding-inline:calc(var(--spacing,.25rem)*2.5);padding-block:calc(var(--spacing,.25rem)*1.5);font-size:var(--text-sm,.875rem);line-height:var(--tw-leading,var(--text-sm--line-height,1.42857));--tw-font-weight:var(--font-weight-medium,500);font-weight:var(--font-weight-medium,500);-webkit-user-select:none;user-select:none;overflow:hidden}.dropdown .text{color:var(--color-neutral-800,#556066)}.dropdown .text[data-highlighted]{background-color:var(--color-green-500,#5fa04e);color:var(--color-white,#fff);--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.dropdown .text[data-highlighted]{outline-offset:2px;outline:2px solid #0000}}.dropdown .text:where([data-theme=dark],[data-theme=dark] *){color:var(--color-neutral-200,#e9edf0)}.dropdown .text:where([data-theme=dark],[data-theme=dark] *)[data-highlighted]{background-color:var(--color-green-600,#417e38);color:var(--color-white,#fff)}.dropdown .text>span{align-items:center;gap:calc(var(--spacing,.25rem)*2);display:flex}.dropdown .text>span>span{max-width:calc(var(--spacing,.25rem)*64);text-overflow:ellipsis;white-space:nowrap;text-wrap:wrap;overflow:hidden}.dropdown .label{color:var(--color-neutral-600,#929fa5)}.dropdown .label:where([data-theme=dark],[data-theme=dark] *){color:var(--color-neutral-400,#cbd4d9)}.dropdown:has(.label) .text>span:has(svg)>svg,.dropdown:has(.label) .text>span:not(.dropdown:has(.label) .text>span:has(svg))>span{margin-left:calc(var(--spacing,.25rem)*3)}.inline .trigger{min-width:fit-content;height:auto;padding-inline:calc(var(--spacing,.25rem)*2.5);padding-block:calc(var(--spacing,.25rem)*2);font-size:var(--text-sm,.875rem);line-height:var(--tw-leading,var(--text-sm--line-height,1.42857));--tw-font-weight:var(--font-weight-medium,500);font-weight:var(--font-weight-medium,500)}.inline .icon{width:calc(var(--spacing,.25rem)*4);height:calc(var(--spacing,.25rem)*4)}.inline .text{color:var(--color-neutral-900,#2c3437)}.inline .text[data-disabled]{color:var(--color-neutral-600,#929fa5)}.inline .text[data-highlighted]{background-color:var(--color-neutral-100,#f6f7f9);color:var(--color-neutral-900,#2c3437)}.inline .text:where([data-theme=dark],[data-theme=dark] *){color:var(--color-white,#fff)}.inline .text:where([data-theme=dark],[data-theme=dark] *)[data-disabled]{color:var(--color-neutral-700,#6e7b83)}.inline .text:where([data-theme=dark],[data-theme=dark] *)[data-highlighted]{background-color:var(--color-neutral-900,#2c3437);color:var(--color-white,#fff)}.inline.dropdown{margin-top:calc(var(--spacing,.25rem)*1);border-radius:.25rem;width:calc(100% + 1.5rem)}.scrollIcon{margin-inline:auto;margin-block:calc(var(--spacing,.25rem)*1);width:calc(var(--spacing,.25rem)*4);height:calc(var(--spacing,.25rem)*4);color:var(--color-neutral-700,#6e7b83)}.scrollIcon:where([data-theme=dark],[data-theme=dark] *){color:var(--color-neutral-200,#e9edf0)}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
|
4
|
+
import classNames from 'classnames';
|
|
5
|
+
import styles from './index.module.css';
|
|
6
|
+
const Separator = ({ className, orientation = 'horizontal', decorative = true, ...props }) => (_jsx(SeparatorPrimitive.Root, { decorative: decorative, orientation: orientation, className: classNames(styles.root, orientation === 'horizontal' ? styles.horizontal : styles.vertical, className), ...props }));
|
|
7
|
+
export default Separator;
|
|
@@ -1,16 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
.root {
|
|
4
|
-
@apply shrink-0
|
|
5
|
-
bg-neutral-800;
|
|
6
|
-
|
|
7
|
-
&.horizontal {
|
|
8
|
-
@apply h-px
|
|
9
|
-
w-full;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
&.vertical {
|
|
13
|
-
@apply h-full
|
|
14
|
-
w-px;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
1
|
+
/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */
|
|
2
|
+
.root{background-color:var(--color-neutral-800,#556066);flex-shrink:0}.root.horizontal{width:100%;height:1px}.root.vertical{width:1px;height:100%}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import classNames from 'classnames';
|
|
3
|
+
import { isValidElement } from 'react';
|
|
4
|
+
import styles from './index.module.css';
|
|
5
|
+
const Skeleton = ({ children, className, hide = false, loading = true, }) => {
|
|
6
|
+
// This can be used to completely hide the children after the Skeleton has loaded
|
|
7
|
+
// If certain criterias do not match. This is useful for conditional rendering without
|
|
8
|
+
// changing the actual tree that the Skeleton is wrapping
|
|
9
|
+
if (!loading && hide) {
|
|
10
|
+
return null;
|
|
11
|
+
}
|
|
12
|
+
// If we finished loading, we can hide the Skeleton and render the children tree
|
|
13
|
+
if (!loading) {
|
|
14
|
+
return children;
|
|
15
|
+
}
|
|
16
|
+
return (_jsx("span", { tabIndex: -1, "aria-hidden": "true", className: classNames(styles.skeleton, className), "data-inline-skeleton": isValidElement(children) ? undefined : true, children: children }));
|
|
17
|
+
};
|
|
18
|
+
export default Skeleton;
|
|
@@ -1,30 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
.skeleton {
|
|
4
|
-
@apply outline-hidden
|
|
5
|
-
dark:animate-pulse-dark
|
|
6
|
-
pointer-events-none
|
|
7
|
-
animate-pulse
|
|
8
|
-
cursor-default
|
|
9
|
-
select-none
|
|
10
|
-
rounded-md
|
|
11
|
-
border-none
|
|
12
|
-
bg-clip-border
|
|
13
|
-
text-transparent
|
|
14
|
-
shadow-none;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.skeleton[data-inline-skeleton] {
|
|
18
|
-
@apply leading-none;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.skeleton:empty {
|
|
22
|
-
@apply block
|
|
23
|
-
h-3;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.skeleton > *,
|
|
27
|
-
.skeleton::after,
|
|
28
|
-
.skeleton::before {
|
|
29
|
-
@apply invisible;
|
|
30
|
-
}
|
|
1
|
+
/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */
|
|
2
|
+
.skeleton{pointer-events:none;cursor:default;border-radius:var(--radius-md,.375rem);--tw-border-style:none;color:#0000;--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);--tw-outline-style:none;background-clip:border-box;border-style:none;outline-style:none;animation:.5s infinite alternate-reverse pulse}@media (forced-colors:active){.skeleton{outline-offset:2px;outline:2px solid #0000}}.skeleton{-webkit-user-select:none;user-select:none}.skeleton:where([data-theme=dark],[data-theme=dark] *){animation:.5s infinite alternate-reverse pulse-dark}.skeleton[data-inline-skeleton]{--tw-leading:1;line-height:1}.skeleton:empty{height:calc(var(--spacing,.25rem)*3);display:block}.skeleton>*,.skeleton:after,.skeleton:before{visibility:hidden}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-leading{syntax:"*";inherits:false}@keyframes pulse{0%{background:var(--color-pulse-100)}to{background:var(--color-pulse-200)}}@keyframes pulse-dark{0%{background:var(--color-pulse-300)}to{background:var(--color-pulse-400)}}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
import styles from './index.module.css';
|
|
5
|
+
const Tabs = ({ tabs, addons, triggerClassName, children, ...props }) => (_jsxs(TabsPrimitive.Root, { ...props, className: classNames(styles.tabsRoot, props.className), children: [_jsxs(TabsPrimitive.List, { className: styles.tabsList, children: [tabs.map(tab => (_jsxs(TabsPrimitive.Trigger, { value: tab.value ?? tab.key, className: classNames(styles.tabsTrigger, triggerClassName), children: [tab.label, tab.secondaryLabel ? (_jsx("span", { className: styles.tabSecondaryLabel, children: tab.secondaryLabel })) : null] }, tab.key))), addons && _jsx("div", { className: styles.addons, children: addons })] }), children] }));
|
|
6
|
+
export default Tabs;
|
|
@@ -1,54 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
.tabsRoot {
|
|
4
|
-
@apply grid
|
|
5
|
-
max-w-full;
|
|
6
|
-
|
|
7
|
-
.tabsList {
|
|
8
|
-
@apply font-open-sans
|
|
9
|
-
scrollbar-thin
|
|
10
|
-
flex
|
|
11
|
-
gap-2
|
|
12
|
-
overflow-x-auto;
|
|
13
|
-
|
|
14
|
-
.tabsTrigger {
|
|
15
|
-
@apply whitespace-nowrap
|
|
16
|
-
border-b-2
|
|
17
|
-
border-b-transparent
|
|
18
|
-
px-1
|
|
19
|
-
pb-[11px]
|
|
20
|
-
text-sm
|
|
21
|
-
font-semibold
|
|
22
|
-
text-neutral-800
|
|
23
|
-
dark:text-neutral-200;
|
|
24
|
-
|
|
25
|
-
.tabSecondaryLabel {
|
|
26
|
-
@apply pl-1
|
|
27
|
-
text-neutral-500
|
|
28
|
-
dark:text-neutral-800;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
&[data-state='active'] {
|
|
32
|
-
@apply border-b-green-600
|
|
33
|
-
text-green-600
|
|
34
|
-
dark:border-b-green-400
|
|
35
|
-
dark:text-green-400;
|
|
36
|
-
|
|
37
|
-
.tabSecondaryLabel {
|
|
38
|
-
@apply text-green-800
|
|
39
|
-
dark:text-green-600;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.addons {
|
|
45
|
-
@apply ml-auto
|
|
46
|
-
border-b-2
|
|
47
|
-
border-b-transparent
|
|
48
|
-
px-1
|
|
49
|
-
pb-[11px]
|
|
50
|
-
text-sm
|
|
51
|
-
font-semibold;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
}
|
|
1
|
+
/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */
|
|
2
|
+
.tabsRoot{max-width:100%;display:grid}.tabsRoot .tabsList{gap:calc(var(--spacing,.25rem)*2);font-family:var(--font-open-sans,var(--font-open-sans));scrollbar-width:thin;display:flex;overflow-x:auto}.tabsRoot .tabsList .tabsTrigger{border-bottom-style:var(--tw-border-style);padding-inline:calc(var(--spacing,.25rem)*1);font-size:var(--text-sm,.875rem);line-height:var(--tw-leading,var(--text-sm--line-height,1.42857));--tw-font-weight:var(--font-weight-semibold,600);font-weight:var(--font-weight-semibold,600);white-space:nowrap;color:var(--color-neutral-800,#556066);border-bottom-width:2px;border-bottom-color:#0000;padding-bottom:11px}.tabsRoot .tabsList .tabsTrigger:where([data-theme=dark],[data-theme=dark] *){color:var(--color-neutral-200,#e9edf0)}.tabsRoot .tabsList .tabsTrigger .tabSecondaryLabel{padding-left:calc(var(--spacing,.25rem)*1);color:var(--color-neutral-500,#b1bcc2)}.tabsRoot .tabsList .tabsTrigger .tabSecondaryLabel:where([data-theme=dark],[data-theme=dark] *){color:var(--color-neutral-800,#556066)}.tabsRoot .tabsList .tabsTrigger[data-state=active]{border-bottom-color:var(--color-green-600,#417e38);color:var(--color-green-600,#417e38)}.tabsRoot .tabsList .tabsTrigger[data-state=active]:where([data-theme=dark],[data-theme=dark] *){border-bottom-color:var(--color-green-400,#84ba64);color:var(--color-green-400,#84ba64)}.tabsRoot .tabsList .tabsTrigger[data-state=active] .tabSecondaryLabel{color:var(--color-green-800,#2c682c)}.tabsRoot .tabsList .tabsTrigger[data-state=active] .tabSecondaryLabel:where([data-theme=dark],[data-theme=dark] *){color:var(--color-green-600,#417e38)}.tabsRoot .tabsList .addons{border-bottom-style:var(--tw-border-style);padding-inline:calc(var(--spacing,.25rem)*1);font-size:var(--text-sm,.875rem);line-height:var(--tw-leading,var(--text-sm--line-height,1.42857));--tw-font-weight:var(--font-weight-semibold,600);font-weight:var(--font-weight-semibold,600);border-bottom-width:2px;border-bottom-color:#0000;margin-left:auto;padding-bottom:11px}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { MoonIcon, SunIcon } from '@heroicons/react/24/outline';
|
|
3
|
+
import styles from './index.module.css';
|
|
4
|
+
const ThemeToggle = props => {
|
|
5
|
+
return (_jsxs("button", { type: "button", className: styles.themeToggle, ...props, children: [_jsx(MoonIcon, { className: "block dark:hidden", height: "20" }), _jsx(SunIcon, { className: "hidden dark:block", height: "20" })] }));
|
|
6
|
+
};
|
|
7
|
+
export default ThemeToggle;
|
|
@@ -1,15 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
.themeToggle {
|
|
4
|
-
@apply size-9
|
|
5
|
-
rounded-md
|
|
6
|
-
p-2
|
|
7
|
-
text-neutral-700
|
|
8
|
-
motion-safe:transition-colors
|
|
9
|
-
dark:text-neutral-300;
|
|
10
|
-
|
|
11
|
-
&:hover {
|
|
12
|
-
@apply bg-neutral-100
|
|
13
|
-
dark:bg-neutral-900;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
1
|
+
/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */
|
|
2
|
+
.themeToggle{width:calc(var(--spacing,.25rem)*9);height:calc(var(--spacing,.25rem)*9);border-radius:var(--radius-md,.375rem);padding:calc(var(--spacing,.25rem)*2);color:var(--color-neutral-700,#6e7b83)}@media (prefers-reduced-motion:no-preference){.themeToggle{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function,cubic-bezier(.4,0,.2,1)));transition-duration:var(--tw-duration,var(--default-transition-duration,.15s))}}.themeToggle:where([data-theme=dark],[data-theme=dark] *){color:var(--color-neutral-300,#d9e1e4)}.themeToggle:hover{background-color:var(--color-neutral-100,#f6f7f9)}.themeToggle:hover:where([data-theme=dark],[data-theme=dark] *){background-color:var(--color-neutral-900,#2c3437)}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
import styles from './index.module.css';
|
|
5
|
+
const Tooltip = ({ kind = 'default', children, content, asChild = false, side = 'bottom', container, }) => (_jsx(TooltipPrimitive.Provider, { delayDuration: 200, children: _jsxs(TooltipPrimitive.Root, { children: [_jsx(TooltipPrimitive.Trigger, { asChild: asChild, children: children }), _jsx(TooltipPrimitive.Portal, { container: container, children: _jsxs(TooltipPrimitive.Content, { side: side, sideOffset: 4, className: classNames(styles[kind], styles.content, {
|
|
6
|
+
'mx-1.5': side === 'top' || side === 'bottom',
|
|
7
|
+
}), children: [content, _jsx(TooltipPrimitive.Arrow, { className: styles.arrow, width: 14, height: 6 })] }) })] }) }));
|
|
8
|
+
export default Tooltip;
|
|
@@ -1,43 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
.content {
|
|
4
|
-
@apply rounded-md
|
|
5
|
-
border
|
|
6
|
-
bg-white
|
|
7
|
-
text-sm
|
|
8
|
-
font-medium
|
|
9
|
-
text-neutral-900
|
|
10
|
-
shadow-lg
|
|
11
|
-
dark:bg-neutral-950
|
|
12
|
-
dark:text-white;
|
|
13
|
-
|
|
14
|
-
&.default {
|
|
15
|
-
@apply border-neutral-200
|
|
16
|
-
dark:border-neutral-900;
|
|
17
|
-
|
|
18
|
-
.arrow {
|
|
19
|
-
@apply fill-neutral-200
|
|
20
|
-
dark:fill-neutral-900;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
&.error {
|
|
25
|
-
@apply border-danger-400
|
|
26
|
-
dark:border-danger-900;
|
|
27
|
-
|
|
28
|
-
.arrow {
|
|
29
|
-
@apply fill-danger-400
|
|
30
|
-
dark:fill-danger-900;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
&.warning {
|
|
35
|
-
@apply border-warning-400
|
|
36
|
-
dark:border-warning-900;
|
|
37
|
-
|
|
38
|
-
.arrow {
|
|
39
|
-
@apply fill-warning-400
|
|
40
|
-
dark:fill-warning-900;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
1
|
+
/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */
|
|
2
|
+
.content{border-radius:var(--radius-md,.375rem);border-style:var(--tw-border-style);background-color:var(--color-white,#fff);font-size:var(--text-sm,.875rem);line-height:var(--tw-leading,var(--text-sm--line-height,1.42857));--tw-font-weight:var(--font-weight-medium,500);font-weight:var(--font-weight-medium,500);color:var(--color-neutral-900,#2c3437);--tw-shadow:0px 4px 6px -2px var(--tw-shadow-color,#10182808),0px 12px 16px -4px var(--tw-shadow-color,#10182814);border-width:1px}@supports (color:color-mix(in lab, red, red)){.content{--tw-shadow:0px 4px 6px -2px var(--tw-shadow-color,color-mix(in oklab,var(--color-shadow,#101828)3%,transparent)),0px 12px 16px -4px var(--tw-shadow-color,color-mix(in oklab,var(--color-shadow,#101828)8%,transparent))}}.content{box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.content:where([data-theme=dark],[data-theme=dark] *){background-color:var(--color-neutral-950,#0d121c);color:var(--color-white,#fff)}.content.default{border-color:var(--color-neutral-200,#e9edf0)}.content.default:where([data-theme=dark],[data-theme=dark] *){border-color:var(--color-neutral-900,#2c3437)}.content.default .arrow{fill:var(--color-neutral-200,#e9edf0)}.content.default .arrow:where([data-theme=dark],[data-theme=dark] *){fill:var(--color-neutral-900,#2c3437)}.content.error{border-color:var(--color-danger-400,#fa8e8e)}.content.error:where([data-theme=dark],[data-theme=dark] *){border-color:var(--color-danger-900,#661514)}.content.error .arrow{fill:var(--color-danger-400,#fa8e8e)}.content.error .arrow:where([data-theme=dark],[data-theme=dark] *){fill:var(--color-danger-900,#661514)}.content.warning{border-color:var(--color-warning-400,#e99c40)}.content.warning:where([data-theme=dark],[data-theme=dark] *){border-color:var(--color-warning-900,#4d2f0b)}.content.warning .arrow{fill:var(--color-warning-400,#e99c40)}.content.warning .arrow:where([data-theme=dark],[data-theme=dark] *){fill:var(--color-warning-900,#4d2f0b)}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}
|
|
@@ -1,70 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
.articleLayout {
|
|
4
|
-
@apply max-w-8xl
|
|
5
|
-
mx-auto
|
|
6
|
-
block
|
|
7
|
-
w-full
|
|
8
|
-
sm:grid
|
|
9
|
-
sm:grid-cols-[theme(spacing.52)_1fr]
|
|
10
|
-
sm:grid-rows-[1fr]
|
|
11
|
-
sm:overflow-visible
|
|
12
|
-
sm:[grid-template-areas:'sidebar_main''sidebar_footer']
|
|
13
|
-
md:grid-cols-[theme(spacing.64)_1fr]
|
|
14
|
-
lg:grid-cols-[theme(spacing.52)_1fr_theme(spacing.52)]
|
|
15
|
-
lg:[grid-template-areas:'sidebar_main_metabar''sidebar_footer_metabar']
|
|
16
|
-
xl:grid-cols-[theme(spacing.80)_1fr_theme(spacing.80)];
|
|
17
|
-
|
|
18
|
-
> *:nth-child(1) {
|
|
19
|
-
@apply [grid-area:sidebar]
|
|
20
|
-
lg:sticky
|
|
21
|
-
lg:top-0
|
|
22
|
-
lg:h-[100vh]
|
|
23
|
-
lg:overflow-y-auto;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
> *:nth-child(2) {
|
|
27
|
-
@apply contents
|
|
28
|
-
sm:max-lg:block;
|
|
29
|
-
|
|
30
|
-
> *:first-child {
|
|
31
|
-
@apply sm:bg-gradient-subtle
|
|
32
|
-
sm:dark:bg-gradient-subtle-dark
|
|
33
|
-
xl:px-18
|
|
34
|
-
p-4
|
|
35
|
-
[grid-area:main]
|
|
36
|
-
motion-safe:scroll-smooth
|
|
37
|
-
sm:bg-fixed
|
|
38
|
-
sm:p-12;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
> *:last-child {
|
|
42
|
-
@apply mt-8
|
|
43
|
-
border-t
|
|
44
|
-
[grid-area:metabar]
|
|
45
|
-
sm:mt-0
|
|
46
|
-
lg:sticky
|
|
47
|
-
lg:top-0
|
|
48
|
-
lg:max-w-xs
|
|
49
|
-
lg:border-l
|
|
50
|
-
lg:border-t-0;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
> *:nth-child(3) {
|
|
55
|
-
@apply sticky
|
|
56
|
-
bottom-0
|
|
57
|
-
flex
|
|
58
|
-
w-full
|
|
59
|
-
flex-col
|
|
60
|
-
items-center
|
|
61
|
-
self-stretch
|
|
62
|
-
border-t
|
|
63
|
-
border-t-neutral-200
|
|
64
|
-
bg-white
|
|
65
|
-
py-4
|
|
66
|
-
[grid-area:footer]
|
|
67
|
-
dark:border-t-neutral-900
|
|
68
|
-
dark:bg-neutral-950;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
1
|
+
/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */
|
|
2
|
+
.articleLayout{width:100%;max-width:95rem;margin-inline:auto;display:block}@media (min-width:40rem){.articleLayout{grid-template:"sidebar main"1fr"sidebar footer"/13rem 1fr;display:grid;overflow:visible}}@media (min-width:48rem){.articleLayout{grid-template-columns:16rem 1fr}}@media (min-width:64rem){.articleLayout{grid-template-columns:13rem 1fr 13rem;grid-template-areas:"sidebar main metabar""sidebar footer metabar"}}@media (min-width:80rem){.articleLayout{grid-template-columns:20rem 1fr 20rem}}.articleLayout>:first-child{grid-area:sidebar}@media (min-width:64rem){.articleLayout>:first-child{top:calc(var(--spacing,.25rem)*0);height:100vh;position:sticky;overflow-y:auto}}.articleLayout>:nth-child(2){display:contents}@media (min-width:40rem){@media not all and (min-width:64rem){.articleLayout>:nth-child(2){display:block}}}.articleLayout>:nth-child(2)>:first-child{padding:calc(var(--spacing,.25rem)*4);grid-area:main}@media (prefers-reduced-motion:no-preference){.articleLayout>:nth-child(2)>:first-child{scroll-behavior:smooth}}@media (min-width:40rem){.articleLayout>:nth-child(2)>:first-child{background-image:linear-gradient(#f6f7f980 0%,#0000 48.32%)}@supports (color:color-mix(in lab, red, red)){.articleLayout>:nth-child(2)>:first-child{background-image:linear-gradient(180deg,color-mix(in oklab,var(--color-neutral-100)50%,transparent)0%,color-mix(in oklab,var(--color-neutral-100)0%,transparent)48.32%)}}.articleLayout>:nth-child(2)>:first-child{padding:calc(var(--spacing,.25rem)*12);background-attachment:fixed}}@media (min-width:80rem){.articleLayout>:nth-child(2)>:first-child{padding-inline:calc(var(--spacing,.25rem)*18)}}@media (min-width:40rem){.articleLayout>:nth-child(2)>:first-child:where([data-theme=dark],[data-theme=dark] *){background-image:linear-gradient(#2c343780 0%,#0000 48.32%)}@supports (color:color-mix(in lab, red, red)){.articleLayout>:nth-child(2)>:first-child:where([data-theme=dark],[data-theme=dark] *){background-image:linear-gradient(180deg,color-mix(in oklab,var(--color-neutral-900)50%,transparent)0%,color-mix(in oklab,var(--color-neutral-900)0%,transparent)48.32%)}}}.articleLayout>:nth-child(2)>:last-child{margin-top:calc(var(--spacing,.25rem)*8);border-top-style:var(--tw-border-style);border-top-width:1px;grid-area:metabar}@media (min-width:40rem){.articleLayout>:nth-child(2)>:last-child{margin-top:calc(var(--spacing,.25rem)*0)}}@media (min-width:64rem){.articleLayout>:nth-child(2)>:last-child{top:calc(var(--spacing,.25rem)*0);max-width:var(--container-xs,20rem);border-top-style:var(--tw-border-style);border-top-width:0;border-left-style:var(--tw-border-style);border-left-width:1px;position:sticky}}.articleLayout>:nth-child(3){bottom:calc(var(--spacing,.25rem)*0);border-top-style:var(--tw-border-style);border-top-width:1px;border-top-color:var(--color-neutral-200,#e9edf0);background-color:var(--color-white,#fff);width:100%;padding-block:calc(var(--spacing,.25rem)*4);flex-direction:column;grid-area:footer;align-self:stretch;align-items:center;display:flex;position:sticky}.articleLayout>:nth-child(3):where([data-theme=dark],[data-theme=dark] *){border-top-color:var(--color-neutral-900,#2c3437);background-color:var(--color-neutral-950,#0d121c)}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import NavItem from '#ui/Containers/NavBar/NavItem';
|
|
3
|
+
import { Bluesky, Discord, GitHub, LinkedIn, Mastodon, Slack, X, } from '#ui/Icons/Social';
|
|
4
|
+
import styles from './index.module.css';
|
|
5
|
+
const footerSocialIcons = {
|
|
6
|
+
github: GitHub,
|
|
7
|
+
mastodon: Mastodon,
|
|
8
|
+
twitter: X,
|
|
9
|
+
slack: Slack,
|
|
10
|
+
linkedin: LinkedIn,
|
|
11
|
+
bluesky: Bluesky,
|
|
12
|
+
discord: Discord,
|
|
13
|
+
};
|
|
14
|
+
const Footer = ({ pathname = '/', as = 'a', navigation, slots, }) => {
|
|
15
|
+
const openJSlink = navigation.footerLinks.at(-1);
|
|
16
|
+
return (_jsxs("footer", { className: styles.footer, children: [_jsxs("div", { className: styles.sectionPrimary, children: [slots?.primary, navigation.footerLinks.slice(0, -1).map(item => (_jsx(NavItem, { type: "footer", href: item.link, as: as, pathname: pathname, children: item.text }, item.link)))] }), _jsxs("div", { className: styles.sectionSecondary, children: [slots?.secondary, _jsxs(NavItem, { type: "footer", href: openJSlink.link, as: as, pathname: pathname, children: ["\u00A9 ", openJSlink.text] }), _jsx("div", { className: styles.social, children: navigation.socialLinks.map(link => {
|
|
17
|
+
const SocialIcon = footerSocialIcons[link.icon];
|
|
18
|
+
return (_jsx(NavItem, { href: link.link, type: "footer", as: as, pathname: pathname, children: _jsx(SocialIcon, { width: 20, height: 20, "aria-label": link.link }) }, link.icon));
|
|
19
|
+
}) })] })] }));
|
|
20
|
+
};
|
|
21
|
+
export default Footer;
|
|
@@ -1,46 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
.footer {
|
|
4
|
-
@apply flex
|
|
5
|
-
flex-col
|
|
6
|
-
items-center
|
|
7
|
-
gap-6
|
|
8
|
-
border-t
|
|
9
|
-
border-neutral-200
|
|
10
|
-
bg-white
|
|
11
|
-
py-4
|
|
12
|
-
sm:px-8
|
|
13
|
-
md:flex-row
|
|
14
|
-
md:justify-between
|
|
15
|
-
md:py-5
|
|
16
|
-
dark:border-neutral-900
|
|
17
|
-
dark:bg-neutral-950;
|
|
18
|
-
|
|
19
|
-
.sectionPrimary {
|
|
20
|
-
@apply flex
|
|
21
|
-
flex-wrap
|
|
22
|
-
content-start
|
|
23
|
-
items-center
|
|
24
|
-
justify-center
|
|
25
|
-
gap-1
|
|
26
|
-
self-stretch;
|
|
27
|
-
|
|
28
|
-
a {
|
|
29
|
-
@apply whitespace-nowrap;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.sectionSecondary {
|
|
34
|
-
@apply flex
|
|
35
|
-
flex-col
|
|
36
|
-
items-center
|
|
37
|
-
gap-1
|
|
38
|
-
md:flex-row;
|
|
39
|
-
|
|
40
|
-
.social {
|
|
41
|
-
@apply flex
|
|
42
|
-
items-center
|
|
43
|
-
gap-1;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
1
|
+
/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */
|
|
2
|
+
.footer{align-items:center;gap:calc(var(--spacing,.25rem)*6);border-top-style:var(--tw-border-style);border-top-width:1px;border-color:var(--color-neutral-200,#e9edf0);background-color:var(--color-white,#fff);padding-block:calc(var(--spacing,.25rem)*4);flex-direction:column;display:flex}@media (min-width:40rem){.footer{padding-inline:calc(var(--spacing,.25rem)*8)}}@media (min-width:48rem){.footer{padding-block:calc(var(--spacing,.25rem)*5);flex-direction:row;justify-content:space-between}}.footer:where([data-theme=dark],[data-theme=dark] *){border-color:var(--color-neutral-900,#2c3437);background-color:var(--color-neutral-950,#0d121c)}.footer .sectionPrimary{place-content:flex-start center;align-items:center;gap:calc(var(--spacing,.25rem)*1);flex-wrap:wrap;align-self:stretch;display:flex}.footer .sectionPrimary a{white-space:nowrap}.footer .sectionSecondary{align-items:center;gap:calc(var(--spacing,.25rem)*1);flex-direction:column;display:flex}@media (min-width:48rem){.footer .sectionSecondary{flex-direction:row}}.footer .sectionSecondary .social{align-items:center;gap:calc(var(--spacing,.25rem)*1);display:flex}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { Fragment, useMemo } from 'react';
|
|
3
|
+
import styles from './index.module.css';
|
|
4
|
+
const MetaBar = ({ items, headings, as: Component = 'a', heading, }) => {
|
|
5
|
+
// The default depth of headings to display in the table of contents.
|
|
6
|
+
const { minDepth = 2, items: headingItems = [] } = headings || {};
|
|
7
|
+
const filteredHeadings = useMemo(() => headingItems.filter(({ depth }) => depth >= minDepth && depth <= 4), [minDepth, headingItems]);
|
|
8
|
+
return (_jsx("div", { className: styles.wrapper, children: _jsxs("dl", { children: [Object.entries(items)
|
|
9
|
+
.filter(([, value]) => !!value)
|
|
10
|
+
.map(([key, value]) => (_jsxs(Fragment, { children: [_jsx("dt", { children: key }), _jsx("dd", { children: value })] }, key))), filteredHeadings.length > 0 && (_jsxs(_Fragment, { children: [_jsx("dt", { children: heading }), _jsx("dd", { children: _jsx("ol", { children: filteredHeadings.map(head => (_jsx("li", { className: head.depth === 3 ? 'pl-2' : head.depth === 4 ? 'pl-4' : '', children: _jsxs(Component, { href: `#${head?.data?.id}`, children: [' ', head.value] }) }, head.value))) }) })] }))] }) }));
|
|
11
|
+
};
|
|
12
|
+
export default MetaBar;
|