@up_si_vale/sivale-componentes-angular 1.0.0 → 1.0.2
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/esm2022/lib/atoms/button/button.component.mjs +55 -0
- package/esm2022/lib/atoms/checkbox/checkbox.component.mjs +174 -0
- package/esm2022/lib/atoms/date-picker/date-picker.component.mjs +835 -0
- package/esm2022/lib/atoms/input/input.component.mjs +218 -0
- package/esm2022/lib/atoms/loader/loader.component.mjs +81 -0
- package/esm2022/lib/atoms/radio/radio.component.mjs +142 -0
- package/esm2022/lib/atoms/textarea/textarea.component.mjs +126 -0
- package/esm2022/lib/directives/asset-source.directive.mjs +68 -0
- package/esm2022/lib/directives/icon-source.directive.mjs +65 -0
- package/esm2022/lib/directives/no-leading-space.directive.mjs +24 -0
- package/esm2022/lib/directives/only-letters.directive.mjs +25 -0
- package/esm2022/lib/directives/only-number.directive.mjs +21 -0
- package/esm2022/lib/directives/rfc.directive.mjs +67 -0
- package/esm2022/lib/directives/tooltip.directive.mjs +199 -0
- package/esm2022/lib/models/snackbar.models.mjs +2 -0
- package/esm2022/lib/molecules/alert/alert.component.mjs +79 -0
- package/esm2022/lib/molecules/copy-input/copy-input.component.mjs +46 -0
- package/esm2022/lib/molecules/multiselect/multiselect.component.mjs +466 -0
- package/esm2022/lib/molecules/option/option.component.mjs +55 -0
- package/esm2022/lib/molecules/phone-input/phone-input.component.mjs +64 -0
- package/esm2022/lib/molecules/select/select.component.mjs +498 -0
- package/esm2022/lib/molecules/snackbar/snackbar.component.mjs +581 -0
- package/esm2022/lib/organisms/sidebar/sidebar-icon.component.mjs +91 -0
- package/esm2022/lib/organisms/sidebar/sidebar.component.mjs +115 -0
- package/esm2022/lib/services/snackbar.service.mjs +96 -0
- package/esm2022/lib/tokens/asset-base-url.token.mjs +10 -0
- package/esm2022/public-api.mjs +37 -0
- package/esm2022/up_si_vale-sivale-componentes-angular.mjs +5 -0
- package/fesm2022/up_si_vale-sivale-componentes-angular.mjs +4116 -0
- package/fesm2022/up_si_vale-sivale-componentes-angular.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/atoms/button/button.component.d.ts +20 -0
- package/lib/atoms/checkbox/checkbox.component.d.ts +31 -0
- package/lib/atoms/date-picker/date-picker.component.d.ts +134 -0
- package/lib/atoms/input/input.component.d.ts +35 -0
- package/lib/atoms/loader/loader.component.d.ts +10 -0
- package/lib/atoms/radio/radio.component.d.ts +25 -0
- package/lib/atoms/textarea/textarea.component.d.ts +27 -0
- package/lib/directives/asset-source.directive.d.ts +19 -0
- package/lib/directives/icon-source.directive.d.ts +18 -0
- package/lib/directives/no-leading-space.directive.d.ts +6 -0
- package/lib/directives/only-letters.directive.d.ts +7 -0
- package/lib/directives/only-number.directive.d.ts +6 -0
- package/lib/directives/rfc.directive.d.ts +12 -0
- package/lib/directives/tooltip.directive.d.ts +27 -0
- package/{src/lib/models/snackbar.models.ts → lib/models/snackbar.models.d.ts} +8 -10
- package/lib/molecules/alert/alert.component.d.ts +29 -0
- package/lib/molecules/copy-input/copy-input.component.d.ts +14 -0
- package/lib/molecules/multiselect/multiselect.component.d.ts +74 -0
- package/lib/molecules/option/option.component.d.ts +19 -0
- package/lib/molecules/phone-input/phone-input.component.d.ts +12 -0
- package/lib/molecules/select/select.component.d.ts +88 -0
- package/lib/molecules/snackbar/snackbar.component.d.ts +17 -0
- package/lib/organisms/sidebar/sidebar-icon.component.d.ts +8 -0
- package/lib/organisms/sidebar/sidebar.component.d.ts +47 -0
- package/lib/services/snackbar.service.d.ts +40 -0
- package/{src/lib/tokens/asset-base-url.token.ts → lib/tokens/asset-base-url.token.d.ts} +1 -5
- package/package.json +39 -28
- package/{src/public-api.ts → public-api.d.ts} +3 -15
- package/ng-package.json +0 -9
- package/src/lib/atoms/button/button.component.html +0 -21
- package/src/lib/atoms/button/button.component.scss +0 -242
- package/src/lib/atoms/button/button.component.ts +0 -43
- package/src/lib/atoms/checkbox/checkbox.component.scss +0 -131
- package/src/lib/atoms/checkbox/checkbox.component.ts +0 -130
- package/src/lib/atoms/date-picker/date-picker.component.html +0 -295
- package/src/lib/atoms/date-picker/date-picker.component.scss +0 -1002
- package/src/lib/atoms/date-picker/date-picker.component.ts +0 -942
- package/src/lib/atoms/input/input.component.ts +0 -239
- package/src/lib/atoms/loader/loader.component.scss +0 -144
- package/src/lib/atoms/loader/loader.component.ts +0 -44
- package/src/lib/atoms/radio/radio.component.scss +0 -115
- package/src/lib/atoms/radio/radio.component.ts +0 -103
- package/src/lib/atoms/textarea/textarea.component.ts +0 -155
- package/src/lib/directives/asset-source.directive.ts +0 -64
- package/src/lib/directives/icon-source.directive.ts +0 -74
- package/src/lib/directives/no-leading-space.directive.ts +0 -18
- package/src/lib/directives/only-letters.directive.ts +0 -21
- package/src/lib/directives/only-number.directive.ts +0 -15
- package/src/lib/directives/rfc.directive.ts +0 -60
- package/src/lib/directives/tooltip.directive.ts +0 -211
- package/src/lib/molecules/copy-input/copy-input.component.html +0 -29
- package/src/lib/molecules/copy-input/copy-input.component.scss +0 -101
- package/src/lib/molecules/copy-input/copy-input.component.ts +0 -41
- package/src/lib/molecules/multiselect/multiselect.component.scss +0 -298
- package/src/lib/molecules/multiselect/multiselect.component.ts +0 -487
- package/src/lib/molecules/option/option.component.ts +0 -45
- package/src/lib/molecules/phone-input/phone-input.component.scss +0 -78
- package/src/lib/molecules/phone-input/phone-input.component.ts +0 -43
- package/src/lib/molecules/select/select.component.ts +0 -482
- package/src/lib/molecules/snackbar/snackbar.component.scss +0 -201
- package/src/lib/molecules/snackbar/snackbar.component.ts +0 -321
- package/src/lib/services/snackbar.service.ts +0 -103
- package/tsconfig.json +0 -31
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { Component, Input, Output, EventEmitter } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import * as i1 from "@angular/common";
|
|
5
|
+
export class AlertComponent {
|
|
6
|
+
color = 'default';
|
|
7
|
+
size = 'floating';
|
|
8
|
+
alertTitle = '';
|
|
9
|
+
supportingText;
|
|
10
|
+
showIcon = true;
|
|
11
|
+
showActions = true;
|
|
12
|
+
actionVariant = 'link';
|
|
13
|
+
dismissLabel = 'Descartar';
|
|
14
|
+
primaryActionLabel = 'Ver cambios';
|
|
15
|
+
showClose = true;
|
|
16
|
+
closeAriaLabel = 'Cerrar';
|
|
17
|
+
dismiss = new EventEmitter();
|
|
18
|
+
primaryAction = new EventEmitter();
|
|
19
|
+
closed = new EventEmitter();
|
|
20
|
+
get alertClasses() {
|
|
21
|
+
return [
|
|
22
|
+
'sv-alert',
|
|
23
|
+
`sv-alert--${this.color}`,
|
|
24
|
+
this.size === 'full-width' ? 'sv-alert--full-width' : ''
|
|
25
|
+
].filter(Boolean).join(' ');
|
|
26
|
+
}
|
|
27
|
+
get actionClass() {
|
|
28
|
+
return this.actionVariant === 'button' ? 'sv-alert__btn' : 'sv-alert__action';
|
|
29
|
+
}
|
|
30
|
+
get primaryActionClass() {
|
|
31
|
+
return this.actionVariant === 'button'
|
|
32
|
+
? 'sv-alert__btn sv-alert__btn--primary'
|
|
33
|
+
: 'sv-alert__action sv-alert__action--primary';
|
|
34
|
+
}
|
|
35
|
+
handleDismiss() {
|
|
36
|
+
this.dismiss.emit();
|
|
37
|
+
}
|
|
38
|
+
handlePrimaryAction() {
|
|
39
|
+
this.primaryAction.emit();
|
|
40
|
+
}
|
|
41
|
+
handleClose() {
|
|
42
|
+
this.closed.emit();
|
|
43
|
+
}
|
|
44
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: AlertComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
45
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: AlertComponent, isStandalone: true, selector: "app-alert", inputs: { color: "color", size: "size", alertTitle: "alertTitle", supportingText: "supportingText", showIcon: "showIcon", showActions: "showActions", actionVariant: "actionVariant", dismissLabel: "dismissLabel", primaryActionLabel: "primaryActionLabel", showClose: "showClose", closeAriaLabel: "closeAriaLabel" }, outputs: { dismiss: "dismiss", primaryAction: "primaryAction", closed: "closed" }, ngImport: i0, template: "<div [class]=\"alertClasses\" role=\"alert\">\n <div class=\"sv-alert__container\">\n <div class=\"sv-alert__icon\" *ngIf=\"showIcon\" aria-hidden=\"true\">\n <svg *ngIf=\"color === 'error'\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M7.86 2h8.28L22 7.86v8.28L16.14 22H7.86L2 16.14V7.86L7.86 2Z\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n <path d=\"M12 8v4M12 16h.01\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n <svg *ngIf=\"color === 'warning'\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0Z\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n <path d=\"M12 9v4M12 17h.01\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n <svg *ngIf=\"color === 'success'\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M22 11.08V12a10 10 0 1 1-5.93-9.14\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n <path d=\"M22 4 12 14.01l-3-3\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n <svg *ngIf=\"color !== 'error' && color !== 'warning' && color !== 'success'\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Z\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n <path d=\"M12 16v-4M12 8h.01\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n </div>\n\n <div class=\"sv-alert__content\">\n <div class=\"sv-alert__body\">\n <p class=\"sv-alert__title\">{{ alertTitle }}</p>\n <p class=\"sv-alert__text\" *ngIf=\"supportingText\">{{ supportingText }}</p>\n </div>\n\n <div class=\"sv-alert__actions\" *ngIf=\"showActions\">\n <button type=\"button\" [class]=\"actionClass\" (click)=\"handleDismiss()\">{{ dismissLabel }}</button>\n <button type=\"button\" [class]=\"primaryActionClass\" (click)=\"handlePrimaryAction()\">{{ primaryActionLabel }}</button>\n </div>\n </div>\n\n <button\n type=\"button\"\n class=\"sv-alert__close\"\n *ngIf=\"showClose\"\n [attr.aria-label]=\"closeAriaLabel\"\n (click)=\"handleClose()\">\n <svg viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M18 6 6 18M6 6l12 12\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n </button>\n </div>\n</div>\n", styles: [".sv-alert{--sv-alert-bg: #ffffff;--sv-alert-border: #d4d4d4;--sv-alert-icon-fg: #737373;--sv-alert-icon-bg: #ffffff;--sv-alert-title: #404040;--sv-alert-text: #525252;--sv-alert-link: #2b3c7f;--sv-alert-solid: #364b9f;position:relative;display:flex;flex-direction:column;align-items:center;width:100%;padding:32px;background-color:var(--sv-alert-bg);border:1px solid var(--sv-alert-border);border-radius:12px;box-shadow:0 1px 2px #0000000d;font-family:Roboto,sans-serif;box-sizing:border-box}.sv-alert *{box-sizing:border-box}.sv-alert__container{display:flex;align-items:flex-start;gap:32px;width:100%}.sv-alert__icon{position:relative;flex-shrink:0;display:flex;align-items:center;justify-content:center;width:40px;height:40px;border:1px solid var(--sv-alert-border);border-radius:8px;background-color:var(--sv-alert-icon-bg);color:var(--sv-alert-icon-fg);box-shadow:0 1px 2px #0000000d,inset 0 0 0 1px #0000002e,inset 0 -2px #0000000d}.sv-alert__icon svg{width:20px;height:20px;display:block}.sv-alert__content{display:flex;flex:1 0 0;flex-direction:column;align-items:flex-start;gap:24px;min-width:0}.sv-alert__body{display:flex;flex-direction:column;align-items:flex-start;gap:8px;width:100%}.sv-alert__title{margin:0;padding-right:56px;width:100%;font-family:Roboto,sans-serif;font-weight:600;font-size:14px;line-height:20px;color:var(--sv-alert-title);word-break:break-word}.sv-alert__text{margin:0;width:100%;font-family:Roboto,sans-serif;font-weight:400;font-size:14px;line-height:20px;color:var(--sv-alert-text);word-break:break-word}.sv-alert__actions{display:flex;align-items:center;gap:24px;flex-shrink:0}.sv-alert__action{padding:0;border:none;background:none;font-family:Roboto,sans-serif;font-weight:600;font-size:14px;line-height:20px;color:var(--sv-alert-text);white-space:nowrap;cursor:pointer;transition:opacity .2s ease-in-out}.sv-alert__action:hover{opacity:.7}.sv-alert__action:focus-visible{outline:2px solid var(--sv-alert-link);outline-offset:2px;border-radius:4px}.sv-alert__action--primary{color:var(--sv-alert-link)}.sv-alert__close{position:absolute;top:7px;right:7px;display:flex;align-items:center;justify-content:center;flex-shrink:0;width:36px;height:36px;padding:0;border:none;border-radius:8px;background:none;color:var(--sv-alert-icon-fg);cursor:pointer;transition:background-color .2s ease-in-out}.sv-alert__close:hover{background-color:#0000000d}.sv-alert__close:focus-visible{outline:2px solid var(--sv-alert-link);outline-offset:-2px}.sv-alert__close svg{width:20px;height:20px;display:block}.sv-alert--brand{--sv-alert-bg: #f3f4f9;--sv-alert-border: #2b3c7f;--sv-alert-icon-fg: #364b9f;--sv-alert-icon-bg: #e5e8f3}.sv-alert--gray{--sv-alert-icon-fg: #737373;--sv-alert-icon-bg: #f5f5f5}.sv-alert--error{--sv-alert-bg: #fef2f2;--sv-alert-border: #dc2626;--sv-alert-icon-fg: #dc2626;--sv-alert-icon-bg: #fee2e2}.sv-alert--warning{--sv-alert-bg: #fefce8;--sv-alert-border: #ca8a04;--sv-alert-icon-fg: #ca8a04;--sv-alert-icon-bg: #fef9c3}.sv-alert--success{--sv-alert-bg: #f0fdf4;--sv-alert-border: #16a34a;--sv-alert-icon-fg: #16a34a;--sv-alert-icon-bg: #dcfce7}.sv-alert--brand .sv-alert__icon,.sv-alert--gray .sv-alert__icon,.sv-alert--error .sv-alert__icon,.sv-alert--warning .sv-alert__icon,.sv-alert--success .sv-alert__icon{border:none;border-radius:9999px;box-shadow:none}.sv-alert--full-width{padding:0;border:none;border-bottom:1px solid var(--sv-alert-border);border-radius:0;box-shadow:none}.sv-alert--full-width .sv-alert__container{align-items:center;gap:24px;max-width:1280px;padding:24px 32px}.sv-alert--full-width .sv-alert__content{flex-direction:row;align-items:center;gap:24px}.sv-alert--full-width .sv-alert__body{flex-direction:row;flex-wrap:wrap;align-items:baseline;gap:2px 12px;width:auto;flex:1 0 0;min-width:0}.sv-alert--full-width .sv-alert__title,.sv-alert--full-width .sv-alert__text{width:auto;padding-right:0}.sv-alert--full-width .sv-alert__close{position:static;align-self:center}.sv-alert__btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:12px 28px;border:1px solid var(--sv-alert-solid);border-radius:8px;background-color:#fff;font-family:Roboto,sans-serif;font-weight:600;font-size:14px;line-height:20px;color:var(--sv-alert-title);white-space:nowrap;cursor:pointer;box-shadow:0 1px 2px #0000000d,inset 0 0 0 1px #0000002e,inset 0 -2px #0000000d;transition:filter .2s ease-in-out}.sv-alert__btn:hover{filter:brightness(.97)}.sv-alert__btn:focus-visible{outline:2px solid var(--sv-alert-solid);outline-offset:2px}.sv-alert__btn--primary{border-color:#ffffff1f;border-width:2px;background-color:var(--sv-alert-solid);color:#fff}@media (max-width: 768px){.sv-alert{padding:16px}.sv-alert__container{flex-direction:column;align-items:flex-start;gap:16px}.sv-alert__content{width:100%}.sv-alert__title{padding-right:40px}.sv-alert--full-width{padding:0}.sv-alert--full-width .sv-alert__container{flex-direction:column;align-items:flex-start;gap:32px;padding:32px 16px}.sv-alert--full-width .sv-alert__content{flex-direction:column;align-items:flex-start;gap:16px;width:100%}.sv-alert--full-width .sv-alert__body{flex-direction:column;gap:4px;width:100%}.sv-alert--full-width .sv-alert__actions:has(.sv-alert__btn){flex-direction:column-reverse;align-items:stretch;gap:12px;width:100%}.sv-alert--full-width .sv-alert__close{position:absolute;top:16px;right:8px}.sv-alert__btn{width:100%}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
46
|
+
}
|
|
47
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: AlertComponent, decorators: [{
|
|
48
|
+
type: Component,
|
|
49
|
+
args: [{ selector: 'app-alert', standalone: true, imports: [CommonModule], template: "<div [class]=\"alertClasses\" role=\"alert\">\n <div class=\"sv-alert__container\">\n <div class=\"sv-alert__icon\" *ngIf=\"showIcon\" aria-hidden=\"true\">\n <svg *ngIf=\"color === 'error'\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M7.86 2h8.28L22 7.86v8.28L16.14 22H7.86L2 16.14V7.86L7.86 2Z\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n <path d=\"M12 8v4M12 16h.01\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n <svg *ngIf=\"color === 'warning'\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0Z\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n <path d=\"M12 9v4M12 17h.01\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n <svg *ngIf=\"color === 'success'\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M22 11.08V12a10 10 0 1 1-5.93-9.14\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n <path d=\"M22 4 12 14.01l-3-3\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n <svg *ngIf=\"color !== 'error' && color !== 'warning' && color !== 'success'\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Z\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n <path d=\"M12 16v-4M12 8h.01\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n </div>\n\n <div class=\"sv-alert__content\">\n <div class=\"sv-alert__body\">\n <p class=\"sv-alert__title\">{{ alertTitle }}</p>\n <p class=\"sv-alert__text\" *ngIf=\"supportingText\">{{ supportingText }}</p>\n </div>\n\n <div class=\"sv-alert__actions\" *ngIf=\"showActions\">\n <button type=\"button\" [class]=\"actionClass\" (click)=\"handleDismiss()\">{{ dismissLabel }}</button>\n <button type=\"button\" [class]=\"primaryActionClass\" (click)=\"handlePrimaryAction()\">{{ primaryActionLabel }}</button>\n </div>\n </div>\n\n <button\n type=\"button\"\n class=\"sv-alert__close\"\n *ngIf=\"showClose\"\n [attr.aria-label]=\"closeAriaLabel\"\n (click)=\"handleClose()\">\n <svg viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M18 6 6 18M6 6l12 12\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n </button>\n </div>\n</div>\n", styles: [".sv-alert{--sv-alert-bg: #ffffff;--sv-alert-border: #d4d4d4;--sv-alert-icon-fg: #737373;--sv-alert-icon-bg: #ffffff;--sv-alert-title: #404040;--sv-alert-text: #525252;--sv-alert-link: #2b3c7f;--sv-alert-solid: #364b9f;position:relative;display:flex;flex-direction:column;align-items:center;width:100%;padding:32px;background-color:var(--sv-alert-bg);border:1px solid var(--sv-alert-border);border-radius:12px;box-shadow:0 1px 2px #0000000d;font-family:Roboto,sans-serif;box-sizing:border-box}.sv-alert *{box-sizing:border-box}.sv-alert__container{display:flex;align-items:flex-start;gap:32px;width:100%}.sv-alert__icon{position:relative;flex-shrink:0;display:flex;align-items:center;justify-content:center;width:40px;height:40px;border:1px solid var(--sv-alert-border);border-radius:8px;background-color:var(--sv-alert-icon-bg);color:var(--sv-alert-icon-fg);box-shadow:0 1px 2px #0000000d,inset 0 0 0 1px #0000002e,inset 0 -2px #0000000d}.sv-alert__icon svg{width:20px;height:20px;display:block}.sv-alert__content{display:flex;flex:1 0 0;flex-direction:column;align-items:flex-start;gap:24px;min-width:0}.sv-alert__body{display:flex;flex-direction:column;align-items:flex-start;gap:8px;width:100%}.sv-alert__title{margin:0;padding-right:56px;width:100%;font-family:Roboto,sans-serif;font-weight:600;font-size:14px;line-height:20px;color:var(--sv-alert-title);word-break:break-word}.sv-alert__text{margin:0;width:100%;font-family:Roboto,sans-serif;font-weight:400;font-size:14px;line-height:20px;color:var(--sv-alert-text);word-break:break-word}.sv-alert__actions{display:flex;align-items:center;gap:24px;flex-shrink:0}.sv-alert__action{padding:0;border:none;background:none;font-family:Roboto,sans-serif;font-weight:600;font-size:14px;line-height:20px;color:var(--sv-alert-text);white-space:nowrap;cursor:pointer;transition:opacity .2s ease-in-out}.sv-alert__action:hover{opacity:.7}.sv-alert__action:focus-visible{outline:2px solid var(--sv-alert-link);outline-offset:2px;border-radius:4px}.sv-alert__action--primary{color:var(--sv-alert-link)}.sv-alert__close{position:absolute;top:7px;right:7px;display:flex;align-items:center;justify-content:center;flex-shrink:0;width:36px;height:36px;padding:0;border:none;border-radius:8px;background:none;color:var(--sv-alert-icon-fg);cursor:pointer;transition:background-color .2s ease-in-out}.sv-alert__close:hover{background-color:#0000000d}.sv-alert__close:focus-visible{outline:2px solid var(--sv-alert-link);outline-offset:-2px}.sv-alert__close svg{width:20px;height:20px;display:block}.sv-alert--brand{--sv-alert-bg: #f3f4f9;--sv-alert-border: #2b3c7f;--sv-alert-icon-fg: #364b9f;--sv-alert-icon-bg: #e5e8f3}.sv-alert--gray{--sv-alert-icon-fg: #737373;--sv-alert-icon-bg: #f5f5f5}.sv-alert--error{--sv-alert-bg: #fef2f2;--sv-alert-border: #dc2626;--sv-alert-icon-fg: #dc2626;--sv-alert-icon-bg: #fee2e2}.sv-alert--warning{--sv-alert-bg: #fefce8;--sv-alert-border: #ca8a04;--sv-alert-icon-fg: #ca8a04;--sv-alert-icon-bg: #fef9c3}.sv-alert--success{--sv-alert-bg: #f0fdf4;--sv-alert-border: #16a34a;--sv-alert-icon-fg: #16a34a;--sv-alert-icon-bg: #dcfce7}.sv-alert--brand .sv-alert__icon,.sv-alert--gray .sv-alert__icon,.sv-alert--error .sv-alert__icon,.sv-alert--warning .sv-alert__icon,.sv-alert--success .sv-alert__icon{border:none;border-radius:9999px;box-shadow:none}.sv-alert--full-width{padding:0;border:none;border-bottom:1px solid var(--sv-alert-border);border-radius:0;box-shadow:none}.sv-alert--full-width .sv-alert__container{align-items:center;gap:24px;max-width:1280px;padding:24px 32px}.sv-alert--full-width .sv-alert__content{flex-direction:row;align-items:center;gap:24px}.sv-alert--full-width .sv-alert__body{flex-direction:row;flex-wrap:wrap;align-items:baseline;gap:2px 12px;width:auto;flex:1 0 0;min-width:0}.sv-alert--full-width .sv-alert__title,.sv-alert--full-width .sv-alert__text{width:auto;padding-right:0}.sv-alert--full-width .sv-alert__close{position:static;align-self:center}.sv-alert__btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:12px 28px;border:1px solid var(--sv-alert-solid);border-radius:8px;background-color:#fff;font-family:Roboto,sans-serif;font-weight:600;font-size:14px;line-height:20px;color:var(--sv-alert-title);white-space:nowrap;cursor:pointer;box-shadow:0 1px 2px #0000000d,inset 0 0 0 1px #0000002e,inset 0 -2px #0000000d;transition:filter .2s ease-in-out}.sv-alert__btn:hover{filter:brightness(.97)}.sv-alert__btn:focus-visible{outline:2px solid var(--sv-alert-solid);outline-offset:2px}.sv-alert__btn--primary{border-color:#ffffff1f;border-width:2px;background-color:var(--sv-alert-solid);color:#fff}@media (max-width: 768px){.sv-alert{padding:16px}.sv-alert__container{flex-direction:column;align-items:flex-start;gap:16px}.sv-alert__content{width:100%}.sv-alert__title{padding-right:40px}.sv-alert--full-width{padding:0}.sv-alert--full-width .sv-alert__container{flex-direction:column;align-items:flex-start;gap:32px;padding:32px 16px}.sv-alert--full-width .sv-alert__content{flex-direction:column;align-items:flex-start;gap:16px;width:100%}.sv-alert--full-width .sv-alert__body{flex-direction:column;gap:4px;width:100%}.sv-alert--full-width .sv-alert__actions:has(.sv-alert__btn){flex-direction:column-reverse;align-items:stretch;gap:12px;width:100%}.sv-alert--full-width .sv-alert__close{position:absolute;top:16px;right:8px}.sv-alert__btn{width:100%}}\n"] }]
|
|
50
|
+
}], propDecorators: { color: [{
|
|
51
|
+
type: Input
|
|
52
|
+
}], size: [{
|
|
53
|
+
type: Input
|
|
54
|
+
}], alertTitle: [{
|
|
55
|
+
type: Input
|
|
56
|
+
}], supportingText: [{
|
|
57
|
+
type: Input
|
|
58
|
+
}], showIcon: [{
|
|
59
|
+
type: Input
|
|
60
|
+
}], showActions: [{
|
|
61
|
+
type: Input
|
|
62
|
+
}], actionVariant: [{
|
|
63
|
+
type: Input
|
|
64
|
+
}], dismissLabel: [{
|
|
65
|
+
type: Input
|
|
66
|
+
}], primaryActionLabel: [{
|
|
67
|
+
type: Input
|
|
68
|
+
}], showClose: [{
|
|
69
|
+
type: Input
|
|
70
|
+
}], closeAriaLabel: [{
|
|
71
|
+
type: Input
|
|
72
|
+
}], dismiss: [{
|
|
73
|
+
type: Output
|
|
74
|
+
}], primaryAction: [{
|
|
75
|
+
type: Output
|
|
76
|
+
}], closed: [{
|
|
77
|
+
type: Output
|
|
78
|
+
}] } });
|
|
79
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWxlcnQuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vc3JjL2xpYi9tb2xlY3VsZXMvYWxlcnQvYWxlcnQuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vc3JjL2xpYi9tb2xlY3VsZXMvYWxlcnQvYWxlcnQuY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFNBQVMsRUFBRSxLQUFLLEVBQUUsTUFBTSxFQUFFLFlBQVksRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUN2RSxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0saUJBQWlCLENBQUM7OztBQWEvQyxNQUFNLE9BQU8sY0FBYztJQUNoQixLQUFLLEdBQWUsU0FBUyxDQUFDO0lBQzlCLElBQUksR0FBYyxVQUFVLENBQUM7SUFDN0IsVUFBVSxHQUFXLEVBQUUsQ0FBQztJQUN4QixjQUFjLENBQVU7SUFDeEIsUUFBUSxHQUFZLElBQUksQ0FBQztJQUN6QixXQUFXLEdBQVksSUF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iZWwgfX08L2J1dHRvbj5cbiAgICAgICAgPGJ1dHRvbiB0eXBlPVwiYnV0dG9uXCIgW2NsYXNzXT1cInByaW1hcnlBY3Rpb25DbGFzc1wiIChjbGljayk9XCJoYW5kbGVQcmltYXJ5QWN0aW9uKClcIj57eyBwcmltYXJ5QWN0aW9uTGFiZWwgfX08L2J1dHRvbj5cbiAgICAgIDwvZGl2PlxuICAgIDwvZGl2PlxuXG4gICAgPGJ1dHRvblxuICAgICAgdHlwZT1cImJ1dHRvblwiXG4gICAgICBjbGFzcz1cInN2LWFsZXJ0X19jbG9zZVwiXG4gICAgICAqbmdJZj1cInNob3dDbG9zZVwiXG4gICAgICBbYXR0ci5hcmlhLWxhYmVsXT1cImNsb3NlQXJpYUxhYmVsXCJcbiAgICAgIChjbGljayk9XCJoYW5kbGVDbG9zZSgpXCI+XG4gICAgICA8c3ZnIHZpZXdCb3g9XCIwIDAgMjQgMjRcIiBmaWxsPVwibm9uZVwiIHhtbG5zPVwiaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmdcIj5cbiAgICAgICAgPHBhdGggZD1cIk0xOCA2IDYgMThNNiA2bDEyIDEyXCIgc3Ryb2tlPVwiY3VycmVudENvbG9yXCIgc3Ryb2tlLXdpZHRoPVwiMlwiIHN0cm9rZS1saW5lY2FwPVwicm91bmRcIiBzdHJva2UtbGluZWpvaW49XCJyb3VuZFwiLz5cbiAgICAgIDwvc3ZnPlxuICAgIDwvYnV0dG9uPlxuICA8L2Rpdj5cbjwvZGl2PlxuIl19
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { CommonModule } from '@angular/common';
|
|
2
|
+
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import * as i1 from "@angular/common";
|
|
5
|
+
export class CopyInputComponent {
|
|
6
|
+
value = '';
|
|
7
|
+
icon = 'icon-copy-clipboard';
|
|
8
|
+
copiedIcon = 'icon-done';
|
|
9
|
+
ariaLabel = 'Copiar';
|
|
10
|
+
copied = new EventEmitter();
|
|
11
|
+
isCopied = false;
|
|
12
|
+
timeoutRef;
|
|
13
|
+
async copyToClipboard() {
|
|
14
|
+
try {
|
|
15
|
+
await navigator.clipboard.writeText(this.value);
|
|
16
|
+
this.isCopied = true;
|
|
17
|
+
this.copied.emit();
|
|
18
|
+
clearTimeout(this.timeoutRef);
|
|
19
|
+
this.timeoutRef = setTimeout(() => {
|
|
20
|
+
this.isCopied = false;
|
|
21
|
+
}, 1200);
|
|
22
|
+
}
|
|
23
|
+
catch (err) {
|
|
24
|
+
console.error('Error copiando:', err);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: CopyInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
28
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: CopyInputComponent, isStandalone: true, selector: "copy-input", inputs: { value: "value", icon: "icon", copiedIcon: "copiedIcon", ariaLabel: "ariaLabel" }, outputs: { copied: "copied" }, ngImport: i0, template: "<div class=\"copy-input-wrapper\">\n\n <!-- Tooltip -->\n <div\n class=\"copy-tooltip\"\n *ngIf=\"isCopied\"\n >\n Copiado\n </div>\n\n <!-- Componente -->\n <div\n class=\"copy-input\"\n (click)=\"copyToClipboard()\"\n tabindex=\"0\"\n role=\"button\"\n [attr.aria-label]=\"ariaLabel\"\n (keydown.enter)=\"copyToClipboard()\"\n >\n <i\n class=\"copy-input__icon\"\n [ngClass]=\"isCopied ? copiedIcon : icon\">\n </i>\n\n <span class=\"copy-input__text\">\n {{ value }}\n </span>\n </div>\n</div>\n", styles: ["@charset \"UTF-8\";.copy-input-wrapper{position:relative;display:inline-block;max-width:100%}.copy-tooltip{position:absolute;top:-2rem;left:50%;transform:translate(-50%);padding:.375rem .625rem;background:#2f2f2f;color:#fff;font-size:.75rem;border-radius:.375rem;white-space:nowrap;opacity:0;animation:fadeSlide .25s forwards}.copy-tooltip:after{content:\"\";position:absolute;bottom:-.375rem;left:50%;transform:translate(-50%);border-width:.375rem;border-style:solid;border-color:#2f2f2f transparent transparent transparent}@keyframes fadeSlide{0%{opacity:0;transform:translate(-50%,-5px)}to{opacity:1;transform:translate(-50%)}}.copy-input{display:flex;align-items:center;gap:.5rem;width:100%;box-sizing:border-box;padding:.625rem 1.125rem;border:2px solid #6D7275;border-radius:.5rem;cursor:pointer;-webkit-user-select:none;user-select:none;transition:background .2s ease,border-color .2s ease}.copy-input:hover{background:#f9f9f9;border-color:#d8d8d8}.copy-input:active{background:#f0f0f0}.copy-input:focus{outline-offset:2px}.copy-input__icon{font-size:1.1rem;color:#444;transition:transform .2s ease,color .2s ease}.copy-input__icon.icon-done{transform:scale(1.2);color:#27ae60}.copy-input__text{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-family:Quicksand,sans-serif;font-weight:600;font-size:1rem;line-height:1.5rem;color:#2e353a}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
29
|
+
}
|
|
30
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: CopyInputComponent, decorators: [{
|
|
31
|
+
type: Component,
|
|
32
|
+
args: [{ selector: 'copy-input', standalone: true, imports: [
|
|
33
|
+
CommonModule
|
|
34
|
+
], template: "<div class=\"copy-input-wrapper\">\n\n <!-- Tooltip -->\n <div\n class=\"copy-tooltip\"\n *ngIf=\"isCopied\"\n >\n Copiado\n </div>\n\n <!-- Componente -->\n <div\n class=\"copy-input\"\n (click)=\"copyToClipboard()\"\n tabindex=\"0\"\n role=\"button\"\n [attr.aria-label]=\"ariaLabel\"\n (keydown.enter)=\"copyToClipboard()\"\n >\n <i\n class=\"copy-input__icon\"\n [ngClass]=\"isCopied ? copiedIcon : icon\">\n </i>\n\n <span class=\"copy-input__text\">\n {{ value }}\n </span>\n </div>\n</div>\n", styles: ["@charset \"UTF-8\";.copy-input-wrapper{position:relative;display:inline-block;max-width:100%}.copy-tooltip{position:absolute;top:-2rem;left:50%;transform:translate(-50%);padding:.375rem .625rem;background:#2f2f2f;color:#fff;font-size:.75rem;border-radius:.375rem;white-space:nowrap;opacity:0;animation:fadeSlide .25s forwards}.copy-tooltip:after{content:\"\";position:absolute;bottom:-.375rem;left:50%;transform:translate(-50%);border-width:.375rem;border-style:solid;border-color:#2f2f2f transparent transparent transparent}@keyframes fadeSlide{0%{opacity:0;transform:translate(-50%,-5px)}to{opacity:1;transform:translate(-50%)}}.copy-input{display:flex;align-items:center;gap:.5rem;width:100%;box-sizing:border-box;padding:.625rem 1.125rem;border:2px solid #6D7275;border-radius:.5rem;cursor:pointer;-webkit-user-select:none;user-select:none;transition:background .2s ease,border-color .2s ease}.copy-input:hover{background:#f9f9f9;border-color:#d8d8d8}.copy-input:active{background:#f0f0f0}.copy-input:focus{outline-offset:2px}.copy-input__icon{font-size:1.1rem;color:#444;transition:transform .2s ease,color .2s ease}.copy-input__icon.icon-done{transform:scale(1.2);color:#27ae60}.copy-input__text{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-family:Quicksand,sans-serif;font-weight:600;font-size:1rem;line-height:1.5rem;color:#2e353a}\n"] }]
|
|
35
|
+
}], propDecorators: { value: [{
|
|
36
|
+
type: Input
|
|
37
|
+
}], icon: [{
|
|
38
|
+
type: Input
|
|
39
|
+
}], copiedIcon: [{
|
|
40
|
+
type: Input
|
|
41
|
+
}], ariaLabel: [{
|
|
42
|
+
type: Input
|
|
43
|
+
}], copied: [{
|
|
44
|
+
type: Output
|
|
45
|
+
}] } });
|
|
46
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJ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