@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.
Files changed (81) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/css-import-attributes.d.ts +13 -0
  3. package/package.json +16 -4
  4. package/src/components/accordion/accordion.component.js +3 -2
  5. package/src/components/accordion/{accordion.styles.js → accordion.css} +0 -7
  6. package/src/components/app-bar/app-bar.component.js +7 -5
  7. package/src/components/app-bar/{app-bar.styles.js → app-bar.css} +0 -7
  8. package/src/components/avatar/avatar.component.js +1 -1
  9. package/src/components/avatar/{avatar.styles.js → avatar.css} +0 -4
  10. package/src/components/badge/badge.component.js +5 -4
  11. package/src/components/badge/badge.css +87 -0
  12. package/src/components/breadcrumb/breadcrumb.component.js +4 -3
  13. package/src/components/breadcrumb/{breadcrumb.styles.js → breadcrumb.css} +0 -7
  14. package/src/components/button/button.component.js +3 -2
  15. package/src/components/button/button.css +62 -0
  16. package/src/components/button-group/button-group.component.js +1 -1
  17. package/src/components/button-group/{button-group.styles.js → button-group.css} +0 -4
  18. package/src/components/card/card.component.js +1 -1
  19. package/src/components/card/{card.styles.js → card.css} +0 -4
  20. package/src/components/code-preview/code-preview.component.js +1 -1
  21. package/src/components/code-preview/{code-preview.styles.js → code-preview.css} +0 -4
  22. package/src/components/container/container.component.js +5 -4
  23. package/src/components/container/{container.styles.js → container.css} +0 -8
  24. package/src/components/cta/cta.component.js +1 -1
  25. package/src/components/cta/{cta.styles.js → cta.css} +0 -4
  26. package/src/components/dialog/dialog.component.js +1 -1
  27. package/src/components/dialog/{dialog.styles.js → dialog.css} +0 -4
  28. package/src/components/dropdown/dropdown.component.js +1 -1
  29. package/src/components/dropdown/{dropdown.styles.js → dropdown.css} +0 -4
  30. package/src/components/dropzone/dropzone.component.js +5 -4
  31. package/src/components/dropzone/{dropzone.styles.js → dropzone.css} +0 -4
  32. package/src/components/feature-list/feature-list.component.js +1 -1
  33. package/src/components/feature-list/{feature-list.styles.js → feature-list.css} +0 -4
  34. package/src/components/footer/footer-column.component.js +1 -1
  35. package/src/components/footer/{footer-column.styles.js → footer-column.css} +0 -4
  36. package/src/components/footer/footer.component.js +1 -1
  37. package/src/components/footer/{footer.styles.js → footer.css} +0 -4
  38. package/src/components/form-field/form-field.component.js +12 -22
  39. package/src/components/form-field/{form-field.styles.js → form-field.css} +0 -4
  40. package/src/components/gallery/gallery-image.component.js +1 -1
  41. package/src/components/gallery/gallery.component.js +1 -1
  42. package/src/components/gallery/{gallery.styles.js → gallery.css} +0 -4
  43. package/src/components/hero/hero.component.js +1 -1
  44. package/src/components/hero/{hero.styles.js → hero.css} +0 -4
  45. package/src/components/icon/icon.component.js +1 -1
  46. package/src/components/icon/{icon.styles.js → icon.css} +0 -4
  47. package/src/components/loading/loading.component.js +1 -1
  48. package/src/components/loading/{loading.styles.js → loading.css} +0 -4
  49. package/src/components/logo-cloud/logo-cloud.component.js +1 -1
  50. package/src/components/logo-cloud/{logo-cloud.styles.js → logo-cloud.css} +0 -4
  51. package/src/components/media-text/media-text.component.js +1 -1
  52. package/src/components/media-text/{media-text.styles.js → media-text.css} +0 -4
  53. package/src/components/newsletter/newsletter.component.js +1 -1
  54. package/src/components/newsletter/{newsletter.styles.js → newsletter.css} +0 -4
  55. package/src/components/notice/notice.component.js +7 -3
  56. package/src/components/notice/{notice.styles.js → notice.css} +0 -4
  57. package/src/components/pagination/pagination.component.js +1 -1
  58. package/src/components/pagination/{pagination.styles.js → pagination.css} +0 -4
  59. package/src/components/pricing/pricing.component.js +1 -1
  60. package/src/components/pricing/{pricing.styles.js → pricing.css} +0 -4
  61. package/src/components/sidebar/sidebar.component.js +7 -5
  62. package/src/components/sidebar/{sidebar.styles.js → sidebar.css} +0 -7
  63. package/src/components/stats/stats.component.js +1 -1
  64. package/src/components/stats/{stats.styles.js → stats.css} +0 -4
  65. package/src/components/tabs/internal/tabs-button.component.js +3 -2
  66. package/src/components/tabs/tab.component.js +3 -2
  67. package/src/components/tabs/tabs.component.js +3 -2
  68. package/src/components/tabs/{tabs.styles.js → tabs.css} +0 -7
  69. package/src/components/testimonials/testimonials.component.js +1 -1
  70. package/src/components/testimonials/{testimonials.styles.js → testimonials.css} +0 -4
  71. package/src/components/toast/toast.component.js +11 -8
  72. package/src/components/toast/{toast.styles.js → toast.css} +0 -7
  73. package/src/components/tooltip/tooltip.component.js +1 -1
  74. package/src/components/tooltip/{tooltip.styles.js → tooltip.css} +1 -6
  75. package/src/exports.test.js +119 -0
  76. package/src/lib/styles/focus-ring.css +30 -0
  77. package/vite-plugin-css-import-attributes.js +96 -0
  78. package/src/components/badge/badge.styles.js +0 -91
  79. package/src/components/button/button.styles.js +0 -69
  80. package/src/lib/classnames.js +0 -61
  81. 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 { featureListStyles } from "./feature-list.styles.js";
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,3 @@
1
- import { css } from "lit";
2
-
3
- export const featureListStyles = css`
4
1
  :host {
5
2
  display: block;
6
3
  }
@@ -79,4 +76,3 @@ export const featureListStyles = css`
79
76
  .feature-list__item-desc {
80
77
  color: var(--g-theme-color-content-secondary);
81
78
  }
82
- `;
@@ -1,6 +1,6 @@
1
1
  import { LitElement } from "lit";
2
2
  import { html } from "lit/static-html.js";
3
- import { footerColumnStyles } from "./footer-column.styles.js";
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,3 @@
1
- import { css } from "lit";
2
-
3
- export const footerColumnStyles = css`
4
1
  :host {
5
2
  display: block;
6
3
  }
@@ -47,4 +44,3 @@ export const footerColumnStyles = css`
47
44
  color: var(--g-theme-color-content-secondary);
48
45
  font: var(--g-typography-body-sm);
49
46
  }
50
- `;
@@ -1,6 +1,6 @@
1
1
  import { LitElement } from "lit";
2
2
  import { html } from "lit/static-html.js";
3
- import { footerStyles } from "./footer.styles.js";
3
+ import footerStyles from "./footer.css" with { type: "css" };
4
4
 
5
5
  export class GrantCodesFooter extends LitElement {
6
6
  static styles = [footerStyles];
@@ -1,6 +1,3 @@
1
- import { css } from "lit";
2
-
3
- export const footerStyles = css`
4
1
  *,
5
2
  *::before,
6
3
  *::after {
@@ -87,4 +84,3 @@ export const footerStyles = css`
87
84
  color: var(--g-theme-color-content-default);
88
85
  text-decoration: underline;
89
86
  }
90
- `;
@@ -1,7 +1,7 @@
1
1
  import { LitElement } from "lit";
2
2
  import { html } from "lit/static-html.js";
3
- import { formFieldStyles } from "./form-field.styles.js";
4
- import { cx } from "../../lib/classnames.js";
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 elementClass = cx("form-field", {
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 this.groupTemplate(elementClass);
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="${elementClass}">
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 { galleryStyles } from "./gallery.styles.js";
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 { galleryStyles } from "./gallery.styles.js";
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,3 @@
1
- import { css } from "lit";
2
-
3
- export const galleryStyles = css`
4
1
 
5
2
  .gallery {
6
3
  display: block;
@@ -53,4 +50,3 @@ export const galleryStyles = css`
53
50
  color: white;
54
51
  }
55
52
 
56
- `;
@@ -1,5 +1,5 @@
1
1
  import { LitElement, html } from "lit";
2
- import { heroStyles } from "./hero.styles.js";
2
+ import heroStyles from "./hero.css" with { type: "css" };
3
3
  import "../button/button.js";
4
4
 
5
5
  export class GrantCodesHero extends LitElement {
@@ -1,6 +1,3 @@
1
- import { css } from "lit";
2
-
3
- export const heroStyles = css`
4
1
  :host {
5
2
  display: block;
6
3
  }
@@ -43,4 +40,3 @@ export const heroStyles = css`
43
40
  min-height: 70vh;
44
41
  padding: var(--g-theme-spacing-3xl) var(--g-theme-spacing-md);
45
42
  }
46
- `;
@@ -1,6 +1,6 @@
1
1
  import { LitElement } from "lit";
2
2
  import { html } from "lit/static-html.js";
3
- import { iconStyles } from "./icon.styles.js";
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,3 @@
1
- import { css } from "lit";
2
-
3
- export const iconStyles = css`
4
1
  :host {
5
2
  display: block;
6
3
  }
@@ -27,4 +24,3 @@ export const iconStyles = css`
27
24
  .icon ::slotted(svg:not([stoke])) {
28
25
  stroke: currentColor;
29
26
  }
30
- `;
@@ -1,6 +1,6 @@
1
1
  import { LitElement } from "lit";
2
2
  import { html } from "lit/static-html.js";
3
- import { loadingStyles } from "./loading.styles.js";
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,6 +1,3 @@
1
- import { css } from "lit";
2
-
3
- export const loadingStyles = css`
4
1
 
5
2
  :host {
6
3
  --height: 0.5rem;
@@ -40,4 +37,3 @@ export const loadingStyles = css`
40
37
  }
41
38
  }
42
39
 
43
- `;
@@ -1,5 +1,5 @@
1
1
  import { LitElement, html } from "lit";
2
- import { logoCloudStyles } from "./logo-cloud.styles.js";
2
+ import logoCloudStyles from "./logo-cloud.css" with { type: "css" };
3
3
 
4
4
  export class GrantCodesLogoCloud extends LitElement {
5
5
  static styles = [logoCloudStyles];
@@ -1,6 +1,3 @@
1
- import { css } from "lit";
2
-
3
- export const logoCloudStyles = css`
4
1
  :host {
5
2
  display: block;
6
3
  }
@@ -65,4 +62,3 @@ export const logoCloudStyles = css`
65
62
  .logo-cloud__item:not(:has(.logo-cloud__link)) .logo-cloud__logo {
66
63
  filter: none;
67
64
  }
68
- `;
@@ -1,5 +1,5 @@
1
1
  import { LitElement, html } from "lit";
2
- import { mediaTextStyles } from "./media-text.styles.js";
2
+ import mediaTextStyles from "./media-text.css" with { type: "css" };
3
3
  import "../button/button.js";
4
4
 
5
5
  export class GrantCodesMediaText extends LitElement {
@@ -1,6 +1,3 @@
1
- import { css } from "lit";
2
-
3
- export const mediaTextStyles = css`
4
1
  :host {
5
2
  display: block;
6
3
  }
@@ -63,4 +60,3 @@ export const mediaTextStyles = css`
63
60
  font: var(--g-theme-typography-body-lg);
64
61
  color: var(--g-theme-color-content-secondary);
65
62
  }
66
- `;
@@ -1,5 +1,5 @@
1
1
  import { LitElement, html } from "lit";
2
- import { newsletterStyles } from "./newsletter.styles.js";
2
+ import newsletterStyles from "./newsletter.css" with { type: "css" };
3
3
  import "../button/button.js";
4
4
 
5
5
  export class GrantCodesNewsletter extends LitElement {
@@ -1,6 +1,3 @@
1
- import { css } from "lit";
2
-
3
- export const newsletterStyles = css`
4
1
  :host {
5
2
  display: block;
6
3
  }
@@ -86,4 +83,3 @@ export const newsletterStyles = css`
86
83
  flex-direction: column;
87
84
  }
88
85
  }
89
- `;
@@ -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 { cx } from "../../lib/classnames.js";
5
- import { noticeStyles } from "./notice.styles.js";
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="${cx("notice", `notice--${this.variant}`)}">
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,3 @@
1
- import { css } from "lit";
2
-
3
- export const noticeStyles = css`
4
1
 
5
2
  .notice {
6
3
  display: flex;
@@ -69,4 +66,3 @@ export const noticeStyles = css`
69
66
  margin: 0;
70
67
  }
71
68
 
72
- `;
@@ -1,6 +1,6 @@
1
1
  import { LitElement } from "lit";
2
2
  import { html } from "lit/static-html.js";
3
- import { paginationStyles } from "./pagination.styles.js";
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,6 +1,3 @@
1
- import { css } from "lit";
2
-
3
- export const paginationStyles = css`
4
1
 
5
2
  .pagination {
6
3
  display: flex;
@@ -16,4 +13,3 @@ export const paginationStyles = css`
16
13
  margin-inline-end: auto;
17
14
  }
18
15
 
19
- `;
@@ -1,5 +1,5 @@
1
1
  import { LitElement, html } from "lit";
2
- import { pricingStyles } from "./pricing.styles.js";
2
+ import pricingStyles from "./pricing.css" with { type: "css" };
3
3
  import "../button/button.js";
4
4
 
5
5
  export class GrantCodesPricing extends LitElement {
@@ -1,6 +1,3 @@
1
- import { css } from "lit";
2
-
3
- export const pricingStyles = css`
4
1
  :host {
5
2
  display: block;
6
3
  }
@@ -132,4 +129,3 @@ export const pricingStyles = css`
132
129
  .pricing__cta grantcodes-button {
133
130
  width: 100%;
134
131
  }
135
- `;
@@ -1,10 +1,11 @@
1
1
  import { LitElement } from "lit";
2
2
  import { html } from "lit/static-html.js";
3
- import { cx } from "../../lib/classnames.js";
4
- import { sidebarStyles } from "./sidebar.styles.js";
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 sidebarClass = cx("sidebar", {
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="${sidebarClass}"
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,5 +1,5 @@
1
1
  import { LitElement, html } from "lit";
2
- import { statsStyles } from "./stats.styles.js";
2
+ import statsStyles from "./stats.css" with { type: "css" };
3
3
 
4
4
  export class GrantCodesStats extends LitElement {
5
5
  static styles = [statsStyles];
@@ -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 { tabsStyles } from "../tabs.styles.js";
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 { tabsStyles } from "./tabs.styles.js";
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 { tabsStyles } from "./tabs.styles.js";
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,5 +1,5 @@
1
1
  import { LitElement, html } from "lit";
2
- import { testimonialsStyles } from "./testimonials.styles.js";
2
+ import testimonialsStyles from "./testimonials.css" with { type: "css" };
3
3
  import "../card/card.js";
4
4
  import "../avatar/avatar.js";
5
5
 
@@ -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 { cx } from "../../lib/classnames.js";
5
- import { toastStyles } from "./toast.styles.js";
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 toastClass = cx("toast", {
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="${toastClass}" role="status" aria-live="polite">
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 containerClass = cx("toast-container", {
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="${containerClass}">
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 { tooltipStyles } from "./tooltip.styles.js";
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 (inset-area: block-end) {
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
- `;