@tacdaed/fragments 1.0.0-beta.4 → 1.0.0-beta.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -11
- package/assets/styles/scss/_all.scss +0 -1
- package/fesm2022/tacdaed-fragments.mjs +8928 -0
- package/index.d.ts +3929 -0
- package/package.json +34 -22
- package/assets/resources/fonts/OpenSans/OpenSans-Italic-VariableFont_wdth_wght.ttf +0 -0
- package/assets/resources/fonts/OpenSans/OpenSans-VariableFont_wdth_wght.ttf +0 -0
- package/assets/resources/fonts/Roboto/Roboto-Black.ttf +0 -0
- package/assets/resources/fonts/Roboto/Roboto-BlackItalic.ttf +0 -0
- package/assets/resources/fonts/Roboto/Roboto-Bold.ttf +0 -0
- package/assets/resources/fonts/Roboto/Roboto-BoldItalic.ttf +0 -0
- package/assets/resources/fonts/Roboto/Roboto-Italic.ttf +0 -0
- package/assets/resources/fonts/Roboto/Roboto-Light.ttf +0 -0
- package/assets/resources/fonts/Roboto/Roboto-LightItalic.ttf +0 -0
- package/assets/resources/fonts/Roboto/Roboto-Medium.ttf +0 -0
- package/assets/resources/fonts/Roboto/Roboto-MediumItalic.ttf +0 -0
- package/assets/resources/fonts/Roboto/Roboto-Regular.ttf +0 -0
- package/assets/resources/fonts/Roboto/Roboto-Thin.ttf +0 -0
- package/assets/resources/fonts/Roboto/Roboto-ThinItalic.ttf +0 -0
- package/assets/styles/scss/_fonts.scss +0 -122
- package/ng-package.json +0 -20
- package/src/lib/components/accordion/accordion.component.html +0 -103
- package/src/lib/components/accordion/accordion.component.scss +0 -382
- package/src/lib/components/accordion/accordion.component.spec.ts +0 -147
- package/src/lib/components/accordion/accordion.component.ts +0 -211
- package/src/lib/components/accordion/accordion.type.ts +0 -82
- package/src/lib/components/breadcrumb/breadcrumb.component.html +0 -43
- package/src/lib/components/breadcrumb/breadcrumb.component.scss +0 -112
- package/src/lib/components/breadcrumb/breadcrumb.component.spec.ts +0 -33
- package/src/lib/components/breadcrumb/breadcrumb.component.ts +0 -103
- package/src/lib/components/breadcrumb/breadcrumb.interface.ts +0 -7
- package/src/lib/components/button/button.component.html +0 -57
- package/src/lib/components/button/button.component.scss +0 -445
- package/src/lib/components/button/button.component.spec.ts +0 -99
- package/src/lib/components/button/button.component.ts +0 -143
- package/src/lib/components/button/button.type.ts +0 -7
- package/src/lib/components/card/card.component.html +0 -44
- package/src/lib/components/card/card.component.scss +0 -114
- package/src/lib/components/card/card.component.spec.ts +0 -65
- package/src/lib/components/card/card.component.ts +0 -21
- package/src/lib/components/card/card.type.ts +0 -3
- package/src/lib/components/code-block/code-block.component.html +0 -55
- package/src/lib/components/code-block/code-block.component.scss +0 -122
- package/src/lib/components/code-block/code-block.component.spec.ts +0 -81
- package/src/lib/components/code-block/code-block.component.ts +0 -302
- package/src/lib/components/code-block/code-block.interface.ts +0 -28
- package/src/lib/components/code-block/code-block.type.ts +0 -73
- package/src/lib/components/decorative/sparkle-field/sparkle-field.component.html +0 -14
- package/src/lib/components/decorative/sparkle-field/sparkle-field.component.scss +0 -20
- package/src/lib/components/decorative/sparkle-field/sparkle-field.component.spec.ts +0 -38
- package/src/lib/components/decorative/sparkle-field/sparkle-field.component.ts +0 -181
- package/src/lib/components/input/input-base.ts +0 -187
- package/src/lib/components/input/input-calendar/input-calendar.component.html +0 -76
- package/src/lib/components/input/input-calendar/input-calendar.component.scss +0 -179
- package/src/lib/components/input/input-calendar/input-calendar.component.spec.ts +0 -44
- package/src/lib/components/input/input-calendar/input-calendar.component.ts +0 -299
- package/src/lib/components/input/input-checkbox/input-checkbox.component.html +0 -37
- package/src/lib/components/input/input-checkbox/input-checkbox.component.scss +0 -128
- package/src/lib/components/input/input-checkbox/input-checkbox.component.spec.ts +0 -43
- package/src/lib/components/input/input-checkbox/input-checkbox.component.ts +0 -112
- package/src/lib/components/input/input-checkbox-group/input-checkbox-group.component.html +0 -43
- package/src/lib/components/input/input-checkbox-group/input-checkbox-group.component.scss +0 -140
- package/src/lib/components/input/input-checkbox-group/input-checkbox-group.component.spec.ts +0 -62
- package/src/lib/components/input/input-checkbox-group/input-checkbox-group.component.ts +0 -136
- package/src/lib/components/input/input-clock-picker/input-clock-picker.component.html +0 -81
- package/src/lib/components/input/input-clock-picker/input-clock-picker.component.scss +0 -228
- package/src/lib/components/input/input-clock-picker/input-clock-picker.component.spec.ts +0 -62
- package/src/lib/components/input/input-clock-picker/input-clock-picker.component.ts +0 -178
- package/src/lib/components/input/input-consts.ts +0 -132
- package/src/lib/components/input/input-date/input-date-validators.ts +0 -41
- package/src/lib/components/input/input-date/input-date.component.html +0 -41
- package/src/lib/components/input/input-date/input-date.component.scss +0 -95
- package/src/lib/components/input/input-date/input-date.component.spec.ts +0 -43
- package/src/lib/components/input/input-date/input-date.component.ts +0 -359
- package/src/lib/components/input/input-date-time/input-date-time.component.html +0 -70
- package/src/lib/components/input/input-date-time/input-date-time.component.scss +0 -133
- package/src/lib/components/input/input-date-time/input-date-time.component.spec.ts +0 -36
- package/src/lib/components/input/input-date-time/input-date-time.component.ts +0 -387
- package/src/lib/components/input/input-file-upload/input-file-upload.component.html +0 -89
- package/src/lib/components/input/input-file-upload/input-file-upload.component.scss +0 -171
- package/src/lib/components/input/input-file-upload/input-file-upload.component.spec.ts +0 -43
- package/src/lib/components/input/input-file-upload/input-file-upload.component.ts +0 -351
- package/src/lib/components/input/input-interface.ts +0 -8
- package/src/lib/components/input/input-number/input-number-validators.ts +0 -0
- package/src/lib/components/input/input-number/input-number.component.html +0 -51
- package/src/lib/components/input/input-number/input-number.component.scss +0 -140
- package/src/lib/components/input/input-number/input-number.component.spec.ts +0 -44
- package/src/lib/components/input/input-number/input-number.component.ts +0 -343
- package/src/lib/components/input/input-radio-group/input-radio-group.component.html +0 -44
- package/src/lib/components/input/input-radio-group/input-radio-group.component.scss +0 -139
- package/src/lib/components/input/input-radio-group/input-radio-group.component.spec.ts +0 -58
- package/src/lib/components/input/input-radio-group/input-radio-group.component.ts +0 -132
- package/src/lib/components/input/input-slider/input-slider.component.html +0 -111
- package/src/lib/components/input/input-slider/input-slider.component.scss +0 -203
- package/src/lib/components/input/input-slider/input-slider.component.spec.ts +0 -46
- package/src/lib/components/input/input-slider/input-slider.component.ts +0 -410
- package/src/lib/components/input/input-text/input-text-validators.ts +0 -67
- package/src/lib/components/input/input-text/input-text.component.html +0 -71
- package/src/lib/components/input/input-text/input-text.component.scss +0 -118
- package/src/lib/components/input/input-text/input-text.component.spec.ts +0 -55
- package/src/lib/components/input/input-text/input-text.component.ts +0 -215
- package/src/lib/components/input/input-time/input-time-validators.ts +0 -42
- package/src/lib/components/input/input-time/input-time.component.html +0 -92
- package/src/lib/components/input/input-time/input-time.component.scss +0 -191
- package/src/lib/components/input/input-time/input-time.component.spec.ts +0 -39
- package/src/lib/components/input/input-time/input-time.component.ts +0 -691
- package/src/lib/components/input/input-toggle-switch/input-toggle-switch.component.html +0 -36
- package/src/lib/components/input/input-toggle-switch/input-toggle-switch.component.scss +0 -121
- package/src/lib/components/input/input-toggle-switch/input-toggle-switch.component.spec.ts +0 -54
- package/src/lib/components/input/input-toggle-switch/input-toggle-switch.component.ts +0 -117
- package/src/lib/components/input/input-type.ts +0 -18
- package/src/lib/components/input/input-validation/input-validation.component.html +0 -19
- package/src/lib/components/input/input-validation/input-validation.component.scss +0 -39
- package/src/lib/components/input/input-validation/input-validation.component.spec.ts +0 -45
- package/src/lib/components/input/input-validation/input-validation.component.ts +0 -13
- package/src/lib/components/input/input.pipe.ts +0 -14
- package/src/lib/components/layout/container/container.component.html +0 -1
- package/src/lib/components/layout/container/container.component.scss +0 -33
- package/src/lib/components/layout/container/container.component.ts +0 -32
- package/src/lib/components/layout/container/container.type.ts +0 -1
- package/src/lib/components/layout/divider/divider.component.html +0 -1
- package/src/lib/components/layout/divider/divider.component.scss +0 -60
- package/src/lib/components/layout/divider/divider.component.ts +0 -38
- package/src/lib/components/layout/divider/divider.type.ts +0 -2
- package/src/lib/components/layout/section/section.component.html +0 -21
- package/src/lib/components/layout/section/section.component.scss +0 -43
- package/src/lib/components/layout/section/section.component.ts +0 -33
- package/src/lib/components/layout/section/section.type.ts +0 -2
- package/src/lib/components/layout/separator/separator.component.html +0 -9
- package/src/lib/components/layout/separator/separator.component.scss +0 -52
- package/src/lib/components/layout/separator/separator.component.ts +0 -25
- package/src/lib/components/layout/separator/separator.type.ts +0 -1
- package/src/lib/components/loader/content-blur/content-blur.component.html +0 -13
- package/src/lib/components/loader/content-blur/content-blur.component.scss +0 -43
- package/src/lib/components/loader/content-blur/content-blur.component.spec.ts +0 -42
- package/src/lib/components/loader/content-blur/content-blur.component.ts +0 -34
- package/src/lib/components/loader/loader.type.ts +0 -2
- package/src/lib/components/loader/progress-bar/progress-bar.component.html +0 -26
- package/src/lib/components/loader/progress-bar/progress-bar.component.scss +0 -151
- package/src/lib/components/loader/progress-bar/progress-bar.component.spec.ts +0 -47
- package/src/lib/components/loader/progress-bar/progress-bar.component.ts +0 -28
- package/src/lib/components/loader/progress-bar/progress-bar.type.ts +0 -8
- package/src/lib/components/loader/pulse-loader/pulse-loader.component.html +0 -12
- package/src/lib/components/loader/pulse-loader/pulse-loader.component.scss +0 -202
- package/src/lib/components/loader/pulse-loader/pulse-loader.component.spec.ts +0 -55
- package/src/lib/components/loader/pulse-loader/pulse-loader.component.ts +0 -73
- package/src/lib/components/loader/pulse-loader/pulse-loader.type.ts +0 -6
- package/src/lib/components/loader/skeleton-loader/skeleton-loader.component.html +0 -13
- package/src/lib/components/loader/skeleton-loader/skeleton-loader.component.scss +0 -113
- package/src/lib/components/loader/skeleton-loader/skeleton-loader.component.spec.ts +0 -37
- package/src/lib/components/loader/skeleton-loader/skeleton-loader.component.ts +0 -51
- package/src/lib/components/loader/skeleton-loader/skeleton-loader.type.ts +0 -6
- package/src/lib/components/loader/spinner/spinner.component.html +0 -20
- package/src/lib/components/loader/spinner/spinner.component.scss +0 -137
- package/src/lib/components/loader/spinner/spinner.component.spec.ts +0 -43
- package/src/lib/components/loader/spinner/spinner.component.ts +0 -32
- package/src/lib/components/loader/spinner/spinner.type.ts +0 -6
- package/src/lib/components/modal/modal.component.html +0 -47
- package/src/lib/components/modal/modal.component.scss +0 -139
- package/src/lib/components/modal/modal.component.spec.ts +0 -60
- package/src/lib/components/modal/modal.component.ts +0 -83
- package/src/lib/components/modal/modal.type.ts +0 -9
- package/src/lib/components/morph/blob-moph/blob-moprh.component.spec.ts +0 -79
- package/src/lib/components/morph/blob-moph/blob-moprh.component.ts +0 -96
- package/src/lib/components/morph/blob-moph/blob-morph.component.html +0 -34
- package/src/lib/components/morph/blob-moph/blob-morph.component.scss +0 -7
- package/src/lib/components/morph/morph.abstract.ts +0 -13
- package/src/lib/components/pagination/pagination.interface.ts +0 -4
- package/src/lib/components/pagination/small-pagination/small-pagination.component.html +0 -61
- package/src/lib/components/pagination/small-pagination/small-pagination.component.scss +0 -187
- package/src/lib/components/pagination/small-pagination/small-pagination.component.spec.ts +0 -88
- package/src/lib/components/pagination/small-pagination/small-pagination.component.ts +0 -177
- package/src/lib/components/selection-lists/multi-select/multi-select.component.html +0 -170
- package/src/lib/components/selection-lists/multi-select/multi-select.component.scss +0 -312
- package/src/lib/components/selection-lists/multi-select/multi-select.component.spec.ts +0 -61
- package/src/lib/components/selection-lists/multi-select/multi-select.component.ts +0 -372
- package/src/lib/components/selection-lists/selection-list/selection-list.component.html +0 -125
- package/src/lib/components/selection-lists/selection-list/selection-list.component.scss +0 -267
- package/src/lib/components/selection-lists/selection-list/selection-list.component.spec.ts +0 -66
- package/src/lib/components/selection-lists/selection-list/selection-list.component.ts +0 -315
- package/src/lib/components/selection-lists/selection-lists-base.ts +0 -35
- package/src/lib/components/selection-lists/selection-lists-const.ts +0 -17
- package/src/lib/components/selection-lists/selection-lists-interface.ts +0 -7
- package/src/lib/components/selection-lists/selection-lists.type.ts +0 -1
- package/src/lib/components/side-nav/side-nav.component.html +0 -101
- package/src/lib/components/side-nav/side-nav.component.scss +0 -295
- package/src/lib/components/side-nav/side-nav.component.spec.ts +0 -0
- package/src/lib/components/side-nav/side-nav.component.ts +0 -18
- package/src/lib/components/side-nav/side-nav.type.ts +0 -28
- package/src/lib/components/snackbar/snackbar.component.html +0 -33
- package/src/lib/components/snackbar/snackbar.component.scss +0 -195
- package/src/lib/components/snackbar/snackbar.component.ts +0 -112
- package/src/lib/components/snackbar/snackbar.type.ts +0 -27
- package/src/lib/components/status/chip/chip.component.html +0 -51
- package/src/lib/components/status/chip/chip.component.scss +0 -149
- package/src/lib/components/status/chip/chip.component.spec.ts +0 -62
- package/src/lib/components/status/chip/chip.component.ts +0 -83
- package/src/lib/components/status/chip/chip.type.ts +0 -42
- package/src/lib/components/status/directives/badge/badge.directive.spec.ts +0 -60
- package/src/lib/components/status/directives/badge/badge.directive.ts +0 -190
- package/src/lib/components/status/directives/badge/badge.interface.ts +0 -19
- package/src/lib/components/status/pill/pill.component.html +0 -40
- package/src/lib/components/status/pill/pill.component.scss +0 -113
- package/src/lib/components/status/pill/pill.component.spec.ts +0 -47
- package/src/lib/components/status/pill/pill.component.ts +0 -83
- package/src/lib/components/status/pill/pill.type.ts +0 -42
- package/src/lib/components/status/status.interface.ts +0 -57
- package/src/lib/components/status/status.type.ts +0 -62
- package/src/lib/components/status/tag/tag.component.html +0 -39
- package/src/lib/components/status/tag/tag.component.scss +0 -140
- package/src/lib/components/status/tag/tag.component.spec.ts +0 -47
- package/src/lib/components/status/tag/tag.component.ts +0 -83
- package/src/lib/components/status/tag/tag.type.ts +0 -42
- package/src/lib/components/stepper/stepper.component.html +0 -83
- package/src/lib/components/stepper/stepper.component.scss +0 -196
- package/src/lib/components/stepper/stepper.component.ts +0 -482
- package/src/lib/components/stepper/stepper.type.ts +0 -60
- package/src/lib/components/table/table.component.html +0 -438
- package/src/lib/components/table/table.component.scss +0 -259
- package/src/lib/components/table/table.component.spec.ts +0 -117
- package/src/lib/components/table/table.component.ts +0 -215
- package/src/lib/components/table/table.enum.ts +0 -4
- package/src/lib/components/table/table.function.ts +0 -47
- package/src/lib/components/table/table.interface.ts +0 -143
- package/src/lib/components/table/table.pipe.ts +0 -62
- package/src/lib/components/table/table.type.ts +0 -15
- package/src/lib/components/tabs/tabs.component.html +0 -88
- package/src/lib/components/tabs/tabs.component.scss +0 -305
- package/src/lib/components/tabs/tabs.component.spec.ts +0 -94
- package/src/lib/components/tabs/tabs.component.ts +0 -282
- package/src/lib/components/tabs/tabs.type.ts +0 -81
- package/src/lib/components/title-bar/title-bar.component.html +0 -21
- package/src/lib/components/title-bar/title-bar.component.scss +0 -139
- package/src/lib/components/title-bar/title-bar.component.spec.ts +0 -44
- package/src/lib/components/title-bar/title-bar.component.ts +0 -13
- package/src/lib/components/toast/toast.component.html +0 -36
- package/src/lib/components/toast/toast.component.scss +0 -241
- package/src/lib/components/toast/toast.component.ts +0 -165
- package/src/lib/components/toast/toast.type.ts +0 -37
- package/src/lib/components/toast-stack/toast-stack.component.html +0 -30
- package/src/lib/components/toast-stack/toast-stack.component.scss +0 -35
- package/src/lib/components/toast-stack/toast-stack.component.ts +0 -51
- package/src/lib/consts/country-prefix.ts +0 -244
- package/src/lib/directives/tooltip/popover.directive.ts +0 -274
- package/src/lib/directives/tooltip/tooltip.directive.spec.ts +0 -86
- package/src/lib/directives/tooltip/tooltip.directive.ts +0 -234
- package/src/lib/directives/tooltip/tooltip.interface.ts +0 -29
- package/src/lib/directives/tooltip/tooltip.type.ts +0 -9
- package/src/lib/interfaces/common.interfaces.ts +0 -4
- package/src/lib/pipes/chunk.pipe.ts +0 -16
- package/src/lib/pipes/safe-html.pipe.ts +0 -14
- package/src/lib/pipes/sanitize-html.pipe.ts +0 -23
- package/src/lib/types/base.types.ts +0 -23
- package/src/lib/types/common.types.ts +0 -98
- package/src/lib/types/form.types.ts +0 -5
- package/src/lib/utils/common.utils.ts +0 -53
- package/src/lib/utils/date.utils.ts +0 -474
- package/src/lib/utils/number.utils.ts +0 -16
- package/src/lib/utils/uuid.utils.ts +0 -39
- package/src/public-api.ts +0 -114
- package/tsconfig.lib.json +0 -17
- package/tsconfig.lib.prod.json +0 -10
- package/tsconfig.spec.json +0 -9
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
<div class="frg-input__wrapper"
|
|
2
|
-
[class.input-error]="hasError"
|
|
3
|
-
[class.input-warning]="hasWarning"
|
|
4
|
-
[class.is-disabled]="disabled"
|
|
5
|
-
>
|
|
6
|
-
@if(label){
|
|
7
|
-
<label [attr.id]="id + '-label'" [for]="id">{{ label | inputRequiredLabel: required }}</label>
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
@if(showValue){
|
|
11
|
-
<div class="frg-slider__values">
|
|
12
|
-
@if(showRange){
|
|
13
|
-
<span>{{ displayRangeMin }}</span>
|
|
14
|
-
<span>{{ displayRangeMax }}</span>
|
|
15
|
-
} @else {
|
|
16
|
-
<span>{{ displayValue }}</span>
|
|
17
|
-
}
|
|
18
|
-
</div>
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
<div
|
|
22
|
-
class="frg-slider"
|
|
23
|
-
#track
|
|
24
|
-
[ngClass]="sliderClasses"
|
|
25
|
-
[class.is-disabled]="disabled"
|
|
26
|
-
(pointerdown)="onTrackPointerDown($event)"
|
|
27
|
-
>
|
|
28
|
-
<div class="frg-slider__rail"></div>
|
|
29
|
-
<div
|
|
30
|
-
class="frg-slider__range"
|
|
31
|
-
[style.left.%]="showRange ? minPercent : 0"
|
|
32
|
-
[style.width.%]="showRange ? rangeWidth : singlePercent"
|
|
33
|
-
></div>
|
|
34
|
-
|
|
35
|
-
@if(showTicks){
|
|
36
|
-
<div class="frg-slider__ticks">
|
|
37
|
-
@for(tick of ticks; track tick){
|
|
38
|
-
<span class="frg-slider__tick" [style.left.%]="valueToPercent(tick)"></span>
|
|
39
|
-
}
|
|
40
|
-
</div>
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
@if(showRange){
|
|
44
|
-
<button
|
|
45
|
-
type="button"
|
|
46
|
-
class="frg-slider__thumb"
|
|
47
|
-
[class.is-active]="isHandleActive('min')"
|
|
48
|
-
[style.left.%]="minPercent"
|
|
49
|
-
[attr.aria-labelledby]="id + '-label'"
|
|
50
|
-
role="slider"
|
|
51
|
-
[attr.aria-valuemin]="min"
|
|
52
|
-
[attr.aria-valuemax]="rangeMaxValue"
|
|
53
|
-
[attr.aria-valuenow]="rangeMinValue"
|
|
54
|
-
[attr.aria-disabled]="disabled"
|
|
55
|
-
(pointerdown)="onHandlePointerDown($event, 'min')"
|
|
56
|
-
(keydown)="onHandleKeydown($event, 'min')"
|
|
57
|
-
>
|
|
58
|
-
@if(showTooltip){
|
|
59
|
-
<span class="frg-slider__tooltip">{{ displayRangeMin }}</span>
|
|
60
|
-
}
|
|
61
|
-
</button>
|
|
62
|
-
|
|
63
|
-
<button
|
|
64
|
-
type="button"
|
|
65
|
-
class="frg-slider__thumb"
|
|
66
|
-
[class.is-active]="isHandleActive('max')"
|
|
67
|
-
[style.left.%]="maxPercent"
|
|
68
|
-
[attr.aria-labelledby]="id + '-label'"
|
|
69
|
-
role="slider"
|
|
70
|
-
[attr.aria-valuemin]="rangeMinValue"
|
|
71
|
-
[attr.aria-valuemax]="max"
|
|
72
|
-
[attr.aria-valuenow]="rangeMaxValue"
|
|
73
|
-
[attr.aria-disabled]="disabled"
|
|
74
|
-
(pointerdown)="onHandlePointerDown($event, 'max')"
|
|
75
|
-
(keydown)="onHandleKeydown($event, 'max')"
|
|
76
|
-
>
|
|
77
|
-
@if(showTooltip){
|
|
78
|
-
<span class="frg-slider__tooltip">{{ displayRangeMax }}</span>
|
|
79
|
-
}
|
|
80
|
-
</button>
|
|
81
|
-
} @else {
|
|
82
|
-
<button
|
|
83
|
-
type="button"
|
|
84
|
-
class="frg-slider__thumb"
|
|
85
|
-
[class.is-active]="isHandleActive('single')"
|
|
86
|
-
[style.left.%]="singlePercent"
|
|
87
|
-
[attr.aria-labelledby]="id + '-label'"
|
|
88
|
-
role="slider"
|
|
89
|
-
[attr.aria-valuemin]="min"
|
|
90
|
-
[attr.aria-valuemax]="max"
|
|
91
|
-
[attr.aria-valuenow]="singleValue"
|
|
92
|
-
[attr.aria-disabled]="disabled"
|
|
93
|
-
(pointerdown)="onHandlePointerDown($event, 'single')"
|
|
94
|
-
(keydown)="onHandleKeydown($event, 'single')"
|
|
95
|
-
>
|
|
96
|
-
@if(showTooltip){
|
|
97
|
-
<span class="frg-slider__tooltip">{{ displayValue }}</span>
|
|
98
|
-
}
|
|
99
|
-
</button>
|
|
100
|
-
}
|
|
101
|
-
</div>
|
|
102
|
-
</div>
|
|
103
|
-
|
|
104
|
-
@if(showValidation) {
|
|
105
|
-
<frg-input-validation
|
|
106
|
-
[errorList]="errorList"
|
|
107
|
-
[warningList]="warningList"
|
|
108
|
-
[isFormInvalid]="hasError"
|
|
109
|
-
>
|
|
110
|
-
</frg-input-validation>
|
|
111
|
-
}
|
|
@@ -1,203 +0,0 @@
|
|
|
1
|
-
@use "sass:color";
|
|
2
|
-
@use './../../../../../assets/styles/scss/variables' as *;
|
|
3
|
-
|
|
4
|
-
:host {
|
|
5
|
-
display: block;
|
|
6
|
-
font-family: $input-font-family;
|
|
7
|
-
|
|
8
|
-
label {
|
|
9
|
-
display: flex;
|
|
10
|
-
font-size: $font-size-xs;
|
|
11
|
-
color: $input-text-color;
|
|
12
|
-
padding: $input-padding;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.frg-input__wrapper {
|
|
16
|
-
position: relative;
|
|
17
|
-
|
|
18
|
-
&.input-error label {
|
|
19
|
-
color: $color-danger;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
&.input-warning label {
|
|
23
|
-
color: $color-warning;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.frg-slider__values {
|
|
28
|
-
display: flex;
|
|
29
|
-
justify-content: space-between;
|
|
30
|
-
font-size: $font-size-xs;
|
|
31
|
-
color: $input-text-color;
|
|
32
|
-
padding: 0 $input-padding;
|
|
33
|
-
margin-bottom: 0.35rem;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.frg-slider {
|
|
37
|
-
position: relative;
|
|
38
|
-
height: var(--slider-height, 2rem);
|
|
39
|
-
width: 100%;
|
|
40
|
-
cursor: pointer;
|
|
41
|
-
touch-action: none;
|
|
42
|
-
--slider-track-height: 0.35rem;
|
|
43
|
-
--slider-thumb-size: 1.1rem;
|
|
44
|
-
--slider-height: 2rem;
|
|
45
|
-
--slider-accent: #{$color-primary};
|
|
46
|
-
--slider-accent-focus: #{rgba($color-primary, 0.15)};
|
|
47
|
-
|
|
48
|
-
&.is-disabled {
|
|
49
|
-
cursor: not-allowed;
|
|
50
|
-
opacity: 0.6;
|
|
51
|
-
pointer-events: none;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
&__rail,
|
|
55
|
-
&__range {
|
|
56
|
-
position: absolute;
|
|
57
|
-
top: 50%;
|
|
58
|
-
height: var(--slider-track-height);
|
|
59
|
-
border-radius: 999px;
|
|
60
|
-
transform: translateY(-50%);
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
&__rail {
|
|
64
|
-
left: 0;
|
|
65
|
-
right: 0;
|
|
66
|
-
background: $input-border-color;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
&__range {
|
|
70
|
-
background: var(--slider-accent);
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
&__ticks {
|
|
74
|
-
position: absolute;
|
|
75
|
-
left: 0;
|
|
76
|
-
right: 0;
|
|
77
|
-
top: 50%;
|
|
78
|
-
height: 0.6rem;
|
|
79
|
-
transform: translateY(-50%);
|
|
80
|
-
pointer-events: none;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
&__tick {
|
|
84
|
-
position: absolute;
|
|
85
|
-
width: 2px;
|
|
86
|
-
height: 0.6rem;
|
|
87
|
-
background: $input-border-color;
|
|
88
|
-
border-radius: 2px;
|
|
89
|
-
transform: translateX(-50%);
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
&__thumb {
|
|
93
|
-
position: absolute;
|
|
94
|
-
top: 50%;
|
|
95
|
-
width: var(--slider-thumb-size);
|
|
96
|
-
height: var(--slider-thumb-size);
|
|
97
|
-
border-radius: 50%;
|
|
98
|
-
transform: translate(-50%, -50%);
|
|
99
|
-
border: 2px solid var(--slider-accent);
|
|
100
|
-
background: $color-light;
|
|
101
|
-
box-shadow: $box-shadow-md;
|
|
102
|
-
cursor: grab;
|
|
103
|
-
padding: 0;
|
|
104
|
-
|
|
105
|
-
&:focus {
|
|
106
|
-
outline: none;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
&:focus-visible {
|
|
110
|
-
box-shadow: 0 0 0 4px var(--slider-accent-focus);
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
&.is-active {
|
|
114
|
-
cursor: grabbing;
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
&__tooltip {
|
|
119
|
-
position: absolute;
|
|
120
|
-
left: 50%;
|
|
121
|
-
bottom: calc(100% + 0.35rem);
|
|
122
|
-
transform: translate(-50%, 0.2rem);
|
|
123
|
-
background: $color-dark-neutral;
|
|
124
|
-
color: $color-light;
|
|
125
|
-
padding: 0.15rem 0.35rem;
|
|
126
|
-
font-size: $font-size-xs;
|
|
127
|
-
border-radius: 0.25rem;
|
|
128
|
-
white-space: nowrap;
|
|
129
|
-
opacity: 0;
|
|
130
|
-
transition: opacity 0.15s ease, transform 0.15s ease;
|
|
131
|
-
pointer-events: none;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
&__thumb:hover &__tooltip,
|
|
135
|
-
&__thumb.is-active &__tooltip {
|
|
136
|
-
opacity: 1;
|
|
137
|
-
transform: translate(-50%, 0);
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
.frg-slider--small {
|
|
142
|
-
--slider-track-height: 0.25rem;
|
|
143
|
-
--slider-thumb-size: 0.85rem;
|
|
144
|
-
--slider-height: 1.6rem;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
.frg-slider--medium {
|
|
148
|
-
--slider-track-height: 0.35rem;
|
|
149
|
-
--slider-thumb-size: 1.1rem;
|
|
150
|
-
--slider-height: 2rem;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
.frg-slider--big {
|
|
154
|
-
--slider-track-height: 0.5rem;
|
|
155
|
-
--slider-thumb-size: 1.5rem;
|
|
156
|
-
--slider-height: 2.6rem;
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
.frg-slider--primary {
|
|
160
|
-
--slider-accent: #{$color-primary};
|
|
161
|
-
--slider-accent-focus: #{rgba($color-primary, 0.15)};
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
.frg-slider--secondary {
|
|
165
|
-
--slider-accent: #{$color-secondary};
|
|
166
|
-
--slider-accent-focus: #{rgba($color-secondary, 0.15)};
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
.frg-slider--tertiary {
|
|
170
|
-
--slider-accent: #{$color-tertiary};
|
|
171
|
-
--slider-accent-focus: #{rgba($color-tertiary, 0.15)};
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
.frg-slider--info {
|
|
175
|
-
--slider-accent: #{$color-info};
|
|
176
|
-
--slider-accent-focus: #{rgba($color-info, 0.15)};
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
.frg-slider--success {
|
|
180
|
-
--slider-accent: #{$color-success};
|
|
181
|
-
--slider-accent-focus: #{rgba($color-success, 0.15)};
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
.frg-slider--warning {
|
|
185
|
-
--slider-accent: #{$color-warning};
|
|
186
|
-
--slider-accent-focus: #{rgba($color-warning, 0.15)};
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
.frg-slider--danger {
|
|
190
|
-
--slider-accent: #{$color-danger};
|
|
191
|
-
--slider-accent-focus: #{rgba($color-danger, 0.15)};
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
.frg-slider--dark {
|
|
195
|
-
--slider-accent: #{$color-dark};
|
|
196
|
-
--slider-accent-focus: #{rgba($color-dark, 0.2)};
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
.frg-slider--light {
|
|
200
|
-
--slider-accent: #{$color-light};
|
|
201
|
-
--slider-accent-focus: #{rgba($color-light, 0.4)};
|
|
202
|
-
}
|
|
203
|
-
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
import { By } from '@angular/platform-browser';
|
|
3
|
-
import { InputSliderComponent } from './input-slider.component';
|
|
4
|
-
|
|
5
|
-
describe('InputSliderComponent', () => {
|
|
6
|
-
let fixture: ComponentFixture<InputSliderComponent>;
|
|
7
|
-
let component: InputSliderComponent;
|
|
8
|
-
|
|
9
|
-
beforeEach(async () => {
|
|
10
|
-
await TestBed.configureTestingModule({
|
|
11
|
-
imports: [InputSliderComponent]
|
|
12
|
-
}).compileComponents();
|
|
13
|
-
|
|
14
|
-
fixture = TestBed.createComponent(InputSliderComponent);
|
|
15
|
-
component = fixture.componentInstance;
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
it('renders a single thumb for single value', () => {
|
|
19
|
-
component.writeValue(30);
|
|
20
|
-
fixture.detectChanges();
|
|
21
|
-
|
|
22
|
-
const thumbs = fixture.debugElement.queryAll(By.css('.frg-slider__thumb'));
|
|
23
|
-
expect(thumbs.length).toBe(1);
|
|
24
|
-
expect(thumbs[0].nativeElement.style.left).toContain('30');
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
it('renders two thumbs for range value', () => {
|
|
28
|
-
component.range = true;
|
|
29
|
-
component.writeValue([10, 90]);
|
|
30
|
-
fixture.detectChanges();
|
|
31
|
-
|
|
32
|
-
const thumbs = fixture.debugElement.queryAll(By.css('.frg-slider__thumb'));
|
|
33
|
-
expect(thumbs.length).toBe(2);
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
it('updates value with keyboard controls', () => {
|
|
37
|
-
component.writeValue(20);
|
|
38
|
-
fixture.detectChanges();
|
|
39
|
-
|
|
40
|
-
const thumb = fixture.debugElement.query(By.css('.frg-slider__thumb'));
|
|
41
|
-
thumb.nativeElement.dispatchEvent(new KeyboardEvent('keydown', { key: 'ArrowRight' }));
|
|
42
|
-
fixture.detectChanges();
|
|
43
|
-
|
|
44
|
-
expect(component.value).toBe(21);
|
|
45
|
-
});
|
|
46
|
-
});
|