@odx/ui 2.5.0 → 2.7.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@odx/ui",
3
- "version": "2.5.0",
3
+ "version": "2.7.0",
4
4
  "author": "Drägerwerk AG & Co.KGaA",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "peerDependencies": {
@@ -119,8 +119,8 @@
119
119
  }
120
120
 
121
121
  @mixin non-interactive() {
122
+ outline-color: transparent;
122
123
  pointer-events: none;
123
- user-select: none;
124
124
  }
125
125
 
126
126
  @mixin dark-theme-selector() {
@@ -5,9 +5,9 @@
5
5
  height: 100%;
6
6
  }
7
7
 
8
- .odx-form-field-control {
8
+ &__control {
9
9
  height: 100%;
10
- padding: 0;
10
+ width: 100%;
11
11
 
12
12
  @include dimensions.min-height(1.5);
13
13
  }
@@ -0,0 +1,168 @@
1
+ @use 'sass:math';
2
+ @use '../abstract/dimensions';
3
+ @use '../abstract/motion';
4
+ @use '../abstract/typography';
5
+ @use '../abstract/utils';
6
+
7
+ .odx-calendar {
8
+ $root: &;
9
+
10
+ display: inline-block;
11
+ flex-direction: column;
12
+ max-height: inherit;
13
+
14
+ &-header {
15
+ @include motion.transition(background-color outline-color color border-radius);
16
+ @include utils.vertical-center-content();
17
+ @include typography.font-weight(normal);
18
+
19
+ background-color: var(--odx-c-background-content);
20
+ border-bottom: 1px solid var(--odx-input-control-outline-color);
21
+
22
+ .odx-action-group {
23
+ width: 100%;
24
+
25
+ @include dimensions.margin(0, top);
26
+ @include dimensions.margin(math.div(4, 24), bottom);
27
+ }
28
+
29
+ &__title {
30
+ flex: 1 1 auto;
31
+ }
32
+ }
33
+
34
+ &-cell {
35
+ @include dimensions.container(1.5);
36
+ @include motion.transition(background-color outline-color color border-radius);
37
+ @include utils.interactive(false);
38
+ @include utils.with-outline-bold();
39
+ @include typography.font-weight(normal);
40
+
41
+ border-radius: var(--odx-v-border-radius-controls);
42
+ cursor: pointer;
43
+ outline-color: transparent;
44
+ position: relative;
45
+ text-align: center;
46
+ vertical-align: middle;
47
+ z-index: 1;
48
+
49
+ &:hover {
50
+ background-color: var(--blue-700-10);
51
+ }
52
+
53
+ &--is-current,
54
+ &.is-selected {
55
+ @include typography.font-weight(medium);
56
+ }
57
+
58
+ &.is-selected {
59
+ background-color: var(--odx-c-focus);
60
+
61
+ &:hover {
62
+ background-color: var(--cyan-500-20);
63
+ }
64
+ }
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
+ }
78
+
79
+ &-month {
80
+ #{$root}__table {
81
+ border-collapse: separate;
82
+ border-spacing: dimensions.get-size(math.div(4, 24));
83
+
84
+ @include dimensions.margin-x(math.div(-4, 24));
85
+ }
86
+
87
+ #{$root}__weekdays {
88
+ @include typography.font-weight(bold);
89
+ @include typography.font-size(-1);
90
+ @include utils.non-interactive();
91
+
92
+ text-align: center;
93
+
94
+ td {
95
+ @include dimensions.container(1.5);
96
+
97
+ vertical-align: middle;
98
+ }
99
+ }
100
+
101
+ #{$root}-cell {
102
+ &--is-current::after {
103
+ @include dimensions.container(1);
104
+ @include dimensions.margin(0.25);
105
+
106
+ background-color: var(--blue-700-15);
107
+ border-radius: 50%;
108
+ content: '';
109
+ left: 0;
110
+ position: absolute;
111
+ top: 0;
112
+ z-index: -1;
113
+ }
114
+ }
115
+ }
116
+
117
+ &-year,
118
+ &-years {
119
+ #{$root}-cell {
120
+ &--is-current {
121
+ background-color: var(--blue-700-10);
122
+ }
123
+ }
124
+ }
125
+
126
+ &-year {
127
+ #{$root}__body {
128
+ display: inline-table;
129
+
130
+ @include dimensions.margin-y(1.75);
131
+ }
132
+
133
+ #{$root}__table {
134
+ @include dimensions.margin(1.42, bottom);
135
+ }
136
+
137
+ #{$root}__season {
138
+ display: grid;
139
+ grid-gap: 50px;
140
+ grid-template-columns: repeat(3, 1fr);
141
+ margin: 2px 0;
142
+
143
+ @include dimensions.padding-x(1.16);
144
+ }
145
+
146
+ #{$root}-cell {
147
+ @include dimensions.container(math.div(5, 3));
148
+ }
149
+ }
150
+
151
+ &-years {
152
+ #{$root}__table {
153
+ margin: 0 28px;
154
+ }
155
+
156
+ #{$root}__year-row {
157
+ display: grid;
158
+ grid-gap: 36px;
159
+ grid-template-columns: repeat(3, 1fr);
160
+ margin: 2px 0;
161
+ }
162
+
163
+ #{$root}-cell {
164
+ height: dimensions.get-size(math.div(5, 3));
165
+ width: dimensions.get-size(2);
166
+ }
167
+ }
168
+ }
@@ -0,0 +1,30 @@
1
+ @use '../abstract/utils';
2
+
3
+ .odx-datepicker {
4
+ $root: &;
5
+ $dropdown-max-height: 359px;
6
+
7
+ @include utils.vertical-center-content();
8
+
9
+ &__trigger {
10
+ #{$root}.is-readonly & {
11
+ @include utils.non-interactive();
12
+
13
+ color: var(--odx-control-color-disabled);
14
+ }
15
+ }
16
+
17
+ &__control {
18
+ width: 100%;
19
+
20
+ &::-webkit-inner-spin-button,
21
+ &::-webkit-calendar-picker-indicator {
22
+ appearance: none;
23
+ display: none;
24
+ }
25
+ }
26
+
27
+ .odx-dropdown {
28
+ max-height: $dropdown-max-height;
29
+ }
30
+ }
@@ -18,6 +18,7 @@ $dropdown-open-selector: '.odx-dropdown-host[aria-expanded="true"]';
18
18
  max-height: inherit;
19
19
  min-height: inherit;
20
20
  overflow: auto;
21
+ overscroll-behavior: contain;
21
22
  }
22
23
 
23
24
  &__option-list {
@@ -93,7 +93,8 @@ body {
93
93
  @include dimensions.min-height(1.5);
94
94
  @include motion.transition(background-color color outline-color);
95
95
  @include utils.with-outline();
96
- @include utils.focus-state(true, true, $control-selector);
96
+ @include utils.focus-state(true, true, 'input');
97
+ @include utils.focus-state(true, true, 'textarea');
97
98
 
98
99
  background-color: var(--odx-input-control-background-color);
99
100
  border-radius: var(--odx-v-border-radius-controls);
@@ -117,12 +118,15 @@ body {
117
118
  }
118
119
 
119
120
  #{$control-selector} {
120
- @include dimensions.padding-x($form-field-inner-padding);
121
- @include typography.font-weight(medium);
122
-
123
121
  vertical-align: middle;
124
122
  width: 100%;
125
123
 
124
+ @include dimensions.padding-x($form-field-inner-padding);
125
+ @include typography.font-weight(medium);
126
+ }
127
+
128
+ #{$control-selector},
129
+ input {
126
130
  &::placeholder {
127
131
  @include typography.font-weight(normal);
128
132
 
@@ -49,10 +49,9 @@ body {
49
49
  }
50
50
  }
51
51
 
52
- &__search {
52
+ &__control {
53
53
  height: 100%;
54
- outline: inherit;
55
- padding: 0 !important;
54
+ width: 100%;
56
55
  }
57
56
 
58
57
  &__indicator {
package/scss/core.scss CHANGED
@@ -41,11 +41,13 @@ Layout
41
41
  @use 'components/button-group.component';
42
42
  @use 'components/button.component';
43
43
  @use 'components/card.component';
44
+ @use 'components/calendar.component';
44
45
  @use 'components/checkbox.component';
45
46
  @use 'components/chip.component';
46
47
  @use 'components/chip-list.component';
47
48
  @use 'components/circular-progress.component';
48
49
  @use 'components/content-box.component';
50
+ @use 'components/datepicker.component';
49
51
  @use 'components/dropdown.component';
50
52
  @use 'components/expandable-list-item.component';
51
53
  @use 'components/form-field.component';