@grantcodes/ui 2.10.0 → 2.10.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.
- package/CHANGELOG.md +14 -0
- package/package.json +1 -1
- package/src/components/accordion/accordion.component.js +3 -1
- package/src/components/accordion/accordion.css +47 -42
- package/src/components/accordion/accordion.react.js +4 -4
- package/src/components/app-bar/app-bar.component.js +15 -9
- package/src/components/app-bar/app-bar.css +256 -250
- package/src/components/app-bar/app-bar.react.js +4 -4
- package/src/components/app-bar/app-bar.test.js +1 -3
- package/src/components/app-bar/nav-link.component.js +3 -1
- package/src/components/app-bar/nav-link.css +50 -45
- package/src/components/app-bar/nav-link.react.js +4 -4
- package/src/components/avatar/avatar.css +19 -21
- package/src/components/avatar/avatar.react.js +4 -4
- package/src/components/badge/badge.css +51 -51
- package/src/components/badge/badge.react.js +4 -4
- package/src/components/breadcrumb/breadcrumb.component.js +3 -1
- package/src/components/breadcrumb/breadcrumb.css +73 -73
- package/src/components/breadcrumb/breadcrumb.react.js +8 -5
- package/src/components/button/button.component.js +3 -1
- package/src/components/button/button.css +38 -38
- package/src/components/button/button.react.js +4 -4
- package/src/components/button-group/button-group.css +33 -33
- package/src/components/button-group/button-group.react.js +4 -4
- package/src/components/card/card.css +150 -150
- package/src/components/card/card.react.js +4 -4
- package/src/components/code-preview/code-preview.css +11 -12
- package/src/components/code-preview/code-preview.react.js +4 -4
- package/src/components/container/container.css +37 -37
- package/src/components/container/container.react.js +4 -4
- package/src/components/countdown/countdown.component.js +5 -3
- package/src/components/countdown/countdown.stories.js +1 -2
- package/src/components/cta/cta.css +55 -55
- package/src/components/cta/cta.react.js +4 -4
- package/src/components/dialog/dialog.css +48 -49
- package/src/components/dialog/dialog.react.js +4 -4
- package/src/components/dropdown/dropdown.css +123 -121
- package/src/components/dropdown/dropdown.react.js +5 -5
- package/src/components/dropzone/dropzone.css +5 -3
- package/src/components/dropzone/dropzone.react.js +4 -4
- package/src/components/feature-list/feature-list.css +71 -71
- package/src/components/feature-list/feature-list.react.js +4 -4
- package/src/components/footer/footer-column.css +39 -39
- package/src/components/footer/footer.css +68 -69
- package/src/components/footer/footer.react.js +5 -5
- package/src/components/form-field/form-field.css +40 -40
- package/src/components/form-field/form-field.react.js +4 -4
- package/src/components/gallery/gallery-image.react.js +4 -4
- package/src/components/gallery/gallery.css +72 -72
- package/src/components/gallery/gallery.react.js +4 -4
- package/src/components/gallery/gallery.test.js +5 -1
- package/src/components/hero/hero.css +61 -57
- package/src/components/hero/hero.react.js +4 -4
- package/src/components/icon/icon.css +27 -27
- package/src/components/icon/icon.react.js +4 -4
- package/src/components/loading/loading.css +30 -31
- package/src/components/loading/loading.react.js +4 -4
- package/src/components/logo-cloud/logo-cloud.css +60 -60
- package/src/components/logo-cloud/logo-cloud.react.js +4 -4
- package/src/components/map/map.component.js +3 -4
- package/src/components/map/map.css +36 -36
- package/src/components/media-text/media-text.css +58 -58
- package/src/components/media-text/media-text.react.js +4 -4
- package/src/components/newsletter/newsletter.css +78 -78
- package/src/components/newsletter/newsletter.react.js +4 -4
- package/src/components/notice/notice.css +38 -38
- package/src/components/notice/notice.react.js +4 -4
- package/src/components/pagination/pagination.css +6 -7
- package/src/components/pagination/pagination.react.js +4 -4
- package/src/components/pricing/pricing.css +137 -137
- package/src/components/pricing/pricing.react.js +4 -4
- package/src/components/sidebar/sidebar.component.js +3 -1
- package/src/components/sidebar/sidebar.css +180 -180
- package/src/components/sidebar/sidebar.react.js +4 -4
- package/src/components/stats/stats.css +58 -58
- package/src/components/stats/stats.react.js +4 -4
- package/src/components/tabs/internal/tabs-button.component.js +3 -1
- package/src/components/tabs/internal/tabs-button.react.js +4 -4
- package/src/components/tabs/tab.component.js +3 -1
- package/src/components/tabs/tab.react.js +4 -4
- package/src/components/tabs/tabs.component.js +3 -1
- package/src/components/tabs/tabs.css +82 -82
- package/src/components/tabs/tabs.react.js +4 -4
- package/src/components/testimonials/testimonials.css +72 -72
- package/src/components/testimonials/testimonials.react.js +4 -4
- package/src/components/toast/toast.component.js +3 -1
- package/src/components/toast/toast.css +198 -198
- package/src/components/toast/toast.react.js +5 -5
- package/src/components/tooltip/tooltip.css +52 -51
- package/src/components/tooltip/tooltip.react.js +4 -4
- package/src/css/elements/forms/input.css +1 -1
- package/src/css/reset.css +102 -102
- package/src/css/typography.css +13 -11
- package/src/exports.test.js +101 -95
- package/src/lib/styles/all.css +37 -37
- package/src/lib/styles/focus-ring.css +20 -20
- package/src/react.js +45 -39
- package/vite-plugin-css-import-attributes.js +5 -2
|
@@ -1,198 +1,198 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
1
|
+
*,
|
|
2
|
+
*::before,
|
|
3
|
+
*::after {
|
|
4
|
+
box-sizing: border-box;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
:host {
|
|
8
|
+
display: block;
|
|
9
|
+
pointer-events: none;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/* Toast Container */
|
|
13
|
+
.toast-container {
|
|
14
|
+
position: fixed;
|
|
15
|
+
z-index: 9999;
|
|
16
|
+
display: flex;
|
|
17
|
+
flex-direction: column;
|
|
18
|
+
gap: var(--g-theme-spacing-sm);
|
|
19
|
+
padding: var(--g-theme-spacing-md);
|
|
20
|
+
pointer-events: none;
|
|
21
|
+
max-inline-size: 100vw;
|
|
22
|
+
max-block-size: 100vh;
|
|
23
|
+
overflow: hidden;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/* Container positions */
|
|
27
|
+
.toast-container--top-left {
|
|
28
|
+
inset-block-start: 0;
|
|
29
|
+
inset-inline-start: 0;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.toast-container--top-center {
|
|
33
|
+
inset-block-start: 0;
|
|
34
|
+
inset-inline-start: 50%;
|
|
35
|
+
transform: translateX(-50%);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.toast-container--top-right {
|
|
39
|
+
inset-block-start: 0;
|
|
40
|
+
inset-inline-end: 0;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.toast-container--bottom-left {
|
|
44
|
+
inset-block-end: 0;
|
|
45
|
+
inset-inline-start: 0;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.toast-container--bottom-center {
|
|
49
|
+
inset-block-end: 0;
|
|
50
|
+
inset-inline-start: 50%;
|
|
51
|
+
transform: translateX(-50%);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.toast-container--bottom-right {
|
|
55
|
+
inset-block-end: 0;
|
|
56
|
+
inset-inline-end: 0;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/* Toast */
|
|
60
|
+
.toast {
|
|
61
|
+
display: flex;
|
|
62
|
+
align-items: flex-start;
|
|
63
|
+
gap: var(--g-theme-spacing-sm);
|
|
64
|
+
min-inline-size: 300px;
|
|
65
|
+
max-inline-size: 500px;
|
|
66
|
+
padding-block: var(--g-theme-spacing-md);
|
|
67
|
+
padding-inline: var(--g-theme-spacing-md);
|
|
68
|
+
border-radius: var(--g-theme-border-radius-md);
|
|
69
|
+
background-color: var(--g-theme-color-background-default);
|
|
70
|
+
border-inline-start-width: 4px;
|
|
71
|
+
border-inline-start-style: solid;
|
|
72
|
+
pointer-events: auto;
|
|
73
|
+
opacity: 0;
|
|
74
|
+
transform: translateY(-1rem);
|
|
75
|
+
transition:
|
|
76
|
+
opacity 0.3s ease,
|
|
77
|
+
transform 0.3s ease;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.toast--visible {
|
|
81
|
+
opacity: 1;
|
|
82
|
+
transform: translateY(0);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/* Variant colors */
|
|
86
|
+
.toast--info {
|
|
87
|
+
border-inline-start-color: var(--g-theme-color-background-utility-info);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.toast--success {
|
|
91
|
+
border-inline-start-color: var(--g-theme-color-background-utility-success);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.toast--warning {
|
|
95
|
+
border-inline-start-color: var(--g-theme-color-background-utility-warning);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.toast--error {
|
|
99
|
+
border-inline-start-color: var(--g-theme-color-background-utility-error);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/* Toast icon */
|
|
103
|
+
.toast__icon {
|
|
104
|
+
flex-shrink: 0;
|
|
105
|
+
inline-size: 1.5rem;
|
|
106
|
+
block-size: 1.5rem;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.toast--info .toast__icon {
|
|
110
|
+
color: var(--g-theme-color-background-utility-info);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.toast--success .toast__icon {
|
|
114
|
+
color: var(--g-theme-color-background-utility-success);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.toast--warning .toast__icon {
|
|
118
|
+
color: var(--g-theme-color-background-utility-warning);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.toast--error .toast__icon {
|
|
122
|
+
color: var(--g-theme-color-background-utility-error);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/* Toast content */
|
|
126
|
+
.toast__content {
|
|
127
|
+
flex: 1;
|
|
128
|
+
min-inline-size: 0;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.toast__title {
|
|
132
|
+
font-weight: var(--g-typography-font-weight-600);
|
|
133
|
+
font-size: var(--g-typography-font-size-16);
|
|
134
|
+
margin-block-end: 0.25rem;
|
|
135
|
+
color: var(--g-theme-color-content-default);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.toast__message {
|
|
139
|
+
font-size: var(--g-typography-font-size-14);
|
|
140
|
+
color: var(--g-theme-color-content-subtle);
|
|
141
|
+
line-height: 1.5;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/* Close button */
|
|
145
|
+
.toast__close {
|
|
146
|
+
all: unset;
|
|
147
|
+
flex-shrink: 0;
|
|
148
|
+
inline-size: 1.5rem;
|
|
149
|
+
block-size: 1.5rem;
|
|
150
|
+
display: inline-flex;
|
|
151
|
+
align-items: center;
|
|
152
|
+
justify-content: center;
|
|
153
|
+
border-radius: var(--g-theme-border-radius-md);
|
|
154
|
+
color: var(--g-theme-color-content-subtle);
|
|
155
|
+
cursor: pointer;
|
|
156
|
+
transition: all 0.2s ease;
|
|
157
|
+
margin-inline-start: 0.5rem;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.toast__close:hover {
|
|
161
|
+
color: var(--g-theme-color-content-default);
|
|
162
|
+
background-color: var(--g-theme-color-background-subtle-hover);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/* Bottom position toasts slide up instead of down */
|
|
166
|
+
.toast--bottom-left,
|
|
167
|
+
.toast--bottom-center,
|
|
168
|
+
.toast--bottom-right {
|
|
169
|
+
transform: translateY(1rem);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.toast--bottom-left.toast--visible,
|
|
173
|
+
.toast--bottom-center.toast--visible,
|
|
174
|
+
.toast--bottom-right.toast--visible {
|
|
175
|
+
transform: translateY(0);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
/* Responsive */
|
|
179
|
+
@media (max-width: 640px) {
|
|
180
|
+
.toast-container {
|
|
181
|
+
inset-inline: 0;
|
|
182
|
+
transform: none;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.toast {
|
|
186
|
+
min-inline-size: auto;
|
|
187
|
+
inline-size: 100%;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
/* View transitions */
|
|
192
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
193
|
+
@supports (view-transition-name: auto) {
|
|
194
|
+
.toast {
|
|
195
|
+
view-transition-name: toast;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React from "react"
|
|
2
|
-
import { createComponent } from "@lit/react"
|
|
3
|
-
import { GrantCodesToast, GrantCodesToastContainer } from "./toast.js"
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { createComponent } from "@lit/react";
|
|
3
|
+
import { GrantCodesToast, GrantCodesToastContainer } from "./toast.js";
|
|
4
4
|
|
|
5
5
|
export const Toast = createComponent({
|
|
6
6
|
tagName: "grantcodes-toast",
|
|
@@ -9,10 +9,10 @@ export const Toast = createComponent({
|
|
|
9
9
|
events: {
|
|
10
10
|
onDismiss: "dismiss",
|
|
11
11
|
},
|
|
12
|
-
})
|
|
12
|
+
});
|
|
13
13
|
|
|
14
14
|
export const ToastContainer = createComponent({
|
|
15
15
|
tagName: "grantcodes-toast-container",
|
|
16
16
|
elementClass: GrantCodesToastContainer,
|
|
17
17
|
react: React,
|
|
18
|
-
})
|
|
18
|
+
});
|
|
@@ -1,78 +1,79 @@
|
|
|
1
1
|
*,
|
|
2
2
|
*::before,
|
|
3
3
|
*::after {
|
|
4
|
-
|
|
4
|
+
box-sizing: border-box;
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
:host,
|
|
8
8
|
.tooltip,
|
|
9
9
|
.tooltip__slot {
|
|
10
|
-
|
|
10
|
+
width: fit-content;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
.tooltip {
|
|
14
|
-
|
|
14
|
+
position: relative;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
.tooltip__slot {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
padding: var(--g-theme-spacing-sm);
|
|
19
|
+
margin: calc(-1 * var(--g-theme-spacing-sm));
|
|
20
|
+
/* Anchor name will be set via JavaScript to include unique ID */
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
.tooltip__content {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
24
|
+
display: none;
|
|
25
|
+
width: fit-content;
|
|
26
|
+
margin: 0;
|
|
27
|
+
max-width: 100%;
|
|
28
|
+
min-width: 6rem;
|
|
29
|
+
z-index: 100;
|
|
30
|
+
border-radius: var(--g-theme-border-radius-md);
|
|
31
|
+
padding: 0.6em 1em;
|
|
32
|
+
font-size: var(--g-typography-font-size-14);
|
|
33
|
+
line-height: 1;
|
|
34
|
+
color: var(--g-theme-color-primary-900);
|
|
35
|
+
background-color: var(--g-theme-color-primary-100);
|
|
36
|
+
box-shadow:
|
|
37
|
+
0 1px 3px rgba(0, 0, 0, 0.12),
|
|
38
|
+
0 1px 2px rgba(0, 0, 0, 0.24);
|
|
39
|
+
user-select: none;
|
|
40
|
+
text-align: center;
|
|
41
|
+
opacity: 0;
|
|
42
|
+
transition: opacity 0.2s;
|
|
43
|
+
transition-behavior: allow-discrete;
|
|
44
|
+
|
|
45
|
+
/* Modern CSS Anchor Positioning API */
|
|
46
|
+
/* This positions the tooltip relative to its anchor (the slot) */
|
|
47
|
+
position: absolute;
|
|
48
|
+
|
|
49
|
+
/* Try anchor positioning first (modern browsers) */
|
|
50
|
+
position-anchor: var(--tooltip-anchor, none);
|
|
51
|
+
position-area: block-end;
|
|
52
|
+
margin-block-start: 0.5rem;
|
|
53
|
+
|
|
54
|
+
/* Fallback for browsers without anchor positioning support */
|
|
55
|
+
@supports not (position-area: block-end) {
|
|
56
|
+
/* Traditional positioning as fallback */
|
|
57
|
+
position: absolute;
|
|
58
|
+
top: 100%;
|
|
59
|
+
left: 50%;
|
|
60
|
+
transform: translateX(-50%);
|
|
61
|
+
margin-top: 0.5rem;
|
|
62
|
+
}
|
|
61
63
|
}
|
|
62
64
|
|
|
63
65
|
.tooltip__slot:hover + .tooltip__content,
|
|
64
66
|
.tooltip__slot:focus + .tooltip__content,
|
|
65
67
|
.tooltip__slot:focus-within + .tooltip__content {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
+
display: block;
|
|
69
|
+
opacity: 1;
|
|
68
70
|
}
|
|
69
71
|
|
|
70
72
|
/* Optional: Position tooltip above when near bottom of viewport */
|
|
71
73
|
@media (prefers-reduced-motion: no-preference) {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
74
|
+
.tooltip__content {
|
|
75
|
+
@starting-style {
|
|
76
|
+
opacity: 0;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
77
79
|
}
|
|
78
|
-
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import React from "react"
|
|
2
|
-
import { createComponent } from "@lit/react"
|
|
3
|
-
import { GrantCodesTooltip } from "./tooltip.js"
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { createComponent } from "@lit/react";
|
|
3
|
+
import { GrantCodesTooltip } from "./tooltip.js";
|
|
4
4
|
|
|
5
5
|
export const Tooltip = createComponent({
|
|
6
6
|
tagName: "grantcodes-tooltip",
|
|
7
7
|
elementClass: GrantCodesTooltip,
|
|
8
8
|
react: React,
|
|
9
|
-
})
|
|
9
|
+
});
|