@sankhyalabs/ezui 7.1.0-dev.22 → 7.1.0-dev.23
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/classic-search-list_7.cjs.entry.js +2 -2
- package/dist/cjs/ez-actions-button.cjs.entry.js +1 -1
- package/dist/cjs/ez-alert-list.cjs.entry.js +1 -1
- package/dist/cjs/ez-alert.cjs.entry.js +1 -1
- package/dist/cjs/ez-application.cjs.entry.js +1 -1
- package/dist/cjs/ez-avatar.cjs.entry.js +1 -1
- package/dist/cjs/ez-badge.cjs.entry.js +1 -1
- package/dist/cjs/ez-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/ez-button.cjs.entry.js +1 -1
- package/dist/cjs/ez-calendar.cjs.entry.js +1 -1
- package/dist/cjs/ez-card-item.cjs.entry.js +1 -1
- package/dist/cjs/ez-chart.cjs.entry.js +1 -1
- package/dist/cjs/ez-check.cjs.entry.js +1 -1
- package/dist/cjs/ez-chip.cjs.entry.js +1 -1
- package/dist/cjs/ez-classic-combo-box.cjs.entry.js +1 -1
- package/dist/cjs/ez-classic-date-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-classic-date-time-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-classic-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-classic-number-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-classic-search-plus.cjs.entry.js +1 -1
- package/dist/cjs/ez-classic-search.cjs.entry.js +1 -1
- package/dist/cjs/ez-classic-text-area.cjs.entry.js +1 -1
- package/dist/cjs/ez-classic-time-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-collapsible-box.cjs.entry.js +1 -1
- package/dist/cjs/ez-combo-box.cjs.entry.js +1 -1
- package/dist/cjs/ez-date-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-date-time-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-dialog.cjs.entry.js +1 -1
- package/dist/cjs/ez-double-list.cjs.entry.js +1 -1
- package/dist/cjs/ez-dropdown.cjs.entry.js +1 -1
- package/dist/cjs/ez-empty-card.cjs.entry.js +1 -1
- package/dist/cjs/ez-file-item.cjs.entry.js +1 -1
- package/dist/cjs/ez-filter-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-form-view.cjs.entry.js +1 -1
- package/dist/cjs/ez-form.cjs.entry.js +2 -2
- package/dist/cjs/ez-grid-view.cjs.entry.js +1 -1
- package/dist/cjs/ez-grid.cjs.entry.js +2 -2
- package/dist/cjs/ez-guide-navigator.cjs.entry.js +1 -1
- package/dist/cjs/ez-icon.cjs.entry.js +1 -1
- package/dist/cjs/ez-link-builder_6.cjs.entry.js +1 -1
- package/dist/cjs/ez-list-item.cjs.entry.js +1 -1
- package/dist/cjs/ez-list.cjs.entry.js +1 -1
- package/dist/cjs/ez-loading-bar.cjs.entry.js +1 -1
- package/dist/cjs/ez-modal-container.cjs.entry.js +1 -1
- package/dist/cjs/ez-modal.cjs.entry.js +1 -1
- package/dist/cjs/ez-multi-selection-list.cjs.entry.js +1 -1
- package/dist/cjs/ez-number-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-pagination.cjs.entry.js +1 -1
- package/dist/cjs/ez-popover-core.cjs.entry.js +1 -1
- package/dist/cjs/ez-popover-plus_3.cjs.entry.js +1 -1
- package/dist/cjs/ez-popover.cjs.entry.js +1 -1
- package/dist/cjs/ez-popup.cjs.entry.js +1 -1
- package/dist/cjs/ez-progress-bar.cjs.entry.js +1 -1
- package/dist/cjs/ez-radio-button.cjs.entry.js +1 -1
- package/dist/cjs/ez-rich-toolbar-item.cjs.entry.js +1 -1
- package/dist/cjs/ez-scroller_2.cjs.entry.js +1 -1
- package/dist/cjs/ez-search-plus.cjs.entry.js +1 -1
- package/dist/cjs/ez-search-result-list.cjs.entry.js +1 -1
- package/dist/cjs/ez-search.cjs.entry.js +1 -1
- package/dist/cjs/ez-sidebar-navigator.cjs.entry.js +1 -1
- package/dist/cjs/ez-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/ez-sortable-list.cjs.entry.js +1 -1
- package/dist/cjs/ez-spinner.cjs.entry.js +1 -1
- package/dist/cjs/ez-split-button.cjs.entry.js +13 -14
- package/dist/cjs/ez-split-item.cjs.entry.js +1 -1
- package/dist/cjs/ez-split-panel.cjs.entry.js +1 -1
- package/dist/cjs/ez-tabselector.cjs.entry.js +1 -1
- package/dist/cjs/ez-tag-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-tag.cjs.entry.js +1 -1
- package/dist/cjs/ez-text-area.cjs.entry.js +1 -1
- package/dist/cjs/ez-text-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-tile-medium.cjs.entry.js +1 -1
- package/dist/cjs/ez-tile.cjs.entry.js +1 -1
- package/dist/cjs/ez-time-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-toast.cjs.entry.js +1 -1
- package/dist/cjs/ez-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/ez-tree.cjs.entry.js +1 -1
- package/dist/cjs/ez-underface.cjs.entry.js +1 -1
- package/dist/cjs/ez-upload.cjs.entry.js +1 -1
- package/dist/cjs/ez-view-stack.cjs.entry.js +1 -1
- package/dist/cjs/ezui.cjs.js +2 -2
- package/dist/cjs/filter-column.cjs.entry.js +1 -1
- package/dist/cjs/{index-9e5554cb.js → index-a7b0c73d.js} +0 -3
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{search-column-9654bf26.js → search-column-fbf680d7.js} +7 -2
- package/dist/collection/components/ez-split-button/ez-split-button.js +18 -13
- package/dist/collection/utils/searchColumn/search-column.js +6 -1
- package/dist/custom-elements/index.js +19 -15
- package/dist/esm/classic-search-list_7.entry.js +2 -2
- package/dist/esm/ez-actions-button.entry.js +1 -1
- package/dist/esm/ez-alert-list.entry.js +1 -1
- package/dist/esm/ez-alert.entry.js +1 -1
- package/dist/esm/ez-application.entry.js +1 -1
- package/dist/esm/ez-avatar.entry.js +1 -1
- package/dist/esm/ez-badge.entry.js +1 -1
- package/dist/esm/ez-breadcrumb.entry.js +1 -1
- package/dist/esm/ez-button.entry.js +1 -1
- package/dist/esm/ez-calendar.entry.js +1 -1
- package/dist/esm/ez-card-item.entry.js +1 -1
- package/dist/esm/ez-chart.entry.js +1 -1
- package/dist/esm/ez-check.entry.js +1 -1
- package/dist/esm/ez-chip.entry.js +1 -1
- package/dist/esm/ez-classic-combo-box.entry.js +1 -1
- package/dist/esm/ez-classic-date-input.entry.js +1 -1
- package/dist/esm/ez-classic-date-time-input.entry.js +1 -1
- package/dist/esm/ez-classic-input.entry.js +1 -1
- package/dist/esm/ez-classic-number-input.entry.js +1 -1
- package/dist/esm/ez-classic-search-plus.entry.js +1 -1
- package/dist/esm/ez-classic-search.entry.js +1 -1
- package/dist/esm/ez-classic-text-area.entry.js +1 -1
- package/dist/esm/ez-classic-time-input.entry.js +1 -1
- package/dist/esm/ez-collapsible-box.entry.js +1 -1
- package/dist/esm/ez-combo-box.entry.js +1 -1
- package/dist/esm/ez-date-input.entry.js +1 -1
- package/dist/esm/ez-date-time-input.entry.js +1 -1
- package/dist/esm/ez-dialog.entry.js +1 -1
- package/dist/esm/ez-double-list.entry.js +1 -1
- package/dist/esm/ez-dropdown.entry.js +1 -1
- package/dist/esm/ez-empty-card.entry.js +1 -1
- package/dist/esm/ez-file-item.entry.js +1 -1
- package/dist/esm/ez-filter-input.entry.js +1 -1
- package/dist/esm/ez-form-view.entry.js +1 -1
- package/dist/esm/ez-form.entry.js +2 -2
- package/dist/esm/ez-grid-view.entry.js +1 -1
- package/dist/esm/ez-grid.entry.js +2 -2
- package/dist/esm/ez-guide-navigator.entry.js +1 -1
- package/dist/esm/ez-icon.entry.js +1 -1
- package/dist/esm/ez-link-builder_6.entry.js +1 -1
- package/dist/esm/ez-list-item.entry.js +1 -1
- package/dist/esm/ez-list.entry.js +1 -1
- package/dist/esm/ez-loading-bar.entry.js +1 -1
- package/dist/esm/ez-modal-container.entry.js +1 -1
- package/dist/esm/ez-modal.entry.js +1 -1
- package/dist/esm/ez-multi-selection-list.entry.js +1 -1
- package/dist/esm/ez-number-input.entry.js +1 -1
- package/dist/esm/ez-pagination.entry.js +1 -1
- package/dist/esm/ez-popover-core.entry.js +1 -1
- package/dist/esm/ez-popover-plus_3.entry.js +1 -1
- package/dist/esm/ez-popover.entry.js +1 -1
- package/dist/esm/ez-popup.entry.js +1 -1
- package/dist/esm/ez-progress-bar.entry.js +1 -1
- package/dist/esm/ez-radio-button.entry.js +1 -1
- package/dist/esm/ez-rich-toolbar-item.entry.js +1 -1
- package/dist/esm/ez-scroller_2.entry.js +1 -1
- package/dist/esm/ez-search-plus.entry.js +1 -1
- package/dist/esm/ez-search-result-list.entry.js +1 -1
- package/dist/esm/ez-search.entry.js +1 -1
- package/dist/esm/ez-sidebar-navigator.entry.js +1 -1
- package/dist/esm/ez-skeleton.entry.js +1 -1
- package/dist/esm/ez-sortable-list.entry.js +1 -1
- package/dist/esm/ez-spinner.entry.js +1 -1
- package/dist/esm/ez-split-button.entry.js +13 -14
- package/dist/esm/ez-split-item.entry.js +1 -1
- package/dist/esm/ez-split-panel.entry.js +1 -1
- package/dist/esm/ez-tabselector.entry.js +1 -1
- package/dist/esm/ez-tag-input.entry.js +1 -1
- package/dist/esm/ez-tag.entry.js +1 -1
- package/dist/esm/ez-text-area.entry.js +1 -1
- package/dist/esm/ez-text-input.entry.js +1 -1
- package/dist/esm/ez-tile-medium.entry.js +1 -1
- package/dist/esm/ez-tile.entry.js +1 -1
- package/dist/esm/ez-time-input.entry.js +1 -1
- package/dist/esm/ez-toast.entry.js +1 -1
- package/dist/esm/ez-tooltip.entry.js +1 -1
- package/dist/esm/ez-tree.entry.js +1 -1
- package/dist/esm/ez-underface.entry.js +1 -1
- package/dist/esm/ez-upload.entry.js +1 -1
- package/dist/esm/ez-view-stack.entry.js +1 -1
- package/dist/esm/ezui.js +3 -3
- package/dist/esm/filter-column.entry.js +1 -1
- package/dist/esm/{index-5a720e56.js → index-baa5e267.js} +1 -3
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{search-column-c3df6285.js → search-column-40a78cac.js} +7 -2
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/{p-e275353b.entry.js → p-0248846f.entry.js} +1 -1
- package/dist/ezui/{p-34d596a3.entry.js → p-0625743b.entry.js} +1 -1
- package/dist/ezui/p-07fb22c3.entry.js +1 -0
- package/dist/ezui/{p-81461d2f.entry.js → p-1e7a8633.entry.js} +1 -1
- package/dist/ezui/{p-6b51c9cc.entry.js → p-1f50fa05.entry.js} +1 -1
- package/dist/ezui/{p-cf33bc48.entry.js → p-20c024f7.entry.js} +1 -1
- package/dist/ezui/{p-e4c7eb39.js → p-23a36bb6.js} +2 -2
- package/dist/ezui/{p-169d460d.entry.js → p-2528e988.entry.js} +1 -1
- package/dist/ezui/{p-d57ea090.entry.js → p-26cd4c2e.entry.js} +1 -1
- package/dist/ezui/{p-06f1b8e4.entry.js → p-288631d1.entry.js} +1 -1
- package/dist/ezui/{p-e0380234.entry.js → p-2da9faf1.entry.js} +1 -1
- package/dist/ezui/{p-f32d5a82.entry.js → p-34d459e4.entry.js} +1 -1
- package/dist/ezui/{p-f7ca8634.entry.js → p-411c0222.entry.js} +1 -1
- package/dist/ezui/{p-87739608.entry.js → p-44183c39.entry.js} +1 -1
- package/dist/ezui/{p-2c123fdf.entry.js → p-4af745e1.entry.js} +1 -1
- package/dist/ezui/{p-0820f8c3.entry.js → p-4c2a4435.entry.js} +1 -1
- package/dist/ezui/{p-fe0bca65.entry.js → p-4c76b365.entry.js} +1 -1
- package/dist/ezui/{p-4a876b8b.entry.js → p-4d30b703.entry.js} +1 -1
- package/dist/ezui/{p-4d909730.entry.js → p-4e576bb9.entry.js} +1 -1
- package/dist/ezui/{p-2fa490f1.entry.js → p-4e869617.entry.js} +1 -1
- package/dist/ezui/{p-55a9e4ba.entry.js → p-4f7ad3ee.entry.js} +1 -1
- package/dist/ezui/{p-3453dad5.entry.js → p-544605c4.entry.js} +1 -1
- package/dist/ezui/{p-05bcbe61.entry.js → p-556bf329.entry.js} +1 -1
- package/dist/ezui/{p-be2e39c5.entry.js → p-56565777.entry.js} +1 -1
- package/dist/ezui/{p-27c8a9b7.entry.js → p-57b68d43.entry.js} +1 -1
- package/dist/ezui/{p-12cc95dc.entry.js → p-5abb220b.entry.js} +1 -1
- package/dist/ezui/{p-6fc26622.entry.js → p-5ed81457.entry.js} +1 -1
- package/dist/ezui/{p-c754774e.entry.js → p-6020f3d5.entry.js} +1 -1
- package/dist/ezui/{p-f0425f87.entry.js → p-619225ce.entry.js} +1 -1
- package/dist/ezui/{p-51e34317.entry.js → p-6369a0cd.entry.js} +1 -1
- package/dist/ezui/{p-81a98a7c.entry.js → p-679a2942.entry.js} +1 -1
- package/dist/ezui/{p-29341f74.js → p-6a794336.js} +1 -1
- package/dist/ezui/{p-458027b5.entry.js → p-6ac056d7.entry.js} +1 -1
- package/dist/ezui/{p-0b531233.entry.js → p-6d596a5a.entry.js} +1 -1
- package/dist/ezui/{p-1723f728.entry.js → p-6f77a359.entry.js} +1 -1
- package/dist/ezui/{p-82e1d7fc.entry.js → p-7134726a.entry.js} +1 -1
- package/dist/ezui/{p-e039e049.entry.js → p-729bd1be.entry.js} +1 -1
- package/dist/ezui/{p-70f30bfe.entry.js → p-7953ecb9.entry.js} +1 -1
- package/dist/ezui/{p-636ea910.entry.js → p-7edc3ef7.entry.js} +1 -1
- package/dist/ezui/{p-e195eaad.entry.js → p-7f792043.entry.js} +1 -1
- package/dist/ezui/{p-82fa4b09.entry.js → p-8df1ca33.entry.js} +1 -1
- package/dist/ezui/{p-75443a91.entry.js → p-8e5f1c74.entry.js} +1 -1
- package/dist/ezui/{p-78e975b4.entry.js → p-91c9d50e.entry.js} +1 -1
- package/dist/ezui/{p-05e68ab3.entry.js → p-93e1c917.entry.js} +1 -1
- package/dist/ezui/{p-0d393a5d.entry.js → p-951b32a1.entry.js} +1 -1
- package/dist/ezui/{p-0ba284cd.entry.js → p-97312709.entry.js} +1 -1
- package/dist/ezui/{p-d3aca6aa.entry.js → p-987185c4.entry.js} +1 -1
- package/dist/ezui/{p-c2b20f78.entry.js → p-9f5fa3f9.entry.js} +1 -1
- package/dist/ezui/{p-bc693db6.entry.js → p-a0bf1fc7.entry.js} +1 -1
- package/dist/ezui/{p-27421015.entry.js → p-a0f51b99.entry.js} +1 -1
- package/dist/ezui/{p-9bcfa689.entry.js → p-a3075f52.entry.js} +1 -1
- package/dist/ezui/{p-f26b97e9.entry.js → p-a3ada561.entry.js} +1 -1
- package/dist/ezui/{p-71b341cc.entry.js → p-a3bad8f8.entry.js} +1 -1
- package/dist/ezui/{p-e94d3af5.entry.js → p-a4351519.entry.js} +1 -1
- package/dist/ezui/{p-dfca5946.entry.js → p-a80b1287.entry.js} +1 -1
- package/dist/ezui/{p-534209bf.entry.js → p-a872c642.entry.js} +1 -1
- package/dist/ezui/{p-e963cb3f.entry.js → p-b0a716ef.entry.js} +1 -1
- package/dist/ezui/p-b36475f9.entry.js +1 -0
- package/dist/ezui/{p-9fb7131e.entry.js → p-b705b342.entry.js} +1 -1
- package/dist/ezui/{p-f1b54699.entry.js → p-b8078832.entry.js} +1 -1
- package/dist/ezui/p-bc2f844e.entry.js +1 -0
- package/dist/ezui/{p-75e8862c.entry.js → p-c0ae79fa.entry.js} +1 -1
- package/dist/ezui/{p-75e650ff.entry.js → p-c56ee8c0.entry.js} +1 -1
- package/dist/ezui/{p-25748a4e.entry.js → p-cd8be0c7.entry.js} +1 -1
- package/dist/ezui/{p-24993171.entry.js → p-ce0a0036.entry.js} +1 -1
- package/dist/ezui/{p-ce2614fc.entry.js → p-cfa26133.entry.js} +1 -1
- package/dist/ezui/{p-c96e536d.entry.js → p-d2645bdf.entry.js} +1 -1
- package/dist/ezui/{p-a9432878.entry.js → p-d6742c1e.entry.js} +1 -1
- package/dist/ezui/{p-770cf2b8.entry.js → p-d6f50207.entry.js} +1 -1
- package/dist/ezui/p-d8cc640d.entry.js +1 -0
- package/dist/ezui/{p-9d515e5b.entry.js → p-df802548.entry.js} +1 -1
- package/dist/ezui/{p-892e7326.entry.js → p-e2689b33.entry.js} +1 -1
- package/dist/ezui/{p-e0fd2ce5.entry.js → p-e2972977.entry.js} +1 -1
- package/dist/ezui/{p-181cb82f.entry.js → p-e3a42f47.entry.js} +1 -1
- package/dist/ezui/{p-29f0de90.entry.js → p-e3cd5080.entry.js} +1 -1
- package/dist/ezui/{p-4df2edb5.entry.js → p-e493ad57.entry.js} +1 -1
- package/dist/ezui/{p-000159dc.entry.js → p-e75c7a23.entry.js} +1 -1
- package/dist/ezui/{p-e9b409c1.entry.js → p-e7a7c594.entry.js} +1 -1
- package/dist/ezui/{p-b21efe83.entry.js → p-e8c57463.entry.js} +1 -1
- package/dist/ezui/{p-35e3715c.entry.js → p-ef8bd3e8.entry.js} +1 -1
- package/dist/ezui/{p-980f1f18.entry.js → p-f34ec732.entry.js} +1 -1
- package/dist/ezui/{p-a6ea8da3.entry.js → p-f5552540.entry.js} +1 -1
- package/dist/ezui/{p-44b39e81.entry.js → p-fa6732f2.entry.js} +1 -1
- package/dist/types/components/ez-split-button/ez-split-button.d.ts +1 -2
- package/package.json +1 -1
- package/dist/ezui/p-14d6aeb8.entry.js +0 -1
- package/dist/ezui/p-2b51d5a9.entry.js +0 -1
- package/dist/ezui/p-6ec40dec.entry.js +0 -1
- package/dist/ezui/p-8f7373ab.entry.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as a,h as r}from"./p-
|
|
1
|
+
import{r as a,h as r}from"./p-23a36bb6.js";import{i as t}from"./p-c178730b.js";import"@sankhyalabs/core";const e=class{constructor(r){a(this,r),this.DECIMAL_PARSE_BASE=10,this.FONT_SIZE_BASE_CALC=.375,this.DEFAULT_ICON_NAME="account-outline",this.name=void 0,this.imageSrc=void 0,this.iconName=void 0,this.size="100",this.shape="circle",this.isInteractive=!1}getInitial(){var a;return(null===(a=this.name)||void 0===a?void 0:a.trim())?this.name.charAt(0).toUpperCase():""}calcFontSize(){const a=parseInt(this.size,this.DECIMAL_PARSE_BASE);return this.FONT_SIZE_BASE_CALC*a}getClass(){return`avatar avatar--${this.size} avatar--${this.shape} ${this.imageSrc?"avatar--has-image":""}`}renderAvatarContent(){var a;return this.imageSrc?r("img",{src:this.imageSrc,alt:this.name||"Avatar",class:"avatar-image"}):this.name?r("span",{class:"avatar-initial","aria-hidden":"true"},this.getInitial()):r("ez-icon",{class:"avatar-icon",iconName:null!==(a=this.iconName)&&void 0!==a?a:this.DEFAULT_ICON_NAME,fontSize:this.calcFontSize()})}async componentWillLoad(){this.i18n=await t()}render(){return this.isInteractive?r("button",{"aria-label":this.i18n("app.profile"),class:this.getClass()},this.renderAvatarContent()):r("figure",{class:this.getClass()},this.renderAvatarContent())}};e.style=":host{--ez-avatar--background-color:var(--color--ocean-green-600, #008561);--ez-avatar--color:var(--color--gray-70, #fff);--ez-avatar--border-radius-circle:50%;--ez-avatar--border-radius-square:25%;--ez-avatar--background-color-hover:var(--color--ocean-green-700, #00684C)}button,figure{display:flex;align-items:center;justify-content:center;border:var(--ez-avatar--border);background-color:var(--ez-avatar--background-color);color:var(--ez-avatar--color);font-weight:var(--font-weight--medium, 500);font-family:var(--font-pattern, 'Roboto');transition:background-color 0.2s linear, color 0.2s linear;margin:0;padding:0}button:hover{cursor:pointer;background-color:var(--ez-avatar--background-color-hover)}.avatar--320{--avatar-size:320px;width:20rem;height:20rem}.avatar--300{--avatar-size:300px;width:18.75rem;height:18.75rem}.avatar--280{--avatar-size:280px;width:17.5rem;height:17.5rem}.avatar--260{--avatar-size:260px;width:16.25rem;height:16.25rem}.avatar--240{--avatar-size:240px;width:15rem;height:15rem}.avatar--220{--avatar-size:220px;width:13.75rem;height:13.75rem}.avatar--200{--avatar-size:200px;width:12.5rem;height:12.5rem}.avatar--180{--avatar-size:180px;width:11.25rem;height:11.25rem}.avatar--160{--avatar-size:160px;width:10rem;height:10rem}.avatar--140{--avatar-size:140px;width:8.75rem;height:8.75rem}.avatar--120{--avatar-size:120px;width:7.5rem;height:7.5rem}.avatar--100{--avatar-size:100px;width:6.25rem;height:6.25rem}.avatar--80{--avatar-size:80px;width:5rem;height:5rem}.avatar--60{--avatar-size:60px;width:3.75rem;height:3.75rem}.avatar-initial{font-size:calc(0.375 * var(--avatar-size));}.avatar--circle{border-radius:var(--ez-avatar--border-radius-circle)}.avatar--square{border-radius:var(--ez-avatar--border-radius-square)}.avatar-image{width:100%;height:100%;object-fit:cover;border-radius:inherit}.avatar--has-image{background-color:transparent}ez-icon{--ez-icon--color:var(--color--gray-70, #fff);font-weight:var(--font-weight--medium, 500)}";export{e as ez_avatar}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,c as r,h as o,H as c,g as a}from"./p-e4c7eb39.js";import{ElementIDUtils as i}from"@sankhyalabs/core";import{C as t}from"./p-b853763b.js";const d=class{constructor(o){e(this,o),this.ezChange=r(this,"ezChange",7),this.label=void 0,this.alternativePlaceholder=void 0,this.value=void 0,this.enabled=!0,this.indeterminate=void 0,this.mode=t.REGULAR,this.compact=!1}observeValue(e,r){this._inputElem&&(e!=r&&(this._inputElem.checked=e),this._inputElem.indeterminate!=this.indeterminate&&(this._inputElem.indeterminate=this.indeterminate))}observeIndeterminate(e,r){this._inputElem&&e!=r&&(this._inputElem.indeterminate=e)}async getMode(){return t[this.mode]}async setFocus(){this._inputElem.focus()}componentDidLoad(){this._element&&i.addIDInfo(this._element,"input")}changeValue(){this.enabled&&(this.value=!this.value,this.ezChange.emit(this.value))}getLabelClasses(){const e=["label"];return this.enabled||e.push("label--disabled"),this.compact||e.push("label--padding"),e.join(" ")}getInputClasses(){var e;const r=[""];return r.push((null===(e=this.mode)||void 0===e?void 0:e.toUpperCase())===t.SWITCH?"switch-mode":"regular-mode"),this.compact&&r.push("compact"),r.join(" ")}render(){return o(c,null,o("input",{type:"checkbox",ref:e=>this._inputElem=e,class:this.getInputClasses(),checked:!0===this.value,onChange:()=>{this.changeValue()},indeterminate:this.indeterminate,disabled:!this.enabled,"data-element-id":i.getInternalIDInfo("input")}),this.renderLabel())}renderLabel(){if(this.label)return o("label",{class:this.getLabelClasses(),onClick:()=>this.changeValue(),title:this.label},this.label," ",this.alternativePlaceholder?o("span",{class:"label-alternative"},this.alternativePlaceholder):void 0)}get _element(){return a(this)}static get watchers(){return{value:["observeValue"],indeterminate:["observeIndeterminate"]}}};d.style=':host{--ez-check--box--width:20px;--ez-check--box--height:20px;--ez-check--width:calc(var(--ez-check--box--width) + var(--ez-check--outter-gap, 14px));--ez-check--height:calc(var(--ez-check--box--width) + var(--ez-check--outter-gap, 14px));--ez-check--border-radius:var(--border--radius-small);--ez-check--checked--background-color:var(--color--primary-200);--ez-check--focus--background-color:var(--color--strokes, #FFFFFF);--ez-check--hover--background-color:var(--background--medium);--ez-check--checked--disabled--background-color:var(--color--disable-secondary);--ez-check--border:var(--border--medium) var(--title--primary);--ez-check--disabled--border:var(--border--medium) var(--color--strokes);--ez-check--checked--border:var(--border--medium) var(--color--primary);--ez-check--checked--hover--background-color:var(--color--primary-200);--ez-check--checked--focus--background-color:var(--color--primary-300, #FFFFFF);--ez-check--check--image:url(\'data:image/svg+xml;utf8,<svg width="8" height="7" viewBox="0 0 8 7" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M7.70002 0.398999L7.48502 0.207997C7.31524 0.0598858 7.09376 -0.0150438 6.86894 -0.000430025C6.64411 0.0141838 6.43419 0.117153 6.28502 0.285997L2.70002 4.332L1.61802 3.384C1.44837 3.23576 1.22697 3.16067 1.00214 3.17509C0.77732 3.18952 0.567332 3.2923 0.418019 3.461L0.229019 3.674C0.0752361 3.84797 -0.00437434 4.07521 0.00721192 4.30713C0.0187982 4.53904 0.120661 4.75722 0.291019 4.915L2.27402 6.762C2.35832 6.8432 2.45842 6.90618 2.56811 6.94702C2.67779 6.98787 2.79471 7.00571 2.91159 6.99942C3.02846 6.99314 3.14279 6.96287 3.24747 6.91049C3.35214 6.85812 3.44492 6.78477 3.52002 6.695L7.79102 1.638C7.94063 1.46048 8.01486 1.23149 7.99786 0.999963C7.98085 0.768436 7.87396 0.552749 7.70002 0.398999Z"/></svg>\');--ez-check--indeterminate--image:url(\'data:image/svg+xml;utf8,<svg width="10" height="2" viewBox="0 0 10 2" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="m 1,0 h 8 c 0.554,0 1,0.446 1,1 0,0.554 -0.446,1 -1,1 H 1 C 0.446,2 0,1.554 0,1 0,0.446 0.446,0 1,0 Z" /></svg>\');--ez-check--check--background-color:var(--color--primary);--ez-check--check--disabled--background-color:var(--color--strokes);--ez-switch--slider--width:34px;--ez-switch--slider--height:14px;--ez-switch--pin--width:19px;--ez-switch--pin--height:19px;--ez-switch--focus--width:32px;--ez-switch--focus--height:32px;--ez-switch--background-color:var(--color--strokes);--ez-switch--disabled--background-color:var(--color--disable-secondary);--ez-switch--disabled--checked--background-color:var(--color--primary-300);--ez-switch--checked--background-color:var(--color--primary);--ez-switch--pin--background-color:var(--background--xlight);--ez-switch--pin--disabled--background-color:var(--color--disable-primary);--ez-switch--pin--checked--background-color:var(--background--xlight);--ez-switch--pin--checked--disabled--background-color:#E8F7F4;--ez-switch--pin--focus--background-color:var(--text--disable);--ez-switch--pin--checked--focus--background-color:var(--color--primary);--ez-switch--pin--border-color:var(--text--primary);--ez-switch--pin--disabled--border-color:var(--text--secondary);--ez-check--label--font-size:var(--text--medium, 14px);--ez-check--label--font-family:var(--font-pattern, Arial);--ez-check--label--color:var(--title--primary, #000);--ez-check--label--disabled--color:var(--text--disable, #AFB6C0);display:flex;align-items:center;margin:0;max-width:100%}input.regular-mode{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;box-sizing:border-box;-webkit-appearance:none;appearance:none;cursor:pointer;border-radius:50%;position:relative}input.compact{margin-right:0px}input.regular-mode:enabled:hover{background-color:var(--ez-check--hover--background-color)}input.regular-mode:enabled:focus{outline:none;background-color:var(--ez-check--focus--background-color)}input.regular-mode:disabled{cursor:auto;background:none}input.regular-mode::before{box-sizing:border-box;content:"";display:block;width:var(--ez-check--box--width);height:var(--ez-check--box--height);border-radius:var(--ez-check--border-radius);border:var(--ez-check--border)}input.regular-mode:disabled::before{border:var(--ez-check--disabled--border)}input.regular-mode:checked:enabled:hover,input.regular-mode:indeterminate:enabled:hover{background-color:var(--ez-check--checked--hover--background-color)}input.regular-mode:checked:enabled:focus,input.regular-mode:indeterminate:enabled:focus{background-color:var(--ez-check--checked--focus--background-color)}input.regular-mode:checked::before,input.regular-mode:indeterminate::before{border:var(--ez-check--checked--border);background-color:var(--ez-check--checked--background-color)}input.regular-mode:disabled:before{border:var(--ez-check--disabled--border);background-color:var(--ez-check--checked--disabled--background-color)}input.regular-mode:checked::after,input.regular-mode:indeterminate:after{display:flex;position:absolute;content:"";background-color:var(--ez-check--check--background-color);width:8px;height:7px;-webkit-mask-image:var(--ez-check--check--image);mask-image:var(--ez-check--check--image)}input.regular-mode:indeterminate:after{display:flex;position:absolute;content:"";background-color:var(--ez-check--check--background-color);width:10px;height:2px;-webkit-mask-image:var(--ez-check--indeterminate--image);mask-image:var(--ez-check--indeterminate--image)}input.regular-mode:checked:disabled::after,input.regular-mode:indeterminate:disabled::after{background-color:var(--ez-check--check--disabled--background-color)}input.switch-mode{flex-shrink:0;-webkit-appearance:none;appearance:none;position:relative;outline:none;cursor:pointer;border-radius:20px;border:var(--border--small, 1px solid) var(--ez-switch--pin--border-color, #626e82);transition:background-color var(--transition);width:var(--ez-switch--slider--width);height:var(--ez-switch--slider--height);background-color:var(--ez-switch--background-color)}input.switch-mode:disabled{background-color:var(--ez-switch--disabled--background-color);border:var(--border--small, 1px solid) var(--ez-switch--pin--disabled--border-color, #a2abb9)}input.switch-mode:checked:disabled{background-color:var(--ez-switch--disabled--checked--background-color)}input.switch-mode::after{content:"";display:block;position:absolute;box-shadow:var(--shadow);transition:transform var(--transition);transition:background-color var(--transition);transition:border-color var(--transition);transform:translateX(-2px) translateY(-4px);border-radius:50%;border:var(--border--small, 1px solid) var(--ez-switch--pin--border-color, #626e82);width:var(--ez-switch--pin--width);height:var(--ez-switch--pin--height);background-color:var(--ez-switch--pin--background-color)}input.switch-mode:disabled::after{background-color:var(--ez-switch--pin--disabled--background-color);border:var(--border--small, 1px solid) var(--ez-switch--pin--disabled--border-color, #a2abb9)}input.switch-mode:checked{transition:background-color var(--transition), border var(--transition);background-color:var(--ez-switch--checked--background-color);border:var(--border--small, 1px solid) var(--color--primary, #008561)}input.switch-mode::before{display:block;content:"";display:block;position:absolute;border-radius:50%;opacity:0;width:var(--ez-switch--focus--width);height:var(--ez-switch--focus--height);top:calc((var(--ez-switch--slider--height) - var(--ez-switch--focus--height)) / 2);left:calc((var(--ez-switch--pin--width) - var(--ez-switch--focus--width) - 2px) / 2);background-color:var(--ez-switch--pin--focus--background-color)}input.switch-mode:focus::before{opacity:0.24;transition:opacity var(--transition)}input.switch-mode:checked:focus::before{background-color:var(--ez-switch--pin--checked--focus--background-color);transform:translateX(calc(var(--ez-switch--slider--width) - var(--ez-switch--pin--width) + 2px))}input.switch-mode:checked::after{transition:transform var(--transition);transition:background-color var(--transition);transition:border-color var(--transition);transform:translateX(calc(var(--ez-switch--slider--width) - var(--ez-switch--pin--width))) translateY(-4px);box-shadow:var(--shadow);background-color:var(--ez-switch--pin--checked--background-color);border:var(--border--small, 1px solid) var(--color--primary, #008561)}input.switch-mode:checked:disabled::after{background-color:var(--ez-switch--pin--checked--disabled--background-color)}.label{flex-shrink:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--ez-check--label--color);font-size:var(--ez-check--label--font-size);font-family:var(--ez-check--label--font-family);cursor:default;width:inherit;display:block;align-content:center;gap:var(--space--small)}.label--disabled{color:var(--ez-check--label--disabled--color)}.label--padding{padding-left:var(--space--extra-small)}.label-alternative{font-size:var(--text--small);color:var(--text--secondary);padding-top:2px}';export{d as ez_check}
|
|
1
|
+
import{r as e,c as r,h as o,H as c,g as a}from"./p-23a36bb6.js";import{ElementIDUtils as i}from"@sankhyalabs/core";import{C as t}from"./p-b853763b.js";const d=class{constructor(o){e(this,o),this.ezChange=r(this,"ezChange",7),this.label=void 0,this.alternativePlaceholder=void 0,this.value=void 0,this.enabled=!0,this.indeterminate=void 0,this.mode=t.REGULAR,this.compact=!1}observeValue(e,r){this._inputElem&&(e!=r&&(this._inputElem.checked=e),this._inputElem.indeterminate!=this.indeterminate&&(this._inputElem.indeterminate=this.indeterminate))}observeIndeterminate(e,r){this._inputElem&&e!=r&&(this._inputElem.indeterminate=e)}async getMode(){return t[this.mode]}async setFocus(){this._inputElem.focus()}componentDidLoad(){this._element&&i.addIDInfo(this._element,"input")}changeValue(){this.enabled&&(this.value=!this.value,this.ezChange.emit(this.value))}getLabelClasses(){const e=["label"];return this.enabled||e.push("label--disabled"),this.compact||e.push("label--padding"),e.join(" ")}getInputClasses(){var e;const r=[""];return r.push((null===(e=this.mode)||void 0===e?void 0:e.toUpperCase())===t.SWITCH?"switch-mode":"regular-mode"),this.compact&&r.push("compact"),r.join(" ")}render(){return o(c,null,o("input",{type:"checkbox",ref:e=>this._inputElem=e,class:this.getInputClasses(),checked:!0===this.value,onChange:()=>{this.changeValue()},indeterminate:this.indeterminate,disabled:!this.enabled,"data-element-id":i.getInternalIDInfo("input")}),this.renderLabel())}renderLabel(){if(this.label)return o("label",{class:this.getLabelClasses(),onClick:()=>this.changeValue(),title:this.label},this.label," ",this.alternativePlaceholder?o("span",{class:"label-alternative"},this.alternativePlaceholder):void 0)}get _element(){return a(this)}static get watchers(){return{value:["observeValue"],indeterminate:["observeIndeterminate"]}}};d.style=':host{--ez-check--box--width:20px;--ez-check--box--height:20px;--ez-check--width:calc(var(--ez-check--box--width) + var(--ez-check--outter-gap, 14px));--ez-check--height:calc(var(--ez-check--box--width) + var(--ez-check--outter-gap, 14px));--ez-check--border-radius:var(--border--radius-small);--ez-check--checked--background-color:var(--color--primary-200);--ez-check--focus--background-color:var(--color--strokes, #FFFFFF);--ez-check--hover--background-color:var(--background--medium);--ez-check--checked--disabled--background-color:var(--color--disable-secondary);--ez-check--border:var(--border--medium) var(--title--primary);--ez-check--disabled--border:var(--border--medium) var(--color--strokes);--ez-check--checked--border:var(--border--medium) var(--color--primary);--ez-check--checked--hover--background-color:var(--color--primary-200);--ez-check--checked--focus--background-color:var(--color--primary-300, #FFFFFF);--ez-check--check--image:url(\'data:image/svg+xml;utf8,<svg width="8" height="7" viewBox="0 0 8 7" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M7.70002 0.398999L7.48502 0.207997C7.31524 0.0598858 7.09376 -0.0150438 6.86894 -0.000430025C6.64411 0.0141838 6.43419 0.117153 6.28502 0.285997L2.70002 4.332L1.61802 3.384C1.44837 3.23576 1.22697 3.16067 1.00214 3.17509C0.77732 3.18952 0.567332 3.2923 0.418019 3.461L0.229019 3.674C0.0752361 3.84797 -0.00437434 4.07521 0.00721192 4.30713C0.0187982 4.53904 0.120661 4.75722 0.291019 4.915L2.27402 6.762C2.35832 6.8432 2.45842 6.90618 2.56811 6.94702C2.67779 6.98787 2.79471 7.00571 2.91159 6.99942C3.02846 6.99314 3.14279 6.96287 3.24747 6.91049C3.35214 6.85812 3.44492 6.78477 3.52002 6.695L7.79102 1.638C7.94063 1.46048 8.01486 1.23149 7.99786 0.999963C7.98085 0.768436 7.87396 0.552749 7.70002 0.398999Z"/></svg>\');--ez-check--indeterminate--image:url(\'data:image/svg+xml;utf8,<svg width="10" height="2" viewBox="0 0 10 2" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="m 1,0 h 8 c 0.554,0 1,0.446 1,1 0,0.554 -0.446,1 -1,1 H 1 C 0.446,2 0,1.554 0,1 0,0.446 0.446,0 1,0 Z" /></svg>\');--ez-check--check--background-color:var(--color--primary);--ez-check--check--disabled--background-color:var(--color--strokes);--ez-switch--slider--width:34px;--ez-switch--slider--height:14px;--ez-switch--pin--width:19px;--ez-switch--pin--height:19px;--ez-switch--focus--width:32px;--ez-switch--focus--height:32px;--ez-switch--background-color:var(--color--strokes);--ez-switch--disabled--background-color:var(--color--disable-secondary);--ez-switch--disabled--checked--background-color:var(--color--primary-300);--ez-switch--checked--background-color:var(--color--primary);--ez-switch--pin--background-color:var(--background--xlight);--ez-switch--pin--disabled--background-color:var(--color--disable-primary);--ez-switch--pin--checked--background-color:var(--background--xlight);--ez-switch--pin--checked--disabled--background-color:#E8F7F4;--ez-switch--pin--focus--background-color:var(--text--disable);--ez-switch--pin--checked--focus--background-color:var(--color--primary);--ez-switch--pin--border-color:var(--text--primary);--ez-switch--pin--disabled--border-color:var(--text--secondary);--ez-check--label--font-size:var(--text--medium, 14px);--ez-check--label--font-family:var(--font-pattern, Arial);--ez-check--label--color:var(--title--primary, #000);--ez-check--label--disabled--color:var(--text--disable, #AFB6C0);display:flex;align-items:center;margin:0;max-width:100%}input.regular-mode{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;box-sizing:border-box;-webkit-appearance:none;appearance:none;cursor:pointer;border-radius:50%;position:relative}input.compact{margin-right:0px}input.regular-mode:enabled:hover{background-color:var(--ez-check--hover--background-color)}input.regular-mode:enabled:focus{outline:none;background-color:var(--ez-check--focus--background-color)}input.regular-mode:disabled{cursor:auto;background:none}input.regular-mode::before{box-sizing:border-box;content:"";display:block;width:var(--ez-check--box--width);height:var(--ez-check--box--height);border-radius:var(--ez-check--border-radius);border:var(--ez-check--border)}input.regular-mode:disabled::before{border:var(--ez-check--disabled--border)}input.regular-mode:checked:enabled:hover,input.regular-mode:indeterminate:enabled:hover{background-color:var(--ez-check--checked--hover--background-color)}input.regular-mode:checked:enabled:focus,input.regular-mode:indeterminate:enabled:focus{background-color:var(--ez-check--checked--focus--background-color)}input.regular-mode:checked::before,input.regular-mode:indeterminate::before{border:var(--ez-check--checked--border);background-color:var(--ez-check--checked--background-color)}input.regular-mode:disabled:before{border:var(--ez-check--disabled--border);background-color:var(--ez-check--checked--disabled--background-color)}input.regular-mode:checked::after,input.regular-mode:indeterminate:after{display:flex;position:absolute;content:"";background-color:var(--ez-check--check--background-color);width:8px;height:7px;-webkit-mask-image:var(--ez-check--check--image);mask-image:var(--ez-check--check--image)}input.regular-mode:indeterminate:after{display:flex;position:absolute;content:"";background-color:var(--ez-check--check--background-color);width:10px;height:2px;-webkit-mask-image:var(--ez-check--indeterminate--image);mask-image:var(--ez-check--indeterminate--image)}input.regular-mode:checked:disabled::after,input.regular-mode:indeterminate:disabled::after{background-color:var(--ez-check--check--disabled--background-color)}input.switch-mode{flex-shrink:0;-webkit-appearance:none;appearance:none;position:relative;outline:none;cursor:pointer;border-radius:20px;border:var(--border--small, 1px solid) var(--ez-switch--pin--border-color, #626e82);transition:background-color var(--transition);width:var(--ez-switch--slider--width);height:var(--ez-switch--slider--height);background-color:var(--ez-switch--background-color)}input.switch-mode:disabled{background-color:var(--ez-switch--disabled--background-color);border:var(--border--small, 1px solid) var(--ez-switch--pin--disabled--border-color, #a2abb9)}input.switch-mode:checked:disabled{background-color:var(--ez-switch--disabled--checked--background-color)}input.switch-mode::after{content:"";display:block;position:absolute;box-shadow:var(--shadow);transition:transform var(--transition);transition:background-color var(--transition);transition:border-color var(--transition);transform:translateX(-2px) translateY(-4px);border-radius:50%;border:var(--border--small, 1px solid) var(--ez-switch--pin--border-color, #626e82);width:var(--ez-switch--pin--width);height:var(--ez-switch--pin--height);background-color:var(--ez-switch--pin--background-color)}input.switch-mode:disabled::after{background-color:var(--ez-switch--pin--disabled--background-color);border:var(--border--small, 1px solid) var(--ez-switch--pin--disabled--border-color, #a2abb9)}input.switch-mode:checked{transition:background-color var(--transition), border var(--transition);background-color:var(--ez-switch--checked--background-color);border:var(--border--small, 1px solid) var(--color--primary, #008561)}input.switch-mode::before{display:block;content:"";display:block;position:absolute;border-radius:50%;opacity:0;width:var(--ez-switch--focus--width);height:var(--ez-switch--focus--height);top:calc((var(--ez-switch--slider--height) - var(--ez-switch--focus--height)) / 2);left:calc((var(--ez-switch--pin--width) - var(--ez-switch--focus--width) - 2px) / 2);background-color:var(--ez-switch--pin--focus--background-color)}input.switch-mode:focus::before{opacity:0.24;transition:opacity var(--transition)}input.switch-mode:checked:focus::before{background-color:var(--ez-switch--pin--checked--focus--background-color);transform:translateX(calc(var(--ez-switch--slider--width) - var(--ez-switch--pin--width) + 2px))}input.switch-mode:checked::after{transition:transform var(--transition);transition:background-color var(--transition);transition:border-color var(--transition);transform:translateX(calc(var(--ez-switch--slider--width) - var(--ez-switch--pin--width))) translateY(-4px);box-shadow:var(--shadow);background-color:var(--ez-switch--pin--checked--background-color);border:var(--border--small, 1px solid) var(--color--primary, #008561)}input.switch-mode:checked:disabled::after{background-color:var(--ez-switch--pin--checked--disabled--background-color)}.label{flex-shrink:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--ez-check--label--color);font-size:var(--ez-check--label--font-size);font-family:var(--ez-check--label--font-family);cursor:default;width:inherit;display:block;align-content:center;gap:var(--space--small)}.label--disabled{color:var(--ez-check--label--disabled--color)}.label--padding{padding-left:var(--space--extra-small)}.label-alternative{font-size:var(--text--small);color:var(--text--secondary);padding-top:2px}';export{d as ez_check}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,f as e,h as i,H as o,g as s}from"./p-
|
|
1
|
+
import{r as t,f as e,h as i,H as o,g as s}from"./p-23a36bb6.js";import{ElementIDUtils as a}from"@sankhyalabs/core";const n=class{constructor(e){t(this,e),this._nextMessages=[],this._currentMessageInfo={message:"",fadeTime:void 0,useIcon:void 0},this._toastOpenedClass="toast__container--opened",this._lastTimeOut=void 0,this._lang="pt",this.message=void 0,this.fadeTime=5e3,this.useIcon=!1,this.canClose=!0}async show(t,i,o,s){const a=void 0!==s?s:this.canClose;return new Promise((s=>{var n;if(null===(n=this.container)||void 0===n?void 0:n.classList.contains(this._toastOpenedClass)){if(this.isRepeatedMessage(t))return;this._nextMessages.push({message:t,fadeTime:i,useIcon:o,canClose:a,callBack:s})}else this._currentMessageInfo.message=t||this.message,this._currentMessageInfo.fadeTime=i||this.fadeTime,this._currentMessageInfo.useIcon=o||this.useIcon,this._currentMessageInfo.callBack=s,a&&(this._currentMessageInfo.canClose=a),e(this),this.displayToast(),this._lastTimeOut=setTimeout((()=>{this.hideToast()}),this._currentMessageInfo.fadeTime+400)}))}hideToast(){this.makeToastInvisible(),this._nextMessages.length>0&&(this._currentMessageInfo.callBack&&this._currentMessageInfo.callBack(!0),setTimeout((()=>{let t=this._nextMessages.shift();this.show(t.message,t.fadeTime,t.useIcon)}))),this._currentMessageInfo.callBack&&this._currentMessageInfo.callBack(!0)}isRepeatedMessage(t){var e,i;return(null===(e=this._nextMessages)||void 0===e?void 0:e.some((e=>e.message===t)))||(null===(i=this._currentMessageInfo)||void 0===i?void 0:i.message)===t}makeToastInvisible(){this.container.classList.remove(this._toastOpenedClass),this.container.style.animation="none",this._lastTimeOut&&clearTimeout(this._lastTimeOut)}displayToast(){this.container.classList.add(this._toastOpenedClass),this.container.style.animation=`fadein 0.5s, fadeout 0.5s ${this.fadeTime/1e3}s`}buildDataElementId(){var t,e;const i=a.addIDInfo(this._element),o=a.DATA_ELEMENT_ID_ATTRIBUTE_NAME;null===(t=this._elemBtnClose)||void 0===t||t.setAttribute(o,`${i}_buttonClose`),null===(e=this._elemText)||void 0===e||e.setAttribute(o,`${i}_title`)}componentDidLoad(){this.buildDataElementId()}render(){return i(o,null,i("div",{ref:t=>this.container=t,class:"toast__container"},this._currentMessageInfo.useIcon&&i("slot",{name:"icon"}),i("div",{lang:this._lang,ref:t=>this._elemText=t,class:this._currentMessageInfo.useIcon?"message__container message__container--icon":"message__container",title:this._currentMessageInfo.message,innerHTML:this._currentMessageInfo.message}),this._currentMessageInfo.canClose&&i("button",{class:"btn-close",onClick:()=>{this.hideToast()},ref:t=>this._elemBtnClose=t})))}get _element(){return s(this)}};n.style=':host{--ez-toast__btn__close__image:url(\'data:image/svg+xml;utf8,<svg width="12" height="12" viewBox="0 0 12 12" xmlns="http://www.w3.org/2000/svg%22%3E<path d="M 7.0060773,5.995511 11.461972,1.5397722 c 0.132856,-0.1328413 0.207547,-0.3130253 0.207547,-0.5009046 0,-0.18786999 -0.07469,-0.3680541 -0.207547,-0.5009048 -0.132857,-0.13284126 -0.31302,-0.20748126 -0.500927,-0.20748126 -0.187812,0 -0.36807,0.07464 -0.500926,0.20748126 L 6.0042244,4.9937015 1.5482921,0.5379628 C 1.4154357,0.40512154 1.2352533,0.33048154 1.0473657,0.33048154 c -0.18787813,0 -0.36807,0.07464 -0.50092647,0.20748126 -0.13285646,0.1328507 -0.20749026,0.31303481 -0.20749026,0.5009048 0,0.1878793 0.0746338,0.3680633 0.20749026,0.5009046 L 5.0023715,5.995511 0.54643923,10.452213 c -0.0676086,0.06534 -0.12151598,0.14352 -0.15859681,0.229916 -0.0370714,0.08639 -0.0565645,0.1794 -0.0573369,0.27335 -7.724e-4,0.09404 0.0171873,0.187331 0.0528423,0.274293 0.0356455,0.08705 0.0882688,0.166087 0.15479148,0.23256 0.0665321,0.06648 0.14562277,0.11897 0.2326735,0.154567 0.0870507,0.0356 0.18031463,0.05344 0.2743433,0.05259 0.094029,-8.5e-4 0.1869528,-0.02049 0.2733331,-0.0576 0.08639,-0.0372 0.1645078,-0.09121 0.2298029,-0.158817 L 6.0042244,6.9973204 10.460119,11.453078 c 0.132856,0.132851 0.313114,0.207444 0.500926,0.207444 0.187907,0 0.36807,-0.07459 0.500927,-0.207444 0.132856,-0.13285 0.207547,-0.313006 0.207547,-0.500904 0,-0.187898 -0.07469,-0.368054 -0.207547,-0.500905 z"/></svg>\');--ez-toast__container--z-index:var(--elevation--100, 100);--ez-toast__container--background-color:var(--color--secondary, #383c45);--ez-toast__container--left:var(--space--large, 24px);--ez-toast__container--bottom:var(--space--large, 24px);--ez-toast__container--width:400px;--ez-toast__icon--padding-left:var(--space--small, 6px)}.toast__container{position:fixed;display:flex;box-sizing:border-box;border-radius:6px;align-items:center;padding:12px;visibility:hidden;width:var(--ez-toast__container--width);left:var(--ez-toast__container--left);bottom:var(--ez-toast__container--bottom);z-index:var(--ez-toast__container--z-index);background-color:var(--ez-toast__container--background-color)}.message__container{text-shadow:0 0 0 #353535, 0 0 1px transparent;color:#FFFFFF;font-size:14px;width:90%;overflow:hidden;hyphens:auto;height:auto;-webkit-box-orient:vertical;-webkit-line-clamp:4;display:-webkit-box;text-overflow:ellipsis;font-family:var(--font-pattern, "Roboto")}.message__container--icon{width:80%;padding-left:var(--ez-toast__icon--padding-left)}.btn-close{margin-top:3px;display:flex;justify-content:flex-end;align-self:flex-start;padding:0;outline:none;width:10%;border:none;background-color:unset;cursor:pointer}.btn-close::after{content:\'\';display:flex;background-color:#FFFFFF;width:12px;height:12px;-webkit-mask-image:var(--ez-toast__btn__close__image);mask-image:var(--ez-toast__btn__close__image)}.toast__container--opened{animation:fadein 0.5s, fadeout 0.5s 3s;visibility:visible}@-webkit-keyframes fadein{from{opacity:0;left:calc(var(--ez-toast__container--left) * -1)}to{opacity:1;left:var(--ez-toast__container--left)}}@keyframes fadein{from{opacity:0;left:calc(var(--ez-toast__container--left) * -1)}to{opacity:1;left:var(--ez-toast__container--left)}}@-webkit-keyframes fadeout{from{opacity:1;left:var(--ez-toast__container--left)}to{bottom:0;opacity:0}}@keyframes fadeout{from{opacity:1;left:var(--ez-toast__container--left)}to{bottom:0;opacity:0}}';export{n as ez_toast}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as d,h as i,H as o,g as
|
|
1
|
+
import{r as t,c as d,h as i,H as o,g as l}from"./p-23a36bb6.js";import{FloatingManager as e,KeyboardManager as a}from"@sankhyalabs/core";import{i as n}from"./p-c178730b.js";const s=class{constructor(i){t(this,i),this.ezCloseModal=d(this,"ezCloseModal",7),this.ezOpenModal=d(this,"ezOpenModal",7),this.ezModalAction=d(this,"ezModalAction",7),this.modalSize=void 0,this.align=void 0,this.heightMode="regular",this.opened=!0,this.closeEsc=!1,this.closeOutsideClick=!1,this.closeOutsideLeave=!1,this.scrim="medium"}observeOpened(){this.opened?this._overlayId=e.subscribeOverlayControl(this._modalRef):e.unsubscribeOverlayControl(this._modalRef||this._overlayId)}closeModal(){this.opened=!1,this.ezCloseModal.emit(this.opened)}async componentWillLoad(){this.i18n=await n()}componentDidLoad(){this.observeOpened(),this._keyboardManager=new a({propagate:!1,element:this._element,enableShadowDom:!0}).bind("Enter",this.ezModalAction.emit.bind("OK")).bind("Escape",(()=>this.closeModal())).bind("Esc",(()=>this.closeModal()))}componentDidRender(){this.modalFocus()}disconnectedCallback(){var t;null===(t=this._keyboardManager)||void 0===t||t.unbindAllShortcutKeys()}modalFocus(){this.opened&&requestAnimationFrame((()=>{const t=this._element.shadowRoot.querySelector("ez-modal-container");this._modalRef&&null===t&&this._modalRef.focus()}))}onMouseDownHandler(t){this.closeOutsideClick&&t.target===this._overlay&&this.closeModal()}onMouseLeaveHandler(){this.closeOutsideLeave&&this.closeModal()}render(){const t="left"===this.align?"left":"right",d="regular"===this.heightMode?`modal__content--${t}`:"";return i(o,null,this.opened?i("div",{ref:t=>this._modalRef=t,class:`modal modal__screen-${this.scrim} ${"regular"===this.heightMode?"modal__vertical-padding":""}`,onMouseDown:t=>this.onMouseDownHandler(t),tabIndex:-1,"aria-label":this.i18n("ez-modal.close")},i("div",{class:`modal__container modal__container--${t}`,ref:t=>this._overlay=t},i("div",{onMouseLeave:()=>this.onMouseLeaveHandler(),class:`modal__content ${d} ${this.modalSize}`},i("slot",null)))):void 0)}get _element(){return l(this)}static get watchers(){return{opened:["observeOpened"]}}};s.style=":host{--ez-modal-z-index:var(--elevation--22, 22);--ez-modal-vertical-padding:var(--space--large, 24px);--ez-modal-content-padding:24px;display:block;--ez-modal-content-min-width:auto}.modal{position:fixed;display:flex;top:0px;z-index:var(--ez-modal-z-index);left:0px;width:100%;box-sizing:border-box;height:100vh;outline:none}.modal__screen-light{background:rgba(0, 4, 12, 0.1)}.modal__screen-none{background:none}.modal__screen-medium{backdrop-filter:blur(4px);background:rgba(0, 4, 12, 0.4)}.modal__vertical-padding{padding:var(--ez-modal-vertical-padding) 0}@keyframes expand-modal--left{from{transform:translate(-100%)}}@keyframes expand-modal--right{from{transform:translate(100%)}}.modal__container{display:flex;flex-wrap:wrap;height:100%;box-sizing:border-box;width:100%;align-items:flex-start}.modal__container--right{animation:expand-modal--right .2s ease-in-out 1;justify-content:flex-end}.modal__container--left{animation:expand-modal--left .2s ease-in-out 1;justify-content:flex-start}.modal__content{display:flex;flex-wrap:wrap;box-sizing:border-box;max-height:100%;min-width:var(--ez-modal-content-min-width);height:100%;overflow-y:auto;background-color:rgb(255, 255, 255);padding:var(--ez-modal-content-padding);box-shadow:rgb(0 38 111 / 12%) 0px 0px 16px 0px}.modal__content--right{border-radius:12px 0px 0px 12px}.modal__content--left{border-radius:0px 12px 12px 0px}.modal__box__container{display:flex;flex-wrap:wrap;background-color:#fff;width:100%;border-radius:12px}.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{s as ez_modal}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i,c as t,h as o}from"./p-
|
|
1
|
+
import{r as i,c as t,h as o}from"./p-23a36bb6.js";const r=class{constructor(o){i(this,o),this.actionTriggered=t(this,"actionTriggered",7),this.icon=void 0,this.command=void 0,this.title=void 0,this.value=void 0}async triggerAction(){this.actionTriggered.emit({command:this.command,value:this.value})}render(){return o("div",{id:`rich-toolbar-item-${this.icon}`,class:"rich-toolbar-item",title:this.title,onClick:this.triggerAction.bind(this)},o("ez-icon",{class:"toolbar-item",iconName:this.icon}))}};r.style="ez-icon.sc-ez-rich-toolbar-item{--ez-icon--color:var(--color--secondary, #383c45)}.rich-toolbar-item.sc-ez-rich-toolbar-item{display:flex;align-items:center;justify-content:center;width:32px;height:32px;background:none;border:none;border-radius:4px;cursor:pointer;transition:0.3s all ease-in-out}.rich-toolbar-item.sc-ez-rich-toolbar-item:hover{background-color:#f5f5f5}";export{r as ez_rich_toolbar_item}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,h as i,H as t,g as o}from"./p-
|
|
1
|
+
import{r as e,h as i,H as t,g as o}from"./p-23a36bb6.js";import{ElementIDUtils as l}from"@sankhyalabs/core";const r=class{constructor(i){e(this,i),this.color="default",this.iconName=void 0,this.iconColor=void 0,this.smallTitleText=void 0,this.smallTitleMaximumLines=void 0,this.titleText=void 0,this.titleMaximumLines=void 0,this.descriptionText=void 0,this.descriptionMaximumLines=void 0,this.height=void 0,this.width=void 0,this.avatarProps=void 0,this.buttonProps=void 0,this.tags=void 0}async setButtonFocus(){var e;this._button&&(null===(e=this._button)||void 0===e||e.setFocus())}async setButtonBlur(){var e;this._button&&(null===(e=this._button)||void 0===e||e.setBlur())}renderBadges(){return this.tags&&0!==this.tags.length?this.tags.slice(0,3).map(((e,t)=>i("ez-badge",{id:`tag-${e.label}`,key:`tag-${t}`,label:e.label,size:"medium",style:{"--ez-badge--background-color":`var(${e.color}, #008561)`}}))):null}setCustomCSSProperties(){var e,i;const t=null!==(i=null===(e=this.buttonProps)||void 0===e?void 0:e.colors)&&void 0!==i?i:{},{background:o,backgroundHover:l,backgroundActive:r,text:a,textHover:m,textActive:n}=t;return Object.assign({},this.height&&{"--ez-tile-medium--custom-height":`${this.height}`},this.width&&{"--ez-tile-medium--custom-width":`${this.width}`},this.smallTitleMaximumLines&&{"--ez-tile-medium--small-title--maximum-lines":`${this.smallTitleMaximumLines}`},this.titleMaximumLines&&{"--ez-tile-medium--title--maximum-lines":`${this.titleMaximumLines}`},this.descriptionMaximumLines&&{"--ez-tile-medium--description--maximum-lines":`${this.descriptionMaximumLines}`},this.iconColor&&{"--ez-tile-medium--custom-icon-color":`var(${this.iconColor})`},o&&{"--ez-tile-medium_button--background-color":`var(${o}, #008561)`},l&&{"--ez-tile-medium_button--hover--background-color":`var(${l}, #00684C)`},r&&{"--ez-tile-medium_button--active--background-color":`var(${r}, #1A9171)`},a&&{"--ez-tile-medium_button--color":`var(${a}, #ffffff)`},m&&{"--ez-tile-medium_button--hover-color":`var(${m}, #ffffff)`},n&&{"--ez-tile-medium_button--active-color":`var(${n}, #ffffff)`})}componentDidLoad(){this.setCustomCSSProperties(),this._element&&l.addIDInfo(this._element),this._button&&l.addIDInfo(this._button,"tile-medium_button",{id:"embedded"})}render(){var e,o,l,r,a,m,n,d,c,u;return i(t,{style:this.setCustomCSSProperties()},i("div",{class:`tile-medium_container ${this.color}`},i("div",{class:"tile-medium_header"},i("div",{class:"tile-medium_header-image"},this.avatarProps?i("ez-avatar",{size:"60",name:null===(e=this.avatarProps)||void 0===e?void 0:e.name,imageSrc:null===(o=this.avatarProps)||void 0===o?void 0:o.imageSrc,shape:(null===(l=this.avatarProps)||void 0===l?void 0:l.shape)||"square"}):this.iconName&&i("ez-icon",{size:"x-large",class:"icon",iconName:this.iconName})),i("div",{class:"tag_group"},this.renderBadges())),i("div",{class:"tile-medium_content"},i("div",null,this.smallTitleText&&i("span",{class:"small_title",title:this.smallTitleText},this.smallTitleText),this.titleText&&i("span",{class:"main_title",title:this.titleText},this.titleText),this.descriptionText&&i("span",{class:"description",title:this.descriptionText},this.descriptionText)),this.buttonProps&&i("ez-button",{ref:e=>this._button=e,class:"tile-medium_button",label:(null===(r=this.buttonProps)||void 0===r?void 0:r.label)||void 0,enabled:null===(m=null===(a=this.buttonProps)||void 0===a?void 0:a.enabled)||void 0===m||m,mode:null===(n=this.buttonProps)||void 0===n?void 0:n.mode,iconName:null===(d=this.buttonProps)||void 0===d?void 0:d.iconName,size:null===(c=this.buttonProps)||void 0===c?void 0:c.size,onClick:null===(u=this.buttonProps)||void 0===u?void 0:u.onClick}))))}get _element(){return o(this)}};r.style=":host{--ez-tile-medium--width:446px;--ez-tile-medium--height:257px;--ez-tile-medium--padding:var(--space--24, 24px);--ez-tile-medium--border-radius:var(--border--radius-16, 16px);--ez-tile-medium--background-color:var(--color--ocean-gray-70, #ffffff);--ez-tile-medium--color:var(--color--ocean-green-900, #003D2D);--ez-tile-medium--icon-color:var(--color--ocean-green-400, #42A58A);--ez-tile-medium--font-family:var(--font-pattern, Arial);--ez-tile-medium--header-gap:var(--space--16, 16px);--ez-tile-medium--icon-line-height:var(--line-height--30, 30px);--ez-tile-medium--tag-group-gap:var(--space--4, 4px);--ez-tile-medium_button--background-color:var(--color--ocean-green-600, #1A9171);--ez-tile-medium_button--color:var(--color--gray-70, #ffffff);--ez-tile-medium_button--hover--background-color:var(--color--ocean-green-700, #00684C);--ez-tile-medium_button--hover-color:var(--color--gray-70, #ffffff);--ez-tile-medium_button--active--background-color:var(--color--ocean-green-500, #1A9171);--ez-tile-medium_button--active-color:var(--color--gray-70, #ffffff)}.tile-medium_container{display:flex;flex-direction:column;justify-content:space-between;align-items:flex-start;overflow:hidden;outline:none;box-shadow:none;width:var(--ez-tile-medium--custom-width, var(--ez-tile-medium--width));height:var(--ez-tile-medium--custom-height, var(--ez-tile-medium--height));border-radius:var(--ez-tile-medium--border-radius);background-color:var(--ez-tile-medium--background-color);color:var(--ez-tile-medium--color);box-sizing:border-box;padding:var(--ez-tile-medium--padding)}.tile-medium_header{display:flex;flex-direction:row;align-items:flex-start;align-self:stretch;width:100%;gap:var(--ez-tile-medium--header-gap)}.tile-medium_header-image{display:flex;align-items:flex-start;gap:var(--space--10, 10px);flex:1 0 0}.tag_group{display:flex;flex-direction:row;gap:var(--ez-tile-medium--tag-group-gap);flex-wrap:wrap;justify-content:flex-end}.tile-medium_content{display:flex;flex-direction:column;justify-content:flex-end;align-items:flex-start;gap:var(--space--14, 14px);align-self:stretch}span{font-family:var(--ez-tile-medium--font-family);display:-webkit-box;-webkit-box-orient:vertical;width:100%;overflow:hidden;text-overflow:ellipsis;text-align:left;white-space:pre-wrap;align-self:stretch;font-style:normal}.small_title{color:var(--color--gray-400, #77777A);font-size:var(--font-size--default, 14px);font-weight:var(--font-weight--regular);line-height:var(--line-height--20, 20px);-webkit-line-clamp:var(--ez-tile-medium--small-title--maximum-lines, 1);line-clamp:var(--ez-tile-medium--small-title--maximum-lines,1)}.main_title{color:var(--color--ocean-green-900, #003D2D);font-size:var(--font-size--xxlarge, 22px);font-weight:var(--font-weight--bold);line-height:var(--line-height--32, 32px);-webkit-line-clamp:var(--ez-tile-medium--title--maximum-lines, 1);line-clamp:var(--ez-tile-medium--title--maximum-lines,1)}.description{color:var(--color--ocean-green-900, #003D2D);font-size:var(--font-size--default, 14px);font-weight:var(--font-weight--regular);line-height:var(--line-height--24, 24px);-webkit-line-clamp:var(--ez-tile-medium--description--maximum-lines, 3);line-clamp:var(--ez-tile-medium--description--maximum-lines, 3)}.tile-medium_button{--ez-button--background-color:var(--ez-tile-medium_button--background-color);--ez-button--color:var(--ez-tile-medium_button--color);--ez-button--hover--background-color:var(--ez-tile-medium_button--hover--background-color);--ez-button--hover-color:var(--ez-tile-medium_button--hover-color);--ez-button--active--background-color:var(--ez-tile-medium_button--active--background-color);--ez-button--active-color:var(--ez-tile-medium_button--active-color)}ez-icon{--ez-icon--color:var(--ez-tile-medium--custom-icon-color, var(--ez-tile-medium--icon-color));line-height:var(--ez-tile-medium--icon-line-height)}.green{--ez-tile-medium--background-color:var(--color--ocean-green-90);--ez-tile-medium--icon-color:var(--ez-tile-medium--custom-icon-color, var(--color--ocean-green-500))}.gray{--ez-tile-medium--background-color:var(--color--gray-80);--ez-tile-medium--icon-color:var(--ez-tile-medium--custom-icon-color, var(--color--ocean-green-400))}.red{--ez-tile-medium--background-color:var(--color--red-100);--ez-tile-medium--icon-color:var(--ez-tile-medium--custom-icon-color, var(--color--red-300))}.yellow{--ez-tile-medium--background-color:var(--color--yellow-100);--ez-tile-medium--icon-color:var(--ez-tile-medium--custom-icon-color, var(--color--yellow-400))}";export{r as ez_tile_medium}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,c as a,h as t,H as r,g as o}from"./p-
|
|
1
|
+
import{r as e,c as a,h as t,H as r,g as o}from"./p-23a36bb6.js";import{StringUtils as i,ElementIDUtils as s}from"@sankhyalabs/core";const c=class{constructor(t){e(this,t),this.ezChange=a(this,"ezChange",7),this.ezBlur=a(this,"ezBlur",7),this.iconClick=a(this,"iconClick",7),this.name=i.generateUUID(),this.label="",this.placeholder="",this.value="",this.helpText=void 0,this.state="default",this.enabled=!0,this.readonly=!1,this.maxlength=void 0,this.resize="vertical",this.leftIconName=void 0,this.rightIconName=void 0,this.rightIconTooltip=void 0,this.leftIconTooltip=void 0,this.leftIconClickable=!1,this.rightIconClickable=!1,this.rows=5}async setFocus(e){(null==e?void 0:e.selectText)&&this._textAreaElem.select(),(null==e?void 0:e.preventScroll)||this._textAreaElem.scrollIntoView({behavior:"smooth",block:"center"}),this._textAreaElem.focus({preventScroll:!0})}async setBlur(){this._textAreaElem.blur()}onBlur(){this.ezBlur.emit(this.value)}handleInput(e){this.ezChange.emit(e.target.value)}handleIconClick(e,a){this.enabled&&("left"===a&&!this.leftIconClickable||"right"===a&&!this.rightIconClickable?this.setFocus({preventScroll:!0}):(e.stopPropagation(),this.iconClick.emit({icon:a})))}addInfoId(){this._element&&s.addIDInfo(this._element),this._textAreaElem&&s.addIDInfo(this._textAreaElem,"classic-text-area",{id:"embedded"})}componentDidLoad(){this.addInfoId()}render(){return t(r,null,this.label&&t("label",{title:this.label,htmlFor:this.name},this.label),t("div",{class:"text-area-container","data-state":this.state,"data-disabled":(!this.enabled).toString(),"data-resize":this.resize,onClick:()=>this.setFocus({preventScroll:!0})},this.leftIconName&&t("ez-icon",{iconName:this.leftIconName,title:this.leftIconTooltip,onClick:e=>this.handleIconClick(e,"left"),class:{"icon-clickable":this.leftIconClickable}}),t("textarea",{ref:e=>this._textAreaElem=e,id:this.name,name:this.name,placeholder:this.placeholder,value:this.value,disabled:!this.enabled,readOnly:this.readonly,maxLength:this.maxlength,rows:this.rows,onInput:this.handleInput.bind(this),onBlur:this.onBlur.bind(this)}),this.rightIconName&&t("ez-icon",{iconName:this.rightIconName,title:this.rightIconTooltip,onClick:e=>this.handleIconClick(e,"right"),class:{"icon-clickable":this.rightIconClickable}})),this.helpText&&t("span",{title:this.helpText},this.helpText))}get _element(){return o(this)}};c.style=':host{display:flex;flex-direction:column;align-items:flex-start;box-sizing:border-box;font-family:var(--font--pattern, Arial, sans-serif);font-size:var(--font-size--default, 14px);color:var(--color--ocean-green-1000, #00281D);border:none;padding:0;width:100%;--ez-classic-text-area--label-color:var(--color--ocean-green-1000, #00281D);--ez-classic-text-area--border-color-default:var(--color--gray-200, #D2D2D3);--ez-classic-text-area--border-color-focus:var(--color--gray-300, #A4A5A7);--ez-classic-text-area--border-color-success:var(--color--green-600, #157A00);--ez-classic-text-area--border-color-error:var(--color--red-600, #BD0025);--ez-classic-text-area--border-color-warning:var(--color--yellow-600, #EFB103);--ez-classic-text-area--background-color:var(--color--gray-70, #FFFFFF);--ez-classic-text-area--background-color-disabled:var(--color--gray-90, #EAEAEA);--ez-classic-text-area--text-color:var(--color--ocean-green-1000, #00281D);--ez-classic-text-area--placeholder-color:#bdbdbd;--ez-classic-text-area--icon-color:var(--color--gray-400, #77777A);--ez-classic-text-area--helptext-color:var(--color--ocean-green-1000, #00281D)}.text-area-container{display:flex;flex-direction:row;align-items:start;width:100%;border:none;border-radius:var(--border--radius-8, 8px);padding:var(--space--16, 16px);box-sizing:border-box;gap:var(--space--10, 10px);margin:var(--space--4, 4px) var(--space--2, 2px);transition:box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);resize:vertical;overflow:auto;background-color:var(--ez-classic-text-area--background-color)}.text-area-container,.text-area-container[data-state="default"]{box-shadow:0 0 0 1px var(--ez-classic-text-area--border-color-default)}.text-area-container[data-state="success"]{box-shadow:0 0 0 var(--space--2, 2px) var(--ez-classic-text-area--border-color-success)}.text-area-container[data-state="error"]{box-shadow:0 0 0 var(--space--2, 2px) var(--ez-classic-text-area--border-color-error)}.text-area-container[data-state="warning"]{box-shadow:0 0 0 var(--space--2, 2px) var(--ez-classic-text-area--border-color-warning)}.text-area-container:focus-within{box-shadow:0 0 0 var(--space--2, 2px) var(--ez-classic-text-area--border-color-focus)}ez-icon{min-width:var(--space--24, 24px);color:var(--ez-classic-text-area--icon-color)}textarea{flex:1;border:none;outline:none;background:transparent;height:100%;width:100%;padding:0;font-family:var(--font--pattern, Arial, sans-serif);font-size:var(--font-size--default, 14px);color:var(--color--ocean-green-1000, #00281D);text-overflow:ellipsis;min-height:calc(var(--ez-classic-text-area--min-height) - var(--space--32, 32px));resize:none;scrollbar-width:thin;color:var(--ez-classic-text-area--text-color)}.text-area-container[data-disabled="true"]{cursor:not-allowed;background:var(--ez-classic-text-area--background-color-disabled);border-color:var(--ez-classic-text-area--border-color-default)}.text-area-container[data-disabled="true"]>*{cursor:not-allowed}@keyframes ez-helptext-fadein{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}span{font-size:var(--font-size--xsmall, 10px);line-height:var(--line-height--16, 16px);overflow:hidden;text-overflow:ellipsis;animation:ez-helptext-fadein 0.3s ease;color:var(--ez-classic-text-area--helptext-color)}label{display:block;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:var(--line-height--20, 20px);color:var(--ez-classic-text-area--label-color)}.icon-clickable{cursor:pointer}.text-area-container[data-resize="none"]{resize:none}.text-area-container[data-resize="both"]{resize:both}.text-area-container[data-resize="horizontal"]{resize:horizontal}.text-area-container[data-resize="vertical"]{resize:vertical}.text-area-container::-webkit-resizer{display:none}.text-area-container::-moz-resizer{display:none}.text-area-container:not([data-resize="none"]){position:relative}.text-area-container:not([data-resize="none"])::after{content:\'\';position:absolute;bottom:var(--space--2, 2px);right:var(--space--2, 2px);width:var(--space--10, 10px);height:var(--space--10, 10px);background:linear-gradient(135deg, transparent 0% 50%, var(--ez-classic-text-area--border-color-default) 50% 58%, transparent 58% 70%, var(--ez-classic-text-area--border-color-default) 70% 78%, transparent 78% 100%);pointer-events:none}';export{c as ez_classic_text_area}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as n,h as i}from"./p-
|
|
1
|
+
import{r as n,h as i}from"./p-23a36bb6.js";import{i as e}from"./p-c178730b.js";import"@sankhyalabs/core";const r=["progress","pulse","false"],t=["circle","rect","text"],a="text",o="progress",s="circle",g=class{constructor(i){n(this,i),this.items=[],this.template=void 0,this.count=1,this.variant=a,this.width=null,this.height=null,this.marginTop=null,this.marginRight=null,this.marginBottom=null,this.marginLeft=null,this.animation=o}async componentWillLoad(){this.i18n=await e(),this.initializeItems()}componentWillUpdate(){this.initializeItems()}initializeItems(){this.items=Array(this.count).fill(1)}getSkeletonConfig(n){if(n)return(null==n?void 0:n.variant)==s?(n.width=n.width||"var(--skeleton-width, 40px)",n.height=n.height||"var(--skeleton-height, 40px)"):n.width=n.width||"var(--skeleton-width, 100%)",{skeletonClasses:{skeleton:!0,circle:n.variant===s,rect:"rect"===n.variant,progress:"progress"===n.animation,pulse:"pulse"===n.animation},styles:{width:(n.marginRight||n.marginLeft)&&n.width&&n.variant!=s?`calc(${n.width} ${n.marginRight?`- ${n.marginRight}`:""} ${n.marginLeft?`- ${n.marginLeft}`:""})`:n.width,height:n.height,marginTop:n.marginTop,marginRight:n.marginRight,marginBottom:n.marginBottom,marginLeft:n.marginLeft}}}validateVariant(n){return t.includes(n)?n:a}validateAnimation(n){return r.includes(n)?n:o}renderSkeletonTemplate(n){var e;const r=(null===(e=n.$attrs)||void 0===e?void 0:e.innerHTML)||n;if("string"==typeof r){const n=document.createElement("div");n.innerHTML=r;const e=(null==n?void 0:n.querySelectorAll(":not(.skeleton) > *"))||[];return Array.from(e).map((n=>{var e,r,t,a,o,s,g,l,d,p;if(null===(e=null==n?void 0:n.classList)||void 0===e?void 0:e.contains("skeleton")){const i=this.getSkeletonConfig({variant:this.validateVariant((null===(r=n.getAttribute("variant"))||void 0===r?void 0:r.replace(/[{}]/g,""))||this.variant),width:(null===(t=n.getAttribute("width"))||void 0===t?void 0:t.replace(/[{}]/g,""))||this.width,height:(null===(a=n.getAttribute("height"))||void 0===a?void 0:a.replace(/[{}]/g,""))||this.height,marginTop:(null===(o=n.getAttribute("marginTop"))||void 0===o?void 0:o.replace(/[{}]/g,""))||this.marginTop,marginLeft:(null===(s=n.getAttribute("marginLeft"))||void 0===s?void 0:s.replace(/[{}]/g,""))||this.marginLeft,marginRight:(null===(g=n.getAttribute("marginRight"))||void 0===g?void 0:g.replace(/[{}]/g,""))||this.marginRight,marginBottom:(null===(l=n.getAttribute("marginBottom"))||void 0===l?void 0:l.replace(/[{}]/g,""))||this.marginBottom,animation:this.validateAnimation((null===(d=n.getAttribute("animation"))||void 0===d?void 0:d.replace(/[{}]/g,""))||this.animation)}),e=Number(null===(p=n.getAttribute("count"))||void 0===p?void 0:p.replace(/[{}]/g,""))||1;return Array(e).fill(1).map(((n,e)=>this.renderSkeletonItem(e,i)))}return i("div",{innerHTML:n.outerHTML})}))}return n}renderSkeletonItem(n,i){const e=i||this.getSkeletonConfig({variant:this.validateVariant(this.variant),animation:this.validateAnimation(this.animation),width:this.width,height:this.height,marginTop:this.marginTop,marginRight:this.marginRight,marginBottom:this.marginBottom,marginLeft:this.marginLeft});return this.renderSkeletonSpan(n,e)}renderSkeletonSpan(n,e){return i("span",{key:n,class:null==e?void 0:e.skeletonClasses,style:null==e?void 0:e.styles,"data-busy":"true","data-valuemin":"0","data-valuemax":"100","data-valuetext":this.i18n("app.loading"),role:"progressbar",tabindex:"0"})}render(){return this.template?this.renderSkeletonTemplate(this.template):this.items.map(((n,i)=>this.renderSkeletonItem(i)))}};g.style=".skeleton {\n background: var(--skeleton-background, #f0f3f7) no-repeat;\n border-radius: var(--skeleton-border-radius, 12px);\n width: var(--skeleton-width, 100%);\n height: var(--skeleton-height, 20px);\n display: inline-block;\n margin-bottom: var(--skeleton-margin-bottom, 0px);\n\tmargin-top: var(--skeleton-margin-top, 0px);\n\tmargin-right: var(--skeleton-margin-right, 0px);\n\tmargin-left: var(--skeleton-margin-left, 0px);\n box-sizing: border-box;\n outline: none;\n overflow: hidden;\n position: relative;\n -webkit-will-change: transform;\n -moz-will-change: transform;\n will-change: transform;\n\n &:after,\n &:before {\n box-sizing: border-box;\n }\n\n &.circle {\n width: var(--skeleton-width, 40px);\n height: var(--skeleton-height, 40px);\n margin-bottom: var(--skeleton-margin-bottom, 0px);\n border-radius: var(--skeleton-border-radius, 50%);\n }\n\n &.rect {\n border-radius: var(--skeleton-border-radius, 0px);\n }\n\n &.progress,\n &.progress-dark {\n -webkit-animation: progress 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;\n -moz-animation: progress 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;\n -ms-animation: progress 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;\n animation: progress 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;\n background-size: 200px 100%;\n }\n\n &.progress {\n background-image: -webkit-linear-gradient(90deg, rgba(255, 255, 255, 0), var(--skeleton-background-image, #e4eaf1), rgba(255, 255, 255, 0));\n background-image: -moz-linear-gradient(90deg, rgba(255, 255, 255, 0), var(--skeleton-background-image, #e4eaf1), rgba(255, 255, 255, 0));\n background-image: -ms-linear-gradient(90deg, rgba(255, 255, 255, 0), var(--skeleton-background-image, #e4eaf1), rgba(255, 255, 255, 0));\n background-image: linear-gradient(90deg, rgba(255, 255, 255, 0), var(--skeleton-background-image, #e4eaf1), rgba(255, 255, 255, 0));\n }\n\n &.progress-dark {\n background-image: -webkit-linear-gradient(90deg, transparent, hsla(0, 0%, 0%, 0.2), transparent);\n background-image: -moz-linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.2), transparent);\n background-image: -ms-linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.2), transparent);\n background-image: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.2), transparent);\n }\n\n &.pulse {\n -webkit-animation: pulse 1.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;\n -moz-animation: pulse 1.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;\n -ms-animation: pulse 1.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;\n animation: pulse 1.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;\n animation-delay: 0.5s;\n }\n\n @media (prefers-reduced-motion: reduce) {\n &.pulse,\n &.progress-dark,\n &.progress {\n animation: none;\n }\n\n &.progress,\n &.progress-dark {\n background-image: none;\n }\n }\n}\n\n@-webkit-keyframes progress {\n 0% {\n background-position: -200px 0;\n }\n 100% {\n background-position: calc(200px + 100%) 0;\n }\n}\n@-moz-keyframes progress {\n 0% {\n background-position: -200px 0;\n }\n 100% {\n background-position: calc(200px + 100%) 0;\n }\n}\n@-ms-keyframes progress {\n 0% {\n background-position: -200px 0;\n }\n 100% {\n background-position: calc(200px + 100%) 0;\n }\n}\n@keyframes progress {\n 0% {\n background-position: -200px 0;\n }\n 100% {\n background-position: calc(200px + 100%) 0;\n }\n}\n\n@-webkit-keyframes pulse {\n 0% {\n opacity: 1;\n }\n 50% {\n opacity: 0.4;\n }\n 100% {\n opacity: 1;\n }\n}\n@-moz-keyframes pulse {\n 0% {\n opacity: 1;\n }\n 50% {\n opacity: 0.4;\n }\n 100% {\n opacity: 1;\n }\n}\n@-ms-keyframes pulse {\n 0% {\n opacity: 1;\n }\n 50% {\n opacity: 0.4;\n }\n 100% {\n opacity: 1;\n }\n}\n@keyframes pulse {\n 0% {\n opacity: 1;\n }\n 50% {\n opacity: 0.4;\n }\n 100% {\n opacity: 1;\n }\n}\n";export{g as ez_skeleton}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,h as e,H as i}from"./p-
|
|
1
|
+
import{r as t,h as e,H as i}from"./p-23a36bb6.js";import"./p-9825c1d2.js";import{C as s}from"./p-ec7db713.js";import"./p-ab574d59.js";import"./p-b853763b.js";import"@sankhyalabs/core";import{i as a}from"./p-c178730b.js";import"./p-5895e687.js";import"./p-47e4a8ce.js";const l=class{constructor(e){t(this,e),this.label=void 0,this.enableExpand=!0,this._expanded=!1,this.size=void 0,this.structural=!1}toggleExpandItem(){var t,e;this._expanded=!this._expanded,null===(e=null===(t=this.expandButtonRef.shadowRoot)||void 0===t?void 0:t.querySelector("button"))||void 0===e||e.blur()}async componentWillLoad(){this.i18n=await a()}componentDidLoad(){s.applyVarsGrid(this._element,this._slot.children[0])}render(){return e(i,{class:`box_split-item ${this._expanded?"expanded__item":""} ${this.structural?"structural__item":"content__item"}`,ref:t=>this._element=t},e("div",{class:"ez-split-item--header"},e("slot",{name:"leftButtons"}),e("div",{class:"ez-split-item--header-title"},this.label&&e("h3",{class:"ez-text ez-text--primary ez-title ez-title--medium ez-margin--small",title:this.label},this.label)),e("div",{class:"ez-split-item--header-buttons"},e("slot",{name:"rightButtons"}),this.enableExpand&&e("ez-button",{ref:t=>this.expandButtonRef=t,size:"small",mode:"icon",iconName:"expand",class:"ez-button--tertiary",onClick:()=>this.toggleExpandItem(),title:this.i18n(this._expanded?"app.collapse":"app.expand")}))),e("div",{class:"ez-split-item--content grid_height-0",ref:t=>this._slot=t},e("slot",null)))}};l.style=".box_split-item{background-color:var(--background--xlight);width:100%;height:100%;border-radius:var(--border--radius-medium);box-shadow:var(--shadow--xsmall);flex-direction:column;overflow:hidden;display:flex;padding:var(--space--nano)}.box_split-item>.ez-split-item--content{overflow:auto}.expanded__item{position:absolute;z-index:var(--more-visible);top:0;left:0;width:100%;height:100%}.ez-split-item--header{display:flex;align-items:center;justify-content:space-between}.ez-split-item--header-title{flex:1;white-space:nowrap;overflow:hidden}.ez-split-item--header-title h3{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}.ez-split-item--header-buttons{display:flex;align-items:center;max-height:20px}.ez-split-item--content{display:block;height:100%}h3.ez-margin--small{margin-left:var(--space--small)}.structural__item{background:none;box-shadow:none;padding:0;margin:0;border:0}.content__item{margin:var(--space--extra-small);width:calc(100% - 2*(var(--space--extra-small)));height:calc(100% - 2*(var(--space--extra-small)))}";export{l as ez_split_item}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as o,c as r,h as a,H as e,g as i}from"./p-
|
|
1
|
+
import{r as o,c as r,h as a,H as e,g as i}from"./p-23a36bb6.js";import{ElementIDUtils as t}from"@sankhyalabs/core";const d=class{constructor(a){o(this,a),this.ezChange=r(this,"ezChange",7),this.value=void 0,this.options=[],this.enabled=!0,this.label=void 0,this.direction="vertical"}componentDidLoad(){this.hostElement&&t.addIDInfo(this.hostElement,"input")}componentWillRender(){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 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,"data-element-id":t.getInternalIDInfo(`input_${o.value}`)}),a("label",{htmlFor:"rad"+r,class:"form__label"},o.label))))))}get hostElement(){return i(this)}};d.style=":host{--ez-radio-button--font-family:var(--font-pattern, Arial);--ez-radio-button--font-size:var(--text--medium, 14px);--ez-radio-button--font-weight:var(--text-weight--large);--ez-radio-button--font-color:var(--title--primary, #2B3A54);--ez-radio-button--padding-vertical:var(--space--medium, 12px);--ez-radio-button--padding-horizontal:var(--space--small, 6px);--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-label--padding-horizontal:var(--space--medium, 12px);--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%;flex-direction:column;align-items:flex-start;box-sizing:border-box}.form{padding:var(--ez-radio-button--padding-vertical) var(--ez-radio-button--padding-horizontal);gap:var(--ez-radio-button__form-label--padding-horizontal)}.form--vertical{display:flex;flex-direction:column}.form--horizontal{display:flex;flex-direction:row}.form__group{display:grid;grid-template-columns:20px auto;align-items:center}.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;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);padding-left:var(--ez-radio-button__form-label--padding-horizontal);padding-right:var(--ez-radio-button__form-label--padding-horizontal)}.form__radio{cursor:pointer;appearance:none;outline:none;position:relative;display:flex;align-items:center;justify-content:center;margin:0;padding:0;width:20px;height:20px;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:100%;width:100%;border-radius:50%;transform:scale(0.5);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{d as ez_radio_button}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as i,h as
|
|
1
|
+
import{r as t,c as i,h as a,H as e,g as r}from"./p-23a36bb6.js";import{ElementIDUtils as s,KeyboardManager as o}from"@sankhyalabs/core";const n=class{constructor(a){t(this,a),this.ezChange=i(this,"ezChange",7),this.ezTagAdded=i(this,"ezTagAdded",7),this.ezTagRemoved=i(this,"ezTagRemoved",7),this.ezFocus=i(this,"ezFocus",7),this.ezBlur=i(this,"ezBlur",7),this.ezValidationError=i(this,"ezValidationError",7),this.ezType=i(this,"ezType",7),this.handleInputChange=t=>{this._inputElement.value=t.target.value,this.ezType.emit(this._inputElement.value)},this.handleInputKeyDown=t=>{"Backspace"===t.key&&""===this._inputElement.value&&this.tags.length>0&&!this.suppressBackspaceToRemove&&this.handleRemoveTag(this.tags[this.tags.length-1])},this.handleInputFocus=()=>{this.ezFocus.emit(this.tags)},this.handleInputBlur=()=>{this.ezBlur.emit(this.tags)},this.handleTagClick=(t,i)=>{this.enabled&&!this.readonly&&(this.handleRemoveTag(t),this.updateTagFocus(i))},this.handleClearInput=()=>{this._inputElement.value=""},this.label="",this.placeholder="",this.helpText=void 0,this.enabled=!0,this.readonly=!1,this.name=void 0,this.tags=[],this.maxTagLength=void 0,this.maxTags=void 0,this.allowDuplicates=!1,this.state="default",this.validator=void 0,this.suppressTagsKeyboardNavigation=!1,this.suppressBackspaceToRemove=!1}async setFocus(t){(null==t?void 0:t.selectText)&&this._inputElement.select(),(null==t?void 0:t.preventScroll)||this._inputElement.scrollIntoView({behavior:"smooth",block:"center"}),this._inputElement.focus({preventScroll:!0})}async setBlur(){this._inputElement.blur()}async addTag(t){return this.handleAddTag(t)}async removeTag(t){return this.handleRemoveTag(t)}async clearTags(){this.tags=[],this.ezChange.emit([...this.tags])}addInfoId(){this._element&&s.addIDInfo(this._element),this._inputElement&&s.addIDInfo(this._inputElement,"tag-input",{id:"embedded"})}initializeKeyboardManager(){this._keyboardManager=new o({propagate:!0,element:this._element}).bind("Enter",(()=>this.handleAddCurrentTag())).bind("Tab",(()=>this.handleAddCurrentTag())).bind("Escape",(()=>this.handleClearInput())).bind("ArrowLeft",(()=>this.handlePreviousTagFocus())).bind("ArrowRight",(()=>this.handleNextTagFocus()))}handleAddCurrentTag(){if(this._inputElement.value.trim()){const t=this.handleAddTag(this._inputElement.value);return t&&(this._inputElement.value=""),t}return!1}handleAddTag(t){const i=t.trim();if(!this.enabled||this.readonly)return!1;if(!i||0===i.length)return!1;if(this.maxTagLength&&i.length>this.maxTagLength)return!1;if(this.maxTags&&this.tags.length>=this.maxTags)return!1;if(!this.allowDuplicates&&this.tags.includes(i))return!1;if(this.validator){const t=this.validator(i,[...this.tags]);if(!1===t)return this.ezValidationError.emit({tag:i,error:void 0}),!1;if("string"==typeof t)return this.ezValidationError.emit({tag:i,error:t}),!1}return this.tags=[...this.tags,i],this.ezChange.emit([...this.tags]),this.ezTagAdded.emit(i),!0}async updateTagFocus(t){var i;if(!(null===(i=this.tags)||void 0===i?void 0:i.length)||this.suppressTagsKeyboardNavigation)return void await this.setFocus();if(!t)return;const a=this._element.shadowRoot.querySelector("#tag-"+(t-1));a&&await a.setFocus()}getCurrentActiveTagIndex(){var t;const i=this._element.shadowRoot.activeElement;if(!(null===(t=this.tags)||void 0===t?void 0:t.length)||"ez-chip"!==i.tagName.toLowerCase())return null;const a=parseInt(i.id.split("-")[1],10);return Number.isNaN(a)||a<0||a>=this.tags.length?null:a}async setTagFocus(t){const i=this._element.shadowRoot.querySelector(`#tag-${t}`);i&&await i.setFocus()}async handlePreviousTagFocus(){if(this.suppressTagsKeyboardNavigation||!this.enabled||this.readonly)return;if(this._element.shadowRoot.activeElement===this._inputElement)return void await this.setTagFocus(this.tags.length-1);const t=this.getCurrentActiveTagIndex();null!==t?0!==t&&await this.setTagFocus(t-1):await this.setFocus()}async handleNextTagFocus(){if(this.suppressTagsKeyboardNavigation||!this.enabled||this.readonly)return;const t=this.getCurrentActiveTagIndex();null===t||t>=this.tags.length-1?await this.setFocus():await this.setTagFocus(t+1)}handleRemoveTag(t){return!(!this.enabled||this.readonly)&&(-1!==this.tags.indexOf(t)&&(this.tags=this.tags.filter((i=>i!==t)),this.ezChange.emit([...this.tags]),this.ezTagRemoved.emit(t),!0))}async componentWillLoad(){this.tags||(this.tags=[])}componentDidLoad(){this.addInfoId(),this.initializeKeyboardManager()}disconnectedCallback(){var t;null===(t=this._keyboardManager)||void 0===t||t.unbindAllShortcutKeys()}render(){return a(e,null,a("label",{htmlFor:this.name},this.label),a("div",{class:"tag-input__container","data-state":this.state,"data-disabled":(!this.enabled).toString(),onClick:()=>this.setFocus({preventScroll:!0})},this.tags.map(((t,i)=>a("ez-chip",{key:`tag-${i}`,id:`tag-${i}`,label:t,enabled:this.enabled&&!this.readonly,removePosition:this.enabled&&!this.readonly?"right":void 0,mode:"label",onRemoveChip:()=>this.handleTagClick(t,i),tabIndex:this.suppressTagsKeyboardNavigation||!this.enabled||this.readonly?-1:0,disableAutoUpdateValue:!0,removeWithKeyboard:!0}))),a("input",{ref:t=>this._inputElement=t,id:this.name,type:"text",placeholder:this.placeholder,disabled:!this.enabled,readonly:this.readonly,maxlength:this.maxTagLength,onInput:this.handleInputChange,onKeyDown:this.handleInputKeyDown,onFocus:this.handleInputFocus,onBlur:this.handleInputBlur})),this.helpText&&a("span",{title:this.helpText},this.helpText))}get _element(){return r(this)}};n.style=':host{--ez-tag-input--background-color:var(--color--gray-70, #FFFFFF);--ez-tag-input--border-color-default:var(--color--gray-200, #D2D2D3);--ez-tag-input--border-color-focused:var(--color--gray-300, #A4A5A7);--ez-tag-input--border-color-error:var(--color--red-600, #BD0025);--ez-tag-input--border-color-success:var(--color--green-600, #157A00);--ez-tag-input--border-color-warning:var(--color--yellow-600, #EFB103);--ez-tag-input--border-radius:var(--border--radius-8, 8px);--ez-tag-input--padding:var(--space--12, 12px);--ez-tag-input--gap:var(--space--8, 8px);--ez-tag-input--label-color:var(--color--petroleum-900, #141B27);--ez-tag-input--label-font-weight:var(--font-weight--regular, 400);--ez-tag-input--input-color:var(--color--petroleum-900, #141B27);--ez-tag-input--input-font-size:var(--font-size--default, 14px);--ez-tag-input--placeholder-color:var(--color--gray-400, #77777A);--ez-tag-input--background-color-disabled:var(--color--gray-90, #EAEAEA);--ez-tag-input--helptext-color:var(--color--ocean-green-1000, #00281D);display:flex;flex-direction:column;align-items:flex-start;box-sizing:border-box;font-family:var(--font--pattern, \'Roboto\', Arial, sans-serif);font-size:var(--font-size--default, 14px);color:var(--color--ocean-green-1000, #00281D);width:100%;border:none;padding:0}label{display:block;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:var(--line-height--20, 20px);color:var(--ez-tag-input--label-color);font-weight:var(--ez-tag-input--label-font-weight)}.tag-input__container{display:flex;flex-wrap:wrap;align-items:center;width:100%;box-sizing:border-box;gap:var(--ez-tag-input--gap);padding:var(--ez-tag-input--padding);margin:var(--space--4, 4px) 0;background-color:var(--ez-tag-input--background-color);border-radius:var(--ez-tag-input--border-radius);transition:box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1)}.tag-input__container,.tag-input__container[data-state="default"]{box-shadow:0 0 0 1px var(--ez-tag-input--border-color-default)}.tag-input__container[data-state="error"]{box-shadow:0 0 0 var(--space--2, 2px) var(--ez-tag-input--border-color-error)}.tag-input__container[data-state="success"]{box-shadow:0 0 0 var(--space--2, 2px) var(--ez-tag-input--border-color-success)}.tag-input__container[data-state="warning"]{box-shadow:0 0 0 var(--space--2, 2px) var(--ez-tag-input--border-color-warning)}.tag-input__container:focus-within{box-shadow:0 0 0 var(--space--2, 2px) var(--ez-tag-input--border-color-focused)}input{flex:1;height:var(--space--24, 24px);background:transparent;border:none;outline:none;color:var(--ez-tag-input--input-color);font-family:var(--font--pattern, \'Roboto\');font-size:var(--ez-tag-input--input-font-size);font-weight:var(--font-weight--regular, 400);line-height:var(--line-height--20, 20px)}input::placeholder{color:var(--ez-tag-input--placeholder-color)}.tag-input__container[data-disabled="true"]{cursor:not-allowed;background:var(--ez-tag-input--background-color-disabled);box-shadow:0 0 0 1px var(--ez-tag-input--border-color-default)}.tag-input__container[data-disabled="true"]>*{cursor:not-allowed}input:read-only .tag-input__container>*{cursor:default}@keyframes ez-helptext-fadein{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}span{font-size:var(--font-size--xsmall, 10px);line-height:var(--line-height--16, 16px);overflow:hidden;text-overflow:ellipsis;animation:ez-helptext-fadein 0.3s ease;color:var(--ez-tag-input--helptext-color)}';export{n as ez_tag_input}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as i,h as e,H as r,g as o}from"./p-e4c7eb39.js";import{MaskFormatter as n,ElementIDUtils as s}from"@sankhyalabs/core";const a=class{constructor(e){t(this,e),this.ezChange=i(this,"ezChange",7),this._isOverflowing=!1,this.label=void 0,this.alternativePlaceholder=void 0,this.value=void 0,this.enabled=!0,this.errorMessage=void 0,this.hasInvalid=!1,this.mask=void 0,this.cleanValueMask=!1,this.canShowError=!0,this.restrict=void 0,this.mode="regular",this.noBorder=!1,this.password=!1,this.autoFocus=!1,this.hasRightSlotContent=!1,this.forceLabelFloat=!1}observeHasInvalid(t,i){t!==i&&this.validateErrors()}observeMask(){this.mask&&(null==this._maskFormatter?this._maskFormatter=new n(this.mask):this._maskFormatter.mask=this.mask)}observeValue(t,i){this._inputElem&&t!=i&&(this._inputElem.value=this.value||"",this.handleChange(),this.adjustFloatingLabel(),this.checkIsOverflowing(),this.isSlaveMode()||(this.errorMessage="",this.ezChange.emit(this.value)))}observeAlternativePlaceholder(t){this.forceLabelFloat=!!t}validateErrors(){const t=this.handleValidateErrorMessage(this.errorMessage);this.updateClassError(this.canShowError&&(t||this.hasInvalid))}handleValidateErrorMessage(t=this.errorMessage){return"string"==typeof t&&""!==t.trim()}updateClassError(t){this._inputElem&&(t?this._inputElem.classList.add("hasError"):this._inputElem.classList.remove("hasError"))}adjustFloatingLabel(){if(this.label&&this._labelElem){if(this._inputElem&&!this._inputElem.classList.contains("input--with--label")&&this._inputElem.classList.add("input--with--label"),this.forceLabelFloat)return;const t=this.value&&this.value.toString().length>0,i=this._labelElem.classList.contains("input__label--floated");t||this.isFocused()?i||this._labelElem.classList.add("input__label--floated"):i&&this._labelElem.classList.remove("input__label--floated")}}isFocused(){return null!==this._hostElement.shadowRoot.activeElement}isSlaveMode(){var t,i;return"true"===(null===(i=null===(t=this._hostElement)||void 0===t?void 0:t.dataset)||void 0===i?void 0:i.slaveMode)}adjustColorContentSlot(t=""){this._contentLeftSlot&&(this._contentLeftSlot.style.color=t)}adjustBorderInput(){this.noBorder&&this._inputElem.classList.add("input__slim--noborder")}buildMaskFormatter(){if(this.mask){const t=this.getMaskToBuilder();this._maskFormatter=t?new n(t):void 0}}getMaskToBuilder(){return"cgc_cpf"===this.mask?this.getCGCCpfMask():"phone"===this.mask?this.getPhoneMask():this.mask in n.DEFAULT_MASKS?n.DEFAULT_MASKS[this.mask]:this.mask}getPhoneMask(){return this.value&&10===this.value.length?n.DEFAULT_MASKS?n.DEFAULT_MASKS.phone:void 0:this.value&&11===this.value.length&&n.DEFAULT_MASKS?n.DEFAULT_MASKS.phone_mobile:void 0}getCGCCpfMask(){return this.value&&11===this.value.length?n.DEFAULT_MASKS?n.DEFAULT_MASKS.cpf:void 0:this.value&&14===this.value.length&&n.DEFAULT_MASKS?n.DEFAULT_MASKS.cnpj:void 0}async setFocus(t){const{selectText:i}=t||{};if(i&&this._inputElem.select(),this._inputElem.disabled)return this._inputElem.classList.add("focused"),void this._inputElem.scrollIntoView({behavior:"smooth",block:"start"});requestAnimationFrame((()=>this._inputElem.focus()))}async setBlur(){this._inputElem.blur()}async isInvalid(){return this.handleValidateErrorMessage()}handleFocusout(){const t=this._inputElem.value;if(t&&this._maskFormatter)try{this.cleanValueMask?this.applyMask(t):this._inputElem.value=this._maskFormatter.format(t)}catch(t){this.errorMessage=t.message}this.controlChangeValue(),this.adjustFloatingLabel(),this.adjustColorContentSlot()}isValidValue(t){return!this.restrict||Array.from(t).reduce(((t,i)=>t&&this.restrict.indexOf(i)>-1),!0)}controlChangeValue(){this._inputElem&&(this.value||"")!==this._inputElem.value&&(this.value=this.cleanValueMask&&this._maskFormatter?this._maskFormatter.removeMask(this._inputElem.value):this._inputElem.value)}applyMask(t){if(!t||""===t)return t;if(this._maskFormatter)try{const i=this._maskFormatter.applyMask(this._maskFormatter.removeMask(t));return this._inputElem?(this._inputElem.value=i,this._inputElem.value):(this.value=i,this.value)}catch(t){this.errorMessage=t.message}return t}handleChange(){if(!this._inputElem)return;const t=this._inputElem.value;this.isValidValue(t)?this._lastValidValue=t:this._inputElem.value=null==this._lastValidValue?"":this._lastValidValue,this.controlChangeValue()}handleSlotChange(t){var i;const e=t.target,r=e.assignedElements()[0];this.hasRightSlotContent=!1,r&&(r.style.position="absolute",r.style.display="flex",r.style.alignItems="center",r.style.justifyContent="center",r.style.overflow="hidden",r.style.top="0px",r.style.width="var(--ez-text-input__icon--width)",r.style.height="slim"!=this.mode?"var(--ez-text-input--height)":"var(--ez-text-input--height--slim)","leftIcon"==e.name?(r.style.left="0px",r.style.borderRadius="var(--ez-text-input--border-radius) 0 0 var(--ez-text-input--border-radius)",this._inputElem.classList.add("icon--left"),this._labelElem&&this._labelElem.classList.add("input__label--left"),this._contentLeftSlot=r):"rightIcon"==e.name&&(r.style.right="0px",r.style.borderRadius="0 var(--ez-text-input--border-radius) var(--ez-text-input--border-radius) 0",this._inputElem.classList.add("icon--right"),this._labelElem&&this._labelElem.classList.add("input__label--right"),this._tooltipIconElem&&this._tooltipIconElem.classList.add("rightIconSlot"),this.hasRightSlotContent=(null===(i=r.children)||void 0===i?void 0:i.length)>0),e.name&&s.addIDInfo(r,e.name)),this.validateErrors()}doFocus(){this.label&&this._labelElem&&!this._labelElem.classList.contains("input__label--floated")&&this._labelElem.classList.add("input__label--floated"),this.adjustColorContentSlot("var(--ez-text-input__input--focus--icon-color)")}getValue(){return this.mask&&this.cleanValueMask?this.applyMask(this.value):this.value}buildLabelClass(){let t=this.enabled?"input__label":"input__label input__label--disabled";return this.errorMessage&&(t+=" hasError"),this.forceLabelFloat&&(t+=" input__label--floated"),t}buildPlaceholder(){return this.alternativePlaceholder?this.alternativePlaceholder:"slim"===this.mode&&this.label?this.label:""}checkIsOverflowing(){this._isOverflowing=!!this._inputElem&&this._inputElem.offsetWidth<this._inputElem.scrollWidth}componentWillLoad(){if(this.observeMask(),this.forceLabelFloat=!!this.alternativePlaceholder,this.value){if(this._maskFormatter)try{this.cleanValueMask?this.applyMask(this.value):this.value=this._maskFormatter.format(this.value)}catch(t){this.errorMessage=t.message}this.isValidValue(this.value)||(this._lastValidValue="",this.value="")}}componentDidLoad(){var t;this.validateErrors(),this.observeMask(),this.adjustFloatingLabel(),this.adjustBorderInput(),this.checkIsOverflowing(),this.autoFocus&&requestAnimationFrame((()=>{this.setFocus({selectText:!0})})),null===(t=this._inputElem)||void 0===t||t.addEventListener("focus",(()=>{var t;this._inputElem.setSelectionRange(0,null===(t=this._inputElem)||void 0===t?void 0:t.value.length)})),this.onClickOutside=t=>{this._inputElem.contains(t.target)||this._inputElem.classList.remove("focused")},document.addEventListener("click",this.onClickOutside)}disconnectedCallback(){document.removeEventListener("click",this.onClickOutside)}componentDidRender(){this.adjustFloatingLabel(),this.buildMaskFormatter()}render(){return s.addIDInfoIfNotExists(this._hostElement,"input"),e(r,{style:this._hostElement.classList.contains("grid_editor")?{height:"100%"}:null},e("slot",{name:"leftIcon",onSlotchange:t=>{this.handleSlotChange(t)}}),this.label&&"slim"!=this.mode?e("label",{ref:t=>this._labelElem=t,class:this.buildLabelClass(),onClick:()=>this._inputElem.focus(),title:this.label},this.label):null,e("input",{"data-element-id":s.getInternalIDInfo("input"),onFocus:()=>this.doFocus(),ref:t=>this._inputElem=t,type:this.password?"password":"text",class:"slim"===this.mode?"input--slim":"",placeholder:this.buildPlaceholder(),value:this.getValue(),disabled:!this.enabled,onInput:()=>{this.handleChange()},onFocusout:()=>{this.handleFocusout()}}),e("ez-tooltip",{anchoringElement:this._hostElement,message:this.getValue(),active:this._isOverflowing,useAnchorSize:!0}),this.canShowError&&"slim"!=this.mode&&this.errorMessage&&e("ez-tooltip",{type:"error",message:this.errorMessage},e("ez-icon",{class:`tooltip-icon ${this.errorMessage?"hasError":""} ${this.hasRightSlotContent?"rightIconSlot":""}`,"data-element-id":s.getInternalIDInfo("tooltip-icon"),ref:t=>this._tooltipIconElem=t,iconName:"alert-circle"})),e("slot",{name:"rightIcon",onSlotchange:t=>{this.handleSlotChange(t)}}," "))}get _hostElement(){return o(this)}static get watchers(){return{hasInvalid:["observeHasInvalid"],errorMessage:["observeHasInvalid"],canShowError:["observeHasInvalid"],mask:["observeMask"],value:["observeValue"],alternativePlaceholder:["observeAlternativePlaceholder"]}}};a.style=":host{--ez-text-input--height:42px;--ez-text-input--width:100%;--ez-text-input__icon--width:30px;--ez-text-input--height--slim:32px;--ez-text-input__min-width:0px;--ez-text-input__max-width:100%;--ez-text-input--border-radius:var(--border--radius-medium, 12px);--ez-text-input--border-top-left-radius:var(--ez-text-input--border-radius);--ez-text-input--border-bottom-left-radius:var(--ez-text-input--border-radius);--ez-text-input--border-top-right-radius:var(--ez-text-input--border-radius);--ez-text-input--border-bottom-right-radius:var(--ez-text-input--border-radius);--ez-text-input--font-size:var(--text--medium, 14px);--ez-text-input--font-family:var(--font-pattern, Arial);--ez-text-input--font-weight:var(--text-weight--medium, 400);--ez-text-input--color:var(--title--primary, #2B3A54);--ez-text-input__margin-bottom:var(--space--small);--ez-text-input__input--background-color:var(--background--light, #ffffff);--ez-text-input__input--border:var(--border--small, 1px solid);--ez-text-input__input--border-color:var(--color--strokes,#DCE0E8);--ez-text-input__input--focus--border-color:var(--color--primary, #008561);--ez-text-input__input--disabled--background-color:var(--background--medium, #F0F3F7);--ez-text-input__input--disabled--color:var(--text--primary, #626E82);--ez-text-input__input--error--border-color:var(--color-alert--error-800,#BD0025);--ez-text-input__input--noborder-color:white;--ez-text-input__input--padding:var(--space--medium, 6px);--ez-text-input__placeholder--color:var(--text--secondary, #a2abb9);--ez-text-input__tooltip_icon--error--color:var(--color-alert--error-800,#BD0025);--ez-text-input__label--floating--top:6px;--ez-text-input__label--padding-top:12px;--ez-text-input__label--padding-left:14px;--ez-text-input__label--padding-right:12px;--ez-text-input__input--focus--icon-color:var(--title--primary, #2B3A54);--ez-text-input__input--disabled--focus--icon-color:var(--text--primary, #626E82);--ez-text-input__tooltip-icon--spacing:var(--space--large);--ez-text-input__tooltip-icon---width:var(--space--large);--ez-text-input__tooltip-icon---horizontal-margin:var(--space--medium, 12px);--ez-text-input__tooltip-icon---vertical-margin:10px;display:flex;flex-wrap:wrap;position:relative;width:var(--ez-text-input--width);min-width:var(--ez-text-input__min-width);max-width:var(--ez-text-input__max-width)}:host(.grid_editor){--ez-text-input--height--slim:25px}input{width:100%;box-sizing:border-box;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;height:var(--ez-text-input--height);border-top-left-radius:var(--ez-text-input--border-top-left-radius);border-bottom-left-radius:var(--ez-text-input--border-bottom-left-radius);border-top-right-radius:var(--ez-text-input--border-top-right-radius);border-bottom-right-radius:var(--ez-text-input--border-bottom-right-radius);font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);border:var(--ez-text-input__input--border);border-color:var(--ez-text-input__input--border-color);background-color:var(--ez-text-input__input--background-color);color:var(--ez-text-input--color);font-weight:var(--ez-text-input--font-weight);padding:var(--ez-text-input__input--padding);margin-bottom:var(--ez-text-input__margin-bottom)}input.no--margin{--ez-text-input__margin-bottom:0}input:disabled{background-color:var(--ez-text-input__input--disabled--background-color);color:var(--ez-text-input__input--disabled--color);cursor:not-allowed}input:focus{outline:none;border:var(--border--medium, 2px solid);border-color:var(--ez-text-input__input--focus--border-color)}input.focused{border:var(--border--medium, 2px solid);border-color:var(--ez-text-input__input--focus--border-color)}input.icon--left{padding-left:var(--ez-text-input__icon--width)}input.icon--left.hasError{padding-right:var(--ez-text-input__icon--width)}input.icon--right{padding-right:var(--ez-text-input__icon--width)}input.icon--right.hasError{padding-right:calc(var(--ez-text-input__icon--width) + var(--ez-text-input__tooltip-icon--spacing))}input.hasError{color:var(--ez-text-input--color);border:var(--border--medium, 2px solid);border-color:var(--ez-text-input__input--error--border-color);padding-right:calc(var(--ez-text-input__tooltip-icon---width) + (2*var(--ez-text-input__tooltip-icon---horizontal-margin)))}input:disabled.hasError{color:var(--ez-text-input__input--disabled--color)}input.text--right{text-align:right}input:disabled,input:read-only{cursor:not-allowed}.hasError{color:var(--ez-text-input__tooltip_icon--error--color)}.input__label{box-sizing:border-box;position:absolute;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;-webkit-transition:font-size .05s, top .05s;transition:font-size .05s, top .05s;width:calc(100% - (var(--ez-text-input__label--padding-right) + var(--ez-text-input__label--padding-left)));left:var(--ez-text-input--space--medium);font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);font-weight:var(--ez-text-input--font-weight);color:var(--ez-text-input--color);top:var(--ez-text-input__label--padding-top);left:var(--ez-text-input__label--padding-left);padding-right:var(--ez-text-input__label--padding-right)}.input__label.hasError{width:calc(100% - 2*(var(--ez-text-input__tooltip-icon--spacing)))}.input__label--floated{font-family:var(--ez-text-input--font-family);font-size:var(--text--extra-small);color:var(--text--primary);top:var(--ez-text-input__label--floating--top)}.input__label--disabled{color:var(--ez-text-input__input--disabled--color);cursor:not-allowed}.input__label--left{text-align:left;left:calc(var(--ez-text-input__icon--width) + 2px);width:calc(100% - (var(--ez-text-input__icon--width) + var(--ez-text-input__label--padding-right)))}.input__label--left.hasError{width:calc(100% - var(--ez-text-input__icon--width) - var(--ez-text-input__tooltip-icon--spacing))}.input__label--right{right:var(--ez-text-input__icon--width);width:calc(100% - (var(--ez-text-input__icon--width) + var(--ez-text-input__label--padding-left)))}.input__label--right.hasError{width:calc(100% - var(--ez-text-input__icon--width) - var(--ez-text-input__tooltip-icon--spacing))}.input__label--left.input__label--right{left:calc(var(--ez-text-input__icon--width) + 2px);width:calc(100% - var(--ez-text-input__icon--width) * 2)}.input--with--label{padding-bottom:0}.input--slim{padding-top:var(--space--small, 3px);padding-bottom:var(--space--small, 3px);height:var(--ez-text-input--height--slim)}.input__slim--title{font-size:16px;font-weight:bold}.input--slim::-webkit-input-placeholder,.input--slim:-moz-placeholder,.input--slim::-moz-placeholder,.input--slim:-ms-input-placeholder,.input--slim::placeholder{font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);font-weight:var(--ez-text-input--font-weight);color:var(--ez-text-input__placeholder--color)}.input--slim:disabled::-webkit-input-placeholder,.input--slim:disabled:-moz-placeholder,.input--slim:disabled::-moz-placeholder,.input--slim:disabled:-ms-input-placeholder,.input--slim:disabled::placeholder{color:var(--ez-text-input__input--disabled--color)}input.input__slim--noborder{box-shadow:0 0 0 0;border:0 none;outline:0;background:var(--ez-text-input__input--noborder-color)}ez-icon.tooltip-icon{position:absolute;display:flex;align-items:center;justify-content:center;overflow:hidden;width:var(--ez-text-input__tooltip-icon---width);height:22px;margin:var(--ez-text-input__tooltip-icon---vertical-margin) var(--ez-text-input__tooltip-icon---horizontal-margin);top:0;right:0;border-radius:var(--ez-text-input--border-radius)}ez-icon.tooltip-icon.rightIconSlot{right:var(--ez-text-input__tooltip-icon--spacing)}ez-icon.tooltip-icon.hasError{--ez-icon--color:var(--ez-text-input__tooltip_icon--error--color)}";export{a as ez_text_input}
|
|
1
|
+
import{r as t,c as i,h as e,H as r,g as o}from"./p-23a36bb6.js";import{MaskFormatter as n,ElementIDUtils as s}from"@sankhyalabs/core";const a=class{constructor(e){t(this,e),this.ezChange=i(this,"ezChange",7),this._isOverflowing=!1,this.label=void 0,this.alternativePlaceholder=void 0,this.value=void 0,this.enabled=!0,this.errorMessage=void 0,this.hasInvalid=!1,this.mask=void 0,this.cleanValueMask=!1,this.canShowError=!0,this.restrict=void 0,this.mode="regular",this.noBorder=!1,this.password=!1,this.autoFocus=!1,this.hasRightSlotContent=!1,this.forceLabelFloat=!1}observeHasInvalid(t,i){t!==i&&this.validateErrors()}observeMask(){this.mask&&(null==this._maskFormatter?this._maskFormatter=new n(this.mask):this._maskFormatter.mask=this.mask)}observeValue(t,i){this._inputElem&&t!=i&&(this._inputElem.value=this.value||"",this.handleChange(),this.adjustFloatingLabel(),this.checkIsOverflowing(),this.isSlaveMode()||(this.errorMessage="",this.ezChange.emit(this.value)))}observeAlternativePlaceholder(t){this.forceLabelFloat=!!t}validateErrors(){const t=this.handleValidateErrorMessage(this.errorMessage);this.updateClassError(this.canShowError&&(t||this.hasInvalid))}handleValidateErrorMessage(t=this.errorMessage){return"string"==typeof t&&""!==t.trim()}updateClassError(t){this._inputElem&&(t?this._inputElem.classList.add("hasError"):this._inputElem.classList.remove("hasError"))}adjustFloatingLabel(){if(this.label&&this._labelElem){if(this._inputElem&&!this._inputElem.classList.contains("input--with--label")&&this._inputElem.classList.add("input--with--label"),this.forceLabelFloat)return;const t=this.value&&this.value.toString().length>0,i=this._labelElem.classList.contains("input__label--floated");t||this.isFocused()?i||this._labelElem.classList.add("input__label--floated"):i&&this._labelElem.classList.remove("input__label--floated")}}isFocused(){return null!==this._hostElement.shadowRoot.activeElement}isSlaveMode(){var t,i;return"true"===(null===(i=null===(t=this._hostElement)||void 0===t?void 0:t.dataset)||void 0===i?void 0:i.slaveMode)}adjustColorContentSlot(t=""){this._contentLeftSlot&&(this._contentLeftSlot.style.color=t)}adjustBorderInput(){this.noBorder&&this._inputElem.classList.add("input__slim--noborder")}buildMaskFormatter(){if(this.mask){const t=this.getMaskToBuilder();this._maskFormatter=t?new n(t):void 0}}getMaskToBuilder(){return"cgc_cpf"===this.mask?this.getCGCCpfMask():"phone"===this.mask?this.getPhoneMask():this.mask in n.DEFAULT_MASKS?n.DEFAULT_MASKS[this.mask]:this.mask}getPhoneMask(){return this.value&&10===this.value.length?n.DEFAULT_MASKS?n.DEFAULT_MASKS.phone:void 0:this.value&&11===this.value.length&&n.DEFAULT_MASKS?n.DEFAULT_MASKS.phone_mobile:void 0}getCGCCpfMask(){return this.value&&11===this.value.length?n.DEFAULT_MASKS?n.DEFAULT_MASKS.cpf:void 0:this.value&&14===this.value.length&&n.DEFAULT_MASKS?n.DEFAULT_MASKS.cnpj:void 0}async setFocus(t){const{selectText:i}=t||{};if(i&&this._inputElem.select(),this._inputElem.disabled)return this._inputElem.classList.add("focused"),void this._inputElem.scrollIntoView({behavior:"smooth",block:"start"});requestAnimationFrame((()=>this._inputElem.focus()))}async setBlur(){this._inputElem.blur()}async isInvalid(){return this.handleValidateErrorMessage()}handleFocusout(){const t=this._inputElem.value;if(t&&this._maskFormatter)try{this.cleanValueMask?this.applyMask(t):this._inputElem.value=this._maskFormatter.format(t)}catch(t){this.errorMessage=t.message}this.controlChangeValue(),this.adjustFloatingLabel(),this.adjustColorContentSlot()}isValidValue(t){return!this.restrict||Array.from(t).reduce(((t,i)=>t&&this.restrict.indexOf(i)>-1),!0)}controlChangeValue(){this._inputElem&&(this.value||"")!==this._inputElem.value&&(this.value=this.cleanValueMask&&this._maskFormatter?this._maskFormatter.removeMask(this._inputElem.value):this._inputElem.value)}applyMask(t){if(!t||""===t)return t;if(this._maskFormatter)try{const i=this._maskFormatter.applyMask(this._maskFormatter.removeMask(t));return this._inputElem?(this._inputElem.value=i,this._inputElem.value):(this.value=i,this.value)}catch(t){this.errorMessage=t.message}return t}handleChange(){if(!this._inputElem)return;const t=this._inputElem.value;this.isValidValue(t)?this._lastValidValue=t:this._inputElem.value=null==this._lastValidValue?"":this._lastValidValue,this.controlChangeValue()}handleSlotChange(t){var i;const e=t.target,r=e.assignedElements()[0];this.hasRightSlotContent=!1,r&&(r.style.position="absolute",r.style.display="flex",r.style.alignItems="center",r.style.justifyContent="center",r.style.overflow="hidden",r.style.top="0px",r.style.width="var(--ez-text-input__icon--width)",r.style.height="slim"!=this.mode?"var(--ez-text-input--height)":"var(--ez-text-input--height--slim)","leftIcon"==e.name?(r.style.left="0px",r.style.borderRadius="var(--ez-text-input--border-radius) 0 0 var(--ez-text-input--border-radius)",this._inputElem.classList.add("icon--left"),this._labelElem&&this._labelElem.classList.add("input__label--left"),this._contentLeftSlot=r):"rightIcon"==e.name&&(r.style.right="0px",r.style.borderRadius="0 var(--ez-text-input--border-radius) var(--ez-text-input--border-radius) 0",this._inputElem.classList.add("icon--right"),this._labelElem&&this._labelElem.classList.add("input__label--right"),this._tooltipIconElem&&this._tooltipIconElem.classList.add("rightIconSlot"),this.hasRightSlotContent=(null===(i=r.children)||void 0===i?void 0:i.length)>0),e.name&&s.addIDInfo(r,e.name)),this.validateErrors()}doFocus(){this.label&&this._labelElem&&!this._labelElem.classList.contains("input__label--floated")&&this._labelElem.classList.add("input__label--floated"),this.adjustColorContentSlot("var(--ez-text-input__input--focus--icon-color)")}getValue(){return this.mask&&this.cleanValueMask?this.applyMask(this.value):this.value}buildLabelClass(){let t=this.enabled?"input__label":"input__label input__label--disabled";return this.errorMessage&&(t+=" hasError"),this.forceLabelFloat&&(t+=" input__label--floated"),t}buildPlaceholder(){return this.alternativePlaceholder?this.alternativePlaceholder:"slim"===this.mode&&this.label?this.label:""}checkIsOverflowing(){this._isOverflowing=!!this._inputElem&&this._inputElem.offsetWidth<this._inputElem.scrollWidth}componentWillLoad(){if(this.observeMask(),this.forceLabelFloat=!!this.alternativePlaceholder,this.value){if(this._maskFormatter)try{this.cleanValueMask?this.applyMask(this.value):this.value=this._maskFormatter.format(this.value)}catch(t){this.errorMessage=t.message}this.isValidValue(this.value)||(this._lastValidValue="",this.value="")}}componentDidLoad(){var t;this.validateErrors(),this.observeMask(),this.adjustFloatingLabel(),this.adjustBorderInput(),this.checkIsOverflowing(),this.autoFocus&&requestAnimationFrame((()=>{this.setFocus({selectText:!0})})),null===(t=this._inputElem)||void 0===t||t.addEventListener("focus",(()=>{var t;this._inputElem.setSelectionRange(0,null===(t=this._inputElem)||void 0===t?void 0:t.value.length)})),this.onClickOutside=t=>{this._inputElem.contains(t.target)||this._inputElem.classList.remove("focused")},document.addEventListener("click",this.onClickOutside)}disconnectedCallback(){document.removeEventListener("click",this.onClickOutside)}componentDidRender(){this.adjustFloatingLabel(),this.buildMaskFormatter()}render(){return s.addIDInfoIfNotExists(this._hostElement,"input"),e(r,{style:this._hostElement.classList.contains("grid_editor")?{height:"100%"}:null},e("slot",{name:"leftIcon",onSlotchange:t=>{this.handleSlotChange(t)}}),this.label&&"slim"!=this.mode?e("label",{ref:t=>this._labelElem=t,class:this.buildLabelClass(),onClick:()=>this._inputElem.focus(),title:this.label},this.label):null,e("input",{"data-element-id":s.getInternalIDInfo("input"),onFocus:()=>this.doFocus(),ref:t=>this._inputElem=t,type:this.password?"password":"text",class:"slim"===this.mode?"input--slim":"",placeholder:this.buildPlaceholder(),value:this.getValue(),disabled:!this.enabled,onInput:()=>{this.handleChange()},onFocusout:()=>{this.handleFocusout()}}),e("ez-tooltip",{anchoringElement:this._hostElement,message:this.getValue(),active:this._isOverflowing,useAnchorSize:!0}),this.canShowError&&"slim"!=this.mode&&this.errorMessage&&e("ez-tooltip",{type:"error",message:this.errorMessage},e("ez-icon",{class:`tooltip-icon ${this.errorMessage?"hasError":""} ${this.hasRightSlotContent?"rightIconSlot":""}`,"data-element-id":s.getInternalIDInfo("tooltip-icon"),ref:t=>this._tooltipIconElem=t,iconName:"alert-circle"})),e("slot",{name:"rightIcon",onSlotchange:t=>{this.handleSlotChange(t)}}," "))}get _hostElement(){return o(this)}static get watchers(){return{hasInvalid:["observeHasInvalid"],errorMessage:["observeHasInvalid"],canShowError:["observeHasInvalid"],mask:["observeMask"],value:["observeValue"],alternativePlaceholder:["observeAlternativePlaceholder"]}}};a.style=":host{--ez-text-input--height:42px;--ez-text-input--width:100%;--ez-text-input__icon--width:30px;--ez-text-input--height--slim:32px;--ez-text-input__min-width:0px;--ez-text-input__max-width:100%;--ez-text-input--border-radius:var(--border--radius-medium, 12px);--ez-text-input--border-top-left-radius:var(--ez-text-input--border-radius);--ez-text-input--border-bottom-left-radius:var(--ez-text-input--border-radius);--ez-text-input--border-top-right-radius:var(--ez-text-input--border-radius);--ez-text-input--border-bottom-right-radius:var(--ez-text-input--border-radius);--ez-text-input--font-size:var(--text--medium, 14px);--ez-text-input--font-family:var(--font-pattern, Arial);--ez-text-input--font-weight:var(--text-weight--medium, 400);--ez-text-input--color:var(--title--primary, #2B3A54);--ez-text-input__margin-bottom:var(--space--small);--ez-text-input__input--background-color:var(--background--light, #ffffff);--ez-text-input__input--border:var(--border--small, 1px solid);--ez-text-input__input--border-color:var(--color--strokes,#DCE0E8);--ez-text-input__input--focus--border-color:var(--color--primary, #008561);--ez-text-input__input--disabled--background-color:var(--background--medium, #F0F3F7);--ez-text-input__input--disabled--color:var(--text--primary, #626E82);--ez-text-input__input--error--border-color:var(--color-alert--error-800,#BD0025);--ez-text-input__input--noborder-color:white;--ez-text-input__input--padding:var(--space--medium, 6px);--ez-text-input__placeholder--color:var(--text--secondary, #a2abb9);--ez-text-input__tooltip_icon--error--color:var(--color-alert--error-800,#BD0025);--ez-text-input__label--floating--top:6px;--ez-text-input__label--padding-top:12px;--ez-text-input__label--padding-left:14px;--ez-text-input__label--padding-right:12px;--ez-text-input__input--focus--icon-color:var(--title--primary, #2B3A54);--ez-text-input__input--disabled--focus--icon-color:var(--text--primary, #626E82);--ez-text-input__tooltip-icon--spacing:var(--space--large);--ez-text-input__tooltip-icon---width:var(--space--large);--ez-text-input__tooltip-icon---horizontal-margin:var(--space--medium, 12px);--ez-text-input__tooltip-icon---vertical-margin:10px;display:flex;flex-wrap:wrap;position:relative;width:var(--ez-text-input--width);min-width:var(--ez-text-input__min-width);max-width:var(--ez-text-input__max-width)}:host(.grid_editor){--ez-text-input--height--slim:25px}input{width:100%;box-sizing:border-box;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;height:var(--ez-text-input--height);border-top-left-radius:var(--ez-text-input--border-top-left-radius);border-bottom-left-radius:var(--ez-text-input--border-bottom-left-radius);border-top-right-radius:var(--ez-text-input--border-top-right-radius);border-bottom-right-radius:var(--ez-text-input--border-bottom-right-radius);font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);border:var(--ez-text-input__input--border);border-color:var(--ez-text-input__input--border-color);background-color:var(--ez-text-input__input--background-color);color:var(--ez-text-input--color);font-weight:var(--ez-text-input--font-weight);padding:var(--ez-text-input__input--padding);margin-bottom:var(--ez-text-input__margin-bottom)}input.no--margin{--ez-text-input__margin-bottom:0}input:disabled{background-color:var(--ez-text-input__input--disabled--background-color);color:var(--ez-text-input__input--disabled--color);cursor:not-allowed}input:focus{outline:none;border:var(--border--medium, 2px solid);border-color:var(--ez-text-input__input--focus--border-color)}input.focused{border:var(--border--medium, 2px solid);border-color:var(--ez-text-input__input--focus--border-color)}input.icon--left{padding-left:var(--ez-text-input__icon--width)}input.icon--left.hasError{padding-right:var(--ez-text-input__icon--width)}input.icon--right{padding-right:var(--ez-text-input__icon--width)}input.icon--right.hasError{padding-right:calc(var(--ez-text-input__icon--width) + var(--ez-text-input__tooltip-icon--spacing))}input.hasError{color:var(--ez-text-input--color);border:var(--border--medium, 2px solid);border-color:var(--ez-text-input__input--error--border-color);padding-right:calc(var(--ez-text-input__tooltip-icon---width) + (2*var(--ez-text-input__tooltip-icon---horizontal-margin)))}input:disabled.hasError{color:var(--ez-text-input__input--disabled--color)}input.text--right{text-align:right}input:disabled,input:read-only{cursor:not-allowed}.hasError{color:var(--ez-text-input__tooltip_icon--error--color)}.input__label{box-sizing:border-box;position:absolute;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;-webkit-transition:font-size .05s, top .05s;transition:font-size .05s, top .05s;width:calc(100% - (var(--ez-text-input__label--padding-right) + var(--ez-text-input__label--padding-left)));left:var(--ez-text-input--space--medium);font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);font-weight:var(--ez-text-input--font-weight);color:var(--ez-text-input--color);top:var(--ez-text-input__label--padding-top);left:var(--ez-text-input__label--padding-left);padding-right:var(--ez-text-input__label--padding-right)}.input__label.hasError{width:calc(100% - 2*(var(--ez-text-input__tooltip-icon--spacing)))}.input__label--floated{font-family:var(--ez-text-input--font-family);font-size:var(--text--extra-small);color:var(--text--primary);top:var(--ez-text-input__label--floating--top)}.input__label--disabled{color:var(--ez-text-input__input--disabled--color);cursor:not-allowed}.input__label--left{text-align:left;left:calc(var(--ez-text-input__icon--width) + 2px);width:calc(100% - (var(--ez-text-input__icon--width) + var(--ez-text-input__label--padding-right)))}.input__label--left.hasError{width:calc(100% - var(--ez-text-input__icon--width) - var(--ez-text-input__tooltip-icon--spacing))}.input__label--right{right:var(--ez-text-input__icon--width);width:calc(100% - (var(--ez-text-input__icon--width) + var(--ez-text-input__label--padding-left)))}.input__label--right.hasError{width:calc(100% - var(--ez-text-input__icon--width) - var(--ez-text-input__tooltip-icon--spacing))}.input__label--left.input__label--right{left:calc(var(--ez-text-input__icon--width) + 2px);width:calc(100% - var(--ez-text-input__icon--width) * 2)}.input--with--label{padding-bottom:0}.input--slim{padding-top:var(--space--small, 3px);padding-bottom:var(--space--small, 3px);height:var(--ez-text-input--height--slim)}.input__slim--title{font-size:16px;font-weight:bold}.input--slim::-webkit-input-placeholder,.input--slim:-moz-placeholder,.input--slim::-moz-placeholder,.input--slim:-ms-input-placeholder,.input--slim::placeholder{font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);font-weight:var(--ez-text-input--font-weight);color:var(--ez-text-input__placeholder--color)}.input--slim:disabled::-webkit-input-placeholder,.input--slim:disabled:-moz-placeholder,.input--slim:disabled::-moz-placeholder,.input--slim:disabled:-ms-input-placeholder,.input--slim:disabled::placeholder{color:var(--ez-text-input__input--disabled--color)}input.input__slim--noborder{box-shadow:0 0 0 0;border:0 none;outline:0;background:var(--ez-text-input__input--noborder-color)}ez-icon.tooltip-icon{position:absolute;display:flex;align-items:center;justify-content:center;overflow:hidden;width:var(--ez-text-input__tooltip-icon---width);height:22px;margin:var(--ez-text-input__tooltip-icon---vertical-margin) var(--ez-text-input__tooltip-icon---horizontal-margin);top:0;right:0;border-radius:var(--ez-text-input--border-radius)}ez-icon.tooltip-icon.rightIconSlot{right:var(--ez-text-input__tooltip-icon--spacing)}ez-icon.tooltip-icon.hasError{--ez-icon--color:var(--ez-text-input__tooltip_icon--error--color)}";export{a as ez_text_input}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r,h as e,H as s}from"./p-
|
|
1
|
+
import{r,h as e,H as s}from"./p-23a36bb6.js";const a=class{constructor(e){r(this,e),this.percent=void 0,this.label=void 0,this.helpText=void 0}renderHeader(){if(this.label)return e("div",{class:"ez-progress-bar__header"},e("span",{class:"ez-progress-bar__header-label"},this.label),e("span",{class:"ez-progress-bar__header-percent"},this.percent,"%"))}renderHelpText(){if(this.helpText)return e("div",{class:"ez-progress-bar__help-text"},this.helpText)}render(){return e(s,null,this.renderHeader(),e("div",{class:"progress-bar__container"},e("div",{class:"progress-bar__content",style:{width:`${this.percent}%`}})),this.renderHelpText())}};a.style=".sc-ez-progress-bar-h{--ez-progress-bar-container-height:var(--space--16, 16px);--ez-progress-bar-radius:var(--border--radius-10, 10px);--ez-progress-bar-container-background:var(--background--medium, #F0F3F7);--ez-progress-bar-container-border:1px solid var(--color--strokes, #DCE0E8);--ez-progress-bar-height:var(--space--12, 12px);--ez-progress-bar-background:var(--color--primary, #008561);--ez-progress-bar-font-size:var(--text--medium, 14px);--ez-progress-bar-header-color:var(--color--ocean-green-1000, #00281D);--ez-progress-bar-gap:var(--space--6, 6px);--ez-progress-bar-help-text-color:var(--color--ocean-green-1000, #00281D);--ez-progress-bar-help-text-font-size:var(--text--small, 12px);display:flex;flex-direction:column;width:100%;gap:var(--ez-progress-bar-gap)}.ez-progress-bar__header.sc-ez-progress-bar{display:flex;flex-direction:row;justify-content:space-between;color:var(--ez-progress-bar-header-color);font-size:var(--ez-progress-bar-font-size)}.progress-bar__container.sc-ez-progress-bar{width:100%;display:flex;align-items:center;justify-content:start;height:var(--ez-progress-bar-container-height);border-radius:var(--ez-progress-bar-radius);background:var(--ez-progress-bar-container-background);border:var(--ez-progress-bar-container-border);padding:var(--space--2, 2px)}.progress-bar__content.sc-ez-progress-bar{height:var(--ez-progress-bar-height);background:var(--ez-progress-bar-background);border-radius:var(--ez-progress-bar-radius)}.ez-progress-bar__help-text.sc-ez-progress-bar{color:var(--ez-progress-bar-help-text-color);font-size:var(--ez-progress-bar-help-text-font-size)}";export{a as ez_progress_bar}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as o,h as a,H as r,g as e}from"./p-
|
|
1
|
+
import{r as o,h as a,H as r,g as e}from"./p-23a36bb6.js";import{ElementIDUtils as l}from"@sankhyalabs/core";const t=class{constructor(a){o(this,a),this.label=void 0,this.color="ocean-green",this.customBackgroundColor=void 0,this.customLabelColor=void 0}componentDidLoad(){this._element&&l.addIDInfo(this._element),this._tag&&l.addIDInfo(this._tag,"EzTag",{id:"embedded"})}validateLabel(){return this.label&&""!==this.label.trim()}render(){const o=Object.assign({},this.customBackgroundColor&&{"--ez-tag--custom-background-color":`var(${this.customBackgroundColor})`},this.customLabelColor&&{"--ez-tag_label--custom-color":`var(${this.customLabelColor})`});return a(r,{style:o},a("div",{ref:o=>{this._tag=o},class:`tag ${this.color||""}`},this.validateLabel()&&a("label",{title:this.label},this.label)))}get _element(){return e(this)}};t.style=":host{--ez-tag--padding-x:var(--space--8, 8px);--ez-tag--padding-y:var(--space--4, 4px);--ez-tag--min-width:var(--space--6, 6px);--ez-tag--min-height:var(--space--14, 14px);--ez-tag--border-radius:var(--border--radius-24, 24px);--ez-tag--background-color:var(--color--ocean-green-600, #008561);--ez-tag_label--font-weight:var(--font-weight--regular, 400);--ez-tag_label--font-size:var(--font-size--default, 14px);--ez-tag_label--color:var(--color--gray-70, #FFFFFF)}.tag{background-color:var(--ez-tag--custom-background-color, var(--ez-tag--background-color));padding:var(--ez-tag--padding-y) var(--ez-tag--padding-x);border-radius:var(--ez-tag--border-radius);min-width:var(--ez-tag--min-width);min-height:var(--ez-tag--min-height);display:inline-flex;justify-content:center;align-items:center}label{font-weight:var(--ez-tag_label--font-weight);font-size:var(--ez-tag_label--font-size);color:var(--ez-tag_label--custom-color, var(--ez-tag_label--color));font-family:var(--font--pattern, Arial);line-height:var(--ez-tag_label--font-size);text-align:center;line-height:normal}.light-ocean-green{--ez-tag--background-color:var(--ez-tag--custom-background-color, var(--color--ocean-green-100));--ez-tag_label--color:var(--ez-tag_label--custom-color, var(--color--ocean-green-600))}.green{--ez-tag--background-color:var(--ez-tag--custom-background-color, var(--color--green-600));--ez-tag_label--color:var(--ez-tag_label--custom-color, var(--color--gray-70))}.light-green{--ez-tag--background-color:var(--ez-tag--custom-background-color, var(--color--green-200));--ez-tag_label--color:var(--ez-tag_label--custom-color, var(--color--green-600))}.yellow{--ez-tag--background-color:var(--ez-tag--custom-background-color, var(--color--yellow-600));--ez-tag_label--color:var(--ez-tag_label--custom-color, var(--color--yellow-900))}.light-yellow{--ez-tag--background-color:var(--ez-tag--custom-background-color, var(--color--yellow-200));--ez-tag_label--color:var(--ez-tag_label--custom-color, var(--color--yellow-800))}.red{--ez-tag--background-color:var(--ez-tag--custom-background-color, var(--color--red-600));--ez-tag_label--color:var(--ez-tag_label--custom-color, var(--color--gray-70))}.light-red{--ez-tag--background-color:var(--ez-tag--custom-background-color, var(--color--red-200));--ez-tag_label--color:var(--ez-tag_label--custom-color, var(--color--red-600))}.gray{--ez-tag--background-color:var(--ez-tag--custom-background-color, var(--color--gray-500));--ez-tag_label--color:var(--ez-tag_label--custom-color, var(--color--gray-100))}.light-gray{--ez-tag--background-color:var(--ez-tag--custom-background-color, var(--color--gray-100));--ez-tag_label--color:var(--ez-tag_label--custom-color, var(--color--gray-400))}.petroleum{--ez-tag--background-color:var(--ez-tag--custom-background-color, var(--color--petroleum-600));--ez-tag_label--color:var(--ez-tag_label--custom-color, var(--color--petroleum-200))}.light-petroleum{--ez-tag--background-color:var(--ez-tag--custom-background-color, var(--color--petroleum-100));--ez-tag_label--color:var(--ez-tag_label--custom-color, var(--color--petroleum-400))}";export{t as ez_tag}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as i,h as s,H as o,g as e}from"./p-e4c7eb39.js";import{ObjectUtils as h,ElementIDUtils as r}from"@sankhyalabs/core";import"./p-9825c1d2.js";import{C as n}from"./p-ec7db713.js";import"./p-ab574d59.js";import"./p-b853763b.js";import{i as a}from"./p-c178730b.js";import"./p-5895e687.js";import"./p-47e4a8ce.js";const l=class{constructor(s){t(this,s),this.ezChange=i(this,"ezChange",7),this.ezVisibilityChange=i(this,"ezVisibilityChange",7),this._changeDeboucingTimeout=null,this._deboucingTime=300,this._maxWidthValue=0,this._tabPressed=!1,this._lookupMode=!1,this.isOpen=!1,this._preSelection=void 0,this._visibleOptions=void 0,this._startLoading=!1,this._showLoading=!0,this._criteria=void 0,this.limitCharsToSearch=3,this.value=void 0,this.label=void 0,this.enabled=!0,this.options=void 0,this.errorMessage=void 0,this.showSelectedValue=!1,this.showOptionValue=!1,this.suppressSearch=!1,this.optionLoader=void 0,this.suppressEmptyOption=!1,this.stopPropagateEnterKeyEvent=!0,this.canShowError=!0,this.mode="regular",this.hideErrorOnFocusOut=!0,this.listOptionsPosition=void 0,this.isTextSearch=!1,this.autoFocus=!1,this.preventAutoFocus=!1,this.alternativePlaceholder=void 0,this.textEmptyOption=void 0}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)try{if("string"==typeof t)return void this.setInputValue();const s=this.getSelectedOption(t),o=this.getSelectedOption(i),e=this.getSelectedOption(this.value);this.isDifferentValues(e,s)&&(this.value=s),this.isDifferentValues(s,o)&&(this.setInputValue(),this._lookupMode||this.ezChange.emit(null===s?void 0:s)),this.resetOptions()}finally{this._lookupMode=!1}}observeOptions(t,i){h.equals(t,i)||this.loadOptions(d.PRELOAD)}async getValueAsync(){return new Promise(this._showLoading?t=>{let i=setInterval((()=>{this._showLoading||(clearInterval(i),t(this.sanitizeValue(this.value)))}),100)}:t=>t(this.sanitizeValue(this.value)))}async setFocus(t){this._textInput&&this._textInput.setFocus(t)}async setBlur(){this._textInput&&this._textInput.setBlur()}async isInvalid(){return"string"==typeof this.errorMessage&&""!==this.errorMessage.trim()}async clearValue(){this.clearSearch()}isDifferentValues(t,i){return h.objectToString(t||{})!==h.objectToString(i||{})}getFormattedText(t){if(null!=t)return this.showSelectedValue&&null!=t.value?t.label?`${t.value} - ${t.label}`:t.value:t.label}getText(){const t=this.getSelectedOption(this.sanitizeValue(this.value)),i=this.getFormattedText(t);if(null!=i)return String(i).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"')}getSelectedOption(t){return"string"==typeof t||t instanceof String?this._visibleOptions.find((i=>i.value===t)):t}updateVisibleOptions(){let t=this._source||[];if(this._criteria){const i=this._criteria.toUpperCase();t=t.filter((t=>t.label.toLocaleUpperCase().indexOf(i)>-1))}this.hasToAddEmptyoption(t)&&(t=[{value:void 0,label:this.textEmptyOption||this.i18n("ez-combo-box.placeholder")}].concat(t)),this._visibleOptions=t,this._maxWidthValue=this.getMaxWidthValue()}hasToAddEmptyoption(t){return!this.suppressEmptyOption&&!t.filter((t=>!t.value)).length}getMaxWidthValue(){var t;if(this.showOptionValue){const i=[];return null===(t=this._visibleOptions)||void 0===t||t.forEach((t=>{const s=this.getWidthValue(t.value);i.includes(s)||i.push(s)})),i.length>1?Math.max(...i):0}return 0}getWidthValue(t){if(null!=this._itemValueBasis){const i=this._itemValueBasis;if(null!=t)return i.innerHTML=t,i.clientWidth>0?i.clientWidth+2:0;i.innerHTML=""}return 0}async showOptions(){var t,i;if(!this.enabled)return;await this.openPopover();const s=null!==(i=null===(t=this.value)||void 0===t?void 0:t.value)&&void 0!==i?i:this.value,o=this._visibleOptions.findIndex((t=>t.value===s));this._preSelection=-1===o?0:o,this._resizeObserver&&this._resizeObserver.observe(this._textInput),this.preventAutoFocus||await this.setFocus()}hideOptions(){var t;null===(t=this._popover)||void 0===t||t.hide(),this._resizeObserver&&this._resizeObserver.unobserve(this._textInput)}updateSource(t){this._startLoading=!1,t instanceof Promise?(this._showLoading=!0,t.then((t=>{this._showLoading=!1,this.updateSource(t)})).catch((()=>this._showLoading=!1)),this.updateVisibleOptions()):(this._showLoading=!1,Array.isArray(t)?(this._source=t,this.updateVisibleOptions(),this._tabPressed&&(this._tabPressed=!1)):this.selectOption(t))}selectOption(t,i=!0){var s,o,e;const h=this.getSelectedOption(this.value);(null===(s=null==h?void 0:h.value)||void 0===s?void 0:s.toString())!==(null===(o=null==t?void 0:t.value)||void 0===o?void 0:o.toString())||null==h&&null!=t&&"value"in t?(this.value=(null==t?void 0:t.value)?t:void 0,null===(e=this._popover)||void 0===e||e.hide()):this.resetOptions(),i&&setTimeout((()=>{this.setFocus()}),0)}loadOptions(t,i=""){this._criteria=i,this._startLoading=!0,this.updateSource(this.optionLoader?this.optionLoader({mode:t,argument:i}):this.options)}cancelPreselection(){!this._textInput.value&&this.sanitizeValue(this.value)?this.selectOption(void 0):window.setTimeout((()=>{this.setInputValue(!1)}),this._deboucingTime)}setInputValue(t=!0){const i=this.getText();(this._textInput.value||"")!==i&&(this._textInput.value=i,t&&(this.errorMessage=null))}clearSearch(){this.value=null}resetOptions(){this.hideOptions(),this._criteria=void 0,this._preSelection=void 0,this.updateVisibleOptions()}sanitizeValue(t){if("undefined"!==t&&"null"!==t)return t}async componentWillLoad(){if(this.i18n=await a(),void 0===this.options){this.options=[];const t=this.el.querySelectorAll("option");t&&t.forEach((t=>{let i=t.innerText,s=t.getAttribute("value");s||(s=i),this.options.push({label:i,value:s}),t.hidden=!0}))}this.loadOptions(d.PRELOAD)}setResizeObserver(){this._resizeObserver=new ResizeObserver((t=>{window.requestAnimationFrame((()=>{Array.isArray(t)&&t.length&&this._textInput&&this._comboBoxList&&(this._comboBoxList.width=this._textInput.clientWidth)}))}))}connectedCallback(){this._resizeObserver||this.setResizeObserver()}componentDidLoad(){n.applyVarsTextInput(this.el,this._textInput),this.setInputValue(!1),this.setResizeObserver(),this.autoFocus&&requestAnimationFrame((()=>{this.setFocus({selectText:!0})}))}disconnectedCallback(){var t;null===(t=this._popover)||void 0===t||t.remove(),this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=null)}handlerIconClick(){this.showOptions()}onTextInputChangeHandler(t){var i;if(this.clearDeboucingTimeout(),this._startLoading)return void(this._changeDeboucingTimeout=window.setTimeout((()=>{this.onTextInputChangeHandler(t)}),this._deboucingTime));const s=null===(i=t.target.value)||void 0===i?void 0:i.trim();this._criteria||(this._textInput.value=t.data||s),this._criteria=s,s?(this.updateVisibleOptions(),this.showOptions()):(this._preSelection=void 0,this.updateVisibleOptions())}clearDeboucingTimeout(){this._changeDeboucingTimeout&&(window.clearTimeout(this._changeDeboucingTimeout),this._changeDeboucingTimeout=null)}onTextInputClickHandler(){this.showOptions()}keyDownHandler(t){var i,s,o,e,h,r;if(t.ctrlKey&&("f"===t.key||"F"===t.key))return this.loadOptions(d.ADVANCED),t.preventDefault(),void t.stopPropagation();switch(t.key){case"ArrowDown":t.preventDefault(),this.canShowListOptions()&&(this.showOptions(),null===(i=this._comboBoxList)||void 0===i||i.nextOption());break;case"ArrowUp":t.preventDefault(),this.canShowListOptions()&&(this.showOptions(),null===(s=this._comboBoxList)||void 0===s||s.previousOption());break;case"Enter":this.isOpen&&(t.preventDefault(),null===(o=this._comboBoxList)||void 0===o||o.selectCurrentOption());break;case"Escape":this.isOpen&&(t.preventDefault(),null===(e=this._popover)||void 0===e||e.hide());break;case"Tab":this._tabPressed=!0,this.isOpen&&(null===(h=this._comboBoxList)||void 0===h||h.selectCurrentOption(),null===(r=this._popover)||void 0===r||r.hide())}}onTextInputFocusOutHandler(){this.hideErrorOnFocusOut&&this.cancelPreselection()}canShowListOptions(){return!this._showLoading&&this._visibleOptions.length>0}async openPopover(){var t;this.isOpen=!0,await(null===(t=this._popover)||void 0===t?void 0:t.showUnder(this._textInput))}render(){var t;return r.addIDInfoIfNotExists(this.el,"input"),s(o,null,s("ez-text-input",{"data-element-id":r.getInternalIDInfo("textInput"),class:"text-input-slot-container "+(this.suppressSearch?"suppressed-search-input":""),ref:t=>this._textInput=t,"data-slave-mode":"true",enabled:this.enabled&&!this.suppressSearch,onInput:t=>this.onTextInputChangeHandler(t),onClick:()=>this.onTextInputClickHandler(),onFocusout:()=>this.onTextInputFocusOutHandler(),onKeyDown:t=>this.keyDownHandler(t),label:this.label,canShowError:this.canShowError,errorMessage:this.errorMessage,mode:this.mode,alternativePlaceholder:this.alternativePlaceholder||this.i18n("ez-combo-box.placeholder")},s("button",{class:"btn",slot:"rightIcon",disabled:!this.enabled,tabindex:-1,onClick:()=>this.handlerIconClick()},s("ez-icon",{iconName:"chevron-down"}))),s("ez-popover-plus",{ref:t=>this._popover=t,anchorElement:this._textInput,autoClose:!0,boxWidth:"fit-content",overlayType:"none",onEzVisibilityChange:t=>this.isOpen=t.detail,"data-element-id":this.el.getAttribute("data-element-id")},s("ez-combo-box-list",{ref:t=>this._comboBoxList=t,showLoading:this._showLoading,visibleOptions:this._visibleOptions,textEmptyList:this.i18n("ez-combo-box.noResults"),showOptionValue:this.showOptionValue,preSelection:this._preSelection,maxWidth:this._maxWidthValue,width:null===(t=this._textInput)||void 0===t?void 0:t.clientWidth,onOptionSelect:t=>this.selectOption(t),onOptionHover:t=>this._preSelection=t})))}get el(){return e(this)}static get watchers(){return{errorMessage:["observeErrorMessage"],value:["observeValue"],options:["observeOptions"]}}};var d;!function(t){t.ADVANCED="ADVANCED",t.PRELOAD="PRELOAD",t.PREDICTIVE="PREDICTIVE"}(d||(d={})),l.style=":host{--ez-combo-box--height:42px;--ez-combo-box--width:100%;--ez-combo-box--border-radius:var(--border--radius-medium, 12px);--ez-combo-box--font-size:var(--text--medium, 14px);--ez-combo-box--font-family:var(--font-pattern, Arial);--ez-combo-box--background-color--xlight:var(--background--xlight, #fff);--ez-combo-box__input--background-color:var(--background--medium, #e0e0e0);--ez-combo-box__input--border:var(--border--medium, 2px solid);--ez-combo-box__input--border-color:var(--ez-combo-box__input--background-color);--ez-combo-box__input--focus--border-color:var(--color--primary, #008561);--ez-combo-box__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--ez-combo-box__input--disabled--color:var(--text--disable, #AFB6C0);--ez-combo-box__btn--color:var(--title--primary, #2B3A54);--ez-combo-box__btn-disabled--color:var(--text--disable, #AFB6C0);--ez-combo-box__btn-hover--color:var(--color--primary, #4e4e4e);width:var(--ez-combo-box--width)}ez-icon{--ez-icon--color:inherit;font-weight:var(--text-weight--large, 600)}.suppressed-search-input{--ez-text-input__input--border-color:var(--color--strokes, #dce0e8);--ez-text-input__input--disabled--background-color:var(--background--xlight, #fff);--ez-text-input__input--disabled--color:var(--title--primary, #2B3A54)}.btn{outline:none;border:none;background:none;cursor:pointer;padding:0px;color:var(--ez-combo-box__btn--color)}.btn:disabled{cursor:unset;color:var(--ez-combo-box__btn-disabled--color)}.btn:disabled:hover{cursor:not-allowed;color:var(--ez-combo-box__btn-disabled--color)}.btn:hover{color:var(--ez-combo-box__btn-hover--color)}.btn__close{visibility:hidden}ez-text-input:hover .btn__close,ez-text-input:focus .btn__close{visibility:visible}.text-input-slot-container{--ez-text-input__icon--width:32px;--ez-text-input__min-width:var(--ez-combo-box__min-width);--ez-text-input__max-width:var(--ez-combo-box__max-width)}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}";export{l as ez_combo_box}
|
|
1
|
+
import{r as t,c as i,h as s,H as o,g as e}from"./p-23a36bb6.js";import{ObjectUtils as h,ElementIDUtils as r}from"@sankhyalabs/core";import"./p-9825c1d2.js";import{C as n}from"./p-ec7db713.js";import"./p-ab574d59.js";import"./p-b853763b.js";import{i as a}from"./p-c178730b.js";import"./p-5895e687.js";import"./p-47e4a8ce.js";const l=class{constructor(s){t(this,s),this.ezChange=i(this,"ezChange",7),this.ezVisibilityChange=i(this,"ezVisibilityChange",7),this._changeDeboucingTimeout=null,this._deboucingTime=300,this._maxWidthValue=0,this._tabPressed=!1,this._lookupMode=!1,this.isOpen=!1,this._preSelection=void 0,this._visibleOptions=void 0,this._startLoading=!1,this._showLoading=!0,this._criteria=void 0,this.limitCharsToSearch=3,this.value=void 0,this.label=void 0,this.enabled=!0,this.options=void 0,this.errorMessage=void 0,this.showSelectedValue=!1,this.showOptionValue=!1,this.suppressSearch=!1,this.optionLoader=void 0,this.suppressEmptyOption=!1,this.stopPropagateEnterKeyEvent=!0,this.canShowError=!0,this.mode="regular",this.hideErrorOnFocusOut=!0,this.listOptionsPosition=void 0,this.isTextSearch=!1,this.autoFocus=!1,this.preventAutoFocus=!1,this.alternativePlaceholder=void 0,this.textEmptyOption=void 0}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)try{if("string"==typeof t)return void this.setInputValue();const s=this.getSelectedOption(t),o=this.getSelectedOption(i),e=this.getSelectedOption(this.value);this.isDifferentValues(e,s)&&(this.value=s),this.isDifferentValues(s,o)&&(this.setInputValue(),this._lookupMode||this.ezChange.emit(null===s?void 0:s)),this.resetOptions()}finally{this._lookupMode=!1}}observeOptions(t,i){h.equals(t,i)||this.loadOptions(d.PRELOAD)}async getValueAsync(){return new Promise(this._showLoading?t=>{let i=setInterval((()=>{this._showLoading||(clearInterval(i),t(this.sanitizeValue(this.value)))}),100)}:t=>t(this.sanitizeValue(this.value)))}async setFocus(t){this._textInput&&this._textInput.setFocus(t)}async setBlur(){this._textInput&&this._textInput.setBlur()}async isInvalid(){return"string"==typeof this.errorMessage&&""!==this.errorMessage.trim()}async clearValue(){this.clearSearch()}isDifferentValues(t,i){return h.objectToString(t||{})!==h.objectToString(i||{})}getFormattedText(t){if(null!=t)return this.showSelectedValue&&null!=t.value?t.label?`${t.value} - ${t.label}`:t.value:t.label}getText(){const t=this.getSelectedOption(this.sanitizeValue(this.value)),i=this.getFormattedText(t);if(null!=i)return String(i).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"')}getSelectedOption(t){return"string"==typeof t||t instanceof String?this._visibleOptions.find((i=>i.value===t)):t}updateVisibleOptions(){let t=this._source||[];if(this._criteria){const i=this._criteria.toUpperCase();t=t.filter((t=>t.label.toLocaleUpperCase().indexOf(i)>-1))}this.hasToAddEmptyoption(t)&&(t=[{value:void 0,label:this.textEmptyOption||this.i18n("ez-combo-box.placeholder")}].concat(t)),this._visibleOptions=t,this._maxWidthValue=this.getMaxWidthValue()}hasToAddEmptyoption(t){return!this.suppressEmptyOption&&!t.filter((t=>!t.value)).length}getMaxWidthValue(){var t;if(this.showOptionValue){const i=[];return null===(t=this._visibleOptions)||void 0===t||t.forEach((t=>{const s=this.getWidthValue(t.value);i.includes(s)||i.push(s)})),i.length>1?Math.max(...i):0}return 0}getWidthValue(t){if(null!=this._itemValueBasis){const i=this._itemValueBasis;if(null!=t)return i.innerHTML=t,i.clientWidth>0?i.clientWidth+2:0;i.innerHTML=""}return 0}async showOptions(){var t,i;if(!this.enabled)return;await this.openPopover();const s=null!==(i=null===(t=this.value)||void 0===t?void 0:t.value)&&void 0!==i?i:this.value,o=this._visibleOptions.findIndex((t=>t.value===s));this._preSelection=-1===o?0:o,this._resizeObserver&&this._resizeObserver.observe(this._textInput),this.preventAutoFocus||await this.setFocus()}hideOptions(){var t;null===(t=this._popover)||void 0===t||t.hide(),this._resizeObserver&&this._resizeObserver.unobserve(this._textInput)}updateSource(t){this._startLoading=!1,t instanceof Promise?(this._showLoading=!0,t.then((t=>{this._showLoading=!1,this.updateSource(t)})).catch((()=>this._showLoading=!1)),this.updateVisibleOptions()):(this._showLoading=!1,Array.isArray(t)?(this._source=t,this.updateVisibleOptions(),this._tabPressed&&(this._tabPressed=!1)):this.selectOption(t))}selectOption(t,i=!0){var s,o,e;const h=this.getSelectedOption(this.value);(null===(s=null==h?void 0:h.value)||void 0===s?void 0:s.toString())!==(null===(o=null==t?void 0:t.value)||void 0===o?void 0:o.toString())||null==h&&null!=t&&"value"in t?(this.value=(null==t?void 0:t.value)?t:void 0,null===(e=this._popover)||void 0===e||e.hide()):this.resetOptions(),i&&setTimeout((()=>{this.setFocus()}),0)}loadOptions(t,i=""){this._criteria=i,this._startLoading=!0,this.updateSource(this.optionLoader?this.optionLoader({mode:t,argument:i}):this.options)}cancelPreselection(){!this._textInput.value&&this.sanitizeValue(this.value)?this.selectOption(void 0):window.setTimeout((()=>{this.setInputValue(!1)}),this._deboucingTime)}setInputValue(t=!0){const i=this.getText();(this._textInput.value||"")!==i&&(this._textInput.value=i,t&&(this.errorMessage=null))}clearSearch(){this.value=null}resetOptions(){this.hideOptions(),this._criteria=void 0,this._preSelection=void 0,this.updateVisibleOptions()}sanitizeValue(t){if("undefined"!==t&&"null"!==t)return t}async componentWillLoad(){if(this.i18n=await a(),void 0===this.options){this.options=[];const t=this.el.querySelectorAll("option");t&&t.forEach((t=>{let i=t.innerText,s=t.getAttribute("value");s||(s=i),this.options.push({label:i,value:s}),t.hidden=!0}))}this.loadOptions(d.PRELOAD)}setResizeObserver(){this._resizeObserver=new ResizeObserver((t=>{window.requestAnimationFrame((()=>{Array.isArray(t)&&t.length&&this._textInput&&this._comboBoxList&&(this._comboBoxList.width=this._textInput.clientWidth)}))}))}connectedCallback(){this._resizeObserver||this.setResizeObserver()}componentDidLoad(){n.applyVarsTextInput(this.el,this._textInput),this.setInputValue(!1),this.setResizeObserver(),this.autoFocus&&requestAnimationFrame((()=>{this.setFocus({selectText:!0})}))}disconnectedCallback(){var t;null===(t=this._popover)||void 0===t||t.remove(),this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=null)}handlerIconClick(){this.showOptions()}onTextInputChangeHandler(t){var i;if(this.clearDeboucingTimeout(),this._startLoading)return void(this._changeDeboucingTimeout=window.setTimeout((()=>{this.onTextInputChangeHandler(t)}),this._deboucingTime));const s=null===(i=t.target.value)||void 0===i?void 0:i.trim();this._criteria||(this._textInput.value=t.data||s),this._criteria=s,s?(this.updateVisibleOptions(),this.showOptions()):(this._preSelection=void 0,this.updateVisibleOptions())}clearDeboucingTimeout(){this._changeDeboucingTimeout&&(window.clearTimeout(this._changeDeboucingTimeout),this._changeDeboucingTimeout=null)}onTextInputClickHandler(){this.showOptions()}keyDownHandler(t){var i,s,o,e,h,r;if(t.ctrlKey&&("f"===t.key||"F"===t.key))return this.loadOptions(d.ADVANCED),t.preventDefault(),void t.stopPropagation();switch(t.key){case"ArrowDown":t.preventDefault(),this.canShowListOptions()&&(this.showOptions(),null===(i=this._comboBoxList)||void 0===i||i.nextOption());break;case"ArrowUp":t.preventDefault(),this.canShowListOptions()&&(this.showOptions(),null===(s=this._comboBoxList)||void 0===s||s.previousOption());break;case"Enter":this.isOpen&&(t.preventDefault(),null===(o=this._comboBoxList)||void 0===o||o.selectCurrentOption());break;case"Escape":this.isOpen&&(t.preventDefault(),null===(e=this._popover)||void 0===e||e.hide());break;case"Tab":this._tabPressed=!0,this.isOpen&&(null===(h=this._comboBoxList)||void 0===h||h.selectCurrentOption(),null===(r=this._popover)||void 0===r||r.hide())}}onTextInputFocusOutHandler(){this.hideErrorOnFocusOut&&this.cancelPreselection()}canShowListOptions(){return!this._showLoading&&this._visibleOptions.length>0}async openPopover(){var t;this.isOpen=!0,await(null===(t=this._popover)||void 0===t?void 0:t.showUnder(this._textInput))}render(){var t;return r.addIDInfoIfNotExists(this.el,"input"),s(o,null,s("ez-text-input",{"data-element-id":r.getInternalIDInfo("textInput"),class:"text-input-slot-container "+(this.suppressSearch?"suppressed-search-input":""),ref:t=>this._textInput=t,"data-slave-mode":"true",enabled:this.enabled&&!this.suppressSearch,onInput:t=>this.onTextInputChangeHandler(t),onClick:()=>this.onTextInputClickHandler(),onFocusout:()=>this.onTextInputFocusOutHandler(),onKeyDown:t=>this.keyDownHandler(t),label:this.label,canShowError:this.canShowError,errorMessage:this.errorMessage,mode:this.mode,alternativePlaceholder:this.alternativePlaceholder||this.i18n("ez-combo-box.placeholder")},s("button",{class:"btn",slot:"rightIcon",disabled:!this.enabled,tabindex:-1,onClick:()=>this.handlerIconClick()},s("ez-icon",{iconName:"chevron-down"}))),s("ez-popover-plus",{ref:t=>this._popover=t,anchorElement:this._textInput,autoClose:!0,boxWidth:"fit-content",overlayType:"none",onEzVisibilityChange:t=>this.isOpen=t.detail,"data-element-id":this.el.getAttribute("data-element-id")},s("ez-combo-box-list",{ref:t=>this._comboBoxList=t,showLoading:this._showLoading,visibleOptions:this._visibleOptions,textEmptyList:this.i18n("ez-combo-box.noResults"),showOptionValue:this.showOptionValue,preSelection:this._preSelection,maxWidth:this._maxWidthValue,width:null===(t=this._textInput)||void 0===t?void 0:t.clientWidth,onOptionSelect:t=>this.selectOption(t),onOptionHover:t=>this._preSelection=t})))}get el(){return e(this)}static get watchers(){return{errorMessage:["observeErrorMessage"],value:["observeValue"],options:["observeOptions"]}}};var d;!function(t){t.ADVANCED="ADVANCED",t.PRELOAD="PRELOAD",t.PREDICTIVE="PREDICTIVE"}(d||(d={})),l.style=":host{--ez-combo-box--height:42px;--ez-combo-box--width:100%;--ez-combo-box--border-radius:var(--border--radius-medium, 12px);--ez-combo-box--font-size:var(--text--medium, 14px);--ez-combo-box--font-family:var(--font-pattern, Arial);--ez-combo-box--background-color--xlight:var(--background--xlight, #fff);--ez-combo-box__input--background-color:var(--background--medium, #e0e0e0);--ez-combo-box__input--border:var(--border--medium, 2px solid);--ez-combo-box__input--border-color:var(--ez-combo-box__input--background-color);--ez-combo-box__input--focus--border-color:var(--color--primary, #008561);--ez-combo-box__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--ez-combo-box__input--disabled--color:var(--text--disable, #AFB6C0);--ez-combo-box__btn--color:var(--title--primary, #2B3A54);--ez-combo-box__btn-disabled--color:var(--text--disable, #AFB6C0);--ez-combo-box__btn-hover--color:var(--color--primary, #4e4e4e);width:var(--ez-combo-box--width)}ez-icon{--ez-icon--color:inherit;font-weight:var(--text-weight--large, 600)}.suppressed-search-input{--ez-text-input__input--border-color:var(--color--strokes, #dce0e8);--ez-text-input__input--disabled--background-color:var(--background--xlight, #fff);--ez-text-input__input--disabled--color:var(--title--primary, #2B3A54)}.btn{outline:none;border:none;background:none;cursor:pointer;padding:0px;color:var(--ez-combo-box__btn--color)}.btn:disabled{cursor:unset;color:var(--ez-combo-box__btn-disabled--color)}.btn:disabled:hover{cursor:not-allowed;color:var(--ez-combo-box__btn-disabled--color)}.btn:hover{color:var(--ez-combo-box__btn-hover--color)}.btn__close{visibility:hidden}ez-text-input:hover .btn__close,ez-text-input:focus .btn__close{visibility:visible}.text-input-slot-container{--ez-text-input__icon--width:32px;--ez-text-input__min-width:var(--ez-combo-box__min-width);--ez-text-input__max-width:var(--ez-combo-box__max-width)}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}";export{l as ez_combo_box}
|