@utahdts/utah-design-system 0.2.0 → 0.3.0
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/README.md +6 -1
- package/css/1-settings/_font-stuff.scss +5 -7
- package/css/1-settings/_icons.scss +18 -6
- package/css/1-settings/_settings-index.scss +14 -4
- package/css/1-settings/_spacing.scss +1 -2
- package/css/2-tools/_tools-index.scss +20 -0
- package/css/4-elements/_elements-index.scss +9 -1
- package/css/6-components/_components-index.scss +3 -0
- package/css/6-components/base-components/buttons/_button.scss +1 -0
- package/css/6-components/base-components/buttons/_icon-button.scss +1 -0
- package/css/6-components/base-components/forms/_select-input.scss +0 -1
- package/css/6-components/base-components/forms/_switch.scss +0 -4
- package/css/6-components/base-components/forms/_text-input.scss +0 -1
- package/css/6-components/base-components/navigation/_main-menu.scss +42 -26
- package/css/6-components/base-components/navigation/_mega-menu.scss +28 -0
- package/css/6-components/base-components/navigation/_menu-item.scss +1 -1
- package/css/6-components/base-components/navigation/_side-panel-navigation.scss +2 -17
- package/css/6-components/base-components/navigation/_vertical-menu.scss +71 -0
- package/css/6-components/base-components/popups/_tooltips.scss +97 -0
- package/css/6-components/base-components/templates/_landing-page-template.scss +2 -0
- package/css/6-components/base-components/templates/_on-this-page.scss +1 -1
- package/css/build/utah-design-system.css +327 -57
- package/dist/style.css +1103 -0
- package/dist/utah-design-system.es.js +38604 -23898
- package/dist/utah-design-system.umd.js +40657 -218
- package/index.js +80 -0
- package/package.json +10 -9
- package/react/components/navigation/HorizontalMenu.jsx +1 -1
- package/react/components/navigation/MenuItem.jsx +1 -1
- package/react/components/navigation/util/groupElementsByHeaderLevel.js +2 -4
- package/react/components/popups/Popup.jsx +3 -3
- package/react/components/table/TableBodyDataCellTemplate.jsx +2 -1
- package/react/components/templates/DocumentationTemplate.jsx +12 -24
- package/react/components/templates/LandingTemplate.jsx +3 -15
- package/react/contexts/UtahHeaderContext.jsx +40 -0
- package/react/propTypesShapes/HeaderMainMenuItemShape.js +19 -0
- package/react/propTypesShapes/HeaderMenuItemShape.js +21 -0
- package/react/propTypesShapes/HeaderMenuItemUrlActionShape.js +7 -0
- package/react/components/navigation/MainMenu.jsx +0 -28
- package/react/enums/popperPlacement.js +0 -18
package/README.md
CHANGED
|
@@ -14,7 +14,6 @@ Please see the [documentation site](https://utahdts.github.io/utah-design-system
|
|
|
14
14
|
|
|
15
15
|
## Install
|
|
16
16
|
|
|
17
|
-
[](https://github.com/utahdts/utah-design-system/actions/workflows/dev-pages-deploy.yml)
|
|
18
17
|
[](https://www.npmjs.com/package/@utahdts/utah-design-system)
|
|
19
18
|
[](https://www.apache.org/licenses/LICENSE-2.0)
|
|
20
19
|
[](https://github.com/utahdts/utah-design-system/issues)
|
|
@@ -59,3 +58,9 @@ unpkg.com/@utahdts/utah-design-system@0.0.2/css/build/utah-design-system.css
|
|
|
59
58
|
|-------------------------|-----------------------------------------------------------------------------------------|
|
|
60
59
|
| index.scss<br>(All CSS) | https://unpkg.com/@utahdts/utah-design-system@:version/css/build/utah-design-system.css |
|
|
61
60
|
|
|
61
|
+
### Site Map
|
|
62
|
+
|
|
63
|
+
- [Home](https://utahdts.github.io/utah-design-system/)
|
|
64
|
+
- Library
|
|
65
|
+
- [Header](https://utahdts.github.io/utah-design-system/utah-header/)
|
|
66
|
+
- [Documentation and Examples](../website/README.md)
|
|
@@ -21,6 +21,11 @@ Font size variables
|
|
|
21
21
|
--font-size-5xl: 3rem; //48
|
|
22
22
|
--font-size-6xl: 3.5rem; //56
|
|
23
23
|
--font-size-7xl: 4.5rem; //72
|
|
24
|
+
|
|
25
|
+
--font-weight-normal: 400;
|
|
26
|
+
--font-weight-semi-bold: 600;
|
|
27
|
+
--font-weight-bold: 700;
|
|
28
|
+
--font-weight-black: 900;
|
|
24
29
|
}
|
|
25
30
|
|
|
26
31
|
.font-size-2xs { font-size: var(--font-size-2xs); }
|
|
@@ -38,13 +43,6 @@ Font size variables
|
|
|
38
43
|
.font-size-7xl { font-size: var(--font-size-7xl); }
|
|
39
44
|
|
|
40
45
|
|
|
41
|
-
#{class-vars.$base-class} {
|
|
42
|
-
--font-weight-normal: 400;
|
|
43
|
-
--font-weight-semi-bold: 600;
|
|
44
|
-
--font-weight-bold: 700;
|
|
45
|
-
--font-weight-black: 900;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
46
|
.font-normal { font-weight: var(--font-weight-normal); }
|
|
49
47
|
.font-semi-bold { font-weight: var(--font-weight-semi-bold); }
|
|
50
48
|
.font-bold { font-weight: var(--font-weight-bold); }
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
/* Generated by Glyphter (http://www.glyphter.com) on Fri Jan 20 2023*/
|
|
4
4
|
@font-face {
|
|
5
5
|
font-family: 'utah design system';
|
|
6
|
-
src: url('/fonts/utah-design-system.eot');
|
|
7
|
-
src: url('/fonts/utah-design-system.eot?#iefix') format('embedded-opentype'),
|
|
8
|
-
url('/fonts/utah-design-system.woff') format('woff'),
|
|
9
|
-
url('/fonts/utah-design-system.ttf') format('truetype'),
|
|
10
|
-
url('/fonts/utah-design-system.svg#utah-design-system') format('svg');
|
|
6
|
+
src: url('https://cdn.utah.gov/design-system/fonts/utah-design-system.eot');
|
|
7
|
+
src: url('https://cdn.utah.gov/design-system/fonts/utah-design-system.eot?#iefix') format('embedded-opentype'),
|
|
8
|
+
url('https://cdn.utah.gov/design-system/fonts/utah-design-system.woff') format('woff'),
|
|
9
|
+
url('https://cdn.utah.gov/design-system/fonts/utah-design-system.ttf') format('truetype'),
|
|
10
|
+
url('https://cdn.utah.gov/design-system/fonts/utah-design-system.svg#utah-design-system') format('svg');
|
|
11
11
|
font-weight: normal;
|
|
12
12
|
font-style: normal;
|
|
13
13
|
}
|
|
@@ -201,7 +201,19 @@
|
|
|
201
201
|
.utds-icon-after-copy::after {
|
|
202
202
|
content: '\0067';
|
|
203
203
|
}
|
|
204
|
-
}
|
|
205
204
|
|
|
205
|
+
.utds-icon-before-home-menu::before,
|
|
206
|
+
.utds-icon-after-home-menu::after {
|
|
207
|
+
content: '\0068';
|
|
208
|
+
}
|
|
206
209
|
|
|
210
|
+
.utds-icon-before-hamburger::before,
|
|
211
|
+
.utds-icon-after-hamburger::after {
|
|
212
|
+
content: '\0069';
|
|
213
|
+
}
|
|
207
214
|
|
|
215
|
+
.utds-icon-before-account::before,
|
|
216
|
+
.utds-icon-after-account::after {
|
|
217
|
+
content: '\006a';
|
|
218
|
+
}
|
|
219
|
+
}
|
|
@@ -110,20 +110,30 @@ variables and settings
|
|
|
110
110
|
.secondary-color-light-background { background-color: var(--secondary-color-light); }
|
|
111
111
|
.gray-on-secondary-background { background-color: var(--gray-on-secondary-color); }
|
|
112
112
|
|
|
113
|
-
.secondary-color { color: var(--secondary-color) }
|
|
114
|
-
.secondary-color-border { border-color: var(--secondary-color) }
|
|
113
|
+
.secondary-color { color: var(--secondary-color) }
|
|
114
|
+
.secondary-color-border { border-color: var(--secondary-color) }
|
|
115
115
|
|
|
116
116
|
.accent-color-background { background-color: var(--accent-color); }
|
|
117
117
|
.accent-color-dark-background { background-color: var(--accent-color-dark); }
|
|
118
118
|
.accent-color-light-background { background-color: var(--accent-color-light); }
|
|
119
119
|
.gray-on-accent-background { background-color: var(--gray-on-accent-color); }
|
|
120
120
|
|
|
121
|
-
.accent-color { color: var(--accent-color) }
|
|
122
|
-
.accent-color-border { border-color: var(--accent-color) }
|
|
121
|
+
.accent-color { color: var(--accent-color) }
|
|
122
|
+
.accent-color-border { border-color: var(--accent-color) }
|
|
123
123
|
|
|
124
124
|
.gray-color-background { background-color: var(--gray-color); }
|
|
125
125
|
.gray-color-light-background { background-color: var(--gray-light-color) }
|
|
126
126
|
|
|
127
127
|
.white-color { color: white; }
|
|
128
128
|
|
|
129
|
+
.background-frosted-dark {
|
|
130
|
+
background: rgba(0,0,0,0.6);
|
|
131
|
+
backdrop-filter: blur(16px) brightness(1.5);
|
|
132
|
+
-webkit-backdrop-filter: blur(16px) brightness(1.5);
|
|
133
|
+
}
|
|
129
134
|
|
|
135
|
+
.background-frosted-light {
|
|
136
|
+
background: rgba(255,255,255,0.1);
|
|
137
|
+
backdrop-filter: blur(16px);
|
|
138
|
+
-webkit-backdrop-filter: blur(16px);
|
|
139
|
+
}
|
|
@@ -45,3 +45,23 @@ scss mixins and functions
|
|
|
45
45
|
@include form-ele-focus-appearance;
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
|
+
|
|
49
|
+
@mixin selected-vertical-menu-item {
|
|
50
|
+
&.menu-item--selected {
|
|
51
|
+
font-weight: bold;
|
|
52
|
+
border-top-left-radius: 0;
|
|
53
|
+
border-bottom-left-radius: 0;
|
|
54
|
+
box-shadow: inset 0 0 0 1000px var(--hover-gray-color);
|
|
55
|
+
//a chiclet
|
|
56
|
+
&::after {
|
|
57
|
+
content: '';
|
|
58
|
+
position: absolute;
|
|
59
|
+
left: -3px;
|
|
60
|
+
top: 0;
|
|
61
|
+
width: 5px;
|
|
62
|
+
height: 100%;
|
|
63
|
+
background: var(--primary-color);
|
|
64
|
+
border-radius: var(--radius-circle);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
@@ -66,8 +66,16 @@ elemental html: h1, h2, h3, ul, li, etc.
|
|
|
66
66
|
background: var(--gray-light-color);
|
|
67
67
|
padding: var(--spacing-s) var(--spacing);
|
|
68
68
|
border-radius: var(--radius-medium);
|
|
69
|
+
&--overflow {
|
|
70
|
+
width: 100%;
|
|
71
|
+
overflow-x: scroll;
|
|
72
|
+
box-sizing: border-box;
|
|
73
|
+
}
|
|
69
74
|
}
|
|
70
75
|
}
|
|
76
|
+
.gray-block__overflow-content {
|
|
77
|
+
width: max-content;
|
|
78
|
+
}
|
|
71
79
|
|
|
72
80
|
ul, ol {
|
|
73
81
|
padding: 0 0 0 var(--spacing-2xl);
|
|
@@ -82,7 +90,7 @@ elemental html: h1, h2, h3, ul, li, etc.
|
|
|
82
90
|
border-top: 1px solid var(--gray-border);
|
|
83
91
|
}
|
|
84
92
|
|
|
85
|
-
a[href] {
|
|
93
|
+
a[href]:not(.button) {
|
|
86
94
|
color: var(--primary-color);
|
|
87
95
|
&:hover {
|
|
88
96
|
box-shadow: -3px -1px 0 0px var(--hover-gray-color-opaque),
|
|
@@ -19,7 +19,10 @@ component specific, BEM (Block, Element, Modifier)
|
|
|
19
19
|
@use "base-components/navigation/main-menu";
|
|
20
20
|
@use "base-components/navigation/menu-item";
|
|
21
21
|
@use "base-components/navigation/side-panel-navigation";
|
|
22
|
+
@use "base-components/navigation/vertical-menu";
|
|
23
|
+
@use "base-components/navigation/mega-menu";
|
|
22
24
|
@use "base-components/popups/popups";
|
|
25
|
+
@use "base-components/popups/tooltips";
|
|
23
26
|
@use "base-components/templates/documenation-template";
|
|
24
27
|
@use "base-components/templates/landing-page-template";
|
|
25
28
|
@use "base-components/forms/input";
|
|
@@ -170,16 +170,12 @@ input[type=checkbox].switch {
|
|
|
170
170
|
}
|
|
171
171
|
|
|
172
172
|
.switch-old::after {
|
|
173
|
-
left: 1px;
|
|
174
173
|
top: 4px;
|
|
175
174
|
background-color: #fff;
|
|
176
175
|
border-radius: 50%;
|
|
177
176
|
width: 14px;
|
|
178
177
|
height: 14px;
|
|
179
178
|
border: 1px solid color-swatches.$warm-gray-08;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
.switch-old::after {
|
|
183
179
|
left: 16px;
|
|
184
180
|
border-color: color-swatches.$aspen-green-08;
|
|
185
181
|
color: color-swatches.$aspen-green-08;
|
|
@@ -2,21 +2,41 @@
|
|
|
2
2
|
@use "../../../1-settings/color-swatches";
|
|
3
3
|
|
|
4
4
|
#{class-vars.$base-class} {
|
|
5
|
-
.menu
|
|
6
|
-
|
|
5
|
+
.main-menu {
|
|
6
|
+
&__wrapper {
|
|
7
|
+
background-color: var(--gray-light-color);
|
|
8
|
+
display: flex;
|
|
9
|
+
justify-content: space-between;
|
|
10
|
+
align-items: center;
|
|
11
|
+
padding: 0 var(--spacing-l) 0 var(--spacing-xs);
|
|
12
|
+
|
|
13
|
+
.utds-icon-before-search::before {
|
|
14
|
+
font-size: 1.1rem;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
7
17
|
|
|
8
|
-
|
|
18
|
+
.menu-item__search {
|
|
19
|
+
margin-left: auto;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
&__search-placeholder {
|
|
23
|
+
height: var(--form-ele-medium);
|
|
24
|
+
width: var(--form-ele-medium);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.horizontal-menu {
|
|
29
|
+
&>ul {
|
|
9
30
|
list-style-type: none;
|
|
10
31
|
display: flex;
|
|
11
|
-
margin: 0 var(--spacing-xs) 0 var(--spacing-xs);
|
|
12
32
|
padding: 0;
|
|
13
33
|
li {
|
|
14
34
|
|
|
15
|
-
|
|
16
|
-
|
|
35
|
+
.menu-item__title {
|
|
36
|
+
position: relative;
|
|
17
37
|
}
|
|
18
38
|
|
|
19
|
-
a {
|
|
39
|
+
a[href], button {
|
|
20
40
|
display: flex;
|
|
21
41
|
align-items: center;
|
|
22
42
|
text-decoration: none;
|
|
@@ -29,19 +49,8 @@
|
|
|
29
49
|
box-sizing: border-box;
|
|
30
50
|
font-size: var(--font-size);
|
|
31
51
|
font-weight: var(--font-weight-semi-bold);
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
content: "";
|
|
35
|
-
width: 100%;
|
|
36
|
-
height: var(--spacing-2xs);
|
|
37
|
-
background: transparent;
|
|
38
|
-
display: block;
|
|
39
|
-
position: absolute;
|
|
40
|
-
top: -9px;
|
|
41
|
-
left: 0;
|
|
42
|
-
border-bottom-left-radius: var(--spacing-2xs);
|
|
43
|
-
border-bottom-right-radius: var(--spacing-2xs);
|
|
44
|
-
}
|
|
52
|
+
min-height: auto;
|
|
53
|
+
line-height: 1.7;
|
|
45
54
|
|
|
46
55
|
.icon-chevron-down {
|
|
47
56
|
font-size: 1rem;
|
|
@@ -52,16 +61,23 @@
|
|
|
52
61
|
color: black;
|
|
53
62
|
box-shadow: inset 0 0 0 1000px var(--hover-gray-color);
|
|
54
63
|
}
|
|
55
|
-
|
|
64
|
+
|
|
65
|
+
&.menu-item--selected + span.menu-chiclet {
|
|
56
66
|
&::after {
|
|
67
|
+
content: "";
|
|
68
|
+
width: 100%;
|
|
69
|
+
height: var(--spacing-2xs);
|
|
57
70
|
background: var(--primary-color);
|
|
71
|
+
display: block;
|
|
72
|
+
position: absolute;
|
|
73
|
+
top: 0;
|
|
74
|
+
left: 0;
|
|
75
|
+
border-bottom-left-radius: var(--spacing-2xs);
|
|
76
|
+
border-bottom-right-radius: var(--spacing-2xs);
|
|
77
|
+
outline: none;
|
|
78
|
+
outline-offset: 0;
|
|
58
79
|
}
|
|
59
80
|
}
|
|
60
|
-
|
|
61
|
-
.menu-item__search-icon {
|
|
62
|
-
font-size: var(--font-size-l);
|
|
63
|
-
line-height: 1rem;
|
|
64
|
-
}
|
|
65
81
|
}
|
|
66
82
|
}
|
|
67
83
|
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
@use "../../../1-settings/class-vars";
|
|
2
|
+
@use "../../../1-settings/color-swatches";
|
|
3
|
+
|
|
4
|
+
#{class-vars.$base-class} {
|
|
5
|
+
.menu-item--mega-menu {
|
|
6
|
+
.popup__content {
|
|
7
|
+
padding: var(--spacing) var(--spacing-l);
|
|
8
|
+
&>ul {
|
|
9
|
+
display: flex;
|
|
10
|
+
gap: var(--spacing-xl);
|
|
11
|
+
|
|
12
|
+
&>li {
|
|
13
|
+
font-weight: bold;
|
|
14
|
+
font-size: var(--font-size-l);
|
|
15
|
+
|
|
16
|
+
&>ul {
|
|
17
|
+
font-size: var(--font-size);
|
|
18
|
+
font-weight: var(--font-weight-semi-bold);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
a[href].vertical-menu__link-title {
|
|
23
|
+
text-decoration: underline;
|
|
24
|
+
color: var(--primary-color);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
@use "../../../1-settings/class-vars";
|
|
2
|
+
@use "../../../2-tools/tools-index";
|
|
2
3
|
|
|
3
4
|
#{class-vars.$base-class} {
|
|
4
5
|
.menu-side-panel {
|
|
@@ -37,23 +38,7 @@
|
|
|
37
38
|
box-shadow: inset 0 0 0 1000px var(--hover-gray-color);
|
|
38
39
|
color: var(--primary-color);
|
|
39
40
|
}
|
|
40
|
-
|
|
41
|
-
font-weight: bold;
|
|
42
|
-
border-top-left-radius: 0;
|
|
43
|
-
border-bottom-left-radius: 0;
|
|
44
|
-
box-shadow: inset 0 0 0 1000px var(--hover-gray-color);
|
|
45
|
-
//a chiclet
|
|
46
|
-
&::after {
|
|
47
|
-
content: '';
|
|
48
|
-
position: absolute;
|
|
49
|
-
left: -3px;
|
|
50
|
-
top: 0;
|
|
51
|
-
width: 5px;
|
|
52
|
-
height: 100%;
|
|
53
|
-
background: var(--primary-color);
|
|
54
|
-
border-radius: var(--radius-circle);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
41
|
+
@include tools-index.selected-vertical-menu-item;
|
|
57
42
|
}
|
|
58
43
|
}
|
|
59
44
|
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
@use "../../../1-settings/class-vars";
|
|
2
|
+
@use "../../../2-tools/tools-index";
|
|
3
|
+
|
|
4
|
+
#{class-vars.$base-class} {
|
|
5
|
+
ul.vertical-menu {
|
|
6
|
+
list-style-type: none;
|
|
7
|
+
margin: 0;
|
|
8
|
+
padding: 0;
|
|
9
|
+
}
|
|
10
|
+
.vertical-menu {
|
|
11
|
+
li > ul {
|
|
12
|
+
padding-left: var(--spacing-s);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
button.vertical-menu__button-title,
|
|
16
|
+
a[href].vertical-menu__link-title {
|
|
17
|
+
border-radius: var(--radius-circle);
|
|
18
|
+
border: none;
|
|
19
|
+
box-shadow: none;
|
|
20
|
+
box-sizing: border-box;
|
|
21
|
+
color: var(--gray-color);
|
|
22
|
+
display: flex;
|
|
23
|
+
font-size: var(--font-size-2xs);
|
|
24
|
+
justify-content: flex-start;
|
|
25
|
+
line-height: 1.7;
|
|
26
|
+
margin: var(--spacing-2xs) 0;
|
|
27
|
+
min-height: unset;
|
|
28
|
+
padding: var(--spacing-2xs) var(--spacing);
|
|
29
|
+
text-align: left;
|
|
30
|
+
text-decoration: none;
|
|
31
|
+
width: 100%;
|
|
32
|
+
position: relative;
|
|
33
|
+
|
|
34
|
+
&:hover {
|
|
35
|
+
background: var(--hover-gray-color);
|
|
36
|
+
color: var(--primary-color);
|
|
37
|
+
box-shadow: none;
|
|
38
|
+
}
|
|
39
|
+
&:active {
|
|
40
|
+
transform: none;
|
|
41
|
+
}
|
|
42
|
+
@include tools-index.selected-vertical-menu-item;
|
|
43
|
+
}
|
|
44
|
+
a.vertical-menu__link-title {
|
|
45
|
+
&:hover {
|
|
46
|
+
box-shadow: none;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
&__link-text {
|
|
50
|
+
flex: 1 0 auto;
|
|
51
|
+
}
|
|
52
|
+
&__divider {
|
|
53
|
+
display: block;
|
|
54
|
+
margin: var(--spacing-s) var(--spacing-s);
|
|
55
|
+
height: 1px;
|
|
56
|
+
background-color: var(--gray-medium-light-color);
|
|
57
|
+
}
|
|
58
|
+
& .utds-icon-before-chevron-right {
|
|
59
|
+
font-size: .6rem;
|
|
60
|
+
line-height: .5;
|
|
61
|
+
transform: rotate(0deg);
|
|
62
|
+
transition: transform var(--timing-quick) ease;
|
|
63
|
+
&::before {
|
|
64
|
+
margin-right: 0;
|
|
65
|
+
}
|
|
66
|
+
&.is-open {
|
|
67
|
+
transform: rotate(90deg);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
@use "../../../1-settings/settings-index";
|
|
2
|
+
@use "../../../1-settings/class-vars";
|
|
3
|
+
@use "../../../1-settings/spacing";
|
|
4
|
+
|
|
5
|
+
#{class-vars.$base-class} {
|
|
6
|
+
.tooltip {
|
|
7
|
+
&__wrapper {
|
|
8
|
+
position: absolute;
|
|
9
|
+
z-index: 110;
|
|
10
|
+
background: none transparent;
|
|
11
|
+
// initial position so that the tooltip doesn't go off the screen
|
|
12
|
+
left: 0;
|
|
13
|
+
top: 0;
|
|
14
|
+
|
|
15
|
+
transition: opacity 100ms ease-in-out;
|
|
16
|
+
|
|
17
|
+
&--visible {
|
|
18
|
+
opacity: 1;
|
|
19
|
+
.tooltip__content {
|
|
20
|
+
transform: scale(1);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
&--hidden {
|
|
24
|
+
opacity: 0;
|
|
25
|
+
pointer-events: none;
|
|
26
|
+
.tooltip__content {
|
|
27
|
+
transform: scale(.7);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
&__content {
|
|
32
|
+
background: white;
|
|
33
|
+
border-radius: var(--radius-small);
|
|
34
|
+
background: var(--gray-color);
|
|
35
|
+
color: white;
|
|
36
|
+
box-sizing: border-box;
|
|
37
|
+
padding: var(--spacing-3xs) var(--spacing-s);
|
|
38
|
+
transition: transform 100ms ease-in-out;
|
|
39
|
+
box-shadow: var(--elevation-small);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
&__arrow {
|
|
43
|
+
visibility: hidden;
|
|
44
|
+
|
|
45
|
+
&, &::before {
|
|
46
|
+
position: absolute;
|
|
47
|
+
width: 6px;
|
|
48
|
+
height: 6px;
|
|
49
|
+
background: inherit;
|
|
50
|
+
z-index: -1;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
&::before {
|
|
54
|
+
visibility: visible;
|
|
55
|
+
content: '';
|
|
56
|
+
transform: rotate(45deg);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
&__wrapper[data-popper-placement^='top'] {
|
|
62
|
+
.tooltip__content {
|
|
63
|
+
transform-origin: bottom;
|
|
64
|
+
}
|
|
65
|
+
.tooltip__arrow {
|
|
66
|
+
bottom: -2px;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
&__wrapper[data-popper-placement^='bottom'] {
|
|
71
|
+
.tooltip__content {
|
|
72
|
+
transform-origin: top;
|
|
73
|
+
}
|
|
74
|
+
.tooltip__arrow {
|
|
75
|
+
top: -3px;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
&__wrapper[data-popper-placement^='left'] {
|
|
80
|
+
.tooltip__content {
|
|
81
|
+
transform-origin: right;
|
|
82
|
+
}
|
|
83
|
+
.tooltip__arrow {
|
|
84
|
+
right: -2px;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
&__wrapper[data-popper-placement^='right'] {
|
|
89
|
+
.tooltip__content {
|
|
90
|
+
transform-origin: left;
|
|
91
|
+
}
|
|
92
|
+
.tooltip__arrow {
|
|
93
|
+
left: -3px;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|