superdesk-ui-framework 3.0.19 → 3.0.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.
@@ -2,6 +2,7 @@ import * as React from 'react';
2
2
  import * as Markup from '../../js/react';
3
3
  import { PropsList, Prop, Button, ButtonGroup, IconButton, Label, SlidingToolbar } from '../../../app-typescript';
4
4
  import * as PanelElements from '../../../app-typescript/components/Layouts/Panel';
5
+ import {Rotate} from '../../../app-typescript/components/Rotate';
5
6
 
6
7
  interface IProps {
7
8
  children?: React.ReactNode;
@@ -13,26 +14,22 @@ interface IState {
13
14
  openPanel3: boolean;
14
15
  openPanel4: boolean;
15
16
  openToolbar1: boolean;
17
+ rotate: boolean;
16
18
  }
17
19
 
18
20
  export default class PanelDoc extends React.Component<IProps, IState> {
19
21
  constructor(props: IProps) {
20
22
  super(props);
21
23
  this.state = {
22
- openPanel1: true,
23
- openPanel2: true,
24
- openPanel3: true,
25
- openPanel4: true,
26
- openToolbar1: true
24
+ openPanel1: true,
25
+ openPanel2: true,
26
+ openPanel3: true,
27
+ openPanel4: true,
28
+ openToolbar1: true,
29
+ rotate: false,
27
30
  }
28
31
  }
29
32
 
30
- // handlePanel() {
31
- // this.setState((state) => ({
32
- // openPanel: !state.openPanel,
33
- // }));
34
- // }
35
-
36
33
  render() {
37
34
  return (
38
35
  <section className='docs-page__container'>
@@ -67,7 +64,15 @@ export default class PanelDoc extends React.Component<IProps, IState> {
67
64
  </div>
68
65
  }
69
66
  <PanelElements.Panel side='left' background='light' open={this.state.openPanel1} size='x-small'>
70
- <PanelElements.PanelHeader title='This is the title for the Panel' onClose={() => this.setState({'openPanel1': false})}>
67
+ <PanelElements.PanelHeader
68
+ title='This is the title for the Panel'
69
+ onClose={() => this.setState({'openPanel1': false})}
70
+ iconButtons={[
71
+ <Rotate degrees={this.state.rotate ? 90 : 0}>
72
+ <IconButton ariaValue='Pin' icon='pin' onClick={() => this.setState({rotate: !this.state.rotate})} />
73
+ </Rotate>,
74
+ ]}
75
+ >
71
76
  </PanelElements.PanelHeader>
72
77
  <PanelElements.PanelContent>
73
78
  <PanelElements.PanelContentBlock>
@@ -91,15 +96,28 @@ export default class PanelDoc extends React.Component<IProps, IState> {
91
96
  <Button text="Open Panel" style="filled" onClick={() => this.setState({'openPanel1': true})} />
92
97
  </div>
93
98
  }
99
+
94
100
  <PanelElements.Panel side='left' background='light' open={this.state.openPanel1} size='x-small'>
95
- <PanelElements.PanelHeader title='This is the title for the Panel' onClose={() => this.setState({'openPanel1': false})}>
101
+ <PanelElements.PanelHeader
102
+ title='This is the title for the Panel'
103
+ onClose={() => this.setState({'openPanel1': false})}
104
+ iconButtons={[
105
+ <Rotate degrees={this.state.rotate ? 90 : 0}>
106
+ <IconButton ariaValue='Pin' icon='pin' onClick={() => this.setState({rotate: !this.state.rotate})} />
107
+ </Rotate>,
108
+ ]}
109
+ >
96
110
  </PanelElements.PanelHeader>
111
+
97
112
  <PanelElements.PanelContent>
98
113
  <PanelElements.PanelContentBlock>
99
- <p className='sd-margin-b--2'>Maecenas sed diam eget risus varius blandit sit amet non magna...</p>
100
- <p>Aenean lacinia bibendum nulla sed consectetur. Etiam porta sem malesuada...</p>
114
+ <p className='sd-margin-b--2'>Maecenas sed diam eget risus varius blandit sit amet non magna. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas faucibus mollis interdum.
115
+ Cras justo odio, dapibus ac facilisis in, egestas eget quam. Aenean lacinia bibendum nulla sed consectetur. Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
116
+ <p>Aenean lacinia bibendum nulla sed consectetur. Etiam porta sem malesuada magna mollis euismod. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis
117
+ vestibulum. Nullam quis risus eget urna mollis ornare vel eu leo. Curabitur blandit tempus porttitor. Aenean lacinia bibendum nulla sed consectetur.</p>
101
118
  </PanelElements.PanelContentBlock>
102
119
  </PanelElements.PanelContent>
120
+
103
121
  <PanelElements.PanelFooter>
104
122
  <Button text='Clear' style='hollow' onClick={() => false} />
105
123
  <Button text='Submit' type='primary' onClick={() => false} />
@@ -345,6 +363,7 @@ export default class PanelDoc extends React.Component<IProps, IState> {
345
363
  <Prop name='theme' isRequired={false} type='light | dark' default='/' description='Explicitly define the theme just for the of Panel Header. All child elements and the content inside the Header will inherit the selected theme.'/>
346
364
  <Prop name='color' isRequired={false} type='light | darker | blueGrey | blueGreyDarker' default='light' description='Background colour of the Panel Header. blueGrey and blueGreyDarker will also change the text colour to white.'/>
347
365
  <Prop name='ClassName' isRequired={false} type='string' default='false' description='Add custom or helper classes to modify the default behaviour if needed. Use only if necessary.'/>
366
+ <Prop name='iconButtons' isRequired={false} type='Aarray' default='false' description='Array of JSX Elements.'/>
348
367
  </PropsList>
349
368
 
350
369
  <p className="docs-page__paragraph">PanelContent</p>
@@ -2338,12 +2338,6 @@
2338
2338
  .icon--green {
2339
2339
  color: #46a446 !important; }
2340
2340
 
2341
- .icon--rotate-180 {
2342
- transform: rotate(180deg); }
2343
-
2344
- .icon--rotate-90 {
2345
- transform: rotate(90deg); }
2346
-
2347
2341
  .icon--full-opacity {
2348
2342
  opacity: 1 !important; }
2349
2343
 
@@ -20688,12 +20682,6 @@ a.label {
20688
20682
  .icon--green {
20689
20683
  color: #46a446 !important; }
20690
20684
 
20691
- .icon--rotate-180 {
20692
- transform: rotate(180deg); }
20693
-
20694
- .icon--rotate-90 {
20695
- transform: rotate(90deg); }
20696
-
20697
20685
  .icon--full-opacity {
20698
20686
  opacity: 1 !important; }
20699
20687
 
@@ -35900,6 +35888,8 @@ input.sd-inset-search__input {
35900
35888
  align-items: center;
35901
35889
  position: relative;
35902
35890
  min-height: 4.8rem; }
35891
+ .side-panel .side-panel__header-wrapper {
35892
+ display: flex; }
35903
35893
  .side-panel .side-panel__sliding-toolbar {
35904
35894
  position: absolute;
35905
35895
  display: flex;
@@ -35949,10 +35939,9 @@ input.sd-inset-search__input {
35949
35939
  font-weight: 400;
35950
35940
  font-size: 1.8rem;
35951
35941
  letter-spacing: 0.01em; }
35952
- .side-panel .side-panel__close {
35953
- position: absolute;
35954
- inset-inline-end: 0.8rem;
35955
- inset-block-start: 0.8rem;
35942
+ .side-panel .side-panel__btn-group {
35943
+ padding-inline: 0.8rem;
35944
+ padding-block: 0.8rem;
35956
35945
  z-index: 2;
35957
35946
  color: var(--color-text-light); }
35958
35947
  .side-panel .side-panel__tools {
@@ -51954,12 +51943,6 @@ i.sd-sidetab-menu__helper-icon {
51954
51943
  .icon--green {
51955
51944
  color: #46a446 !important; }
51956
51945
 
51957
- .icon--rotate-180 {
51958
- transform: rotate(180deg); }
51959
-
51960
- .icon--rotate-90 {
51961
- transform: rotate(90deg); }
51962
-
51963
51946
  .icon--full-opacity {
51964
51947
  opacity: 1 !important; }
51965
51948