phosphor-ui 0.3.39
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/LICENSE +21 -0
- package/README.md +267 -0
- package/dist/cjs/index.js +2 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/package.json +3 -0
- package/dist/cjs/styles/components.css +10743 -0
- package/dist/esm/ascii.d.ts +3 -0
- package/dist/esm/components/admin/AdminShell/AdminShell.d.ts +36 -0
- package/dist/esm/components/admin/AdminShell/index.d.ts +2 -0
- package/dist/esm/components/admin/ContentEditor/ContentEditor.d.ts +63 -0
- package/dist/esm/components/admin/ContentEditor/EditorShell.d.ts +15 -0
- package/dist/esm/components/admin/ContentEditor/PairListField.d.ts +11 -0
- package/dist/esm/components/admin/ContentEditor/RepeaterField.d.ts +16 -0
- package/dist/esm/components/admin/ContentEditor/StatusSelect.d.ts +7 -0
- package/dist/esm/components/admin/ContentEditor/TagInput.d.ts +11 -0
- package/dist/esm/components/admin/ContentEditor/index.d.ts +12 -0
- package/dist/esm/components/admin/CourseEditor/CourseEditor.d.ts +28 -0
- package/dist/esm/components/admin/CourseEditor/index.d.ts +2 -0
- package/dist/esm/components/admin/LessonEditor/LessonEditor.d.ts +27 -0
- package/dist/esm/components/admin/LessonEditor/index.d.ts +2 -0
- package/dist/esm/components/admin/NoteEditor/NoteEditor.d.ts +18 -0
- package/dist/esm/components/admin/NoteEditor/index.d.ts +2 -0
- package/dist/esm/components/admin/ProjectEditor/ProjectEditor.d.ts +26 -0
- package/dist/esm/components/admin/ProjectEditor/index.d.ts +2 -0
- package/dist/esm/components/admin/index.d.ts +6 -0
- package/dist/esm/components/atoms/Avatar/Avatar.d.ts +9 -0
- package/dist/esm/components/atoms/Avatar/index.d.ts +2 -0
- package/dist/esm/components/atoms/Badge/Badge.d.ts +9 -0
- package/dist/esm/components/atoms/Badge/index.d.ts +2 -0
- package/dist/esm/components/atoms/Button/Button.d.ts +23 -0
- package/dist/esm/components/atoms/Button/index.d.ts +2 -0
- package/dist/esm/components/atoms/Checkbox/Checkbox.d.ts +14 -0
- package/dist/esm/components/atoms/Checkbox/index.d.ts +2 -0
- package/dist/esm/components/atoms/DropdownMenu/DropdownMenu.d.ts +25 -0
- package/dist/esm/components/atoms/DropdownMenu/index.d.ts +2 -0
- package/dist/esm/components/atoms/Glyph/Glyph.d.ts +14 -0
- package/dist/esm/components/atoms/Glyph/index.d.ts +2 -0
- package/dist/esm/components/atoms/Headings/Headings.d.ts +17 -0
- package/dist/esm/components/atoms/Headings/index.d.ts +2 -0
- package/dist/esm/components/atoms/Hr/Hr.d.ts +2 -0
- package/dist/esm/components/atoms/Hr/index.d.ts +1 -0
- package/dist/esm/components/atoms/Input/Input.d.ts +41 -0
- package/dist/esm/components/atoms/Input/index.d.ts +2 -0
- package/dist/esm/components/atoms/Kbd/Kbd.d.ts +6 -0
- package/dist/esm/components/atoms/Kbd/index.d.ts +1 -0
- package/dist/esm/components/atoms/Link/Link.d.ts +7 -0
- package/dist/esm/components/atoms/Link/index.d.ts +2 -0
- package/dist/esm/components/atoms/ProgressBar/ProgressBar.d.ts +13 -0
- package/dist/esm/components/atoms/ProgressBar/index.d.ts +2 -0
- package/dist/esm/components/atoms/ReadingRail/ReadingRail.d.ts +5 -0
- package/dist/esm/components/atoms/ReadingRail/index.d.ts +1 -0
- package/dist/esm/components/atoms/StatPill/StatPill.d.ts +9 -0
- package/dist/esm/components/atoms/StatPill/index.d.ts +2 -0
- package/dist/esm/components/atoms/Tag/Tag.d.ts +18 -0
- package/dist/esm/components/atoms/Tag/index.d.ts +2 -0
- package/dist/esm/components/atoms/Text/Text.d.ts +18 -0
- package/dist/esm/components/atoms/Text/index.d.ts +2 -0
- package/dist/esm/components/atoms/index.d.ts +17 -0
- package/dist/esm/components/atoms/primitive.d.ts +7 -0
- package/dist/esm/components/content/ArticleList/ArticleList.d.ts +14 -0
- package/dist/esm/components/content/ArticleList/index.d.ts +1 -0
- package/dist/esm/components/content/CodeBlock/CodeBlock.d.ts +21 -0
- package/dist/esm/components/content/CodeBlock/index.d.ts +3 -0
- package/dist/esm/components/content/CodeBlock/phosphorTheme.d.ts +2 -0
- package/dist/esm/components/content/MdxComponents/MdxComponents.d.ts +16 -0
- package/dist/esm/components/content/MdxComponents/index.d.ts +2 -0
- package/dist/esm/components/content/PostFrontmatter/PostFrontmatter.d.ts +10 -0
- package/dist/esm/components/content/PostFrontmatter/index.d.ts +2 -0
- package/dist/esm/components/content/Prose/Prose.d.ts +7 -0
- package/dist/esm/components/content/Prose/index.d.ts +2 -0
- package/dist/esm/components/content/index.d.ts +6 -0
- package/dist/esm/components/index.d.ts +145 -0
- package/dist/esm/components/molecules/AuthorCard/AuthorCard.d.ts +13 -0
- package/dist/esm/components/molecules/AuthorCard/index.d.ts +2 -0
- package/dist/esm/components/molecules/Breadcrumbs/Breadcrumbs.d.ts +13 -0
- package/dist/esm/components/molecules/Breadcrumbs/index.d.ts +2 -0
- package/dist/esm/components/molecules/Callout/Callout.d.ts +13 -0
- package/dist/esm/components/molecules/Callout/index.d.ts +2 -0
- package/dist/esm/components/molecules/CheckboxField/index.d.ts +2 -0
- package/dist/esm/components/molecules/CourseCard/index.d.ts +2 -0
- package/dist/esm/components/molecules/EmptyState/EmptyState.d.ts +16 -0
- package/dist/esm/components/molecules/EmptyState/index.d.ts +2 -0
- package/dist/esm/components/molecules/FeatureList/FeatureList.d.ts +16 -0
- package/dist/esm/components/molecules/FeatureList/index.d.ts +2 -0
- package/dist/esm/components/molecules/Field/Field.d.ts +25 -0
- package/dist/esm/components/molecules/Field/index.d.ts +2 -0
- package/dist/esm/components/molecules/FormField/Form.d.ts +38 -0
- package/dist/esm/components/molecules/FormField/FormField.d.ts +17 -0
- package/dist/esm/components/molecules/FormField/index.d.ts +4 -0
- package/dist/esm/components/molecules/HeaderNav/HeaderNav.d.ts +14 -0
- package/dist/esm/components/molecules/HeaderNav/index.d.ts +2 -0
- package/dist/esm/components/molecules/InputField/index.d.ts +2 -0
- package/dist/esm/components/molecules/LessonRow/LessonRow.d.ts +18 -0
- package/dist/esm/components/molecules/LessonRow/index.d.ts +2 -0
- package/dist/esm/components/molecules/List/List.d.ts +22 -0
- package/dist/esm/components/molecules/List/index.d.ts +2 -0
- package/dist/esm/components/molecules/LocaleSwitch/LocaleSwitch.d.ts +17 -0
- package/dist/esm/components/molecules/LocaleSwitch/index.d.ts +2 -0
- package/dist/esm/components/molecules/Modal/Modal.d.ts +25 -0
- package/dist/esm/components/molecules/Modal/index.d.ts +2 -0
- package/dist/esm/components/molecules/Pagination/Pagination.d.ts +17 -0
- package/dist/esm/components/molecules/Pagination/index.d.ts +2 -0
- package/dist/esm/components/molecules/PostFrontmatter/index.d.ts +2 -0
- package/dist/esm/components/molecules/PostMeta/PostMeta.d.ts +14 -0
- package/dist/esm/components/molecules/PostMeta/index.d.ts +2 -0
- package/dist/esm/components/molecules/PrereqList/PrereqList.d.ts +14 -0
- package/dist/esm/components/molecules/PrereqList/index.d.ts +2 -0
- package/dist/esm/components/molecules/SearchResult/SearchResult.d.ts +23 -0
- package/dist/esm/components/molecules/SearchResult/index.d.ts +2 -0
- package/dist/esm/components/molecules/Select/Select.d.ts +23 -0
- package/dist/esm/components/molecules/Select/index.d.ts +2 -0
- package/dist/esm/components/molecules/SelectField/index.d.ts +2 -0
- package/dist/esm/components/molecules/ShareBar/ShareBar.d.ts +12 -0
- package/dist/esm/components/molecules/ShareBar/index.d.ts +2 -0
- package/dist/esm/components/molecules/Stepper/Stepper.d.ts +26 -0
- package/dist/esm/components/molecules/Stepper/index.d.ts +2 -0
- package/dist/esm/components/molecules/TableOfContents/TableOfContents.d.ts +23 -0
- package/dist/esm/components/molecules/TableOfContents/index.d.ts +2 -0
- package/dist/esm/components/molecules/Tabs/Tabs.d.ts +21 -0
- package/dist/esm/components/molecules/Tabs/index.d.ts +2 -0
- package/dist/esm/components/molecules/TextareaField/index.d.ts +2 -0
- package/dist/esm/components/molecules/Timeline/Timeline.d.ts +14 -0
- package/dist/esm/components/molecules/Timeline/index.d.ts +2 -0
- package/dist/esm/components/molecules/Toast/Toast.d.ts +18 -0
- package/dist/esm/components/molecules/Toast/index.d.ts +2 -0
- package/dist/esm/components/molecules/Tooltip/Tooltip.d.ts +10 -0
- package/dist/esm/components/molecules/Tooltip/index.d.ts +2 -0
- package/dist/esm/components/molecules/index.d.ts +27 -0
- package/dist/esm/components/organisms/AsciiBanner/AsciiBanner.d.ts +21 -0
- package/dist/esm/components/organisms/AsciiBanner/index.d.ts +2 -0
- package/dist/esm/components/organisms/CourseCard/CourseCard.d.ts +24 -0
- package/dist/esm/components/organisms/CourseCard/index.d.ts +2 -0
- package/dist/esm/components/organisms/CrtShell/CrtShell.d.ts +10 -0
- package/dist/esm/components/organisms/CrtShell/index.d.ts +2 -0
- package/dist/esm/components/organisms/Exercise/Exercise.d.ts +15 -0
- package/dist/esm/components/organisms/Exercise/index.d.ts +2 -0
- package/dist/esm/components/organisms/Footer/Footer.d.ts +19 -0
- package/dist/esm/components/organisms/Footer/index.d.ts +2 -0
- package/dist/esm/components/organisms/Glyphs/Glyphs.d.ts +11 -0
- package/dist/esm/components/organisms/Glyphs/index.d.ts +4 -0
- package/dist/esm/components/organisms/Header/Header.d.ts +35 -0
- package/dist/esm/components/organisms/Header/index.d.ts +2 -0
- package/dist/esm/components/organisms/HeaderNav/index.d.ts +2 -0
- package/dist/esm/components/organisms/HeroFrame/HeroFrame.d.ts +42 -0
- package/dist/esm/components/organisms/HeroFrame/index.d.ts +2 -0
- package/dist/esm/components/organisms/LoginForm/LoginForm.d.ts +16 -0
- package/dist/esm/components/organisms/LoginForm/index.d.ts +2 -0
- package/dist/esm/components/organisms/ModuleAccordion/ModuleAccordion.d.ts +24 -0
- package/dist/esm/components/organisms/ModuleAccordion/index.d.ts +2 -0
- package/dist/esm/components/organisms/NerdTree/NerdTree.d.ts +29 -0
- package/dist/esm/components/organisms/NerdTree/index.d.ts +2 -0
- package/dist/esm/components/organisms/PdaWindow/PdaWindow.d.ts +8 -0
- package/dist/esm/components/organisms/PdaWindow/index.d.ts +2 -0
- package/dist/esm/components/organisms/PostHeader/PostHeader.d.ts +19 -0
- package/dist/esm/components/organisms/PostHeader/index.d.ts +2 -0
- package/dist/esm/components/organisms/PostListing/PostListing.d.ts +30 -0
- package/dist/esm/components/organisms/PostListing/index.d.ts +2 -0
- package/dist/esm/components/organisms/RelatedPosts/RelatedPosts.d.ts +15 -0
- package/dist/esm/components/organisms/RelatedPosts/index.d.ts +2 -0
- package/dist/esm/components/organisms/Search/Search.d.ts +17 -0
- package/dist/esm/components/organisms/Search/index.d.ts +2 -0
- package/dist/esm/components/organisms/SeriesNav/SeriesNav.d.ts +14 -0
- package/dist/esm/components/organisms/SeriesNav/index.d.ts +2 -0
- package/dist/esm/components/organisms/VideoPlayer/VideoPlayer.d.ts +24 -0
- package/dist/esm/components/organisms/VideoPlayer/index.d.ts +2 -0
- package/dist/esm/components/organisms/index.d.ts +19 -0
- package/dist/esm/components/pages/Post/index.d.ts +2 -0
- package/dist/esm/components/pages/index.d.ts +1 -0
- package/dist/esm/components/presets/SiteShell/index.d.ts +2 -0
- package/dist/esm/components/presets/index.d.ts +1 -0
- package/dist/esm/components/templates/Layout/Layout.d.ts +1786 -0
- package/dist/esm/components/templates/Layout/index.d.ts +2 -0
- package/dist/esm/components/templates/MainframeLayout/MainframeLayout.d.ts +39 -0
- package/dist/esm/components/templates/MainframeLayout/index.d.ts +2 -0
- package/dist/esm/components/templates/PostTemplate/Post.d.ts +30 -0
- package/dist/esm/components/templates/PostTemplate/index.d.ts +2 -0
- package/dist/esm/components/templates/SiteShell/SiteShell.d.ts +26 -0
- package/dist/esm/components/templates/SiteShell/index.d.ts +2 -0
- package/dist/esm/components/templates/index.d.ts +4 -0
- package/dist/esm/foundations/animation/index.d.ts +16 -0
- package/dist/esm/foundations/effects/index.d.ts +9 -0
- package/dist/esm/foundations/glyphs/catalog.d.ts +103 -0
- package/dist/esm/foundations/glyphs/index.d.ts +2 -0
- package/dist/esm/foundations/index.d.ts +8 -0
- package/dist/esm/foundations/mdx/index.d.ts +3 -0
- package/dist/esm/foundations/syntax/index.d.ts +1 -0
- package/dist/esm/foundations/tokens/index.d.ts +32 -0
- package/dist/esm/foundations/typography/index.d.ts +8 -0
- package/dist/esm/foundations/typography/variants.d.ts +3 -0
- package/dist/esm/foundations/utils/index.d.ts +1 -0
- package/dist/esm/foundations/utils/slug.d.ts +1 -0
- package/dist/esm/hooks/index.d.ts +3 -0
- package/dist/esm/hooks/useHashRoute.d.ts +6 -0
- package/dist/esm/hooks/useReadingProgress.d.ts +4 -0
- package/dist/esm/index.d.ts +3 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/package.json +3 -0
- package/dist/esm/styles/components.css +10743 -0
- package/dist/esm/utils/browser.d.ts +5 -0
- package/dist/esm/utils/classNames.d.ts +2 -0
- package/dist/styles/components.css +10743 -0
- package/dist/styles/fonts/bender/Bender-Black.woff +0 -0
- package/dist/styles/fonts/bender/Bender-BlackItalic.woff +0 -0
- package/dist/styles/fonts/bender/Bender-Bold.woff +0 -0
- package/dist/styles/fonts/bender/Bender-BoldItalic.woff +0 -0
- package/dist/styles/fonts/bender/Bender-Italic.woff +0 -0
- package/dist/styles/fonts/bender/Bender-Light.woff +0 -0
- package/dist/styles/fonts/bender/Bender-LightItalic.woff +0 -0
- package/dist/styles/fonts/bender/Bender.woff +0 -0
- package/dist/styles/fonts/vcr_osd_mono/VCR_OSD_MONO_1.001.ttf +0 -0
- package/dist/styles/fonts.css +73 -0
- package/dist/styles/global.css +486 -0
- package/dist/styles/phosphor.css +5 -0
- package/dist/styles/tokens.css +382 -0
- package/dist/styles/typography.css +193 -0
- package/package.json +145 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./Pagination.scss";
|
|
3
|
+
export interface PaginationProps extends Omit<React.HTMLAttributes<HTMLElement>, "onChange"> {
|
|
4
|
+
page?: number;
|
|
5
|
+
defaultPage?: number;
|
|
6
|
+
totalPages: number;
|
|
7
|
+
prevHref?: string;
|
|
8
|
+
nextHref?: string;
|
|
9
|
+
prevLabel?: React.ReactNode;
|
|
10
|
+
nextLabel?: React.ReactNode;
|
|
11
|
+
marker?: React.ReactNode;
|
|
12
|
+
onPrev?: (e: React.MouseEvent<HTMLAnchorElement>) => void;
|
|
13
|
+
onNext?: (e: React.MouseEvent<HTMLAnchorElement>) => void;
|
|
14
|
+
onPageChange?: (page: number) => void;
|
|
15
|
+
}
|
|
16
|
+
declare const Pagination: React.FC<PaginationProps>;
|
|
17
|
+
export default Pagination;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface PostMetaTag {
|
|
3
|
+
label: React.ReactNode;
|
|
4
|
+
href?: string;
|
|
5
|
+
}
|
|
6
|
+
export interface PostMetaProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
7
|
+
date?: string;
|
|
8
|
+
dateTime?: string;
|
|
9
|
+
readTime?: string;
|
|
10
|
+
wordCount?: number;
|
|
11
|
+
tags?: Array<string | PostMetaTag>;
|
|
12
|
+
updated?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare const PostMeta: React.FC<PostMetaProps>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export type PrereqStatus = "met" | "missing" | "soft";
|
|
3
|
+
export interface PrereqItem {
|
|
4
|
+
title: React.ReactNode;
|
|
5
|
+
sub?: React.ReactNode;
|
|
6
|
+
status: PrereqStatus;
|
|
7
|
+
}
|
|
8
|
+
export interface PrereqListProps {
|
|
9
|
+
heading?: React.ReactNode;
|
|
10
|
+
stamp?: React.ReactNode;
|
|
11
|
+
items: PrereqItem[];
|
|
12
|
+
className?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare const PrereqList: React.FC<PrereqListProps>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./SearchResult.scss";
|
|
3
|
+
export interface SearchHit {
|
|
4
|
+
id?: string;
|
|
5
|
+
href: string;
|
|
6
|
+
title: React.ReactNode;
|
|
7
|
+
date?: React.ReactNode;
|
|
8
|
+
tags?: React.ReactNode[];
|
|
9
|
+
snippet?: React.ReactNode;
|
|
10
|
+
}
|
|
11
|
+
export interface SearchResultProps extends React.HTMLAttributes<HTMLLIElement> {
|
|
12
|
+
hit: SearchHit;
|
|
13
|
+
}
|
|
14
|
+
export declare const SearchResult: React.FC<SearchResultProps>;
|
|
15
|
+
export interface SearchResultListProps extends React.HTMLAttributes<HTMLUListElement> {
|
|
16
|
+
hits: SearchHit[];
|
|
17
|
+
emptyMessage?: React.ReactNode;
|
|
18
|
+
emptyState?: React.ReactNode;
|
|
19
|
+
getHitKey?: (hit: SearchHit, index: number) => React.Key;
|
|
20
|
+
renderHit?: (hit: SearchHit, index: number) => React.ReactNode;
|
|
21
|
+
}
|
|
22
|
+
declare const SearchResultList: React.FC<SearchResultListProps>;
|
|
23
|
+
export default SearchResultList;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { DataAttributes } from "../../atoms/primitive";
|
|
3
|
+
export interface SelectOption {
|
|
4
|
+
label: React.ReactNode;
|
|
5
|
+
value: string;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface SelectProps extends Omit<React.SelectHTMLAttributes<HTMLSelectElement>, "children"> {
|
|
9
|
+
label?: React.ReactNode;
|
|
10
|
+
helpText?: React.ReactNode;
|
|
11
|
+
error?: React.ReactNode;
|
|
12
|
+
prompt?: React.ReactNode;
|
|
13
|
+
options: SelectOption[];
|
|
14
|
+
controlClassName?: string;
|
|
15
|
+
selectClassName?: string;
|
|
16
|
+
rootProps?: React.HTMLAttributes<HTMLLabelElement> & DataAttributes;
|
|
17
|
+
onValueChange?: (value: string, event: React.ChangeEvent<HTMLSelectElement>) => void;
|
|
18
|
+
}
|
|
19
|
+
export interface SelectControlProps extends Omit<SelectProps, "label" | "helpText" | "error" | "rootProps"> {
|
|
20
|
+
}
|
|
21
|
+
export declare const SelectControl: React.ForwardRefExoticComponent<SelectControlProps & React.RefAttributes<HTMLSelectElement>>;
|
|
22
|
+
export declare const SelectField: React.ForwardRefExoticComponent<SelectProps & React.RefAttributes<HTMLSelectElement>>;
|
|
23
|
+
export declare const Select: React.ForwardRefExoticComponent<SelectProps & React.RefAttributes<HTMLSelectElement>>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface ShareLink {
|
|
3
|
+
label: string;
|
|
4
|
+
href: string;
|
|
5
|
+
}
|
|
6
|
+
export interface ShareBarProps {
|
|
7
|
+
url?: string;
|
|
8
|
+
links?: ShareLink[];
|
|
9
|
+
label?: string;
|
|
10
|
+
className?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare const ShareBar: React.FC<ShareBarProps>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface StepperItem {
|
|
3
|
+
label: React.ReactNode;
|
|
4
|
+
href?: string;
|
|
5
|
+
num?: string;
|
|
6
|
+
done?: boolean;
|
|
7
|
+
current?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface StepperProps {
|
|
10
|
+
items: StepperItem[];
|
|
11
|
+
separator?: string;
|
|
12
|
+
className?: string;
|
|
13
|
+
ariaLabel?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare const Stepper: React.FC<StepperProps>;
|
|
16
|
+
export interface StepperFootLink {
|
|
17
|
+
href: string;
|
|
18
|
+
kind?: React.ReactNode;
|
|
19
|
+
name: React.ReactNode;
|
|
20
|
+
}
|
|
21
|
+
export interface StepperFootProps {
|
|
22
|
+
prev?: StepperFootLink;
|
|
23
|
+
next?: StepperFootLink;
|
|
24
|
+
className?: string;
|
|
25
|
+
}
|
|
26
|
+
export declare const StepperFoot: React.FC<StepperFootProps>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface TocItem {
|
|
3
|
+
label: React.ReactNode;
|
|
4
|
+
href: string;
|
|
5
|
+
glyph?: string;
|
|
6
|
+
state?: "default" | "active" | "done";
|
|
7
|
+
children?: TocItem[];
|
|
8
|
+
}
|
|
9
|
+
export interface TableOfContentsProps {
|
|
10
|
+
heading?: React.ReactNode;
|
|
11
|
+
items: TocItem[];
|
|
12
|
+
foot?: React.ReactNode;
|
|
13
|
+
className?: string;
|
|
14
|
+
spy?: boolean;
|
|
15
|
+
smoothScroll?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Distance from viewport top (in px) used to decide which heading is
|
|
18
|
+
* "current" while scrolling. A heading becomes active once its top edge
|
|
19
|
+
* crosses above this offset. Default: 25% of viewport height.
|
|
20
|
+
*/
|
|
21
|
+
spyOffset?: number;
|
|
22
|
+
}
|
|
23
|
+
export declare const TableOfContents: React.FC<TableOfContentsProps>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface TabItem {
|
|
3
|
+
id: string;
|
|
4
|
+
label: React.ReactNode;
|
|
5
|
+
content: React.ReactNode;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface TabsProps {
|
|
9
|
+
items: TabItem[];
|
|
10
|
+
value?: string;
|
|
11
|
+
defaultValue?: string;
|
|
12
|
+
onValueChange?: (value: string) => void;
|
|
13
|
+
ariaLabel?: string;
|
|
14
|
+
orientation?: "horizontal" | "vertical";
|
|
15
|
+
lazy?: boolean;
|
|
16
|
+
className?: string;
|
|
17
|
+
listClassName?: string;
|
|
18
|
+
tabClassName?: string;
|
|
19
|
+
panelClassName?: string;
|
|
20
|
+
}
|
|
21
|
+
export declare const Tabs: React.FC<TabsProps>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export type TimelineItemStatus = "done" | "active" | "upcoming";
|
|
3
|
+
export interface TimelineItem {
|
|
4
|
+
date?: string;
|
|
5
|
+
title: string;
|
|
6
|
+
body?: React.ReactNode;
|
|
7
|
+
status?: TimelineItemStatus;
|
|
8
|
+
href?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface TimelineProps {
|
|
11
|
+
items: TimelineItem[];
|
|
12
|
+
className?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare const Timeline: React.FC<TimelineProps>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export type ToastVariant = "info" | "success" | "warn" | "error";
|
|
3
|
+
export interface ToastProps {
|
|
4
|
+
message: string;
|
|
5
|
+
variant?: ToastVariant;
|
|
6
|
+
visible?: boolean;
|
|
7
|
+
inline?: boolean;
|
|
8
|
+
onDismiss?: () => void;
|
|
9
|
+
className?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare const Toast: React.FC<ToastProps>;
|
|
12
|
+
export declare function useToast(duration?: number): {
|
|
13
|
+
visible: boolean;
|
|
14
|
+
message: string;
|
|
15
|
+
variant: ToastVariant;
|
|
16
|
+
show: (msg: string, variant?: ToastVariant) => void;
|
|
17
|
+
dismiss: () => void;
|
|
18
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export type TooltipPlacement = "top" | "right" | "bottom" | "left";
|
|
3
|
+
export interface TooltipProps {
|
|
4
|
+
content: React.ReactNode;
|
|
5
|
+
children: React.ReactElement;
|
|
6
|
+
placement?: TooltipPlacement;
|
|
7
|
+
offset?: number;
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const Tooltip: React.FC<TooltipProps>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export * from "./AuthorCard";
|
|
2
|
+
export * from "./Breadcrumbs";
|
|
3
|
+
export * from "./Callout";
|
|
4
|
+
export * from "./EmptyState";
|
|
5
|
+
export * from "./Field";
|
|
6
|
+
export * from "./FormField";
|
|
7
|
+
export * from "./HeaderNav";
|
|
8
|
+
export * from "./InputField";
|
|
9
|
+
export * from "./LessonRow";
|
|
10
|
+
export * from "./List";
|
|
11
|
+
export * from "./LocaleSwitch";
|
|
12
|
+
export * from "./Modal";
|
|
13
|
+
export { default as Pagination } from "./Pagination";
|
|
14
|
+
export type { PaginationProps } from "./Pagination";
|
|
15
|
+
export * from "./PostMeta";
|
|
16
|
+
export * from "./PrereqList";
|
|
17
|
+
export { default as SearchResultList, SearchResult } from "./SearchResult";
|
|
18
|
+
export type { SearchHit, SearchResultListProps, SearchResultProps, } from "./SearchResult";
|
|
19
|
+
export * from "./Select";
|
|
20
|
+
export * from "./ShareBar";
|
|
21
|
+
export * from "./Stepper";
|
|
22
|
+
export * from "./TableOfContents";
|
|
23
|
+
export * from "./Tabs";
|
|
24
|
+
export * from "./TextareaField";
|
|
25
|
+
export * from "./Timeline";
|
|
26
|
+
export * from "./Tooltip";
|
|
27
|
+
export * from "./Toast";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { type BannerFontName } from "../../../ascii";
|
|
3
|
+
type AsciiBannerStyle = React.CSSProperties & Record<`--${string}`, string | number | undefined>;
|
|
4
|
+
type AsciiBannerBaseProps = {
|
|
5
|
+
art?: string;
|
|
6
|
+
text?: string;
|
|
7
|
+
font?: BannerFontName;
|
|
8
|
+
fallback?: string;
|
|
9
|
+
label?: string;
|
|
10
|
+
className?: string;
|
|
11
|
+
style?: AsciiBannerStyle;
|
|
12
|
+
};
|
|
13
|
+
type AsciiBannerDivProps = AsciiBannerBaseProps & Omit<React.HTMLAttributes<HTMLDivElement>, "children" | "className" | "style"> & {
|
|
14
|
+
href?: never;
|
|
15
|
+
};
|
|
16
|
+
type AsciiBannerAnchorProps = AsciiBannerBaseProps & Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, "children" | "className" | "style" | "href"> & {
|
|
17
|
+
href: string;
|
|
18
|
+
};
|
|
19
|
+
export type AsciiBannerProps = AsciiBannerDivProps | AsciiBannerAnchorProps;
|
|
20
|
+
export declare const AsciiBanner: React.FC<AsciiBannerProps>;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface CourseCardProps extends Omit<React.HTMLAttributes<HTMLElement>, "title"> {
|
|
3
|
+
stamp?: string;
|
|
4
|
+
thumb?: React.ReactNode;
|
|
5
|
+
thumbSrc?: string;
|
|
6
|
+
thumbAlt?: string;
|
|
7
|
+
showCover?: boolean;
|
|
8
|
+
coverMeta?: React.ReactNode;
|
|
9
|
+
tag?: React.ReactNode;
|
|
10
|
+
title: React.ReactNode;
|
|
11
|
+
description?: React.ReactNode;
|
|
12
|
+
stats?: React.ReactNode;
|
|
13
|
+
progress?: {
|
|
14
|
+
value: number;
|
|
15
|
+
total?: number;
|
|
16
|
+
cells?: number;
|
|
17
|
+
};
|
|
18
|
+
cta?: {
|
|
19
|
+
label: string;
|
|
20
|
+
href: string;
|
|
21
|
+
};
|
|
22
|
+
locked?: boolean;
|
|
23
|
+
}
|
|
24
|
+
export declare const CourseCard: React.FC<CourseCardProps>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface CrtShellProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
disableTick?: boolean;
|
|
5
|
+
disableNoise?: boolean;
|
|
6
|
+
disableScanlines?: boolean;
|
|
7
|
+
disableVignette?: boolean;
|
|
8
|
+
disableFrame?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare const CrtShell: React.FC<CrtShellProps>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface ExerciseTask {
|
|
3
|
+
id?: string;
|
|
4
|
+
label: React.ReactNode;
|
|
5
|
+
description?: React.ReactNode;
|
|
6
|
+
done?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface ExerciseProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "title"> {
|
|
9
|
+
n?: number;
|
|
10
|
+
title?: React.ReactNode;
|
|
11
|
+
tasks?: ExerciseTask[];
|
|
12
|
+
onTaskChange?: (index: number, done: boolean) => void;
|
|
13
|
+
children?: React.ReactNode;
|
|
14
|
+
}
|
|
15
|
+
export declare const Exercise: React.FC<ExerciseProps>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface FooterLink {
|
|
3
|
+
label: React.ReactNode;
|
|
4
|
+
href: string;
|
|
5
|
+
external?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface FooterProps extends React.HTMLAttributes<HTMLElement> {
|
|
8
|
+
brand?: React.ReactNode;
|
|
9
|
+
year?: React.ReactNode;
|
|
10
|
+
links?: FooterLink[];
|
|
11
|
+
status?: {
|
|
12
|
+
label: React.ReactNode;
|
|
13
|
+
value: React.ReactNode;
|
|
14
|
+
};
|
|
15
|
+
prompt?: string;
|
|
16
|
+
command?: string;
|
|
17
|
+
meta?: React.ReactNode;
|
|
18
|
+
}
|
|
19
|
+
export declare const Footer: React.FC<FooterProps>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { DEFAULT_GLYPHS, type GlyphItem } from "../../../foundations/glyphs";
|
|
3
|
+
export { DEFAULT_GLYPHS };
|
|
4
|
+
export type { GlyphItem };
|
|
5
|
+
export interface GlyphsProps {
|
|
6
|
+
items?: readonly GlyphItem[];
|
|
7
|
+
showLabels?: boolean;
|
|
8
|
+
onSelect?: (item: GlyphItem) => void;
|
|
9
|
+
className?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare const Glyphs: React.FC<GlyphsProps>;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { type BannerFontName } from "../../../ascii";
|
|
3
|
+
import type { HeaderNavVariant } from "../../molecules/HeaderNav";
|
|
4
|
+
import type { LocaleSwitchItem, LocaleSwitchVariant } from "../../molecules/LocaleSwitch";
|
|
5
|
+
import "./Header.scss";
|
|
6
|
+
export interface HeaderNavItem {
|
|
7
|
+
label: React.ReactNode;
|
|
8
|
+
href: string;
|
|
9
|
+
active?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export interface HeaderLocale extends LocaleSwitchItem {
|
|
12
|
+
}
|
|
13
|
+
export type HeaderVariant = "masthead" | "compact" | "terminal";
|
|
14
|
+
export type HeaderMobileLayout = "scroll" | "stack";
|
|
15
|
+
export interface HeaderProps extends React.HTMLAttributes<HTMLElement> {
|
|
16
|
+
title: string;
|
|
17
|
+
homeHref?: string;
|
|
18
|
+
bannerArt?: string;
|
|
19
|
+
bannerFont?: BannerFontName;
|
|
20
|
+
showAsciiBanner?: boolean;
|
|
21
|
+
tagline?: React.ReactNode;
|
|
22
|
+
status?: React.ReactNode;
|
|
23
|
+
nav?: HeaderNavItem[];
|
|
24
|
+
locales?: HeaderLocale[];
|
|
25
|
+
navAriaLabel?: string;
|
|
26
|
+
localeAriaLabel?: string;
|
|
27
|
+
variant?: HeaderVariant;
|
|
28
|
+
navVariant?: HeaderNavVariant;
|
|
29
|
+
localeVariant?: LocaleSwitchVariant;
|
|
30
|
+
mobileLayout?: HeaderMobileLayout;
|
|
31
|
+
rule?: boolean;
|
|
32
|
+
align?: "left" | "center";
|
|
33
|
+
}
|
|
34
|
+
declare const Header: React.FC<HeaderProps>;
|
|
35
|
+
export default Header;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { type BannerFontName } from "../../../ascii";
|
|
3
|
+
export interface HeroFrameProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
art?: string;
|
|
5
|
+
text?: string;
|
|
6
|
+
font?: BannerFontName;
|
|
7
|
+
topHud?: React.ReactNode;
|
|
8
|
+
bottomHud?: React.ReactNode;
|
|
9
|
+
scanline?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare const HeroFrame: React.FC<HeroFrameProps> & {
|
|
12
|
+
Hud: typeof Hud;
|
|
13
|
+
HudLed: typeof HudLed;
|
|
14
|
+
HudLabel: typeof HudLabel;
|
|
15
|
+
HudText: typeof HudText;
|
|
16
|
+
HudSpacer: typeof HudSpacer;
|
|
17
|
+
HudTape: typeof HudTape;
|
|
18
|
+
HudBars: typeof HudBars;
|
|
19
|
+
};
|
|
20
|
+
declare const Hud: React.FC<{
|
|
21
|
+
position?: "top" | "bottom";
|
|
22
|
+
children: React.ReactNode;
|
|
23
|
+
}>;
|
|
24
|
+
declare const HudLed: React.FC<{
|
|
25
|
+
variant?: "rec" | "pwr";
|
|
26
|
+
}>;
|
|
27
|
+
declare const HudLabel: React.FC<{
|
|
28
|
+
children: React.ReactNode;
|
|
29
|
+
}>;
|
|
30
|
+
declare const HudText: React.FC<{
|
|
31
|
+
children: React.ReactNode;
|
|
32
|
+
}>;
|
|
33
|
+
declare const HudSpacer: React.FC;
|
|
34
|
+
declare const HudBars: React.FC<{
|
|
35
|
+
value: number;
|
|
36
|
+
max?: number;
|
|
37
|
+
}>;
|
|
38
|
+
declare const HudTape: React.FC<{
|
|
39
|
+
text: string;
|
|
40
|
+
speed?: number;
|
|
41
|
+
}>;
|
|
42
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface LoginFormProps {
|
|
3
|
+
onSubmit?: (data: {
|
|
4
|
+
identifier: string;
|
|
5
|
+
password: string;
|
|
6
|
+
}) => void;
|
|
7
|
+
error?: string;
|
|
8
|
+
loading?: boolean;
|
|
9
|
+
title?: string;
|
|
10
|
+
subtitle?: string;
|
|
11
|
+
submitLabel?: string;
|
|
12
|
+
identifierLabel?: string;
|
|
13
|
+
passwordLabel?: string;
|
|
14
|
+
className?: string;
|
|
15
|
+
}
|
|
16
|
+
export declare const LoginForm: React.FC<LoginFormProps>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface ModuleLesson {
|
|
3
|
+
id?: string;
|
|
4
|
+
num: string;
|
|
5
|
+
title: React.ReactNode;
|
|
6
|
+
href?: string;
|
|
7
|
+
length?: React.ReactNode;
|
|
8
|
+
state?: "default" | "done" | "locked";
|
|
9
|
+
}
|
|
10
|
+
export interface ModuleAccordionProps extends Omit<React.HTMLAttributes<HTMLElement>, "title"> {
|
|
11
|
+
num: string;
|
|
12
|
+
title: React.ReactNode;
|
|
13
|
+
intro?: React.ReactNode;
|
|
14
|
+
lessons?: ModuleLesson[];
|
|
15
|
+
progress?: {
|
|
16
|
+
value: number;
|
|
17
|
+
total?: number;
|
|
18
|
+
cells?: number;
|
|
19
|
+
};
|
|
20
|
+
defaultOpen?: boolean;
|
|
21
|
+
onOpenChange?: (open: boolean) => void;
|
|
22
|
+
renderLesson?: (lesson: ModuleLesson, index: number) => React.ReactNode;
|
|
23
|
+
}
|
|
24
|
+
export declare const ModuleAccordion: React.FC<ModuleAccordionProps>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface NerdTreeLeaf {
|
|
3
|
+
kind: "leaf";
|
|
4
|
+
id?: string;
|
|
5
|
+
label: string;
|
|
6
|
+
href?: string;
|
|
7
|
+
active?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface NerdTreeDir {
|
|
10
|
+
kind: "dir";
|
|
11
|
+
id?: string;
|
|
12
|
+
label: string;
|
|
13
|
+
children?: NerdTreeNode[];
|
|
14
|
+
defaultOpen?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export type NerdTreeNode = NerdTreeLeaf | NerdTreeDir;
|
|
17
|
+
export interface NerdTreeProps extends React.HTMLAttributes<HTMLElement> {
|
|
18
|
+
tree: NerdTreeNode[];
|
|
19
|
+
density?: "default" | "compact";
|
|
20
|
+
frame?: "rail" | "panel";
|
|
21
|
+
bufferLabel?: string;
|
|
22
|
+
title?: string;
|
|
23
|
+
hint?: React.ReactNode;
|
|
24
|
+
command?: string;
|
|
25
|
+
footerMeta?: string;
|
|
26
|
+
ariaLabel?: string;
|
|
27
|
+
mobileToggleLabel?: string;
|
|
28
|
+
}
|
|
29
|
+
export declare const NerdTree: React.FC<NerdTreeProps>;
|