superdesk-ui-framework 3.1.5 → 3.1.6
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/app/styles/_helpers.scss +317 -151
- package/app/styles/design-tokens/_design-tokens-general.scss +18 -7
- package/app/styles/design-tokens/_new-colors.scss +6 -1
- package/app/styles/grids/_grid-layout.scss +1 -0
- package/app/styles/interface-elements/_side-panel.scss +4 -0
- package/app-typescript/components/IconPicker.tsx +1 -1
- package/{examples/pages/react → dist/components}/Index.tsx +81 -63
- package/dist/components/utilities/SpacingUtilities.tsx +774 -0
- package/dist/components/utilities/TextUtilities.tsx +428 -0
- package/dist/components.html +6 -27
- package/dist/{components → components_deprecated}/text.html +7 -7
- package/dist/components_deprecated.html +38 -0
- package/dist/design/buttons.html +1 -11
- package/dist/design/checkbox-and-radio.html +3 -3
- package/dist/design/layout-principles.html +0 -1
- package/dist/design/switch.html +0 -10
- package/dist/design-patterns/Index.tsx +86 -0
- package/dist/design-patterns/ThreePaneLayoutPattern.tsx +362 -0
- package/{examples/pages/react.html → dist/design-patterns.html} +3 -4
- package/dist/design.html +4 -4
- package/dist/examples.bundle.css +106 -20
- package/dist/examples.bundle.js +3195 -1443
- package/dist/main.html +17 -15
- package/dist/playgrounds/boxed-list.html +7 -7
- package/dist/playgrounds/master-desk.html +4 -4
- package/dist/playgrounds/photo-snippets/edit-photo-metadata.html +1 -1
- package/dist/playgrounds/planning-snippets/edit-planning.html +1 -1
- package/dist/playgrounds/planning.html +1 -1
- package/dist/playgrounds/publisher-content-analytics.html +25 -25
- package/dist/playgrounds/react-playgrounds/TestGround.tsx +3 -3
- package/dist/playgrounds/video-editor.html +1 -1
- package/dist/playgrounds.html +3 -6
- package/dist/superdesk-ui.bundle.css +314 -119
- package/dist/superdesk-ui.bundle.js +105 -101
- package/examples/css/docs-page.css +106 -20
- package/examples/index.js +89 -89
- package/examples/js/doc.js +16 -2
- package/examples/js/react.js +122 -19
- package/{dist/react → examples/pages/components}/Index.tsx +81 -63
- package/examples/pages/components/utilities/SpacingUtilities.tsx +774 -0
- package/examples/pages/components/utilities/TextUtilities.tsx +428 -0
- package/examples/pages/components.html +6 -27
- package/examples/pages/{components → components_deprecated}/text.html +7 -7
- package/examples/pages/components_deprecated.html +38 -0
- package/examples/pages/design/buttons.html +1 -11
- package/examples/pages/design/checkbox-and-radio.html +3 -3
- package/examples/pages/design/layout-principles.html +0 -1
- package/examples/pages/design/switch.html +0 -10
- package/examples/pages/design-patterns/Index.tsx +86 -0
- package/examples/pages/design-patterns/ThreePaneLayoutPattern.tsx +362 -0
- package/{dist/react.html → examples/pages/design-patterns.html} +3 -4
- package/examples/pages/design.html +4 -4
- package/examples/pages/main.html +17 -15
- package/examples/pages/playgrounds/boxed-list.html +7 -7
- package/examples/pages/playgrounds/master-desk.html +4 -4
- package/examples/pages/playgrounds/photo-snippets/edit-photo-metadata.html +1 -1
- package/examples/pages/playgrounds/planning-snippets/edit-planning.html +1 -1
- package/examples/pages/playgrounds/planning.html +1 -1
- package/examples/pages/playgrounds/publisher-content-analytics.html +25 -25
- package/examples/pages/playgrounds/react-playgrounds/TestGround.tsx +3 -3
- package/examples/pages/playgrounds/video-editor.html +1 -1
- package/examples/pages/playgrounds.html +3 -6
- package/package.json +1 -1
- package/react/components/IconPicker.js +1 -1
- /package/dist/{react → components}/Alerts.tsx +0 -0
- /package/dist/{react → components}/Autocomplete.tsx +0 -0
- /package/dist/{react → components}/Avatar.tsx +0 -0
- /package/dist/{react → components}/Badges.tsx +0 -0
- /package/dist/{react → components}/BigIconFont.tsx +0 -0
- /package/dist/{react → components}/BoxedList.tsx +0 -0
- /package/dist/{react → components}/ButtonGroups.tsx +0 -0
- /package/dist/{react → components}/Buttons.tsx +0 -0
- /package/dist/{react → components}/Carousel.tsx +0 -0
- /package/dist/{react → components}/Checkboxs.tsx +0 -0
- /package/dist/{react → components}/Container.tsx +0 -0
- /package/dist/{react → components}/ContentDivider.tsx +0 -0
- /package/dist/{react → components}/ContentList.tsx +0 -0
- /package/dist/{react → components}/CreateButton.tsx +0 -0
- /package/dist/{react → components}/DatePicker.tsx +0 -0
- /package/dist/{react → components}/DragHandleDocs.tsx +0 -0
- /package/dist/{react → components}/DropZone.tsx +0 -0
- /package/dist/{react → components}/Dropdowns.tsx +0 -0
- /package/dist/{react → components}/DurationInput.tsx +0 -0
- /package/dist/{react → components}/EmptyStates.tsx +0 -0
- /package/dist/{react → components}/GridItem.tsx +0 -0
- /package/dist/{react → components}/GridList.tsx +0 -0
- /package/dist/{react → components}/Heading.tsx +0 -0
- /package/dist/{react → components}/IconButtons.tsx +0 -0
- /package/dist/{react → components}/IconFont.tsx +0 -0
- /package/dist/{react → components}/IconLabels.tsx +0 -0
- /package/dist/{react → components}/IconPicker.tsx +0 -0
- /package/dist/{react → components}/IllustrationButton.tsx +0 -0
- /package/dist/{react → components}/Inputs.tsx +0 -0
- /package/dist/{react → components}/Labels.tsx +0 -0
- /package/dist/{react → components}/LeftNavigations.tsx +0 -0
- /package/dist/{react → components}/ListItems.tsx +0 -0
- /package/dist/{react → components}/Menu.tsx +0 -0
- /package/dist/{react → components}/Modal.tsx +0 -0
- /package/dist/{react → components}/MultiSelect.tsx +0 -0
- /package/dist/{react → components}/NavButtons.tsx +0 -0
- /package/dist/{react → components}/Panel.tsx +0 -0
- /package/dist/{react → components}/Popover.tsx +0 -0
- /package/dist/{react → components}/QuickNavigationBar.tsx +0 -0
- /package/dist/{react → components}/RadioGroup.tsx +0 -0
- /package/dist/{react → components}/ResizablePanels.tsx +0 -0
- /package/dist/{react → components}/SelectGrid.tsx +0 -0
- /package/dist/{react → components}/SelectWithTemplate.tsx +0 -0
- /package/dist/{react → components}/Selects.tsx +0 -0
- /package/dist/{react → components}/SimpleList.tsx +0 -0
- /package/dist/{react → components}/SubNav.tsx +0 -0
- /package/dist/{react → components}/Switch.tsx +0 -0
- /package/dist/{react → components}/TableList.tsx +0 -0
- /package/dist/{react → components}/Tabs.tsx +0 -0
- /package/dist/{react → components}/TagInputDocs.tsx +0 -0
- /package/dist/{react → components}/Tags.tsx +0 -0
- /package/dist/{react → components}/Text.tsx +0 -0
- /package/dist/{react → components}/TimePicker.tsx +0 -0
- /package/dist/{react → components}/Toasts.tsx +0 -0
- /package/dist/{react → components}/Togglebox.tsx +0 -0
- /package/dist/{react → components}/Tooltips.tsx +0 -0
- /package/dist/{react → components}/TreeMenu.tsx +0 -0
- /package/dist/{react → components}/TreeSelect.tsx +0 -0
- /package/dist/{react → components}/WithPaginationDocs.tsx +0 -0
- /package/dist/{react → components}/WithSizeObserver.tsx +0 -0
- /package/dist/{react → components}/tree-select/TreeSelect.tsx +0 -0
- /package/dist/{react → components}/tree-select/example-1.tsx +0 -0
- /package/dist/{react → components}/tree-select/example-2.tsx +0 -0
- /package/dist/{components → components_deprecated}/alerts.html +0 -0
- /package/dist/{components → components_deprecated}/badge.html +0 -0
- /package/dist/{components → components_deprecated}/basic-grid.html +0 -0
- /package/dist/{components → components_deprecated}/big-icons.html +0 -0
- /package/dist/{components → components_deprecated}/buttons.html +0 -0
- /package/dist/{components → components_deprecated}/carousel.html +0 -0
- /package/dist/{components → components_deprecated}/checkbox.html +0 -0
- /package/dist/{components → components_deprecated}/colors.html +0 -0
- /package/dist/{components → components_deprecated}/dropdown.html +0 -0
- /package/dist/{components → components_deprecated}/form-layout.html +0 -0
- /package/dist/{components → components_deprecated}/icon-labels.html +0 -0
- /package/dist/{components → components_deprecated}/icons.html +0 -0
- /package/dist/{components → components_deprecated}/input.html +0 -0
- /package/dist/{components → components_deprecated}/labels.html +0 -0
- /package/dist/{components → components_deprecated}/layout-grid.html +0 -0
- /package/dist/{components → components_deprecated}/left-nav.html +0 -0
- /package/dist/{components → components_deprecated}/list-item.html +0 -0
- /package/dist/{components → components_deprecated}/loader.html +0 -0
- /package/dist/{components → components_deprecated}/modal-template.html +0 -0
- /package/dist/{components → components_deprecated}/modals.html +0 -0
- /package/dist/{components → components_deprecated}/other-elements.html +0 -0
- /package/dist/{components → components_deprecated}/panel-info.html +0 -0
- /package/dist/{components → components_deprecated}/radio.html +0 -0
- /package/dist/{components → components_deprecated}/select.html +0 -0
- /package/dist/{components → components_deprecated}/shadows.html +0 -0
- /package/dist/{components → components_deprecated}/sidebar-menu.html +0 -0
- /package/dist/{components → components_deprecated}/simple-list.html +0 -0
- /package/dist/{components → components_deprecated}/slider.html +0 -0
- /package/dist/{components → components_deprecated}/spacing.html +0 -0
- /package/dist/{components → components_deprecated}/switch.html +0 -0
- /package/dist/{components → components_deprecated}/tables.html +0 -0
- /package/dist/{components → components_deprecated}/tabs.html +0 -0
- /package/dist/{components → components_deprecated}/tag-input.html +0 -0
- /package/dist/{components → components_deprecated}/tag-labels.html +0 -0
- /package/dist/{components → components_deprecated}/toggle.html +0 -0
- /package/dist/{components → components_deprecated}/tooltips.html +0 -0
- /package/dist/{components → components_deprecated}/vertical-tabs.html +0 -0
- /package/dist/{components → components_deprecated}/wizard.html +0 -0
- /package/examples/pages/{react → components}/Alerts.tsx +0 -0
- /package/examples/pages/{react → components}/Autocomplete.tsx +0 -0
- /package/examples/pages/{react → components}/Avatar.tsx +0 -0
- /package/examples/pages/{react → components}/Badges.tsx +0 -0
- /package/examples/pages/{react → components}/BigIconFont.tsx +0 -0
- /package/examples/pages/{react → components}/BoxedList.tsx +0 -0
- /package/examples/pages/{react → components}/ButtonGroups.tsx +0 -0
- /package/examples/pages/{react → components}/Buttons.tsx +0 -0
- /package/examples/pages/{react → components}/Carousel.tsx +0 -0
- /package/examples/pages/{react → components}/Checkboxs.tsx +0 -0
- /package/examples/pages/{react → components}/Container.tsx +0 -0
- /package/examples/pages/{react → components}/ContentDivider.tsx +0 -0
- /package/examples/pages/{react → components}/ContentList.tsx +0 -0
- /package/examples/pages/{react → components}/CreateButton.tsx +0 -0
- /package/examples/pages/{react → components}/DatePicker.tsx +0 -0
- /package/examples/pages/{react → components}/DragHandleDocs.tsx +0 -0
- /package/examples/pages/{react → components}/DropZone.tsx +0 -0
- /package/examples/pages/{react → components}/Dropdowns.tsx +0 -0
- /package/examples/pages/{react → components}/DurationInput.tsx +0 -0
- /package/examples/pages/{react → components}/EmptyStates.tsx +0 -0
- /package/examples/pages/{react → components}/GridItem.tsx +0 -0
- /package/examples/pages/{react → components}/GridList.tsx +0 -0
- /package/examples/pages/{react → components}/Heading.tsx +0 -0
- /package/examples/pages/{react → components}/IconButtons.tsx +0 -0
- /package/examples/pages/{react → components}/IconFont.tsx +0 -0
- /package/examples/pages/{react → components}/IconLabels.tsx +0 -0
- /package/examples/pages/{react → components}/IconPicker.tsx +0 -0
- /package/examples/pages/{react → components}/IllustrationButton.tsx +0 -0
- /package/examples/pages/{react → components}/Inputs.tsx +0 -0
- /package/examples/pages/{react → components}/Labels.tsx +0 -0
- /package/examples/pages/{react → components}/LeftNavigations.tsx +0 -0
- /package/examples/pages/{react → components}/ListItems.tsx +0 -0
- /package/examples/pages/{react → components}/Menu.tsx +0 -0
- /package/examples/pages/{react → components}/Modal.tsx +0 -0
- /package/examples/pages/{react → components}/MultiSelect.tsx +0 -0
- /package/examples/pages/{react → components}/NavButtons.tsx +0 -0
- /package/examples/pages/{react → components}/Panel.tsx +0 -0
- /package/examples/pages/{react → components}/Popover.tsx +0 -0
- /package/examples/pages/{react → components}/QuickNavigationBar.tsx +0 -0
- /package/examples/pages/{react → components}/RadioGroup.tsx +0 -0
- /package/examples/pages/{react → components}/ResizablePanels.tsx +0 -0
- /package/examples/pages/{react → components}/SelectGrid.tsx +0 -0
- /package/examples/pages/{react → components}/SelectWithTemplate.tsx +0 -0
- /package/examples/pages/{react → components}/Selects.tsx +0 -0
- /package/examples/pages/{react → components}/SimpleList.tsx +0 -0
- /package/examples/pages/{react → components}/SubNav.tsx +0 -0
- /package/examples/pages/{react → components}/Switch.tsx +0 -0
- /package/examples/pages/{react → components}/TableList.tsx +0 -0
- /package/examples/pages/{react → components}/Tabs.tsx +0 -0
- /package/examples/pages/{react → components}/TagInputDocs.tsx +0 -0
- /package/examples/pages/{react → components}/Tags.tsx +0 -0
- /package/examples/pages/{react → components}/Text.tsx +0 -0
- /package/examples/pages/{react → components}/TimePicker.tsx +0 -0
- /package/examples/pages/{react → components}/Toasts.tsx +0 -0
- /package/examples/pages/{react → components}/Togglebox.tsx +0 -0
- /package/examples/pages/{react → components}/Tooltips.tsx +0 -0
- /package/examples/pages/{react → components}/TreeMenu.tsx +0 -0
- /package/examples/pages/{react → components}/TreeSelect.tsx +0 -0
- /package/examples/pages/{react → components}/WithPaginationDocs.tsx +0 -0
- /package/examples/pages/{react → components}/WithSizeObserver.tsx +0 -0
- /package/examples/pages/{react → components}/tree-select/TreeSelect.tsx +0 -0
- /package/examples/pages/{react → components}/tree-select/example-1.tsx +0 -0
- /package/examples/pages/{react → components}/tree-select/example-2.tsx +0 -0
- /package/examples/pages/{components → components_deprecated}/alerts.html +0 -0
- /package/examples/pages/{components → components_deprecated}/badge.html +0 -0
- /package/examples/pages/{components → components_deprecated}/basic-grid.html +0 -0
- /package/examples/pages/{components → components_deprecated}/big-icons.html +0 -0
- /package/examples/pages/{components → components_deprecated}/buttons.html +0 -0
- /package/examples/pages/{components → components_deprecated}/carousel.html +0 -0
- /package/examples/pages/{components → components_deprecated}/checkbox.html +0 -0
- /package/examples/pages/{components → components_deprecated}/colors.html +0 -0
- /package/examples/pages/{components → components_deprecated}/dropdown.html +0 -0
- /package/examples/pages/{components → components_deprecated}/form-layout.html +0 -0
- /package/examples/pages/{components → components_deprecated}/icon-labels.html +0 -0
- /package/examples/pages/{components → components_deprecated}/icons.html +0 -0
- /package/examples/pages/{components → components_deprecated}/input.html +0 -0
- /package/examples/pages/{components → components_deprecated}/labels.html +0 -0
- /package/examples/pages/{components → components_deprecated}/layout-grid.html +0 -0
- /package/examples/pages/{components → components_deprecated}/left-nav.html +0 -0
- /package/examples/pages/{components → components_deprecated}/list-item.html +0 -0
- /package/examples/pages/{components → components_deprecated}/loader.html +0 -0
- /package/examples/pages/{components → components_deprecated}/modal-template.html +0 -0
- /package/examples/pages/{components → components_deprecated}/modals.html +0 -0
- /package/examples/pages/{components → components_deprecated}/other-elements.html +0 -0
- /package/examples/pages/{components → components_deprecated}/panel-info.html +0 -0
- /package/examples/pages/{components → components_deprecated}/radio.html +0 -0
- /package/examples/pages/{components → components_deprecated}/select.html +0 -0
- /package/examples/pages/{components → components_deprecated}/shadows.html +0 -0
- /package/examples/pages/{components → components_deprecated}/sidebar-menu.html +0 -0
- /package/examples/pages/{components → components_deprecated}/simple-list.html +0 -0
- /package/examples/pages/{components → components_deprecated}/slider.html +0 -0
- /package/examples/pages/{components → components_deprecated}/spacing.html +0 -0
- /package/examples/pages/{components → components_deprecated}/switch.html +0 -0
- /package/examples/pages/{components → components_deprecated}/tables.html +0 -0
- /package/examples/pages/{components → components_deprecated}/tabs.html +0 -0
- /package/examples/pages/{components → components_deprecated}/tag-input.html +0 -0
- /package/examples/pages/{components → components_deprecated}/tag-labels.html +0 -0
- /package/examples/pages/{components → components_deprecated}/toggle.html +0 -0
- /package/examples/pages/{components → components_deprecated}/tooltips.html +0 -0
- /package/examples/pages/{components → components_deprecated}/vertical-tabs.html +0 -0
- /package/examples/pages/{components → components_deprecated}/wizard.html +0 -0
@@ -0,0 +1,86 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
|
3
|
+
import { ReactNav, PatternsDefault } from '../../js/react';
|
4
|
+
import { Dropdown } from '../../../app-typescript/index';
|
5
|
+
|
6
|
+
import {
|
7
|
+
Switch,
|
8
|
+
Route,
|
9
|
+
} from "react-router-dom";
|
10
|
+
|
11
|
+
import { ThreePaneLayoutPattern } from './ThreePaneLayoutPattern';
|
12
|
+
|
13
|
+
const pages = {
|
14
|
+
basicComponents: {
|
15
|
+
name: 'Layout',
|
16
|
+
items: {
|
17
|
+
'three-pane-layout': {
|
18
|
+
name: 'Three Pane Layout',
|
19
|
+
},
|
20
|
+
// 'icon-buttons': {
|
21
|
+
// name: 'Icon Buttons'
|
22
|
+
// },
|
23
|
+
// 'button-groups': {
|
24
|
+
// name: 'Button Group & Divider'
|
25
|
+
// },
|
26
|
+
}
|
27
|
+
},
|
28
|
+
}
|
29
|
+
interface IProps {
|
30
|
+
theme?: string;
|
31
|
+
}
|
32
|
+
interface IState {
|
33
|
+
theme: 'dark-ui' | 'light-ui' | string;
|
34
|
+
}
|
35
|
+
class DesignPatternsDoc extends React.Component<IProps, IState> {
|
36
|
+
constructor(props: IProps) {
|
37
|
+
super(props);
|
38
|
+
this.state = {
|
39
|
+
theme: 'light-ui',
|
40
|
+
}
|
41
|
+
this.handleTheme = this.handleTheme.bind(this);
|
42
|
+
}
|
43
|
+
handleTheme(newTheme: string) {
|
44
|
+
document.body.setAttribute('data-theme', newTheme);
|
45
|
+
|
46
|
+
this.setState({
|
47
|
+
theme: newTheme
|
48
|
+
})
|
49
|
+
}
|
50
|
+
|
51
|
+
checkTheme(theme: string) {
|
52
|
+
return this.state.theme === theme;
|
53
|
+
}
|
54
|
+
render() {
|
55
|
+
return (
|
56
|
+
<React.Fragment>
|
57
|
+
<ReactNav pages={pages} base="design-patterns" />
|
58
|
+
<main className="docs-page__content docs-page__container-fluid">
|
59
|
+
<div className="docs-page__fla-button-container">
|
60
|
+
<Dropdown
|
61
|
+
items={[
|
62
|
+
{
|
63
|
+
type: 'group', label: 'Chose a theme', items: [
|
64
|
+
'divider',
|
65
|
+
{ label: 'Light', icon: 'adjust', active: this.checkTheme('light-ui'), onSelect: () => this.handleTheme('light-ui') },
|
66
|
+
{ label: 'Dark', icon: 'adjust', active: this.checkTheme('dark-ui'), onSelect: () => this.handleTheme('dark-ui') },
|
67
|
+
{ label: 'Accessible Light', active: this.checkTheme('accessible-light-ui'), icon: 'adjust', onSelect: () => this.handleTheme('accessible-light-ui') },
|
68
|
+
]
|
69
|
+
},
|
70
|
+
]}>
|
71
|
+
<button className="docs-page__fla-button" aria-label="Change theme" onClick={() => false}>
|
72
|
+
<i className="icon-adjust"></i>
|
73
|
+
</button>
|
74
|
+
</Dropdown>
|
75
|
+
</div>
|
76
|
+
<Switch>
|
77
|
+
<Route path="/design-patterns/three-pane-layout" component={ThreePaneLayoutPattern} />
|
78
|
+
<Route path="/" component={PatternsDefault} />
|
79
|
+
</Switch>
|
80
|
+
</main>
|
81
|
+
</React.Fragment>
|
82
|
+
)
|
83
|
+
}
|
84
|
+
}
|
85
|
+
|
86
|
+
export { DesignPatternsDoc };
|
@@ -0,0 +1,362 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
import * as Markup from '../../js/react';
|
3
|
+
import { Prop, PropsList } from '../../../app-typescript';
|
4
|
+
import { ButtonGroup, Button, NavButton, SubNav, Dropdown, Icon, IconButton, Checkbox, GridList, Badge, Divider, BoxedList, BoxedListItem, EmptyState, Tooltip, Heading, Container, Label } from '../../../app-typescript/index';
|
5
|
+
import * as Layout from '../../../app-typescript/components/Layouts';
|
6
|
+
|
7
|
+
interface IProps {
|
8
|
+
children?: React.ReactNode;
|
9
|
+
}
|
10
|
+
|
11
|
+
interface IState {
|
12
|
+
theme: 'dark' | 'light' | string;
|
13
|
+
itemType: string;
|
14
|
+
dropDownState: string;
|
15
|
+
itemSelected1: boolean;
|
16
|
+
itemSelected2: boolean;
|
17
|
+
itemSelected3: boolean;
|
18
|
+
value1: boolean;
|
19
|
+
leftPanelOpen: boolean;
|
20
|
+
rightPanelOpen: boolean;
|
21
|
+
}
|
22
|
+
|
23
|
+
|
24
|
+
class ThreePaneLayoutPattern extends React.Component<IProps, IState> {
|
25
|
+
constructor(props: IProps) {
|
26
|
+
super(props);
|
27
|
+
this.state = {
|
28
|
+
theme: 'light',
|
29
|
+
itemType: 'itemtype01',
|
30
|
+
dropDownState: '',
|
31
|
+
itemSelected1: false,
|
32
|
+
itemSelected2: false,
|
33
|
+
itemSelected3: false,
|
34
|
+
value1: false,
|
35
|
+
leftPanelOpen: false,
|
36
|
+
rightPanelOpen: false,
|
37
|
+
}
|
38
|
+
}
|
39
|
+
|
40
|
+
changeStatus(item: any, status: string) {
|
41
|
+
if (item.status.includes(status)) {
|
42
|
+
item.status.splice(item.status.indexOf(status), 1);
|
43
|
+
} else {
|
44
|
+
item.status.push(status);
|
45
|
+
}
|
46
|
+
}
|
47
|
+
|
48
|
+
render() {
|
49
|
+
return (
|
50
|
+
<section className='docs-page__container'>
|
51
|
+
<h2 className='docs-page__h2'>Three Pane Layout</h2>
|
52
|
+
|
53
|
+
<Markup.ReactMarkupCodePreview>{`
|
54
|
+
<PageLayout
|
55
|
+
header={(
|
56
|
+
...
|
57
|
+
)}
|
58
|
+
leftPanelOpen={true}
|
59
|
+
leftPanel={(
|
60
|
+
...
|
61
|
+
)}
|
62
|
+
rightPanelOpen={false}
|
63
|
+
rightPanel={(
|
64
|
+
...
|
65
|
+
)}
|
66
|
+
main={(
|
67
|
+
...
|
68
|
+
)}
|
69
|
+
/>
|
70
|
+
`}
|
71
|
+
</Markup.ReactMarkupCodePreview>
|
72
|
+
|
73
|
+
<p className="docs-page__paragraph"></p>
|
74
|
+
|
75
|
+
<Markup.ReactMarkup>
|
76
|
+
<Markup.ReactMarkupPreview>
|
77
|
+
<div style={{height: 600,}} className='sd-border--light'>
|
78
|
+
<Layout.PageLayout
|
79
|
+
header={(
|
80
|
+
<SubNav zIndex={2}>
|
81
|
+
<ButtonGroup align="inline">
|
82
|
+
<Tooltip text='Click to toggle left panel' flow='right'>
|
83
|
+
<NavButton
|
84
|
+
type='darker'
|
85
|
+
icon='filter-large'
|
86
|
+
onClick={() => this.setState({'leftPanelOpen': !this.state.leftPanelOpen})}
|
87
|
+
/>
|
88
|
+
</Tooltip>
|
89
|
+
</ButtonGroup>
|
90
|
+
<Heading type='h3' className='ms-2'>Layout example</Heading>
|
91
|
+
<ButtonGroup align='end'>
|
92
|
+
<NavButton
|
93
|
+
icon='dots-vertical'
|
94
|
+
onClick={()=> false}
|
95
|
+
/>
|
96
|
+
</ButtonGroup>
|
97
|
+
</SubNav>
|
98
|
+
)}
|
99
|
+
leftPanelOpen={this.state.leftPanelOpen}
|
100
|
+
leftPanel={(
|
101
|
+
<Layout.Panel
|
102
|
+
side='left'
|
103
|
+
background='grey'
|
104
|
+
open={this.state.leftPanelOpen}
|
105
|
+
size='x-small'
|
106
|
+
>
|
107
|
+
<Layout.PanelHeader
|
108
|
+
title='Left Panel title'
|
109
|
+
onClose={() => this.setState({'leftPanelOpen': false})}
|
110
|
+
/>
|
111
|
+
<Layout.PanelContent>
|
112
|
+
<EmptyState
|
113
|
+
title={'No content yet'}
|
114
|
+
description={'Please come later.'}
|
115
|
+
size='small'
|
116
|
+
illustration="1"
|
117
|
+
/>
|
118
|
+
</Layout.PanelContent>
|
119
|
+
</Layout.Panel>
|
120
|
+
)}
|
121
|
+
rightPanelOpen={this.state.rightPanelOpen}
|
122
|
+
rightPanel={(
|
123
|
+
<Layout.Panel
|
124
|
+
side='right'
|
125
|
+
open={this.state.rightPanelOpen}
|
126
|
+
size='x-small'
|
127
|
+
>
|
128
|
+
<Layout.PanelHeader
|
129
|
+
title='Right Panel title'
|
130
|
+
onClose={() => this.setState({'rightPanelOpen': false})}
|
131
|
+
/>
|
132
|
+
<Layout.PanelContent>
|
133
|
+
<Layout.PanelContentBlock>
|
134
|
+
<p className='mb-2'>
|
135
|
+
Preview of the items in the main panel would go here.
|
136
|
+
</p>
|
137
|
+
<p>
|
138
|
+
Maecenas sed diam eget risus varius blandit sit amet non magna.
|
139
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
|
140
|
+
</p>
|
141
|
+
</Layout.PanelContentBlock>
|
142
|
+
</Layout.PanelContent>
|
143
|
+
</Layout.Panel>
|
144
|
+
)}
|
145
|
+
main={(
|
146
|
+
<BoxedList>
|
147
|
+
<BoxedListItem
|
148
|
+
alignVertical='center'
|
149
|
+
clickable={true}
|
150
|
+
density='compact'
|
151
|
+
selected={this.state.rightPanelOpen}
|
152
|
+
onClick={() => this.setState({rightPanelOpen: !this.state.rightPanelOpen})}
|
153
|
+
actions={(
|
154
|
+
<IconButton
|
155
|
+
icon="dots-vertical"
|
156
|
+
size='small'
|
157
|
+
ariaValue="More actions"
|
158
|
+
onClick={()=> false}
|
159
|
+
/>
|
160
|
+
)}
|
161
|
+
>
|
162
|
+
<Container gap='small' >
|
163
|
+
<Label style='translucent' text='Published' type='success' />
|
164
|
+
<span>Click to open the right panel</span>
|
165
|
+
</Container>
|
166
|
+
</BoxedListItem>
|
167
|
+
<BoxedListItem
|
168
|
+
alignVertical='center'
|
169
|
+
clickable={true}
|
170
|
+
density='compact'
|
171
|
+
selected={false}
|
172
|
+
onClick={()=> false}
|
173
|
+
actions={(
|
174
|
+
<IconButton
|
175
|
+
icon="dots-vertical"
|
176
|
+
size='small'
|
177
|
+
ariaValue="More actions"
|
178
|
+
onClick={()=> false}
|
179
|
+
/>
|
180
|
+
)}
|
181
|
+
>
|
182
|
+
<Container gap='small' >
|
183
|
+
<Label style='translucent' text='In progress' type='warning' />
|
184
|
+
<span>Parturient pellentesque aenean commodo</span>
|
185
|
+
</Container>
|
186
|
+
</BoxedListItem>
|
187
|
+
<BoxedListItem
|
188
|
+
alignVertical='center'
|
189
|
+
clickable={true}
|
190
|
+
density='compact'
|
191
|
+
selected={false}
|
192
|
+
onClick={()=> false}
|
193
|
+
actions={(
|
194
|
+
<IconButton
|
195
|
+
icon="dots-vertical"
|
196
|
+
size='small'
|
197
|
+
ariaValue="More actions"
|
198
|
+
onClick={()=> false}
|
199
|
+
/>
|
200
|
+
)}
|
201
|
+
>
|
202
|
+
<Container gap='small' >
|
203
|
+
<Label style='translucent' text='Canceled' type='alert' />
|
204
|
+
<span>Lorem fringilla malesuada cursus</span>
|
205
|
+
</Container>
|
206
|
+
</BoxedListItem>
|
207
|
+
</BoxedList>
|
208
|
+
)}
|
209
|
+
/>
|
210
|
+
</div>
|
211
|
+
</Markup.ReactMarkupPreview>
|
212
|
+
<Markup.ReactMarkupCode>{`
|
213
|
+
<Layout.PageLayout
|
214
|
+
header={(
|
215
|
+
<SubNav zIndex={2}>
|
216
|
+
<ButtonGroup align="inline">
|
217
|
+
<Tooltip text='Click to toggle left panel' flow='right'>
|
218
|
+
<NavButton
|
219
|
+
type='darker'
|
220
|
+
icon='filter-large'
|
221
|
+
onClick={() => this.setState({'leftPanelOpen': !this.state.leftPanelOpen})}
|
222
|
+
/>
|
223
|
+
</Tooltip>
|
224
|
+
</ButtonGroup>
|
225
|
+
<Heading type='h3' className='ms-2'>Layout example</Heading>
|
226
|
+
<ButtonGroup align='end'>
|
227
|
+
<NavButton
|
228
|
+
icon='dots-vertical'
|
229
|
+
onClick={()=> false}
|
230
|
+
/>
|
231
|
+
</ButtonGroup>
|
232
|
+
</SubNav>
|
233
|
+
)}
|
234
|
+
leftPanelOpen={this.state.leftPanelOpen}
|
235
|
+
leftPanel={(
|
236
|
+
<Layout.Panel
|
237
|
+
side='left'
|
238
|
+
background='grey'
|
239
|
+
open={this.state.leftPanelOpen}
|
240
|
+
size='x-small'
|
241
|
+
>
|
242
|
+
<Layout.PanelHeader
|
243
|
+
title='Left Panel title'
|
244
|
+
onClose={() => this.setState({'leftPanelOpen': false})}
|
245
|
+
/>
|
246
|
+
<Layout.PanelContent>
|
247
|
+
<EmptyState
|
248
|
+
title={'No content yet'}
|
249
|
+
description={'Please come later.'}
|
250
|
+
size='small'
|
251
|
+
illustration="1"
|
252
|
+
/>
|
253
|
+
</Layout.PanelContent>
|
254
|
+
</Layout.Panel>
|
255
|
+
)}
|
256
|
+
rightPanelOpen={this.state.rightPanelOpen}
|
257
|
+
rightPanel={(
|
258
|
+
<Layout.Panel
|
259
|
+
side='right'
|
260
|
+
open={this.state.rightPanelOpen}
|
261
|
+
size='x-small'
|
262
|
+
>
|
263
|
+
<Layout.PanelHeader
|
264
|
+
title='Right Panel title'
|
265
|
+
onClose={() => this.setState({'rightPanelOpen': false})}
|
266
|
+
/>
|
267
|
+
<Layout.PanelContent>
|
268
|
+
<Layout.PanelContentBlock>
|
269
|
+
<p className='mb-2'>
|
270
|
+
Preview of the items in the main panel would go here.
|
271
|
+
</p>
|
272
|
+
<p>
|
273
|
+
Maecenas sed diam eget risus varius blandit sit amet non magna.
|
274
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
|
275
|
+
</p>
|
276
|
+
</Layout.PanelContentBlock>
|
277
|
+
</Layout.PanelContent>
|
278
|
+
</Layout.Panel>
|
279
|
+
)}
|
280
|
+
main={(
|
281
|
+
<BoxedList>
|
282
|
+
<BoxedListItem
|
283
|
+
alignVertical='center'
|
284
|
+
clickable={true}
|
285
|
+
density='compact'
|
286
|
+
selected={this.state.rightPanelOpen}
|
287
|
+
onClick={() => this.setState({rightPanelOpen: !this.state.rightPanelOpen})}
|
288
|
+
actions={(
|
289
|
+
<IconButton
|
290
|
+
icon="dots-vertical"
|
291
|
+
size='small'
|
292
|
+
ariaValue="More actions"
|
293
|
+
onClick={()=> false}
|
294
|
+
/>
|
295
|
+
)}
|
296
|
+
>
|
297
|
+
<Container gap='small' >
|
298
|
+
<Label style='translucent' text='Published' type='success' />
|
299
|
+
<span>Click to open the right panel</span>
|
300
|
+
</Container>
|
301
|
+
</BoxedListItem>
|
302
|
+
<BoxedListItem
|
303
|
+
alignVertical='center'
|
304
|
+
clickable={true}
|
305
|
+
density='compact'
|
306
|
+
selected={false}
|
307
|
+
onClick={()=> false}
|
308
|
+
actions={(
|
309
|
+
<IconButton
|
310
|
+
icon="dots-vertical"
|
311
|
+
size='small'
|
312
|
+
ariaValue="More actions"
|
313
|
+
onClick={()=> false}
|
314
|
+
/>
|
315
|
+
)}
|
316
|
+
>
|
317
|
+
<Container gap='small' >
|
318
|
+
<Label style='translucent' text='In progress' type='warning' />
|
319
|
+
<span>Parturient pellentesque aenean commodo</span>
|
320
|
+
</Container>
|
321
|
+
</BoxedListItem>
|
322
|
+
<BoxedListItem
|
323
|
+
alignVertical='center'
|
324
|
+
clickable={true}
|
325
|
+
density='compact'
|
326
|
+
selected={false}
|
327
|
+
onClick={()=> false}
|
328
|
+
actions={(
|
329
|
+
<IconButton
|
330
|
+
icon="dots-vertical"
|
331
|
+
size='small'
|
332
|
+
ariaValue="More actions"
|
333
|
+
onClick={()=> false}
|
334
|
+
/>
|
335
|
+
)}
|
336
|
+
>
|
337
|
+
<Container gap='small' >
|
338
|
+
<Label style='translucent' text='Canceled' type='alert' />
|
339
|
+
<span>Lorem fringilla malesuada cursus</span>
|
340
|
+
</Container>
|
341
|
+
</BoxedListItem>
|
342
|
+
</BoxedList>
|
343
|
+
)}
|
344
|
+
/>
|
345
|
+
`}
|
346
|
+
</Markup.ReactMarkupCode>
|
347
|
+
</Markup.ReactMarkup>
|
348
|
+
|
349
|
+
|
350
|
+
{/* <h3 className="docs-page__h3">Props</h3>
|
351
|
+
<PropsList>
|
352
|
+
<Prop name='size' isRequired={false} type='x-small | small | medium | large' default='small' description='Specifies the size of the items in the grid. '/>
|
353
|
+
<Prop name='gap' isRequired={false} type='small | medium | large | x-large' default='small' description='Defines the gap between the items inside the Grid list. '/>
|
354
|
+
<Prop name='margin' isRequired={false} type='0 | 1 | 2 | 3' default='3' description='Defines the margin around the Grid list. The values are based on multipliers of the the $sd-base-increment (equal to 8px). Setting the value to 3 results in a margin of 24px.'/>
|
355
|
+
</PropsList> */}
|
356
|
+
|
357
|
+
</section>
|
358
|
+
)
|
359
|
+
}
|
360
|
+
}
|
361
|
+
|
362
|
+
export { ThreePaneLayoutPattern };
|
@@ -3,9 +3,9 @@
|
|
3
3
|
<h1 class="docs-page__h1">Superdesk UI</h1>
|
4
4
|
<ul class="docs-page__header-nav">
|
5
5
|
<li class="docs-page__header-nav-item"><a class="docs-page__header-nav-link" href="#/">Home</a></li>
|
6
|
-
<li class="docs-page__header-nav-item"><a class="docs-page__header-nav-link" href="#/design">Design guidelines</a></li>
|
7
6
|
<li class="docs-page__header-nav-item"><a class="docs-page__header-nav-link" href="#/components">Components</a></li>
|
8
|
-
<li class="docs-page__header-nav-item docs-page__header-nav-item--active"><a class="docs-page__header-nav-link" href="#/
|
7
|
+
<li class="docs-page__header-nav-item docs-page__header-nav-item--active"><a class="docs-page__header-nav-link" href="#/design-patterns">Design Patterns</a></li>
|
8
|
+
<li class="docs-page__header-nav-item"><a class="docs-page__header-nav-link" href="#/design">Design guidelines</a></li>
|
9
9
|
<li class="docs-page__header-nav-item"><a class="docs-page__header-nav-link" href="#/playgrounds">Playground</a></li>
|
10
10
|
</ul>
|
11
11
|
<button class="docs-page__header-button" aria-label="Change theme" aria-haspopup="menu" aria-expanded="false">
|
@@ -13,5 +13,4 @@
|
|
13
13
|
</button>
|
14
14
|
</header>
|
15
15
|
|
16
|
-
|
17
|
-
<doc-react class="sd-wrap-helper"></doc-react>
|
16
|
+
<doc-design-patterns class="sd-wrap-helper"></doc-react>
|
package/dist/design.html
CHANGED
@@ -3,9 +3,9 @@
|
|
3
3
|
<h1 class="docs-page__h1">Superdesk UI</h1>
|
4
4
|
<ul class="docs-page__header-nav">
|
5
5
|
<li class="docs-page__header-nav-item"><a class="docs-page__header-nav-link" href="#/">Home</a></li>
|
6
|
-
<li class="docs-page__header-nav-item docs-page__header-nav-item--active"><a class="docs-page__header-nav-link" href="#/design">Design guidelines</a></li>
|
7
6
|
<li class="docs-page__header-nav-item"><a class="docs-page__header-nav-link" href="#/components">Components</a></li>
|
8
|
-
<li class="docs-page__header-nav-item"><a class="docs-page__header-nav-link" href="#/
|
7
|
+
<li class="docs-page__header-nav-item"><a class="docs-page__header-nav-link" href="#/design-patterns">Design Patterns</a></li>
|
8
|
+
<li class="docs-page__header-nav-item docs-page__header-nav-item--active"><a class="docs-page__header-nav-link" href="#/design">Design guidelines</a></li>
|
9
9
|
<li class="docs-page__header-nav-item"><a class="docs-page__header-nav-link" href="#/playgrounds">Playground</a></li>
|
10
10
|
</ul>
|
11
11
|
</header>
|
@@ -15,8 +15,8 @@
|
|
15
15
|
<li ng-repeat="group in design">
|
16
16
|
<span class="docs-page__nav-title">{{group.name}}</span>
|
17
17
|
<ul class="docs-page__nav--sub-level">
|
18
|
-
<li class="docs-page__nav-item" ng-repeat="(name, item) in group.items"
|
19
|
-
ng-class="{'docs-page__nav-item--active': isActive(name)}"
|
18
|
+
<li class="docs-page__nav-item" ng-repeat="(name, item) in group.items">
|
19
|
+
<a ng-class="{'docs-page__nav-item--active': isActive(name)}" href="#/design/{{name}}">{{item.name}}</a>
|
20
20
|
</li>
|
21
21
|
</ul>
|
22
22
|
</li>
|