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,36 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { type NerdTreeNode } from "../../organisms/NerdTree";
|
|
3
|
+
export interface AdminNavItem {
|
|
4
|
+
label: string;
|
|
5
|
+
href: string;
|
|
6
|
+
active?: boolean;
|
|
7
|
+
glyph?: string;
|
|
8
|
+
}
|
|
9
|
+
export interface AdminUser {
|
|
10
|
+
name: string;
|
|
11
|
+
role?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface AdminStat {
|
|
14
|
+
label: string;
|
|
15
|
+
value: React.ReactNode;
|
|
16
|
+
tone?: "default" | "good" | "warn";
|
|
17
|
+
}
|
|
18
|
+
export interface AdminShellProps {
|
|
19
|
+
nav?: AdminNavItem[];
|
|
20
|
+
tree?: NerdTreeNode[];
|
|
21
|
+
user?: AdminUser;
|
|
22
|
+
onLogout?: () => void | Promise<void>;
|
|
23
|
+
title?: string;
|
|
24
|
+
heading?: React.ReactNode;
|
|
25
|
+
description?: React.ReactNode;
|
|
26
|
+
actions?: React.ReactNode;
|
|
27
|
+
stats?: AdminStat[];
|
|
28
|
+
treeTitle?: string;
|
|
29
|
+
treeBufferLabel?: string;
|
|
30
|
+
treeHint?: React.ReactNode;
|
|
31
|
+
treeCommand?: string;
|
|
32
|
+
treeFooterMeta?: string;
|
|
33
|
+
children: React.ReactNode;
|
|
34
|
+
className?: string;
|
|
35
|
+
}
|
|
36
|
+
export declare const AdminShell: React.FC<AdminShellProps>;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export type ContentStatus = "draft" | "published" | "archived";
|
|
3
|
+
export type FieldSpec = {
|
|
4
|
+
kind: "text";
|
|
5
|
+
key: string;
|
|
6
|
+
label?: string;
|
|
7
|
+
prompt?: string;
|
|
8
|
+
placeholder?: string;
|
|
9
|
+
} | {
|
|
10
|
+
kind: "textarea";
|
|
11
|
+
key: string;
|
|
12
|
+
label?: string;
|
|
13
|
+
rows?: number;
|
|
14
|
+
placeholder?: string;
|
|
15
|
+
} | {
|
|
16
|
+
kind: "tags";
|
|
17
|
+
key: string;
|
|
18
|
+
label?: string;
|
|
19
|
+
placeholder?: string;
|
|
20
|
+
chip?: "tag" | "outline";
|
|
21
|
+
} | {
|
|
22
|
+
kind: "checkbox";
|
|
23
|
+
key: string;
|
|
24
|
+
description: string;
|
|
25
|
+
} | {
|
|
26
|
+
kind: "pairs";
|
|
27
|
+
key: string;
|
|
28
|
+
label: string;
|
|
29
|
+
addLabel: string;
|
|
30
|
+
columns: [PairColumn, PairColumn];
|
|
31
|
+
} | {
|
|
32
|
+
kind: "list";
|
|
33
|
+
key: string;
|
|
34
|
+
label: string;
|
|
35
|
+
addLabel: string;
|
|
36
|
+
placeholder: string;
|
|
37
|
+
leading?: string;
|
|
38
|
+
itemKey?: string;
|
|
39
|
+
};
|
|
40
|
+
export interface PairColumn {
|
|
41
|
+
key: string;
|
|
42
|
+
placeholder: string;
|
|
43
|
+
flex?: string | number;
|
|
44
|
+
}
|
|
45
|
+
export interface ContentEditorProps<T extends object = Record<string, unknown>> {
|
|
46
|
+
kindLabel: string;
|
|
47
|
+
saveLabel?: string;
|
|
48
|
+
initial?: Partial<T>;
|
|
49
|
+
fields: FieldSpec[];
|
|
50
|
+
status?: boolean;
|
|
51
|
+
autoSlug?: {
|
|
52
|
+
from: string;
|
|
53
|
+
to: string;
|
|
54
|
+
};
|
|
55
|
+
preview?: (data: T) => React.ReactNode;
|
|
56
|
+
onSave?: (data: T) => void;
|
|
57
|
+
onChange?: (data: T) => void;
|
|
58
|
+
onDiscard?: () => void;
|
|
59
|
+
saving?: boolean;
|
|
60
|
+
variant?: "default" | "compact";
|
|
61
|
+
className?: string;
|
|
62
|
+
}
|
|
63
|
+
export declare function ContentEditor<T extends object = Record<string, unknown>>({ kindLabel, saveLabel, initial, fields, status, autoSlug, preview, onSave, onChange, onDiscard, saving, variant, className, }: ContentEditorProps<T>): React.JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface EditorShellProps {
|
|
3
|
+
kindLabel: string;
|
|
4
|
+
meta?: React.ReactNode;
|
|
5
|
+
statusControl?: React.ReactNode;
|
|
6
|
+
footerStart?: React.ReactNode;
|
|
7
|
+
saveLabel?: string;
|
|
8
|
+
saving?: boolean;
|
|
9
|
+
variant?: "default" | "compact";
|
|
10
|
+
className?: string;
|
|
11
|
+
children: React.ReactNode;
|
|
12
|
+
onDiscard?: () => void;
|
|
13
|
+
onSave?: () => void;
|
|
14
|
+
}
|
|
15
|
+
export declare const EditorShell: React.FC<EditorShellProps>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { PairColumn } from "./ContentEditor";
|
|
3
|
+
export type PairRow = Record<string, string>;
|
|
4
|
+
export interface PairListFieldProps {
|
|
5
|
+
label: string;
|
|
6
|
+
addLabel: string;
|
|
7
|
+
columns: [PairColumn, PairColumn];
|
|
8
|
+
rows: PairRow[];
|
|
9
|
+
onChange: (rows: PairRow[]) => void;
|
|
10
|
+
}
|
|
11
|
+
export declare const PairListField: React.FC<PairListFieldProps>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export type ListRow = Record<string, unknown> & {
|
|
3
|
+
id?: string;
|
|
4
|
+
};
|
|
5
|
+
export interface RepeaterFieldProps {
|
|
6
|
+
label: string;
|
|
7
|
+
addLabel: string;
|
|
8
|
+
placeholder: string;
|
|
9
|
+
leading?: string;
|
|
10
|
+
itemKey?: string;
|
|
11
|
+
rows: ListRow[];
|
|
12
|
+
createRow: () => ListRow;
|
|
13
|
+
getString: (value: unknown) => string;
|
|
14
|
+
onChange: (rows: ListRow[]) => void;
|
|
15
|
+
}
|
|
16
|
+
export declare const RepeaterField: React.FC<RepeaterFieldProps>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface TagInputProps {
|
|
3
|
+
label?: string;
|
|
4
|
+
placeholder?: string;
|
|
5
|
+
chip?: "tag" | "outline";
|
|
6
|
+
value: string[];
|
|
7
|
+
inputValue: string;
|
|
8
|
+
onInputChange: (value: string) => void;
|
|
9
|
+
onChange: (value: string[]) => void;
|
|
10
|
+
}
|
|
11
|
+
export declare const TagInput: React.FC<TagInputProps>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export { ContentEditor } from "./ContentEditor";
|
|
2
|
+
export type { ContentEditorProps, ContentStatus, FieldSpec, PairColumn, } from "./ContentEditor";
|
|
3
|
+
export { EditorShell } from "./EditorShell";
|
|
4
|
+
export type { EditorShellProps } from "./EditorShell";
|
|
5
|
+
export { PairListField } from "./PairListField";
|
|
6
|
+
export type { PairListFieldProps, PairRow } from "./PairListField";
|
|
7
|
+
export { RepeaterField } from "./RepeaterField";
|
|
8
|
+
export type { ListRow, RepeaterFieldProps } from "./RepeaterField";
|
|
9
|
+
export { StatusSelect } from "./StatusSelect";
|
|
10
|
+
export type { StatusSelectProps } from "./StatusSelect";
|
|
11
|
+
export { TagInput } from "./TagInput";
|
|
12
|
+
export type { TagInputProps } from "./TagInput";
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { ContentStatus } from "../../admin/ContentEditor/ContentEditor";
|
|
3
|
+
export type { ContentStatus };
|
|
4
|
+
export interface CourseModule {
|
|
5
|
+
id: string;
|
|
6
|
+
title: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
}
|
|
9
|
+
export interface CourseData {
|
|
10
|
+
title: string;
|
|
11
|
+
slug: string;
|
|
12
|
+
tagline: string;
|
|
13
|
+
description: string;
|
|
14
|
+
tags: string[];
|
|
15
|
+
modules: CourseModule[];
|
|
16
|
+
status: ContentStatus;
|
|
17
|
+
price: string;
|
|
18
|
+
featured: boolean;
|
|
19
|
+
}
|
|
20
|
+
export interface CourseEditorProps {
|
|
21
|
+
initial?: Partial<CourseData>;
|
|
22
|
+
onSave?: (data: CourseData) => void;
|
|
23
|
+
onChange?: (data: CourseData) => void;
|
|
24
|
+
onDiscard?: () => void;
|
|
25
|
+
saving?: boolean;
|
|
26
|
+
className?: string;
|
|
27
|
+
}
|
|
28
|
+
export declare const CourseEditor: React.FC<CourseEditorProps>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { ContentStatus } from "../../admin/ContentEditor/ContentEditor";
|
|
3
|
+
export type { ContentStatus };
|
|
4
|
+
export interface LessonResource {
|
|
5
|
+
label: string;
|
|
6
|
+
url: string;
|
|
7
|
+
}
|
|
8
|
+
export interface LessonData {
|
|
9
|
+
title: string;
|
|
10
|
+
slug: string;
|
|
11
|
+
body: string;
|
|
12
|
+
duration: string;
|
|
13
|
+
videoUrl: string;
|
|
14
|
+
tags: string[];
|
|
15
|
+
resources: LessonResource[];
|
|
16
|
+
status: ContentStatus;
|
|
17
|
+
free: boolean;
|
|
18
|
+
}
|
|
19
|
+
export interface LessonEditorProps {
|
|
20
|
+
initial?: Partial<LessonData>;
|
|
21
|
+
onSave?: (data: LessonData) => void;
|
|
22
|
+
onChange?: (data: LessonData) => void;
|
|
23
|
+
onDiscard?: () => void;
|
|
24
|
+
saving?: boolean;
|
|
25
|
+
className?: string;
|
|
26
|
+
}
|
|
27
|
+
export declare const LessonEditor: React.FC<LessonEditorProps>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { ContentStatus } from "../../admin/ContentEditor/ContentEditor";
|
|
3
|
+
export type { ContentStatus };
|
|
4
|
+
export interface NoteData {
|
|
5
|
+
title: string;
|
|
6
|
+
body: string;
|
|
7
|
+
tags: string[];
|
|
8
|
+
status: ContentStatus;
|
|
9
|
+
}
|
|
10
|
+
export interface NoteEditorProps {
|
|
11
|
+
initial?: Partial<NoteData>;
|
|
12
|
+
onSave?: (data: NoteData) => void;
|
|
13
|
+
onChange?: (data: NoteData) => void;
|
|
14
|
+
onDiscard?: () => void;
|
|
15
|
+
saving?: boolean;
|
|
16
|
+
className?: string;
|
|
17
|
+
}
|
|
18
|
+
export declare const NoteEditor: React.FC<NoteEditorProps>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { ContentStatus } from "../../admin/ContentEditor/ContentEditor";
|
|
3
|
+
export type { ContentStatus };
|
|
4
|
+
export interface ProjectLink {
|
|
5
|
+
label: string;
|
|
6
|
+
url: string;
|
|
7
|
+
}
|
|
8
|
+
export interface ProjectData {
|
|
9
|
+
title: string;
|
|
10
|
+
slug: string;
|
|
11
|
+
description: string;
|
|
12
|
+
body: string;
|
|
13
|
+
tags: string[];
|
|
14
|
+
links: ProjectLink[];
|
|
15
|
+
status: ContentStatus;
|
|
16
|
+
featured: boolean;
|
|
17
|
+
}
|
|
18
|
+
export interface ProjectEditorProps {
|
|
19
|
+
initial?: Partial<ProjectData>;
|
|
20
|
+
onSave?: (data: ProjectData) => void;
|
|
21
|
+
onChange?: (data: ProjectData) => void;
|
|
22
|
+
onDiscard?: () => void;
|
|
23
|
+
saving?: boolean;
|
|
24
|
+
className?: string;
|
|
25
|
+
}
|
|
26
|
+
export declare const ProjectEditor: React.FC<ProjectEditorProps>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export type AvatarSize = "sm" | "md" | "lg";
|
|
3
|
+
export interface AvatarProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
src?: string;
|
|
5
|
+
name?: string;
|
|
6
|
+
alt?: string;
|
|
7
|
+
size?: AvatarSize;
|
|
8
|
+
}
|
|
9
|
+
export declare const Avatar: React.ForwardRefExoticComponent<AvatarProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export type BadgeTone = "primary" | "accent" | "success" | "warn" | "danger" | "muted";
|
|
3
|
+
export type BadgeSize = "sm" | "md";
|
|
4
|
+
export interface BadgeProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
5
|
+
tone?: BadgeTone;
|
|
6
|
+
size?: BadgeSize;
|
|
7
|
+
leading?: React.ReactNode;
|
|
8
|
+
}
|
|
9
|
+
export declare const Badge: React.ForwardRefExoticComponent<BadgeProps & React.RefAttributes<HTMLSpanElement>>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export type ButtonVariant = "primary" | "secondary" | "accent" | "ghost" | "quiet" | "danger";
|
|
3
|
+
export type ButtonSize = "sm" | "md" | "lg";
|
|
4
|
+
type ButtonBaseProps = {
|
|
5
|
+
variant?: ButtonVariant;
|
|
6
|
+
size?: ButtonSize;
|
|
7
|
+
pressed?: boolean;
|
|
8
|
+
loading?: boolean;
|
|
9
|
+
fullWidth?: boolean;
|
|
10
|
+
className?: string;
|
|
11
|
+
children?: React.ReactNode;
|
|
12
|
+
};
|
|
13
|
+
type ButtonElementProps = ButtonBaseProps & Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, keyof ButtonBaseProps | "href"> & {
|
|
14
|
+
href?: never;
|
|
15
|
+
};
|
|
16
|
+
type AnchorElementProps = ButtonBaseProps & Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, keyof ButtonBaseProps | "type"> & {
|
|
17
|
+
href: string;
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
type?: never;
|
|
20
|
+
};
|
|
21
|
+
export type ButtonProps = ButtonElementProps | AnchorElementProps;
|
|
22
|
+
export declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement | HTMLAnchorElement>>;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface CheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "type" | "onChange"> {
|
|
3
|
+
error?: boolean;
|
|
4
|
+
label?: React.ReactNode;
|
|
5
|
+
description?: React.ReactNode;
|
|
6
|
+
strikethrough?: boolean;
|
|
7
|
+
onCheckedChange?: (checked: boolean, event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
8
|
+
onChange?: (checked: boolean) => void;
|
|
9
|
+
}
|
|
10
|
+
export interface CheckboxControlProps extends Omit<CheckboxProps, "label" | "description" | "strikethrough" | "children"> {
|
|
11
|
+
}
|
|
12
|
+
export declare const CheckboxControl: React.ForwardRefExoticComponent<CheckboxControlProps & React.RefAttributes<HTMLInputElement>>;
|
|
13
|
+
export declare const CheckboxField: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLInputElement>>;
|
|
14
|
+
export declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface DropdownMenuItem {
|
|
3
|
+
label: React.ReactNode;
|
|
4
|
+
value: string;
|
|
5
|
+
href?: string;
|
|
6
|
+
target?: string;
|
|
7
|
+
rel?: string;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
destructive?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export interface DropdownMenuProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, "onSelect"> {
|
|
12
|
+
label: React.ReactNode;
|
|
13
|
+
items: DropdownMenuItem[];
|
|
14
|
+
onSelect?: (value: string, item: DropdownMenuItem) => void;
|
|
15
|
+
align?: "start" | "end";
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
menuLabel?: string;
|
|
18
|
+
menuRole?: "menu" | "listbox";
|
|
19
|
+
selectedValue?: string;
|
|
20
|
+
triggerId?: string;
|
|
21
|
+
triggerClassName?: string;
|
|
22
|
+
menuClassName?: string;
|
|
23
|
+
triggerProps?: Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "children" | "className" | "disabled" | "type">;
|
|
24
|
+
}
|
|
25
|
+
export declare const DropdownMenu: React.FC<DropdownMenuProps>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { type GlyphName } from "../../../foundations/glyphs/catalog";
|
|
3
|
+
export type { GlyphName };
|
|
4
|
+
export type GlyphTone = "primary" | "accent" | "danger" | "muted" | "inherit";
|
|
5
|
+
export interface GlyphProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
6
|
+
char?: string;
|
|
7
|
+
name?: GlyphName | string;
|
|
8
|
+
size?: number | string;
|
|
9
|
+
tone?: GlyphTone;
|
|
10
|
+
boxed?: boolean;
|
|
11
|
+
label?: string;
|
|
12
|
+
decorative?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export declare const Glyph: React.FC<GlyphProps>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export type HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;
|
|
3
|
+
export type HeadingGlyphPosition = "start" | "end";
|
|
4
|
+
export interface HeadingProps extends React.HTMLAttributes<HTMLHeadingElement> {
|
|
5
|
+
level?: HeadingLevel;
|
|
6
|
+
as?: keyof JSX.IntrinsicElements;
|
|
7
|
+
glyph?: React.ReactNode;
|
|
8
|
+
glyphPosition?: HeadingGlyphPosition;
|
|
9
|
+
children?: React.ReactNode;
|
|
10
|
+
}
|
|
11
|
+
export declare const Heading: React.FC<HeadingProps>;
|
|
12
|
+
export declare const H1: React.FC<Omit<HeadingProps, "level">>;
|
|
13
|
+
export declare const H2: React.FC<Omit<HeadingProps, "level">>;
|
|
14
|
+
export declare const H3: React.FC<Omit<HeadingProps, "level">>;
|
|
15
|
+
export declare const H4: React.FC<Omit<HeadingProps, "level">>;
|
|
16
|
+
export declare const H5: React.FC<Omit<HeadingProps, "level">>;
|
|
17
|
+
export declare const H6: React.FC<Omit<HeadingProps, "level">>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Hr } from "./Hr";
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { DataAttributes } from "../primitive";
|
|
3
|
+
type FieldState = "default" | "error" | "success";
|
|
4
|
+
export type InputVariant = "default" | "terminal";
|
|
5
|
+
export type InputSize = "sm" | "md" | "lg";
|
|
6
|
+
export interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "size"> {
|
|
7
|
+
label?: React.ReactNode;
|
|
8
|
+
helpText?: React.ReactNode;
|
|
9
|
+
error?: React.ReactNode;
|
|
10
|
+
prompt?: string;
|
|
11
|
+
command?: React.ReactNode;
|
|
12
|
+
cursor?: boolean;
|
|
13
|
+
size?: InputSize;
|
|
14
|
+
variant?: InputVariant;
|
|
15
|
+
state?: FieldState;
|
|
16
|
+
inputClassName?: string;
|
|
17
|
+
rootProps?: React.HTMLAttributes<HTMLLabelElement> & DataAttributes;
|
|
18
|
+
onValueChange?: (value: string, event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
19
|
+
}
|
|
20
|
+
export interface InputControlProps extends Omit<InputProps, "label" | "helpText" | "error" | "rootProps" | "state"> {
|
|
21
|
+
}
|
|
22
|
+
export declare const InputControl: React.ForwardRefExoticComponent<InputControlProps & React.RefAttributes<HTMLInputElement>>;
|
|
23
|
+
export declare const InputField: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
|
|
24
|
+
export declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
|
|
25
|
+
export interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
26
|
+
label?: React.ReactNode;
|
|
27
|
+
helpText?: React.ReactNode;
|
|
28
|
+
error?: React.ReactNode;
|
|
29
|
+
cursor?: boolean;
|
|
30
|
+
size?: InputSize;
|
|
31
|
+
state?: FieldState;
|
|
32
|
+
textareaClassName?: string;
|
|
33
|
+
rootProps?: React.HTMLAttributes<HTMLLabelElement> & DataAttributes;
|
|
34
|
+
onValueChange?: (value: string, event: React.ChangeEvent<HTMLTextAreaElement>) => void;
|
|
35
|
+
}
|
|
36
|
+
export interface TextareaControlProps extends Omit<TextareaProps, "label" | "helpText" | "error" | "rootProps" | "state"> {
|
|
37
|
+
}
|
|
38
|
+
export declare const TextareaControl: React.ForwardRefExoticComponent<TextareaControlProps & React.RefAttributes<HTMLTextAreaElement>>;
|
|
39
|
+
export declare const TextareaField: React.ForwardRefExoticComponent<TextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
|
|
40
|
+
export declare const Textarea: React.ForwardRefExoticComponent<TextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
|
|
41
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export type KbdVariant = "default" | "accent" | "muted";
|
|
3
|
+
export interface KbdProps extends React.HTMLAttributes<HTMLElement> {
|
|
4
|
+
variant?: KbdVariant;
|
|
5
|
+
}
|
|
6
|
+
export declare const Kbd: React.ForwardRefExoticComponent<KbdProps & React.RefAttributes<HTMLElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Kbd";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./Link.scss";
|
|
3
|
+
export interface LinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
4
|
+
external?: boolean;
|
|
5
|
+
}
|
|
6
|
+
declare const Link: React.ForwardRefExoticComponent<LinkProps & React.RefAttributes<HTMLAnchorElement>>;
|
|
7
|
+
export default Link;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface ProgressBarProps {
|
|
3
|
+
value: number;
|
|
4
|
+
total?: number;
|
|
5
|
+
label?: React.ReactNode;
|
|
6
|
+
showPercent?: boolean;
|
|
7
|
+
current?: boolean;
|
|
8
|
+
segments?: number;
|
|
9
|
+
slim?: boolean;
|
|
10
|
+
meta?: React.ReactNode;
|
|
11
|
+
className?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare const ProgressBar: React.FC<ProgressBarProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./ReadingRail";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export type StatPillColor = "phosphor" | "magenta" | "dim";
|
|
3
|
+
export interface StatPillProps {
|
|
4
|
+
label: string;
|
|
5
|
+
value: React.ReactNode;
|
|
6
|
+
color?: StatPillColor;
|
|
7
|
+
className?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const StatPill: React.FC<StatPillProps>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export type TagColor = "phosphor" | "magenta" | "dim";
|
|
3
|
+
type TagBaseProps = {
|
|
4
|
+
color?: TagColor;
|
|
5
|
+
count?: number;
|
|
6
|
+
hover?: boolean;
|
|
7
|
+
removable?: boolean;
|
|
8
|
+
onRemove?: () => void;
|
|
9
|
+
};
|
|
10
|
+
type TagSpanProps = TagBaseProps & React.HTMLAttributes<HTMLSpanElement> & {
|
|
11
|
+
href?: never;
|
|
12
|
+
};
|
|
13
|
+
type TagAnchorProps = TagBaseProps & React.AnchorHTMLAttributes<HTMLAnchorElement> & {
|
|
14
|
+
href: string;
|
|
15
|
+
};
|
|
16
|
+
export type TagProps = TagSpanProps | TagAnchorProps;
|
|
17
|
+
export declare const Tag: React.ForwardRefExoticComponent<TagProps & React.RefAttributes<HTMLAnchorElement | HTMLSpanElement>>;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { TypographyVariant } from "../../../foundations/typography/variants";
|
|
3
|
+
export type TextVariant = TypographyVariant;
|
|
4
|
+
export type TextTone = "default" | "primary" | "accent" | "danger" | "muted" | "dim" | "faded";
|
|
5
|
+
export type TextAlign = "start" | "center" | "end";
|
|
6
|
+
export type TextTransform = "none" | "uppercase" | "lowercase" | "capitalize";
|
|
7
|
+
export interface TextProps extends React.HTMLAttributes<HTMLElement> {
|
|
8
|
+
variant?: TextVariant;
|
|
9
|
+
as?: keyof JSX.IntrinsicElements;
|
|
10
|
+
tone?: TextTone;
|
|
11
|
+
align?: TextAlign;
|
|
12
|
+
transform?: TextTransform;
|
|
13
|
+
truncate?: boolean;
|
|
14
|
+
balance?: boolean;
|
|
15
|
+
nowrap?: boolean;
|
|
16
|
+
}
|
|
17
|
+
declare const Text: React.ForwardRefExoticComponent<TextProps & React.RefAttributes<HTMLElement>>;
|
|
18
|
+
export default Text;
|