@radix-ng/primitives 0.28.0 → 0.30.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/checkbox/src/checkbox.directive.d.ts +11 -0
- package/core/index.d.ts +2 -0
- package/core/src/isNumber.d.ts +1 -0
- package/core/src/nullish.d.ts +1 -0
- package/dialog/src/dialog.config.d.ts +1 -0
- package/fesm2022/radix-ng-primitives-accordion.mjs +20 -20
- package/fesm2022/radix-ng-primitives-alert-dialog.mjs +22 -22
- package/fesm2022/radix-ng-primitives-aspect-ratio.mjs +3 -3
- package/fesm2022/radix-ng-primitives-avatar.mjs +16 -16
- package/fesm2022/radix-ng-primitives-checkbox.mjs +28 -17
- package/fesm2022/radix-ng-primitives-checkbox.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-collapsible.mjs +10 -10
- package/fesm2022/radix-ng-primitives-context-menu.mjs +36 -36
- package/fesm2022/radix-ng-primitives-core.mjs +14 -8
- package/fesm2022/radix-ng-primitives-core.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-dialog.mjs +40 -38
- package/fesm2022/radix-ng-primitives-dialog.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-dropdown-menu.mjs +35 -35
- package/fesm2022/radix-ng-primitives-hover-card.mjs +30 -33
- package/fesm2022/radix-ng-primitives-hover-card.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-label.mjs +3 -3
- package/fesm2022/radix-ng-primitives-menu.mjs +429 -62
- package/fesm2022/radix-ng-primitives-menu.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-menubar.mjs +87 -139
- package/fesm2022/radix-ng-primitives-menubar.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-popover.mjs +30 -33
- package/fesm2022/radix-ng-primitives-popover.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-progress.mjs +68 -90
- package/fesm2022/radix-ng-primitives-progress.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-radio.mjs +13 -13
- package/fesm2022/radix-ng-primitives-roving-focus.mjs +7 -7
- package/fesm2022/radix-ng-primitives-select.mjs +36 -36
- package/fesm2022/radix-ng-primitives-separator.mjs +4 -4
- package/fesm2022/radix-ng-primitives-separator.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-slider.mjs +131 -102
- package/fesm2022/radix-ng-primitives-slider.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-switch.mjs +13 -13
- package/fesm2022/radix-ng-primitives-tabs.mjs +16 -16
- package/fesm2022/radix-ng-primitives-toggle-group.mjs +136 -15
- package/fesm2022/radix-ng-primitives-toggle-group.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-toggle.mjs +6 -6
- package/fesm2022/radix-ng-primitives-toolbar.mjs +155 -0
- package/fesm2022/radix-ng-primitives-toolbar.mjs.map +1 -0
- package/fesm2022/radix-ng-primitives-tooltip.mjs +30 -33
- package/fesm2022/radix-ng-primitives-tooltip.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-visually-hidden.mjs +9 -9
- package/hover-card/src/hover-card-root.directive.d.ts +4 -4
- package/menu/index.d.ts +20 -9
- package/menu/src/menu-content.directive.d.ts +1 -1
- package/menu/src/menu-directive.d.ts +1 -1
- package/menu/src/menu-group.directive.d.ts +1 -1
- package/menu/src/menu-item-checkbox.directive.d.ts +21 -0
- package/menu/src/menu-item-indicator.directive.d.ts +10 -0
- package/menu/src/menu-item-radio.directive.d.ts +20 -0
- package/menu/src/menu-item.directive.d.ts +8 -2
- package/menu/src/menu-label.directive.d.ts +1 -1
- package/menu/src/menu-radio-group.directive.d.ts +6 -0
- package/menu/src/menu-separator.directive.d.ts +1 -2
- package/menu/src/menu-trigger.directive.d.ts +35 -0
- package/menu/src/utils.d.ts +3 -0
- package/menubar/index.d.ts +1 -1
- package/menubar/src/menubar-content.directive.d.ts +2 -2
- package/menubar/src/menubar-item-checkbox.directive.d.ts +2 -10
- package/menubar/src/menubar-item-indicator.directive.d.ts +2 -1
- package/menubar/src/menubar-item-radio.directive.d.ts +2 -10
- package/menubar/src/menubar-item.directive.d.ts +1 -3
- package/menubar/src/menubar-radio-group.directive.d.ts +1 -1
- package/menubar/src/menubar-root.directive.d.ts +3 -4
- package/menubar/src/menubar-separator.directive.d.ts +1 -1
- package/menubar/src/menubar-trigger.directive.d.ts +2 -7
- package/package.json +9 -128
- package/popover/src/popover-root.directive.d.ts +4 -4
- package/progress/src/progress-root.directive.d.ts +19 -33
- package/schematics/collection.json +10 -0
- package/schematics/ng-add/index.d.ts +6 -0
- package/schematics/ng-add/index.js +61 -0
- package/schematics/ng-add/index.js.map +1 -0
- package/schematics/ng-add/package-config.d.ts +18 -0
- package/schematics/ng-add/package-config.js +51 -0
- package/schematics/ng-add/package-config.js.map +1 -0
- package/separator/src/separator.directive.d.ts +1 -1
- package/slider/src/slider-horizontal.component.d.ts +6 -7
- package/slider/src/slider-impl.directive.d.ts +6 -7
- package/slider/src/slider-root.component.d.ts +78 -4
- package/slider/src/slider-vertical.component.d.ts +6 -7
- package/toggle-group/index.d.ts +1 -0
- package/toggle-group/src/toggle-group-item.directive.d.ts +8 -2
- package/toggle-group/src/toggle-group-without-focus.directive.d.ts +69 -0
- package/toggle-group/src/toggle-group.directive.d.ts +12 -1
- package/toggle-group/src/toggle-group.token.d.ts +8 -3
- package/toolbar/README.md +3 -0
- package/toolbar/index.d.ts +19 -0
- package/toolbar/src/toolbar-button.directive.d.ts +11 -0
- package/toolbar/src/toolbar-link.directive.d.ts +7 -0
- package/toolbar/src/toolbar-root.directive.d.ts +8 -0
- package/toolbar/src/toolbar-root.token.d.ts +5 -0
- package/toolbar/src/toolbar-separator.directive.d.ts +6 -0
- package/toolbar/src/toolbar-toggle-group.directive.d.ts +6 -0
- package/toolbar/src/toolbar-toggle-item.directive.d.ts +6 -0
- package/tooltip/src/tooltip-root.directive.d.ts +4 -4
- package/compodoc/documentation.json +0 -39585
@@ -1,5 +1,5 @@
|
|
1
1
|
import * as i0 from '@angular/core';
|
2
|
-
import { inject,
|
2
|
+
import { inject, output, Directive, input, booleanAttribute, viewChild, signal, Input, Component, Injectable, numberAttribute, model, computed, ElementRef, PLATFORM_ID, NgModule } from '@angular/core';
|
3
3
|
import { NgIf, NgTemplateOutlet, isPlatformBrowser } from '@angular/common';
|
4
4
|
|
5
5
|
// https://github.com/tmcw-up-for-adoption/simple-linear-scale/blob/master/index.js
|
@@ -99,12 +99,12 @@ function clamp(value, min = Number.NEGATIVE_INFINITY, max = Number.POSITIVE_INFI
|
|
99
99
|
class RdxSliderImplDirective {
|
100
100
|
constructor() {
|
101
101
|
this.rootContext = inject(RdxSliderRootComponent);
|
102
|
-
this.slideStart =
|
103
|
-
this.slideMove =
|
104
|
-
this.slideEnd =
|
105
|
-
this.homeKeyDown =
|
106
|
-
this.endKeyDown =
|
107
|
-
this.stepKeyDown =
|
102
|
+
this.slideStart = output();
|
103
|
+
this.slideMove = output();
|
104
|
+
this.slideEnd = output();
|
105
|
+
this.homeKeyDown = output();
|
106
|
+
this.endKeyDown = output();
|
107
|
+
this.stepKeyDown = output();
|
108
108
|
}
|
109
109
|
onKeyDown(event) {
|
110
110
|
if (event.key === 'Home') {
|
@@ -150,14 +150,13 @@ class RdxSliderImplDirective {
|
|
150
150
|
this.slideEnd.emit(event);
|
151
151
|
}
|
152
152
|
}
|
153
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
154
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.
|
153
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: RdxSliderImplDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
154
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.4", type: RdxSliderImplDirective, isStandalone: true, selector: "[rdxSliderImpl]", outputs: { slideStart: "slideStart", slideMove: "slideMove", slideEnd: "slideEnd", homeKeyDown: "homeKeyDown", endKeyDown: "endKeyDown", stepKeyDown: "stepKeyDown" }, host: { attributes: { "role": "slider", "tabindex": "0" }, listeners: { "keydown": "onKeyDown($event)", "pointerdown": "onPointerDown($event)", "pointermove": "onPointerMove($event)", "pointerup": "onPointerUp($event)" } }, ngImport: i0 }); }
|
155
155
|
}
|
156
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
156
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: RdxSliderImplDirective, decorators: [{
|
157
157
|
type: Directive,
|
158
158
|
args: [{
|
159
159
|
selector: '[rdxSliderImpl]',
|
160
|
-
standalone: true,
|
161
160
|
host: {
|
162
161
|
role: 'slider',
|
163
162
|
tabindex: '0',
|
@@ -167,19 +166,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
|
|
167
166
|
'(pointerup)': 'onPointerUp($event)'
|
168
167
|
}
|
169
168
|
}]
|
170
|
-
}]
|
171
|
-
type: Output
|
172
|
-
}], slideMove: [{
|
173
|
-
type: Output
|
174
|
-
}], slideEnd: [{
|
175
|
-
type: Output
|
176
|
-
}], homeKeyDown: [{
|
177
|
-
type: Output
|
178
|
-
}], endKeyDown: [{
|
179
|
-
type: Output
|
180
|
-
}], stepKeyDown: [{
|
181
|
-
type: Output
|
182
|
-
}] } });
|
169
|
+
}] });
|
183
170
|
|
184
171
|
class RdxSliderHorizontalComponent {
|
185
172
|
constructor() {
|
@@ -189,12 +176,12 @@ class RdxSliderHorizontalComponent {
|
|
189
176
|
this.min = 0;
|
190
177
|
this.max = 100;
|
191
178
|
this.className = '';
|
192
|
-
this.slideStart =
|
193
|
-
this.slideMove =
|
194
|
-
this.slideEnd =
|
195
|
-
this.stepKeyDown =
|
196
|
-
this.endKeyDown =
|
197
|
-
this.homeKeyDown =
|
179
|
+
this.slideStart = output();
|
180
|
+
this.slideMove = output();
|
181
|
+
this.slideEnd = output();
|
182
|
+
this.stepKeyDown = output();
|
183
|
+
this.endKeyDown = output();
|
184
|
+
this.homeKeyDown = output();
|
198
185
|
this.sliderElement = viewChild('sliderElement');
|
199
186
|
this.rect = signal(undefined);
|
200
187
|
}
|
@@ -228,8 +215,8 @@ class RdxSliderHorizontalComponent {
|
|
228
215
|
this.rect.set(rect);
|
229
216
|
return value(pointerPosition - rect.left);
|
230
217
|
}
|
231
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
232
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "19.
|
218
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: RdxSliderHorizontalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
219
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "19.1.4", type: RdxSliderHorizontalComponent, isStandalone: true, selector: "rdx-slider-horizontal", inputs: { dir: { classPropertyName: "dir", publicName: "dir", isSignal: false, isRequired: false, transformFunction: null }, inverted: { classPropertyName: "inverted", publicName: "inverted", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: false, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: false, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { slideStart: "slideStart", slideMove: "slideMove", slideEnd: "slideEnd", stepKeyDown: "stepKeyDown", endKeyDown: "endKeyDown", homeKeyDown: "homeKeyDown" }, viewQueries: [{ propertyName: "sliderElement", first: true, predicate: ["sliderElement"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
233
220
|
<span
|
234
221
|
#sliderElement
|
235
222
|
[class]="className"
|
@@ -247,7 +234,7 @@ class RdxSliderHorizontalComponent {
|
|
247
234
|
</span>
|
248
235
|
`, isInline: true, dependencies: [{ kind: "directive", type: RdxSliderImplDirective, selector: "[rdxSliderImpl]", outputs: ["slideStart", "slideMove", "slideEnd", "homeKeyDown", "endKeyDown", "stepKeyDown"] }] }); }
|
249
236
|
}
|
250
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
237
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: RdxSliderHorizontalComponent, decorators: [{
|
251
238
|
type: Component,
|
252
239
|
args: [{
|
253
240
|
selector: 'rdx-slider-horizontal',
|
@@ -278,18 +265,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
|
|
278
265
|
type: Input
|
279
266
|
}], className: [{
|
280
267
|
type: Input
|
281
|
-
}], slideStart: [{
|
282
|
-
type: Output
|
283
|
-
}], slideMove: [{
|
284
|
-
type: Output
|
285
|
-
}], slideEnd: [{
|
286
|
-
type: Output
|
287
|
-
}], stepKeyDown: [{
|
288
|
-
type: Output
|
289
|
-
}], endKeyDown: [{
|
290
|
-
type: Output
|
291
|
-
}], homeKeyDown: [{
|
292
|
-
type: Output
|
293
268
|
}] } });
|
294
269
|
|
295
270
|
class RdxSliderOrientationContextService {
|
@@ -310,10 +285,10 @@ class RdxSliderOrientationContextService {
|
|
310
285
|
...context
|
311
286
|
}));
|
312
287
|
}
|
313
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
314
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.
|
288
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: RdxSliderOrientationContextService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
289
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: RdxSliderOrientationContextService }); }
|
315
290
|
}
|
316
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
291
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: RdxSliderOrientationContextService, decorators: [{
|
317
292
|
type: Injectable
|
318
293
|
}] });
|
319
294
|
|
@@ -325,12 +300,12 @@ class RdxSliderVerticalComponent {
|
|
325
300
|
this.min = 0;
|
326
301
|
this.max = 100;
|
327
302
|
this.className = '';
|
328
|
-
this.slideStart =
|
329
|
-
this.slideMove =
|
330
|
-
this.slideEnd =
|
331
|
-
this.stepKeyDown =
|
332
|
-
this.endKeyDown =
|
333
|
-
this.homeKeyDown =
|
303
|
+
this.slideStart = output();
|
304
|
+
this.slideMove = output();
|
305
|
+
this.slideEnd = output();
|
306
|
+
this.stepKeyDown = output();
|
307
|
+
this.endKeyDown = output();
|
308
|
+
this.homeKeyDown = output();
|
334
309
|
this.sliderElement = viewChild('sliderElement');
|
335
310
|
this.rect = signal(undefined);
|
336
311
|
}
|
@@ -364,8 +339,8 @@ class RdxSliderVerticalComponent {
|
|
364
339
|
this.rect.set(rect);
|
365
340
|
return value(pointerPosition - rect.top);
|
366
341
|
}
|
367
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
368
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "19.
|
342
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: RdxSliderVerticalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
343
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "19.1.4", type: RdxSliderVerticalComponent, isStandalone: true, selector: "rdx-slider-vertical", inputs: { dir: { classPropertyName: "dir", publicName: "dir", isSignal: false, isRequired: false, transformFunction: null }, inverted: { classPropertyName: "inverted", publicName: "inverted", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: false, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: false, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { slideStart: "slideStart", slideMove: "slideMove", slideEnd: "slideEnd", stepKeyDown: "stepKeyDown", endKeyDown: "endKeyDown", homeKeyDown: "homeKeyDown" }, viewQueries: [{ propertyName: "sliderElement", first: true, predicate: ["sliderElement"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
369
344
|
<span
|
370
345
|
#sliderElement
|
371
346
|
[class]="className"
|
@@ -383,7 +358,7 @@ class RdxSliderVerticalComponent {
|
|
383
358
|
</span>
|
384
359
|
`, isInline: true, dependencies: [{ kind: "directive", type: RdxSliderImplDirective, selector: "[rdxSliderImpl]", outputs: ["slideStart", "slideMove", "slideEnd", "homeKeyDown", "endKeyDown", "stepKeyDown"] }] }); }
|
385
360
|
}
|
386
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
361
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: RdxSliderVerticalComponent, decorators: [{
|
387
362
|
type: Component,
|
388
363
|
args: [{
|
389
364
|
selector: 'rdx-slider-vertical',
|
@@ -414,36 +389,98 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
|
|
414
389
|
type: Input
|
415
390
|
}], className: [{
|
416
391
|
type: Input
|
417
|
-
}], slideStart: [{
|
418
|
-
type: Output
|
419
|
-
}], slideMove: [{
|
420
|
-
type: Output
|
421
|
-
}], slideEnd: [{
|
422
|
-
type: Output
|
423
|
-
}], stepKeyDown: [{
|
424
|
-
type: Output
|
425
|
-
}], endKeyDown: [{
|
426
|
-
type: Output
|
427
|
-
}], homeKeyDown: [{
|
428
|
-
type: Output
|
429
392
|
}] } });
|
430
393
|
|
394
|
+
/**
|
395
|
+
* @group Components
|
396
|
+
*/
|
431
397
|
class RdxSliderRootComponent {
|
432
398
|
constructor() {
|
433
399
|
/** @ignore */
|
434
400
|
this.orientationContext = inject(RdxSliderOrientationContextService);
|
401
|
+
/**
|
402
|
+
* The minimum value for the range.
|
403
|
+
*
|
404
|
+
* @group Props
|
405
|
+
* @defaultValue 0
|
406
|
+
*/
|
435
407
|
this.min = input(0, { transform: numberAttribute });
|
408
|
+
/**
|
409
|
+
* The maximum value for the range.
|
410
|
+
*
|
411
|
+
* @group Props
|
412
|
+
* @defaultValue 100
|
413
|
+
*/
|
436
414
|
this.max = input(100, { transform: numberAttribute });
|
415
|
+
/**
|
416
|
+
* The stepping interval.
|
417
|
+
*
|
418
|
+
* @group Props
|
419
|
+
* @defaultValue 1
|
420
|
+
*/
|
437
421
|
this.step = input(1, { transform: numberAttribute });
|
422
|
+
/**
|
423
|
+
* The minimum permitted steps between multiple thumbs.
|
424
|
+
*
|
425
|
+
* @group Props
|
426
|
+
* @defaultValue 0
|
427
|
+
*/
|
438
428
|
this.minStepsBetweenThumbs = input(0, { transform: numberAttribute });
|
429
|
+
/**
|
430
|
+
* The orientation of the slider.
|
431
|
+
*
|
432
|
+
* @group Props
|
433
|
+
* @defaultValue 'horizontal'
|
434
|
+
*/
|
439
435
|
this.orientation = input('horizontal');
|
436
|
+
/**
|
437
|
+
* When true, prevents the user from interacting with the slider.
|
438
|
+
*
|
439
|
+
* @group Props
|
440
|
+
* @defaultValue false
|
441
|
+
*/
|
440
442
|
this.disabled = input(false, { transform: booleanAttribute });
|
443
|
+
/**
|
444
|
+
* Whether the slider is visually inverted.
|
445
|
+
*
|
446
|
+
* @group Props
|
447
|
+
* @defaultValue false
|
448
|
+
*/
|
441
449
|
this.inverted = input(false, { transform: booleanAttribute });
|
450
|
+
/**
|
451
|
+
* The reading direction of the combobox when applicable.
|
452
|
+
*
|
453
|
+
* @group Props
|
454
|
+
* @defaultValue 'ltr'
|
455
|
+
*/
|
442
456
|
this.dir = input('ltr');
|
443
457
|
this.className = '';
|
444
|
-
|
445
|
-
|
458
|
+
/**
|
459
|
+
* Style class of the component.
|
460
|
+
*
|
461
|
+
* @group Props
|
462
|
+
*/
|
463
|
+
this.styleClass = input();
|
464
|
+
/**
|
465
|
+
* The controlled value of the slider.
|
466
|
+
*
|
467
|
+
* @group Props
|
468
|
+
*/
|
446
469
|
this.modelValue = model([0]);
|
470
|
+
/**
|
471
|
+
* Event handler called when the slider value changes.
|
472
|
+
*
|
473
|
+
* @group Emits
|
474
|
+
*/
|
475
|
+
this.valueChange = output();
|
476
|
+
/**
|
477
|
+
* Event handler called when the value changes at the end of an interaction.
|
478
|
+
*
|
479
|
+
* Useful when you only need to capture a final value e.g. to update a backend service.
|
480
|
+
*
|
481
|
+
* @group Emits
|
482
|
+
*/
|
483
|
+
this.valueCommit = output();
|
447
484
|
/** @ignore */
|
448
485
|
this.valueIndexToChange = model(0);
|
449
486
|
/** @ignore */
|
@@ -523,13 +560,13 @@ class RdxSliderRootComponent {
|
|
523
560
|
}
|
524
561
|
}
|
525
562
|
}
|
526
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
527
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.
|
563
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: RdxSliderRootComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
564
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.1.4", type: RdxSliderRootComponent, isStandalone: true, selector: "rdx-slider", inputs: { min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null }, minStepsBetweenThumbs: { classPropertyName: "minStepsBetweenThumbs", publicName: "minStepsBetweenThumbs", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, inverted: { classPropertyName: "inverted", publicName: "inverted", isSignal: true, isRequired: false, transformFunction: null }, dir: { classPropertyName: "dir", publicName: "dir", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: false, isRequired: false, transformFunction: null }, styleClass: { classPropertyName: "styleClass", publicName: "styleClass", isSignal: true, isRequired: false, transformFunction: null }, modelValue: { classPropertyName: "modelValue", publicName: "modelValue", isSignal: true, isRequired: false, transformFunction: null }, valueIndexToChange: { classPropertyName: "valueIndexToChange", publicName: "valueIndexToChange", isSignal: true, isRequired: false, transformFunction: null }, valuesBeforeSlideStart: { classPropertyName: "valuesBeforeSlideStart", publicName: "valuesBeforeSlideStart", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { modelValue: "modelValueChange", valueChange: "valueChange", valueCommit: "valueCommit", valueIndexToChange: "valueIndexToChangeChange", valuesBeforeSlideStart: "valuesBeforeSlideStartChange" }, providers: [RdxSliderOrientationContextService], ngImport: i0, template: `
|
528
565
|
<ng-template #transclude><ng-content /></ng-template>
|
529
566
|
|
530
567
|
<ng-container *ngIf="orientation() === 'horizontal'">
|
531
568
|
<rdx-slider-horizontal
|
532
|
-
[className]="className"
|
569
|
+
[className]="styleClass() || className"
|
533
570
|
[min]="min()"
|
534
571
|
[max]="max()"
|
535
572
|
[dir]="dir()"
|
@@ -550,7 +587,7 @@ class RdxSliderRootComponent {
|
|
550
587
|
|
551
588
|
<ng-container *ngIf="orientation() === 'vertical'">
|
552
589
|
<rdx-slider-vertical
|
553
|
-
[className]="className"
|
590
|
+
[className]="styleClass() || className"
|
554
591
|
[min]="min()"
|
555
592
|
[max]="max()"
|
556
593
|
[dir]="dir()"
|
@@ -570,7 +607,7 @@ class RdxSliderRootComponent {
|
|
570
607
|
</ng-container>
|
571
608
|
`, isInline: true, dependencies: [{ kind: "component", type: RdxSliderHorizontalComponent, selector: "rdx-slider-horizontal", inputs: ["dir", "inverted", "min", "max", "className"], outputs: ["slideStart", "slideMove", "slideEnd", "stepKeyDown", "endKeyDown", "homeKeyDown"] }, { kind: "component", type: RdxSliderVerticalComponent, selector: "rdx-slider-vertical", inputs: ["dir", "inverted", "min", "max", "className"], outputs: ["slideStart", "slideMove", "slideEnd", "stepKeyDown", "endKeyDown", "homeKeyDown"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] }); }
|
572
609
|
}
|
573
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
610
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: RdxSliderRootComponent, decorators: [{
|
574
611
|
type: Component,
|
575
612
|
args: [{
|
576
613
|
selector: 'rdx-slider',
|
@@ -581,7 +618,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
|
|
581
618
|
|
582
619
|
<ng-container *ngIf="orientation() === 'horizontal'">
|
583
620
|
<rdx-slider-horizontal
|
584
|
-
[className]="className"
|
621
|
+
[className]="styleClass() || className"
|
585
622
|
[min]="min()"
|
586
623
|
[max]="max()"
|
587
624
|
[dir]="dir()"
|
@@ -602,7 +639,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
|
|
602
639
|
|
603
640
|
<ng-container *ngIf="orientation() === 'vertical'">
|
604
641
|
<rdx-slider-vertical
|
605
|
-
[className]="className"
|
642
|
+
[className]="styleClass() || className"
|
606
643
|
[min]="min()"
|
607
644
|
[max]="max()"
|
608
645
|
[dir]="dir()"
|
@@ -624,10 +661,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
|
|
624
661
|
}]
|
625
662
|
}], propDecorators: { className: [{
|
626
663
|
type: Input
|
627
|
-
}], valueChange: [{
|
628
|
-
type: Output
|
629
|
-
}], valueCommit: [{
|
630
|
-
type: Output
|
631
664
|
}] } });
|
632
665
|
|
633
666
|
class RdxSliderRangeComponent {
|
@@ -646,16 +679,15 @@ class RdxSliderRangeComponent {
|
|
646
679
|
};
|
647
680
|
});
|
648
681
|
}
|
649
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
650
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.
|
682
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: RdxSliderRangeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
683
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.4", type: RdxSliderRangeComponent, isStandalone: true, selector: "rdx-slider-range", host: { properties: { "attr.data-disabled": "rootContext.disabled() ? \"\" : undefined", "attr.data-orientation": "rootContext.orientation()", "style": "rangeStyles()" } }, ngImport: i0, template: `
|
651
684
|
<ng-content />
|
652
685
|
`, isInline: true }); }
|
653
686
|
}
|
654
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
687
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: RdxSliderRangeComponent, decorators: [{
|
655
688
|
type: Component,
|
656
689
|
args: [{
|
657
690
|
selector: 'rdx-slider-range',
|
658
|
-
standalone: true,
|
659
691
|
host: {
|
660
692
|
'[attr.data-disabled]': 'rootContext.disabled() ? "" : undefined',
|
661
693
|
'[attr.data-orientation]': 'rootContext.orientation()',
|
@@ -745,14 +777,13 @@ class RdxSliderThumbImplDirective {
|
|
745
777
|
}
|
746
778
|
this.isMounted.set(false);
|
747
779
|
}
|
748
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
749
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.
|
780
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: RdxSliderThumbImplDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
781
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.4", type: RdxSliderThumbImplDirective, isStandalone: true, selector: "[rdxSliderThumbImpl]", host: { attributes: { "role": "slider" }, listeners: { "focus": "onFocus()" }, properties: { "tabindex": "rootContext.disabled() ? undefined : 0", "attr.aria-valuenow": "rootContext.modelValue()", "attr.aria-valuemin": "rootContext.min()", "attr.aria-valuemax": "rootContext.max()", "attr.aria-orientation": "rootContext.orientation()", "attr.data-orientation": "rootContext.orientation()", "attr.data-disabled": "rootContext.disabled() ? \"\" : undefined", "style": "combinedStyles()" } }, ngImport: i0 }); }
|
750
782
|
}
|
751
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
783
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: RdxSliderThumbImplDirective, decorators: [{
|
752
784
|
type: Directive,
|
753
785
|
args: [{
|
754
786
|
selector: '[rdxSliderThumbImpl]',
|
755
|
-
standalone: true,
|
756
787
|
host: {
|
757
788
|
role: 'slider',
|
758
789
|
'[tabindex]': 'rootContext.disabled() ? undefined : 0',
|
@@ -769,16 +800,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
|
|
769
800
|
}] });
|
770
801
|
|
771
802
|
class RdxSliderThumbComponent {
|
772
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
773
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.
|
803
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: RdxSliderThumbComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
804
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.4", type: RdxSliderThumbComponent, isStandalone: true, selector: "rdx-slider-thumb", hostDirectives: [{ directive: RdxSliderThumbImplDirective }], ngImport: i0, template: `
|
774
805
|
<ng-content />
|
775
806
|
`, isInline: true }); }
|
776
807
|
}
|
777
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
808
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: RdxSliderThumbComponent, decorators: [{
|
778
809
|
type: Component,
|
779
810
|
args: [{
|
780
811
|
selector: 'rdx-slider-thumb',
|
781
|
-
standalone: true,
|
782
812
|
hostDirectives: [RdxSliderThumbImplDirective],
|
783
813
|
template: `
|
784
814
|
<ng-content />
|
@@ -790,16 +820,15 @@ class RdxSliderTrackComponent {
|
|
790
820
|
constructor() {
|
791
821
|
this.rootContext = inject(RdxSliderRootComponent);
|
792
822
|
}
|
793
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
794
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.
|
823
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: RdxSliderTrackComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
824
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.4", type: RdxSliderTrackComponent, isStandalone: true, selector: "rdx-slider-track", host: { properties: { "attr.data-disabled": "rootContext.disabled() ? '' : undefined", "attr.data-orientation": "rootContext.orientation()" } }, ngImport: i0, template: `
|
795
825
|
<ng-content />
|
796
826
|
`, isInline: true }); }
|
797
827
|
}
|
798
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
828
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: RdxSliderTrackComponent, decorators: [{
|
799
829
|
type: Component,
|
800
830
|
args: [{
|
801
831
|
selector: 'rdx-slider-track',
|
802
|
-
standalone: true,
|
803
832
|
host: {
|
804
833
|
'[attr.data-disabled]': "rootContext.disabled() ? '' : undefined",
|
805
834
|
'[attr.data-orientation]': 'rootContext.orientation()'
|
@@ -812,11 +841,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
|
|
812
841
|
|
813
842
|
const _imports = [RdxSliderRootComponent, RdxSliderTrackComponent, RdxSliderRangeComponent, RdxSliderThumbComponent];
|
814
843
|
class RdxSliderModule {
|
815
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
816
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.
|
817
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.
|
844
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: RdxSliderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
845
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.4", ngImport: i0, type: RdxSliderModule, imports: [RdxSliderRootComponent, RdxSliderTrackComponent, RdxSliderRangeComponent, RdxSliderThumbComponent], exports: [RdxSliderRootComponent, RdxSliderTrackComponent, RdxSliderRangeComponent, RdxSliderThumbComponent] }); }
|
846
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: RdxSliderModule }); }
|
818
847
|
}
|
819
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
848
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: RdxSliderModule, decorators: [{
|
820
849
|
type: NgModule,
|
821
850
|
args: [{
|
822
851
|
imports: [..._imports],
|