superdesk-ui-framework 3.0.75 → 3.0.76
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/img/icon_illustrations/IconIllustration__headlines.svg +25 -0
- package/app/img/icon_illustrations/IconIllustration__keywords.svg +46 -0
- package/app/img/icon_illustrations/IconIllustration__optimise.svg +38 -0
- package/app/img/icon_illustrations/IconIllustration__summary.svg +27 -0
- package/app/img/icon_illustrations/IconIllustration__translate.svg +12 -0
- package/app/styles/_buttons.scss +47 -0
- package/app/styles/components/_sd-grid-item.scss +4 -0
- package/app-typescript/components/IllustrationButton.tsx +29 -0
- package/app-typescript/components/SvgIconIllustration.tsx +191 -0
- package/app-typescript/index.ts +2 -0
- package/dist/examples.bundle.js +993 -550
- package/dist/playgrounds/react-playgrounds/Rundowns.tsx +1 -1
- package/dist/playgrounds/react-playgrounds/TestGround.tsx +189 -12
- package/dist/react/IllustrationButton.tsx +89 -0
- package/dist/react/Index.tsx +6 -1
- package/dist/superdesk-ui.bundle.css +42 -1
- package/dist/superdesk-ui.bundle.js +584 -304
- package/dist/vendor.bundle.js +13 -13
- package/examples/pages/playgrounds/react-playgrounds/Rundowns.tsx +1 -1
- package/examples/pages/playgrounds/react-playgrounds/TestGround.tsx +189 -12
- package/examples/pages/react/IllustrationButton.tsx +89 -0
- package/examples/pages/react/Index.tsx +6 -1
- package/package.json +1 -4
- package/react/components/IllustrationButton.d.ts +11 -0
- package/react/components/IllustrationButton.js +62 -0
- package/react/components/SvgIconIllustration.d.ts +9 -0
- package/react/components/SvgIconIllustration.js +199 -0
- package/react/index.d.ts +2 -0
- package/react/index.js +6 -2
package/dist/vendor.bundle.js
CHANGED
@@ -70,7 +70,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
70
70
|
/******/ __webpack_require__.p = "";
|
71
71
|
/******/
|
72
72
|
/******/ // Load entry module and return exports
|
73
|
-
/******/ return __webpack_require__(__webpack_require__.s =
|
73
|
+
/******/ return __webpack_require__(__webpack_require__.s = 576);
|
74
74
|
/******/ })
|
75
75
|
/************************************************************************/
|
76
76
|
/******/ ({
|
@@ -28246,7 +28246,7 @@ module.exports = function(module) {
|
|
28246
28246
|
|
28247
28247
|
/***/ }),
|
28248
28248
|
|
28249
|
-
/***/
|
28249
|
+
/***/ 576:
|
28250
28250
|
/***/ (function(module, exports, __webpack_require__) {
|
28251
28251
|
|
28252
28252
|
"use strict";
|
@@ -28256,19 +28256,19 @@ __webpack_require__(21);
|
|
28256
28256
|
|
28257
28257
|
__webpack_require__(44);
|
28258
28258
|
|
28259
|
-
__webpack_require__(575);
|
28260
|
-
|
28261
28259
|
__webpack_require__(577);
|
28262
28260
|
|
28263
28261
|
__webpack_require__(579);
|
28264
28262
|
|
28263
|
+
__webpack_require__(581);
|
28264
|
+
|
28265
28265
|
__webpack_require__(0);
|
28266
28266
|
|
28267
28267
|
__webpack_require__(8);
|
28268
28268
|
|
28269
28269
|
/***/ }),
|
28270
28270
|
|
28271
|
-
/***/
|
28271
|
+
/***/ 577:
|
28272
28272
|
/***/ (function(module, exports, __webpack_require__) {
|
28273
28273
|
|
28274
28274
|
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
|
@@ -28292,7 +28292,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
28292
28292
|
if ( true ) {
|
28293
28293
|
|
28294
28294
|
// AMD. Register as an anonymous module.
|
28295
|
-
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [ __webpack_require__(44), __webpack_require__(
|
28295
|
+
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [ __webpack_require__(44), __webpack_require__(578) ], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
|
28296
28296
|
__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
|
28297
28297
|
(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
|
28298
28298
|
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
@@ -29030,7 +29030,7 @@ return $.widget;
|
|
29030
29030
|
|
29031
29031
|
/***/ }),
|
29032
29032
|
|
29033
|
-
/***/
|
29033
|
+
/***/ 578:
|
29034
29034
|
/***/ (function(module, exports, __webpack_require__) {
|
29035
29035
|
|
29036
29036
|
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;( function( factory ) {
|
@@ -29060,16 +29060,16 @@ return $.ui.version = "1.13.0";
|
|
29060
29060
|
|
29061
29061
|
/***/ }),
|
29062
29062
|
|
29063
|
-
/***/
|
29063
|
+
/***/ 579:
|
29064
29064
|
/***/ (function(module, exports, __webpack_require__) {
|
29065
29065
|
|
29066
|
-
__webpack_require__(
|
29066
|
+
__webpack_require__(580);
|
29067
29067
|
module.exports = angular;
|
29068
29068
|
|
29069
29069
|
|
29070
29070
|
/***/ }),
|
29071
29071
|
|
29072
|
-
/***/
|
29072
|
+
/***/ 580:
|
29073
29073
|
/***/ (function(module, exports, __webpack_require__) {
|
29074
29074
|
|
29075
29075
|
/* WEBPACK VAR INJECTION */(function(__webpack_provided_window_dot_jQuery) {/**
|
@@ -65676,16 +65676,16 @@ $provide.value("$locale", {
|
|
65676
65676
|
|
65677
65677
|
/***/ }),
|
65678
65678
|
|
65679
|
-
/***/
|
65679
|
+
/***/ 581:
|
65680
65680
|
/***/ (function(module, exports, __webpack_require__) {
|
65681
65681
|
|
65682
|
-
__webpack_require__(
|
65682
|
+
__webpack_require__(582);
|
65683
65683
|
module.exports = 'ngAnimate';
|
65684
65684
|
|
65685
65685
|
|
65686
65686
|
/***/ }),
|
65687
65687
|
|
65688
|
-
/***/
|
65688
|
+
/***/ 582:
|
65689
65689
|
/***/ (function(module, exports) {
|
65690
65690
|
|
65691
65691
|
/**
|
@@ -872,7 +872,7 @@ export class Rundowns extends React.Component<IProps, IState> {
|
|
872
872
|
size='x-large' onHide={() => {this.setState({modalManageShow: false})}}
|
873
873
|
>
|
874
874
|
<Layout.LayoutContainer>
|
875
|
-
|
875
|
+
<Layout.HeaderPanel>
|
876
876
|
<SubNav zIndex={2}>
|
877
877
|
<SearchBar placeholder='Search shows'></SearchBar>
|
878
878
|
<ButtonGroup align='end' spaces='no-space'>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import * as React from 'react';
|
2
2
|
import * as Components from './components/Index';
|
3
|
-
import { Checkbox, RadioGroup, CheckboxButton, RadioButtonGroup, Button, Dropdown, Input, Label, Icon, IconButton, Badge, ThemeSelector, Container, IconLabel, Tooltip, Spinner, Divider, InputWrapper, InputNew, InputBase, Text, FormRowNew, ButtonGroup, Heading, SearchBar, Modal, BoxedList, BoxedListItem, TimePicker, DatePicker, TreeSelect, ContentDivider, Select, Option, AvatarGroup} from '../../../../app-typescript/index';
|
3
|
+
import { Checkbox, RadioGroup, CheckboxButton, RadioButtonGroup, Button, Dropdown, Input, Label, Icon, IconButton, Badge, ThemeSelector, Container, IconLabel, Tooltip, Spinner, Divider, InputWrapper, InputNew, InputBase, Text, FormRowNew, ButtonGroup, Heading, SearchBar, Modal, BoxedList, BoxedListItem, TimePicker, DatePicker, TreeSelect, ContentDivider, Select, Option, AvatarGroup, SvgIconIllustration, IllustrationButton} from '../../../../app-typescript/index';
|
4
4
|
import { IAvatarInGroup } from '../../../../app-typescript/components/avatar/avatar-group';
|
5
5
|
import { FormLabel } from '../../../../app-typescript/components/Form/FormLabel';
|
6
6
|
|
@@ -27,9 +27,11 @@ interface IState {
|
|
27
27
|
modalSaveEvent: boolean;
|
28
28
|
modalSaveEvent2: boolean;
|
29
29
|
modalSaveEvent3: boolean;
|
30
|
+
modalSaveEvent4: boolean;
|
30
31
|
treeSelectValue: any;
|
31
32
|
value: any;
|
32
33
|
valueS2: any;
|
34
|
+
thisTheme: string;
|
33
35
|
}
|
34
36
|
|
35
37
|
let options2 = [
|
@@ -66,9 +68,11 @@ export class TestGround extends React.Component<IProps, IState> {
|
|
66
68
|
modalSaveEvent: false,
|
67
69
|
modalSaveEvent2: false,
|
68
70
|
modalSaveEvent3: false,
|
71
|
+
modalSaveEvent4: false,
|
69
72
|
treeSelectValue: [],
|
70
73
|
value: undefined,
|
71
74
|
valueS2: undefined,
|
75
|
+
thisTheme: 'light-ui',
|
72
76
|
}
|
73
77
|
}
|
74
78
|
|
@@ -80,6 +84,12 @@ export class TestGround extends React.Component<IProps, IState> {
|
|
80
84
|
}
|
81
85
|
}
|
82
86
|
|
87
|
+
toggleTheme = () => {
|
88
|
+
this.setState( {
|
89
|
+
thisTheme: this.state.thisTheme === 'light-ui' ? 'dark-ui' : 'light-ui',
|
90
|
+
});
|
91
|
+
};
|
92
|
+
|
83
93
|
render() {
|
84
94
|
const avatars: Array<IAvatarInGroup> = [
|
85
95
|
{
|
@@ -107,6 +117,7 @@ export class TestGround extends React.Component<IProps, IState> {
|
|
107
117
|
icon:{name: 'file', color: 'var(--sd-colour-highlight)'}
|
108
118
|
},
|
109
119
|
];
|
120
|
+
|
110
121
|
const modalSaveEventFooterOne=(
|
111
122
|
<ButtonGroup align="end">
|
112
123
|
<Button text='Cancel' onClick={() => this.setState({modalSaveEvent:false})} />
|
@@ -126,15 +137,129 @@ export class TestGround extends React.Component<IProps, IState> {
|
|
126
137
|
</ButtonGroup>
|
127
138
|
);
|
128
139
|
return (
|
129
|
-
<Components.Layout header='Testing Ground'>
|
140
|
+
<Components.Layout header='Testing Ground' theme={this.state.thisTheme}>
|
130
141
|
<Components.LayoutContainer>
|
131
142
|
<Components.MainPanel>
|
143
|
+
|
144
|
+
<ButtonGroup align='end'>
|
145
|
+
<IconButton icon="adjust" ariaValue="Toggle theme" onClick={this.toggleTheme} toolTipFlow='left' />
|
146
|
+
</ButtonGroup>
|
147
|
+
|
148
|
+
<hr />
|
149
|
+
<SvgIconIllustration illustration='headlines' />
|
150
|
+
<hr />
|
151
|
+
|
152
|
+
<div className='sd-grid-list sd-grid-list--xx-small sd-grid-list--gap-s sd-grid-list--no-margin' style={{width:'290px'}}>
|
153
|
+
|
154
|
+
<IllustrationButton text='Headlines' onClick={()=> false}>
|
155
|
+
<SvgIconIllustration illustration='headlines' />
|
156
|
+
</IllustrationButton>
|
157
|
+
|
158
|
+
<IllustrationButton text='Keywords' onClick={()=> false}>
|
159
|
+
<SvgIconIllustration illustration='keywords' />
|
160
|
+
</IllustrationButton>
|
161
|
+
|
162
|
+
<IllustrationButton text='Optimise' onClick={()=> false}>
|
163
|
+
<SvgIconIllustration illustration='optimise' />
|
164
|
+
</IllustrationButton>
|
165
|
+
|
166
|
+
<IllustrationButton text='Summary' onClick={()=> false}>
|
167
|
+
<SvgIconIllustration illustration='summary' />
|
168
|
+
</IllustrationButton>
|
169
|
+
|
170
|
+
<IllustrationButton text='Translate' onClick={()=> false}>
|
171
|
+
<SvgIconIllustration illustration='translate' />
|
172
|
+
</IllustrationButton>
|
173
|
+
|
174
|
+
{/* <button className='illustration-button illustration-button--headlines'>
|
175
|
+
<SvgIconIllustration illustration='headlines' />
|
176
|
+
<span className='illustration-button__text-label'>
|
177
|
+
Headlines
|
178
|
+
</span>
|
179
|
+
</button>
|
180
|
+
|
181
|
+
<button className='illustration-button illustration-button--headlines'>
|
182
|
+
<SvgIconIllustration illustration='keywords' />
|
183
|
+
<span className='illustration-button__text-label'>
|
184
|
+
Keywords
|
185
|
+
</span>
|
186
|
+
</button>
|
187
|
+
|
188
|
+
<button className='illustration-button illustration-button--headlines'>
|
189
|
+
<SvgIconIllustration illustration='optimise' />
|
190
|
+
<span className='illustration-button__text-label'>
|
191
|
+
Optimise
|
192
|
+
</span>
|
193
|
+
</button>
|
194
|
+
|
195
|
+
<button className='illustration-button illustration-button--headlines'>
|
196
|
+
<SvgIconIllustration illustration='summary' />
|
197
|
+
<span className='illustration-button__text-label'>
|
198
|
+
Summary
|
199
|
+
</span>
|
200
|
+
</button>
|
201
|
+
|
202
|
+
<button className='illustration-button illustration-button--headlines'>
|
203
|
+
<SvgIconIllustration illustration='translate' />
|
204
|
+
<span className='illustration-button__text-label'>
|
205
|
+
Translate
|
206
|
+
</span>
|
207
|
+
</button> */}
|
208
|
+
|
209
|
+
</div>
|
210
|
+
|
211
|
+
<hr />
|
212
|
+
|
213
|
+
<Heading type='h3'>Below is an example structure of the content inside the 'Headlines' AI Assistant section</Heading>
|
214
|
+
<Text size="small" weight="light">Note: The surrounding div with inline styles is only there for the purpose of this demo. </Text>
|
215
|
+
|
216
|
+
<div className='' style={{width:'290px', marginBlockStart:'32px'}}>
|
217
|
+
<Container gap="small" direction='column'>
|
218
|
+
<Text size="small" weight="medium">
|
219
|
+
Praesent commodo cursus magna, vel scelerisque nisl consectetur et aenean eu leo quam ultricies.
|
220
|
+
</Text>
|
221
|
+
<ButtonGroup>
|
222
|
+
<Button size='small' text="Apply" onClick={()=> false} type="default" style="hollow" />
|
223
|
+
<IconButton ariaValue='Copy' icon='copy' onClick={()=> false} />
|
224
|
+
</ButtonGroup>
|
225
|
+
</Container>
|
226
|
+
|
227
|
+
<ContentDivider type="dashed" margin='small' />
|
228
|
+
|
229
|
+
<Container gap="small" direction='column'>
|
230
|
+
<Text size="small" weight="medium">
|
231
|
+
Aenean eu leo quam pellentesque ornare sem lacinia quam venenatis vestibulum nullam id dolor id nibh ultricies vehicula elit.
|
232
|
+
</Text>
|
233
|
+
<ButtonGroup>
|
234
|
+
<Button size='small' text="Apply" onClick={()=> false} type="default" style="hollow" />
|
235
|
+
<IconButton ariaValue='Copy' icon='copy' onClick={()=> false} />
|
236
|
+
</ButtonGroup>
|
237
|
+
</Container>
|
238
|
+
|
239
|
+
<ContentDivider type="dashed" margin='small' />
|
240
|
+
|
241
|
+
<Container gap="small" direction='column'>
|
242
|
+
<Text size="small" weight="medium">
|
243
|
+
Vestibulum id ligula porta felis euismod semper morbi leo risus, porta ac consectetur ac, vestibulum at eros maecenas faucibus.
|
244
|
+
</Text>
|
245
|
+
<ButtonGroup>
|
246
|
+
<Button size='small' text="Apply" onClick={()=> false} type="default" style="hollow" />
|
247
|
+
<IconButton ariaValue='Copy' icon='copy' onClick={()=> false} />
|
248
|
+
</ButtonGroup>
|
249
|
+
</Container>
|
250
|
+
|
251
|
+
</div>
|
252
|
+
|
253
|
+
<hr />
|
254
|
+
|
132
255
|
<ButtonGroup>
|
133
256
|
<Button text="Save Event Modal (Event only)" onClick={() => this.setState({modalSaveEvent: true})} />
|
134
257
|
<Button text="Save Event Modal (Event & Planning)" onClick={() => this.setState({modalSaveEvent2: true})} />
|
135
258
|
<Button text="Save Event Modal (Planning only)" onClick={() => this.setState({modalSaveEvent3: true})} />
|
136
259
|
</ButtonGroup>
|
260
|
+
|
137
261
|
<hr />
|
262
|
+
|
138
263
|
{/* <button type="button" className="sd-dropdown-button" aria-haspopup="true" aria-expanded="false">
|
139
264
|
<span className="sd-dropdown-button__text-block">
|
140
265
|
<label className="sd-dropdown-button__text-label">Coverage:</label>
|
@@ -144,6 +269,7 @@ export class TestGround extends React.Component<IProps, IState> {
|
|
144
269
|
</button> */}
|
145
270
|
|
146
271
|
<hr />
|
272
|
+
|
147
273
|
<Button text="Planning Templates" onClick={() => this.setState({modalPlanningTemplates: true})} />
|
148
274
|
<span></span>
|
149
275
|
|
@@ -249,8 +375,12 @@ export class TestGround extends React.Component<IProps, IState> {
|
|
249
375
|
<Option>This and all future events</Option>
|
250
376
|
<Option>All events</Option>
|
251
377
|
</Select>
|
252
|
-
<ContentDivider type="
|
253
|
-
<Heading type='
|
378
|
+
<ContentDivider type="solid" margin="medium" />
|
379
|
+
<Heading type='h3' className='mb-1 sd-text--strong'>Related Planning(s)</Heading>
|
380
|
+
<Text size='small' className='mb-1'>
|
381
|
+
<strong>You made changes to a planning item that is a part of a recurring event</strong>.
|
382
|
+
Apply the changes to all recurring planning items or just this one?
|
383
|
+
</Text>
|
254
384
|
<div className='sd-list-item-group--space-between-items'>
|
255
385
|
<div role="listitem" className="sd-list-item sd-shadow--z1 mb-1">
|
256
386
|
<div className="sd-list-item__border sd-list-item__border--locked"></div>
|
@@ -274,10 +404,7 @@ export class TestGround extends React.Component<IProps, IState> {
|
|
274
404
|
</div>
|
275
405
|
</div>
|
276
406
|
</div>
|
277
|
-
|
278
|
-
<strong>You made changes to a planning item that is a part of a recurring event</strong>.
|
279
|
-
Update all recurring planning or just this one?
|
280
|
-
</Text>
|
407
|
+
|
281
408
|
<Select
|
282
409
|
value={this.state.valueS2}
|
283
410
|
label='Update:'
|
@@ -309,7 +436,11 @@ export class TestGround extends React.Component<IProps, IState> {
|
|
309
436
|
footerTemplate={modalSaveEventFooterThree}
|
310
437
|
onHide={() => {this.setState({modalSaveEvent3: false})}}
|
311
438
|
>
|
312
|
-
<Heading type='
|
439
|
+
<Heading type='h3' className='mb-1 sd-text--strong'>Related Planning(s)</Heading>
|
440
|
+
<Text size='small' className='mb-1'>
|
441
|
+
<strong>You made changes to a planning item that is a part of a recurring event</strong>.
|
442
|
+
Apply the changes to all recurring planning items or just this one?
|
443
|
+
</Text>
|
313
444
|
<div className='sd-list-item-group--space-between-items'>
|
314
445
|
<div role="listitem" className="sd-list-item sd-shadow--z1 mb-1">
|
315
446
|
<div className="sd-list-item__border sd-list-item__border--locked"></div>
|
@@ -333,10 +464,56 @@ export class TestGround extends React.Component<IProps, IState> {
|
|
333
464
|
</div>
|
334
465
|
</div>
|
335
466
|
</div>
|
467
|
+
|
468
|
+
<Select
|
469
|
+
value={this.state.valueS2}
|
470
|
+
label='Update:'
|
471
|
+
required={false}
|
472
|
+
disabled={false}
|
473
|
+
inlineLabel={true}
|
474
|
+
labelHidden={true}
|
475
|
+
onChange={(valueS2) => {
|
476
|
+
this.setState({
|
477
|
+
value: valueS2,
|
478
|
+
})
|
479
|
+
}}
|
480
|
+
>
|
481
|
+
<Option>This planning only</Option>
|
482
|
+
<Option>This and all future plannings</Option>
|
483
|
+
<Option>All plannings</Option>
|
484
|
+
</Select>
|
485
|
+
|
486
|
+
<ContentDivider type="dashed" margin='small' />
|
487
|
+
|
336
488
|
<Text size='small' className='mb-1'>
|
337
489
|
<strong>You made changes to a planning item that is a part of a recurring event</strong>.
|
338
|
-
|
490
|
+
Apply the changes to all recurring planning items or just this one?
|
339
491
|
</Text>
|
492
|
+
|
493
|
+
<div className='sd-list-item-group--space-between-items'>
|
494
|
+
<div role="listitem" className="sd-list-item sd-shadow--z1 mb-1">
|
495
|
+
<div className="sd-list-item__border sd-list-item__border--locked"></div>
|
496
|
+
<div className="sd-list-item__column sd-list-item__column--grow sd-list-item__column--no-border">
|
497
|
+
<div className="sd-list-item__row">
|
498
|
+
<i role="presentation" className="icon-calendar icon--light-blue"></i>
|
499
|
+
<span className="sd-list-item__slugline">Planning Slug</span>
|
500
|
+
<span className="sd-overflow-ellipsis sd-list-item--element-grow">
|
501
|
+
<span className="sd-list-item__text-strong">Cras justo odio, dapibus ac facilisis in.</span>
|
502
|
+
</span>
|
503
|
+
</div>
|
504
|
+
<div className="sd-list-item__row sd-list-item__row--overflow-visible me-1">
|
505
|
+
<Label text='draft' style='translucent'/>
|
506
|
+
<span className="sd-margin-s--auto">
|
507
|
+
<AvatarGroup
|
508
|
+
size="small"
|
509
|
+
items={avatars}
|
510
|
+
/>
|
511
|
+
</span>
|
512
|
+
</div>
|
513
|
+
</div>
|
514
|
+
</div>
|
515
|
+
</div>
|
516
|
+
|
340
517
|
<Select
|
341
518
|
value={this.state.valueS2}
|
342
519
|
label='Update:'
|
@@ -344,9 +521,9 @@ export class TestGround extends React.Component<IProps, IState> {
|
|
344
521
|
disabled={false}
|
345
522
|
inlineLabel={true}
|
346
523
|
labelHidden={true}
|
347
|
-
onChange={(
|
524
|
+
onChange={(valueS3) => {
|
348
525
|
this.setState({
|
349
|
-
value:
|
526
|
+
value: valueS3,
|
350
527
|
})
|
351
528
|
}}
|
352
529
|
>
|
@@ -0,0 +1,89 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
import {IllustrationButton, SvgIconIllustration, Prop, PropsList} from '../../../app-typescript';
|
3
|
+
import * as Markup from '../../js/react';
|
4
|
+
|
5
|
+
export class IllustrationButtonDoc extends React.Component {
|
6
|
+
render() {
|
7
|
+
return (
|
8
|
+
<section className="docs-page__container">
|
9
|
+
<h2 className="docs-page__h2">Illustration Button & SVG icon illustration</h2>
|
10
|
+
<Markup.ReactMarkupCodePreview>{`
|
11
|
+
<IllustrationButton text='Headlines' onClick={()=> false}>
|
12
|
+
<SvgIconIllustration illustration='headlines' />
|
13
|
+
</IllustrationButton>
|
14
|
+
`}
|
15
|
+
</Markup.ReactMarkupCodePreview>
|
16
|
+
<Markup.ReactMarkup>
|
17
|
+
<Markup.ReactMarkupPreview>
|
18
|
+
<div className="docs-page__content-row">
|
19
|
+
{/* Note: The style attribute is added only for the purpose of the demo */}
|
20
|
+
<div
|
21
|
+
className='sd-grid-list sd-grid-list--xx-small sd-grid-list--gap-s sd-grid-list--no-margin'
|
22
|
+
style={{width:'290px'}}
|
23
|
+
>
|
24
|
+
<IllustrationButton text='Headlines' onClick={()=> false}>
|
25
|
+
<SvgIconIllustration illustration='headlines' />
|
26
|
+
</IllustrationButton>
|
27
|
+
|
28
|
+
<IllustrationButton text='Keywords' onClick={()=> false}>
|
29
|
+
<SvgIconIllustration illustration='keywords' />
|
30
|
+
</IllustrationButton>
|
31
|
+
|
32
|
+
<IllustrationButton text='Optimise' onClick={()=> false}>
|
33
|
+
<SvgIconIllustration illustration='optimise' />
|
34
|
+
</IllustrationButton>
|
35
|
+
|
36
|
+
<IllustrationButton text='Summary' onClick={()=> false}>
|
37
|
+
<SvgIconIllustration illustration='summary' />
|
38
|
+
</IllustrationButton>
|
39
|
+
|
40
|
+
<IllustrationButton text='Translate' onClick={()=> false}>
|
41
|
+
<SvgIconIllustration illustration='translate' />
|
42
|
+
</IllustrationButton>
|
43
|
+
</div>
|
44
|
+
</div>
|
45
|
+
</Markup.ReactMarkupPreview>
|
46
|
+
<Markup.ReactMarkupCode>{`
|
47
|
+
// Note: The style attribute is added only for the purpose of the demo
|
48
|
+
<div className='sd-grid-list sd-grid-list--xx-small sd-grid-list--gap-s sd-grid-list--no-margin' style={{width:'290px'}}>
|
49
|
+
<IllustrationButton text='Headlines' onClick={()=> false}>
|
50
|
+
<SvgIconIllustration illustration='headlines' />
|
51
|
+
</IllustrationButton>
|
52
|
+
|
53
|
+
<IllustrationButton text='Keywords' onClick={()=> false}>
|
54
|
+
<SvgIconIllustration illustration='keywords' />
|
55
|
+
</IllustrationButton>
|
56
|
+
|
57
|
+
<IllustrationButton text='Optimise' onClick={()=> false}>
|
58
|
+
<SvgIconIllustration illustration='optimise' />
|
59
|
+
</IllustrationButton>
|
60
|
+
|
61
|
+
<IllustrationButton text='Summary' onClick={()=> false}>
|
62
|
+
<SvgIconIllustration illustration='summary' />
|
63
|
+
</IllustrationButton>
|
64
|
+
|
65
|
+
<IllustrationButton text='Translate' onClick={()=> false}>
|
66
|
+
<SvgIconIllustration illustration='translate' />
|
67
|
+
</IllustrationButton>
|
68
|
+
</div>
|
69
|
+
`}
|
70
|
+
</Markup.ReactMarkupCode>
|
71
|
+
</Markup.ReactMarkup>
|
72
|
+
|
73
|
+
<h3 className="docs-page__h3">Props</h3>
|
74
|
+
<h4 className="docs-page__h4">IllustrationButton</h4>
|
75
|
+
<PropsList>
|
76
|
+
<Prop name='text' isRequired={true} type='string' default='/' description='Button text label'/>
|
77
|
+
<Prop name='onClick' isRequired={true} type='function' default='false' description='Callback fired when a button is pressed.'/>
|
78
|
+
<Prop name='disabled' isRequired={false} type='boolean' default='false' description='Disables the Button, preventing mouse events.'/>
|
79
|
+
</PropsList>
|
80
|
+
|
81
|
+
<h3 className="docs-page__h3">Props</h3>
|
82
|
+
<h4 className="docs-page__h4">SvgIconIllustration</h4>
|
83
|
+
<PropsList>
|
84
|
+
<Prop name='illustration' isRequired={true} type='headlines | keywords | optimise | summary | translate' default='/' description='Choose the desired illustration.'/>
|
85
|
+
</PropsList>
|
86
|
+
</section>
|
87
|
+
);
|
88
|
+
}
|
89
|
+
}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import * as React from 'react';
|
2
2
|
|
3
3
|
import { ReactNav, ReactDefault } from '../../js/react';
|
4
|
-
import { ButtonGroup, Button, NavButton, Dropdown } from '../../../app-typescript/index';
|
4
|
+
import { ButtonGroup, Button, NavButton, Dropdown, IllustrationButton } from '../../../app-typescript/index';
|
5
5
|
|
6
6
|
import {
|
7
7
|
Switch,
|
@@ -69,6 +69,7 @@ import { PopoverDoc } from './Popover';
|
|
69
69
|
import { MenuDocs } from './Menu';
|
70
70
|
import {WithSizeObserverDocs} from './WithSizeObserver';
|
71
71
|
import {ResizablePanelsDoc} from './ResizablePanels';
|
72
|
+
import { IllustrationButtonDoc } from './IllustrationButton';
|
72
73
|
|
73
74
|
const pages = {
|
74
75
|
basicComponents: {
|
@@ -130,6 +131,9 @@ const pages = {
|
|
130
131
|
},
|
131
132
|
"drag-handle": {
|
132
133
|
name: 'Drag handle'
|
134
|
+
},
|
135
|
+
"illustration-button" : {
|
136
|
+
name: 'Illustration Button'
|
133
137
|
}
|
134
138
|
}
|
135
139
|
},
|
@@ -399,6 +403,7 @@ class ReactDoc extends React.Component<IProps, IState> {
|
|
399
403
|
<Route path="/react/dropzone" component={DropZoneDoc} />
|
400
404
|
<Route path="/react/create-button" component={CreateButtonDoc} />
|
401
405
|
<Route path="/react/resizable-panels" component={ResizablePanelsDoc} />
|
406
|
+
<Route path="/react/illustration-button" component={IllustrationButtonDoc} />
|
402
407
|
<Route path="/" component={ReactDefault} />
|
403
408
|
</Switch>
|
404
409
|
</main>
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "superdesk-ui-framework",
|
3
|
-
"version": "3.0.
|
3
|
+
"version": "3.0.76",
|
4
4
|
"license": "AGPL-3.0",
|
5
5
|
"repository": {
|
6
6
|
"type": "git",
|
@@ -72,7 +72,6 @@
|
|
72
72
|
"prismjs": "^1.28.0",
|
73
73
|
"prop-types": "^15.6.0",
|
74
74
|
"react": "16.8.6",
|
75
|
-
"react-bootstrap": "^0.31.2",
|
76
75
|
"react-dom": "16.8.6",
|
77
76
|
"react-redux": "^5.0.6",
|
78
77
|
"react-router-dom": "^5.1.2",
|
@@ -92,7 +91,6 @@
|
|
92
91
|
"webpack-merge": "^4.2.1"
|
93
92
|
},
|
94
93
|
"dependencies": {
|
95
|
-
"@material-ui/lab": "^4.0.0-alpha.56",
|
96
94
|
"@popperjs/core": "^2.4.0",
|
97
95
|
"@superdesk/primereact": "^5.0.2-12",
|
98
96
|
"@superdesk/react-resizable-panels": "0.0.39",
|
@@ -108,7 +106,6 @@
|
|
108
106
|
"primeicons": "2.0.0",
|
109
107
|
"react-beautiful-dnd": "^13.0.0",
|
110
108
|
"react-id-generator": "^3.0.0",
|
111
|
-
"react-popper": "^2.2.3",
|
112
109
|
"react-scrollspy": "^3.4.3"
|
113
110
|
}
|
114
111
|
}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
interface IProps {
|
3
|
+
text: string;
|
4
|
+
onClick(event: React.MouseEvent<HTMLButtonElement, MouseEvent>): void;
|
5
|
+
children?: React.ReactNode;
|
6
|
+
disabled?: boolean;
|
7
|
+
}
|
8
|
+
export declare class IllustrationButton extends React.PureComponent<IProps> {
|
9
|
+
render(): JSX.Element;
|
10
|
+
}
|
11
|
+
export {};
|
@@ -0,0 +1,62 @@
|
|
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 (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
7
|
+
return extendStatics(d, b);
|
8
|
+
};
|
9
|
+
return function (d, b) {
|
10
|
+
if (typeof b !== "function" && b !== null)
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
12
|
+
extendStatics(d, b);
|
13
|
+
function __() { this.constructor = d; }
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
15
|
+
};
|
16
|
+
})();
|
17
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
18
|
+
if (k2 === undefined) k2 = k;
|
19
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
20
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
21
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
22
|
+
}
|
23
|
+
Object.defineProperty(o, k2, desc);
|
24
|
+
}) : (function(o, m, k, k2) {
|
25
|
+
if (k2 === undefined) k2 = k;
|
26
|
+
o[k2] = m[k];
|
27
|
+
}));
|
28
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
29
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
30
|
+
}) : function(o, v) {
|
31
|
+
o["default"] = v;
|
32
|
+
});
|
33
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
34
|
+
if (mod && mod.__esModule) return mod;
|
35
|
+
var result = {};
|
36
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
37
|
+
__setModuleDefault(result, mod);
|
38
|
+
return result;
|
39
|
+
};
|
40
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
41
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
42
|
+
};
|
43
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
44
|
+
exports.IllustrationButton = void 0;
|
45
|
+
var React = __importStar(require("react"));
|
46
|
+
var classnames_1 = __importDefault(require("classnames"));
|
47
|
+
var IllustrationButton = /** @class */ (function (_super) {
|
48
|
+
__extends(IllustrationButton, _super);
|
49
|
+
function IllustrationButton() {
|
50
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
51
|
+
}
|
52
|
+
IllustrationButton.prototype.render = function () {
|
53
|
+
var classes = (0, classnames_1.default)('illustration-button', {
|
54
|
+
'illustration-button--disabled': this.props.disabled,
|
55
|
+
});
|
56
|
+
return (React.createElement("button", { className: classes, tabIndex: 0, onClick: this.props.onClick },
|
57
|
+
this.props.children,
|
58
|
+
React.createElement("span", { className: 'illustration-button__text-label' }, this.props.text)));
|
59
|
+
};
|
60
|
+
return IllustrationButton;
|
61
|
+
}(React.PureComponent));
|
62
|
+
exports.IllustrationButton = IllustrationButton;
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
interface IProps {
|
3
|
+
illustration: 'headlines' | 'keywords' | 'optimise' | 'summary' | 'translate';
|
4
|
+
}
|
5
|
+
export declare class SvgIconIllustration extends React.PureComponent<IProps> {
|
6
|
+
renderSVG(): JSX.Element | null;
|
7
|
+
render(): JSX.Element;
|
8
|
+
}
|
9
|
+
export {};
|