@odx/ui 1.0.0-rc.1 → 1.0.0-rc.2

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 (62) hide show
  1. package/LICENSE +1 -0
  2. package/README.md +32 -0
  3. package/core-theme.css +1 -1
  4. package/package.json +6 -8
  5. package/scss/{modules → abstract}/_breakpoints.scss +11 -11
  6. package/scss/{modules/_vertical-rythm.scss → abstract/_dimensions.scss} +28 -26
  7. package/scss/abstract/_index.scss +5 -0
  8. package/scss/abstract/_motion.scss +10 -0
  9. package/scss/abstract/_typography.scss +25 -0
  10. package/scss/abstract/_utils.scss +114 -0
  11. package/scss/components/accordion-item.component.scss +59 -0
  12. package/scss/components/accordion.component.scss +3 -0
  13. package/scss/components/{action-group/action-group.component.scss → action-group.component.scss} +10 -6
  14. package/scss/components/{area-header/area-header.component.scss → area-header.component.scss} +28 -27
  15. package/scss/components/{avatar/avatar.component.scss → avatar.component.scss} +13 -13
  16. package/scss/components/{badge/badge.component.scss → badge.component.scss} +10 -10
  17. package/scss/components/button-group.component.scss +98 -0
  18. package/scss/components/button.component.scss +123 -0
  19. package/scss/components/checkbox.component.scss +116 -0
  20. package/scss/components/content-box.component.scss +50 -0
  21. package/scss/components/form-field.component.scss +204 -0
  22. package/scss/components/header.component.scss +40 -0
  23. package/scss/components/icon.component.scss +35 -0
  24. package/scss/components/{link/link.component.scss → link.component.scss} +6 -4
  25. package/scss/components/{logo/logo.component.scss → logo.component.scss} +5 -4
  26. package/scss/components/main-menu-button.component.scss +7 -0
  27. package/scss/components/{main-menu/components/main-menu-item.component.scss → main-menu-item.component.scss} +13 -12
  28. package/scss/components/{main-menu/main-menu.component.scss → main-menu.component.scss} +35 -28
  29. package/scss/components/modal.component.scss +85 -0
  30. package/scss/components/radio-button.component.scss +120 -0
  31. package/scss/components/radio-group.component.scss +14 -0
  32. package/scss/components/switch.component.scss +163 -0
  33. package/scss/components/toggle-button-group.component.scss +25 -0
  34. package/scss/components/toggle-button.component.scss +55 -0
  35. package/scss/core.scss +34 -30
  36. package/scss/layout/_base.scss +29 -0
  37. package/scss/layout/_helpers.scss +95 -0
  38. package/scss/{modules → layout}/_layout.scss +96 -46
  39. package/scss/layout/_typography.scss +117 -0
  40. package/scss/{base/_reset.scss → reset.scss} +25 -5
  41. package/scss/variables/_color-palettes.scss +57 -54
  42. package/scss/variables/_colors.scss +12 -15
  43. package/scss/variables/_controls.scss +48 -0
  44. package/scss/variables/_index.scss +6 -0
  45. package/scss/variables/_typography.scss +18 -0
  46. package/scss/variables/_vertical-rythm.scss +3 -0
  47. package/scss/variables/_visuals.scss +12 -7
  48. package/core-icons.css +0 -13
  49. package/scss/_helpers.scss +0 -15
  50. package/scss/base/_mixins.scss +0 -3
  51. package/scss/base/_utils.scss +0 -19
  52. package/scss/base/mixins/_container.scss +0 -31
  53. package/scss/base/mixins/_control.scss +0 -50
  54. package/scss/base/mixins/_transition.scss +0 -10
  55. package/scss/components/button/button.component.scss +0 -94
  56. package/scss/components/checkbox/checkbox.component.scss +0 -130
  57. package/scss/components/content-box/content-box.component.scss +0 -50
  58. package/scss/components/header/header.component.scss +0 -39
  59. package/scss/components/icon/icon.component.scss +0 -38
  60. package/scss/components/main-menu/components/main-menu-button.component.scss +0 -7
  61. package/scss/components/radio-group/_radio-group.component.scss +0 -145
  62. package/scss/modules/_typography.scss +0 -161
@@ -1,145 +0,0 @@
1
- @use 'sass:math';
2
- @use '../../modules/vertical-rythm' as vr;
3
- @use '../../modules/typography' as t;
4
- @use '../../base/mixins' as mx;
5
-
6
- :root {
7
- --odx-radio-button-color: var(--odx-c-highlight-text);
8
- --odx-radio-button-color-disabled: var(--odx-c-control-text-disabled);
9
-
10
- --odx-radio-button-background-color: var(--odx-c-control);
11
- --odx-radio-button-background-color-active: var(--odx-c-highlight);
12
- --odx-radio-button-background-color-disabled: var(--odx-c-control-disabled);
13
- --odx-radio-button-background-color-readonly: var(--white);
14
-
15
- --odx-radio-button-border-color: var(--odx-c-control-disabled);
16
- --odx-radio-button-border-color-active: var(--odx-c-highlight);
17
- --odx-radio-button-border-color-hover: var(--odx-c-control-hover);
18
- --odx-radio-button-border-color-readonly: var(--odx-c-control-disabled);
19
-
20
- --odx-radio-button-label-color: var(--odx-c-text);
21
- --odx-radio-button-label-color-disabled: var(--odx-c-text-disabled);
22
- }
23
-
24
- .odx-radio-group {
25
- @include vr.padding-y(0.5);
26
-
27
- display: block;
28
-
29
- &--horizontal {
30
- column-gap: vr.get-size(0.5);
31
- display: flex;
32
- flex-wrap: wrap;
33
- }
34
- }
35
-
36
- .odx-radio-button {
37
- $root: &;
38
-
39
- color: var(--odx-radio-button-label-color);
40
- display: block;
41
-
42
- &.is-disabled,
43
- &.is-readonly {
44
- @include mx.non-interactive();
45
- }
46
-
47
- &.is-disabled {
48
- color: var(--odx-radio-button-label-color-disabled);
49
- }
50
-
51
- &__label {
52
- @include mx.interactive($focus-within: true);
53
- @include vr.line-height(1);
54
- @include mx.transition(background-color color outline);
55
- @include t.font-size(0);
56
-
57
- border-radius: var(--odx-v-border-radius-controls);
58
- border-radius: vr.get-size(0.5);
59
- border-bottom-right-radius: var(--odx-v-border-radius-controls);
60
- border-top-right-radius: var(--odx-v-border-radius-controls);
61
- color: inherit;
62
- cursor: pointer;
63
- display: inline-flex;
64
- min-height: vr.get-size(1);
65
- padding: 0 2px;
66
- vertical-align: top;
67
- }
68
-
69
- &__input {
70
- @include mx.visually-hidden();
71
- }
72
-
73
- &__indicator {
74
- @include vr.container(1, math.div(20, 24));
75
- @include mx.transition(background-color border-color);
76
- @include mx.center-content();
77
-
78
- background-color: var(--odx-radio-button-background-color);
79
- border: 1px solid var(--odx-radio-button-border-color);
80
- border-radius: 50%;
81
- box-sizing: border-box;
82
- color: var(--odx-radio-button-color);
83
- flex: 0 0 auto;
84
-
85
- &::before {
86
- @include mx.transition(transform);
87
- @include vr.container(math.div(4, 24));
88
-
89
- background-color: currentcolor;
90
- border-radius: 50%;
91
- content: '';
92
- transform: scale(0);
93
- }
94
-
95
- #{$root}:hover & {
96
- border-color: var(--odx-radio-button-border-color-hover);
97
- }
98
-
99
- #{$root}__input:checked ~ & {
100
- background-color: var(--odx-radio-button-background-color-active);
101
- border-color: var(--odx-radio-button-border-color-active);
102
- }
103
-
104
- #{$root}.has-error & {
105
- background-color: var(--odx-c-error);
106
- border-color: var(--odx-c-error-outline);
107
- color: var(--odx-c-error-text);
108
- }
109
-
110
- #{$root}.has-error:hover & {
111
- border-color: var(--odx-c-error-outline-hover);
112
- }
113
-
114
- #{$root}.is-disabled & {
115
- background-color: var(--odx-radio-button-background-color-disabled);
116
- border-color: transparent;
117
- color: var(--odx-radio-button-color-disabled);
118
- }
119
-
120
- #{$root}.is-readonly & {
121
- background-color: var(--odx-radio-button-background-color-readonly);
122
- border-color: var(--odx-radio-button-border-color-readonly);
123
- color: inherit;
124
- }
125
- }
126
-
127
- &__content {
128
- @include vr.margin(0.5, left);
129
-
130
- padding-left: 2px;
131
-
132
- &:empty {
133
- margin: 0;
134
- padding: 0;
135
- }
136
- }
137
-
138
- &__input:checked ~ .odx-radio-button__indicator::before {
139
- transform: scale(1);
140
- }
141
-
142
- &--no-label .odx-radio-button__label {
143
- border-radius: vr.get-size(0.5);
144
- }
145
- }
@@ -1,161 +0,0 @@
1
- /* stylelint-disable block-closing-brace-newline-after */
2
- @use 'sass:math';
3
- @use 'breakpoints' as br;
4
- @use 'vertical-rythm' as vr;
5
- @use '../base/utils' as utils;
6
-
7
- $base-size: 16px;
8
- $base-line-height: 1.5;
9
-
10
- @mixin font-size($size: 1) {
11
- @if math.round($size) != $size {
12
- @error '$size must me an integer';
13
- }
14
-
15
- @if $size < 0 {
16
- font-size: calc(var(--odx-t-base-size) * utils.css-pow(var(--odx-t-negative-font-scaling-factor), $size));
17
- } @else {
18
- font-size: calc(var(--odx-t-base-size) * utils.css-pow(var(--odx-t-positive-font-scaling-factor), $size));
19
- }
20
- }
21
-
22
- @mixin prevent-text-overflow() {
23
- overflow: hidden;
24
- text-overflow: ellipsis;
25
- white-space: nowrap;
26
- }
27
-
28
- :root {
29
- --odx-t-base-size: #{$base-size};
30
- --odx-t-base-line-height: #{$base-line-height};
31
- --odx-t-font-weight-normal: normal;
32
- --odx-t-font-weight-medium: 500;
33
- --odx-t-font-weight-bold: bold;
34
- --odx-t-positive-font-scaling-factor: 1.125;
35
- --odx-t-negative-font-scaling-factor: 1.2;
36
-
37
- @include br.up(tablet) {
38
- --odx-t-positive-font-scaling-factor: 1.25;
39
- }
40
- }
41
-
42
- @font-face {
43
- font-family: Pangea;
44
- font-style: normal;
45
- font-weight: normal;
46
- src: url('../assets/fonts/PangeaText-RegularWeb.woff2') format('woff2');
47
- }
48
-
49
- @font-face {
50
- font-family: Pangea;
51
- font-style: normal;
52
- font-weight: 500;
53
- src: url('../assets/fonts/PangeaText-MediumWeb.woff2') format('woff2');
54
- }
55
-
56
- @font-face {
57
- font-family: Pangea;
58
- font-style: normal;
59
- font-weight: bold;
60
- src: url('../assets/fonts/PangeaText-SemiBoldWeb.woff2') format('woff2');
61
- }
62
-
63
- html body {
64
- @include font-size(0);
65
- @include vr.line-height(1);
66
-
67
- color: var(--odx-c-text);
68
- font-family: Pangea, sans-serif;
69
- font-weight: var(--odx-t-font-weight-normal);
70
- }
71
-
72
- h1,
73
- h2,
74
- h3,
75
- h4,
76
- h5,
77
- h6,
78
- .odx-title,
79
- .odx-subtitle {
80
- color: var(--odx-c-headline);
81
- font-weight: var(--odx-t-font-weight-bold);
82
- }
83
-
84
- .odx-subtitle {
85
- font-weight: var(--odx-t-font-weight-normal);
86
- }
87
-
88
- h1,
89
- .odx-title--1 {
90
- @include font-size(5);
91
- @include vr.line-height(2, math.div(40, 24));
92
-
93
- @include br.up(tablet) {
94
- @include vr.line-height(3, math.div(64, 24));
95
- }
96
- }
97
-
98
- h2,
99
- .odx-title--2 {
100
- @include font-size(4);
101
- @include vr.line-height(2, 1.5);
102
-
103
- @include br.up(tablet) {
104
- @include vr.line-height(3, math.div(54, 24));
105
- }
106
- }
107
-
108
- h3,
109
- .odx-title--3 {
110
- @include font-size(3);
111
- @include vr.line-height(2, math.div(32, 24));
112
-
113
- @include br.up(tablet) {
114
- @include vr.line-height(2, math.div(42, 24));
115
- }
116
- }
117
-
118
- h4,
119
- .odx-title--4 {
120
- @include font-size(2);
121
- @include vr.line-height(2, math.div(30, 24));
122
- }
123
-
124
- h5,
125
- .odx-title--5 {
126
- @include font-size(1);
127
- @include vr.line-height(1);
128
- }
129
-
130
- h6,
131
- .odx-title--6 {
132
- @include font-size(0);
133
- @include vr.line-height(1);
134
- }
135
-
136
- p,
137
- .odx-text {
138
- @include vr.line-height(1);
139
-
140
- font-weight: var(--odx-t-font-weight-normal);
141
-
142
- &--small {
143
- @include font-size(-1);
144
- @include vr.line-height(1, math.div(20, 24));
145
- }
146
-
147
- &--xsmall {
148
- @include font-size(-2);
149
- @include vr.line-height(1, math.div(16, 24));
150
- }
151
- }
152
-
153
- .odx-fs-normal {
154
- font-weight: var(--odx-t-font-weight-normal);
155
- }
156
-
157
- b,
158
- strong,
159
- .odx-fs-bold {
160
- font-weight: var(--odx-t-font-weight-bold);
161
- }