@guildofgleks/ui 21.4.0 → 21.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +36 -13
- package/CHANGELOG.md +957 -0
- package/README.md +99 -361
- package/fesm2022/guildofgleks-ui.mjs +37 -10
- package/fesm2022/guildofgleks-ui.mjs.map +1 -1
- package/package.json +10 -1
- package/types/guildofgleks-ui.d.ts +2 -2
package/AGENTS.md
CHANGED
|
@@ -5,7 +5,7 @@ an app that **consumes** the published `@guildofgleks/ui` npm package. It is not
|
|
|
5
5
|
authoring the library — if you are working inside the `gleks_web_ui` monorepo itself, read
|
|
6
6
|
`.github/instructions/*.md` instead.
|
|
7
7
|
|
|
8
|
-
Everything below reflects the library's actual source as of **`21.4.
|
|
8
|
+
Everything below reflects the library's actual source as of **`21.4.1`**. `README.md` covers the
|
|
9
9
|
same ground at a higher level — install, setup, theming, global configuration — and is accurate;
|
|
10
10
|
this file goes further, into per-component input tables, and is the one to trust for exact names,
|
|
11
11
|
types and defaults.
|
|
@@ -648,23 +648,41 @@ a generic accessor, unlike select/multiselect/button-toggle).
|
|
|
648
648
|
|
|
649
649
|
#### `gog-slider`
|
|
650
650
|
|
|
651
|
-
| Input
|
|
652
|
-
|
|
|
653
|
-
| `label`, `ariaLabel`
|
|
654
|
-
| `min`, `max`, `step`
|
|
655
|
-
| `showValue`, `showThumb`
|
|
656
|
-
| `errorMessage`, `errorDisplay`
|
|
657
|
-
| `disabled`
|
|
658
|
-
| `fullWidth`
|
|
659
|
-
| `orientation`
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
`
|
|
651
|
+
| Input | Type | Default |
|
|
652
|
+
| --------------------------------- | ---------------------- | ---------------------------------------------- |
|
|
653
|
+
| `label`, `ariaLabel` | `string` | `''` |
|
|
654
|
+
| `min`, `max`, `step` | `number` | `0`, `100`, `1` |
|
|
655
|
+
| `showValue`, `showThumb` | `boolean` | `true` |
|
|
656
|
+
| `errorMessage`, `errorDisplay` | | `''`, `'manual'` |
|
|
657
|
+
| `disabled` | `boolean` | `false` |
|
|
658
|
+
| `fullWidth` | `boolean` | `true` (ignored when `orientation="vertical"`) |
|
|
659
|
+
| `orientation` | `GogSliderOrientation` | `'horizontal'` |
|
|
660
|
+
| `range` | `boolean` | `false` — two thumbs; see below |
|
|
661
|
+
| `startDisabled`, `endDisabled` | `boolean` | `false` — `range` only |
|
|
662
|
+
| `startAriaLabel`, `endAriaLabel` | `string` | `'Minimum'` / `'Maximum'`, prefixed by `label` |
|
|
663
|
+
|
|
664
|
+
Models: `value: number`, and `rangeValue: GogSliderRange` (`{ start: number; end: number }`).
|
|
665
|
+
CVA: yes. Backed by a real `<input type="range">` (rotated via `writing-mode` for vertical), so
|
|
666
|
+
dragging/touch/keyboard all come from the platform.
|
|
663
667
|
|
|
664
668
|
```html
|
|
665
669
|
<gog-slider label="Volume" [min]="0" [max]="100" formControlName="volume" />
|
|
666
670
|
```
|
|
667
671
|
|
|
672
|
+
**Range mode.** `[range]="true"` puts a second thumb on the track and switches which model is
|
|
673
|
+
live: bind `[(rangeValue)]` instead of `[(value)]`. The two are **mutually exclusive** — `value`
|
|
674
|
+
(and a form control's `writeValue`) is ignored while `range` is on, and vice versa.
|
|
675
|
+
|
|
676
|
+
```html
|
|
677
|
+
<gog-slider label="Price" [range]="true" [(rangeValue)]="price" startAriaLabel="Lowest" />
|
|
678
|
+
```
|
|
679
|
+
|
|
680
|
+
Each thumb needs its own accessible name, because one `<label>` cannot be associated with two
|
|
681
|
+
inputs through `for`; unset, they fall back to `'Minimum'`/`'Maximum'` prefixed with `label`
|
|
682
|
+
(`'Price Minimum'`). `startDisabled`/`endDisabled` pin one end while the other stays movable —
|
|
683
|
+
they are ORed with `disabled` rather than overriding it, and unlike it they do not dim the whole
|
|
684
|
+
control or cut pointer events over the track, which would take the still-enabled thumb with them.
|
|
685
|
+
|
|
668
686
|
#### `gog-datepicker` / `gog-calendar`
|
|
669
687
|
|
|
670
688
|
`gog-datepicker` is a field + panel; `gog-calendar` is the month grid alone (what `inline` mode
|
|
@@ -780,6 +798,11 @@ providers: [
|
|
|
780
798
|
as `provideGogConfig`: a lazy route can register only what it uses.
|
|
781
799
|
- **An unknown name renders nothing and warns in dev mode; it never throws.** An icon is
|
|
782
800
|
decoration — failing the render over a typo would be the worse outcome.
|
|
801
|
+
- **`GOG_ICONS`** is the `InjectionToken<Readonly<Record<string, string>>>` behind it, exported
|
|
802
|
+
for the one case `provideGogIcons` does not cover: reading the registered set back
|
|
803
|
+
(`inject(GOG_ICONS)`) to enumerate it in an icon picker. Provide it through
|
|
804
|
+
`provideGogIcons(...)` rather than directly — the helper is what layers a child injector's
|
|
805
|
+
icons onto the parent's instead of replacing them.
|
|
783
806
|
- **Write the SVG for inheritance:** a `viewBox`, `stroke="currentColor"` (or `fill`), and no
|
|
784
807
|
width/height — `gog-icon` drives size and stroke width from the `--gog-icon-*` tokens, so a
|
|
785
808
|
registered icon scales and colours like a built-in.
|