superdesk-ui-framework 3.0.82 → 3.1.0

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.
@@ -0,0 +1,14 @@
1
+ <svg width="10" height="14" viewBox="0 0 10 14" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M1 0C0.447715 0 0 0.447715 0 1C0 1.55228 0.447715 2 1 2C1.55228 2 2 1.55228 2 1C2 0.447715 1.55228 0 1 0Z" fill="#2C323A"/>
3
+ <path d="M0 5C0 4.44772 0.447715 4 1 4C1.55228 4 2 4.44772 2 5C2 5.55228 1.55228 6 1 6C0.447715 6 0 5.55228 0 5Z" fill="#2C323A"/>
4
+ <path d="M1 8C0.447715 8 0 8.44771 0 9C0 9.55229 0.447715 10 1 10C1.55228 10 2 9.55229 2 9C2 8.44771 1.55228 8 1 8Z" fill="#2C323A"/>
5
+ <path d="M1 12C0.447715 12 0 12.4477 0 13C0 13.5523 0.447715 14 1 14C1.55228 14 2 13.5523 2 13C2 12.4477 1.55228 12 1 12Z" fill="#2C323A"/>
6
+ <path d="M5 0C4.44772 0 4 0.447715 4 1C4 1.55228 4.44772 2 5 2C5.55228 2 6 1.55228 6 1C6 0.447715 5.55228 0 5 0Z" fill="#2C323A"/>
7
+ <path d="M4 5C4 4.44772 4.44772 4 5 4C5.55228 4 6 4.44772 6 5C6 5.55228 5.55228 6 5 6C4.44772 6 4 5.55228 4 5Z" fill="#2C323A"/>
8
+ <path d="M5 8C4.44772 8 4 8.44771 4 9C4 9.55229 4.44772 10 5 10C5.55228 10 6 9.55229 6 9C6 8.44771 5.55228 8 5 8Z" fill="#2C323A"/>
9
+ <path d="M5 12C4.44772 12 4 12.4477 4 13C4 13.5523 4.44772 14 5 14C5.55228 14 6 13.5523 6 13C6 12.4477 5.55228 12 5 12Z" fill="#2C323A"/>
10
+ <path d="M8 1C8 0.447715 8.44771 0 9 0C9.55228 0 10 0.447715 10 1C10 1.55228 9.55228 2 9 2C8.44771 2 8 1.55228 8 1Z" fill="#2C323A"/>
11
+ <path d="M9 4C8.44771 4 8 4.44772 8 5C8 5.55228 8.44771 6 9 6C9.55228 6 10 5.55228 10 5C10 4.44772 9.55228 4 9 4Z" fill="#2C323A"/>
12
+ <path d="M8 9C8 8.44771 8.44771 8 9 8C9.55228 8 10 8.44771 10 9C10 9.55229 9.55228 10 9 10C8.44771 10 8 9.55229 8 9Z" fill="#2C323A"/>
13
+ <path d="M8 13C8 12.4477 8.44771 12 9 12C9.55228 12 10 12.4477 10 13C10 13.5523 9.55228 14 9 14C8.44771 14 8 13.5523 8 13Z" fill="#2C323A"/>
14
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg width="4" height="4" viewBox="0 0 4 4" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M1 0C0.447715 0 0 0.447715 0 1C0 1.55228 0.447715 2 1 2C1.55228 2 2 1.55228 2 1C2 0.447715 1.55228 0 1 0Z" fill="#2C323A"/>
3
+ </svg>
@@ -1,2 +1,3 @@
1
1
  @import 'design-tokens/design-tokens-general';
2
- @import 'design-tokens/new-colors';
2
+ @import 'design-tokens/new-colors';
3
+ @import 'design-tokens/component-tokens';
@@ -1,24 +1,48 @@
1
- .drag-handle {
2
- height: 30px;
3
- width: 8px;
4
- opacity: 0.85;
5
- }
6
1
 
7
2
  .drag-handle-wrapper {
8
- padding: 6px;
9
3
  display: inline-flex;
10
4
  justify-content: center;
11
5
  align-items: center;
12
- background-color: var(--sd-colour-line--medium);
13
- border-start-start-radius: 3px;
14
- border-end-start-radius: 3px;
6
+ transition: all 0.2s ease;
7
+ outline: none;
8
+ color: var(--color-text);
9
+ background-color: transparent;
10
+ .drag-handle-dots {
11
+ transition: all 0.1s ease;
12
+ opacity: 0.4;
13
+ }
15
14
  &:hover {
16
- background-color: var(--sd-colour-line--strong);
17
15
  cursor: grab;
16
+ .drag-handle-dots {
17
+ opacity: 0.8;
18
+ }
18
19
  }
19
20
  &:active {
20
- background-color: var(--sd-colour-interactive);
21
21
  cursor: grabbing;
22
- opacity: 1;
22
+ .drag-handle-dots {
23
+ opacity: 1;
24
+ }
25
+ }
26
+ &.drag-handle-wrapper--boxed {
27
+ padding: var(--drag-handle-boxed-padding);
28
+ background-color: var(--drag-handle-boxed-color-bg-normal);
29
+ border-radius: var(--drag-handle-boxed-radius);
30
+ &:hover {
31
+ background-color: var(--drag-handle-boxed-color-bg-hover);
32
+ }
33
+ &:active {
34
+ background-color: var(--drag-handle-boxed-color-bg-active);
35
+ color: white;
36
+ }
23
37
  }
24
38
  }
39
+
40
+ .drag-handle-dots {
41
+ mask-image: url(../img/OneDot.svg);
42
+ mask-repeat: repeat;
43
+ width: var(--handle-width);
44
+ height: var(--handle-height);
45
+ background-color: currentColor;
46
+ margin-block: auto;
47
+ }
48
+
@@ -35,6 +35,7 @@
35
35
  @import 'spinner';
36
36
  @import 'table-list';
37
37
  @import 'hamburger';
38
+ @import 'drag-handle';
38
39
 
39
40
  // Interface elements
40
41
  @import 'interface-elements/side-panel';
@@ -0,0 +1,11 @@
1
+ :root,
2
+ [data-theme="dark-ui"],
3
+ [data-theme="accessible-light-ui"],
4
+ [data-theme="contrast-light-ui"] {
5
+ // Drag Handle
6
+ --drag-handle-boxed-color-bg-normal: var(--sd-colour-line--medium);
7
+ --drag-handle-boxed-color-bg-hover: var(--sd-colour-line--strong);
8
+ --drag-handle-boxed-color-bg-active: var(--sd-colour-interactive);
9
+ --drag-handle-boxed-radius: var(--b-radius--medium) 0 0 var(--b-radius--medium);
10
+ --drag-handle-boxed-padding: var(--space--1);
11
+ }
@@ -1,12 +1,34 @@
1
1
  import * as React from 'react';
2
- import '../../app/styles/_drag-handle.scss';
3
- import dragHandleImg from '../../app/img/dots.svg';
2
+ import classNames from 'classnames';
3
+ import { DragHandleDots } from './DragHandleDots';
4
4
 
5
- export class DragHandle extends React.PureComponent {
5
+ interface IProps {
6
+ blank?: boolean;
7
+ dotRows?: '4' | '5' | '6' | '7' | '8' | '10';
8
+ dotsInRow?: '2' | '3' | '4' | '5';
9
+ dotColor?: 'light' | 'dark'; // The default is the theme text color, this is an explicit override.
10
+ className?: string;
11
+ }
12
+
13
+ const dotSize = 4; // Size of the single dot image (OneDot.svg) that gets repeated and forms the dotted pattern.
14
+
15
+ export class DragHandle extends React.PureComponent<IProps> {
6
16
  render() {
17
+ const classes = classNames('drag-handle-wrapper', {
18
+ [`drag-handle-wrapper--boxed`]: !this.props.blank,
19
+ 'drag-handle-wrapper--blank': this.props.blank,
20
+ }, this.props.className);
21
+
22
+ const calcSize = (numberOfDots: string) => {
23
+ return Number(numberOfDots) * dotSize - (dotSize / 2);
24
+ };
25
+
7
26
  return (
8
- <div className="drag-handle-wrapper">
9
- <img src={dragHandleImg} className="drag-handle" draggable={false} />
27
+ <div className={classes}>
28
+ <DragHandleDots
29
+ style={{width: calcSize(this.props.dotsInRow ?? '2'), height: calcSize(this.props.dotRows ?? '4')}}
30
+ color={this.props.dotColor}
31
+ />
10
32
  </div>
11
33
  );
12
34
  }
@@ -0,0 +1,19 @@
1
+ import * as React from 'react';
2
+ import classNames from 'classnames';
3
+
4
+ interface IProps {
5
+ color?: 'light' | 'dark';
6
+ style?: any;
7
+ }
8
+
9
+ export class DragHandleDots extends React.PureComponent<IProps> {
10
+ render() {
11
+ const classes = classNames('drag-handle-dots', {
12
+ [`drag-handle-dots--${this.props.color}`]: this.props.color,
13
+ });
14
+
15
+ return (
16
+ <div style={this.props.style} className={classes}></div>
17
+ );
18
+ }
19
+ }
@@ -100,6 +100,7 @@ export { ResizablePanels } from './components/ResizablePanels';
100
100
  export { WithPopover } from './components/WithPopover';
101
101
  export { Spacer, SpacerBlock } from './components/Spacer';
102
102
  export { ResizeObserverComponent } from './components/ResizeObserverComponent';
103
+ export { DragHandleDots } from './components/DragHandleDots';
103
104
  export { DragHandle } from './components/DragHandle';
104
105
 
105
106
  // declare non-typescript exports to prevent errors
@@ -0,0 +1,3 @@
1
+ <svg width="4" height="4" viewBox="0 0 4 4" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M1 0C0.447715 0 0 0.447715 0 1C0 1.55228 0.447715 2 1 2C1.55228 2 2 1.55228 2 1C2 0.447715 1.55228 0 1 0Z" fill="#2C323A"/>
3
+ </svg>
@@ -338,6 +338,8 @@ table {
338
338
  --docs-page-border__window-bar--top: hsla(0, 0%, 100%, 0.9);
339
339
  --docs-page-border__window-bar--bottom: hsla(0, 0%, 88%, 1);
340
340
  --docs-page-border__table: hsla(0, 0%, 0%, 0.16);
341
+
342
+ --docs-page-bg__table-tr-even: hsla(214, 13%, 50%, 0.08);
341
343
  }
342
344
 
343
345
  :root [data-theme="dark-ui"] {
@@ -1022,7 +1024,7 @@ pre.prettyprint {
1022
1024
  }
1023
1025
 
1024
1026
  .docs-page__container {
1025
- max-width: 832px;
1027
+ max-width: 1200px;
1026
1028
  margin: 30px auto 0;
1027
1029
  }
1028
1030
  .docs-page__container--large {
@@ -1039,11 +1041,16 @@ pre.prettyprint {
1039
1041
  justify-content: center;
1040
1042
  }
1041
1043
 
1044
+
1045
+ .docs-page__container .docs-page__code-window {
1046
+ max-width: none !important;
1047
+ }
1048
+
1042
1049
  .docs-page__container .docs-page__h2,
1043
1050
  .docs-page__container .docs-page__h3,
1044
- .docs-page__container .docs-page__code-window,
1045
- .docs-page__container .docs-page__paragraph {
1046
- max-width: none !important;
1051
+ .docs-page__container .docs-page__paragraph,
1052
+ .docs-page__container .docs-page__paragraph--small {
1053
+ max-width: 85ch;
1047
1054
  }
1048
1055
 
1049
1056
  .docs-page__content-block {
@@ -1276,6 +1283,17 @@ doc-gif-img:hover img {
1276
1283
  border-color: var(--docs-page-border__table) !important;
1277
1284
  }
1278
1285
 
1286
+ .docs-page__container table tr td:nth-child(3) {
1287
+ white-space: nowrap;
1288
+ }
1289
+
1290
+ .docs-page__container table tr:nth-child(even),
1291
+ .docs-page__container table thead tr {
1292
+ background-color: var(--docs-page-bg__table-tr-even);
1293
+ }
1294
+
1295
+
1296
+
1279
1297
 
1280
1298
  /* -------------- END COLOR SWATCHES -------------- */
1281
1299
  /* -------------- PrismJS overrides -------------- */
@@ -12066,26 +12084,6 @@ doc-react-playground {
12066
12084
  .side-panel__top-tools--dark-blue-grey .icn-mix__icn {
12067
12085
  color: inherit;
12068
12086
  opacity: 1; }
12069
- .drag-handle {
12070
- height: 30px;
12071
- width: 8px;
12072
- opacity: 0.85; }
12073
-
12074
- .drag-handle-wrapper {
12075
- padding: 6px;
12076
- display: inline-flex;
12077
- justify-content: center;
12078
- align-items: center;
12079
- background-color: var(--sd-colour-line--medium);
12080
- border-start-start-radius: 3px;
12081
- border-end-start-radius: 3px; }
12082
- .drag-handle-wrapper:hover {
12083
- background-color: var(--sd-colour-line--strong);
12084
- cursor: grab; }
12085
- .drag-handle-wrapper:active {
12086
- background-color: var(--sd-colour-interactive);
12087
- cursor: grabbing;
12088
- opacity: 1; }
12089
12087
  @charset "UTF-8";
12090
12088
  .red--100 {
12091
12089
  background-color: #fde4e2; }