@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.
Files changed (98) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/package.json +1 -1
  3. package/src/components/accordion/accordion.component.js +3 -1
  4. package/src/components/accordion/accordion.css +47 -42
  5. package/src/components/accordion/accordion.react.js +4 -4
  6. package/src/components/app-bar/app-bar.component.js +15 -9
  7. package/src/components/app-bar/app-bar.css +256 -250
  8. package/src/components/app-bar/app-bar.react.js +4 -4
  9. package/src/components/app-bar/app-bar.test.js +1 -3
  10. package/src/components/app-bar/nav-link.component.js +3 -1
  11. package/src/components/app-bar/nav-link.css +50 -45
  12. package/src/components/app-bar/nav-link.react.js +4 -4
  13. package/src/components/avatar/avatar.css +19 -21
  14. package/src/components/avatar/avatar.react.js +4 -4
  15. package/src/components/badge/badge.css +51 -51
  16. package/src/components/badge/badge.react.js +4 -4
  17. package/src/components/breadcrumb/breadcrumb.component.js +3 -1
  18. package/src/components/breadcrumb/breadcrumb.css +73 -73
  19. package/src/components/breadcrumb/breadcrumb.react.js +8 -5
  20. package/src/components/button/button.component.js +3 -1
  21. package/src/components/button/button.css +38 -38
  22. package/src/components/button/button.react.js +4 -4
  23. package/src/components/button-group/button-group.css +33 -33
  24. package/src/components/button-group/button-group.react.js +4 -4
  25. package/src/components/card/card.css +150 -150
  26. package/src/components/card/card.react.js +4 -4
  27. package/src/components/code-preview/code-preview.css +11 -12
  28. package/src/components/code-preview/code-preview.react.js +4 -4
  29. package/src/components/container/container.css +37 -37
  30. package/src/components/container/container.react.js +4 -4
  31. package/src/components/countdown/countdown.component.js +5 -3
  32. package/src/components/countdown/countdown.stories.js +1 -2
  33. package/src/components/cta/cta.css +55 -55
  34. package/src/components/cta/cta.react.js +4 -4
  35. package/src/components/dialog/dialog.css +48 -49
  36. package/src/components/dialog/dialog.react.js +4 -4
  37. package/src/components/dropdown/dropdown.css +123 -121
  38. package/src/components/dropdown/dropdown.react.js +5 -5
  39. package/src/components/dropzone/dropzone.css +5 -3
  40. package/src/components/dropzone/dropzone.react.js +4 -4
  41. package/src/components/feature-list/feature-list.css +71 -71
  42. package/src/components/feature-list/feature-list.react.js +4 -4
  43. package/src/components/footer/footer-column.css +39 -39
  44. package/src/components/footer/footer.css +68 -69
  45. package/src/components/footer/footer.react.js +5 -5
  46. package/src/components/form-field/form-field.css +40 -40
  47. package/src/components/form-field/form-field.react.js +4 -4
  48. package/src/components/gallery/gallery-image.react.js +4 -4
  49. package/src/components/gallery/gallery.css +72 -72
  50. package/src/components/gallery/gallery.react.js +4 -4
  51. package/src/components/gallery/gallery.test.js +5 -1
  52. package/src/components/hero/hero.css +61 -57
  53. package/src/components/hero/hero.react.js +4 -4
  54. package/src/components/icon/icon.css +27 -27
  55. package/src/components/icon/icon.react.js +4 -4
  56. package/src/components/loading/loading.css +30 -31
  57. package/src/components/loading/loading.react.js +4 -4
  58. package/src/components/logo-cloud/logo-cloud.css +60 -60
  59. package/src/components/logo-cloud/logo-cloud.react.js +4 -4
  60. package/src/components/map/map.component.js +3 -4
  61. package/src/components/map/map.css +36 -36
  62. package/src/components/media-text/media-text.css +58 -58
  63. package/src/components/media-text/media-text.react.js +4 -4
  64. package/src/components/newsletter/newsletter.css +78 -78
  65. package/src/components/newsletter/newsletter.react.js +4 -4
  66. package/src/components/notice/notice.css +38 -38
  67. package/src/components/notice/notice.react.js +4 -4
  68. package/src/components/pagination/pagination.css +6 -7
  69. package/src/components/pagination/pagination.react.js +4 -4
  70. package/src/components/pricing/pricing.css +137 -137
  71. package/src/components/pricing/pricing.react.js +4 -4
  72. package/src/components/sidebar/sidebar.component.js +3 -1
  73. package/src/components/sidebar/sidebar.css +180 -180
  74. package/src/components/sidebar/sidebar.react.js +4 -4
  75. package/src/components/stats/stats.css +58 -58
  76. package/src/components/stats/stats.react.js +4 -4
  77. package/src/components/tabs/internal/tabs-button.component.js +3 -1
  78. package/src/components/tabs/internal/tabs-button.react.js +4 -4
  79. package/src/components/tabs/tab.component.js +3 -1
  80. package/src/components/tabs/tab.react.js +4 -4
  81. package/src/components/tabs/tabs.component.js +3 -1
  82. package/src/components/tabs/tabs.css +82 -82
  83. package/src/components/tabs/tabs.react.js +4 -4
  84. package/src/components/testimonials/testimonials.css +72 -72
  85. package/src/components/testimonials/testimonials.react.js +4 -4
  86. package/src/components/toast/toast.component.js +3 -1
  87. package/src/components/toast/toast.css +198 -198
  88. package/src/components/toast/toast.react.js +5 -5
  89. package/src/components/tooltip/tooltip.css +52 -51
  90. package/src/components/tooltip/tooltip.react.js +4 -4
  91. package/src/css/elements/forms/input.css +1 -1
  92. package/src/css/reset.css +102 -102
  93. package/src/css/typography.css +13 -11
  94. package/src/exports.test.js +101 -95
  95. package/src/lib/styles/all.css +37 -37
  96. package/src/lib/styles/focus-ring.css +20 -20
  97. package/src/react.js +45 -39
  98. package/vite-plugin-css-import-attributes.js +5 -2
@@ -1,198 +1,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
+ *,
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
- box-sizing: border-box;
4
+ box-sizing: border-box;
5
5
  }
6
6
 
7
7
  :host,
8
8
  .tooltip,
9
9
  .tooltip__slot {
10
- width: fit-content;
10
+ width: fit-content;
11
11
  }
12
12
 
13
13
  .tooltip {
14
- position: relative;
14
+ position: relative;
15
15
  }
16
16
 
17
17
  .tooltip__slot {
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 */
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
- 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: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
37
- user-select: none;
38
- text-align: center;
39
- opacity: 0;
40
- transition: opacity 0.2s;
41
- transition-behavior: allow-discrete;
42
-
43
- /* Modern CSS Anchor Positioning API */
44
- /* This positions the tooltip relative to its anchor (the slot) */
45
- position: absolute;
46
-
47
- /* Try anchor positioning first (modern browsers) */
48
- position-anchor: var(--tooltip-anchor, none);
49
- position-area: block-end;
50
- margin-block-start: 0.5rem;
51
-
52
- /* Fallback for browsers without anchor positioning support */
53
- @supports not (position-area: block-end) {
54
- /* Traditional positioning as fallback */
55
- position: absolute;
56
- top: 100%;
57
- left: 50%;
58
- transform: translateX(-50%);
59
- margin-top: 0.5rem;
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
- display: block;
67
- opacity: 1;
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
- .tooltip__content {
73
- @starting-style {
74
- opacity: 0;
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
+ });
@@ -28,7 +28,7 @@
28
28
  background: var(--g-theme-form-color-background-focus);
29
29
  }
30
30
 
31
- :where(input, textarea, select):invalid:not(:active) {
31
+ :where(input, textarea, select):focus:invalid {
32
32
  border-color: var(--g-theme-form-color-border-error);
33
33
  }
34
34