superdesk-ui-framework 2.4.18 → 2.4.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/app/scripts/check.js +1 -1
  2. package/app/styles/_accessibility.scss +7 -3
  3. package/app/styles/_buttons.scss +52 -1
  4. package/app/styles/_spinner.scss +46 -0
  5. package/app-typescript/components/Button.tsx +7 -1
  6. package/app-typescript/components/Input.tsx +16 -5
  7. package/app-typescript/components/Select.tsx +7 -0
  8. package/app-typescript/components/Spinner.tsx +33 -0
  9. package/app-typescript/components/TabCustom.tsx +89 -40
  10. package/app-typescript/components/TabList.tsx +43 -18
  11. package/app-typescript/components/Tag.tsx +3 -3
  12. package/app-typescript/index.ts +1 -1
  13. package/dist/components/checkbox.html +1 -1
  14. package/dist/examples.bundle.css +36 -1
  15. package/dist/examples.bundle.js +1638 -1201
  16. package/dist/react/Buttons.tsx +25 -0
  17. package/dist/react/Inputs.tsx +7 -3
  18. package/dist/react/Tabs.tsx +225 -72
  19. package/dist/react/Tags.tsx +9 -7
  20. package/dist/superdesk-ui.bundle.css +74 -13
  21. package/dist/superdesk-ui.bundle.js +1269 -957
  22. package/dist/vendor.bundle.js +23 -23
  23. package/examples/pages/components/checkbox.html +1 -1
  24. package/examples/pages/react/Buttons.tsx +25 -0
  25. package/examples/pages/react/Inputs.tsx +7 -3
  26. package/examples/pages/react/Tabs.tsx +225 -72
  27. package/examples/pages/react/Tags.tsx +9 -7
  28. package/package.json +2 -2
  29. package/react/components/Button.d.ts +2 -0
  30. package/react/components/Button.js +4 -2
  31. package/react/components/Input.d.ts +3 -0
  32. package/react/components/Input.js +15 -5
  33. package/react/components/Select.d.ts +1 -0
  34. package/react/components/Select.js +7 -0
  35. package/react/components/Spinner.d.ts +12 -0
  36. package/react/components/Spinner.js +70 -0
  37. package/react/components/TabCustom.d.ts +22 -12
  38. package/react/components/TabCustom.js +52 -23
  39. package/react/components/TabList.d.ts +11 -2
  40. package/react/components/TabList.js +32 -11
  41. package/react/components/Tag.d.ts +2 -2
  42. package/react/components/Tag.js +2 -2
  43. package/react/index.d.ts +1 -1
  44. package/react/index.js +2 -2
@@ -187,6 +187,30 @@ export default class ButtonsDoc extends React.Component {
187
187
  `}</Markup.ReactMarkupCode>
188
188
  </Markup.ReactMarkup>
189
189
 
190
+
191
+ <h3 className="docs-page__h3">Loading</h3>
192
+ <p className="docs-page__paragraph"><code>isLoading={'{true}'}</code></p>
193
+ <Markup.ReactMarkup>
194
+ <Markup.ReactMarkupPreview>
195
+ <div className="docs-page__content-row">
196
+ <Button text="default" isLoading={true} onClick={()=> false} />
197
+ <Button text="primary" type="primary" isLoading={true} onClick={()=> false} />
198
+ <Button text="success" type="success" isLoading={true} onClick={()=> false} />
199
+ <Button text="warning" type="warning" isLoading={true} onClick={()=> false} />
200
+ <Button text="alert" type="alert" isLoading={true} onClick={()=> false} />
201
+ <Button text="highlight" type="highlight" isLoading={true} onClick={()=> false} />
202
+ </div>
203
+ </Markup.ReactMarkupPreview>
204
+ <Markup.ReactMarkupCode>{`
205
+ <Button text="default" isLoading={true} onClick={()=> false} />
206
+ <Button text="primary" type="primary" isLoading={true} onClick={()=> false} />
207
+ <Button text="success" type="success" isLoading={true} onClick={()=> false} />
208
+ <Button text="warning" type="warning" isLoading={true} onClick={()=> false} />
209
+ <Button text="alert" type="alert" isLoading={true} onClick={()=> false} />
210
+ <Button text="highlight" type="highlight" isLoading={true} onClick={()=> false} />
211
+ `}</Markup.ReactMarkupCode>
212
+ </Markup.ReactMarkup>
213
+
190
214
  <h3 className="docs-page__h3">Buttons with icon and text</h3>
191
215
  <p className="docs-page__paragraph">Buttons can be combined with icons from the icon font. Just add any of the available classes from the Icon font as a value of the <code>icon</code> prop.</p>
192
216
  <Markup.ReactMarkup>
@@ -443,6 +467,7 @@ export default class ButtonsDoc extends React.Component {
443
467
  <Prop name='size' isRequired={false} type='small | normal | large' default='normal' description='Specifies a small, normal or large button.'/>
444
468
  <Prop name='icon' isRequired={false} type='string' default='/' description='Icon class name without the icon- part.'/>
445
469
  <Prop name='disabled' isRequired={false} type='boolean' default='false' description='Disables the Button, preventing mouse events.'/>
470
+ <Prop name='isLoading' isRequired={false} type='boolean' default='false' description='Adds a loading indicator and disables the button if set to true.'/>
446
471
  <Prop name='onClick' isRequired={true} type='function' default='false' description='Callback fired when a button is pressed.'/>
447
472
  </PropsList>
448
473
  </section>
@@ -9,6 +9,7 @@ interface IState {
9
9
  required: boolean;
10
10
  disabled: boolean;
11
11
  invalid: boolean;
12
+ val: string
12
13
  }
13
14
 
14
15
  export default class InputsDoc extends React.Component<{}, IState> {
@@ -18,7 +19,8 @@ export default class InputsDoc extends React.Component<{}, IState> {
18
19
  inlineLabel: false,
19
20
  required: true,
20
21
  disabled: false,
21
- invalid: false
22
+ invalid: false,
23
+ val: 'This is some text'
22
24
  }
23
25
  }
24
26
 
@@ -45,7 +47,7 @@ export default class InputsDoc extends React.Component<{}, IState> {
45
47
 
46
48
  <div className='form__row'>
47
49
  <Input label='Input label'
48
- value='This is the value'
50
+ value={this.state.val}
49
51
  maxLength={30}
50
52
  error='This is error message'
51
53
  info='This is some hint message'
@@ -53,14 +55,16 @@ export default class InputsDoc extends React.Component<{}, IState> {
53
55
  required={this.state.required}
54
56
  disabled={this.state.disabled}
55
57
  invalid={this.state.invalid}
56
- onChange={(value) => {}} />
58
+ onChange={(value) => {this.setState({val: value})}} />
57
59
  </div>
60
+
58
61
  </div>
59
62
 
60
63
  <div className='docs-page__content-row docs-page__content-row--no-margin'>
61
64
  <p className="docs-page__paragraph">// Hidden label</p>
62
65
  <div className='form__row'>
63
66
  <Input label='Hidden input label'
67
+ type='number'
64
68
  value='Lorem ipsum input'
65
69
  maxLength={30}
66
70
  error='This is an error message'
@@ -2,30 +2,45 @@ import * as React from 'react';
2
2
 
3
3
  import * as Markup from '../../js/react';
4
4
 
5
- import { Tab, TabList, Prop, PropsList } from '../../../app-typescript';
6
- import {Tabs, TabLabel, TabPanel, TabContent} from '../../../app-typescript';
5
+ import { Tab, TabList, Prop, PropsList, TabNav, TabItem } from '../../../app-typescript';
6
+ import {TabPanel, TabContent} from '../../../app-typescript';
7
+ import { stringify } from 'querystring';
7
8
 
8
9
  interface IState {
9
- indexValue: number;
10
+ selected: string;
11
+ customSelected: string;
12
+ alternativeWaySelected: string;
10
13
  }
11
14
 
12
15
  export default class TabsDoc extends React.Component<{}, IState> {
13
16
  constructor(props){
14
17
  super(props);
15
18
  this.state = {
16
- indexValue: 0
19
+ selected: null,
20
+ customSelected: 'metadata',
21
+ alternativeWaySelected: null,
17
22
  }
18
23
  this.handleClick=this.handleClick.bind(this);
24
+ this.handleClick_customTab=this.handleClick_customTab.bind(this);
25
+ this.handleClick_alternativeWay=this.handleClick_alternativeWay.bind(this);
19
26
  }
20
27
  tabs: TabList;
21
28
 
22
- componentDidMount() {
23
- this.tabs.goTo('Content')
29
+ handleClick = (id: string) => {
30
+ this.setState({
31
+ selected: id,
32
+ })
33
+ }
34
+
35
+ handleClick_customTab = (id: string) => {
36
+ this.setState({
37
+ customSelected: id,
38
+ })
24
39
  }
25
40
 
26
- handleClick = (number: number) => {
41
+ handleClick_alternativeWay = (id: string) => {
27
42
  this.setState({
28
- indexValue: number,
43
+ alternativeWaySelected: id,
29
44
  })
30
45
  }
31
46
 
@@ -34,32 +49,78 @@ export default class TabsDoc extends React.Component<{}, IState> {
34
49
  <section className="docs-page__container">
35
50
  <h2 className="docs-page__h2">Tabs</h2>
36
51
  <Markup.ReactMarkupCodePreview>{`
37
- <TabList>
38
- <Tab label='Content'>Content here.</Tab>
39
- <Tab label='Metadata'>Metadata here.</Tab>
40
- <Tab label='Duplicates'>Duplicates here.</Tab>
52
+ <TabList ref={(tabs) => {
53
+ this.tabs = tabs;
54
+ }}
55
+ tabs={[
56
+ {label: 'Content', content: 'Content here.', id: 'content'},
57
+ {label: 'Metadata', content: 'Metadata here', id: 'metadata'},
58
+ {label: 'Duplicate', content: 'Duplicate here.', id: 'duplicate'}
59
+ ]}
60
+ >
41
61
  </TabList>
42
62
  `}
43
63
  </Markup.ReactMarkupCodePreview>
44
64
  <h3 className="docs-page__h3">Default tabs</h3>
45
- <p className="docs-page__paragraph">To have a tab-like navigation add the <code>TabList</code> component and multiple <code>Tab</code> components inside of it.</p>
65
+ <p className="docs-page__paragraph">To have a tab-like navigation add the <code>TabList</code> component and multiple <code>Tab</code> components inside of it, or add the appropriate attributes on <code>TabList.</code></p>
46
66
  <Markup.ReactMarkup>
47
67
  <Markup.ReactMarkupPreview>
48
68
  <div className='docs-page__content-row'>
49
- <TabList ref={(tabs) => {
69
+ <TabList ref={(tabs) => {
50
70
  this.tabs = tabs;
51
- }}>
52
- <Tab label='Content'>Content here.</Tab>
53
- <Tab label='Metadata'>Metadata here.</Tab>
54
- <Tab label='Duplicates'>Duplicates here.</Tab>
71
+ }}
72
+ tabs={[
73
+ {label: 'Content', content: 'Content here.', id: 'content'},
74
+ {label: 'Metadata', content: 'Metadata here', id: 'metadata'},
75
+ {label: 'Duplicate', content: 'Duplicate here.', id: 'duplicate'}
76
+ ]}
77
+ >
78
+ {/* <Tab label='Content' id='content' >Content here.</Tab>
79
+ <Tab label='Metadata' id='metadata' >Metadata here.</Tab>
80
+ <Tab label='Duplicates' id='duplicate' >Duplicates here.</Tab> */}
81
+ </TabList>
82
+ </div>
83
+ <p className="docs-page__paragraph">// Start width custom tab.</p>
84
+ <div className='docs-page__content-row'>
85
+ <TabList ref={(tabs) => {
86
+ this.tabs = tabs;
87
+ }}
88
+ selected='metadata'
89
+ tabs={[
90
+ {label: 'Content', content: 'Content here.', id: 'content'},
91
+ {label: 'Metadata', content: 'Metadata here', id: 'metadata'},
92
+ {label: 'Duplicate', content: 'Duplicate here.', id: 'duplicate'}
93
+ ]}
94
+ >
95
+ {/* <Tab label='Content' id='content' >Content here.</Tab>
96
+ <Tab label='Metadata' id='metadata' >Metadata here.</Tab>
97
+ <Tab label='Duplicates' id='duplicate' >Duplicates here.</Tab> */}
55
98
  </TabList>
56
99
  </div>
57
100
  </Markup.ReactMarkupPreview>
58
101
  <Markup.ReactMarkupCode>{`
59
- <TabList>
60
- <Tab label='Content'>Content here.</Tab>
61
- <Tab label='Metadata'>Metadata here.</Tab>
62
- <Tab label='Duplicates'>Duplicates here.</Tab>
102
+ <TabList ref={(tabs) => {
103
+ this.tabs = tabs;
104
+ }}
105
+ tabs={[
106
+ {label: 'Content', content: 'Content here.', id: 'content'},
107
+ {label: 'Metadata', content: 'Metadata here', id: 'metadata'},
108
+ {label: 'Duplicate', content: 'Duplicate here.', id: 'duplicate'}
109
+ ]}
110
+ >
111
+ </TabList>
112
+
113
+ // start with custom tab (add atributte selected)
114
+ <TabList ref={(tabs) => {
115
+ this.tabs = tabs;
116
+ }}
117
+ selected='metadata' //tabs.id
118
+ tabs={[
119
+ {label: 'Content', content: 'Content here.', id: 'content'},
120
+ {label: 'Metadata', content: 'Metadata here', id: 'metadata'},
121
+ {label: 'Duplicate', content: 'Duplicate here.', id: 'duplicate'}
122
+ ]}
123
+ >
63
124
  </TabList>
64
125
  `}
65
126
  </Markup.ReactMarkupCode>
@@ -139,74 +200,166 @@ export default class TabsDoc extends React.Component<{}, IState> {
139
200
  </Markup.ReactMarkupCode>
140
201
  </Markup.ReactMarkup>
141
202
 
142
- <h3 className="docs-page__h3">Tabs with two components ( <code>Tabs</code> and <code> TabContent</code> ) </h3>
143
- <p className="docs-page__paragraph">If you want to use on one place list of tabs and on another place content of tabs, wrap all <code>TabLabel</code> with <code>Tabs</code> component and all <code>TabPanel</code> components with <code>TabContent.</code></p>
203
+ <h3 className="docs-page__h3">Tabs with two components ( <code>TabNav</code> and <code> TabContent</code> ) </h3>
204
+ <p className="docs-page__paragraph">If you want to use on one place list of tabs and on another place content of tabs, wrap all <code>TabItem</code> with <code>TabNav</code> component and all <code>TabPanel</code> components with <code>TabContent</code>, or add the appropriate attributes on <code>TabNav</code> and <code>TabContent</code></p>
205
+ <Markup.ReactMarkup>
206
+ <Markup.ReactMarkupPreview>
207
+ <div className='docs-page__content-row'>
208
+ <TabNav onClick={this.handleClick} activePanel={this.state.selected}
209
+ tabs={[
210
+ {label: 'Content', id: 'content'},
211
+ {label: 'Metadata', id: 'metadata'},
212
+ {label: 'Duplicate', id: 'duplicate'}
213
+ ]}
214
+ >
215
+ </TabNav>
216
+ <TabContent activePanel={this.state.selected}
217
+ tabs={[
218
+ {content: 'Content here.', id: 'content'},
219
+ {content: 'Metadata here.', id: 'metadata'},
220
+ {content: 'Duplicates here.', id: 'duplicate'}
221
+ ]}
222
+ >
223
+ </TabContent>
224
+ </div>
225
+ <p className="docs-page__paragraph">// Start width custom tab.</p>
226
+ <div className='docs-page__content-row'>
227
+ <TabNav onClick={this.handleClick_customTab} activePanel={this.state.customSelected}
228
+ tabs={[
229
+ {label: 'Content', id: 'content'},
230
+ {label: 'Metadata', id: 'metadata'},
231
+ {label: 'Duplicate', id: 'duplicate'}
232
+ ]}
233
+ >
234
+ </TabNav>
235
+ <TabContent activePanel={this.state.customSelected}
236
+ tabs={[
237
+ {content: 'Content here.', id: 'content'},
238
+ {content: 'Metadata here.', id: 'metadata'},
239
+ {content: 'Duplicates here.', id: 'duplicate'}
240
+ ]}
241
+ >
242
+ </TabContent>
243
+ </div>
244
+ </Markup.ReactMarkupPreview>
245
+ <Markup.ReactMarkupCode>{`
246
+ this.state = {
247
+ selected: null,
248
+ }
249
+ handleClick = (id: string) => {
250
+ this.setState({
251
+ selected: id,
252
+ })
253
+ }
254
+
255
+ <TabNav onClick={this.handleClick} activePanel={this.state.selected}
256
+ tabs={[
257
+ {label: 'Content', id: 'content'},
258
+ {label: 'Metadata', id: 'metadata'},
259
+ {label: 'Duplicate', id: 'duplicate'}
260
+ ]}
261
+ >
262
+ </TabNav>
263
+ <TabContent activePanel={this.state.selected}
264
+ tabs={[
265
+ {content: 'Content here.', id: 'content'},
266
+ {content: 'Metadata here.', id: 'metadata'},
267
+ {content: 'Duplicates here.', id: 'duplicate'}
268
+ ]}
269
+ >
270
+ </TabContent>
271
+
272
+ // start with custom tab
273
+ this.state = {
274
+ selected: 'metadata' //tabs.id,
275
+ }
276
+ `}
277
+ </Markup.ReactMarkupCode>
278
+ </Markup.ReactMarkup>
279
+
280
+ <p className="docs-page__paragraph">Alternative way with children:</p>
144
281
  <Markup.ReactMarkup>
145
282
  <Markup.ReactMarkupPreview>
146
283
  <div className='docs-page__content-row'>
147
- <Tabs onClick={this.handleClick}>
148
- <TabLabel label='Content' indexValue={0}/>
149
- <TabLabel label='Metadata' indexValue={1}/>
150
- <TabLabel label='Duplicates' indexValue={2}/>
151
- </Tabs>
152
- <TabContent activePanel={this.state.indexValue}>
153
- <TabPanel indexValue={0}>
154
- Content here.
155
- </TabPanel>
156
- <TabPanel indexValue={1}>
157
- Metadata here.
158
- </TabPanel>
159
- <TabPanel indexValue={2}>
160
- Duplicates here.
161
- </TabPanel>
284
+ <TabNav onClick={this.handleClick_alternativeWay} activePanel={this.state.alternativeWaySelected}>
285
+ <TabItem id='content'>Content</TabItem>
286
+ <TabItem id='metadata'>Metadata</TabItem>
287
+ <TabItem id='duplicate'>Duplicate</TabItem>
288
+ </TabNav>
289
+ <TabContent activePanel={this.state.alternativeWaySelected}>
290
+ <TabPanel id='content'>Content here.</TabPanel>
291
+ <TabPanel id='metadata'>Metadata here.</TabPanel>
292
+ <TabPanel id='duplicate'>Duplicates here.</TabPanel>
162
293
  </TabContent>
163
294
  </div>
164
295
  </Markup.ReactMarkupPreview>
165
296
  <Markup.ReactMarkupCode>{`
166
- const [activeIndex, setActiveIndex] = React.useState(0);
167
- const handleClick = (index: number) => {
168
- setActiveIndex(index);
297
+ this.state = {
298
+ selected: null,
299
+ }
300
+ handleClick = (id: string) => {
301
+ this.setState({
302
+ selected: id,
303
+ })
169
304
  }
170
305
 
171
- <Tabs onClick={handleClick}>
172
- <TabLabel label='Content' indexValue={0}/>
173
- <TabLabel label='Metadata' indexValue={1}/>
174
- <TabLabel label='Duplicates' indexValue={2}/>
175
- </Tabs>
176
- <TabContent activePanel={activeIndex}>
177
- <TabPanel indexValue={0}>
178
- Content here.
179
- </TabPanel>
180
- <TabPanel indexValue={1}>
181
- Metadata here.
182
- </TabPanel>
183
- <TabPanel indexValue={2}>
184
- Duplicates here.
185
- </TabPanel>
186
- </TabContent>
306
+ <TabNav onClick={this.handleClick} activePanel={this.state.selected}>
307
+ <TabItem id='content'>Content</TabItem>
308
+ <TabItem id='metadata'>Metadata</TabItem>
309
+ <TabItem id='duplicate'>Duplicate</TabItem>
310
+ </TabNav>
311
+ <TabContent activePanel={this.state.selected}>
312
+ <TabPanel id='content'>Content here.</TabPanel>
313
+ <TabPanel id='metadata'>Metadata here.</TabPanel>
314
+ <TabPanel id='duplicate'>Duplicates here.</TabPanel>
315
+ </TabContent>
187
316
  `}
188
317
  </Markup.ReactMarkupCode>
189
318
  </Markup.ReactMarkup>
190
319
 
191
320
  <h3 className="docs-page__h3">Props</h3>
321
+ <br/>
322
+ <h4 className="docs-page__h4">TabList</h4>
192
323
  <PropsList>
193
- <Prop name='tablist size' isRequired={false} type='small | normal | large' default='normal' description='Specifies a small, normal or large button.'/>
194
- <Prop name='tablist theme' isRequired={false} type='light | dark' default='light' description='Styles tablist for diffrent background.'/>
195
- <Prop name='tab label' isRequired={false} type='string' default='/' description='Text value of Tab label'/>
324
+ <Prop name='TabList size' isRequired={false} type='small | normal | large' default='normal' description='Specifies a small, normal or large button.'/>
325
+ <Prop name='TabList theme' isRequired={false} type='light | dark' default='light' description='Styles tablist for diffrent background'/>
326
+ <Prop name='TabList selected' isRequired={false} type='string' default='/' description='Specify which tab should be pre-selected'/>
327
+ <Prop name='TabList tabs' isRequired={false} type='Array<label: string, content: React.ReactNode, id: string>' default='/' description='Array of objects'/>
328
+ <Prop name='Tab label' isRequired={false} type='string' default='/' description='Text value of label'/>
329
+ <Prop name='Tab id' isRequired={false} type='string' default='/' description='Id value of Tab component'/>
330
+ <Prop name='Tab children' isRequired={false} type='React.ReactNode' default='/' description='Children of component'/>
331
+ </PropsList>
332
+ <p className='docs-page__paragraph'>tabs: TabList</p>
333
+ <PropsList>
334
+ <Prop name='label' isRequired={true} type='string' default='/' description='Text value of label'/>
335
+ <Prop name='content' isRequired={true} type='React.ReactNode' default='/' description='React.ReactNode'/>
336
+ <Prop name='id' isRequired={true} type='string' default='/' description='Id value'/>
196
337
  </PropsList>
197
338
  <br/>
198
- <h4 className="docs-page__h4">Tabs Custom</h4>
339
+ <h4 className="docs-page__h4">TabNav and TabContent</h4>
340
+ <PropsList>
341
+ <Prop name='TabNav size' isRequired={false} type='small | normal | large' default='normal' description='Specifies a small, normal or large button'/>
342
+ <Prop name='TabNav theme' isRequired={false} type='light | dark' default='light' description='Styles tablist for diffrent background'/>
343
+ <Prop name='TabNav ariaLabel' isRequired={false} type='string' default='/' description='Text value of aria-label'/>
344
+ <Prop name='TabNav onClick' isRequired={true} type='function' default='/' description='Use to return value of clicked label'/>
345
+ <Prop name='TabNav activePanel' isRequired={true} type='string' default='/' description='Specify which tab should be pre-selected'/>
346
+ <Prop name='TabNav tabs' isRequired={false} type='Array<label: string, id: string>' default='/' description='Array of objects'/>
347
+ <Prop name='TabItem id' isRequired={true} type='string' default='/' description='Id value of Tab Item'/>
348
+ <Prop name='TabItem label' isRequired={true} type='string' default='/' description='Text value of Tab label'/>
349
+ <Prop name='TabContent theme' isRequired={false} type='light | dark' default='light' description='Styles tablist for diffrent background'/>
350
+ <Prop name='TabContent activePanel' isRequired={true} type='string' default='/' description='Specify which tab should be pre-selected'/>
351
+ <Prop name='TabContent tabs' isRequired={false} type='Array<content: React.ReactNode, id: string>' default='/' description='Array of objects'/>
352
+ <Prop name='TabPanel id' isRequired={true} type='string' default='/' description='Id value of Tab Panel'/>
353
+ </PropsList>
354
+ <p className='docs-page__paragraph'>tabs: TabNav</p>
355
+ <PropsList>
356
+ <Prop name='label' isRequired={true} type='string' default='/' description='Text value of label'/>
357
+ <Prop name='id' isRequired={true} type='string' default='/' description='Unique identifier to connect tab nav and tab content'/>
358
+ </PropsList>
359
+ <p className='docs-page__paragraph'>tabs: TabContent</p>
199
360
  <PropsList>
200
- <Prop name='tabs size' isRequired={false} type='small | normal | large' default='normal' description='Specifies a small, normal or large button.'/>
201
- <Prop name='tabs theme' isRequired={false} type='light | dark' default='light' description='Styles tablist for diffrent background.'/>
202
- <Prop name='tabs ariaLabel' isRequired={false} type='string' default='/' description='Text value of aria-label'/>
203
- <Prop name='tabs onClick' isRequired={true} type='function' default='/' description='Use to return value of clicked label'/>
204
- <Prop name='tablabel indexValue' isRequired={true} type='number' default='/' description='Index value of label'/>
205
- <Prop name='tablabel label' isRequired={true} type='string' default='/' description='Text value of Tab label'/>
206
-
207
- <Prop name='tabcontent theme' isRequired={false} type='light | dark' default='light' description='Styles tablist for diffrent background.'/>
208
- <Prop name='tabcontent activePanel' isRequired={true} type='number' default='/' description='Index value of active Tab'/>
209
- <Prop name='tabpanel indexValue' isRequired={true} type='number' default='/' description='Index value of Tab Panel'/>
361
+ <Prop name='content' isRequired={true} type='React.ReactNode' default='/' description='React.ReactNode'/>
362
+ <Prop name='id' isRequired={true} type='string' default='/' description='Unique identifier to connect tab nav and tab content'/>
210
363
  </PropsList>
211
364
  </section>
212
365
  )
@@ -33,7 +33,7 @@ export default class TagDoc extends React.Component<{}, ITag> {
33
33
  <section className="docs-page__container">
34
34
  <h2 className="docs-page__h2">Tag</h2>
35
35
  <Markup.ReactMarkupCodePreview>{`
36
- <Tag text='This is a tag' onClick={()=>false}/>
36
+ <Tag text='This is a tag' onRemove={()=>false}/>
37
37
  `}
38
38
  </Markup.ReactMarkupCodePreview>
39
39
 
@@ -48,18 +48,18 @@ export default class TagDoc extends React.Component<{}, ITag> {
48
48
  shade={tag.shade}
49
49
  shape={tag.shape}
50
50
  readOnly={tag.readOnly}
51
- onClick={()=>this.handleClick(index)}/>
51
+ onRemove={()=>this.handleClick(index)} />
52
52
  </React.Fragment>
53
53
  )
54
54
  })}
55
55
  </div>
56
56
  </Markup.ReactMarkupPreview>
57
57
  <Markup.ReactMarkupCode>{`
58
- <Tag text='This is a tag' onClick={()=>false}/>
59
- <Tag text='This is a another tag' shade='darker' onClick={()=>false}/>
60
- <Tag text='Lorem ipsum' shade='highlight1' onClick={()=>false}/>
61
- <Tag text='Dolor amet' shade='highlight2' shape='square' onClick={()=>false}/>
62
-
58
+ <Tag text='This is a tag' onRemove={()=>false}/>
59
+ <Tag text='This is a another tag' shade='darker' onRemove={()=>false}/>
60
+ <Tag text='Lorem ipsum' shade='highlight1' onRemove={()=>false}/>
61
+ <Tag text='Dolor amet' shade='highlight2' shape='square' onRemove={()=>false}/>
62
+ <Tag text='Read only tag' readOnly={true} onRemove={()=>false}/>
63
63
  `}
64
64
  </Markup.ReactMarkupCode>
65
65
  </Markup.ReactMarkup>
@@ -70,6 +70,8 @@ export default class TagDoc extends React.Component<{}, ITag> {
70
70
  <Prop name='shade' isRequired={false} type='light | darker | highlight1 | highlight2' default='light' description='Shade colour of tag'/>
71
71
  <Prop name='shape' isRequired={false} type='round | square' default='round' description='Make shape of tag square or default round.'/>
72
72
  <Prop name='keyValue' isRequired={false} type='number' default='/' description='Value of tag key'/>
73
+ <Prop name='readOnly' isRequired={false} type='boolean' default='/' description='Read only tag. Dont have option to close/remove tag.'/>
74
+ <Prop name='onRemove' isRequired={false} type='function' default='/' description='Callback function'/>
73
75
  </PropsList>
74
76
  </section>
75
77
  )