@odx/ui 3.9.2 → 3.10.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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @odx/ui
2
2
 
3
+ ## 3.10.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 61c967c: new search bar component
8
+
9
+ ## 3.9.3
10
+
11
+ ### Patch Changes
12
+
13
+ - 3558490: warning text color for dark theme
14
+
3
15
  ## 3.9.2
4
16
 
5
17
  ### Patch Changes
package/core-theme.css CHANGED
@@ -240,6 +240,7 @@
240
240
  --odx-c-danger-text-disabled: var(--red-50);
241
241
  --odx-c-success-text: var(--cyan-50);
242
242
  --odx-c-confirmation-text: var(--cyan-50);
243
+ --odx-c-warning-text: var(--cyan-50);
243
244
  }
244
245
 
245
246
  :root {
@@ -4384,8 +4385,8 @@ html body .odx-fs-italic {
4384
4385
  }
4385
4386
 
4386
4387
  .odx-header {
4387
- padding-left: calc(var(--odx-vertical-rythm-base-size) * 0.8334);
4388
- padding-right: calc(var(--odx-vertical-rythm-base-size) * 0.5);
4388
+ padding-inline-start: calc(var(--odx-vertical-rythm-base-size) * 0.8334);
4389
+ padding-inline-end: calc(var(--odx-vertical-rythm-base-size) * 0.5);
4389
4390
  margin-top: calc(var(--odx-vertical-rythm-base-size) * 0);
4390
4391
  margin-bottom: calc(var(--odx-vertical-rythm-base-size) * 0);
4391
4392
  min-height: calc(var(--odx-vertical-rythm-base-size) * 2);
@@ -4431,6 +4432,9 @@ html body .odx-fs-italic {
4431
4432
  display: block;
4432
4433
  }
4433
4434
  }
4435
+ .odx-header .odx-search-bar:not(:last-child) {
4436
+ margin-inline-end: calc(var(--odx-vertical-rythm-base-size) * 0.5);
4437
+ }
4434
4438
 
4435
4439
  .odx-header-navigation {
4436
4440
  background-color: var(--odx-c-background-content);
@@ -5993,6 +5997,71 @@ html body .odx-fs-italic {
5993
5997
  transform: rotateX(180deg);
5994
5998
  }
5995
5999
 
6000
+ .odx-search-bar {
6001
+ margin-top: calc(var(--odx-vertical-rythm-base-size) * 0);
6002
+ margin-bottom: calc(var(--odx-vertical-rythm-base-size) * 0);
6003
+ min-height: calc(var(--odx-vertical-rythm-base-size) * 1.5);
6004
+ transition-delay: 0ms;
6005
+ transition-duration: var(--odx-v-transition-duration);
6006
+ transition-property: background-color, color, outline-color;
6007
+ transition-timing-function: var(--odx-v-transition-easing-fn);
6008
+ outline: var(--odx-v-outline-width) solid transparent;
6009
+ outline-offset: calc(-1 * var(--odx-v-outline-width));
6010
+ background-color: var(--odx-input-control-background-color);
6011
+ border-radius: var(--odx-v-border-radius-controls);
6012
+ display: flex;
6013
+ outline-color: var(--odx-input-control-outline-color);
6014
+ overflow: hidden;
6015
+ position: relative;
6016
+ }
6017
+ .odx-search-bar:focus-within:has(input:focus-visible) {
6018
+ outline-color: var(--odx-c-focus-outline);
6019
+ }
6020
+ .odx-search-bar:focus-within:has(input:focus-visible) {
6021
+ background-color: var(--odx-c-focus);
6022
+ }
6023
+ @media (hover: hover){
6024
+ .odx-search-bar:focus-within:has(input:focus-visible):hover {
6025
+ background-color: var(--odx-c-focus);
6026
+ }
6027
+ }
6028
+ .odx-search-bar:not(:has(input[odxSearchBarControl])) {
6029
+ display: none;
6030
+ }
6031
+ .odx-search-bar__prefix {
6032
+ margin-top: calc(var(--odx-vertical-rythm-base-size) * 0);
6033
+ margin-bottom: calc(var(--odx-vertical-rythm-base-size) * 0);
6034
+ height: calc(var(--odx-vertical-rythm-base-size) * 1.5);
6035
+ transition-delay: 0ms;
6036
+ transition-duration: var(--odx-v-transition-duration);
6037
+ transition-property: color;
6038
+ transition-timing-function: var(--odx-v-transition-easing-fn);
6039
+ display: inline-flex;
6040
+ align-items: center;
6041
+ padding-inline-start: calc(var(--odx-vertical-rythm-base-size) * 0.3334);
6042
+ flex: 0 0 auto;
6043
+ }
6044
+ .odx-search-bar__input {
6045
+ padding-right: calc(var(--odx-vertical-rythm-base-size) * 0.3334);
6046
+ padding-left: calc(var(--odx-vertical-rythm-base-size) * 0.3334);
6047
+ font-weight: var(--odx-typography-font-weight-medium);
6048
+ letter-spacing: var(--odx-typography-font-weight-medium-letter-spacing);
6049
+ vertical-align: middle;
6050
+ width: 100%;
6051
+ }
6052
+ .odx-search-bar__input::-moz-placeholder {
6053
+ font-weight: var(--odx-typography-font-weight-normal);
6054
+ letter-spacing: var(--odx-typography-font-weight-normal-letter-spacing);
6055
+ color: var(--odx-input-control-color);
6056
+ opacity: 0.65;
6057
+ }
6058
+ .odx-search-bar__input::placeholder {
6059
+ font-weight: var(--odx-typography-font-weight-normal);
6060
+ letter-spacing: var(--odx-typography-font-weight-normal-letter-spacing);
6061
+ color: var(--odx-input-control-color);
6062
+ opacity: 0.65;
6063
+ }
6064
+
5996
6065
  :root {
5997
6066
  --odx-select-max-height: 220px;
5998
6067
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@odx/ui",
3
- "version": "3.9.2",
3
+ "version": "3.10.0",
4
4
  "author": "Drägerwerk AG & Co.KGaA",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "peerDependencies": {
@@ -6,8 +6,8 @@
6
6
  @use '../layout/typography' as *;
7
7
 
8
8
  .odx-header {
9
- @include dimensions.padding(math.div(20, 24), 'left');
10
- @include dimensions.padding(0.5, 'right');
9
+ @include dimensions.padding(math.div(20, 24), 'inline-start');
10
+ @include dimensions.padding(0.5, 'inline-end');
11
11
  @include dimensions.min-height(2);
12
12
  @include utils.vertical-center-content();
13
13
 
@@ -53,4 +53,10 @@
53
53
  display: block;
54
54
  }
55
55
  }
56
+
57
+ .odx-search-bar {
58
+ &:not(:last-child) {
59
+ margin-inline-end: dimensions.get-size(0.5);
60
+ }
61
+ }
56
62
  }
@@ -0,0 +1,47 @@
1
+ @use 'sass:math';
2
+ @use '../abstract/dimensions';
3
+ @use '../abstract/utils';
4
+ @use '../abstract/typography';
5
+ @use '../abstract/motion';
6
+
7
+ .odx-search-bar {
8
+ @include dimensions.min-height(1.5);
9
+ @include motion.transition(background-color color outline-color);
10
+ @include utils.with-outline();
11
+ @include utils.focus-state(true, true, 'input');
12
+
13
+ background-color: var(--odx-input-control-background-color);
14
+ border-radius: var(--odx-v-border-radius-controls);
15
+ display: flex;
16
+ outline-color: var(--odx-input-control-outline-color);
17
+ overflow: hidden;
18
+ position: relative;
19
+
20
+ &:not(:has(input[odxSearchBarControl])) {
21
+ display: none;
22
+ }
23
+
24
+ &__prefix {
25
+ @include dimensions.height(1.5);
26
+ @include motion.transition(color);
27
+ @include utils.vertical-center-content(true);
28
+ @include dimensions.padding(math.div(8, 24), 'inline-start');
29
+
30
+ flex: 0 0 auto;
31
+ }
32
+
33
+ &__input {
34
+ @include dimensions.padding-x(math.div(8, 24));
35
+ @include typography.font-weight(medium);
36
+
37
+ vertical-align: middle;
38
+ width: 100%;
39
+
40
+ &::placeholder {
41
+ @include typography.font-weight(normal);
42
+
43
+ color: var(--odx-input-control-color);
44
+ opacity: 0.65;
45
+ }
46
+ }
47
+ }
package/scss/core.scss CHANGED
@@ -80,6 +80,7 @@ Layout
80
80
  @use 'components/rich-list.component.scss';
81
81
  @use 'components/rich-list-item-header.component.scss';
82
82
  @use 'components/rich-list-item.component.scss';
83
+ @use 'components/search-bar.component.scss';
83
84
  @use 'components/select.component';
84
85
  @use 'components/slider.component';
85
86
  @use 'components/spinbox.component';
@@ -43,4 +43,6 @@
43
43
  --odx-c-success-text: var(--cyan-50);
44
44
 
45
45
  --odx-c-confirmation-text: var(--cyan-50);
46
+
47
+ --odx-c-warning-text: var(--cyan-50);
46
48
  }