ngwr 12.0.0 → 12.2.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/README.md +79 -20
- package/alert/styles/_index.scss +11 -4
- package/badge/styles/_index.scss +30 -0
- package/badge/styles/_tag.scss +15 -1
- package/descriptions/styles/_index.scss +13 -3
- package/drawer/styles/_index.scss +95 -1
- package/fesm2022/ngwr-action-sheet.mjs +3 -3
- package/fesm2022/ngwr-affix.mjs +3 -3
- package/fesm2022/ngwr-alert.mjs +3 -3
- package/fesm2022/ngwr-anchor.mjs +3 -3
- package/fesm2022/ngwr-aurora.mjs +3 -3
- package/fesm2022/ngwr-avatar.mjs +3 -3
- package/fesm2022/ngwr-back-top.mjs +3 -3
- package/fesm2022/ngwr-badge.mjs +6 -6
- package/fesm2022/ngwr-bar-chart.mjs +3 -3
- package/fesm2022/ngwr-blur-text.mjs +3 -3
- package/fesm2022/ngwr-border-glow.mjs +3 -3
- package/fesm2022/ngwr-breadcrumbs.mjs +6 -6
- package/fesm2022/ngwr-burger.mjs +3 -3
- package/fesm2022/ngwr-button.mjs +6 -6
- package/fesm2022/ngwr-calendar-heatmap.mjs +3 -3
- package/fesm2022/ngwr-calendar.mjs +3 -3
- package/fesm2022/ngwr-card.mjs +9 -9
- package/fesm2022/ngwr-carousel.mjs +6 -6
- package/fesm2022/ngwr-cascader.mjs +3 -3
- package/fesm2022/ngwr-checkbox.mjs +6 -6
- package/fesm2022/ngwr-circular-text.mjs +3 -3
- package/fesm2022/ngwr-click-spark.mjs +3 -3
- package/fesm2022/ngwr-clipboard.mjs +3 -3
- package/fesm2022/ngwr-collapse.mjs +9 -9
- package/fesm2022/ngwr-color-picker.mjs +6 -6
- package/fesm2022/ngwr-color-picker.mjs.map +1 -1
- package/fesm2022/ngwr-command-palette.mjs +3 -3
- package/fesm2022/ngwr-compare.mjs +3 -3
- package/fesm2022/ngwr-confetti.mjs +3 -3
- package/fesm2022/ngwr-context-menu.mjs +12 -12
- package/fesm2022/ngwr-cookie.mjs +3 -3
- package/fesm2022/ngwr-counter.mjs +6 -6
- package/fesm2022/ngwr-date-adapters-fns.mjs +3 -3
- package/fesm2022/ngwr-date-adapters-luxon.mjs +3 -3
- package/fesm2022/ngwr-date-picker.mjs +18 -18
- package/fesm2022/ngwr-date.mjs +3 -3
- package/fesm2022/ngwr-decrypt-text.mjs +3 -3
- package/fesm2022/ngwr-density.mjs +6 -6
- package/fesm2022/ngwr-descriptions.mjs +6 -6
- package/fesm2022/ngwr-dialog.mjs +15 -15
- package/fesm2022/ngwr-directives.mjs +12 -12
- package/fesm2022/ngwr-divider.mjs +3 -3
- package/fesm2022/ngwr-donut-chart.mjs +3 -3
- package/fesm2022/ngwr-drag-drop.mjs +6 -6
- package/fesm2022/ngwr-drawer.mjs +24 -18
- package/fesm2022/ngwr-drawer.mjs.map +1 -1
- package/fesm2022/ngwr-dropdown.mjs +9 -9
- package/fesm2022/ngwr-empty.mjs +3 -3
- package/fesm2022/ngwr-event-calendar.mjs +6 -6
- package/fesm2022/ngwr-falling-text.mjs +3 -3
- package/fesm2022/ngwr-file-upload.mjs +3 -3
- package/fesm2022/ngwr-form.mjs +9 -9
- package/fesm2022/ngwr-fuzzy-text.mjs +3 -3
- package/fesm2022/ngwr-gauge.mjs +3 -3
- package/fesm2022/ngwr-glitch-text.mjs +3 -3
- package/fesm2022/ngwr-gradient-text.mjs +3 -3
- package/fesm2022/ngwr-hotkey.mjs +6 -6
- package/fesm2022/ngwr-i18n.mjs +9 -9
- package/fesm2022/ngwr-icon.mjs +6 -6
- package/fesm2022/ngwr-image-cropper.mjs +3 -3
- package/fesm2022/ngwr-input-number.mjs +3 -3
- package/fesm2022/ngwr-input-otp.mjs +3 -3
- package/fesm2022/ngwr-input.mjs +15 -15
- package/fesm2022/ngwr-keyboard.mjs +3 -3
- package/fesm2022/ngwr-knob.mjs +3 -3
- package/fesm2022/ngwr-layout.mjs +15 -15
- package/fesm2022/ngwr-lightbox.mjs +3 -3
- package/fesm2022/ngwr-line-chart.mjs +3 -3
- package/fesm2022/ngwr-list.mjs +6 -6
- package/fesm2022/ngwr-loading-bar.mjs +6 -6
- package/fesm2022/ngwr-markdown.mjs +6 -6
- package/fesm2022/ngwr-marquee.mjs +3 -3
- package/fesm2022/ngwr-media.mjs +3 -3
- package/fesm2022/ngwr-mention.mjs +6 -6
- package/fesm2022/ngwr-meta.mjs +6 -6
- package/fesm2022/ngwr-meter-group.mjs +3 -3
- package/fesm2022/ngwr-overlay.mjs +6 -6
- package/fesm2022/ngwr-page-header.mjs +3 -3
- package/fesm2022/ngwr-pagination.mjs +72 -9
- package/fesm2022/ngwr-pagination.mjs.map +1 -1
- package/fesm2022/ngwr-pipes.mjs +21 -21
- package/fesm2022/ngwr-platform.mjs +9 -9
- package/fesm2022/ngwr-popconfirm.mjs +6 -6
- package/fesm2022/ngwr-popover.mjs +6 -6
- package/fesm2022/ngwr-progress.mjs +3 -3
- package/fesm2022/ngwr-pull-to-refresh.mjs +3 -3
- package/fesm2022/ngwr-qr.mjs +3 -3
- package/fesm2022/ngwr-radio.mjs +6 -6
- package/fesm2022/ngwr-rating.mjs +3 -3
- package/fesm2022/ngwr-result.mjs +12 -12
- package/fesm2022/ngwr-rotating-text.mjs +3 -3
- package/fesm2022/ngwr-scroll.mjs +3 -3
- package/fesm2022/ngwr-segmented-testing.mjs +71 -0
- package/fesm2022/ngwr-segmented-testing.mjs.map +1 -1
- package/fesm2022/ngwr-segmented.mjs +98 -8
- package/fesm2022/ngwr-segmented.mjs.map +1 -1
- package/fesm2022/ngwr-select.mjs +22 -12
- package/fesm2022/ngwr-select.mjs.map +1 -1
- package/fesm2022/ngwr-shiny-text.mjs +6 -6
- package/fesm2022/ngwr-sidebar.mjs +3 -3
- package/fesm2022/ngwr-skeleton.mjs +3 -3
- package/fesm2022/ngwr-slider.mjs +3 -3
- package/fesm2022/ngwr-sparkline.mjs +3 -3
- package/fesm2022/ngwr-speed-dial.mjs +3 -3
- package/fesm2022/ngwr-spinner.mjs +3 -3
- package/fesm2022/ngwr-splash-cursor.mjs +3 -3
- package/fesm2022/ngwr-split-text.mjs +3 -3
- package/fesm2022/ngwr-splitter.mjs +3 -3
- package/fesm2022/ngwr-spotlight-card.mjs +6 -6
- package/fesm2022/ngwr-squircle.mjs +6 -6
- package/fesm2022/ngwr-star-border.mjs +3 -3
- package/fesm2022/ngwr-statistic.mjs +9 -9
- package/fesm2022/ngwr-stepper.mjs +6 -6
- package/fesm2022/ngwr-storage.mjs +3 -3
- package/fesm2022/ngwr-switch.mjs +3 -3
- package/fesm2022/ngwr-table.mjs +18 -18
- package/fesm2022/ngwr-tabs.mjs +6 -6
- package/fesm2022/ngwr-textarea.mjs +3 -3
- package/fesm2022/ngwr-theme.mjs +3 -3
- package/fesm2022/ngwr-tilt-card.mjs +6 -6
- package/fesm2022/ngwr-timeline.mjs +6 -6
- package/fesm2022/ngwr-toast.mjs +9 -9
- package/fesm2022/ngwr-toolbar.mjs +3 -3
- package/fesm2022/ngwr-tour.mjs +6 -6
- package/fesm2022/ngwr-transfer.mjs +3 -3
- package/fesm2022/ngwr-tree.mjs +3 -3
- package/fesm2022/ngwr-typewriter.mjs +3 -3
- package/fesm2022/ngwr-typography.mjs +3 -3
- package/fesm2022/ngwr-version.mjs +1 -1
- package/fesm2022/ngwr-version.mjs.map +1 -1
- package/fesm2022/ngwr-virtual-scroll.mjs +3 -3
- package/fesm2022/ngwr-waves.mjs +3 -3
- package/fesm2022/ngwr-window.mjs +12 -12
- package/llms-full.txt +1 -1
- package/llms.txt +24 -2
- package/overlay/styles/_arrow.scss +243 -0
- package/package.json +1 -1
- package/popconfirm/styles/_index.scss +17 -0
- package/popover/styles/_index.scss +49 -207
- package/select/styles/_index.scss +30 -4
- package/sidebar/styles/_index.scss +4 -1
- package/stepper/styles/_index.scss +44 -5
- package/theme/styles/_mixins.scss +10 -0
- package/tree/styles/_index.scss +10 -2
- package/types/ngwr-pagination.d.ts +11 -0
- package/types/ngwr-segmented-testing.d.ts +44 -0
- package/types/ngwr-segmented.d.ts +86 -4
- package/types/ngwr-select.d.ts +12 -2
- package/types/ngwr-version.d.ts +1 -1
package/README.md
CHANGED
|
@@ -7,9 +7,61 @@
|
|
|
7
7
|
[](https://codecov.io/gh/thekhegay/ngwr)
|
|
8
8
|
[](https://github.com/thekhegay/ngwr/blob/main/LICENSE)
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
<!-- "Nineteen" is derived, not chosen: `grep -rn "implements .*Form\(Value\|Checkbox\)Control" projects/lib`
|
|
11
|
+
returns twenty class declarations, and the twentieth — `date-picker/internal/time-panel.ts` —
|
|
12
|
+
is exported by no `public-api.ts`. Seventeen implement `FormValueControl`; `wr-checkbox` and
|
|
13
|
+
`wr-switch` implement `FormCheckboxControl`. It is a count and not the word "every" on purpose:
|
|
14
|
+
`[wrColorPickerTrigger]` is public, carries its own `value` model, and implements neither.
|
|
15
|
+
Re-derive before editing the number. -->
|
|
16
|
+
|
|
17
|
+
**NGWR is an Angular UI library that binds straight to Signal Forms.** Nineteen
|
|
18
|
+
value controls implement `FormValueControl` / `FormCheckboxControl` themselves,
|
|
19
|
+
so `[formField]` writes the component's own `value` / `checked` model — there
|
|
20
|
+
is not one `ControlValueAccessor` in the library. Zoneless by construction, not
|
|
21
|
+
zoneless-compatible: signal inputs, signal state, `afterNextRender()` for DOM
|
|
22
|
+
work, and no `@NgModule` or `@Input()` decorator anywhere in the source. 202
|
|
23
|
+
tree-shakable entry points, on `@angular/cdk` for overlay, portal and a11y
|
|
24
|
+
primitives.
|
|
25
|
+
|
|
26
|
+
**[Try it in the browser](https://ngwr.dev/start/playground)** — no install.
|
|
27
|
+
**[How it compares](https://ngwr.dev/start/comparison)** — what the other
|
|
28
|
+
Angular UI libraries do about Signal Forms today, counted rather than asserted.
|
|
29
|
+
**[Docs and live demos](https://ngwr.dev)**.
|
|
30
|
+
|
|
31
|
+
```ts
|
|
32
|
+
import { Component, signal } from '@angular/core';
|
|
33
|
+
import { FormField, email, form, required } from '@angular/forms/signals';
|
|
34
|
+
import { WrCheckbox } from 'ngwr/checkbox';
|
|
35
|
+
import { WrFormField } from 'ngwr/form';
|
|
36
|
+
import { WrInput } from 'ngwr/input';
|
|
37
|
+
|
|
38
|
+
@Component({
|
|
39
|
+
selector: 'signup-card',
|
|
40
|
+
imports: [FormField, WrCheckbox, WrFormField, WrInput],
|
|
41
|
+
template: `
|
|
42
|
+
<wr-form-field label="Work email" required>
|
|
43
|
+
<input wrInput type="email" [formField]="signup.email" />
|
|
44
|
+
</wr-form-field>
|
|
45
|
+
|
|
46
|
+
<wr-checkbox [formField]="signup.agree">I agree to the terms</wr-checkbox>
|
|
47
|
+
`,
|
|
48
|
+
})
|
|
49
|
+
export class SignupCard {
|
|
50
|
+
private readonly model = signal({ email: '', agree: false });
|
|
51
|
+
|
|
52
|
+
// `[formField]` binds to the control's own `value` / `checked` model, and
|
|
53
|
+
// `<wr-form-field>` resolves the error copy from the i18n catalog — so
|
|
54
|
+
// neither an accessor nor a `<wr-form-error>` has to be written by hand.
|
|
55
|
+
readonly signup = form(this.model, path => {
|
|
56
|
+
required(path.email);
|
|
57
|
+
email(path.email);
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Classic `[(ngModel)]` and reactive forms still work — Angular 22 synthesises the
|
|
63
|
+
accessor for a signal-forms control — and every control is usable standalone
|
|
64
|
+
through its two-way `[(value)]` / `[(checked)]` model.
|
|
13
65
|
|
|
14
66
|
> **Status:** active development. v12 is the current major line (Angular 22 peer).
|
|
15
67
|
> Public API is stable across patch releases and still evolving between majors.
|
|
@@ -18,16 +70,18 @@ zoneless-ready, responsive, modular SCSS, fully tree-shakable. Built on top of
|
|
|
18
70
|
|
|
19
71
|
## Requirements
|
|
20
72
|
|
|
21
|
-
| Peer
|
|
22
|
-
|
|
|
23
|
-
| `@angular/core`
|
|
24
|
-
| `@angular/common`
|
|
25
|
-
| `@angular/
|
|
26
|
-
| `@angular/
|
|
27
|
-
| `
|
|
28
|
-
| `
|
|
29
|
-
| `
|
|
30
|
-
| `
|
|
73
|
+
| Peer | Range |
|
|
74
|
+
| ------------------------------ | -------------------- |
|
|
75
|
+
| `@angular/core` | `>= 22.0.0` |
|
|
76
|
+
| `@angular/common` | `>= 22.0.0` |
|
|
77
|
+
| `@angular/forms` | `>= 22.0.0` |
|
|
78
|
+
| `@angular/cdk` | `>= 22.0.0` |
|
|
79
|
+
| `@angular/platform-browser` | `>= 22.0.0` |
|
|
80
|
+
| `@angular/router` _(optional)_ | `>= 22.0.0` |
|
|
81
|
+
| `rxjs` | `^7.0.0` |
|
|
82
|
+
| `date-fns` _(optional)_ | `^3.0.0 \|\| ^4.0.0` |
|
|
83
|
+
| `luxon` _(optional)_ | `^3.0.0` |
|
|
84
|
+
| `lucide` _(optional)_ | `>= 1.0.0` |
|
|
31
85
|
|
|
32
86
|
TypeScript `~6.0.x` (Angular 22's compiler declares `typescript >=6.0 <6.1`) and
|
|
33
87
|
a Node version Angular 22 accepts — `^22.22.3 || ^24.15.0 || >=26`. Contributing
|
|
@@ -55,11 +109,16 @@ npm install ngwr @angular/cdk
|
|
|
55
109
|
yarn add ngwr @angular/cdk
|
|
56
110
|
```
|
|
57
111
|
|
|
58
|
-
Beyond Angular itself, `@angular/cdk` and `@angular/forms` are the required
|
|
59
|
-
|
|
60
|
-
`
|
|
61
|
-
|
|
62
|
-
it
|
|
112
|
+
Beyond Angular itself, `@angular/cdk` and `@angular/forms` are the required
|
|
113
|
+
peers — forms because the value controls implement its Signal Forms interfaces.
|
|
114
|
+
`@angular/router` is optional, needed only by the navigation components that
|
|
115
|
+
take a `routerLink`. A stock `ng new` app already ships forms and router, so
|
|
116
|
+
`@angular/cdk` is the only one you have to add — which is why it is on the
|
|
117
|
+
install lines above. Add an icon set and a date library only if you use them —
|
|
118
|
+
`lucide` (or `feather-icons`) for the icon adapters, and `date-fns` or `luxon`
|
|
119
|
+
for the calendar / date-picker, which otherwise runs on a built-in native
|
|
120
|
+
`Date` adapter. The Quick start below registers a lucide icon, so it needs
|
|
121
|
+
`lucide`:
|
|
63
122
|
|
|
64
123
|
```shell
|
|
65
124
|
pnpm add lucide
|
|
@@ -146,7 +205,7 @@ export class AppComponent {
|
|
|
146
205
|
}
|
|
147
206
|
```
|
|
148
207
|
|
|
149
|
-
|
|
208
|
+
Value controls are Signal Forms-native, so `[formField]` binds straight
|
|
150
209
|
through — no `ControlValueAccessor` anywhere in the chain:
|
|
151
210
|
|
|
152
211
|
```ts
|
|
@@ -241,7 +300,7 @@ Math (`clamp`, `round`), coercion (`numAttr`), css helpers (`resolveCssSize`, `g
|
|
|
241
300
|
## Highlights
|
|
242
301
|
|
|
243
302
|
- **Standalone & signals-first.** Every component is standalone and uses `input()` / `model()` / `output()` / `signal()` / `computed()`. Zoneless-ready.
|
|
244
|
-
- **Signal Forms native.**
|
|
303
|
+
- **Signal Forms native.** Nineteen value controls implement `FormValueControl` / `FormCheckboxControl`, so `[formField]` binds straight through — there is no `ControlValueAccessor` in the library at all. `[(ngModel)]` and reactive forms keep working through Angular's bridge, and every control also works standalone via `[(value)]` / `[(checked)]`.
|
|
245
304
|
- **CDK-powered.** Overlays, portals, and a11y come from `@angular/cdk`. We add `provideWrOverlay()` so NGWR overlays never collide with other CDK consumers (Material, NG-ZORRO, etc.).
|
|
246
305
|
- **Mobile & responsive.** Overlays collapse to bottom-sheets on small screens (`provideWrResponsiveOverlays()`), touch targets grow to ≥44px on coarse pointers, a `touch` density preset enlarges the nine control families that read the multipliers, and drawer / lightbox / toast / carousel respond to swipe gestures. Fixed surfaces respect `env(safe-area-inset-*)`, and layout components (`descriptions`, `stepper`, `page-header`, `toolbar`, `pagination`, `table`) reflow to their container via container queries. [Guide](https://ngwr.dev/guides/mobile).
|
|
247
306
|
- **Table, batteries included.** `wr-table` covers column pinning / resizing / drag-reorder, row selection, expandable rows, grouping, tree rows (`childrenKey` — the forest flattens into the same `<tbody>`, so pinning and cell templates keep working at every depth, and the table announces a `treegrid`), summary rows, CSV export (`exportCsv()`, dependency-free RFC 4180) and a virtualized body — all opt-in inputs on the one component. Excel (`.xlsx`) export is deliberately not shipped: it would mean a third-party dependency.
|
package/alert/styles/_index.scss
CHANGED
|
@@ -18,7 +18,17 @@ $alert-colors: (
|
|
|
18
18
|
|
|
19
19
|
// Defaults — overridden per variant below.
|
|
20
20
|
--wr-alert-bg: var(--wr-color-info-soft);
|
|
21
|
-
|
|
21
|
+
// `transparent`, not a `-soft-border` hairline: the tint alone carries the
|
|
22
|
+
// block, and the ring around it was a second edge saying the same thing.
|
|
23
|
+
//
|
|
24
|
+
// The hook itself stays, and is still what the border reads — it is public
|
|
25
|
+
// API, an app that wants a bordered alert sets `--wr-alert-border` and gets
|
|
26
|
+
// one back, per variant if it likes. Nor does the declaration go: a
|
|
27
|
+
// transparent 1px border still occupies its 1px, so a consumer switching the
|
|
28
|
+
// hook on does not reflow the block by a pixel on each side, and no variant's
|
|
29
|
+
// padding has to be re-derived. NO variant overrides this any more — an alert
|
|
30
|
+
// has one border value, and it is the one a consumer can reach.
|
|
31
|
+
--wr-alert-border: transparent;
|
|
22
32
|
// `-ink`, never the bare intent: this is the intent used AS TEXT on its own
|
|
23
33
|
// soft tint, and a bare `--wr-color-warning` there is 1.71:1 in the light
|
|
24
34
|
// theme. See the token note in AGENTS.md — `-contrast` is the other
|
|
@@ -103,7 +113,6 @@ $alert-colors: (
|
|
|
103
113
|
@each $variant, $color in $alert-colors {
|
|
104
114
|
&--#{$variant} {
|
|
105
115
|
--wr-alert-bg: var(--wr-color-#{$color}-soft);
|
|
106
|
-
--wr-alert-border: var(--wr-color-#{$color}-soft-border);
|
|
107
116
|
--wr-alert-title: var(--wr-color-#{$color}-ink);
|
|
108
117
|
--wr-alert-close: var(--wr-color-#{$color}-ink);
|
|
109
118
|
}
|
|
@@ -112,7 +121,6 @@ $alert-colors: (
|
|
|
112
121
|
// Neutral — muted gray chip, reusing the `medium` soft tokens.
|
|
113
122
|
&--neutral {
|
|
114
123
|
--wr-alert-bg: var(--wr-color-medium-soft);
|
|
115
|
-
--wr-alert-border: var(--wr-color-medium-soft-border);
|
|
116
124
|
--wr-alert-title: var(--wr-color-on-surface);
|
|
117
125
|
--wr-alert-message: var(--wr-color-on-surface-muted);
|
|
118
126
|
--wr-alert-close: var(--wr-color-on-surface-muted);
|
|
@@ -126,7 +134,6 @@ $alert-colors: (
|
|
|
126
134
|
// light text in light theme; light bg + dark text in dark theme.
|
|
127
135
|
&--offline {
|
|
128
136
|
--wr-alert-bg: var(--wr-color-on-surface);
|
|
129
|
-
--wr-alert-border: var(--wr-color-on-surface);
|
|
130
137
|
--wr-alert-title: var(--wr-color-surface);
|
|
131
138
|
--wr-alert-message: var(--wr-color-surface);
|
|
132
139
|
--wr-alert-close: var(--wr-color-surface);
|
package/badge/styles/_index.scss
CHANGED
|
@@ -81,6 +81,31 @@
|
|
|
81
81
|
|
|
82
82
|
// Outlined — transparent fill, colored border + text. The inset ring
|
|
83
83
|
// replaces the solid background, so padding stays identical.
|
|
84
|
+
//
|
|
85
|
+
// The ring is deliberately NOT `currentcolor` once an intent is on the host.
|
|
86
|
+
// The label sits on `-ink`, which is calibrated to 5.0:1 and must not move —
|
|
87
|
+
// so a ring drawn in the text colour is a hairline at full label strength
|
|
88
|
+
// wrapped around text of exactly that strength, and the two cannot be
|
|
89
|
+
// separated while they share one value. `-soft-border` is the same intent at
|
|
90
|
+
// 0.3 alpha: the theme's canonical hairline, already per intent and already
|
|
91
|
+
// theme-correct through the `-rgb` channels. `wr-tag--outlined` draws the same
|
|
92
|
+
// ring from the same token; the tag keeps its 6% fill, because a tag is a
|
|
93
|
+
// chip you can click and a badge is a label you cannot.
|
|
94
|
+
//
|
|
95
|
+
// The soft trio covers the seven CHROMATIC intents, so `light` and `dark` have
|
|
96
|
+
// no `-soft-border` and the `var()` carries the token's own recipe as its
|
|
97
|
+
// fallback. That fallback is load-bearing twice over: an undefined custom
|
|
98
|
+
// property with no fallback invalidates the whole declaration, which would
|
|
99
|
+
// leave those two badges with no ring at all rather than a soft one — and
|
|
100
|
+
// 0.3 alpha is what keeps `dark` in the same family as the other eight
|
|
101
|
+
// instead of the only ring still drawn at full label strength, which is the
|
|
102
|
+
// weight this rule exists to stop drawing.
|
|
103
|
+
//
|
|
104
|
+
// `light` is the one intent the recipe cannot serve: it is a surface tone by
|
|
105
|
+
// definition, a hair off the page in either theme, so 30% of it over the page
|
|
106
|
+
// is nothing. At FULL strength it is `--wr-color-outline` — the hairline every
|
|
107
|
+
// bordered surface in the library already draws — so it is reached by that
|
|
108
|
+
// name, after the loop, rather than by an alpha that happens to land there.
|
|
84
109
|
&--outlined {
|
|
85
110
|
background-color: transparent;
|
|
86
111
|
box-shadow: inset 0 0 0 1px currentcolor;
|
|
@@ -88,7 +113,12 @@
|
|
|
88
113
|
@each $name in theme.$colors {
|
|
89
114
|
&.wr-badge--#{$name} {
|
|
90
115
|
color: var(--wr-color-#{$name}-ink);
|
|
116
|
+
box-shadow: inset 0 0 0 1px var(--wr-color-#{$name}-soft-border, rgba(var(--wr-color-#{$name}-rgb), 0.3));
|
|
91
117
|
}
|
|
92
118
|
}
|
|
119
|
+
|
|
120
|
+
&.wr-badge--light {
|
|
121
|
+
box-shadow: inset 0 0 0 1px var(--wr-color-outline);
|
|
122
|
+
}
|
|
93
123
|
}
|
|
94
124
|
}
|
package/badge/styles/_tag.scss
CHANGED
|
@@ -74,10 +74,17 @@
|
|
|
74
74
|
--wr-tag-bg: var(--wr-color-#{$name});
|
|
75
75
|
--wr-tag-border: var(--wr-color-#{$name});
|
|
76
76
|
|
|
77
|
+
// The ring reads from `-soft-border` rather than a hand-rolled alpha, so
|
|
78
|
+
// it is the same hairline `wr-badge--outlined` draws — one alpha in one
|
|
79
|
+
// place, which is the reason the soft trio exists. 0.25 -> 0.30 is the
|
|
80
|
+
// whole visual change here. The 6% fill stays, and that is the one place
|
|
81
|
+
// the two deliberately differ: a tag is a chip you can click, hover and
|
|
82
|
+
// dismiss, so it keeps a body the badge has none of. `light` and `dark`
|
|
83
|
+
// fall back exactly as the badge does — see the note there.
|
|
77
84
|
&.wr-tag--outlined {
|
|
78
85
|
--wr-tag-color: var(--wr-color-#{$name}-ink);
|
|
79
86
|
--wr-tag-bg: rgba(var(--wr-color-#{$name}-rgb), 0.06);
|
|
80
|
-
--wr-tag-border: rgba(var(--wr-color-#{$name}-rgb), 0.
|
|
87
|
+
--wr-tag-border: var(--wr-color-#{$name}-soft-border, rgba(var(--wr-color-#{$name}-rgb), 0.3));
|
|
81
88
|
}
|
|
82
89
|
|
|
83
90
|
&.wr-tag--transparent {
|
|
@@ -87,4 +94,11 @@
|
|
|
87
94
|
}
|
|
88
95
|
}
|
|
89
96
|
}
|
|
97
|
+
|
|
98
|
+
// `light` outlined, after the loop for the same reason the badge carries the
|
|
99
|
+
// same rule: 30% of a surface tone is not a line. At full strength it IS
|
|
100
|
+
// `--wr-color-outline`, which is already this component's default border.
|
|
101
|
+
&--light.wr-tag--outlined {
|
|
102
|
+
--wr-tag-border: var(--wr-color-outline);
|
|
103
|
+
}
|
|
90
104
|
}
|
|
@@ -80,10 +80,14 @@
|
|
|
80
80
|
|
|
81
81
|
&--bordered &__row {
|
|
82
82
|
padding: 0.625rem 0.875rem;
|
|
83
|
+
}
|
|
83
84
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
85
|
+
// Nesting this as `& + &` expands BOTH sides in full —
|
|
86
|
+
// `… .wr-descriptions__row + .wr-descriptions--bordered .wr-descriptions__row` —
|
|
87
|
+
// which asks for a `--bordered` HOST as a row's sibling and can never match, so
|
|
88
|
+
// the stacked bordered card shipped with no dividers at all. Name the sibling.
|
|
89
|
+
&--bordered &__row + &__row {
|
|
90
|
+
border-top: 1px solid var(--wr-color-outline);
|
|
87
91
|
}
|
|
88
92
|
|
|
89
93
|
&--bordered#{&}--inline &__list {
|
|
@@ -122,6 +126,12 @@
|
|
|
122
126
|
display: flex;
|
|
123
127
|
flex-direction: column;
|
|
124
128
|
gap: 0.5rem;
|
|
129
|
+
// The grid layout above aligns its two columns on `baseline`, which is
|
|
130
|
+
// correct there and wrong here: once the list is a COLUMN flex container
|
|
131
|
+
// the cross axis is the width, so `baseline` sizes each row to its own
|
|
132
|
+
// content. Rows must stretch, or a bordered row's divider paints only as
|
|
133
|
+
// wide as its longest line instead of spanning the card.
|
|
134
|
+
align-items: stretch;
|
|
125
135
|
}
|
|
126
136
|
|
|
127
137
|
.wr-descriptions--inline .wr-descriptions__row {
|
|
@@ -49,7 +49,12 @@
|
|
|
49
49
|
// `elementFromPoint` still answered "close button" over the first 10px of the
|
|
50
50
|
// content: the boxes had stopped intersecting and the control was still covered.
|
|
51
51
|
// 52px clears the target with two pixels to spare.
|
|
52
|
-
.wr-
|
|
52
|
+
// `:not(.wr-drawer__handle)` for the same reason as `:not(.wr-drawer__close)` —
|
|
53
|
+
// the grab handle is chrome, not the content column. It clears the × on its own
|
|
54
|
+
// (the button is corner-anchored, the bottom-sheet handle is centred), and on
|
|
55
|
+
// `left` / `right` it is out of the flow entirely, where a block-start padding
|
|
56
|
+
// would shove the rail off its own centre line.
|
|
57
|
+
.wr-drawer__panel--untitled > *:not(.wr-drawer__close):not(.wr-drawer__handle) {
|
|
53
58
|
padding-block-start: 3.25rem;
|
|
54
59
|
}
|
|
55
60
|
|
|
@@ -144,6 +149,23 @@
|
|
|
144
149
|
border-bottom-left-radius: var(--wr-border-radius-lg);
|
|
145
150
|
}
|
|
146
151
|
|
|
152
|
+
// Room for the vertical grab rail, which is out of the flow (see
|
|
153
|
+
// `&__panel--left &__handle`). Only the two horizontal positions need it: the
|
|
154
|
+
// `top` / `bottom` handle is a flow row and reserves its own height.
|
|
155
|
+
//
|
|
156
|
+
// On the PANEL rather than per slot, because an absolutely positioned child
|
|
157
|
+
// is placed against the padding box — so `right: 0` lands the rail in exactly
|
|
158
|
+
// the gutter this opens, and the title's and footer's rules stay untouched.
|
|
159
|
+
// Same 1.25rem the handle measures across.
|
|
160
|
+
&--handle.wr-drawer__panel--left {
|
|
161
|
+
// rtl-ok: mirrors the physically placed rail — inner edge of a left-anchored panel
|
|
162
|
+
padding-right: 1.25rem;
|
|
163
|
+
}
|
|
164
|
+
&--handle.wr-drawer__panel--right {
|
|
165
|
+
// rtl-ok: mirrors the physically placed rail — inner edge of a right-anchored panel
|
|
166
|
+
padding-left: 1.25rem;
|
|
167
|
+
}
|
|
168
|
+
|
|
147
169
|
// Safe-area padding on the trailing edge. `env(safe-area-inset-*)` is defined
|
|
148
170
|
// per physical screen edge — the notch does not move when the text does — so
|
|
149
171
|
// the padding that clears it stays physical as well.
|
|
@@ -165,6 +187,10 @@
|
|
|
165
187
|
|
|
166
188
|
.wr-drawer {
|
|
167
189
|
// Grab handle (visual swipe-to-dismiss affordance)
|
|
190
|
+
//
|
|
191
|
+
// The base rule is the BOTTOM sheet: a horizontal bar in the flow at the top
|
|
192
|
+
// of the column. `--top`, `--left` and `--right` re-place it below — see the
|
|
193
|
+
// block after this one, which is where the whole point of the handle lives.
|
|
168
194
|
&__handle {
|
|
169
195
|
display: flex;
|
|
170
196
|
align-items: center;
|
|
@@ -174,6 +200,8 @@
|
|
|
174
200
|
cursor: grab;
|
|
175
201
|
user-select: none;
|
|
176
202
|
// Own the gesture — stop the browser turning the drag into a scroll/pan.
|
|
203
|
+
// Every placement below inherits this: without it the browser claims the
|
|
204
|
+
// drag as a pan and the panel never follows the finger.
|
|
177
205
|
touch-action: none;
|
|
178
206
|
}
|
|
179
207
|
|
|
@@ -185,6 +213,72 @@
|
|
|
185
213
|
background: rgba(var(--wr-color-on-surface-rgb), 0.18);
|
|
186
214
|
}
|
|
187
215
|
|
|
216
|
+
// The handle follows `position`, because the gesture does.
|
|
217
|
+
//
|
|
218
|
+
// `showHandle` has always documented itself as a handle "at the leading edge"
|
|
219
|
+
// — the edge facing the viewport interior, the one the panel is dragged away
|
|
220
|
+
// from — and `closeAxis()` in drawer.ts already resolves all four: down for
|
|
221
|
+
// `bottom`, up for `top`, left for `left`, right for `right`. The CSS
|
|
222
|
+
// implemented one of them. The other three drew the same horizontal bar at
|
|
223
|
+
// the top of the panel, so a right-side drawer showed a stray pill above its
|
|
224
|
+
// title pointing along an axis the drag does not travel.
|
|
225
|
+
//
|
|
226
|
+
// Keep these two in step: a bar the finger finds on the wrong axis is worse
|
|
227
|
+
// than no bar, because it invites the gesture that does nothing.
|
|
228
|
+
|
|
229
|
+
// `top` — same horizontal bar, block-END edge. `order` rather than a template
|
|
230
|
+
// change: the handle is `aria-hidden` chrome, so nothing depends on its DOM
|
|
231
|
+
// position, and `margin-block-start: auto` puts it against the bottom even
|
|
232
|
+
// when the projected content does not grow (a bare `<nav>` is `flex: 0 1 auto`,
|
|
233
|
+
// so without it the handle would float directly under the content).
|
|
234
|
+
&__panel--top &__handle {
|
|
235
|
+
order: 1;
|
|
236
|
+
margin-block-start: auto;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
// `left` / `right` — a VERTICAL bar on the inner vertical edge.
|
|
240
|
+
//
|
|
241
|
+
// Out of the flow, because the panel is a column and a rail on its inline
|
|
242
|
+
// edge is not a row of it; putting it back in the flow would mean wrapping
|
|
243
|
+
// the projected title / content / footer in a new element, and those sit
|
|
244
|
+
// directly under `.wr-drawer__panel` in markup consumers already style.
|
|
245
|
+
// The panel reserves the gutter it floats over (`&--handle`, up in the
|
|
246
|
+
// `.wr-drawer__panel` block), so nothing is covered — the lesson `--untitled`
|
|
247
|
+
// learned about the × button.
|
|
248
|
+
&__panel--left &__handle,
|
|
249
|
+
&__panel--right &__handle {
|
|
250
|
+
position: absolute;
|
|
251
|
+
inset-block-start: 50%;
|
|
252
|
+
// Not the panel's own transform: `onSwipeMove` writes `translateX(…)` onto
|
|
253
|
+
// the PANEL while dragging, and this element is its child.
|
|
254
|
+
transform: translateY(-50%);
|
|
255
|
+
// 0.5rem each side of a 0.25rem bar — the same 1.25rem thickness the
|
|
256
|
+
// horizontal handle has, turned ninety degrees, so the gutter reserved for
|
|
257
|
+
// it is the one the panel's slots already pad by. The 1.5rem block padding
|
|
258
|
+
// is grab target rather than decoration: it takes the 2.5rem bar to a 5.5rem
|
|
259
|
+
// reachable strip, which a finger can find without aiming at a 4px pill.
|
|
260
|
+
padding: 1.5rem 0.5rem;
|
|
261
|
+
z-index: 1;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
&__panel--left &__handle {
|
|
265
|
+
// rtl-ok: `position` is physical (`left` names a viewport edge, and the CDK
|
|
266
|
+
// strategy calls `.left()`), so the inner edge of a left-anchored panel is
|
|
267
|
+
// the physical right one in either direction
|
|
268
|
+
right: 0;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
&__panel--right &__handle {
|
|
272
|
+
// rtl-ok: physical `position` — inner edge of a right-anchored panel
|
|
273
|
+
left: 0;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
&__panel--left &__grabber,
|
|
277
|
+
&__panel--right &__grabber {
|
|
278
|
+
width: 0.25rem;
|
|
279
|
+
height: 2.5rem;
|
|
280
|
+
}
|
|
281
|
+
|
|
188
282
|
&__title {
|
|
189
283
|
margin: 0;
|
|
190
284
|
padding: 1rem 1.25rem;
|
|
@@ -75,10 +75,10 @@ class WrActionSheet {
|
|
|
75
75
|
this.action.emit(item);
|
|
76
76
|
this.open.set(false);
|
|
77
77
|
}
|
|
78
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.
|
|
79
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.
|
|
78
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: WrActionSheet, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
79
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: WrActionSheet, isStandalone: true, selector: "wr-action-sheet", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, titleFallback: { classPropertyName: "titleFallback", publicName: "titleFallback", isSignal: true, isRequired: false, transformFunction: null }, message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "openChange", action: "action" }, ngImport: i0, template: "<wr-drawer [(open)]=\"open\" position=\"bottom\" height=\"auto\" rounded showHandle safeArea maxHeight=\"90dvh\">\n <div class=\"wr-action-sheet\">\n @if (title() || message()) {\n <div class=\"wr-action-sheet__header\">\n @if (title()) {\n <div class=\"wr-action-sheet__title\" wrDrawerTitle>{{ title() }}</div>\n }\n @if (message()) {\n <div class=\"wr-action-sheet__message\">{{ message() }}</div>\n }\n </div>\n }\n <!-- The drawer opens as an aria-modal dialog; name it via wrDrawerTitle.\n When there is no visible title, a screen-reader-only fallback keeps the\n dialog from being announced as unnamed. -->\n @if (!title()) {\n <span class=\"wr-action-sheet__sr-only\" wrDrawerTitle>{{ resolvedTitleFallback() }}</span>\n }\n\n <div class=\"wr-action-sheet__group\">\n @for (item of mainActions(); track $index) {\n <button\n type=\"button\"\n class=\"wr-action-sheet__action\"\n [class.wr-action-sheet__action--destructive]=\"item.role === 'destructive'\"\n [disabled]=\"item.disabled\"\n (click)=\"select(item)\"\n >\n @if (item.icon) {\n <wr-icon class=\"wr-action-sheet__icon\" [name]=\"item.icon\" />\n }\n <span class=\"wr-action-sheet__label\">{{ item.label }}</span>\n </button>\n }\n </div>\n\n @if (cancelActions().length) {\n <div class=\"wr-action-sheet__group wr-action-sheet__group--cancel\">\n @for (item of cancelActions(); track $index) {\n <button\n type=\"button\"\n class=\"wr-action-sheet__action wr-action-sheet__action--cancel\"\n [disabled]=\"item.disabled\"\n (click)=\"select(item)\"\n >\n <span class=\"wr-action-sheet__label\">{{ item.label }}</span>\n </button>\n }\n </div>\n }\n </div>\n</wr-drawer>\n", dependencies: [{ kind: "component", type: WrDrawer, selector: "wr-drawer", inputs: ["open", "position", "width", "height", "maxHeight", "rounded", "showHandle", "safeArea", "hasBackdrop", "closeOnBackdropClick", "closeOnEscape", "closable", "closeLabel"], outputs: ["openChange"] }, { kind: "directive", type: WrDrawerTitle, selector: "[wrDrawerTitle]" }, { kind: "component", type: WrIcon, selector: "wr-icon", inputs: ["name"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
80
80
|
}
|
|
81
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.
|
|
81
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: WrActionSheet, decorators: [{
|
|
82
82
|
type: Component,
|
|
83
83
|
args: [{ selector: 'wr-action-sheet', encapsulation: ViewEncapsulation.None, imports: [WrDrawer, WrDrawerTitle, WrIcon], template: "<wr-drawer [(open)]=\"open\" position=\"bottom\" height=\"auto\" rounded showHandle safeArea maxHeight=\"90dvh\">\n <div class=\"wr-action-sheet\">\n @if (title() || message()) {\n <div class=\"wr-action-sheet__header\">\n @if (title()) {\n <div class=\"wr-action-sheet__title\" wrDrawerTitle>{{ title() }}</div>\n }\n @if (message()) {\n <div class=\"wr-action-sheet__message\">{{ message() }}</div>\n }\n </div>\n }\n <!-- The drawer opens as an aria-modal dialog; name it via wrDrawerTitle.\n When there is no visible title, a screen-reader-only fallback keeps the\n dialog from being announced as unnamed. -->\n @if (!title()) {\n <span class=\"wr-action-sheet__sr-only\" wrDrawerTitle>{{ resolvedTitleFallback() }}</span>\n }\n\n <div class=\"wr-action-sheet__group\">\n @for (item of mainActions(); track $index) {\n <button\n type=\"button\"\n class=\"wr-action-sheet__action\"\n [class.wr-action-sheet__action--destructive]=\"item.role === 'destructive'\"\n [disabled]=\"item.disabled\"\n (click)=\"select(item)\"\n >\n @if (item.icon) {\n <wr-icon class=\"wr-action-sheet__icon\" [name]=\"item.icon\" />\n }\n <span class=\"wr-action-sheet__label\">{{ item.label }}</span>\n </button>\n }\n </div>\n\n @if (cancelActions().length) {\n <div class=\"wr-action-sheet__group wr-action-sheet__group--cancel\">\n @for (item of cancelActions(); track $index) {\n <button\n type=\"button\"\n class=\"wr-action-sheet__action wr-action-sheet__action--cancel\"\n [disabled]=\"item.disabled\"\n (click)=\"select(item)\"\n >\n <span class=\"wr-action-sheet__label\">{{ item.label }}</span>\n </button>\n }\n </div>\n }\n </div>\n</wr-drawer>\n" }]
|
|
84
84
|
}], propDecorators: { open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }], actions: [{ type: i0.Input, args: [{ isSignal: true, alias: "actions", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], titleFallback: [{ type: i0.Input, args: [{ isSignal: true, alias: "titleFallback", required: false }] }], message: [{ type: i0.Input, args: [{ isSignal: true, alias: "message", required: false }] }], action: [{ type: i0.Output, args: ["action"] }] } });
|
package/fesm2022/ngwr-affix.mjs
CHANGED
|
@@ -106,10 +106,10 @@ class WrAffix {
|
|
|
106
106
|
});
|
|
107
107
|
});
|
|
108
108
|
}
|
|
109
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.
|
|
110
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.
|
|
109
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: WrAffix, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
110
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.4", type: WrAffix, isStandalone: true, selector: "[wrAffix]", inputs: { offsetTop: { classPropertyName: "offsetTop", publicName: "wrAffixOffsetTop", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { affixChange: "wrAffixChange" }, host: { properties: { "style.position": "\"sticky\"", "style.top.px": "offsetTop()" }, classAttribute: "wr-affix" }, ngImport: i0 });
|
|
111
111
|
}
|
|
112
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.
|
|
112
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: WrAffix, decorators: [{
|
|
113
113
|
type: Directive,
|
|
114
114
|
args: [{
|
|
115
115
|
selector: '[wrAffix]',
|
package/fesm2022/ngwr-alert.mjs
CHANGED
|
@@ -89,10 +89,10 @@ class WrAlert {
|
|
|
89
89
|
this.dismissed.set(true);
|
|
90
90
|
this.closed.emit();
|
|
91
91
|
}
|
|
92
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.
|
|
93
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.
|
|
92
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: WrAlert, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
93
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: WrAlert, isStandalone: true, selector: "wr-alert", inputs: { closeLabel: { classPropertyName: "closeLabel", publicName: "closeLabel", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, iconName: { classPropertyName: "iconName", publicName: "iconName", isSignal: true, isRequired: false, transformFunction: null }, message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, closeable: { classPropertyName: "closeable", publicName: "closeable", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closed: "closed" }, host: { properties: { "class": "classes()", "attr.role": "liveRole()", "attr.aria-live": "liveLevel()" } }, ngImport: i0, template: "@if (!dismissed()) {\n @if (iconName(); as n) {\n <wr-icon class=\"wr-alert__icon\" [name]=\"n\" />\n } @else if (icon()) {\n <svg\n class=\"wr-alert__icon\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n @switch (type()) {\n @case ('success') {\n <path d=\"M21.801 10A10 10 0 1 1 17 3.335\" />\n <path d=\"m9 11 3 3L22 4\" />\n }\n @case ('warning') {\n <path d=\"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3\" />\n <path d=\"M12 9v4\" />\n <path d=\"M12 17h.01\" />\n }\n @case ('danger') {\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d=\"M12 8v4\" />\n <path d=\"M12 16h.01\" />\n }\n @case ('neutral') {\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d=\"M12 8v4\" />\n <path d=\"M12 16h.01\" />\n }\n @case ('offline') {\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d=\"m4.9 4.9 14.2 14.2\" />\n }\n @default {\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d=\"M12 16v-4\" />\n <path d=\"M12 8h.01\" />\n }\n }\n </svg>\n }\n\n <div class=\"wr-alert__body\">\n @if (title(); as t) {\n <p class=\"wr-alert__title\">{{ t }}</p>\n @if (message(); as m) {\n <p class=\"wr-alert__message\">{{ m }}</p>\n }\n } @else if (message(); as m) {\n <p class=\"wr-alert__title\">{{ m }}</p>\n }\n </div>\n\n @if (closeable()) {\n <button type=\"button\" class=\"wr-alert__close\" [attr.aria-label]=\"resolvedCloseLabel()\" (click)=\"onClose()\">\n <svg\n class=\"wr-icon__svg\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M18 6 6 18\" />\n <path d=\"m6 6 12 12\" />\n </svg>\n </button>\n }\n}\n", dependencies: [{ kind: "component", type: WrIcon, selector: "wr-icon", inputs: ["name"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
94
94
|
}
|
|
95
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.
|
|
95
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: WrAlert, decorators: [{
|
|
96
96
|
type: Component,
|
|
97
97
|
args: [{ selector: 'wr-alert', imports: [WrIcon], encapsulation: ViewEncapsulation.None, host: {
|
|
98
98
|
'[class]': 'classes()',
|
package/fesm2022/ngwr-anchor.mjs
CHANGED
|
@@ -99,10 +99,10 @@ class WrAnchor {
|
|
|
99
99
|
this.scroll.to(`#${id}`, { offset: this.offset() });
|
|
100
100
|
this.activeId.set(id);
|
|
101
101
|
}
|
|
102
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.
|
|
103
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.
|
|
102
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: WrAnchor, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
103
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: WrAnchor, isStandalone: true, selector: "wr-anchor", inputs: { links: { classPropertyName: "links", publicName: "links", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, offset: { classPropertyName: "offset", publicName: "offset", isSignal: true, isRequired: false, transformFunction: null }, hitArea: { classPropertyName: "hitArea", publicName: "hitArea", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "navigation" }, properties: { "attr.aria-label": "resolvedAriaLabel()" }, classAttribute: "wr-anchor" }, ngImport: i0, template: "<ul class=\"wr-anchor__list\">\n @for (link of links(); track link.id) {\n <li class=\"wr-anchor__item\">\n <a\n class=\"wr-anchor__link\"\n [class.wr-anchor__link--active]=\"activeId() === link.id\"\n [attr.aria-current]=\"activeId() === link.id ? 'location' : null\"\n [href]=\"`#${link.id}`\"\n (click)=\"onClick(link.id, $event)\"\n >\n {{ link.label }}\n </a>\n @if (link.children?.length) {\n <ul class=\"wr-anchor__list wr-anchor__list--nested\">\n @for (child of link.children; track child.id) {\n <li class=\"wr-anchor__item\">\n <a\n class=\"wr-anchor__link\"\n [class.wr-anchor__link--active]=\"activeId() === child.id\"\n [attr.aria-current]=\"activeId() === child.id ? 'location' : null\"\n [href]=\"`#${child.id}`\"\n (click)=\"onClick(child.id, $event)\"\n >\n {{ child.label }}\n </a>\n </li>\n }\n </ul>\n }\n </li>\n }\n</ul>\n", encapsulation: i0.ViewEncapsulation.None });
|
|
104
104
|
}
|
|
105
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.
|
|
105
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: WrAnchor, decorators: [{
|
|
106
106
|
type: Component,
|
|
107
107
|
args: [{ selector: 'wr-anchor', encapsulation: ViewEncapsulation.None, host: { class: 'wr-anchor', role: 'navigation', '[attr.aria-label]': 'resolvedAriaLabel()' }, template: "<ul class=\"wr-anchor__list\">\n @for (link of links(); track link.id) {\n <li class=\"wr-anchor__item\">\n <a\n class=\"wr-anchor__link\"\n [class.wr-anchor__link--active]=\"activeId() === link.id\"\n [attr.aria-current]=\"activeId() === link.id ? 'location' : null\"\n [href]=\"`#${link.id}`\"\n (click)=\"onClick(link.id, $event)\"\n >\n {{ link.label }}\n </a>\n @if (link.children?.length) {\n <ul class=\"wr-anchor__list wr-anchor__list--nested\">\n @for (child of link.children; track child.id) {\n <li class=\"wr-anchor__item\">\n <a\n class=\"wr-anchor__link\"\n [class.wr-anchor__link--active]=\"activeId() === child.id\"\n [attr.aria-current]=\"activeId() === child.id ? 'location' : null\"\n [href]=\"`#${child.id}`\"\n (click)=\"onClick(child.id, $event)\"\n >\n {{ child.label }}\n </a>\n </li>\n }\n </ul>\n }\n </li>\n }\n</ul>\n" }]
|
|
108
108
|
}], ctorParameters: () => [], propDecorators: { links: [{ type: i0.Input, args: [{ isSignal: true, alias: "links", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], offset: [{ type: i0.Input, args: [{ isSignal: true, alias: "offset", required: false }] }], hitArea: [{ type: i0.Input, args: [{ isSignal: true, alias: "hitArea", required: false }] }] } });
|
package/fesm2022/ngwr-aurora.mjs
CHANGED
|
@@ -294,10 +294,10 @@ class WrAurora {
|
|
|
294
294
|
gl.clear(gl.COLOR_BUFFER_BIT);
|
|
295
295
|
gl.drawArrays(gl.TRIANGLES, 0, 3);
|
|
296
296
|
}
|
|
297
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.
|
|
298
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.
|
|
297
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: WrAurora, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
298
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.4", type: WrAurora, isStandalone: true, selector: "wr-aurora", inputs: { colorStops: { classPropertyName: "colorStops", publicName: "colorStops", isSignal: true, isRequired: false, transformFunction: null }, amplitude: { classPropertyName: "amplitude", publicName: "amplitude", isSignal: true, isRequired: false, transformFunction: null }, blend: { classPropertyName: "blend", publicName: "blend", isSignal: true, isRequired: false, transformFunction: null }, speed: { classPropertyName: "speed", publicName: "speed", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "wr-aurora" }, viewQueries: [{ propertyName: "canvasRef", first: true, predicate: ["canvas"], descendants: true, isSignal: true }], ngImport: i0, template: '<canvas #canvas class="wr-aurora__canvas" aria-hidden="true"></canvas>', isInline: true, styles: [".wr-aurora{--wr-aurora-stop-1: #6366f1;--wr-aurora-stop-2: #10b981;--wr-aurora-stop-3: #6366f1;position:absolute;inset:0;display:block;overflow:hidden;pointer-events:none;z-index:0}.wr-aurora__canvas{display:block;width:100%;height:100%}[data-theme=dark] .wr-aurora{--wr-aurora-stop-1: #5227ff;--wr-aurora-stop-2: #7cff67;--wr-aurora-stop-3: #5227ff}\n"], encapsulation: i0.ViewEncapsulation.None });
|
|
299
299
|
}
|
|
300
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.
|
|
300
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: WrAurora, decorators: [{
|
|
301
301
|
type: Component,
|
|
302
302
|
args: [{ selector: 'wr-aurora', template: '<canvas #canvas class="wr-aurora__canvas" aria-hidden="true"></canvas>', encapsulation: ViewEncapsulation.None, host: { class: 'wr-aurora' }, styles: [".wr-aurora{--wr-aurora-stop-1: #6366f1;--wr-aurora-stop-2: #10b981;--wr-aurora-stop-3: #6366f1;position:absolute;inset:0;display:block;overflow:hidden;pointer-events:none;z-index:0}.wr-aurora__canvas{display:block;width:100%;height:100%}[data-theme=dark] .wr-aurora{--wr-aurora-stop-1: #5227ff;--wr-aurora-stop-2: #7cff67;--wr-aurora-stop-3: #5227ff}\n"] }]
|
|
303
303
|
}], ctorParameters: () => [], propDecorators: { colorStops: [{ type: i0.Input, args: [{ isSignal: true, alias: "colorStops", required: false }] }], amplitude: [{ type: i0.Input, args: [{ isSignal: true, alias: "amplitude", required: false }] }], blend: [{ type: i0.Input, args: [{ isSignal: true, alias: "blend", required: false }] }], speed: [{ type: i0.Input, args: [{ isSignal: true, alias: "speed", required: false }] }], canvasRef: [{ type: i0.ViewChild, args: ['canvas', { isSignal: true }] }] } });
|
package/fesm2022/ngwr-avatar.mjs
CHANGED
|
@@ -104,10 +104,10 @@ class WrAvatar {
|
|
|
104
104
|
onImageError() {
|
|
105
105
|
this.failed.set(true);
|
|
106
106
|
}
|
|
107
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.
|
|
108
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.
|
|
107
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: WrAvatar, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
108
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: WrAvatar, isStandalone: true, selector: "wr-avatar", inputs: { url: { classPropertyName: "url", publicName: "url", isSignal: true, isRequired: false, transformFunction: null }, alt: { classPropertyName: "alt", publicName: "alt", isSignal: true, isRequired: false, transformFunction: null }, shape: { classPropertyName: "shape", publicName: "shape", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "style.width": "cssSize()", "style.height": "cssSize()" } }, ngImport: i0, template: "<ng-content />\n\n@if (url(); as src) {\n @if (!failed()) {\n <img\n class=\"wr-avatar__img\"\n [src]=\"src\"\n [alt]=\"resolvedAlt()\"\n [attr.width]=\"pxSize()\"\n [attr.height]=\"pxSize()\"\n (load)=\"onImageLoad()\"\n (error)=\"onImageError()\"\n decoding=\"async\"\n />\n\n @if (!loaded()) {\n <wr-spinner class=\"wr-avatar__spin\" />\n }\n }\n}\n", dependencies: [{ kind: "component", type: WrSpinner, selector: "wr-spinner", inputs: ["size", "ariaLabel"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
109
109
|
}
|
|
110
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.
|
|
110
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: WrAvatar, decorators: [{
|
|
111
111
|
type: Component,
|
|
112
112
|
args: [{ selector: 'wr-avatar', encapsulation: ViewEncapsulation.None, host: {
|
|
113
113
|
'[class]': 'classes()',
|
|
@@ -64,10 +64,10 @@ class WrBackTop {
|
|
|
64
64
|
onClick() {
|
|
65
65
|
this.scroll.toTop({ offset: this.offset() });
|
|
66
66
|
}
|
|
67
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.
|
|
68
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.
|
|
67
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: WrBackTop, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
68
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.4", type: WrBackTop, isStandalone: true, selector: "wr-back-top", inputs: { visibilityThreshold: { classPropertyName: "visibilityThreshold", publicName: "visibilityThreshold", isSignal: true, isRequired: false, transformFunction: null }, offset: { classPropertyName: "offset", publicName: "offset", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.aria-hidden": "!visible()", "attr.inert": "visible() ? null : ''" } }, ngImport: i0, template: "<button type=\"button\" class=\"wr-back-top__button\" [attr.aria-label]=\"resolvedAriaLabel()\" (click)=\"onClick()\">\n <!-- The arrow is FALLBACK content: rendered next to a projected icon rather\n than instead of it, the documented custom-icon example put two glyphs in\n one 44px circle. -->\n <ng-content>\n <svg width=\"18\" height=\"18\" viewBox=\"0 0 18 18\" aria-hidden=\"true\">\n <path\n d=\"M9 4 L9 14 M4 9 L9 4 L14 9\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n </ng-content>\n</button>\n", encapsulation: i0.ViewEncapsulation.None });
|
|
69
69
|
}
|
|
70
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.
|
|
70
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: WrBackTop, decorators: [{
|
|
71
71
|
type: Component,
|
|
72
72
|
args: [{ selector: 'wr-back-top', encapsulation: ViewEncapsulation.None, host: {
|
|
73
73
|
'[class]': 'classes()',
|