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
package/dist/react/Inputs.tsx
CHANGED
@@ -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
|
)
|
package/dist/react/Labels.tsx
CHANGED
@@ -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>
|
package/dist/react/TableList.tsx
CHANGED
@@ -82,12 +82,6 @@ export default class TableListDoc extends React.Component<IProps, IState> {
|
|
82
82
|
|
83
83
|
<TableList>
|
84
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
85
|
start={
|
92
86
|
<>
|
93
87
|
<Label style='translucent' text='aacc' />
|
@@ -104,12 +98,6 @@ export default class TableListDoc extends React.Component<IProps, IState> {
|
|
104
98
|
<IconButton icon='dots-vertical' size='small' ariaValue='More actions' onClick={()=> false} />
|
105
99
|
} />
|
106
100
|
<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
101
|
start={
|
114
102
|
<>
|
115
103
|
<Label style='hollow' text='aacc' />
|
@@ -123,12 +111,6 @@ export default class TableListDoc extends React.Component<IProps, IState> {
|
|
123
111
|
<IconLabel style='translucent' text='Label success' type='success' icon='time' />
|
124
112
|
} />
|
125
113
|
<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
114
|
start={
|
133
115
|
<>
|
134
116
|
<Label style='translucent' text='aacc' />
|
@@ -149,13 +131,7 @@ export default class TableListDoc extends React.Component<IProps, IState> {
|
|
149
131
|
</Markup.ReactMarkupPreview>
|
150
132
|
<Markup.ReactMarkupCode>{`
|
151
133
|
<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
|
-
]}
|
134
|
+
<TableListItem
|
159
135
|
start={
|
160
136
|
<>
|
161
137
|
<Label style='translucent' text='aacc' />
|
@@ -172,12 +148,6 @@ export default class TableListDoc extends React.Component<IProps, IState> {
|
|
172
148
|
<IconButton icon='dots-vertical' size='small' ariaValue='More actions' onClick={()=> false} />
|
173
149
|
} />
|
174
150
|
<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
151
|
start={
|
182
152
|
<>
|
183
153
|
<Label style='hollow' text='aacc' />
|
@@ -191,12 +161,6 @@ export default class TableListDoc extends React.Component<IProps, IState> {
|
|
191
161
|
<IconLabel style='translucent' text='Label success' type='success' icon='time' />
|
192
162
|
} />
|
193
163
|
<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
164
|
start={
|
201
165
|
<>
|
202
166
|
<Label style='translucent' text='aacc' />
|
@@ -250,16 +214,30 @@ export default class TableListDoc extends React.Component<IProps, IState> {
|
|
250
214
|
</Markup.ReactMarkup>
|
251
215
|
|
252
216
|
<h3 className="docs-page__h3">Props</h3>
|
253
|
-
<p className="docs-page__paragraph">
|
217
|
+
<p className="docs-page__paragraph">TableList</p>
|
218
|
+
<PropsList>
|
219
|
+
<Prop name='array' isRequired={false} type='Array' default='false' description='Array of object.'/>
|
220
|
+
<Prop name='children' isRequired={false} type='React.ReactNode' default='false' description='Children of component.'/>
|
221
|
+
<Prop name='addItem' isRequired={false} type='boolean' default='false' description='Functionality to add items to the list.'/>
|
222
|
+
<Prop name='dragAndDrop' isRequired={false} type='boolean' default='false' description='Drag&Drop functionality.'/>
|
223
|
+
<Prop name='itemsDropdown' isRequired={false} type='React.ReactNode | any' default='false' description='Dropdown for functionality to add items to the list.'/>
|
224
|
+
<Prop name='className' isRequired={false} type='string' default='false' description='Add class on TableList container.'/>
|
225
|
+
<Prop name='onClick' isRequired={false} type='function' default='false' description='onClick functionality.'/>
|
226
|
+
</PropsList>
|
227
|
+
<p className="docs-page__paragraph">array:</p>
|
254
228
|
<PropsList>
|
255
|
-
<Prop name='
|
229
|
+
<Prop name='start' isRequired={false} type='React.ReactNode' default='false' description='Column of individual items of list.'/>
|
230
|
+
<Prop name='center' isRequired={false} type='React.ReactNode' default='false' description='Column of individual items of list.'/>
|
231
|
+
<Prop name='end' isRequired={false} type='React.ReactNode' default='false' description='Column of individual items of list.'/>
|
232
|
+
<Prop name='action' isRequired={false} type='React.ReactNode' default='false' description='Column of individual list items that is displayed on hover.'/>
|
256
233
|
</PropsList>
|
257
|
-
<p className="docs-page__paragraph">
|
234
|
+
<p className="docs-page__paragraph">TableListItem</p>
|
258
235
|
<PropsList>
|
259
|
-
<Prop name='
|
260
|
-
<Prop name='
|
261
|
-
<Prop name='
|
262
|
-
<Prop name='
|
236
|
+
<Prop name='start' isRequired={false} type='React.ReactNode' default='false' description='Column of individual items of list.'/>
|
237
|
+
<Prop name='center' isRequired={false} type='React.ReactNode' default='false' description='Column of individual items of list.'/>
|
238
|
+
<Prop name='end' isRequired={false} type='React.ReactNode' default='false' description='Column of individual items of list.'/>
|
239
|
+
<Prop name='action' isRequired={false} type='React.ReactNode' default='false' description='Column of individual list items that is displayed on hover.'/>
|
240
|
+
<Prop name='onClick' isRequired={false} type='function' default='false' description='onClick functionality.'/>
|
263
241
|
</PropsList>
|
264
242
|
|
265
243
|
</section>
|
@@ -15,10 +15,15 @@ class TimePickerExample extends React.PureComponent<{}, {time: string}> {
|
|
15
15
|
render() {
|
16
16
|
return (
|
17
17
|
<TimePicker
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
18
|
+
value={this.state.time}
|
19
|
+
onChange={(time) => {
|
20
|
+
this.setState({time});
|
21
|
+
}}
|
22
|
+
required
|
23
|
+
tabindex={1}
|
24
|
+
label={'This is Label'}
|
25
|
+
info={'This is info'}
|
26
|
+
error={'This is error'}
|
22
27
|
/>
|
23
28
|
);
|
24
29
|
}
|
@@ -38,10 +43,13 @@ export default class TimePickerDoc extends React.Component {
|
|
38
43
|
render() {
|
39
44
|
return (
|
40
45
|
<TimePicker
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
46
|
+
value={this.state.time}
|
47
|
+
onChange={(time) => {
|
48
|
+
this.setState({time});
|
49
|
+
}}
|
50
|
+
label={'This is Label'}
|
51
|
+
info={'This is info'}
|
52
|
+
error={'This is error'}
|
45
53
|
/>
|
46
54
|
);
|
47
55
|
}
|