@guildofgleks/ui 21.6.0 → 21.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +326 -82
- package/CHANGELOG.md +269 -2
- package/README.md +98 -20
- package/TOKENS.md +10 -7
- package/fesm2022/guildofgleks-ui.mjs +1067 -1383
- package/fesm2022/guildofgleks-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/styles/button.css +11 -32
- package/styles/index.css +5 -0
- package/styles/presets/bevel.css +82 -0
- package/styles/presets/ledger.css +66 -0
- package/styles/presets/material.css +111 -0
- package/styles/presets/one-dark.css +22 -5
- package/styles/presets/one-light.css +17 -4
- package/styles/presets/parchment.css +63 -0
- package/styles/presets/parchment.fonts.css +29 -0
- package/styles/presets/primeng.css +121 -0
- package/styles/presets/slate.css +26 -8
- package/styles/presets/terminal.css +67 -0
- package/styles/presets/terminal.fonts.css +26 -0
- package/styles/ripple.css +94 -0
- package/styles/surfaces.css +151 -0
- package/styles/theme.css +620 -516
- package/types/guildofgleks-ui.d.ts +359 -36
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, inject,
|
|
2
|
+
import { InjectionToken, inject, computed, ElementRef, Renderer2, PLATFORM_ID, effect, DestroyRef, input, booleanAttribute, Directive, ChangeDetectionStrategy, Component, output, isDevMode, TemplateRef, model, contentChild, signal, untracked, ApplicationRef, viewChild, afterNextRender, viewChildren, contentChildren, forwardRef, Injectable, Injector, afterRenderEffect, ViewContainerRef, linkedSignal } from '@angular/core';
|
|
3
3
|
import { Subject, timer } from 'rxjs';
|
|
4
4
|
import { throttle } from 'rxjs/operators';
|
|
5
5
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
6
|
-
import {
|
|
6
|
+
import { DOCUMENT, isPlatformBrowser, NgTemplateOutlet, NgComponentOutlet } from '@angular/common';
|
|
7
7
|
import { DomSanitizer } from '@angular/platform-browser';
|
|
8
8
|
import { NgControl } from '@angular/forms';
|
|
9
9
|
|
|
@@ -96,6 +96,310 @@ function resolveConfigured(instanceValue, configuredValue, fallback) {
|
|
|
96
96
|
return instanceValue ?? configuredValue ?? fallback;
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
+
/**
|
|
100
|
+
* Off, so the ripple is purely additive: adding it to the library changed the appearance of
|
|
101
|
+
* nothing until an app asks for it. Flipping this default would change how every button in every
|
|
102
|
+
* consuming app looks, which is a release of its own, not a line in a feature commit.
|
|
103
|
+
*/
|
|
104
|
+
const DEFAULT_RIPPLE = false;
|
|
105
|
+
/**
|
|
106
|
+
* Shared "does this control ripple" state, resolved the usual way — instance input, then
|
|
107
|
+
* `GOG_CONFIG.ripple.enabled`, then off.
|
|
108
|
+
*
|
|
109
|
+
* A plain function rather than a class (`GogClearableState`'s shape) because there is exactly one
|
|
110
|
+
* derived value and nothing to hold: every component that ripples writes the same two lines, and
|
|
111
|
+
* this is what keeps the precedence identical across all nine of them instead of nine separate
|
|
112
|
+
* `??` chains that can drift.
|
|
113
|
+
*
|
|
114
|
+
* The component then binds the *negation* onto its own inner element:
|
|
115
|
+
*
|
|
116
|
+
* ```html
|
|
117
|
+
* <button class="gog-btn" gogRipple [rippleDisabled]="!rippleEnabled()">
|
|
118
|
+
* ```
|
|
119
|
+
*
|
|
120
|
+
* `[gogRipple]` is always applied rather than toggled, because a directive cannot be added and
|
|
121
|
+
* removed by a binding — and it costs nothing while disabled: `GogRippleDirective` attaches no
|
|
122
|
+
* event listeners at all until `rippleDisabled` goes false.
|
|
123
|
+
*/
|
|
124
|
+
function resolveRipple(rippleInput, config) {
|
|
125
|
+
return computed(() => resolveConfigured(rippleInput(), config.ripple?.enabled, DEFAULT_RIPPLE));
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* The ripple itself, as a plain class rather than as part of the directive.
|
|
130
|
+
*
|
|
131
|
+
* It is split out because **two kinds of caller need it**. `[gogRipple]` is the one a consumer
|
|
132
|
+
* writes on their own element; the other is the library's own directives that already own a
|
|
133
|
+
* consumer's element — `[gogButton]`, `gogMenuItem`, `gogCollapsibleTrigger` — which cannot use
|
|
134
|
+
* `hostDirectives` here. `hostDirectives` can forward an input but cannot *compute* one, and what
|
|
135
|
+
* those directives need is the negation of a value resolved through `GOG_CONFIG`. Owning a
|
|
136
|
+
* controller is three lines; the alternative was either a ripple those elements could not turn
|
|
137
|
+
* off or one that ignored the app-wide setting.
|
|
138
|
+
*
|
|
139
|
+
* ## What it does not do to its host
|
|
140
|
+
*
|
|
141
|
+
* The obvious ripple gives the host `overflow: hidden` and paints inside it, which clips
|
|
142
|
+
* `gogBadge` — the badge sits outside the host's box on purpose. So the host only ever gets
|
|
143
|
+
* `position: relative` (via `.gog-ripple-host`, and only while enabled), and the wash lives in a
|
|
144
|
+
* layer that clips *itself* and takes the host's corner radius with `border-radius: inherit`.
|
|
145
|
+
* See `styles/ripple.css`.
|
|
146
|
+
*
|
|
147
|
+
* ## Cost when disabled
|
|
148
|
+
*
|
|
149
|
+
* Nothing but the instance. `setEnabled(false)` detaches both trigger listeners and drops the
|
|
150
|
+
* host class, so a component that wires a ripple in behind an input that is off pays for no
|
|
151
|
+
* listeners, no class and no DOM. That is what makes `GOG_CONFIG.ripple.enabled` worth having as
|
|
152
|
+
* a config key rather than as a `--gog-ripple-opacity: 0` token.
|
|
153
|
+
*/
|
|
154
|
+
class GogRippleController {
|
|
155
|
+
host;
|
|
156
|
+
renderer;
|
|
157
|
+
document;
|
|
158
|
+
isBrowser;
|
|
159
|
+
centred;
|
|
160
|
+
layer = null;
|
|
161
|
+
active = new Set();
|
|
162
|
+
/** Set while a key is held, so auto-repeat does not stack a ripple per repeat event. */
|
|
163
|
+
keyHeld = false;
|
|
164
|
+
/** `renderer.listen` teardowns: the two on the host, and the three on the document. */
|
|
165
|
+
triggerListeners = [];
|
|
166
|
+
releaseListeners = [];
|
|
167
|
+
constructor(host, renderer, document, isBrowser,
|
|
168
|
+
/** Start every ripple from the middle, ignoring where the pointer landed. */
|
|
169
|
+
centred) {
|
|
170
|
+
this.host = host;
|
|
171
|
+
this.renderer = renderer;
|
|
172
|
+
this.document = document;
|
|
173
|
+
this.isBrowser = isBrowser;
|
|
174
|
+
this.centred = centred;
|
|
175
|
+
}
|
|
176
|
+
setEnabled(enabled) {
|
|
177
|
+
if (!this.isBrowser)
|
|
178
|
+
return;
|
|
179
|
+
if (enabled)
|
|
180
|
+
this.attachTriggers();
|
|
181
|
+
else
|
|
182
|
+
this.detachTriggers();
|
|
183
|
+
}
|
|
184
|
+
destroy() {
|
|
185
|
+
this.detachTriggers();
|
|
186
|
+
this.stopListeningForRelease();
|
|
187
|
+
for (const instance of [...this.active])
|
|
188
|
+
this.remove(instance);
|
|
189
|
+
if (this.layer?.parentNode) {
|
|
190
|
+
this.renderer.removeChild(this.layer.parentNode, this.layer);
|
|
191
|
+
}
|
|
192
|
+
this.layer = null;
|
|
193
|
+
}
|
|
194
|
+
attachTriggers() {
|
|
195
|
+
if (this.triggerListeners.length > 0)
|
|
196
|
+
return;
|
|
197
|
+
// The layer is positioned against the host, so it has to be a containing block. A class
|
|
198
|
+
// rather than an inline style, so a host that is itself absolutely positioned can say so.
|
|
199
|
+
this.renderer.addClass(this.host, 'gog-ripple-host');
|
|
200
|
+
this.triggerListeners = [
|
|
201
|
+
this.renderer.listen(this.host, 'pointerdown', (event) => this.onPointerDown(event)),
|
|
202
|
+
this.renderer.listen(this.host, 'keydown', (event) => this.onKeyDown(event)),
|
|
203
|
+
];
|
|
204
|
+
}
|
|
205
|
+
detachTriggers() {
|
|
206
|
+
for (const unlisten of this.triggerListeners)
|
|
207
|
+
unlisten();
|
|
208
|
+
this.triggerListeners = [];
|
|
209
|
+
this.renderer.removeClass(this.host, 'gog-ripple-host');
|
|
210
|
+
// Switched off mid-press: the wave has nothing left to answer to, so it goes at once rather
|
|
211
|
+
// than hanging until a release that is no longer being listened for.
|
|
212
|
+
this.release();
|
|
213
|
+
}
|
|
214
|
+
onPointerDown(event) {
|
|
215
|
+
// Secondary buttons open context menus and never produce a click, so they get no feedback.
|
|
216
|
+
if (event.button !== undefined && event.button !== 0)
|
|
217
|
+
return;
|
|
218
|
+
this.launch(event.clientX, event.clientY);
|
|
219
|
+
}
|
|
220
|
+
onKeyDown(event) {
|
|
221
|
+
if (event.key !== 'Enter' && event.key !== ' ' && event.key !== 'Spacebar')
|
|
222
|
+
return;
|
|
223
|
+
if (event.repeat || this.keyHeld)
|
|
224
|
+
return;
|
|
225
|
+
this.keyHeld = true;
|
|
226
|
+
this.launch();
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* Starts one ripple. Coordinates are viewport-relative (`clientX`/`clientY`); omitted, or with
|
|
230
|
+
* `centred`, it starts from the middle of the host.
|
|
231
|
+
*/
|
|
232
|
+
launch(clientX, clientY) {
|
|
233
|
+
if (this.suppressed())
|
|
234
|
+
return;
|
|
235
|
+
const rect = this.host.getBoundingClientRect();
|
|
236
|
+
const centred = this.centred() || clientX === undefined || clientY === undefined;
|
|
237
|
+
const x = centred ? rect.width / 2 : clientX - rect.left;
|
|
238
|
+
const y = centred ? rect.height / 2 : clientY - rect.top;
|
|
239
|
+
// The circle has to reach the farthest corner, or a press near one edge leaves the opposite
|
|
240
|
+
// corner untouched — which reads as a bug rather than as a deliberate partial wash.
|
|
241
|
+
const radius = Math.hypot(Math.max(x, rect.width - x), Math.max(y, rect.height - y));
|
|
242
|
+
const node = this.renderer.createElement('span');
|
|
243
|
+
this.renderer.setAttribute(node, 'class', 'gog-ripple gog-ripple--entering');
|
|
244
|
+
this.renderer.setStyle(node, 'left', `${x - radius}px`);
|
|
245
|
+
this.renderer.setStyle(node, 'top', `${y - radius}px`);
|
|
246
|
+
this.renderer.setStyle(node, 'width', `${radius * 2}px`);
|
|
247
|
+
this.renderer.setStyle(node, 'height', `${radius * 2}px`);
|
|
248
|
+
const instance = { node, entered: false, released: false };
|
|
249
|
+
this.active.add(instance);
|
|
250
|
+
// One listener for both phases. Which animation just ended is read from the instance's own
|
|
251
|
+
// state rather than from `event.animationName`, so renaming a keyframe in the stylesheet
|
|
252
|
+
// cannot silently strand a node in the DOM.
|
|
253
|
+
this.renderer.listen(node, 'animationend', () => this.onAnimationEnd(instance));
|
|
254
|
+
this.renderer.appendChild(this.ensureLayer(), node);
|
|
255
|
+
this.listenForRelease();
|
|
256
|
+
}
|
|
257
|
+
/**
|
|
258
|
+
* The release listeners live on the **document**, and only while something is in flight.
|
|
259
|
+
*
|
|
260
|
+
* On the host they would be three more permanent listeners per rippling element — the cost
|
|
261
|
+
* that matters on a panel rendering a thousand options — and they would still miss the
|
|
262
|
+
* ordinary case of pressing a button and letting go somewhere else on the page, which fires no
|
|
263
|
+
* `pointerup` on the host at all.
|
|
264
|
+
*/
|
|
265
|
+
listenForRelease() {
|
|
266
|
+
if (this.releaseListeners.length > 0)
|
|
267
|
+
return;
|
|
268
|
+
this.releaseListeners = [
|
|
269
|
+
// `pointercancel` is also what the browser sends when it takes a touch gesture over for
|
|
270
|
+
// scrolling, so a drag-to-scroll inside a `gog-scroll` fades the ripple instead of
|
|
271
|
+
// stranding it.
|
|
272
|
+
this.renderer.listen(this.document, 'pointerup', () => this.release()),
|
|
273
|
+
this.renderer.listen(this.document, 'pointercancel', () => this.release()),
|
|
274
|
+
this.renderer.listen(this.document, 'keyup', () => this.release()),
|
|
275
|
+
];
|
|
276
|
+
}
|
|
277
|
+
stopListeningForRelease() {
|
|
278
|
+
for (const unlisten of this.releaseListeners)
|
|
279
|
+
unlisten();
|
|
280
|
+
this.releaseListeners = [];
|
|
281
|
+
}
|
|
282
|
+
/** The pointer or key was let go: every live ripple may now fade out. */
|
|
283
|
+
release() {
|
|
284
|
+
this.keyHeld = false;
|
|
285
|
+
this.stopListeningForRelease();
|
|
286
|
+
for (const instance of this.active) {
|
|
287
|
+
instance.released = true;
|
|
288
|
+
if (instance.entered)
|
|
289
|
+
this.beginExit(instance);
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
onAnimationEnd(instance) {
|
|
293
|
+
if (!instance.entered) {
|
|
294
|
+
instance.entered = true;
|
|
295
|
+
// Released mid-expansion: the fade was owed and is paid now the wave has finished growing.
|
|
296
|
+
if (instance.released)
|
|
297
|
+
this.beginExit(instance);
|
|
298
|
+
return;
|
|
299
|
+
}
|
|
300
|
+
this.remove(instance);
|
|
301
|
+
}
|
|
302
|
+
beginExit(instance) {
|
|
303
|
+
this.renderer.setAttribute(instance.node, 'class', 'gog-ripple gog-ripple--leaving');
|
|
304
|
+
}
|
|
305
|
+
remove(instance) {
|
|
306
|
+
if (instance.node.parentNode) {
|
|
307
|
+
this.renderer.removeChild(instance.node.parentNode, instance.node);
|
|
308
|
+
}
|
|
309
|
+
this.active.delete(instance);
|
|
310
|
+
}
|
|
311
|
+
ensureLayer() {
|
|
312
|
+
if (this.layer)
|
|
313
|
+
return this.layer;
|
|
314
|
+
const layer = this.renderer.createElement('span');
|
|
315
|
+
this.renderer.setAttribute(layer, 'class', 'gog-ripple-layer');
|
|
316
|
+
// Decoration, and nothing an assistive technology should meet.
|
|
317
|
+
this.renderer.setAttribute(layer, 'aria-hidden', 'true');
|
|
318
|
+
this.renderer.appendChild(this.host, layer);
|
|
319
|
+
this.layer = layer;
|
|
320
|
+
return layer;
|
|
321
|
+
}
|
|
322
|
+
suppressed() {
|
|
323
|
+
// A host the user cannot act on must not answer as though they had. `disabled` covers the
|
|
324
|
+
// native controls; `aria-disabled` covers the ones this library keeps focusable on purpose.
|
|
325
|
+
if (this.host.hasAttribute('disabled'))
|
|
326
|
+
return true;
|
|
327
|
+
if (this.host.getAttribute('aria-disabled') === 'true')
|
|
328
|
+
return true;
|
|
329
|
+
return this.prefersReducedMotion();
|
|
330
|
+
}
|
|
331
|
+
prefersReducedMotion() {
|
|
332
|
+
return (typeof window !== 'undefined' && window.matchMedia('(prefers-reduced-motion: reduce)').matches);
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
/**
|
|
336
|
+
* Wires a ripple onto the current injection context's own host element, driven by `enabled`.
|
|
337
|
+
*
|
|
338
|
+
* One line in any directive or component that already owns the element it wants to ripple:
|
|
339
|
+
*
|
|
340
|
+
* ```ts
|
|
341
|
+
* private readonly rippleControl = bindRipple(this.rippleEnabled);
|
|
342
|
+
* ```
|
|
343
|
+
*
|
|
344
|
+
* Must be called from an injection context (a field initialiser or a constructor).
|
|
345
|
+
*/
|
|
346
|
+
function bindRipple(enabled, centred = () => false) {
|
|
347
|
+
const controller = new GogRippleController(inject(ElementRef).nativeElement, inject(Renderer2), inject(DOCUMENT), isPlatformBrowser(inject(PLATFORM_ID)), () => centred());
|
|
348
|
+
effect(() => controller.setEnabled(enabled()));
|
|
349
|
+
inject(DestroyRef).onDestroy(() => controller.destroy());
|
|
350
|
+
return controller;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
/**
|
|
354
|
+
* A pointer-position ripple for any element — a `gog-*` component's host tag or a plain native
|
|
355
|
+
* one: `<button gogRipple>`, `<div gogRipple rippleCentred>`.
|
|
356
|
+
*
|
|
357
|
+
* Built from scratch. There is no `@angular/cdk` in this tree and there will not be, so
|
|
358
|
+
* Material's `MatRipple` is a reference for behaviour only.
|
|
359
|
+
*
|
|
360
|
+
* **Put it on the element that paints the surface.** The wash lives in its own layer that clips
|
|
361
|
+
* itself — the host is never given `overflow: hidden`, so a `gogBadge` on the same element keeps
|
|
362
|
+
* its badge — and that layer takes the host's corner radius with `border-radius: inherit`. On a
|
|
363
|
+
* wrapper whose *child* paints the rounded background, the layer inherits the wrapper's radius,
|
|
364
|
+
* usually `0`, and the wash squares off at the corners. `GogRippleController` and
|
|
365
|
+
* `styles/ripple.css` carry the rest of the reasoning.
|
|
366
|
+
*
|
|
367
|
+
* ## What suppresses it
|
|
368
|
+
*
|
|
369
|
+
* `rippleDisabled`, a host that is `disabled` or `aria-disabled="true"`, and
|
|
370
|
+
* `prefers-reduced-motion: reduce` — the last one suppressed outright rather than shortened,
|
|
371
|
+
* because a ripple is the single most obviously decorative motion in the library.
|
|
372
|
+
*
|
|
373
|
+
* ## Why `GOG_CONFIG.ripple.enabled` does not reach this directive
|
|
374
|
+
*
|
|
375
|
+
* That setting is the default for the **components'** `ripple` input, and this is not a
|
|
376
|
+
* component's input: writing `gogRipple` on your own element is already the per-element
|
|
377
|
+
* decision, the same way `[filter]="true"` on one `gog-select` beats the app-wide default.
|
|
378
|
+
* `rippleDisabled` is how you take it back, per instance or bound to whatever you like.
|
|
379
|
+
*/
|
|
380
|
+
class GogRippleDirective {
|
|
381
|
+
/**
|
|
382
|
+
* Suppresses the effect without removing the directive — and suppresses its listeners and its
|
|
383
|
+
* host class with it, so this is a real disable rather than a hidden ripple.
|
|
384
|
+
*/
|
|
385
|
+
rippleDisabled = input(false, { ...(ngDevMode ? { debugName: "rippleDisabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
386
|
+
/**
|
|
387
|
+
* Always start from the centre of the host, ignoring where the pointer landed. Keyboard
|
|
388
|
+
* activation is centred regardless — `Enter` and `Space` carry no coordinates.
|
|
389
|
+
*/
|
|
390
|
+
rippleCentred = input(false, { ...(ngDevMode ? { debugName: "rippleCentred" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
391
|
+
enabled = computed(() => !this.rippleDisabled(), ...(ngDevMode ? [{ debugName: "enabled" }] : /* istanbul ignore next */ []));
|
|
392
|
+
rippleControl = bindRipple(this.enabled, this.rippleCentred);
|
|
393
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: GogRippleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
394
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.17", type: GogRippleDirective, isStandalone: true, selector: "[gogRipple]", inputs: { rippleDisabled: { classPropertyName: "rippleDisabled", publicName: "rippleDisabled", isSignal: true, isRequired: false, transformFunction: null }, rippleCentred: { classPropertyName: "rippleCentred", publicName: "rippleCentred", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 });
|
|
395
|
+
}
|
|
396
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: GogRippleDirective, decorators: [{
|
|
397
|
+
type: Directive,
|
|
398
|
+
args: [{
|
|
399
|
+
selector: '[gogRipple]',
|
|
400
|
+
}]
|
|
401
|
+
}], propDecorators: { rippleDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "rippleDisabled", required: false }] }], rippleCentred: [{ type: i0.Input, args: [{ isSignal: true, alias: "rippleCentred", required: false }] }] } });
|
|
402
|
+
|
|
99
403
|
class SpinnerComponent {
|
|
100
404
|
size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
101
405
|
/**
|
|
@@ -136,6 +440,11 @@ class ButtonComponent {
|
|
|
136
440
|
fullWidth = input(false, ...(ngDevMode ? [{ debugName: "fullWidth" }] : /* istanbul ignore next */ []));
|
|
137
441
|
type = input('button', ...(ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []));
|
|
138
442
|
loading = input(false, ...(ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []));
|
|
443
|
+
/**
|
|
444
|
+
* Press ripple. Unset, falls back to `GOG_CONFIG.ripple.enabled`, then to `false` — so
|
|
445
|
+
* `[ripple]="false"` is how one button opts out of an app that turned it on everywhere.
|
|
446
|
+
*/
|
|
447
|
+
ripple = input(undefined, ...(ngDevMode ? [{ debugName: "ripple" }] : /* istanbul ignore next */ []));
|
|
139
448
|
/**
|
|
140
449
|
* Minimum time, in ms, between accepted clicks. This is a spam/double-click
|
|
141
450
|
* guard, not a delay before the first click fires: the first click in a
|
|
@@ -165,6 +474,7 @@ class ButtonComponent {
|
|
|
165
474
|
slg: 'md',
|
|
166
475
|
};
|
|
167
476
|
globalConfig = inject(GOG_CONFIG);
|
|
477
|
+
rippleEnabled = resolveRipple(this.ripple, this.globalConfig);
|
|
168
478
|
/** Instance input → `GOG_CONFIG` → the component's own default. See `resolveConfigured`. */
|
|
169
479
|
resolvedSize = computed(() => resolveConfigured(this.size(), this.globalConfig.control?.size, DEFAULT_SIZE$a), ...(ngDevMode ? [{ debugName: "resolvedSize" }] : /* istanbul ignore next */ []));
|
|
170
480
|
spinnerSize = computed(() => ButtonComponent.SPINNER_SIZE_BY_BUTTON_SIZE[this.resolvedSize()], ...(ngDevMode ? [{ debugName: "spinnerSize" }] : /* istanbul ignore next */ []));
|
|
@@ -187,16 +497,16 @@ class ButtonComponent {
|
|
|
187
497
|
this.click$.next(event);
|
|
188
498
|
}
|
|
189
499
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: ButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
190
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: ButtonComponent, isStandalone: true, selector: "gog-button", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, fullWidth: { classPropertyName: "fullWidth", publicName: "fullWidth", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, debounce: { classPropertyName: "debounce", publicName: "debounce", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { gogClick: "gogClick" }, host: { properties: { "class.gog-host--full-width": "fullWidth()" } }, ngImport: i0, template: "<button\r\n (click)=\"onClick($event)\"\r\n [attr.aria-busy]=\"loading() ? 'true' : null\"\r\n [attr.aria-disabled]=\"isDisabled() && !isNativeDisabled() ? 'true' : null\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n [attr.disabled]=\"isNativeDisabled() ? true : null\"\r\n [class.gog-btn--ghost]=\"variant() === 'ghost'\"\r\n [class.gog-btn--loading]=\"loading()\"\r\n [class.gog-btn--outline]=\"variant() === 'outline'\"\r\n [class.gog-btn--primary]=\"variant() === 'primary'\"\r\n [class.gog-btn--secondary]=\"variant() === 'secondary'\"\r\n [class.gog-cursor-not-allowed]=\"isDisabled()\"\r\n [class.gog-cursor-pointer]=\"!isDisabled()\"\r\n [class.gog-cursor-wait]=\"loading()\"\r\n [type]=\"type()\"\r\n class=\"gog-btn gog-inline-center gog-contained-layout\"\r\n [class]=\"sizeClass()\"\r\n>\r\n @if (loading()) {\r\n <gog-spinner [size]=\"spinnerSize()\" aria-hidden=\"true\" class=\"gog-btn__spinner\" />\r\n }\r\n\r\n <span [class.gog-btn__content--hidden]=\"loading()\" class=\"gog-btn__content\">\r\n <ng-content></ng-content>\r\n </span>\r\n</button>\r\n", styles: ["@charset \"UTF-8\";:host(.gog-host--full-width){display:flex}:host(.gog-host--full-width) .gog-btn{width:100%}\n"], dependencies: [{ kind: "component", type: SpinnerComponent, selector: "gog-spinner", inputs: ["size", "overlay", "ariaLabel", "variant"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
500
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: ButtonComponent, isStandalone: true, selector: "gog-button", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, fullWidth: { classPropertyName: "fullWidth", publicName: "fullWidth", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, ripple: { classPropertyName: "ripple", publicName: "ripple", isSignal: true, isRequired: false, transformFunction: null }, debounce: { classPropertyName: "debounce", publicName: "debounce", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { gogClick: "gogClick" }, host: { properties: { "class.gog-host--full-width": "fullWidth()" } }, ngImport: i0, template: "<button\r\n (click)=\"onClick($event)\"\r\n [attr.aria-busy]=\"loading() ? 'true' : null\"\r\n [attr.aria-disabled]=\"isDisabled() && !isNativeDisabled() ? 'true' : null\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n [attr.disabled]=\"isNativeDisabled() ? true : null\"\r\n [class.gog-btn--ghost]=\"variant() === 'ghost'\"\r\n [class.gog-btn--loading]=\"loading()\"\r\n [class.gog-btn--outline]=\"variant() === 'outline'\"\r\n [class.gog-btn--primary]=\"variant() === 'primary'\"\r\n [class.gog-btn--secondary]=\"variant() === 'secondary'\"\r\n [class.gog-cursor-not-allowed]=\"isDisabled()\"\r\n [class.gog-cursor-pointer]=\"!isDisabled()\"\r\n [class.gog-cursor-wait]=\"loading()\"\r\n [type]=\"type()\"\r\n class=\"gog-btn gog-inline-center gog-contained-layout\"\r\n [class]=\"sizeClass()\"\r\n gogRipple\r\n [rippleDisabled]=\"!rippleEnabled()\"\r\n>\r\n @if (loading()) {\r\n <gog-spinner [size]=\"spinnerSize()\" aria-hidden=\"true\" class=\"gog-btn__spinner\" />\r\n }\r\n\r\n <span [class.gog-btn__content--hidden]=\"loading()\" class=\"gog-btn__content\">\r\n <ng-content></ng-content>\r\n </span>\r\n</button>\r\n", styles: ["@charset \"UTF-8\";:host(.gog-host--full-width){display:flex}:host(.gog-host--full-width) .gog-btn{width:100%}\n"], dependencies: [{ kind: "directive", type: GogRippleDirective, selector: "[gogRipple]", inputs: ["rippleDisabled", "rippleCentred"] }, { kind: "component", type: SpinnerComponent, selector: "gog-spinner", inputs: ["size", "overlay", "ariaLabel", "variant"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
191
501
|
}
|
|
192
502
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: ButtonComponent, decorators: [{
|
|
193
503
|
type: Component,
|
|
194
|
-
args: [{ selector: 'gog-button', imports: [SpinnerComponent], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
504
|
+
args: [{ selector: 'gog-button', imports: [GogRippleDirective, SpinnerComponent], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
195
505
|
// Drives the :host(.gog-host--full-width) rules in the stylesheet — without this
|
|
196
506
|
// binding the `fullWidth` input has no visible effect.
|
|
197
507
|
'[class.gog-host--full-width]': 'fullWidth()',
|
|
198
|
-
}, template: "<button\r\n (click)=\"onClick($event)\"\r\n [attr.aria-busy]=\"loading() ? 'true' : null\"\r\n [attr.aria-disabled]=\"isDisabled() && !isNativeDisabled() ? 'true' : null\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n [attr.disabled]=\"isNativeDisabled() ? true : null\"\r\n [class.gog-btn--ghost]=\"variant() === 'ghost'\"\r\n [class.gog-btn--loading]=\"loading()\"\r\n [class.gog-btn--outline]=\"variant() === 'outline'\"\r\n [class.gog-btn--primary]=\"variant() === 'primary'\"\r\n [class.gog-btn--secondary]=\"variant() === 'secondary'\"\r\n [class.gog-cursor-not-allowed]=\"isDisabled()\"\r\n [class.gog-cursor-pointer]=\"!isDisabled()\"\r\n [class.gog-cursor-wait]=\"loading()\"\r\n [type]=\"type()\"\r\n class=\"gog-btn gog-inline-center gog-contained-layout\"\r\n [class]=\"sizeClass()\"\r\n>\r\n @if (loading()) {\r\n <gog-spinner [size]=\"spinnerSize()\" aria-hidden=\"true\" class=\"gog-btn__spinner\" />\r\n }\r\n\r\n <span [class.gog-btn__content--hidden]=\"loading()\" class=\"gog-btn__content\">\r\n <ng-content></ng-content>\r\n </span>\r\n</button>\r\n", styles: ["@charset \"UTF-8\";:host(.gog-host--full-width){display:flex}:host(.gog-host--full-width) .gog-btn{width:100%}\n"] }]
|
|
199
|
-
}], ctorParameters: () => [], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], fullWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "fullWidth", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], debounce: [{ type: i0.Input, args: [{ isSignal: true, alias: "debounce", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], gogClick: [{ type: i0.Output, args: ["gogClick"] }] } });
|
|
508
|
+
}, template: "<button\r\n (click)=\"onClick($event)\"\r\n [attr.aria-busy]=\"loading() ? 'true' : null\"\r\n [attr.aria-disabled]=\"isDisabled() && !isNativeDisabled() ? 'true' : null\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n [attr.disabled]=\"isNativeDisabled() ? true : null\"\r\n [class.gog-btn--ghost]=\"variant() === 'ghost'\"\r\n [class.gog-btn--loading]=\"loading()\"\r\n [class.gog-btn--outline]=\"variant() === 'outline'\"\r\n [class.gog-btn--primary]=\"variant() === 'primary'\"\r\n [class.gog-btn--secondary]=\"variant() === 'secondary'\"\r\n [class.gog-cursor-not-allowed]=\"isDisabled()\"\r\n [class.gog-cursor-pointer]=\"!isDisabled()\"\r\n [class.gog-cursor-wait]=\"loading()\"\r\n [type]=\"type()\"\r\n class=\"gog-btn gog-inline-center gog-contained-layout\"\r\n [class]=\"sizeClass()\"\r\n gogRipple\r\n [rippleDisabled]=\"!rippleEnabled()\"\r\n>\r\n @if (loading()) {\r\n <gog-spinner [size]=\"spinnerSize()\" aria-hidden=\"true\" class=\"gog-btn__spinner\" />\r\n }\r\n\r\n <span [class.gog-btn__content--hidden]=\"loading()\" class=\"gog-btn__content\">\r\n <ng-content></ng-content>\r\n </span>\r\n</button>\r\n", styles: ["@charset \"UTF-8\";:host(.gog-host--full-width){display:flex}:host(.gog-host--full-width) .gog-btn{width:100%}\n"] }]
|
|
509
|
+
}], ctorParameters: () => [], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], fullWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "fullWidth", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], ripple: [{ type: i0.Input, args: [{ isSignal: true, alias: "ripple", required: false }] }], debounce: [{ type: i0.Input, args: [{ isSignal: true, alias: "debounce", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], gogClick: [{ type: i0.Output, args: ["gogClick"] }] } });
|
|
200
510
|
|
|
201
511
|
/** Built-in default, used when neither the instance input nor `GOG_CONFIG` supplies one. */
|
|
202
512
|
const DEFAULT_SIZE$9 = 'md';
|
|
@@ -247,19 +557,26 @@ class GogButtonDirective {
|
|
|
247
557
|
* Stretches the element to its container's width. A bare attribute is enough:
|
|
248
558
|
* `<a gogButton fullWidth>`.
|
|
249
559
|
*/
|
|
560
|
+
/**
|
|
561
|
+
* Press ripple. Unset, falls back to `GOG_CONFIG.ripple.enabled`, then to `false` — so
|
|
562
|
+
* `[ripple]="false"` opts one instance out of an app that turned it on everywhere.
|
|
563
|
+
*/
|
|
564
|
+
ripple = input(undefined, ...(ngDevMode ? [{ debugName: "ripple" }] : /* istanbul ignore next */ []));
|
|
250
565
|
fullWidth = input(false, { ...(ngDevMode ? { debugName: "fullWidth" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
251
566
|
globalConfig = inject(GOG_CONFIG);
|
|
567
|
+
rippleEnabled = resolveRipple(this.ripple, this.globalConfig);
|
|
568
|
+
rippleControl = bindRipple(this.rippleEnabled);
|
|
252
569
|
resolvedSize = computed(() => resolveConfigured(this.size(), this.globalConfig.control?.size, DEFAULT_SIZE$9), ...(ngDevMode ? [{ debugName: "resolvedSize" }] : /* istanbul ignore next */ []));
|
|
253
570
|
variantClass = computed(() => `gog-btn--${this.variant()}`, ...(ngDevMode ? [{ debugName: "variantClass" }] : /* istanbul ignore next */ []));
|
|
254
571
|
/**
|
|
255
572
|
* Unlike `gog-button`, this emits a class for `'md'` too. The component can leave the default
|
|
256
|
-
* size unclassed because its own stylesheet bottoms out at `--gog-
|
|
573
|
+
* size unclassed because its own stylesheet bottoms out at `--gog-button-md-*`; here the class is
|
|
257
574
|
* also what a consumer reads in devtools to see which size is applied, and a silently absent
|
|
258
575
|
* one reads as "no size resolved".
|
|
259
576
|
*/
|
|
260
577
|
sizeClass = computed(() => `gog-btn--${this.resolvedSize()}`, ...(ngDevMode ? [{ debugName: "sizeClass" }] : /* istanbul ignore next */ []));
|
|
261
578
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: GogButtonDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
262
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.17", type: GogButtonDirective, isStandalone: true, selector: "a[gogButton], button[gogButton]", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, fullWidth: { classPropertyName: "fullWidth", publicName: "fullWidth", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "variantClass() + \" \" + sizeClass()", "class.gog-btn--full-width": "fullWidth()" }, classAttribute: "gog-btn gog-inline-center gog-contained-layout" }, ngImport: i0 });
|
|
579
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.17", type: GogButtonDirective, isStandalone: true, selector: "a[gogButton], button[gogButton]", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, ripple: { classPropertyName: "ripple", publicName: "ripple", isSignal: true, isRequired: false, transformFunction: null }, fullWidth: { classPropertyName: "fullWidth", publicName: "fullWidth", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "variantClass() + \" \" + sizeClass()", "class.gog-btn--full-width": "fullWidth()" }, classAttribute: "gog-btn gog-inline-center gog-contained-layout" }, ngImport: i0 });
|
|
263
580
|
}
|
|
264
581
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: GogButtonDirective, decorators: [{
|
|
265
582
|
type: Directive,
|
|
@@ -274,7 +591,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
|
|
|
274
591
|
'[class.gog-btn--full-width]': 'fullWidth()',
|
|
275
592
|
},
|
|
276
593
|
}]
|
|
277
|
-
}], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], fullWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "fullWidth", required: false }] }] } });
|
|
594
|
+
}], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], ripple: [{ type: i0.Input, args: [{ isSignal: true, alias: "ripple", required: false }] }], fullWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "fullWidth", required: false }] }] } });
|
|
278
595
|
|
|
279
596
|
const VERTICAL_ARROWS = ['ArrowDown', 'ArrowUp'];
|
|
280
597
|
const HORIZONTAL_ARROWS = ['ArrowRight', 'ArrowLeft'];
|
|
@@ -651,6 +968,13 @@ class AccordionComponent {
|
|
|
651
968
|
*/
|
|
652
969
|
sizeClass = computed(() => this.size() === 'lg' ? '' : `gog-accordion--${this.size()}`, ...(ngDevMode ? [{ debugName: "sizeClass" }] : /* istanbul ignore next */ []));
|
|
653
970
|
size = input('lg', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
971
|
+
/**
|
|
972
|
+
* Press ripple. Unset, falls back to `GOG_CONFIG.ripple.enabled`, then to `false` — so
|
|
973
|
+
* `[ripple]="false"` opts one instance out of an app that turned it on everywhere.
|
|
974
|
+
*/
|
|
975
|
+
ripple = input(undefined, ...(ngDevMode ? [{ debugName: "ripple" }] : /* istanbul ignore next */ []));
|
|
976
|
+
/** Declared after the input it reads: field initialisers run in source order. */
|
|
977
|
+
rippleEnabled = resolveRipple(this.ripple, inject(GOG_CONFIG));
|
|
654
978
|
expandFirst = input(false, ...(ngDevMode ? [{ debugName: "expandFirst" }] : /* istanbul ignore next */ []));
|
|
655
979
|
multi = input(false, ...(ngDevMode ? [{ debugName: "multi" }] : /* istanbul ignore next */ []));
|
|
656
980
|
loading = input(false, ...(ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []));
|
|
@@ -750,11 +1074,11 @@ class AccordionComponent {
|
|
|
750
1074
|
handleRovingFocusKeydown(event, headers);
|
|
751
1075
|
}
|
|
752
1076
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: AccordionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
753
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: AccordionComponent, isStandalone: true, selector: "gog-accordion", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, expandFirst: { classPropertyName: "expandFirst", publicName: "expandFirst", isSignal: true, isRequired: false, transformFunction: null }, multi: { classPropertyName: "multi", publicName: "multi", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, skeletonCount: { classPropertyName: "skeletonCount", publicName: "skeletonCount", isSignal: true, isRequired: false, transformFunction: null }, showChevron: { classPropertyName: "showChevron", publicName: "showChevron", isSignal: true, isRequired: false, transformFunction: null }, headingLevel: { classPropertyName: "headingLevel", publicName: "headingLevel", isSignal: true, isRequired: false, transformFunction: null }, openIds: { classPropertyName: "openIds", publicName: "openIds", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { openIds: "openIdsChange", gogToggle: "gogToggle" }, host: { properties: { "attr.aria-busy": "loading() ? \"true\" : null" }, classAttribute: "gog-accordion-host" }, queries: [{ propertyName: "headerTpl", first: true, predicate: GogAccordionHeaderDirective, descendants: true, isSignal: true }, { propertyName: "chevronTpl", first: true, predicate: GogAccordionChevronDirective, descendants: true, isSignal: true }, { propertyName: "contentTpl", first: true, predicate: GogAccordionContentDirective, descendants: true, isSignal: true }], ngImport: i0, template: "<div\r\n [class.gog-accordion--loading]=\"loading()\"\r\n class=\"gog-accordion gog-contained-layout\"\r\n [class]=\"sizeClass()\"\r\n>\r\n @if (loading()) {\r\n @for (row of skeletonRows(); track row) {\r\n <div class=\"gog-accordion__item gog-accordion__item--skeleton\">\r\n <div class=\"gog-accordion__header gog-accordion__header--skeleton\">\r\n <gog-skeleton shape=\"text\" [size]=\"size()\" [width]=\"skeletonWidth(row)\" />\r\n <!--\r\n The chevron gets a placeholder too, so the row's silhouette is the one that arrives.\r\n Without it the right-hand side is empty while loading and the chevron appears out of\r\n nowhere \u2014 the shape-matching placeholder failing at the one thing it is for.\r\n -->\r\n @if (showChevron()) {\r\n <span class=\"gog-accordion__chevron\" aria-hidden=\"true\">\r\n <!--\r\n `width=\"100%\"` rather than `[size]`: a skeleton's `size` is its *text* line\r\n height, so a circle given one came out 18px wide and 64px tall and streaked down\r\n the row. A circle takes its diameter from `width` and keeps itself round, so\r\n filling the chevron's own box is what matches it.\r\n -->\r\n <gog-skeleton shape=\"circle\" width=\"100%\" />\r\n </span>\r\n }\r\n </div>\r\n </div>\r\n }\r\n } @else {\r\n @for (item of items(); track item.id) {\r\n <div\r\n class=\"gog-accordion__item\"\r\n [class.gog-accordion__item--open]=\"isOpen(item.id)\"\r\n [class.gog-accordion__item--disabled]=\"item.disabled\"\r\n >\r\n <ng-template #headerButton>\r\n <button\r\n [id]=\"uid + '-btn-' + item.id\"\r\n class=\"gog-accordion__header\"\r\n [class.gog-accordion__header--chevronless]=\"!showChevron()\"\r\n [class.gog-accordion__header--open]=\"isOpen(item.id)\"\r\n [attr.aria-expanded]=\"isOpen(item.id)\"\r\n [attr.aria-controls]=\"uid + '-body-' + item.id\"\r\n [attr.aria-disabled]=\"item.disabled ? 'true' : null\"\r\n [disabled]=\"item.disabled || null\"\r\n (click)=\"toggle(item)\"\r\n (keydown)=\"onHeaderKeydown($event)\"\r\n type=\"button\"\r\n >\r\n <span class=\"gog-accordion__header-content\">\r\n @if (headerTpl(); as tpl) {\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n tpl.templateRef;\r\n context: { $implicit: item, open: isOpen(item.id) }\r\n \"\r\n />\r\n } @else {\r\n <span class=\"gog-accordion__title\">{{ item.title }}</span>\r\n }\r\n </span>\r\n @if (showChevron()) {\r\n <span\r\n class=\"gog-accordion__chevron\"\r\n [class.gog-accordion__chevron--auto-rotate]=\"!chevronTpl()\"\r\n aria-hidden=\"true\"\r\n >\r\n @if (chevronTpl(); as tpl) {\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n tpl.templateRef;\r\n context: { $implicit: item, open: isOpen(item.id) }\r\n \"\r\n />\r\n } @else {\r\n <gog-icon name=\"chevron-down\" />\r\n }\r\n </span>\r\n }\r\n </button>\r\n </ng-template>\r\n\r\n @if (headingLevel(); as level) {\r\n <div role=\"heading\" [attr.aria-level]=\"level\" class=\"gog-accordion__heading\">\r\n <ng-container [ngTemplateOutlet]=\"headerButton\" />\r\n </div>\r\n } @else {\r\n <ng-container [ngTemplateOutlet]=\"headerButton\" />\r\n }\r\n\r\n <div\r\n [id]=\"uid + '-body-' + item.id\"\r\n class=\"gog-accordion__body\"\r\n [class.gog-accordion__body--open]=\"isOpen(item.id)\"\r\n role=\"region\"\r\n [attr.aria-labelledby]=\"uid + '-btn-' + item.id\"\r\n [attr.aria-hidden]=\"!isOpen(item.id)\"\r\n [attr.inert]=\"!isOpen(item.id) ? '' : null\"\r\n >\r\n <div class=\"gog-accordion__body-inner\">\r\n @if (contentTpl(); as tpl) {\r\n <ng-container *ngTemplateOutlet=\"tpl.templateRef; context: { $implicit: item }\" />\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n }\r\n</div>\r\n", styles: ["@charset \"UTF-8\";.gog-accordion{display:flex;flex-direction:column;width:100%}.gog-accordion__item{border-bottom:var(--gog-accordion-border-width) var(--gog-accordion-border-style) var(--gog-accordion-border-color)}.gog-accordion__item:first-child{border-top:var(--gog-accordion-border-width) var(--gog-accordion-border-style) var(--gog-accordion-border-color);border-top-left-radius:var(--gog-accordion-radius);border-top-right-radius:var(--gog-accordion-radius)}.gog-accordion__item:last-child{border-bottom-left-radius:var(--gog-accordion-radius);border-bottom-right-radius:var(--gog-accordion-radius);overflow:hidden}.gog-accordion__item--disabled .gog-accordion__header{cursor:not-allowed;opacity:var(--gog-accordion-disabled-opacity)}.gog-accordion__item--disabled .gog-accordion__header:hover{color:var(--gog-accordion-text-color);background-color:var(--gog-accordion-header-bg)}.gog-accordion__heading{display:contents}.gog-accordion__header{display:flex;align-items:center;justify-content:space-between;width:100%;padding:var(--gog-accordion-padding-y, var(--gog-accordion-size-padding-y, var(--gog-accordion-lg-padding-y))) var(--gog-accordion-padding-x, var(--gog-accordion-size-padding-x, var(--gog-accordion-lg-padding-x)));gap:var(--gog-accordion-header-gap);background:var(--gog-accordion-header-bg);border:none;color:var(--gog-accordion-text-color);text-align:start;cursor:pointer;font-family:var(--gog-accordion-font-family);text-transform:var(--gog-accordion-header-text-transform);letter-spacing:var(--gog-accordion-letter-spacing, var(--gog-accordion-size-letter-spacing, var(--gog-accordion-lg-letter-spacing)));font-size:var(--gog-accordion-font-size, var(--gog-accordion-size-font-size, var(--gog-accordion-lg-font-size)));transition:color var(--gog-accordion-transition-duration) var(--gog-easing),background-color var(--gog-accordion-transition-duration) var(--gog-easing)}.gog-accordion__header:hover{color:var(--gog-accordion-accent-color);background-color:var(--gog-accordion-hover-bg)}.gog-accordion__header:focus-visible{outline:var(--gog-accordion-focus-ring-width) solid var(--gog-accordion-hover-ring);outline-offset:calc(var(--gog-accordion-focus-ring-width) * -1)}.gog-accordion__header--open{color:var(--gog-accordion-accent-color)}.gog-accordion__title{flex:1}.gog-accordion__header-content{flex:1;display:flex;flex-direction:column;align-items:flex-start;gap:var(--gog-accordion-content-gap, var(--gog-accordion-size-content-gap, var(--gog-accordion-lg-content-gap)));min-width:0}.gog-accordion__chevron{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:var(--gog-accordion-chevron-size, var(--gog-accordion-size-chevron-size, var(--gog-accordion-lg-chevron-size)));height:var(--gog-accordion-chevron-size, var(--gog-accordion-size-chevron-size, var(--gog-accordion-lg-chevron-size)));font-size:var(--gog-accordion-chevron-font-size, var(--gog-accordion-size-chevron-font-size, var(--gog-accordion-lg-chevron-font-size)));color:var(--gog-accordion-border-color);transition:color var(--gog-accordion-transition-duration) var(--gog-easing)}.gog-accordion__header--open .gog-accordion__chevron{color:var(--gog-accordion-accent-color)}.gog-accordion__chevron--auto-rotate{transition:transform var(--gog-accordion-chevron-transition-duration) var(--gog-easing),color var(--gog-accordion-transition-duration) var(--gog-easing)}.gog-accordion__header--open .gog-accordion__chevron--auto-rotate{transform:rotate(180deg)}.gog-accordion__body{display:grid;grid-template-rows:0fr;opacity:0;overflow:hidden;border-top:var(--gog-accordion-border-width) var(--gog-accordion-border-style) var(--gog-accordion-border-color);transition:grid-template-rows var(--gog-accordion-body-transition-duration) var(--gog-easing),opacity var(--gog-accordion-body-transition-duration) var(--gog-easing)}.gog-accordion__body--open{grid-template-rows:1fr;opacity:1}.gog-accordion__body-inner{min-height:0;overflow:hidden;border-bottom-left-radius:var(--gog-accordion-body-radius);border-bottom-right-radius:var(--gog-accordion-body-radius);padding:0 var(--gog-accordion-padding-x, var(--gog-accordion-size-padding-x, var(--gog-accordion-lg-padding-x)));background:var(--gog-accordion-body-bg);color:var(--gog-accordion-body-color);font-family:var(--gog-accordion-body-font-family);font-size:var(--gog-accordion-body-font-size, var(--gog-accordion-size-body-font-size, var(--gog-accordion-lg-body-font-size)));line-height:var(--gog-accordion-size-body-line-height, var(--gog-accordion-lg-body-line-height));transform:translateY(var(--gog-accordion-body-lift));transition:transform var(--gog-accordion-body-transition-duration) var(--gog-easing),padding var(--gog-accordion-body-transition-duration) var(--gog-easing)}.gog-accordion__body--open .gog-accordion__body-inner{padding-top:var(--gog-accordion-body-padding-top, var(--gog-accordion-size-body-padding-top, var(--gog-accordion-lg-body-padding-top)));padding-bottom:var(--gog-accordion-body-padding-bottom, var(--gog-accordion-size-body-padding-bottom, var(--gog-accordion-lg-body-padding-bottom)));transform:translateY(0)}.gog-accordion--slg{--gog-accordion-size-padding-y: var(--gog-accordion-slg-padding-y);--gog-accordion-size-padding-x: var(--gog-accordion-slg-padding-x);--gog-accordion-size-font-size: var(--gog-accordion-slg-font-size);--gog-accordion-size-letter-spacing: var(--gog-accordion-slg-letter-spacing);--gog-accordion-size-content-gap: var(--gog-accordion-slg-content-gap);--gog-accordion-size-body-font-size: var(--gog-accordion-slg-body-font-size);--gog-accordion-size-body-line-height: var(--gog-accordion-slg-body-line-height);--gog-accordion-size-body-padding-top: var(--gog-accordion-slg-body-padding-top);--gog-accordion-size-body-padding-bottom: var(--gog-accordion-slg-body-padding-bottom);--gog-accordion-size-chevron-size: var(--gog-accordion-slg-chevron-size);--gog-accordion-size-chevron-font-size: var(--gog-accordion-slg-chevron-font-size)}.gog-accordion--md{--gog-accordion-size-padding-y: var(--gog-accordion-md-padding-y);--gog-accordion-size-padding-x: var(--gog-accordion-md-padding-x);--gog-accordion-size-font-size: var(--gog-accordion-md-font-size);--gog-accordion-size-letter-spacing: var(--gog-accordion-md-letter-spacing);--gog-accordion-size-content-gap: var(--gog-accordion-md-content-gap);--gog-accordion-size-body-font-size: var(--gog-accordion-md-body-font-size);--gog-accordion-size-body-line-height: var(--gog-accordion-md-body-line-height);--gog-accordion-size-body-padding-top: var(--gog-accordion-md-body-padding-top);--gog-accordion-size-body-padding-bottom: var(--gog-accordion-md-body-padding-bottom);--gog-accordion-size-chevron-size: var(--gog-accordion-md-chevron-size);--gog-accordion-size-chevron-font-size: var(--gog-accordion-md-chevron-font-size)}.gog-accordion--sm{--gog-accordion-size-padding-y: var(--gog-accordion-sm-padding-y);--gog-accordion-size-padding-x: var(--gog-accordion-sm-padding-x);--gog-accordion-size-font-size: var(--gog-accordion-sm-font-size);--gog-accordion-size-letter-spacing: var(--gog-accordion-sm-letter-spacing);--gog-accordion-size-content-gap: var(--gog-accordion-sm-content-gap);--gog-accordion-size-body-font-size: var(--gog-accordion-sm-body-font-size);--gog-accordion-size-body-line-height: var(--gog-accordion-sm-body-line-height);--gog-accordion-size-body-padding-top: var(--gog-accordion-sm-body-padding-top);--gog-accordion-size-body-padding-bottom: var(--gog-accordion-sm-body-padding-bottom);--gog-accordion-size-chevron-size: var(--gog-accordion-sm-chevron-size);--gog-accordion-size-chevron-font-size: var(--gog-accordion-sm-chevron-font-size)}.gog-accordion--xsm{--gog-accordion-size-padding-y: var(--gog-accordion-xsm-padding-y);--gog-accordion-size-padding-x: var(--gog-accordion-xsm-padding-x);--gog-accordion-size-font-size: var(--gog-accordion-xsm-font-size);--gog-accordion-size-letter-spacing: var(--gog-accordion-xsm-letter-spacing);--gog-accordion-size-content-gap: var(--gog-accordion-xsm-content-gap);--gog-accordion-size-body-font-size: var(--gog-accordion-xsm-body-font-size);--gog-accordion-size-body-line-height: var(--gog-accordion-xsm-body-line-height);--gog-accordion-size-body-padding-top: var(--gog-accordion-xsm-body-padding-top);--gog-accordion-size-body-padding-bottom: var(--gog-accordion-xsm-body-padding-bottom);--gog-accordion-size-chevron-size: var(--gog-accordion-xsm-chevron-size);--gog-accordion-size-chevron-font-size: var(--gog-accordion-xsm-chevron-font-size)}.gog-accordion__header--skeleton{cursor:default;pointer-events:none}@media(prefers-reduced-motion:reduce){.gog-accordion__header,.gog-accordion__chevron,.gog-accordion__body,.gog-accordion__body-inner{transition:none}}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: IconComponent, selector: "gog-icon", inputs: ["name", "template", "title", "ariaHidden"] }, { kind: "component", type: SkeletonComponent, selector: "gog-skeleton", inputs: ["shape", "size", "animation", "width", "height", "lines", "rounded", "ariaLabel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1077
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: AccordionComponent, isStandalone: true, selector: "gog-accordion", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, ripple: { classPropertyName: "ripple", publicName: "ripple", isSignal: true, isRequired: false, transformFunction: null }, expandFirst: { classPropertyName: "expandFirst", publicName: "expandFirst", isSignal: true, isRequired: false, transformFunction: null }, multi: { classPropertyName: "multi", publicName: "multi", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, skeletonCount: { classPropertyName: "skeletonCount", publicName: "skeletonCount", isSignal: true, isRequired: false, transformFunction: null }, showChevron: { classPropertyName: "showChevron", publicName: "showChevron", isSignal: true, isRequired: false, transformFunction: null }, headingLevel: { classPropertyName: "headingLevel", publicName: "headingLevel", isSignal: true, isRequired: false, transformFunction: null }, openIds: { classPropertyName: "openIds", publicName: "openIds", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { openIds: "openIdsChange", gogToggle: "gogToggle" }, host: { properties: { "attr.aria-busy": "loading() ? \"true\" : null" }, classAttribute: "gog-accordion-host" }, queries: [{ propertyName: "headerTpl", first: true, predicate: GogAccordionHeaderDirective, descendants: true, isSignal: true }, { propertyName: "chevronTpl", first: true, predicate: GogAccordionChevronDirective, descendants: true, isSignal: true }, { propertyName: "contentTpl", first: true, predicate: GogAccordionContentDirective, descendants: true, isSignal: true }], ngImport: i0, template: "<div\r\n [class.gog-accordion--loading]=\"loading()\"\r\n class=\"gog-accordion gog-contained-layout\"\r\n [class]=\"sizeClass()\"\r\n>\r\n @if (loading()) {\r\n @for (row of skeletonRows(); track row) {\r\n <div class=\"gog-accordion__item gog-accordion__item--skeleton\">\r\n <div class=\"gog-accordion__header gog-accordion__header--skeleton\">\r\n <gog-skeleton shape=\"text\" [size]=\"size()\" [width]=\"skeletonWidth(row)\" />\r\n <!--\r\n The chevron gets a placeholder too, so the row's silhouette is the one that arrives.\r\n Without it the right-hand side is empty while loading and the chevron appears out of\r\n nowhere \u2014 the shape-matching placeholder failing at the one thing it is for.\r\n -->\r\n @if (showChevron()) {\r\n <span class=\"gog-accordion__chevron\" aria-hidden=\"true\">\r\n <!--\r\n `width=\"100%\"` rather than `[size]`: a skeleton's `size` is its *text* line\r\n height, so a circle given one came out 18px wide and 64px tall and streaked down\r\n the row. A circle takes its diameter from `width` and keeps itself round, so\r\n filling the chevron's own box is what matches it.\r\n -->\r\n <gog-skeleton shape=\"circle\" width=\"100%\" />\r\n </span>\r\n }\r\n </div>\r\n </div>\r\n }\r\n } @else {\r\n @for (item of items(); track item.id) {\r\n <div\r\n class=\"gog-accordion__item\"\r\n [class.gog-accordion__item--open]=\"isOpen(item.id)\"\r\n [class.gog-accordion__item--disabled]=\"item.disabled\"\r\n >\r\n <ng-template #headerButton>\r\n <button\r\n [id]=\"uid + '-btn-' + item.id\"\r\n class=\"gog-accordion__header\"\r\n [class.gog-accordion__header--chevronless]=\"!showChevron()\"\r\n [class.gog-accordion__header--open]=\"isOpen(item.id)\"\r\n [attr.aria-expanded]=\"isOpen(item.id)\"\r\n [attr.aria-controls]=\"uid + '-body-' + item.id\"\r\n [attr.aria-disabled]=\"item.disabled ? 'true' : null\"\r\n [disabled]=\"item.disabled || null\"\r\n (click)=\"toggle(item)\"\r\n (keydown)=\"onHeaderKeydown($event)\"\r\n type=\"button\"\r\n gogRipple\r\n [rippleDisabled]=\"!rippleEnabled()\"\r\n >\r\n <span class=\"gog-accordion__header-content\">\r\n @if (headerTpl(); as tpl) {\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n tpl.templateRef;\r\n context: { $implicit: item, open: isOpen(item.id) }\r\n \"\r\n />\r\n } @else {\r\n <span class=\"gog-accordion__title\">{{ item.title }}</span>\r\n }\r\n </span>\r\n @if (showChevron()) {\r\n <span\r\n class=\"gog-accordion__chevron\"\r\n [class.gog-accordion__chevron--auto-rotate]=\"!chevronTpl()\"\r\n aria-hidden=\"true\"\r\n >\r\n @if (chevronTpl(); as tpl) {\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n tpl.templateRef;\r\n context: { $implicit: item, open: isOpen(item.id) }\r\n \"\r\n />\r\n } @else {\r\n <gog-icon name=\"chevron-down\" />\r\n }\r\n </span>\r\n }\r\n </button>\r\n </ng-template>\r\n\r\n @if (headingLevel(); as level) {\r\n <div role=\"heading\" [attr.aria-level]=\"level\" class=\"gog-accordion__heading\">\r\n <ng-container [ngTemplateOutlet]=\"headerButton\" />\r\n </div>\r\n } @else {\r\n <ng-container [ngTemplateOutlet]=\"headerButton\" />\r\n }\r\n\r\n <div\r\n [id]=\"uid + '-body-' + item.id\"\r\n class=\"gog-accordion__body\"\r\n [class.gog-accordion__body--open]=\"isOpen(item.id)\"\r\n role=\"region\"\r\n [attr.aria-labelledby]=\"uid + '-btn-' + item.id\"\r\n [attr.aria-hidden]=\"!isOpen(item.id)\"\r\n [attr.inert]=\"!isOpen(item.id) ? '' : null\"\r\n >\r\n <div class=\"gog-accordion__body-inner\">\r\n @if (contentTpl(); as tpl) {\r\n <ng-container *ngTemplateOutlet=\"tpl.templateRef; context: { $implicit: item }\" />\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n }\r\n</div>\r\n", styles: ["@charset \"UTF-8\";.gog-accordion{display:flex;flex-direction:column;width:100%}.gog-accordion__item{border-bottom:var(--gog-accordion-border-width) var(--gog-accordion-border-style) var(--gog-accordion-border-color)}.gog-accordion__item:first-child{border-top:var(--gog-accordion-border-width) var(--gog-accordion-border-style) var(--gog-accordion-border-color);border-top-left-radius:var(--gog-accordion-radius);border-top-right-radius:var(--gog-accordion-radius)}.gog-accordion__item:last-child{border-bottom-left-radius:var(--gog-accordion-radius);border-bottom-right-radius:var(--gog-accordion-radius);overflow:hidden}.gog-accordion__item--disabled .gog-accordion__header{cursor:not-allowed;opacity:var(--gog-accordion-disabled-opacity)}.gog-accordion__item--disabled .gog-accordion__header:hover{color:var(--gog-accordion-text-color);background-color:var(--gog-accordion-header-bg)}.gog-accordion__heading{display:contents}.gog-accordion__header{display:flex;align-items:center;justify-content:space-between;width:100%;padding:var(--gog-accordion-padding-y, var(--gog-accordion-size-padding-y, var(--gog-accordion-lg-padding-y))) var(--gog-accordion-padding-x, var(--gog-accordion-size-padding-x, var(--gog-accordion-lg-padding-x)));gap:var(--gog-accordion-header-gap);background:var(--gog-accordion-header-bg);border:none;color:var(--gog-accordion-text-color);text-align:start;cursor:pointer;font-family:var(--gog-accordion-font-family);text-transform:var(--gog-accordion-header-text-transform);letter-spacing:var(--gog-accordion-letter-spacing, var(--gog-accordion-size-letter-spacing, var(--gog-accordion-lg-letter-spacing)));font-size:var(--gog-accordion-font-size, var(--gog-accordion-size-font-size, var(--gog-accordion-lg-font-size)));transition:color var(--gog-accordion-transition-duration) var(--gog-easing),background-color var(--gog-accordion-transition-duration) var(--gog-easing)}.gog-accordion__header:hover{color:var(--gog-accordion-accent-color);background-color:var(--gog-accordion-hover-bg)}.gog-accordion__header:focus-visible{outline:var(--gog-accordion-focus-ring-width) solid var(--gog-accordion-hover-ring);outline-offset:calc(var(--gog-accordion-focus-ring-width) * -1)}.gog-accordion__header--open{color:var(--gog-accordion-accent-color)}.gog-accordion__title{flex:1}.gog-accordion__header-content{flex:1;display:flex;flex-direction:column;align-items:flex-start;gap:var(--gog-accordion-content-gap, var(--gog-accordion-size-content-gap, var(--gog-accordion-lg-content-gap)));min-width:0}.gog-accordion__chevron{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:var(--gog-accordion-chevron-size, var(--gog-accordion-size-chevron-size, var(--gog-accordion-lg-chevron-size)));height:var(--gog-accordion-chevron-size, var(--gog-accordion-size-chevron-size, var(--gog-accordion-lg-chevron-size)));font-size:var(--gog-accordion-chevron-font-size, var(--gog-accordion-size-chevron-font-size, var(--gog-accordion-lg-chevron-font-size)));color:var(--gog-accordion-border-color);transition:color var(--gog-accordion-transition-duration) var(--gog-easing)}.gog-accordion__header--open .gog-accordion__chevron{color:var(--gog-accordion-accent-color)}.gog-accordion__chevron--auto-rotate{transition:transform var(--gog-accordion-chevron-transition-duration) var(--gog-easing),color var(--gog-accordion-transition-duration) var(--gog-easing)}.gog-accordion__header--open .gog-accordion__chevron--auto-rotate{transform:rotate(180deg)}.gog-accordion__body{display:grid;grid-template-rows:0fr;opacity:0;overflow:hidden;border-top:var(--gog-accordion-border-width) var(--gog-accordion-border-style) var(--gog-accordion-border-color);transition:grid-template-rows var(--gog-accordion-body-transition-duration) var(--gog-easing),opacity var(--gog-accordion-body-transition-duration) var(--gog-easing)}.gog-accordion__body--open{grid-template-rows:1fr;opacity:1}.gog-accordion__body-inner{min-height:0;overflow:hidden;border-bottom-left-radius:var(--gog-accordion-body-radius);border-bottom-right-radius:var(--gog-accordion-body-radius);padding:0 var(--gog-accordion-padding-x, var(--gog-accordion-size-padding-x, var(--gog-accordion-lg-padding-x)));background:var(--gog-accordion-body-bg);color:var(--gog-accordion-body-color);font-family:var(--gog-accordion-body-font-family);font-size:var(--gog-accordion-body-font-size, var(--gog-accordion-size-body-font-size, var(--gog-accordion-lg-body-font-size)));line-height:var(--gog-accordion-size-body-line-height, var(--gog-accordion-lg-body-line-height));transform:translateY(var(--gog-accordion-body-lift));transition:transform var(--gog-accordion-body-transition-duration) var(--gog-easing),padding var(--gog-accordion-body-transition-duration) var(--gog-easing)}.gog-accordion__body--open .gog-accordion__body-inner{padding-top:var(--gog-accordion-body-padding-top, var(--gog-accordion-size-body-padding-top, var(--gog-accordion-lg-body-padding-top)));padding-bottom:var(--gog-accordion-body-padding-bottom, var(--gog-accordion-size-body-padding-bottom, var(--gog-accordion-lg-body-padding-bottom)));transform:translateY(0)}.gog-accordion--slg{--gog-accordion-size-padding-y: var(--gog-accordion-slg-padding-y);--gog-accordion-size-padding-x: var(--gog-accordion-slg-padding-x);--gog-accordion-size-font-size: var(--gog-accordion-slg-font-size);--gog-accordion-size-letter-spacing: var(--gog-accordion-slg-letter-spacing);--gog-accordion-size-content-gap: var(--gog-accordion-slg-content-gap);--gog-accordion-size-body-font-size: var(--gog-accordion-slg-body-font-size);--gog-accordion-size-body-line-height: var(--gog-accordion-slg-body-line-height);--gog-accordion-size-body-padding-top: var(--gog-accordion-slg-body-padding-top);--gog-accordion-size-body-padding-bottom: var(--gog-accordion-slg-body-padding-bottom);--gog-accordion-size-chevron-size: var(--gog-accordion-slg-chevron-size);--gog-accordion-size-chevron-font-size: var(--gog-accordion-slg-chevron-font-size)}.gog-accordion--md{--gog-accordion-size-padding-y: var(--gog-accordion-md-padding-y);--gog-accordion-size-padding-x: var(--gog-accordion-md-padding-x);--gog-accordion-size-font-size: var(--gog-accordion-md-font-size);--gog-accordion-size-letter-spacing: var(--gog-accordion-md-letter-spacing);--gog-accordion-size-content-gap: var(--gog-accordion-md-content-gap);--gog-accordion-size-body-font-size: var(--gog-accordion-md-body-font-size);--gog-accordion-size-body-line-height: var(--gog-accordion-md-body-line-height);--gog-accordion-size-body-padding-top: var(--gog-accordion-md-body-padding-top);--gog-accordion-size-body-padding-bottom: var(--gog-accordion-md-body-padding-bottom);--gog-accordion-size-chevron-size: var(--gog-accordion-md-chevron-size);--gog-accordion-size-chevron-font-size: var(--gog-accordion-md-chevron-font-size)}.gog-accordion--sm{--gog-accordion-size-padding-y: var(--gog-accordion-sm-padding-y);--gog-accordion-size-padding-x: var(--gog-accordion-sm-padding-x);--gog-accordion-size-font-size: var(--gog-accordion-sm-font-size);--gog-accordion-size-letter-spacing: var(--gog-accordion-sm-letter-spacing);--gog-accordion-size-content-gap: var(--gog-accordion-sm-content-gap);--gog-accordion-size-body-font-size: var(--gog-accordion-sm-body-font-size);--gog-accordion-size-body-line-height: var(--gog-accordion-sm-body-line-height);--gog-accordion-size-body-padding-top: var(--gog-accordion-sm-body-padding-top);--gog-accordion-size-body-padding-bottom: var(--gog-accordion-sm-body-padding-bottom);--gog-accordion-size-chevron-size: var(--gog-accordion-sm-chevron-size);--gog-accordion-size-chevron-font-size: var(--gog-accordion-sm-chevron-font-size)}.gog-accordion--xsm{--gog-accordion-size-padding-y: var(--gog-accordion-xsm-padding-y);--gog-accordion-size-padding-x: var(--gog-accordion-xsm-padding-x);--gog-accordion-size-font-size: var(--gog-accordion-xsm-font-size);--gog-accordion-size-letter-spacing: var(--gog-accordion-xsm-letter-spacing);--gog-accordion-size-content-gap: var(--gog-accordion-xsm-content-gap);--gog-accordion-size-body-font-size: var(--gog-accordion-xsm-body-font-size);--gog-accordion-size-body-line-height: var(--gog-accordion-xsm-body-line-height);--gog-accordion-size-body-padding-top: var(--gog-accordion-xsm-body-padding-top);--gog-accordion-size-body-padding-bottom: var(--gog-accordion-xsm-body-padding-bottom);--gog-accordion-size-chevron-size: var(--gog-accordion-xsm-chevron-size);--gog-accordion-size-chevron-font-size: var(--gog-accordion-xsm-chevron-font-size)}.gog-accordion__header--skeleton{cursor:default;pointer-events:none}@media(prefers-reduced-motion:reduce){.gog-accordion__header,.gog-accordion__chevron,.gog-accordion__body,.gog-accordion__body-inner{transition:none}}\n"], dependencies: [{ kind: "directive", type: GogRippleDirective, selector: "[gogRipple]", inputs: ["rippleDisabled", "rippleCentred"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: IconComponent, selector: "gog-icon", inputs: ["name", "template", "title", "ariaHidden"] }, { kind: "component", type: SkeletonComponent, selector: "gog-skeleton", inputs: ["shape", "size", "animation", "width", "height", "lines", "rounded", "ariaLabel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
754
1078
|
}
|
|
755
1079
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: AccordionComponent, decorators: [{
|
|
756
1080
|
type: Component,
|
|
757
|
-
args: [{ selector: 'gog-accordion', imports: [NgTemplateOutlet, IconComponent, SkeletonComponent], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
1081
|
+
args: [{ selector: 'gog-accordion', imports: [GogRippleDirective, NgTemplateOutlet, IconComponent, SkeletonComponent], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
758
1082
|
class: 'gog-accordion-host',
|
|
759
1083
|
/*
|
|
760
1084
|
* The skeleton rows are `aria-hidden`, and the real headers are not rendered while loading —
|
|
@@ -763,8 +1087,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
|
|
|
763
1087
|
* already do this; see the loading-state rule in `api-design.instructions.md`.
|
|
764
1088
|
*/
|
|
765
1089
|
'[attr.aria-busy]': 'loading() ? "true" : null',
|
|
766
|
-
}, template: "<div\r\n [class.gog-accordion--loading]=\"loading()\"\r\n class=\"gog-accordion gog-contained-layout\"\r\n [class]=\"sizeClass()\"\r\n>\r\n @if (loading()) {\r\n @for (row of skeletonRows(); track row) {\r\n <div class=\"gog-accordion__item gog-accordion__item--skeleton\">\r\n <div class=\"gog-accordion__header gog-accordion__header--skeleton\">\r\n <gog-skeleton shape=\"text\" [size]=\"size()\" [width]=\"skeletonWidth(row)\" />\r\n <!--\r\n The chevron gets a placeholder too, so the row's silhouette is the one that arrives.\r\n Without it the right-hand side is empty while loading and the chevron appears out of\r\n nowhere \u2014 the shape-matching placeholder failing at the one thing it is for.\r\n -->\r\n @if (showChevron()) {\r\n <span class=\"gog-accordion__chevron\" aria-hidden=\"true\">\r\n <!--\r\n `width=\"100%\"` rather than `[size]`: a skeleton's `size` is its *text* line\r\n height, so a circle given one came out 18px wide and 64px tall and streaked down\r\n the row. A circle takes its diameter from `width` and keeps itself round, so\r\n filling the chevron's own box is what matches it.\r\n -->\r\n <gog-skeleton shape=\"circle\" width=\"100%\" />\r\n </span>\r\n }\r\n </div>\r\n </div>\r\n }\r\n } @else {\r\n @for (item of items(); track item.id) {\r\n <div\r\n class=\"gog-accordion__item\"\r\n [class.gog-accordion__item--open]=\"isOpen(item.id)\"\r\n [class.gog-accordion__item--disabled]=\"item.disabled\"\r\n >\r\n <ng-template #headerButton>\r\n <button\r\n [id]=\"uid + '-btn-' + item.id\"\r\n class=\"gog-accordion__header\"\r\n [class.gog-accordion__header--chevronless]=\"!showChevron()\"\r\n [class.gog-accordion__header--open]=\"isOpen(item.id)\"\r\n [attr.aria-expanded]=\"isOpen(item.id)\"\r\n [attr.aria-controls]=\"uid + '-body-' + item.id\"\r\n [attr.aria-disabled]=\"item.disabled ? 'true' : null\"\r\n [disabled]=\"item.disabled || null\"\r\n (click)=\"toggle(item)\"\r\n (keydown)=\"onHeaderKeydown($event)\"\r\n type=\"button\"\r\n >\r\n <span class=\"gog-accordion__header-content\">\r\n @if (headerTpl(); as tpl) {\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n tpl.templateRef;\r\n context: { $implicit: item, open: isOpen(item.id) }\r\n \"\r\n />\r\n } @else {\r\n <span class=\"gog-accordion__title\">{{ item.title }}</span>\r\n }\r\n </span>\r\n @if (showChevron()) {\r\n <span\r\n class=\"gog-accordion__chevron\"\r\n [class.gog-accordion__chevron--auto-rotate]=\"!chevronTpl()\"\r\n aria-hidden=\"true\"\r\n >\r\n @if (chevronTpl(); as tpl) {\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n tpl.templateRef;\r\n context: { $implicit: item, open: isOpen(item.id) }\r\n \"\r\n />\r\n } @else {\r\n <gog-icon name=\"chevron-down\" />\r\n }\r\n </span>\r\n }\r\n </button>\r\n </ng-template>\r\n\r\n @if (headingLevel(); as level) {\r\n <div role=\"heading\" [attr.aria-level]=\"level\" class=\"gog-accordion__heading\">\r\n <ng-container [ngTemplateOutlet]=\"headerButton\" />\r\n </div>\r\n } @else {\r\n <ng-container [ngTemplateOutlet]=\"headerButton\" />\r\n }\r\n\r\n <div\r\n [id]=\"uid + '-body-' + item.id\"\r\n class=\"gog-accordion__body\"\r\n [class.gog-accordion__body--open]=\"isOpen(item.id)\"\r\n role=\"region\"\r\n [attr.aria-labelledby]=\"uid + '-btn-' + item.id\"\r\n [attr.aria-hidden]=\"!isOpen(item.id)\"\r\n [attr.inert]=\"!isOpen(item.id) ? '' : null\"\r\n >\r\n <div class=\"gog-accordion__body-inner\">\r\n @if (contentTpl(); as tpl) {\r\n <ng-container *ngTemplateOutlet=\"tpl.templateRef; context: { $implicit: item }\" />\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n }\r\n</div>\r\n", styles: ["@charset \"UTF-8\";.gog-accordion{display:flex;flex-direction:column;width:100%}.gog-accordion__item{border-bottom:var(--gog-accordion-border-width) var(--gog-accordion-border-style) var(--gog-accordion-border-color)}.gog-accordion__item:first-child{border-top:var(--gog-accordion-border-width) var(--gog-accordion-border-style) var(--gog-accordion-border-color);border-top-left-radius:var(--gog-accordion-radius);border-top-right-radius:var(--gog-accordion-radius)}.gog-accordion__item:last-child{border-bottom-left-radius:var(--gog-accordion-radius);border-bottom-right-radius:var(--gog-accordion-radius);overflow:hidden}.gog-accordion__item--disabled .gog-accordion__header{cursor:not-allowed;opacity:var(--gog-accordion-disabled-opacity)}.gog-accordion__item--disabled .gog-accordion__header:hover{color:var(--gog-accordion-text-color);background-color:var(--gog-accordion-header-bg)}.gog-accordion__heading{display:contents}.gog-accordion__header{display:flex;align-items:center;justify-content:space-between;width:100%;padding:var(--gog-accordion-padding-y, var(--gog-accordion-size-padding-y, var(--gog-accordion-lg-padding-y))) var(--gog-accordion-padding-x, var(--gog-accordion-size-padding-x, var(--gog-accordion-lg-padding-x)));gap:var(--gog-accordion-header-gap);background:var(--gog-accordion-header-bg);border:none;color:var(--gog-accordion-text-color);text-align:start;cursor:pointer;font-family:var(--gog-accordion-font-family);text-transform:var(--gog-accordion-header-text-transform);letter-spacing:var(--gog-accordion-letter-spacing, var(--gog-accordion-size-letter-spacing, var(--gog-accordion-lg-letter-spacing)));font-size:var(--gog-accordion-font-size, var(--gog-accordion-size-font-size, var(--gog-accordion-lg-font-size)));transition:color var(--gog-accordion-transition-duration) var(--gog-easing),background-color var(--gog-accordion-transition-duration) var(--gog-easing)}.gog-accordion__header:hover{color:var(--gog-accordion-accent-color);background-color:var(--gog-accordion-hover-bg)}.gog-accordion__header:focus-visible{outline:var(--gog-accordion-focus-ring-width) solid var(--gog-accordion-hover-ring);outline-offset:calc(var(--gog-accordion-focus-ring-width) * -1)}.gog-accordion__header--open{color:var(--gog-accordion-accent-color)}.gog-accordion__title{flex:1}.gog-accordion__header-content{flex:1;display:flex;flex-direction:column;align-items:flex-start;gap:var(--gog-accordion-content-gap, var(--gog-accordion-size-content-gap, var(--gog-accordion-lg-content-gap)));min-width:0}.gog-accordion__chevron{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:var(--gog-accordion-chevron-size, var(--gog-accordion-size-chevron-size, var(--gog-accordion-lg-chevron-size)));height:var(--gog-accordion-chevron-size, var(--gog-accordion-size-chevron-size, var(--gog-accordion-lg-chevron-size)));font-size:var(--gog-accordion-chevron-font-size, var(--gog-accordion-size-chevron-font-size, var(--gog-accordion-lg-chevron-font-size)));color:var(--gog-accordion-border-color);transition:color var(--gog-accordion-transition-duration) var(--gog-easing)}.gog-accordion__header--open .gog-accordion__chevron{color:var(--gog-accordion-accent-color)}.gog-accordion__chevron--auto-rotate{transition:transform var(--gog-accordion-chevron-transition-duration) var(--gog-easing),color var(--gog-accordion-transition-duration) var(--gog-easing)}.gog-accordion__header--open .gog-accordion__chevron--auto-rotate{transform:rotate(180deg)}.gog-accordion__body{display:grid;grid-template-rows:0fr;opacity:0;overflow:hidden;border-top:var(--gog-accordion-border-width) var(--gog-accordion-border-style) var(--gog-accordion-border-color);transition:grid-template-rows var(--gog-accordion-body-transition-duration) var(--gog-easing),opacity var(--gog-accordion-body-transition-duration) var(--gog-easing)}.gog-accordion__body--open{grid-template-rows:1fr;opacity:1}.gog-accordion__body-inner{min-height:0;overflow:hidden;border-bottom-left-radius:var(--gog-accordion-body-radius);border-bottom-right-radius:var(--gog-accordion-body-radius);padding:0 var(--gog-accordion-padding-x, var(--gog-accordion-size-padding-x, var(--gog-accordion-lg-padding-x)));background:var(--gog-accordion-body-bg);color:var(--gog-accordion-body-color);font-family:var(--gog-accordion-body-font-family);font-size:var(--gog-accordion-body-font-size, var(--gog-accordion-size-body-font-size, var(--gog-accordion-lg-body-font-size)));line-height:var(--gog-accordion-size-body-line-height, var(--gog-accordion-lg-body-line-height));transform:translateY(var(--gog-accordion-body-lift));transition:transform var(--gog-accordion-body-transition-duration) var(--gog-easing),padding var(--gog-accordion-body-transition-duration) var(--gog-easing)}.gog-accordion__body--open .gog-accordion__body-inner{padding-top:var(--gog-accordion-body-padding-top, var(--gog-accordion-size-body-padding-top, var(--gog-accordion-lg-body-padding-top)));padding-bottom:var(--gog-accordion-body-padding-bottom, var(--gog-accordion-size-body-padding-bottom, var(--gog-accordion-lg-body-padding-bottom)));transform:translateY(0)}.gog-accordion--slg{--gog-accordion-size-padding-y: var(--gog-accordion-slg-padding-y);--gog-accordion-size-padding-x: var(--gog-accordion-slg-padding-x);--gog-accordion-size-font-size: var(--gog-accordion-slg-font-size);--gog-accordion-size-letter-spacing: var(--gog-accordion-slg-letter-spacing);--gog-accordion-size-content-gap: var(--gog-accordion-slg-content-gap);--gog-accordion-size-body-font-size: var(--gog-accordion-slg-body-font-size);--gog-accordion-size-body-line-height: var(--gog-accordion-slg-body-line-height);--gog-accordion-size-body-padding-top: var(--gog-accordion-slg-body-padding-top);--gog-accordion-size-body-padding-bottom: var(--gog-accordion-slg-body-padding-bottom);--gog-accordion-size-chevron-size: var(--gog-accordion-slg-chevron-size);--gog-accordion-size-chevron-font-size: var(--gog-accordion-slg-chevron-font-size)}.gog-accordion--md{--gog-accordion-size-padding-y: var(--gog-accordion-md-padding-y);--gog-accordion-size-padding-x: var(--gog-accordion-md-padding-x);--gog-accordion-size-font-size: var(--gog-accordion-md-font-size);--gog-accordion-size-letter-spacing: var(--gog-accordion-md-letter-spacing);--gog-accordion-size-content-gap: var(--gog-accordion-md-content-gap);--gog-accordion-size-body-font-size: var(--gog-accordion-md-body-font-size);--gog-accordion-size-body-line-height: var(--gog-accordion-md-body-line-height);--gog-accordion-size-body-padding-top: var(--gog-accordion-md-body-padding-top);--gog-accordion-size-body-padding-bottom: var(--gog-accordion-md-body-padding-bottom);--gog-accordion-size-chevron-size: var(--gog-accordion-md-chevron-size);--gog-accordion-size-chevron-font-size: var(--gog-accordion-md-chevron-font-size)}.gog-accordion--sm{--gog-accordion-size-padding-y: var(--gog-accordion-sm-padding-y);--gog-accordion-size-padding-x: var(--gog-accordion-sm-padding-x);--gog-accordion-size-font-size: var(--gog-accordion-sm-font-size);--gog-accordion-size-letter-spacing: var(--gog-accordion-sm-letter-spacing);--gog-accordion-size-content-gap: var(--gog-accordion-sm-content-gap);--gog-accordion-size-body-font-size: var(--gog-accordion-sm-body-font-size);--gog-accordion-size-body-line-height: var(--gog-accordion-sm-body-line-height);--gog-accordion-size-body-padding-top: var(--gog-accordion-sm-body-padding-top);--gog-accordion-size-body-padding-bottom: var(--gog-accordion-sm-body-padding-bottom);--gog-accordion-size-chevron-size: var(--gog-accordion-sm-chevron-size);--gog-accordion-size-chevron-font-size: var(--gog-accordion-sm-chevron-font-size)}.gog-accordion--xsm{--gog-accordion-size-padding-y: var(--gog-accordion-xsm-padding-y);--gog-accordion-size-padding-x: var(--gog-accordion-xsm-padding-x);--gog-accordion-size-font-size: var(--gog-accordion-xsm-font-size);--gog-accordion-size-letter-spacing: var(--gog-accordion-xsm-letter-spacing);--gog-accordion-size-content-gap: var(--gog-accordion-xsm-content-gap);--gog-accordion-size-body-font-size: var(--gog-accordion-xsm-body-font-size);--gog-accordion-size-body-line-height: var(--gog-accordion-xsm-body-line-height);--gog-accordion-size-body-padding-top: var(--gog-accordion-xsm-body-padding-top);--gog-accordion-size-body-padding-bottom: var(--gog-accordion-xsm-body-padding-bottom);--gog-accordion-size-chevron-size: var(--gog-accordion-xsm-chevron-size);--gog-accordion-size-chevron-font-size: var(--gog-accordion-xsm-chevron-font-size)}.gog-accordion__header--skeleton{cursor:default;pointer-events:none}@media(prefers-reduced-motion:reduce){.gog-accordion__header,.gog-accordion__chevron,.gog-accordion__body,.gog-accordion__body-inner{transition:none}}\n"] }]
|
|
767
|
-
}], ctorParameters: () => [], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], expandFirst: [{ type: i0.Input, args: [{ isSignal: true, alias: "expandFirst", required: false }] }], multi: [{ type: i0.Input, args: [{ isSignal: true, alias: "multi", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], skeletonCount: [{ type: i0.Input, args: [{ isSignal: true, alias: "skeletonCount", required: false }] }], showChevron: [{ type: i0.Input, args: [{ isSignal: true, alias: "showChevron", required: false }] }], headingLevel: [{ type: i0.Input, args: [{ isSignal: true, alias: "headingLevel", required: false }] }], openIds: [{ type: i0.Input, args: [{ isSignal: true, alias: "openIds", required: false }] }, { type: i0.Output, args: ["openIdsChange"] }], gogToggle: [{ type: i0.Output, args: ["gogToggle"] }], headerTpl: [{ type: i0.ContentChild, args: [i0.forwardRef(() => GogAccordionHeaderDirective), { isSignal: true }] }], chevronTpl: [{ type: i0.ContentChild, args: [i0.forwardRef(() => GogAccordionChevronDirective), { isSignal: true }] }], contentTpl: [{ type: i0.ContentChild, args: [i0.forwardRef(() => GogAccordionContentDirective), { isSignal: true }] }] } });
|
|
1090
|
+
}, template: "<div\r\n [class.gog-accordion--loading]=\"loading()\"\r\n class=\"gog-accordion gog-contained-layout\"\r\n [class]=\"sizeClass()\"\r\n>\r\n @if (loading()) {\r\n @for (row of skeletonRows(); track row) {\r\n <div class=\"gog-accordion__item gog-accordion__item--skeleton\">\r\n <div class=\"gog-accordion__header gog-accordion__header--skeleton\">\r\n <gog-skeleton shape=\"text\" [size]=\"size()\" [width]=\"skeletonWidth(row)\" />\r\n <!--\r\n The chevron gets a placeholder too, so the row's silhouette is the one that arrives.\r\n Without it the right-hand side is empty while loading and the chevron appears out of\r\n nowhere \u2014 the shape-matching placeholder failing at the one thing it is for.\r\n -->\r\n @if (showChevron()) {\r\n <span class=\"gog-accordion__chevron\" aria-hidden=\"true\">\r\n <!--\r\n `width=\"100%\"` rather than `[size]`: a skeleton's `size` is its *text* line\r\n height, so a circle given one came out 18px wide and 64px tall and streaked down\r\n the row. A circle takes its diameter from `width` and keeps itself round, so\r\n filling the chevron's own box is what matches it.\r\n -->\r\n <gog-skeleton shape=\"circle\" width=\"100%\" />\r\n </span>\r\n }\r\n </div>\r\n </div>\r\n }\r\n } @else {\r\n @for (item of items(); track item.id) {\r\n <div\r\n class=\"gog-accordion__item\"\r\n [class.gog-accordion__item--open]=\"isOpen(item.id)\"\r\n [class.gog-accordion__item--disabled]=\"item.disabled\"\r\n >\r\n <ng-template #headerButton>\r\n <button\r\n [id]=\"uid + '-btn-' + item.id\"\r\n class=\"gog-accordion__header\"\r\n [class.gog-accordion__header--chevronless]=\"!showChevron()\"\r\n [class.gog-accordion__header--open]=\"isOpen(item.id)\"\r\n [attr.aria-expanded]=\"isOpen(item.id)\"\r\n [attr.aria-controls]=\"uid + '-body-' + item.id\"\r\n [attr.aria-disabled]=\"item.disabled ? 'true' : null\"\r\n [disabled]=\"item.disabled || null\"\r\n (click)=\"toggle(item)\"\r\n (keydown)=\"onHeaderKeydown($event)\"\r\n type=\"button\"\r\n gogRipple\r\n [rippleDisabled]=\"!rippleEnabled()\"\r\n >\r\n <span class=\"gog-accordion__header-content\">\r\n @if (headerTpl(); as tpl) {\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n tpl.templateRef;\r\n context: { $implicit: item, open: isOpen(item.id) }\r\n \"\r\n />\r\n } @else {\r\n <span class=\"gog-accordion__title\">{{ item.title }}</span>\r\n }\r\n </span>\r\n @if (showChevron()) {\r\n <span\r\n class=\"gog-accordion__chevron\"\r\n [class.gog-accordion__chevron--auto-rotate]=\"!chevronTpl()\"\r\n aria-hidden=\"true\"\r\n >\r\n @if (chevronTpl(); as tpl) {\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n tpl.templateRef;\r\n context: { $implicit: item, open: isOpen(item.id) }\r\n \"\r\n />\r\n } @else {\r\n <gog-icon name=\"chevron-down\" />\r\n }\r\n </span>\r\n }\r\n </button>\r\n </ng-template>\r\n\r\n @if (headingLevel(); as level) {\r\n <div role=\"heading\" [attr.aria-level]=\"level\" class=\"gog-accordion__heading\">\r\n <ng-container [ngTemplateOutlet]=\"headerButton\" />\r\n </div>\r\n } @else {\r\n <ng-container [ngTemplateOutlet]=\"headerButton\" />\r\n }\r\n\r\n <div\r\n [id]=\"uid + '-body-' + item.id\"\r\n class=\"gog-accordion__body\"\r\n [class.gog-accordion__body--open]=\"isOpen(item.id)\"\r\n role=\"region\"\r\n [attr.aria-labelledby]=\"uid + '-btn-' + item.id\"\r\n [attr.aria-hidden]=\"!isOpen(item.id)\"\r\n [attr.inert]=\"!isOpen(item.id) ? '' : null\"\r\n >\r\n <div class=\"gog-accordion__body-inner\">\r\n @if (contentTpl(); as tpl) {\r\n <ng-container *ngTemplateOutlet=\"tpl.templateRef; context: { $implicit: item }\" />\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n }\r\n</div>\r\n", styles: ["@charset \"UTF-8\";.gog-accordion{display:flex;flex-direction:column;width:100%}.gog-accordion__item{border-bottom:var(--gog-accordion-border-width) var(--gog-accordion-border-style) var(--gog-accordion-border-color)}.gog-accordion__item:first-child{border-top:var(--gog-accordion-border-width) var(--gog-accordion-border-style) var(--gog-accordion-border-color);border-top-left-radius:var(--gog-accordion-radius);border-top-right-radius:var(--gog-accordion-radius)}.gog-accordion__item:last-child{border-bottom-left-radius:var(--gog-accordion-radius);border-bottom-right-radius:var(--gog-accordion-radius);overflow:hidden}.gog-accordion__item--disabled .gog-accordion__header{cursor:not-allowed;opacity:var(--gog-accordion-disabled-opacity)}.gog-accordion__item--disabled .gog-accordion__header:hover{color:var(--gog-accordion-text-color);background-color:var(--gog-accordion-header-bg)}.gog-accordion__heading{display:contents}.gog-accordion__header{display:flex;align-items:center;justify-content:space-between;width:100%;padding:var(--gog-accordion-padding-y, var(--gog-accordion-size-padding-y, var(--gog-accordion-lg-padding-y))) var(--gog-accordion-padding-x, var(--gog-accordion-size-padding-x, var(--gog-accordion-lg-padding-x)));gap:var(--gog-accordion-header-gap);background:var(--gog-accordion-header-bg);border:none;color:var(--gog-accordion-text-color);text-align:start;cursor:pointer;font-family:var(--gog-accordion-font-family);text-transform:var(--gog-accordion-header-text-transform);letter-spacing:var(--gog-accordion-letter-spacing, var(--gog-accordion-size-letter-spacing, var(--gog-accordion-lg-letter-spacing)));font-size:var(--gog-accordion-font-size, var(--gog-accordion-size-font-size, var(--gog-accordion-lg-font-size)));transition:color var(--gog-accordion-transition-duration) var(--gog-easing),background-color var(--gog-accordion-transition-duration) var(--gog-easing)}.gog-accordion__header:hover{color:var(--gog-accordion-accent-color);background-color:var(--gog-accordion-hover-bg)}.gog-accordion__header:focus-visible{outline:var(--gog-accordion-focus-ring-width) solid var(--gog-accordion-hover-ring);outline-offset:calc(var(--gog-accordion-focus-ring-width) * -1)}.gog-accordion__header--open{color:var(--gog-accordion-accent-color)}.gog-accordion__title{flex:1}.gog-accordion__header-content{flex:1;display:flex;flex-direction:column;align-items:flex-start;gap:var(--gog-accordion-content-gap, var(--gog-accordion-size-content-gap, var(--gog-accordion-lg-content-gap)));min-width:0}.gog-accordion__chevron{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:var(--gog-accordion-chevron-size, var(--gog-accordion-size-chevron-size, var(--gog-accordion-lg-chevron-size)));height:var(--gog-accordion-chevron-size, var(--gog-accordion-size-chevron-size, var(--gog-accordion-lg-chevron-size)));font-size:var(--gog-accordion-chevron-font-size, var(--gog-accordion-size-chevron-font-size, var(--gog-accordion-lg-chevron-font-size)));color:var(--gog-accordion-border-color);transition:color var(--gog-accordion-transition-duration) var(--gog-easing)}.gog-accordion__header--open .gog-accordion__chevron{color:var(--gog-accordion-accent-color)}.gog-accordion__chevron--auto-rotate{transition:transform var(--gog-accordion-chevron-transition-duration) var(--gog-easing),color var(--gog-accordion-transition-duration) var(--gog-easing)}.gog-accordion__header--open .gog-accordion__chevron--auto-rotate{transform:rotate(180deg)}.gog-accordion__body{display:grid;grid-template-rows:0fr;opacity:0;overflow:hidden;border-top:var(--gog-accordion-border-width) var(--gog-accordion-border-style) var(--gog-accordion-border-color);transition:grid-template-rows var(--gog-accordion-body-transition-duration) var(--gog-easing),opacity var(--gog-accordion-body-transition-duration) var(--gog-easing)}.gog-accordion__body--open{grid-template-rows:1fr;opacity:1}.gog-accordion__body-inner{min-height:0;overflow:hidden;border-bottom-left-radius:var(--gog-accordion-body-radius);border-bottom-right-radius:var(--gog-accordion-body-radius);padding:0 var(--gog-accordion-padding-x, var(--gog-accordion-size-padding-x, var(--gog-accordion-lg-padding-x)));background:var(--gog-accordion-body-bg);color:var(--gog-accordion-body-color);font-family:var(--gog-accordion-body-font-family);font-size:var(--gog-accordion-body-font-size, var(--gog-accordion-size-body-font-size, var(--gog-accordion-lg-body-font-size)));line-height:var(--gog-accordion-size-body-line-height, var(--gog-accordion-lg-body-line-height));transform:translateY(var(--gog-accordion-body-lift));transition:transform var(--gog-accordion-body-transition-duration) var(--gog-easing),padding var(--gog-accordion-body-transition-duration) var(--gog-easing)}.gog-accordion__body--open .gog-accordion__body-inner{padding-top:var(--gog-accordion-body-padding-top, var(--gog-accordion-size-body-padding-top, var(--gog-accordion-lg-body-padding-top)));padding-bottom:var(--gog-accordion-body-padding-bottom, var(--gog-accordion-size-body-padding-bottom, var(--gog-accordion-lg-body-padding-bottom)));transform:translateY(0)}.gog-accordion--slg{--gog-accordion-size-padding-y: var(--gog-accordion-slg-padding-y);--gog-accordion-size-padding-x: var(--gog-accordion-slg-padding-x);--gog-accordion-size-font-size: var(--gog-accordion-slg-font-size);--gog-accordion-size-letter-spacing: var(--gog-accordion-slg-letter-spacing);--gog-accordion-size-content-gap: var(--gog-accordion-slg-content-gap);--gog-accordion-size-body-font-size: var(--gog-accordion-slg-body-font-size);--gog-accordion-size-body-line-height: var(--gog-accordion-slg-body-line-height);--gog-accordion-size-body-padding-top: var(--gog-accordion-slg-body-padding-top);--gog-accordion-size-body-padding-bottom: var(--gog-accordion-slg-body-padding-bottom);--gog-accordion-size-chevron-size: var(--gog-accordion-slg-chevron-size);--gog-accordion-size-chevron-font-size: var(--gog-accordion-slg-chevron-font-size)}.gog-accordion--md{--gog-accordion-size-padding-y: var(--gog-accordion-md-padding-y);--gog-accordion-size-padding-x: var(--gog-accordion-md-padding-x);--gog-accordion-size-font-size: var(--gog-accordion-md-font-size);--gog-accordion-size-letter-spacing: var(--gog-accordion-md-letter-spacing);--gog-accordion-size-content-gap: var(--gog-accordion-md-content-gap);--gog-accordion-size-body-font-size: var(--gog-accordion-md-body-font-size);--gog-accordion-size-body-line-height: var(--gog-accordion-md-body-line-height);--gog-accordion-size-body-padding-top: var(--gog-accordion-md-body-padding-top);--gog-accordion-size-body-padding-bottom: var(--gog-accordion-md-body-padding-bottom);--gog-accordion-size-chevron-size: var(--gog-accordion-md-chevron-size);--gog-accordion-size-chevron-font-size: var(--gog-accordion-md-chevron-font-size)}.gog-accordion--sm{--gog-accordion-size-padding-y: var(--gog-accordion-sm-padding-y);--gog-accordion-size-padding-x: var(--gog-accordion-sm-padding-x);--gog-accordion-size-font-size: var(--gog-accordion-sm-font-size);--gog-accordion-size-letter-spacing: var(--gog-accordion-sm-letter-spacing);--gog-accordion-size-content-gap: var(--gog-accordion-sm-content-gap);--gog-accordion-size-body-font-size: var(--gog-accordion-sm-body-font-size);--gog-accordion-size-body-line-height: var(--gog-accordion-sm-body-line-height);--gog-accordion-size-body-padding-top: var(--gog-accordion-sm-body-padding-top);--gog-accordion-size-body-padding-bottom: var(--gog-accordion-sm-body-padding-bottom);--gog-accordion-size-chevron-size: var(--gog-accordion-sm-chevron-size);--gog-accordion-size-chevron-font-size: var(--gog-accordion-sm-chevron-font-size)}.gog-accordion--xsm{--gog-accordion-size-padding-y: var(--gog-accordion-xsm-padding-y);--gog-accordion-size-padding-x: var(--gog-accordion-xsm-padding-x);--gog-accordion-size-font-size: var(--gog-accordion-xsm-font-size);--gog-accordion-size-letter-spacing: var(--gog-accordion-xsm-letter-spacing);--gog-accordion-size-content-gap: var(--gog-accordion-xsm-content-gap);--gog-accordion-size-body-font-size: var(--gog-accordion-xsm-body-font-size);--gog-accordion-size-body-line-height: var(--gog-accordion-xsm-body-line-height);--gog-accordion-size-body-padding-top: var(--gog-accordion-xsm-body-padding-top);--gog-accordion-size-body-padding-bottom: var(--gog-accordion-xsm-body-padding-bottom);--gog-accordion-size-chevron-size: var(--gog-accordion-xsm-chevron-size);--gog-accordion-size-chevron-font-size: var(--gog-accordion-xsm-chevron-font-size)}.gog-accordion__header--skeleton{cursor:default;pointer-events:none}@media(prefers-reduced-motion:reduce){.gog-accordion__header,.gog-accordion__chevron,.gog-accordion__body,.gog-accordion__body-inner{transition:none}}\n"] }]
|
|
1091
|
+
}], ctorParameters: () => [], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], ripple: [{ type: i0.Input, args: [{ isSignal: true, alias: "ripple", required: false }] }], expandFirst: [{ type: i0.Input, args: [{ isSignal: true, alias: "expandFirst", required: false }] }], multi: [{ type: i0.Input, args: [{ isSignal: true, alias: "multi", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], skeletonCount: [{ type: i0.Input, args: [{ isSignal: true, alias: "skeletonCount", required: false }] }], showChevron: [{ type: i0.Input, args: [{ isSignal: true, alias: "showChevron", required: false }] }], headingLevel: [{ type: i0.Input, args: [{ isSignal: true, alias: "headingLevel", required: false }] }], openIds: [{ type: i0.Input, args: [{ isSignal: true, alias: "openIds", required: false }] }, { type: i0.Output, args: ["openIdsChange"] }], gogToggle: [{ type: i0.Output, args: ["gogToggle"] }], headerTpl: [{ type: i0.ContentChild, args: [i0.forwardRef(() => GogAccordionHeaderDirective), { isSignal: true }] }], chevronTpl: [{ type: i0.ContentChild, args: [i0.forwardRef(() => GogAccordionChevronDirective), { isSignal: true }] }], contentTpl: [{ type: i0.ContentChild, args: [i0.forwardRef(() => GogAccordionContentDirective), { isSignal: true }] }] } });
|
|
768
1092
|
|
|
769
1093
|
/**
|
|
770
1094
|
* Headless expand/collapse primitive — a trigger toggles a content region open and
|
|
@@ -840,7 +1164,14 @@ const NATIVELY_OPERABLE = ['button', 'input', 'select', 'textarea', 'summary'];
|
|
|
840
1164
|
* directive's call.
|
|
841
1165
|
*/
|
|
842
1166
|
class GogCollapsibleTriggerDirective {
|
|
1167
|
+
/**
|
|
1168
|
+
* Press ripple. Unset, falls back to `GOG_CONFIG.ripple.enabled`, then to `false` — so
|
|
1169
|
+
* `[ripple]="false"` opts one instance out of an app that turned it on everywhere.
|
|
1170
|
+
*/
|
|
1171
|
+
ripple = input(undefined, ...(ngDevMode ? [{ debugName: "ripple" }] : /* istanbul ignore next */ []));
|
|
843
1172
|
collapsible = inject(CollapsibleComponent);
|
|
1173
|
+
rippleEnabled = resolveRipple(this.ripple, inject(GOG_CONFIG));
|
|
1174
|
+
rippleControl = bindRipple(this.rippleEnabled);
|
|
844
1175
|
elementRef = inject(ElementRef);
|
|
845
1176
|
/**
|
|
846
1177
|
* Whether this host needs the button role wired on. Read once: an element does not change
|
|
@@ -878,7 +1209,7 @@ class GogCollapsibleTriggerDirective {
|
|
|
878
1209
|
return true;
|
|
879
1210
|
}
|
|
880
1211
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: GogCollapsibleTriggerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
881
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
1212
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.17", type: GogCollapsibleTriggerDirective, isStandalone: true, selector: "[gogCollapsibleTrigger]", inputs: { ripple: { classPropertyName: "ripple", publicName: "ripple", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "collapsible.toggle()", "keydown": "onKeydown($event)" }, properties: { "class.gog-collapsible__trigger--open": "collapsible.open()", "attr.aria-expanded": "collapsible.open()", "attr.aria-controls": "collapsible.contentId()", "attr.aria-disabled": "collapsible.disabled() ? \"true\" : null", "attr.role": "needsButtonSemantics ? \"button\" : declaredRole", "attr.tabindex": "needsButtonSemantics ? (collapsible.disabled() ? -1 : 0) : declaredTabIndex" }, classAttribute: "gog-collapsible__trigger" }, ngImport: i0 });
|
|
882
1213
|
}
|
|
883
1214
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: GogCollapsibleTriggerDirective, decorators: [{
|
|
884
1215
|
type: Directive,
|
|
@@ -896,7 +1227,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
|
|
|
896
1227
|
'(keydown)': 'onKeydown($event)',
|
|
897
1228
|
},
|
|
898
1229
|
}]
|
|
899
|
-
}] });
|
|
1230
|
+
}], propDecorators: { ripple: [{ type: i0.Input, args: [{ isSignal: true, alias: "ripple", required: false }] }] } });
|
|
900
1231
|
|
|
901
1232
|
/**
|
|
902
1233
|
* Marks the element that a `gog-collapsible` shows and hides. Applies the open/closed
|
|
@@ -1462,6 +1793,11 @@ class GogDropdownBase {
|
|
|
1462
1793
|
floatLabel = input(undefined, ...(ngDevMode ? [{ debugName: "floatLabel" }] : /* istanbul ignore next */ []));
|
|
1463
1794
|
/** Unset, falls back to `GOG_CONFIG.floatLabel.showPlaceholder`, then to `false`. */
|
|
1464
1795
|
floatLabelShowPlaceholder = input(undefined, ...(ngDevMode ? [{ debugName: "floatLabelShowPlaceholder" }] : /* istanbul ignore next */ []));
|
|
1796
|
+
/**
|
|
1797
|
+
* Press ripple on the panel's options. Unset, falls back to `GOG_CONFIG.ripple.enabled`, then
|
|
1798
|
+
* to `false`. The trigger itself never ripples — it is a field, not a button.
|
|
1799
|
+
*/
|
|
1800
|
+
ripple = input(undefined, ...(ngDevMode ? [{ debugName: "ripple" }] : /* istanbul ignore next */ []));
|
|
1465
1801
|
isOpen = signal(false, ...(ngDevMode ? [{ debugName: "isOpen" }] : /* istanbul ignore next */ []));
|
|
1466
1802
|
/** Projected `gogDropdownOption` template, if the consumer supplied one. */
|
|
1467
1803
|
optionSlot = contentChild(GogDropdownOptionDirective, ...(ngDevMode ? [{ debugName: "optionSlot" }] : /* istanbul ignore next */ []));
|
|
@@ -1525,6 +1861,7 @@ class GogDropdownBase {
|
|
|
1525
1861
|
isFocused = signal(false, ...(ngDevMode ? [{ debugName: "isFocused" }] : /* istanbul ignore next */ []));
|
|
1526
1862
|
/** Instance input → `GOG_CONFIG` → the component's own default. See `resolveConfigured`. */
|
|
1527
1863
|
resolvedSize = computed(() => resolveConfigured(this.size(), this.globalConfig.control?.size, DEFAULT_SIZE$8), ...(ngDevMode ? [{ debugName: "resolvedSize" }] : /* istanbul ignore next */ []));
|
|
1864
|
+
rippleEnabled = resolveRipple(this.ripple, this.globalConfig);
|
|
1528
1865
|
resolvedErrorDisplay = computed(() => resolveConfigured(this.errorDisplay(), this.globalConfig.control?.errorDisplay, DEFAULT_ERROR_DISPLAY$5), ...(ngDevMode ? [{ debugName: "resolvedErrorDisplay" }] : /* istanbul ignore next */ []));
|
|
1529
1866
|
resolvedAppendToBody = computed(() => resolveConfigured(this.appendToBody(), this.globalConfig.dropdown?.appendToBody, DEFAULT_APPEND_TO_BODY$1), ...(ngDevMode ? [{ debugName: "resolvedAppendToBody" }] : /* istanbul ignore next */ []));
|
|
1530
1867
|
resolvedDropdownDirection = computed(() => resolveConfigured(this.dropdownDirection(), this.globalConfig.dropdown?.direction, DEFAULT_DROPDOWN_DIRECTION), ...(ngDevMode ? [{ debugName: "resolvedDropdownDirection" }] : /* istanbul ignore next */ []));
|
|
@@ -1881,7 +2218,7 @@ class GogDropdownBase {
|
|
|
1881
2218
|
this.panelPlacement.set(placement);
|
|
1882
2219
|
}
|
|
1883
2220
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: GogDropdownBase, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1884
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "21.2.17", type: GogDropdownBase, isStandalone: true, inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, optionLabel: { classPropertyName: "optionLabel", publicName: "optionLabel", isSignal: true, isRequired: false, transformFunction: null }, optionValue: { classPropertyName: "optionValue", publicName: "optionValue", isSignal: true, isRequired: false, transformFunction: null }, optionDisabled: { classPropertyName: "optionDisabled", publicName: "optionDisabled", isSignal: true, isRequired: false, transformFunction: null }, clearable: { classPropertyName: "clearable", publicName: "clearable", isSignal: true, isRequired: false, transformFunction: null }, clearAriaLabel: { classPropertyName: "clearAriaLabel", publicName: "clearAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, minWidth: { classPropertyName: "minWidth", publicName: "minWidth", isSignal: true, isRequired: false, transformFunction: null }, filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: false, transformFunction: null }, filterPlaceholder: { classPropertyName: "filterPlaceholder", publicName: "filterPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, filterPosition: { classPropertyName: "filterPosition", publicName: "filterPosition", isSignal: true, isRequired: false, transformFunction: null }, filterEmptyMessage: { classPropertyName: "filterEmptyMessage", publicName: "filterEmptyMessage", isSignal: true, isRequired: false, transformFunction: null }, filterMatch: { classPropertyName: "filterMatch", publicName: "filterMatch", isSignal: true, isRequired: false, transformFunction: null }, errorMessage: { classPropertyName: "errorMessage", publicName: "errorMessage", isSignal: true, isRequired: false, transformFunction: null }, errorDisplay: { classPropertyName: "errorDisplay", publicName: "errorDisplay", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, dropdownDirection: { classPropertyName: "dropdownDirection", publicName: "dropdownDirection", isSignal: true, isRequired: false, transformFunction: null }, dropdownZIndex: { classPropertyName: "dropdownZIndex", publicName: "dropdownZIndex", isSignal: true, isRequired: false, transformFunction: null }, dropdownWidth: { classPropertyName: "dropdownWidth", publicName: "dropdownWidth", isSignal: true, isRequired: false, transformFunction: null }, dropdownMaxHeight: { classPropertyName: "dropdownMaxHeight", publicName: "dropdownMaxHeight", isSignal: true, isRequired: false, transformFunction: null }, appendToBody: { classPropertyName: "appendToBody", publicName: "appendToBody", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, fullWidth: { classPropertyName: "fullWidth", publicName: "fullWidth", isSignal: true, isRequired: false, transformFunction: null }, floatLabel: { classPropertyName: "floatLabel", publicName: "floatLabel", isSignal: true, isRequired: false, transformFunction: null }, floatLabelShowPlaceholder: { classPropertyName: "floatLabelShowPlaceholder", publicName: "floatLabelShowPlaceholder", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.gog-host--auto-width": "!fullWidth()" } }, queries: [{ propertyName: "chevronSlot", first: true, predicate: GogDropdownChevronDirective, descendants: true, isSignal: true }, { propertyName: "optionSlot", first: true, predicate: GogDropdownOptionDirective, descendants: true, isSignal: true }], ngImport: i0 });
|
|
2221
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "21.2.17", type: GogDropdownBase, isStandalone: true, inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, optionLabel: { classPropertyName: "optionLabel", publicName: "optionLabel", isSignal: true, isRequired: false, transformFunction: null }, optionValue: { classPropertyName: "optionValue", publicName: "optionValue", isSignal: true, isRequired: false, transformFunction: null }, optionDisabled: { classPropertyName: "optionDisabled", publicName: "optionDisabled", isSignal: true, isRequired: false, transformFunction: null }, clearable: { classPropertyName: "clearable", publicName: "clearable", isSignal: true, isRequired: false, transformFunction: null }, clearAriaLabel: { classPropertyName: "clearAriaLabel", publicName: "clearAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, minWidth: { classPropertyName: "minWidth", publicName: "minWidth", isSignal: true, isRequired: false, transformFunction: null }, filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: false, transformFunction: null }, filterPlaceholder: { classPropertyName: "filterPlaceholder", publicName: "filterPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, filterPosition: { classPropertyName: "filterPosition", publicName: "filterPosition", isSignal: true, isRequired: false, transformFunction: null }, filterEmptyMessage: { classPropertyName: "filterEmptyMessage", publicName: "filterEmptyMessage", isSignal: true, isRequired: false, transformFunction: null }, filterMatch: { classPropertyName: "filterMatch", publicName: "filterMatch", isSignal: true, isRequired: false, transformFunction: null }, errorMessage: { classPropertyName: "errorMessage", publicName: "errorMessage", isSignal: true, isRequired: false, transformFunction: null }, errorDisplay: { classPropertyName: "errorDisplay", publicName: "errorDisplay", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, dropdownDirection: { classPropertyName: "dropdownDirection", publicName: "dropdownDirection", isSignal: true, isRequired: false, transformFunction: null }, dropdownZIndex: { classPropertyName: "dropdownZIndex", publicName: "dropdownZIndex", isSignal: true, isRequired: false, transformFunction: null }, dropdownWidth: { classPropertyName: "dropdownWidth", publicName: "dropdownWidth", isSignal: true, isRequired: false, transformFunction: null }, dropdownMaxHeight: { classPropertyName: "dropdownMaxHeight", publicName: "dropdownMaxHeight", isSignal: true, isRequired: false, transformFunction: null }, appendToBody: { classPropertyName: "appendToBody", publicName: "appendToBody", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, fullWidth: { classPropertyName: "fullWidth", publicName: "fullWidth", isSignal: true, isRequired: false, transformFunction: null }, floatLabel: { classPropertyName: "floatLabel", publicName: "floatLabel", isSignal: true, isRequired: false, transformFunction: null }, floatLabelShowPlaceholder: { classPropertyName: "floatLabelShowPlaceholder", publicName: "floatLabelShowPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, ripple: { classPropertyName: "ripple", publicName: "ripple", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.gog-host--auto-width": "!fullWidth()" } }, queries: [{ propertyName: "chevronSlot", first: true, predicate: GogDropdownChevronDirective, descendants: true, isSignal: true }, { propertyName: "optionSlot", first: true, predicate: GogDropdownOptionDirective, descendants: true, isSignal: true }], ngImport: i0 });
|
|
1885
2222
|
}
|
|
1886
2223
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: GogDropdownBase, decorators: [{
|
|
1887
2224
|
type: Directive,
|
|
@@ -1894,12 +2231,97 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
|
|
|
1894
2231
|
'[class.gog-host--auto-width]': '!fullWidth()',
|
|
1895
2232
|
},
|
|
1896
2233
|
}]
|
|
1897
|
-
}], ctorParameters: () => [], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], optionLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionLabel", required: false }] }], optionValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionValue", required: false }] }], optionDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionDisabled", required: false }] }], clearable: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearable", required: false }] }], clearAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearAriaLabel", required: false }] }], minWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "minWidth", required: false }] }], filter: [{ type: i0.Input, args: [{ isSignal: true, alias: "filter", required: false }] }], filterPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterPlaceholder", required: false }] }], filterPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterPosition", required: false }] }], filterEmptyMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterEmptyMessage", required: false }] }], filterMatch: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterMatch", required: false }] }], errorMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorMessage", required: false }] }], errorDisplay: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorDisplay", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], dropdownDirection: [{ type: i0.Input, args: [{ isSignal: true, alias: "dropdownDirection", required: false }] }], dropdownZIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "dropdownZIndex", required: false }] }], dropdownWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "dropdownWidth", required: false }] }], dropdownMaxHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "dropdownMaxHeight", required: false }] }], appendToBody: [{ type: i0.Input, args: [{ isSignal: true, alias: "appendToBody", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], chevronSlot: [{ type: i0.ContentChild, args: [i0.forwardRef(() => GogDropdownChevronDirective), { isSignal: true }] }], fullWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "fullWidth", required: false }] }], floatLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "floatLabel", required: false }] }], floatLabelShowPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "floatLabelShowPlaceholder", required: false }] }], optionSlot: [{ type: i0.ContentChild, args: [i0.forwardRef(() => GogDropdownOptionDirective), { isSignal: true }] }] } });
|
|
2234
|
+
}], ctorParameters: () => [], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], optionLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionLabel", required: false }] }], optionValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionValue", required: false }] }], optionDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionDisabled", required: false }] }], clearable: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearable", required: false }] }], clearAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearAriaLabel", required: false }] }], minWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "minWidth", required: false }] }], filter: [{ type: i0.Input, args: [{ isSignal: true, alias: "filter", required: false }] }], filterPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterPlaceholder", required: false }] }], filterPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterPosition", required: false }] }], filterEmptyMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterEmptyMessage", required: false }] }], filterMatch: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterMatch", required: false }] }], errorMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorMessage", required: false }] }], errorDisplay: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorDisplay", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], dropdownDirection: [{ type: i0.Input, args: [{ isSignal: true, alias: "dropdownDirection", required: false }] }], dropdownZIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "dropdownZIndex", required: false }] }], dropdownWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "dropdownWidth", required: false }] }], dropdownMaxHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "dropdownMaxHeight", required: false }] }], appendToBody: [{ type: i0.Input, args: [{ isSignal: true, alias: "appendToBody", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], chevronSlot: [{ type: i0.ContentChild, args: [i0.forwardRef(() => GogDropdownChevronDirective), { isSignal: true }] }], fullWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "fullWidth", required: false }] }], floatLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "floatLabel", required: false }] }], floatLabelShowPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "floatLabelShowPlaceholder", required: false }] }], ripple: [{ type: i0.Input, args: [{ isSignal: true, alias: "ripple", required: false }] }], optionSlot: [{ type: i0.ContentChild, args: [i0.forwardRef(() => GogDropdownOptionDirective), { isSignal: true }] }] } });
|
|
1898
2235
|
function readPx$1(raw, fallback) {
|
|
1899
2236
|
const parsed = Number.parseFloat(raw.trim());
|
|
1900
2237
|
return Number.isFinite(parsed) ? parsed : fallback;
|
|
1901
2238
|
}
|
|
1902
2239
|
|
|
2240
|
+
/**
|
|
2241
|
+
* Reading a `--gog-*` token's value from TypeScript, safely.
|
|
2242
|
+
*
|
|
2243
|
+
* **The trap these exist for.** `getComputedStyle(el).getPropertyValue('--x')` returns a custom
|
|
2244
|
+
* property's *specified* value, not a used one. A token declared
|
|
2245
|
+
* `calc(10px * var(--gog-density))` comes back as that whole string, and `Number.parseFloat` on
|
|
2246
|
+
* it returns `NaN` — which every caller in this library turned into its fallback, silently. No
|
|
2247
|
+
* error, no failing test, just a component quietly using the wrong number.
|
|
2248
|
+
*
|
|
2249
|
+
* That is not hypothetical. 21.7.0's density scale (`docs/themes.md` iteration 6) made 178
|
|
2250
|
+
* tokens `calc(<n>px * var(--gog-density))`; none of the three tokens read from TypeScript were
|
|
2251
|
+
* among them, but nothing stopped the next one from being. And a **consumer** can write
|
|
2252
|
+
* `--gog-scroll-thumb-min-size: calc(2rem + 4px)` in their own theme at any time, which no
|
|
2253
|
+
* repo-side check could ever catch.
|
|
2254
|
+
*
|
|
2255
|
+
* So these resolve rather than parse: the fast path still handles a plain `12px`, and anything
|
|
2256
|
+
* else is handed to the browser on a throwaway element, which also gets `rem`, `em`, `%` and
|
|
2257
|
+
* nested `var()` right for free. The probe is appended to the element the token was read from,
|
|
2258
|
+
* so relative units resolve against the same context the real value would.
|
|
2259
|
+
*/
|
|
2260
|
+
/** Reads a length token in pixels. Returns `fallback` for an empty, unparseable or zero value. */
|
|
2261
|
+
function resolveLengthToken(el, token, fallback) {
|
|
2262
|
+
const raw = getComputedStyle(el).getPropertyValue(token).trim();
|
|
2263
|
+
if (!raw)
|
|
2264
|
+
return fallback;
|
|
2265
|
+
const plain = PX.exec(raw);
|
|
2266
|
+
if (plain)
|
|
2267
|
+
return Number.parseFloat(plain[1]);
|
|
2268
|
+
return probe(el, `width:${raw}`, (style) => readPx(style.width), fallback);
|
|
2269
|
+
}
|
|
2270
|
+
/**
|
|
2271
|
+
* Reads a unitless numeric token (a `z-index`). Same resolution path as lengths — `z-index`
|
|
2272
|
+
* takes an integer, so the browser computes `calc()` there too.
|
|
2273
|
+
*/
|
|
2274
|
+
function resolveNumberToken(el, token, fallback) {
|
|
2275
|
+
const raw = getComputedStyle(el).getPropertyValue(token).trim();
|
|
2276
|
+
if (!raw)
|
|
2277
|
+
return fallback;
|
|
2278
|
+
const plain = NUMBER.exec(raw);
|
|
2279
|
+
if (plain)
|
|
2280
|
+
return Number.parseFloat(plain[1]);
|
|
2281
|
+
return probe(el, `position:relative;z-index:${raw}`, (s) => {
|
|
2282
|
+
const resolved = NUMBER.exec(s.zIndex.trim());
|
|
2283
|
+
return resolved ? Number.parseFloat(resolved[1]) : Number.NaN;
|
|
2284
|
+
}, fallback);
|
|
2285
|
+
}
|
|
2286
|
+
const PX = /^(-?\d*\.?\d+)px$/;
|
|
2287
|
+
const NUMBER = /^(-?\d*\.?\d+)$/;
|
|
2288
|
+
/**
|
|
2289
|
+
* A computed length, but only if it really was computed.
|
|
2290
|
+
*
|
|
2291
|
+
* An environment with no layout engine — jsdom, which is what this library's own unit tests run
|
|
2292
|
+
* in — hands back the *specified* string from `getComputedStyle`, so a probe styled `width: 2em`
|
|
2293
|
+
* reads back `"2em"`, and `parseFloat` would happily call that `2`. A wrong number is worse than
|
|
2294
|
+
* the fallback, so anything that is not a resolved pixel value is rejected.
|
|
2295
|
+
*/
|
|
2296
|
+
function readPx(value) {
|
|
2297
|
+
const m = PX.exec(value.trim());
|
|
2298
|
+
return m ? Number.parseFloat(m[1]) : Number.NaN;
|
|
2299
|
+
}
|
|
2300
|
+
/**
|
|
2301
|
+
* Measures `declaration` on a hidden child of `host` and reads the result back.
|
|
2302
|
+
*
|
|
2303
|
+
* `visibility: hidden` rather than `display: none`, because a `display: none` element has no
|
|
2304
|
+
* used value to read — that is the whole failure this helper exists to avoid. `position:
|
|
2305
|
+
* absolute` keeps it out of the host's layout, so a flex or grid host is not disturbed by the
|
|
2306
|
+
* measurement.
|
|
2307
|
+
*/
|
|
2308
|
+
function probe(host, declaration, read, fallback) {
|
|
2309
|
+
const doc = host.ownerDocument;
|
|
2310
|
+
if (!doc?.defaultView)
|
|
2311
|
+
return fallback;
|
|
2312
|
+
const el = doc.createElement('div');
|
|
2313
|
+
el.style.cssText = `position:absolute;visibility:hidden;pointer-events:none;${declaration}`;
|
|
2314
|
+
host.appendChild(el);
|
|
2315
|
+
let value;
|
|
2316
|
+
try {
|
|
2317
|
+
value = read(doc.defaultView.getComputedStyle(el));
|
|
2318
|
+
}
|
|
2319
|
+
finally {
|
|
2320
|
+
el.remove();
|
|
2321
|
+
}
|
|
2322
|
+
return Number.isFinite(value) ? value : fallback;
|
|
2323
|
+
}
|
|
2324
|
+
|
|
1903
2325
|
/** A sub-pixel overflow reading is rounding noise, not real scrollable content. */
|
|
1904
2326
|
const OVERFLOW_EPSILON = 1;
|
|
1905
2327
|
/** Portion of the viewport paged per track click, leaving visual continuity with the old view. */
|
|
@@ -1910,10 +2332,6 @@ const DEFAULT_AUTO_HIDE = true;
|
|
|
1910
2332
|
const DEFAULT_HIDE_DELAY$1 = 800;
|
|
1911
2333
|
const DEFAULT_OVERSCROLL_BEHAVIOR = 'auto';
|
|
1912
2334
|
const DEFAULT_SHOW_TRACK = true;
|
|
1913
|
-
function readPx(raw, fallback) {
|
|
1914
|
-
const parsed = Number.parseFloat(raw.trim());
|
|
1915
|
-
return Number.isFinite(parsed) ? parsed : fallback;
|
|
1916
|
-
}
|
|
1917
2335
|
function clamp$1(value, min, max) {
|
|
1918
2336
|
return Math.min(max, Math.max(min, value));
|
|
1919
2337
|
}
|
|
@@ -2191,8 +2609,8 @@ class ScrollComponent {
|
|
|
2191
2609
|
}
|
|
2192
2610
|
/** Reads the tokens that feed thumb-size math. Cheap, but still only once per change. */
|
|
2193
2611
|
refreshTokens() {
|
|
2194
|
-
const
|
|
2195
|
-
this.thumbMinSizePx =
|
|
2612
|
+
const viewport = this.viewportRef().nativeElement;
|
|
2613
|
+
this.thumbMinSizePx = resolveLengthToken(viewport, '--gog-scroll-thumb-min-size', 32);
|
|
2196
2614
|
}
|
|
2197
2615
|
/** Coalesces scroll/resize bursts into one measurement per frame. */
|
|
2198
2616
|
scheduleMeasure() {
|
|
@@ -2616,14 +3034,21 @@ class AutocompleteComponent extends GogDropdownBase {
|
|
|
2616
3034
|
}
|
|
2617
3035
|
}
|
|
2618
3036
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: AutocompleteComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2619
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: AutocompleteComponent, isStandalone: true, selector: "gog-autocomplete", inputs: { inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, filterLocal: { classPropertyName: "filterLocal", publicName: "filterLocal", isSignal: true, isRequired: false, transformFunction: null }, minLength: { classPropertyName: "minLength", publicName: "minLength", isSignal: true, isRequired: false, transformFunction: null }, openOnFocus: { classPropertyName: "openOnFocus", publicName: "openOnFocus", isSignal: true, isRequired: false, transformFunction: null }, searchDebounce: { classPropertyName: "searchDebounce", publicName: "searchDebounce", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, emptyMessage: { classPropertyName: "emptyMessage", publicName: "emptyMessage", isSignal: true, isRequired: false, transformFunction: null }, forceSelection: { classPropertyName: "forceSelection", publicName: "forceSelection", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", gogSearch: "gogSearch", gogLoadMore: "gogLoadMore" }, host: { properties: { "style.--gog-autocomplete-min-width": "minWidth()" } }, viewQueries: [{ propertyName: "panelTemplate", first: true, predicate: ["panelTpl"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<!--\r\n Deliberately not `gog-contained-layout`: `contain: layout` makes this element a stacking\r\n context, which traps the panel's z-index inside it and lets whatever follows on the page\r\n paint over the open dropdown.\r\n-->\r\n<div\r\n class=\"gog-autocomplete\"\r\n [class]=\"sizeClass()\"\r\n [class.gog-autocomplete--clearable]=\"showClear()\"\r\n [class.gog-autocomplete--disabled]=\"isDisabled()\"\r\n [class.gog-autocomplete--open]=\"isOpen()\"\r\n [class.gog-autocomplete--loading]=\"loading()\"\r\n [class.gog-autocomplete--float-in]=\"resolvedFloatLabel() === 'in'\"\r\n [class.gog-autocomplete--float-on]=\"resolvedFloatLabel() === 'on'\"\r\n [class.gog-autocomplete--float-over]=\"resolvedFloatLabel() === 'over'\"\r\n [class.gog-autocomplete--floated]=\"isFloatLabelFloated()\"\r\n>\r\n @if (label() && resolvedFloatLabel() === 'none') {\r\n <label class=\"gog-autocomplete__label\" [for]=\"triggerId()\">{{ label() }}</label>\r\n }\r\n\r\n <div class=\"gog-autocomplete__field\">\r\n @if (label() && isFloatLabelActive()) {\r\n <label class=\"gog-autocomplete__label gog-autocomplete__label--float\" [for]=\"triggerId()\">{{\r\n label()\r\n }}</label>\r\n }\r\n\r\n <!--\r\n The input *is* the combobox \u2014 role, aria-autocomplete and aria-activedescendant all sit\r\n here, and DOM focus never leaves it. That is the difference from gog-select, where the\r\n trigger is a button and focus moves onto the option itself.\r\n -->\r\n <input\r\n type=\"text\"\r\n class=\"gog-autocomplete__control\"\r\n autocomplete=\"off\"\r\n role=\"combobox\"\r\n aria-autocomplete=\"list\"\r\n [id]=\"triggerId()\"\r\n [disabled]=\"isDisabled()\"\r\n [value]=\"query()\"\r\n [placeholder]=\"effectivePlaceholder()\"\r\n [attr.aria-label]=\"label() ? null : ariaLabel() || placeholder() || null\"\r\n [attr.aria-controls]=\"listboxId()\"\r\n [attr.aria-expanded]=\"isOpen()\"\r\n [attr.aria-activedescendant]=\"activeOptionId()\"\r\n [attr.aria-invalid]=\"hasError()\"\r\n [attr.aria-describedby]=\"errorId()\"\r\n (input)=\"onInput($event)\"\r\n (keydown)=\"onInputKeydown($event)\"\r\n (focus)=\"onInputFocus()\"\r\n (blur)=\"onInputBlur()\"\r\n />\r\n\r\n <span class=\"gog-autocomplete__actions\">\r\n @if (loading()) {\r\n <gog-spinner class=\"gog-autocomplete__spinner\" size=\"xsm\" ariaLabel=\"Loading\" />\r\n }\r\n\r\n @if (showClear()) {\r\n <button\r\n type=\"button\"\r\n class=\"gog-autocomplete__clear gog-inline-center\"\r\n [attr.aria-label]=\"resolvedClearLabel()\"\r\n (mousedown)=\"onOptionMousedown($event)\"\r\n (click)=\"clearValue($event)\"\r\n >\r\n <gog-icon name=\"close\" />\r\n </button>\r\n }\r\n </span>\r\n\r\n @if (isOpen() && !resolvedAppendToBody()) {\r\n <ng-container [ngTemplateOutlet]=\"panelTpl\" />\r\n }\r\n </div>\r\n\r\n @if (hasError()) {\r\n <span class=\"gog-autocomplete__error\" [attr.id]=\"errorId()\" role=\"alert\">\r\n {{ visibleError() }}\r\n </span>\r\n }\r\n</div>\r\n\r\n<!--\r\n One template for both render modes \u2014 inline, or stamped into <body> by the overlay when\r\n `appendToBody` is set, which is why the portal modifier and the resolved coordinates are\r\n applied conditionally.\r\n-->\r\n<ng-template #panelTpl>\r\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- (click) below is housekeeping stopPropagation; the keyboard contract lives on the combobox input, which keeps focus and drives this list via aria-activedescendant -->\r\n <div\r\n [id]=\"listboxId()\"\r\n class=\"gog-autocomplete__dropdown\"\r\n [class.gog-autocomplete__dropdown--up]=\"\r\n !resolvedAppendToBody() && dropdownDirectionState() === 'up'\r\n \"\r\n [class.gog-autocomplete__dropdown--portal]=\"resolvedAppendToBody()\"\r\n [class]=\"panelSizeClass()\"\r\n [style.top.px]=\"resolvedAppendToBody() ? panelPlacement()?.top : null\"\r\n [style.left.px]=\"resolvedAppendToBody() ? panelPlacement()?.left : null\"\r\n [style.width]=\"resolvedAppendToBody() ? resolvedPanelWidth() : null\"\r\n [style.min-width]=\"resolvedAppendToBody() ? resolvedPanelMinWidth() : null\"\r\n [style.max-height]=\"resolvedAppendToBody() ? resolvedPanelMaxHeight() : null\"\r\n [style.z-index]=\"dropdownZIndex() ?? panelZIndex()\"\r\n role=\"listbox\"\r\n [attr.aria-label]=\"label() || ariaLabel() || null\"\r\n (click)=\"$event.stopPropagation()\"\r\n >\r\n <gog-scroll\r\n size=\"thin\"\r\n [focusable]=\"false\"\r\n overscrollBehavior=\"contain\"\r\n class=\"gog-autocomplete__scroll\"\r\n (gogReachEnd)=\"gogLoadMore.emit()\"\r\n >\r\n @if (visibleOptions().length === 0) {\r\n <p class=\"gog-autocomplete__empty\">{{ emptyMessage() }}</p>\r\n }\r\n\r\n @for (option of visibleOptions(); track valueOf(option); let i = $index) {\r\n <!--\r\n A div, not a button: focus stays in the input, so these rows are never focused and a\r\n button would only add tab stops and a second Enter handler. The highlight is pointed\r\n at with aria-activedescendant instead.\r\n\r\n mousedown is prevented so clicking a row doesn't blur the input first \u2014 that blur\r\n would close the panel and, under forceSelection, wipe the text before the click lands.\r\n -->\r\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- this is the ARIA combobox pattern: the option is deliberately neither focusable nor a keyboard target, because focus stays in the input and the whole keyboard contract (arrows, Enter, Escape) is handled there and communicated through aria-activedescendant. Making these rows focusable would break the pattern rather than improve it. -->\r\n <div\r\n class=\"gog-autocomplete__option\"\r\n role=\"option\"\r\n [id]=\"optionId(i)\"\r\n [attr.aria-selected]=\"isSelected(option)\"\r\n [attr.aria-disabled]=\"isOptionDisabled(option)\"\r\n [class.gog-autocomplete__option--active]=\"i === activeIndex()\"\r\n [class.gog-autocomplete__option--selected]=\"isSelected(option)\"\r\n [class.gog-autocomplete__option--disabled]=\"isOptionDisabled(option)\"\r\n (mousedown)=\"onOptionMousedown($event)\"\r\n (click)=\"onOptionClick(option, $event)\"\r\n >\r\n @if (optionSlot(); as slot) {\r\n <ng-container\r\n [ngTemplateOutlet]=\"slot.templateRef\"\r\n [ngTemplateOutletContext]=\"optionContext(option, isSelected(option))\"\r\n />\r\n } @else {\r\n <span class=\"gog-autocomplete__option-label\">{{ labelOf(option) }}</span>\r\n }\r\n </div>\r\n }\r\n </gog-scroll>\r\n </div>\r\n</ng-template>\r\n", styles: ["@charset \"UTF-8\";:host{display:block}.gog-autocomplete{display:flex;flex-direction:column;gap:var(--gog-autocomplete-gap);width:100%}.gog-autocomplete__label{color:var(--gog-autocomplete-label-color);font-family:var(--gog-autocomplete-label-font-family);font-size:var(--gog-autocomplete-label-font-size);font-weight:var(--gog-autocomplete-label-font-weight);letter-spacing:var(--gog-autocomplete-label-letter-spacing)}.gog-autocomplete__field{position:relative;display:flex;align-items:center;width:100%;min-width:var(--gog-autocomplete-min-width)}.gog-autocomplete__control{box-sizing:border-box;width:100%;min-width:var(--gog-autocomplete-min-width);padding-block:var(--gog-autocomplete-padding-y, var(--gog-autocomplete-size-padding-y, var(--gog-field-md-padding-y)));padding-inline:var(--gog-autocomplete-padding-x, var(--gog-autocomplete-size-padding-x, var(--gog-field-md-padding-x))) var(--gog-autocomplete-actions-reserve);border:var(--gog-autocomplete-border-width) var(--gog-autocomplete-border-style) var(--gog-autocomplete-border-color);border-radius:var(--gog-autocomplete-radius);background-color:var(--gog-autocomplete-bg, var(--gog-autocomplete-field-bg));color:var(--gog-autocomplete-color, var(--gog-autocomplete-text-color));font-family:var(--gog-autocomplete-font-family);font-size:var(--gog-autocomplete-font-size, var(--gog-autocomplete-size-font-size, var(--gog-field-md-font-size)));line-height:var(--gog-autocomplete-line-height);transition:border-color var(--gog-autocomplete-transition-duration) var(--gog-easing),box-shadow var(--gog-autocomplete-transition-duration) var(--gog-easing)}.gog-autocomplete__control::placeholder{color:var(--gog-autocomplete-placeholder-color)}.gog-autocomplete__control:hover:not(:disabled){border-color:var(--gog-autocomplete-hover-border-color)}.gog-autocomplete__control:focus-visible{outline:var(--gog-autocomplete-focus-ring-width) solid var(--gog-autocomplete-focus-ring-color);outline-offset:var(--gog-autocomplete-focus-ring-offset)}.gog-autocomplete__control:disabled{opacity:var(--gog-autocomplete-disabled-opacity);cursor:not-allowed}.gog-autocomplete--error .gog-autocomplete__control,.gog-autocomplete__control[aria-invalid=true]{border-color:var(--gog-autocomplete-error-border-color)}.gog-autocomplete__actions{position:absolute;inset-inline-end:var(--gog-autocomplete-actions-inset);display:inline-flex;align-items:center;flex-direction:row-reverse;gap:var(--gog-autocomplete-actions-gap);pointer-events:none}.gog-autocomplete__actions>*{pointer-events:auto}.gog-autocomplete__clear{padding:0;border:0;background:none;color:var(--gog-autocomplete-clear-color);font-size:calc(var(--gog-icon-size) * var(--gog-autocomplete-clear-icon-ratio));cursor:pointer}.gog-autocomplete__clear:hover{color:var(--gog-autocomplete-clear-hover-color)}.gog-autocomplete__clear:focus-visible{outline:var(--gog-autocomplete-focus-ring-width) solid var(--gog-autocomplete-focus-ring-color);outline-offset:var(--gog-autocomplete-focus-ring-offset)}.gog-autocomplete__spinner{font-size:var(--gog-autocomplete-spinner-size)}.gog-autocomplete__error{color:var(--gog-autocomplete-error-color);font-family:var(--gog-autocomplete-error-font-family);font-size:var(--gog-autocomplete-error-font-size)}.gog-autocomplete__dropdown{position:absolute;inset-inline-start:0;top:calc(100% + var(--gog-autocomplete-panel-gap));z-index:var(--gog-dropdown-z);box-sizing:border-box;display:flex;flex-direction:column;width:max-content;min-width:100%;max-width:var(--gog-autocomplete-panel-max-width);max-height:var(--gog-autocomplete-panel-max-height);padding:var(--gog-autocomplete-options-padding);border:var(--gog-autocomplete-panel-border-width) var(--gog-autocomplete-panel-border-style) var(--gog-autocomplete-panel-border-color);border-radius:var(--gog-autocomplete-panel-radius);background-color:var(--gog-autocomplete-panel-bg);box-shadow:var(--gog-autocomplete-panel-shadow);overflow:hidden}.gog-autocomplete__dropdown--up{top:auto;bottom:calc(100% + var(--gog-autocomplete-panel-gap))}.gog-autocomplete__dropdown--portal{position:fixed;top:0;inset-inline-start:0;min-width:0}.gog-autocomplete__scroll{flex:1;min-height:0}.gog-autocomplete__option{display:flex;align-items:center;gap:var(--gog-autocomplete-option-gap);padding:var(--gog-autocomplete-option-padding);border-radius:var(--gog-autocomplete-option-radius);color:var(--gog-autocomplete-option-color);font-family:var(--gog-autocomplete-font-family);font-size:var(--gog-autocomplete-font-size, var(--gog-autocomplete-size-font-size, var(--gog-field-md-font-size)));cursor:pointer}.gog-autocomplete__option:hover:not([aria-disabled=true]),.gog-autocomplete__option--active{background-color:var(--gog-autocomplete-option-hover-bg);color:var(--gog-autocomplete-option-hover-color)}.gog-autocomplete__option--selected{background-color:var(--gog-autocomplete-option-selected-bg);color:var(--gog-autocomplete-option-selected-color)}.gog-autocomplete__option--disabled{opacity:var(--gog-autocomplete-disabled-opacity);cursor:not-allowed}.gog-autocomplete__option-label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.gog-autocomplete__empty{margin:0;padding:var(--gog-autocomplete-option-padding);color:var(--gog-autocomplete-empty-color);font-family:var(--gog-autocomplete-font-family);font-size:var(--gog-autocomplete-empty-font-size)}.gog-autocomplete--xsm{--gog-autocomplete-size-padding-y: var(--gog-field-xsm-padding-y);--gog-autocomplete-size-padding-x: var(--gog-field-xsm-padding-x);--gog-autocomplete-size-font-size: var(--gog-field-xsm-font-size)}.gog-autocomplete--sm{--gog-autocomplete-size-padding-y: var(--gog-field-sm-padding-y);--gog-autocomplete-size-padding-x: var(--gog-field-sm-padding-x);--gog-autocomplete-size-font-size: var(--gog-field-sm-font-size)}.gog-autocomplete--lg{--gog-autocomplete-size-padding-y: var(--gog-field-lg-padding-y);--gog-autocomplete-size-padding-x: var(--gog-field-lg-padding-x);--gog-autocomplete-size-font-size: var(--gog-field-lg-font-size)}.gog-autocomplete--slg{--gog-autocomplete-size-padding-y: var(--gog-field-slg-padding-y);--gog-autocomplete-size-padding-x: var(--gog-field-slg-padding-x);--gog-autocomplete-size-font-size: var(--gog-field-slg-font-size)}:host(.gog-host--auto-width) .gog-autocomplete,:host(.gog-host--auto-width) .gog-autocomplete__field,:host(.gog-host--auto-width) .gog-autocomplete__control{width:auto}.gog-autocomplete__label--float{position:absolute;inset-inline-start:var(--gog-autocomplete-padding-x, var(--gog-autocomplete-size-padding-x, var(--gog-field-md-padding-x)));top:50%;transform:translateY(-50%);max-width:calc(100% - 2 * var(--gog-autocomplete-padding-x, var(--gog-autocomplete-size-padding-x, var(--gog-field-md-padding-x))));overflow:hidden;text-overflow:ellipsis;white-space:nowrap;pointer-events:none;color:var(--gog-autocomplete-placeholder-color);font-size:var(--gog-autocomplete-size-font-size, var(--gog-field-md-font-size));text-transform:none;letter-spacing:normal;transition:transform var(--gog-autocomplete-transition-duration) var(--gog-easing),font-size var(--gog-autocomplete-transition-duration) var(--gog-easing),color var(--gog-autocomplete-transition-duration) var(--gog-easing),top var(--gog-autocomplete-transition-duration) var(--gog-easing),background-color var(--gog-autocomplete-transition-duration) var(--gog-easing)}.gog-autocomplete--float-in,.gog-autocomplete--float-on{--gog-autocomplete-float-top-padding: calc(var(--gog-autocomplete-padding-y, var(--gog-autocomplete-size-padding-y, var(--gog-field-md-padding-y))) + var(--gog-autocomplete-float-label-reserve))}.gog-autocomplete--float-in .gog-autocomplete__control,.gog-autocomplete--float-on .gog-autocomplete__control{padding-top:var(--gog-autocomplete-float-top-padding)}.gog-autocomplete--float-in .gog-autocomplete__label--float,.gog-autocomplete--float-on .gog-autocomplete__label--float{top:var(--gog-autocomplete-float-top-padding);transform:none}.gog-autocomplete--float-in.gog-autocomplete--floated .gog-autocomplete__label--float{top:var(--gog-autocomplete-float-label-in-top);transform:translateY(0);font-size:var(--gog-autocomplete-label-font-size);color:var(--gog-autocomplete-label-color);text-transform:var(--gog-autocomplete-label-text-transform);letter-spacing:var(--gog-autocomplete-label-letter-spacing)}.gog-autocomplete--float-on.gog-autocomplete--floated .gog-autocomplete__label--float{top:0;transform:translateY(-50%);font-size:var(--gog-autocomplete-label-font-size);color:var(--gog-autocomplete-label-color);text-transform:var(--gog-autocomplete-label-text-transform);letter-spacing:var(--gog-autocomplete-label-letter-spacing);background-color:var(--gog-autocomplete-float-label-on-bg, var(--gog-autocomplete-field-bg));padding:0 4px;inset-inline-start:calc(var(--gog-autocomplete-padding-x, var(--gog-autocomplete-size-padding-x, var(--gog-field-md-padding-x))) - 4px)}.gog-autocomplete--float-over.gog-autocomplete--floated .gog-autocomplete__label--float{top:calc(-1 * var(--gog-autocomplete-float-label-over-gap));transform:translateY(-100%);font-size:var(--gog-autocomplete-label-font-size);color:var(--gog-autocomplete-label-color);text-transform:var(--gog-autocomplete-label-text-transform);letter-spacing:var(--gog-autocomplete-label-letter-spacing)}.gog-autocomplete--float-over .gog-autocomplete__field{margin-top:var(--gog-autocomplete-float-label-over-reserve)}@media(prefers-reduced-motion:reduce){.gog-autocomplete__control{transition:none}}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "gog-icon", inputs: ["name", "template", "title", "ariaHidden"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ScrollComponent, selector: "gog-scroll", inputs: ["axis", "size", "autoHide", "hideDelay", "reachThreshold", "focusable", "ariaLabel", "overscrollBehavior", "showTrack"], outputs: ["gogScroll", "gogReachStart", "gogReachEnd"] }, { kind: "component", type: SpinnerComponent, selector: "gog-spinner", inputs: ["size", "overlay", "ariaLabel", "variant"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3037
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: AutocompleteComponent, isStandalone: true, selector: "gog-autocomplete", inputs: { inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, filterLocal: { classPropertyName: "filterLocal", publicName: "filterLocal", isSignal: true, isRequired: false, transformFunction: null }, minLength: { classPropertyName: "minLength", publicName: "minLength", isSignal: true, isRequired: false, transformFunction: null }, openOnFocus: { classPropertyName: "openOnFocus", publicName: "openOnFocus", isSignal: true, isRequired: false, transformFunction: null }, searchDebounce: { classPropertyName: "searchDebounce", publicName: "searchDebounce", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, emptyMessage: { classPropertyName: "emptyMessage", publicName: "emptyMessage", isSignal: true, isRequired: false, transformFunction: null }, forceSelection: { classPropertyName: "forceSelection", publicName: "forceSelection", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", gogSearch: "gogSearch", gogLoadMore: "gogLoadMore" }, host: { properties: { "style.--gog-autocomplete-min-width": "minWidth()", "attr.aria-busy": "loading() ? \"true\" : null" } }, viewQueries: [{ propertyName: "panelTemplate", first: true, predicate: ["panelTpl"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<!--\r\n Deliberately not `gog-contained-layout`: `contain: layout` makes this element a stacking\r\n context, which traps the panel's z-index inside it and lets whatever follows on the page\r\n paint over the open dropdown.\r\n-->\r\n<div\r\n class=\"gog-autocomplete\"\r\n [class]=\"sizeClass()\"\r\n [class.gog-autocomplete--clearable]=\"showClear()\"\r\n [class.gog-autocomplete--disabled]=\"isDisabled()\"\r\n [class.gog-autocomplete--open]=\"isOpen()\"\r\n [class.gog-autocomplete--loading]=\"loading()\"\r\n [class.gog-autocomplete--float-in]=\"resolvedFloatLabel() === 'in'\"\r\n [class.gog-autocomplete--float-on]=\"resolvedFloatLabel() === 'on'\"\r\n [class.gog-autocomplete--float-over]=\"resolvedFloatLabel() === 'over'\"\r\n [class.gog-autocomplete--floated]=\"isFloatLabelFloated()\"\r\n>\r\n @if (label() && resolvedFloatLabel() === 'none') {\r\n <label class=\"gog-autocomplete__label\" [for]=\"triggerId()\">{{ label() }}</label>\r\n }\r\n\r\n <div class=\"gog-autocomplete__field\">\r\n @if (label() && isFloatLabelActive()) {\r\n <label class=\"gog-autocomplete__label gog-autocomplete__label--float\" [for]=\"triggerId()\">{{\r\n label()\r\n }}</label>\r\n }\r\n\r\n <!--\r\n The input *is* the combobox \u2014 role, aria-autocomplete and aria-activedescendant all sit\r\n here, and DOM focus never leaves it. That is the difference from gog-select, where the\r\n trigger is a button and focus moves onto the option itself.\r\n -->\r\n <input\r\n type=\"text\"\r\n class=\"gog-autocomplete__control\"\r\n autocomplete=\"off\"\r\n role=\"combobox\"\r\n aria-autocomplete=\"list\"\r\n [id]=\"triggerId()\"\r\n [disabled]=\"isDisabled()\"\r\n [value]=\"query()\"\r\n [placeholder]=\"effectivePlaceholder()\"\r\n [attr.aria-label]=\"label() ? null : ariaLabel() || placeholder() || null\"\r\n [attr.aria-controls]=\"listboxId()\"\r\n [attr.aria-expanded]=\"isOpen()\"\r\n [attr.aria-activedescendant]=\"activeOptionId()\"\r\n [attr.aria-invalid]=\"hasError()\"\r\n [attr.aria-describedby]=\"errorId()\"\r\n (input)=\"onInput($event)\"\r\n (keydown)=\"onInputKeydown($event)\"\r\n (focus)=\"onInputFocus()\"\r\n (blur)=\"onInputBlur()\"\r\n />\r\n\r\n <span class=\"gog-autocomplete__actions\">\r\n @if (loading()) {\r\n <gog-spinner class=\"gog-autocomplete__spinner\" size=\"xsm\" ariaLabel=\"Loading\" />\r\n }\r\n\r\n @if (showClear()) {\r\n <button\r\n type=\"button\"\r\n class=\"gog-autocomplete__clear gog-inline-center\"\r\n [attr.aria-label]=\"resolvedClearLabel()\"\r\n (mousedown)=\"onOptionMousedown($event)\"\r\n (click)=\"clearValue($event)\"\r\n >\r\n <gog-icon name=\"close\" />\r\n </button>\r\n }\r\n </span>\r\n\r\n @if (isOpen() && !resolvedAppendToBody()) {\r\n <ng-container [ngTemplateOutlet]=\"panelTpl\" />\r\n }\r\n </div>\r\n\r\n @if (hasError()) {\r\n <span class=\"gog-autocomplete__error\" [attr.id]=\"errorId()\" role=\"alert\">\r\n {{ visibleError() }}\r\n </span>\r\n }\r\n</div>\r\n\r\n<!--\r\n One template for both render modes \u2014 inline, or stamped into <body> by the overlay when\r\n `appendToBody` is set, which is why the portal modifier and the resolved coordinates are\r\n applied conditionally.\r\n-->\r\n<ng-template #panelTpl>\r\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- (click) below is housekeeping stopPropagation; the keyboard contract lives on the combobox input, which keeps focus and drives this list via aria-activedescendant -->\r\n <div\r\n [id]=\"listboxId()\"\r\n class=\"gog-autocomplete__dropdown\"\r\n [class.gog-autocomplete__dropdown--up]=\"\r\n !resolvedAppendToBody() && dropdownDirectionState() === 'up'\r\n \"\r\n [class.gog-autocomplete__dropdown--portal]=\"resolvedAppendToBody()\"\r\n [class]=\"panelSizeClass()\"\r\n [style.top.px]=\"resolvedAppendToBody() ? panelPlacement()?.top : null\"\r\n [style.left.px]=\"resolvedAppendToBody() ? panelPlacement()?.left : null\"\r\n [style.width]=\"resolvedAppendToBody() ? resolvedPanelWidth() : null\"\r\n [style.min-width]=\"resolvedAppendToBody() ? resolvedPanelMinWidth() : null\"\r\n [style.max-height]=\"resolvedAppendToBody() ? resolvedPanelMaxHeight() : null\"\r\n [style.z-index]=\"dropdownZIndex() ?? panelZIndex()\"\r\n role=\"listbox\"\r\n [attr.aria-label]=\"label() || ariaLabel() || null\"\r\n (click)=\"$event.stopPropagation()\"\r\n >\r\n <gog-scroll\r\n size=\"thin\"\r\n [focusable]=\"false\"\r\n overscrollBehavior=\"contain\"\r\n class=\"gog-autocomplete__scroll\"\r\n (gogReachEnd)=\"gogLoadMore.emit()\"\r\n >\r\n @if (visibleOptions().length === 0) {\r\n <p class=\"gog-autocomplete__empty\">{{ emptyMessage() }}</p>\r\n }\r\n\r\n @for (option of visibleOptions(); track valueOf(option); let i = $index) {\r\n <!--\r\n A div, not a button: focus stays in the input, so these rows are never focused and a\r\n button would only add tab stops and a second Enter handler. The highlight is pointed\r\n at with aria-activedescendant instead.\r\n\r\n mousedown is prevented so clicking a row doesn't blur the input first \u2014 that blur\r\n would close the panel and, under forceSelection, wipe the text before the click lands.\r\n -->\r\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- this is the ARIA combobox pattern: the option is deliberately neither focusable nor a keyboard target, because focus stays in the input and the whole keyboard contract (arrows, Enter, Escape) is handled there and communicated through aria-activedescendant. Making these rows focusable would break the pattern rather than improve it. -->\r\n <div\r\n class=\"gog-autocomplete__option\"\r\n role=\"option\"\r\n [id]=\"optionId(i)\"\r\n [attr.aria-selected]=\"isSelected(option)\"\r\n [attr.aria-disabled]=\"isOptionDisabled(option)\"\r\n [class.gog-autocomplete__option--active]=\"i === activeIndex()\"\r\n [class.gog-autocomplete__option--selected]=\"isSelected(option)\"\r\n [class.gog-autocomplete__option--disabled]=\"isOptionDisabled(option)\"\r\n gogRipple\r\n [rippleDisabled]=\"!rippleEnabled()\"\r\n (mousedown)=\"onOptionMousedown($event)\"\r\n (click)=\"onOptionClick(option, $event)\"\r\n >\r\n @if (optionSlot(); as slot) {\r\n <ng-container\r\n [ngTemplateOutlet]=\"slot.templateRef\"\r\n [ngTemplateOutletContext]=\"optionContext(option, isSelected(option))\"\r\n />\r\n } @else {\r\n <span class=\"gog-autocomplete__option-label\">{{ labelOf(option) }}</span>\r\n }\r\n </div>\r\n }\r\n </gog-scroll>\r\n </div>\r\n</ng-template>\r\n", styles: ["@charset \"UTF-8\";:host{display:block}.gog-autocomplete{display:flex;flex-direction:column;gap:var(--gog-autocomplete-gap);width:100%}.gog-autocomplete__label{color:var(--gog-autocomplete-label-color);font-family:var(--gog-autocomplete-label-font-family);font-size:var(--gog-autocomplete-label-font-size);font-weight:var(--gog-autocomplete-label-font-weight);letter-spacing:var(--gog-autocomplete-label-letter-spacing)}.gog-autocomplete__field{position:relative;display:flex;align-items:center;width:100%;min-width:var(--gog-autocomplete-min-width)}.gog-autocomplete__control{box-sizing:border-box;width:100%;min-width:var(--gog-autocomplete-min-width);padding-block:var(--gog-autocomplete-padding-y, var(--gog-autocomplete-size-padding-y, var(--gog-field-md-padding-y)));padding-inline:var(--gog-autocomplete-padding-x, var(--gog-autocomplete-size-padding-x, var(--gog-field-md-padding-x))) var(--gog-autocomplete-actions-reserve);border:var(--gog-autocomplete-border-width) var(--gog-autocomplete-border-style) var(--gog-autocomplete-border-color);border-radius:var(--gog-autocomplete-radius);background-color:var(--gog-autocomplete-bg, var(--gog-autocomplete-field-bg));color:var(--gog-autocomplete-color, var(--gog-autocomplete-text-color));font-family:var(--gog-autocomplete-font-family);font-size:var(--gog-autocomplete-font-size, var(--gog-autocomplete-size-font-size, var(--gog-field-md-font-size)));line-height:var(--gog-autocomplete-line-height);transition:border-color var(--gog-autocomplete-transition-duration) var(--gog-easing),box-shadow var(--gog-autocomplete-transition-duration) var(--gog-easing)}.gog-autocomplete__control::placeholder{color:var(--gog-autocomplete-placeholder-color)}.gog-autocomplete__control:hover:not(:disabled){border-color:var(--gog-autocomplete-hover-border-color)}.gog-autocomplete__control:focus-visible{outline:var(--gog-autocomplete-focus-ring-width) solid var(--gog-autocomplete-focus-ring-color);outline-offset:var(--gog-autocomplete-focus-ring-offset)}.gog-autocomplete__control:disabled{opacity:var(--gog-autocomplete-disabled-opacity);cursor:not-allowed}.gog-autocomplete--error .gog-autocomplete__control,.gog-autocomplete__control[aria-invalid=true]{border-color:var(--gog-autocomplete-error-border-color)}.gog-autocomplete__actions{position:absolute;inset-inline-end:var(--gog-autocomplete-actions-inset);display:inline-flex;align-items:center;flex-direction:row-reverse;gap:var(--gog-autocomplete-actions-gap);pointer-events:none}.gog-autocomplete__actions>*{pointer-events:auto}.gog-autocomplete__clear{padding:0;border:0;background:none;color:var(--gog-autocomplete-clear-color);font-size:calc(var(--gog-icon-size) * var(--gog-autocomplete-clear-icon-ratio));cursor:pointer}.gog-autocomplete__clear:hover{color:var(--gog-autocomplete-clear-hover-color)}.gog-autocomplete__clear:focus-visible{outline:var(--gog-autocomplete-focus-ring-width) solid var(--gog-autocomplete-focus-ring-color);outline-offset:var(--gog-autocomplete-focus-ring-offset)}.gog-autocomplete__spinner{font-size:var(--gog-autocomplete-spinner-size)}.gog-autocomplete__error{color:var(--gog-autocomplete-error-color);font-family:var(--gog-autocomplete-error-font-family);font-size:var(--gog-autocomplete-error-font-size)}.gog-autocomplete__dropdown{position:absolute;inset-inline-start:0;top:calc(100% + var(--gog-autocomplete-panel-gap));z-index:var(--gog-dropdown-z);box-sizing:border-box;display:flex;flex-direction:column;width:max-content;min-width:100%;max-width:var(--gog-autocomplete-panel-max-width);max-height:var(--gog-autocomplete-panel-max-height);padding:var(--gog-autocomplete-options-padding);border:var(--gog-autocomplete-panel-border-width) var(--gog-autocomplete-panel-border-style) var(--gog-autocomplete-panel-border-color);border-radius:var(--gog-autocomplete-panel-radius);background-color:var(--gog-autocomplete-panel-bg);box-shadow:var(--gog-autocomplete-panel-shadow);overflow:hidden}.gog-autocomplete__dropdown--up{top:auto;bottom:calc(100% + var(--gog-autocomplete-panel-gap))}.gog-autocomplete__dropdown--portal{position:fixed;top:0;inset-inline-start:0;min-width:0}.gog-autocomplete__scroll{flex:1;min-height:0}.gog-autocomplete__option{display:flex;align-items:center;gap:var(--gog-autocomplete-option-gap);padding:var(--gog-autocomplete-option-padding);border-radius:var(--gog-autocomplete-option-radius);color:var(--gog-autocomplete-option-color);font-family:var(--gog-autocomplete-font-family);font-size:var(--gog-autocomplete-font-size, var(--gog-autocomplete-size-font-size, var(--gog-field-md-font-size)));cursor:pointer}.gog-autocomplete__option:hover:not([aria-disabled=true]),.gog-autocomplete__option--active{background-color:var(--gog-autocomplete-option-hover-bg);color:var(--gog-autocomplete-option-hover-color)}.gog-autocomplete__option--selected{background-color:var(--gog-autocomplete-option-selected-bg);color:var(--gog-autocomplete-option-selected-color)}.gog-autocomplete__option--disabled{opacity:var(--gog-autocomplete-disabled-opacity);cursor:not-allowed}.gog-autocomplete__option-label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.gog-autocomplete__empty{margin:0;padding:var(--gog-autocomplete-option-padding);color:var(--gog-autocomplete-empty-color);font-family:var(--gog-autocomplete-font-family);font-size:var(--gog-autocomplete-empty-font-size)}.gog-autocomplete--xsm{--gog-autocomplete-size-padding-y: var(--gog-field-xsm-padding-y);--gog-autocomplete-size-padding-x: var(--gog-field-xsm-padding-x);--gog-autocomplete-size-font-size: var(--gog-field-xsm-font-size)}.gog-autocomplete--sm{--gog-autocomplete-size-padding-y: var(--gog-field-sm-padding-y);--gog-autocomplete-size-padding-x: var(--gog-field-sm-padding-x);--gog-autocomplete-size-font-size: var(--gog-field-sm-font-size)}.gog-autocomplete--lg{--gog-autocomplete-size-padding-y: var(--gog-field-lg-padding-y);--gog-autocomplete-size-padding-x: var(--gog-field-lg-padding-x);--gog-autocomplete-size-font-size: var(--gog-field-lg-font-size)}.gog-autocomplete--slg{--gog-autocomplete-size-padding-y: var(--gog-field-slg-padding-y);--gog-autocomplete-size-padding-x: var(--gog-field-slg-padding-x);--gog-autocomplete-size-font-size: var(--gog-field-slg-font-size)}:host(.gog-host--auto-width) .gog-autocomplete,:host(.gog-host--auto-width) .gog-autocomplete__field,:host(.gog-host--auto-width) .gog-autocomplete__control{width:auto}.gog-autocomplete__label--float{position:absolute;inset-inline-start:var(--gog-autocomplete-padding-x, var(--gog-autocomplete-size-padding-x, var(--gog-field-md-padding-x)));top:50%;transform:translateY(-50%);max-width:calc(100% - 2 * var(--gog-autocomplete-padding-x, var(--gog-autocomplete-size-padding-x, var(--gog-field-md-padding-x))));overflow:hidden;text-overflow:ellipsis;white-space:nowrap;pointer-events:none;color:var(--gog-autocomplete-placeholder-color);font-size:var(--gog-autocomplete-size-font-size, var(--gog-field-md-font-size));text-transform:none;letter-spacing:normal;transition:transform var(--gog-autocomplete-transition-duration) var(--gog-easing),font-size var(--gog-autocomplete-transition-duration) var(--gog-easing),color var(--gog-autocomplete-transition-duration) var(--gog-easing),top var(--gog-autocomplete-transition-duration) var(--gog-easing),background-color var(--gog-autocomplete-transition-duration) var(--gog-easing)}.gog-autocomplete--float-in,.gog-autocomplete--float-on{--gog-autocomplete-float-top-padding: calc(var(--gog-autocomplete-padding-y, var(--gog-autocomplete-size-padding-y, var(--gog-field-md-padding-y))) + var(--gog-autocomplete-float-label-reserve))}.gog-autocomplete--float-in .gog-autocomplete__control,.gog-autocomplete--float-on .gog-autocomplete__control{padding-top:var(--gog-autocomplete-float-top-padding)}.gog-autocomplete--float-in .gog-autocomplete__label--float,.gog-autocomplete--float-on .gog-autocomplete__label--float{top:var(--gog-autocomplete-float-top-padding);transform:none}.gog-autocomplete--float-in.gog-autocomplete--floated .gog-autocomplete__label--float{top:var(--gog-autocomplete-float-label-in-top);transform:translateY(0);font-size:var(--gog-autocomplete-label-font-size);color:var(--gog-autocomplete-label-color);text-transform:var(--gog-autocomplete-label-text-transform);letter-spacing:var(--gog-autocomplete-label-letter-spacing)}.gog-autocomplete--float-on.gog-autocomplete--floated .gog-autocomplete__label--float{top:0;transform:translateY(-50%);font-size:var(--gog-autocomplete-label-font-size);color:var(--gog-autocomplete-label-color);text-transform:var(--gog-autocomplete-label-text-transform);letter-spacing:var(--gog-autocomplete-label-letter-spacing);background-color:var(--gog-autocomplete-float-label-on-bg, var(--gog-autocomplete-field-bg));padding:0 4px;inset-inline-start:calc(var(--gog-autocomplete-padding-x, var(--gog-autocomplete-size-padding-x, var(--gog-field-md-padding-x))) - 4px)}.gog-autocomplete--float-over.gog-autocomplete--floated .gog-autocomplete__label--float{top:calc(-1 * var(--gog-autocomplete-float-label-over-gap));transform:translateY(-100%);font-size:var(--gog-autocomplete-label-font-size);color:var(--gog-autocomplete-label-color);text-transform:var(--gog-autocomplete-label-text-transform);letter-spacing:var(--gog-autocomplete-label-letter-spacing)}.gog-autocomplete--float-over .gog-autocomplete__field{margin-top:var(--gog-autocomplete-float-label-over-reserve)}@media(prefers-reduced-motion:reduce){.gog-autocomplete__control{transition:none}}\n"], dependencies: [{ kind: "directive", type: GogRippleDirective, selector: "[gogRipple]", inputs: ["rippleDisabled", "rippleCentred"] }, { kind: "component", type: IconComponent, selector: "gog-icon", inputs: ["name", "template", "title", "ariaHidden"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ScrollComponent, selector: "gog-scroll", inputs: ["axis", "size", "autoHide", "hideDelay", "reachThreshold", "focusable", "ariaLabel", "overscrollBehavior", "showTrack"], outputs: ["gogScroll", "gogReachStart", "gogReachEnd"] }, { kind: "component", type: SpinnerComponent, selector: "gog-spinner", inputs: ["size", "overlay", "ariaLabel", "variant"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2620
3038
|
}
|
|
2621
3039
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: AutocompleteComponent, decorators: [{
|
|
2622
3040
|
type: Component,
|
|
2623
|
-
args: [{ selector: 'gog-autocomplete', imports: [IconComponent, NgTemplateOutlet, ScrollComponent, SpinnerComponent], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
3041
|
+
args: [{ selector: 'gog-autocomplete', imports: [GogRippleDirective, IconComponent, NgTemplateOutlet, ScrollComponent, SpinnerComponent], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
2624
3042
|
// Only bites when the control has opted out of full width; otherwise the container decides.
|
|
2625
3043
|
'[style.--gog-autocomplete-min-width]': 'minWidth()',
|
|
2626
|
-
}, template: "<!--\r\n Deliberately not `gog-contained-layout`: `contain: layout` makes this element a stacking\r\n context, which traps the panel's z-index inside it and lets whatever follows on the page\r\n paint over the open dropdown.\r\n-->\r\n<div\r\n class=\"gog-autocomplete\"\r\n [class]=\"sizeClass()\"\r\n [class.gog-autocomplete--clearable]=\"showClear()\"\r\n [class.gog-autocomplete--disabled]=\"isDisabled()\"\r\n [class.gog-autocomplete--open]=\"isOpen()\"\r\n [class.gog-autocomplete--loading]=\"loading()\"\r\n [class.gog-autocomplete--float-in]=\"resolvedFloatLabel() === 'in'\"\r\n [class.gog-autocomplete--float-on]=\"resolvedFloatLabel() === 'on'\"\r\n [class.gog-autocomplete--float-over]=\"resolvedFloatLabel() === 'over'\"\r\n [class.gog-autocomplete--floated]=\"isFloatLabelFloated()\"\r\n>\r\n @if (label() && resolvedFloatLabel() === 'none') {\r\n <label class=\"gog-autocomplete__label\" [for]=\"triggerId()\">{{ label() }}</label>\r\n }\r\n\r\n <div class=\"gog-autocomplete__field\">\r\n @if (label() && isFloatLabelActive()) {\r\n <label class=\"gog-autocomplete__label gog-autocomplete__label--float\" [for]=\"triggerId()\">{{\r\n label()\r\n }}</label>\r\n }\r\n\r\n <!--\r\n The input *is* the combobox \u2014 role, aria-autocomplete and aria-activedescendant all sit\r\n here, and DOM focus never leaves it. That is the difference from gog-select, where the\r\n trigger is a button and focus moves onto the option itself.\r\n -->\r\n <input\r\n type=\"text\"\r\n class=\"gog-autocomplete__control\"\r\n autocomplete=\"off\"\r\n role=\"combobox\"\r\n aria-autocomplete=\"list\"\r\n [id]=\"triggerId()\"\r\n [disabled]=\"isDisabled()\"\r\n [value]=\"query()\"\r\n [placeholder]=\"effectivePlaceholder()\"\r\n [attr.aria-label]=\"label() ? null : ariaLabel() || placeholder() || null\"\r\n [attr.aria-controls]=\"listboxId()\"\r\n [attr.aria-expanded]=\"isOpen()\"\r\n [attr.aria-activedescendant]=\"activeOptionId()\"\r\n [attr.aria-invalid]=\"hasError()\"\r\n [attr.aria-describedby]=\"errorId()\"\r\n (input)=\"onInput($event)\"\r\n (keydown)=\"onInputKeydown($event)\"\r\n (focus)=\"onInputFocus()\"\r\n (blur)=\"onInputBlur()\"\r\n />\r\n\r\n <span class=\"gog-autocomplete__actions\">\r\n @if (loading()) {\r\n <gog-spinner class=\"gog-autocomplete__spinner\" size=\"xsm\" ariaLabel=\"Loading\" />\r\n }\r\n\r\n @if (showClear()) {\r\n <button\r\n type=\"button\"\r\n class=\"gog-autocomplete__clear gog-inline-center\"\r\n [attr.aria-label]=\"resolvedClearLabel()\"\r\n (mousedown)=\"onOptionMousedown($event)\"\r\n (click)=\"clearValue($event)\"\r\n >\r\n <gog-icon name=\"close\" />\r\n </button>\r\n }\r\n </span>\r\n\r\n @if (isOpen() && !resolvedAppendToBody()) {\r\n <ng-container [ngTemplateOutlet]=\"panelTpl\" />\r\n }\r\n </div>\r\n\r\n @if (hasError()) {\r\n <span class=\"gog-autocomplete__error\" [attr.id]=\"errorId()\" role=\"alert\">\r\n {{ visibleError() }}\r\n </span>\r\n }\r\n</div>\r\n\r\n<!--\r\n One template for both render modes \u2014 inline, or stamped into <body> by the overlay when\r\n `appendToBody` is set, which is why the portal modifier and the resolved coordinates are\r\n applied conditionally.\r\n-->\r\n<ng-template #panelTpl>\r\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- (click) below is housekeeping stopPropagation; the keyboard contract lives on the combobox input, which keeps focus and drives this list via aria-activedescendant -->\r\n <div\r\n [id]=\"listboxId()\"\r\n class=\"gog-autocomplete__dropdown\"\r\n [class.gog-autocomplete__dropdown--up]=\"\r\n !resolvedAppendToBody() && dropdownDirectionState() === 'up'\r\n \"\r\n [class.gog-autocomplete__dropdown--portal]=\"resolvedAppendToBody()\"\r\n [class]=\"panelSizeClass()\"\r\n [style.top.px]=\"resolvedAppendToBody() ? panelPlacement()?.top : null\"\r\n [style.left.px]=\"resolvedAppendToBody() ? panelPlacement()?.left : null\"\r\n [style.width]=\"resolvedAppendToBody() ? resolvedPanelWidth() : null\"\r\n [style.min-width]=\"resolvedAppendToBody() ? resolvedPanelMinWidth() : null\"\r\n [style.max-height]=\"resolvedAppendToBody() ? resolvedPanelMaxHeight() : null\"\r\n [style.z-index]=\"dropdownZIndex() ?? panelZIndex()\"\r\n role=\"listbox\"\r\n [attr.aria-label]=\"label() || ariaLabel() || null\"\r\n (click)=\"$event.stopPropagation()\"\r\n >\r\n <gog-scroll\r\n size=\"thin\"\r\n [focusable]=\"false\"\r\n overscrollBehavior=\"contain\"\r\n class=\"gog-autocomplete__scroll\"\r\n (gogReachEnd)=\"gogLoadMore.emit()\"\r\n >\r\n @if (visibleOptions().length === 0) {\r\n <p class=\"gog-autocomplete__empty\">{{ emptyMessage() }}</p>\r\n }\r\n\r\n @for (option of visibleOptions(); track valueOf(option); let i = $index) {\r\n <!--\r\n A div, not a button: focus stays in the input, so these rows are never focused and a\r\n button would only add tab stops and a second Enter handler. The highlight is pointed\r\n at with aria-activedescendant instead.\r\n\r\n mousedown is prevented so clicking a row doesn't blur the input first \u2014 that blur\r\n would close the panel and, under forceSelection, wipe the text before the click lands.\r\n -->\r\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- this is the ARIA combobox pattern: the option is deliberately neither focusable nor a keyboard target, because focus stays in the input and the whole keyboard contract (arrows, Enter, Escape) is handled there and communicated through aria-activedescendant. Making these rows focusable would break the pattern rather than improve it. -->\r\n <div\r\n class=\"gog-autocomplete__option\"\r\n role=\"option\"\r\n [id]=\"optionId(i)\"\r\n [attr.aria-selected]=\"isSelected(option)\"\r\n [attr.aria-disabled]=\"isOptionDisabled(option)\"\r\n [class.gog-autocomplete__option--active]=\"i === activeIndex()\"\r\n [class.gog-autocomplete__option--selected]=\"isSelected(option)\"\r\n [class.gog-autocomplete__option--disabled]=\"isOptionDisabled(option)\"\r\n (mousedown)=\"onOptionMousedown($event)\"\r\n (click)=\"onOptionClick(option, $event)\"\r\n >\r\n @if (optionSlot(); as slot) {\r\n <ng-container\r\n [ngTemplateOutlet]=\"slot.templateRef\"\r\n [ngTemplateOutletContext]=\"optionContext(option, isSelected(option))\"\r\n />\r\n } @else {\r\n <span class=\"gog-autocomplete__option-label\">{{ labelOf(option) }}</span>\r\n }\r\n </div>\r\n }\r\n </gog-scroll>\r\n </div>\r\n</ng-template>\r\n", styles: ["@charset \"UTF-8\";:host{display:block}.gog-autocomplete{display:flex;flex-direction:column;gap:var(--gog-autocomplete-gap);width:100%}.gog-autocomplete__label{color:var(--gog-autocomplete-label-color);font-family:var(--gog-autocomplete-label-font-family);font-size:var(--gog-autocomplete-label-font-size);font-weight:var(--gog-autocomplete-label-font-weight);letter-spacing:var(--gog-autocomplete-label-letter-spacing)}.gog-autocomplete__field{position:relative;display:flex;align-items:center;width:100%;min-width:var(--gog-autocomplete-min-width)}.gog-autocomplete__control{box-sizing:border-box;width:100%;min-width:var(--gog-autocomplete-min-width);padding-block:var(--gog-autocomplete-padding-y, var(--gog-autocomplete-size-padding-y, var(--gog-field-md-padding-y)));padding-inline:var(--gog-autocomplete-padding-x, var(--gog-autocomplete-size-padding-x, var(--gog-field-md-padding-x))) var(--gog-autocomplete-actions-reserve);border:var(--gog-autocomplete-border-width) var(--gog-autocomplete-border-style) var(--gog-autocomplete-border-color);border-radius:var(--gog-autocomplete-radius);background-color:var(--gog-autocomplete-bg, var(--gog-autocomplete-field-bg));color:var(--gog-autocomplete-color, var(--gog-autocomplete-text-color));font-family:var(--gog-autocomplete-font-family);font-size:var(--gog-autocomplete-font-size, var(--gog-autocomplete-size-font-size, var(--gog-field-md-font-size)));line-height:var(--gog-autocomplete-line-height);transition:border-color var(--gog-autocomplete-transition-duration) var(--gog-easing),box-shadow var(--gog-autocomplete-transition-duration) var(--gog-easing)}.gog-autocomplete__control::placeholder{color:var(--gog-autocomplete-placeholder-color)}.gog-autocomplete__control:hover:not(:disabled){border-color:var(--gog-autocomplete-hover-border-color)}.gog-autocomplete__control:focus-visible{outline:var(--gog-autocomplete-focus-ring-width) solid var(--gog-autocomplete-focus-ring-color);outline-offset:var(--gog-autocomplete-focus-ring-offset)}.gog-autocomplete__control:disabled{opacity:var(--gog-autocomplete-disabled-opacity);cursor:not-allowed}.gog-autocomplete--error .gog-autocomplete__control,.gog-autocomplete__control[aria-invalid=true]{border-color:var(--gog-autocomplete-error-border-color)}.gog-autocomplete__actions{position:absolute;inset-inline-end:var(--gog-autocomplete-actions-inset);display:inline-flex;align-items:center;flex-direction:row-reverse;gap:var(--gog-autocomplete-actions-gap);pointer-events:none}.gog-autocomplete__actions>*{pointer-events:auto}.gog-autocomplete__clear{padding:0;border:0;background:none;color:var(--gog-autocomplete-clear-color);font-size:calc(var(--gog-icon-size) * var(--gog-autocomplete-clear-icon-ratio));cursor:pointer}.gog-autocomplete__clear:hover{color:var(--gog-autocomplete-clear-hover-color)}.gog-autocomplete__clear:focus-visible{outline:var(--gog-autocomplete-focus-ring-width) solid var(--gog-autocomplete-focus-ring-color);outline-offset:var(--gog-autocomplete-focus-ring-offset)}.gog-autocomplete__spinner{font-size:var(--gog-autocomplete-spinner-size)}.gog-autocomplete__error{color:var(--gog-autocomplete-error-color);font-family:var(--gog-autocomplete-error-font-family);font-size:var(--gog-autocomplete-error-font-size)}.gog-autocomplete__dropdown{position:absolute;inset-inline-start:0;top:calc(100% + var(--gog-autocomplete-panel-gap));z-index:var(--gog-dropdown-z);box-sizing:border-box;display:flex;flex-direction:column;width:max-content;min-width:100%;max-width:var(--gog-autocomplete-panel-max-width);max-height:var(--gog-autocomplete-panel-max-height);padding:var(--gog-autocomplete-options-padding);border:var(--gog-autocomplete-panel-border-width) var(--gog-autocomplete-panel-border-style) var(--gog-autocomplete-panel-border-color);border-radius:var(--gog-autocomplete-panel-radius);background-color:var(--gog-autocomplete-panel-bg);box-shadow:var(--gog-autocomplete-panel-shadow);overflow:hidden}.gog-autocomplete__dropdown--up{top:auto;bottom:calc(100% + var(--gog-autocomplete-panel-gap))}.gog-autocomplete__dropdown--portal{position:fixed;top:0;inset-inline-start:0;min-width:0}.gog-autocomplete__scroll{flex:1;min-height:0}.gog-autocomplete__option{display:flex;align-items:center;gap:var(--gog-autocomplete-option-gap);padding:var(--gog-autocomplete-option-padding);border-radius:var(--gog-autocomplete-option-radius);color:var(--gog-autocomplete-option-color);font-family:var(--gog-autocomplete-font-family);font-size:var(--gog-autocomplete-font-size, var(--gog-autocomplete-size-font-size, var(--gog-field-md-font-size)));cursor:pointer}.gog-autocomplete__option:hover:not([aria-disabled=true]),.gog-autocomplete__option--active{background-color:var(--gog-autocomplete-option-hover-bg);color:var(--gog-autocomplete-option-hover-color)}.gog-autocomplete__option--selected{background-color:var(--gog-autocomplete-option-selected-bg);color:var(--gog-autocomplete-option-selected-color)}.gog-autocomplete__option--disabled{opacity:var(--gog-autocomplete-disabled-opacity);cursor:not-allowed}.gog-autocomplete__option-label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.gog-autocomplete__empty{margin:0;padding:var(--gog-autocomplete-option-padding);color:var(--gog-autocomplete-empty-color);font-family:var(--gog-autocomplete-font-family);font-size:var(--gog-autocomplete-empty-font-size)}.gog-autocomplete--xsm{--gog-autocomplete-size-padding-y: var(--gog-field-xsm-padding-y);--gog-autocomplete-size-padding-x: var(--gog-field-xsm-padding-x);--gog-autocomplete-size-font-size: var(--gog-field-xsm-font-size)}.gog-autocomplete--sm{--gog-autocomplete-size-padding-y: var(--gog-field-sm-padding-y);--gog-autocomplete-size-padding-x: var(--gog-field-sm-padding-x);--gog-autocomplete-size-font-size: var(--gog-field-sm-font-size)}.gog-autocomplete--lg{--gog-autocomplete-size-padding-y: var(--gog-field-lg-padding-y);--gog-autocomplete-size-padding-x: var(--gog-field-lg-padding-x);--gog-autocomplete-size-font-size: var(--gog-field-lg-font-size)}.gog-autocomplete--slg{--gog-autocomplete-size-padding-y: var(--gog-field-slg-padding-y);--gog-autocomplete-size-padding-x: var(--gog-field-slg-padding-x);--gog-autocomplete-size-font-size: var(--gog-field-slg-font-size)}:host(.gog-host--auto-width) .gog-autocomplete,:host(.gog-host--auto-width) .gog-autocomplete__field,:host(.gog-host--auto-width) .gog-autocomplete__control{width:auto}.gog-autocomplete__label--float{position:absolute;inset-inline-start:var(--gog-autocomplete-padding-x, var(--gog-autocomplete-size-padding-x, var(--gog-field-md-padding-x)));top:50%;transform:translateY(-50%);max-width:calc(100% - 2 * var(--gog-autocomplete-padding-x, var(--gog-autocomplete-size-padding-x, var(--gog-field-md-padding-x))));overflow:hidden;text-overflow:ellipsis;white-space:nowrap;pointer-events:none;color:var(--gog-autocomplete-placeholder-color);font-size:var(--gog-autocomplete-size-font-size, var(--gog-field-md-font-size));text-transform:none;letter-spacing:normal;transition:transform var(--gog-autocomplete-transition-duration) var(--gog-easing),font-size var(--gog-autocomplete-transition-duration) var(--gog-easing),color var(--gog-autocomplete-transition-duration) var(--gog-easing),top var(--gog-autocomplete-transition-duration) var(--gog-easing),background-color var(--gog-autocomplete-transition-duration) var(--gog-easing)}.gog-autocomplete--float-in,.gog-autocomplete--float-on{--gog-autocomplete-float-top-padding: calc(var(--gog-autocomplete-padding-y, var(--gog-autocomplete-size-padding-y, var(--gog-field-md-padding-y))) + var(--gog-autocomplete-float-label-reserve))}.gog-autocomplete--float-in .gog-autocomplete__control,.gog-autocomplete--float-on .gog-autocomplete__control{padding-top:var(--gog-autocomplete-float-top-padding)}.gog-autocomplete--float-in .gog-autocomplete__label--float,.gog-autocomplete--float-on .gog-autocomplete__label--float{top:var(--gog-autocomplete-float-top-padding);transform:none}.gog-autocomplete--float-in.gog-autocomplete--floated .gog-autocomplete__label--float{top:var(--gog-autocomplete-float-label-in-top);transform:translateY(0);font-size:var(--gog-autocomplete-label-font-size);color:var(--gog-autocomplete-label-color);text-transform:var(--gog-autocomplete-label-text-transform);letter-spacing:var(--gog-autocomplete-label-letter-spacing)}.gog-autocomplete--float-on.gog-autocomplete--floated .gog-autocomplete__label--float{top:0;transform:translateY(-50%);font-size:var(--gog-autocomplete-label-font-size);color:var(--gog-autocomplete-label-color);text-transform:var(--gog-autocomplete-label-text-transform);letter-spacing:var(--gog-autocomplete-label-letter-spacing);background-color:var(--gog-autocomplete-float-label-on-bg, var(--gog-autocomplete-field-bg));padding:0 4px;inset-inline-start:calc(var(--gog-autocomplete-padding-x, var(--gog-autocomplete-size-padding-x, var(--gog-field-md-padding-x))) - 4px)}.gog-autocomplete--float-over.gog-autocomplete--floated .gog-autocomplete__label--float{top:calc(-1 * var(--gog-autocomplete-float-label-over-gap));transform:translateY(-100%);font-size:var(--gog-autocomplete-label-font-size);color:var(--gog-autocomplete-label-color);text-transform:var(--gog-autocomplete-label-text-transform);letter-spacing:var(--gog-autocomplete-label-letter-spacing)}.gog-autocomplete--float-over .gog-autocomplete__field{margin-top:var(--gog-autocomplete-float-label-over-reserve)}@media(prefers-reduced-motion:reduce){.gog-autocomplete__control{transition:none}}\n"] }]
|
|
3044
|
+
/*
|
|
3045
|
+
* The spinner in the actions slot is `aria-hidden`, so a field fetching its suggestions
|
|
3046
|
+
* looked idle to a screen reader — the one case where the wait is not the user's own doing
|
|
3047
|
+
* and they have no way to tell. Required of every `loading` input; see the loading-state
|
|
3048
|
+
* rule in `api-design.instructions.md`.
|
|
3049
|
+
*/
|
|
3050
|
+
'[attr.aria-busy]': 'loading() ? "true" : null',
|
|
3051
|
+
}, template: "<!--\r\n Deliberately not `gog-contained-layout`: `contain: layout` makes this element a stacking\r\n context, which traps the panel's z-index inside it and lets whatever follows on the page\r\n paint over the open dropdown.\r\n-->\r\n<div\r\n class=\"gog-autocomplete\"\r\n [class]=\"sizeClass()\"\r\n [class.gog-autocomplete--clearable]=\"showClear()\"\r\n [class.gog-autocomplete--disabled]=\"isDisabled()\"\r\n [class.gog-autocomplete--open]=\"isOpen()\"\r\n [class.gog-autocomplete--loading]=\"loading()\"\r\n [class.gog-autocomplete--float-in]=\"resolvedFloatLabel() === 'in'\"\r\n [class.gog-autocomplete--float-on]=\"resolvedFloatLabel() === 'on'\"\r\n [class.gog-autocomplete--float-over]=\"resolvedFloatLabel() === 'over'\"\r\n [class.gog-autocomplete--floated]=\"isFloatLabelFloated()\"\r\n>\r\n @if (label() && resolvedFloatLabel() === 'none') {\r\n <label class=\"gog-autocomplete__label\" [for]=\"triggerId()\">{{ label() }}</label>\r\n }\r\n\r\n <div class=\"gog-autocomplete__field\">\r\n @if (label() && isFloatLabelActive()) {\r\n <label class=\"gog-autocomplete__label gog-autocomplete__label--float\" [for]=\"triggerId()\">{{\r\n label()\r\n }}</label>\r\n }\r\n\r\n <!--\r\n The input *is* the combobox \u2014 role, aria-autocomplete and aria-activedescendant all sit\r\n here, and DOM focus never leaves it. That is the difference from gog-select, where the\r\n trigger is a button and focus moves onto the option itself.\r\n -->\r\n <input\r\n type=\"text\"\r\n class=\"gog-autocomplete__control\"\r\n autocomplete=\"off\"\r\n role=\"combobox\"\r\n aria-autocomplete=\"list\"\r\n [id]=\"triggerId()\"\r\n [disabled]=\"isDisabled()\"\r\n [value]=\"query()\"\r\n [placeholder]=\"effectivePlaceholder()\"\r\n [attr.aria-label]=\"label() ? null : ariaLabel() || placeholder() || null\"\r\n [attr.aria-controls]=\"listboxId()\"\r\n [attr.aria-expanded]=\"isOpen()\"\r\n [attr.aria-activedescendant]=\"activeOptionId()\"\r\n [attr.aria-invalid]=\"hasError()\"\r\n [attr.aria-describedby]=\"errorId()\"\r\n (input)=\"onInput($event)\"\r\n (keydown)=\"onInputKeydown($event)\"\r\n (focus)=\"onInputFocus()\"\r\n (blur)=\"onInputBlur()\"\r\n />\r\n\r\n <span class=\"gog-autocomplete__actions\">\r\n @if (loading()) {\r\n <gog-spinner class=\"gog-autocomplete__spinner\" size=\"xsm\" ariaLabel=\"Loading\" />\r\n }\r\n\r\n @if (showClear()) {\r\n <button\r\n type=\"button\"\r\n class=\"gog-autocomplete__clear gog-inline-center\"\r\n [attr.aria-label]=\"resolvedClearLabel()\"\r\n (mousedown)=\"onOptionMousedown($event)\"\r\n (click)=\"clearValue($event)\"\r\n >\r\n <gog-icon name=\"close\" />\r\n </button>\r\n }\r\n </span>\r\n\r\n @if (isOpen() && !resolvedAppendToBody()) {\r\n <ng-container [ngTemplateOutlet]=\"panelTpl\" />\r\n }\r\n </div>\r\n\r\n @if (hasError()) {\r\n <span class=\"gog-autocomplete__error\" [attr.id]=\"errorId()\" role=\"alert\">\r\n {{ visibleError() }}\r\n </span>\r\n }\r\n</div>\r\n\r\n<!--\r\n One template for both render modes \u2014 inline, or stamped into <body> by the overlay when\r\n `appendToBody` is set, which is why the portal modifier and the resolved coordinates are\r\n applied conditionally.\r\n-->\r\n<ng-template #panelTpl>\r\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- (click) below is housekeeping stopPropagation; the keyboard contract lives on the combobox input, which keeps focus and drives this list via aria-activedescendant -->\r\n <div\r\n [id]=\"listboxId()\"\r\n class=\"gog-autocomplete__dropdown\"\r\n [class.gog-autocomplete__dropdown--up]=\"\r\n !resolvedAppendToBody() && dropdownDirectionState() === 'up'\r\n \"\r\n [class.gog-autocomplete__dropdown--portal]=\"resolvedAppendToBody()\"\r\n [class]=\"panelSizeClass()\"\r\n [style.top.px]=\"resolvedAppendToBody() ? panelPlacement()?.top : null\"\r\n [style.left.px]=\"resolvedAppendToBody() ? panelPlacement()?.left : null\"\r\n [style.width]=\"resolvedAppendToBody() ? resolvedPanelWidth() : null\"\r\n [style.min-width]=\"resolvedAppendToBody() ? resolvedPanelMinWidth() : null\"\r\n [style.max-height]=\"resolvedAppendToBody() ? resolvedPanelMaxHeight() : null\"\r\n [style.z-index]=\"dropdownZIndex() ?? panelZIndex()\"\r\n role=\"listbox\"\r\n [attr.aria-label]=\"label() || ariaLabel() || null\"\r\n (click)=\"$event.stopPropagation()\"\r\n >\r\n <gog-scroll\r\n size=\"thin\"\r\n [focusable]=\"false\"\r\n overscrollBehavior=\"contain\"\r\n class=\"gog-autocomplete__scroll\"\r\n (gogReachEnd)=\"gogLoadMore.emit()\"\r\n >\r\n @if (visibleOptions().length === 0) {\r\n <p class=\"gog-autocomplete__empty\">{{ emptyMessage() }}</p>\r\n }\r\n\r\n @for (option of visibleOptions(); track valueOf(option); let i = $index) {\r\n <!--\r\n A div, not a button: focus stays in the input, so these rows are never focused and a\r\n button would only add tab stops and a second Enter handler. The highlight is pointed\r\n at with aria-activedescendant instead.\r\n\r\n mousedown is prevented so clicking a row doesn't blur the input first \u2014 that blur\r\n would close the panel and, under forceSelection, wipe the text before the click lands.\r\n -->\r\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- this is the ARIA combobox pattern: the option is deliberately neither focusable nor a keyboard target, because focus stays in the input and the whole keyboard contract (arrows, Enter, Escape) is handled there and communicated through aria-activedescendant. Making these rows focusable would break the pattern rather than improve it. -->\r\n <div\r\n class=\"gog-autocomplete__option\"\r\n role=\"option\"\r\n [id]=\"optionId(i)\"\r\n [attr.aria-selected]=\"isSelected(option)\"\r\n [attr.aria-disabled]=\"isOptionDisabled(option)\"\r\n [class.gog-autocomplete__option--active]=\"i === activeIndex()\"\r\n [class.gog-autocomplete__option--selected]=\"isSelected(option)\"\r\n [class.gog-autocomplete__option--disabled]=\"isOptionDisabled(option)\"\r\n gogRipple\r\n [rippleDisabled]=\"!rippleEnabled()\"\r\n (mousedown)=\"onOptionMousedown($event)\"\r\n (click)=\"onOptionClick(option, $event)\"\r\n >\r\n @if (optionSlot(); as slot) {\r\n <ng-container\r\n [ngTemplateOutlet]=\"slot.templateRef\"\r\n [ngTemplateOutletContext]=\"optionContext(option, isSelected(option))\"\r\n />\r\n } @else {\r\n <span class=\"gog-autocomplete__option-label\">{{ labelOf(option) }}</span>\r\n }\r\n </div>\r\n }\r\n </gog-scroll>\r\n </div>\r\n</ng-template>\r\n", styles: ["@charset \"UTF-8\";:host{display:block}.gog-autocomplete{display:flex;flex-direction:column;gap:var(--gog-autocomplete-gap);width:100%}.gog-autocomplete__label{color:var(--gog-autocomplete-label-color);font-family:var(--gog-autocomplete-label-font-family);font-size:var(--gog-autocomplete-label-font-size);font-weight:var(--gog-autocomplete-label-font-weight);letter-spacing:var(--gog-autocomplete-label-letter-spacing)}.gog-autocomplete__field{position:relative;display:flex;align-items:center;width:100%;min-width:var(--gog-autocomplete-min-width)}.gog-autocomplete__control{box-sizing:border-box;width:100%;min-width:var(--gog-autocomplete-min-width);padding-block:var(--gog-autocomplete-padding-y, var(--gog-autocomplete-size-padding-y, var(--gog-field-md-padding-y)));padding-inline:var(--gog-autocomplete-padding-x, var(--gog-autocomplete-size-padding-x, var(--gog-field-md-padding-x))) var(--gog-autocomplete-actions-reserve);border:var(--gog-autocomplete-border-width) var(--gog-autocomplete-border-style) var(--gog-autocomplete-border-color);border-radius:var(--gog-autocomplete-radius);background-color:var(--gog-autocomplete-bg, var(--gog-autocomplete-field-bg));color:var(--gog-autocomplete-color, var(--gog-autocomplete-text-color));font-family:var(--gog-autocomplete-font-family);font-size:var(--gog-autocomplete-font-size, var(--gog-autocomplete-size-font-size, var(--gog-field-md-font-size)));line-height:var(--gog-autocomplete-line-height);transition:border-color var(--gog-autocomplete-transition-duration) var(--gog-easing),box-shadow var(--gog-autocomplete-transition-duration) var(--gog-easing)}.gog-autocomplete__control::placeholder{color:var(--gog-autocomplete-placeholder-color)}.gog-autocomplete__control:hover:not(:disabled){border-color:var(--gog-autocomplete-hover-border-color)}.gog-autocomplete__control:focus-visible{outline:var(--gog-autocomplete-focus-ring-width) solid var(--gog-autocomplete-focus-ring-color);outline-offset:var(--gog-autocomplete-focus-ring-offset)}.gog-autocomplete__control:disabled{opacity:var(--gog-autocomplete-disabled-opacity);cursor:not-allowed}.gog-autocomplete--error .gog-autocomplete__control,.gog-autocomplete__control[aria-invalid=true]{border-color:var(--gog-autocomplete-error-border-color)}.gog-autocomplete__actions{position:absolute;inset-inline-end:var(--gog-autocomplete-actions-inset);display:inline-flex;align-items:center;flex-direction:row-reverse;gap:var(--gog-autocomplete-actions-gap);pointer-events:none}.gog-autocomplete__actions>*{pointer-events:auto}.gog-autocomplete__clear{padding:0;border:0;background:none;color:var(--gog-autocomplete-clear-color);font-size:calc(var(--gog-icon-size) * var(--gog-autocomplete-clear-icon-ratio));cursor:pointer}.gog-autocomplete__clear:hover{color:var(--gog-autocomplete-clear-hover-color)}.gog-autocomplete__clear:focus-visible{outline:var(--gog-autocomplete-focus-ring-width) solid var(--gog-autocomplete-focus-ring-color);outline-offset:var(--gog-autocomplete-focus-ring-offset)}.gog-autocomplete__spinner{font-size:var(--gog-autocomplete-spinner-size)}.gog-autocomplete__error{color:var(--gog-autocomplete-error-color);font-family:var(--gog-autocomplete-error-font-family);font-size:var(--gog-autocomplete-error-font-size)}.gog-autocomplete__dropdown{position:absolute;inset-inline-start:0;top:calc(100% + var(--gog-autocomplete-panel-gap));z-index:var(--gog-dropdown-z);box-sizing:border-box;display:flex;flex-direction:column;width:max-content;min-width:100%;max-width:var(--gog-autocomplete-panel-max-width);max-height:var(--gog-autocomplete-panel-max-height);padding:var(--gog-autocomplete-options-padding);border:var(--gog-autocomplete-panel-border-width) var(--gog-autocomplete-panel-border-style) var(--gog-autocomplete-panel-border-color);border-radius:var(--gog-autocomplete-panel-radius);background-color:var(--gog-autocomplete-panel-bg);box-shadow:var(--gog-autocomplete-panel-shadow);overflow:hidden}.gog-autocomplete__dropdown--up{top:auto;bottom:calc(100% + var(--gog-autocomplete-panel-gap))}.gog-autocomplete__dropdown--portal{position:fixed;top:0;inset-inline-start:0;min-width:0}.gog-autocomplete__scroll{flex:1;min-height:0}.gog-autocomplete__option{display:flex;align-items:center;gap:var(--gog-autocomplete-option-gap);padding:var(--gog-autocomplete-option-padding);border-radius:var(--gog-autocomplete-option-radius);color:var(--gog-autocomplete-option-color);font-family:var(--gog-autocomplete-font-family);font-size:var(--gog-autocomplete-font-size, var(--gog-autocomplete-size-font-size, var(--gog-field-md-font-size)));cursor:pointer}.gog-autocomplete__option:hover:not([aria-disabled=true]),.gog-autocomplete__option--active{background-color:var(--gog-autocomplete-option-hover-bg);color:var(--gog-autocomplete-option-hover-color)}.gog-autocomplete__option--selected{background-color:var(--gog-autocomplete-option-selected-bg);color:var(--gog-autocomplete-option-selected-color)}.gog-autocomplete__option--disabled{opacity:var(--gog-autocomplete-disabled-opacity);cursor:not-allowed}.gog-autocomplete__option-label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.gog-autocomplete__empty{margin:0;padding:var(--gog-autocomplete-option-padding);color:var(--gog-autocomplete-empty-color);font-family:var(--gog-autocomplete-font-family);font-size:var(--gog-autocomplete-empty-font-size)}.gog-autocomplete--xsm{--gog-autocomplete-size-padding-y: var(--gog-field-xsm-padding-y);--gog-autocomplete-size-padding-x: var(--gog-field-xsm-padding-x);--gog-autocomplete-size-font-size: var(--gog-field-xsm-font-size)}.gog-autocomplete--sm{--gog-autocomplete-size-padding-y: var(--gog-field-sm-padding-y);--gog-autocomplete-size-padding-x: var(--gog-field-sm-padding-x);--gog-autocomplete-size-font-size: var(--gog-field-sm-font-size)}.gog-autocomplete--lg{--gog-autocomplete-size-padding-y: var(--gog-field-lg-padding-y);--gog-autocomplete-size-padding-x: var(--gog-field-lg-padding-x);--gog-autocomplete-size-font-size: var(--gog-field-lg-font-size)}.gog-autocomplete--slg{--gog-autocomplete-size-padding-y: var(--gog-field-slg-padding-y);--gog-autocomplete-size-padding-x: var(--gog-field-slg-padding-x);--gog-autocomplete-size-font-size: var(--gog-field-slg-font-size)}:host(.gog-host--auto-width) .gog-autocomplete,:host(.gog-host--auto-width) .gog-autocomplete__field,:host(.gog-host--auto-width) .gog-autocomplete__control{width:auto}.gog-autocomplete__label--float{position:absolute;inset-inline-start:var(--gog-autocomplete-padding-x, var(--gog-autocomplete-size-padding-x, var(--gog-field-md-padding-x)));top:50%;transform:translateY(-50%);max-width:calc(100% - 2 * var(--gog-autocomplete-padding-x, var(--gog-autocomplete-size-padding-x, var(--gog-field-md-padding-x))));overflow:hidden;text-overflow:ellipsis;white-space:nowrap;pointer-events:none;color:var(--gog-autocomplete-placeholder-color);font-size:var(--gog-autocomplete-size-font-size, var(--gog-field-md-font-size));text-transform:none;letter-spacing:normal;transition:transform var(--gog-autocomplete-transition-duration) var(--gog-easing),font-size var(--gog-autocomplete-transition-duration) var(--gog-easing),color var(--gog-autocomplete-transition-duration) var(--gog-easing),top var(--gog-autocomplete-transition-duration) var(--gog-easing),background-color var(--gog-autocomplete-transition-duration) var(--gog-easing)}.gog-autocomplete--float-in,.gog-autocomplete--float-on{--gog-autocomplete-float-top-padding: calc(var(--gog-autocomplete-padding-y, var(--gog-autocomplete-size-padding-y, var(--gog-field-md-padding-y))) + var(--gog-autocomplete-float-label-reserve))}.gog-autocomplete--float-in .gog-autocomplete__control,.gog-autocomplete--float-on .gog-autocomplete__control{padding-top:var(--gog-autocomplete-float-top-padding)}.gog-autocomplete--float-in .gog-autocomplete__label--float,.gog-autocomplete--float-on .gog-autocomplete__label--float{top:var(--gog-autocomplete-float-top-padding);transform:none}.gog-autocomplete--float-in.gog-autocomplete--floated .gog-autocomplete__label--float{top:var(--gog-autocomplete-float-label-in-top);transform:translateY(0);font-size:var(--gog-autocomplete-label-font-size);color:var(--gog-autocomplete-label-color);text-transform:var(--gog-autocomplete-label-text-transform);letter-spacing:var(--gog-autocomplete-label-letter-spacing)}.gog-autocomplete--float-on.gog-autocomplete--floated .gog-autocomplete__label--float{top:0;transform:translateY(-50%);font-size:var(--gog-autocomplete-label-font-size);color:var(--gog-autocomplete-label-color);text-transform:var(--gog-autocomplete-label-text-transform);letter-spacing:var(--gog-autocomplete-label-letter-spacing);background-color:var(--gog-autocomplete-float-label-on-bg, var(--gog-autocomplete-field-bg));padding:0 4px;inset-inline-start:calc(var(--gog-autocomplete-padding-x, var(--gog-autocomplete-size-padding-x, var(--gog-field-md-padding-x))) - 4px)}.gog-autocomplete--float-over.gog-autocomplete--floated .gog-autocomplete__label--float{top:calc(-1 * var(--gog-autocomplete-float-label-over-gap));transform:translateY(-100%);font-size:var(--gog-autocomplete-label-font-size);color:var(--gog-autocomplete-label-color);text-transform:var(--gog-autocomplete-label-text-transform);letter-spacing:var(--gog-autocomplete-label-letter-spacing)}.gog-autocomplete--float-over .gog-autocomplete__field{margin-top:var(--gog-autocomplete-float-label-over-reserve)}@media(prefers-reduced-motion:reduce){.gog-autocomplete__control{transition:none}}\n"] }]
|
|
2627
3052
|
}], ctorParameters: () => [], propDecorators: { inputId: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputId", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], filterLocal: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterLocal", required: false }] }], minLength: [{ type: i0.Input, args: [{ isSignal: true, alias: "minLength", required: false }] }], openOnFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "openOnFocus", required: false }] }], searchDebounce: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchDebounce", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], emptyMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyMessage", required: false }] }], forceSelection: [{ type: i0.Input, args: [{ isSignal: true, alias: "forceSelection", required: false }] }], gogSearch: [{ type: i0.Output, args: ["gogSearch"] }], gogLoadMore: [{ type: i0.Output, args: ["gogLoadMore"] }], panelTemplate: [{ type: i0.ViewChild, args: ['panelTpl', { isSignal: true }] }] } });
|
|
2628
3053
|
|
|
2629
3054
|
/** Beyond this count the badge renders `N+` rather than growing without limit. */
|
|
@@ -2632,7 +3057,7 @@ const DEFAULT_MAX = 99;
|
|
|
2632
3057
|
* A count or status dot pinned to the corner of another element.
|
|
2633
3058
|
*
|
|
2634
3059
|
* ```html
|
|
2635
|
-
* <gog-button gogBadge="12" badgeAriaLabel="12
|
|
3060
|
+
* <gog-button gogBadge="12" badgeAriaLabel="12 unread">Inbox</gog-button>
|
|
2636
3061
|
* <gog-icon name="info" gogBadge badgeDot />
|
|
2637
3062
|
* ```
|
|
2638
3063
|
*
|
|
@@ -2658,9 +3083,9 @@ class GogBadgeDirective {
|
|
|
2658
3083
|
* What assistive tech should hear instead of the bare number.
|
|
2659
3084
|
*
|
|
2660
3085
|
* Left empty, the badge text is announced inline with the host's own label, which reads as
|
|
2661
|
-
* "
|
|
3086
|
+
* "Inbox 12" — acceptable, and what Material does. Set this and the visible badge becomes
|
|
2662
3087
|
* `aria-hidden` while this wording is announced in its place, so the host reads as
|
|
2663
|
-
* "
|
|
3088
|
+
* "Inbox, 12 unread" instead.
|
|
2664
3089
|
*/
|
|
2665
3090
|
badgeAriaLabel = input('', ...(ngDevMode ? [{ debugName: "badgeAriaLabel" }] : /* istanbul ignore next */ []));
|
|
2666
3091
|
hostRef = inject((ElementRef));
|
|
@@ -2823,6 +3248,11 @@ class ButtonToggleGroupComponent {
|
|
|
2823
3248
|
multiple = input(false, ...(ngDevMode ? [{ debugName: "multiple" }] : /* istanbul ignore next */ []));
|
|
2824
3249
|
appearance = input('joined', ...(ngDevMode ? [{ debugName: "appearance" }] : /* istanbul ignore next */ []));
|
|
2825
3250
|
orientation = input('horizontal', ...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
|
|
3251
|
+
/**
|
|
3252
|
+
* Press ripple. Unset, falls back to `GOG_CONFIG.ripple.enabled`, then to `false` — so
|
|
3253
|
+
* `[ripple]="false"` opts one instance out of an app that turned it on everywhere.
|
|
3254
|
+
*/
|
|
3255
|
+
ripple = input(undefined, ...(ngDevMode ? [{ debugName: "ripple" }] : /* istanbul ignore next */ []));
|
|
2826
3256
|
/** Unset, falls back to `GOG_CONFIG.control.size`, then to `'md'`. */
|
|
2827
3257
|
size = input(undefined, ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
2828
3258
|
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
@@ -2838,6 +3268,7 @@ class ButtonToggleGroupComponent {
|
|
|
2838
3268
|
ngControl = inject(NgControl, { optional: true, self: true });
|
|
2839
3269
|
cvaDisabled = signal(false, ...(ngDevMode ? [{ debugName: "cvaDisabled" }] : /* istanbul ignore next */ []));
|
|
2840
3270
|
globalConfig = inject(GOG_CONFIG);
|
|
3271
|
+
rippleEnabled = resolveRipple(this.ripple, this.globalConfig);
|
|
2841
3272
|
/** Instance input → `GOG_CONFIG` → the component's own default. See `resolveConfigured`. */
|
|
2842
3273
|
resolvedSize = computed(() => resolveConfigured(this.size(), this.globalConfig.control?.size, DEFAULT_SIZE$6), ...(ngDevMode ? [{ debugName: "resolvedSize" }] : /* istanbul ignore next */ []));
|
|
2843
3274
|
isDisabled = computed(() => this.disabled() || this.cvaDisabled(), ...(ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []));
|
|
@@ -2964,18 +3395,18 @@ class ButtonToggleGroupComponent {
|
|
|
2964
3395
|
this.onTouched();
|
|
2965
3396
|
}
|
|
2966
3397
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: ButtonToggleGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2967
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: ButtonToggleGroupComponent, isStandalone: true, selector: "gog-button-toggle-group", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, optionLabel: { classPropertyName: "optionLabel", publicName: "optionLabel", isSignal: true, isRequired: false, transformFunction: null }, optionValue: { classPropertyName: "optionValue", publicName: "optionValue", isSignal: true, isRequired: false, transformFunction: null }, optionDisabled: { classPropertyName: "optionDisabled", publicName: "optionDisabled", isSignal: true, isRequired: false, transformFunction: null }, optionIcon: { classPropertyName: "optionIcon", publicName: "optionIcon", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, fullWidth: { classPropertyName: "fullWidth", publicName: "fullWidth", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, host: { properties: { "class": "hostClasses()", "attr.role": "multiple() ? \"group\" : \"radiogroup\"", "attr.aria-label": "ariaLabel() || null", "attr.aria-orientation": "orientation()", "attr.aria-disabled": "isDisabled() ? \"true\" : null" } }, queries: [{ propertyName: "optionSlot", first: true, predicate: GogButtonToggleOptionDirective, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "buttonRefs", predicate: ["toggleButton"], descendants: true, isSignal: true }], ngImport: i0, template: "@for (option of options(); track $index) {\n <button\n #toggleButton\n type=\"button\"\n class=\"gog-button-toggle__button\"\n [class.gog-button-toggle__button--selected]=\"isSelected(option)\"\n [attr.role]=\"multiple() ? null : 'radio'\"\n [attr.aria-checked]=\"multiple() ? null : isSelected(option)\"\n [attr.aria-pressed]=\"multiple() ? isSelected(option) : null\"\n [attr.aria-disabled]=\"isOptionDisabled(option) ? 'true' : null\"\n [disabled]=\"isOptionDisabled(option)\"\n [tabindex]=\"$index === tabStopIndex() ? 0 : -1\"\n (click)=\"onOptionClick(option)\"\n (keydown)=\"onKeydown($event)\"\n (blur)=\"onBlur()\"\n >\n @if (optionSlot(); as slot) {\n <ng-container\n [ngTemplateOutlet]=\"slot.templateRef\"\n [ngTemplateOutletContext]=\"optionContext(option)\"\n />\n } @else {\n @if (iconOf(option); as icon) {\n <gog-icon class=\"gog-button-toggle__icon\" [name]=\"icon\" [ariaHidden]=\"true\" />\n }\n <span class=\"gog-button-toggle__label\">{{ labelOf(option) }}</span>\n }\n </button>\n}\n", styles: ["@charset \"UTF-8\";:host{display:inline-flex;box-sizing:border-box;max-width:100%}.gog-button-toggle__button{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;gap:var(--gog-button-toggle-gap);padding:var(--gog-button-toggle-padding, var(--gog-button-toggle-size-padding, var(--gog-button-md-padding)));border:var(--gog-button-toggle-border-width) var(--gog-button-toggle-border-style) var(--gog-button-toggle-border-color);background-color:var(--gog-button-toggle-bg, var(--gog-button-toggle-rest-bg));color:var(--gog-button-toggle-color, var(--gog-button-toggle-rest-color));font-family:var(--gog-button-toggle-font-family);font-size:var(--gog-button-toggle-font-size, var(--gog-button-toggle-size-font-size, var(--gog-button-md-font-size)));font-weight:var(--gog-button-toggle-font-weight);letter-spacing:var(--gog-button-toggle-letter-spacing);line-height:var(--gog-button-toggle-line-height);text-transform:var(--gog-button-toggle-text-transform);cursor:pointer;white-space:nowrap;transition:background-color var(--gog-button-toggle-transition-duration) var(--gog-easing),border-color var(--gog-button-toggle-transition-duration) var(--gog-easing),color var(--gog-button-toggle-transition-duration) var(--gog-easing)}.gog-button-toggle__button:hover:not(:disabled):not(.gog-button-toggle__button--selected){background-color:var(--gog-button-toggle-hover-bg);color:var(--gog-button-toggle-hover-color)}.gog-button-toggle__button--selected{border-color:var(--gog-button-toggle-selected-border-color);background-color:var(--gog-button-toggle-selected-bg);color:var(--gog-button-toggle-selected-color)}.gog-button-toggle__button:disabled{opacity:var(--gog-button-toggle-disabled-opacity);cursor:not-allowed}.gog-button-toggle__button:focus-visible{outline:var(--gog-button-toggle-focus-ring-width) solid var(--gog-button-toggle-focus-ring-color);outline-offset:var(--gog-button-toggle-focus-ring-offset);z-index:1}.gog-button-toggle__icon{flex-shrink:0;font-size:var(--gog-button-toggle-icon-size)}.gog-button-toggle__label{min-width:0;overflow:hidden;text-overflow:ellipsis}:host(.gog-button-toggle--joined.gog-button-toggle--horizontal) .gog-button-toggle__button{border-radius:0}:host(.gog-button-toggle--joined.gog-button-toggle--horizontal) .gog-button-toggle__button:not(:first-of-type){margin-inline-start:calc(-1 * var(--gog-button-toggle-border-width))}:host(.gog-button-toggle--joined.gog-button-toggle--horizontal) .gog-button-toggle__button:first-of-type{border-start-start-radius:var(--gog-button-toggle-radius);border-end-start-radius:var(--gog-button-toggle-radius)}:host(.gog-button-toggle--joined.gog-button-toggle--horizontal) .gog-button-toggle__button:last-of-type{border-start-end-radius:var(--gog-button-toggle-radius);border-end-end-radius:var(--gog-button-toggle-radius)}:host(.gog-button-toggle--joined.gog-button-toggle--vertical) .gog-button-toggle__button{border-radius:0}:host(.gog-button-toggle--joined.gog-button-toggle--vertical) .gog-button-toggle__button:not(:first-of-type){margin-block-start:calc(-1 * var(--gog-button-toggle-border-width))}:host(.gog-button-toggle--joined.gog-button-toggle--vertical) .gog-button-toggle__button:first-of-type{border-start-start-radius:var(--gog-button-toggle-radius);border-start-end-radius:var(--gog-button-toggle-radius)}:host(.gog-button-toggle--joined.gog-button-toggle--vertical) .gog-button-toggle__button:last-of-type{border-end-start-radius:var(--gog-button-toggle-radius);border-end-end-radius:var(--gog-button-toggle-radius)}:host(.gog-button-toggle--joined) .gog-button-toggle__button--selected{z-index:1}:host(.gog-button-toggle--separated){gap:var(--gog-button-toggle-separated-gap)}:host(.gog-button-toggle--separated) .gog-button-toggle__button{border-radius:var(--gog-button-toggle-radius)}:host(.gog-button-toggle--horizontal){flex-direction:row}:host(.gog-button-toggle--vertical){flex-direction:column}:host(.gog-button-toggle--xsm){--gog-button-toggle-size-padding: var(--gog-button-xsm-padding);--gog-button-toggle-size-font-size: var(--gog-button-xsm-font-size)}:host(.gog-button-toggle--sm){--gog-button-toggle-size-padding: var(--gog-button-sm-padding);--gog-button-toggle-size-font-size: var(--gog-button-sm-font-size)}:host(.gog-button-toggle--md){--gog-button-toggle-size-padding: var(--gog-button-md-padding);--gog-button-toggle-size-font-size: var(--gog-button-md-font-size)}:host(.gog-button-toggle--lg){--gog-button-toggle-size-padding: var(--gog-button-lg-padding);--gog-button-toggle-size-font-size: var(--gog-button-lg-font-size)}:host(.gog-button-toggle--slg){--gog-button-toggle-size-padding: var(--gog-button-slg-padding);--gog-button-toggle-size-font-size: var(--gog-button-slg-font-size)}:host(.gog-host--full-width){display:flex;width:100%}:host(.gog-host--full-width) .gog-button-toggle__button{flex:1 1 0}@media(prefers-reduced-motion:reduce){.gog-button-toggle__button{transition:none}}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "gog-icon", inputs: ["name", "template", "title", "ariaHidden"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3398
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: ButtonToggleGroupComponent, isStandalone: true, selector: "gog-button-toggle-group", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, optionLabel: { classPropertyName: "optionLabel", publicName: "optionLabel", isSignal: true, isRequired: false, transformFunction: null }, optionValue: { classPropertyName: "optionValue", publicName: "optionValue", isSignal: true, isRequired: false, transformFunction: null }, optionDisabled: { classPropertyName: "optionDisabled", publicName: "optionDisabled", isSignal: true, isRequired: false, transformFunction: null }, optionIcon: { classPropertyName: "optionIcon", publicName: "optionIcon", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, ripple: { classPropertyName: "ripple", publicName: "ripple", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, fullWidth: { classPropertyName: "fullWidth", publicName: "fullWidth", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, host: { properties: { "class": "hostClasses()", "attr.role": "multiple() ? \"group\" : \"radiogroup\"", "attr.aria-label": "ariaLabel() || null", "attr.aria-orientation": "orientation()", "attr.aria-disabled": "isDisabled() ? \"true\" : null" } }, queries: [{ propertyName: "optionSlot", first: true, predicate: GogButtonToggleOptionDirective, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "buttonRefs", predicate: ["toggleButton"], descendants: true, isSignal: true }], ngImport: i0, template: "@for (option of options(); track $index) {\r\n <button\r\n #toggleButton\r\n type=\"button\"\r\n class=\"gog-button-toggle__button\"\r\n [class.gog-button-toggle__button--selected]=\"isSelected(option)\"\r\n [attr.role]=\"multiple() ? null : 'radio'\"\r\n [attr.aria-checked]=\"multiple() ? null : isSelected(option)\"\r\n [attr.aria-pressed]=\"multiple() ? isSelected(option) : null\"\r\n [attr.aria-disabled]=\"isOptionDisabled(option) ? 'true' : null\"\r\n [disabled]=\"isOptionDisabled(option)\"\r\n [tabindex]=\"$index === tabStopIndex() ? 0 : -1\"\r\n (click)=\"onOptionClick(option)\"\r\n (keydown)=\"onKeydown($event)\"\r\n (blur)=\"onBlur()\"\r\n gogRipple\r\n [rippleDisabled]=\"!rippleEnabled()\"\r\n >\r\n @if (optionSlot(); as slot) {\r\n <ng-container\r\n [ngTemplateOutlet]=\"slot.templateRef\"\r\n [ngTemplateOutletContext]=\"optionContext(option)\"\r\n />\r\n } @else {\r\n @if (iconOf(option); as icon) {\r\n <gog-icon class=\"gog-button-toggle__icon\" [name]=\"icon\" [ariaHidden]=\"true\" />\r\n }\r\n <span class=\"gog-button-toggle__label\">{{ labelOf(option) }}</span>\r\n }\r\n </button>\r\n}\r\n", styles: ["@charset \"UTF-8\";:host{display:inline-flex;box-sizing:border-box;max-width:100%}.gog-button-toggle__button{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;gap:var(--gog-button-toggle-gap);padding:var(--gog-button-toggle-padding, var(--gog-button-toggle-size-padding, var(--gog-button-md-padding)));border:var(--gog-button-toggle-border-width) var(--gog-button-toggle-border-style) var(--gog-button-toggle-border-color);background-color:var(--gog-button-toggle-bg, var(--gog-button-toggle-rest-bg));color:var(--gog-button-toggle-color, var(--gog-button-toggle-rest-color));font-family:var(--gog-button-toggle-font-family);font-size:var(--gog-button-toggle-font-size, var(--gog-button-toggle-size-font-size, var(--gog-button-md-font-size)));font-weight:var(--gog-button-toggle-font-weight);letter-spacing:var(--gog-button-toggle-letter-spacing);line-height:var(--gog-button-toggle-line-height);text-transform:var(--gog-button-toggle-text-transform);cursor:pointer;white-space:nowrap;transition:background-color var(--gog-button-toggle-transition-duration) var(--gog-easing),border-color var(--gog-button-toggle-transition-duration) var(--gog-easing),color var(--gog-button-toggle-transition-duration) var(--gog-easing)}.gog-button-toggle__button:hover:not(:disabled):not(.gog-button-toggle__button--selected){background-color:var(--gog-button-toggle-hover-bg);color:var(--gog-button-toggle-hover-color)}.gog-button-toggle__button--selected{border-color:var(--gog-button-toggle-selected-border-color);background-color:var(--gog-button-toggle-selected-bg);color:var(--gog-button-toggle-selected-color)}.gog-button-toggle__button:disabled{opacity:var(--gog-button-toggle-disabled-opacity);cursor:not-allowed}.gog-button-toggle__button:focus-visible{outline:var(--gog-button-toggle-focus-ring-width) solid var(--gog-button-toggle-focus-ring-color);outline-offset:var(--gog-button-toggle-focus-ring-offset);z-index:1}.gog-button-toggle__icon{flex-shrink:0;font-size:var(--gog-button-toggle-icon-size)}.gog-button-toggle__label{min-width:0;overflow:hidden;text-overflow:ellipsis}:host(.gog-button-toggle--joined.gog-button-toggle--horizontal) .gog-button-toggle__button{border-radius:0}:host(.gog-button-toggle--joined.gog-button-toggle--horizontal) .gog-button-toggle__button:not(:first-of-type){margin-inline-start:calc(-1 * var(--gog-button-toggle-border-width))}:host(.gog-button-toggle--joined.gog-button-toggle--horizontal) .gog-button-toggle__button:first-of-type{border-start-start-radius:var(--gog-button-toggle-radius);border-end-start-radius:var(--gog-button-toggle-radius)}:host(.gog-button-toggle--joined.gog-button-toggle--horizontal) .gog-button-toggle__button:last-of-type{border-start-end-radius:var(--gog-button-toggle-radius);border-end-end-radius:var(--gog-button-toggle-radius)}:host(.gog-button-toggle--joined.gog-button-toggle--vertical) .gog-button-toggle__button{border-radius:0}:host(.gog-button-toggle--joined.gog-button-toggle--vertical) .gog-button-toggle__button:not(:first-of-type){margin-block-start:calc(-1 * var(--gog-button-toggle-border-width))}:host(.gog-button-toggle--joined.gog-button-toggle--vertical) .gog-button-toggle__button:first-of-type{border-start-start-radius:var(--gog-button-toggle-radius);border-start-end-radius:var(--gog-button-toggle-radius)}:host(.gog-button-toggle--joined.gog-button-toggle--vertical) .gog-button-toggle__button:last-of-type{border-end-start-radius:var(--gog-button-toggle-radius);border-end-end-radius:var(--gog-button-toggle-radius)}:host(.gog-button-toggle--joined) .gog-button-toggle__button--selected{z-index:1}:host(.gog-button-toggle--separated){gap:var(--gog-button-toggle-separated-gap)}:host(.gog-button-toggle--separated) .gog-button-toggle__button{border-radius:var(--gog-button-toggle-radius)}:host(.gog-button-toggle--horizontal){flex-direction:row}:host(.gog-button-toggle--vertical){flex-direction:column}:host(.gog-button-toggle--xsm){--gog-button-toggle-size-padding: var(--gog-button-xsm-padding);--gog-button-toggle-size-font-size: var(--gog-button-xsm-font-size)}:host(.gog-button-toggle--sm){--gog-button-toggle-size-padding: var(--gog-button-sm-padding);--gog-button-toggle-size-font-size: var(--gog-button-sm-font-size)}:host(.gog-button-toggle--md){--gog-button-toggle-size-padding: var(--gog-button-md-padding);--gog-button-toggle-size-font-size: var(--gog-button-md-font-size)}:host(.gog-button-toggle--lg){--gog-button-toggle-size-padding: var(--gog-button-lg-padding);--gog-button-toggle-size-font-size: var(--gog-button-lg-font-size)}:host(.gog-button-toggle--slg){--gog-button-toggle-size-padding: var(--gog-button-slg-padding);--gog-button-toggle-size-font-size: var(--gog-button-slg-font-size)}:host(.gog-host--full-width){display:flex;width:100%}:host(.gog-host--full-width) .gog-button-toggle__button{flex:1 1 0}@media(prefers-reduced-motion:reduce){.gog-button-toggle__button{transition:none}}\n"], dependencies: [{ kind: "directive", type: GogRippleDirective, selector: "[gogRipple]", inputs: ["rippleDisabled", "rippleCentred"] }, { kind: "component", type: IconComponent, selector: "gog-icon", inputs: ["name", "template", "title", "ariaHidden"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2968
3399
|
}
|
|
2969
3400
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: ButtonToggleGroupComponent, decorators: [{
|
|
2970
3401
|
type: Component,
|
|
2971
|
-
args: [{ selector: 'gog-button-toggle-group', imports: [IconComponent, NgTemplateOutlet], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
3402
|
+
args: [{ selector: 'gog-button-toggle-group', imports: [GogRippleDirective, IconComponent, NgTemplateOutlet], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
2972
3403
|
'[class]': 'hostClasses()',
|
|
2973
3404
|
'[attr.role]': 'multiple() ? "group" : "radiogroup"',
|
|
2974
3405
|
'[attr.aria-label]': 'ariaLabel() || null',
|
|
2975
3406
|
'[attr.aria-orientation]': 'orientation()',
|
|
2976
3407
|
'[attr.aria-disabled]': 'isDisabled() ? "true" : null',
|
|
2977
|
-
}, template: "@for (option of options(); track $index) {\n <button\n #toggleButton\n type=\"button\"\n class=\"gog-button-toggle__button\"\n [class.gog-button-toggle__button--selected]=\"isSelected(option)\"\n [attr.role]=\"multiple() ? null : 'radio'\"\n [attr.aria-checked]=\"multiple() ? null : isSelected(option)\"\n [attr.aria-pressed]=\"multiple() ? isSelected(option) : null\"\n [attr.aria-disabled]=\"isOptionDisabled(option) ? 'true' : null\"\n [disabled]=\"isOptionDisabled(option)\"\n [tabindex]=\"$index === tabStopIndex() ? 0 : -1\"\n (click)=\"onOptionClick(option)\"\n (keydown)=\"onKeydown($event)\"\n (blur)=\"onBlur()\"\n >\n @if (optionSlot(); as slot) {\n <ng-container\n [ngTemplateOutlet]=\"slot.templateRef\"\n [ngTemplateOutletContext]=\"optionContext(option)\"\n />\n } @else {\n @if (iconOf(option); as icon) {\n <gog-icon class=\"gog-button-toggle__icon\" [name]=\"icon\" [ariaHidden]=\"true\" />\n }\n <span class=\"gog-button-toggle__label\">{{ labelOf(option) }}</span>\n }\n </button>\n}\n", styles: ["@charset \"UTF-8\";:host{display:inline-flex;box-sizing:border-box;max-width:100%}.gog-button-toggle__button{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;gap:var(--gog-button-toggle-gap);padding:var(--gog-button-toggle-padding, var(--gog-button-toggle-size-padding, var(--gog-button-md-padding)));border:var(--gog-button-toggle-border-width) var(--gog-button-toggle-border-style) var(--gog-button-toggle-border-color);background-color:var(--gog-button-toggle-bg, var(--gog-button-toggle-rest-bg));color:var(--gog-button-toggle-color, var(--gog-button-toggle-rest-color));font-family:var(--gog-button-toggle-font-family);font-size:var(--gog-button-toggle-font-size, var(--gog-button-toggle-size-font-size, var(--gog-button-md-font-size)));font-weight:var(--gog-button-toggle-font-weight);letter-spacing:var(--gog-button-toggle-letter-spacing);line-height:var(--gog-button-toggle-line-height);text-transform:var(--gog-button-toggle-text-transform);cursor:pointer;white-space:nowrap;transition:background-color var(--gog-button-toggle-transition-duration) var(--gog-easing),border-color var(--gog-button-toggle-transition-duration) var(--gog-easing),color var(--gog-button-toggle-transition-duration) var(--gog-easing)}.gog-button-toggle__button:hover:not(:disabled):not(.gog-button-toggle__button--selected){background-color:var(--gog-button-toggle-hover-bg);color:var(--gog-button-toggle-hover-color)}.gog-button-toggle__button--selected{border-color:var(--gog-button-toggle-selected-border-color);background-color:var(--gog-button-toggle-selected-bg);color:var(--gog-button-toggle-selected-color)}.gog-button-toggle__button:disabled{opacity:var(--gog-button-toggle-disabled-opacity);cursor:not-allowed}.gog-button-toggle__button:focus-visible{outline:var(--gog-button-toggle-focus-ring-width) solid var(--gog-button-toggle-focus-ring-color);outline-offset:var(--gog-button-toggle-focus-ring-offset);z-index:1}.gog-button-toggle__icon{flex-shrink:0;font-size:var(--gog-button-toggle-icon-size)}.gog-button-toggle__label{min-width:0;overflow:hidden;text-overflow:ellipsis}:host(.gog-button-toggle--joined.gog-button-toggle--horizontal) .gog-button-toggle__button{border-radius:0}:host(.gog-button-toggle--joined.gog-button-toggle--horizontal) .gog-button-toggle__button:not(:first-of-type){margin-inline-start:calc(-1 * var(--gog-button-toggle-border-width))}:host(.gog-button-toggle--joined.gog-button-toggle--horizontal) .gog-button-toggle__button:first-of-type{border-start-start-radius:var(--gog-button-toggle-radius);border-end-start-radius:var(--gog-button-toggle-radius)}:host(.gog-button-toggle--joined.gog-button-toggle--horizontal) .gog-button-toggle__button:last-of-type{border-start-end-radius:var(--gog-button-toggle-radius);border-end-end-radius:var(--gog-button-toggle-radius)}:host(.gog-button-toggle--joined.gog-button-toggle--vertical) .gog-button-toggle__button{border-radius:0}:host(.gog-button-toggle--joined.gog-button-toggle--vertical) .gog-button-toggle__button:not(:first-of-type){margin-block-start:calc(-1 * var(--gog-button-toggle-border-width))}:host(.gog-button-toggle--joined.gog-button-toggle--vertical) .gog-button-toggle__button:first-of-type{border-start-start-radius:var(--gog-button-toggle-radius);border-start-end-radius:var(--gog-button-toggle-radius)}:host(.gog-button-toggle--joined.gog-button-toggle--vertical) .gog-button-toggle__button:last-of-type{border-end-start-radius:var(--gog-button-toggle-radius);border-end-end-radius:var(--gog-button-toggle-radius)}:host(.gog-button-toggle--joined) .gog-button-toggle__button--selected{z-index:1}:host(.gog-button-toggle--separated){gap:var(--gog-button-toggle-separated-gap)}:host(.gog-button-toggle--separated) .gog-button-toggle__button{border-radius:var(--gog-button-toggle-radius)}:host(.gog-button-toggle--horizontal){flex-direction:row}:host(.gog-button-toggle--vertical){flex-direction:column}:host(.gog-button-toggle--xsm){--gog-button-toggle-size-padding: var(--gog-button-xsm-padding);--gog-button-toggle-size-font-size: var(--gog-button-xsm-font-size)}:host(.gog-button-toggle--sm){--gog-button-toggle-size-padding: var(--gog-button-sm-padding);--gog-button-toggle-size-font-size: var(--gog-button-sm-font-size)}:host(.gog-button-toggle--md){--gog-button-toggle-size-padding: var(--gog-button-md-padding);--gog-button-toggle-size-font-size: var(--gog-button-md-font-size)}:host(.gog-button-toggle--lg){--gog-button-toggle-size-padding: var(--gog-button-lg-padding);--gog-button-toggle-size-font-size: var(--gog-button-lg-font-size)}:host(.gog-button-toggle--slg){--gog-button-toggle-size-padding: var(--gog-button-slg-padding);--gog-button-toggle-size-font-size: var(--gog-button-slg-font-size)}:host(.gog-host--full-width){display:flex;width:100%}:host(.gog-host--full-width) .gog-button-toggle__button{flex:1 1 0}@media(prefers-reduced-motion:reduce){.gog-button-toggle__button{transition:none}}\n"] }]
|
|
2978
|
-
}], ctorParameters: () => [], propDecorators: { options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], optionLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionLabel", required: false }] }], optionValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionValue", required: false }] }], optionDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionDisabled", required: false }] }], optionIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionIcon", required: false }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], appearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "appearance", required: false }] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], fullWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "fullWidth", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], optionSlot: [{ type: i0.ContentChild, args: [i0.forwardRef(() => GogButtonToggleOptionDirective), { isSignal: true }] }], buttonRefs: [{ type: i0.ViewChildren, args: ['toggleButton', { isSignal: true }] }] } });
|
|
3408
|
+
}, template: "@for (option of options(); track $index) {\r\n <button\r\n #toggleButton\r\n type=\"button\"\r\n class=\"gog-button-toggle__button\"\r\n [class.gog-button-toggle__button--selected]=\"isSelected(option)\"\r\n [attr.role]=\"multiple() ? null : 'radio'\"\r\n [attr.aria-checked]=\"multiple() ? null : isSelected(option)\"\r\n [attr.aria-pressed]=\"multiple() ? isSelected(option) : null\"\r\n [attr.aria-disabled]=\"isOptionDisabled(option) ? 'true' : null\"\r\n [disabled]=\"isOptionDisabled(option)\"\r\n [tabindex]=\"$index === tabStopIndex() ? 0 : -1\"\r\n (click)=\"onOptionClick(option)\"\r\n (keydown)=\"onKeydown($event)\"\r\n (blur)=\"onBlur()\"\r\n gogRipple\r\n [rippleDisabled]=\"!rippleEnabled()\"\r\n >\r\n @if (optionSlot(); as slot) {\r\n <ng-container\r\n [ngTemplateOutlet]=\"slot.templateRef\"\r\n [ngTemplateOutletContext]=\"optionContext(option)\"\r\n />\r\n } @else {\r\n @if (iconOf(option); as icon) {\r\n <gog-icon class=\"gog-button-toggle__icon\" [name]=\"icon\" [ariaHidden]=\"true\" />\r\n }\r\n <span class=\"gog-button-toggle__label\">{{ labelOf(option) }}</span>\r\n }\r\n </button>\r\n}\r\n", styles: ["@charset \"UTF-8\";:host{display:inline-flex;box-sizing:border-box;max-width:100%}.gog-button-toggle__button{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;gap:var(--gog-button-toggle-gap);padding:var(--gog-button-toggle-padding, var(--gog-button-toggle-size-padding, var(--gog-button-md-padding)));border:var(--gog-button-toggle-border-width) var(--gog-button-toggle-border-style) var(--gog-button-toggle-border-color);background-color:var(--gog-button-toggle-bg, var(--gog-button-toggle-rest-bg));color:var(--gog-button-toggle-color, var(--gog-button-toggle-rest-color));font-family:var(--gog-button-toggle-font-family);font-size:var(--gog-button-toggle-font-size, var(--gog-button-toggle-size-font-size, var(--gog-button-md-font-size)));font-weight:var(--gog-button-toggle-font-weight);letter-spacing:var(--gog-button-toggle-letter-spacing);line-height:var(--gog-button-toggle-line-height);text-transform:var(--gog-button-toggle-text-transform);cursor:pointer;white-space:nowrap;transition:background-color var(--gog-button-toggle-transition-duration) var(--gog-easing),border-color var(--gog-button-toggle-transition-duration) var(--gog-easing),color var(--gog-button-toggle-transition-duration) var(--gog-easing)}.gog-button-toggle__button:hover:not(:disabled):not(.gog-button-toggle__button--selected){background-color:var(--gog-button-toggle-hover-bg);color:var(--gog-button-toggle-hover-color)}.gog-button-toggle__button--selected{border-color:var(--gog-button-toggle-selected-border-color);background-color:var(--gog-button-toggle-selected-bg);color:var(--gog-button-toggle-selected-color)}.gog-button-toggle__button:disabled{opacity:var(--gog-button-toggle-disabled-opacity);cursor:not-allowed}.gog-button-toggle__button:focus-visible{outline:var(--gog-button-toggle-focus-ring-width) solid var(--gog-button-toggle-focus-ring-color);outline-offset:var(--gog-button-toggle-focus-ring-offset);z-index:1}.gog-button-toggle__icon{flex-shrink:0;font-size:var(--gog-button-toggle-icon-size)}.gog-button-toggle__label{min-width:0;overflow:hidden;text-overflow:ellipsis}:host(.gog-button-toggle--joined.gog-button-toggle--horizontal) .gog-button-toggle__button{border-radius:0}:host(.gog-button-toggle--joined.gog-button-toggle--horizontal) .gog-button-toggle__button:not(:first-of-type){margin-inline-start:calc(-1 * var(--gog-button-toggle-border-width))}:host(.gog-button-toggle--joined.gog-button-toggle--horizontal) .gog-button-toggle__button:first-of-type{border-start-start-radius:var(--gog-button-toggle-radius);border-end-start-radius:var(--gog-button-toggle-radius)}:host(.gog-button-toggle--joined.gog-button-toggle--horizontal) .gog-button-toggle__button:last-of-type{border-start-end-radius:var(--gog-button-toggle-radius);border-end-end-radius:var(--gog-button-toggle-radius)}:host(.gog-button-toggle--joined.gog-button-toggle--vertical) .gog-button-toggle__button{border-radius:0}:host(.gog-button-toggle--joined.gog-button-toggle--vertical) .gog-button-toggle__button:not(:first-of-type){margin-block-start:calc(-1 * var(--gog-button-toggle-border-width))}:host(.gog-button-toggle--joined.gog-button-toggle--vertical) .gog-button-toggle__button:first-of-type{border-start-start-radius:var(--gog-button-toggle-radius);border-start-end-radius:var(--gog-button-toggle-radius)}:host(.gog-button-toggle--joined.gog-button-toggle--vertical) .gog-button-toggle__button:last-of-type{border-end-start-radius:var(--gog-button-toggle-radius);border-end-end-radius:var(--gog-button-toggle-radius)}:host(.gog-button-toggle--joined) .gog-button-toggle__button--selected{z-index:1}:host(.gog-button-toggle--separated){gap:var(--gog-button-toggle-separated-gap)}:host(.gog-button-toggle--separated) .gog-button-toggle__button{border-radius:var(--gog-button-toggle-radius)}:host(.gog-button-toggle--horizontal){flex-direction:row}:host(.gog-button-toggle--vertical){flex-direction:column}:host(.gog-button-toggle--xsm){--gog-button-toggle-size-padding: var(--gog-button-xsm-padding);--gog-button-toggle-size-font-size: var(--gog-button-xsm-font-size)}:host(.gog-button-toggle--sm){--gog-button-toggle-size-padding: var(--gog-button-sm-padding);--gog-button-toggle-size-font-size: var(--gog-button-sm-font-size)}:host(.gog-button-toggle--md){--gog-button-toggle-size-padding: var(--gog-button-md-padding);--gog-button-toggle-size-font-size: var(--gog-button-md-font-size)}:host(.gog-button-toggle--lg){--gog-button-toggle-size-padding: var(--gog-button-lg-padding);--gog-button-toggle-size-font-size: var(--gog-button-lg-font-size)}:host(.gog-button-toggle--slg){--gog-button-toggle-size-padding: var(--gog-button-slg-padding);--gog-button-toggle-size-font-size: var(--gog-button-slg-font-size)}:host(.gog-host--full-width){display:flex;width:100%}:host(.gog-host--full-width) .gog-button-toggle__button{flex:1 1 0}@media(prefers-reduced-motion:reduce){.gog-button-toggle__button{transition:none}}\n"] }]
|
|
3409
|
+
}], ctorParameters: () => [], propDecorators: { options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], optionLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionLabel", required: false }] }], optionValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionValue", required: false }] }], optionDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionDisabled", required: false }] }], optionIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionIcon", required: false }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], appearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "appearance", required: false }] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], ripple: [{ type: i0.Input, args: [{ isSignal: true, alias: "ripple", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], fullWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "fullWidth", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], optionSlot: [{ type: i0.ContentChild, args: [i0.forwardRef(() => GogButtonToggleOptionDirective), { isSignal: true }] }], buttonRefs: [{ type: i0.ViewChildren, args: ['toggleButton', { isSignal: true }] }] } });
|
|
2979
3410
|
|
|
2980
3411
|
const GOG_TABS_STATE = new InjectionToken('GOG_TABS_STATE');
|
|
2981
3412
|
|
|
@@ -2984,7 +3415,7 @@ const GOG_TABS_STATE = new InjectionToken('GOG_TABS_STATE');
|
|
|
2984
3415
|
* alive afterwards.
|
|
2985
3416
|
*
|
|
2986
3417
|
* ```html
|
|
2987
|
-
* <gog-tab label="
|
|
3418
|
+
* <gog-tab label="Report">
|
|
2988
3419
|
* <ng-template gogTabContent><app-expensive-report /></ng-template>
|
|
2989
3420
|
* </gog-tab>
|
|
2990
3421
|
* ```
|
|
@@ -3008,8 +3439,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
|
|
|
3008
3439
|
*
|
|
3009
3440
|
* ```html
|
|
3010
3441
|
* <gog-tabs>
|
|
3011
|
-
* <gog-tab label="
|
|
3012
|
-
* <gog-tab label="
|
|
3442
|
+
* <gog-tab label="Profile"><app-profile /></gog-tab>
|
|
3443
|
+
* <gog-tab label="Settings" iconName="info" [disabled]="!canEdit">…</gog-tab>
|
|
3013
3444
|
* </gog-tabs>
|
|
3014
3445
|
* ```
|
|
3015
3446
|
*/
|
|
@@ -3071,7 +3502,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
|
|
|
3071
3502
|
* <ng-template gogTabHeader let-tab let-active="active">
|
|
3072
3503
|
* {{ tab.label() }} <gog-tag *ngIf="active">•</gog-tag>
|
|
3073
3504
|
* </ng-template>
|
|
3074
|
-
* <gog-tab label="
|
|
3505
|
+
* <gog-tab label="Inbox">…</gog-tab>
|
|
3075
3506
|
* </gog-tabs>
|
|
3076
3507
|
* ```
|
|
3077
3508
|
*/
|
|
@@ -3094,8 +3525,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
|
|
|
3094
3525
|
*
|
|
3095
3526
|
* ```html
|
|
3096
3527
|
* <gog-tabs [(activeIndex)]="index" align="start">
|
|
3097
|
-
* <gog-tab label="
|
|
3098
|
-
* <gog-tab label="
|
|
3528
|
+
* <gog-tab label="Profile"><app-profile /></gog-tab>
|
|
3529
|
+
* <gog-tab label="Settings"><app-settings /></gog-tab>
|
|
3099
3530
|
* </gog-tabs>
|
|
3100
3531
|
* ```
|
|
3101
3532
|
*
|
|
@@ -3113,6 +3544,13 @@ class TabsComponent {
|
|
|
3113
3544
|
size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
3114
3545
|
fullWidth = input(false, ...(ngDevMode ? [{ debugName: "fullWidth" }] : /* istanbul ignore next */ []));
|
|
3115
3546
|
ariaLabel = input('', ...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
3547
|
+
/**
|
|
3548
|
+
* Press ripple. Unset, falls back to `GOG_CONFIG.ripple.enabled`, then to `false` — so
|
|
3549
|
+
* `[ripple]="false"` opts one instance out of an app that turned it on everywhere.
|
|
3550
|
+
*/
|
|
3551
|
+
ripple = input(undefined, ...(ngDevMode ? [{ debugName: "ripple" }] : /* istanbul ignore next */ []));
|
|
3552
|
+
/** Declared after the input it reads: field initialisers run in source order. */
|
|
3553
|
+
rippleEnabled = resolveRipple(this.ripple, inject(GOG_CONFIG));
|
|
3116
3554
|
/**
|
|
3117
3555
|
* Whether selecting a tab scrolls the (possibly overflowing) header row so the active tab
|
|
3118
3556
|
* stays in view — centered where there's room, so its neighbours on both sides stay visible
|
|
@@ -3234,20 +3672,357 @@ class TabsComponent {
|
|
|
3234
3672
|
}
|
|
3235
3673
|
}
|
|
3236
3674
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: TabsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3237
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: TabsComponent, isStandalone: true, selector: "gog-tabs", inputs: { activeIndex: { classPropertyName: "activeIndex", publicName: "activeIndex", isSignal: true, isRequired: false, transformFunction: null }, align: { classPropertyName: "align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, fullWidth: { classPropertyName: "fullWidth", publicName: "fullWidth", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, scrollActiveIntoView: { classPropertyName: "scrollActiveIntoView", publicName: "scrollActiveIntoView", isSignal: true, isRequired: false, transformFunction: null }, showScrollTrack: { classPropertyName: "showScrollTrack", publicName: "showScrollTrack", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { activeIndex: "activeIndexChange", gogTabChange: "gogTabChange" }, host: { properties: { "class": "hostClasses()" } }, providers: [
|
|
3675
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: TabsComponent, isStandalone: true, selector: "gog-tabs", inputs: { activeIndex: { classPropertyName: "activeIndex", publicName: "activeIndex", isSignal: true, isRequired: false, transformFunction: null }, align: { classPropertyName: "align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, fullWidth: { classPropertyName: "fullWidth", publicName: "fullWidth", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ripple: { classPropertyName: "ripple", publicName: "ripple", isSignal: true, isRequired: false, transformFunction: null }, scrollActiveIntoView: { classPropertyName: "scrollActiveIntoView", publicName: "scrollActiveIntoView", isSignal: true, isRequired: false, transformFunction: null }, showScrollTrack: { classPropertyName: "showScrollTrack", publicName: "showScrollTrack", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { activeIndex: "activeIndexChange", gogTabChange: "gogTabChange" }, host: { properties: { "class": "hostClasses()" } }, providers: [
|
|
3238
3676
|
// forwardRef because the class is not yet defined when this decorator is evaluated.
|
|
3239
3677
|
{ provide: GOG_TABS_STATE, useExisting: forwardRef(() => TabsComponent) },
|
|
3240
|
-
], queries: [{ propertyName: "tabs", predicate: TabComponent, isSignal: true }, { propertyName: "headerSlot", first: true, predicate: GogTabHeaderDirective, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "headerRefs", predicate: ["tabHeader"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"gog-tabs__header\">\r\n <!--\r\n gog-scroll rather than a raw overflow-x: a native scrollbar carries no --gog-* tokens and\r\n would be the one un-themeable strip inside an otherwise fully themeable component.\r\n focusable=false because the tablist already owns the keyboard here.\r\n -->\r\n <gog-scroll\r\n class=\"gog-tabs__scroll\"\r\n axis=\"horizontal\"\r\n size=\"thin\"\r\n [focusable]=\"false\"\r\n [showTrack]=\"resolvedShowScrollTrack()\"\r\n overscrollBehavior=\"contain\"\r\n >\r\n <div\r\n class=\"gog-tabs__list\"\r\n role=\"tablist\"\r\n [attr.aria-label]=\"ariaLabel() || null\"\r\n [attr.aria-orientation]=\"orientation()\"\r\n >\r\n @for (tab of tabs(); track tab; let i = $index) {\r\n <button\r\n #tabHeader\r\n type=\"button\"\r\n role=\"tab\"\r\n class=\"gog-tabs__tab\"\r\n [class.gog-tabs__tab--active]=\"i === resolvedIndex()\"\r\n [id]=\"tab.headerId\"\r\n [attr.aria-selected]=\"i === resolvedIndex()\"\r\n [attr.aria-controls]=\"tab.panelId\"\r\n [attr.aria-disabled]=\"tab.disabled() ? 'true' : null\"\r\n [disabled]=\"tab.disabled()\"\r\n [tabindex]=\"i === resolvedIndex() ? 0 : -1\"\r\n (click)=\"selectIndex(i)\"\r\n (keydown)=\"onHeaderKeydown($event)\"\r\n >\r\n @if (headerSlot(); as slot) {\r\n <ng-container\r\n [ngTemplateOutlet]=\"slot.templateRef\"\r\n [ngTemplateOutletContext]=\"headerContext(tab, i)\"\r\n />\r\n } @else {\r\n @if (tab.iconName(); as icon) {\r\n <gog-icon class=\"gog-tabs__icon\" [name]=\"icon\" [ariaHidden]=\"true\" />\r\n }\r\n <span class=\"gog-tabs__label\">{{ tab.label() }}</span>\r\n }\r\n </button>\r\n }\r\n </div>\r\n </gog-scroll>\r\n</div>\r\n\r\n<div class=\"gog-tabs__panels\">\r\n <ng-content></ng-content>\r\n</div>\r\n", styles: ["@charset \"UTF-8\";:host{display:block;box-sizing:border-box}.gog-tabs__header{position:relative;border-block-end:var(--gog-tabs-header-border-width) var(--gog-tabs-header-border-style) var(--gog-tabs-header-border-color)}.gog-tabs__list{position:relative;display:flex;gap:var(--gog-tabs-gap);min-width:max-content}.gog-tabs__tab{position:relative;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;gap:var(--gog-tabs-tab-gap);padding:var(--gog-tabs-tab-padding, var(--gog-tabs-size-padding, var(--gog-tabs-md-padding)));border:0;background-color:var(--gog-tabs-tab-bg, var(--gog-tabs-rest-bg));color:var(--gog-tabs-tab-color, var(--gog-tabs-rest-color));font-family:var(--gog-tabs-font-family);font-size:var(--gog-tabs-tab-font-size, var(--gog-tabs-size-font-size, var(--gog-tabs-md-font-size)));font-weight:var(--gog-tabs-font-weight);letter-spacing:var(--gog-tabs-letter-spacing);line-height:var(--gog-tabs-line-height);text-transform:var(--gog-tabs-text-transform);cursor:pointer;white-space:nowrap;transition:color var(--gog-tabs-transition-duration) var(--gog-easing)}.gog-tabs__tab:hover:not(:disabled){color:var(--gog-tabs-hover-color)}.gog-tabs__tab--active{color:var(--gog-tabs-active-color)}.gog-tabs__tab:disabled{opacity:var(--gog-tabs-disabled-opacity);cursor:not-allowed}.gog-tabs__tab:focus-visible{outline:var(--gog-tabs-focus-ring-width) solid var(--gog-tabs-focus-ring-color);outline-offset:var(--gog-tabs-focus-ring-offset)}.gog-tabs__icon{flex-shrink:0;font-size:var(--gog-tabs-icon-size)}.gog-tabs__tab--active:after{content:\"\";position:absolute;inset-inline:0;inset-block-end:calc(-1 * var(--gog-tabs-header-border-width));height:var(--gog-tabs-indicator-thickness);border-radius:var(--gog-tabs-indicator-radius);background-color:var(--gog-tabs-indicator-color)}.gog-tabs__panels{min-width:0}:host(.gog-tabs--align-center) .gog-tabs__list{justify-content:center}:host(.gog-tabs--align-end) .gog-tabs__list{justify-content:flex-end}:host(.gog-tabs--align-stretch) .gog-tabs__list{min-width:0}:host(.gog-tabs--align-stretch) .gog-tabs__tab{flex:1 1 0}:host(.gog-tabs--vertical){display:flex;align-items:stretch}:host(.gog-tabs--vertical) .gog-tabs__header{border-block-end:0;border-inline-end:var(--gog-tabs-header-border-width) var(--gog-tabs-header-border-style) var(--gog-tabs-header-border-color)}:host(.gog-tabs--vertical) .gog-tabs__list{flex-direction:column;min-width:0}:host(.gog-tabs--vertical) .gog-tabs__tab{justify-content:flex-start}:host(.gog-tabs--vertical) .gog-tabs__tab--active:after{inset-inline:auto calc(-1 * var(--gog-tabs-header-border-width));inset-block:0;width:var(--gog-tabs-indicator-thickness);height:auto}:host(.gog-tabs--vertical) .gog-tabs__panels{flex:1 1 auto}:host(.gog-tabs--xsm){--gog-tabs-size-padding: var(--gog-tabs-xsm-padding);--gog-tabs-size-font-size: var(--gog-tabs-xsm-font-size)}:host(.gog-tabs--sm){--gog-tabs-size-padding: var(--gog-tabs-sm-padding);--gog-tabs-size-font-size: var(--gog-tabs-sm-font-size)}:host(.gog-tabs--md){--gog-tabs-size-padding: var(--gog-tabs-md-padding);--gog-tabs-size-font-size: var(--gog-tabs-md-font-size)}:host(.gog-tabs--lg){--gog-tabs-size-padding: var(--gog-tabs-lg-padding);--gog-tabs-size-font-size: var(--gog-tabs-lg-font-size)}:host(.gog-tabs--slg){--gog-tabs-size-padding: var(--gog-tabs-slg-padding);--gog-tabs-size-font-size: var(--gog-tabs-slg-font-size)}:host(.gog-host--full-width){width:100%}@media(prefers-reduced-motion:reduce){.gog-tabs__tab{transition:none}}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "gog-icon", inputs: ["name", "template", "title", "ariaHidden"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ScrollComponent, selector: "gog-scroll", inputs: ["axis", "size", "autoHide", "hideDelay", "reachThreshold", "focusable", "ariaLabel", "overscrollBehavior", "showTrack"], outputs: ["gogScroll", "gogReachStart", "gogReachEnd"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3678
|
+
], queries: [{ propertyName: "tabs", predicate: TabComponent, isSignal: true }, { propertyName: "headerSlot", first: true, predicate: GogTabHeaderDirective, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "headerRefs", predicate: ["tabHeader"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"gog-tabs__header\">\r\n <!--\r\n gog-scroll rather than a raw overflow-x: a native scrollbar carries no --gog-* tokens and\r\n would be the one un-themeable strip inside an otherwise fully themeable component.\r\n focusable=false because the tablist already owns the keyboard here.\r\n -->\r\n <gog-scroll\r\n class=\"gog-tabs__scroll\"\r\n axis=\"horizontal\"\r\n size=\"thin\"\r\n [focusable]=\"false\"\r\n [showTrack]=\"resolvedShowScrollTrack()\"\r\n overscrollBehavior=\"contain\"\r\n >\r\n <div\r\n class=\"gog-tabs__list\"\r\n role=\"tablist\"\r\n [attr.aria-label]=\"ariaLabel() || null\"\r\n [attr.aria-orientation]=\"orientation()\"\r\n >\r\n @for (tab of tabs(); track tab; let i = $index) {\r\n <button\r\n #tabHeader\r\n type=\"button\"\r\n role=\"tab\"\r\n class=\"gog-tabs__tab\"\r\n [class.gog-tabs__tab--active]=\"i === resolvedIndex()\"\r\n [id]=\"tab.headerId\"\r\n [attr.aria-selected]=\"i === resolvedIndex()\"\r\n [attr.aria-controls]=\"tab.panelId\"\r\n [attr.aria-disabled]=\"tab.disabled() ? 'true' : null\"\r\n [disabled]=\"tab.disabled()\"\r\n [tabindex]=\"i === resolvedIndex() ? 0 : -1\"\r\n (click)=\"selectIndex(i)\"\r\n (keydown)=\"onHeaderKeydown($event)\"\r\n gogRipple\r\n [rippleDisabled]=\"!rippleEnabled()\"\r\n >\r\n @if (headerSlot(); as slot) {\r\n <ng-container\r\n [ngTemplateOutlet]=\"slot.templateRef\"\r\n [ngTemplateOutletContext]=\"headerContext(tab, i)\"\r\n />\r\n } @else {\r\n @if (tab.iconName(); as icon) {\r\n <gog-icon class=\"gog-tabs__icon\" [name]=\"icon\" [ariaHidden]=\"true\" />\r\n }\r\n <span class=\"gog-tabs__label\">{{ tab.label() }}</span>\r\n }\r\n </button>\r\n }\r\n </div>\r\n </gog-scroll>\r\n</div>\r\n\r\n<div class=\"gog-tabs__panels\">\r\n <ng-content></ng-content>\r\n</div>\r\n", styles: ["@charset \"UTF-8\";:host{display:block;box-sizing:border-box}.gog-tabs__header{position:relative;border-block-end:var(--gog-tabs-header-border-width) var(--gog-tabs-header-border-style) var(--gog-tabs-header-border-color)}.gog-tabs__list{position:relative;display:flex;gap:var(--gog-tabs-gap);min-width:max-content}.gog-tabs__tab{position:relative;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;gap:var(--gog-tabs-tab-gap);padding:var(--gog-tabs-tab-padding, var(--gog-tabs-size-padding, var(--gog-tabs-md-padding)));border:0;background-color:var(--gog-tabs-tab-bg, var(--gog-tabs-rest-bg));color:var(--gog-tabs-tab-color, var(--gog-tabs-rest-color));font-family:var(--gog-tabs-font-family);font-size:var(--gog-tabs-tab-font-size, var(--gog-tabs-size-font-size, var(--gog-tabs-md-font-size)));font-weight:var(--gog-tabs-font-weight);letter-spacing:var(--gog-tabs-letter-spacing);line-height:var(--gog-tabs-line-height);text-transform:var(--gog-tabs-text-transform);cursor:pointer;white-space:nowrap;transition:color var(--gog-tabs-transition-duration) var(--gog-easing)}.gog-tabs__tab:hover:not(:disabled){color:var(--gog-tabs-hover-color)}.gog-tabs__tab--active{color:var(--gog-tabs-active-color)}.gog-tabs__tab:disabled{opacity:var(--gog-tabs-disabled-opacity);cursor:not-allowed}.gog-tabs__tab:focus-visible{outline:var(--gog-tabs-focus-ring-width) solid var(--gog-tabs-focus-ring-color);outline-offset:var(--gog-tabs-focus-ring-offset)}.gog-tabs__icon{flex-shrink:0;font-size:var(--gog-tabs-icon-size)}.gog-tabs__tab--active:after{content:\"\";position:absolute;inset-inline:0;inset-block-end:calc(-1 * var(--gog-tabs-header-border-width));height:var(--gog-tabs-indicator-thickness);border-radius:var(--gog-tabs-indicator-radius);background-color:var(--gog-tabs-indicator-color)}.gog-tabs__panels{min-width:0}:host(.gog-tabs--align-center) .gog-tabs__list{justify-content:center}:host(.gog-tabs--align-end) .gog-tabs__list{justify-content:flex-end}:host(.gog-tabs--align-stretch) .gog-tabs__list{min-width:0}:host(.gog-tabs--align-stretch) .gog-tabs__tab{flex:1 1 0}:host(.gog-tabs--vertical){display:flex;align-items:stretch}:host(.gog-tabs--vertical) .gog-tabs__header{border-block-end:0;border-inline-end:var(--gog-tabs-header-border-width) var(--gog-tabs-header-border-style) var(--gog-tabs-header-border-color)}:host(.gog-tabs--vertical) .gog-tabs__list{flex-direction:column;min-width:0}:host(.gog-tabs--vertical) .gog-tabs__tab{justify-content:flex-start}:host(.gog-tabs--vertical) .gog-tabs__tab--active:after{inset-inline:auto calc(-1 * var(--gog-tabs-header-border-width));inset-block:0;width:var(--gog-tabs-indicator-thickness);height:auto}:host(.gog-tabs--vertical) .gog-tabs__panels{flex:1 1 auto}:host(.gog-tabs--xsm){--gog-tabs-size-padding: var(--gog-tabs-xsm-padding);--gog-tabs-size-font-size: var(--gog-tabs-xsm-font-size)}:host(.gog-tabs--sm){--gog-tabs-size-padding: var(--gog-tabs-sm-padding);--gog-tabs-size-font-size: var(--gog-tabs-sm-font-size)}:host(.gog-tabs--md){--gog-tabs-size-padding: var(--gog-tabs-md-padding);--gog-tabs-size-font-size: var(--gog-tabs-md-font-size)}:host(.gog-tabs--lg){--gog-tabs-size-padding: var(--gog-tabs-lg-padding);--gog-tabs-size-font-size: var(--gog-tabs-lg-font-size)}:host(.gog-tabs--slg){--gog-tabs-size-padding: var(--gog-tabs-slg-padding);--gog-tabs-size-font-size: var(--gog-tabs-slg-font-size)}:host(.gog-host--full-width){width:100%}@media(prefers-reduced-motion:reduce){.gog-tabs__tab{transition:none}}\n"], dependencies: [{ kind: "directive", type: GogRippleDirective, selector: "[gogRipple]", inputs: ["rippleDisabled", "rippleCentred"] }, { kind: "component", type: IconComponent, selector: "gog-icon", inputs: ["name", "template", "title", "ariaHidden"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ScrollComponent, selector: "gog-scroll", inputs: ["axis", "size", "autoHide", "hideDelay", "reachThreshold", "focusable", "ariaLabel", "overscrollBehavior", "showTrack"], outputs: ["gogScroll", "gogReachStart", "gogReachEnd"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3241
3679
|
}
|
|
3242
3680
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: TabsComponent, decorators: [{
|
|
3243
3681
|
type: Component,
|
|
3244
|
-
args: [{ selector: 'gog-tabs', imports: [IconComponent, NgTemplateOutlet, ScrollComponent], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
3682
|
+
args: [{ selector: 'gog-tabs', imports: [GogRippleDirective, IconComponent, NgTemplateOutlet, ScrollComponent], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
3245
3683
|
// forwardRef because the class is not yet defined when this decorator is evaluated.
|
|
3246
3684
|
{ provide: GOG_TABS_STATE, useExisting: forwardRef(() => TabsComponent) },
|
|
3247
3685
|
], host: {
|
|
3248
3686
|
'[class]': 'hostClasses()',
|
|
3249
|
-
}, template: "<div class=\"gog-tabs__header\">\r\n <!--\r\n gog-scroll rather than a raw overflow-x: a native scrollbar carries no --gog-* tokens and\r\n would be the one un-themeable strip inside an otherwise fully themeable component.\r\n focusable=false because the tablist already owns the keyboard here.\r\n -->\r\n <gog-scroll\r\n class=\"gog-tabs__scroll\"\r\n axis=\"horizontal\"\r\n size=\"thin\"\r\n [focusable]=\"false\"\r\n [showTrack]=\"resolvedShowScrollTrack()\"\r\n overscrollBehavior=\"contain\"\r\n >\r\n <div\r\n class=\"gog-tabs__list\"\r\n role=\"tablist\"\r\n [attr.aria-label]=\"ariaLabel() || null\"\r\n [attr.aria-orientation]=\"orientation()\"\r\n >\r\n @for (tab of tabs(); track tab; let i = $index) {\r\n <button\r\n #tabHeader\r\n type=\"button\"\r\n role=\"tab\"\r\n class=\"gog-tabs__tab\"\r\n [class.gog-tabs__tab--active]=\"i === resolvedIndex()\"\r\n [id]=\"tab.headerId\"\r\n [attr.aria-selected]=\"i === resolvedIndex()\"\r\n [attr.aria-controls]=\"tab.panelId\"\r\n [attr.aria-disabled]=\"tab.disabled() ? 'true' : null\"\r\n [disabled]=\"tab.disabled()\"\r\n [tabindex]=\"i === resolvedIndex() ? 0 : -1\"\r\n (click)=\"selectIndex(i)\"\r\n (keydown)=\"onHeaderKeydown($event)\"\r\n >\r\n @if (headerSlot(); as slot) {\r\n <ng-container\r\n [ngTemplateOutlet]=\"slot.templateRef\"\r\n [ngTemplateOutletContext]=\"headerContext(tab, i)\"\r\n />\r\n } @else {\r\n @if (tab.iconName(); as icon) {\r\n <gog-icon class=\"gog-tabs__icon\" [name]=\"icon\" [ariaHidden]=\"true\" />\r\n }\r\n <span class=\"gog-tabs__label\">{{ tab.label() }}</span>\r\n }\r\n </button>\r\n }\r\n </div>\r\n </gog-scroll>\r\n</div>\r\n\r\n<div class=\"gog-tabs__panels\">\r\n <ng-content></ng-content>\r\n</div>\r\n", styles: ["@charset \"UTF-8\";:host{display:block;box-sizing:border-box}.gog-tabs__header{position:relative;border-block-end:var(--gog-tabs-header-border-width) var(--gog-tabs-header-border-style) var(--gog-tabs-header-border-color)}.gog-tabs__list{position:relative;display:flex;gap:var(--gog-tabs-gap);min-width:max-content}.gog-tabs__tab{position:relative;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;gap:var(--gog-tabs-tab-gap);padding:var(--gog-tabs-tab-padding, var(--gog-tabs-size-padding, var(--gog-tabs-md-padding)));border:0;background-color:var(--gog-tabs-tab-bg, var(--gog-tabs-rest-bg));color:var(--gog-tabs-tab-color, var(--gog-tabs-rest-color));font-family:var(--gog-tabs-font-family);font-size:var(--gog-tabs-tab-font-size, var(--gog-tabs-size-font-size, var(--gog-tabs-md-font-size)));font-weight:var(--gog-tabs-font-weight);letter-spacing:var(--gog-tabs-letter-spacing);line-height:var(--gog-tabs-line-height);text-transform:var(--gog-tabs-text-transform);cursor:pointer;white-space:nowrap;transition:color var(--gog-tabs-transition-duration) var(--gog-easing)}.gog-tabs__tab:hover:not(:disabled){color:var(--gog-tabs-hover-color)}.gog-tabs__tab--active{color:var(--gog-tabs-active-color)}.gog-tabs__tab:disabled{opacity:var(--gog-tabs-disabled-opacity);cursor:not-allowed}.gog-tabs__tab:focus-visible{outline:var(--gog-tabs-focus-ring-width) solid var(--gog-tabs-focus-ring-color);outline-offset:var(--gog-tabs-focus-ring-offset)}.gog-tabs__icon{flex-shrink:0;font-size:var(--gog-tabs-icon-size)}.gog-tabs__tab--active:after{content:\"\";position:absolute;inset-inline:0;inset-block-end:calc(-1 * var(--gog-tabs-header-border-width));height:var(--gog-tabs-indicator-thickness);border-radius:var(--gog-tabs-indicator-radius);background-color:var(--gog-tabs-indicator-color)}.gog-tabs__panels{min-width:0}:host(.gog-tabs--align-center) .gog-tabs__list{justify-content:center}:host(.gog-tabs--align-end) .gog-tabs__list{justify-content:flex-end}:host(.gog-tabs--align-stretch) .gog-tabs__list{min-width:0}:host(.gog-tabs--align-stretch) .gog-tabs__tab{flex:1 1 0}:host(.gog-tabs--vertical){display:flex;align-items:stretch}:host(.gog-tabs--vertical) .gog-tabs__header{border-block-end:0;border-inline-end:var(--gog-tabs-header-border-width) var(--gog-tabs-header-border-style) var(--gog-tabs-header-border-color)}:host(.gog-tabs--vertical) .gog-tabs__list{flex-direction:column;min-width:0}:host(.gog-tabs--vertical) .gog-tabs__tab{justify-content:flex-start}:host(.gog-tabs--vertical) .gog-tabs__tab--active:after{inset-inline:auto calc(-1 * var(--gog-tabs-header-border-width));inset-block:0;width:var(--gog-tabs-indicator-thickness);height:auto}:host(.gog-tabs--vertical) .gog-tabs__panels{flex:1 1 auto}:host(.gog-tabs--xsm){--gog-tabs-size-padding: var(--gog-tabs-xsm-padding);--gog-tabs-size-font-size: var(--gog-tabs-xsm-font-size)}:host(.gog-tabs--sm){--gog-tabs-size-padding: var(--gog-tabs-sm-padding);--gog-tabs-size-font-size: var(--gog-tabs-sm-font-size)}:host(.gog-tabs--md){--gog-tabs-size-padding: var(--gog-tabs-md-padding);--gog-tabs-size-font-size: var(--gog-tabs-md-font-size)}:host(.gog-tabs--lg){--gog-tabs-size-padding: var(--gog-tabs-lg-padding);--gog-tabs-size-font-size: var(--gog-tabs-lg-font-size)}:host(.gog-tabs--slg){--gog-tabs-size-padding: var(--gog-tabs-slg-padding);--gog-tabs-size-font-size: var(--gog-tabs-slg-font-size)}:host(.gog-host--full-width){width:100%}@media(prefers-reduced-motion:reduce){.gog-tabs__tab{transition:none}}\n"] }]
|
|
3250
|
-
}], ctorParameters: () => [], propDecorators: { tabs: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => TabComponent), { isSignal: true }] }], activeIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeIndex", required: false }] }, { type: i0.Output, args: ["activeIndexChange"] }], align: [{ type: i0.Input, args: [{ isSignal: true, alias: "align", required: false }] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], fullWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "fullWidth", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], scrollActiveIntoView: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrollActiveIntoView", required: false }] }], showScrollTrack: [{ type: i0.Input, args: [{ isSignal: true, alias: "showScrollTrack", required: false }] }], gogTabChange: [{ type: i0.Output, args: ["gogTabChange"] }], headerSlot: [{ type: i0.ContentChild, args: [i0.forwardRef(() => GogTabHeaderDirective), { isSignal: true }] }], headerRefs: [{ type: i0.ViewChildren, args: ['tabHeader', { isSignal: true }] }] } });
|
|
3687
|
+
}, template: "<div class=\"gog-tabs__header\">\r\n <!--\r\n gog-scroll rather than a raw overflow-x: a native scrollbar carries no --gog-* tokens and\r\n would be the one un-themeable strip inside an otherwise fully themeable component.\r\n focusable=false because the tablist already owns the keyboard here.\r\n -->\r\n <gog-scroll\r\n class=\"gog-tabs__scroll\"\r\n axis=\"horizontal\"\r\n size=\"thin\"\r\n [focusable]=\"false\"\r\n [showTrack]=\"resolvedShowScrollTrack()\"\r\n overscrollBehavior=\"contain\"\r\n >\r\n <div\r\n class=\"gog-tabs__list\"\r\n role=\"tablist\"\r\n [attr.aria-label]=\"ariaLabel() || null\"\r\n [attr.aria-orientation]=\"orientation()\"\r\n >\r\n @for (tab of tabs(); track tab; let i = $index) {\r\n <button\r\n #tabHeader\r\n type=\"button\"\r\n role=\"tab\"\r\n class=\"gog-tabs__tab\"\r\n [class.gog-tabs__tab--active]=\"i === resolvedIndex()\"\r\n [id]=\"tab.headerId\"\r\n [attr.aria-selected]=\"i === resolvedIndex()\"\r\n [attr.aria-controls]=\"tab.panelId\"\r\n [attr.aria-disabled]=\"tab.disabled() ? 'true' : null\"\r\n [disabled]=\"tab.disabled()\"\r\n [tabindex]=\"i === resolvedIndex() ? 0 : -1\"\r\n (click)=\"selectIndex(i)\"\r\n (keydown)=\"onHeaderKeydown($event)\"\r\n gogRipple\r\n [rippleDisabled]=\"!rippleEnabled()\"\r\n >\r\n @if (headerSlot(); as slot) {\r\n <ng-container\r\n [ngTemplateOutlet]=\"slot.templateRef\"\r\n [ngTemplateOutletContext]=\"headerContext(tab, i)\"\r\n />\r\n } @else {\r\n @if (tab.iconName(); as icon) {\r\n <gog-icon class=\"gog-tabs__icon\" [name]=\"icon\" [ariaHidden]=\"true\" />\r\n }\r\n <span class=\"gog-tabs__label\">{{ tab.label() }}</span>\r\n }\r\n </button>\r\n }\r\n </div>\r\n </gog-scroll>\r\n</div>\r\n\r\n<div class=\"gog-tabs__panels\">\r\n <ng-content></ng-content>\r\n</div>\r\n", styles: ["@charset \"UTF-8\";:host{display:block;box-sizing:border-box}.gog-tabs__header{position:relative;border-block-end:var(--gog-tabs-header-border-width) var(--gog-tabs-header-border-style) var(--gog-tabs-header-border-color)}.gog-tabs__list{position:relative;display:flex;gap:var(--gog-tabs-gap);min-width:max-content}.gog-tabs__tab{position:relative;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;gap:var(--gog-tabs-tab-gap);padding:var(--gog-tabs-tab-padding, var(--gog-tabs-size-padding, var(--gog-tabs-md-padding)));border:0;background-color:var(--gog-tabs-tab-bg, var(--gog-tabs-rest-bg));color:var(--gog-tabs-tab-color, var(--gog-tabs-rest-color));font-family:var(--gog-tabs-font-family);font-size:var(--gog-tabs-tab-font-size, var(--gog-tabs-size-font-size, var(--gog-tabs-md-font-size)));font-weight:var(--gog-tabs-font-weight);letter-spacing:var(--gog-tabs-letter-spacing);line-height:var(--gog-tabs-line-height);text-transform:var(--gog-tabs-text-transform);cursor:pointer;white-space:nowrap;transition:color var(--gog-tabs-transition-duration) var(--gog-easing)}.gog-tabs__tab:hover:not(:disabled){color:var(--gog-tabs-hover-color)}.gog-tabs__tab--active{color:var(--gog-tabs-active-color)}.gog-tabs__tab:disabled{opacity:var(--gog-tabs-disabled-opacity);cursor:not-allowed}.gog-tabs__tab:focus-visible{outline:var(--gog-tabs-focus-ring-width) solid var(--gog-tabs-focus-ring-color);outline-offset:var(--gog-tabs-focus-ring-offset)}.gog-tabs__icon{flex-shrink:0;font-size:var(--gog-tabs-icon-size)}.gog-tabs__tab--active:after{content:\"\";position:absolute;inset-inline:0;inset-block-end:calc(-1 * var(--gog-tabs-header-border-width));height:var(--gog-tabs-indicator-thickness);border-radius:var(--gog-tabs-indicator-radius);background-color:var(--gog-tabs-indicator-color)}.gog-tabs__panels{min-width:0}:host(.gog-tabs--align-center) .gog-tabs__list{justify-content:center}:host(.gog-tabs--align-end) .gog-tabs__list{justify-content:flex-end}:host(.gog-tabs--align-stretch) .gog-tabs__list{min-width:0}:host(.gog-tabs--align-stretch) .gog-tabs__tab{flex:1 1 0}:host(.gog-tabs--vertical){display:flex;align-items:stretch}:host(.gog-tabs--vertical) .gog-tabs__header{border-block-end:0;border-inline-end:var(--gog-tabs-header-border-width) var(--gog-tabs-header-border-style) var(--gog-tabs-header-border-color)}:host(.gog-tabs--vertical) .gog-tabs__list{flex-direction:column;min-width:0}:host(.gog-tabs--vertical) .gog-tabs__tab{justify-content:flex-start}:host(.gog-tabs--vertical) .gog-tabs__tab--active:after{inset-inline:auto calc(-1 * var(--gog-tabs-header-border-width));inset-block:0;width:var(--gog-tabs-indicator-thickness);height:auto}:host(.gog-tabs--vertical) .gog-tabs__panels{flex:1 1 auto}:host(.gog-tabs--xsm){--gog-tabs-size-padding: var(--gog-tabs-xsm-padding);--gog-tabs-size-font-size: var(--gog-tabs-xsm-font-size)}:host(.gog-tabs--sm){--gog-tabs-size-padding: var(--gog-tabs-sm-padding);--gog-tabs-size-font-size: var(--gog-tabs-sm-font-size)}:host(.gog-tabs--md){--gog-tabs-size-padding: var(--gog-tabs-md-padding);--gog-tabs-size-font-size: var(--gog-tabs-md-font-size)}:host(.gog-tabs--lg){--gog-tabs-size-padding: var(--gog-tabs-lg-padding);--gog-tabs-size-font-size: var(--gog-tabs-lg-font-size)}:host(.gog-tabs--slg){--gog-tabs-size-padding: var(--gog-tabs-slg-padding);--gog-tabs-size-font-size: var(--gog-tabs-slg-font-size)}:host(.gog-host--full-width){width:100%}@media(prefers-reduced-motion:reduce){.gog-tabs__tab{transition:none}}\n"] }]
|
|
3688
|
+
}], ctorParameters: () => [], propDecorators: { tabs: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => TabComponent), { isSignal: true }] }], activeIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeIndex", required: false }] }, { type: i0.Output, args: ["activeIndexChange"] }], align: [{ type: i0.Input, args: [{ isSignal: true, alias: "align", required: false }] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], fullWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "fullWidth", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], ripple: [{ type: i0.Input, args: [{ isSignal: true, alias: "ripple", required: false }] }], scrollActiveIntoView: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrollActiveIntoView", required: false }] }], showScrollTrack: [{ type: i0.Input, args: [{ isSignal: true, alias: "showScrollTrack", required: false }] }], gogTabChange: [{ type: i0.Output, args: ["gogTabChange"] }], headerSlot: [{ type: i0.ContentChild, args: [i0.forwardRef(() => GogTabHeaderDirective), { isSignal: true }] }], headerRefs: [{ type: i0.ViewChildren, args: ['tabHeader', { isSignal: true }] }] } });
|
|
3689
|
+
|
|
3690
|
+
/**
|
|
3691
|
+
* Per-prefix counter behind every auto-generated DOM id in the library.
|
|
3692
|
+
*
|
|
3693
|
+
* A form control needs a real `id` whether or not the consumer supplied one: without it a
|
|
3694
|
+
* `<label for>` cannot point at the field (so clicking the label does not focus it, and
|
|
3695
|
+
* assistive tech gets no accessible name), and `aria-describedby` cannot point at the error
|
|
3696
|
+
* message. Making the consumer pass `inputId` for that is a trap — the field looks fine and is
|
|
3697
|
+
* quietly inaccessible.
|
|
3698
|
+
*
|
|
3699
|
+
* Counters are keyed by prefix rather than shared, so ids stay stable per component type
|
|
3700
|
+
* (`gog-input-1`, `gog-slider-1`) instead of depending on how many *other* controls happened to
|
|
3701
|
+
* be constructed first. That also keeps them predictable in tests and diffs.
|
|
3702
|
+
*
|
|
3703
|
+
* SSR/hydration-safe by construction: the server and the client walk the same component tree in
|
|
3704
|
+
* the same order, so both arrive at the same ids. Do not seed this with randomness for that
|
|
3705
|
+
* reason.
|
|
3706
|
+
*/
|
|
3707
|
+
const counters = new Map();
|
|
3708
|
+
/** Returns the next id for `prefix`, e.g. `nextGogControlId('gog-input')` → `'gog-input-3'`. */
|
|
3709
|
+
function nextGogControlId(prefix) {
|
|
3710
|
+
const next = (counters.get(prefix) ?? 0) + 1;
|
|
3711
|
+
counters.set(prefix, next);
|
|
3712
|
+
return `${prefix}-${next}`;
|
|
3713
|
+
}
|
|
3714
|
+
|
|
3715
|
+
/** Placeholder lines rendered under the title bar while `loading` is on. */
|
|
3716
|
+
const DEFAULT_SKELETON_LINES$1 = 2;
|
|
3717
|
+
/**
|
|
3718
|
+
* The card's heading. Put it on the consumer's own `<h2>`…`<h6>` — the heading level belongs to
|
|
3719
|
+
* the page, not to the component — and the card names itself with it: it takes the element's id
|
|
3720
|
+
* (generating one when it has none) and points its own `aria-labelledby` at it.
|
|
3721
|
+
*/
|
|
3722
|
+
class GogCardHeaderDirective {
|
|
3723
|
+
element = inject(ElementRef);
|
|
3724
|
+
/** The id the card labels itself with. A consumer-supplied `id` is kept as-is. */
|
|
3725
|
+
headerId;
|
|
3726
|
+
constructor() {
|
|
3727
|
+
const host = this.element.nativeElement;
|
|
3728
|
+
if (!host.id) {
|
|
3729
|
+
host.id = nextGogControlId('gog-card-header');
|
|
3730
|
+
}
|
|
3731
|
+
this.headerId = host.id;
|
|
3732
|
+
}
|
|
3733
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: GogCardHeaderDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
3734
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.17", type: GogCardHeaderDirective, isStandalone: true, selector: "[gogCardHeader]", host: { classAttribute: "gog-card__header" }, ngImport: i0 });
|
|
3735
|
+
}
|
|
3736
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: GogCardHeaderDirective, decorators: [{
|
|
3737
|
+
type: Directive,
|
|
3738
|
+
args: [{
|
|
3739
|
+
selector: '[gogCardHeader]',
|
|
3740
|
+
host: { class: 'gog-card__header' },
|
|
3741
|
+
}]
|
|
3742
|
+
}], ctorParameters: () => [] });
|
|
3743
|
+
/**
|
|
3744
|
+
* Full-bleed media — an `<img>`, `<video>` or `<picture>` that runs to the card's edges rather
|
|
3745
|
+
* than sitting inside its padding. Place it first inside the card to get the rounded top.
|
|
3746
|
+
*/
|
|
3747
|
+
class GogCardMediaDirective {
|
|
3748
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: GogCardMediaDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
3749
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.17", type: GogCardMediaDirective, isStandalone: true, selector: "[gogCardMedia]", host: { classAttribute: "gog-card__media" }, ngImport: i0 });
|
|
3750
|
+
}
|
|
3751
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: GogCardMediaDirective, decorators: [{
|
|
3752
|
+
type: Directive,
|
|
3753
|
+
args: [{
|
|
3754
|
+
selector: '[gogCardMedia]',
|
|
3755
|
+
host: { class: 'gog-card__media' },
|
|
3756
|
+
}]
|
|
3757
|
+
}] });
|
|
3758
|
+
/** The card's footer row — actions, a summary line. Separated from the body by a rule. */
|
|
3759
|
+
class GogCardFooterDirective {
|
|
3760
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: GogCardFooterDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
3761
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.17", type: GogCardFooterDirective, isStandalone: true, selector: "[gogCardFooter]", host: { classAttribute: "gog-card__footer" }, ngImport: i0 });
|
|
3762
|
+
}
|
|
3763
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: GogCardFooterDirective, decorators: [{
|
|
3764
|
+
type: Directive,
|
|
3765
|
+
args: [{
|
|
3766
|
+
selector: '[gogCardFooter]',
|
|
3767
|
+
host: { class: 'gog-card__footer' },
|
|
3768
|
+
}]
|
|
3769
|
+
}] });
|
|
3770
|
+
/**
|
|
3771
|
+
* A surface for one self-contained thing: a product tile, a summary, a search result.
|
|
3772
|
+
*
|
|
3773
|
+
* It paints a background, a border and a radius — which a CSS class could also do — and then
|
|
3774
|
+
* three things a class cannot:
|
|
3775
|
+
*
|
|
3776
|
+
* 1. **It names itself.** A `gogCardHeader` heading becomes the card's accessible name via
|
|
3777
|
+
* `aria-labelledby`, and the card announces itself as a group, so the boundary between one
|
|
3778
|
+
* card and the next exists for a screen reader too. (`role="group"`, not `region`: a grid of
|
|
3779
|
+
* twenty cards would put twenty landmarks in the landmark list, which is worse than none.)
|
|
3780
|
+
* 2. **It makes the whole surface clickable without inventing a control.** See `gogCardLink`.
|
|
3781
|
+
* 3. **It folds in `loading` and `disabled`**, including `aria-busy` and taking the card's own
|
|
3782
|
+
* link out of the tab order — the wiring every consumer would otherwise repeat per card.
|
|
3783
|
+
*/
|
|
3784
|
+
class CardComponent {
|
|
3785
|
+
variant = input('outlined', ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
|
|
3786
|
+
size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
3787
|
+
/** Dims the card and takes its `gogCardLink` out of the tab order. */
|
|
3788
|
+
disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
3789
|
+
/**
|
|
3790
|
+
* Replaces the card's content with placeholder bars shaped like a title and a few lines of
|
|
3791
|
+
* text, and marks the host `aria-busy`. For a *refresh* of a card that already has content —
|
|
3792
|
+
* where the shape is already on screen and should stay — project a `gog-spinner-overlay`
|
|
3793
|
+
* instead; this treatment is the first-paint one.
|
|
3794
|
+
*/
|
|
3795
|
+
loading = input(false, { ...(ngDevMode ? { debugName: "loading" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
3796
|
+
/** Text lines under the title bar while `loading` is on. */
|
|
3797
|
+
skeletonLines = input(DEFAULT_SKELETON_LINES$1, ...(ngDevMode ? [{ debugName: "skeletonLines" }] : /* istanbul ignore next */ []));
|
|
3798
|
+
header = contentChild(GogCardHeaderDirective, ...(ngDevMode ? [{ debugName: "header" }] : /* istanbul ignore next */ []));
|
|
3799
|
+
link = contentChild(GogCardLinkDirective, { ...(ngDevMode ? { debugName: "link" } : /* istanbul ignore next */ {}), descendants: true });
|
|
3800
|
+
labelledBy = computed(() => this.header()?.headerId ?? null, ...(ngDevMode ? [{ debugName: "labelledBy" }] : /* istanbul ignore next */ []));
|
|
3801
|
+
/** A card is interactive because something in it is a real link or button, never by input. */
|
|
3802
|
+
interactive = computed(() => this.link() !== undefined, ...(ngDevMode ? [{ debugName: "interactive" }] : /* istanbul ignore next */ []));
|
|
3803
|
+
/** Disabled or loading: the surface is still readable, but nothing in it can be activated. */
|
|
3804
|
+
inert = computed(() => this.disabled() || this.loading(), ...(ngDevMode ? [{ debugName: "inert" }] : /* istanbul ignore next */ []));
|
|
3805
|
+
hostClasses = computed(() => [
|
|
3806
|
+
'gog-card',
|
|
3807
|
+
`gog-card--${this.variant()}`,
|
|
3808
|
+
`gog-card--${this.size()}`,
|
|
3809
|
+
this.interactive() ? 'gog-card--interactive' : null,
|
|
3810
|
+
this.disabled() ? 'gog-card--disabled' : null,
|
|
3811
|
+
this.loading() ? 'gog-card--loading' : null,
|
|
3812
|
+
]
|
|
3813
|
+
.filter((className) => className !== null)
|
|
3814
|
+
.join(' '), ...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
|
|
3815
|
+
constructor() {
|
|
3816
|
+
/*
|
|
3817
|
+
* The link is the *consumer's* `<a>`/`<button>`, so `disabled` has to reach it from here.
|
|
3818
|
+
* `pointer-events: none` (surfaces.css) stops the pointer; only removing the tab stop stops
|
|
3819
|
+
* the keyboard, and there is no attribute binding to put on an element this component does
|
|
3820
|
+
* not render. A tabindex the consumer set themselves is put back rather than deleted.
|
|
3821
|
+
*/
|
|
3822
|
+
let restoreTabIndex = null;
|
|
3823
|
+
effect(() => {
|
|
3824
|
+
const host = this.link()?.elementRef.nativeElement;
|
|
3825
|
+
if (!host)
|
|
3826
|
+
return;
|
|
3827
|
+
if (this.inert()) {
|
|
3828
|
+
restoreTabIndex = host.getAttribute('tabindex');
|
|
3829
|
+
host.setAttribute('tabindex', '-1');
|
|
3830
|
+
host.setAttribute('aria-disabled', 'true');
|
|
3831
|
+
return;
|
|
3832
|
+
}
|
|
3833
|
+
host.removeAttribute('aria-disabled');
|
|
3834
|
+
if (restoreTabIndex === null) {
|
|
3835
|
+
host.removeAttribute('tabindex');
|
|
3836
|
+
}
|
|
3837
|
+
else {
|
|
3838
|
+
host.setAttribute('tabindex', restoreTabIndex);
|
|
3839
|
+
}
|
|
3840
|
+
});
|
|
3841
|
+
}
|
|
3842
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: CardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3843
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: CardComponent, isStandalone: true, selector: "gog-card", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, skeletonLines: { classPropertyName: "skeletonLines", publicName: "skeletonLines", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "hostClasses()", "attr.role": "labelledBy() ? \"group\" : null", "attr.aria-labelledby": "labelledBy()", "attr.aria-busy": "loading() ? \"true\" : null", "attr.aria-disabled": "disabled() ? \"true\" : null" } }, queries: [{ propertyName: "header", first: true, predicate: GogCardHeaderDirective, descendants: true, isSignal: true }, { propertyName: "link", first: true, predicate: GogCardLinkDirective, descendants: true, isSignal: true }], ngImport: i0, template: "@if (loading()) {\r\n <!--\r\n Shaped like the content that is coming \u2014 a title bar and a few text lines \u2014 rather than a\r\n spinner: a card owns a region, and the point of a region's placeholder is that nothing moves\r\n when the data lands. `aria-hidden` because the host already says `aria-busy`.\r\n -->\r\n <div class=\"gog-card__placeholder\" aria-hidden=\"true\">\r\n <gog-skeleton shape=\"text\" [size]=\"size()\" width=\"60%\" />\r\n @if (skeletonLines() > 0) {\r\n <gog-skeleton shape=\"text\" [size]=\"size()\" [lines]=\"skeletonLines()\" />\r\n }\r\n </div>\r\n}\r\n\r\n<div class=\"gog-card__content\" [class.gog-card__content--hidden]=\"loading()\">\r\n <ng-content select=\"[gogCardMedia]\" />\r\n <ng-content select=\"[gogCardHeader]\" />\r\n\r\n <!--\r\n The default slot gets a wrapper of its own so the card's row gap separates media, heading,\r\n body and footer \u2014 and nothing else. Without it every element a consumer projects would become\r\n a flex item and be spaced by that same gap, which quietly overrides their own layout.\r\n -->\r\n <div class=\"gog-card__body\"><ng-content /></div>\r\n\r\n <ng-content select=\"[gogCardFooter]\" />\r\n</div>\r\n", styles: ["@charset \"UTF-8\";:host{position:relative;display:block;padding:var(--gog-card-padding-y, var(--gog-card-size-padding-y, var(--gog-card-md-padding-y))) var(--gog-card-padding-x, var(--gog-card-size-padding-x, var(--gog-card-md-padding-x)));border:var(--gog-card-border-width) var(--gog-card-border-style) var(--gog-card-border-color, var(--gog-card-variant-border-color, var(--gog-card-outlined-border-color)));border-radius:var(--gog-card-radius);background:var(--gog-card-bg, var(--gog-card-variant-bg, var(--gog-card-outlined-bg)));box-shadow:var(--gog-card-shadow, var(--gog-card-variant-shadow, var(--gog-card-outlined-shadow)));color:var(--gog-card-color);font-family:var(--gog-card-font-family);transition:border-color var(--gog-card-transition-duration) var(--gog-easing),box-shadow var(--gog-card-transition-duration) var(--gog-easing)}:host(.gog-card--outlined){--gog-card-variant-bg: var(--gog-card-outlined-bg);--gog-card-variant-border-color: var(--gog-card-outlined-border-color);--gog-card-variant-shadow: var(--gog-card-outlined-shadow)}:host(.gog-card--elevated){--gog-card-variant-bg: var(--gog-card-elevated-bg);--gog-card-variant-border-color: var(--gog-card-elevated-border-color);--gog-card-variant-shadow: var(--gog-card-elevated-shadow)}:host(.gog-card--filled){--gog-card-variant-bg: var(--gog-card-filled-bg);--gog-card-variant-border-color: var(--gog-card-filled-border-color);--gog-card-variant-shadow: var(--gog-card-filled-shadow)}:host(.gog-card--xsm){--gog-card-size-padding-y: var(--gog-card-xsm-padding-y);--gog-card-size-padding-x: var(--gog-card-xsm-padding-x);--gog-card-size-gap: var(--gog-card-xsm-gap)}:host(.gog-card--sm){--gog-card-size-padding-y: var(--gog-card-sm-padding-y);--gog-card-size-padding-x: var(--gog-card-sm-padding-x);--gog-card-size-gap: var(--gog-card-sm-gap)}:host(.gog-card--md){--gog-card-size-padding-y: var(--gog-card-md-padding-y);--gog-card-size-padding-x: var(--gog-card-md-padding-x);--gog-card-size-gap: var(--gog-card-md-gap)}:host(.gog-card--lg){--gog-card-size-padding-y: var(--gog-card-lg-padding-y);--gog-card-size-padding-x: var(--gog-card-lg-padding-x);--gog-card-size-gap: var(--gog-card-lg-gap)}:host(.gog-card--slg){--gog-card-size-padding-y: var(--gog-card-slg-padding-y);--gog-card-size-padding-x: var(--gog-card-slg-padding-x);--gog-card-size-gap: var(--gog-card-slg-gap)}:host(.gog-card--interactive){cursor:pointer}:host(.gog-card--interactive:hover){border-color:var(--gog-card-hover-border-color);box-shadow:var(--gog-card-hover-shadow)}:host(.gog-card--disabled){cursor:not-allowed;opacity:var(--gog-card-disabled-opacity)}.gog-card__content{display:flex;flex-direction:column;gap:var(--gog-card-gap, var(--gog-card-size-gap, var(--gog-card-md-gap)))}.gog-card__content--hidden{display:none}.gog-card__body{min-width:0}.gog-card__body:empty{display:none}.gog-card__placeholder{display:flex;flex-direction:column;gap:var(--gog-card-gap, var(--gog-card-size-gap, var(--gog-card-md-gap)))}@media(prefers-reduced-motion:reduce){:host{transition:none}}\n"], dependencies: [{ kind: "component", type: SkeletonComponent, selector: "gog-skeleton", inputs: ["shape", "size", "animation", "width", "height", "lines", "rounded", "ariaLabel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3844
|
+
}
|
|
3845
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: CardComponent, decorators: [{
|
|
3846
|
+
type: Component,
|
|
3847
|
+
args: [{ selector: 'gog-card', imports: [SkeletonComponent], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
3848
|
+
'[class]': 'hostClasses()',
|
|
3849
|
+
// A card with a heading is a named group; one without has nothing to be named by, and an
|
|
3850
|
+
// unnamed group is noise in the accessibility tree rather than structure.
|
|
3851
|
+
'[attr.role]': 'labelledBy() ? "group" : null',
|
|
3852
|
+
'[attr.aria-labelledby]': 'labelledBy()',
|
|
3853
|
+
'[attr.aria-busy]': 'loading() ? "true" : null',
|
|
3854
|
+
'[attr.aria-disabled]': 'disabled() ? "true" : null',
|
|
3855
|
+
}, template: "@if (loading()) {\r\n <!--\r\n Shaped like the content that is coming \u2014 a title bar and a few text lines \u2014 rather than a\r\n spinner: a card owns a region, and the point of a region's placeholder is that nothing moves\r\n when the data lands. `aria-hidden` because the host already says `aria-busy`.\r\n -->\r\n <div class=\"gog-card__placeholder\" aria-hidden=\"true\">\r\n <gog-skeleton shape=\"text\" [size]=\"size()\" width=\"60%\" />\r\n @if (skeletonLines() > 0) {\r\n <gog-skeleton shape=\"text\" [size]=\"size()\" [lines]=\"skeletonLines()\" />\r\n }\r\n </div>\r\n}\r\n\r\n<div class=\"gog-card__content\" [class.gog-card__content--hidden]=\"loading()\">\r\n <ng-content select=\"[gogCardMedia]\" />\r\n <ng-content select=\"[gogCardHeader]\" />\r\n\r\n <!--\r\n The default slot gets a wrapper of its own so the card's row gap separates media, heading,\r\n body and footer \u2014 and nothing else. Without it every element a consumer projects would become\r\n a flex item and be spaced by that same gap, which quietly overrides their own layout.\r\n -->\r\n <div class=\"gog-card__body\"><ng-content /></div>\r\n\r\n <ng-content select=\"[gogCardFooter]\" />\r\n</div>\r\n", styles: ["@charset \"UTF-8\";:host{position:relative;display:block;padding:var(--gog-card-padding-y, var(--gog-card-size-padding-y, var(--gog-card-md-padding-y))) var(--gog-card-padding-x, var(--gog-card-size-padding-x, var(--gog-card-md-padding-x)));border:var(--gog-card-border-width) var(--gog-card-border-style) var(--gog-card-border-color, var(--gog-card-variant-border-color, var(--gog-card-outlined-border-color)));border-radius:var(--gog-card-radius);background:var(--gog-card-bg, var(--gog-card-variant-bg, var(--gog-card-outlined-bg)));box-shadow:var(--gog-card-shadow, var(--gog-card-variant-shadow, var(--gog-card-outlined-shadow)));color:var(--gog-card-color);font-family:var(--gog-card-font-family);transition:border-color var(--gog-card-transition-duration) var(--gog-easing),box-shadow var(--gog-card-transition-duration) var(--gog-easing)}:host(.gog-card--outlined){--gog-card-variant-bg: var(--gog-card-outlined-bg);--gog-card-variant-border-color: var(--gog-card-outlined-border-color);--gog-card-variant-shadow: var(--gog-card-outlined-shadow)}:host(.gog-card--elevated){--gog-card-variant-bg: var(--gog-card-elevated-bg);--gog-card-variant-border-color: var(--gog-card-elevated-border-color);--gog-card-variant-shadow: var(--gog-card-elevated-shadow)}:host(.gog-card--filled){--gog-card-variant-bg: var(--gog-card-filled-bg);--gog-card-variant-border-color: var(--gog-card-filled-border-color);--gog-card-variant-shadow: var(--gog-card-filled-shadow)}:host(.gog-card--xsm){--gog-card-size-padding-y: var(--gog-card-xsm-padding-y);--gog-card-size-padding-x: var(--gog-card-xsm-padding-x);--gog-card-size-gap: var(--gog-card-xsm-gap)}:host(.gog-card--sm){--gog-card-size-padding-y: var(--gog-card-sm-padding-y);--gog-card-size-padding-x: var(--gog-card-sm-padding-x);--gog-card-size-gap: var(--gog-card-sm-gap)}:host(.gog-card--md){--gog-card-size-padding-y: var(--gog-card-md-padding-y);--gog-card-size-padding-x: var(--gog-card-md-padding-x);--gog-card-size-gap: var(--gog-card-md-gap)}:host(.gog-card--lg){--gog-card-size-padding-y: var(--gog-card-lg-padding-y);--gog-card-size-padding-x: var(--gog-card-lg-padding-x);--gog-card-size-gap: var(--gog-card-lg-gap)}:host(.gog-card--slg){--gog-card-size-padding-y: var(--gog-card-slg-padding-y);--gog-card-size-padding-x: var(--gog-card-slg-padding-x);--gog-card-size-gap: var(--gog-card-slg-gap)}:host(.gog-card--interactive){cursor:pointer}:host(.gog-card--interactive:hover){border-color:var(--gog-card-hover-border-color);box-shadow:var(--gog-card-hover-shadow)}:host(.gog-card--disabled){cursor:not-allowed;opacity:var(--gog-card-disabled-opacity)}.gog-card__content{display:flex;flex-direction:column;gap:var(--gog-card-gap, var(--gog-card-size-gap, var(--gog-card-md-gap)))}.gog-card__content--hidden{display:none}.gog-card__body{min-width:0}.gog-card__body:empty{display:none}.gog-card__placeholder{display:flex;flex-direction:column;gap:var(--gog-card-gap, var(--gog-card-size-gap, var(--gog-card-md-gap)))}@media(prefers-reduced-motion:reduce){:host{transition:none}}\n"] }]
|
|
3856
|
+
}], ctorParameters: () => [], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], skeletonLines: [{ type: i0.Input, args: [{ isSignal: true, alias: "skeletonLines", required: false }] }], header: [{ type: i0.ContentChild, args: [i0.forwardRef(() => GogCardHeaderDirective), { isSignal: true }] }], link: [{ type: i0.ContentChild, args: [i0.forwardRef(() => GogCardLinkDirective), { ...{ descendants: true }, isSignal: true }] }] } });
|
|
3857
|
+
/**
|
|
3858
|
+
* Makes the whole card activate this link — put it on the `<a>` (or `<button>`) the card is
|
|
3859
|
+
* *about*, usually the one inside its heading:
|
|
3860
|
+
*
|
|
3861
|
+
* ```html
|
|
3862
|
+
* <gog-card>
|
|
3863
|
+
* <h3 gogCardHeader><a gogCardLink routerLink="/people/ada">Ada Lovelace</a></h3>
|
|
3864
|
+
* <p>Mathematician, 1815–1852.</p>
|
|
3865
|
+
* </gog-card>
|
|
3866
|
+
* ```
|
|
3867
|
+
*
|
|
3868
|
+
* ## Why this, and not an `interactive` input
|
|
3869
|
+
*
|
|
3870
|
+
* The obvious API — `<gog-card interactive (gogClick)>` — has the component render a `<button>`
|
|
3871
|
+
* or an `<a>` of its own, and that goes wrong in three ways this does not:
|
|
3872
|
+
*
|
|
3873
|
+
* - **Nothing else in the card could be interactive.** A `<button>` may not contain a button or
|
|
3874
|
+
* a link, so a card with actions in its footer would be invalid markup with a broken tab order.
|
|
3875
|
+
* - **It could not navigate the way an app navigates.** `routerLink` lives on the consumer's
|
|
3876
|
+
* element; a card rendering its own `<a>` would have to broker the router's whole input
|
|
3877
|
+
* surface, which is exactly why `[gogButton]` is a directive rather than a link mode on
|
|
3878
|
+
* `gog-button`.
|
|
3879
|
+
* - **The accessible name would be the card's entire text**, because that is what a button
|
|
3880
|
+
* wrapping everything announces.
|
|
3881
|
+
*
|
|
3882
|
+
* Here the link stays a real link — its href, its keyboard behaviour, its middle-click, its
|
|
3883
|
+
* "open in new tab" — and only its *hit area* is stretched over the card, with the card's focus
|
|
3884
|
+
* ring drawn around the surface when it is focused. Anything else focusable inside an
|
|
3885
|
+
* interactive card sits above that hit area automatically (see `surfaces.css`).
|
|
3886
|
+
*
|
|
3887
|
+
* The two costs of the pattern, both inherent to it: text inside the card cannot be selected by
|
|
3888
|
+
* dragging across it, and a second link in the card is reached by keyboard but not by clicking
|
|
3889
|
+
* the surface around it.
|
|
3890
|
+
*/
|
|
3891
|
+
class GogCardLinkDirective {
|
|
3892
|
+
elementRef = inject(ElementRef);
|
|
3893
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: GogCardLinkDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
3894
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.17", type: GogCardLinkDirective, isStandalone: true, selector: "a[gogCardLink], button[gogCardLink]", host: { classAttribute: "gog-card__link" }, ngImport: i0 });
|
|
3895
|
+
}
|
|
3896
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: GogCardLinkDirective, decorators: [{
|
|
3897
|
+
type: Directive,
|
|
3898
|
+
args: [{
|
|
3899
|
+
// Restricted to the two elements that are already a control, for the same reason
|
|
3900
|
+
// `[gogButton]` is: on a `<div>` this would look clickable and be invisible to the keyboard.
|
|
3901
|
+
selector: 'a[gogCardLink], button[gogCardLink]',
|
|
3902
|
+
host: { class: 'gog-card__link' },
|
|
3903
|
+
}]
|
|
3904
|
+
}] });
|
|
3905
|
+
|
|
3906
|
+
/** Accessible name for the collapse toggle of a panel that has no heading to borrow one from. */
|
|
3907
|
+
const DEFAULT_TOGGLE_LABEL = 'Toggle section';
|
|
3908
|
+
/** Placeholder lines rendered in place of the panel's body while `loading` is on. */
|
|
3909
|
+
const DEFAULT_SKELETON_LINES = 3;
|
|
3910
|
+
/**
|
|
3911
|
+
* The panel's heading. Put it on the consumer's own `<h2>`…`<h6>`: the level belongs to the
|
|
3912
|
+
* page's outline, and this is a *region* of a page — the one place a real heading matters most.
|
|
3913
|
+
* The panel takes the element's id (generating one when it has none) and uses it twice: as its
|
|
3914
|
+
* own `aria-labelledby`, and as the accessible name of the collapse toggle.
|
|
3915
|
+
*/
|
|
3916
|
+
class GogPanelHeaderDirective {
|
|
3917
|
+
element = inject(ElementRef);
|
|
3918
|
+
/** The id the panel labels itself and its toggle with. A consumer-supplied `id` is kept. */
|
|
3919
|
+
headerId;
|
|
3920
|
+
constructor() {
|
|
3921
|
+
const host = this.element.nativeElement;
|
|
3922
|
+
if (!host.id) {
|
|
3923
|
+
host.id = nextGogControlId('gog-panel-header');
|
|
3924
|
+
}
|
|
3925
|
+
this.headerId = host.id;
|
|
3926
|
+
}
|
|
3927
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: GogPanelHeaderDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
3928
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.17", type: GogPanelHeaderDirective, isStandalone: true, selector: "[gogPanelHeader]", host: { classAttribute: "gog-panel__heading" }, ngImport: i0 });
|
|
3929
|
+
}
|
|
3930
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: GogPanelHeaderDirective, decorators: [{
|
|
3931
|
+
type: Directive,
|
|
3932
|
+
args: [{
|
|
3933
|
+
selector: '[gogPanelHeader]',
|
|
3934
|
+
host: { class: 'gog-panel__heading' },
|
|
3935
|
+
}]
|
|
3936
|
+
}], ctorParameters: () => [] });
|
|
3937
|
+
/** The panel's footer row — actions, a summary. Collapses with the body. */
|
|
3938
|
+
class GogPanelFooterDirective {
|
|
3939
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: GogPanelFooterDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
3940
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.17", type: GogPanelFooterDirective, isStandalone: true, selector: "[gogPanelFooter]", host: { classAttribute: "gog-panel__footer" }, ngImport: i0 });
|
|
3941
|
+
}
|
|
3942
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: GogPanelFooterDirective, decorators: [{
|
|
3943
|
+
type: Directive,
|
|
3944
|
+
args: [{
|
|
3945
|
+
selector: '[gogPanelFooter]',
|
|
3946
|
+
host: { class: 'gog-panel__footer' },
|
|
3947
|
+
}]
|
|
3948
|
+
}] });
|
|
3949
|
+
/**
|
|
3950
|
+
* A titled region of a page: a settings section, a dashboard area, a form group.
|
|
3951
|
+
*
|
|
3952
|
+
* Where `gog-card` is one self-contained thing, often repeated in a grid, a panel is a part of
|
|
3953
|
+
* *this* page — so the two differ in behaviour, not only in size:
|
|
3954
|
+
*
|
|
3955
|
+
* - the panel is a real landmark (`role="region"` named by its heading), because a handful of
|
|
3956
|
+
* named regions is how a screen-reader user navigates a page, whereas a landmark per card
|
|
3957
|
+
* would bury that list;
|
|
3958
|
+
* - it can **collapse**, composing `gog-collapsible` rather than repeating it, so the open/close
|
|
3959
|
+
* state, the id wiring and the animation are the ones the rest of the library already uses;
|
|
3960
|
+
* - a card's whole surface can be a link (`gogCardLink`); a panel's cannot. Controls live
|
|
3961
|
+
* *inside* a panel, and a region that is itself a link cannot hold them.
|
|
3962
|
+
*
|
|
3963
|
+
* The heading stays a heading. The toggle is a separate `<button>` labelled by it, whose hit
|
|
3964
|
+
* area covers the header row — so the pointer gets "click the title to collapse" while the
|
|
3965
|
+
* screen reader still gets a heading *and* a named, expandable button, instead of a heading
|
|
3966
|
+
* swallowed by `role="button"`.
|
|
3967
|
+
*/
|
|
3968
|
+
class PanelComponent {
|
|
3969
|
+
variant = input('elevated', ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
|
|
3970
|
+
size = input('lg', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
3971
|
+
/** Adds the collapse toggle to the header row. The body animates open and closed. */
|
|
3972
|
+
collapsible = input(false, { ...(ngDevMode ? { debugName: "collapsible" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
3973
|
+
/** Two-way bindable: `[(open)]="isOpen"`. Ignored while `collapsible` is off. */
|
|
3974
|
+
open = model(true, ...(ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []));
|
|
3975
|
+
disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
3976
|
+
/**
|
|
3977
|
+
* Replaces the panel's body with placeholder lines and marks the host `aria-busy`. The
|
|
3978
|
+
* heading stays: a page section is titled before its content arrives, and blanking the title
|
|
3979
|
+
* too would move the layout twice.
|
|
3980
|
+
*/
|
|
3981
|
+
loading = input(false, { ...(ngDevMode ? { debugName: "loading" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
3982
|
+
/** Placeholder lines shown in place of the body while `loading` is on. */
|
|
3983
|
+
skeletonLines = input(DEFAULT_SKELETON_LINES, ...(ngDevMode ? [{ debugName: "skeletonLines" }] : /* istanbul ignore next */ []));
|
|
3984
|
+
header = contentChild(GogPanelHeaderDirective, ...(ngDevMode ? [{ debugName: "header" }] : /* istanbul ignore next */ []));
|
|
3985
|
+
globalConfig = inject(GOG_CONFIG);
|
|
3986
|
+
labelledBy = computed(() => this.header()?.headerId ?? null, ...(ngDevMode ? [{ debugName: "labelledBy" }] : /* istanbul ignore next */ []));
|
|
3987
|
+
/** Only used when there is no heading — otherwise the toggle is named by the heading. */
|
|
3988
|
+
toggleLabel = computed(() => resolveConfigured(undefined, this.globalConfig.labels?.togglePanel, DEFAULT_TOGGLE_LABEL), ...(ngDevMode ? [{ debugName: "toggleLabel" }] : /* istanbul ignore next */ []));
|
|
3989
|
+
/** A panel that cannot collapse is always open, whatever `open` was last set to. */
|
|
3990
|
+
effectiveOpen = computed(() => (this.collapsible() ? this.open() : true), ...(ngDevMode ? [{ debugName: "effectiveOpen" }] : /* istanbul ignore next */ []));
|
|
3991
|
+
hostClasses = computed(() => [
|
|
3992
|
+
'gog-panel',
|
|
3993
|
+
`gog-panel--${this.variant()}`,
|
|
3994
|
+
`gog-panel--${this.size()}`,
|
|
3995
|
+
this.collapsible() ? 'gog-panel--collapsible' : null,
|
|
3996
|
+
this.collapsible() && !this.open() ? 'gog-panel--closed' : null,
|
|
3997
|
+
this.disabled() ? 'gog-panel--disabled' : null,
|
|
3998
|
+
this.loading() ? 'gog-panel--loading' : null,
|
|
3999
|
+
]
|
|
4000
|
+
.filter((className) => className !== null)
|
|
4001
|
+
.join(' '), ...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
|
|
4002
|
+
onOpenChange(open) {
|
|
4003
|
+
if (this.collapsible()) {
|
|
4004
|
+
this.open.set(open);
|
|
4005
|
+
}
|
|
4006
|
+
}
|
|
4007
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: PanelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4008
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: PanelComponent, isStandalone: true, selector: "gog-panel", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, collapsible: { classPropertyName: "collapsible", publicName: "collapsible", isSignal: true, isRequired: false, transformFunction: null }, open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, skeletonLines: { classPropertyName: "skeletonLines", publicName: "skeletonLines", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "openChange" }, host: { properties: { "class": "hostClasses()", "attr.role": "labelledBy() ? \"region\" : null", "attr.aria-labelledby": "labelledBy()", "attr.aria-busy": "loading() ? \"true\" : null", "attr.aria-disabled": "disabled() ? \"true\" : null" } }, queries: [{ propertyName: "header", first: true, predicate: GogPanelHeaderDirective, descendants: true, isSignal: true }], ngImport: i0, template: "<!--\r\n `gog-collapsible` wraps the whole panel even when `collapsible` is off: it is `display:\r\n contents`, so it adds no box, and keeping it unconditional is what lets the body carry\r\n `gogCollapsibleContent` in one place instead of duplicating every `<ng-content>` across two\r\n branches. A non-collapsible panel is simply always open, and `--static` undoes the closed-state\r\n geometry the shared class brings with it.\r\n-->\r\n<gog-collapsible\r\n [open]=\"effectiveOpen()\"\r\n (openChange)=\"onOpenChange($event)\"\r\n [disabled]=\"disabled()\"\r\n>\r\n @if (labelledBy() || collapsible()) {\r\n <div class=\"gog-panel__header\">\r\n <ng-content select=\"[gogPanelHeader]\" />\r\n\r\n @if (collapsible()) {\r\n <!--\r\n Named by the heading rather than wrapping it. A `<button>` may not contain an `<h2>`,\r\n and giving the heading `role=\"button\"` instead would delete it from the heading list \u2014\r\n so the button is its own element, and its hit area is stretched across the header row\r\n in the stylesheet to keep \"click the title\" working for the pointer.\r\n -->\r\n <button\r\n gogCollapsibleTrigger\r\n class=\"gog-panel__toggle\"\r\n type=\"button\"\r\n [attr.aria-labelledby]=\"labelledBy()\"\r\n [attr.aria-label]=\"labelledBy() ? null : toggleLabel()\"\r\n >\r\n <gog-icon class=\"gog-panel__chevron\" name=\"chevron-down\" />\r\n </button>\r\n }\r\n </div>\r\n }\r\n\r\n <div\r\n gogCollapsibleContent\r\n class=\"gog-panel__content\"\r\n [class.gog-panel__content--static]=\"!collapsible()\"\r\n >\r\n @if (loading()) {\r\n <div class=\"gog-panel__placeholder\" aria-hidden=\"true\">\r\n <gog-skeleton shape=\"text\" [size]=\"size()\" [lines]=\"skeletonLines()\" />\r\n </div>\r\n }\r\n\r\n <div class=\"gog-panel__body\" [class.gog-panel__body--hidden]=\"loading()\">\r\n <ng-content />\r\n </div>\r\n\r\n <ng-content select=\"[gogPanelFooter]\" />\r\n </div>\r\n</gog-collapsible>\r\n", styles: ["@charset \"UTF-8\";:host{display:block;padding:var(--gog-panel-padding-y, var(--gog-panel-size-padding-y, var(--gog-panel-lg-padding-y))) var(--gog-panel-padding-x, var(--gog-panel-size-padding-x, var(--gog-panel-lg-padding-x)));border:var(--gog-panel-border-width) var(--gog-panel-border-style) var(--gog-panel-border-color, var(--gog-panel-variant-border-color, var(--gog-panel-elevated-border-color)));border-radius:var(--gog-panel-radius);background:var(--gog-panel-bg, var(--gog-panel-variant-bg, var(--gog-panel-elevated-bg)));box-shadow:var(--gog-panel-variant-shadow, var(--gog-panel-shadow));color:var(--gog-panel-color);font-family:var(--gog-panel-font-family)}:host(.gog-panel--outlined){--gog-panel-variant-bg: var(--gog-panel-outlined-bg);--gog-panel-variant-border-color: var(--gog-panel-outlined-border-color);--gog-panel-variant-shadow: var(--gog-panel-outlined-shadow)}:host(.gog-panel--elevated){--gog-panel-variant-bg: var(--gog-panel-elevated-bg);--gog-panel-variant-border-color: var(--gog-panel-elevated-border-color);--gog-panel-variant-shadow: var(--gog-panel-shadow)}:host(.gog-panel--filled){--gog-panel-variant-bg: var(--gog-panel-filled-bg);--gog-panel-variant-border-color: var(--gog-panel-filled-border-color);--gog-panel-variant-shadow: var(--gog-panel-filled-shadow)}:host(.gog-panel--xsm){--gog-panel-size-padding-y: var(--gog-panel-xsm-padding-y);--gog-panel-size-padding-x: var(--gog-panel-xsm-padding-x);--gog-panel-size-gap: var(--gog-panel-xsm-gap)}:host(.gog-panel--sm){--gog-panel-size-padding-y: var(--gog-panel-sm-padding-y);--gog-panel-size-padding-x: var(--gog-panel-sm-padding-x);--gog-panel-size-gap: var(--gog-panel-sm-gap)}:host(.gog-panel--md){--gog-panel-size-padding-y: var(--gog-panel-md-padding-y);--gog-panel-size-padding-x: var(--gog-panel-md-padding-x);--gog-panel-size-gap: var(--gog-panel-md-gap)}:host(.gog-panel--lg){--gog-panel-size-padding-y: var(--gog-panel-lg-padding-y);--gog-panel-size-padding-x: var(--gog-panel-lg-padding-x);--gog-panel-size-gap: var(--gog-panel-lg-gap)}:host(.gog-panel--slg){--gog-panel-size-padding-y: var(--gog-panel-slg-padding-y);--gog-panel-size-padding-x: var(--gog-panel-slg-padding-x);--gog-panel-size-gap: var(--gog-panel-slg-gap)}:host(.gog-panel--disabled){opacity:var(--gog-panel-disabled-opacity)}.gog-panel__header{position:relative;display:flex;align-items:center;justify-content:space-between;gap:var(--gog-panel-header-gap);margin-block-end:var(--gog-panel-gap, var(--gog-panel-size-gap, var(--gog-panel-lg-gap)))}:host(.gog-panel--closed) .gog-panel__header{margin-block-end:0}.gog-panel__toggle{display:inline-flex;flex:none;align-items:center;justify-content:center;width:var(--gog-panel-toggle-size);height:var(--gog-panel-toggle-size);padding:0;border:none;border-radius:var(--gog-panel-toggle-radius);background:none;color:var(--gog-panel-toggle-color)}.gog-panel__toggle:after{position:absolute;inset:0;content:\"\"}.gog-panel__toggle:hover{background:var(--gog-panel-toggle-hover-bg)}.gog-panel__toggle:focus-visible{outline:none}.gog-panel__toggle:focus-visible:after{border-radius:var(--gog-panel-toggle-radius);outline:var(--gog-panel-focus-ring-width) solid var(--gog-panel-focus-ring);outline-offset:var(--gog-panel-focus-ring-offset)}.gog-panel__chevron{width:var(--gog-panel-chevron-size);height:var(--gog-panel-chevron-size);transition:transform var(--gog-panel-transition-duration) var(--gog-easing)}:host(.gog-panel--closed) .gog-panel__chevron{transform:rotate(calc(var(--gog-direction-sign) * -90deg))}.gog-panel__content{display:flex;flex-direction:column;gap:var(--gog-panel-gap, var(--gog-panel-size-gap, var(--gog-panel-lg-gap)))}.gog-panel__content--static{max-height:none;overflow:visible;opacity:1;transition:none}.gog-panel__body{min-width:0}.gog-panel__body:empty{display:none}.gog-panel__body--hidden{display:none}@media(prefers-reduced-motion:reduce){.gog-panel__chevron{transition:none}}\n"], dependencies: [{ kind: "component", type: CollapsibleComponent, selector: "gog-collapsible", inputs: ["open", "disabled", "collapseOnFocusOut"], outputs: ["openChange"] }, { kind: "directive", type: GogCollapsibleContentDirective, selector: "[gogCollapsibleContent]" }, { kind: "directive", type: GogCollapsibleTriggerDirective, selector: "[gogCollapsibleTrigger]", inputs: ["ripple"] }, { kind: "component", type: IconComponent, selector: "gog-icon", inputs: ["name", "template", "title", "ariaHidden"] }, { kind: "component", type: SkeletonComponent, selector: "gog-skeleton", inputs: ["shape", "size", "animation", "width", "height", "lines", "rounded", "ariaLabel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4009
|
+
}
|
|
4010
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: PanelComponent, decorators: [{
|
|
4011
|
+
type: Component,
|
|
4012
|
+
args: [{ selector: 'gog-panel', imports: [
|
|
4013
|
+
CollapsibleComponent,
|
|
4014
|
+
GogCollapsibleContentDirective,
|
|
4015
|
+
GogCollapsibleTriggerDirective,
|
|
4016
|
+
IconComponent,
|
|
4017
|
+
SkeletonComponent,
|
|
4018
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
4019
|
+
'[class]': 'hostClasses()',
|
|
4020
|
+
'[attr.role]': 'labelledBy() ? "region" : null',
|
|
4021
|
+
'[attr.aria-labelledby]': 'labelledBy()',
|
|
4022
|
+
'[attr.aria-busy]': 'loading() ? "true" : null',
|
|
4023
|
+
'[attr.aria-disabled]': 'disabled() ? "true" : null',
|
|
4024
|
+
}, template: "<!--\r\n `gog-collapsible` wraps the whole panel even when `collapsible` is off: it is `display:\r\n contents`, so it adds no box, and keeping it unconditional is what lets the body carry\r\n `gogCollapsibleContent` in one place instead of duplicating every `<ng-content>` across two\r\n branches. A non-collapsible panel is simply always open, and `--static` undoes the closed-state\r\n geometry the shared class brings with it.\r\n-->\r\n<gog-collapsible\r\n [open]=\"effectiveOpen()\"\r\n (openChange)=\"onOpenChange($event)\"\r\n [disabled]=\"disabled()\"\r\n>\r\n @if (labelledBy() || collapsible()) {\r\n <div class=\"gog-panel__header\">\r\n <ng-content select=\"[gogPanelHeader]\" />\r\n\r\n @if (collapsible()) {\r\n <!--\r\n Named by the heading rather than wrapping it. A `<button>` may not contain an `<h2>`,\r\n and giving the heading `role=\"button\"` instead would delete it from the heading list \u2014\r\n so the button is its own element, and its hit area is stretched across the header row\r\n in the stylesheet to keep \"click the title\" working for the pointer.\r\n -->\r\n <button\r\n gogCollapsibleTrigger\r\n class=\"gog-panel__toggle\"\r\n type=\"button\"\r\n [attr.aria-labelledby]=\"labelledBy()\"\r\n [attr.aria-label]=\"labelledBy() ? null : toggleLabel()\"\r\n >\r\n <gog-icon class=\"gog-panel__chevron\" name=\"chevron-down\" />\r\n </button>\r\n }\r\n </div>\r\n }\r\n\r\n <div\r\n gogCollapsibleContent\r\n class=\"gog-panel__content\"\r\n [class.gog-panel__content--static]=\"!collapsible()\"\r\n >\r\n @if (loading()) {\r\n <div class=\"gog-panel__placeholder\" aria-hidden=\"true\">\r\n <gog-skeleton shape=\"text\" [size]=\"size()\" [lines]=\"skeletonLines()\" />\r\n </div>\r\n }\r\n\r\n <div class=\"gog-panel__body\" [class.gog-panel__body--hidden]=\"loading()\">\r\n <ng-content />\r\n </div>\r\n\r\n <ng-content select=\"[gogPanelFooter]\" />\r\n </div>\r\n</gog-collapsible>\r\n", styles: ["@charset \"UTF-8\";:host{display:block;padding:var(--gog-panel-padding-y, var(--gog-panel-size-padding-y, var(--gog-panel-lg-padding-y))) var(--gog-panel-padding-x, var(--gog-panel-size-padding-x, var(--gog-panel-lg-padding-x)));border:var(--gog-panel-border-width) var(--gog-panel-border-style) var(--gog-panel-border-color, var(--gog-panel-variant-border-color, var(--gog-panel-elevated-border-color)));border-radius:var(--gog-panel-radius);background:var(--gog-panel-bg, var(--gog-panel-variant-bg, var(--gog-panel-elevated-bg)));box-shadow:var(--gog-panel-variant-shadow, var(--gog-panel-shadow));color:var(--gog-panel-color);font-family:var(--gog-panel-font-family)}:host(.gog-panel--outlined){--gog-panel-variant-bg: var(--gog-panel-outlined-bg);--gog-panel-variant-border-color: var(--gog-panel-outlined-border-color);--gog-panel-variant-shadow: var(--gog-panel-outlined-shadow)}:host(.gog-panel--elevated){--gog-panel-variant-bg: var(--gog-panel-elevated-bg);--gog-panel-variant-border-color: var(--gog-panel-elevated-border-color);--gog-panel-variant-shadow: var(--gog-panel-shadow)}:host(.gog-panel--filled){--gog-panel-variant-bg: var(--gog-panel-filled-bg);--gog-panel-variant-border-color: var(--gog-panel-filled-border-color);--gog-panel-variant-shadow: var(--gog-panel-filled-shadow)}:host(.gog-panel--xsm){--gog-panel-size-padding-y: var(--gog-panel-xsm-padding-y);--gog-panel-size-padding-x: var(--gog-panel-xsm-padding-x);--gog-panel-size-gap: var(--gog-panel-xsm-gap)}:host(.gog-panel--sm){--gog-panel-size-padding-y: var(--gog-panel-sm-padding-y);--gog-panel-size-padding-x: var(--gog-panel-sm-padding-x);--gog-panel-size-gap: var(--gog-panel-sm-gap)}:host(.gog-panel--md){--gog-panel-size-padding-y: var(--gog-panel-md-padding-y);--gog-panel-size-padding-x: var(--gog-panel-md-padding-x);--gog-panel-size-gap: var(--gog-panel-md-gap)}:host(.gog-panel--lg){--gog-panel-size-padding-y: var(--gog-panel-lg-padding-y);--gog-panel-size-padding-x: var(--gog-panel-lg-padding-x);--gog-panel-size-gap: var(--gog-panel-lg-gap)}:host(.gog-panel--slg){--gog-panel-size-padding-y: var(--gog-panel-slg-padding-y);--gog-panel-size-padding-x: var(--gog-panel-slg-padding-x);--gog-panel-size-gap: var(--gog-panel-slg-gap)}:host(.gog-panel--disabled){opacity:var(--gog-panel-disabled-opacity)}.gog-panel__header{position:relative;display:flex;align-items:center;justify-content:space-between;gap:var(--gog-panel-header-gap);margin-block-end:var(--gog-panel-gap, var(--gog-panel-size-gap, var(--gog-panel-lg-gap)))}:host(.gog-panel--closed) .gog-panel__header{margin-block-end:0}.gog-panel__toggle{display:inline-flex;flex:none;align-items:center;justify-content:center;width:var(--gog-panel-toggle-size);height:var(--gog-panel-toggle-size);padding:0;border:none;border-radius:var(--gog-panel-toggle-radius);background:none;color:var(--gog-panel-toggle-color)}.gog-panel__toggle:after{position:absolute;inset:0;content:\"\"}.gog-panel__toggle:hover{background:var(--gog-panel-toggle-hover-bg)}.gog-panel__toggle:focus-visible{outline:none}.gog-panel__toggle:focus-visible:after{border-radius:var(--gog-panel-toggle-radius);outline:var(--gog-panel-focus-ring-width) solid var(--gog-panel-focus-ring);outline-offset:var(--gog-panel-focus-ring-offset)}.gog-panel__chevron{width:var(--gog-panel-chevron-size);height:var(--gog-panel-chevron-size);transition:transform var(--gog-panel-transition-duration) var(--gog-easing)}:host(.gog-panel--closed) .gog-panel__chevron{transform:rotate(calc(var(--gog-direction-sign) * -90deg))}.gog-panel__content{display:flex;flex-direction:column;gap:var(--gog-panel-gap, var(--gog-panel-size-gap, var(--gog-panel-lg-gap)))}.gog-panel__content--static{max-height:none;overflow:visible;opacity:1;transition:none}.gog-panel__body{min-width:0}.gog-panel__body:empty{display:none}.gog-panel__body--hidden{display:none}@media(prefers-reduced-motion:reduce){.gog-panel__chevron{transition:none}}\n"] }]
|
|
4025
|
+
}], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], collapsible: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsible", required: false }] }], open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], skeletonLines: [{ type: i0.Input, args: [{ isSignal: true, alias: "skeletonLines", required: false }] }], header: [{ type: i0.ContentChild, args: [i0.forwardRef(() => GogPanelHeaderDirective), { isSignal: true }] }] } });
|
|
3251
4026
|
|
|
3252
4027
|
const GOG_CHECKABLE_CONTROL_PADDING = 'var(--gog-control-checkbox-padding, 6px)';
|
|
3253
4028
|
const GOG_CHECKABLE_CONTROL_SIZE_MAP = {
|
|
@@ -4070,7 +4845,7 @@ const ESTIMATED_PANEL_HEIGHT = 330;
|
|
|
4070
4845
|
* A date field with a calendar panel.
|
|
4071
4846
|
*
|
|
4072
4847
|
* ```html
|
|
4073
|
-
* <gog-datepicker [(value)]="date" label="
|
|
4848
|
+
* <gog-datepicker [(value)]="date" label="Date of birth" [max]="today" />
|
|
4074
4849
|
* <gog-datepicker selectionMode="range" [(value)]="range" [numberOfMonths]="2" />
|
|
4075
4850
|
* <gog-datepicker [showTime]="true" hourFormat="24" [(value)]="when" />
|
|
4076
4851
|
* ```
|
|
@@ -4430,7 +5205,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
|
|
|
4430
5205
|
* ```html
|
|
4431
5206
|
* <gog-divider />
|
|
4432
5207
|
* <gog-divider orientation="vertical" />
|
|
4433
|
-
* <gog-divider
|
|
5208
|
+
* <gog-divider>OR</gog-divider>
|
|
4434
5209
|
* ```
|
|
4435
5210
|
*
|
|
4436
5211
|
* The label is projected content rather than a `label` input: it is markup, so a consumer can
|
|
@@ -4455,7 +5230,7 @@ class DividerComponent {
|
|
|
4455
5230
|
.filter((className) => className !== null)
|
|
4456
5231
|
.join(' '), ...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
|
|
4457
5232
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DividerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4458
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.17", type: DividerComponent, isStandalone: true, selector: "gog-divider", inputs: { orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, inset: { classPropertyName: "inset", publicName: "inset", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "separator" }, properties: { "class": "hostClasses()", "attr.aria-orientation": "orientation()" } }, ngImport: i0, template: "<!--\n Three parts always rendered; the stylesheet collapses the label and the trailing rule to a\n single continuous line when nothing was projected (`:has(.gog-divider__label:empty)`).\n Written this way so `<gog-divider />` and `<gog-divider
|
|
5233
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.17", type: DividerComponent, isStandalone: true, selector: "gog-divider", inputs: { orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, inset: { classPropertyName: "inset", publicName: "inset", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "separator" }, properties: { "class": "hostClasses()", "attr.aria-orientation": "orientation()" } }, ngImport: i0, template: "<!--\r\n Three parts always rendered; the stylesheet collapses the label and the trailing rule to a\r\n single continuous line when nothing was projected (`:has(.gog-divider__label:empty)`).\r\n Written this way so `<gog-divider />` and `<gog-divider>OR</gog-divider>` need no extra input\r\n to tell them apart.\r\n-->\r\n<span class=\"gog-divider__rule gog-divider__rule--start\" aria-hidden=\"true\"></span>\r\n<span class=\"gog-divider__label\"><ng-content></ng-content></span>\r\n<span class=\"gog-divider__rule gog-divider__rule--end\" aria-hidden=\"true\"></span>\r\n", styles: ["@charset \"UTF-8\";:host{display:flex;align-items:center;box-sizing:border-box;color:var(--gog-divider-label-color);font-family:var(--gog-divider-label-font-family);font-size:var(--gog-divider-label-font-size);font-weight:var(--gog-divider-label-font-weight);line-height:var(--gog-divider-label-line-height)}.gog-divider__rule{flex:1 1 auto;min-width:0;min-height:0}.gog-divider__label{flex:0 0 auto;white-space:nowrap}.gog-divider__label:empty{display:none}:host(.gog-divider--horizontal){flex-direction:row;width:100%;margin-block:var(--gog-divider-spacing, var(--gog-divider-block-spacing))}:host(.gog-divider--horizontal) .gog-divider__rule{border-block-start:var(--gog-divider-thickness, var(--gog-divider-line-thickness)) var(--gog-divider-variant-style, var(--gog-divider-solid-style)) var(--gog-divider-color, var(--gog-divider-line-color))}:host(.gog-divider--horizontal) .gog-divider__label{padding-inline:var(--gog-divider-label-gap)}:host(.gog-divider--vertical){flex-direction:column;align-self:stretch;min-height:var(--gog-divider-vertical-length);margin-inline:var(--gog-divider-spacing, var(--gog-divider-inline-spacing))}:host(.gog-divider--vertical) .gog-divider__rule{border-inline-start:var(--gog-divider-thickness, var(--gog-divider-line-thickness)) var(--gog-divider-variant-style, var(--gog-divider-solid-style)) var(--gog-divider-color, var(--gog-divider-line-color))}:host(.gog-divider--vertical) .gog-divider__label{padding-block:var(--gog-divider-label-gap)}:host(.gog-divider--dashed){--gog-divider-variant-style: var(--gog-divider-dashed-style)}:host(.gog-divider--dotted){--gog-divider-variant-style: var(--gog-divider-dotted-style)}:host(.gog-divider--horizontal.gog-divider--inset){padding-inline-start:var(--gog-divider-inset-size)}:host(.gog-divider--vertical.gog-divider--inset){padding-block-start:var(--gog-divider-inset-size)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4459
5234
|
}
|
|
4460
5235
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DividerComponent, decorators: [{
|
|
4461
5236
|
type: Component,
|
|
@@ -4463,7 +5238,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
|
|
|
4463
5238
|
'[class]': 'hostClasses()',
|
|
4464
5239
|
role: 'separator',
|
|
4465
5240
|
'[attr.aria-orientation]': 'orientation()',
|
|
4466
|
-
}, template: "<!--\n Three parts always rendered; the stylesheet collapses the label and the trailing rule to a\n single continuous line when nothing was projected (`:has(.gog-divider__label:empty)`).\n Written this way so `<gog-divider />` and `<gog-divider
|
|
5241
|
+
}, template: "<!--\r\n Three parts always rendered; the stylesheet collapses the label and the trailing rule to a\r\n single continuous line when nothing was projected (`:has(.gog-divider__label:empty)`).\r\n Written this way so `<gog-divider />` and `<gog-divider>OR</gog-divider>` need no extra input\r\n to tell them apart.\r\n-->\r\n<span class=\"gog-divider__rule gog-divider__rule--start\" aria-hidden=\"true\"></span>\r\n<span class=\"gog-divider__label\"><ng-content></ng-content></span>\r\n<span class=\"gog-divider__rule gog-divider__rule--end\" aria-hidden=\"true\"></span>\r\n", styles: ["@charset \"UTF-8\";:host{display:flex;align-items:center;box-sizing:border-box;color:var(--gog-divider-label-color);font-family:var(--gog-divider-label-font-family);font-size:var(--gog-divider-label-font-size);font-weight:var(--gog-divider-label-font-weight);line-height:var(--gog-divider-label-line-height)}.gog-divider__rule{flex:1 1 auto;min-width:0;min-height:0}.gog-divider__label{flex:0 0 auto;white-space:nowrap}.gog-divider__label:empty{display:none}:host(.gog-divider--horizontal){flex-direction:row;width:100%;margin-block:var(--gog-divider-spacing, var(--gog-divider-block-spacing))}:host(.gog-divider--horizontal) .gog-divider__rule{border-block-start:var(--gog-divider-thickness, var(--gog-divider-line-thickness)) var(--gog-divider-variant-style, var(--gog-divider-solid-style)) var(--gog-divider-color, var(--gog-divider-line-color))}:host(.gog-divider--horizontal) .gog-divider__label{padding-inline:var(--gog-divider-label-gap)}:host(.gog-divider--vertical){flex-direction:column;align-self:stretch;min-height:var(--gog-divider-vertical-length);margin-inline:var(--gog-divider-spacing, var(--gog-divider-inline-spacing))}:host(.gog-divider--vertical) .gog-divider__rule{border-inline-start:var(--gog-divider-thickness, var(--gog-divider-line-thickness)) var(--gog-divider-variant-style, var(--gog-divider-solid-style)) var(--gog-divider-color, var(--gog-divider-line-color))}:host(.gog-divider--vertical) .gog-divider__label{padding-block:var(--gog-divider-label-gap)}:host(.gog-divider--dashed){--gog-divider-variant-style: var(--gog-divider-dashed-style)}:host(.gog-divider--dotted){--gog-divider-variant-style: var(--gog-divider-dotted-style)}:host(.gog-divider--horizontal.gog-divider--inset){padding-inline-start:var(--gog-divider-inset-size)}:host(.gog-divider--vertical.gog-divider--inset){padding-block-start:var(--gog-divider-inset-size)}\n"] }]
|
|
4467
5242
|
}], propDecorators: { orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], inset: [{ type: i0.Input, args: [{ isSignal: true, alias: "inset", required: false }] }] } });
|
|
4468
5243
|
|
|
4469
5244
|
const MIN = 0;
|
|
@@ -4478,7 +5253,7 @@ function clamp(value) {
|
|
|
4478
5253
|
*
|
|
4479
5254
|
* ```html
|
|
4480
5255
|
* <gog-progressbar [value]="42" />
|
|
4481
|
-
* <gog-progressbar mode="indeterminate" ariaLabel="
|
|
5256
|
+
* <gog-progressbar mode="indeterminate" ariaLabel="Loading" />
|
|
4482
5257
|
* <gog-progressbar mode="buffer" [value]="42" [buffer]="70" />
|
|
4483
5258
|
* ```
|
|
4484
5259
|
*
|
|
@@ -4538,8 +5313,8 @@ const DEFAULT_SIZE$3 = 'md';
|
|
|
4538
5313
|
* An on/off switch.
|
|
4539
5314
|
*
|
|
4540
5315
|
* ```html
|
|
4541
|
-
* <gog-toggle label="
|
|
4542
|
-
* <gog-toggle formControlName="darkMode" onLabel="
|
|
5316
|
+
* <gog-toggle label="Notifications" [(checked)]="on" />
|
|
5317
|
+
* <gog-toggle formControlName="darkMode" onLabel="ON" offLabel="OFF" />
|
|
4543
5318
|
* ```
|
|
4544
5319
|
*
|
|
4545
5320
|
* Next to `gog-checkbox` rather than a variant of it, because the two answer different
|
|
@@ -4634,31 +5409,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
|
|
|
4634
5409
|
}, template: "<label [class.gog-toggle--disabled]=\"isDisabled()\" class=\"gog-toggle gog-contained-layout\">\n <!--\n A real checkbox with role=\"switch\": the role changes only how it is announced, so the\n space key, form registration and the :checked selector all keep working natively.\n -->\n <input\n (blur)=\"onBlur()\"\n (change)=\"onInputChange($event)\"\n [attr.aria-label]=\"label() ? null : ariaLabel() || null\"\n [checked]=\"checked()\"\n [disabled]=\"isDisabled()\"\n class=\"gog-toggle__input\"\n role=\"switch\"\n type=\"checkbox\"\n />\n\n <span [class.gog-toggle__track--on]=\"checked()\" class=\"gog-toggle__track\">\n @if (hasTrackLabels()) {\n <!--\n Both labels are always in the DOM so the track's width is the wider of the two and\n cannot jump as the switch flips; the inactive one is faded out, not removed.\n -->\n <span\n [class.gog-toggle__state--active]=\"checked()\"\n class=\"gog-toggle__state gog-toggle__state--on\"\n aria-hidden=\"true\"\n >\n {{ onLabel() }}\n </span>\n <span\n [class.gog-toggle__state--active]=\"!checked()\"\n class=\"gog-toggle__state gog-toggle__state--off\"\n aria-hidden=\"true\"\n >\n {{ offLabel() }}\n </span>\n }\n\n <span class=\"gog-toggle__thumb\" aria-hidden=\"true\"></span>\n </span>\n\n @if (label()) {\n <span class=\"gog-toggle__label\">{{ label() }}</span>\n }\n</label>\n", styles: ["@charset \"UTF-8\";.gog-toggle{display:inline-flex;align-items:center;position:relative;gap:var(--gog-toggle-gap);padding:var(--gog-toggle-padding, var(--gog-control-checkbox-padding));cursor:pointer;-webkit-user-select:none;user-select:none}.gog-toggle--disabled{opacity:var(--gog-toggle-disabled-opacity);cursor:not-allowed}.gog-toggle__input{position:absolute;inset-inline-start:var(--gog-toggle-padding, var(--gog-control-checkbox-padding));top:var(--gog-toggle-padding, var(--gog-control-checkbox-padding));width:var(--gog-toggle-size-track-width, var(--gog-toggle-md-track-width));height:var(--gog-toggle-size-track-height, var(--gog-toggle-md-track-height));margin:0;opacity:0;cursor:inherit}.gog-toggle__track{position:relative;display:grid;align-items:center;box-sizing:border-box;flex:0 0 auto;min-width:var(--gog-toggle-size-track-width, var(--gog-toggle-md-track-width));height:var(--gog-toggle-size-track-height, var(--gog-toggle-md-track-height));border:var(--gog-toggle-border-width) var(--gog-toggle-border-style) var(--gog-toggle-border-color);border-radius:var(--gog-toggle-radius);background-color:var(--gog-toggle-track-bg, var(--gog-toggle-track-off-bg));transition:background-color var(--gog-toggle-transition-duration) var(--gog-easing),border-color var(--gog-toggle-transition-duration) var(--gog-easing)}.gog-toggle__track--on{border-color:var(--gog-toggle-on-border-color);background-color:var(--gog-toggle-track-bg, var(--gog-toggle-track-on-bg))}.gog-toggle__thumb{position:absolute;top:50%;inset-inline-start:var(--gog-toggle-thumb-inset);width:var(--gog-toggle-size-thumb-size, var(--gog-toggle-md-thumb-size));height:var(--gog-toggle-size-thumb-size, var(--gog-toggle-md-thumb-size));border-radius:50%;background-color:var(--gog-toggle-thumb-bg, var(--gog-toggle-thumb-off-bg));box-shadow:var(--gog-toggle-thumb-shadow);transform:translateY(-50%);transition:inset-inline-start var(--gog-toggle-transition-duration) var(--gog-easing),background-color var(--gog-toggle-transition-duration) var(--gog-easing)}.gog-toggle__track--on .gog-toggle__thumb{inset-inline-start:calc(100% - var(--gog-toggle-size-thumb-size, var(--gog-toggle-md-thumb-size)) - var(--gog-toggle-thumb-inset));background-color:var(--gog-toggle-thumb-bg, var(--gog-toggle-thumb-on-bg))}.gog-toggle__state{grid-area:1/1;padding-inline:var(--gog-toggle-state-padding-inline);color:var(--gog-toggle-state-color);font-family:var(--gog-toggle-font-family);font-size:var(--gog-toggle-size-state-font-size, var(--gog-toggle-md-state-font-size));font-weight:var(--gog-toggle-state-font-weight);letter-spacing:var(--gog-toggle-state-letter-spacing);line-height:1;opacity:0;pointer-events:none;white-space:nowrap;transition:opacity var(--gog-toggle-transition-duration) var(--gog-easing)}.gog-toggle__state--on{justify-self:start;padding-inline-start:var(--gog-toggle-state-offset)}.gog-toggle__state--off{justify-self:end;padding-inline-end:var(--gog-toggle-state-offset)}.gog-toggle__state--active{opacity:1}:host(.gog-toggle-host--track-labels) .gog-toggle__state--on{padding-inline-end:calc(var(--gog-toggle-size-thumb-size, var(--gog-toggle-md-thumb-size)) + var(--gog-toggle-state-thumb-gap))}:host(.gog-toggle-host--track-labels) .gog-toggle__state--off{padding-inline-start:calc(var(--gog-toggle-size-thumb-size, var(--gog-toggle-md-thumb-size)) + var(--gog-toggle-state-thumb-gap))}.gog-toggle__label{color:var(--gog-toggle-label-color);font-family:var(--gog-toggle-font-family);font-size:var(--gog-toggle-size-label-size, var(--gog-toggle-md-label-size));line-height:var(--gog-toggle-label-line-height)}.gog-toggle__input:focus-visible+.gog-toggle__track{outline:var(--gog-toggle-focus-ring-width) solid var(--gog-toggle-focus-ring-color);outline-offset:var(--gog-toggle-focus-ring-offset)}:host(.gog-toggle-host--label-start) .gog-toggle{flex-direction:row-reverse}:host(.gog-toggle-host--xsm){--gog-toggle-size-track-width: var(--gog-toggle-xsm-track-width);--gog-toggle-size-track-height: var(--gog-toggle-xsm-track-height);--gog-toggle-size-thumb-size: var(--gog-toggle-xsm-thumb-size);--gog-toggle-size-label-size: var(--gog-toggle-xsm-label-size);--gog-toggle-size-state-font-size: var(--gog-toggle-xsm-state-font-size)}:host(.gog-toggle-host--sm){--gog-toggle-size-track-width: var(--gog-toggle-sm-track-width);--gog-toggle-size-track-height: var(--gog-toggle-sm-track-height);--gog-toggle-size-thumb-size: var(--gog-toggle-sm-thumb-size);--gog-toggle-size-label-size: var(--gog-toggle-sm-label-size);--gog-toggle-size-state-font-size: var(--gog-toggle-sm-state-font-size)}:host(.gog-toggle-host--md){--gog-toggle-size-track-width: var(--gog-toggle-md-track-width);--gog-toggle-size-track-height: var(--gog-toggle-md-track-height);--gog-toggle-size-thumb-size: var(--gog-toggle-md-thumb-size);--gog-toggle-size-label-size: var(--gog-toggle-md-label-size);--gog-toggle-size-state-font-size: var(--gog-toggle-md-state-font-size)}:host(.gog-toggle-host--lg){--gog-toggle-size-track-width: var(--gog-toggle-lg-track-width);--gog-toggle-size-track-height: var(--gog-toggle-lg-track-height);--gog-toggle-size-thumb-size: var(--gog-toggle-lg-thumb-size);--gog-toggle-size-label-size: var(--gog-toggle-lg-label-size);--gog-toggle-size-state-font-size: var(--gog-toggle-lg-state-font-size)}:host(.gog-toggle-host--slg){--gog-toggle-size-track-width: var(--gog-toggle-slg-track-width);--gog-toggle-size-track-height: var(--gog-toggle-slg-track-height);--gog-toggle-size-thumb-size: var(--gog-toggle-slg-thumb-size);--gog-toggle-size-label-size: var(--gog-toggle-slg-label-size);--gog-toggle-size-state-font-size: var(--gog-toggle-slg-state-font-size)}:host(.gog-host--full-width){display:block;width:100%}:host(.gog-host--full-width) .gog-toggle{display:flex;width:100%;justify-content:space-between}@media(prefers-reduced-motion:reduce){.gog-toggle__track,.gog-toggle__thumb,.gog-toggle__state{transition:none}}\n"] }]
|
|
4635
5410
|
}], ctorParameters: () => [], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], fullWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "fullWidth", required: false }] }], labelPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelPosition", required: false }] }], onLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "onLabel", required: false }] }], offLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "offLabel", required: false }] }], checked: [{ type: i0.Input, args: [{ isSignal: true, alias: "checked", required: false }] }, { type: i0.Output, args: ["checkedChange"] }] } });
|
|
4636
5411
|
|
|
4637
|
-
/**
|
|
4638
|
-
* Per-prefix counter behind every auto-generated DOM id in the library.
|
|
4639
|
-
*
|
|
4640
|
-
* A form control needs a real `id` whether or not the consumer supplied one: without it a
|
|
4641
|
-
* `<label for>` cannot point at the field (so clicking the label does not focus it, and
|
|
4642
|
-
* assistive tech gets no accessible name), and `aria-describedby` cannot point at the error
|
|
4643
|
-
* message. Making the consumer pass `inputId` for that is a trap — the field looks fine and is
|
|
4644
|
-
* quietly inaccessible.
|
|
4645
|
-
*
|
|
4646
|
-
* Counters are keyed by prefix rather than shared, so ids stay stable per component type
|
|
4647
|
-
* (`gog-input-1`, `gog-slider-1`) instead of depending on how many *other* controls happened to
|
|
4648
|
-
* be constructed first. That also keeps them predictable in tests and diffs.
|
|
4649
|
-
*
|
|
4650
|
-
* SSR/hydration-safe by construction: the server and the client walk the same component tree in
|
|
4651
|
-
* the same order, so both arrive at the same ids. Do not seed this with randomness for that
|
|
4652
|
-
* reason.
|
|
4653
|
-
*/
|
|
4654
|
-
const counters = new Map();
|
|
4655
|
-
/** Returns the next id for `prefix`, e.g. `nextGogControlId('gog-input')` → `'gog-input-3'`. */
|
|
4656
|
-
function nextGogControlId(prefix) {
|
|
4657
|
-
const next = (counters.get(prefix) ?? 0) + 1;
|
|
4658
|
-
counters.set(prefix, next);
|
|
4659
|
-
return `${prefix}-${next}`;
|
|
4660
|
-
}
|
|
4661
|
-
|
|
4662
5412
|
/** Built-in defaults, used when neither the instance input nor `GOG_CONFIG` supplies one. */
|
|
4663
5413
|
const DEFAULT_SIZE$2 = 'md';
|
|
4664
5414
|
const DEFAULT_ERROR_DISPLAY$3 = 'manual';
|
|
@@ -4767,7 +5517,7 @@ class ConfirmationDialogComponent {
|
|
|
4767
5517
|
this.ref.close(false);
|
|
4768
5518
|
}
|
|
4769
5519
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: ConfirmationDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4770
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.17", type: ConfirmationDialogComponent, isStandalone: true, selector: "gog-confirmation-dialog", ngImport: i0, template: "<div\n class=\"confirm-dialog\"\n [attr.aria-labelledby]=\"'confirm-title-' + instanceId\"\n [attr.aria-describedby]=\"'confirm-desc-' + instanceId\"\n>\n <h3 [id]=\"'confirm-title-' + instanceId\" class=\"confirm-dialog__title heading-md\">\n {{ data.title }}\n </h3>\n <p [id]=\"'confirm-desc-' + instanceId\" class=\"confirm-dialog__description body-sm\">\n {{ data.description }}\n </p>\n <div class=\"confirm-dialog__actions\">\n <gog-button variant=\"ghost\" type=\"button\" (gogClick)=\"cancel()\">{{\n data.cancelText\n }}</gog-button>\n <gog-button variant=\"primary\" type=\"button\" (gogClick)=\"confirm()\">{{\n data.confirmText\n }}</gog-button>\n </div>\n</div>\n", styles: [":host{display:block;contain:layout style}.confirm-dialog{display:flex;flex-direction:column;gap:var(--gog-confirmation-dialog-gap);min-width:var(--gog-confirmation-dialog-min-width);max-width:var(--gog-confirmation-dialog-max-width);color:var(--gog-confirmation-dialog-color)}.confirm-dialog__title{margin:0}.confirm-dialog__description{margin:0;color:var(--gog-confirmation-dialog-description-color)}.confirm-dialog__actions{display:flex;justify-content:flex-end;gap:var(--gog-confirmation-dialog-actions-gap);margin-top:var(--gog-confirmation-dialog-actions-offset)}\n"], dependencies: [{ kind: "component", type: ButtonComponent, selector: "gog-button", inputs: ["variant", "size", "disabled", "fullWidth", "type", "loading", "debounce", "ariaLabel"], outputs: ["gogClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5520
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.17", type: ConfirmationDialogComponent, isStandalone: true, selector: "gog-confirmation-dialog", ngImport: i0, template: "<div\n class=\"confirm-dialog\"\n [attr.aria-labelledby]=\"'confirm-title-' + instanceId\"\n [attr.aria-describedby]=\"'confirm-desc-' + instanceId\"\n>\n <h3 [id]=\"'confirm-title-' + instanceId\" class=\"confirm-dialog__title heading-md\">\n {{ data.title }}\n </h3>\n <p [id]=\"'confirm-desc-' + instanceId\" class=\"confirm-dialog__description body-sm\">\n {{ data.description }}\n </p>\n <div class=\"confirm-dialog__actions\">\n <gog-button variant=\"ghost\" type=\"button\" (gogClick)=\"cancel()\">{{\n data.cancelText\n }}</gog-button>\n <gog-button variant=\"primary\" type=\"button\" (gogClick)=\"confirm()\">{{\n data.confirmText\n }}</gog-button>\n </div>\n</div>\n", styles: [":host{display:block;contain:layout style}.confirm-dialog{display:flex;flex-direction:column;gap:var(--gog-confirmation-dialog-gap);min-width:var(--gog-confirmation-dialog-min-width);max-width:var(--gog-confirmation-dialog-max-width);color:var(--gog-confirmation-dialog-color)}.confirm-dialog__title{margin:0}.confirm-dialog__description{margin:0;color:var(--gog-confirmation-dialog-description-color)}.confirm-dialog__actions{display:flex;justify-content:flex-end;gap:var(--gog-confirmation-dialog-actions-gap);margin-top:var(--gog-confirmation-dialog-actions-offset)}\n"], dependencies: [{ kind: "component", type: ButtonComponent, selector: "gog-button", inputs: ["variant", "size", "disabled", "fullWidth", "type", "loading", "ripple", "debounce", "ariaLabel"], outputs: ["gogClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4771
5521
|
}
|
|
4772
5522
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: ConfirmationDialogComponent, decorators: [{
|
|
4773
5523
|
type: Component,
|
|
@@ -4782,6 +5532,15 @@ class DialogService {
|
|
|
4782
5532
|
modalDialogCount = 0;
|
|
4783
5533
|
bodyOverflowBeforeLock = null;
|
|
4784
5534
|
focusedBeforeOpen = null;
|
|
5535
|
+
/**
|
|
5536
|
+
* `TData` is checked at this call site only — `data` here must match `TData`, but the dialog
|
|
5537
|
+
* component you pass as `component` still receives it via `inject(DIALOG_DATA)`, an
|
|
5538
|
+
* `InjectionToken<unknown>` shared by every dialog, so it still casts on injection
|
|
5539
|
+
* (`inject<TData>(DIALOG_DATA)`). Angular's DI has no way to carry a per-call-site type
|
|
5540
|
+
* through a single token, so this checks the half of the round trip that can be: what you
|
|
5541
|
+
* pass in must match what you declared, even though what the component reads back is still
|
|
5542
|
+
* on trust.
|
|
5543
|
+
*/
|
|
4785
5544
|
open(config) {
|
|
4786
5545
|
const id = ++this.nextId;
|
|
4787
5546
|
const zIndex = config.zIndex ?? this.nextZIndex++;
|
|
@@ -5166,7 +5925,7 @@ class ToastComponent {
|
|
|
5166
5925
|
return (typeof window !== 'undefined' && window.matchMedia('(prefers-reduced-motion: reduce)').matches);
|
|
5167
5926
|
}
|
|
5168
5927
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: ToastComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
5169
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: ToastComponent, isStandalone: true, selector: "gog-toast", inputs: { toast: { classPropertyName: "toast", publicName: "toast", isSignal: true, isRequired: true, transformFunction: null }, isFront: { classPropertyName: "isFront", publicName: "isFront", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { dismissed: "dismissed" }, viewQueries: [{ propertyName: "progressEl", first: true, predicate: ["progress"], descendants: true, isSignal: true }], ngImport: i0, template: "<div\r\n class=\"gog-toast\"\r\n [class.gog-toast--paused]=\"isPaused()\"\r\n [class.gog-toast--queued]=\"!isFront()\"\r\n [class.gog-toast--success]=\"toast().type === 'success'\"\r\n [class.gog-toast--error]=\"toast().type === 'error'\"\r\n [class.gog-toast--warning]=\"toast().type === 'warning'\"\r\n [class.gog-toast--info]=\"toast().type === 'info'\"\r\n [class.gog-toast--visible]=\"visible()\"\r\n [style.--toast-duration]=\"toast().duration + 'ms'\"\r\n (mouseenter)=\"pauseAutoDismiss()\"\r\n (mouseleave)=\"resumeAutoDismiss()\"\r\n (transitionend)=\"onTransitionEnd($event)\"\r\n>\r\n <div class=\"gog-toast__content\">\r\n <span class=\"gog-toast__icon\" aria-hidden=\"true\">\r\n <gog-icon [template]=\"toast().iconTemplate ?? null\" [name]=\"toast().iconName\" />\r\n </span>\r\n <div class=\"gog-toast__main\">\r\n <span class=\"gog-toast__message\">{{ toast().message }}</span>\r\n @if (hasActions()) {\r\n <div class=\"gog-toast__actions\">\r\n @for (action of toast().actions; track action.label) {\r\n <gog-button\r\n class=\"gog-toast__action\"\r\n variant=\"ghost\"\r\n size=\"sm\"\r\n type=\"button\"\r\n (gogClick)=\"runAction(action)\"\r\n >\r\n @if (action.iconName || action.iconTemplate) {\r\n <gog-icon\r\n [template]=\"action.iconTemplate ?? null\"\r\n [name]=\"action.iconName ?? 'check'\"\r\n />\r\n }\r\n {{ action.label }}\r\n </gog-button>\r\n }\r\n </div>\r\n }\r\n </div>\r\n <gog-button\r\n class=\"gog-toast__close\"\r\n variant=\"ghost\"\r\n size=\"sm\"\r\n type=\"button\"\r\n [ariaLabel]=\"closeLabel\"\r\n (gogClick)=\"close()\"\r\n >\r\n <gog-icon name=\"close\" />\r\n </gog-button>\r\n </div>\r\n @if (!toast().isSticky) {\r\n <span #progress class=\"gog-toast__progress\" aria-hidden=\"true\"></span>\r\n }\r\n</div>\r\n", styles: ["@charset \"UTF-8\";:host{display:block}.gog-toast{--toast-border: var(--gog-toast-type-color, var(--gog-toast-border));--toast-icon-color: var(--gog-toast-type-color, var(--gog-toast-icon-color));--toast-enter-x: var(--gog-toast-enter-distance);--toast-progress-color: var(--toast-border);--toast-stack-depth: min(var(--toast-stack-index, 0), var(--gog-toast-stack-max-depth));--toast-stack-collapsed-y: calc( var(--toast-stack-depth) * var(--gog-toast-stack-peek) * var(--toast-stack-direction, 1) );--toast-stack-expanded-y: calc( var(--toast-stack-depth) * var(--gog-toast-stack-expanded-gap) * var(--toast-stack-direction, 1) );--toast-stack-y: calc( var(--toast-stack-collapsed-y) + (var(--toast-stack-expanded-y) - var(--toast-stack-collapsed-y)) * var(--toast-stack-expanded, 0) );--toast-stack-collapsed-scale: calc( 1 - (var(--toast-stack-depth) * var(--gog-toast-stack-scale-step)) );--toast-stack-scale: calc( var(--toast-stack-collapsed-scale) + (1 - var(--toast-stack-collapsed-scale)) * var(--toast-stack-expanded, 0) );--toast-stack-collapsed-opacity: max( var(--gog-toast-stack-min-opacity), calc(1 - (var(--toast-stack-depth) * var(--gog-toast-stack-opacity-step))) );--toast-stack-opacity: calc( var(--toast-stack-collapsed-opacity) + (1 - var(--toast-stack-collapsed-opacity)) * var(--toast-stack-expanded, 0) );position:relative;z-index:calc(var(--gog-toast-base-z) - var(--toast-stack-index, 0));display:block;padding:var(--gog-toast-padding);background:var(--gog-toast-bg);border-inline-start:var(--gog-toast-accent-width) solid var(--toast-border);border-radius:var(--gog-toast-radius);color:var(--gog-toast-color);font-family:var(--gog-toast-font-family);box-shadow:var(--gog-toast-shadow);min-width:var(--gog-toast-min-width);max-width:var(--gog-toast-max-width);pointer-events:all;opacity:0;overflow:hidden;transform:translate3d(var(--toast-enter-x),var(--toast-stack-y),0) scale(var(--toast-stack-scale));transition:opacity var(--gog-toast-transition-duration) var(--gog-easing),transform var(--gog-toast-transition-duration) var(--gog-easing)}.gog-toast--visible{opacity:var(--toast-stack-opacity);transform:translate3d(0,var(--toast-stack-y),0) scale(var(--toast-stack-scale))}:host(.slide-left) .gog-toast{--toast-enter-x: calc(var(--gog-toast-enter-distance) * -1)}.gog-toast--success{--gog-toast-type-color: var(--gog-toast-success-color)}.gog-toast--error{--gog-toast-type-color: var(--gog-toast-error-color)}.gog-toast--warning{--gog-toast-type-color: var(--gog-toast-warning-color)}.gog-toast--info{--gog-toast-type-color: var(--gog-toast-info-color)}.gog-toast__icon{color:var(--toast-icon-color);font-size:var(--gog-toast-icon-size);line-height:var(--gog-toast-icon-line-height);flex-shrink:0}.gog-toast__icon gog-icon{font-size:var(--gog-toast-icon-size)}.gog-toast__content{display:flex;align-items:flex-start;gap:var(--gog-toast-content-gap)}.gog-toast__main{display:flex;flex:1;flex-direction:column;gap:var(--gog-toast-main-gap);min-width:0}.gog-toast__message{flex:1;font-size:var(--gog-toast-message-font-size);line-height:var(--gog-toast-message-line-height)}.gog-toast__actions{display:flex;flex-wrap:wrap;gap:var(--gog-toast-actions-gap)}.gog-toast__action{--gog-button-padding: var(--gog-toast-action-padding);--gog-button-font-size: var(--gog-toast-action-font-size)}.gog-toast__action gog-icon{font-size:var(--gog-toast-action-font-size)}.gog-toast__close{align-self:flex-start;flex-shrink:0;--gog-button-padding: var(--gog-toast-close-padding);--gog-button-font-size: var(--gog-toast-close-font-size)}.gog-toast__close gog-icon{font-size:var(--gog-toast-close-font-size)}.gog-toast__progress{position:absolute;inset-inline:0;bottom:0;height:var(--gog-toast-progress-height);background:color-mix(in srgb,var(--toast-progress-color) var(--gog-toast-progress-opacity),transparent);transform-origin:var(--gog-inline-start-side) center;animation:gog-toast-progress var(--toast-duration) linear forwards}.gog-toast--paused .gog-toast__progress,.gog-toast--queued .gog-toast__progress{animation-play-state:paused}@keyframes gog-toast-progress{0%{transform:scaleX(1)}to{transform:scaleX(0)}}@media(prefers-reduced-motion:reduce){.gog-toast,.gog-toast__progress{transition:none;animation:none}}\n"], dependencies: [{ kind: "component", type: ButtonComponent, selector: "gog-button", inputs: ["variant", "size", "disabled", "fullWidth", "type", "loading", "debounce", "ariaLabel"], outputs: ["gogClick"] }, { kind: "component", type: IconComponent, selector: "gog-icon", inputs: ["name", "template", "title", "ariaHidden"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5928
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: ToastComponent, isStandalone: true, selector: "gog-toast", inputs: { toast: { classPropertyName: "toast", publicName: "toast", isSignal: true, isRequired: true, transformFunction: null }, isFront: { classPropertyName: "isFront", publicName: "isFront", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { dismissed: "dismissed" }, viewQueries: [{ propertyName: "progressEl", first: true, predicate: ["progress"], descendants: true, isSignal: true }], ngImport: i0, template: "<div\r\n class=\"gog-toast\"\r\n [class.gog-toast--paused]=\"isPaused()\"\r\n [class.gog-toast--queued]=\"!isFront()\"\r\n [class.gog-toast--success]=\"toast().type === 'success'\"\r\n [class.gog-toast--error]=\"toast().type === 'error'\"\r\n [class.gog-toast--warning]=\"toast().type === 'warning'\"\r\n [class.gog-toast--info]=\"toast().type === 'info'\"\r\n [class.gog-toast--visible]=\"visible()\"\r\n [style.--toast-duration]=\"toast().duration + 'ms'\"\r\n (mouseenter)=\"pauseAutoDismiss()\"\r\n (mouseleave)=\"resumeAutoDismiss()\"\r\n (transitionend)=\"onTransitionEnd($event)\"\r\n>\r\n <div class=\"gog-toast__content\">\r\n <span class=\"gog-toast__icon\" aria-hidden=\"true\">\r\n <gog-icon [template]=\"toast().iconTemplate ?? null\" [name]=\"toast().iconName\" />\r\n </span>\r\n <div class=\"gog-toast__main\">\r\n <span class=\"gog-toast__message\">{{ toast().message }}</span>\r\n @if (hasActions()) {\r\n <div class=\"gog-toast__actions\">\r\n @for (action of toast().actions; track action.label) {\r\n <gog-button\r\n class=\"gog-toast__action\"\r\n variant=\"ghost\"\r\n size=\"sm\"\r\n type=\"button\"\r\n (gogClick)=\"runAction(action)\"\r\n >\r\n @if (action.iconName || action.iconTemplate) {\r\n <gog-icon\r\n [template]=\"action.iconTemplate ?? null\"\r\n [name]=\"action.iconName ?? 'check'\"\r\n />\r\n }\r\n {{ action.label }}\r\n </gog-button>\r\n }\r\n </div>\r\n }\r\n </div>\r\n <gog-button\r\n class=\"gog-toast__close\"\r\n variant=\"ghost\"\r\n size=\"sm\"\r\n type=\"button\"\r\n [ariaLabel]=\"closeLabel\"\r\n (gogClick)=\"close()\"\r\n >\r\n <gog-icon name=\"close\" />\r\n </gog-button>\r\n </div>\r\n @if (!toast().isSticky) {\r\n <span #progress class=\"gog-toast__progress\" aria-hidden=\"true\"></span>\r\n }\r\n</div>\r\n", styles: ["@charset \"UTF-8\";:host{display:block}.gog-toast{--toast-border: var(--gog-toast-type-color, var(--gog-toast-border));--toast-icon-color: var(--gog-toast-type-color, var(--gog-toast-icon-color));--toast-enter-x: var(--gog-toast-enter-distance);--toast-progress-color: var(--toast-border);--toast-stack-depth: min(var(--toast-stack-index, 0), var(--gog-toast-stack-max-depth));--toast-stack-collapsed-y: calc( var(--toast-stack-depth) * var(--gog-toast-stack-peek) * var(--toast-stack-direction, 1) );--toast-stack-expanded-y: calc( var(--toast-stack-depth) * var(--gog-toast-stack-expanded-gap) * var(--toast-stack-direction, 1) );--toast-stack-y: calc( var(--toast-stack-collapsed-y) + (var(--toast-stack-expanded-y) - var(--toast-stack-collapsed-y)) * var(--toast-stack-expanded, 0) );--toast-stack-collapsed-scale: calc( 1 - (var(--toast-stack-depth) * var(--gog-toast-stack-scale-step)) );--toast-stack-scale: calc( var(--toast-stack-collapsed-scale) + (1 - var(--toast-stack-collapsed-scale)) * var(--toast-stack-expanded, 0) );--toast-stack-collapsed-opacity: max( var(--gog-toast-stack-min-opacity), calc(1 - (var(--toast-stack-depth) * var(--gog-toast-stack-opacity-step))) );--toast-stack-opacity: calc( var(--toast-stack-collapsed-opacity) + (1 - var(--toast-stack-collapsed-opacity)) * var(--toast-stack-expanded, 0) );position:relative;z-index:calc(var(--gog-toast-base-z) - var(--toast-stack-index, 0));display:block;padding:var(--gog-toast-padding);background:var(--gog-toast-bg);border-inline-start:var(--gog-toast-accent-width) solid var(--toast-border);border-radius:var(--gog-toast-radius);color:var(--gog-toast-color);font-family:var(--gog-toast-font-family);box-shadow:var(--gog-toast-shadow);min-width:var(--gog-toast-min-width);max-width:var(--gog-toast-max-width);pointer-events:all;opacity:0;overflow:hidden;transform:translate3d(var(--toast-enter-x),var(--toast-stack-y),0) scale(var(--toast-stack-scale));transition:opacity var(--gog-toast-transition-duration) var(--gog-easing),transform var(--gog-toast-transition-duration) var(--gog-easing)}.gog-toast--visible{opacity:var(--toast-stack-opacity);transform:translate3d(0,var(--toast-stack-y),0) scale(var(--toast-stack-scale))}:host(.slide-left) .gog-toast{--toast-enter-x: calc(var(--gog-toast-enter-distance) * -1)}.gog-toast--success{--gog-toast-type-color: var(--gog-toast-success-color)}.gog-toast--error{--gog-toast-type-color: var(--gog-toast-error-color)}.gog-toast--warning{--gog-toast-type-color: var(--gog-toast-warning-color)}.gog-toast--info{--gog-toast-type-color: var(--gog-toast-info-color)}.gog-toast__icon{color:var(--toast-icon-color);font-size:var(--gog-toast-icon-size);line-height:var(--gog-toast-icon-line-height);flex-shrink:0}.gog-toast__icon gog-icon{font-size:var(--gog-toast-icon-size)}.gog-toast__content{display:flex;align-items:flex-start;gap:var(--gog-toast-content-gap)}.gog-toast__main{display:flex;flex:1;flex-direction:column;gap:var(--gog-toast-main-gap);min-width:0}.gog-toast__message{flex:1;font-size:var(--gog-toast-message-font-size);line-height:var(--gog-toast-message-line-height)}.gog-toast__actions{display:flex;flex-wrap:wrap;gap:var(--gog-toast-actions-gap)}.gog-toast__action{--gog-button-padding: var(--gog-toast-action-padding);--gog-button-font-size: var(--gog-toast-action-font-size)}.gog-toast__action gog-icon{font-size:var(--gog-toast-action-font-size)}.gog-toast__close{align-self:flex-start;flex-shrink:0;--gog-button-padding: var(--gog-toast-close-padding);--gog-button-font-size: var(--gog-toast-close-font-size)}.gog-toast__close gog-icon{font-size:var(--gog-toast-close-font-size)}.gog-toast__progress{position:absolute;inset-inline:0;bottom:0;height:var(--gog-toast-progress-height);background:color-mix(in srgb,var(--toast-progress-color) var(--gog-toast-progress-opacity),transparent);transform-origin:var(--gog-inline-start-side) center;animation:gog-toast-progress var(--toast-duration) linear forwards}.gog-toast--paused .gog-toast__progress,.gog-toast--queued .gog-toast__progress{animation-play-state:paused}@keyframes gog-toast-progress{0%{transform:scaleX(1)}to{transform:scaleX(0)}}@media(prefers-reduced-motion:reduce){.gog-toast,.gog-toast__progress{transition:none;animation:none}}\n"], dependencies: [{ kind: "component", type: ButtonComponent, selector: "gog-button", inputs: ["variant", "size", "disabled", "fullWidth", "type", "loading", "ripple", "debounce", "ariaLabel"], outputs: ["gogClick"] }, { kind: "component", type: IconComponent, selector: "gog-icon", inputs: ["name", "template", "title", "ariaHidden"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5170
5929
|
}
|
|
5171
5930
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: ToastComponent, decorators: [{
|
|
5172
5931
|
type: Component,
|
|
@@ -5916,6 +6675,11 @@ class ChipComponent {
|
|
|
5916
6675
|
avatarUrl = input(null, ...(ngDevMode ? [{ debugName: "avatarUrl" }] : /* istanbul ignore next */ []));
|
|
5917
6676
|
avatarAlt = input('', ...(ngDevMode ? [{ debugName: "avatarAlt" }] : /* istanbul ignore next */ []));
|
|
5918
6677
|
iconName = input(null, ...(ngDevMode ? [{ debugName: "iconName" }] : /* istanbul ignore next */ []));
|
|
6678
|
+
/**
|
|
6679
|
+
* Press ripple. Unset, falls back to `GOG_CONFIG.ripple.enabled`, then to `false` — so
|
|
6680
|
+
* `[ripple]="false"` opts one instance out of an app that turned it on everywhere.
|
|
6681
|
+
*/
|
|
6682
|
+
ripple = input(undefined, ...(ngDevMode ? [{ debugName: "ripple" }] : /* istanbul ignore next */ []));
|
|
5919
6683
|
gogClick = output();
|
|
5920
6684
|
gogRemove = output();
|
|
5921
6685
|
hostClasses = computed(() => [
|
|
@@ -5932,6 +6696,12 @@ class ChipComponent {
|
|
|
5932
6696
|
.filter((className) => className !== null)
|
|
5933
6697
|
.join(' '), ...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
|
|
5934
6698
|
isInteractive = computed(() => this.clickable() && !this.disabled(), ...(ngDevMode ? [{ debugName: "isInteractive" }] : /* istanbul ignore next */ []));
|
|
6699
|
+
rippleConfigured = resolveRipple(this.ripple, inject(GOG_CONFIG));
|
|
6700
|
+
/**
|
|
6701
|
+
* A chip that is not interactive is a label, and a label answering a press with a wave is a
|
|
6702
|
+
* promise it cannot keep — so the ripple follows `isInteractive`, not just the input.
|
|
6703
|
+
*/
|
|
6704
|
+
rippleEnabled = computed(() => this.rippleConfigured() && this.isInteractive(), ...(ngDevMode ? [{ debugName: "rippleEnabled" }] : /* istanbul ignore next */ []));
|
|
5935
6705
|
onChipClick(event) {
|
|
5936
6706
|
if (this.disabled())
|
|
5937
6707
|
return;
|
|
@@ -5950,14 +6720,14 @@ class ChipComponent {
|
|
|
5950
6720
|
this.gogRemove.emit();
|
|
5951
6721
|
}
|
|
5952
6722
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: ChipComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
5953
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: ChipComponent, isStandalone: true, selector: "gog-chip", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, shape: { classPropertyName: "shape", publicName: "shape", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, clickable: { classPropertyName: "clickable", publicName: "clickable", isSignal: true, isRequired: false, transformFunction: null }, removable: { classPropertyName: "removable", publicName: "removable", isSignal: true, isRequired: false, transformFunction: null }, fullWidth: { classPropertyName: "fullWidth", publicName: "fullWidth", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, removeAriaLabel: { classPropertyName: "removeAriaLabel", publicName: "removeAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, avatarUrl: { classPropertyName: "avatarUrl", publicName: "avatarUrl", isSignal: true, isRequired: false, transformFunction: null }, avatarAlt: { classPropertyName: "avatarAlt", publicName: "avatarAlt", isSignal: true, isRequired: false, transformFunction: null }, iconName: { classPropertyName: "iconName", publicName: "iconName", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { gogClick: "gogClick", gogRemove: "gogRemove" }, host: { properties: { "class": "hostClasses()" } }, ngImport: i0, template: "<div\n class=\"gog-chip__surface\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n [attr.role]=\"isInteractive() ? 'button' : null\"\n [attr.tabindex]=\"isInteractive() ? 0 : null\"\n [style.cursor]=\"isInteractive() ? 'pointer' : 'default'\"\n (click)=\"onChipClick($event)\"\n (keydown)=\"onKeydown($event)\"\n>\n @if (avatarUrl()) {\n <img class=\"gog-chip__avatar\" [src]=\"avatarUrl()\" [alt]=\"avatarAlt()\" />\n }\n\n @if (iconName()) {\n <gog-icon class=\"gog-chip__icon\" [ariaHidden]=\"true\" [name]=\"iconName() ?? 'check'\" />\n }\n\n <span class=\"gog-chip__content\">\n <ng-content></ng-content>\n </span>\n\n @if (removable() && !disabled()) {\n <button\n class=\"gog-chip__remove\"\n type=\"button\"\n [attr.aria-label]=\"removeAriaLabel()\"\n (click)=\"onRemoveClick($event)\"\n >\n <gog-icon name=\"close\" />\n </button>\n }\n</div>\n", styles: [":host{display:inline-flex;max-width:100%;contain:layout style}.gog-chip__surface{display:inline-flex;align-items:center;gap:var(--gog-chip-gap, var(--gog-chip-size-gap, var(--gog-chip-md-gap)));box-sizing:border-box;width:fit-content;max-width:100%;overflow:hidden;padding:var(--gog-chip-padding-block, var(--gog-chip-size-padding-block, var(--gog-chip-md-padding-block))) var(--gog-chip-padding-inline, var(--gog-chip-size-padding-inline, var(--gog-chip-md-padding-inline)));border:var(--gog-chip-border-width) var(--gog-chip-border-style) var(--gog-chip-border);border-radius:var(--gog-chip-radius);background-color:var(--gog-chip-bg);color:var(--gog-chip-color);font-family:var(--gog-chip-font-family);font-size:var(--gog-chip-font-size, var(--gog-chip-size-font-size, var(--gog-chip-md-font-size)));font-weight:var(--gog-chip-font-weight);line-height:var(--gog-chip-line-height);white-space:nowrap;-webkit-user-select:none;user-select:none}.gog-chip__surface:focus-visible{outline:var(--gog-chip-focus-ring-width) solid var(--gog-chip-border);outline-offset:var(--gog-chip-focus-ring-offset)}:host(.gog-chip--clickable) .gog-chip__surface:hover:not([aria-disabled=true]){background-color:var(--gog-chip-hover-bg)}.gog-chip__surface[aria-disabled=true]{opacity:var(--gog-chip-disabled-opacity);pointer-events:none}.gog-chip__content{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;line-height:var(--gog-chip-line-height)}.gog-chip__avatar{width:var(--gog-chip-avatar-size, var(--gog-chip-size-avatar-size, var(--gog-chip-md-avatar-size)));height:var(--gog-chip-avatar-size, var(--gog-chip-size-avatar-size, var(--gog-chip-md-avatar-size)));border-radius:50%;object-fit:cover;flex-shrink:0}.gog-chip__icon{flex-shrink:0;font-size:var(--gog-chip-icon-size, var(--gog-chip-size-icon-size, var(--gog-chip-md-icon-size)))}.gog-chip__remove{display:inline-grid;place-items:center;width:calc(var(--gog-chip-remove-size, var(--gog-chip-size-remove-size, var(--gog-chip-md-remove-size))) * var(--gog-chip-remove-scale));height:calc(var(--gog-chip-remove-size, var(--gog-chip-size-remove-size, var(--gog-chip-md-remove-size))) * var(--gog-chip-remove-scale));padding:0;border:0;border-radius:50%;background:transparent;color:var(--gog-chip-remove-color);font-size:var(--gog-chip-remove-size, var(--gog-chip-size-remove-size, var(--gog-chip-md-remove-size)));cursor:pointer;flex-shrink:0}.gog-chip__remove:hover:not(:disabled){color:var(--gog-chip-remove-hover-color)}.gog-chip__remove:focus-visible{outline:var(--gog-chip-focus-ring-width) solid var(--gog-chip-border);outline-offset:var(--gog-chip-focus-ring-offset)}:host(.gog-chip--xsm) .gog-chip__surface{--gog-chip-size-font-size: var(--gog-chip-xsm-font-size);--gog-chip-size-padding-block: var(--gog-chip-xsm-padding-block);--gog-chip-size-padding-inline: var(--gog-chip-xsm-padding-inline);--gog-chip-size-gap: var(--gog-chip-xsm-gap);--gog-chip-size-avatar-size: var(--gog-chip-xsm-avatar-size);--gog-chip-size-icon-size: var(--gog-chip-xsm-icon-size);--gog-chip-size-remove-size: var(--gog-chip-xsm-remove-size)}:host(.gog-chip--sm) .gog-chip__surface{--gog-chip-size-font-size: var(--gog-chip-sm-font-size);--gog-chip-size-padding-block: var(--gog-chip-sm-padding-block);--gog-chip-size-padding-inline: var(--gog-chip-sm-padding-inline);--gog-chip-size-gap: var(--gog-chip-sm-gap);--gog-chip-size-avatar-size: var(--gog-chip-sm-avatar-size);--gog-chip-size-icon-size: var(--gog-chip-sm-icon-size);--gog-chip-size-remove-size: var(--gog-chip-sm-remove-size)}:host(.gog-chip--md) .gog-chip__surface{--gog-chip-size-font-size: var(--gog-chip-md-font-size);--gog-chip-size-padding-block: var(--gog-chip-md-padding-block);--gog-chip-size-padding-inline: var(--gog-chip-md-padding-inline);--gog-chip-size-gap: var(--gog-chip-md-gap);--gog-chip-size-avatar-size: var(--gog-chip-md-avatar-size);--gog-chip-size-icon-size: var(--gog-chip-md-icon-size);--gog-chip-size-remove-size: var(--gog-chip-md-remove-size)}:host(.gog-chip--lg) .gog-chip__surface{--gog-chip-size-font-size: var(--gog-chip-lg-font-size);--gog-chip-size-padding-block: var(--gog-chip-lg-padding-block);--gog-chip-size-padding-inline: var(--gog-chip-lg-padding-inline);--gog-chip-size-gap: var(--gog-chip-lg-gap);--gog-chip-size-avatar-size: var(--gog-chip-lg-avatar-size);--gog-chip-size-icon-size: var(--gog-chip-lg-icon-size);--gog-chip-size-remove-size: var(--gog-chip-lg-remove-size)}:host(.gog-chip--slg) .gog-chip__surface{--gog-chip-size-font-size: var(--gog-chip-slg-font-size);--gog-chip-size-padding-block: var(--gog-chip-slg-padding-block);--gog-chip-size-padding-inline: var(--gog-chip-slg-padding-inline);--gog-chip-size-gap: var(--gog-chip-slg-gap);--gog-chip-size-avatar-size: var(--gog-chip-slg-avatar-size);--gog-chip-size-icon-size: var(--gog-chip-slg-icon-size);--gog-chip-size-remove-size: var(--gog-chip-slg-remove-size)}:host(.gog-chip--pill) .gog-chip__surface{border-radius:var(--gog-chip-pill-radius)}:host(.gog-chip--rounded) .gog-chip__surface{border-radius:var(--gog-chip-radius)}:host(.gog-chip--has-avatar) .gog-chip__surface{padding-inline-start:calc(var(--gog-chip-padding-inline, var(--gog-chip-size-padding-inline, var(--gog-chip-md-padding-inline))) * var(--gog-chip-avatar-inset-ratio))}:host(.gog-chip--removable) .gog-chip__surface{padding-inline-end:calc(var(--gog-chip-padding-inline, var(--gog-chip-size-padding-inline, var(--gog-chip-md-padding-inline))) * var(--gog-chip-remove-inset-ratio))}:host(.gog-host--full-width){display:flex}:host(.gog-host--full-width) .gog-chip__surface{width:100%}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "gog-icon", inputs: ["name", "template", "title", "ariaHidden"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
6723
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: ChipComponent, isStandalone: true, selector: "gog-chip", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, shape: { classPropertyName: "shape", publicName: "shape", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, clickable: { classPropertyName: "clickable", publicName: "clickable", isSignal: true, isRequired: false, transformFunction: null }, removable: { classPropertyName: "removable", publicName: "removable", isSignal: true, isRequired: false, transformFunction: null }, fullWidth: { classPropertyName: "fullWidth", publicName: "fullWidth", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, removeAriaLabel: { classPropertyName: "removeAriaLabel", publicName: "removeAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, avatarUrl: { classPropertyName: "avatarUrl", publicName: "avatarUrl", isSignal: true, isRequired: false, transformFunction: null }, avatarAlt: { classPropertyName: "avatarAlt", publicName: "avatarAlt", isSignal: true, isRequired: false, transformFunction: null }, iconName: { classPropertyName: "iconName", publicName: "iconName", isSignal: true, isRequired: false, transformFunction: null }, ripple: { classPropertyName: "ripple", publicName: "ripple", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { gogClick: "gogClick", gogRemove: "gogRemove" }, host: { properties: { "class": "hostClasses()" } }, ngImport: i0, template: "<div\r\n class=\"gog-chip__surface\"\r\n [attr.aria-label]=\"ariaLabel() || null\"\r\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\r\n [attr.role]=\"isInteractive() ? 'button' : null\"\r\n [attr.tabindex]=\"isInteractive() ? 0 : null\"\r\n [style.cursor]=\"isInteractive() ? 'pointer' : 'default'\"\r\n (click)=\"onChipClick($event)\"\r\n (keydown)=\"onKeydown($event)\"\r\n gogRipple\r\n [rippleDisabled]=\"!rippleEnabled()\"\r\n>\r\n @if (avatarUrl()) {\r\n <img class=\"gog-chip__avatar\" [src]=\"avatarUrl()\" [alt]=\"avatarAlt()\" />\r\n }\r\n\r\n @if (iconName()) {\r\n <gog-icon class=\"gog-chip__icon\" [ariaHidden]=\"true\" [name]=\"iconName() ?? 'check'\" />\r\n }\r\n\r\n <span class=\"gog-chip__content\">\r\n <ng-content></ng-content>\r\n </span>\r\n\r\n @if (removable() && !disabled()) {\r\n <button\r\n class=\"gog-chip__remove\"\r\n type=\"button\"\r\n [attr.aria-label]=\"removeAriaLabel()\"\r\n (click)=\"onRemoveClick($event)\"\r\n >\r\n <gog-icon name=\"close\" />\r\n </button>\r\n }\r\n</div>\r\n", styles: [":host{display:inline-flex;max-width:100%;contain:layout style}.gog-chip__surface{display:inline-flex;align-items:center;gap:var(--gog-chip-gap, var(--gog-chip-size-gap, var(--gog-chip-md-gap)));box-sizing:border-box;width:fit-content;max-width:100%;overflow:hidden;padding:var(--gog-chip-padding-block, var(--gog-chip-size-padding-block, var(--gog-chip-md-padding-block))) var(--gog-chip-padding-inline, var(--gog-chip-size-padding-inline, var(--gog-chip-md-padding-inline)));border:var(--gog-chip-border-width) var(--gog-chip-border-style) var(--gog-chip-border);border-radius:var(--gog-chip-radius);background-color:var(--gog-chip-bg);color:var(--gog-chip-color);font-family:var(--gog-chip-font-family);font-size:var(--gog-chip-font-size, var(--gog-chip-size-font-size, var(--gog-chip-md-font-size)));font-weight:var(--gog-chip-font-weight);line-height:var(--gog-chip-line-height);white-space:nowrap;-webkit-user-select:none;user-select:none}.gog-chip__surface:focus-visible{outline:var(--gog-chip-focus-ring-width) solid var(--gog-chip-border);outline-offset:var(--gog-chip-focus-ring-offset)}:host(.gog-chip--clickable) .gog-chip__surface:hover:not([aria-disabled=true]){background-color:var(--gog-chip-hover-bg)}.gog-chip__surface[aria-disabled=true]{opacity:var(--gog-chip-disabled-opacity);pointer-events:none}.gog-chip__content{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;line-height:var(--gog-chip-line-height)}.gog-chip__avatar{width:var(--gog-chip-avatar-size, var(--gog-chip-size-avatar-size, var(--gog-chip-md-avatar-size)));height:var(--gog-chip-avatar-size, var(--gog-chip-size-avatar-size, var(--gog-chip-md-avatar-size)));border-radius:50%;object-fit:cover;flex-shrink:0}.gog-chip__icon{flex-shrink:0;font-size:var(--gog-chip-icon-size, var(--gog-chip-size-icon-size, var(--gog-chip-md-icon-size)))}.gog-chip__remove{display:inline-grid;place-items:center;width:calc(var(--gog-chip-remove-size, var(--gog-chip-size-remove-size, var(--gog-chip-md-remove-size))) * var(--gog-chip-remove-scale));height:calc(var(--gog-chip-remove-size, var(--gog-chip-size-remove-size, var(--gog-chip-md-remove-size))) * var(--gog-chip-remove-scale));padding:0;border:0;border-radius:50%;background:transparent;color:var(--gog-chip-remove-color);font-size:var(--gog-chip-remove-size, var(--gog-chip-size-remove-size, var(--gog-chip-md-remove-size)));cursor:pointer;flex-shrink:0}.gog-chip__remove:hover:not(:disabled){color:var(--gog-chip-remove-hover-color)}.gog-chip__remove:focus-visible{outline:var(--gog-chip-focus-ring-width) solid var(--gog-chip-border);outline-offset:var(--gog-chip-focus-ring-offset)}:host(.gog-chip--xsm) .gog-chip__surface{--gog-chip-size-font-size: var(--gog-chip-xsm-font-size);--gog-chip-size-padding-block: var(--gog-chip-xsm-padding-block);--gog-chip-size-padding-inline: var(--gog-chip-xsm-padding-inline);--gog-chip-size-gap: var(--gog-chip-xsm-gap);--gog-chip-size-avatar-size: var(--gog-chip-xsm-avatar-size);--gog-chip-size-icon-size: var(--gog-chip-xsm-icon-size);--gog-chip-size-remove-size: var(--gog-chip-xsm-remove-size)}:host(.gog-chip--sm) .gog-chip__surface{--gog-chip-size-font-size: var(--gog-chip-sm-font-size);--gog-chip-size-padding-block: var(--gog-chip-sm-padding-block);--gog-chip-size-padding-inline: var(--gog-chip-sm-padding-inline);--gog-chip-size-gap: var(--gog-chip-sm-gap);--gog-chip-size-avatar-size: var(--gog-chip-sm-avatar-size);--gog-chip-size-icon-size: var(--gog-chip-sm-icon-size);--gog-chip-size-remove-size: var(--gog-chip-sm-remove-size)}:host(.gog-chip--md) .gog-chip__surface{--gog-chip-size-font-size: var(--gog-chip-md-font-size);--gog-chip-size-padding-block: var(--gog-chip-md-padding-block);--gog-chip-size-padding-inline: var(--gog-chip-md-padding-inline);--gog-chip-size-gap: var(--gog-chip-md-gap);--gog-chip-size-avatar-size: var(--gog-chip-md-avatar-size);--gog-chip-size-icon-size: var(--gog-chip-md-icon-size);--gog-chip-size-remove-size: var(--gog-chip-md-remove-size)}:host(.gog-chip--lg) .gog-chip__surface{--gog-chip-size-font-size: var(--gog-chip-lg-font-size);--gog-chip-size-padding-block: var(--gog-chip-lg-padding-block);--gog-chip-size-padding-inline: var(--gog-chip-lg-padding-inline);--gog-chip-size-gap: var(--gog-chip-lg-gap);--gog-chip-size-avatar-size: var(--gog-chip-lg-avatar-size);--gog-chip-size-icon-size: var(--gog-chip-lg-icon-size);--gog-chip-size-remove-size: var(--gog-chip-lg-remove-size)}:host(.gog-chip--slg) .gog-chip__surface{--gog-chip-size-font-size: var(--gog-chip-slg-font-size);--gog-chip-size-padding-block: var(--gog-chip-slg-padding-block);--gog-chip-size-padding-inline: var(--gog-chip-slg-padding-inline);--gog-chip-size-gap: var(--gog-chip-slg-gap);--gog-chip-size-avatar-size: var(--gog-chip-slg-avatar-size);--gog-chip-size-icon-size: var(--gog-chip-slg-icon-size);--gog-chip-size-remove-size: var(--gog-chip-slg-remove-size)}:host(.gog-chip--pill) .gog-chip__surface{border-radius:var(--gog-chip-pill-radius)}:host(.gog-chip--rounded) .gog-chip__surface{border-radius:var(--gog-chip-radius)}:host(.gog-chip--has-avatar) .gog-chip__surface{padding-inline-start:calc(var(--gog-chip-padding-inline, var(--gog-chip-size-padding-inline, var(--gog-chip-md-padding-inline))) * var(--gog-chip-avatar-inset-ratio))}:host(.gog-chip--removable) .gog-chip__surface{padding-inline-end:calc(var(--gog-chip-padding-inline, var(--gog-chip-size-padding-inline, var(--gog-chip-md-padding-inline))) * var(--gog-chip-remove-inset-ratio))}:host(.gog-host--full-width){display:flex}:host(.gog-host--full-width) .gog-chip__surface{width:100%}\n"], dependencies: [{ kind: "directive", type: GogRippleDirective, selector: "[gogRipple]", inputs: ["rippleDisabled", "rippleCentred"] }, { kind: "component", type: IconComponent, selector: "gog-icon", inputs: ["name", "template", "title", "ariaHidden"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5954
6724
|
}
|
|
5955
6725
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: ChipComponent, decorators: [{
|
|
5956
6726
|
type: Component,
|
|
5957
|
-
args: [{ selector: 'gog-chip', imports: [IconComponent], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
6727
|
+
args: [{ selector: 'gog-chip', imports: [GogRippleDirective, IconComponent], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
5958
6728
|
'[class]': 'hostClasses()',
|
|
5959
|
-
}, template: "<div\n class=\"gog-chip__surface\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n [attr.role]=\"isInteractive() ? 'button' : null\"\n [attr.tabindex]=\"isInteractive() ? 0 : null\"\n [style.cursor]=\"isInteractive() ? 'pointer' : 'default'\"\n (click)=\"onChipClick($event)\"\n (keydown)=\"onKeydown($event)\"\n>\n @if (avatarUrl()) {\n <img class=\"gog-chip__avatar\" [src]=\"avatarUrl()\" [alt]=\"avatarAlt()\" />\n }\n\n @if (iconName()) {\n <gog-icon class=\"gog-chip__icon\" [ariaHidden]=\"true\" [name]=\"iconName() ?? 'check'\" />\n }\n\n <span class=\"gog-chip__content\">\n <ng-content></ng-content>\n </span>\n\n @if (removable() && !disabled()) {\n <button\n class=\"gog-chip__remove\"\n type=\"button\"\n [attr.aria-label]=\"removeAriaLabel()\"\n (click)=\"onRemoveClick($event)\"\n >\n <gog-icon name=\"close\" />\n </button>\n }\n</div>\n", styles: [":host{display:inline-flex;max-width:100%;contain:layout style}.gog-chip__surface{display:inline-flex;align-items:center;gap:var(--gog-chip-gap, var(--gog-chip-size-gap, var(--gog-chip-md-gap)));box-sizing:border-box;width:fit-content;max-width:100%;overflow:hidden;padding:var(--gog-chip-padding-block, var(--gog-chip-size-padding-block, var(--gog-chip-md-padding-block))) var(--gog-chip-padding-inline, var(--gog-chip-size-padding-inline, var(--gog-chip-md-padding-inline)));border:var(--gog-chip-border-width) var(--gog-chip-border-style) var(--gog-chip-border);border-radius:var(--gog-chip-radius);background-color:var(--gog-chip-bg);color:var(--gog-chip-color);font-family:var(--gog-chip-font-family);font-size:var(--gog-chip-font-size, var(--gog-chip-size-font-size, var(--gog-chip-md-font-size)));font-weight:var(--gog-chip-font-weight);line-height:var(--gog-chip-line-height);white-space:nowrap;-webkit-user-select:none;user-select:none}.gog-chip__surface:focus-visible{outline:var(--gog-chip-focus-ring-width) solid var(--gog-chip-border);outline-offset:var(--gog-chip-focus-ring-offset)}:host(.gog-chip--clickable) .gog-chip__surface:hover:not([aria-disabled=true]){background-color:var(--gog-chip-hover-bg)}.gog-chip__surface[aria-disabled=true]{opacity:var(--gog-chip-disabled-opacity);pointer-events:none}.gog-chip__content{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;line-height:var(--gog-chip-line-height)}.gog-chip__avatar{width:var(--gog-chip-avatar-size, var(--gog-chip-size-avatar-size, var(--gog-chip-md-avatar-size)));height:var(--gog-chip-avatar-size, var(--gog-chip-size-avatar-size, var(--gog-chip-md-avatar-size)));border-radius:50%;object-fit:cover;flex-shrink:0}.gog-chip__icon{flex-shrink:0;font-size:var(--gog-chip-icon-size, var(--gog-chip-size-icon-size, var(--gog-chip-md-icon-size)))}.gog-chip__remove{display:inline-grid;place-items:center;width:calc(var(--gog-chip-remove-size, var(--gog-chip-size-remove-size, var(--gog-chip-md-remove-size))) * var(--gog-chip-remove-scale));height:calc(var(--gog-chip-remove-size, var(--gog-chip-size-remove-size, var(--gog-chip-md-remove-size))) * var(--gog-chip-remove-scale));padding:0;border:0;border-radius:50%;background:transparent;color:var(--gog-chip-remove-color);font-size:var(--gog-chip-remove-size, var(--gog-chip-size-remove-size, var(--gog-chip-md-remove-size)));cursor:pointer;flex-shrink:0}.gog-chip__remove:hover:not(:disabled){color:var(--gog-chip-remove-hover-color)}.gog-chip__remove:focus-visible{outline:var(--gog-chip-focus-ring-width) solid var(--gog-chip-border);outline-offset:var(--gog-chip-focus-ring-offset)}:host(.gog-chip--xsm) .gog-chip__surface{--gog-chip-size-font-size: var(--gog-chip-xsm-font-size);--gog-chip-size-padding-block: var(--gog-chip-xsm-padding-block);--gog-chip-size-padding-inline: var(--gog-chip-xsm-padding-inline);--gog-chip-size-gap: var(--gog-chip-xsm-gap);--gog-chip-size-avatar-size: var(--gog-chip-xsm-avatar-size);--gog-chip-size-icon-size: var(--gog-chip-xsm-icon-size);--gog-chip-size-remove-size: var(--gog-chip-xsm-remove-size)}:host(.gog-chip--sm) .gog-chip__surface{--gog-chip-size-font-size: var(--gog-chip-sm-font-size);--gog-chip-size-padding-block: var(--gog-chip-sm-padding-block);--gog-chip-size-padding-inline: var(--gog-chip-sm-padding-inline);--gog-chip-size-gap: var(--gog-chip-sm-gap);--gog-chip-size-avatar-size: var(--gog-chip-sm-avatar-size);--gog-chip-size-icon-size: var(--gog-chip-sm-icon-size);--gog-chip-size-remove-size: var(--gog-chip-sm-remove-size)}:host(.gog-chip--md) .gog-chip__surface{--gog-chip-size-font-size: var(--gog-chip-md-font-size);--gog-chip-size-padding-block: var(--gog-chip-md-padding-block);--gog-chip-size-padding-inline: var(--gog-chip-md-padding-inline);--gog-chip-size-gap: var(--gog-chip-md-gap);--gog-chip-size-avatar-size: var(--gog-chip-md-avatar-size);--gog-chip-size-icon-size: var(--gog-chip-md-icon-size);--gog-chip-size-remove-size: var(--gog-chip-md-remove-size)}:host(.gog-chip--lg) .gog-chip__surface{--gog-chip-size-font-size: var(--gog-chip-lg-font-size);--gog-chip-size-padding-block: var(--gog-chip-lg-padding-block);--gog-chip-size-padding-inline: var(--gog-chip-lg-padding-inline);--gog-chip-size-gap: var(--gog-chip-lg-gap);--gog-chip-size-avatar-size: var(--gog-chip-lg-avatar-size);--gog-chip-size-icon-size: var(--gog-chip-lg-icon-size);--gog-chip-size-remove-size: var(--gog-chip-lg-remove-size)}:host(.gog-chip--slg) .gog-chip__surface{--gog-chip-size-font-size: var(--gog-chip-slg-font-size);--gog-chip-size-padding-block: var(--gog-chip-slg-padding-block);--gog-chip-size-padding-inline: var(--gog-chip-slg-padding-inline);--gog-chip-size-gap: var(--gog-chip-slg-gap);--gog-chip-size-avatar-size: var(--gog-chip-slg-avatar-size);--gog-chip-size-icon-size: var(--gog-chip-slg-icon-size);--gog-chip-size-remove-size: var(--gog-chip-slg-remove-size)}:host(.gog-chip--pill) .gog-chip__surface{border-radius:var(--gog-chip-pill-radius)}:host(.gog-chip--rounded) .gog-chip__surface{border-radius:var(--gog-chip-radius)}:host(.gog-chip--has-avatar) .gog-chip__surface{padding-inline-start:calc(var(--gog-chip-padding-inline, var(--gog-chip-size-padding-inline, var(--gog-chip-md-padding-inline))) * var(--gog-chip-avatar-inset-ratio))}:host(.gog-chip--removable) .gog-chip__surface{padding-inline-end:calc(var(--gog-chip-padding-inline, var(--gog-chip-size-padding-inline, var(--gog-chip-md-padding-inline))) * var(--gog-chip-remove-inset-ratio))}:host(.gog-host--full-width){display:flex}:host(.gog-host--full-width) .gog-chip__surface{width:100%}\n"] }]
|
|
5960
|
-
}], propDecorators: { size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], shape: [{ type: i0.Input, args: [{ isSignal: true, alias: "shape", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], clickable: [{ type: i0.Input, args: [{ isSignal: true, alias: "clickable", required: false }] }], removable: [{ type: i0.Input, args: [{ isSignal: true, alias: "removable", required: false }] }], fullWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "fullWidth", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], removeAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "removeAriaLabel", required: false }] }], avatarUrl: [{ type: i0.Input, args: [{ isSignal: true, alias: "avatarUrl", required: false }] }], avatarAlt: [{ type: i0.Input, args: [{ isSignal: true, alias: "avatarAlt", required: false }] }], iconName: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconName", required: false }] }], gogClick: [{ type: i0.Output, args: ["gogClick"] }], gogRemove: [{ type: i0.Output, args: ["gogRemove"] }] } });
|
|
6729
|
+
}, template: "<div\r\n class=\"gog-chip__surface\"\r\n [attr.aria-label]=\"ariaLabel() || null\"\r\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\r\n [attr.role]=\"isInteractive() ? 'button' : null\"\r\n [attr.tabindex]=\"isInteractive() ? 0 : null\"\r\n [style.cursor]=\"isInteractive() ? 'pointer' : 'default'\"\r\n (click)=\"onChipClick($event)\"\r\n (keydown)=\"onKeydown($event)\"\r\n gogRipple\r\n [rippleDisabled]=\"!rippleEnabled()\"\r\n>\r\n @if (avatarUrl()) {\r\n <img class=\"gog-chip__avatar\" [src]=\"avatarUrl()\" [alt]=\"avatarAlt()\" />\r\n }\r\n\r\n @if (iconName()) {\r\n <gog-icon class=\"gog-chip__icon\" [ariaHidden]=\"true\" [name]=\"iconName() ?? 'check'\" />\r\n }\r\n\r\n <span class=\"gog-chip__content\">\r\n <ng-content></ng-content>\r\n </span>\r\n\r\n @if (removable() && !disabled()) {\r\n <button\r\n class=\"gog-chip__remove\"\r\n type=\"button\"\r\n [attr.aria-label]=\"removeAriaLabel()\"\r\n (click)=\"onRemoveClick($event)\"\r\n >\r\n <gog-icon name=\"close\" />\r\n </button>\r\n }\r\n</div>\r\n", styles: [":host{display:inline-flex;max-width:100%;contain:layout style}.gog-chip__surface{display:inline-flex;align-items:center;gap:var(--gog-chip-gap, var(--gog-chip-size-gap, var(--gog-chip-md-gap)));box-sizing:border-box;width:fit-content;max-width:100%;overflow:hidden;padding:var(--gog-chip-padding-block, var(--gog-chip-size-padding-block, var(--gog-chip-md-padding-block))) var(--gog-chip-padding-inline, var(--gog-chip-size-padding-inline, var(--gog-chip-md-padding-inline)));border:var(--gog-chip-border-width) var(--gog-chip-border-style) var(--gog-chip-border);border-radius:var(--gog-chip-radius);background-color:var(--gog-chip-bg);color:var(--gog-chip-color);font-family:var(--gog-chip-font-family);font-size:var(--gog-chip-font-size, var(--gog-chip-size-font-size, var(--gog-chip-md-font-size)));font-weight:var(--gog-chip-font-weight);line-height:var(--gog-chip-line-height);white-space:nowrap;-webkit-user-select:none;user-select:none}.gog-chip__surface:focus-visible{outline:var(--gog-chip-focus-ring-width) solid var(--gog-chip-border);outline-offset:var(--gog-chip-focus-ring-offset)}:host(.gog-chip--clickable) .gog-chip__surface:hover:not([aria-disabled=true]){background-color:var(--gog-chip-hover-bg)}.gog-chip__surface[aria-disabled=true]{opacity:var(--gog-chip-disabled-opacity);pointer-events:none}.gog-chip__content{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;line-height:var(--gog-chip-line-height)}.gog-chip__avatar{width:var(--gog-chip-avatar-size, var(--gog-chip-size-avatar-size, var(--gog-chip-md-avatar-size)));height:var(--gog-chip-avatar-size, var(--gog-chip-size-avatar-size, var(--gog-chip-md-avatar-size)));border-radius:50%;object-fit:cover;flex-shrink:0}.gog-chip__icon{flex-shrink:0;font-size:var(--gog-chip-icon-size, var(--gog-chip-size-icon-size, var(--gog-chip-md-icon-size)))}.gog-chip__remove{display:inline-grid;place-items:center;width:calc(var(--gog-chip-remove-size, var(--gog-chip-size-remove-size, var(--gog-chip-md-remove-size))) * var(--gog-chip-remove-scale));height:calc(var(--gog-chip-remove-size, var(--gog-chip-size-remove-size, var(--gog-chip-md-remove-size))) * var(--gog-chip-remove-scale));padding:0;border:0;border-radius:50%;background:transparent;color:var(--gog-chip-remove-color);font-size:var(--gog-chip-remove-size, var(--gog-chip-size-remove-size, var(--gog-chip-md-remove-size)));cursor:pointer;flex-shrink:0}.gog-chip__remove:hover:not(:disabled){color:var(--gog-chip-remove-hover-color)}.gog-chip__remove:focus-visible{outline:var(--gog-chip-focus-ring-width) solid var(--gog-chip-border);outline-offset:var(--gog-chip-focus-ring-offset)}:host(.gog-chip--xsm) .gog-chip__surface{--gog-chip-size-font-size: var(--gog-chip-xsm-font-size);--gog-chip-size-padding-block: var(--gog-chip-xsm-padding-block);--gog-chip-size-padding-inline: var(--gog-chip-xsm-padding-inline);--gog-chip-size-gap: var(--gog-chip-xsm-gap);--gog-chip-size-avatar-size: var(--gog-chip-xsm-avatar-size);--gog-chip-size-icon-size: var(--gog-chip-xsm-icon-size);--gog-chip-size-remove-size: var(--gog-chip-xsm-remove-size)}:host(.gog-chip--sm) .gog-chip__surface{--gog-chip-size-font-size: var(--gog-chip-sm-font-size);--gog-chip-size-padding-block: var(--gog-chip-sm-padding-block);--gog-chip-size-padding-inline: var(--gog-chip-sm-padding-inline);--gog-chip-size-gap: var(--gog-chip-sm-gap);--gog-chip-size-avatar-size: var(--gog-chip-sm-avatar-size);--gog-chip-size-icon-size: var(--gog-chip-sm-icon-size);--gog-chip-size-remove-size: var(--gog-chip-sm-remove-size)}:host(.gog-chip--md) .gog-chip__surface{--gog-chip-size-font-size: var(--gog-chip-md-font-size);--gog-chip-size-padding-block: var(--gog-chip-md-padding-block);--gog-chip-size-padding-inline: var(--gog-chip-md-padding-inline);--gog-chip-size-gap: var(--gog-chip-md-gap);--gog-chip-size-avatar-size: var(--gog-chip-md-avatar-size);--gog-chip-size-icon-size: var(--gog-chip-md-icon-size);--gog-chip-size-remove-size: var(--gog-chip-md-remove-size)}:host(.gog-chip--lg) .gog-chip__surface{--gog-chip-size-font-size: var(--gog-chip-lg-font-size);--gog-chip-size-padding-block: var(--gog-chip-lg-padding-block);--gog-chip-size-padding-inline: var(--gog-chip-lg-padding-inline);--gog-chip-size-gap: var(--gog-chip-lg-gap);--gog-chip-size-avatar-size: var(--gog-chip-lg-avatar-size);--gog-chip-size-icon-size: var(--gog-chip-lg-icon-size);--gog-chip-size-remove-size: var(--gog-chip-lg-remove-size)}:host(.gog-chip--slg) .gog-chip__surface{--gog-chip-size-font-size: var(--gog-chip-slg-font-size);--gog-chip-size-padding-block: var(--gog-chip-slg-padding-block);--gog-chip-size-padding-inline: var(--gog-chip-slg-padding-inline);--gog-chip-size-gap: var(--gog-chip-slg-gap);--gog-chip-size-avatar-size: var(--gog-chip-slg-avatar-size);--gog-chip-size-icon-size: var(--gog-chip-slg-icon-size);--gog-chip-size-remove-size: var(--gog-chip-slg-remove-size)}:host(.gog-chip--pill) .gog-chip__surface{border-radius:var(--gog-chip-pill-radius)}:host(.gog-chip--rounded) .gog-chip__surface{border-radius:var(--gog-chip-radius)}:host(.gog-chip--has-avatar) .gog-chip__surface{padding-inline-start:calc(var(--gog-chip-padding-inline, var(--gog-chip-size-padding-inline, var(--gog-chip-md-padding-inline))) * var(--gog-chip-avatar-inset-ratio))}:host(.gog-chip--removable) .gog-chip__surface{padding-inline-end:calc(var(--gog-chip-padding-inline, var(--gog-chip-size-padding-inline, var(--gog-chip-md-padding-inline))) * var(--gog-chip-remove-inset-ratio))}:host(.gog-host--full-width){display:flex}:host(.gog-host--full-width) .gog-chip__surface{width:100%}\n"] }]
|
|
6730
|
+
}], propDecorators: { size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], shape: [{ type: i0.Input, args: [{ isSignal: true, alias: "shape", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], clickable: [{ type: i0.Input, args: [{ isSignal: true, alias: "clickable", required: false }] }], removable: [{ type: i0.Input, args: [{ isSignal: true, alias: "removable", required: false }] }], fullWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "fullWidth", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], removeAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "removeAriaLabel", required: false }] }], avatarUrl: [{ type: i0.Input, args: [{ isSignal: true, alias: "avatarUrl", required: false }] }], avatarAlt: [{ type: i0.Input, args: [{ isSignal: true, alias: "avatarAlt", required: false }] }], iconName: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconName", required: false }] }], ripple: [{ type: i0.Input, args: [{ isSignal: true, alias: "ripple", required: false }] }], gogClick: [{ type: i0.Output, args: ["gogClick"] }], gogRemove: [{ type: i0.Output, args: ["gogRemove"] }] } });
|
|
5961
6731
|
|
|
5962
6732
|
/**
|
|
5963
6733
|
* Custom markup for the tag's leading icon:
|
|
@@ -6048,14 +6818,14 @@ class SelectComponent extends GogDropdownBase {
|
|
|
6048
6818
|
this.close();
|
|
6049
6819
|
}
|
|
6050
6820
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: SelectComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
6051
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: SelectComponent, isStandalone: true, selector: "gog-select", inputs: { inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, host: { properties: { "style.--gog-select-min-width": "minWidth()" } }, viewQueries: [{ propertyName: "panelTemplate", first: true, predicate: ["panelTpl"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<!--\r\n Deliberately not `gog-contained-layout`: `contain: layout` makes this element a stacking\r\n context, which traps the panel's z-index inside it and lets whatever follows on the page\r\n paint over the open dropdown.\r\n-->\r\n<div\r\n class=\"gog-select\"\r\n [class.gog-select--clearable]=\"showClear()\"\r\n [class]=\"sizeClass()\"\r\n [class.gog-select--disabled]=\"isDisabled()\"\r\n [class.gog-select--open]=\"isOpen()\"\r\n [class.gog-select--float-in]=\"resolvedFloatLabel() === 'in'\"\r\n [class.gog-select--float-on]=\"resolvedFloatLabel() === 'on'\"\r\n [class.gog-select--float-over]=\"resolvedFloatLabel() === 'over'\"\r\n [class.gog-select--floated]=\"isFloatLabelFloated()\"\r\n>\r\n <!--\r\n Associated with aria-labelledby rather than `for`: the trigger is a <button>, which is\r\n not a labelable element, so `for` pointing at it is silently ignored by browsers and\r\n assistive tech alike.\r\n -->\r\n @if (label() && resolvedFloatLabel() === 'none') {\r\n <!-- eslint-disable-next-line @angular-eslint/template/label-has-associated-control -- associated via aria-labelledby above instead, see comment -->\r\n <label class=\"gog-select__label\" [id]=\"labelId()\">{{ label() }}</label>\r\n }\r\n\r\n <div class=\"gog-select__field\">\r\n @if (label() && isFloatLabelActive()) {\r\n <!-- eslint-disable-next-line @angular-eslint/template/label-has-associated-control -- associated via aria-labelledby above instead, see comment -->\r\n <label class=\"gog-select__label gog-select__label--float\" [id]=\"labelId()\">{{\r\n label()\r\n }}</label>\r\n }\r\n <button\r\n type=\"button\"\r\n class=\"gog-select__control\"\r\n [id]=\"triggerId()\"\r\n [disabled]=\"isDisabled()\"\r\n [attr.aria-labelledby]=\"label() ? labelId() : null\"\r\n [attr.aria-label]=\"label() ? null : ariaLabel() || placeholder() || 'Select'\"\r\n [attr.aria-controls]=\"listboxId()\"\r\n [attr.aria-expanded]=\"isOpen()\"\r\n [attr.aria-haspopup]=\"'listbox'\"\r\n [attr.aria-invalid]=\"hasError()\"\r\n [attr.aria-describedby]=\"errorId()\"\r\n (click)=\"toggle()\"\r\n (focus)=\"onFocusIn()\"\r\n (blur)=\"onFocusOut()\"\r\n (keydown.enter)=\"toggle(); $event.preventDefault()\"\r\n (keydown.space)=\"toggle(); $event.preventDefault()\"\r\n (keydown.escape)=\"close()\"\r\n (keydown.arrowdown)=\"onTriggerArrowKeydown($event)\"\r\n (keydown.arrowup)=\"onTriggerArrowKeydown($event)\"\r\n >\r\n <span class=\"gog-select__value\" [class.gog-select__value--placeholder]=\"!selectedOption()\">\r\n {{ selectedLabel() || effectivePlaceholder() }}\r\n </span>\r\n\r\n <span class=\"gog-select__chevron\" aria-hidden=\"true\">\r\n <gog-icon [template]=\"chevronSlot()?.templateRef ?? null\" name=\"chevron-down\" />\r\n </span>\r\n </button>\r\n\r\n <!--\r\n A sibling of the trigger, not a child: `.gog-select__control` is a <button>, and nesting\r\n one button inside another is invalid HTML. It is positioned over the trigger's right edge\r\n by the stylesheet, which also reserves room for it so it never covers the value text.\r\n -->\r\n @if (showClear()) {\r\n <button\r\n type=\"button\"\r\n class=\"gog-select__clear gog-inline-center\"\r\n [attr.aria-label]=\"resolvedClearLabel()\"\r\n (click)=\"clearValue($event)\"\r\n >\r\n <gog-icon name=\"close\" />\r\n </button>\r\n }\r\n\r\n @if (isOpen() && !resolvedAppendToBody()) {\r\n <ng-container [ngTemplateOutlet]=\"panelTpl\" />\r\n }\r\n </div>\r\n\r\n @if (hasError()) {\r\n <span class=\"gog-select__error\" [attr.id]=\"errorId()\" role=\"alert\">\r\n {{ visibleError() }}\r\n </span>\r\n }\r\n</div>\r\n\r\n<!--\r\n One template for both render modes. When `appendToBody` is set it is stamped into\r\n <body> by the overlay, which is why the portal-only modifier and the resolved\r\n coordinates are applied conditionally: outside the component's subtree the panel can\r\n no longer inherit the size tokens from the `.gog-select--sm/--lg` wrapper.\r\n-->\r\n<ng-template #panelTpl>\r\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- (click) below is housekeeping stopPropagation, not an interactive handler; the focusable/keyboard-operable elements are the options inside -->\r\n <div\r\n [id]=\"listboxId()\"\r\n class=\"gog-select__dropdown\"\r\n [class.gog-select__dropdown--up]=\"!resolvedAppendToBody() && dropdownDirectionState() === 'up'\"\r\n [class.gog-select__dropdown--portal]=\"resolvedAppendToBody()\"\r\n [class]=\"panelSizeClass()\"\r\n [style.top.px]=\"resolvedAppendToBody() ? panelPlacement()?.top : null\"\r\n [style.left.px]=\"resolvedAppendToBody() ? panelPlacement()?.left : null\"\r\n [style.width]=\"resolvedAppendToBody() ? resolvedPanelWidth() : null\"\r\n [style.min-width]=\"resolvedAppendToBody() ? resolvedPanelMinWidth() : null\"\r\n [style.max-height]=\"resolvedAppendToBody() ? resolvedPanelMaxHeight() : null\"\r\n [style.z-index]=\"dropdownZIndex() ?? panelZIndex()\"\r\n role=\"listbox\"\r\n [attr.aria-labelledby]=\"label() ? labelId() : null\"\r\n (click)=\"$event.stopPropagation()\"\r\n >\r\n <!--\r\n Not a tab stop of its own: the listbox pattern's only stop is the trigger, with\r\n focus moved between options via the arrow keys (roving-focus.ts), which already\r\n scrolls the focused option into view natively \u2014 no separate keyboard-scroll target\r\n needed here.\r\n -->\r\n @if (resolvedFilter() && resolvedFilterPosition() === 'top') {\r\n <div class=\"gog-select__filter gog-select__filter--top\">\r\n <input\r\n type=\"text\"\r\n class=\"gog-select__filter-input\"\r\n [placeholder]=\"filterPlaceholder()\"\r\n [value]=\"filterQuery()\"\r\n (input)=\"onFilterInput($event)\"\r\n (click)=\"$event.stopPropagation()\"\r\n (keydown.escape)=\"close(); focusTrigger()\"\r\n />\r\n </div>\r\n }\r\n <gog-scroll\r\n size=\"thin\"\r\n [focusable]=\"false\"\r\n overscrollBehavior=\"contain\"\r\n class=\"gog-select__scroll\"\r\n >\r\n @if (visibleOptions().length === 0) {\r\n <p class=\"gog-select__empty\">{{ filterEmptyMessage() }}</p>\r\n }\r\n @for (option of visibleOptions(); track valueOf(option)) {\r\n <!--\r\n tabindex=\"-1\" keeps the list to a single tab stop, as the listbox pattern expects:\r\n focus is moved between options with the arrow keys, not by tabbing through every\r\n one of them. Programmatic .focus() still works on a negative tabindex.\r\n -->\r\n <button\r\n type=\"button\"\r\n class=\"gog-select__option\"\r\n role=\"option\"\r\n tabindex=\"-1\"\r\n [attr.aria-selected]=\"isSelected(option)\"\r\n [attr.aria-disabled]=\"isOptionDisabled(option)\"\r\n [class.gog-select__option--selected]=\"isSelected(option)\"\r\n [class.gog-select__option--disabled]=\"isOptionDisabled(option)\"\r\n (click)=\"selectOption(option, $event)\"\r\n (keydown)=\"onOptionKeydown($event)\"\r\n >\r\n @if (optionSlot(); as slot) {\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n slot.templateRef;\r\n context: optionContext(option, isSelected(option))\r\n \"\r\n />\r\n } @else {\r\n <span class=\"gog-select__option-mark\" aria-hidden=\"true\">\r\n @if (isSelected(option)) {\r\n <gog-icon name=\"check\" />\r\n }\r\n </span>\r\n <span class=\"gog-select__option-label\">{{ labelOf(option) }}</span>\r\n }\r\n </button>\r\n }\r\n </gog-scroll>\r\n @if (resolvedFilter() && resolvedFilterPosition() === 'bottom') {\r\n <div class=\"gog-select__filter gog-select__filter--bottom\">\r\n <input\r\n type=\"text\"\r\n class=\"gog-select__filter-input\"\r\n [placeholder]=\"filterPlaceholder()\"\r\n [value]=\"filterQuery()\"\r\n (input)=\"onFilterInput($event)\"\r\n (click)=\"$event.stopPropagation()\"\r\n (keydown.escape)=\"close(); focusTrigger()\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n</ng-template>\r\n", styles: ["@charset \"UTF-8\";:host{display:block}:host(.gog-host--auto-width){width:fit-content}.gog-select{display:flex;flex-direction:column;gap:var(--gog-select-gap);width:100%}.gog-select--xsm,.gog-select__dropdown--xsm{--gog-select-size-padding-y: var(--gog-field-xsm-padding-y);--gog-select-size-padding-x: var(--gog-field-xsm-padding-x);--gog-select-size-font-size: var(--gog-field-xsm-font-size)}.gog-select--sm,.gog-select__dropdown--sm{--gog-select-size-padding-y: var(--gog-field-sm-padding-y);--gog-select-size-padding-x: var(--gog-field-sm-padding-x);--gog-select-size-font-size: var(--gog-field-sm-font-size)}.gog-select--lg,.gog-select__dropdown--lg{--gog-select-size-padding-y: var(--gog-field-lg-padding-y);--gog-select-size-padding-x: var(--gog-field-lg-padding-x);--gog-select-size-font-size: var(--gog-field-lg-font-size)}.gog-select--slg,.gog-select__dropdown--slg{--gog-select-size-padding-y: var(--gog-field-slg-padding-y);--gog-select-size-padding-x: var(--gog-field-slg-padding-x);--gog-select-size-font-size: var(--gog-field-slg-font-size)}.gog-select--disabled{opacity:var(--gog-select-disabled-opacity)}.gog-select--disabled .gog-select__label,.gog-select--disabled .gog-select__field{cursor:not-allowed}.gog-select__label{font-family:var(--gog-select-label-font-family);font-size:var(--gog-select-label-font-size);color:var(--gog-select-label-color);text-transform:var(--gog-select-label-text-transform);letter-spacing:var(--gog-select-label-letter-spacing);cursor:pointer}.gog-select__field{position:relative;cursor:pointer}.gog-select__control{width:100%;padding-block:var(--gog-select-control-padding-y, var(--gog-select-size-padding-y, var(--gog-field-md-padding-y)));padding-inline:var(--gog-select-control-padding-x, var(--gog-select-size-padding-x, var(--gog-field-md-padding-x))) var(--gog-select-chevron-inset);display:flex;align-items:center;justify-content:space-between;gap:var(--gog-select-control-gap);font-family:var(--gog-select-font-family);font-size:var(--gog-select-control-font, var(--gog-select-size-font-size, var(--gog-field-md-font-size)));color:var(--gog-select-field-color);background-color:var(--gog-select-field-bg);border:var(--gog-select-field-border-width) var(--gog-select-field-border-style) var(--gog-select-field-border);border-radius:var(--gog-select-radius);outline:none;cursor:pointer;transition:border-color var(--gog-select-transition-duration) var(--gog-easing),box-shadow var(--gog-select-transition-duration) var(--gog-easing)}.gog-select__control:focus{border-color:var(--gog-select-focus-border);box-shadow:var(--gog-select-focus-glow)}.gog-select__control:focus-visible{outline:var(--gog-select-focus-ring-width) solid var(--gog-select-focus-border);outline-offset:var(--gog-select-focus-ring-offset)}.gog-select__control:disabled{cursor:not-allowed}.gog-select--open .gog-select__control{border-color:var(--gog-select-focus-border)}.gog-select__value{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:start}.gog-select__value--placeholder{color:var(--gog-select-placeholder-color)}.gog-select__chevron{width:var(--gog-select-control-font, var(--gog-select-size-font-size, var(--gog-field-md-font-size)));height:var(--gog-select-control-font, var(--gog-select-size-font-size, var(--gog-field-md-font-size)));display:flex;align-items:center;justify-content:center;color:var(--gog-select-chevron-color);pointer-events:none;flex-shrink:0}.gog-select__chevron gog-icon{font-size:calc(var(--gog-select-control-font, var(--gog-select-size-font-size, var(--gog-field-md-font-size))) * var(--gog-select-chevron-icon-ratio))}.gog-select__dropdown{position:absolute;top:calc(100% + var(--gog-select-panel-offset));inset-inline-start:0;inset-inline-end:auto;min-width:100%;width:max-content;max-width:var(--gog-select-panel-max-width);z-index:var(--gog-dropdown-z);display:flex;flex-direction:column;background-color:var(--gog-select-panel-bg);border:var(--gog-select-field-border-width) var(--gog-select-field-border-style) var(--gog-select-field-border);border-radius:var(--gog-select-radius);max-height:var(--gog-select-panel-max-height);overflow:hidden;box-shadow:var(--gog-select-panel-shadow)}.gog-select__scroll{flex:1;min-height:0}.gog-select__dropdown--up{top:auto;bottom:calc(100% + var(--gog-select-panel-offset))}.gog-select__dropdown--portal{position:fixed;top:unset;bottom:unset;inset-inline:unset}.gog-select__option{width:100%;display:flex;align-items:center;gap:var(--gog-select-option-gap);padding:var(--gog-select-control-padding-y, var(--gog-select-size-padding-y, var(--gog-field-md-padding-y))) var(--gog-select-control-padding-x, var(--gog-select-size-padding-x, var(--gog-field-md-padding-x)));border:0;background:transparent;text-align:start;font:inherit;font-family:var(--gog-select-font-family);font-size:var(--gog-select-control-font, var(--gog-select-size-font-size, var(--gog-field-md-font-size)));color:var(--gog-select-option-color);cursor:pointer;transition:background-color var(--gog-select-option-transition-duration) var(--gog-easing)}.gog-select__option:hover{background-color:var(--gog-select-option-hover-bg)}.gog-select__option--selected{color:var(--gog-select-option-selected-color)}.gog-select__option--disabled{opacity:var(--gog-select-option-disabled-opacity);cursor:not-allowed}.gog-select__option:focus-visible{outline:var(--gog-select-focus-ring-width) solid var(--gog-select-focus-border);outline-offset:calc(var(--gog-select-focus-ring-width) * -1)}.gog-select__option-mark{display:inline-flex;align-items:center;justify-content:center;width:calc(var(--gog-select-control-font, var(--gog-select-size-font-size, var(--gog-field-md-font-size))) * var(--gog-select-mark-size-ratio));height:calc(var(--gog-select-control-font, var(--gog-select-size-font-size, var(--gog-field-md-font-size))) * var(--gog-select-mark-size-ratio));flex-shrink:0}.gog-select__option-mark gog-icon{font-size:calc(var(--gog-select-control-font, var(--gog-select-size-font-size, var(--gog-field-md-font-size))) * var(--gog-select-mark-icon-ratio))}.gog-select__error{font-family:var(--gog-select-font-family);font-size:var(--gog-select-error-font-size);color:var(--gog-select-error-color)}.gog-select__label--float{position:absolute;inset-inline-start:var(--gog-select-control-padding-x, var(--gog-select-size-padding-x, var(--gog-field-md-padding-x)));top:50%;transform:translateY(-50%);max-width:calc(100% - 2 * var(--gog-select-control-padding-x, var(--gog-select-size-padding-x, var(--gog-field-md-padding-x))));overflow:hidden;text-overflow:ellipsis;white-space:nowrap;pointer-events:none;cursor:default;color:var(--gog-select-placeholder-color);font-size:var(--gog-select-size-font-size, var(--gog-field-md-font-size));text-transform:none;letter-spacing:normal;transition:transform var(--gog-select-transition-duration) var(--gog-easing),font-size var(--gog-select-transition-duration) var(--gog-easing),color var(--gog-select-transition-duration) var(--gog-easing),top var(--gog-select-transition-duration) var(--gog-easing),background-color var(--gog-select-transition-duration) var(--gog-easing)}.gog-select--float-in,.gog-select--float-on{--gog-select-float-top-padding: calc(var(--gog-select-control-padding-y, var(--gog-select-size-padding-y, var(--gog-field-md-padding-y))) + var(--gog-select-float-label-reserve))}.gog-select--float-in .gog-select__control,.gog-select--float-on .gog-select__control{padding-top:var(--gog-select-float-top-padding)}.gog-select--float-in .gog-select__label--float,.gog-select--float-on .gog-select__label--float{top:var(--gog-select-float-top-padding);transform:none}.gog-select--float-in.gog-select--floated .gog-select__label--float{top:var(--gog-select-float-label-in-top);transform:translateY(0);font-size:var(--gog-select-label-font-size);color:var(--gog-select-label-color);text-transform:var(--gog-select-label-text-transform);letter-spacing:var(--gog-select-label-letter-spacing)}.gog-select--float-on.gog-select--floated .gog-select__label--float{top:0;transform:translateY(-50%);font-size:var(--gog-select-label-font-size);color:var(--gog-select-label-color);text-transform:var(--gog-select-label-text-transform);letter-spacing:var(--gog-select-label-letter-spacing);background-color:var(--gog-select-float-label-on-bg, var(--gog-select-field-bg));padding:0 4px;inset-inline-start:calc(var(--gog-select-control-padding-x, var(--gog-select-size-padding-x, var(--gog-field-md-padding-x))) - 4px)}.gog-select--float-over.gog-select--floated .gog-select__label--float{top:calc(-1 * var(--gog-select-float-label-over-gap));transform:translateY(-100%);font-size:var(--gog-select-label-font-size);color:var(--gog-select-label-color);text-transform:var(--gog-select-label-text-transform);letter-spacing:var(--gog-select-label-letter-spacing)}.gog-select--float-over .gog-select__field{margin-top:var(--gog-select-float-label-over-reserve)}@media(prefers-reduced-motion:reduce){.gog-select__control,.gog-select__option,.gog-select__label--float{transition:none}}.gog-select__clear{position:absolute;top:50%;inset-inline-end:var(--gog-select-chevron-inset);transform:translateY(-50%);width:var(--gog-select-control-font, var(--gog-select-size-font-size, var(--gog-field-md-font-size)));height:var(--gog-select-control-font, var(--gog-select-size-font-size, var(--gog-field-md-font-size)));padding:0;border:0;border-radius:var(--gog-select-clear-radius);background:transparent;color:var(--gog-select-clear-color);line-height:1;cursor:pointer;transition:color var(--gog-select-transition-duration) var(--gog-easing)}.gog-select__clear:hover{color:var(--gog-select-clear-hover-color)}.gog-select__clear:focus-visible{outline:var(--gog-select-focus-ring-width) solid var(--gog-select-focus-border);outline-offset:var(--gog-select-focus-ring-offset)}.gog-select__clear gog-icon{font-size:calc(var(--gog-select-control-font, var(--gog-select-size-font-size, var(--gog-field-md-font-size))) * var(--gog-select-clear-icon-ratio))}.gog-select--clearable .gog-select__control{padding-inline-end:calc(var(--gog-select-chevron-inset) + var(--gog-select-clear-gap) + var(--gog-select-control-font, var(--gog-select-size-font-size, var(--gog-field-md-font-size))))}.gog-select__filter{position:sticky;top:0;z-index:1;padding:var(--gog-select-filter-padding);background:var(--gog-select-panel-bg)}.gog-select__filter-input{width:100%;padding:var(--gog-select-filter-input-padding-y) var(--gog-select-filter-input-padding-x);font-family:var(--gog-select-font-family);font-size:var(--gog-select-control-font, var(--gog-select-size-font-size, var(--gog-field-md-font-size)));color:var(--gog-select-filter-input-color);background:var(--gog-select-filter-input-bg);border:var(--gog-control-border-width) var(--gog-control-border-style) var(--gog-select-filter-input-border);border-radius:var(--gog-select-filter-input-radius);outline:none}.gog-select__filter-input:focus{border-color:var(--gog-select-focus-border)}.gog-select__empty{margin:0;padding:var(--gog-select-filter-empty-padding);font-family:var(--gog-select-font-family);font-size:var(--gog-select-control-font, var(--gog-select-size-font-size, var(--gog-field-md-font-size)));color:var(--gog-select-filter-empty-color);text-align:center}.gog-select__filter--top{border-bottom:var(--gog-select-filter-border-width) var(--gog-select-filter-border-style) var(--gog-select-filter-border-color)}.gog-select__filter--bottom{top:auto;bottom:0;border-top:var(--gog-select-filter-border-width) var(--gog-select-filter-border-style) var(--gog-select-filter-border-color)}:host(.gog-host--auto-width),:host(.gog-host--auto-width) .gog-select__control{min-width:var(--gog-select-min-width)}.gog-select__dropdown--portal{max-width:var(--gog-select-panel-max-width)}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "gog-icon", inputs: ["name", "template", "title", "ariaHidden"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ScrollComponent, selector: "gog-scroll", inputs: ["axis", "size", "autoHide", "hideDelay", "reachThreshold", "focusable", "ariaLabel", "overscrollBehavior", "showTrack"], outputs: ["gogScroll", "gogReachStart", "gogReachEnd"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
6821
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: SelectComponent, isStandalone: true, selector: "gog-select", inputs: { inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, host: { properties: { "style.--gog-select-min-width": "minWidth()" } }, viewQueries: [{ propertyName: "panelTemplate", first: true, predicate: ["panelTpl"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<!--\r\n Deliberately not `gog-contained-layout`: `contain: layout` makes this element a stacking\r\n context, which traps the panel's z-index inside it and lets whatever follows on the page\r\n paint over the open dropdown.\r\n-->\r\n<div\r\n class=\"gog-select\"\r\n [class.gog-select--clearable]=\"showClear()\"\r\n [class]=\"sizeClass()\"\r\n [class.gog-select--disabled]=\"isDisabled()\"\r\n [class.gog-select--open]=\"isOpen()\"\r\n [class.gog-select--float-in]=\"resolvedFloatLabel() === 'in'\"\r\n [class.gog-select--float-on]=\"resolvedFloatLabel() === 'on'\"\r\n [class.gog-select--float-over]=\"resolvedFloatLabel() === 'over'\"\r\n [class.gog-select--floated]=\"isFloatLabelFloated()\"\r\n>\r\n <!--\r\n Associated with aria-labelledby rather than `for`: the trigger is a <button>, which is\r\n not a labelable element, so `for` pointing at it is silently ignored by browsers and\r\n assistive tech alike.\r\n -->\r\n @if (label() && resolvedFloatLabel() === 'none') {\r\n <!-- eslint-disable-next-line @angular-eslint/template/label-has-associated-control -- associated via aria-labelledby above instead, see comment -->\r\n <label class=\"gog-select__label\" [id]=\"labelId()\">{{ label() }}</label>\r\n }\r\n\r\n <div class=\"gog-select__field\">\r\n @if (label() && isFloatLabelActive()) {\r\n <!-- eslint-disable-next-line @angular-eslint/template/label-has-associated-control -- associated via aria-labelledby above instead, see comment -->\r\n <label class=\"gog-select__label gog-select__label--float\" [id]=\"labelId()\">{{\r\n label()\r\n }}</label>\r\n }\r\n <button\r\n type=\"button\"\r\n class=\"gog-select__control\"\r\n [id]=\"triggerId()\"\r\n [disabled]=\"isDisabled()\"\r\n [attr.aria-labelledby]=\"label() ? labelId() : null\"\r\n [attr.aria-label]=\"label() ? null : ariaLabel() || placeholder() || 'Select'\"\r\n [attr.aria-controls]=\"listboxId()\"\r\n [attr.aria-expanded]=\"isOpen()\"\r\n [attr.aria-haspopup]=\"'listbox'\"\r\n [attr.aria-invalid]=\"hasError()\"\r\n [attr.aria-describedby]=\"errorId()\"\r\n (click)=\"toggle()\"\r\n (focus)=\"onFocusIn()\"\r\n (blur)=\"onFocusOut()\"\r\n (keydown.enter)=\"toggle(); $event.preventDefault()\"\r\n (keydown.space)=\"toggle(); $event.preventDefault()\"\r\n (keydown.escape)=\"close()\"\r\n (keydown.arrowdown)=\"onTriggerArrowKeydown($event)\"\r\n (keydown.arrowup)=\"onTriggerArrowKeydown($event)\"\r\n >\r\n <span class=\"gog-select__value\" [class.gog-select__value--placeholder]=\"!selectedOption()\">\r\n {{ selectedLabel() || effectivePlaceholder() }}\r\n </span>\r\n\r\n <span class=\"gog-select__chevron\" aria-hidden=\"true\">\r\n <gog-icon [template]=\"chevronSlot()?.templateRef ?? null\" name=\"chevron-down\" />\r\n </span>\r\n </button>\r\n\r\n <!--\r\n A sibling of the trigger, not a child: `.gog-select__control` is a <button>, and nesting\r\n one button inside another is invalid HTML. It is positioned over the trigger's right edge\r\n by the stylesheet, which also reserves room for it so it never covers the value text.\r\n -->\r\n @if (showClear()) {\r\n <button\r\n type=\"button\"\r\n class=\"gog-select__clear gog-inline-center\"\r\n [attr.aria-label]=\"resolvedClearLabel()\"\r\n (click)=\"clearValue($event)\"\r\n >\r\n <gog-icon name=\"close\" />\r\n </button>\r\n }\r\n\r\n @if (isOpen() && !resolvedAppendToBody()) {\r\n <ng-container [ngTemplateOutlet]=\"panelTpl\" />\r\n }\r\n </div>\r\n\r\n @if (hasError()) {\r\n <span class=\"gog-select__error\" [attr.id]=\"errorId()\" role=\"alert\">\r\n {{ visibleError() }}\r\n </span>\r\n }\r\n</div>\r\n\r\n<!--\r\n One template for both render modes. When `appendToBody` is set it is stamped into\r\n <body> by the overlay, which is why the portal-only modifier and the resolved\r\n coordinates are applied conditionally: outside the component's subtree the panel can\r\n no longer inherit the size tokens from the `.gog-select--sm/--lg` wrapper.\r\n-->\r\n<ng-template #panelTpl>\r\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- (click) below is housekeeping stopPropagation, not an interactive handler; the focusable/keyboard-operable elements are the options inside -->\r\n <div\r\n [id]=\"listboxId()\"\r\n class=\"gog-select__dropdown\"\r\n [class.gog-select__dropdown--up]=\"!resolvedAppendToBody() && dropdownDirectionState() === 'up'\"\r\n [class.gog-select__dropdown--portal]=\"resolvedAppendToBody()\"\r\n [class]=\"panelSizeClass()\"\r\n [style.top.px]=\"resolvedAppendToBody() ? panelPlacement()?.top : null\"\r\n [style.left.px]=\"resolvedAppendToBody() ? panelPlacement()?.left : null\"\r\n [style.width]=\"resolvedAppendToBody() ? resolvedPanelWidth() : null\"\r\n [style.min-width]=\"resolvedAppendToBody() ? resolvedPanelMinWidth() : null\"\r\n [style.max-height]=\"resolvedAppendToBody() ? resolvedPanelMaxHeight() : null\"\r\n [style.z-index]=\"dropdownZIndex() ?? panelZIndex()\"\r\n role=\"listbox\"\r\n [attr.aria-labelledby]=\"label() ? labelId() : null\"\r\n (click)=\"$event.stopPropagation()\"\r\n >\r\n <!--\r\n Not a tab stop of its own: the listbox pattern's only stop is the trigger, with\r\n focus moved between options via the arrow keys (roving-focus.ts), which already\r\n scrolls the focused option into view natively \u2014 no separate keyboard-scroll target\r\n needed here.\r\n -->\r\n @if (resolvedFilter() && resolvedFilterPosition() === 'top') {\r\n <div class=\"gog-select__filter gog-select__filter--top\">\r\n <input\r\n type=\"text\"\r\n class=\"gog-select__filter-input\"\r\n [placeholder]=\"filterPlaceholder()\"\r\n [value]=\"filterQuery()\"\r\n (input)=\"onFilterInput($event)\"\r\n (click)=\"$event.stopPropagation()\"\r\n (keydown.escape)=\"close(); focusTrigger()\"\r\n />\r\n </div>\r\n }\r\n <gog-scroll\r\n size=\"thin\"\r\n [focusable]=\"false\"\r\n overscrollBehavior=\"contain\"\r\n class=\"gog-select__scroll\"\r\n >\r\n @if (visibleOptions().length === 0) {\r\n <p class=\"gog-select__empty\">{{ filterEmptyMessage() }}</p>\r\n }\r\n @for (option of visibleOptions(); track valueOf(option)) {\r\n <!--\r\n tabindex=\"-1\" keeps the list to a single tab stop, as the listbox pattern expects:\r\n focus is moved between options with the arrow keys, not by tabbing through every\r\n one of them. Programmatic .focus() still works on a negative tabindex.\r\n -->\r\n <button\r\n type=\"button\"\r\n class=\"gog-select__option\"\r\n role=\"option\"\r\n tabindex=\"-1\"\r\n [attr.aria-selected]=\"isSelected(option)\"\r\n [attr.aria-disabled]=\"isOptionDisabled(option)\"\r\n [class.gog-select__option--selected]=\"isSelected(option)\"\r\n [class.gog-select__option--disabled]=\"isOptionDisabled(option)\"\r\n (click)=\"selectOption(option, $event)\"\r\n (keydown)=\"onOptionKeydown($event)\"\r\n gogRipple\r\n [rippleDisabled]=\"!rippleEnabled()\"\r\n >\r\n @if (optionSlot(); as slot) {\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n slot.templateRef;\r\n context: optionContext(option, isSelected(option))\r\n \"\r\n />\r\n } @else {\r\n <span class=\"gog-select__option-mark\" aria-hidden=\"true\">\r\n @if (isSelected(option)) {\r\n <gog-icon name=\"check\" />\r\n }\r\n </span>\r\n <span class=\"gog-select__option-label\">{{ labelOf(option) }}</span>\r\n }\r\n </button>\r\n }\r\n </gog-scroll>\r\n @if (resolvedFilter() && resolvedFilterPosition() === 'bottom') {\r\n <div class=\"gog-select__filter gog-select__filter--bottom\">\r\n <input\r\n type=\"text\"\r\n class=\"gog-select__filter-input\"\r\n [placeholder]=\"filterPlaceholder()\"\r\n [value]=\"filterQuery()\"\r\n (input)=\"onFilterInput($event)\"\r\n (click)=\"$event.stopPropagation()\"\r\n (keydown.escape)=\"close(); focusTrigger()\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n</ng-template>\r\n", styles: ["@charset \"UTF-8\";:host{display:block}:host(.gog-host--auto-width){width:fit-content}.gog-select{display:flex;flex-direction:column;gap:var(--gog-select-gap);width:100%}.gog-select--xsm,.gog-select__dropdown--xsm{--gog-select-size-padding-y: var(--gog-field-xsm-padding-y);--gog-select-size-padding-x: var(--gog-field-xsm-padding-x);--gog-select-size-font-size: var(--gog-field-xsm-font-size)}.gog-select--sm,.gog-select__dropdown--sm{--gog-select-size-padding-y: var(--gog-field-sm-padding-y);--gog-select-size-padding-x: var(--gog-field-sm-padding-x);--gog-select-size-font-size: var(--gog-field-sm-font-size)}.gog-select--lg,.gog-select__dropdown--lg{--gog-select-size-padding-y: var(--gog-field-lg-padding-y);--gog-select-size-padding-x: var(--gog-field-lg-padding-x);--gog-select-size-font-size: var(--gog-field-lg-font-size)}.gog-select--slg,.gog-select__dropdown--slg{--gog-select-size-padding-y: var(--gog-field-slg-padding-y);--gog-select-size-padding-x: var(--gog-field-slg-padding-x);--gog-select-size-font-size: var(--gog-field-slg-font-size)}.gog-select--disabled{opacity:var(--gog-select-disabled-opacity)}.gog-select--disabled .gog-select__label,.gog-select--disabled .gog-select__field{cursor:not-allowed}.gog-select__label{font-family:var(--gog-select-label-font-family);font-size:var(--gog-select-label-font-size);color:var(--gog-select-label-color);text-transform:var(--gog-select-label-text-transform);letter-spacing:var(--gog-select-label-letter-spacing);cursor:pointer}.gog-select__field{position:relative;cursor:pointer}.gog-select__control{width:100%;padding-block:var(--gog-select-control-padding-y, var(--gog-select-size-padding-y, var(--gog-field-md-padding-y)));padding-inline:var(--gog-select-control-padding-x, var(--gog-select-size-padding-x, var(--gog-field-md-padding-x))) var(--gog-select-chevron-inset);display:flex;align-items:center;justify-content:space-between;gap:var(--gog-select-control-gap);font-family:var(--gog-select-font-family);font-size:var(--gog-select-control-font, var(--gog-select-size-font-size, var(--gog-field-md-font-size)));color:var(--gog-select-field-color);background-color:var(--gog-select-field-bg);border:var(--gog-select-field-border-width) var(--gog-select-field-border-style) var(--gog-select-field-border);border-radius:var(--gog-select-radius);outline:none;cursor:pointer;transition:border-color var(--gog-select-transition-duration) var(--gog-easing),box-shadow var(--gog-select-transition-duration) var(--gog-easing)}.gog-select__control:focus{border-color:var(--gog-select-focus-border);box-shadow:var(--gog-select-focus-glow)}.gog-select__control:focus-visible{outline:var(--gog-select-focus-ring-width) solid var(--gog-select-focus-border);outline-offset:var(--gog-select-focus-ring-offset)}.gog-select__control:disabled{cursor:not-allowed}.gog-select--open .gog-select__control{border-color:var(--gog-select-focus-border)}.gog-select__value{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:start}.gog-select__value--placeholder{color:var(--gog-select-placeholder-color)}.gog-select__chevron{width:var(--gog-select-control-font, var(--gog-select-size-font-size, var(--gog-field-md-font-size)));height:var(--gog-select-control-font, var(--gog-select-size-font-size, var(--gog-field-md-font-size)));display:flex;align-items:center;justify-content:center;color:var(--gog-select-chevron-color);pointer-events:none;flex-shrink:0}.gog-select__chevron gog-icon{font-size:calc(var(--gog-select-control-font, var(--gog-select-size-font-size, var(--gog-field-md-font-size))) * var(--gog-select-chevron-icon-ratio))}.gog-select__dropdown{position:absolute;top:calc(100% + var(--gog-select-panel-offset));inset-inline-start:0;inset-inline-end:auto;min-width:100%;width:max-content;max-width:var(--gog-select-panel-max-width);z-index:var(--gog-dropdown-z);display:flex;flex-direction:column;background-color:var(--gog-select-panel-bg);border:var(--gog-select-field-border-width) var(--gog-select-field-border-style) var(--gog-select-field-border);border-radius:var(--gog-select-radius);max-height:var(--gog-select-panel-max-height);overflow:hidden;box-shadow:var(--gog-select-panel-shadow)}.gog-select__scroll{flex:1;min-height:0}.gog-select__dropdown--up{top:auto;bottom:calc(100% + var(--gog-select-panel-offset))}.gog-select__dropdown--portal{position:fixed;top:unset;bottom:unset;inset-inline:unset}.gog-select__option{width:100%;display:flex;align-items:center;gap:var(--gog-select-option-gap);padding:var(--gog-select-control-padding-y, var(--gog-select-size-padding-y, var(--gog-field-md-padding-y))) var(--gog-select-control-padding-x, var(--gog-select-size-padding-x, var(--gog-field-md-padding-x)));border:0;background:transparent;text-align:start;font:inherit;font-family:var(--gog-select-font-family);font-size:var(--gog-select-control-font, var(--gog-select-size-font-size, var(--gog-field-md-font-size)));color:var(--gog-select-option-color);cursor:pointer;transition:background-color var(--gog-select-option-transition-duration) var(--gog-easing)}.gog-select__option:hover{background-color:var(--gog-select-option-hover-bg)}.gog-select__option--selected{color:var(--gog-select-option-selected-color)}.gog-select__option--disabled{opacity:var(--gog-select-option-disabled-opacity);cursor:not-allowed}.gog-select__option:focus-visible{outline:var(--gog-select-focus-ring-width) solid var(--gog-select-focus-border);outline-offset:calc(var(--gog-select-focus-ring-width) * -1)}.gog-select__option-mark{display:inline-flex;align-items:center;justify-content:center;width:calc(var(--gog-select-control-font, var(--gog-select-size-font-size, var(--gog-field-md-font-size))) * var(--gog-select-mark-size-ratio));height:calc(var(--gog-select-control-font, var(--gog-select-size-font-size, var(--gog-field-md-font-size))) * var(--gog-select-mark-size-ratio));flex-shrink:0}.gog-select__option-mark gog-icon{font-size:calc(var(--gog-select-control-font, var(--gog-select-size-font-size, var(--gog-field-md-font-size))) * var(--gog-select-mark-icon-ratio))}.gog-select__error{font-family:var(--gog-select-font-family);font-size:var(--gog-select-error-font-size);color:var(--gog-select-error-color)}.gog-select__label--float{position:absolute;inset-inline-start:var(--gog-select-control-padding-x, var(--gog-select-size-padding-x, var(--gog-field-md-padding-x)));top:50%;transform:translateY(-50%);max-width:calc(100% - 2 * var(--gog-select-control-padding-x, var(--gog-select-size-padding-x, var(--gog-field-md-padding-x))));overflow:hidden;text-overflow:ellipsis;white-space:nowrap;pointer-events:none;cursor:default;color:var(--gog-select-placeholder-color);font-size:var(--gog-select-size-font-size, var(--gog-field-md-font-size));text-transform:none;letter-spacing:normal;transition:transform var(--gog-select-transition-duration) var(--gog-easing),font-size var(--gog-select-transition-duration) var(--gog-easing),color var(--gog-select-transition-duration) var(--gog-easing),top var(--gog-select-transition-duration) var(--gog-easing),background-color var(--gog-select-transition-duration) var(--gog-easing)}.gog-select--float-in,.gog-select--float-on{--gog-select-float-top-padding: calc(var(--gog-select-control-padding-y, var(--gog-select-size-padding-y, var(--gog-field-md-padding-y))) + var(--gog-select-float-label-reserve))}.gog-select--float-in .gog-select__control,.gog-select--float-on .gog-select__control{padding-top:var(--gog-select-float-top-padding)}.gog-select--float-in .gog-select__label--float,.gog-select--float-on .gog-select__label--float{top:var(--gog-select-float-top-padding);transform:none}.gog-select--float-in.gog-select--floated .gog-select__label--float{top:var(--gog-select-float-label-in-top);transform:translateY(0);font-size:var(--gog-select-label-font-size);color:var(--gog-select-label-color);text-transform:var(--gog-select-label-text-transform);letter-spacing:var(--gog-select-label-letter-spacing)}.gog-select--float-on.gog-select--floated .gog-select__label--float{top:0;transform:translateY(-50%);font-size:var(--gog-select-label-font-size);color:var(--gog-select-label-color);text-transform:var(--gog-select-label-text-transform);letter-spacing:var(--gog-select-label-letter-spacing);background-color:var(--gog-select-float-label-on-bg, var(--gog-select-field-bg));padding:0 4px;inset-inline-start:calc(var(--gog-select-control-padding-x, var(--gog-select-size-padding-x, var(--gog-field-md-padding-x))) - 4px)}.gog-select--float-over.gog-select--floated .gog-select__label--float{top:calc(-1 * var(--gog-select-float-label-over-gap));transform:translateY(-100%);font-size:var(--gog-select-label-font-size);color:var(--gog-select-label-color);text-transform:var(--gog-select-label-text-transform);letter-spacing:var(--gog-select-label-letter-spacing)}.gog-select--float-over .gog-select__field{margin-top:var(--gog-select-float-label-over-reserve)}@media(prefers-reduced-motion:reduce){.gog-select__control,.gog-select__option,.gog-select__label--float{transition:none}}.gog-select__clear{position:absolute;top:50%;inset-inline-end:var(--gog-select-chevron-inset);transform:translateY(-50%);width:var(--gog-select-control-font, var(--gog-select-size-font-size, var(--gog-field-md-font-size)));height:var(--gog-select-control-font, var(--gog-select-size-font-size, var(--gog-field-md-font-size)));padding:0;border:0;border-radius:var(--gog-select-clear-radius);background:transparent;color:var(--gog-select-clear-color);line-height:1;cursor:pointer;transition:color var(--gog-select-transition-duration) var(--gog-easing)}.gog-select__clear:hover{color:var(--gog-select-clear-hover-color)}.gog-select__clear:focus-visible{outline:var(--gog-select-focus-ring-width) solid var(--gog-select-focus-border);outline-offset:var(--gog-select-focus-ring-offset)}.gog-select__clear gog-icon{font-size:calc(var(--gog-select-control-font, var(--gog-select-size-font-size, var(--gog-field-md-font-size))) * var(--gog-select-clear-icon-ratio))}.gog-select--clearable .gog-select__control{padding-inline-end:calc(var(--gog-select-chevron-inset) + var(--gog-select-clear-gap) + var(--gog-select-control-font, var(--gog-select-size-font-size, var(--gog-field-md-font-size))))}.gog-select__filter{position:sticky;top:0;z-index:1;padding:var(--gog-select-filter-padding);background:var(--gog-select-panel-bg)}.gog-select__filter-input{width:100%;padding:var(--gog-select-filter-input-padding-y) var(--gog-select-filter-input-padding-x);font-family:var(--gog-select-font-family);font-size:var(--gog-select-control-font, var(--gog-select-size-font-size, var(--gog-field-md-font-size)));color:var(--gog-select-filter-input-color);background:var(--gog-select-filter-input-bg);border:var(--gog-control-border-width) var(--gog-control-border-style) var(--gog-select-filter-input-border);border-radius:var(--gog-select-filter-input-radius);outline:none}.gog-select__filter-input:focus{border-color:var(--gog-select-focus-border)}.gog-select__empty{margin:0;padding:var(--gog-select-filter-empty-padding);font-family:var(--gog-select-font-family);font-size:var(--gog-select-control-font, var(--gog-select-size-font-size, var(--gog-field-md-font-size)));color:var(--gog-select-filter-empty-color);text-align:center}.gog-select__filter--top{border-bottom:var(--gog-select-filter-border-width) var(--gog-select-filter-border-style) var(--gog-select-filter-border-color)}.gog-select__filter--bottom{top:auto;bottom:0;border-top:var(--gog-select-filter-border-width) var(--gog-select-filter-border-style) var(--gog-select-filter-border-color)}:host(.gog-host--auto-width),:host(.gog-host--auto-width) .gog-select__control{min-width:var(--gog-select-min-width)}.gog-select__dropdown--portal{max-width:var(--gog-select-panel-max-width)}\n"], dependencies: [{ kind: "directive", type: GogRippleDirective, selector: "[gogRipple]", inputs: ["rippleDisabled", "rippleCentred"] }, { kind: "component", type: IconComponent, selector: "gog-icon", inputs: ["name", "template", "title", "ariaHidden"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ScrollComponent, selector: "gog-scroll", inputs: ["axis", "size", "autoHide", "hideDelay", "reachThreshold", "focusable", "ariaLabel", "overscrollBehavior", "showTrack"], outputs: ["gogScroll", "gogReachStart", "gogReachEnd"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
6052
6822
|
}
|
|
6053
6823
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: SelectComponent, decorators: [{
|
|
6054
6824
|
type: Component,
|
|
6055
|
-
args: [{ selector: 'gog-select', imports: [IconComponent, NgTemplateOutlet, ScrollComponent], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
6825
|
+
args: [{ selector: 'gog-select', imports: [GogRippleDirective, IconComponent, NgTemplateOutlet, ScrollComponent], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
6056
6826
|
// Only bites when the control has opted out of full width; otherwise the container decides.
|
|
6057
6827
|
'[style.--gog-select-min-width]': 'minWidth()',
|
|
6058
|
-
}, template: "<!--\r\n Deliberately not `gog-contained-layout`: `contain: layout` makes this element a stacking\r\n context, which traps the panel's z-index inside it and lets whatever follows on the page\r\n paint over the open dropdown.\r\n-->\r\n<div\r\n class=\"gog-select\"\r\n [class.gog-select--clearable]=\"showClear()\"\r\n [class]=\"sizeClass()\"\r\n [class.gog-select--disabled]=\"isDisabled()\"\r\n [class.gog-select--open]=\"isOpen()\"\r\n [class.gog-select--float-in]=\"resolvedFloatLabel() === 'in'\"\r\n [class.gog-select--float-on]=\"resolvedFloatLabel() === 'on'\"\r\n [class.gog-select--float-over]=\"resolvedFloatLabel() === 'over'\"\r\n [class.gog-select--floated]=\"isFloatLabelFloated()\"\r\n>\r\n <!--\r\n Associated with aria-labelledby rather than `for`: the trigger is a <button>, which is\r\n not a labelable element, so `for` pointing at it is silently ignored by browsers and\r\n assistive tech alike.\r\n -->\r\n @if (label() && resolvedFloatLabel() === 'none') {\r\n <!-- eslint-disable-next-line @angular-eslint/template/label-has-associated-control -- associated via aria-labelledby above instead, see comment -->\r\n <label class=\"gog-select__label\" [id]=\"labelId()\">{{ label() }}</label>\r\n }\r\n\r\n <div class=\"gog-select__field\">\r\n @if (label() && isFloatLabelActive()) {\r\n <!-- eslint-disable-next-line @angular-eslint/template/label-has-associated-control -- associated via aria-labelledby above instead, see comment -->\r\n <label class=\"gog-select__label gog-select__label--float\" [id]=\"labelId()\">{{\r\n label()\r\n }}</label>\r\n }\r\n <button\r\n type=\"button\"\r\n class=\"gog-select__control\"\r\n [id]=\"triggerId()\"\r\n [disabled]=\"isDisabled()\"\r\n [attr.aria-labelledby]=\"label() ? labelId() : null\"\r\n [attr.aria-label]=\"label() ? null : ariaLabel() || placeholder() || 'Select'\"\r\n [attr.aria-controls]=\"listboxId()\"\r\n [attr.aria-expanded]=\"isOpen()\"\r\n [attr.aria-haspopup]=\"'listbox'\"\r\n [attr.aria-invalid]=\"hasError()\"\r\n [attr.aria-describedby]=\"errorId()\"\r\n (click)=\"toggle()\"\r\n (focus)=\"onFocusIn()\"\r\n (blur)=\"onFocusOut()\"\r\n (keydown.enter)=\"toggle(); $event.preventDefault()\"\r\n (keydown.space)=\"toggle(); $event.preventDefault()\"\r\n (keydown.escape)=\"close()\"\r\n (keydown.arrowdown)=\"onTriggerArrowKeydown($event)\"\r\n (keydown.arrowup)=\"onTriggerArrowKeydown($event)\"\r\n >\r\n <span class=\"gog-select__value\" [class.gog-select__value--placeholder]=\"!selectedOption()\">\r\n {{ selectedLabel() || effectivePlaceholder() }}\r\n </span>\r\n\r\n <span class=\"gog-select__chevron\" aria-hidden=\"true\">\r\n <gog-icon [template]=\"chevronSlot()?.templateRef ?? null\" name=\"chevron-down\" />\r\n </span>\r\n </button>\r\n\r\n <!--\r\n A sibling of the trigger, not a child: `.gog-select__control` is a <button>, and nesting\r\n one button inside another is invalid HTML. It is positioned over the trigger's right edge\r\n by the stylesheet, which also reserves room for it so it never covers the value text.\r\n -->\r\n @if (showClear()) {\r\n <button\r\n type=\"button\"\r\n class=\"gog-select__clear gog-inline-center\"\r\n [attr.aria-label]=\"resolvedClearLabel()\"\r\n (click)=\"clearValue($event)\"\r\n >\r\n <gog-icon name=\"close\" />\r\n </button>\r\n }\r\n\r\n @if (isOpen() && !resolvedAppendToBody()) {\r\n <ng-container [ngTemplateOutlet]=\"panelTpl\" />\r\n }\r\n </div>\r\n\r\n @if (hasError()) {\r\n <span class=\"gog-select__error\" [attr.id]=\"errorId()\" role=\"alert\">\r\n {{ visibleError() }}\r\n </span>\r\n }\r\n</div>\r\n\r\n<!--\r\n One template for both render modes. When `appendToBody` is set it is stamped into\r\n <body> by the overlay, which is why the portal-only modifier and the resolved\r\n coordinates are applied conditionally: outside the component's subtree the panel can\r\n no longer inherit the size tokens from the `.gog-select--sm/--lg` wrapper.\r\n-->\r\n<ng-template #panelTpl>\r\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- (click) below is housekeeping stopPropagation, not an interactive handler; the focusable/keyboard-operable elements are the options inside -->\r\n <div\r\n [id]=\"listboxId()\"\r\n class=\"gog-select__dropdown\"\r\n [class.gog-select__dropdown--up]=\"!resolvedAppendToBody() && dropdownDirectionState() === 'up'\"\r\n [class.gog-select__dropdown--portal]=\"resolvedAppendToBody()\"\r\n [class]=\"panelSizeClass()\"\r\n [style.top.px]=\"resolvedAppendToBody() ? panelPlacement()?.top : null\"\r\n [style.left.px]=\"resolvedAppendToBody() ? panelPlacement()?.left : null\"\r\n [style.width]=\"resolvedAppendToBody() ? resolvedPanelWidth() : null\"\r\n [style.min-width]=\"resolvedAppendToBody() ? resolvedPanelMinWidth() : null\"\r\n [style.max-height]=\"resolvedAppendToBody() ? resolvedPanelMaxHeight() : null\"\r\n [style.z-index]=\"dropdownZIndex() ?? panelZIndex()\"\r\n role=\"listbox\"\r\n [attr.aria-labelledby]=\"label() ? labelId() : null\"\r\n (click)=\"$event.stopPropagation()\"\r\n >\r\n <!--\r\n Not a tab stop of its own: the listbox pattern's only stop is the trigger, with\r\n focus moved between options via the arrow keys (roving-focus.ts), which already\r\n scrolls the focused option into view natively \u2014 no separate keyboard-scroll target\r\n needed here.\r\n -->\r\n @if (resolvedFilter() && resolvedFilterPosition() === 'top') {\r\n <div class=\"gog-select__filter gog-select__filter--top\">\r\n <input\r\n type=\"text\"\r\n class=\"gog-select__filter-input\"\r\n [placeholder]=\"filterPlaceholder()\"\r\n [value]=\"filterQuery()\"\r\n (input)=\"onFilterInput($event)\"\r\n (click)=\"$event.stopPropagation()\"\r\n (keydown.escape)=\"close(); focusTrigger()\"\r\n />\r\n </div>\r\n }\r\n <gog-scroll\r\n size=\"thin\"\r\n [focusable]=\"false\"\r\n overscrollBehavior=\"contain\"\r\n class=\"gog-select__scroll\"\r\n >\r\n @if (visibleOptions().length === 0) {\r\n <p class=\"gog-select__empty\">{{ filterEmptyMessage() }}</p>\r\n }\r\n @for (option of visibleOptions(); track valueOf(option)) {\r\n <!--\r\n tabindex=\"-1\" keeps the list to a single tab stop, as the listbox pattern expects:\r\n focus is moved between options with the arrow keys, not by tabbing through every\r\n one of them. Programmatic .focus() still works on a negative tabindex.\r\n -->\r\n <button\r\n type=\"button\"\r\n class=\"gog-select__option\"\r\n role=\"option\"\r\n tabindex=\"-1\"\r\n [attr.aria-selected]=\"isSelected(option)\"\r\n [attr.aria-disabled]=\"isOptionDisabled(option)\"\r\n [class.gog-select__option--selected]=\"isSelected(option)\"\r\n [class.gog-select__option--disabled]=\"isOptionDisabled(option)\"\r\n (click)=\"selectOption(option, $event)\"\r\n (keydown)=\"onOptionKeydown($event)\"\r\n >\r\n @if (optionSlot(); as slot) {\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n slot.templateRef;\r\n context: optionContext(option, isSelected(option))\r\n \"\r\n />\r\n } @else {\r\n <span class=\"gog-select__option-mark\" aria-hidden=\"true\">\r\n @if (isSelected(option)) {\r\n <gog-icon name=\"check\" />\r\n }\r\n </span>\r\n <span class=\"gog-select__option-label\">{{ labelOf(option) }}</span>\r\n }\r\n </button>\r\n }\r\n </gog-scroll>\r\n @if (resolvedFilter() && resolvedFilterPosition() === 'bottom') {\r\n <div class=\"gog-select__filter gog-select__filter--bottom\">\r\n <input\r\n type=\"text\"\r\n class=\"gog-select__filter-input\"\r\n [placeholder]=\"filterPlaceholder()\"\r\n [value]=\"filterQuery()\"\r\n (input)=\"onFilterInput($event)\"\r\n (click)=\"$event.stopPropagation()\"\r\n (keydown.escape)=\"close(); focusTrigger()\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n</ng-template>\r\n", styles: ["@charset \"UTF-8\";:host{display:block}:host(.gog-host--auto-width){width:fit-content}.gog-select{display:flex;flex-direction:column;gap:var(--gog-select-gap);width:100%}.gog-select--xsm,.gog-select__dropdown--xsm{--gog-select-size-padding-y: var(--gog-field-xsm-padding-y);--gog-select-size-padding-x: var(--gog-field-xsm-padding-x);--gog-select-size-font-size: var(--gog-field-xsm-font-size)}.gog-select--sm,.gog-select__dropdown--sm{--gog-select-size-padding-y: var(--gog-field-sm-padding-y);--gog-select-size-padding-x: var(--gog-field-sm-padding-x);--gog-select-size-font-size: var(--gog-field-sm-font-size)}.gog-select--lg,.gog-select__dropdown--lg{--gog-select-size-padding-y: var(--gog-field-lg-padding-y);--gog-select-size-padding-x: var(--gog-field-lg-padding-x);--gog-select-size-font-size: var(--gog-field-lg-font-size)}.gog-select--slg,.gog-select__dropdown--slg{--gog-select-size-padding-y: var(--gog-field-slg-padding-y);--gog-select-size-padding-x: var(--gog-field-slg-padding-x);--gog-select-size-font-size: var(--gog-field-slg-font-size)}.gog-select--disabled{opacity:var(--gog-select-disabled-opacity)}.gog-select--disabled .gog-select__label,.gog-select--disabled .gog-select__field{cursor:not-allowed}.gog-select__label{font-family:var(--gog-select-label-font-family);font-size:var(--gog-select-label-font-size);color:var(--gog-select-label-color);text-transform:var(--gog-select-label-text-transform);letter-spacing:var(--gog-select-label-letter-spacing);cursor:pointer}.gog-select__field{position:relative;cursor:pointer}.gog-select__control{width:100%;padding-block:var(--gog-select-control-padding-y, var(--gog-select-size-padding-y, var(--gog-field-md-padding-y)));padding-inline:var(--gog-select-control-padding-x, var(--gog-select-size-padding-x, var(--gog-field-md-padding-x))) var(--gog-select-chevron-inset);display:flex;align-items:center;justify-content:space-between;gap:var(--gog-select-control-gap);font-family:var(--gog-select-font-family);font-size:var(--gog-select-control-font, var(--gog-select-size-font-size, var(--gog-field-md-font-size)));color:var(--gog-select-field-color);background-color:var(--gog-select-field-bg);border:var(--gog-select-field-border-width) var(--gog-select-field-border-style) var(--gog-select-field-border);border-radius:var(--gog-select-radius);outline:none;cursor:pointer;transition:border-color var(--gog-select-transition-duration) var(--gog-easing),box-shadow var(--gog-select-transition-duration) var(--gog-easing)}.gog-select__control:focus{border-color:var(--gog-select-focus-border);box-shadow:var(--gog-select-focus-glow)}.gog-select__control:focus-visible{outline:var(--gog-select-focus-ring-width) solid var(--gog-select-focus-border);outline-offset:var(--gog-select-focus-ring-offset)}.gog-select__control:disabled{cursor:not-allowed}.gog-select--open .gog-select__control{border-color:var(--gog-select-focus-border)}.gog-select__value{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:start}.gog-select__value--placeholder{color:var(--gog-select-placeholder-color)}.gog-select__chevron{width:var(--gog-select-control-font, var(--gog-select-size-font-size, var(--gog-field-md-font-size)));height:var(--gog-select-control-font, var(--gog-select-size-font-size, var(--gog-field-md-font-size)));display:flex;align-items:center;justify-content:center;color:var(--gog-select-chevron-color);pointer-events:none;flex-shrink:0}.gog-select__chevron gog-icon{font-size:calc(var(--gog-select-control-font, var(--gog-select-size-font-size, var(--gog-field-md-font-size))) * var(--gog-select-chevron-icon-ratio))}.gog-select__dropdown{position:absolute;top:calc(100% + var(--gog-select-panel-offset));inset-inline-start:0;inset-inline-end:auto;min-width:100%;width:max-content;max-width:var(--gog-select-panel-max-width);z-index:var(--gog-dropdown-z);display:flex;flex-direction:column;background-color:var(--gog-select-panel-bg);border:var(--gog-select-field-border-width) var(--gog-select-field-border-style) var(--gog-select-field-border);border-radius:var(--gog-select-radius);max-height:var(--gog-select-panel-max-height);overflow:hidden;box-shadow:var(--gog-select-panel-shadow)}.gog-select__scroll{flex:1;min-height:0}.gog-select__dropdown--up{top:auto;bottom:calc(100% + var(--gog-select-panel-offset))}.gog-select__dropdown--portal{position:fixed;top:unset;bottom:unset;inset-inline:unset}.gog-select__option{width:100%;display:flex;align-items:center;gap:var(--gog-select-option-gap);padding:var(--gog-select-control-padding-y, var(--gog-select-size-padding-y, var(--gog-field-md-padding-y))) var(--gog-select-control-padding-x, var(--gog-select-size-padding-x, var(--gog-field-md-padding-x)));border:0;background:transparent;text-align:start;font:inherit;font-family:var(--gog-select-font-family);font-size:var(--gog-select-control-font, var(--gog-select-size-font-size, var(--gog-field-md-font-size)));color:var(--gog-select-option-color);cursor:pointer;transition:background-color var(--gog-select-option-transition-duration) var(--gog-easing)}.gog-select__option:hover{background-color:var(--gog-select-option-hover-bg)}.gog-select__option--selected{color:var(--gog-select-option-selected-color)}.gog-select__option--disabled{opacity:var(--gog-select-option-disabled-opacity);cursor:not-allowed}.gog-select__option:focus-visible{outline:var(--gog-select-focus-ring-width) solid var(--gog-select-focus-border);outline-offset:calc(var(--gog-select-focus-ring-width) * -1)}.gog-select__option-mark{display:inline-flex;align-items:center;justify-content:center;width:calc(var(--gog-select-control-font, var(--gog-select-size-font-size, var(--gog-field-md-font-size))) * var(--gog-select-mark-size-ratio));height:calc(var(--gog-select-control-font, var(--gog-select-size-font-size, var(--gog-field-md-font-size))) * var(--gog-select-mark-size-ratio));flex-shrink:0}.gog-select__option-mark gog-icon{font-size:calc(var(--gog-select-control-font, var(--gog-select-size-font-size, var(--gog-field-md-font-size))) * var(--gog-select-mark-icon-ratio))}.gog-select__error{font-family:var(--gog-select-font-family);font-size:var(--gog-select-error-font-size);color:var(--gog-select-error-color)}.gog-select__label--float{position:absolute;inset-inline-start:var(--gog-select-control-padding-x, var(--gog-select-size-padding-x, var(--gog-field-md-padding-x)));top:50%;transform:translateY(-50%);max-width:calc(100% - 2 * var(--gog-select-control-padding-x, var(--gog-select-size-padding-x, var(--gog-field-md-padding-x))));overflow:hidden;text-overflow:ellipsis;white-space:nowrap;pointer-events:none;cursor:default;color:var(--gog-select-placeholder-color);font-size:var(--gog-select-size-font-size, var(--gog-field-md-font-size));text-transform:none;letter-spacing:normal;transition:transform var(--gog-select-transition-duration) var(--gog-easing),font-size var(--gog-select-transition-duration) var(--gog-easing),color var(--gog-select-transition-duration) var(--gog-easing),top var(--gog-select-transition-duration) var(--gog-easing),background-color var(--gog-select-transition-duration) var(--gog-easing)}.gog-select--float-in,.gog-select--float-on{--gog-select-float-top-padding: calc(var(--gog-select-control-padding-y, var(--gog-select-size-padding-y, var(--gog-field-md-padding-y))) + var(--gog-select-float-label-reserve))}.gog-select--float-in .gog-select__control,.gog-select--float-on .gog-select__control{padding-top:var(--gog-select-float-top-padding)}.gog-select--float-in .gog-select__label--float,.gog-select--float-on .gog-select__label--float{top:var(--gog-select-float-top-padding);transform:none}.gog-select--float-in.gog-select--floated .gog-select__label--float{top:var(--gog-select-float-label-in-top);transform:translateY(0);font-size:var(--gog-select-label-font-size);color:var(--gog-select-label-color);text-transform:var(--gog-select-label-text-transform);letter-spacing:var(--gog-select-label-letter-spacing)}.gog-select--float-on.gog-select--floated .gog-select__label--float{top:0;transform:translateY(-50%);font-size:var(--gog-select-label-font-size);color:var(--gog-select-label-color);text-transform:var(--gog-select-label-text-transform);letter-spacing:var(--gog-select-label-letter-spacing);background-color:var(--gog-select-float-label-on-bg, var(--gog-select-field-bg));padding:0 4px;inset-inline-start:calc(var(--gog-select-control-padding-x, var(--gog-select-size-padding-x, var(--gog-field-md-padding-x))) - 4px)}.gog-select--float-over.gog-select--floated .gog-select__label--float{top:calc(-1 * var(--gog-select-float-label-over-gap));transform:translateY(-100%);font-size:var(--gog-select-label-font-size);color:var(--gog-select-label-color);text-transform:var(--gog-select-label-text-transform);letter-spacing:var(--gog-select-label-letter-spacing)}.gog-select--float-over .gog-select__field{margin-top:var(--gog-select-float-label-over-reserve)}@media(prefers-reduced-motion:reduce){.gog-select__control,.gog-select__option,.gog-select__label--float{transition:none}}.gog-select__clear{position:absolute;top:50%;inset-inline-end:var(--gog-select-chevron-inset);transform:translateY(-50%);width:var(--gog-select-control-font, var(--gog-select-size-font-size, var(--gog-field-md-font-size)));height:var(--gog-select-control-font, var(--gog-select-size-font-size, var(--gog-field-md-font-size)));padding:0;border:0;border-radius:var(--gog-select-clear-radius);background:transparent;color:var(--gog-select-clear-color);line-height:1;cursor:pointer;transition:color var(--gog-select-transition-duration) var(--gog-easing)}.gog-select__clear:hover{color:var(--gog-select-clear-hover-color)}.gog-select__clear:focus-visible{outline:var(--gog-select-focus-ring-width) solid var(--gog-select-focus-border);outline-offset:var(--gog-select-focus-ring-offset)}.gog-select__clear gog-icon{font-size:calc(var(--gog-select-control-font, var(--gog-select-size-font-size, var(--gog-field-md-font-size))) * var(--gog-select-clear-icon-ratio))}.gog-select--clearable .gog-select__control{padding-inline-end:calc(var(--gog-select-chevron-inset) + var(--gog-select-clear-gap) + var(--gog-select-control-font, var(--gog-select-size-font-size, var(--gog-field-md-font-size))))}.gog-select__filter{position:sticky;top:0;z-index:1;padding:var(--gog-select-filter-padding);background:var(--gog-select-panel-bg)}.gog-select__filter-input{width:100%;padding:var(--gog-select-filter-input-padding-y) var(--gog-select-filter-input-padding-x);font-family:var(--gog-select-font-family);font-size:var(--gog-select-control-font, var(--gog-select-size-font-size, var(--gog-field-md-font-size)));color:var(--gog-select-filter-input-color);background:var(--gog-select-filter-input-bg);border:var(--gog-control-border-width) var(--gog-control-border-style) var(--gog-select-filter-input-border);border-radius:var(--gog-select-filter-input-radius);outline:none}.gog-select__filter-input:focus{border-color:var(--gog-select-focus-border)}.gog-select__empty{margin:0;padding:var(--gog-select-filter-empty-padding);font-family:var(--gog-select-font-family);font-size:var(--gog-select-control-font, var(--gog-select-size-font-size, var(--gog-field-md-font-size)));color:var(--gog-select-filter-empty-color);text-align:center}.gog-select__filter--top{border-bottom:var(--gog-select-filter-border-width) var(--gog-select-filter-border-style) var(--gog-select-filter-border-color)}.gog-select__filter--bottom{top:auto;bottom:0;border-top:var(--gog-select-filter-border-width) var(--gog-select-filter-border-style) var(--gog-select-filter-border-color)}:host(.gog-host--auto-width),:host(.gog-host--auto-width) .gog-select__control{min-width:var(--gog-select-min-width)}.gog-select__dropdown--portal{max-width:var(--gog-select-panel-max-width)}\n"] }]
|
|
6828
|
+
}, template: "<!--\r\n Deliberately not `gog-contained-layout`: `contain: layout` makes this element a stacking\r\n context, which traps the panel's z-index inside it and lets whatever follows on the page\r\n paint over the open dropdown.\r\n-->\r\n<div\r\n class=\"gog-select\"\r\n [class.gog-select--clearable]=\"showClear()\"\r\n [class]=\"sizeClass()\"\r\n [class.gog-select--disabled]=\"isDisabled()\"\r\n [class.gog-select--open]=\"isOpen()\"\r\n [class.gog-select--float-in]=\"resolvedFloatLabel() === 'in'\"\r\n [class.gog-select--float-on]=\"resolvedFloatLabel() === 'on'\"\r\n [class.gog-select--float-over]=\"resolvedFloatLabel() === 'over'\"\r\n [class.gog-select--floated]=\"isFloatLabelFloated()\"\r\n>\r\n <!--\r\n Associated with aria-labelledby rather than `for`: the trigger is a <button>, which is\r\n not a labelable element, so `for` pointing at it is silently ignored by browsers and\r\n assistive tech alike.\r\n -->\r\n @if (label() && resolvedFloatLabel() === 'none') {\r\n <!-- eslint-disable-next-line @angular-eslint/template/label-has-associated-control -- associated via aria-labelledby above instead, see comment -->\r\n <label class=\"gog-select__label\" [id]=\"labelId()\">{{ label() }}</label>\r\n }\r\n\r\n <div class=\"gog-select__field\">\r\n @if (label() && isFloatLabelActive()) {\r\n <!-- eslint-disable-next-line @angular-eslint/template/label-has-associated-control -- associated via aria-labelledby above instead, see comment -->\r\n <label class=\"gog-select__label gog-select__label--float\" [id]=\"labelId()\">{{\r\n label()\r\n }}</label>\r\n }\r\n <button\r\n type=\"button\"\r\n class=\"gog-select__control\"\r\n [id]=\"triggerId()\"\r\n [disabled]=\"isDisabled()\"\r\n [attr.aria-labelledby]=\"label() ? labelId() : null\"\r\n [attr.aria-label]=\"label() ? null : ariaLabel() || placeholder() || 'Select'\"\r\n [attr.aria-controls]=\"listboxId()\"\r\n [attr.aria-expanded]=\"isOpen()\"\r\n [attr.aria-haspopup]=\"'listbox'\"\r\n [attr.aria-invalid]=\"hasError()\"\r\n [attr.aria-describedby]=\"errorId()\"\r\n (click)=\"toggle()\"\r\n (focus)=\"onFocusIn()\"\r\n (blur)=\"onFocusOut()\"\r\n (keydown.enter)=\"toggle(); $event.preventDefault()\"\r\n (keydown.space)=\"toggle(); $event.preventDefault()\"\r\n (keydown.escape)=\"close()\"\r\n (keydown.arrowdown)=\"onTriggerArrowKeydown($event)\"\r\n (keydown.arrowup)=\"onTriggerArrowKeydown($event)\"\r\n >\r\n <span class=\"gog-select__value\" [class.gog-select__value--placeholder]=\"!selectedOption()\">\r\n {{ selectedLabel() || effectivePlaceholder() }}\r\n </span>\r\n\r\n <span class=\"gog-select__chevron\" aria-hidden=\"true\">\r\n <gog-icon [template]=\"chevronSlot()?.templateRef ?? null\" name=\"chevron-down\" />\r\n </span>\r\n </button>\r\n\r\n <!--\r\n A sibling of the trigger, not a child: `.gog-select__control` is a <button>, and nesting\r\n one button inside another is invalid HTML. It is positioned over the trigger's right edge\r\n by the stylesheet, which also reserves room for it so it never covers the value text.\r\n -->\r\n @if (showClear()) {\r\n <button\r\n type=\"button\"\r\n class=\"gog-select__clear gog-inline-center\"\r\n [attr.aria-label]=\"resolvedClearLabel()\"\r\n (click)=\"clearValue($event)\"\r\n >\r\n <gog-icon name=\"close\" />\r\n </button>\r\n }\r\n\r\n @if (isOpen() && !resolvedAppendToBody()) {\r\n <ng-container [ngTemplateOutlet]=\"panelTpl\" />\r\n }\r\n </div>\r\n\r\n @if (hasError()) {\r\n <span class=\"gog-select__error\" [attr.id]=\"errorId()\" role=\"alert\">\r\n {{ visibleError() }}\r\n </span>\r\n }\r\n</div>\r\n\r\n<!--\r\n One template for both render modes. When `appendToBody` is set it is stamped into\r\n <body> by the overlay, which is why the portal-only modifier and the resolved\r\n coordinates are applied conditionally: outside the component's subtree the panel can\r\n no longer inherit the size tokens from the `.gog-select--sm/--lg` wrapper.\r\n-->\r\n<ng-template #panelTpl>\r\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- (click) below is housekeeping stopPropagation, not an interactive handler; the focusable/keyboard-operable elements are the options inside -->\r\n <div\r\n [id]=\"listboxId()\"\r\n class=\"gog-select__dropdown\"\r\n [class.gog-select__dropdown--up]=\"!resolvedAppendToBody() && dropdownDirectionState() === 'up'\"\r\n [class.gog-select__dropdown--portal]=\"resolvedAppendToBody()\"\r\n [class]=\"panelSizeClass()\"\r\n [style.top.px]=\"resolvedAppendToBody() ? panelPlacement()?.top : null\"\r\n [style.left.px]=\"resolvedAppendToBody() ? panelPlacement()?.left : null\"\r\n [style.width]=\"resolvedAppendToBody() ? resolvedPanelWidth() : null\"\r\n [style.min-width]=\"resolvedAppendToBody() ? resolvedPanelMinWidth() : null\"\r\n [style.max-height]=\"resolvedAppendToBody() ? resolvedPanelMaxHeight() : null\"\r\n [style.z-index]=\"dropdownZIndex() ?? panelZIndex()\"\r\n role=\"listbox\"\r\n [attr.aria-labelledby]=\"label() ? labelId() : null\"\r\n (click)=\"$event.stopPropagation()\"\r\n >\r\n <!--\r\n Not a tab stop of its own: the listbox pattern's only stop is the trigger, with\r\n focus moved between options via the arrow keys (roving-focus.ts), which already\r\n scrolls the focused option into view natively \u2014 no separate keyboard-scroll target\r\n needed here.\r\n -->\r\n @if (resolvedFilter() && resolvedFilterPosition() === 'top') {\r\n <div class=\"gog-select__filter gog-select__filter--top\">\r\n <input\r\n type=\"text\"\r\n class=\"gog-select__filter-input\"\r\n [placeholder]=\"filterPlaceholder()\"\r\n [value]=\"filterQuery()\"\r\n (input)=\"onFilterInput($event)\"\r\n (click)=\"$event.stopPropagation()\"\r\n (keydown.escape)=\"close(); focusTrigger()\"\r\n />\r\n </div>\r\n }\r\n <gog-scroll\r\n size=\"thin\"\r\n [focusable]=\"false\"\r\n overscrollBehavior=\"contain\"\r\n class=\"gog-select__scroll\"\r\n >\r\n @if (visibleOptions().length === 0) {\r\n <p class=\"gog-select__empty\">{{ filterEmptyMessage() }}</p>\r\n }\r\n @for (option of visibleOptions(); track valueOf(option)) {\r\n <!--\r\n tabindex=\"-1\" keeps the list to a single tab stop, as the listbox pattern expects:\r\n focus is moved between options with the arrow keys, not by tabbing through every\r\n one of them. Programmatic .focus() still works on a negative tabindex.\r\n -->\r\n <button\r\n type=\"button\"\r\n class=\"gog-select__option\"\r\n role=\"option\"\r\n tabindex=\"-1\"\r\n [attr.aria-selected]=\"isSelected(option)\"\r\n [attr.aria-disabled]=\"isOptionDisabled(option)\"\r\n [class.gog-select__option--selected]=\"isSelected(option)\"\r\n [class.gog-select__option--disabled]=\"isOptionDisabled(option)\"\r\n (click)=\"selectOption(option, $event)\"\r\n (keydown)=\"onOptionKeydown($event)\"\r\n gogRipple\r\n [rippleDisabled]=\"!rippleEnabled()\"\r\n >\r\n @if (optionSlot(); as slot) {\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n slot.templateRef;\r\n context: optionContext(option, isSelected(option))\r\n \"\r\n />\r\n } @else {\r\n <span class=\"gog-select__option-mark\" aria-hidden=\"true\">\r\n @if (isSelected(option)) {\r\n <gog-icon name=\"check\" />\r\n }\r\n </span>\r\n <span class=\"gog-select__option-label\">{{ labelOf(option) }}</span>\r\n }\r\n </button>\r\n }\r\n </gog-scroll>\r\n @if (resolvedFilter() && resolvedFilterPosition() === 'bottom') {\r\n <div class=\"gog-select__filter gog-select__filter--bottom\">\r\n <input\r\n type=\"text\"\r\n class=\"gog-select__filter-input\"\r\n [placeholder]=\"filterPlaceholder()\"\r\n [value]=\"filterQuery()\"\r\n (input)=\"onFilterInput($event)\"\r\n (click)=\"$event.stopPropagation()\"\r\n (keydown.escape)=\"close(); focusTrigger()\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n</ng-template>\r\n", styles: ["@charset \"UTF-8\";:host{display:block}:host(.gog-host--auto-width){width:fit-content}.gog-select{display:flex;flex-direction:column;gap:var(--gog-select-gap);width:100%}.gog-select--xsm,.gog-select__dropdown--xsm{--gog-select-size-padding-y: var(--gog-field-xsm-padding-y);--gog-select-size-padding-x: var(--gog-field-xsm-padding-x);--gog-select-size-font-size: var(--gog-field-xsm-font-size)}.gog-select--sm,.gog-select__dropdown--sm{--gog-select-size-padding-y: var(--gog-field-sm-padding-y);--gog-select-size-padding-x: var(--gog-field-sm-padding-x);--gog-select-size-font-size: var(--gog-field-sm-font-size)}.gog-select--lg,.gog-select__dropdown--lg{--gog-select-size-padding-y: var(--gog-field-lg-padding-y);--gog-select-size-padding-x: var(--gog-field-lg-padding-x);--gog-select-size-font-size: var(--gog-field-lg-font-size)}.gog-select--slg,.gog-select__dropdown--slg{--gog-select-size-padding-y: var(--gog-field-slg-padding-y);--gog-select-size-padding-x: var(--gog-field-slg-padding-x);--gog-select-size-font-size: var(--gog-field-slg-font-size)}.gog-select--disabled{opacity:var(--gog-select-disabled-opacity)}.gog-select--disabled .gog-select__label,.gog-select--disabled .gog-select__field{cursor:not-allowed}.gog-select__label{font-family:var(--gog-select-label-font-family);font-size:var(--gog-select-label-font-size);color:var(--gog-select-label-color);text-transform:var(--gog-select-label-text-transform);letter-spacing:var(--gog-select-label-letter-spacing);cursor:pointer}.gog-select__field{position:relative;cursor:pointer}.gog-select__control{width:100%;padding-block:var(--gog-select-control-padding-y, var(--gog-select-size-padding-y, var(--gog-field-md-padding-y)));padding-inline:var(--gog-select-control-padding-x, var(--gog-select-size-padding-x, var(--gog-field-md-padding-x))) var(--gog-select-chevron-inset);display:flex;align-items:center;justify-content:space-between;gap:var(--gog-select-control-gap);font-family:var(--gog-select-font-family);font-size:var(--gog-select-control-font, var(--gog-select-size-font-size, var(--gog-field-md-font-size)));color:var(--gog-select-field-color);background-color:var(--gog-select-field-bg);border:var(--gog-select-field-border-width) var(--gog-select-field-border-style) var(--gog-select-field-border);border-radius:var(--gog-select-radius);outline:none;cursor:pointer;transition:border-color var(--gog-select-transition-duration) var(--gog-easing),box-shadow var(--gog-select-transition-duration) var(--gog-easing)}.gog-select__control:focus{border-color:var(--gog-select-focus-border);box-shadow:var(--gog-select-focus-glow)}.gog-select__control:focus-visible{outline:var(--gog-select-focus-ring-width) solid var(--gog-select-focus-border);outline-offset:var(--gog-select-focus-ring-offset)}.gog-select__control:disabled{cursor:not-allowed}.gog-select--open .gog-select__control{border-color:var(--gog-select-focus-border)}.gog-select__value{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:start}.gog-select__value--placeholder{color:var(--gog-select-placeholder-color)}.gog-select__chevron{width:var(--gog-select-control-font, var(--gog-select-size-font-size, var(--gog-field-md-font-size)));height:var(--gog-select-control-font, var(--gog-select-size-font-size, var(--gog-field-md-font-size)));display:flex;align-items:center;justify-content:center;color:var(--gog-select-chevron-color);pointer-events:none;flex-shrink:0}.gog-select__chevron gog-icon{font-size:calc(var(--gog-select-control-font, var(--gog-select-size-font-size, var(--gog-field-md-font-size))) * var(--gog-select-chevron-icon-ratio))}.gog-select__dropdown{position:absolute;top:calc(100% + var(--gog-select-panel-offset));inset-inline-start:0;inset-inline-end:auto;min-width:100%;width:max-content;max-width:var(--gog-select-panel-max-width);z-index:var(--gog-dropdown-z);display:flex;flex-direction:column;background-color:var(--gog-select-panel-bg);border:var(--gog-select-field-border-width) var(--gog-select-field-border-style) var(--gog-select-field-border);border-radius:var(--gog-select-radius);max-height:var(--gog-select-panel-max-height);overflow:hidden;box-shadow:var(--gog-select-panel-shadow)}.gog-select__scroll{flex:1;min-height:0}.gog-select__dropdown--up{top:auto;bottom:calc(100% + var(--gog-select-panel-offset))}.gog-select__dropdown--portal{position:fixed;top:unset;bottom:unset;inset-inline:unset}.gog-select__option{width:100%;display:flex;align-items:center;gap:var(--gog-select-option-gap);padding:var(--gog-select-control-padding-y, var(--gog-select-size-padding-y, var(--gog-field-md-padding-y))) var(--gog-select-control-padding-x, var(--gog-select-size-padding-x, var(--gog-field-md-padding-x)));border:0;background:transparent;text-align:start;font:inherit;font-family:var(--gog-select-font-family);font-size:var(--gog-select-control-font, var(--gog-select-size-font-size, var(--gog-field-md-font-size)));color:var(--gog-select-option-color);cursor:pointer;transition:background-color var(--gog-select-option-transition-duration) var(--gog-easing)}.gog-select__option:hover{background-color:var(--gog-select-option-hover-bg)}.gog-select__option--selected{color:var(--gog-select-option-selected-color)}.gog-select__option--disabled{opacity:var(--gog-select-option-disabled-opacity);cursor:not-allowed}.gog-select__option:focus-visible{outline:var(--gog-select-focus-ring-width) solid var(--gog-select-focus-border);outline-offset:calc(var(--gog-select-focus-ring-width) * -1)}.gog-select__option-mark{display:inline-flex;align-items:center;justify-content:center;width:calc(var(--gog-select-control-font, var(--gog-select-size-font-size, var(--gog-field-md-font-size))) * var(--gog-select-mark-size-ratio));height:calc(var(--gog-select-control-font, var(--gog-select-size-font-size, var(--gog-field-md-font-size))) * var(--gog-select-mark-size-ratio));flex-shrink:0}.gog-select__option-mark gog-icon{font-size:calc(var(--gog-select-control-font, var(--gog-select-size-font-size, var(--gog-field-md-font-size))) * var(--gog-select-mark-icon-ratio))}.gog-select__error{font-family:var(--gog-select-font-family);font-size:var(--gog-select-error-font-size);color:var(--gog-select-error-color)}.gog-select__label--float{position:absolute;inset-inline-start:var(--gog-select-control-padding-x, var(--gog-select-size-padding-x, var(--gog-field-md-padding-x)));top:50%;transform:translateY(-50%);max-width:calc(100% - 2 * var(--gog-select-control-padding-x, var(--gog-select-size-padding-x, var(--gog-field-md-padding-x))));overflow:hidden;text-overflow:ellipsis;white-space:nowrap;pointer-events:none;cursor:default;color:var(--gog-select-placeholder-color);font-size:var(--gog-select-size-font-size, var(--gog-field-md-font-size));text-transform:none;letter-spacing:normal;transition:transform var(--gog-select-transition-duration) var(--gog-easing),font-size var(--gog-select-transition-duration) var(--gog-easing),color var(--gog-select-transition-duration) var(--gog-easing),top var(--gog-select-transition-duration) var(--gog-easing),background-color var(--gog-select-transition-duration) var(--gog-easing)}.gog-select--float-in,.gog-select--float-on{--gog-select-float-top-padding: calc(var(--gog-select-control-padding-y, var(--gog-select-size-padding-y, var(--gog-field-md-padding-y))) + var(--gog-select-float-label-reserve))}.gog-select--float-in .gog-select__control,.gog-select--float-on .gog-select__control{padding-top:var(--gog-select-float-top-padding)}.gog-select--float-in .gog-select__label--float,.gog-select--float-on .gog-select__label--float{top:var(--gog-select-float-top-padding);transform:none}.gog-select--float-in.gog-select--floated .gog-select__label--float{top:var(--gog-select-float-label-in-top);transform:translateY(0);font-size:var(--gog-select-label-font-size);color:var(--gog-select-label-color);text-transform:var(--gog-select-label-text-transform);letter-spacing:var(--gog-select-label-letter-spacing)}.gog-select--float-on.gog-select--floated .gog-select__label--float{top:0;transform:translateY(-50%);font-size:var(--gog-select-label-font-size);color:var(--gog-select-label-color);text-transform:var(--gog-select-label-text-transform);letter-spacing:var(--gog-select-label-letter-spacing);background-color:var(--gog-select-float-label-on-bg, var(--gog-select-field-bg));padding:0 4px;inset-inline-start:calc(var(--gog-select-control-padding-x, var(--gog-select-size-padding-x, var(--gog-field-md-padding-x))) - 4px)}.gog-select--float-over.gog-select--floated .gog-select__label--float{top:calc(-1 * var(--gog-select-float-label-over-gap));transform:translateY(-100%);font-size:var(--gog-select-label-font-size);color:var(--gog-select-label-color);text-transform:var(--gog-select-label-text-transform);letter-spacing:var(--gog-select-label-letter-spacing)}.gog-select--float-over .gog-select__field{margin-top:var(--gog-select-float-label-over-reserve)}@media(prefers-reduced-motion:reduce){.gog-select__control,.gog-select__option,.gog-select__label--float{transition:none}}.gog-select__clear{position:absolute;top:50%;inset-inline-end:var(--gog-select-chevron-inset);transform:translateY(-50%);width:var(--gog-select-control-font, var(--gog-select-size-font-size, var(--gog-field-md-font-size)));height:var(--gog-select-control-font, var(--gog-select-size-font-size, var(--gog-field-md-font-size)));padding:0;border:0;border-radius:var(--gog-select-clear-radius);background:transparent;color:var(--gog-select-clear-color);line-height:1;cursor:pointer;transition:color var(--gog-select-transition-duration) var(--gog-easing)}.gog-select__clear:hover{color:var(--gog-select-clear-hover-color)}.gog-select__clear:focus-visible{outline:var(--gog-select-focus-ring-width) solid var(--gog-select-focus-border);outline-offset:var(--gog-select-focus-ring-offset)}.gog-select__clear gog-icon{font-size:calc(var(--gog-select-control-font, var(--gog-select-size-font-size, var(--gog-field-md-font-size))) * var(--gog-select-clear-icon-ratio))}.gog-select--clearable .gog-select__control{padding-inline-end:calc(var(--gog-select-chevron-inset) + var(--gog-select-clear-gap) + var(--gog-select-control-font, var(--gog-select-size-font-size, var(--gog-field-md-font-size))))}.gog-select__filter{position:sticky;top:0;z-index:1;padding:var(--gog-select-filter-padding);background:var(--gog-select-panel-bg)}.gog-select__filter-input{width:100%;padding:var(--gog-select-filter-input-padding-y) var(--gog-select-filter-input-padding-x);font-family:var(--gog-select-font-family);font-size:var(--gog-select-control-font, var(--gog-select-size-font-size, var(--gog-field-md-font-size)));color:var(--gog-select-filter-input-color);background:var(--gog-select-filter-input-bg);border:var(--gog-control-border-width) var(--gog-control-border-style) var(--gog-select-filter-input-border);border-radius:var(--gog-select-filter-input-radius);outline:none}.gog-select__filter-input:focus{border-color:var(--gog-select-focus-border)}.gog-select__empty{margin:0;padding:var(--gog-select-filter-empty-padding);font-family:var(--gog-select-font-family);font-size:var(--gog-select-control-font, var(--gog-select-size-font-size, var(--gog-field-md-font-size)));color:var(--gog-select-filter-empty-color);text-align:center}.gog-select__filter--top{border-bottom:var(--gog-select-filter-border-width) var(--gog-select-filter-border-style) var(--gog-select-filter-border-color)}.gog-select__filter--bottom{top:auto;bottom:0;border-top:var(--gog-select-filter-border-width) var(--gog-select-filter-border-style) var(--gog-select-filter-border-color)}:host(.gog-host--auto-width),:host(.gog-host--auto-width) .gog-select__control{min-width:var(--gog-select-min-width)}.gog-select__dropdown--portal{max-width:var(--gog-select-panel-max-width)}\n"] }]
|
|
6059
6829
|
}], propDecorators: { inputId: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputId", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], panelTemplate: [{ type: i0.ViewChild, args: ['panelTpl', { isSignal: true }] }] } });
|
|
6060
6830
|
|
|
6061
6831
|
const DEFAULT_GAP$2 = 4;
|
|
@@ -6132,14 +6902,21 @@ function resolveMenuPlacement(triggerRect, menuSize, viewport, direction = 'ltr'
|
|
|
6132
6902
|
* requires and nobody should have to remember: `role="menuitem"` and a tabindex the menu drives.
|
|
6133
6903
|
*/
|
|
6134
6904
|
class GogMenuItemDirective {
|
|
6905
|
+
/**
|
|
6906
|
+
* Press ripple. Unset, falls back to `GOG_CONFIG.ripple.enabled`, then to `false` — so
|
|
6907
|
+
* `[ripple]="false"` opts one item out of an app that turned it on everywhere.
|
|
6908
|
+
*/
|
|
6909
|
+
ripple = input(undefined, ...(ngDevMode ? [{ debugName: "ripple" }] : /* istanbul ignore next */ []));
|
|
6135
6910
|
elementRef = inject(ElementRef);
|
|
6911
|
+
rippleEnabled = resolveRipple(this.ripple, inject(GOG_CONFIG));
|
|
6912
|
+
rippleControl = bindRipple(this.rippleEnabled);
|
|
6136
6913
|
/** Native `disabled` on the host button — read so navigation can step over it. */
|
|
6137
6914
|
get isDisabled() {
|
|
6138
6915
|
const el = this.elementRef.nativeElement;
|
|
6139
6916
|
return el.disabled === true || el.getAttribute('aria-disabled') === 'true';
|
|
6140
6917
|
}
|
|
6141
6918
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: GogMenuItemDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
6142
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
6919
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.17", type: GogMenuItemDirective, isStandalone: true, selector: "[gogMenuItem]", inputs: { ripple: { classPropertyName: "ripple", publicName: "ripple", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "menuitem", "tabindex": "-1", "type": "button" }, classAttribute: "gog-menu__item" }, ngImport: i0 });
|
|
6143
6920
|
}
|
|
6144
6921
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: GogMenuItemDirective, decorators: [{
|
|
6145
6922
|
type: Directive,
|
|
@@ -6152,7 +6929,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
|
|
|
6152
6929
|
type: 'button',
|
|
6153
6930
|
},
|
|
6154
6931
|
}]
|
|
6155
|
-
}] });
|
|
6932
|
+
}], propDecorators: { ripple: [{ type: i0.Input, args: [{ isSignal: true, alias: "ripple", required: false }] }] } });
|
|
6156
6933
|
/**
|
|
6157
6934
|
* A command menu: a panel of `gogMenuItem` buttons, opened from a trigger the consumer owns.
|
|
6158
6935
|
*
|
|
@@ -6435,7 +7212,7 @@ class MenuComponent {
|
|
|
6435
7212
|
const written = scopedOverlayDirection(trigger, this.document.documentElement);
|
|
6436
7213
|
const direction = written ?? (styles.direction === 'rtl' ? 'rtl' : 'ltr');
|
|
6437
7214
|
const inheritedZ = styles.getPropertyValue('--gog-dropdown-z').trim();
|
|
6438
|
-
this.panelZIndex.set(inheritedZ ? (
|
|
7215
|
+
this.panelZIndex.set(inheritedZ ? resolveNumberToken(trigger, '--gog-dropdown-z', 0) : null);
|
|
6439
7216
|
const size = panel
|
|
6440
7217
|
? { width: panel.offsetWidth, height: panel.scrollHeight }
|
|
6441
7218
|
: {
|
|
@@ -6508,7 +7285,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
|
|
|
6508
7285
|
*
|
|
6509
7286
|
* Its own file rather than a member of `multiselect.component.ts`, because `public-api.ts`
|
|
6510
7287
|
* re-exports that module wholesale — a helper exported there becomes public API nobody decided
|
|
6511
|
-
* to support (see docs/
|
|
7288
|
+
* to support (see docs/backlog.md, "Incidental public exports"). Here it stays
|
|
6512
7289
|
* internal and still testable.
|
|
6513
7290
|
*/
|
|
6514
7291
|
/** What the trigger shows: the labels that fit on one line, and how many did not. */
|
|
@@ -6924,7 +7701,7 @@ class GogTooltipDirective {
|
|
|
6924
7701
|
// untransformed layout box, which is the size to position against.
|
|
6925
7702
|
const bubbleSize = { width: bubbleEl.offsetWidth, height: bubbleEl.offsetHeight };
|
|
6926
7703
|
const viewport = { width: window.innerWidth, height: window.innerHeight };
|
|
6927
|
-
const gap =
|
|
7704
|
+
const gap = resolveLengthToken(hostEl, '--gog-tooltip-gap', DEFAULT_GAP);
|
|
6928
7705
|
const placement = resolveTooltipPlacement(this.resolvedPosition(), targetRect, bubbleSize, viewport, gap, VIEWPORT_PADDING,
|
|
6929
7706
|
// Read from the target rather than the document: a tooltip on a trigger inside an RTL
|
|
6930
7707
|
// region of an LTR page has to mirror with that region, not with the page.
|
|
@@ -6944,11 +7721,11 @@ class GogTooltipDirective {
|
|
|
6944
7721
|
resolveZIndex(hostEl) {
|
|
6945
7722
|
const inherited = getComputedStyle(hostEl).getPropertyValue('--gog-tooltip-z').trim();
|
|
6946
7723
|
if (inherited)
|
|
6947
|
-
return
|
|
7724
|
+
return resolveNumberToken(hostEl, '--gog-tooltip-z', DEFAULT_Z_INDEX);
|
|
6948
7725
|
for (let node = hostEl; node; node = node.parentElement) {
|
|
6949
7726
|
const declared = node.style.getPropertyValue('--gog-tooltip-z').trim();
|
|
6950
7727
|
if (declared)
|
|
6951
|
-
return
|
|
7728
|
+
return resolveNumberToken(node, '--gog-tooltip-z', DEFAULT_Z_INDEX);
|
|
6952
7729
|
}
|
|
6953
7730
|
return DEFAULT_Z_INDEX;
|
|
6954
7731
|
}
|
|
@@ -6973,13 +7750,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
|
|
|
6973
7750
|
},
|
|
6974
7751
|
}]
|
|
6975
7752
|
}], ctorParameters: () => [], propDecorators: { gogTooltip: [{ type: i0.Input, args: [{ isSignal: true, alias: "gogTooltip", required: false }] }], gogTooltipPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "gogTooltipPosition", required: false }] }], gogTooltipShowDelay: [{ type: i0.Input, args: [{ isSignal: true, alias: "gogTooltipShowDelay", required: false }] }], gogTooltipHideDelay: [{ type: i0.Input, args: [{ isSignal: true, alias: "gogTooltipHideDelay", required: false }] }], gogTooltipDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "gogTooltipDisabled", required: false }] }], gogTooltipClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "gogTooltipClass", required: false }] }] } });
|
|
6976
|
-
function readNumber(raw, fallback) {
|
|
6977
|
-
const parsed = Number.parseFloat(raw);
|
|
6978
|
-
return Number.isFinite(parsed) ? parsed : fallback;
|
|
6979
|
-
}
|
|
6980
|
-
function readPxToken(el, token, fallback) {
|
|
6981
|
-
return readNumber(getComputedStyle(el).getPropertyValue(token), fallback);
|
|
6982
|
-
}
|
|
6983
7753
|
|
|
6984
7754
|
/** Height of the select-all/clear row, included in the panel height estimate. */
|
|
6985
7755
|
const CONTROLS_ROW_HEIGHT = 38;
|
|
@@ -7040,10 +7810,10 @@ class MultiselectComponent extends GogDropdownBase {
|
|
|
7040
7810
|
clearableByDefault = true;
|
|
7041
7811
|
sizeBlockClass = 'gog-ms-wrapper';
|
|
7042
7812
|
panelBlockClass = 'gog-ms__dropdown';
|
|
7043
|
-
optionGapToken = '--gog-
|
|
7044
|
-
optionsPaddingToken = '--gog-
|
|
7045
|
-
panelMaxHeightToken = '--gog-
|
|
7046
|
-
optionHeightToken = '--gog-
|
|
7813
|
+
optionGapToken = '--gog-multiselect-option-gap';
|
|
7814
|
+
optionsPaddingToken = '--gog-multiselect-options-padding';
|
|
7815
|
+
panelMaxHeightToken = '--gog-multiselect-panel-max-height';
|
|
7816
|
+
optionHeightToken = '--gog-multiselect-option-height';
|
|
7047
7817
|
listboxId = computed(() => `gog-ms-listbox-${this.uid}`, ...(ngDevMode ? [{ debugName: "listboxId" }] : /* istanbul ignore next */ []));
|
|
7048
7818
|
labelId = computed(() => `gog-ms-label-${this.uid}`, ...(ngDevMode ? [{ debugName: "labelId" }] : /* istanbul ignore next */ []));
|
|
7049
7819
|
/** Labels of the current selection, driven off the selected *options* so it works whatever
|
|
@@ -7126,14 +7896,21 @@ class MultiselectComponent extends GogDropdownBase {
|
|
|
7126
7896
|
return this.showControls() ? CONTROLS_ROW_HEIGHT : 0;
|
|
7127
7897
|
}
|
|
7128
7898
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: MultiselectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
7129
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: MultiselectComponent, isStandalone: true, selector: "gog-multiselect", inputs: { showControls: { classPropertyName: "showControls", publicName: "showControls", isSignal: true, isRequired: false, transformFunction: null }, controlsPosition: { classPropertyName: "controlsPosition", publicName: "controlsPosition", isSignal: true, isRequired: false, transformFunction: null }, selectAllLabel: { classPropertyName: "selectAllLabel", publicName: "selectAllLabel", isSignal: true, isRequired: false, transformFunction: null }, clearAllLabel: { classPropertyName: "clearAllLabel", publicName: "clearAllLabel", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, host: { properties: { "style.--gog-multiselect-min-width": "minWidth()" } }, queries: [{ propertyName: "clearIconSlot", first: true, predicate: GogMultiselectClearIconDirective, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "panelTemplate", first: true, predicate: ["panelTpl"], descendants: true, isSignal: true }, { propertyName: "valueRef", first: true, predicate: ["valueEl"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<!--\r\n Deliberately not `gog-contained-layout`: `contain: layout` makes this element a stacking\r\n context, which traps the panel's z-index inside it and lets whatever follows on the page\r\n paint over the open dropdown.\r\n-->\r\n<div\r\n class=\"gog-ms-wrapper\"\r\n [class]=\"sizeClass()\"\r\n [class.gog-ms-wrapper--float-in]=\"resolvedFloatLabel() === 'in'\"\r\n [class.gog-ms-wrapper--float-on]=\"resolvedFloatLabel() === 'on'\"\r\n [class.gog-ms-wrapper--float-over]=\"resolvedFloatLabel() === 'over'\"\r\n [class.gog-ms-wrapper--floated]=\"isFloatLabelFloated()\"\r\n>\r\n <!--\r\n Associated with aria-labelledby rather than `for`: the trigger is a div with\r\n role=\"combobox\", not a labelable element. Without this the trigger had no accessible\r\n name at all whenever `label` was set, because that also suppresses the aria-label.\r\n -->\r\n @if (label() && resolvedFloatLabel() === 'none') {\r\n <!-- eslint-disable-next-line @angular-eslint/template/label-has-associated-control -- associated via aria-labelledby above instead, see comment -->\r\n <label class=\"gog-ms__label\" [id]=\"labelId()\">{{ label() }}</label>\r\n }\r\n\r\n <div\r\n [gogTooltip]=\"summary().hidden > 0 ? selectedListTpl : null\"\r\n class=\"gog-ms\"\r\n role=\"combobox\"\r\n [attr.tabindex]=\"isDisabled() ? -1 : 0\"\r\n [attr.aria-expanded]=\"isOpen()\"\r\n aria-haspopup=\"listbox\"\r\n [attr.aria-controls]=\"listboxId()\"\r\n [attr.aria-disabled]=\"isDisabled()\"\r\n [attr.aria-labelledby]=\"label() ? labelId() : null\"\r\n [attr.aria-label]=\"label() ? null : ariaLabel() || placeholder() || 'Select'\"\r\n [class.gog-ms--open]=\"isOpen()\"\r\n [class.gog-ms--disabled]=\"isDisabled()\"\r\n [class.gog-ms--error]=\"hasError()\"\r\n (click)=\"toggle()\"\r\n (focus)=\"onFocusIn()\"\r\n (blur)=\"onFocusOut()\"\r\n (keydown.enter)=\"toggle(); $event.preventDefault()\"\r\n (keydown.space)=\"toggle(); $event.preventDefault()\"\r\n (keydown.escape)=\"close()\"\r\n (keydown.arrowdown)=\"onTriggerArrowKeydown($event)\"\r\n (keydown.arrowup)=\"onTriggerArrowKeydown($event)\"\r\n >\r\n @if (label() && isFloatLabelActive()) {\r\n <!-- eslint-disable-next-line @angular-eslint/template/label-has-associated-control -- associated via aria-labelledby above instead, see comment -->\r\n <label class=\"gog-ms__label gog-ms__label--float\" [id]=\"labelId()\">{{ label() }}</label>\r\n }\r\n <span #valueEl class=\"gog-ms__value\" [class.gog-ms__value--placeholder]=\"!selectedNames()\">\r\n {{ summary().text || effectivePlaceholder() }}\r\n </span>\r\n <!--\r\n Only what fits is shown; the rest is collapsed into a count. The tooltip is the way to read\r\n the whole selection back, so it is bound only while something is actually hidden.\r\n -->\r\n @if (summary().hidden > 0) {\r\n <span class=\"gog-ms__overflow\" aria-hidden=\"true\">+{{ summary().hidden }}</span>\r\n }\r\n\r\n <span class=\"gog-ms__actions\">\r\n <span class=\"gog-ms__arrow\" [class.gog-ms__arrow--up]=\"isOpen()\" aria-hidden=\"true\">\r\n <gog-icon\r\n [template]=\"chevronSlot()?.templateRef ?? null\"\r\n [name]=\"isOpen() ? 'chevron-up' : 'chevron-down'\"\r\n />\r\n </span>\r\n @if (showClear()) {\r\n <button\r\n type=\"button\"\r\n class=\"gog-ms__clear gog-inline-center\"\r\n (click)=\"clearValue($event)\"\r\n [attr.aria-label]=\"resolvedClearLabel()\"\r\n >\r\n <gog-icon [template]=\"clearIconSlot()?.templateRef ?? null\" name=\"close\" />\r\n </button>\r\n }\r\n </span>\r\n </div>\r\n\r\n @if (isOpen() && !resolvedAppendToBody()) {\r\n <ng-container [ngTemplateOutlet]=\"panelTpl\" />\r\n }\r\n\r\n @if (visibleError()) {\r\n <span class=\"gog-ms__error\" role=\"alert\">{{ visibleError() }}</span>\r\n }\r\n</div>\r\n\r\n<!--\r\n One template for both render modes. When `appendToBody` is set it is stamped into\r\n <body> by the overlay, which is why the portal-only modifier and the resolved\r\n coordinates are applied conditionally: outside the component's subtree the panel can\r\n no longer inherit the size tokens from the `.gog-ms-wrapper--sm/--lg` wrapper.\r\n-->\r\n<ng-template #panelTpl>\r\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- (click) below is housekeeping stopPropagation, not an interactive handler; the focusable/keyboard-operable elements are the options inside -->\r\n <div\r\n [id]=\"listboxId()\"\r\n class=\"gog-ms__dropdown\"\r\n [class.gog-ms__dropdown--up]=\"!resolvedAppendToBody() && dropdownDirectionState() === 'up'\"\r\n [class.gog-ms__dropdown--portal]=\"resolvedAppendToBody()\"\r\n [class]=\"panelSizeClass()\"\r\n [style.top.px]=\"resolvedAppendToBody() ? panelPlacement()?.top : null\"\r\n [style.left.px]=\"resolvedAppendToBody() ? panelPlacement()?.left : null\"\r\n [style.width]=\"resolvedAppendToBody() ? resolvedPanelWidth() : null\"\r\n [style.min-width]=\"resolvedAppendToBody() ? resolvedPanelMinWidth() : null\"\r\n [style.max-height]=\"resolvedAppendToBody() ? resolvedPanelMaxHeight() : null\"\r\n [style.z-index]=\"dropdownZIndex() ?? panelZIndex()\"\r\n role=\"listbox\"\r\n aria-multiselectable=\"true\"\r\n [attr.aria-labelledby]=\"label() ? labelId() : null\"\r\n (click)=\"$event.stopPropagation()\"\r\n >\r\n @if (showControls() && controlsPosition() === 'top') {\r\n <ng-container [ngTemplateOutlet]=\"controlsRowTpl\" />\r\n }\r\n <!--\r\n Not a tab stop of its own: the listbox pattern's only stop is the trigger, with\r\n focus moved between options via the arrow keys (roving-focus.ts), which already\r\n scrolls the focused option into view natively \u2014 no separate keyboard-scroll target\r\n needed here.\r\n -->\r\n @if (resolvedFilter() && resolvedFilterPosition() === 'top') {\r\n <div class=\"gog-ms__filter gog-ms__filter--top\">\r\n <input\r\n type=\"text\"\r\n class=\"gog-ms__filter-input\"\r\n [placeholder]=\"filterPlaceholder()\"\r\n [value]=\"filterQuery()\"\r\n (input)=\"onFilterInput($event)\"\r\n (click)=\"$event.stopPropagation()\"\r\n (keydown.escape)=\"close(); focusTrigger()\"\r\n />\r\n </div>\r\n }\r\n <gog-scroll size=\"thin\" [focusable]=\"false\" overscrollBehavior=\"contain\" class=\"gog-ms__scroll\">\r\n <div class=\"gog-ms__options\">\r\n @if (visibleOptions().length === 0) {\r\n <p class=\"gog-ms__empty\">{{ filterEmptyMessage() }}</p>\r\n }\r\n @for (option of visibleOptions(); track valueOf(option)) {\r\n <!--\r\n tabindex=\"-1\" keeps the list to a single tab stop, as the listbox pattern\r\n expects: focus moves between options with the arrow keys, not by tabbing\r\n through every one. Programmatic .focus() still works on a negative tabindex.\r\n -->\r\n <button\r\n type=\"button\"\r\n class=\"gog-ms__option\"\r\n role=\"option\"\r\n tabindex=\"-1\"\r\n [attr.aria-selected]=\"isSelected(option)\"\r\n [attr.aria-disabled]=\"isOptionDisabled(option)\"\r\n [class.gog-ms__option--selected]=\"isSelected(option)\"\r\n [class.gog-ms__option--disabled]=\"isOptionDisabled(option)\"\r\n (click)=\"toggleOption(option, $event)\"\r\n (keydown)=\"onOptionKeydown($event)\"\r\n >\r\n @if (optionSlot(); as slot) {\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n slot.templateRef;\r\n context: optionContext(option, isSelected(option))\r\n \"\r\n />\r\n } @else {\r\n <span class=\"gog-ms__option-mark\" aria-hidden=\"true\">\r\n <gog-icon [name]=\"isSelected(option) ? 'checkbox-checked' : 'checkbox'\" />\r\n </span>\r\n {{ labelOf(option) }}\r\n }\r\n </button>\r\n }\r\n </div>\r\n </gog-scroll>\r\n @if (resolvedFilter() && resolvedFilterPosition() === 'bottom') {\r\n <div class=\"gog-ms__filter gog-ms__filter--bottom\">\r\n <input\r\n type=\"text\"\r\n class=\"gog-ms__filter-input\"\r\n [placeholder]=\"filterPlaceholder()\"\r\n [value]=\"filterQuery()\"\r\n (input)=\"onFilterInput($event)\"\r\n (click)=\"$event.stopPropagation()\"\r\n (keydown.escape)=\"close(); focusTrigger()\"\r\n />\r\n </div>\r\n }\r\n @if (showControls() && controlsPosition() === 'bottom') {\r\n <ng-container [ngTemplateOutlet]=\"controlsRowTpl\" />\r\n }\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #controlsRowTpl>\r\n <div class=\"gog-ms__controls\" [class.gog-ms__controls--bottom]=\"controlsPosition() === 'bottom'\">\r\n <gog-button variant=\"ghost\" size=\"sm\" (click)=\"selectAll($event)\">{{\r\n resolvedSelectAllLabel()\r\n }}</gog-button>\r\n <gog-button variant=\"ghost\" size=\"sm\" (click)=\"clearAll($event)\">{{\r\n resolvedClearAllLabel()\r\n }}</gog-button>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Full selection, shown as a tooltip when the trigger can only fit part of it. -->\r\n<ng-template #selectedListTpl>\r\n <ul class=\"gog-ms__tooltip-list\">\r\n @for (label of selectedLabels(); track label) {\r\n <li>{{ label }}</li>\r\n }\r\n </ul>\r\n</ng-template>\r\n", styles: ["@charset \"UTF-8\";.gog-ms-wrapper{display:flex;flex-direction:column;gap:var(--gog-multiselect-gap);position:relative;width:100%}:host(.gog-host--auto-width){width:fit-content}:host(.gog-host--auto-width) .gog-ms-wrapper{width:fit-content}.gog-ms-wrapper--xsm,.gog-ms__dropdown--xsm{--gog-multiselect-size-padding-y: var(--gog-field-xsm-padding-y);--gog-multiselect-size-padding-x: var(--gog-field-xsm-padding-x);--gog-multiselect-size-font-size: var(--gog-field-xsm-font-size)}.gog-ms-wrapper--sm,.gog-ms__dropdown--sm{--gog-multiselect-size-padding-y: var(--gog-field-sm-padding-y);--gog-multiselect-size-padding-x: var(--gog-field-sm-padding-x);--gog-multiselect-size-font-size: var(--gog-field-sm-font-size)}.gog-ms-wrapper--lg,.gog-ms__dropdown--lg{--gog-multiselect-size-padding-y: var(--gog-field-lg-padding-y);--gog-multiselect-size-padding-x: var(--gog-field-lg-padding-x);--gog-multiselect-size-font-size: var(--gog-field-lg-font-size)}.gog-ms-wrapper--slg,.gog-ms__dropdown--slg{--gog-multiselect-size-padding-y: var(--gog-field-slg-padding-y);--gog-multiselect-size-padding-x: var(--gog-field-slg-padding-x);--gog-multiselect-size-font-size: var(--gog-field-slg-font-size)}.gog-ms__label{font-family:var(--gog-multiselect-label-font-family);font-size:var(--gog-multiselect-label-font-size);color:var(--gog-multiselect-label-color);text-transform:var(--gog-multiselect-label-text-transform);letter-spacing:var(--gog-multiselect-label-letter-spacing);cursor:pointer}.gog-ms{position:relative;display:flex;align-items:center;justify-content:space-between;padding:var(--gog-multiselect-padding-y, var(--gog-multiselect-size-padding-y, var(--gog-field-md-padding-y))) var(--gog-multiselect-padding-x, var(--gog-multiselect-size-padding-x, var(--gog-field-md-padding-x)));background-color:var(--gog-multiselect-field-bg);border:var(--gog-multiselect-field-border-width) var(--gog-multiselect-field-border-style) var(--gog-multiselect-field-border);border-radius:var(--gog-multiselect-radius);color:var(--gog-multiselect-field-color);cursor:pointer;-webkit-user-select:none;user-select:none;transition:border-color var(--gog-multiselect-transition-duration) var(--gog-easing),box-shadow var(--gog-multiselect-transition-duration) var(--gog-easing)}.gog-ms:hover:not(.gog-ms--disabled){border-color:var(--gog-multiselect-focus-border)}.gog-ms:focus-visible{outline:var(--gog-multiselect-focus-ring-width) solid var(--gog-multiselect-focus-ring);outline-offset:var(--gog-multiselect-focus-ring-offset)}.gog-ms--open{border-color:var(--gog-multiselect-border-color);box-shadow:var(--gog-multiselect-focus-glow)}.gog-ms--disabled{opacity:var(--gog-multiselect-disabled-opacity);cursor:not-allowed}.gog-ms--disabled .gog-ms__label{cursor:not-allowed}.gog-ms--error{border-color:var(--gog-multiselect-error-color)}.gog-ms__value{font-family:var(--gog-multiselect-font-family);font-size:var(--gog-multiselect-font-size, var(--gog-multiselect-size-font-size, var(--gog-field-md-font-size)));flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--gog-multiselect-value-color)}.gog-ms__value--placeholder{color:var(--gog-multiselect-placeholder-color)}.gog-ms{padding-inline-end:var(--gog-multiselect-actions-inset)}.gog-ms__actions{display:flex;align-items:center;gap:var(--gog-multiselect-actions-gap);flex-shrink:0}.gog-ms__clear{width:var(--gog-multiselect-font-size, var(--gog-multiselect-size-font-size, var(--gog-field-md-font-size)));height:var(--gog-multiselect-font-size, var(--gog-multiselect-size-font-size, var(--gog-field-md-font-size)));padding:0;border:0;border-radius:var(--gog-multiselect-clear-radius);background:transparent;color:var(--gog-multiselect-placeholder-color);line-height:1;cursor:pointer;transition:color var(--gog-multiselect-transition-duration) var(--gog-easing)}.gog-ms__clear gog-icon{font-size:calc(var(--gog-multiselect-font-size, var(--gog-multiselect-size-font-size, var(--gog-field-md-font-size))) * var(--gog-multiselect-clear-icon-ratio))}.gog-ms__clear:hover{color:var(--gog-multiselect-field-color)}.gog-ms__clear:focus-visible{outline:var(--gog-multiselect-focus-ring-width) solid var(--gog-multiselect-focus-ring);outline-offset:var(--gog-multiselect-focus-ring-offset)}.gog-ms__arrow{color:var(--gog-multiselect-border-color);transition:transform var(--gog-multiselect-arrow-transition-duration) var(--gog-easing);display:inline-flex;align-items:center;justify-content:center;width:var(--gog-multiselect-font-size, var(--gog-multiselect-size-font-size, var(--gog-field-md-font-size)));height:var(--gog-multiselect-font-size, var(--gog-multiselect-size-font-size, var(--gog-field-md-font-size)))}.gog-ms__arrow gog-icon{font-size:calc(var(--gog-multiselect-font-size, var(--gog-multiselect-size-font-size, var(--gog-field-md-font-size))) * var(--gog-multiselect-arrow-icon-ratio))}.gog-ms__arrow--up{transform:rotate(180deg)}.gog-ms__dropdown{position:absolute;top:calc(100% + var(--gog-multiselect-panel-offset));inset-inline-start:0;inset-inline-end:auto;min-width:100%;width:max-content;max-width:var(--gog-multiselect-panel-max-width);z-index:var(--gog-dropdown-z);display:flex;flex-direction:column;background-color:var(--gog-multiselect-panel-bg);border:var(--gog-multiselect-field-border-width) var(--gog-multiselect-field-border-style) var(--gog-multiselect-panel-border);border-radius:var(--gog-multiselect-radius);max-height:var(--gog-multiselect-panel-max-height);overflow:hidden;box-shadow:var(--gog-multiselect-panel-shadow)}.gog-ms__scroll{flex:1;min-height:0}.gog-ms__dropdown--up{top:auto;bottom:calc(100% + var(--gog-multiselect-panel-offset))}.gog-ms__dropdown--portal{position:fixed;top:unset;bottom:unset;inset-inline:unset}.gog-ms__controls{flex-shrink:0;display:flex;gap:var(--gog-multiselect-controls-gap);padding:var(--gog-multiselect-controls-padding);background-color:var(--gog-multiselect-panel-bg);border-bottom:var(--gog-multiselect-field-border-width) var(--gog-multiselect-field-border-style) var(--gog-multiselect-field-border)}.gog-ms__controls--bottom{border-bottom:0;border-top:var(--gog-multiselect-field-border-width) var(--gog-multiselect-field-border-style) var(--gog-multiselect-field-border)}.gog-ms__options{display:flex;flex-direction:column;padding:var(--gog-multiselect-options-padding);gap:var(--gog-multiselect-option-gap)}.gog-ms__option{width:100%;display:flex;align-items:center;gap:var(--gog-multiselect-option-gap-inline);padding:var(--gog-multiselect-padding-y, var(--gog-multiselect-size-padding-y, var(--gog-field-md-padding-y))) var(--gog-multiselect-padding-x, var(--gog-multiselect-size-padding-x, var(--gog-field-md-padding-x)));border:0;background:transparent;text-align:start;font:inherit;font-family:var(--gog-multiselect-font-family);font-size:var(--gog-multiselect-font-size, var(--gog-multiselect-size-font-size, var(--gog-field-md-font-size)));cursor:pointer;border-radius:var(--gog-multiselect-option-radius);transition:background-color var(--gog-multiselect-option-transition-duration) var(--gog-easing);color:var(--gog-multiselect-option-color)}.gog-ms__option--disabled{opacity:var(--gog-multiselect-option-disabled-opacity);cursor:not-allowed}.gog-ms__option:hover{background-color:var(--gog-multiselect-option-hover-bg)}.gog-ms__option--selected{color:var(--gog-multiselect-border-color)}.gog-ms__option:focus-visible{outline:var(--gog-multiselect-focus-ring-width) solid var(--gog-multiselect-focus-ring);outline-offset:calc(var(--gog-multiselect-focus-ring-width) * -1)}.gog-ms__option-mark{display:flex;align-items:center;justify-content:center;width:calc(var(--gog-multiselect-font-size, var(--gog-multiselect-size-font-size, var(--gog-field-md-font-size))) * var(--gog-multiselect-mark-size-ratio));height:calc(var(--gog-multiselect-font-size, var(--gog-multiselect-size-font-size, var(--gog-field-md-font-size))) * var(--gog-multiselect-mark-size-ratio));flex-shrink:0;font-size:calc(var(--gog-multiselect-font-size, var(--gog-multiselect-size-font-size, var(--gog-field-md-font-size))) * var(--gog-multiselect-mark-icon-ratio));color:var(--gog-multiselect-checkbox-border)}.gog-ms__option--selected .gog-ms__option-mark{color:var(--gog-multiselect-checkbox-checked-bg)}.gog-ms__error{font-family:var(--gog-multiselect-font-family);font-size:var(--gog-multiselect-error-font-size);color:var(--gog-multiselect-error-color);margin-top:var(--gog-multiselect-error-offset)}.gog-ms__label--float{position:absolute;inset-inline-start:var(--gog-multiselect-padding-x, var(--gog-multiselect-size-padding-x, var(--gog-field-md-padding-x)));top:50%;transform:translateY(-50%);max-width:calc(100% - 2 * var(--gog-multiselect-padding-x, var(--gog-multiselect-size-padding-x, var(--gog-field-md-padding-x))));overflow:hidden;text-overflow:ellipsis;white-space:nowrap;pointer-events:none;cursor:default;color:var(--gog-multiselect-placeholder-color);font-size:var(--gog-multiselect-size-font-size, var(--gog-field-md-font-size));text-transform:none;letter-spacing:normal;transition:transform var(--gog-multiselect-transition-duration) var(--gog-easing),font-size var(--gog-multiselect-transition-duration) var(--gog-easing),color var(--gog-multiselect-transition-duration) var(--gog-easing),top var(--gog-multiselect-transition-duration) var(--gog-easing),background-color var(--gog-multiselect-transition-duration) var(--gog-easing)}.gog-ms-wrapper--float-in,.gog-ms-wrapper--float-on{--gog-multiselect-float-top-padding: calc(var(--gog-multiselect-padding-y, var(--gog-multiselect-size-padding-y, var(--gog-field-md-padding-y))) + var(--gog-multiselect-float-label-reserve))}.gog-ms-wrapper--float-in .gog-ms,.gog-ms-wrapper--float-on .gog-ms{padding-top:var(--gog-multiselect-float-top-padding)}.gog-ms-wrapper--float-in .gog-ms__label--float,.gog-ms-wrapper--float-on .gog-ms__label--float{top:var(--gog-multiselect-float-top-padding);transform:none}.gog-ms-wrapper--float-in.gog-ms-wrapper--floated .gog-ms__label--float{top:var(--gog-multiselect-float-label-in-top);transform:translateY(0);font-size:var(--gog-multiselect-label-font-size);color:var(--gog-multiselect-label-color);text-transform:var(--gog-multiselect-label-text-transform);letter-spacing:var(--gog-multiselect-label-letter-spacing)}.gog-ms-wrapper--float-on.gog-ms-wrapper--floated .gog-ms__label--float{top:0;transform:translateY(-50%);font-size:var(--gog-multiselect-label-font-size);color:var(--gog-multiselect-label-color);text-transform:var(--gog-multiselect-label-text-transform);letter-spacing:var(--gog-multiselect-label-letter-spacing);background-color:var(--gog-multiselect-float-label-on-bg, var(--gog-multiselect-field-bg));padding:0 4px;inset-inline-start:calc(var(--gog-multiselect-padding-x, var(--gog-multiselect-size-padding-x, var(--gog-field-md-padding-x))) - 4px)}.gog-ms-wrapper--float-over.gog-ms-wrapper--floated .gog-ms__label--float{top:calc(-1 * var(--gog-multiselect-float-label-over-gap));transform:translateY(-100%);font-size:var(--gog-multiselect-label-font-size);color:var(--gog-multiselect-label-color);text-transform:var(--gog-multiselect-label-text-transform);letter-spacing:var(--gog-multiselect-label-letter-spacing)}.gog-ms-wrapper--float-over .gog-ms{margin-top:var(--gog-multiselect-float-label-over-reserve)}@media(prefers-reduced-motion:reduce){.gog-ms,.gog-ms__clear,.gog-ms__arrow,.gog-ms__option,.gog-ms__option-mark,.gog-ms__label--float{transition:none}}.gog-ms__filter{position:sticky;top:0;z-index:1;padding:var(--gog-multiselect-filter-padding);background:var(--gog-multiselect-panel-bg)}.gog-ms__filter-input{width:100%;padding:var(--gog-multiselect-filter-input-padding-y) var(--gog-multiselect-filter-input-padding-x);font-family:var(--gog-multiselect-font-family);font-size:var(--gog-multiselect-font-size, var(--gog-multiselect-size-font-size, var(--gog-field-md-font-size)));color:var(--gog-multiselect-filter-input-color);background:var(--gog-multiselect-filter-input-bg);border:var(--gog-control-border-width) var(--gog-control-border-style) var(--gog-multiselect-filter-input-border);border-radius:var(--gog-multiselect-filter-input-radius);outline:none}.gog-ms__filter-input:focus{border-color:var(--gog-multiselect-focus-border)}.gog-ms__empty{margin:0;padding:var(--gog-multiselect-filter-empty-padding);font-family:var(--gog-multiselect-font-family);font-size:var(--gog-multiselect-font-size, var(--gog-multiselect-size-font-size, var(--gog-field-md-font-size)));color:var(--gog-multiselect-filter-empty-color);text-align:center}.gog-ms__filter--top{border-bottom:var(--gog-multiselect-filter-border-width) var(--gog-multiselect-filter-border-style) var(--gog-multiselect-filter-border-color)}.gog-ms__filter--bottom{top:auto;bottom:0;border-top:var(--gog-multiselect-filter-border-width) var(--gog-multiselect-filter-border-style) var(--gog-multiselect-filter-border-color)}:host(.gog-host--auto-width),:host(.gog-host--auto-width) .gog-ms{min-width:var(--gog-multiselect-min-width)}.gog-ms__dropdown--portal{max-width:var(--gog-multiselect-panel-max-width)}.gog-ms__overflow{flex-shrink:0;margin-inline-start:var(--gog-multiselect-overflow-gap);font-size:var(--gog-multiselect-overflow-font-size);color:var(--gog-multiselect-overflow-color)}.gog-ms__tooltip-list{margin:0;padding-inline-start:1.1em;text-align:start}\n"], dependencies: [{ kind: "component", type: ButtonComponent, selector: "gog-button", inputs: ["variant", "size", "disabled", "fullWidth", "type", "loading", "debounce", "ariaLabel"], outputs: ["gogClick"] }, { kind: "component", type: IconComponent, selector: "gog-icon", inputs: ["name", "template", "title", "ariaHidden"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ScrollComponent, selector: "gog-scroll", inputs: ["axis", "size", "autoHide", "hideDelay", "reachThreshold", "focusable", "ariaLabel", "overscrollBehavior", "showTrack"], outputs: ["gogScroll", "gogReachStart", "gogReachEnd"] }, { kind: "directive", type: GogTooltipDirective, selector: "[gogTooltip]", inputs: ["gogTooltip", "gogTooltipPosition", "gogTooltipShowDelay", "gogTooltipHideDelay", "gogTooltipDisabled", "gogTooltipClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
7899
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: MultiselectComponent, isStandalone: true, selector: "gog-multiselect", inputs: { showControls: { classPropertyName: "showControls", publicName: "showControls", isSignal: true, isRequired: false, transformFunction: null }, controlsPosition: { classPropertyName: "controlsPosition", publicName: "controlsPosition", isSignal: true, isRequired: false, transformFunction: null }, selectAllLabel: { classPropertyName: "selectAllLabel", publicName: "selectAllLabel", isSignal: true, isRequired: false, transformFunction: null }, clearAllLabel: { classPropertyName: "clearAllLabel", publicName: "clearAllLabel", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, host: { properties: { "style.--gog-multiselect-min-width": "minWidth()" } }, queries: [{ propertyName: "clearIconSlot", first: true, predicate: GogMultiselectClearIconDirective, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "panelTemplate", first: true, predicate: ["panelTpl"], descendants: true, isSignal: true }, { propertyName: "valueRef", first: true, predicate: ["valueEl"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<!--\r\n Deliberately not `gog-contained-layout`: `contain: layout` makes this element a stacking\r\n context, which traps the panel's z-index inside it and lets whatever follows on the page\r\n paint over the open dropdown.\r\n-->\r\n<div\r\n class=\"gog-ms-wrapper\"\r\n [class]=\"sizeClass()\"\r\n [class.gog-ms-wrapper--float-in]=\"resolvedFloatLabel() === 'in'\"\r\n [class.gog-ms-wrapper--float-on]=\"resolvedFloatLabel() === 'on'\"\r\n [class.gog-ms-wrapper--float-over]=\"resolvedFloatLabel() === 'over'\"\r\n [class.gog-ms-wrapper--floated]=\"isFloatLabelFloated()\"\r\n>\r\n <!--\r\n Associated with aria-labelledby rather than `for`: the trigger is a div with\r\n role=\"combobox\", not a labelable element. Without this the trigger had no accessible\r\n name at all whenever `label` was set, because that also suppresses the aria-label.\r\n -->\r\n @if (label() && resolvedFloatLabel() === 'none') {\r\n <!-- eslint-disable-next-line @angular-eslint/template/label-has-associated-control -- associated via aria-labelledby above instead, see comment -->\r\n <label class=\"gog-ms__label\" [id]=\"labelId()\">{{ label() }}</label>\r\n }\r\n\r\n <div\r\n [gogTooltip]=\"summary().hidden > 0 ? selectedListTpl : null\"\r\n class=\"gog-ms\"\r\n role=\"combobox\"\r\n [attr.tabindex]=\"isDisabled() ? -1 : 0\"\r\n [attr.aria-expanded]=\"isOpen()\"\r\n aria-haspopup=\"listbox\"\r\n [attr.aria-controls]=\"listboxId()\"\r\n [attr.aria-disabled]=\"isDisabled()\"\r\n [attr.aria-labelledby]=\"label() ? labelId() : null\"\r\n [attr.aria-label]=\"label() ? null : ariaLabel() || placeholder() || 'Select'\"\r\n [class.gog-ms--open]=\"isOpen()\"\r\n [class.gog-ms--disabled]=\"isDisabled()\"\r\n [class.gog-ms--error]=\"hasError()\"\r\n (click)=\"toggle()\"\r\n (focus)=\"onFocusIn()\"\r\n (blur)=\"onFocusOut()\"\r\n (keydown.enter)=\"toggle(); $event.preventDefault()\"\r\n (keydown.space)=\"toggle(); $event.preventDefault()\"\r\n (keydown.escape)=\"close()\"\r\n (keydown.arrowdown)=\"onTriggerArrowKeydown($event)\"\r\n (keydown.arrowup)=\"onTriggerArrowKeydown($event)\"\r\n >\r\n @if (label() && isFloatLabelActive()) {\r\n <!-- eslint-disable-next-line @angular-eslint/template/label-has-associated-control -- associated via aria-labelledby above instead, see comment -->\r\n <label class=\"gog-ms__label gog-ms__label--float\" [id]=\"labelId()\">{{ label() }}</label>\r\n }\r\n <span #valueEl class=\"gog-ms__value\" [class.gog-ms__value--placeholder]=\"!selectedNames()\">\r\n {{ summary().text || effectivePlaceholder() }}\r\n </span>\r\n <!--\r\n Only what fits is shown; the rest is collapsed into a count. The tooltip is the way to read\r\n the whole selection back, so it is bound only while something is actually hidden.\r\n -->\r\n @if (summary().hidden > 0) {\r\n <span class=\"gog-ms__overflow\" aria-hidden=\"true\">+{{ summary().hidden }}</span>\r\n }\r\n\r\n <span class=\"gog-ms__actions\">\r\n <span class=\"gog-ms__arrow\" [class.gog-ms__arrow--up]=\"isOpen()\" aria-hidden=\"true\">\r\n <gog-icon\r\n [template]=\"chevronSlot()?.templateRef ?? null\"\r\n [name]=\"isOpen() ? 'chevron-up' : 'chevron-down'\"\r\n />\r\n </span>\r\n @if (showClear()) {\r\n <button\r\n type=\"button\"\r\n class=\"gog-ms__clear gog-inline-center\"\r\n (click)=\"clearValue($event)\"\r\n [attr.aria-label]=\"resolvedClearLabel()\"\r\n >\r\n <gog-icon [template]=\"clearIconSlot()?.templateRef ?? null\" name=\"close\" />\r\n </button>\r\n }\r\n </span>\r\n </div>\r\n\r\n @if (isOpen() && !resolvedAppendToBody()) {\r\n <ng-container [ngTemplateOutlet]=\"panelTpl\" />\r\n }\r\n\r\n @if (visibleError()) {\r\n <span class=\"gog-ms__error\" role=\"alert\">{{ visibleError() }}</span>\r\n }\r\n</div>\r\n\r\n<!--\r\n One template for both render modes. When `appendToBody` is set it is stamped into\r\n <body> by the overlay, which is why the portal-only modifier and the resolved\r\n coordinates are applied conditionally: outside the component's subtree the panel can\r\n no longer inherit the size tokens from the `.gog-ms-wrapper--sm/--lg` wrapper.\r\n-->\r\n<ng-template #panelTpl>\r\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- (click) below is housekeeping stopPropagation, not an interactive handler; the focusable/keyboard-operable elements are the options inside -->\r\n <div\r\n [id]=\"listboxId()\"\r\n class=\"gog-ms__dropdown\"\r\n [class.gog-ms__dropdown--up]=\"!resolvedAppendToBody() && dropdownDirectionState() === 'up'\"\r\n [class.gog-ms__dropdown--portal]=\"resolvedAppendToBody()\"\r\n [class]=\"panelSizeClass()\"\r\n [style.top.px]=\"resolvedAppendToBody() ? panelPlacement()?.top : null\"\r\n [style.left.px]=\"resolvedAppendToBody() ? panelPlacement()?.left : null\"\r\n [style.width]=\"resolvedAppendToBody() ? resolvedPanelWidth() : null\"\r\n [style.min-width]=\"resolvedAppendToBody() ? resolvedPanelMinWidth() : null\"\r\n [style.max-height]=\"resolvedAppendToBody() ? resolvedPanelMaxHeight() : null\"\r\n [style.z-index]=\"dropdownZIndex() ?? panelZIndex()\"\r\n role=\"listbox\"\r\n aria-multiselectable=\"true\"\r\n [attr.aria-labelledby]=\"label() ? labelId() : null\"\r\n (click)=\"$event.stopPropagation()\"\r\n >\r\n @if (showControls() && controlsPosition() === 'top') {\r\n <ng-container [ngTemplateOutlet]=\"controlsRowTpl\" />\r\n }\r\n <!--\r\n Not a tab stop of its own: the listbox pattern's only stop is the trigger, with\r\n focus moved between options via the arrow keys (roving-focus.ts), which already\r\n scrolls the focused option into view natively \u2014 no separate keyboard-scroll target\r\n needed here.\r\n -->\r\n @if (resolvedFilter() && resolvedFilterPosition() === 'top') {\r\n <div class=\"gog-ms__filter gog-ms__filter--top\">\r\n <input\r\n type=\"text\"\r\n class=\"gog-ms__filter-input\"\r\n [placeholder]=\"filterPlaceholder()\"\r\n [value]=\"filterQuery()\"\r\n (input)=\"onFilterInput($event)\"\r\n (click)=\"$event.stopPropagation()\"\r\n (keydown.escape)=\"close(); focusTrigger()\"\r\n />\r\n </div>\r\n }\r\n <gog-scroll size=\"thin\" [focusable]=\"false\" overscrollBehavior=\"contain\" class=\"gog-ms__scroll\">\r\n <div class=\"gog-ms__options\">\r\n @if (visibleOptions().length === 0) {\r\n <p class=\"gog-ms__empty\">{{ filterEmptyMessage() }}</p>\r\n }\r\n @for (option of visibleOptions(); track valueOf(option)) {\r\n <!--\r\n tabindex=\"-1\" keeps the list to a single tab stop, as the listbox pattern\r\n expects: focus moves between options with the arrow keys, not by tabbing\r\n through every one. Programmatic .focus() still works on a negative tabindex.\r\n -->\r\n <button\r\n type=\"button\"\r\n class=\"gog-ms__option\"\r\n role=\"option\"\r\n tabindex=\"-1\"\r\n [attr.aria-selected]=\"isSelected(option)\"\r\n [attr.aria-disabled]=\"isOptionDisabled(option)\"\r\n [class.gog-ms__option--selected]=\"isSelected(option)\"\r\n [class.gog-ms__option--disabled]=\"isOptionDisabled(option)\"\r\n (click)=\"toggleOption(option, $event)\"\r\n (keydown)=\"onOptionKeydown($event)\"\r\n gogRipple\r\n [rippleDisabled]=\"!rippleEnabled()\"\r\n >\r\n @if (optionSlot(); as slot) {\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n slot.templateRef;\r\n context: optionContext(option, isSelected(option))\r\n \"\r\n />\r\n } @else {\r\n <span class=\"gog-ms__option-mark\" aria-hidden=\"true\">\r\n <gog-icon [name]=\"isSelected(option) ? 'checkbox-checked' : 'checkbox'\" />\r\n </span>\r\n {{ labelOf(option) }}\r\n }\r\n </button>\r\n }\r\n </div>\r\n </gog-scroll>\r\n @if (resolvedFilter() && resolvedFilterPosition() === 'bottom') {\r\n <div class=\"gog-ms__filter gog-ms__filter--bottom\">\r\n <input\r\n type=\"text\"\r\n class=\"gog-ms__filter-input\"\r\n [placeholder]=\"filterPlaceholder()\"\r\n [value]=\"filterQuery()\"\r\n (input)=\"onFilterInput($event)\"\r\n (click)=\"$event.stopPropagation()\"\r\n (keydown.escape)=\"close(); focusTrigger()\"\r\n />\r\n </div>\r\n }\r\n @if (showControls() && controlsPosition() === 'bottom') {\r\n <ng-container [ngTemplateOutlet]=\"controlsRowTpl\" />\r\n }\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #controlsRowTpl>\r\n <div class=\"gog-ms__controls\" [class.gog-ms__controls--bottom]=\"controlsPosition() === 'bottom'\">\r\n <gog-button variant=\"ghost\" size=\"sm\" (click)=\"selectAll($event)\">{{\r\n resolvedSelectAllLabel()\r\n }}</gog-button>\r\n <gog-button variant=\"ghost\" size=\"sm\" (click)=\"clearAll($event)\">{{\r\n resolvedClearAllLabel()\r\n }}</gog-button>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Full selection, shown as a tooltip when the trigger can only fit part of it. -->\r\n<ng-template #selectedListTpl>\r\n <ul class=\"gog-ms__tooltip-list\">\r\n @for (label of selectedLabels(); track label) {\r\n <li>{{ label }}</li>\r\n }\r\n </ul>\r\n</ng-template>\r\n", styles: ["@charset \"UTF-8\";.gog-ms-wrapper{display:flex;flex-direction:column;gap:var(--gog-multiselect-gap);position:relative;width:100%}:host(.gog-host--auto-width){width:fit-content}:host(.gog-host--auto-width) .gog-ms-wrapper{width:fit-content}.gog-ms-wrapper--xsm,.gog-ms__dropdown--xsm{--gog-multiselect-size-padding-y: var(--gog-field-xsm-padding-y);--gog-multiselect-size-padding-x: var(--gog-field-xsm-padding-x);--gog-multiselect-size-font-size: var(--gog-field-xsm-font-size)}.gog-ms-wrapper--sm,.gog-ms__dropdown--sm{--gog-multiselect-size-padding-y: var(--gog-field-sm-padding-y);--gog-multiselect-size-padding-x: var(--gog-field-sm-padding-x);--gog-multiselect-size-font-size: var(--gog-field-sm-font-size)}.gog-ms-wrapper--lg,.gog-ms__dropdown--lg{--gog-multiselect-size-padding-y: var(--gog-field-lg-padding-y);--gog-multiselect-size-padding-x: var(--gog-field-lg-padding-x);--gog-multiselect-size-font-size: var(--gog-field-lg-font-size)}.gog-ms-wrapper--slg,.gog-ms__dropdown--slg{--gog-multiselect-size-padding-y: var(--gog-field-slg-padding-y);--gog-multiselect-size-padding-x: var(--gog-field-slg-padding-x);--gog-multiselect-size-font-size: var(--gog-field-slg-font-size)}.gog-ms__label{font-family:var(--gog-multiselect-label-font-family);font-size:var(--gog-multiselect-label-font-size);color:var(--gog-multiselect-label-color);text-transform:var(--gog-multiselect-label-text-transform);letter-spacing:var(--gog-multiselect-label-letter-spacing);cursor:pointer}.gog-ms{position:relative;display:flex;align-items:center;justify-content:space-between;padding:var(--gog-multiselect-padding-y, var(--gog-multiselect-size-padding-y, var(--gog-field-md-padding-y))) var(--gog-multiselect-padding-x, var(--gog-multiselect-size-padding-x, var(--gog-field-md-padding-x)));background-color:var(--gog-multiselect-field-bg);border:var(--gog-multiselect-field-border-width) var(--gog-multiselect-field-border-style) var(--gog-multiselect-field-border);border-radius:var(--gog-multiselect-radius);color:var(--gog-multiselect-field-color);cursor:pointer;-webkit-user-select:none;user-select:none;transition:border-color var(--gog-multiselect-transition-duration) var(--gog-easing),box-shadow var(--gog-multiselect-transition-duration) var(--gog-easing)}.gog-ms:hover:not(.gog-ms--disabled){border-color:var(--gog-multiselect-focus-border)}.gog-ms:focus-visible{outline:var(--gog-multiselect-focus-ring-width) solid var(--gog-multiselect-focus-ring);outline-offset:var(--gog-multiselect-focus-ring-offset)}.gog-ms--open{border-color:var(--gog-multiselect-border-color);box-shadow:var(--gog-multiselect-focus-glow)}.gog-ms--disabled{opacity:var(--gog-multiselect-disabled-opacity);cursor:not-allowed}.gog-ms--disabled .gog-ms__label{cursor:not-allowed}.gog-ms--error{border-color:var(--gog-multiselect-error-color)}.gog-ms__value{font-family:var(--gog-multiselect-font-family);font-size:var(--gog-multiselect-font-size, var(--gog-multiselect-size-font-size, var(--gog-field-md-font-size)));flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--gog-multiselect-value-color)}.gog-ms__value--placeholder{color:var(--gog-multiselect-placeholder-color)}.gog-ms{padding-inline-end:var(--gog-multiselect-actions-inset)}.gog-ms__actions{display:flex;align-items:center;gap:var(--gog-multiselect-actions-gap);flex-shrink:0}.gog-ms__clear{width:var(--gog-multiselect-font-size, var(--gog-multiselect-size-font-size, var(--gog-field-md-font-size)));height:var(--gog-multiselect-font-size, var(--gog-multiselect-size-font-size, var(--gog-field-md-font-size)));padding:0;border:0;border-radius:var(--gog-multiselect-clear-radius);background:transparent;color:var(--gog-multiselect-placeholder-color);line-height:1;cursor:pointer;transition:color var(--gog-multiselect-transition-duration) var(--gog-easing)}.gog-ms__clear gog-icon{font-size:calc(var(--gog-multiselect-font-size, var(--gog-multiselect-size-font-size, var(--gog-field-md-font-size))) * var(--gog-multiselect-clear-icon-ratio))}.gog-ms__clear:hover{color:var(--gog-multiselect-field-color)}.gog-ms__clear:focus-visible{outline:var(--gog-multiselect-focus-ring-width) solid var(--gog-multiselect-focus-ring);outline-offset:var(--gog-multiselect-focus-ring-offset)}.gog-ms__arrow{color:var(--gog-multiselect-border-color);transition:transform var(--gog-multiselect-arrow-transition-duration) var(--gog-easing);display:inline-flex;align-items:center;justify-content:center;width:var(--gog-multiselect-font-size, var(--gog-multiselect-size-font-size, var(--gog-field-md-font-size)));height:var(--gog-multiselect-font-size, var(--gog-multiselect-size-font-size, var(--gog-field-md-font-size)))}.gog-ms__arrow gog-icon{font-size:calc(var(--gog-multiselect-font-size, var(--gog-multiselect-size-font-size, var(--gog-field-md-font-size))) * var(--gog-multiselect-arrow-icon-ratio))}.gog-ms__arrow--up{transform:rotate(180deg)}.gog-ms__dropdown{position:absolute;top:calc(100% + var(--gog-multiselect-panel-offset));inset-inline-start:0;inset-inline-end:auto;min-width:100%;width:max-content;max-width:var(--gog-multiselect-panel-max-width);z-index:var(--gog-dropdown-z);display:flex;flex-direction:column;background-color:var(--gog-multiselect-panel-bg);border:var(--gog-multiselect-field-border-width) var(--gog-multiselect-field-border-style) var(--gog-multiselect-panel-border);border-radius:var(--gog-multiselect-radius);max-height:var(--gog-multiselect-panel-max-height);overflow:hidden;box-shadow:var(--gog-multiselect-panel-shadow)}.gog-ms__scroll{flex:1;min-height:0}.gog-ms__dropdown--up{top:auto;bottom:calc(100% + var(--gog-multiselect-panel-offset))}.gog-ms__dropdown--portal{position:fixed;top:unset;bottom:unset;inset-inline:unset}.gog-ms__controls{flex-shrink:0;display:flex;gap:var(--gog-multiselect-controls-gap);padding:var(--gog-multiselect-controls-padding);background-color:var(--gog-multiselect-panel-bg);border-bottom:var(--gog-multiselect-field-border-width) var(--gog-multiselect-field-border-style) var(--gog-multiselect-field-border)}.gog-ms__controls--bottom{border-bottom:0;border-top:var(--gog-multiselect-field-border-width) var(--gog-multiselect-field-border-style) var(--gog-multiselect-field-border)}.gog-ms__options{display:flex;flex-direction:column;padding:var(--gog-multiselect-options-padding);gap:var(--gog-multiselect-option-gap)}.gog-ms__option{width:100%;display:flex;align-items:center;gap:var(--gog-multiselect-option-gap-inline);padding:var(--gog-multiselect-padding-y, var(--gog-multiselect-size-padding-y, var(--gog-field-md-padding-y))) var(--gog-multiselect-padding-x, var(--gog-multiselect-size-padding-x, var(--gog-field-md-padding-x)));border:0;background:transparent;text-align:start;font:inherit;font-family:var(--gog-multiselect-font-family);font-size:var(--gog-multiselect-font-size, var(--gog-multiselect-size-font-size, var(--gog-field-md-font-size)));cursor:pointer;border-radius:var(--gog-multiselect-option-radius);transition:background-color var(--gog-multiselect-option-transition-duration) var(--gog-easing);color:var(--gog-multiselect-option-color)}.gog-ms__option--disabled{opacity:var(--gog-multiselect-option-disabled-opacity);cursor:not-allowed}.gog-ms__option:hover{background-color:var(--gog-multiselect-option-hover-bg)}.gog-ms__option--selected{color:var(--gog-multiselect-border-color)}.gog-ms__option:focus-visible{outline:var(--gog-multiselect-focus-ring-width) solid var(--gog-multiselect-focus-ring);outline-offset:calc(var(--gog-multiselect-focus-ring-width) * -1)}.gog-ms__option-mark{display:flex;align-items:center;justify-content:center;width:calc(var(--gog-multiselect-font-size, var(--gog-multiselect-size-font-size, var(--gog-field-md-font-size))) * var(--gog-multiselect-mark-size-ratio));height:calc(var(--gog-multiselect-font-size, var(--gog-multiselect-size-font-size, var(--gog-field-md-font-size))) * var(--gog-multiselect-mark-size-ratio));flex-shrink:0;font-size:calc(var(--gog-multiselect-font-size, var(--gog-multiselect-size-font-size, var(--gog-field-md-font-size))) * var(--gog-multiselect-mark-icon-ratio));color:var(--gog-multiselect-checkbox-border)}.gog-ms__option--selected .gog-ms__option-mark{color:var(--gog-multiselect-checkbox-checked-bg)}.gog-ms__error{font-family:var(--gog-multiselect-font-family);font-size:var(--gog-multiselect-error-font-size);color:var(--gog-multiselect-error-color);margin-top:var(--gog-multiselect-error-offset)}.gog-ms__label--float{position:absolute;inset-inline-start:var(--gog-multiselect-padding-x, var(--gog-multiselect-size-padding-x, var(--gog-field-md-padding-x)));top:50%;transform:translateY(-50%);max-width:calc(100% - 2 * var(--gog-multiselect-padding-x, var(--gog-multiselect-size-padding-x, var(--gog-field-md-padding-x))));overflow:hidden;text-overflow:ellipsis;white-space:nowrap;pointer-events:none;cursor:default;color:var(--gog-multiselect-placeholder-color);font-size:var(--gog-multiselect-size-font-size, var(--gog-field-md-font-size));text-transform:none;letter-spacing:normal;transition:transform var(--gog-multiselect-transition-duration) var(--gog-easing),font-size var(--gog-multiselect-transition-duration) var(--gog-easing),color var(--gog-multiselect-transition-duration) var(--gog-easing),top var(--gog-multiselect-transition-duration) var(--gog-easing),background-color var(--gog-multiselect-transition-duration) var(--gog-easing)}.gog-ms-wrapper--float-in,.gog-ms-wrapper--float-on{--gog-multiselect-float-top-padding: calc(var(--gog-multiselect-padding-y, var(--gog-multiselect-size-padding-y, var(--gog-field-md-padding-y))) + var(--gog-multiselect-float-label-reserve))}.gog-ms-wrapper--float-in .gog-ms,.gog-ms-wrapper--float-on .gog-ms{padding-top:var(--gog-multiselect-float-top-padding)}.gog-ms-wrapper--float-in .gog-ms__label--float,.gog-ms-wrapper--float-on .gog-ms__label--float{top:var(--gog-multiselect-float-top-padding);transform:none}.gog-ms-wrapper--float-in.gog-ms-wrapper--floated .gog-ms__label--float{top:var(--gog-multiselect-float-label-in-top);transform:translateY(0);font-size:var(--gog-multiselect-label-font-size);color:var(--gog-multiselect-label-color);text-transform:var(--gog-multiselect-label-text-transform);letter-spacing:var(--gog-multiselect-label-letter-spacing)}.gog-ms-wrapper--float-on.gog-ms-wrapper--floated .gog-ms__label--float{top:0;transform:translateY(-50%);font-size:var(--gog-multiselect-label-font-size);color:var(--gog-multiselect-label-color);text-transform:var(--gog-multiselect-label-text-transform);letter-spacing:var(--gog-multiselect-label-letter-spacing);background-color:var(--gog-multiselect-float-label-on-bg, var(--gog-multiselect-field-bg));padding:0 4px;inset-inline-start:calc(var(--gog-multiselect-padding-x, var(--gog-multiselect-size-padding-x, var(--gog-field-md-padding-x))) - 4px)}.gog-ms-wrapper--float-over.gog-ms-wrapper--floated .gog-ms__label--float{top:calc(-1 * var(--gog-multiselect-float-label-over-gap));transform:translateY(-100%);font-size:var(--gog-multiselect-label-font-size);color:var(--gog-multiselect-label-color);text-transform:var(--gog-multiselect-label-text-transform);letter-spacing:var(--gog-multiselect-label-letter-spacing)}.gog-ms-wrapper--float-over .gog-ms{margin-top:var(--gog-multiselect-float-label-over-reserve)}@media(prefers-reduced-motion:reduce){.gog-ms,.gog-ms__clear,.gog-ms__arrow,.gog-ms__option,.gog-ms__option-mark,.gog-ms__label--float{transition:none}}.gog-ms__filter{position:sticky;top:0;z-index:1;padding:var(--gog-multiselect-filter-padding);background:var(--gog-multiselect-panel-bg)}.gog-ms__filter-input{width:100%;padding:var(--gog-multiselect-filter-input-padding-y) var(--gog-multiselect-filter-input-padding-x);font-family:var(--gog-multiselect-font-family);font-size:var(--gog-multiselect-font-size, var(--gog-multiselect-size-font-size, var(--gog-field-md-font-size)));color:var(--gog-multiselect-filter-input-color);background:var(--gog-multiselect-filter-input-bg);border:var(--gog-control-border-width) var(--gog-control-border-style) var(--gog-multiselect-filter-input-border);border-radius:var(--gog-multiselect-filter-input-radius);outline:none}.gog-ms__filter-input:focus{border-color:var(--gog-multiselect-focus-border)}.gog-ms__empty{margin:0;padding:var(--gog-multiselect-filter-empty-padding);font-family:var(--gog-multiselect-font-family);font-size:var(--gog-multiselect-font-size, var(--gog-multiselect-size-font-size, var(--gog-field-md-font-size)));color:var(--gog-multiselect-filter-empty-color);text-align:center}.gog-ms__filter--top{border-bottom:var(--gog-multiselect-filter-border-width) var(--gog-multiselect-filter-border-style) var(--gog-multiselect-filter-border-color)}.gog-ms__filter--bottom{top:auto;bottom:0;border-top:var(--gog-multiselect-filter-border-width) var(--gog-multiselect-filter-border-style) var(--gog-multiselect-filter-border-color)}:host(.gog-host--auto-width),:host(.gog-host--auto-width) .gog-ms{min-width:var(--gog-multiselect-min-width)}.gog-ms__dropdown--portal{max-width:var(--gog-multiselect-panel-max-width)}.gog-ms__overflow{flex-shrink:0;margin-inline-start:var(--gog-multiselect-overflow-gap);font-size:var(--gog-multiselect-overflow-font-size);color:var(--gog-multiselect-overflow-color)}.gog-ms__tooltip-list{margin:0;padding-inline-start:1.1em;text-align:start}\n"], dependencies: [{ kind: "component", type: ButtonComponent, selector: "gog-button", inputs: ["variant", "size", "disabled", "fullWidth", "type", "loading", "ripple", "debounce", "ariaLabel"], outputs: ["gogClick"] }, { kind: "directive", type: GogRippleDirective, selector: "[gogRipple]", inputs: ["rippleDisabled", "rippleCentred"] }, { kind: "component", type: IconComponent, selector: "gog-icon", inputs: ["name", "template", "title", "ariaHidden"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ScrollComponent, selector: "gog-scroll", inputs: ["axis", "size", "autoHide", "hideDelay", "reachThreshold", "focusable", "ariaLabel", "overscrollBehavior", "showTrack"], outputs: ["gogScroll", "gogReachStart", "gogReachEnd"] }, { kind: "directive", type: GogTooltipDirective, selector: "[gogTooltip]", inputs: ["gogTooltip", "gogTooltipPosition", "gogTooltipShowDelay", "gogTooltipHideDelay", "gogTooltipDisabled", "gogTooltipClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
7130
7900
|
}
|
|
7131
7901
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: MultiselectComponent, decorators: [{
|
|
7132
7902
|
type: Component,
|
|
7133
|
-
args: [{ selector: 'gog-multiselect', imports: [
|
|
7903
|
+
args: [{ selector: 'gog-multiselect', imports: [
|
|
7904
|
+
ButtonComponent,
|
|
7905
|
+
GogRippleDirective,
|
|
7906
|
+
IconComponent,
|
|
7907
|
+
NgTemplateOutlet,
|
|
7908
|
+
ScrollComponent,
|
|
7909
|
+
GogTooltipDirective,
|
|
7910
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
7134
7911
|
// Only bites when the control has opted out of full width; otherwise the container decides.
|
|
7135
7912
|
'[style.--gog-multiselect-min-width]': 'minWidth()',
|
|
7136
|
-
}, template: "<!--\r\n Deliberately not `gog-contained-layout`: `contain: layout` makes this element a stacking\r\n context, which traps the panel's z-index inside it and lets whatever follows on the page\r\n paint over the open dropdown.\r\n-->\r\n<div\r\n class=\"gog-ms-wrapper\"\r\n [class]=\"sizeClass()\"\r\n [class.gog-ms-wrapper--float-in]=\"resolvedFloatLabel() === 'in'\"\r\n [class.gog-ms-wrapper--float-on]=\"resolvedFloatLabel() === 'on'\"\r\n [class.gog-ms-wrapper--float-over]=\"resolvedFloatLabel() === 'over'\"\r\n [class.gog-ms-wrapper--floated]=\"isFloatLabelFloated()\"\r\n>\r\n <!--\r\n Associated with aria-labelledby rather than `for`: the trigger is a div with\r\n role=\"combobox\", not a labelable element. Without this the trigger had no accessible\r\n name at all whenever `label` was set, because that also suppresses the aria-label.\r\n -->\r\n @if (label() && resolvedFloatLabel() === 'none') {\r\n <!-- eslint-disable-next-line @angular-eslint/template/label-has-associated-control -- associated via aria-labelledby above instead, see comment -->\r\n <label class=\"gog-ms__label\" [id]=\"labelId()\">{{ label() }}</label>\r\n }\r\n\r\n <div\r\n [gogTooltip]=\"summary().hidden > 0 ? selectedListTpl : null\"\r\n class=\"gog-ms\"\r\n role=\"combobox\"\r\n [attr.tabindex]=\"isDisabled() ? -1 : 0\"\r\n [attr.aria-expanded]=\"isOpen()\"\r\n aria-haspopup=\"listbox\"\r\n [attr.aria-controls]=\"listboxId()\"\r\n [attr.aria-disabled]=\"isDisabled()\"\r\n [attr.aria-labelledby]=\"label() ? labelId() : null\"\r\n [attr.aria-label]=\"label() ? null : ariaLabel() || placeholder() || 'Select'\"\r\n [class.gog-ms--open]=\"isOpen()\"\r\n [class.gog-ms--disabled]=\"isDisabled()\"\r\n [class.gog-ms--error]=\"hasError()\"\r\n (click)=\"toggle()\"\r\n (focus)=\"onFocusIn()\"\r\n (blur)=\"onFocusOut()\"\r\n (keydown.enter)=\"toggle(); $event.preventDefault()\"\r\n (keydown.space)=\"toggle(); $event.preventDefault()\"\r\n (keydown.escape)=\"close()\"\r\n (keydown.arrowdown)=\"onTriggerArrowKeydown($event)\"\r\n (keydown.arrowup)=\"onTriggerArrowKeydown($event)\"\r\n >\r\n @if (label() && isFloatLabelActive()) {\r\n <!-- eslint-disable-next-line @angular-eslint/template/label-has-associated-control -- associated via aria-labelledby above instead, see comment -->\r\n <label class=\"gog-ms__label gog-ms__label--float\" [id]=\"labelId()\">{{ label() }}</label>\r\n }\r\n <span #valueEl class=\"gog-ms__value\" [class.gog-ms__value--placeholder]=\"!selectedNames()\">\r\n {{ summary().text || effectivePlaceholder() }}\r\n </span>\r\n <!--\r\n Only what fits is shown; the rest is collapsed into a count. The tooltip is the way to read\r\n the whole selection back, so it is bound only while something is actually hidden.\r\n -->\r\n @if (summary().hidden > 0) {\r\n <span class=\"gog-ms__overflow\" aria-hidden=\"true\">+{{ summary().hidden }}</span>\r\n }\r\n\r\n <span class=\"gog-ms__actions\">\r\n <span class=\"gog-ms__arrow\" [class.gog-ms__arrow--up]=\"isOpen()\" aria-hidden=\"true\">\r\n <gog-icon\r\n [template]=\"chevronSlot()?.templateRef ?? null\"\r\n [name]=\"isOpen() ? 'chevron-up' : 'chevron-down'\"\r\n />\r\n </span>\r\n @if (showClear()) {\r\n <button\r\n type=\"button\"\r\n class=\"gog-ms__clear gog-inline-center\"\r\n (click)=\"clearValue($event)\"\r\n [attr.aria-label]=\"resolvedClearLabel()\"\r\n >\r\n <gog-icon [template]=\"clearIconSlot()?.templateRef ?? null\" name=\"close\" />\r\n </button>\r\n }\r\n </span>\r\n </div>\r\n\r\n @if (isOpen() && !resolvedAppendToBody()) {\r\n <ng-container [ngTemplateOutlet]=\"panelTpl\" />\r\n }\r\n\r\n @if (visibleError()) {\r\n <span class=\"gog-ms__error\" role=\"alert\">{{ visibleError() }}</span>\r\n }\r\n</div>\r\n\r\n<!--\r\n One template for both render modes. When `appendToBody` is set it is stamped into\r\n <body> by the overlay, which is why the portal-only modifier and the resolved\r\n coordinates are applied conditionally: outside the component's subtree the panel can\r\n no longer inherit the size tokens from the `.gog-ms-wrapper--sm/--lg` wrapper.\r\n-->\r\n<ng-template #panelTpl>\r\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- (click) below is housekeeping stopPropagation, not an interactive handler; the focusable/keyboard-operable elements are the options inside -->\r\n <div\r\n [id]=\"listboxId()\"\r\n class=\"gog-ms__dropdown\"\r\n [class.gog-ms__dropdown--up]=\"!resolvedAppendToBody() && dropdownDirectionState() === 'up'\"\r\n [class.gog-ms__dropdown--portal]=\"resolvedAppendToBody()\"\r\n [class]=\"panelSizeClass()\"\r\n [style.top.px]=\"resolvedAppendToBody() ? panelPlacement()?.top : null\"\r\n [style.left.px]=\"resolvedAppendToBody() ? panelPlacement()?.left : null\"\r\n [style.width]=\"resolvedAppendToBody() ? resolvedPanelWidth() : null\"\r\n [style.min-width]=\"resolvedAppendToBody() ? resolvedPanelMinWidth() : null\"\r\n [style.max-height]=\"resolvedAppendToBody() ? resolvedPanelMaxHeight() : null\"\r\n [style.z-index]=\"dropdownZIndex() ?? panelZIndex()\"\r\n role=\"listbox\"\r\n aria-multiselectable=\"true\"\r\n [attr.aria-labelledby]=\"label() ? labelId() : null\"\r\n (click)=\"$event.stopPropagation()\"\r\n >\r\n @if (showControls() && controlsPosition() === 'top') {\r\n <ng-container [ngTemplateOutlet]=\"controlsRowTpl\" />\r\n }\r\n <!--\r\n Not a tab stop of its own: the listbox pattern's only stop is the trigger, with\r\n focus moved between options via the arrow keys (roving-focus.ts), which already\r\n scrolls the focused option into view natively \u2014 no separate keyboard-scroll target\r\n needed here.\r\n -->\r\n @if (resolvedFilter() && resolvedFilterPosition() === 'top') {\r\n <div class=\"gog-ms__filter gog-ms__filter--top\">\r\n <input\r\n type=\"text\"\r\n class=\"gog-ms__filter-input\"\r\n [placeholder]=\"filterPlaceholder()\"\r\n [value]=\"filterQuery()\"\r\n (input)=\"onFilterInput($event)\"\r\n (click)=\"$event.stopPropagation()\"\r\n (keydown.escape)=\"close(); focusTrigger()\"\r\n />\r\n </div>\r\n }\r\n <gog-scroll size=\"thin\" [focusable]=\"false\" overscrollBehavior=\"contain\" class=\"gog-ms__scroll\">\r\n <div class=\"gog-ms__options\">\r\n @if (visibleOptions().length === 0) {\r\n <p class=\"gog-ms__empty\">{{ filterEmptyMessage() }}</p>\r\n }\r\n @for (option of visibleOptions(); track valueOf(option)) {\r\n <!--\r\n tabindex=\"-1\" keeps the list to a single tab stop, as the listbox pattern\r\n expects: focus moves between options with the arrow keys, not by tabbing\r\n through every one. Programmatic .focus() still works on a negative tabindex.\r\n -->\r\n <button\r\n type=\"button\"\r\n class=\"gog-ms__option\"\r\n role=\"option\"\r\n tabindex=\"-1\"\r\n [attr.aria-selected]=\"isSelected(option)\"\r\n [attr.aria-disabled]=\"isOptionDisabled(option)\"\r\n [class.gog-ms__option--selected]=\"isSelected(option)\"\r\n [class.gog-ms__option--disabled]=\"isOptionDisabled(option)\"\r\n (click)=\"toggleOption(option, $event)\"\r\n (keydown)=\"onOptionKeydown($event)\"\r\n >\r\n @if (optionSlot(); as slot) {\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n slot.templateRef;\r\n context: optionContext(option, isSelected(option))\r\n \"\r\n />\r\n } @else {\r\n <span class=\"gog-ms__option-mark\" aria-hidden=\"true\">\r\n <gog-icon [name]=\"isSelected(option) ? 'checkbox-checked' : 'checkbox'\" />\r\n </span>\r\n {{ labelOf(option) }}\r\n }\r\n </button>\r\n }\r\n </div>\r\n </gog-scroll>\r\n @if (resolvedFilter() && resolvedFilterPosition() === 'bottom') {\r\n <div class=\"gog-ms__filter gog-ms__filter--bottom\">\r\n <input\r\n type=\"text\"\r\n class=\"gog-ms__filter-input\"\r\n [placeholder]=\"filterPlaceholder()\"\r\n [value]=\"filterQuery()\"\r\n (input)=\"onFilterInput($event)\"\r\n (click)=\"$event.stopPropagation()\"\r\n (keydown.escape)=\"close(); focusTrigger()\"\r\n />\r\n </div>\r\n }\r\n @if (showControls() && controlsPosition() === 'bottom') {\r\n <ng-container [ngTemplateOutlet]=\"controlsRowTpl\" />\r\n }\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #controlsRowTpl>\r\n <div class=\"gog-ms__controls\" [class.gog-ms__controls--bottom]=\"controlsPosition() === 'bottom'\">\r\n <gog-button variant=\"ghost\" size=\"sm\" (click)=\"selectAll($event)\">{{\r\n resolvedSelectAllLabel()\r\n }}</gog-button>\r\n <gog-button variant=\"ghost\" size=\"sm\" (click)=\"clearAll($event)\">{{\r\n resolvedClearAllLabel()\r\n }}</gog-button>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Full selection, shown as a tooltip when the trigger can only fit part of it. -->\r\n<ng-template #selectedListTpl>\r\n <ul class=\"gog-ms__tooltip-list\">\r\n @for (label of selectedLabels(); track label) {\r\n <li>{{ label }}</li>\r\n }\r\n </ul>\r\n</ng-template>\r\n", styles: ["@charset \"UTF-8\";.gog-ms-wrapper{display:flex;flex-direction:column;gap:var(--gog-multiselect-gap);position:relative;width:100%}:host(.gog-host--auto-width){width:fit-content}:host(.gog-host--auto-width) .gog-ms-wrapper{width:fit-content}.gog-ms-wrapper--xsm,.gog-ms__dropdown--xsm{--gog-multiselect-size-padding-y: var(--gog-field-xsm-padding-y);--gog-multiselect-size-padding-x: var(--gog-field-xsm-padding-x);--gog-multiselect-size-font-size: var(--gog-field-xsm-font-size)}.gog-ms-wrapper--sm,.gog-ms__dropdown--sm{--gog-multiselect-size-padding-y: var(--gog-field-sm-padding-y);--gog-multiselect-size-padding-x: var(--gog-field-sm-padding-x);--gog-multiselect-size-font-size: var(--gog-field-sm-font-size)}.gog-ms-wrapper--lg,.gog-ms__dropdown--lg{--gog-multiselect-size-padding-y: var(--gog-field-lg-padding-y);--gog-multiselect-size-padding-x: var(--gog-field-lg-padding-x);--gog-multiselect-size-font-size: var(--gog-field-lg-font-size)}.gog-ms-wrapper--slg,.gog-ms__dropdown--slg{--gog-multiselect-size-padding-y: var(--gog-field-slg-padding-y);--gog-multiselect-size-padding-x: var(--gog-field-slg-padding-x);--gog-multiselect-size-font-size: var(--gog-field-slg-font-size)}.gog-ms__label{font-family:var(--gog-multiselect-label-font-family);font-size:var(--gog-multiselect-label-font-size);color:var(--gog-multiselect-label-color);text-transform:var(--gog-multiselect-label-text-transform);letter-spacing:var(--gog-multiselect-label-letter-spacing);cursor:pointer}.gog-ms{position:relative;display:flex;align-items:center;justify-content:space-between;padding:var(--gog-multiselect-padding-y, var(--gog-multiselect-size-padding-y, var(--gog-field-md-padding-y))) var(--gog-multiselect-padding-x, var(--gog-multiselect-size-padding-x, var(--gog-field-md-padding-x)));background-color:var(--gog-multiselect-field-bg);border:var(--gog-multiselect-field-border-width) var(--gog-multiselect-field-border-style) var(--gog-multiselect-field-border);border-radius:var(--gog-multiselect-radius);color:var(--gog-multiselect-field-color);cursor:pointer;-webkit-user-select:none;user-select:none;transition:border-color var(--gog-multiselect-transition-duration) var(--gog-easing),box-shadow var(--gog-multiselect-transition-duration) var(--gog-easing)}.gog-ms:hover:not(.gog-ms--disabled){border-color:var(--gog-multiselect-focus-border)}.gog-ms:focus-visible{outline:var(--gog-multiselect-focus-ring-width) solid var(--gog-multiselect-focus-ring);outline-offset:var(--gog-multiselect-focus-ring-offset)}.gog-ms--open{border-color:var(--gog-multiselect-border-color);box-shadow:var(--gog-multiselect-focus-glow)}.gog-ms--disabled{opacity:var(--gog-multiselect-disabled-opacity);cursor:not-allowed}.gog-ms--disabled .gog-ms__label{cursor:not-allowed}.gog-ms--error{border-color:var(--gog-multiselect-error-color)}.gog-ms__value{font-family:var(--gog-multiselect-font-family);font-size:var(--gog-multiselect-font-size, var(--gog-multiselect-size-font-size, var(--gog-field-md-font-size)));flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--gog-multiselect-value-color)}.gog-ms__value--placeholder{color:var(--gog-multiselect-placeholder-color)}.gog-ms{padding-inline-end:var(--gog-multiselect-actions-inset)}.gog-ms__actions{display:flex;align-items:center;gap:var(--gog-multiselect-actions-gap);flex-shrink:0}.gog-ms__clear{width:var(--gog-multiselect-font-size, var(--gog-multiselect-size-font-size, var(--gog-field-md-font-size)));height:var(--gog-multiselect-font-size, var(--gog-multiselect-size-font-size, var(--gog-field-md-font-size)));padding:0;border:0;border-radius:var(--gog-multiselect-clear-radius);background:transparent;color:var(--gog-multiselect-placeholder-color);line-height:1;cursor:pointer;transition:color var(--gog-multiselect-transition-duration) var(--gog-easing)}.gog-ms__clear gog-icon{font-size:calc(var(--gog-multiselect-font-size, var(--gog-multiselect-size-font-size, var(--gog-field-md-font-size))) * var(--gog-multiselect-clear-icon-ratio))}.gog-ms__clear:hover{color:var(--gog-multiselect-field-color)}.gog-ms__clear:focus-visible{outline:var(--gog-multiselect-focus-ring-width) solid var(--gog-multiselect-focus-ring);outline-offset:var(--gog-multiselect-focus-ring-offset)}.gog-ms__arrow{color:var(--gog-multiselect-border-color);transition:transform var(--gog-multiselect-arrow-transition-duration) var(--gog-easing);display:inline-flex;align-items:center;justify-content:center;width:var(--gog-multiselect-font-size, var(--gog-multiselect-size-font-size, var(--gog-field-md-font-size)));height:var(--gog-multiselect-font-size, var(--gog-multiselect-size-font-size, var(--gog-field-md-font-size)))}.gog-ms__arrow gog-icon{font-size:calc(var(--gog-multiselect-font-size, var(--gog-multiselect-size-font-size, var(--gog-field-md-font-size))) * var(--gog-multiselect-arrow-icon-ratio))}.gog-ms__arrow--up{transform:rotate(180deg)}.gog-ms__dropdown{position:absolute;top:calc(100% + var(--gog-multiselect-panel-offset));inset-inline-start:0;inset-inline-end:auto;min-width:100%;width:max-content;max-width:var(--gog-multiselect-panel-max-width);z-index:var(--gog-dropdown-z);display:flex;flex-direction:column;background-color:var(--gog-multiselect-panel-bg);border:var(--gog-multiselect-field-border-width) var(--gog-multiselect-field-border-style) var(--gog-multiselect-panel-border);border-radius:var(--gog-multiselect-radius);max-height:var(--gog-multiselect-panel-max-height);overflow:hidden;box-shadow:var(--gog-multiselect-panel-shadow)}.gog-ms__scroll{flex:1;min-height:0}.gog-ms__dropdown--up{top:auto;bottom:calc(100% + var(--gog-multiselect-panel-offset))}.gog-ms__dropdown--portal{position:fixed;top:unset;bottom:unset;inset-inline:unset}.gog-ms__controls{flex-shrink:0;display:flex;gap:var(--gog-multiselect-controls-gap);padding:var(--gog-multiselect-controls-padding);background-color:var(--gog-multiselect-panel-bg);border-bottom:var(--gog-multiselect-field-border-width) var(--gog-multiselect-field-border-style) var(--gog-multiselect-field-border)}.gog-ms__controls--bottom{border-bottom:0;border-top:var(--gog-multiselect-field-border-width) var(--gog-multiselect-field-border-style) var(--gog-multiselect-field-border)}.gog-ms__options{display:flex;flex-direction:column;padding:var(--gog-multiselect-options-padding);gap:var(--gog-multiselect-option-gap)}.gog-ms__option{width:100%;display:flex;align-items:center;gap:var(--gog-multiselect-option-gap-inline);padding:var(--gog-multiselect-padding-y, var(--gog-multiselect-size-padding-y, var(--gog-field-md-padding-y))) var(--gog-multiselect-padding-x, var(--gog-multiselect-size-padding-x, var(--gog-field-md-padding-x)));border:0;background:transparent;text-align:start;font:inherit;font-family:var(--gog-multiselect-font-family);font-size:var(--gog-multiselect-font-size, var(--gog-multiselect-size-font-size, var(--gog-field-md-font-size)));cursor:pointer;border-radius:var(--gog-multiselect-option-radius);transition:background-color var(--gog-multiselect-option-transition-duration) var(--gog-easing);color:var(--gog-multiselect-option-color)}.gog-ms__option--disabled{opacity:var(--gog-multiselect-option-disabled-opacity);cursor:not-allowed}.gog-ms__option:hover{background-color:var(--gog-multiselect-option-hover-bg)}.gog-ms__option--selected{color:var(--gog-multiselect-border-color)}.gog-ms__option:focus-visible{outline:var(--gog-multiselect-focus-ring-width) solid var(--gog-multiselect-focus-ring);outline-offset:calc(var(--gog-multiselect-focus-ring-width) * -1)}.gog-ms__option-mark{display:flex;align-items:center;justify-content:center;width:calc(var(--gog-multiselect-font-size, var(--gog-multiselect-size-font-size, var(--gog-field-md-font-size))) * var(--gog-multiselect-mark-size-ratio));height:calc(var(--gog-multiselect-font-size, var(--gog-multiselect-size-font-size, var(--gog-field-md-font-size))) * var(--gog-multiselect-mark-size-ratio));flex-shrink:0;font-size:calc(var(--gog-multiselect-font-size, var(--gog-multiselect-size-font-size, var(--gog-field-md-font-size))) * var(--gog-multiselect-mark-icon-ratio));color:var(--gog-multiselect-checkbox-border)}.gog-ms__option--selected .gog-ms__option-mark{color:var(--gog-multiselect-checkbox-checked-bg)}.gog-ms__error{font-family:var(--gog-multiselect-font-family);font-size:var(--gog-multiselect-error-font-size);color:var(--gog-multiselect-error-color);margin-top:var(--gog-multiselect-error-offset)}.gog-ms__label--float{position:absolute;inset-inline-start:var(--gog-multiselect-padding-x, var(--gog-multiselect-size-padding-x, var(--gog-field-md-padding-x)));top:50%;transform:translateY(-50%);max-width:calc(100% - 2 * var(--gog-multiselect-padding-x, var(--gog-multiselect-size-padding-x, var(--gog-field-md-padding-x))));overflow:hidden;text-overflow:ellipsis;white-space:nowrap;pointer-events:none;cursor:default;color:var(--gog-multiselect-placeholder-color);font-size:var(--gog-multiselect-size-font-size, var(--gog-field-md-font-size));text-transform:none;letter-spacing:normal;transition:transform var(--gog-multiselect-transition-duration) var(--gog-easing),font-size var(--gog-multiselect-transition-duration) var(--gog-easing),color var(--gog-multiselect-transition-duration) var(--gog-easing),top var(--gog-multiselect-transition-duration) var(--gog-easing),background-color var(--gog-multiselect-transition-duration) var(--gog-easing)}.gog-ms-wrapper--float-in,.gog-ms-wrapper--float-on{--gog-multiselect-float-top-padding: calc(var(--gog-multiselect-padding-y, var(--gog-multiselect-size-padding-y, var(--gog-field-md-padding-y))) + var(--gog-multiselect-float-label-reserve))}.gog-ms-wrapper--float-in .gog-ms,.gog-ms-wrapper--float-on .gog-ms{padding-top:var(--gog-multiselect-float-top-padding)}.gog-ms-wrapper--float-in .gog-ms__label--float,.gog-ms-wrapper--float-on .gog-ms__label--float{top:var(--gog-multiselect-float-top-padding);transform:none}.gog-ms-wrapper--float-in.gog-ms-wrapper--floated .gog-ms__label--float{top:var(--gog-multiselect-float-label-in-top);transform:translateY(0);font-size:var(--gog-multiselect-label-font-size);color:var(--gog-multiselect-label-color);text-transform:var(--gog-multiselect-label-text-transform);letter-spacing:var(--gog-multiselect-label-letter-spacing)}.gog-ms-wrapper--float-on.gog-ms-wrapper--floated .gog-ms__label--float{top:0;transform:translateY(-50%);font-size:var(--gog-multiselect-label-font-size);color:var(--gog-multiselect-label-color);text-transform:var(--gog-multiselect-label-text-transform);letter-spacing:var(--gog-multiselect-label-letter-spacing);background-color:var(--gog-multiselect-float-label-on-bg, var(--gog-multiselect-field-bg));padding:0 4px;inset-inline-start:calc(var(--gog-multiselect-padding-x, var(--gog-multiselect-size-padding-x, var(--gog-field-md-padding-x))) - 4px)}.gog-ms-wrapper--float-over.gog-ms-wrapper--floated .gog-ms__label--float{top:calc(-1 * var(--gog-multiselect-float-label-over-gap));transform:translateY(-100%);font-size:var(--gog-multiselect-label-font-size);color:var(--gog-multiselect-label-color);text-transform:var(--gog-multiselect-label-text-transform);letter-spacing:var(--gog-multiselect-label-letter-spacing)}.gog-ms-wrapper--float-over .gog-ms{margin-top:var(--gog-multiselect-float-label-over-reserve)}@media(prefers-reduced-motion:reduce){.gog-ms,.gog-ms__clear,.gog-ms__arrow,.gog-ms__option,.gog-ms__option-mark,.gog-ms__label--float{transition:none}}.gog-ms__filter{position:sticky;top:0;z-index:1;padding:var(--gog-multiselect-filter-padding);background:var(--gog-multiselect-panel-bg)}.gog-ms__filter-input{width:100%;padding:var(--gog-multiselect-filter-input-padding-y) var(--gog-multiselect-filter-input-padding-x);font-family:var(--gog-multiselect-font-family);font-size:var(--gog-multiselect-font-size, var(--gog-multiselect-size-font-size, var(--gog-field-md-font-size)));color:var(--gog-multiselect-filter-input-color);background:var(--gog-multiselect-filter-input-bg);border:var(--gog-control-border-width) var(--gog-control-border-style) var(--gog-multiselect-filter-input-border);border-radius:var(--gog-multiselect-filter-input-radius);outline:none}.gog-ms__filter-input:focus{border-color:var(--gog-multiselect-focus-border)}.gog-ms__empty{margin:0;padding:var(--gog-multiselect-filter-empty-padding);font-family:var(--gog-multiselect-font-family);font-size:var(--gog-multiselect-font-size, var(--gog-multiselect-size-font-size, var(--gog-field-md-font-size)));color:var(--gog-multiselect-filter-empty-color);text-align:center}.gog-ms__filter--top{border-bottom:var(--gog-multiselect-filter-border-width) var(--gog-multiselect-filter-border-style) var(--gog-multiselect-filter-border-color)}.gog-ms__filter--bottom{top:auto;bottom:0;border-top:var(--gog-multiselect-filter-border-width) var(--gog-multiselect-filter-border-style) var(--gog-multiselect-filter-border-color)}:host(.gog-host--auto-width),:host(.gog-host--auto-width) .gog-ms{min-width:var(--gog-multiselect-min-width)}.gog-ms__dropdown--portal{max-width:var(--gog-multiselect-panel-max-width)}.gog-ms__overflow{flex-shrink:0;margin-inline-start:var(--gog-multiselect-overflow-gap);font-size:var(--gog-multiselect-overflow-font-size);color:var(--gog-multiselect-overflow-color)}.gog-ms__tooltip-list{margin:0;padding-inline-start:1.1em;text-align:start}\n"] }]
|
|
7913
|
+
}, template: "<!--\r\n Deliberately not `gog-contained-layout`: `contain: layout` makes this element a stacking\r\n context, which traps the panel's z-index inside it and lets whatever follows on the page\r\n paint over the open dropdown.\r\n-->\r\n<div\r\n class=\"gog-ms-wrapper\"\r\n [class]=\"sizeClass()\"\r\n [class.gog-ms-wrapper--float-in]=\"resolvedFloatLabel() === 'in'\"\r\n [class.gog-ms-wrapper--float-on]=\"resolvedFloatLabel() === 'on'\"\r\n [class.gog-ms-wrapper--float-over]=\"resolvedFloatLabel() === 'over'\"\r\n [class.gog-ms-wrapper--floated]=\"isFloatLabelFloated()\"\r\n>\r\n <!--\r\n Associated with aria-labelledby rather than `for`: the trigger is a div with\r\n role=\"combobox\", not a labelable element. Without this the trigger had no accessible\r\n name at all whenever `label` was set, because that also suppresses the aria-label.\r\n -->\r\n @if (label() && resolvedFloatLabel() === 'none') {\r\n <!-- eslint-disable-next-line @angular-eslint/template/label-has-associated-control -- associated via aria-labelledby above instead, see comment -->\r\n <label class=\"gog-ms__label\" [id]=\"labelId()\">{{ label() }}</label>\r\n }\r\n\r\n <div\r\n [gogTooltip]=\"summary().hidden > 0 ? selectedListTpl : null\"\r\n class=\"gog-ms\"\r\n role=\"combobox\"\r\n [attr.tabindex]=\"isDisabled() ? -1 : 0\"\r\n [attr.aria-expanded]=\"isOpen()\"\r\n aria-haspopup=\"listbox\"\r\n [attr.aria-controls]=\"listboxId()\"\r\n [attr.aria-disabled]=\"isDisabled()\"\r\n [attr.aria-labelledby]=\"label() ? labelId() : null\"\r\n [attr.aria-label]=\"label() ? null : ariaLabel() || placeholder() || 'Select'\"\r\n [class.gog-ms--open]=\"isOpen()\"\r\n [class.gog-ms--disabled]=\"isDisabled()\"\r\n [class.gog-ms--error]=\"hasError()\"\r\n (click)=\"toggle()\"\r\n (focus)=\"onFocusIn()\"\r\n (blur)=\"onFocusOut()\"\r\n (keydown.enter)=\"toggle(); $event.preventDefault()\"\r\n (keydown.space)=\"toggle(); $event.preventDefault()\"\r\n (keydown.escape)=\"close()\"\r\n (keydown.arrowdown)=\"onTriggerArrowKeydown($event)\"\r\n (keydown.arrowup)=\"onTriggerArrowKeydown($event)\"\r\n >\r\n @if (label() && isFloatLabelActive()) {\r\n <!-- eslint-disable-next-line @angular-eslint/template/label-has-associated-control -- associated via aria-labelledby above instead, see comment -->\r\n <label class=\"gog-ms__label gog-ms__label--float\" [id]=\"labelId()\">{{ label() }}</label>\r\n }\r\n <span #valueEl class=\"gog-ms__value\" [class.gog-ms__value--placeholder]=\"!selectedNames()\">\r\n {{ summary().text || effectivePlaceholder() }}\r\n </span>\r\n <!--\r\n Only what fits is shown; the rest is collapsed into a count. The tooltip is the way to read\r\n the whole selection back, so it is bound only while something is actually hidden.\r\n -->\r\n @if (summary().hidden > 0) {\r\n <span class=\"gog-ms__overflow\" aria-hidden=\"true\">+{{ summary().hidden }}</span>\r\n }\r\n\r\n <span class=\"gog-ms__actions\">\r\n <span class=\"gog-ms__arrow\" [class.gog-ms__arrow--up]=\"isOpen()\" aria-hidden=\"true\">\r\n <gog-icon\r\n [template]=\"chevronSlot()?.templateRef ?? null\"\r\n [name]=\"isOpen() ? 'chevron-up' : 'chevron-down'\"\r\n />\r\n </span>\r\n @if (showClear()) {\r\n <button\r\n type=\"button\"\r\n class=\"gog-ms__clear gog-inline-center\"\r\n (click)=\"clearValue($event)\"\r\n [attr.aria-label]=\"resolvedClearLabel()\"\r\n >\r\n <gog-icon [template]=\"clearIconSlot()?.templateRef ?? null\" name=\"close\" />\r\n </button>\r\n }\r\n </span>\r\n </div>\r\n\r\n @if (isOpen() && !resolvedAppendToBody()) {\r\n <ng-container [ngTemplateOutlet]=\"panelTpl\" />\r\n }\r\n\r\n @if (visibleError()) {\r\n <span class=\"gog-ms__error\" role=\"alert\">{{ visibleError() }}</span>\r\n }\r\n</div>\r\n\r\n<!--\r\n One template for both render modes. When `appendToBody` is set it is stamped into\r\n <body> by the overlay, which is why the portal-only modifier and the resolved\r\n coordinates are applied conditionally: outside the component's subtree the panel can\r\n no longer inherit the size tokens from the `.gog-ms-wrapper--sm/--lg` wrapper.\r\n-->\r\n<ng-template #panelTpl>\r\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- (click) below is housekeeping stopPropagation, not an interactive handler; the focusable/keyboard-operable elements are the options inside -->\r\n <div\r\n [id]=\"listboxId()\"\r\n class=\"gog-ms__dropdown\"\r\n [class.gog-ms__dropdown--up]=\"!resolvedAppendToBody() && dropdownDirectionState() === 'up'\"\r\n [class.gog-ms__dropdown--portal]=\"resolvedAppendToBody()\"\r\n [class]=\"panelSizeClass()\"\r\n [style.top.px]=\"resolvedAppendToBody() ? panelPlacement()?.top : null\"\r\n [style.left.px]=\"resolvedAppendToBody() ? panelPlacement()?.left : null\"\r\n [style.width]=\"resolvedAppendToBody() ? resolvedPanelWidth() : null\"\r\n [style.min-width]=\"resolvedAppendToBody() ? resolvedPanelMinWidth() : null\"\r\n [style.max-height]=\"resolvedAppendToBody() ? resolvedPanelMaxHeight() : null\"\r\n [style.z-index]=\"dropdownZIndex() ?? panelZIndex()\"\r\n role=\"listbox\"\r\n aria-multiselectable=\"true\"\r\n [attr.aria-labelledby]=\"label() ? labelId() : null\"\r\n (click)=\"$event.stopPropagation()\"\r\n >\r\n @if (showControls() && controlsPosition() === 'top') {\r\n <ng-container [ngTemplateOutlet]=\"controlsRowTpl\" />\r\n }\r\n <!--\r\n Not a tab stop of its own: the listbox pattern's only stop is the trigger, with\r\n focus moved between options via the arrow keys (roving-focus.ts), which already\r\n scrolls the focused option into view natively \u2014 no separate keyboard-scroll target\r\n needed here.\r\n -->\r\n @if (resolvedFilter() && resolvedFilterPosition() === 'top') {\r\n <div class=\"gog-ms__filter gog-ms__filter--top\">\r\n <input\r\n type=\"text\"\r\n class=\"gog-ms__filter-input\"\r\n [placeholder]=\"filterPlaceholder()\"\r\n [value]=\"filterQuery()\"\r\n (input)=\"onFilterInput($event)\"\r\n (click)=\"$event.stopPropagation()\"\r\n (keydown.escape)=\"close(); focusTrigger()\"\r\n />\r\n </div>\r\n }\r\n <gog-scroll size=\"thin\" [focusable]=\"false\" overscrollBehavior=\"contain\" class=\"gog-ms__scroll\">\r\n <div class=\"gog-ms__options\">\r\n @if (visibleOptions().length === 0) {\r\n <p class=\"gog-ms__empty\">{{ filterEmptyMessage() }}</p>\r\n }\r\n @for (option of visibleOptions(); track valueOf(option)) {\r\n <!--\r\n tabindex=\"-1\" keeps the list to a single tab stop, as the listbox pattern\r\n expects: focus moves between options with the arrow keys, not by tabbing\r\n through every one. Programmatic .focus() still works on a negative tabindex.\r\n -->\r\n <button\r\n type=\"button\"\r\n class=\"gog-ms__option\"\r\n role=\"option\"\r\n tabindex=\"-1\"\r\n [attr.aria-selected]=\"isSelected(option)\"\r\n [attr.aria-disabled]=\"isOptionDisabled(option)\"\r\n [class.gog-ms__option--selected]=\"isSelected(option)\"\r\n [class.gog-ms__option--disabled]=\"isOptionDisabled(option)\"\r\n (click)=\"toggleOption(option, $event)\"\r\n (keydown)=\"onOptionKeydown($event)\"\r\n gogRipple\r\n [rippleDisabled]=\"!rippleEnabled()\"\r\n >\r\n @if (optionSlot(); as slot) {\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n slot.templateRef;\r\n context: optionContext(option, isSelected(option))\r\n \"\r\n />\r\n } @else {\r\n <span class=\"gog-ms__option-mark\" aria-hidden=\"true\">\r\n <gog-icon [name]=\"isSelected(option) ? 'checkbox-checked' : 'checkbox'\" />\r\n </span>\r\n {{ labelOf(option) }}\r\n }\r\n </button>\r\n }\r\n </div>\r\n </gog-scroll>\r\n @if (resolvedFilter() && resolvedFilterPosition() === 'bottom') {\r\n <div class=\"gog-ms__filter gog-ms__filter--bottom\">\r\n <input\r\n type=\"text\"\r\n class=\"gog-ms__filter-input\"\r\n [placeholder]=\"filterPlaceholder()\"\r\n [value]=\"filterQuery()\"\r\n (input)=\"onFilterInput($event)\"\r\n (click)=\"$event.stopPropagation()\"\r\n (keydown.escape)=\"close(); focusTrigger()\"\r\n />\r\n </div>\r\n }\r\n @if (showControls() && controlsPosition() === 'bottom') {\r\n <ng-container [ngTemplateOutlet]=\"controlsRowTpl\" />\r\n }\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #controlsRowTpl>\r\n <div class=\"gog-ms__controls\" [class.gog-ms__controls--bottom]=\"controlsPosition() === 'bottom'\">\r\n <gog-button variant=\"ghost\" size=\"sm\" (click)=\"selectAll($event)\">{{\r\n resolvedSelectAllLabel()\r\n }}</gog-button>\r\n <gog-button variant=\"ghost\" size=\"sm\" (click)=\"clearAll($event)\">{{\r\n resolvedClearAllLabel()\r\n }}</gog-button>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Full selection, shown as a tooltip when the trigger can only fit part of it. -->\r\n<ng-template #selectedListTpl>\r\n <ul class=\"gog-ms__tooltip-list\">\r\n @for (label of selectedLabels(); track label) {\r\n <li>{{ label }}</li>\r\n }\r\n </ul>\r\n</ng-template>\r\n", styles: ["@charset \"UTF-8\";.gog-ms-wrapper{display:flex;flex-direction:column;gap:var(--gog-multiselect-gap);position:relative;width:100%}:host(.gog-host--auto-width){width:fit-content}:host(.gog-host--auto-width) .gog-ms-wrapper{width:fit-content}.gog-ms-wrapper--xsm,.gog-ms__dropdown--xsm{--gog-multiselect-size-padding-y: var(--gog-field-xsm-padding-y);--gog-multiselect-size-padding-x: var(--gog-field-xsm-padding-x);--gog-multiselect-size-font-size: var(--gog-field-xsm-font-size)}.gog-ms-wrapper--sm,.gog-ms__dropdown--sm{--gog-multiselect-size-padding-y: var(--gog-field-sm-padding-y);--gog-multiselect-size-padding-x: var(--gog-field-sm-padding-x);--gog-multiselect-size-font-size: var(--gog-field-sm-font-size)}.gog-ms-wrapper--lg,.gog-ms__dropdown--lg{--gog-multiselect-size-padding-y: var(--gog-field-lg-padding-y);--gog-multiselect-size-padding-x: var(--gog-field-lg-padding-x);--gog-multiselect-size-font-size: var(--gog-field-lg-font-size)}.gog-ms-wrapper--slg,.gog-ms__dropdown--slg{--gog-multiselect-size-padding-y: var(--gog-field-slg-padding-y);--gog-multiselect-size-padding-x: var(--gog-field-slg-padding-x);--gog-multiselect-size-font-size: var(--gog-field-slg-font-size)}.gog-ms__label{font-family:var(--gog-multiselect-label-font-family);font-size:var(--gog-multiselect-label-font-size);color:var(--gog-multiselect-label-color);text-transform:var(--gog-multiselect-label-text-transform);letter-spacing:var(--gog-multiselect-label-letter-spacing);cursor:pointer}.gog-ms{position:relative;display:flex;align-items:center;justify-content:space-between;padding:var(--gog-multiselect-padding-y, var(--gog-multiselect-size-padding-y, var(--gog-field-md-padding-y))) var(--gog-multiselect-padding-x, var(--gog-multiselect-size-padding-x, var(--gog-field-md-padding-x)));background-color:var(--gog-multiselect-field-bg);border:var(--gog-multiselect-field-border-width) var(--gog-multiselect-field-border-style) var(--gog-multiselect-field-border);border-radius:var(--gog-multiselect-radius);color:var(--gog-multiselect-field-color);cursor:pointer;-webkit-user-select:none;user-select:none;transition:border-color var(--gog-multiselect-transition-duration) var(--gog-easing),box-shadow var(--gog-multiselect-transition-duration) var(--gog-easing)}.gog-ms:hover:not(.gog-ms--disabled){border-color:var(--gog-multiselect-focus-border)}.gog-ms:focus-visible{outline:var(--gog-multiselect-focus-ring-width) solid var(--gog-multiselect-focus-ring);outline-offset:var(--gog-multiselect-focus-ring-offset)}.gog-ms--open{border-color:var(--gog-multiselect-border-color);box-shadow:var(--gog-multiselect-focus-glow)}.gog-ms--disabled{opacity:var(--gog-multiselect-disabled-opacity);cursor:not-allowed}.gog-ms--disabled .gog-ms__label{cursor:not-allowed}.gog-ms--error{border-color:var(--gog-multiselect-error-color)}.gog-ms__value{font-family:var(--gog-multiselect-font-family);font-size:var(--gog-multiselect-font-size, var(--gog-multiselect-size-font-size, var(--gog-field-md-font-size)));flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--gog-multiselect-value-color)}.gog-ms__value--placeholder{color:var(--gog-multiselect-placeholder-color)}.gog-ms{padding-inline-end:var(--gog-multiselect-actions-inset)}.gog-ms__actions{display:flex;align-items:center;gap:var(--gog-multiselect-actions-gap);flex-shrink:0}.gog-ms__clear{width:var(--gog-multiselect-font-size, var(--gog-multiselect-size-font-size, var(--gog-field-md-font-size)));height:var(--gog-multiselect-font-size, var(--gog-multiselect-size-font-size, var(--gog-field-md-font-size)));padding:0;border:0;border-radius:var(--gog-multiselect-clear-radius);background:transparent;color:var(--gog-multiselect-placeholder-color);line-height:1;cursor:pointer;transition:color var(--gog-multiselect-transition-duration) var(--gog-easing)}.gog-ms__clear gog-icon{font-size:calc(var(--gog-multiselect-font-size, var(--gog-multiselect-size-font-size, var(--gog-field-md-font-size))) * var(--gog-multiselect-clear-icon-ratio))}.gog-ms__clear:hover{color:var(--gog-multiselect-field-color)}.gog-ms__clear:focus-visible{outline:var(--gog-multiselect-focus-ring-width) solid var(--gog-multiselect-focus-ring);outline-offset:var(--gog-multiselect-focus-ring-offset)}.gog-ms__arrow{color:var(--gog-multiselect-border-color);transition:transform var(--gog-multiselect-arrow-transition-duration) var(--gog-easing);display:inline-flex;align-items:center;justify-content:center;width:var(--gog-multiselect-font-size, var(--gog-multiselect-size-font-size, var(--gog-field-md-font-size)));height:var(--gog-multiselect-font-size, var(--gog-multiselect-size-font-size, var(--gog-field-md-font-size)))}.gog-ms__arrow gog-icon{font-size:calc(var(--gog-multiselect-font-size, var(--gog-multiselect-size-font-size, var(--gog-field-md-font-size))) * var(--gog-multiselect-arrow-icon-ratio))}.gog-ms__arrow--up{transform:rotate(180deg)}.gog-ms__dropdown{position:absolute;top:calc(100% + var(--gog-multiselect-panel-offset));inset-inline-start:0;inset-inline-end:auto;min-width:100%;width:max-content;max-width:var(--gog-multiselect-panel-max-width);z-index:var(--gog-dropdown-z);display:flex;flex-direction:column;background-color:var(--gog-multiselect-panel-bg);border:var(--gog-multiselect-field-border-width) var(--gog-multiselect-field-border-style) var(--gog-multiselect-panel-border);border-radius:var(--gog-multiselect-radius);max-height:var(--gog-multiselect-panel-max-height);overflow:hidden;box-shadow:var(--gog-multiselect-panel-shadow)}.gog-ms__scroll{flex:1;min-height:0}.gog-ms__dropdown--up{top:auto;bottom:calc(100% + var(--gog-multiselect-panel-offset))}.gog-ms__dropdown--portal{position:fixed;top:unset;bottom:unset;inset-inline:unset}.gog-ms__controls{flex-shrink:0;display:flex;gap:var(--gog-multiselect-controls-gap);padding:var(--gog-multiselect-controls-padding);background-color:var(--gog-multiselect-panel-bg);border-bottom:var(--gog-multiselect-field-border-width) var(--gog-multiselect-field-border-style) var(--gog-multiselect-field-border)}.gog-ms__controls--bottom{border-bottom:0;border-top:var(--gog-multiselect-field-border-width) var(--gog-multiselect-field-border-style) var(--gog-multiselect-field-border)}.gog-ms__options{display:flex;flex-direction:column;padding:var(--gog-multiselect-options-padding);gap:var(--gog-multiselect-option-gap)}.gog-ms__option{width:100%;display:flex;align-items:center;gap:var(--gog-multiselect-option-gap-inline);padding:var(--gog-multiselect-padding-y, var(--gog-multiselect-size-padding-y, var(--gog-field-md-padding-y))) var(--gog-multiselect-padding-x, var(--gog-multiselect-size-padding-x, var(--gog-field-md-padding-x)));border:0;background:transparent;text-align:start;font:inherit;font-family:var(--gog-multiselect-font-family);font-size:var(--gog-multiselect-font-size, var(--gog-multiselect-size-font-size, var(--gog-field-md-font-size)));cursor:pointer;border-radius:var(--gog-multiselect-option-radius);transition:background-color var(--gog-multiselect-option-transition-duration) var(--gog-easing);color:var(--gog-multiselect-option-color)}.gog-ms__option--disabled{opacity:var(--gog-multiselect-option-disabled-opacity);cursor:not-allowed}.gog-ms__option:hover{background-color:var(--gog-multiselect-option-hover-bg)}.gog-ms__option--selected{color:var(--gog-multiselect-border-color)}.gog-ms__option:focus-visible{outline:var(--gog-multiselect-focus-ring-width) solid var(--gog-multiselect-focus-ring);outline-offset:calc(var(--gog-multiselect-focus-ring-width) * -1)}.gog-ms__option-mark{display:flex;align-items:center;justify-content:center;width:calc(var(--gog-multiselect-font-size, var(--gog-multiselect-size-font-size, var(--gog-field-md-font-size))) * var(--gog-multiselect-mark-size-ratio));height:calc(var(--gog-multiselect-font-size, var(--gog-multiselect-size-font-size, var(--gog-field-md-font-size))) * var(--gog-multiselect-mark-size-ratio));flex-shrink:0;font-size:calc(var(--gog-multiselect-font-size, var(--gog-multiselect-size-font-size, var(--gog-field-md-font-size))) * var(--gog-multiselect-mark-icon-ratio));color:var(--gog-multiselect-checkbox-border)}.gog-ms__option--selected .gog-ms__option-mark{color:var(--gog-multiselect-checkbox-checked-bg)}.gog-ms__error{font-family:var(--gog-multiselect-font-family);font-size:var(--gog-multiselect-error-font-size);color:var(--gog-multiselect-error-color);margin-top:var(--gog-multiselect-error-offset)}.gog-ms__label--float{position:absolute;inset-inline-start:var(--gog-multiselect-padding-x, var(--gog-multiselect-size-padding-x, var(--gog-field-md-padding-x)));top:50%;transform:translateY(-50%);max-width:calc(100% - 2 * var(--gog-multiselect-padding-x, var(--gog-multiselect-size-padding-x, var(--gog-field-md-padding-x))));overflow:hidden;text-overflow:ellipsis;white-space:nowrap;pointer-events:none;cursor:default;color:var(--gog-multiselect-placeholder-color);font-size:var(--gog-multiselect-size-font-size, var(--gog-field-md-font-size));text-transform:none;letter-spacing:normal;transition:transform var(--gog-multiselect-transition-duration) var(--gog-easing),font-size var(--gog-multiselect-transition-duration) var(--gog-easing),color var(--gog-multiselect-transition-duration) var(--gog-easing),top var(--gog-multiselect-transition-duration) var(--gog-easing),background-color var(--gog-multiselect-transition-duration) var(--gog-easing)}.gog-ms-wrapper--float-in,.gog-ms-wrapper--float-on{--gog-multiselect-float-top-padding: calc(var(--gog-multiselect-padding-y, var(--gog-multiselect-size-padding-y, var(--gog-field-md-padding-y))) + var(--gog-multiselect-float-label-reserve))}.gog-ms-wrapper--float-in .gog-ms,.gog-ms-wrapper--float-on .gog-ms{padding-top:var(--gog-multiselect-float-top-padding)}.gog-ms-wrapper--float-in .gog-ms__label--float,.gog-ms-wrapper--float-on .gog-ms__label--float{top:var(--gog-multiselect-float-top-padding);transform:none}.gog-ms-wrapper--float-in.gog-ms-wrapper--floated .gog-ms__label--float{top:var(--gog-multiselect-float-label-in-top);transform:translateY(0);font-size:var(--gog-multiselect-label-font-size);color:var(--gog-multiselect-label-color);text-transform:var(--gog-multiselect-label-text-transform);letter-spacing:var(--gog-multiselect-label-letter-spacing)}.gog-ms-wrapper--float-on.gog-ms-wrapper--floated .gog-ms__label--float{top:0;transform:translateY(-50%);font-size:var(--gog-multiselect-label-font-size);color:var(--gog-multiselect-label-color);text-transform:var(--gog-multiselect-label-text-transform);letter-spacing:var(--gog-multiselect-label-letter-spacing);background-color:var(--gog-multiselect-float-label-on-bg, var(--gog-multiselect-field-bg));padding:0 4px;inset-inline-start:calc(var(--gog-multiselect-padding-x, var(--gog-multiselect-size-padding-x, var(--gog-field-md-padding-x))) - 4px)}.gog-ms-wrapper--float-over.gog-ms-wrapper--floated .gog-ms__label--float{top:calc(-1 * var(--gog-multiselect-float-label-over-gap));transform:translateY(-100%);font-size:var(--gog-multiselect-label-font-size);color:var(--gog-multiselect-label-color);text-transform:var(--gog-multiselect-label-text-transform);letter-spacing:var(--gog-multiselect-label-letter-spacing)}.gog-ms-wrapper--float-over .gog-ms{margin-top:var(--gog-multiselect-float-label-over-reserve)}@media(prefers-reduced-motion:reduce){.gog-ms,.gog-ms__clear,.gog-ms__arrow,.gog-ms__option,.gog-ms__option-mark,.gog-ms__label--float{transition:none}}.gog-ms__filter{position:sticky;top:0;z-index:1;padding:var(--gog-multiselect-filter-padding);background:var(--gog-multiselect-panel-bg)}.gog-ms__filter-input{width:100%;padding:var(--gog-multiselect-filter-input-padding-y) var(--gog-multiselect-filter-input-padding-x);font-family:var(--gog-multiselect-font-family);font-size:var(--gog-multiselect-font-size, var(--gog-multiselect-size-font-size, var(--gog-field-md-font-size)));color:var(--gog-multiselect-filter-input-color);background:var(--gog-multiselect-filter-input-bg);border:var(--gog-control-border-width) var(--gog-control-border-style) var(--gog-multiselect-filter-input-border);border-radius:var(--gog-multiselect-filter-input-radius);outline:none}.gog-ms__filter-input:focus{border-color:var(--gog-multiselect-focus-border)}.gog-ms__empty{margin:0;padding:var(--gog-multiselect-filter-empty-padding);font-family:var(--gog-multiselect-font-family);font-size:var(--gog-multiselect-font-size, var(--gog-multiselect-size-font-size, var(--gog-field-md-font-size)));color:var(--gog-multiselect-filter-empty-color);text-align:center}.gog-ms__filter--top{border-bottom:var(--gog-multiselect-filter-border-width) var(--gog-multiselect-filter-border-style) var(--gog-multiselect-filter-border-color)}.gog-ms__filter--bottom{top:auto;bottom:0;border-top:var(--gog-multiselect-filter-border-width) var(--gog-multiselect-filter-border-style) var(--gog-multiselect-filter-border-color)}:host(.gog-host--auto-width),:host(.gog-host--auto-width) .gog-ms{min-width:var(--gog-multiselect-min-width)}.gog-ms__dropdown--portal{max-width:var(--gog-multiselect-panel-max-width)}.gog-ms__overflow{flex-shrink:0;margin-inline-start:var(--gog-multiselect-overflow-gap);font-size:var(--gog-multiselect-overflow-font-size);color:var(--gog-multiselect-overflow-color)}.gog-ms__tooltip-list{margin:0;padding-inline-start:1.1em;text-align:start}\n"] }]
|
|
7137
7914
|
}], ctorParameters: () => [], propDecorators: { showControls: [{ type: i0.Input, args: [{ isSignal: true, alias: "showControls", required: false }] }], controlsPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "controlsPosition", required: false }] }], selectAllLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectAllLabel", required: false }] }], clearAllLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearAllLabel", required: false }] }], clearIconSlot: [{ type: i0.ContentChild, args: [i0.forwardRef(() => GogMultiselectClearIconDirective), { isSignal: true }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], panelTemplate: [{ type: i0.ViewChild, args: ['panelTpl', { isSignal: true }] }], valueRef: [{ type: i0.ViewChild, args: ['valueEl', { isSignal: true }] }] } });
|
|
7138
7915
|
/** One shared 2D context; creating a canvas per measurement is what makes this approach slow. */
|
|
7139
7916
|
let measureContext = null;
|
|
@@ -7619,7 +8396,7 @@ class PaginatorComponent {
|
|
|
7619
8396
|
this.pageSize.set(size);
|
|
7620
8397
|
}
|
|
7621
8398
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: PaginatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
7622
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: PaginatorComponent, isStandalone: true, selector: "gog-paginator", inputs: { page: { classPropertyName: "page", publicName: "page", isSignal: true, isRequired: false, transformFunction: null }, fullWidth: { classPropertyName: "fullWidth", publicName: "fullWidth", isSignal: true, isRequired: false, transformFunction: null }, totalPages: { classPropertyName: "totalPages", publicName: "totalPages", isSignal: true, isRequired: false, transformFunction: null }, totalRecords: { classPropertyName: "totalRecords", publicName: "totalRecords", isSignal: true, isRequired: false, transformFunction: null }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null }, showPageSizeSelect: { classPropertyName: "showPageSizeSelect", publicName: "showPageSizeSelect", isSignal: true, isRequired: false, transformFunction: null }, pageSizeOptions: { classPropertyName: "pageSizeOptions", publicName: "pageSizeOptions", isSignal: true, isRequired: false, transformFunction: null }, rangeMode: { classPropertyName: "rangeMode", publicName: "rangeMode", isSignal: true, isRequired: false, transformFunction: null }, visiblePages: { classPropertyName: "visiblePages", publicName: "visiblePages", isSignal: true, isRequired: false, transformFunction: null }, showFirstPage: { classPropertyName: "showFirstPage", publicName: "showFirstPage", isSignal: true, isRequired: false, transformFunction: null }, showLastPage: { classPropertyName: "showLastPage", publicName: "showLastPage", isSignal: true, isRequired: false, transformFunction: null }, siblingCount: { classPropertyName: "siblingCount", publicName: "siblingCount", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { page: "pageChange", pageSize: "pageSizeChange" }, host: { attributes: { "role": "navigation" }, properties: { "attr.aria-label": "resolvedAriaLabel()", "class.gog-host--auto-width": "!fullWidth()" }, classAttribute: "gog-paginator" }, ngImport: i0, template: "<gog-button\r\n variant=\"ghost\"\r\n [size]=\"size()\"\r\n [disabled]=\"disabled() || page() === 1\"\r\n [ariaLabel]=\"resolvedPreviousLabel()\"\r\n (gogClick)=\"prev()\"\r\n >\u2039</gog-button\r\n>\r\n\r\n@for (item of pageNumbers(); track $index) {\r\n @if (isNumber(item)) {\r\n <gog-button\r\n [size]=\"size()\"\r\n [variant]=\"item === page() ? 'primary' : 'ghost'\"\r\n [disabled]=\"disabled()\"\r\n [ariaLabel]=\"pageLabel(item)\"\r\n (gogClick)=\"goTo(item)\"\r\n >{{ item }}</gog-button\r\n >\r\n } @else {\r\n <span class=\"gog-paginator__ellipsis\">\u2026</span>\r\n }\r\n}\r\n\r\n<gog-button\r\n variant=\"ghost\"\r\n [size]=\"size()\"\r\n [disabled]=\"disabled() || page() === resolvedTotalPages()\"\r\n [ariaLabel]=\"resolvedNextLabel()\"\r\n (gogClick)=\"next()\"\r\n >\u203A</gog-button\r\n>\r\n\r\n@if (resolvedShowPageSizeSelect()) {\r\n <!--\r\n Bound with `[(pageSize)]`'s writable half, so choosing a size writes straight back through the\r\n model the consumer bound \u2014 there is no intermediate state to keep in sync. `fullWidth` off so\r\n the select sizes to its content instead of stretching the paginator row.\r\n\r\n A plain `@if`, not `@defer`, and that was measured rather than assumed: `@defer` does move\r\n `SelectComponent` out of this component's static `dependencies` and into\r\n `deferBlockDependencies`, but ng-packagr flattens the whole library into one FESM, so the\r\n deferred reference compiles to `Promise.resolve().then(() => select_component)` \u2014 a binding in\r\n the *same module*, not a dynamic `import()`. With no import boundary there is nothing for a\r\n bundler to split on and nothing it may drop, so the consumer ships exactly the same bytes,\r\n minus a placeholder and an SSR pop-in. Making this genuinely lazy needs secondary entry\r\n points (`@guildofgleks/ui/select`), which is a packaging decision, not a template one.\r\n -->\r\n <gog-select\r\n class=\"gog-paginator__page-size\"\r\n [options]=\"resolvedPageSizeOptions()\"\r\n [value]=\"pageSize()\"\r\n [disabled]=\"disabled()\"\r\n [fullWidth]=\"false\"\r\n [size]=\"size()\"\r\n [ariaLabel]=\"resolvedRowsPerPageLabel()\"\r\n (valueChange)=\"onPageSizeChange($event)\"\r\n />\r\n}\r\n", styles: [":host{display:flex;align-items:center;gap:var(--gog-paginator-gap);flex-wrap:wrap}:host(.gog-host--auto-width){width:fit-content}.gog-paginator__ellipsis{display:inline-flex;align-items:center;justify-content:center;min-width:var(--gog-paginator-ellipsis-min-width);color:var(--gog-paginator-ellipsis-color);font-family:var(--gog-paginator-ellipsis-font-family);font-size:var(--gog-paginator-ellipsis-font-size);-webkit-user-select:none;user-select:none}.gog-paginator__page-size{margin-inline-start:auto;min-width:var(--gog-paginator-page-size-min-width)}\n"], dependencies: [{ kind: "component", type: ButtonComponent, selector: "gog-button", inputs: ["variant", "size", "disabled", "fullWidth", "type", "loading", "debounce", "ariaLabel"], outputs: ["gogClick"] }, { kind: "component", type: SelectComponent, selector: "gog-select", inputs: ["inputId", "value"], outputs: ["valueChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
8399
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: PaginatorComponent, isStandalone: true, selector: "gog-paginator", inputs: { page: { classPropertyName: "page", publicName: "page", isSignal: true, isRequired: false, transformFunction: null }, fullWidth: { classPropertyName: "fullWidth", publicName: "fullWidth", isSignal: true, isRequired: false, transformFunction: null }, totalPages: { classPropertyName: "totalPages", publicName: "totalPages", isSignal: true, isRequired: false, transformFunction: null }, totalRecords: { classPropertyName: "totalRecords", publicName: "totalRecords", isSignal: true, isRequired: false, transformFunction: null }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null }, showPageSizeSelect: { classPropertyName: "showPageSizeSelect", publicName: "showPageSizeSelect", isSignal: true, isRequired: false, transformFunction: null }, pageSizeOptions: { classPropertyName: "pageSizeOptions", publicName: "pageSizeOptions", isSignal: true, isRequired: false, transformFunction: null }, rangeMode: { classPropertyName: "rangeMode", publicName: "rangeMode", isSignal: true, isRequired: false, transformFunction: null }, visiblePages: { classPropertyName: "visiblePages", publicName: "visiblePages", isSignal: true, isRequired: false, transformFunction: null }, showFirstPage: { classPropertyName: "showFirstPage", publicName: "showFirstPage", isSignal: true, isRequired: false, transformFunction: null }, showLastPage: { classPropertyName: "showLastPage", publicName: "showLastPage", isSignal: true, isRequired: false, transformFunction: null }, siblingCount: { classPropertyName: "siblingCount", publicName: "siblingCount", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { page: "pageChange", pageSize: "pageSizeChange" }, host: { attributes: { "role": "navigation" }, properties: { "attr.aria-label": "resolvedAriaLabel()", "class.gog-host--auto-width": "!fullWidth()" }, classAttribute: "gog-paginator" }, ngImport: i0, template: "<gog-button\r\n variant=\"ghost\"\r\n [size]=\"size()\"\r\n [disabled]=\"disabled() || page() === 1\"\r\n [ariaLabel]=\"resolvedPreviousLabel()\"\r\n (gogClick)=\"prev()\"\r\n >\u2039</gog-button\r\n>\r\n\r\n@for (item of pageNumbers(); track $index) {\r\n @if (isNumber(item)) {\r\n <gog-button\r\n [size]=\"size()\"\r\n [variant]=\"item === page() ? 'primary' : 'ghost'\"\r\n [disabled]=\"disabled()\"\r\n [ariaLabel]=\"pageLabel(item)\"\r\n (gogClick)=\"goTo(item)\"\r\n >{{ item }}</gog-button\r\n >\r\n } @else {\r\n <span class=\"gog-paginator__ellipsis\">\u2026</span>\r\n }\r\n}\r\n\r\n<gog-button\r\n variant=\"ghost\"\r\n [size]=\"size()\"\r\n [disabled]=\"disabled() || page() === resolvedTotalPages()\"\r\n [ariaLabel]=\"resolvedNextLabel()\"\r\n (gogClick)=\"next()\"\r\n >\u203A</gog-button\r\n>\r\n\r\n@if (resolvedShowPageSizeSelect()) {\r\n <!--\r\n Bound with `[(pageSize)]`'s writable half, so choosing a size writes straight back through the\r\n model the consumer bound \u2014 there is no intermediate state to keep in sync. `fullWidth` off so\r\n the select sizes to its content instead of stretching the paginator row.\r\n\r\n A plain `@if`, not `@defer`, and that was measured rather than assumed: `@defer` does move\r\n `SelectComponent` out of this component's static `dependencies` and into\r\n `deferBlockDependencies`, but ng-packagr flattens the whole library into one FESM, so the\r\n deferred reference compiles to `Promise.resolve().then(() => select_component)` \u2014 a binding in\r\n the *same module*, not a dynamic `import()`. With no import boundary there is nothing for a\r\n bundler to split on and nothing it may drop, so the consumer ships exactly the same bytes,\r\n minus a placeholder and an SSR pop-in. Making this genuinely lazy needs secondary entry\r\n points (`@guildofgleks/ui/select`), which is a packaging decision, not a template one.\r\n -->\r\n <gog-select\r\n class=\"gog-paginator__page-size\"\r\n [options]=\"resolvedPageSizeOptions()\"\r\n [value]=\"pageSize()\"\r\n [disabled]=\"disabled()\"\r\n [fullWidth]=\"false\"\r\n [size]=\"size()\"\r\n [ariaLabel]=\"resolvedRowsPerPageLabel()\"\r\n (valueChange)=\"onPageSizeChange($event)\"\r\n />\r\n}\r\n", styles: [":host{display:flex;align-items:center;gap:var(--gog-paginator-gap);flex-wrap:wrap}:host(.gog-host--auto-width){width:fit-content}.gog-paginator__ellipsis{display:inline-flex;align-items:center;justify-content:center;min-width:var(--gog-paginator-ellipsis-min-width);color:var(--gog-paginator-ellipsis-color);font-family:var(--gog-paginator-ellipsis-font-family);font-size:var(--gog-paginator-ellipsis-font-size);-webkit-user-select:none;user-select:none}.gog-paginator__page-size{margin-inline-start:auto;min-width:var(--gog-paginator-page-size-min-width)}\n"], dependencies: [{ kind: "component", type: ButtonComponent, selector: "gog-button", inputs: ["variant", "size", "disabled", "fullWidth", "type", "loading", "ripple", "debounce", "ariaLabel"], outputs: ["gogClick"] }, { kind: "component", type: SelectComponent, selector: "gog-select", inputs: ["inputId", "value"], outputs: ["valueChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
7623
8400
|
}
|
|
7624
8401
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: PaginatorComponent, decorators: [{
|
|
7625
8402
|
type: Component,
|
|
@@ -8157,7 +8934,7 @@ class TableComponent {
|
|
|
8157
8934
|
/** CSS grid-area for the pagination block */
|
|
8158
8935
|
paginatorGridArea = computed(() => this.paginatorPosition(), ...(ngDevMode ? [{ debugName: "paginatorGridArea" }] : /* istanbul ignore next */ []));
|
|
8159
8936
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: TableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
8160
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: TableComponent, isStandalone: true, selector: "gog-table", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, fullWidth: { classPropertyName: "fullWidth", publicName: "fullWidth", isSignal: true, isRequired: false, transformFunction: null }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null }, showPageSizeSelect: { classPropertyName: "showPageSizeSelect", publicName: "showPageSizeSelect", isSignal: true, isRequired: false, transformFunction: null }, pageSizeOptions: { classPropertyName: "pageSizeOptions", publicName: "pageSizeOptions", isSignal: true, isRequired: false, transformFunction: null }, lazy: { classPropertyName: "lazy", publicName: "lazy", isSignal: true, isRequired: false, transformFunction: null }, totalRecords: { classPropertyName: "totalRecords", publicName: "totalRecords", isSignal: true, isRequired: false, transformFunction: null }, interactiveRows: { classPropertyName: "interactiveRows", publicName: "interactiveRows", isSignal: true, isRequired: false, transformFunction: null }, selectionMode: { classPropertyName: "selectionMode", publicName: "selectionMode", isSignal: true, isRequired: false, transformFunction: null }, selection: { classPropertyName: "selection", publicName: "selection", isSignal: true, isRequired: false, transformFunction: null }, dataKey: { classPropertyName: "dataKey", publicName: "dataKey", isSignal: true, isRequired: false, transformFunction: null }, showSelectionColumn: { classPropertyName: "showSelectionColumn", publicName: "showSelectionColumn", isSignal: true, isRequired: false, transformFunction: null }, showRowNumbers: { classPropertyName: "showRowNumbers", publicName: "showRowNumbers", isSignal: true, isRequired: false, transformFunction: null }, showTotal: { classPropertyName: "showTotal", publicName: "showTotal", isSignal: true, isRequired: false, transformFunction: null }, emptyPlaceholder: { classPropertyName: "emptyPlaceholder", publicName: "emptyPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, paginatorPosition: { classPropertyName: "paginatorPosition", publicName: "paginatorPosition", isSignal: true, isRequired: false, transformFunction: null }, totalPosition: { classPropertyName: "totalPosition", publicName: "totalPosition", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, showColumnBorders: { classPropertyName: "showColumnBorders", publicName: "showColumnBorders", isSignal: true, isRequired: false, transformFunction: null }, stickyHeader: { classPropertyName: "stickyHeader", publicName: "stickyHeader", isSignal: true, isRequired: false, transformFunction: null }, maxHeight: { classPropertyName: "maxHeight", publicName: "maxHeight", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pageSize: "pageSizeChange", selection: "selectionChange", gogSortChange: "gogSortChange", gogPageChange: "gogPageChange", gogRowClick: "gogRowClick" }, host: { properties: { "style.display": "\"block\"", "style.width": "fullWidth() ? \"100%\" : \"fit-content\"" }, classAttribute: "gog-table-host" }, queries: [{ propertyName: "columns", predicate: GogColumn, isSignal: true }], ngImport: i0, template: "<div class=\"gog-table-wrapper gog-contained-layout\">\r\n <!--\r\n The vertical axis is enabled only when the table has been capped. Left on for an uncapped\r\n table, `gog-scroll` would make this viewport a scroll container on both axes, which puts it\r\n in the sticky chain of everything inside it and takes the consumer's own scrolling region\r\n out of it \u2014 measured: a header that used to pin to that region rode away by 147px.\r\n -->\r\n <gog-scroll\r\n [axis]=\"maxHeight() ? 'both' : 'horizontal'\"\r\n [style.max-height]=\"maxHeight()\"\r\n class=\"gog-table-scroll\"\r\n >\r\n <table\r\n class=\"gog-table\"\r\n [class]=\"sizeClass()\"\r\n [class.gog-table--col-borders]=\"showColumnBorders()\"\r\n [class.gog-table--loading]=\"loading()\"\r\n [class.gog-table--sticky-header]=\"stickyHeader()\"\r\n [class.gog-table--auto-layout]=\"!fullWidth()\"\r\n [style.width]=\"fullWidth() ? '100%' : 'fit-content'\"\r\n >\r\n <colgroup>\r\n @if (hasSelectionColumn()) {\r\n <col class=\"gog-table__col--select\" />\r\n }\r\n @if (showRowNumbers()) {\r\n <col class=\"gog-table__col--num\" />\r\n }\r\n @for (col of columns(); track col.field()) {\r\n <col\r\n [style.width]=\"col.width() || null\"\r\n [style.min-width]=\"col.minWidth() || null\"\r\n [style.max-width]=\"col.maxWidth() || null\"\r\n />\r\n }\r\n </colgroup>\r\n <thead>\r\n <tr>\r\n @if (hasSelectionColumn()) {\r\n <th class=\"gog-table__th gog-table__th--select\" scope=\"col\">\r\n <!--\r\n Only `multiple` gets a select-all: in `single` mode there is nothing to select\r\n all of, and a checkbox that can only ever check one row is a lie.\r\n -->\r\n @if (selectionMode() === 'multiple') {\r\n <gog-checkbox\r\n [checked]=\"allPageRowsSelected()\"\r\n [indeterminate]=\"somePageRowsSelected()\"\r\n [disabled]=\"loading() || visibleRows().length === 0\"\r\n [ariaLabel]=\"resolvedLabels().selectAllRows\"\r\n (checkedChange)=\"toggleAllOnPage($event)\"\r\n />\r\n }\r\n </th>\r\n }\r\n @if (showRowNumbers()) {\r\n <th class=\"gog-table__th gog-table__th--num\" scope=\"col\">#</th>\r\n }\r\n @for (col of columns(); track col.field()) {\r\n <th\r\n class=\"gog-table__th\"\r\n scope=\"col\"\r\n [class.gog-table__th--sortable]=\"col.sortable() && !loading()\"\r\n [class.gog-table__th--sorted]=\"getSortDirection(col.field())\"\r\n [attr.aria-sort]=\"getAriaSort(col.field())\"\r\n [attr.tabindex]=\"col.sortable() && !loading() ? 0 : null\"\r\n (click)=\"handleSortClick(col)\"\r\n (keydown.enter)=\"handleSortClick(col)\"\r\n (keydown.space)=\"handleSortClick(col); $event.preventDefault()\"\r\n >\r\n @if (getHeaderTemplate(col); as headerTpl) {\r\n <ng-container *ngTemplateOutlet=\"headerTpl; context: headerContext(col)\" />\r\n } @else {\r\n <span class=\"gog-table__th-inner\">\r\n {{ col.header() || col.field() }}\r\n @if (col.sortable() && !loading()) {\r\n <span class=\"gog-table__sort-icon\" aria-hidden=\"true\">\r\n @if (getSortDirection(col.field()) === 'asc') {\r\n <gog-icon name=\"sort-up\" />\r\n } @else if (getSortDirection(col.field()) === 'desc') {\r\n <gog-icon name=\"sort-down\" />\r\n } @else {\r\n <gog-icon name=\"sort\" />\r\n }\r\n </span>\r\n }\r\n </span>\r\n }\r\n </th>\r\n }\r\n </tr>\r\n </thead>\r\n <tbody>\r\n @if (loading()) {\r\n <tr>\r\n <td class=\"gog-table__loading-cell\" [attr.colspan]=\"emptyColspan()\">\r\n <gog-spinner size=\"md\" />\r\n </td>\r\n </tr>\r\n } @else if (visibleRows().length === 0) {\r\n <tr>\r\n <td class=\"gog-table__empty\" [attr.colspan]=\"emptyColspan()\">\u2014</td>\r\n </tr>\r\n } @else {\r\n @for (row of visibleRows(); track rowKey(row); let i = $index) {\r\n <tr\r\n class=\"gog-table__row\"\r\n [class.gog-table__row--interactive]=\"interactiveRows()\"\r\n [class.gog-table__row--selected]=\"isSelected(row)\"\r\n [attr.tabindex]=\"interactiveRows() ? 0 : null\"\r\n [attr.aria-selected]=\"hasSelection() ? isSelected(row) : null\"\r\n (click)=\"emitRowClick(row, i, $event)\"\r\n (keydown)=\"onRowKeydown(row, i, $event)\"\r\n >\r\n @if (hasSelectionColumn()) {\r\n <td class=\"gog-table__td gog-table__td--select\">\r\n <!--\r\n `$event.stopPropagation()` so ticking the box does not also count as a row\r\n click: with `interactiveRows` those are two different intents, and firing both\r\n from one gesture is how a \"select\" ends up navigating away.\r\n -->\r\n <gog-checkbox\r\n [checked]=\"isSelected(row)\"\r\n [ariaLabel]=\"resolvedLabels().selectRow\"\r\n (click)=\"$event.stopPropagation()\"\r\n (checkedChange)=\"toggleRowSelection(row, $event)\"\r\n />\r\n </td>\r\n }\r\n @if (showRowNumbers()) {\r\n <td class=\"gog-table__td gog-table__td--num\">{{ globalRowIndex(i) }}</td>\r\n }\r\n @for (col of columns(); track col.field()) {\r\n <td class=\"gog-table__td\">\r\n @if (getBodyTemplate(col); as bodyTpl) {\r\n <ng-container *ngTemplateOutlet=\"bodyTpl; context: bodyContext(row, col, i)\" />\r\n } @else {\r\n {{ formatCellValue(row, col.field()) }}\r\n }\r\n </td>\r\n }\r\n </tr>\r\n }\r\n }\r\n </tbody>\r\n </table>\r\n </gog-scroll>\r\n\r\n @if (hasPagination() || showTotal()) {\r\n <div class=\"gog-table__footer\">\r\n @if (showTotal()) {\r\n <span class=\"gog-table__total\" [style.grid-area]=\"totalGridArea()\">\r\n {{ resolvedLabels().total }}: {{ rowCount() }}\r\n </span>\r\n }\r\n\r\n @if (hasPagination()) {\r\n <!--\r\n `[(pageSize)]` straight through to the table's own model: the rows-per-page select\r\n writes back here, and a consumer binding `[(pageSize)]` on the table sees it. No\r\n intermediate signal, in either direction.\r\n -->\r\n <gog-paginator\r\n class=\"gog-table__pagination\"\r\n [style.grid-area]=\"paginatorGridArea()\"\r\n [(page)]=\"currentPage\"\r\n [(pageSize)]=\"pageSize\"\r\n [totalPages]=\"totalPages()\"\r\n [showPageSizeSelect]=\"showPageSizeSelect()\"\r\n [pageSizeOptions]=\"pageSizeOptions()\"\r\n rangeMode=\"ellipsis\"\r\n size=\"sm\"\r\n [ariaLabel]=\"resolvedLabels().pagination\"\r\n />\r\n }\r\n </div>\r\n }\r\n</div>\r\n", styles: ["@charset \"UTF-8\";.gog-table-wrapper{display:flex;flex-direction:column;gap:var(--gog-table-gap);width:100%;overflow-anchor:none}.gog-table-scroll{width:100%}.gog-table{width:100%;border-collapse:collapse;border:var(--gog-table-border-width) var(--gog-table-border-style) var(--gog-table-border-color);background-color:var(--gog-table-surface);color:var(--gog-table-text-color);font-family:var(--gog-table-font-family);table-layout:fixed}.gog-table--auto-layout{table-layout:auto}.gog-table--slg{--gog-table-size-th-padding-v: var(--gog-table-slg-padding-v);--gog-table-size-td-padding-v: var(--gog-table-slg-padding-v);--gog-table-size-th-font-size: var(--gog-table-slg-th-font-size);--gog-table-size-td-font-size: var(--gog-table-slg-td-font-size)}.gog-table--md{--gog-table-size-th-padding-v: var(--gog-table-md-padding-v);--gog-table-size-td-padding-v: var(--gog-table-md-padding-v);--gog-table-size-th-font-size: var(--gog-table-md-th-font-size);--gog-table-size-td-font-size: var(--gog-table-md-td-font-size)}.gog-table--sm{--gog-table-size-th-padding-v: var(--gog-table-sm-padding-v);--gog-table-size-td-padding-v: var(--gog-table-sm-padding-v);--gog-table-size-th-font-size: var(--gog-table-sm-th-font-size);--gog-table-size-td-font-size: var(--gog-table-sm-td-font-size)}.gog-table--xsm{--gog-table-size-th-padding-v: var(--gog-table-xsm-padding-v);--gog-table-size-td-padding-v: var(--gog-table-xsm-padding-v);--gog-table-size-th-font-size: var(--gog-table-xsm-th-font-size);--gog-table-size-td-font-size: var(--gog-table-xsm-td-font-size)}.gog-table__col--num{width:var(--gog-table-num-col-width)}.gog-table__th{padding:var(--gog-table-th-padding-v, var(--gog-table-size-th-padding-v, var(--gog-table-lg-padding-v))) var(--gog-table-padding-h);text-align:start;font-family:var(--gog-table-header-font-family);font-size:var(--gog-table-th-font-size, var(--gog-table-size-th-font-size, var(--gog-table-lg-th-font-size)));text-transform:var(--gog-table-header-text-transform);letter-spacing:var(--gog-table-header-letter-spacing);color:var(--gog-table-accent-color);background-color:var(--gog-table-surface);border-bottom:var(--gog-table-border-width) var(--gog-table-border-style) var(--gog-table-border-color);white-space:normal;overflow:hidden}.gog-table--sticky-header .gog-table__th{position:sticky;top:0;z-index:1}.gog-table__th--num{width:var(--gog-table-num-col-width);text-align:center;color:var(--gog-table-muted-color)}.gog-table__th--select,.gog-table__td--select{width:var(--gog-table-select-col-width);text-align:center}.gog-table__th--sortable{cursor:pointer;-webkit-user-select:none;user-select:none}.gog-table__th--sortable:focus-visible{outline:var(--gog-table-focus-ring-width) solid var(--gog-table-focus-ring);outline-offset:calc(var(--gog-table-focus-ring-width) * -1)}.gog-table__th--sortable:hover,.gog-table__th--sorted{color:var(--gog-table-accent-bright)}.gog-table__th-inner{display:inline-flex;align-items:center;gap:var(--gog-table-th-inner-gap);width:100%}.gog-table__sort-icon{display:inline-block;width:var(--gog-table-sort-icon-width);text-align:center;font-size:var(--gog-table-sort-icon-size);opacity:var(--gog-table-sort-icon-opacity);flex-shrink:0}.gog-table__th--sorted .gog-table__sort-icon{opacity:1}.gog-table__td{padding:var(--gog-table-td-padding-v, var(--gog-table-size-td-padding-v, var(--gog-table-lg-padding-v))) var(--gog-table-padding-h);font-size:var(--gog-table-td-font-size, var(--gog-table-size-td-font-size, var(--gog-table-lg-td-font-size)));border-bottom:var(--gog-table-row-border-width) var(--gog-table-border-style) var(--gog-table-border-color);vertical-align:middle;overflow-wrap:break-word;word-break:break-word;overflow:hidden}.gog-table__td--num{text-align:center;color:var(--gog-table-muted-color);font-size:var(--gog-table-num-font-size);font-family:var(--gog-table-numeric-font-family);width:var(--gog-table-num-col-width)}.gog-table__row:last-child .gog-table__td{border-bottom:none}.gog-table__row{transition:background-color var(--gog-table-row-transition-duration) var(--gog-easing)}.gog-table__row--interactive{cursor:pointer}.gog-table__row--interactive:focus-visible{outline:var(--gog-table-focus-ring-width) solid var(--gog-table-focus-ring);outline-offset:calc(var(--gog-table-focus-ring-width) * -1)}.gog-table__row:hover{background-color:var(--gog-table-hover-bg)}.gog-table__row--selected,.gog-table__row--selected:hover{background-color:var(--gog-table-selected-bg)}.gog-table__empty{padding:var(--gog-table-empty-padding);text-align:center;color:var(--gog-table-muted-color);font-size:var(--gog-table-empty-font-size)}.gog-table--loading thead{opacity:var(--gog-table-loading-opacity);pointer-events:none}.gog-table__loading-cell{padding:var(--gog-table-loading-padding);text-align:center}.gog-table--col-borders .gog-table__th:not(:last-child),.gog-table--col-borders .gog-table__td:not(:last-child){border-inline-end:var(--gog-table-row-border-width) var(--gog-table-border-style) var(--gog-table-border-color)}.gog-table__footer{display:grid;grid-template-columns:1fr auto 1fr;grid-template-areas:\"left center right\";align-items:center;min-height:var(--gog-table-footer-min-height);gap:var(--gog-table-footer-gap)}.gog-table__total{font-size:var(--gog-table-total-font-size);color:var(--gog-table-muted-color);font-family:var(--gog-table-numeric-font-family);text-transform:var(--gog-table-total-text-transform);letter-spacing:var(--gog-table-total-letter-spacing)}.gog-table__total[style*=\"grid-area: right\"]{text-align:end}.gog-table__pagination[style*=\"grid-area: left\"]{justify-content:flex-start}.gog-table__pagination[style*=\"grid-area: center\"]{justify-content:center}.gog-table__pagination[style*=\"grid-area: right\"]{justify-content:flex-end}@media(prefers-reduced-motion:reduce){.gog-table__row{transition:none}}\n"], dependencies: [{ kind: "component", type: SpinnerComponent, selector: "gog-spinner", inputs: ["size", "overlay", "ariaLabel", "variant"] }, { kind: "component", type: PaginatorComponent, selector: "gog-paginator", inputs: ["page", "fullWidth", "totalPages", "totalRecords", "pageSize", "showPageSizeSelect", "pageSizeOptions", "rangeMode", "visiblePages", "showFirstPage", "showLastPage", "siblingCount", "size", "disabled", "ariaLabel"], outputs: ["pageChange", "pageSizeChange"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: IconComponent, selector: "gog-icon", inputs: ["name", "template", "title", "ariaHidden"] }, { kind: "component", type: ScrollComponent, selector: "gog-scroll", inputs: ["axis", "size", "autoHide", "hideDelay", "reachThreshold", "focusable", "ariaLabel", "overscrollBehavior", "showTrack"], outputs: ["gogScroll", "gogReachStart", "gogReachEnd"] }, { kind: "component", type: CheckboxComponent, selector: "gog-checkbox", inputs: ["label", "ariaLabel", "size", "indeterminate", "disabled", "fullWidth", "checked"], outputs: ["checkedChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
8937
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: TableComponent, isStandalone: true, selector: "gog-table", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, fullWidth: { classPropertyName: "fullWidth", publicName: "fullWidth", isSignal: true, isRequired: false, transformFunction: null }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null }, showPageSizeSelect: { classPropertyName: "showPageSizeSelect", publicName: "showPageSizeSelect", isSignal: true, isRequired: false, transformFunction: null }, pageSizeOptions: { classPropertyName: "pageSizeOptions", publicName: "pageSizeOptions", isSignal: true, isRequired: false, transformFunction: null }, lazy: { classPropertyName: "lazy", publicName: "lazy", isSignal: true, isRequired: false, transformFunction: null }, totalRecords: { classPropertyName: "totalRecords", publicName: "totalRecords", isSignal: true, isRequired: false, transformFunction: null }, interactiveRows: { classPropertyName: "interactiveRows", publicName: "interactiveRows", isSignal: true, isRequired: false, transformFunction: null }, selectionMode: { classPropertyName: "selectionMode", publicName: "selectionMode", isSignal: true, isRequired: false, transformFunction: null }, selection: { classPropertyName: "selection", publicName: "selection", isSignal: true, isRequired: false, transformFunction: null }, dataKey: { classPropertyName: "dataKey", publicName: "dataKey", isSignal: true, isRequired: false, transformFunction: null }, showSelectionColumn: { classPropertyName: "showSelectionColumn", publicName: "showSelectionColumn", isSignal: true, isRequired: false, transformFunction: null }, showRowNumbers: { classPropertyName: "showRowNumbers", publicName: "showRowNumbers", isSignal: true, isRequired: false, transformFunction: null }, showTotal: { classPropertyName: "showTotal", publicName: "showTotal", isSignal: true, isRequired: false, transformFunction: null }, emptyPlaceholder: { classPropertyName: "emptyPlaceholder", publicName: "emptyPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, paginatorPosition: { classPropertyName: "paginatorPosition", publicName: "paginatorPosition", isSignal: true, isRequired: false, transformFunction: null }, totalPosition: { classPropertyName: "totalPosition", publicName: "totalPosition", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, showColumnBorders: { classPropertyName: "showColumnBorders", publicName: "showColumnBorders", isSignal: true, isRequired: false, transformFunction: null }, stickyHeader: { classPropertyName: "stickyHeader", publicName: "stickyHeader", isSignal: true, isRequired: false, transformFunction: null }, maxHeight: { classPropertyName: "maxHeight", publicName: "maxHeight", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pageSize: "pageSizeChange", selection: "selectionChange", gogSortChange: "gogSortChange", gogPageChange: "gogPageChange", gogRowClick: "gogRowClick" }, host: { properties: { "style.display": "\"block\"", "style.width": "fullWidth() ? \"100%\" : \"fit-content\"", "attr.aria-busy": "loading() ? \"true\" : null" }, classAttribute: "gog-table-host" }, queries: [{ propertyName: "columns", predicate: GogColumn, isSignal: true }], ngImport: i0, template: "<div class=\"gog-table-wrapper gog-contained-layout\">\r\n <!--\r\n The vertical axis is enabled only when the table has been capped. Left on for an uncapped\r\n table, `gog-scroll` would make this viewport a scroll container on both axes, which puts it\r\n in the sticky chain of everything inside it and takes the consumer's own scrolling region\r\n out of it \u2014 measured: a header that used to pin to that region rode away by 147px.\r\n -->\r\n <gog-scroll\r\n [axis]=\"maxHeight() ? 'both' : 'horizontal'\"\r\n [style.max-height]=\"maxHeight()\"\r\n class=\"gog-table-scroll\"\r\n >\r\n <table\r\n class=\"gog-table\"\r\n [class]=\"sizeClass()\"\r\n [class.gog-table--col-borders]=\"showColumnBorders()\"\r\n [class.gog-table--loading]=\"loading()\"\r\n [class.gog-table--sticky-header]=\"stickyHeader()\"\r\n [class.gog-table--auto-layout]=\"!fullWidth()\"\r\n [style.width]=\"fullWidth() ? '100%' : 'fit-content'\"\r\n >\r\n <colgroup>\r\n @if (hasSelectionColumn()) {\r\n <col class=\"gog-table__col--select\" />\r\n }\r\n @if (showRowNumbers()) {\r\n <col class=\"gog-table__col--num\" />\r\n }\r\n @for (col of columns(); track col.field()) {\r\n <col\r\n [style.width]=\"col.width() || null\"\r\n [style.min-width]=\"col.minWidth() || null\"\r\n [style.max-width]=\"col.maxWidth() || null\"\r\n />\r\n }\r\n </colgroup>\r\n <thead>\r\n <tr>\r\n @if (hasSelectionColumn()) {\r\n <th class=\"gog-table__th gog-table__th--select\" scope=\"col\">\r\n <!--\r\n Only `multiple` gets a select-all: in `single` mode there is nothing to select\r\n all of, and a checkbox that can only ever check one row is a lie.\r\n -->\r\n @if (selectionMode() === 'multiple') {\r\n <gog-checkbox\r\n [checked]=\"allPageRowsSelected()\"\r\n [indeterminate]=\"somePageRowsSelected()\"\r\n [disabled]=\"loading() || visibleRows().length === 0\"\r\n [ariaLabel]=\"resolvedLabels().selectAllRows\"\r\n (checkedChange)=\"toggleAllOnPage($event)\"\r\n />\r\n }\r\n </th>\r\n }\r\n @if (showRowNumbers()) {\r\n <th class=\"gog-table__th gog-table__th--num\" scope=\"col\">#</th>\r\n }\r\n @for (col of columns(); track col.field()) {\r\n <th\r\n class=\"gog-table__th\"\r\n scope=\"col\"\r\n [class.gog-table__th--sortable]=\"col.sortable() && !loading()\"\r\n [class.gog-table__th--sorted]=\"getSortDirection(col.field())\"\r\n [attr.aria-sort]=\"getAriaSort(col.field())\"\r\n [attr.tabindex]=\"col.sortable() && !loading() ? 0 : null\"\r\n (click)=\"handleSortClick(col)\"\r\n (keydown.enter)=\"handleSortClick(col)\"\r\n (keydown.space)=\"handleSortClick(col); $event.preventDefault()\"\r\n >\r\n @if (getHeaderTemplate(col); as headerTpl) {\r\n <ng-container *ngTemplateOutlet=\"headerTpl; context: headerContext(col)\" />\r\n } @else {\r\n <span class=\"gog-table__th-inner\">\r\n {{ col.header() || col.field() }}\r\n @if (col.sortable() && !loading()) {\r\n <span class=\"gog-table__sort-icon\" aria-hidden=\"true\">\r\n @if (getSortDirection(col.field()) === 'asc') {\r\n <gog-icon name=\"sort-up\" />\r\n } @else if (getSortDirection(col.field()) === 'desc') {\r\n <gog-icon name=\"sort-down\" />\r\n } @else {\r\n <gog-icon name=\"sort\" />\r\n }\r\n </span>\r\n }\r\n </span>\r\n }\r\n </th>\r\n }\r\n </tr>\r\n </thead>\r\n <tbody>\r\n @if (loading()) {\r\n <tr>\r\n <td class=\"gog-table__loading-cell\" [attr.colspan]=\"emptyColspan()\">\r\n <gog-spinner size=\"md\" />\r\n </td>\r\n </tr>\r\n } @else if (visibleRows().length === 0) {\r\n <tr>\r\n <td class=\"gog-table__empty\" [attr.colspan]=\"emptyColspan()\">\u2014</td>\r\n </tr>\r\n } @else {\r\n @for (row of visibleRows(); track rowKey(row); let i = $index) {\r\n <tr\r\n class=\"gog-table__row\"\r\n [class.gog-table__row--interactive]=\"interactiveRows()\"\r\n [class.gog-table__row--selected]=\"isSelected(row)\"\r\n [attr.tabindex]=\"interactiveRows() ? 0 : null\"\r\n [attr.aria-selected]=\"hasSelection() ? isSelected(row) : null\"\r\n (click)=\"emitRowClick(row, i, $event)\"\r\n (keydown)=\"onRowKeydown(row, i, $event)\"\r\n >\r\n @if (hasSelectionColumn()) {\r\n <td class=\"gog-table__td gog-table__td--select\">\r\n <!--\r\n `$event.stopPropagation()` so ticking the box does not also count as a row\r\n click: with `interactiveRows` those are two different intents, and firing both\r\n from one gesture is how a \"select\" ends up navigating away.\r\n -->\r\n <gog-checkbox\r\n [checked]=\"isSelected(row)\"\r\n [ariaLabel]=\"resolvedLabels().selectRow\"\r\n (click)=\"$event.stopPropagation()\"\r\n (checkedChange)=\"toggleRowSelection(row, $event)\"\r\n />\r\n </td>\r\n }\r\n @if (showRowNumbers()) {\r\n <td class=\"gog-table__td gog-table__td--num\">{{ globalRowIndex(i) }}</td>\r\n }\r\n @for (col of columns(); track col.field()) {\r\n <td class=\"gog-table__td\">\r\n @if (getBodyTemplate(col); as bodyTpl) {\r\n <ng-container *ngTemplateOutlet=\"bodyTpl; context: bodyContext(row, col, i)\" />\r\n } @else {\r\n {{ formatCellValue(row, col.field()) }}\r\n }\r\n </td>\r\n }\r\n </tr>\r\n }\r\n }\r\n </tbody>\r\n </table>\r\n </gog-scroll>\r\n\r\n @if (hasPagination() || showTotal()) {\r\n <div class=\"gog-table__footer\">\r\n @if (showTotal()) {\r\n <span class=\"gog-table__total\" [style.grid-area]=\"totalGridArea()\">\r\n {{ resolvedLabels().total }}: {{ rowCount() }}\r\n </span>\r\n }\r\n\r\n @if (hasPagination()) {\r\n <!--\r\n `[(pageSize)]` straight through to the table's own model: the rows-per-page select\r\n writes back here, and a consumer binding `[(pageSize)]` on the table sees it. No\r\n intermediate signal, in either direction.\r\n -->\r\n <gog-paginator\r\n class=\"gog-table__pagination\"\r\n [style.grid-area]=\"paginatorGridArea()\"\r\n [(page)]=\"currentPage\"\r\n [(pageSize)]=\"pageSize\"\r\n [totalPages]=\"totalPages()\"\r\n [showPageSizeSelect]=\"showPageSizeSelect()\"\r\n [pageSizeOptions]=\"pageSizeOptions()\"\r\n rangeMode=\"ellipsis\"\r\n size=\"sm\"\r\n [ariaLabel]=\"resolvedLabels().pagination\"\r\n />\r\n }\r\n </div>\r\n }\r\n</div>\r\n", styles: ["@charset \"UTF-8\";.gog-table-wrapper{display:flex;flex-direction:column;gap:var(--gog-table-gap);width:100%;overflow-anchor:none}.gog-table-scroll{width:100%}.gog-table{width:100%;border-collapse:collapse;border:var(--gog-table-border-width) var(--gog-table-border-style) var(--gog-table-border-color);background-color:var(--gog-table-surface);color:var(--gog-table-text-color);font-family:var(--gog-table-font-family);table-layout:fixed}.gog-table--auto-layout{table-layout:auto}.gog-table--slg{--gog-table-size-th-padding-v: var(--gog-table-slg-padding-v);--gog-table-size-td-padding-v: var(--gog-table-slg-padding-v);--gog-table-size-th-font-size: var(--gog-table-slg-th-font-size);--gog-table-size-td-font-size: var(--gog-table-slg-td-font-size)}.gog-table--md{--gog-table-size-th-padding-v: var(--gog-table-md-padding-v);--gog-table-size-td-padding-v: var(--gog-table-md-padding-v);--gog-table-size-th-font-size: var(--gog-table-md-th-font-size);--gog-table-size-td-font-size: var(--gog-table-md-td-font-size)}.gog-table--sm{--gog-table-size-th-padding-v: var(--gog-table-sm-padding-v);--gog-table-size-td-padding-v: var(--gog-table-sm-padding-v);--gog-table-size-th-font-size: var(--gog-table-sm-th-font-size);--gog-table-size-td-font-size: var(--gog-table-sm-td-font-size)}.gog-table--xsm{--gog-table-size-th-padding-v: var(--gog-table-xsm-padding-v);--gog-table-size-td-padding-v: var(--gog-table-xsm-padding-v);--gog-table-size-th-font-size: var(--gog-table-xsm-th-font-size);--gog-table-size-td-font-size: var(--gog-table-xsm-td-font-size)}.gog-table__col--num{width:var(--gog-table-num-col-width)}.gog-table__th{padding:var(--gog-table-th-padding-v, var(--gog-table-size-th-padding-v, var(--gog-table-lg-padding-v))) var(--gog-table-padding-h);text-align:start;font-family:var(--gog-table-header-font-family);font-size:var(--gog-table-th-font-size, var(--gog-table-size-th-font-size, var(--gog-table-lg-th-font-size)));text-transform:var(--gog-table-header-text-transform);letter-spacing:var(--gog-table-header-letter-spacing);color:var(--gog-table-accent-color);background-color:var(--gog-table-surface);border-bottom:var(--gog-table-border-width) var(--gog-table-border-style) var(--gog-table-border-color);white-space:normal;overflow:hidden}.gog-table--sticky-header .gog-table__th{position:sticky;top:0;z-index:1}.gog-table__th--num{width:var(--gog-table-num-col-width);text-align:center;color:var(--gog-table-muted-color)}.gog-table__th--select,.gog-table__td--select{width:var(--gog-table-select-col-width);text-align:center}.gog-table__th--sortable{cursor:pointer;-webkit-user-select:none;user-select:none}.gog-table__th--sortable:focus-visible{outline:var(--gog-table-focus-ring-width) solid var(--gog-table-focus-ring);outline-offset:calc(var(--gog-table-focus-ring-width) * -1)}.gog-table__th--sortable:hover,.gog-table__th--sorted{color:var(--gog-table-accent-bright)}.gog-table__th-inner{display:inline-flex;align-items:center;gap:var(--gog-table-th-inner-gap);width:100%}.gog-table__sort-icon{display:inline-block;width:var(--gog-table-sort-icon-width);text-align:center;font-size:var(--gog-table-sort-icon-size);opacity:var(--gog-table-sort-icon-opacity);flex-shrink:0}.gog-table__th--sorted .gog-table__sort-icon{opacity:1}.gog-table__td{padding:var(--gog-table-td-padding-v, var(--gog-table-size-td-padding-v, var(--gog-table-lg-padding-v))) var(--gog-table-padding-h);font-size:var(--gog-table-td-font-size, var(--gog-table-size-td-font-size, var(--gog-table-lg-td-font-size)));border-bottom:var(--gog-table-row-border-width) var(--gog-table-border-style) var(--gog-table-border-color);vertical-align:middle;overflow-wrap:break-word;word-break:break-word;overflow:hidden}.gog-table__td--num{text-align:center;color:var(--gog-table-muted-color);font-size:var(--gog-table-num-font-size);font-family:var(--gog-table-numeric-font-family);width:var(--gog-table-num-col-width)}.gog-table__row:last-child .gog-table__td{border-bottom:none}.gog-table__row{transition:background-color var(--gog-table-row-transition-duration) var(--gog-easing)}.gog-table__row--interactive{cursor:pointer}.gog-table__row--interactive:focus-visible{outline:var(--gog-table-focus-ring-width) solid var(--gog-table-focus-ring);outline-offset:calc(var(--gog-table-focus-ring-width) * -1)}.gog-table__row:hover{background-color:var(--gog-table-hover-bg)}.gog-table__row--selected,.gog-table__row--selected:hover{background-color:var(--gog-table-selected-bg)}.gog-table__empty{padding:var(--gog-table-empty-padding);text-align:center;color:var(--gog-table-muted-color);font-size:var(--gog-table-empty-font-size)}.gog-table--loading thead{opacity:var(--gog-table-loading-opacity);pointer-events:none}.gog-table__loading-cell{padding:var(--gog-table-loading-padding);text-align:center}.gog-table--col-borders .gog-table__th:not(:last-child),.gog-table--col-borders .gog-table__td:not(:last-child){border-inline-end:var(--gog-table-row-border-width) var(--gog-table-border-style) var(--gog-table-border-color)}.gog-table__footer{display:grid;grid-template-columns:1fr auto 1fr;grid-template-areas:\"left center right\";align-items:center;min-height:var(--gog-table-footer-min-height);gap:var(--gog-table-footer-gap)}.gog-table__total{font-size:var(--gog-table-total-font-size);color:var(--gog-table-muted-color);font-family:var(--gog-table-numeric-font-family);text-transform:var(--gog-table-total-text-transform);letter-spacing:var(--gog-table-total-letter-spacing)}.gog-table__total[style*=\"grid-area: right\"]{text-align:end}.gog-table__pagination[style*=\"grid-area: left\"]{justify-content:flex-start}.gog-table__pagination[style*=\"grid-area: center\"]{justify-content:center}.gog-table__pagination[style*=\"grid-area: right\"]{justify-content:flex-end}@media(prefers-reduced-motion:reduce){.gog-table__row{transition:none}}\n"], dependencies: [{ kind: "component", type: SpinnerComponent, selector: "gog-spinner", inputs: ["size", "overlay", "ariaLabel", "variant"] }, { kind: "component", type: PaginatorComponent, selector: "gog-paginator", inputs: ["page", "fullWidth", "totalPages", "totalRecords", "pageSize", "showPageSizeSelect", "pageSizeOptions", "rangeMode", "visiblePages", "showFirstPage", "showLastPage", "siblingCount", "size", "disabled", "ariaLabel"], outputs: ["pageChange", "pageSizeChange"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: IconComponent, selector: "gog-icon", inputs: ["name", "template", "title", "ariaHidden"] }, { kind: "component", type: ScrollComponent, selector: "gog-scroll", inputs: ["axis", "size", "autoHide", "hideDelay", "reachThreshold", "focusable", "ariaLabel", "overscrollBehavior", "showTrack"], outputs: ["gogScroll", "gogReachStart", "gogReachEnd"] }, { kind: "component", type: CheckboxComponent, selector: "gog-checkbox", inputs: ["label", "ariaLabel", "size", "indeterminate", "disabled", "fullWidth", "checked"], outputs: ["checkedChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
8161
8938
|
}
|
|
8162
8939
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: TableComponent, decorators: [{
|
|
8163
8940
|
type: Component,
|
|
@@ -8172,6 +8949,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
|
|
|
8172
8949
|
class: 'gog-table-host',
|
|
8173
8950
|
'[style.display]': '"block"',
|
|
8174
8951
|
'[style.width]': 'fullWidth() ? "100%" : "fit-content"',
|
|
8952
|
+
/*
|
|
8953
|
+
* While loading, the body is a single cell holding a spinner and the header is dimmed and
|
|
8954
|
+
* inert — so the table has no rows to announce and nothing saying more are coming. Required
|
|
8955
|
+
* of every `loading` input; see the loading-state rule in `api-design.instructions.md`.
|
|
8956
|
+
*/
|
|
8957
|
+
'[attr.aria-busy]': 'loading() ? "true" : null',
|
|
8175
8958
|
}, template: "<div class=\"gog-table-wrapper gog-contained-layout\">\r\n <!--\r\n The vertical axis is enabled only when the table has been capped. Left on for an uncapped\r\n table, `gog-scroll` would make this viewport a scroll container on both axes, which puts it\r\n in the sticky chain of everything inside it and takes the consumer's own scrolling region\r\n out of it \u2014 measured: a header that used to pin to that region rode away by 147px.\r\n -->\r\n <gog-scroll\r\n [axis]=\"maxHeight() ? 'both' : 'horizontal'\"\r\n [style.max-height]=\"maxHeight()\"\r\n class=\"gog-table-scroll\"\r\n >\r\n <table\r\n class=\"gog-table\"\r\n [class]=\"sizeClass()\"\r\n [class.gog-table--col-borders]=\"showColumnBorders()\"\r\n [class.gog-table--loading]=\"loading()\"\r\n [class.gog-table--sticky-header]=\"stickyHeader()\"\r\n [class.gog-table--auto-layout]=\"!fullWidth()\"\r\n [style.width]=\"fullWidth() ? '100%' : 'fit-content'\"\r\n >\r\n <colgroup>\r\n @if (hasSelectionColumn()) {\r\n <col class=\"gog-table__col--select\" />\r\n }\r\n @if (showRowNumbers()) {\r\n <col class=\"gog-table__col--num\" />\r\n }\r\n @for (col of columns(); track col.field()) {\r\n <col\r\n [style.width]=\"col.width() || null\"\r\n [style.min-width]=\"col.minWidth() || null\"\r\n [style.max-width]=\"col.maxWidth() || null\"\r\n />\r\n }\r\n </colgroup>\r\n <thead>\r\n <tr>\r\n @if (hasSelectionColumn()) {\r\n <th class=\"gog-table__th gog-table__th--select\" scope=\"col\">\r\n <!--\r\n Only `multiple` gets a select-all: in `single` mode there is nothing to select\r\n all of, and a checkbox that can only ever check one row is a lie.\r\n -->\r\n @if (selectionMode() === 'multiple') {\r\n <gog-checkbox\r\n [checked]=\"allPageRowsSelected()\"\r\n [indeterminate]=\"somePageRowsSelected()\"\r\n [disabled]=\"loading() || visibleRows().length === 0\"\r\n [ariaLabel]=\"resolvedLabels().selectAllRows\"\r\n (checkedChange)=\"toggleAllOnPage($event)\"\r\n />\r\n }\r\n </th>\r\n }\r\n @if (showRowNumbers()) {\r\n <th class=\"gog-table__th gog-table__th--num\" scope=\"col\">#</th>\r\n }\r\n @for (col of columns(); track col.field()) {\r\n <th\r\n class=\"gog-table__th\"\r\n scope=\"col\"\r\n [class.gog-table__th--sortable]=\"col.sortable() && !loading()\"\r\n [class.gog-table__th--sorted]=\"getSortDirection(col.field())\"\r\n [attr.aria-sort]=\"getAriaSort(col.field())\"\r\n [attr.tabindex]=\"col.sortable() && !loading() ? 0 : null\"\r\n (click)=\"handleSortClick(col)\"\r\n (keydown.enter)=\"handleSortClick(col)\"\r\n (keydown.space)=\"handleSortClick(col); $event.preventDefault()\"\r\n >\r\n @if (getHeaderTemplate(col); as headerTpl) {\r\n <ng-container *ngTemplateOutlet=\"headerTpl; context: headerContext(col)\" />\r\n } @else {\r\n <span class=\"gog-table__th-inner\">\r\n {{ col.header() || col.field() }}\r\n @if (col.sortable() && !loading()) {\r\n <span class=\"gog-table__sort-icon\" aria-hidden=\"true\">\r\n @if (getSortDirection(col.field()) === 'asc') {\r\n <gog-icon name=\"sort-up\" />\r\n } @else if (getSortDirection(col.field()) === 'desc') {\r\n <gog-icon name=\"sort-down\" />\r\n } @else {\r\n <gog-icon name=\"sort\" />\r\n }\r\n </span>\r\n }\r\n </span>\r\n }\r\n </th>\r\n }\r\n </tr>\r\n </thead>\r\n <tbody>\r\n @if (loading()) {\r\n <tr>\r\n <td class=\"gog-table__loading-cell\" [attr.colspan]=\"emptyColspan()\">\r\n <gog-spinner size=\"md\" />\r\n </td>\r\n </tr>\r\n } @else if (visibleRows().length === 0) {\r\n <tr>\r\n <td class=\"gog-table__empty\" [attr.colspan]=\"emptyColspan()\">\u2014</td>\r\n </tr>\r\n } @else {\r\n @for (row of visibleRows(); track rowKey(row); let i = $index) {\r\n <tr\r\n class=\"gog-table__row\"\r\n [class.gog-table__row--interactive]=\"interactiveRows()\"\r\n [class.gog-table__row--selected]=\"isSelected(row)\"\r\n [attr.tabindex]=\"interactiveRows() ? 0 : null\"\r\n [attr.aria-selected]=\"hasSelection() ? isSelected(row) : null\"\r\n (click)=\"emitRowClick(row, i, $event)\"\r\n (keydown)=\"onRowKeydown(row, i, $event)\"\r\n >\r\n @if (hasSelectionColumn()) {\r\n <td class=\"gog-table__td gog-table__td--select\">\r\n <!--\r\n `$event.stopPropagation()` so ticking the box does not also count as a row\r\n click: with `interactiveRows` those are two different intents, and firing both\r\n from one gesture is how a \"select\" ends up navigating away.\r\n -->\r\n <gog-checkbox\r\n [checked]=\"isSelected(row)\"\r\n [ariaLabel]=\"resolvedLabels().selectRow\"\r\n (click)=\"$event.stopPropagation()\"\r\n (checkedChange)=\"toggleRowSelection(row, $event)\"\r\n />\r\n </td>\r\n }\r\n @if (showRowNumbers()) {\r\n <td class=\"gog-table__td gog-table__td--num\">{{ globalRowIndex(i) }}</td>\r\n }\r\n @for (col of columns(); track col.field()) {\r\n <td class=\"gog-table__td\">\r\n @if (getBodyTemplate(col); as bodyTpl) {\r\n <ng-container *ngTemplateOutlet=\"bodyTpl; context: bodyContext(row, col, i)\" />\r\n } @else {\r\n {{ formatCellValue(row, col.field()) }}\r\n }\r\n </td>\r\n }\r\n </tr>\r\n }\r\n }\r\n </tbody>\r\n </table>\r\n </gog-scroll>\r\n\r\n @if (hasPagination() || showTotal()) {\r\n <div class=\"gog-table__footer\">\r\n @if (showTotal()) {\r\n <span class=\"gog-table__total\" [style.grid-area]=\"totalGridArea()\">\r\n {{ resolvedLabels().total }}: {{ rowCount() }}\r\n </span>\r\n }\r\n\r\n @if (hasPagination()) {\r\n <!--\r\n `[(pageSize)]` straight through to the table's own model: the rows-per-page select\r\n writes back here, and a consumer binding `[(pageSize)]` on the table sees it. No\r\n intermediate signal, in either direction.\r\n -->\r\n <gog-paginator\r\n class=\"gog-table__pagination\"\r\n [style.grid-area]=\"paginatorGridArea()\"\r\n [(page)]=\"currentPage\"\r\n [(pageSize)]=\"pageSize\"\r\n [totalPages]=\"totalPages()\"\r\n [showPageSizeSelect]=\"showPageSizeSelect()\"\r\n [pageSizeOptions]=\"pageSizeOptions()\"\r\n rangeMode=\"ellipsis\"\r\n size=\"sm\"\r\n [ariaLabel]=\"resolvedLabels().pagination\"\r\n />\r\n }\r\n </div>\r\n }\r\n</div>\r\n", styles: ["@charset \"UTF-8\";.gog-table-wrapper{display:flex;flex-direction:column;gap:var(--gog-table-gap);width:100%;overflow-anchor:none}.gog-table-scroll{width:100%}.gog-table{width:100%;border-collapse:collapse;border:var(--gog-table-border-width) var(--gog-table-border-style) var(--gog-table-border-color);background-color:var(--gog-table-surface);color:var(--gog-table-text-color);font-family:var(--gog-table-font-family);table-layout:fixed}.gog-table--auto-layout{table-layout:auto}.gog-table--slg{--gog-table-size-th-padding-v: var(--gog-table-slg-padding-v);--gog-table-size-td-padding-v: var(--gog-table-slg-padding-v);--gog-table-size-th-font-size: var(--gog-table-slg-th-font-size);--gog-table-size-td-font-size: var(--gog-table-slg-td-font-size)}.gog-table--md{--gog-table-size-th-padding-v: var(--gog-table-md-padding-v);--gog-table-size-td-padding-v: var(--gog-table-md-padding-v);--gog-table-size-th-font-size: var(--gog-table-md-th-font-size);--gog-table-size-td-font-size: var(--gog-table-md-td-font-size)}.gog-table--sm{--gog-table-size-th-padding-v: var(--gog-table-sm-padding-v);--gog-table-size-td-padding-v: var(--gog-table-sm-padding-v);--gog-table-size-th-font-size: var(--gog-table-sm-th-font-size);--gog-table-size-td-font-size: var(--gog-table-sm-td-font-size)}.gog-table--xsm{--gog-table-size-th-padding-v: var(--gog-table-xsm-padding-v);--gog-table-size-td-padding-v: var(--gog-table-xsm-padding-v);--gog-table-size-th-font-size: var(--gog-table-xsm-th-font-size);--gog-table-size-td-font-size: var(--gog-table-xsm-td-font-size)}.gog-table__col--num{width:var(--gog-table-num-col-width)}.gog-table__th{padding:var(--gog-table-th-padding-v, var(--gog-table-size-th-padding-v, var(--gog-table-lg-padding-v))) var(--gog-table-padding-h);text-align:start;font-family:var(--gog-table-header-font-family);font-size:var(--gog-table-th-font-size, var(--gog-table-size-th-font-size, var(--gog-table-lg-th-font-size)));text-transform:var(--gog-table-header-text-transform);letter-spacing:var(--gog-table-header-letter-spacing);color:var(--gog-table-accent-color);background-color:var(--gog-table-surface);border-bottom:var(--gog-table-border-width) var(--gog-table-border-style) var(--gog-table-border-color);white-space:normal;overflow:hidden}.gog-table--sticky-header .gog-table__th{position:sticky;top:0;z-index:1}.gog-table__th--num{width:var(--gog-table-num-col-width);text-align:center;color:var(--gog-table-muted-color)}.gog-table__th--select,.gog-table__td--select{width:var(--gog-table-select-col-width);text-align:center}.gog-table__th--sortable{cursor:pointer;-webkit-user-select:none;user-select:none}.gog-table__th--sortable:focus-visible{outline:var(--gog-table-focus-ring-width) solid var(--gog-table-focus-ring);outline-offset:calc(var(--gog-table-focus-ring-width) * -1)}.gog-table__th--sortable:hover,.gog-table__th--sorted{color:var(--gog-table-accent-bright)}.gog-table__th-inner{display:inline-flex;align-items:center;gap:var(--gog-table-th-inner-gap);width:100%}.gog-table__sort-icon{display:inline-block;width:var(--gog-table-sort-icon-width);text-align:center;font-size:var(--gog-table-sort-icon-size);opacity:var(--gog-table-sort-icon-opacity);flex-shrink:0}.gog-table__th--sorted .gog-table__sort-icon{opacity:1}.gog-table__td{padding:var(--gog-table-td-padding-v, var(--gog-table-size-td-padding-v, var(--gog-table-lg-padding-v))) var(--gog-table-padding-h);font-size:var(--gog-table-td-font-size, var(--gog-table-size-td-font-size, var(--gog-table-lg-td-font-size)));border-bottom:var(--gog-table-row-border-width) var(--gog-table-border-style) var(--gog-table-border-color);vertical-align:middle;overflow-wrap:break-word;word-break:break-word;overflow:hidden}.gog-table__td--num{text-align:center;color:var(--gog-table-muted-color);font-size:var(--gog-table-num-font-size);font-family:var(--gog-table-numeric-font-family);width:var(--gog-table-num-col-width)}.gog-table__row:last-child .gog-table__td{border-bottom:none}.gog-table__row{transition:background-color var(--gog-table-row-transition-duration) var(--gog-easing)}.gog-table__row--interactive{cursor:pointer}.gog-table__row--interactive:focus-visible{outline:var(--gog-table-focus-ring-width) solid var(--gog-table-focus-ring);outline-offset:calc(var(--gog-table-focus-ring-width) * -1)}.gog-table__row:hover{background-color:var(--gog-table-hover-bg)}.gog-table__row--selected,.gog-table__row--selected:hover{background-color:var(--gog-table-selected-bg)}.gog-table__empty{padding:var(--gog-table-empty-padding);text-align:center;color:var(--gog-table-muted-color);font-size:var(--gog-table-empty-font-size)}.gog-table--loading thead{opacity:var(--gog-table-loading-opacity);pointer-events:none}.gog-table__loading-cell{padding:var(--gog-table-loading-padding);text-align:center}.gog-table--col-borders .gog-table__th:not(:last-child),.gog-table--col-borders .gog-table__td:not(:last-child){border-inline-end:var(--gog-table-row-border-width) var(--gog-table-border-style) var(--gog-table-border-color)}.gog-table__footer{display:grid;grid-template-columns:1fr auto 1fr;grid-template-areas:\"left center right\";align-items:center;min-height:var(--gog-table-footer-min-height);gap:var(--gog-table-footer-gap)}.gog-table__total{font-size:var(--gog-table-total-font-size);color:var(--gog-table-muted-color);font-family:var(--gog-table-numeric-font-family);text-transform:var(--gog-table-total-text-transform);letter-spacing:var(--gog-table-total-letter-spacing)}.gog-table__total[style*=\"grid-area: right\"]{text-align:end}.gog-table__pagination[style*=\"grid-area: left\"]{justify-content:flex-start}.gog-table__pagination[style*=\"grid-area: center\"]{justify-content:center}.gog-table__pagination[style*=\"grid-area: right\"]{justify-content:flex-end}@media(prefers-reduced-motion:reduce){.gog-table__row{transition:none}}\n"] }]
|
|
8176
8959
|
}], ctorParameters: () => [], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], fullWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "fullWidth", required: false }] }], pageSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageSize", required: false }] }, { type: i0.Output, args: ["pageSizeChange"] }], showPageSizeSelect: [{ type: i0.Input, args: [{ isSignal: true, alias: "showPageSizeSelect", required: false }] }], pageSizeOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageSizeOptions", required: false }] }], lazy: [{ type: i0.Input, args: [{ isSignal: true, alias: "lazy", required: false }] }], totalRecords: [{ type: i0.Input, args: [{ isSignal: true, alias: "totalRecords", required: false }] }], interactiveRows: [{ type: i0.Input, args: [{ isSignal: true, alias: "interactiveRows", required: false }] }], selectionMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectionMode", required: false }] }], selection: [{ type: i0.Input, args: [{ isSignal: true, alias: "selection", required: false }] }, { type: i0.Output, args: ["selectionChange"] }], dataKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataKey", required: false }] }], showSelectionColumn: [{ type: i0.Input, args: [{ isSignal: true, alias: "showSelectionColumn", required: false }] }], showRowNumbers: [{ type: i0.Input, args: [{ isSignal: true, alias: "showRowNumbers", required: false }] }], showTotal: [{ type: i0.Input, args: [{ isSignal: true, alias: "showTotal", required: false }] }], emptyPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyPlaceholder", required: false }] }], paginatorPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "paginatorPosition", required: false }] }], totalPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "totalPosition", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], showColumnBorders: [{ type: i0.Input, args: [{ isSignal: true, alias: "showColumnBorders", required: false }] }], stickyHeader: [{ type: i0.Input, args: [{ isSignal: true, alias: "stickyHeader", required: false }] }], maxHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxHeight", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], gogSortChange: [{ type: i0.Output, args: ["gogSortChange"] }], gogPageChange: [{ type: i0.Output, args: ["gogPageChange"] }], gogRowClick: [{ type: i0.Output, args: ["gogRowClick"] }], columns: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => GogColumn), { isSignal: true }] }] } });
|
|
8177
8960
|
|
|
@@ -8312,7 +9095,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
|
|
|
8312
9095
|
// GENERATED by scripts/generate-deprecations.mjs — do not edit by hand.
|
|
8313
9096
|
// Run `npm run generate:deprecations`; `npm run check:deprecations` fails on a stale copy.
|
|
8314
9097
|
/**
|
|
8315
|
-
* Everything `@guildofgleks/ui` currently deprecates: 0 symbol(s) and
|
|
9098
|
+
* Everything `@guildofgleks/ui` currently deprecates: 0 symbol(s) and 0 token(s).
|
|
8316
9099
|
*
|
|
8317
9100
|
* Generated from the library's own source — `@deprecated` tags for symbols, and the stylesheets
|
|
8318
9101
|
* themselves for tokens — so it cannot drift from what actually still resolves. Meant for tooling
|
|
@@ -8322,1240 +9105,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
|
|
|
8322
9105
|
* An empty `symbol` half means exactly what it says: nothing in the TypeScript API is deprecated
|
|
8323
9106
|
* right now.
|
|
8324
9107
|
*/
|
|
8325
|
-
const GOG_DEPRECATIONS = [
|
|
8326
|
-
{
|
|
8327
|
-
kind: 'token',
|
|
8328
|
-
name: '--gog-btn-',
|
|
8329
|
-
replacement: '--gog-button-',
|
|
8330
|
-
since: '21.5.0',
|
|
8331
|
-
sinceDate: '2026-08-19',
|
|
8332
|
-
removedIn: '21.7.0',
|
|
8333
|
-
},
|
|
8334
|
-
{
|
|
8335
|
-
kind: 'token',
|
|
8336
|
-
name: '--gog-btn-active-scale',
|
|
8337
|
-
replacement: '--gog-button-active-scale',
|
|
8338
|
-
since: '21.5.0',
|
|
8339
|
-
sinceDate: '2026-08-19',
|
|
8340
|
-
removedIn: '21.7.0',
|
|
8341
|
-
},
|
|
8342
|
-
{
|
|
8343
|
-
kind: 'token',
|
|
8344
|
-
name: '--gog-btn-bg',
|
|
8345
|
-
replacement: '--gog-button-bg',
|
|
8346
|
-
since: '21.5.0',
|
|
8347
|
-
sinceDate: '2026-08-19',
|
|
8348
|
-
removedIn: '21.7.0',
|
|
8349
|
-
},
|
|
8350
|
-
{
|
|
8351
|
-
kind: 'token',
|
|
8352
|
-
name: '--gog-btn-border',
|
|
8353
|
-
replacement: '--gog-button-border',
|
|
8354
|
-
since: '21.5.0',
|
|
8355
|
-
sinceDate: '2026-08-19',
|
|
8356
|
-
removedIn: '21.7.0',
|
|
8357
|
-
},
|
|
8358
|
-
{
|
|
8359
|
-
kind: 'token',
|
|
8360
|
-
name: '--gog-btn-border-style',
|
|
8361
|
-
replacement: '--gog-button-border-style',
|
|
8362
|
-
since: '21.5.0',
|
|
8363
|
-
sinceDate: '2026-08-19',
|
|
8364
|
-
removedIn: '21.7.0',
|
|
8365
|
-
},
|
|
8366
|
-
{
|
|
8367
|
-
kind: 'token',
|
|
8368
|
-
name: '--gog-btn-border-width',
|
|
8369
|
-
replacement: '--gog-button-border-width',
|
|
8370
|
-
since: '21.5.0',
|
|
8371
|
-
sinceDate: '2026-08-19',
|
|
8372
|
-
removedIn: '21.7.0',
|
|
8373
|
-
},
|
|
8374
|
-
{
|
|
8375
|
-
kind: 'token',
|
|
8376
|
-
name: '--gog-btn-color',
|
|
8377
|
-
replacement: '--gog-button-color',
|
|
8378
|
-
since: '21.5.0',
|
|
8379
|
-
sinceDate: '2026-08-19',
|
|
8380
|
-
removedIn: '21.7.0',
|
|
8381
|
-
},
|
|
8382
|
-
{
|
|
8383
|
-
kind: 'token',
|
|
8384
|
-
name: '--gog-btn-disabled-opacity',
|
|
8385
|
-
replacement: '--gog-button-disabled-opacity',
|
|
8386
|
-
since: '21.5.0',
|
|
8387
|
-
sinceDate: '2026-08-19',
|
|
8388
|
-
removedIn: '21.7.0',
|
|
8389
|
-
},
|
|
8390
|
-
{
|
|
8391
|
-
kind: 'token',
|
|
8392
|
-
name: '--gog-btn-focus-ring-offset',
|
|
8393
|
-
replacement: '--gog-button-focus-ring-offset',
|
|
8394
|
-
since: '21.5.0',
|
|
8395
|
-
sinceDate: '2026-08-19',
|
|
8396
|
-
removedIn: '21.7.0',
|
|
8397
|
-
},
|
|
8398
|
-
{
|
|
8399
|
-
kind: 'token',
|
|
8400
|
-
name: '--gog-btn-focus-ring-width',
|
|
8401
|
-
replacement: '--gog-button-focus-ring-width',
|
|
8402
|
-
since: '21.5.0',
|
|
8403
|
-
sinceDate: '2026-08-19',
|
|
8404
|
-
removedIn: '21.7.0',
|
|
8405
|
-
},
|
|
8406
|
-
{
|
|
8407
|
-
kind: 'token',
|
|
8408
|
-
name: '--gog-btn-font-family',
|
|
8409
|
-
replacement: '--gog-button-font-family',
|
|
8410
|
-
since: '21.5.0',
|
|
8411
|
-
sinceDate: '2026-08-19',
|
|
8412
|
-
removedIn: '21.7.0',
|
|
8413
|
-
},
|
|
8414
|
-
{
|
|
8415
|
-
kind: 'token',
|
|
8416
|
-
name: '--gog-btn-font-size',
|
|
8417
|
-
replacement: '--gog-button-font-size',
|
|
8418
|
-
since: '21.5.0',
|
|
8419
|
-
sinceDate: '2026-08-19',
|
|
8420
|
-
removedIn: '21.7.0',
|
|
8421
|
-
},
|
|
8422
|
-
{
|
|
8423
|
-
kind: 'token',
|
|
8424
|
-
name: '--gog-btn-font-weight',
|
|
8425
|
-
replacement: '--gog-button-font-weight',
|
|
8426
|
-
since: '21.5.0',
|
|
8427
|
-
sinceDate: '2026-08-19',
|
|
8428
|
-
removedIn: '21.7.0',
|
|
8429
|
-
},
|
|
8430
|
-
{
|
|
8431
|
-
kind: 'token',
|
|
8432
|
-
name: '--gog-btn-gap',
|
|
8433
|
-
replacement: '--gog-button-gap',
|
|
8434
|
-
since: '21.5.0',
|
|
8435
|
-
sinceDate: '2026-08-19',
|
|
8436
|
-
removedIn: '21.7.0',
|
|
8437
|
-
},
|
|
8438
|
-
{
|
|
8439
|
-
kind: 'token',
|
|
8440
|
-
name: '--gog-btn-ghost-bg',
|
|
8441
|
-
replacement: '--gog-button-ghost-bg',
|
|
8442
|
-
since: '21.5.0',
|
|
8443
|
-
sinceDate: '2026-08-19',
|
|
8444
|
-
removedIn: '21.7.0',
|
|
8445
|
-
},
|
|
8446
|
-
{
|
|
8447
|
-
kind: 'token',
|
|
8448
|
-
name: '--gog-btn-ghost-border',
|
|
8449
|
-
replacement: '--gog-button-ghost-border',
|
|
8450
|
-
since: '21.5.0',
|
|
8451
|
-
sinceDate: '2026-08-19',
|
|
8452
|
-
removedIn: '21.7.0',
|
|
8453
|
-
},
|
|
8454
|
-
{
|
|
8455
|
-
kind: 'token',
|
|
8456
|
-
name: '--gog-btn-ghost-color',
|
|
8457
|
-
replacement: '--gog-button-ghost-color',
|
|
8458
|
-
since: '21.5.0',
|
|
8459
|
-
sinceDate: '2026-08-19',
|
|
8460
|
-
removedIn: '21.7.0',
|
|
8461
|
-
},
|
|
8462
|
-
{
|
|
8463
|
-
kind: 'token',
|
|
8464
|
-
name: '--gog-btn-ghost-hover-bg',
|
|
8465
|
-
replacement: '--gog-button-ghost-hover-bg',
|
|
8466
|
-
since: '21.5.0',
|
|
8467
|
-
sinceDate: '2026-08-19',
|
|
8468
|
-
removedIn: '21.7.0',
|
|
8469
|
-
},
|
|
8470
|
-
{
|
|
8471
|
-
kind: 'token',
|
|
8472
|
-
name: '--gog-btn-ghost-hover-color',
|
|
8473
|
-
replacement: '--gog-button-ghost-hover-color',
|
|
8474
|
-
since: '21.5.0',
|
|
8475
|
-
sinceDate: '2026-08-19',
|
|
8476
|
-
removedIn: '21.7.0',
|
|
8477
|
-
},
|
|
8478
|
-
{
|
|
8479
|
-
kind: 'token',
|
|
8480
|
-
name: '--gog-btn-ghost-hover-shadow',
|
|
8481
|
-
replacement: '--gog-button-ghost-hover-shadow',
|
|
8482
|
-
since: '21.5.0',
|
|
8483
|
-
sinceDate: '2026-08-19',
|
|
8484
|
-
removedIn: '21.7.0',
|
|
8485
|
-
},
|
|
8486
|
-
{
|
|
8487
|
-
kind: 'token',
|
|
8488
|
-
name: '--gog-btn-ghost-shadow',
|
|
8489
|
-
replacement: '--gog-button-ghost-shadow',
|
|
8490
|
-
since: '21.5.0',
|
|
8491
|
-
sinceDate: '2026-08-19',
|
|
8492
|
-
removedIn: '21.7.0',
|
|
8493
|
-
},
|
|
8494
|
-
{
|
|
8495
|
-
kind: 'token',
|
|
8496
|
-
name: '--gog-btn-ghost-spinner-color',
|
|
8497
|
-
replacement: '--gog-button-ghost-spinner-color',
|
|
8498
|
-
since: '21.5.0',
|
|
8499
|
-
sinceDate: '2026-08-19',
|
|
8500
|
-
removedIn: '21.7.0',
|
|
8501
|
-
},
|
|
8502
|
-
{
|
|
8503
|
-
kind: 'token',
|
|
8504
|
-
name: '--gog-btn-hover-bg',
|
|
8505
|
-
replacement: '--gog-button-hover-bg',
|
|
8506
|
-
since: '21.5.0',
|
|
8507
|
-
sinceDate: '2026-08-19',
|
|
8508
|
-
removedIn: '21.7.0',
|
|
8509
|
-
},
|
|
8510
|
-
{
|
|
8511
|
-
kind: 'token',
|
|
8512
|
-
name: '--gog-btn-hover-color',
|
|
8513
|
-
replacement: '--gog-button-hover-color',
|
|
8514
|
-
since: '21.5.0',
|
|
8515
|
-
sinceDate: '2026-08-19',
|
|
8516
|
-
removedIn: '21.7.0',
|
|
8517
|
-
},
|
|
8518
|
-
{
|
|
8519
|
-
kind: 'token',
|
|
8520
|
-
name: '--gog-btn-hover-shadow',
|
|
8521
|
-
replacement: '--gog-button-hover-shadow',
|
|
8522
|
-
since: '21.5.0',
|
|
8523
|
-
sinceDate: '2026-08-19',
|
|
8524
|
-
removedIn: '21.7.0',
|
|
8525
|
-
},
|
|
8526
|
-
{
|
|
8527
|
-
kind: 'token',
|
|
8528
|
-
name: '--gog-btn-letter-spacing',
|
|
8529
|
-
replacement: '--gog-button-letter-spacing',
|
|
8530
|
-
since: '21.5.0',
|
|
8531
|
-
sinceDate: '2026-08-19',
|
|
8532
|
-
removedIn: '21.7.0',
|
|
8533
|
-
},
|
|
8534
|
-
{
|
|
8535
|
-
kind: 'token',
|
|
8536
|
-
name: '--gog-btn-lg-font-size',
|
|
8537
|
-
replacement: '--gog-button-lg-font-size',
|
|
8538
|
-
since: '21.5.0',
|
|
8539
|
-
sinceDate: '2026-08-19',
|
|
8540
|
-
removedIn: '21.7.0',
|
|
8541
|
-
},
|
|
8542
|
-
{
|
|
8543
|
-
kind: 'token',
|
|
8544
|
-
name: '--gog-btn-lg-padding',
|
|
8545
|
-
replacement: '--gog-button-lg-padding',
|
|
8546
|
-
since: '21.5.0',
|
|
8547
|
-
sinceDate: '2026-08-19',
|
|
8548
|
-
removedIn: '21.7.0',
|
|
8549
|
-
},
|
|
8550
|
-
{
|
|
8551
|
-
kind: 'token',
|
|
8552
|
-
name: '--gog-btn-line-height',
|
|
8553
|
-
replacement: '--gog-button-line-height',
|
|
8554
|
-
since: '21.5.0',
|
|
8555
|
-
sinceDate: '2026-08-19',
|
|
8556
|
-
removedIn: '21.7.0',
|
|
8557
|
-
},
|
|
8558
|
-
{
|
|
8559
|
-
kind: 'token',
|
|
8560
|
-
name: '--gog-btn-loading-opacity',
|
|
8561
|
-
replacement: '--gog-button-loading-opacity',
|
|
8562
|
-
since: '21.5.0',
|
|
8563
|
-
sinceDate: '2026-08-19',
|
|
8564
|
-
removedIn: '21.7.0',
|
|
8565
|
-
},
|
|
8566
|
-
{
|
|
8567
|
-
kind: 'token',
|
|
8568
|
-
name: '--gog-btn-md-font-size',
|
|
8569
|
-
replacement: '--gog-button-md-font-size',
|
|
8570
|
-
since: '21.5.0',
|
|
8571
|
-
sinceDate: '2026-08-19',
|
|
8572
|
-
removedIn: '21.7.0',
|
|
8573
|
-
},
|
|
8574
|
-
{
|
|
8575
|
-
kind: 'token',
|
|
8576
|
-
name: '--gog-btn-md-padding',
|
|
8577
|
-
replacement: '--gog-button-md-padding',
|
|
8578
|
-
since: '21.5.0',
|
|
8579
|
-
sinceDate: '2026-08-19',
|
|
8580
|
-
removedIn: '21.7.0',
|
|
8581
|
-
},
|
|
8582
|
-
{
|
|
8583
|
-
kind: 'token',
|
|
8584
|
-
name: '--gog-btn-outline-bg',
|
|
8585
|
-
replacement: '--gog-button-outline-bg',
|
|
8586
|
-
since: '21.5.0',
|
|
8587
|
-
sinceDate: '2026-08-19',
|
|
8588
|
-
removedIn: '21.7.0',
|
|
8589
|
-
},
|
|
8590
|
-
{
|
|
8591
|
-
kind: 'token',
|
|
8592
|
-
name: '--gog-btn-outline-border',
|
|
8593
|
-
replacement: '--gog-button-outline-border',
|
|
8594
|
-
since: '21.5.0',
|
|
8595
|
-
sinceDate: '2026-08-19',
|
|
8596
|
-
removedIn: '21.7.0',
|
|
8597
|
-
},
|
|
8598
|
-
{
|
|
8599
|
-
kind: 'token',
|
|
8600
|
-
name: '--gog-btn-outline-color',
|
|
8601
|
-
replacement: '--gog-button-outline-color',
|
|
8602
|
-
since: '21.5.0',
|
|
8603
|
-
sinceDate: '2026-08-19',
|
|
8604
|
-
removedIn: '21.7.0',
|
|
8605
|
-
},
|
|
8606
|
-
{
|
|
8607
|
-
kind: 'token',
|
|
8608
|
-
name: '--gog-btn-outline-hover-bg',
|
|
8609
|
-
replacement: '--gog-button-outline-hover-bg',
|
|
8610
|
-
since: '21.5.0',
|
|
8611
|
-
sinceDate: '2026-08-19',
|
|
8612
|
-
removedIn: '21.7.0',
|
|
8613
|
-
},
|
|
8614
|
-
{
|
|
8615
|
-
kind: 'token',
|
|
8616
|
-
name: '--gog-btn-outline-hover-color',
|
|
8617
|
-
replacement: '--gog-button-outline-hover-color',
|
|
8618
|
-
since: '21.5.0',
|
|
8619
|
-
sinceDate: '2026-08-19',
|
|
8620
|
-
removedIn: '21.7.0',
|
|
8621
|
-
},
|
|
8622
|
-
{
|
|
8623
|
-
kind: 'token',
|
|
8624
|
-
name: '--gog-btn-outline-hover-shadow',
|
|
8625
|
-
replacement: '--gog-button-outline-hover-shadow',
|
|
8626
|
-
since: '21.5.0',
|
|
8627
|
-
sinceDate: '2026-08-19',
|
|
8628
|
-
removedIn: '21.7.0',
|
|
8629
|
-
},
|
|
8630
|
-
{
|
|
8631
|
-
kind: 'token',
|
|
8632
|
-
name: '--gog-btn-outline-shadow',
|
|
8633
|
-
replacement: '--gog-button-outline-shadow',
|
|
8634
|
-
since: '21.5.0',
|
|
8635
|
-
sinceDate: '2026-08-19',
|
|
8636
|
-
removedIn: '21.7.0',
|
|
8637
|
-
},
|
|
8638
|
-
{
|
|
8639
|
-
kind: 'token',
|
|
8640
|
-
name: '--gog-btn-outline-spinner-color',
|
|
8641
|
-
replacement: '--gog-button-outline-spinner-color',
|
|
8642
|
-
since: '21.5.0',
|
|
8643
|
-
sinceDate: '2026-08-19',
|
|
8644
|
-
removedIn: '21.7.0',
|
|
8645
|
-
},
|
|
8646
|
-
{
|
|
8647
|
-
kind: 'token',
|
|
8648
|
-
name: '--gog-btn-padding',
|
|
8649
|
-
replacement: '--gog-button-padding',
|
|
8650
|
-
since: '21.5.0',
|
|
8651
|
-
sinceDate: '2026-08-19',
|
|
8652
|
-
removedIn: '21.7.0',
|
|
8653
|
-
},
|
|
8654
|
-
{
|
|
8655
|
-
kind: 'token',
|
|
8656
|
-
name: '--gog-btn-primary-bg',
|
|
8657
|
-
replacement: '--gog-button-primary-bg',
|
|
8658
|
-
since: '21.5.0',
|
|
8659
|
-
sinceDate: '2026-08-19',
|
|
8660
|
-
removedIn: '21.7.0',
|
|
8661
|
-
},
|
|
8662
|
-
{
|
|
8663
|
-
kind: 'token',
|
|
8664
|
-
name: '--gog-btn-primary-border',
|
|
8665
|
-
replacement: '--gog-button-primary-border',
|
|
8666
|
-
since: '21.5.0',
|
|
8667
|
-
sinceDate: '2026-08-19',
|
|
8668
|
-
removedIn: '21.7.0',
|
|
8669
|
-
},
|
|
8670
|
-
{
|
|
8671
|
-
kind: 'token',
|
|
8672
|
-
name: '--gog-btn-primary-color',
|
|
8673
|
-
replacement: '--gog-button-primary-color',
|
|
8674
|
-
since: '21.5.0',
|
|
8675
|
-
sinceDate: '2026-08-19',
|
|
8676
|
-
removedIn: '21.7.0',
|
|
8677
|
-
},
|
|
8678
|
-
{
|
|
8679
|
-
kind: 'token',
|
|
8680
|
-
name: '--gog-btn-primary-hover-bg',
|
|
8681
|
-
replacement: '--gog-button-primary-hover-bg',
|
|
8682
|
-
since: '21.5.0',
|
|
8683
|
-
sinceDate: '2026-08-19',
|
|
8684
|
-
removedIn: '21.7.0',
|
|
8685
|
-
},
|
|
8686
|
-
{
|
|
8687
|
-
kind: 'token',
|
|
8688
|
-
name: '--gog-btn-primary-hover-color',
|
|
8689
|
-
replacement: '--gog-button-primary-hover-color',
|
|
8690
|
-
since: '21.5.0',
|
|
8691
|
-
sinceDate: '2026-08-19',
|
|
8692
|
-
removedIn: '21.7.0',
|
|
8693
|
-
},
|
|
8694
|
-
{
|
|
8695
|
-
kind: 'token',
|
|
8696
|
-
name: '--gog-btn-primary-hover-shadow',
|
|
8697
|
-
replacement: '--gog-button-primary-hover-shadow',
|
|
8698
|
-
since: '21.5.0',
|
|
8699
|
-
sinceDate: '2026-08-19',
|
|
8700
|
-
removedIn: '21.7.0',
|
|
8701
|
-
},
|
|
8702
|
-
{
|
|
8703
|
-
kind: 'token',
|
|
8704
|
-
name: '--gog-btn-primary-shadow',
|
|
8705
|
-
replacement: '--gog-button-primary-shadow',
|
|
8706
|
-
since: '21.5.0',
|
|
8707
|
-
sinceDate: '2026-08-19',
|
|
8708
|
-
removedIn: '21.7.0',
|
|
8709
|
-
},
|
|
8710
|
-
{
|
|
8711
|
-
kind: 'token',
|
|
8712
|
-
name: '--gog-btn-primary-spinner-color',
|
|
8713
|
-
replacement: '--gog-button-primary-spinner-color',
|
|
8714
|
-
since: '21.5.0',
|
|
8715
|
-
sinceDate: '2026-08-19',
|
|
8716
|
-
removedIn: '21.7.0',
|
|
8717
|
-
},
|
|
8718
|
-
{
|
|
8719
|
-
kind: 'token',
|
|
8720
|
-
name: '--gog-btn-radius',
|
|
8721
|
-
replacement: '--gog-button-radius',
|
|
8722
|
-
since: '21.5.0',
|
|
8723
|
-
sinceDate: '2026-08-19',
|
|
8724
|
-
removedIn: '21.7.0',
|
|
8725
|
-
},
|
|
8726
|
-
{
|
|
8727
|
-
kind: 'token',
|
|
8728
|
-
name: '--gog-btn-secondary-bg',
|
|
8729
|
-
replacement: '--gog-button-secondary-bg',
|
|
8730
|
-
since: '21.5.0',
|
|
8731
|
-
sinceDate: '2026-08-19',
|
|
8732
|
-
removedIn: '21.7.0',
|
|
8733
|
-
},
|
|
8734
|
-
{
|
|
8735
|
-
kind: 'token',
|
|
8736
|
-
name: '--gog-btn-secondary-border',
|
|
8737
|
-
replacement: '--gog-button-secondary-border',
|
|
8738
|
-
since: '21.5.0',
|
|
8739
|
-
sinceDate: '2026-08-19',
|
|
8740
|
-
removedIn: '21.7.0',
|
|
8741
|
-
},
|
|
8742
|
-
{
|
|
8743
|
-
kind: 'token',
|
|
8744
|
-
name: '--gog-btn-secondary-color',
|
|
8745
|
-
replacement: '--gog-button-secondary-color',
|
|
8746
|
-
since: '21.5.0',
|
|
8747
|
-
sinceDate: '2026-08-19',
|
|
8748
|
-
removedIn: '21.7.0',
|
|
8749
|
-
},
|
|
8750
|
-
{
|
|
8751
|
-
kind: 'token',
|
|
8752
|
-
name: '--gog-btn-secondary-hover-bg',
|
|
8753
|
-
replacement: '--gog-button-secondary-hover-bg',
|
|
8754
|
-
since: '21.5.0',
|
|
8755
|
-
sinceDate: '2026-08-19',
|
|
8756
|
-
removedIn: '21.7.0',
|
|
8757
|
-
},
|
|
8758
|
-
{
|
|
8759
|
-
kind: 'token',
|
|
8760
|
-
name: '--gog-btn-secondary-hover-color',
|
|
8761
|
-
replacement: '--gog-button-secondary-hover-color',
|
|
8762
|
-
since: '21.5.0',
|
|
8763
|
-
sinceDate: '2026-08-19',
|
|
8764
|
-
removedIn: '21.7.0',
|
|
8765
|
-
},
|
|
8766
|
-
{
|
|
8767
|
-
kind: 'token',
|
|
8768
|
-
name: '--gog-btn-secondary-hover-shadow',
|
|
8769
|
-
replacement: '--gog-button-secondary-hover-shadow',
|
|
8770
|
-
since: '21.5.0',
|
|
8771
|
-
sinceDate: '2026-08-19',
|
|
8772
|
-
removedIn: '21.7.0',
|
|
8773
|
-
},
|
|
8774
|
-
{
|
|
8775
|
-
kind: 'token',
|
|
8776
|
-
name: '--gog-btn-secondary-shadow',
|
|
8777
|
-
replacement: '--gog-button-secondary-shadow',
|
|
8778
|
-
since: '21.5.0',
|
|
8779
|
-
sinceDate: '2026-08-19',
|
|
8780
|
-
removedIn: '21.7.0',
|
|
8781
|
-
},
|
|
8782
|
-
{
|
|
8783
|
-
kind: 'token',
|
|
8784
|
-
name: '--gog-btn-secondary-spinner-color',
|
|
8785
|
-
replacement: '--gog-button-secondary-spinner-color',
|
|
8786
|
-
since: '21.5.0',
|
|
8787
|
-
sinceDate: '2026-08-19',
|
|
8788
|
-
removedIn: '21.7.0',
|
|
8789
|
-
},
|
|
8790
|
-
{
|
|
8791
|
-
kind: 'token',
|
|
8792
|
-
name: '--gog-btn-shadow',
|
|
8793
|
-
replacement: '--gog-button-shadow',
|
|
8794
|
-
since: '21.5.0',
|
|
8795
|
-
sinceDate: '2026-08-19',
|
|
8796
|
-
removedIn: '21.7.0',
|
|
8797
|
-
},
|
|
8798
|
-
{
|
|
8799
|
-
kind: 'token',
|
|
8800
|
-
name: '--gog-btn-slg-font-size',
|
|
8801
|
-
replacement: '--gog-button-slg-font-size',
|
|
8802
|
-
since: '21.5.0',
|
|
8803
|
-
sinceDate: '2026-08-19',
|
|
8804
|
-
removedIn: '21.7.0',
|
|
8805
|
-
},
|
|
8806
|
-
{
|
|
8807
|
-
kind: 'token',
|
|
8808
|
-
name: '--gog-btn-slg-padding',
|
|
8809
|
-
replacement: '--gog-button-slg-padding',
|
|
8810
|
-
since: '21.5.0',
|
|
8811
|
-
sinceDate: '2026-08-19',
|
|
8812
|
-
removedIn: '21.7.0',
|
|
8813
|
-
},
|
|
8814
|
-
{
|
|
8815
|
-
kind: 'token',
|
|
8816
|
-
name: '--gog-btn-sm-font-size',
|
|
8817
|
-
replacement: '--gog-button-sm-font-size',
|
|
8818
|
-
since: '21.5.0',
|
|
8819
|
-
sinceDate: '2026-08-19',
|
|
8820
|
-
removedIn: '21.7.0',
|
|
8821
|
-
},
|
|
8822
|
-
{
|
|
8823
|
-
kind: 'token',
|
|
8824
|
-
name: '--gog-btn-sm-padding',
|
|
8825
|
-
replacement: '--gog-button-sm-padding',
|
|
8826
|
-
since: '21.5.0',
|
|
8827
|
-
sinceDate: '2026-08-19',
|
|
8828
|
-
removedIn: '21.7.0',
|
|
8829
|
-
},
|
|
8830
|
-
{
|
|
8831
|
-
kind: 'token',
|
|
8832
|
-
name: '--gog-btn-spinner-color',
|
|
8833
|
-
replacement: '--gog-button-spinner-color',
|
|
8834
|
-
since: '21.5.0',
|
|
8835
|
-
sinceDate: '2026-08-19',
|
|
8836
|
-
removedIn: '21.7.0',
|
|
8837
|
-
},
|
|
8838
|
-
{
|
|
8839
|
-
kind: 'token',
|
|
8840
|
-
name: '--gog-btn-spinner-max-size',
|
|
8841
|
-
replacement: '--gog-button-spinner-max-size',
|
|
8842
|
-
since: '21.5.0',
|
|
8843
|
-
sinceDate: '2026-08-19',
|
|
8844
|
-
removedIn: '21.7.0',
|
|
8845
|
-
},
|
|
8846
|
-
{
|
|
8847
|
-
kind: 'token',
|
|
8848
|
-
name: '--gog-btn-text-transform',
|
|
8849
|
-
replacement: '--gog-button-text-transform',
|
|
8850
|
-
since: '21.5.0',
|
|
8851
|
-
sinceDate: '2026-08-19',
|
|
8852
|
-
removedIn: '21.7.0',
|
|
8853
|
-
},
|
|
8854
|
-
{
|
|
8855
|
-
kind: 'token',
|
|
8856
|
-
name: '--gog-btn-transition-duration',
|
|
8857
|
-
replacement: '--gog-button-transition-duration',
|
|
8858
|
-
since: '21.5.0',
|
|
8859
|
-
sinceDate: '2026-08-19',
|
|
8860
|
-
removedIn: '21.7.0',
|
|
8861
|
-
},
|
|
8862
|
-
{
|
|
8863
|
-
kind: 'token',
|
|
8864
|
-
name: '--gog-btn-x',
|
|
8865
|
-
replacement: '--gog-button-x',
|
|
8866
|
-
since: '21.5.0',
|
|
8867
|
-
sinceDate: '2026-08-19',
|
|
8868
|
-
removedIn: '21.7.0',
|
|
8869
|
-
},
|
|
8870
|
-
{
|
|
8871
|
-
kind: 'token',
|
|
8872
|
-
name: '--gog-btn-xsm-font-size',
|
|
8873
|
-
replacement: '--gog-button-xsm-font-size',
|
|
8874
|
-
since: '21.5.0',
|
|
8875
|
-
sinceDate: '2026-08-19',
|
|
8876
|
-
removedIn: '21.7.0',
|
|
8877
|
-
},
|
|
8878
|
-
{
|
|
8879
|
-
kind: 'token',
|
|
8880
|
-
name: '--gog-btn-xsm-padding',
|
|
8881
|
-
replacement: '--gog-button-xsm-padding',
|
|
8882
|
-
since: '21.5.0',
|
|
8883
|
-
sinceDate: '2026-08-19',
|
|
8884
|
-
removedIn: '21.7.0',
|
|
8885
|
-
},
|
|
8886
|
-
{
|
|
8887
|
-
kind: 'token',
|
|
8888
|
-
name: '--gog-confirm-',
|
|
8889
|
-
replacement: '--gog-confirmation-dialog-',
|
|
8890
|
-
since: '21.5.0',
|
|
8891
|
-
sinceDate: '2026-08-19',
|
|
8892
|
-
removedIn: '21.7.0',
|
|
8893
|
-
},
|
|
8894
|
-
{
|
|
8895
|
-
kind: 'token',
|
|
8896
|
-
name: '--gog-confirm-actions-gap',
|
|
8897
|
-
replacement: '--gog-confirmation-dialog-actions-gap',
|
|
8898
|
-
since: '21.5.0',
|
|
8899
|
-
sinceDate: '2026-08-19',
|
|
8900
|
-
removedIn: '21.7.0',
|
|
8901
|
-
},
|
|
8902
|
-
{
|
|
8903
|
-
kind: 'token',
|
|
8904
|
-
name: '--gog-confirm-actions-offset',
|
|
8905
|
-
replacement: '--gog-confirmation-dialog-actions-offset',
|
|
8906
|
-
since: '21.5.0',
|
|
8907
|
-
sinceDate: '2026-08-19',
|
|
8908
|
-
removedIn: '21.7.0',
|
|
8909
|
-
},
|
|
8910
|
-
{
|
|
8911
|
-
kind: 'token',
|
|
8912
|
-
name: '--gog-confirm-color',
|
|
8913
|
-
replacement: '--gog-confirmation-dialog-color',
|
|
8914
|
-
since: '21.5.0',
|
|
8915
|
-
sinceDate: '2026-08-19',
|
|
8916
|
-
removedIn: '21.7.0',
|
|
8917
|
-
},
|
|
8918
|
-
{
|
|
8919
|
-
kind: 'token',
|
|
8920
|
-
name: '--gog-confirm-description-color',
|
|
8921
|
-
replacement: '--gog-confirmation-dialog-description-color',
|
|
8922
|
-
since: '21.5.0',
|
|
8923
|
-
sinceDate: '2026-08-19',
|
|
8924
|
-
removedIn: '21.7.0',
|
|
8925
|
-
},
|
|
8926
|
-
{
|
|
8927
|
-
kind: 'token',
|
|
8928
|
-
name: '--gog-confirm-gap',
|
|
8929
|
-
replacement: '--gog-confirmation-dialog-gap',
|
|
8930
|
-
since: '21.5.0',
|
|
8931
|
-
sinceDate: '2026-08-19',
|
|
8932
|
-
removedIn: '21.7.0',
|
|
8933
|
-
},
|
|
8934
|
-
{
|
|
8935
|
-
kind: 'token',
|
|
8936
|
-
name: '--gog-confirm-max-width',
|
|
8937
|
-
replacement: '--gog-confirmation-dialog-max-width',
|
|
8938
|
-
since: '21.5.0',
|
|
8939
|
-
sinceDate: '2026-08-19',
|
|
8940
|
-
removedIn: '21.7.0',
|
|
8941
|
-
},
|
|
8942
|
-
{
|
|
8943
|
-
kind: 'token',
|
|
8944
|
-
name: '--gog-confirm-min-width',
|
|
8945
|
-
replacement: '--gog-confirmation-dialog-min-width',
|
|
8946
|
-
since: '21.5.0',
|
|
8947
|
-
sinceDate: '2026-08-19',
|
|
8948
|
-
removedIn: '21.7.0',
|
|
8949
|
-
},
|
|
8950
|
-
{
|
|
8951
|
-
kind: 'token',
|
|
8952
|
-
name: '--gog-ms-',
|
|
8953
|
-
replacement: '--gog-multiselect-',
|
|
8954
|
-
since: '21.3.0',
|
|
8955
|
-
sinceDate: '2026-08-07',
|
|
8956
|
-
removedIn: '21.7.0',
|
|
8957
|
-
},
|
|
8958
|
-
{
|
|
8959
|
-
kind: 'token',
|
|
8960
|
-
name: '--gog-ms-actions-gap',
|
|
8961
|
-
replacement: '--gog-multiselect-actions-gap',
|
|
8962
|
-
since: '21.3.0',
|
|
8963
|
-
sinceDate: '2026-08-07',
|
|
8964
|
-
removedIn: '21.7.0',
|
|
8965
|
-
},
|
|
8966
|
-
{
|
|
8967
|
-
kind: 'token',
|
|
8968
|
-
name: '--gog-ms-actions-inset',
|
|
8969
|
-
replacement: '--gog-multiselect-actions-inset',
|
|
8970
|
-
since: '21.3.0',
|
|
8971
|
-
sinceDate: '2026-08-07',
|
|
8972
|
-
removedIn: '21.7.0',
|
|
8973
|
-
},
|
|
8974
|
-
{
|
|
8975
|
-
kind: 'token',
|
|
8976
|
-
name: '--gog-ms-arrow-icon-ratio',
|
|
8977
|
-
replacement: '--gog-multiselect-arrow-icon-ratio',
|
|
8978
|
-
since: '21.3.0',
|
|
8979
|
-
sinceDate: '2026-08-07',
|
|
8980
|
-
removedIn: '21.7.0',
|
|
8981
|
-
},
|
|
8982
|
-
{
|
|
8983
|
-
kind: 'token',
|
|
8984
|
-
name: '--gog-ms-arrow-transition-duration',
|
|
8985
|
-
replacement: '--gog-multiselect-arrow-transition-duration',
|
|
8986
|
-
since: '21.3.0',
|
|
8987
|
-
sinceDate: '2026-08-07',
|
|
8988
|
-
removedIn: '21.7.0',
|
|
8989
|
-
},
|
|
8990
|
-
{
|
|
8991
|
-
kind: 'token',
|
|
8992
|
-
name: '--gog-ms-border-color',
|
|
8993
|
-
replacement: '--gog-multiselect-border-color',
|
|
8994
|
-
since: '21.3.0',
|
|
8995
|
-
sinceDate: '2026-08-07',
|
|
8996
|
-
removedIn: '21.7.0',
|
|
8997
|
-
},
|
|
8998
|
-
{
|
|
8999
|
-
kind: 'token',
|
|
9000
|
-
name: '--gog-ms-checkbox-bg',
|
|
9001
|
-
replacement: '--gog-multiselect-checkbox-bg',
|
|
9002
|
-
since: '21.3.0',
|
|
9003
|
-
sinceDate: '2026-08-07',
|
|
9004
|
-
removedIn: '21.7.0',
|
|
9005
|
-
},
|
|
9006
|
-
{
|
|
9007
|
-
kind: 'token',
|
|
9008
|
-
name: '--gog-ms-checkbox-border',
|
|
9009
|
-
replacement: '--gog-multiselect-checkbox-border',
|
|
9010
|
-
since: '21.3.0',
|
|
9011
|
-
sinceDate: '2026-08-07',
|
|
9012
|
-
removedIn: '21.7.0',
|
|
9013
|
-
},
|
|
9014
|
-
{
|
|
9015
|
-
kind: 'token',
|
|
9016
|
-
name: '--gog-ms-checkbox-checked-bg',
|
|
9017
|
-
replacement: '--gog-multiselect-checkbox-checked-bg',
|
|
9018
|
-
since: '21.3.0',
|
|
9019
|
-
sinceDate: '2026-08-07',
|
|
9020
|
-
removedIn: '21.7.0',
|
|
9021
|
-
},
|
|
9022
|
-
{
|
|
9023
|
-
kind: 'token',
|
|
9024
|
-
name: '--gog-ms-checkbox-checked-color',
|
|
9025
|
-
replacement: '--gog-multiselect-checkbox-checked-color',
|
|
9026
|
-
since: '21.3.0',
|
|
9027
|
-
sinceDate: '2026-08-07',
|
|
9028
|
-
removedIn: '21.7.0',
|
|
9029
|
-
},
|
|
9030
|
-
{
|
|
9031
|
-
kind: 'token',
|
|
9032
|
-
name: '--gog-ms-clear-icon-ratio',
|
|
9033
|
-
replacement: '--gog-multiselect-clear-icon-ratio',
|
|
9034
|
-
since: '21.3.0',
|
|
9035
|
-
sinceDate: '2026-08-07',
|
|
9036
|
-
removedIn: '21.7.0',
|
|
9037
|
-
},
|
|
9038
|
-
{
|
|
9039
|
-
kind: 'token',
|
|
9040
|
-
name: '--gog-ms-clear-radius',
|
|
9041
|
-
replacement: '--gog-multiselect-clear-radius',
|
|
9042
|
-
since: '21.3.0',
|
|
9043
|
-
sinceDate: '2026-08-07',
|
|
9044
|
-
removedIn: '21.7.0',
|
|
9045
|
-
},
|
|
9046
|
-
{
|
|
9047
|
-
kind: 'token',
|
|
9048
|
-
name: '--gog-ms-controls-gap',
|
|
9049
|
-
replacement: '--gog-multiselect-controls-gap',
|
|
9050
|
-
since: '21.3.0',
|
|
9051
|
-
sinceDate: '2026-08-07',
|
|
9052
|
-
removedIn: '21.7.0',
|
|
9053
|
-
},
|
|
9054
|
-
{
|
|
9055
|
-
kind: 'token',
|
|
9056
|
-
name: '--gog-ms-controls-padding',
|
|
9057
|
-
replacement: '--gog-multiselect-controls-padding',
|
|
9058
|
-
since: '21.3.0',
|
|
9059
|
-
sinceDate: '2026-08-07',
|
|
9060
|
-
removedIn: '21.7.0',
|
|
9061
|
-
},
|
|
9062
|
-
{
|
|
9063
|
-
kind: 'token',
|
|
9064
|
-
name: '--gog-ms-disabled-opacity',
|
|
9065
|
-
replacement: '--gog-multiselect-disabled-opacity',
|
|
9066
|
-
since: '21.3.0',
|
|
9067
|
-
sinceDate: '2026-08-07',
|
|
9068
|
-
removedIn: '21.7.0',
|
|
9069
|
-
},
|
|
9070
|
-
{
|
|
9071
|
-
kind: 'token',
|
|
9072
|
-
name: '--gog-ms-error-color',
|
|
9073
|
-
replacement: '--gog-multiselect-error-color',
|
|
9074
|
-
since: '21.3.0',
|
|
9075
|
-
sinceDate: '2026-08-07',
|
|
9076
|
-
removedIn: '21.7.0',
|
|
9077
|
-
},
|
|
9078
|
-
{
|
|
9079
|
-
kind: 'token',
|
|
9080
|
-
name: '--gog-ms-error-font-size',
|
|
9081
|
-
replacement: '--gog-multiselect-error-font-size',
|
|
9082
|
-
since: '21.3.0',
|
|
9083
|
-
sinceDate: '2026-08-07',
|
|
9084
|
-
removedIn: '21.7.0',
|
|
9085
|
-
},
|
|
9086
|
-
{
|
|
9087
|
-
kind: 'token',
|
|
9088
|
-
name: '--gog-ms-error-offset',
|
|
9089
|
-
replacement: '--gog-multiselect-error-offset',
|
|
9090
|
-
since: '21.3.0',
|
|
9091
|
-
sinceDate: '2026-08-07',
|
|
9092
|
-
removedIn: '21.7.0',
|
|
9093
|
-
},
|
|
9094
|
-
{
|
|
9095
|
-
kind: 'token',
|
|
9096
|
-
name: '--gog-ms-field-bg',
|
|
9097
|
-
replacement: '--gog-multiselect-field-bg',
|
|
9098
|
-
since: '21.3.0',
|
|
9099
|
-
sinceDate: '2026-08-07',
|
|
9100
|
-
removedIn: '21.7.0',
|
|
9101
|
-
},
|
|
9102
|
-
{
|
|
9103
|
-
kind: 'token',
|
|
9104
|
-
name: '--gog-ms-field-border',
|
|
9105
|
-
replacement: '--gog-multiselect-field-border',
|
|
9106
|
-
since: '21.3.0',
|
|
9107
|
-
sinceDate: '2026-08-07',
|
|
9108
|
-
removedIn: '21.7.0',
|
|
9109
|
-
},
|
|
9110
|
-
{
|
|
9111
|
-
kind: 'token',
|
|
9112
|
-
name: '--gog-ms-field-border-style',
|
|
9113
|
-
replacement: '--gog-multiselect-field-border-style',
|
|
9114
|
-
since: '21.3.0',
|
|
9115
|
-
sinceDate: '2026-08-07',
|
|
9116
|
-
removedIn: '21.7.0',
|
|
9117
|
-
},
|
|
9118
|
-
{
|
|
9119
|
-
kind: 'token',
|
|
9120
|
-
name: '--gog-ms-field-border-width',
|
|
9121
|
-
replacement: '--gog-multiselect-field-border-width',
|
|
9122
|
-
since: '21.3.0',
|
|
9123
|
-
sinceDate: '2026-08-07',
|
|
9124
|
-
removedIn: '21.7.0',
|
|
9125
|
-
},
|
|
9126
|
-
{
|
|
9127
|
-
kind: 'token',
|
|
9128
|
-
name: '--gog-ms-field-color',
|
|
9129
|
-
replacement: '--gog-multiselect-field-color',
|
|
9130
|
-
since: '21.3.0',
|
|
9131
|
-
sinceDate: '2026-08-07',
|
|
9132
|
-
removedIn: '21.7.0',
|
|
9133
|
-
},
|
|
9134
|
-
{
|
|
9135
|
-
kind: 'token',
|
|
9136
|
-
name: '--gog-ms-filter-border-color',
|
|
9137
|
-
replacement: '--gog-multiselect-filter-border-color',
|
|
9138
|
-
since: '21.3.0',
|
|
9139
|
-
sinceDate: '2026-08-07',
|
|
9140
|
-
removedIn: '21.7.0',
|
|
9141
|
-
},
|
|
9142
|
-
{
|
|
9143
|
-
kind: 'token',
|
|
9144
|
-
name: '--gog-ms-filter-border-style',
|
|
9145
|
-
replacement: '--gog-multiselect-filter-border-style',
|
|
9146
|
-
since: '21.3.0',
|
|
9147
|
-
sinceDate: '2026-08-07',
|
|
9148
|
-
removedIn: '21.7.0',
|
|
9149
|
-
},
|
|
9150
|
-
{
|
|
9151
|
-
kind: 'token',
|
|
9152
|
-
name: '--gog-ms-filter-border-width',
|
|
9153
|
-
replacement: '--gog-multiselect-filter-border-width',
|
|
9154
|
-
since: '21.3.0',
|
|
9155
|
-
sinceDate: '2026-08-07',
|
|
9156
|
-
removedIn: '21.7.0',
|
|
9157
|
-
},
|
|
9158
|
-
{
|
|
9159
|
-
kind: 'token',
|
|
9160
|
-
name: '--gog-ms-filter-empty-color',
|
|
9161
|
-
replacement: '--gog-multiselect-filter-empty-color',
|
|
9162
|
-
since: '21.3.0',
|
|
9163
|
-
sinceDate: '2026-08-07',
|
|
9164
|
-
removedIn: '21.7.0',
|
|
9165
|
-
},
|
|
9166
|
-
{
|
|
9167
|
-
kind: 'token',
|
|
9168
|
-
name: '--gog-ms-filter-empty-padding',
|
|
9169
|
-
replacement: '--gog-multiselect-filter-empty-padding',
|
|
9170
|
-
since: '21.3.0',
|
|
9171
|
-
sinceDate: '2026-08-07',
|
|
9172
|
-
removedIn: '21.7.0',
|
|
9173
|
-
},
|
|
9174
|
-
{
|
|
9175
|
-
kind: 'token',
|
|
9176
|
-
name: '--gog-ms-filter-input-bg',
|
|
9177
|
-
replacement: '--gog-multiselect-filter-input-bg',
|
|
9178
|
-
since: '21.3.0',
|
|
9179
|
-
sinceDate: '2026-08-07',
|
|
9180
|
-
removedIn: '21.7.0',
|
|
9181
|
-
},
|
|
9182
|
-
{
|
|
9183
|
-
kind: 'token',
|
|
9184
|
-
name: '--gog-ms-filter-input-border',
|
|
9185
|
-
replacement: '--gog-multiselect-filter-input-border',
|
|
9186
|
-
since: '21.3.0',
|
|
9187
|
-
sinceDate: '2026-08-07',
|
|
9188
|
-
removedIn: '21.7.0',
|
|
9189
|
-
},
|
|
9190
|
-
{
|
|
9191
|
-
kind: 'token',
|
|
9192
|
-
name: '--gog-ms-filter-input-color',
|
|
9193
|
-
replacement: '--gog-multiselect-filter-input-color',
|
|
9194
|
-
since: '21.3.0',
|
|
9195
|
-
sinceDate: '2026-08-07',
|
|
9196
|
-
removedIn: '21.7.0',
|
|
9197
|
-
},
|
|
9198
|
-
{
|
|
9199
|
-
kind: 'token',
|
|
9200
|
-
name: '--gog-ms-filter-input-padding-x',
|
|
9201
|
-
replacement: '--gog-multiselect-filter-input-padding-x',
|
|
9202
|
-
since: '21.3.0',
|
|
9203
|
-
sinceDate: '2026-08-07',
|
|
9204
|
-
removedIn: '21.7.0',
|
|
9205
|
-
},
|
|
9206
|
-
{
|
|
9207
|
-
kind: 'token',
|
|
9208
|
-
name: '--gog-ms-filter-input-padding-y',
|
|
9209
|
-
replacement: '--gog-multiselect-filter-input-padding-y',
|
|
9210
|
-
since: '21.3.0',
|
|
9211
|
-
sinceDate: '2026-08-07',
|
|
9212
|
-
removedIn: '21.7.0',
|
|
9213
|
-
},
|
|
9214
|
-
{
|
|
9215
|
-
kind: 'token',
|
|
9216
|
-
name: '--gog-ms-filter-input-radius',
|
|
9217
|
-
replacement: '--gog-multiselect-filter-input-radius',
|
|
9218
|
-
since: '21.3.0',
|
|
9219
|
-
sinceDate: '2026-08-07',
|
|
9220
|
-
removedIn: '21.7.0',
|
|
9221
|
-
},
|
|
9222
|
-
{
|
|
9223
|
-
kind: 'token',
|
|
9224
|
-
name: '--gog-ms-filter-padding',
|
|
9225
|
-
replacement: '--gog-multiselect-filter-padding',
|
|
9226
|
-
since: '21.3.0',
|
|
9227
|
-
sinceDate: '2026-08-07',
|
|
9228
|
-
removedIn: '21.7.0',
|
|
9229
|
-
},
|
|
9230
|
-
{
|
|
9231
|
-
kind: 'token',
|
|
9232
|
-
name: '--gog-ms-float-label-in-top',
|
|
9233
|
-
replacement: '--gog-multiselect-float-label-in-top',
|
|
9234
|
-
since: '21.3.0',
|
|
9235
|
-
sinceDate: '2026-08-07',
|
|
9236
|
-
removedIn: '21.7.0',
|
|
9237
|
-
},
|
|
9238
|
-
{
|
|
9239
|
-
kind: 'token',
|
|
9240
|
-
name: '--gog-ms-float-label-over-gap',
|
|
9241
|
-
replacement: '--gog-multiselect-float-label-over-gap',
|
|
9242
|
-
since: '21.3.0',
|
|
9243
|
-
sinceDate: '2026-08-07',
|
|
9244
|
-
removedIn: '21.7.0',
|
|
9245
|
-
},
|
|
9246
|
-
{
|
|
9247
|
-
kind: 'token',
|
|
9248
|
-
name: '--gog-ms-float-label-over-reserve',
|
|
9249
|
-
replacement: '--gog-multiselect-float-label-over-reserve',
|
|
9250
|
-
since: '21.3.0',
|
|
9251
|
-
sinceDate: '2026-08-07',
|
|
9252
|
-
removedIn: '21.7.0',
|
|
9253
|
-
},
|
|
9254
|
-
{
|
|
9255
|
-
kind: 'token',
|
|
9256
|
-
name: '--gog-ms-float-label-reserve',
|
|
9257
|
-
replacement: '--gog-multiselect-float-label-reserve',
|
|
9258
|
-
since: '21.3.0',
|
|
9259
|
-
sinceDate: '2026-08-07',
|
|
9260
|
-
removedIn: '21.7.0',
|
|
9261
|
-
},
|
|
9262
|
-
{
|
|
9263
|
-
kind: 'token',
|
|
9264
|
-
name: '--gog-ms-focus-border',
|
|
9265
|
-
replacement: '--gog-multiselect-focus-border',
|
|
9266
|
-
since: '21.3.0',
|
|
9267
|
-
sinceDate: '2026-08-07',
|
|
9268
|
-
removedIn: '21.7.0',
|
|
9269
|
-
},
|
|
9270
|
-
{
|
|
9271
|
-
kind: 'token',
|
|
9272
|
-
name: '--gog-ms-focus-glow',
|
|
9273
|
-
replacement: '--gog-multiselect-focus-glow',
|
|
9274
|
-
since: '21.3.0',
|
|
9275
|
-
sinceDate: '2026-08-07',
|
|
9276
|
-
removedIn: '21.7.0',
|
|
9277
|
-
},
|
|
9278
|
-
{
|
|
9279
|
-
kind: 'token',
|
|
9280
|
-
name: '--gog-ms-focus-ring',
|
|
9281
|
-
replacement: '--gog-multiselect-focus-ring',
|
|
9282
|
-
since: '21.3.0',
|
|
9283
|
-
sinceDate: '2026-08-07',
|
|
9284
|
-
removedIn: '21.7.0',
|
|
9285
|
-
},
|
|
9286
|
-
{
|
|
9287
|
-
kind: 'token',
|
|
9288
|
-
name: '--gog-ms-focus-ring-offset',
|
|
9289
|
-
replacement: '--gog-multiselect-focus-ring-offset',
|
|
9290
|
-
since: '21.3.0',
|
|
9291
|
-
sinceDate: '2026-08-07',
|
|
9292
|
-
removedIn: '21.7.0',
|
|
9293
|
-
},
|
|
9294
|
-
{
|
|
9295
|
-
kind: 'token',
|
|
9296
|
-
name: '--gog-ms-focus-ring-width',
|
|
9297
|
-
replacement: '--gog-multiselect-focus-ring-width',
|
|
9298
|
-
since: '21.3.0',
|
|
9299
|
-
sinceDate: '2026-08-07',
|
|
9300
|
-
removedIn: '21.7.0',
|
|
9301
|
-
},
|
|
9302
|
-
{
|
|
9303
|
-
kind: 'token',
|
|
9304
|
-
name: '--gog-ms-font-family',
|
|
9305
|
-
replacement: '--gog-multiselect-font-family',
|
|
9306
|
-
since: '21.3.0',
|
|
9307
|
-
sinceDate: '2026-08-07',
|
|
9308
|
-
removedIn: '21.7.0',
|
|
9309
|
-
},
|
|
9310
|
-
{
|
|
9311
|
-
kind: 'token',
|
|
9312
|
-
name: '--gog-ms-gap',
|
|
9313
|
-
replacement: '--gog-multiselect-gap',
|
|
9314
|
-
since: '21.3.0',
|
|
9315
|
-
sinceDate: '2026-08-07',
|
|
9316
|
-
removedIn: '21.7.0',
|
|
9317
|
-
},
|
|
9318
|
-
{
|
|
9319
|
-
kind: 'token',
|
|
9320
|
-
name: '--gog-ms-label-color',
|
|
9321
|
-
replacement: '--gog-multiselect-label-color',
|
|
9322
|
-
since: '21.3.0',
|
|
9323
|
-
sinceDate: '2026-08-07',
|
|
9324
|
-
removedIn: '21.7.0',
|
|
9325
|
-
},
|
|
9326
|
-
{
|
|
9327
|
-
kind: 'token',
|
|
9328
|
-
name: '--gog-ms-label-font-family',
|
|
9329
|
-
replacement: '--gog-multiselect-label-font-family',
|
|
9330
|
-
since: '21.3.0',
|
|
9331
|
-
sinceDate: '2026-08-07',
|
|
9332
|
-
removedIn: '21.7.0',
|
|
9333
|
-
},
|
|
9334
|
-
{
|
|
9335
|
-
kind: 'token',
|
|
9336
|
-
name: '--gog-ms-label-font-size',
|
|
9337
|
-
replacement: '--gog-multiselect-label-font-size',
|
|
9338
|
-
since: '21.3.0',
|
|
9339
|
-
sinceDate: '2026-08-07',
|
|
9340
|
-
removedIn: '21.7.0',
|
|
9341
|
-
},
|
|
9342
|
-
{
|
|
9343
|
-
kind: 'token',
|
|
9344
|
-
name: '--gog-ms-label-letter-spacing',
|
|
9345
|
-
replacement: '--gog-multiselect-label-letter-spacing',
|
|
9346
|
-
since: '21.3.0',
|
|
9347
|
-
sinceDate: '2026-08-07',
|
|
9348
|
-
removedIn: '21.7.0',
|
|
9349
|
-
},
|
|
9350
|
-
{
|
|
9351
|
-
kind: 'token',
|
|
9352
|
-
name: '--gog-ms-label-text-transform',
|
|
9353
|
-
replacement: '--gog-multiselect-label-text-transform',
|
|
9354
|
-
since: '21.3.0',
|
|
9355
|
-
sinceDate: '2026-08-07',
|
|
9356
|
-
removedIn: '21.7.0',
|
|
9357
|
-
},
|
|
9358
|
-
{
|
|
9359
|
-
kind: 'token',
|
|
9360
|
-
name: '--gog-ms-mark-icon-ratio',
|
|
9361
|
-
replacement: '--gog-multiselect-mark-icon-ratio',
|
|
9362
|
-
since: '21.3.0',
|
|
9363
|
-
sinceDate: '2026-08-07',
|
|
9364
|
-
removedIn: '21.7.0',
|
|
9365
|
-
},
|
|
9366
|
-
{
|
|
9367
|
-
kind: 'token',
|
|
9368
|
-
name: '--gog-ms-mark-size-ratio',
|
|
9369
|
-
replacement: '--gog-multiselect-mark-size-ratio',
|
|
9370
|
-
since: '21.3.0',
|
|
9371
|
-
sinceDate: '2026-08-07',
|
|
9372
|
-
removedIn: '21.7.0',
|
|
9373
|
-
},
|
|
9374
|
-
{
|
|
9375
|
-
kind: 'token',
|
|
9376
|
-
name: '--gog-ms-min-width',
|
|
9377
|
-
replacement: '--gog-multiselect-min-width',
|
|
9378
|
-
since: '21.3.0',
|
|
9379
|
-
sinceDate: '2026-08-07',
|
|
9380
|
-
removedIn: '21.7.0',
|
|
9381
|
-
},
|
|
9382
|
-
{
|
|
9383
|
-
kind: 'token',
|
|
9384
|
-
name: '--gog-ms-option-color',
|
|
9385
|
-
replacement: '--gog-multiselect-option-color',
|
|
9386
|
-
since: '21.3.0',
|
|
9387
|
-
sinceDate: '2026-08-07',
|
|
9388
|
-
removedIn: '21.7.0',
|
|
9389
|
-
},
|
|
9390
|
-
{
|
|
9391
|
-
kind: 'token',
|
|
9392
|
-
name: '--gog-ms-option-disabled-opacity',
|
|
9393
|
-
replacement: '--gog-multiselect-option-disabled-opacity',
|
|
9394
|
-
since: '21.3.0',
|
|
9395
|
-
sinceDate: '2026-08-07',
|
|
9396
|
-
removedIn: '21.7.0',
|
|
9397
|
-
},
|
|
9398
|
-
{
|
|
9399
|
-
kind: 'token',
|
|
9400
|
-
name: '--gog-ms-option-gap',
|
|
9401
|
-
replacement: '--gog-multiselect-option-gap',
|
|
9402
|
-
since: '21.3.0',
|
|
9403
|
-
sinceDate: '2026-08-07',
|
|
9404
|
-
removedIn: '21.7.0',
|
|
9405
|
-
},
|
|
9406
|
-
{
|
|
9407
|
-
kind: 'token',
|
|
9408
|
-
name: '--gog-ms-option-gap-inline',
|
|
9409
|
-
replacement: '--gog-multiselect-option-gap-inline',
|
|
9410
|
-
since: '21.3.0',
|
|
9411
|
-
sinceDate: '2026-08-07',
|
|
9412
|
-
removedIn: '21.7.0',
|
|
9413
|
-
},
|
|
9414
|
-
{
|
|
9415
|
-
kind: 'token',
|
|
9416
|
-
name: '--gog-ms-option-height',
|
|
9417
|
-
replacement: '--gog-multiselect-option-height',
|
|
9418
|
-
since: '21.3.0',
|
|
9419
|
-
sinceDate: '2026-08-07',
|
|
9420
|
-
removedIn: '21.7.0',
|
|
9421
|
-
},
|
|
9422
|
-
{
|
|
9423
|
-
kind: 'token',
|
|
9424
|
-
name: '--gog-ms-option-hover-bg',
|
|
9425
|
-
replacement: '--gog-multiselect-option-hover-bg',
|
|
9426
|
-
since: '21.3.0',
|
|
9427
|
-
sinceDate: '2026-08-07',
|
|
9428
|
-
removedIn: '21.7.0',
|
|
9429
|
-
},
|
|
9430
|
-
{
|
|
9431
|
-
kind: 'token',
|
|
9432
|
-
name: '--gog-ms-option-radius',
|
|
9433
|
-
replacement: '--gog-multiselect-option-radius',
|
|
9434
|
-
since: '21.3.0',
|
|
9435
|
-
sinceDate: '2026-08-07',
|
|
9436
|
-
removedIn: '21.7.0',
|
|
9437
|
-
},
|
|
9438
|
-
{
|
|
9439
|
-
kind: 'token',
|
|
9440
|
-
name: '--gog-ms-option-transition-duration',
|
|
9441
|
-
replacement: '--gog-multiselect-option-transition-duration',
|
|
9442
|
-
since: '21.3.0',
|
|
9443
|
-
sinceDate: '2026-08-07',
|
|
9444
|
-
removedIn: '21.7.0',
|
|
9445
|
-
},
|
|
9446
|
-
{
|
|
9447
|
-
kind: 'token',
|
|
9448
|
-
name: '--gog-ms-options-padding',
|
|
9449
|
-
replacement: '--gog-multiselect-options-padding',
|
|
9450
|
-
since: '21.3.0',
|
|
9451
|
-
sinceDate: '2026-08-07',
|
|
9452
|
-
removedIn: '21.7.0',
|
|
9453
|
-
},
|
|
9454
|
-
{
|
|
9455
|
-
kind: 'token',
|
|
9456
|
-
name: '--gog-ms-overflow-color',
|
|
9457
|
-
replacement: '--gog-multiselect-overflow-color',
|
|
9458
|
-
since: '21.3.0',
|
|
9459
|
-
sinceDate: '2026-08-07',
|
|
9460
|
-
removedIn: '21.7.0',
|
|
9461
|
-
},
|
|
9462
|
-
{
|
|
9463
|
-
kind: 'token',
|
|
9464
|
-
name: '--gog-ms-overflow-font-size',
|
|
9465
|
-
replacement: '--gog-multiselect-overflow-font-size',
|
|
9466
|
-
since: '21.3.0',
|
|
9467
|
-
sinceDate: '2026-08-07',
|
|
9468
|
-
removedIn: '21.7.0',
|
|
9469
|
-
},
|
|
9470
|
-
{
|
|
9471
|
-
kind: 'token',
|
|
9472
|
-
name: '--gog-ms-overflow-gap',
|
|
9473
|
-
replacement: '--gog-multiselect-overflow-gap',
|
|
9474
|
-
since: '21.3.0',
|
|
9475
|
-
sinceDate: '2026-08-07',
|
|
9476
|
-
removedIn: '21.7.0',
|
|
9477
|
-
},
|
|
9478
|
-
{
|
|
9479
|
-
kind: 'token',
|
|
9480
|
-
name: '--gog-ms-panel-bg',
|
|
9481
|
-
replacement: '--gog-multiselect-panel-bg',
|
|
9482
|
-
since: '21.3.0',
|
|
9483
|
-
sinceDate: '2026-08-07',
|
|
9484
|
-
removedIn: '21.7.0',
|
|
9485
|
-
},
|
|
9486
|
-
{
|
|
9487
|
-
kind: 'token',
|
|
9488
|
-
name: '--gog-ms-panel-border',
|
|
9489
|
-
replacement: '--gog-multiselect-panel-border',
|
|
9490
|
-
since: '21.3.0',
|
|
9491
|
-
sinceDate: '2026-08-07',
|
|
9492
|
-
removedIn: '21.7.0',
|
|
9493
|
-
},
|
|
9494
|
-
{
|
|
9495
|
-
kind: 'token',
|
|
9496
|
-
name: '--gog-ms-panel-max-height',
|
|
9497
|
-
replacement: '--gog-multiselect-panel-max-height',
|
|
9498
|
-
since: '21.3.0',
|
|
9499
|
-
sinceDate: '2026-08-07',
|
|
9500
|
-
removedIn: '21.7.0',
|
|
9501
|
-
},
|
|
9502
|
-
{
|
|
9503
|
-
kind: 'token',
|
|
9504
|
-
name: '--gog-ms-panel-max-width',
|
|
9505
|
-
replacement: '--gog-multiselect-panel-max-width',
|
|
9506
|
-
since: '21.3.0',
|
|
9507
|
-
sinceDate: '2026-08-07',
|
|
9508
|
-
removedIn: '21.7.0',
|
|
9509
|
-
},
|
|
9510
|
-
{
|
|
9511
|
-
kind: 'token',
|
|
9512
|
-
name: '--gog-ms-panel-offset',
|
|
9513
|
-
replacement: '--gog-multiselect-panel-offset',
|
|
9514
|
-
since: '21.3.0',
|
|
9515
|
-
sinceDate: '2026-08-07',
|
|
9516
|
-
removedIn: '21.7.0',
|
|
9517
|
-
},
|
|
9518
|
-
{
|
|
9519
|
-
kind: 'token',
|
|
9520
|
-
name: '--gog-ms-panel-shadow',
|
|
9521
|
-
replacement: '--gog-multiselect-panel-shadow',
|
|
9522
|
-
since: '21.3.0',
|
|
9523
|
-
sinceDate: '2026-08-07',
|
|
9524
|
-
removedIn: '21.7.0',
|
|
9525
|
-
},
|
|
9526
|
-
{
|
|
9527
|
-
kind: 'token',
|
|
9528
|
-
name: '--gog-ms-placeholder-color',
|
|
9529
|
-
replacement: '--gog-multiselect-placeholder-color',
|
|
9530
|
-
since: '21.3.0',
|
|
9531
|
-
sinceDate: '2026-08-07',
|
|
9532
|
-
removedIn: '21.7.0',
|
|
9533
|
-
},
|
|
9534
|
-
{
|
|
9535
|
-
kind: 'token',
|
|
9536
|
-
name: '--gog-ms-radius',
|
|
9537
|
-
replacement: '--gog-multiselect-radius',
|
|
9538
|
-
since: '21.3.0',
|
|
9539
|
-
sinceDate: '2026-08-07',
|
|
9540
|
-
removedIn: '21.7.0',
|
|
9541
|
-
},
|
|
9542
|
-
{
|
|
9543
|
-
kind: 'token',
|
|
9544
|
-
name: '--gog-ms-transition-duration',
|
|
9545
|
-
replacement: '--gog-multiselect-transition-duration',
|
|
9546
|
-
since: '21.3.0',
|
|
9547
|
-
sinceDate: '2026-08-07',
|
|
9548
|
-
removedIn: '21.7.0',
|
|
9549
|
-
},
|
|
9550
|
-
{
|
|
9551
|
-
kind: 'token',
|
|
9552
|
-
name: '--gog-ms-value-color',
|
|
9553
|
-
replacement: '--gog-multiselect-value-color',
|
|
9554
|
-
since: '21.3.0',
|
|
9555
|
-
sinceDate: '2026-08-07',
|
|
9556
|
-
removedIn: '21.7.0',
|
|
9557
|
-
},
|
|
9558
|
-
];
|
|
9108
|
+
const GOG_DEPRECATIONS = [];
|
|
9559
9109
|
|
|
9560
9110
|
// GENERATED FILE — do not edit by hand.
|
|
9561
9111
|
// Run `npm run generate:tokens` after changing src/styles/theme.css.
|
|
@@ -9572,11 +9122,13 @@ const GOG_TOKEN_GROUPS = [
|
|
|
9572
9122
|
'--gog-font-body',
|
|
9573
9123
|
'--gog-font-heading',
|
|
9574
9124
|
'--gog-font-mono',
|
|
9125
|
+
'--gog-letter-spacing',
|
|
9575
9126
|
'--gog-text-2xl',
|
|
9576
9127
|
'--gog-text-3xl',
|
|
9577
9128
|
'--gog-text-lg',
|
|
9578
9129
|
'--gog-text-md',
|
|
9579
9130
|
'--gog-text-sm',
|
|
9131
|
+
'--gog-text-transform',
|
|
9580
9132
|
'--gog-text-xl',
|
|
9581
9133
|
'--gog-text-xs',
|
|
9582
9134
|
],
|
|
@@ -9585,14 +9137,12 @@ const GOG_TOKEN_GROUPS = [
|
|
|
9585
9137
|
section: 'Spacing & geometry',
|
|
9586
9138
|
layer: 'foundation',
|
|
9587
9139
|
tokens: [
|
|
9140
|
+
'--gog-border-style',
|
|
9141
|
+
'--gog-border-width',
|
|
9142
|
+
'--gog-density',
|
|
9588
9143
|
'--gog-panel-border-style',
|
|
9589
9144
|
'--gog-panel-border-width',
|
|
9590
9145
|
'--gog-radius',
|
|
9591
|
-
'--gog-space-2xl',
|
|
9592
|
-
'--gog-space-lg',
|
|
9593
|
-
'--gog-space-md',
|
|
9594
|
-
'--gog-space-sm',
|
|
9595
|
-
'--gog-space-xs',
|
|
9596
9146
|
],
|
|
9597
9147
|
},
|
|
9598
9148
|
{
|
|
@@ -9626,34 +9176,16 @@ const GOG_TOKEN_GROUPS = [
|
|
|
9626
9176
|
'--gog-control-checkbox-label-size-slg',
|
|
9627
9177
|
'--gog-control-checkbox-label-size-sm',
|
|
9628
9178
|
'--gog-control-checkbox-label-size-xsm',
|
|
9629
|
-
'--gog-control-checkbox-padding',
|
|
9630
|
-
'--gog-control-icon-offset',
|
|
9631
|
-
'--gog-control-padding-x',
|
|
9632
|
-
'--gog-control-padding-y',
|
|
9633
9179
|
],
|
|
9634
9180
|
},
|
|
9635
9181
|
{
|
|
9636
9182
|
section: 'Field sizing (input / select / multiselect share one scale)',
|
|
9637
9183
|
layer: 'foundation',
|
|
9638
9184
|
tokens: [
|
|
9639
|
-
'--gog-field-
|
|
9640
|
-
'--gog-field-
|
|
9641
|
-
'--gog-field-
|
|
9642
|
-
'--gog-field-lg-padding-y',
|
|
9643
|
-
'--gog-field-md-icon-inset',
|
|
9185
|
+
'--gog-field-icon-glyph',
|
|
9186
|
+
'--gog-field-icon-glyph-sm',
|
|
9187
|
+
'--gog-field-icon-glyph-xsm',
|
|
9644
9188
|
'--gog-field-slg-font-size',
|
|
9645
|
-
'--gog-field-slg-icon-inset',
|
|
9646
|
-
'--gog-field-slg-icon-offset',
|
|
9647
|
-
'--gog-field-slg-padding-x',
|
|
9648
|
-
'--gog-field-slg-padding-y',
|
|
9649
|
-
'--gog-field-sm-icon-inset',
|
|
9650
|
-
'--gog-field-sm-icon-offset',
|
|
9651
|
-
'--gog-field-sm-padding-x',
|
|
9652
|
-
'--gog-field-sm-padding-y',
|
|
9653
|
-
'--gog-field-xsm-icon-inset',
|
|
9654
|
-
'--gog-field-xsm-icon-offset',
|
|
9655
|
-
'--gog-field-xsm-padding-x',
|
|
9656
|
-
'--gog-field-xsm-padding-y',
|
|
9657
9189
|
],
|
|
9658
9190
|
},
|
|
9659
9191
|
{
|
|
@@ -9661,7 +9193,6 @@ const GOG_TOKEN_GROUPS = [
|
|
|
9661
9193
|
layer: 'foundation',
|
|
9662
9194
|
tokens: [
|
|
9663
9195
|
'--gog-field-float-label-in-top',
|
|
9664
|
-
'--gog-field-float-label-over-gap',
|
|
9665
9196
|
'--gog-field-float-label-over-reserve',
|
|
9666
9197
|
'--gog-field-float-label-reserve',
|
|
9667
9198
|
],
|
|
@@ -9685,11 +9216,9 @@ const GOG_TOKEN_GROUPS = [
|
|
|
9685
9216
|
layer: 'foundation',
|
|
9686
9217
|
tokens: [
|
|
9687
9218
|
'--gog-toast-enter-distance',
|
|
9688
|
-
'--gog-toast-gap',
|
|
9689
9219
|
'--gog-toast-max-width',
|
|
9690
9220
|
'--gog-toast-min-width',
|
|
9691
9221
|
'--gog-toast-shadow',
|
|
9692
|
-
'--gog-toast-stack-padding',
|
|
9693
9222
|
'--gog-toast-z-index',
|
|
9694
9223
|
],
|
|
9695
9224
|
},
|
|
@@ -9727,14 +9256,57 @@ const GOG_TOKEN_GROUPS = [
|
|
|
9727
9256
|
section: 'Derived foundation tokens',
|
|
9728
9257
|
layer: 'foundation',
|
|
9729
9258
|
tokens: [
|
|
9259
|
+
'--gog-control-checkbox-padding',
|
|
9260
|
+
'--gog-control-icon-offset',
|
|
9261
|
+
'--gog-control-padding-x',
|
|
9262
|
+
'--gog-control-padding-y',
|
|
9263
|
+
'--gog-field-float-label-over-gap',
|
|
9730
9264
|
'--gog-field-lg-font-size',
|
|
9265
|
+
'--gog-field-lg-icon-inset',
|
|
9266
|
+
'--gog-field-lg-icon-offset',
|
|
9267
|
+
'--gog-field-lg-padding-x',
|
|
9268
|
+
'--gog-field-lg-padding-y',
|
|
9731
9269
|
'--gog-field-md-font-size',
|
|
9270
|
+
'--gog-field-md-icon-inset',
|
|
9732
9271
|
'--gog-field-md-icon-offset',
|
|
9733
9272
|
'--gog-field-md-padding-x',
|
|
9734
9273
|
'--gog-field-md-padding-y',
|
|
9274
|
+
'--gog-field-slg-icon-inset',
|
|
9275
|
+
'--gog-field-slg-icon-offset',
|
|
9276
|
+
'--gog-field-slg-padding-x',
|
|
9277
|
+
'--gog-field-slg-padding-y',
|
|
9735
9278
|
'--gog-field-sm-font-size',
|
|
9279
|
+
'--gog-field-sm-icon-inset',
|
|
9280
|
+
'--gog-field-sm-icon-offset',
|
|
9281
|
+
'--gog-field-sm-padding-x',
|
|
9282
|
+
'--gog-field-sm-padding-y',
|
|
9736
9283
|
'--gog-field-xsm-font-size',
|
|
9284
|
+
'--gog-field-xsm-icon-inset',
|
|
9285
|
+
'--gog-field-xsm-icon-offset',
|
|
9286
|
+
'--gog-field-xsm-padding-x',
|
|
9287
|
+
'--gog-field-xsm-padding-y',
|
|
9737
9288
|
'--gog-panel-radius',
|
|
9289
|
+
'--gog-space-10',
|
|
9290
|
+
'--gog-space-12',
|
|
9291
|
+
'--gog-space-14',
|
|
9292
|
+
'--gog-space-16',
|
|
9293
|
+
'--gog-space-18',
|
|
9294
|
+
'--gog-space-2',
|
|
9295
|
+
'--gog-space-20',
|
|
9296
|
+
'--gog-space-24',
|
|
9297
|
+
'--gog-space-28',
|
|
9298
|
+
'--gog-space-2xl',
|
|
9299
|
+
'--gog-space-32',
|
|
9300
|
+
'--gog-space-4',
|
|
9301
|
+
'--gog-space-48',
|
|
9302
|
+
'--gog-space-6',
|
|
9303
|
+
'--gog-space-8',
|
|
9304
|
+
'--gog-space-lg',
|
|
9305
|
+
'--gog-space-md',
|
|
9306
|
+
'--gog-space-sm',
|
|
9307
|
+
'--gog-space-xs',
|
|
9308
|
+
'--gog-toast-gap',
|
|
9309
|
+
'--gog-toast-stack-padding',
|
|
9738
9310
|
],
|
|
9739
9311
|
},
|
|
9740
9312
|
{
|
|
@@ -9991,6 +9563,56 @@ const GOG_TOKEN_GROUPS = [
|
|
|
9991
9563
|
'--gog-calendar-xsm-font-size',
|
|
9992
9564
|
],
|
|
9993
9565
|
},
|
|
9566
|
+
{
|
|
9567
|
+
section: 'Card',
|
|
9568
|
+
layer: 'component',
|
|
9569
|
+
tokens: [
|
|
9570
|
+
'--gog-card-border-style',
|
|
9571
|
+
'--gog-card-border-width',
|
|
9572
|
+
'--gog-card-color',
|
|
9573
|
+
'--gog-card-disabled-opacity',
|
|
9574
|
+
'--gog-card-elevated-bg',
|
|
9575
|
+
'--gog-card-elevated-border-color',
|
|
9576
|
+
'--gog-card-elevated-shadow',
|
|
9577
|
+
'--gog-card-filled-bg',
|
|
9578
|
+
'--gog-card-filled-border-color',
|
|
9579
|
+
'--gog-card-filled-shadow',
|
|
9580
|
+
'--gog-card-focus-ring',
|
|
9581
|
+
'--gog-card-focus-ring-offset',
|
|
9582
|
+
'--gog-card-focus-ring-width',
|
|
9583
|
+
'--gog-card-font-family',
|
|
9584
|
+
'--gog-card-footer-border-color',
|
|
9585
|
+
'--gog-card-footer-gap',
|
|
9586
|
+
'--gog-card-footer-padding-top',
|
|
9587
|
+
'--gog-card-heading-color',
|
|
9588
|
+
'--gog-card-heading-font-family',
|
|
9589
|
+
'--gog-card-heading-font-size',
|
|
9590
|
+
'--gog-card-heading-font-weight',
|
|
9591
|
+
'--gog-card-heading-line-height',
|
|
9592
|
+
'--gog-card-hover-border-color',
|
|
9593
|
+
'--gog-card-hover-shadow',
|
|
9594
|
+
'--gog-card-lg-gap',
|
|
9595
|
+
'--gog-card-lg-padding-x',
|
|
9596
|
+
'--gog-card-lg-padding-y',
|
|
9597
|
+
'--gog-card-md-gap',
|
|
9598
|
+
'--gog-card-md-padding-x',
|
|
9599
|
+
'--gog-card-md-padding-y',
|
|
9600
|
+
'--gog-card-outlined-bg',
|
|
9601
|
+
'--gog-card-outlined-border-color',
|
|
9602
|
+
'--gog-card-outlined-shadow',
|
|
9603
|
+
'--gog-card-radius',
|
|
9604
|
+
'--gog-card-slg-gap',
|
|
9605
|
+
'--gog-card-slg-padding-x',
|
|
9606
|
+
'--gog-card-slg-padding-y',
|
|
9607
|
+
'--gog-card-sm-gap',
|
|
9608
|
+
'--gog-card-sm-padding-x',
|
|
9609
|
+
'--gog-card-sm-padding-y',
|
|
9610
|
+
'--gog-card-transition-duration',
|
|
9611
|
+
'--gog-card-xsm-gap',
|
|
9612
|
+
'--gog-card-xsm-padding-x',
|
|
9613
|
+
'--gog-card-xsm-padding-y',
|
|
9614
|
+
],
|
|
9615
|
+
},
|
|
9994
9616
|
{
|
|
9995
9617
|
section: 'Checkbox',
|
|
9996
9618
|
layer: 'component',
|
|
@@ -10499,6 +10121,56 @@ const GOG_TOKEN_GROUPS = [
|
|
|
10499
10121
|
'--gog-paginator-page-size-min-width',
|
|
10500
10122
|
],
|
|
10501
10123
|
},
|
|
10124
|
+
{
|
|
10125
|
+
section: 'Panel',
|
|
10126
|
+
layer: 'component',
|
|
10127
|
+
tokens: [
|
|
10128
|
+
'--gog-panel-chevron-size',
|
|
10129
|
+
'--gog-panel-color',
|
|
10130
|
+
'--gog-panel-disabled-opacity',
|
|
10131
|
+
'--gog-panel-elevated-bg',
|
|
10132
|
+
'--gog-panel-elevated-border-color',
|
|
10133
|
+
'--gog-panel-filled-bg',
|
|
10134
|
+
'--gog-panel-filled-border-color',
|
|
10135
|
+
'--gog-panel-filled-shadow',
|
|
10136
|
+
'--gog-panel-focus-ring',
|
|
10137
|
+
'--gog-panel-focus-ring-offset',
|
|
10138
|
+
'--gog-panel-focus-ring-width',
|
|
10139
|
+
'--gog-panel-font-family',
|
|
10140
|
+
'--gog-panel-footer-border-color',
|
|
10141
|
+
'--gog-panel-footer-gap',
|
|
10142
|
+
'--gog-panel-footer-padding-top',
|
|
10143
|
+
'--gog-panel-header-gap',
|
|
10144
|
+
'--gog-panel-heading-color',
|
|
10145
|
+
'--gog-panel-heading-font-family',
|
|
10146
|
+
'--gog-panel-heading-font-size',
|
|
10147
|
+
'--gog-panel-heading-font-weight',
|
|
10148
|
+
'--gog-panel-heading-line-height',
|
|
10149
|
+
'--gog-panel-lg-gap',
|
|
10150
|
+
'--gog-panel-lg-padding-x',
|
|
10151
|
+
'--gog-panel-lg-padding-y',
|
|
10152
|
+
'--gog-panel-md-gap',
|
|
10153
|
+
'--gog-panel-md-padding-x',
|
|
10154
|
+
'--gog-panel-md-padding-y',
|
|
10155
|
+
'--gog-panel-outlined-bg',
|
|
10156
|
+
'--gog-panel-outlined-border-color',
|
|
10157
|
+
'--gog-panel-outlined-shadow',
|
|
10158
|
+
'--gog-panel-slg-gap',
|
|
10159
|
+
'--gog-panel-slg-padding-x',
|
|
10160
|
+
'--gog-panel-slg-padding-y',
|
|
10161
|
+
'--gog-panel-sm-gap',
|
|
10162
|
+
'--gog-panel-sm-padding-x',
|
|
10163
|
+
'--gog-panel-sm-padding-y',
|
|
10164
|
+
'--gog-panel-toggle-color',
|
|
10165
|
+
'--gog-panel-toggle-hover-bg',
|
|
10166
|
+
'--gog-panel-toggle-radius',
|
|
10167
|
+
'--gog-panel-toggle-size',
|
|
10168
|
+
'--gog-panel-transition-duration',
|
|
10169
|
+
'--gog-panel-xsm-gap',
|
|
10170
|
+
'--gog-panel-xsm-padding-x',
|
|
10171
|
+
'--gog-panel-xsm-padding-y',
|
|
10172
|
+
],
|
|
10173
|
+
},
|
|
10502
10174
|
{
|
|
10503
10175
|
section: 'Progressbar',
|
|
10504
10176
|
layer: 'component',
|
|
@@ -10532,6 +10204,17 @@ const GOG_TOKEN_GROUPS = [
|
|
|
10532
10204
|
'--gog-progressbar-xsm-height',
|
|
10533
10205
|
],
|
|
10534
10206
|
},
|
|
10207
|
+
{
|
|
10208
|
+
section: 'Ripple (the `gogRipple` directive; its classes live in ripple.css)',
|
|
10209
|
+
layer: 'component',
|
|
10210
|
+
tokens: [
|
|
10211
|
+
'--gog-ripple-color',
|
|
10212
|
+
'--gog-ripple-easing',
|
|
10213
|
+
'--gog-ripple-enter-duration',
|
|
10214
|
+
'--gog-ripple-exit-duration',
|
|
10215
|
+
'--gog-ripple-opacity',
|
|
10216
|
+
],
|
|
10217
|
+
},
|
|
10535
10218
|
{
|
|
10536
10219
|
section: 'Scroll',
|
|
10537
10220
|
layer: 'component',
|
|
@@ -11019,16 +10702,6 @@ const GOG_TOKEN_GROUPS = [
|
|
|
11019
10702
|
'--gog-autocomplete-padding-y',
|
|
11020
10703
|
'--gog-badge-bg',
|
|
11021
10704
|
'--gog-badge-color',
|
|
11022
|
-
'--gog-btn-bg',
|
|
11023
|
-
'--gog-btn-border',
|
|
11024
|
-
'--gog-btn-color',
|
|
11025
|
-
'--gog-btn-font-size',
|
|
11026
|
-
'--gog-btn-hover-bg',
|
|
11027
|
-
'--gog-btn-hover-color',
|
|
11028
|
-
'--gog-btn-hover-shadow',
|
|
11029
|
-
'--gog-btn-padding',
|
|
11030
|
-
'--gog-btn-shadow',
|
|
11031
|
-
'--gog-btn-spinner-color',
|
|
11032
10705
|
'--gog-button-bg',
|
|
11033
10706
|
'--gog-button-border',
|
|
11034
10707
|
'--gog-button-color',
|
|
@@ -11044,6 +10717,12 @@ const GOG_TOKEN_GROUPS = [
|
|
|
11044
10717
|
'--gog-calendar-day-bg',
|
|
11045
10718
|
'--gog-calendar-day-color',
|
|
11046
10719
|
'--gog-calendar-day-size',
|
|
10720
|
+
'--gog-card-bg',
|
|
10721
|
+
'--gog-card-border-color',
|
|
10722
|
+
'--gog-card-gap',
|
|
10723
|
+
'--gog-card-padding-x',
|
|
10724
|
+
'--gog-card-padding-y',
|
|
10725
|
+
'--gog-card-shadow',
|
|
11047
10726
|
'--gog-checkbox-box-size',
|
|
11048
10727
|
'--gog-checkbox-icon-size',
|
|
11049
10728
|
'--gog-checkbox-label-size',
|
|
@@ -11075,6 +10754,11 @@ const GOG_TOKEN_GROUPS = [
|
|
|
11075
10754
|
'--gog-multiselect-font-size',
|
|
11076
10755
|
'--gog-multiselect-padding-x',
|
|
11077
10756
|
'--gog-multiselect-padding-y',
|
|
10757
|
+
'--gog-panel-bg',
|
|
10758
|
+
'--gog-panel-border-color',
|
|
10759
|
+
'--gog-panel-gap',
|
|
10760
|
+
'--gog-panel-padding-x',
|
|
10761
|
+
'--gog-panel-padding-y',
|
|
11078
10762
|
'--gog-progressbar-buffer-bg',
|
|
11079
10763
|
'--gog-progressbar-fill-bg',
|
|
11080
10764
|
'--gog-progressbar-height',
|
|
@@ -11119,5 +10803,5 @@ const GOG_TOKEN_GROUPS = [
|
|
|
11119
10803
|
* Generated bundle index. Do not edit.
|
|
11120
10804
|
*/
|
|
11121
10805
|
|
|
11122
|
-
export { AccordionComponent, AutocompleteComponent, ButtonComponent, ButtonToggleGroupComponent, CalendarComponent, CheckboxComponent, ChipComponent, CollapsibleComponent, ConfirmationDialogComponent, DIALOG_DATA, DIALOG_REF, DatepickerComponent, DialogComponent, DialogService, DividerComponent, GOG_CONFIG, GOG_DEPRECATIONS, GOG_ICONS, GOG_TABS_STATE, GOG_TOKEN_GROUPS, GogAccordionChevronDirective, GogAccordionContentDirective, GogAccordionHeaderDirective, GogBadgeDirective, GogButtonDirective, GogButtonToggleOptionDirective, GogCheckboxIconDirective, GogCollapsibleContentDirective, GogCollapsibleTriggerDirective, GogColumn, GogColumnBodyDirective, GogColumnHeaderDirective, GogDropdownBase, GogDropdownChevronDirective, GogDropdownOptionDirective, GogFloatLabelState, GogInputAddonEndDirective, GogInputAddonStartDirective, GogMenuItemDirective, GogMenuTriggerDirective, GogMultiselectClearIconDirective, GogTabContentDirective, GogTabHeaderDirective, GogTagIconDirective, GogTooltipDirective, ICON_DEFS, IconComponent, InputfieldComponent, MenuComponent, MultiselectComponent, PaginatorComponent, ProgressbarComponent, RadioGroupComponent, ScrollComponent, SelectComponent, SkeletonComponent, SliderComponent, SpinnerComponent, SpinnerOverlayComponent, TabComponent, TableComponent, TabsComponent, TagComponent, TextareaComponent, ThemeService, ToastComponent, ToastContainerComponent, ToastService, ToggleComponent, addDays, addMonths, addYears, buildMonthGrid, clampDate, copyTimeOnto, daysInMonth, defaultCompare, formatDate, getByPath, isAfterDay, isBeforeDay, isInRange, isSameDay, isSameMonth, isSameOptionValue, isWithinBounds, localeFirstDayOfWeek, monthNames, parseDate, provideGogConfig, provideGogIcons, readOption, resolveConfigured, startOfDay, weekdayNames, withTime };
|
|
10806
|
+
export { AccordionComponent, AutocompleteComponent, ButtonComponent, ButtonToggleGroupComponent, CalendarComponent, CardComponent, CheckboxComponent, ChipComponent, CollapsibleComponent, ConfirmationDialogComponent, DIALOG_DATA, DIALOG_REF, DatepickerComponent, DialogComponent, DialogService, DividerComponent, GOG_CONFIG, GOG_DEPRECATIONS, GOG_ICONS, GOG_TABS_STATE, GOG_TOKEN_GROUPS, GogAccordionChevronDirective, GogAccordionContentDirective, GogAccordionHeaderDirective, GogBadgeDirective, GogButtonDirective, GogButtonToggleOptionDirective, GogCardFooterDirective, GogCardHeaderDirective, GogCardLinkDirective, GogCardMediaDirective, GogCheckboxIconDirective, GogCollapsibleContentDirective, GogCollapsibleTriggerDirective, GogColumn, GogColumnBodyDirective, GogColumnHeaderDirective, GogDropdownBase, GogDropdownChevronDirective, GogDropdownOptionDirective, GogFloatLabelState, GogInputAddonEndDirective, GogInputAddonStartDirective, GogMenuItemDirective, GogMenuTriggerDirective, GogMultiselectClearIconDirective, GogPanelFooterDirective, GogPanelHeaderDirective, GogRippleDirective, GogTabContentDirective, GogTabHeaderDirective, GogTagIconDirective, GogTooltipDirective, ICON_DEFS, IconComponent, InputfieldComponent, MenuComponent, MultiselectComponent, PaginatorComponent, PanelComponent, ProgressbarComponent, RadioGroupComponent, ScrollComponent, SelectComponent, SkeletonComponent, SliderComponent, SpinnerComponent, SpinnerOverlayComponent, TabComponent, TableComponent, TabsComponent, TagComponent, TextareaComponent, ThemeService, ToastComponent, ToastContainerComponent, ToastService, ToggleComponent, addDays, addMonths, addYears, buildMonthGrid, clampDate, copyTimeOnto, daysInMonth, defaultCompare, formatDate, getByPath, isAfterDay, isBeforeDay, isInRange, isSameDay, isSameMonth, isSameOptionValue, isWithinBounds, localeFirstDayOfWeek, monthNames, parseDate, provideGogConfig, provideGogIcons, readOption, resolveConfigured, startOfDay, weekdayNames, withTime };
|
|
11123
10807
|
//# sourceMappingURL=guildofgleks-ui.mjs.map
|