@guildofgleks/ui 21.4.3 → 21.5.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 +277 -156
- package/CHANGELOG.md +265 -14
- package/README.md +56 -22
- package/TOKENS.md +44 -44
- package/fesm2022/guildofgleks-ui.mjs +2017 -386
- package/fesm2022/guildofgleks-ui.mjs.map +1 -1
- package/package.json +10 -10
- package/schematics/collection.json +9 -0
- package/schematics/ng-add/index.cjs +62 -0
- package/schematics/ng-add/schema.cjs +2 -0
- package/schematics/ng-add/schema.json +15 -0
- package/styles/button.css +112 -79
- package/styles/index.css +2 -0
- package/styles/menu.css +95 -0
- package/styles/theme.css +314 -239
- package/styles/utilities.css +212 -170
- package/types/guildofgleks-ui.d.ts +237 -141
- package/src/styles/button.css +0 -193
- package/src/styles/fonts.css +0 -16
- package/src/styles/index.css +0 -19
- package/src/styles/presets/one-dark.css +0 -48
- package/src/styles/presets/one-light.css +0 -47
- package/src/styles/presets/slate.css +0 -55
- package/src/styles/theme.css +0 -1693
- package/src/styles/typography.css +0 -15
- package/src/styles/utilities.css +0 -170
package/CHANGELOG.md
CHANGED
|
@@ -6,12 +6,258 @@ reached 1.0, so breaking changes may land in minor versions.
|
|
|
6
6
|
|
|
7
7
|
## [21.5.0] - planned
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
and
|
|
14
|
-
|
|
9
|
+
**The breaking release** — the one version consumers have to read before upgrading into. It
|
|
10
|
+
carries the removals below and the token-prefix rename (`--gog-btn-*`, `--gog-ms-*` and
|
|
11
|
+
`--gog-confirm-*` spelled out; the old spellings keep working until 21.7.0). Everything
|
|
12
|
+
non-breaking that was ready earlier shipped in 21.4.4 instead, so a reader upgrading to 21.4.4 has
|
|
13
|
+
nothing to migrate and a reader upgrading to 21.5.0 has one list to work through rather than one
|
|
14
|
+
buried among fixes.
|
|
15
|
+
|
|
16
|
+
### Removed
|
|
17
|
+
|
|
18
|
+
Everything deprecated for this version is gone. **All of it was announced with a replacement in
|
|
19
|
+
21.3.0 or earlier**, and every replacement has shipped since then, so each item below is a
|
|
20
|
+
mechanical edit at the call site rather than a redesign. If you are on 21.4.x, your editor has
|
|
21
|
+
been striking these through already.
|
|
22
|
+
|
|
23
|
+
**Per-slot `TemplateRef` inputs → projected slot directives.** Declare the template where it is
|
|
24
|
+
used; it no longer has to be wired through an input, and it carries a typed context.
|
|
25
|
+
|
|
26
|
+
| Removed input | Replacement |
|
|
27
|
+
| ---------------------------------------------------- | --------------------------------------- |
|
|
28
|
+
| `gog-checkbox` `[checkIconTemplate]` | `<ng-template gogCheckboxIcon>` |
|
|
29
|
+
| `gog-tag` `[iconTemplate]` | `<ng-template gogTagIcon>` |
|
|
30
|
+
| `gog-multiselect` `[clearIconTemplate]` | `<ng-template gogMultiselectClearIcon>` |
|
|
31
|
+
| `gog-select` / `gog-multiselect` `[chevronTemplate]` | `<ng-template gogDropdownChevron>` |
|
|
32
|
+
|
|
33
|
+
```html
|
|
34
|
+
<!-- before -->
|
|
35
|
+
<gog-tag [iconTemplate]="star">Featured</gog-tag>
|
|
36
|
+
<ng-template #star><gog-icon name="check" /></ng-template>
|
|
37
|
+
|
|
38
|
+
<!-- after -->
|
|
39
|
+
<gog-tag>
|
|
40
|
+
<ng-template gogTagIcon><gog-icon name="check" /></ng-template>
|
|
41
|
+
Featured
|
|
42
|
+
</gog-tag>
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
**`gog-inputfield`'s six legacy icon inputs** — `iconStartTemplate`, `iconEndTemplate`,
|
|
46
|
+
`iconStartFn`, `iconEndFn`, `iconStartLabel`, `iconEndLabel` — replaced by projecting a real
|
|
47
|
+
element into the field's leading or trailing slot. A projected `<button gogInputAddonEnd>` carries
|
|
48
|
+
its own click handler, its own `aria-label` and its own disabled state, which is why six inputs
|
|
49
|
+
collapse into none:
|
|
50
|
+
|
|
51
|
+
```html
|
|
52
|
+
<!-- before -->
|
|
53
|
+
<gog-inputfield label="Search" iconEnd="check" [iconEndFn]="run" iconEndLabel="Search" />
|
|
54
|
+
|
|
55
|
+
<!-- after -->
|
|
56
|
+
<gog-inputfield label="Search">
|
|
57
|
+
<button gogInputAddonEnd type="button" aria-label="Search" (click)="run()">
|
|
58
|
+
<gog-icon name="check" />
|
|
59
|
+
</button>
|
|
60
|
+
</gog-inputfield>
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
`iconStart` / `iconEnd` stay, and are now unambiguously **decorative**: they render an
|
|
64
|
+
`aria-hidden` span, never a button. The only action button `gog-inputfield` still renders for
|
|
65
|
+
itself is the password reveal toggle, whose labels remain `showPasswordLabel` /
|
|
66
|
+
`hidePasswordLabel`.
|
|
67
|
+
|
|
68
|
+
**`gog-table`'s string-keyed template slot.** `<ng-template template="field" type="body">` matched
|
|
69
|
+
a column by a string the compiler could not check — a typo silently rendered the default cell.
|
|
70
|
+
Declare the template inside the column it belongs to instead:
|
|
71
|
+
|
|
72
|
+
```html
|
|
73
|
+
<!-- before -->
|
|
74
|
+
<gog-column field="status" />
|
|
75
|
+
<ng-template template="status" type="body" let-row>…</ng-template>
|
|
76
|
+
|
|
77
|
+
<!-- after -->
|
|
78
|
+
<gog-column field="status">
|
|
79
|
+
<ng-template gogColumnBody let-row let-value="value">…</ng-template>
|
|
80
|
+
</gog-column>
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
The `TemplateDirective` export goes with it, along with the `GogTableBodyContext` /
|
|
84
|
+
`GogTableHeaderContext` types it carried — `GogColumnBodyContext` / `GogColumnHeaderContext` are
|
|
85
|
+
the typed replacements, and they are what the column-scoped templates have always used.
|
|
86
|
+
|
|
87
|
+
**The unprefixed table column names.** The `<column>` element selector and the `Column` const and
|
|
88
|
+
type are gone; use `<gog-column>` and `GogColumn`.
|
|
89
|
+
|
|
90
|
+
**The `GogSelectOption` and `GogMultiselectOption` type aliases.** Use `GogDropdownOption` — the
|
|
91
|
+
same type; both were aliases of it since 21.2.2. These two were announced for removal in **21.4.0**
|
|
92
|
+
and overran it by a minor: 21.4.0 through 21.4.4 all shipped with them still exported. Recorded
|
|
93
|
+
here rather than quietly re-dated, and `npm run check:deprecations` now fails the build on any
|
|
94
|
+
`@deprecated … Removed in <version>` tag whose version has already been reached, so no deprecation
|
|
95
|
+
can overrun its date again.
|
|
96
|
+
|
|
97
|
+
**The `@guildofgleks/ui/src/styles/…` asset path.** Stylesheets moved to `@guildofgleks/ui/styles/…`
|
|
98
|
+
in 21.3.2, with the old path documented as working until 21.5.0. The package no longer ships the
|
|
99
|
+
duplicate copy, and the `./src/styles/*` export is gone — if your `angular.json` still names the
|
|
100
|
+
long path, drop the `src/` segment.
|
|
101
|
+
|
|
102
|
+
### Fixed
|
|
103
|
+
|
|
104
|
+
- **`gogCollapsibleTrigger` is reachable by keyboard on any element.** Its own documentation
|
|
105
|
+
invites a non-focusable host ("works on any clickable element"), and on one it used to apply
|
|
106
|
+
`aria-expanded`/`aria-controls` and nothing else: a control that announces itself to a screen
|
|
107
|
+
reader, with no tab stop and no response to Enter or Space — the one combination that strands
|
|
108
|
+
the person relying on that announcement.
|
|
109
|
+
|
|
110
|
+
On a host that is not natively operable the directive now also supplies `role="button"`,
|
|
111
|
+
`tabindex="0"` (`-1` while disabled) and Enter/Space. A `<button>` or `<a href>` is untouched,
|
|
112
|
+
since a second key handler would toggle twice in one press, and a `role`/`tabindex` you set
|
|
113
|
+
yourself is respected rather than overwritten.
|
|
114
|
+
|
|
115
|
+
### Added
|
|
116
|
+
|
|
117
|
+
- **`GOG_DEPRECATIONS` — the deprecation manifest**, generated from the library's own source and
|
|
118
|
+
shipped in the public API:
|
|
119
|
+
|
|
120
|
+
```ts
|
|
121
|
+
import { GOG_DEPRECATIONS } from '@guildofgleks/ui';
|
|
122
|
+
|
|
123
|
+
// → { kind: 'token', name: '--gog-btn-radius', replacement: '--gog-button-radius',
|
|
124
|
+
// since: '21.5.0', sinceDate: '2026-08-19', removedIn: '21.7.0' }
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
It answers "is this still supported, and until when?" for tooling that has to mark an API row —
|
|
128
|
+
a docs site, an editor plugin, a codemod — without anyone maintaining a second list. Symbols
|
|
129
|
+
come from their `@deprecated` tags and tokens from the stylesheets that still resolve them, so
|
|
130
|
+
it cannot drift from the code.
|
|
131
|
+
|
|
132
|
+
In this release it holds **154 tokens and no symbols**: 21.5.0 removed every deprecated symbol
|
|
133
|
+
the library had, and its deprecations are the three abbreviated token prefixes above. An empty
|
|
134
|
+
symbol half is the healthy state, not a broken generator.
|
|
135
|
+
|
|
136
|
+
- **`gog-menu` — a command menu**, with `[gogMenuTrigger]` on your own button and `gogMenuItem` on
|
|
137
|
+
your own items:
|
|
138
|
+
|
|
139
|
+
```html
|
|
140
|
+
<button gogButton variant="ghost" [gogMenuTrigger]="rowMenu" aria-label="Row actions">
|
|
141
|
+
<gog-icon name="more-vertical" />
|
|
142
|
+
</button>
|
|
143
|
+
|
|
144
|
+
<gog-menu #rowMenu>
|
|
145
|
+
<button gogMenuItem (click)="edit(row)">Edit</button>
|
|
146
|
+
<button gogMenuItem disabled>Transfer ownership</button>
|
|
147
|
+
</gog-menu>
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
The library created this gap itself: 21.4.0 added `more-horizontal`/`more-vertical` icons and a
|
|
151
|
+
table built for row actions, with nothing to open with them. Everything else a consumer can
|
|
152
|
+
assemble from what already ships; an accessible menu cannot be — it needs focus management,
|
|
153
|
+
roving focus and overlay placement at once.
|
|
154
|
+
|
|
155
|
+
Keyboard follows the WAI-ARIA menu button pattern: Enter/Space/ArrowDown open with the first
|
|
156
|
+
item focused, ArrowUp with the last, arrows and Home/End move and skip disabled items, Escape
|
|
157
|
+
closes and restores focus to the trigger, Tab closes and moves on.
|
|
158
|
+
|
|
159
|
+
Disable an item with the native `disabled` attribute on your own button — the arrow keys step
|
|
160
|
+
over it. The panel always renders into `<body>`, placed from the trigger's measured rect, so a
|
|
161
|
+
menu inside `gog-scroll`, `gog-table` or any clipping ancestor needs no configuration; it takes
|
|
162
|
+
the `--gog-dropdown-z` its trigger inherits, so a menu inside a dialog stacks above it. Past
|
|
163
|
+
`--gog-menu-max-height` the panel scrolls with `gog-scroll`. Themed by `--gog-menu-*`.
|
|
164
|
+
|
|
165
|
+
- **Right-to-left support.** `dir="rtl"` on `<html>` — or on any subtree — now mirrors every
|
|
166
|
+
component, with nothing to set per component. What changed under it: physical `left`/`right`
|
|
167
|
+
declarations became logical properties across 16 stylesheets; the select/multiselect panel and
|
|
168
|
+
the tooltip bubble copy a _scoped_ `dir` onto their portaled host, so an RTL region inside an
|
|
169
|
+
LTR page renders correctly; a tooltip's `position="auto"` prefers the mirrored horizontal side;
|
|
170
|
+
the calendar's month/year arrows turn around; and the slider fill, toast progress bar and
|
|
171
|
+
indeterminate progressbar run from the inline start.
|
|
172
|
+
|
|
173
|
+
Physical by design, because they are physical words in the API: a tooltip's explicit
|
|
174
|
+
`position="left"`/`"right"`, and a toast's `top-left`/`top-right`/`bottom-left`/`bottom-right`.
|
|
175
|
+
|
|
176
|
+
Three CSS custom properties are declared for the handful of properties with no logical form
|
|
177
|
+
(`transform-origin`, `translate`): `--gog-inline-start-side`, `--gog-inline-end-side` (the
|
|
178
|
+
`left`/`right` keywords) and `--gog-direction-sign` (`1`/`-1`). They flip on `[dir='rtl']` and
|
|
179
|
+
are available to your own styles.
|
|
180
|
+
|
|
181
|
+
### Changed
|
|
182
|
+
|
|
183
|
+
- **Component token prefixes are spelled out.** Three families were abbreviations of a
|
|
184
|
+
component's name — the one thing a consumer cannot guess — and now read as the component does:
|
|
185
|
+
|
|
186
|
+
| Was | Is |
|
|
187
|
+
| ----------------- | ------------------------------------------------------------ |
|
|
188
|
+
| `--gog-btn-*` | `--gog-button-*` |
|
|
189
|
+
| `--gog-confirm-*` | `--gog-confirmation-dialog-*` |
|
|
190
|
+
| `--gog-ms-*` | `--gog-multiselect-*` (since 21.3.0; the removal moved here) |
|
|
191
|
+
|
|
192
|
+
**Nothing breaks now.** Every old spelling still feeds the component: each replacement declares
|
|
193
|
+
it in its own fallback (`--gog-button-md-padding: var(--gog-btn-md-padding, 0.75rem 1.25rem)`),
|
|
194
|
+
and the per-instance names (`--gog-btn-bg`, `--gog-btn-padding`, …) are still read by the
|
|
195
|
+
button's own fallback chain. Override either spelling, at any scope, and it applies —
|
|
196
|
+
verified in a browser rather than reasoned about, for a theme block, a nested `[data-theme]`
|
|
197
|
+
subtree and an inline instance override.
|
|
198
|
+
|
|
199
|
+
**They are removed in 21.7.0** — two minors rather than one, because a CSS custom property that
|
|
200
|
+
nothing reads fails silently: no error, no warning, just a value that stops applying. Migration
|
|
201
|
+
is a find-and-replace on those three prefixes. `TOKENS.md` lists only the current names.
|
|
202
|
+
|
|
203
|
+
One prefix that looks abbreviated and is staying: **`--gog-input-*`**. It names the text-field
|
|
204
|
+
block that `gog-inputfield` and `gog-textarea` both render, not the `gog-inputfield` component —
|
|
205
|
+
the two restyle together from one token set on purpose, so there is no `--gog-inputfield-*`.
|
|
206
|
+
|
|
207
|
+
- **`peerDependencies` now accept Angular 22** (`^21.2.0 || ^22.0.0` for `@angular/common`,
|
|
208
|
+
`@angular/core`, `@angular/forms`, `@angular/platform-browser`) instead of `^21.2.0` alone.
|
|
209
|
+
The library ships partial-compiled (Ivy partial mode), which is forward-compatible with the
|
|
210
|
+
next major without a rebuild — the strict `^21.2.0` peer range was blocking installation into
|
|
211
|
+
an Angular 22 app that otherwise built and ran fine, forcing every such consumer to reach for
|
|
212
|
+
`overrides`/`resolutions` as a workaround.
|
|
213
|
+
|
|
214
|
+
## [21.4.4] - 17.08.2026
|
|
215
|
+
|
|
216
|
+
Everything that is ready. Two defects and one addition, none of which changes an existing
|
|
217
|
+
signature, so upgrading from 21.4.3 needs no migration — see the `gog-collapsible` entry only if
|
|
218
|
+
you were relying on a panel being capped at 480px.
|
|
219
|
+
|
|
220
|
+
### Added
|
|
221
|
+
|
|
222
|
+
- **`ng add @guildofgleks/ui` now works.** It installs the latest version and adds
|
|
223
|
+
`node_modules/@guildofgleks/ui/styles/index.css` to your project's `angular.json` styles —
|
|
224
|
+
the one setup step that's pure mechanical JSON editing. Importing components and placing
|
|
225
|
+
`<gog-dialog />` / `<gog-toast-container />` are still manual; see the README.
|
|
226
|
+
|
|
227
|
+
In a patch rather than a minor because it is purely additive — it adds a way to install the
|
|
228
|
+
package and touches no existing API — the same reasoning that put "`CHANGELOG.md` now ships
|
|
229
|
+
inside the package" in 21.4.2.
|
|
230
|
+
|
|
231
|
+
### Fixed
|
|
232
|
+
|
|
233
|
+
- **An open `gog-collapsible` no longer clips content taller than 480px.**
|
|
234
|
+
`--gog-collapsible-max-height` defaulted to `480px` and the panel is `overflow: hidden`, so any
|
|
235
|
+
panel taller than that lost the rest of its content — with no scrollbar, no ellipsis and nothing
|
|
236
|
+
else to indicate it. The cap existed only to give the CSS transition an animatable target, which
|
|
237
|
+
meant every consumer had to discover the limit by having content disappear, then override the
|
|
238
|
+
token per instance. The default is now `max-content`, and `interpolate-size: allow-keywords` on
|
|
239
|
+
the panel keeps the open/close transition animating to it. `gog-accordion` never had this
|
|
240
|
+
problem — it animates `grid-template-rows` instead — so the two components now behave the same
|
|
241
|
+
way.
|
|
242
|
+
|
|
243
|
+
No token was added or removed, and nothing about the closed state changed. **Setting
|
|
244
|
+
`--gog-collapsible-max-height` to a length still caps the panel and still clips**, which is now
|
|
245
|
+
a deliberate opt-in rather than the default; per-instance overrides that only existed to work
|
|
246
|
+
around the old cap can be deleted.
|
|
247
|
+
|
|
248
|
+
- **`gog-button`'s loading spinner was painted with the page's text colour.**
|
|
249
|
+
`--gog-btn-primary-spinner-color` and `--gog-btn-secondary-spinner-color` resolved to
|
|
250
|
+
`--gog-text-color` — the colour of text on the page background — while the label beside the
|
|
251
|
+
spinner used `--gog-accent-text-color`, the colour meant to sit on the button's fill. On the two
|
|
252
|
+
filled variants those are opposite ends of the palette, so the spinner came out washed out: on
|
|
253
|
+
the dark theme, `#f3ebd8` parchment on a `#fbbf24` amber button, next to a near-black label.
|
|
254
|
+
Both now resolve to the variant's own label colour, so a spinner reads exactly as strongly as
|
|
255
|
+
the text it replaced and follows any re-theming of the button's foreground. `outline` and
|
|
256
|
+
`ghost` were already correct and are untouched.
|
|
257
|
+
|
|
258
|
+
Only the two tokens' values changed; no token was added or removed. A theme that sets either
|
|
259
|
+
one explicitly is unaffected. Note the button as a whole still dims to
|
|
260
|
+
`--gog-btn-loading-opacity` (0.7) while loading — that is deliberate and separate from this.
|
|
15
261
|
|
|
16
262
|
## [21.4.3] - 16.08.2026
|
|
17
263
|
|
|
@@ -32,6 +278,7 @@ first entry if you were relying on a calendar filling its container.
|
|
|
32
278
|
|
|
33
279
|
This sizes `inline` mode too — `[inline]="true"` renders `gog-calendar` with a border and
|
|
34
280
|
nothing else. **Set `--gog-calendar-max-width: 100%` to keep the old full-width behaviour.**
|
|
281
|
+
|
|
35
282
|
- **`--gog-datepicker-panel-width`** (default `max-content`) exposes the dropdown panel's width,
|
|
36
283
|
which was hardcoded. Same value as before; nothing changes unless you set it.
|
|
37
284
|
|
|
@@ -80,7 +327,7 @@ entries above are that kind of gap, which is why a documentation-only patch was
|
|
|
80
327
|
- **Overlays ignored custom properties set on `:root`.** A select panel, tooltip or any other
|
|
81
328
|
overlay rendered into `<body>` copied the `data-theme` of its trigger's nearest themed
|
|
82
329
|
ancestor. When that ancestor is `<html>` — the usual case — the copy made the overlay match
|
|
83
|
-
`theme.css`'s derived layer (`:root, [data-theme]`)
|
|
330
|
+
`theme.css`'s derived layer (`:root, [data-theme]`) _locally_, re-declaring every component
|
|
84
331
|
token against the plain preset palette and discarding anything set on the root that the preset
|
|
85
332
|
does not itself declare.
|
|
86
333
|
|
|
@@ -88,7 +335,7 @@ entries above are that kind of gap, which is why a documentation-only patch was
|
|
|
88
335
|
`document.documentElement` — a live theme editor, or any runtime accent switch — saw the
|
|
89
336
|
document follow while every overlay kept rendering the un-edited theme.
|
|
90
337
|
|
|
91
|
-
The attribute is now copied only for a genuinely
|
|
338
|
+
The attribute is now copied only for a genuinely _scoped_ theme, where the overlay would
|
|
92
339
|
otherwise pick up the document's; when the theme sits on the document element, inheritance
|
|
93
340
|
already does the work. Several themes rendered side by side in scoped subtrees keep working
|
|
94
341
|
exactly as before.
|
|
@@ -108,6 +355,7 @@ A minor rather than a patch: this adds public API. Iterations 5 and 6 of the con
|
|
|
108
355
|
`gogPageChange` deliberately stays quiet in two cases: the initial render, and the reset to
|
|
109
356
|
page 1 that a new sort causes — that reset is part of the sort, and a consumer refetching from
|
|
110
357
|
both events would issue two requests for one user action.
|
|
358
|
+
|
|
111
359
|
- **`gog-table`: `lazy` — server-driven sorting and paging.** With `[lazy]="true"` the table
|
|
112
360
|
stops sorting and slicing `value` and renders it exactly as handed over, treating it as the
|
|
113
361
|
current page; `totalRecords` tells the paginator how many pages exist, and the two outputs are
|
|
@@ -124,6 +372,7 @@ A minor rather than a patch: this adds public API. Iterations 5 and 6 of the con
|
|
|
124
372
|
**The select-all covers the current page, not the whole data set** — in `lazy` mode the table
|
|
125
373
|
has never seen the other pages, and a control that meant different things in the two modes
|
|
126
374
|
would be worse than either behaviour on its own.
|
|
375
|
+
|
|
127
376
|
- **`gog-table`: `dataKey`.** The field (or dot-path) identifying a row. Selection matches on it
|
|
128
377
|
instead of object identity — without it a refetch producing new objects silently drops the
|
|
129
378
|
selection — and it becomes the `@for` track key, so the rendered DOM survives a refetch of the
|
|
@@ -132,7 +381,7 @@ A minor rather than a patch: this adds public API. Iterations 5 and 6 of the con
|
|
|
132
381
|
Enter and Space activating the focused row. `gogRowClick` fires on a click either way; this is
|
|
133
382
|
what stops a whole-row target from being mouse-only.
|
|
134
383
|
- **`[gogButton]` — a link that looks like a button.** `gog-button` renders its own `<button>`,
|
|
135
|
-
so it could never
|
|
384
|
+
so it could never _be_ a link, and a large share of buttons on a real site are navigation. The
|
|
136
385
|
directive inverts the relationship: the element stays the consumer's, and only the look is
|
|
137
386
|
applied.
|
|
138
387
|
|
|
@@ -153,6 +402,7 @@ A minor rather than a patch: this adds public API. Iterations 5 and 6 of the con
|
|
|
153
402
|
on an `<a>`) and no `loading` (the spinner is a projected child a directive cannot add). The
|
|
154
403
|
selector is `a[gogButton], button[gogButton]`, not a bare attribute, so it cannot be put on a
|
|
155
404
|
`<div>` and produce something that looks clickable and is invisible to the keyboard.
|
|
405
|
+
|
|
156
406
|
- **`gog-paginator`: a rows-per-page select.** `showPageSizeSelect` turns it on (**off by
|
|
157
407
|
default** — a paginator that silently grew a control would change every existing layout) and
|
|
158
408
|
`pageSizeOptions` sets the choices, defaulting to `[10, 20, 30, 40, 50]`. Both are also
|
|
@@ -160,7 +410,7 @@ A minor rather than a patch: this adds public API. Iterations 5 and 6 of the con
|
|
|
160
410
|
while the rest of the app uses the house default.
|
|
161
411
|
- **`gog-paginator`: `pageSize` (a `model`) and `totalRecords`.** Given `totalRecords`, the
|
|
162
412
|
paginator derives the page count from `pageSize` itself — which removes the
|
|
163
|
-
`computed(() => Math.ceil(total / size))` a consumer would otherwise have to write
|
|
413
|
+
`computed(() => Math.ceil(total / size))` a consumer would otherwise have to write _and_ keep
|
|
164
414
|
in sync with the select. `totalPages` still works and is right when a server hands you a page
|
|
165
415
|
count directly; `totalRecords` wins if both are set. Changing the size returns to page 1:
|
|
166
416
|
"page 5" of 10-row pages is not "page 5" of 50-row ones, so clamping alone would leave the user
|
|
@@ -174,7 +424,7 @@ A minor rather than a patch: this adds public API. Iterations 5 and 6 of the con
|
|
|
174
424
|
- **`provideGogIcons(...)` — register your own icons by name.** `gog-icon` shipped a closed set
|
|
175
425
|
of 20 glyphs, and the only way to render anything else was a `TemplateRef` per instance,
|
|
176
426
|
which costs an `<ng-template>` at every use site and does not work at all for the components
|
|
177
|
-
that take an icon
|
|
427
|
+
that take an icon _name_ (`gog-tag`, `gog-chip`, `gog-tabs`, `gog-button-toggle-group`,
|
|
178
428
|
`ToastService`, `DialogService`). In practice that meant installing a second icon library —
|
|
179
429
|
precisely the dependency the "no CDK, no Material" footprint exists to avoid.
|
|
180
430
|
|
|
@@ -184,8 +434,7 @@ A minor rather than a patch: this adds public API. Iterations 5 and 6 of the con
|
|
|
184
434
|
```
|
|
185
435
|
|
|
186
436
|
```html
|
|
187
|
-
<gog-icon name="cart" />
|
|
188
|
-
<gog-tag iconName="cart">In basket</gog-tag>
|
|
437
|
+
<gog-icon name="cart" /> <gog-tag iconName="cart">In basket</gog-tag>
|
|
189
438
|
```
|
|
190
439
|
|
|
191
440
|
- A registered name **overrides a built-in of the same name**, so an app can replace the
|
|
@@ -193,6 +442,7 @@ A minor rather than a patch: this adds public API. Iterations 5 and 6 of the con
|
|
|
193
442
|
- Providing it again lower in the injector tree **layers onto** the parent set rather than
|
|
194
443
|
replacing it, matching `provideGogConfig`.
|
|
195
444
|
- The registry is also exposed as the `GOG_ICONS` injection token.
|
|
445
|
+
|
|
196
446
|
- **`GogBuiltinIconName`** — the closed union of the shipped glyphs, for code that wants
|
|
197
447
|
exhaustiveness (an icon gallery, a `Record` keyed by icon).
|
|
198
448
|
- **21 more built-in icons, taking the set from 20 to 41.** The old set covered what the
|
|
@@ -213,6 +463,7 @@ A minor rather than a patch: this adds public API. Iterations 5 and 6 of the con
|
|
|
213
463
|
|
|
214
464
|
Cost: `ICON_DEFS` is one object, so every consumer pays for all of it — it grew from 8.0 KB to
|
|
215
465
|
16.5 KB raw, **1.6 KB to 2.7 KB gzipped**.
|
|
466
|
+
|
|
216
467
|
- **Attribution for the icons.** The glyphs were always Lucide but the package said so nowhere;
|
|
217
468
|
Lucide's ISC licence asks for the notice to travel with them. It is now at the top of
|
|
218
469
|
`icons.ts` and summarised in the README's licence section.
|
|
@@ -400,7 +651,7 @@ made unreachable.
|
|
|
400
651
|
overriding it, and ignored outside `range` mode (nothing to disable "one side" of there). A
|
|
401
652
|
one-sided disable only dims and disables that one thumb (its native input's own `disabled`
|
|
402
653
|
attribute takes it out of the tab order); the whole-control `.gog-slider--disabled` styling
|
|
403
|
-
(dimming + `pointer-events: none` over the whole track) only kicks in once
|
|
654
|
+
(dimming + `pointer-events: none` over the whole track) only kicks in once _both_ sides are
|
|
404
655
|
disabled, since applying it for just one would also block pointer input to the other,
|
|
405
656
|
still-enabled thumb. Reactive forms are unaffected by this addition: a `[formControl]`'s own
|
|
406
657
|
`.disable()`/`.enable()` still speaks for both thumbs at once, same as before — one
|
package/README.md
CHANGED
|
@@ -31,6 +31,20 @@ npm install @guildofgleks/ui
|
|
|
31
31
|
|
|
32
32
|
## Setup
|
|
33
33
|
|
|
34
|
+
Install it with whichever package manager you use — or with `ng add`, which installs it and does
|
|
35
|
+
step 1 for you:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
npm install @guildofgleks/ui
|
|
39
|
+
# or
|
|
40
|
+
yarn add @guildofgleks/ui
|
|
41
|
+
# or — also does step 1 below
|
|
42
|
+
ng add @guildofgleks/ui
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Steps 2 and 3 are yours either way: a schematic can't know where in your app you want components
|
|
46
|
+
or dialog and toast hosts.
|
|
47
|
+
|
|
34
48
|
**1. Add the stylesheet.** It carries the baseline theme and the utility classes the components
|
|
35
49
|
use — without it they render unstyled.
|
|
36
50
|
|
|
@@ -42,9 +56,6 @@ use — without it they render unstyled.
|
|
|
42
56
|
]
|
|
43
57
|
```
|
|
44
58
|
|
|
45
|
-
> Up to 21.3.1 these files shipped under `@guildofgleks/ui/src/styles/…`. That path keeps working
|
|
46
|
-
> until 21.5.0; new setups should use the shorter one.
|
|
47
|
-
|
|
48
59
|
**2. Import components where you use them** — each is standalone:
|
|
49
60
|
|
|
50
61
|
```ts
|
|
@@ -82,6 +93,18 @@ export class App {}
|
|
|
82
93
|
One `<gog-dialog />` hosts every dialog (they stack); one `<gog-toast-container />` hosts all
|
|
83
94
|
four toast corners.
|
|
84
95
|
|
|
96
|
+
## Right-to-left
|
|
97
|
+
|
|
98
|
+
**RTL is supported.** Set `dir="rtl"` on `<html>` (or on any subtree) and every component
|
|
99
|
+
mirrors: stylesheets use logical properties, portaled panels and tooltip bubbles copy a scoped
|
|
100
|
+
`dir` onto themselves, a tooltip's `position="auto"` prefers the mirrored horizontal side, and
|
|
101
|
+
the calendar's month arrows turn around.
|
|
102
|
+
|
|
103
|
+
Two things stay physical on purpose, because they are physical words in the API: a tooltip's
|
|
104
|
+
explicit `position="left"`/`"right"`, and a toast's `top-left`/`top-right`/`bottom-left`/
|
|
105
|
+
`bottom-right` corner. `"auto"` is the direction-aware tooltip placement; pick the corner you
|
|
106
|
+
want for a toast.
|
|
107
|
+
|
|
85
108
|
## Theming
|
|
86
109
|
|
|
87
110
|
Every value the components paint with lives in `styles/theme.css`, in three layers:
|
|
@@ -89,13 +112,13 @@ Every value the components paint with lives in `styles/theme.css`, in three laye
|
|
|
89
112
|
**Foundation** — palette, type scale, spacing, motion. Override these to restyle everything at
|
|
90
113
|
once; component tokens derive from them, so a palette swap carries through on its own.
|
|
91
114
|
|
|
92
|
-
**Component** — `--gog-<
|
|
93
|
-
app-wide:
|
|
115
|
+
**Component** — `--gog-<component>-*`, one block per component, named after the component you
|
|
116
|
+
write in markup (`gog-button` → `--gog-button-*`), to restyle a single component app-wide:
|
|
94
117
|
|
|
95
118
|
```css
|
|
96
119
|
:root[data-theme='mine'] {
|
|
97
|
-
--gog-
|
|
98
|
-
--gog-
|
|
120
|
+
--gog-button-font-family: var(--gog-font-body);
|
|
121
|
+
--gog-button-ghost-hover-bg: color-mix(in srgb, var(--gog-accent-color) 20%, transparent);
|
|
99
122
|
--gog-table-hover-bg: var(--gog-hover-color);
|
|
100
123
|
}
|
|
101
124
|
```
|
|
@@ -105,10 +128,21 @@ variant and size classes:
|
|
|
105
128
|
|
|
106
129
|
```css
|
|
107
130
|
.my-form gog-button {
|
|
108
|
-
--gog-
|
|
131
|
+
--gog-button-bg: rebeccapurple; /* wins over .gog-btn--primary */
|
|
109
132
|
}
|
|
110
133
|
```
|
|
111
134
|
|
|
135
|
+
> **Renamed in 21.5.0.** Three prefixes were abbreviated and are now spelled out:
|
|
136
|
+
> `--gog-btn-*` → `--gog-button-*`, `--gog-confirm-*` → `--gog-confirmation-dialog-*`, and
|
|
137
|
+
> `--gog-ms-*` → `--gog-multiselect-*` (that one since 21.3.0). **The old spellings still work**
|
|
138
|
+
> — every new name derives from its old twin — and are **removed in 21.7.0**. A CSS override that
|
|
139
|
+
> stops being read fails silently, which is why the window is two minors rather than one.
|
|
140
|
+
>
|
|
141
|
+
> One prefix that looks abbreviated and is not: **`--gog-input-*`**. It names the shared
|
|
142
|
+
> text-field block that both `gog-inputfield` and `gog-textarea` render (`.gog-input__field`), not
|
|
143
|
+
> the `gog-inputfield` component — the two are meant to restyle together from one token set, so
|
|
144
|
+
> there is no `--gog-inputfield-*` and there will not be one.
|
|
145
|
+
|
|
112
146
|
Every group and token name is in **[`TOKENS.md`](./TOKENS.md)**, generated from `theme.css` so it
|
|
113
147
|
cannot drift, and available at runtime as `GOG_TOKEN_GROUPS`.
|
|
114
148
|
|
|
@@ -174,15 +208,15 @@ provideGogIcons({ cart: '<svg viewBox="0 0 24 24">…</svg>' });
|
|
|
174
208
|
|
|
175
209
|
## Components
|
|
176
210
|
|
|
177
|
-
| Group
|
|
178
|
-
|
|
|
179
|
-
| Form controls
|
|
180
|
-
| Actions
|
|
181
|
-
| Data
|
|
182
|
-
| Layout & disclosure | `gog-accordion`, `gog-tabs` (+ `gog-tab`), `gog-collapsible`, `gog-divider`, `gog-scroll`
|
|
183
|
-
| Overlays
|
|
184
|
-
| Feedback
|
|
185
|
-
| Content
|
|
211
|
+
| Group | Components |
|
|
212
|
+
| ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
213
|
+
| Form controls | `gog-inputfield`, `gog-textarea`, `gog-select`, `gog-multiselect`, `gog-autocomplete`, `gog-checkbox`, `gog-radio-group`, `gog-toggle`, `gog-slider`, `gog-datepicker`, `gog-calendar`, `gog-button-toggle-group` |
|
|
214
|
+
| Actions | `gog-button`, `gog-chip` |
|
|
215
|
+
| Data | `gog-table` (+ `gog-column`), `gog-paginator`, `gog-tag` |
|
|
216
|
+
| Layout & disclosure | `gog-accordion`, `gog-tabs` (+ `gog-tab`), `gog-collapsible`, `gog-divider`, `gog-scroll` |
|
|
217
|
+
| Overlays | `gog-dialog`, `gog-confirmation-dialog`, `gog-toast` (+ `gog-toast-container`), `gog-menu` (+ `gogMenuTrigger` / `gogMenuItem`) |
|
|
218
|
+
| Feedback | `gog-spinner`, `gog-spinner-overlay`, `gog-progressbar`, `gog-skeleton` |
|
|
219
|
+
| Content | `gog-icon` |
|
|
186
220
|
|
|
187
221
|
**Directives:** `gogButton` (a link that looks like a button), `gogTooltip`, `gogBadge`,
|
|
188
222
|
`gogCollapsibleTrigger`, `gogCollapsibleContent`.
|
|
@@ -209,11 +243,11 @@ A few things worth knowing before you reach for a workaround:
|
|
|
209
243
|
|
|
210
244
|
## Documentation
|
|
211
245
|
|
|
212
|
-
|
|
|
213
|
-
|
|
|
214
|
-
| **[`AGENTS.md`](./AGENTS.md)**
|
|
215
|
-
| **[`TOKENS.md`](./TOKENS.md)**
|
|
216
|
-
| [CHANGELOG](https://github.com/GuildOfGleks/gleks_web_ui/blob/master/projects/gleks/ui/CHANGELOG.md) | release history
|
|
246
|
+
| | |
|
|
247
|
+
| ---------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
|
|
248
|
+
| **[`AGENTS.md`](./AGENTS.md)** | the full API reference — every input, output, slot, type and default, per component. Ships in this package. |
|
|
249
|
+
| **[`TOKENS.md`](./TOKENS.md)** | every `--gog-*` token, generated from `theme.css` |
|
|
250
|
+
| [CHANGELOG](https://github.com/GuildOfGleks/gleks_web_ui/blob/master/projects/gleks/ui/CHANGELOG.md) | release history |
|
|
217
251
|
|
|
218
252
|
`AGENTS.md` is written for an AI coding assistant working in your project, but it is the most
|
|
219
253
|
complete API reference either way — point your assistant at it and it will stop guessing.
|