superdesk-ui-framework 3.1.13 → 3.1.15

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 (32) hide show
  1. package/app/img/AvatarDefaultImage.svg +6 -0
  2. package/app/styles/_avatar.scss +28 -6
  3. package/app/styles/design-tokens/_new-colors.scss +32 -17
  4. package/app-typescript/components/Button.tsx +1 -1
  5. package/app-typescript/components/DatePicker.tsx +18 -2
  6. package/app-typescript/components/avatar/avatar-group.tsx +2 -1
  7. package/app-typescript/components/avatar/avatar-image.tsx +1 -1
  8. package/app-typescript/components/avatar/avatar-placeholder.tsx +0 -1
  9. package/app-typescript/components/avatar/avatar-wrapper.tsx +14 -2
  10. package/app-typescript/components/avatar/avatar.tsx +8 -1
  11. package/dist/components/Avatar.tsx +97 -40
  12. package/dist/components/Buttons.tsx +5 -3
  13. package/dist/components/Index.tsx +151 -127
  14. package/dist/examples.bundle.js +368 -331
  15. package/dist/playgrounds/react-playgrounds/TestGround.tsx +30 -10
  16. package/dist/superdesk-ui.bundle.css +55 -20
  17. package/dist/superdesk-ui.bundle.js +187 -177
  18. package/examples/pages/components/Avatar.tsx +97 -40
  19. package/examples/pages/components/Buttons.tsx +5 -3
  20. package/examples/pages/components/Index.tsx +151 -127
  21. package/examples/pages/playgrounds/react-playgrounds/TestGround.tsx +30 -10
  22. package/package.json +1 -1
  23. package/react/components/Button.js +1 -1
  24. package/react/components/DatePicker.d.ts +0 -1
  25. package/react/components/DatePicker.js +9 -1
  26. package/react/components/avatar/avatar-group.js +2 -2
  27. package/react/components/avatar/avatar-image.js +1 -1
  28. package/react/components/avatar/avatar-placeholder.js +1 -1
  29. package/react/components/avatar/avatar-wrapper.d.ts +4 -1
  30. package/react/components/avatar/avatar-wrapper.js +4 -2
  31. package/react/components/avatar/avatar.d.ts +4 -0
  32. package/react/components/avatar/avatar.js +2 -2
@@ -85,69 +85,102 @@ import { OpacityUtilitiesDoc } from './utilities/OpacityUtilities';
85
85
  import { ObjectFitUtilitiesDoc } from './utilities/ObjectFitUtilities';
86
86
  import { ObjectPositionUtilitiesDoc } from './utilities/ObjectPositionUtilities';
87
87
 
88
- const pages = {
88
+
89
+ interface IPages {
90
+ [group: string]: {
91
+ name: string;
92
+ items: {
93
+ [urlId: string]: {
94
+ name: string;
95
+ component: React.ComponentType<any>;
96
+ }
97
+ };
98
+ };
99
+ }
100
+
101
+ const pages: IPages = {
89
102
  basicComponents: {
90
103
  name: 'Basic Components',
91
104
  items: {
92
105
  'buttons': {
93
106
  name: 'Buttons',
107
+ component: ButtonsDoc,
94
108
  },
95
109
  'icon-buttons': {
96
- name: 'Icon Buttons'
110
+ name: 'Icon Buttons',
111
+ component: IconButtonDoc,
97
112
  },
98
113
  'button-groups': {
99
- name: 'Button Group & Divider'
114
+ name: 'Button Group & Divider',
115
+ component: ButtonGroupsDoc,
100
116
  },
101
117
  'labels': {
102
118
  name: 'Labels',
119
+ component: LabelsDoc,
103
120
  },
104
121
  'icon-labels': {
105
- name: 'Icon Labels'
122
+ name: 'Icon Labels',
123
+ component: IconLabelDoc,
106
124
  },
107
125
  'badges': {
108
126
  name: 'Badges',
127
+ component: BadgesDoc,
109
128
  },
110
129
  'alerts': {
111
- name: 'Alerts'
130
+ name: 'Alerts',
131
+ component: AlertDoc,
112
132
  },
113
133
  'avatar': {
114
134
  name: 'Avatar',
135
+ component: AvatarDoc,
115
136
  },
116
137
  'tooltips': {
117
- name: 'Tooltips'
138
+ name: 'Tooltips',
139
+ component: TooltipDoc,
118
140
  },
119
141
  'tags': {
120
- name: 'Tags'
142
+ name: 'Tags',
143
+ component: TagDoc,
121
144
  },
122
145
  'dropdowns': {
123
- name: 'Dropdowns'
146
+ name: 'Dropdowns',
147
+ component: DropdownDoc,
124
148
  },
125
149
  'nav-buttons': {
126
- name: 'Nav buttons'
150
+ name: 'Nav buttons',
151
+ component: NavButtonsDoc,
127
152
  },
128
153
  'toast': {
129
- name: 'Toasts'
154
+ name: 'Toasts',
155
+ component: ToastsDoc,
130
156
  },
131
157
  'popover': {
132
- name: 'Popover'
158
+ name: 'Popover',
159
+ component: PopoverDoc,
133
160
  },
134
161
  'modal': {
135
- name: 'Modal'
162
+ name: 'Modal',
163
+ component: ModalDoc,
136
164
  },
137
165
  'carousel': {
138
- name: 'Carousel'
166
+ name: 'Carousel',
167
+ component: CarouselDoc,
139
168
  },
140
169
  'menu': {
141
170
  name: 'Menu',
171
+ component: MenuDocs,
142
172
  },
143
173
  'treemenu': {
144
174
  name: 'TreeMenu',
175
+ component: TreeMenuDocs,
145
176
  },
146
177
  "drag-handle": {
147
- name: 'Drag handle'
178
+ name: 'Drag handle',
179
+ component: DragHandleDocs,
148
180
  },
149
181
  "illustration-button": {
150
- name: 'Illustration Button'
182
+ name: 'Illustration Button',
183
+ component: IllustrationButtonDoc,
151
184
  }
152
185
  }
153
186
  },
@@ -155,16 +188,20 @@ const pages = {
155
188
  name: "Navigation",
156
189
  items: {
157
190
  'tab': {
158
- name: 'Tabs'
191
+ name: 'Tabs',
192
+ component: TabsDoc,
159
193
  },
160
194
  'left-navigation': {
161
- name: 'Left navigation'
195
+ name: 'Left navigation',
196
+ component: LeftNavigationsDoc,
162
197
  },
163
- 'Quick-navigation-bar': {
164
- name: 'Quick navigation bar'
198
+ 'quick-navigation-bar': {
199
+ name: 'Quick navigation bar',
200
+ component: QuickNavBarDoc,
165
201
  },
166
202
  'sub-navigation': {
167
- name: 'Sub navigation bar'
203
+ name: 'Sub navigation bar',
204
+ component: SubNavDoc,
168
205
  },
169
206
  }
170
207
  },
@@ -172,16 +209,20 @@ const pages = {
172
209
  name: "Containers",
173
210
  items: {
174
211
  'container': {
175
- name: 'Container component'
212
+ name: 'Container component',
213
+ component: ContainerDoc,
176
214
  },
177
215
  'empty-states': {
178
- name: 'Empty states'
216
+ name: 'Empty states',
217
+ component: EmptyStateDoc,
179
218
  },
180
219
  'grid-item': {
181
- name: 'Grid Item'
220
+ name: 'Grid Item',
221
+ component: GridItemDoc,
182
222
  },
183
223
  'panel': {
184
- name: 'Panel'
224
+ name: 'Panel',
225
+ component: PanelDoc,
185
226
  },
186
227
  }
187
228
  },
@@ -189,13 +230,16 @@ const pages = {
189
230
  name: "Layout",
190
231
  items: {
191
232
  'content-divider': {
192
- name: 'Content Divider'
233
+ name: 'Content Divider',
234
+ component: ContentDividerDoc,
193
235
  },
194
236
  "togglebox": {
195
- name: "Togglebox"
237
+ name: "Togglebox",
238
+ component: ToggleboxDocs,
196
239
  },
197
240
  "resizable-panels": {
198
- name: "Resizable panels"
241
+ name: "Resizable panels",
242
+ component: ResizablePanelsDoc,
199
243
  },
200
244
  }
201
245
  },
@@ -203,10 +247,12 @@ const pages = {
203
247
  name: "Text",
204
248
  items: {
205
249
  'heading': {
206
- name: 'Heading component'
250
+ name: 'Heading component',
251
+ component: HeadingDoc,
207
252
  },
208
253
  'text': {
209
- name: 'Text component'
254
+ name: 'Text component',
255
+ component: TextDoc,
210
256
  },
211
257
  }
212
258
  },
@@ -214,25 +260,32 @@ const pages = {
214
260
  name: "Lists",
215
261
  items: {
216
262
  'grid-list': {
217
- name: 'Grid List'
263
+ name: 'Grid List',
264
+ component: GridListDoc,
218
265
  },
219
266
  'list-items': {
220
- name: 'List items'
267
+ name: 'List items',
268
+ component: ListItemsDoc,
221
269
  },
222
270
  'simple-list': {
223
- name: 'Simple list'
271
+ name: 'Simple list',
272
+ component: SimpleListDoc,
224
273
  },
225
274
  'boxed-list': {
226
- name: 'Boxed list'
275
+ name: 'Boxed list',
276
+ component: BoxedListDoc,
227
277
  },
228
278
  'table-list': {
229
- name: 'Table list'
279
+ name: 'Table list',
280
+ component: TableListDoc,
230
281
  },
231
282
  'content-list': {
232
- name: 'Content list'
283
+ name: 'Content list',
284
+ component: ContentListDoc,
233
285
  },
234
286
  'with-pagination': {
235
- name: 'With pagination'
287
+ name: 'With pagination',
288
+ component: WithPaginationDocs,
236
289
  },
237
290
  }
238
291
  },
@@ -241,57 +294,75 @@ const pages = {
241
294
  items: {
242
295
  'inputs': {
243
296
  name: 'Inputs',
297
+ component: InputsDoc,
244
298
  },
245
299
  'autocomplete': {
246
300
  name: 'Autocomplete',
301
+ component: AutocompleteDoc,
247
302
  },
248
303
  'tag-input': {
249
304
  name: 'Tag Input',
305
+ component: TagInputDocs,
250
306
  },
251
307
  'select': {
252
308
  name: 'Select',
309
+ component: SelectsDoc,
253
310
  },
254
311
  'select-grid': {
255
312
  name: 'Select Grid',
313
+ component: SelectGridDocs,
256
314
  },
257
315
  'select-with-template': {
258
316
  name: 'Select with template',
317
+ component: SelectWithTemplateDocs,
259
318
  },
260
319
  'with-size-observer': {
261
320
  name: 'With size observer',
321
+ component: WithSizeObserverDocs,
262
322
  },
263
323
  'multiselect': {
264
324
  name: 'MultiSelect',
325
+ component: MultiselectDocs,
265
326
  },
266
327
  'treeselect': {
267
328
  name: 'TreeSelect',
329
+ component: TreeSelectDocs,
268
330
  },
269
331
  'date-picker': {
270
332
  name: 'Date Picker',
333
+ component: DatePickerDoc,
271
334
  },
272
335
  'time-picker': {
273
336
  name: 'Time Picker',
337
+ component: TimePickerDoc,
274
338
  },
275
339
  'icon-picker': {
276
340
  name: 'Icon Picker',
341
+ component: IconPickerDocs,
277
342
  },
278
343
  'duration-input': {
279
344
  name: 'Duration Input',
345
+ component: DurationInputDoc,
280
346
  },
281
347
  'switch': {
282
- name: 'Switch'
348
+ name: 'Switch',
349
+ component: SwitchDoc,
283
350
  },
284
351
  'radiogroup': {
285
- name: 'RadioGroup'
352
+ name: 'RadioGroup',
353
+ component: RadioGroupDoc,
286
354
  },
287
355
  'checkbox': {
288
- name: 'Checkbox'
356
+ name: 'Checkbox',
357
+ component: CheckboxsDoc,
289
358
  },
290
359
  'dropzone': {
291
- name: 'DropZone'
360
+ name: 'DropZone',
361
+ component: DropZoneDoc,
292
362
  },
293
363
  'create-button': {
294
- name: 'CreateButton'
364
+ name: 'CreateButton',
365
+ component: CreateButtonDoc,
295
366
  },
296
367
  }
297
368
  },
@@ -300,9 +371,11 @@ const pages = {
300
371
  items: {
301
372
  'icon-font': {
302
373
  name: 'Icon font',
374
+ component: IconFontDoc,
303
375
  },
304
376
  'big-icon-font': {
305
- name: 'Big icon font'
377
+ name: 'Big icon font',
378
+ component: BigIconFontDoc,
306
379
  }
307
380
  }
308
381
  },
@@ -310,45 +383,65 @@ const pages = {
310
383
  name: "Utility classes",
311
384
  items: {
312
385
  'border-utilities': {
313
- name: 'Border'
386
+ name: 'Border',
387
+ component: BorderUtilitiesDoc,
314
388
  },
315
389
  'border-radius-utilities': {
316
- name: 'Border Radius'
390
+ name: 'Border Radius',
391
+ component: BorderRadiusUtilitiesDoc,
317
392
  },
318
393
  'display-utilities': {
319
- name: 'Display'
394
+ name: 'Display',
395
+ component: DisplayUtilitiesDoc,
320
396
  },
321
397
  'flex-and-grid-utilities': {
322
- name: 'Flex & Grid'
398
+ name: 'Flex & Grid',
399
+ component: FlexAndGridUtilitiesDoc,
323
400
  },
324
401
  'object-fit-utilities': {
325
- name: 'Object Fit'
402
+ name: 'Object Fit',
403
+ component: ObjectFitUtilitiesDoc,
326
404
  },
327
405
  'object-position-utilities': {
328
- name: 'Object Position'
406
+ name: 'Object Position',
407
+ component: ObjectPositionUtilitiesDoc,
329
408
  },
330
409
  'opacity-utilities': {
331
- name: 'Opacity'
410
+ name: 'Opacity',
411
+ component: OpacityUtilitiesDoc,
332
412
  },
333
413
  'overflow-utilities': {
334
- name: 'Overflow'
414
+ name: 'Overflow',
415
+ component: OverflowUtilitiesDoc,
335
416
  },
336
417
  'position-utilities': {
337
- name: 'Position'
418
+ name: 'Position',
419
+ component: PositionUtilitiesDoc,
338
420
  },
339
421
  'shadow-utilities': {
340
- name: 'Shadow'
422
+ name: 'Shadow',
423
+ component: ShadowUtilitiesDoc,
341
424
  },
342
425
  'spacing-utilities': {
343
426
  name: 'Spacing',
427
+ component: SpacingUtilitiesDoc,
344
428
  },
345
429
  'text-utilities': {
346
- name: 'Text'
347
- }
430
+ name: 'Text',
431
+ component: TextUtilitiesDoc,
432
+ },
348
433
  }
349
434
  }
350
435
  }
351
436
 
437
+ const routes: Array<{path: string; component: React.ComponentType<any>}> = [];
438
+
439
+ for (const group of Object.values(pages)) {
440
+ for (const [id, value] of Object.entries(group.items)) {
441
+ routes.push({path: `/components/${id}`, component: value.component});
442
+ }
443
+ }
444
+
352
445
  class ReactDoc extends React.Component {
353
446
  render() {
354
447
  return (
@@ -356,79 +449,10 @@ class ReactDoc extends React.Component {
356
449
  <ReactNav pages={pages} />
357
450
  <main className="docs-page__content docs-page__container-fluid">
358
451
  <Switch>
359
- <Route path="/components/buttons" component={ButtonsDoc} />
360
- <Route path="/components/icon-buttons" component={IconButtonDoc} />
361
- <Route path="/components/button-groups" component={ButtonGroupsDoc} />
362
- <Route path="/components/labels" component={LabelsDoc} />
363
- <Route path="/components/icon-labels" component={IconLabelDoc} />
364
- <Route path="/components/badges" component={BadgesDoc} />
365
- <Route path="/components/alerts" component={AlertDoc} />
366
- <Route path="/components/avatar" component={AvatarDoc} />
367
- <Route path="/components/tooltips" component={TooltipDoc} />
368
- <Route path="/components/tags" component={TagDoc} />
369
- <Route path="/components/inputs" component={InputsDoc} />
370
- <Route path="/components/autocomplete" component={AutocompleteDoc} />
371
- <Route path="/components/select" component={SelectsDoc} />
372
- <Route path="/components/select-with-template" component={SelectWithTemplateDocs} />
373
- <Route path="/components/with-size-observer" component={WithSizeObserverDocs} />
374
- <Route path="/components/multiselect" component={MultiselectDocs} />
375
- <Route path="/components/treeselect" component={TreeSelectDocs} />
376
- <Route path="/components/treemenu" component={TreeMenuDocs} />
377
- <Route path="/components/duration-input" component={DurationInputDoc} />
378
- <Route path="/components/with-pagination" component={WithPaginationDocs} />
379
- <Route path="/components/popover" component={PopoverDoc} />
380
- <Route path="/components/date-picker" component={DatePickerDoc} />
381
- <Route path="/components/time-picker" component={TimePickerDoc} />
382
- <Route path="/components/switch" component={SwitchDoc} />
383
- <Route path="/components/radiogroup" component={RadioGroupDoc} />
384
- <Route path="/components/checkbox" component={CheckboxsDoc} />
385
- <Route path="/components/tab" component={TabsDoc} />
386
- <Route path="/components/left-navigation" component={LeftNavigationsDoc} />
387
- <Route path="/components/Quick-navigation-bar" component={QuickNavBarDoc} />
388
- <Route path="/components/nav-buttons" component={NavButtonsDoc} />
389
- <Route path="/components/icon-font" component={IconFontDoc} />
390
- <Route path="/components/big-icon-font" component={BigIconFontDoc} />
391
- <Route path="/components/sub-navigation" component={SubNavDoc} />
392
- <Route path="/components/dropdowns" component={DropdownDoc} />
393
- <Route path="/components/toast" component={ToastsDoc} />
394
- <Route path="/components/drag-handle" component={DragHandleDocs} />
395
- <Route path="/components/tag-input" component={TagInputDocs} />
396
- <Route path="/components/empty-states" component={EmptyStateDoc} />
397
- <Route path="/components/grid-list" component={GridListDoc} />
398
- <Route path="/components/grid-item" component={GridItemDoc} />
399
- <Route path="/components/modal" component={ModalDoc} />
400
- <Route path="/components/carousel" component={CarouselDoc} />
401
- <Route path="/components/content-divider" component={ContentDividerDoc} />
402
- <Route path="/components/menu" component={MenuDocs} />
403
- <Route path="/components/togglebox" component={ToggleboxDocs} />
404
- <Route path="/components/list-items" component={ListItemsDoc} />
405
- <Route path="/components/panel" component={PanelDoc} />
406
- <Route path="/components/select-grid" component={SelectGridDocs} />
407
- <Route path="/components/icon-picker" component={IconPickerDocs} />
408
- <Route path="/components/simple-list" component={SimpleListDoc} />
409
- <Route path="/components/boxed-list" component={BoxedListDoc} />
410
- <Route path="/components/table-list" component={TableListDoc} />
411
- <Route path="/components/content-list" component={ContentListDoc} />
412
- <Route path="/components/heading" component={HeadingDoc} />
413
- <Route path="/components/text" component={TextDoc} />
414
- <Route path="/components/container" component={ContainerDoc} />
415
- <Route path="/components/dropzone" component={DropZoneDoc} />
416
- <Route path="/components/create-button" component={CreateButtonDoc} />
417
- <Route path="/components/resizable-panels" component={ResizablePanelsDoc} />
418
- <Route path="/components/illustration-button" component={IllustrationButtonDoc} />
419
- {/* Utilities */}
420
- <Route path="/components/spacing-utilities" component={SpacingUtilitiesDoc} />
421
- <Route path="/components/text-utilities" component={TextUtilitiesDoc} />
422
- <Route path="/components/shadow-utilities" component={ShadowUtilitiesDoc} />
423
- <Route path="/components/position-utilities" component={PositionUtilitiesDoc} />
424
- <Route path="/components/overflow-utilities" component={OverflowUtilitiesDoc} />
425
- <Route path="/components/display-utilities" component={DisplayUtilitiesDoc} />
426
- <Route path="/components/flex-and-grid-utilities" component={FlexAndGridUtilitiesDoc} />
427
- <Route path="/components/border-radius-utilities" component={BorderRadiusUtilitiesDoc} />
428
- <Route path="/components/border-utilities" component={BorderUtilitiesDoc} />
429
- <Route path="/components/opacity-utilities" component={OpacityUtilitiesDoc} />
430
- <Route path="/components/object-fit-utilities" component={ObjectFitUtilitiesDoc} />
431
- <Route path="/components/object-position-utilities" component={ObjectPositionUtilitiesDoc} />
452
+ {
453
+ routes.map((route) => <Route key={route.path} path={route.path} component={route.component} />)
454
+ }
455
+
432
456
  <Route path="/" component={ReactDefault} />
433
457
  </Switch>
434
458
  </main>
@@ -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, TreeSelect, DatePicker, ContentDivider, Select, Option, AvatarGroup, Avatar, SvgIconIllustration, IllustrationButton, SubNav, NavButton } 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, TreeSelect, DatePicker, ContentDivider, Select, Option, AvatarGroup, Avatar, SvgIconIllustration, IllustrationButton, SubNav, NavButton, } 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
 
@@ -104,29 +104,37 @@ export class TestGround extends React.Component<IProps, IState> {
104
104
 
105
105
  render() {
106
106
  const avatars: Array<IAvatarInGroup> = [
107
+ {
108
+ imageUrl: null,
109
+ initials: null,
110
+ displayName: 'Unassigned',
111
+ icon:{name: 'video', color: 'var(--sd-colour-state--default)'},
112
+ statusDot:{color: 'var(--sd-colour-coverage-state--not-covering)'}
113
+ },
114
+ {
115
+ imageUrl: null,
116
+ initials: null,
117
+ displayName: 'Unassigned',
118
+ icon:{name: 'file', color: 'var(--sd-colour-state--unassigned)'},
119
+ statusDot:{color: 'var(--sd-colour-coverage-state--on-merit)'}
120
+ },
107
121
  {
108
122
  imageUrl: null,
109
123
  initials: "VS",
110
124
  displayName: 'Vladimir Stefanovic',
111
- icon:{name: 'text', color: 'var(--sd-colour-highlight)'},
125
+ icon:{name: 'text', color: 'var(--sd-colour-state--in-progress)'},
112
126
  },
113
127
  {
114
128
  imageUrl: null,
115
129
  initials: "JL",
116
130
  displayName: 'Jeffrey Lebowski',
117
- icon:{name: 'photo', color: 'var(--sd-colour-highlight)'}
131
+ icon:{name: 'photo', color: 'var(--sd-colour-state--in-workflow)'}
118
132
  },
119
133
  {
120
134
  imageUrl: null,
121
135
  initials: "WS",
122
136
  displayName: 'Walter Sobchak',
123
- icon:{name: 'video', color: 'var(--sd-colour-highlight)'}
124
- },
125
- {
126
- imageUrl: null,
127
- initials: "ML",
128
- displayName: 'Maude Lebowski',
129
- icon:{name: 'file', color: 'var(--sd-colour-highlight)'}
137
+ icon:{name: 'text', color: 'var(--sd-colour-state--done)'},
130
138
  },
131
139
  ];
132
140
 
@@ -159,6 +167,18 @@ export class TestGround extends React.Component<IProps, IState> {
159
167
 
160
168
  <hr />
161
169
 
170
+ <Avatar
171
+ displayName="Jeffrey Lebowski"
172
+ imageUrl={null}
173
+ initials='JL'
174
+ size="small"
175
+ statusDot={{color: 'var(--sd-colour-coverage-state--on-merit)'}}
176
+ icon={{name: 'text'}}
177
+ />
178
+
179
+ <hr />
180
+
181
+
162
182
  <div style={{maxWidth: '600px'}} className={`sd-shadow--z1 new-collapse-box ${this.state.openCollapsibleOne ? 'new-collapse-box--open' : ''}`}>
163
183
  {/* Header */}
164
184
  <div className='new-collapse-box__header'>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "superdesk-ui-framework",
3
- "version": "3.1.13",
3
+ "version": "3.1.15",
4
4
  "license": "AGPL-3.0",
5
5
  "repository": {
6
6
  "type": "git",
@@ -67,7 +67,7 @@ var Button = /** @class */ (function (_super) {
67
67
  _a));
68
68
  return (React.createElement("button", { id: this.props.id, className: classes, tabIndex: 0, disabled: this.props.disabled || this.props.isLoading, "data-loading": this.props.isLoading, onClick: this.props.disabled ? function () { return false; } : function (event) { return _this.props.onClick(event); }, "aria-label": this.props.iconOnly ? this.props.text : '', "data-test-id": this.props['data-test-id'], title: this.props.tooltip },
69
69
  this.props.isLoading ? React.createElement(Spinner_1.Spinner, { size: "mini" }) : null,
70
- this.props.icon && !this.props.isLoading ? React.createElement(Icon_1.Icon, { name: this.props.icon }) : null,
70
+ this.props.icon && !this.props.isLoading ? React.createElement(Icon_1.Icon, { ariaHidden: true, name: this.props.icon }) : null,
71
71
  this.props.iconOnly ? null : this.props.text));
72
72
  };
73
73
  return Button;
@@ -15,7 +15,6 @@ interface IDatePicker extends IDatePickerBase {
15
15
  onChange(valueNext: Date | null): void;
16
16
  maxDate?: Date;
17
17
  minDate?: Date;
18
- showButtonBar?: boolean;
19
18
  'data-test-id'?: string;
20
19
  }
21
20
  interface IState {
@@ -61,6 +61,7 @@ var calendar_1 = require("@superdesk/primereact/calendar");
61
61
  var lodash_1 = require("lodash");
62
62
  var react_id_generator_1 = __importDefault(require("react-id-generator"));
63
63
  var Form_1 = require("./Form");
64
+ var Button_1 = require("./Button");
64
65
  var internalPrimereactClassnames = {
65
66
  overlayVisible: 'p-input-overlay-visible',
66
67
  };
@@ -137,7 +138,14 @@ var DatePicker = /** @class */ (function (_super) {
137
138
  React.createElement("span", null, (0, moment_1.default)(this.state.value).format(this.props.dateFormat))));
138
139
  }
139
140
  return (React.createElement(Form_1.InputWrapper, { label: this.props.label, error: this.props.error, invalid: this.props.error != null, required: this.props.required, disabled: this.props.disabled, info: this.props.info, inlineLabel: this.props.inlineLabel, labelHidden: this.props.labelHidden, htmlId: this.htmlId, tabindex: this.props.tabindex },
140
- React.createElement(calendar_1.Calendar, { showButtonBar: this.props.showButtonBar, inputId: this.htmlId, ariaLabelledBy: this.htmlId + 'label', ref: function (ref) {
141
+ React.createElement(calendar_1.Calendar, { footerTemplate: this.props.required !== true ? function () { return (React.createElement("div", { className: 'd-flex justify-end' },
142
+ React.createElement(Button_1.Button, { onClick: function () {
143
+ _this.props.onChange(null);
144
+ if (_this.instance != null
145
+ && typeof _this.instance.hideOverlay === 'function') {
146
+ _this.instance.hideOverlay();
147
+ }
148
+ }, text: 'Clear', "data-test-id": 'clear-button' }))); } : undefined, inputId: this.htmlId, ariaLabelledBy: this.htmlId + 'label', ref: function (ref) {
141
149
  _this.instance = ref;
142
150
  var refAny = ref;
143
151
  if (_this.props['data-test-id'] != null && (refAny === null || refAny === void 0 ? void 0 : refAny.inputElement) != null) {
@@ -110,7 +110,7 @@ var AvatarGroup = /** @class */ (function (_super) {
110
110
  isAvatar(item)
111
111
  && item.displayName,
112
112
  isAvatar(item)
113
- ? (React.createElement(avatar_1.Avatar, { size: 'small', imageUrl: item.imageUrl, initials: item.initials, displayName: item.displayName, icon: item.icon }))
113
+ ? (React.createElement(avatar_1.Avatar, { size: 'small', imageUrl: item.imageUrl, initials: item.initials, displayName: item.displayName, icon: item.icon, statusDot: item.statusDot }))
114
114
  : (React.createElement(avatar_placeholder_1.AvatarPlaceholder, { kind: 'plus-button', size: 'small', icon: item.icon, onClick: item.onClick })))
115
115
  : React.createElement("div", null,
116
116
  React.createElement(avatar_placeholder_1.AvatarPlaceholder, { kind: 'plus-button', size: 'small', icon: item.icon, onClick: isAvatar(item) ? undefined : item.onClick, key: index })));
@@ -124,7 +124,7 @@ var AvatarGroup = /** @class */ (function (_super) {
124
124
  }
125
125
  }),
126
126
  itemsOverLimit > 0 && (React.createElement(PlusButtonWrapper, { onToggle: onToggle },
127
- React.createElement(avatar_wrapper_1.AvatarWrapper, { size: size, isEmpty: false },
127
+ React.createElement(avatar_wrapper_1.AvatarWrapper, { size: size },
128
128
  React.createElement(avatar_number_1.AvatarContentNumber, { number: "".concat(itemsOverLimit) })))))); }));
129
129
  };
130
130
  return AvatarGroup;
@@ -65,7 +65,7 @@ var AvatarContentImage = /** @class */ (function (_super) {
65
65
  if (imageUrl == null) {
66
66
  return (React.createElement("span", __assign({}, maybeButtonProps, { className: "sd-avatar-content sd-avatar-content--dummy-img", title: tooltipText }),
67
67
  React.createElement("svg", { width: "200", height: "200", viewBox: "0 0 200 200", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
68
- React.createElement("circle", { cx: "100", cy: "100", r: "100", fill: "white", fillOpacity: "0.01" }),
68
+ React.createElement("circle", { cx: "100", cy: "100", r: "100", fill: "white", fillOpacity: "0" }),
69
69
  React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M40 153V145.384C40 141.557 41.16 137.981 43.16 135C49.14 126.057 66.24 119.711 77.14 118C82.74 117.115 90.16 116.538 100 116.538C109.84 116.538 117.26 117.115 122.86 118C133.76 119.711 150.86 126.057 156.84 135C158.84 137.981 160 141.557 160 145.384V153C150 165 130 180 100 180C70 180 50 165 40 153ZM100 30C122.08 30 140 47.2307 140 68.4614C140 89.6922 122.08 106.923 100 106.923C77.92 106.923 60 89.6922 60 68.4614C60 47.2307 77.92 30 100 30Z", fill: "var(--sd-colour-avatar-dummy)", fillOpacity: "1" }))));
70
70
  }
71
71
  else {