@guildofgleks/ui 21.7.2 → 21.8.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 +37 -8
- package/CHANGELOG.md +30 -0
- package/fesm2022/guildofgleks-ui.mjs +36 -7
- package/fesm2022/guildofgleks-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/types/guildofgleks-ui.d.ts +75 -13
package/package.json
CHANGED
|
@@ -6,6 +6,12 @@ import * as _angular_platform_browser from '@angular/platform-browser';
|
|
|
6
6
|
|
|
7
7
|
type GogSize = 'xsm' | 'sm' | 'md' | 'lg' | 'slg';
|
|
8
8
|
type GogVariant = 'primary' | 'secondary' | 'outline' | 'ghost';
|
|
9
|
+
/**
|
|
10
|
+
* The `aria-haspopup` values that make sense on a button, matching the ARIA 1.2 enumeration.
|
|
11
|
+
* `true` is a synonym for `'menu'` in the spec; prefer the specific value, since a screen
|
|
12
|
+
* reader announces it ("has menu", "has dialog").
|
|
13
|
+
*/
|
|
14
|
+
type GogAriaHasPopup = boolean | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog';
|
|
9
15
|
/**
|
|
10
16
|
* How a surface paints itself, shared by `gog-card` and `gog-panel` so the two agree:
|
|
11
17
|
* - `'outlined'` — a border, no shadow. The quietest, and right for a grid of many.
|
|
@@ -144,6 +150,35 @@ declare class ButtonComponent {
|
|
|
144
150
|
* Use this input instead, especially for icon-only buttons.
|
|
145
151
|
*/
|
|
146
152
|
ariaLabel: _angular_core.InputSignal<string | null>;
|
|
153
|
+
/**
|
|
154
|
+
* State and relationship attributes, forwarded to the native `<button>` for the same reason
|
|
155
|
+
* `ariaLabel` is: this component hides the real button, so an `[attr.aria-*]` written on
|
|
156
|
+
* `<gog-button>` lands on the custom element — which has no role — and reaches nothing.
|
|
157
|
+
* It fails silently, with no error and no visible difference.
|
|
158
|
+
*
|
|
159
|
+
* `null` (the default) omits the attribute. `false` is **not** the same as `null` here and is
|
|
160
|
+
* deliberately forwarded: a toggle button in its off state has to say `aria-pressed="false"`,
|
|
161
|
+
* because a button with no `aria-pressed` at all is not a toggle button — it is a button that
|
|
162
|
+
* does something, and a screen reader will describe it as one.
|
|
163
|
+
*
|
|
164
|
+
* ```html
|
|
165
|
+
* <gog-button [ariaPressed]="isRtl()" (gogClick)="toggle()">Mirror</gog-button>
|
|
166
|
+
*
|
|
167
|
+
* <gog-button [ariaExpanded]="isOpen()" ariaControls="filters" ariaHasPopup="dialog">
|
|
168
|
+
* Filters
|
|
169
|
+
* </gog-button>
|
|
170
|
+
* ```
|
|
171
|
+
*
|
|
172
|
+
* The `[gogButton]` directive needs none of this: it styles an element the consumer owns, so
|
|
173
|
+
* `aria-pressed` written there already lands where it should.
|
|
174
|
+
*/
|
|
175
|
+
ariaPressed: _angular_core.InputSignal<boolean | "mixed" | null>;
|
|
176
|
+
/** See `ariaPressed`. `false` renders `aria-expanded="false"`; `null` omits the attribute. */
|
|
177
|
+
ariaExpanded: _angular_core.InputSignal<boolean | null>;
|
|
178
|
+
/** Id of the element this button controls — pairs with `ariaExpanded`. See `ariaPressed`. */
|
|
179
|
+
ariaControls: _angular_core.InputSignal<string | null>;
|
|
180
|
+
/** What this button opens, if anything. See `ariaPressed`. */
|
|
181
|
+
ariaHasPopup: _angular_core.InputSignal<GogAriaHasPopup | null>;
|
|
147
182
|
gogClick: _angular_core.OutputEmitterRef<MouseEvent>;
|
|
148
183
|
/** Fully non-interactive: excluded from tab order via the native `disabled` attribute. */
|
|
149
184
|
protected isNativeDisabled: _angular_core.Signal<boolean>;
|
|
@@ -166,7 +201,7 @@ declare class ButtonComponent {
|
|
|
166
201
|
constructor();
|
|
167
202
|
protected onClick(event: MouseEvent): void;
|
|
168
203
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ButtonComponent, never>;
|
|
169
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ButtonComponent, "gog-button", never, { "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "fullWidth": { "alias": "fullWidth"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "ripple": { "alias": "ripple"; "required": false; "isSignal": true; }; "debounce": { "alias": "debounce"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; }, { "gogClick": "gogClick"; }, never, ["*"], true, never>;
|
|
204
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ButtonComponent, "gog-button", never, { "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "fullWidth": { "alias": "fullWidth"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "ripple": { "alias": "ripple"; "required": false; "isSignal": true; }; "debounce": { "alias": "debounce"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "ariaPressed": { "alias": "ariaPressed"; "required": false; "isSignal": true; }; "ariaExpanded": { "alias": "ariaExpanded"; "required": false; "isSignal": true; }; "ariaControls": { "alias": "ariaControls"; "required": false; "isSignal": true; }; "ariaHasPopup": { "alias": "ariaHasPopup"; "required": false; "isSignal": true; }; }, { "gogClick": "gogClick"; }, never, ["*"], true, never>;
|
|
170
205
|
}
|
|
171
206
|
|
|
172
207
|
/**
|
|
@@ -4351,7 +4386,11 @@ interface GogGlobalConfig {
|
|
|
4351
4386
|
hideDelay?: number;
|
|
4352
4387
|
position?: GogTooltipPosition;
|
|
4353
4388
|
};
|
|
4354
|
-
/**
|
|
4389
|
+
/**
|
|
4390
|
+
* Applies to `gog-inputfield`, `gog-textarea`, `gog-select`, `gog-multiselect`,
|
|
4391
|
+
* `gog-autocomplete` and `gog-datepicker` — every field that can float a label. All six read
|
|
4392
|
+
* it through the same `GogFloatLabelState`, three of them via `GogDropdownBase`.
|
|
4393
|
+
*/
|
|
4355
4394
|
floatLabel?: {
|
|
4356
4395
|
variant?: GogFloatLabelVariant;
|
|
4357
4396
|
/**
|
|
@@ -4366,32 +4405,55 @@ interface GogGlobalConfig {
|
|
|
4366
4405
|
* literally every one of them: a compact app writes `size="sm"` everywhere, and a
|
|
4367
4406
|
* Reactive-Forms app writes `errorDisplay="auto"` on every field.
|
|
4368
4407
|
*
|
|
4369
|
-
* - `size` applies to `gog-button
|
|
4370
|
-
* `gog-
|
|
4371
|
-
* `gog-
|
|
4372
|
-
*
|
|
4408
|
+
* - `size` applies to `gog-button` and `[gogButton]`, `gog-button-toggle-group`,
|
|
4409
|
+
* `gog-checkbox`, `gog-toggle`, `gog-radio-group`, `gog-inputfield`, `gog-textarea`,
|
|
4410
|
+
* `gog-select`, `gog-multiselect`, `gog-autocomplete` and `gog-datepicker`. Deliberately
|
|
4411
|
+
* **not** to `gog-table`, `gog-accordion` or `gog-paginator` (whose `size` means row/layout
|
|
4412
|
+
* density and whose defaults differ), nor to `gog-spinner`, `gog-skeleton`, `gog-tag` or
|
|
4373
4413
|
* `gog-chip` (sized to fit whatever they sit next to, not to a form's density).
|
|
4374
4414
|
* - `errorDisplay` applies to every control that renders a validation message:
|
|
4375
|
-
* `gog-inputfield`, `gog-textarea`, `gog-select`, `gog-multiselect`, `gog-
|
|
4376
|
-
* and `gog-slider`.
|
|
4415
|
+
* `gog-inputfield`, `gog-textarea`, `gog-select`, `gog-multiselect`, `gog-autocomplete`,
|
|
4416
|
+
* `gog-datepicker`, `gog-radio-group` and `gog-slider`.
|
|
4377
4417
|
*
|
|
4378
4418
|
* A component's own built-in default still applies when this is unset, so setting `size`
|
|
4379
4419
|
* here does not flatten the different defaults those excluded components have.
|
|
4420
|
+
*
|
|
4421
|
+
* **When you add a reader, add it here — and note that "reader" is not the same as "names
|
|
4422
|
+
* the field".** These lists were wrong for four keys until 2026-09-02, always in the same
|
|
4423
|
+
* direction and for the same reason: `gog-select`, `gog-multiselect` and `gog-autocomplete`
|
|
4424
|
+
* resolve `size`/`errorDisplay`/`clearable`/`floatLabel` inside `GogDropdownBase`, and
|
|
4425
|
+
* `gog-datepicker` composes the same state classes directly, so none of the four contains the
|
|
4426
|
+
* `globalConfig.control?.…` expression that a grep for readers finds. Nor does the resolved
|
|
4427
|
+
* value always reach a template by name — `size` arrives as a computed class (`sizeClass`,
|
|
4428
|
+
* `panelSizeClass`) and `dropdown.direction` is consumed by placement code, so "is the
|
|
4429
|
+
* computed referenced in the component's HTML?" answers *no* for components that genuinely
|
|
4430
|
+
* honour the key. Trace the shared state classes, not just the components.
|
|
4380
4431
|
*/
|
|
4381
4432
|
control?: {
|
|
4382
4433
|
size?: GogSize;
|
|
4383
4434
|
errorDisplay?: GogErrorDisplay;
|
|
4384
4435
|
/**
|
|
4385
|
-
* Whether `gog-inputfield`, `gog-textarea`, `gog-select
|
|
4386
|
-
*
|
|
4387
|
-
*
|
|
4436
|
+
* Whether `gog-inputfield`, `gog-textarea`, `gog-select`, `gog-multiselect`,
|
|
4437
|
+
* `gog-autocomplete` and `gog-datepicker` offer a clear button — every control that
|
|
4438
|
+
* composes `GogClearableState`. The button only ever appears once the control actually has
|
|
4439
|
+
* something to clear, so switching this on app-wide adds no permanent chrome.
|
|
4388
4440
|
*
|
|
4389
4441
|
* Component defaults are `false`, except `gog-multiselect`, which had a clear button
|
|
4390
4442
|
* before this input existed and keeps it.
|
|
4391
4443
|
*/
|
|
4392
4444
|
clearable?: boolean;
|
|
4393
4445
|
};
|
|
4394
|
-
/**
|
|
4446
|
+
/**
|
|
4447
|
+
* Applies per field rather than per component, which is why this is not one sentence:
|
|
4448
|
+
*
|
|
4449
|
+
* - `appendToBody` and `direction` reach `gog-select`, `gog-multiselect`,
|
|
4450
|
+
* `gog-autocomplete` (all three through `GogDropdownBase`) and `gog-datepicker`, which
|
|
4451
|
+
* resolves the same pair itself.
|
|
4452
|
+
* - `filter` and `filterPosition` reach `gog-select` and `gog-multiselect` only.
|
|
4453
|
+
* `gog-autocomplete` inherits both inputs from the same base class and renders no filter
|
|
4454
|
+
* box for them — its own text field *is* the filter, so a second search box inside the
|
|
4455
|
+
* panel would be a duplicate. Setting these does nothing to an autocomplete.
|
|
4456
|
+
*/
|
|
4395
4457
|
dropdown?: {
|
|
4396
4458
|
/**
|
|
4397
4459
|
* Whether the panel is rendered into `<body>` instead of inline. Worth setting app-wide
|
|
@@ -4761,4 +4823,4 @@ declare const GOG_ICONS: InjectionToken<Readonly<Record<string, string>>>;
|
|
|
4761
4823
|
declare function provideGogIcons(icons: Readonly<Record<string, string>>): Provider;
|
|
4762
4824
|
|
|
4763
4825
|
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 };
|
|
4764
|
-
export type { ConfirmDialogData, DialogConfig, DialogHandle, DialogRef, GogAccordionChevronContext, GogAccordionHeaderContext, GogAccordionItem, GogAccordionToggleEvent, GogBadgePosition, GogBuiltinIconName, GogButtonToggleAppearance, GogButtonToggleOptionContext, GogCalendarDay, GogColumnBodyContext, GogColumnHeaderContext, GogDateRange, GogDateSelectionMode, GogDatepickerValue, GogDeprecation, GogDeprecationKind, GogDividerVariant, GogDropdownDirection, GogDropdownFilterPosition, GogDropdownOption, GogDropdownOptionContext, GogFloatLabelVariant, GogGlobalConfig, GogHourFormat, GogIconName, GogInputMode, GogInputType, GogOptionAccessor, GogOrientation, GogPaginatorRangeMode, GogProgressbarMode, GogProgressbarVariant, GogRadioOption, GogScrollAxis, GogScrollMetrics, GogScrollOverscrollBehavior, GogScrollSize, GogSize, GogSkeletonAnimation, GogSkeletonShape, GogSliderOrientation, GogSliderRange, GogSpinnerVariant, GogSurfaceVariant, GogTabHeaderContext, GogTableRowClickEvent, GogTableSelectionMode, GogTableSortEvent, GogTabsAlign, GogTabsState, GogTagShape, GogTagVariant, GogTextareaResize, GogTokenGroup, GogTokenLayer, GogTokenName, GogTooltipPosition, GogTooltipSide, GogVariant, OpenDialog, SortDirection, Toast, ToastAction, ToastConfig, ToastPosition, ToastType };
|
|
4826
|
+
export type { ConfirmDialogData, DialogConfig, DialogHandle, DialogRef, GogAccordionChevronContext, GogAccordionHeaderContext, GogAccordionItem, GogAccordionToggleEvent, GogAriaHasPopup, GogBadgePosition, GogBuiltinIconName, GogButtonToggleAppearance, GogButtonToggleOptionContext, GogCalendarDay, GogColumnBodyContext, GogColumnHeaderContext, GogDateRange, GogDateSelectionMode, GogDatepickerValue, GogDeprecation, GogDeprecationKind, GogDividerVariant, GogDropdownDirection, GogDropdownFilterPosition, GogDropdownOption, GogDropdownOptionContext, GogFloatLabelVariant, GogGlobalConfig, GogHourFormat, GogIconName, GogInputMode, GogInputType, GogOptionAccessor, GogOrientation, GogPaginatorRangeMode, GogProgressbarMode, GogProgressbarVariant, GogRadioOption, GogScrollAxis, GogScrollMetrics, GogScrollOverscrollBehavior, GogScrollSize, GogSize, GogSkeletonAnimation, GogSkeletonShape, GogSliderOrientation, GogSliderRange, GogSpinnerVariant, GogSurfaceVariant, GogTabHeaderContext, GogTableRowClickEvent, GogTableSelectionMode, GogTableSortEvent, GogTabsAlign, GogTabsState, GogTagShape, GogTagVariant, GogTextareaResize, GogTokenGroup, GogTokenLayer, GogTokenName, GogTooltipPosition, GogTooltipSide, GogVariant, OpenDialog, SortDirection, Toast, ToastAction, ToastConfig, ToastPosition, ToastType };
|