@grantcodes/ui 2.1.1 → 2.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.
Files changed (119) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/css-import-attributes.d.ts +13 -0
  3. package/package.json +29 -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/accordion/accordion.react.js +9 -0
  7. package/src/components/app-bar/app-bar.component.js +7 -5
  8. package/src/components/app-bar/{app-bar.styles.js → app-bar.css} +0 -7
  9. package/src/components/app-bar/app-bar.react.js +12 -0
  10. package/src/components/avatar/avatar.component.js +1 -1
  11. package/src/components/avatar/{avatar.styles.js → avatar.css} +0 -4
  12. package/src/components/avatar/avatar.react.js +9 -0
  13. package/src/components/badge/badge.component.js +5 -4
  14. package/src/components/badge/badge.css +87 -0
  15. package/src/components/badge/badge.react.js +9 -0
  16. package/src/components/breadcrumb/breadcrumb.component.js +4 -3
  17. package/src/components/breadcrumb/{breadcrumb.styles.js → breadcrumb.css} +0 -7
  18. package/src/components/breadcrumb/breadcrumb.react.js +15 -0
  19. package/src/components/button/button.component.js +3 -2
  20. package/src/components/button/button.css +62 -0
  21. package/src/components/button/button.react.js +9 -0
  22. package/src/components/button-group/button-group.component.js +1 -1
  23. package/src/components/button-group/{button-group.styles.js → button-group.css} +0 -4
  24. package/src/components/button-group/button-group.react.js +9 -0
  25. package/src/components/card/card.component.js +1 -1
  26. package/src/components/card/{card.styles.js → card.css} +0 -4
  27. package/src/components/card/card.react.js +9 -0
  28. package/src/components/code-preview/code-preview.component.js +1 -1
  29. package/src/components/code-preview/{code-preview.styles.js → code-preview.css} +0 -4
  30. package/src/components/code-preview/code-preview.react.js +9 -0
  31. package/src/components/container/container.component.js +5 -4
  32. package/src/components/container/{container.styles.js → container.css} +0 -8
  33. package/src/components/container/container.react.js +9 -0
  34. package/src/components/cta/cta.component.js +1 -1
  35. package/src/components/cta/{cta.styles.js → cta.css} +0 -4
  36. package/src/components/cta/cta.react.js +9 -0
  37. package/src/components/dialog/dialog.component.js +1 -1
  38. package/src/components/dialog/{dialog.styles.js → dialog.css} +0 -4
  39. package/src/components/dialog/dialog.react.js +9 -0
  40. package/src/components/dropdown/dropdown.component.js +1 -1
  41. package/src/components/dropdown/{dropdown.styles.js → dropdown.css} +0 -4
  42. package/src/components/dropdown/dropdown.react.js +21 -0
  43. package/src/components/dropzone/dropzone.component.js +5 -4
  44. package/src/components/dropzone/{dropzone.styles.js → dropzone.css} +0 -4
  45. package/src/components/dropzone/dropzone.react.js +9 -0
  46. package/src/components/feature-list/feature-list.component.js +1 -1
  47. package/src/components/feature-list/{feature-list.styles.js → feature-list.css} +0 -4
  48. package/src/components/feature-list/feature-list.react.js +9 -0
  49. package/src/components/footer/footer-column.component.js +1 -1
  50. package/src/components/footer/{footer-column.styles.js → footer-column.css} +0 -4
  51. package/src/components/footer/footer.component.js +1 -1
  52. package/src/components/footer/{footer.styles.js → footer.css} +0 -4
  53. package/src/components/footer/footer.react.js +15 -0
  54. package/src/components/form-field/form-field.component.js +12 -22
  55. package/src/components/form-field/{form-field.styles.js → form-field.css} +0 -4
  56. package/src/components/form-field/form-field.react.js +9 -0
  57. package/src/components/gallery/gallery-image.component.js +1 -1
  58. package/src/components/gallery/gallery-image.react.js +9 -0
  59. package/src/components/gallery/gallery.component.js +1 -1
  60. package/src/components/gallery/{gallery.styles.js → gallery.css} +0 -4
  61. package/src/components/gallery/gallery.react.js +9 -0
  62. package/src/components/hero/hero.component.js +1 -1
  63. package/src/components/hero/{hero.styles.js → hero.css} +0 -4
  64. package/src/components/hero/hero.react.js +9 -0
  65. package/src/components/icon/icon.component.js +1 -1
  66. package/src/components/icon/{icon.styles.js → icon.css} +0 -4
  67. package/src/components/icon/icon.react.js +9 -0
  68. package/src/components/loading/loading.component.js +1 -1
  69. package/src/components/loading/{loading.styles.js → loading.css} +0 -4
  70. package/src/components/loading/loading.react.js +9 -0
  71. package/src/components/logo-cloud/logo-cloud.component.js +1 -1
  72. package/src/components/logo-cloud/{logo-cloud.styles.js → logo-cloud.css} +0 -4
  73. package/src/components/logo-cloud/logo-cloud.react.js +9 -0
  74. package/src/components/media-text/media-text.component.js +1 -1
  75. package/src/components/media-text/{media-text.styles.js → media-text.css} +0 -4
  76. package/src/components/media-text/media-text.react.js +9 -0
  77. package/src/components/newsletter/newsletter.component.js +1 -1
  78. package/src/components/newsletter/{newsletter.styles.js → newsletter.css} +0 -4
  79. package/src/components/newsletter/newsletter.react.js +9 -0
  80. package/src/components/notice/notice.component.js +7 -3
  81. package/src/components/notice/{notice.styles.js → notice.css} +0 -4
  82. package/src/components/notice/notice.react.js +9 -0
  83. package/src/components/pagination/pagination.component.js +1 -1
  84. package/src/components/pagination/{pagination.styles.js → pagination.css} +0 -4
  85. package/src/components/pagination/pagination.react.js +9 -0
  86. package/src/components/pricing/pricing.component.js +1 -1
  87. package/src/components/pricing/{pricing.styles.js → pricing.css} +0 -4
  88. package/src/components/pricing/pricing.react.js +9 -0
  89. package/src/components/sidebar/sidebar.component.js +7 -5
  90. package/src/components/sidebar/{sidebar.styles.js → sidebar.css} +0 -7
  91. package/src/components/sidebar/sidebar.react.js +13 -0
  92. package/src/components/stats/stats.component.js +1 -1
  93. package/src/components/stats/{stats.styles.js → stats.css} +0 -4
  94. package/src/components/stats/stats.react.js +9 -0
  95. package/src/components/tabs/internal/tabs-button.component.js +3 -2
  96. package/src/components/tabs/internal/tabs-button.react.js +9 -0
  97. package/src/components/tabs/tab.component.js +3 -2
  98. package/src/components/tabs/tab.react.js +9 -0
  99. package/src/components/tabs/tabs.component.js +3 -2
  100. package/src/components/tabs/{tabs.styles.js → tabs.css} +0 -7
  101. package/src/components/tabs/tabs.react.js +9 -0
  102. package/src/components/testimonials/testimonials.component.js +1 -1
  103. package/src/components/testimonials/{testimonials.styles.js → testimonials.css} +0 -4
  104. package/src/components/testimonials/testimonials.react.js +9 -0
  105. package/src/components/toast/toast.component.js +11 -8
  106. package/src/components/toast/{toast.styles.js → toast.css} +0 -7
  107. package/src/components/toast/toast.react.js +18 -0
  108. package/src/components/tooltip/tooltip.component.js +1 -1
  109. package/src/components/tooltip/{tooltip.styles.js → tooltip.css} +1 -6
  110. package/src/components/tooltip/tooltip.react.js +9 -0
  111. package/src/exports.test.js +119 -0
  112. package/src/lib/styles/focus-ring.css +30 -0
  113. package/src/react.js +36 -0
  114. package/src/react.test.js +56 -0
  115. package/vite-plugin-css-import-attributes.js +96 -0
  116. package/src/components/badge/badge.styles.js +0 -91
  117. package/src/components/button/button.styles.js +0 -69
  118. package/src/lib/classnames.js +0 -61
  119. package/src/lib/styles/focus-ring.styles.js +0 -34
package/src/react.js ADDED
@@ -0,0 +1,36 @@
1
+ export { Accordion } from "./components/accordion/accordion.react.js"
2
+ export { AppBar } from "./components/app-bar/app-bar.react.js"
3
+ export { Avatar } from "./components/avatar/avatar.react.js"
4
+ export { Badge } from "./components/badge/badge.react.js"
5
+ export { Breadcrumb, BreadcrumbItem } from "./components/breadcrumb/breadcrumb.react.js"
6
+ export { Button } from "./components/button/button.react.js"
7
+ export { ButtonGroup } from "./components/button-group/button-group.react.js"
8
+ export { Card } from "./components/card/card.react.js"
9
+ export { CodePreview } from "./components/code-preview/code-preview.react.js"
10
+ export { Container } from "./components/container/container.react.js"
11
+ export { Cta } from "./components/cta/cta.react.js"
12
+ export { Dialog } from "./components/dialog/dialog.react.js"
13
+ export { Dropdown, DropdownItem } from "./components/dropdown/dropdown.react.js"
14
+ export { Dropzone } from "./components/dropzone/dropzone.react.js"
15
+ export { FeatureList } from "./components/feature-list/feature-list.react.js"
16
+ export { Footer, FooterColumn } from "./components/footer/footer.react.js"
17
+ export { FormField } from "./components/form-field/form-field.react.js"
18
+ export { Gallery } from "./components/gallery/gallery.react.js"
19
+ export { GalleryImage } from "./components/gallery/gallery-image.react.js"
20
+ export { Hero } from "./components/hero/hero.react.js"
21
+ export { Icon } from "./components/icon/icon.react.js"
22
+ export { Loading } from "./components/loading/loading.react.js"
23
+ export { LogoCloud } from "./components/logo-cloud/logo-cloud.react.js"
24
+ export { MediaText } from "./components/media-text/media-text.react.js"
25
+ export { Newsletter } from "./components/newsletter/newsletter.react.js"
26
+ export { Notice } from "./components/notice/notice.react.js"
27
+ export { Pagination } from "./components/pagination/pagination.react.js"
28
+ export { Pricing } from "./components/pricing/pricing.react.js"
29
+ export { Sidebar } from "./components/sidebar/sidebar.react.js"
30
+ export { Stats } from "./components/stats/stats.react.js"
31
+ export { Tab } from "./components/tabs/tab.react.js"
32
+ export { Tabs } from "./components/tabs/tabs.react.js"
33
+ export { TabsButton } from "./components/tabs/internal/tabs-button.react.js"
34
+ export { Testimonials } from "./components/testimonials/testimonials.react.js"
35
+ export { Toast, ToastContainer } from "./components/toast/toast.react.js"
36
+ export { Tooltip } from "./components/tooltip/tooltip.react.js"
@@ -0,0 +1,56 @@
1
+ import { describe, it } from "node:test";
2
+ import { strict as assert } from "node:assert";
3
+
4
+ describe("React Wrappers", () => {
5
+ it("should export all component wrappers", async () => {
6
+ const react = await import("./react.js");
7
+ assert.ok(react.Button, "Button wrapper should be exported");
8
+ assert.ok(react.Card, "Card wrapper should be exported");
9
+ assert.ok(react.Dialog, "Dialog wrapper should be exported");
10
+ assert.ok(react.Accordion, "Accordion wrapper should be exported");
11
+ assert.ok(react.Tooltip, "Tooltip wrapper should be exported");
12
+ assert.ok(react.Hero, "Hero wrapper should be exported");
13
+ assert.ok(react.Container, "Container wrapper should be exported");
14
+ assert.ok(react.Icon, "Icon wrapper should be exported");
15
+ assert.ok(react.Loading, "Loading wrapper should be exported");
16
+ assert.ok(react.Notice, "Notice wrapper should be exported");
17
+ });
18
+
19
+ it("should export at least 35 component wrappers", async () => {
20
+ const react = await import("./react.js");
21
+ const exportCount = Object.keys(react).length;
22
+ assert.ok(
23
+ exportCount >= 35,
24
+ `Expected at least 35 exports, got ${exportCount}`,
25
+ );
26
+ });
27
+
28
+ it("should export event-mapped components", async () => {
29
+ const react = await import("./react.js");
30
+ assert.ok(react.AppBar, "AppBar wrapper should be exported");
31
+ assert.ok(react.Dropdown, "Dropdown wrapper should be exported");
32
+ assert.ok(react.DropdownItem, "DropdownItem wrapper should be exported");
33
+ assert.ok(react.Sidebar, "Sidebar wrapper should be exported");
34
+ assert.ok(react.Toast, "Toast wrapper should be exported");
35
+ });
36
+
37
+ it("should export compound component wrappers", async () => {
38
+ const react = await import("./react.js");
39
+ assert.ok(react.Breadcrumb, "Breadcrumb wrapper should be exported");
40
+ assert.ok(
41
+ react.BreadcrumbItem,
42
+ "BreadcrumbItem wrapper should be exported",
43
+ );
44
+ assert.ok(react.Footer, "Footer wrapper should be exported");
45
+ assert.ok(react.FooterColumn, "FooterColumn wrapper should be exported");
46
+ assert.ok(react.Gallery, "Gallery wrapper should be exported");
47
+ assert.ok(react.GalleryImage, "GalleryImage wrapper should be exported");
48
+ assert.ok(react.Tabs, "Tabs wrapper should be exported");
49
+ assert.ok(react.Tab, "Tab wrapper should be exported");
50
+ assert.ok(react.TabsButton, "TabsButton wrapper should be exported");
51
+ assert.ok(
52
+ react.ToastContainer,
53
+ "ToastContainer wrapper should be exported",
54
+ );
55
+ });
56
+ });
@@ -0,0 +1,96 @@
1
+ import { readFile } from "node:fs/promises";
2
+
3
+ /**
4
+ * Vite plugin that handles CSS import attributes (`with { type: 'css' }`).
5
+ *
6
+ * When a JS/TS file imports a CSS file with `with { type: 'css' }`,
7
+ * this plugin transforms it into a module that exports a CSSStyleSheet
8
+ * (client) or a Lit CSSResult (SSR), compatible with Lit's `static styles`.
9
+ *
10
+ * The virtual module ID uses a `.js` suffix to prevent Vite's built-in
11
+ * CSS plugin from intercepting and transforming the output.
12
+ */
13
+ export function cssImportAttributes() {
14
+ const virtualPrefix = "\0css-sheet:";
15
+ const ssrPrefix = "\0css-sheet-ssr:";
16
+ // Suffix prevents Vite's CSS plugin from treating this as a CSS module
17
+ const virtualSuffix = ".js";
18
+
19
+ const jsExts = new Set(["js", "mjs", "jsx", "ts", "mts", "tsx"]);
20
+
21
+ return {
22
+ enforce: "pre",
23
+ name: "css-import-attributes",
24
+
25
+ async resolveId(source, importer, options) {
26
+ if (!source.endsWith(".css") || !importer) return;
27
+
28
+ // Strip query strings from importer
29
+ const cleanImporter = importer.split("?")[0];
30
+ const ext = cleanImporter.split(".").pop();
31
+ if (!jsExts.has(ext)) return;
32
+
33
+ // Read the importer to check for `with { type: 'css' }`
34
+ let importerContent;
35
+ try {
36
+ importerContent = await readFile(cleanImporter, "utf-8");
37
+ } catch {
38
+ return;
39
+ }
40
+
41
+ // Check if the import uses CSS import attributes
42
+ const escapedSource = source.replace(
43
+ /[.*+?^${}()|[\]\\]/g,
44
+ "\\$&",
45
+ );
46
+ const regex = new RegExp(
47
+ escapedSource +
48
+ `['"] *(?:with|assert) *{ *type: *['"]css['"]`,
49
+ );
50
+ if (!regex.test(importerContent)) return;
51
+
52
+ // Resolve to absolute path
53
+ const resolved = (await this.resolve(source, importer, options))
54
+ ?.id;
55
+ if (!resolved) return;
56
+
57
+ // Encode SSR flag into virtual ID prefix so load() can detect it
58
+ const prefix = options.ssr ? ssrPrefix : virtualPrefix;
59
+ return prefix + resolved + virtualSuffix;
60
+ },
61
+
62
+ async load(id) {
63
+ const isSsr = id.startsWith(ssrPrefix);
64
+ const isClient = id.startsWith(virtualPrefix);
65
+ if (!isSsr && !isClient) return;
66
+
67
+ // Strip prefix and suffix to get real CSS path
68
+ const prefix = isSsr ? ssrPrefix : virtualPrefix;
69
+ const realPath = id.slice(prefix.length, -virtualSuffix.length);
70
+
71
+ const css = await readFile(realPath, "utf-8");
72
+ this.addWatchFile(realPath);
73
+
74
+ // Escape backticks, backslashes, and dollar signs for template literal
75
+ const escaped = css
76
+ .replace(/\\/g, "\\\\")
77
+ .replace(/`/g, "\\`")
78
+ .replace(/\$/g, "\\$");
79
+
80
+ if (isSsr) {
81
+ // SSR: return a Lit CSSResult for proper Lit SSR integration
82
+ return (
83
+ `import { css } from "lit";\n` +
84
+ `export default css\`${escaped}\`;\n`
85
+ );
86
+ }
87
+
88
+ // Client: return a native CSSStyleSheet
89
+ return (
90
+ `const sheet = new CSSStyleSheet();\n` +
91
+ `sheet.replaceSync(\`${escaped}\`);\n` +
92
+ `export default sheet;\n`
93
+ );
94
+ },
95
+ };
96
+ }
@@ -1,91 +0,0 @@
1
- import { css } from "lit";
2
-
3
- export const badgeStyles = css`
4
- *,
5
- *::before,
6
- *::after {
7
- box-sizing: border-box;
8
- }
9
-
10
- :host {
11
- display: inline-block;
12
- }
13
-
14
- .badge {
15
- display: inline-flex;
16
- align-items: center;
17
- gap: var(--g-theme-spacing-xs);
18
- padding-inline: 0.625em;
19
- padding-block: 0.375em;
20
- border-radius: var(--g-theme-border-radius-md, 0.375rem);
21
- font: var(--g-typography-font-label-sm);
22
- line-height: 1;
23
- white-space: nowrap;
24
- border-width: 1px;
25
- border-style: solid;
26
- transition: all 0.2s ease;
27
- }
28
-
29
- /* Soft style variants */
30
- .badge--primary {
31
- background-color: color-mix(
32
- in srgb,
33
- var(--g-color-brand-purple-500) 15%,
34
- transparent
35
- );
36
- color: var(--g-color-brand-purple-700);
37
- border-color: transparent;
38
- }
39
-
40
- .badge--success {
41
- background-color: color-mix(
42
- in srgb,
43
- var(--g-color-utility-green-500) 15%,
44
- transparent
45
- );
46
- color: var(--g-color-utility-green-700);
47
- border-color: transparent;
48
- }
49
-
50
- .badge--warning {
51
- background-color: color-mix(
52
- in srgb,
53
- var(--g-color-utility-yellow-500) 15%,
54
- transparent
55
- );
56
- color: var(--g-color-utility-yellow-700);
57
- border-color: transparent;
58
- }
59
-
60
- .badge--error {
61
- background-color: color-mix(
62
- in srgb,
63
- var(--g-color-utility-red-500) 15%,
64
- transparent
65
- );
66
- color: var(--g-color-utility-red-700);
67
- border-color: transparent;
68
- }
69
-
70
- .badge--info {
71
- background-color: color-mix(
72
- in srgb,
73
- var(--g-color-utility-blue-500) 15%,
74
- transparent
75
- );
76
- color: var(--g-color-utility-blue-700);
77
- border-color: transparent;
78
- }
79
-
80
- .badge--neutral {
81
- background-color: var(--g-color-brand-purple-100);
82
- color: var(--g-color-brand-purple-800);
83
- border-color: transparent;
84
- }
85
-
86
- .badge__content {
87
- display: inline-flex;
88
- align-items: center;
89
- gap: 0.25em;
90
- }
91
- `;
@@ -1,69 +0,0 @@
1
- import { css } from "lit";
2
- import { focusRingStyles } from "../../lib/styles/focus-ring.styles.js";
3
-
4
- export const buttonStyles = css`
5
- ${focusRingStyles}
6
-
7
- /* Inlined component-base mixin */
8
- *,
9
- *::before,
10
- *::after {
11
- box-sizing: border-box;
12
- }
13
-
14
- :host {
15
- display: block;
16
- --button-border-radius-start: var(--g-theme-border-radius-md);
17
- --button-border-radius-end: var(--g-theme-border-radius-md);
18
- }
19
-
20
- .button {
21
- display: inline-flex;
22
- flex-direction: row;
23
- align-items: center;
24
- gap: var(--g-theme-spacing-sm);
25
- background: var(--g-theme-button-primary-color-background-default);
26
- color: var(--g-theme-button-primary-color-content-default);
27
- border-width: var(--g-theme-border-width-md);
28
- border-style: solid;
29
- border-color: var(--g-theme-button-primary-color-border-default);
30
- padding-block: var(--g-theme-spacing-sm);
31
- padding-inline: var(--g-theme-spacing-md);
32
- border-start-start-radius: var(--button-border-radius-start);
33
- border-start-end-radius: var(--button-border-radius-end);
34
- border-end-start-radius: var(--button-border-radius-start);
35
- border-end-end-radius: var(--button-border-radius-end);
36
- font: var(--g-theme-typography-label-default);
37
- font-family: inherit;
38
- text-decoration: none;
39
- transition-property: color, border-color, background-color, outline;
40
- }
41
-
42
- .button:hover,
43
- .button:focus-visible {
44
- color: var(--g-theme-button-primary-color-content-hover);
45
- background: var(--g-theme-button-primary-color-background-hover);
46
- border-color: var(--g-theme-button-primary-color-border-hover);
47
- cursor: pointer;
48
- text-decoration: none;
49
- }
50
-
51
- .button:active {
52
- color: var(--g-theme-button-primary-color-content-active);
53
- background: var(--g-theme-button-primary-color-background-active);
54
- border-color: var(--g-theme-button-primary-color-border-active);
55
- }
56
-
57
- .button:active {
58
- transform: translateY(1px);
59
- }
60
-
61
- .button[disabled] {
62
- background: var(--g-theme-button-primary-color-background-disabled);
63
- color: var(--g-theme-button-primary-color-content-disabled);
64
- border-color: var(--g-theme-button-primary-color-border-disabled);
65
- cursor: not-allowed;
66
- filter: grayscale(70%);
67
- opacity: 0.8;
68
- }
69
- `;
@@ -1,61 +0,0 @@
1
- // classnames npm package moved to a local dependency
2
-
3
- var hasOwn = {}.hasOwnProperty;
4
-
5
- export function cx() {
6
- var classes = "";
7
- var i;
8
- var arg;
9
-
10
- for (i = 0; i < arguments.length; i++) {
11
- arg = arguments[i];
12
- if (arg) {
13
- classes = appendClass(classes, parseValue(arg));
14
- }
15
- }
16
-
17
- return classes;
18
- }
19
-
20
- function parseValue(arg) {
21
- if (typeof arg === "string" || typeof arg === "number") {
22
- return arg;
23
- }
24
-
25
- if (typeof arg !== "object") {
26
- return "";
27
- }
28
-
29
- if (Array.isArray(arg)) {
30
- return cx.apply(null, arg);
31
- }
32
-
33
- if (
34
- arg.toString !== Object.prototype.toString &&
35
- !arg.toString.toString().includes("[native code]")
36
- ) {
37
- return arg.toString();
38
- }
39
-
40
- var classes = "";
41
-
42
- for (var key in arg) {
43
- if (hasOwn.call(arg, key) && arg[key]) {
44
- classes = appendClass(classes, key);
45
- }
46
- }
47
-
48
- return classes;
49
- }
50
-
51
- function appendClass(value, newClass) {
52
- if (!newClass) {
53
- return value;
54
- }
55
-
56
- if (value) {
57
- return `${value} ${newClass}`;
58
- }
59
-
60
- return value + newClass;
61
- }
@@ -1,34 +0,0 @@
1
- import { css } from "lit";
2
-
3
- export const focusRingStyles = css`
4
- .focus-ring,
5
- :host(.focus-ring) {
6
- outline: 0px solid transparent;
7
- outline-offset: var(--g-theme-focus-ring-offset-default);
8
- transition-duration: var(--g-animation-duration-20);
9
- transition-properties: outline-color, width;
10
- }
11
-
12
- .focus-ring:focus-visible,
13
- :host(.focus-ring):focus-visible {
14
- outline: var(--g-theme-focus-ring-width-default) solid
15
- var(--g-theme-focus-ring-color-default);
16
- }
17
-
18
- @media (prefers-contrast: more) {
19
- .focus-ring:focus-visible,
20
- :host(.focus-ring):focus-visible {
21
- outline: var(--g-theme-focus-ring-width-default) solid
22
- var(--g-theme-focus-ring-color-contrast);
23
- box-shadow: 0 0 0
24
- calc(
25
- (
26
- var(--g-theme-focus-ring-width-default) +
27
- var(--g-theme-focus-ring-offset-default)
28
- ) *
29
- 1.5
30
- )
31
- var(--g-theme-focus-ring-color-contrast-shadow);
32
- }
33
- }
34
- `;