superdesk-ui-framework 3.0.1-beta.26 → 3.0.1-beta.27

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 (84) hide show
  1. package/.vscode/settings.json +5 -0
  2. package/app/styles/_sd-tag-input.scss +1 -36
  3. package/app/styles/_table-list.scss +0 -1
  4. package/app/styles/primereact/_pr-dialog.scss +0 -4
  5. package/app-typescript/components/Label.tsx +6 -10
  6. package/app-typescript/components/Layouts/AuthoringFrame.tsx +1 -2
  7. package/app-typescript/components/Layouts/AuthoringFrameRightBar.tsx +2 -21
  8. package/app-typescript/components/Lists/TableList.tsx +2 -62
  9. package/app-typescript/components/Spacer.tsx +1 -1
  10. package/app-typescript/components/TreeSelect.tsx +33 -85
  11. package/app-typescript/dist/components/Alert.d.ts +16 -0
  12. package/app-typescript/dist/components/Autocomplete.d.ts +48 -0
  13. package/app-typescript/dist/components/Avatar.d.ts +33 -0
  14. package/app-typescript/dist/components/Badge.d.ts +13 -0
  15. package/app-typescript/dist/components/Button.d.ts +23 -0
  16. package/app-typescript/dist/components/ButtonGroup.d.ts +12 -0
  17. package/app-typescript/dist/components/CheckButtonGroup.d.ts +11 -0
  18. package/app-typescript/dist/components/CheckGroup.d.ts +9 -0
  19. package/app-typescript/dist/components/Checkbox.d.ts +19 -0
  20. package/app-typescript/dist/components/CheckboxButton.d.ts +19 -0
  21. package/app-typescript/dist/components/DatePicker.d.ts +37 -0
  22. package/app-typescript/dist/components/Divider.d.ts +9 -0
  23. package/app-typescript/dist/components/DonutChart.d.ts +12 -0
  24. package/app-typescript/dist/components/Dropdown.d.ts +28 -0
  25. package/app-typescript/dist/components/DropdownFirst.d.ts +42 -0
  26. package/app-typescript/dist/components/EmptyState.d.ts +11 -0
  27. package/app-typescript/dist/components/FormLabel.d.ts +9 -0
  28. package/app-typescript/dist/components/Genie.d.ts +13 -0
  29. package/app-typescript/dist/components/GridItem.d.ts +69 -0
  30. package/app-typescript/dist/components/GridList.d.ts +14 -0
  31. package/app-typescript/dist/components/HeadingText.d.ts +10 -0
  32. package/app-typescript/dist/components/HelloWorld.d.ts +8 -0
  33. package/app-typescript/dist/components/Icon.d.ts +12 -0
  34. package/app-typescript/dist/components/IconButton.d.ts +12 -0
  35. package/app-typescript/dist/components/IconLabel.d.ts +11 -0
  36. package/app-typescript/dist/components/Input.d.ts +24 -0
  37. package/app-typescript/dist/components/Label.d.ts +15 -0
  38. package/app-typescript/dist/components/LeftMenu.d.ts +26 -0
  39. package/app-typescript/dist/components/Loader.d.ts +8 -0
  40. package/app-typescript/dist/components/NavButton.d.ts +15 -0
  41. package/app-typescript/dist/components/Popover.d.ts +13 -0
  42. package/app-typescript/dist/components/PropsList.d.ts +15 -0
  43. package/app-typescript/dist/components/Radio.d.ts +19 -0
  44. package/app-typescript/dist/components/RadioButton.d.ts +20 -0
  45. package/app-typescript/dist/components/Select.d.ts +29 -0
  46. package/app-typescript/dist/components/SelectWithTemplate.d.ts +32 -0
  47. package/app-typescript/dist/components/SlidingToolbar.d.ts +8 -0
  48. package/app-typescript/dist/components/StrechBar.d.ts +4 -0
  49. package/app-typescript/dist/components/SubNav.d.ts +10 -0
  50. package/app-typescript/dist/components/Switch.d.ts +12 -0
  51. package/app-typescript/dist/components/TabCustom.d.ts +25 -0
  52. package/app-typescript/dist/components/TabList.d.ts +22 -0
  53. package/app-typescript/dist/components/Tag.d.ts +9 -0
  54. package/app-typescript/dist/components/TagInput.d.ts +7 -0
  55. package/app-typescript/dist/components/TagInputTest.d.ts +18 -0
  56. package/app-typescript/dist/components/TimePicker.d.ts +11 -0
  57. package/app-typescript/dist/components/Tooltip.d.ts +11 -0
  58. package/app-typescript/dist/components/_Positioner.d.ts +27 -0
  59. package/app-typescript/dist/index.d.ts +56 -0
  60. package/dist/examples.bundle.js +1183 -1548
  61. package/dist/playgrounds/react-playgrounds/Index.tsx +0 -1
  62. package/dist/react/TableList.tsx +0 -2
  63. package/dist/react/TreeSelect.tsx +78 -100
  64. package/dist/superdesk-ui.bundle.css +2 -34
  65. package/dist/superdesk-ui.bundle.js +1058 -1131
  66. package/dist/vendor.bundle.js +4 -4
  67. package/examples/index.js +0 -4
  68. package/examples/pages/playgrounds/react-playgrounds/Index.tsx +0 -1
  69. package/examples/pages/react/TableList.tsx +0 -2
  70. package/examples/pages/react/TreeSelect.tsx +78 -100
  71. package/package.json +1 -1
  72. package/react/components/Label.d.ts +1 -1
  73. package/react/components/Label.js +5 -10
  74. package/react/components/Layouts/AuthoringFrame.d.ts +0 -1
  75. package/react/components/Layouts/AuthoringFrame.js +1 -1
  76. package/react/components/Layouts/AuthoringFrameRightBar.d.ts +2 -9
  77. package/react/components/Layouts/AuthoringFrameRightBar.js +3 -14
  78. package/react/components/Lists/TableList.d.ts +0 -1
  79. package/react/components/Lists/TableList.js +6 -34
  80. package/react/components/TreeSelect.d.ts +1 -3
  81. package/react/components/TreeSelect.js +23 -50
  82. package/yarn-error.log +111 -0
  83. package/dist/playgrounds/react-playgrounds/Multiedit.tsx +0 -321
  84. package/examples/pages/playgrounds/react-playgrounds/Multiedit.tsx +0 -321
@@ -0,0 +1,5 @@
1
+ {
2
+ "cSpell.words": [
3
+ "qcode"
4
+ ]
5
+ }
@@ -276,7 +276,6 @@ tags-input,
276
276
  }
277
277
  }
278
278
  .suggestion-item {
279
- position: relative;
280
279
  padding: 0.5rem 1rem;
281
280
  cursor: pointer;
282
281
  white-space: nowrap;
@@ -313,20 +312,6 @@ tags-input,
313
312
  justify-content: space-between;
314
313
  align-items: center;
315
314
  }
316
- .suggestion-item--bgcolor {
317
- min-height: 1.5em;
318
- min-width: 1.5em;
319
- padding: 4px 0;
320
- display: inline-flex;
321
- justify-content: center;
322
- align-items: center;
323
- border-radius: 99px;
324
- white-space: nowrap;
325
-
326
- &[style] {
327
- padding-inline: 8px;
328
- }
329
- }
330
315
  .suggestion-item--disabled {
331
316
  opacity: 0.5;
332
317
  }
@@ -508,11 +493,6 @@ tags-input,
508
493
  }
509
494
  }
510
495
 
511
- .tags-input--single-select {
512
- display: grid !important;
513
- align-items: center !important;
514
- }
515
-
516
496
  .tags-input--multi-select,
517
497
  .tags-input--single-select {
518
498
  position: relative;
@@ -566,7 +546,7 @@ tags-input,
566
546
  .tags-input__remove-button {
567
547
  display: flex;
568
548
  align-items: center;
569
- align-self: center;
549
+ align-self: flex-end;
570
550
  margin-inline-start: auto;
571
551
  z-index: 2;
572
552
  cursor: pointer;
@@ -581,18 +561,3 @@ tags-input,
581
561
  font-weight: 300;
582
562
  }
583
563
  }
584
-
585
- .item-border {
586
- width: 5px;
587
- z-index: 2;
588
- position: absolute;
589
- inset-block: 7px;
590
- inset-inline-start: 3px;
591
- border-radius: 2px;
592
-
593
- &-selected {
594
- inset-block: 5px;
595
- }
596
- }
597
-
598
-
@@ -6,7 +6,6 @@
6
6
  flex-direction: column;
7
7
  align-self: stretch;
8
8
  overflow: hidden !important;
9
- padding: 1px;
10
9
  //gap: $sd-base-increment * 1.5;
11
10
  &--comfortable {
12
11
  gap: $sd-base-increment * 2;
@@ -43,10 +43,6 @@
43
43
  overflow-y: auto;
44
44
  }
45
45
 
46
- .p-dialog-flex {
47
- display: flex;
48
- }
49
-
50
46
  .p-dialog-header {
51
47
  display: flex;
52
48
  align-items: center;
@@ -78,15 +78,11 @@ export class Label extends React.PureComponent<IProps> {
78
78
  }
79
79
  }
80
80
 
81
- export function getTextColor(backgroundColor: string): 'black' | 'white' | undefined {
82
- if (backgroundColor) {
83
- const r = parseInt(backgroundColor.substr(1, 2), 16);
84
- const g = parseInt(backgroundColor.substr(3, 2), 16);
85
- const b = parseInt(backgroundColor.substr(5, 2), 16);
86
- const yiq = ((r * 299) + (g * 587) + (b * 114)) / 1000;
81
+ export function getTextColor(backgroundColor: string): 'black' | 'white' {
82
+ const r = parseInt(backgroundColor.substr(1, 2), 16);
83
+ const g = parseInt(backgroundColor.substr(3, 2), 16);
84
+ const b = parseInt(backgroundColor.substr(5, 2), 16);
85
+ const yiq = ((r * 299) + (g * 587) + (b * 114)) / 1000;
87
86
 
88
- return (yiq >= 128) ? 'black' : 'white';
89
- } else {
90
- return;
91
- }
87
+ return (yiq >= 128) ? 'black' : 'white';
92
88
  }
@@ -16,7 +16,6 @@ interface IProps {
16
16
  header?: React.ReactNode;
17
17
  main?: React.ReactNode;
18
18
  sideBar?: React.ReactNode;
19
- sideBarClosed?: boolean;
20
19
  sidePanel?: React.ReactNode;
21
20
  sideOverlay?: React.ReactNode;
22
21
  sideOverlayOpen?: boolean;
@@ -57,7 +56,7 @@ export class AuthoringFrame extends React.PureComponent<IProps> {
57
56
  </AuthoringFrameSidePanelOverlay>
58
57
  )}
59
58
  {this.props.sideBar && (
60
- <AuthoringFrameRightBar closed={this.props.sideBarClosed}>
59
+ <AuthoringFrameRightBar>
61
60
  {this.props.sideBar}
62
61
  </AuthoringFrameRightBar>
63
62
  )}
@@ -2,31 +2,12 @@ import * as React from 'react';
2
2
 
3
3
  interface IProps {
4
4
  children?: React.ReactNode;
5
- closed?: boolean;
6
5
  }
7
6
 
8
- interface IState {
9
- children?: React.ReactNode;
10
- closed?: boolean;
11
- }
12
-
13
- export class AuthoringFrameRightBar extends React.PureComponent<IProps, IState> {
14
- constructor(props: IProps) {
15
- super(props);
16
- this.state = {
17
- closed: this.props.closed ? this.props.closed : false,
18
- };
19
- }
20
- componentDidUpdate(prevProps: Readonly<IProps>): void {
21
- if (prevProps.closed !== this.props.closed) {
22
- this.setState({
23
- closed: this.props.closed,
24
- });
25
- }
26
- }
7
+ export class AuthoringFrameRightBar extends React.PureComponent<IProps> {
27
8
  render() {
28
9
  return (
29
- !this.state.closed && <div className="sd-editor-grid__sidetabs-bar">
10
+ <div className="sd-editor-grid__sidetabs-bar">
30
11
  {this.props.children}
31
12
  </div>
32
13
  );
@@ -4,7 +4,6 @@ import { DragDropContext, Droppable, Draggable, DropResult } from "react-beautif
4
4
  import { Tooltip } from '../Tooltip';
5
5
  import { Button } from '../Button';
6
6
  import { Dropdown, IMenuItem, ISubmenu, IMenuGroup } from '../Dropdown';
7
- import ReactDOM from 'react-dom';
8
7
 
9
8
  export interface IProps {
10
9
  array: Array<IPropsArrayItem>;
@@ -13,7 +12,6 @@ export interface IProps {
13
12
  className?: string;
14
13
  readOnly?: boolean;
15
14
  showDragHandle?: 'always' | 'onHover' | 'none'; // always default
16
- append?: boolean;
17
15
  onDrag?(start: number, end: number): void;
18
16
  onAddItem?(index: number, item?: IPropsArrayItem ): void;
19
17
  itemsDropdown?(index?: number): Array<IMenuItem | ISubmenu | IMenuGroup | 'divider'>;
@@ -124,23 +122,8 @@ class TableList extends React.PureComponent<IProps, IState> {
124
122
  {...provided.droppableProps} >
125
123
  {this.state.items.map((item: IPropsArrayItem, index: number) => (
126
124
  <Draggable key={index} draggableId={`${index}`} index={index}>
127
- {(provided2, snapshot) => (
128
- this.props.append
129
- ? <PortalItem
130
- provided={provided2}
131
- snapshot={snapshot}
132
- item={item}
133
- index={index}
134
- dragAndDrop={this.props.dragAndDrop}
135
- showDragHandle={this.props.showDragHandle}
136
- addItem={this.props.addItem}
137
- onAddItem={() => this.props.onAddItem
138
- && this.props.onAddItem(index, item)}
139
- itemsDropdown={() => this.props.itemsDropdown
140
- ? this.props.itemsDropdown(index)
141
- : []}
142
- />
143
- : <div
125
+ {(provided2, _snapshot2) => (
126
+ <div
144
127
  ref={provided2.innerRef}
145
128
  {...provided2.draggableProps}
146
129
  {...provided2.dragHandleProps} >
@@ -352,49 +335,6 @@ class TableListItem extends React.PureComponent<IPropsItem> {
352
335
  }
353
336
  }
354
337
 
355
- class PortalItem extends React.PureComponent {
356
- props: any;
357
- render() {
358
- const provided = this.props.provided;
359
- const snapshot = this.props.snapshot;
360
-
361
- const usePortal: boolean = snapshot.isDragging;
362
-
363
- const child = (
364
- <div
365
- ref={provided.innerRef}
366
- {...provided.draggableProps}
367
- {...provided.dragHandleProps}>
368
- <TableListItem
369
- dragAndDrop={this.props.dragAndDrop}
370
- start={this.props.item.start}
371
- center={this.props.item.center}
372
- end={this.props.item.end}
373
- action={this.props.item.action}
374
- onClick={this.props.item.onClick ? this.props.item.onClick : undefined}
375
- onDoubleClick={this.props.item.onDoubleClick
376
- ? this.props.item.onDoubleClick
377
- : undefined}
378
- addItem={this.props.addItem}
379
- itemsDropdown={this.props.itemsDropdown}
380
- hexColor={this.props.item.hexColor}
381
- locked={this.props.item.locked}
382
- positionLocked={this.props.item.positionLocked}
383
- onAddItem={() => this.props.onAddItem}
384
- showDragHandle={this.props.showDragHandle}
385
- />
386
- </div>
387
- );
388
-
389
- if (!usePortal) {
390
- return child;
391
- }
392
-
393
- // if dragging - put the item in a portal
394
- return ReactDOM.createPortal(child, document.body);
395
- }
396
- }
397
-
398
338
  export {
399
339
  TableList, TableListItem
400
340
  };
@@ -4,7 +4,7 @@ import classNames from 'classnames';
4
4
  export interface IPropsSpacer {
5
5
  h?: boolean; // horizontal
6
6
  v?: boolean; // vertical
7
- gap: '0' | '4' | '8' | '16' | '32' | '64';
7
+ gap: '4' | '8' | '16' | '32' | '64';
8
8
  justifyContent?: 'start' | 'end' | 'center' | 'space-around' | 'space-between' | 'space-evenly' | 'stretch';
9
9
  alignItems?: 'start' | 'end' | 'center' | 'stretch';
10
10
  noGrow?: boolean;
@@ -6,7 +6,6 @@ import _debounce from 'lodash/debounce';
6
6
  import { InputWrapper } from "./Form";
7
7
  import { createPopper } from '@popperjs/core';
8
8
  import {isEqual} from 'lodash';
9
- import {getTextColor} from './Label';
10
9
 
11
10
  interface IState<T> {
12
11
  value: Array<T>;
@@ -45,10 +44,8 @@ interface IPropsBase<T> {
45
44
  disabled?: boolean;
46
45
  getLabel(item: T): string;
47
46
  getId(item: T): string;
48
- getBackgroundColor?(item: T): string;
49
- getBorderColor?(item: T): string;
50
47
  optionTemplate?(item: T): React.ComponentType<T> | JSX.Element;
51
- valueTemplate?(item: T, Wrapper: any): React.ComponentType<T> | JSX.Element;
48
+ valueTemplate?(item: T): React.ComponentType<T> | JSX.Element;
52
49
  onChange(e: Array<T>): void;
53
50
  }
54
51
 
@@ -105,6 +102,7 @@ export class TreeSelect<T> extends React.Component<IProps<T>, IState<T>> {
105
102
  this.toggleMenu = this.toggleMenu.bind(this);
106
103
  this.dropdownRef = React.createRef();
107
104
  this.openDropdownRef = React.createRef();
105
+
108
106
  }
109
107
 
110
108
  componentDidMount = () => {
@@ -341,24 +339,17 @@ export class TreeSelect<T> extends React.Component<IProps<T>, IState<T>> {
341
339
  event.stopPropagation();
342
340
  this.handleTree(event, option);
343
341
  }}>
344
- {this.props.getBorderColor
345
- && <div className="item-border"
346
- style={{backgroundColor: this.props.getBorderColor(option.value)}}></div>}
347
- <span
348
- style={this.props.getBackgroundColor
349
- ? {backgroundColor: this.props.getBackgroundColor(option.value),
350
- color: getTextColor(this.props.getBackgroundColor(option.value))}
351
- : undefined}
352
- className={'suggestion-item--bgcolor'
353
- + (selectedItem ? ' suggestion-item--disabled' : '')}
354
- >
355
- {this.props.optionTemplate
342
+ {this.props.optionTemplate
356
343
  ? this.props.optionTemplate(option.value)
357
- : this.props.getLabel(option.value)}
358
- </span>
359
- {option.children && <span className="suggestion-item__icon">
360
- <Icon name="chevron-right-thin"></Icon>
361
- </span>}
344
+ : <span
345
+ className={selectedItem
346
+ ? 'suggestion-item--disabled' : undefined}
347
+ >
348
+ {this.props.getLabel(option.value)}
349
+ </span>}
350
+ {option.children && <span className="suggestion-item__icon">
351
+ <Icon name="chevron-right-thin"></Icon>
352
+ </span>}
362
353
  </li>;
363
354
  });
364
355
  }
@@ -460,46 +451,27 @@ export class TreeSelect<T> extends React.Component<IProps<T>, IState<T>> {
460
451
  </button>}
461
452
  <ul className="tags-input__tag-list">
462
453
  {this.state.value.map((item, i: number) => {
463
- const Wrapper: React.ComponentType<{backgroundColor?: string}>
464
- = ({backgroundColor, children}) => (
454
+ return <React.Fragment key={i}>
465
455
  <li
466
456
  className={"tags-input__tag-item tags-input__tag-item--multi-select"
467
457
  + (this.props.readOnly ? ' tags-input__tag-item--readonly' : '')}
468
- onClick={() => !this.props.readOnly && this.removeClick(i)}
469
- style={this.props.valueTemplate
470
- ? {backgroundColor}
471
- : this.props.getBackgroundColor
472
- && {backgroundColor: this.props.getBackgroundColor(item)}}>
473
- <span
474
- style={{color: backgroundColor
475
- ? getTextColor(backgroundColor)
476
- : this.props.getBackgroundColor
477
- && getTextColor(this.props.getBackgroundColor(item))}}
478
- className="tags-input__helper-box">
479
- {children}
480
- {!this.props.readOnly && <span className="tags-input__remove-button">
458
+ onClick={() => this.props.readOnly || this.removeClick(i)}>
459
+ <span className="tags-input__helper-box">
460
+ {this.props.valueTemplate
461
+ ? this.props.valueTemplate(item)
462
+ : <span>{this.props.getLabel(item)}</span>}
463
+ {this.props.readOnly
464
+ || <span className="tags-input__remove-button">
481
465
  <Icon name="close-small"></Icon>
482
466
  </span>}
483
467
  </span>
484
468
  </li>
485
- );
486
-
487
- return (
488
- <React.Fragment key={i}>
489
- {this.props.valueTemplate
490
- ? this.props.valueTemplate(item, Wrapper)
491
- : <Wrapper>
492
- <span>{this.props.getLabel(item)}</span>
493
- </Wrapper>
494
- }
495
- </React.Fragment>
496
- );
469
+ </React.Fragment>;
497
470
  })}
498
471
  </ul>
499
472
  {this.state.value.length > 0
500
473
  ? this.props.readOnly
501
474
  || <button className="tags-input__remove-value"
502
- style={{position: 'relative', bottom: '2px'}}
503
475
  onClick={() => this.setState({value: []})}>
504
476
  <Icon name='remove-sign'></Icon>
505
477
  </button> : null}
@@ -518,40 +490,21 @@ export class TreeSelect<T> extends React.Component<IProps<T>, IState<T>> {
518
490
  </span>
519
491
  </span>}
520
492
  {this.state.value.map((item, i: number) => {
521
- const Wrapper: React.ComponentType<{backgroundColor?: string, borderColor?: string}>
522
- = ({backgroundColor, borderColor, children}) => (
493
+ return <React.Fragment key={i}>
523
494
  <span
524
495
  className={ 'tags-input__single-item'
525
496
  + (this.props.readOnly ? ' tags-input__tag-item--readonly' : '')}
526
497
  onClick={() => this.props.readOnly || this.removeClick(i)}>
527
- {this.props.getBorderColor
528
- && <div className="item-border item-border-selected"
529
- style={borderColor
530
- ? {backgroundColor: borderColor}
531
- : {backgroundColor: this.props.getBorderColor(item)}}></div>}
532
- <span
533
- style={{color: backgroundColor && getTextColor(backgroundColor)}}
534
- className="tags-input__helper-box">
535
- <span
536
- className={backgroundColor && `tags-input__tag-item`}
537
- style={{backgroundColor, margin: 0}}>
538
- {children}
539
- </span>
498
+ <span className="tags-input__helper-box">
499
+ {this.props.valueTemplate
500
+ ? this.props.valueTemplate(item)
501
+ : <span>{this.props.getLabel(item)}</span>}
540
502
  {this.props.readOnly
541
503
  || <span className="tags-input__remove-button">
542
504
  <Icon name='remove-sign'></Icon>
543
505
  </span>}
544
506
  </span>
545
507
  </span>
546
- );
547
-
548
- return <React.Fragment key={i}>
549
- {this.props.valueTemplate
550
- ? this.props.valueTemplate(item, Wrapper)
551
- : <Wrapper>
552
- <span>{this.props.getLabel(item)}</span>
553
- </Wrapper>
554
- }
555
508
  </React.Fragment>;
556
509
  })}
557
510
  </div>
@@ -630,19 +583,14 @@ export class TreeSelect<T> extends React.Component<IProps<T>, IState<T>> {
630
583
  event.stopPropagation();
631
584
  this.handleTree(event, option);
632
585
  }}>
633
- {(this.props.getBorderColor && !this.props.allowMultiple) && <div className="item-border" style={{backgroundColor: this.props.getBorderColor(option.value)}}></div>}
634
- <span
635
- style={(this.props.getBackgroundColor && option.value)
636
- ? {backgroundColor: this.props.getBackgroundColor(option.value),
637
- color: getTextColor(this.props.getBackgroundColor(option.value))}
638
- : undefined}
639
- className={'suggestion-item--bgcolor'
640
- + (selectedItem ? ' suggestion-item--disabled' : '')}
586
+ {this.props.optionTemplate
587
+ ? this.props.optionTemplate(option.value)
588
+ : <span
589
+ className={selectedItem
590
+ ? 'suggestion-item--disabled' : undefined}
641
591
  >
642
- {this.props.optionTemplate
643
- ? this.props.optionTemplate(option.value)
644
- : this.props.getLabel(option.value)}
645
- </span>
592
+ {this.props.getLabel(option.value)}
593
+ </span>}
646
594
  {option.children && <span className="suggestion-item__icon">
647
595
  <Icon name="chevron-right-thin"></Icon>
648
596
  </span>}
@@ -0,0 +1,16 @@
1
+ import * as React from 'react';
2
+ interface IProps {
3
+ type?: 'primary' | 'success' | 'warning' | 'alert' | 'highlight' | 'sd-green';
4
+ style?: 'filled' | 'hollow';
5
+ size?: 'normal' | 'small';
6
+ restoreIcon?: 'info' | 'help';
7
+ }
8
+ interface IState {
9
+ open: boolean;
10
+ }
11
+ export declare class Alert extends React.PureComponent<IProps, IState> {
12
+ constructor(props: IProps);
13
+ onToggle(): void;
14
+ render(): JSX.Element;
15
+ }
16
+ export {};
@@ -0,0 +1,48 @@
1
+ import * as React from 'react';
2
+ interface IProps {
3
+ items: Array<any>;
4
+ keyValue?: string;
5
+ minLength?: number;
6
+ value?: string | object;
7
+ label?: string;
8
+ placeholder?: string;
9
+ info?: string;
10
+ error?: string;
11
+ required?: boolean;
12
+ disabled?: boolean;
13
+ invalid?: boolean;
14
+ inlineLabel?: boolean;
15
+ isSearchField?: boolean;
16
+ listItemTemplate?(value: any): any;
17
+ search?(searhString: string, callback: (result: Array<any>) => void): {
18
+ cancel: () => void;
19
+ };
20
+ onChange(newValue: string): void;
21
+ onSelect?(suggestion: string): void;
22
+ }
23
+ interface IState {
24
+ selectedItem: any;
25
+ filteredItems: any;
26
+ invalid: boolean;
27
+ focused: boolean;
28
+ }
29
+ export declare class Autocomplete extends React.Component<IProps, IState> {
30
+ latestCall?: {
31
+ cancel: () => void;
32
+ };
33
+ constructor(props: IProps);
34
+ htmlId: string;
35
+ search(term: string): void;
36
+ searchItem(event: any): void;
37
+ handleChange(event: {
38
+ originalEvent: Event;
39
+ value: any;
40
+ }): void;
41
+ handleSelect(event: {
42
+ originalEvent: Event;
43
+ value: any;
44
+ }): void;
45
+ handleInputClear(): void;
46
+ render(): JSX.Element;
47
+ }
48
+ export {};
@@ -0,0 +1,33 @@
1
+ import * as React from 'react';
2
+ interface IBase {
3
+ tooltipText?: string;
4
+ }
5
+ interface IImageAvatar extends IBase {
6
+ imageUrl?: string;
7
+ }
8
+ interface ITextAvatar extends IBase {
9
+ text: string;
10
+ }
11
+ export declare class AvatarContentText extends React.PureComponent<ITextAvatar> {
12
+ render(): JSX.Element;
13
+ }
14
+ export declare class AvatarContentImage extends React.PureComponent<IImageAvatar> {
15
+ render(): JSX.Element;
16
+ }
17
+ interface IPropsAvatarWrapper {
18
+ size?: 'small' | 'medium' | 'large' | 'x-large' | 'xx-large';
19
+ statusIndicator?: {
20
+ status: 'online' | 'offline';
21
+ tooltipText?: string;
22
+ };
23
+ administratorIndicator?: {
24
+ enabled: boolean;
25
+ tooltipText?: string;
26
+ };
27
+ children: React.ReactNode;
28
+ 'data-test-id'?: string;
29
+ }
30
+ export declare class AvatarWrapper extends React.PureComponent<IPropsAvatarWrapper> {
31
+ render(): JSX.Element;
32
+ }
33
+ export {};
@@ -0,0 +1,13 @@
1
+ import * as React from 'react';
2
+ interface IProps {
3
+ text?: string;
4
+ type?: 'default' | 'primary' | 'success' | 'warning' | 'alert' | 'highlight' | 'light';
5
+ color?: string;
6
+ shape?: 'round' | 'square';
7
+ children?: React.ReactNode;
8
+ 'data-test-id'?: string;
9
+ }
10
+ export declare class Badge extends React.PureComponent<IProps> {
11
+ render(): JSX.Element;
12
+ }
13
+ export {};
@@ -0,0 +1,23 @@
1
+ import * as React from 'react';
2
+ interface IButtonBase {
3
+ id?: string;
4
+ theme?: 'light' | 'dark';
5
+ type?: 'default' | 'primary' | 'success' | 'warning' | 'alert' | 'highlight' | 'sd-green';
6
+ size?: 'small' | 'normal' | 'large';
7
+ children?: never;
8
+ icon?: string;
9
+ disabled?: boolean;
10
+ iconOnly?: boolean;
11
+ onClick(): void;
12
+ 'data-test-id'?: string;
13
+ }
14
+ interface IPropsButton extends IButtonBase {
15
+ text: string;
16
+ expand?: boolean;
17
+ style?: 'filled' | 'hollow' | 'text-only';
18
+ shape?: 'square' | 'round';
19
+ }
20
+ export declare class Button extends React.PureComponent<IPropsButton> {
21
+ render(): JSX.Element;
22
+ }
23
+ export {};
@@ -0,0 +1,12 @@
1
+ import * as React from 'react';
2
+ interface IProps {
3
+ orientation?: 'horizontal' | 'vertical';
4
+ spaces?: 'comfort' | 'compact';
5
+ align?: 'left' | 'right' | 'center' | 'inline';
6
+ padded?: boolean;
7
+ children: React.ReactNode;
8
+ }
9
+ export declare class ButtonGroup extends React.PureComponent<IProps> {
10
+ render(): JSX.Element;
11
+ }
12
+ export {};
@@ -0,0 +1,11 @@
1
+ import * as React from 'react';
2
+ interface IProps {
3
+ orientation?: 'horizontal' | 'vertical';
4
+ grid?: boolean;
5
+ align?: 'left' | 'right' | 'center' | 'inline';
6
+ padded?: boolean;
7
+ }
8
+ export declare class CheckButtonGroup extends React.PureComponent<IProps> {
9
+ render(): JSX.Element;
10
+ }
11
+ export {};
@@ -0,0 +1,9 @@
1
+ import * as React from 'react';
2
+ interface IProps {
3
+ orientation?: 'horizontal' | 'vertical';
4
+ children: React.ReactNode;
5
+ }
6
+ export declare class CheckGroup extends React.PureComponent<IProps> {
7
+ render(): JSX.Element;
8
+ }
9
+ export {};
@@ -0,0 +1,19 @@
1
+ import * as React from 'react';
2
+ interface IProps {
3
+ label: {
4
+ text: string;
5
+ side?: 'left' | 'right';
6
+ hidden?: boolean;
7
+ };
8
+ checked?: boolean;
9
+ disabled?: boolean;
10
+ required?: boolean;
11
+ onChange(nextValue: boolean): void;
12
+ }
13
+ export declare class Checkbox extends React.Component<IProps> {
14
+ htmlId: string;
15
+ constructor(props: IProps);
16
+ handleChange(event: React.ChangeEvent<HTMLInputElement>): void;
17
+ render(): JSX.Element;
18
+ }
19
+ export {};