superdesk-ui-framework 3.0.31 → 3.0.35

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.
@@ -96,7 +96,7 @@
96
96
  box-shadow: var(--sd-shadow--z1);
97
97
  border-color: var(--sd-colour-line--strong);
98
98
  }
99
-
99
+
100
100
  }
101
101
  }
102
102
  input:checked {
@@ -145,6 +145,10 @@
145
145
  }
146
146
 
147
147
  [data-theme="dark-ui"] {
148
+ input[type="time"]::-webkit-calendar-picker-indicator {
149
+ filter: invert(1);
150
+ }
151
+
148
152
  figure[data-theme="dark-ui"] {
149
153
  --color-text: hsla(0, 0%, 96%, 1);
150
154
  --color-text-light: hsla(214, 13%, 96%, 0.75);
@@ -173,7 +177,7 @@
173
177
  --sd-colour--shadow-line: hsla(214, 13%, 70%, 0);
174
178
  --sd-colour-line--medium: hsla(214, 13%, 20%, 0.2);
175
179
 
176
-
180
+
177
181
  }
178
182
  figure[data-theme="contrast-light-ui"] {
179
183
  --color-text: hsla(0, 0%, 0%, 1);
@@ -186,4 +190,4 @@
186
190
  --sd-colour--shadow-line: hsla(214, 13%, 60%, 0);
187
191
  --sd-colour-line--medium: hsla(214, 13%, 20%, 0.4);
188
192
  }
189
- }
193
+ }
@@ -653,11 +653,16 @@
653
653
  grid-row: 2/3;
654
654
  grid-column: 2/4;
655
655
  }
656
+
656
657
  .sd-input__input-container {
657
658
  grid-row: 2/3;
658
659
  grid-column: 2/4;
659
660
  }
660
661
 
662
+ .sd-input__input-container:has(input[type="time"]) {
663
+ min-width: 110px;
664
+ }
665
+
661
666
  textarea {
662
667
  &.sd-input__input {
663
668
  height: auto;
@@ -29,7 +29,6 @@
29
29
  transition: all 0.2s ease-out, color 0.1s ease-out;
30
30
  &:hover {
31
31
  background-color: hsla(214, 13%, 55%, 0.2);
32
-
33
32
  }
34
33
  &:active {
35
34
  background-color: hsla(214, 13%, 55%, 0.3);
@@ -154,7 +153,7 @@
154
153
  .p-calendar {
155
154
  @include pr-input-item-base;
156
155
  .p-inputtext {
157
- color: inherit;
156
+ color: var(--color-text);
158
157
  height: $height-input--default;
159
158
  background-color: transparent;
160
159
  border: none;
@@ -178,7 +177,7 @@
178
177
  margin: 0 4px 0 0;
179
178
  [class^="icon-"],
180
179
  [class*=" icon-"] {
181
- color: inherit;
180
+ color: var(--color-text);
182
181
  margin-top: -2px;
183
182
  opacity: 0.75;
184
183
  }
@@ -193,4 +192,4 @@
193
192
  }
194
193
  .p-datepicker-calendar {
195
194
  margin-bottom: 8px;
196
- }
195
+ }
@@ -1,12 +1,15 @@
1
1
  import * as React from 'react';
2
2
  import { Dialog as PrimeDialog } from '@superdesk/primereact/dialog';
3
3
  import classNames from 'classnames';
4
+ import {noop} from 'lodash';
4
5
 
5
6
  interface IProps {
6
7
  id?: string;
7
8
  className?: string;
8
9
  theme?: string;
9
10
  visible?: boolean;
11
+ zIndex?: number;
12
+ closeOnEscape?: boolean;
10
13
  contentBg?: 'default' | 'medium' | 'dark';
11
14
  contentPadding?: 'none' | 'small' | 'medium' | 'large';
12
15
  size?: 'small' | 'medium' | 'large' | 'x-large';
@@ -15,10 +18,8 @@ interface IProps {
15
18
  maximizable?: boolean;
16
19
  headerTemplate?: JSX.Element | string;
17
20
  footerTemplate?: JSX.Element | string;
18
- closeOnEscape?: boolean;
19
- zIndex?: number;
20
21
  onShow?(): void;
21
- onHide(): void;
22
+ onHide?(): void;
22
23
  }
23
24
 
24
25
  export class Modal extends React.Component<IProps, {}> {
@@ -43,9 +44,10 @@ export class Modal extends React.Component<IProps, {}> {
43
44
  maximizable={this.props.maximizable}
44
45
  contentClassName={classes}
45
46
  onShow={this.props.onShow}
46
- onHide={this.props.onHide}
47
+ onHide={this.props.onHide ?? noop}
47
48
  zIndex={this.props.zIndex ? this.props.zIndex : 1000}
48
49
  position={this.props.position}
50
+ closable={this.props.onHide != null ? true : false}
49
51
  >
50
52
  {this.props.children}
51
53
  </PrimeDialog>
@@ -24,29 +24,31 @@ export class TimePicker extends React.PureComponent<IProps> {
24
24
  render() {
25
25
  return (
26
26
  <InputWrapper
27
- label={this.props.label}
28
- error={this.props.error}
29
- required={this.props.required}
30
- disabled={this.props.disabled}
31
- invalid={this.props.invalid}
32
- info={this.props.info}
33
- inlineLabel={this.props.inlineLabel}
34
- labelHidden={this.props.labelHidden}
35
- fullWidth={this.props.fullWidth}
36
- htmlId={this.htmlId}
37
- tabindex={this.props.tabindex}>
38
- <input
39
- id={this.htmlId}
40
- aria-labelledby={this.htmlId + 'label'}
41
- type="time"
42
- step={this.props.allowSeconds ? 1 : undefined}
43
- className="sd-input__input"
44
- value={this.props.value}
27
+ label={this.props.label}
28
+ error={this.props.error}
45
29
  required={this.props.required}
46
30
  disabled={this.props.disabled}
47
- onChange={(event) => {
48
- this.props.onChange(event.target.value);
49
- }}/>
31
+ invalid={this.props.invalid}
32
+ info={this.props.info}
33
+ inlineLabel={this.props.inlineLabel}
34
+ labelHidden={this.props.labelHidden}
35
+ fullWidth={this.props.fullWidth}
36
+ htmlId={this.htmlId}
37
+ tabindex={this.props.tabindex}
38
+ >
39
+ <input
40
+ id={this.htmlId}
41
+ aria-labelledby={this.htmlId + 'label'}
42
+ type="time"
43
+ step={this.props.allowSeconds ? 1 : undefined}
44
+ className="sd-input__input"
45
+ value={this.props.value}
46
+ required={this.props.required}
47
+ disabled={this.props.disabled}
48
+ onChange={(event) => {
49
+ this.props.onChange(event.target.value);
50
+ }}
51
+ />
50
52
  </InputWrapper>
51
53
  );
52
54
  }