@odx/ui 1.0.0-rc.4 → 1.0.0-rc.5

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.
@@ -41,14 +41,14 @@
41
41
 
42
42
  &__title {
43
43
  @extend .odx-title;
44
- @extend .odx-title--6;
44
+ @extend .odx-title-6;
45
45
 
46
46
  color: var(--odx-area-header-title-color);
47
47
  }
48
48
 
49
49
  &__subtitle {
50
50
  @extend .odx-subtitle;
51
- @extend .odx-title--6;
51
+ @extend .odx-subtitle-6;
52
52
 
53
53
  color: var(--odx-area-header-subtitle-color);
54
54
  }
@@ -94,7 +94,7 @@
94
94
  }
95
95
 
96
96
  .odx-area-header__title {
97
- @extend .odx-title--5;
97
+ @extend .odx-title-5;
98
98
  }
99
99
  }
100
100
 
@@ -106,7 +106,7 @@
106
106
  }
107
107
 
108
108
  .odx-area-header__title {
109
- @extend .odx-title--4;
109
+ @extend .odx-title-4;
110
110
 
111
111
  @include breakpoints.down(tablet) {
112
112
  @include dimensions.line-height(1);
@@ -132,11 +132,11 @@
132
132
  }
133
133
 
134
134
  .odx-area-header__title {
135
- @extend .odx-title--2;
135
+ @extend .odx-title-2;
136
136
  }
137
137
 
138
138
  .odx-area-header__subtitle {
139
- @extend .odx-title--5;
139
+ @extend .odx-subtitle-5;
140
140
  }
141
141
 
142
142
  .odx-avatar {
@@ -19,6 +19,7 @@
19
19
  @include typography.font-weight(medium);
20
20
  @include utils.center-content(true);
21
21
  @include utils.interactive($with-background: false);
22
+ @include utils.with-outline-bold;
22
23
 
23
24
  border-radius: var(--odx-v-border-radius-controls);
24
25
  min-width: dimensions.get-size(1.5);
@@ -21,7 +21,7 @@ $form-field-inner-padding: math.div(8, 24);
21
21
 
22
22
  .odx-form-field {
23
23
  $root: &;
24
- $control-selector: '> *:not(.odx-form-field__prefix, .odx-form-field__suffix)';
24
+ $control-selector: '.odx-form-field-control';
25
25
 
26
26
  @include dimensions.padding($form-field-label-height, top);
27
27
 
@@ -88,7 +88,7 @@ $form-field-inner-padding: math.div(8, 24);
88
88
  @include dimensions.min-height(1.5);
89
89
  @include motion.transition(background-color color outline-color);
90
90
  @include utils.with-outline();
91
- @include utils.focus-state(true, true, $focus-within-selector: $control-selector);
91
+ @include utils.focus-state(true, true, $control-selector);
92
92
 
93
93
  background-color: var(--odx-input-control-background-color);
94
94
  border-radius: var(--odx-v-border-radius-controls);
@@ -121,8 +121,8 @@ $form-field-inner-padding: math.div(8, 24);
121
121
  &::placeholder {
122
122
  @include typography.font-weight(normal);
123
123
 
124
- color: var(--odx-input-control-placeholder-color);
125
- opacity: 1;
124
+ color: var(--odx-input-control-color);
125
+ opacity: 0.65;
126
126
  }
127
127
  }
128
128
 
@@ -169,6 +169,10 @@ $form-field-inner-padding: math.div(8, 24);
169
169
 
170
170
  #{$control-selector} {
171
171
  @include utils.non-interactive;
172
+
173
+ &::placeholder {
174
+ color: var(--odx-input-control-color-disabled);
175
+ }
172
176
  }
173
177
  }
174
178
 
@@ -190,9 +194,9 @@ $form-field-inner-padding: math.div(8, 24);
190
194
  }
191
195
  }
192
196
 
193
- .odx-form-group,
194
- .odx-form-field {
195
- &.is-readonly .odx-form-field__info {
197
+ .odx-form-field.is-readonly,
198
+ .odx-form-group:has(.odx-form-field.is-readonly) {
199
+ .odx-form-field__info {
196
200
  @include utils.non-interactive();
197
201
 
198
202
  opacity: 0;
@@ -24,7 +24,7 @@
24
24
 
25
25
  &__title {
26
26
  @extend .odx-title;
27
- @extend .odx-title--6;
27
+ @extend .odx-title-6;
28
28
  @include typography.prevent-text-overflow();
29
29
  }
30
30
 
@@ -0,0 +1,101 @@
1
+ @use 'sass:math';
2
+ @use '../abstract/dimensions';
3
+ @use '../abstract/utils';
4
+ @use '../abstract/motion';
5
+ @use '../abstract/typography';
6
+
7
+ .odx-list-item {
8
+ $root: &;
9
+
10
+ @include dimensions.padding-x(math.div(1, 3));
11
+ @include dimensions.line-height(2, 1);
12
+ @include motion.transition(border-bottom-color background-color outline-color color);
13
+ @include typography.prevent-text-overflow();
14
+ @include utils.interactive(false);
15
+ @include utils.vertical-center-content();
16
+
17
+ border-radius: var(--odx-v-border-radius);
18
+ gap: dimensions.get-size(math.div(1, 3));
19
+ position: relative;
20
+
21
+ > [odxListSuffix] {
22
+ margin-left: auto;
23
+ }
24
+
25
+ &:not(.is-disabled) {
26
+ cursor: pointer;
27
+ }
28
+
29
+ &::before {
30
+ @include motion.transition(border-color);
31
+
32
+ border-bottom: 1px solid var(--gray-200);
33
+ bottom: 0;
34
+ content: '';
35
+ display: block;
36
+ position: absolute;
37
+ width: calc(100% - #{dimensions.get-size(math.div(2, 3))});
38
+ }
39
+
40
+ &:hover,
41
+ &:focus-visible,
42
+ &:last-child {
43
+ &::before {
44
+ border-bottom-color: transparent;
45
+ }
46
+ }
47
+
48
+ &:hover {
49
+ background-color: var(--blue-700-5);
50
+ }
51
+
52
+ &.is-disabled {
53
+ color: var(--odx-input-control-color-disabled);
54
+ pointer-events: none;
55
+ }
56
+
57
+ &--danger {
58
+ --odx-c-focus: var(--odx-c-danger);
59
+
60
+ @include utils.with-outline-bold;
61
+
62
+ background-color: var(--odx-c-danger);
63
+ color: var(--odx-c-danger-text);
64
+
65
+ &::before {
66
+ border-bottom-color: transparent;
67
+ }
68
+
69
+ &:hover {
70
+ background-color: var(--odx-c-danger-hover);
71
+ }
72
+
73
+ &.is-disabled {
74
+ color: var(--odx-c-danger-text-disabled);
75
+ }
76
+ }
77
+
78
+ &--selected {
79
+ background-color: var(--odx-c-selected);
80
+
81
+ &::before {
82
+ border-bottom-color: transparent;
83
+ }
84
+
85
+ &:hover {
86
+ background-color: var(--odx-c-selected-hover);
87
+ }
88
+
89
+ &#{$root}--danger {
90
+ background-color: var(--odx-c-danger-active);
91
+
92
+ &:hover {
93
+ background-color: var(--red-800);
94
+ }
95
+
96
+ &.is-disabled {
97
+ color: var(--odx-c-danger-text);
98
+ }
99
+ }
100
+ }
101
+ }
@@ -0,0 +1,3 @@
1
+ .odx-list {
2
+ display: block;
3
+ }
@@ -16,7 +16,7 @@
16
16
  @include dimensions.height(3, math.div(7, 3));
17
17
  @include dimensions.padding-x(math.div(2, 3));
18
18
  @include motion.transition(color background-color outline);
19
- @include utils.interactive();
19
+ @include utils.interactive(false);
20
20
  @include utils.vertical-center-content();
21
21
  @include typography.font-weight(medium);
22
22
  @include typography.prevent-text-overflow();
@@ -15,7 +15,6 @@
15
15
  display: block;
16
16
  height: 100%;
17
17
  left: 0;
18
- overflow: auto;
19
18
  overscroll-behavior: contain;
20
19
  position: fixed;
21
20
  top: 0;
@@ -27,8 +26,13 @@
27
26
  --odx-modal-margin-x: #{dimensions.get-size(1)};
28
27
  }
29
28
 
29
+ &--sidesheet {
30
+ backdrop-filter: unset;
31
+ background-color: unset;
32
+ }
33
+
30
34
  &__container {
31
- @include dimensions.padding-x(math.div(16, 24));
35
+ @include dimensions.padding-x(1);
32
36
 
33
37
  background-color: var(--odx-c-background-content);
34
38
  border-radius: var(--odx-v-border-radius);
@@ -47,6 +51,14 @@
47
51
  #{$root}--large & {
48
52
  --odx-modal-max-width: #{dimensions.get-size(50)};
49
53
  }
54
+
55
+ #{$root}--sidesheet & {
56
+ height: 100%;
57
+ left: unset;
58
+ margin-right: dimensions.get-size(0.5);
59
+ max-height: calc(100vh - var(--odx-modal-margin-y) - #{dimensions.get-size(1)});
60
+ right: 0;
61
+ }
50
62
  }
51
63
 
52
64
  &__header,
@@ -73,6 +85,10 @@
73
85
 
74
86
  display: block;
75
87
  overflow: auto;
88
+
89
+ #{$root}--sidesheet & {
90
+ flex: 1;
91
+ }
76
92
  }
77
93
 
78
94
  &__footer {
@@ -0,0 +1,60 @@
1
+ @use 'sass:math';
2
+ @use '../abstract/dimensions';
3
+ @use '../abstract/motion';
4
+ @use '../abstract/typography';
5
+ @use '../abstract/breakpoints';
6
+ @use '../abstract//utils';
7
+
8
+ .odx-rail-navigation-item {
9
+ @include motion.transition(outline-color background-color color);
10
+ @include dimensions.padding(math.div(8, 24));
11
+ @include utils.interactive(false);
12
+
13
+ align-items: center;
14
+ background-color: unset;
15
+ border-radius: dimensions.get-size(math.div(3, 24));
16
+ box-sizing: border-box;
17
+ display: flex;
18
+ text-align: left;
19
+
20
+ &:hover {
21
+ background-color: var(--blue-700-5);
22
+ }
23
+
24
+ &.is-selected {
25
+ background-color: var(--odx-c-selected);
26
+
27
+ &:hover {
28
+ background-color: var(--odx-c-selected-hover);
29
+ }
30
+ }
31
+
32
+ &.is-disabled {
33
+ background-color: transparent;
34
+ color: var(--odx-input-control-color-disabled);
35
+ pointer-events: none;
36
+ }
37
+
38
+ &__container {
39
+ @include typography.prevent-text-overflow();
40
+ @include motion.transition(width padding-left opacity);
41
+
42
+ opacity: 0;
43
+ overflow: hidden;
44
+ padding-left: 0;
45
+ width: 0;
46
+
47
+ .odx-rail-navigation.is-open & {
48
+ &:not(:empty) {
49
+ @include dimensions.padding(math.div(8, 24), left);
50
+
51
+ opacity: 1;
52
+ width: calc(var(--odx-rail-navigation-max-width) - dimensions.get-size(math.div(64, 24)));
53
+ }
54
+ }
55
+ }
56
+
57
+ > .odx-icon {
58
+ margin: 0;
59
+ }
60
+ }
@@ -0,0 +1,32 @@
1
+ @use 'sass:math';
2
+ @use '../abstract/dimensions';
3
+ @use '../abstract/motion';
4
+ @use '../abstract/breakpoints';
5
+
6
+ .odx-rail-navigation {
7
+ --odx-rail-navigation-max-width: 230px;
8
+
9
+ @include motion.transition(max-width);
10
+
11
+ align-items: flex-start;
12
+ display: inline-flex;
13
+ flex-direction: column;
14
+ height: 100%;
15
+ justify-content: space-between;
16
+ padding: dimensions.get-size(1) dimensions.get-size(math.div(8, 24));
17
+
18
+ &__expand > .odx-icon {
19
+ @include motion.transition(transform);
20
+ }
21
+
22
+ &__content {
23
+ display: flex;
24
+ flex-direction: column;
25
+ gap: dimensions.get-size(math.div(12, 24));
26
+ overflow: auto;
27
+ }
28
+
29
+ &.is-open &__expand > .odx-icon {
30
+ transform: rotateY(180deg);
31
+ }
32
+ }
@@ -91,8 +91,7 @@
91
91
  content: '';
92
92
  display: block;
93
93
  height: $track-size;
94
- outline: var(--odx-v-outline);
95
- outline-color: var(--odx-c-background-content);
94
+ outline: 1px solid var(--odx-c-background-content);
96
95
  position: absolute;
97
96
  top: calc(#{$track-size} / -2 + 50%);
98
97
  transform: translateX(-1px);
@@ -4,6 +4,7 @@
4
4
  @use '../abstract/utils';
5
5
 
6
6
  .odx-toggle-button-group {
7
+ $root: &;
7
8
  @include dimensions.height(2, 1.5);
8
9
  @include dimensions.padding-x(math.div(6, 24));
9
10
  @include motion.transition(background-color);
@@ -11,7 +12,39 @@
11
12
  @include utils.with-outline();
12
13
 
13
14
  border-radius: var(--odx-v-border-radius-controls);
15
+ color: var(--odx-control-color);
14
16
  column-gap: dimensions.get-size(math.div(6, 24));
17
+ position: relative;
18
+
19
+ &__indicator {
20
+ @include dimensions.height(2, 1);
21
+ @include utils.with-outline();
22
+
23
+ background-color: var(--odx-c-highlight);
24
+ border-radius: 2px;
25
+
26
+ #{$root}.is-disabled & {
27
+ background-color: var(--odx-control-background-color-disabled);
28
+ }
29
+
30
+ #{$root}.is-readonly & {
31
+ background-color: var(--odx-control-background-color-readonly);
32
+ outline-color: var(--odx-control-outline-color-readonly);
33
+ }
34
+
35
+ #{$root}.is-readonly.is-disabled & {
36
+ background-color: transparent;
37
+ outline-color: var(--odx-control-color-disabled);
38
+ }
39
+
40
+ #{$root}:focus-within:has(:focus-visible) & {
41
+ outline-color: var(--odx-control-outline-color-selected-focus);
42
+ }
43
+ }
44
+
45
+ .odx-toggle-button {
46
+ z-index: 1;
47
+ }
15
48
 
16
49
  &.has-error:not(.is-disabled, .is-readonly) {
17
50
  background-color: var(--odx-c-error);
@@ -5,46 +5,31 @@
5
5
  @use '../abstract/utils';
6
6
 
7
7
  .odx-toggle-button {
8
- @include dimensions.height(1);
9
- @include motion.transition(background-color color outline);
8
+ @include dimensions.line-height(1.5, 1);
9
+ @include motion.transition(background-color color);
10
10
  @include typography.font-size(0);
11
- @include utils.interactive($focus-within: true);
11
+ @include utils.vertical-center-content();
12
12
 
13
- border-radius: 1px;
14
- color: var(--odx-control-color);
15
- display: block;
16
- display: inline-flex;
13
+ color: currentcolor;
14
+ cursor: pointer;
17
15
  overflow: hidden;
18
- vertical-align: top;
16
+ user-select: none;
19
17
 
20
- &.is-active,
21
- &.is-active:focus-within {
22
- --odx-c-focus-outline: var(--cyan-700);
23
-
24
- background-color: var(--odx-control-background-color-selected);
18
+ &.is-active {
25
19
  color: var(--odx-control-color-selected);
26
20
  }
27
21
 
28
- &.is-disabled {
29
- background-color: transparent;
30
- color: var(--odx-input-control-color-disabled);
31
- }
32
-
33
22
  &.is-readonly {
34
- background-color: var(--odx-control-background-color-readonly);
35
23
  color: var(--odx-control-color-readonly);
36
- cursor: default;
37
24
  }
38
25
 
39
- &.is-active.is-disabled {
40
- background-color: var(--odx-control-background-color-disabled);
26
+ &.is-disabled {
41
27
  color: var(--odx-control-color-disabled);
42
28
  }
43
29
 
44
- &.is-active.is-readonly {
45
- background-color: var(--odx-control-background-color-readonly);
46
- color: var(--odx-control-color-readonly);
47
- outline-color: var(--odx-control-outline-color-readonly);
30
+ &.is-disabled,
31
+ &.is-readonly {
32
+ pointer-events: none;
48
33
  }
49
34
 
50
35
  &__label {
package/scss/core.scss CHANGED
@@ -18,6 +18,13 @@ Layout
18
18
  @use 'layout/layout';
19
19
  @use 'layout/helpers';
20
20
  @use 'layout/typography';
21
+ @use 'layout/text-list';
22
+ @use 'layout/content';
23
+
24
+ /*
25
+ CDK
26
+ */
27
+ @use 'cdk/active-indicator';
21
28
 
22
29
  /*
23
30
  Components
@@ -39,6 +46,8 @@ Layout
39
46
  @use 'components/header.component';
40
47
  @use 'components/icon.component';
41
48
  @use 'components/link.component';
49
+ @use 'components/list.component';
50
+ @use 'components/list-item.component';
42
51
  @use 'components/loading-spinner.component.scss';
43
52
  @use 'components/logo.component';
44
53
  @use 'components/main-menu.component';
@@ -46,6 +55,8 @@ Layout
46
55
  @use 'components/progress.component';
47
56
  @use 'components/radio-button.component';
48
57
  @use 'components/radio-group.component';
58
+ @use 'components/rail-navigation.component';
59
+ @use 'components/rail-navigation-item.component';
49
60
  @use 'components/switch.component.scss';
50
61
  @use 'components/toggle-button.component';
51
62
  @use 'components/toggle-button-group.component';
@@ -0,0 +1,20 @@
1
+ @use './typography' as *;
2
+ @use './text-list' as *;
3
+
4
+ .odx-content {
5
+ @for $i from 1 through 6 {
6
+ h#{$i} {
7
+ @extend .odx-title;
8
+ @extend .odx-title-#{$i};
9
+ }
10
+ }
11
+
12
+ p {
13
+ @extend .odx-text;
14
+ }
15
+
16
+ ol,
17
+ ul {
18
+ @extend .odx-text-list;
19
+ }
20
+ }
@@ -58,22 +58,6 @@ html body {
58
58
  border: 0;
59
59
  }
60
60
 
61
- ul,
62
- ol,
63
- .odx-text-list {
64
- @include dimensions.margin-y(0.5);
65
- @include dimensions.padding(1, left);
66
-
67
- ul,
68
- ol {
69
- @include dimensions.margin(0);
70
- }
71
-
72
- li {
73
- @include dimensions.margin(math.div(-1, 24), left);
74
- }
75
- }
76
-
77
61
  .odx-fs-normal {
78
62
  @include typography.font-weight(normal);
79
63
  }
@@ -0,0 +1,18 @@
1
+ @use 'sass:math';
2
+ @use '../abstract/dimensions';
3
+
4
+ .odx-text-list,
5
+ .odx-text-list ol,
6
+ .odx-text-list ul {
7
+ @include dimensions.margin-y(0.5);
8
+ @include dimensions.padding(1, left);
9
+
10
+ ul,
11
+ ol {
12
+ @include dimensions.margin(0);
13
+ }
14
+
15
+ li {
16
+ @include dimensions.margin(math.div(-1, 24), left);
17
+ }
18
+ }
@@ -34,25 +34,21 @@ html body {
34
34
  font-weight: var(--odx-typography-font-weight-normal);
35
35
  }
36
36
 
37
- h1,
38
- h2,
39
- h3,
40
- h4,
41
- h5,
42
- h6,
43
37
  .odx-title,
44
- .odx-subtitle {
38
+ [class*='odx-title-'] {
45
39
  @include typography.font-weight(bold);
46
40
 
47
41
  color: var(--odx-c-headline);
48
42
  }
49
43
 
50
- .odx-subtitle {
51
- font-weight: var(--odx-typography-font-weight-normal);
44
+ .odx-subtitle,
45
+ [class*='odx-subtitle-'] {
46
+ @extend .odx-title;
47
+ @include typography.font-weight(normal);
52
48
  }
53
49
 
54
- h1,
55
- .odx-title--1 {
50
+ .odx-title-1,
51
+ .odx-subtitle-1 {
56
52
  @include dimensions.line-height(2, math.div(40, 24));
57
53
  @include typography.font-size(5);
58
54
 
@@ -61,8 +57,8 @@ h1,
61
57
  }
62
58
  }
63
59
 
64
- h2,
65
- .odx-title--2 {
60
+ .odx-title-2,
61
+ .odx-subtitle-2 {
66
62
  @include dimensions.line-height(2, 1.5);
67
63
  @include typography.font-size(4);
68
64
 
@@ -71,8 +67,8 @@ h2,
71
67
  }
72
68
  }
73
69
 
74
- h3,
75
- .odx-title--3 {
70
+ .odx-title-3,
71
+ .odx-subtitle-3 {
76
72
  @include dimensions.line-height(2, math.div(32, 24));
77
73
  @include typography.font-size(3);
78
74
 
@@ -81,25 +77,24 @@ h3,
81
77
  }
82
78
  }
83
79
 
84
- h4,
85
- .odx-title--4 {
80
+ .odx-title-4,
81
+ .odx-subtitle-4 {
86
82
  @include dimensions.line-height(2, math.div(30, 24));
87
83
  @include typography.font-size(2);
88
84
  }
89
85
 
90
- h5,
91
- .odx-title--5 {
86
+ .odx-title-5,
87
+ .odx-subtitle-5 {
92
88
  @include dimensions.line-height(1);
93
89
  @include typography.font-size(1);
94
90
  }
95
91
 
96
- h6,
97
- .odx-title--6 {
92
+ .odx-title-6,
93
+ .odx-subtitle-6 {
98
94
  @include dimensions.line-height(1);
99
95
  @include typography.font-size(0);
100
96
  }
101
97
 
102
- p,
103
98
  .odx-text {
104
99
  @include dimensions.line-height(1);
105
100
 
package/scss/reset.scss CHANGED
@@ -5,6 +5,10 @@
5
5
 
6
6
  * {
7
7
  box-sizing: border-box;
8
+
9
+ &:focus-visible {
10
+ outline: none;
11
+ }
8
12
  }
9
13
 
10
14
  html,