superdesk-ui-framework 3.0.1-beta.1 → 3.0.1-beta.2
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/fonts/sd_big-icons.eot +0 -0
- package/app/fonts/sd_big-icons.svg +55 -53
- package/app/fonts/sd_big-icons.ttf +0 -0
- package/app/fonts/sd_big-icons.woff +0 -0
- package/app/fonts/sd_icons.eot +0 -0
- package/app/fonts/sd_icons.svg +1 -0
- package/app/fonts/sd_icons.ttf +0 -0
- package/app/fonts/sd_icons.woff +0 -0
- package/app/img/dots.svg +3 -0
- package/app/styles/_accessibility.scss +3 -3
- package/app/styles/_big-icon-font.scss +60 -23
- package/app/styles/_boxed-list.scss +26 -3
- package/app/styles/_buttons.scss +4 -0
- package/app/styles/_helpers.scss +4 -3
- package/app/styles/_icon-font.scss +341 -307
- package/app/styles/_icon-labels.scss +66 -10
- package/app/styles/_table-list.scss +244 -0
- package/app/styles/app.scss +1 -0
- package/app/styles/components/_list-item.scss +24 -20
- package/app/styles/components/_sd-dropzone.scss +52 -16
- package/app/styles/components/_subnav.scss +87 -80
- package/app/styles/design-tokens/_design-tokens-general.scss +7 -0
- package/app/styles/design-tokens/_new-colors.scss +4 -2
- package/app/styles/form-elements/_inputs.scss +4 -0
- package/app/styles/grids/_grid-layout.scss +21 -7
- package/app/styles/layout/_container.scss +3 -0
- package/app/styles/layout/_editor.scss +108 -16
- package/app/styles/menus/_sd-sidebar-menu.scss +6 -0
- package/app/styles/primereact/_pr-dialog.scss +39 -7
- package/app-typescript/components/CreateButton.tsx +38 -0
- package/app-typescript/components/DropZone.tsx +4 -4
- package/app-typescript/components/Icon.tsx +3 -1
- package/app-typescript/components/IconLabel.tsx +8 -1
- package/app-typescript/components/Input.tsx +2 -0
- package/app-typescript/components/Layouts/AuthoringContainer.tsx +27 -0
- package/app-typescript/components/Layouts/AuthoringInnerHeader.tsx +2 -0
- package/app-typescript/components/Layouts/AuthoringMain.tsx +11 -7
- package/app-typescript/components/Layouts/AuthoringMainToolBar.tsx +7 -1
- package/app-typescript/components/Layouts/Container.tsx +1 -1
- package/app-typescript/components/Layouts/ContentSplitter.tsx +23 -0
- package/app-typescript/components/Layouts/Layout.tsx +33 -0
- package/app-typescript/components/Layouts/LayoutContainer.tsx +1 -4
- package/app-typescript/components/Layouts/MainPanel.tsx +10 -5
- package/app-typescript/components/Layouts/OverlayPanel.tsx +19 -0
- package/app-typescript/components/Layouts/Panel.tsx +1 -0
- package/app-typescript/components/Layouts/index.tsx +8 -2
- package/app-typescript/components/Lists/BoxedList.tsx +6 -2
- package/app-typescript/components/Lists/ContentList.tsx +100 -0
- package/app-typescript/components/Lists/TableList.tsx +208 -0
- package/app-typescript/components/Modal.tsx +27 -17
- package/app-typescript/components/Navigation/SideBarTabs.tsx +10 -0
- package/app-typescript/components/SearchBar.tsx +79 -0
- package/app-typescript/components/Select.tsx +2 -0
- package/app-typescript/components/SidebarMenu.tsx +68 -0
- package/app-typescript/components/Spinner.tsx +1 -1
- package/app-typescript/components/SwitchGroup.tsx +2 -1
- package/app-typescript/index.ts +3 -0
- package/dist/dots.svg +3 -0
- package/dist/examples.bundle.css +7871 -379
- package/dist/examples.bundle.js +29461 -15740
- package/dist/playgrounds/react-playgrounds/EditorTest.tsx +9 -4
- package/dist/playgrounds/react-playgrounds/Index.tsx +3 -1
- package/dist/playgrounds/react-playgrounds/PersonalProfile.tsx +13 -0
- package/dist/playgrounds/react-playgrounds/RundownEditor.tsx +466 -0
- package/dist/playgrounds/react-playgrounds/Rundowns.tsx +1002 -0
- package/dist/playgrounds/react-playgrounds/TestGround.tsx +190 -182
- package/dist/playgrounds/react-playgrounds/UiPlayground.tsx +4 -0
- package/dist/playgrounds/react-playgrounds/components/AuthoringContainer.tsx +26 -0
- package/dist/playgrounds/react-playgrounds/components/ContentSplitter.tsx +22 -0
- package/dist/playgrounds/react-playgrounds/components/Index.tsx +6 -1
- package/dist/playgrounds/react-playgrounds/components/MainPanel.tsx +11 -1
- package/dist/playgrounds/react-playgrounds/components/SearchBar.tsx +51 -9
- package/dist/react/Container.tsx +1 -1
- package/dist/react/ContentList.tsx +280 -0
- package/dist/react/CreateButton.tsx +71 -0
- package/dist/react/DropZone.tsx +14 -6
- package/dist/react/IconButtons.tsx +6 -6
- package/dist/react/IconLabels.tsx +24 -2
- package/dist/react/Index.tsx +15 -0
- package/dist/react/Inputs.tsx +32 -3
- package/dist/react/Modal.tsx +1 -0
- package/dist/react/TableList.tsx +268 -0
- package/dist/sd_big-icons.eot +0 -0
- package/dist/sd_big-icons.svg +55 -53
- package/dist/sd_big-icons.ttf +0 -0
- package/dist/sd_big-icons.woff +0 -0
- package/dist/sd_icons.eot +0 -0
- package/dist/sd_icons.svg +1 -0
- package/dist/sd_icons.ttf +0 -0
- package/dist/sd_icons.woff +0 -0
- package/dist/superdesk-ui.bundle.css +44994 -24931
- package/dist/superdesk-ui.bundle.js +2437 -1949
- package/dist/vendor.bundle.js +27 -27
- package/examples/css/docs-page.css +2 -3
- package/examples/index.js +8 -0
- package/examples/pages/playgrounds/react-playgrounds/EditorTest.tsx +9 -4
- package/examples/pages/playgrounds/react-playgrounds/Index.tsx +3 -1
- package/examples/pages/playgrounds/react-playgrounds/PersonalProfile.tsx +13 -0
- package/examples/pages/playgrounds/react-playgrounds/RundownEditor.tsx +466 -0
- package/examples/pages/playgrounds/react-playgrounds/Rundowns.tsx +1002 -0
- package/examples/pages/playgrounds/react-playgrounds/TestGround.tsx +190 -182
- package/examples/pages/playgrounds/react-playgrounds/UiPlayground.tsx +4 -0
- package/examples/pages/playgrounds/react-playgrounds/components/AuthoringContainer.tsx +26 -0
- package/examples/pages/playgrounds/react-playgrounds/components/ContentSplitter.tsx +22 -0
- package/examples/pages/playgrounds/react-playgrounds/components/Index.tsx +6 -1
- package/examples/pages/playgrounds/react-playgrounds/components/MainPanel.tsx +11 -1
- package/examples/pages/playgrounds/react-playgrounds/components/SearchBar.tsx +51 -9
- package/examples/pages/react/Container.tsx +1 -1
- package/examples/pages/react/ContentList.tsx +280 -0
- package/examples/pages/react/CreateButton.tsx +71 -0
- package/examples/pages/react/DropZone.tsx +14 -6
- package/examples/pages/react/IconButtons.tsx +6 -6
- package/examples/pages/react/IconLabels.tsx +24 -2
- package/examples/pages/react/Index.tsx +15 -0
- package/examples/pages/react/Inputs.tsx +32 -3
- package/examples/pages/react/Modal.tsx +1 -0
- package/examples/pages/react/TableList.tsx +268 -0
- package/package.json +2 -1
- package/react/components/CreateButton.d.ts +17 -0
- package/react/components/CreateButton.js +66 -0
- package/react/components/DropZone.d.ts +2 -2
- package/react/components/DropZone.js +2 -2
- package/react/components/Icon.d.ts +1 -0
- package/react/components/Icon.js +2 -1
- package/react/components/IconLabel.d.ts +2 -0
- package/react/components/IconLabel.js +6 -3
- package/react/components/Input.d.ts +1 -0
- package/react/components/Input.js +1 -0
- package/react/components/Layouts/AuthoringContainer.d.ts +11 -0
- package/react/components/Layouts/AuthoringContainer.js +58 -0
- package/react/components/Layouts/AuthoringInnerHeader.d.ts +1 -0
- package/react/components/Layouts/AuthoringInnerHeader.js +6 -3
- package/react/components/Layouts/AuthoringMain.d.ts +3 -1
- package/react/components/Layouts/AuthoringMain.js +2 -2
- package/react/components/Layouts/AuthoringMainToolBar.d.ts +1 -0
- package/react/components/Layouts/AuthoringMainToolBar.js +8 -1
- package/react/components/Layouts/Container.d.ts +1 -1
- package/react/components/Layouts/ContentSplitter.d.ts +10 -0
- package/react/components/Layouts/ContentSplitter.js +56 -0
- package/react/components/Layouts/Layout.d.ts +8 -0
- package/react/components/Layouts/Layout.js +35 -0
- package/react/components/Layouts/LayoutContainer.js +1 -1
- package/react/components/Layouts/MainPanel.d.ts +1 -0
- package/react/components/Layouts/MainPanel.js +11 -4
- package/react/components/Layouts/OverlayPanel.d.ts +8 -0
- package/react/components/Layouts/OverlayPanel.js +49 -0
- package/react/components/Layouts/Panel.d.ts +1 -0
- package/react/components/Layouts/index.d.ts +6 -2
- package/react/components/Layouts/index.js +12 -4
- package/react/components/Lists/BoxedList.d.ts +2 -0
- package/react/components/Lists/BoxedList.js +6 -4
- package/react/components/Modal.d.ts +2 -0
- package/react/components/Modal.js +11 -3
- package/react/components/Navigation/SideBarTabs.d.ts +1 -0
- package/react/components/Navigation/SideBarTabs.js +4 -0
- package/react/components/SearchBar.d.ts +23 -0
- package/react/components/SearchBar.js +87 -0
- package/react/components/Select.d.ts +1 -0
- package/react/components/Select.js +1 -0
- package/react/components/Spinner.js +1 -1
- package/react/components/SwitchGroup.d.ts +1 -0
- package/react/components/SwitchGroup.js +1 -1
- package/react/index.d.ts +2 -0
- package/react/index.js +5 -0
- package/sd_icons.eot +0 -0
- package/sd_icons.svg +189 -0
- package/sd_icons.ttf +0 -0
- package/sd_icons.woff +0 -0
@@ -0,0 +1,268 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
import * as Markup from '../../js/react';
|
3
|
+
import { BoxedList, BoxedListItem, BoxedListContentRow, Prop, PropsList, Icon, IconButton, AvatarWrapper, AvatarContentText, ButtonGroup, Button, Heading, Text, Label, Container, IconLabel, SelectGrid, Dropdown } from '../../../app-typescript';
|
4
|
+
import { TableList, TableListItem } from '../../../app-typescript/components/Lists/TableList';
|
5
|
+
|
6
|
+
interface IState {
|
7
|
+
array: any;
|
8
|
+
}
|
9
|
+
|
10
|
+
interface IProps {
|
11
|
+
array: any;
|
12
|
+
}
|
13
|
+
|
14
|
+
export default class TableListDoc extends React.Component<IProps, IState> {
|
15
|
+
constructor(props: IState) {
|
16
|
+
super(props);
|
17
|
+
this.state={
|
18
|
+
array: [
|
19
|
+
{
|
20
|
+
start: <>
|
21
|
+
<Label style='translucent' text='aacc' />
|
22
|
+
<Label style='translucent' type='primary' text='prlg' />
|
23
|
+
</>,
|
24
|
+
center: <span>Item 1</span>,
|
25
|
+
end: <IconLabel style='translucent' text='Label success' type='success' icon='time' />,
|
26
|
+
action: <IconButton icon='dots-vertical' size='small' ariaValue='More actions' onClick={()=> false} />,
|
27
|
+
onClick: () => {
|
28
|
+
return false;
|
29
|
+
}
|
30
|
+
},
|
31
|
+
{
|
32
|
+
start: <>
|
33
|
+
<Label style='translucent' text='aacc' />
|
34
|
+
<Label style='translucent' type='primary' text='prlg' />
|
35
|
+
</>,
|
36
|
+
center: <span>Item 2</span>,
|
37
|
+
end: <IconLabel style='translucent' text='Label success' type='success' icon='time' />,
|
38
|
+
action: <IconButton icon='dots-vertical' size='small' ariaValue='More actions' onClick={()=> false} />,
|
39
|
+
onClick: () => {
|
40
|
+
return false;
|
41
|
+
}
|
42
|
+
},
|
43
|
+
{
|
44
|
+
start: <>
|
45
|
+
<Label style='translucent' text='aacc' />
|
46
|
+
<Label style='translucent' type='primary' text='prlg' />
|
47
|
+
</>,
|
48
|
+
center: <span>Item 3</span>,
|
49
|
+
end: <IconLabel style='translucent' text='Label success' type='success' icon='time' />,
|
50
|
+
action: <IconButton icon='dots-vertical' size='small' ariaValue='More actions' onClick={()=> false} />,
|
51
|
+
onClick: () => {
|
52
|
+
return false;
|
53
|
+
}
|
54
|
+
},
|
55
|
+
]
|
56
|
+
}
|
57
|
+
|
58
|
+
}
|
59
|
+
|
60
|
+
render() {
|
61
|
+
return (
|
62
|
+
<section className='docs-page__container'>
|
63
|
+
<h2 className='docs-page__h2'>TableList</h2>
|
64
|
+
|
65
|
+
<Markup.ReactMarkupCodePreview>{`
|
66
|
+
<TableList
|
67
|
+
dragAndDrop
|
68
|
+
addItem
|
69
|
+
array={this.state.array}
|
70
|
+
itemsDropdown={[
|
71
|
+
{ label: 'Action 1', onSelect: () => 1 },
|
72
|
+
{ label: 'Action 2', onSelect: () => 1 },
|
73
|
+
{ label: 'Action 3', onSelect: () => 1 },
|
74
|
+
]} />
|
75
|
+
`}
|
76
|
+
</Markup.ReactMarkupCodePreview>
|
77
|
+
|
78
|
+
<p className="docs-page__paragraph">Basic:</p>
|
79
|
+
|
80
|
+
<Markup.ReactMarkup>
|
81
|
+
<Markup.ReactMarkupPreview>
|
82
|
+
|
83
|
+
<TableList>
|
84
|
+
<TableListItem
|
85
|
+
addItem
|
86
|
+
itemsDropdown={[
|
87
|
+
{ label: <Label style='translucent' text='aacc' />, onSelect: () => 1 },
|
88
|
+
{ label: <Label style='translucent' type='primary' text='prlg' />, onSelect: () => 1 },
|
89
|
+
{ label: <Label style='translucent' type='primary' text='prlg' />, onSelect: () => 1 },
|
90
|
+
]}
|
91
|
+
start={
|
92
|
+
<>
|
93
|
+
<Label style='translucent' text='aacc' />
|
94
|
+
<Label style='translucent' type='primary' text='prlg' />
|
95
|
+
</>
|
96
|
+
}
|
97
|
+
center={
|
98
|
+
<span>Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit.</span>
|
99
|
+
}
|
100
|
+
end={
|
101
|
+
<IconLabel style='translucent' text='Label success' type='success' icon='time' />
|
102
|
+
}
|
103
|
+
action={
|
104
|
+
<IconButton icon='dots-vertical' size='small' ariaValue='More actions' onClick={()=> false} />
|
105
|
+
} />
|
106
|
+
<TableListItem
|
107
|
+
addItem
|
108
|
+
itemsDropdown={[
|
109
|
+
{ label: <Label style='translucent' text='aacc' />, onSelect: () => 1 },
|
110
|
+
{ label: <Label style='translucent' type='primary' text='prlg' />, onSelect: () => 1 },
|
111
|
+
{ label: <Label style='translucent' type='primary' text='prlg' />, onSelect: () => 1 },
|
112
|
+
]}
|
113
|
+
start={
|
114
|
+
<>
|
115
|
+
<Label style='hollow' text='aacc' />
|
116
|
+
<Label style='filled' type='primary' text='prlg' />
|
117
|
+
</>
|
118
|
+
}
|
119
|
+
center={
|
120
|
+
<span>Nullam id dolor id nibh ultricies vehicula ut id elit.</span>
|
121
|
+
}
|
122
|
+
end={
|
123
|
+
<IconLabel style='translucent' text='Label success' type='success' icon='time' />
|
124
|
+
} />
|
125
|
+
<TableListItem
|
126
|
+
addItem
|
127
|
+
itemsDropdown={[
|
128
|
+
{ label: <Label style='translucent' text='aacc' />, onSelect: () => 1 },
|
129
|
+
{ label: <Label style='translucent' type='primary' text='prlg' />, onSelect: () => 1 },
|
130
|
+
{ label: <Label style='translucent' type='primary' text='prlg' />, onSelect: () => 1 },
|
131
|
+
]}
|
132
|
+
start={
|
133
|
+
<>
|
134
|
+
<Label style='translucent' text='aacc' />
|
135
|
+
<Label style='translucent' type='primary' text='prlg' />
|
136
|
+
</>
|
137
|
+
}
|
138
|
+
center={
|
139
|
+
<span>Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit.</span>
|
140
|
+
}
|
141
|
+
end={
|
142
|
+
<IconLabel style='translucent' text='Label success' type='success' icon='time' />
|
143
|
+
}
|
144
|
+
action={
|
145
|
+
<IconButton icon='dots-vertical' size='small' ariaValue='More actions' onClick={()=> false} />
|
146
|
+
} />
|
147
|
+
</TableList>
|
148
|
+
|
149
|
+
</Markup.ReactMarkupPreview>
|
150
|
+
<Markup.ReactMarkupCode>{`
|
151
|
+
<TableList>
|
152
|
+
<TableListItem
|
153
|
+
addItem
|
154
|
+
itemsDropdown={[
|
155
|
+
{ label: <Label style='translucent' text='aacc' />, onSelect: () => 1 },
|
156
|
+
{ label: <Label style='translucent' type='primary' text='prlg' />, onSelect: () => 1 },
|
157
|
+
{ label: <Label style='translucent' type='primary' text='prlg' />, onSelect: () => 1 },
|
158
|
+
]}
|
159
|
+
start={
|
160
|
+
<>
|
161
|
+
<Label style='translucent' text='aacc' />
|
162
|
+
<Label style='translucent' type='primary' text='prlg' />
|
163
|
+
</>
|
164
|
+
}
|
165
|
+
center={
|
166
|
+
<span>Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit.</span>
|
167
|
+
}
|
168
|
+
end={
|
169
|
+
<IconLabel style='translucent' text='Label success' type='success' icon='time' />
|
170
|
+
}
|
171
|
+
action={
|
172
|
+
<IconButton icon='dots-vertical' size='small' ariaValue='More actions' onClick={()=> false} />
|
173
|
+
} />
|
174
|
+
<TableListItem
|
175
|
+
addItem
|
176
|
+
itemsDropdown={[
|
177
|
+
{ label: <Label style='translucent' text='aacc' />, onSelect: () => 1 },
|
178
|
+
{ label: <Label style='translucent' type='primary' text='prlg' />, onSelect: () => 1 },
|
179
|
+
{ label: <Label style='translucent' type='primary' text='prlg' />, onSelect: () => 1 },
|
180
|
+
]}
|
181
|
+
start={
|
182
|
+
<>
|
183
|
+
<Label style='hollow' text='aacc' />
|
184
|
+
<Label style='filled' type='primary' text='prlg' />
|
185
|
+
</>
|
186
|
+
}
|
187
|
+
center={
|
188
|
+
<span>Nullam id dolor id nibh ultricies vehicula ut id elit.</span>
|
189
|
+
}
|
190
|
+
end={
|
191
|
+
<IconLabel style='translucent' text='Label success' type='success' icon='time' />
|
192
|
+
} />
|
193
|
+
<TableListItem
|
194
|
+
addItem
|
195
|
+
itemsDropdown={[
|
196
|
+
{ label: <Label style='translucent' text='aacc' />, onSelect: () => 1 },
|
197
|
+
{ label: <Label style='translucent' type='primary' text='prlg' />, onSelect: () => 1 },
|
198
|
+
{ label: <Label style='translucent' type='primary' text='prlg' />, onSelect: () => 1 },
|
199
|
+
]}
|
200
|
+
start={
|
201
|
+
<>
|
202
|
+
<Label style='translucent' text='aacc' />
|
203
|
+
<Label style='translucent' type='primary' text='prlg' />
|
204
|
+
</>
|
205
|
+
}
|
206
|
+
center={
|
207
|
+
<span>Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit.</span>
|
208
|
+
}
|
209
|
+
end={
|
210
|
+
<IconLabel style='translucent' text='Label success' type='success' icon='time' />
|
211
|
+
}
|
212
|
+
action={
|
213
|
+
<IconButton icon='dots-vertical' size='small' ariaValue='More actions' onClick={()=> false} />
|
214
|
+
} />
|
215
|
+
</TableList>
|
216
|
+
`}
|
217
|
+
</Markup.ReactMarkupCode>
|
218
|
+
</Markup.ReactMarkup>
|
219
|
+
<p className="docs-page__paragraph">With drag and drop functionality:</p>
|
220
|
+
<Markup.ReactMarkup>
|
221
|
+
<Markup.ReactMarkupPreview>
|
222
|
+
|
223
|
+
<TableList
|
224
|
+
dragAndDrop
|
225
|
+
addItem
|
226
|
+
array={this.state.array}
|
227
|
+
itemsDropdown={[
|
228
|
+
{ label: <Label style='translucent' type='primary' text='aacc' />, onSelect: () => 1 },
|
229
|
+
{ label: <Label style='translucent' text='prlg' />, onSelect: () => 1 },
|
230
|
+
{ label: <Label style='translucent' type='primary' text='prlg' />, onSelect: () => 1 },
|
231
|
+
]}
|
232
|
+
onClick={() => false}
|
233
|
+
/>
|
234
|
+
|
235
|
+
</Markup.ReactMarkupPreview>
|
236
|
+
<Markup.ReactMarkupCode>{`
|
237
|
+
<TableList
|
238
|
+
dragAndDrop
|
239
|
+
addItem
|
240
|
+
array={this.state.array}
|
241
|
+
itemsDropdown={[
|
242
|
+
{ label: <Label style='translucent' type='primary' text='aacc' />, onSelect: () => 1 },
|
243
|
+
{ label: <Label style='translucent' text='prlg' />, onSelect: () => 1 },
|
244
|
+
{ label: <Label style='translucent' type='primary' text='prlg' />, onSelect: () => 1 },
|
245
|
+
]}
|
246
|
+
onClick={() => false}
|
247
|
+
/>
|
248
|
+
`}
|
249
|
+
</Markup.ReactMarkupCode>
|
250
|
+
</Markup.ReactMarkup>
|
251
|
+
|
252
|
+
<h3 className="docs-page__h3">Props</h3>
|
253
|
+
<p className="docs-page__paragraph">BoxedList</p>
|
254
|
+
<PropsList>
|
255
|
+
<Prop name='density' isRequired={false} type='compact | comfortable' default='compact' description='Increase the gap beetween list items.'/>
|
256
|
+
</PropsList>
|
257
|
+
<p className="docs-page__paragraph">BoxedListItem</p>
|
258
|
+
<PropsList>
|
259
|
+
<Prop name='clickable' isRequired={false} type='boolean' default='false' description='Adds hover effect and changes the cursor to poiter.'/>
|
260
|
+
<Prop name='selected' isRequired={false} type='boolean' default='false' description='Changes the state to selected and adds apropriate styling for it.'/>
|
261
|
+
<Prop name='slideInActions' isRequired={false} type='boolean' default='false' description='If set to true, the action buttons will be hidden and slide in from the right on hover.'/>
|
262
|
+
<Prop name='type' isRequired={false} type='default | primary | success | warning | alert | highlight' default='/' description='Adds a clour coded border on the right, based on the selected type.'/>
|
263
|
+
</PropsList>
|
264
|
+
|
265
|
+
</section>
|
266
|
+
)
|
267
|
+
}
|
268
|
+
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "superdesk-ui-framework",
|
3
|
-
"version": "3.0.1-beta.
|
3
|
+
"version": "3.0.1-beta.2",
|
4
4
|
"license": "AGPL-3.0",
|
5
5
|
"repository": {
|
6
6
|
"type": "git",
|
@@ -91,6 +91,7 @@
|
|
91
91
|
"date-fns": "2.7.0",
|
92
92
|
"popper.js": "1.14.4",
|
93
93
|
"primeicons": "2.0.0",
|
94
|
+
"react-beautiful-dnd": "^13.0.0",
|
94
95
|
"react-id-generator": "^3.0.0",
|
95
96
|
"react-popper": "^2.2.3",
|
96
97
|
"react-scrollspy": "^3.4.3"
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
interface IProps {
|
3
|
+
id?: string;
|
4
|
+
ariaValue: string;
|
5
|
+
toolTipFlow?: 'top' | 'left' | 'right' | 'down';
|
6
|
+
type?: 'default' | 'primary' | 'highlight' | 'darker';
|
7
|
+
state?: 'normal' | 'active';
|
8
|
+
value?: 'button' | 'submit' | 'reset';
|
9
|
+
onClick(): void;
|
10
|
+
}
|
11
|
+
export declare class CreateButton extends React.PureComponent<IProps> {
|
12
|
+
static defaultProps: {
|
13
|
+
toolTipFlow: string;
|
14
|
+
};
|
15
|
+
render(): JSX.Element;
|
16
|
+
}
|
17
|
+
export {};
|
@@ -0,0 +1,66 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
3
|
+
var extendStatics = function (d, b) {
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
6
|
+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
7
|
+
return extendStatics(d, b);
|
8
|
+
};
|
9
|
+
return function (d, b) {
|
10
|
+
extendStatics(d, b);
|
11
|
+
function __() { this.constructor = d; }
|
12
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
13
|
+
};
|
14
|
+
})();
|
15
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
16
|
+
if (k2 === undefined) k2 = k;
|
17
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
18
|
+
}) : (function(o, m, k, k2) {
|
19
|
+
if (k2 === undefined) k2 = k;
|
20
|
+
o[k2] = m[k];
|
21
|
+
}));
|
22
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
23
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
24
|
+
}) : function(o, v) {
|
25
|
+
o["default"] = v;
|
26
|
+
});
|
27
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
28
|
+
if (mod && mod.__esModule) return mod;
|
29
|
+
var result = {};
|
30
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
31
|
+
__setModuleDefault(result, mod);
|
32
|
+
return result;
|
33
|
+
};
|
34
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
35
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
36
|
+
};
|
37
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
38
|
+
exports.CreateButton = void 0;
|
39
|
+
var React = __importStar(require("react"));
|
40
|
+
var classnames_1 = __importDefault(require("classnames"));
|
41
|
+
var Icon_1 = require("./Icon");
|
42
|
+
var Tooltip_1 = require("./Tooltip");
|
43
|
+
var CreateButton = /** @class */ (function (_super) {
|
44
|
+
__extends(CreateButton, _super);
|
45
|
+
function CreateButton() {
|
46
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
47
|
+
}
|
48
|
+
CreateButton.prototype.render = function () {
|
49
|
+
var _a;
|
50
|
+
var classes = classnames_1.default('sd-create-btn', (_a = {
|
51
|
+
'sd-navbtn--active': this.props.state === 'active'
|
52
|
+
},
|
53
|
+
_a["sd-navbtn--" + this.props.type] = this.props.type,
|
54
|
+
_a));
|
55
|
+
var value = this.props.value === undefined ? 'button' : this.props.value;
|
56
|
+
return (React.createElement(Tooltip_1.Tooltip, { text: this.props.ariaValue, flow: this.props.toolTipFlow, appendToBody: true },
|
57
|
+
React.createElement("button", { type: value, className: classes, tabIndex: 0, onClick: this.props.onClick, "aria-label": this.props.ariaValue, id: this.props.id },
|
58
|
+
React.createElement(Icon_1.Icon, { name: "plus-large" }),
|
59
|
+
React.createElement("span", { className: "circle" }))));
|
60
|
+
};
|
61
|
+
CreateButton.defaultProps = {
|
62
|
+
toolTipFlow: 'left',
|
63
|
+
};
|
64
|
+
return CreateButton;
|
65
|
+
}(React.PureComponent));
|
66
|
+
exports.CreateButton = CreateButton;
|
@@ -79,8 +79,8 @@ var DropZone = /** @class */ (function (_super) {
|
|
79
79
|
_a["sd-dropzone__drop-target--" + this.props.type] = this.props.type,
|
80
80
|
_a), this.props.className);
|
81
81
|
return (React.createElement("div", { className: classes, onDragLeave: function (event) { return _this.dragLeave(event); }, onDragEnter: function (event) { return _this.dragEnter(event); }, onDragOver: function (event) { return _this.dragOver(event); }, onDrop: function (event) { return _this.drop(event); }, onDragStart: function () { return false; }, onDragEnd: function () { return false; } },
|
82
|
-
React.createElement("div", { className: 'sd-dropzone__target-border' },
|
83
|
-
|
82
|
+
React.createElement("div", { className: 'sd-dropzone__target-border' }),
|
83
|
+
React.createElement("input", { type: "file", className: 'sd-dropzone__input' }),
|
84
84
|
this.props.icon ?
|
85
85
|
React.createElement("figure", { className: 'sd-dropzone__icon', "aria-hidden": 'true' },
|
86
86
|
React.createElement(Icon_1.Icon, { name: 'upload-alt', size: 'big' })) : null,
|
@@ -4,6 +4,7 @@ interface IProps {
|
|
4
4
|
size?: 'small' | 'big';
|
5
5
|
type?: 'default' | 'primary' | 'success' | 'warning' | 'alert' | 'highlight' | 'light';
|
6
6
|
className?: string;
|
7
|
+
scale?: '2x' | '3x' | '4x';
|
7
8
|
ariaHidden?: boolean;
|
8
9
|
}
|
9
10
|
export declare class Icon extends React.PureComponent<IProps> {
|
package/react/components/Icon.js
CHANGED
@@ -48,7 +48,8 @@ var Icon = /** @class */ (function (_super) {
|
|
48
48
|
var classes = classnames_1.default(this.props.className, (_a = {},
|
49
49
|
_a["icon-" + this.props.name] = (this.props.name && !this.props.size) || (this.props.name && this.props.size === 'small'),
|
50
50
|
_a["big-icon--" + this.props.name] = this.props.name && this.props.size === 'big',
|
51
|
-
_a["" + this.props.type] = this.props.type,
|
51
|
+
_a["color--" + this.props.type] = this.props.type,
|
52
|
+
_a["scale--" + this.props.scale] = this.props.scale,
|
52
53
|
_a));
|
53
54
|
return (React.createElement("i", { className: classes, "aria-label": this.props.name, "aria-hidden": this.props.ariaHidden }));
|
54
55
|
};
|
@@ -1,7 +1,9 @@
|
|
1
1
|
import * as React from 'react';
|
2
2
|
interface IProps {
|
3
3
|
text: string;
|
4
|
+
innerLabel?: string;
|
4
5
|
type?: 'default' | 'primary' | 'success' | 'warning' | 'alert' | 'highlight' | 'sd-green';
|
6
|
+
size?: 'default' | 'large' | 'small';
|
5
7
|
icon?: string;
|
6
8
|
style?: 'basic' | 'translucent';
|
7
9
|
}
|
@@ -48,12 +48,15 @@ var IconLabel = /** @class */ (function (_super) {
|
|
48
48
|
var _a;
|
49
49
|
var classes = classnames_1.default('label-icon', (_a = {},
|
50
50
|
_a["label-icon--" + this.props.type] = this.props.type !== undefined,
|
51
|
+
_a["label-icon--" + this.props.size] = this.props.size !== undefined,
|
51
52
|
_a['label-icon--translucent'] = this.props.style === 'translucent',
|
52
53
|
_a));
|
53
54
|
return (React.createElement("span", { className: classes },
|
54
|
-
|
55
|
-
|
56
|
-
this.props.
|
55
|
+
this.props.icon ?
|
56
|
+
React.createElement(Icon_1.Icon, { name: this.props.icon }) : null,
|
57
|
+
this.props.innerLabel ?
|
58
|
+
React.createElement("span", { className: 'label-icon--inner-label' }, this.props.innerLabel) : null,
|
59
|
+
React.createElement("span", { className: 'label-icon__value' }, this.props.text)));
|
57
60
|
};
|
58
61
|
return IconLabel;
|
59
62
|
}(React.PureComponent));
|
@@ -70,6 +70,7 @@ var Input = /** @class */ (function (_super) {
|
|
70
70
|
'sd-input--inline-label': this.props.inlineLabel,
|
71
71
|
'sd-input--required': this.props.required,
|
72
72
|
'sd-input--disabled': this.props.disabled,
|
73
|
+
'sd-input--full-width': this.props.fullWidth,
|
73
74
|
'sd-input--invalid': this.props.invalid || this.state.invalid,
|
74
75
|
});
|
75
76
|
var labelClasses = classnames_1.default('sd-input__label', {
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
interface IProps {
|
3
|
+
children?: React.ReactNode;
|
4
|
+
side?: 'left' | 'right';
|
5
|
+
background?: 'transparent' | 'light' | 'grey' | 'dark';
|
6
|
+
open?: boolean;
|
7
|
+
}
|
8
|
+
export declare class AuthoringContainer extends React.PureComponent<IProps> {
|
9
|
+
render(): JSX.Element;
|
10
|
+
}
|
11
|
+
export {};
|
@@ -0,0 +1,58 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
3
|
+
var extendStatics = function (d, b) {
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
6
|
+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
7
|
+
return extendStatics(d, b);
|
8
|
+
};
|
9
|
+
return function (d, b) {
|
10
|
+
extendStatics(d, b);
|
11
|
+
function __() { this.constructor = d; }
|
12
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
13
|
+
};
|
14
|
+
})();
|
15
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
16
|
+
if (k2 === undefined) k2 = k;
|
17
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
18
|
+
}) : (function(o, m, k, k2) {
|
19
|
+
if (k2 === undefined) k2 = k;
|
20
|
+
o[k2] = m[k];
|
21
|
+
}));
|
22
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
23
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
24
|
+
}) : function(o, v) {
|
25
|
+
o["default"] = v;
|
26
|
+
});
|
27
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
28
|
+
if (mod && mod.__esModule) return mod;
|
29
|
+
var result = {};
|
30
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
31
|
+
__setModuleDefault(result, mod);
|
32
|
+
return result;
|
33
|
+
};
|
34
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
35
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
36
|
+
};
|
37
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
38
|
+
exports.AuthoringContainer = void 0;
|
39
|
+
var React = __importStar(require("react"));
|
40
|
+
var classnames_1 = __importDefault(require("classnames"));
|
41
|
+
var AuthoringContainer = /** @class */ (function (_super) {
|
42
|
+
__extends(AuthoringContainer, _super);
|
43
|
+
function AuthoringContainer() {
|
44
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
45
|
+
}
|
46
|
+
AuthoringContainer.prototype.render = function () {
|
47
|
+
var _a;
|
48
|
+
var classes = classnames_1.default('sd-content-wrapper__authoring-content-area', (_a = {},
|
49
|
+
_a["sd-content-wrapper__authoring-content-area--" + this.props.side] = this.props.side,
|
50
|
+
_a["sd-content-wrapper__authoring-content-area--" + this.props.background] = this.props.background !== 'light' && this.props.background !== undefined,
|
51
|
+
_a['open-editor'] = this.props.open,
|
52
|
+
_a));
|
53
|
+
return (React.createElement("div", { className: classes },
|
54
|
+
React.createElement("div", { className: 'sd-editor__container' }, this.props.children)));
|
55
|
+
};
|
56
|
+
return AuthoringContainer;
|
57
|
+
}(React.PureComponent));
|
58
|
+
exports.AuthoringContainer = AuthoringContainer;
|
@@ -49,10 +49,13 @@ var AuthoringInnerHeader = /** @class */ (function (_super) {
|
|
49
49
|
return _this;
|
50
50
|
}
|
51
51
|
AuthoringInnerHeader.prototype.render = function () {
|
52
|
+
var _a;
|
52
53
|
var _this = this;
|
53
|
-
var classes = classnames_1.default('sd-editor-content__authoring-header', {
|
54
|
-
|
55
|
-
|
54
|
+
var classes = classnames_1.default('sd-editor-content__authoring-header', (_a = {
|
55
|
+
'authoring-header--collapsed': this.state.collapsed
|
56
|
+
},
|
57
|
+
_a["authoring-header--padding-" + this.props.headerPadding] = this.props.headerPadding,
|
58
|
+
_a));
|
56
59
|
return (React.createElement("header", { className: classes },
|
57
60
|
React.createElement("div", { className: "authoring-header__holder" }, this.props.children),
|
58
61
|
React.createElement("button", { className: "authoring-header__toggle", onClick: function () { return _this.setState({ collapsed: !_this.state.collapsed }); } },
|
@@ -1,10 +1,12 @@
|
|
1
1
|
import * as React from 'react';
|
2
2
|
interface IProps {
|
3
|
-
toolBar
|
3
|
+
toolBar?: React.ReactNode;
|
4
4
|
authoringMain?: React.ReactNode;
|
5
5
|
authoringHeader?: React.ReactNode;
|
6
6
|
authoringBookmarks?: React.ReactNode;
|
7
7
|
headerCollapsed?: boolean;
|
8
|
+
headerPadding?: 'small' | 'medium' | 'large';
|
9
|
+
toolbarCustom?: boolean;
|
8
10
|
}
|
9
11
|
export declare class AuthoringMain extends React.PureComponent<IProps> {
|
10
12
|
render(): JSX.Element;
|
@@ -42,9 +42,9 @@ var AuthoringMain = /** @class */ (function (_super) {
|
|
42
42
|
}
|
43
43
|
AuthoringMain.prototype.render = function () {
|
44
44
|
return (React.createElement(_1.AuthoringMainContainer, null,
|
45
|
-
React.createElement(_1.AuthoringMainToolBar,
|
45
|
+
this.props.toolBar && (React.createElement(_1.AuthoringMainToolBar, { toolbarCustom: this.props.toolbarCustom }, this.props.toolBar)),
|
46
46
|
React.createElement(_1.AuthoringMainContent, null,
|
47
|
-
React.createElement(_1.AuthoringInnerHeader,
|
47
|
+
this.props.authoringHeader && (React.createElement(_1.AuthoringInnerHeader, { headerPadding: this.props.headerPadding }, this.props.authoringHeader)),
|
48
48
|
this.props.authoringBookmarks && (React.createElement(_1.AuthorinInnerSideBar, null, this.props.authoringBookmarks)),
|
49
49
|
React.createElement(_1.AuthoringInnerBody, null, this.props.children))));
|
50
50
|
};
|
@@ -31,16 +31,23 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
31
31
|
__setModuleDefault(result, mod);
|
32
32
|
return result;
|
33
33
|
};
|
34
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
35
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
36
|
+
};
|
34
37
|
Object.defineProperty(exports, "__esModule", { value: true });
|
35
38
|
exports.AuthoringMainToolBar = void 0;
|
36
39
|
var React = __importStar(require("react"));
|
40
|
+
var classnames_1 = __importDefault(require("classnames"));
|
37
41
|
var AuthoringMainToolBar = /** @class */ (function (_super) {
|
38
42
|
__extends(AuthoringMainToolBar, _super);
|
39
43
|
function AuthoringMainToolBar() {
|
40
44
|
return _super !== null && _super.apply(this, arguments) || this;
|
41
45
|
}
|
42
46
|
AuthoringMainToolBar.prototype.render = function () {
|
43
|
-
|
47
|
+
var classes = classnames_1.default('sd-editor-content__toolbar', {
|
48
|
+
'sd-editor-content__toolbar--custom': this.props.toolbarCustom,
|
49
|
+
});
|
50
|
+
return (React.createElement("div", { className: classes }, this.props.children));
|
44
51
|
};
|
45
52
|
return AuthoringMainToolBar;
|
46
53
|
}(React.PureComponent));
|
@@ -5,7 +5,7 @@ interface IProps {
|
|
5
5
|
className?: string;
|
6
6
|
display?: 'flex' | 'inline-flex' | 'block';
|
7
7
|
direction?: 'row' | 'column';
|
8
|
-
gap?: 'none' | 'small' | 'medium' | 'large';
|
8
|
+
gap?: 'none' | 'x-small' | 'small' | 'medium' | 'large';
|
9
9
|
theme?: 'light' | 'dark';
|
10
10
|
}
|
11
11
|
export declare class Container extends React.PureComponent<IProps> {
|