@odx/ui 5.1.0 → 5.2.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": "5.1.0",
3
+ "version": "5.2.0",
4
4
  "author": "Drägerwerk AG & Co.KGaA",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "peerDependencies": {
@@ -0,0 +1,91 @@
1
+ @use 'sass:math';
2
+ @use '../abstract/dimensions';
3
+ @use '../abstract/motion';
4
+ @use '../abstract/utils';
5
+
6
+ .odx-anchor-navigation {
7
+ --active-link-indicator-color: var(--odx-control-outline-color);
8
+
9
+ $root: &;
10
+
11
+ display: flex;
12
+ gap: dimensions.get-size(math.div(8, 24));
13
+
14
+ &:is(:not(#{$root}--vertical)) {
15
+ border-block-end: var(--odx-v-outline-width-bold) solid var(--odx-control-outline-color);
16
+ padding-block-start: var(--odx-v-outline-width-bold);
17
+ }
18
+
19
+ &--vertical {
20
+ border-inline-start: var(--odx-v-outline-width-bold) solid var(--odx-control-outline-color);
21
+ flex-direction: column;
22
+ }
23
+
24
+ &-item {
25
+ @include motion.transition(border-color background-color);
26
+
27
+ display: inline-flex;
28
+ min-width: dimensions.get-size(math.div(80, 24));
29
+
30
+ &:has([aria-current='page']) {
31
+ --active-link-indicator-color: var(--odx-c-link-active);
32
+ }
33
+
34
+ .odx-link {
35
+ @include dimensions.padding-x(math.div(12, 24));
36
+ @include dimensions.padding-y(math.div(6, 24));
37
+ @include utils.interactive($with-background: false);
38
+
39
+ color: var(--odx-c-text);
40
+ display: flex;
41
+ outline-offset: calc(var(--odx-v-outline-width-bold) * -1);
42
+ outline-width: var(--odx-v-outline-width-bold);
43
+
44
+ &:not(:empty) {
45
+ gap: dimensions.get-size(math.div(4, 24));
46
+ }
47
+
48
+ &[aria-current='page'] {
49
+ background-color: var(--odx-c-selected);
50
+ }
51
+
52
+ &:focus-visible {
53
+ background-color: unset;
54
+ }
55
+
56
+ &:hover {
57
+ color: var(--odx-c-text);
58
+ text-decoration: none;
59
+
60
+ &:not([aria-current='page']) {
61
+ background-color: var(--gray-100);
62
+ }
63
+
64
+ &:focus-visible {
65
+ background-color: unset;
66
+ }
67
+ }
68
+
69
+ #{$root}:is(:not(#{$root}--vertical)) & {
70
+ border-bottom-left-radius: 0;
71
+ border-bottom-right-radius: 0;
72
+ }
73
+
74
+ #{$root}--vertical & {
75
+ border-bottom-left-radius: 0;
76
+ border-top-left-radius: 0;
77
+ inline-size: 100%;
78
+ }
79
+ }
80
+
81
+ #{$root}:is(:not(#{$root}--vertical)) & {
82
+ border-block-end: var(--odx-v-outline-width-bold) solid var(--active-link-indicator-color);
83
+ margin-block-end: calc(var(--odx-v-outline-width-bold) * -1);
84
+ }
85
+
86
+ #{$root}--vertical & {
87
+ border-inline-start: var(--odx-v-outline-width-bold) solid var(--active-link-indicator-color);
88
+ margin-inline-start: calc(var(--odx-v-outline-width-bold) * -1);
89
+ }
90
+ }
91
+ }
@@ -15,6 +15,7 @@ $variants: secondary, highlight, success, danger, warning, confirmation;
15
15
 
16
16
  display: inline-flex;
17
17
  gap: dimensions.get-size(math.div(4, 24));
18
+ min-width: dimensions.get-size(math.div(32, 24));
18
19
  user-select: none;
19
20
 
20
21
  &__content {
@@ -0,0 +1,91 @@
1
+ @use 'sass:math';
2
+ @use '../abstract/dimensions';
3
+ @use '../abstract/motion';
4
+ @use '../abstract/utils';
5
+
6
+ .odx-anchor-navigation {
7
+ --active-link-indicator-color: var(--odx-control-outline-color);
8
+
9
+ $root: &;
10
+
11
+ display: flex;
12
+ gap: dimensions.get-size(math.div(8, 24));
13
+
14
+ &:is(:not(#{$root}--vertical)) {
15
+ border-block-end: var(--odx-v-outline-width-bold) solid var(--odx-control-outline-color);
16
+ padding-block-start: var(--odx-v-outline-width-bold);
17
+ }
18
+
19
+ &--vertical {
20
+ border-inline-start: var(--odx-v-outline-width-bold) solid var(--odx-control-outline-color);
21
+ flex-direction: column;
22
+ }
23
+
24
+ &-item {
25
+ @include motion.transition(border-color background-color);
26
+
27
+ display: inline-flex;
28
+ min-width: dimensions.get-size(math.div(80, 24));
29
+
30
+ &:has([aria-current='page']) {
31
+ --active-link-indicator-color: var(--odx-c-link-active);
32
+ }
33
+
34
+ .odx-link {
35
+ @include dimensions.padding-x(math.div(12, 24));
36
+ @include dimensions.padding-y(math.div(6, 24));
37
+ @include utils.interactive($with-background: false);
38
+
39
+ color: var(--odx-c-text);
40
+ display: flex;
41
+ outline-offset: calc(var(--odx-v-outline-width-bold) * -1);
42
+ outline-width: var(--odx-v-outline-width-bold);
43
+
44
+ &:not(:empty) {
45
+ gap: dimensions.get-size(math.div(4, 24));
46
+ }
47
+
48
+ &[aria-current='page'] {
49
+ background-color: var(--odx-c-selected);
50
+ }
51
+
52
+ &:focus-visible {
53
+ background-color: unset;
54
+ }
55
+
56
+ &:hover {
57
+ color: var(--odx-c-text);
58
+ text-decoration: none;
59
+
60
+ &:not([aria-current='page']) {
61
+ background-color: var(--gray-100);
62
+ }
63
+
64
+ &:focus-visible {
65
+ background-color: unset;
66
+ }
67
+ }
68
+
69
+ #{$root}:is(:not(#{$root}--vertical)) & {
70
+ border-bottom-left-radius: 0;
71
+ border-bottom-right-radius: 0;
72
+ }
73
+
74
+ #{$root}--vertical & {
75
+ border-bottom-left-radius: 0;
76
+ border-top-left-radius: 0;
77
+ inline-size: 100%;
78
+ }
79
+ }
80
+
81
+ #{$root}:is(:not(#{$root}--vertical)) & {
82
+ border-block-end: var(--odx-v-outline-width-bold) solid var(--active-link-indicator-color);
83
+ margin-block-end: calc(var(--odx-v-outline-width-bold) * -1);
84
+ }
85
+
86
+ #{$root}--vertical & {
87
+ border-inline-start: var(--odx-v-outline-width-bold) solid var(--active-link-indicator-color);
88
+ margin-inline-start: calc(var(--odx-v-outline-width-bold) * -1);
89
+ }
90
+ }
91
+ }
@@ -15,6 +15,7 @@ $variants: secondary, highlight, success, danger, warning, confirmation;
15
15
 
16
16
  display: inline-flex;
17
17
  gap: dimensions.get-size(math.div(4, 24));
18
+ min-width: dimensions.get-size(math.div(32, 24));
18
19
  user-select: none;
19
20
 
20
21
  &__content {
@@ -60,12 +60,6 @@
60
60
 
61
61
  &.sortable {
62
62
  cursor: pointer;
63
-
64
- > svg {
65
- display: inline-block;
66
- height: auto;
67
- width: dimensions.get-size(math.div(16, 24));
68
- }
69
63
  }
70
64
  }
71
65
 
package/scss/core.scss CHANGED
@@ -32,6 +32,7 @@ Layout
32
32
  @use 'components/accordion.component';
33
33
  @use 'components/accordion-item.component';
34
34
  @use 'components/action-group.component';
35
+ @use 'components/anchor-navigation.component';
35
36
  @use 'components/area-header.component';
36
37
  @use 'components/autocomplete.component';
37
38
  @use 'components/avatar.component';
@@ -60,12 +60,6 @@
60
60
 
61
61
  &.sortable {
62
62
  cursor: pointer;
63
-
64
- > svg {
65
- display: inline-block;
66
- height: auto;
67
- width: dimensions.get-size(math.div(16, 24));
68
- }
69
63
  }
70
64
  }
71
65