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

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 (64) hide show
  1. package/323d385340fb9fee6450.svg +6 -0
  2. package/LICENSE +1 -0
  3. package/README.md +32 -0
  4. package/core-icons.css +37 -9
  5. package/core-icons.woff2 +0 -0
  6. package/core-theme.css +1 -1
  7. package/package.json +7 -8
  8. package/scss/{modules → abstract}/_breakpoints.scss +11 -11
  9. package/scss/{modules/_vertical-rythm.scss → abstract/_dimensions.scss} +28 -26
  10. package/scss/abstract/_index.scss +5 -0
  11. package/scss/abstract/_motion.scss +10 -0
  12. package/scss/abstract/_typography.scss +25 -0
  13. package/scss/abstract/_utils.scss +114 -0
  14. package/scss/components/accordion-item.component.scss +59 -0
  15. package/scss/components/accordion.component.scss +3 -0
  16. package/scss/components/{action-group/action-group.component.scss → action-group.component.scss} +10 -6
  17. package/scss/components/{area-header/area-header.component.scss → area-header.component.scss} +28 -27
  18. package/scss/components/{avatar/avatar.component.scss → avatar.component.scss} +13 -13
  19. package/scss/components/{badge/badge.component.scss → badge.component.scss} +10 -10
  20. package/scss/components/button-group.component.scss +98 -0
  21. package/scss/components/button.component.scss +123 -0
  22. package/scss/components/checkbox.component.scss +116 -0
  23. package/scss/components/content-box.component.scss +50 -0
  24. package/scss/components/form-field.component.scss +204 -0
  25. package/scss/components/header.component.scss +40 -0
  26. package/scss/components/icon.component.scss +35 -0
  27. package/scss/components/{link/link.component.scss → link.component.scss} +6 -4
  28. package/scss/components/{logo/logo.component.scss → logo.component.scss} +5 -4
  29. package/scss/components/main-menu-button.component.scss +7 -0
  30. package/scss/components/{main-menu/components/main-menu-item.component.scss → main-menu-item.component.scss} +13 -12
  31. package/scss/components/{main-menu/main-menu.component.scss → main-menu.component.scss} +35 -28
  32. package/scss/components/modal.component.scss +85 -0
  33. package/scss/components/radio-button.component.scss +120 -0
  34. package/scss/components/radio-group.component.scss +14 -0
  35. package/scss/components/switch.component.scss +163 -0
  36. package/scss/components/toggle-button-group.component.scss +25 -0
  37. package/scss/components/toggle-button.component.scss +55 -0
  38. package/scss/core.scss +34 -30
  39. package/scss/layout/_base.scss +29 -0
  40. package/scss/layout/_helpers.scss +95 -0
  41. package/scss/{modules → layout}/_layout.scss +96 -46
  42. package/scss/layout/_typography.scss +117 -0
  43. package/scss/{base/_reset.scss → reset.scss} +25 -5
  44. package/scss/variables/_color-palettes.scss +57 -54
  45. package/scss/variables/_colors.scss +12 -15
  46. package/scss/variables/_controls.scss +48 -0
  47. package/scss/variables/_index.scss +6 -0
  48. package/scss/variables/_typography.scss +18 -0
  49. package/scss/variables/_vertical-rythm.scss +3 -0
  50. package/scss/variables/_visuals.scss +12 -7
  51. package/scss/_helpers.scss +0 -15
  52. package/scss/base/_mixins.scss +0 -3
  53. package/scss/base/_utils.scss +0 -19
  54. package/scss/base/mixins/_container.scss +0 -31
  55. package/scss/base/mixins/_control.scss +0 -50
  56. package/scss/base/mixins/_transition.scss +0 -10
  57. package/scss/components/button/button.component.scss +0 -94
  58. package/scss/components/checkbox/checkbox.component.scss +0 -130
  59. package/scss/components/content-box/content-box.component.scss +0 -50
  60. package/scss/components/header/header.component.scss +0 -39
  61. package/scss/components/icon/icon.component.scss +0 -38
  62. package/scss/components/main-menu/components/main-menu-button.component.scss +0 -7
  63. package/scss/components/radio-group/_radio-group.component.scss +0 -145
  64. package/scss/modules/_typography.scss +0 -161
@@ -0,0 +1,18 @@
1
+ @use '../abstract/breakpoints';
2
+
3
+ :root {
4
+ --odx-typography-base-size: 16px;
5
+ --odx-typography-base-line-height: 1.5;
6
+ --odx-typography-font-weight-normal: normal;
7
+ --odx-typography-font-weight-normal-letter-spacing: 0;
8
+ --odx-typography-font-weight-medium: 500;
9
+ --odx-typography-font-weight-medium-letter-spacing: -0.19px;
10
+ --odx-typography-font-weight-bold: bold;
11
+ --odx-typography-font-weight-bold-letter-spacing: 0;
12
+ --odx-typography-positive-font-scaling-factor: 1.125;
13
+ --odx-typography-negative-font-scaling-factor: 1.2;
14
+
15
+ @include breakpoints.up(tablet) {
16
+ --odx-typography-positive-font-scaling-factor: 1.25;
17
+ }
18
+ }
@@ -0,0 +1,3 @@
1
+ :root {
2
+ --odx-vertical-rythm-base-size: calc(var(--odx-typography-base-line-height) * var(--odx-typography-base-size));
3
+ }
@@ -1,11 +1,16 @@
1
1
  :root {
2
- --odx-v-border-radius: calc(var(--odx-t-base-size) * 0.375);
3
- --odx-v-border-radius-controls: calc(var(--odx-t-base-size) * 0.19);
4
- // --odx-v-shadow-layer-1: 0 2px 6px 0 rgba(var(--blue-500), 0.4);
5
- // --odx-v-shadow-layer-2: 0 4px 12px 0 rgba(var(--blue-500), 0.3);
6
- // --odx-v-shadow-layer-3: 0 6px 18px 0 rgba(var(--blue-500), 0.2);
7
- // --odx-v-shadow-layer-4: 0 8px 24px 0 rgba(var(--blue-500), 0.1);
2
+ --odx-v-border-radius: calc(var(--odx-typography-base-size) * 0.375);
3
+ --odx-v-border-radius-controls: calc(var(--odx-typography-base-size) * 0.19);
4
+
5
+ --odx-v-backdrop-blur: 5px;
6
+ --odx-v-backdrop-box-shadow-layer-2: 0 4px 12px 0 var(--odx-c-backdrop-box-shadow);
7
+
8
8
  --odx-v-transition-duration: 200ms;
9
9
  --odx-v-transition-easing-fn: ease;
10
- --odx-v-focus-outline: 1px solid var(--odx-c-focus-outline);
10
+ --odx-v-outline: 1px solid transparent;
11
+ --odx-v-outline-offset: -1px;
12
+
13
+ --odx-v-scrollbar-track-color: transparent;
14
+ --odx-v-scrollbar-thumb-color: var(--gray-600);
15
+ --odx-v-scrollbar-thumb-color-hover: var(--gray-700);
11
16
  }
@@ -1,15 +0,0 @@
1
- @use 'sass:math';
2
- @use 'base/mixins' as mx;
3
- @use 'modules/vertical-rythm' as vr;
4
-
5
- .visually-hidden {
6
- @include mx.visually-hidden();
7
- }
8
-
9
- .seperator,
10
- hr {
11
- @include vr.height(1, math.div(1, 24));
12
-
13
- background-color: var(--odx-c-seperator);
14
- border: 0;
15
- }
@@ -1,3 +0,0 @@
1
- @forward 'mixins/container';
2
- @forward 'mixins/control';
3
- @forward 'mixins/transition';
@@ -1,19 +0,0 @@
1
- @use 'sass:math';
2
-
3
- @function css-pow($value, $exponent) {
4
- $css-value: 1;
5
-
6
- @if $exponent < 0 {
7
- @for $i from 1 through math.abs($exponent) {
8
- $css-value: $css-value + '*1/#{$value}';
9
- }
10
- }
11
-
12
- @if $exponent > 0 {
13
- @for $i from 1 through $exponent {
14
- $css-value: $css-value + '*#{$value}';
15
- }
16
- }
17
-
18
- @return calc(#{$css-value});
19
- }
@@ -1,31 +0,0 @@
1
- /* stylelint-disable block-closing-brace-newline-after */
2
- @mixin center-content($inline: false) {
3
- @if $inline {
4
- display: inline-flex;
5
- } @else {
6
- display: flex;
7
- }
8
-
9
- align-items: center;
10
- justify-content: center;
11
- }
12
-
13
- @mixin vertical-center-content($inline: false) {
14
- @if $inline {
15
- display: inline-flex;
16
- } @else {
17
- display: flex;
18
- }
19
-
20
- align-items: center;
21
- }
22
-
23
- @mixin horizontal-center-content($inline: false) {
24
- @if $inline {
25
- display: inline-flex;
26
- } @else {
27
- display: flex;
28
- }
29
-
30
- justify-content: center;
31
- }
@@ -1,50 +0,0 @@
1
- @mixin focus-state($with-background: true) {
2
- outline-color: var(--odx-c-focus-outline);
3
-
4
- @if $with-background {
5
- background-color: var(--odx-c-focus);
6
- }
7
- }
8
-
9
- @mixin interactive($with-background: true, $focus-within: false) {
10
- cursor: pointer;
11
- outline: var(--odx-v-focus-outline);
12
- outline-color: transparent;
13
- outline-offset: -1px;
14
- user-select: none;
15
-
16
- &:disabled,
17
- &.is-disabled {
18
- cursor: not-allowed;
19
- }
20
-
21
- @if $focus-within {
22
- &.has-focus {
23
- @include focus-state($with-background);
24
- }
25
-
26
- &:focus-within:has(:focus-visible) {
27
- @include focus-state($with-background);
28
- }
29
- } @else {
30
- &:focus-visible {
31
- @include focus-state($with-background);
32
- }
33
- }
34
- }
35
-
36
- @mixin non-interactive() {
37
- pointer-events: none;
38
- user-select: none;
39
- }
40
-
41
- @mixin visually-hidden() {
42
- appearance: none;
43
- height: 0;
44
- margin: 0;
45
- opacity: 0;
46
- outline: none !important;
47
- padding: 0;
48
- position: absolute;
49
- width: 0;
50
- }
@@ -1,10 +0,0 @@
1
- @mixin transition($properties, $delay: 0ms) {
2
- $props: ();
3
-
4
- @each $prop in $properties {
5
- $props: append($props, $prop, comma);
6
- }
7
-
8
- transition: all var(--odx-v-transition-duration) $delay var(--odx-v-transition-easing-fn);
9
- transition-property: $props;
10
- }
@@ -1,94 +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
- @use '../avatar/avatar.component' as ac;
6
-
7
- .odx-button {
8
- $variants: secondary, primary, highlight, success, danger, confirmation;
9
-
10
- @extend .odx-button--secondary;
11
- @include t.prevent-text-overflow();
12
- @include mx.transition(background-color color outline);
13
- @include mx.center-content(true);
14
- @include mx.interactive($with-background: false);
15
- @include vr.height(2, 1.5);
16
- @include vr.padding-x(0.5);
17
-
18
- border-radius: var(--odx-v-border-radius-controls);
19
- font-weight: var(--odx-t-font-weight-medium);
20
- min-width: vr.get-size(1.5);
21
- outline-width: 2px;
22
-
23
- &:not(:has(> .odx-icon, > .odx-avatar)) {
24
- min-width: vr.get-size(3);
25
- }
26
-
27
- > .odx-icon {
28
- @include vr.margin-x(-0.25);
29
- }
30
-
31
- > .odx-icon[alignLeft] {
32
- @include vr.margin(0.25, right);
33
- }
34
-
35
- > .odx-icon[alignRight] {
36
- @include vr.margin(0.25, left);
37
- }
38
-
39
- > .odx-avatar {
40
- @include vr.margin-x(-0.5);
41
- @include ac.avatar-size(2, math.div(32, 24), 0, 1);
42
- }
43
-
44
- &--highlight:focus-visible {
45
- outline-color: var(--blue-400);
46
- }
47
-
48
- @each $variant in $variants {
49
- &--#{$variant} {
50
- background-color: var(--odx-c-#{$variant});
51
- color: var(--odx-c-#{$variant}-text);
52
-
53
- &:hover {
54
- background-color: var(--odx-c-#{$variant}-hover);
55
- }
56
-
57
- &:active {
58
- background-color: var(--odx-c-#{$variant}-active);
59
- }
60
-
61
- &:disabled,
62
- &.is-disabled {
63
- background-color: var(--odx-c-#{$variant}-disabled);
64
- color: var(--odx-c-#{$variant}-text-disabled);
65
- }
66
- }
67
- }
68
-
69
- &--ghost {
70
- background-color: transparent;
71
- color: var(--odx-c-link);
72
- outline-width: 1px;
73
-
74
- &:hover {
75
- background-color: var(--blue-700-5);
76
- color: var(--odx-c-link-hover);
77
- }
78
-
79
- &:active {
80
- color: var(--odx-c-link-active);
81
- }
82
-
83
- &:focus-visible,
84
- &:active {
85
- background-color: var(--odx-c-focus);
86
- }
87
-
88
- &:disabled,
89
- &.is-disabled {
90
- background-color: transparent;
91
- color: var(--odx-c-link-disabled);
92
- }
93
- }
94
- }
@@ -1,130 +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
- @use '../../helpers';
6
-
7
- :root {
8
- --odx-checkbox-color: var(--odx-c-highlight-text);
9
- --odx-checkbox-color-disabled: var(--odx-c-control-text-disabled);
10
-
11
- --odx-checkbox-background-color: var(--odx-c-control);
12
- --odx-checkbox-background-color-active: var(--odx-c-highlight);
13
- --odx-checkbox-background-color-disabled: var(--odx-c-control-disabled);
14
- --odx-checkbox-background-color-readonly: var(--white);
15
-
16
- --odx-checkbox-border-color: var(--odx-c-control-disabled);
17
- --odx-checkbox-border-color-active: var(--odx-c-highlight);
18
- --odx-checkbox-border-color-hover: var(--odx-c-control-hover);
19
- --odx-checkbox-border-color-readonly: var(--odx-c-control-disabled);
20
-
21
- --odx-checkbox-label-color: var(--odx-c-text);
22
- --odx-checkbox-label-color-disabled: var(--odx-c-text-disabled);
23
- }
24
-
25
- .odx-checkbox {
26
- $root: &;
27
-
28
- color: var(--odx-checkbox-label-color);
29
- display: block;
30
-
31
- &.is-disabled,
32
- &.is-readonly {
33
- @include mx.non-interactive();
34
- }
35
-
36
- &.is-disabled {
37
- color: var(--odx-checkbox-label-color-disabled);
38
- }
39
-
40
- &__label {
41
- @include mx.interactive($focus-within: true);
42
- @include vr.line-height(1);
43
- @include mx.transition(background-color color outline);
44
- @include t.font-size(0);
45
-
46
- border-radius: var(--odx-v-border-radius-controls);
47
- color: inherit;
48
- cursor: pointer;
49
- display: inline-flex;
50
- min-height: vr.get-size(1);
51
- padding: 0 2px;
52
- vertical-align: top;
53
- }
54
-
55
- &__input {
56
- @extend .visually-hidden;
57
- }
58
-
59
- &__indicator {
60
- @include vr.container(1, math.div(20, 24));
61
- @include mx.transition(background-color border-color);
62
-
63
- background-color: var(--odx-checkbox-background-color);
64
- border: 1px solid var(--odx-checkbox-border-color);
65
- border-radius: var(--odx-v-border-radius-controls);
66
- box-sizing: border-box;
67
- color: var(--odx-checkbox-color);
68
- flex: 0 0 auto;
69
-
70
- > .odx-icon {
71
- $checkmark-size: math.div(18, 24);
72
- @include vr.container($checkmark-size);
73
-
74
- display: none;
75
- font-size: vr.get-size($checkmark-size);
76
- }
77
-
78
- #{$root}:hover & {
79
- border-color: var(--odx-checkbox-border-color-hover);
80
- }
81
-
82
- #{$root}.is-active &,
83
- #{$root}__input:indeterminate ~ &,
84
- #{$root}__input:checked ~ & {
85
- background-color: var(--odx-checkbox-background-color-active);
86
- border-color: var(--odx-checkbox-border-color-active);
87
- }
88
-
89
- #{$root}.has-error & {
90
- background-color: var(--odx-c-error);
91
- border-color: var(--odx-c-error-outline);
92
- color: var(--odx-c-error-text);
93
- }
94
-
95
- #{$root}.has-error:hover & {
96
- border-color: var(--odx-c-error-outline-hover);
97
- }
98
-
99
- #{$root}.is-disabled & {
100
- background-color: var(--odx-checkbox-background-color-disabled);
101
- border-color: transparent;
102
- color: var(--odx-checkbox-color-disabled);
103
- }
104
-
105
- #{$root}.is-readonly & {
106
- background-color: var(--odx-checkbox-background-color-readonly);
107
- border-color: var(--odx-checkbox-border-color-readonly);
108
- color: inherit;
109
- }
110
- }
111
-
112
- &__content {
113
- @include vr.margin(0.5, left);
114
-
115
- padding-left: 2px;
116
-
117
- &:empty {
118
- margin: 0;
119
- padding: 0;
120
- }
121
- }
122
-
123
- &.is-active,
124
- &__input:indeterminate,
125
- &__input:checked {
126
- ~ .odx-checkbox__indicator > .odx-icon {
127
- display: block;
128
- }
129
- }
130
- }
@@ -1,50 +0,0 @@
1
- @use '../../modules/breakpoints' as br;
2
- @use '../../modules/vertical-rythm' as vr;
3
-
4
- .odx-content-box {
5
- background-color: var(--odx-c-background-content);
6
- display: block;
7
-
8
- &__header,
9
- &__footer {
10
- align-items: center;
11
- display: flex;
12
- flex-wrap: wrap;
13
-
14
- > * {
15
- flex: 1 1 auto;
16
- }
17
- }
18
-
19
- &__header {
20
- @include vr.padding(1, ('top', 'right', 'left'));
21
- @include br.down(phone) {
22
- @include vr.padding(0.5, ('top', 'right', 'left'));
23
- }
24
- }
25
-
26
- &__footer {
27
- @include vr.padding(1, ('right', 'bottom', 'left'));
28
- @include br.down(phone) {
29
- @include vr.padding(0.5, ('right', 'bottom', 'left'));
30
- }
31
- }
32
-
33
- &__content {
34
- @include vr.padding(1);
35
- @include br.down(phone) {
36
- @include vr.padding(0.5);
37
- }
38
- }
39
-
40
- .odx-area-header ~ &__content {
41
- padding-top: 0;
42
- }
43
-
44
- .odx-area-header {
45
- @include vr.padding(1, ('top', 'bottom'));
46
- @include br.down(phone) {
47
- @include vr.padding(0.5, ('top', 'bottom'));
48
- }
49
- }
50
- }
@@ -1,39 +0,0 @@
1
- @use 'sass:math';
2
- @use '../../base/mixins' as mx;
3
- @use '../../modules/vertical-rythm' as vr;
4
- @use '../../modules/typography' as t;
5
-
6
- .odx-header {
7
- @include vr.padding(math.div(20, 24), 'left');
8
- @include vr.padding(0.5, 'right');
9
- @include vr.height(2);
10
- @include mx.vertical-center-content();
11
-
12
- background-color: var(--odx-c-background-content);
13
-
14
- .odx-main-menu-button {
15
- margin-left: vr.get-size(-1 * math.div(1, 3));
16
- margin-right: vr.get-size(0.5);
17
- }
18
-
19
- &__title,
20
- .odx-logo {
21
- margin-right: auto;
22
- }
23
-
24
- &__title {
25
- @extend .odx-title;
26
- @extend .odx-title--6;
27
- @include t.prevent-text-overflow();
28
- }
29
-
30
- .odx-action-group:not(:last-child) {
31
- border-right: 1px solid var(--odx-c-seperator);
32
- margin-right: vr.get-size(0.5);
33
- padding-right: vr.get-size(0.5);
34
- }
35
-
36
- &__title ~ .odx-logo {
37
- display: none;
38
- }
39
- }
@@ -1,38 +0,0 @@
1
- @use 'sass:math';
2
- @use '../../modules/vertical-rythm' as vr;
3
-
4
- $icon-sizes: (small math.div(2, 3) 1, large math.div(4, 3) 2);
5
-
6
- .odx-icon {
7
- @include vr.container(1);
8
-
9
- direction: ltr;
10
- display: inline-block;
11
- font-feature-settings: 'liga';
12
- font-size: vr.get-size(1);
13
- -moz-osx-font-smoothing: grayscale;
14
- -webkit-font-smoothing: antialiased;
15
- font-style: normal;
16
- font-weight: normal;
17
- letter-spacing: normal;
18
- line-height: 1;
19
- overflow: hidden;
20
- position: relative;
21
- text-rendering: auto;
22
- text-transform: none;
23
- white-space: nowrap;
24
-
25
- @each $size, $size_factor, $factor in $icon-sizes {
26
- &.odx-icon--#{$size} {
27
- @include vr.container($factor, $size_factor);
28
-
29
- font-size: vr.get-size($size_factor);
30
- }
31
- }
32
-
33
- &.odx-icon--inline {
34
- font-size: inherit;
35
- height: auto;
36
- width: auto;
37
- }
38
- }
@@ -1,7 +0,0 @@
1
- @use '../../button/button.component';
2
-
3
- .odx-main-menu-button {
4
- @extend .odx-button--ghost;
5
-
6
- color: var(--odx-c-control-text);
7
- }
@@ -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
- }