@grantcodes/ui 2.1.1 → 2.2.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/CHANGELOG.md +21 -0
- package/css-import-attributes.d.ts +13 -0
- package/package.json +16 -4
- package/src/components/accordion/accordion.component.js +3 -2
- package/src/components/accordion/{accordion.styles.js → accordion.css} +0 -7
- package/src/components/app-bar/app-bar.component.js +7 -5
- package/src/components/app-bar/{app-bar.styles.js → app-bar.css} +0 -7
- package/src/components/avatar/avatar.component.js +1 -1
- package/src/components/avatar/{avatar.styles.js → avatar.css} +0 -4
- package/src/components/badge/badge.component.js +5 -4
- package/src/components/badge/badge.css +87 -0
- package/src/components/breadcrumb/breadcrumb.component.js +4 -3
- package/src/components/breadcrumb/{breadcrumb.styles.js → breadcrumb.css} +0 -7
- package/src/components/button/button.component.js +3 -2
- package/src/components/button/button.css +62 -0
- package/src/components/button-group/button-group.component.js +1 -1
- package/src/components/button-group/{button-group.styles.js → button-group.css} +0 -4
- package/src/components/card/card.component.js +1 -1
- package/src/components/card/{card.styles.js → card.css} +0 -4
- package/src/components/code-preview/code-preview.component.js +1 -1
- package/src/components/code-preview/{code-preview.styles.js → code-preview.css} +0 -4
- package/src/components/container/container.component.js +5 -4
- package/src/components/container/{container.styles.js → container.css} +0 -8
- package/src/components/cta/cta.component.js +1 -1
- package/src/components/cta/{cta.styles.js → cta.css} +0 -4
- package/src/components/dialog/dialog.component.js +1 -1
- package/src/components/dialog/{dialog.styles.js → dialog.css} +0 -4
- package/src/components/dropdown/dropdown.component.js +1 -1
- package/src/components/dropdown/{dropdown.styles.js → dropdown.css} +0 -4
- package/src/components/dropzone/dropzone.component.js +5 -4
- package/src/components/dropzone/{dropzone.styles.js → dropzone.css} +0 -4
- package/src/components/feature-list/feature-list.component.js +1 -1
- package/src/components/feature-list/{feature-list.styles.js → feature-list.css} +0 -4
- package/src/components/footer/footer-column.component.js +1 -1
- package/src/components/footer/{footer-column.styles.js → footer-column.css} +0 -4
- package/src/components/footer/footer.component.js +1 -1
- package/src/components/footer/{footer.styles.js → footer.css} +0 -4
- package/src/components/form-field/form-field.component.js +12 -22
- package/src/components/form-field/{form-field.styles.js → form-field.css} +0 -4
- package/src/components/gallery/gallery-image.component.js +1 -1
- package/src/components/gallery/gallery.component.js +1 -1
- package/src/components/gallery/{gallery.styles.js → gallery.css} +0 -4
- package/src/components/hero/hero.component.js +1 -1
- package/src/components/hero/{hero.styles.js → hero.css} +0 -4
- package/src/components/icon/icon.component.js +1 -1
- package/src/components/icon/{icon.styles.js → icon.css} +0 -4
- package/src/components/loading/loading.component.js +1 -1
- package/src/components/loading/{loading.styles.js → loading.css} +0 -4
- package/src/components/logo-cloud/logo-cloud.component.js +1 -1
- package/src/components/logo-cloud/{logo-cloud.styles.js → logo-cloud.css} +0 -4
- package/src/components/media-text/media-text.component.js +1 -1
- package/src/components/media-text/{media-text.styles.js → media-text.css} +0 -4
- package/src/components/newsletter/newsletter.component.js +1 -1
- package/src/components/newsletter/{newsletter.styles.js → newsletter.css} +0 -4
- package/src/components/notice/notice.component.js +7 -3
- package/src/components/notice/{notice.styles.js → notice.css} +0 -4
- package/src/components/pagination/pagination.component.js +1 -1
- package/src/components/pagination/{pagination.styles.js → pagination.css} +0 -4
- package/src/components/pricing/pricing.component.js +1 -1
- package/src/components/pricing/{pricing.styles.js → pricing.css} +0 -4
- package/src/components/sidebar/sidebar.component.js +7 -5
- package/src/components/sidebar/{sidebar.styles.js → sidebar.css} +0 -7
- package/src/components/stats/stats.component.js +1 -1
- package/src/components/stats/{stats.styles.js → stats.css} +0 -4
- package/src/components/tabs/internal/tabs-button.component.js +3 -2
- package/src/components/tabs/tab.component.js +3 -2
- package/src/components/tabs/tabs.component.js +3 -2
- package/src/components/tabs/{tabs.styles.js → tabs.css} +0 -7
- package/src/components/testimonials/testimonials.component.js +1 -1
- package/src/components/testimonials/{testimonials.styles.js → testimonials.css} +0 -4
- package/src/components/toast/toast.component.js +11 -8
- package/src/components/toast/{toast.styles.js → toast.css} +0 -7
- package/src/components/tooltip/tooltip.component.js +1 -1
- package/src/components/tooltip/{tooltip.styles.js → tooltip.css} +1 -6
- package/src/exports.test.js +119 -0
- package/src/lib/styles/focus-ring.css +30 -0
- package/vite-plugin-css-import-attributes.js +96 -0
- package/src/components/badge/badge.styles.js +0 -91
- package/src/components/button/button.styles.js +0 -69
- package/src/lib/classnames.js +0 -61
- package/src/lib/styles/focus-ring.styles.js +0 -34
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { LitElement, html } from "lit";
|
|
2
2
|
import { unsafeHTML } from "lit/directives/unsafe-html.js";
|
|
3
3
|
import * as icons from "lucide-static";
|
|
4
|
-
import
|
|
4
|
+
import featureListStyles from "./feature-list.css" with { type: "css" };
|
|
5
5
|
import "../icon/icon.js";
|
|
6
6
|
|
|
7
7
|
export class GrantCodesFeatureList extends LitElement {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LitElement } from "lit";
|
|
2
2
|
import { html } from "lit/static-html.js";
|
|
3
|
-
import
|
|
3
|
+
import footerColumnStyles from "./footer-column.css" with { type: "css" };
|
|
4
4
|
|
|
5
5
|
export class GrantCodesFooterColumn extends LitElement {
|
|
6
6
|
static styles = [footerColumnStyles];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LitElement } from "lit";
|
|
2
2
|
import { html } from "lit/static-html.js";
|
|
3
|
-
import
|
|
3
|
+
import footerStyles from "./footer.css" with { type: "css" };
|
|
4
4
|
|
|
5
5
|
export class GrantCodesFooter extends LitElement {
|
|
6
6
|
static styles = [footerStyles];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { LitElement } from "lit";
|
|
2
2
|
import { html } from "lit/static-html.js";
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
3
|
+
import formFieldStyles from "./form-field.css" with { type: "css" };
|
|
4
|
+
import { classMap } from "lit/directives/class-map.js";
|
|
5
5
|
import { generateId } from "../../lib/generate-id.js";
|
|
6
6
|
|
|
7
7
|
export class GrantCodesFormField extends LitElement {
|
|
@@ -129,34 +129,24 @@ export class GrantCodesFormField extends LitElement {
|
|
|
129
129
|
`;
|
|
130
130
|
}
|
|
131
131
|
|
|
132
|
-
/**
|
|
133
|
-
* Template for a group of form components
|
|
134
|
-
*
|
|
135
|
-
* @param {string} className html class attribute
|
|
136
|
-
*
|
|
137
|
-
* @return {} [return description]
|
|
138
|
-
*/
|
|
139
|
-
groupTemplate(className) {
|
|
140
|
-
return html`
|
|
141
|
-
<fieldset class="${className}">
|
|
142
|
-
<legend class="form-field__label">${this.label}</legend>
|
|
143
|
-
<slot></slot>
|
|
144
|
-
${this.errorTemplate()}
|
|
145
|
-
</fieldset>
|
|
146
|
-
`;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
132
|
render() {
|
|
150
|
-
const
|
|
133
|
+
const classes = classMap({
|
|
134
|
+
"form-field": true,
|
|
151
135
|
"form-field--inline": this.inlineInput,
|
|
152
136
|
});
|
|
153
137
|
|
|
154
138
|
if (this.groupInput) {
|
|
155
|
-
return
|
|
139
|
+
return html`
|
|
140
|
+
<fieldset class=${classes}>
|
|
141
|
+
<legend class="form-field__label">${this.label}</legend>
|
|
142
|
+
<slot></slot>
|
|
143
|
+
${this.errorTemplate()}
|
|
144
|
+
</fieldset>
|
|
145
|
+
`;
|
|
156
146
|
}
|
|
157
147
|
|
|
158
148
|
return html`
|
|
159
|
-
<div class
|
|
149
|
+
<div class=${classes}>
|
|
160
150
|
<label>
|
|
161
151
|
<span class="form-field__label" @click=${this.handleLabelClick}
|
|
162
152
|
>${this.label}</span
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import { css } from "lit";
|
|
2
|
-
|
|
3
|
-
export const formFieldStyles = css`
|
|
4
1
|
.form-field {
|
|
5
2
|
display: flex;
|
|
6
3
|
flex-direction: column;
|
|
@@ -42,4 +39,3 @@ export const formFieldStyles = css`
|
|
|
42
39
|
font-size: var(--g-theme-typography-body-sm-font-size);
|
|
43
40
|
color: var(--g-color-utility-red-700);
|
|
44
41
|
}
|
|
45
|
-
`;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LitElement } from "lit";
|
|
2
2
|
import { html } from "lit/static-html.js";
|
|
3
|
-
import
|
|
3
|
+
import galleryStyles from "./gallery.css" with { type: "css" };
|
|
4
4
|
|
|
5
5
|
export class GrantCodesGalleryImage extends LitElement {
|
|
6
6
|
static styles = [galleryStyles];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LitElement } from "lit";
|
|
2
2
|
import { html } from "lit/static-html.js";
|
|
3
|
-
import
|
|
3
|
+
import galleryStyles from "./gallery.css" with { type: "css" };
|
|
4
4
|
|
|
5
5
|
export class GrantCodesGallery extends LitElement {
|
|
6
6
|
// Styles are scoped to this element: they won't conflict with styles
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LitElement } from "lit";
|
|
2
2
|
import { html } from "lit/static-html.js";
|
|
3
|
-
import
|
|
3
|
+
import iconStyles from "./icon.css" with { type: "css" };
|
|
4
4
|
|
|
5
5
|
export class GrantCodesIcon extends LitElement {
|
|
6
6
|
// Styles are scoped to this element: they won't conflict with styles
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LitElement } from "lit";
|
|
2
2
|
import { html } from "lit/static-html.js";
|
|
3
|
-
import
|
|
3
|
+
import loadingStyles from "./loading.css" with { type: "css" };
|
|
4
4
|
|
|
5
5
|
export class GrantCodesLoading extends LitElement {
|
|
6
6
|
// Styles are scoped to this element: they won't conflict with styles
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { LitElement } from "lit";
|
|
2
2
|
import { html } from "lit/static-html.js";
|
|
3
3
|
import { unsafeHTML } from "lit/directives/unsafe-html.js";
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
4
|
+
import { classMap } from "lit/directives/class-map.js";
|
|
5
|
+
import noticeStyles from "./notice.css" with { type: "css" };
|
|
6
6
|
import { GrantCodesIcon } from "../icon/icon.component.js";
|
|
7
7
|
import { AlertCircle, Info, CheckCircle2, XCircle, X } from "../../icons.js";
|
|
8
8
|
|
|
@@ -60,9 +60,13 @@ export class GrantCodesNotice extends LitElement {
|
|
|
60
60
|
|
|
61
61
|
render() {
|
|
62
62
|
const icon = ICONS[this.variant];
|
|
63
|
+
const classes = classMap({
|
|
64
|
+
notice: true,
|
|
65
|
+
[`notice--${this.variant}`]: true,
|
|
66
|
+
});
|
|
63
67
|
|
|
64
68
|
return html`
|
|
65
|
-
<aside class
|
|
69
|
+
<aside class=${classes}>
|
|
66
70
|
<grantcodes-icon class="notice__icon">${unsafeHTML(icon)}</grantcodes-icon>
|
|
67
71
|
|
|
68
72
|
<div class="notice__content">
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LitElement } from "lit";
|
|
2
2
|
import { html } from "lit/static-html.js";
|
|
3
|
-
import
|
|
3
|
+
import paginationStyles from "./pagination.css" with { type: "css" };
|
|
4
4
|
import { GrantCodesButton } from "../button/button.component.js";
|
|
5
5
|
import "../button/button.js";
|
|
6
6
|
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { LitElement } from "lit";
|
|
2
2
|
import { html } from "lit/static-html.js";
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
3
|
+
import { classMap } from "lit/directives/class-map.js";
|
|
4
|
+
import focusRingStyles from "#styles/focus-ring.css" with { type: "css" };
|
|
5
|
+
import sidebarStyles from "./sidebar.css" with { type: "css" };
|
|
5
6
|
|
|
6
7
|
export class GrantCodesSidebar extends LitElement {
|
|
7
|
-
static styles = [sidebarStyles];
|
|
8
|
+
static styles = [focusRingStyles, sidebarStyles];
|
|
8
9
|
|
|
9
10
|
static properties = {
|
|
10
11
|
position: { type: String },
|
|
@@ -104,7 +105,8 @@ export class GrantCodesSidebar extends LitElement {
|
|
|
104
105
|
}
|
|
105
106
|
|
|
106
107
|
render() {
|
|
107
|
-
const
|
|
108
|
+
const sidebarClasses = classMap({
|
|
109
|
+
sidebar: true,
|
|
108
110
|
"sidebar--collapsed": this.collapsed,
|
|
109
111
|
[`sidebar--${this.position}`]: true,
|
|
110
112
|
"sidebar--drawer-open": this._drawerOpen,
|
|
@@ -137,7 +139,7 @@ export class GrantCodesSidebar extends LitElement {
|
|
|
137
139
|
|
|
138
140
|
<!-- Sidebar -->
|
|
139
141
|
<aside
|
|
140
|
-
class
|
|
142
|
+
class=${sidebarClasses}
|
|
141
143
|
style="--sidebar-width: ${this.width}"
|
|
142
144
|
>
|
|
143
145
|
<!-- Collapse Toggle (Desktop) -->
|
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
import { css } from "lit";
|
|
2
|
-
import { focusRingStyles } from "../../lib/styles/focus-ring.styles.js";
|
|
3
|
-
|
|
4
|
-
export const sidebarStyles = css`
|
|
5
|
-
${focusRingStyles}
|
|
6
|
-
|
|
7
1
|
*,
|
|
8
2
|
*::before,
|
|
9
3
|
*::after {
|
|
@@ -184,4 +178,3 @@ export const sidebarStyles = css`
|
|
|
184
178
|
}
|
|
185
179
|
}
|
|
186
180
|
}
|
|
187
|
-
`;
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import { css } from "lit";
|
|
2
|
-
|
|
3
|
-
export const statsStyles = css`
|
|
4
1
|
:host {
|
|
5
2
|
display: block;
|
|
6
3
|
}
|
|
@@ -63,4 +60,3 @@ export const statsStyles = css`
|
|
|
63
60
|
font-size: var(--g-theme-typography-body-sm-font-size);
|
|
64
61
|
color: var(--g-theme-color-content-secondary);
|
|
65
62
|
}
|
|
66
|
-
`;
|
|
@@ -2,7 +2,8 @@ import { LitElement } from "lit";
|
|
|
2
2
|
import { html } from "lit/static-html.js";
|
|
3
3
|
import { ifDefined } from "lit/directives/if-defined.js";
|
|
4
4
|
import { GrantCodesTabsItem } from "./tabs-item.component.js";
|
|
5
|
-
import
|
|
5
|
+
import focusRingStyles from "#styles/focus-ring.css" with { type: "css" };
|
|
6
|
+
import tabsStyles from "../tabs.css" with { type: "css" };
|
|
6
7
|
|
|
7
8
|
export class GrantCodesTabsButton extends GrantCodesTabsItem {
|
|
8
9
|
static shadowRootOptions = {
|
|
@@ -10,7 +11,7 @@ export class GrantCodesTabsButton extends GrantCodesTabsItem {
|
|
|
10
11
|
delegatesFocus: true,
|
|
11
12
|
};
|
|
12
13
|
|
|
13
|
-
static styles = [tabsStyles];
|
|
14
|
+
static styles = [focusRingStyles, tabsStyles];
|
|
14
15
|
|
|
15
16
|
render() {
|
|
16
17
|
console.log("GrantCodesTabsButton", this, {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { GrantCodesTabsItem } from "./internal/tabs-item.component.js";
|
|
2
2
|
import { html } from "lit/static-html.js";
|
|
3
|
-
import
|
|
3
|
+
import focusRingStyles from "#styles/focus-ring.css" with { type: "css" };
|
|
4
|
+
import tabsStyles from "./tabs.css" with { type: "css" };
|
|
4
5
|
|
|
5
6
|
export class GrantCodesTab extends GrantCodesTabsItem {
|
|
6
|
-
static styles = [tabsStyles];
|
|
7
|
+
static styles = [focusRingStyles, tabsStyles];
|
|
7
8
|
|
|
8
9
|
render() {
|
|
9
10
|
return html`
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { LitElement } from "lit";
|
|
2
2
|
import { html } from "lit/static-html.js";
|
|
3
3
|
import { ifDefined } from "lit/directives/if-defined.js";
|
|
4
|
-
import
|
|
4
|
+
import focusRingStyles from "#styles/focus-ring.css" with { type: "css" };
|
|
5
|
+
import tabsStyles from "./tabs.css" with { type: "css" };
|
|
5
6
|
import { GrantCodesTab } from "./tab.component.js";
|
|
6
7
|
import { GrantCodesTabsButton } from "./internal/tabs-button.component.js";
|
|
7
8
|
import "./internal/tabs-button.js";
|
|
@@ -11,7 +12,7 @@ export class GrantCodesTabs extends LitElement {
|
|
|
11
12
|
// Styles are scoped to this element: they won't conflict with styles
|
|
12
13
|
// on the main page or in other components. Styling API can be exposed
|
|
13
14
|
// via CSS custom properties.
|
|
14
|
-
static styles = [tabsStyles];
|
|
15
|
+
static styles = [focusRingStyles, tabsStyles];
|
|
15
16
|
|
|
16
17
|
static properties = {
|
|
17
18
|
label: { type: String },
|
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
import { css } from "lit";
|
|
2
|
-
import { focusRingStyles } from "../../lib/styles/focus-ring.styles.js";
|
|
3
|
-
|
|
4
|
-
export const tabsStyles = css`
|
|
5
|
-
${focusRingStyles}
|
|
6
|
-
|
|
7
1
|
*,
|
|
8
2
|
*::before,
|
|
9
3
|
*::after {
|
|
@@ -95,4 +89,3 @@ export const tabsStyles = css`
|
|
|
95
89
|
.tabs__panel.is-active {
|
|
96
90
|
display: block;
|
|
97
91
|
}
|
|
98
|
-
`;
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import { css } from "lit";
|
|
2
|
-
|
|
3
|
-
export const testimonialsStyles = css`
|
|
4
1
|
:host {
|
|
5
2
|
display: block;
|
|
6
3
|
}
|
|
@@ -79,4 +76,3 @@ export const testimonialsStyles = css`
|
|
|
79
76
|
font-size: var(--g-theme-typography-body-sm-font-size);
|
|
80
77
|
color: var(--g-theme-color-content-secondary);
|
|
81
78
|
}
|
|
82
|
-
`;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { LitElement } from "lit";
|
|
2
2
|
import { html } from "lit/static-html.js";
|
|
3
3
|
import { unsafeHTML } from "lit/directives/unsafe-html.js";
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
4
|
+
import { classMap } from "lit/directives/class-map.js";
|
|
5
|
+
import focusRingStyles from "#styles/focus-ring.css" with { type: "css" };
|
|
6
|
+
import toastStyles from "./toast.css" with { type: "css" };
|
|
6
7
|
import { GrantCodesIcon } from "../icon/icon.component.js";
|
|
7
8
|
import { AlertCircle, Info, CheckCircle2, XCircle, X } from "../../icons.js";
|
|
8
9
|
|
|
@@ -15,7 +16,7 @@ const ICONS = {
|
|
|
15
16
|
|
|
16
17
|
export class GrantCodesToast extends LitElement {
|
|
17
18
|
static dependencies = { "grancodes-icon": GrantCodesIcon };
|
|
18
|
-
static styles = [toastStyles];
|
|
19
|
+
static styles = [focusRingStyles, toastStyles];
|
|
19
20
|
|
|
20
21
|
static properties = {
|
|
21
22
|
variant: { type: String },
|
|
@@ -128,14 +129,15 @@ export class GrantCodesToast extends LitElement {
|
|
|
128
129
|
|
|
129
130
|
render() {
|
|
130
131
|
const icon = ICONS[this.variant];
|
|
131
|
-
const
|
|
132
|
+
const classes = classMap({
|
|
133
|
+
toast: true,
|
|
132
134
|
[`toast--${this.variant}`]: true,
|
|
133
135
|
[`toast--${this.position}`]: true,
|
|
134
136
|
"toast--visible": this._visible,
|
|
135
137
|
});
|
|
136
138
|
|
|
137
139
|
return html`
|
|
138
|
-
<div class
|
|
140
|
+
<div class=${classes} role="status" aria-live="polite">
|
|
139
141
|
<grantcodes-icon class="toast__icon">${unsafeHTML(icon)}</grantcodes-icon>
|
|
140
142
|
|
|
141
143
|
<div class="toast__content">
|
|
@@ -155,7 +157,7 @@ export class GrantCodesToast extends LitElement {
|
|
|
155
157
|
* Toast container for managing multiple toasts
|
|
156
158
|
*/
|
|
157
159
|
export class GrantCodesToastContainer extends LitElement {
|
|
158
|
-
static styles = [toastStyles];
|
|
160
|
+
static styles = [focusRingStyles, toastStyles];
|
|
159
161
|
|
|
160
162
|
static properties = {
|
|
161
163
|
position: { type: String },
|
|
@@ -172,12 +174,13 @@ export class GrantCodesToastContainer extends LitElement {
|
|
|
172
174
|
}
|
|
173
175
|
|
|
174
176
|
render() {
|
|
175
|
-
const
|
|
177
|
+
const classes = classMap({
|
|
178
|
+
"toast-container": true,
|
|
176
179
|
[`toast-container--${this.position}`]: true,
|
|
177
180
|
});
|
|
178
181
|
|
|
179
182
|
return html`
|
|
180
|
-
<div class
|
|
183
|
+
<div class=${classes}>
|
|
181
184
|
<slot></slot>
|
|
182
185
|
</div>
|
|
183
186
|
`;
|
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
import { css } from "lit";
|
|
2
|
-
import { focusRingStyles } from "../../lib/styles/focus-ring.styles.js";
|
|
3
|
-
|
|
4
|
-
export const toastStyles = css`
|
|
5
|
-
${focusRingStyles}
|
|
6
|
-
|
|
7
1
|
*,
|
|
8
2
|
*::before,
|
|
9
3
|
*::after {
|
|
@@ -202,4 +196,3 @@ export const toastStyles = css`
|
|
|
202
196
|
}
|
|
203
197
|
}
|
|
204
198
|
}
|
|
205
|
-
`;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LitElement } from "lit";
|
|
2
2
|
import { html } from "lit/static-html.js";
|
|
3
|
-
import
|
|
3
|
+
import tooltipStyles from "./tooltip.css" with { type: "css" };
|
|
4
4
|
import { generateId } from "../../lib/generate-id.js";
|
|
5
5
|
|
|
6
6
|
export class GrantCodesTooltip extends LitElement {
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import { css } from "lit";
|
|
2
|
-
|
|
3
|
-
export const tooltipStyles = css`
|
|
4
1
|
|
|
5
2
|
:host,
|
|
6
3
|
.tooltip,
|
|
@@ -44,12 +41,11 @@ export const tooltipStyles = css`
|
|
|
44
41
|
|
|
45
42
|
/* Try anchor positioning first (modern browsers) */
|
|
46
43
|
position-anchor: var(--tooltip-anchor, none);
|
|
47
|
-
inset-area: block-end;
|
|
48
44
|
position-area: block-end;
|
|
49
45
|
margin-block-start: 0.5rem;
|
|
50
46
|
|
|
51
47
|
/* Fallback for browsers without anchor positioning support */
|
|
52
|
-
@supports not (
|
|
48
|
+
@supports not (position-area: block-end) {
|
|
53
49
|
/* Traditional positioning as fallback */
|
|
54
50
|
position: absolute;
|
|
55
51
|
top: 100%;
|
|
@@ -75,4 +71,3 @@ export const tooltipStyles = css`
|
|
|
75
71
|
}
|
|
76
72
|
}
|
|
77
73
|
|
|
78
|
-
`;
|