@odx/ui 3.4.4 → 3.5.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @odx/ui
2
2
 
3
+ ## 3.5.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 16d6965: Fix text overflow in toast item description
8
+
9
+ ## 3.5.0
10
+
11
+ ### Minor Changes
12
+
13
+ - 4262ef8: Added a daterangepicker component
14
+
3
15
  ## 3.4.4
4
16
 
5
17
  ### Patch Changes
package/core-theme.css CHANGED
@@ -42,6 +42,7 @@
42
42
  --cyan-700: #0065ad;
43
43
  --cyan-800: #00508a;
44
44
  --cyan-900: #003c66;
45
+ --cyan-500-5: rgba(0, 145, 247, 0.05);
45
46
  --cyan-500-15: rgba(0, 145, 247, 0.15);
46
47
  --cyan-500-20: rgba(0, 145, 247, 0.2);
47
48
  --red-00: #ffe0e3;
@@ -3301,29 +3302,29 @@ html body .odx-fs-italic {
3301
3302
  outline-color: transparent;
3302
3303
  pointer-events: none;
3303
3304
  }
3305
+ .odx-calendar-cell--adjacent, .odx-calendar-cell.is-disabled {
3306
+ color: var(--odx-input-control-color-disabled);
3307
+ }
3308
+ .odx-calendar-cell:focus:disabled, .odx-calendar-cell:focus.is-disabled {
3309
+ outline-color: var(--odx-c-focus-outline-disabled);
3310
+ }
3304
3311
  @media (hover: hover){
3305
- .odx-calendar-cell:hover {
3312
+ .odx-calendar-cell:hover:not(.is-in-any-range) {
3306
3313
  background-color: var(--blue-700-10);
3307
3314
  }
3308
3315
  }
3309
- .odx-calendar-cell--is-current, .odx-calendar-cell.is-selected {
3316
+ .odx-calendar-cell--is-current, .odx-calendar-cell.is-selected:not(.is-in-any-range) {
3310
3317
  font-weight: var(--odx-typography-font-weight-medium);
3311
3318
  letter-spacing: var(--odx-typography-font-weight-medium-letter-spacing);
3312
3319
  }
3313
- .odx-calendar-cell.is-selected {
3320
+ .odx-calendar-cell.is-selected:not(.is-in-any-range) {
3314
3321
  background-color: var(--odx-c-focus);
3315
3322
  }
3316
3323
  @media (hover: hover){
3317
- .odx-calendar-cell.is-selected:hover {
3324
+ .odx-calendar-cell.is-selected:not(.is-in-any-range):hover {
3318
3325
  background-color: var(--cyan-500-20);
3319
3326
  }
3320
3327
  }
3321
- .odx-calendar-cell--adjacent, .odx-calendar-cell.is-disabled {
3322
- color: var(--odx-input-control-color-disabled);
3323
- }
3324
- .odx-calendar-cell:focus:disabled, .odx-calendar-cell:focus.is-disabled {
3325
- outline-color: var(--odx-c-focus-outline-disabled);
3326
- }
3327
3328
  .odx-calendar-month .odx-calendar__table {
3328
3329
  border-collapse: separate;
3329
3330
  border-spacing: calc(var(--odx-vertical-rythm-base-size) * 0.1667);
@@ -3345,6 +3346,9 @@ html body .odx-fs-italic {
3345
3346
  width: calc(var(--odx-vertical-rythm-base-size) * 1.5);
3346
3347
  vertical-align: middle;
3347
3348
  }
3349
+ .odx-calendar-month .odx-calendar-cell {
3350
+ border-radius: 0;
3351
+ }
3348
3352
  .odx-calendar-month .odx-calendar-cell--is-current::after {
3349
3353
  margin-top: calc(var(--odx-vertical-rythm-base-size) * 0);
3350
3354
  margin-bottom: calc(var(--odx-vertical-rythm-base-size) * 0);
@@ -3362,6 +3366,66 @@ html body .odx-fs-italic {
3362
3366
  top: 0;
3363
3367
  z-index: -1;
3364
3368
  }
3369
+ .odx-calendar-month .odx-calendar-cell--is-in-range::before {
3370
+ background-color: var(--odx-c-selected);
3371
+ bottom: 0;
3372
+ content: "";
3373
+ left: 0;
3374
+ position: absolute;
3375
+ right: 0;
3376
+ top: 0;
3377
+ z-index: -1;
3378
+ }
3379
+ .odx-calendar-month .odx-calendar-cell--is-range-start {
3380
+ font-weight: var(--odx-typography-font-weight-medium);
3381
+ letter-spacing: var(--odx-typography-font-weight-medium-letter-spacing);
3382
+ }
3383
+ .odx-calendar-month .odx-calendar-cell--is-range-start::before {
3384
+ border-bottom-left-radius: var(--odx-v-border-radius-controls);
3385
+ border-top-left-radius: var(--odx-v-border-radius-controls);
3386
+ }
3387
+ .odx-calendar-month .odx-calendar-cell--is-range-end {
3388
+ font-weight: var(--odx-typography-font-weight-medium);
3389
+ letter-spacing: var(--odx-typography-font-weight-medium-letter-spacing);
3390
+ }
3391
+ .odx-calendar-month .odx-calendar-cell--is-range-end::before {
3392
+ border-bottom-right-radius: var(--odx-v-border-radius-controls);
3393
+ border-top-right-radius: var(--odx-v-border-radius-controls);
3394
+ }
3395
+ .odx-calendar-month .odx-calendar-cell--is-in-range:not(.odx-calendar-month .odx-calendar-cell--is-range-end) {
3396
+ box-shadow: 4px 0 0 0 var(--odx-c-selected);
3397
+ }
3398
+ .odx-calendar-month .odx-calendar-cell--is-in-preview-range::before {
3399
+ background-color: var(--cyan-500-5);
3400
+ bottom: 0;
3401
+ content: "";
3402
+ left: 0;
3403
+ position: absolute;
3404
+ right: 0;
3405
+ top: 0;
3406
+ z-index: -1;
3407
+ }
3408
+ .odx-calendar-month .odx-calendar-cell--is-preview-range-start {
3409
+ font-weight: var(--odx-typography-font-weight-medium);
3410
+ letter-spacing: var(--odx-typography-font-weight-medium-letter-spacing);
3411
+ }
3412
+ .odx-calendar-month .odx-calendar-cell--is-preview-range-start::before {
3413
+ background-color: var(--odx-c-selected);
3414
+ border-bottom-left-radius: var(--odx-v-border-radius-controls);
3415
+ border-top-left-radius: var(--odx-v-border-radius-controls);
3416
+ }
3417
+ .odx-calendar-month .odx-calendar-cell--is-preview-range-end {
3418
+ font-weight: var(--odx-typography-font-weight-medium);
3419
+ letter-spacing: var(--odx-typography-font-weight-medium-letter-spacing);
3420
+ }
3421
+ .odx-calendar-month .odx-calendar-cell--is-preview-range-end::before {
3422
+ background-color: var(--odx-c-selected);
3423
+ border-bottom-right-radius: var(--odx-v-border-radius-controls);
3424
+ border-top-right-radius: var(--odx-v-border-radius-controls);
3425
+ }
3426
+ .odx-calendar-month .odx-calendar-cell--is-in-preview-range:not(.odx-calendar-month .odx-calendar-cell--is-preview-range-end) {
3427
+ box-shadow: 4px 0 0 0 var(--cyan-500-5);
3428
+ }
3365
3429
  .odx-calendar-year .odx-calendar-cell--is-current, .odx-calendar-years .odx-calendar-cell--is-current {
3366
3430
  background-color: var(--blue-700-10);
3367
3431
  }
@@ -3777,6 +3841,37 @@ html body .odx-fs-italic {
3777
3841
  max-height: 359px;
3778
3842
  }
3779
3843
 
3844
+ .odx-daterangepicker {
3845
+ display: flex;
3846
+ align-items: center;
3847
+ }
3848
+ .odx-daterangepicker.is-readonly .odx-daterangepicker__trigger {
3849
+ outline-color: transparent;
3850
+ pointer-events: none;
3851
+ color: var(--odx-control-color-disabled);
3852
+ }
3853
+ .odx-daterangepicker__trigger-wrapper {
3854
+ margin: 0 0 0 auto;
3855
+ }
3856
+ .odx-daterangepicker__mirror {
3857
+ height: 0;
3858
+ overflow: hidden;
3859
+ position: absolute;
3860
+ white-space: pre;
3861
+ }
3862
+ .odx-daterangepicker__control::-webkit-inner-spin-button, .odx-daterangepicker__control::-webkit-calendar-picker-indicator {
3863
+ -webkit-appearance: none;
3864
+ appearance: none;
3865
+ display: none;
3866
+ }
3867
+ .odx-daterangepicker__separator {
3868
+ margin-right: calc(var(--odx-vertical-rythm-base-size) * 0.25);
3869
+ margin-left: calc(var(--odx-vertical-rythm-base-size) * 0.25);
3870
+ }
3871
+ .odx-daterangepicker .odx-dropdown {
3872
+ max-height: 359px;
3873
+ }
3874
+
3780
3875
  .odx-error-page {
3781
3876
  margin-right: calc(var(--odx-vertical-rythm-base-size) * 1);
3782
3877
  margin-left: calc(var(--odx-vertical-rythm-base-size) * 1);
@@ -6480,6 +6575,7 @@ html body .odx-fs-italic {
6480
6575
  .odx-toast-item__description {
6481
6576
  max-height: calc(var(--odx-vertical-rythm-base-size) * 5);
6482
6577
  overflow: auto;
6578
+ overflow-wrap: break-word;
6483
6579
  }
6484
6580
  .odx-toast-item__close {
6485
6581
  outline: var(--odx-v-outline-width) solid transparent;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@odx/ui",
3
- "version": "3.4.4",
3
+ "version": "3.5.1",
4
4
  "author": "Drägerwerk AG & Co.KGaA",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "peerDependencies": {
@@ -46,34 +46,34 @@
46
46
  vertical-align: middle;
47
47
  z-index: 1;
48
48
 
49
- &:hover {
49
+ &--adjacent,
50
+ &.is-disabled {
51
+ color: var(--odx-input-control-color-disabled);
52
+ }
53
+
54
+ &:focus {
55
+ &:disabled,
56
+ &.is-disabled {
57
+ outline-color: var(--odx-c-focus-outline-disabled);
58
+ }
59
+ }
60
+
61
+ &:hover:not(.is-in-any-range) {
50
62
  background-color: var(--blue-700-10);
51
63
  }
52
64
 
53
65
  &--is-current,
54
- &.is-selected {
66
+ &.is-selected:not(.is-in-any-range) {
55
67
  @include typography.font-weight(medium);
56
68
  }
57
69
 
58
- &.is-selected {
70
+ &.is-selected:not(.is-in-any-range) {
59
71
  background-color: var(--odx-c-focus);
60
72
 
61
73
  &:hover {
62
74
  background-color: var(--cyan-500-20);
63
75
  }
64
76
  }
65
-
66
- &--adjacent,
67
- &.is-disabled {
68
- color: var(--odx-input-control-color-disabled);
69
- }
70
-
71
- &:focus {
72
- &:disabled,
73
- &.is-disabled {
74
- outline-color: var(--odx-c-focus-outline-disabled);
75
- }
76
- }
77
77
  }
78
78
 
79
79
  &-month {
@@ -99,6 +99,8 @@
99
99
  }
100
100
 
101
101
  #{$root}-cell {
102
+ border-radius: 0;
103
+
102
104
  &--is-current::after {
103
105
  @include dimensions.container(1);
104
106
  @include dimensions.margin(0.25);
@@ -111,6 +113,74 @@
111
113
  top: 0;
112
114
  z-index: -1;
113
115
  }
116
+
117
+ &--is-in-range::before {
118
+ background-color: var(--odx-c-selected);
119
+ bottom: 0;
120
+ content: '';
121
+ left: 0;
122
+ position: absolute;
123
+ right: 0;
124
+ top: 0;
125
+ z-index: -1;
126
+ }
127
+
128
+ &--is-range-start {
129
+ @include typography.font-weight(medium);
130
+
131
+ &::before {
132
+ border-bottom-left-radius: var(--odx-v-border-radius-controls);
133
+ border-top-left-radius: var(--odx-v-border-radius-controls);
134
+ }
135
+ }
136
+
137
+ &--is-range-end {
138
+ @include typography.font-weight(medium);
139
+
140
+ &::before {
141
+ border-bottom-right-radius: var(--odx-v-border-radius-controls);
142
+ border-top-right-radius: var(--odx-v-border-radius-controls);
143
+ }
144
+ }
145
+
146
+ &--is-in-range:not(&--is-range-end) {
147
+ box-shadow: 4px 0 0 0 var(--odx-c-selected);
148
+ }
149
+
150
+ &--is-in-preview-range::before {
151
+ background-color: var(--cyan-500-5);
152
+ bottom: 0;
153
+ content: '';
154
+ left: 0;
155
+ position: absolute;
156
+ right: 0;
157
+ top: 0;
158
+ z-index: -1;
159
+ }
160
+
161
+ &--is-preview-range-start {
162
+ @include typography.font-weight(medium);
163
+
164
+ &::before {
165
+ background-color: var(--odx-c-selected);
166
+ border-bottom-left-radius: var(--odx-v-border-radius-controls);
167
+ border-top-left-radius: var(--odx-v-border-radius-controls);
168
+ }
169
+ }
170
+
171
+ &--is-preview-range-end {
172
+ @include typography.font-weight(medium);
173
+
174
+ &::before {
175
+ background-color: var(--odx-c-selected);
176
+ border-bottom-right-radius: var(--odx-v-border-radius-controls);
177
+ border-top-right-radius: var(--odx-v-border-radius-controls);
178
+ }
179
+ }
180
+
181
+ &--is-in-preview-range:not(&--is-preview-range-end) {
182
+ box-shadow: 4px 0 0 0 var(--cyan-500-5);
183
+ }
114
184
  }
115
185
  }
116
186
 
@@ -0,0 +1,44 @@
1
+ @use '../abstract/utils';
2
+ @use '../abstract/dimensions';
3
+
4
+ .odx-daterangepicker {
5
+ $root: &;
6
+ $dropdown-max-height: 359px;
7
+
8
+ @include utils.vertical-center-content();
9
+
10
+ &__trigger {
11
+ #{$root}.is-readonly & {
12
+ @include utils.non-interactive();
13
+
14
+ color: var(--odx-control-color-disabled);
15
+ }
16
+ }
17
+
18
+ &__trigger-wrapper {
19
+ margin: 0 0 0 auto;
20
+ }
21
+
22
+ &__mirror {
23
+ height: 0;
24
+ overflow: hidden;
25
+ position: absolute;
26
+ white-space: pre;
27
+ }
28
+
29
+ &__control {
30
+ &::-webkit-inner-spin-button,
31
+ &::-webkit-calendar-picker-indicator {
32
+ appearance: none;
33
+ display: none;
34
+ }
35
+ }
36
+
37
+ &__separator {
38
+ @include dimensions.margin-x(0.25);
39
+ }
40
+
41
+ .odx-dropdown {
42
+ max-height: $dropdown-max-height;
43
+ }
44
+ }
@@ -36,6 +36,7 @@
36
36
  &__description {
37
37
  max-height: dimensions.get-size(5);
38
38
  overflow: auto;
39
+ overflow-wrap: break-word;
39
40
  }
40
41
 
41
42
  &__close {
package/scss/core.scss CHANGED
@@ -49,6 +49,7 @@ Layout
49
49
  @use 'components/circular-progress.component';
50
50
  @use 'components/content-box.component';
51
51
  @use 'components/datepicker.component';
52
+ @use 'components/daterangepicker.component';
52
53
  @use 'components/dropdown.component';
53
54
  @use 'components/error-page.component';
54
55
  @use 'components/expandable-list-item.component';
@@ -44,6 +44,7 @@
44
44
  --cyan-800: #00508a;
45
45
  --cyan-900: #003c66;
46
46
 
47
+ --cyan-500-5: #{rgba(#0091f7, 5%)};
47
48
  --cyan-500-15: #{rgba(#0091f7, 15%)};
48
49
  --cyan-500-20: #{rgba(#0091f7, 20%)};
49
50