blip-ds 1.201.0 → 1.201.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-input-chips.entry.js +81 -19
- package/dist/blip-ds/bds-input-chips.system.entry.js +1 -1
- package/dist/blip-ds/blip-ds.esm.js +1 -1
- package/dist/blip-ds/blip-ds.system.js +1 -1
- package/dist/blip-ds/p-1b6a0428.system.entry.js +1 -0
- package/dist/blip-ds/p-985db29e.entry.js +1 -0
- package/dist/blip-ds/p-9f0f4014.entry.js +1 -0
- package/dist/blip-ds/p-a4ac8b27.system.js +1 -1
- package/dist/blip-ds/p-baae2137.entry.js +1 -0
- package/dist/blip-ds/p-d4db97e2.system.entry.js +1 -0
- package/dist/blip-ds/p-e864be08.system.entry.js +1 -0
- package/dist/cjs/{bds-datepicker-period_2.cjs.entry.js → bds-datepicker-period_3.cjs.entry.js} +301 -0
- package/dist/cjs/bds-input-chips.cjs.entry.js +81 -19
- package/dist/cjs/blip-ds.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/input-chips/input-chips.css +268 -0
- package/dist/collection/components/input-chips/input-chips.js +125 -21
- package/dist/esm/{bds-datepicker-period_2.entry.js → bds-datepicker-period_3.entry.js} +302 -2
- package/dist/esm/bds-input-chips.entry.js +81 -19
- package/dist/esm/blip-ds.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm-es5/bds-chip-clickable.entry.js +1 -0
- package/dist/esm-es5/bds-datepicker-period_3.entry.js +1 -0
- package/dist/esm-es5/bds-input-chips.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-chips/input-chips.d.ts +27 -2
- package/dist/types/components.d.ts +8 -0
- package/package.json +1 -1
- package/dist/blip-ds/p-10838d95.system.entry.js +0 -1
- package/dist/blip-ds/p-10b51cad.entry.js +0 -1
- package/dist/blip-ds/p-1243ceee.system.entry.js +0 -1
- package/dist/blip-ds/p-211e7782.system.entry.js +0 -1
- package/dist/blip-ds/p-a4c3aa6b.entry.js +0 -1
- package/dist/blip-ds/p-f3b2d52a.entry.js +0 -1
- package/dist/cjs/bds-chip-clickable_2.cjs.entry.js +0 -391
- package/dist/esm/bds-chip-clickable_2.entry.js +0 -386
- package/dist/esm-es5/bds-chip-clickable_2.entry.js +0 -1
- package/dist/esm-es5/bds-datepicker-period_2.entry.js +0 -1
|
@@ -1,386 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-0dc1d699.js';
|
|
2
|
-
import { e as emailValidation, n as numberValidation } from './validations-6d914b78.js';
|
|
3
|
-
|
|
4
|
-
const chipClickableCss = ":host{display:block;height:-webkit-max-content;height:-moz-max-content;height:max-content;border-radius:4px;-webkit-box-sizing:border-box;box-sizing:border-box}:host .chip_clickable{display:-ms-flexbox;display:flex;min-width:32px;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;height:32px;border-radius:16px;padding:2px 4px;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-pack:center;justify-content:center;position:relative;z-index:0}:host .chip_clickable--hide{display:none;padding:0;border:none}:host .chip_clickable .chip_focus:focus{position:absolute;width:100%;height:100%;padding:2px;border-radius:4px;outline:#c226fb solid 2px}:host .chip_clickable--click{cursor:pointer}:host .chip_clickable--click .chip_darker{opacity:0;position:absolute;width:100%;height:100%;border-radius:inherit;z-index:1;-webkit-backdrop-filter:brightness(1);backdrop-filter:brightness(1);-webkit-box-sizing:border-box;box-sizing:border-box}:host .chip_clickable--click:hover .chip_darker{opacity:1;-webkit-backdrop-filter:brightness(0.9);backdrop-filter:brightness(0.9)}:host .chip_clickable--click:active .chip_darker{opacity:1;-webkit-backdrop-filter:brightness(0.8);backdrop-filter:brightness(0.8)}:host .chip_clickable--disabled{cursor:default;background-color:#f3f6fa}:host .chip_clickable--disabled .chip_clickable--icon{color:#505f79}:host .chip_clickable--disabled .chip_clickable--text{color:#505f79}:host .chip_clickable--disabled .chip_clickable--close{cursor:default}:host .chip_clickable--icon{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;height:20px;padding-left:4px;color:#202c44;z-index:2}:host .chip_clickable--close{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;height:20px;padding-right:4px;mix-blend-mode:hard-light;color:#202c44;opacity:0.7;z-index:2;position:relative;cursor:pointer}:host .chip_clickable--close .close_focus:focus{position:absolute;width:100%;height:100%;left:-2px;border-radius:4px;outline:#c226fb solid 2px}:host .chip_clickable--text{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;width:-webkit-max-content;width:-moz-max-content;width:max-content;height:20px;margin:0 8px;z-index:2;color:#202c44;font-family:\"Nunito Sans\", \"Tahoma\", \"Helvetica\", \"Arial\", sans-serif}:host .chip_clickable--tall{height:40px;border-radius:24px}:host .chip_clickable--default{background-color:#b3d4ff}:host .chip_clickable--info{background-color:#80e3eb}:host .chip_clickable--success{background-color:#90e6bc}:host .chip_clickable--warning{background-color:#fff6a8}:host .chip_clickable--danger{background-color:#ffa5a5}:host .chip_clickable--outline{background-color:#ffffff;border:1px solid #b9cbd3}:host .chip_clickable:focus-visible{outline:none}";
|
|
5
|
-
|
|
6
|
-
const ChipClickable = class {
|
|
7
|
-
constructor(hostRef) {
|
|
8
|
-
registerInstance(this, hostRef);
|
|
9
|
-
this.chipClickableClose = createEvent(this, "chipClickableClose", 7);
|
|
10
|
-
this.chipClickableClick = createEvent(this, "chipClickableClick", 7);
|
|
11
|
-
this.visible = true;
|
|
12
|
-
/**
|
|
13
|
-
* used for change the color. Uses one of them.
|
|
14
|
-
*/
|
|
15
|
-
this.color = 'default';
|
|
16
|
-
/**
|
|
17
|
-
* used for change the size chip. Uses one of them.
|
|
18
|
-
*/
|
|
19
|
-
this.size = 'standard';
|
|
20
|
-
/**
|
|
21
|
-
* it makes the chip clickable.
|
|
22
|
-
*/
|
|
23
|
-
this.clickable = false;
|
|
24
|
-
/**
|
|
25
|
-
* used for delete the chip.
|
|
26
|
-
*/
|
|
27
|
-
this.close = false;
|
|
28
|
-
/**
|
|
29
|
-
* the chip gone stay disabled while this prop be true.
|
|
30
|
-
*/
|
|
31
|
-
this.disabled = false;
|
|
32
|
-
/**
|
|
33
|
-
* Data test is the prop to specifically test the component action object.
|
|
34
|
-
*/
|
|
35
|
-
this.dataTest = null;
|
|
36
|
-
}
|
|
37
|
-
handleClickKey(event) {
|
|
38
|
-
if ((event.key === 'Enter' || event.key === ' ') && !this.disabled) {
|
|
39
|
-
event.preventDefault();
|
|
40
|
-
this.chipClickableClick.emit();
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
handleClick(event) {
|
|
44
|
-
if (!this.disabled) {
|
|
45
|
-
event.preventDefault();
|
|
46
|
-
this.chipClickableClick.emit();
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
handleCloseChip(event) {
|
|
50
|
-
event.preventDefault();
|
|
51
|
-
this.chipClickableClose.emit({ id: this.element.id });
|
|
52
|
-
}
|
|
53
|
-
handleCloseKey(event) {
|
|
54
|
-
if ((event.key === 'Enter' || event.key === ' ') && !this.disabled) {
|
|
55
|
-
event.preventDefault();
|
|
56
|
-
this.chipClickableClose.emit({ id: this.element.id });
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
getSizeAvatarChip() {
|
|
60
|
-
if (this.size === 'tall') {
|
|
61
|
-
return 'extra-small';
|
|
62
|
-
}
|
|
63
|
-
else
|
|
64
|
-
return 'micro';
|
|
65
|
-
}
|
|
66
|
-
getSizeIconChip() {
|
|
67
|
-
if (this.size === 'tall') {
|
|
68
|
-
return 'medium';
|
|
69
|
-
}
|
|
70
|
-
else
|
|
71
|
-
return 'x-small';
|
|
72
|
-
}
|
|
73
|
-
render() {
|
|
74
|
-
return (h(Host, null, h("div", { class: {
|
|
75
|
-
chip_clickable: true,
|
|
76
|
-
[`chip_clickable--${this.color}`]: !this.disabled,
|
|
77
|
-
[`chip_clickable--${this.size}`]: true,
|
|
78
|
-
'chip_clickable--hide': !this.visible,
|
|
79
|
-
'chip_clickable--click': this.clickable,
|
|
80
|
-
'chip_clickable--disabled': this.disabled,
|
|
81
|
-
}, onClick: this.handleClick.bind(this), "data-test": this.dataTest }, this.clickable && !this.disabled && (h("div", { class: "chip_focus", onKeyDown: this.handleClickKey.bind(this), tabindex: "0" })), this.clickable && !this.disabled && h("div", { class: "chip_darker" }), this.icon && !this.avatar && (h("div", { class: "chip_clickable--icon" }, h("bds-icon", { size: this.getSizeIconChip(), name: this.icon }))), this.avatar && (h("div", { class: "chip_clickable--avatar" }, h("bds-avatar", { size: this.getSizeAvatarChip(), thumbnail: this.avatar }))), h("bds-typo", { class: "chip_clickable--text", variant: "fs-12", bold: "bold" }, h("slot", null)), this.close && (h("div", { class: "chip_clickable--close", onClick: this.handleCloseChip.bind(this) }, !this.disabled && (h("div", { class: "close_focus", onKeyDown: this.handleCloseKey.bind(this), tabindex: "0" })), h("bds-icon", { size: "x-small", theme: "solid", name: "error" }))))));
|
|
82
|
-
}
|
|
83
|
-
get element() { return getElement(this); }
|
|
84
|
-
};
|
|
85
|
-
ChipClickable.style = chipClickableCss;
|
|
86
|
-
|
|
87
|
-
const inputCss = ":host{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;position:relative;-ms-flex:1;flex:1;width:100%;max-width:100%;max-height:100%}:host input,:host textarea{-webkit-box-shadow:inherit;box-shadow:inherit}:host input::-webkit-input-placeholder,:host textarea::-webkit-input-placeholder{color:#b9cbd3;opacity:1}:host input::-moz-placeholder,:host textarea::-moz-placeholder{color:#b9cbd3;opacity:1}:host input:-ms-input-placeholder,:host textarea:-ms-input-placeholder{color:#b9cbd3;opacity:1}:host input::-ms-input-placeholder,:host textarea::-ms-input-placeholder{color:#b9cbd3;opacity:1}:host input::placeholder,:host textarea::placeholder{color:#b9cbd3;opacity:1}:host input::-webkit-input-placeholder,:host textarea::-webkit-input-placeholder{color:#b9cbd3;opacity:1}.input{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;padding:8px 4px 9px 12px;-ms-flex:1;flex:1;width:100%;max-width:100%;max-height:100%;background:#ffffff}.input--state-primary{border:1px solid #d2dfe6;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px}.input--state-primary:hover{border:1px solid #3f7de8;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px}.input--state-primary.input--pressed{border:1px solid #3f7de8;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px;-webkit-box-shadow:0 0 0 2px rgba(63, 125, 232, 0.4);box-shadow:0 0 0 2px rgba(63, 125, 232, 0.4)}.input--state-primary .input__icon{color:#3f7de8;background-color:#e8f2ff}.input--state-primary .input__container__label{color:#8ca0b3}.input--state-primary .input__container__label--pressed{color:#3f7de8}.input--state-primary .input__container__text{caret-color:#3f7de8;color:#202c44}.input--state-danger{border:1px solid #ff4c4c;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px}.input--state-danger:hover{border:1px solid #ff4c4c;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px}.input--state-danger.input--pressed{border:1px solid #ff4c4c;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px;-webkit-box-shadow:0 0 0 2px #ffa5a5;box-shadow:0 0 0 2px #ffa5a5}.input--state-danger .input__icon{color:#ff4c4c;background-color:#ffa5a5}.input--state-danger .input__container__label{color:#8ca0b3}.input--state-danger .input__container__label--pressed{color:#ff4c4c}.input--state-danger .input__container__text{caret-color:#ff4c4c;color:#202c44}.input--state-disabled{cursor:not-allowed;border:1px solid #e7edf4;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px;background:#f3f6fa}.input--state-disabled:hover{border:1px solid #b9cbd3;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px;border:1px solid #e7edf4;box-sizing:border-box;border-radius:8px}.input--state-disabled.input--pressed{border:1px solid #b9cbd3;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px;-webkit-box-shadow:0 0 0 2px #e7edf4;box-shadow:0 0 0 2px #e7edf4}.input--state-disabled .input__icon{color:#b9cbd3;background-color:#f8fbfb}.input--state-disabled .input__container__label{color:#b9cbd3}.input--state-disabled .input__container__label--pressed{color:#b9cbd3}.input--state-disabled .input__container__text{caret-color:#b9cbd3;color:#b9cbd3}.input--label{padding:7px 4px 8px 12px}.input__icon{cursor:inherit;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;border-radius:8px;margin-right:8px;padding:2.5px}.input__icon--large{padding:4px}.input__container{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;width:100%}.input__container__wrapper{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.input__container__wrapper__chips{display:inline;max-height:100px;overflow:auto}.input__container__wrapper__chips::-webkit-scrollbar{width:16px;background-color:transparent}.input__container__wrapper__chips::-webkit-scrollbar-thumb{border-radius:10px;border:4px solid transparent;border-radius:10px;background-clip:content-box;background-color:#b9cbd3}.input__container__label{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.input__container__text{display:inline-block;margin:0;border:0;padding:0;width:auto;vertical-align:middle;white-space:normal;line-height:inherit;background:none;color:inherit;font-size:inherit;font-family:inherit;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;font-family:\"Nunito Sans\", \"Tahoma\", \"Helvetica\", \"Arial\", sans-serif;font-size:0.875rem;line-height:150%;resize:none;cursor:inherit}.input__container__text:focus{outline:0}.input__container__text::-webkit-file-upload-button{padding:0;border:0;background:none}.input__container__text:focus{outline:0}.input__container__text[type=checkbox],.input__container__text[type=radio]{width:13px;height:13px}.input__container__text[type=search]{-webkit-appearance:textfield;-webkit-box-sizing:content-box}::-webkit-search-decoration{display:none}.input__container__text[type=reset],.input__container__text[type=button],.input__container__text[type=submit]{overflow:visible}.input__container__text::-webkit-scrollbar{width:16px;background-color:transparent}.input__container__text::-webkit-scrollbar-thumb{border-radius:10px;border:4px solid transparent;border-radius:10px;background-clip:content-box;background-color:#b9cbd3}.input__message{display:-ms-flexbox;display:flex;-ms-flex-align:baseline;align-items:baseline;height:20px;margin:3.7px 2.5px;-webkit-transition:0.3s cubic-bezier(0.4, 0, 0.2, 1);transition:0.3s cubic-bezier(0.4, 0, 0.2, 1);color:#8ca0b3;word-break:break-word;height:auto;min-height:20px}.input__message bds-typo{margin-top:0px;-ms-flex-item-align:self-start;align-self:self-start}.input__message__icon{display:-ms-flexbox;display:flex;padding-right:4px;margin-top:0px;padding-top:2px}.input__message--danger{color:#ff4c4c}.input__container{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;width:100%}.input__container__label{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.input__container__wrapper{display:-ms-flexbox;display:flex;-ms-flex-wrap:nowrap;flex-wrap:nowrap}.input__container__text{display:inline-block;margin:0;border:0;padding:0;width:auto;vertical-align:middle;white-space:normal;line-height:inherit;background:none;color:inherit;font-size:inherit;font-family:inherit;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;font-family:\"Nunito Sans\", \"Tahoma\", \"Helvetica\", \"Arial\", sans-serif;font-size:0.875rem;line-height:150%;width:100%;resize:none;cursor:inherit}.input__container__text:focus{outline:0}.input__container__text::-webkit-file-upload-button{padding:0;border:0;background:none}.input__container__text:focus{outline:0}.input__container__text[type=checkbox],.input__container__text[type=radio]{width:13px;height:13px}.input__container__text[type=search]{-webkit-appearance:textfield;-webkit-box-sizing:content-box}::-webkit-search-decoration{display:none}.input__container__text[type=reset],.input__container__text[type=button],.input__container__text[type=submit]{overflow:visible}.input__container__text__chips{width:auto;min-width:216px;max-width:216px}";
|
|
88
|
-
|
|
89
|
-
const Input = class {
|
|
90
|
-
constructor(hostRef) {
|
|
91
|
-
registerInstance(this, hostRef);
|
|
92
|
-
this.bdsChange = createEvent(this, "bdsChange", 7);
|
|
93
|
-
this.bdsInput = createEvent(this, "bdsInput", 7);
|
|
94
|
-
this.bdsOnBlur = createEvent(this, "bdsOnBlur", 7);
|
|
95
|
-
this.bdsFocus = createEvent(this, "bdsFocus", 7);
|
|
96
|
-
this.bdsSubmit = createEvent(this, "bdsSubmit", 7);
|
|
97
|
-
this.bdsKeyDownBackspace = createEvent(this, "bdsKeyDownBackspace", 7);
|
|
98
|
-
/**
|
|
99
|
-
* Conditions the element to say whether it is pressed or not, to add styles.
|
|
100
|
-
*/
|
|
101
|
-
this.isPressed = false;
|
|
102
|
-
/**
|
|
103
|
-
* Indicates if the input is password, adding the eye icon.
|
|
104
|
-
*/
|
|
105
|
-
this.isPassword = false;
|
|
106
|
-
/**
|
|
107
|
-
* Used to set the error message setted by the internal validators
|
|
108
|
-
*/
|
|
109
|
-
this.validationMesage = '';
|
|
110
|
-
/**
|
|
111
|
-
* Used to set the danger behavior by the internal validators
|
|
112
|
-
*/
|
|
113
|
-
this.validationDanger = false;
|
|
114
|
-
/**
|
|
115
|
-
* Input Name
|
|
116
|
-
*/
|
|
117
|
-
this.inputName = '';
|
|
118
|
-
/**
|
|
119
|
-
* Input type. Can be one of: "text", "password", "number" or "email".
|
|
120
|
-
*/
|
|
121
|
-
this.type = 'text';
|
|
122
|
-
/**
|
|
123
|
-
* label in input, with he the input size increases.
|
|
124
|
-
*/
|
|
125
|
-
this.label = '';
|
|
126
|
-
/**
|
|
127
|
-
* A tip for the user who can enter no controls.
|
|
128
|
-
*/
|
|
129
|
-
this.placeholder = '';
|
|
130
|
-
/**
|
|
131
|
-
* Capitalizes every word's second character.
|
|
132
|
-
*/
|
|
133
|
-
this.autoCapitalize = 'off';
|
|
134
|
-
/**
|
|
135
|
-
* Hint for form autofill feature
|
|
136
|
-
*/
|
|
137
|
-
this.autoComplete = 'off';
|
|
138
|
-
/**
|
|
139
|
-
* If `true`, the user cannot modify the value.
|
|
140
|
-
*/
|
|
141
|
-
this.readonly = false;
|
|
142
|
-
/**
|
|
143
|
-
* Indicated to pass a help the user in complex filling.
|
|
144
|
-
*/
|
|
145
|
-
this.helperMessage = '';
|
|
146
|
-
/**
|
|
147
|
-
* Indicated to pass an feeback to user.
|
|
148
|
-
*/
|
|
149
|
-
this.errorMessage = '';
|
|
150
|
-
/**
|
|
151
|
-
* used for add icon in input left. Uses the bds-icon component.
|
|
152
|
-
*/
|
|
153
|
-
this.icon = '';
|
|
154
|
-
/**
|
|
155
|
-
* Disabled input.
|
|
156
|
-
*/
|
|
157
|
-
this.disabled = false;
|
|
158
|
-
/**
|
|
159
|
-
* Add state danger on input, use for use feedback.
|
|
160
|
-
*/
|
|
161
|
-
this.danger = false;
|
|
162
|
-
/**
|
|
163
|
-
* The value of the input.
|
|
164
|
-
*/
|
|
165
|
-
this.value = '';
|
|
166
|
-
/**
|
|
167
|
-
* Passing true to display a counter of available size, it is necessary to
|
|
168
|
-
* pass another maxlength property.
|
|
169
|
-
*/
|
|
170
|
-
this.counterLength = false;
|
|
171
|
-
/**
|
|
172
|
-
* Make it possible to pass the base values to the warning level and exclude,
|
|
173
|
-
* using the values between min and max.
|
|
174
|
-
*/
|
|
175
|
-
this.counterLengthRule = null;
|
|
176
|
-
/**
|
|
177
|
-
* If `true`, the user cannot modify the value.
|
|
178
|
-
*/
|
|
179
|
-
this.isSubmit = false;
|
|
180
|
-
/**
|
|
181
|
-
* if `true` input switched to textarea
|
|
182
|
-
*/
|
|
183
|
-
this.isTextarea = false;
|
|
184
|
-
/**
|
|
185
|
-
* The rows and cols attributes allow you to specify an exact size for the <textarea> to get. Setting this is a good idea for consistency, as the browser defaults may differ.
|
|
186
|
-
*/
|
|
187
|
-
this.rows = 1;
|
|
188
|
-
/**
|
|
189
|
-
* The rows and cols attributes allow you to specify an exact size for the <textarea> to get. Setting this is a good idea for consistency, as the browser defaults may differ.
|
|
190
|
-
*/
|
|
191
|
-
this.cols = 0;
|
|
192
|
-
/**
|
|
193
|
-
* Id to support Cypress.
|
|
194
|
-
*/
|
|
195
|
-
this.dataTest = null;
|
|
196
|
-
this.keyPressWrapper = (event) => {
|
|
197
|
-
switch (event.key) {
|
|
198
|
-
case 'Enter':
|
|
199
|
-
this.bdsSubmit.emit({ event, value: this.value });
|
|
200
|
-
if (this.isSubmit) {
|
|
201
|
-
this.clearTextInput();
|
|
202
|
-
event.preventDefault();
|
|
203
|
-
}
|
|
204
|
-
break;
|
|
205
|
-
case 'Backspace' :
|
|
206
|
-
this.bdsKeyDownBackspace.emit({ event, value: this.value });
|
|
207
|
-
break;
|
|
208
|
-
}
|
|
209
|
-
};
|
|
210
|
-
this.onInput = (ev) => {
|
|
211
|
-
this.onBdsInputValidations();
|
|
212
|
-
const input = ev.target;
|
|
213
|
-
if (input) {
|
|
214
|
-
this.value = input.value || '';
|
|
215
|
-
}
|
|
216
|
-
this.bdsInput.emit(ev);
|
|
217
|
-
};
|
|
218
|
-
this.onBlur = () => {
|
|
219
|
-
this.onBlurValidations();
|
|
220
|
-
this.isPressed = false;
|
|
221
|
-
this.bdsOnBlur.emit();
|
|
222
|
-
};
|
|
223
|
-
this.onFocus = () => {
|
|
224
|
-
this.isPressed = true;
|
|
225
|
-
this.bdsFocus.emit();
|
|
226
|
-
};
|
|
227
|
-
this.onClickWrapper = () => {
|
|
228
|
-
this.onFocus();
|
|
229
|
-
if (this.nativeInput) {
|
|
230
|
-
this.nativeInput.focus();
|
|
231
|
-
}
|
|
232
|
-
};
|
|
233
|
-
this.clearTextInput = (ev) => {
|
|
234
|
-
if (!this.readonly && !this.disabled && ev) {
|
|
235
|
-
ev.preventDefault();
|
|
236
|
-
ev.stopPropagation();
|
|
237
|
-
}
|
|
238
|
-
this.value = '';
|
|
239
|
-
/**
|
|
240
|
-
* This is needed for clearOnEdit
|
|
241
|
-
* Otherwise the value will not be cleared
|
|
242
|
-
* if user is inside the input
|
|
243
|
-
*/
|
|
244
|
-
if (this.nativeInput) {
|
|
245
|
-
this.nativeInput.value = '';
|
|
246
|
-
}
|
|
247
|
-
};
|
|
248
|
-
}
|
|
249
|
-
/**
|
|
250
|
-
* Update the native input element when the value changes
|
|
251
|
-
*/
|
|
252
|
-
valueChanged() {
|
|
253
|
-
this.bdsChange.emit({ value: this.value == null ? this.value : this.value.toString() });
|
|
254
|
-
}
|
|
255
|
-
/**
|
|
256
|
-
* Sets focus on the specified `ion-input`. Use this method instead of the global
|
|
257
|
-
* `input.focus()`.
|
|
258
|
-
*/
|
|
259
|
-
async setFocus() {
|
|
260
|
-
this.onClickWrapper();
|
|
261
|
-
}
|
|
262
|
-
async removeFocus() {
|
|
263
|
-
this.onBlur();
|
|
264
|
-
}
|
|
265
|
-
/**
|
|
266
|
-
* Returns the native `<input>` element used under the hood.
|
|
267
|
-
*/
|
|
268
|
-
async getInputElement() {
|
|
269
|
-
return this.nativeInput;
|
|
270
|
-
}
|
|
271
|
-
/**
|
|
272
|
-
* Return the validity of the input.
|
|
273
|
-
*/
|
|
274
|
-
async isValid() {
|
|
275
|
-
return this.nativeInput.validity.valid;
|
|
276
|
-
}
|
|
277
|
-
/**
|
|
278
|
-
* Return the validity of the input.
|
|
279
|
-
*/
|
|
280
|
-
async clear() {
|
|
281
|
-
this.value = '';
|
|
282
|
-
}
|
|
283
|
-
renderIcon() {
|
|
284
|
-
return (this.icon && (h("div", { class: {
|
|
285
|
-
input__icon: true,
|
|
286
|
-
'input__icon--large': !!this.label,
|
|
287
|
-
} }, h("bds-icon", { size: this.label ? 'medium' : 'small', name: this.icon, color: "inherit" }))));
|
|
288
|
-
}
|
|
289
|
-
renderLabel() {
|
|
290
|
-
return (this.label && (h("label", { class: {
|
|
291
|
-
input__container__label: true,
|
|
292
|
-
'input__container__label--pressed': this.isPressed && !this.disabled,
|
|
293
|
-
} }, h("bds-typo", { variant: "fs-12", bold: "bold" }, this.label))));
|
|
294
|
-
}
|
|
295
|
-
renderMessage() {
|
|
296
|
-
const icon = this.danger ? 'error' : 'info';
|
|
297
|
-
let message = this.danger ? this.errorMessage : this.helperMessage;
|
|
298
|
-
if (!message && this.validationDanger)
|
|
299
|
-
message = this.validationMesage;
|
|
300
|
-
const styles = this.danger || this.validationDanger ? 'input__message input__message--danger' : 'input__message';
|
|
301
|
-
if (message) {
|
|
302
|
-
return (h("div", { class: styles, part: "input__message" }, h("div", { class: "input__message__icon" }, h("bds-icon", { size: "x-small", name: icon, theme: "solid", color: "inherit" })), h("bds-typo", { variant: "fs-12" }, message)));
|
|
303
|
-
}
|
|
304
|
-
return undefined;
|
|
305
|
-
}
|
|
306
|
-
onBlurValidations() {
|
|
307
|
-
this.required && this.requiredValidation();
|
|
308
|
-
(this.minlength || this.maxlength) && this.lengthValidation();
|
|
309
|
-
(this.min || this.max) && this.minMaxValidation();
|
|
310
|
-
this.checkValidity();
|
|
311
|
-
}
|
|
312
|
-
onBdsInputValidations() {
|
|
313
|
-
this.type === 'email' && this.emailValidation();
|
|
314
|
-
this.type === 'phonenumber' && this.numberValidation();
|
|
315
|
-
this.checkValidity();
|
|
316
|
-
}
|
|
317
|
-
requiredValidation() {
|
|
318
|
-
if (this.nativeInput.validity.valueMissing) {
|
|
319
|
-
this.validationMesage = this.requiredErrorMessage;
|
|
320
|
-
this.validationDanger = true;
|
|
321
|
-
}
|
|
322
|
-
}
|
|
323
|
-
lengthValidation() {
|
|
324
|
-
if (this.nativeInput.validity.tooShort) {
|
|
325
|
-
this.validationMesage = this.minlengthErrorMessage;
|
|
326
|
-
this.validationDanger = true;
|
|
327
|
-
return;
|
|
328
|
-
}
|
|
329
|
-
if (this.nativeInput.validity.tooLong) {
|
|
330
|
-
this.validationDanger = true;
|
|
331
|
-
return;
|
|
332
|
-
}
|
|
333
|
-
}
|
|
334
|
-
minMaxValidation() {
|
|
335
|
-
if (this.nativeInput.validity.rangeUnderflow) {
|
|
336
|
-
this.validationMesage = this.minErrorMessage;
|
|
337
|
-
this.validationDanger = true;
|
|
338
|
-
return;
|
|
339
|
-
}
|
|
340
|
-
if (this.nativeInput.validity.rangeOverflow) {
|
|
341
|
-
this.validationMesage = this.maxErrorMessage;
|
|
342
|
-
this.validationDanger = true;
|
|
343
|
-
return;
|
|
344
|
-
}
|
|
345
|
-
}
|
|
346
|
-
emailValidation() {
|
|
347
|
-
if (emailValidation(this.nativeInput.value)) {
|
|
348
|
-
this.validationMesage = this.emailErrorMessage;
|
|
349
|
-
this.validationDanger = true;
|
|
350
|
-
}
|
|
351
|
-
}
|
|
352
|
-
numberValidation() {
|
|
353
|
-
if (numberValidation(this.nativeInput.value)) {
|
|
354
|
-
this.validationMesage = this.numberErrorMessage;
|
|
355
|
-
this.validationDanger = true;
|
|
356
|
-
}
|
|
357
|
-
}
|
|
358
|
-
checkValidity() {
|
|
359
|
-
if (this.nativeInput.validity.valid) {
|
|
360
|
-
this.validationDanger = false;
|
|
361
|
-
}
|
|
362
|
-
}
|
|
363
|
-
componentDidUpdate() {
|
|
364
|
-
if (this.nativeInput && this.value != this.nativeInput.value) {
|
|
365
|
-
this.nativeInput.value = this.value;
|
|
366
|
-
}
|
|
367
|
-
}
|
|
368
|
-
render() {
|
|
369
|
-
const isPressed = this.isPressed && !this.disabled;
|
|
370
|
-
const Element = this.isTextarea ? 'textarea' : 'input';
|
|
371
|
-
return (h(Host, { "aria-disabled": this.disabled ? 'true' : null }, h("div", { class: {
|
|
372
|
-
input: true,
|
|
373
|
-
'input--state-primary': !this.danger && !this.validationDanger,
|
|
374
|
-
'input--state-danger': this.danger || this.validationDanger,
|
|
375
|
-
'input--state-disabled': this.disabled,
|
|
376
|
-
'input--label': !!this.label,
|
|
377
|
-
'input--pressed': isPressed,
|
|
378
|
-
}, onClick: this.onClickWrapper, onKeyDown: this.keyPressWrapper, part: "input-container" }, this.renderIcon(), h("slot", { name: "input-left" }), h("div", { class: "input__container" }, this.renderLabel(), h("div", { class: { input__container__wrapper: !this.chips, input__container__wrapper__chips: this.chips } }, h("slot", { name: "inside-input-left" }), h(Element, { class: { input__container__text: true, input__container__text__chips: this.chips }, ref: (input) => (this.nativeInput = input), rows: this.rows, cols: this.cols, autocapitalize: this.autoCapitalize, autocomplete: this.autoComplete, disabled: this.disabled, min: this.min, max: this.max, minLength: this.minlength, maxLength: this.maxlength, name: this.inputName, onBlur: this.onBlur, onFocus: this.onFocus, onInput: this.onInput, placeholder: this.placeholder, readOnly: this.readonly, type: this.type, value: this.value, pattern: this.pattern, required: this.required, part: "input", "data-test": this.dataTest }))), this.counterLength && (h("bds-counter-text", Object.assign({ length: this.value.length, max: this.maxlength, active: isPressed }, this.counterLengthRule))), h("slot", { name: "input-right" })), this.renderMessage()));
|
|
379
|
-
}
|
|
380
|
-
static get watchers() { return {
|
|
381
|
-
"value": ["valueChanged"]
|
|
382
|
-
}; }
|
|
383
|
-
};
|
|
384
|
-
Input.style = inputCss;
|
|
385
|
-
|
|
386
|
-
export { ChipClickable as bds_chip_clickable, Input as bds_input };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(i,t,e,n){function a(i){return i instanceof e?i:new e((function(t){t(i)}))}return new(e||(e=Promise))((function(e,o){function r(i){try{l(n.next(i))}catch(t){o(t)}}function s(i){try{l(n["throw"](i))}catch(t){o(t)}}function l(i){i.done?e(i.value):a(i.value).then(r,s)}l((n=n.apply(i,t||[])).next())}))};var __generator=this&&this.__generator||function(i,t){var e={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,a,o,r;return r={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function s(i){return function(t){return l([i,t])}}function l(r){if(n)throw new TypeError("Generator is already executing.");while(e)try{if(n=1,a&&(o=r[0]&2?a["return"]:r[0]?a["throw"]||((o=a["return"])&&o.call(a),0):a.next)&&!(o=o.call(a,r[1])).done)return o;if(a=0,o)r=[r[0]&2,o.value];switch(r[0]){case 0:case 1:o=r;break;case 4:e.label++;return{value:r[1],done:false};case 5:e.label++;a=r[1];r=[0];continue;case 7:r=e.ops.pop();e.trys.pop();continue;default:if(!(o=e.trys,o=o.length>0&&o[o.length-1])&&(r[0]===6||r[0]===2)){e=0;continue}if(r[0]===3&&(!o||r[1]>o[0]&&r[1]<o[3])){e.label=r[1];break}if(r[0]===6&&e.label<o[1]){e.label=o[1];o=r;break}if(o&&e.label<o[2]){e.label=o[2];e.ops.push(r);break}if(o[2])e.ops.pop();e.trys.pop();continue}r=t.call(i,e)}catch(s){r=[6,s];a=0}finally{n=o=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-0dc1d699.js";import{e as emailValidation,n as numberValidation}from"./validations-6d914b78.js";var chipClickableCss=':host{display:block;height:-webkit-max-content;height:-moz-max-content;height:max-content;border-radius:4px;-webkit-box-sizing:border-box;box-sizing:border-box}:host .chip_clickable{display:-ms-flexbox;display:flex;min-width:32px;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;height:32px;border-radius:16px;padding:2px 4px;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-pack:center;justify-content:center;position:relative;z-index:0}:host .chip_clickable--hide{display:none;padding:0;border:none}:host .chip_clickable .chip_focus:focus{position:absolute;width:100%;height:100%;padding:2px;border-radius:4px;outline:#c226fb solid 2px}:host .chip_clickable--click{cursor:pointer}:host .chip_clickable--click .chip_darker{opacity:0;position:absolute;width:100%;height:100%;border-radius:inherit;z-index:1;-webkit-backdrop-filter:brightness(1);backdrop-filter:brightness(1);-webkit-box-sizing:border-box;box-sizing:border-box}:host .chip_clickable--click:hover .chip_darker{opacity:1;-webkit-backdrop-filter:brightness(0.9);backdrop-filter:brightness(0.9)}:host .chip_clickable--click:active .chip_darker{opacity:1;-webkit-backdrop-filter:brightness(0.8);backdrop-filter:brightness(0.8)}:host .chip_clickable--disabled{cursor:default;background-color:#f3f6fa}:host .chip_clickable--disabled .chip_clickable--icon{color:#505f79}:host .chip_clickable--disabled .chip_clickable--text{color:#505f79}:host .chip_clickable--disabled .chip_clickable--close{cursor:default}:host .chip_clickable--icon{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;height:20px;padding-left:4px;color:#202c44;z-index:2}:host .chip_clickable--close{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;height:20px;padding-right:4px;mix-blend-mode:hard-light;color:#202c44;opacity:0.7;z-index:2;position:relative;cursor:pointer}:host .chip_clickable--close .close_focus:focus{position:absolute;width:100%;height:100%;left:-2px;border-radius:4px;outline:#c226fb solid 2px}:host .chip_clickable--text{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;width:-webkit-max-content;width:-moz-max-content;width:max-content;height:20px;margin:0 8px;z-index:2;color:#202c44;font-family:"Nunito Sans", "Tahoma", "Helvetica", "Arial", sans-serif}:host .chip_clickable--tall{height:40px;border-radius:24px}:host .chip_clickable--default{background-color:#b3d4ff}:host .chip_clickable--info{background-color:#80e3eb}:host .chip_clickable--success{background-color:#90e6bc}:host .chip_clickable--warning{background-color:#fff6a8}:host .chip_clickable--danger{background-color:#ffa5a5}:host .chip_clickable--outline{background-color:#ffffff;border:1px solid #b9cbd3}:host .chip_clickable:focus-visible{outline:none}';var ChipClickable=function(){function i(i){registerInstance(this,i);this.chipClickableClose=createEvent(this,"chipClickableClose",7);this.chipClickableClick=createEvent(this,"chipClickableClick",7);this.visible=true;this.color="default";this.size="standard";this.clickable=false;this.close=false;this.disabled=false;this.dataTest=null}i.prototype.handleClickKey=function(i){if((i.key==="Enter"||i.key===" ")&&!this.disabled){i.preventDefault();this.chipClickableClick.emit()}};i.prototype.handleClick=function(i){if(!this.disabled){i.preventDefault();this.chipClickableClick.emit()}};i.prototype.handleCloseChip=function(i){i.preventDefault();this.chipClickableClose.emit({id:this.element.id})};i.prototype.handleCloseKey=function(i){if((i.key==="Enter"||i.key===" ")&&!this.disabled){i.preventDefault();this.chipClickableClose.emit({id:this.element.id})}};i.prototype.getSizeAvatarChip=function(){if(this.size==="tall"){return"extra-small"}else return"micro"};i.prototype.getSizeIconChip=function(){if(this.size==="tall"){return"medium"}else return"x-small"};i.prototype.render=function(){var i;return h(Host,null,h("div",{class:(i={chip_clickable:true},i["chip_clickable--".concat(this.color)]=!this.disabled,i["chip_clickable--".concat(this.size)]=true,i["chip_clickable--hide"]=!this.visible,i["chip_clickable--click"]=this.clickable,i["chip_clickable--disabled"]=this.disabled,i),onClick:this.handleClick.bind(this),"data-test":this.dataTest},this.clickable&&!this.disabled&&h("div",{class:"chip_focus",onKeyDown:this.handleClickKey.bind(this),tabindex:"0"}),this.clickable&&!this.disabled&&h("div",{class:"chip_darker"}),this.icon&&!this.avatar&&h("div",{class:"chip_clickable--icon"},h("bds-icon",{size:this.getSizeIconChip(),name:this.icon})),this.avatar&&h("div",{class:"chip_clickable--avatar"},h("bds-avatar",{size:this.getSizeAvatarChip(),thumbnail:this.avatar})),h("bds-typo",{class:"chip_clickable--text",variant:"fs-12",bold:"bold"},h("slot",null)),this.close&&h("div",{class:"chip_clickable--close",onClick:this.handleCloseChip.bind(this)},!this.disabled&&h("div",{class:"close_focus",onKeyDown:this.handleCloseKey.bind(this),tabindex:"0"}),h("bds-icon",{size:"x-small",theme:"solid",name:"error"}))))};Object.defineProperty(i.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});return i}();ChipClickable.style=chipClickableCss;var inputCss=':host{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;position:relative;-ms-flex:1;flex:1;width:100%;max-width:100%;max-height:100%}:host input,:host textarea{-webkit-box-shadow:inherit;box-shadow:inherit}:host input::-webkit-input-placeholder,:host textarea::-webkit-input-placeholder{color:#b9cbd3;opacity:1}:host input::-moz-placeholder,:host textarea::-moz-placeholder{color:#b9cbd3;opacity:1}:host input:-ms-input-placeholder,:host textarea:-ms-input-placeholder{color:#b9cbd3;opacity:1}:host input::-ms-input-placeholder,:host textarea::-ms-input-placeholder{color:#b9cbd3;opacity:1}:host input::placeholder,:host textarea::placeholder{color:#b9cbd3;opacity:1}:host input::-webkit-input-placeholder,:host textarea::-webkit-input-placeholder{color:#b9cbd3;opacity:1}.input{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;padding:8px 4px 9px 12px;-ms-flex:1;flex:1;width:100%;max-width:100%;max-height:100%;background:#ffffff}.input--state-primary{border:1px solid #d2dfe6;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px}.input--state-primary:hover{border:1px solid #3f7de8;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px}.input--state-primary.input--pressed{border:1px solid #3f7de8;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px;-webkit-box-shadow:0 0 0 2px rgba(63, 125, 232, 0.4);box-shadow:0 0 0 2px rgba(63, 125, 232, 0.4)}.input--state-primary .input__icon{color:#3f7de8;background-color:#e8f2ff}.input--state-primary .input__container__label{color:#8ca0b3}.input--state-primary .input__container__label--pressed{color:#3f7de8}.input--state-primary .input__container__text{caret-color:#3f7de8;color:#202c44}.input--state-danger{border:1px solid #ff4c4c;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px}.input--state-danger:hover{border:1px solid #ff4c4c;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px}.input--state-danger.input--pressed{border:1px solid #ff4c4c;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px;-webkit-box-shadow:0 0 0 2px #ffa5a5;box-shadow:0 0 0 2px #ffa5a5}.input--state-danger .input__icon{color:#ff4c4c;background-color:#ffa5a5}.input--state-danger .input__container__label{color:#8ca0b3}.input--state-danger .input__container__label--pressed{color:#ff4c4c}.input--state-danger .input__container__text{caret-color:#ff4c4c;color:#202c44}.input--state-disabled{cursor:not-allowed;border:1px solid #e7edf4;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px;background:#f3f6fa}.input--state-disabled:hover{border:1px solid #b9cbd3;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px;border:1px solid #e7edf4;box-sizing:border-box;border-radius:8px}.input--state-disabled.input--pressed{border:1px solid #b9cbd3;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px;-webkit-box-shadow:0 0 0 2px #e7edf4;box-shadow:0 0 0 2px #e7edf4}.input--state-disabled .input__icon{color:#b9cbd3;background-color:#f8fbfb}.input--state-disabled .input__container__label{color:#b9cbd3}.input--state-disabled .input__container__label--pressed{color:#b9cbd3}.input--state-disabled .input__container__text{caret-color:#b9cbd3;color:#b9cbd3}.input--label{padding:7px 4px 8px 12px}.input__icon{cursor:inherit;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;border-radius:8px;margin-right:8px;padding:2.5px}.input__icon--large{padding:4px}.input__container{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;width:100%}.input__container__wrapper{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.input__container__wrapper__chips{display:inline;max-height:100px;overflow:auto}.input__container__wrapper__chips::-webkit-scrollbar{width:16px;background-color:transparent}.input__container__wrapper__chips::-webkit-scrollbar-thumb{border-radius:10px;border:4px solid transparent;border-radius:10px;background-clip:content-box;background-color:#b9cbd3}.input__container__label{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.input__container__text{display:inline-block;margin:0;border:0;padding:0;width:auto;vertical-align:middle;white-space:normal;line-height:inherit;background:none;color:inherit;font-size:inherit;font-family:inherit;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;font-family:"Nunito Sans", "Tahoma", "Helvetica", "Arial", sans-serif;font-size:0.875rem;line-height:150%;resize:none;cursor:inherit}.input__container__text:focus{outline:0}.input__container__text::-webkit-file-upload-button{padding:0;border:0;background:none}.input__container__text:focus{outline:0}.input__container__text[type=checkbox],.input__container__text[type=radio]{width:13px;height:13px}.input__container__text[type=search]{-webkit-appearance:textfield;-webkit-box-sizing:content-box}::-webkit-search-decoration{display:none}.input__container__text[type=reset],.input__container__text[type=button],.input__container__text[type=submit]{overflow:visible}.input__container__text::-webkit-scrollbar{width:16px;background-color:transparent}.input__container__text::-webkit-scrollbar-thumb{border-radius:10px;border:4px solid transparent;border-radius:10px;background-clip:content-box;background-color:#b9cbd3}.input__message{display:-ms-flexbox;display:flex;-ms-flex-align:baseline;align-items:baseline;height:20px;margin:3.7px 2.5px;-webkit-transition:0.3s cubic-bezier(0.4, 0, 0.2, 1);transition:0.3s cubic-bezier(0.4, 0, 0.2, 1);color:#8ca0b3;word-break:break-word;height:auto;min-height:20px}.input__message bds-typo{margin-top:0px;-ms-flex-item-align:self-start;align-self:self-start}.input__message__icon{display:-ms-flexbox;display:flex;padding-right:4px;margin-top:0px;padding-top:2px}.input__message--danger{color:#ff4c4c}.input__container{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;width:100%}.input__container__label{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.input__container__wrapper{display:-ms-flexbox;display:flex;-ms-flex-wrap:nowrap;flex-wrap:nowrap}.input__container__text{display:inline-block;margin:0;border:0;padding:0;width:auto;vertical-align:middle;white-space:normal;line-height:inherit;background:none;color:inherit;font-size:inherit;font-family:inherit;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;font-family:"Nunito Sans", "Tahoma", "Helvetica", "Arial", sans-serif;font-size:0.875rem;line-height:150%;width:100%;resize:none;cursor:inherit}.input__container__text:focus{outline:0}.input__container__text::-webkit-file-upload-button{padding:0;border:0;background:none}.input__container__text:focus{outline:0}.input__container__text[type=checkbox],.input__container__text[type=radio]{width:13px;height:13px}.input__container__text[type=search]{-webkit-appearance:textfield;-webkit-box-sizing:content-box}::-webkit-search-decoration{display:none}.input__container__text[type=reset],.input__container__text[type=button],.input__container__text[type=submit]{overflow:visible}.input__container__text__chips{width:auto;min-width:216px;max-width:216px}';var Input=function(){function i(i){var t=this;registerInstance(this,i);this.bdsChange=createEvent(this,"bdsChange",7);this.bdsInput=createEvent(this,"bdsInput",7);this.bdsOnBlur=createEvent(this,"bdsOnBlur",7);this.bdsFocus=createEvent(this,"bdsFocus",7);this.bdsSubmit=createEvent(this,"bdsSubmit",7);this.bdsKeyDownBackspace=createEvent(this,"bdsKeyDownBackspace",7);this.isPressed=false;this.isPassword=false;this.validationMesage="";this.validationDanger=false;this.inputName="";this.type="text";this.label="";this.placeholder="";this.autoCapitalize="off";this.autoComplete="off";this.readonly=false;this.helperMessage="";this.errorMessage="";this.icon="";this.disabled=false;this.danger=false;this.value="";this.counterLength=false;this.counterLengthRule=null;this.isSubmit=false;this.isTextarea=false;this.rows=1;this.cols=0;this.dataTest=null;this.keyPressWrapper=function(i){switch(i.key){case"Enter":t.bdsSubmit.emit({event:i,value:t.value});if(t.isSubmit){t.clearTextInput();i.preventDefault()}break;case"Backspace":t.bdsKeyDownBackspace.emit({event:i,value:t.value});break}};this.onInput=function(i){t.onBdsInputValidations();var e=i.target;if(e){t.value=e.value||""}t.bdsInput.emit(i)};this.onBlur=function(){t.onBlurValidations();t.isPressed=false;t.bdsOnBlur.emit()};this.onFocus=function(){t.isPressed=true;t.bdsFocus.emit()};this.onClickWrapper=function(){t.onFocus();if(t.nativeInput){t.nativeInput.focus()}};this.clearTextInput=function(i){if(!t.readonly&&!t.disabled&&i){i.preventDefault();i.stopPropagation()}t.value="";if(t.nativeInput){t.nativeInput.value=""}}}i.prototype.valueChanged=function(){this.bdsChange.emit({value:this.value==null?this.value:this.value.toString()})};i.prototype.setFocus=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(i){this.onClickWrapper();return[2]}))}))};i.prototype.removeFocus=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(i){this.onBlur();return[2]}))}))};i.prototype.getInputElement=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(i){return[2,this.nativeInput]}))}))};i.prototype.isValid=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(i){return[2,this.nativeInput.validity.valid]}))}))};i.prototype.clear=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(i){this.value="";return[2]}))}))};i.prototype.renderIcon=function(){return this.icon&&h("div",{class:{input__icon:true,"input__icon--large":!!this.label}},h("bds-icon",{size:this.label?"medium":"small",name:this.icon,color:"inherit"}))};i.prototype.renderLabel=function(){return this.label&&h("label",{class:{input__container__label:true,"input__container__label--pressed":this.isPressed&&!this.disabled}},h("bds-typo",{variant:"fs-12",bold:"bold"},this.label))};i.prototype.renderMessage=function(){var i=this.danger?"error":"info";var t=this.danger?this.errorMessage:this.helperMessage;if(!t&&this.validationDanger)t=this.validationMesage;var e=this.danger||this.validationDanger?"input__message input__message--danger":"input__message";if(t){return h("div",{class:e,part:"input__message"},h("div",{class:"input__message__icon"},h("bds-icon",{size:"x-small",name:i,theme:"solid",color:"inherit"})),h("bds-typo",{variant:"fs-12"},t))}return undefined};i.prototype.onBlurValidations=function(){this.required&&this.requiredValidation();(this.minlength||this.maxlength)&&this.lengthValidation();(this.min||this.max)&&this.minMaxValidation();this.checkValidity()};i.prototype.onBdsInputValidations=function(){this.type==="email"&&this.emailValidation();this.type==="phonenumber"&&this.numberValidation();this.checkValidity()};i.prototype.requiredValidation=function(){if(this.nativeInput.validity.valueMissing){this.validationMesage=this.requiredErrorMessage;this.validationDanger=true}};i.prototype.lengthValidation=function(){if(this.nativeInput.validity.tooShort){this.validationMesage=this.minlengthErrorMessage;this.validationDanger=true;return}if(this.nativeInput.validity.tooLong){this.validationDanger=true;return}};i.prototype.minMaxValidation=function(){if(this.nativeInput.validity.rangeUnderflow){this.validationMesage=this.minErrorMessage;this.validationDanger=true;return}if(this.nativeInput.validity.rangeOverflow){this.validationMesage=this.maxErrorMessage;this.validationDanger=true;return}};i.prototype.emailValidation=function(){if(emailValidation(this.nativeInput.value)){this.validationMesage=this.emailErrorMessage;this.validationDanger=true}};i.prototype.numberValidation=function(){if(numberValidation(this.nativeInput.value)){this.validationMesage=this.numberErrorMessage;this.validationDanger=true}};i.prototype.checkValidity=function(){if(this.nativeInput.validity.valid){this.validationDanger=false}};i.prototype.componentDidUpdate=function(){if(this.nativeInput&&this.value!=this.nativeInput.value){this.nativeInput.value=this.value}};i.prototype.render=function(){var i=this;var t=this.isPressed&&!this.disabled;var e=this.isTextarea?"textarea":"input";return h(Host,{"aria-disabled":this.disabled?"true":null},h("div",{class:{input:true,"input--state-primary":!this.danger&&!this.validationDanger,"input--state-danger":this.danger||this.validationDanger,"input--state-disabled":this.disabled,"input--label":!!this.label,"input--pressed":t},onClick:this.onClickWrapper,onKeyDown:this.keyPressWrapper,part:"input-container"},this.renderIcon(),h("slot",{name:"input-left"}),h("div",{class:"input__container"},this.renderLabel(),h("div",{class:{input__container__wrapper:!this.chips,input__container__wrapper__chips:this.chips}},h("slot",{name:"inside-input-left"}),h(e,{class:{input__container__text:true,input__container__text__chips:this.chips},ref:function(t){return i.nativeInput=t},rows:this.rows,cols:this.cols,autocapitalize:this.autoCapitalize,autocomplete:this.autoComplete,disabled:this.disabled,min:this.min,max:this.max,minLength:this.minlength,maxLength:this.maxlength,name:this.inputName,onBlur:this.onBlur,onFocus:this.onFocus,onInput:this.onInput,placeholder:this.placeholder,readOnly:this.readonly,type:this.type,value:this.value,pattern:this.pattern,required:this.required,part:"input","data-test":this.dataTest}))),this.counterLength&&h("bds-counter-text",Object.assign({length:this.value.length,max:this.maxlength,active:t},this.counterLengthRule)),h("slot",{name:"input-right"})),this.renderMessage())};Object.defineProperty(i,"watchers",{get:function(){return{value:["valueChanged"]}},enumerable:false,configurable:true});return i}();Input.style=inputCss;export{ChipClickable as bds_chip_clickable,Input as bds_input};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,t,i,a){function r(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,n){function o(e){try{d(a.next(e))}catch(t){n(t)}}function s(e){try{d(a["throw"](e))}catch(t){n(t)}}function d(e){e.done?i(e.value):r(e.value).then(o,s)}d((a=a.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},a,r,n,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(t){return d([e,t])}}function d(o){if(a)throw new TypeError("Generator is already executing.");while(i)try{if(a=1,r&&(n=o[0]&2?r["return"]:o[0]?r["throw"]||((n=r["return"])&&n.call(r),0):r.next)&&!(n=n.call(r,o[1])).done)return n;if(r=0,n)o=[o[0]&2,n.value];switch(o[0]){case 0:case 1:n=o;break;case 4:i.label++;return{value:o[1],done:false};case 5:i.label++;r=o[1];o=[0];continue;case 7:o=i.ops.pop();i.trys.pop();continue;default:if(!(n=i.trys,n=n.length>0&&n[n.length-1])&&(o[0]===6||o[0]===2)){i=0;continue}if(o[0]===3&&(!n||o[1]>n[0]&&o[1]<n[3])){i.label=o[1];break}if(o[0]===6&&i.label<n[1]){i.label=n[1];n=o;break}if(n&&i.label<n[2]){i.label=n[2];i.ops.push(o);break}if(n[2])i.ops.pop();i.trys.pop();continue}o=t.call(e,i)}catch(s){o=[6,s];r=0}finally{a=n=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h}from"./index-0dc1d699.js";import{T as THIS_DAY,b as dateToDayList,f as fillDayList,w as weekDays,g as getMonthsSlide,e as getYears,h as getMonths,i as fillDate,d as defaultStartDate,a as defaultEndDate,j as changeMonths}from"./calendar-b15dd90c.js";var datepickerCss$1=':host{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;position:relative;-ms-flex:1;flex:1;width:100%;max-width:100%;max-height:100%}:host input,:host textarea{-webkit-box-shadow:inherit;box-shadow:inherit}:host input::-webkit-input-placeholder,:host textarea::-webkit-input-placeholder{color:#b9cbd3;opacity:1}:host input::-moz-placeholder,:host textarea::-moz-placeholder{color:#b9cbd3;opacity:1}:host input:-ms-input-placeholder,:host textarea:-ms-input-placeholder{color:#b9cbd3;opacity:1}:host input::-ms-input-placeholder,:host textarea::-ms-input-placeholder{color:#b9cbd3;opacity:1}:host input::placeholder,:host textarea::placeholder{color:#b9cbd3;opacity:1}:host input::-webkit-input-placeholder,:host textarea::-webkit-input-placeholder{color:#b9cbd3;opacity:1}.input{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;padding:8px 4px 9px 12px;-ms-flex:1;flex:1;width:100%;max-width:100%;max-height:100%;background:#ffffff}.input--state-primary{border:1px solid #d2dfe6;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px}.input--state-primary:hover{border:1px solid #3f7de8;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px}.input--state-primary.input--pressed{border:1px solid #3f7de8;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px;-webkit-box-shadow:0 0 0 2px rgba(63, 125, 232, 0.4);box-shadow:0 0 0 2px rgba(63, 125, 232, 0.4)}.input--state-primary .input__icon{color:#3f7de8;background-color:#e8f2ff}.input--state-primary .input__container__label{color:#8ca0b3}.input--state-primary .input__container__label--pressed{color:#3f7de8}.input--state-primary .input__container__text{caret-color:#3f7de8;color:#202c44}.input--state-danger{border:1px solid #ff4c4c;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px}.input--state-danger:hover{border:1px solid #ff4c4c;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px}.input--state-danger.input--pressed{border:1px solid #ff4c4c;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px;-webkit-box-shadow:0 0 0 2px #ffa5a5;box-shadow:0 0 0 2px #ffa5a5}.input--state-danger .input__icon{color:#ff4c4c;background-color:#ffa5a5}.input--state-danger .input__container__label{color:#8ca0b3}.input--state-danger .input__container__label--pressed{color:#ff4c4c}.input--state-danger .input__container__text{caret-color:#ff4c4c;color:#202c44}.input--state-disabled{cursor:not-allowed;border:1px solid #e7edf4;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px;background:#f3f6fa}.input--state-disabled:hover{border:1px solid #b9cbd3;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px;border:1px solid #e7edf4;box-sizing:border-box;border-radius:8px}.input--state-disabled.input--pressed{border:1px solid #b9cbd3;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px;-webkit-box-shadow:0 0 0 2px #e7edf4;box-shadow:0 0 0 2px #e7edf4}.input--state-disabled .input__icon{color:#b9cbd3;background-color:#f8fbfb}.input--state-disabled .input__container__label{color:#b9cbd3}.input--state-disabled .input__container__label--pressed{color:#b9cbd3}.input--state-disabled .input__container__text{caret-color:#b9cbd3;color:#b9cbd3}.input--label{padding:7px 4px 8px 12px}.input__icon{cursor:inherit;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;border-radius:8px;margin-right:8px;padding:2.5px}.input__icon--large{padding:4px}.input__container{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;width:100%}.input__container__wrapper{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.input__container__wrapper__chips{display:inline;max-height:100px;overflow:auto}.input__container__wrapper__chips::-webkit-scrollbar{width:16px;background-color:transparent}.input__container__wrapper__chips::-webkit-scrollbar-thumb{border-radius:10px;border:4px solid transparent;border-radius:10px;background-clip:content-box;background-color:#b9cbd3}.input__container__label{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.input__container__text{display:inline-block;margin:0;border:0;padding:0;width:auto;vertical-align:middle;white-space:normal;line-height:inherit;background:none;color:inherit;font-size:inherit;font-family:inherit;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;font-family:"Nunito Sans", "Tahoma", "Helvetica", "Arial", sans-serif;font-size:0.875rem;line-height:150%;resize:none;cursor:inherit}.input__container__text:focus{outline:0}.input__container__text::-webkit-file-upload-button{padding:0;border:0;background:none}.input__container__text:focus{outline:0}.input__container__text[type=checkbox],.input__container__text[type=radio]{width:13px;height:13px}.input__container__text[type=search]{-webkit-appearance:textfield;-webkit-box-sizing:content-box}::-webkit-search-decoration{display:none}.input__container__text[type=reset],.input__container__text[type=button],.input__container__text[type=submit]{overflow:visible}.input__container__text::-webkit-scrollbar{width:16px;background-color:transparent}.input__container__text::-webkit-scrollbar-thumb{border-radius:10px;border:4px solid transparent;border-radius:10px;background-clip:content-box;background-color:#b9cbd3}.input__message{display:-ms-flexbox;display:flex;-ms-flex-align:baseline;align-items:baseline;height:20px;margin:3.7px 2.5px;-webkit-transition:0.3s cubic-bezier(0.4, 0, 0.2, 1);transition:0.3s cubic-bezier(0.4, 0, 0.2, 1);color:#8ca0b3;word-break:break-word;height:auto;min-height:20px}.input__message bds-typo{margin-top:0px;-ms-flex-item-align:self-start;align-self:self-start}.input__message__icon{display:-ms-flexbox;display:flex;padding-right:4px;margin-top:0px;padding-top:2px}.input__message--danger{color:#ff4c4c}.input__container{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;width:100%}.input__container__label{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.input__container__wrapper{display:-ms-flexbox;display:flex;-ms-flex-wrap:nowrap;flex-wrap:nowrap}.input__container__text{display:inline-block;margin:0;border:0;padding:0;width:auto;vertical-align:middle;white-space:normal;line-height:inherit;background:none;color:inherit;font-size:inherit;font-family:inherit;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;font-family:"Nunito Sans", "Tahoma", "Helvetica", "Arial", sans-serif;font-size:0.875rem;line-height:150%;width:100%;resize:none;cursor:inherit}.input__container__text:focus{outline:0}.input__container__text::-webkit-file-upload-button{padding:0;border:0;background:none}.input__container__text:focus{outline:0}.input__container__text[type=checkbox],.input__container__text[type=radio]{width:13px;height:13px}.input__container__text[type=search]{-webkit-appearance:textfield;-webkit-box-sizing:content-box}::-webkit-search-decoration{display:none}.input__container__text[type=reset],.input__container__text[type=button],.input__container__text[type=submit]{overflow:visible}.input__container__text__chips{width:auto;min-width:216px;max-width:216px}.datepicker{position:relative;max-width:608px}.datepicker__menu{position:fixed;pointer-events:none;top:0;left:0;background-color:#ffffff;-webkit-box-shadow:0px 4px 10px rgba(51, 51, 51, 0.3);box-shadow:0px 4px 10px rgba(51, 51, 51, 0.3);border-radius:8px;padding:16px;opacity:0;-webkit-transition:opacity 0.5s;-moz-transition:opacity 0.5s;transition:opacity 0.5s;z-index:80000}.datepicker__menu__open{pointer-events:auto;opacity:1}.datepicker__menu__message{padding:8px 16px;border-radius:8px;background-color:#fff6a8;color:#212a3c;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;margin-bottom:24px}.datepicker__menu__message bds-icon{margin-right:8px}.datepicker__menu__footer{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:end;justify-content:flex-end;padding-top:16px;margin-top:16px;border-top:1px solid #d2dfe6}.datepicker__menu__footer bds-button{margin-left:16px}.datepicker__inputs{width:100%;display:grid}.datepicker__inputs__single{grid-template-columns:1fr}.datepicker__inputs__period{grid-template-columns:1fr 1fr;gap:16px}.datepicker__inputs bds-input{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;width:100%}.datepicker__inputs bds-input::part(input-container){position:relative}.datepicker__inputs__icon{cursor:pointer;color:#8ca0b3;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:space-evenly;justify-content:space-evenly;padding-right:16px}.datepicker__inputs__icon bds-icon:first-child{margin-right:8px}.datepicker__inputs__icon:hover bds-icon:first-child{color:#3f7de8}.datepicker__calendar{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center}.datepicker__calendar__selectDate{width:100%;display:grid;grid-template-columns:28px 1fr 80px 28px;grid-gap:8px;-ms-flex-align:center;align-items:center;margin-bottom:16px;padding:0 8px}.datepicker__calendar__selectDate__select{position:relative;width:100%}.datepicker__calendar__selectDate__select__input{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;padding:8px 4px 9px 12px;-ms-flex:1;flex:1;width:100%;max-width:100%;max-height:100%;background:#ffffff;border:1px solid #d2dfe6;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px}.datepicker__calendar__selectDate__select__input:hover{border:1px solid #3f7de8;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px}.datepicker__calendar__selectDate__select__input.input--pressed{border:1px solid #3f7de8;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px;-webkit-box-shadow:0 0 0 2px rgba(63, 125, 232, 0.4);box-shadow:0 0 0 2px rgba(63, 125, 232, 0.4)}.datepicker__calendar__selectDate__select__input .input__icon{color:#3f7de8;background-color:#e8f2ff}.datepicker__calendar__selectDate__select__input .input__container__label{color:#8ca0b3}.datepicker__calendar__selectDate__select__input .input__container__label--pressed{color:#3f7de8}.datepicker__calendar__selectDate__select__input .input__container__text{caret-color:#3f7de8;color:#202c44}.datepicker__calendar__selectDate__select__input__disable{cursor:not-allowed;border:1px solid #e7edf4;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px;background:#f3f6fa}.datepicker__calendar__selectDate__select__input__disable:hover{border:1px solid #b9cbd3;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px;border:1px solid #e7edf4;box-sizing:border-box;border-radius:8px}.datepicker__calendar__selectDate__select__input__disable.input--pressed{border:1px solid #b9cbd3;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px;-webkit-box-shadow:0 0 0 2px #e7edf4;box-shadow:0 0 0 2px #e7edf4}.datepicker__calendar__selectDate__select__input__disable .input__icon{color:#b9cbd3;background-color:#f8fbfb}.datepicker__calendar__selectDate__select__input__disable .input__container__label{color:#b9cbd3}.datepicker__calendar__selectDate__select__input__disable .input__container__label--pressed{color:#b9cbd3}.datepicker__calendar__selectDate__select__input__disable .input__container__text{caret-color:#b9cbd3;color:#b9cbd3}.datepicker__calendar__selectDate__select__input .icon-arrow{color:#8ca0b3;display:-ms-flexbox;display:flex}.datepicker__calendar__selectDate__select__options{background:#f8fbfb;width:100%;max-height:250px;position:absolute;top:99%;left:0;border-radius:8px;-webkit-box-shadow:0 2px 8px rgba(96, 123, 153, 0.4);box-shadow:0 2px 8px rgba(96, 123, 153, 0.4);overflow-y:auto;z-index:2;margin-top:4px;-webkit-transition:opacity 0.75s, visibility 0.75s, -webkit-transform 0.25s;transition:opacity 0.75s, visibility 0.75s, -webkit-transform 0.25s;transition:transform 0.25s, opacity 0.75s, visibility 0.75s;transition:transform 0.25s, opacity 0.75s, visibility 0.75s, -webkit-transform 0.25s;-webkit-transform-origin:top left;transform-origin:top left;-webkit-transform:scaleY(0);transform:scaleY(0);opacity:0}.datepicker__calendar__selectDate__select__options::-webkit-scrollbar{width:16px;background-color:transparent}.datepicker__calendar__selectDate__select__options::-webkit-scrollbar-thumb{border-radius:10px;border:4px solid transparent;border-radius:10px;background-clip:content-box;background-color:#b9cbd3}.datepicker__calendar__selectDate__select__options--open{visibility:visible;-webkit-transform:scale(1);transform:scale(1);opacity:1}.datepicker__calendar__selectDate__icon{cursor:pointer;color:#505f79}.datepicker__calendar__selectDate .arrow-left{padding-left:8px}.datepicker__calendar__selectDate .arrow-left__disable{opacity:0;pointer-events:none}.datepicker__calendar__selectDate .arrow-right{padding-right:8px}.datepicker__calendar__selectDate .arrow-right__disable{opacity:0;pointer-events:none}.datepicker__calendar__week{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;display:grid;grid-template-columns:repeat(7, 1fr);margin-bottom:8px}.datepicker__calendar__week__day{width:40px;height:40px;text-align:center;color:#8ca0b3;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.datepicker__calendar__car{height:240px;width:280px;overflow:hidden;position:relative}.datepicker__calendar__car__slide{display:-ms-flexbox;display:flex;position:absolute;left:-100%}.datepicker__calendar__car__slide__box{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;display:grid;grid-template-columns:repeat(7, 1fr);gap:8px 0}.datepicker__calendar__car__slide__box__day{width:40px;height:40px;position:relative}.datepicker__calendar__car__slide__box__day__period:before{content:"";position:absolute;inset:4px 0px;background-color:#e8f2ff}.datepicker__calendar__car__slide__box__day__start:before{inset:4px 0;border-top-left-radius:16px;border-bottom-left-radius:16px}.datepicker__calendar__car__slide__box__day__end:before{inset:4px 0;border-top-right-radius:16px;border-bottom-right-radius:16px}.datepicker__calendar__car__slide__box__day__typo{position:relative;width:calc(100% - 2px);height:calc(100% - 2px);display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;border-radius:100%;color:#233049;border:1px solid transparent;cursor:pointer}.datepicker__calendar__car__slide__box__day__typo:hover{background-color:#ffffff;color:#3f7de8;border-color:#3f7de8}.datepicker__calendar__car__slide__box__day__current{background-color:#ffffff;color:#3f7de8;border-color:#3f7de8}.datepicker__calendar__car__slide__box__day__selected{background-color:#3f7de8;color:#ffffff;border-color:#3f7de8}.datepicker__calendar__car__slide__box__day__selected:hover{background-color:#3f7de8;color:#ffffff;border-color:#3f7de8}.datepicker__calendar__car__slide__box__day__disable{pointer-events:none;background-color:transparent;color:#8ca0b3}.datepicker__calendar__car .animate__prev{-webkit-animation-name:animationPrev;animation-name:animationPrev;-webkit-animation-duration:0.31s;animation-duration:0.31s;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}.datepicker__calendar__car .animate__next{-webkit-animation-name:animationNext;animation-name:animationNext;-webkit-animation-duration:0.31s;animation-duration:0.31s;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}.period .datepicker__calendar__selectDate{grid-template-columns:28px 120px 80px 1fr 28px}.period .datepicker__calendar__selectDate__futureMonth{padding-left:80px;text-align:center;color:#202c44}.period .datepicker__calendar__week{width:100%;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}.period .datepicker__calendar__week__present,.period .datepicker__calendar__week__future{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;display:grid;grid-template-columns:repeat(7, 1fr)}.period .datepicker__calendar__car{height:240px;width:600px}.period .datepicker__calendar__car__slide{left:calc(-50% - 60px)}.period .datepicker__calendar__car__slide__box{margin-left:40px}.period .datepicker__calendar__car .animate__prev{-webkit-animation-name:animationPeriodPrev;animation-name:animationPeriodPrev}.period .datepicker__calendar__car .animate__next{-webkit-animation-name:animationPeriodNext;animation-name:animationPeriodNext}@-webkit-keyframes animationPrev{0%{left:-100%}100%{left:0}}@keyframes animationPrev{0%{left:-100%}100%{left:0}}@-webkit-keyframes animationNext{0%{left:-100%}100%{left:-200%}}@keyframes animationNext{0%{left:-100%}100%{left:-200%}}@-webkit-keyframes animationPeriodPrev{0%{left:calc(-50% - 60px)}100%{left:-40px}}@keyframes animationPeriodPrev{0%{left:calc(-50% - 60px)}100%{left:-40px}}@-webkit-keyframes animationPeriodNext{0%{left:calc(-50% - 60px)}100%{left:calc(-100% - 80px)}}@keyframes animationPeriodNext{0%{left:calc(-50% - 60px)}100%{left:calc(-100% - 80px)}}';var BdsdatepickerPeriod=function(){function e(e){var t=this;registerInstance(this,e);this.bdsStartDate=createEvent(this,"bdsStartDate",7);this.bdsEndDate=createEvent(this,"bdsEndDate",7);this.monthActivated=THIS_DAY.getMonth();this.yearActivated=THIS_DAY.getFullYear();this.animatePrev=false;this.animateNext=false;this.activeSelectYear=false;this.openSelectMonth=false;this.openSelectYear=false;this.loadingSlide="await";this.startDate=dateToDayList(defaultStartDate);this.endDate=dateToDayList(defaultEndDate);this.startDateSelect=null;this.endDateSelect=null;this.language="pt_BR";this.handler=function(e,i){var a=e.detail.value;if(i=="months"){t.monthActivated=a}else{if(a==t.endDate.year)t.monthActivated=0;if(a==t.startDate.year)t.monthActivated=t.startDate.month;t.yearActivated=a}};this.openDateSelect=function(e,i){if(i=="months"){setTimeout((function(){t.openSelectMonth=e}),100)}else{setTimeout((function(){t.openSelectYear=e}),100)}}}e.prototype.clear=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.startDateSelect=null;this.endDateSelect=null;return[2]}))}))};e.prototype.startDateSelectChanged=function(){var e;this.bdsStartDate.emit({value:this.startDateSelect});this.monthActivated=this.startDateSelect?(e=this.startDateSelect)===null||e===void 0?void 0:e.getMonth():this.startDate.month;this.yearActivated=this.startDateSelect?this.startDateSelect.getFullYear():this.startDate.year};e.prototype.endDateSelectChanged=function(){this.bdsEndDate.emit({value:this.endDateSelect});this.monthActivated=this.endDateSelect?this.startDateSelect.getMonth()==this.endDateSelect.getMonth()&&this.startDateSelect.getFullYear()==this.endDateSelect.getFullYear()?this.startDateSelect.getMonth():this.endDateSelect.getMonth()-1:this.startDate.month;this.yearActivated=this.endDateSelect?this.endDateSelect.getFullYear():this.startDate.year;if(this.monthActivated<0){this.monthActivated=11;this.yearActivated=this.yearActivated-1}};e.prototype.periodToSelectChanged=function(e,t){var i=fillDayList(t);var a=fillDayList(e);if(a!=i){this.monthActivated=this.startDate.month;this.yearActivated=this.startDate.year}};e.prototype.componentWillLoad=function(){if(this.startDate){this.monthActivated=this.startDate.month;this.yearActivated=this.startDate.year}};e.prototype.componentWillRender=function(){this.week=Object.values(weekDays(this.language));this.monthsSlide=getMonthsSlide(this.yearActivated,this.monthActivated);this.years=getYears(this.yearActivated,this.startDate.year,this.endDate.year);this.months=getMonths(this.yearActivated,this.startDate,this.endDate,changeMonths(this.language))};e.prototype.prevDays=function(e){var t=[];for(var i=0;i<e;i++){t.push(i)}return t.map((function(e){return h("span",{key:"id".concat(e),class:"space ".concat(e)})}))};e.prototype.selectDate=function(e){var t=new Date(e.year,e.month,e.date);if(this.startDateSelect){this.endDateSelect=t}else{this.startDateSelect=t}};e.prototype.prevMonth=function(){var e=this;this.animatePrev=true;if(this.loadingSlide!="pendding"){this.loadingSlide="pendding";setTimeout((function(){e.animatePrev=false;e.monthActivated=e.monthActivated-1;if(e.monthActivated<0){e.monthActivated=11;e.yearActivated=e.yearActivated-1}e.loadingSlide="success"}),300)}else{return}};e.prototype.nextMonth=function(){var e=this;this.animateNext=true;if(this.loadingSlide!="pendding"){this.loadingSlide="pendding";setTimeout((function(){e.animateNext=false;e.monthActivated=e.monthActivated+1;if(e.monthActivated>11){e.monthActivated=0;e.yearActivated=e.yearActivated+1}e.loadingSlide="success"}),300)}else{return}};e.prototype.checkCurrentDay=function(e){var t=fillDayList(e);var i=fillDate(THIS_DAY);if(t==i)return true;else return false};e.prototype.checkDisableDay=function(e){var t=fillDayList(e);var i=this.startDate?fillDayList(this.startDate):"0";var a=this.endDate?fillDayList(this.endDate):"9999999";var r=this.startDateSelect?fillDate(this.startDateSelect):"0";if(this.startDate&&t<i){return true}if(this.startDateSelect){if(t<r){return true}}if(this.endDate&&t>a){return true}};e.prototype.checkSelectedDay=function(e){var t=fillDayList(e);var i=this.startDateSelect?fillDate(this.startDateSelect):"0";var a=this.endDateSelect?fillDate(this.endDateSelect):"0";if(t==i||t==a)return true;else return false};e.prototype.checkPeriodDay=function(e){var t=fillDayList(e);var i=this.startDateSelect?fillDate(this.startDateSelect):"0";var a=this.endDateSelect?fillDate(this.endDateSelect):"0";if(i&&a){if(t>=i&&t<=a){return true}}};e.prototype.checkPeriodStart=function(e){var t=e.date==1;var i=e.day==0;var a=fillDayList(e);var r=this.startDateSelect?fillDate(this.startDateSelect):"0";var n=a==r;if(t||i||n){return true}};e.prototype.checkPeriodEnd=function(e,t){var i=t;var a=e.day==6;var r=fillDayList(e);var n=this.endDateSelect?fillDate(this.endDateSelect):"0";var o=r==n;if(i||a||o){return true}};e.prototype.renderSelectData=function(e,t,i){var a,r;var n=this;var o=i=="months"?this.openSelectMonth:this.openSelectYear;var s=e.filter((function(e){return e.value===t}));var d=o?"arrow-up":"arrow-down";return h("div",{class:(a={datepicker__calendar__selectDate__select:true},a["datepicker__calendar__selectDate__select__".concat(i)]=true,a)},h("button",{onFocus:function(){return e.length>1&&n.openDateSelect(true,i)},onBlur:function(){return e.length>1&&n.openDateSelect(false,i)},class:(r={datepicker__calendar__selectDate__select__input:true,datepicker__calendar__selectDate__select__input__disable:e.length<=1},r["input--pressed"]=o,r)},h("bds-typo",{variant:"fs-14"},s[0].label),h("div",{class:"icon-arrow"},h("bds-icon",{size:"small",name:d,color:"inherit"}))),h("div",{class:{datepicker__calendar__selectDate__select__options:true,"datepicker__calendar__selectDate__select__options--open":o}},e.map((function(e){return h("bds-select-option",{value:e.value,key:e.value,onOptionSelected:function(e){return n.handler(e,i)},selected:e.value==t,onClick:function(){return n.openDateSelect(false,i)}},e.label)}))))};e.prototype.renderCarSlideBox=function(e,t){var i=this;return h("div",{class:{datepicker__calendar__car__slide__box:true}},this.prevDays(t),e.map((function(t,a){return h("div",{key:a,class:{datepicker__calendar__car__slide__box__day:true,datepicker__calendar__car__slide__box__day__period:i.checkPeriodDay(t),datepicker__calendar__car__slide__box__day__start:i.checkPeriodStart(t),datepicker__calendar__car__slide__box__day__end:i.checkPeriodEnd(t,e.length===a+1)}},h("bds-typo",{class:{datepicker__calendar__car__slide__box__day__typo:true,datepicker__calendar__car__slide__box__day__current:i.checkCurrentDay(t),datepicker__calendar__car__slide__box__day__selected:i.checkSelectedDay(t),datepicker__calendar__car__slide__box__day__disable:i.checkDisableDay(t)},onClick:function(){return i.selectDate(t)}},t.date))})))};e.prototype.render=function(){var e,t,i;var a=this;var r=changeMonths(this.language).filter((function(e){return e.value===a.monthsSlide[2].month}));var n=this.monthsSlide[2].year;return h("div",{class:(e={datepicker__calendar:true},e["period"]=true,e)},h("div",{class:{datepicker__calendar__selectDate:true}},h("bds-icon",{class:(t={},t["arrow-left"]=true,t["arrow-left__disable"]=fillDayList(this.monthsSlide[0].days[this.monthsSlide[0].days.length-1])<fillDayList(this.startDate),t.datepicker__calendar__selectDate__icon=true,t),name:"arrow-left",theme:"outline",size:"small",onClick:function(){return a.prevMonth()}}),[this.renderSelectData(this.months,this.monthActivated,"months"),this.renderSelectData(this.years,this.yearActivated,"years")],h("bds-typo",{class:"datepicker__calendar__selectDate__futureMonth",variant:"fs-14"},"".concat(r[0].label,", ").concat(n)),h("bds-icon",{class:(i={},i["arrow-right"]=true,i["arrow-right__disable"]=fillDayList(this.monthsSlide[2].days[0])>fillDayList(this.endDate),i.datepicker__calendar__selectDate__icon=true,i),name:"arrow-right",theme:"outline",size:"small",onClick:function(){return a.nextMonth()}})),h("div",null,h("div",{class:{datepicker__calendar__week:true}},h("div",{class:{datepicker__calendar__week__present:true}},this.week.map((function(e,t){return h("bds-typo",{key:t,class:"datepicker__calendar__week__day"},e.charAt(0))}))),h("div",{class:{datepicker__calendar__week__future:true}},this.week.map((function(e,t){return h("bds-typo",{key:t,class:"datepicker__calendar__week__day"},e.charAt(0))})))),h("div",{class:{datepicker__calendar__car:true,datepicker__calendar__car__period:true}},h("div",{class:{datepicker__calendar__car__slide:true,animate__prev:this.animatePrev,animate__next:this.animateNext}},[this.renderCarSlideBox(this.monthsSlide[0].days,this.monthsSlide[0].days[0].day),this.renderCarSlideBox(this.monthsSlide[1].days,this.monthsSlide[1].days[0].day),this.renderCarSlideBox(this.monthsSlide[2].days,this.monthsSlide[2].days[0].day),this.renderCarSlideBox(this.monthsSlide[3].days,this.monthsSlide[3].days[0].day)]))))};Object.defineProperty(e,"watchers",{get:function(){return{startDateSelect:["startDateSelectChanged"],endDateSelect:["endDateSelectChanged"],endDate:["periodToSelectChanged"],startDate:["periodToSelectChanged"]}},enumerable:false,configurable:true});return e}();BdsdatepickerPeriod.style=datepickerCss$1;var datepickerCss=':host{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;position:relative;-ms-flex:1;flex:1;width:100%;max-width:100%;max-height:100%}:host input,:host textarea{-webkit-box-shadow:inherit;box-shadow:inherit}:host input::-webkit-input-placeholder,:host textarea::-webkit-input-placeholder{color:#b9cbd3;opacity:1}:host input::-moz-placeholder,:host textarea::-moz-placeholder{color:#b9cbd3;opacity:1}:host input:-ms-input-placeholder,:host textarea:-ms-input-placeholder{color:#b9cbd3;opacity:1}:host input::-ms-input-placeholder,:host textarea::-ms-input-placeholder{color:#b9cbd3;opacity:1}:host input::placeholder,:host textarea::placeholder{color:#b9cbd3;opacity:1}:host input::-webkit-input-placeholder,:host textarea::-webkit-input-placeholder{color:#b9cbd3;opacity:1}.input{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;padding:8px 4px 9px 12px;-ms-flex:1;flex:1;width:100%;max-width:100%;max-height:100%;background:#ffffff}.input--state-primary{border:1px solid #d2dfe6;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px}.input--state-primary:hover{border:1px solid #3f7de8;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px}.input--state-primary.input--pressed{border:1px solid #3f7de8;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px;-webkit-box-shadow:0 0 0 2px rgba(63, 125, 232, 0.4);box-shadow:0 0 0 2px rgba(63, 125, 232, 0.4)}.input--state-primary .input__icon{color:#3f7de8;background-color:#e8f2ff}.input--state-primary .input__container__label{color:#8ca0b3}.input--state-primary .input__container__label--pressed{color:#3f7de8}.input--state-primary .input__container__text{caret-color:#3f7de8;color:#202c44}.input--state-danger{border:1px solid #ff4c4c;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px}.input--state-danger:hover{border:1px solid #ff4c4c;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px}.input--state-danger.input--pressed{border:1px solid #ff4c4c;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px;-webkit-box-shadow:0 0 0 2px #ffa5a5;box-shadow:0 0 0 2px #ffa5a5}.input--state-danger .input__icon{color:#ff4c4c;background-color:#ffa5a5}.input--state-danger .input__container__label{color:#8ca0b3}.input--state-danger .input__container__label--pressed{color:#ff4c4c}.input--state-danger .input__container__text{caret-color:#ff4c4c;color:#202c44}.input--state-disabled{cursor:not-allowed;border:1px solid #e7edf4;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px;background:#f3f6fa}.input--state-disabled:hover{border:1px solid #b9cbd3;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px;border:1px solid #e7edf4;box-sizing:border-box;border-radius:8px}.input--state-disabled.input--pressed{border:1px solid #b9cbd3;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px;-webkit-box-shadow:0 0 0 2px #e7edf4;box-shadow:0 0 0 2px #e7edf4}.input--state-disabled .input__icon{color:#b9cbd3;background-color:#f8fbfb}.input--state-disabled .input__container__label{color:#b9cbd3}.input--state-disabled .input__container__label--pressed{color:#b9cbd3}.input--state-disabled .input__container__text{caret-color:#b9cbd3;color:#b9cbd3}.input--label{padding:7px 4px 8px 12px}.input__icon{cursor:inherit;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;border-radius:8px;margin-right:8px;padding:2.5px}.input__icon--large{padding:4px}.input__container{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;width:100%}.input__container__wrapper{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.input__container__wrapper__chips{display:inline;max-height:100px;overflow:auto}.input__container__wrapper__chips::-webkit-scrollbar{width:16px;background-color:transparent}.input__container__wrapper__chips::-webkit-scrollbar-thumb{border-radius:10px;border:4px solid transparent;border-radius:10px;background-clip:content-box;background-color:#b9cbd3}.input__container__label{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.input__container__text{display:inline-block;margin:0;border:0;padding:0;width:auto;vertical-align:middle;white-space:normal;line-height:inherit;background:none;color:inherit;font-size:inherit;font-family:inherit;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;font-family:"Nunito Sans", "Tahoma", "Helvetica", "Arial", sans-serif;font-size:0.875rem;line-height:150%;resize:none;cursor:inherit}.input__container__text:focus{outline:0}.input__container__text::-webkit-file-upload-button{padding:0;border:0;background:none}.input__container__text:focus{outline:0}.input__container__text[type=checkbox],.input__container__text[type=radio]{width:13px;height:13px}.input__container__text[type=search]{-webkit-appearance:textfield;-webkit-box-sizing:content-box}::-webkit-search-decoration{display:none}.input__container__text[type=reset],.input__container__text[type=button],.input__container__text[type=submit]{overflow:visible}.input__container__text::-webkit-scrollbar{width:16px;background-color:transparent}.input__container__text::-webkit-scrollbar-thumb{border-radius:10px;border:4px solid transparent;border-radius:10px;background-clip:content-box;background-color:#b9cbd3}.input__message{display:-ms-flexbox;display:flex;-ms-flex-align:baseline;align-items:baseline;height:20px;margin:3.7px 2.5px;-webkit-transition:0.3s cubic-bezier(0.4, 0, 0.2, 1);transition:0.3s cubic-bezier(0.4, 0, 0.2, 1);color:#8ca0b3;word-break:break-word;height:auto;min-height:20px}.input__message bds-typo{margin-top:0px;-ms-flex-item-align:self-start;align-self:self-start}.input__message__icon{display:-ms-flexbox;display:flex;padding-right:4px;margin-top:0px;padding-top:2px}.input__message--danger{color:#ff4c4c}.input__container{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;width:100%}.input__container__label{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.input__container__wrapper{display:-ms-flexbox;display:flex;-ms-flex-wrap:nowrap;flex-wrap:nowrap}.input__container__text{display:inline-block;margin:0;border:0;padding:0;width:auto;vertical-align:middle;white-space:normal;line-height:inherit;background:none;color:inherit;font-size:inherit;font-family:inherit;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;font-family:"Nunito Sans", "Tahoma", "Helvetica", "Arial", sans-serif;font-size:0.875rem;line-height:150%;width:100%;resize:none;cursor:inherit}.input__container__text:focus{outline:0}.input__container__text::-webkit-file-upload-button{padding:0;border:0;background:none}.input__container__text:focus{outline:0}.input__container__text[type=checkbox],.input__container__text[type=radio]{width:13px;height:13px}.input__container__text[type=search]{-webkit-appearance:textfield;-webkit-box-sizing:content-box}::-webkit-search-decoration{display:none}.input__container__text[type=reset],.input__container__text[type=button],.input__container__text[type=submit]{overflow:visible}.input__container__text__chips{width:auto;min-width:216px;max-width:216px}.datepicker{position:relative;max-width:608px}.datepicker__menu{position:fixed;pointer-events:none;top:0;left:0;background-color:#ffffff;-webkit-box-shadow:0px 4px 10px rgba(51, 51, 51, 0.3);box-shadow:0px 4px 10px rgba(51, 51, 51, 0.3);border-radius:8px;padding:16px;opacity:0;-webkit-transition:opacity 0.5s;-moz-transition:opacity 0.5s;transition:opacity 0.5s;z-index:80000}.datepicker__menu__open{pointer-events:auto;opacity:1}.datepicker__menu__message{padding:8px 16px;border-radius:8px;background-color:#fff6a8;color:#212a3c;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;margin-bottom:24px}.datepicker__menu__message bds-icon{margin-right:8px}.datepicker__menu__footer{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:end;justify-content:flex-end;padding-top:16px;margin-top:16px;border-top:1px solid #d2dfe6}.datepicker__menu__footer bds-button{margin-left:16px}.datepicker__inputs{width:100%;display:grid}.datepicker__inputs__single{grid-template-columns:1fr}.datepicker__inputs__period{grid-template-columns:1fr 1fr;gap:16px}.datepicker__inputs bds-input{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;width:100%}.datepicker__inputs bds-input::part(input-container){position:relative}.datepicker__inputs__icon{cursor:pointer;color:#8ca0b3;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:space-evenly;justify-content:space-evenly;padding-right:16px}.datepicker__inputs__icon bds-icon:first-child{margin-right:8px}.datepicker__inputs__icon:hover bds-icon:first-child{color:#3f7de8}.datepicker__calendar{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center}.datepicker__calendar__selectDate{width:100%;display:grid;grid-template-columns:28px 1fr 80px 28px;grid-gap:8px;-ms-flex-align:center;align-items:center;margin-bottom:16px;padding:0 8px}.datepicker__calendar__selectDate__select{position:relative;width:100%}.datepicker__calendar__selectDate__select__input{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;padding:8px 4px 9px 12px;-ms-flex:1;flex:1;width:100%;max-width:100%;max-height:100%;background:#ffffff;border:1px solid #d2dfe6;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px}.datepicker__calendar__selectDate__select__input:hover{border:1px solid #3f7de8;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px}.datepicker__calendar__selectDate__select__input.input--pressed{border:1px solid #3f7de8;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px;-webkit-box-shadow:0 0 0 2px rgba(63, 125, 232, 0.4);box-shadow:0 0 0 2px rgba(63, 125, 232, 0.4)}.datepicker__calendar__selectDate__select__input .input__icon{color:#3f7de8;background-color:#e8f2ff}.datepicker__calendar__selectDate__select__input .input__container__label{color:#8ca0b3}.datepicker__calendar__selectDate__select__input .input__container__label--pressed{color:#3f7de8}.datepicker__calendar__selectDate__select__input .input__container__text{caret-color:#3f7de8;color:#202c44}.datepicker__calendar__selectDate__select__input__disable{cursor:not-allowed;border:1px solid #e7edf4;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px;background:#f3f6fa}.datepicker__calendar__selectDate__select__input__disable:hover{border:1px solid #b9cbd3;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px;border:1px solid #e7edf4;box-sizing:border-box;border-radius:8px}.datepicker__calendar__selectDate__select__input__disable.input--pressed{border:1px solid #b9cbd3;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px;-webkit-box-shadow:0 0 0 2px #e7edf4;box-shadow:0 0 0 2px #e7edf4}.datepicker__calendar__selectDate__select__input__disable .input__icon{color:#b9cbd3;background-color:#f8fbfb}.datepicker__calendar__selectDate__select__input__disable .input__container__label{color:#b9cbd3}.datepicker__calendar__selectDate__select__input__disable .input__container__label--pressed{color:#b9cbd3}.datepicker__calendar__selectDate__select__input__disable .input__container__text{caret-color:#b9cbd3;color:#b9cbd3}.datepicker__calendar__selectDate__select__input .icon-arrow{color:#8ca0b3;display:-ms-flexbox;display:flex}.datepicker__calendar__selectDate__select__options{background:#f8fbfb;width:100%;max-height:250px;position:absolute;top:99%;left:0;border-radius:8px;-webkit-box-shadow:0 2px 8px rgba(96, 123, 153, 0.4);box-shadow:0 2px 8px rgba(96, 123, 153, 0.4);overflow-y:auto;z-index:2;margin-top:4px;-webkit-transition:opacity 0.75s, visibility 0.75s, -webkit-transform 0.25s;transition:opacity 0.75s, visibility 0.75s, -webkit-transform 0.25s;transition:transform 0.25s, opacity 0.75s, visibility 0.75s;transition:transform 0.25s, opacity 0.75s, visibility 0.75s, -webkit-transform 0.25s;-webkit-transform-origin:top left;transform-origin:top left;-webkit-transform:scaleY(0);transform:scaleY(0);opacity:0}.datepicker__calendar__selectDate__select__options::-webkit-scrollbar{width:16px;background-color:transparent}.datepicker__calendar__selectDate__select__options::-webkit-scrollbar-thumb{border-radius:10px;border:4px solid transparent;border-radius:10px;background-clip:content-box;background-color:#b9cbd3}.datepicker__calendar__selectDate__select__options--open{visibility:visible;-webkit-transform:scale(1);transform:scale(1);opacity:1}.datepicker__calendar__selectDate__icon{cursor:pointer;color:#505f79}.datepicker__calendar__selectDate .arrow-left{padding-left:8px}.datepicker__calendar__selectDate .arrow-left__disable{opacity:0;pointer-events:none}.datepicker__calendar__selectDate .arrow-right{padding-right:8px}.datepicker__calendar__selectDate .arrow-right__disable{opacity:0;pointer-events:none}.datepicker__calendar__week{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;display:grid;grid-template-columns:repeat(7, 1fr);margin-bottom:8px}.datepicker__calendar__week__day{width:40px;height:40px;text-align:center;color:#8ca0b3;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.datepicker__calendar__car{height:240px;width:280px;overflow:hidden;position:relative}.datepicker__calendar__car__slide{display:-ms-flexbox;display:flex;position:absolute;left:-100%}.datepicker__calendar__car__slide__box{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;display:grid;grid-template-columns:repeat(7, 1fr);gap:8px 0}.datepicker__calendar__car__slide__box__day{width:40px;height:40px;position:relative}.datepicker__calendar__car__slide__box__day__period:before{content:"";position:absolute;inset:4px 0px;background-color:#e8f2ff}.datepicker__calendar__car__slide__box__day__start:before{inset:4px 0;border-top-left-radius:16px;border-bottom-left-radius:16px}.datepicker__calendar__car__slide__box__day__end:before{inset:4px 0;border-top-right-radius:16px;border-bottom-right-radius:16px}.datepicker__calendar__car__slide__box__day__typo{position:relative;width:calc(100% - 2px);height:calc(100% - 2px);display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;border-radius:100%;color:#233049;border:1px solid transparent;cursor:pointer}.datepicker__calendar__car__slide__box__day__typo:hover{background-color:#ffffff;color:#3f7de8;border-color:#3f7de8}.datepicker__calendar__car__slide__box__day__current{background-color:#ffffff;color:#3f7de8;border-color:#3f7de8}.datepicker__calendar__car__slide__box__day__selected{background-color:#3f7de8;color:#ffffff;border-color:#3f7de8}.datepicker__calendar__car__slide__box__day__selected:hover{background-color:#3f7de8;color:#ffffff;border-color:#3f7de8}.datepicker__calendar__car__slide__box__day__disable{pointer-events:none;background-color:transparent;color:#8ca0b3}.datepicker__calendar__car .animate__prev{-webkit-animation-name:animationPrev;animation-name:animationPrev;-webkit-animation-duration:0.31s;animation-duration:0.31s;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}.datepicker__calendar__car .animate__next{-webkit-animation-name:animationNext;animation-name:animationNext;-webkit-animation-duration:0.31s;animation-duration:0.31s;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}.period .datepicker__calendar__selectDate{grid-template-columns:28px 120px 80px 1fr 28px}.period .datepicker__calendar__selectDate__futureMonth{padding-left:80px;text-align:center;color:#202c44}.period .datepicker__calendar__week{width:100%;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}.period .datepicker__calendar__week__present,.period .datepicker__calendar__week__future{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;display:grid;grid-template-columns:repeat(7, 1fr)}.period .datepicker__calendar__car{height:240px;width:600px}.period .datepicker__calendar__car__slide{left:calc(-50% - 60px)}.period .datepicker__calendar__car__slide__box{margin-left:40px}.period .datepicker__calendar__car .animate__prev{-webkit-animation-name:animationPeriodPrev;animation-name:animationPeriodPrev}.period .datepicker__calendar__car .animate__next{-webkit-animation-name:animationPeriodNext;animation-name:animationPeriodNext}@-webkit-keyframes animationPrev{0%{left:-100%}100%{left:0}}@keyframes animationPrev{0%{left:-100%}100%{left:0}}@-webkit-keyframes animationNext{0%{left:-100%}100%{left:-200%}}@keyframes animationNext{0%{left:-100%}100%{left:-200%}}@-webkit-keyframes animationPeriodPrev{0%{left:calc(-50% - 60px)}100%{left:-40px}}@keyframes animationPeriodPrev{0%{left:calc(-50% - 60px)}100%{left:-40px}}@-webkit-keyframes animationPeriodNext{0%{left:calc(-50% - 60px)}100%{left:calc(-100% - 80px)}}@keyframes animationPeriodNext{0%{left:calc(-50% - 60px)}100%{left:calc(-100% - 80px)}}';var BdsdatepickerSingle=function(){function e(e){var t=this;registerInstance(this,e);this.bdsDateSelected=createEvent(this,"bdsDateSelected",7);this.monthActivated=THIS_DAY.getMonth();this.yearActivated=THIS_DAY.getFullYear();this.animatePrev=false;this.animateNext=false;this.openSelectMonth=false;this.openSelectYear=false;this.loadingSlide="await";this.endDate=dateToDayList(defaultEndDate);this.startDate=dateToDayList(defaultStartDate);this.dateSelect=null;this.language="pt_BR";this.handler=function(e,i){var a=e.detail.value;if(i=="months"){t.monthActivated=a}else{if(a==t.endDate.year)t.monthActivated=0;if(a==t.startDate.year)t.monthActivated=t.startDate.month;t.yearActivated=a}};this.openDateSelect=function(e,i){if(i=="months"){setTimeout((function(){t.openSelectMonth=e}),100)}else{setTimeout((function(){t.openSelectYear=e}),100)}}}e.prototype.clear=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.dateSelect=null;return[2]}))}))};e.prototype.dateSelectChanged=function(){var e;this.monthActivated=this.dateSelect?(e=this.dateSelect)===null||e===void 0?void 0:e.getMonth():this.startDate.month;this.yearActivated=this.dateSelect?this.dateSelect.getFullYear():this.startDate.year};e.prototype.periodToSelectChanged=function(e,t){var i=fillDayList(t);var a=fillDayList(e);if(a!=i){this.monthActivated=this.startDate.month;this.yearActivated=this.startDate.year}};e.prototype.componentWillLoad=function(){if(this.startDate){this.monthActivated=this.startDate.month;this.yearActivated=this.startDate.year}};e.prototype.componentWillRender=function(){this.week=Object.values(weekDays(this.language));this.monthsSlide=getMonthsSlide(this.yearActivated,this.monthActivated);this.years=getYears(this.yearActivated,this.startDate.year,this.endDate.year);this.months=getMonths(this.yearActivated,this.startDate,this.endDate,changeMonths(this.language))};e.prototype.prevDays=function(e){var t=[];for(var i=0;i<e;i++){t.push(i)}return t.map((function(e){return h("span",{key:"id".concat(e),class:"space ".concat(e)})}))};e.prototype.selectDate=function(e){var t=new Date(e.year,e.month,e.date);this.bdsDateSelected.emit({value:t})};e.prototype.prevMonth=function(){var e=this;this.animatePrev=true;if(this.loadingSlide!="pendding"){this.loadingSlide="pendding";setTimeout((function(){e.animatePrev=false;e.monthActivated=e.monthActivated-1;if(e.monthActivated<0){e.monthActivated=11;e.yearActivated=e.yearActivated-1}e.loadingSlide="success"}),300)}else{return}};e.prototype.nextMonth=function(){var e=this;this.animateNext=true;if(this.loadingSlide!="pendding"){this.loadingSlide="pendding";setTimeout((function(){e.animateNext=false;e.monthActivated=e.monthActivated+1;if(e.monthActivated>11){e.monthActivated=0;e.yearActivated=e.yearActivated+1}e.loadingSlide="success"}),300)}else{return}};e.prototype.checkCurrentDay=function(e){var t=fillDate(THIS_DAY);if(fillDayList(e)==t)return true;else return false};e.prototype.checkDisableDay=function(e){var t=this.startDate?fillDayList(this.startDate):"0";var i=this.endDate?fillDayList(this.endDate):"9999999";if(this.startDate&&fillDayList(e)<t){return true}if(this.endDate&&fillDayList(e)>i){return true}};e.prototype.checkSelectedDay=function(e){var t=this.dateSelect?fillDate(this.dateSelect):"0";if(fillDayList(e)==t)return true;else return false};e.prototype.renderSelectData=function(e,t,i){var a,r;var n=this;var o;var s=i=="months"?this.openSelectMonth:this.openSelectYear;var d=e.filter((function(e){return e.value===t}));var c=s?"arrow-up":"arrow-down";return h("div",{class:(a={datepicker__calendar__selectDate__select:true},a["datepicker__calendar__selectDate__select__".concat(i)]=true,a)},h("button",{onFocus:function(){return e.length>1&&n.openDateSelect(true,i)},onBlur:function(){return e.length>1&&n.openDateSelect(false,i)},class:(r={datepicker__calendar__selectDate__select__input:true,datepicker__calendar__selectDate__select__input__disable:e.length<=1},r["input--pressed"]=s,r)},h("bds-typo",{variant:"fs-14"},(o=d[0])===null||o===void 0?void 0:o.label),h("div",{class:"icon-arrow"},h("bds-icon",{size:"small",name:c,color:"inherit"}))),h("div",{class:{datepicker__calendar__selectDate__select__options:true,"datepicker__calendar__selectDate__select__options--open":s}},e.map((function(e){return h("bds-select-option",{value:e.value,key:e.value,onOptionSelected:function(e){return n.handler(e,i)},selected:e.value==t,onClick:function(){return n.openDateSelect(false,i)}},e.label)}))))};e.prototype.renderCarSlideBox=function(e,t){var i=this;return h("div",{class:{datepicker__calendar__car__slide__box:true}},this.prevDays(t),e.map((function(e,t){return h("div",{key:t,class:{datepicker__calendar__car__slide__box__day:true}},h("bds-typo",{class:{datepicker__calendar__car__slide__box__day__typo:true,datepicker__calendar__car__slide__box__day__current:i.checkCurrentDay(e),datepicker__calendar__car__slide__box__day__selected:i.checkSelectedDay(e),datepicker__calendar__car__slide__box__day__disable:i.checkDisableDay(e)},onClick:function(){return i.selectDate(e)}},e.date))})))};e.prototype.render=function(){var e,t;var i=this;return h("div",{class:{datepicker__calendar:true}},h("div",{class:{datepicker__calendar__selectDate:true}},h("bds-icon",{class:(e={},e["arrow-left"]=true,e["arrow-left__disable"]=fillDayList(this.monthsSlide[0].days[this.monthsSlide[0].days.length-1])<fillDayList(this.startDate),e.datepicker__calendar__selectDate__icon=true,e),name:"arrow-left",theme:"outline",size:"small",onClick:function(){return i.prevMonth()}}),[this.renderSelectData(this.months,this.monthActivated,"months"),this.renderSelectData(this.years,this.yearActivated,"years")],h("bds-icon",{class:(t={},t["arrow-right"]=true,t["arrow-right__disable"]=fillDayList(this.monthsSlide[2].days[0])>fillDayList(this.endDate),t.datepicker__calendar__selectDate__icon=true,t),name:"arrow-right",theme:"outline",size:"small",onClick:function(){return i.nextMonth()}})),h("div",null,h("div",{class:{datepicker__calendar__week:true}},this.week.map((function(e,t){return h("bds-typo",{key:t,class:"datepicker__calendar__week__day"},e.charAt(0))}))),h("div",{class:{datepicker__calendar__car:true}},h("div",{class:{datepicker__calendar__car__slide:true,animate__prev:this.animatePrev,animate__next:this.animateNext}},[this.renderCarSlideBox(this.monthsSlide[0].days,this.monthsSlide[0].days[0].day),this.renderCarSlideBox(this.monthsSlide[1].days,this.monthsSlide[1].days[0].day),this.renderCarSlideBox(this.monthsSlide[2].days,this.monthsSlide[2].days[0].day)]))))};Object.defineProperty(e,"watchers",{get:function(){return{dateSelect:["dateSelectChanged"],endDate:["periodToSelectChanged"],startDate:["periodToSelectChanged"]}},enumerable:false,configurable:true});return e}();BdsdatepickerSingle.style=datepickerCss;export{BdsdatepickerPeriod as bds_datepicker_period,BdsdatepickerSingle as bds_datepicker_single};
|