@sixbell-telco/sdk 0.1.4 → 0.1.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/CHANGELOG.md +128 -4
- package/README.md +40 -8
- package/components/accordion/accordion-item/accordion-item.component.d.ts +9 -6
- package/components/avatar/src/avatar.component.d.ts +17 -12
- package/components/button/src/button.component.d.ts +29 -28
- package/components/card/src/card.component.d.ts +18 -12
- package/components/dropdown/src/dropdown.component.d.ts +29 -27
- package/components/dual-list/src/dual-list.component.d.ts +47 -37
- package/components/file-upload/file-uploader/src/file-uploader.component.d.ts +20 -11
- package/components/forms/checkbox/src/checkbox.component.d.ts +7 -3
- package/components/forms/combobox/src/combobox.component.d.ts +17 -16
- package/components/forms/input/src/input.component.d.ts +20 -15
- package/components/forms/radio/src/radio.component.d.ts +14 -1
- package/components/forms/range/src/range.component.d.ts +11 -11
- package/components/forms/select/src/select.component.d.ts +17 -15
- package/components/forms/switch/src/switch.component.d.ts +11 -11
- package/components/forms/textarea/src/textarea.component.d.ts +20 -16
- package/components/forms/toggle/src/toggle.component.d.ts +12 -7
- package/components/icon/src/icon.component.d.ts +12 -7
- package/components/link/src/link.component.d.ts +27 -16
- package/components/modal/src/modal.component.d.ts +18 -7
- package/components/notification/src/notification.component.d.ts +15 -7
- package/components/paginator/components/pagination-item/pagination-item.component.d.ts +18 -7
- package/components/product-card/src/product-card.component.d.ts +42 -17
- package/components/progress/src/progress.component.d.ts +9 -7
- package/components/tab/directives/tab-content/tab-content.directive.d.ts +8 -10
- package/components/tab/directives/tab-header/tab-header.directive.d.ts +9 -12
- package/components/tab/src/tab.component.d.ts +14 -9
- package/components/table/src/table.component.d.ts +28 -17
- package/components/toast/toast-message/toast-message.component.d.ts +9 -7
- package/components/tooltip/src/tooltip.component.d.ts +12 -7
- package/components/wizard/wizard-content/wizard-content.component.d.ts +3 -3
- package/directives/typography/src/typography.directive.d.ts +13 -12
- package/esm2022/components/accordion/accordion-item/accordion-item.component.mjs +9 -9
- package/esm2022/components/accordion/src/accordion.component.mjs +5 -5
- package/esm2022/components/avatar/src/avatar.component.mjs +9 -9
- package/esm2022/components/button/src/button.component.mjs +15 -13
- package/esm2022/components/card/src/card.component.mjs +9 -9
- package/esm2022/components/countdown/src/countdown.component.mjs +4 -4
- package/esm2022/components/dropdown/src/dropdown.component.mjs +17 -13
- package/esm2022/components/dual-list/src/dual-list.component.mjs +55 -35
- package/esm2022/components/file-upload/file-dropzone/src/file-dropzone.component.mjs +5 -6
- package/esm2022/components/file-upload/file-uploader/src/file-uploader.component.mjs +30 -24
- package/esm2022/components/forms/checkbox/src/checkbox.component.mjs +11 -11
- package/esm2022/components/forms/combobox/src/combobox.component.mjs +33 -30
- package/esm2022/components/forms/datepicker/src/datepicker-format-month.pipe.mjs +4 -4
- package/esm2022/components/forms/datepicker/src/datepicker.component.mjs +6 -6
- package/esm2022/components/forms/form-error/src/form-error.component.mjs +5 -5
- package/esm2022/components/forms/input/src/input.component.mjs +36 -36
- package/esm2022/components/forms/radio/src/radio.component.mjs +55 -6
- package/esm2022/components/forms/range/src/range.component.mjs +16 -15
- package/esm2022/components/forms/select/src/select.component.mjs +32 -30
- package/esm2022/components/forms/switch/src/switch.component.mjs +17 -16
- package/esm2022/components/forms/textarea/src/textarea.component.mjs +37 -38
- package/esm2022/components/forms/toggle/src/toggle.component.mjs +115 -92
- package/esm2022/components/icon/src/icon.component.mjs +11 -10
- package/esm2022/components/link/src/link.component.mjs +28 -22
- package/esm2022/components/modal/src/modal.component.mjs +19 -15
- package/esm2022/components/notification/src/notification.component.mjs +12 -10
- package/esm2022/components/paginator/components/pagination-item/pagination-item.component.mjs +20 -17
- package/esm2022/components/paginator/src/paginator.component.mjs +5 -5
- package/esm2022/components/product-card/directives/product-card-actions.directive.mjs +4 -4
- package/esm2022/components/product-card/directives/product-card-content.directive.mjs +4 -4
- package/esm2022/components/product-card/directives/product-card-header.directive.mjs +4 -4
- package/esm2022/components/product-card/src/product-card.component.mjs +54 -48
- package/esm2022/components/progress/src/progress.component.mjs +13 -13
- package/esm2022/components/tab/directives/tab-content/tab-content.directive.mjs +16 -15
- package/esm2022/components/tab/directives/tab-header/tab-header.directive.mjs +19 -17
- package/esm2022/components/tab/src/tab.component.mjs +19 -17
- package/esm2022/components/table/src/table.component.mjs +34 -25
- package/esm2022/components/table/table-header-checkbox/table-header-checkbox.component.mjs +4 -4
- package/esm2022/components/table/table-row-checkbox/table-row-checkbox.component.mjs +4 -4
- package/esm2022/components/toast/services/toast.service.mjs +4 -4
- package/esm2022/components/toast/toast-message/toast-message.component.mjs +24 -19
- package/esm2022/components/toast/toasts-container/toasts-container.component.mjs +4 -4
- package/esm2022/components/tooltip/src/tooltip.component.mjs +14 -12
- package/esm2022/components/wizard/wizard-content/wizard-content.component.mjs +8 -8
- package/esm2022/components/wizard/wizard-marker/wizard-marker.component.mjs +5 -5
- package/esm2022/components/wizard/wizard-step/wizard-step.component.mjs +5 -6
- package/esm2022/components/wizard/wizard-sub-step/wizard-sub-step.component.mjs +4 -4
- package/esm2022/components/wizard/wizard-wrapper/wizard-wrapper.component.mjs +5 -13
- package/esm2022/directives/typography/src/typography.directive.mjs +11 -8
- package/esm2022/utils/pipes/extract-extension/src/extract-extension.mjs +4 -4
- package/esm2022/utils/pipes/to-bytes-extesion/src/to-bytes.pipe.mjs +4 -4
- package/fesm2022/sixbell-telco-sdk-components-accordion.mjs +13 -13
- package/fesm2022/sixbell-telco-sdk-components-accordion.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-avatar.mjs +9 -9
- package/fesm2022/sixbell-telco-sdk-components-avatar.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-button.mjs +15 -13
- package/fesm2022/sixbell-telco-sdk-components-button.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-card.mjs +9 -9
- package/fesm2022/sixbell-telco-sdk-components-card.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-countdown.mjs +3 -3
- package/fesm2022/sixbell-telco-sdk-components-countdown.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-dropdown.mjs +17 -13
- package/fesm2022/sixbell-telco-sdk-components-dropdown.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-dual-list.mjs +53 -33
- package/fesm2022/sixbell-telco-sdk-components-dual-list.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-file-upload-file-dropzone.mjs +4 -5
- package/fesm2022/sixbell-telco-sdk-components-file-upload-file-dropzone.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-file-upload-file-uploader.mjs +29 -23
- package/fesm2022/sixbell-telco-sdk-components-file-upload-file-uploader.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-checkbox.mjs +10 -10
- package/fesm2022/sixbell-telco-sdk-components-forms-checkbox.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-combobox.mjs +32 -29
- package/fesm2022/sixbell-telco-sdk-components-forms-combobox.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-datepicker.mjs +8 -8
- package/fesm2022/sixbell-telco-sdk-components-forms-datepicker.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-form-error.mjs +4 -4
- package/fesm2022/sixbell-telco-sdk-components-forms-form-error.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-input.mjs +35 -35
- package/fesm2022/sixbell-telco-sdk-components-forms-input.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-radio.mjs +54 -5
- package/fesm2022/sixbell-telco-sdk-components-forms-radio.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-range.mjs +15 -14
- package/fesm2022/sixbell-telco-sdk-components-forms-range.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-select.mjs +31 -29
- package/fesm2022/sixbell-telco-sdk-components-forms-select.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-switch.mjs +16 -15
- package/fesm2022/sixbell-telco-sdk-components-forms-switch.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-textarea.mjs +36 -37
- package/fesm2022/sixbell-telco-sdk-components-forms-textarea.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-toggle.mjs +115 -92
- package/fesm2022/sixbell-telco-sdk-components-forms-toggle.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-icon.mjs +11 -10
- package/fesm2022/sixbell-telco-sdk-components-icon.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-link.mjs +28 -22
- package/fesm2022/sixbell-telco-sdk-components-link.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-modal.mjs +19 -15
- package/fesm2022/sixbell-telco-sdk-components-modal.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-notification.mjs +12 -10
- package/fesm2022/sixbell-telco-sdk-components-notification.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-paginator.mjs +24 -21
- package/fesm2022/sixbell-telco-sdk-components-paginator.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-product-card.mjs +63 -57
- package/fesm2022/sixbell-telco-sdk-components-product-card.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-progress.mjs +13 -13
- package/fesm2022/sixbell-telco-sdk-components-progress.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-tab.mjs +52 -47
- package/fesm2022/sixbell-telco-sdk-components-tab.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-table.mjs +41 -31
- package/fesm2022/sixbell-telco-sdk-components-table.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-toast.mjs +30 -25
- package/fesm2022/sixbell-telco-sdk-components-toast.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-tooltip.mjs +14 -12
- package/fesm2022/sixbell-telco-sdk-components-tooltip.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-wizard.mjs +22 -30
- package/fesm2022/sixbell-telco-sdk-components-wizard.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-directives-typography.mjs +10 -7
- package/fesm2022/sixbell-telco-sdk-directives-typography.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-utils-pipes-extract-extension.mjs +3 -3
- package/fesm2022/sixbell-telco-sdk-utils-pipes-extract-extension.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-utils-pipes-to-bytes-extesion.mjs +3 -3
- package/fesm2022/sixbell-telco-sdk-utils-pipes-to-bytes-extesion.mjs.map +1 -1
- package/package.json +30 -24
|
@@ -7,15 +7,15 @@ import { cva } from 'class-variance-authority';
|
|
|
7
7
|
class AccordionComponent {
|
|
8
8
|
name = input('accordion');
|
|
9
9
|
type = input('default');
|
|
10
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
11
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.
|
|
10
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: AccordionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
11
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.12", type: AccordionComponent, isStandalone: true, selector: "app-accordion", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div class=\"join join-vertical w-full\">\n\t<ng-content></ng-content>\n</div>\n" });
|
|
12
12
|
}
|
|
13
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
13
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: AccordionComponent, decorators: [{
|
|
14
14
|
type: Component,
|
|
15
|
-
args: [{ selector: 'app-accordion', standalone: true, imports: [], template: "<div class=\"join join-vertical w-full\">\n\
|
|
15
|
+
args: [{ selector: 'app-accordion', standalone: true, imports: [], template: "<div class=\"join join-vertical w-full\">\n\t<ng-content></ng-content>\n</div>\n" }]
|
|
16
16
|
}] });
|
|
17
17
|
|
|
18
|
-
const
|
|
18
|
+
const accordionItemComponent = cva(['collapse join-item border border-secondary'], {
|
|
19
19
|
variants: {
|
|
20
20
|
variant: {
|
|
21
21
|
default: [],
|
|
@@ -32,7 +32,7 @@ class AccordionItemComponent {
|
|
|
32
32
|
header = input('');
|
|
33
33
|
opened = input(false);
|
|
34
34
|
variant = input();
|
|
35
|
-
|
|
35
|
+
classes = input('');
|
|
36
36
|
name;
|
|
37
37
|
type;
|
|
38
38
|
constructor(accordion) {
|
|
@@ -40,15 +40,15 @@ class AccordionItemComponent {
|
|
|
40
40
|
this.name = this.accordion.name();
|
|
41
41
|
this.type = this.accordion.type() === 'single' ? 'radio' : 'checkbox';
|
|
42
42
|
}
|
|
43
|
-
get
|
|
44
|
-
return cn(
|
|
43
|
+
get componentClass() {
|
|
44
|
+
return cn(accordionItemComponent({ variant: this.variant() }), this.classes());
|
|
45
45
|
}
|
|
46
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
47
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.
|
|
46
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: AccordionItemComponent, deps: [{ token: AccordionComponent, host: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
47
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.12", type: AccordionItemComponent, isStandalone: true, selector: "app-accordion-item", inputs: { header: { classPropertyName: "header", publicName: "header", isSignal: true, isRequired: false, transformFunction: null }, opened: { classPropertyName: "opened", publicName: "opened", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, classes: { classPropertyName: "classes", publicName: "classes", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div [class]=\"componentClass\">\n\t<input [type]=\"type\" [name]=\"name\" [checked]=\"opened()\" />\n\t<div class=\"collapse-title\">\n\t\t<span typography [typographyVariant]=\"'body-sm'\" [typographyColor]=\"'inherit'\" [typographyFontWeight]=\"'normal'\">\n\t\t\t{{ header() }}\n\t\t</span>\n\t</div>\n\t<div class=\"collapse-content\">\n\t\t<ng-content></ng-content>\n\t</div>\n</div>\n", dependencies: [{ kind: "directive", type: TypographyDirective, selector: "[typography]", inputs: ["typographyVariant", "typographyColor", "typographyFontWeight", "classes"] }] });
|
|
48
48
|
}
|
|
49
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
49
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: AccordionItemComponent, decorators: [{
|
|
50
50
|
type: Component,
|
|
51
|
-
args: [{ selector: 'app-accordion-item', standalone: true, imports: [TypographyDirective], template: "<div [class]=\"
|
|
51
|
+
args: [{ selector: 'app-accordion-item', standalone: true, imports: [TypographyDirective], template: "<div [class]=\"componentClass\">\n\t<input [type]=\"type\" [name]=\"name\" [checked]=\"opened()\" />\n\t<div class=\"collapse-title\">\n\t\t<span typography [typographyVariant]=\"'body-sm'\" [typographyColor]=\"'inherit'\" [typographyFontWeight]=\"'normal'\">\n\t\t\t{{ header() }}\n\t\t</span>\n\t</div>\n\t<div class=\"collapse-content\">\n\t\t<ng-content></ng-content>\n\t</div>\n</div>\n" }]
|
|
52
52
|
}], ctorParameters: () => [{ type: AccordionComponent, decorators: [{
|
|
53
53
|
type: Host
|
|
54
54
|
}] }] });
|
|
@@ -57,5 +57,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImpor
|
|
|
57
57
|
* Generated bundle index. Do not edit.
|
|
58
58
|
*/
|
|
59
59
|
|
|
60
|
-
export { AccordionComponent, AccordionItemComponent,
|
|
60
|
+
export { AccordionComponent, AccordionItemComponent, accordionItemComponent };
|
|
61
61
|
//# sourceMappingURL=sixbell-telco-sdk-components-accordion.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sixbell-telco-sdk-components-accordion.mjs","sources":["../../../projects/sdk/components/accordion/src/accordion.component.ts","../../../projects/sdk/components/accordion/src/accordion.component.html","../../../projects/sdk/components/accordion/accordion-item/accordion-item.component.ts","../../../projects/sdk/components/accordion/accordion-item/accordion-item.component.html","../../../projects/sdk/components/accordion/sixbell-telco-sdk-components-accordion.ts"],"sourcesContent":["import { Component, input } from '@angular/core';\n\n@Component({\n\tselector: 'app-accordion',\n\tstandalone: true,\n\timports: [],\n\ttemplateUrl: './accordion.component.html',\n})\nexport class AccordionComponent {\n\tname = input('accordion');\n\ttype = input<'default' | 'single'>('default');\n}\n","<div class=\"join join-vertical w-full\">\n\
|
|
1
|
+
{"version":3,"file":"sixbell-telco-sdk-components-accordion.mjs","sources":["../../../projects/sdk/components/accordion/src/accordion.component.ts","../../../projects/sdk/components/accordion/src/accordion.component.html","../../../projects/sdk/components/accordion/accordion-item/accordion-item.component.ts","../../../projects/sdk/components/accordion/accordion-item/accordion-item.component.html","../../../projects/sdk/components/accordion/sixbell-telco-sdk-components-accordion.ts"],"sourcesContent":["import { Component, input } from '@angular/core';\n\n@Component({\n\tselector: 'app-accordion',\n\tstandalone: true,\n\timports: [],\n\ttemplateUrl: './accordion.component.html',\n})\nexport class AccordionComponent {\n\tname = input('accordion');\n\ttype = input<'default' | 'single'>('default');\n}\n","<div class=\"join join-vertical w-full\">\n\t<ng-content></ng-content>\n</div>\n","import { Component, Host, input } from '@angular/core';\nimport { TypographyDirective } from '@sixbell-telco/sdk/directives/typography';\nimport { cn } from '@sixbell-telco/sdk/utils/cn';\nimport { cva } from 'class-variance-authority';\nimport { AccordionComponent } from '../src/accordion.component';\n\nexport const accordionItemComponent = cva(['collapse join-item border border-secondary'], {\n\tvariants: {\n\t\tvariant: {\n\t\t\tdefault: [],\n\t\t\tarrow: ['collapse-arrow'],\n\t\t\tplus: ['collapse-plus'],\n\t\t},\n\t},\n\tdefaultVariants: {\n\t\tvariant: 'default',\n\t},\n});\n\nexport type AccordionVariantProps = 'default' | 'arrow' | 'plus' | null | undefined;\n\nexport type AccordionItemProps = {\n\tvariant?: AccordionVariantProps;\n};\n\n@Component({\n\tselector: 'app-accordion-item',\n\tstandalone: true,\n\timports: [TypographyDirective],\n\ttemplateUrl: './accordion-item.component.html',\n})\nexport class AccordionItemComponent {\n\theader = input('');\n\topened = input(false);\n\n\tvariant = input<AccordionVariantProps>();\n\tclasses = input('');\n\tname: string;\n\ttype: string;\n\n\tconstructor(@Host() private accordion: AccordionComponent) {\n\t\tthis.name = this.accordion.name();\n\t\tthis.type = this.accordion.type() === 'single' ? 'radio' : 'checkbox';\n\t}\n\n\tget componentClass() {\n\t\treturn cn(accordionItemComponent({ variant: this.variant() }), this.classes());\n\t}\n}\n","<div [class]=\"componentClass\">\n\t<input [type]=\"type\" [name]=\"name\" [checked]=\"opened()\" />\n\t<div class=\"collapse-title\">\n\t\t<span typography [typographyVariant]=\"'body-sm'\" [typographyColor]=\"'inherit'\" [typographyFontWeight]=\"'normal'\">\n\t\t\t{{ header() }}\n\t\t</span>\n\t</div>\n\t<div class=\"collapse-content\">\n\t\t<ng-content></ng-content>\n\t</div>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.AccordionComponent"],"mappings":";;;;;;MAQa,kBAAkB,CAAA;AAC9B,IAAA,IAAI,GAAG,KAAK,CAAC,WAAW,CAAC,CAAC;AAC1B,IAAA,IAAI,GAAG,KAAK,CAAuB,SAAS,CAAC,CAAC;wGAFlC,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,E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,iBAAA,EAAA,sBAAA,EAAA,SAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;4FAGjB,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBANlC,SAAS;AACC,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,oBAAoB,EAClB,UAAA,EAAA,IAAI,EACP,OAAA,EAAA,CAAC,mBAAmB,CAAC,EAAA,QAAA,EAAA,yYAAA,EAAA,CAAA;;0BAYjB,IAAI;;;AExClB;;AAEG;;;;"}
|
|
@@ -4,7 +4,7 @@ import { TypographyDirective } from '@sixbell-telco/sdk/directives/typography';
|
|
|
4
4
|
import { cn } from '@sixbell-telco/sdk/utils/cn';
|
|
5
5
|
import { cva } from 'class-variance-authority';
|
|
6
6
|
|
|
7
|
-
const
|
|
7
|
+
const avatarComponent = cva([], {
|
|
8
8
|
variants: {
|
|
9
9
|
variant: {
|
|
10
10
|
primary: [
|
|
@@ -43,15 +43,15 @@ class AvatarComponent {
|
|
|
43
43
|
variant = input();
|
|
44
44
|
shape = input();
|
|
45
45
|
size = input();
|
|
46
|
-
|
|
46
|
+
classes = input('');
|
|
47
47
|
type = input('quick');
|
|
48
48
|
user = input.required();
|
|
49
49
|
disabled = input(false);
|
|
50
50
|
get initials() {
|
|
51
51
|
return `${this.user().firstName[0].toUpperCase()}${this.user().lastName[0].toUpperCase()}`;
|
|
52
52
|
}
|
|
53
|
-
get
|
|
54
|
-
return cn(
|
|
53
|
+
get componentClass() {
|
|
54
|
+
return cn(avatarComponent({ variant: this.variant(), shape: this.shape(), size: this.size(), class: this.classes() }));
|
|
55
55
|
}
|
|
56
56
|
get profile() {
|
|
57
57
|
return this.formatTitleCase(this.user().profile);
|
|
@@ -65,17 +65,17 @@ class AvatarComponent {
|
|
|
65
65
|
.map((word) => word[0].toUpperCase() + word.slice(1))
|
|
66
66
|
.join(' ');
|
|
67
67
|
}
|
|
68
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
69
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.
|
|
68
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: AvatarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
69
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.12", type: AvatarComponent, isStandalone: true, selector: "app-avatar", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, shape: { classPropertyName: "shape", publicName: "shape", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, classes: { classPropertyName: "classes", publicName: "classes", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, user: { classPropertyName: "user", publicName: "user", isSignal: true, isRequired: true, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@if (type() === 'quick') {\n\t<button [class]=\"componentClass\" type=\"button\" [disabled]=\"disabled()\">\n\t\t<span typography [typographyVariant]=\"'body'\" [typographyColor]=\"'inherit'\" [typographyFontWeight]=\"'semibold'\">{{ initials }}</span>\n\t</button>\n}\n\n@if (type() === 'profile') {\n\t<div class=\"flex items-center gap-2\">\n\t\t<button [class]=\"componentClass\" type=\"button\" [disabled]=\"disabled()\">\n\t\t\t<span typography [typographyVariant]=\"'body'\" [typographyColor]=\"'inherit'\" [typographyFontWeight]=\"'semibold'\">{{ initials }}</span>\n\t\t</button>\n\t\t<div class=\"max-w-36\">\n\t\t\t<p class=\"space-x-1 truncate\">\n\t\t\t\t<span typography [typographyVariant]=\"'body-sm'\" [typographyColor]=\"'black'\" [typographyFontWeight]=\"'semibold'\">Perfil:</span>\n\t\t\t\t<span typography [typographyVariant]=\"'body-sm'\" [typographyColor]=\"'black'\" [typographyFontWeight]=\"'normal'\">{{ profile }}</span>\n\t\t\t</p>\n\t\t\t<p class=\"space-x-1 truncate\">\n\t\t\t\t<span typography [typographyVariant]=\"'body-sm'\" [typographyColor]=\"'black'\" [typographyFontWeight]=\"'semibold'\">Cliente:</span>\n\t\t\t\t<span typography [typographyVariant]=\"'body-sm'\" [typographyColor]=\"'black'\" [typographyFontWeight]=\"'normal'\">{{ client }}</span>\n\t\t\t</p>\n\t\t</div>\n\t</div>\n}\n", styles: [""], dependencies: [{ kind: "directive", type: TypographyDirective, selector: "[typography]", inputs: ["typographyVariant", "typographyColor", "typographyFontWeight", "classes"] }] });
|
|
70
70
|
}
|
|
71
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
71
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: AvatarComponent, decorators: [{
|
|
72
72
|
type: Component,
|
|
73
|
-
args: [{ selector: 'app-avatar', standalone: true, imports: [TypographyDirective], template: "@if (type() === 'quick') {\n\t<button [class]=\"
|
|
73
|
+
args: [{ selector: 'app-avatar', standalone: true, imports: [TypographyDirective], template: "@if (type() === 'quick') {\n\t<button [class]=\"componentClass\" type=\"button\" [disabled]=\"disabled()\">\n\t\t<span typography [typographyVariant]=\"'body'\" [typographyColor]=\"'inherit'\" [typographyFontWeight]=\"'semibold'\">{{ initials }}</span>\n\t</button>\n}\n\n@if (type() === 'profile') {\n\t<div class=\"flex items-center gap-2\">\n\t\t<button [class]=\"componentClass\" type=\"button\" [disabled]=\"disabled()\">\n\t\t\t<span typography [typographyVariant]=\"'body'\" [typographyColor]=\"'inherit'\" [typographyFontWeight]=\"'semibold'\">{{ initials }}</span>\n\t\t</button>\n\t\t<div class=\"max-w-36\">\n\t\t\t<p class=\"space-x-1 truncate\">\n\t\t\t\t<span typography [typographyVariant]=\"'body-sm'\" [typographyColor]=\"'black'\" [typographyFontWeight]=\"'semibold'\">Perfil:</span>\n\t\t\t\t<span typography [typographyVariant]=\"'body-sm'\" [typographyColor]=\"'black'\" [typographyFontWeight]=\"'normal'\">{{ profile }}</span>\n\t\t\t</p>\n\t\t\t<p class=\"space-x-1 truncate\">\n\t\t\t\t<span typography [typographyVariant]=\"'body-sm'\" [typographyColor]=\"'black'\" [typographyFontWeight]=\"'semibold'\">Cliente:</span>\n\t\t\t\t<span typography [typographyVariant]=\"'body-sm'\" [typographyColor]=\"'black'\" [typographyFontWeight]=\"'normal'\">{{ client }}</span>\n\t\t\t</p>\n\t\t</div>\n\t</div>\n}\n" }]
|
|
74
74
|
}] });
|
|
75
75
|
|
|
76
76
|
/**
|
|
77
77
|
* Generated bundle index. Do not edit.
|
|
78
78
|
*/
|
|
79
79
|
|
|
80
|
-
export { AvatarComponent,
|
|
80
|
+
export { AvatarComponent, avatarComponent };
|
|
81
81
|
//# sourceMappingURL=sixbell-telco-sdk-components-avatar.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sixbell-telco-sdk-components-avatar.mjs","sources":["../../../projects/sdk/components/avatar/src/avatar.component.ts","../../../projects/sdk/components/avatar/src/avatar.component.html","../../../projects/sdk/components/avatar/sixbell-telco-sdk-components-avatar.ts"],"sourcesContent":["import { Component, input } from '@angular/core';\nimport { TypographyDirective } from '@sixbell-telco/sdk/directives/typography';\nimport { cn } from '@sixbell-telco/sdk/utils/cn';\n// import { formatTitleCase } from '@shared/utils/formaters/title-case';\nimport { cva } from 'class-variance-authority';\n\nexport type
|
|
1
|
+
{"version":3,"file":"sixbell-telco-sdk-components-avatar.mjs","sources":["../../../projects/sdk/components/avatar/src/avatar.component.ts","../../../projects/sdk/components/avatar/src/avatar.component.html","../../../projects/sdk/components/avatar/sixbell-telco-sdk-components-avatar.ts"],"sourcesContent":["import { Component, input } from '@angular/core';\nimport { TypographyDirective } from '@sixbell-telco/sdk/directives/typography';\nimport { cn } from '@sixbell-telco/sdk/utils/cn';\n// import { formatTitleCase } from '@shared/utils/formaters/title-case';\nimport { cva } from 'class-variance-authority';\n\nexport type AvatarUser = {\n\tfirstName: string;\n\tlastName: string;\n\temail: string;\n\tprofile: string;\n\tclient: string;\n};\n\nexport type AvatarTypes = 'quick' | 'profile';\n\nexport const avatarComponent = cva([], {\n\tvariants: {\n\t\tvariant: {\n\t\t\tprimary: [\n\t\t\t\t'btn',\n\t\t\t\t'btn-circle',\n\t\t\t\t'btn-outline',\n\t\t\t\t'text-neutral',\n\t\t\t\t'border-ring',\n\t\t\t\t'bg-secondary-muted',\n\t\t\t\t'hover:text-neutral',\n\t\t\t\t'active:hover:text-neutral-content',\n\t\t\t\t'hover:border-ring-accent',\n\t\t\t\t'hover:bg-secondary-muted',\n\t\t\t\t'active:hover:bg-ring-accent',\n\t\t\t\t'active:focus:border-ring-accent',\n\t\t\t],\n\t\t},\n\t\tshape: {\n\t\t\t'round-xs': ['rounded-btn-xs'],\n\t\t\t'round-sm': ['rounded-btn-sm'],\n\t\t\t'round-md': ['rounded-btn-md'],\n\t\t\t'round-lg': ['rounded-btn-lg'],\n\t\t},\n\t\tsize: {\n\t\t\tauto: [],\n\t\t},\n\t},\n\tcompoundVariants: [],\n\tdefaultVariants: {\n\t\tvariant: 'primary',\n\t\tshape: 'round-lg',\n\t\tsize: 'auto',\n\t},\n});\n\nexport type AvatarVariantProps = 'primary' | null | undefined;\nexport type AvatarShapeProps = 'round-xs' | 'round-sm' | 'round-md' | 'round-lg' | null | undefined;\nexport type AvatarSizeProps = 'auto' | null | undefined;\n\nexport type AvatarProps = {\n\tvariant?: AvatarVariantProps;\n\tshape?: AvatarShapeProps;\n\tsize?: AvatarSizeProps;\n};\n\n@Component({\n\tselector: 'app-avatar',\n\tstandalone: true,\n\timports: [TypographyDirective],\n\ttemplateUrl: './avatar.component.html',\n\tstyles: '',\n})\nexport class AvatarComponent {\n\tvariant = input<AvatarVariantProps>();\n\tshape = input<AvatarShapeProps>();\n\tsize = input<AvatarSizeProps>();\n\tclasses = input<string>('');\n\ttype = input<AvatarTypes>('quick');\n\tuser = input.required<AvatarUser>();\n\tdisabled = input<boolean>(false);\n\n\tget initials(): string {\n\t\treturn `${this.user().firstName[0].toUpperCase()}${this.user().lastName[0].toUpperCase()}`;\n\t}\n\n\tget componentClass() {\n\t\treturn cn(avatarComponent({ variant: this.variant(), shape: this.shape(), size: this.size(), class: this.classes() }));\n\t}\n\n\tget profile() {\n\t\treturn this.formatTitleCase(this.user().profile);\n\t}\n\n\tget client() {\n\t\treturn this.formatTitleCase(this.user().client);\n\t}\n\n\tformatTitleCase(value: string): string {\n\t\treturn value\n\t\t\t.split(' ')\n\t\t\t.map((word) => word[0].toUpperCase() + word.slice(1))\n\t\t\t.join(' ');\n\t}\n}\n","@if (type() === 'quick') {\n\t<button [class]=\"componentClass\" type=\"button\" [disabled]=\"disabled()\">\n\t\t<span typography [typographyVariant]=\"'body'\" [typographyColor]=\"'inherit'\" [typographyFontWeight]=\"'semibold'\">{{ initials }}</span>\n\t</button>\n}\n\n@if (type() === 'profile') {\n\t<div class=\"flex items-center gap-2\">\n\t\t<button [class]=\"componentClass\" type=\"button\" [disabled]=\"disabled()\">\n\t\t\t<span typography [typographyVariant]=\"'body'\" [typographyColor]=\"'inherit'\" [typographyFontWeight]=\"'semibold'\">{{ initials }}</span>\n\t\t</button>\n\t\t<div class=\"max-w-36\">\n\t\t\t<p class=\"space-x-1 truncate\">\n\t\t\t\t<span typography [typographyVariant]=\"'body-sm'\" [typographyColor]=\"'black'\" [typographyFontWeight]=\"'semibold'\">Perfil:</span>\n\t\t\t\t<span typography [typographyVariant]=\"'body-sm'\" [typographyColor]=\"'black'\" [typographyFontWeight]=\"'normal'\">{{ profile }}</span>\n\t\t\t</p>\n\t\t\t<p class=\"space-x-1 truncate\">\n\t\t\t\t<span typography [typographyVariant]=\"'body-sm'\" [typographyColor]=\"'black'\" [typographyFontWeight]=\"'semibold'\">Cliente:</span>\n\t\t\t\t<span typography [typographyVariant]=\"'body-sm'\" [typographyColor]=\"'black'\" [typographyFontWeight]=\"'normal'\">{{ client }}</span>\n\t\t\t</p>\n\t\t</div>\n\t</div>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAgBa,MAAA,eAAe,GAAG,GAAG,CAAC,EAAE,EAAE;AACtC,IAAA,QAAQ,EAAE;AACT,QAAA,OAAO,EAAE;AACR,YAAA,OAAO,EAAE;gBACR,KAAK;gBACL,YAAY;gBACZ,aAAa;gBACb,cAAc;gBACd,aAAa;gBACb,oBAAoB;gBACpB,oBAAoB;gBACpB,mCAAmC;gBACnC,0BAA0B;gBAC1B,0BAA0B;gBAC1B,6BAA6B;gBAC7B,iCAAiC;AACjC,aAAA;AACD,SAAA;AACD,QAAA,KAAK,EAAE;YACN,UAAU,EAAE,CAAC,gBAAgB,CAAC;YAC9B,UAAU,EAAE,CAAC,gBAAgB,CAAC;YAC9B,UAAU,EAAE,CAAC,gBAAgB,CAAC;YAC9B,UAAU,EAAE,CAAC,gBAAgB,CAAC;AAC9B,SAAA;AACD,QAAA,IAAI,EAAE;AACL,YAAA,IAAI,EAAE,EAAE;AACR,SAAA;AACD,KAAA;AACD,IAAA,gBAAgB,EAAE,EAAE;AACpB,IAAA,eAAe,EAAE;AAChB,QAAA,OAAO,EAAE,SAAS;AAClB,QAAA,KAAK,EAAE,UAAU;AACjB,QAAA,IAAI,EAAE,MAAM;AACZ,KAAA;AACD,CAAA,EAAE;MAmBU,eAAe,CAAA;IAC3B,OAAO,GAAG,KAAK,EAAsB,CAAC;IACtC,KAAK,GAAG,KAAK,EAAoB,CAAC;IAClC,IAAI,GAAG,KAAK,EAAmB,CAAC;AAChC,IAAA,OAAO,GAAG,KAAK,CAAS,EAAE,CAAC,CAAC;AAC5B,IAAA,IAAI,GAAG,KAAK,CAAc,OAAO,CAAC,CAAC;AACnC,IAAA,IAAI,GAAG,KAAK,CAAC,QAAQ,EAAc,CAAC;AACpC,IAAA,QAAQ,GA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,mBAAA,EAAA,iBAAA,EAAA,sBAAA,EAAA,SAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;4FAIjB,eAAe,EAAA,UAAA,EAAA,CAAA;kBAP3B,SAAS;AACC,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,YAAY,EACV,UAAA,EAAA,IAAI,EACP,OAAA,EAAA,CAAC,mBAAmB,CAAC,EAAA,QAAA,EAAA,mzCAAA,EAAA,CAAA;;;AEjE/B;;AAEG;;;;"}
|
|
@@ -5,7 +5,7 @@ import { TypographyDirective } from '@sixbell-telco/sdk/directives/typography';
|
|
|
5
5
|
import { cn } from '@sixbell-telco/sdk/utils/cn';
|
|
6
6
|
import { cva, cx } from 'class-variance-authority';
|
|
7
7
|
|
|
8
|
-
const
|
|
8
|
+
const buttonContainer = cva(['btn'], {
|
|
9
9
|
variants: {
|
|
10
10
|
variant: {
|
|
11
11
|
primary: ['btn-primary', 'h-auto', 'active:hover:shadow-primary', 'active:focus:shadow-primary'],
|
|
@@ -113,7 +113,7 @@ const buttonIcon = cva(['flex items-center'], {
|
|
|
113
113
|
iconPosition: 'left',
|
|
114
114
|
},
|
|
115
115
|
});
|
|
116
|
-
const
|
|
116
|
+
const buttonComponent = ({ variant, shape, padding, height, width, alignment, iconPosition } = {}) => cx(buttonContainer({ variant, shape, padding, height, width, alignment }), buttonIcon({ iconPosition }));
|
|
117
117
|
class ButtonComponent {
|
|
118
118
|
variant = input();
|
|
119
119
|
shape = input();
|
|
@@ -122,39 +122,41 @@ class ButtonComponent {
|
|
|
122
122
|
width = input();
|
|
123
123
|
alignment = input();
|
|
124
124
|
iconPosition = input();
|
|
125
|
-
fontSize = input(
|
|
126
|
-
|
|
125
|
+
fontSize = input('body');
|
|
126
|
+
containerClasses = input('');
|
|
127
|
+
iconClasses = input('');
|
|
127
128
|
label = input('');
|
|
128
129
|
type = input('button');
|
|
129
130
|
iconName = input();
|
|
130
131
|
disabled = input(false);
|
|
131
|
-
get
|
|
132
|
-
return cn(
|
|
132
|
+
get containerClass() {
|
|
133
|
+
return cn(buttonContainer({
|
|
133
134
|
variant: this.variant(),
|
|
134
135
|
shape: this.shape(),
|
|
135
136
|
padding: this.padding(),
|
|
136
137
|
height: this.height(),
|
|
137
138
|
width: this.width(),
|
|
138
139
|
alignment: this.alignment(),
|
|
139
|
-
class: this.
|
|
140
|
+
class: this.containerClasses(),
|
|
140
141
|
}));
|
|
141
142
|
}
|
|
142
|
-
get
|
|
143
|
+
get iconClass() {
|
|
143
144
|
return cn(buttonIcon({
|
|
144
145
|
iconPosition: this.iconPosition(),
|
|
146
|
+
class: this.iconClasses(),
|
|
145
147
|
}));
|
|
146
148
|
}
|
|
147
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
148
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.
|
|
149
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: ButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
150
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.12", type: ButtonComponent, isStandalone: true, selector: "app-button", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, shape: { classPropertyName: "shape", publicName: "shape", isSignal: true, isRequired: false, transformFunction: null }, padding: { classPropertyName: "padding", publicName: "padding", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, alignment: { classPropertyName: "alignment", publicName: "alignment", isSignal: true, isRequired: false, transformFunction: null }, iconPosition: { classPropertyName: "iconPosition", publicName: "iconPosition", isSignal: true, isRequired: false, transformFunction: null }, fontSize: { classPropertyName: "fontSize", publicName: "fontSize", isSignal: true, isRequired: false, transformFunction: null }, containerClasses: { classPropertyName: "containerClasses", publicName: "containerClasses", isSignal: true, isRequired: false, transformFunction: null }, iconClasses: { classPropertyName: "iconClasses", publicName: "iconClasses", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, iconName: { classPropertyName: "iconName", publicName: "iconName", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@let variantVar = variant();\n@let iconNameVar = iconName();\n@let fontSizeVar = fontSize();\n\n@if (\n\tvariantVar === 'primary' ||\n\tvariantVar === 'warning' ||\n\tvariantVar === 'error' ||\n\tvariantVar === 'secondary' ||\n\tvariantVar === 'ghost-primary' ||\n\tvariantVar === 'ghost-error'\n) {\n\t<button [class]=\"containerClass\" [type]=\"type()\" [disabled]=\"disabled()\">\n\t\t@if (this.iconName()) {\n\t\t\t<span [class]=\"iconClass\">\n\t\t\t\t@if (this.label()) {\n\t\t\t\t\t<app-icon [iconName]=\"iconNameVar ?? 'search'\" color=\"inherit\" size=\"md\"></app-icon>\n\t\t\t\t\t<span typography [typographyVariant]=\"fontSizeVar\" [typographyColor]=\"'inherit'\" [typographyFontWeight]=\"'normal'\">{{ label() }}</span>\n\t\t\t\t}\n\t\t\t\t@if (!this.label()) {\n\t\t\t\t\t<app-icon [iconName]=\"iconNameVar ?? 'search'\" color=\"inherit\" size=\"md\"></app-icon>\n\t\t\t\t}\n\t\t\t</span>\n\t\t}\n\t\t@if (!this.iconName() && this.label()) {\n\t\t\t<span typography [typographyVariant]=\"fontSizeVar\" [typographyColor]=\"'inherit'\" [typographyFontWeight]=\"'normal'\">{{ label() }}</span>\n\t\t}\n\t</button>\n} @else if (variantVar === 'circle' || variantVar === 'icon') {\n\t<button [class]=\"containerClass\" [type]=\"type()\" [disabled]=\"disabled()\">\n\t\t<app-icon [iconName]=\"this.iconName() ?? 'search'\" color=\"inherit\" size=\"md\"></app-icon>\n\t</button>\n} @else {\n\t<button [class]=\"containerClass\" [type]=\"type()\" [disabled]=\"disabled()\">\n\t\t@if (this.iconName()) {\n\t\t\t<span [class]=\"iconClass\">\n\t\t\t\t@if (this.label()) {\n\t\t\t\t\t<app-icon [iconName]=\"this.iconName() ?? 'search'\" color=\"inherit\" size=\"md\"></app-icon>\n\t\t\t\t\t<span typography [typographyVariant]=\"fontSizeVar\" [typographyColor]=\"'inherit'\" [typographyFontWeight]=\"'normal'\">{{ label() }}</span>\n\t\t\t\t}\n\t\t\t\t@if (!this.label()) {\n\t\t\t\t\t<app-icon [iconName]=\"this.iconName() ?? 'search'\" color=\"inherit\" size=\"md\"></app-icon>\n\t\t\t\t}\n\t\t\t</span>\n\t\t}\n\t\t@if (!this.iconName() && this.label()) {\n\t\t\t<span typography [typographyVariant]=\"fontSizeVar\" [typographyColor]=\"'inherit'\" [typographyFontWeight]=\"'normal'\">{{ label() }}</span>\n\t\t}\n\t</button>\n}\n", styles: [""], dependencies: [{ kind: "directive", type: TypographyDirective, selector: "[typography]", inputs: ["typographyVariant", "typographyColor", "typographyFontWeight", "classes"] }, { kind: "component", type: IconComponent, selector: "app-icon", inputs: ["color", "size", "classes", "iconName"] }] });
|
|
149
151
|
}
|
|
150
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
152
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: ButtonComponent, decorators: [{
|
|
151
153
|
type: Component,
|
|
152
|
-
args: [{ selector: 'app-button', standalone: true, imports: [TypographyDirective, IconComponent], template: "@let variantVar = variant();\n@let iconNameVar = iconName();\n\n@if (\n\tvariantVar === 'primary' ||\n\tvariantVar === 'warning' ||\n\tvariantVar === 'error' ||\n\tvariantVar === 'secondary' ||\n\tvariantVar === 'ghost-primary' ||\n\tvariantVar === 'ghost-error'\n) {\n\t<button [class]=\"
|
|
154
|
+
args: [{ selector: 'app-button', standalone: true, imports: [TypographyDirective, IconComponent], template: "@let variantVar = variant();\n@let iconNameVar = iconName();\n@let fontSizeVar = fontSize();\n\n@if (\n\tvariantVar === 'primary' ||\n\tvariantVar === 'warning' ||\n\tvariantVar === 'error' ||\n\tvariantVar === 'secondary' ||\n\tvariantVar === 'ghost-primary' ||\n\tvariantVar === 'ghost-error'\n) {\n\t<button [class]=\"containerClass\" [type]=\"type()\" [disabled]=\"disabled()\">\n\t\t@if (this.iconName()) {\n\t\t\t<span [class]=\"iconClass\">\n\t\t\t\t@if (this.label()) {\n\t\t\t\t\t<app-icon [iconName]=\"iconNameVar ?? 'search'\" color=\"inherit\" size=\"md\"></app-icon>\n\t\t\t\t\t<span typography [typographyVariant]=\"fontSizeVar\" [typographyColor]=\"'inherit'\" [typographyFontWeight]=\"'normal'\">{{ label() }}</span>\n\t\t\t\t}\n\t\t\t\t@if (!this.label()) {\n\t\t\t\t\t<app-icon [iconName]=\"iconNameVar ?? 'search'\" color=\"inherit\" size=\"md\"></app-icon>\n\t\t\t\t}\n\t\t\t</span>\n\t\t}\n\t\t@if (!this.iconName() && this.label()) {\n\t\t\t<span typography [typographyVariant]=\"fontSizeVar\" [typographyColor]=\"'inherit'\" [typographyFontWeight]=\"'normal'\">{{ label() }}</span>\n\t\t}\n\t</button>\n} @else if (variantVar === 'circle' || variantVar === 'icon') {\n\t<button [class]=\"containerClass\" [type]=\"type()\" [disabled]=\"disabled()\">\n\t\t<app-icon [iconName]=\"this.iconName() ?? 'search'\" color=\"inherit\" size=\"md\"></app-icon>\n\t</button>\n} @else {\n\t<button [class]=\"containerClass\" [type]=\"type()\" [disabled]=\"disabled()\">\n\t\t@if (this.iconName()) {\n\t\t\t<span [class]=\"iconClass\">\n\t\t\t\t@if (this.label()) {\n\t\t\t\t\t<app-icon [iconName]=\"this.iconName() ?? 'search'\" color=\"inherit\" size=\"md\"></app-icon>\n\t\t\t\t\t<span typography [typographyVariant]=\"fontSizeVar\" [typographyColor]=\"'inherit'\" [typographyFontWeight]=\"'normal'\">{{ label() }}</span>\n\t\t\t\t}\n\t\t\t\t@if (!this.label()) {\n\t\t\t\t\t<app-icon [iconName]=\"this.iconName() ?? 'search'\" color=\"inherit\" size=\"md\"></app-icon>\n\t\t\t\t}\n\t\t\t</span>\n\t\t}\n\t\t@if (!this.iconName() && this.label()) {\n\t\t\t<span typography [typographyVariant]=\"fontSizeVar\" [typographyColor]=\"'inherit'\" [typographyFontWeight]=\"'normal'\">{{ label() }}</span>\n\t\t}\n\t</button>\n}\n" }]
|
|
153
155
|
}] });
|
|
154
156
|
|
|
155
157
|
/**
|
|
156
158
|
* Generated bundle index. Do not edit.
|
|
157
159
|
*/
|
|
158
160
|
|
|
159
|
-
export { ButtonComponent,
|
|
161
|
+
export { ButtonComponent, buttonComponent, buttonContainer, buttonIcon };
|
|
160
162
|
//# sourceMappingURL=sixbell-telco-sdk-components-button.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sixbell-telco-sdk-components-button.mjs","sources":["../../../projects/sdk/components/button/src/button.component.ts","../../../projects/sdk/components/button/src/button.component.html","../../../projects/sdk/components/button/sixbell-telco-sdk-components-button.ts"],"sourcesContent":["import { Component, input } from '@angular/core';\nimport { IconComponent, IconName } from '@sixbell-telco/sdk/components/icon';\nimport { TypographyDirective, TypographyVariantOnlyProps } from '@sixbell-telco/sdk/directives/typography';\nimport { cn } from '@sixbell-telco/sdk/utils/cn';\nimport { cva, cx } from 'class-variance-authority';\n\nexport const buttonBase = cva(['btn'], {\n\tvariants: {\n\t\tvariant: {\n\t\t\tprimary: ['btn-primary', 'h-auto', 'active:hover:shadow-primary', 'active:focus:shadow-primary'],\n\t\t\twarning: ['btn-warning', 'h-auto'],\n\t\t\terror: ['btn-error', 'h-auto'],\n\t\t\tsecondary: ['btn-secondary', 'h-auto'],\n\t\t\t'ghost-primary': [\n\t\t\t\t'btn-ghost',\n\t\t\t\t'h-auto',\n\t\t\t\t'text-neutral',\n\t\t\t\t'hover:text-primary-content',\n\t\t\t\t'hover:bg-primary',\n\t\t\t\t'active:focus:bg-primary',\n\t\t\t\t'active:focus:border-primary',\n\t\t\t\t'focus-visible:outline-current',\n\t\t\t],\n\t\t\t'ghost-error': [\n\t\t\t\t'btn-ghost',\n\t\t\t\t'h-auto',\n\t\t\t\t'text-neutral',\n\t\t\t\t'hover:text-error-content',\n\t\t\t\t'hover:bg-error',\n\t\t\t\t'active:focus:bg-error',\n\t\t\t\t'active:focus:border-error',\n\t\t\t\t'focus-visible:outline-current',\n\t\t\t],\n\t\t\tcircle: [\n\t\t\t\t'btn-circle',\n\t\t\t\t'btn-outline',\n\t\t\t\t'text-neutral',\n\t\t\t\t'border-ring',\n\t\t\t\t'hover:text-neutral',\n\t\t\t\t'hover:border-ring-accent',\n\t\t\t\t'hover:bg-transparent',\n\t\t\t\t'active:hover:text-neutral-content',\n\t\t\t\t'active:hover:bg-ring-accent',\n\t\t\t\t'active:focus:border-ring-accent',\n\t\t\t\t'focus-visible:outline-ring-accent',\n\t\t\t],\n\t\t\ticon: [\n\t\t\t\t'btn-ghost',\n\t\t\t\t'text-neutral',\n\t\t\t\t'hover:text-primary',\n\t\t\t\t'hover:bg-transparent',\n\t\t\t\t'active:focus:bg-transparent',\n\t\t\t\t'active:focus:border-transparent',\n\t\t\t\t'focus-visible:outline-current',\n\t\t\t],\n\t\t},\n\t\tshape: {\n\t\t\t'round-none': ['rounded-none'],\n\t\t\t'round-sm': ['rounded-btn-sm'],\n\t\t\t'round-md': ['rounded-btn-md'],\n\t\t\t'round-lg': ['rounded-btn-lg'],\n\t\t},\n\t\tpadding: {\n\t\t\tnone: ['px-0', 'py-0'],\n\t\t\tnormal: ['px-3', 'py-3'],\n\t\t\tsm: ['px-4'],\n\t\t\tmd: ['px-6'],\n\t\t\tlg: ['px-8'],\n\t\t},\n\t\theight: {\n\t\t\tfit: ['h-fit', 'min-h-[auto]'],\n\t\t\tauto: ['h-auto', 'min-h-[auto]'],\n\t\t\tfull: ['h-full', 'min-h-full'],\n\t\t\t'min-content': ['h-min', 'min-h-min'],\n\t\t\t'max-content': ['h-max', 'min-h-max'],\n\t\t\tnormal: ['h-auto', 'min-h-12'],\n\t\t},\n\t\twidth: {\n\t\t\tfit: ['w-fit', 'min-w-[auto]'],\n\t\t\tauto: ['w-auto', 'min-w-[auto]'],\n\t\t\tfull: ['w-full', 'min-w-full'],\n\t\t\t'min-content': ['w-min', 'min-w-min'],\n\t\t\t'max-content': ['w-max', 'min-w-max'],\n\t\t\tnormal: ['w-auto', 'min-w-fit'],\n\t\t},\n\t\talignment: {\n\t\t\tcenter: ['justify-center'],\n\t\t\tleft: ['justify-start'],\n\t\t\tright: ['justify-end'],\n\t\t},\n\t},\n\tcompoundVariants: [],\n\tdefaultVariants: {\n\t\tvariant: 'primary',\n\t\tshape: 'round-md',\n\t\tpadding: 'md',\n\t\theight: 'normal',\n\t\twidth: 'normal',\n\t\talignment: 'center',\n\t},\n});\n\nexport type ButtonBaseVariantProps =\n\t| 'primary'\n\t| 'warning'\n\t| 'error'\n\t| 'secondary'\n\t| 'ghost-primary'\n\t| 'ghost-error'\n\t| 'circle'\n\t| 'icon'\n\t| null\n\t| undefined;\nexport type ButtonBaseShapeProps = 'round-none' | 'round-sm' | 'round-md' | 'round-lg' | null | undefined;\nexport type ButtonBasePaddingProps = 'none' | 'normal' | 'sm' | 'md' | 'lg' | null | undefined;\nexport type ButtonBaseHeightProps = 'fit' | 'auto' | 'full' | 'min-content' | 'max-content' | 'normal' | null | undefined;\nexport type ButtonBaseWidthProps = 'fit' | 'auto' | 'full' | 'min-content' | 'max-content' | 'normal' | null | undefined;\nexport type ButtonBaseAlignmentProps = 'center' | 'left' | 'right' | null | undefined;\n\nexport const buttonIcon = cva(['flex items-center'], {\n\tvariants: {\n\t\ticonPosition: {\n\t\t\tcenter: ['justify-center'],\n\t\t\tleft: ['flex-row gap-2'],\n\t\t\tright: ['flex-row-reverse gap-2'],\n\t\t},\n\t},\n\tcompoundVariants: [],\n\tdefaultVariants: {\n\t\ticonPosition: 'left',\n\t},\n});\n\nexport type ButtonIconVariantProps = 'center' | 'left' | 'right' | null | undefined;\n\nexport interface ButtonVariantProps {\n\tvariant?: ButtonBaseVariantProps;\n\tshape?: ButtonBaseShapeProps;\n\tpadding?: ButtonBasePaddingProps;\n\theight?: ButtonBaseHeightProps;\n\twidth?: ButtonBaseWidthProps;\n\talignment?: ButtonBaseAlignmentProps;\n\ticonPosition?: ButtonIconVariantProps;\n}\nexport const button = ({ variant, shape, padding, height, width, alignment, iconPosition }: ButtonVariantProps = {}) =>\n\tcx(buttonBase({ variant, shape, padding, height, width, alignment }), buttonIcon({ iconPosition }));\n\ntype HTMLButtonType = 'button' | 'submit' | 'reset';\n\n@Component({\n\tselector: 'app-button',\n\tstandalone: true,\n\timports: [TypographyDirective, IconComponent],\n\ttemplateUrl: './button.component.html',\n\tstyles: '',\n})\nexport class ButtonComponent {\n\tvariant = input<ButtonBaseVariantProps>();\n\tshape = input<ButtonBaseShapeProps>();\n\tpadding = input<ButtonBasePaddingProps>();\n\theight = input<ButtonBaseHeightProps>();\n\twidth = input<ButtonBaseWidthProps>();\n\talignment = input<ButtonBaseAlignmentProps>();\n\ticonPosition = input<ButtonIconVariantProps>();\n\tfontSize = input<TypographyVariantOnlyProps>({ variant: 'body' });\n\tbaseClass = input<string>('');\n\tlabel = input<string>('');\n\ttype = input<HTMLButtonType>('button');\n\ticonName = input<IconName | undefined>();\n\tdisabled = input<boolean>(false);\n\n\tget baseClasses() {\n\t\treturn cn(\n\t\t\tbuttonBase({\n\t\t\t\tvariant: this.variant(),\n\t\t\t\tshape: this.shape(),\n\t\t\t\tpadding: this.padding(),\n\t\t\t\theight: this.height(),\n\t\t\t\twidth: this.width(),\n\t\t\t\talignment: this.alignment(),\n\t\t\t\tclass: this.baseClass(),\n\t\t\t}),\n\t\t);\n\t}\n\n\tget iconClasses() {\n\t\treturn cn(\n\t\t\tbuttonIcon({\n\t\t\t\ticonPosition: this.iconPosition(),\n\t\t\t}),\n\t\t);\n\t}\n}\n","@let variantVar = variant();\n@let iconNameVar = iconName();\n\n@if (\n\tvariantVar === 'primary' ||\n\tvariantVar === 'warning' ||\n\tvariantVar === 'error' ||\n\tvariantVar === 'secondary' ||\n\tvariantVar === 'ghost-primary' ||\n\tvariantVar === 'ghost-error'\n) {\n\t<button [class]=\"baseClasses\" [type]=\"type()\" [disabled]=\"disabled()\">\n\t\t@if (this.iconName()) {\n\t\t\t<span [class]=\"iconClasses\">\n\t\t\t\t@if (this.label()) {\n\t\t\t\t\t<app-icon [iconName]=\"iconNameVar ?? 'search'\" [variants]=\"{ color: 'inherit', size: 'md' }\"></app-icon>\n\t\t\t\t\t<span [typography]=\"{ variant: this.fontSize().variant, color: 'inherit', fontWeight: 'normal' }\">{{ label() }}</span>\n\t\t\t\t}\n\t\t\t\t@if (!this.label()) {\n\t\t\t\t\t<app-icon [iconName]=\"iconNameVar ?? 'search'\" [variants]=\"{ color: 'inherit', size: 'md' }\"></app-icon>\n\t\t\t\t}\n\t\t\t</span>\n\t\t}\n\t\t@if (!this.iconName() && this.label()) {\n\t\t\t<span [typography]=\"{ variant: this.fontSize().variant, color: 'inherit', fontWeight: 'normal' }\">{{ label() }}</span>\n\t\t}\n\t</button>\n} @else if (variantVar === 'circle' || variantVar === 'icon') {\n\t<button [class]=\"baseClasses\" [type]=\"type()\" [disabled]=\"disabled()\">\n\t\t<app-icon [iconName]=\"this.iconName() ?? 'search'\" [variants]=\"{ color: 'inherit', size: 'md' }\"></app-icon>\n\t</button>\n} @else {\n\t<button [class]=\"baseClasses\" [type]=\"type()\" [disabled]=\"disabled()\">\n\t\t@if (this.iconName()) {\n\t\t\t<span [class]=\"iconClasses\">\n\t\t\t\t@if (this.label()) {\n\t\t\t\t\t<app-icon [iconName]=\"this.iconName() ?? 'search'\" [variants]=\"{ color: 'inherit', size: 'md' }\"></app-icon>\n\t\t\t\t\t<span [typography]=\"{ variant: this.fontSize().variant, color: 'inherit', fontWeight: 'normal' }\">{{ label() }}</span>\n\t\t\t\t}\n\t\t\t\t@if (!this.label()) {\n\t\t\t\t\t<app-icon [iconName]=\"this.iconName() ?? 'search'\" [variants]=\"{ color: 'inherit', size: 'md' }\"></app-icon>\n\t\t\t\t}\n\t\t\t</span>\n\t\t}\n\t\t@if (!this.iconName() && this.label()) {\n\t\t\t<span [typography]=\"{ variant: this.fontSize().variant, color: 'inherit', fontWeight: 'normal' }\">{{ label() }}</span>\n\t\t}\n\t</button>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;MAMa,UAAU,GAAG,GAAG,CAAC,CAAC,KAAK,CAAC,EAAE;AACtC,IAAA,QAAQ,EAAE;AACT,QAAA,OAAO,EAAE;YACR,OAAO,EAAE,CAAC,aAAa,EAAE,QAAQ,EAAE,6BAA6B,EAAE,6BAA6B,CAAC;AAChG,YAAA,OAAO,EAAE,CAAC,aAAa,EAAE,QAAQ,CAAC;AAClC,YAAA,KAAK,EAAE,CAAC,WAAW,EAAE,QAAQ,CAAC;AAC9B,YAAA,SAAS,EAAE,CAAC,eAAe,EAAE,QAAQ,CAAC;AACtC,YAAA,eAAe,EAAE;gBAChB,WAAW;gBACX,QAAQ;gBACR,cAAc;gBACd,4BAA4B;gBAC5B,kBAAkB;gBAClB,yBAAyB;gBACzB,6BAA6B;gBAC7B,+BAA+B;AAC/B,aAAA;AACD,YAAA,aAAa,EAAE;gBACd,WAAW;gBACX,QAAQ;gBACR,cAAc;gBACd,0BAA0B;gBAC1B,gBAAgB;gBAChB,uBAAuB;gBACvB,2BAA2B;gBAC3B,+BAA+B;AAC/B,aAAA;AACD,YAAA,MAAM,EAAE;gBACP,YAAY;gBACZ,aAAa;gBACb,cAAc;gBACd,aAAa;gBACb,oBAAoB;gBACpB,0BAA0B;gBAC1B,sBAAsB;gBACtB,mCAAmC;gBACnC,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,eAAe,EAAA,UAAA,EAAA,CAAA;kBAP3B,SAAS;AACC,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,YAAY,cACV,IAAI,EAAA,OAAA,EACP,CAAC,mBAAmB,EAAE,aAAa,CAAC,EAAA,QAAA,EAAA,6pEAAA,EAAA,CAAA;;;AExJ9C;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"sixbell-telco-sdk-components-button.mjs","sources":["../../../projects/sdk/components/button/src/button.component.ts","../../../projects/sdk/components/button/src/button.component.html","../../../projects/sdk/components/button/sixbell-telco-sdk-components-button.ts"],"sourcesContent":["import { Component, input } from '@angular/core';\nimport { IconComponent, IconName } from '@sixbell-telco/sdk/components/icon';\nimport { TypographyDirective, TypographyVariantProps } from '@sixbell-telco/sdk/directives/typography';\nimport { cn } from '@sixbell-telco/sdk/utils/cn';\nimport { cva, cx } from 'class-variance-authority';\n\nexport const buttonContainer = cva(['btn'], {\n\tvariants: {\n\t\tvariant: {\n\t\t\tprimary: ['btn-primary', 'h-auto', 'active:hover:shadow-primary', 'active:focus:shadow-primary'],\n\t\t\twarning: ['btn-warning', 'h-auto'],\n\t\t\terror: ['btn-error', 'h-auto'],\n\t\t\tsecondary: ['btn-secondary', 'h-auto'],\n\t\t\t'ghost-primary': [\n\t\t\t\t'btn-ghost',\n\t\t\t\t'h-auto',\n\t\t\t\t'text-neutral',\n\t\t\t\t'hover:text-primary-content',\n\t\t\t\t'hover:bg-primary',\n\t\t\t\t'active:focus:bg-primary',\n\t\t\t\t'active:focus:border-primary',\n\t\t\t\t'focus-visible:outline-current',\n\t\t\t],\n\t\t\t'ghost-error': [\n\t\t\t\t'btn-ghost',\n\t\t\t\t'h-auto',\n\t\t\t\t'text-neutral',\n\t\t\t\t'hover:text-error-content',\n\t\t\t\t'hover:bg-error',\n\t\t\t\t'active:focus:bg-error',\n\t\t\t\t'active:focus:border-error',\n\t\t\t\t'focus-visible:outline-current',\n\t\t\t],\n\t\t\tcircle: [\n\t\t\t\t'btn-circle',\n\t\t\t\t'btn-outline',\n\t\t\t\t'text-neutral',\n\t\t\t\t'border-ring',\n\t\t\t\t'hover:text-neutral',\n\t\t\t\t'hover:border-ring-accent',\n\t\t\t\t'hover:bg-transparent',\n\t\t\t\t'active:hover:text-neutral-content',\n\t\t\t\t'active:hover:bg-ring-accent',\n\t\t\t\t'active:focus:border-ring-accent',\n\t\t\t\t'focus-visible:outline-ring-accent',\n\t\t\t],\n\t\t\ticon: [\n\t\t\t\t'btn-ghost',\n\t\t\t\t'text-neutral',\n\t\t\t\t'hover:text-primary',\n\t\t\t\t'hover:bg-transparent',\n\t\t\t\t'active:focus:bg-transparent',\n\t\t\t\t'active:focus:border-transparent',\n\t\t\t\t'focus-visible:outline-current',\n\t\t\t],\n\t\t},\n\t\tshape: {\n\t\t\t'round-none': ['rounded-none'],\n\t\t\t'round-sm': ['rounded-btn-sm'],\n\t\t\t'round-md': ['rounded-btn-md'],\n\t\t\t'round-lg': ['rounded-btn-lg'],\n\t\t},\n\t\tpadding: {\n\t\t\tnone: ['px-0', 'py-0'],\n\t\t\tnormal: ['px-3', 'py-3'],\n\t\t\tsm: ['px-4'],\n\t\t\tmd: ['px-6'],\n\t\t\tlg: ['px-8'],\n\t\t},\n\t\theight: {\n\t\t\tfit: ['h-fit', 'min-h-[auto]'],\n\t\t\tauto: ['h-auto', 'min-h-[auto]'],\n\t\t\tfull: ['h-full', 'min-h-full'],\n\t\t\t'min-content': ['h-min', 'min-h-min'],\n\t\t\t'max-content': ['h-max', 'min-h-max'],\n\t\t\tnormal: ['h-auto', 'min-h-12'],\n\t\t},\n\t\twidth: {\n\t\t\tfit: ['w-fit', 'min-w-[auto]'],\n\t\t\tauto: ['w-auto', 'min-w-[auto]'],\n\t\t\tfull: ['w-full', 'min-w-full'],\n\t\t\t'min-content': ['w-min', 'min-w-min'],\n\t\t\t'max-content': ['w-max', 'min-w-max'],\n\t\t\tnormal: ['w-auto', 'min-w-fit'],\n\t\t},\n\t\talignment: {\n\t\t\tcenter: ['justify-center'],\n\t\t\tleft: ['justify-start'],\n\t\t\tright: ['justify-end'],\n\t\t},\n\t},\n\tcompoundVariants: [],\n\tdefaultVariants: {\n\t\tvariant: 'primary',\n\t\tshape: 'round-md',\n\t\tpadding: 'md',\n\t\theight: 'normal',\n\t\twidth: 'normal',\n\t\talignment: 'center',\n\t},\n});\n\nexport type ButtonContainerVariantProps =\n\t| 'primary'\n\t| 'warning'\n\t| 'error'\n\t| 'secondary'\n\t| 'ghost-primary'\n\t| 'ghost-error'\n\t| 'circle'\n\t| 'icon'\n\t| null\n\t| undefined;\nexport type ButtonContainerShapeProps = 'round-none' | 'round-sm' | 'round-md' | 'round-lg' | null | undefined;\nexport type ButtonContainerPaddingProps = 'none' | 'normal' | 'sm' | 'md' | 'lg' | null | undefined;\nexport type ButtonContainerHeightProps = 'fit' | 'auto' | 'full' | 'min-content' | 'max-content' | 'normal' | null | undefined;\nexport type ButtonContainerWidthProps = 'fit' | 'auto' | 'full' | 'min-content' | 'max-content' | 'normal' | null | undefined;\nexport type ButtonContainerAlignmentProps = 'center' | 'left' | 'right' | null | undefined;\n\nexport const buttonIcon = cva(['flex items-center'], {\n\tvariants: {\n\t\ticonPosition: {\n\t\t\tcenter: ['justify-center'],\n\t\t\tleft: ['flex-row gap-2'],\n\t\t\tright: ['flex-row-reverse gap-2'],\n\t\t},\n\t},\n\tcompoundVariants: [],\n\tdefaultVariants: {\n\t\ticonPosition: 'left',\n\t},\n});\n\nexport type ButtonIconVariantProps = 'center' | 'left' | 'right' | null | undefined;\n\nexport type ButtonProps = {\n\tvariant?: ButtonContainerVariantProps;\n\tshape?: ButtonContainerShapeProps;\n\tpadding?: ButtonContainerPaddingProps;\n\theight?: ButtonContainerHeightProps;\n\twidth?: ButtonContainerWidthProps;\n\talignment?: ButtonContainerAlignmentProps;\n\ticonPosition?: ButtonIconVariantProps;\n};\nexport const buttonComponent = ({ variant, shape, padding, height, width, alignment, iconPosition }: ButtonProps = {}) =>\n\tcx(buttonContainer({ variant, shape, padding, height, width, alignment }), buttonIcon({ iconPosition }));\n\ntype HTMLButtonType = 'button' | 'submit' | 'reset';\n\n@Component({\n\tselector: 'app-button',\n\tstandalone: true,\n\timports: [TypographyDirective, IconComponent],\n\ttemplateUrl: './button.component.html',\n\tstyles: '',\n})\nexport class ButtonComponent {\n\tvariant = input<ButtonContainerVariantProps>();\n\tshape = input<ButtonContainerShapeProps>();\n\tpadding = input<ButtonContainerPaddingProps>();\n\theight = input<ButtonContainerHeightProps>();\n\twidth = input<ButtonContainerWidthProps>();\n\talignment = input<ButtonContainerAlignmentProps>();\n\ticonPosition = input<ButtonIconVariantProps>();\n\tfontSize = input<TypographyVariantProps>('body');\n\tcontainerClasses = input<string>('');\n\ticonClasses = input<string>('');\n\tlabel = input<string>('');\n\ttype = input<HTMLButtonType>('button');\n\ticonName = input<IconName | undefined>();\n\tdisabled = input<boolean>(false);\n\n\tget containerClass() {\n\t\treturn cn(\n\t\t\tbuttonContainer({\n\t\t\t\tvariant: this.variant(),\n\t\t\t\tshape: this.shape(),\n\t\t\t\tpadding: this.padding(),\n\t\t\t\theight: this.height(),\n\t\t\t\twidth: this.width(),\n\t\t\t\talignment: this.alignment(),\n\t\t\t\tclass: this.containerClasses(),\n\t\t\t}),\n\t\t);\n\t}\n\n\tget iconClass() {\n\t\treturn cn(\n\t\t\tbuttonIcon({\n\t\t\t\ticonPosition: this.iconPosition(),\n\t\t\t\tclass: this.iconClasses(),\n\t\t\t}),\n\t\t);\n\t}\n}\n","@let variantVar = variant();\n@let iconNameVar = iconName();\n@let fontSizeVar = fontSize();\n\n@if (\n\tvariantVar === 'primary' ||\n\tvariantVar === 'warning' ||\n\tvariantVar === 'error' ||\n\tvariantVar === 'secondary' ||\n\tvariantVar === 'ghost-primary' ||\n\tvariantVar === 'ghost-error'\n) {\n\t<button [class]=\"containerClass\" [type]=\"type()\" [disabled]=\"disabled()\">\n\t\t@if (this.iconName()) {\n\t\t\t<span [class]=\"iconClass\">\n\t\t\t\t@if (this.label()) {\n\t\t\t\t\t<app-icon [iconName]=\"iconNameVar ?? 'search'\" color=\"inherit\" size=\"md\"></app-icon>\n\t\t\t\t\t<span typography [typographyVariant]=\"fontSizeVar\" [typographyColor]=\"'inherit'\" [typographyFontWeight]=\"'normal'\">{{ label() }}</span>\n\t\t\t\t}\n\t\t\t\t@if (!this.label()) {\n\t\t\t\t\t<app-icon [iconName]=\"iconNameVar ?? 'search'\" color=\"inherit\" size=\"md\"></app-icon>\n\t\t\t\t}\n\t\t\t</span>\n\t\t}\n\t\t@if (!this.iconName() && this.label()) {\n\t\t\t<span typography [typographyVariant]=\"fontSizeVar\" [typographyColor]=\"'inherit'\" [typographyFontWeight]=\"'normal'\">{{ label() }}</span>\n\t\t}\n\t</button>\n} @else if (variantVar === 'circle' || variantVar === 'icon') {\n\t<button [class]=\"containerClass\" [type]=\"type()\" [disabled]=\"disabled()\">\n\t\t<app-icon [iconName]=\"this.iconName() ?? 'search'\" color=\"inherit\" size=\"md\"></app-icon>\n\t</button>\n} @else {\n\t<button [class]=\"containerClass\" [type]=\"type()\" [disabled]=\"disabled()\">\n\t\t@if (this.iconName()) {\n\t\t\t<span [class]=\"iconClass\">\n\t\t\t\t@if (this.label()) {\n\t\t\t\t\t<app-icon [iconName]=\"this.iconName() ?? 'search'\" color=\"inherit\" size=\"md\"></app-icon>\n\t\t\t\t\t<span typography [typographyVariant]=\"fontSizeVar\" [typographyColor]=\"'inherit'\" [typographyFontWeight]=\"'normal'\">{{ label() }}</span>\n\t\t\t\t}\n\t\t\t\t@if (!this.label()) {\n\t\t\t\t\t<app-icon [iconName]=\"this.iconName() ?? 'search'\" color=\"inherit\" size=\"md\"></app-icon>\n\t\t\t\t}\n\t\t\t</span>\n\t\t}\n\t\t@if (!this.iconName() && this.label()) {\n\t\t\t<span typography [typographyVariant]=\"fontSizeVar\" [typographyColor]=\"'inherit'\" [typographyFontWeight]=\"'normal'\">{{ label() }}</span>\n\t\t}\n\t</button>\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AI,EAAA,OAAA,EACP,CAAC,mBAAmB,EAAE,aAAa,CAAC,EAAA,QAAA,EAAA,4rEAAA,EAAA,CAAA;;;AExJ9C;;AAEG;;;;"}
|
|
@@ -3,7 +3,7 @@ import { input, Component } from '@angular/core';
|
|
|
3
3
|
import { cn } from '@sixbell-telco/sdk/utils/cn';
|
|
4
4
|
import { cva } from 'class-variance-authority';
|
|
5
5
|
|
|
6
|
-
const
|
|
6
|
+
const cardComponent = cva(['flex flex-col gap-4 px-4 py-5'], {
|
|
7
7
|
variants: {
|
|
8
8
|
shadow: {
|
|
9
9
|
none: [],
|
|
@@ -44,21 +44,21 @@ class CardComponent {
|
|
|
44
44
|
height = input();
|
|
45
45
|
width = input();
|
|
46
46
|
shape = input();
|
|
47
|
-
|
|
48
|
-
get
|
|
49
|
-
return cn(
|
|
47
|
+
classes = input('');
|
|
48
|
+
get componentClass() {
|
|
49
|
+
return cn(cardComponent({ shadow: this.shadow(), height: this.height(), width: this.width(), shape: this.shape(), class: this.classes() }));
|
|
50
50
|
}
|
|
51
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
52
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.
|
|
51
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: CardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
52
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.12", type: CardComponent, isStandalone: true, selector: "app-card", inputs: { shadow: { classPropertyName: "shadow", publicName: "shadow", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, shape: { classPropertyName: "shape", publicName: "shape", isSignal: true, isRequired: false, transformFunction: null }, classes: { classPropertyName: "classes", publicName: "classes", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<section [class]=\"componentClass\">\n\t<ng-content></ng-content>\n</section>\n", styles: [""] });
|
|
53
53
|
}
|
|
54
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
54
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: CardComponent, decorators: [{
|
|
55
55
|
type: Component,
|
|
56
|
-
args: [{ selector: 'app-card', standalone: true, imports: [], template: "<section [class]=\"
|
|
56
|
+
args: [{ selector: 'app-card', standalone: true, imports: [], template: "<section [class]=\"componentClass\">\n\t<ng-content></ng-content>\n</section>\n" }]
|
|
57
57
|
}] });
|
|
58
58
|
|
|
59
59
|
/**
|
|
60
60
|
* Generated bundle index. Do not edit.
|
|
61
61
|
*/
|
|
62
62
|
|
|
63
|
-
export { CardComponent,
|
|
63
|
+
export { CardComponent, cardComponent };
|
|
64
64
|
//# sourceMappingURL=sixbell-telco-sdk-components-card.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sixbell-telco-sdk-components-card.mjs","sources":["../../../projects/sdk/components/card/src/card.component.ts","../../../projects/sdk/components/card/src/card.component.html","../../../projects/sdk/components/card/sixbell-telco-sdk-components-card.ts"],"sourcesContent":["import { Component, input } from '@angular/core';\nimport { cn } from '@sixbell-telco/sdk/utils/cn';\nimport { cva } from 'class-variance-authority';\n\nexport const
|
|
1
|
+
{"version":3,"file":"sixbell-telco-sdk-components-card.mjs","sources":["../../../projects/sdk/components/card/src/card.component.ts","../../../projects/sdk/components/card/src/card.component.html","../../../projects/sdk/components/card/sixbell-telco-sdk-components-card.ts"],"sourcesContent":["import { Component, input } from '@angular/core';\nimport { cn } from '@sixbell-telco/sdk/utils/cn';\nimport { cva } from 'class-variance-authority';\n\nexport const cardComponent = cva(['flex flex-col gap-4 px-4 py-5'], {\n\tvariants: {\n\t\tshadow: {\n\t\t\tnone: [],\n\t\t\tprimary: ['shadow-primary'],\n\t\t\tsecondary: ['shadow-secondary'],\n\t\t},\n\t\theight: {\n\t\t\tfit: ['h-fit', 'min-h-[auto]'],\n\t\t\tauto: ['h-auto', 'min-h-[auto]'],\n\t\t\tfull: ['h-full', 'min-h-full'],\n\t\t\t'min-content': ['h-min', 'min-h-min'],\n\t\t\t'max-content': ['h-max', 'min-h-max'],\n\t\t},\n\t\twidth: {\n\t\t\tfit: ['w-fit', 'min-w-[auto]'],\n\t\t\tauto: ['w-auto', 'min-w-[auto]'],\n\t\t\tfull: ['w-full', 'min-w-full'],\n\t\t\t'min-content': ['w-min', 'min-w-min'],\n\t\t\t'max-content': ['w-max', 'min-w-max'],\n\t\t},\n\t\tshape: {\n\t\t\t'round-sm': ['rounded-box-sm'],\n\t\t\t'round-md': ['rounded-box-md'],\n\t\t\t'round-lg': ['rounded-box-lg'],\n\t\t},\n\t},\n\tcompoundVariants: [],\n\tdefaultVariants: {\n\t\tshadow: 'secondary',\n\t\theight: 'auto',\n\t\twidth: 'auto',\n\t\tshape: 'round-sm',\n\t},\n});\nexport type CardShadowProps = 'none' | 'primary' | 'secondary' | null | undefined;\nexport type CardHeightProps = 'fit' | 'auto' | 'full' | 'min-content' | 'max-content' | null | undefined;\nexport type CardWidthProps = 'fit' | 'auto' | 'full' | 'min-content' | 'max-content' | null | undefined;\nexport type CardShapeProps = 'round-sm' | 'round-md' | 'round-lg' | null | undefined;\n\nexport type CardProps = {\n\tshadow?: CardShadowProps;\n\theight?: CardHeightProps;\n\twidth?: CardWidthProps;\n\tshape?: CardShapeProps;\n};\n\n@Component({\n\tselector: 'app-card',\n\tstandalone: true,\n\timports: [],\n\ttemplateUrl: './card.component.html',\n\tstyles: '',\n})\nexport class CardComponent {\n\t// Base table properties\n\tshadow = input<CardShadowProps>();\n\theight = input<CardHeightProps>();\n\twidth = input<CardWidthProps>();\n\tshape = input<CardShapeProps>();\n\tclasses = input<string>('');\n\n\tget componentClass() {\n\t\treturn cn(cardComponent({ shadow: this.shadow(), height: this.height(), width: this.width(), shape: this.shape(), class: this.classes() }));\n\t}\n}\n","<section [class]=\"componentClass\">\n\t<ng-content></ng-content>\n</section>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MAIa,aAAa,GAAG,GAAG,CAAC,CAAC,+BAA+B,CAAC,EAAE;AACnE,IAAA,QAAQ,EAAE;AACT,QAAA,MAAM,EAAE;AACP,YAAA,IAAI,EAAE,EAAE;YACR,OAAO,EAAE,CAAC,gBAAgB,CAAC;YAC3B,SAAS,EAAE,CAAC,kBAAkB,CAAC;AAC/B,SAAA;AACD,QAAA,MAAM,EAAE;AACP,YAAA,GAAG,EAAE,CAAC,OAAO,EAAE,cAAc,CAAC;AAC9B,YAAA,IAAI,EAAE,CAAC,QAAQ,EAAE,cAAc,CAAC;AAChC,YAAA,IAAI,EAAE,CAAC,QAAQ,EAAE,YAAY,CAAC;AAC9B,YAAA,aAAa,EAAE,CAAC,OAAO,EAAE,WAAW,CAAC;AACrC,YAAA,aAAa,EAAE,CAAC,OAAO,EAAE,WAAW,CAAC;AACrC,SAAA;AACD,QAAA,KAAK,EAAE;AACN,YAAA,GAAG,EAAE,CAAC,OAAO,EAAE,cAAc,CAAC;AAC9B,YAAA,IAAI,EAAE,CAAC,QAAQ,EAAE,cAAc,CAAC;AAChC,YAAA,IAAI,EAAE,CAAC,QAAQ,EAAE,YAAY,CAAC;AAC9B,YAAA,aAAa,EAAE,CAAC,OAAO,EAAE,WAAW,CAAC;AACrC,YAAA,aAAa,EAAE,CAAC,OAAO,EAAE,WAAW,CAAC;AACrC,SAAA;AACD,QAAA,KAAK,EAAE;YACN,UAAU,EAAE,CAAC,gBAAgB,CAAC;YAC9B,UAAU,EAAE,CAAC,gBAAgB,CAAC;YAC9B,UAAU,EAAE,CAAC,gBAAgB,CAAC;AAC9B,SAAA;AACD,KAAA;AACD,IAAA,gBAAgB,EAAE,EAAE;AACpB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
seconds = computed(() => {
|
|
45
45
|
return this.signalTimer()?.seconds;
|
|
46
46
|
});
|
|
47
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
48
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.
|
|
47
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: CountdownComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
48
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.12", type: CountdownComponent, isStandalone: true, selector: "app-countdown", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, dueDate: { classPropertyName: "dueDate", publicName: "dueDate", isSignal: true, isRequired: false, transformFunction: null }, format: { classPropertyName: "format", publicName: "format", isSignal: true, isRequired: false, transformFunction: null }, showDays: { classPropertyName: "showDays", publicName: "showDays", isSignal: true, isRequired: false, transformFunction: null }, showHours: { classPropertyName: "showHours", publicName: "showHours", isSignal: true, isRequired: false, transformFunction: null }, showMinutes: { classPropertyName: "showMinutes", publicName: "showMinutes", isSignal: true, isRequired: false, transformFunction: null }, showSeconds: { classPropertyName: "showSeconds", publicName: "showSeconds", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onFinish: "onFinish" }, ngImport: i0, template: "@let shouldShowDays = showDays();\n@let shouldShowHours = showHours();\n@let shouldShowMinutes = showMinutes();\n@let shouldShowSeconds = showSeconds();\n\n@switch (type()) {\n\t<!-- 01:23:59:59 -->\n\t@case ('simple-1') {\n\t\t<span class=\"countdown font-mono text-2xl\">\n\t\t\t@if (shouldShowDays && shouldShowHours && shouldShowMinutes && shouldShowSeconds) {\n\t\t\t\t<span style=\"--value: {{ days() }}\"></span>\n\t\t\t\t:\n\t\t\t}\n\t\t\t@if (shouldShowHours && shouldShowMinutes && shouldShowSeconds) {\n\t\t\t\t<span style=\"--value: {{ hours() }}\"></span>\n\t\t\t\t:\n\t\t\t}\n\t\t\t@if (shouldShowMinutes && shouldShowSeconds) {\n\t\t\t\t<span style=\"--value: {{ minutes() }}\"></span>\n\t\t\t\t:\n\t\t\t}\n\t\t\t@if (shouldShowSeconds) {\n\t\t\t\t<span style=\"--value: {{ seconds() }}\"></span>\n\t\t\t}\n\t\t</span>\n\t}\n\n\t<!-- 01d23h59m59s -->\n\t@case ('simple-2') {\n\t\t<span class=\"countdown font-mono text-2xl\">\n\t\t\t@if (shouldShowDays) {\n\t\t\t\t<span style=\"--value: {{ days() }}\"></span>\n\t\t\t\td\n\t\t\t}\n\t\t\t@if (shouldShowHours) {\n\t\t\t\t<span style=\"--value: {{ hours() }}\"></span>\n\t\t\t\th\n\t\t\t}\n\t\t\t@if (shouldShowMinutes) {\n\t\t\t\t<span style=\"--value: {{ minutes() }}\"></span>\n\t\t\t\tm\n\t\t\t}\n\t\t\t@if (shouldShowSeconds) {\n\t\t\t\t<span style=\"--value: {{ seconds() }}\"></span>\n\t\t\t\ts\n\t\t\t}\n\t\t</span>\n\t}\n\n\t<!-- 01 days 23 hours 59 min 59 sec -->\n\t@case ('extended-1') {\n\t\t<div class=\"flex gap-5\">\n\t\t\t@if (shouldShowDays) {}\n\t\t\t<div>\n\t\t\t\t<span class=\"countdown font-mono text-2xl\">\n\t\t\t\t\t<span style=\"--value: {{ days() }}\"></span>\n\t\t\t\t</span>\n\t\t\t\tdays\n\t\t\t</div>\n\t\t\t@if (shouldShowHours) {}\n\t\t\t<div>\n\t\t\t\t<span class=\"countdown font-mono text-2xl\">\n\t\t\t\t\t<span style=\"--value: {{ hours() }}\"></span>\n\t\t\t\t</span>\n\t\t\t\thours\n\t\t\t</div>\n\t\t\t@if (shouldShowMinutes) {}\n\t\t\t<div>\n\t\t\t\t<span class=\"countdown font-mono text-2xl\">\n\t\t\t\t\t<span style=\"--value: {{ minutes() }}\"></span>\n\t\t\t\t</span>\n\t\t\t\tmin\n\t\t\t</div>\n\t\t\t@if (shouldShowSeconds) {}\n\t\t\t<div>\n\t\t\t\t<span class=\"countdown font-mono text-2xl\">\n\t\t\t\t\t<span style=\"--value: {{ seconds() }}\"></span>\n\t\t\t\t</span>\n\t\t\t\tsec\n\t\t\t</div>\n\t\t</div>\n\t}\n\n\t<!-- 01 23 59 59 -->\n\t<!-- days hours min sec -->\n\t@case ('extended-2') {\n\t\t<div class=\"grid auto-cols-max grid-flow-col gap-5 text-center\">\n\t\t\t@if (shouldShowDays) {}\n\t\t\t<div class=\"flex flex-col\">\n\t\t\t\t<span class=\"countdown font-mono text-2xl\">\n\t\t\t\t\t<span style=\"--value: {{ days() }}\"></span>\n\t\t\t\t</span>\n\t\t\t\tdays\n\t\t\t</div>\n\t\t\t@if (shouldShowHours) {}\n\t\t\t<div class=\"flex flex-col\">\n\t\t\t\t<span class=\"countdown font-mono text-2xl\">\n\t\t\t\t\t<span style=\"--value: {{ hours() }}\"></span>\n\t\t\t\t</span>\n\t\t\t\thours\n\t\t\t</div>\n\t\t\t@if (shouldShowMinutes) {}\n\t\t\t<div class=\"flex flex-col\">\n\t\t\t\t<span class=\"countdown font-mono text-2xl\">\n\t\t\t\t\t<span style=\"--value: {{ minutes() }}\"></span>\n\t\t\t\t</span>\n\t\t\t\tmin\n\t\t\t</div>\n\t\t\t@if (shouldShowSeconds) {}\n\t\t\t<div class=\"flex flex-col\">\n\t\t\t\t<span class=\"countdown font-mono text-2xl\">\n\t\t\t\t\t<span style=\"--value: {{ seconds() }}\"></span>\n\t\t\t\t</span>\n\t\t\t\tsec\n\t\t\t</div>\n\t\t</div>\n\t}\n}\n", changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
49
49
|
}
|
|
50
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
50
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: CountdownComponent, decorators: [{
|
|
51
51
|
type: Component,
|
|
52
52
|
args: [{ selector: 'app-countdown', standalone: true, imports: [], changeDetection: ChangeDetectionStrategy.OnPush, template: "@let shouldShowDays = showDays();\n@let shouldShowHours = showHours();\n@let shouldShowMinutes = showMinutes();\n@let shouldShowSeconds = showSeconds();\n\n@switch (type()) {\n\t<!-- 01:23:59:59 -->\n\t@case ('simple-1') {\n\t\t<span class=\"countdown font-mono text-2xl\">\n\t\t\t@if (shouldShowDays && shouldShowHours && shouldShowMinutes && shouldShowSeconds) {\n\t\t\t\t<span style=\"--value: {{ days() }}\"></span>\n\t\t\t\t:\n\t\t\t}\n\t\t\t@if (shouldShowHours && shouldShowMinutes && shouldShowSeconds) {\n\t\t\t\t<span style=\"--value: {{ hours() }}\"></span>\n\t\t\t\t:\n\t\t\t}\n\t\t\t@if (shouldShowMinutes && shouldShowSeconds) {\n\t\t\t\t<span style=\"--value: {{ minutes() }}\"></span>\n\t\t\t\t:\n\t\t\t}\n\t\t\t@if (shouldShowSeconds) {\n\t\t\t\t<span style=\"--value: {{ seconds() }}\"></span>\n\t\t\t}\n\t\t</span>\n\t}\n\n\t<!-- 01d23h59m59s -->\n\t@case ('simple-2') {\n\t\t<span class=\"countdown font-mono text-2xl\">\n\t\t\t@if (shouldShowDays) {\n\t\t\t\t<span style=\"--value: {{ days() }}\"></span>\n\t\t\t\td\n\t\t\t}\n\t\t\t@if (shouldShowHours) {\n\t\t\t\t<span style=\"--value: {{ hours() }}\"></span>\n\t\t\t\th\n\t\t\t}\n\t\t\t@if (shouldShowMinutes) {\n\t\t\t\t<span style=\"--value: {{ minutes() }}\"></span>\n\t\t\t\tm\n\t\t\t}\n\t\t\t@if (shouldShowSeconds) {\n\t\t\t\t<span style=\"--value: {{ seconds() }}\"></span>\n\t\t\t\ts\n\t\t\t}\n\t\t</span>\n\t}\n\n\t<!-- 01 days 23 hours 59 min 59 sec -->\n\t@case ('extended-1') {\n\t\t<div class=\"flex gap-5\">\n\t\t\t@if (shouldShowDays) {}\n\t\t\t<div>\n\t\t\t\t<span class=\"countdown font-mono text-2xl\">\n\t\t\t\t\t<span style=\"--value: {{ days() }}\"></span>\n\t\t\t\t</span>\n\t\t\t\tdays\n\t\t\t</div>\n\t\t\t@if (shouldShowHours) {}\n\t\t\t<div>\n\t\t\t\t<span class=\"countdown font-mono text-2xl\">\n\t\t\t\t\t<span style=\"--value: {{ hours() }}\"></span>\n\t\t\t\t</span>\n\t\t\t\thours\n\t\t\t</div>\n\t\t\t@if (shouldShowMinutes) {}\n\t\t\t<div>\n\t\t\t\t<span class=\"countdown font-mono text-2xl\">\n\t\t\t\t\t<span style=\"--value: {{ minutes() }}\"></span>\n\t\t\t\t</span>\n\t\t\t\tmin\n\t\t\t</div>\n\t\t\t@if (shouldShowSeconds) {}\n\t\t\t<div>\n\t\t\t\t<span class=\"countdown font-mono text-2xl\">\n\t\t\t\t\t<span style=\"--value: {{ seconds() }}\"></span>\n\t\t\t\t</span>\n\t\t\t\tsec\n\t\t\t</div>\n\t\t</div>\n\t}\n\n\t<!-- 01 23 59 59 -->\n\t<!-- days hours min sec -->\n\t@case ('extended-2') {\n\t\t<div class=\"grid auto-cols-max grid-flow-col gap-5 text-center\">\n\t\t\t@if (shouldShowDays) {}\n\t\t\t<div class=\"flex flex-col\">\n\t\t\t\t<span class=\"countdown font-mono text-2xl\">\n\t\t\t\t\t<span style=\"--value: {{ days() }}\"></span>\n\t\t\t\t</span>\n\t\t\t\tdays\n\t\t\t</div>\n\t\t\t@if (shouldShowHours) {}\n\t\t\t<div class=\"flex flex-col\">\n\t\t\t\t<span class=\"countdown font-mono text-2xl\">\n\t\t\t\t\t<span style=\"--value: {{ hours() }}\"></span>\n\t\t\t\t</span>\n\t\t\t\thours\n\t\t\t</div>\n\t\t\t@if (shouldShowMinutes) {}\n\t\t\t<div class=\"flex flex-col\">\n\t\t\t\t<span class=\"countdown font-mono text-2xl\">\n\t\t\t\t\t<span style=\"--value: {{ minutes() }}\"></span>\n\t\t\t\t</span>\n\t\t\t\tmin\n\t\t\t</div>\n\t\t\t@if (shouldShowSeconds) {}\n\t\t\t<div class=\"flex flex-col\">\n\t\t\t\t<span class=\"countdown font-mono text-2xl\">\n\t\t\t\t\t<span style=\"--value: {{ seconds() }}\"></span>\n\t\t\t\t</span>\n\t\t\t\tsec\n\t\t\t</div>\n\t\t</div>\n\t}\n}\n" }]
|
|
53
53
|
}] });
|