@odx/ui 1.0.0-rc.1 → 1.0.0-rc.11
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 +48 -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,107 @@
|
|
|
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 utils.interactive(false);
|
|
14
|
+
@include utils.vertical-center-content();
|
|
15
|
+
|
|
16
|
+
background-color: transparent;
|
|
17
|
+
border-radius: var(--odx-v-border-radius-controls);
|
|
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
|
+
content: '';
|
|
34
|
+
display: block;
|
|
35
|
+
position: absolute;
|
|
36
|
+
top: 0;
|
|
37
|
+
width: calc(100% - #{dimensions.get-size(math.div(14, 24))});
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&:hover,
|
|
41
|
+
&:focus-visible,
|
|
42
|
+
&:first-child {
|
|
43
|
+
&::before {
|
|
44
|
+
border-bottom-color: transparent;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
&:hover {
|
|
49
|
+
background-color: var(--blue-700-5);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
&--danger + &::before,
|
|
53
|
+
&--selected + &::before,
|
|
54
|
+
&:hover + &::before {
|
|
55
|
+
border-color: transparent;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
&.is-disabled {
|
|
59
|
+
color: var(--odx-control-color-disabled);
|
|
60
|
+
pointer-events: none;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
&--danger {
|
|
64
|
+
--odx-c-focus: var(--odx-c-danger);
|
|
65
|
+
|
|
66
|
+
@include utils.with-outline-bold();
|
|
67
|
+
|
|
68
|
+
background-color: var(--odx-c-danger);
|
|
69
|
+
color: var(--odx-c-danger-text);
|
|
70
|
+
|
|
71
|
+
&::before {
|
|
72
|
+
border-bottom-color: transparent;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
&:hover {
|
|
76
|
+
background-color: var(--odx-c-danger-hover);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
&.is-disabled {
|
|
80
|
+
color: var(--odx-c-danger-text-disabled);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
&--selected {
|
|
85
|
+
background-color: var(--odx-c-selected);
|
|
86
|
+
|
|
87
|
+
&::before {
|
|
88
|
+
border-bottom-color: transparent;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
&:hover {
|
|
92
|
+
background-color: var(--odx-c-selected-hover);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
&#{$root}--danger {
|
|
96
|
+
background-color: var(--odx-c-danger-active);
|
|
97
|
+
|
|
98
|
+
&:hover {
|
|
99
|
+
background-color: var(--red-800);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
&.is-disabled {
|
|
103
|
+
color: var(--odx-c-danger-text);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
@use 'sass:math';
|
|
2
|
+
@use '../abstract/motion';
|
|
3
|
+
@use '../abstract/utils';
|
|
4
|
+
|
|
5
|
+
.odx-loading-spinner {
|
|
6
|
+
$root: &;
|
|
7
|
+
|
|
8
|
+
backdrop-filter: blur(var(--odx-v-backdrop-blur));
|
|
9
|
+
|
|
10
|
+
&,
|
|
11
|
+
&__backdrop {
|
|
12
|
+
height: 100%;
|
|
13
|
+
left: 0;
|
|
14
|
+
position: absolute;
|
|
15
|
+
scroll-behavior: contain;
|
|
16
|
+
top: 0;
|
|
17
|
+
width: 100%;
|
|
18
|
+
z-index: 1;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&__backdrop {
|
|
22
|
+
@include motion.transition(background-color);
|
|
23
|
+
|
|
24
|
+
background-color: transparent;
|
|
25
|
+
opacity: 0.8;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.odx-circular-progress {
|
|
29
|
+
height: 66.67%;
|
|
30
|
+
left: 50%;
|
|
31
|
+
max-height: 40px;
|
|
32
|
+
position: absolute;
|
|
33
|
+
top: 50%;
|
|
34
|
+
transform: translate(-50%, -50%);
|
|
35
|
+
z-index: 2;
|
|
36
|
+
|
|
37
|
+
&__track {
|
|
38
|
+
stroke: var(--blue-700-15);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
&--auto-color {
|
|
43
|
+
.odx-circular-progress {
|
|
44
|
+
&__indicator {
|
|
45
|
+
stroke: currentcolor;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
&-parent {
|
|
51
|
+
overflow: hidden;
|
|
52
|
+
user-select: none;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@use '
|
|
1
|
+
@use '../abstract/dimensions';
|
|
2
2
|
|
|
3
3
|
:root {
|
|
4
4
|
--odx-logo-color: var(--odx-c-primary);
|
|
@@ -6,22 +6,23 @@
|
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
.odx-logo {
|
|
9
|
-
@include
|
|
9
|
+
@include dimensions.height(1);
|
|
10
10
|
|
|
11
11
|
aspect-ratio: 2.5 / 1;
|
|
12
12
|
background-color: var(--odx-logo-color);
|
|
13
13
|
display: inline-block;
|
|
14
14
|
mask-image: url('../assets/images/logo.svg');
|
|
15
|
+
mask-repeat: no-repeat;
|
|
15
16
|
|
|
16
17
|
&--inverse {
|
|
17
18
|
background-color: var(--odx-logo-color-inverse);
|
|
18
19
|
}
|
|
19
20
|
|
|
20
21
|
&--medium {
|
|
21
|
-
@include
|
|
22
|
+
@include dimensions.height(2, 1.5);
|
|
22
23
|
}
|
|
23
24
|
|
|
24
25
|
&--large {
|
|
25
|
-
@include
|
|
26
|
+
@include dimensions.height(3, 2.5);
|
|
26
27
|
}
|
|
27
28
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
@use 'sass:math';
|
|
2
|
-
@use '
|
|
3
|
-
@use '
|
|
4
|
-
@use '
|
|
2
|
+
@use '../abstract/dimensions';
|
|
3
|
+
@use '../abstract/motion';
|
|
4
|
+
@use '../abstract/utils';
|
|
5
|
+
@use '../abstract/typography';
|
|
5
6
|
|
|
6
7
|
:root {
|
|
7
8
|
--odx-main-menu-item-background-color: transparent;
|
|
@@ -12,22 +13,23 @@
|
|
|
12
13
|
}
|
|
13
14
|
|
|
14
15
|
.odx-main-menu-item {
|
|
15
|
-
@include
|
|
16
|
-
@include
|
|
17
|
-
@include
|
|
18
|
-
@include
|
|
19
|
-
@include
|
|
20
|
-
@include
|
|
16
|
+
@include dimensions.height(3, math.div(7, 3));
|
|
17
|
+
@include dimensions.padding-x(math.div(2, 3));
|
|
18
|
+
@include motion.transition(color background-color outline);
|
|
19
|
+
@include utils.interactive(false);
|
|
20
|
+
@include utils.vertical-center-content();
|
|
21
|
+
@include typography.font-weight(medium);
|
|
22
|
+
@include typography.prevent-text-overflow();
|
|
21
23
|
|
|
22
24
|
background-color: transparent;
|
|
23
25
|
border-radius: var(--odx-v-border-radius);
|
|
24
26
|
color: var(--odx-main-menu-item-text-color);
|
|
25
|
-
font-weight: var(--odx-t-font-weight-medium);
|
|
26
27
|
|
|
27
28
|
&:hover {
|
|
28
29
|
background-color: var(--odx-main-menu-item-background-color-hover);
|
|
29
30
|
}
|
|
30
31
|
|
|
32
|
+
&.is-selected,
|
|
31
33
|
&:active {
|
|
32
34
|
background-color: var(--odx-main-menu-item-background-color-active);
|
|
33
35
|
}
|
|
@@ -39,7 +41,7 @@
|
|
|
39
41
|
}
|
|
40
42
|
|
|
41
43
|
> .odx-icon {
|
|
42
|
-
@include
|
|
43
|
-
@include
|
|
44
|
+
@include dimensions.margin(math.div(1, 3), right);
|
|
45
|
+
@include dimensions.margin(math.div(-1, 3), left);
|
|
44
46
|
}
|
|
45
47
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
@use 'sass:math';
|
|
2
|
-
@use '
|
|
3
|
-
@use '
|
|
4
|
-
@use '
|
|
5
|
-
@use '
|
|
6
|
-
@use '
|
|
7
|
-
@use '
|
|
8
|
-
@use '
|
|
2
|
+
@use '../abstract/breakpoints';
|
|
3
|
+
@use '../abstract/dimensions';
|
|
4
|
+
@use '../abstract/utils';
|
|
5
|
+
@use '../abstract/typography';
|
|
6
|
+
@use 'button.component';
|
|
7
|
+
@use 'main-menu-button.component';
|
|
8
|
+
@use 'main-menu-item.component';
|
|
9
9
|
|
|
10
10
|
:root {
|
|
11
11
|
--odx-main-menu-max-width: 100vw;
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
--odx-main-menu-text-color: var(--odx-c-primary-text);
|
|
14
14
|
--odx-main-menu-highlight-color: var(--odx-c-highlight);
|
|
15
15
|
|
|
16
|
-
@include
|
|
16
|
+
@include breakpoints.up(phone) {
|
|
17
17
|
--odx-main-menu-max-width: min(100vw, 384px);
|
|
18
18
|
}
|
|
19
19
|
}
|
|
@@ -33,22 +33,24 @@
|
|
|
33
33
|
max-width: var(--odx-main-menu-max-width);
|
|
34
34
|
position: fixed;
|
|
35
35
|
top: 0;
|
|
36
|
+
width: 100%;
|
|
36
37
|
z-index: 9000;
|
|
37
38
|
}
|
|
38
39
|
|
|
39
40
|
&__overlay {
|
|
40
|
-
|
|
41
|
+
backdrop-filter: blur(var(--odx-v-backdrop-blur));
|
|
42
|
+
background-color: var(--odx-c-backdrop);
|
|
41
43
|
height: 100%;
|
|
42
44
|
left: 0;
|
|
43
|
-
position:
|
|
45
|
+
position: fixed;
|
|
44
46
|
top: 0;
|
|
45
47
|
width: 100%;
|
|
46
48
|
z-index: 8999;
|
|
47
49
|
}
|
|
48
50
|
|
|
49
51
|
&__actions {
|
|
50
|
-
@include
|
|
51
|
-
@include
|
|
52
|
+
@include dimensions.height(2);
|
|
53
|
+
@include dimensions.margin-x(0.5);
|
|
52
54
|
}
|
|
53
55
|
|
|
54
56
|
&__header,
|
|
@@ -64,12 +66,15 @@
|
|
|
64
66
|
}
|
|
65
67
|
|
|
66
68
|
&__content {
|
|
67
|
-
|
|
69
|
+
--odx-v-scrollbar-thumb-color: var(--blue-400);
|
|
70
|
+
--odx-v-scrollbar-thumb-color-hover: var(--blue-500);
|
|
71
|
+
|
|
72
|
+
@include dimensions.padding-x(0.5);
|
|
68
73
|
|
|
69
74
|
display: flex;
|
|
70
75
|
flex-direction: column;
|
|
71
|
-
max-width: calc(var(--odx-main-menu-max-width) +
|
|
72
|
-
min-height:
|
|
76
|
+
max-width: calc(var(--odx-main-menu-max-width) + dimensions.get-size(2));
|
|
77
|
+
min-height: dimensions.get-size(5);
|
|
73
78
|
overflow: auto;
|
|
74
79
|
|
|
75
80
|
> * {
|
|
@@ -79,39 +84,42 @@
|
|
|
79
84
|
|
|
80
85
|
&__info {
|
|
81
86
|
@extend .odx-text;
|
|
82
|
-
@include
|
|
83
|
-
@include
|
|
87
|
+
@include dimensions.padding-x(1);
|
|
88
|
+
@include dimensions.padding-y(0.5);
|
|
84
89
|
|
|
85
|
-
column-gap:
|
|
90
|
+
column-gap: dimensions.get-size(1);
|
|
86
91
|
display: flex;
|
|
87
92
|
flex-wrap: wrap;
|
|
88
93
|
|
|
89
|
-
@include
|
|
90
|
-
@include
|
|
94
|
+
@include breakpoints.up(tablet) {
|
|
95
|
+
@include dimensions.padding-y(1);
|
|
91
96
|
}
|
|
92
97
|
}
|
|
93
98
|
|
|
94
99
|
&__footer {
|
|
95
|
-
@include
|
|
96
|
-
@include
|
|
97
|
-
@include
|
|
98
|
-
@include
|
|
99
|
-
@include
|
|
100
|
+
@include dimensions.height(1);
|
|
101
|
+
@include dimensions.padding-x(1);
|
|
102
|
+
@include dimensions.padding(math.div(16, 24), top);
|
|
103
|
+
@include dimensions.padding(math.div(32, 24), bottom);
|
|
104
|
+
@include utils.center-content();
|
|
100
105
|
|
|
101
106
|
display: grid;
|
|
102
|
-
gap:
|
|
107
|
+
gap: dimensions.get-size(0.5);
|
|
103
108
|
grid-template-columns: 1fr auto;
|
|
104
109
|
user-select: none;
|
|
105
110
|
|
|
106
111
|
> .odx-text {
|
|
107
|
-
@include
|
|
112
|
+
@include dimensions.line-height(math.div(12, 24));
|
|
108
113
|
|
|
109
114
|
opacity: 0.3;
|
|
110
115
|
word-wrap: break-word;
|
|
111
116
|
}
|
|
112
117
|
}
|
|
113
118
|
|
|
114
|
-
.odx-link
|
|
115
|
-
|
|
119
|
+
.odx-link {
|
|
120
|
+
&:visited,
|
|
121
|
+
&:hover {
|
|
122
|
+
color: var(--odx-c-link);
|
|
123
|
+
}
|
|
116
124
|
}
|
|
117
125
|
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
@use '../abstract/dimensions';
|
|
2
|
+
@use 'sass:math';
|
|
3
|
+
|
|
4
|
+
.odx-menu {
|
|
5
|
+
display: block;
|
|
6
|
+
|
|
7
|
+
> .odx-action-group {
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: column;
|
|
10
|
+
height: auto;
|
|
11
|
+
margin: 0;
|
|
12
|
+
|
|
13
|
+
> .odx-button {
|
|
14
|
+
justify-content: flex-start;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
&__title:not(:empty) {
|
|
19
|
+
margin-bottom: dimensions.get-size(math.div(12, 24));
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
&--tile {
|
|
23
|
+
$avatar-size: dimensions.get-size(math.div(48, 24));
|
|
24
|
+
$grid-gap: dimensions.get-size(math.div(8, 24));
|
|
25
|
+
|
|
26
|
+
.odx-avatar {
|
|
27
|
+
height: $avatar-size;
|
|
28
|
+
margin-bottom: $grid-gap;
|
|
29
|
+
width: $avatar-size;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.odx-action-group {
|
|
33
|
+
display: grid;
|
|
34
|
+
grid-gap: $grid-gap;
|
|
35
|
+
grid-template-columns: repeat(3, 1fr);
|
|
36
|
+
|
|
37
|
+
.odx-button {
|
|
38
|
+
flex-direction: column;
|
|
39
|
+
font-size: dimensions.get-size(math.div(13, 24));
|
|
40
|
+
font-weight: var(--odx-typography-font-weight-normal);
|
|
41
|
+
height: unset;
|
|
42
|
+
line-height: dimensions.get-size(math.div(20, 24));
|
|
43
|
+
padding: $grid-gap;
|
|
44
|
+
width: dimensions.get-size(math.div(100, 24));
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
@use 'sass:math';
|
|
2
|
+
@use '../abstract/dimensions';
|
|
3
|
+
@use '../abstract/breakpoints';
|
|
4
|
+
@use '../abstract/typography';
|
|
5
|
+
@use '../abstract/utils';
|
|
6
|
+
|
|
7
|
+
$modal-padding: math.div(12, 24);
|
|
8
|
+
|
|
9
|
+
.odx-modal {
|
|
10
|
+
--odx-modal-margin-y: #{dimensions.get-size(2)};
|
|
11
|
+
--odx-modal-margin-x: #{dimensions.get-size(math.div(8, 24))};
|
|
12
|
+
--odx-modal-max-width: #{dimensions.get-size(20)};
|
|
13
|
+
|
|
14
|
+
$root: &;
|
|
15
|
+
|
|
16
|
+
backdrop-filter: blur(var(--odx-v-backdrop-blur));
|
|
17
|
+
background-color: var(--odx-c-backdrop-dark);
|
|
18
|
+
display: block;
|
|
19
|
+
height: 100%;
|
|
20
|
+
left: 0;
|
|
21
|
+
overscroll-behavior: contain;
|
|
22
|
+
position: fixed;
|
|
23
|
+
top: 0;
|
|
24
|
+
width: 100%;
|
|
25
|
+
z-index: 1000;
|
|
26
|
+
|
|
27
|
+
@include breakpoints.up(phone) {
|
|
28
|
+
--odx-modal-margin-y: #{dimensions.get-size(3)};
|
|
29
|
+
--odx-modal-margin-x: #{dimensions.get-size(1)};
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&--sidesheet {
|
|
33
|
+
backdrop-filter: unset;
|
|
34
|
+
background-color: unset;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&__container {
|
|
38
|
+
@include dimensions.padding-x(1);
|
|
39
|
+
|
|
40
|
+
background-color: var(--odx-c-background-content);
|
|
41
|
+
border-radius: var(--odx-v-border-radius);
|
|
42
|
+
box-shadow: var(--odx-v-box-shadow-layer-2);
|
|
43
|
+
display: flex;
|
|
44
|
+
flex-direction: column;
|
|
45
|
+
margin: var(--odx-modal-margin-y) auto 0;
|
|
46
|
+
max-height: calc(100vh - 2 * var(--odx-modal-margin-y));
|
|
47
|
+
min-height: dimensions.get-size(7);
|
|
48
|
+
width: min(var(--odx-modal-max-width), calc(100vw - 2 * var(--odx-modal-margin-x)));
|
|
49
|
+
|
|
50
|
+
#{$root}--medium & {
|
|
51
|
+
--odx-modal-max-width: #{dimensions.get-size(30)};
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
#{$root}--large & {
|
|
55
|
+
--odx-modal-max-width: #{dimensions.get-size(50)};
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
#{$root}--sidesheet & {
|
|
59
|
+
height: 100%;
|
|
60
|
+
left: unset;
|
|
61
|
+
margin-right: dimensions.get-size(0.5);
|
|
62
|
+
max-height: calc(100vh - var(--odx-modal-margin-y) - #{dimensions.get-size(1)});
|
|
63
|
+
right: 0;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
#{$root}--with-component & > * {
|
|
67
|
+
display: contents;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
&__header,
|
|
72
|
+
&__footer {
|
|
73
|
+
display: flex;
|
|
74
|
+
flex: 0 0 auto;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
&__header {
|
|
78
|
+
@include dimensions.min-height(2.5);
|
|
79
|
+
@include dimensions.padding($modal-padding, top);
|
|
80
|
+
|
|
81
|
+
> .odx-area-header {
|
|
82
|
+
@include dimensions.margin(-1, left);
|
|
83
|
+
@include dimensions.margin(-0.5, right);
|
|
84
|
+
|
|
85
|
+
flex: 1 1 auto;
|
|
86
|
+
max-width: 100%;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
&__content {
|
|
91
|
+
@include dimensions.padding-y($modal-padding);
|
|
92
|
+
|
|
93
|
+
display: block;
|
|
94
|
+
overflow: auto;
|
|
95
|
+
|
|
96
|
+
#{$root}--sidesheet & {
|
|
97
|
+
flex: 1;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
&__footer {
|
|
102
|
+
@include dimensions.height(2.5);
|
|
103
|
+
@include dimensions.padding($modal-padding, bottom);
|
|
104
|
+
|
|
105
|
+
gap: dimensions.get-size(math.div(16, 24));
|
|
106
|
+
justify-content: flex-end;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.odx-modal-hero {
|
|
111
|
+
$variants: success, danger, confirmation;
|
|
112
|
+
|
|
113
|
+
@include dimensions.min-height(2.5);
|
|
114
|
+
@include dimensions.padding(0.5, top);
|
|
115
|
+
|
|
116
|
+
display: flex;
|
|
117
|
+
flex-direction: column;
|
|
118
|
+
position: relative;
|
|
119
|
+
|
|
120
|
+
&__dismiss {
|
|
121
|
+
position: absolute;
|
|
122
|
+
right: 0;
|
|
123
|
+
top: dimensions.get-size(0.5);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
&__icon {
|
|
127
|
+
margin: dimensions.get-size(0.5) auto auto;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
&__title {
|
|
131
|
+
text-align: center;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
~ .odx-modal__content {
|
|
135
|
+
padding-top: 0;
|
|
136
|
+
text-align: center;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
@each $variant in $variants {
|
|
140
|
+
&--#{$variant} &__icon {
|
|
141
|
+
color: var(--odx-c-#{$variant});
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
@use 'sass:math';
|
|
2
|
+
@use '../abstract/motion';
|
|
3
|
+
@use '../abstract/dimensions';
|
|
4
|
+
|
|
5
|
+
@keyframes progress-indeterminate-animation {
|
|
6
|
+
from {
|
|
7
|
+
transform: translateX(-100%);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
to {
|
|
11
|
+
transform: translateX(100%);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.odx-progress {
|
|
16
|
+
@include dimensions.height(1, math.div(4, 24));
|
|
17
|
+
|
|
18
|
+
background: var(--gray-100);
|
|
19
|
+
display: block;
|
|
20
|
+
outline: 1px solid var(--gray-200);
|
|
21
|
+
outline-offset: -1px;
|
|
22
|
+
overflow: hidden;
|
|
23
|
+
position: relative;
|
|
24
|
+
|
|
25
|
+
&__indicator {
|
|
26
|
+
@include motion.transition(transform);
|
|
27
|
+
|
|
28
|
+
background-color: var(--odx-c-highlight);
|
|
29
|
+
display: block;
|
|
30
|
+
height: 100%;
|
|
31
|
+
left: 0;
|
|
32
|
+
position: absolute;
|
|
33
|
+
top: 0;
|
|
34
|
+
transform-origin: 0 0;
|
|
35
|
+
width: 100%;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
&--indeterminate #{&}__indicator {
|
|
39
|
+
animation: 2s ease-in-out infinite progress-indeterminate-animation;
|
|
40
|
+
}
|
|
41
|
+
}
|