@guildofgleks/ui 21.4.2 → 21.4.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@guildofgleks/ui",
3
- "version": "21.4.2",
3
+ "version": "21.4.4",
4
4
  "engines": {
5
5
  "node": ">=20.19.0"
6
6
  },
@@ -37,6 +37,7 @@
37
37
  "tslib": "^2.3.0"
38
38
  },
39
39
  "sideEffects": false,
40
+ "schematics": "./schematics/collection.json",
40
41
  "exports": {
41
42
  "./styles/*": {
42
43
  "default": "./styles/*"
@@ -0,0 +1,9 @@
1
+ {
2
+ "schematics": {
3
+ "ng-add": {
4
+ "description": "Adds the @guildofgleks/ui baseline stylesheet to your project's angular.json.",
5
+ "factory": "./ng-add/index.cjs#ngAdd",
6
+ "schema": "./ng-add/schema.json"
7
+ }
8
+ }
9
+ }
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ngAdd = ngAdd;
4
+ const workspace_1 = require("@schematics/angular/utility/workspace");
5
+ const STYLE_PATH = 'node_modules/@guildofgleks/ui/styles/index.css';
6
+ function ngAdd(options) {
7
+ return (_tree, context) => {
8
+ return (0, workspace_1.updateWorkspace)((workspace) => {
9
+ const projectNames = options.project
10
+ ? [options.project]
11
+ : [...workspace.projects.keys()].filter((name) => workspace.projects.get(name)?.extensions['projectType'] === 'application');
12
+ if (projectNames.length === 0) {
13
+ context.logger.warn(`@guildofgleks/ui: no application project found to add "${STYLE_PATH}" to. ` +
14
+ "Add it to your project's styles array yourself.");
15
+ }
16
+ let added = false;
17
+ for (const name of projectNames) {
18
+ const project = workspace.projects.get(name);
19
+ const build = project?.targets.get('build');
20
+ if (!build) {
21
+ if (options.project) {
22
+ context.logger.warn(`@guildofgleks/ui: project "${name}" has no "build" target — skipping the styles setup.`);
23
+ }
24
+ continue;
25
+ }
26
+ build.options ?? (build.options = {});
27
+ added = prependStyle(build.options) || added;
28
+ // `@angular/build:unit-test`, the v21 default, has no `styles` of its own — it builds
29
+ // through `buildTarget`, so the line above already covers component tests. The karma
30
+ // builders do carry their own array, and there the build target's styles are not read.
31
+ // Only touch the test target when it already declares one: adding the key to a builder
32
+ // whose schema forbids it would make `ng test` fail schema validation.
33
+ const test = project?.targets.get('test');
34
+ if (test?.options && Array.isArray(test.options['styles'])) {
35
+ added = prependStyle(test.options) || added;
36
+ }
37
+ }
38
+ // Only say so when something actually changed — a re-run that finds the stylesheet already
39
+ // there, or a workspace where no project could be updated, should not claim otherwise.
40
+ if (added) {
41
+ context.logger.info("@guildofgleks/ui: added the baseline stylesheet to your project's styles. Next: import " +
42
+ 'the standalone components you use, and if you use dialogs or toasts, add ' +
43
+ '<gog-dialog /> and <gog-toast-container /> once in your root component. See ' +
44
+ 'https://ui.guildofgleks.com for details.');
45
+ }
46
+ });
47
+ };
48
+ }
49
+ /**
50
+ * Puts the baseline stylesheet first in a target's `styles`, so anything the consumer already had
51
+ * still comes after it and wins. Returns whether it changed anything — a second `ng add` must be
52
+ * a no-op.
53
+ */
54
+ function prependStyle(options) {
55
+ const existing = options['styles'];
56
+ const styles = Array.isArray(existing) ? existing : [];
57
+ if (styles.includes(STYLE_PATH)) {
58
+ return false;
59
+ }
60
+ options['styles'] = [STYLE_PATH, ...styles];
61
+ return true;
62
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,15 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema",
3
+ "$id": "GuildOfGleksUiNgAdd",
4
+ "title": "GuildOfGleks UI ng-add schema",
5
+ "type": "object",
6
+ "properties": {
7
+ "project": {
8
+ "type": "string",
9
+ "description": "The name of the project to add the library's stylesheet to.",
10
+ "$default": {
11
+ "$source": "projectName"
12
+ }
13
+ }
14
+ }
15
+ }
@@ -400,10 +400,15 @@
400
400
  rules (they style content this component's consumer projects, which sits outside
401
401
  `gog-collapsible`'s own view and can't be reached by its scoped stylesheet). */
402
402
  --gog-collapsible-transition-duration: var(--gog-duration-slow);
403
- /* Generous fixed cap rather than a measured height: the CSS-only max-height transition
404
- trades exact timing for arbitrary content (any number of children) without JS. Override
405
- per-instance if a particular panel's content can exceed this. */
406
- --gog-collapsible-max-height: 480px;
403
+ /* The panel's natural height, so an open panel never truncates whatever it holds. This was
404
+ a fixed `480px` cap, which bought the CSS-only transition an animatable target but paid
405
+ for it by silently clipping any taller content `overflow: hidden` means no scrollbar
406
+ and no other sign that the rest of the panel is missing. `max-content` still animates,
407
+ via `interpolate-size: allow-keywords` on the content element (see utilities.css); where
408
+ that is unsupported the panel snaps open instead of easing, which is the right way round
409
+ for the trade — losing an animation is visible and harmless, losing content is neither.
410
+ Set a length here to cap a particular panel on purpose; it will clip, as before. */
411
+ --gog-collapsible-max-height: max-content;
407
412
  --gog-collapsible-disabled-opacity: var(--gog-disabled-opacity);
408
413
 
409
414
  /* ── Button ────────────────────────────────────────────────────────────────
@@ -436,7 +441,10 @@
436
441
  --gog-btn-primary-hover-color: var(--gog-btn-primary-color);
437
442
  --gog-btn-primary-hover-shadow: 0 0 16px
438
443
  color-mix(in srgb, var(--gog-accent-bright) 45%, transparent);
439
- --gog-btn-primary-spinner-color: var(--gog-text-color);
444
+ /* The label's colour, not the page's. `--gog-text-color` is the colour of text on the page
445
+ background, and a filled button is not the page background — on the dark theme that put pale
446
+ parchment on bright amber, which read as a washed-out spinner beside a near-black label. */
447
+ --gog-btn-primary-spinner-color: var(--gog-btn-primary-color);
440
448
 
441
449
  --gog-btn-secondary-bg: var(--gog-secondary-color);
442
450
  --gog-btn-secondary-color: var(--gog-accent-text-color, var(--gog-primary-color));
@@ -445,7 +453,8 @@
445
453
  --gog-btn-secondary-hover-bg: var(--gog-accent-color);
446
454
  --gog-btn-secondary-hover-color: var(--gog-btn-secondary-color);
447
455
  --gog-btn-secondary-hover-shadow: none;
448
- --gog-btn-secondary-spinner-color: var(--gog-text-color);
456
+ /* Same reasoning as primary: the other filled variant, the same mismatch. */
457
+ --gog-btn-secondary-spinner-color: var(--gog-btn-secondary-color);
449
458
 
450
459
  --gog-btn-outline-bg: transparent;
451
460
  --gog-btn-outline-color: var(--gog-accent-color);
@@ -498,6 +507,9 @@
498
507
  /* ── Calendar (the month grid inside gog-datepicker, and gog-calendar on its own) ── */
499
508
  --gog-calendar-font-family: var(--gog-font-body);
500
509
  --gog-calendar-color: var(--gog-text-color);
510
+ /* Caps the host at its month grid instead of letting the header spread to the container.
511
+ `100%` restores the pre-21.5.0 full-width behaviour. */
512
+ --gog-calendar-max-width: max-content;
501
513
  --gog-calendar-padding: 12px;
502
514
  --gog-calendar-header-gap: 4px;
503
515
  --gog-calendar-header-margin: 8px;
@@ -872,6 +884,9 @@
872
884
  --gog-datepicker-panel-border-color: var(--gog-border-color);
873
885
  --gog-datepicker-panel-radius: var(--gog-radius);
874
886
  --gog-datepicker-panel-gap: 2px;
887
+ /* The dropdown surface. Inline mode is `gog-calendar` itself, so it sizes from
888
+ `--gog-calendar-max-width` rather than from this. */
889
+ --gog-datepicker-panel-width: max-content;
875
890
  --gog-datepicker-float-label-reserve: var(--gog-field-float-label-reserve);
876
891
  --gog-datepicker-float-label-in-top: var(--gog-field-float-label-in-top);
877
892
  --gog-datepicker-float-label-over-gap: var(--gog-field-float-label-over-gap);
@@ -1,170 +1,185 @@
1
- .gog-inline-center {
2
- display: inline-flex;
3
- align-items: center;
4
- justify-content: center;
5
- }
6
-
7
- .gog-flex-center {
8
- display: flex;
9
- align-items: center;
10
- justify-content: center;
11
- }
12
-
13
- /*
14
- * Scopes reflow to this subtree. Never put it on an element that has to paint something
15
- * outside its own box — `contain: layout` creates a stacking context, so a popup inside
16
- * it can no longer stack above the rest of the page no matter its z-index. That rules it
17
- * out for gog-select and gog-multiselect.
18
- */
19
- .gog-contained-layout {
20
- contain: layout style;
21
- }
22
-
23
- .gog-cursor-pointer {
24
- cursor: pointer;
25
- }
26
-
27
- .gog-cursor-wait {
28
- cursor: wait;
29
- }
30
-
31
- .gog-cursor-not-allowed {
32
- cursor: not-allowed;
33
- }
34
-
35
- /*
36
- * Present to assistive tech, invisible on screen. The clip-path/1px recipe rather than
37
- * `display: none` or `visibility: hidden`, both of which remove the text from the
38
- * accessibility tree along with the pixels.
39
- */
40
- .gog-visually-hidden {
41
- position: absolute;
42
- width: 1px;
43
- height: 1px;
44
- margin: -1px;
45
- padding: 0;
46
- border: 0;
47
- overflow: hidden;
48
- clip-path: inset(50%);
49
- white-space: nowrap;
50
- }
51
-
52
- /*
53
- * `gogBadge`'s classes, global for the same reason as `gog-collapsible`'s below: the
54
- * directive appends its badge into a *consumer's* element, which is light DOM belonging to
55
- * that consumer's view, so a scoped stylesheet could never reach it.
56
- */
57
- .gog-badge-host {
58
- /* The badge is positioned against this element, so it has to be a containing block.
59
- Harmless on an already-relative host; a host that is itself absolutely positioned
60
- should set its own position after this class, which ordinary specificity allows. */
61
- position: relative;
62
- }
63
-
64
- .gog-badge {
65
- position: absolute;
66
- z-index: var(--gog-badge-z);
67
- display: inline-flex;
68
- align-items: center;
69
- justify-content: center;
70
- box-sizing: border-box;
71
- min-width: var(--gog-badge-size);
72
- height: var(--gog-badge-size);
73
- padding-inline: var(--gog-badge-padding-inline);
74
- border: var(--gog-badge-border-width) var(--gog-badge-border-style) var(--gog-badge-border-color);
75
- border-radius: var(--gog-badge-radius);
76
- background-color: var(--gog-badge-bg, var(--gog-badge-variant-bg, var(--gog-badge-danger-bg)));
77
- color: var(--gog-badge-color, var(--gog-badge-variant-color, var(--gog-badge-danger-color)));
78
- font-family: var(--gog-badge-font-family);
79
- font-size: var(--gog-badge-font-size);
80
- font-weight: var(--gog-badge-font-weight);
81
- line-height: var(--gog-badge-line-height);
82
- pointer-events: none;
83
- white-space: nowrap;
84
- }
85
-
86
- /* A dot carries no text, so it collapses to a circle and drops its padding. */
87
- .gog-badge--dot {
88
- min-width: var(--gog-badge-dot-size);
89
- width: var(--gog-badge-dot-size);
90
- height: var(--gog-badge-dot-size);
91
- padding-inline: 0;
92
- border-radius: 50%;
93
- }
94
-
95
- /* Logical insets rather than a translate, so the corners follow the writing direction. */
96
- .gog-badge--top-end {
97
- top: calc(-1 * var(--gog-badge-offset));
98
- inset-inline-end: calc(-1 * var(--gog-badge-offset));
99
- }
100
-
101
- .gog-badge--top-start {
102
- top: calc(-1 * var(--gog-badge-offset));
103
- inset-inline-start: calc(-1 * var(--gog-badge-offset));
104
- }
105
-
106
- .gog-badge--bottom-end {
107
- bottom: calc(-1 * var(--gog-badge-offset));
108
- inset-inline-end: calc(-1 * var(--gog-badge-offset));
109
- }
110
-
111
- .gog-badge--bottom-start {
112
- bottom: calc(-1 * var(--gog-badge-offset));
113
- inset-inline-start: calc(-1 * var(--gog-badge-offset));
114
- }
115
-
116
- .gog-badge--success {
117
- --gog-badge-variant-bg: var(--gog-badge-success-bg);
118
- --gog-badge-variant-color: var(--gog-badge-success-color);
119
- }
120
-
121
- .gog-badge--danger {
122
- --gog-badge-variant-bg: var(--gog-badge-danger-bg);
123
- --gog-badge-variant-color: var(--gog-badge-danger-color);
124
- }
125
-
126
- .gog-badge--warning {
127
- --gog-badge-variant-bg: var(--gog-badge-warning-bg);
128
- --gog-badge-variant-color: var(--gog-badge-warning-color);
129
- }
130
-
131
- .gog-badge--info {
132
- --gog-badge-variant-bg: var(--gog-badge-info-bg);
133
- --gog-badge-variant-color: var(--gog-badge-info-color);
134
- }
135
-
136
- /*
137
- * `gog-collapsible`'s trigger/content classes, global rather than component-scoped: both
138
- * are applied via `gogCollapsibleTrigger`/`gogCollapsibleContent` directives to elements a
139
- * *consumer* projects into `<gog-collapsible>` — light DOM that belongs to the consumer's
140
- * own view, not `gog-collapsible`'s, so a scoped stylesheet on the component itself would
141
- * never reach it.
142
- */
143
- .gog-collapsible__trigger {
144
- cursor: pointer;
145
- }
146
-
147
- .gog-collapsible__trigger[aria-disabled='true'] {
148
- cursor: not-allowed;
149
- opacity: var(--gog-collapsible-disabled-opacity);
150
- }
151
-
152
- .gog-collapsible__content {
153
- max-height: 0;
154
- opacity: 0;
155
- overflow: hidden;
156
- transition:
157
- max-height var(--gog-collapsible-transition-duration) var(--gog-easing),
158
- opacity var(--gog-collapsible-transition-duration) var(--gog-easing);
159
- }
160
-
161
- .gog-collapsible__content--open {
162
- max-height: var(--gog-collapsible-max-height);
163
- opacity: 1;
164
- }
165
-
166
- @media (prefers-reduced-motion: reduce) {
167
- .gog-collapsible__content {
168
- transition: none;
169
- }
170
- }
1
+ .gog-inline-center {
2
+ display: inline-flex;
3
+ align-items: center;
4
+ justify-content: center;
5
+ }
6
+
7
+ .gog-flex-center {
8
+ display: flex;
9
+ align-items: center;
10
+ justify-content: center;
11
+ }
12
+
13
+ /*
14
+ * Scopes reflow to this subtree. Never put it on an element that has to paint something
15
+ * outside its own box — `contain: layout` creates a stacking context, so a popup inside
16
+ * it can no longer stack above the rest of the page no matter its z-index. That rules it
17
+ * out for gog-select and gog-multiselect.
18
+ */
19
+ .gog-contained-layout {
20
+ contain: layout style;
21
+ }
22
+
23
+ .gog-cursor-pointer {
24
+ cursor: pointer;
25
+ }
26
+
27
+ .gog-cursor-wait {
28
+ cursor: wait;
29
+ }
30
+
31
+ .gog-cursor-not-allowed {
32
+ cursor: not-allowed;
33
+ }
34
+
35
+ /*
36
+ * Present to assistive tech, invisible on screen. The clip-path/1px recipe rather than
37
+ * `display: none` or `visibility: hidden`, both of which remove the text from the
38
+ * accessibility tree along with the pixels.
39
+ */
40
+ .gog-visually-hidden {
41
+ position: absolute;
42
+ width: 1px;
43
+ height: 1px;
44
+ margin: -1px;
45
+ padding: 0;
46
+ border: 0;
47
+ overflow: hidden;
48
+ clip-path: inset(50%);
49
+ white-space: nowrap;
50
+ }
51
+
52
+ /*
53
+ * `gogBadge`'s classes, global for the same reason as `gog-collapsible`'s below: the
54
+ * directive appends its badge into a *consumer's* element, which is light DOM belonging to
55
+ * that consumer's view, so a scoped stylesheet could never reach it.
56
+ */
57
+ .gog-badge-host {
58
+ /* The badge is positioned against this element, so it has to be a containing block.
59
+ Harmless on an already-relative host; a host that is itself absolutely positioned
60
+ should set its own position after this class, which ordinary specificity allows. */
61
+ position: relative;
62
+ }
63
+
64
+ .gog-badge {
65
+ position: absolute;
66
+ z-index: var(--gog-badge-z);
67
+ display: inline-flex;
68
+ align-items: center;
69
+ justify-content: center;
70
+ box-sizing: border-box;
71
+ min-width: var(--gog-badge-size);
72
+ height: var(--gog-badge-size);
73
+ padding-inline: var(--gog-badge-padding-inline);
74
+ border: var(--gog-badge-border-width) var(--gog-badge-border-style) var(--gog-badge-border-color);
75
+ border-radius: var(--gog-badge-radius);
76
+ background-color: var(--gog-badge-bg, var(--gog-badge-variant-bg, var(--gog-badge-danger-bg)));
77
+ color: var(--gog-badge-color, var(--gog-badge-variant-color, var(--gog-badge-danger-color)));
78
+ font-family: var(--gog-badge-font-family);
79
+ font-size: var(--gog-badge-font-size);
80
+ font-weight: var(--gog-badge-font-weight);
81
+ line-height: var(--gog-badge-line-height);
82
+ pointer-events: none;
83
+ white-space: nowrap;
84
+ }
85
+
86
+ /* A dot carries no text, so it collapses to a circle and drops its padding. */
87
+ .gog-badge--dot {
88
+ min-width: var(--gog-badge-dot-size);
89
+ width: var(--gog-badge-dot-size);
90
+ height: var(--gog-badge-dot-size);
91
+ padding-inline: 0;
92
+ border-radius: 50%;
93
+ }
94
+
95
+ /* Logical insets rather than a translate, so the corners follow the writing direction. */
96
+ .gog-badge--top-end {
97
+ top: calc(-1 * var(--gog-badge-offset));
98
+ inset-inline-end: calc(-1 * var(--gog-badge-offset));
99
+ }
100
+
101
+ .gog-badge--top-start {
102
+ top: calc(-1 * var(--gog-badge-offset));
103
+ inset-inline-start: calc(-1 * var(--gog-badge-offset));
104
+ }
105
+
106
+ .gog-badge--bottom-end {
107
+ bottom: calc(-1 * var(--gog-badge-offset));
108
+ inset-inline-end: calc(-1 * var(--gog-badge-offset));
109
+ }
110
+
111
+ .gog-badge--bottom-start {
112
+ bottom: calc(-1 * var(--gog-badge-offset));
113
+ inset-inline-start: calc(-1 * var(--gog-badge-offset));
114
+ }
115
+
116
+ .gog-badge--success {
117
+ --gog-badge-variant-bg: var(--gog-badge-success-bg);
118
+ --gog-badge-variant-color: var(--gog-badge-success-color);
119
+ }
120
+
121
+ .gog-badge--danger {
122
+ --gog-badge-variant-bg: var(--gog-badge-danger-bg);
123
+ --gog-badge-variant-color: var(--gog-badge-danger-color);
124
+ }
125
+
126
+ .gog-badge--warning {
127
+ --gog-badge-variant-bg: var(--gog-badge-warning-bg);
128
+ --gog-badge-variant-color: var(--gog-badge-warning-color);
129
+ }
130
+
131
+ .gog-badge--info {
132
+ --gog-badge-variant-bg: var(--gog-badge-info-bg);
133
+ --gog-badge-variant-color: var(--gog-badge-info-color);
134
+ }
135
+
136
+ /*
137
+ * `gog-collapsible`'s trigger/content classes, global rather than component-scoped: both
138
+ * are applied via `gogCollapsibleTrigger`/`gogCollapsibleContent` directives to elements a
139
+ * *consumer* projects into `<gog-collapsible>` — light DOM that belongs to the consumer's
140
+ * own view, not `gog-collapsible`'s, so a scoped stylesheet on the component itself would
141
+ * never reach it.
142
+ */
143
+ .gog-collapsible__trigger {
144
+ cursor: pointer;
145
+ }
146
+
147
+ .gog-collapsible__trigger[aria-disabled='true'] {
148
+ cursor: not-allowed;
149
+ opacity: var(--gog-collapsible-disabled-opacity);
150
+ }
151
+
152
+ .gog-collapsible__content {
153
+ /*
154
+ * Lets the `max-height` transition below run to `max-content` — the default of
155
+ * `--gog-collapsible-max-height` — instead of refusing to animate to an intrinsic keyword.
156
+ * That default is what keeps an open panel from clipping its content at an arbitrary
157
+ * number; this property is only what makes the same value animate.
158
+ *
159
+ * Declared here rather than on `:root`: the property is inherited, and a component library
160
+ * has no business switching keyword interpolation on for a consumer's whole document. It
161
+ * does inherit into this panel's own descendants, which is harmless — it changes nothing
162
+ * for an element that is not animating to or from an intrinsic size.
163
+ *
164
+ * Unsupported browsers ignore it and the panel snaps open, exactly as it does when a
165
+ * consumer sets `--gog-collapsible-max-height: none`.
166
+ */
167
+ interpolate-size: allow-keywords;
168
+ max-height: 0;
169
+ opacity: 0;
170
+ overflow: hidden;
171
+ transition:
172
+ max-height var(--gog-collapsible-transition-duration) var(--gog-easing),
173
+ opacity var(--gog-collapsible-transition-duration) var(--gog-easing);
174
+ }
175
+
176
+ .gog-collapsible__content--open {
177
+ max-height: var(--gog-collapsible-max-height);
178
+ opacity: 1;
179
+ }
180
+
181
+ @media (prefers-reduced-motion: reduce) {
182
+ .gog-collapsible__content {
183
+ transition: none;
184
+ }
185
+ }
package/styles/theme.css CHANGED
@@ -400,10 +400,15 @@
400
400
  rules (they style content this component's consumer projects, which sits outside
401
401
  `gog-collapsible`'s own view and can't be reached by its scoped stylesheet). */
402
402
  --gog-collapsible-transition-duration: var(--gog-duration-slow);
403
- /* Generous fixed cap rather than a measured height: the CSS-only max-height transition
404
- trades exact timing for arbitrary content (any number of children) without JS. Override
405
- per-instance if a particular panel's content can exceed this. */
406
- --gog-collapsible-max-height: 480px;
403
+ /* The panel's natural height, so an open panel never truncates whatever it holds. This was
404
+ a fixed `480px` cap, which bought the CSS-only transition an animatable target but paid
405
+ for it by silently clipping any taller content `overflow: hidden` means no scrollbar
406
+ and no other sign that the rest of the panel is missing. `max-content` still animates,
407
+ via `interpolate-size: allow-keywords` on the content element (see utilities.css); where
408
+ that is unsupported the panel snaps open instead of easing, which is the right way round
409
+ for the trade — losing an animation is visible and harmless, losing content is neither.
410
+ Set a length here to cap a particular panel on purpose; it will clip, as before. */
411
+ --gog-collapsible-max-height: max-content;
407
412
  --gog-collapsible-disabled-opacity: var(--gog-disabled-opacity);
408
413
 
409
414
  /* ── Button ────────────────────────────────────────────────────────────────
@@ -436,7 +441,10 @@
436
441
  --gog-btn-primary-hover-color: var(--gog-btn-primary-color);
437
442
  --gog-btn-primary-hover-shadow: 0 0 16px
438
443
  color-mix(in srgb, var(--gog-accent-bright) 45%, transparent);
439
- --gog-btn-primary-spinner-color: var(--gog-text-color);
444
+ /* The label's colour, not the page's. `--gog-text-color` is the colour of text on the page
445
+ background, and a filled button is not the page background — on the dark theme that put pale
446
+ parchment on bright amber, which read as a washed-out spinner beside a near-black label. */
447
+ --gog-btn-primary-spinner-color: var(--gog-btn-primary-color);
440
448
 
441
449
  --gog-btn-secondary-bg: var(--gog-secondary-color);
442
450
  --gog-btn-secondary-color: var(--gog-accent-text-color, var(--gog-primary-color));
@@ -445,7 +453,8 @@
445
453
  --gog-btn-secondary-hover-bg: var(--gog-accent-color);
446
454
  --gog-btn-secondary-hover-color: var(--gog-btn-secondary-color);
447
455
  --gog-btn-secondary-hover-shadow: none;
448
- --gog-btn-secondary-spinner-color: var(--gog-text-color);
456
+ /* Same reasoning as primary: the other filled variant, the same mismatch. */
457
+ --gog-btn-secondary-spinner-color: var(--gog-btn-secondary-color);
449
458
 
450
459
  --gog-btn-outline-bg: transparent;
451
460
  --gog-btn-outline-color: var(--gog-accent-color);
@@ -498,6 +507,9 @@
498
507
  /* ── Calendar (the month grid inside gog-datepicker, and gog-calendar on its own) ── */
499
508
  --gog-calendar-font-family: var(--gog-font-body);
500
509
  --gog-calendar-color: var(--gog-text-color);
510
+ /* Caps the host at its month grid instead of letting the header spread to the container.
511
+ `100%` restores the pre-21.5.0 full-width behaviour. */
512
+ --gog-calendar-max-width: max-content;
501
513
  --gog-calendar-padding: 12px;
502
514
  --gog-calendar-header-gap: 4px;
503
515
  --gog-calendar-header-margin: 8px;
@@ -872,6 +884,9 @@
872
884
  --gog-datepicker-panel-border-color: var(--gog-border-color);
873
885
  --gog-datepicker-panel-radius: var(--gog-radius);
874
886
  --gog-datepicker-panel-gap: 2px;
887
+ /* The dropdown surface. Inline mode is `gog-calendar` itself, so it sizes from
888
+ `--gog-calendar-max-width` rather than from this. */
889
+ --gog-datepicker-panel-width: max-content;
875
890
  --gog-datepicker-float-label-reserve: var(--gog-field-float-label-reserve);
876
891
  --gog-datepicker-float-label-in-top: var(--gog-field-float-label-in-top);
877
892
  --gog-datepicker-float-label-over-gap: var(--gog-field-float-label-over-gap);