@odx/ui 2.11.1 → 2.12.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,11 @@
1
1
  ## 2.9.9
2
2
 
3
+ ## 2.12.0
4
+
5
+ ### Minor Changes
6
+
7
+ - e5b4916: new design for rich list component
8
+
3
9
  ## 2.11.1
4
10
 
5
11
  ### Patch Changes
package/core-theme.css CHANGED
@@ -5357,66 +5357,58 @@ body[odxTheme=dark], body.odx-theme-dark {
5357
5357
  display: block;
5358
5358
  }
5359
5359
 
5360
- .odx-rich-list-item {
5361
- transition-delay: 0ms;
5362
- transition-duration: var(--odx-v-transition-duration);
5363
- transition-property: color;
5364
- transition-timing-function: var(--odx-v-transition-easing-fn);
5365
- border-bottom: 1px solid var(--odx-input-control-outline-color);
5366
- display: block;
5367
- }
5368
- .odx-rich-list-item__panel {
5369
- padding-right: calc(var(--odx-vertical-rythm-base-size) * 0.6667);
5370
- padding-left: calc(var(--odx-vertical-rythm-base-size) * 2.6667);
5371
- padding-top: calc(var(--odx-vertical-rythm-base-size) * 0.6667);
5372
- padding-bottom: calc(var(--odx-vertical-rythm-base-size) * 0.6667);
5373
- transition-delay: 0ms;
5374
- transition-duration: var(--odx-v-transition-duration);
5375
- transition-property: background-color, outline-color;
5376
- transition-timing-function: var(--odx-v-transition-easing-fn);
5377
- outline: var(--odx-v-outline-width) solid transparent;
5378
- outline-offset: calc(-1 * var(--odx-v-outline-width));
5379
- cursor: pointer;
5360
+ .odx-rich-list-header {
5361
+ align-items: center;
5362
+ -moz-column-gap: calc(var(--odx-vertical-rythm-base-size) * 0.6667);
5363
+ column-gap: calc(var(--odx-vertical-rythm-base-size) * 0.6667);
5364
+ display: flex;
5380
5365
  -webkit-user-select: none;
5381
5366
  -moz-user-select: none;
5382
5367
  user-select: none;
5383
- border-radius: var(--odx-v-border-radius-controls);
5384
- position: relative;
5385
5368
  }
5386
- .odx-rich-list-item__panel:focus-visible {
5387
- outline-color: var(--odx-c-focus-outline);
5388
- }
5389
- .odx-rich-list-item__panel:disabled, .odx-rich-list-item__panel.is-disabled {
5390
- outline-color: transparent;
5391
- pointer-events: none;
5369
+ .odx-rich-list-header__title {
5370
+ font-size: calc(var(--odx-typography-base-size) * (1*1/var(--odx-typography-negative-font-scaling-factor)));
5371
+ padding-top: calc(var(--odx-vertical-rythm-base-size) * 0);
5372
+ padding-bottom: calc(var(--odx-vertical-rythm-base-size) * 0);
5373
+ line-height: calc(var(--odx-vertical-rythm-base-size) * 0.8334);
5374
+ flex: 1;
5375
+ max-height: calc(var(--odx-vertical-rythm-base-size) * 1.5);
5376
+ overflow: hidden;
5377
+ text-align: center;
5392
5378
  }
5393
- @media (hover: hover){
5394
- .odx-rich-list-item__panel:hover {
5395
- background-color: var(--blue-700-5);
5379
+ .odx-rich-list-header__icon {
5380
+ position: relative;
5396
5381
  }
5382
+
5383
+ .odx-rich-list-item {
5384
+ padding-top: calc(var(--odx-vertical-rythm-base-size) * 0.3334);
5385
+ padding-right: calc(var(--odx-vertical-rythm-base-size) * 0.3334);
5386
+ padding-bottom: calc(var(--odx-vertical-rythm-base-size) * 0.3334);
5387
+ padding-left: calc(var(--odx-vertical-rythm-base-size) * 0.3334);
5388
+ border-bottom: 1px solid var(--odx-input-control-outline-color);
5389
+ display: block;
5397
5390
  }
5398
- .odx-rich-list-item__icon {
5399
- transition-delay: 0ms;
5400
- transition-duration: var(--odx-v-transition-duration);
5401
- transition-property: transform;
5402
- transition-timing-function: var(--odx-v-transition-easing-fn);
5403
- left: calc(var(--odx-vertical-rythm-base-size) * 0.6667);
5404
- position: absolute;
5405
- top: calc(var(--odx-vertical-rythm-base-size) * 0.6667);
5406
- transform: rotate(0deg);
5391
+ .odx-rich-list-item.is-disabled .odx-rich-list-header__title,
5392
+ .odx-rich-list-item.is-disabled .odx-rich-list-header .odx-avatar {
5393
+ color: var(--odx-c-text-disabled);
5407
5394
  }
5408
- .odx-rich-list-item--expanded .odx-rich-list-item__icon {
5409
- transform: rotate(90deg);
5395
+ .odx-rich-list-item.is-disabled .odx-rich-list-header .odx-avatar {
5396
+ filter: saturate(0);
5410
5397
  }
5411
5398
  .odx-rich-list-item__slot {
5399
+ margin-top: calc(var(--odx-vertical-rythm-base-size) * 0.3334);
5412
5400
  padding-top: calc(var(--odx-vertical-rythm-base-size) * 0.6667);
5413
5401
  padding-right: calc(var(--odx-vertical-rythm-base-size) * 0.6667);
5414
5402
  padding-bottom: calc(var(--odx-vertical-rythm-base-size) * 0.6667);
5415
5403
  padding-left: calc(var(--odx-vertical-rythm-base-size) * 0.6667);
5416
- padding-top: calc(var(--odx-vertical-rythm-base-size) * 0.3334);
5417
- padding-left: calc(var(--odx-vertical-rythm-base-size) * 2.6667);
5418
5404
  overflow: hidden;
5419
5405
  }
5406
+ .odx-rich-list-item--empty .odx-rich-list-header__expand-button {
5407
+ display: none;
5408
+ }
5409
+ .odx-rich-list-item--expanded .odx-rich-list-header__icon {
5410
+ transform: scaleY(-1);
5411
+ }
5420
5412
 
5421
5413
  body {
5422
5414
  --odx-select-max-height: 220px;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@odx/ui",
3
- "version": "2.11.1",
3
+ "version": "2.12.0",
4
4
  "author": "Drägerwerk AG & Co.KGaA",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "peerDependencies": {
@@ -0,0 +1,28 @@
1
+ @use 'sass:math';
2
+ @use '../abstract/dimensions';
3
+ @use '../abstract/motion';
4
+ @use '../abstract/typography';
5
+ @use '../abstract/utils';
6
+
7
+ .odx-rich-list-header {
8
+ $root: &;
9
+
10
+ align-items: center;
11
+ column-gap: dimensions.get-size(math.div(16, 24));
12
+ display: flex;
13
+ user-select: none;
14
+
15
+ &__title {
16
+ @include typography.font-size(-1);
17
+ @include dimensions.line-height(math.div(20, 24));
18
+
19
+ flex: 1;
20
+ max-height: dimensions.get-size(math.div(36, 24));
21
+ overflow: hidden;
22
+ text-align: center;
23
+ }
24
+
25
+ &__icon {
26
+ position: relative;
27
+ }
28
+ }
@@ -7,45 +7,38 @@
7
7
  .odx-rich-list-item {
8
8
  $root: &;
9
9
 
10
- @include motion.transition(color);
10
+ @include dimensions.padding(math.div(8, 24));
11
11
 
12
12
  border-bottom: 1px solid var(--odx-input-control-outline-color);
13
13
  display: block;
14
14
 
15
- &__panel {
16
- @include dimensions.padding(math.div(16, 24), right);
17
- @include dimensions.padding(math.div(64, 24), left);
18
- @include dimensions.padding(math.div(16, 24), top);
19
- @include dimensions.padding(math.div(16, 24), bottom);
20
- @include motion.transition(background-color outline-color);
21
- @include utils.interactive(false);
22
-
23
- border-radius: var(--odx-v-border-radius-controls);
24
- position: relative;
25
-
26
- &:hover {
27
- background-color: var(--blue-700-5);
15
+ &.is-disabled {
16
+ .odx-rich-list-header__title,
17
+ .odx-rich-list-header .odx-avatar {
18
+ color: var(--odx-c-text-disabled);
28
19
  }
29
- }
30
20
 
31
- &__icon {
32
- @include motion.transition(transform);
33
-
34
- left: dimensions.get-size(math.div(16, 24));
35
- position: absolute;
36
- top: dimensions.get-size(math.div(16, 24));
37
- transform: rotate(0deg);
38
-
39
- #{$root}--expanded & {
40
- transform: rotate(90deg);
21
+ .odx-rich-list-header .odx-avatar {
22
+ filter: saturate(0);
41
23
  }
42
24
  }
43
25
 
44
26
  &__slot {
27
+ @include dimensions.margin(math.div(8, 24), top);
45
28
  @include dimensions.padding(math.div(16, 24));
46
- @include dimensions.padding(math.div(8, 24), top);
47
- @include dimensions.padding(math.div(64, 24), left);
48
29
 
49
30
  overflow: hidden;
50
31
  }
32
+
33
+ &--empty {
34
+ .odx-rich-list-header__expand-button {
35
+ display: none;
36
+ }
37
+ }
38
+
39
+ &--expanded {
40
+ .odx-rich-list-header__icon {
41
+ transform: scaleY(-1);
42
+ }
43
+ }
51
44
  }
package/scss/core.scss CHANGED
@@ -71,6 +71,7 @@ Layout
71
71
  @use 'components/rail-navigation.component';
72
72
  @use 'components/rail-navigation-item.component';
73
73
  @use 'components/rich-list.component.scss';
74
+ @use 'components/rich-list-header.component.scss';
74
75
  @use 'components/rich-list-item.component.scss';
75
76
  @use 'components/select.component';
76
77
  @use 'components/slider.component';