@tacdaed/fragments 1.0.0-beta.3 → 1.0.0-beta.4
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 +14 -0
- package/ng-package.json +20 -0
- package/package.json +22 -29
- package/src/lib/components/accordion/accordion.component.html +103 -0
- package/src/lib/components/accordion/accordion.component.scss +382 -0
- package/src/lib/components/accordion/accordion.component.spec.ts +147 -0
- package/src/lib/components/accordion/accordion.component.ts +211 -0
- package/src/lib/components/accordion/accordion.type.ts +82 -0
- package/src/lib/components/breadcrumb/breadcrumb.component.html +43 -0
- package/src/lib/components/breadcrumb/breadcrumb.component.scss +112 -0
- package/src/lib/components/breadcrumb/breadcrumb.component.spec.ts +33 -0
- package/src/lib/components/breadcrumb/breadcrumb.component.ts +103 -0
- package/src/lib/components/breadcrumb/breadcrumb.interface.ts +7 -0
- package/src/lib/components/button/button.component.html +57 -0
- package/src/lib/components/button/button.component.scss +445 -0
- package/src/lib/components/button/button.component.spec.ts +99 -0
- package/src/lib/components/button/button.component.ts +143 -0
- package/src/lib/components/button/button.type.ts +7 -0
- package/src/lib/components/card/card.component.html +44 -0
- package/src/lib/components/card/card.component.scss +114 -0
- package/src/lib/components/card/card.component.spec.ts +65 -0
- package/src/lib/components/card/card.component.ts +21 -0
- package/src/lib/components/card/card.type.ts +3 -0
- package/src/lib/components/code-block/code-block.component.html +55 -0
- package/src/lib/components/code-block/code-block.component.scss +122 -0
- package/src/lib/components/code-block/code-block.component.spec.ts +81 -0
- package/src/lib/components/code-block/code-block.component.ts +302 -0
- package/src/lib/components/code-block/code-block.interface.ts +28 -0
- package/src/lib/components/code-block/code-block.type.ts +73 -0
- package/src/lib/components/decorative/sparkle-field/sparkle-field.component.html +14 -0
- package/src/lib/components/decorative/sparkle-field/sparkle-field.component.scss +20 -0
- package/src/lib/components/decorative/sparkle-field/sparkle-field.component.spec.ts +38 -0
- package/src/lib/components/decorative/sparkle-field/sparkle-field.component.ts +181 -0
- package/src/lib/components/input/input-base.ts +187 -0
- package/src/lib/components/input/input-calendar/input-calendar.component.html +76 -0
- package/src/lib/components/input/input-calendar/input-calendar.component.scss +179 -0
- package/src/lib/components/input/input-calendar/input-calendar.component.spec.ts +44 -0
- package/src/lib/components/input/input-calendar/input-calendar.component.ts +299 -0
- package/src/lib/components/input/input-checkbox/input-checkbox.component.html +37 -0
- package/src/lib/components/input/input-checkbox/input-checkbox.component.scss +128 -0
- package/src/lib/components/input/input-checkbox/input-checkbox.component.spec.ts +43 -0
- package/src/lib/components/input/input-checkbox/input-checkbox.component.ts +112 -0
- package/src/lib/components/input/input-checkbox-group/input-checkbox-group.component.html +43 -0
- package/src/lib/components/input/input-checkbox-group/input-checkbox-group.component.scss +140 -0
- package/src/lib/components/input/input-checkbox-group/input-checkbox-group.component.spec.ts +62 -0
- package/src/lib/components/input/input-checkbox-group/input-checkbox-group.component.ts +136 -0
- package/src/lib/components/input/input-clock-picker/input-clock-picker.component.html +81 -0
- package/src/lib/components/input/input-clock-picker/input-clock-picker.component.scss +228 -0
- package/src/lib/components/input/input-clock-picker/input-clock-picker.component.spec.ts +62 -0
- package/src/lib/components/input/input-clock-picker/input-clock-picker.component.ts +178 -0
- package/src/lib/components/input/input-consts.ts +132 -0
- package/src/lib/components/input/input-date/input-date-validators.ts +41 -0
- package/src/lib/components/input/input-date/input-date.component.html +41 -0
- package/src/lib/components/input/input-date/input-date.component.scss +95 -0
- package/src/lib/components/input/input-date/input-date.component.spec.ts +43 -0
- package/src/lib/components/input/input-date/input-date.component.ts +359 -0
- package/src/lib/components/input/input-date-time/input-date-time.component.html +70 -0
- package/src/lib/components/input/input-date-time/input-date-time.component.scss +133 -0
- package/src/lib/components/input/input-date-time/input-date-time.component.spec.ts +36 -0
- package/src/lib/components/input/input-date-time/input-date-time.component.ts +387 -0
- package/src/lib/components/input/input-file-upload/input-file-upload.component.html +89 -0
- package/src/lib/components/input/input-file-upload/input-file-upload.component.scss +171 -0
- package/src/lib/components/input/input-file-upload/input-file-upload.component.spec.ts +43 -0
- package/src/lib/components/input/input-file-upload/input-file-upload.component.ts +351 -0
- package/src/lib/components/input/input-interface.ts +8 -0
- package/src/lib/components/input/input-number/input-number-validators.ts +0 -0
- package/src/lib/components/input/input-number/input-number.component.html +51 -0
- package/src/lib/components/input/input-number/input-number.component.scss +140 -0
- package/src/lib/components/input/input-number/input-number.component.spec.ts +44 -0
- package/src/lib/components/input/input-number/input-number.component.ts +343 -0
- package/src/lib/components/input/input-radio-group/input-radio-group.component.html +44 -0
- package/src/lib/components/input/input-radio-group/input-radio-group.component.scss +139 -0
- package/src/lib/components/input/input-radio-group/input-radio-group.component.spec.ts +58 -0
- package/src/lib/components/input/input-radio-group/input-radio-group.component.ts +132 -0
- package/src/lib/components/input/input-slider/input-slider.component.html +111 -0
- package/src/lib/components/input/input-slider/input-slider.component.scss +203 -0
- package/src/lib/components/input/input-slider/input-slider.component.spec.ts +46 -0
- package/src/lib/components/input/input-slider/input-slider.component.ts +410 -0
- package/src/lib/components/input/input-text/input-text-validators.ts +67 -0
- package/src/lib/components/input/input-text/input-text.component.html +71 -0
- package/src/lib/components/input/input-text/input-text.component.scss +118 -0
- package/src/lib/components/input/input-text/input-text.component.spec.ts +55 -0
- package/src/lib/components/input/input-text/input-text.component.ts +215 -0
- package/src/lib/components/input/input-time/input-time-validators.ts +42 -0
- package/src/lib/components/input/input-time/input-time.component.html +92 -0
- package/src/lib/components/input/input-time/input-time.component.scss +191 -0
- package/src/lib/components/input/input-time/input-time.component.spec.ts +39 -0
- package/src/lib/components/input/input-time/input-time.component.ts +691 -0
- package/src/lib/components/input/input-toggle-switch/input-toggle-switch.component.html +36 -0
- package/src/lib/components/input/input-toggle-switch/input-toggle-switch.component.scss +121 -0
- package/src/lib/components/input/input-toggle-switch/input-toggle-switch.component.spec.ts +54 -0
- package/src/lib/components/input/input-toggle-switch/input-toggle-switch.component.ts +117 -0
- package/src/lib/components/input/input-type.ts +18 -0
- package/src/lib/components/input/input-validation/input-validation.component.html +19 -0
- package/src/lib/components/input/input-validation/input-validation.component.scss +39 -0
- package/src/lib/components/input/input-validation/input-validation.component.spec.ts +45 -0
- package/src/lib/components/input/input-validation/input-validation.component.ts +13 -0
- package/src/lib/components/input/input.pipe.ts +14 -0
- package/src/lib/components/layout/container/container.component.html +1 -0
- package/src/lib/components/layout/container/container.component.scss +33 -0
- package/src/lib/components/layout/container/container.component.ts +32 -0
- package/src/lib/components/layout/container/container.type.ts +1 -0
- package/src/lib/components/layout/divider/divider.component.html +1 -0
- package/src/lib/components/layout/divider/divider.component.scss +60 -0
- package/src/lib/components/layout/divider/divider.component.ts +38 -0
- package/src/lib/components/layout/divider/divider.type.ts +2 -0
- package/src/lib/components/layout/section/section.component.html +21 -0
- package/src/lib/components/layout/section/section.component.scss +43 -0
- package/src/lib/components/layout/section/section.component.ts +33 -0
- package/src/lib/components/layout/section/section.type.ts +2 -0
- package/src/lib/components/layout/separator/separator.component.html +9 -0
- package/src/lib/components/layout/separator/separator.component.scss +52 -0
- package/src/lib/components/layout/separator/separator.component.ts +25 -0
- package/src/lib/components/layout/separator/separator.type.ts +1 -0
- package/src/lib/components/loader/content-blur/content-blur.component.html +13 -0
- package/src/lib/components/loader/content-blur/content-blur.component.scss +43 -0
- package/src/lib/components/loader/content-blur/content-blur.component.spec.ts +42 -0
- package/src/lib/components/loader/content-blur/content-blur.component.ts +34 -0
- package/src/lib/components/loader/loader.type.ts +2 -0
- package/src/lib/components/loader/progress-bar/progress-bar.component.html +26 -0
- package/src/lib/components/loader/progress-bar/progress-bar.component.scss +151 -0
- package/src/lib/components/loader/progress-bar/progress-bar.component.spec.ts +47 -0
- package/src/lib/components/loader/progress-bar/progress-bar.component.ts +28 -0
- package/src/lib/components/loader/progress-bar/progress-bar.type.ts +8 -0
- package/src/lib/components/loader/pulse-loader/pulse-loader.component.html +12 -0
- package/src/lib/components/loader/pulse-loader/pulse-loader.component.scss +202 -0
- package/src/lib/components/loader/pulse-loader/pulse-loader.component.spec.ts +55 -0
- package/src/lib/components/loader/pulse-loader/pulse-loader.component.ts +73 -0
- package/src/lib/components/loader/pulse-loader/pulse-loader.type.ts +6 -0
- package/src/lib/components/loader/skeleton-loader/skeleton-loader.component.html +13 -0
- package/src/lib/components/loader/skeleton-loader/skeleton-loader.component.scss +113 -0
- package/src/lib/components/loader/skeleton-loader/skeleton-loader.component.spec.ts +37 -0
- package/src/lib/components/loader/skeleton-loader/skeleton-loader.component.ts +51 -0
- package/src/lib/components/loader/skeleton-loader/skeleton-loader.type.ts +6 -0
- package/src/lib/components/loader/spinner/spinner.component.html +20 -0
- package/src/lib/components/loader/spinner/spinner.component.scss +137 -0
- package/src/lib/components/loader/spinner/spinner.component.spec.ts +43 -0
- package/src/lib/components/loader/spinner/spinner.component.ts +32 -0
- package/src/lib/components/loader/spinner/spinner.type.ts +6 -0
- package/src/lib/components/modal/modal.component.html +47 -0
- package/src/lib/components/modal/modal.component.scss +139 -0
- package/src/lib/components/modal/modal.component.spec.ts +60 -0
- package/src/lib/components/modal/modal.component.ts +83 -0
- package/src/lib/components/modal/modal.type.ts +9 -0
- package/src/lib/components/morph/blob-moph/blob-moprh.component.spec.ts +79 -0
- package/src/lib/components/morph/blob-moph/blob-moprh.component.ts +96 -0
- package/src/lib/components/morph/blob-moph/blob-morph.component.html +34 -0
- package/src/lib/components/morph/blob-moph/blob-morph.component.scss +7 -0
- package/src/lib/components/morph/morph.abstract.ts +13 -0
- package/src/lib/components/pagination/pagination.interface.ts +4 -0
- package/src/lib/components/pagination/small-pagination/small-pagination.component.html +61 -0
- package/src/lib/components/pagination/small-pagination/small-pagination.component.scss +187 -0
- package/src/lib/components/pagination/small-pagination/small-pagination.component.spec.ts +88 -0
- package/src/lib/components/pagination/small-pagination/small-pagination.component.ts +177 -0
- package/src/lib/components/selection-lists/multi-select/multi-select.component.html +170 -0
- package/src/lib/components/selection-lists/multi-select/multi-select.component.scss +312 -0
- package/src/lib/components/selection-lists/multi-select/multi-select.component.spec.ts +61 -0
- package/src/lib/components/selection-lists/multi-select/multi-select.component.ts +372 -0
- package/src/lib/components/selection-lists/selection-list/selection-list.component.html +125 -0
- package/src/lib/components/selection-lists/selection-list/selection-list.component.scss +267 -0
- package/src/lib/components/selection-lists/selection-list/selection-list.component.spec.ts +66 -0
- package/src/lib/components/selection-lists/selection-list/selection-list.component.ts +315 -0
- package/src/lib/components/selection-lists/selection-lists-base.ts +35 -0
- package/src/lib/components/selection-lists/selection-lists-const.ts +17 -0
- package/src/lib/components/selection-lists/selection-lists-interface.ts +7 -0
- package/src/lib/components/selection-lists/selection-lists.type.ts +1 -0
- package/src/lib/components/side-nav/side-nav.component.html +101 -0
- package/src/lib/components/side-nav/side-nav.component.scss +295 -0
- package/src/lib/components/side-nav/side-nav.component.spec.ts +0 -0
- package/src/lib/components/side-nav/side-nav.component.ts +18 -0
- package/src/lib/components/side-nav/side-nav.type.ts +28 -0
- package/src/lib/components/snackbar/snackbar.component.html +33 -0
- package/src/lib/components/snackbar/snackbar.component.scss +195 -0
- package/src/lib/components/snackbar/snackbar.component.ts +112 -0
- package/src/lib/components/snackbar/snackbar.type.ts +27 -0
- package/src/lib/components/status/chip/chip.component.html +51 -0
- package/src/lib/components/status/chip/chip.component.scss +149 -0
- package/src/lib/components/status/chip/chip.component.spec.ts +62 -0
- package/src/lib/components/status/chip/chip.component.ts +83 -0
- package/src/lib/components/status/chip/chip.type.ts +42 -0
- package/src/lib/components/status/directives/badge/badge.directive.spec.ts +60 -0
- package/src/lib/components/status/directives/badge/badge.directive.ts +190 -0
- package/src/lib/components/status/directives/badge/badge.interface.ts +19 -0
- package/src/lib/components/status/pill/pill.component.html +40 -0
- package/src/lib/components/status/pill/pill.component.scss +113 -0
- package/src/lib/components/status/pill/pill.component.spec.ts +47 -0
- package/src/lib/components/status/pill/pill.component.ts +83 -0
- package/src/lib/components/status/pill/pill.type.ts +42 -0
- package/src/lib/components/status/status.interface.ts +57 -0
- package/src/lib/components/status/status.type.ts +62 -0
- package/src/lib/components/status/tag/tag.component.html +39 -0
- package/src/lib/components/status/tag/tag.component.scss +140 -0
- package/src/lib/components/status/tag/tag.component.spec.ts +47 -0
- package/src/lib/components/status/tag/tag.component.ts +83 -0
- package/src/lib/components/status/tag/tag.type.ts +42 -0
- package/src/lib/components/stepper/stepper.component.html +83 -0
- package/src/lib/components/stepper/stepper.component.scss +196 -0
- package/src/lib/components/stepper/stepper.component.ts +482 -0
- package/src/lib/components/stepper/stepper.type.ts +60 -0
- package/src/lib/components/table/table.component.html +438 -0
- package/src/lib/components/table/table.component.scss +259 -0
- package/src/lib/components/table/table.component.spec.ts +117 -0
- package/src/lib/components/table/table.component.ts +215 -0
- package/src/lib/components/table/table.enum.ts +4 -0
- package/src/lib/components/table/table.function.ts +47 -0
- package/src/lib/components/table/table.interface.ts +143 -0
- package/src/lib/components/table/table.pipe.ts +62 -0
- package/src/lib/components/table/table.type.ts +15 -0
- package/src/lib/components/tabs/tabs.component.html +88 -0
- package/src/lib/components/tabs/tabs.component.scss +305 -0
- package/src/lib/components/tabs/tabs.component.spec.ts +94 -0
- package/src/lib/components/tabs/tabs.component.ts +282 -0
- package/src/lib/components/tabs/tabs.type.ts +81 -0
- package/src/lib/components/title-bar/title-bar.component.html +21 -0
- package/src/lib/components/title-bar/title-bar.component.scss +139 -0
- package/src/lib/components/title-bar/title-bar.component.spec.ts +44 -0
- package/src/lib/components/title-bar/title-bar.component.ts +13 -0
- package/src/lib/components/toast/toast.component.html +36 -0
- package/src/lib/components/toast/toast.component.scss +241 -0
- package/src/lib/components/toast/toast.component.ts +165 -0
- package/src/lib/components/toast/toast.type.ts +37 -0
- package/src/lib/components/toast-stack/toast-stack.component.html +30 -0
- package/src/lib/components/toast-stack/toast-stack.component.scss +35 -0
- package/src/lib/components/toast-stack/toast-stack.component.ts +51 -0
- package/src/lib/consts/country-prefix.ts +244 -0
- package/src/lib/directives/tooltip/popover.directive.ts +274 -0
- package/src/lib/directives/tooltip/tooltip.directive.spec.ts +86 -0
- package/src/lib/directives/tooltip/tooltip.directive.ts +234 -0
- package/src/lib/directives/tooltip/tooltip.interface.ts +29 -0
- package/src/lib/directives/tooltip/tooltip.type.ts +9 -0
- package/src/lib/interfaces/common.interfaces.ts +4 -0
- package/src/lib/pipes/chunk.pipe.ts +16 -0
- package/src/lib/pipes/safe-html.pipe.ts +14 -0
- package/src/lib/pipes/sanitize-html.pipe.ts +23 -0
- package/src/lib/types/base.types.ts +23 -0
- package/src/lib/types/common.types.ts +98 -0
- package/src/lib/types/form.types.ts +5 -0
- package/src/lib/utils/common.utils.ts +53 -0
- package/src/lib/utils/date.utils.ts +474 -0
- package/src/lib/utils/number.utils.ts +16 -0
- package/src/lib/utils/uuid.utils.ts +39 -0
- package/src/public-api.ts +114 -0
- package/tsconfig.lib.json +17 -0
- package/tsconfig.lib.prod.json +10 -0
- package/tsconfig.spec.json +9 -0
- package/fesm2022/tacdaed-fragments.mjs +0 -8928
- package/fesm2022/tacdaed-fragments.mjs.map +0 -1
- package/index.d.ts +0 -3929
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
@use './../../../../../assets/styles/scss/variables' as *;
|
|
2
|
+
|
|
3
|
+
:host {
|
|
4
|
+
box-sizing: border-box;
|
|
5
|
+
display: block;
|
|
6
|
+
width: 100%;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
:host(.frg-section--sm) {
|
|
10
|
+
--section-padding: 1.5rem;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
:host(.frg-section--md) {
|
|
14
|
+
--section-padding: 2.5rem;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
:host(.frg-section--lg) {
|
|
18
|
+
--section-padding: 4rem;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
:host(.frg-section) {
|
|
22
|
+
padding-block: var(--section-padding, 2.5rem);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
:host(.frg-section--divider) {
|
|
26
|
+
padding-bottom: calc(var(--section-padding, 2.5rem) + 1rem);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.frg-section__header {
|
|
30
|
+
margin-bottom: 1.25rem;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.frg-section__title {
|
|
34
|
+
margin: 0 0 0.5rem 0;
|
|
35
|
+
font-size: 1.5rem;
|
|
36
|
+
font-weight: 600;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.frg-section__description {
|
|
40
|
+
margin: 0;
|
|
41
|
+
font-size: 0.95rem;
|
|
42
|
+
color: $color-dark-neutral;
|
|
43
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Component, HostBinding, Input } from '@angular/core';
|
|
2
|
+
import { TSectionHeading, TSectionSpacing } from './section.type';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
selector: 'frg-section',
|
|
6
|
+
templateUrl: './section.component.html',
|
|
7
|
+
styleUrl: './section.component.scss'
|
|
8
|
+
})
|
|
9
|
+
export class SectionComponent {
|
|
10
|
+
@Input() title?: string;
|
|
11
|
+
@Input() description?: string;
|
|
12
|
+
@Input() spacing: TSectionSpacing = 'md';
|
|
13
|
+
@Input() divider: boolean = false;
|
|
14
|
+
@Input() headingLevel: TSectionHeading = 2;
|
|
15
|
+
|
|
16
|
+
@HostBinding('class.frg-section') baseClass = true;
|
|
17
|
+
@HostBinding('class.frg-section--sm') get isSmall() {
|
|
18
|
+
return this.spacing === 'sm';
|
|
19
|
+
}
|
|
20
|
+
@HostBinding('class.frg-section--md') get isMedium() {
|
|
21
|
+
return this.spacing === 'md';
|
|
22
|
+
}
|
|
23
|
+
@HostBinding('class.frg-section--lg') get isLarge() {
|
|
24
|
+
return this.spacing === 'lg';
|
|
25
|
+
}
|
|
26
|
+
@HostBinding('class.frg-section--divider') get hasDivider() {
|
|
27
|
+
return this.divider;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
get hasHeader(): boolean {
|
|
31
|
+
return !!(this.title || this.description);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<div class="frg-separator__row">
|
|
2
|
+
@if (label) {
|
|
3
|
+
<span class="frg-separator__line" aria-hidden="true"></span>
|
|
4
|
+
<span class="frg-separator__label">{{ label }}</span>
|
|
5
|
+
<span class="frg-separator__line" aria-hidden="true"></span>
|
|
6
|
+
} @else {
|
|
7
|
+
<span class="frg-separator__line frg-separator__line--full" aria-hidden="true"></span>
|
|
8
|
+
}
|
|
9
|
+
</div>
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
@use './../../../../../assets/styles/scss/variables' as *;
|
|
2
|
+
|
|
3
|
+
:host {
|
|
4
|
+
box-sizing: border-box;
|
|
5
|
+
display: block;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
:host(.frg-separator) {
|
|
9
|
+
--frg-separator-spacing: 1rem;
|
|
10
|
+
--frg-separator-font-size: 0.85rem;
|
|
11
|
+
margin-block: var(--frg-separator-spacing);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
:host(.frg-separator--sm) {
|
|
15
|
+
--frg-separator-spacing: 0.75rem;
|
|
16
|
+
--frg-separator-font-size: 0.75rem;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
:host(.frg-separator--md) {
|
|
20
|
+
--frg-separator-spacing: 1rem;
|
|
21
|
+
--frg-separator-font-size: 0.85rem;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
:host(.frg-separator--lg) {
|
|
25
|
+
--frg-separator-spacing: 1.5rem;
|
|
26
|
+
--frg-separator-font-size: 0.95rem;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.frg-separator__row {
|
|
30
|
+
display: flex;
|
|
31
|
+
align-items: center;
|
|
32
|
+
gap: 0.75rem;
|
|
33
|
+
color: $color-dark-neutral;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.frg-separator__line {
|
|
37
|
+
flex: 1;
|
|
38
|
+
height: 1px;
|
|
39
|
+
background-color: $color-light-soft;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.frg-separator__line--full {
|
|
43
|
+
flex: 1;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.frg-separator__label {
|
|
47
|
+
font-size: var(--frg-separator-font-size);
|
|
48
|
+
text-transform: uppercase;
|
|
49
|
+
letter-spacing: 0.08em;
|
|
50
|
+
font-weight: 600;
|
|
51
|
+
color: $color-dark-soft;
|
|
52
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Component, HostBinding, Input } from '@angular/core';
|
|
2
|
+
import { TSeparatorSize } from './separator.type';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
selector: 'frg-separator',
|
|
6
|
+
templateUrl: './separator.component.html',
|
|
7
|
+
styleUrl: './separator.component.scss'
|
|
8
|
+
})
|
|
9
|
+
export class SeparatorComponent {
|
|
10
|
+
@Input() label?: string;
|
|
11
|
+
@Input() size: TSeparatorSize = 'md';
|
|
12
|
+
|
|
13
|
+
@HostBinding('class.frg-separator') baseClass = true;
|
|
14
|
+
@HostBinding('class.frg-separator--sm') get isSmall() {
|
|
15
|
+
return this.size === 'sm';
|
|
16
|
+
}
|
|
17
|
+
@HostBinding('class.frg-separator--md') get isMedium() {
|
|
18
|
+
return this.size === 'md';
|
|
19
|
+
}
|
|
20
|
+
@HostBinding('class.frg-separator--lg') get isLarge() {
|
|
21
|
+
return this.size === 'lg';
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
@HostBinding('attr.role') role = 'separator';
|
|
25
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type TSeparatorSize = 'sm' | 'md' | 'lg';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<div class="blur-loader">
|
|
2
|
+
<div class="blur-overlay" [style.backdropFilter]="'blur(' + blurPx + 'px)'" [style.opacity]="blurOpacity"></div>
|
|
3
|
+
|
|
4
|
+
<div class="content">
|
|
5
|
+
<ng-content></ng-content>
|
|
6
|
+
</div>
|
|
7
|
+
|
|
8
|
+
@if(showProgress) {
|
|
9
|
+
<div class="progress-text">
|
|
10
|
+
{{ safeProgress }}%
|
|
11
|
+
</div>
|
|
12
|
+
}
|
|
13
|
+
</div>
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
@use './../../../../../assets/styles/scss/variables' as *;
|
|
2
|
+
:host {
|
|
3
|
+
display: block;
|
|
4
|
+
|
|
5
|
+
.blur-loader {
|
|
6
|
+
position: relative;
|
|
7
|
+
width: 100%;
|
|
8
|
+
height: 100%;
|
|
9
|
+
border-radius: 1rem;
|
|
10
|
+
overflow: hidden;
|
|
11
|
+
display: flex;
|
|
12
|
+
align-items: center;
|
|
13
|
+
justify-content: center;
|
|
14
|
+
|
|
15
|
+
.content {
|
|
16
|
+
position: relative;
|
|
17
|
+
z-index: 1;
|
|
18
|
+
width: 100%;
|
|
19
|
+
height: 100%;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.blur-overlay {
|
|
23
|
+
position: absolute;
|
|
24
|
+
inset: 0;
|
|
25
|
+
background: rgba($color-light, 0.6);
|
|
26
|
+
z-index: 2;
|
|
27
|
+
transition: backdrop-filter 0.2s ease, opacity 0.2s ease;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.progress-text {
|
|
31
|
+
position: absolute;
|
|
32
|
+
z-index: 3;
|
|
33
|
+
font-size: 1.5rem;
|
|
34
|
+
font-weight: bold;
|
|
35
|
+
color: $color-dark-neutral;
|
|
36
|
+
background: rgba($color-light, 0.5);
|
|
37
|
+
box-shadow: $box-shadow-md;
|
|
38
|
+
padding: 0.25rem 0.75rem;
|
|
39
|
+
border-radius: 1rem;
|
|
40
|
+
pointer-events: none;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
import { By } from '@angular/platform-browser';
|
|
3
|
+
import { ContentBlurComponent } from './content-blur.component';
|
|
4
|
+
|
|
5
|
+
describe('ContentBlurComponent', () => {
|
|
6
|
+
let fixture: ComponentFixture<ContentBlurComponent>;
|
|
7
|
+
let component: ContentBlurComponent;
|
|
8
|
+
|
|
9
|
+
beforeEach(async () => {
|
|
10
|
+
await TestBed.configureTestingModule({
|
|
11
|
+
imports: [ContentBlurComponent]
|
|
12
|
+
}).compileComponents();
|
|
13
|
+
|
|
14
|
+
fixture = TestBed.createComponent(ContentBlurComponent);
|
|
15
|
+
component = fixture.componentInstance;
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
it('clamps progress to 0-100', () => {
|
|
19
|
+
component.progress = 120;
|
|
20
|
+
component.ngOnChanges();
|
|
21
|
+
|
|
22
|
+
expect(component.safeProgress).toBe(100);
|
|
23
|
+
expect(component.showProgress).toBeFalse();
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
it('renders progress text when incomplete', () => {
|
|
27
|
+
component.progress = 50;
|
|
28
|
+
component.ngOnChanges();
|
|
29
|
+
|
|
30
|
+
fixture.detectChanges();
|
|
31
|
+
|
|
32
|
+
const text = fixture.debugElement.query(By.css('.progress-text'));
|
|
33
|
+
expect(text.nativeElement.textContent).toContain('50%');
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
it('computes blur based on progress', () => {
|
|
37
|
+
component.progress = 10;
|
|
38
|
+
component.ngOnChanges();
|
|
39
|
+
|
|
40
|
+
expect(component.blurPx).toBe(50);
|
|
41
|
+
});
|
|
42
|
+
});
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Component, Input, OnChanges } from '@angular/core';
|
|
2
|
+
|
|
3
|
+
@Component({
|
|
4
|
+
selector: 'frg-content-blur',
|
|
5
|
+
standalone: true,
|
|
6
|
+
templateUrl: './content-blur.component.html',
|
|
7
|
+
styleUrls: ['./content-blur.component.scss'],
|
|
8
|
+
})
|
|
9
|
+
export class ContentBlurComponent implements OnChanges {
|
|
10
|
+
@Input() progress: number = 0;
|
|
11
|
+
safeProgress: number = 0;
|
|
12
|
+
|
|
13
|
+
ngOnChanges(): void {
|
|
14
|
+
this.safeProgress = Math.min(100, Math.max(0, this.progress));
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
get blurPx(): number {
|
|
18
|
+
const p = this.safeProgress;
|
|
19
|
+
|
|
20
|
+
if (p < 20) return 50;
|
|
21
|
+
if (p < 50) return 30;
|
|
22
|
+
if (p < 75) return 25;
|
|
23
|
+
if (p < 100) return 18;
|
|
24
|
+
return 0;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
get blurOpacity(): number {
|
|
28
|
+
return this.blurPx / 20;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
get showProgress(): boolean {
|
|
32
|
+
return this.safeProgress < 100;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<div
|
|
2
|
+
class="frg-progress-bar"
|
|
3
|
+
[ngClass]="{
|
|
4
|
+
'frg-progress-bar--primary': styleType === 'primary',
|
|
5
|
+
'frg-progress-bar--secondary': styleType === 'secondary',
|
|
6
|
+
'frg-progress-bar--tertiary': styleType === 'tertiary',
|
|
7
|
+
'frg-progress-bar--dark': styleType === 'dark',
|
|
8
|
+
'frg-progress-bar--light': styleType === 'light',
|
|
9
|
+
'frg-progress-bar--small': size === 'small',
|
|
10
|
+
'frg-progress-bar--medium': size === 'medium',
|
|
11
|
+
'frg-progress-bar--large': size === 'large',
|
|
12
|
+
'frg-progress-bar--fill': animation === 'fill',
|
|
13
|
+
'frg-progress-bar--slide': animation === 'slide',
|
|
14
|
+
'frg-progress-bar--pulse': animation === 'pulse',
|
|
15
|
+
'frg-progress-bar--rotate': animation === 'rotate'
|
|
16
|
+
}"
|
|
17
|
+
[style.--segments]="segmentsList.length"
|
|
18
|
+
>
|
|
19
|
+
@for(segment of segmentsList; let i = $index; track $index) {
|
|
20
|
+
<div class="frg-progress-bar__segment" [class.filled]="i < filledSegments"></div>
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
@if(showPercentage) {
|
|
24
|
+
<span class="frg-progress-label">{{ safeProgress }}%</span>
|
|
25
|
+
}
|
|
26
|
+
</div>
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
@use './../../../../../assets/styles/scss/variables' as *;
|
|
2
|
+
|
|
3
|
+
:host {
|
|
4
|
+
display: block;
|
|
5
|
+
|
|
6
|
+
.frg-progress-bar {
|
|
7
|
+
position: relative;
|
|
8
|
+
width: 100%;
|
|
9
|
+
background-color: $color-light-soft;
|
|
10
|
+
border-radius: 0.1rem;
|
|
11
|
+
overflow: hidden;
|
|
12
|
+
height: 0.75rem;
|
|
13
|
+
|
|
14
|
+
display: flex;
|
|
15
|
+
|
|
16
|
+
.frg-progress-bar__segment {
|
|
17
|
+
flex: 0 0 auto;
|
|
18
|
+
width: calc((100% / var(--segments)));
|
|
19
|
+
background-color: $color-light-soft;
|
|
20
|
+
transition: background-color 0.3s ease;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.frg-progress-label {
|
|
24
|
+
position: absolute;
|
|
25
|
+
top: 50%;
|
|
26
|
+
left: 50%;
|
|
27
|
+
transform: translate(-50%, -50%);
|
|
28
|
+
font-size: $font-size-xs;
|
|
29
|
+
font-weight: 600;
|
|
30
|
+
color: $color-light;
|
|
31
|
+
user-select: none;
|
|
32
|
+
pointer-events: none;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&--small {
|
|
36
|
+
height: 0.5rem;
|
|
37
|
+
.frg-progress-label {
|
|
38
|
+
font-size: $font-size-2xs;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
&--medium {
|
|
43
|
+
height: 0.75rem;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&--large {
|
|
47
|
+
height: 1rem;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
&--primary {
|
|
51
|
+
.frg-progress-bar__segment.filled {
|
|
52
|
+
background-color: $color-primary;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
&--secondary {
|
|
57
|
+
.frg-progress-bar__segment.filled {
|
|
58
|
+
background-color: $color-secondary;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
&--tertiary {
|
|
63
|
+
.frg-progress-bar__segment.filled {
|
|
64
|
+
background-color: $color-tertiary;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
&--dark {
|
|
69
|
+
.frg-progress-bar__segment.filled {
|
|
70
|
+
background-color: $color-dark;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
&--light {
|
|
75
|
+
.frg-progress-bar__segment.filled {
|
|
76
|
+
background-color: $color-light;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.frg-progress-label {
|
|
80
|
+
color: $color-dark-soft;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
&--fill {
|
|
85
|
+
.frg-progress-bar__segment.filled {
|
|
86
|
+
transform-origin: left;
|
|
87
|
+
animation: fill-in 0.4s ease forwards;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
@keyframes fill-in {
|
|
92
|
+
from {
|
|
93
|
+
opacity: 0.5;
|
|
94
|
+
}
|
|
95
|
+
to {
|
|
96
|
+
opacity: 1;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
&--slide {
|
|
101
|
+
.frg-progress-bar__segment.filled {
|
|
102
|
+
transform-origin: left;
|
|
103
|
+
animation: slide-in 0.4s ease forwards;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
@keyframes slide-in {
|
|
108
|
+
from {
|
|
109
|
+
transform: translateX(-100%);
|
|
110
|
+
opacity: 0.1;
|
|
111
|
+
}
|
|
112
|
+
to {
|
|
113
|
+
transform: translateX(0);
|
|
114
|
+
opacity: 1;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
&--rotate {
|
|
119
|
+
.frg-progress-bar__segment.filled {
|
|
120
|
+
transform-origin: left;
|
|
121
|
+
animation: rotate 0.5s ease forwards;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
@keyframes rotate {
|
|
126
|
+
from {
|
|
127
|
+
transform: translateX(-100%) rotate(-360deg);
|
|
128
|
+
opacity: 0.1;
|
|
129
|
+
}
|
|
130
|
+
to {
|
|
131
|
+
transform: translateX(0) rotate(0deg);
|
|
132
|
+
opacity: 1;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
&--pulse {
|
|
137
|
+
.frg-progress-bar__segment.filled {
|
|
138
|
+
animation: pulse 1.2s ease-in-out infinite;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
@keyframes pulse {
|
|
143
|
+
0%, 100% {
|
|
144
|
+
opacity: 1;
|
|
145
|
+
}
|
|
146
|
+
50% {
|
|
147
|
+
opacity: 0.5;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
import { By } from '@angular/platform-browser';
|
|
3
|
+
import { ProgressBarComponent } from './progress-bar.component';
|
|
4
|
+
|
|
5
|
+
describe('ProgressBarComponent', () => {
|
|
6
|
+
let fixture: ComponentFixture<ProgressBarComponent>;
|
|
7
|
+
let component: ProgressBarComponent;
|
|
8
|
+
|
|
9
|
+
beforeEach(async () => {
|
|
10
|
+
await TestBed.configureTestingModule({
|
|
11
|
+
imports: [ProgressBarComponent]
|
|
12
|
+
}).compileComponents();
|
|
13
|
+
|
|
14
|
+
fixture = TestBed.createComponent(ProgressBarComponent);
|
|
15
|
+
component = fixture.componentInstance;
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
it('calculates filled segments from progress', () => {
|
|
19
|
+
component.progress = 50;
|
|
20
|
+
component.segments = 10;
|
|
21
|
+
|
|
22
|
+
component.ngOnChanges();
|
|
23
|
+
|
|
24
|
+
expect(component.segmentsList.length).toBe(10);
|
|
25
|
+
expect(component.filledSegments).toBe(5);
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
it('renders percentage label when enabled', () => {
|
|
29
|
+
component.progress = 30;
|
|
30
|
+
component.showPercentage = true;
|
|
31
|
+
|
|
32
|
+
component.ngOnChanges();
|
|
33
|
+
fixture.detectChanges();
|
|
34
|
+
|
|
35
|
+
const label = fixture.debugElement.query(By.css('.frg-progress-label'));
|
|
36
|
+
expect(label.nativeElement.textContent).toContain('30%');
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
it('hides percentage label when disabled', () => {
|
|
40
|
+
component.showPercentage = false;
|
|
41
|
+
|
|
42
|
+
component.ngOnChanges();
|
|
43
|
+
fixture.detectChanges();
|
|
44
|
+
|
|
45
|
+
expect(fixture.debugElement.query(By.css('.frg-progress-label'))).toBeNull();
|
|
46
|
+
});
|
|
47
|
+
});
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { NgClass } from '@angular/common';
|
|
2
|
+
import { Component, Input, OnChanges } from '@angular/core';
|
|
3
|
+
import { TProgressBarAnimation, TProgressBarSize, TProgressBarType } from './progress-bar.type';
|
|
4
|
+
|
|
5
|
+
@Component({
|
|
6
|
+
selector: 'frg-progress-bar',
|
|
7
|
+
imports: [NgClass],
|
|
8
|
+
templateUrl: './progress-bar.component.html',
|
|
9
|
+
styleUrl: './progress-bar.component.scss',
|
|
10
|
+
})
|
|
11
|
+
export class ProgressBarComponent implements OnChanges {
|
|
12
|
+
@Input() progress: number = 0;
|
|
13
|
+
@Input() styleType: TProgressBarType = 'primary';
|
|
14
|
+
@Input() size: TProgressBarSize = 'medium';
|
|
15
|
+
@Input() showPercentage: boolean = true;
|
|
16
|
+
@Input() segments: number = 100;
|
|
17
|
+
@Input() animation: TProgressBarAnimation = 'fill';
|
|
18
|
+
|
|
19
|
+
protected safeProgress: number = 0;
|
|
20
|
+
segmentsList: Array<number> = [];
|
|
21
|
+
filledSegments: number = 0;
|
|
22
|
+
|
|
23
|
+
ngOnChanges(): void {
|
|
24
|
+
this.safeProgress = Math.min(100, Math.max(0, this.progress));
|
|
25
|
+
this.segmentsList = Array.from({ length: this.segments }, (_, i) => i + 1);
|
|
26
|
+
this.filledSegments = Math.round((this.safeProgress / 100) * this.segments);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { TBaseSize } from "../../../types/base.types";
|
|
2
|
+
import { TBaseLoaderStyle } from "../loader.type";
|
|
3
|
+
|
|
4
|
+
export type TProgressBarSize = TBaseSize;
|
|
5
|
+
|
|
6
|
+
export type TProgressBarType = TBaseLoaderStyle;
|
|
7
|
+
|
|
8
|
+
export type TProgressBarAnimation = 'fill' | 'slide' | 'pulse' | 'rotate';
|