@odx/ui 1.0.0-rc.1 → 1.0.0-rc.10
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/323d385340fb9fee6450.svg +6 -0
- package/LICENSE +1 -0
- package/README.md +32 -0
- package/core-icons.css +39 -9
- package/core-icons.woff2 +0 -0
- package/core-theme.css +1 -1
- package/package.json +7 -8
- package/scss/{modules → abstract}/_breakpoints.scss +11 -11
- package/scss/{modules/_vertical-rythm.scss → abstract/_dimensions.scss} +29 -26
- package/scss/abstract/_index.scss +5 -0
- package/scss/abstract/_motion.scss +12 -0
- package/scss/abstract/_typography.scss +25 -0
- package/scss/abstract/_utils.scss +124 -0
- package/scss/cdk/active-indicator.scss +25 -0
- package/scss/cdk/connected-overlay.scss +36 -0
- package/scss/components/accordion-item.component.scss +56 -0
- package/scss/components/accordion.component.scss +3 -0
- package/scss/components/{action-group/action-group.component.scss → action-group.component.scss} +11 -7
- package/scss/components/{area-header/area-header.component.scss → area-header.component.scss} +33 -39
- package/scss/components/{avatar/avatar.component.scss → avatar.component.scss} +18 -13
- package/scss/components/{badge/badge.component.scss → badge.component.scss} +15 -24
- package/scss/components/bar.component.scss +86 -0
- package/scss/components/breadcrumbs.component.scss +26 -0
- package/scss/components/button-group.component.scss +99 -0
- package/scss/components/button.component.scss +129 -0
- package/scss/components/checkbox.component.scss +117 -0
- package/scss/components/chip.component.scss +52 -0
- package/scss/components/circular-progress.component.scss +75 -0
- package/scss/components/content-box.component.scss +54 -0
- package/scss/components/dropdown.component.scss +28 -0
- package/scss/components/form-field.component.scss +208 -0
- package/scss/components/header.component.scss +40 -0
- package/scss/components/icon.component.scss +35 -0
- package/scss/components/inline-message.component.scss +33 -0
- package/scss/components/launch-tile.component.scss +118 -0
- package/scss/components/{link/link.component.scss → link.component.scss} +6 -4
- package/scss/components/list-item.component.scss +107 -0
- package/scss/components/list.component.scss +3 -0
- package/scss/components/loading-spinner.component.scss +54 -0
- package/scss/components/{logo/logo.component.scss → logo.component.scss} +5 -4
- package/scss/components/main-menu-button.component.scss +7 -0
- package/scss/components/{main-menu/components/main-menu-item.component.scss → main-menu-item.component.scss} +14 -12
- package/scss/components/{main-menu/main-menu.component.scss → main-menu.component.scss} +37 -29
- package/scss/components/menu-item.component.scss +8 -0
- package/scss/components/menu.component.scss +16 -0
- package/scss/components/modal.component.scss +144 -0
- package/scss/components/progress.component.scss +41 -0
- package/scss/components/radio-button.component.scss +120 -0
- package/scss/components/radio-group.component.scss +14 -0
- package/scss/components/rail-navigation-item.component.scss +60 -0
- package/scss/components/rail-navigation.component.scss +32 -0
- package/scss/components/select.component.scss +103 -0
- package/scss/components/slider.component.scss +131 -0
- package/scss/components/spinbox.component.scss +124 -0
- package/scss/components/switch.component.scss +163 -0
- package/scss/components/tab-bar-item.component.scss +53 -0
- package/scss/components/tab-bar.component.scss +124 -0
- package/scss/components/toast-item.component.scss +79 -0
- package/scss/components/toast.component.scss +33 -0
- package/scss/components/toggle-button-group.component.scss +63 -0
- package/scss/components/toggle-button.component.scss +69 -0
- package/scss/components/tooltip.component.scss +34 -0
- package/scss/core.scss +66 -30
- package/scss/layout/_base.scss +35 -0
- package/scss/layout/_content.scss +25 -0
- package/scss/layout/_description-list.scss +30 -0
- package/scss/layout/_helpers.scss +85 -0
- package/scss/{modules → layout}/_layout.scss +96 -46
- package/scss/layout/_text-list.scss +18 -0
- package/scss/layout/_typography.scss +114 -0
- package/scss/{base/_reset.scss → reset.scss} +30 -5
- package/scss/variables/_color-palettes.scss +59 -55
- package/scss/variables/_colors.scss +15 -15
- package/scss/variables/_controls.scss +47 -0
- package/scss/variables/_index.scss +6 -0
- package/scss/variables/_typography.scss +18 -0
- package/scss/variables/_vertical-rythm.scss +3 -0
- package/scss/variables/_visuals.scss +15 -8
- package/scss/_helpers.scss +0 -15
- package/scss/base/_mixins.scss +0 -3
- package/scss/base/_utils.scss +0 -19
- package/scss/base/mixins/_container.scss +0 -31
- package/scss/base/mixins/_control.scss +0 -50
- package/scss/base/mixins/_transition.scss +0 -10
- package/scss/components/button/button.component.scss +0 -94
- package/scss/components/checkbox/checkbox.component.scss +0 -130
- package/scss/components/content-box/content-box.component.scss +0 -50
- package/scss/components/header/header.component.scss +0 -39
- package/scss/components/icon/icon.component.scss +0 -38
- package/scss/components/main-menu/components/main-menu-button.component.scss +0 -7
- package/scss/components/radio-group/_radio-group.component.scss +0 -145
- package/scss/modules/_typography.scss +0 -161
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
@use 'sass:math';
|
|
2
|
+
@use '../layout/helpers';
|
|
3
|
+
@use '../abstract/dimensions';
|
|
4
|
+
@use '../abstract/typography';
|
|
5
|
+
@use '../abstract/utils';
|
|
6
|
+
@use '../abstract/motion';
|
|
7
|
+
|
|
8
|
+
@mixin indicator-color($background, $stroke: null) {
|
|
9
|
+
background-color: $background;
|
|
10
|
+
|
|
11
|
+
@if $stroke {
|
|
12
|
+
border-color: $stroke;
|
|
13
|
+
} @else {
|
|
14
|
+
border-color: $background;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.odx-switch {
|
|
19
|
+
$root: &;
|
|
20
|
+
|
|
21
|
+
color: var(--odx-c-text);
|
|
22
|
+
display: inline-block;
|
|
23
|
+
|
|
24
|
+
&.is-disabled {
|
|
25
|
+
color: var(--odx-control-color-disabled);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
&.is-readonly {
|
|
29
|
+
@include utils.non-interactive();
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&__label {
|
|
33
|
+
@include dimensions.line-height(1);
|
|
34
|
+
@include motion.transition(background-color color outline-color);
|
|
35
|
+
@include typography.font-size(0);
|
|
36
|
+
@include utils.interactive($focus-within: true);
|
|
37
|
+
|
|
38
|
+
align-items: center;
|
|
39
|
+
border-radius: dimensions.get-size(0.5);
|
|
40
|
+
color: inherit;
|
|
41
|
+
display: inline-flex;
|
|
42
|
+
min-height: dimensions.get-size(1);
|
|
43
|
+
padding: 0 2px;
|
|
44
|
+
user-select: auto;
|
|
45
|
+
user-select: none;
|
|
46
|
+
vertical-align: top;
|
|
47
|
+
|
|
48
|
+
#{$root}.is-disabled & {
|
|
49
|
+
cursor: default;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
&:has(#{$root}__content:not(:empty)) {
|
|
53
|
+
border-bottom-right-radius: var(--odx-v-border-radius-controls);
|
|
54
|
+
border-top-right-radius: var(--odx-v-border-radius-controls);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
&__input {
|
|
59
|
+
@include utils.visually-hidden();
|
|
60
|
+
|
|
61
|
+
&:focus-visible {
|
|
62
|
+
~ #{$root}__indicator:before {
|
|
63
|
+
box-shadow: 0 0 0 1px var(--odx-c-background-content);
|
|
64
|
+
outline-color: var(--odx-c-focus);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
&__indicator {
|
|
70
|
+
$indicator-width: dimensions.get-size(1.5);
|
|
71
|
+
$indicator-height: dimensions.get-size(math.div(1, 6));
|
|
72
|
+
$track-size: dimensions.get-size(math.div(20, 24));
|
|
73
|
+
$border: 1px solid var(--odx-control-outline-color);
|
|
74
|
+
|
|
75
|
+
@include motion.transition(background-color color outline-color);
|
|
76
|
+
|
|
77
|
+
background-color: var(--odx-control-background-color);
|
|
78
|
+
border: $border;
|
|
79
|
+
border-radius: calc(#{$indicator-height} / 2);
|
|
80
|
+
color: var(--odx-control-color-selected);
|
|
81
|
+
height: $indicator-height;
|
|
82
|
+
position: relative;
|
|
83
|
+
width: $indicator-width;
|
|
84
|
+
|
|
85
|
+
&::before {
|
|
86
|
+
@include motion.transition(background-color transform border-color outline-color);
|
|
87
|
+
|
|
88
|
+
background-color: var(--odx-control-background-color);
|
|
89
|
+
border: $border;
|
|
90
|
+
border-radius: 50%;
|
|
91
|
+
box-sizing: border-box;
|
|
92
|
+
content: '';
|
|
93
|
+
display: block;
|
|
94
|
+
height: $track-size;
|
|
95
|
+
outline: 1px solid var(--odx-c-background-content);
|
|
96
|
+
position: absolute;
|
|
97
|
+
top: calc(#{$track-size} / -2 + 50%);
|
|
98
|
+
transform: translateX(-1px);
|
|
99
|
+
width: $track-size;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
#{$root}:hover &::before {
|
|
103
|
+
background-color: var(--odx-control-background-color-hover);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
#{$root}.is-active:hover &::before {
|
|
107
|
+
@include indicator-color(var(--odx-c-highlight-hover));
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
#{$root}.is-active &,
|
|
111
|
+
#{$root}__input:indeterminate ~ &,
|
|
112
|
+
#{$root}__input:checked ~ & {
|
|
113
|
+
@include indicator-color(var(--odx-control-background-color-selected));
|
|
114
|
+
|
|
115
|
+
&::before {
|
|
116
|
+
@include indicator-color(var(--odx-control-background-color-selected));
|
|
117
|
+
|
|
118
|
+
transform: translateX(calc((#{$indicator-width} - #{$track-size}) - 1px));
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
#{$root}.has-error & {
|
|
123
|
+
@include indicator-color(var(--odx-control-background-color-error));
|
|
124
|
+
|
|
125
|
+
&::before {
|
|
126
|
+
@include indicator-color(var(--odx-control-background-color-error));
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
#{$root}.has-error:hover & {
|
|
131
|
+
outline-color: var(--odx-control-outline-color-error-hover);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
#{$root}.is-disabled & {
|
|
135
|
+
@include indicator-color(var(--odx-c-secondary-disabled));
|
|
136
|
+
|
|
137
|
+
&::before {
|
|
138
|
+
@include indicator-color(var(--odx-c-secondary-disabled));
|
|
139
|
+
|
|
140
|
+
outline-color: transparent;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
#{$root}.is-disabled:not(.is-active) & {
|
|
145
|
+
@include indicator-color(var(--odx-control-background-color-disabled));
|
|
146
|
+
|
|
147
|
+
&::before {
|
|
148
|
+
@include indicator-color(var(--odx-control-background-color-disabled));
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
&__content {
|
|
154
|
+
@include dimensions.margin(0.5, left);
|
|
155
|
+
|
|
156
|
+
padding-left: 2px;
|
|
157
|
+
|
|
158
|
+
&:empty {
|
|
159
|
+
margin: 0;
|
|
160
|
+
padding: 0;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
@use 'sass:math';
|
|
2
|
+
@use '../abstract/dimensions';
|
|
3
|
+
@use '../abstract/motion';
|
|
4
|
+
@use '../abstract/typography';
|
|
5
|
+
@use '../abstract//utils';
|
|
6
|
+
|
|
7
|
+
.odx-tab-bar-item {
|
|
8
|
+
@include dimensions.height(2, math.div(32, 24));
|
|
9
|
+
@include dimensions.padding-x(math.div(4, 24));
|
|
10
|
+
@include utils.vertical-center-content();
|
|
11
|
+
@include utils.with-outline();
|
|
12
|
+
@include motion.transition(background-color outline-color);
|
|
13
|
+
|
|
14
|
+
align-items: center;
|
|
15
|
+
background-color: transparent;
|
|
16
|
+
border-radius: var(--odx-v-border-radius-controls);
|
|
17
|
+
cursor: pointer;
|
|
18
|
+
user-select: none;
|
|
19
|
+
|
|
20
|
+
&:hover {
|
|
21
|
+
background-color: var(--blue-700-5);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.odx-icon {
|
|
25
|
+
@include dimensions.container(1, 1);
|
|
26
|
+
@include dimensions.margin-x(math.div(4, 24));
|
|
27
|
+
|
|
28
|
+
font-size: dimensions.get-size(1);
|
|
29
|
+
|
|
30
|
+
&:first-child {
|
|
31
|
+
margin-left: 0;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&:last-child:not(:first-child) {
|
|
35
|
+
@include motion.transition(color);
|
|
36
|
+
|
|
37
|
+
margin-right: 0;
|
|
38
|
+
|
|
39
|
+
&:hover {
|
|
40
|
+
color: var(--odx-c-highlight);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
&.is-disabled {
|
|
46
|
+
color: var(--odx-c-text-disabled);
|
|
47
|
+
pointer-events: none;
|
|
48
|
+
|
|
49
|
+
.odx-tab-bar-item__label {
|
|
50
|
+
pointer-events: none;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
@use 'sass:math';
|
|
2
|
+
@use '../abstract/dimensions';
|
|
3
|
+
@use '../abstract/motion';
|
|
4
|
+
@use '../abstract/utils';
|
|
5
|
+
|
|
6
|
+
.odx-tab-bar {
|
|
7
|
+
$root: &;
|
|
8
|
+
|
|
9
|
+
@include dimensions.height(2);
|
|
10
|
+
|
|
11
|
+
border-bottom: 1px solid;
|
|
12
|
+
border-bottom-color: var(--odx-control-outline-color-hover);
|
|
13
|
+
display: flex;
|
|
14
|
+
overflow: hidden;
|
|
15
|
+
position: relative;
|
|
16
|
+
|
|
17
|
+
&__inner {
|
|
18
|
+
$gradient-start: dimensions.get-size(1);
|
|
19
|
+
$gradient-end: dimensions.get-size(3);
|
|
20
|
+
$mask-color: #000000;
|
|
21
|
+
|
|
22
|
+
display: flex;
|
|
23
|
+
width: 100%;
|
|
24
|
+
|
|
25
|
+
#{$root}--overflow-left & {
|
|
26
|
+
mask-image: linear-gradient(to right, transparent $gradient-start, $mask-color $gradient-end);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
#{$root}--overflow-right & {
|
|
30
|
+
mask-image: linear-gradient(to right, $mask-color calc(100% - $gradient-end), transparent calc(100% - $gradient-start));
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
#{$root}--overflow-left#{$root}--overflow-right & {
|
|
34
|
+
mask-image: linear-gradient(
|
|
35
|
+
to right,
|
|
36
|
+
transparent $gradient-start,
|
|
37
|
+
$mask-color $gradient-end,
|
|
38
|
+
$mask-color calc(100% - $gradient-end),
|
|
39
|
+
transparent calc(100% - $gradient-start)
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&__panel {
|
|
45
|
+
@include motion.transition(transform);
|
|
46
|
+
@include dimensions.padding-x(math.div(12, 24));
|
|
47
|
+
|
|
48
|
+
display: flex;
|
|
49
|
+
flex: 0 0 auto;
|
|
50
|
+
gap: dimensions.get-size(math.div(8, 24));
|
|
51
|
+
position: relative;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
&__action {
|
|
55
|
+
@include dimensions.height(2);
|
|
56
|
+
@include motion.transition(opacity width padding);
|
|
57
|
+
@include utils.center-content();
|
|
58
|
+
|
|
59
|
+
background-color: transparent;
|
|
60
|
+
cursor: pointer;
|
|
61
|
+
opacity: 0;
|
|
62
|
+
overflow: hidden;
|
|
63
|
+
padding: 0;
|
|
64
|
+
pointer-events: none;
|
|
65
|
+
position: absolute;
|
|
66
|
+
top: 0;
|
|
67
|
+
user-select: none;
|
|
68
|
+
width: 0;
|
|
69
|
+
z-index: 50;
|
|
70
|
+
|
|
71
|
+
&.is-active {
|
|
72
|
+
@include dimensions.padding(math.div(8, 24), (right, left));
|
|
73
|
+
|
|
74
|
+
opacity: 1;
|
|
75
|
+
pointer-events: all;
|
|
76
|
+
transform: scaleX(1);
|
|
77
|
+
width: dimensions.get-size(1.5);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.odx-icon {
|
|
81
|
+
@include dimensions.container(1, 1);
|
|
82
|
+
|
|
83
|
+
align-items: center;
|
|
84
|
+
color: var(--odx-c-highlight);
|
|
85
|
+
display: flex;
|
|
86
|
+
font-size: dimensions.get-size(math.div(32, 24));
|
|
87
|
+
justify-content: center;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
&--prev {
|
|
91
|
+
justify-content: flex-start;
|
|
92
|
+
left: 0;
|
|
93
|
+
transform-origin: center left;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
&--next {
|
|
97
|
+
justify-content: flex-end;
|
|
98
|
+
right: 0;
|
|
99
|
+
transform-origin: center right;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
&:hover {
|
|
103
|
+
.odx-icon {
|
|
104
|
+
color: var(--odx-c-highlight-hover);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.odx-tab-bar__indicator {
|
|
110
|
+
@include dimensions.margin(math.div(8, 24), left);
|
|
111
|
+
|
|
112
|
+
background-color: var(--odx-c-highlight);
|
|
113
|
+
bottom: 0;
|
|
114
|
+
height: dimensions.get-size(math.div(4, 24));
|
|
115
|
+
width: dimensions.get-size(2) !important;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
&:focus-visible {
|
|
119
|
+
.odx-tab-bar-item.is-active {
|
|
120
|
+
background-color: var(--odx-c-focus);
|
|
121
|
+
outline-color: var(--odx-c-focus-outline);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
@use 'sass:math';
|
|
2
|
+
@use '../abstract/dimensions';
|
|
3
|
+
@use '../abstract/typography';
|
|
4
|
+
@use '../abstract/utils';
|
|
5
|
+
|
|
6
|
+
.odx-toast-item {
|
|
7
|
+
--odx-c-default: var(--blue-50);
|
|
8
|
+
--odx-c-warning: var(--yellow-50);
|
|
9
|
+
--odx-c-danger: var(--red-00);
|
|
10
|
+
--odx-c-success: var(--green-00);
|
|
11
|
+
|
|
12
|
+
$root: &;
|
|
13
|
+
$variants: default, warning, danger, success;
|
|
14
|
+
$gap: dimensions.get-size(math.div(12, 24));
|
|
15
|
+
|
|
16
|
+
box-shadow: var(--odx-v-box-shadow-layer-1);
|
|
17
|
+
display: block;
|
|
18
|
+
|
|
19
|
+
&__content {
|
|
20
|
+
display: flex;
|
|
21
|
+
gap: $gap;
|
|
22
|
+
padding: $gap;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&__text-content {
|
|
26
|
+
@include typography.font-size(-1);
|
|
27
|
+
|
|
28
|
+
flex: 1;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&__title {
|
|
32
|
+
@include typography.prevent-text-overflow();
|
|
33
|
+
|
|
34
|
+
font-weight: var(--odx-typography-font-weight-bold);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&__description {
|
|
38
|
+
max-height: dimensions.get-size(5);
|
|
39
|
+
overflow: auto;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
&__close {
|
|
43
|
+
@include utils.interactive(true);
|
|
44
|
+
|
|
45
|
+
background-color: transparent;
|
|
46
|
+
margin: 0;
|
|
47
|
+
margin-right: calc(#{$gap} / -2);
|
|
48
|
+
margin-top: calc(#{$gap} / -2);
|
|
49
|
+
|
|
50
|
+
&:hover {
|
|
51
|
+
background-color: var(--blue-700-5);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
&__buttons {
|
|
56
|
+
display: flex;
|
|
57
|
+
justify-content: flex-end;
|
|
58
|
+
margin-top: calc(#{$gap} / -2);
|
|
59
|
+
padding: 0 calc(#{$gap} / 2);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
@each $variant in $variants {
|
|
63
|
+
&--#{$variant} {
|
|
64
|
+
background-color: var(--odx-c-#{$variant});
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
&--danger {
|
|
69
|
+
--odx-c-text: var(--red-700);
|
|
70
|
+
--odx-v-scrollbar-thumb-color: var(--odx-c-text);
|
|
71
|
+
--odx-v-scrollbar-thumb-color-hover: var(--red-800);
|
|
72
|
+
|
|
73
|
+
color: var(--odx-c-text);
|
|
74
|
+
|
|
75
|
+
#{$root}__close {
|
|
76
|
+
color: inherit;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
@use 'sass:math';
|
|
2
|
+
@use '../abstract/breakpoints';
|
|
3
|
+
@use '../abstract/dimensions';
|
|
4
|
+
@use '../abstract/typography';
|
|
5
|
+
|
|
6
|
+
.odx-toast-container {
|
|
7
|
+
--odx-toast-outer-offset: #{dimensions.get-size(math.div(8, 24))};
|
|
8
|
+
|
|
9
|
+
display: flex;
|
|
10
|
+
flex-direction: column;
|
|
11
|
+
margin-top: dimensions.get-size(math.div(4, 24));
|
|
12
|
+
max-width: min(calc(100vw - 2 * var(--odx-toast-outer-offset)), dimensions.get-size(20));
|
|
13
|
+
padding-top: var(--odx-toast-outer-offset);
|
|
14
|
+
position: fixed;
|
|
15
|
+
right: var(--odx-toast-outer-offset);
|
|
16
|
+
top: 0;
|
|
17
|
+
width: 100%;
|
|
18
|
+
z-index: 10;
|
|
19
|
+
|
|
20
|
+
&__counter {
|
|
21
|
+
align-self: center;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.odx-toast-item {
|
|
25
|
+
margin-bottom: var(--odx-toast-outer-offset);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
@include breakpoints.up(phone) {
|
|
29
|
+
--odx-toast-outer-offset: #{dimensions.get-size(math.div(20, 24))};
|
|
30
|
+
|
|
31
|
+
margin-top: 0;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
@use 'sass:math';
|
|
2
|
+
@use '../abstract/dimensions';
|
|
3
|
+
@use '../abstract/motion';
|
|
4
|
+
@use '../abstract/utils';
|
|
5
|
+
|
|
6
|
+
.odx-toggle-button-group {
|
|
7
|
+
--odx-toggle-button-border-radius: 2px;
|
|
8
|
+
|
|
9
|
+
$root: &;
|
|
10
|
+
|
|
11
|
+
@include dimensions.height(2, 1.5);
|
|
12
|
+
@include dimensions.padding-x(math.div(6, 24));
|
|
13
|
+
@include motion.transition(background-color outline-color);
|
|
14
|
+
@include utils.center-content(true);
|
|
15
|
+
@include utils.with-outline();
|
|
16
|
+
|
|
17
|
+
border-radius: var(--odx-v-border-radius-controls);
|
|
18
|
+
column-gap: dimensions.get-size(math.div(6, 24));
|
|
19
|
+
position: relative;
|
|
20
|
+
|
|
21
|
+
&__indicator {
|
|
22
|
+
@include dimensions.height(2, 1);
|
|
23
|
+
@include utils.with-outline();
|
|
24
|
+
|
|
25
|
+
background-color: var(--odx-c-highlight);
|
|
26
|
+
border-radius: var(--odx-toggle-button-border-radius);
|
|
27
|
+
|
|
28
|
+
#{$root}.is-disabled & {
|
|
29
|
+
background-color: var(--odx-c-secondary-disabled);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
#{$root}.is-readonly & {
|
|
33
|
+
background-color: transparent;
|
|
34
|
+
outline-color: currentcolor;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
#{$root}.is-readonly.is-disabled & {
|
|
38
|
+
background-color: transparent;
|
|
39
|
+
outline-color: var(--odx-c-secondary-disabled);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
#{$root}:focus-within:has(:focus-visible) & {
|
|
43
|
+
outline-color: var(--odx-c-highlight-active);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.odx-toggle-button {
|
|
48
|
+
z-index: 1;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
&.has-error:not(.is-disabled, .is-readonly) {
|
|
52
|
+
background-color: var(--odx-c-error);
|
|
53
|
+
outline-color: var(--odx-c-error-outline);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
&.is-active {
|
|
57
|
+
@include utils.focus-state($focus-within: true);
|
|
58
|
+
|
|
59
|
+
&:not(.is-disabled, .is-readonly):hover {
|
|
60
|
+
background-color: var(--blue-700-5);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
@use 'sass:math';
|
|
2
|
+
@use '../abstract/dimensions';
|
|
3
|
+
@use '../abstract/motion';
|
|
4
|
+
@use '../abstract/typography';
|
|
5
|
+
@use '../abstract/utils';
|
|
6
|
+
|
|
7
|
+
.odx-toggle-button {
|
|
8
|
+
$root: &;
|
|
9
|
+
|
|
10
|
+
@include dimensions.line-height(1.5, 1);
|
|
11
|
+
@include motion.transition(color);
|
|
12
|
+
@include typography.font-size(0);
|
|
13
|
+
@include typography.font-weight(medium);
|
|
14
|
+
@include utils.vertical-center-content();
|
|
15
|
+
|
|
16
|
+
color: currentcolor;
|
|
17
|
+
overflow: hidden;
|
|
18
|
+
user-select: none;
|
|
19
|
+
|
|
20
|
+
&.is-active {
|
|
21
|
+
color: var(--odx-c-highlight-text);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&.is-readonly {
|
|
25
|
+
color: inherit;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
&.is-disabled {
|
|
29
|
+
color: var(--odx-control-color-disabled);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&.is-active.is-disabled {
|
|
33
|
+
color: var(--odx-c-secondary-text-disabled);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&.is-disabled,
|
|
37
|
+
&.is-readonly {
|
|
38
|
+
pointer-events: none;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&__label {
|
|
42
|
+
@include motion.transition(background-color outline-color);
|
|
43
|
+
@include dimensions.padding-x(math.div(1, 3));
|
|
44
|
+
|
|
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
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
@use '../abstract/dimensions';
|
|
2
|
+
|
|
3
|
+
:root {
|
|
4
|
+
--odx-tooltip-background-color: var(--blue-800);
|
|
5
|
+
--odx-tooltip-color: var(--odx-c-text-inverse);
|
|
6
|
+
--odx-tooltip-size-small: #{dimensions.get-size(5)};
|
|
7
|
+
--odx-tooltip-size-medium: #{dimensions.get-size(10)};
|
|
8
|
+
--odx-tooltip-size-large: #{dimensions.get-size(15)};
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.odx-tooltip {
|
|
12
|
+
$sizes: small, medium, large;
|
|
13
|
+
|
|
14
|
+
@include dimensions.padding(0.5);
|
|
15
|
+
|
|
16
|
+
background-color: var(--odx-tooltip-background-color);
|
|
17
|
+
border-radius: var(--odx-v-border-radius);
|
|
18
|
+
color: var(--odx-tooltip-color);
|
|
19
|
+
display: block;
|
|
20
|
+
overflow: hidden;
|
|
21
|
+
|
|
22
|
+
@each $size in $sizes {
|
|
23
|
+
&--#{$size} {
|
|
24
|
+
max-width: var(--odx-tooltip-size-#{$size});
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
&-overlay {
|
|
29
|
+
.odx-cdk-connected-overlay-arrow {
|
|
30
|
+
background-color: var(--odx-tooltip-background-color);
|
|
31
|
+
z-index: -1;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|