ngwr 10.0.0 → 10.1.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 +9 -8
- package/action-sheet/styles/_index.scss +6 -1
- package/badge/styles/_index.scss +1 -1
- package/badge/styles/_tag.scss +2 -2
- package/border-glow/styles/_index.scss +5 -0
- package/button/styles/_index.scss +6 -6
- package/calendar/styles/_index.scss +9 -1
- package/circular-text/styles/_index.scss +6 -1
- package/density/styles/_index.scss +3 -1
- package/dialog/styles/_index.scss +1 -2
- package/drag-drop/styles/_index.scss +20 -7
- package/event-calendar/styles/_index.scss +284 -0
- package/falling-text/styles/_index.scss +5 -0
- package/fesm2022/ngwr-alert.mjs +8 -3
- package/fesm2022/ngwr-alert.mjs.map +1 -1
- package/fesm2022/ngwr-back-top.mjs +6 -4
- package/fesm2022/ngwr-back-top.mjs.map +1 -1
- package/fesm2022/ngwr-border-glow.mjs +12 -9
- package/fesm2022/ngwr-border-glow.mjs.map +1 -1
- package/fesm2022/ngwr-breadcrumbs.mjs +2 -2
- package/fesm2022/ngwr-breadcrumbs.mjs.map +1 -1
- package/fesm2022/ngwr-calendar.mjs +5 -3
- package/fesm2022/ngwr-calendar.mjs.map +1 -1
- package/fesm2022/ngwr-card.mjs +2 -2
- package/fesm2022/ngwr-card.mjs.map +1 -1
- package/fesm2022/ngwr-carousel.mjs +17 -4
- package/fesm2022/ngwr-carousel.mjs.map +1 -1
- package/fesm2022/ngwr-cascader.mjs +31 -4
- package/fesm2022/ngwr-cascader.mjs.map +1 -1
- package/fesm2022/ngwr-checkbox.mjs +12 -3
- package/fesm2022/ngwr-checkbox.mjs.map +1 -1
- package/fesm2022/ngwr-circular-text.mjs +2 -2
- package/fesm2022/ngwr-circular-text.mjs.map +1 -1
- package/fesm2022/ngwr-command-palette.mjs +7 -3
- package/fesm2022/ngwr-command-palette.mjs.map +1 -1
- package/fesm2022/ngwr-counter.mjs +9 -1
- package/fesm2022/ngwr-counter.mjs.map +1 -1
- package/fesm2022/ngwr-date-picker.mjs +23 -6
- package/fesm2022/ngwr-date-picker.mjs.map +1 -1
- package/fesm2022/ngwr-descriptions.mjs +5 -4
- package/fesm2022/ngwr-descriptions.mjs.map +1 -1
- package/fesm2022/ngwr-drag-drop.mjs +2 -2
- package/fesm2022/ngwr-drag-drop.mjs.map +1 -1
- package/fesm2022/ngwr-dropdown.mjs +4 -0
- package/fesm2022/ngwr-dropdown.mjs.map +1 -1
- package/fesm2022/ngwr-event-calendar.mjs +723 -0
- package/fesm2022/ngwr-event-calendar.mjs.map +1 -0
- package/fesm2022/ngwr-falling-text.mjs +2 -2
- package/fesm2022/ngwr-falling-text.mjs.map +1 -1
- package/fesm2022/ngwr-file-upload.mjs +2 -2
- package/fesm2022/ngwr-file-upload.mjs.map +1 -1
- package/fesm2022/ngwr-form.mjs +258 -42
- package/fesm2022/ngwr-form.mjs.map +1 -1
- package/fesm2022/ngwr-fuzzy-text.mjs +15 -1
- package/fesm2022/ngwr-fuzzy-text.mjs.map +1 -1
- package/fesm2022/ngwr-gauge.mjs +8 -3
- package/fesm2022/ngwr-gauge.mjs.map +1 -1
- package/fesm2022/ngwr-glitch-text.mjs +2 -2
- package/fesm2022/ngwr-glitch-text.mjs.map +1 -1
- package/fesm2022/ngwr-gradient-text.mjs +2 -2
- package/fesm2022/ngwr-gradient-text.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-en.mjs +73 -5
- package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ru.mjs +73 -5
- package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
- package/fesm2022/ngwr-i18n.mjs +20 -2
- package/fesm2022/ngwr-i18n.mjs.map +1 -1
- package/fesm2022/ngwr-icon.mjs +5 -0
- package/fesm2022/ngwr-icon.mjs.map +1 -1
- package/fesm2022/ngwr-input-number.mjs +19 -3
- package/fesm2022/ngwr-input-number.mjs.map +1 -1
- package/fesm2022/ngwr-input.mjs +48 -6
- package/fesm2022/ngwr-input.mjs.map +1 -1
- package/fesm2022/ngwr-knob.mjs +8 -3
- package/fesm2022/ngwr-knob.mjs.map +1 -1
- package/fesm2022/ngwr-lightbox.mjs +32 -3
- package/fesm2022/ngwr-lightbox.mjs.map +1 -1
- package/fesm2022/ngwr-line-chart.mjs +3 -3
- package/fesm2022/ngwr-line-chart.mjs.map +1 -1
- package/fesm2022/ngwr-list.mjs +2 -2
- package/fesm2022/ngwr-list.mjs.map +1 -1
- package/fesm2022/ngwr-loading-bar.mjs +2 -2
- package/fesm2022/ngwr-loading-bar.mjs.map +1 -1
- package/fesm2022/ngwr-marquee.mjs +2 -2
- package/fesm2022/ngwr-marquee.mjs.map +1 -1
- package/fesm2022/ngwr-media.mjs +3 -0
- package/fesm2022/ngwr-media.mjs.map +1 -1
- package/fesm2022/ngwr-meter-group.mjs +14 -3
- package/fesm2022/ngwr-meter-group.mjs.map +1 -1
- package/fesm2022/ngwr-page-header.mjs +2 -2
- package/fesm2022/ngwr-page-header.mjs.map +1 -1
- package/fesm2022/ngwr-pagination.mjs +1 -1
- package/fesm2022/ngwr-pagination.mjs.map +1 -1
- package/fesm2022/ngwr-progress.mjs +8 -2
- package/fesm2022/ngwr-progress.mjs.map +1 -1
- package/fesm2022/ngwr-qr.mjs.map +1 -1
- package/fesm2022/ngwr-rating.mjs +6 -4
- package/fesm2022/ngwr-rating.mjs.map +1 -1
- package/fesm2022/ngwr-result.mjs +19 -12
- package/fesm2022/ngwr-result.mjs.map +1 -1
- package/fesm2022/ngwr-segmented.mjs +2 -2
- package/fesm2022/ngwr-segmented.mjs.map +1 -1
- package/fesm2022/ngwr-select.mjs +28 -8
- package/fesm2022/ngwr-select.mjs.map +1 -1
- package/fesm2022/ngwr-shiny-text.mjs +4 -6
- package/fesm2022/ngwr-shiny-text.mjs.map +1 -1
- package/fesm2022/ngwr-speed-dial.mjs +11 -3
- package/fesm2022/ngwr-speed-dial.mjs.map +1 -1
- package/fesm2022/ngwr-spotlight-card.mjs +2 -2
- package/fesm2022/ngwr-spotlight-card.mjs.map +1 -1
- package/fesm2022/ngwr-squircle.mjs +1 -1
- package/fesm2022/ngwr-squircle.mjs.map +1 -1
- package/fesm2022/ngwr-star-border.mjs +2 -2
- package/fesm2022/ngwr-star-border.mjs.map +1 -1
- package/fesm2022/ngwr-switch.mjs +10 -3
- package/fesm2022/ngwr-switch.mjs.map +1 -1
- package/fesm2022/ngwr-table.mjs +233 -19
- package/fesm2022/ngwr-table.mjs.map +1 -1
- package/fesm2022/ngwr-tabs.mjs +21 -4
- package/fesm2022/ngwr-tabs.mjs.map +1 -1
- package/fesm2022/ngwr-textarea.mjs +20 -4
- package/fesm2022/ngwr-textarea.mjs.map +1 -1
- package/fesm2022/ngwr-tilt-card.mjs +2 -2
- package/fesm2022/ngwr-tilt-card.mjs.map +1 -1
- package/fesm2022/ngwr-toolbar.mjs +2 -2
- package/fesm2022/ngwr-toolbar.mjs.map +1 -1
- package/fesm2022/ngwr-tour.mjs +264 -0
- package/fesm2022/ngwr-tour.mjs.map +1 -0
- package/fesm2022/ngwr-transfer.mjs +184 -0
- package/fesm2022/ngwr-transfer.mjs.map +1 -0
- package/fesm2022/ngwr-tree.mjs +23 -6
- package/fesm2022/ngwr-tree.mjs.map +1 -1
- package/fesm2022/ngwr-typewriter.mjs +2 -2
- package/fesm2022/ngwr-typewriter.mjs.map +1 -1
- package/fesm2022/ngwr-validators.mjs +118 -2
- package/fesm2022/ngwr-validators.mjs.map +1 -1
- package/fesm2022/ngwr-version.mjs +2 -2
- package/fesm2022/ngwr-version.mjs.map +1 -1
- package/fesm2022/ngwr-virtual-scroll.mjs +2 -2
- package/fesm2022/ngwr-virtual-scroll.mjs.map +1 -1
- package/fesm2022/ngwr-waves.mjs +2 -2
- package/fesm2022/ngwr-waves.mjs.map +1 -1
- package/form/styles/_index.scss +8 -4
- package/glitch-text/styles/_index.scss +5 -0
- package/gradient-text/styles/_index.scss +5 -0
- package/i18n/en.json +74 -6
- package/i18n/ru.json +74 -6
- package/icon/styles/_index.scss +5 -0
- package/keyboard/styles/_index.scss +5 -0
- package/llms-full.txt +123 -62
- package/llms.txt +29 -8
- package/loading-bar/styles/_index.scss +5 -0
- package/marquee/styles/_index.scss +7 -2
- package/overlay/styles/_index.scss +5 -0
- package/package.json +13 -1
- package/popover/styles/_index.scss +48 -12
- package/pull-to-refresh/styles/_index.scss +5 -0
- package/result/styles/_index.scss +3 -3
- package/schematics/icon-set/index.js +80 -34
- package/schematics/icon-set/schema.json +8 -3
- package/schematics/ng-add/index.js +5 -2
- package/schematics/page/templates.js +17 -21
- package/schematics/provider/index.js +31 -13
- package/schematics/provider/schema.json +40 -24
- package/schematics/use/index.js +5 -1
- package/schematics/use/schema.json +8 -3
- package/schematics/use/symbol-map.json +6 -177
- package/segmented/styles/_index.scss +1 -1
- package/select/styles/_index.scss +7 -3
- package/shiny-text/styles/_index.scss +5 -0
- package/speed-dial/styles/_index.scss +12 -1
- package/spotlight-card/styles/_index.scss +5 -0
- package/squircle/styles/_index.scss +5 -0
- package/star-border/styles/_index.scss +5 -0
- package/statistic/styles/_index.scss +2 -2
- package/styles/_animations.scss +6 -0
- package/styles.scss +3 -0
- package/table/styles/_index.scss +100 -2
- package/theme/styles/_colors.scss +43 -1
- package/theme/styles/_dark.scss +18 -6
- package/theme/styles/_focus.scss +2 -8
- package/tilt-card/styles/_index.scss +5 -0
- package/toast/styles/_index.scss +6 -3
- package/tour/styles/_index.scss +63 -0
- package/transfer/styles/_index.scss +105 -0
- package/types/ngwr-alert.d.ts +4 -1
- package/types/ngwr-avatar.d.ts +1 -1
- package/types/ngwr-back-top.d.ts +3 -2
- package/types/ngwr-badge.d.ts +1 -1
- package/types/ngwr-border-glow.d.ts +0 -1
- package/types/ngwr-carousel.d.ts +10 -1
- package/types/ngwr-cascader.d.ts +12 -1
- package/types/ngwr-checkbox.d.ts +9 -1
- package/types/ngwr-command-palette.d.ts +4 -1
- package/types/ngwr-date-picker.d.ts +9 -1
- package/types/ngwr-density.d.ts +1 -1
- package/types/ngwr-divider.d.ts +1 -1
- package/types/ngwr-event-calendar.d.ts +358 -0
- package/types/ngwr-form.d.ts +177 -20
- package/types/ngwr-fuzzy-text.d.ts +8 -0
- package/types/ngwr-gauge.d.ts +4 -1
- package/types/ngwr-i18n.d.ts +15 -0
- package/types/ngwr-input-number.d.ts +8 -1
- package/types/ngwr-input.d.ts +50 -20
- package/types/ngwr-knob.d.ts +4 -1
- package/types/ngwr-lightbox.d.ts +7 -1
- package/types/ngwr-line-chart.d.ts +1 -1
- package/types/ngwr-media.d.ts +1 -1
- package/types/ngwr-meter-group.d.ts +9 -1
- package/types/ngwr-page-header.d.ts +2 -2
- package/types/ngwr-pagination.d.ts +1 -1
- package/types/ngwr-progress.d.ts +4 -1
- package/types/ngwr-rating.d.ts +3 -2
- package/types/ngwr-result.d.ts +12 -6
- package/types/ngwr-segmented.d.ts +6 -0
- package/types/ngwr-select.d.ts +13 -7
- package/types/ngwr-shiny-text.d.ts +2 -4
- package/types/ngwr-speed-dial.d.ts +7 -1
- package/types/ngwr-squircle.d.ts +1 -1
- package/types/ngwr-switch.d.ts +7 -1
- package/types/ngwr-table.d.ts +126 -6
- package/types/ngwr-tabs.d.ts +1 -4
- package/types/ngwr-textarea.d.ts +8 -1
- package/types/ngwr-toolbar.d.ts +2 -2
- package/types/ngwr-tour.d.ts +132 -0
- package/types/ngwr-transfer.d.ts +118 -0
- package/types/ngwr-tree.d.ts +10 -2
- package/types/ngwr-validators.d.ts +62 -2
- package/types/ngwr-version.d.ts +2 -2
- package/typewriter/styles/_index.scss +5 -0
- package/typography/styles/_index.scss +3 -3
- package/virtual-scroll/styles/_index.scss +6 -1
- package/waves/styles/_index.scss +5 -0
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# <img src="https://ngwr.dev/
|
|
1
|
+
# <img src="https://ngwr.dev/images/logo.svg" alt="ngwr logo" height="32px">
|
|
2
2
|
|
|
3
3
|
[](https://ngwr.dev)
|
|
4
4
|
[](https://www.npmjs.com/package/ngwr)
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
zoneless-ready, responsive, modular SCSS, fully tree-shakable. Built on top of
|
|
11
11
|
`@angular/cdk` for overlay, portal, and a11y primitives.
|
|
12
12
|
|
|
13
|
-
> **Status:** active development.
|
|
13
|
+
> **Status:** active development. v10 is the current major line (Angular 22 peer).
|
|
14
14
|
> Public API is stable across patch releases and still evolving between majors.
|
|
15
15
|
> [Open an issue](https://github.com/thekhegay/ngwr/issues/new)
|
|
16
16
|
> if something breaks or feels wrong.
|
|
@@ -175,11 +175,11 @@ export class ProfileForm {
|
|
|
175
175
|
|
|
176
176
|
### Components
|
|
177
177
|
|
|
178
|
-
**Form** — [calendar](https://ngwr.dev/reference/components/calendar), [cascader](https://ngwr.dev/reference/components/cascader), [checkbox](https://ngwr.dev/reference/components/checkbox), [color-picker](https://ngwr.dev/reference/components/color-picker), [date-picker](https://ngwr.dev/reference/components/date-picker), [file-upload](https://ngwr.dev/reference/components/file-upload), [form](https://ngwr.dev/reference/components/form), [form-field](https://ngwr.dev/reference/components/form-field), [input](https://ngwr.dev/reference/components/input), [input-number](https://ngwr.dev/reference/components/input-number), [input-otp](https://ngwr.dev/reference/components/input-otp), [knob](https://ngwr.dev/reference/components/knob), [mention](https://ngwr.dev/reference/components/mention), [radio](https://ngwr.dev/reference/components/radio), [rating](https://ngwr.dev/reference/components/rating), [segmented](https://ngwr.dev/reference/components/segmented), [select](https://ngwr.dev/reference/components/select), [slider](https://ngwr.dev/reference/components/slider), [switch](https://ngwr.dev/reference/components/switch), [textarea](https://ngwr.dev/reference/components/textarea).
|
|
178
|
+
**Form** — [calendar](https://ngwr.dev/reference/components/calendar), [cascader](https://ngwr.dev/reference/components/cascader), [checkbox](https://ngwr.dev/reference/components/checkbox), [color-picker](https://ngwr.dev/reference/components/color-picker), [date-picker](https://ngwr.dev/reference/components/date-picker), [file-upload](https://ngwr.dev/reference/components/file-upload), [form](https://ngwr.dev/reference/components/form), [form-field](https://ngwr.dev/reference/components/form-field), [input](https://ngwr.dev/reference/components/input), [input-number](https://ngwr.dev/reference/components/input-number), [input-otp](https://ngwr.dev/reference/components/input-otp), [knob](https://ngwr.dev/reference/components/knob), [mention](https://ngwr.dev/reference/components/mention), [radio](https://ngwr.dev/reference/components/radio), [rating](https://ngwr.dev/reference/components/rating), [segmented](https://ngwr.dev/reference/components/segmented), [select](https://ngwr.dev/reference/components/select), [slider](https://ngwr.dev/reference/components/slider), [switch](https://ngwr.dev/reference/components/switch), [textarea](https://ngwr.dev/reference/components/textarea), [transfer](https://ngwr.dev/reference/components/transfer).
|
|
179
179
|
|
|
180
180
|
**Buttons** — [button](https://ngwr.dev/reference/components/button), [button-group](https://ngwr.dev/reference/components/button-group), [speed-dial](https://ngwr.dev/reference/components/speed-dial).
|
|
181
181
|
|
|
182
|
-
**Data** — [drag-drop](https://ngwr.dev/reference/components/drag-drop), [pagination](https://ngwr.dev/reference/components/pagination), [pull-to-refresh](https://ngwr.dev/reference/components/pull-to-refresh), [table](https://ngwr.dev/reference/components/table), [tree](https://ngwr.dev/reference/components/tree), [virtual-scroll](https://ngwr.dev/reference/components/virtual-scroll).
|
|
182
|
+
**Data** — [drag-drop](https://ngwr.dev/reference/components/drag-drop), [event-calendar](https://ngwr.dev/reference/components/event-calendar), [pagination](https://ngwr.dev/reference/components/pagination), [pull-to-refresh](https://ngwr.dev/reference/components/pull-to-refresh), [table](https://ngwr.dev/reference/components/table), [tree](https://ngwr.dev/reference/components/tree), [virtual-scroll](https://ngwr.dev/reference/components/virtual-scroll).
|
|
183
183
|
|
|
184
184
|
**Feedback** — [alert](https://ngwr.dev/reference/components/alert), [empty](https://ngwr.dev/reference/components/empty), [progress](https://ngwr.dev/reference/components/progress), [result](https://ngwr.dev/reference/components/result), [skeleton](https://ngwr.dev/reference/components/skeleton), [spinner](https://ngwr.dev/reference/components/spinner).
|
|
185
185
|
|
|
@@ -213,11 +213,11 @@ Card packages bundle their related directives: `ngwr/spotlight-card` exports `Wr
|
|
|
213
213
|
|
|
214
214
|
### Services
|
|
215
215
|
|
|
216
|
-
[clipboard](https://ngwr.dev/reference/services/clipboard), [cookie](https://ngwr.dev/reference/services/cookie), [density](https://ngwr.dev/reference/services/density), [hotkey](https://ngwr.dev/reference/services/hotkey), [loading-bar](https://ngwr.dev/reference/services/loading-bar), [media](https://ngwr.dev/reference/services/media), [meta](https://ngwr.dev/reference/services/meta), [platform](https://ngwr.dev/reference/services/platform), [scroll](https://ngwr.dev/reference/services/scroll), [storage](https://ngwr.dev/reference/services/storage), [theme](https://ngwr.dev/reference/services/theme), [i18n](https://ngwr.dev/reference/services/i18n).
|
|
216
|
+
[clipboard](https://ngwr.dev/reference/services/clipboard), [cookie](https://ngwr.dev/reference/services/cookie), [density](https://ngwr.dev/reference/services/density), [hotkey](https://ngwr.dev/reference/services/hotkey), [loading-bar](https://ngwr.dev/reference/services/loading-bar), [media](https://ngwr.dev/reference/services/media), [meta](https://ngwr.dev/reference/services/meta), [platform](https://ngwr.dev/reference/services/platform), [scroll](https://ngwr.dev/reference/services/scroll), [storage](https://ngwr.dev/reference/services/storage), [theme](https://ngwr.dev/reference/services/theme), [tour](https://ngwr.dev/reference/services/tour), [i18n](https://ngwr.dev/reference/services/i18n).
|
|
217
217
|
|
|
218
218
|
### Validators — `ngwr/validators`
|
|
219
219
|
|
|
220
|
-
Bundled `ValidatorFn`s composing cleanly with Angular's built-in `Validators`: `cardNumber` (Luhn), `cvc`, `hexColor`, `iban` (mod-97), `match` (sibling control), `maxDate`, `minDate`, `noWhitespace`, `oneOf`, `url`. See [docs](https://ngwr.dev/reference/validators).
|
|
220
|
+
Bundled `ValidatorFn`s composing cleanly with Angular's built-in `Validators`: `cardNumber` (Luhn), `cvc`, `hexColor`, `iban` (mod-97), `match` (sibling control), `matchFields` (group-level), `maxDate`, `minDate`, `noWhitespace`, `oneOf`, `url`. See [docs](https://ngwr.dev/reference/validators).
|
|
221
221
|
|
|
222
222
|
### Utils — `ngwr/utils`
|
|
223
223
|
|
|
@@ -239,12 +239,13 @@ Math (`clamp`, `round`), coercion (`numAttr`), css helpers (`resolveCssSize`, `g
|
|
|
239
239
|
- **Signal Forms native.** Every value control implements `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)]`.
|
|
240
240
|
- **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.).
|
|
241
241
|
- **Mobile & responsive.** Overlays collapse to bottom-sheets on small screens (`provideWrResponsiveOverlays()`), touch targets grow to ≥44px on coarse pointers, a `touch` density preset enlarges every control, 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).
|
|
242
|
-
- **Table, batteries included.** `wr-table` covers column pinning / resizing / drag-reorder, row selection, expandable rows, grouping, 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.
|
|
243
|
-
- **Tree-shakable.**
|
|
242
|
+
- **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.
|
|
243
|
+
- **Tree-shakable.** 130 separate ng-packagr entry points — import only what you use. Per-component FESM bundles are small: a median of ~3 KB gzipped, the heaviest (`ngwr/select`) ~20 KB. The whole catalog gzips to ~516 KB — but real apps pull a handful of entries. The only runtime dependency is `tslib`.
|
|
244
244
|
- **Modular SCSS.** Component styles are scoped through CSS custom properties. Theme tokens live in `ngwr/theme`; utilities (`grid`, `reset`) and the breakpoints SCSS API are opt-in.
|
|
245
245
|
- **Tree-shaken icons.** `provideWrIcons(lucideIcons({ plus: Plus }))` registers only the icons you actually import. Dev-mode validation warns about unregistered icons.
|
|
246
246
|
- **Reactbits ports, dependency-free.** All animation ports are reimplemented with vanilla DOM + Web Animations API / `IntersectionObserver` / `requestAnimationFrame` / raw WebGL — no GSAP, no `motion/react`, no `matter-js`, no `ogl`.
|
|
247
247
|
- **Motion respects the OS.** Every animation component short-circuits to its final state under `prefers-reduced-motion`.
|
|
248
|
+
- **Legible to agents.** Every docs page also serves as markdown at the same URL plus `.md` — [reference/components/select.md](https://ngwr.dev/reference/components/select.md) is that page's prose, code samples and API tables without the site chrome. The whole catalog is at [llms-full.txt](https://ngwr.dev/llms-full.txt), a quick-ref at [llms.txt](https://ngwr.dev/llms.txt).
|
|
248
249
|
|
|
249
250
|
## Contributing
|
|
250
251
|
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
// Pull the whole theme so a standalone `@use 'ngwr/<name>'` brings in every
|
|
2
|
+
// design token this stylesheet references. Sass deduplicates `@use` per
|
|
3
|
+
// compilation, so the umbrella sheet still emits the theme only once.
|
|
4
|
+
@use '../../theme/styles' as theme;
|
|
5
|
+
|
|
1
6
|
.wr-action-sheet {
|
|
2
7
|
display: flex;
|
|
3
8
|
flex-direction: column;
|
|
@@ -65,7 +70,7 @@
|
|
|
65
70
|
}
|
|
66
71
|
|
|
67
72
|
&--destructive {
|
|
68
|
-
color: var(--wr-color-danger);
|
|
73
|
+
color: var(--wr-color-danger-ink);
|
|
69
74
|
}
|
|
70
75
|
|
|
71
76
|
&--cancel {
|
package/badge/styles/_index.scss
CHANGED
package/badge/styles/_tag.scss
CHANGED
|
@@ -75,13 +75,13 @@
|
|
|
75
75
|
--wr-tag-border: var(--wr-color-#{$name});
|
|
76
76
|
|
|
77
77
|
&.wr-tag--outlined {
|
|
78
|
-
--wr-tag-color: var(--wr-color-#{$name});
|
|
78
|
+
--wr-tag-color: var(--wr-color-#{$name}-ink);
|
|
79
79
|
--wr-tag-bg: rgba(var(--wr-color-#{$name}-rgb), 0.06);
|
|
80
80
|
--wr-tag-border: rgba(var(--wr-color-#{$name}-rgb), 0.25);
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
&.wr-tag--transparent {
|
|
84
|
-
--wr-tag-color: var(--wr-color-#{$name});
|
|
84
|
+
--wr-tag-color: var(--wr-color-#{$name}-ink);
|
|
85
85
|
--wr-tag-bg: rgba(var(--wr-color-#{$name}-rgb), 0.1);
|
|
86
86
|
--wr-tag-border: transparent;
|
|
87
87
|
}
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
// Pull the whole theme so a standalone `@use 'ngwr/<name>'` brings in every
|
|
2
|
+
// design token this stylesheet references. Sass deduplicates `@use` per
|
|
3
|
+
// compilation, so the umbrella sheet still emits the theme only once.
|
|
4
|
+
@use '../../theme/styles' as theme;
|
|
5
|
+
|
|
1
6
|
// Cursor-tracked border glow — ports the reactbits.dev BorderGlow effect.
|
|
2
7
|
// All visual state is driven by two custom properties the component writes:
|
|
3
8
|
// --wr-border-glow-edge-proximity 0..100, scales with pointer-to-edge distance
|
|
@@ -197,12 +197,12 @@
|
|
|
197
197
|
}
|
|
198
198
|
|
|
199
199
|
&.wr-btn--outlined {
|
|
200
|
-
// `
|
|
201
|
-
//
|
|
202
|
-
//
|
|
203
|
-
//
|
|
204
|
-
//
|
|
205
|
-
--wr-btn-color:
|
|
200
|
+
// `-ink` is the intent darkened (light) / lightened (dark) until it
|
|
201
|
+
// clears 4.5:1 as its own label — the base hue does not: in light,
|
|
202
|
+
// warning as a label is 1.71:1. `--wr-color-light-ink` resolves to the
|
|
203
|
+
// page's own ink, which is why the `light` special case is gone; the
|
|
204
|
+
// border still carries the intent.
|
|
205
|
+
--wr-btn-color: var(--wr-color-#{$name}-ink);
|
|
206
206
|
--wr-btn-bg: transparent;
|
|
207
207
|
--wr-btn-border: rgba(var(--wr-color-#{$name}-rgb), 0.4);
|
|
208
208
|
|
|
@@ -115,7 +115,15 @@
|
|
|
115
115
|
letter-spacing: 0.04em;
|
|
116
116
|
}
|
|
117
117
|
|
|
118
|
-
// Day grid
|
|
118
|
+
// Day grid. `__body` exists so the weekday row and the week rows share a
|
|
119
|
+
// `role="grid"` parent; it repeats the host's column gap so the two-sibling
|
|
120
|
+
// layout it replaced renders identically.
|
|
121
|
+
&__body {
|
|
122
|
+
display: flex;
|
|
123
|
+
flex-direction: column;
|
|
124
|
+
gap: 0.5rem;
|
|
125
|
+
}
|
|
126
|
+
|
|
119
127
|
&__grid {
|
|
120
128
|
display: flex;
|
|
121
129
|
flex-direction: column;
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
// Pull the whole theme so a standalone `@use 'ngwr/<name>'` brings in every
|
|
2
|
+
// design token this stylesheet references. Sass deduplicates `@use` per
|
|
3
|
+
// compilation, so the umbrella sheet still emits the theme only once.
|
|
4
|
+
@use '../../theme/styles' as theme;
|
|
5
|
+
|
|
1
6
|
// Circular text (reactbits port). Each char is absolutely positioned at
|
|
2
7
|
// the spinner's centre, then transformed `rotate() translateY(-radius)`
|
|
3
8
|
// so it lands on the perimeter of a circle of constant radius. The host
|
|
@@ -17,7 +22,7 @@
|
|
|
17
22
|
font-weight: 700;
|
|
18
23
|
text-align: center;
|
|
19
24
|
user-select: none;
|
|
20
|
-
transition: transform 0.6s
|
|
25
|
+
transition: transform 0.6s var(--wr-ease-spring);
|
|
21
26
|
|
|
22
27
|
&__spin {
|
|
23
28
|
position: absolute;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Density multipliers. Components multiply their paddings (and the
|
|
2
2
|
// occasional height / line-height) by these scalars via `calc()`.
|
|
3
3
|
//
|
|
4
|
-
// `
|
|
4
|
+
// `md` resolves to `1` everywhere — touching `data-wr-density` is
|
|
5
5
|
// pure opt-in. Components without density-aware paddings just keep
|
|
6
6
|
// their static values.
|
|
7
7
|
//
|
|
@@ -11,6 +11,8 @@
|
|
|
11
11
|
:root {
|
|
12
12
|
--wr-density-y: 1;
|
|
13
13
|
--wr-density-x: 1;
|
|
14
|
+
// `-text` and `-gap` are declared for consumers to read; no shipped
|
|
15
|
+
// component multiplies by either yet. `-y` / `-x` are the live ones.
|
|
14
16
|
--wr-density-text: 1;
|
|
15
17
|
--wr-density-gap: 1;
|
|
16
18
|
}
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
z-index: 1000;
|
|
40
40
|
pointer-events: auto;
|
|
41
41
|
opacity: 0;
|
|
42
|
-
transition: opacity 200ms
|
|
42
|
+
transition: opacity 200ms var(--wr-ease-out);
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
.cdk-overlay-backdrop.cdk-overlay-backdrop-showing {
|
|
@@ -189,4 +189,3 @@
|
|
|
189
189
|
transform: scale(1);
|
|
190
190
|
}
|
|
191
191
|
}
|
|
192
|
-
|
|
@@ -7,8 +7,10 @@
|
|
|
7
7
|
// .cdk-drag-preview — floating preview that follows the cursor
|
|
8
8
|
// .cdk-drag-placeholder — empty slot left at the source position
|
|
9
9
|
// .cdk-drag-animating — in the post-drop settle animation
|
|
10
|
-
//
|
|
11
|
-
//
|
|
10
|
+
// Every one of them is qualified with a `.wr-sortable-list*` class. Bare
|
|
11
|
+
// `.cdk-drag-*` rules are global, and a UI library has no business restyling
|
|
12
|
+
// a consumer's own CDK drop lists — nor `wr-table`'s column drag, which was
|
|
13
|
+
// picking up this component's dashed placeholder and lift shadow.
|
|
12
14
|
|
|
13
15
|
.wr-sortable-list {
|
|
14
16
|
display: block;
|
|
@@ -71,7 +73,11 @@
|
|
|
71
73
|
|
|
72
74
|
// CDK overlays applied by drag-drop
|
|
73
75
|
|
|
74
|
-
|
|
76
|
+
// The preview is a CLONE of the dragged row that CDK moves to `document.body`,
|
|
77
|
+
// so an ancestor selector cannot reach it — but the clone keeps the row's own
|
|
78
|
+
// class, which can. Verified on a real drag: the preview lands in `<body>`
|
|
79
|
+
// carrying `cdk-drag wr-sortable-list__item cdk-drag-preview`.
|
|
80
|
+
.cdk-drag-preview.wr-sortable-list__item {
|
|
75
81
|
box-sizing: border-box;
|
|
76
82
|
color: var(--wr-color-on-surface);
|
|
77
83
|
font-family: var(--wr-font-family-base);
|
|
@@ -86,7 +92,8 @@
|
|
|
86
92
|
// CDK sets pointer-events to none on the preview; we keep visuals only.
|
|
87
93
|
}
|
|
88
94
|
|
|
89
|
-
|
|
95
|
+
// The placeholder stays in the list, so scoping by ancestor is enough here.
|
|
96
|
+
.wr-sortable-list .cdk-drag-placeholder {
|
|
90
97
|
opacity: 0.35;
|
|
91
98
|
// Subtle dashed outline so users see where the item came from.
|
|
92
99
|
background: rgba(var(--wr-color-outline-rgb), 0.6);
|
|
@@ -95,10 +102,16 @@
|
|
|
95
102
|
outline-offset: -1px;
|
|
96
103
|
}
|
|
97
104
|
|
|
98
|
-
|
|
99
|
-
|
|
105
|
+
// Also the preview, not a row in the list: CDK keeps `cdk-drag-preview` on the
|
|
106
|
+
// clone and adds `cdk-drag-animating` while it flies back to the drop slot.
|
|
107
|
+
// Verified on a real drop — the element carries
|
|
108
|
+
// `cdk-drag wr-sortable-list__item cdk-drag-preview cdk-drag-animating` and sits
|
|
109
|
+
// in `<body>`. It has to come after the preview rule, which sets
|
|
110
|
+
// `transition: none` at the same specificity.
|
|
111
|
+
.cdk-drag-animating.wr-sortable-list__item {
|
|
112
|
+
transition: transform 0.18s var(--wr-ease-spring);
|
|
100
113
|
}
|
|
101
114
|
|
|
102
115
|
.wr-sortable-list__list.cdk-drop-list-dragging .wr-sortable-list__item:not(.cdk-drag-placeholder) {
|
|
103
|
-
transition: transform 0.18s
|
|
116
|
+
transition: transform 0.18s var(--wr-ease-spring);
|
|
104
117
|
}
|
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
/// Event calendar — month / week / day.
|
|
2
|
+
///
|
|
3
|
+
/// Grid lines are `box-shadow: inset`, never borders. A border would take up
|
|
4
|
+
/// layout space, and the whole chip model depends on cell boxes being exactly
|
|
5
|
+
/// contiguous: a band's `calc(var(--span) * 100%)` is only the right width if
|
|
6
|
+
/// one cell ends precisely where the next begins.
|
|
7
|
+
.wr-event-calendar {
|
|
8
|
+
--wr-event-calendar-slot-height: 1.5rem;
|
|
9
|
+
--wr-event-calendar-band-height: 1.25rem;
|
|
10
|
+
--wr-event-calendar-gutter: 3.75rem;
|
|
11
|
+
--wr-event-calendar-line: var(--wr-color-outline);
|
|
12
|
+
// The house fill for a header strip — `wr-table` and `wr-transfer` use the
|
|
13
|
+
// same one. NOT `--wr-color-light`, which is an intent colour: it composites
|
|
14
|
+
// dark enough that `--wr-color-on-surface-muted` on top of it lands at 3.6:1.
|
|
15
|
+
--wr-event-calendar-fill: rgba(var(--wr-color-outline-rgb), 0.25);
|
|
16
|
+
--wr-event-calendar-cols: 7;
|
|
17
|
+
|
|
18
|
+
display: flex;
|
|
19
|
+
flex-direction: column;
|
|
20
|
+
gap: 0.75rem;
|
|
21
|
+
color: var(--wr-color-on-surface);
|
|
22
|
+
|
|
23
|
+
&__header {
|
|
24
|
+
display: flex;
|
|
25
|
+
flex-wrap: wrap;
|
|
26
|
+
align-items: center;
|
|
27
|
+
gap: 0.5rem 0.75rem;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&__nav {
|
|
31
|
+
display: flex;
|
|
32
|
+
align-items: center;
|
|
33
|
+
gap: 0.25rem;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&__step .wr-icon__svg {
|
|
37
|
+
width: 1em;
|
|
38
|
+
height: 1em;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&__title {
|
|
42
|
+
flex: 1 1 auto;
|
|
43
|
+
margin: 0;
|
|
44
|
+
font-size: var(--wr-text-lg);
|
|
45
|
+
font-weight: var(--wr-font-weight-semibold);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
&__grid {
|
|
49
|
+
display: grid;
|
|
50
|
+
overflow: hidden;
|
|
51
|
+
border-radius: var(--wr-border-radius-base);
|
|
52
|
+
box-shadow: 0 0 0 1px var(--wr-event-calendar-line);
|
|
53
|
+
|
|
54
|
+
&--month {
|
|
55
|
+
grid-template-columns: repeat(7, minmax(0, 1fr));
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
&--time {
|
|
59
|
+
grid-template-columns: var(--wr-event-calendar-gutter) repeat(var(--wr-event-calendar-cols), minmax(0, 1fr));
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// The row box is dissolved so its cells land on the parent grid; the ARIA
|
|
64
|
+
// role survives — `display: contents` removes the box, not the semantics.
|
|
65
|
+
&__row {
|
|
66
|
+
display: contents;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
&__weekday,
|
|
70
|
+
&__colhead {
|
|
71
|
+
padding: 0.5rem 0.375rem;
|
|
72
|
+
font-size: var(--wr-text-xs);
|
|
73
|
+
font-weight: var(--wr-font-weight-medium);
|
|
74
|
+
color: var(--wr-color-on-surface-muted);
|
|
75
|
+
text-align: center;
|
|
76
|
+
background: var(--wr-event-calendar-fill);
|
|
77
|
+
box-shadow: inset 0 -1px 0 var(--wr-event-calendar-line);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
&__colhead {
|
|
81
|
+
display: flex;
|
|
82
|
+
flex-direction: column;
|
|
83
|
+
gap: 0.125rem;
|
|
84
|
+
|
|
85
|
+
&--today {
|
|
86
|
+
color: var(--wr-color-primary-ink);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
&-day {
|
|
90
|
+
font-size: var(--wr-text-base);
|
|
91
|
+
font-weight: var(--wr-font-weight-semibold);
|
|
92
|
+
color: var(--wr-color-on-surface);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
&__gutter {
|
|
97
|
+
padding: 0 0.5rem;
|
|
98
|
+
font-size: var(--wr-text-xs);
|
|
99
|
+
color: var(--wr-color-on-surface-muted);
|
|
100
|
+
text-align: end;
|
|
101
|
+
// Nudged up so the label reads as the line it labels, not the band below it.
|
|
102
|
+
transform: translateY(-0.5em);
|
|
103
|
+
box-shadow: inset -1px 0 0 var(--wr-event-calendar-line);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
&__cell {
|
|
107
|
+
// `relative` with NO z-index: that keeps the cell out of the stacking
|
|
108
|
+
// order, so a chip's `z-index: 1` lifts it over the cells that follow it in
|
|
109
|
+
// the DOM. Give the cell a z-index and it becomes a stacking context, and
|
|
110
|
+
// every chip is trapped inside its own cell again.
|
|
111
|
+
position: relative;
|
|
112
|
+
min-width: 0;
|
|
113
|
+
cursor: pointer;
|
|
114
|
+
box-shadow: inset -1px -1px 0 var(--wr-event-calendar-line);
|
|
115
|
+
|
|
116
|
+
&:focus-visible {
|
|
117
|
+
z-index: 2;
|
|
118
|
+
outline: 2px solid var(--wr-color-primary);
|
|
119
|
+
outline-offset: -2px;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
&--day {
|
|
123
|
+
min-height: 5.5rem;
|
|
124
|
+
padding: 0.25rem;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
&--muted {
|
|
128
|
+
background: var(--wr-event-calendar-fill);
|
|
129
|
+
|
|
130
|
+
.wr-event-calendar__daynum {
|
|
131
|
+
color: var(--wr-color-on-surface-muted);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
&--today .wr-event-calendar__daynum {
|
|
136
|
+
color: var(--wr-color-primary-contrast);
|
|
137
|
+
background: var(--wr-color-primary);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
&--allday {
|
|
141
|
+
min-height: calc(var(--wr-event-calendar-band-height) + 0.5rem);
|
|
142
|
+
padding: 0.125rem 0;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
&--slot {
|
|
146
|
+
height: var(--wr-event-calendar-slot-height);
|
|
147
|
+
box-shadow: inset -1px 0 0 var(--wr-event-calendar-line);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
&--major {
|
|
151
|
+
box-shadow:
|
|
152
|
+
inset -1px 0 0 var(--wr-event-calendar-line),
|
|
153
|
+
inset 0 1px 0 var(--wr-event-calendar-line);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
&__daynum {
|
|
158
|
+
display: inline-flex;
|
|
159
|
+
align-items: center;
|
|
160
|
+
justify-content: center;
|
|
161
|
+
min-width: 1.5rem;
|
|
162
|
+
height: 1.5rem;
|
|
163
|
+
font-size: var(--wr-text-sm);
|
|
164
|
+
border-radius: var(--wr-border-radius-pill);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
&__chip {
|
|
168
|
+
position: absolute;
|
|
169
|
+
z-index: 1;
|
|
170
|
+
display: flex;
|
|
171
|
+
gap: 0.25rem;
|
|
172
|
+
align-items: baseline;
|
|
173
|
+
overflow: hidden;
|
|
174
|
+
font: inherit;
|
|
175
|
+
font-size: var(--wr-text-xs);
|
|
176
|
+
line-height: 1.2;
|
|
177
|
+
color: var(--wr-color-on-surface);
|
|
178
|
+
text-align: start;
|
|
179
|
+
white-space: nowrap;
|
|
180
|
+
cursor: inherit;
|
|
181
|
+
background: color-mix(in srgb, var(--wr-event-calendar-color) 18%, transparent);
|
|
182
|
+
border: 0;
|
|
183
|
+
border-inline-start: 3px solid var(--wr-event-calendar-color);
|
|
184
|
+
border-radius: var(--wr-border-radius-sm);
|
|
185
|
+
transition: filter var(--wr-transition-short);
|
|
186
|
+
|
|
187
|
+
&:hover {
|
|
188
|
+
filter: brightness(0.96);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
&:focus-visible {
|
|
192
|
+
z-index: 3;
|
|
193
|
+
outline: 2px solid var(--wr-color-primary);
|
|
194
|
+
outline-offset: 1px;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
&--band {
|
|
198
|
+
inset-inline-start: 0.125rem;
|
|
199
|
+
top: calc(
|
|
200
|
+
var(--wr-event-calendar-offset) + var(--wr-event-calendar-lane) *
|
|
201
|
+
(var(--wr-event-calendar-band-height) + 0.125rem)
|
|
202
|
+
);
|
|
203
|
+
// Reaching across `--span` cells: each is exactly 100% of this one,
|
|
204
|
+
// because the grid has no gaps and the lines cost no layout space.
|
|
205
|
+
width: calc(var(--wr-event-calendar-span) * 100% - 0.25rem);
|
|
206
|
+
height: var(--wr-event-calendar-band-height);
|
|
207
|
+
padding: 0 0.375rem;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
&--time {
|
|
211
|
+
padding: 0.125rem 0.25rem;
|
|
212
|
+
flex-direction: column;
|
|
213
|
+
gap: 0;
|
|
214
|
+
align-items: stretch;
|
|
215
|
+
white-space: normal;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
// A segment clipped by the edge of the view loses the rounding on that side,
|
|
219
|
+
// so a week boundary reads as "continues" rather than "ends here".
|
|
220
|
+
&--continues-before {
|
|
221
|
+
border-inline-start-width: 0;
|
|
222
|
+
border-start-start-radius: 0;
|
|
223
|
+
border-end-start-radius: 0;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
&--continues-after {
|
|
227
|
+
border-start-end-radius: 0;
|
|
228
|
+
border-end-end-radius: 0;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
&--dragging {
|
|
232
|
+
// Off the hit-testing path: the drop target is read with
|
|
233
|
+
// `elementFromPoint`, which would otherwise only ever see the chip.
|
|
234
|
+
pointer-events: none;
|
|
235
|
+
opacity: 0.6;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
&-time {
|
|
239
|
+
font-weight: var(--wr-font-weight-medium);
|
|
240
|
+
color: var(--wr-color-on-surface-muted);
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
&-title {
|
|
244
|
+
overflow: hidden;
|
|
245
|
+
text-overflow: ellipsis;
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
&__resize {
|
|
250
|
+
position: absolute;
|
|
251
|
+
inset-inline: 0;
|
|
252
|
+
bottom: 0;
|
|
253
|
+
height: 0.375rem;
|
|
254
|
+
cursor: ns-resize;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
&__more {
|
|
258
|
+
position: absolute;
|
|
259
|
+
inset-inline-start: 0.125rem;
|
|
260
|
+
top: calc(1.75rem + var(--wr-event-calendar-lane) * (var(--wr-event-calendar-band-height) + 0.125rem));
|
|
261
|
+
padding: 0 0.375rem;
|
|
262
|
+
font: inherit;
|
|
263
|
+
font-size: var(--wr-text-xs);
|
|
264
|
+
color: var(--wr-color-on-surface-muted);
|
|
265
|
+
cursor: pointer;
|
|
266
|
+
background: none;
|
|
267
|
+
border: 0;
|
|
268
|
+
border-radius: var(--wr-border-radius-sm);
|
|
269
|
+
|
|
270
|
+
&:hover {
|
|
271
|
+
color: var(--wr-color-on-surface);
|
|
272
|
+
text-decoration: underline;
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
&--editable &__chip {
|
|
277
|
+
cursor: grab;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
&--dragging {
|
|
281
|
+
cursor: grabbing;
|
|
282
|
+
user-select: none;
|
|
283
|
+
}
|
|
284
|
+
}
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
// Pull the whole theme so a standalone `@use 'ngwr/<name>'` brings in every
|
|
2
|
+
// design token this stylesheet references. Sass deduplicates `@use` per
|
|
3
|
+
// compilation, so the umbrella sheet still emits the theme only once.
|
|
4
|
+
@use '../../theme/styles' as theme;
|
|
5
|
+
|
|
1
6
|
.wr-falling-text {
|
|
2
7
|
position: relative;
|
|
3
8
|
display: block;
|
package/fesm2022/ngwr-alert.mjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
3
|
import { input, output, signal, computed, ViewEncapsulation, Component } from '@angular/core';
|
|
4
|
+
import { useI18nText } from 'ngwr/i18n';
|
|
4
5
|
import { WrIcon } from 'ngwr/icon';
|
|
5
6
|
|
|
6
7
|
/**
|
|
@@ -21,6 +22,10 @@ import { WrIcon } from 'ngwr/icon';
|
|
|
21
22
|
* @see https://ngwr.dev/reference/components/alert
|
|
22
23
|
*/
|
|
23
24
|
class WrAlert {
|
|
25
|
+
/** Accessible name. Falls back to `alert.close`, then `'Close alert'`. */
|
|
26
|
+
closeLabel = input(null, /* @ts-ignore */
|
|
27
|
+
...(ngDevMode ? [{ debugName: "closeLabel" }] : /* istanbul ignore next */ []));
|
|
28
|
+
resolvedCloseLabel = useI18nText(this.closeLabel, 'alert.close', 'Close alert');
|
|
24
29
|
/**
|
|
25
30
|
* Optional headline shown at the top of the alert.
|
|
26
31
|
*
|
|
@@ -85,7 +90,7 @@ class WrAlert {
|
|
|
85
90
|
this.closed.emit();
|
|
86
91
|
}
|
|
87
92
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: WrAlert, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
88
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.0", type: WrAlert, isStandalone: true, selector: "wr-alert", inputs: { 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\" aria-label=\"
|
|
93
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.0", 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 });
|
|
89
94
|
}
|
|
90
95
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: WrAlert, decorators: [{
|
|
91
96
|
type: Component,
|
|
@@ -93,8 +98,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImpor
|
|
|
93
98
|
'[class]': 'classes()',
|
|
94
99
|
'[attr.role]': 'liveRole()',
|
|
95
100
|
'[attr.aria-live]': 'liveLevel()',
|
|
96
|
-
}, 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\" aria-label=\"
|
|
97
|
-
}], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], iconName: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconName", required: false }] }], message: [{ type: i0.Input, args: [{ isSignal: true, alias: "message", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], closeable: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeable", required: false }] }], closed: [{ type: i0.Output, args: ["closed"] }] } });
|
|
101
|
+
}, 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" }]
|
|
102
|
+
}], propDecorators: { closeLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeLabel", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], iconName: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconName", required: false }] }], message: [{ type: i0.Input, args: [{ isSignal: true, alias: "message", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], closeable: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeable", required: false }] }], closed: [{ type: i0.Output, args: ["closed"] }] } });
|
|
98
103
|
|
|
99
104
|
/**
|
|
100
105
|
* Generated bundle index. Do not edit.
|