blip-ds 1.201.0 → 1.202.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/bds-select-chips.entry.js +265 -74
- package/dist/blip-ds/bds-select-chips.system.entry.js +1 -1
- package/dist/blip-ds/bds-select.entry.js +1 -1
- package/dist/blip-ds/bds-select.system.entry.js +1 -1
- package/dist/blip-ds/bds-toast-container.entry.js +1 -1
- package/dist/blip-ds/bds-toast-container.system.entry.js +1 -1
- package/dist/blip-ds/bds-toast.entry.js +7 -7
- package/dist/blip-ds/bds-toast.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-06d5606e.entry.js +1 -0
- package/dist/blip-ds/p-1b6a0428.system.entry.js +1 -0
- package/dist/blip-ds/p-32e29cd9.entry.js +1 -0
- package/dist/blip-ds/{p-26948cb3.entry.js → p-3e7cb1f9.entry.js} +1 -1
- package/dist/blip-ds/p-46f80af1.system.entry.js +1 -0
- package/dist/blip-ds/{p-23579134.system.entry.js → p-4dc7dc90.system.entry.js} +1 -1
- package/dist/blip-ds/{p-8a0d4846.entry.js → p-90d3a248.entry.js} +1 -1
- 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-0bda1304.system.entry.js → p-bce9dee0.system.entry.js} +1 -1
- package/dist/blip-ds/p-c6e9ed4d.system.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/bds-select-chips.cjs.entry.js +265 -74
- package/dist/cjs/bds-select.cjs.entry.js +1 -1
- package/dist/cjs/bds-toast-container.cjs.entry.js +1 -1
- package/dist/cjs/bds-toast.cjs.entry.js +7 -7
- 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/collection/components/selects/select-chips/select-chips.js +527 -96
- package/dist/collection/components/selects/select.css +15 -0
- package/dist/collection/components/toast/toast.css +6 -15
- package/dist/collection/components/toast/toast.js +7 -7
- package/dist/collection/components/toast-container/toast-container.css +8 -8
- 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/bds-select-chips.entry.js +265 -74
- package/dist/esm/bds-select.entry.js +1 -1
- package/dist/esm/bds-toast-container.entry.js +1 -1
- package/dist/esm/bds-toast.entry.js +7 -7
- 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/bds-select-chips.entry.js +1 -1
- package/dist/esm-es5/bds-select.entry.js +1 -1
- package/dist/esm-es5/bds-toast-container.entry.js +1 -1
- package/dist/esm-es5/bds-toast.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/selects/select-chips/select-chips.d.ts +105 -27
- package/dist/types/components/toast/toast.d.ts +1 -1
- package/dist/types/components.d.ts +77 -2
- 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-239ad9f4.entry.js +0 -1
- package/dist/blip-ds/p-79bda704.entry.js +0 -1
- package/dist/blip-ds/p-a4c3aa6b.entry.js +0 -1
- package/dist/blip-ds/p-b19c1b52.system.entry.js +0 -1
- package/dist/blip-ds/p-f1c47094.system.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
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-5599f73d.js');
|
|
6
|
+
const validations = require('./validations-431d75ca.js');
|
|
6
7
|
|
|
7
|
-
const selectCss = ".sc-bds-select-chips-h{display:block}.element_input.sc-bds-select-chips{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%}.element_input.sc-bds-select-chips input.sc-bds-select-chips{-webkit-box-shadow:inherit;box-shadow:inherit}.element_input.sc-bds-select-chips input.sc-bds-select-chips::-webkit-input-placeholder{color:#b9cbd3;opacity:1}.element_input.sc-bds-select-chips input.sc-bds-select-chips::-moz-placeholder{color:#b9cbd3;opacity:1}.element_input.sc-bds-select-chips input.sc-bds-select-chips:-ms-input-placeholder{color:#b9cbd3;opacity:1}.element_input.sc-bds-select-chips input.sc-bds-select-chips::-ms-input-placeholder{color:#b9cbd3;opacity:1}.element_input.sc-bds-select-chips input.sc-bds-select-chips::placeholder{color:#b9cbd3;opacity:1}.element_input.sc-bds-select-chips input.sc-bds-select-chips::-webkit-input-placeholder{color:#b9cbd3;opacity:1}.input.sc-bds-select-chips{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.sc-bds-select-chips{border:1px solid #d2dfe6;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px}.input--state-primary.sc-bds-select-chips:hover{border:1px solid #3f7de8;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px}.input--state-primary.input--pressed.sc-bds-select-chips{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.sc-bds-select-chips .input__icon.sc-bds-select-chips{color:#3f7de8;background-color:#e8f2ff}.input--state-primary.sc-bds-select-chips .input__container__label.sc-bds-select-chips{color:#8ca0b3}.input--state-primary.sc-bds-select-chips .input__container__label--pressed.sc-bds-select-chips{color:#3f7de8}.input--state-primary.sc-bds-select-chips .input__container__text.sc-bds-select-chips{caret-color:#3f7de8;color:#202c44}.input--state-danger.sc-bds-select-chips{border:1px solid #ff4c4c;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px}.input--state-danger.sc-bds-select-chips:hover{border:1px solid #ff4c4c;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px}.input--state-danger.input--pressed.sc-bds-select-chips{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.sc-bds-select-chips .input__icon.sc-bds-select-chips{color:#ff4c4c;background-color:#ffa5a5}.input--state-danger.sc-bds-select-chips .input__container__label.sc-bds-select-chips{color:#8ca0b3}.input--state-danger.sc-bds-select-chips .input__container__label--pressed.sc-bds-select-chips{color:#ff4c4c}.input--state-danger.sc-bds-select-chips .input__container__text.sc-bds-select-chips{caret-color:#ff4c4c;color:#202c44}.input--state-disabled.sc-bds-select-chips{cursor:not-allowed;border:1px solid #e7edf4;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px;background:#f3f6fa}.input--state-disabled.sc-bds-select-chips: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.sc-bds-select-chips{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.sc-bds-select-chips .input__icon.sc-bds-select-chips{color:#b9cbd3;background-color:#f8fbfb}.input--state-disabled.sc-bds-select-chips .input__container__label.sc-bds-select-chips{color:#b9cbd3}.input--state-disabled.sc-bds-select-chips .input__container__label--pressed.sc-bds-select-chips{color:#b9cbd3}.input--state-disabled.sc-bds-select-chips .input__container__text.sc-bds-select-chips{caret-color:#b9cbd3;color:#b9cbd3}.input--label.sc-bds-select-chips{padding:7px 4px 8px 12px}.input__icon.sc-bds-select-chips{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.sc-bds-select-chips{padding:4px}.input__container.sc-bds-select-chips{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;width:100%}.input__container__wrapper.sc-bds-select-chips{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.input__container__wrapper__chips.sc-bds-select-chips{display:inline;max-height:100px;overflow:auto}.input__container__wrapper__chips.sc-bds-select-chips::-webkit-scrollbar{width:16px;background-color:transparent}.input__container__wrapper__chips.sc-bds-select-chips::-webkit-scrollbar-thumb{border-radius:10px;border:4px solid transparent;border-radius:10px;background-clip:content-box;background-color:#b9cbd3}.input__container__label.sc-bds-select-chips{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.input__container__text.sc-bds-select-chips{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.sc-bds-select-chips:focus{outline:0}.input__container__text.sc-bds-select-chips::-webkit-file-upload-button{padding:0;border:0;background:none}.input__container__text.sc-bds-select-chips:focus{outline:0}.input__container__text[type=checkbox].sc-bds-select-chips,.input__container__text[type=radio].sc-bds-select-chips{width:13px;height:13px}.input__container__text[type=search].sc-bds-select-chips{-webkit-appearance:textfield;-webkit-box-sizing:content-box}.sc-bds-select-chips::-webkit-search-decoration{display:none}.input__container__text[type=reset].sc-bds-select-chips,.input__container__text[type=button].sc-bds-select-chips,.input__container__text[type=submit].sc-bds-select-chips{overflow:visible}.input__container__text.sc-bds-select-chips::-webkit-scrollbar{width:16px;background-color:transparent}.input__container__text.sc-bds-select-chips::-webkit-scrollbar-thumb{border-radius:10px;border:4px solid transparent;border-radius:10px;background-clip:content-box;background-color:#b9cbd3}.input__message.sc-bds-select-chips{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.sc-bds-select-chips bds-typo.sc-bds-select-chips{margin-top:0px;-ms-flex-item-align:self-start;align-self:self-start}.input__message__icon.sc-bds-select-chips{display:-ms-flexbox;display:flex;padding-right:4px;margin-top:0px;padding-top:2px}.input__message--danger.sc-bds-select-chips{color:#ff4c4c}.select.sc-bds-select-chips{position:relative;outline:none}.select__icon.sc-bds-select-chips{color:#8ca0b3;display:-ms-flexbox;display:flex}.select__options.sc-bds-select-chips{background:#f8fbfb;width:100%;max-height:250px;position:absolute;top:99%;left:0;border-radius:8px;-webkit-box-shadow:0px 2px 8px rgba(96, 123, 153, 0.3);box-shadow:0px 2px 8px rgba(96, 123, 153, 0.3);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);visibility:hidden;opacity:0;-webkit-box-shadow:0px 2px 12px 0 2px 8px rgba(96, 123, 153, 0.4);box-shadow:0px 2px 12px 0 2px 8px rgba(96, 123, 153, 0.4)}.select__options.sc-bds-select-chips::-webkit-scrollbar{width:16px;background-color:transparent}.select__options.sc-bds-select-chips::-webkit-scrollbar-thumb{border-radius:10px;border:4px solid transparent;border-radius:10px;background-clip:content-box;background-color:#b9cbd3}.select__options--open.sc-bds-select-chips{visibility:visible;-webkit-transform:scale(1);transform:scale(1);opacity:1}.select__options--position-top.sc-bds-select-chips{top:auto;bottom:100%;-webkit-transform-origin:bottom left;transform-origin:bottom left}";
|
|
8
|
+
const selectCss = ".sc-bds-select-chips-h{display:block}.element_input.sc-bds-select-chips{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%}.element_input.sc-bds-select-chips input.sc-bds-select-chips{-webkit-box-shadow:inherit;box-shadow:inherit}.element_input.sc-bds-select-chips input.sc-bds-select-chips::-webkit-input-placeholder{color:#b9cbd3;opacity:1}.element_input.sc-bds-select-chips input.sc-bds-select-chips::-moz-placeholder{color:#b9cbd3;opacity:1}.element_input.sc-bds-select-chips input.sc-bds-select-chips:-ms-input-placeholder{color:#b9cbd3;opacity:1}.element_input.sc-bds-select-chips input.sc-bds-select-chips::-ms-input-placeholder{color:#b9cbd3;opacity:1}.element_input.sc-bds-select-chips input.sc-bds-select-chips::placeholder{color:#b9cbd3;opacity:1}.element_input.sc-bds-select-chips input.sc-bds-select-chips::-webkit-input-placeholder{color:#b9cbd3;opacity:1}.input.sc-bds-select-chips{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.sc-bds-select-chips{border:1px solid #d2dfe6;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px}.input--state-primary.sc-bds-select-chips:hover{border:1px solid #3f7de8;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px}.input--state-primary.input--pressed.sc-bds-select-chips{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.sc-bds-select-chips .input__icon.sc-bds-select-chips{color:#3f7de8;background-color:#e8f2ff}.input--state-primary.sc-bds-select-chips .input__container__label.sc-bds-select-chips{color:#8ca0b3}.input--state-primary.sc-bds-select-chips .input__container__label--pressed.sc-bds-select-chips{color:#3f7de8}.input--state-primary.sc-bds-select-chips .input__container__text.sc-bds-select-chips{caret-color:#3f7de8;color:#202c44}.input--state-danger.sc-bds-select-chips{border:1px solid #ff4c4c;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px}.input--state-danger.sc-bds-select-chips:hover{border:1px solid #ff4c4c;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px}.input--state-danger.input--pressed.sc-bds-select-chips{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.sc-bds-select-chips .input__icon.sc-bds-select-chips{color:#ff4c4c;background-color:#ffa5a5}.input--state-danger.sc-bds-select-chips .input__container__label.sc-bds-select-chips{color:#8ca0b3}.input--state-danger.sc-bds-select-chips .input__container__label--pressed.sc-bds-select-chips{color:#ff4c4c}.input--state-danger.sc-bds-select-chips .input__container__text.sc-bds-select-chips{caret-color:#ff4c4c;color:#202c44}.input--state-disabled.sc-bds-select-chips{cursor:not-allowed;border:1px solid #e7edf4;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px;background:#f3f6fa}.input--state-disabled.sc-bds-select-chips: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.sc-bds-select-chips{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.sc-bds-select-chips .input__icon.sc-bds-select-chips{color:#b9cbd3;background-color:#f8fbfb}.input--state-disabled.sc-bds-select-chips .input__container__label.sc-bds-select-chips{color:#b9cbd3}.input--state-disabled.sc-bds-select-chips .input__container__label--pressed.sc-bds-select-chips{color:#b9cbd3}.input--state-disabled.sc-bds-select-chips .input__container__text.sc-bds-select-chips{caret-color:#b9cbd3;color:#b9cbd3}.input--label.sc-bds-select-chips{padding:7px 4px 8px 12px}.input__icon.sc-bds-select-chips{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.sc-bds-select-chips{padding:4px}.input__container.sc-bds-select-chips{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;width:100%}.input__container__wrapper.sc-bds-select-chips{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.input__container__wrapper__chips.sc-bds-select-chips{display:inline;max-height:100px;overflow:auto}.input__container__wrapper__chips.sc-bds-select-chips::-webkit-scrollbar{width:16px;background-color:transparent}.input__container__wrapper__chips.sc-bds-select-chips::-webkit-scrollbar-thumb{border-radius:10px;border:4px solid transparent;border-radius:10px;background-clip:content-box;background-color:#b9cbd3}.input__container__label.sc-bds-select-chips{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.input__container__text.sc-bds-select-chips{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.sc-bds-select-chips:focus{outline:0}.input__container__text.sc-bds-select-chips::-webkit-file-upload-button{padding:0;border:0;background:none}.input__container__text.sc-bds-select-chips:focus{outline:0}.input__container__text[type=checkbox].sc-bds-select-chips,.input__container__text[type=radio].sc-bds-select-chips{width:13px;height:13px}.input__container__text[type=search].sc-bds-select-chips{-webkit-appearance:textfield;-webkit-box-sizing:content-box}.sc-bds-select-chips::-webkit-search-decoration{display:none}.input__container__text[type=reset].sc-bds-select-chips,.input__container__text[type=button].sc-bds-select-chips,.input__container__text[type=submit].sc-bds-select-chips{overflow:visible}.input__container__text.sc-bds-select-chips::-webkit-scrollbar{width:16px;background-color:transparent}.input__container__text.sc-bds-select-chips::-webkit-scrollbar-thumb{border-radius:10px;border:4px solid transparent;border-radius:10px;background-clip:content-box;background-color:#b9cbd3}.input__message.sc-bds-select-chips{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.sc-bds-select-chips bds-typo.sc-bds-select-chips{margin-top:0px;-ms-flex-item-align:self-start;align-self:self-start}.input__message__icon.sc-bds-select-chips{display:-ms-flexbox;display:flex;padding-right:4px;margin-top:0px;padding-top:2px}.input__message--danger.sc-bds-select-chips{color:#ff4c4c}.select.sc-bds-select-chips{position:relative;outline:none}.select__icon.sc-bds-select-chips{color:#8ca0b3;display:-ms-flexbox;display:flex}.select__options.sc-bds-select-chips{background:#f8fbfb;width:100%;max-height:250px;position:absolute;top:99%;left:0;border-radius:8px;-webkit-box-shadow:0px 2px 8px rgba(96, 123, 153, 0.3);box-shadow:0px 2px 8px rgba(96, 123, 153, 0.3);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);visibility:hidden;opacity:0;-webkit-box-shadow:0px 2px 12px 0 2px 8px rgba(96, 123, 153, 0.4);box-shadow:0px 2px 12px 0 2px 8px rgba(96, 123, 153, 0.4)}.select__options.sc-bds-select-chips::-webkit-scrollbar{width:16px;background-color:transparent}.select__options.sc-bds-select-chips::-webkit-scrollbar-thumb{border-radius:10px;border:4px solid transparent;border-radius:10px;background-clip:content-box;background-color:#b9cbd3}.select__options--open.sc-bds-select-chips{visibility:visible;-webkit-transform:scale(1);transform:scale(1);opacity:1}.select__options--position-top.sc-bds-select-chips{top:auto;bottom:100%;-webkit-transform-origin:bottom left;transform-origin:bottom left}.inside-input-left.sc-bds-select-chips{display:-ms-inline-flexbox;display:inline-flex;gap:8px;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-right:8px}.input-chips__chip.sc-bds-select-chips{margin:2px 4px 2px 0px}.input-chips__chips.sc-bds-select-chips{-ms-flex:1;flex:1}";
|
|
8
9
|
|
|
9
10
|
const SelectChips = class {
|
|
10
11
|
constructor(hostRef) {
|
|
@@ -13,7 +14,23 @@ const SelectChips = class {
|
|
|
13
14
|
this.bdsCancel = index.createEvent(this, "bdsCancel", 7);
|
|
14
15
|
this.bdsFocus = index.createEvent(this, "bdsFocus", 7);
|
|
15
16
|
this.bdsBlur = index.createEvent(this, "bdsBlur", 7);
|
|
17
|
+
this.bdsChangeChips = index.createEvent(this, "bdsChangeChips", 7);
|
|
18
|
+
this.bdsSelectChipsInput = index.createEvent(this, "bdsSelectChipsInput", 7);
|
|
19
|
+
this.bdsSubmit = index.createEvent(this, "bdsSubmit", 7);
|
|
16
20
|
this.isOpen = false;
|
|
21
|
+
/**
|
|
22
|
+
* Used to set the danger behavior by the internal validators
|
|
23
|
+
*/
|
|
24
|
+
this.validationDanger = false;
|
|
25
|
+
/**
|
|
26
|
+
* Conditions the element to say whether it is pressed or not, to add styles.
|
|
27
|
+
*/
|
|
28
|
+
this.isPressed = false;
|
|
29
|
+
/**
|
|
30
|
+
* Used to set the error message setted by the internal validators
|
|
31
|
+
*/
|
|
32
|
+
this.validationMesage = '';
|
|
33
|
+
this.internalChips = [];
|
|
17
34
|
/**
|
|
18
35
|
* The options of the select
|
|
19
36
|
* Should be passed this way:
|
|
@@ -47,10 +64,6 @@ const SelectChips = class {
|
|
|
47
64
|
* Disabled input.
|
|
48
65
|
*/
|
|
49
66
|
this.disabled = false;
|
|
50
|
-
/**
|
|
51
|
-
* Data test is the prop to specifically test the component action object.
|
|
52
|
-
*/
|
|
53
|
-
this.dataTest = null;
|
|
54
67
|
/**
|
|
55
68
|
* label in input, with he the input size increases.
|
|
56
69
|
*/
|
|
@@ -71,11 +84,37 @@ const SelectChips = class {
|
|
|
71
84
|
* Specify if is possible to create a new tag that is not on the options.
|
|
72
85
|
*/
|
|
73
86
|
this.notFoundMessage = 'No results found';
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
87
|
+
/**
|
|
88
|
+
* Defining the type is important so that it is possible to carry out validations. Can be one of:
|
|
89
|
+
* 'text' and 'email;
|
|
90
|
+
*/
|
|
91
|
+
this.type = 'text';
|
|
92
|
+
/**
|
|
93
|
+
* The delimiter is used to add multiple chips in the same string.
|
|
94
|
+
*/
|
|
95
|
+
this.delimiters = /,|;/;
|
|
96
|
+
/**
|
|
97
|
+
* If `true`, the user cannot modify the value.
|
|
98
|
+
*/
|
|
99
|
+
this.disableSubmit = false;
|
|
100
|
+
/**
|
|
101
|
+
* Indicated to pass a help the user in complex filling.
|
|
102
|
+
*/
|
|
103
|
+
this.helperMessage = '';
|
|
104
|
+
/**
|
|
105
|
+
* Prop to insert the name of the input
|
|
106
|
+
*/
|
|
107
|
+
this.inputName = '';
|
|
108
|
+
/**
|
|
109
|
+
* A tip for the user who can enter no controls.
|
|
110
|
+
*/
|
|
111
|
+
this.placeholder = '';
|
|
112
|
+
/**
|
|
113
|
+
* Data test is the prop to specifically test the component action object.
|
|
114
|
+
*/
|
|
115
|
+
this.dataTest = null;
|
|
116
|
+
this.handleChangeChipsValue = async () => {
|
|
117
|
+
await this.resetFilterOptions();
|
|
79
118
|
};
|
|
80
119
|
this.toggle = () => {
|
|
81
120
|
if (!this.disabled) {
|
|
@@ -86,6 +125,15 @@ const SelectChips = class {
|
|
|
86
125
|
const { detail: { value }, } = event;
|
|
87
126
|
const text = this.getText(value);
|
|
88
127
|
await this.addChip(text);
|
|
128
|
+
this.toggle();
|
|
129
|
+
};
|
|
130
|
+
this.handlerNewOption = async (text) => {
|
|
131
|
+
await this.addChip(text);
|
|
132
|
+
this.toggle();
|
|
133
|
+
};
|
|
134
|
+
this.getText = (value) => {
|
|
135
|
+
const el = this.childOptions.find((option) => option.value === value);
|
|
136
|
+
return this.getTextFromOption(el);
|
|
89
137
|
};
|
|
90
138
|
this.getTextFromOption = (opt) => {
|
|
91
139
|
var _a, _b;
|
|
@@ -100,48 +148,47 @@ const SelectChips = class {
|
|
|
100
148
|
}
|
|
101
149
|
return (opt === null || opt === void 0 ? void 0 : opt.titleText) ? opt.titleText : (_b = (_a = opt === null || opt === void 0 ? void 0 : opt.textContent) === null || _a === void 0 ? void 0 : _a.trim()) !== null && _b !== void 0 ? _b : '';
|
|
102
150
|
};
|
|
103
|
-
this.
|
|
104
|
-
|
|
105
|
-
|
|
151
|
+
this.setFocusWrapper = () => {
|
|
152
|
+
if (this.nativeInput) {
|
|
153
|
+
this.nativeInput.focus();
|
|
154
|
+
}
|
|
106
155
|
};
|
|
107
|
-
this.
|
|
108
|
-
|
|
156
|
+
this.removeFocusWrapper = () => {
|
|
157
|
+
this.nativeInput.blur();
|
|
109
158
|
};
|
|
110
|
-
this.
|
|
159
|
+
this.onClickWrapper = () => {
|
|
160
|
+
this.onFocus();
|
|
111
161
|
if (this.nativeInput) {
|
|
112
|
-
this.nativeInput.
|
|
162
|
+
this.nativeInput.focus();
|
|
113
163
|
}
|
|
114
164
|
};
|
|
115
|
-
this.
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
165
|
+
this.onFocus = () => {
|
|
166
|
+
this.bdsFocus.emit();
|
|
167
|
+
this.isPressed = true;
|
|
168
|
+
};
|
|
169
|
+
this.onInput = (ev) => {
|
|
170
|
+
const input = ev.target;
|
|
171
|
+
if (input) {
|
|
172
|
+
this.value = input.value || '';
|
|
119
173
|
}
|
|
174
|
+
this.bdsSelectChipsInput.emit(ev);
|
|
120
175
|
};
|
|
121
176
|
this.keyPressWrapper = (event) => {
|
|
122
|
-
const isSelectElement = event.target.localName === 'bds-select';
|
|
123
|
-
const isInputElement = event.target.localName === 'bds-input-chips';
|
|
124
177
|
switch (event.key) {
|
|
125
178
|
case 'Enter':
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
this.
|
|
134
|
-
}
|
|
135
|
-
this.nativeInput.value = '';
|
|
136
|
-
if (!this.isOpen && (isSelectElement || isInputElement)) {
|
|
137
|
-
this.toggle();
|
|
179
|
+
this.setChip(this.value);
|
|
180
|
+
this.value = '';
|
|
181
|
+
break;
|
|
182
|
+
case 'Backspace' || 'Delete':
|
|
183
|
+
if ((this.value === null || this.value.length <= 0) && this.internalChips.length) {
|
|
184
|
+
this.removeLastChip();
|
|
185
|
+
this.handleChangeChipsValue;
|
|
186
|
+
this.bdsChangeChips.emit({ data: this.internalChips });
|
|
138
187
|
}
|
|
139
188
|
break;
|
|
140
189
|
}
|
|
141
190
|
};
|
|
142
191
|
this.changedInputValue = async () => {
|
|
143
|
-
// console.log('TRACE [select-chips] changedInputValue:', { nativeInput: this.nativeInput.value, value: this.value });
|
|
144
|
-
// Update this.value for trigger render componente, same two-way binding
|
|
145
192
|
this.value = this.nativeInput.value;
|
|
146
193
|
if (this.nativeInput.value) {
|
|
147
194
|
await this.filterOptions(this.nativeInput.value);
|
|
@@ -153,70 +200,89 @@ const SelectChips = class {
|
|
|
153
200
|
this.isOpen = true;
|
|
154
201
|
}
|
|
155
202
|
};
|
|
156
|
-
this.handleChangeChipsValue = async () => {
|
|
157
|
-
// console.log('TRACE [select-chips] handleChangeChipsValue 1:', { chips: this.nativeInput.chips });
|
|
158
|
-
this.nativeInput.value = '';
|
|
159
|
-
await this.resetFilterOptions();
|
|
160
|
-
};
|
|
161
203
|
}
|
|
162
204
|
handleWindow(ev) {
|
|
163
205
|
if (!this.el.contains(ev.target)) {
|
|
164
206
|
this.isOpen = false;
|
|
165
207
|
}
|
|
166
208
|
}
|
|
209
|
+
/**
|
|
210
|
+
* Call change event before alter chips values.
|
|
211
|
+
*/
|
|
212
|
+
valueChanged() {
|
|
213
|
+
if (this.chips) {
|
|
214
|
+
if (typeof this.chips === 'string') {
|
|
215
|
+
try {
|
|
216
|
+
this.internalChips = JSON.parse(this.chips);
|
|
217
|
+
}
|
|
218
|
+
catch (_a) {
|
|
219
|
+
this.internalChips = [];
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
else {
|
|
223
|
+
this.internalChips = this.chips;
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
else {
|
|
227
|
+
this.internalChips = [];
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
internalValueChanged() {
|
|
231
|
+
this.handleChangeChipsValue();
|
|
232
|
+
this.bdsChangeChips.emit({ data: this.internalChips, value: this.getLastChip() });
|
|
233
|
+
}
|
|
167
234
|
/**
|
|
168
235
|
* Return the validity of the input chips.
|
|
169
236
|
*/
|
|
170
237
|
async isValid() {
|
|
171
|
-
return this.
|
|
238
|
+
return this.validateChips();
|
|
172
239
|
}
|
|
173
240
|
/**
|
|
174
|
-
* Return the
|
|
241
|
+
* Return the chips
|
|
175
242
|
*/
|
|
176
243
|
async getChips() {
|
|
177
|
-
return
|
|
244
|
+
return this.internalChips;
|
|
178
245
|
}
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
this.internalOptions = [];
|
|
186
|
-
}
|
|
187
|
-
}
|
|
246
|
+
/**
|
|
247
|
+
* Clear all chips
|
|
248
|
+
*/
|
|
249
|
+
async clear() {
|
|
250
|
+
this.internalChips = [];
|
|
251
|
+
this.value = '';
|
|
188
252
|
}
|
|
189
|
-
async
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
253
|
+
async add(value) {
|
|
254
|
+
this.setChip(value);
|
|
255
|
+
}
|
|
256
|
+
async setFocus() {
|
|
257
|
+
this.nativeInput.focus();
|
|
258
|
+
}
|
|
259
|
+
async removeFocus() {
|
|
260
|
+
this.nativeInput.blur();
|
|
261
|
+
}
|
|
262
|
+
componentWillLoad() {
|
|
263
|
+
this.valueChanged();
|
|
193
264
|
}
|
|
194
265
|
async componentDidLoad() {
|
|
195
266
|
await this.resetFilterOptions();
|
|
196
267
|
}
|
|
197
|
-
|
|
198
|
-
|
|
268
|
+
async connectedCallback() {
|
|
269
|
+
for (const option of this.childOptions) {
|
|
270
|
+
option.addEventListener('optionSelected', this.handler);
|
|
271
|
+
}
|
|
199
272
|
}
|
|
200
273
|
get childOptionsEnabled() {
|
|
201
274
|
return Array.from(this.el.querySelectorAll('bds-select-option:not([invisible]):not(#option-add):not(#no-option)'));
|
|
202
275
|
}
|
|
203
|
-
|
|
204
|
-
return
|
|
205
|
-
}
|
|
206
|
-
async addChip(chip) {
|
|
207
|
-
await this.nativeInput.add(chip);
|
|
208
|
-
this.nativeInput.value = '';
|
|
209
|
-
this.toggle();
|
|
276
|
+
get childOptions() {
|
|
277
|
+
return Array.from(this.el.querySelectorAll('bds-select-option:not(#option-add):not(#no-option)'));
|
|
210
278
|
}
|
|
211
279
|
async filterOptions(term) {
|
|
212
|
-
// console.log('TRACE [select-chips] filterOptions 1:', { term, childOptions: this.childOptions });
|
|
213
280
|
if (!term) {
|
|
214
281
|
await this.resetFilterOptions();
|
|
215
282
|
return;
|
|
216
283
|
}
|
|
217
284
|
for (const option of this.childOptions) {
|
|
218
|
-
|
|
219
|
-
const isExistsChip = this.existsChip(option.textContent, await this.nativeInput.get());
|
|
285
|
+
const isExistsChip = this.existsChip(option.textContent, await this.getChips());
|
|
220
286
|
const optionTextLower = option.textContent.toLowerCase();
|
|
221
287
|
const termLower = term.toLowerCase();
|
|
222
288
|
if (isExistsChip) {
|
|
@@ -231,9 +297,10 @@ const SelectChips = class {
|
|
|
231
297
|
}
|
|
232
298
|
}
|
|
233
299
|
async resetFilterOptions() {
|
|
300
|
+
var _a;
|
|
234
301
|
for (const option of this.childOptions) {
|
|
235
|
-
const optionText = option.querySelector('bds-typo').textContent;
|
|
236
|
-
if (this.existsChip(optionText, await this.
|
|
302
|
+
const optionText = (_a = option.querySelector('bds-typo')) === null || _a === void 0 ? void 0 : _a.textContent;
|
|
303
|
+
if (this.existsChip(optionText, await this.getChips())) {
|
|
237
304
|
option.setAttribute('invisible', 'invisible');
|
|
238
305
|
}
|
|
239
306
|
else {
|
|
@@ -244,12 +311,125 @@ const SelectChips = class {
|
|
|
244
311
|
existsChip(optionChip, chips) {
|
|
245
312
|
return chips.some((chip) => optionChip === chip);
|
|
246
313
|
}
|
|
314
|
+
enableCreateOption() {
|
|
315
|
+
return !!(this.childOptionsEnabled.length === 0 && this.nativeInput && this.nativeInput.value);
|
|
316
|
+
}
|
|
317
|
+
async addChip(chip) {
|
|
318
|
+
await this.setChip(chip);
|
|
319
|
+
this.nativeInput.value = '';
|
|
320
|
+
}
|
|
321
|
+
validateChips() {
|
|
322
|
+
if (this.type === 'email') {
|
|
323
|
+
return !this.internalChips.some((chip) => !this.validateChip(chip));
|
|
324
|
+
}
|
|
325
|
+
else {
|
|
326
|
+
return true;
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
handleOnBlur() {
|
|
330
|
+
this.bdsBlur.emit();
|
|
331
|
+
this.isPressed = false;
|
|
332
|
+
}
|
|
333
|
+
getLastChip() {
|
|
334
|
+
return this.internalChips[this.internalChips.length - 1];
|
|
335
|
+
}
|
|
336
|
+
verifyAndSubstituteDelimiters(value) {
|
|
337
|
+
if (value.length === 1 && value[0].match(this.delimiters)) {
|
|
338
|
+
return '';
|
|
339
|
+
}
|
|
340
|
+
let newValue = value.replace(/;/g, ',').replace(/\,+|;+/g, ',');
|
|
341
|
+
if (newValue[0].match(this.delimiters)) {
|
|
342
|
+
newValue = newValue.substring(1);
|
|
343
|
+
}
|
|
344
|
+
return newValue;
|
|
345
|
+
}
|
|
346
|
+
async handleChange(event) {
|
|
347
|
+
this.changedInputValue;
|
|
348
|
+
const { detail: { value }, } = event;
|
|
349
|
+
this.value = value ? value.trim() : '';
|
|
350
|
+
if (value.length === 0)
|
|
351
|
+
return;
|
|
352
|
+
const existTerm = value.match(this.delimiters);
|
|
353
|
+
if (!existTerm)
|
|
354
|
+
return;
|
|
355
|
+
const newValue = this.verifyAndSubstituteDelimiters(value);
|
|
356
|
+
if (!newValue) {
|
|
357
|
+
this.clearInputValues();
|
|
358
|
+
return;
|
|
359
|
+
}
|
|
360
|
+
const words = newValue.split(this.delimiters);
|
|
361
|
+
words.forEach((word) => {
|
|
362
|
+
this.setChip(word);
|
|
363
|
+
});
|
|
364
|
+
this.clearInputValues();
|
|
365
|
+
}
|
|
366
|
+
clearInputValues(value = '') {
|
|
367
|
+
this.nativeInput.value = value;
|
|
368
|
+
this.value = value;
|
|
369
|
+
}
|
|
370
|
+
setChip(name) {
|
|
371
|
+
if (!this.duplicated) {
|
|
372
|
+
const exists = this.internalChips.some((chip) => chip.toLowerCase() === name.toLowerCase());
|
|
373
|
+
if (exists)
|
|
374
|
+
return;
|
|
375
|
+
}
|
|
376
|
+
if (!validations.whitespaceValidation(name)) {
|
|
377
|
+
return;
|
|
378
|
+
}
|
|
379
|
+
this.internalChips = [...this.internalChips, name];
|
|
380
|
+
}
|
|
381
|
+
validateChip(name) {
|
|
382
|
+
const trimmedName = name.trim();
|
|
383
|
+
if (this.type === 'email' && validations.emailValidation(trimmedName)) {
|
|
384
|
+
return false;
|
|
385
|
+
}
|
|
386
|
+
return true;
|
|
387
|
+
}
|
|
388
|
+
removeLastChip() {
|
|
389
|
+
this.internalChips = this.internalChips.slice(0, this.internalChips.length - 1);
|
|
390
|
+
}
|
|
391
|
+
removeChip(event) {
|
|
392
|
+
const { detail: { id }, } = event;
|
|
393
|
+
this.internalChips = this.internalChips.filter((_chip, index) => index.toString() !== id);
|
|
394
|
+
}
|
|
395
|
+
renderChips() {
|
|
396
|
+
if (!this.internalChips.length) {
|
|
397
|
+
return [];
|
|
398
|
+
}
|
|
399
|
+
return this.internalChips.map((chip, index$1) => {
|
|
400
|
+
const id = index$1.toString();
|
|
401
|
+
return (index.h("bds-chip-clickable", { id: id, key: id, color: "default", close: !this.disabled, onChipClickableClose: (event) => this.removeChip(event) }, chip));
|
|
402
|
+
});
|
|
403
|
+
}
|
|
404
|
+
renderIcon() {
|
|
405
|
+
return (this.icon && (index.h("div", { class: {
|
|
406
|
+
input__icon: true,
|
|
407
|
+
'input__icon--large': !!this.label,
|
|
408
|
+
} }, index.h("bds-icon", { size: this.label ? 'medium' : 'small', name: this.icon, color: "inherit" }))));
|
|
409
|
+
}
|
|
410
|
+
renderLabel() {
|
|
411
|
+
return (this.label && (index.h("label", { class: {
|
|
412
|
+
input__container__label: true,
|
|
413
|
+
'input__container__label--pressed': this.isPressed && !this.disabled,
|
|
414
|
+
} }, index.h("bds-typo", { variant: "fs-12", bold: "bold" }, this.label))));
|
|
415
|
+
}
|
|
416
|
+
renderMessage() {
|
|
417
|
+
const icon = this.danger ? 'error' : 'info';
|
|
418
|
+
let message = this.danger ? this.errorMessage : this.helperMessage;
|
|
419
|
+
if (!message && this.validationDanger)
|
|
420
|
+
message = this.validationMesage;
|
|
421
|
+
const styles = this.danger || this.validationDanger ? 'input__message input__message--danger' : 'input__message';
|
|
422
|
+
if (message) {
|
|
423
|
+
return (index.h("div", { class: styles, part: "input__message" }, index.h("div", { class: "input__message__icon" }, index.h("bds-icon", { size: "x-small", name: icon, theme: "solid", color: "inherit" })), index.h("bds-typo", { variant: "fs-12" }, message)));
|
|
424
|
+
}
|
|
425
|
+
return undefined;
|
|
426
|
+
}
|
|
247
427
|
generateKey(value) {
|
|
248
428
|
return value.toLowerCase().replace(/ /g, '-');
|
|
249
429
|
}
|
|
250
430
|
render() {
|
|
251
|
-
// console.log('TRACE [select-chips] render', this.childOptions);
|
|
252
431
|
const iconArrow = this.isOpen ? 'arrow-up' : 'arrow-down';
|
|
432
|
+
const isPressed = this.isPressed && !this.disabled;
|
|
253
433
|
let internalOptions = [];
|
|
254
434
|
if (this.options) {
|
|
255
435
|
if (typeof this.options === 'string') {
|
|
@@ -262,12 +442,23 @@ const SelectChips = class {
|
|
|
262
442
|
internalOptions = this.options;
|
|
263
443
|
}
|
|
264
444
|
}
|
|
265
|
-
return (index.h("div", { class: "select", tabindex: "0", onFocus: this.setFocusWrapper, onBlur: this.removeFocusWrapper, onKeyPress: this.keyPressWrapper }, index.h("
|
|
445
|
+
return (index.h("div", { class: "select", tabindex: "0", onFocus: this.setFocusWrapper, onBlur: this.removeFocusWrapper, onKeyPress: this.keyPressWrapper }, index.h("div", { class: { element_input: true }, "aria-disabled": this.disabled ? 'true' : null, onClick: this.toggle }, index.h("div", { class: {
|
|
446
|
+
input: true,
|
|
447
|
+
'input--state-primary': !this.danger && !this.validationDanger,
|
|
448
|
+
'input--state-danger': this.danger || this.validationDanger,
|
|
449
|
+
'input--state-disabled': this.disabled,
|
|
450
|
+
'input--label': !!this.label,
|
|
451
|
+
'input--pressed': isPressed,
|
|
452
|
+
}, onClick: this.onClickWrapper, onKeyDown: this.keyPressWrapper }, this.renderIcon(), index.h("div", { class: "input__container" }, this.renderLabel(), index.h("div", { class: { input__container__wrapper: true } }, this.internalChips.length > 0 && index.h("span", { class: "inside-input-left" }, this.renderChips()), index.h("input", { ref: (input) => (this.nativeInput = input), class: { input__container__text: true }, name: this.inputName, maxlength: this.maxlength, placeholder: this.placeholder, onInput: this.onInput, onFocus: this.onFocus, onBlur: () => this.handleOnBlur(), onChange: () => this.handleChange, value: this.value, disabled: this.disabled, "data-test": this.dataTest }))), index.h("div", { class: "select__icon" }, index.h("bds-icon", { size: "small", name: iconArrow, color: "inherit" }))), this.renderMessage()), index.h("div", { class: {
|
|
266
453
|
select__options: true,
|
|
267
454
|
'select__options--open': this.isOpen,
|
|
268
455
|
} }, internalOptions.map((option) => (index.h("bds-select-option", { key: this.generateKey(option.value), onOptionSelected: this.handler, value: option.value, status: option.status }, option.label))), index.h("slot", null), this.canAddNew && this.enableCreateOption() && (index.h("bds-select-option", { id: "option-add", value: "add", onClick: () => this.handlerNewOption(this.nativeInput.value) }, this.newPrefix, this.nativeInput.value)), !this.canAddNew && this.enableCreateOption() && (index.h("bds-select-option", { id: "no-option", value: "add" }, this.notFoundMessage)))));
|
|
269
456
|
}
|
|
270
457
|
get el() { return index.getElement(this); }
|
|
458
|
+
static get watchers() { return {
|
|
459
|
+
"chips": ["valueChanged"],
|
|
460
|
+
"internalChips": ["internalValueChanged"]
|
|
461
|
+
}; }
|
|
271
462
|
};
|
|
272
463
|
SelectChips.style = selectCss;
|
|
273
464
|
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-5599f73d.js');
|
|
6
6
|
|
|
7
|
-
const selectCss = ":host{display:block}.element_input{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%}.element_input input{-webkit-box-shadow:inherit;box-shadow:inherit}.element_input input::-webkit-input-placeholder{color:#b9cbd3;opacity:1}.element_input input::-moz-placeholder{color:#b9cbd3;opacity:1}.element_input input:-ms-input-placeholder{color:#b9cbd3;opacity:1}.element_input input::-ms-input-placeholder{color:#b9cbd3;opacity:1}.element_input input::placeholder{color:#b9cbd3;opacity:1}.element_input input::-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}.select{position:relative;outline:none}.select__icon{color:#8ca0b3;display:-ms-flexbox;display:flex}.select__options{background:#f8fbfb;width:100%;max-height:250px;position:absolute;top:99%;left:0;border-radius:8px;-webkit-box-shadow:0px 2px 8px rgba(96, 123, 153, 0.3);box-shadow:0px 2px 8px rgba(96, 123, 153, 0.3);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);visibility:hidden;opacity:0;-webkit-box-shadow:0px 2px 12px 0 2px 8px rgba(96, 123, 153, 0.4);box-shadow:0px 2px 12px 0 2px 8px rgba(96, 123, 153, 0.4)}.select__options::-webkit-scrollbar{width:16px;background-color:transparent}.select__options::-webkit-scrollbar-thumb{border-radius:10px;border:4px solid transparent;border-radius:10px;background-clip:content-box;background-color:#b9cbd3}.select__options--open{visibility:visible;-webkit-transform:scale(1);transform:scale(1);opacity:1}.select__options--position-top{top:auto;bottom:100%;-webkit-transform-origin:bottom left;transform-origin:bottom left}";
|
|
7
|
+
const selectCss = ":host{display:block}.element_input{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%}.element_input input{-webkit-box-shadow:inherit;box-shadow:inherit}.element_input input::-webkit-input-placeholder{color:#b9cbd3;opacity:1}.element_input input::-moz-placeholder{color:#b9cbd3;opacity:1}.element_input input:-ms-input-placeholder{color:#b9cbd3;opacity:1}.element_input input::-ms-input-placeholder{color:#b9cbd3;opacity:1}.element_input input::placeholder{color:#b9cbd3;opacity:1}.element_input input::-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}.select{position:relative;outline:none}.select__icon{color:#8ca0b3;display:-ms-flexbox;display:flex}.select__options{background:#f8fbfb;width:100%;max-height:250px;position:absolute;top:99%;left:0;border-radius:8px;-webkit-box-shadow:0px 2px 8px rgba(96, 123, 153, 0.3);box-shadow:0px 2px 8px rgba(96, 123, 153, 0.3);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);visibility:hidden;opacity:0;-webkit-box-shadow:0px 2px 12px 0 2px 8px rgba(96, 123, 153, 0.4);box-shadow:0px 2px 12px 0 2px 8px rgba(96, 123, 153, 0.4)}.select__options::-webkit-scrollbar{width:16px;background-color:transparent}.select__options::-webkit-scrollbar-thumb{border-radius:10px;border:4px solid transparent;border-radius:10px;background-clip:content-box;background-color:#b9cbd3}.select__options--open{visibility:visible;-webkit-transform:scale(1);transform:scale(1);opacity:1}.select__options--position-top{top:auto;bottom:100%;-webkit-transform-origin:bottom left;transform-origin:bottom left}.inside-input-left{display:-ms-inline-flexbox;display:inline-flex;gap:8px;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-right:8px}.input-chips__chip{margin:2px 4px 2px 0px}.input-chips__chips{-ms-flex:1;flex:1}";
|
|
8
8
|
|
|
9
9
|
const Select = class {
|
|
10
10
|
constructor(hostRef) {
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-5599f73d.js');
|
|
6
6
|
|
|
7
|
-
const toastContainerCss = ".sc-bds-toast-container-h{position:fixed;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;z-index:110000;width:456px}.bottom-right.sc-bds-toast-container-h{bottom:
|
|
7
|
+
const toastContainerCss = ".sc-bds-toast-container-h{position:fixed;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;z-index:110000;width:456px}.bottom-right.sc-bds-toast-container-h{bottom:48px;right:48px}.bottom-left.sc-bds-toast-container-h{bottom:48px;left:48px}.top-right.sc-bds-toast-container-h{top:24px;right:24px}.top-left.sc-bds-toast-container-h{top:48px;left:48px}@media (max-width: 780px){.sc-bds-toast-container-h{right:0px;left:0px;width:100%}.top-left.sc-bds-toast-container-h,.top-right.sc-bds-toast-container-h{top:20px}.bottom-left.sc-bds-toast-container-h,.bottom-right.sc-bds-toast-container-h{bottom:20px}}";
|
|
8
8
|
|
|
9
9
|
const BdsToastContainer = class {
|
|
10
10
|
constructor(hostRef) {
|
|
@@ -6,7 +6,7 @@ const index = require('./index-5599f73d.js');
|
|
|
6
6
|
|
|
7
7
|
const notificationBallonSvg = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTIiIGhlaWdodD0iNzAiIHZpZXdCb3g9IjAgMCA1MiA3MCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTE3Ljk1NzEgLTJDMTAuMzMwNCAtMiAyLjQzNzczIC0wLjc5NTMwOCAtMi45NzE4NyAyLjM4ODUzQy0xMS43NTE0IDcuNjM3NTUgLTE0LjMyMzIgMTcuODc3NCAtMTMuOTY4NCAyNy4zNDI5Qy0xMy43MDI0IDM1LjUxNzYgLTExLjQ4NTMgNDQuMjk0NyAtNS40NTQ5NiA1MC4zMTgxQzAuMjIwNjkyIDU2LjA4MzQgMTEuOTI2NyA1OC42NjQ5IDE5Ljk5NjggNTguNjY0OUMyMC4zNTE1IDU4LjY2NDkgMjAuNzA2MyA1OC45MjMxIDIwLjcwNjMgNTkuMzUzM1Y2Ny42MTQxQzIwLjcwNjMgNjguMzg4NSAyMS4zMjcgNjkuMDc2OSAyMi4yMTM5IDY5LjA3NjlDMjIuMzAyNSA2OS4wNzY5IDIyLjMwMjUgNjkuMDc2OSAyMi4zOTEyIDY5LjA3NjlDMjIuNzQ1OSA2OS4wNzY5IDIzLjAxMiA2OC45MDQ4IDIzLjE4OTMgNjguNzMyN0MyNy4xOCA2NS4zNzY4IDMxLjI1OTQgNjEuOTM0OCAzNS4xNjE0IDU4LjQ5MjhDMzguODg2MSA1NS4xMzY5IDQzLjE0MjggNTEuNjk0OSA0NS45ODA2IDQ3LjY1MDZDNTIuMDk5NyAzOS4xMzE3IDUzLjA3NTIgMjcuMTcwOCA1MS4wMzU1IDE3LjE4OUM0OS4wODQ1IDcuNjM3NTUgNDIuMDc4NiAxLjM1NTkzIDMyLjMyMzYgLTAuNjIzMjA5QzI4LjE1NTYgLTEuNDgzNyAyMy4xMDA3IC0yIDE3Ljk1NzEgLTJaIiBmaWxsPSIjODBFM0VCIi8+Cjwvc3ZnPgo=';
|
|
8
8
|
|
|
9
|
-
const toastCss = ":host .show,:host .hide{display:-ms-flexbox;display:flex}:host .show{opacity:1}:host .show--top-right,:host .show--bottom-right{-webkit-animation:toastAnimationFadeInFromRight 1s;animation:toastAnimationFadeInFromRight 1s}:host .show--top-left,:host .show--bottom-left{-webkit-animation:toastAnimationFadeInFromLeft 1s;animation:toastAnimationFadeInFromLeft 1s}:host .hide{-webkit-transition:all 1s;transition:all 1s;-webkit-animation:toastAnimationFadeOut 0.5s;animation:toastAnimationFadeOut 0.5s}.toast{display:none;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px;-webkit-box-shadow:0px 8px 12px rgba(96, 123, 153, 0.4), 0px 0px 4px rgba(96, 123, 153, 0.3);box-shadow:0px 8px 12px rgba(96, 123, 153, 0.4), 0px 0px 4px rgba(96, 123, 153, 0.3);color:#202c44;opacity:0;margin-top:16px}.toast--action--icon{min-width:440px;max-width:440px;padding:8px
|
|
9
|
+
const toastCss = ":host .show,:host .hide{display:-ms-flexbox;display:flex}:host .show{opacity:1}:host .show--top-right,:host .show--bottom-right{-webkit-animation:toastAnimationFadeInFromRight 1s;animation:toastAnimationFadeInFromRight 1s}:host .show--top-left,:host .show--bottom-left{-webkit-animation:toastAnimationFadeInFromLeft 1s;animation:toastAnimationFadeInFromLeft 1s}:host .hide{-webkit-transition:all 1s;transition:all 1s;-webkit-animation:toastAnimationFadeOut 0.5s;animation:toastAnimationFadeOut 0.5s}.toast{display:none;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px;-webkit-box-shadow:0px 8px 12px rgba(96, 123, 153, 0.4), 0px 0px 4px rgba(96, 123, 153, 0.3);box-shadow:0px 8px 12px rgba(96, 123, 153, 0.4), 0px 0px 4px rgba(96, 123, 153, 0.3);color:#202c44;opacity:0;margin-top:16px;overflow:hidden;gap:16px}.toast--action--icon{min-width:440px;max-width:440px;padding:8px 16px}.toast--action--icon bds-icon-button{height:32px}@media (max-width: 780px){.toast--action--icon{min-width:220px;width:95%;margin:16px auto 0px auto}}.toast--action--button{min-width:440px;max-width:456px;padding:8px 16px}@media (max-width: 780px){.toast--action--button{min-width:220px;width:95%;margin:16px auto 0px auto}}.toast--system{background:#80e3eb}.toast--error{background:#ffa5a5}.toast--success{background:#90e6bc}.toast--warning{background:#fff6a8}.toast--undo{background-color:#00c6d7}.toast--redo{background-color:#485c73}.toast--notification{background-color:#ffffff}.toast bds-icon{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;padding:8px 0}.toast__ballon{display:-ms-flexbox;display:flex;position:absolute;top:0;left:0}.toast__content{height:100%;width:100%;-ms-flex-align:start;align-items:flex-start;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;padding:8px 0}.toast__action{display:-ms-flexbox;display:flex;-ms-flex-align:start;align-items:flex-start}.toast__action bds-button-icon,.toast__action bds-button{position:relative}.toast__action bds-button-icon::before,.toast__action bds-button::before{content:\"\";position:absolute;inset:-4px;border:2px solid transparent;border-radius:4px}.toast__action bds-button-icon:focus-visible,.toast__action bds-button:focus-visible{outline:none}.toast__action bds-button-icon:focus-visible::before,.toast__action bds-button:focus-visible::before{border-color:#c226fb}.toast__action__button{white-space:nowrap}@-webkit-keyframes toastAnimationFadeInFromRight{0%{opacity:0;right:-200px}50%{opacity:0.9;right:1px}100%{opacity:1}}@keyframes toastAnimationFadeInFromRight{0%{opacity:0;right:-200px}50%{opacity:0.9;right:1px}100%{opacity:1}}@-webkit-keyframes toastAnimationFadeInFromLeft{0%{opacity:0;left:-200px}50%{opacity:0.9;left:1px}100%{opacity:1}}@keyframes toastAnimationFadeInFromLeft{0%{opacity:0;left:-200px}50%{opacity:0.9;left:1px}100%{opacity:1}}@-webkit-keyframes toastAnimationFadeOut{0%{opacity:1}30%{max-height:60px}80%{opacity:0;max-height:30px}100%{max-height:0px}}@keyframes toastAnimationFadeOut{0%{opacity:1}30%{max-height:60px}80%{opacity:0;max-height:30px}100%{max-height:0px}}";
|
|
10
10
|
|
|
11
11
|
const BdsToast = class {
|
|
12
12
|
constructor(hostRef) {
|
|
@@ -86,15 +86,15 @@ const BdsToast = class {
|
|
|
86
86
|
/**
|
|
87
87
|
* Can be used outside to open the toast
|
|
88
88
|
*/
|
|
89
|
-
async create({ actionType, buttonAction, buttonText, icon, toastText, toastTitle, variant, duration,
|
|
90
|
-
let toastContainer = document.querySelector(`bds-toast-container.${
|
|
89
|
+
async create({ actionType, buttonAction, buttonText, icon, toastText, toastTitle, variant, duration, }) {
|
|
90
|
+
let toastContainer = document.querySelector(`bds-toast-container.${variant === 'notification' ? 'top-right' : 'bottom-left'}`);
|
|
91
91
|
if (toastContainer) {
|
|
92
92
|
toastContainer.appendChild(this.el);
|
|
93
|
-
toastContainer.classList.add(
|
|
93
|
+
toastContainer.classList.add(variant === 'notification' ? 'top-right' : 'bottom-left');
|
|
94
94
|
}
|
|
95
95
|
else {
|
|
96
96
|
toastContainer = document.createElement('bds-toast-container');
|
|
97
|
-
toastContainer.classList.add(
|
|
97
|
+
toastContainer.classList.add(variant === 'notification' ? 'top-right' : 'bottom-left');
|
|
98
98
|
document.body.appendChild(toastContainer);
|
|
99
99
|
toastContainer.appendChild(this.el);
|
|
100
100
|
}
|
|
@@ -105,7 +105,7 @@ const BdsToast = class {
|
|
|
105
105
|
this.el.toastTitle = toastTitle;
|
|
106
106
|
this.el.variant = variant || 'system';
|
|
107
107
|
this.el.duration = duration * 1000 || 0;
|
|
108
|
-
this.el.position =
|
|
108
|
+
this.el.position = variant === 'notification' ? 'top-right' : 'bottom-left';
|
|
109
109
|
this.el.icon = icon !== null && icon !== void 0 ? icon : this.mapIconName[this.variant];
|
|
110
110
|
this.el.show = true;
|
|
111
111
|
if (this.el.duration > 0) {
|
|
@@ -143,7 +143,7 @@ const BdsToast = class {
|
|
|
143
143
|
} }, this.variant === 'notification' && index.h("img", { class: "toast__ballon", src: notificationBallonSvg }), this.icon && index.h("bds-icon", { theme: "outline", size: "medium", name: this.icon }), index.h("div", { class: "toast__content" }, this.toastTitle && (index.h("bds-typo", { variant: "fs-14", bold: "bold" }, this.toastTitle)), this.toastText && index.h("bds-typo", { variant: "fs-14", innerHTML: this.toastText })), index.h("div", { class: {
|
|
144
144
|
toast__action: true,
|
|
145
145
|
[`toast__action__${this.actionType}`]: true,
|
|
146
|
-
} }, this.actionType === 'button' ? (index.h("bds-button", { onKeyDown: this._keyPressHandler.bind(this), tabindex: "0", onClick: () => this._buttonClickHandler(), variant: "secondary", size: "
|
|
146
|
+
} }, this.actionType === 'button' ? (index.h("bds-button", { onKeyDown: this._keyPressHandler.bind(this), tabindex: "0", onClick: () => this._buttonClickHandler(), variant: "secondary", size: "standard" }, this.buttonText)) : (index.h("bds-button-icon", { onClick: () => this._buttonClickHandler(), size: "short", onKeyDown: this._keyPressHandler.bind(this), tabindex: "0", variant: "secondary", icon: "close" })))));
|
|
147
147
|
}
|
|
148
148
|
get el() { return index.getElement(this); }
|
|
149
149
|
};
|