@dvrd/dvr-controls 1.1.13 → 1.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.
- package/index.ts +1 -0
- package/package.json +14 -24
- package/src/js/button/style/button.scss +5 -4
- package/src/js/button/style/closeButton.scss +0 -2
- package/src/js/button/style/dvrdButton.scss +2 -2
- package/src/js/button/style/outlinedButton.scss +5 -5
- package/src/js/button/style/simpleButton.scss +3 -5
- package/src/js/carousel/DVRCarousel.tsx +18 -16
- package/src/js/carousel/style/DVRCarousel.scss +2 -3
- package/src/js/checkbox/style/checkbox.scss +8 -7
- package/src/js/colorPicker/style/colorPicker.scss +0 -2
- package/src/js/date/dvrdDatePicker.tsx +1 -2
- package/src/js/date/style/dvrdDatePicker.scss +21 -19
- package/src/js/dialog/style/dialog.scss +15 -12
- package/src/js/fileUpload/style/fileUpload.scss +2 -2
- package/src/js/header/style/header.scss +16 -14
- package/src/js/image/style/imageUpload.scss +0 -2
- package/src/js/info/style/info.scss +3 -3
- package/src/js/input/date/dateField.tsx +38 -31
- package/src/js/input/date/dateFieldController.tsx +2 -2
- package/src/js/input/date/datePicker/style/datePicker.scss +5 -5
- package/src/js/input/date/style/dateField.scss +5 -4
- package/src/js/input/date/timePicker/style/timePicker.scss +5 -4
- package/src/js/input/password/style/passwordInput.scss +3 -3
- package/src/js/input/password/style/passwordRules.scss +4 -4
- package/src/js/input/simple/style/simpleInput.scss +2 -2
- package/src/js/input/style/input.scss +6 -5
- package/src/js/label/label.tsx +1 -2
- package/src/js/link/link.tsx +3 -1
- package/src/js/link/style/link.scss +4 -4
- package/src/js/loader/style/loader.scss +6 -5
- package/src/js/navigation/mobileNavigation.tsx +1 -2
- package/src/js/navigation/style/mobileNavigation.scss +31 -24
- package/src/js/optionsList/style/dvrdOptionsList.scss +6 -5
- package/src/js/optionsMenu/style/optionsMenu.scss +6 -5
- package/src/js/pdf/element/style/pdfElement.scss +8 -7
- package/src/js/pdf/image/pdfImage.tsx +4 -4
- package/src/js/pdf/image/style/pdfImage.scss +3 -3
- package/src/js/pdf/invoiceTable/pdfInvoiceTable.tsx +3 -3
- package/src/js/pdf/invoiceTable/style/pdfInvoiceTable.scss +2 -2
- package/src/js/pdf/settings/buttons/style/iconButton.scss +5 -5
- package/src/js/pdf/settings/image/pdfImageSettings.tsx +4 -6
- package/src/js/pdf/settings/invoiceTable/style/pdfInvoiceTableSettings.scss +4 -3
- package/src/js/pdf/settings/style/pdfElementSettings.scss +3 -3
- package/src/js/pdf/settings/text/style/pdfTextSettings.scss +5 -4
- package/src/js/pdf/style/pdfTemplateCreator.scss +12 -11
- package/src/js/pdf/text/pdfText.tsx +3 -3
- package/src/js/pdf/text/style/pdfText.scss +0 -2
- package/src/js/pdf/v2/pdfElement/pdfDraggableElement.tsx +4 -6
- package/src/js/popup/style/withBackground.scss +3 -3
- package/src/js/radio/style/dvrdRadio.scss +6 -5
- package/src/js/select/async/style/asyncSelect.scss +0 -2
- package/src/js/select/dvrdGroupedSelect.tsx +1 -2
- package/src/js/select/dvrdMultiSelect.tsx +2 -3
- package/src/js/select/dvrdSelect.tsx +12 -11
- package/src/js/select/dvrdSelectController.tsx +10 -11
- package/src/js/select/style/dvrdGroupedSelect.scss +12 -11
- package/src/js/select/style/dvrdSelect.scss +9 -8
- package/src/js/select/style/select.scss +16 -24
- package/src/js/sidebarMenu/sidebarMenu.tsx +22 -13
- package/src/js/sidebarMenu/style/sidebarMenu.scss +7 -6
- package/src/js/slider/style/DVRSlider.scss +2 -2
- package/src/js/snackbar/snackbarController.tsx +3 -5
- package/src/js/snackbar/style/snackbar.scss +7 -6
- package/src/js/switch/style/dvrdSwitch.scss +2 -2
- package/src/js/switch/style/switch.scss +8 -8
- package/src/js/textField/dvrdPasswordInput.tsx +0 -1
- package/src/js/textField/style/dvrdInput.scss +4 -4
- package/src/js/textField/style/dvrdPassword.scss +3 -3
- package/src/js/topButton/style/topButton.scss +3 -3
- package/src/js/util/controlContext.tsx +1 -2
- package/src/js/util/interfaces.ts +3 -3
- package/src/style/_colors.scss +44 -0
- package/src/style/{common-variables.scss → _common-variables.scss} +16 -62
- package/src/style/common-icons.scss +141 -142
- package/src/style/{variables.scss → main.scss} +2 -3
- package/src/js/label/style/label.scss +0 -4
- package/src/js/pdf/settings/image/style/pdfImageSettings.scss +0 -9
- /package/src/style/{display-breakpoints.scss → _display-breakpoints.scss} +0 -0
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
* Copyright (c) 2024. Dave van Rijn Development
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
@
|
|
5
|
+
@use '../../../style/colors';
|
|
6
|
+
@use '../../../style/common-variables' as commons;
|
|
7
|
+
@use 'sass:color';
|
|
6
8
|
|
|
7
9
|
.dvr-header {
|
|
8
10
|
width: fit-content;
|
|
@@ -28,7 +30,7 @@
|
|
|
28
30
|
$height: 4rem;
|
|
29
31
|
|
|
30
32
|
.dvr-header-container {
|
|
31
|
-
@include backgroundShadow;
|
|
33
|
+
@include commons.backgroundShadow;
|
|
32
34
|
padding: .5rem 2rem;
|
|
33
35
|
display: flex;
|
|
34
36
|
align-items: center;
|
|
@@ -60,7 +62,7 @@
|
|
|
60
62
|
position: relative;
|
|
61
63
|
|
|
62
64
|
.children-container {
|
|
63
|
-
@include centerX;
|
|
65
|
+
@include commons.centerX;
|
|
64
66
|
visibility: hidden;
|
|
65
67
|
opacity: 0;
|
|
66
68
|
transition: visibility .1s ease-in-out, opacity .1s ease-in-out, box-shadow .1s ease-in-out;
|
|
@@ -70,15 +72,15 @@
|
|
|
70
72
|
|
|
71
73
|
.child-item {
|
|
72
74
|
padding: .5rem;
|
|
73
|
-
color:
|
|
74
|
-
border-bottom: 1px solid
|
|
75
|
+
color: colors.$color-gray-header;
|
|
76
|
+
border-bottom: 1px solid colors.$color-gray-4;
|
|
75
77
|
transition: background-color .2s ease-in-out;
|
|
76
78
|
display: flex;
|
|
77
79
|
justify-content: center;
|
|
78
80
|
|
|
79
81
|
label {
|
|
80
82
|
font-size: .9rem;
|
|
81
|
-
color:
|
|
83
|
+
color: colors.$color-gray-header;
|
|
82
84
|
font-weight: normal;
|
|
83
85
|
}
|
|
84
86
|
|
|
@@ -87,7 +89,7 @@
|
|
|
87
89
|
}
|
|
88
90
|
|
|
89
91
|
&:hover {
|
|
90
|
-
background-color:
|
|
92
|
+
background-color: colors.$color-gray-6;
|
|
91
93
|
}
|
|
92
94
|
}
|
|
93
95
|
}
|
|
@@ -96,7 +98,7 @@
|
|
|
96
98
|
border-color: currentColor;
|
|
97
99
|
|
|
98
100
|
.children-container {
|
|
99
|
-
@include backgroundShadow;
|
|
101
|
+
@include commons.backgroundShadow;
|
|
100
102
|
visibility: visible;
|
|
101
103
|
opacity: 1;
|
|
102
104
|
}
|
|
@@ -122,13 +124,13 @@
|
|
|
122
124
|
background-color: transparent;
|
|
123
125
|
|
|
124
126
|
.items-container .header-item-container {
|
|
125
|
-
color:
|
|
127
|
+
color: colors.$color-gray-header;
|
|
126
128
|
}
|
|
127
129
|
}
|
|
128
130
|
}
|
|
129
131
|
|
|
130
132
|
.dvr-menu {
|
|
131
|
-
@include backgroundShadow;
|
|
133
|
+
@include commons.backgroundShadow;
|
|
132
134
|
position: fixed;
|
|
133
135
|
height: 100%;
|
|
134
136
|
top: $height;
|
|
@@ -137,7 +139,7 @@
|
|
|
137
139
|
box-shadow: 0 1px 5px 0 rgba(black, 0.2), 0 2px 2px 0 rgba(black, 0.14), 0 3px 1px -2px rgba(black, 0.12);
|
|
138
140
|
transition: transform .2s ease-in-out;
|
|
139
141
|
padding: 1rem;
|
|
140
|
-
background-color:
|
|
142
|
+
background-color: colors.$color-gray-header;
|
|
141
143
|
max-width: 100vw;
|
|
142
144
|
box-sizing: border-box;
|
|
143
145
|
z-index: 9999;
|
|
@@ -147,7 +149,7 @@
|
|
|
147
149
|
}
|
|
148
150
|
|
|
149
151
|
.menu-item-container {
|
|
150
|
-
color:
|
|
152
|
+
color: colors.$color-gray-header-text;
|
|
151
153
|
padding: .75rem 1rem;
|
|
152
154
|
cursor: pointer;
|
|
153
155
|
transition: background-color .2s ease-in-out;
|
|
@@ -188,7 +190,7 @@
|
|
|
188
190
|
}
|
|
189
191
|
|
|
190
192
|
&:hover {
|
|
191
|
-
background-color:
|
|
193
|
+
background-color: color.scale(colors.$color-gray-header, $lightness: -10%);
|
|
192
194
|
}
|
|
193
195
|
}
|
|
194
196
|
|
|
@@ -201,6 +203,6 @@
|
|
|
201
203
|
position: fixed;
|
|
202
204
|
top: 0;
|
|
203
205
|
left: 0;
|
|
204
|
-
z-index:
|
|
206
|
+
z-index: commons.$z-index-menu + 1;
|
|
205
207
|
}
|
|
206
208
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Copyright (c) 2024. Dave van Rijn Development
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
@
|
|
5
|
+
@use '../../../style/common-variables' as commons;
|
|
6
6
|
|
|
7
7
|
.dvr-info-container {
|
|
8
8
|
position: relative;
|
|
@@ -16,12 +16,12 @@
|
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
.dvr-message-container {
|
|
19
|
-
@include backgroundShadow;
|
|
19
|
+
@include commons.backgroundShadow;
|
|
20
20
|
padding: .2rem;
|
|
21
21
|
border-radius: .2rem;
|
|
22
22
|
background-color: white;
|
|
23
23
|
position: absolute;
|
|
24
|
-
z-index:
|
|
24
|
+
z-index: commons.$z-index-high;
|
|
25
25
|
top: 0;
|
|
26
26
|
right: 0;
|
|
27
27
|
width: 15rem;
|
|
@@ -5,21 +5,20 @@
|
|
|
5
5
|
import './style/dateField.scss';
|
|
6
6
|
|
|
7
7
|
import React, {ChangeEvent, CSSProperties, KeyboardEventHandler, PureComponent} from 'react';
|
|
8
|
-
import {ChangeFunction, ControlVariant} from
|
|
9
|
-
import {DateTimeParts, DateType} from
|
|
10
|
-
import classNames from
|
|
11
|
-
import {ControlContext} from
|
|
12
|
-
import {BACKSPACE_CODE} from
|
|
13
|
-
import DatePicker from
|
|
14
|
-
import TimePicker from
|
|
15
|
-
import DateInput from
|
|
16
|
-
import {DVRInputControllerProps} from
|
|
17
|
-
import mergeWith from 'lodash.mergewith';
|
|
8
|
+
import {ChangeFunction, ControlVariant} from '../../util/interfaces';
|
|
9
|
+
import {DateTimeParts, DateType} from './dateFieldController';
|
|
10
|
+
import classNames from 'classnames';
|
|
11
|
+
import {ControlContext} from '../../util/controlContext';
|
|
12
|
+
import {BACKSPACE_CODE} from '../../util/constants';
|
|
13
|
+
import DatePicker from './datePicker/datePicker';
|
|
14
|
+
import TimePicker from './timePicker/timePicker';
|
|
15
|
+
import DateInput from './input/dateInput';
|
|
16
|
+
import {DVRInputControllerProps} from '../v2/inputController_v2';
|
|
18
17
|
import {colorIsWhite, convertColor, editColor} from '../../util/colorUtil';
|
|
19
18
|
import {pad} from '../../util/controlUtil';
|
|
20
|
-
import AwesomeIcon from
|
|
19
|
+
import AwesomeIcon from '../../icon/awesomeIcon';
|
|
21
20
|
import WithBackground from '../../popup/withBackground';
|
|
22
|
-
import ButtonController from
|
|
21
|
+
import ButtonController from '../../button/buttonController';
|
|
23
22
|
import IDate, {IDateValue} from '@dvrd/idate';
|
|
24
23
|
|
|
25
24
|
export interface DateNumParts {
|
|
@@ -64,8 +63,8 @@ export default class DateField extends PureComponent<Props, State> {
|
|
|
64
63
|
this.state = {
|
|
65
64
|
pickerOpen: false,
|
|
66
65
|
pickerState: this.getDefaultPickerState(),
|
|
67
|
-
pickerValue: this.getInitPickerValue()
|
|
68
|
-
}
|
|
66
|
+
pickerValue: this.getInitPickerValue()
|
|
67
|
+
};
|
|
69
68
|
}
|
|
70
69
|
|
|
71
70
|
onMouseEnterSelector = (forState: PickerState) => (evt: MouseEvent) => {
|
|
@@ -102,7 +101,7 @@ export default class DateField extends PureComponent<Props, State> {
|
|
|
102
101
|
month: currentMoment.month(),
|
|
103
102
|
year: currentMoment.year(),
|
|
104
103
|
hour: currentMoment.hours(),
|
|
105
|
-
minute: currentMoment.minutes()
|
|
104
|
+
minute: currentMoment.minutes()
|
|
106
105
|
};
|
|
107
106
|
} else {
|
|
108
107
|
nextValue = Object.assign({}, this.state.pickerValue, {[key]: value});
|
|
@@ -208,7 +207,7 @@ export default class DateField extends PureComponent<Props, State> {
|
|
|
208
207
|
day: today.day(),
|
|
209
208
|
minute: today.minutes(),
|
|
210
209
|
hour: today.hours(),
|
|
211
|
-
year: today.year()
|
|
210
|
+
year: today.year()
|
|
212
211
|
}
|
|
213
212
|
}, () => {
|
|
214
213
|
if (this.props.dateType === DateType.DATE) {
|
|
@@ -242,20 +241,28 @@ export default class DateField extends PureComponent<Props, State> {
|
|
|
242
241
|
return PickerState.DATE;
|
|
243
242
|
};
|
|
244
243
|
|
|
245
|
-
getInitPickerValue = () => {
|
|
246
|
-
const dateParts =
|
|
244
|
+
getInitPickerValue = (): DateNumParts => {
|
|
245
|
+
const dateParts = this.props.dateParts;
|
|
247
246
|
const now = IDate.now();
|
|
248
247
|
if (!isNaN(Number(dateParts.month))) dateParts.month = (Number(dateParts.month) - 1).toString();
|
|
249
|
-
|
|
250
|
-
day: now.day(),
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
248
|
+
const merged: DateNumParts = {
|
|
249
|
+
day: now.day(), month: now.month(), year: now.year(), hour: now.hours(), minute: now.minutes()
|
|
250
|
+
};
|
|
251
|
+
for (const [key, value] of Object.entries(dateParts)) {
|
|
252
|
+
if(!value || !value.length || ['dd', 'mm', 'yyyy', 'hh'].includes(value)) continue;
|
|
253
|
+
merged[key as keyof DateNumParts] = Number(value);
|
|
254
|
+
}
|
|
255
|
+
return merged;
|
|
256
|
+
// return mergeWith(dateParts, {
|
|
257
|
+
// day: now.day(),
|
|
258
|
+
// month: now.month(),
|
|
259
|
+
// year: now.year(),
|
|
260
|
+
// hour: now.hours(),
|
|
261
|
+
// minute: now.minutes()
|
|
262
|
+
// }, (source1: string, source2: number) => {
|
|
263
|
+
// if (!source1 || source1.length === 0 || ['dd', 'mm', 'yyyy', 'hh'].includes(source1)) return source2;
|
|
264
|
+
// return Number(source1);
|
|
265
|
+
// });
|
|
259
266
|
};
|
|
260
267
|
|
|
261
268
|
scrollToCurrent = () => {
|
|
@@ -330,7 +337,7 @@ export default class DateField extends PureComponent<Props, State> {
|
|
|
330
337
|
primary={false}/>}
|
|
331
338
|
</div>
|
|
332
339
|
</div>
|
|
333
|
-
)
|
|
340
|
+
);
|
|
334
341
|
};
|
|
335
342
|
|
|
336
343
|
renderStateSelector = () => {
|
|
@@ -345,7 +352,7 @@ export default class DateField extends PureComponent<Props, State> {
|
|
|
345
352
|
onMouseEnter={this.onMouseEnterSelector(PickerState.TIME)}
|
|
346
353
|
onMouseLeave={this.onMouseLeaveSelector(PickerState.TIME)}/>
|
|
347
354
|
</div>
|
|
348
|
-
)
|
|
355
|
+
);
|
|
349
356
|
};
|
|
350
357
|
|
|
351
358
|
componentDidUpdate = (prevProps: Props, prevState: State) => {
|
|
@@ -364,6 +371,6 @@ export default class DateField extends PureComponent<Props, State> {
|
|
|
364
371
|
fullWidth={fullWidth} disabled={disabled}/>
|
|
365
372
|
<WithBackground onClose={this.onClosePicker} active={pickerOpen}>{this.renderPicker()}</WithBackground>
|
|
366
373
|
</>
|
|
367
|
-
)
|
|
374
|
+
);
|
|
368
375
|
};
|
|
369
376
|
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import React, {PureComponent} from 'react';
|
|
6
6
|
import {ControlVariant} from "../../util/interfaces";
|
|
7
|
-
import DateField from
|
|
7
|
+
import DateField, {DateNumParts} from './dateField';
|
|
8
8
|
import {DefaultInputProps, DVRInputControllerProps} from "../v2/inputController_v2";
|
|
9
9
|
import IDate, {IDateValue} from '@dvrd/idate';
|
|
10
10
|
|
|
@@ -28,7 +28,7 @@ interface State {
|
|
|
28
28
|
value: string;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
export interface DateTimeParts {
|
|
31
|
+
export interface DateTimeParts extends Record<keyof DateNumParts, string> {
|
|
32
32
|
day: string;
|
|
33
33
|
month: string;
|
|
34
34
|
year: string;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Copyright (c) 2024. Dave van Rijn Development
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
@
|
|
5
|
+
@use '../../../../../style/colors';
|
|
6
6
|
|
|
7
7
|
.datepicker-container {
|
|
8
8
|
height: 21.5rem;
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
.dvr-month-container {
|
|
31
|
-
color:
|
|
31
|
+
color: colors.$color-gray-header;
|
|
32
32
|
display: flex;
|
|
33
33
|
align-items: center;
|
|
34
34
|
justify-content: center;
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
.weekday-label {
|
|
74
74
|
width: 100%;
|
|
75
75
|
text-align: center;
|
|
76
|
-
border-bottom: 1px solid
|
|
76
|
+
border-bottom: 1px solid colors.$color-gray-7;
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
.day-label {
|
|
@@ -87,12 +87,12 @@
|
|
|
87
87
|
|
|
88
88
|
&.disabled .day-label{
|
|
89
89
|
cursor: not-allowed;
|
|
90
|
-
color:
|
|
90
|
+
color: colors.$color-gray-4;
|
|
91
91
|
}
|
|
92
92
|
|
|
93
93
|
&.other-month {
|
|
94
94
|
.day-label {
|
|
95
|
-
color:
|
|
95
|
+
color: colors.$color-gray-4;
|
|
96
96
|
cursor: default;
|
|
97
97
|
transition: none;
|
|
98
98
|
}
|
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
* Copyright (c) 2024. Dave van Rijn Development
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
@
|
|
5
|
+
@use '../../../../style/common-variables' as commons;
|
|
6
|
+
@use '../../../../style/colors';
|
|
6
7
|
|
|
7
8
|
.dvr-datepicker-container {
|
|
8
|
-
@include backgroundShadow;
|
|
9
|
+
@include commons.backgroundShadow;
|
|
9
10
|
background-color: white;
|
|
10
11
|
min-width: 16rem;
|
|
11
12
|
max-width: 100vw;
|
|
@@ -19,10 +20,10 @@
|
|
|
19
20
|
justify-content: center;
|
|
20
21
|
align-items: center;
|
|
21
22
|
padding: .5rem 0;
|
|
22
|
-
border-top: 1px solid
|
|
23
|
+
border-top: 1px solid colors.$color-gray-7;
|
|
23
24
|
|
|
24
25
|
.selector {
|
|
25
|
-
color:
|
|
26
|
+
color: colors.$color-gray-4;
|
|
26
27
|
cursor: pointer;
|
|
27
28
|
transition: color .2s ease-in-out;
|
|
28
29
|
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
* Copyright (c) 2024. Dave van Rijn Development
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
@
|
|
5
|
+
@use '../../../../../style/common-variables' as commons;
|
|
6
|
+
@use '../../../../../style/colors';
|
|
6
7
|
|
|
7
8
|
.timepicker-container {
|
|
8
9
|
height: 21.5rem;
|
|
@@ -51,17 +52,17 @@
|
|
|
51
52
|
position: relative;
|
|
52
53
|
|
|
53
54
|
.selected-background {
|
|
54
|
-
@include centerY;
|
|
55
|
+
@include commons.centerY;
|
|
55
56
|
position: absolute;
|
|
56
57
|
width: 100%;
|
|
57
58
|
height: calc(100% / 3);
|
|
58
59
|
z-index: 0;
|
|
59
|
-
background-color:
|
|
60
|
+
background-color: colors.$color-gray-4;
|
|
60
61
|
}
|
|
61
62
|
|
|
62
63
|
.time-select-container {
|
|
63
64
|
position: relative;
|
|
64
|
-
border: 1px solid
|
|
65
|
+
border: 1px solid colors.$color-gray-7;
|
|
65
66
|
border-radius: .25rem;
|
|
66
67
|
height: 6rem;
|
|
67
68
|
overflow-y: auto;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Copyright (c) 2024. Dave van Rijn Development
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
@
|
|
5
|
+
@use '../../../../style/colors';
|
|
6
6
|
|
|
7
7
|
.dvr-password-field-container {
|
|
8
8
|
position: relative;
|
|
@@ -29,11 +29,11 @@
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
.passwordOrnament {
|
|
32
|
-
color:
|
|
32
|
+
color: colors.$color-gray-3;
|
|
33
33
|
transition: color .2s ease;
|
|
34
34
|
|
|
35
35
|
&:hover {
|
|
36
|
-
color:
|
|
36
|
+
color: colors.$color-gray-5;
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
}
|
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
* Copyright (c) 2024. Dave van Rijn Development
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
@
|
|
5
|
+
@use '../../../../style/colors';
|
|
6
6
|
|
|
7
7
|
.password-rules-container {
|
|
8
|
-
|
|
8
|
+
border-radius: .2rem;
|
|
9
9
|
position: absolute;
|
|
10
10
|
top: 100%;
|
|
11
11
|
left: 0;
|
|
12
12
|
background-color: white;
|
|
13
13
|
padding: .3rem;
|
|
14
|
-
border: 1px solid
|
|
14
|
+
border: 1px solid colors.$color-gray-5;
|
|
15
15
|
z-index: 1;
|
|
16
16
|
display: flex;
|
|
17
17
|
flex-direction: column;
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
transition: color .2s ease;
|
|
32
32
|
|
|
33
33
|
&.passed {
|
|
34
|
-
color:
|
|
34
|
+
color: colors.$color-green-whatsapp;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
&.failed {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Copyright (c) 2024. Dave van Rijn Development
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
@
|
|
5
|
+
@use '../../../../style/colors';
|
|
6
6
|
|
|
7
7
|
.dvr-simple-input-container {
|
|
8
8
|
display: inline-flex;
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
.dvr-simple-input-ornament {
|
|
46
|
-
color:
|
|
46
|
+
color: colors.$color-gray-header;
|
|
47
47
|
|
|
48
48
|
.dvr-simple-input-clear {
|
|
49
49
|
cursor: pointer;
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
* Copyright (c) 2024. Dave van Rijn Development
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
@
|
|
5
|
+
@use '../../../style/common-variables' as commons;
|
|
6
|
+
@use '../../../style/colors';
|
|
6
7
|
|
|
7
8
|
.inputContainer {
|
|
8
9
|
position: relative;
|
|
@@ -45,13 +46,13 @@
|
|
|
45
46
|
font-size: 1rem;
|
|
46
47
|
|
|
47
48
|
&:disabled {
|
|
48
|
-
color:
|
|
49
|
+
color: colors.$color-gray-4 !important;
|
|
49
50
|
}
|
|
50
51
|
}
|
|
51
52
|
|
|
52
53
|
.clearButton {
|
|
53
54
|
font-size: .8rem;
|
|
54
|
-
color:
|
|
55
|
+
color: colors.$color-gray-5;
|
|
55
56
|
transition: color .2s ease-in-out;
|
|
56
57
|
cursor: pointer;
|
|
57
58
|
margin-right: .3rem;
|
|
@@ -64,7 +65,7 @@
|
|
|
64
65
|
}
|
|
65
66
|
|
|
66
67
|
&.outlined {
|
|
67
|
-
|
|
68
|
+
border-radius: .2rem;
|
|
68
69
|
border-width: 2px;
|
|
69
70
|
border-style: solid;
|
|
70
71
|
padding: .2rem;
|
|
@@ -108,7 +109,7 @@
|
|
|
108
109
|
|
|
109
110
|
&:not(.filled) {
|
|
110
111
|
.label {
|
|
111
|
-
@include centerY;
|
|
112
|
+
@include commons.centerY;
|
|
112
113
|
|
|
113
114
|
&.multiLine {
|
|
114
115
|
top: calc(.2rem + 2px);
|
package/src/js/label/label.tsx
CHANGED
|
@@ -8,7 +8,6 @@ import classNames from 'classnames';
|
|
|
8
8
|
import {ControlContext} from "../util/controlContext";
|
|
9
9
|
import {convertColor} from "../util/colorUtil";
|
|
10
10
|
import {calculateTextWidth, getComputedProperty, remToPx} from "../util/controlUtil";
|
|
11
|
-
import defer from 'lodash.defer';
|
|
12
11
|
|
|
13
12
|
export enum LabelType {
|
|
14
13
|
LABEL, SPAN, PAR,
|
|
@@ -154,7 +153,7 @@ export default function Label(props: Props) {
|
|
|
154
153
|
}
|
|
155
154
|
|
|
156
155
|
useEffect(() => {
|
|
157
|
-
|
|
156
|
+
window.setTimeout(renderText);
|
|
158
157
|
}, []);
|
|
159
158
|
|
|
160
159
|
switch (labelType) {
|
package/src/js/link/link.tsx
CHANGED
|
@@ -5,10 +5,11 @@
|
|
|
5
5
|
import './style/link.scss';
|
|
6
6
|
import classNames from 'classnames';
|
|
7
7
|
import React, {MouseEventHandler} from 'react';
|
|
8
|
-
import {
|
|
8
|
+
import { NavigateFunction, useNavigate } from 'react-router';
|
|
9
9
|
|
|
10
10
|
interface Props {
|
|
11
11
|
onClick?: MouseEventHandler;
|
|
12
|
+
navigate?: NavigateFunction;
|
|
12
13
|
route?: string;
|
|
13
14
|
className?: string;
|
|
14
15
|
disabled?: boolean;
|
|
@@ -18,6 +19,7 @@ interface Props {
|
|
|
18
19
|
|
|
19
20
|
export default function Link(props: React.PropsWithChildren<Props>) {
|
|
20
21
|
const {className, disabled, route, children, underline, target, onClick} = props;
|
|
22
|
+
const navigate = props.navigate ?? useNavigate();
|
|
21
23
|
|
|
22
24
|
function _onClick(evt: React.MouseEvent) {
|
|
23
25
|
evt.preventDefault();
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
* Copyright (c) 2024. Dave van Rijn Development
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
@
|
|
5
|
+
@use '../../../style/colors';
|
|
6
6
|
|
|
7
7
|
.app-link {
|
|
8
|
-
color:
|
|
8
|
+
color: colors.$color-blue-1;
|
|
9
9
|
text-decoration: none;
|
|
10
10
|
transition: color .2s ease-in-out, border-bottom-color .2s ease-in-out;
|
|
11
11
|
cursor: pointer;
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
&:hover {
|
|
18
|
-
color:
|
|
18
|
+
color: colors.$color-blue-1-darken;
|
|
19
19
|
|
|
20
20
|
&.underline {
|
|
21
21
|
border-bottom: 1px solid currentColor;
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
|
|
25
25
|
&.disabled {
|
|
26
26
|
cursor: default;
|
|
27
|
-
color:
|
|
27
|
+
color: colors.$color-gray-4 !important;
|
|
28
28
|
border-bottom: 1px solid transparent !important;
|
|
29
29
|
}
|
|
30
30
|
}
|
|
@@ -2,14 +2,15 @@
|
|
|
2
2
|
* Copyright (c) 2024. Dave van Rijn Development
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
@
|
|
5
|
+
@use '../../../style/common-variables' as commons;
|
|
6
|
+
@use '../../../style/colors';
|
|
6
7
|
|
|
7
8
|
.loader-container {
|
|
8
9
|
display: flex;
|
|
9
10
|
flex-direction: column;
|
|
10
11
|
align-items: center;
|
|
11
12
|
justify-content: center;
|
|
12
|
-
z-index:
|
|
13
|
+
z-index: commons.$z-index-high;
|
|
13
14
|
background-color: rgba(white, .6);
|
|
14
15
|
top: 0;
|
|
15
16
|
left: 0;
|
|
@@ -21,9 +22,9 @@
|
|
|
21
22
|
}
|
|
22
23
|
|
|
23
24
|
.loader-label {
|
|
24
|
-
|
|
25
|
+
border-radius: .2rem;
|
|
25
26
|
font-size: .9rem;
|
|
26
|
-
color:
|
|
27
|
+
color: colors.$color-gray-6;
|
|
27
28
|
text-align: center;
|
|
28
29
|
margin-top: .5rem;
|
|
29
30
|
display: block;
|
|
@@ -32,7 +33,7 @@
|
|
|
32
33
|
}
|
|
33
34
|
|
|
34
35
|
.loader {
|
|
35
|
-
|
|
36
|
+
border-radius: 50%;
|
|
36
37
|
border: 1rem solid;
|
|
37
38
|
animation: rotate 1s ease-in-out infinite;
|
|
38
39
|
min-width: 2rem;
|
|
@@ -17,7 +17,6 @@ import React, {
|
|
|
17
17
|
import {useMatch, useNavigate} from 'react-router';
|
|
18
18
|
import {NavigationItem} from "../util/interfaces";
|
|
19
19
|
import {AwesomeIcon, hasHover} from "../../../index";
|
|
20
|
-
import defer from 'lodash.defer';
|
|
21
20
|
|
|
22
21
|
interface Props {
|
|
23
22
|
onClickItem?: (item: NavigationItem) => MouseEventHandler;
|
|
@@ -116,7 +115,7 @@ function MobileNavigation(props: Props, ref: ForwardedRef<MobileNavigationRef>)
|
|
|
116
115
|
}
|
|
117
116
|
|
|
118
117
|
useEffect(() => {
|
|
119
|
-
|
|
118
|
+
window.setTimeout(() => {
|
|
120
119
|
if (open) document.addEventListener('click', outsideClickListener);
|
|
121
120
|
else document.removeEventListener('click', outsideClickListener);
|
|
122
121
|
});
|