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

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.
Files changed (31) hide show
  1. package/core-theme.css +1 -1
  2. package/package.json +1 -1
  3. package/scss/abstract/_utils.scss +7 -2
  4. package/scss/cdk/active-indicator.scss +25 -0
  5. package/scss/components/accordion-item.component.scss +5 -8
  6. package/scss/components/area-header.component.scss +6 -6
  7. package/scss/components/button.component.scss +3 -1
  8. package/scss/components/checkbox.component.scss +1 -1
  9. package/scss/components/form-field.component.scss +11 -7
  10. package/scss/components/header.component.scss +1 -1
  11. package/scss/components/list-item.component.scss +106 -0
  12. package/scss/components/list.component.scss +3 -0
  13. package/scss/components/main-menu-item.component.scss +1 -1
  14. package/scss/components/modal.component.scss +18 -2
  15. package/scss/components/radio-button.component.scss +1 -1
  16. package/scss/components/rail-navigation-item.component.scss +60 -0
  17. package/scss/components/rail-navigation.component.scss +32 -0
  18. package/scss/components/slider.component.scss +130 -0
  19. package/scss/components/switch.component.scss +2 -3
  20. package/scss/components/toggle-button-group.component.scss +42 -5
  21. package/scss/components/toggle-button.component.scss +42 -28
  22. package/scss/core.scss +12 -0
  23. package/scss/layout/_content.scss +20 -0
  24. package/scss/layout/_helpers.scss +0 -16
  25. package/scss/layout/_text-list.scss +18 -0
  26. package/scss/layout/_typography.scss +17 -22
  27. package/scss/reset.scss +4 -0
  28. package/scss/variables/_color-palettes.scss +0 -1
  29. package/scss/variables/_colors.scss +3 -0
  30. package/scss/variables/_controls.scss +1 -2
  31. package/scss/variables/_visuals.scss +3 -3
@@ -5,51 +5,65 @@
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
+ $root: &;
9
+
10
+ @include dimensions.line-height(1.5, 1);
11
+ @include motion.transition(color);
10
12
  @include typography.font-size(0);
11
- @include utils.interactive($focus-within: true);
13
+ @include typography.font-weight(medium);
14
+ @include utils.vertical-center-content();
12
15
 
13
- border-radius: 1px;
14
- color: var(--odx-control-color);
15
- display: block;
16
- display: inline-flex;
16
+ color: currentcolor;
17
17
  overflow: hidden;
18
- vertical-align: top;
19
-
20
- &.is-active,
21
- &.is-active:focus-within {
22
- --odx-c-focus-outline: var(--cyan-700);
18
+ user-select: none;
23
19
 
24
- background-color: var(--odx-control-background-color-selected);
25
- color: var(--odx-control-color-selected);
20
+ &.is-active {
21
+ color: var(--odx-c-highlight-text);
26
22
  }
27
23
 
28
- &.is-disabled {
29
- background-color: transparent;
30
- color: var(--odx-input-control-color-disabled);
24
+ &.is-readonly {
25
+ color: inherit;
31
26
  }
32
27
 
33
- &.is-readonly {
34
- background-color: var(--odx-control-background-color-readonly);
35
- color: var(--odx-control-color-readonly);
36
- cursor: default;
28
+ &.is-disabled {
29
+ color: var(--odx-control-color-disabled);
37
30
  }
38
31
 
39
32
  &.is-active.is-disabled {
40
- background-color: var(--odx-control-background-color-disabled);
41
- color: var(--odx-control-color-disabled);
33
+ color: var(--odx-c-secondary-text-disabled);
42
34
  }
43
35
 
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);
36
+ &.is-disabled,
37
+ &.is-readonly {
38
+ pointer-events: none;
48
39
  }
49
40
 
50
41
  &__label {
42
+ @include motion.transition(background-color outline-color);
51
43
  @include dimensions.padding-x(math.div(1, 3));
52
44
 
53
- cursor: inherit;
45
+ border-radius: var(--odx-toggle-button-border-radius);
46
+ cursor: pointer;
47
+
48
+ #{$root}-group:not(.is-active) & {
49
+ @include utils.interactive($focus-within: true);
50
+
51
+ background-color: var(--blue-700-5);
52
+
53
+ &:hover {
54
+ background-color: var(--blue-700-10);
55
+ }
56
+ }
57
+
58
+ #{$root}-group.is-active &:hover {
59
+ background-color: var(--blue-700-5);
60
+ }
61
+
62
+ #{$root}.is-readonly &,
63
+ #{$root}.is-disabled &,
64
+ #{$root}-group.is-active &,
65
+ #{$root}-group.has-error & {
66
+ background-color: transparent;
67
+ }
54
68
  }
55
69
  }
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,9 @@ 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';
60
+ @use 'components/slider.component.scss';
49
61
  @use 'components/switch.component.scss';
50
62
  @use 'components/toggle-button.component';
51
63
  @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,
@@ -30,7 +30,6 @@
30
30
  --blue-700-5: #{rgba(#002766, 5%)};
31
31
  --blue-700-10: #{rgba(#002766, 10%)};
32
32
  --blue-700-15: #{rgba(#002766, 15%)};
33
- --blue-700-25: #{rgba(#002766, 25%)};
34
33
  --blue-800-30: #{rgba(#001433, 30%)};
35
34
 
36
35
  --cyan-50: #cbe9ff;
@@ -19,6 +19,9 @@
19
19
  --odx-c-focus: var(--cyan-500-15);
20
20
  --odx-c-focus-outline: var(--cyan-300);
21
21
 
22
+ --odx-c-selected: var(--cyan-500-15);
23
+ --odx-c-selected-hover: var(--cyan-500-20);
24
+
22
25
  --odx-c-selection: var(--cyan-300);
23
26
 
24
27
  --odx-c-backdrop: var(--white-60);
@@ -11,7 +11,7 @@
11
11
  --odx-control-background-color-selected: var(--odx-c-highlight);
12
12
  --odx-control-outline-color-selected: var(--odx-c-highlight);
13
13
 
14
- --odx-control-color-disabled: var(--gray-600);
14
+ --odx-control-color-disabled: var(--gray-500);
15
15
  --odx-control-background-color-disabled: var(--gray-100);
16
16
  --odx-control-outline-color-disabled: transparent;
17
17
 
@@ -27,7 +27,6 @@
27
27
  --odx-input-control-color: var(--odx-c-text);
28
28
  --odx-input-control-background-color: var(--gray-100);
29
29
  --odx-input-control-outline-color: var(--gray-200);
30
- --odx-input-control-placeholder-color: var(--blue-700-25);
31
30
 
32
31
  --odx-input-control-color-hover: var(--odx-c-text);
33
32
  --odx-input-control-background-color-hover: var(--gray-200);
@@ -5,10 +5,10 @@
5
5
  --odx-v-backdrop-blur: 3px;
6
6
  --odx-v-backdrop-box-shadow-layer-2: 0 4px 12px 0 var(--odx-c-backdrop-box-shadow);
7
7
 
8
- --odx-v-transition-duration: 200ms;
8
+ --odx-v-transition-duration: 250ms;
9
9
  --odx-v-transition-easing-fn: ease;
10
- --odx-v-outline: 1px solid transparent;
11
- --odx-v-outline-offset: -1px;
10
+ --odx-v-outline-width: 1px;
11
+ --odx-v-outline-width-bold: 2px;
12
12
 
13
13
  --odx-v-scrollbar-track-color: transparent;
14
14
  --odx-v-scrollbar-thumb-color: var(--gray-600);