@tacdaed/fragments 1.0.0-beta.2 → 1.0.0-beta.3
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 +3 -3
- package/fesm2022/tacdaed-fragments.mjs +8928 -0
- package/fesm2022/tacdaed-fragments.mjs.map +1 -0
- package/index.d.ts +3929 -0
- package/package.json +29 -22
- package/ng-package.json +0 -25
- 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,445 +0,0 @@
|
|
|
1
|
-
@use "sass:color";
|
|
2
|
-
@use './../../../../assets/styles/scss/variables' as *;
|
|
3
|
-
|
|
4
|
-
:host {
|
|
5
|
-
display: inline-block;
|
|
6
|
-
|
|
7
|
-
button {
|
|
8
|
-
appearance: none;
|
|
9
|
-
-webkit-appearance: none;
|
|
10
|
-
-moz-appearance: none;
|
|
11
|
-
border: none;
|
|
12
|
-
margin: 0;
|
|
13
|
-
padding: 0;
|
|
14
|
-
background: none;
|
|
15
|
-
color: inherit;
|
|
16
|
-
font: inherit;
|
|
17
|
-
cursor: pointer;
|
|
18
|
-
outline: none;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.frg-btn {
|
|
22
|
-
padding: .25rem 1rem;
|
|
23
|
-
min-height: 2.5rem;
|
|
24
|
-
line-height: 1;
|
|
25
|
-
margin: .5rem;
|
|
26
|
-
font-family: $base-font;
|
|
27
|
-
font-size: 1rem;
|
|
28
|
-
font-weight: 500;
|
|
29
|
-
border: 2px solid transparent;
|
|
30
|
-
box-shadow: 2px 2px 5px rgba($color-dark-soft, 0.4);
|
|
31
|
-
border-radius: 5px;
|
|
32
|
-
transition: all 0.15s ease-in-out;
|
|
33
|
-
|
|
34
|
-
&--small {
|
|
35
|
-
font-size: 0.875rem;
|
|
36
|
-
padding: 0 .75rem;
|
|
37
|
-
min-height: 2rem;
|
|
38
|
-
.frg-btn__icon-pill {
|
|
39
|
-
width: 1rem;
|
|
40
|
-
height: 1rem;
|
|
41
|
-
font-size: 0.5rem;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
&--large {
|
|
46
|
-
font-size: 1.125rem;
|
|
47
|
-
padding: 0 1.25rem;
|
|
48
|
-
min-height: 3rem;
|
|
49
|
-
.frg-btn__icon-pill {
|
|
50
|
-
width: 1.8rem;
|
|
51
|
-
height: 1.8rem;
|
|
52
|
-
font-size: 1rem;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
&--pill {
|
|
57
|
-
border-radius: 999px;
|
|
58
|
-
padding-left: 1.1rem;
|
|
59
|
-
padding-right: 1.1rem;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
&:hover {
|
|
63
|
-
box-shadow: 0 1px 2px rgba($color-dark, 0.2);
|
|
64
|
-
transform: translateY(1px);
|
|
65
|
-
cursor: pointer;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
&:focus-visible {
|
|
69
|
-
outline-offset: 5px;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
&[disabled='true'] {
|
|
73
|
-
border-color: $color-disabled;
|
|
74
|
-
background-color: $color-disabled !important;
|
|
75
|
-
color: $color-dark-soft !important;
|
|
76
|
-
opacity: 0.6;
|
|
77
|
-
pointer-events: none;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
&__ghost {
|
|
81
|
-
box-shadow: none;
|
|
82
|
-
color: $color-dark;
|
|
83
|
-
background-color: transparent;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
&__ghost:hover {
|
|
87
|
-
text-decoration: underline;
|
|
88
|
-
box-shadow: none;
|
|
89
|
-
cursor: pointer;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
&__icon {
|
|
93
|
-
margin: 0;
|
|
94
|
-
padding: 0;
|
|
95
|
-
min-height: auto;
|
|
96
|
-
border: none;
|
|
97
|
-
box-shadow: none;
|
|
98
|
-
background-color: transparent;
|
|
99
|
-
color: $color-dark-neutral;
|
|
100
|
-
|
|
101
|
-
span {
|
|
102
|
-
transition: color 0.15s ease, transform 0.15s ease;
|
|
103
|
-
transform: scale(1);
|
|
104
|
-
display: inline-block;
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
&__icon:hover {
|
|
109
|
-
text-decoration: none;
|
|
110
|
-
box-shadow: none;
|
|
111
|
-
cursor: pointer;
|
|
112
|
-
|
|
113
|
-
span {
|
|
114
|
-
transform: scale(1.06);
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
&__icon-primary { color: $color-primary; }
|
|
119
|
-
&__icon-secondary { color: $color-secondary; }
|
|
120
|
-
&__icon-tertiary { color: $color-tertiary; }
|
|
121
|
-
&__icon-info { color: $color-info; }
|
|
122
|
-
&__icon-success { color: $color-success; }
|
|
123
|
-
&__icon-warning { color: $color-warning; }
|
|
124
|
-
&__icon-danger { color: $color-danger; }
|
|
125
|
-
&__icon-dark { color: $color-dark-neutral; }
|
|
126
|
-
&__icon-light { color: $color-light; }
|
|
127
|
-
|
|
128
|
-
&__icon-primary:hover { color: color.scale($color-primary, $lightness: -15%); }
|
|
129
|
-
&__icon-secondary:hover { color: color.scale($color-secondary, $lightness: -15%); }
|
|
130
|
-
&__icon-tertiary:hover { color: color.scale($color-tertiary, $lightness: -15%); }
|
|
131
|
-
&__icon-info:hover { color: color.scale($color-info, $lightness: -15%); }
|
|
132
|
-
&__icon-success:hover { color: color.scale($color-success, $lightness: -15%); }
|
|
133
|
-
&__icon-warning:hover { color: color.scale($color-warning, $lightness: -15%); }
|
|
134
|
-
&__icon-danger:hover { color: color.scale($color-danger, $lightness: -15%); }
|
|
135
|
-
&__icon-dark:hover { color: color.scale($color-dark-neutral, $lightness: 20%); }
|
|
136
|
-
&__icon-light:hover { color: color.scale($color-light, $lightness: -10%); }
|
|
137
|
-
|
|
138
|
-
&__icon-pill {
|
|
139
|
-
display: inline-flex;
|
|
140
|
-
align-items: center;
|
|
141
|
-
justify-content: center;
|
|
142
|
-
width: 1.5rem;
|
|
143
|
-
height: 1.5rem;
|
|
144
|
-
border-radius: 50%;
|
|
145
|
-
background: rgba(255, 255, 255, 0.2);
|
|
146
|
-
font-size: 0.75rem;
|
|
147
|
-
line-height: 1;
|
|
148
|
-
box-shadow: $box-shadow-sm;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
&__icon-pill::before {
|
|
152
|
-
display: block;
|
|
153
|
-
line-height: 1;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
&__primary {
|
|
157
|
-
color: $color-light;
|
|
158
|
-
background-color: $color-primary;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
&__primary:hover {
|
|
162
|
-
color: $color-light;
|
|
163
|
-
background-color: $color-primary-dark;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
&__primary:focus-visible,
|
|
167
|
-
&__outline-primary:focus-visible {
|
|
168
|
-
outline: 3px solid $color-primary;
|
|
169
|
-
box-shadow: none;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
&__secondary {
|
|
173
|
-
color: $color-light;
|
|
174
|
-
background-color: $color-secondary;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
&__secondary:hover {
|
|
178
|
-
color: $color-light;
|
|
179
|
-
background-color: $color-secondary-dark;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
&__secondary:focus-visible,
|
|
183
|
-
&__outline-secondary:focus-visible {
|
|
184
|
-
outline: 3px solid $color-secondary;
|
|
185
|
-
box-shadow: none;
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
&__tertiary {
|
|
189
|
-
color: $color-light;
|
|
190
|
-
background-color: $color-tertiary;
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
&__tertiary:hover {
|
|
194
|
-
color: $color-light;
|
|
195
|
-
background-color: $color-tertiary-dark;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
&__tertiary:focus-visible,
|
|
199
|
-
&__outline-tertiary:focus-visible {
|
|
200
|
-
outline: 3px solid $color-tertiary;
|
|
201
|
-
box-shadow: none;
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
&__neutral {
|
|
205
|
-
color: $color-neutral-text;
|
|
206
|
-
background-color: $color-neutral;
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
&__neutral:hover {
|
|
210
|
-
color: $color-neutral-text;
|
|
211
|
-
background-color: color.scale($color-neutral, $lightness: -4%);
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
&__neutral:focus-visible {
|
|
215
|
-
outline: 3px solid color.scale($color-neutral, $lightness: -10%);
|
|
216
|
-
box-shadow: none;
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
&__light {
|
|
220
|
-
color: $color-dark-soft;
|
|
221
|
-
background-color: $color-light;
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
&__light:hover {
|
|
225
|
-
color: $color-light;
|
|
226
|
-
background-color: $color-dark;
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
&__light:focus-visible,
|
|
230
|
-
&__outline-light:focus-visible {
|
|
231
|
-
outline: 3px solid $color-light;
|
|
232
|
-
box-shadow: none;
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
&__dark {
|
|
236
|
-
color: $color-light;
|
|
237
|
-
background-color: $color-dark;
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
&__dark:hover {
|
|
241
|
-
color: $color-dark;
|
|
242
|
-
background-color: $color-light;
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
&__dark:focus-visible,
|
|
246
|
-
&__outline-dark:focus-visible {
|
|
247
|
-
outline: 3px solid $color-dark;
|
|
248
|
-
box-shadow: none;
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
&__info {
|
|
252
|
-
color: $color-light;
|
|
253
|
-
background-color: $color-info;
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
&__info:hover {
|
|
257
|
-
color: $color-light;
|
|
258
|
-
background-color: color.scale($color-info, $lightness: -15%);
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
&__info:focus-visible,
|
|
262
|
-
&__outline-info:focus-visible {
|
|
263
|
-
outline: 3px solid $color-info;
|
|
264
|
-
box-shadow: none;
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
&__success {
|
|
269
|
-
color: $color-light;
|
|
270
|
-
background-color: $color-success;
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
&__success:hover {
|
|
274
|
-
color: $color-light;
|
|
275
|
-
background-color: color.scale($color-success, $lightness: -15%);
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
&__success:focus-visible,
|
|
279
|
-
&__outline-success:focus-visible {
|
|
280
|
-
outline: 3px solid $color-success;
|
|
281
|
-
box-shadow: none;
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
&__warning {
|
|
285
|
-
color: $color-light;
|
|
286
|
-
background-color: $color-warning;
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
&__warning:hover {
|
|
290
|
-
color: $color-light;
|
|
291
|
-
background-color: color.scale($color-warning, $lightness: -15%);
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
&__warning:focus-visible,
|
|
295
|
-
&__outline-warning:focus-visible {
|
|
296
|
-
outline: 3px solid $color-warning;
|
|
297
|
-
box-shadow: none;
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
&__danger {
|
|
301
|
-
color: $color-light;
|
|
302
|
-
background-color: $color-danger;
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
&__danger:hover {
|
|
306
|
-
color: $color-light;
|
|
307
|
-
background-color: color.scale($color-danger, $lightness: -15%);
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
&__danger:focus-visible,
|
|
311
|
-
&__outline-danger:focus-visible {
|
|
312
|
-
outline: 3px solid $color-danger;
|
|
313
|
-
box-shadow: none;
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
&__outline-primary {
|
|
317
|
-
color: $color-dark;
|
|
318
|
-
border: 2px solid $color-primary;
|
|
319
|
-
background-color: transparent;
|
|
320
|
-
}
|
|
321
|
-
|
|
322
|
-
&__outline-primary:hover {
|
|
323
|
-
color: $color-light;
|
|
324
|
-
background-color: $color-primary;
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
&__outline-secondary {
|
|
328
|
-
color: $color-dark;
|
|
329
|
-
border: 2px solid $color-secondary;
|
|
330
|
-
background-color: transparent;
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
&__outline-secondary:hover {
|
|
334
|
-
color: $color-light;
|
|
335
|
-
background-color: $color-secondary;
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
&__outline-tertiary {
|
|
339
|
-
color: $color-dark;
|
|
340
|
-
border: 2px solid $color-tertiary;
|
|
341
|
-
background-color: transparent;
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
&__outline-tertiary:hover {
|
|
345
|
-
color: $color-light;
|
|
346
|
-
background-color: $color-tertiary;
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
&__outline-light {
|
|
350
|
-
color: $color-light;
|
|
351
|
-
border: 2px solid $color-light;
|
|
352
|
-
background-color: transparent;
|
|
353
|
-
}
|
|
354
|
-
|
|
355
|
-
&__outline-light:hover {
|
|
356
|
-
color: $color-dark;
|
|
357
|
-
background-color: $color-light;
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
&__outline-dark {
|
|
361
|
-
color: $color-dark;
|
|
362
|
-
border: 2px solid $color-dark;
|
|
363
|
-
background-color: transparent;
|
|
364
|
-
}
|
|
365
|
-
|
|
366
|
-
&__outline-dark:hover {
|
|
367
|
-
color: $color-light;
|
|
368
|
-
background-color: $color-dark;
|
|
369
|
-
}
|
|
370
|
-
|
|
371
|
-
&__outline-info {
|
|
372
|
-
color: $color-dark;
|
|
373
|
-
border: 2px solid $color-info;
|
|
374
|
-
background-color: transparent;
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
&__outline-info:hover {
|
|
378
|
-
color: $color-light;
|
|
379
|
-
background-color: $color-info;
|
|
380
|
-
}
|
|
381
|
-
|
|
382
|
-
&__outline-success {
|
|
383
|
-
color: $color-dark;
|
|
384
|
-
border: 2px solid $color-success;
|
|
385
|
-
background-color: transparent;
|
|
386
|
-
}
|
|
387
|
-
|
|
388
|
-
&__outline-success:hover {
|
|
389
|
-
color: $color-light;
|
|
390
|
-
background-color: $color-success;
|
|
391
|
-
}
|
|
392
|
-
|
|
393
|
-
&__outline-warning {
|
|
394
|
-
color: $color-dark;
|
|
395
|
-
border: 2px solid $color-warning;
|
|
396
|
-
background-color: transparent;
|
|
397
|
-
}
|
|
398
|
-
|
|
399
|
-
&__outline-warning:hover {
|
|
400
|
-
color: $color-light;
|
|
401
|
-
background-color: $color-warning;
|
|
402
|
-
}
|
|
403
|
-
|
|
404
|
-
&__outline-danger {
|
|
405
|
-
color: $color-dark;
|
|
406
|
-
border: 2px solid $color-danger;
|
|
407
|
-
background-color: transparent;
|
|
408
|
-
}
|
|
409
|
-
|
|
410
|
-
&__outline-danger:hover {
|
|
411
|
-
color: $color-light;
|
|
412
|
-
background-color: $color-danger;
|
|
413
|
-
}
|
|
414
|
-
|
|
415
|
-
&__primary:active,
|
|
416
|
-
&__outline-primary:active {
|
|
417
|
-
background-color: color.scale($color-primary, $lightness: -20%);
|
|
418
|
-
}
|
|
419
|
-
|
|
420
|
-
&__secondary:active,
|
|
421
|
-
&__outline-secondary:active {
|
|
422
|
-
background-color: color.scale($color-secondary, $lightness: -20%);
|
|
423
|
-
}
|
|
424
|
-
|
|
425
|
-
&__tertiary:active,
|
|
426
|
-
&__outline-tertiary:active {
|
|
427
|
-
background-color: color.scale($color-tertiary, $lightness: -20%);
|
|
428
|
-
}
|
|
429
|
-
|
|
430
|
-
&__success:active,
|
|
431
|
-
&__outline-success:active {
|
|
432
|
-
background-color: color.scale($color-success, $lightness: -20%);
|
|
433
|
-
}
|
|
434
|
-
|
|
435
|
-
&__warning:active,
|
|
436
|
-
&__outline-warning:active {
|
|
437
|
-
background-color: color.scale($color-warning, $lightness: -20%);
|
|
438
|
-
}
|
|
439
|
-
|
|
440
|
-
&__danger:active,
|
|
441
|
-
&__outline-danger:active {
|
|
442
|
-
background-color: color.scale($color-danger, $lightness: -20%);
|
|
443
|
-
}
|
|
444
|
-
}
|
|
445
|
-
}
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
import { By } from '@angular/platform-browser';
|
|
3
|
-
import { RouterTestingModule } from '@angular/router/testing';
|
|
4
|
-
import { ButtonComponent } from './button.component';
|
|
5
|
-
|
|
6
|
-
describe('ButtonComponent', () => {
|
|
7
|
-
let fixture: ComponentFixture<ButtonComponent>;
|
|
8
|
-
let component: ButtonComponent;
|
|
9
|
-
|
|
10
|
-
beforeEach(async () => {
|
|
11
|
-
await TestBed.configureTestingModule({
|
|
12
|
-
imports: [ButtonComponent, RouterTestingModule]
|
|
13
|
-
}).compileComponents();
|
|
14
|
-
|
|
15
|
-
fixture = TestBed.createComponent(ButtonComponent);
|
|
16
|
-
component = fixture.componentInstance;
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
it('renders text when provided', () => {
|
|
20
|
-
component.text = 'Click me';
|
|
21
|
-
|
|
22
|
-
fixture.detectChanges();
|
|
23
|
-
|
|
24
|
-
const textEl = fixture.debugElement.query(By.css('span'));
|
|
25
|
-
expect(textEl.nativeElement.textContent).toContain('Click me');
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
it('renders icon span when iconClass is provided', () => {
|
|
29
|
-
component.iconClass = 'fa fa-star';
|
|
30
|
-
|
|
31
|
-
fixture.detectChanges();
|
|
32
|
-
|
|
33
|
-
const iconEl = fixture.debugElement.query(By.css('span.fa'));
|
|
34
|
-
expect(iconEl).toBeTruthy();
|
|
35
|
-
});
|
|
36
|
-
|
|
37
|
-
it('applies aria-label when provided', () => {
|
|
38
|
-
component.ariaLabel = 'Icon action';
|
|
39
|
-
component.iconClass = 'fa fa-star';
|
|
40
|
-
|
|
41
|
-
fixture.detectChanges();
|
|
42
|
-
|
|
43
|
-
const button = fixture.debugElement.query(By.css('button')).nativeElement as HTMLButtonElement;
|
|
44
|
-
expect(button.getAttribute('aria-label')).toBe('Icon action');
|
|
45
|
-
});
|
|
46
|
-
|
|
47
|
-
it('applies iconStyleType classes', () => {
|
|
48
|
-
component.iconClass = 'fa fa-star';
|
|
49
|
-
component.iconStyleType = 'primary';
|
|
50
|
-
|
|
51
|
-
fixture.detectChanges();
|
|
52
|
-
|
|
53
|
-
const iconEl = fixture.debugElement.query(By.css('span.fa'));
|
|
54
|
-
expect(iconEl.nativeElement.classList).toContain('frg-btn__icon-primary');
|
|
55
|
-
});
|
|
56
|
-
|
|
57
|
-
it('applies container classes based on icon position', () => {
|
|
58
|
-
component.iconPosition = 'top';
|
|
59
|
-
|
|
60
|
-
fixture.detectChanges();
|
|
61
|
-
|
|
62
|
-
const container = fixture.debugElement.query(By.css('button > div'));
|
|
63
|
-
expect(container.nativeElement.classList).toContain('flex-column-reverse');
|
|
64
|
-
});
|
|
65
|
-
|
|
66
|
-
it('emits clickEvent when clicked and not disabled', () => {
|
|
67
|
-
const emitSpy = spyOn(component.clickEvent, 'emit');
|
|
68
|
-
|
|
69
|
-
fixture.detectChanges();
|
|
70
|
-
|
|
71
|
-
const button = fixture.debugElement.query(By.css('button'));
|
|
72
|
-
button.nativeElement.click();
|
|
73
|
-
|
|
74
|
-
expect(emitSpy).toHaveBeenCalled();
|
|
75
|
-
});
|
|
76
|
-
|
|
77
|
-
it('does not emit clickEvent when disabled', () => {
|
|
78
|
-
const emitSpy = spyOn(component.clickEvent, 'emit');
|
|
79
|
-
component.disabled = true;
|
|
80
|
-
|
|
81
|
-
fixture.detectChanges();
|
|
82
|
-
|
|
83
|
-
const button = fixture.debugElement.query(By.css('button'));
|
|
84
|
-
button.nativeElement.click();
|
|
85
|
-
|
|
86
|
-
expect(emitSpy).not.toHaveBeenCalled();
|
|
87
|
-
});
|
|
88
|
-
|
|
89
|
-
it('sets type and disabled attributes', () => {
|
|
90
|
-
component.type = 'submit';
|
|
91
|
-
component.disabled = true;
|
|
92
|
-
|
|
93
|
-
fixture.detectChanges();
|
|
94
|
-
|
|
95
|
-
const button = fixture.debugElement.query(By.css('button')).nativeElement as HTMLButtonElement;
|
|
96
|
-
expect(button.getAttribute('type')).toBe('submit');
|
|
97
|
-
expect(button.getAttribute('disabled')).toBe('true');
|
|
98
|
-
});
|
|
99
|
-
});
|
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
import { NgClass } from '@angular/common';
|
|
2
|
-
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
|
3
|
-
import { RouterLink, RouterLinkActive } from '@angular/router';
|
|
4
|
-
|
|
5
|
-
import { TButtonIconPosition, TButtonShape, TButtonSize, TButtonStyle, TButtonType } from './button.type';
|
|
6
|
-
import { TBaseStyle } from '../../types/base.types';
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Button component for displaying a button with various styles and behaviors
|
|
10
|
-
*/
|
|
11
|
-
@Component({
|
|
12
|
-
selector: 'frg-button',
|
|
13
|
-
imports: [NgClass, RouterLink, RouterLinkActive],
|
|
14
|
-
templateUrl: './button.component.html',
|
|
15
|
-
styleUrl: './button.component.scss'
|
|
16
|
-
})
|
|
17
|
-
export class ButtonComponent {
|
|
18
|
-
/**
|
|
19
|
-
* Unique identifier for the button
|
|
20
|
-
*/
|
|
21
|
-
@Input() id: string = '';
|
|
22
|
-
/**
|
|
23
|
-
* CSS classes applied to the button element
|
|
24
|
-
*/
|
|
25
|
-
@Input() class: string = '';
|
|
26
|
-
/**
|
|
27
|
-
* CSS classes for the text span
|
|
28
|
-
*/
|
|
29
|
-
@Input() textClass: string = '';
|
|
30
|
-
/**
|
|
31
|
-
* CSS classes for the icon element
|
|
32
|
-
*/
|
|
33
|
-
@Input() iconClass: string = '';
|
|
34
|
-
/**
|
|
35
|
-
* Optional style token for icon color
|
|
36
|
-
*/
|
|
37
|
-
@Input() iconStyleType: TBaseStyle | undefined = undefined;
|
|
38
|
-
/**
|
|
39
|
-
* Position of the icon relative to the text
|
|
40
|
-
* @see TButtonIconPosition
|
|
41
|
-
*/
|
|
42
|
-
@Input() iconPosition: TButtonIconPosition = 'left';
|
|
43
|
-
/**
|
|
44
|
-
* Type of the button
|
|
45
|
-
* @see TButtonType
|
|
46
|
-
*/
|
|
47
|
-
@Input() type: TButtonType = 'button';
|
|
48
|
-
/**
|
|
49
|
-
* Size of the button
|
|
50
|
-
* @see TButtonSize
|
|
51
|
-
*/
|
|
52
|
-
@Input() size: TButtonSize = 'medium';
|
|
53
|
-
/**
|
|
54
|
-
* Router link for navigation
|
|
55
|
-
*/
|
|
56
|
-
@Input() buttonRouterLink: string | (string | number)[] | null | undefined = null;
|
|
57
|
-
/**
|
|
58
|
-
* CSS classes applied when the button is active
|
|
59
|
-
*/
|
|
60
|
-
@Input() buttonRouterLinkActive: string | string[] = '';
|
|
61
|
-
/**
|
|
62
|
-
* Determines whether the button is disabled
|
|
63
|
-
*/
|
|
64
|
-
@Input() disabled: boolean | null = null;
|
|
65
|
-
/**
|
|
66
|
-
* Style type of the button
|
|
67
|
-
* @see TButtonStyle
|
|
68
|
-
*/
|
|
69
|
-
@Input() styleType: TButtonStyle = 'primary';
|
|
70
|
-
/**
|
|
71
|
-
* Shape of the button.
|
|
72
|
-
* @see TButtonShape
|
|
73
|
-
*/
|
|
74
|
-
@Input() shape: TButtonShape = 'default';
|
|
75
|
-
/**
|
|
76
|
-
* Text content of the button
|
|
77
|
-
*/
|
|
78
|
-
@Input() text: string = '';
|
|
79
|
-
/**
|
|
80
|
-
* Accessible label for icon-only buttons
|
|
81
|
-
*/
|
|
82
|
-
@Input() ariaLabel: string = '';
|
|
83
|
-
/**
|
|
84
|
-
* Emits when the button is clicked
|
|
85
|
-
*/
|
|
86
|
-
@Output() clickEvent: EventEmitter<void> = new EventEmitter();
|
|
87
|
-
|
|
88
|
-
/**
|
|
89
|
-
* CSS classes applied to the container element based on its position
|
|
90
|
-
* @see TButtonStyle
|
|
91
|
-
*/
|
|
92
|
-
public get containerNgClass() {
|
|
93
|
-
return {
|
|
94
|
-
'flex-column-reverse': this.iconPosition === 'top',
|
|
95
|
-
'flex-row-reverse': this.iconPosition === 'left',
|
|
96
|
-
'flex-row': this.iconPosition === 'right',
|
|
97
|
-
'flex-column': this.iconPosition === 'bottom'
|
|
98
|
-
};
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
* CSS classes applied to the icon element based on its position
|
|
103
|
-
* @see TButtonIconPosition
|
|
104
|
-
*/
|
|
105
|
-
public get iconNgClass() {
|
|
106
|
-
return {
|
|
107
|
-
'mb-2': this.iconPosition === 'top',
|
|
108
|
-
'me-2': this.iconPosition === 'left',
|
|
109
|
-
'ms-2': this.iconPosition === 'right',
|
|
110
|
-
'mt-2': this.iconPosition === 'bottom'
|
|
111
|
-
};
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
/**
|
|
115
|
-
* Combined classes for icon color + spacing
|
|
116
|
-
*/
|
|
117
|
-
public get iconClassMap() {
|
|
118
|
-
const hasText = !!this.text;
|
|
119
|
-
return {
|
|
120
|
-
'frg-btn__icon-primary': this.iconStyleType === 'primary',
|
|
121
|
-
'frg-btn__icon-secondary': this.iconStyleType === 'secondary',
|
|
122
|
-
'frg-btn__icon-tertiary': this.iconStyleType === 'tertiary',
|
|
123
|
-
'frg-btn__icon-info': this.iconStyleType === 'info',
|
|
124
|
-
'frg-btn__icon-success': this.iconStyleType === 'success',
|
|
125
|
-
'frg-btn__icon-warning': this.iconStyleType === 'warning',
|
|
126
|
-
'frg-btn__icon-danger': this.iconStyleType === 'danger',
|
|
127
|
-
'frg-btn__icon-dark': this.iconStyleType === 'dark',
|
|
128
|
-
'frg-btn__icon-light': this.iconStyleType === 'light',
|
|
129
|
-
'frg-btn__icon-pill': this.shape === 'pill' && hasText,
|
|
130
|
-
...(hasText ? this.iconNgClass : {})
|
|
131
|
-
};
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
/**
|
|
135
|
-
* Emits when the button is clicked
|
|
136
|
-
*/
|
|
137
|
-
onClick(): void {
|
|
138
|
-
if(!this.disabled) {
|
|
139
|
-
this.clickEvent.emit();
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { TBasePosition, TBaseSize, TBaseStyle } from '../../types/base.types';
|
|
2
|
-
|
|
3
|
-
export type TButtonType = 'button' | 'reset' | 'submit';
|
|
4
|
-
export type TButtonStyle = TBaseStyle | 'ghost' | 'icon' | 'neutral';
|
|
5
|
-
export type TButtonSize = TBaseSize;
|
|
6
|
-
export type TButtonIconPosition = TBasePosition;
|
|
7
|
-
export type TButtonShape = 'default' | 'pill';
|