@riverty/web-components 5.3.0 → 5.4.0

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 (182) hide show
  1. package/CHANGELOG.md +27 -1
  2. package/custom-elements.json +32 -4
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/cjs/r-badge.cjs.entry.js +1 -1
  5. package/dist/cjs/r-dialog.cjs.entry.js +9 -10
  6. package/dist/cjs/r-hint_3.cjs.entry.js +4 -4
  7. package/dist/cjs/r-icon-button.cjs.entry.js +3 -3
  8. package/dist/cjs/r-input-code.cjs.entry.js +23 -7
  9. package/dist/cjs/r-input-date.cjs.entry.js +28 -7
  10. package/dist/cjs/r-input-password.cjs.entry.js +15 -4
  11. package/dist/cjs/r-input-phone-number.cjs.entry.js +57 -19
  12. package/dist/cjs/r-input.cjs.entry.js +15 -3
  13. package/dist/cjs/r-list-item.cjs.entry.js +13 -9
  14. package/dist/cjs/r-panel.cjs.entry.js +2 -2
  15. package/dist/cjs/r-popover-action.cjs.entry.js +1 -1
  16. package/dist/cjs/r-popover-content.cjs.entry.js +1 -1
  17. package/dist/cjs/r-popover-headline.cjs.entry.js +1 -1
  18. package/dist/cjs/r-popover-trigger.cjs.entry.js +1 -1
  19. package/dist/cjs/r-popover.cjs.entry.js +2 -2
  20. package/dist/cjs/r-progress-bar.cjs.entry.js +1 -1
  21. package/dist/cjs/r-radio-button-description.cjs.entry.js +1 -1
  22. package/dist/cjs/r-radio-button-leading.cjs.entry.js +1 -1
  23. package/dist/cjs/r-radio-button-title.cjs.entry.js +1 -1
  24. package/dist/cjs/r-radio-button-trailing.cjs.entry.js +1 -1
  25. package/dist/cjs/r-radio-button.cjs.entry.js +5 -5
  26. package/dist/cjs/r-radio-group.cjs.entry.js +6 -6
  27. package/dist/cjs/r-select-option.cjs.entry.js +1 -1
  28. package/dist/cjs/r-select.cjs.entry.js +5 -4
  29. package/dist/cjs/r-skip-link.cjs.entry.js +1 -1
  30. package/dist/cjs/r-stepper-item.cjs.entry.js +2 -2
  31. package/dist/cjs/r-stepper.cjs.entry.js +1 -1
  32. package/dist/cjs/r-tab-panel.cjs.entry.js +1 -1
  33. package/dist/cjs/r-tab.cjs.entry.js +1 -1
  34. package/dist/cjs/r-tabs-list.cjs.entry.js +1 -1
  35. package/dist/cjs/r-tabs.cjs.entry.js +3 -3
  36. package/dist/cjs/r-textarea.cjs.entry.js +17 -3
  37. package/dist/cjs/r-toast-group.cjs.entry.js +1 -1
  38. package/dist/cjs/r-toast.cjs.entry.js +15 -9
  39. package/dist/cjs/web-components.cjs.js +1 -1
  40. package/dist/collection/components/badge/badge.css +7 -7
  41. package/dist/collection/components/dialog/dialog.css +13 -13
  42. package/dist/collection/components/dialog/dialog.js +8 -9
  43. package/dist/collection/components/icon-button/icon-button.js +3 -3
  44. package/dist/collection/components/input/input.css +17 -2
  45. package/dist/collection/components/input/input.js +33 -2
  46. package/dist/collection/components/input-code/input-code.css +17 -2
  47. package/dist/collection/components/input-code/input-code.js +41 -6
  48. package/dist/collection/components/input-date/input-date.css +13 -2
  49. package/dist/collection/components/input-date/input-date.js +46 -6
  50. package/dist/collection/components/input-password/input-password.js +34 -4
  51. package/dist/collection/components/input-phone-number/input-phone-number.js +79 -18
  52. package/dist/collection/components/label/label.js +3 -3
  53. package/dist/collection/components/list-item/list-item/list-item.css +21 -22
  54. package/dist/collection/components/list-item/list-item/list-item.js +36 -10
  55. package/dist/collection/components/panel/panel.js +2 -2
  56. package/dist/collection/components/popover/popover.js +2 -2
  57. package/dist/collection/components/popover-action/popover-action.js +1 -1
  58. package/dist/collection/components/popover-content/popover-content.js +1 -1
  59. package/dist/collection/components/popover-headline/popover-headline.js +1 -1
  60. package/dist/collection/components/popover-trigger/popover-trigger.js +1 -1
  61. package/dist/collection/components/progress-bar/progress-bar.js +1 -1
  62. package/dist/collection/components/radio-button/radio-button.js +5 -5
  63. package/dist/collection/components/radio-button-description/radio-button-description.js +1 -1
  64. package/dist/collection/components/radio-button-leading/radio-button-leading.js +1 -1
  65. package/dist/collection/components/radio-button-title/radio-button-title.js +1 -1
  66. package/dist/collection/components/radio-button-trailing/radio-button-trailing.js +1 -1
  67. package/dist/collection/components/radio-group/radio-group.js +6 -6
  68. package/dist/collection/components/select/select.js +5 -4
  69. package/dist/collection/components/select-option/select-option.js +1 -1
  70. package/dist/collection/components/skip-link/skip-link.js +1 -1
  71. package/dist/collection/components/stepper/stepper.js +1 -1
  72. package/dist/collection/components/stepper-item/stepper-item.js +2 -2
  73. package/dist/collection/components/tab/tab.js +1 -1
  74. package/dist/collection/components/tab-panel/tab-panel.js +1 -1
  75. package/dist/collection/components/tabs/tabs.js +3 -3
  76. package/dist/collection/components/tabs-list/tabs-list.js +1 -1
  77. package/dist/collection/components/textarea/textarea.css +52 -21
  78. package/dist/collection/components/textarea/textarea.js +36 -3
  79. package/dist/collection/components/toast/toast.css +2 -1
  80. package/dist/collection/components/toast/toast.js +19 -10
  81. package/dist/collection/components/toast-group/toast-group.js +1 -1
  82. package/dist/collection/components/tooltip/tooltip.js +1 -1
  83. package/dist/esm/loader.js +1 -1
  84. package/dist/esm/r-badge.entry.js +1 -1
  85. package/dist/esm/r-dialog.entry.js +9 -10
  86. package/dist/esm/r-hint_3.entry.js +4 -4
  87. package/dist/esm/r-icon-button.entry.js +3 -3
  88. package/dist/esm/r-input-code.entry.js +23 -7
  89. package/dist/esm/r-input-date.entry.js +28 -7
  90. package/dist/esm/r-input-password.entry.js +15 -4
  91. package/dist/esm/r-input-phone-number.entry.js +57 -19
  92. package/dist/esm/r-input.entry.js +15 -3
  93. package/dist/esm/r-list-item.entry.js +13 -9
  94. package/dist/esm/r-panel.entry.js +2 -2
  95. package/dist/esm/r-popover-action.entry.js +1 -1
  96. package/dist/esm/r-popover-content.entry.js +1 -1
  97. package/dist/esm/r-popover-headline.entry.js +1 -1
  98. package/dist/esm/r-popover-trigger.entry.js +1 -1
  99. package/dist/esm/r-popover.entry.js +2 -2
  100. package/dist/esm/r-progress-bar.entry.js +1 -1
  101. package/dist/esm/r-radio-button-description.entry.js +1 -1
  102. package/dist/esm/r-radio-button-leading.entry.js +1 -1
  103. package/dist/esm/r-radio-button-title.entry.js +1 -1
  104. package/dist/esm/r-radio-button-trailing.entry.js +1 -1
  105. package/dist/esm/r-radio-button.entry.js +5 -5
  106. package/dist/esm/r-radio-group.entry.js +6 -6
  107. package/dist/esm/r-select-option.entry.js +1 -1
  108. package/dist/esm/r-select.entry.js +5 -4
  109. package/dist/esm/r-skip-link.entry.js +1 -1
  110. package/dist/esm/r-stepper-item.entry.js +2 -2
  111. package/dist/esm/r-stepper.entry.js +1 -1
  112. package/dist/esm/r-tab-panel.entry.js +1 -1
  113. package/dist/esm/r-tab.entry.js +1 -1
  114. package/dist/esm/r-tabs-list.entry.js +1 -1
  115. package/dist/esm/r-tabs.entry.js +3 -3
  116. package/dist/esm/r-textarea.entry.js +17 -3
  117. package/dist/esm/r-toast-group.entry.js +1 -1
  118. package/dist/esm/r-toast.entry.js +15 -9
  119. package/dist/esm/web-components.js +1 -1
  120. package/dist/types/components/dialog/dialog.d.ts +1 -0
  121. package/dist/types/components/input/input.d.ts +6 -0
  122. package/dist/types/components/input-code/input-code.d.ts +6 -0
  123. package/dist/types/components/input-date/input-date.d.ts +6 -0
  124. package/dist/types/components/input-password/input-password.d.ts +5 -0
  125. package/dist/types/components/input-phone-number/input-phone-number.d.ts +7 -0
  126. package/dist/types/components/list-item/list-item/list-item.d.ts +11 -3
  127. package/dist/types/components/textarea/textarea.d.ts +8 -1
  128. package/dist/types/components/toast/toast.d.ts +6 -0
  129. package/dist/types/components.d.ts +66 -8
  130. package/dist/web-components/p-05ba30ba.entry.js +1 -0
  131. package/dist/web-components/p-0a424361.entry.js +1 -0
  132. package/dist/web-components/p-0ac858b8.entry.js +1 -0
  133. package/dist/web-components/p-0bb0de18.entry.js +1 -0
  134. package/dist/web-components/{p-5dd43433.entry.js → p-10724c18.entry.js} +1 -1
  135. package/dist/web-components/{p-59aa588e.entry.js → p-1157b7f4.entry.js} +1 -1
  136. package/dist/web-components/{p-5bc9fe5e.entry.js → p-135be1d5.entry.js} +1 -1
  137. package/dist/web-components/{p-5cd1ad6a.entry.js → p-1ed3efd7.entry.js} +1 -1
  138. package/dist/web-components/p-20f979ff.entry.js +1 -0
  139. package/dist/web-components/p-2394508f.entry.js +1 -0
  140. package/dist/web-components/{p-a45fd808.entry.js → p-2d85c0f3.entry.js} +1 -1
  141. package/dist/web-components/p-31c8388d.entry.js +1 -0
  142. package/dist/web-components/p-333707b2.entry.js +1 -0
  143. package/dist/web-components/p-3ea6a1be.entry.js +1 -0
  144. package/dist/web-components/p-3fc2b23b.entry.js +1 -0
  145. package/dist/web-components/{p-77335ae7.entry.js → p-48dfb286.entry.js} +1 -1
  146. package/dist/web-components/p-61f78bf6.entry.js +1 -0
  147. package/dist/web-components/{p-806b173d.entry.js → p-66c454ce.entry.js} +1 -1
  148. package/dist/web-components/{p-26e4816a.entry.js → p-71d6c4d7.entry.js} +1 -1
  149. package/dist/web-components/{p-4dae8c19.entry.js → p-735da2bb.entry.js} +1 -1
  150. package/dist/web-components/p-77dc268e.entry.js +1 -0
  151. package/dist/web-components/{p-512d3a60.entry.js → p-89ff32dc.entry.js} +1 -1
  152. package/dist/web-components/{p-0930ee1d.entry.js → p-8d6a35e3.entry.js} +1 -1
  153. package/dist/web-components/{p-90d390f4.entry.js → p-8f719321.entry.js} +1 -1
  154. package/dist/web-components/{p-d35303a6.entry.js → p-900923ab.entry.js} +1 -1
  155. package/dist/web-components/{p-651522b6.entry.js → p-988a7731.entry.js} +1 -1
  156. package/dist/web-components/{p-7545038f.entry.js → p-9c40f9cd.entry.js} +1 -1
  157. package/dist/web-components/p-aecd025b.entry.js +1 -0
  158. package/dist/web-components/{p-87bb4b91.entry.js → p-c7a9da98.entry.js} +1 -1
  159. package/dist/web-components/p-caca2855.entry.js +1 -0
  160. package/dist/web-components/{p-8968ddf6.entry.js → p-dc93ed55.entry.js} +1 -1
  161. package/dist/web-components/p-df81177e.entry.js +1 -0
  162. package/dist/web-components/{p-a81a67da.entry.js → p-e273950c.entry.js} +1 -1
  163. package/dist/web-components/{p-832dca22.entry.js → p-e50503d0.entry.js} +1 -1
  164. package/dist/web-components/p-fdf70aed.entry.js +1 -0
  165. package/dist/web-components/web-components.esm.js +1 -1
  166. package/package.json +1 -1
  167. package/dist/web-components/p-0bd10e93.entry.js +0 -1
  168. package/dist/web-components/p-15d10c68.entry.js +0 -1
  169. package/dist/web-components/p-1cfa9a0e.entry.js +0 -1
  170. package/dist/web-components/p-23ff25a1.entry.js +0 -1
  171. package/dist/web-components/p-50f01d6b.entry.js +0 -1
  172. package/dist/web-components/p-547fc56c.entry.js +0 -1
  173. package/dist/web-components/p-73adec9b.entry.js +0 -1
  174. package/dist/web-components/p-8388221b.entry.js +0 -1
  175. package/dist/web-components/p-8cc4be0c.entry.js +0 -1
  176. package/dist/web-components/p-98628a15.entry.js +0 -1
  177. package/dist/web-components/p-aff51d37.entry.js +0 -1
  178. package/dist/web-components/p-b07be088.entry.js +0 -1
  179. package/dist/web-components/p-b5c8e978.entry.js +0 -1
  180. package/dist/web-components/p-d6ef5fff.entry.js +0 -1
  181. package/dist/web-components/p-dfd8bed6.entry.js +0 -1
  182. package/dist/web-components/p-e138c70a.entry.js +0 -1
@@ -1 +1 @@
1
- import{r as t,c as e,h as i,H as s,g as r}from"./p-CTxpqopm.js";import{a}from"./p-DvLT8-y3.js";import{S as l}from"./p-4Uv3PpKT.js";const o=class{constructor(s){t(this,s),this.rValidate=e(this,"rValidate"),this.rChange=e(this,"rChange"),this.rReset=e(this,"rReset"),this.showValid=!1,this.fullWidth=!1,this.leadingIconSize="s",this.trailingIcon="angle-down",this.tralingIconSize="s",this.listboxPosition="bottom",this.toggleButtonAriaLabel="Toggle combobox",this.noResultsFound="No results found",this.validityState="",this.validityMessage="",this.isExpanded=!1,this.isReadonly=!1,this.currentValue="",this.valueToDisplay="",this.isInitializing=!1,this.isResetting=!1,this.isNewValue=!1,this.focusedOption=null,this.isValueFocused=!1,this.isNoResultsFound=!1,this.handleSlotChange=()=>{setTimeout((()=>{this.initialize(),this.defineHostWidth()}),0)},this.initial={},this.uniqueId=`r-select-${Date.now().toString(32)}${Math.random().toString(32)}`.replace(/\./g,""),this.getValidityStateData=t=>{for(const e in t.validity)if(t.validity[e]){if(this.validityState=e,this[e+"Message"])return void(this.validityMessage=this[e+"Message"]);this.validityMessage=t.validationMessage}},this.validateFormElement=(t=null)=>{if(null===t)return;if(this.isNoValidate)return;if(this.error)return;this.getValidityStateData(t);const e="valid"===this.validityState;this.valid=e,this.invalid=!e,this.rValidate.emit({state:this.validityState,message:this.validityMessage})},this.typeaheadBuffer="",this.typeaheadTimeout=null,this.lastTypeaheadIndex=-1,this.contributeToFormData=t=>{a(this.nativeElement,t.formData)},this.onValueClick=t=>{var e;this.disabled||(t.preventDefault(),t.stopPropagation(),this.toggle(),this.isExpanded&&(this.combobox&&(null===(e=this.valueElement)||void 0===e||e.focus()),this.defineListboxPositionState()))},this.keyboardEventHandlerFactory=(t,e=!1)=>{switch(t){case"Enter":return()=>{var t;this.isExpanded?this.setValue((null===(t=this.focusedOption)||void 0===t?void 0:t.value)||""):(this.expand(),this.setOptionFocus(this.selectedElement))};case"Escape":return()=>{this.collapse(),this.reportValidity()};case"ArrowUp":return()=>{var t;this.isExpanded?this.focusedOption&&e?this.setValue((null===(t=this.focusedOption)||void 0===t?void 0:t.value)||""):(this.combobox||this.focusedOption!==this.optionElements[0])&&(this.focusedOption?this.focusPrevOption():this.setOptionFocus(this.selectedElement||this.optionElements[0])):(this.expand(),this.setOptionFocus(this.selectedElement||this.optionElements[this.combobox?this.optionElements.length-1:0]))};case"ArrowDown":return()=>{if(this.isExpanded)(this.combobox||this.focusedOption!==this.optionElements[this.optionElements.length-1])&&(this.focusedOption?this.focusNextOption():this.setOptionFocus(this.selectedElement||this.optionElements[0]));else{if(this.expand(),e)return;this.setOptionFocus(this.selectedElement||this.optionElements[0])}};case"Home":return()=>{if(!this.isExpanded)return this.expand(),void this.setOptionFocus(this.selectedElement||this.optionElements[0]);this.setOptionFocus(this.optionElements[0])};case"End":return()=>{if(!this.isExpanded)return this.expand(),void this.setOptionFocus(this.selectedElement||this.optionElements[this.optionElements.length-1]);this.setOptionFocus(this.optionElements[this.optionElements.length-1])};case"PageUp":return()=>{if(!this.isExpanded)return;if(null===this.focusedOption)return;const t=this.optionElementsArray.indexOf(this.focusedOption);-1!==t&&this.setOptionFocus(this.optionElements[t-10>=0?t-10:0])};case"PageDown":return()=>{if(!this.isExpanded)return;if(null===this.focusedOption)return;const t=this.optionElementsArray.indexOf(this.focusedOption);if(-1===t)return;const e=this.optionElements.length-1;this.setOptionFocus(this.optionElements[t+10<=e?t+10:e])};case"Tab":return()=>{var t;return this.setValue((null===(t=this.focusedOption)||void 0===t?void 0:t.value)||"")};default:return()=>{}}},this.onValueKeydown=t=>{if(t.stopPropagation(),["ArrowUp","ArrowDown","Home","End","PageUp","PageDown","Space","Enter","Escape"].includes(t.code))t.preventDefault();else if(1===t.key.length&&!t.ctrlKey&&!t.metaKey&&!t.altKey)return this.isExpanded||this.expand(),void this.handleTypeahead(t.key);switch(t.code){case"Space":this.keyboardEventHandlerFactory("Enter")();break;case"Tab":if(null===this.focusedOption)break;this.keyboardEventHandlerFactory("Tab")();break;default:this.keyboardEventHandlerFactory(t.code,t.altKey)()}},this.onComboboxKeydown=t=>{switch(t.stopPropagation(),["ArrowUp","ArrowDown","Home","End","PageUp","PageDown","Enter","Escape"].includes(t.code)&&t.preventDefault(),t.code){case"Tab":if(null===this.focusedOption){this.collapse();break}this.keyboardEventHandlerFactory("Tab")();break;case"Escape":if(this.isExpanded)return void this.keyboardEventHandlerFactory("Escape")();this.valueElement.value="",this.setValue(""),this.reportValidity();break;default:this.keyboardEventHandlerFactory(t.code,t.altKey)()}},this.onValueBlur=()=>{this.isValueFocused=!1;const{isBusy:t,isExpanded:e}=this;t||e||this.reportValidity()},this.onValueFocus=()=>{this.isValueFocused=!0},this.filterOptionsListByComboboxValue=(t="")=>{const e=Array.from(this.host.querySelectorAll('r-select-option:not([data-no-results="true"])'));e.forEach((e=>{var i,s;const r=-1!==(null===(s=null===(i=null==e?void 0:e.textContent)||void 0===i?void 0:i.trim())||void 0===s?void 0:s.toLowerCase()).search(t.toLowerCase());e.setAttribute("aria-hidden",`${!r}`)})),this.isNoResultsFound=e.every((t=>"true"===(null==t?void 0:t.getAttribute("aria-hidden")))),this.isNoResultsFound&&(this.statusElement.innerHTML=this.noResultsFound,setTimeout((()=>{this.statusElement.innerText=""}),1e3))},this.clearComboboxOptions=()=>{this.combobox&&this.filterOptionsListByComboboxValue()},this.onComboboxChange=t=>{this.filterOptionsListByComboboxValue(t.target.value)},this.onComboboxInput=t=>{this.filterOptionsListByComboboxValue(t.target.value),this.isExpanded||(this.expand(),this.defineListboxPositionState())},this.onSubmitForm=t=>{this.isNoValidate||(this.reportValidity(),this.invalid&&(t.preventDefault(),t.stopPropagation()))},this.onResetForm=()=>{this.resetValidation(),this.setValue(this.initial.value),this.rReset.emit({element:this.host,value:this.currentValue})},this.renderSelect=t=>{var e,s;return i("span",Object.assign({class:"r-select--value",role:"combobox"},t,{ref:t=>this.valueElement=t,onClick:this.isInteractive?this.onValueClick:null,onKeyDown:this.isInteractive?this.onValueKeydown:null,onBlur:this.isInteractive?this.onValueBlur:null,onFocus:this.isInteractive?this.onValueFocus:null}),i("span",{class:"r-select--value-display"},this.isLeadingSlotRendered?i("slot",{name:"leading"}):null,i("span",{class:"r-select--value-selected",innerHTML:(null===(s=null===(e=this.valueToDisplay)||void 0===e?void 0:e.trim)||void 0===s?void 0:s.call(e))||this.placeholder||""})),i("span",{class:"r-select--value-arrow"},i("r-icon",{class:"r-select--trailing-icon",name:"angle-down",size:"s"})))},this.renderCombobox=t=>{var e,s,r;return i("div",{class:"r-select--value",onClick:this.isInteractive?this.onValueClick:null,ref:t=>this.comboboxContainerElement=t},i("div",{class:"r-select--value-display"},this.isLeadingSlotRendered?i("slot",{name:"leading"}):null,i("input",Object.assign({role:"combobox",autocomplete:"off","aria-autocomplete":"list",disabled:this.disabled,readonly:this.readonly,type:"text"},t,{class:"r-select--input",ref:t=>this.valueElement=t,onKeyDown:this.isInteractive?this.onComboboxKeydown:null,onBlur:this.isInteractive?this.onValueBlur:null,onFocus:this.isInteractive?this.onValueFocus:null,onChange:this.isInteractive?this.onComboboxChange:null,onInput:this.isInteractive?this.onComboboxInput:null,placeholder:this.placeholder||"",value:(null===(r=null===(s=null===(e=this.selectedElement)||void 0===e?void 0:e.textContent)||void 0===s?void 0:s.trim)||void 0===r?void 0:r.call(s))||""}))),i("button",{"aria-label":this.toggleButtonAriaLabel,"aria-expanded":`${this.expanded||!1}`,"aria-controls":`${this.uniqueId}-list`,disabled:this.disabled,tabindex:"-1",class:"r-select--value-arrow-button r-select--value-arrow"},i("r-icon",{class:"r-select--trailing-icon",name:"angle-down",size:"s"})),i("div",{class:"visually-hidden",role:"status",ref:t=>this.statusElement=t}))}}async setReadonly(){this.collapse(),this.resetValidation(),this.isReadonly=!0}async clearReadonly(){this.isReadonly=!1}handleListboxPositionChange(){this.defineListboxPositionState()}handleExpandedChange(){this.expanded?this.expand():this.collapse()}handleReadonlyChange(){this.readonly?this.setReadonly():this.clearReadonly()}handleValueChange(t,e){this.isInitializing||(this.isNewValue=e!==t,this.isNewValue&&this.setValue(t))}optionSelectAction(t){t.stopPropagation(),this.disabled||this.setValue(t.target.value)}tooltipFocusAction(){this.collapse(),this.reportValidity()}onMouseup(t){this.isExpanded&&(t.stopPropagation(),this.host.contains(t.target)||(this.collapse(),this.reportValidity()))}onKeyup(t){this.isExpanded&&(t.stopPropagation(),this.host.contains(t.target)||(this.collapse(),this.reportValidity()))}handleScrolling(){this.isExpanded&&this.defineListboxPositionState()}handleResizing(){this.isExpanded&&this.defineListboxPositionState()}async setValue(t=""){this.resetValidation(),this._renderSelected(t,this.currentValue!==t),this.clearComboboxOptions()}async getValue(){return this.currentValue||""}async reset(){if(this.resetValidation(),this.collapse(),this.clearComboboxOptions(),this.currentValue!==this.initial.value){if(""!==this.initial.value&&this.initiallySelectedElement)return this.isResetting=!0,this.setValue(this.initial.value),void(this.isResetting=!1);this.deselectOptions(),this.currentValue="",this.valueToDisplay=""}}async resetValidation(){this.validityMessage=null,this.validityState=null,this.invalid=this.initial.invalid,this.valid=!this.invalid}async reportValidity(){return this.validateFormElement(this.nativeElement),"valid"===this.validityState}async setFocus(){var t;null===(t=this.valueElement)||void 0===t||t.focus()}async setBlur(){var t;null===(t=this.valueElement)||void 0===t||t.blur()}async expand(){this.isExpanded=!0}async collapse(){this.isExpanded=!1,this.isBusy||(this.clearOptionsFocus(),this.setComboboxValueOnCollapse())}async getFocusedOption(){return this.host.querySelector('r-select-option[data-focused="true"]')||null}async setFocusedOption(t){return this.setOptionFocus(this.optionElements[t])}clearOptionsFocus(){var t;this.focusedOption=null;try{this.valueElement.ariaActiveDescendantElement=null}catch(e){null===(t=this.valueElement)||void 0===t||t.removeAttribute("aria-activedescendant")}this.focusedOptions.forEach((t=>t.setBlur()))}setComboboxValueOnCollapse(){var t,e,i;this.combobox&&(this.valueElement.value=(null===(i=null===(e=null===(t=this.selectedElement)||void 0===t?void 0:t.textContent)||void 0===e?void 0:e.trim)||void 0===i?void 0:i.call(e))||"",this.clearComboboxOptions())}get focusedOptions(){return Array.from(this.host.querySelectorAll('r-select-option[data-focused="true"]'))}toggle(){this.isExpanded=!this.isExpanded}get selectedElement(){return this.host.querySelector(`r-select-option[value="${this.currentValue}"]`)}get initiallySelectedElement(){return this.host.querySelector(`r-select-option[value="${this.initial.value}"]`)||null}get parentFormEl(){return this.host.closest("form")||document.querySelector(`#${this.form}`)||null}get isNoValidate(){var t;return(null===(t=this.parentFormEl)||void 0===t?void 0:t.hasAttribute("novalidate"))||this.novalidate||!1}get optionElements(){return this.host.querySelectorAll('r-select-option:not([disabled]:not([disabled="false"])):not([aria-hidden="true"])')||null}get optionElementsArray(){return Array.from(this.optionElements)}deselectOptions(){this.optionElements&&this.optionElements.forEach((t=>t.clearSelected()))}get isBusy(){return this.isInitializing||this.isResetting}_renderSelected(t="",e=!0){var i,s;this.currentValue=t,null===this.currentValue?this.host.removeAttribute("value"):this.host.setAttribute("value",this.currentValue);const r=this.host.querySelector(`r-select-option[value="${null===(i=this.currentValue)||void 0===i?void 0:i.trim()}"]`);this.valueToDisplay=(null==r?void 0:r.innerHTML)||(null==r?void 0:r.textContent)||this.currentValue||"",null===(s=this.optionElements)||void 0===s||s.forEach((e=>{e.value===t?e.setSelected():e.clearSelected()})),this._renderNativeOption(),this.isExpanded&&this.collapse(),this.isBusy||this.reportValidity(),e&&this.rChange.emit({element:this.host,value:t})}setOptionFocus(t=this.selectedElement){t&&null!==this.optionElements&&requestAnimationFrame((()=>{var e;this.clearOptionsFocus(),t.setFocus(),this.focusedOption=t;try{this.valueElement.ariaActiveDescendantElement=t}catch(i){null===(e=this.valueElement)||void 0===e||e.setAttribute("aria-activedescendant",t.id)}((t,e)=>{var i,s;if(!e)return;try{null===(i=t.scrollIntoView)||void 0===i||i.call(t,{block:"nearest",inline:"nearest"})}catch(e){null===(s=t.scrollIntoView)||void 0===s||s.call(t,!1)}const r=t.getBoundingClientRect(),a=e.getBoundingClientRect();(r.top<a.top||r.bottom>a.bottom)&&((t,e)=>{const i=t.offsetTop,s=i+t.offsetHeight,r=e.scrollTop,a=r+e.clientHeight;i<r?e.scrollTop=i:s>a&&(e.scrollTop=s-e.clientHeight)})(t,e)})(t,this.listboxElement)}))}focusPrevOption(t=this.focusedOption||this.selectedElement){if(null===this.optionElements)return;const e=this.optionElementsArray.indexOf(t)-1;this.setOptionFocus(e>=0?this.optionElements[e]:this.optionElements[this.optionElements.length-1])}focusNextOption(t=this.focusedOption||this.selectedElement){if(null===this.optionElements)return;const e=this.optionElementsArray.indexOf(t)+1;this.setOptionFocus(e<=this.optionElements.length-1?this.optionElements[e]:this.optionElements[0])}filterOptions(t,e){if(!e)return[];const i=e.toLowerCase();return t.filter((t=>!t.disabled&&(t.textContent||"").trim().toLowerCase().startsWith(i)))}getIndexByLetter(t,e,i=0){if(!t.length||!e)return-1;const s=[...t.slice(i),...t.slice(0,i)],r=this.filterOptions(s,e).sort(((t,e)=>(t.textContent||"").trim().toLowerCase().localeCompare((e.textContent||"").trim().toLowerCase()))),a=e.split("").every((t=>t===e[0]));if(r[0])return t.indexOf(r[0]);if(a){const i=this.filterOptions(s,e[0]);return i[0]?t.indexOf(i[0]):-1}return-1}handleTypeahead(t){clearTimeout(this.typeaheadTimeout);const e=this.optionElementsArray;let i;if(this.typeaheadBuffer+=t.toLowerCase(),this.typeaheadBuffer.split("").every((t=>t===this.typeaheadBuffer[0]))&&-1!==this.lastTypeaheadIndex)i=(this.lastTypeaheadIndex+1)%e.length;else{const t=e.indexOf(this.focusedOption||this.selectedElement);i=-1===t?0:(t+1)%e.length}const s=this.getIndexByLetter(e,this.typeaheadBuffer,i);if(-1!==s){this.lastTypeaheadIndex=s;const t=e[s];this.isExpanded||this.expand(),this.setOptionFocus(t)}this.typeaheadTimeout=setTimeout((()=>{this.typeaheadBuffer=""}),500)}connectFormEventListeners(){this.parentFormEl&&(this.parentFormEl.addEventListener("formdata",this.contributeToFormData),this.parentFormEl.addEventListener("submit",this.onSubmitForm,{capture:!0}),this.parentFormEl.addEventListener("reset",this.onResetForm))}disconnectFormEventListeners(){this.parentFormEl&&(this.parentFormEl.removeEventListener("formdata",this.contributeToFormData),this.parentFormEl.removeEventListener("submit",this.onSubmitForm),this.parentFormEl.removeEventListener("reset",this.onResetForm))}defineHostWidth(){if(this.fullWidth)return;const t=this.host.shadowRoot.querySelector(".r-select--native").getBoundingClientRect().width,e=(this.combobox?this.comboboxContainerElement:this.valueElement).getBoundingClientRect().width,i=this.listboxElement.getBoundingClientRect().width,s=Math.max(t,e,i);this.host.style.setProperty("--width",`${s}px`)}_renderNativeOption(){var t,e,i,s,r;const a=document.createElement("option"),l=document.createTextNode(null===(i=null===(e=null===(t=this.selectedElement)||void 0===t?void 0:t.textContent)||void 0===e?void 0:e.trim)||void 0===i?void 0:i.call(e));a.value=this.currentValue,a.selected=!0,a.appendChild(l),this.nativeElement&&(this.nativeElement.innerHTML="",null===(s=this.nativeElement)||void 0===s||s.appendChild(a),this.nativeElement.value=this.currentValue,null===(r=this.nativeElement)||void 0===r||r.setAttribute("value",this.currentValue))}notVisible(t){return"visible"!==getComputedStyle(t).overflow}findOverflowParent(t){var e,i;return(null===(e=t.parentNode)||void 0===e?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE?this.findOverflowParent(null===(i=t.parentNode)||void 0===i?void 0:i.host):this.notVisible(t)?t:t.parentElement?this.findOverflowParent(t.parentElement):null}get ariaDescribedBy(){const t=`${this.uniqueId}-message`;return this.hint?`${this.uniqueId}-hint ${t}`:t}get overflowedParent(){return this.findOverflowParent(this.host.parentElement)}get top(){var t,e;return this.overflowedParent?Math.abs(this.overflowedParent.getBoundingClientRect().top-(null===(e=this.valueElement)||void 0===e?void 0:e.getBoundingClientRect().top)):null===(t=this.valueElement)||void 0===t?void 0:t.getBoundingClientRect().top}get bottom(){var t;function e(t){return window.innerHeight-t.getBoundingClientRect().top-t.getBoundingClientRect().height}const i=window.getComputedStyle(this.messageContainer),s=(null===(t=this.messageContainer)||void 0===t?void 0:t.getBoundingClientRect().height)+parseFloat(i.marginTop),r=e(this.host)+s;return this.overflowedParent?Math.abs(e(this.overflowedParent)-r):r+s}defineListboxPositionState(){var t,e;const i=(null===(t=this.listboxElement)||void 0===t?void 0:t.offsetHeight)<this.bottom,s=(null===(e=this.listboxElement)||void 0===e?void 0:e.offsetHeight)<this.top;if("top"===this.listboxPosition&&(s||!i)||"bottom"===this.listboxPosition&&(i||!s))this.listboxPositionState=this.listboxPosition;else switch(this.listboxPosition){case"top":this.listboxPositionState=s?"top":"bottom";break;case"bottom":this.listboxPositionState=i?"bottom":"top"}}initialize(){var t;const e=this.value||"";if(this.initial.value=this.value||"",this.initial.invalid=this.invalid||!1,this.listboxPositionState=this.listboxPosition,this.optionElementsArray.find((t=>t.value.trim()===e)))return this.isInitializing=!0,this.setValue(e),void(this.isInitializing=!1);if(this.placeholder)return;if(this.combobox)return;const i=null===(t=this.optionElements)||void 0===t?void 0:t[0];i&&(this.isInitializing=!0,this.setValue(null==i?void 0:i.value),this.isInitializing=!1)}initializeStyleObserver(){!this.listboxWidthObserver&&this.listboxElement&&(this.listboxWidthObserver=new l((()=>{this.listboxElement&&(this.listboxElement.getBoundingClientRect().width<=this.host.getBoundingClientRect().width||this.defineHostWidth())})),this.listboxWidthObserver.observe([this.listboxElement],["width"]))}get hasError(){var t;return this.invalid&&(null===(t=this.error)||void 0===t?void 0:t.length)>0}get hasValidationError(){var t;return"valid"!==this.validityState&&(null===(t=this.validityMessage)||void 0===t?void 0:t.length)>0}get hasValidationSuccess(){return this.valid&&this.validMessage&&this.showValid}get hasMessage(){return this.hasError||this.hasValidationError||this.hasValidationSuccess}get isInteractive(){return!this.disabled&&!this.isReadonly}get hasLeadingSlot(){return!!this.host.querySelector('[slot="leading"]')}get hasOptionIcon(){return!!this.optionElementsArray.find((t=>!!t.querySelector('[slot="icon"]')))}get isLeadingSlotRendered(){return this.hasLeadingSlot&&this.hasOptionIcon&&!this.currentValue}get isPlaceholder(){var t,e;const{placeholder:i}=this;return((null===(e=null===(t=this.valueToDisplay)||void 0===t?void 0:t.trim)||void 0===e?void 0:e.call(t))||i||"")===i}connectedCallback(){this.connectFormEventListeners()}disconnectedCallback(){this.disconnectFormEventListeners()}componentWillLoad(){this.isExpanded=this.expanded,this.isReadonly=this.readonly}componentDidLoad(){this.defineListboxPositionState(),this.initializeStyleObserver()}render(){var t;const{uniqueId:e,disabled:r,isExpanded:a,fieldIndicator:l,invalid:o,placeholder:n,required:h,hint:c,label:d,internal:v,tooltip:u,tooltipIcon:p,tooltipIconColor:b}=this,f=d?Object.assign({fieldIndicator:l},u&&!r?{tooltip:u,"tooltip-icon":p,"tooltip-icon-color":b}:{}):{},g=!!this.isInteractive&&!!h,m={id:`${e}-value`,tabindex:""+(r?-1:0),"aria-controls":`${e}-list`,"aria-describedby":this.ariaDescribedBy,"aria-disabled":`${r||!1}`,"aria-expanded":`${a||!1}`,"aria-invalid":`${o||!1}`,"aria-readonly":`${!this.isInteractive||!1}`,"aria-required":`${g}`,"aria-labelledby":`${e}-label`},y={"aria-label":d},w={placeholder:n,name:this.name,value:this.currentValue,"aria-hidden":"true",tabindex:"-1",invalid:o,disabled:r,required:g};return i(s,{key:"919d154342bf1d30326cd32187ed227e6955b460","data-value":this.currentValue,expanded:!this.disabled&&this.isExpanded,"data-listbox-position":this.listboxPositionState,"data-initial-value":this.initial.value,"data-is-placeholder":`${!!this.isPlaceholder}`,"data-value-focused":`${!!this.isValueFocused}`,"data-option-focused":`${!!this.focusedOption}`,"data-validity-state":`${this.validityState||""}`,"data-validity-message":`${this.validityMessage||""}`,"data-readonly":`${!!this.isReadonly}`},i("div",{key:"4e9002080a63a939414c9aa36ffd3e5e0a02ebc4",class:"r-select--label "+(v?"":"r-select--label__margin-bottom")},i("div",{key:"4a214d8293680bfee404cb584cde7afcb0580e90",class:v?"visually-hidden":"r-select--label-container"},i("label",{key:"bf2baabc8e75e774e80c7db3bdaa112224f6d47b",id:`${e}-label`,onClick:this.isInteractive?this.onValueClick:null},i("r-label",Object.assign({key:"bfdf31db17b8ac9bdf966d63d828d19e1711c6d6"},f),d)),i("slot",{key:"3889db21fdeb08954f17cbc4fa8dca259cb8f6f3",name:"popover"})),c&&i("r-hint",{key:"c311478949c31e1be31d3c0ff2311a5611c46dce",id:`${e}-hint`,class:"r-select--hint"},c)),i("div",{key:"0d39becaf6e1031e19d4a20d2b76a32b3469a24a",class:"r-select"},i("select",Object.assign({key:"879cbe707b655cfd212d4977ab745c1d4920ba74",class:"r-select--native",ref:t=>this.nativeElement=t},w)),i("div",{key:"0603eb24d1f9b06789e877a3d2a9370a22d29552",class:"r-select--container"},this.combobox?this.renderCombobox(m):this.renderSelect(m),i("div",Object.assign({key:"1fbf379f5b1dc9685f255b337430fdc0d060e2ba",role:"listbox",tabindex:"-1",id:`${e}-list`,class:"r-select--options",ref:t=>this.listboxElement=t},y),(this.isNoResultsFound||!(null===(t=this.optionElements)||void 0===t?void 0:t.length))&&i("r-select-option",{key:"8fc9b2ab331af1723d2698b9d226255237d1e71b","data-no-results":"true",value:"no_results"},this.noResultsFound),i("slot",{key:"545bf9aa13ccc535f6974550fd982e7b34069c13",onSlotchange:this.handleSlotChange})))),i("div",{key:"f3d0eb3adfd818070a1f4dcc6eb8b5d7e2eef042",id:`${e}-message`,"aria-live":"polite","aria-atomic":"true",ref:t=>this.messageContainer=t,class:this.hasMessage&&!v?"r-select--message":"visually-hidden"},this.hasMessage&&i("r-hint",{key:"c1068cc9ddd6e7d77fb579e8bceb1daf4295a8a0",variant:this.invalid?"error":"success"},this.hasError&&this.error,this.hasValidationError&&this.validityMessage,this.hasValidationSuccess&&this.validMessage)))}get host(){return r(this)}static get watchers(){return{listboxPosition:["handleListboxPositionChange"],expanded:["handleExpandedChange"],readonly:["handleReadonlyChange"],value:["handleValueChange"]}}};o.style=":host{display:inline-flex;flex-direction:column;width:var(--width, auto);transition:width 0.2s ease-out;max-width:none;opacity:1;outline:none}:host slot{display:contents}:host(:hover:not([disabled]:not([disabled=false]))){--r-select--container--background-color:var(--r-background-interactive-hovered, rgba(40, 40, 40, 0.04))}:host([expanded]:not([expanded=false])){--r-select--options--visibility:visible;--r-select--options--z-index:1;--r-select--background-color:var(--r-background-interactive-softest, #fff);--r-select--value--border-color:var(--r-border-soft, #686868);--r-select--value--background-color:var(--r-background-interactive-softest, #fff);--r-select--trailing-icon--transform:rotate(180deg)}:host([invalid]:not([invalid=false])){--r-select--container--background-color:var(--r-status-error-soft, #fef6f6);--r-select--value--border-color:var(--r-status-error-regular, #da1e28);--r-select--options--border-color:var(--r-status-error-regular, #da1e28)}:host([disabled]:not([disabled=false])){--r-select--opacity:0.4;--r-select--pointer-events:none;--r-select--cursor:not-allowed}:host([data-is-placeholder=true]){--r-select--value-diplay--color:var(--r-text-soft, #686868)}:host([data-max-width=set]){width:100%;--r-select--options--right:0}:host([full-width]){width:100%}:host([data-listbox-position=top]){--r-select--options--top:auto;--r-select--options--bottom:2.875em;--r-select--options--border-width:1px 1px 0 1px}:host([data-listbox-position=bottom]){--r-select--options--top:100%;--r-select--options--bottom:auto;--r-select--options--border-width:0 1px 1px 1px}:host([data-readonly=true]){--r-select--color:var(--r-text-soft, #686868);--r-select--value--background-color:var(--r-background-soft, #f3f1f0);--r-select--value--border-color:transparent transparent var(--r-border-soft, #686868) transparent;--r-select--value--cursor:text;--r-select--value-arrow--visiblility:hidden}.r-select{display:var(--r-select--display, flex);flex-grow:var(--r-select--flex-grow, 1);flex-direction:var(--r-select--flex-direction, column);position:var(--r-select--position, relative);box-sizing:var(--r-select--box-sizing, border-box);max-width:var(--r-select--max-width, 100%);min-width:var(--r-select--min-width, fit-content);font-family:var(--r-select--font-family, var(--r-font-family-text, system-ui));font-weight:var(--r-select--font-weight, var(--r-font-weight-regular, 400));font-size:var(--r-select--font-size, var(--r-font-size-400, 1rem));text-align:var(--r-select--text-align, left);color:var(--r-select--color, var(--r-text-regular, #282828));opacity:var(--r-select--opacity, 1);pointer-events:var(--r-select--pointer-events, auto);cursor:var(--r-select--cursor, pointer)}.r-select--label__margin-bottom{margin-bottom:var(--r-select--label--margin-bottom, var(--r-spacing-025, 0.25rem))}.r-select--label-container{display:var(--r-select--label-container--display, flex);gap:var(--r-select--label-container--gap, var(--r-spacing-100, 1rem));align-items:var(--r-select--label-container--align-items, center);justify-content:var(--r-select--label-container--align-items, space-between)}.r-select--label-container ::slotted([slot=popover]){display:var(--r-select--popover--display, inline-flex);height:var(--r-select--popover--height, var(--r-spacing-150, 1.5));align-items:var(--r-select--popover--align-items, center);justify-content:var(--r-select--popover--justify-content, center);margin-right:var(--r-select--popover--margin-right, -0.25rem);--r-popover--trigger--min-width:var(--r-select--popover-trigger--min-width, var(--r-spacing-150, 1.5));--r-popover--trigger--min-height:var(--r-select--popover--trigger--min-height, var(--r-spacing-150, 1.5))}.r-select--trailing-icon{transform:var(--r-select--trailing-icon--transform, rotate(0deg));transition:var(--r-select--trailing-icon--transition, transform 0.15s)}.r-select ::slotted([name=leading]){display:var(--r-select--value--leading-icon--display, flex);align-items:var(--r-select--value--leading-icon--align-items, center);color:var(--r-select--value--leading-icon--color, var(--r-icon-soft, #686868))}.r-select--container{background-color:var(--r-select--container--background-color, var(--r-background-softest, #fff));opacity:var(--r-select--container--opacity, 1);pointer-events:var(--r-select--container--pointer-events, auto)}.r-select--input{height:var(--r-select--input--height, 100%);width:var(--r-select--input--width, 100%);border:var(--r-select--input--border, none);outline:var(--r-select--input--outline, none);background-color:var(--r-select--input--background-color, inherit);color:var(--r-select--input--color, inherit);font-family:var(--r-select--input--font-family, inherit);font-size:var(--r-select--input--font-size, inherit);font-weight:var(--r-select--input--font-weight, inherit);padding:var(--r-select--input--padding, 0)}.r-select--native{position:var(--r-select--native--position, fixed);top:var(--r-select--native--top, -100vh);z-index:var(--r-select--native--z-index, -1);opacity:var(--r-select--native--opacity, 0);font-size:var(--r-select--native--font-size, 1rem);padding:var(--r-select--native--padding, 0 calc(48px + 0.75em) 0 0.75em)}.r-select--value:not([aria-readonly=true]):not(:has(input:read-only)):not(:has(input:disabled)):active{--r-select--value--background-color:var(--r-background-interactive-pressed, rgba(40, 40, 40, 0.12))}.r-select--value[aria-disabled=false]:focus,.r-select--value:has(input:focus){outline:var(--r-select--value--outline, none);--r-select--value--z-index:2;--r-select--value--box-shadow:0 0 0 6px var(--r-border-focused-outlined, #fff);--r-select--value--outline:2px solid var(--r-border-focused, #0071e3);--r-select--value--outline-offset:2px}.r-select--value{position:var(--r-select--value--position, relative);display:var(--r-select--value--display, inline-grid);grid-template-columns:var(--r-select--value--grid-template-columns, 1fr 1.75rem);box-sizing:var(--r-select--value--box-sizing, border-box);align-items:var(--r-select--value--align-items, center);justify-content:var(--r-select--value--justify-content, space-between);text-align:var(--r-select--value--text-align, left);min-width:var(--r-select--value--min-width, 100%);min-height:var(--r-select--value--min-height, var(--r-spacing-275, 2.75rem));padding:var(--r-select--value--padding, 0);white-space:var(--r-select--value--white-space, nowrap);background-color:var(--r-select--value--background-color, transparent);border-width:var(--r-select--value--border-width, 1px);border-style:var(--r-select--value--border-style, solid);border-color:var(--r-select--value--border-color, var(--r-border-soft, #686868));box-shadow:var(--r-select--value--box-shadow, none);outline:var(--r-select--value--outline, none);outline-offset:var(--r-select--value--outline-offset, 0);z-index:var(--r-select--value--z-index, 0);cursor:var(--r-select--value--cursor, inherit)}.r-select--value-display{display:var(--r-select--value-diplay--display, flex);gap:var(--r-select--value-diplay--gap, 0.5em);align-items:var(--r-select--value-diplay--align-tems, center);flex:var(--r-select--value-diplay--flex, 1);padding:var(--r-select--value-diplay--padding, 0 0.75em);overflow:var(--r-select--value-diplay--overflow, hidden);text-overflow:var(--r-select--value-diplay--text-overflow, ellipsis);color:var(--r-select--value-diplay--color, inherit);min-width:var(--r-select--value-diplay--min-width, fit-content);height:var(--r-select--value-diplay--height, 100%)}.r-select--value-selected{display:var(--r-select--value-diplay--display, flex);gap:var(--r-select--value-diplay--gap, 0.75em);align-items:var(--r-select--value-diplay--align-items, center)}.r-select--value-arrow{display:var(--r-select--value-arrow--display, flex);align-items:var(--r-select--value-arrow--align-items, center);justify-content:var(--r-select--value-arrow--justify-content, center);padding:var(--r-select--value-arrow--padding, 0 0.75em 0 0);visibility:var(--r-select--value-arrow--visiblility, visible)}.r-select--value-arrow-button{height:var(--r-select--value-arrow-button--height, 100%);background-color:var(--r-select--value-arrow-button--background-color, transparent);color:var(--r-select--value-arrow-button--color, inherit);border:var(--r-select--value-arrow-button--border, none);outline:var(--r-select--value-arrow-button--outline, none);cursor:var(--r-select--value-arrow-button--cursor, inherit)}.r-select--options{visibility:var(--r-select--options--visibility, hidden);position:var(--r-select--options--position, absolute);top:var(--r-select--options--top, 100%);right:var(--r-select--options--right, 0);bottom:var(--r-select--options--bottom, auto);left:var(--r-select--options--left, 0);margin:var(--r-select--options--margin, 0);padding:var(--r-select--options--padding, 0);list-style:var(--r-select--options--list-style, none);max-height:var(--r-select--options--max-height, 14.375em);min-width:var(--r-select--options--min-width, fit-content);overflow-y:var(--r-select--options--overflow-y, auto);background-color:var(--r-select--options--background-color, var(--r-background-interactive-softest, #fff));border-style:var(--r-select--options--border-style, solid);border-color:var(--r-select--options--border-color, var(--r-border-soft, #686868));border-width:var(--r-select--options--border-width, 0 1px 1px 1px);z-index:var(--r-select--options--z-index, -1)}.r-select--message{margin-top:var(--r-select--message--margin-top, var(--r-spacing-025, 0.25rem))}.hidden{display:none}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}@media (prefers-reduced-motion){:host{transition:none}}";export{o as r_select}
1
+ import{r as t,c as e,h as i,H as s,g as r}from"./p-CTxpqopm.js";import{a}from"./p-DvLT8-y3.js";import{S as l}from"./p-4Uv3PpKT.js";const o=class{constructor(s){t(this,s),this.rValidate=e(this,"rValidate"),this.rChange=e(this,"rChange"),this.rReset=e(this,"rReset"),this.showValid=!1,this.fullWidth=!1,this.leadingIconSize="s",this.trailingIcon="angle-down",this.tralingIconSize="s",this.listboxPosition="bottom",this.toggleButtonAriaLabel="Toggle combobox",this.noResultsFound="No results found",this.validityState="",this.validityMessage="",this.isExpanded=!1,this.isReadonly=!1,this.currentValue="",this.valueToDisplay="",this.isInitializing=!1,this.isResetting=!1,this.isNewValue=!1,this.focusedOption=null,this.isValueFocused=!1,this.isNoResultsFound=!1,this.handleSlotChange=()=>{setTimeout((()=>{this.initialize(),this.defineHostWidth()}),0)},this.initial={},this.uniqueId=`r-select-${Date.now().toString(32)}${Math.random().toString(32)}`.replace(/\./g,""),this.getValidityStateData=t=>{for(const e in t.validity)if(t.validity[e]){if(this.validityState=e,this[e+"Message"])return void(this.validityMessage=this[e+"Message"]);this.validityMessage=t.validationMessage}},this.validateFormElement=(t=null)=>{if(null===t)return;if(this.isNoValidate)return;if(this.error)return;this.getValidityStateData(t);const e="valid"===this.validityState;this.valid=e,this.invalid=!e,this.rValidate.emit({state:this.validityState,message:this.validityMessage})},this.typeaheadBuffer="",this.typeaheadTimeout=null,this.lastTypeaheadIndex=-1,this.contributeToFormData=t=>{a(this.nativeElement,t.formData)},this.onValueClick=t=>{var e;this.disabled||(t.preventDefault(),t.stopPropagation(),this.toggle(),this.isExpanded&&(this.combobox&&(null===(e=this.valueElement)||void 0===e||e.focus()),this.defineListboxPositionState()))},this.keyboardEventHandlerFactory=(t,e=!1)=>{switch(t){case"Enter":return()=>{var t;this.isExpanded?this.setValue((null===(t=this.focusedOption)||void 0===t?void 0:t.value)||""):(this.expand(),this.setOptionFocus(this.selectedElement))};case"Escape":return()=>{this.collapse(),this.reportValidity()};case"ArrowUp":return()=>{var t;this.isExpanded?this.focusedOption&&e?this.setValue((null===(t=this.focusedOption)||void 0===t?void 0:t.value)||""):(this.combobox||this.focusedOption!==this.optionElements[0])&&(this.focusedOption?this.focusPrevOption():this.setOptionFocus(this.selectedElement||this.optionElements[0])):(this.expand(),this.setOptionFocus(this.selectedElement||this.optionElements[this.combobox?this.optionElements.length-1:0]))};case"ArrowDown":return()=>{if(this.isExpanded)(this.combobox||this.focusedOption!==this.optionElements[this.optionElements.length-1])&&(this.focusedOption?this.focusNextOption():this.setOptionFocus(this.selectedElement||this.optionElements[0]));else{if(this.expand(),e)return;this.setOptionFocus(this.selectedElement||this.optionElements[0])}};case"Home":return()=>{if(!this.isExpanded)return this.expand(),void this.setOptionFocus(this.selectedElement||this.optionElements[0]);this.setOptionFocus(this.optionElements[0])};case"End":return()=>{if(!this.isExpanded)return this.expand(),void this.setOptionFocus(this.selectedElement||this.optionElements[this.optionElements.length-1]);this.setOptionFocus(this.optionElements[this.optionElements.length-1])};case"PageUp":return()=>{if(!this.isExpanded)return;if(null===this.focusedOption)return;const t=this.optionElementsArray.indexOf(this.focusedOption);-1!==t&&this.setOptionFocus(this.optionElements[t-10>=0?t-10:0])};case"PageDown":return()=>{if(!this.isExpanded)return;if(null===this.focusedOption)return;const t=this.optionElementsArray.indexOf(this.focusedOption);if(-1===t)return;const e=this.optionElements.length-1;this.setOptionFocus(this.optionElements[t+10<=e?t+10:e])};case"Tab":return()=>{var t;return this.setValue((null===(t=this.focusedOption)||void 0===t?void 0:t.value)||"")};default:return()=>{}}},this.onValueKeydown=t=>{if(t.stopPropagation(),["ArrowUp","ArrowDown","Home","End","PageUp","PageDown","Space","Enter","Escape"].includes(t.code))t.preventDefault();else if(1===t.key.length&&!t.ctrlKey&&!t.metaKey&&!t.altKey)return this.isExpanded||this.expand(),void this.handleTypeahead(t.key);switch(t.code){case"Space":this.keyboardEventHandlerFactory("Enter")();break;case"Tab":if(null===this.focusedOption)break;this.keyboardEventHandlerFactory("Tab")();break;default:this.keyboardEventHandlerFactory(t.code,t.altKey)()}},this.onComboboxKeydown=t=>{switch(t.stopPropagation(),["ArrowUp","ArrowDown","Home","End","PageUp","PageDown","Enter","Escape"].includes(t.code)&&t.preventDefault(),t.code){case"Tab":if(null===this.focusedOption){this.collapse();break}this.keyboardEventHandlerFactory("Tab")();break;case"Escape":if(this.isExpanded)return void this.keyboardEventHandlerFactory("Escape")();this.valueElement.value="",this.setValue(""),this.reportValidity();break;default:this.keyboardEventHandlerFactory(t.code,t.altKey)()}},this.onValueBlur=()=>{this.isValueFocused=!1;const{isBusy:t,isExpanded:e}=this;t||e||this.reportValidity()},this.onValueFocus=()=>{this.isValueFocused=!0},this.filterOptionsListByComboboxValue=(t="")=>{const e=Array.from(this.host.querySelectorAll('r-select-option:not([data-no-results="true"])'));e.forEach((e=>{var i,s;const r=-1!==(null===(s=null===(i=null==e?void 0:e.textContent)||void 0===i?void 0:i.trim())||void 0===s?void 0:s.toLowerCase()).search(t.toLowerCase());e.setAttribute("aria-hidden",`${!r}`)})),this.isNoResultsFound=e.every((t=>"true"===(null==t?void 0:t.getAttribute("aria-hidden")))),this.isNoResultsFound&&(this.statusElement.innerHTML=this.noResultsFound,setTimeout((()=>{this.statusElement.innerText=""}),1e3))},this.clearComboboxOptions=()=>{this.combobox&&this.filterOptionsListByComboboxValue()},this.onComboboxChange=t=>{this.filterOptionsListByComboboxValue(t.target.value)},this.onComboboxInput=t=>{this.filterOptionsListByComboboxValue(t.target.value),this.isExpanded||(this.expand(),this.defineListboxPositionState())},this.onSubmitForm=t=>{this.isNoValidate||(this.reportValidity(),this.invalid&&(t.preventDefault(),t.stopPropagation()))},this.onResetForm=()=>{this.resetValidation(),this.setValue(this.initial.value),this.rReset.emit({element:this.host,value:this.currentValue})},this.renderSelect=t=>{var e,s;return i("span",Object.assign({class:"r-select--value",role:"combobox"},t,{ref:t=>this.valueElement=t,onClick:this.isInteractive?this.onValueClick:null,onKeyDown:this.isInteractive?this.onValueKeydown:null,onBlur:this.isInteractive?this.onValueBlur:null,onFocus:this.isInteractive?this.onValueFocus:null}),i("span",{class:"r-select--value-display"},this.isLeadingSlotRendered?i("slot",{name:"leading"}):null,i("span",{class:"r-select--value-selected",innerHTML:(null===(s=null===(e=this.valueToDisplay)||void 0===e?void 0:e.trim)||void 0===s?void 0:s.call(e))||this.placeholder||""})),i("span",{class:"r-select--value-arrow"},i("r-icon",{class:"r-select--trailing-icon",name:"angle-down",size:"s"})))},this.renderCombobox=t=>{var e,s,r;return i("div",{class:"r-select--value",onClick:this.isInteractive?this.onValueClick:null,ref:t=>this.comboboxContainerElement=t},i("div",{class:"r-select--value-display"},this.isLeadingSlotRendered?i("slot",{name:"leading"}):null,i("input",Object.assign({role:"combobox",autocomplete:"off","aria-autocomplete":"list",disabled:this.disabled,readonly:this.readonly,type:"text"},t,{class:"r-select--input",ref:t=>this.valueElement=t,onKeyDown:this.isInteractive?this.onComboboxKeydown:null,onBlur:this.isInteractive?this.onValueBlur:null,onFocus:this.isInteractive?this.onValueFocus:null,onChange:this.isInteractive?this.onComboboxChange:null,onInput:this.isInteractive?this.onComboboxInput:null,placeholder:this.placeholder||"",value:(null===(r=null===(s=null===(e=this.selectedElement)||void 0===e?void 0:e.textContent)||void 0===s?void 0:s.trim)||void 0===r?void 0:r.call(s))||""}))),i("button",{"aria-label":this.toggleButtonAriaLabel,"aria-expanded":`${this.expanded||!1}`,"aria-controls":`${this.uniqueId}-list`,disabled:this.disabled,tabindex:"-1",class:"r-select--value-arrow-button r-select--value-arrow"},i("r-icon",{class:"r-select--trailing-icon",name:"angle-down",size:"s"})),i("div",{class:"visually-hidden",role:"status",ref:t=>this.statusElement=t}))}}async setReadonly(){this.collapse(),this.resetValidation(),this.isReadonly=!0}async clearReadonly(){this.isReadonly=!1}handleListboxPositionChange(){this.defineListboxPositionState()}handleExpandedChange(){this.expanded?this.expand():this.collapse()}handleReadonlyChange(){this.readonly?this.setReadonly():this.clearReadonly()}handleValueChange(t,e){this.isInitializing||(this.isNewValue=e!==t,this.isNewValue&&this.setValue(t))}optionSelectAction(t){t.stopPropagation(),this.disabled||this.setValue(t.target.value)}tooltipFocusAction(){this.collapse(),this.reportValidity()}onMouseup(t){this.isExpanded&&(t.stopPropagation(),this.host.contains(t.target)||(this.collapse(),this.reportValidity()))}onKeyup(t){this.isExpanded&&(t.stopPropagation(),this.host.contains(t.target)||(this.collapse(),this.reportValidity()))}handleScrolling(){this.isExpanded&&this.defineListboxPositionState()}handleResizing(){this.isExpanded&&this.defineListboxPositionState()}async setValue(t=""){this.resetValidation(),this._renderSelected(t,this.currentValue!==t),this.clearComboboxOptions()}async getValue(){return this.currentValue||""}async reset(){if(this.resetValidation(),this.collapse(),this.clearComboboxOptions(),this.currentValue!==this.initial.value){if(""!==this.initial.value&&this.initiallySelectedElement)return this.isResetting=!0,this.setValue(this.initial.value),void(this.isResetting=!1);this.deselectOptions(),this.currentValue="",this.valueToDisplay=""}}async resetValidation(){this.validityMessage=null,this.validityState=null,this.invalid=this.initial.invalid,this.valid=!this.invalid}async reportValidity(){return this.validateFormElement(this.nativeElement),"valid"===this.validityState}async setFocus(){var t;null===(t=this.valueElement)||void 0===t||t.focus()}async setBlur(){var t;null===(t=this.valueElement)||void 0===t||t.blur()}async expand(){this.isExpanded=!0}async collapse(){this.isExpanded=!1,this.isBusy||(this.clearOptionsFocus(),this.setComboboxValueOnCollapse())}async getFocusedOption(){return this.host.querySelector('r-select-option[data-focused="true"]')||null}async setFocusedOption(t){return this.setOptionFocus(this.optionElements[t])}clearOptionsFocus(){var t;this.focusedOption=null;try{this.valueElement.ariaActiveDescendantElement=null}catch(e){null===(t=this.valueElement)||void 0===t||t.removeAttribute("aria-activedescendant")}this.focusedOptions.forEach((t=>t.setBlur()))}setComboboxValueOnCollapse(){var t,e,i;this.combobox&&(this.valueElement.value=(null===(i=null===(e=null===(t=this.selectedElement)||void 0===t?void 0:t.textContent)||void 0===e?void 0:e.trim)||void 0===i?void 0:i.call(e))||"",this.clearComboboxOptions())}get focusedOptions(){return Array.from(this.host.querySelectorAll('r-select-option[data-focused="true"]'))}toggle(){this.isExpanded=!this.isExpanded}get selectedElement(){return this.host.querySelector(`r-select-option[value="${this.currentValue}"]`)}get initiallySelectedElement(){return this.host.querySelector(`r-select-option[value="${this.initial.value}"]`)||null}get parentFormEl(){return this.host.closest("form")||document.querySelector(`#${this.form}`)||null}get isNoValidate(){var t;return(null===(t=this.parentFormEl)||void 0===t?void 0:t.hasAttribute("novalidate"))||this.novalidate||!1}get optionElements(){return this.host.querySelectorAll('r-select-option:not([disabled]:not([disabled="false"])):not([aria-hidden="true"])')||null}get optionElementsArray(){return Array.from(this.optionElements)}deselectOptions(){this.optionElements&&this.optionElements.forEach((t=>t.clearSelected()))}get isBusy(){return this.isInitializing||this.isResetting}_renderSelected(t="",e=!0){var i,s;this.currentValue=t,null===this.currentValue?this.host.removeAttribute("value"):this.host.setAttribute("value",this.currentValue);const r=this.host.querySelector(`r-select-option[value="${null===(i=this.currentValue)||void 0===i?void 0:i.trim()}"]`);this.valueToDisplay=(null==r?void 0:r.innerHTML)||(null==r?void 0:r.textContent)||this.currentValue||"",null===(s=this.optionElements)||void 0===s||s.forEach((e=>{e.value===t?e.setSelected():e.clearSelected()})),this._renderNativeOption(),this.isExpanded&&this.collapse(),this.isBusy||this.reportValidity(),e&&this.rChange.emit({element:this.host,value:t})}setOptionFocus(t=this.selectedElement){t&&null!==this.optionElements&&requestAnimationFrame((()=>{var e;this.clearOptionsFocus(),t.setFocus(),this.focusedOption=t;try{this.valueElement.ariaActiveDescendantElement=t}catch(i){null===(e=this.valueElement)||void 0===e||e.setAttribute("aria-activedescendant",t.id)}((t,e)=>{var i,s;if(!e)return;try{null===(i=t.scrollIntoView)||void 0===i||i.call(t,{block:"nearest",inline:"nearest"})}catch(e){null===(s=t.scrollIntoView)||void 0===s||s.call(t,!1)}const r=t.getBoundingClientRect(),a=e.getBoundingClientRect();(r.top<a.top||r.bottom>a.bottom)&&((t,e)=>{const i=t.offsetTop,s=i+t.offsetHeight,r=e.scrollTop,a=r+e.clientHeight;i<r?e.scrollTop=i:s>a&&(e.scrollTop=s-e.clientHeight)})(t,e)})(t,this.listboxElement)}))}focusPrevOption(t=this.focusedOption||this.selectedElement){if(null===this.optionElements)return;const e=this.optionElementsArray.indexOf(t)-1;this.setOptionFocus(e>=0?this.optionElements[e]:this.optionElements[this.optionElements.length-1])}focusNextOption(t=this.focusedOption||this.selectedElement){if(null===this.optionElements)return;const e=this.optionElementsArray.indexOf(t)+1;this.setOptionFocus(e<=this.optionElements.length-1?this.optionElements[e]:this.optionElements[0])}filterOptions(t,e){if(!e)return[];const i=e.toLowerCase();return t.filter((t=>!t.disabled&&(t.textContent||"").trim().toLowerCase().startsWith(i)))}getIndexByLetter(t,e,i=0){if(!t.length||!e)return-1;const s=[...t.slice(i),...t.slice(0,i)],r=this.filterOptions(s,e).sort(((t,e)=>(t.textContent||"").trim().toLowerCase().localeCompare((e.textContent||"").trim().toLowerCase()))),a=e.split("").every((t=>t===e[0]));if(r[0])return t.indexOf(r[0]);if(a){const i=this.filterOptions(s,e[0]);return i[0]?t.indexOf(i[0]):-1}return-1}handleTypeahead(t){clearTimeout(this.typeaheadTimeout);const e=this.optionElementsArray;let i;if(this.typeaheadBuffer+=t.toLowerCase(),this.typeaheadBuffer.split("").every((t=>t===this.typeaheadBuffer[0]))&&-1!==this.lastTypeaheadIndex)i=(this.lastTypeaheadIndex+1)%e.length;else{const t=e.indexOf(this.focusedOption||this.selectedElement);i=-1===t?0:(t+1)%e.length}const s=this.getIndexByLetter(e,this.typeaheadBuffer,i);if(-1!==s){this.lastTypeaheadIndex=s;const t=e[s];this.isExpanded||this.expand(),this.setOptionFocus(t)}this.typeaheadTimeout=setTimeout((()=>{this.typeaheadBuffer=""}),500)}connectFormEventListeners(){this.parentFormEl&&(this.parentFormEl.addEventListener("formdata",this.contributeToFormData),this.parentFormEl.addEventListener("submit",this.onSubmitForm,{capture:!0}),this.parentFormEl.addEventListener("reset",this.onResetForm))}disconnectFormEventListeners(){this.parentFormEl&&(this.parentFormEl.removeEventListener("formdata",this.contributeToFormData),this.parentFormEl.removeEventListener("submit",this.onSubmitForm),this.parentFormEl.removeEventListener("reset",this.onResetForm))}defineHostWidth(){if(this.fullWidth)return;const t=this.host.shadowRoot.querySelector(".r-select--native").getBoundingClientRect().width,e=(this.combobox?this.comboboxContainerElement:this.valueElement).getBoundingClientRect().width,i=this.listboxElement.getBoundingClientRect().width,s=Math.max(t,e,i);this.host.style.setProperty("--width",`${s}px`)}_renderNativeOption(){var t,e,i,s,r;const a=document.createElement("option"),l=document.createTextNode(null===(i=null===(e=null===(t=this.selectedElement)||void 0===t?void 0:t.textContent)||void 0===e?void 0:e.trim)||void 0===i?void 0:i.call(e));a.value=this.currentValue,a.selected=!0,a.appendChild(l),this.nativeElement&&(this.nativeElement.innerHTML="",null===(s=this.nativeElement)||void 0===s||s.appendChild(a),this.nativeElement.value=this.currentValue,null===(r=this.nativeElement)||void 0===r||r.setAttribute("value",this.currentValue))}notVisible(t){return"visible"!==getComputedStyle(t).overflow}findOverflowParent(t){var e,i;return(null===(e=t.parentNode)||void 0===e?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE?this.findOverflowParent(null===(i=t.parentNode)||void 0===i?void 0:i.host):this.notVisible(t)?t:t.parentElement?this.findOverflowParent(t.parentElement):null}get ariaDescribedBy(){const t=`${this.uniqueId}-message`;return this.hint?`${this.uniqueId}-hint ${t}`:t}get overflowedParent(){return this.findOverflowParent(this.host.parentElement)}get top(){var t,e;return this.overflowedParent?Math.abs(this.overflowedParent.getBoundingClientRect().top-(null===(e=this.valueElement)||void 0===e?void 0:e.getBoundingClientRect().top)):null===(t=this.valueElement)||void 0===t?void 0:t.getBoundingClientRect().top}get bottom(){var t;function e(t){return window.innerHeight-t.getBoundingClientRect().top-t.getBoundingClientRect().height}const i=window.getComputedStyle(this.messageContainer),s=(null===(t=this.messageContainer)||void 0===t?void 0:t.getBoundingClientRect().height)+parseFloat(i.marginTop),r=e(this.host)+s;return this.overflowedParent?Math.abs(e(this.overflowedParent)-r):r+s}defineListboxPositionState(){var t,e;const i=(null===(t=this.listboxElement)||void 0===t?void 0:t.offsetHeight)<this.bottom,s=(null===(e=this.listboxElement)||void 0===e?void 0:e.offsetHeight)<this.top;if("top"===this.listboxPosition&&(s||!i)||"bottom"===this.listboxPosition&&(i||!s))this.listboxPositionState=this.listboxPosition;else switch(this.listboxPosition){case"top":this.listboxPositionState=s?"top":"bottom";break;case"bottom":this.listboxPositionState=i?"bottom":"top"}}initialize(){var t;const e=this.value||"";if(this.initial.value=this.value||"",this.initial.invalid=this.invalid||!1,this.listboxPositionState=this.listboxPosition,this.optionElementsArray.find((t=>t.value.trim()===e)))return this.isInitializing=!0,this.setValue(e),void(this.isInitializing=!1);if(this.placeholder)return;if(this.combobox)return;const i=null===(t=this.optionElements)||void 0===t?void 0:t[0];i&&(this.isInitializing=!0,this.setValue(null==i?void 0:i.value),this.isInitializing=!1)}initializeStyleObserver(){!this.listboxWidthObserver&&this.listboxElement&&(this.listboxWidthObserver=new l((()=>{this.listboxElement&&(this.listboxElement.getBoundingClientRect().width<=this.host.getBoundingClientRect().width||this.defineHostWidth())})),this.listboxWidthObserver.observe([this.listboxElement],["width"]))}get hasError(){var t;return this.invalid&&(null===(t=this.error)||void 0===t?void 0:t.length)>0}get hasValidationError(){var t;return"valid"!==this.validityState&&(null===(t=this.validityMessage)||void 0===t?void 0:t.length)>0}get hasValidationSuccess(){return this.valid&&this.validMessage&&this.showValid}get hasMessage(){return this.hasError||this.hasValidationError||this.hasValidationSuccess}get isInteractive(){return!this.disabled&&!this.isReadonly}get hasLeadingSlot(){return!!this.host.querySelector('[slot="leading"]')}get hasOptionIcon(){return!!this.optionElementsArray.find((t=>!!t.querySelector('[slot="icon"]')))}get isLeadingSlotRendered(){return this.hasLeadingSlot&&this.hasOptionIcon&&!this.currentValue}get isPlaceholder(){var t,e;const{placeholder:i}=this;return((null===(e=null===(t=this.valueToDisplay)||void 0===t?void 0:t.trim)||void 0===e?void 0:e.call(t))||i||"")===i}connectedCallback(){this.connectFormEventListeners()}disconnectedCallback(){this.disconnectFormEventListeners()}componentWillLoad(){this.isExpanded=this.expanded,this.isReadonly=this.readonly}componentDidLoad(){this.defineListboxPositionState(),this.initializeStyleObserver()}render(){var t;const{uniqueId:e,disabled:r,isExpanded:a,fieldIndicator:l,invalid:o,placeholder:n,required:h,hint:c,label:d,internal:v,tooltip:u,tooltipIcon:p,tooltipIconColor:f}=this,b=d?Object.assign({fieldIndicator:l},u&&!r?{tooltip:u,"tooltip-icon":p,"tooltip-icon-color":f}:{}):{},g=!!this.isInteractive&&!!h,m={id:`${e}-value`,tabindex:""+(r?-1:0),"aria-controls":`${e}-list`,"aria-describedby":this.ariaDescribedBy,"aria-disabled":`${r||!1}`,"aria-expanded":`${a||!1}`,"aria-invalid":`${o||!1}`,"aria-readonly":`${!this.isInteractive||!1}`,"aria-required":`${g}`,"aria-labelledby":`${e}-label`},y={"aria-label":d},w={placeholder:n,name:this.name,value:this.currentValue,"aria-hidden":"true",tabindex:"-1",invalid:o,disabled:r,required:g};return i(s,{key:"aca9ddac308a41221f08de7fde92f45fcd89162f","data-value":this.currentValue,expanded:!this.disabled&&this.isExpanded,"data-listbox-position":this.listboxPositionState,"data-initial-value":this.initial.value,"data-is-placeholder":`${!!this.isPlaceholder}`,"data-value-focused":`${!!this.isValueFocused}`,"data-option-focused":`${!!this.focusedOption}`,"data-validity-state":`${this.validityState||""}`,"data-validity-message":`${this.validityMessage||""}`,"data-readonly":`${!!this.isReadonly}`},i("div",{key:"34c00c70c0b73cdd7afdcd65f175a94e82c900d2",class:"r-select--label "+(v?"":"r-select--label__margin-bottom")},i("div",{key:"5a2b30341687b152eb17c2fc5ca2f65b1fda886f",class:v?"visually-hidden":"r-select--label-container"},i("label",{key:"10021c02cfe8a697ee3a0e452e0052044f2b80a7",id:`${e}-label`,onClick:this.isInteractive?this.onValueClick:null},i("r-label",Object.assign({key:"cc7173f5b427c9fca7e08a12552227d3f20ad64c"},b),d)),i("slot",{key:"625e1bd9f1fa11950ff75e1875e03510f55022c0",name:"popover"})),c&&i("r-hint",{key:"6d22db79a4375ddd901f5ea6b25d9c456e8f1ab2",id:`${e}-hint`,class:"r-select--hint"},c)),i("div",{key:"a243a731bdd150386ea47ad0897831b37eed6621",class:"r-select"},i("select",Object.assign({key:"e1878ed06636fad3768d8b4b1f4a944d30730346",class:"r-select--native",ref:t=>this.nativeElement=t},w)),i("div",{key:"b47cd423033129e827a99f8fcff39173f4c74ed9",class:"r-select--container"},this.combobox?this.renderCombobox(m):this.renderSelect(m),i("div",Object.assign({key:"04db58929d97226614d344f7f419c3e8aa7e250d",role:"listbox",tabindex:"-1",id:`${e}-list`,class:"r-select--options",ref:t=>this.listboxElement=t},y),(this.isNoResultsFound||!(null===(t=this.optionElements)||void 0===t?void 0:t.length))&&i("r-select-option",{key:"b23380c2c75c33e6a8a99737189c43400e29940b","data-no-results":"true",value:"no_results"},this.noResultsFound),i("slot",{key:"83e215daafbd8909f9788e8918691b08417a5f2d",onSlotchange:this.handleSlotChange})))),i("div",{key:"57acdd7994fa67813e60641493e99f29afafcaf4",id:`${e}-message`,"aria-live":"polite","aria-atomic":"true",ref:t=>this.messageContainer=t,class:this.hasMessage&&!v?"r-select--message":"visually-hidden"},this.hasMessage&&i("r-hint",{key:"f14bc3026b6bee74b1192f37af64381958c0c87b",variant:this.invalid?"error":"success"},this.hasError&&this.error,this.hasValidationError&&this.validityMessage,this.hasValidationSuccess&&this.validMessage)))}get host(){return r(this)}static get watchers(){return{listboxPosition:["handleListboxPositionChange"],expanded:["handleExpandedChange"],readonly:["handleReadonlyChange"],value:["handleValueChange"]}}};o.style=":host{display:inline-flex;flex-direction:column;width:var(--width, auto);transition:width 0.2s ease-out;max-width:none;opacity:1;outline:none}:host slot{display:contents}:host(:hover:not([disabled]:not([disabled=false]))){--r-select--container--background-color:var(--r-background-interactive-hovered, rgba(40, 40, 40, 0.04))}:host([expanded]:not([expanded=false])){--r-select--options--visibility:visible;--r-select--options--z-index:1;--r-select--background-color:var(--r-background-interactive-softest, #fff);--r-select--value--border-color:var(--r-border-soft, #686868);--r-select--value--background-color:var(--r-background-interactive-softest, #fff);--r-select--trailing-icon--transform:rotate(180deg)}:host([invalid]:not([invalid=false])){--r-select--container--background-color:var(--r-status-error-soft, #fef6f6);--r-select--value--border-color:var(--r-status-error-regular, #da1e28);--r-select--options--border-color:var(--r-status-error-regular, #da1e28)}:host([disabled]:not([disabled=false])){--r-select--opacity:0.4;--r-select--pointer-events:none;--r-select--cursor:not-allowed}:host([data-is-placeholder=true]){--r-select--value-diplay--color:var(--r-text-soft, #686868)}:host([data-max-width=set]){width:100%;--r-select--options--right:0}:host([full-width]){width:100%}:host([data-listbox-position=top]){--r-select--options--top:auto;--r-select--options--bottom:2.875em;--r-select--options--border-width:1px 1px 0 1px}:host([data-listbox-position=bottom]){--r-select--options--top:100%;--r-select--options--bottom:auto;--r-select--options--border-width:0 1px 1px 1px}:host([data-readonly=true]){--r-select--color:var(--r-text-soft, #686868);--r-select--value--background-color:var(--r-background-soft, #f3f1f0);--r-select--value--border-color:transparent transparent var(--r-border-soft, #686868) transparent;--r-select--value--cursor:text;--r-select--value-arrow--visiblility:hidden}.r-select{display:var(--r-select--display, flex);flex-grow:var(--r-select--flex-grow, 1);flex-direction:var(--r-select--flex-direction, column);position:var(--r-select--position, relative);box-sizing:var(--r-select--box-sizing, border-box);max-width:var(--r-select--max-width, 100%);min-width:var(--r-select--min-width, fit-content);font-family:var(--r-select--font-family, var(--r-font-family-text, system-ui));font-weight:var(--r-select--font-weight, var(--r-font-weight-regular, 400));font-size:var(--r-select--font-size, var(--r-font-size-400, 1rem));text-align:var(--r-select--text-align, left);color:var(--r-select--color, var(--r-text-regular, #282828));opacity:var(--r-select--opacity, 1);pointer-events:var(--r-select--pointer-events, auto);cursor:var(--r-select--cursor, pointer)}.r-select--label__margin-bottom{margin-bottom:var(--r-select--label--margin-bottom, var(--r-spacing-025, 0.25rem))}.r-select--label-container{display:var(--r-select--label-container--display, flex);gap:var(--r-select--label-container--gap, var(--r-spacing-100, 1rem));align-items:var(--r-select--label-container--align-items, center);justify-content:var(--r-select--label-container--align-items, space-between)}.r-select--label-container ::slotted([slot=popover]){display:var(--r-select--popover--display, inline-flex);height:var(--r-select--popover--height, var(--r-spacing-150, 1.5));align-items:var(--r-select--popover--align-items, center);justify-content:var(--r-select--popover--justify-content, center);margin-right:var(--r-select--popover--margin-right, -0.25rem);--r-popover--trigger--min-width:var(--r-select--popover-trigger--min-width, var(--r-spacing-150, 1.5));--r-popover--trigger--min-height:var(--r-select--popover--trigger--min-height, var(--r-spacing-150, 1.5))}.r-select--trailing-icon{transform:var(--r-select--trailing-icon--transform, rotate(0deg));transition:var(--r-select--trailing-icon--transition, transform 0.15s)}.r-select ::slotted([name=leading]){display:var(--r-select--value--leading-icon--display, flex);align-items:var(--r-select--value--leading-icon--align-items, center);color:var(--r-select--value--leading-icon--color, var(--r-icon-soft, #686868))}.r-select--container{background-color:var(--r-select--container--background-color, var(--r-background-softest, #fff));opacity:var(--r-select--container--opacity, 1);pointer-events:var(--r-select--container--pointer-events, auto)}.r-select--input{height:var(--r-select--input--height, 100%);width:var(--r-select--input--width, 100%);border:var(--r-select--input--border, none);outline:var(--r-select--input--outline, none);background-color:var(--r-select--input--background-color, inherit);color:var(--r-select--input--color, inherit);font-family:var(--r-select--input--font-family, inherit);font-size:var(--r-select--input--font-size, inherit);font-weight:var(--r-select--input--font-weight, inherit);padding:var(--r-select--input--padding, 0)}.r-select--native{position:var(--r-select--native--position, fixed);top:var(--r-select--native--top, -100vh);z-index:var(--r-select--native--z-index, -1);opacity:var(--r-select--native--opacity, 0);font-size:var(--r-select--native--font-size, 1rem);padding:var(--r-select--native--padding, 0 calc(48px + 0.75em) 0 0.75em)}.r-select--value:not([aria-readonly=true]):not(:has(input:read-only)):not(:has(input:disabled)):active{--r-select--value--background-color:var(--r-background-interactive-pressed, rgba(40, 40, 40, 0.12))}.r-select--value[aria-disabled=false]:focus,.r-select--value:has(input:focus){outline:var(--r-select--value--outline, none);--r-select--value--z-index:2;--r-select--value--box-shadow:0 0 0 6px var(--r-border-focused-outlined, #fff);--r-select--value--outline:2px solid var(--r-border-focused, #0071e3);--r-select--value--outline-offset:2px}.r-select--value{position:var(--r-select--value--position, relative);display:var(--r-select--value--display, inline-grid);grid-template-columns:var(--r-select--value--grid-template-columns, 1fr 1.75rem);box-sizing:var(--r-select--value--box-sizing, border-box);align-items:var(--r-select--value--align-items, center);justify-content:var(--r-select--value--justify-content, space-between);text-align:var(--r-select--value--text-align, left);min-width:var(--r-select--value--min-width, 100%);min-height:var(--r-select--value--min-height, var(--r-spacing-275, 2.75rem));padding:var(--r-select--value--padding, 0);white-space:var(--r-select--value--white-space, nowrap);background-color:var(--r-select--value--background-color, transparent);border-width:var(--r-select--value--border-width, 1px);border-style:var(--r-select--value--border-style, solid);border-color:var(--r-select--value--border-color, var(--r-border-soft, #686868));box-shadow:var(--r-select--value--box-shadow, none);outline:var(--r-select--value--outline, none);outline-offset:var(--r-select--value--outline-offset, 0);z-index:var(--r-select--value--z-index, 0);cursor:var(--r-select--value--cursor, inherit)}.r-select--value-display{display:var(--r-select--value-diplay--display, flex);gap:var(--r-select--value-diplay--gap, 0.5em);align-items:var(--r-select--value-diplay--align-tems, center);flex:var(--r-select--value-diplay--flex, 1);padding:var(--r-select--value-diplay--padding, 0 0.75em);overflow:var(--r-select--value-diplay--overflow, hidden);text-overflow:var(--r-select--value-diplay--text-overflow, ellipsis);color:var(--r-select--value-diplay--color, inherit);min-width:var(--r-select--value-diplay--min-width, fit-content);height:var(--r-select--value-diplay--height, 100%)}.r-select--value-selected{display:var(--r-select--value-diplay--display, flex);gap:var(--r-select--value-diplay--gap, 0.75em);align-items:var(--r-select--value-diplay--align-items, center)}.r-select--value-arrow{display:var(--r-select--value-arrow--display, flex);align-items:var(--r-select--value-arrow--align-items, center);justify-content:var(--r-select--value-arrow--justify-content, center);padding:var(--r-select--value-arrow--padding, 0 0.75em 0 0);visibility:var(--r-select--value-arrow--visiblility, visible)}.r-select--value-arrow-button{height:var(--r-select--value-arrow-button--height, 100%);background-color:var(--r-select--value-arrow-button--background-color, transparent);color:var(--r-select--value-arrow-button--color, inherit);border:var(--r-select--value-arrow-button--border, none);outline:var(--r-select--value-arrow-button--outline, none);cursor:var(--r-select--value-arrow-button--cursor, inherit)}.r-select--options{visibility:var(--r-select--options--visibility, hidden);position:var(--r-select--options--position, absolute);top:var(--r-select--options--top, 100%);right:var(--r-select--options--right, 0);bottom:var(--r-select--options--bottom, auto);left:var(--r-select--options--left, 0);margin:var(--r-select--options--margin, 0);padding:var(--r-select--options--padding, 0);list-style:var(--r-select--options--list-style, none);max-height:var(--r-select--options--max-height, 14.375em);min-width:var(--r-select--options--min-width, fit-content);overflow-y:var(--r-select--options--overflow-y, auto);background-color:var(--r-select--options--background-color, var(--r-background-interactive-softest, #fff));border-style:var(--r-select--options--border-style, solid);border-color:var(--r-select--options--border-color, var(--r-border-soft, #686868));border-width:var(--r-select--options--border-width, 0 1px 1px 1px);z-index:var(--r-select--options--z-index, -1)}.r-select--message{margin-top:var(--r-select--message--margin-top, var(--r-spacing-025, 0.25rem))}.hidden{display:none}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}@media (prefers-reduced-motion){:host{transition:none}}";export{o as r_select}
@@ -0,0 +1 @@
1
+ import{r as t,h as e,H as r,g as s}from"./p-CTxpqopm.js";import{s as o,a}from"./p-B9rsR6cQ.js";import"./p-4Uv3PpKT.js";const i=class{constructor(e){t(this,e)}connectedCallback(){const t=this.host.closest("r-popover");o(this.host,t)}disconnectedCallback(){const t=this.host.closest("r-popover");a(this.host,t)}render(){return e(r,{key:"f878fb9ca3ffe1df00088bbd2fe1b6321130228a",slot:"headline"},e("slot",{key:"1a477943ab993f8960f3e77dd90a72a276bf4200"}))}get host(){return s(this)}};i.style=":host{margin:0;font-family:var(--r-font-family-heading);font-size:var(--r-font-size-500, 1.25rem);font-weight:var(--r-font-weight-light, 300);line-height:var(--r-line-height-s, 1.25)}";export{i as r_popover_headline}
@@ -1 +1 @@
1
- import{r,c as o,h as t,H as e,g as a}from"./p-CTxpqopm.js";const i=class{constructor(t){r(this,t),this.popoverOpenChange=o(this,"popoverOpenChange"),this.hidePopover=o(this,"hidePopover"),this.showPopover=o(this,"showPopover"),this.focusPopover=o(this,"focusPopover"),this.dismissMode="auto",this.triggerAction="toggle",this.vertical="bottom",this.horizontal="center",this.isOpen=!1,this._focusOnElement=r=>{var o,t;if(r){if("function"!=typeof r.setFocus)return null===(t=null==r?void 0:r.focus)||void 0===t||t.call(r),this.focusPopover.emit(),this;null===(o=null==r?void 0:r.setFocus)||void 0===o||o.call(r)}},this.uniqueId=`r-popover-${Date.now().toString(16)}${Math.random().toString(32)}`.replace(/\./g,""),this.onToggle=r=>{if("open"===r.newState)return this.isOpen=!0,requestAnimationFrame((()=>{this.renderPosition(),this.setFocus()})),this;this.isOpen=!1,requestAnimationFrame((()=>{this.setBlur(),this.triggerElement.focus()}))},this.onClickDismiss=()=>{this.hide()},this.onKeyDown=async r=>{if("Tab"===r.key){r.preventDefault();const o=r.target,t=await this._getFocusable(),e=t.indexOf(o);this._focusOnElement(r.shiftKey?e?t[e-1]:t[t.length-1]:e<t.length-1?t[e+1]:t[0])}}}async show(){this.isOpen=!0}async hide(){this.isOpen=!1}async toggle(){this.isOpen?this.hide():this.show()}async setFocus(){if(!this.isOpen)return this;const r=await this._getFocusable();return this._focusOnElement(r[0]),this}async _getFocusable(){const{dismissElement:r}=this,o=this.host.querySelector("r-popover-content"),t=this.host.querySelector("r-popover-action");return[r,...await o.getActiveElements(),...await t.getActiveElements()].filter((r=>void 0!==r))}async setBlur(){if(!this.isOpen)return this;const{dismissElement:r}=this,o=this.host.querySelector("r-popover-content"),t=this.host.querySelector("r-popover-action"),e=this.host.querySelector("r-popover-trigger");return null==r||r.setBlur(),null==o||o.setBlur(),null==t||t.setBlur(),null==e||e.setBlur(),this.host.blur(),this}handleOpenChange(){this.open?this.show():this.hide()}watchOpen(){var r,o,t,e,a,i,p,v,n,s;this.isOpen?(null===(o=null===(r=this.boardElement)||void 0===r?void 0:r.showPopover)||void 0===o||o.call(r),null===(e=null===(t=this.showPopover)||void 0===t?void 0:t.emit)||void 0===e||e.call(t)):(null===(i=null===(a=this.boardElement)||void 0===a?void 0:a.hidePopover)||void 0===i||i.call(a),null===(v=null===(p=this.hidePopover)||void 0===p?void 0:p.emit)||void 0===v||v.call(p)),null===(s=null===(n=this.popoverOpenChange)||void 0===n?void 0:n.emit)||void 0===s||s.call(n)}handlePreferredPositionChange(){this.renderPosition()}onKeyup(r){if(!this.isOpen)return this;"Escape"===r.key&&this.hide()}onResize(){this.isOpen&&this.renderPosition()}onScroll(){this.isOpen&&this.renderPosition()}get hasDismiss(){return"manual"===this.dismissMode}get triggerRect(){var r;return null===(r=this.triggerElement)||void 0===r?void 0:r.getBoundingClientRect()}get boardRect(){var r;return null===(r=this.boardElement)||void 0===r?void 0:r.getBoundingClientRect()}renderPosition(){if(!this.triggerRect)return this;const{triggerRect:r,boardRect:o,vertical:t,horizontal:e}=this,a=window.innerWidth,i=window.innerHeight;if(r.bottom<0||r.right<0||r.top>i||r.left>a)return this.hide(),this;this.host.setAttribute("style",`\n --r-popover--trigger--width: ${r.width}px;\n --r-popover--trigger--height: ${r.height}px;\n --r-popover--trigger--left: ${r.left}px;\n --r-popover--trigger--top: ${r.top}px;\n `);const p=r.top,v=a-r.right,n=i-r.bottom,s=r.left,h=r=>getComputedStyle(this.host).getPropertyValue(r),d=r=>r.includes("rem")?parseFloat(r)*parseFloat(getComputedStyle(document.documentElement).fontSize):parseFloat(r),l=d(h("--board--shift"))||0,c=d(h("--pointer--height"))||0,g=o.height+c;let b=o.width-r.width-l;const f=r=>Object.values(r).filter(Boolean).length>0,m=r=>Object.keys(r).find((o=>r[o])),u={vertical:{},horizontal:{}};u.vertical={top:p>=g,bottom:n>=g,middle:n>(o.height-r.height-c)/2&&p>(o.height-r.height)/2},!u.vertical.middle&&f(u.vertical)||(b=o.width+l),u.horizontal={left:s>=b,right:v>o.width-r.width-l,center:s>o.width/2&&v>o.width/2};let w="cover";u.vertical[t]?w=t:f(u.vertical)&&(w=m(u.vertical));let x="cover";if(u.horizontal[e]?x=e:f(u.horizontal)&&(x=m(u.horizontal)),"cover"===w){const r=this.triggerRect.top+this.triggerRect.height;if(r>this.boardRect.height){const o=r-this.boardRect.height;this.host.style.setProperty("--r-popover--board--top",`${o}px`),this.host.style.setProperty("--r-popover--pointer--top",this.triggerRect.top+this.triggerRect.height/2-c/2-o+"px")}}return this.host.setAttribute("data-vertical",w),this.host.setAttribute("data-horizontal",x),this}componentDidLoad(){this.open?this.show():this.hide()}render(){return t(e,{key:"97457cdfa24c287c9344d06431d8ec24b0f60f2c",id:this.uniqueId,"data-position":this.positionState,"data-open":`${this.isOpen}`,open:this.isOpen},t("div",{key:"5259a78e27f84a434690b6986d2b68a2cd86eae8",class:"r-popover"},t("button",{key:"a7a88bd38781fe32a65b0bcb0ebb248bd900d535",class:"r-popover--trigger","aria-label":this.triggerAriaLabel,ref:r=>this.triggerElement=r,popoverTarget:`${this.uniqueId}-board`,popoverTargetAction:this.triggerAction},t("slot",{key:"410a0acd97eb45f8b50e0e4f4ea55a5bfa2fc30a",name:"trigger"})),t("div",{key:"2bbf7b67e1bcd75f55df613a06e29bf1091437a5",class:"r-popover--board",id:`${this.uniqueId}-board`,popover:this.dismissMode,ref:r=>this.boardElement=r,onToggle:this.onToggle,onKeyDown:this.onKeyDown},this.hasDismiss&&t("r-icon-button",{key:"4123f71340a6faa796b502359748f7e50b8a7e2b",ref:r=>this.dismissElement=r,class:"r-popover--dismiss",name:"cross",onClick:this.onClickDismiss,label:this.dismissAriaLabel}),t("div",{key:"8d6d141a95e876c6b4b9b9f3b905745b185bceb3",class:"r-popover--board-content"},t("slot",{key:"26ac7820a39f25ef10d36bdc20e29e18470e9042",name:"headline"}),t("slot",{key:"64294c1c622c0bc74ca1c07513aabb6e5ece6aef",name:"content"}),t("slot",{key:"275addac9a634745f3cef561016a07588c5c13d5",name:"action"})),t("div",{key:"3b6008e840e72a5f504d6b3afdc04bd5e16660e8",class:"r-popover--board-pointer","aria-hidden":"true"},t("svg",{key:"92f668019fe87ec8c3ff0531358c214703501f2f",width:"16",height:"8",viewBox:"0 0 16 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t("path",{key:"a9c13600596604977bee488b7cc6ac9351278eac",d:"M8 8L0 0L16 0L8 8Z",fill:"currentColor"}))))))}get host(){return a(this)}static get watchers(){return{open:["handleOpenChange"],isOpen:["watchOpen"],horizontal:["handlePreferredPositionChange"],vertical:["handlePreferredPositionChange"]}}};i.style=":host{position:relative;overflow:visible;color:var(--r-text-inverse);font-family:var(--r-font-family-text, system-ui);font-weight:var(--r-font-weight-regular, 400);font-size:var(--r-font-size-400, 1rem);text-align:left;--board--shift:1rem;--board--min-width:304px;--board--max-width:504px;--board--max-height:320px;--pointer--width:1rem;--pointer--height:0.5rem;--pointer--spacer:0.25rem}:host slot{display:contents}:host([size=s]){--r-popover--board--max-width:375px}:host([size=l]){--r-popover--board--max-width:500px}:host([data-open=true]){--r-popover--pointer--display:block;--r-popover--board--visibility:visible;--r-popover--board--left:var(--r-popover--trigger--left);--r-popover--board--top:var(--r-popover--trigger--top)}:host([data-open=true]) ::slotted([slot=trigger]){--r-popover--trigger--display:none}:host([data-vertical=top]){--r-popover--pointer--top:100%;--r-popover--pointer--transform:rotate(0deg) translate(0,-1px)}:host([data-vertical=bottom]){--r-popover--pointer--bottom:100%;--r-popover--pointer--transform:rotate(180deg)}:host([data-vertical=middle]){--r-popover--pointer--top:calc(50% - var(--pointer--height)/2);--r-popover--pointer--bottom:auto}:host([data-horizontal=left]){--r-popover--board--left:calc(var(--r-popover--trigger--left, 0) + var(--r-popover--trigger--width, 0) + var(--board--shift));--r-popover--pointer--left:calc(100% - var(--r-popover--trigger--width, 0)/2 - var(--board--shift) - var(--pointer--width)/2)}:host([data-horizontal=right]){--r-popover--pointer--left:calc(var(--r-popover--trigger--width, 0)/2 + var(--pointer--width)/2)}:host([data-horizontal=center]){--r-popover--pointer--left:calc(50% - var(--pointer--width)/2)}:host([data-vertical=top][data-horizontal=left]){--r-popover--board--transform:translate(-100%, calc(-100% - var(--pointer--spacer) - var(--r-popover--pointer--height, var(--pointer--height))))}:host([data-vertical=top][data-horizontal=right]){--r-popover--board--transform:translate(calc(0px - var(--board--shift)), calc(-100% - var(--pointer--spacer) - var(--r-popover--pointer--height, var(--pointer--height))))}:host([data-vertical=top][data-horizontal=center]){--r-popover--board--transform:translate(calc(-50% + var(--r-popover--trigger--width, 0)/2), calc(-100% - var(--pointer--spacer) - var(--r-popover--pointer--height, var(--pointer--height))))}:host([data-vertical=top][data-horizontal=cover]){--r-popover--pointer--left:calc(var(--r-popover--trigger--left, 0) + var(--r-popover--trigger--width, 0)/2 - var(--r-popover--pointer--width, var(--pointer--width))/2);--r-popover--board--left:0;--r-popover--board--transform:translate(0, calc(-100% - var(--r-popover--pointer--height, var(--pointer--height))))}:host([data-vertical=middle][data-horizontal=left]){--r-popover--board--left:var(--r-popover--trigger--left, 0);--r-popover--board--transform:translate(calc(-100% - var(--pointer--height) - var(--pointer--spacer)), calc(-50% + var(--r-popover--trigger--height, 0)/2));--r-popover--pointer--left:100%;--r-popover--pointer--right:auto;--r-popover--pointer--transform:rotate(-90deg) translate(0, calc(0px - var(--pointer--spacer)))}:host([data-vertical=middle][data-horizontal=right]){--r-popover--board--left:calc(var(--r-popover--trigger--left, 0) + var(--r-popover--trigger--width, 0) + var(--pointer--height) + var(--pointer--spacer));--r-popover--board--transform:translate(0, calc(-50% + var(--r-popover--trigger--height, 0)/2));--r-popover--pointer--top:calc(50% - var(--pointer--height)/2);--r-popover--pointer--left:auto;--r-popover--pointer--right:100%;--r-popover--pointer--transform:rotate(90deg) translate(0, calc(0px - var(--pointer--spacer)))}:host([data-vertical=middle][data-horizontal=center]){--r-popover--pointer--display:none;--r-popover--board--transform:translate(calc(-50% + var(--r-popover--trigger--width, 0)/2), calc(-50% + var(--r-popover--trigger--height, 0)/2))}:host([data-vertical=middle][data-horizontal=cover]){--r-popover--pointer--display:none;--r-popover--board--left:0;--r-popover--board--transform:translate(0, calc(-50% + var(--r-popover--trigger--height, 0)/2))}:host([data-vertical=bottom][data-horizontal=left]){--r-popover--board--transform:translate(-100%, calc(var(--r-popover--trigger--height, 0) + var(--pointer--spacer) + var(--r-popover--pointer--height, var(--pointer--height))))}:host([data-vertical=bottom][data-horizontal=right]){--r-popover--board--transform:translate(calc(0px - var(--board--shift)), calc(var(--r-popover--trigger--height, 0) + var(--r-popover--pointer--height, var(--pointer--height)) + var(--pointer--spacer)))}:host([data-vertical=bottom][data-horizontal=center]){--r-popover--board--transform:translate(calc(-50% + var(--r-popover--trigger--width, 0)/2), calc(var(--r-popover--trigger--height, 0) + var(--pointer--spacer) + var(--r-popover--pointer--height, var(--pointer--height))))}:host([data-vertical=bottom][data-horizontal=cover]){--r-popover--pointer--left:calc(var(--r-popover--trigger--left, 0) + var(--r-popover--trigger--width, 0)/2 - var(--r-popover--pointer--width, var(--pointer--width))/2);--r-popover--board--left:0;--r-popover--board--transform:translate(0, calc(var(--r-popover--trigger--height, 0) + var(--r-popover--pointer--height, var(--pointer--height))))}:host([data-vertical=cover]){--r-popover--board--top:0;--r-popover--board--height:100%;--r-popover--board-content--height:100%;--r-popover--pointer--top:calc(var(--r-popover--trigger--top, 0) + var(--r-popover--trigger--height)/2 - var(--pointer--height)/2);--r-popover--pointer--bottom:auto}:host([data-vertical=cover][data-content-has-scroll=false]){--r-popover--board--top:var(--r-popover--trigger--top, 0)}:host([data-vertical=cover][data-horizontal=left]){--r-popover--board--left:var(--r-popover--trigger--left, 0);--r-popover--board--transform:translate(calc(-100% - var(--pointer--spacer) - var(--pointer--height)), 0);--r-popover--pointer--left:100%;--r-popover--pointer--right:auto;--r-popover--pointer--transform:rotate(-90deg) translate(0, calc(0px - var(--pointer--spacer)))}:host([data-vertical=cover][data-horizontal=right]){--r-popover--board--left:calc(var(--r-popover--trigger--left, 0) + var(--r-popover--trigger--width, 0) + var(--pointer--width));--r-popover--pointer--left:auto;--r-popover--pointer--right:100%;--r-popover--pointer--transform:rotate(90deg) translate(0, calc(0px - var(--pointer--spacer)))}:host([data-vertical=cover][data-horizontal=center]),:host([data-vertical=cover][data-horizontal=cover]){--r-popover--pointer--display:none;--r-popover--board--transform:translate(calc(-50% + var(--r-popover--trigger--width, 0)/2), 0)}:host([data-vertical=cover][data-horizontal=cover]){--r-popover--pointer--display:none;--r-popover--board--transform:none;--r-popover--board--height:100%;--r-popover--board--width:100%;--r-popover--board--left:0}:host([data-fixed-top=true]){--r-popover--board-container--height:var(--r-popover--trigger--top, var(--board--max-height))}:host([dismiss-mode=manual]){--r-popover--board-content--padding:1.5rem 3.5rem 1.5rem 1.5rem}.r-popover{position:var(--r-popover--position, relative);display:var(--r-popover--display, inline-flex)}.r-popover--dismiss{position:var(--r-popover--dismiss--position, absolute);top:var(--r-popover--dismiss--top, 20px);right:var(--r-popover--dismiss--right, 20px);color:var(--r-text-inverse)}.r-popover--trigger{border:var(--r-popover--trigger--border, none);background:var(--r-popover--trigger--background, none);padding:var(--r-popover--trigger--padding, 0);cursor:var(--r-popover--trigger--cursor, pointer);display:var(--r-popover--trigger--display, inline-flex);align-items:var(--r-popover--trigger--align-items, center);justify-content:var(--r-popover--trigger--justify-content, center);min-width:var(--r-popover--trigger--min-width, unset);min-height:var(--r-popover--trigger--min-height, unset)}.r-popover--trigger:focus{box-shadow:0 0 0 6px var(--r-border-focused-outlined, #fff);outline:2px solid var(--r-border-focused, #0071e3);outline-offset:2px}.r-popover--board{position:var(--r-popover--board--position, fixed);top:var(--r-popover--board--top, -1000em);right:var(--r-popover--board--right, auto);bottom:var(--r-popover--board--bottom, auto);left:var(--r-popover--board--left, -1000em);visibility:var(--r-popover--board--visibility, hidden);width:var(--r-popover--board--width, 100%);min-width:var(--r-popover--board--max-width, var(--board--min-width));max-width:var(--r-popover--board--max-width, var(--board--max-width));height:var(--r-popover--board--height, auto);max-height:var(--r-popover--board--max-height, var(--board--max-height));background-color:var(--r-popover--board--background-color, var(--r-background-inverse));color:var(--r-popover--board--color, var(--r-text-inverse));border:var(--r-popover--board--border, none);transform:var(--r-popover--board--transform, none);box-sizing:var(--r-popover--board--box-sizing, border-box);padding:var(--r-popover--board--padding, 0);margin:var(--r-popover--board--margin, 0);overflow:var(--r-popover--board--overflow, visible)}.r-popover--board-content{display:var(--r-popover--board-content--display, flex);flex-direction:var(--r-popover--board-content--flex-direction, column);gap:var(--r-popover--board-content--gap, 1.5rem);overflow:var(--r-popover--board-content--overflow, auto);height:var(--r-popover--board-content--height, auto);max-height:var(--r-popover--board-content--max-height, var(--board--max-height));padding:var(--r-popover--board-content--padding, 1.5rem);box-sizing:var(--r-popover--board-content--box-sizing, border-box)}.r-popover--board-pointer{display:var(--r-popover--pointer--display, flex);width:var(--r-popover--pointer--width, var(--pointer--width));height:var(--r-popover--pointer--height, var(--pointer--height));position:var(--r-popover--pointer--position, absolute);top:var(--r-popover--pointer--top, auto);right:var(--r-popover--pointer--right, auto);bottom:var(--r-popover--pointer--bottom, auto);left:var(--r-popover--pointer--left, auto);color:var(--r-popover--pointer--color, var(--r-background-inverse));transform:var(--r-popover--pointer--transform, none);transform-origin:var(--r-popover--pointer--transform-origin, center)}.r-popover--board-pointer>svg{display:flex}";export{i as r_popover}
1
+ import{r,c as o,h as t,H as e,g as a}from"./p-CTxpqopm.js";const i=class{constructor(t){r(this,t),this.popoverOpenChange=o(this,"popoverOpenChange"),this.hidePopover=o(this,"hidePopover"),this.showPopover=o(this,"showPopover"),this.focusPopover=o(this,"focusPopover"),this.dismissMode="auto",this.triggerAction="toggle",this.vertical="bottom",this.horizontal="center",this.isOpen=!1,this._focusOnElement=r=>{var o,t;if(r){if("function"!=typeof r.setFocus)return null===(t=null==r?void 0:r.focus)||void 0===t||t.call(r),this.focusPopover.emit(),this;null===(o=null==r?void 0:r.setFocus)||void 0===o||o.call(r)}},this.uniqueId=`r-popover-${Date.now().toString(16)}${Math.random().toString(32)}`.replace(/\./g,""),this.onToggle=r=>{if("open"===r.newState)return this.isOpen=!0,requestAnimationFrame((()=>{this.renderPosition(),this.setFocus()})),this;this.isOpen=!1,requestAnimationFrame((()=>{this.setBlur(),this.triggerElement.focus()}))},this.onClickDismiss=()=>{this.hide()},this.onKeyDown=async r=>{if("Tab"===r.key){r.preventDefault();const o=r.target,t=await this._getFocusable(),e=t.indexOf(o);this._focusOnElement(r.shiftKey?e?t[e-1]:t[t.length-1]:e<t.length-1?t[e+1]:t[0])}}}async show(){this.isOpen=!0}async hide(){this.isOpen=!1}async toggle(){this.isOpen?this.hide():this.show()}async setFocus(){if(!this.isOpen)return this;const r=await this._getFocusable();return this._focusOnElement(r[0]),this}async _getFocusable(){const{dismissElement:r}=this,o=this.host.querySelector("r-popover-content"),t=this.host.querySelector("r-popover-action");return[r,...await o.getActiveElements(),...await t.getActiveElements()].filter((r=>void 0!==r))}async setBlur(){if(!this.isOpen)return this;const{dismissElement:r}=this,o=this.host.querySelector("r-popover-content"),t=this.host.querySelector("r-popover-action"),e=this.host.querySelector("r-popover-trigger");return null==r||r.setBlur(),null==o||o.setBlur(),null==t||t.setBlur(),null==e||e.setBlur(),this.host.blur(),this}handleOpenChange(){this.open?this.show():this.hide()}watchOpen(){var r,o,t,e,a,i,p,v,n,s;this.isOpen?(null===(o=null===(r=this.boardElement)||void 0===r?void 0:r.showPopover)||void 0===o||o.call(r),null===(e=null===(t=this.showPopover)||void 0===t?void 0:t.emit)||void 0===e||e.call(t)):(null===(i=null===(a=this.boardElement)||void 0===a?void 0:a.hidePopover)||void 0===i||i.call(a),null===(v=null===(p=this.hidePopover)||void 0===p?void 0:p.emit)||void 0===v||v.call(p)),null===(s=null===(n=this.popoverOpenChange)||void 0===n?void 0:n.emit)||void 0===s||s.call(n)}handlePreferredPositionChange(){this.renderPosition()}onKeyup(r){if(!this.isOpen)return this;"Escape"===r.key&&this.hide()}onResize(){this.isOpen&&this.renderPosition()}onScroll(){this.isOpen&&this.renderPosition()}get hasDismiss(){return"manual"===this.dismissMode}get triggerRect(){var r;return null===(r=this.triggerElement)||void 0===r?void 0:r.getBoundingClientRect()}get boardRect(){var r;return null===(r=this.boardElement)||void 0===r?void 0:r.getBoundingClientRect()}renderPosition(){if(!this.triggerRect)return this;const{triggerRect:r,boardRect:o,vertical:t,horizontal:e}=this,a=window.innerWidth,i=window.innerHeight;if(r.bottom<0||r.right<0||r.top>i||r.left>a)return this.hide(),this;this.host.setAttribute("style",`\n --r-popover--trigger--width: ${r.width}px;\n --r-popover--trigger--height: ${r.height}px;\n --r-popover--trigger--left: ${r.left}px;\n --r-popover--trigger--top: ${r.top}px;\n `);const p=r.top,v=a-r.right,n=i-r.bottom,s=r.left,h=r=>getComputedStyle(this.host).getPropertyValue(r),d=r=>r.includes("rem")?parseFloat(r)*parseFloat(getComputedStyle(document.documentElement).fontSize):parseFloat(r),l=d(h("--board--shift"))||0,c=d(h("--pointer--height"))||0,g=o.height+c;let b=o.width-r.width-l;const f=r=>Object.values(r).filter(Boolean).length>0,m=r=>Object.keys(r).find((o=>r[o])),u={vertical:{},horizontal:{}};u.vertical={top:p>=g,bottom:n>=g,middle:n>(o.height-r.height-c)/2&&p>(o.height-r.height)/2},!u.vertical.middle&&f(u.vertical)||(b=o.width+l),u.horizontal={left:s>=b,right:v>o.width-r.width-l,center:s>o.width/2&&v>o.width/2};let w="cover";u.vertical[t]?w=t:f(u.vertical)&&(w=m(u.vertical));let x="cover";if(u.horizontal[e]?x=e:f(u.horizontal)&&(x=m(u.horizontal)),"cover"===w){const r=this.triggerRect.top+this.triggerRect.height;if(r>this.boardRect.height){const o=r-this.boardRect.height;this.host.style.setProperty("--r-popover--board--top",`${o}px`),this.host.style.setProperty("--r-popover--pointer--top",this.triggerRect.top+this.triggerRect.height/2-c/2-o+"px")}}return this.host.setAttribute("data-vertical",w),this.host.setAttribute("data-horizontal",x),this}componentDidLoad(){this.open?this.show():this.hide()}render(){return t(e,{key:"da45eae6a21cc01596344d33afc5def4da57967f",id:this.uniqueId,"data-position":this.positionState,"data-open":`${this.isOpen}`,open:this.isOpen},t("div",{key:"ad832de894e0af250cc93bdf3158032bc252740f",class:"r-popover"},t("button",{key:"28c4938bb02cb7c4eaed074178dda00c2c39a0b7",class:"r-popover--trigger","aria-label":this.triggerAriaLabel,ref:r=>this.triggerElement=r,popoverTarget:`${this.uniqueId}-board`,popoverTargetAction:this.triggerAction},t("slot",{key:"0a74ac9d6a7ecdba54771e733f8db5af1709e7fb",name:"trigger"})),t("div",{key:"dbdb43df6a9823f5d8c954146347f40438bbf053",class:"r-popover--board",id:`${this.uniqueId}-board`,popover:this.dismissMode,ref:r=>this.boardElement=r,onToggle:this.onToggle,onKeyDown:this.onKeyDown},this.hasDismiss&&t("r-icon-button",{key:"99cb4c1c050cdf197346ef84f7c610f5f6ed0b4c",ref:r=>this.dismissElement=r,class:"r-popover--dismiss",name:"cross",onClick:this.onClickDismiss,label:this.dismissAriaLabel}),t("div",{key:"fe7e18bd38a4f3879aada14169bfa50f84cd2eac",class:"r-popover--board-content"},t("slot",{key:"b5674f8f2f72340cf5af712f513a20bda9e04b47",name:"headline"}),t("slot",{key:"024ce9cc17f041df172d853176d09f4ec493df20",name:"content"}),t("slot",{key:"437ca7707856b7c6db59240d7b4378c74dc8fda8",name:"action"})),t("div",{key:"93184bd493520dbea03c7c63bbfe8c4ae788cde3",class:"r-popover--board-pointer","aria-hidden":"true"},t("svg",{key:"779d8b7df8f92ea14517ce9ce5099a73a4fdeac8",width:"16",height:"8",viewBox:"0 0 16 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t("path",{key:"53b9fee3e6a34cf184d8818ac272122f04193ff6",d:"M8 8L0 0L16 0L8 8Z",fill:"currentColor"}))))))}get host(){return a(this)}static get watchers(){return{open:["handleOpenChange"],isOpen:["watchOpen"],horizontal:["handlePreferredPositionChange"],vertical:["handlePreferredPositionChange"]}}};i.style=":host{position:relative;overflow:visible;color:var(--r-text-inverse);font-family:var(--r-font-family-text, system-ui);font-weight:var(--r-font-weight-regular, 400);font-size:var(--r-font-size-400, 1rem);text-align:left;--board--shift:1rem;--board--min-width:304px;--board--max-width:504px;--board--max-height:320px;--pointer--width:1rem;--pointer--height:0.5rem;--pointer--spacer:0.25rem}:host slot{display:contents}:host([size=s]){--r-popover--board--max-width:375px}:host([size=l]){--r-popover--board--max-width:500px}:host([data-open=true]){--r-popover--pointer--display:block;--r-popover--board--visibility:visible;--r-popover--board--left:var(--r-popover--trigger--left);--r-popover--board--top:var(--r-popover--trigger--top)}:host([data-open=true]) ::slotted([slot=trigger]){--r-popover--trigger--display:none}:host([data-vertical=top]){--r-popover--pointer--top:100%;--r-popover--pointer--transform:rotate(0deg) translate(0,-1px)}:host([data-vertical=bottom]){--r-popover--pointer--bottom:100%;--r-popover--pointer--transform:rotate(180deg)}:host([data-vertical=middle]){--r-popover--pointer--top:calc(50% - var(--pointer--height)/2);--r-popover--pointer--bottom:auto}:host([data-horizontal=left]){--r-popover--board--left:calc(var(--r-popover--trigger--left, 0) + var(--r-popover--trigger--width, 0) + var(--board--shift));--r-popover--pointer--left:calc(100% - var(--r-popover--trigger--width, 0)/2 - var(--board--shift) - var(--pointer--width)/2)}:host([data-horizontal=right]){--r-popover--pointer--left:calc(var(--r-popover--trigger--width, 0)/2 + var(--pointer--width)/2)}:host([data-horizontal=center]){--r-popover--pointer--left:calc(50% - var(--pointer--width)/2)}:host([data-vertical=top][data-horizontal=left]){--r-popover--board--transform:translate(-100%, calc(-100% - var(--pointer--spacer) - var(--r-popover--pointer--height, var(--pointer--height))))}:host([data-vertical=top][data-horizontal=right]){--r-popover--board--transform:translate(calc(0px - var(--board--shift)), calc(-100% - var(--pointer--spacer) - var(--r-popover--pointer--height, var(--pointer--height))))}:host([data-vertical=top][data-horizontal=center]){--r-popover--board--transform:translate(calc(-50% + var(--r-popover--trigger--width, 0)/2), calc(-100% - var(--pointer--spacer) - var(--r-popover--pointer--height, var(--pointer--height))))}:host([data-vertical=top][data-horizontal=cover]){--r-popover--pointer--left:calc(var(--r-popover--trigger--left, 0) + var(--r-popover--trigger--width, 0)/2 - var(--r-popover--pointer--width, var(--pointer--width))/2);--r-popover--board--left:0;--r-popover--board--transform:translate(0, calc(-100% - var(--r-popover--pointer--height, var(--pointer--height))))}:host([data-vertical=middle][data-horizontal=left]){--r-popover--board--left:var(--r-popover--trigger--left, 0);--r-popover--board--transform:translate(calc(-100% - var(--pointer--height) - var(--pointer--spacer)), calc(-50% + var(--r-popover--trigger--height, 0)/2));--r-popover--pointer--left:100%;--r-popover--pointer--right:auto;--r-popover--pointer--transform:rotate(-90deg) translate(0, calc(0px - var(--pointer--spacer)))}:host([data-vertical=middle][data-horizontal=right]){--r-popover--board--left:calc(var(--r-popover--trigger--left, 0) + var(--r-popover--trigger--width, 0) + var(--pointer--height) + var(--pointer--spacer));--r-popover--board--transform:translate(0, calc(-50% + var(--r-popover--trigger--height, 0)/2));--r-popover--pointer--top:calc(50% - var(--pointer--height)/2);--r-popover--pointer--left:auto;--r-popover--pointer--right:100%;--r-popover--pointer--transform:rotate(90deg) translate(0, calc(0px - var(--pointer--spacer)))}:host([data-vertical=middle][data-horizontal=center]){--r-popover--pointer--display:none;--r-popover--board--transform:translate(calc(-50% + var(--r-popover--trigger--width, 0)/2), calc(-50% + var(--r-popover--trigger--height, 0)/2))}:host([data-vertical=middle][data-horizontal=cover]){--r-popover--pointer--display:none;--r-popover--board--left:0;--r-popover--board--transform:translate(0, calc(-50% + var(--r-popover--trigger--height, 0)/2))}:host([data-vertical=bottom][data-horizontal=left]){--r-popover--board--transform:translate(-100%, calc(var(--r-popover--trigger--height, 0) + var(--pointer--spacer) + var(--r-popover--pointer--height, var(--pointer--height))))}:host([data-vertical=bottom][data-horizontal=right]){--r-popover--board--transform:translate(calc(0px - var(--board--shift)), calc(var(--r-popover--trigger--height, 0) + var(--r-popover--pointer--height, var(--pointer--height)) + var(--pointer--spacer)))}:host([data-vertical=bottom][data-horizontal=center]){--r-popover--board--transform:translate(calc(-50% + var(--r-popover--trigger--width, 0)/2), calc(var(--r-popover--trigger--height, 0) + var(--pointer--spacer) + var(--r-popover--pointer--height, var(--pointer--height))))}:host([data-vertical=bottom][data-horizontal=cover]){--r-popover--pointer--left:calc(var(--r-popover--trigger--left, 0) + var(--r-popover--trigger--width, 0)/2 - var(--r-popover--pointer--width, var(--pointer--width))/2);--r-popover--board--left:0;--r-popover--board--transform:translate(0, calc(var(--r-popover--trigger--height, 0) + var(--r-popover--pointer--height, var(--pointer--height))))}:host([data-vertical=cover]){--r-popover--board--top:0;--r-popover--board--height:100%;--r-popover--board-content--height:100%;--r-popover--pointer--top:calc(var(--r-popover--trigger--top, 0) + var(--r-popover--trigger--height)/2 - var(--pointer--height)/2);--r-popover--pointer--bottom:auto}:host([data-vertical=cover][data-content-has-scroll=false]){--r-popover--board--top:var(--r-popover--trigger--top, 0)}:host([data-vertical=cover][data-horizontal=left]){--r-popover--board--left:var(--r-popover--trigger--left, 0);--r-popover--board--transform:translate(calc(-100% - var(--pointer--spacer) - var(--pointer--height)), 0);--r-popover--pointer--left:100%;--r-popover--pointer--right:auto;--r-popover--pointer--transform:rotate(-90deg) translate(0, calc(0px - var(--pointer--spacer)))}:host([data-vertical=cover][data-horizontal=right]){--r-popover--board--left:calc(var(--r-popover--trigger--left, 0) + var(--r-popover--trigger--width, 0) + var(--pointer--width));--r-popover--pointer--left:auto;--r-popover--pointer--right:100%;--r-popover--pointer--transform:rotate(90deg) translate(0, calc(0px - var(--pointer--spacer)))}:host([data-vertical=cover][data-horizontal=center]),:host([data-vertical=cover][data-horizontal=cover]){--r-popover--pointer--display:none;--r-popover--board--transform:translate(calc(-50% + var(--r-popover--trigger--width, 0)/2), 0)}:host([data-vertical=cover][data-horizontal=cover]){--r-popover--pointer--display:none;--r-popover--board--transform:none;--r-popover--board--height:100%;--r-popover--board--width:100%;--r-popover--board--left:0}:host([data-fixed-top=true]){--r-popover--board-container--height:var(--r-popover--trigger--top, var(--board--max-height))}:host([dismiss-mode=manual]){--r-popover--board-content--padding:1.5rem 3.5rem 1.5rem 1.5rem}.r-popover{position:var(--r-popover--position, relative);display:var(--r-popover--display, inline-flex)}.r-popover--dismiss{position:var(--r-popover--dismiss--position, absolute);top:var(--r-popover--dismiss--top, 20px);right:var(--r-popover--dismiss--right, 20px);color:var(--r-text-inverse)}.r-popover--trigger{border:var(--r-popover--trigger--border, none);background:var(--r-popover--trigger--background, none);padding:var(--r-popover--trigger--padding, 0);cursor:var(--r-popover--trigger--cursor, pointer);display:var(--r-popover--trigger--display, inline-flex);align-items:var(--r-popover--trigger--align-items, center);justify-content:var(--r-popover--trigger--justify-content, center);min-width:var(--r-popover--trigger--min-width, unset);min-height:var(--r-popover--trigger--min-height, unset)}.r-popover--trigger:focus{box-shadow:0 0 0 6px var(--r-border-focused-outlined, #fff);outline:2px solid var(--r-border-focused, #0071e3);outline-offset:2px}.r-popover--board{position:var(--r-popover--board--position, fixed);top:var(--r-popover--board--top, -1000em);right:var(--r-popover--board--right, auto);bottom:var(--r-popover--board--bottom, auto);left:var(--r-popover--board--left, -1000em);visibility:var(--r-popover--board--visibility, hidden);width:var(--r-popover--board--width, 100%);min-width:var(--r-popover--board--max-width, var(--board--min-width));max-width:var(--r-popover--board--max-width, var(--board--max-width));height:var(--r-popover--board--height, auto);max-height:var(--r-popover--board--max-height, var(--board--max-height));background-color:var(--r-popover--board--background-color, var(--r-background-inverse));color:var(--r-popover--board--color, var(--r-text-inverse));border:var(--r-popover--board--border, none);transform:var(--r-popover--board--transform, none);box-sizing:var(--r-popover--board--box-sizing, border-box);padding:var(--r-popover--board--padding, 0);margin:var(--r-popover--board--margin, 0);overflow:var(--r-popover--board--overflow, visible)}.r-popover--board-content{display:var(--r-popover--board-content--display, flex);flex-direction:var(--r-popover--board-content--flex-direction, column);gap:var(--r-popover--board-content--gap, 1.5rem);overflow:var(--r-popover--board-content--overflow, auto);height:var(--r-popover--board-content--height, auto);max-height:var(--r-popover--board-content--max-height, var(--board--max-height));padding:var(--r-popover--board-content--padding, 1.5rem);box-sizing:var(--r-popover--board-content--box-sizing, border-box)}.r-popover--board-pointer{display:var(--r-popover--pointer--display, flex);width:var(--r-popover--pointer--width, var(--pointer--width));height:var(--r-popover--pointer--height, var(--pointer--height));position:var(--r-popover--pointer--position, absolute);top:var(--r-popover--pointer--top, auto);right:var(--r-popover--pointer--right, auto);bottom:var(--r-popover--pointer--bottom, auto);left:var(--r-popover--pointer--left, auto);color:var(--r-popover--pointer--color, var(--r-background-inverse));transform:var(--r-popover--pointer--transform, none);transform-origin:var(--r-popover--pointer--transform-origin, center)}.r-popover--board-pointer>svg{display:flex}";export{i as r_popover}
@@ -1 +1 @@
1
- import{r as t,h as s,H as o,g as e}from"./p-CTxpqopm.js";import{s as r,a as i}from"./p-B9rsR6cQ.js";import{f as n}from"./p-ky1yonnS.js";import"./p-4Uv3PpKT.js";const a=class{constructor(s){t(this,s)}connectedCallback(){const t=this.host.closest("r-popover");r(this.host,t)}disconnectedCallback(){const t=this.host.closest("r-popover");i(this.host,t)}async setFocus(){var t;return this.activeElement?"setFocus"in this.activeElement&&"function"==typeof this.activeElement.setFocus?(await this.activeElement.setFocus(),Promise.resolve(this.activeElement)):(null===(t=this.activeElement)||void 0===t||t.focus(),Promise.resolve(this.activeElement)):Promise.resolve(null)}async setBlur(){var t;null===(t=this.activeElement)||void 0===t||t.blur()}get activeElement(){return this.getActiveElements[0]||null}async getActiveElements(){return n(this.host)}render(){return s(o,{key:"924de9f361a9a419b33b354fb8bc07394033becc",slot:"content",class:"r-typography"},s("slot",{key:"afcf830d8cae4a7dfd8f33f0ed14cf41cad7c83f"}))}get host(){return e(this)}};a.style="::slotted(*:first-child){margin-top:0;padding-top:0}::slotted(*:last-child){margin-bottom:0;padding-bottom:0}";export{a as r_popover_content}
1
+ import{r as t,h as s,H as o,g as e}from"./p-CTxpqopm.js";import{s as r,a as i}from"./p-B9rsR6cQ.js";import{f as n}from"./p-ky1yonnS.js";import"./p-4Uv3PpKT.js";const a=class{constructor(s){t(this,s)}connectedCallback(){const t=this.host.closest("r-popover");r(this.host,t)}disconnectedCallback(){const t=this.host.closest("r-popover");i(this.host,t)}async setFocus(){var t;return this.activeElement?"setFocus"in this.activeElement&&"function"==typeof this.activeElement.setFocus?(await this.activeElement.setFocus(),Promise.resolve(this.activeElement)):(null===(t=this.activeElement)||void 0===t||t.focus(),Promise.resolve(this.activeElement)):Promise.resolve(null)}async setBlur(){var t;null===(t=this.activeElement)||void 0===t||t.blur()}get activeElement(){return this.getActiveElements[0]||null}async getActiveElements(){return n(this.host)}render(){return s(o,{key:"ec778d5e0a294bcbe389039abc6f0b620b7bc69c",slot:"content",class:"r-typography"},s("slot",{key:"40c27d279a1093be8a98731881ad83da147f5bbc"}))}get host(){return e(this)}};a.style="::slotted(*:first-child){margin-top:0;padding-top:0}::slotted(*:last-child){margin-bottom:0;padding-bottom:0}";export{a as r_popover_content}
@@ -1 +1 @@
1
- import{r as t,c as i,h as r,H as o,g as e}from"./p-CTxpqopm.js";import{a as s}from"./p-DvLT8-y3.js";const a=class{constructor(r){t(this,r),this.rValidate=i(this,"rValidate"),this.rChange=i(this,"rChange"),this.rReset=i(this,"rReset"),this.showValid=!1,this.variant="standard",this.validityState="",this.validityMessage="",this.initial={},this.uniqueId=`r-radio-group-${Date.now().toString(32)}${Math.random().toString(32)}`.replace(/\./g,""),this.getValidityStateData=t=>{if(null!==t)for(const i in t.validity)if(t.validity[i]){if(this.validityState=i,this[i+"Message"])return void(this.validityMessage=this[i+"Message"]);this.validityMessage=t.validationMessage}},this.validateFormElement=(t=null)=>{if(null===t)return;if(this.isNoValidate)return;if(this.error)return;this.getValidityStateData(t);const i="valid"===this.validityState;this.valid=i,this.invalid=!i,this.rValidate.emit({state:this.validityState,message:this.validityMessage})},this.onSubmitForm=t=>{this.isNoValidate||(this.validateFormElement(this.nativeSelectedEl||this.nativeFirstEl),this.hasSelected&&!this.invalid||(t.preventDefault(),t.stopPropagation()))},this.onResetForm=()=>{this.reset()},this.onLabelClick=()=>{const t=this.radioButtonElements[0].shadowRoot.querySelector('[type="radio"]');null==t||t.focus()},this.contributeToFormData=t=>{s(this.host,t.formData)}}rChangeAction(t){this.resetValidity(),this.setValue(t.detail.value)}radioButtonClickAction(t){!t.target.disabled&&t.target.select()}get selectedIndex(){return Array.from(this.radioButtonElements).findIndex((t=>t.hasAttribute("checked")))}get prevIndex(){return 0===this.selectedIndex||-1===this.selectedIndex?this.radioButtonElements.length-1:this.selectedIndex-1}get focusedRadioButtonEl(){return this.host.querySelector("r-radio-button.focused")}get focusedRadioButtonElIndex(){return Array.from(this.radioButtonElements).indexOf(this.focusedRadioButtonEl)}get nextIndex(){return-1===this.selectedIndex?-1===this.focusedRadioButtonElIndex?0:this.focusedRadioButtonElIndex+1:this.selectedIndex===this.radioButtonElements.length-1?0:this.selectedIndex+1}radioButtonKeydownAction(t){var i;switch(t.detail.code){case"ArrowUp":case"ArrowLeft":this.radioButtonElements[this.prevIndex].select();break;case"ArrowDown":case"ArrowRight":this.radioButtonElements[this.nextIndex].select();break;case"Enter":{const t=this.host.querySelector('[type="submit"]')||(null===(i=this.parentFormEl)||void 0===i?void 0:i.querySelector('[type="submit"]'));t&&"triggerClick"in t?null==t||t.triggerClick():this.parentFormEl.requestSubmit();break}}}async resetValidity(){this.validityMessage=null,this.validityState=null,this.invalid=this.initial.invalid,this.valid=!this.invalid}async reset(){this.resetValidity(),this.initial.value?this.setValue(this.initial.value):this.clearValue()}async setValue(t){const i=Array.from(this.radioButtonElements).find((i=>i.value===t));void 0!==i?(this.value=t,null==i||i.select()):this.clearValue()}async getValue(){return this.value||null}async clearValue(){var t,i,r,o,e,s;(null===(t=this.nativeSelectedEl)||void 0===t?void 0:t.value)===(null===(i=this.nativeFirstEl)||void 0===i?void 0:i.value)||null===(r=this.nativeSelectedEl)||void 0===r||r.setAttribute("tabindex","-1"),null===(o=this.nativeSelectedEl)||void 0===o||o.setAttribute("tabindex","-1"),null===(e=this.nativeFirstEl)||void 0===e||e.setAttribute("tabindex","0"),null===(s=this.selectedRadioButtonElement)||void 0===s||s.removeAttribute("checked"),this.value=null}async checkValidity(){return this.getValidityStateData(this.nativeSelectedEl||this.nativeFirstEl||null),"valid"===this.validityState}async reportValidity(){return this.validateFormElement(this.nativeSelectedEl||this.nativeFirstEl||null),"valid"===this.validityState}async setCustomValidity(t){const i=this.nativeSelectedEl||this.nativeFirstEl||null;this.customErrorMessage=t,this.validateFormElement(i)}async setFocus(){const t=this.selectedRadioButtonElement||this.radioButtonElements[0]||null;null==t||t.setFocus()}async setBlur(){var t;null===(t=this.focusedRadioButtonEl)||void 0===t||t.setBlur()}get isNoValidate(){var t;return(null===(t=this.parentFormEl)||void 0===t?void 0:t.hasAttribute("novalidate"))||this.novalidate||!this.required||!1}get parentFormEl(){return this.host.closest("form")||document.querySelector(`#${this.form}`)||null}get radioButtonElements(){return this.host.querySelectorAll('r-radio-button:not([disabled]:not([disabled="false"]))')}get selectedRadioButtonElement(){return Array.from(this.radioButtonElements).find((t=>t.hasAttribute("checked")))||null}get hasSelected(){return Array.from(this.radioButtonElements).some((t=>t.hasAttribute("checked")))}get nativeSelectedEl(){var t,i;return null===this.selectedRadioButtonElement?null:(null===(i=null===(t=this.selectedRadioButtonElement)||void 0===t?void 0:t.shadowRoot)||void 0===i?void 0:i.querySelector(".r-radio-button--input"))||null}get nativeFirstEl(){var t,i;return(null===(i=null===(t=this.radioButtonElements[0])||void 0===t?void 0:t.shadowRoot)||void 0===i?void 0:i.querySelector(".r-radio-button--input"))||null}passPropsToGroupItems(t={}){Object.entries(t).forEach((([t,i])=>{this.radioButtonElements.forEach((r=>{"string"==typeof i&&r.setAttribute(t,i),"boolean"==typeof i&&i&&r.setAttribute(t,"")}))}))}selectGroupItemByValue(){this.hasSelected&&!this.value&&(this.value=this.selectedRadioButtonElement.value),this.setValue(this.value)}setTabindex(){const t=this.nativeSelectedEl||this.nativeFirstEl;null==t||t.setAttribute("tabindex","0")}connectFormEventListeners(){var t,i,r;null===(t=this.parentFormEl)||void 0===t||t.addEventListener("formdata",this.contributeToFormData),null===(i=this.parentFormEl)||void 0===i||i.addEventListener("reset",this.onResetForm),null===(r=this.parentFormEl)||void 0===r||r.addEventListener("submit",this.onSubmitForm,{capture:!0})}disconnectFormEventListeners(){var t,i,r;null===(t=this.parentFormEl)||void 0===t||t.removeEventListener("formdata",this.contributeToFormData),null===(i=this.parentFormEl)||void 0===i||i.removeEventListener("reset",this.onResetForm),null===(r=this.parentFormEl)||void 0===r||r.removeEventListener("submit",this.onSubmitForm)}connectedCallback(){this.connectFormEventListeners()}disconnectedCallback(){this.disconnectFormEventListeners()}componentWillLoad(){const{required:t,name:i}=this;this.passPropsToGroupItems({required:t,name:i}),this.selectGroupItemByValue(),this.initial.value=this.value,this.initial.invalid=this.invalid}componentDidLoad(){const{name:t,required:i}=this;this.passPropsToGroupItems({name:t,required:i}),this.setTabindex()}render(){const{label:t,hint:i,fieldIndicator:e,tooltip:s,tooltipIcon:a,tooltipIconColor:n,error:l,uniqueId:d,invalid:h}=this;return r(o,{key:"93b34ec896a3a8eff21f5134388970485ac8dd53"},r("div",{key:"24a685577ca7d38602b5a68200d349b4ccf6ef7f",class:"r-radio-group",onClick:this.onLabelClick},t&&r("div",{key:"983a9797b4fa2dca5f3702018942a38e3e2efeb4",class:"r-radio-group--label-container"},r("r-label",Object.assign({key:"cef4c2d592f245400865ae5401e08c4d1212d0d9",id:`${d}-label`,class:"r-radio-group--label","field-indicator":e},{tooltip:s,"tooltip-icon":a,"tooltip-icon-color":n}),t),r("slot",{key:"07c1e821c658750bee2421e993e162f58f9b8c92",name:"popover"})),i&&r("r-hint",{key:"3dac68fd457583d6e9d00a76ac62413dc67fcaf1",id:`${d}-hint`,class:"r-radio-group--hint",role:"note"},i),r("div",{key:"42b55825383b7a2d1229ef744899c9297a8db2d5",class:"r-radio-group--content"},r("slot",{key:"7eb4e0536b93390f97e260c827a9fd0729828f09"}))),h&&l&&r("r-hint",{key:"88afb96001867cc0a111fcc0629cc98961181b29","aria-live":"polite",id:`${d}-message`,role:"alert",variant:"error"},l),"valid"!==this.validityState&&this.validityMessage&&r("r-hint",{key:"ed9bec675b28bf7fa7df3c3270f193b2645a7f2a","aria-live":"polite",id:`${d}-message`,role:"alert",variant:"error"},this.customErrorMessage||this.validityMessage),this.valid&&this.validMessage&&this.showValid&&r("r-hint",{key:"d4e1d4cc3bf26f6e0cf167b16cb547463083ccdf",role:"alert",variant:"success"},this.validMessage))}get host(){return e(this)}};a.style=":host{display:flex;flex-direction:column;box-sizing:border-box;margin-bottom:var(--r-spacing-100)}:host ::slotted(r-radio-button){display:var(--r-radio-group--slotted-radio-button--display, flex)}:host ::slotted(.focused){--r-radio-button--box-shadow:0 0 0 3px var(--r-border-focused-outlined, #fff), inset 0 0 0 1px var(--r-border-focused-outlined, #fff);--r-radio-button--outline:2px solid var(--r-border-focused, #0071e3);--r-radio-button--outline-offset:2px}:host slot{display:contents}:host([variant=contained]) ::slotted(r-radio-button){padding:0;--r-radio-button--padding:var(--r-spacing-100, 1rem);--r-radio-button--border-color:var(--r-border-soft, #686868);--r-radio-button--border-width:1px}:host([invalid]:not([invalid=false])) ::slotted(r-radio-button){--r-radio-button--box--border-color:var(--r-status-error-regular, #da1e28);--r-radio-button--box--background-color:var(--r-status-error-soft, #fef6f6);--r-radio-button--marker--background-color:var(--r-status-error-regular, #da1e28)}:host .r-radio-group{display:var(--r-radio-group--display, flex);flex-direction:var(--r-radio-group--flex-direction, column)}:host .r-radio-group--label-container{display:var(--r-radio-group--label-container--display, flex);gap:var(--r-radio-group--label-container--gap, var(--r-spacing-100, 1rem));align-items:var(--r-radio-group--label-container--align-items, center);justify-content:var(--r-radio-group--label-container--justify-content, space-between)}:host .r-radio-group--label-container ::slotted([slot=popover]){display:var(--r-radio-group--popover--display, inline-flex);height:var(--r-radio-group--popover--height, var(--r-spacing-150, 1.5));align-items:var(--r-radio-group--popover--align-items, center);justify-content:var(--r-radio-group--popover--justify-content, center);margin-right:var(--r-radio-group--popover--margin-right, -0.25rem);--r-popover--trigger--min-width:var(--r-radio-group--popover-trigger--min-width, var(--r-spacing-150, 1.5));--r-popover--trigger--min-height:var(--r-radio-group--popover--trigger--min-height, var(--r-spacing-150, 1.5))}:host .r-radio-group--hint{margin-bottom:var(--r-radio-group--hint--margin-bottom, var(--r-spacing-100, 1rem))}:host .r-radio-group--content{display:var(--r-radio-group--content--display, flex);flex-direction:var(--r-radio-group--content--flex-direction, column);flex-wrap:var(--r-radio-group--content--flex-wrap, nowrap);gap:var(--r-radio-group--content--gap, var(--r-spacing-050, 0.5rem))}:host .r-radio-group+r-hint{margin-top:var(--r-radio-group--hint--margin-top, var(--r-spacing-050, 0.5rem))}";export{a as r_radio_group}
1
+ import{r as t,c as i,h as r,H as o,g as e}from"./p-CTxpqopm.js";import{a as s}from"./p-DvLT8-y3.js";const a=class{constructor(r){t(this,r),this.rValidate=i(this,"rValidate"),this.rChange=i(this,"rChange"),this.rReset=i(this,"rReset"),this.showValid=!1,this.variant="standard",this.validityState="",this.validityMessage="",this.initial={},this.uniqueId=`r-radio-group-${Date.now().toString(32)}${Math.random().toString(32)}`.replace(/\./g,""),this.getValidityStateData=t=>{if(null!==t)for(const i in t.validity)if(t.validity[i]){if(this.validityState=i,this[i+"Message"])return void(this.validityMessage=this[i+"Message"]);this.validityMessage=t.validationMessage}},this.validateFormElement=(t=null)=>{if(null===t)return;if(this.isNoValidate)return;if(this.error)return;this.getValidityStateData(t);const i="valid"===this.validityState;this.valid=i,this.invalid=!i,this.rValidate.emit({state:this.validityState,message:this.validityMessage})},this.onSubmitForm=t=>{this.isNoValidate||(this.validateFormElement(this.nativeSelectedEl||this.nativeFirstEl),this.hasSelected&&!this.invalid||(t.preventDefault(),t.stopPropagation()))},this.onResetForm=()=>{this.reset()},this.onLabelClick=()=>{const t=this.radioButtonElements[0].shadowRoot.querySelector('[type="radio"]');null==t||t.focus()},this.contributeToFormData=t=>{s(this.host,t.formData)}}rChangeAction(t){this.resetValidity(),this.setValue(t.detail.value)}radioButtonClickAction(t){!t.target.disabled&&t.target.select()}get selectedIndex(){return Array.from(this.radioButtonElements).findIndex((t=>t.hasAttribute("checked")))}get prevIndex(){return 0===this.selectedIndex||-1===this.selectedIndex?this.radioButtonElements.length-1:this.selectedIndex-1}get focusedRadioButtonEl(){return this.host.querySelector("r-radio-button.focused")}get focusedRadioButtonElIndex(){return Array.from(this.radioButtonElements).indexOf(this.focusedRadioButtonEl)}get nextIndex(){return-1===this.selectedIndex?-1===this.focusedRadioButtonElIndex?0:this.focusedRadioButtonElIndex+1:this.selectedIndex===this.radioButtonElements.length-1?0:this.selectedIndex+1}radioButtonKeydownAction(t){var i;switch(t.detail.code){case"ArrowUp":case"ArrowLeft":this.radioButtonElements[this.prevIndex].select();break;case"ArrowDown":case"ArrowRight":this.radioButtonElements[this.nextIndex].select();break;case"Enter":{const t=this.host.querySelector('[type="submit"]')||(null===(i=this.parentFormEl)||void 0===i?void 0:i.querySelector('[type="submit"]'));t&&"triggerClick"in t?null==t||t.triggerClick():this.parentFormEl.requestSubmit();break}}}async resetValidity(){this.validityMessage=null,this.validityState=null,this.invalid=this.initial.invalid,this.valid=!this.invalid}async reset(){this.resetValidity(),this.initial.value?this.setValue(this.initial.value):this.clearValue()}async setValue(t){const i=Array.from(this.radioButtonElements).find((i=>i.value===t));void 0!==i?(this.value=t,null==i||i.select()):this.clearValue()}async getValue(){return this.value||null}async clearValue(){var t,i,r,o,e,s;(null===(t=this.nativeSelectedEl)||void 0===t?void 0:t.value)===(null===(i=this.nativeFirstEl)||void 0===i?void 0:i.value)||null===(r=this.nativeSelectedEl)||void 0===r||r.setAttribute("tabindex","-1"),null===(o=this.nativeSelectedEl)||void 0===o||o.setAttribute("tabindex","-1"),null===(e=this.nativeFirstEl)||void 0===e||e.setAttribute("tabindex","0"),null===(s=this.selectedRadioButtonElement)||void 0===s||s.removeAttribute("checked"),this.value=null}async checkValidity(){return this.getValidityStateData(this.nativeSelectedEl||this.nativeFirstEl||null),"valid"===this.validityState}async reportValidity(){return this.validateFormElement(this.nativeSelectedEl||this.nativeFirstEl||null),"valid"===this.validityState}async setCustomValidity(t){const i=this.nativeSelectedEl||this.nativeFirstEl||null;this.customErrorMessage=t,this.validateFormElement(i)}async setFocus(){const t=this.selectedRadioButtonElement||this.radioButtonElements[0]||null;null==t||t.setFocus()}async setBlur(){var t;null===(t=this.focusedRadioButtonEl)||void 0===t||t.setBlur()}get isNoValidate(){var t;return(null===(t=this.parentFormEl)||void 0===t?void 0:t.hasAttribute("novalidate"))||this.novalidate||!this.required||!1}get parentFormEl(){return this.host.closest("form")||document.querySelector(`#${this.form}`)||null}get radioButtonElements(){return this.host.querySelectorAll('r-radio-button:not([disabled]:not([disabled="false"]))')}get selectedRadioButtonElement(){return Array.from(this.radioButtonElements).find((t=>t.hasAttribute("checked")))||null}get hasSelected(){return Array.from(this.radioButtonElements).some((t=>t.hasAttribute("checked")))}get nativeSelectedEl(){var t,i;return null===this.selectedRadioButtonElement?null:(null===(i=null===(t=this.selectedRadioButtonElement)||void 0===t?void 0:t.shadowRoot)||void 0===i?void 0:i.querySelector(".r-radio-button--input"))||null}get nativeFirstEl(){var t,i;return(null===(i=null===(t=this.radioButtonElements[0])||void 0===t?void 0:t.shadowRoot)||void 0===i?void 0:i.querySelector(".r-radio-button--input"))||null}passPropsToGroupItems(t={}){Object.entries(t).forEach((([t,i])=>{this.radioButtonElements.forEach((r=>{"string"==typeof i&&r.setAttribute(t,i),"boolean"==typeof i&&i&&r.setAttribute(t,"")}))}))}selectGroupItemByValue(){this.hasSelected&&!this.value&&(this.value=this.selectedRadioButtonElement.value),this.setValue(this.value)}setTabindex(){const t=this.nativeSelectedEl||this.nativeFirstEl;null==t||t.setAttribute("tabindex","0")}connectFormEventListeners(){var t,i,r;null===(t=this.parentFormEl)||void 0===t||t.addEventListener("formdata",this.contributeToFormData),null===(i=this.parentFormEl)||void 0===i||i.addEventListener("reset",this.onResetForm),null===(r=this.parentFormEl)||void 0===r||r.addEventListener("submit",this.onSubmitForm,{capture:!0})}disconnectFormEventListeners(){var t,i,r;null===(t=this.parentFormEl)||void 0===t||t.removeEventListener("formdata",this.contributeToFormData),null===(i=this.parentFormEl)||void 0===i||i.removeEventListener("reset",this.onResetForm),null===(r=this.parentFormEl)||void 0===r||r.removeEventListener("submit",this.onSubmitForm)}connectedCallback(){this.connectFormEventListeners()}disconnectedCallback(){this.disconnectFormEventListeners()}componentWillLoad(){const{required:t,name:i}=this;this.passPropsToGroupItems({required:t,name:i}),this.selectGroupItemByValue(),this.initial.value=this.value,this.initial.invalid=this.invalid}componentDidLoad(){const{name:t,required:i}=this;this.passPropsToGroupItems({name:t,required:i}),this.setTabindex()}render(){const{label:t,hint:i,fieldIndicator:e,tooltip:s,tooltipIcon:a,tooltipIconColor:n,error:l,uniqueId:d,invalid:h}=this;return r(o,{key:"899b3d8d509fa3d6f37a81279e6fc58b98e1314c"},r("div",{key:"dc1c47c966aac6ebaab2b8ec9061342b6c1e81e3",class:"r-radio-group",onClick:this.onLabelClick},t&&r("div",{key:"5b39dcc6952d971f8c03e2dab554b25bb1be3ccf",class:"r-radio-group--label-container"},r("r-label",Object.assign({key:"7f13b1571bccb986a0e36903399c8f15536de539",id:`${d}-label`,class:"r-radio-group--label","field-indicator":e},{tooltip:s,"tooltip-icon":a,"tooltip-icon-color":n}),t),r("slot",{key:"bfd151ce64e670722a6a1f3254763b6f514c99ab",name:"popover"})),i&&r("r-hint",{key:"edb8bbe44470579a5638e5dbee0b7b843cc998b4",id:`${d}-hint`,class:"r-radio-group--hint",role:"note"},i),r("div",{key:"1727429f1c36de0fd13567af448aed7c84f7c7b1",class:"r-radio-group--content"},r("slot",{key:"f7d712be6351c44e5f072f85a407b5e73837b48b"}))),h&&l&&r("r-hint",{key:"71feb492e87164e485bb10a0e856d86ef3c57a7d","aria-live":"polite",id:`${d}-message`,role:"alert",variant:"error"},l),"valid"!==this.validityState&&this.validityMessage&&r("r-hint",{key:"0ddc4636948329a97e8140c9efc267a4a054ff3b","aria-live":"polite",id:`${d}-message`,role:"alert",variant:"error"},this.customErrorMessage||this.validityMessage),this.valid&&this.validMessage&&this.showValid&&r("r-hint",{key:"e7cfa4eccf754e90ad30b22b24dd9f2ce1fcadc8",role:"alert",variant:"success"},this.validMessage))}get host(){return e(this)}};a.style=":host{display:flex;flex-direction:column;box-sizing:border-box;margin-bottom:var(--r-spacing-100)}:host ::slotted(r-radio-button){display:var(--r-radio-group--slotted-radio-button--display, flex)}:host ::slotted(.focused){--r-radio-button--box-shadow:0 0 0 3px var(--r-border-focused-outlined, #fff), inset 0 0 0 1px var(--r-border-focused-outlined, #fff);--r-radio-button--outline:2px solid var(--r-border-focused, #0071e3);--r-radio-button--outline-offset:2px}:host slot{display:contents}:host([variant=contained]) ::slotted(r-radio-button){padding:0;--r-radio-button--padding:var(--r-spacing-100, 1rem);--r-radio-button--border-color:var(--r-border-soft, #686868);--r-radio-button--border-width:1px}:host([invalid]:not([invalid=false])) ::slotted(r-radio-button){--r-radio-button--box--border-color:var(--r-status-error-regular, #da1e28);--r-radio-button--box--background-color:var(--r-status-error-soft, #fef6f6);--r-radio-button--marker--background-color:var(--r-status-error-regular, #da1e28)}:host .r-radio-group{display:var(--r-radio-group--display, flex);flex-direction:var(--r-radio-group--flex-direction, column)}:host .r-radio-group--label-container{display:var(--r-radio-group--label-container--display, flex);gap:var(--r-radio-group--label-container--gap, var(--r-spacing-100, 1rem));align-items:var(--r-radio-group--label-container--align-items, center);justify-content:var(--r-radio-group--label-container--justify-content, space-between)}:host .r-radio-group--label-container ::slotted([slot=popover]){display:var(--r-radio-group--popover--display, inline-flex);height:var(--r-radio-group--popover--height, var(--r-spacing-150, 1.5));align-items:var(--r-radio-group--popover--align-items, center);justify-content:var(--r-radio-group--popover--justify-content, center);margin-right:var(--r-radio-group--popover--margin-right, -0.25rem);--r-popover--trigger--min-width:var(--r-radio-group--popover-trigger--min-width, var(--r-spacing-150, 1.5));--r-popover--trigger--min-height:var(--r-radio-group--popover--trigger--min-height, var(--r-spacing-150, 1.5))}:host .r-radio-group--hint{margin-bottom:var(--r-radio-group--hint--margin-bottom, var(--r-spacing-100, 1rem))}:host .r-radio-group--content{display:var(--r-radio-group--content--display, flex);flex-direction:var(--r-radio-group--content--flex-direction, column);flex-wrap:var(--r-radio-group--content--flex-wrap, nowrap);gap:var(--r-radio-group--content--gap, var(--r-spacing-050, 0.5rem))}:host .r-radio-group+r-hint{margin-top:var(--r-radio-group--hint--margin-top, var(--r-spacing-050, 0.5rem))}";export{a as r_radio_group}
@@ -0,0 +1 @@
1
+ import{r as t,c as i,h as e,H as r,g as n}from"./p-CTxpqopm.js";import{a}from"./p-DvLT8-y3.js";const o=class{constructor(e){t(this,e),this.rChange=i(this,"rChange"),this.rValidate=i(this,"rValidate"),this.rReset=i(this,"rReset"),this.name="input-code",this.length=4,this.label="Verification code",this.tooShortMessage=`All ${this.length} characters must be filled.`,this.value="",this.values=new Array(this.length).fill(""),this.validityState="",this.validityMessage="",this.inputs=[],this.handleInput=(t,i)=>{var e;if(this.readonly)return;const r=i.target.value.slice(-1);this.values[t]=r,this.values=[...this.values],r&&t<this.length-1&&(null===(e=this.inputs[t+1])||void 0===e||e.focus()),this.rChange.emit({value:this.values.join("")})},this.handleKeyDown=(t,i)=>{var e,r,n;if(this.readonly)return;const a=i.key;"Backspace"===a&&!this.values[t]&&t>0&&(this.values[t-1]="",this.values=[...this.values],null===(e=this.inputs[t-1])||void 0===e||e.focus()),"ArrowLeft"===a&&t>0&&(null===(r=this.inputs[t-1])||void 0===r||r.focus(),this.values[t-1]&&setTimeout((()=>{var i;null===(i=this.inputs[t-1])||void 0===i||i.setSelectionRange(0,1)}),0)),"ArrowRight"===a&&t<this.length-1&&(null===(n=this.inputs[t+1])||void 0===n||n.focus(),this.values[t+1]&&setTimeout((()=>{var i;null===(i=this.inputs[t+1])||void 0===i||i.setSelectionRange(0,1)}),0))},this.createInputHandler=t=>i=>this.handleInput(t,i),this.createKeyDownHandler=t=>i=>this.handleKeyDown(t,i),this.handlePaste=async t=>{var i;if(this.readonly)return;t.preventDefault();const e=t.clipboardData.getData("text").slice(0,this.length);this.values=e.split("").concat(new Array(this.length).fill("")).slice(0,this.length),this.values=[...this.values],this.rChange.emit({value:this.values.join("")});const r=this.values.findIndex((t=>!t));null===(i=this.inputs[-1===r?this.length-1:r])||void 0===i||i.focus()},this.onHostClick=()=>{const t=this.firstEmptyInput||this.inputs[this.inputs.length-1];null==t||t.focus(),null===this.firstEmptyInput&&setTimeout((()=>{null==t||t.setSelectionRange(0,1)}),0)},this.uniqueId=`r-input-code-${Date.now().toString(32)}${Math.random().toString(32)}`.replace(/\./g,""),this.nativeElement=null,this.getValidityStateData=t=>0===t.value.length?(this.validityState="valueMissing",void(this.validityMessage=this.valueMissingMessage)):t.value.length>0&&t.value.length<this.length?(this.validityState="tooShort",void(this.validityMessage=this.tooShortMessage)):void(this.validityState="valid"),this.validateFormElement=t=>{if(null===t)return;if(this.isNoValidate)return;this.getValidityStateData(t);const i="valid"===this.validityState;this.valid=i,this.invalid=!i,this.rValidate.emit({state:this.validityState,message:this.validityMessage})},this.onResetForm=async()=>{if(this.readonly)return;this.reset(),this.validityState=null,this.validityMessage=null,this.invalid=null,this.valid=null;const{host:t}=this;this.rReset.emit({element:t,value:this.values.join("")})},this.onSubmitForm=t=>{this.isNoValidate||this.disabled||(this.validateFormElement(this.nativeElement),this.invalid&&(t.preventDefault(),t.stopPropagation()))},this.contributeToFormData=t=>{a(this.nativeElement||this.host,t.formData)}}async getValue(){return this.values.join("")}async reset(){var t;this.readonly||(this.values=new Array(this.length).fill(""),null===(t=this.inputs[0])||void 0===t||t.focus())}async setValue(t){if(!t)return void(this.values=new Array(this.length).fill(""));const i=Array.from(t).slice(0,this.length).map((t=>String(t)));this.values=i,this.rChange.emit({value:this.values.join("")})}handleValuesChange(){this.value=this.values.join("")}get firstEmptyInput(){return this.inputs.find((t=>!t.value))||null}get message(){return this.invalid&&this.error?this.error:this.valid||"valid"===this.validityState?null:this.validityState&&"valid"!==this.validityState?this.customErrorMessage||this.validityMessage:null}get ariaDescribedBy(){const t=this.message?`${this.uniqueId}-message`:null;return this.hint?`${this.uniqueId}-hint ${t}`:t}get parentFormEl(){return this.host.closest("form")||document.querySelector(`#${this.form}`)||null}get isNoValidate(){var t,i;return(null===(t=this.parentFormEl)||void 0===t?void 0:t.hasAttribute("novalidate"))||this.novalidate||this.disabled||(null===(i=this.error)||void 0===i?void 0:i.length)>0||!1}connectFormEventListeners(){var t,i,e;null===(t=this.parentFormEl)||void 0===t||t.addEventListener("formdata",this.contributeToFormData),null===(i=this.parentFormEl)||void 0===i||i.addEventListener("submit",this.onSubmitForm,{capture:!0}),null===(e=this.parentFormEl)||void 0===e||e.addEventListener("reset",this.onResetForm)}disconnectFormEventListeners(){var t,i,e;null===(t=this.parentFormEl)||void 0===t||t.removeEventListener("formdata",this.contributeToFormData),null===(i=this.parentFormEl)||void 0===i||i.removeEventListener("submit",this.onSubmitForm),null===(e=this.parentFormEl)||void 0===e||e.removeEventListener("reset",this.onResetForm)}connectedCallback(){this.connectFormEventListeners()}disconnectedCallback(){this.disconnectFormEventListeners()}get hasMessage(){return!!this.message}get groupDescribedby(){const{uniqueId:t,hint:i,hasMessage:e}=this;return e&&i?`${t}-message ${t}-hint`:e?`${t}-message`:i?`${t}-hint`:null}get hasTrailingSlot(){return!!this.host.querySelector('[slot="trailing"]')}componentWillLoad(){this.setValue(this.value)}render(){const{form:t,name:i,novalidate:n,required:a,disabled:o,label:s,fieldIndicator:d,hint:l,uniqueId:c,valid:h,readonly:u}=this,p={id:c,readonly:u,form:t,name:i,novalidate:n,required:a,disabled:o,"aria-describedby":this.ariaDescribedBy,minlength:this.length,maxlength:this.length};return e(r,{key:"7c77442f0a5b39e6baca0e0a19b07e5c28388267",value:this.value,onClick:this.onHostClick},e("div",{key:"e9d80a3cbb3f8afcbfce17da69bbe881112307c5",class:"r-input-code--label-container"},e("label",{key:"dfdc795d969466e71d82492dd142773fbad93f6b",htmlFor:c},s?e("r-label",Object.assign({},s?{id:`${c}-label`,fieldIndicator:d}:{}),s):e("slot",{name:"label"})),e("slot",{key:"f68f02578abd8be8fceea4bdaf1af657f07f5327",name:"popover"})),l&&e("r-hint",{key:"784b4a072ee504c99873d8e7744c1c055cbdd52a",id:`${c}-hint`,role:"note"},l),e("div",{key:"b9b458b9b18859132145848135118aacf6c43ab2",class:"r-input-code--container",role:"group","aria-labelledby":`${c}-label`,"aria-describedby":this.groupDescribedby},e("slot",{key:"34d0391987a526d9672ff457fbfd34c153099dbc",name:"leading"}),Array.from({length:this.length}).map(((t,i)=>e("input",{class:"r-input-code--input",key:i,id:`${c}-input-section-${i}`,"aria-label":`${this.ariaCharacterLabel||"Character"}: ${i+1}`,"aria-invalid":`${this.invalid||!1}`,value:this.values[i],ref:t=>this.inputs[i]=t,maxlength:1,disabled:this.disabled,required:this.required,readonly:u,onInput:this.createInputHandler(i),onKeyDown:this.createKeyDownHandler(i),onPaste:this.handlePaste}))),e("input",Object.assign({key:"029bcca9a6907090058ea65de36cc3aea106ad25",type:"hidden"},p,{value:this.values.join(""),ref:t=>this.nativeElement=t})),e("div",{key:"a91256c17340a75fe1e5a7942c9ede1089bd477c",class:"r-input-code--trailing"},this.readonly&&e("r-icon",{key:"28df1a0823e8b6c94a26fe8dac6838d663da26b7",class:"r-input-code--readonly-icon",name:"pen-disabled",size:"s"}),this.hasTrailingSlot&&e("slot",{key:"13dee654a15b7104fbe66408ba6c0a8d4b839a2c",name:"trailing"},h&&e("r-icon",{key:"85f0413d86b7366229fe07af87a7bdd5368f8a22",name:"circled-check",size:"s",color:"var(--r-status-success-regular)"})))),e("slot",{key:"cf9e23001dec5216a2c35144b9282dee25d5fe50",name:"message"},this.hasMessage&&e("r-hint",{key:"0c642fbeef09ec9c5ce1e2a6272bb27160be05c0","aria-live":"polite",id:`${c}-message`,variant:"error"},this.message)))}get host(){return n(this)}static get watchers(){return{values:["handleValuesChange"]}}};o.style=":host{display:inline-flex;flex-direction:column;vertical-align:top;--r-label--margin-bottom:0}:host slot{display:contents}:host slot[name=trailing]{display:flex;margin-left:auto}:host([readonly]:not([readonly=false])){--r-input-code--container--background-color:var(--r-background-soft, #f3f1f0);--r-input-code--container--border-color:transparent transparent var(--r-border-soft, #686868) transparent;--r-input-code--container--cursor:text}:host(:hover:not([disabled]:not([disabled=false])):not([readonly]:not([readonly=false]))){--r-input-code--container--background-color:var(--r-background-interactive-hovered, rgba(40, 40, 40, 0.04))}:host(:focus-within:not([disabled]:not([disabled=false]))){--r-input-code--container--box-shadow:0 0 0 6px var(--r-border-focused-outlined);--r-input-code--container--outline:2px solid var(--r-border-focused);--r-input-code--container--outline-offset:2px}:host(:active:not([disabled]:not([disabled=false])):not([readonly]:not([readonly=false]))){--r-input-code--container--background-color:var(--r-background-interactive-pressed, rgba(40, 40, 40, 0.12))}:host([full-width]:not([full-width=false])){display:flex}:host([disabled]:not([disabled=false])){cursor:not-allowed;--r-input-code--container--opacity:0.4;--r-input-code--container--cursor:not-allowed;--r-input-code--container--pointer-events:none;--r-input-code--container--background-color:transparent}:host([invalid]:not([invalid=false])){--r-input-code--container--border-color:var(--r-status-error-regular, #da1e28);--r-input-code--container--background-color:var(--r-status-error-soft, #fef6f6)}.r-input-code--label-container{display:var(--r-input-code--label-container--display, flex);gap:var(--r-input-code--label-container--gap, var(--r-spacing-100, 1rem));align-items:var(--r-input-code--label-container--align-items, center);justify-content:var(--r-input-code--label-container--align-items, space-between)}.r-input-code--label-container ::slotted([slot=popover]){display:var(--r-input-code--popover--display, inline-flex);height:var(--r-input-code--popover--height, var(--r-spacing-150, 1.5));align-items:var(--r-input-code--popover--align-items, center);justify-content:var(--r-input-code--popover--justify-content, center);margin-right:var(--r-input-code--popover--margin-right, -0.25rem);--r-popover--trigger--min-width:var(--r-input-code--popover-trigger--min-width, var(--r-spacing-150, 1.5));--r-popover--trigger--min-height:var(--r-input-code--popover--trigger--min-height, var(--r-spacing-150, 1.5))}.r-input-code--container{position:var(--r-input-code--container--position, relative);display:var(--r-input-code--container--display, flex);align-items:var(--r-input-code--container--align-items, center);gap:var(--r-input-code--container--gap, 0.625em);height:var(--r-input-code--container--height, var(--r-spacing-275, 2.75rem));background-color:var(--r-input-code--container--background-color, var(--r-background-softest, #fff));border-width:var(--r-input-code--container--border-width, 1px);border-style:var(--r-input-code--container--border-style, solid);border-color:var(--r-input-code--container--border-color, var(--r-border-soft, #686868));box-sizing:var(--r-input-code--container--box-sizing, border-box);box-shadow:var(--r-input-code--container--box-shadow, none);outline:var(--r-input-code--container--outline, none);outline-offset:var(--r-input-code--container--outline-offset, 0);padding-top:var(--r-input-code--container--padding-top, 0.8em);padding-right:var(--r-input-code--container--padding-right, 0.7em);padding-bottom:var(--r-input-code--container--padding-bottom, 0.8em);padding-left:var(--r-input-code--container--padding-left, 0.7em);opacity:var(--r-input-code--container--opacity, 1);pointer-events:var(--r-input-code--container--pointer-events, auto);line-height:var(--r-input-code--container--line-height, 1);cursor:var(--r-input-code--container--cursor, inherit);margin-top:var(--r-input-code--container--margin-top, var(--r-spacing-025, 0.25rem));margin-bottom:var(--r-input-code--container--margin-bottom, var(--r-spacing-025, 0.25rem))}.r-input-code--input{width:var(--r-input-code--input--width, 0.725rem);outline:var(--r-input-code--input--outline, none);font-size:var(--r-input-code--input--font-size, 1rem);text-align:var(--r-input-code--input--text-align, center);background-color:var(--r-input-code--input--background-color, transparent);border-width:var(--r-input-code--input--border-width, 0 0 1px 0);border-style:var(--r-input-code--input--border-style, solid);border-color:var(--r-input-code--input--border-color, var(--r-text-soft))}.r-input-code--trailing{display:var(--r-input-code--trailing--display, flex);margin-left:var(--r-input-code--trailing--margin-left, auto);align-items:var(--r-input-code--trailing--align-items, center);gap:var(--r-input-code--trailing--gap, 0.625rem)}.r-input-code--readonly-icon{color:var(--r-input-code--readonly-icon--color, var(--r-icon-soft, #686868))}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}";export{o as r_input_code}
@@ -1 +1 @@
1
- import{r as t,c as s,h as e,H as i,g as r}from"./p-CTxpqopm.js";const o=class{constructor(e){t(this,e),this.triggerMouseEnter=s(this,"triggerMouseEnter"),this.triggerMouseLeave=s(this,"triggerMouseLeave"),this.handleMouseEnter=()=>{this.triggerMouseEnter.emit()},this.handleMouseLeave=()=>{this.triggerMouseLeave.emit()}}get activeElement(){const t=["r-button","r-icon-button","a[href]","button:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(", "),s=this.host.querySelector(t);return s&&s instanceof HTMLElement?(s.tagName.toLowerCase(),s):null}async setFocus(){return this.activeElement?"setFocus"in this.activeElement&&"function"==typeof this.activeElement.setFocus?(await this.activeElement.setFocus(),Promise.resolve(this.activeElement)):(this.activeElement.focus(),Promise.resolve(this.activeElement)):Promise.resolve(null)}async setBlur(){var t;null===(t=this.activeElement)||void 0===t||t.blur()}render(){return e(i,{key:"76fda166fead4c09a9ce40128b58a00dd2441d46",slot:"trigger",onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave},e("slot",{key:"e0ce62eb857b611fe599f36467f8b9b6b2525005"}))}get host(){return r(this)}};o.style=":host{display:block;cursor:pointer}";export{o as r_popover_trigger}
1
+ import{r as t,c as s,h as e,H as i,g as r}from"./p-CTxpqopm.js";const o=class{constructor(e){t(this,e),this.triggerMouseEnter=s(this,"triggerMouseEnter"),this.triggerMouseLeave=s(this,"triggerMouseLeave"),this.handleMouseEnter=()=>{this.triggerMouseEnter.emit()},this.handleMouseLeave=()=>{this.triggerMouseLeave.emit()}}get activeElement(){const t=["r-button","r-icon-button","a[href]","button:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(", "),s=this.host.querySelector(t);return s&&s instanceof HTMLElement?(s.tagName.toLowerCase(),s):null}async setFocus(){return this.activeElement?"setFocus"in this.activeElement&&"function"==typeof this.activeElement.setFocus?(await this.activeElement.setFocus(),Promise.resolve(this.activeElement)):(this.activeElement.focus(),Promise.resolve(this.activeElement)):Promise.resolve(null)}async setBlur(){var t;null===(t=this.activeElement)||void 0===t||t.blur()}render(){return e(i,{key:"78536189423d25a1cf3ee3630512ad44b2dbd444",slot:"trigger",onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave},e("slot",{key:"e634da1b6053eb1c0df7f08f5486f9492c2bd4d0"}))}get host(){return r(this)}};o.style=":host{display:block;cursor:pointer}";export{o as r_popover_trigger}
@@ -1 +1 @@
1
- import{r,c as t,h as o,H as a,g as i}from"./p-CTxpqopm.js";const e=class{constructor(o){r(this,o),this.rChange=t(this,"rChange"),this.rReset=t(this,"rReset"),this.radioButtonClick=t(this,"radioButtonClick"),this.radioButtonKeydown=t(this,"radioButtonKeydown"),this.radioButtonDeselect=t(this,"radioButtonDeselect"),this.value=this.slotTextValue,this.uniqueId=`r-radio-button-${Date.now().toString(32)}${Math.random().toString(32)}`.replace(/\./g,""),this.onClick=r=>{this.disabled||(r.stopPropagation(),r.preventDefault(),this.radioButtonClick.emit(r))},this.onKeydown=r=>{this.disabled||this.radioButtonKeydown.emit(r)},this.onFocus=()=>{this.host.classList.add("focused")},this.onBlur=()=>{this.host.classList.remove("focused")}}async setFocus(){this.nativeEl.focus()}async setBlur(){this.nativeEl.blur()}async select(){var r;if(this.checked)return;if(this.disabled)return;null===(r=this.radioElements)||void 0===r||r.forEach((r=>{r.checked=!1,r.shadowRoot.querySelector(".r-radio-button--input").setAttribute("tabindex","-1")})),this.checked=!0,this.nativeEl.setAttribute("tabindex","0"),this.nativeEl.focus();const{host:t,value:o,checked:a}=this;this.rChange.emit({element:t,value:o,checked:a})}get radioElements(){return this.groupEl?this.groupEl.querySelectorAll("r-radio-button"):this.parentFormEl?this.parentFormEl.querySelectorAll(`r-radio-button[name=${this.name}]`):document.querySelectorAll(`r-radio-button[name=${this.name}]`)}get slotTextValue(){return this.host.textContent||null}get groupEl(){return this.host.closest("r-radio-group")||null}get parentFormEl(){return this.host.closest("form")||null}get isLeading(){return void 0!==this.icon||null!==this.host.querySelector('[slot="leading"]')||null!==this.host.querySelector("r-radio-button-leading")}get isTrailing(){return null!==this.host.querySelector('[slot="trailing"]')||null!==this.host.querySelector("r-radio-button-trailing")}componentWillLoad(){this.initialState||(this.initialState=this.checked),this.groupEl&&!this.name&&(this.name=this.groupEl.name)}render(){const{name:r,value:t,checked:i,disabled:e,hint:n,uniqueId:d,required:s,invalid:b,error:u}=this;return o(a,{key:"5fd29cf01b56497cb4b472a68c6f8e282f714504"},o("label",{key:"92f10d15e5adde0b15ba4d845934b72c5cf82f1d",class:"r-radio-button",onClick:this.onClick,onKeyDown:this.onKeydown},o("input",Object.assign({key:"353161af87ff131f731f0392c857870dd2c4aa63"},{type:"radio",tabindex:"-1",name:r,value:t,disabled:e,checked:i,required:s},{id:`${d}-input`,class:"r-radio-button--input",ref:r=>this.nativeEl=r,onFocus:this.onFocus,onBlur:this.onBlur})),o("span",{key:"405a2464a8f02bfc336d24b2fabb89b279177d1a",class:"r-radio-button--box"}),this.isLeading&&o("div",{key:"591ad269746081f555b01042a15a70f4e6190019",class:"r-radio-button--leading"},o("slot",{key:"73ce02de7748b5a52a178f23878894cd3d547526",name:"leading"},this.icon&&o("r-icon",{key:"eef064fa4aa3e5e8afb47ff236d1fd61808b562c",name:this.icon,size:"m"}))),o("div",{key:"598e907e04f2e608b0b5797419e0c1dbfb3d1027",class:"r-radio-button--text"},o("slot",{key:"727d28f61edcedd691811deb4d11b04f28d4d94e",name:"title"},o("div",{key:"7c28eea698f22ef148521c593b29967faa1894b5",style:{display:"contents"}},o("slot",{key:"2baf89cb3b504485e66cfc078aaed56702faa542"}))),o("slot",{key:"f597341e0193cdd16823f034d13afdfa2df67816",name:"description"},this.description)),this.isTrailing&&o("div",{key:"c3fd194482bff5ae857ddd8dcfb66d40469a15db",class:"r-radio-button--trailing"},o("slot",{key:"b10cfea0a55b071a1917af1dd54dec0d4cc52eec",name:"trailing"}))),b&&u&&o("r-hint",{key:"6394f698090d9560afd362e17d01aec2866d20c3",role:"alert",variant:"error",id:`${d}-hint`},this.error),n&&o("r-hint",{key:"991941fa0d633872e37e7028ea78ed7914aa8f69",role:"note",variant:"information",id:`${d}-hint`},n))}get host(){return i(this)}};e.style=':host{display:inline-flex;outline:none;position:relative;pointer-events:auto;border:0.0625rem solid transparent;cursor:pointer;min-width:17.5rem}:host slot{display:contents}:host(:hover:not([disabled]:not([disabled=false])):not([checked]:not([checked=false]))){--r-radio-button--cursor:pointer;--r-radio-button--box--background-color:var(--r-background-interactive-hovered, rgba(40, 40, 40, 0.04))}:host(:active:not([disabled]:not([disabled=false])):not([checked]:not([checked=false]))){--r-radio-button--box--border-color:var(--r-border-regular, #282828);--r-radio-button--box--background-color:var(--r-background-interactive-pressed, rgba(40, 40, 40, 0.12))}:host(:focus-within),:host(.focused){--r-radio-button--box--box-shadow:0 0 0 4px var(--r-border-focused-outlined, #fff);--r-radio-button--box--outline:2px solid var(--r-border-focused, #0071e3);--r-radio-button--box--outline-offset:1px}:host([checked]:not([checked=false])),:host([checked]:not([checked=false]):hover){cursor:default;--r-radio-button--box--border-color:var(--r-border-regular, #282828);--r-radio-button--box--background-color:var(--r-background-interactive-softest, #fff);--r-radio-button--marker--transform:scale(1)}:host([invalid]:not([invalid=false])),:host([invalid]:not([invalid=false])[checked]:not([checked=false])){--r-radio-button--box--border-color:var(--r-status-error-regular, #da1e28);--r-radio-button--box--background-color:var(--r-status-error-soft, #fef6f6)}:host([disabled]:not([disabled=false])){--r-radio-button--box--opacity:0.4;cursor:not-allowed}.r-radio-button{display:var(--r-radio-button--display, flex);flex:var(--r-radio-button--flex, 1);gap:var(--r-radio-button--gap, var(--r-spacing-075, 0.75rem));position:var(--r-radio-button--position, relative);min-height:var(--r-radio-button--min-height, 24px);user-select:var(--r-radio-button--user-select, none);box-sizing:var(--r-radio-button--box-sizing, border-box);font-family:var(--r-radio-button--font-family, var(--r-font-family-text, system-ui));font-size:var(--r-radio-button--font-size, var(--r-font-size-400, 1rem));line-height:var(--r-radio-button--line-height, var(--r-line-height-m, 1.5rem));text-align:var(--r-radio-button--text-align, left);color:var(--r-radio-button--color, var(--r-text-regular, #282828));opacity:var(--r-radio-button--opacity, 1);box-shadow:var(--r-radio-button--box-shadow, none);outline:var(--r-radio-button--outline, none);cursor:var(--r-radio-button--cursor, inherit);padding:var(--r-radio-button--padding, var(--r-spacing-100, 1rem));margin:var(--r-radio-button--margin, 0);background-color:var(--r-radio-button--background-color, transparent);border-color:var(--r-radio-button--border-color, transparent);border-width:var(--r-radio-button--border-width, 0);border-style:var(--r-radio-button--border-style, solid)}.r-radio-button--input{position:var(--r-radio-button--input--position, absolute);z-index:var(--r-radio-button--input--z-index, -1);opacity:var(--r-radio-button--input--opacity, 0)}.r-radio-button--box{position:var(--r-radio-button--box--position, relative);display:var(--r-radio-button--box--display, block);top:var(--r-radio-button--box--top, 0);left:var(--r-radio-button--box--left, 0);width:var(--r-radio-button--box--width, 1.5rem);height:var(--r-radio-button--box--height, 1.5rem);background-color:var(--r-radio-button--box--background-color, var(--r-background-interactive-softest, #fff));border-width:var(--r-radio-button--box--border-width, 0.0625rem);border-style:var(--r-radio-button--box--border-style, solid);border-color:var(--r-radio-button--box--border-color, var(--r-border-soft, #686868));border-radius:var(--r-radio-button--box--border-radius, 50%);box-sizing:var(--r-radio-button--box--box-sizing, border-box);box-shadow:var(--r-radio-button--box--box-shadow, none);outline:var(--r-radio-button--box--outline, none);outline-offset:var(--r-radio-button--box--outline-offset, 0);cursor:var(--r-radio-button--box--cursor, inherit);opacity:var(--r-radio-button--box--opacity, 1)}.r-radio-button--box::before{content:var(--r-radio-button--marker--content, "");display:var(--r-radio-button--marker--display, block);width:var(--r-radio-button--marker--width, 0.75rem);height:var(--r-radio-button--marker--height, 0.75rem);position:var(--r-radio-button--marker--position, absolute);top:var(--r-radio-button--marker--top, calc(50% - 0.375rem));left:var(--r-radio-button--marker--left, calc(50% - 0.375rem));border-radius:var(--r-radio-button--marker--border-radius, 50%);background-color:var(--r-radio-button--marker--background-color, var(--r-background-interactive-regular, #282828));transition:var(--r-radio-button--marker--transition, 0.1s all);transform:var(--r-radio-button--marker--transform, scale(0));transform-origin:var(--r-radio-button--marker--transform-origin, center)}.r-radio-button--text{flex:var(--r-radio-button--text--flex, 1);display:var(--r-radio-button--text--display, flex);flex-direction:var(--r-radio-button--text--flex-direction, column);gap:var(--r-radio-button--text--gap, var(--r-spacing-025, 0.25rem));font-weight:var(--r-radio-button--text--font-weight, var(--r-font-weight-semibold, 600))}.r-radio-button--leading{min-height:var(--r-radio-button--leading--min-height, var(--r-spacing-150, 1.5rem));min-width:var(--r-radio-button--leading--min-width, calc(var(--r-spacing-150, 1.5rem) + 2 * var(--r-spacing-075, 0.75rem)));color:var(--r-radio-button--leading--color, var(--r-icon-soft, #686868));display:var(--r-radio-button--leading--display, flex);justify-content:var(--r-radio-button--leading--justify-content, center);align-items:var(--r-radio-button--leading--align-items, start)}';export{e as r_radio_button}
1
+ import{r,c as t,h as o,H as a,g as i}from"./p-CTxpqopm.js";const e=class{constructor(o){r(this,o),this.rChange=t(this,"rChange"),this.rReset=t(this,"rReset"),this.radioButtonClick=t(this,"radioButtonClick"),this.radioButtonKeydown=t(this,"radioButtonKeydown"),this.radioButtonDeselect=t(this,"radioButtonDeselect"),this.value=this.slotTextValue,this.uniqueId=`r-radio-button-${Date.now().toString(32)}${Math.random().toString(32)}`.replace(/\./g,""),this.onClick=r=>{this.disabled||(r.stopPropagation(),r.preventDefault(),this.radioButtonClick.emit(r))},this.onKeydown=r=>{this.disabled||this.radioButtonKeydown.emit(r)},this.onFocus=()=>{this.host.classList.add("focused")},this.onBlur=()=>{this.host.classList.remove("focused")}}async setFocus(){this.nativeEl.focus()}async setBlur(){this.nativeEl.blur()}async select(){var r;if(this.checked)return;if(this.disabled)return;null===(r=this.radioElements)||void 0===r||r.forEach((r=>{r.checked=!1,r.shadowRoot.querySelector(".r-radio-button--input").setAttribute("tabindex","-1")})),this.checked=!0,this.nativeEl.setAttribute("tabindex","0"),this.nativeEl.focus();const{host:t,value:o,checked:a}=this;this.rChange.emit({element:t,value:o,checked:a})}get radioElements(){return this.groupEl?this.groupEl.querySelectorAll("r-radio-button"):this.parentFormEl?this.parentFormEl.querySelectorAll(`r-radio-button[name=${this.name}]`):document.querySelectorAll(`r-radio-button[name=${this.name}]`)}get slotTextValue(){return this.host.textContent||null}get groupEl(){return this.host.closest("r-radio-group")||null}get parentFormEl(){return this.host.closest("form")||null}get isLeading(){return void 0!==this.icon||null!==this.host.querySelector('[slot="leading"]')||null!==this.host.querySelector("r-radio-button-leading")}get isTrailing(){return null!==this.host.querySelector('[slot="trailing"]')||null!==this.host.querySelector("r-radio-button-trailing")}componentWillLoad(){this.initialState||(this.initialState=this.checked),this.groupEl&&!this.name&&(this.name=this.groupEl.name)}render(){const{name:r,value:t,checked:i,disabled:e,hint:n,uniqueId:d,required:s,invalid:b,error:u}=this;return o(a,{key:"862574a20e04e55e3e7e0b8cb48131652f029030"},o("label",{key:"b916e9d5740605bad9a1f88c6bb07d0564b63f16",class:"r-radio-button",onClick:this.onClick,onKeyDown:this.onKeydown},o("input",Object.assign({key:"d0ca90e85e619d8c5b9a8c71ae1582db65562036"},{type:"radio",tabindex:"-1",name:r,value:t,disabled:e,checked:i,required:s},{id:`${d}-input`,class:"r-radio-button--input",ref:r=>this.nativeEl=r,onFocus:this.onFocus,onBlur:this.onBlur})),o("span",{key:"f77f3e56e88c5e3ad1f3e36e5f96715edb7e91cc",class:"r-radio-button--box"}),this.isLeading&&o("div",{key:"60d6a15880fafd8007d20a80137b30f19d4f641e",class:"r-radio-button--leading"},o("slot",{key:"9329c56d97e5e357ea70d165ee11ac171c605519",name:"leading"},this.icon&&o("r-icon",{key:"ace86d3b61cd39f05ca3146e54d3ae4820d7b66d",name:this.icon,size:"m"}))),o("div",{key:"7773e0c5b2348245e4b4dafc06a6b10a6dc245c3",class:"r-radio-button--text"},o("slot",{key:"f060b0853a7a6ed0108d0182669807fd0236da33",name:"title"},o("div",{key:"1ca5059e718a0bda9a53e2e0f630a617d0252638",style:{display:"contents"}},o("slot",{key:"cb9128b915d2a71cff7e8960d5bd86973c615232"}))),o("slot",{key:"f07a62e2caa36ceb27bc547cf86c7dfcdce1c5b4",name:"description"},this.description)),this.isTrailing&&o("div",{key:"cc5e6dff1c324fdce239f8d4e553e154bdb73eac",class:"r-radio-button--trailing"},o("slot",{key:"3d5e862c5830adb7a480fbb71ff92fef054bf1f7",name:"trailing"}))),b&&u&&o("r-hint",{key:"997b440b69a23cb432b8376b0351a947ec3b162e",role:"alert",variant:"error",id:`${d}-hint`},this.error),n&&o("r-hint",{key:"d3c41065b4924f42a2971d1cb91154e8e3041238",role:"note",variant:"information",id:`${d}-hint`},n))}get host(){return i(this)}};e.style=':host{display:inline-flex;outline:none;position:relative;pointer-events:auto;border:0.0625rem solid transparent;cursor:pointer;min-width:17.5rem}:host slot{display:contents}:host(:hover:not([disabled]:not([disabled=false])):not([checked]:not([checked=false]))){--r-radio-button--cursor:pointer;--r-radio-button--box--background-color:var(--r-background-interactive-hovered, rgba(40, 40, 40, 0.04))}:host(:active:not([disabled]:not([disabled=false])):not([checked]:not([checked=false]))){--r-radio-button--box--border-color:var(--r-border-regular, #282828);--r-radio-button--box--background-color:var(--r-background-interactive-pressed, rgba(40, 40, 40, 0.12))}:host(:focus-within),:host(.focused){--r-radio-button--box--box-shadow:0 0 0 4px var(--r-border-focused-outlined, #fff);--r-radio-button--box--outline:2px solid var(--r-border-focused, #0071e3);--r-radio-button--box--outline-offset:1px}:host([checked]:not([checked=false])),:host([checked]:not([checked=false]):hover){cursor:default;--r-radio-button--box--border-color:var(--r-border-regular, #282828);--r-radio-button--box--background-color:var(--r-background-interactive-softest, #fff);--r-radio-button--marker--transform:scale(1)}:host([invalid]:not([invalid=false])),:host([invalid]:not([invalid=false])[checked]:not([checked=false])){--r-radio-button--box--border-color:var(--r-status-error-regular, #da1e28);--r-radio-button--box--background-color:var(--r-status-error-soft, #fef6f6)}:host([disabled]:not([disabled=false])){--r-radio-button--box--opacity:0.4;cursor:not-allowed}.r-radio-button{display:var(--r-radio-button--display, flex);flex:var(--r-radio-button--flex, 1);gap:var(--r-radio-button--gap, var(--r-spacing-075, 0.75rem));position:var(--r-radio-button--position, relative);min-height:var(--r-radio-button--min-height, 24px);user-select:var(--r-radio-button--user-select, none);box-sizing:var(--r-radio-button--box-sizing, border-box);font-family:var(--r-radio-button--font-family, var(--r-font-family-text, system-ui));font-size:var(--r-radio-button--font-size, var(--r-font-size-400, 1rem));line-height:var(--r-radio-button--line-height, var(--r-line-height-m, 1.5rem));text-align:var(--r-radio-button--text-align, left);color:var(--r-radio-button--color, var(--r-text-regular, #282828));opacity:var(--r-radio-button--opacity, 1);box-shadow:var(--r-radio-button--box-shadow, none);outline:var(--r-radio-button--outline, none);cursor:var(--r-radio-button--cursor, inherit);padding:var(--r-radio-button--padding, var(--r-spacing-100, 1rem));margin:var(--r-radio-button--margin, 0);background-color:var(--r-radio-button--background-color, transparent);border-color:var(--r-radio-button--border-color, transparent);border-width:var(--r-radio-button--border-width, 0);border-style:var(--r-radio-button--border-style, solid)}.r-radio-button--input{position:var(--r-radio-button--input--position, absolute);z-index:var(--r-radio-button--input--z-index, -1);opacity:var(--r-radio-button--input--opacity, 0)}.r-radio-button--box{position:var(--r-radio-button--box--position, relative);display:var(--r-radio-button--box--display, block);top:var(--r-radio-button--box--top, 0);left:var(--r-radio-button--box--left, 0);width:var(--r-radio-button--box--width, 1.5rem);height:var(--r-radio-button--box--height, 1.5rem);background-color:var(--r-radio-button--box--background-color, var(--r-background-interactive-softest, #fff));border-width:var(--r-radio-button--box--border-width, 0.0625rem);border-style:var(--r-radio-button--box--border-style, solid);border-color:var(--r-radio-button--box--border-color, var(--r-border-soft, #686868));border-radius:var(--r-radio-button--box--border-radius, 50%);box-sizing:var(--r-radio-button--box--box-sizing, border-box);box-shadow:var(--r-radio-button--box--box-shadow, none);outline:var(--r-radio-button--box--outline, none);outline-offset:var(--r-radio-button--box--outline-offset, 0);cursor:var(--r-radio-button--box--cursor, inherit);opacity:var(--r-radio-button--box--opacity, 1)}.r-radio-button--box::before{content:var(--r-radio-button--marker--content, "");display:var(--r-radio-button--marker--display, block);width:var(--r-radio-button--marker--width, 0.75rem);height:var(--r-radio-button--marker--height, 0.75rem);position:var(--r-radio-button--marker--position, absolute);top:var(--r-radio-button--marker--top, calc(50% - 0.375rem));left:var(--r-radio-button--marker--left, calc(50% - 0.375rem));border-radius:var(--r-radio-button--marker--border-radius, 50%);background-color:var(--r-radio-button--marker--background-color, var(--r-background-interactive-regular, #282828));transition:var(--r-radio-button--marker--transition, 0.1s all);transform:var(--r-radio-button--marker--transform, scale(0));transform-origin:var(--r-radio-button--marker--transform-origin, center)}.r-radio-button--text{flex:var(--r-radio-button--text--flex, 1);display:var(--r-radio-button--text--display, flex);flex-direction:var(--r-radio-button--text--flex-direction, column);gap:var(--r-radio-button--text--gap, var(--r-spacing-025, 0.25rem));font-weight:var(--r-radio-button--text--font-weight, var(--r-font-weight-semibold, 600))}.r-radio-button--leading{min-height:var(--r-radio-button--leading--min-height, var(--r-spacing-150, 1.5rem));min-width:var(--r-radio-button--leading--min-width, calc(var(--r-spacing-150, 1.5rem) + 2 * var(--r-spacing-075, 0.75rem)));color:var(--r-radio-button--leading--color, var(--r-icon-soft, #686868));display:var(--r-radio-button--leading--display, flex);justify-content:var(--r-radio-button--leading--justify-content, center);align-items:var(--r-radio-button--leading--align-items, start)}';export{e as r_radio_button}
@@ -1 +1 @@
1
- import{r as t,h as a,H as o,g as r}from"./p-CTxpqopm.js";const i=class{constructor(a){t(this,a),this.updateHiddenState=()=>{this.host.setAttribute("aria-hidden",`${this.hasChildren}`)}}get hasChildren(){return this.host.children.length<1}componentWillLoad(){this.updateHiddenState()}render(){return a(o,{key:"08295a30da71cd722c6bac43859958b73ba66f67"},a("div",{key:"74153035c46d0dd8951e7e380d28dcf924d2772b",class:"r-toast-group"},a("slot",{key:"5f550f96d9dad032c71f5f99194b15c133d08cc3",onSlotchange:this.updateHiddenState})))}get host(){return r(this)}};i.style="@media (max-width: 767px){:host{--width:auto;--right:24px;--bottom:auto;--left:24px;--padding-right:0}}:host([aria-hidden=false]){--display:block}:host{display:var(--display, none);position:var(--position, fixed);top:var(--top, 32px);right:var(--right, 0);bottom:var(--bottom, auto);left:var(--left, auto);overflow:var(--overflow, hidden);overflow-y:var(--overflow-y, auto);width:var(--width, 352px);max-height:var(--max-height, calc(100vh - 64px));padding-right:var(--padding-right, 32px);padding-bottom:var(--padding-bottom, 32px);z-index:var(--z-index, 1)}.r-toast-group{position:relative;display:var(--r-toast-group--display, flex);flex-direction:var(--r-toast-group--flex-direction, column-reverse);justify-content:var(--r-toast-group--justify-content, flex-end);gap:var(--r-toast-group--gap, 16px)}.r-toast-group ::slotted(r-toast[aria-hidden=true]){--animation-name:slideOut}.r-toast-group ::slotted(r-toast[aria-hidden=false]){--animation-name:slideIn}";export{i as r_toast_group}
1
+ import{r as t,h as a,H as o,g as r}from"./p-CTxpqopm.js";const i=class{constructor(a){t(this,a),this.updateHiddenState=()=>{this.host.setAttribute("aria-hidden",`${this.hasChildren}`)}}get hasChildren(){return this.host.children.length<1}componentWillLoad(){this.updateHiddenState()}render(){return a(o,{key:"cd72702e1eee0d746e85c2022038972dea391dba"},a("div",{key:"86bce60683eab444715fa266d39cada11bf19ce4",class:"r-toast-group"},a("slot",{key:"594c29dc3b2ba4762d8a5b7876a47923d11f6f86",onSlotchange:this.updateHiddenState})))}get host(){return r(this)}};i.style="@media (max-width: 767px){:host{--width:auto;--right:24px;--bottom:auto;--left:24px;--padding-right:0}}:host([aria-hidden=false]){--display:block}:host{display:var(--display, none);position:var(--position, fixed);top:var(--top, 32px);right:var(--right, 0);bottom:var(--bottom, auto);left:var(--left, auto);overflow:var(--overflow, hidden);overflow-y:var(--overflow-y, auto);width:var(--width, 352px);max-height:var(--max-height, calc(100vh - 64px));padding-right:var(--padding-right, 32px);padding-bottom:var(--padding-bottom, 32px);z-index:var(--z-index, 1)}.r-toast-group{position:relative;display:var(--r-toast-group--display, flex);flex-direction:var(--r-toast-group--flex-direction, column-reverse);justify-content:var(--r-toast-group--justify-content, flex-end);gap:var(--r-toast-group--gap, 16px)}.r-toast-group ::slotted(r-toast[aria-hidden=true]){--animation-name:slideOut}.r-toast-group ::slotted(r-toast[aria-hidden=false]){--animation-name:slideIn}";export{i as r_toast_group}
@@ -1 +1 @@
1
- import{r as t,h as o,H as r,g as e}from"./p-CTxpqopm.js";import{s,a as n}from"./p-B9rsR6cQ.js";import{f as a}from"./p-ky1yonnS.js";import"./p-4Uv3PpKT.js";const i=class{constructor(o){t(this,o),this.handleSlotChange=()=>{this.setButtonDefaults()}}connectedCallback(){this.setButtonDefaults();const t=this.host.closest("r-popover");s(this.host,t)}disconnectedCallback(){const t=this.host.closest("r-popover");n(this.host,t)}setButtonDefaults(){this.host.querySelectorAll("r-button").forEach((t=>{t.hasAttribute("size")||t.setAttribute("size","small"),t.hasAttribute("variant")||t.setAttribute("variant","text-inline")}))}async setFocus(){if(this.activeElement){if(!("setFocus"in this.activeElement)||"function"!=typeof this.activeElement.setFocus)return this.activeElement.focus(),this.activeElement;await this.activeElement.setFocus()}}async setBlur(){var t;null===(t=this.activeElement)||void 0===t||t.blur()}get activeElement(){return this.getActiveElements[0]||null}async getActiveElements(){return a(this.host)}render(){return o(r,{key:"e4fc2a07f1625dc2b4ad7b99f68cd73ef9dc4a92",slot:"action"},o("slot",{key:"220a5d1131b8091739e550563005e052aa389f2c",onSlotchange:this.handleSlotChange}))}get host(){return e(this)}};i.style=":host slot{display:contents}::slotted(r-button){--r-button--color:var(--r-text-regular);--r-button--border-color:rgba(0,0,0,0);--r-button--background-color:rgba(0,0,0,0);--r-button--slot--position:relative;--r-button--slot--text-decoration:underline;--r-button--padding:12px 0.125rem 19px 0.125rem;--r-button--slot--text-underline-offset:12px}::slotted(r-button:hover:not([disabled]):not([disabled=false])){--r-button--border-color:var(--r-border-soft);--r-button--background-color:var(--r-background-interactive-hovered)}::slotted(r-button:active:not([disabled]):not([disabled=false])){--r-button--background-color:var(--r-background-interactive-pressed);--r-button--border-color:var(--r-border-soft)}";export{i as r_popover_action}
1
+ import{r as t,h as o,H as r,g as e}from"./p-CTxpqopm.js";import{s,a as n}from"./p-B9rsR6cQ.js";import{f as a}from"./p-ky1yonnS.js";import"./p-4Uv3PpKT.js";const i=class{constructor(o){t(this,o),this.handleSlotChange=()=>{this.setButtonDefaults()}}connectedCallback(){this.setButtonDefaults();const t=this.host.closest("r-popover");s(this.host,t)}disconnectedCallback(){const t=this.host.closest("r-popover");n(this.host,t)}setButtonDefaults(){this.host.querySelectorAll("r-button").forEach((t=>{t.hasAttribute("size")||t.setAttribute("size","small"),t.hasAttribute("variant")||t.setAttribute("variant","text-inline")}))}async setFocus(){if(this.activeElement){if(!("setFocus"in this.activeElement)||"function"!=typeof this.activeElement.setFocus)return this.activeElement.focus(),this.activeElement;await this.activeElement.setFocus()}}async setBlur(){var t;null===(t=this.activeElement)||void 0===t||t.blur()}get activeElement(){return this.getActiveElements[0]||null}async getActiveElements(){return a(this.host)}render(){return o(r,{key:"573250bc4f9a1a8725e8808885854ca320b203bc",slot:"action"},o("slot",{key:"d753af20723fb9e2ae49f9977cda81fa1c3df8c6",onSlotchange:this.handleSlotChange}))}get host(){return e(this)}};i.style=":host slot{display:contents}::slotted(r-button){--r-button--color:var(--r-text-regular);--r-button--border-color:rgba(0,0,0,0);--r-button--background-color:rgba(0,0,0,0);--r-button--slot--position:relative;--r-button--slot--text-decoration:underline;--r-button--padding:12px 0.125rem 19px 0.125rem;--r-button--slot--text-underline-offset:12px}::slotted(r-button:hover:not([disabled]):not([disabled=false])){--r-button--border-color:var(--r-border-soft);--r-button--background-color:var(--r-background-interactive-hovered)}::slotted(r-button:active:not([disabled]):not([disabled=false])){--r-button--background-color:var(--r-background-interactive-pressed);--r-button--border-color:var(--r-border-soft)}";export{i as r_popover_action}
@@ -1 +1 @@
1
- import{r as e,h as r,H as t,g as i}from"./p-CTxpqopm.js";const a=class{constructor(r){e(this,r),this.complete=!1,this.active=!1}get hasText(){return this.host.textContent.trim().length>0}render(){const e=this.number||this.stepNumber;return r(t,{key:"da138932ffd8de4f13e7d50862fa99d279c0a10d"},r("div",{key:"f4f1f7c771468414dc17e0e6334221420090997a",class:"r-stepper-item"},r("div",{key:"55feda971e674ca7acff8fa61e394054d292f891",class:"r-stepper-item--indicator"},this.complete?r("r-icon",{name:"check",size:"s"}):this.icon?r("r-icon",{name:this.icon,size:"s"}):void 0!==e?r("span",{class:"r-stepper-item--indicator--step-number"},e):null),this.hasText&&r("div",{key:"4bf7e992a5420fe8b4333cf95c128ff13e4fd89f",class:"r-stepper-item--text"},r("slot",{key:"4aa4a9bf18fc17cdf15db2b922349f8b4a29e0d8"}))))}get host(){return i(this)}};a.style=":host([active]){--r-stepper-item--indicator--background-color:var(--r-background-inverse, #282828);--r-stepper-item--color:var(--r-text-inverse, #FFF);--r-stepper-item--text--color:var(--r-text-regular, #282828);--r-stepper-item--indicator--border-color:transparent}:host([complete]){--r-stepper-item--indicator--background-color:var(--r-status-success-regular, #298535);--r-stepper-item--color:var(--r-text-inverse, #FFF);--r-stepper-item--text--color:var(--r-text-regular, #282828);--r-stepper-item--indicator--border-color:transparent}.r-stepper-item{display:var(--r-stepper-item--display, flex);flex-direction:var(--r-stepper-item--flex-direction, column);align-items:var(--r-stepper-item--align-items, center);justify-content:var(--r-stepper-item--justify-content, center);font-size:var(--r-stepper-item--font-size, var(--r-font-size-200, 13px));color:var(--r-stepper-item--color, var(--r-text-soft, #686868));font-family:var(--r-stepper-item--font-family, var(--r-font-family-text, system-ui));width:var(--r-stepper-item--width, 36px);white-space:var(--r-stepper-item--white-space, nowrap);gap:var(--r-stepper-item--gap, 8px)}.r-stepper-item--indicator{width:var(--r-stepper-item--indicator--width, 20px);height:var(--r-stepper-item--indicator--height, 20px);line-height:var(--r-stepper-item--indicator--line-height, 20px);border-radius:var(--r-stepper-item--indicator--border-radius, 50%);background-color:var(--r-stepper-item--indicator--background-color, transparent);display:var(--r-stepper-item--indicator--display, flex);justify-content:var(--r-stepper-item--indicator--justify-content, center);align-items:var(--r-stepper-item--indicator--align-items, center);border-width:var(--r-stepper-item--indicator--border-width, 1px);border-style:var(--r-stepper-item--indicator--border-style, solid);border-color:var(--r-stepper-item--indicator--border-color, var(--r-border-soft, #686868));margin-left:var(--r-stepper-item--indicator--margin-left, 8px);margin-right:var(--r-stepper-item--indicator--margin-right, 8px)}.r-stepper-item--indicator--step-number{vertical-align:var(--r-stepper-item--step-number--vertical-align, middle)}.r-stepper-item--text{font-size:var(--r-stepper-item--text--font-size, var(--r-font-size-200, 13px));color:var(--r-stepper-item--text--color, var(--r-text-soft, #686868));text-align:var(--r-stepper-item--text--text-align, center)}";export{a as r_stepper_item}
1
+ import{r as e,h as r,H as t,g as i}from"./p-CTxpqopm.js";const a=class{constructor(r){e(this,r),this.complete=!1,this.active=!1}get hasText(){return this.host.textContent.trim().length>0}render(){const e=this.number||this.stepNumber;return r(t,{key:"a5004ade661b4abfacb920a256f6a12bbd32a6ea"},r("div",{key:"1358044cc918c2988a2f32198b0a8260cf439ec0",class:"r-stepper-item"},r("div",{key:"ec2afea7c0b6d603ebce7dda25e93246fafb248a",class:"r-stepper-item--indicator"},this.complete?r("r-icon",{name:"check",size:"s"}):this.icon?r("r-icon",{name:this.icon,size:"s"}):void 0!==e?r("span",{class:"r-stepper-item--indicator--step-number"},e):null),this.hasText&&r("div",{key:"6cf7607d13bdd0bd58885e5cc4c74c0068448dfc",class:"r-stepper-item--text"},r("slot",{key:"8c47f057e435924f8c004be5f3112743127bf885"}))))}get host(){return i(this)}};a.style=":host([active]){--r-stepper-item--indicator--background-color:var(--r-background-inverse, #282828);--r-stepper-item--color:var(--r-text-inverse, #FFF);--r-stepper-item--text--color:var(--r-text-regular, #282828);--r-stepper-item--indicator--border-color:transparent}:host([complete]){--r-stepper-item--indicator--background-color:var(--r-status-success-regular, #298535);--r-stepper-item--color:var(--r-text-inverse, #FFF);--r-stepper-item--text--color:var(--r-text-regular, #282828);--r-stepper-item--indicator--border-color:transparent}.r-stepper-item{display:var(--r-stepper-item--display, flex);flex-direction:var(--r-stepper-item--flex-direction, column);align-items:var(--r-stepper-item--align-items, center);justify-content:var(--r-stepper-item--justify-content, center);font-size:var(--r-stepper-item--font-size, var(--r-font-size-200, 13px));color:var(--r-stepper-item--color, var(--r-text-soft, #686868));font-family:var(--r-stepper-item--font-family, var(--r-font-family-text, system-ui));width:var(--r-stepper-item--width, 36px);white-space:var(--r-stepper-item--white-space, nowrap);gap:var(--r-stepper-item--gap, 8px)}.r-stepper-item--indicator{width:var(--r-stepper-item--indicator--width, 20px);height:var(--r-stepper-item--indicator--height, 20px);line-height:var(--r-stepper-item--indicator--line-height, 20px);border-radius:var(--r-stepper-item--indicator--border-radius, 50%);background-color:var(--r-stepper-item--indicator--background-color, transparent);display:var(--r-stepper-item--indicator--display, flex);justify-content:var(--r-stepper-item--indicator--justify-content, center);align-items:var(--r-stepper-item--indicator--align-items, center);border-width:var(--r-stepper-item--indicator--border-width, 1px);border-style:var(--r-stepper-item--indicator--border-style, solid);border-color:var(--r-stepper-item--indicator--border-color, var(--r-border-soft, #686868));margin-left:var(--r-stepper-item--indicator--margin-left, 8px);margin-right:var(--r-stepper-item--indicator--margin-right, 8px)}.r-stepper-item--indicator--step-number{vertical-align:var(--r-stepper-item--step-number--vertical-align, middle)}.r-stepper-item--text{font-size:var(--r-stepper-item--text--font-size, var(--r-font-size-200, 13px));color:var(--r-stepper-item--text--color, var(--r-text-soft, #686868));text-align:var(--r-stepper-item--text--text-align, center)}";export{a as r_stepper_item}
@@ -1 +1 @@
1
- import{r as a,c as e,h as r,H as t,g as n}from"./p-CTxpqopm.js";const l=class{constructor(r){a(this,r),this.panelStateChanged=e(this,"panelStateChanged"),this.hasHeader=!1,this.active=!1,this.hasFooter=!1,this.variant="visible",this.collapsed=!1,this.labelCollapse="collapse-panel",this.labelExpand="expand-panel",this.isCollapsed=this.collapsed,this.updateCurrentLocationBound=this.updateCurrentLocation.bind(this),this.handleSemiCollapsedButtonClick=()=>{this.togglePanel();document.querySelectorAll("r-list-item[expanded]").forEach(this.isCollapsed?a=>{a.removeAttribute("expanded")}:a=>{a.setAttribute("expanded","")})},this.handleFullyCollapsedButtonClick=()=>{this.collapsePanel()}}toggleSubItems(a){const e=a.target;"R-LIST-ITEM"===e.tagName&&this.isCollapsed&&this.variant&&e.hasAttribute("has-sub-items")&&this.expandPanel()}async togglePanel(){this.isCollapsed=!this.isCollapsed}async expandPanel(){this.isCollapsed=!1}async collapsePanel(){this.isCollapsed=!0}handleCollapseChange(a){this.isCollapsed=a,"drawer"!==this.variant&&"modal"!==this.variant||(localStorage.setItem("panelState",JSON.stringify(a)),this.panelStateChanged.emit({collapsed:a}))}watchVariant(a){this.isCollapsed="modal"===a}handleDocumentClick(a){this.handleClickOutside(a)}getNavLinks(){return document.querySelectorAll("r-list-item[href]")}get isVariantCollapsible(){return"modal"===this.variant}handleClickOutside(a){"R-BUTTON"===a.target.tagName||this.host.contains(a.target)||!this.isVariantCollapsible||this.isCollapsed||this.collapsePanel()}componentWillLoad(){if(this.isCollapsed=this.isVariantCollapsible,"drawer"===this.variant){const a=localStorage.getItem("panelState");this.isCollapsed=a?JSON.parse(a):this.isCollapsed}}componentWillRender(){window.addEventListener("popstate",this.updateCurrentLocationBound),window.addEventListener("hashchange",this.updateCurrentLocationBound),this.highlightCurrentLink()}componentDidRender(){this.highlightCurrentLink()}disconnectedCallback(){window.removeEventListener("popstate",this.updateCurrentLocationBound),window.removeEventListener("hashchange",this.updateCurrentLocationBound)}updateCurrentLocation(){this.currentLocation=window.location.hash?window.location.hash.slice(1):window.location.href,this.highlightCurrentLink()}highlightCurrentLink(){this.getNavLinks().forEach((a=>{if(a instanceof HTMLElement){const e=a.getAttribute("href"),r=e===this.currentLocation||e===window.location.pathname+window.location.hash;this.updateLinkState(a,r)}}));const a=document.querySelector(".active");a&&a.scrollIntoView({behavior:"smooth",block:"end"})}updateLinkState(a,e){e?(a.setAttribute("active",""),a.classList.add("active"),this.expandParentMenus(a),this.highlightParent(a)):(a.removeAttribute("active"),a.classList.remove("active"))}highlightParent(a){const e=a.parentElement;e&&"R-LIST-ITEM"===e.tagName&&e.setAttribute("active-parent","")}expandParentMenus(a){var e;let r=a.closest("r-list-item[has-sub-items]");for(;r&&!this.isCollapsed;)r.setAttribute("expanded",""),r=null===(e=r.parentElement)||void 0===e?void 0:e.closest("r-panel")}render(){return r(t,{key:"41f14dda471fd98e8843833e3caa6814d2d14ea8",collapsed:this.isCollapsed},r("div",{key:"5ed7abdf08500941fc6b514856456b71a2f33274",class:"r-panel"},r("div",{key:"f94593f5439b666da6dbd92b76a98d7d0bea071e",class:"r-panel--header"},this.hasHeader&&r("a",{key:"a617f6b566f29e08e689125095222f3c5dea14a2",class:"logo-wrapper",href:this.logoLink},r("slot",this.isCollapsed?{name:"logo-collapsed"}:{name:"logo-expanded"})),"modal"===this.variant?r("r-button",{class:"r-panel--trigger",variant:"blank",title:`${this.labelCollapse}`,icon:"cross","r-aria-label":`${this.labelCollapse}`,onClick:this.handleFullyCollapsedButtonClick}):"drawer"===this.variant?r("r-button",{class:"r-panel--trigger",variant:"blank",title:this.isCollapsed?`${this.labelExpand}`:`${this.labelCollapse}`,icon:"angle-left","r-aria-label":this.isCollapsed?`${this.labelExpand}`:`${this.labelCollapse}`,onClick:this.handleSemiCollapsedButtonClick}):null),r("div",{key:"a2c98c21a619d955bb82de3957536cd289862994",class:"r-panel--body"},r("slot",{key:"79a604fb1d08ad566fc75627e69f85d4a7265453"})),this.hasFooter&&!this.isCollapsed&&r("div",{key:"660527840eb47c68d2d331d3f930f583bf78b743",class:"r-panel--footer"},r("slot",{key:"34ff8e9fc74abdbe048801b4024264d7715b76d2",name:"footer"}))))}get host(){return n(this)}static get watchers(){return{isCollapsed:["handleCollapseChange"],variant:["watchVariant"]}}};l.style=":host{--r-panel--min-width:300px;--r-panel--background-color:var(--r-background-soft, #F3F1F0);--r-panel--display:flex;--r-panel--flex-direction:column;--r-panel--position:fixed;--r-panel--align-items:flex-start;--r-panel--top:0;--r-panel--padding:var(--spacing-050, 8px) 0;--r-panel--width:300px;--r-panel--height:100%;--r-panel--color:var(--r-text-regular, #282828);--r-panel--transition:all 250ms ease-in-out;--r-panel--transform:none;--r-panel--font-family:var(--r-font-family-text);--r-panel--left:0;--r-panel--header--display:flex;--r-panel--header--padding:var(--spacing-075, 12px) var(--spacing-100, 16px) var(--spacing-075, 12px) var(--spacing-100, 16px);--r-panel--header--justify-content:space-between;--r-panel--header--align-items:center;--r-panel--header--align-self:stretch;--r-panel--header--icon-rotate:none;--r-panel--header--flex-direction:row;--r-panel--header--gap:50px;--r-panel--header--logo--img--width:100%;--r-panel--header--logo--img--height:auto;--r-panel--header--logo--img--expanded--width:192px;--r-panel--header--logo--img--collapsed--width:30px;--r-panel--header--height:unset;--r-panel--body--display:block;--r-panel--body--flex-grow:1;--r-panel--body--align-self:stretch;--r-panel--body--overflow:auto;--r-panel--body--padding:var(--r-spacing-025, 4px) var(--spacing-050, 8px) 0;--r-panel--body-header--color:var(--r-text-soft, #686868);--r-panel--body-header--padding:var(--spacing-100, 16px) 0 var(--spacing-100, 16px);--r-panel--body-header--width:268px;--r-panel--footer--dispay:flex;--r-panel--footer--padding:var(--spacing-100, 16px) var(--spacing-100, 16px) var(--spacing-150, 24px) var(--spacing-100, 16px);--r-panel--footer--flex-direction:column;--r-panel--footer--justify-content:center;--r-panel--footer-gap:var(--spacing-100, 16px);--r-panel--footer--align-self:stretch;--r-panel--footer--text-align:center}:host([variant=drawer]) r-button{--r-button--padding:10px;--r-button--background:var(--r-background-interactive-softer, #E7E4E2);--r-button--border-radius:10%;--r-button--slot--position:relative;--r-button--left:5%}:host([variant=drawer][collapsed]){--r-panel--width:72px;--r-panel--header--display:none;--r-panel--header--icon-rotate:rotate(180deg);--r-panel--header--logo--expaned--display:none;--r-panel--header--logo--collapsed--display:block;--r-panel--header--flex-direction:column;--r-panel--header--gap:12px;--r-list-item--epxanded--background-color:rgba(40, 40, 40, 0.08)}:host([variant=drawer][collapsed]) r-button{--r-button--slot--position:inherit;transition:transform 250ms ease-in-out}:host([variant=modal][collapsed]){--r-panel--transform:translate(-100%)}:host([collapsed]:not([variant=modal])){--r-panel--min-width:0;--r-list-item--text--display:none;--r-list-item--trailing--display:none}:host([variant=drawer]:not([has-header]):not([collapsed])),:host([variant=drawer][has-header=false]:not([collapsed])){--r-panel--header--height:24px;--r-panel--header--padding:var(--spacing-075, 12px) var(--spacing-050, 8px) 0 var(--spacing-100, 16px)}:host([variant=drawer]:not([has-header]):not([collapsed])) r-button,:host([variant=drawer][has-header=false]:not([collapsed])) r-button{--r-button--top:20%;--r-button--left:97%}:host([collapsed]){--r-list-item--active-parent--background-color:rgba(40, 40, 40, 0.08)}.r-panel{z-index:2;min-width:var(--r-panel--min-width);background-color:var(--r-panel--background-color);display:var(--r-panel--display);flex-direction:var(--r-panel--flex-direction);align-items:var(--r-panel--align-items);width:var(--r-panel--width);height:var(--r-panel--height);position:var(--r-panel--position);top:var(--r-panel--top);padding:var(--r-panel--padding);color:var(--r-panel--color);transition:var(--r-panel--transition);transform:var(--r-panel--transform);left:var(--r-panel--left);font-family:var(--r-panel--font-family);box-sizing:border-box}.r-panel .logo-wrapper .logo-expanded{width:var(--r-panel--header--logo--img--expanded--width)}.r-panel .logo-wrapper .logo-collapsed{width:var(--r-panel--header--logo--img--collapsed--width)}.r-panel .logo-wrapper img{width:var(--r-panel--header--logo--img--width);height:var(--r-panel--header--logo--img--height)}.r-panel .logo-wrapper:focus,.r-panel .logo-wrapper:focus-visible{box-shadow:0 0 0 6px var(--r-border-focused-outlined, #fff);outline:2px solid var(--r-border-focused, #0071e3);outline-offset:2px}.r-panel--header{display:flex;padding:var(--r-panel--header--padding);justify-content:var(--r-panel--header--justify-content);align-items:var(--r-panel--header--align-items);align-self:var(--r-panel--header--align-self);flex-direction:var(--r-panel--header--flex-direction);gap:var(--r-panel--header--gap);height:var(--r-panel--header--height)}.r-panel--header r-button{--r-button--padding:0;transform:var(--r-panel--header--icon-rotate);background:var(--r-button--background);position:var(--r-button--slot--position);left:var(--r-button--left);top:var(--r-button--top);border-radius:var(--r-button--border-radius)}.r-panel--body{flex-grow:var(--r-panel--body--flex-grow);align-self:var(--r-panel--body--align-self);display:var(--r-panel--body--display);overflow:var(--r-panel--body--overflow);padding:var(--r-panel--body--padding)}.r-panel--body ::slotted(.header){color:var(--r-panel--body-header--color);padding:var(--r-panel--body-header--padding);display:var(--r-panel--header--display);width:var(--r-panel--body-header--width)}.r-panel ::slotted([slot=footer]){display:var(--r-panel--footer--dispay);padding:var(--r-panel--footer--padding);flex-direction:var(--r-panel--footer--flex-direction);justify-content:var(--r-panel--footer--justify-content);gap:var(--r-panel--footer-gap);align-self:var(--r-panel--footer--align-self);text-align:var(--r-panel--footer--text-align)}";export{l as r_panel}
1
+ import{r as a,c as e,h as r,H as t,g as n}from"./p-CTxpqopm.js";const l=class{constructor(r){a(this,r),this.panelStateChanged=e(this,"panelStateChanged"),this.hasHeader=!1,this.active=!1,this.hasFooter=!1,this.variant="visible",this.collapsed=!1,this.labelCollapse="collapse-panel",this.labelExpand="expand-panel",this.isCollapsed=this.collapsed,this.updateCurrentLocationBound=this.updateCurrentLocation.bind(this),this.handleSemiCollapsedButtonClick=()=>{this.togglePanel();document.querySelectorAll("r-list-item[expanded]").forEach(this.isCollapsed?a=>{a.removeAttribute("expanded")}:a=>{a.setAttribute("expanded","")})},this.handleFullyCollapsedButtonClick=()=>{this.collapsePanel()}}toggleSubItems(a){const e=a.target;"R-LIST-ITEM"===e.tagName&&this.isCollapsed&&this.variant&&e.hasAttribute("has-sub-items")&&this.expandPanel()}async togglePanel(){this.isCollapsed=!this.isCollapsed}async expandPanel(){this.isCollapsed=!1}async collapsePanel(){this.isCollapsed=!0}handleCollapseChange(a){this.isCollapsed=a,"drawer"!==this.variant&&"modal"!==this.variant||(localStorage.setItem("panelState",JSON.stringify(a)),this.panelStateChanged.emit({collapsed:a}))}watchVariant(a){this.isCollapsed="modal"===a}handleDocumentClick(a){this.handleClickOutside(a)}getNavLinks(){return document.querySelectorAll("r-list-item[href]")}get isVariantCollapsible(){return"modal"===this.variant}handleClickOutside(a){"R-BUTTON"===a.target.tagName||this.host.contains(a.target)||!this.isVariantCollapsible||this.isCollapsed||this.collapsePanel()}componentWillLoad(){if(this.isCollapsed=this.isVariantCollapsible,"drawer"===this.variant){const a=localStorage.getItem("panelState");this.isCollapsed=a?JSON.parse(a):this.isCollapsed}}componentWillRender(){window.addEventListener("popstate",this.updateCurrentLocationBound),window.addEventListener("hashchange",this.updateCurrentLocationBound),this.highlightCurrentLink()}componentDidRender(){this.highlightCurrentLink()}disconnectedCallback(){window.removeEventListener("popstate",this.updateCurrentLocationBound),window.removeEventListener("hashchange",this.updateCurrentLocationBound)}updateCurrentLocation(){this.currentLocation=window.location.hash?window.location.hash.slice(1):window.location.href,this.highlightCurrentLink()}highlightCurrentLink(){this.getNavLinks().forEach((a=>{if(a instanceof HTMLElement){const e=a.getAttribute("href"),r=e===this.currentLocation||e===window.location.pathname+window.location.hash;this.updateLinkState(a,r)}}));const a=document.querySelector(".active");a&&a.scrollIntoView({behavior:"smooth",block:"end"})}updateLinkState(a,e){e?(a.setAttribute("active",""),a.classList.add("active"),this.expandParentMenus(a),this.highlightParent(a)):(a.removeAttribute("active"),a.classList.remove("active"))}highlightParent(a){const e=a.parentElement;e&&"R-LIST-ITEM"===e.tagName&&e.setAttribute("active-parent","")}expandParentMenus(a){var e;let r=a.closest("r-list-item[has-sub-items]");for(;r&&!this.isCollapsed;)r.setAttribute("expanded",""),r=null===(e=r.parentElement)||void 0===e?void 0:e.closest("r-panel")}render(){return r(t,{key:"f57ca21d8a782d736984c091af8ad7bede50f81b",collapsed:this.isCollapsed},r("div",{key:"138a6e18232630123667ad328c393c93e4908cf6",class:"r-panel"},r("div",{key:"377662f16e8fca37a557adaf4fd8329e47828303",class:"r-panel--header"},this.hasHeader&&r("a",{key:"f183b59e3dff6ca76905b2b52902d2e6ec6f2709",class:"logo-wrapper",href:this.logoLink},r("slot",this.isCollapsed?{name:"logo-collapsed"}:{name:"logo-expanded"})),"modal"===this.variant?r("r-button",{class:"r-panel--trigger",variant:"blank",title:`${this.labelCollapse}`,icon:"cross","r-aria-label":`${this.labelCollapse}`,onClick:this.handleFullyCollapsedButtonClick}):"drawer"===this.variant?r("r-button",{class:"r-panel--trigger",variant:"blank",title:this.isCollapsed?`${this.labelExpand}`:`${this.labelCollapse}`,icon:"angle-left","r-aria-label":this.isCollapsed?`${this.labelExpand}`:`${this.labelCollapse}`,onClick:this.handleSemiCollapsedButtonClick}):null),r("div",{key:"0f239dc288b9c73f348341e99a06cce9e4499a0e",class:"r-panel--body"},r("slot",{key:"6fd883065b4db924b1c245e7ea5bcf71229f0840"})),this.hasFooter&&!this.isCollapsed&&r("div",{key:"ce6a1f84358a505940d3ef04c5c218caa972b090",class:"r-panel--footer"},r("slot",{key:"e4422d8955e7e64babab3b3f04cfa06f32dad74a",name:"footer"}))))}get host(){return n(this)}static get watchers(){return{isCollapsed:["handleCollapseChange"],variant:["watchVariant"]}}};l.style=":host{--r-panel--min-width:300px;--r-panel--background-color:var(--r-background-soft, #F3F1F0);--r-panel--display:flex;--r-panel--flex-direction:column;--r-panel--position:fixed;--r-panel--align-items:flex-start;--r-panel--top:0;--r-panel--padding:var(--spacing-050, 8px) 0;--r-panel--width:300px;--r-panel--height:100%;--r-panel--color:var(--r-text-regular, #282828);--r-panel--transition:all 250ms ease-in-out;--r-panel--transform:none;--r-panel--font-family:var(--r-font-family-text);--r-panel--left:0;--r-panel--header--display:flex;--r-panel--header--padding:var(--spacing-075, 12px) var(--spacing-100, 16px) var(--spacing-075, 12px) var(--spacing-100, 16px);--r-panel--header--justify-content:space-between;--r-panel--header--align-items:center;--r-panel--header--align-self:stretch;--r-panel--header--icon-rotate:none;--r-panel--header--flex-direction:row;--r-panel--header--gap:50px;--r-panel--header--logo--img--width:100%;--r-panel--header--logo--img--height:auto;--r-panel--header--logo--img--expanded--width:192px;--r-panel--header--logo--img--collapsed--width:30px;--r-panel--header--height:unset;--r-panel--body--display:block;--r-panel--body--flex-grow:1;--r-panel--body--align-self:stretch;--r-panel--body--overflow:auto;--r-panel--body--padding:var(--r-spacing-025, 4px) var(--spacing-050, 8px) 0;--r-panel--body-header--color:var(--r-text-soft, #686868);--r-panel--body-header--padding:var(--spacing-100, 16px) 0 var(--spacing-100, 16px);--r-panel--body-header--width:268px;--r-panel--footer--dispay:flex;--r-panel--footer--padding:var(--spacing-100, 16px) var(--spacing-100, 16px) var(--spacing-150, 24px) var(--spacing-100, 16px);--r-panel--footer--flex-direction:column;--r-panel--footer--justify-content:center;--r-panel--footer-gap:var(--spacing-100, 16px);--r-panel--footer--align-self:stretch;--r-panel--footer--text-align:center}:host([variant=drawer]) r-button{--r-button--padding:10px;--r-button--background:var(--r-background-interactive-softer, #E7E4E2);--r-button--border-radius:10%;--r-button--slot--position:relative;--r-button--left:5%}:host([variant=drawer][collapsed]){--r-panel--width:72px;--r-panel--header--display:none;--r-panel--header--icon-rotate:rotate(180deg);--r-panel--header--logo--expaned--display:none;--r-panel--header--logo--collapsed--display:block;--r-panel--header--flex-direction:column;--r-panel--header--gap:12px;--r-list-item--epxanded--background-color:rgba(40, 40, 40, 0.08)}:host([variant=drawer][collapsed]) r-button{--r-button--slot--position:inherit;transition:transform 250ms ease-in-out}:host([variant=modal][collapsed]){--r-panel--transform:translate(-100%)}:host([collapsed]:not([variant=modal])){--r-panel--min-width:0;--r-list-item--text--display:none;--r-list-item--trailing--display:none}:host([variant=drawer]:not([has-header]):not([collapsed])),:host([variant=drawer][has-header=false]:not([collapsed])){--r-panel--header--height:24px;--r-panel--header--padding:var(--spacing-075, 12px) var(--spacing-050, 8px) 0 var(--spacing-100, 16px)}:host([variant=drawer]:not([has-header]):not([collapsed])) r-button,:host([variant=drawer][has-header=false]:not([collapsed])) r-button{--r-button--top:20%;--r-button--left:97%}:host([collapsed]){--r-list-item--active-parent--background-color:rgba(40, 40, 40, 0.08)}.r-panel{z-index:2;min-width:var(--r-panel--min-width);background-color:var(--r-panel--background-color);display:var(--r-panel--display);flex-direction:var(--r-panel--flex-direction);align-items:var(--r-panel--align-items);width:var(--r-panel--width);height:var(--r-panel--height);position:var(--r-panel--position);top:var(--r-panel--top);padding:var(--r-panel--padding);color:var(--r-panel--color);transition:var(--r-panel--transition);transform:var(--r-panel--transform);left:var(--r-panel--left);font-family:var(--r-panel--font-family);box-sizing:border-box}.r-panel .logo-wrapper .logo-expanded{width:var(--r-panel--header--logo--img--expanded--width)}.r-panel .logo-wrapper .logo-collapsed{width:var(--r-panel--header--logo--img--collapsed--width)}.r-panel .logo-wrapper img{width:var(--r-panel--header--logo--img--width);height:var(--r-panel--header--logo--img--height)}.r-panel .logo-wrapper:focus,.r-panel .logo-wrapper:focus-visible{box-shadow:0 0 0 6px var(--r-border-focused-outlined, #fff);outline:2px solid var(--r-border-focused, #0071e3);outline-offset:2px}.r-panel--header{display:flex;padding:var(--r-panel--header--padding);justify-content:var(--r-panel--header--justify-content);align-items:var(--r-panel--header--align-items);align-self:var(--r-panel--header--align-self);flex-direction:var(--r-panel--header--flex-direction);gap:var(--r-panel--header--gap);height:var(--r-panel--header--height)}.r-panel--header r-button{--r-button--padding:0;transform:var(--r-panel--header--icon-rotate);background:var(--r-button--background);position:var(--r-button--slot--position);left:var(--r-button--left);top:var(--r-button--top);border-radius:var(--r-button--border-radius)}.r-panel--body{flex-grow:var(--r-panel--body--flex-grow);align-self:var(--r-panel--body--align-self);display:var(--r-panel--body--display);overflow:var(--r-panel--body--overflow);padding:var(--r-panel--body--padding)}.r-panel--body ::slotted(.header){color:var(--r-panel--body-header--color);padding:var(--r-panel--body-header--padding);display:var(--r-panel--header--display);width:var(--r-panel--body-header--width)}.r-panel ::slotted([slot=footer]){display:var(--r-panel--footer--dispay);padding:var(--r-panel--footer--padding);flex-direction:var(--r-panel--footer--flex-direction);justify-content:var(--r-panel--footer--justify-content);gap:var(--r-panel--footer-gap);align-self:var(--r-panel--footer--align-self);text-align:var(--r-panel--footer--text-align)}";export{l as r_panel}
@@ -0,0 +1 @@
1
+ import{r as t,h as e,H as r,g as a}from"./p-CTxpqopm.js";const o=class{constructor(e){t(this,e)}render(){return e(r,{key:"623feed7834a4702b83257202de4505b6c08145d",slot:"title"},e("div",{key:"ca7b90c670583ba4a874df1da73dad9db67d0bf7",class:"r-radio-button-title",style:{display:"contents"}},e("slot",{key:"fd7ac8a7ee5e2cd05dab3d061328eecb5ee14800"})))}get host(){return a(this)}};o.style=":host{font-weight:var(--r-font-weight-semibold, 600);font-size:var(--r-font-size-400, 1rem);line-height:var(--r-line-height-m, 1.5);color:var(--r-text-regular, #282828);text-align:left;cursor:inherit}";export{o as r_radio_button_title}
@@ -1 +1 @@
1
- import{r as t,h as i,H as r}from"./p-CTxpqopm.js";const s=class{constructor(i){t(this,i),this.position="center"}render(){return i(r,{key:"7f2a59854cc8b70a89f7f98b709e842efc4a214a"},i("slot",{key:"478d96611482ce00ec90e972dbfeb2e4acefa521"}))}};s.style=":host{display:inline-block;position:absolute;z-index:99999}:host:has(:not(:focus-within)){clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}:host:has(:focus-within){top:var(--r-spacing-100);padding:var(--r-spacing-100);border:1px solid var(--r-border-regular);background:var(--r-background-softest);left:var(--r-skip-link--left, 50%);transform:var(--r-skip-link--transform, translateX(-50%))}:host([position=left]){--r-skip-link--left:var(--r-spacing-100);--r-skip-link--transform:none}::slotted(*:not(:focus-within)){clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}";export{s as r_skip_link}
1
+ import{r as t,h as i,H as r}from"./p-CTxpqopm.js";const s=class{constructor(i){t(this,i),this.position="center"}render(){return i(r,{key:"7ca2f29a347197be2951841e6b59807360e76f9d"},i("slot",{key:"6d26f29f7dbec9d60e302de3cbbf0d8d2afd3009"}))}};s.style=":host{display:inline-block;position:absolute;z-index:99999}:host:has(:not(:focus-within)){clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}:host:has(:focus-within){top:var(--r-spacing-100);padding:var(--r-spacing-100);border:1px solid var(--r-border-regular);background:var(--r-background-softest);left:var(--r-skip-link--left, 50%);transform:var(--r-skip-link--transform, translateX(-50%))}:host([position=left]){--r-skip-link--left:var(--r-spacing-100);--r-skip-link--transform:none}::slotted(*:not(:focus-within)){clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}";export{s as r_skip_link}
@@ -0,0 +1 @@
1
+ import{r as d,h as a,H as t,g as s}from"./p-CTxpqopm.js";const o=class{constructor(a){d(this,a)}render(){return a(t,{key:"802f0d0c98c87abb566dd2ef0388d6d6237dba68",slot:"leading"},a("div",{key:"4c0296adc5dd6839dd150450f0be62e92a810d7c",class:"r-radio-button-leading",style:{display:"contents"}},a("slot",{key:"16b6131307cbaa02e1182b204ded280fa903da0a"})))}get host(){return s(this)}};o.style=":host{color:var(--r-icon-soft, #686868)}";export{o as r_radio_button_leading}
@@ -1 +1 @@
1
- import{r as e,c as o,h as t,H as r,g as i}from"./p-CTxpqopm.js";const n=class{constructor(t){e(this,t),this.optionClick=o(this,"optionClick"),this.disabled=!1,this.selected=!1,this.iconSize="m",this.iconColor="var(--r-select-option--color)",this.iconPosition="start",this.uniqueId=`r-select-option-${Date.now().toString(32)}${Math.random().toString(32)}`.replace(/\./g,""),this.isFocused=!1,this.isSelected=!1,this.handleClick=e=>{if(e.preventDefault(),this.disabled)return;const{host:o,value:t}=this;this.optionClick.emit({element:o,value:t})},this.handleKeydown=e=>{e.preventDefault()}}async setFocus(){this.isFocused=!0}async setBlur(){this.isFocused=!1}async setSelected(){this.isSelected=!0}async clearSelected(){this.isSelected=!1}get hasIconSlot(){return!!this.host.querySelector('[slot="icon"]')}get definedValue(){var e,o;const t=null===(e=this.host.textContent)||void 0===e?void 0:e.trim();return(null===(o=this.host.getAttribute("label"))||void 0===o?void 0:o.trim())||t||""}componentWillLoad(){var e;(null===(e=this.value)||void 0===e?void 0:e.length)>0||this.host.setAttribute("value",this.definedValue),this.isSelected=this.selected}render(){const{disabled:e,uniqueId:o,icon:i,iconSize:n,iconColor:s,hasIconSlot:a}=this;return t(r,{key:"467ac8b74264d2f2f740b5b6f96d039dc115ddb7",id:o,role:"option",onClick:this.handleClick,onKeydown:this.handleKeydown,"aria-disabled":`${e}`,"aria-selected":`${this.isSelected}`,"data-value":this.definedValue,"data-focused":`${this.isFocused}`},t("div",{key:"87d196b275c294484a231e5552eb42a5af7c5ad1",class:"r-select-option"},i&&t("span",{key:"9183fe3aec0f7f5c2603d5b99fd093dc36fd3c32",class:"r-select-option--icon"},t("r-icon",Object.assign({key:"f62b4f8737a9b11a80d6e22fc446e40a3bb71878"},{name:i,size:n,color:s}))),!i&&a&&t("span",{key:"c9345f92aa2792f3d4a0389b3830c431f655e066",class:"r-select-option--icon"},t("slot",{key:"caef47ad8b2c00405f1bf104e780b135e511f8a3",name:"icon"})),t("span",{key:"595b5714234cedf49b62261d14f00d4e1fd5a9ac",class:"r-select-option--label"},t("slot",{key:"a9b5ac0c55b56455d7383fad563a20e7b9ad91a9"}))))}get host(){return i(this)}};n.style=":host(:hover){--r-select-option--background-color:var(--r-background-interactive-hovered)}:host(:not([aria-disabled=true]):focus){outline:var(--outline, none);--r-select-option--background-color:var(--r-background-interactive-hovered);--r-select-option--border-color:var(--r-background-interactive-softest);--r-select-option--box-shadow:inset 0px 0px 0px 1px var(--r-border-focused-outlined, #fff), inset 0 0 0 3px var(--r-border-focused, #0071e3), inset 0 0 0 4px var(--r-border-focused-outlined, #fff);--r-select-option--outline:2px solid var(--r-border-focused, #0071e3);--r-select-option--outline-offset:-4px;--r-select-option--z-index:1}:host([data-focused=true]){outline:var(--outline, none);--r-select-option--background-color:var(--r-background-interactive-hovered);--r-select-option--border-color:var(--r-background-interactive-softest);--r-select-option--box-shadow:inset 0px 0px 0px 1px var(--r-border-focused-outlined, #fff), inset 0 0 0 3px var(--r-border-focused, #0071e3), inset 0 0 0 4px var(--r-border-focused-outlined, #fff);--r-select-option--outline:2px solid var(--r-border-focused, #0071e3);--r-select-option--outline-offset:-4px}:host(:not([aria-disabled=true]):active){--r-select-option--background-color:var(--r-background-interactive-pressed)}:host([aria-disabled=true]),:host([aria-disabled=true]:hover),:host([aria-disabled=true]:focus){--r-select-option--opacity:0.4;--r-select-option--background-color:transparent}:host([aria-selected=true]){--r-select-option--font-weight:600;--r-select-option--background-color:var(--r-background-interactive-hovered)}:host([aria-hidden=true]){--r-select-option--display:none}:host([icon-position=end]){--r-select-option--flex-direction:row-reverse;--r-select-option--icon--margin-left:0.75em;--r-select-option--icon--margin-right:0}.r-select-option{box-sizing:var(--r-select-option--box-sizing);position:var(--r-select-option--position);display:var(--r-select-option--display, flex);flex-direction:var(--r-select-option--flex-direction, row);min-height:var(--r-select-option--min-height, 1.125em);width:var(--r-select-option--width, auto);font-size:var(--r-select-option--font-size, 1rem);line-height:var(--r-select-option--line-height, 1.2);font-weight:var(--r-select-option--font-weight, normal);padding-top:var(--r-select-option--padding-top, 0.75em);padding-right:var(--r-select-option--padding-right, 0.75em);padding-bottom:var(--r-select-option--padding-bottom, 0.75em);padding-left:var(--r-select-option--padding-left, 0.75em);align-items:var(--r-select-option--align-items, center);color:var(--r-select-option--color, inherit);background-color:var(--r-select-option--background-color, rgba(0, 0, 0, 0));border-color:var(--r-select-option--border-color, rgba(0, 0, 0, 0));border-radius:var(--r-select-option--border-radius, 0);border-width:var(--r-select-option--border-width, 1px);border-style:var(--r-select-option--border-style, solid);box-shadow:var(--r-select-option--box-shadow, none);outline:var(--r-select-option--outline, none);outline-offset:var(--r-select-option--outline-offset, 0);transform:var(--r-select-option--transform, none);z-index:var(--r-select-option--z-index, 0);opacity:var(--r-select-option--opacity, 1)}.r-select-option--icon{display:var(--r-select-option--icon--display, inline-flex);align-items:var(--r-select-option--icon--align-items, center);justify-content:var(--r-select-option--icon--justify-content, center);margin-top:var(--r-select-option--icon--margin-top, 0.05em);margin-left:var(--r-select-option--icon--margin-left, 0);margin-right:var(--r-select-option--icon--margin-right, 0.75em)}.r-select-option--icon svg{display:var(--r-select-option--icon--svg--display, inline-flex)}.r-select-option--label{max-width:var(--r-select-option--label--max-width, 100%);text-overflow:var(--r-select-option--label--text-overflow, ellipsis);white-space:var(--r-select-option--label--white-space, normal)}";export{n as r_select_option}
1
+ import{r as e,c as o,h as t,H as r,g as i}from"./p-CTxpqopm.js";const n=class{constructor(t){e(this,t),this.optionClick=o(this,"optionClick"),this.disabled=!1,this.selected=!1,this.iconSize="m",this.iconColor="var(--r-select-option--color)",this.iconPosition="start",this.uniqueId=`r-select-option-${Date.now().toString(32)}${Math.random().toString(32)}`.replace(/\./g,""),this.isFocused=!1,this.isSelected=!1,this.handleClick=e=>{if(e.preventDefault(),this.disabled)return;const{host:o,value:t}=this;this.optionClick.emit({element:o,value:t})},this.handleKeydown=e=>{e.preventDefault()}}async setFocus(){this.isFocused=!0}async setBlur(){this.isFocused=!1}async setSelected(){this.isSelected=!0}async clearSelected(){this.isSelected=!1}get hasIconSlot(){return!!this.host.querySelector('[slot="icon"]')}get definedValue(){var e,o;const t=null===(e=this.host.textContent)||void 0===e?void 0:e.trim();return(null===(o=this.host.getAttribute("label"))||void 0===o?void 0:o.trim())||t||""}componentWillLoad(){var e;(null===(e=this.value)||void 0===e?void 0:e.length)>0||this.host.setAttribute("value",this.definedValue),this.isSelected=this.selected}render(){const{disabled:e,uniqueId:o,icon:i,iconSize:n,iconColor:s,hasIconSlot:a}=this;return t(r,{key:"1f3440961f3c606f5b2b1eef77ae3c53fc1ea4a0",id:o,role:"option",onClick:this.handleClick,onKeydown:this.handleKeydown,"aria-disabled":`${e}`,"aria-selected":`${this.isSelected}`,"data-value":this.definedValue,"data-focused":`${this.isFocused}`},t("div",{key:"9a29dd16478d39c905f8cb54ca603e6982c3a24e",class:"r-select-option"},i&&t("span",{key:"fdcecb70781424749e0527f06eff5140a8a79ccc",class:"r-select-option--icon"},t("r-icon",Object.assign({key:"5a1906d39a27bc70729d26e93fd8f0d77e80e972"},{name:i,size:n,color:s}))),!i&&a&&t("span",{key:"572b0e90b5695e0233505f28fb7c9b3dbc90a73f",class:"r-select-option--icon"},t("slot",{key:"bc04c317491e690281b0f4442aaff3f86a5ddb12",name:"icon"})),t("span",{key:"77bf634b415a36d8463212918cf200fda8647f85",class:"r-select-option--label"},t("slot",{key:"83dd97fa580d18f4a9e27beca4835adf6c746240"}))))}get host(){return i(this)}};n.style=":host(:hover){--r-select-option--background-color:var(--r-background-interactive-hovered)}:host(:not([aria-disabled=true]):focus){outline:var(--outline, none);--r-select-option--background-color:var(--r-background-interactive-hovered);--r-select-option--border-color:var(--r-background-interactive-softest);--r-select-option--box-shadow:inset 0px 0px 0px 1px var(--r-border-focused-outlined, #fff), inset 0 0 0 3px var(--r-border-focused, #0071e3), inset 0 0 0 4px var(--r-border-focused-outlined, #fff);--r-select-option--outline:2px solid var(--r-border-focused, #0071e3);--r-select-option--outline-offset:-4px;--r-select-option--z-index:1}:host([data-focused=true]){outline:var(--outline, none);--r-select-option--background-color:var(--r-background-interactive-hovered);--r-select-option--border-color:var(--r-background-interactive-softest);--r-select-option--box-shadow:inset 0px 0px 0px 1px var(--r-border-focused-outlined, #fff), inset 0 0 0 3px var(--r-border-focused, #0071e3), inset 0 0 0 4px var(--r-border-focused-outlined, #fff);--r-select-option--outline:2px solid var(--r-border-focused, #0071e3);--r-select-option--outline-offset:-4px}:host(:not([aria-disabled=true]):active){--r-select-option--background-color:var(--r-background-interactive-pressed)}:host([aria-disabled=true]),:host([aria-disabled=true]:hover),:host([aria-disabled=true]:focus){--r-select-option--opacity:0.4;--r-select-option--background-color:transparent}:host([aria-selected=true]){--r-select-option--font-weight:600;--r-select-option--background-color:var(--r-background-interactive-hovered)}:host([aria-hidden=true]){--r-select-option--display:none}:host([icon-position=end]){--r-select-option--flex-direction:row-reverse;--r-select-option--icon--margin-left:0.75em;--r-select-option--icon--margin-right:0}.r-select-option{box-sizing:var(--r-select-option--box-sizing);position:var(--r-select-option--position);display:var(--r-select-option--display, flex);flex-direction:var(--r-select-option--flex-direction, row);min-height:var(--r-select-option--min-height, 1.125em);width:var(--r-select-option--width, auto);font-size:var(--r-select-option--font-size, 1rem);line-height:var(--r-select-option--line-height, 1.2);font-weight:var(--r-select-option--font-weight, normal);padding-top:var(--r-select-option--padding-top, 0.75em);padding-right:var(--r-select-option--padding-right, 0.75em);padding-bottom:var(--r-select-option--padding-bottom, 0.75em);padding-left:var(--r-select-option--padding-left, 0.75em);align-items:var(--r-select-option--align-items, center);color:var(--r-select-option--color, inherit);background-color:var(--r-select-option--background-color, rgba(0, 0, 0, 0));border-color:var(--r-select-option--border-color, rgba(0, 0, 0, 0));border-radius:var(--r-select-option--border-radius, 0);border-width:var(--r-select-option--border-width, 1px);border-style:var(--r-select-option--border-style, solid);box-shadow:var(--r-select-option--box-shadow, none);outline:var(--r-select-option--outline, none);outline-offset:var(--r-select-option--outline-offset, 0);transform:var(--r-select-option--transform, none);z-index:var(--r-select-option--z-index, 0);opacity:var(--r-select-option--opacity, 1)}.r-select-option--icon{display:var(--r-select-option--icon--display, inline-flex);align-items:var(--r-select-option--icon--align-items, center);justify-content:var(--r-select-option--icon--justify-content, center);margin-top:var(--r-select-option--icon--margin-top, 0.05em);margin-left:var(--r-select-option--icon--margin-left, 0);margin-right:var(--r-select-option--icon--margin-right, 0.75em)}.r-select-option--icon svg{display:var(--r-select-option--icon--svg--display, inline-flex)}.r-select-option--label{max-width:var(--r-select-option--label--max-width, 100%);text-overflow:var(--r-select-option--label--text-overflow, ellipsis);white-space:var(--r-select-option--label--white-space, normal)}";export{n as r_select_option}