blip-ds 1.182.0 → 1.184.1
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/dist/blip-ds/bds-button.entry.js +12 -10
- package/dist/blip-ds/bds-button.system.entry.js +1 -1
- package/dist/blip-ds/bds-input-password.entry.js +34 -2
- package/dist/blip-ds/bds-input-password.system.entry.js +1 -1
- package/dist/blip-ds/bds-upload.entry.js +8 -3
- package/dist/blip-ds/bds-upload.system.entry.js +1 -1
- package/dist/blip-ds/p-0d62d10f.entry.js +1 -0
- package/dist/blip-ds/p-4778a268.entry.js +1 -0
- package/dist/blip-ds/p-4b49ab55.entry.js +1 -0
- package/dist/blip-ds/p-53ca3b00.system.js +1 -1
- package/dist/blip-ds/p-722af084.system.entry.js +1 -0
- package/dist/{esm-es5/bds-icon_2.entry.js → blip-ds/p-a923c001.system.entry.js} +1 -1
- package/dist/blip-ds/p-b76f3c49.system.entry.js +1 -0
- package/dist/cjs/bds-button.cjs.entry.js +12 -10
- package/dist/cjs/{bds-icon_2.cjs.entry.js → bds-button_4.cjs.entry.js} +117 -0
- package/dist/cjs/bds-input-password.cjs.entry.js +33 -1
- package/dist/cjs/bds-upload.cjs.entry.js +8 -3
- package/dist/collection/components/button/button.css +8 -8
- package/dist/collection/components/button/button.js +11 -9
- package/dist/collection/components/input-password/input-password.js +123 -2
- package/dist/collection/components/upload/bds-upload.css +2 -3
- package/dist/collection/components/upload/bds-upload.js +7 -2
- package/dist/esm/bds-button.entry.js +12 -10
- package/dist/esm/{bds-icon_2.entry.js → bds-button_4.entry.js} +117 -2
- package/dist/esm/bds-input-password.entry.js +34 -2
- package/dist/esm/bds-upload.entry.js +8 -3
- package/dist/esm-es5/bds-button_4.entry.js +1 -0
- package/dist/esm-es5/bds-input-password.entry.js +1 -1
- package/dist/esm-es5/bds-upload.entry.js +1 -1
- package/dist/esm-es5/blip-ds.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/types/components/input-password/input-password.d.ts +31 -0
- package/dist/types/components.d.ts +28 -0
- package/package.json +1 -1
- package/dist/blip-ds/p-21a6fff7.system.entry.js +0 -1
- package/dist/blip-ds/p-28272953.entry.js +0 -1
- package/dist/blip-ds/p-41120a36.entry.js +0 -1
- package/dist/blip-ds/p-55cef096.system.entry.js +0 -1
- package/dist/blip-ds/p-8fb1aae5.entry.js +0 -1
- package/dist/blip-ds/p-95a4efe2.system.entry.js +0 -1
- package/dist/blip-ds/p-9c2ef009.system.entry.js +0 -1
- package/dist/blip-ds/p-f4ad9976.entry.js +0 -1
- package/dist/cjs/bds-button_2.cjs.entry.js +0 -121
- package/dist/esm/bds-button_2.entry.js +0 -116
- package/dist/esm-es5/bds-button_2.entry.js +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, h, g as getElement } from './index-bb4c2258.js';
|
|
2
2
|
|
|
3
|
-
const buttonCss = "@import url(\"https://fonts.googleapis.com/css2?family=Nunito+Sans:ital,wght@0,200;0,300;0,400;0,600;0,700;0,800;0,900;1,200;1,300;1,400;1,600;1,700;1,800;1,900&display=swap\"); .button{border:none;margin:0;padding:0;width:auto;overflow:visible;outline:none;background:transparent;color:inherit;font:inherit;line-height:normal;-webkit-font-smoothing:inherit;-moz-osx-font-smoothing:inherit;-webkit-appearance:none;cursor:pointer;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;height:100%;border-radius:8px;padding-left:16px;padding-right:16px;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-transition:all 0.5s;-moz-transition:all 0.5s;transition:all 0.5s}.button::-moz-focus-inner{border:0;padding:0}.button--size-tall{padding-top:14px;padding-bottom:14px;height:40px}.button--size-tall--icon{padding-top:12px;padding-bottom:12px;height:40px}.button--size-standard{padding-top:9px;padding-bottom:9px;height:40px}.button--size-standard--icon{padding-top:8px;padding-bottom:8px;height:40px}.button--size-short{padding-top:5px;padding-bottom:5px;height:32px}.button--size-short--icon{padding-top:4px;padding-bottom:4px;height:40px}.button--size-icon--left{padding-left:16px}.button--size-icon--right{padding-right:16px}.button__icon{color:inherit;background-color:inherit;height:24px;margin-right:4px}.button__arrow{color:inherit;background-color:inherit;height:24px;margin-left:2px}.button__content{height:20px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.button__primary{background:#3f7de8;color:#ffffff}.button__primary:hover{background:#125ad5}.button__primary:active{background:#0747a6;color:#ffffff}.button__primary--disabled{
|
|
3
|
+
const buttonCss = "@import url(\"https://fonts.googleapis.com/css2?family=Nunito+Sans:ital,wght@0,200;0,300;0,400;0,600;0,700;0,800;0,900;1,200;1,300;1,400;1,600;1,700;1,800;1,900&display=swap\"); .button{border:none;margin:0;padding:0;width:auto;overflow:visible;outline:none;background:transparent;color:inherit;font:inherit;line-height:normal;-webkit-font-smoothing:inherit;-moz-osx-font-smoothing:inherit;-webkit-appearance:none;cursor:pointer;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;height:100%;border-radius:8px;padding-left:16px;padding-right:16px;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-transition:all 0.5s;-moz-transition:all 0.5s;transition:all 0.5s}.button::-moz-focus-inner{border:0;padding:0}.button--size-tall{padding-top:14px;padding-bottom:14px;height:40px}.button--size-tall--icon{padding-top:12px;padding-bottom:12px;height:40px}.button--size-standard{padding-top:9px;padding-bottom:9px;height:40px}.button--size-standard--icon{padding-top:8px;padding-bottom:8px;height:40px}.button--size-short{padding-top:5px;padding-bottom:5px;height:32px}.button--size-short--icon{padding-top:4px;padding-bottom:4px;height:40px}.button--size-icon--left{padding-left:16px}.button--size-icon--right{padding-right:16px}.button__icon{color:inherit;background-color:inherit;height:24px;margin-right:4px}.button__arrow{color:inherit;background-color:inherit;height:24px;margin-left:2px}.button__content{height:20px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.button__primary{background:#3f7de8;color:#ffffff}.button__primary:hover{background:#125ad5}.button__primary:active{background:#0747a6;color:#ffffff}.button__primary--disabled{background:#e8f2ff;pointer-events:none;color:#637798}.button__primary--disabled:hover,.button__primary--disabled:active{background:#e8f2ff;color:#637798}.button__secondary{background:transparent;color:#505f79}.button__secondary:hover{background:#e8f2ff;color:#3f7de8}.button__secondary:active{background:#d1e3fa;color:#3f7de8}.button__secondary--disabled{background:transparent;pointer-events:none;color:#637798}.button__secondary--disabled:hover,.button__secondary--disabled:active{background:transparent;color:#637798}.button__tertiary{background:transparent;color:#3f7de8;border:1px solid #d2dfe6}.button__tertiary:hover{border:1px solid #3f7de8;color:#3f7de8}.button__tertiary:active{background:#d1e3fa;border:1px solid #3f7de8;color:#3f7de8}.button__tertiary--disabled{background:transparent;pointer-events:none;color:#637798;border:1px solid #637798}.button__tertiary--disabled:hover,.button__tertiary--disabled:active{background:transparent;color:#637798;border:1px solid #637798}.button__secondary--white{background:transparent;color:#ffffff}.button__secondary--white:hover{background:rgba(255, 255, 255, 0.3);color:#ffffff}.button__secondary--white:active{background:rgba(255, 255, 255, 0.4);color:#ffffff}.button__secondary--white--disabled{background:#e8f2ff;pointer-events:none;color:#8ca0b3}.button__secondary--white--disabled:hover,.button__secondary--white--disabled:active{background:#e8f2ff;color:#8ca0b3}.button__ghost{background:transparent;color:#3f7de8;border:1px solid #3f7de8}.button__ghost:hover{background:#e8f2ff;color:#3f7de8;border:1px solid #3f7de8}.button__ghost:active{background:#d1e3fa;color:#3f7de8;border:1px solid #3f7de8}.button__ghost--disabled{background:transparent;pointer-events:none;color:#637798;border:1px solid #637798}.button__ghost--disabled:hover,.button__ghost--disabled:active{background:transparent;color:#637798;border:1px solid #637798}.button__delete{background:#ff4c4c;color:#ffffff}.button__delete:hover{background:#a01c2c;color:#ffffff}.button__delete:active{background:#6a2026;color:#ffffff}.button__delete--disabled{background:#fccccc;pointer-events:none;color:#ba5a5a}.button__delete--disabled:hover,.button__delete--disabled:active{background:#fccccc;color:#ba5a5a}.button__dashed{background:transparent;color:#3f7de8;border:1px dashed #3f7de8}.button__dashed:hover{background:transparent;color:#125ad5;border:1px dashed #125ad5}.button__dashed:active{background:transparent;color:#3f7de8;border:1px dashed #3f7de8}.button__dashed--disabled{background:transparent;pointer-events:none;color:#8ca0b3;border:1px dashed #8ca0b3}.button__dashed--disabled:hover,.button__dashed--disabled:active{background:transparent;color:#8ca0b3;border:1px dashed #8ca0b3}.button__facebook{background:#1877f2;color:#f8fbfb}.button__facebook:hover{background:#1771e6}.button__facebook:active{background:#3f7de8;color:#f8fbfb}.button__facebook--disabled{background:#e8f2ff;pointer-events:none;color:#8ca0b3}.button__facebook--disabled:hover,.button__facebook--disabled:active{background:#e8f2ff;color:#8ca0b3}.button bds-loading-spinner{width:auto;max-height:100%;position:absolute}.button .hide{cursor:not-allowed;opacity:0}";
|
|
4
4
|
|
|
5
5
|
const Button = class {
|
|
6
6
|
constructor(hostRef) {
|
|
@@ -50,15 +50,17 @@ const Button = class {
|
|
|
50
50
|
*/
|
|
51
51
|
this.dataTest = null;
|
|
52
52
|
this.handleClick = (ev) => {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
53
|
+
if (!this.disabled) {
|
|
54
|
+
const form = this.el.closest('form');
|
|
55
|
+
if (form) {
|
|
56
|
+
ev.preventDefault();
|
|
57
|
+
const fakeButton = document.createElement('button');
|
|
58
|
+
fakeButton.type = this.type;
|
|
59
|
+
fakeButton.style.display = 'none';
|
|
60
|
+
form.appendChild(fakeButton);
|
|
61
|
+
fakeButton.click();
|
|
62
|
+
fakeButton.remove();
|
|
63
|
+
}
|
|
62
64
|
}
|
|
63
65
|
};
|
|
64
66
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./index-4705f39a.system.js"],(function(t){"use strict";var o,e,
|
|
1
|
+
System.register(["./index-4705f39a.system.js"],(function(t){"use strict";var o,e,n;return{setters:[function(t){o=t.r;e=t.h;n=t.g}],execute:function(){var r='@import url("https://fonts.googleapis.com/css2?family=Nunito+Sans:ital,wght@0,200;0,300;0,400;0,600;0,700;0,800;0,900;1,200;1,300;1,400;1,600;1,700;1,800;1,900&display=swap"); .button{border:none;margin:0;padding:0;width:auto;overflow:visible;outline:none;background:transparent;color:inherit;font:inherit;line-height:normal;-webkit-font-smoothing:inherit;-moz-osx-font-smoothing:inherit;-webkit-appearance:none;cursor:pointer;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;height:100%;border-radius:8px;padding-left:16px;padding-right:16px;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-transition:all 0.5s;-moz-transition:all 0.5s;transition:all 0.5s}.button::-moz-focus-inner{border:0;padding:0}.button--size-tall{padding-top:14px;padding-bottom:14px;height:40px}.button--size-tall--icon{padding-top:12px;padding-bottom:12px;height:40px}.button--size-standard{padding-top:9px;padding-bottom:9px;height:40px}.button--size-standard--icon{padding-top:8px;padding-bottom:8px;height:40px}.button--size-short{padding-top:5px;padding-bottom:5px;height:32px}.button--size-short--icon{padding-top:4px;padding-bottom:4px;height:40px}.button--size-icon--left{padding-left:16px}.button--size-icon--right{padding-right:16px}.button__icon{color:inherit;background-color:inherit;height:24px;margin-right:4px}.button__arrow{color:inherit;background-color:inherit;height:24px;margin-left:2px}.button__content{height:20px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.button__primary{background:#3f7de8;color:#ffffff}.button__primary:hover{background:#125ad5}.button__primary:active{background:#0747a6;color:#ffffff}.button__primary--disabled{background:#e8f2ff;pointer-events:none;color:#637798}.button__primary--disabled:hover,.button__primary--disabled:active{background:#e8f2ff;color:#637798}.button__secondary{background:transparent;color:#505f79}.button__secondary:hover{background:#e8f2ff;color:#3f7de8}.button__secondary:active{background:#d1e3fa;color:#3f7de8}.button__secondary--disabled{background:transparent;pointer-events:none;color:#637798}.button__secondary--disabled:hover,.button__secondary--disabled:active{background:transparent;color:#637798}.button__tertiary{background:transparent;color:#3f7de8;border:1px solid #d2dfe6}.button__tertiary:hover{border:1px solid #3f7de8;color:#3f7de8}.button__tertiary:active{background:#d1e3fa;border:1px solid #3f7de8;color:#3f7de8}.button__tertiary--disabled{background:transparent;pointer-events:none;color:#637798;border:1px solid #637798}.button__tertiary--disabled:hover,.button__tertiary--disabled:active{background:transparent;color:#637798;border:1px solid #637798}.button__secondary--white{background:transparent;color:#ffffff}.button__secondary--white:hover{background:rgba(255, 255, 255, 0.3);color:#ffffff}.button__secondary--white:active{background:rgba(255, 255, 255, 0.4);color:#ffffff}.button__secondary--white--disabled{background:#e8f2ff;pointer-events:none;color:#8ca0b3}.button__secondary--white--disabled:hover,.button__secondary--white--disabled:active{background:#e8f2ff;color:#8ca0b3}.button__ghost{background:transparent;color:#3f7de8;border:1px solid #3f7de8}.button__ghost:hover{background:#e8f2ff;color:#3f7de8;border:1px solid #3f7de8}.button__ghost:active{background:#d1e3fa;color:#3f7de8;border:1px solid #3f7de8}.button__ghost--disabled{background:transparent;pointer-events:none;color:#637798;border:1px solid #637798}.button__ghost--disabled:hover,.button__ghost--disabled:active{background:transparent;color:#637798;border:1px solid #637798}.button__delete{background:#ff4c4c;color:#ffffff}.button__delete:hover{background:#a01c2c;color:#ffffff}.button__delete:active{background:#6a2026;color:#ffffff}.button__delete--disabled{background:#fccccc;pointer-events:none;color:#ba5a5a}.button__delete--disabled:hover,.button__delete--disabled:active{background:#fccccc;color:#ba5a5a}.button__dashed{background:transparent;color:#3f7de8;border:1px dashed #3f7de8}.button__dashed:hover{background:transparent;color:#125ad5;border:1px dashed #125ad5}.button__dashed:active{background:transparent;color:#3f7de8;border:1px dashed #3f7de8}.button__dashed--disabled{background:transparent;pointer-events:none;color:#8ca0b3;border:1px dashed #8ca0b3}.button__dashed--disabled:hover,.button__dashed--disabled:active{background:transparent;color:#8ca0b3;border:1px dashed #8ca0b3}.button__facebook{background:#1877f2;color:#f8fbfb}.button__facebook:hover{background:#1771e6}.button__facebook:active{background:#3f7de8;color:#f8fbfb}.button__facebook--disabled{background:#e8f2ff;pointer-events:none;color:#8ca0b3}.button__facebook--disabled:hover,.button__facebook--disabled:active{background:#e8f2ff;color:#8ca0b3}.button bds-loading-spinner{width:auto;max-height:100%;position:absolute}.button .hide{cursor:not-allowed;opacity:0}';var i=t("bds_button",function(){function t(t){var e=this;o(this,t);this.disabled=false;this.size="standard";this.variant="primary";this.icon=null;this.arrow=false;this.type="button";this.typeIcon="icon";this.bdsLoading=false;this.bdsLoadingVariant="primary";this.dataTest=null;this.handleClick=function(t){if(!e.disabled){var o=e.el.closest("form");if(o){t.preventDefault();var n=document.createElement("button");n.type=e.type;n.style.display="none";o.appendChild(n);n.click();n.remove()}}}}t.prototype.getSizeClass=function(){return this.arrow||!!this.icon?"button--size-".concat(this.size,"--icon"):"button--size-".concat(this.size)};t.prototype.renderIcon=function(){return this.icon&&e("div",{class:{button__icon:true,hide:this.bdsLoading&&true}},e("bds-icon",{name:this.icon,type:this.typeIcon,color:"inherit"}))};t.prototype.renderText=function(){var t;return e("div",{class:(t={button__content:true},t["button__content__".concat(this.variant)]=true,t["button__content__".concat(this.variant,"--disabled")]=this.disabled,t.hide=this.bdsLoading&&true,t)},e("bds-typo",{variant:"fs-14",lineHeight:"simple",bold:"bold"},e("slot",null)))};t.prototype.renderArrow=function(){return this.arrow&&e("div",{class:{button__arrow:true,hide:this.bdsLoading&&true}},e("bds-icon",{name:"arrow-right",color:"inherit"}))};t.prototype.renderLoadingSpinner=function(){return e("bds-loading-spinner",{variant:this.bdsLoadingVariant})};t.prototype.render=function(){var t;var o=this.getSizeClass();return e("button",{onClick:this.handleClick,disabled:this.disabled,type:this.type,class:(t={button:true},t["button__".concat(this.variant)]=true,t["button__".concat(this.variant,"--disabled")]=this.disabled,t[o]=true,t["button--size-icon--left"]=!!this.icon,t["button--size-icon--right"]=this.arrow,t),part:"button","data-test":this.dataTest},[this.bdsLoading&&this.renderLoadingSpinner(),this.renderIcon(),this.renderText(),this.renderArrow()])};Object.defineProperty(t.prototype,"el",{get:function(){return n(this)},enumerable:false,configurable:true});return t}());i.style=r}}}));
|
|
@@ -1,10 +1,16 @@
|
|
|
1
|
-
import { r as registerInstance, h, f as Host } from './index-bb4c2258.js';
|
|
1
|
+
import { r as registerInstance, e as createEvent, h, f as Host } from './index-bb4c2258.js';
|
|
2
2
|
|
|
3
3
|
const inputPasswordCss = "@import url(\"https://fonts.googleapis.com/css2?family=Nunito+Sans:ital,wght@0,200;0.sc-bds-input-password,300.sc-bds-input-password;0.sc-bds-input-password,400.sc-bds-input-password;0.sc-bds-input-password,600.sc-bds-input-password;0.sc-bds-input-password,700.sc-bds-input-password;0.sc-bds-input-password,800.sc-bds-input-password;0.sc-bds-input-password,900.sc-bds-input-password;1.sc-bds-input-password,200.sc-bds-input-password;1.sc-bds-input-password,300.sc-bds-input-password;1.sc-bds-input-password,400.sc-bds-input-password;1.sc-bds-input-password,600.sc-bds-input-password;1.sc-bds-input-password,700.sc-bds-input-password;1.sc-bds-input-password,800.sc-bds-input-password;1.sc-bds-input-password,900&display=swap\").sc-bds-input-password; .sc-bds-input-password-h{display:block}.input__password--icon.sc-bds-input-password{color:#8ca0b3;display:-ms-flexbox;display:flex}";
|
|
4
4
|
|
|
5
5
|
const InputPassword = class {
|
|
6
6
|
constructor(hostRef) {
|
|
7
7
|
registerInstance(this, hostRef);
|
|
8
|
+
this.bdsInputPasswordChange = createEvent(this, "bdsInputPasswordChange", 7);
|
|
9
|
+
this.bdsInputPasswordInput = createEvent(this, "bdsInputPasswordInput", 7);
|
|
10
|
+
this.bdsInputPasswordBlur = createEvent(this, "bdsInputPasswordBlur", 7);
|
|
11
|
+
this.bdsInputPasswordFocus = createEvent(this, "bdsInputPasswordFocus", 7);
|
|
12
|
+
this.bdsInputPasswordSubmit = createEvent(this, "bdsInputPasswordSubmit", 7);
|
|
13
|
+
this.bdsKeyDownBackspace = createEvent(this, "bdsKeyDownBackspace", 7);
|
|
8
14
|
this.openEyes = false;
|
|
9
15
|
/**
|
|
10
16
|
* The value of the input.
|
|
@@ -63,6 +69,32 @@ const InputPassword = class {
|
|
|
63
69
|
this.openEyes = !this.openEyes;
|
|
64
70
|
}
|
|
65
71
|
};
|
|
72
|
+
this.onChange = (ev) => {
|
|
73
|
+
const input = ev.target;
|
|
74
|
+
if (input) {
|
|
75
|
+
this.value = input.value || '';
|
|
76
|
+
}
|
|
77
|
+
this.bdsInputPasswordChange.emit({ value: this.value == null ? this.value : this.value.toString() });
|
|
78
|
+
};
|
|
79
|
+
this.onInput = (ev) => {
|
|
80
|
+
const input = ev.target;
|
|
81
|
+
if (input) {
|
|
82
|
+
this.value = input.value || '';
|
|
83
|
+
}
|
|
84
|
+
this.bdsInputPasswordInput.emit(ev);
|
|
85
|
+
};
|
|
86
|
+
this.onBlur = () => {
|
|
87
|
+
this.bdsInputPasswordBlur.emit();
|
|
88
|
+
};
|
|
89
|
+
this.onFocus = () => {
|
|
90
|
+
this.bdsInputPasswordFocus.emit();
|
|
91
|
+
};
|
|
92
|
+
this.onSubmit = () => {
|
|
93
|
+
this.bdsInputPasswordSubmit.emit();
|
|
94
|
+
};
|
|
95
|
+
this.keyPressWrapper = (ev) => {
|
|
96
|
+
this.bdsKeyDownBackspace.emit({ ev, value: this.value });
|
|
97
|
+
};
|
|
66
98
|
}
|
|
67
99
|
getAutoComplete() {
|
|
68
100
|
if (!this.openEyes)
|
|
@@ -73,7 +105,7 @@ const InputPassword = class {
|
|
|
73
105
|
const iconPassword = this.openEyes ? 'eye-open' : 'eye-closed';
|
|
74
106
|
const type = this.openEyes ? 'text' : 'password';
|
|
75
107
|
const autocomplete = this.getAutoComplete();
|
|
76
|
-
return (h(Host, null, h("bds-input", { type: type, "input-name": this.inputName, value: this.value, label: this.label, min: this.min, max: this.max, minlength: this.minlength, maxlength: this.maxlength, "helper-message": this.helperMessage, "error-message": this.errorMessage, danger: this.danger, icon: this.icon, disabled: this.disabled, readonly: this.readonly, "auto-complete": autocomplete, "auto-capitalize": this.autoCapitalize, placeholder: this.placeholder, "data-test": this.dataTest }, h("div", { slot: "input-right", class: "input__password--icon", onClick: this.toggleEyePassword }, h("bds-icon", { size: "small", name: iconPassword, color: "inherit" })))));
|
|
108
|
+
return (h(Host, null, h("bds-input", { type: type, "input-name": this.inputName, value: this.value, label: this.label, min: this.min, max: this.max, minlength: this.minlength, maxlength: this.maxlength, "helper-message": this.helperMessage, "error-message": this.errorMessage, danger: this.danger, icon: this.icon, disabled: this.disabled, readonly: this.readonly, "auto-complete": autocomplete, "auto-capitalize": this.autoCapitalize, placeholder: this.placeholder, "data-test": this.dataTest, onBdsChange: this.onChange, onBdsInput: this.onInput, onBdsOnBlur: this.onBlur, onBdsFocus: this.onFocus, onBdsSubmit: this.onSubmit, onBdsKeyDownBackspace: this.keyPressWrapper }, h("div", { slot: "input-right", class: "input__password--icon", onClick: this.toggleEyePassword }, h("bds-icon", { size: "small", name: iconPassword, color: "inherit" })))));
|
|
77
109
|
}
|
|
78
110
|
};
|
|
79
111
|
InputPassword.style = inputPasswordCss;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./index-4705f39a.system.js"],(function(s){"use strict";var t,e,
|
|
1
|
+
System.register(["./index-4705f39a.system.js"],(function(s){"use strict";var t,i,e,n;return{setters:[function(s){t=s.r;i=s.e;e=s.h;n=s.f}],execute:function(){var a='@import url("https://fonts.googleapis.com/css2?family=Nunito+Sans:ital,wght@0,200;0.sc-bds-input-password,300.sc-bds-input-password;0.sc-bds-input-password,400.sc-bds-input-password;0.sc-bds-input-password,600.sc-bds-input-password;0.sc-bds-input-password,700.sc-bds-input-password;0.sc-bds-input-password,800.sc-bds-input-password;0.sc-bds-input-password,900.sc-bds-input-password;1.sc-bds-input-password,200.sc-bds-input-password;1.sc-bds-input-password,300.sc-bds-input-password;1.sc-bds-input-password,400.sc-bds-input-password;1.sc-bds-input-password,600.sc-bds-input-password;1.sc-bds-input-password,700.sc-bds-input-password;1.sc-bds-input-password,800.sc-bds-input-password;1.sc-bds-input-password,900&display=swap").sc-bds-input-password; .sc-bds-input-password-h{display:block}.input__password--icon.sc-bds-input-password{color:#8ca0b3;display:-ms-flexbox;display:flex}';var o=s("bds_input_password",function(){function s(s){var e=this;t(this,s);this.bdsInputPasswordChange=i(this,"bdsInputPasswordChange",7);this.bdsInputPasswordInput=i(this,"bdsInputPasswordInput",7);this.bdsInputPasswordBlur=i(this,"bdsInputPasswordBlur",7);this.bdsInputPasswordFocus=i(this,"bdsInputPasswordFocus",7);this.bdsInputPasswordSubmit=i(this,"bdsInputPasswordSubmit",7);this.bdsKeyDownBackspace=i(this,"bdsKeyDownBackspace",7);this.openEyes=false;this.value="";this.label="";this.inputName="";this.readonly=false;this.helperMessage="";this.errorMessage="";this.danger=false;this.icon="";this.disabled=false;this.autoCapitalize="off";this.autoComplete="off";this.placeholder="";this.dataTest=null;this.toggleEyePassword=function(){if(!e.disabled){e.openEyes=!e.openEyes}};this.onChange=function(s){var t=s.target;if(t){e.value=t.value||""}e.bdsInputPasswordChange.emit({value:e.value==null?e.value:e.value.toString()})};this.onInput=function(s){var t=s.target;if(t){e.value=t.value||""}e.bdsInputPasswordInput.emit(s)};this.onBlur=function(){e.bdsInputPasswordBlur.emit()};this.onFocus=function(){e.bdsInputPasswordFocus.emit()};this.onSubmit=function(){e.bdsInputPasswordSubmit.emit()};this.keyPressWrapper=function(s){e.bdsKeyDownBackspace.emit({ev:s,value:e.value})}}s.prototype.getAutoComplete=function(){if(!this.openEyes)return"current-password";return this.autoComplete};s.prototype.render=function(){var s=this.openEyes?"eye-open":"eye-closed";var t=this.openEyes?"text":"password";var i=this.getAutoComplete();return e(n,null,e("bds-input",{type:t,"input-name":this.inputName,value:this.value,label:this.label,min:this.min,max:this.max,minlength:this.minlength,maxlength:this.maxlength,"helper-message":this.helperMessage,"error-message":this.errorMessage,danger:this.danger,icon:this.icon,disabled:this.disabled,readonly:this.readonly,"auto-complete":i,"auto-capitalize":this.autoCapitalize,placeholder:this.placeholder,"data-test":this.dataTest,onBdsChange:this.onChange,onBdsInput:this.onInput,onBdsOnBlur:this.onBlur,onBdsFocus:this.onFocus,onBdsSubmit:this.onSubmit,onBdsKeyDownBackspace:this.keyPressWrapper},e("div",{slot:"input-right",class:"input__password--icon",onClick:this.toggleEyePassword},e("bds-icon",{size:"small",name:s,color:"inherit"}))))};return s}());o.style=a}}}));
|
|
@@ -44,7 +44,7 @@ const termTranslate = (lang, string) => {
|
|
|
44
44
|
|
|
45
45
|
const patternSvg = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzg0IiBoZWlnaHQ9IjgwIiB2aWV3Qm94PSIwIDAgMzg0IDgwIiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8ZyBjbGlwLXBhdGg9InVybCgjY2xpcDBfMzc4OF8yMTU2NDApIj4KPGxpbmUgeDE9Ii0xMC45NzY3IiB5MT0iNzQuMzg0MyIgeDI9IjIyLjc3NzgiIHkyPSI1LjE3NzE5IiBzdHJva2U9IiNFN0VERjQiLz4KPGxpbmUgeDE9IjIyLjc3NzciIHkxPSI3NC4zODQzIiB4Mj0iNTYuNTMyMiIgeTI9IjUuMTc3MTkiIHN0cm9rZT0iI0U3RURGNCIvPgo8bGluZSB4MT0iNTYuNTMyIiB5MT0iNzQuMzg0MyIgeDI9IjkwLjI4NjYiIHkyPSI1LjE3NzE5IiBzdHJva2U9IiNFN0VERjQiLz4KPGxpbmUgeDE9IjkwLjI4NjkiIHkxPSI3NC4zODQzIiB4Mj0iMTI0LjA0MiIgeTI9IjUuMTc3MTkiIHN0cm9rZT0iI0U3RURGNCIvPgo8bGluZSB4MT0iMTI0LjA0MSIgeTE9Ijc0LjM4NDMiIHgyPSIxNTcuNzk2IiB5Mj0iNS4xNzcxOSIgc3Ryb2tlPSIjRTdFREY0Ii8+CjxsaW5lIHgxPSIxNTcuNzk2IiB5MT0iNzQuMzg0MyIgeDI9IjE5MS41NTEiIHkyPSI1LjE3NzE5IiBzdHJva2U9IiNFN0VERjQiLz4KPGxpbmUgeDE9IjE5MS41NTEiIHkxPSI3NC4zODQzIiB4Mj0iMjI1LjMwNSIgeTI9IjUuMTc3MTkiIHN0cm9rZT0iI0U3RURGNCIvPgo8bGluZSB4MT0iMjI1LjMwNSIgeTE9Ijc0LjM4NDMiIHgyPSIyNTkuMDYiIHkyPSI1LjE3NzE5IiBzdHJva2U9IiNFN0VERjQiLz4KPGxpbmUgeDE9IjI1OS4wNiIgeTE9Ijc0LjM4NDMiIHgyPSIyOTIuODE0IiB5Mj0iNS4xNzcxOSIgc3Ryb2tlPSIjRTdFREY0Ii8+CjxsaW5lIHgxPSIyOTIuODE0IiB5MT0iNzQuMzg0MyIgeDI9IjMyNi41NjkiIHkyPSI1LjE3NzE5IiBzdHJva2U9IiNFN0VERjQiLz4KPGxpbmUgeDE9IjMyNi41NjkiIHkxPSI3NC4zODQzIiB4Mj0iMzYwLjMyMyIgeTI9IjUuMTc3MTkiIHN0cm9rZT0iI0U3RURGNCIvPgo8bGluZSB4MT0iMzYwLjMyNCIgeTE9Ijc0LjM4NDMiIHgyPSIzOTQuMDc4IiB5Mj0iNS4xNzcxOSIgc3Ryb2tlPSIjRTdFREY0Ii8+CjwvZz4KPGRlZnM+CjxjbGlwUGF0aCBpZD0iY2xpcDBfMzc4OF8yMTU2NDAiPgo8cmVjdCB3aWR0aD0iMzg0IiBoZWlnaHQ9IjgwIiBmaWxsPSJ3aGl0ZSIvPgo8L2NsaXBQYXRoPgo8L2RlZnM+Cjwvc3ZnPgo=';
|
|
46
46
|
|
|
47
|
-
const bdsUploadCss = "@import url(\"https://fonts.googleapis.com/css2?family=Nunito+Sans:ital,wght@0,200;0,300;0,400;0,600;0,700;0,800;0,900;1,200;1,300;1,400;1,600;1,700;1,800;1,900&display=swap\"); .upload{min-width:400px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:16px}.upload .upload-header{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-ms-flex-align:center;align-items:center;gap:8px}.upload .upload-header_text{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.upload__edit--label{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;border:1px solid #b9cbd3;border-radius:8px;cursor:pointer;font-weight:normal;-webkit-box-sizing:border-box;box-sizing:border-box;padding:23px 16px;position:relative}.upload__edit--label .upload__img--visible{display:-ms-flexbox;display:flex;width:100%;height:100%;border-radius:8px;position:absolute;background-color:#f8fbfb;z-index:1}.upload__edit--label .text-box{display:-ms-flexbox;display:flex;padding:8px;width:100%;text-align:center;z-index:2}.upload__edit--label .text-box .text{width:100
|
|
47
|
+
const bdsUploadCss = "@import url(\"https://fonts.googleapis.com/css2?family=Nunito+Sans:ital,wght@0,200;0,300;0,400;0,600;0,700;0,800;0,900;1,200;1,300;1,400;1,600;1,700;1,800;1,900&display=swap\"); .upload{min-width:400px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:16px}.upload .upload-header{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-ms-flex-align:center;align-items:center;gap:8px}.upload .upload-header_text{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.upload__edit--label{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;border:1px solid #b9cbd3;border-radius:8px;cursor:pointer;font-weight:normal;-webkit-box-sizing:border-box;box-sizing:border-box;padding:23px 16px;position:relative}.upload__edit--label .upload__img--visible{display:-ms-flexbox;display:flex;width:100%;height:100%;border-radius:8px;position:absolute;background-color:#f8fbfb;z-index:1}.upload__edit--label .text-box{display:-ms-flexbox;display:flex;padding:8px;width:100%;text-align:center;z-index:2}.upload__edit--label .text-box .text{width:100%;-ms-flex-wrap:wrap;flex-wrap:wrap}.upload__edit--label .text-box--hover{background-color:#f8fbfb}.upload__edit--label:hover{border:2px solid #3f7de8;-webkit-box-sizing:border-box;box-sizing:border-box;padding:22px 16px;cursor:pointer;-webkit-text-decoration:underline #125ad5;text-decoration:underline #125ad5;color:#125ad5}.upload__edit--hover{background-size:cover;border:1px dashed #b9cbd3;color:#125ad5;font-weight:bold;border-radius:8px}.upload__img--invisible{display:none}.list-preview{border-top:1px solid #b9cbd3;border-bottom:1px solid #b9cbd3;max-height:200px;overflow-y:auto}.upload__preview{-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;padding:16px 0}.upload__preview .preview{display:-ms-flexbox;display:flex;padding:0 16px;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:nowrap;flex-wrap:nowrap;gap:8px}.upload__preview .preview-text{font-family:\"Nunito Sans\";font-size:0.875rem;font-weight:700;margin:0;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;width:100%}.upload__preview .preview-icon:hover{cursor:pointer}.preview-length{display:-ms-flexbox;display:flex;-ms-flex-pack:end;justify-content:end;padding-top:16px;text-align:end}.upload__edit input{position:absolute;left:0;top:0;right:0;bottom:0;opacity:0;width:0;height:100%}";
|
|
48
48
|
|
|
49
49
|
const BdsUpload = class {
|
|
50
50
|
constructor(hostRef) {
|
|
@@ -114,7 +114,12 @@ const BdsUpload = class {
|
|
|
114
114
|
*/
|
|
115
115
|
onUploadClick(files) {
|
|
116
116
|
if (files.length > 0) {
|
|
117
|
-
|
|
117
|
+
if (!this.multiple) {
|
|
118
|
+
this.files = [files[0]];
|
|
119
|
+
}
|
|
120
|
+
else {
|
|
121
|
+
this.files = [...this.files, ...files];
|
|
122
|
+
}
|
|
118
123
|
this.haveFiles = true;
|
|
119
124
|
this.getSize();
|
|
120
125
|
}
|
|
@@ -147,7 +152,7 @@ const BdsUpload = class {
|
|
|
147
152
|
this.bdsUploadDelete.emit();
|
|
148
153
|
}
|
|
149
154
|
render() {
|
|
150
|
-
return (h("div", { class: "upload" }, h("div", { class: "upload-header" }, h("bds-icon", { size: "xxx-large", name: "upload" }), h("div", { class: "upload-header_text" }, h("bds-typo", { variant: "fs-16", bold: "bold" }, this.titleName), h("bds-typo", { variant: "fs-14", bold: "regular" }, this.subtitle))), this.error ? (h("bds-banner", { context: "inside", variant: "error" }, this.error)) : (''), this.haveFiles ? (h("div", null, h("div", { class: "list-preview" }, this.files.map((names, index) => (h("div", { class: "upload__preview", key: index, id: "drop-area" }, h("div", { class: "preview", id: "preview" }, h("bds-icon", { size: "x-small", name: "attach" }), h("p", { class: "preview-text", id: "preview-text" }, names.name), h("bds-button-icon", { class: "preview-icon", size: "short", icon: "trash", variant: "secondary", onClick: () => this.deleteFile(index) })))))), this.multiple ? (h("bds-typo", { variant: "fs-14", italic: true, class: "preview-length" }, this.files.length > 1 ? `${this.files.length} ${termTranslate(this.language, 'uploaded')}` : '')) : (''))) : (''), h("div", { class: { upload__edit: true } }, h("label", { class: { 'upload__edit--label': true, 'upload__edit--hover': this.hover }, id: "file-label", htmlFor: "file" }, h("div", { class: { 'text-box': true, 'text-box--hover': this.hover }, id: "file-text_box" }, this.hover ? (h("bds-typo", { class: "text", variant: "fs-14", bold: "
|
|
155
|
+
return (h("div", { class: "upload" }, h("div", { class: "upload-header" }, h("bds-icon", { size: "xxx-large", name: "upload" }), h("div", { class: "upload-header_text" }, h("bds-typo", { variant: "fs-16", bold: "bold" }, this.titleName), h("bds-typo", { variant: "fs-14", bold: "regular" }, this.subtitle))), this.error ? (h("bds-banner", { context: "inside", variant: "error" }, this.error)) : (''), this.haveFiles ? (h("div", null, h("div", { class: "list-preview" }, this.files.map((names, index) => (h("div", { class: "upload__preview", key: index, id: "drop-area" }, h("div", { class: "preview", id: "preview" }, h("bds-icon", { size: "x-small", name: "attach" }), h("p", { class: "preview-text", id: "preview-text" }, names.name), h("bds-button-icon", { class: "preview-icon", size: "short", icon: "trash", variant: "secondary", onClick: () => this.deleteFile(index) })))))), this.multiple ? (h("bds-typo", { variant: "fs-14", italic: true, class: "preview-length" }, this.files.length > 1 ? `${this.files.length} ${termTranslate(this.language, 'uploaded')}` : '')) : (''))) : (''), h("div", { class: { upload__edit: true } }, h("label", { class: { 'upload__edit--label': true, 'upload__edit--hover': this.hover }, id: "file-label", htmlFor: "file" }, h("div", { class: { 'text-box': true, 'text-box--hover': this.hover }, id: "file-text_box" }, this.hover ? (h("bds-typo", { class: "text", variant: "fs-14", bold: "regular" }, termTranslate(this.language, 'dropHere'))) : (h("bds-typo", { class: "text", variant: "fs-14", bold: "regular" }, termTranslate(this.language, 'dropOrClick')))), h("img", { class: { 'upload__img--invisible': true, 'upload__img--visible': this.hover }, src: patternSvg })), h("input", { type: "file", name: "files[]", id: "file", class: "upload__input", multiple: this.multiple, accept: this.accept, onChange: ($event) => this.onUploadClick($event.target.files) }))));
|
|
151
156
|
}
|
|
152
157
|
get dropArea() { return getElement(this); }
|
|
153
158
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __spreadArray=this&&this.__spreadArray||function(e,i,t){if(t||arguments.length===2)for(var a=0,r=i.length,o;a<r;a++){if(o||!(a in i)){if(!o)o=Array.prototype.slice.call(i,0,a);o[a]=i[a]}}return e.concat(o||Array.prototype.slice.call(i))};System.register(["./index-4705f39a.system.js"],(function(e){"use strict";var i,t,a,r;return{setters:[function(e){i=e.r;t=e.e;a=e.h;r=e.g}],execute:function(){var o=[{uploaded:"Arquivos enviados",dropHere:"Solte aqui para anexar o arquivo",dropOrClick:"Arraste e solte seus arquivos aqui ou clique para fazer upload do arquivo"}];var l=[{uploaded:"Archivos subidos",dropHere:"Soltar aquí para adjuntar archivo",dropOrClick:"Arrastre y suelte sus archivos aquí o haga clic para cargar el archivo"}];var s=[{uploaded:"Files uploaded",dropHere:"Drop here to attach file",dropOrClick:"Drag and drop your files here or click to upload file"}];var d=function(e,i){var t;switch(e){case"pt_BR":t=o.map((function(e){return e[i]}));break;case"es_ES":t=l.map((function(e){return e[i]}));break;case"en_US":t=s.map((function(e){return e[i]}));break;default:t=o.map((function(e){return e[i]}))}return t};var n="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzg0IiBoZWlnaHQ9IjgwIiB2aWV3Qm94PSIwIDAgMzg0IDgwIiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8ZyBjbGlwLXBhdGg9InVybCgjY2xpcDBfMzc4OF8yMTU2NDApIj4KPGxpbmUgeDE9Ii0xMC45NzY3IiB5MT0iNzQuMzg0MyIgeDI9IjIyLjc3NzgiIHkyPSI1LjE3NzE5IiBzdHJva2U9IiNFN0VERjQiLz4KPGxpbmUgeDE9IjIyLjc3NzciIHkxPSI3NC4zODQzIiB4Mj0iNTYuNTMyMiIgeTI9IjUuMTc3MTkiIHN0cm9rZT0iI0U3RURGNCIvPgo8bGluZSB4MT0iNTYuNTMyIiB5MT0iNzQuMzg0MyIgeDI9IjkwLjI4NjYiIHkyPSI1LjE3NzE5IiBzdHJva2U9IiNFN0VERjQiLz4KPGxpbmUgeDE9IjkwLjI4NjkiIHkxPSI3NC4zODQzIiB4Mj0iMTI0LjA0MiIgeTI9IjUuMTc3MTkiIHN0cm9rZT0iI0U3RURGNCIvPgo8bGluZSB4MT0iMTI0LjA0MSIgeTE9Ijc0LjM4NDMiIHgyPSIxNTcuNzk2IiB5Mj0iNS4xNzcxOSIgc3Ryb2tlPSIjRTdFREY0Ii8+CjxsaW5lIHgxPSIxNTcuNzk2IiB5MT0iNzQuMzg0MyIgeDI9IjE5MS41NTEiIHkyPSI1LjE3NzE5IiBzdHJva2U9IiNFN0VERjQiLz4KPGxpbmUgeDE9IjE5MS41NTEiIHkxPSI3NC4zODQzIiB4Mj0iMjI1LjMwNSIgeTI9IjUuMTc3MTkiIHN0cm9rZT0iI0U3RURGNCIvPgo8bGluZSB4MT0iMjI1LjMwNSIgeTE9Ijc0LjM4NDMiIHgyPSIyNTkuMDYiIHkyPSI1LjE3NzE5IiBzdHJva2U9IiNFN0VERjQiLz4KPGxpbmUgeDE9IjI1OS4wNiIgeTE9Ijc0LjM4NDMiIHgyPSIyOTIuODE0IiB5Mj0iNS4xNzcxOSIgc3Ryb2tlPSIjRTdFREY0Ii8+CjxsaW5lIHgxPSIyOTIuODE0IiB5MT0iNzQuMzg0MyIgeDI9IjMyNi41NjkiIHkyPSI1LjE3NzE5IiBzdHJva2U9IiNFN0VERjQiLz4KPGxpbmUgeDE9IjMyNi41NjkiIHkxPSI3NC4zODQzIiB4Mj0iMzYwLjMyMyIgeTI9IjUuMTc3MTkiIHN0cm9rZT0iI0U3RURGNCIvPgo8bGluZSB4MT0iMzYwLjMyNCIgeTE9Ijc0LjM4NDMiIHgyPSIzOTQuMDc4IiB5Mj0iNS4xNzcxOSIgc3Ryb2tlPSIjRTdFREY0Ii8+CjwvZz4KPGRlZnM+CjxjbGlwUGF0aCBpZD0iY2xpcDBfMzc4OF8yMTU2NDAiPgo8cmVjdCB3aWR0aD0iMzg0IiBoZWlnaHQ9IjgwIiBmaWxsPSJ3aGl0ZSIvPgo8L2NsaXBQYXRoPgo8L2RlZnM+Cjwvc3ZnPgo=";var p='@import url("https://fonts.googleapis.com/css2?family=Nunito+Sans:ital,wght@0,200;0,300;0,400;0,600;0,700;0,800;0,900;1,200;1,300;1,400;1,600;1,700;1,800;1,900&display=swap"); .upload{min-width:400px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:16px}.upload .upload-header{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-ms-flex-align:center;align-items:center;gap:8px}.upload .upload-header_text{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.upload__edit--label{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;border:1px solid #b9cbd3;border-radius:8px;cursor:pointer;font-weight:normal;-webkit-box-sizing:border-box;box-sizing:border-box;padding:23px 16px;position:relative}.upload__edit--label .upload__img--visible{display:-ms-flexbox;display:flex;width:100%;height:100%;border-radius:8px;position:absolute;background-color:#f8fbfb;z-index:1}.upload__edit--label .text-box{display:-ms-flexbox;display:flex;padding:8px;width:100%;text-align:center;z-index:2}.upload__edit--label .text-box .text{width:100
|
|
1
|
+
var __spreadArray=this&&this.__spreadArray||function(e,i,t){if(t||arguments.length===2)for(var a=0,r=i.length,o;a<r;a++){if(o||!(a in i)){if(!o)o=Array.prototype.slice.call(i,0,a);o[a]=i[a]}}return e.concat(o||Array.prototype.slice.call(i))};System.register(["./index-4705f39a.system.js"],(function(e){"use strict";var i,t,a,r;return{setters:[function(e){i=e.r;t=e.e;a=e.h;r=e.g}],execute:function(){var o=[{uploaded:"Arquivos enviados",dropHere:"Solte aqui para anexar o arquivo",dropOrClick:"Arraste e solte seus arquivos aqui ou clique para fazer upload do arquivo"}];var l=[{uploaded:"Archivos subidos",dropHere:"Soltar aquí para adjuntar archivo",dropOrClick:"Arrastre y suelte sus archivos aquí o haga clic para cargar el archivo"}];var s=[{uploaded:"Files uploaded",dropHere:"Drop here to attach file",dropOrClick:"Drag and drop your files here or click to upload file"}];var d=function(e,i){var t;switch(e){case"pt_BR":t=o.map((function(e){return e[i]}));break;case"es_ES":t=l.map((function(e){return e[i]}));break;case"en_US":t=s.map((function(e){return e[i]}));break;default:t=o.map((function(e){return e[i]}))}return t};var n="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzg0IiBoZWlnaHQ9IjgwIiB2aWV3Qm94PSIwIDAgMzg0IDgwIiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8ZyBjbGlwLXBhdGg9InVybCgjY2xpcDBfMzc4OF8yMTU2NDApIj4KPGxpbmUgeDE9Ii0xMC45NzY3IiB5MT0iNzQuMzg0MyIgeDI9IjIyLjc3NzgiIHkyPSI1LjE3NzE5IiBzdHJva2U9IiNFN0VERjQiLz4KPGxpbmUgeDE9IjIyLjc3NzciIHkxPSI3NC4zODQzIiB4Mj0iNTYuNTMyMiIgeTI9IjUuMTc3MTkiIHN0cm9rZT0iI0U3RURGNCIvPgo8bGluZSB4MT0iNTYuNTMyIiB5MT0iNzQuMzg0MyIgeDI9IjkwLjI4NjYiIHkyPSI1LjE3NzE5IiBzdHJva2U9IiNFN0VERjQiLz4KPGxpbmUgeDE9IjkwLjI4NjkiIHkxPSI3NC4zODQzIiB4Mj0iMTI0LjA0MiIgeTI9IjUuMTc3MTkiIHN0cm9rZT0iI0U3RURGNCIvPgo8bGluZSB4MT0iMTI0LjA0MSIgeTE9Ijc0LjM4NDMiIHgyPSIxNTcuNzk2IiB5Mj0iNS4xNzcxOSIgc3Ryb2tlPSIjRTdFREY0Ii8+CjxsaW5lIHgxPSIxNTcuNzk2IiB5MT0iNzQuMzg0MyIgeDI9IjE5MS41NTEiIHkyPSI1LjE3NzE5IiBzdHJva2U9IiNFN0VERjQiLz4KPGxpbmUgeDE9IjE5MS41NTEiIHkxPSI3NC4zODQzIiB4Mj0iMjI1LjMwNSIgeTI9IjUuMTc3MTkiIHN0cm9rZT0iI0U3RURGNCIvPgo8bGluZSB4MT0iMjI1LjMwNSIgeTE9Ijc0LjM4NDMiIHgyPSIyNTkuMDYiIHkyPSI1LjE3NzE5IiBzdHJva2U9IiNFN0VERjQiLz4KPGxpbmUgeDE9IjI1OS4wNiIgeTE9Ijc0LjM4NDMiIHgyPSIyOTIuODE0IiB5Mj0iNS4xNzcxOSIgc3Ryb2tlPSIjRTdFREY0Ii8+CjxsaW5lIHgxPSIyOTIuODE0IiB5MT0iNzQuMzg0MyIgeDI9IjMyNi41NjkiIHkyPSI1LjE3NzE5IiBzdHJva2U9IiNFN0VERjQiLz4KPGxpbmUgeDE9IjMyNi41NjkiIHkxPSI3NC4zODQzIiB4Mj0iMzYwLjMyMyIgeTI9IjUuMTc3MTkiIHN0cm9rZT0iI0U3RURGNCIvPgo8bGluZSB4MT0iMzYwLjMyNCIgeTE9Ijc0LjM4NDMiIHgyPSIzOTQuMDc4IiB5Mj0iNS4xNzcxOSIgc3Ryb2tlPSIjRTdFREY0Ii8+CjwvZz4KPGRlZnM+CjxjbGlwUGF0aCBpZD0iY2xpcDBfMzc4OF8yMTU2NDAiPgo8cmVjdCB3aWR0aD0iMzg0IiBoZWlnaHQ9IjgwIiBmaWxsPSJ3aGl0ZSIvPgo8L2NsaXBQYXRoPgo8L2RlZnM+Cjwvc3ZnPgo=";var p='@import url("https://fonts.googleapis.com/css2?family=Nunito+Sans:ital,wght@0,200;0,300;0,400;0,600;0,700;0,800;0,900;1,200;1,300;1,400;1,600;1,700;1,800;1,900&display=swap"); .upload{min-width:400px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:16px}.upload .upload-header{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-ms-flex-align:center;align-items:center;gap:8px}.upload .upload-header_text{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.upload__edit--label{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;border:1px solid #b9cbd3;border-radius:8px;cursor:pointer;font-weight:normal;-webkit-box-sizing:border-box;box-sizing:border-box;padding:23px 16px;position:relative}.upload__edit--label .upload__img--visible{display:-ms-flexbox;display:flex;width:100%;height:100%;border-radius:8px;position:absolute;background-color:#f8fbfb;z-index:1}.upload__edit--label .text-box{display:-ms-flexbox;display:flex;padding:8px;width:100%;text-align:center;z-index:2}.upload__edit--label .text-box .text{width:100%;-ms-flex-wrap:wrap;flex-wrap:wrap}.upload__edit--label .text-box--hover{background-color:#f8fbfb}.upload__edit--label:hover{border:2px solid #3f7de8;-webkit-box-sizing:border-box;box-sizing:border-box;padding:22px 16px;cursor:pointer;-webkit-text-decoration:underline #125ad5;text-decoration:underline #125ad5;color:#125ad5}.upload__edit--hover{background-size:cover;border:1px dashed #b9cbd3;color:#125ad5;font-weight:bold;border-radius:8px}.upload__img--invisible{display:none}.list-preview{border-top:1px solid #b9cbd3;border-bottom:1px solid #b9cbd3;max-height:200px;overflow-y:auto}.upload__preview{-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;padding:16px 0}.upload__preview .preview{display:-ms-flexbox;display:flex;padding:0 16px;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:nowrap;flex-wrap:nowrap;gap:8px}.upload__preview .preview-text{font-family:"Nunito Sans";font-size:0.875rem;font-weight:700;margin:0;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;width:100%}.upload__preview .preview-icon:hover{cursor:pointer}.preview-length{display:-ms-flexbox;display:flex;-ms-flex-pack:end;justify-content:end;padding-top:16px;text-align:end}.upload__edit input{position:absolute;left:0;top:0;right:0;bottom:0;opacity:0;width:0;height:100%}';var u=e("bds_upload",function(){function e(e){var a=this;i(this,e);this.bdsUploadDelete=t(this,"bdsUploadDelete",7);this.bdsUploadChange=t(this,"bdsUploadChange",7);this.files=[];this.haveFiles=false;this.hover=false;this.size=[];this.language="pt_BR";this.handleDrop=function(e){a.haveFiles=true;var i=e.dataTransfer;var t=i.files;a.handleFiles(t)};this.handleFiles=function(e){if(!a.multiple){a.files=[e[0]]}else{a.files=__spreadArray(__spreadArray([],a.files,true),e,true)}a.bdsUploadChange.emit()}}e.prototype.componentDidLoad=function(){var e=this;["dragenter","dragover","dragleave","drop"].forEach((function(i){e.dropArea.shadowRoot.addEventListener(i,e.preventDefaults,false);e.dropArea.shadowRoot.addEventListener(i,(function(){return e.hoverFile(true)}),false)}));["dragenter","dragover"].forEach((function(i){e.dropArea.shadowRoot.addEventListener(i,(function(){return e.preventDefaults}),false);e.dropArea.shadowRoot.addEventListener(i,(function(){return e.hoverFile(true)}),false)}));["dragleave","drop"].forEach((function(i){e.dropArea.shadowRoot.addEventListener(i,(function(){return e.preventDefaults}),false);e.dropArea.shadowRoot.addEventListener(i,(function(){return e.hoverFile(false)}),false)}));this.dropArea.shadowRoot.addEventListener("drop",this.handleDrop,false)};e.prototype.preventDefaults=function(e){e.preventDefault();e.stopPropagation()};e.prototype.hoverFile=function(e){this.hover=e};e.prototype.onUploadClick=function(e){if(e.length>0){if(!this.multiple){this.files=[e[0]]}else{this.files=__spreadArray(__spreadArray([],this.files,true),e,true)}this.haveFiles=true;this.getSize()}else{return false}this.bdsUploadChange.emit()};e.prototype.getSize=function(){var e=this;this.files.map((function(i){var t=i.size;e.size.push(t)}))};e.prototype.deleteFile=function(e){this.files.splice(e,1);this.files=__spreadArray([],this.files,true);if(this.files.length===0){this.haveFiles=false}else{this.haveFiles=true}this.bdsUploadDelete.emit()};e.prototype.render=function(){var e=this;return a("div",{class:"upload"},a("div",{class:"upload-header"},a("bds-icon",{size:"xxx-large",name:"upload"}),a("div",{class:"upload-header_text"},a("bds-typo",{variant:"fs-16",bold:"bold"},this.titleName),a("bds-typo",{variant:"fs-14",bold:"regular"},this.subtitle))),this.error?a("bds-banner",{context:"inside",variant:"error"},this.error):"",this.haveFiles?a("div",null,a("div",{class:"list-preview"},this.files.map((function(i,t){return a("div",{class:"upload__preview",key:t,id:"drop-area"},a("div",{class:"preview",id:"preview"},a("bds-icon",{size:"x-small",name:"attach"}),a("p",{class:"preview-text",id:"preview-text"},i.name),a("bds-button-icon",{class:"preview-icon",size:"short",icon:"trash",variant:"secondary",onClick:function(){return e.deleteFile(t)}})))}))),this.multiple?a("bds-typo",{variant:"fs-14",italic:true,class:"preview-length"},this.files.length>1?"".concat(this.files.length," ").concat(d(this.language,"uploaded")):""):""):"",a("div",{class:{upload__edit:true}},a("label",{class:{"upload__edit--label":true,"upload__edit--hover":this.hover},id:"file-label",htmlFor:"file"},a("div",{class:{"text-box":true,"text-box--hover":this.hover},id:"file-text_box"},this.hover?a("bds-typo",{class:"text",variant:"fs-14",bold:"regular"},d(this.language,"dropHere")):a("bds-typo",{class:"text",variant:"fs-14",bold:"regular"},d(this.language,"dropOrClick"))),a("img",{class:{"upload__img--invisible":true,"upload__img--visible":this.hover},src:n})),a("input",{type:"file",name:"files[]",id:"file",class:"upload__input",multiple:this.multiple,accept:this.accept,onChange:function(i){return e.onUploadClick(i.target.files)}})))};Object.defineProperty(e.prototype,"dropArea",{get:function(){return r(this)},enumerable:false,configurable:true});return e}());u.style=p}}}));
|