@sankhyalabs/ezui 1.2.0-beta.2 → 1.2.0-beta.21
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/cjs/{ApplicationUtils-483c0a9e.js → ApplicationUtils-edc62c5c.js} +6 -2
- package/dist/cjs/{CSSVarsUtils-09b431cc.js → CSSVarsUtils-af809e73.js} +17 -0
- package/dist/cjs/{DialogType-a1e288e6.js → DialogType-aa435c52.js} +1 -0
- package/dist/cjs/FieldBuilder-cd3e45ed.js +119 -0
- package/dist/cjs/ez-actions-button.cjs.entry.js +67 -15
- package/dist/cjs/ez-button.cjs.entry.js +12 -10
- package/dist/cjs/ez-calendar.cjs.entry.js +1 -1
- package/dist/cjs/ez-chip.cjs.entry.js +6 -6
- package/dist/cjs/ez-collapsible-box.cjs.entry.js +85 -6
- package/dist/cjs/ez-combo-box.cjs.entry.js +38 -13
- package/dist/cjs/ez-date-input.cjs.entry.js +9 -14
- package/dist/cjs/ez-date-time-input.cjs.entry.js +9 -14
- package/dist/cjs/ez-dialog.cjs.entry.js +42 -7
- package/dist/cjs/ez-filter-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-form.cjs.entry.js +44 -133
- package/dist/cjs/ez-grid-config.cjs.entry.js +4 -5
- package/dist/cjs/ez-grid.cjs.entry.js +97 -10
- package/dist/cjs/ez-icon.cjs.entry.js +1 -1
- package/dist/cjs/ez-list.cjs.entry.js +1 -1
- package/dist/cjs/ez-modal-container.cjs.entry.js +54 -0
- package/dist/cjs/ez-number-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-popover.cjs.entry.js +1 -1
- package/dist/cjs/ez-popup.cjs.entry.js +7 -3
- package/dist/cjs/ez-radio-button.cjs.entry.js +2 -2
- package/dist/cjs/ez-scroller.cjs.entry.js +1 -1
- package/dist/cjs/ez-search.cjs.entry.js +1 -1
- package/dist/cjs/ez-tabselector.cjs.entry.js +7 -5
- package/dist/cjs/ez-text-area.cjs.entry.js +6 -6
- package/dist/cjs/ez-text-edit.cjs.entry.js +103 -0
- package/dist/cjs/ez-text-input.cjs.entry.js +11 -1
- package/dist/cjs/ez-time-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-upload.cjs.entry.js +2 -2
- package/dist/cjs/ez-view-stack.cjs.entry.js +9 -5
- package/dist/cjs/ezui.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +6 -4
- package/dist/collection/components/ez-actions-button/ez-actions-button.css +49 -20
- package/dist/collection/components/ez-actions-button/ez-actions-button.js +219 -23
- package/dist/collection/components/ez-button/ez-button.css +1 -6
- package/dist/collection/components/ez-button/ez-button.js +11 -9
- package/dist/collection/components/ez-calendar/ez-calendar.css +17 -20
- package/dist/collection/components/ez-chip/ez-chip.css +6 -3
- package/dist/collection/components/ez-chip/ez-chip.js +5 -5
- package/dist/collection/components/ez-collapsible-box/ez-collapsible-box.css +16 -0
- package/dist/collection/components/ez-collapsible-box/ez-collapsible-box.js +226 -7
- package/dist/collection/components/ez-combo-box/ez-combo-box.css +1 -22
- package/dist/collection/components/ez-combo-box/ez-combo-box.js +42 -18
- package/dist/collection/components/ez-date-input/ez-date-input.js +8 -13
- package/dist/collection/components/ez-date-time-input/ez-date-time-input.js +8 -13
- package/dist/collection/components/ez-dialog/DialogType.js +1 -0
- package/dist/collection/components/ez-dialog/ez-dialog.css +19 -25
- package/dist/collection/components/ez-dialog/ez-dialog.js +41 -6
- package/dist/collection/components/ez-form/DataBinder.js +1 -0
- package/dist/collection/components/ez-form/ez-form.js +22 -13
- package/dist/collection/components/ez-form/fieldbuilder/FieldBuilder.js +1 -1
- package/dist/collection/components/ez-form/structure/FormSheetMetadata.js +24 -14
- package/dist/collection/components/ez-grid/controller/DataUnitBridge.js +3 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +64 -10
- package/dist/collection/components/ez-grid/controller/ag-grid/components/cellRenderer.js +31 -0
- package/dist/collection/components/ez-grid/ez-grid.js +40 -3
- package/dist/collection/components/ez-grid/subcomponents/ez-grid-config/ez-grid-config.css +36 -25
- package/dist/collection/components/ez-grid/subcomponents/ez-grid-config/ez-grid-config.js +1 -2
- package/dist/collection/components/ez-grid/subcomponents/ez-select-box/ez-select-box.js +5 -4
- package/dist/collection/components/ez-icon/ez-icon.css +117 -98
- package/dist/collection/components/ez-list/ez-list.css +9 -1
- package/dist/collection/components/ez-modal-container/ez-modal-container.css +38 -0
- package/dist/collection/components/ez-modal-container/ez-modal-container.js +166 -0
- package/dist/collection/components/ez-modal-container/index.js +2 -0
- package/dist/collection/components/ez-modal-container/modal-action.js +8 -0
- package/dist/collection/components/ez-modal-container/modal-button-status.js +7 -0
- package/dist/collection/components/ez-popover/ez-popover.css +1 -1
- package/dist/collection/components/ez-popup/ez-popup.css +4 -0
- package/dist/collection/components/ez-popup/ez-popup.js +26 -4
- package/dist/collection/components/ez-radio-button/ez-radio-button.css +16 -5
- package/dist/collection/components/ez-radio-button/ez-radio-button.js +1 -1
- package/dist/collection/components/ez-scroller/ez-scroller.css +4 -2
- package/dist/collection/components/ez-search/ez-search.js +6 -6
- package/dist/collection/components/ez-tabselector/ez-tabselector.css +9 -0
- package/dist/collection/components/ez-tabselector/ez-tabselector.js +7 -3
- package/dist/collection/components/ez-text-area/ez-text-area.css +6 -3
- package/dist/collection/components/ez-text-area/ez-text-area.js +5 -5
- package/dist/collection/components/ez-text-edit/ez-text-edit.css +19 -0
- package/dist/collection/components/ez-text-edit/ez-text-edit.js +188 -0
- package/dist/collection/components/ez-text-input/ez-text-input.css +18 -2
- package/dist/collection/components/ez-text-input/ez-text-input.js +28 -0
- package/dist/collection/components/ez-view-stack/ez-view-stack.js +12 -6
- package/dist/collection/utils/ApplicationUtils.js +5 -1
- package/dist/collection/utils/CSSVarsUtils.js +17 -0
- package/dist/collection/utils/index.js +1 -0
- package/dist/custom-elements/index.d.ts +12 -0
- package/dist/custom-elements/index.js +728 -254
- package/dist/esm/{ApplicationUtils-5f87ae60.js → ApplicationUtils-205ac4bc.js} +6 -2
- package/dist/esm/{CSSVarsUtils-499b75c2.js → CSSVarsUtils-00f67f32.js} +17 -0
- package/dist/esm/{DialogType-72afa679.js → DialogType-4059dc4d.js} +1 -0
- package/dist/esm/FieldBuilder-9e9545fc.js +117 -0
- package/dist/esm/ez-actions-button.entry.js +67 -15
- package/dist/esm/ez-button.entry.js +12 -10
- package/dist/esm/ez-calendar.entry.js +1 -1
- package/dist/esm/ez-chip.entry.js +6 -6
- package/dist/esm/ez-collapsible-box.entry.js +86 -7
- package/dist/esm/ez-combo-box.entry.js +38 -13
- package/dist/esm/ez-date-input.entry.js +9 -14
- package/dist/esm/ez-date-time-input.entry.js +10 -15
- package/dist/esm/ez-dialog.entry.js +42 -7
- package/dist/esm/ez-filter-input.entry.js +1 -1
- package/dist/esm/ez-form.entry.js +43 -132
- package/dist/esm/ez-grid-config.entry.js +4 -5
- package/dist/esm/ez-grid.entry.js +97 -10
- package/dist/esm/ez-icon.entry.js +1 -1
- package/dist/esm/ez-list.entry.js +1 -1
- package/dist/esm/ez-modal-container.entry.js +50 -0
- package/dist/esm/ez-number-input.entry.js +1 -1
- package/dist/esm/ez-popover.entry.js +1 -1
- package/dist/esm/ez-popup.entry.js +7 -3
- package/dist/esm/ez-radio-button.entry.js +2 -2
- package/dist/esm/ez-scroller.entry.js +1 -1
- package/dist/esm/ez-search.entry.js +1 -1
- package/dist/esm/ez-tabselector.entry.js +7 -5
- package/dist/esm/ez-text-area.entry.js +6 -6
- package/dist/esm/ez-text-edit.entry.js +99 -0
- package/dist/esm/ez-text-input.entry.js +11 -1
- package/dist/esm/ez-time-input.entry.js +1 -1
- package/dist/esm/ez-upload.entry.js +2 -2
- package/dist/esm/ez-view-stack.entry.js +9 -5
- package/dist/esm/ezui.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/p-0b44cf1c.js +1 -0
- package/dist/ezui/p-0c7203d5.entry.js +1 -0
- package/dist/ezui/p-2cc6dd66.entry.js +1 -0
- package/dist/ezui/p-2ccad880.entry.js +1 -0
- package/dist/ezui/p-333d79c4.entry.js +1 -0
- package/dist/ezui/p-3987f8d8.entry.js +1 -0
- package/dist/ezui/p-3c87845d.entry.js +1 -0
- package/dist/ezui/{p-768053d0.entry.js → p-43bb6a59.entry.js} +1 -1
- package/dist/ezui/p-4a5e37a7.js +1 -0
- package/dist/ezui/p-4ad647fc.entry.js +1 -0
- package/dist/ezui/p-54ecd19a.js +1 -0
- package/dist/ezui/{p-03742d3e.entry.js → p-56688470.entry.js} +1 -1
- package/dist/ezui/{p-b901ba02.entry.js → p-5a1927a2.entry.js} +1 -1
- package/dist/ezui/{p-b2cf7db2.entry.js → p-63d567cc.entry.js} +1 -1
- package/dist/ezui/p-6befd7e4.entry.js +1 -0
- package/dist/ezui/p-712bd293.entry.js +1 -0
- package/dist/ezui/{p-d9c72ff7.entry.js → p-72c75a43.entry.js} +1 -1
- package/dist/ezui/{p-15d18ece.entry.js → p-744eb735.entry.js} +1 -1
- package/dist/ezui/{p-81eb2738.entry.js → p-802d23d9.entry.js} +1 -1
- package/dist/ezui/p-86daa81a.entry.js +1 -0
- package/dist/ezui/{p-72ab066f.entry.js → p-b706619e.entry.js} +1 -1
- package/dist/ezui/p-bca406db.entry.js +1 -0
- package/dist/ezui/p-be06251d.entry.js +1 -0
- package/dist/ezui/{p-e7d03a0d.entry.js → p-bffae598.entry.js} +1 -1
- package/dist/ezui/p-d91527dc.entry.js +1 -0
- package/dist/ezui/p-dd257f17.entry.js +1 -0
- package/dist/ezui/p-e1148f5c.js +1 -0
- package/dist/ezui/p-e1f2b5da.entry.js +1 -0
- package/dist/ezui/p-e230bfd2.entry.js +1 -0
- package/dist/ezui/{p-5c721278.entry.js → p-e3ee814c.entry.js} +1 -1
- package/dist/ezui/p-e697ffd5.entry.js +1 -0
- package/dist/ezui/p-ec9decf2.entry.js +1 -0
- package/dist/ezui/p-f36dbc21.entry.js +1 -0
- package/dist/types/components/ez-actions-button/ez-actions-button.d.ts +42 -9
- package/dist/types/components/ez-chip/ez-chip.d.ts +1 -1
- package/dist/types/components/ez-collapsible-box/ez-collapsible-box.d.ts +46 -1
- package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +15 -5
- package/dist/types/components/ez-date-input/ez-date-input.d.ts +0 -1
- package/dist/types/components/ez-date-time-input/ez-date-time-input.d.ts +0 -1
- package/dist/types/components/ez-dialog/DialogType.d.ts +1 -0
- package/dist/types/components/ez-dialog/ez-dialog.d.ts +3 -0
- package/dist/types/components/ez-form/DataBinder.d.ts +2 -2
- package/dist/types/components/ez-form/ez-form.d.ts +21 -11
- package/dist/types/components/ez-form/fieldbuilder/tpl/CheckBox.tpl.d.ts +3 -3
- package/dist/types/components/ez-form/fieldbuilder/tpl/NumberInput.tpl.d.ts +2 -5
- package/dist/types/components/ez-form/structure/FormSheetMetadata.d.ts +3 -3
- package/dist/types/components/ez-grid/controller/EzGridController.d.ts +11 -0
- package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +5 -1
- package/dist/types/components/ez-grid/controller/ag-grid/components/cellRenderer.d.ts +9 -0
- package/dist/types/components/ez-grid/ez-grid.d.ts +8 -3
- package/dist/types/components/ez-grid/subcomponents/ez-select-box/ez-select-box.d.ts +2 -6
- package/dist/types/components/ez-modal-container/ez-modal-container.d.ts +43 -0
- package/dist/types/components/ez-modal-container/index.d.ts +2 -0
- package/dist/types/components/ez-modal-container/modal-action.d.ts +7 -0
- package/dist/types/components/ez-modal-container/modal-button-status.d.ts +6 -0
- package/dist/types/components/ez-popup/ez-popup.d.ts +4 -0
- package/dist/types/components/ez-search/ez-search.d.ts +3 -3
- package/dist/types/components/ez-tabselector/ez-tabselector.d.ts +2 -0
- package/dist/types/components/ez-text-edit/ez-text-edit.d.ts +39 -0
- package/dist/types/components/ez-text-input/ez-text-input.d.ts +5 -0
- package/dist/types/components/ez-view-stack/ez-view-stack.d.ts +5 -1
- package/dist/types/components.d.ts +266 -28
- package/dist/types/utils/ApplicationUtils.d.ts +1 -0
- package/dist/types/utils/CSSVarsUtils.d.ts +1 -0
- package/dist/types/utils/index.d.ts +1 -0
- package/package.json +5 -5
- package/react/components.d.ts +2 -0
- package/react/components.js +2 -0
- package/react/components.js.map +1 -1
- package/dist/ezui/p-3263a002.js +0 -1
- package/dist/ezui/p-3ae441ec.entry.js +0 -1
- package/dist/ezui/p-3ffdde40.entry.js +0 -1
- package/dist/ezui/p-416bedbe.entry.js +0 -1
- package/dist/ezui/p-47e06040.entry.js +0 -1
- package/dist/ezui/p-6cfe20a0.entry.js +0 -1
- package/dist/ezui/p-719e9ef9.entry.js +0 -1
- package/dist/ezui/p-787fbdfe.js +0 -1
- package/dist/ezui/p-7fe1ac9a.entry.js +0 -1
- package/dist/ezui/p-898b9906.js +0 -1
- package/dist/ezui/p-9c3c9da8.entry.js +0 -1
- package/dist/ezui/p-a27dafa4.entry.js +0 -1
- package/dist/ezui/p-a3ff4f0e.entry.js +0 -1
- package/dist/ezui/p-aba3fa6c.entry.js +0 -1
- package/dist/ezui/p-b3e978aa.entry.js +0 -1
- package/dist/ezui/p-cccd8cde.entry.js +0 -1
- package/dist/ezui/p-cf283c4a.entry.js +0 -1
- package/dist/ezui/p-d0671e14.entry.js +0 -1
- package/dist/ezui/p-e0f06d73.entry.js +0 -1
- package/dist/ezui/p-ed835b36.entry.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as i,h as e,H as s,g as a}from"./p-3c7ea91b.js";import{DateUtils as n}from"@sankhyalabs/core";import{C as r}from"./p-3263a002.js";let o=class{constructor(e){t(this,e),this.ezChange=i(this,"ezChange",7),this.ezStartChange=i(this,"ezStartChange",7),this.ezCancelWaitingChange=i(this,"ezCancelWaitingChange",7),this._focused=!1,this.enabled=!0,this.mode="regular"}observeLabel(){this._textInput&&(this._textInput.label=this.label)}observeErrorMessage(){var t;this._textInput&&(this._textInput.errorMessage=this.errorMessage,(null===(t=this.errorMessage)||void 0===t?void 0:t.trim())||this.setInputValue())}observeValue(t,i){if(this._textInput&&t!=i){const e=this.validateValue(t),s=this.validateValue(i);if((null==e?void 0:e.getTime())!==(null==s?void 0:s.getTime())){const t=this.getTextValue(e)||"";!n.strToDate(t)&&this._focused||(this._textInput.value||"")===t||(this._textInput.value=t,this._focused=!1,this.errorMessage=""),this.ezChange.emit(null===e?void 0:e)}}}async setFocus(){this._textInput.setFocus()}async setBlur(){this._textInput.setBlur()}async isInvalid(){return"string"==typeof this.errorMessage&&""!==this.errorMessage.trim()}changeValue(t){const i=this.validateValue(this.value),e=this.validateValue(t);(null==i?void 0:i.getTime())!==(null==e?void 0:e.getTime())&&(this.value=e)}showCalendar(){this.handleBlur(),this._calendar.value=this.value,this._calendar.fitVertical(this.errorMessage||"slim"===this.mode?0:-19,this._elem.clientHeight)}hideCalendar(){this.changeValue(this._calendar.value),this._calendar.hide()}handleBlur(){const t=this._textInput.value,i=n.strToDate(t);if(i||!t){this.errorMessage="";const t=this.validateValue(this.value),e=this.validateValue(i);(null==t?void 0:t.getTime())===(null==e?void 0:e.getTime())?(e&&(this._textInput.value=this.getTextValue(e)||"",this._focused=!1),this.ezCancelWaitingChange.emit()):this.changeValue(e)}else this.changeValue(void 0),this.ezCancelWaitingChange.emit(),this.errorMessage="O valor digitado não é uma data válida"}getTextValue(t){return t?new Intl.DateTimeFormat("pt-BR").format(t):void 0}handleInput(t){const i=n.strToDate(this._textInput.value),e=this.validateValue(this.value),s=this.validateValue(i);(null==e?void 0:e.getTime())!==(null==s?void 0:s.getTime())&&(this._focused=!0,this.ezStartChange.emit({waitmessage:"",blocking:!1})),"H"!==t.data&&"h"!==t.data||this.changeValue(new Date)}validateValue(t){return t instanceof Date&&!isNaN(t.valueOf())?n.clearTime(t):void 0}setInputValue(){const t=this.getTextValue(this.value)||"";(this._textInput.value||"")!==t&&(this._textInput.value=t)}componentDidLoad(){r.applyVarsTextInput(this._elem,this._textInput),this.setInputValue()}render(){return e(s,null,e("ez-text-input",{ref:t=>this._textInput=t,"data-slave-mode":"true",label:this.label,onBlur:()=>this.handleBlur(),onInput:t=>this.handleInput(t),restrict:"0123456789/",enabled:this.enabled,errorMessage:this.errorMessage,mode:this.mode},e("button",{disabled:!this.enabled,tabindex:-1,class:"btn-open-cal",onClick:()=>this.showCalendar(),slot:"leftIcon"})),e("ez-calendar",{onEzChange:t=>{this.hideCalendar(),t.stopPropagation()},floating:!0,ref:t=>this._calendar=t}))}get _elem(){return a(this)}static get watchers(){return{label:["observeLabel"],errorMessage:["observeErrorMessage"],value:["observeValue"]}}};o.style=':host{display:block;width:100%;--ez-date-input__input--background-color:var(--background--medium, #e0e0e0);--ez-date-input__input--border-color:var(--ez-date-input__input--background-color);--ez-date-input__calendar-image:url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="16px" width="15px"><path d="M 3.171875,5.25 C 2.6485088,5.25 2.21875,5.6797588 2.21875,6.203125 2.21875,6.7264912 2.6485088,7.15625 3.171875,7.15625 3.6952412,7.15625 4.125,6.7264912 4.125,6.203125 4.125,5.6797588 3.6952412,5.25 3.171875,5.25 Z m 2.875,0 C 5.5235088,5.25 5.09375,5.6797588 5.09375,6.203125 5.09375,6.7264912 5.5235088,7.15625 6.046875,7.15625 6.5702412,7.15625 7,6.7264912 7,6.203125 7,5.6797588 6.5702412,5.25 6.046875,5.25 Z m 2.875,0 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.953125 0.953125,0.953125 0.5233662,0 0.9511719,-0.4297588 0.9511719,-0.953125 C 9.8730469,5.6797588 9.4452412,5.25 8.921875,5.25 Z m 2.873047,0 c -0.523366,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.429759,0.953125 0.953125,0.953125 0.523366,0 0.953125,-0.4297588 0.953125,-0.953125 C 12.748047,5.6797588 12.318288,5.25 11.794922,5.25 Z M 3.171875,8.1230469 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.9531251 0.953125,0.9531251 0.5233662,0 0.953125,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.875,0 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.9531251 0.953125,0.9531251 C 6.5702412,10.029297 7,9.5995381 7,9.0761719 7,8.5528057 6.5702412,8.1230469 6.046875,8.1230469 Z m 2.8554688,0 c -0.5233663,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297587,0.9531251 0.953125,0.9531251 0.5233661,0 0.9531249,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.9003902,0 c -0.523366,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.429759,0.9531251 0.953125,0.9531251 0.523367,0 0.953125,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.429758,-0.953125 -0.953125,-0.953125 z M 3.171875,10.998047 c -0.5233662,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297588,0.953125 0.953125,0.953125 0.5233662,0 0.953125,-0.429759 0.953125,-0.953125 0,-0.523366 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.875,0 c -0.5233662,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297588,0.953125 0.953125,0.953125 C 6.5702412,12.904297 7,12.474538 7,11.951172 7,11.427806 6.5702412,10.998047 6.046875,10.998047 Z m 2.8554688,0 c -0.5233663,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297587,0.953125 0.953125,0.953125 0.5233661,0 0.9531249,-0.429759 0.953125,-0.953125 0,-0.523366 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.9003902,0 c -0.523366,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.429759,0.953125 0.953125,0.953125 0.523367,0 0.953125,-0.429759 0.953125,-0.953125 0,-0.523366 -0.429758,-0.953125 -0.953125,-0.953125 z M 3.5,0 c -0.554,0 -1,0.446 -1,1 v 0.050781 C 1.0853217,1.2909766 0,2.5186658 0,4 v 9 c 0,1.652487 1.3475134,3 3,3 h 9 c 1.652487,0 3,-1.347513 3,-3 V 4 C 15,2.5186658 13.914678,1.2909766 12.5,1.0507812 V 1 c 0,-0.554 -0.446,-1 -1,-1 -0.554,0 -1,0.446 -1,1 h -2 c 0,-0.554 -0.446,-1 -1,-1 -0.554,0 -1,0.446 -1,1 h -2 C 4.5,0.446 4.054,0 3.5,0 Z m 1,2.0996094 h 2 v 0.640625 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 v -0.640625 h 2 v 0.640625 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 V 2.1738281 C 13.311725,2.3905225 13.900391,3.11278 13.900391,4 v 9 c 0,1.062113 -0.838278,1.900391 -1.900391,1.900391 H 3 C 1.9378864,14.900391 1.0996094,14.062113 1.0996094,13 V 4 C 1.0996094,3.11278 1.6882747,2.3905225 2.5,2.1738281 v 0.5664063 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 z"/></svg>\')}.btn-open-cal{outline:none;border:none;background-color:unset;cursor:pointer}.btn-open-cal:disabled{cursor:unset}.btn-open-cal::after{content:\'\';display:flex;background-color:var(--text--primary, #008561);width:15px;height:16px;-webkit-mask-image:var(--ez-date-input__calendar-image);mask-image:var(--ez-date-input__calendar-image)}.btn-open-cal:disabled:after{background-color:var(--text--disable, #AFB6C0)}.btn-open-cal:enabled:hover::after{background-color:var(--color--primary, #4e4e4e)}ez-text-input{--text-input__input--background-color:var(--ez-date-input__input--background-color, #FFFFFF);--text-input__input--border-color:var(--ez-date-input__input--border-color, #DCE0E8)}';export{o as ez_date_input}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as o,h as i,H as e}from"./p-3c7ea91b.js";let l=class{constructor(i){t(this,i),this.ezClosePopup=o(this,"ezClosePopup",7),this._sizeClasses={"x-small":"col--sd-3",small:"col--sd-5",medium:"col--sd-6",large:"col--sd-9","x-large":"col--sd-11"},this.size="medium",this.opened=!1,this.useHeader=!1}getGridSize(){return this._sizeClasses[this.size]||this._sizeClasses.medium}componentDidRender(){this._container&&this._container.focus()}render(){return this.opened?i(e,null,i("div",{class:"overlay"},i("div",{class:"popup col "+this.getGridSize()},i("div",{class:"popup__container",ref:t=>this._container=t,tabIndex:-1},i("div",{class:"popup__content"},i("div",{class:"popup__header"},this.ezTitle?i("div",{class:"popup__title"},this.ezTitle):void 0,i("button",{class:this.ezTitle?"btn-close":"btn-close btn-close--solo",onClick:()=>{this.opened=!1,this.ezClosePopup.emit()}})),i("div",{class:"popup__expandable-content"},i("slot",null))))))):null}};l.style=':host{display:flex;--ez-popup-z-index:var(--most-visible, 3);--ez-popup__container--color:var(--title--primary, #2b3a54);--ez-popup__container--padding:var(--space--large, 24px);--ez-popup__header--padding-bottom:var(--space--medium, 12px);--ez-popup__title--font-family:var(--font-pattern, "\'Sora\', \'Algerian\'");--ez-popup__title--font-size:var(--title--extra-large, 24px);--ez-popup__title--color:var(--title--primary, #2b3a54);--ez-popup__title--font-weight:var(--text-weight--large, 600);--ez-popup__btn__close--icon-color:var(--title--primary, #2b3a54);--ez-popup__btn__close--icon:url(\'data:image/svg+xml;utf8,<svg width="14" height="14" viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg"><path d="M 8.2421753,6.9944578 13.743748,1.4930784 C 13.907781,1.3290628 14,1.1065946 14,0.87462511 14,0.64266712 13.907782,0.42019873 13.743748,0.25617155 13.579712,0.09215597 13.35727,6.48e-8 13.125266,6.48e-8 12.89338,6.48e-8 12.670821,0.09215634 12.506787,0.25617155 L 7.005215,5.7575508 1.5035972,0.25617155 C 1.3395631,0.09215597 1.1170968,6.48e-8 0.88511716,6.48e-8 0.65314917,6.48e-8 0.4306712,0.09215597 0.26663695,0.25617155 0.10260271,0.42019873 0.01045441,0.64266712 0.01045441,0.87462511 c 0,0.23196949 0.0921483,0.45443769 0.25618254,0.61845329 L 5.7682546,6.9944578 0.26663695,12.497027 c -0.0834745,0.08067 -0.15003245,0.1772 -0.19581514,0.283871 C 0.02505077,12.887561 9.831648e-4,13.002399 2.950369e-5,13.118395 -9.2415746e-4,13.234504 0.02125019,13.349689 0.06527245,13.457057 c 0.04401053,0.107479 0.10898307,0.205064 0.1911168,0.287137 0.0821454,0.08208 0.17979645,0.146888 0.28727561,0.190839 0.10747906,0.04395 0.22262954,0.06598 0.33872417,0.06493 0.116095,-10e-4 0.23082547,-0.0253 0.33747687,-0.07112 0.1066637,-0.04593 0.2031133,-0.112615 0.2837313,-0.196086 L 7.005215,8.2313646 12.506787,13.732768 c 0.164034,0.164027 0.386593,0.256125 0.618479,0.256125 0.232004,0 0.454446,-0.09209 0.618482,-0.256125 C 13.907781,13.568741 14,13.346308 14,13.114315 14,12.882323 13.90779,12.659888 13.743748,12.495861 Z"/></svg>\')}.overlay{position:fixed;display:flex;top:0px;z-index:var(--ez-popup-z-index);left:0px;width:100%;align-items:center;justify-content:center;box-sizing:border-box;height:100vh;backdrop-filter:blur(4px);background:rgba(0, 4, 12, 0.4)}.popup{display:flex;height:100%;align-items:center;justify-content:center;box-sizing:border-box}.popup__container{width:100%;max-height:90%;height:100%;display:flex;flex-wrap:wrap;overflow:hidden;background:#FFFF;color:var(--ez-popup__container--color);border-radius:12px;box-shadow:0px 0px 16px rgba(0, 38, 111, 0.122);box-sizing:border-box;padding:var(--ez-popup__container--padding)}.popup__content{box-sizing:border-box;max-height:100%;width:100%;display:grid;grid-template-rows:auto 1fr}.popup__expandable-content{box-sizing:border-box;overflow-y:auto;height:100%;width:100%}.popup__header{padding-bottom:var(--ez-popup__header--padding-bottom);width:100%;display:flex}.popup__title{display:flex;margin:0;width:100%;font-family:var(--ez-popup__title--font-family);font-size:var(--ez-popup__title--font-size);font-weight:var(--ez-popup__title--font-weight);color:var(--ez-popup__title--color);line-height:1.3}.btn-close{justify-content:flex-end;align-self:flex-start;align-items:flex-start;display:flex;outline:none;border:none;background-color:unset;cursor:pointer}.btn-close::after{content:\'\';display:flex;background-color:var(--ez-popup__btn__close--icon-color);width:14px;height:14px;-webkit-mask-image:var(--ez-popup__btn__close--icon);mask-image:var(--ez-popup__btn__close--icon)}.btn-close--solo{width:100%}.row{width:100%;display:flex;flex-wrap:wrap}.col{display:flex;flex-wrap:wrap;align-self:flex-start;box-sizing:border-box}.col--stretch{align-self:stretch}.col--undefined{width:unset}.col--nowrap{flex-wrap:nowrap}@media screen and (min-width: 320px){.col--sd-1{width:8.33333%}.col--sd-2{width:16.66667%}.col--sd-3{width:25%}.col--sd-4{width:33.33333%}.col--sd-5{width:41.66667%}.col--sd-6{width:50%}.col--sd-7{width:58.33333%}.col--sd-8{width:66.66667%}.col--sd-9{width:75%}.col--sd-10{width:83.33333%}.col--sd-11{width:91.66667%}.col--sd-12{width:100%}}@media screen and (min-width: 480px){.col--pn-1{width:8.33333%}.col--pn-2{width:16.66667%}.col--pn-3{width:25%}.col--pn-4{width:33.33333%}.col--pn-5{width:41.66667%}.col--pn-6{width:50%}.col--pn-7{width:58.33333%}.col--pn-8{width:66.66667%}.col--pn-9{width:75%}.col--pn-10{width:83.33333%}.col--pn-11{width:91.66667%}.col--pn-12{width:100%}}@media screen and (min-width: 768px){.col--tb-1{width:8.33333%}.col--tb-2{width:16.66667%}.col--tb-3{width:25%}.col--tb-4{width:33.33333%}.col--tb-5{width:41.66667%}.col--tb-6{width:50%}.col--tb-7{width:58.33333%}.col--tb-8{width:66.66667%}.col--tb-9{width:75%}.col--tb-10{width:83.33333%}.col--tb-11{width:91.66667%}.col--tb-12{width:100%}}@media screen and (min-width: 992px){.col--md-1{width:8.33333%}.col--md-2{width:16.66667%}.col--md-3{width:25%}.col--md-4{width:33.33333%}.col--md-5{width:41.66667%}.col--md-6{width:50%}.col--md-7{width:58.33333%}.col--md-8{width:66.66667%}.col--md-9{width:75%}.col--md-10{width:83.33333%}.col--md-11{width:91.66667%}.col--md-12{width:100%}}@media screen and (min-width: 1200px){.col--ld-1{width:8.33333%}.col--ld-2{width:16.66667%}.col--ld-3{width:25%}.col--ld-4{width:33.33333%}.col--ld-5{width:41.66667%}.col--ld-6{width:50%}.col--ld-7{width:58.33333%}.col--ld-8{width:66.66667%}.col--ld-9{width:75%}.col--ld-10{width:83.33333%}.col--ld-11{width:91.66667%}.col--ld-12{width:100%}}';export{l as ez_popup}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as o,h as t}from"./p-3c7ea91b.js";let e=class{constructor(t){o(this,t),this.enabled=!0,this.mode="regular"}async setFocus(){this._button.focus()}async setBlur(){this._button.blur()}getIconSize(o="medium"){const t=this.size&&this.size.toLowerCase();return["small","medium","large"].includes(t)?t:o}handleSlotChange(o){const t=o.target,e=t.assignedElements()[0];"link"==this.mode?(e.style.display="inline","leftIcon"==t.name?e.style.paddingRight="var(--ez-button__inline__icon--padding)":"rightIcon"==t.name&&(e.style.paddingLeft="var(--ez-button__inline__icon--padding)")):e.style.setProperty("--ez-icon--color","var(--ez-icon--color)")}render(){return"icon"==this.mode?t("button",{class:"btn-icon "+(this.getIconSize()?`btn-icon--${this.getIconSize()}`:""),type:"button",disabled:!this.enabled,ref:o=>this._button=o},t("ez-icon",{class:"icon",href:this.image,iconName:this.iconName,size:this.getIconSize(),onClick:o=>{this.enabled||o.stopPropagation()}})):"label-icon"==this.mode?t("div",{class:"label-icon"},t("button",{class:"btn-icon "+(this.getIconSize()?`btn-icon--${this.getIconSize()}`:""),type:"button",disabled:!this.enabled,ref:o=>this._button=o},t("ez-icon",{class:"icon",href:this.image,iconName:this.iconName,size:this.getIconSize(),onClick:o=>{this.enabled||o.stopPropagation()}})),t("label",{title:this.label},this.label)):"link"==this.mode?t("a",{class:this.getIconSize(),ref:o=>this._button=o},t("slot",{name:"leftIcon",onSlotchange:o=>{this.handleSlotChange(o)}}),this.label,t("slot",{name:"rightIcon",onSlotchange:o=>{this.handleSlotChange(o)}})):t("button",{class:this.getIconSize(""),type:"button",disabled:!this.enabled,ref:o=>this._button=o},t("slot",{name:"leftIcon",onSlotchange:o=>{this.handleSlotChange(o)}}),this.label,t("slot",{name:"rightIcon",onSlotchange:o=>{this.handleSlotChange(o)}}))}};e.style=":host{--ez-button--min-width:100px;--ez-button--height:42px;--ez-button__icon--width:18px;--ez-button__inline__icon--padding:12px;--ez-button--padding-top:0px;--ez-button--padding-bottom:0px;--ez-button--padding-right:var(--space--large, 24px);--ez-button--padding-left:var(--space--large, 24px);--ez-button--color:var(--title--primary, #FFF);--ez-button--font-size:var(--text--medium, 14px);--ez-button--font-family:var(--font-pattern, Arial);--ez-button--font-weight:var(--text-weight--large);--ez-button--background-color:var(--background--medium, #c0c0c0);--ez-button--border-radius:var(--border--radius-large, 12px);--ez-button--border:none;--ez-button--hover-color:var(--color--primary-600);--ez-button--hover--background-color:var(--background--medium, var(--ez-button--background-color));--ez-button--disabled-color:var(--text--disable);--ez-button--disabled--background-color:var(--color--disable-secondary);--ez-button--focus--border:var(--border--xlarge, 4px solid) var(--color--primary-300);--ez-button--focus--box-shadow:none;--ez-button--active-color:var(--color--primary-700);--ez-button--active--background-color:var(--background--strong);--ez-button--link-color:var(--color--primary, '#008561');--ez-button--link--hover-color:var(--color--primary-700, '#1C1D22');--ez-button--link--small--font-size:var(--text--small, 12px);--ez-button--link--medium--font-size:var(--text--medium, 14px);--ez-button--link--large--font-size:var(--text--large, 16px)}ez-icon{--ez-icon--color:inherit}button{display:flex;align-items:center;justify-content:center;margin:0;cursor:pointer;transition:background-color 0.2s linear;min-width:var(--ez-button--min-width);height:var(--ez-button--height);font-family:var(--ez-button--font-family);font-size:var(--ez-button--font-size);font-weight:var(--ez-button--font-weight);padding:var(--ez-button--padding-top) var(--ez-button--padding-right) var(--ez-button--padding-bottom) var(--ez-button--padding-left);border-radius:var(--ez-button--border-radius);background-color:var(--ez-button--background-color);color:var(--ez-button--color);fill:var(--ez-button--color);border:var(--ez-button--border)}button:focus{outline:var(--ez-button--focus--border);box-shadow:var(--ez-button--focus--box-shadow)}button:hover{outline:none;background-color:var(--ez-button--hover--background-color);color:var(--ez-button--hover-color);fill:var(--ez-button--hover-color);--ez-icon--color:var(--ez-button--hover-color)}button:focus{outline:none;outline:var(--ez-button--focus--border);box-shadow:var(--ez-button--focus--box-shadow)}button:active{outline:none;box-shadow:none;background-color:var(--ez-button--active--background-color);color:var(--ez-button--active-color);fill:var(--ez-button--active-color);--ez-icon--color:var(--ez-button--active-color)}button:disabled{background-color:var(--ez-button--disabled--background-color);color:var(--ez-button--disabled-color);fill:var(--ez-button--disabled-color);border:none;--ez-icon--color:var(--ez-button--disabled-color);cursor:no-drop}.small{height:32px;--ez-button--font-size:var(--text--small, 12px)}.medium{height:42px}.large{height:46px}.btn-icon{padding:0px}.btn-icon--medium{width:42px;min-width:42px;height:42px}.btn-icon--small{width:32px;min-width:32px;height:32px}.btn-icon--large{width:46px;min-width:46px;height:46px}.label-icon{display:flex;flex-direction:column;align-items:center;color:var(--ez-button--color)}.label-icon:hover{color:var(--ez-button--hover-color);fill:var(--ez-button--hover-color);--ez-icon--color:var(--ez-button--hover-color)}.label-icon:active{color:var(--ez-button--active-color);fill:var(--ez-button--active-color);--ez-icon--color:var(--ez-button--active-color)}.label-icon label{max-width:150px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer;font-family:var(--ez-button--font-family);font-size:var(--ez-button--font-size);font-weight:var(--ez-button--font-weight);user-select:none}button:disabled+label{max-width:150px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer;font-family:var(--ez-button--font-family);font-size:var(--ez-button--font-size);font-weight:var(--ez-button--font-weight);color:var(--ez-button--disabled-color);cursor:no-drop}div.label-icon{cursor:pointer}div.label-icon,button:disabled{cursor:no-drop}a{font-family:var(--ez-button--font-family);font-weight:var(--ez-button--font-weight);color:var(--ez-button--link-color);cursor:pointer;display:flex;align-items:center;justify-content:center;}a:hover{color:var(--ez-button--link--hover-color)}a.small{font-size:var(--ez-button--link--small--font-size);line-height:var(--ez-button--link--small--font-size)}a.medium{font-size:var(--ez-button--link--medium--font-size);line-height:var(--ez-button--link--medium--font-size)}a.large{font-size:var(--ez-button--link--large--font-size);line-height:var(--ez-button--link--large--font-size)}";export{e as ez_button}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as o,c as r,h as a,H as e,g as t}from"./p-3c7ea91b.js";let i=class{constructor(a){o(this,a),this.ezChange=r(this,"ezChange",7),this.options=[],this.enabled=!0,this.direction="vertical"}componentWillLoad(){this._options=this.options;const o=this.hostElement.querySelectorAll("ez-radio-button-option");o&&o.forEach((o=>{let r=o.getAttribute("label"),a=o.getAttribute("value");this._options.push({label:r,value:a})}))}handleInputChange(o){this.value=o.target.value,this.ezChange.emit(this.value)}render(){return a(e,null,this.label&&a("label",{class:"label"},this.label),a("div",{class:"form--"+this.direction},this._options.map(((o,r)=>a("div",{class:"form__group"},a("input",{id:"rad"+r,class:"form__radio",name:"theradio",type:"radio",value:o.value,onChange:o=>{this.handleInputChange(o)},disabled:!this.enabled,checked:o.value===this.value}),a("label",{htmlFor:"rad"+r,class:"form__label"},o.label))))))}get hostElement(){return t(this)}};i.style=":host{--ez-radio-button--font-family:var(--font-pattern, Arial);--ez-radio-button--font-size:var(--text--large, 16px);--ez-radio-button--font-weight:var(--text-weight--large);--ez-radio-button--font-color:var(--title--primary, #2B3A54);--ez-radio-button__form-label--font-family:var(--font-pattern, Arial);--ez-radio-button__form-label--font-weight:var(--text-weight--medium, 400);--ez-radio-button__form-label--title-primary:var(--title--primary, #2B3A54);--ez-radio-button__form-label--font-size:var(--text--medium, 14px);--ez-radio-button__form-radio--border-color:var(--title--primary, #2B3A54);--ez-radio-button__form-radio--checked--color:var(--color--primary, #008561);--ez-radio-button__form-radio--disabled--border-color:var(--color--strokes, #dce0e8);--ez-radio-button__form-radio--disabled--background-color:var(--background--medium, #f0f3f7);--ez-radio-button__form-radio--disabled--color:var(--color--strokes, #dce0e8);--ez-radio-button__form-radio--disabled--before--background-color:var(--color--strokes, #dce0e8);--ez-radio-button__form-radio--focus--background-color:var(--color--inverted, #fff);--ez-radio-button__form-radio--checked--box-shadow-color:var(--background--strong, #e4eaf1);--ez-radio-button__form-radio--checked--focus--background-color:var(--color--inverted, #fff);--ez-radio-button__form-radio--checked--focus--box-shadow-color:var(--color--primary-300, #e2f4ef);--ez-radio-button__form-radio--checked--hover--background-color:var(--color--inverted, #fff);--ez-radio-button__form-radio--checked--hover--box-shadow-color:#daece7;--ez-radio-button__form-radio--hover--box-shadow-color:var(--color--strokes, #dce0e8);--ez-radio-button__form-radio--checked--disabled--hover--background-color:var(--background--medium, #f0f3f7);display:flex;width:100%;margin:10px;flex-direction:column;align-items:flex-start}.form--vertical{display:flex;flex-direction:column}.form--horizontal{display:flex;flex-direction:row}.form__group{display:flex;align-items:center;margin-top:15px}.label{font-family:var(--ez-radio-button--font-family);font-size:var(--ez-radio-button--font-size);font-weight:var(--ez-radio-button--font-weight);color:var(--ez-radio-button--font-color)}.form__label{cursor:pointer;padding-left:12px;padding-right:25px;font-weight:var(--ez-radio-button__form-label--font-weight);color:var(--ez-radio-button__form-label--title-primary);font-family:var(--ez-radio-button__form-label--font-family);font-size:var(--ez-radio-button__form-label--font-size)}.form__radio{cursor:pointer;appearance:none;outline:none;position:relative;display:flex;align-items:center;justify-content:center;margin:0;padding:0;width:18px;height:18px;border-radius:50%;border:2px solid var(--ez-radio-button__form-radio--border-color)}.form__radio::before{content:'';display:block;position:absolute;opacity:0;transition:all 300ms ease-in-out;height:calc(18px/2);width:calc(18px/2);border-radius:50%;background:var(--ez-radio-button__form-radio--checked--color)}.form__radio:checked:before{opacity:1}.form__radio:checked{border:2px solid var(--ez-radio-button__form-radio--checked--color)}.form__radio:disabled{cursor:default;border:2px solid var(--ez-radio-button__form-radio--disabled--border-color);background-color:var(--ez-radio-button__form-radio--disabled--background-color)}.form__radio:disabled:hover{box-shadow:inherit}input[type=radio]:disabled~label{cursor:default;color:var(--ez-radio-button__form-radio--disabled--color)}.form__radio:disabled:before{background:var(--ez-radio-button__form-radio--disabled--before--background-color)}.form__radio:focus{transition:0.25s linear;background-color:var(--ez-radio-button__form-radio--focus--background-color);box-shadow:0px 0px 0px 6px var(--ez-radio-button__form-radio--checked--box-shadow-color)}.form__radio:checked:focus{transition:0.25s linear;background-color:var(--ez-radio-button__form-radio--checked--focus--background-color);box-shadow:0px 0px 0px 6px var(--ez-radio-button__form-radio--checked--focus--box-shadow-color)}.form__radio:checked:hover{transition:0.25s linear;background-color:var(--ez-radio-button__form-radio--checked--hover--background-color);box-shadow:0px 0px 0px 6px var(--ez-radio-button__form-radio--checked--hover--box-shadow-color)}.form__radio:hover{transition:0.25s linear;box-shadow:0px 0px 0px 6px var(--ez-radio-button__form-radio--hover--box-shadow-color)}.form__radio:checked:disabled:hover{box-shadow:none;background-color:var(--ez-radio-button__form-radio--checked--disabled--hover--background-color)}";export{i as ez_radio_button}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as i,h as s,H as e,g as a}from"./p-3c7ea91b.js";let o=class{constructor(s){t(this,s),this.ezChange=i(this,"ezChange",7),this.setFocusedParam=t=>{if("Enter"===t.key){const i=this._processedTabs[this._focusedIndex];this.handleTabClick(i),t.preventDefault(),this.setFocusedTab(i.index)}else if("ArrowLeft"===t.key||"ArrowRight"===t.key){let i;if("ArrowLeft"===t.key)i=!1;else{if("ArrowRight"!==t.key)return;i=!0}this._focusedIndex=void 0===this._focusedIndex?!1===i?void 0!==this.selectedIndex?this.selectedIndex-1:void 0:void 0!==this.selectedIndex?this.selectedIndex+1:void 0:!1===i?this._focusedIndex-1:this._focusedIndex+1,this._focusedIndex<0?this._focusedIndex=0:this._focusedIndex>this._processedTabs.length-1&&(this._focusedIndex=this._processedTabs.length-1),this.setFocusedBtn(!0,this._focusedIndex),this.setFocusedTab(this._focusedIndex)}else if("Tab"===t.key||"Escape"===t.key){const i=this._processedTabs[this.selectedIndex];this._focusedIndex=void 0,this.handleTabClick(i),t.preventDefault(),this.setFocusedTab(this.selectedIndex)}}}handleTabClick(t){this.selectedIndex=t.index,this._focusedIndex=void 0,this.selectedTab=t.tabKey,this.ezChange.emit(t),this.setFocusedBtn(!1,t.index)}componentWillRender(){this._processedTabs||(this._processedTabs=[],this.tabs&&this.tabs.split(",").forEach((t=>{t=t.trim(),this._processedTabs.push({label:t,tabKey:t,index:this._processedTabs.length})})),this._hostElem.querySelectorAll("ez-tab").forEach((t=>{const i=t.getAttribute("tabKey"),s={label:t.getAttribute("label"),tabKey:i,index:this._processedTabs.length},e=t.firstChild;e&&(e.setAttribute("slot","tab"+s.index),this._hostElem.appendChild(e)),this._processedTabs.push(s)})))}handleSlotChange(t){const i=t.target.assignedElements()[0];i&&(i.style.marginLeft="6px")}scrollBackward(){const t=this._scrollContainer;t&&(t.scrollLeft-=t.clientWidth)}scrollFoward(){const t=this._scrollContainer;if(t){let i=null;t.querySelectorAll(".tab").forEach((s=>{s.getBoundingClientRect().right<t.clientWidth&&(i=s)})),t.scrollLeft=i.offsetLeft+i.offsetWidth}}componentDidRender(){this.updateScroll()}updateScroll(){const t=this._scrollContainer;if(t){const{scrollWidth:i,clientWidth:s,scrollLeft:e}=t,a=i-s-Math.ceil(e);this._startHidden=t.scrollLeft>0,this._endHidden=a>0,this._startHidden?this._backwardButton.classList.remove("hidden"):this._backwardButton.classList.add("hidden"),this._endHidden?this._forwardButton.classList.remove("hidden"):this._forwardButton.classList.add("hidden");const o=["","startHidden","endHidden","middle"],r=o[Number(this._startHidden)|Number(this._endHidden)<<1];o.forEach((i=>{i!==r&&t.classList.contains(i)&&t.classList.remove(i)})),r&&!t.classList.contains(r)&&t.classList.add(r)}}domScrollHandler(){window.clearTimeout(this._scrollCallBack),this._scrollCallBack=window.setTimeout((()=>{this.updateScroll()}),200)}setFocusedTab(t){window.clearTimeout(this._scrollCallBackTest),this._scrollCallBackTest=window.setTimeout((()=>{this._scrollContainer.querySelector(`#tab${t}`).scrollIntoView()}),200)}getTextWidth(t){void 0===this._textMesurement&&(this._textMesurement=this._hostElem.shadowRoot.ownerDocument.createElement("canvas"));const i=this._textMesurement.getContext("2d");return i.font="14px Sora, Algerian",Math.min(220,24+i.measureText(t).width)+"px"}setFocusedBtn(t,i){this._scrollContainer.querySelectorAll(".tab").forEach((s=>{s.classList.remove("is-focused"),s.id==="tab"+i&&t&&s.classList.add("is-focused")}))}render(){return s(e,null,s("button",{class:"backward-button",ref:t=>this._backwardButton=t,onClick:()=>this.scrollBackward()}),s("div",{class:"scroll",ref:t=>this._scrollContainer=t,onScroll:()=>this.domScrollHandler(),onKeyDown:t=>this.setFocusedParam(t)},this._processedTabs.map(((t,i)=>{const e={"min-width":this.getTextWidth(t.label)},a="tab"+i,o=i===this.selectedIndex||this.selectedTab&&t.tabKey===this.selectedTab;return o&&(this.selectedTab=t.tabKey,this.selectedIndex=i),s("button",{id:a,class:"tab"+(o?" is-active":""),onClick:()=>this.handleTabClick(t),style:e},s("span",{class:"tab-label",title:t.label},t.label),s("slot",{name:a,onSlotchange:t=>{this.handleSlotChange(t)}}))}))),s("button",{class:"forward-button",ref:t=>this._forwardButton=t,onClick:()=>this.scrollFoward()}))}get _hostElem(){return a(this)}};o.style='@keyframes activate{0%{clip-path:inset(calc(100% - 3px) 50% 0px 50%)}100%{clip-path:inset(calc(100% - 3px) 0px 0px 0px)}}:host{display:flex;position:relative;width:100%;overflow:hidden;--tabselector--backward-icon:url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="16px" width="10px"><path d="M 9.7808475,13.860393 3.9204526,8.0000004 9.7808475,2.0624965 7.9301965,0.28895552 0.21915255,8.0000004 7.9301965,15.711044 Z"/></svg>\');--tabselector--forward-icon:url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="16px" width="10px"><path d="M 0.21915251,13.860393 6.0795475,8.0000007 0.21915251,2.0624968 2.0698036,0.28895588 9.7808475,8.0000007 2.0698036,15.711044 Z"/></svg>\')}.scroll{display:flex;width:100%;scroll-behavior:smooth;overflow-x:auto;scrollbar-width:none}.scroll.startHidden{-webkit-mask-image:linear-gradient(90deg, transparent 20px, #000 48px)}.scroll.middle{-webkit-mask-image:linear-gradient(90deg, transparent 20px, #000 48px, #000 calc(100% - 48px), transparent calc(100% - 20px))}.scroll.endHidden{-webkit-mask-image:linear-gradient(90deg, #000 calc(100% - 48px), transparent calc(100% - 20px))}.tab{display:flex;border:none;min-width:100px;background-color:unset;cursor:pointer;padding:6px 12px;align-items:center;justify-content:center;color:var(--text--primary, #626e82);font-family:var(--font-pattern, "Sora, Algerian");font-size:var(--title--small, 14px)}.tab:focus,.forward-button,.backward-button{outline:none}.is-active{position:relative;color:var(--color--primary, #008561)}.is-active::after{content:"";position:absolute;width:100%;height:100%;background-color:var(--color--primary, #008561);clip-path:inset(calc(100% - 3px) 0px 0px 0px);animation:activate 0.25s ease-in-out}.is-focused{border:1px dashed var(--color--primary, #000000c5)}.tab-label{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;text-shadow:var(--text-shadow);margin-bottom:var(--space--extra-small, 3px)}.forward-button,.backward-button{position:absolute;z-index:1;display:flex;box-sizing:border-box;padding:0px;top:0px;right:0px;width:16px;height:100%;border:none;background-color:unset;cursor:pointer;justify-content:center;align-items:center}.backward-button{left:0px}.forward-button::after,.backward-button::after{content:\'\';display:flex;background-color:var(--text--primary, #008561);width:10px;height:16px}.forward-button::after{-webkit-mask-image:var(--tabselector--forward-icon);mask-image:var(--tabselector--forward-icon)}.backward-button::after{-webkit-mask-image:var(--tabselector--backward-icon);mask-image:var(--tabselector--backward-icon)}.forward-button:hover::after,.backward-button:hover::after{background-color:var(--color--primary, #4e4e4e)}.hidden{display:none}.scroll::-webkit-scrollbar{display:none}';export{o as ez_tabselector}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,h as i,g as e,H as s}from"./p-3c7ea91b.js";let h=class{constructor(i){t(this,i)}async show(t){t!==this._focusedIndex&&0<=t&&t<this._totalStackItems&&(this.policyHideRemove(),this.policyShowAppend(t),this._focusedIndex=t)}async getSelectedIndex(){return this._focusedIndex}policyHideRemove(){let t=this._hostElem.querySelector(`#el_${this._focusedIndex}`);this.checkElementVisibility(t)}policyShowAppend(t){let i=this._hostElem.querySelector(`#el_${t}`);i?i.removeAttribute("style"):this._hostElem.append(this._elemList[t])}checkElementVisibility(t){"hide"!==t.getAttribute("hidePolicy")&&t.getAttribute("hidePolicy")?"remove"===t.getAttribute("hidePolicy")&&t.remove():t.setAttribute("style","display: none")}componentWillRender(){this._elemList||(this._elemList=[],this._focusedIndex=0,this._totalStackItems=0,this._hostElem.classList.add("ez-view-stack__container"),this._hostElem.querySelectorAll("stack-item").forEach(((t,i)=>{t.setAttribute("id",`el_${i}`),0!==i&&this.checkElementVisibility(t),this._totalStackItems++,this._elemList.push(t)})))}disconectCallback(){this._hostElem=null,this._elemList=null}render(){return i(s,null)}get _hostElem(){return e(this)}};h.style=":host{width:100%;height:100%}.ez-view-stack__container{width:100%;height:100%}";export{h as ez_view_stack}
|