superdesk-ui-framework 3.0.1-beta.3 → 3.0.1-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/styles/_sd-tag-input.scss +201 -296
- package/app/styles/components/_list-item.scss +13 -1
- package/app/styles/components/_sd-photo-preview.scss +1 -1
- package/app/styles/design-tokens/_new-colors.scss +1 -1
- package/app/styles/form-elements/_forms-general.scss +22 -7
- package/app/styles/form-elements/_inputs.scss +131 -54
- package/app-typescript/components/Badge.tsx +3 -2
- package/app-typescript/components/DatePicker.tsx +40 -52
- package/app-typescript/components/DurationInput.tsx +306 -0
- package/app-typescript/components/Form/InputBase.tsx +85 -0
- package/app-typescript/components/Form/InputNew.tsx +105 -0
- package/app-typescript/components/Form/InputWrapper.tsx +79 -0
- package/app-typescript/components/Form/index.tsx +3 -0
- package/app-typescript/components/Input.tsx +28 -45
- package/app-typescript/components/Label.tsx +49 -10
- package/app-typescript/components/Layouts/Layout.tsx +1 -1
- package/app-typescript/components/Lists/ContentList.tsx +4 -4
- package/app-typescript/components/MultiSelect.tsx +37 -50
- package/app-typescript/components/Navigation/BottomNav.tsx +3 -2
- package/app-typescript/components/Select.tsx +23 -41
- package/app-typescript/components/SelectWithTemplate.tsx +32 -7
- package/app-typescript/components/TimePicker.tsx +48 -16
- package/app-typescript/components/TreeSelect.tsx +423 -195
- package/app-typescript/index.ts +3 -1
- package/dist/examples.bundle.js +16398 -15334
- package/dist/playgrounds/react-playgrounds/CoreLayout.tsx +64 -54
- package/dist/playgrounds/react-playgrounds/RundownEditor.tsx +24 -16
- package/dist/playgrounds/react-playgrounds/TestGround.tsx +76 -1
- package/dist/playgrounds/react-playgrounds/components/Layout.tsx +1 -1
- package/dist/react/Badges.tsx +18 -0
- package/dist/react/ContentList.tsx +15 -9
- package/dist/react/DatePicker.tsx +21 -1
- package/dist/react/DurationInput.tsx +104 -0
- package/dist/react/Index.tsx +5 -0
- package/dist/react/Inputs.tsx +153 -2
- package/dist/react/Labels.tsx +51 -1
- package/dist/react/MultiSelect.tsx +4 -1
- package/dist/react/SelectWithTemplate.tsx +6 -1
- package/dist/react/TableList.tsx +22 -44
- package/dist/react/TimePicker.tsx +16 -8
- package/dist/react/TreeSelect.tsx +301 -48
- package/dist/react/tree-select/TreeSelect.tsx +273 -0
- package/dist/react/tree-select/example-1.tsx +71 -0
- package/dist/react/tree-select/example-2.tsx +59 -0
- package/dist/superdesk-ui.bundle.css +411 -370
- package/dist/superdesk-ui.bundle.js +15554 -14493
- package/dist/vendor.bundle.js +27 -27
- package/examples/pages/playgrounds/react-playgrounds/CoreLayout.tsx +64 -54
- package/examples/pages/playgrounds/react-playgrounds/RundownEditor.tsx +24 -16
- package/examples/pages/playgrounds/react-playgrounds/TestGround.tsx +76 -1
- package/examples/pages/playgrounds/react-playgrounds/components/Layout.tsx +1 -1
- package/examples/pages/react/Badges.tsx +18 -0
- package/examples/pages/react/ContentList.tsx +15 -9
- package/examples/pages/react/DatePicker.tsx +21 -1
- package/examples/pages/react/DurationInput.tsx +104 -0
- package/examples/pages/react/Index.tsx +5 -0
- package/examples/pages/react/Inputs.tsx +153 -2
- package/examples/pages/react/Labels.tsx +51 -1
- package/examples/pages/react/MultiSelect.tsx +4 -1
- package/examples/pages/react/SelectWithTemplate.tsx +6 -1
- package/examples/pages/react/TableList.tsx +22 -44
- package/examples/pages/react/TimePicker.tsx +16 -8
- package/examples/pages/react/TreeSelect.tsx +301 -48
- package/examples/pages/react/tree-select/TreeSelect.tsx +273 -0
- package/examples/pages/react/tree-select/example-1.tsx +71 -0
- package/examples/pages/react/tree-select/example-2.tsx +59 -0
- package/package.json +2 -1
- package/react/components/Badge.d.ts +1 -0
- package/react/components/Badge.js +2 -2
- package/react/components/DatePicker.d.ts +1 -0
- package/react/components/DatePicker.js +6 -22
- package/react/components/DurationInput.d.ts +38 -0
- package/react/components/DurationInput.js +271 -0
- package/react/components/Form/InputBase.d.ts +42 -0
- package/react/components/Form/InputBase.js +72 -0
- package/react/components/Form/InputNew.d.ts +45 -0
- package/react/components/Form/InputNew.js +73 -0
- package/react/components/Form/InputWrapper.d.ts +28 -0
- package/react/components/Form/InputWrapper.js +91 -0
- package/react/components/Form/index.d.ts +3 -0
- package/react/components/Form/index.js +7 -1
- package/react/components/Input.js +5 -34
- package/react/components/Label.d.ts +1 -0
- package/react/components/Label.js +18 -2
- package/react/components/Layouts/Layout.js +1 -1
- package/react/components/Lists/ContentList.d.ts +45 -0
- package/react/components/Lists/ContentList.js +85 -0
- package/react/components/Navigation/BottomNav.d.ts +1 -0
- package/react/components/Navigation/BottomNav.js +2 -2
- package/react/components/Select.d.ts +1 -1
- package/react/components/Select.js +4 -26
- package/react/components/SelectWithTemplate.d.ts +11 -1
- package/react/components/SelectWithTemplate.js +19 -10
- package/react/components/TimePicker.d.ts +15 -2
- package/react/components/TimePicker.js +15 -4
- package/react/components/TreeSelect.d.ts +75 -0
- package/react/components/TreeSelect.js +448 -0
- package/react/index.d.ts +3 -0
- package/react/index.js +8 -3
@@ -1,7 +1,7 @@
|
|
1
1
|
import * as React from 'react';
|
2
2
|
|
3
3
|
import * as Markup from '../../js/react';
|
4
|
-
import {DatePicker, PropsList, Prop} from '../../../app-typescript';
|
4
|
+
import {DatePicker, PropsList, Prop, DatePickerISO} from '../../../app-typescript';
|
5
5
|
|
6
6
|
class DatePickerExample extends React.PureComponent<{}, {date: Date}> {
|
7
7
|
constructor(props) {
|
@@ -48,6 +48,11 @@ export default class DatePickerDoc extends React.Component {
|
|
48
48
|
onChange={(date) => {
|
49
49
|
this.setState({date});
|
50
50
|
}}
|
51
|
+
required
|
52
|
+
tabindex={1}
|
53
|
+
label={'This is Label'}
|
54
|
+
info={'This is info'}
|
55
|
+
error={'This is error'}
|
51
56
|
/>
|
52
57
|
);
|
53
58
|
}
|
@@ -58,6 +63,21 @@ export default class DatePickerDoc extends React.Component {
|
|
58
63
|
<div className='docs-page__content-row'>
|
59
64
|
<DatePickerExample />
|
60
65
|
</div>
|
66
|
+
|
67
|
+
<p className="docs-page__paragraph">// DatePickerISO</p>
|
68
|
+
<div className='docs-page__content-row'>
|
69
|
+
<DatePickerISO
|
70
|
+
value={'2019-01-01'}
|
71
|
+
dateFormat="YYYY-MM-DD"
|
72
|
+
onChange={(date) => {
|
73
|
+
this.setState({date});
|
74
|
+
}}
|
75
|
+
tabindex={1}
|
76
|
+
label={'This is Label'}
|
77
|
+
info={'This is info'}
|
78
|
+
error={'This is error'}
|
79
|
+
/>
|
80
|
+
</div>
|
61
81
|
</Markup.ReactMarkupPreview>
|
62
82
|
<Markup.ReactMarkupCode>{`
|
63
83
|
<DatePicker
|
@@ -0,0 +1,104 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
|
3
|
+
import * as Markup from '../../js/react';
|
4
|
+
|
5
|
+
import { Input, Select, CheckGroup, Checkbox, PropsList, Prop } from '../../../app-typescript';
|
6
|
+
import { DurationInput } from '../../../app-typescript/components/DurationInput';
|
7
|
+
|
8
|
+
interface IState {
|
9
|
+
inlineLabel: boolean;
|
10
|
+
required: boolean;
|
11
|
+
disabled: boolean;
|
12
|
+
invalid: boolean;
|
13
|
+
}
|
14
|
+
|
15
|
+
export default class DurationInputDoc extends React.Component<{}, IState> {
|
16
|
+
constructor(props) {
|
17
|
+
super(props);
|
18
|
+
this.state = {
|
19
|
+
inlineLabel: false,
|
20
|
+
required: true,
|
21
|
+
disabled: false,
|
22
|
+
invalid: false,
|
23
|
+
}
|
24
|
+
}
|
25
|
+
|
26
|
+
render() {
|
27
|
+
return (
|
28
|
+
<section className='docs-page__container'>
|
29
|
+
<h2 className='docs-page__h2'>Duration Input</h2>
|
30
|
+
<Markup.ReactMarkupCodePreview>{`
|
31
|
+
<DurationInput
|
32
|
+
label='Label'
|
33
|
+
info='info message'
|
34
|
+
disabled={this.state.disabled}
|
35
|
+
required={this.state.required}
|
36
|
+
invalid={this.state.invalid}
|
37
|
+
inlineLabel={this.state.inlineLabel}
|
38
|
+
onChange={(e) => {
|
39
|
+
console.log(e)
|
40
|
+
}}
|
41
|
+
/>
|
42
|
+
`}
|
43
|
+
</Markup.ReactMarkupCodePreview>
|
44
|
+
<p className='docs-page__paragraph'></p>
|
45
|
+
<Markup.ReactMarkup>
|
46
|
+
<Markup.ReactMarkupPreview>
|
47
|
+
<div className='docs-page__content-row docs-page__content-row--no-margin'>
|
48
|
+
<div className='form__row'>
|
49
|
+
<CheckGroup>
|
50
|
+
<Checkbox checked={this.state.required} label={{text:'Required input'}} onChange={(value) => {this.setState({required: value})}} />
|
51
|
+
<Checkbox checked={this.state.disabled} label={{text:'Disabled input'}} onChange={(value) => {this.setState({disabled: value})}} />
|
52
|
+
<Checkbox checked={this.state.invalid} label={{text:'Invalid input'}} onChange={(value) => {this.setState({invalid: value})}} />
|
53
|
+
<Checkbox checked={this.state.inlineLabel} label={{text:'Label positioned inline'}} onChange={(value) => {this.setState({inlineLabel: value})}} />
|
54
|
+
</CheckGroup>
|
55
|
+
</div>
|
56
|
+
|
57
|
+
<div className='form__row'>
|
58
|
+
<DurationInput
|
59
|
+
label='Label'
|
60
|
+
info='info message'
|
61
|
+
disabled={this.state.disabled}
|
62
|
+
required={this.state.required}
|
63
|
+
invalid={this.state.invalid}
|
64
|
+
inlineLabel={this.state.inlineLabel}
|
65
|
+
onChange={(e) => {
|
66
|
+
console.log(e)
|
67
|
+
}}
|
68
|
+
/>
|
69
|
+
</div>
|
70
|
+
</div>
|
71
|
+
|
72
|
+
</Markup.ReactMarkupPreview>
|
73
|
+
<Markup.ReactMarkupCode>{`
|
74
|
+
<DurationInput
|
75
|
+
label='Label'
|
76
|
+
info='info message'
|
77
|
+
disabled={this.state.disabled}
|
78
|
+
required={this.state.required}
|
79
|
+
invalid={this.state.invalid}
|
80
|
+
inlineLabel={this.state.inlineLabel}
|
81
|
+
onChange={(e) => {
|
82
|
+
console.log(e)
|
83
|
+
}}
|
84
|
+
/>
|
85
|
+
`}</Markup.ReactMarkupCode>
|
86
|
+
</Markup.ReactMarkup>
|
87
|
+
|
88
|
+
<h3 className='docs-page__h3'>Props</h3>
|
89
|
+
<PropsList>
|
90
|
+
<Prop name='hours' isRequired={false} type='number' default='00' description='Hours value'/>
|
91
|
+
<Prop name='minutes' isRequired={false} type='number' default='00' description='Minutes value'/>
|
92
|
+
<Prop name='seconds' isRequired={false} type='number' default='00' description='Seconds value'/>
|
93
|
+
<Prop name='label' isRequired={false} type='string' default='/' description='Input label'/>
|
94
|
+
<Prop name='info' isRequired={false} type='string' default='/' description='Hint text'/>
|
95
|
+
<Prop name='error' isRequired={false} type='string' default='/' description='Error text'/>
|
96
|
+
<Prop name='inlineLabel' isRequired={false} type='boolean' default='false' description='Position labels as inline'/>
|
97
|
+
<Prop name='required' isRequired={false} type='boolean' default='false' description='Mark field as required'/>
|
98
|
+
<Prop name='disabled' isRequired={false} type='boolean' default='false' description='Mark field as disabled'/>
|
99
|
+
<Prop name='invalid' isRequired={false} type='boolean' default='false' description='Mark field as invalid'/>
|
100
|
+
</PropsList>
|
101
|
+
</section>
|
102
|
+
)
|
103
|
+
}
|
104
|
+
}
|
@@ -61,6 +61,7 @@ import * as Playgrounds from '../playgrounds/react-playgrounds/Index';
|
|
61
61
|
import { SelectWithTemplateDocs } from './SelectWithTemplate';
|
62
62
|
import { MultiselectDocs } from './MultiSelect';
|
63
63
|
import { TreeSelectDocs } from './TreeSelect';
|
64
|
+
import DurationInputDoc from './DurationInput';
|
64
65
|
import { PopoverDoc } from './Popover';
|
65
66
|
import { MenuDocs } from './Menu';
|
66
67
|
import {WithSizeObserverDocs} from './WithSizeObserver';
|
@@ -240,6 +241,9 @@ const pages = {
|
|
240
241
|
'icon-picker': {
|
241
242
|
name: 'Icon Picker',
|
242
243
|
},
|
244
|
+
'duration-input': {
|
245
|
+
name: 'Duration Input',
|
246
|
+
},
|
243
247
|
'switch': {
|
244
248
|
name: 'Switch'
|
245
249
|
},
|
@@ -337,6 +341,7 @@ class ReactDoc extends React.Component<IProps, IState> {
|
|
337
341
|
<Route path="/react/with-size-observer" component={WithSizeObserverDocs} />
|
338
342
|
<Route path="/react/multiselect" component={MultiselectDocs} />
|
339
343
|
<Route path="/react/treeselect" component={TreeSelectDocs} />
|
344
|
+
<Route path="/react/duration-input" component={DurationInputDoc} />
|
340
345
|
<Route path="/react/popover" component={PopoverDoc} />
|
341
346
|
<Route path="/react/date-picker" component={DatePickerDoc} />
|
342
347
|
<Route path="/react/time-picker" component={TimePickerDoc} />
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import * as React from 'react';
|
2
|
-
|
3
2
|
import * as Markup from '../../js/react';
|
3
|
+
import { Input, CheckGroup, Checkbox, PropsList, Prop, InputNew } from '../../../app-typescript';
|
4
|
+
import { DurationInput } from '../../../app-typescript/components/DurationInput';
|
4
5
|
|
5
|
-
import { Input, Select, CheckGroup, Checkbox, PropsList, Prop } from '../../../app-typescript';
|
6
6
|
|
7
7
|
interface IState {
|
8
8
|
inlineLabel: boolean;
|
@@ -46,6 +46,23 @@ export default class InputsDoc extends React.Component<{}, IState> {
|
|
46
46
|
<Checkbox checked={this.state.inlineLabel} label={{text:'Label positioned inline'}} onChange={(value) => {this.setState({inlineLabel: value})}} />
|
47
47
|
</CheckGroup>
|
48
48
|
</div>
|
49
|
+
<div className='form__row'>
|
50
|
+
<InputNew
|
51
|
+
label='Label'
|
52
|
+
value=''
|
53
|
+
onChange={(value) => false
|
54
|
+
}
|
55
|
+
|
56
|
+
required={true}
|
57
|
+
info='Nullam Sollicitudin'
|
58
|
+
maxLength={20}
|
59
|
+
//invalid={true}
|
60
|
+
//disabled={true}
|
61
|
+
error='Error message'
|
62
|
+
//inlineLabel={true}
|
63
|
+
//labelHidden={true}
|
64
|
+
type='text' />
|
65
|
+
</div>
|
49
66
|
|
50
67
|
<div className='form__row'>
|
51
68
|
<Input label='Input label'
|
@@ -91,6 +108,12 @@ export default class InputsDoc extends React.Component<{}, IState> {
|
|
91
108
|
tabindex={0}
|
92
109
|
onChange={(value) => this.setState({value2: value})} />
|
93
110
|
</div>
|
111
|
+
<div className='form__row'>
|
112
|
+
<DurationInput
|
113
|
+
onChange={(e) => {
|
114
|
+
console.log(e)
|
115
|
+
}}
|
116
|
+
/>
|
94
117
|
<p className="docs-page__paragraph">// Boxed with hidden label</p>
|
95
118
|
<div className='form__row'>
|
96
119
|
<Input label='Input label'
|
@@ -191,6 +214,7 @@ export default class InputsDoc extends React.Component<{}, IState> {
|
|
191
214
|
tabindex={0}
|
192
215
|
onChange={(value) => this.setState({value2: value})} />
|
193
216
|
</div>
|
217
|
+
</div>
|
194
218
|
</div>
|
195
219
|
|
196
220
|
</Markup.ReactMarkupPreview>
|
@@ -205,6 +229,128 @@ export default class InputsDoc extends React.Component<{}, IState> {
|
|
205
229
|
disabled={false}
|
206
230
|
invalid={false}
|
207
231
|
onChange={(value) => {}} />
|
232
|
+
|
233
|
+
<Input label='Number Input'
|
234
|
+
value={this.state.value}
|
235
|
+
type='number'
|
236
|
+
error='This is error message'
|
237
|
+
info='Morbi leo risus porta ac consectetur ac.'
|
238
|
+
inlineLabel={this.state.inlineLabel}
|
239
|
+
required={this.state.required}
|
240
|
+
disabled={this.state.disabled}
|
241
|
+
invalid={this.state.invalid}
|
242
|
+
tabindex={0}
|
243
|
+
onChange={(value) => {}} />
|
244
|
+
|
245
|
+
// Hidden label
|
246
|
+
<Input label='Input label'
|
247
|
+
value={''}
|
248
|
+
maxLength={25}
|
249
|
+
type='text'
|
250
|
+
placeholder='Placeholder'
|
251
|
+
error='This is error message'
|
252
|
+
info='Donec id elit non mi porta gravida at eget metus.'
|
253
|
+
inlineLabel={true}
|
254
|
+
labelHidden={true}
|
255
|
+
required={this.state.required}
|
256
|
+
disabled={this.state.disabled}
|
257
|
+
invalid={this.state.invalid}
|
258
|
+
tabindex={0}
|
259
|
+
onChange={(value) => {}} />
|
260
|
+
|
261
|
+
// Boxed with hidden label
|
262
|
+
<Input label='Input label'
|
263
|
+
value={''}
|
264
|
+
boxedStyle={true}
|
265
|
+
maxLength={25}
|
266
|
+
type='text'
|
267
|
+
placeholder='Default boxed input'
|
268
|
+
error='This is error message'
|
269
|
+
inlineLabel={true}
|
270
|
+
labelHidden={true}
|
271
|
+
required={this.state.required}
|
272
|
+
disabled={this.state.disabled}
|
273
|
+
invalid={this.state.invalid}
|
274
|
+
tabindex={0}
|
275
|
+
onChange={(value) => {}} />
|
276
|
+
|
277
|
+
<Input label='Input label'
|
278
|
+
value={''}
|
279
|
+
boxedStyle={true}
|
280
|
+
size='large'
|
281
|
+
maxLength={25}
|
282
|
+
type='text'
|
283
|
+
placeholder='Large boxed input'
|
284
|
+
error='This is error message'
|
285
|
+
inlineLabel={true}
|
286
|
+
labelHidden={true}
|
287
|
+
required={this.state.required}
|
288
|
+
disabled={this.state.disabled}
|
289
|
+
invalid={this.state.invalid}
|
290
|
+
tabindex={0}
|
291
|
+
onChange={(value) => {}} />
|
292
|
+
|
293
|
+
<Input label='Input label'
|
294
|
+
value={''}
|
295
|
+
boxedStyle={true}
|
296
|
+
size='x-large'
|
297
|
+
maxLength={25}
|
298
|
+
type='text'
|
299
|
+
placeholder='Extra large boxed input'
|
300
|
+
error='This is error message'
|
301
|
+
inlineLabel={true}
|
302
|
+
labelHidden={true}
|
303
|
+
required={this.state.required}
|
304
|
+
disabled={this.state.disabled}
|
305
|
+
invalid={this.state.invalid}
|
306
|
+
tabindex={0}
|
307
|
+
onChange={(value) => {}} />
|
308
|
+
|
309
|
+
// Boxed with default label
|
310
|
+
<Input label='Input label'
|
311
|
+
value={''}
|
312
|
+
boxedStyle={true}
|
313
|
+
size='large'
|
314
|
+
maxLength={25}
|
315
|
+
placeholder='Placeholder'
|
316
|
+
type='text'
|
317
|
+
error='This is error message'
|
318
|
+
required={this.state.required}
|
319
|
+
disabled={this.state.disabled}
|
320
|
+
invalid={this.state.invalid}
|
321
|
+
tabindex={0}
|
322
|
+
onChange={(value) => {}} />
|
323
|
+
|
324
|
+
// Boxed with boxed label
|
325
|
+
<Input label='Input label'
|
326
|
+
value={''}
|
327
|
+
boxedStyle={true}
|
328
|
+
boxedLable={true}
|
329
|
+
size='large'
|
330
|
+
maxLength={25}
|
331
|
+
placeholder='Placeholder'
|
332
|
+
type='text'
|
333
|
+
error='This is error message'
|
334
|
+
required={this.state.required}
|
335
|
+
disabled={this.state.disabled}
|
336
|
+
invalid={this.state.invalid}
|
337
|
+
tabindex={0}
|
338
|
+
onChange={(value) => {}} />
|
339
|
+
|
340
|
+
<Input label='Input label'
|
341
|
+
value={''}
|
342
|
+
boxedStyle={true}
|
343
|
+
boxedLable={true}
|
344
|
+
size='large'
|
345
|
+
placeholder='Hide my label'
|
346
|
+
labelHidden={true}
|
347
|
+
type='text'
|
348
|
+
error='This is error message'
|
349
|
+
required={this.state.required}
|
350
|
+
disabled={this.state.disabled}
|
351
|
+
invalid={this.state.invalid}
|
352
|
+
tabindex={0}
|
353
|
+
onChange={(value) => {}} />
|
208
354
|
`}</Markup.ReactMarkupCode>
|
209
355
|
</Markup.ReactMarkup>
|
210
356
|
|
@@ -221,6 +367,11 @@ export default class InputsDoc extends React.Component<{}, IState> {
|
|
221
367
|
<Prop name='disabled' isRequired={false} type='boolean' default='false' description='Mark field as disabled'/>
|
222
368
|
<Prop name='invalid' isRequired={false} type='boolean' default='false' description='Mark field as invalid'/>
|
223
369
|
<Prop name='tabindex' isRequired={false} type='number' default='/' description='Indicates an element can be focused on, and determines how that focus is handled.'/>
|
370
|
+
<Prop name='placeholder' isRequired={false} type='string' default='/' description='Defines the text for the placeholder pseudo-element.'/>
|
371
|
+
<Prop name='fullWidth' isRequired={false} type='boolean' default='false' description='Forces the input to take 100% of the container width.'/>
|
372
|
+
<Prop name='boxedStyle' isRequired={false} type='boolean' default='false' description='Applies a boxed style to the input. This style should be used only in the authoring enviroment and similar.'/>
|
373
|
+
<Prop name='boxedLable' isRequired={false} type='boolean' default='false' description='Applies a boxed style to the input label. This label style should be used only in combination with the boxedStyle input inside the authoring enviroment.'/>
|
374
|
+
<Prop name='size' isRequired={false} type='medium | large | x-large' default='medium' description='Specifies the size of the input. Defaults to medium and should be changed only in special cases (e.g. titles, headlines etc.).'/>
|
224
375
|
</PropsList>
|
225
376
|
</section>
|
226
377
|
)
|
@@ -67,6 +67,12 @@ export default class LabelsDoc extends React.Component {
|
|
67
67
|
<Label text='deep-orange--700' color='deep-orange--700'/>
|
68
68
|
<Label text='lime--700' color='lime--700'/>
|
69
69
|
</div>
|
70
|
+
<p className="docs-page__paragraph">// Custom Hex colors</p>
|
71
|
+
<div className='docs-page__content-row'>
|
72
|
+
<Label text='Hex: #008773' hexColor='#008773'/>
|
73
|
+
<Label text='Hex: #000FB5' hexColor='#000FB5'/>
|
74
|
+
<Label text='Hex: #696B00' hexColor='#696B00'/>
|
75
|
+
</div>
|
70
76
|
</Markup.ReactMarkupPreview>
|
71
77
|
<Markup.ReactMarkupCode>{`
|
72
78
|
<Label text='default label'/>
|
@@ -82,7 +88,11 @@ export default class LabelsDoc extends React.Component {
|
|
82
88
|
<Label text='cyan--600' color='cyan--600'/>
|
83
89
|
<Label text='light-green--700' color='light-green--700'/>
|
84
90
|
<Label text='deep-orange--700' color='deep-orange--700'/>
|
85
|
-
<Label text='lime--700' color='lime--700'/>
|
91
|
+
<Label text='lime--700' color='lime--700'/>
|
92
|
+
// Custom Hex colors
|
93
|
+
<Label text='Hex: #008773' hexColor='#008773'/>
|
94
|
+
<Label text='Hex: #000FB5' hexColor='#000FB5'/>
|
95
|
+
<Label text='Hex: #696B00' hexColor='#696B00'/>
|
86
96
|
`}
|
87
97
|
</Markup.ReactMarkupCode>
|
88
98
|
</Markup.ReactMarkup>
|
@@ -113,6 +123,12 @@ export default class LabelsDoc extends React.Component {
|
|
113
123
|
<Label text='light-green--700 label' style='hollow' color='light-green--700'/>
|
114
124
|
<Label text='deep-purple--600 label' style='hollow' color='deep-purple--600'/>
|
115
125
|
</div>
|
126
|
+
<p className="docs-page__paragraph">// Custom Hex colours</p>
|
127
|
+
<div className='docs-page__content-row'>
|
128
|
+
<Label text='Hex: #008773' style='hollow' hexColor='#008773'/>
|
129
|
+
<Label text='Hex: #000FB5' style='hollow' hexColor='#000FB5'/>
|
130
|
+
<Label text='Hex: #696B00' style='hollow' hexColor='#696B00'/>
|
131
|
+
</div>
|
116
132
|
</Markup.ReactMarkupPreview>
|
117
133
|
<Markup.ReactMarkupCode>{`
|
118
134
|
<Label text='default label' style='hollow'/>
|
@@ -133,6 +149,11 @@ export default class LabelsDoc extends React.Component {
|
|
133
149
|
<Label text='blue-grey--600 label' style='hollow' color='blue-grey--600'/>
|
134
150
|
<Label text='light-green--700 label' style='hollow' color='light-green--700'/>
|
135
151
|
<Label text='deep-purple--600 label' style='hollow' color='deep-purple--600'/>
|
152
|
+
|
153
|
+
// Custom Hex colours
|
154
|
+
<Label text='Hex: #008773' style='hollow' hexColor='#008773'/>
|
155
|
+
<Label text='Hex: #000FB5' style='hollow' hexColor='#000FB5'/>
|
156
|
+
<Label text='Hex: #696B00' style='hollow' hexColor='#696B00'/>
|
136
157
|
`}
|
137
158
|
</Markup.ReactMarkupCode>
|
138
159
|
</Markup.ReactMarkup>
|
@@ -156,6 +177,12 @@ export default class LabelsDoc extends React.Component {
|
|
156
177
|
<Label text='Translucent large' size='large' type='primary' style='translucent'/>
|
157
178
|
<Label text='Translucent, large & no text transformation' type='highlight' size='large' style='translucent' noTransform={true}/>
|
158
179
|
</div>
|
180
|
+
<p className="docs-page__paragraph">// Custom Hex colours</p>
|
181
|
+
<div className='docs-page__content-row'>
|
182
|
+
<Label text='Hex: #008773' style='translucent' hexColor='#008773'/>
|
183
|
+
<Label text='Hex: #000FB5' style='translucent' hexColor='#000FB5'/>
|
184
|
+
<Label text='Hex: #696B00' style='translucent' hexColor='#696B00'/>
|
185
|
+
</div>
|
159
186
|
</Markup.ReactMarkupPreview>
|
160
187
|
<Markup.ReactMarkupCode>{`
|
161
188
|
<Label text='default label' style='hollow'/>
|
@@ -169,6 +196,11 @@ export default class LabelsDoc extends React.Component {
|
|
169
196
|
<Label text='Translucent large' size='large' style='translucent'/>
|
170
197
|
<Label text='Translucent large' size='large' type='primary' style='translucent'/>
|
171
198
|
<Label text='Translucent, large & no text transformation' type='highlight' size='large' style='translucent' noTransform={true}/>
|
199
|
+
|
200
|
+
// Custom Hex colours
|
201
|
+
<Label text='Hex: #008773' style='translucent' hexColor='#008773'/>
|
202
|
+
<Label text='Hex: #000FB5' style='translucent' hexColor='#000FB5'/>
|
203
|
+
<Label text='Hex: #696B00' style='translucent' hexColor='#696B00'/>
|
172
204
|
`}
|
173
205
|
</Markup.ReactMarkupCode>
|
174
206
|
</Markup.ReactMarkup>
|
@@ -195,6 +227,15 @@ export default class LabelsDoc extends React.Component {
|
|
195
227
|
<Label text='success label' type='success' style='translucent' onClick={()=> false}/>
|
196
228
|
<Label text='alert label' type='alert' style='translucent' onClick={()=> false}/>
|
197
229
|
</div>
|
230
|
+
<p className="docs-page__paragraph">// Custom Hex colours</p>
|
231
|
+
<div className='docs-page__content-row'>
|
232
|
+
<Label text='Hex: #008773' hexColor='#008773' onClick={()=> false}/>
|
233
|
+
<Label text='Hex: #000FB5' hexColor='#000FB5' onClick={()=> false}/>
|
234
|
+
<Label style='hollow' text='Hex: #008773' hexColor='#008773' onClick={()=> false}/>
|
235
|
+
<Label style='hollow' text='Hex: #000FB5' hexColor='#000FB5' onClick={()=> false}/>
|
236
|
+
<Label style='translucent' text='Hex: #008773' hexColor='#008773' onClick={()=> false}/>
|
237
|
+
<Label style='translucent' text='Hex: #000FB5' hexColor='#000FB5' onClick={()=> false}/>
|
238
|
+
</div>
|
198
239
|
</Markup.ReactMarkupPreview>
|
199
240
|
<Markup.ReactMarkupCode>{`
|
200
241
|
<Label text='default label' onClick={()=> false}/>
|
@@ -211,6 +252,14 @@ export default class LabelsDoc extends React.Component {
|
|
211
252
|
<Label text='primary label' type='primary' style='translucent' onClick={()=> false}/>
|
212
253
|
<Label text='success label' type='success' style='translucent' onClick={()=> false}/>
|
213
254
|
<Label text='alert label' type='alert' style='translucent' onClick={()=> false}/>
|
255
|
+
|
256
|
+
// Custom Hex colours
|
257
|
+
<Label text='Hex: #008773' hexColor='#008773' onClick={()=> false}/>
|
258
|
+
<Label text='Hex: #000FB5' hexColor='#000FB5' onClick={()=> false}/>
|
259
|
+
<Label style='hollow' text='Hex: #008773' hexColor='#008773' onClick={()=> false}/>
|
260
|
+
<Label style='hollow' text='Hex: #000FB5' hexColor='#000FB5' onClick={()=> false}/>
|
261
|
+
<Label style='translucent' text='Hex: #008773' hexColor='#008773' onClick={()=> false}/>
|
262
|
+
<Label style='translucent' text='Hex: #000FB5' hexColor='#000FB5' onClick={()=> false}/>
|
214
263
|
`}
|
215
264
|
</Markup.ReactMarkupCode>
|
216
265
|
</Markup.ReactMarkup>
|
@@ -223,6 +272,7 @@ export default class LabelsDoc extends React.Component {
|
|
223
272
|
<Prop name='size' isRequired={false} type='small | normal | large' default='normal' description='Specifies a small, normal or large label.'/>
|
224
273
|
<Prop name='noTransform' isRequired={false} type='boolean' default='false' description='Transforms text to uppercase.'/>
|
225
274
|
<Prop name='style' isRequired={false} type='filled | hollow | translucent' default='filled' description='Label may have one of these styles - filled (default), hollow or translucent.'/>
|
275
|
+
<Prop name='hexColor' isRequired={false} type='string' default='/' description='Define a custom Hex colour for the label.'/>
|
226
276
|
</PropsList>
|
227
277
|
</section>
|
228
278
|
)
|
@@ -73,7 +73,6 @@ export class MultiselectDocs extends React.Component<{}, IState> {
|
|
73
73
|
tabindex={1}
|
74
74
|
label={'This is Label'}
|
75
75
|
info={'This is info'}
|
76
|
-
error={'This is error'}
|
77
76
|
/>
|
78
77
|
</div>
|
79
78
|
</div>
|
@@ -88,6 +87,10 @@ export class MultiselectDocs extends React.Component<{}, IState> {
|
|
88
87
|
showSelectAll
|
89
88
|
placeholder='Select a color'
|
90
89
|
optionLabel='name'
|
90
|
+
required
|
91
|
+
tabindex={1}
|
92
|
+
label={'This is Label'}
|
93
|
+
info={'This is info'}
|
91
94
|
/>
|
92
95
|
`}</Markup.ReactMarkupCode>
|
93
96
|
|
@@ -80,9 +80,14 @@ export class SelectWithTemplateDocs extends React.Component<{}, IState> {
|
|
80
80
|
}
|
81
81
|
}}
|
82
82
|
getLabel={(option) => option.name}
|
83
|
-
areEqual={(a, b) => a
|
83
|
+
areEqual={(a, b) => a?.colorCode === b?.colorCode}
|
84
84
|
filterPlaceholder="Search..."
|
85
85
|
noResultsFoundMessage="No results found."
|
86
|
+
required
|
87
|
+
tabindex={1}
|
88
|
+
label={'This is Label'}
|
89
|
+
info={'This is info'}
|
90
|
+
error={'This is error'}
|
86
91
|
/>
|
87
92
|
</div>
|
88
93
|
</div>
|