@nanahoshi/mona-ui 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/auto-complete/package.json +4 -0
- package/avatar/package.json +4 -0
- package/breadcrumb/package.json +4 -0
- package/button/package.json +4 -0
- package/button-group/package.json +4 -0
- package/calendar/package.json +4 -0
- package/check-box/package.json +4 -0
- package/chip/package.json +4 -0
- package/circular-progress-bar/package.json +4 -0
- package/color-gradient/package.json +4 -0
- package/color-palette/package.json +4 -0
- package/color-picker/package.json +4 -0
- package/combo-box/package.json +4 -0
- package/common/package.json +4 -0
- package/contextmenu/package.json +4 -0
- package/date-input/package.json +4 -0
- package/date-picker/package.json +4 -0
- package/datetime-picker/package.json +4 -0
- package/dialog/package.json +4 -0
- package/dropdown-button/package.json +4 -0
- package/dropdown-list/package.json +4 -0
- package/dropdowns/package.json +4 -0
- package/editor/package.json +4 -0
- package/expansion-panel/package.json +4 -0
- package/fesm2022/nanahoshi-mona-ui-auto-complete.mjs +40 -55
- package/fesm2022/nanahoshi-mona-ui-breadcrumb.mjs +24 -58
- package/fesm2022/nanahoshi-mona-ui-button-group.mjs +37 -48
- package/fesm2022/nanahoshi-mona-ui-button.mjs +130 -129
- package/fesm2022/nanahoshi-mona-ui-calendar.mjs +69 -165
- package/fesm2022/nanahoshi-mona-ui-check-box.mjs +81 -128
- package/fesm2022/nanahoshi-mona-ui-chip.mjs +102 -112
- package/fesm2022/nanahoshi-mona-ui-circular-progress-bar.mjs +11 -25
- package/fesm2022/nanahoshi-mona-ui-color-gradient.mjs +41 -92
- package/fesm2022/nanahoshi-mona-ui-color-palette.mjs +27 -49
- package/fesm2022/nanahoshi-mona-ui-color-picker.mjs +64 -65
- package/fesm2022/nanahoshi-mona-ui-combo-box.mjs +39 -61
- package/fesm2022/nanahoshi-mona-ui-date-input.mjs +12 -15
- package/fesm2022/nanahoshi-mona-ui-date-picker.mjs +44 -33
- package/fesm2022/nanahoshi-mona-ui-datetime-picker.mjs +58 -60
- package/fesm2022/nanahoshi-mona-ui-dialog.mjs +52 -165
- package/fesm2022/nanahoshi-mona-ui-dropdown-list.mjs +36 -59
- package/fesm2022/nanahoshi-mona-ui-dropdowns.mjs +56 -61
- package/fesm2022/nanahoshi-mona-ui-editor.mjs +302 -81
- package/fesm2022/nanahoshi-mona-ui-expansion-panel.mjs +33 -84
- package/fesm2022/nanahoshi-mona-ui-fieldset.mjs +12 -45
- package/fesm2022/nanahoshi-mona-ui-filter.mjs +18 -48
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-footer-cell.component-B9SQH5N-.mjs → nanahoshi-mona-ui-grid-grid-footer-cell.component-B6FBLtrr.mjs} +14 -14
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-DlLwcCFT.mjs → nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-OJe4UYuw.mjs} +4 -8
- package/fesm2022/nanahoshi-mona-ui-grid-grid-list.component-DCd8K6ng.mjs +121 -0
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-toggle.component-DIUutx9s.mjs → nanahoshi-mona-ui-grid-grid-toggle.component-Dl8Hlkhj.mjs} +26 -55
- package/fesm2022/nanahoshi-mona-ui-grid-grid-virtual-list.component-C5FRZlvv.mjs +231 -0
- package/fesm2022/{nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-C3eZIaJK.mjs → nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-BRZUd8cE.mjs} +167 -451
- package/fesm2022/nanahoshi-mona-ui-grid.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-internal-indicator-icon.mjs +10 -28
- package/fesm2022/nanahoshi-mona-ui-internal-list.mjs +57 -87
- package/fesm2022/nanahoshi-mona-ui-internal-tree.mjs +48 -139
- package/fesm2022/nanahoshi-mona-ui-internal.mjs +29 -1
- package/fesm2022/nanahoshi-mona-ui-list-box.mjs +10 -32
- package/fesm2022/nanahoshi-mona-ui-list-view.mjs +8 -21
- package/fesm2022/nanahoshi-mona-ui-menubar.mjs +50 -156
- package/fesm2022/nanahoshi-mona-ui-multi-select.mjs +40 -69
- package/fesm2022/nanahoshi-mona-ui-notification.mjs +32 -116
- package/fesm2022/nanahoshi-mona-ui-numeric-text-box.mjs +81 -107
- package/fesm2022/nanahoshi-mona-ui-pager.mjs +33 -85
- package/fesm2022/nanahoshi-mona-ui-placeholder.mjs +12 -34
- package/fesm2022/nanahoshi-mona-ui-popover.mjs +31 -52
- package/fesm2022/nanahoshi-mona-ui-popup-menu.mjs +38 -110
- package/fesm2022/nanahoshi-mona-ui-popup.mjs +4 -4
- package/fesm2022/nanahoshi-mona-ui-progress-bar.mjs +21 -62
- package/fesm2022/nanahoshi-mona-ui-radio-button.mjs +66 -111
- package/fesm2022/nanahoshi-mona-ui-scroll-view.mjs +60 -151
- package/fesm2022/nanahoshi-mona-ui-slider.mjs +117 -173
- package/fesm2022/nanahoshi-mona-ui-split-button.mjs +32 -45
- package/fesm2022/nanahoshi-mona-ui-splitter.mjs +29 -64
- package/fesm2022/nanahoshi-mona-ui-stepper.mjs +38 -101
- package/fesm2022/nanahoshi-mona-ui-switch.mjs +58 -79
- package/fesm2022/nanahoshi-mona-ui-tabs.mjs +42 -118
- package/fesm2022/nanahoshi-mona-ui-text-area.mjs +29 -37
- package/fesm2022/nanahoshi-mona-ui-text-box.mjs +60 -81
- package/fesm2022/nanahoshi-mona-ui-theme.mjs +1111 -269
- package/fesm2022/nanahoshi-mona-ui-time-picker.mjs +45 -39
- package/fesm2022/nanahoshi-mona-ui-time-selector.mjs +45 -109
- package/fesm2022/nanahoshi-mona-ui-tooltip.mjs +54 -82
- package/fesm2022/nanahoshi-mona-ui-tree-view.mjs +2 -2
- package/fesm2022/nanahoshi-mona-ui-window.mjs +35 -115
- package/fieldset/package.json +4 -0
- package/filter/package.json +4 -0
- package/grid/package.json +4 -0
- package/internal/filter-input/package.json +4 -0
- package/internal/indicator-icon/package.json +4 -0
- package/internal/list/package.json +4 -0
- package/internal/package.json +4 -0
- package/internal/tree/package.json +4 -0
- package/list/package.json +4 -0
- package/list-box/package.json +4 -0
- package/list-view/package.json +4 -0
- package/menubar/package.json +4 -0
- package/multi-select/package.json +4 -0
- package/notification/package.json +4 -0
- package/numeric-text-box/package.json +4 -0
- package/package.json +31 -5
- package/pager/package.json +4 -0
- package/placeholder/package.json +4 -0
- package/popover/package.json +4 -0
- package/popup/package.json +4 -0
- package/popup-menu/package.json +4 -0
- package/progress-bar/package.json +4 -0
- package/query/package.json +4 -0
- package/radio-button/package.json +4 -0
- package/scroll-view/package.json +4 -0
- package/slider/package.json +4 -0
- package/split-button/package.json +4 -0
- package/splitter/package.json +4 -0
- package/stepper/package.json +4 -0
- package/switch/package.json +4 -0
- package/tabs/package.json +4 -0
- package/text-area/package.json +4 -0
- package/text-box/package.json +4 -0
- package/theme/package.json +4 -0
- package/time-picker/package.json +4 -0
- package/time-selector/package.json +4 -0
- package/tooltip/package.json +4 -0
- package/tree-view/package.json +4 -0
- package/types/nanahoshi-mona-ui-auto-complete.d.ts +6 -7
- package/types/nanahoshi-mona-ui-breadcrumb.d.ts +4 -6
- package/types/nanahoshi-mona-ui-button-group.d.ts +2 -3
- package/types/nanahoshi-mona-ui-button.d.ts +6 -6
- package/types/nanahoshi-mona-ui-calendar.d.ts +21 -22
- package/types/nanahoshi-mona-ui-check-box.d.ts +6 -9
- package/types/nanahoshi-mona-ui-chip.d.ts +2 -3
- package/types/nanahoshi-mona-ui-circular-progress-bar.d.ts +2 -4
- package/types/nanahoshi-mona-ui-color-gradient.d.ts +10 -11
- package/types/nanahoshi-mona-ui-color-palette.d.ts +4 -5
- package/types/nanahoshi-mona-ui-color-picker.d.ts +6 -8
- package/types/nanahoshi-mona-ui-combo-box.d.ts +6 -7
- package/types/nanahoshi-mona-ui-date-input.d.ts +2 -3
- package/types/nanahoshi-mona-ui-date-picker.d.ts +2 -3
- package/types/nanahoshi-mona-ui-dialog.d.ts +7 -8
- package/types/nanahoshi-mona-ui-dropdown-list.d.ts +6 -7
- package/types/nanahoshi-mona-ui-dropdowns.d.ts +2 -3
- package/types/nanahoshi-mona-ui-editor.d.ts +17 -17
- package/types/nanahoshi-mona-ui-expansion-panel.d.ts +8 -10
- package/types/nanahoshi-mona-ui-fieldset.d.ts +6 -8
- package/types/nanahoshi-mona-ui-filter.d.ts +3 -4
- package/types/nanahoshi-mona-ui-grid.d.ts +16 -17
- package/types/nanahoshi-mona-ui-internal-indicator-icon.d.ts +0 -1
- package/types/nanahoshi-mona-ui-internal-tree.d.ts +16 -16
- package/types/nanahoshi-mona-ui-internal.d.ts +8 -1
- package/types/nanahoshi-mona-ui-list-box.d.ts +4 -5
- package/types/nanahoshi-mona-ui-list-view.d.ts +2 -3
- package/types/nanahoshi-mona-ui-menubar.d.ts +7 -8
- package/types/nanahoshi-mona-ui-multi-select.d.ts +8 -9
- package/types/nanahoshi-mona-ui-numeric-text-box.d.ts +2 -3
- package/types/nanahoshi-mona-ui-pager.d.ts +6 -7
- package/types/nanahoshi-mona-ui-placeholder.d.ts +4 -6
- package/types/nanahoshi-mona-ui-popover.d.ts +8 -9
- package/types/nanahoshi-mona-ui-popup-menu.d.ts +12 -13
- package/types/nanahoshi-mona-ui-progress-bar.d.ts +8 -9
- package/types/nanahoshi-mona-ui-radio-button.d.ts +8 -11
- package/types/nanahoshi-mona-ui-scroll-view.d.ts +18 -20
- package/types/nanahoshi-mona-ui-slider.d.ts +18 -18
- package/types/nanahoshi-mona-ui-split-button.d.ts +2 -3
- package/types/nanahoshi-mona-ui-splitter.d.ts +6 -8
- package/types/nanahoshi-mona-ui-stepper.d.ts +13 -14
- package/types/nanahoshi-mona-ui-switch.d.ts +6 -7
- package/types/nanahoshi-mona-ui-tabs.d.ts +15 -17
- package/types/nanahoshi-mona-ui-text-area.d.ts +2 -4
- package/types/nanahoshi-mona-ui-text-box.d.ts +4 -6
- package/types/nanahoshi-mona-ui-theme.d.ts +111 -12
- package/types/nanahoshi-mona-ui-time-picker.d.ts +2 -3
- package/types/nanahoshi-mona-ui-time-selector.d.ts +10 -11
- package/types/nanahoshi-mona-ui-tooltip.d.ts +4 -5
- package/types/nanahoshi-mona-ui-window.d.ts +16 -17
- package/window/package.json +4 -0
- package/fesm2022/nanahoshi-mona-ui-grid-grid-list.component-Dgea-O0X.mjs +0 -130
- package/fesm2022/nanahoshi-mona-ui-grid-grid-virtual-list.component-DRHycGIh.mjs +0 -240
|
@@ -3,9 +3,9 @@ import * as i0 from '@angular/core';
|
|
|
3
3
|
import { inject, ElementRef, Directive, Pipe, DestroyRef, signal, viewChildren, NgZone, computed, contentChild, TemplateRef, input, output, afterNextRender, viewChild, model, Component } from '@angular/core';
|
|
4
4
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
5
5
|
import { fromEvent, tap, filter, switchMap, takeUntil } from 'rxjs';
|
|
6
|
-
import { ThemeService } from '@nanahoshi/mona-ui/theme';
|
|
7
6
|
import { twMerge } from 'tailwind-merge';
|
|
8
7
|
import { cva } from 'class-variance-authority';
|
|
8
|
+
import { themeRaisedSurfaceClasses } from '@nanahoshi/mona-ui/internal';
|
|
9
9
|
|
|
10
10
|
class SliderTickDirective {
|
|
11
11
|
constructor() {
|
|
@@ -150,105 +150,113 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
150
150
|
}]
|
|
151
151
|
}] });
|
|
152
152
|
|
|
153
|
-
const
|
|
154
|
-
flex
|
|
155
|
-
|
|
156
|
-
data-[orientation="horizontal"]:
|
|
157
|
-
data-[orientation="horizontal"]:
|
|
158
|
-
data-[orientation="horizontal"]:min-w-[200px]
|
|
159
|
-
data-[orientation="horizontal"]:items-center
|
|
160
|
-
|
|
161
|
-
data-[orientation="vertical"]:
|
|
162
|
-
data-[orientation="vertical"]:
|
|
163
|
-
data-[orientation="vertical"]:justify-center
|
|
164
|
-
|
|
165
|
-
data-[disabled="true"]:pointer-events-none
|
|
166
|
-
data-[disabled="true"]:
|
|
167
|
-
data-[disabled="true"]:
|
|
168
|
-
`);
|
|
169
|
-
const sliderTrackVariants = cva(`
|
|
170
|
-
relative z-2 cursor-pointer
|
|
171
|
-
border border-input-border
|
|
172
|
-
bg-background
|
|
173
|
-
|
|
174
|
-
data-[orientation="horizontal"]:w-full
|
|
175
|
-
data-[orientation="horizontal"]:h-1.5
|
|
176
|
-
|
|
177
|
-
data-[orientation="vertical"]:h-full
|
|
178
|
-
data-[orientation="vertical"]:w-1.5
|
|
179
|
-
|
|
153
|
+
const sliderBaseThemeVariants = cva(`
|
|
154
|
+
relative flex select-none
|
|
155
|
+
|
|
156
|
+
data-[orientation="horizontal"]:w-full
|
|
157
|
+
data-[orientation="horizontal"]:h-6
|
|
158
|
+
data-[orientation="horizontal"]:min-w-[200px]
|
|
159
|
+
data-[orientation="horizontal"]:items-center
|
|
160
|
+
|
|
161
|
+
data-[orientation="vertical"]:h-[200px]
|
|
162
|
+
data-[orientation="vertical"]:w-6
|
|
163
|
+
data-[orientation="vertical"]:justify-center
|
|
164
|
+
|
|
165
|
+
data-[disabled="true"]:pointer-events-none
|
|
166
|
+
data-[disabled="true"]:cursor-not-allowed
|
|
167
|
+
data-[disabled="true"]:opacity-50
|
|
180
168
|
`);
|
|
181
|
-
const
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
data-[orientation="horizontal"]:
|
|
188
|
-
|
|
189
|
-
data-[orientation="
|
|
190
|
-
data-[orientation="
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
169
|
+
const sliderTrackThemeVariants = cva(`
|
|
170
|
+
relative z-2 cursor-pointer
|
|
171
|
+
overflow-hidden
|
|
172
|
+
bg-surface-muted text-foreground
|
|
173
|
+
|
|
174
|
+
data-[orientation="horizontal"]:w-full
|
|
175
|
+
data-[orientation="horizontal"]:h-1.5
|
|
176
|
+
|
|
177
|
+
data-[orientation="vertical"]:h-full
|
|
178
|
+
data-[orientation="vertical"]:w-1.5
|
|
179
|
+
|
|
180
|
+
`, {
|
|
181
|
+
variants: {
|
|
182
|
+
rounded: {
|
|
183
|
+
full: "rounded-full",
|
|
184
|
+
large: "rounded-lg",
|
|
185
|
+
medium: "rounded-md",
|
|
186
|
+
none: "rounded-none",
|
|
187
|
+
small: "rounded-sm"
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
});
|
|
191
|
+
const sliderSelectionThemeVariants = cva(`
|
|
192
|
+
absolute
|
|
193
|
+
bg-primary
|
|
194
|
+
border-none
|
|
195
|
+
transition duration-(--mona-motion-fast) ease-out
|
|
196
|
+
|
|
197
|
+
data-[orientation="horizontal"]:top-0
|
|
198
|
+
data-[orientation="horizontal"]:bottom-0
|
|
199
|
+
data-[orientation="horizontal"]:transition-[left,right]
|
|
200
|
+
data-[orientation="horizontal"]:data-[dragging="true"]:transition-none
|
|
201
|
+
|
|
202
|
+
data-[orientation="vertical"]:left-0
|
|
203
|
+
data-[orientation="vertical"]:right-0
|
|
204
|
+
data-[orientation="vertical"]:transition-[top,bottom]
|
|
205
|
+
data-[orientation="vertical"]:data-[dragging="true"]:transition-none
|
|
196
206
|
`);
|
|
197
|
-
const
|
|
198
|
-
absolute
|
|
199
|
-
|
|
200
|
-
data-[orientation="horizontal"]:w-full
|
|
201
|
-
data-[orientation="horizontal"]:h-6
|
|
202
|
-
data-[orientation="horizontal"]:top-0
|
|
203
|
-
data-[orientation="horizontal"]:left-0
|
|
204
|
-
|
|
205
|
-
data-[orientation="vertical"]:w-6
|
|
206
|
-
data-[orientation="vertical"]:h-full
|
|
207
|
-
data-[orientation="vertical"]:top-0
|
|
208
|
-
data-[orientation="vertical"]:left-0
|
|
207
|
+
const sliderTickListThemeVariants = cva(`
|
|
208
|
+
absolute
|
|
209
|
+
|
|
210
|
+
data-[orientation="horizontal"]:w-full
|
|
211
|
+
data-[orientation="horizontal"]:h-6
|
|
212
|
+
data-[orientation="horizontal"]:top-0
|
|
213
|
+
data-[orientation="horizontal"]:left-0
|
|
214
|
+
|
|
215
|
+
data-[orientation="vertical"]:w-6
|
|
216
|
+
data-[orientation="vertical"]:h-full
|
|
217
|
+
data-[orientation="vertical"]:top-0
|
|
218
|
+
data-[orientation="vertical"]:left-0
|
|
209
219
|
`);
|
|
210
|
-
const
|
|
211
|
-
cursor-pointer
|
|
212
|
-
bg-
|
|
213
|
-
brightness-75
|
|
220
|
+
const sliderTickThemeVariants = cva(`
|
|
221
|
+
cursor-pointer
|
|
222
|
+
bg-border-control-hover
|
|
214
223
|
`);
|
|
215
|
-
const
|
|
216
|
-
absolute
|
|
217
|
-
|
|
218
|
-
select-none
|
|
224
|
+
const sliderTickLabelListThemeVariants = cva(`
|
|
225
|
+
absolute h-full w-full
|
|
226
|
+
select-none
|
|
219
227
|
`);
|
|
220
|
-
const
|
|
221
|
-
absolute flex
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
data-[orientation="vertical"]:w-4.25
|
|
228
|
-
data-[orientation="vertical"]:h-auto
|
|
228
|
+
const sliderTickLabelThemeVariants = cva(`
|
|
229
|
+
absolute flex items-center justify-center
|
|
230
|
+
text-xs/[1.667] text-foreground
|
|
231
|
+
|
|
232
|
+
data-[orientation="vertical"]:h-auto
|
|
233
|
+
data-[orientation="vertical"]:w-4.25
|
|
229
234
|
`);
|
|
230
|
-
const
|
|
231
|
-
absolute z-2 flex items-center justify-center
|
|
232
|
-
|
|
233
|
-
cursor-pointer
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
ease-out
|
|
238
|
-
|
|
239
|
-
data-[orientation="horizontal"]:translate-x-[-50%]
|
|
240
|
-
data-[orientation="horizontal"]:transition-[left]
|
|
241
|
-
data-[orientation="horizontal"]:data-[dragging="true"]:transition-none
|
|
242
|
-
|
|
243
|
-
data-[orientation="vertical"]:translate-y-[50%]
|
|
244
|
-
data-[orientation="vertical"]:transition-[bottom]
|
|
245
|
-
data-[orientation="vertical"]:data-[dragging="true"]:transition-none
|
|
246
|
-
|
|
247
|
-
data-[focused="true"]:
|
|
248
|
-
data-[focused="true"]:ring-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
data-[invalid="true"]:
|
|
235
|
+
const sliderHandleThemeVariants = cva(`
|
|
236
|
+
absolute z-2 flex items-center justify-center
|
|
237
|
+
h-4.25 w-4.25
|
|
238
|
+
cursor-pointer
|
|
239
|
+
${themeRaisedSurfaceClasses}
|
|
240
|
+
border border-(--mona-slider-handle-border-color) shadow-(--shadow-control)
|
|
241
|
+
outline-none
|
|
242
|
+
transition duration-(--mona-motion-fast) ease-out
|
|
243
|
+
|
|
244
|
+
data-[orientation="horizontal"]:translate-x-[-50%]
|
|
245
|
+
data-[orientation="horizontal"]:transition-[left]
|
|
246
|
+
data-[orientation="horizontal"]:data-[dragging="true"]:transition-none
|
|
247
|
+
|
|
248
|
+
data-[orientation="vertical"]:translate-y-[50%]
|
|
249
|
+
data-[orientation="vertical"]:transition-[bottom]
|
|
250
|
+
data-[orientation="vertical"]:data-[dragging="true"]:transition-none
|
|
251
|
+
|
|
252
|
+
data-[focused="true"]:border-focus-indicator
|
|
253
|
+
data-[focused="true"]:ring-2
|
|
254
|
+
data-[focused="true"]:ring-focus-indicator/35
|
|
255
|
+
|
|
256
|
+
data-[invalid="true"]:border-error
|
|
257
|
+
data-[invalid="true"]:ring-2 data-[invalid="true"]:ring-error/35
|
|
258
|
+
data-[invalid="true"]:data-[focused="true"]:border-error
|
|
259
|
+
data-[invalid="true"]:data-[focused="true"]:ring-error/35
|
|
252
260
|
`, {
|
|
253
261
|
variants: {
|
|
254
262
|
rounded: {
|
|
@@ -261,75 +269,8 @@ const sliderHandleVariants = cva(`
|
|
|
261
269
|
}
|
|
262
270
|
});
|
|
263
271
|
|
|
264
|
-
const sliderBaseThemeVariants = (theme) => {
|
|
265
|
-
switch (theme) {
|
|
266
|
-
case "mona":
|
|
267
|
-
return sliderBaseVariants;
|
|
268
|
-
default:
|
|
269
|
-
return sliderBaseVariants; // Default to Mona styles
|
|
270
|
-
}
|
|
271
|
-
};
|
|
272
|
-
const sliderTrackThemeVariants = (theme) => {
|
|
273
|
-
switch (theme) {
|
|
274
|
-
case "mona":
|
|
275
|
-
return sliderTrackVariants;
|
|
276
|
-
default:
|
|
277
|
-
return sliderTrackVariants; // Default to Mona styles
|
|
278
|
-
}
|
|
279
|
-
};
|
|
280
|
-
const sliderSelectionThemeVariants = (theme) => {
|
|
281
|
-
switch (theme) {
|
|
282
|
-
case "mona":
|
|
283
|
-
return sliderSelectionVariants;
|
|
284
|
-
default:
|
|
285
|
-
return sliderSelectionVariants; // Default to Mona styles
|
|
286
|
-
}
|
|
287
|
-
};
|
|
288
|
-
const sliderTickListThemeVariants = (theme) => {
|
|
289
|
-
switch (theme) {
|
|
290
|
-
case "mona":
|
|
291
|
-
return sliderTickListVariants;
|
|
292
|
-
default:
|
|
293
|
-
return sliderTickListVariants; // Default to Mona styles
|
|
294
|
-
}
|
|
295
|
-
};
|
|
296
|
-
const sliderTickThemeVariants = (theme) => {
|
|
297
|
-
switch (theme) {
|
|
298
|
-
case "mona":
|
|
299
|
-
return sliderTickVariants;
|
|
300
|
-
default:
|
|
301
|
-
return sliderTickVariants; // Default to Mona styles
|
|
302
|
-
}
|
|
303
|
-
};
|
|
304
|
-
const sliderTickLabelListThemeVariants = (theme) => {
|
|
305
|
-
switch (theme) {
|
|
306
|
-
case "mona":
|
|
307
|
-
return sliderTickLabelListVariants;
|
|
308
|
-
default:
|
|
309
|
-
return sliderTickLabelListVariants; // Default to Mona styles
|
|
310
|
-
}
|
|
311
|
-
};
|
|
312
|
-
const sliderTickLabelThemeVariants = (theme) => {
|
|
313
|
-
switch (theme) {
|
|
314
|
-
case "mona":
|
|
315
|
-
return sliderTickLabelVariants;
|
|
316
|
-
default:
|
|
317
|
-
return sliderTickLabelVariants; // Default to Mona styles
|
|
318
|
-
}
|
|
319
|
-
};
|
|
320
|
-
const sliderHandleThemeVariants = (theme) => {
|
|
321
|
-
switch (theme) {
|
|
322
|
-
case "mona":
|
|
323
|
-
return sliderHandleVariants;
|
|
324
|
-
default:
|
|
325
|
-
return sliderHandleVariants; // Default to Mona styles
|
|
326
|
-
}
|
|
327
|
-
};
|
|
328
|
-
|
|
329
272
|
class SliderBaseComponent {
|
|
330
|
-
#themeService;
|
|
331
273
|
constructor() {
|
|
332
|
-
this.#themeService = inject(ThemeService);
|
|
333
274
|
this.destroyRef = inject(DestroyRef);
|
|
334
275
|
this.dragging = signal(false, /* @ts-ignore */
|
|
335
276
|
...(ngDevMode ? [{ debugName: "dragging" }] : /* istanbul ignore next */ []));
|
|
@@ -337,7 +278,7 @@ class SliderBaseComponent {
|
|
|
337
278
|
this.tickElements = viewChildren(SliderTickDirective, /* @ts-ignore */
|
|
338
279
|
...(ngDevMode ? [{ debugName: "tickElements" }] : /* istanbul ignore next */ []));
|
|
339
280
|
this.zone = inject(NgZone);
|
|
340
|
-
this.baseClasses = computed(() => sliderBaseThemeVariants(
|
|
281
|
+
this.baseClasses = computed(() => sliderBaseThemeVariants(), /* @ts-ignore */
|
|
341
282
|
...(ngDevMode ? [{ debugName: "baseClasses" }] : /* istanbul ignore next */ []));
|
|
342
283
|
this.effectiveDisabled = computed(() => this.disabled(), /* @ts-ignore */
|
|
343
284
|
...(ngDevMode ? [{ debugName: "effectiveDisabled" }] : /* istanbul ignore next */ []));
|
|
@@ -398,12 +339,12 @@ class SliderBaseComponent {
|
|
|
398
339
|
return typeof bg === "string" ? { background: bg } : bg;
|
|
399
340
|
}, /* @ts-ignore */
|
|
400
341
|
...(ngDevMode ? [{ debugName: "selectionBackgroundStyle" }] : /* istanbul ignore next */ []));
|
|
401
|
-
this.selectionClasses = computed(() => sliderSelectionThemeVariants(
|
|
342
|
+
this.selectionClasses = computed(() => sliderSelectionThemeVariants(), /* @ts-ignore */
|
|
402
343
|
...(ngDevMode ? [{ debugName: "selectionClasses" }] : /* istanbul ignore next */ []));
|
|
403
344
|
this.sliderHandleClasses = computed(() => {
|
|
404
345
|
const rounded = this.rounded();
|
|
405
346
|
const handleClasses = this.handleClasses();
|
|
406
|
-
const variants = sliderHandleThemeVariants(
|
|
347
|
+
const variants = sliderHandleThemeVariants({ rounded });
|
|
407
348
|
return twMerge(variants ?? "", Array.isArray(handleClasses) ? handleClasses.join(" ") : handleClasses);
|
|
408
349
|
}, /* @ts-ignore */
|
|
409
350
|
...(ngDevMode ? [{ debugName: "sliderHandleClasses" }] : /* istanbul ignore next */ []));
|
|
@@ -422,13 +363,13 @@ class SliderBaseComponent {
|
|
|
422
363
|
return `${number}px`;
|
|
423
364
|
}, /* @ts-ignore */
|
|
424
365
|
...(ngDevMode ? [{ debugName: "sliderTrackSize" }] : /* istanbul ignore next */ []));
|
|
425
|
-
this.tickClasses = computed(() => sliderTickThemeVariants(
|
|
366
|
+
this.tickClasses = computed(() => sliderTickThemeVariants(), /* @ts-ignore */
|
|
426
367
|
...(ngDevMode ? [{ debugName: "tickClasses" }] : /* istanbul ignore next */ []));
|
|
427
|
-
this.tickLabelClasses = computed(() => sliderTickLabelThemeVariants(
|
|
368
|
+
this.tickLabelClasses = computed(() => sliderTickLabelThemeVariants(), /* @ts-ignore */
|
|
428
369
|
...(ngDevMode ? [{ debugName: "tickLabelClasses" }] : /* istanbul ignore next */ []));
|
|
429
|
-
this.tickLabelListClasses = computed(() => sliderTickLabelListThemeVariants(
|
|
370
|
+
this.tickLabelListClasses = computed(() => sliderTickLabelListThemeVariants(), /* @ts-ignore */
|
|
430
371
|
...(ngDevMode ? [{ debugName: "tickLabelListClasses" }] : /* istanbul ignore next */ []));
|
|
431
|
-
this.tickListClasses = computed(() => sliderTickListThemeVariants(
|
|
372
|
+
this.tickListClasses = computed(() => sliderTickListThemeVariants(), /* @ts-ignore */
|
|
432
373
|
...(ngDevMode ? [{ debugName: "tickListClasses" }] : /* istanbul ignore next */ []));
|
|
433
374
|
this.tickStyleArgs = computed(() => {
|
|
434
375
|
const largeTickStep = this.largeTickStep();
|
|
@@ -464,7 +405,10 @@ class SliderBaseComponent {
|
|
|
464
405
|
return typeof bg === "string" ? { background: bg } : bg;
|
|
465
406
|
}, /* @ts-ignore */
|
|
466
407
|
...(ngDevMode ? [{ debugName: "trackBackgroundStyle" }] : /* istanbul ignore next */ []));
|
|
467
|
-
this.trackClasses = computed(() =>
|
|
408
|
+
this.trackClasses = computed(() => {
|
|
409
|
+
const rounded = this.rounded();
|
|
410
|
+
return sliderTrackThemeVariants({ rounded });
|
|
411
|
+
}, /* @ts-ignore */
|
|
468
412
|
...(ngDevMode ? [{ debugName: "trackClasses" }] : /* istanbul ignore next */ []));
|
|
469
413
|
/**
|
|
470
414
|
* @description Human-readable override for the `aria-valuenow` announcement. Pass a function that receives the current value and returns the string to announce.
|
|
@@ -786,7 +730,7 @@ class SliderComponent extends SliderBaseComponent {
|
|
|
786
730
|
});
|
|
787
731
|
}
|
|
788
732
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: SliderComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
789
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: SliderComponent, isStandalone: true, selector: "mona-slider", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledBy: { classPropertyName: "ariaLabelledBy", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, host: { listeners: { "focus": "focus()" }, properties: { "class": "baseClasses()", "class.mona-slider": "true", "attr.data-disabled": "effectiveDisabled() || null", "attr.data-orientation": "orientation()" } }, viewQueries: [{ propertyName: "sliderHandle", first: true, predicate: ["sliderHandle"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div\
|
|
733
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: SliderComponent, isStandalone: true, selector: "mona-slider", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledBy: { classPropertyName: "ariaLabelledBy", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, host: { listeners: { "focus": "focus()" }, properties: { "class": "baseClasses()", "class.mona-slider": "true", "attr.data-disabled": "effectiveDisabled() || null", "attr.data-orientation": "orientation()" } }, viewQueries: [{ propertyName: "sliderHandle", first: true, predicate: ["sliderHandle"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div\n [class]=\"trackClasses()\"\n [attr.data-orientation]=\"orientation()\"\n [style.height]=\"orientation() === 'horizontal' ? sliderTrackSize() : undefined\"\n [style.width]=\"orientation() === 'vertical' ? sliderTrackSize() : undefined\"\n [style]=\"trackBackgroundStyle()\">\n <div\n [class]=\"selectionClasses()\"\n [attr.data-orientation]=\"orientation()\"\n [attr.data-dragging]=\"dragging()\"\n [style.left.%]=\"orientation() === 'horizontal' ? selectionLeft() : undefined\"\n [style.right.%]=\"orientation() === 'horizontal' ? 100 - selectionRight() : undefined\"\n [style.bottom.%]=\"orientation() === 'vertical' ? selectionLeft() : undefined\"\n [style.top.%]=\"orientation() === 'vertical' ? 100 - selectionRight() : undefined\"\n [style]=\"selectionBackgroundStyle()\"></div>\n</div>\n@if (showTicks()) {\n <div [class]=\"tickListClasses()\" [attr.data-orientation]=\"orientation()\">\n @for (tick of renderTicks(); track tick.index) {\n <span\n [class]=\"tickClasses()\"\n [style]=\"tick | tickStyle: tickStyleArgs()\"\n [attr.data-orientation]=\"orientation()\"\n [attr.data-value]=\"tick.value\"\n monaSliderTick>\n </span>\n }\n </div>\n}\n@if (showTicks() && showLabels()) {\n <div\n [class]=\"tickLabelListClasses()\"\n [attr.data-orientation]=\"orientation()\"\n [attr.data-label-position]=\"labelPosition()\">\n @for (tick of labelTicks(); track tick.index) {\n <span\n [class]=\"tickLabelClasses()\"\n [attr.data-orientation]=\"orientation()\"\n [style]=\"tick | labelStyle: labelStyleArgs()\">\n @if (!tickValueTemplate()) {\n <span>{{ tick.value }}</span>\n } @else {\n <span>\n <ng-container\n *ngTemplateOutlet=\"\n tickValueTemplate() ?? null;\n context: { $implicit: tick.value }\n \"></ng-container>\n </span>\n }\n </span>\n }\n </div>\n}\n<div\n [class]=\"sliderHandleClasses()\"\n [attr.data-orientation]=\"orientation()\"\n [attr.data-dragging]=\"dragging()\"\n [attr.data-focused]=\"handleFocused()\"\n [style]=\"handleStyle()\"\n [style.left.%]=\"orientation() === 'horizontal' ? handlePosition() : undefined\"\n [style.bottom.%]=\"orientation() === 'vertical' ? handlePosition() : undefined\"\n [attr.tabindex]=\"effectiveDisabled() ? -1 : 0\"\n [attr.role]=\"'slider'\"\n [attr.aria-valuemin]=\"minValue()\"\n [attr.aria-valuemax]=\"maxValue()\"\n [attr.aria-valuenow]=\"normalizedValue()\"\n [attr.aria-valuetext]=\"ariaValueText() ? ariaValueText()!(normalizedValue()) : null\"\n [attr.aria-orientation]=\"orientation()\"\n [attr.aria-disabled]=\"effectiveDisabled() || null\"\n [attr.aria-invalid]=\"invalid() || null\"\n [attr.data-invalid]=\"invalid() || null\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledBy()\"\n #sliderHandle>\n @if (handleTemplate()) {\n <ng-container\n *ngTemplateOutlet=\"handleTemplate() ?? null; context: { $implicit: normalizedValue() }\"></ng-container>\n }\n</div>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: SliderTickDirective, selector: "span[monaSliderTick]" }, { kind: "pipe", type: LabelStylePipe, name: "labelStyle" }, { kind: "pipe", type: TickStylePipe, name: "tickStyle" }] }); }
|
|
790
734
|
}
|
|
791
735
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: SliderComponent, decorators: [{
|
|
792
736
|
type: Component,
|
|
@@ -796,7 +740,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
796
740
|
"[attr.data-disabled]": "effectiveDisabled() || null",
|
|
797
741
|
"[attr.data-orientation]": "orientation()",
|
|
798
742
|
"(focus)": "focus()"
|
|
799
|
-
}, template: "<div\
|
|
743
|
+
}, template: "<div\n [class]=\"trackClasses()\"\n [attr.data-orientation]=\"orientation()\"\n [style.height]=\"orientation() === 'horizontal' ? sliderTrackSize() : undefined\"\n [style.width]=\"orientation() === 'vertical' ? sliderTrackSize() : undefined\"\n [style]=\"trackBackgroundStyle()\">\n <div\n [class]=\"selectionClasses()\"\n [attr.data-orientation]=\"orientation()\"\n [attr.data-dragging]=\"dragging()\"\n [style.left.%]=\"orientation() === 'horizontal' ? selectionLeft() : undefined\"\n [style.right.%]=\"orientation() === 'horizontal' ? 100 - selectionRight() : undefined\"\n [style.bottom.%]=\"orientation() === 'vertical' ? selectionLeft() : undefined\"\n [style.top.%]=\"orientation() === 'vertical' ? 100 - selectionRight() : undefined\"\n [style]=\"selectionBackgroundStyle()\"></div>\n</div>\n@if (showTicks()) {\n <div [class]=\"tickListClasses()\" [attr.data-orientation]=\"orientation()\">\n @for (tick of renderTicks(); track tick.index) {\n <span\n [class]=\"tickClasses()\"\n [style]=\"tick | tickStyle: tickStyleArgs()\"\n [attr.data-orientation]=\"orientation()\"\n [attr.data-value]=\"tick.value\"\n monaSliderTick>\n </span>\n }\n </div>\n}\n@if (showTicks() && showLabels()) {\n <div\n [class]=\"tickLabelListClasses()\"\n [attr.data-orientation]=\"orientation()\"\n [attr.data-label-position]=\"labelPosition()\">\n @for (tick of labelTicks(); track tick.index) {\n <span\n [class]=\"tickLabelClasses()\"\n [attr.data-orientation]=\"orientation()\"\n [style]=\"tick | labelStyle: labelStyleArgs()\">\n @if (!tickValueTemplate()) {\n <span>{{ tick.value }}</span>\n } @else {\n <span>\n <ng-container\n *ngTemplateOutlet=\"\n tickValueTemplate() ?? null;\n context: { $implicit: tick.value }\n \"></ng-container>\n </span>\n }\n </span>\n }\n </div>\n}\n<div\n [class]=\"sliderHandleClasses()\"\n [attr.data-orientation]=\"orientation()\"\n [attr.data-dragging]=\"dragging()\"\n [attr.data-focused]=\"handleFocused()\"\n [style]=\"handleStyle()\"\n [style.left.%]=\"orientation() === 'horizontal' ? handlePosition() : undefined\"\n [style.bottom.%]=\"orientation() === 'vertical' ? handlePosition() : undefined\"\n [attr.tabindex]=\"effectiveDisabled() ? -1 : 0\"\n [attr.role]=\"'slider'\"\n [attr.aria-valuemin]=\"minValue()\"\n [attr.aria-valuemax]=\"maxValue()\"\n [attr.aria-valuenow]=\"normalizedValue()\"\n [attr.aria-valuetext]=\"ariaValueText() ? ariaValueText()!(normalizedValue()) : null\"\n [attr.aria-orientation]=\"orientation()\"\n [attr.aria-disabled]=\"effectiveDisabled() || null\"\n [attr.aria-invalid]=\"invalid() || null\"\n [attr.data-invalid]=\"invalid() || null\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledBy()\"\n #sliderHandle>\n @if (handleTemplate()) {\n <ng-container\n *ngTemplateOutlet=\"handleTemplate() ?? null; context: { $implicit: normalizedValue() }\"></ng-container>\n }\n</div>\n" }]
|
|
800
744
|
}], propDecorators: { sliderHandle: [{ type: i0.ViewChild, args: ["sliderHandle", { isSignal: true }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }], ariaLabelledBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-labelledby", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }] } });
|
|
801
745
|
|
|
802
746
|
class RangeSliderComponent extends SliderBaseComponent {
|
|
@@ -1024,7 +968,7 @@ class RangeSliderComponent extends SliderBaseComponent {
|
|
|
1024
968
|
});
|
|
1025
969
|
}
|
|
1026
970
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: RangeSliderComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1027
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: RangeSliderComponent, isStandalone: true, selector: "mona-range-slider", inputs: { ariaLabelEnd: { classPropertyName: "ariaLabelEnd", publicName: "aria-label-end", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelStart: { classPropertyName: "ariaLabelStart", publicName: "aria-label-start", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, host: { listeners: { "focus": "focus()" }, properties: { "class": "baseClasses()", "class.mona-slider": "true", "attr.data-disabled": "effectiveDisabled()", "attr.data-orientation": "orientation()" } }, viewQueries: [{ propertyName: "secondarySliderHandle", first: true, predicate: ["secondarySliderHandle"], descendants: true, isSignal: true }, { propertyName: "sliderHandle", first: true, predicate: ["sliderHandle"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div\
|
|
971
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: RangeSliderComponent, isStandalone: true, selector: "mona-range-slider", inputs: { ariaLabelEnd: { classPropertyName: "ariaLabelEnd", publicName: "aria-label-end", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelStart: { classPropertyName: "ariaLabelStart", publicName: "aria-label-start", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, host: { listeners: { "focus": "focus()" }, properties: { "class": "baseClasses()", "class.mona-slider": "true", "attr.data-disabled": "effectiveDisabled()", "attr.data-orientation": "orientation()" } }, viewQueries: [{ propertyName: "secondarySliderHandle", first: true, predicate: ["secondarySliderHandle"], descendants: true, isSignal: true }, { propertyName: "sliderHandle", first: true, predicate: ["sliderHandle"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div\n [class]=\"trackClasses()\"\n [attr.data-orientation]=\"orientation()\"\n [style.height]=\"orientation() === 'horizontal' ? sliderTrackSize() : undefined\"\n [style.width]=\"orientation() === 'vertical' ? sliderTrackSize() : undefined\"\n [style]=\"trackBackgroundStyle()\">\n <div\n [class]=\"selectionClasses()\"\n [attr.data-orientation]=\"orientation()\"\n [attr.data-dragging]=\"dragging()\"\n [style.left.%]=\"orientation() === 'horizontal' ? selectionLeft() : undefined\"\n [style.right.%]=\"orientation() === 'horizontal' ? 100 - selectionRight() : undefined\"\n [style.bottom.%]=\"orientation() === 'vertical' ? selectionLeft() : undefined\"\n [style.top.%]=\"orientation() === 'vertical' ? 100 - selectionRight() : undefined\"\n [style]=\"selectionBackgroundStyle()\"></div>\n</div>\n@if (showTicks()) {\n <div [class]=\"tickListClasses()\" [attr.data-orientation]=\"orientation()\">\n @for (tick of renderTicks(); track tick.index) {\n <span\n [class]=\"tickClasses()\"\n [style]=\"tick | tickStyle: tickStyleArgs()\"\n [attr.data-orientation]=\"orientation()\"\n [attr.data-value]=\"tick.value\"\n monaSliderTick>\n </span>\n }\n </div>\n}\n@if (showTicks() && showLabels()) {\n <div\n [class]=\"tickLabelListClasses()\"\n [attr.data-orientation]=\"orientation()\"\n [attr.data-label-position]=\"labelPosition()\">\n @for (tick of labelTicks(); track tick.index) {\n <span\n [class]=\"tickLabelClasses()\"\n [attr.data-orientation]=\"orientation()\"\n [style]=\"tick | labelStyle: labelStyleArgs()\">\n @if (!tickValueTemplate()) {\n <span>{{ tick.value }}</span>\n } @else {\n <span>\n <ng-container\n *ngTemplateOutlet=\"\n tickValueTemplate() ?? null;\n context: { $implicit: tick.value }\n \"></ng-container>\n </span>\n }\n </span>\n }\n </div>\n}\n<div\n [class]=\"sliderHandleClasses()\"\n [attr.data-orientation]=\"orientation()\"\n [attr.data-dragging]=\"dragging()\"\n [attr.data-focused]=\"primaryHandleFocused()\"\n [style]=\"primaryHandleStyle()\"\n [style.left.%]=\"orientation() === 'horizontal' ? primaryHandlePosition() : undefined\"\n [style.bottom.%]=\"orientation() === 'vertical' ? primaryHandlePosition() : undefined\"\n [attr.tabindex]=\"effectiveDisabled() ? -1 : 0\"\n [attr.role]=\"'slider'\"\n [attr.aria-valuemin]=\"minValue()\"\n [attr.aria-valuemax]=\"maxValue()\"\n [attr.aria-valuenow]=\"normalizedValue()[0]\"\n [attr.aria-valuetext]=\"ariaValueText() ? ariaValueText()!(normalizedValue()[0]) : null\"\n [attr.aria-orientation]=\"orientation()\"\n [attr.aria-disabled]=\"effectiveDisabled() || null\"\n [attr.aria-invalid]=\"invalid() || null\"\n [attr.data-invalid]=\"invalid() || null\"\n [attr.aria-label]=\"ariaLabelStart()\"\n #sliderHandle>\n @if (handleTemplate()) {\n <ng-container\n *ngTemplateOutlet=\"handleTemplate() ?? null; context: { $implicit: normalizedValue()[0] }\"></ng-container>\n }\n</div>\n<div\n [class]=\"sliderHandleClasses()\"\n [attr.data-orientation]=\"orientation()\"\n [attr.data-dragging]=\"dragging()\"\n [attr.data-focused]=\"secondaryHandleFocused()\"\n [style]=\"secondaryHandleStyle()\"\n [style.left.%]=\"orientation() === 'horizontal' ? secondaryHandlePosition() : undefined\"\n [style.bottom.%]=\"orientation() === 'vertical' ? secondaryHandlePosition() : undefined\"\n [attr.tabindex]=\"effectiveDisabled() ? -1 : 0\"\n [attr.role]=\"'slider'\"\n [attr.aria-valuemin]=\"minValue()\"\n [attr.aria-valuemax]=\"maxValue()\"\n [attr.aria-valuenow]=\"normalizedValue()[1]\"\n [attr.aria-valuetext]=\"ariaValueText() ? ariaValueText()!(normalizedValue()[1]) : null\"\n [attr.aria-orientation]=\"orientation()\"\n [attr.aria-disabled]=\"effectiveDisabled() || null\"\n [attr.aria-invalid]=\"invalid() || null\"\n [attr.data-invalid]=\"invalid() || null\"\n [attr.aria-label]=\"ariaLabelEnd()\"\n #secondarySliderHandle>\n @if (handleTemplate()) {\n <ng-container\n *ngTemplateOutlet=\"handleTemplate() ?? null; context: { $implicit: normalizedValue()[1] }\"></ng-container>\n }\n</div>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: SliderTickDirective, selector: "span[monaSliderTick]" }, { kind: "pipe", type: LabelStylePipe, name: "labelStyle" }, { kind: "pipe", type: TickStylePipe, name: "tickStyle" }] }); }
|
|
1028
972
|
}
|
|
1029
973
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: RangeSliderComponent, decorators: [{
|
|
1030
974
|
type: Component,
|
|
@@ -1034,7 +978,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
1034
978
|
"[attr.data-disabled]": "effectiveDisabled()",
|
|
1035
979
|
"[attr.data-orientation]": "orientation()",
|
|
1036
980
|
"(focus)": "focus()"
|
|
1037
|
-
}, template: "<div\
|
|
981
|
+
}, template: "<div\n [class]=\"trackClasses()\"\n [attr.data-orientation]=\"orientation()\"\n [style.height]=\"orientation() === 'horizontal' ? sliderTrackSize() : undefined\"\n [style.width]=\"orientation() === 'vertical' ? sliderTrackSize() : undefined\"\n [style]=\"trackBackgroundStyle()\">\n <div\n [class]=\"selectionClasses()\"\n [attr.data-orientation]=\"orientation()\"\n [attr.data-dragging]=\"dragging()\"\n [style.left.%]=\"orientation() === 'horizontal' ? selectionLeft() : undefined\"\n [style.right.%]=\"orientation() === 'horizontal' ? 100 - selectionRight() : undefined\"\n [style.bottom.%]=\"orientation() === 'vertical' ? selectionLeft() : undefined\"\n [style.top.%]=\"orientation() === 'vertical' ? 100 - selectionRight() : undefined\"\n [style]=\"selectionBackgroundStyle()\"></div>\n</div>\n@if (showTicks()) {\n <div [class]=\"tickListClasses()\" [attr.data-orientation]=\"orientation()\">\n @for (tick of renderTicks(); track tick.index) {\n <span\n [class]=\"tickClasses()\"\n [style]=\"tick | tickStyle: tickStyleArgs()\"\n [attr.data-orientation]=\"orientation()\"\n [attr.data-value]=\"tick.value\"\n monaSliderTick>\n </span>\n }\n </div>\n}\n@if (showTicks() && showLabels()) {\n <div\n [class]=\"tickLabelListClasses()\"\n [attr.data-orientation]=\"orientation()\"\n [attr.data-label-position]=\"labelPosition()\">\n @for (tick of labelTicks(); track tick.index) {\n <span\n [class]=\"tickLabelClasses()\"\n [attr.data-orientation]=\"orientation()\"\n [style]=\"tick | labelStyle: labelStyleArgs()\">\n @if (!tickValueTemplate()) {\n <span>{{ tick.value }}</span>\n } @else {\n <span>\n <ng-container\n *ngTemplateOutlet=\"\n tickValueTemplate() ?? null;\n context: { $implicit: tick.value }\n \"></ng-container>\n </span>\n }\n </span>\n }\n </div>\n}\n<div\n [class]=\"sliderHandleClasses()\"\n [attr.data-orientation]=\"orientation()\"\n [attr.data-dragging]=\"dragging()\"\n [attr.data-focused]=\"primaryHandleFocused()\"\n [style]=\"primaryHandleStyle()\"\n [style.left.%]=\"orientation() === 'horizontal' ? primaryHandlePosition() : undefined\"\n [style.bottom.%]=\"orientation() === 'vertical' ? primaryHandlePosition() : undefined\"\n [attr.tabindex]=\"effectiveDisabled() ? -1 : 0\"\n [attr.role]=\"'slider'\"\n [attr.aria-valuemin]=\"minValue()\"\n [attr.aria-valuemax]=\"maxValue()\"\n [attr.aria-valuenow]=\"normalizedValue()[0]\"\n [attr.aria-valuetext]=\"ariaValueText() ? ariaValueText()!(normalizedValue()[0]) : null\"\n [attr.aria-orientation]=\"orientation()\"\n [attr.aria-disabled]=\"effectiveDisabled() || null\"\n [attr.aria-invalid]=\"invalid() || null\"\n [attr.data-invalid]=\"invalid() || null\"\n [attr.aria-label]=\"ariaLabelStart()\"\n #sliderHandle>\n @if (handleTemplate()) {\n <ng-container\n *ngTemplateOutlet=\"handleTemplate() ?? null; context: { $implicit: normalizedValue()[0] }\"></ng-container>\n }\n</div>\n<div\n [class]=\"sliderHandleClasses()\"\n [attr.data-orientation]=\"orientation()\"\n [attr.data-dragging]=\"dragging()\"\n [attr.data-focused]=\"secondaryHandleFocused()\"\n [style]=\"secondaryHandleStyle()\"\n [style.left.%]=\"orientation() === 'horizontal' ? secondaryHandlePosition() : undefined\"\n [style.bottom.%]=\"orientation() === 'vertical' ? secondaryHandlePosition() : undefined\"\n [attr.tabindex]=\"effectiveDisabled() ? -1 : 0\"\n [attr.role]=\"'slider'\"\n [attr.aria-valuemin]=\"minValue()\"\n [attr.aria-valuemax]=\"maxValue()\"\n [attr.aria-valuenow]=\"normalizedValue()[1]\"\n [attr.aria-valuetext]=\"ariaValueText() ? ariaValueText()!(normalizedValue()[1]) : null\"\n [attr.aria-orientation]=\"orientation()\"\n [attr.aria-disabled]=\"effectiveDisabled() || null\"\n [attr.aria-invalid]=\"invalid() || null\"\n [attr.data-invalid]=\"invalid() || null\"\n [attr.aria-label]=\"ariaLabelEnd()\"\n #secondarySliderHandle>\n @if (handleTemplate()) {\n <ng-container\n *ngTemplateOutlet=\"handleTemplate() ?? null; context: { $implicit: normalizedValue()[1] }\"></ng-container>\n }\n</div>\n" }]
|
|
1038
982
|
}], propDecorators: { secondarySliderHandle: [{ type: i0.ViewChild, args: ["secondarySliderHandle", { isSignal: true }] }], sliderHandle: [{ type: i0.ViewChild, args: ["sliderHandle", { isSignal: true }] }], ariaLabelEnd: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label-end", required: false }] }], ariaLabelStart: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label-start", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }] } });
|
|
1039
983
|
|
|
1040
984
|
/*
|