@sapudex/web-components 2.7.0 → 2.7.2

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.
Files changed (83) hide show
  1. package/cypress/specs/ListItem.cy.tsx +4 -4
  2. package/cypress/specs/SelectBox.cy.tsx +1 -1
  3. package/dist/ListItem.d.ts +2 -0
  4. package/dist/ListItem.js +6 -0
  5. package/dist/ListItem.js.map +1 -1
  6. package/dist/MastheadMobileMenu.js +2 -0
  7. package/dist/MastheadMobileMenu.js.map +1 -1
  8. package/dist/MastheadShell.js +4 -2
  9. package/dist/MastheadShell.js.map +1 -1
  10. package/dist/assets/{InputSuggestions-09hxh-NH.js → InputSuggestions-D0OZo5eY.js} +1 -1
  11. package/dist/assets/{ListItemStandardExpandableTextTemplate-3ixkeBt3.js → ListItemStandardExpandableTextTemplate-BOc_KoW1.js} +1 -1
  12. package/dist/assets/{bundle.esm-e2aCupGE.js → bundle.esm-BLn1Dq6A.js} +241 -241
  13. package/dist/css/themes/CountrySelector.css +1 -1
  14. package/dist/css/themes/RatingIndicator.css +1 -1
  15. package/dist/css/themes/Search.css +1 -1
  16. package/dist/css/themes/SearchSuggestions.css +1 -1
  17. package/dist/css/themes/Slider.css +1 -1
  18. package/dist/css/themes/TextField.css +1 -1
  19. package/dist/generated/templates/ListGroupHeaderTemplate.lit.js +1 -1
  20. package/dist/generated/templates/ListGroupHeaderTemplate.lit.js.map +1 -1
  21. package/dist/generated/templates/ListItemTemplate.lit.js +4 -4
  22. package/dist/generated/templates/ListItemTemplate.lit.js.map +1 -1
  23. package/dist/generated/templates/ListSelectAllTemplate.lit.js +1 -1
  24. package/dist/generated/templates/ListSelectAllTemplate.lit.js.map +1 -1
  25. package/dist/generated/templates/ListTemplate.lit.js +2 -2
  26. package/dist/generated/templates/ListTemplate.lit.js.map +1 -1
  27. package/dist/generated/templates/MastheadMenuTemplate.lit.js +7 -5
  28. package/dist/generated/templates/MastheadMenuTemplate.lit.js.map +1 -1
  29. package/dist/generated/templates/MastheadMobileMenuTemplate.lit.js +14 -10
  30. package/dist/generated/templates/MastheadMobileMenuTemplate.lit.js.map +1 -1
  31. package/dist/generated/templates/SearchableListBaseTemplate.lit.js +2 -2
  32. package/dist/generated/templates/SearchableListBaseTemplate.lit.js.map +1 -1
  33. package/dist/generated/themes/CountrySelector.css.d.ts +1 -1
  34. package/dist/generated/themes/CountrySelector.css.js +1 -1
  35. package/dist/generated/themes/CountrySelector.css.js.map +1 -1
  36. package/dist/generated/themes/RatingIndicator.css.d.ts +1 -1
  37. package/dist/generated/themes/RatingIndicator.css.js +1 -1
  38. package/dist/generated/themes/RatingIndicator.css.js.map +1 -1
  39. package/dist/generated/themes/Search.css.d.ts +1 -1
  40. package/dist/generated/themes/Search.css.js +1 -1
  41. package/dist/generated/themes/Search.css.js.map +1 -1
  42. package/dist/generated/themes/SearchSuggestions.css.d.ts +1 -1
  43. package/dist/generated/themes/SearchSuggestions.css.js +1 -1
  44. package/dist/generated/themes/SearchSuggestions.css.js.map +1 -1
  45. package/dist/generated/themes/Slider.css.d.ts +1 -1
  46. package/dist/generated/themes/Slider.css.js +1 -1
  47. package/dist/generated/themes/Slider.css.js.map +1 -1
  48. package/dist/generated/themes/TextField.css.d.ts +1 -1
  49. package/dist/generated/themes/TextField.css.js +1 -1
  50. package/dist/generated/themes/TextField.css.js.map +1 -1
  51. package/dist/utils/getEffectiveScrollbarStyle.d.ts +0 -2
  52. package/dist/utils/getEffectiveScrollbarStyle.js +2 -11
  53. package/dist/utils/getEffectiveScrollbarStyle.js.map +1 -1
  54. package/dist/web-types.json +1 -1
  55. package/package.json +1 -1
  56. package/src/List.hbs +4 -4
  57. package/src/ListGroupHeader.hbs +7 -5
  58. package/src/ListItem.hbs +11 -10
  59. package/src/ListItem.ts +8 -0
  60. package/src/ListSelectAll.hbs +12 -10
  61. package/src/MastheadMenu.hbs +26 -13
  62. package/src/MastheadMobileMenu.hbs +47 -20
  63. package/src/MastheadMobileMenu.ts +2 -0
  64. package/src/MastheadShell.ts +4 -2
  65. package/src/SearchableListBase.hbs +4 -2
  66. package/src/generated/templates/ListGroupHeaderTemplate.lit.ts +1 -1
  67. package/src/generated/templates/ListItemTemplate.lit.ts +4 -4
  68. package/src/generated/templates/ListSelectAllTemplate.lit.ts +1 -1
  69. package/src/generated/templates/ListTemplate.lit.ts +2 -2
  70. package/src/generated/templates/MastheadMenuTemplate.lit.ts +7 -5
  71. package/src/generated/templates/MastheadMobileMenuTemplate.lit.ts +14 -10
  72. package/src/generated/templates/SearchableListBaseTemplate.lit.ts +2 -2
  73. package/src/generated/themes/CountrySelector.css.ts +1 -1
  74. package/src/generated/themes/RatingIndicator.css.ts +1 -1
  75. package/src/generated/themes/Search.css.ts +1 -1
  76. package/src/generated/themes/SearchSuggestions.css.ts +1 -1
  77. package/src/generated/themes/Slider.css.ts +1 -1
  78. package/src/generated/themes/TextField.css.ts +1 -1
  79. package/src/themes/CountrySelector.css +0 -2
  80. package/src/themes/Search.css +3 -2
  81. package/src/themes/SearchSuggestions.css +3 -0
  82. package/src/themes/TextField.css +1 -0
  83. package/src/utils/getEffectiveScrollbarStyle.ts +2 -14
@@ -1,2 +1,2 @@
1
- import{r as w,j as l,a as c,p as x,d as P,b as R,s as p,m as v,u as S,v as y,w as O,x as L,D,c as A,z as G,F as H,B as I,I as b,A as f,R as E,C as V,G as $,H as N,J as B,K as F}from"./bundle.esm-e2aCupGE.js";const z=n=>n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");function _(n,e,t,s){return n.replaceAll(new RegExp(z(e),`${s?"i":""}g`),t)}function M(n,e){if(!n||!e)return n;const t=r=>{const[a,d]=r.split("");for(;n.indexOf(r)>=0||e.indexOf(r)>=0;)r=`${a}${r}${d}`;return r},s=t("12"),i=t("34");let o=w(_(n,e,r=>`${s}${r}${i}`,!0));return[[s,"<b>"],[i,"</b>"]].forEach(([r,a])=>{o=_(o,r,a,!1)}),o}function q(n,e){const t=(n==null?void 0:n.listItemContent)||U;return l("li",{part:"native-li","data-sap-focus-ref":!0,tabindex:this._effectiveTabIndex,class:this.classes.main,draggable:this.movable,role:e==null?void 0:e.role,title:e==null?void 0:e.title,onFocusIn:this._onfocusin,onKeyUp:this._onkeyup,onKeyDown:this._onkeydown,onClick:this._onclick,children:t.call(this)})}function U(){return l("div",{part:"content",id:`${this._id}-content`,class:"ui5-li-content",children:l("div",{class:"ui5-li-text-wrapper",children:l("span",{part:"title",class:"ui5-li-title",children:l("slot",{})})})})}function K(){return[q.call(this,{listItemContent:W},{role:"option"})]}function W(){return l("div",{part:"content",id:"content",class:"ui5-li-content",children:c("div",{class:"ui5-li-text-wrapper",children:[l("span",{part:"title",className:"ui5-li-title",dangerouslySetInnerHTML:{__html:this.markupText}}),this.additionalText&&l("span",{part:"additional-text",class:"ui5-li-additional-text",children:this.additionalText})]})})}x("@ui5/webcomponents-theming","sap_horizon",async()=>P);x("@ui5/webcomponents","sap_horizon",async()=>R);const J=`:host([ui5-suggestion-item]){height:auto;min-height:var(--_ui5-v2-14-0_list_item_base_height)}:host([ui5-suggestion-item]) .ui5-li-root{min-height:var(--_ui5-v2-14-0_list_item_base_height)}:host([ui5-suggestion-item]) .ui5-li-content{padding-bottom:.5rem;padding-top:.5rem;box-sizing:border-box}
1
+ import{r as w,j as l,a as c,p as x,d as P,b as R,s as p,m as v,u as S,v as y,w as O,x as L,D,c as A,z as G,F as H,B as I,I as b,A as f,R as E,C as V,G as $,H as N,J as B,K as F}from"./bundle.esm-BLn1Dq6A.js";const z=n=>n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");function _(n,e,t,s){return n.replaceAll(new RegExp(z(e),`${s?"i":""}g`),t)}function M(n,e){if(!n||!e)return n;const t=r=>{const[a,d]=r.split("");for(;n.indexOf(r)>=0||e.indexOf(r)>=0;)r=`${a}${r}${d}`;return r},s=t("12"),i=t("34");let o=w(_(n,e,r=>`${s}${r}${i}`,!0));return[[s,"<b>"],[i,"</b>"]].forEach(([r,a])=>{o=_(o,r,a,!1)}),o}function q(n,e){const t=(n==null?void 0:n.listItemContent)||U;return l("li",{part:"native-li","data-sap-focus-ref":!0,tabindex:this._effectiveTabIndex,class:this.classes.main,draggable:this.movable,role:e==null?void 0:e.role,title:e==null?void 0:e.title,onFocusIn:this._onfocusin,onKeyUp:this._onkeyup,onKeyDown:this._onkeydown,onClick:this._onclick,children:t.call(this)})}function U(){return l("div",{part:"content",id:`${this._id}-content`,class:"ui5-li-content",children:l("div",{class:"ui5-li-text-wrapper",children:l("span",{part:"title",class:"ui5-li-title",children:l("slot",{})})})})}function K(){return[q.call(this,{listItemContent:W},{role:"option"})]}function W(){return l("div",{part:"content",id:"content",class:"ui5-li-content",children:c("div",{class:"ui5-li-text-wrapper",children:[l("span",{part:"title",className:"ui5-li-title",dangerouslySetInnerHTML:{__html:this.markupText}}),this.additionalText&&l("span",{part:"additional-text",class:"ui5-li-additional-text",children:this.additionalText})]})})}x("@ui5/webcomponents-theming","sap_horizon",async()=>P);x("@ui5/webcomponents","sap_horizon",async()=>R);const J=`:host([ui5-suggestion-item]){height:auto;min-height:var(--_ui5-v2-14-0_list_item_base_height)}:host([ui5-suggestion-item]) .ui5-li-root{min-height:var(--_ui5-v2-14-0_list_item_base_height)}:host([ui5-suggestion-item]) .ui5-li-content{padding-bottom:.5rem;padding-top:.5rem;box-sizing:border-box}
2
2
  `;var g=function(n,e,t,s){var i=arguments.length,o=i<3?e:s===null?s=Object.getOwnPropertyDescriptor(e,t):s,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,s);else for(var a=n.length-1;a>=0;a--)(r=n[a])&&(o=(i<3?r(o):i>3?r(e,t,o):r(e,t))||o);return i>3&&o&&Object.defineProperty(e,t,o),o};let h=class extends S{constructor(){super(...arguments),this.markupText=""}onEnterDOM(){y()&&this.setAttribute("desktop","")}get _effectiveTabIndex(){return-1}};g([p()],h.prototype,"text",void 0);g([p()],h.prototype,"additionalText",void 0);g([p()],h.prototype,"markupText",void 0);h=g([v({tag:"ui5-suggestion-item",template:K,styles:[S.styles,J]})],h);h.define();function X(n){const e=(n==null?void 0:n.items)||j;return c("ul",{role:"group",class:"ui5-group-li-root",onDragEnter:this._ondragenter,onDragOver:this._ondragover,onDrop:this._ondrop,onDragLeave:this._ondragleave,children:[this.hasHeader&&l(L,{focused:this.focused,part:"header",accessibleRole:O.Group,children:this.hasFormattedHeader?l("slot",{name:"header"}):this.headerText}),e.call(this),l(D,{orientation:"Horizontal",ownerReference:this})]})}function j(){return l("slot",{})}var T=function(n,e,t,s){var i=arguments.length,o=i<3?e:s===null?s=Object.getOwnPropertyDescriptor(e,t):s,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,s);else for(var a=n.length-1;a>=0;a--)(r=n[a])&&(o=(i<3?r(o):i>3?r(e,t,o):r(e,t))||o);return i>3&&o&&Object.defineProperty(e,t,o),o};let m=class extends G{};T([A({default:!0,invalidateOnChildChange:!0,type:HTMLElement})],m.prototype,"items",void 0);m=T([v({tag:"ui5-suggestion-item-group",template:X})],m);m.define();function Q(n){const e=(n==null?void 0:n.suggestionsList)||Y,t=n==null?void 0:n.valueStateMessage,s=n==null?void 0:n.valueStateMessageInputIcon;return c(E,{class:this.classes.popover,hideArrow:!0,preventFocusRestore:!0,preventInitialFocus:!0,placement:"Bottom",horizontalAlign:"Start",tabindex:-1,style:this.styles.suggestionsPopover,onOpen:this._afterOpenPicker,onClose:this._afterClosePicker,onScroll:this._scroll,open:this.open,opener:this,accessibleName:this._popupLabel,children:[this._isPhone&&c(H,{children:[c("div",{slot:"header",class:"ui5-responsive-popover-header",children:[c("div",{class:"row",children:[l("span",{children:this._headerTitleText}),l(I,{class:"ui5-responsive-popover-close-btn",icon:N,design:"Transparent",onClick:this._closePicker})]}),l("div",{class:"row",children:l("div",{class:"input-root-phone native-input-wrapper",children:l(b,{class:"ui5-input-inner-phone",type:this.inputType,value:this.value,showClearIcon:this.showClearIcon,placeholder:this.placeholder,onInput:this._handleInput,onChange:this._handleChange})})})]}),this.hasValueStateMessage&&c("div",{class:this.classes.popoverValueState,style:this.styles.suggestionPopoverHeader,children:[l(f,{class:"ui5-input-value-state-message-icon",name:s==null?void 0:s.call(this)}),this.open&&(t==null?void 0:t.call(this))]})]}),!this._isPhone&&this.hasValueStateMessage&&c("div",{slot:"header",class:{"ui5-responsive-popover-header":!0,...this.classes.popoverValueState},style:this.styles.suggestionPopoverHeader,children:[l(f,{class:"ui5-input-value-state-message-icon",name:s==null?void 0:s.call(this)}),this.open&&(t==null?void 0:t.call(this))]}),e.call(this),this._isPhone&&l("div",{slot:"footer",class:"ui5-responsive-popover-footer",children:l(I,{design:"Transparent",onClick:this._closePicker,children:this._suggestionsOkButtonText})})]})}function Y(){return l($,{accessibleRole:V.ListBox,separators:this.suggestionSeparators,selectionMode:"Single",onMouseDown:this.onItemMouseDown,onItemClick:this._handleSuggestionItemPress,onSelectionChange:this._handleSelectionChange,children:l("slot",{})})}class u{get template(){return Q}constructor(e,t,s,i){this.component=e,this.slotName=t,this.handleFocus=i,this.highlight=s,this.selectedItemIndex=-1}onUp(e,t){e.preventDefault();const s=!this.isOpened&&this._hasValueState&&t===-1?0:t;return this._handleItemNavigation(!1,s),!0}onDown(e,t){e.preventDefault();const s=!this.isOpened&&this._hasValueState&&t===-1?0:t;return this._handleItemNavigation(!0,s),!0}onSpace(e){return this._isItemOnTarget()?(e.preventDefault(),this.onItemSelected(this._selectedItem,!0),!0):!1}onEnter(e){return this._isGroupItem?(e.preventDefault(),!1):this._isItemOnTarget()?(this.onItemSelected(this._selectedItem,!0),!0):!1}onPageUp(e){e.preventDefault();const t=this.selectedItemIndex-10>-1;return this._moveItemSelection(this.selectedItemIndex,t?this.selectedItemIndex-=10:this.selectedItemIndex=0),!0}onPageDown(e){e.preventDefault();const t=this._getItems();if(!t)return!0;const s=t.length-1,i=this.selectedItemIndex+10<=s;return this._moveItemSelection(this.selectedItemIndex,i?this.selectedItemIndex+=10:this.selectedItemIndex=s),!0}onHome(e){return e.preventDefault(),this._moveItemSelection(this.selectedItemIndex,this.selectedItemIndex=0),!0}onEnd(e){e.preventDefault();const t=this._getItems().length-1;return t&&this._moveItemSelection(this.selectedItemIndex,this.selectedItemIndex=t),!0}onTab(){return this._isItemOnTarget()?(this.onItemSelected(this._selectedItem,!0),!0):!1}toggle(e,t){(e!==void 0?e:!this.isOpened())?this._getComponent().open=!0:this.close(t.preventFocusRestore)}get _selectedItem(){return this._getNonGroupItems().find(e=>e.selected)}_isScrollable(){const e=this._getScrollContainer();return e.offsetHeight<e.scrollHeight}close(e=!1){const t=this._getItems()&&this._getItems()[this.selectedItemIndex];this._getComponent().open=!1;const s=this._getPicker();s.preventFocusRestore=e,s.open=!1,t&&t.focused&&(t.focused=!1)}updateSelectedItemPosition(e){this.selectedItemIndex=e}onItemSelected(e,t){const s=e,i=this._getNonGroupItems();s&&(this.accInfo={isGroup:s.hasAttribute("ui5-suggestion-item-group"),currentPos:i.indexOf(s)+1,listSize:i.length,itemText:s.text||"",additionalText:s.additionalText},this._getComponent().onItemSelected(s,t),this._getComponent().open=!1)}onItemSelect(e){this._getComponent().onItemSelect(e)}onItemPress(e){let t;const s=e.type==="ui5-item-click";s&&!e.detail.item.selected||this._handledPress&&!s||(s&&e.detail.item.selected?(t=e.detail.item,this._handledPress=!0):t=e.detail.selectedItems[0],this.onItemSelected(t,!1))}_onClose(){this._handledPress=!1}_isItemOnTarget(){return this.isOpened()&&this.selectedItemIndex!==null&&this.selectedItemIndex!==-1&&!this._isGroupItem}get _isGroupItem(){const e=this._getItems();return!e||!e[this.selectedItemIndex]?!1:e[this.selectedItemIndex].hasAttribute("ui5-suggestion-item-group")}isOpened(){var e;return!!((e=this._getPicker())!=null&&e.open)}_handleItemNavigation(e,t){this.selectedItemIndex=t,this._getItems().length&&(e?this._selectNextItem():this._selectPreviousItem())}_selectNextItem(){const e=this._getItems().length,t=this.selectedItemIndex;t!==-1&&t+1>e-1||this._moveItemSelection(t,++this.selectedItemIndex)}_selectPreviousItem(){const e=this._getItems(),t=this.selectedItemIndex;if(!(t===-1||t===null)){if(t-1<0){(e[t].hasAttribute("ui5-suggestion-item")||e[t].hasAttribute("ui5-suggestion-item-custom"))&&(e[t].selected=!1),e[t].focused=!1,this.component.focused=!0,this.component.hasSuggestionItemSelected=!1,this.selectedItemIndex-=1;return}this._moveItemSelection(t,--this.selectedItemIndex)}}_moveItemSelection(e,t){const s=this._getItems(),i=s[t],o=s[e],r=this._getNonGroupItems(),a=i.hasAttribute("ui5-suggestion-item-group");if(!i)return;this.component.focused=!1;const d=this._getItems()[this.selectedItemIndex];if(this.accInfo={isGroup:a,currentPos:s.indexOf(i)+1,itemText:(a?d.headerText:d.text)||""},(i.hasAttribute("ui5-suggestion-item")||i.hasAttribute("ui5-suggestion-item-custom"))&&(this.accInfo.additionalText=i.additionalText||"",this.accInfo.currentPos=r.indexOf(i)+1,this.accInfo.listSize=r.length),o&&(o.focused=!1),(o!=null&&o.hasAttribute("ui5-suggestion-item")||o!=null&&o.hasAttribute("ui5-suggestion-item-custom"))&&(o.selected=!1),i&&(i.focused=!0,a||(i.selected=!0),this.handleFocus&&i.focus()),this.component.hasSuggestionItemSelected=!0,this.onItemSelect(i),!this._isItemIntoView(i)){const C=this._isGroupItem?i.shadowRoot.querySelector("[ui5-li-group-header]"):i;this._scrollItemIntoView(C)}}_deselectItems(){this._getItems().forEach(t=>{t.hasAttribute("ui5-suggestion-item")&&(t.selected=!1),t.focused=!1})}_clearItemFocus(){const e=this._getItems().find(t=>t.focused);e&&(e.focused=!1)}_isItemIntoView(e){const t=e.getDomRef().getBoundingClientRect(),s=this._getComponent().getDomRef().getBoundingClientRect(),i=window.innerHeight||document.documentElement.clientHeight;let o=0;return this._hasValueState&&(o=this._getPicker().querySelector("[slot=header]").getBoundingClientRect().height),t.top+u.SCROLL_STEP<=i&&t.top>=s.top+o}_scrollItemIntoView(e){e.scrollIntoView({behavior:"auto",block:"nearest",inline:"nearest"})}_getScrollContainer(){return this._scrollContainer||(this._scrollContainer=this._getPicker().shadowRoot.querySelector(".ui5-popup-content")),this._scrollContainer}_getItems(){return this._getComponent().getSlottedNodes("suggestionItems").flatMap(t=>t.hasAttribute("ui5-suggestion-item-group")?[t,...t.items]:[t])}_getNonGroupItems(){return this._getItems().filter(e=>!e.hasAttribute("ui5-suggestion-item-group"))}_getComponent(){return this.component}_getList(){return this._getPicker().querySelector("[ui5-list]")}_getListWidth(){var e;return(e=this._getList())==null?void 0:e.offsetWidth}_getPicker(){return this._getComponent().shadowRoot.querySelector("[ui5-responsive-popover]")}get itemSelectionAnnounce(){if(!this.accInfo)return"";if(this.accInfo.isGroup)return`${u.i18nBundle.getText(B)} ${this.accInfo.itemText}`;const e=u.i18nBundle.getText(F,this.accInfo.currentPos||0,this.accInfo.listSize||0);return`${this.accInfo.additionalText} ${e}`}hightlightInput(e,t){return M(e,t)}get _hasValueState(){return this.component.hasValueStateMessage}_clearSelectedSuggestionAndaccInfo(){this.accInfo=void 0,this.selectedItemIndex=0}}u.SCROLL_STEP=60;b.SuggestionsClass=u;export{u as default};
@@ -1,3 +1,3 @@
1
- import{j as o,a as _,F as y,p as m,d as b,b as E,s as x,c as C,i as P,m as O,y as B,e as w,f as I,t as A,E as L,g as R,L as S,R as M,B as N,h as F,k as D,l as X,n as j,o as z,q as k}from"./bundle.esm-e2aCupGE.js";var T;(function(t){t.InPlace="InPlace",t.Popover="Popover"})(T||(T={}));const $=T;var g;(function(t){t.Off="Off",t.On="On"})(g||(g={}));const H=g;function W(){return o(y,{children:o("span",{children:this._renderEmptyIndicator?_(y,{children:[o("span",{className:"empty-indicator","aria-hidden":"true",children:this._emptyIndicatorSymbol}),o("span",{className:"empty-indicator-aria-label",children:this._emptyIndicatorAriaLabel})]}):o("slot",{})})})}m("@ui5/webcomponents-theming","sap_horizon",async()=>b);m("@ui5/webcomponents","sap_horizon",async()=>E);const q=`:host{max-width:100%;font-size:var(--sapFontSize);font-family:var(--sapFontFamily);color:var(--sapTextColor);line-height:normal;cursor:text;overflow:hidden}:host([max-lines="1"]){display:inline-block;text-overflow:ellipsis;white-space:nowrap}:host(:not([max-lines="1"])){display:-webkit-box;-webkit-line-clamp:var(--_ui5-v2-14-0_text_max_lines);line-clamp:var(--_ui5-v2-14-0_text_max_lines);-webkit-box-orient:vertical;white-space:normal;word-wrap:break-word}.empty-indicator-aria-label{position:absolute!important;clip:rect(1px,1px,1px,1px);user-select:none;left:0;top:0;font-size:0}
1
+ import{j as o,a as _,F as y,p as m,d as b,b as E,s as x,c as C,i as P,m as O,y as B,e as w,f as I,t as A,E as L,g as R,L as S,R as M,B as N,h as F,k as D,l as X,n as j,o as z,q as k}from"./bundle.esm-BLn1Dq6A.js";var T;(function(t){t.InPlace="InPlace",t.Popover="Popover"})(T||(T={}));const $=T;var g;(function(t){t.Off="Off",t.On="On"})(g||(g={}));const H=g;function W(){return o(y,{children:o("span",{children:this._renderEmptyIndicator?_(y,{children:[o("span",{className:"empty-indicator","aria-hidden":"true",children:this._emptyIndicatorSymbol}),o("span",{className:"empty-indicator-aria-label",children:this._emptyIndicatorAriaLabel})]}):o("slot",{})})})}m("@ui5/webcomponents-theming","sap_horizon",async()=>b);m("@ui5/webcomponents","sap_horizon",async()=>E);const q=`:host{max-width:100%;font-size:var(--sapFontSize);font-family:var(--sapFontFamily);color:var(--sapTextColor);line-height:normal;cursor:text;overflow:hidden}:host([max-lines="1"]){display:inline-block;text-overflow:ellipsis;white-space:nowrap}:host(:not([max-lines="1"])){display:-webkit-box;-webkit-line-clamp:var(--_ui5-v2-14-0_text_max_lines);line-clamp:var(--_ui5-v2-14-0_text_max_lines);-webkit-box-orient:vertical;white-space:normal;word-wrap:break-word}.empty-indicator-aria-label{position:absolute!important;clip:rect(1px,1px,1px,1px);user-select:none;left:0;top:0;font-size:0}
2
2
  `;var u=function(t,e,n,s){var a=arguments.length,i=a<3?e:s===null?s=Object.getOwnPropertyDescriptor(e,n):s,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,n,s);else for(var d=t.length-1;d>=0;d--)(l=t[d])&&(i=(a<3?l(i):a>3?l(e,n,i):l(e,n))||i);return a>3&&i&&Object.defineProperty(e,n,i),i},f;let p=f=class extends w{constructor(){super(...arguments),this.maxLines=1/0,this.emptyIndicatorMode="Off"}onBeforeRendering(){this.style.setProperty(I("--_ui5_text_max_lines"),`${this.maxLines}`)}get hasText(){return A(this.text)}get _renderEmptyIndicator(){return!this.hasText&&this.emptyIndicatorMode===H.On}get _emptyIndicatorAriaLabel(){return f.i18nBundle.getText(L)}get _emptyIndicatorSymbol(){return f.i18nBundle.getText(R)}};u([x({type:Number})],p.prototype,"maxLines",void 0);u([x()],p.prototype,"emptyIndicatorMode",void 0);u([C({type:Node,default:!0})],p.prototype,"text",void 0);u([P("@ui5/webcomponents")],p,"i18nBundle",void 0);p=f=u([O({tag:"ui5-text",renderer:B,template:W,styles:q})],p);p.define();const v=p;function Y(){return _("div",{children:[o(v,{class:"ui5-exp-text-text",emptyIndicatorMode:this.emptyIndicatorMode,children:this._displayedText}),this._maxCharactersExceeded&&_(y,{children:[o("span",{class:"ui5-exp-text-ellipsis",children:this._ellipsisText}),o(S,{id:"toggle",class:"ui5-exp-text-toggle",accessibleRole:"Button",accessibleName:this._accessibleNameForToggle,accessibilityAttributes:this._accessibilityAttributesForToggle,onClick:this._handleToggleClick,children:this._textForToggle}),this._usePopover&&_(M,{open:this._expanded,opener:"toggle",accessibleNameRef:"popover-text",contentOnlyOnDesktop:!0,_hideHeader:!0,class:"ui5-exp-text-popover",onClose:this._handlePopoverClose,children:[o(v,{id:"popover-text",children:this.text}),o("div",{slot:"footer",class:"ui5-exp-text-footer",children:o(N,{design:"Transparent",onClick:this._handleCloseButtonClick,children:this._closeButtonText})})]})]})]})}m("@ui5/webcomponents-theming","sap_horizon",async()=>b);m("@ui5/webcomponents","sap_horizon",async()=>E);const V=`:host{display:inline-block;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);color:var(--sapTextColor)}:host([hidden]){display:none}.ui5-exp-text-text{display:inline}.ui5-exp-text-text,.ui5-exp-text-toggle{font-family:inherit;font-size:inherit}.ui5-exp-text-text,.ui5-exp-text-ellipsis{color:inherit}.ui5-exp-text-popover::part(content){padding-inline:1rem}.ui5-exp-text-footer{width:100%;display:flex;align-items:center;justify-content:flex-end}
3
3
  `;var h=function(t,e,n,s){var a=arguments.length,i=a<3?e:s===null?s=Object.getOwnPropertyDescriptor(e,n):s,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,n,s);else for(var d=t.length-1;d>=0;d--)(l=t[d])&&(i=(a<3?l(i):a>3?l(e,n,i):l(e,n))||i);return a>3&&i&&Object.defineProperty(e,n,i),i},c;let r=c=class extends w{constructor(){super(...arguments),this.maxCharacters=100,this.overflowMode="InPlace",this.emptyIndicatorMode="Off",this._expanded=!1}getFocusDomRef(){var e,n;return this._usePopover?(e=this.shadowRoot)==null?void 0:e.querySelector("[ui5-responsive-popover]"):(n=this.shadowRoot)==null?void 0:n.querySelector("[ui5-link]")}get _displayedText(){var e;return this._expanded&&!this._usePopover?this.text:(e=this.text)==null?void 0:e.substring(0,this.maxCharacters)}get _maxCharactersExceeded(){var e;return(((e=this.text)==null?void 0:e.length)||0)>this.maxCharacters}get _usePopover(){return this.overflowMode===$.Popover}get _ellipsisText(){return this._expanded&&!this._usePopover?" ":"... "}get _textForToggle(){return this._expanded?c.i18nBundle.getText(F):c.i18nBundle.getText(D)}get _closeButtonText(){return c.i18nBundle.getText(X)}get _accessibilityAttributesForToggle(){return this._usePopover?{expanded:this._expanded,hasPopup:"dialog"}:{expanded:this._expanded}}get _accessibleNameForToggle(){if(this._usePopover)return this._expanded?c.i18nBundle.getText(j):c.i18nBundle.getText(z)}_handlePopoverClose(){k()||(this._expanded=!1)}_handleToggleClick(){this._expanded=!this._expanded}_handleCloseButtonClick(e){this._expanded=!1,e.stopPropagation()}};h([x()],r.prototype,"text",void 0);h([x({type:Number})],r.prototype,"maxCharacters",void 0);h([x()],r.prototype,"overflowMode",void 0);h([x()],r.prototype,"emptyIndicatorMode",void 0);h([x({type:Boolean})],r.prototype,"_expanded",void 0);h([P("@ui5/webcomponents")],r,"i18nBundle",void 0);r=c=h([O({tag:"ui5-expandable-text",renderer:B,styles:V,template:Y})],r);r.define();function Q(t){const{className:e,text:n,maxCharacters:s,part:a}=t;return o(r,{part:a,class:e,text:n,maxCharacters:s})}export{Q as default};