superdesk-ui-framework 3.1.5 → 3.1.7

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.
Files changed (271) hide show
  1. package/app/styles/_expand-button.scss +31 -0
  2. package/app/styles/_helpers.scss +320 -151
  3. package/app/styles/app.scss +1 -0
  4. package/app/styles/components/_subnav.scss +1 -0
  5. package/app/styles/design-tokens/_design-tokens-general.scss +19 -7
  6. package/app/styles/design-tokens/_new-colors.scss +6 -1
  7. package/app/styles/grids/_grid-layout.scss +1 -0
  8. package/app/styles/interface-elements/_side-panel.scss +4 -0
  9. package/app-typescript/components/IconPicker.tsx +1 -1
  10. package/{examples/pages/react → dist/components}/Index.tsx +81 -63
  11. package/dist/components/utilities/SpacingUtilities.tsx +774 -0
  12. package/dist/components/utilities/TextUtilities.tsx +432 -0
  13. package/dist/components.html +6 -27
  14. package/dist/{components → components_deprecated}/text.html +7 -7
  15. package/dist/components_deprecated.html +38 -0
  16. package/dist/design/buttons.html +1 -11
  17. package/dist/design/checkbox-and-radio.html +3 -3
  18. package/dist/design/layout-principles.html +0 -1
  19. package/dist/design/switch.html +0 -10
  20. package/dist/design-patterns/Index.tsx +86 -0
  21. package/dist/design-patterns/ThreePaneLayoutPattern.tsx +362 -0
  22. package/{examples/pages/react.html → dist/design-patterns.html} +3 -4
  23. package/dist/design.html +4 -4
  24. package/dist/examples.bundle.css +106 -20
  25. package/dist/examples.bundle.js +3233 -1443
  26. package/dist/main.html +17 -15
  27. package/dist/playgrounds/boxed-list.html +7 -7
  28. package/dist/playgrounds/master-desk.html +4 -4
  29. package/dist/playgrounds/photo-snippets/edit-photo-metadata.html +1 -1
  30. package/dist/playgrounds/planning-snippets/edit-planning.html +1 -1
  31. package/dist/playgrounds/planning.html +1 -1
  32. package/dist/playgrounds/publisher-content-analytics.html +25 -25
  33. package/dist/playgrounds/react-playgrounds/RundownEditor.tsx +16 -1
  34. package/dist/playgrounds/react-playgrounds/TestGround.tsx +46 -4
  35. package/dist/playgrounds/video-editor.html +1 -1
  36. package/dist/playgrounds.html +3 -6
  37. package/dist/superdesk-ui.bundle.css +345 -120
  38. package/dist/superdesk-ui.bundle.js +105 -101
  39. package/examples/css/docs-page.css +106 -20
  40. package/examples/index.js +89 -89
  41. package/examples/js/doc.js +16 -2
  42. package/examples/js/react.js +122 -19
  43. package/{dist/react → examples/pages/components}/Index.tsx +81 -63
  44. package/examples/pages/components/utilities/SpacingUtilities.tsx +774 -0
  45. package/examples/pages/components/utilities/TextUtilities.tsx +432 -0
  46. package/examples/pages/components.html +6 -27
  47. package/examples/pages/{components → components_deprecated}/text.html +7 -7
  48. package/examples/pages/components_deprecated.html +38 -0
  49. package/examples/pages/design/buttons.html +1 -11
  50. package/examples/pages/design/checkbox-and-radio.html +3 -3
  51. package/examples/pages/design/layout-principles.html +0 -1
  52. package/examples/pages/design/switch.html +0 -10
  53. package/examples/pages/design-patterns/Index.tsx +86 -0
  54. package/examples/pages/design-patterns/ThreePaneLayoutPattern.tsx +362 -0
  55. package/{dist/react.html → examples/pages/design-patterns.html} +3 -4
  56. package/examples/pages/design.html +4 -4
  57. package/examples/pages/main.html +17 -15
  58. package/examples/pages/playgrounds/boxed-list.html +7 -7
  59. package/examples/pages/playgrounds/master-desk.html +4 -4
  60. package/examples/pages/playgrounds/photo-snippets/edit-photo-metadata.html +1 -1
  61. package/examples/pages/playgrounds/planning-snippets/edit-planning.html +1 -1
  62. package/examples/pages/playgrounds/planning.html +1 -1
  63. package/examples/pages/playgrounds/publisher-content-analytics.html +25 -25
  64. package/examples/pages/playgrounds/react-playgrounds/RundownEditor.tsx +16 -1
  65. package/examples/pages/playgrounds/react-playgrounds/TestGround.tsx +46 -4
  66. package/examples/pages/playgrounds/video-editor.html +1 -1
  67. package/examples/pages/playgrounds.html +3 -6
  68. package/package.json +1 -1
  69. package/react/components/IconPicker.js +1 -1
  70. /package/dist/{react → components}/Alerts.tsx +0 -0
  71. /package/dist/{react → components}/Autocomplete.tsx +0 -0
  72. /package/dist/{react → components}/Avatar.tsx +0 -0
  73. /package/dist/{react → components}/Badges.tsx +0 -0
  74. /package/dist/{react → components}/BigIconFont.tsx +0 -0
  75. /package/dist/{react → components}/BoxedList.tsx +0 -0
  76. /package/dist/{react → components}/ButtonGroups.tsx +0 -0
  77. /package/dist/{react → components}/Buttons.tsx +0 -0
  78. /package/dist/{react → components}/Carousel.tsx +0 -0
  79. /package/dist/{react → components}/Checkboxs.tsx +0 -0
  80. /package/dist/{react → components}/Container.tsx +0 -0
  81. /package/dist/{react → components}/ContentDivider.tsx +0 -0
  82. /package/dist/{react → components}/ContentList.tsx +0 -0
  83. /package/dist/{react → components}/CreateButton.tsx +0 -0
  84. /package/dist/{react → components}/DatePicker.tsx +0 -0
  85. /package/dist/{react → components}/DragHandleDocs.tsx +0 -0
  86. /package/dist/{react → components}/DropZone.tsx +0 -0
  87. /package/dist/{react → components}/Dropdowns.tsx +0 -0
  88. /package/dist/{react → components}/DurationInput.tsx +0 -0
  89. /package/dist/{react → components}/EmptyStates.tsx +0 -0
  90. /package/dist/{react → components}/GridItem.tsx +0 -0
  91. /package/dist/{react → components}/GridList.tsx +0 -0
  92. /package/dist/{react → components}/Heading.tsx +0 -0
  93. /package/dist/{react → components}/IconButtons.tsx +0 -0
  94. /package/dist/{react → components}/IconFont.tsx +0 -0
  95. /package/dist/{react → components}/IconLabels.tsx +0 -0
  96. /package/dist/{react → components}/IconPicker.tsx +0 -0
  97. /package/dist/{react → components}/IllustrationButton.tsx +0 -0
  98. /package/dist/{react → components}/Inputs.tsx +0 -0
  99. /package/dist/{react → components}/Labels.tsx +0 -0
  100. /package/dist/{react → components}/LeftNavigations.tsx +0 -0
  101. /package/dist/{react → components}/ListItems.tsx +0 -0
  102. /package/dist/{react → components}/Menu.tsx +0 -0
  103. /package/dist/{react → components}/Modal.tsx +0 -0
  104. /package/dist/{react → components}/MultiSelect.tsx +0 -0
  105. /package/dist/{react → components}/NavButtons.tsx +0 -0
  106. /package/dist/{react → components}/Panel.tsx +0 -0
  107. /package/dist/{react → components}/Popover.tsx +0 -0
  108. /package/dist/{react → components}/QuickNavigationBar.tsx +0 -0
  109. /package/dist/{react → components}/RadioGroup.tsx +0 -0
  110. /package/dist/{react → components}/ResizablePanels.tsx +0 -0
  111. /package/dist/{react → components}/SelectGrid.tsx +0 -0
  112. /package/dist/{react → components}/SelectWithTemplate.tsx +0 -0
  113. /package/dist/{react → components}/Selects.tsx +0 -0
  114. /package/dist/{react → components}/SimpleList.tsx +0 -0
  115. /package/dist/{react → components}/SubNav.tsx +0 -0
  116. /package/dist/{react → components}/Switch.tsx +0 -0
  117. /package/dist/{react → components}/TableList.tsx +0 -0
  118. /package/dist/{react → components}/Tabs.tsx +0 -0
  119. /package/dist/{react → components}/TagInputDocs.tsx +0 -0
  120. /package/dist/{react → components}/Tags.tsx +0 -0
  121. /package/dist/{react → components}/Text.tsx +0 -0
  122. /package/dist/{react → components}/TimePicker.tsx +0 -0
  123. /package/dist/{react → components}/Toasts.tsx +0 -0
  124. /package/dist/{react → components}/Togglebox.tsx +0 -0
  125. /package/dist/{react → components}/Tooltips.tsx +0 -0
  126. /package/dist/{react → components}/TreeMenu.tsx +0 -0
  127. /package/dist/{react → components}/TreeSelect.tsx +0 -0
  128. /package/dist/{react → components}/WithPaginationDocs.tsx +0 -0
  129. /package/dist/{react → components}/WithSizeObserver.tsx +0 -0
  130. /package/dist/{react → components}/tree-select/TreeSelect.tsx +0 -0
  131. /package/dist/{react → components}/tree-select/example-1.tsx +0 -0
  132. /package/dist/{react → components}/tree-select/example-2.tsx +0 -0
  133. /package/dist/{components → components_deprecated}/alerts.html +0 -0
  134. /package/dist/{components → components_deprecated}/badge.html +0 -0
  135. /package/dist/{components → components_deprecated}/basic-grid.html +0 -0
  136. /package/dist/{components → components_deprecated}/big-icons.html +0 -0
  137. /package/dist/{components → components_deprecated}/buttons.html +0 -0
  138. /package/dist/{components → components_deprecated}/carousel.html +0 -0
  139. /package/dist/{components → components_deprecated}/checkbox.html +0 -0
  140. /package/dist/{components → components_deprecated}/colors.html +0 -0
  141. /package/dist/{components → components_deprecated}/dropdown.html +0 -0
  142. /package/dist/{components → components_deprecated}/form-layout.html +0 -0
  143. /package/dist/{components → components_deprecated}/icon-labels.html +0 -0
  144. /package/dist/{components → components_deprecated}/icons.html +0 -0
  145. /package/dist/{components → components_deprecated}/input.html +0 -0
  146. /package/dist/{components → components_deprecated}/labels.html +0 -0
  147. /package/dist/{components → components_deprecated}/layout-grid.html +0 -0
  148. /package/dist/{components → components_deprecated}/left-nav.html +0 -0
  149. /package/dist/{components → components_deprecated}/list-item.html +0 -0
  150. /package/dist/{components → components_deprecated}/loader.html +0 -0
  151. /package/dist/{components → components_deprecated}/modal-template.html +0 -0
  152. /package/dist/{components → components_deprecated}/modals.html +0 -0
  153. /package/dist/{components → components_deprecated}/other-elements.html +0 -0
  154. /package/dist/{components → components_deprecated}/panel-info.html +0 -0
  155. /package/dist/{components → components_deprecated}/radio.html +0 -0
  156. /package/dist/{components → components_deprecated}/select.html +0 -0
  157. /package/dist/{components → components_deprecated}/shadows.html +0 -0
  158. /package/dist/{components → components_deprecated}/sidebar-menu.html +0 -0
  159. /package/dist/{components → components_deprecated}/simple-list.html +0 -0
  160. /package/dist/{components → components_deprecated}/slider.html +0 -0
  161. /package/dist/{components → components_deprecated}/spacing.html +0 -0
  162. /package/dist/{components → components_deprecated}/switch.html +0 -0
  163. /package/dist/{components → components_deprecated}/tables.html +0 -0
  164. /package/dist/{components → components_deprecated}/tabs.html +0 -0
  165. /package/dist/{components → components_deprecated}/tag-input.html +0 -0
  166. /package/dist/{components → components_deprecated}/tag-labels.html +0 -0
  167. /package/dist/{components → components_deprecated}/toggle.html +0 -0
  168. /package/dist/{components → components_deprecated}/tooltips.html +0 -0
  169. /package/dist/{components → components_deprecated}/vertical-tabs.html +0 -0
  170. /package/dist/{components → components_deprecated}/wizard.html +0 -0
  171. /package/examples/pages/{react → components}/Alerts.tsx +0 -0
  172. /package/examples/pages/{react → components}/Autocomplete.tsx +0 -0
  173. /package/examples/pages/{react → components}/Avatar.tsx +0 -0
  174. /package/examples/pages/{react → components}/Badges.tsx +0 -0
  175. /package/examples/pages/{react → components}/BigIconFont.tsx +0 -0
  176. /package/examples/pages/{react → components}/BoxedList.tsx +0 -0
  177. /package/examples/pages/{react → components}/ButtonGroups.tsx +0 -0
  178. /package/examples/pages/{react → components}/Buttons.tsx +0 -0
  179. /package/examples/pages/{react → components}/Carousel.tsx +0 -0
  180. /package/examples/pages/{react → components}/Checkboxs.tsx +0 -0
  181. /package/examples/pages/{react → components}/Container.tsx +0 -0
  182. /package/examples/pages/{react → components}/ContentDivider.tsx +0 -0
  183. /package/examples/pages/{react → components}/ContentList.tsx +0 -0
  184. /package/examples/pages/{react → components}/CreateButton.tsx +0 -0
  185. /package/examples/pages/{react → components}/DatePicker.tsx +0 -0
  186. /package/examples/pages/{react → components}/DragHandleDocs.tsx +0 -0
  187. /package/examples/pages/{react → components}/DropZone.tsx +0 -0
  188. /package/examples/pages/{react → components}/Dropdowns.tsx +0 -0
  189. /package/examples/pages/{react → components}/DurationInput.tsx +0 -0
  190. /package/examples/pages/{react → components}/EmptyStates.tsx +0 -0
  191. /package/examples/pages/{react → components}/GridItem.tsx +0 -0
  192. /package/examples/pages/{react → components}/GridList.tsx +0 -0
  193. /package/examples/pages/{react → components}/Heading.tsx +0 -0
  194. /package/examples/pages/{react → components}/IconButtons.tsx +0 -0
  195. /package/examples/pages/{react → components}/IconFont.tsx +0 -0
  196. /package/examples/pages/{react → components}/IconLabels.tsx +0 -0
  197. /package/examples/pages/{react → components}/IconPicker.tsx +0 -0
  198. /package/examples/pages/{react → components}/IllustrationButton.tsx +0 -0
  199. /package/examples/pages/{react → components}/Inputs.tsx +0 -0
  200. /package/examples/pages/{react → components}/Labels.tsx +0 -0
  201. /package/examples/pages/{react → components}/LeftNavigations.tsx +0 -0
  202. /package/examples/pages/{react → components}/ListItems.tsx +0 -0
  203. /package/examples/pages/{react → components}/Menu.tsx +0 -0
  204. /package/examples/pages/{react → components}/Modal.tsx +0 -0
  205. /package/examples/pages/{react → components}/MultiSelect.tsx +0 -0
  206. /package/examples/pages/{react → components}/NavButtons.tsx +0 -0
  207. /package/examples/pages/{react → components}/Panel.tsx +0 -0
  208. /package/examples/pages/{react → components}/Popover.tsx +0 -0
  209. /package/examples/pages/{react → components}/QuickNavigationBar.tsx +0 -0
  210. /package/examples/pages/{react → components}/RadioGroup.tsx +0 -0
  211. /package/examples/pages/{react → components}/ResizablePanels.tsx +0 -0
  212. /package/examples/pages/{react → components}/SelectGrid.tsx +0 -0
  213. /package/examples/pages/{react → components}/SelectWithTemplate.tsx +0 -0
  214. /package/examples/pages/{react → components}/Selects.tsx +0 -0
  215. /package/examples/pages/{react → components}/SimpleList.tsx +0 -0
  216. /package/examples/pages/{react → components}/SubNav.tsx +0 -0
  217. /package/examples/pages/{react → components}/Switch.tsx +0 -0
  218. /package/examples/pages/{react → components}/TableList.tsx +0 -0
  219. /package/examples/pages/{react → components}/Tabs.tsx +0 -0
  220. /package/examples/pages/{react → components}/TagInputDocs.tsx +0 -0
  221. /package/examples/pages/{react → components}/Tags.tsx +0 -0
  222. /package/examples/pages/{react → components}/Text.tsx +0 -0
  223. /package/examples/pages/{react → components}/TimePicker.tsx +0 -0
  224. /package/examples/pages/{react → components}/Toasts.tsx +0 -0
  225. /package/examples/pages/{react → components}/Togglebox.tsx +0 -0
  226. /package/examples/pages/{react → components}/Tooltips.tsx +0 -0
  227. /package/examples/pages/{react → components}/TreeMenu.tsx +0 -0
  228. /package/examples/pages/{react → components}/TreeSelect.tsx +0 -0
  229. /package/examples/pages/{react → components}/WithPaginationDocs.tsx +0 -0
  230. /package/examples/pages/{react → components}/WithSizeObserver.tsx +0 -0
  231. /package/examples/pages/{react → components}/tree-select/TreeSelect.tsx +0 -0
  232. /package/examples/pages/{react → components}/tree-select/example-1.tsx +0 -0
  233. /package/examples/pages/{react → components}/tree-select/example-2.tsx +0 -0
  234. /package/examples/pages/{components → components_deprecated}/alerts.html +0 -0
  235. /package/examples/pages/{components → components_deprecated}/badge.html +0 -0
  236. /package/examples/pages/{components → components_deprecated}/basic-grid.html +0 -0
  237. /package/examples/pages/{components → components_deprecated}/big-icons.html +0 -0
  238. /package/examples/pages/{components → components_deprecated}/buttons.html +0 -0
  239. /package/examples/pages/{components → components_deprecated}/carousel.html +0 -0
  240. /package/examples/pages/{components → components_deprecated}/checkbox.html +0 -0
  241. /package/examples/pages/{components → components_deprecated}/colors.html +0 -0
  242. /package/examples/pages/{components → components_deprecated}/dropdown.html +0 -0
  243. /package/examples/pages/{components → components_deprecated}/form-layout.html +0 -0
  244. /package/examples/pages/{components → components_deprecated}/icon-labels.html +0 -0
  245. /package/examples/pages/{components → components_deprecated}/icons.html +0 -0
  246. /package/examples/pages/{components → components_deprecated}/input.html +0 -0
  247. /package/examples/pages/{components → components_deprecated}/labels.html +0 -0
  248. /package/examples/pages/{components → components_deprecated}/layout-grid.html +0 -0
  249. /package/examples/pages/{components → components_deprecated}/left-nav.html +0 -0
  250. /package/examples/pages/{components → components_deprecated}/list-item.html +0 -0
  251. /package/examples/pages/{components → components_deprecated}/loader.html +0 -0
  252. /package/examples/pages/{components → components_deprecated}/modal-template.html +0 -0
  253. /package/examples/pages/{components → components_deprecated}/modals.html +0 -0
  254. /package/examples/pages/{components → components_deprecated}/other-elements.html +0 -0
  255. /package/examples/pages/{components → components_deprecated}/panel-info.html +0 -0
  256. /package/examples/pages/{components → components_deprecated}/radio.html +0 -0
  257. /package/examples/pages/{components → components_deprecated}/select.html +0 -0
  258. /package/examples/pages/{components → components_deprecated}/shadows.html +0 -0
  259. /package/examples/pages/{components → components_deprecated}/sidebar-menu.html +0 -0
  260. /package/examples/pages/{components → components_deprecated}/simple-list.html +0 -0
  261. /package/examples/pages/{components → components_deprecated}/slider.html +0 -0
  262. /package/examples/pages/{components → components_deprecated}/spacing.html +0 -0
  263. /package/examples/pages/{components → components_deprecated}/switch.html +0 -0
  264. /package/examples/pages/{components → components_deprecated}/tables.html +0 -0
  265. /package/examples/pages/{components → components_deprecated}/tabs.html +0 -0
  266. /package/examples/pages/{components → components_deprecated}/tag-input.html +0 -0
  267. /package/examples/pages/{components → components_deprecated}/tag-labels.html +0 -0
  268. /package/examples/pages/{components → components_deprecated}/toggle.html +0 -0
  269. /package/examples/pages/{components → components_deprecated}/tooltips.html +0 -0
  270. /package/examples/pages/{components → components_deprecated}/vertical-tabs.html +0 -0
  271. /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="#/react">React</a></li>
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="#/react">React</a></li>
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)}"><a href="#/design/{{name}}">{{item.name}}</a>
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>