@gogitcms/design-system 0.16.0-next.13 → 0.16.0-next.15
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/README.md +6 -4
- package/css/tokens.css +1 -0
- package/package.json +2 -2
- package/src/__tests__/BranchMenu.test.tsx +38 -0
- package/src/__tests__/ContentBrowser.changes.test.tsx +23 -14
- package/src/__tests__/ContentBrowser.contentslot.test.tsx +10 -6
- package/src/__tests__/ContentBrowser.expand.test.tsx +170 -0
- package/src/__tests__/ContentBrowser.forms.test.tsx +25 -20
- package/src/__tests__/ContentBrowser.listrow.test.tsx +57 -0
- package/src/__tests__/ContentBrowser.master.test.tsx +147 -0
- package/src/__tests__/ContentBrowser.reorder.test.tsx +2 -3
- package/src/__tests__/ContentBrowser.window.test.tsx +203 -0
- package/src/__tests__/MediaBrowser.test.tsx +15 -9
- package/src/__tests__/ProtectedBranchModal.test.tsx +14 -0
- package/src/__tests__/cssTokens.test.ts +1 -0
- package/src/__tests__/documentDrafts.test.ts +59 -0
- package/src/components/BranchMenu.tsx +14 -4
- package/src/components/ContentBrowser.tsx +561 -445
- package/src/components/Input.tsx +37 -5
- package/src/components/Notifications.tsx +1 -1
- package/src/components/ProjectMenu.tsx +100 -26
- package/src/components/ProtectedBranchModal.tsx +19 -7
- package/src/components/Skeleton.tsx +12 -19
- package/src/components/WorkspaceMenu.tsx +162 -0
- package/src/components/documentDrafts.ts +19 -4
- package/src/components/layout.tsx +33 -1
- package/src/history.ts +1 -1
- package/src/icons.ts +5 -0
- package/src/index.ts +4 -1
- package/src/theme.ts +3 -1
package/src/history.ts
CHANGED
|
@@ -29,7 +29,7 @@ export type DocumentVersion = {
|
|
|
29
29
|
* split MediaApi and FormsApi use: the DS owns the version browser's UI and its
|
|
30
30
|
* (ephemeral) open/selected state, the host owns fetching. Omitting it from
|
|
31
31
|
* ContentBrowser hides the history affordance entirely, which is what a
|
|
32
|
-
* deployment with no provider
|
|
32
|
+
* deployment with no provider (local mode) should look like.
|
|
33
33
|
*/
|
|
34
34
|
export interface HistoryApi {
|
|
35
35
|
/**
|
package/src/icons.ts
CHANGED
|
@@ -47,6 +47,11 @@ export const icons = {
|
|
|
47
47
|
copy: ["M10 8h10a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H10a2 2 0 0 1-2-2V10a2 2 0 0 1 2-2Z", "M4 16a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2"],
|
|
48
48
|
lock: ["M5 11h14a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-6a2 2 0 0 1 2-2Z", "M7 11V7a5 5 0 0 1 10 0v4"],
|
|
49
49
|
panelLeft: ["M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2Z", "M9 3v18"],
|
|
50
|
+
// Corner arrows (maximize/minimize): the pair the markdown editor already
|
|
51
|
+
// draws for its focus mode, so "take over the screen" reads the same whether
|
|
52
|
+
// it is a field or a whole pane doing it.
|
|
53
|
+
maximize: ["M15 3h6v6", "M9 21H3v-6", "m21 3-7 7", "m3 21 7-7"],
|
|
54
|
+
minimize: ["M4 14h6v6", "M20 10h-6V4", "m14 10 7-7", "m3 21 7-7"],
|
|
50
55
|
more: ["M12 13a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z", "M19 13a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z", "M5 13a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"],
|
|
51
56
|
gripVertical: [
|
|
52
57
|
"M9 6a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z", "M9 13a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z", "M9 20a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z",
|
package/src/index.ts
CHANGED
|
@@ -43,7 +43,9 @@ export type { SegmentProps, SegmentItem } from "./components/Segment";
|
|
|
43
43
|
export { BranchMenu } from "./components/BranchMenu";
|
|
44
44
|
export type { BranchMenuProps, BranchRef } from "./components/BranchMenu";
|
|
45
45
|
export { ProjectMenu } from "./components/ProjectMenu";
|
|
46
|
-
export type { ProjectMenuProps, ProjectRef } from "./components/ProjectMenu";
|
|
46
|
+
export type { ProjectMenuProps, ProjectRef, ProjectMenuAction } from "./components/ProjectMenu";
|
|
47
|
+
export { WorkspaceMenu, workspaceInitials } from "./components/WorkspaceMenu";
|
|
48
|
+
export type { WorkspaceMenuProps, WorkspaceRef, WorkspaceMenuAction } from "./components/WorkspaceMenu";
|
|
47
49
|
|
|
48
50
|
// Apply changes (merge) progress modal
|
|
49
51
|
export { ApplyChangesModal } from "./components/ApplyChangesModal";
|
|
@@ -134,6 +136,7 @@ export {
|
|
|
134
136
|
MobileScreen,
|
|
135
137
|
ThemeToggle,
|
|
136
138
|
} from "./components/layout";
|
|
139
|
+
export type { WindowChrome } from "./components/layout";
|
|
137
140
|
|
|
138
141
|
// Media: the picker control, its previews, and the host data seam
|
|
139
142
|
export { MediaField, MediaPicker, MediaProvider, DocumentPathProvider, useMediaApi, useFieldMedia, pathForStoreAs } from "./components/MediaField";
|
package/src/theme.ts
CHANGED
|
@@ -81,7 +81,9 @@ export function makeTheme(mode: ThemeMode) {
|
|
|
81
81
|
space: (n: number) => n * 4,
|
|
82
82
|
radius: { sm: 3, md: 5, lg: 8, pill: 999 },
|
|
83
83
|
control: { sm: 28, md: 34, lg: 40 },
|
|
84
|
-
|
|
84
|
+
// `master` is the editor's master pane (sections at rest, a collection's
|
|
85
|
+
// entries pushed in): wide enough for a two-line entry row.
|
|
86
|
+
layout: { sidebar: 260, master: 340, column: 300, topbar: 48, container: 1200 },
|
|
85
87
|
font: { sans: fontSans, mono: fontMono },
|
|
86
88
|
type: {
|
|
87
89
|
display: { size: 40, line: 44 },
|