@4sh/ui-kit 0.16.0 → 0.17.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.fr.md +10 -10
- package/README.md +10 -10
- package/fesm2022/4sh-ui-kit-actions-ui-button-split.mjs +542 -150
- package/fesm2022/4sh-ui-kit-actions-ui-button-split.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-actions-ui-button.mjs +622 -248
- package/fesm2022/4sh-ui-kit-actions-ui-button.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-actions-ui-link.mjs +385 -152
- package/fesm2022/4sh-ui-kit-actions-ui-link.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-actions-ui-speed-dial.mjs +748 -433
- package/fesm2022/4sh-ui-kit-actions-ui-speed-dial.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-base-ui-icon.mjs +227 -135
- package/fesm2022/4sh-ui-kit-base-ui-icon.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-base-ui-image.mjs +1200 -633
- package/fesm2022/4sh-ui-kit-base-ui-image.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-autocomplete.mjs +1675 -1000
- package/fesm2022/4sh-ui-kit-forms-ui-autocomplete.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-checkbox.mjs +243 -117
- package/fesm2022/4sh-ui-kit-forms-ui-checkbox.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-datepicker.mjs +2294 -2048
- package/fesm2022/4sh-ui-kit-forms-ui-datepicker.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-editor.mjs +1058 -1113
- package/fesm2022/4sh-ui-kit-forms-ui-editor.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-field-sign.mjs +1108 -0
- package/fesm2022/4sh-ui-kit-forms-ui-field-sign.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-forms-ui-field.mjs +397 -141
- package/fesm2022/4sh-ui-kit-forms-ui-field.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-file-upload.mjs +1529 -583
- package/fesm2022/4sh-ui-kit-forms-ui-file-upload.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-input-date.mjs +383 -224
- package/fesm2022/4sh-ui-kit-forms-ui-input-date.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-input-group.mjs +345 -177
- package/fesm2022/4sh-ui-kit-forms-ui-input-group.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-input-mask.mjs +280 -138
- package/fesm2022/4sh-ui-kit-forms-ui-input-mask.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-input-number.mjs +507 -257
- package/fesm2022/4sh-ui-kit-forms-ui-input-number.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-input-otp.mjs +401 -312
- package/fesm2022/4sh-ui-kit-forms-ui-input-otp.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-input-tags.mjs +1277 -697
- package/fesm2022/4sh-ui-kit-forms-ui-input-tags.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-input.mjs +467 -199
- package/fesm2022/4sh-ui-kit-forms-ui-input.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-knob.mjs +394 -270
- package/fesm2022/4sh-ui-kit-forms-ui-knob.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-label.mjs +140 -60
- package/fesm2022/4sh-ui-kit-forms-ui-label.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-nudger.mjs +386 -167
- package/fesm2022/4sh-ui-kit-forms-ui-nudger.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-radio.mjs +150 -87
- package/fesm2022/4sh-ui-kit-forms-ui-radio.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-rating.mjs +345 -180
- package/fesm2022/4sh-ui-kit-forms-ui-rating.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-segment-control.mjs +582 -392
- package/fesm2022/4sh-ui-kit-forms-ui-segment-control.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-select.mjs +1552 -888
- package/fesm2022/4sh-ui-kit-forms-ui-select.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-slider.mjs +485 -338
- package/fesm2022/4sh-ui-kit-forms-ui-slider.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-swatch-picker.mjs +503 -311
- package/fesm2022/4sh-ui-kit-forms-ui-swatch-picker.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-textarea.mjs +271 -137
- package/fesm2022/4sh-ui-kit-forms-ui-textarea.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-toggle-block.mjs +457 -214
- package/fesm2022/4sh-ui-kit-forms-ui-toggle-block.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-toggle-button.mjs +711 -371
- package/fesm2022/4sh-ui-kit-forms-ui-toggle-button.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-toggle.mjs +235 -121
- package/fesm2022/4sh-ui-kit-forms-ui-toggle.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms.mjs +721 -638
- package/fesm2022/4sh-ui-kit-forms.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-accordion.mjs +546 -242
- package/fesm2022/4sh-ui-kit-informative-ui-accordion.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-alert.mjs +335 -157
- package/fesm2022/4sh-ui-kit-informative-ui-alert.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-avatar-group.mjs +53 -33
- package/fesm2022/4sh-ui-kit-informative-ui-avatar-group.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-avatar.mjs +218 -121
- package/fesm2022/4sh-ui-kit-informative-ui-avatar.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-badge.mjs +192 -100
- package/fesm2022/4sh-ui-kit-informative-ui-badge.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-chip.mjs +456 -204
- package/fesm2022/4sh-ui-kit-informative-ui-chip.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-empty-state.mjs +314 -147
- package/fesm2022/4sh-ui-kit-informative-ui-empty-state.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-helper.mjs +179 -82
- package/fesm2022/4sh-ui-kit-informative-ui-helper.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-progress-bar.mjs +268 -123
- package/fesm2022/4sh-ui-kit-informative-ui-progress-bar.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-read-only.mjs +391 -146
- package/fesm2022/4sh-ui-kit-informative-ui-read-only.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-separator.mjs +158 -76
- package/fesm2022/4sh-ui-kit-informative-ui-separator.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-skeleton.mjs +159 -80
- package/fesm2022/4sh-ui-kit-informative-ui-skeleton.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-spinner.mjs +295 -131
- package/fesm2022/4sh-ui-kit-informative-ui-spinner.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-tag.mjs +211 -83
- package/fesm2022/4sh-ui-kit-informative-ui-tag.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-toast.mjs +784 -414
- package/fesm2022/4sh-ui-kit-informative-ui-toast.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-tooltip.mjs +822 -476
- package/fesm2022/4sh-ui-kit-informative-ui-tooltip.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-layout-ui-bottom-sheet.mjs +1014 -599
- package/fesm2022/4sh-ui-kit-layout-ui-bottom-sheet.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-layout-ui-card.mjs +403 -189
- package/fesm2022/4sh-ui-kit-layout-ui-card.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-layout-ui-drawer.mjs +707 -272
- package/fesm2022/4sh-ui-kit-layout-ui-drawer.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-layout-ui-modal.mjs +1146 -568
- package/fesm2022/4sh-ui-kit-layout-ui-modal.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-layout-ui-popover.mjs +519 -308
- package/fesm2022/4sh-ui-kit-layout-ui-popover.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-motion.mjs +252 -150
- package/fesm2022/4sh-ui-kit-motion.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-navigation-ui-bottom-tab-bar.mjs +793 -341
- package/fesm2022/4sh-ui-kit-navigation-ui-bottom-tab-bar.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-navigation-ui-breadcrumb.mjs +351 -194
- package/fesm2022/4sh-ui-kit-navigation-ui-breadcrumb.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-navigation-ui-context-menu.mjs +511 -220
- package/fesm2022/4sh-ui-kit-navigation-ui-context-menu.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-navigation-ui-menu.mjs +910 -548
- package/fesm2022/4sh-ui-kit-navigation-ui-menu.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-navigation-ui-sidebar.mjs +1128 -555
- package/fesm2022/4sh-ui-kit-navigation-ui-sidebar.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-navigation-ui-stepper.mjs +915 -470
- package/fesm2022/4sh-ui-kit-navigation-ui-stepper.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-navigation-ui-tabs.mjs +931 -474
- package/fesm2022/4sh-ui-kit-navigation-ui-tabs.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-overlay.mjs +26 -109
- package/fesm2022/4sh-ui-kit-overlay.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-ripple.mjs +329 -290
- package/fesm2022/4sh-ui-kit-ripple.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-table-ui-paginator.mjs +709 -248
- package/fesm2022/4sh-ui-kit-table-ui-paginator.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-table-ui-table.mjs +2633 -1370
- package/fesm2022/4sh-ui-kit-table-ui-table.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-theming.mjs +112 -113
- package/fesm2022/4sh-ui-kit-theming.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-types.mjs +0 -12
- package/fesm2022/4sh-ui-kit.mjs +3 -15
- package/fesm2022/4sh-ui-kit.mjs.map +1 -1
- package/mcp/data/component-api.json +299 -2
- package/mcp/data/text-search-docs.json +149 -9
- package/mcp/data/ui-config.json +378 -1
- package/mcp/index.js +8190 -2876
- package/mcp/package.json +1 -1
- package/package.json +5 -1
- package/styles/component-vars.scss +22 -1
- package/types/4sh-ui-kit-actions-ui-button-split.d.ts +198 -87
- package/types/4sh-ui-kit-actions-ui-button.d.ts +240 -116
- package/types/4sh-ui-kit-actions-ui-link.d.ts +136 -67
- package/types/4sh-ui-kit-actions-ui-speed-dial.d.ts +287 -180
- package/types/4sh-ui-kit-base-ui-icon.d.ts +92 -58
- package/types/4sh-ui-kit-base-ui-image.d.ts +406 -205
- package/types/4sh-ui-kit-forms-ui-autocomplete.d.ts +573 -376
- package/types/4sh-ui-kit-forms-ui-checkbox.d.ts +77 -42
- package/types/4sh-ui-kit-forms-ui-datepicker.d.ts +953 -700
- package/types/4sh-ui-kit-forms-ui-editor.d.ts +374 -340
- package/types/4sh-ui-kit-forms-ui-field-sign.d.ts +325 -0
- package/types/4sh-ui-kit-forms-ui-field.d.ts +150 -64
- package/types/4sh-ui-kit-forms-ui-file-upload.d.ts +583 -241
- package/types/4sh-ui-kit-forms-ui-input-date.d.ts +152 -103
- package/types/4sh-ui-kit-forms-ui-input-group.d.ts +109 -63
- package/types/4sh-ui-kit-forms-ui-input-mask.d.ts +93 -59
- package/types/4sh-ui-kit-forms-ui-input-number.d.ts +171 -96
- package/types/4sh-ui-kit-forms-ui-input-otp.d.ts +137 -104
- package/types/4sh-ui-kit-forms-ui-input-tags.d.ts +469 -309
- package/types/4sh-ui-kit-forms-ui-input.d.ts +198 -118
- package/types/4sh-ui-kit-forms-ui-knob.d.ts +132 -80
- package/types/4sh-ui-kit-forms-ui-label.d.ts +47 -22
- package/types/4sh-ui-kit-forms-ui-nudger.d.ts +134 -67
- package/types/4sh-ui-kit-forms-ui-radio.d.ts +48 -33
- package/types/4sh-ui-kit-forms-ui-rating.d.ts +120 -86
- package/types/4sh-ui-kit-forms-ui-segment-control.d.ts +221 -147
- package/types/4sh-ui-kit-forms-ui-select.d.ts +561 -357
- package/types/4sh-ui-kit-forms-ui-slider.d.ts +156 -105
- package/types/4sh-ui-kit-forms-ui-swatch-picker.d.ts +133 -97
- package/types/4sh-ui-kit-forms-ui-textarea.d.ts +90 -56
- package/types/4sh-ui-kit-forms-ui-toggle-block.d.ts +158 -94
- package/types/4sh-ui-kit-forms-ui-toggle-button.d.ts +314 -178
- package/types/4sh-ui-kit-forms-ui-toggle.d.ts +88 -54
- package/types/4sh-ui-kit-forms.d.ts +275 -194
- package/types/4sh-ui-kit-informative-ui-accordion.d.ts +162 -92
- package/types/4sh-ui-kit-informative-ui-alert.d.ts +128 -62
- package/types/4sh-ui-kit-informative-ui-avatar-group.d.ts +8 -8
- package/types/4sh-ui-kit-informative-ui-avatar.d.ts +81 -44
- package/types/4sh-ui-kit-informative-ui-badge.d.ts +71 -41
- package/types/4sh-ui-kit-informative-ui-chip.d.ts +194 -99
- package/types/4sh-ui-kit-informative-ui-empty-state.d.ts +105 -65
- package/types/4sh-ui-kit-informative-ui-helper.d.ts +64 -34
- package/types/4sh-ui-kit-informative-ui-progress-bar.d.ts +120 -65
- package/types/4sh-ui-kit-informative-ui-read-only.d.ts +147 -67
- package/types/4sh-ui-kit-informative-ui-separator.d.ts +65 -35
- package/types/4sh-ui-kit-informative-ui-skeleton.d.ts +62 -32
- package/types/4sh-ui-kit-informative-ui-spinner.d.ts +111 -50
- package/types/4sh-ui-kit-informative-ui-tag.d.ts +77 -37
- package/types/4sh-ui-kit-informative-ui-toast.d.ts +300 -180
- package/types/4sh-ui-kit-informative-ui-tooltip.d.ts +269 -141
- package/types/4sh-ui-kit-layout-ui-bottom-sheet.d.ts +360 -221
- package/types/4sh-ui-kit-layout-ui-card.d.ts +119 -79
- package/types/4sh-ui-kit-layout-ui-drawer.d.ts +244 -120
- package/types/4sh-ui-kit-layout-ui-modal.d.ts +409 -222
- package/types/4sh-ui-kit-layout-ui-popover.d.ts +149 -91
- package/types/4sh-ui-kit-motion.d.ts +117 -67
- package/types/4sh-ui-kit-navigation-ui-bottom-tab-bar.d.ts +279 -145
- package/types/4sh-ui-kit-navigation-ui-breadcrumb.d.ts +134 -96
- package/types/4sh-ui-kit-navigation-ui-context-menu.d.ts +148 -89
- package/types/4sh-ui-kit-navigation-ui-menu.d.ts +282 -201
- package/types/4sh-ui-kit-navigation-ui-sidebar.d.ts +425 -261
- package/types/4sh-ui-kit-navigation-ui-stepper.d.ts +279 -183
- package/types/4sh-ui-kit-navigation-ui-tabs.d.ts +275 -173
- package/types/4sh-ui-kit-overlay.d.ts +6 -6
- package/types/4sh-ui-kit-ripple.d.ts +99 -74
- package/types/4sh-ui-kit-table-ui-paginator.d.ts +237 -133
- package/types/4sh-ui-kit-table-ui-table.d.ts +769 -470
- package/types/4sh-ui-kit-theming.d.ts +27 -29
- package/types/4sh-ui-kit-types.d.ts +6 -5
- package/types/4sh-ui-kit.d.ts +4 -3
- package/fesm2022/4sh-ui-kit-types.mjs.map +0 -1
|
@@ -1,298 +1,337 @@
|
|
|
1
|
-
import { DOCUMENT, isPlatformBrowser } from
|
|
2
|
-
import * as i0 from
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
*/
|
|
11
|
-
const UI_RIPPLE_DEFAULT_SELECTOR = '[data-ripple="on"]';
|
|
12
|
-
/**
|
|
13
|
-
* Everything clickable, curated set included. Pass it to
|
|
14
|
-
* `provideUiRipple({ selector: UI_RIPPLE_INTERACTIVE_SELECTOR })` to ripple the
|
|
15
|
-
* application's own controls too, without listing them one by one.
|
|
16
|
-
*/
|
|
17
|
-
const UI_RIPPLE_INTERACTIVE_SELECTOR = 'button, [role="button"], a[href], [data-ripple="on"]';
|
|
18
|
-
const UI_RIPPLE_OPTIONS = new InjectionToken('UI_RIPPLE_OPTIONS');
|
|
19
|
-
const CLAIMED = Symbol.for('@4sh/ui-kit/ripple:claimed');
|
|
20
|
-
const LAYER_CLASS = 'ui-ripple-layer';
|
|
21
|
-
const INK_CLASS = 'ui-ripple-ink';
|
|
22
|
-
/** Waves alive at once on one host, so a fast clicker cannot pile up nodes. */
|
|
1
|
+
import { DOCUMENT, isPlatformBrowser } from "@angular/common";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import { DestroyRef, Directive, ElementRef, Injectable, InjectionToken, NgZone, PLATFORM_ID, booleanAttribute, inject, input, makeEnvironmentProviders, provideEnvironmentInitializer } from "@angular/core";
|
|
4
|
+
const UI_RIPPLE_DEFAULT_SELECTOR = "[data-ripple=\"on\"]";
|
|
5
|
+
const UI_RIPPLE_INTERACTIVE_SELECTOR = "button, [role=\"button\"], a[href], [data-ripple=\"on\"]";
|
|
6
|
+
const UI_RIPPLE_OPTIONS = new InjectionToken("UI_RIPPLE_OPTIONS");
|
|
7
|
+
const CLAIMED = Symbol.for("@4sh/ui-kit/ripple:claimed");
|
|
8
|
+
const LAYER_CLASS = "ui-ripple-layer";
|
|
9
|
+
const INK_CLASS = "ui-ripple-ink";
|
|
23
10
|
const MAX_INK = 4;
|
|
24
|
-
/** One press, one wave: the innermost binding claims it, every other root stands down. */
|
|
25
11
|
function isClaimed(event) {
|
|
26
|
-
|
|
12
|
+
return event[CLAIMED] === true;
|
|
27
13
|
}
|
|
28
14
|
function claim(event) {
|
|
29
|
-
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Engine behind `[uiRipple]`, `[uiRippleScope]` and `provideUiRipple()`.
|
|
33
|
-
*
|
|
34
|
-
* One `pointerdown` listener per binding (passive, registered outside Angular:
|
|
35
|
-
* a press never triggers change detection), one clipping layer per host created
|
|
36
|
-
* on first use, one `<span>` per wave removed on `animationend`. Nothing is
|
|
37
|
-
* measured until a press actually happens.
|
|
38
|
-
*
|
|
39
|
-
* Appearance is not its business: the layer and the ink read the inherited
|
|
40
|
-
* `--ui-ripple-*` custom properties (`styles/base/_ripple.scss`).
|
|
41
|
-
*/
|
|
42
|
-
class UiRippleEngine {
|
|
43
|
-
constructor() {
|
|
44
|
-
this.document = inject(DOCUMENT);
|
|
45
|
-
this.zone = inject(NgZone);
|
|
46
|
-
this.isBrowser = isPlatformBrowser(inject(PLATFORM_ID));
|
|
47
|
-
this.options = inject(UI_RIPPLE_OPTIONS, { optional: true }) ?? {};
|
|
48
|
-
this.layers = new WeakMap();
|
|
49
|
-
/** Settings a binding starts from. */
|
|
50
|
-
this.defaults = {
|
|
51
|
-
enabled: true,
|
|
52
|
-
centered: false,
|
|
53
|
-
selector: this.options.selector ?? UI_RIPPLE_DEFAULT_SELECTOR,
|
|
54
|
-
};
|
|
55
|
-
inject(DestroyRef).onDestroy(() => this.uninstallGlobal?.());
|
|
56
|
-
}
|
|
57
|
-
/** Ripples the whole document. Called by `provideUiRipple()`. */
|
|
58
|
-
installGlobal() {
|
|
59
|
-
if (this.options.global === false || this.uninstallGlobal)
|
|
60
|
-
return;
|
|
61
|
-
this.uninstallGlobal = this.delegate(this.document.body, () => this.defaults);
|
|
62
|
-
}
|
|
63
|
-
/** The host itself ripples. Returns the teardown. */
|
|
64
|
-
bind(host, settings) {
|
|
65
|
-
const stop = this.listen(host, (event) => {
|
|
66
|
-
// Claimed even when off: an explicit directive always wins over an outer root.
|
|
67
|
-
claim(event);
|
|
68
|
-
const { enabled, centered } = settings();
|
|
69
|
-
if (enabled)
|
|
70
|
-
this.launch(host, event, centered);
|
|
71
|
-
});
|
|
72
|
-
return () => {
|
|
73
|
-
stop();
|
|
74
|
-
this.layers.get(host)?.remove();
|
|
75
|
-
this.layers.delete(host);
|
|
76
|
-
};
|
|
77
|
-
}
|
|
78
|
-
/** Descendants matching the selector ripple. Returns the teardown. */
|
|
79
|
-
delegate(root, settings) {
|
|
80
|
-
return this.listen(root, (event) => {
|
|
81
|
-
const { enabled, centered, selector } = settings();
|
|
82
|
-
if (!enabled)
|
|
83
|
-
return;
|
|
84
|
-
const target = event.target?.closest(selector);
|
|
85
|
-
// `closest` can climb past the root: that match belongs to an outer binding.
|
|
86
|
-
if (!(target instanceof HTMLElement) || !root.contains(target))
|
|
87
|
-
return;
|
|
88
|
-
claim(event);
|
|
89
|
-
this.launch(target, event, centered);
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
/**
|
|
93
|
-
* Spawns one wave on `host`, from the pointer position or from its centre.
|
|
94
|
-
* Public so an application can ripple from its own trigger (a keyboard
|
|
95
|
-
* shortcut, a remote event) without a press.
|
|
96
|
-
*/
|
|
97
|
-
launch(host, event, centered = false) {
|
|
98
|
-
if (!this.isBrowser || this.stilled() || this.inert(host))
|
|
99
|
-
return;
|
|
100
|
-
const rect = host.getBoundingClientRect();
|
|
101
|
-
if (!rect.width || !rect.height)
|
|
102
|
-
return;
|
|
103
|
-
const x = event && !centered ? event.clientX - rect.left : rect.width / 2;
|
|
104
|
-
const y = event && !centered ? event.clientY - rect.top : rect.height / 2;
|
|
105
|
-
// Farthest corner, so the wave always covers the whole element.
|
|
106
|
-
const radius = Math.hypot(Math.max(x, rect.width - x), Math.max(y, rect.height - y));
|
|
107
|
-
const layer = this.layerFor(host);
|
|
108
|
-
while (layer.childElementCount >= MAX_INK && layer.firstElementChild) {
|
|
109
|
-
layer.firstElementChild.remove();
|
|
110
|
-
}
|
|
111
|
-
const ink = this.document.createElement('span');
|
|
112
|
-
ink.className = INK_CLASS;
|
|
113
|
-
ink.style.cssText = `left:${x - radius}px;top:${y - radius}px;width:${radius * 2}px;height:${radius * 2}px`;
|
|
114
|
-
ink.addEventListener('animationend', () => ink.remove(), { once: true });
|
|
115
|
-
layer.appendChild(ink);
|
|
116
|
-
}
|
|
117
|
-
listen(node, handle) {
|
|
118
|
-
if (!this.isBrowser)
|
|
119
|
-
return () => undefined;
|
|
120
|
-
const onPointerDown = (event) => {
|
|
121
|
-
if (event.button > 0 || !event.isPrimary || isClaimed(event))
|
|
122
|
-
return;
|
|
123
|
-
handle(event);
|
|
124
|
-
};
|
|
125
|
-
this.zone.runOutsideAngular(() => node.addEventListener('pointerdown', onPointerDown, { passive: true }));
|
|
126
|
-
return () => node.removeEventListener('pointerdown', onPointerDown);
|
|
127
|
-
}
|
|
128
|
-
/** Clipping layer of a host, created on first press. */
|
|
129
|
-
layerFor(host) {
|
|
130
|
-
const cached = this.layers.get(host);
|
|
131
|
-
if (cached?.parentElement === host)
|
|
132
|
-
return cached;
|
|
133
|
-
// Une autre instance du moteur a pu équiper cet hôte avant nous : sa couche
|
|
134
|
-
// vaut la nôtre, et en créer une seconde les empilerait sur l'élément.
|
|
135
|
-
const existing = host.querySelector(`:scope > .${LAYER_CLASS}`);
|
|
136
|
-
if (existing) {
|
|
137
|
-
this.layers.set(host, existing);
|
|
138
|
-
return existing;
|
|
139
|
-
}
|
|
140
|
-
// The layer anchors on the host, which must therefore establish the
|
|
141
|
-
// containing block. A host already positioned is left untouched.
|
|
142
|
-
if (this.document.defaultView?.getComputedStyle(host).position === 'static') {
|
|
143
|
-
host.style.position = 'relative';
|
|
144
|
-
}
|
|
145
|
-
const layer = this.document.createElement('span');
|
|
146
|
-
layer.className = LAYER_CLASS;
|
|
147
|
-
layer.setAttribute('aria-hidden', 'true');
|
|
148
|
-
host.appendChild(layer);
|
|
149
|
-
this.layers.set(host, layer);
|
|
150
|
-
return layer;
|
|
151
|
-
}
|
|
152
|
-
/** Disabled host, or a subtree opted out with `data-ripple="off"`. */
|
|
153
|
-
inert(host) {
|
|
154
|
-
return (host.disabled === true ||
|
|
155
|
-
host.getAttribute('aria-disabled') === 'true' ||
|
|
156
|
-
host.closest('[data-ripple="off"]') !== null);
|
|
157
|
-
}
|
|
158
|
-
/** Reduced-motion preference, or the kit-wide `data-motion="off"` switch. */
|
|
159
|
-
stilled() {
|
|
160
|
-
// Optional call: a non-browser DOM (jsdom) has no `matchMedia`.
|
|
161
|
-
this.reducedMotion ??= this.document.defaultView?.matchMedia?.('(prefers-reduced-motion: reduce)');
|
|
162
|
-
return (this.reducedMotion?.matches === true ||
|
|
163
|
-
this.document.documentElement.dataset['motion'] === 'off');
|
|
164
|
-
}
|
|
165
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: UiRippleEngine, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
166
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: UiRippleEngine, providedIn: 'root' }); }
|
|
15
|
+
event[CLAIMED] = true;
|
|
167
16
|
}
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
17
|
+
var UiRippleEngine = class UiRippleEngine {
|
|
18
|
+
constructor() {
|
|
19
|
+
this.document = inject(DOCUMENT);
|
|
20
|
+
this.zone = inject(NgZone);
|
|
21
|
+
this.isBrowser = isPlatformBrowser(inject(PLATFORM_ID));
|
|
22
|
+
this.options = inject(UI_RIPPLE_OPTIONS, { optional: true }) ?? {};
|
|
23
|
+
this.layers = /* @__PURE__ */ new WeakMap();
|
|
24
|
+
this.defaults = {
|
|
25
|
+
enabled: true,
|
|
26
|
+
centered: false,
|
|
27
|
+
selector: this.options.selector ?? "[data-ripple=\"on\"]"
|
|
28
|
+
};
|
|
29
|
+
inject(DestroyRef).onDestroy(() => this.uninstallGlobal?.());
|
|
30
|
+
}
|
|
31
|
+
installGlobal() {
|
|
32
|
+
if (this.options.global === false || this.uninstallGlobal) return;
|
|
33
|
+
this.uninstallGlobal = this.delegate(this.document.body, () => this.defaults);
|
|
34
|
+
}
|
|
35
|
+
bind(host, settings) {
|
|
36
|
+
const stop = this.listen(host, (event) => {
|
|
37
|
+
claim(event);
|
|
38
|
+
const { enabled, centered } = settings();
|
|
39
|
+
if (enabled) this.launch(host, event, centered);
|
|
40
|
+
});
|
|
41
|
+
return () => {
|
|
42
|
+
stop();
|
|
43
|
+
this.layers.get(host)?.remove();
|
|
44
|
+
this.layers.delete(host);
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
delegate(root, settings) {
|
|
48
|
+
return this.listen(root, (event) => {
|
|
49
|
+
const { enabled, centered, selector } = settings();
|
|
50
|
+
if (!enabled) return;
|
|
51
|
+
const target = event.target?.closest(selector);
|
|
52
|
+
if (!(target instanceof HTMLElement) || !root.contains(target)) return;
|
|
53
|
+
claim(event);
|
|
54
|
+
this.launch(target, event, centered);
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
launch(host, event, centered = false) {
|
|
58
|
+
if (!this.isBrowser || this.stilled() || this.inert(host)) return;
|
|
59
|
+
const rect = host.getBoundingClientRect();
|
|
60
|
+
if (!rect.width || !rect.height) return;
|
|
61
|
+
const x = event && !centered ? event.clientX - rect.left : rect.width / 2;
|
|
62
|
+
const y = event && !centered ? event.clientY - rect.top : rect.height / 2;
|
|
63
|
+
const radius = Math.hypot(Math.max(x, rect.width - x), Math.max(y, rect.height - y));
|
|
64
|
+
const layer = this.layerFor(host);
|
|
65
|
+
while (layer.childElementCount >= MAX_INK && layer.firstElementChild) layer.firstElementChild.remove();
|
|
66
|
+
const ink = this.document.createElement("span");
|
|
67
|
+
ink.className = INK_CLASS;
|
|
68
|
+
ink.style.cssText = `left:${x - radius}px;top:${y - radius}px;width:${radius * 2}px;height:${radius * 2}px`;
|
|
69
|
+
ink.addEventListener("animationend", () => ink.remove(), { once: true });
|
|
70
|
+
layer.appendChild(ink);
|
|
71
|
+
}
|
|
72
|
+
listen(node, handle) {
|
|
73
|
+
if (!this.isBrowser) return () => void 0;
|
|
74
|
+
const onPointerDown = (event) => {
|
|
75
|
+
if (event.button > 0 || !event.isPrimary || isClaimed(event)) return;
|
|
76
|
+
handle(event);
|
|
77
|
+
};
|
|
78
|
+
this.zone.runOutsideAngular(() => node.addEventListener("pointerdown", onPointerDown, { passive: true }));
|
|
79
|
+
return () => node.removeEventListener("pointerdown", onPointerDown);
|
|
80
|
+
}
|
|
81
|
+
layerFor(host) {
|
|
82
|
+
const cached = this.layers.get(host);
|
|
83
|
+
if (cached?.parentElement === host) return cached;
|
|
84
|
+
const existing = host.querySelector(`:scope > .${LAYER_CLASS}`);
|
|
85
|
+
if (existing) {
|
|
86
|
+
this.layers.set(host, existing);
|
|
87
|
+
return existing;
|
|
88
|
+
}
|
|
89
|
+
if (this.document.defaultView?.getComputedStyle(host).position === "static") host.style.position = "relative";
|
|
90
|
+
const layer = this.document.createElement("span");
|
|
91
|
+
layer.className = LAYER_CLASS;
|
|
92
|
+
layer.setAttribute("aria-hidden", "true");
|
|
93
|
+
host.appendChild(layer);
|
|
94
|
+
this.layers.set(host, layer);
|
|
95
|
+
return layer;
|
|
96
|
+
}
|
|
97
|
+
inert(host) {
|
|
98
|
+
return host.disabled === true || host.getAttribute("aria-disabled") === "true" || host.closest("[data-ripple=\"off\"]") !== null;
|
|
99
|
+
}
|
|
100
|
+
stilled() {
|
|
101
|
+
this.reducedMotion ??= this.document.defaultView?.matchMedia?.("(prefers-reduced-motion: reduce)");
|
|
102
|
+
return this.reducedMotion?.matches === true || this.document.documentElement.dataset["motion"] === "off";
|
|
103
|
+
}
|
|
104
|
+
static {
|
|
105
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
106
|
+
minVersion: "12.0.0",
|
|
107
|
+
version: "22.3.0",
|
|
108
|
+
ngImport: i0,
|
|
109
|
+
type: UiRippleEngine,
|
|
110
|
+
deps: [],
|
|
111
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
static {
|
|
115
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
116
|
+
minVersion: "12.0.0",
|
|
117
|
+
version: "22.3.0",
|
|
118
|
+
ngImport: i0,
|
|
119
|
+
type: UiRippleEngine,
|
|
120
|
+
providedIn: "root"
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
};
|
|
124
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
125
|
+
minVersion: "12.0.0",
|
|
126
|
+
version: "22.3.0",
|
|
127
|
+
ngImport: i0,
|
|
128
|
+
type: UiRippleEngine,
|
|
129
|
+
decorators: [{
|
|
130
|
+
type: Injectable,
|
|
131
|
+
args: [{ providedIn: "root" }]
|
|
132
|
+
}],
|
|
133
|
+
ctorParameters: () => []
|
|
134
|
+
});
|
|
193
135
|
function provideUiRipple(options = {}) {
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
}
|
|
199
|
-
/**
|
|
200
|
-
* uiRipple, targeted: THIS element answers a press with a wave starting at the
|
|
201
|
-
* pointer.
|
|
202
|
-
*
|
|
203
|
-
* ```html
|
|
204
|
-
* <button uiRipple>Valider</button>
|
|
205
|
-
* <div class="tile" uiRipple rippleCentered>…</div>
|
|
206
|
-
* <button uiRipple [uiRipple]="false">jamais d'onde, ici ni au-dessous</button>
|
|
207
|
-
* ```
|
|
208
|
-
*
|
|
209
|
-
* The wave is clipped by the element's own box and follows its `border-radius`.
|
|
210
|
-
* Retune it with the inherited `--ui-ripple-*` custom properties, on the element
|
|
211
|
-
* or on any ancestor. Put the directive on a native control rather than on a kit
|
|
212
|
-
* component: `<ui-button uiRipple>` would ripple the custom element's square box,
|
|
213
|
-
* where `<ui-button uiRippleScope>` reaches its inner `<button>`.
|
|
214
|
-
*/
|
|
215
|
-
class UiRipple {
|
|
216
|
-
constructor() {
|
|
217
|
-
/** Wave on this element. `false` opts it and its subtree out, global effect included. */
|
|
218
|
-
this.enabled = input(true, { ...(ngDevMode ? { debugName: "enabled" } : /* istanbul ignore next */ {}), alias: 'uiRipple', transform: booleanAttribute });
|
|
219
|
-
/** Start at the centre rather than at the pointer (icon-only controls). */
|
|
220
|
-
this.rippleCentered = input(false, { ...(ngDevMode ? { debugName: "rippleCentered" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
221
|
-
const host = inject(ElementRef).nativeElement;
|
|
222
|
-
const engine = inject(UiRippleEngine);
|
|
223
|
-
inject(DestroyRef).onDestroy(engine.bind(host, () => ({
|
|
224
|
-
...engine.defaults,
|
|
225
|
-
enabled: this.enabled(),
|
|
226
|
-
centered: this.rippleCentered(),
|
|
227
|
-
})));
|
|
228
|
-
}
|
|
229
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: UiRipple, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
230
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.7", type: UiRipple, isStandalone: true, selector: "[uiRipple]", inputs: { enabled: { classPropertyName: "enabled", publicName: "uiRipple", isSignal: true, isRequired: false, transformFunction: null }, rippleCentered: { classPropertyName: "rippleCentered", publicName: "rippleCentered", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.data-ripple": "enabled() ? null : \"off\"" } }, ngImport: i0 }); }
|
|
231
|
-
}
|
|
232
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: UiRipple, decorators: [{
|
|
233
|
-
type: Directive,
|
|
234
|
-
args: [{
|
|
235
|
-
selector: '[uiRipple]',
|
|
236
|
-
host: { '[attr.data-ripple]': 'enabled() ? null : "off"' },
|
|
237
|
-
}]
|
|
238
|
-
}], ctorParameters: () => [], propDecorators: { enabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "uiRipple", required: false }] }], rippleCentered: [{ type: i0.Input, args: [{ isSignal: true, alias: "rippleCentered", required: false }] }] } });
|
|
239
|
-
/**
|
|
240
|
-
* uiRippleScope, local: everything interactive INSIDE this element ripples, with
|
|
241
|
-
* a single listener on the container rather than one directive per control.
|
|
242
|
-
*
|
|
243
|
-
* ```html
|
|
244
|
-
* <div class="toolbar" uiRippleScope>
|
|
245
|
-
* <ui-button label="Enregistrer" />
|
|
246
|
-
* <button>Annuler</button>
|
|
247
|
-
* </div>
|
|
248
|
-
*
|
|
249
|
-
* <nav uiRippleScope rippleSelector="a, button">…</nav>
|
|
250
|
-
* <section [uiRippleScope]="false">…</section>
|
|
251
|
-
* ```
|
|
252
|
-
*
|
|
253
|
-
* Also the way to ripple a single kit component: `<ui-button uiRippleScope />`
|
|
254
|
-
* reaches the native `<button>` it renders, so the wave follows its radius.
|
|
255
|
-
* Nested scopes and `[uiRipple]` do not stack: the innermost declaration wins.
|
|
256
|
-
*/
|
|
257
|
-
class UiRippleScope {
|
|
258
|
-
constructor() {
|
|
259
|
-
/** Ripple inside this element. `false` opts the whole subtree out. */
|
|
260
|
-
this.enabled = input(true, { ...(ngDevMode ? { debugName: "enabled" } : /* istanbul ignore next */ {}), alias: 'uiRippleScope', transform: booleanAttribute });
|
|
261
|
-
/** Start at the centre rather than at the pointer. */
|
|
262
|
-
this.rippleCentered = input(false, { ...(ngDevMode ? { debugName: "rippleCentered" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
263
|
-
/** What ripples inside. Defaults to the kit-wide selector. */
|
|
264
|
-
this.rippleSelector = input(/* @ts-ignore */
|
|
265
|
-
...(ngDevMode ? [undefined, { debugName: "rippleSelector" }] : /* istanbul ignore next */ []));
|
|
266
|
-
const root = inject(ElementRef).nativeElement;
|
|
267
|
-
const engine = inject(UiRippleEngine);
|
|
268
|
-
inject(DestroyRef).onDestroy(engine.delegate(root, () => ({
|
|
269
|
-
enabled: this.enabled(),
|
|
270
|
-
centered: this.rippleCentered(),
|
|
271
|
-
selector: this.rippleSelector() || engine.defaults.selector,
|
|
272
|
-
})));
|
|
273
|
-
}
|
|
274
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: UiRippleScope, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
275
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.7", type: UiRippleScope, isStandalone: true, selector: "[uiRippleScope]", inputs: { enabled: { classPropertyName: "enabled", publicName: "uiRippleScope", isSignal: true, isRequired: false, transformFunction: null }, rippleCentered: { classPropertyName: "rippleCentered", publicName: "rippleCentered", isSignal: true, isRequired: false, transformFunction: null }, rippleSelector: { classPropertyName: "rippleSelector", publicName: "rippleSelector", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.data-ripple": "enabled() ? null : \"off\"" } }, ngImport: i0 }); }
|
|
136
|
+
return makeEnvironmentProviders([{
|
|
137
|
+
provide: UI_RIPPLE_OPTIONS,
|
|
138
|
+
useValue: options
|
|
139
|
+
}, provideEnvironmentInitializer(() => inject(UiRippleEngine).installGlobal())]);
|
|
276
140
|
}
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
/*
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
141
|
+
var UiRipple = class UiRipple {
|
|
142
|
+
constructor() {
|
|
143
|
+
this.enabled = input(true, {
|
|
144
|
+
...ngDevMode ? { debugName: "enabled" } : /* istanbul ignore next */ {},
|
|
145
|
+
alias: "uiRipple",
|
|
146
|
+
transform: booleanAttribute
|
|
147
|
+
});
|
|
148
|
+
this.rippleCentered = input(false, {
|
|
149
|
+
...ngDevMode ? { debugName: "rippleCentered" } : /* istanbul ignore next */ {},
|
|
150
|
+
transform: booleanAttribute
|
|
151
|
+
});
|
|
152
|
+
const host = inject(ElementRef).nativeElement;
|
|
153
|
+
const engine = inject(UiRippleEngine);
|
|
154
|
+
inject(DestroyRef).onDestroy(engine.bind(host, () => ({
|
|
155
|
+
...engine.defaults,
|
|
156
|
+
enabled: this.enabled(),
|
|
157
|
+
centered: this.rippleCentered()
|
|
158
|
+
})));
|
|
159
|
+
}
|
|
160
|
+
static {
|
|
161
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
162
|
+
minVersion: "12.0.0",
|
|
163
|
+
version: "22.3.0",
|
|
164
|
+
ngImport: i0,
|
|
165
|
+
type: UiRipple,
|
|
166
|
+
deps: [],
|
|
167
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
static {
|
|
171
|
+
this.ɵdir = i0.ɵɵngDeclareDirective({
|
|
172
|
+
minVersion: "17.1.0",
|
|
173
|
+
version: "22.3.0",
|
|
174
|
+
type: UiRipple,
|
|
175
|
+
isStandalone: true,
|
|
176
|
+
selector: "[uiRipple]",
|
|
177
|
+
inputs: {
|
|
178
|
+
enabled: {
|
|
179
|
+
classPropertyName: "enabled",
|
|
180
|
+
publicName: "uiRipple",
|
|
181
|
+
isSignal: true,
|
|
182
|
+
isRequired: false,
|
|
183
|
+
transformFunction: null
|
|
184
|
+
},
|
|
185
|
+
rippleCentered: {
|
|
186
|
+
classPropertyName: "rippleCentered",
|
|
187
|
+
publicName: "rippleCentered",
|
|
188
|
+
isSignal: true,
|
|
189
|
+
isRequired: false,
|
|
190
|
+
transformFunction: null
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
host: { properties: { "attr.data-ripple": "enabled() ? null : \"off\"" } },
|
|
194
|
+
ngImport: i0
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
};
|
|
198
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
199
|
+
minVersion: "12.0.0",
|
|
200
|
+
version: "22.3.0",
|
|
201
|
+
ngImport: i0,
|
|
202
|
+
type: UiRipple,
|
|
203
|
+
decorators: [{
|
|
204
|
+
type: Directive,
|
|
205
|
+
args: [{
|
|
206
|
+
selector: "[uiRipple]",
|
|
207
|
+
host: { "[attr.data-ripple]": "enabled() ? null : \"off\"" }
|
|
208
|
+
}]
|
|
209
|
+
}],
|
|
210
|
+
ctorParameters: () => [],
|
|
211
|
+
propDecorators: {
|
|
212
|
+
enabled: [{
|
|
213
|
+
type: i0.Input,
|
|
214
|
+
args: [{
|
|
215
|
+
isSignal: true,
|
|
216
|
+
alias: "uiRipple",
|
|
217
|
+
required: false
|
|
218
|
+
}]
|
|
219
|
+
}],
|
|
220
|
+
rippleCentered: [{
|
|
221
|
+
type: i0.Input,
|
|
222
|
+
args: [{
|
|
223
|
+
isSignal: true,
|
|
224
|
+
alias: "rippleCentered",
|
|
225
|
+
required: false
|
|
226
|
+
}]
|
|
227
|
+
}]
|
|
228
|
+
}
|
|
229
|
+
});
|
|
230
|
+
var UiRippleScope = class UiRippleScope {
|
|
231
|
+
constructor() {
|
|
232
|
+
this.enabled = input(true, {
|
|
233
|
+
...ngDevMode ? { debugName: "enabled" } : /* istanbul ignore next */ {},
|
|
234
|
+
alias: "uiRippleScope",
|
|
235
|
+
transform: booleanAttribute
|
|
236
|
+
});
|
|
237
|
+
this.rippleCentered = input(false, {
|
|
238
|
+
...ngDevMode ? { debugName: "rippleCentered" } : /* istanbul ignore next */ {},
|
|
239
|
+
transform: booleanAttribute
|
|
240
|
+
});
|
|
241
|
+
this.rippleSelector = input(...ngDevMode ? [void 0, { debugName: "rippleSelector" }] : /* istanbul ignore next */ []);
|
|
242
|
+
const root = inject(ElementRef).nativeElement;
|
|
243
|
+
const engine = inject(UiRippleEngine);
|
|
244
|
+
inject(DestroyRef).onDestroy(engine.delegate(root, () => ({
|
|
245
|
+
enabled: this.enabled(),
|
|
246
|
+
centered: this.rippleCentered(),
|
|
247
|
+
selector: this.rippleSelector() || engine.defaults.selector
|
|
248
|
+
})));
|
|
249
|
+
}
|
|
250
|
+
static {
|
|
251
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
252
|
+
minVersion: "12.0.0",
|
|
253
|
+
version: "22.3.0",
|
|
254
|
+
ngImport: i0,
|
|
255
|
+
type: UiRippleScope,
|
|
256
|
+
deps: [],
|
|
257
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
258
|
+
});
|
|
259
|
+
}
|
|
260
|
+
static {
|
|
261
|
+
this.ɵdir = i0.ɵɵngDeclareDirective({
|
|
262
|
+
minVersion: "17.1.0",
|
|
263
|
+
version: "22.3.0",
|
|
264
|
+
type: UiRippleScope,
|
|
265
|
+
isStandalone: true,
|
|
266
|
+
selector: "[uiRippleScope]",
|
|
267
|
+
inputs: {
|
|
268
|
+
enabled: {
|
|
269
|
+
classPropertyName: "enabled",
|
|
270
|
+
publicName: "uiRippleScope",
|
|
271
|
+
isSignal: true,
|
|
272
|
+
isRequired: false,
|
|
273
|
+
transformFunction: null
|
|
274
|
+
},
|
|
275
|
+
rippleCentered: {
|
|
276
|
+
classPropertyName: "rippleCentered",
|
|
277
|
+
publicName: "rippleCentered",
|
|
278
|
+
isSignal: true,
|
|
279
|
+
isRequired: false,
|
|
280
|
+
transformFunction: null
|
|
281
|
+
},
|
|
282
|
+
rippleSelector: {
|
|
283
|
+
classPropertyName: "rippleSelector",
|
|
284
|
+
publicName: "rippleSelector",
|
|
285
|
+
isSignal: true,
|
|
286
|
+
isRequired: false,
|
|
287
|
+
transformFunction: null
|
|
288
|
+
}
|
|
289
|
+
},
|
|
290
|
+
host: { properties: { "attr.data-ripple": "enabled() ? null : \"off\"" } },
|
|
291
|
+
ngImport: i0
|
|
292
|
+
});
|
|
293
|
+
}
|
|
294
|
+
};
|
|
295
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
296
|
+
minVersion: "12.0.0",
|
|
297
|
+
version: "22.3.0",
|
|
298
|
+
ngImport: i0,
|
|
299
|
+
type: UiRippleScope,
|
|
300
|
+
decorators: [{
|
|
301
|
+
type: Directive,
|
|
302
|
+
args: [{
|
|
303
|
+
selector: "[uiRippleScope]",
|
|
304
|
+
host: { "[attr.data-ripple]": "enabled() ? null : \"off\"" }
|
|
305
|
+
}]
|
|
306
|
+
}],
|
|
307
|
+
ctorParameters: () => [],
|
|
308
|
+
propDecorators: {
|
|
309
|
+
enabled: [{
|
|
310
|
+
type: i0.Input,
|
|
311
|
+
args: [{
|
|
312
|
+
isSignal: true,
|
|
313
|
+
alias: "uiRippleScope",
|
|
314
|
+
required: false
|
|
315
|
+
}]
|
|
316
|
+
}],
|
|
317
|
+
rippleCentered: [{
|
|
318
|
+
type: i0.Input,
|
|
319
|
+
args: [{
|
|
320
|
+
isSignal: true,
|
|
321
|
+
alias: "rippleCentered",
|
|
322
|
+
required: false
|
|
323
|
+
}]
|
|
324
|
+
}],
|
|
325
|
+
rippleSelector: [{
|
|
326
|
+
type: i0.Input,
|
|
327
|
+
args: [{
|
|
328
|
+
isSignal: true,
|
|
329
|
+
alias: "rippleSelector",
|
|
330
|
+
required: false
|
|
331
|
+
}]
|
|
332
|
+
}]
|
|
333
|
+
}
|
|
334
|
+
});
|
|
297
335
|
export { UI_RIPPLE_DEFAULT_SELECTOR, UI_RIPPLE_INTERACTIVE_SELECTOR, UI_RIPPLE_OPTIONS, UiRipple, UiRippleEngine, UiRippleScope, provideUiRipple };
|
|
298
|
-
|
|
336
|
+
|
|
337
|
+
//# sourceMappingURL=4sh-ui-kit-ripple.mjs.map
|