@luzmo/lucero 1.0.1-alpha.42 → 1.0.1-alpha.44

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 (136) hide show
  1. package/components/accordion/index.cjs +1 -1
  2. package/components/accordion/index.js +2 -2
  3. package/components/action-bar/index.cjs +1 -1
  4. package/components/action-bar/index.js +5 -5
  5. package/components/action-button/index.cjs +1 -1
  6. package/components/action-button/index.js +1 -1
  7. package/components/action-group/index.cjs +1 -1
  8. package/components/action-group/index.js +1 -1
  9. package/components/{action-group-Bwt9w8Vh.js → action-group-CqAXlI_I.js} +1 -1
  10. package/components/{action-group-D917z7XF.cjs → action-group-_gt0SxJg.cjs} +1 -1
  11. package/components/action-menu/index.cjs +1 -1
  12. package/components/action-menu/index.js +1 -1
  13. package/components/avatar/index.cjs +1 -1
  14. package/components/avatar/index.js +1 -1
  15. package/components/{base-CdYjmV_8.js → base-BUViEg_7.js} +10 -10
  16. package/components/{base-5nDSSNeT.cjs → base-DxRGeCrb.cjs} +1 -1
  17. package/components/button/index.cjs +1 -1
  18. package/components/button/index.js +3 -3
  19. package/components/{button-base-BdzHcHRs.cjs → button-base-D-gp73uZ.cjs} +1 -1
  20. package/components/{button-base-B_SkfcFn.js → button-base-npzdrTiY.js} +1 -1
  21. package/components/button-group/index.cjs +1 -1
  22. package/components/button-group/index.js +1 -1
  23. package/components/calendar/index.cjs +1 -1
  24. package/components/calendar/index.js +1 -1
  25. package/components/chat-message/chat-message.d.ts +5 -0
  26. package/components/chat-message/index.cjs +12 -12
  27. package/components/chat-message/index.js +6 -3
  28. package/components/chat-message-group/index.cjs +1 -1
  29. package/components/chat-message-group/index.js +1 -1
  30. package/components/checkbox/checkbox.d.ts +5 -0
  31. package/components/checkbox/index.cjs +2 -2
  32. package/components/checkbox/index.js +10 -7
  33. package/components/{close-button-Decm0Qbb.cjs → close-button-CSGamYgn.cjs} +1 -1
  34. package/components/{close-button-CGZxCNlI.js → close-button-po7k74tH.js} +1 -1
  35. package/components/color-area/index.cjs +1 -1
  36. package/components/color-area/index.js +2 -2
  37. package/components/color-field/index.cjs +1 -1
  38. package/components/color-field/index.js +1 -1
  39. package/components/color-handle/index.cjs +1 -1
  40. package/components/color-handle/index.js +2 -2
  41. package/components/color-loupe/index.cjs +1 -1
  42. package/components/color-loupe/index.js +1 -1
  43. package/components/{color-loupe-CIEFp7ln.cjs → color-loupe-Dta8u4pX.cjs} +1 -1
  44. package/components/{color-loupe-CLPX6xVb.js → color-loupe-OvalnSmN.js} +1 -1
  45. package/components/color-menu/index.cjs +1 -1
  46. package/components/color-menu/index.js +1 -1
  47. package/components/color-palette/index.cjs +1 -1
  48. package/components/color-palette/index.js +1 -1
  49. package/components/color-palette-group/index.cjs +1 -1
  50. package/components/color-palette-group/index.js +1 -1
  51. package/components/color-picker/index.cjs +1 -1
  52. package/components/color-picker/index.js +1 -1
  53. package/components/color-slider/index.cjs +1 -1
  54. package/components/color-slider/index.js +2 -2
  55. package/components/date-time-picker/index.cjs +1 -1
  56. package/components/date-time-picker/index.js +1 -1
  57. package/components/divider/index.cjs +1 -1
  58. package/components/divider/index.js +1 -1
  59. package/components/field-group/index.cjs +1 -1
  60. package/components/field-group/index.js +1 -1
  61. package/components/{field-group-CHmw159R.js → field-group-GZLR5GAn.js} +1 -1
  62. package/components/{field-group-BYHNJmv0.cjs → field-group-aG9hVBjA.cjs} +1 -1
  63. package/components/field-label/index.cjs +1 -1
  64. package/components/field-label/index.js +1 -1
  65. package/components/{field-label-Cy3xMWZ-.js → field-label-BxW2RJMY.js} +1 -1
  66. package/components/{field-label-DZoeqJJX.cjs → field-label-CYC-u_Cq.cjs} +1 -1
  67. package/components/{focusable-BjvsvVam.js → focusable-BM1nd-dI.js} +1 -1
  68. package/components/{focusable-CbVKgGfS.cjs → focusable-agUxU61W.cjs} +1 -1
  69. package/components/icon/index.cjs +1 -1
  70. package/components/icon/index.js +1 -1
  71. package/components/index.cjs +1 -205
  72. package/components/index.js +174 -972
  73. package/components/infield-button/index.cjs +1 -1
  74. package/components/infield-button/index.js +1 -1
  75. package/components/label/index.cjs +1 -1
  76. package/components/label/index.js +1 -1
  77. package/components/{language-resolution-EUER43cg.cjs → language-resolution-DmX3Wy5I.cjs} +1 -1
  78. package/components/{language-resolution-B-wjV5bb.js → language-resolution-pYd-sAaw.js} +1 -1
  79. package/components/menu/index.cjs +2 -2
  80. package/components/menu/index.js +3 -3
  81. package/components/multi-language-field/index.cjs +1 -1
  82. package/components/multi-language-field/index.js +1 -1
  83. package/components/number-field/index.cjs +1 -1
  84. package/components/number-field/index.js +2 -2
  85. package/components/options/index.cjs +1 -1
  86. package/components/options/index.js +2 -2
  87. package/components/overlay/index.cjs +1 -1
  88. package/components/overlay/index.js +3 -3
  89. package/components/{overlay-BhrVS5h7.cjs → overlay-BTNKxbrJ.cjs} +1 -1
  90. package/components/{overlay-C-No3oJQ.js → overlay-CXkoVtnB.js} +1 -1
  91. package/components/{pending-state-DQctFHI8.cjs → pending-state-DBfiIiwY.cjs} +1 -1
  92. package/components/{pending-state-Dx1u3EXA.js → pending-state-DG9TpsGT.js} +1 -1
  93. package/components/picker/index.cjs +1 -1
  94. package/components/picker/index.js +2 -2
  95. package/components/{picker-DxYgh4LR.cjs → picker-B2_mjftE.cjs} +1 -1
  96. package/components/{picker-GyeSAxxY.js → picker-DbOS1rE7.js} +4 -4
  97. package/components/picker-button/index.cjs +1 -1
  98. package/components/picker-button/index.js +1 -1
  99. package/components/popover/index.cjs +1 -1
  100. package/components/popover/index.js +1 -1
  101. package/components/{popover-lcZnODPK.cjs → popover-CPZ51K_z.cjs} +1 -1
  102. package/components/{popover-ucIgjbQs.js → popover-UFgI7b75.js} +1 -1
  103. package/components/progress-circle/index.cjs +1 -1
  104. package/components/progress-circle/index.js +1 -1
  105. package/components/{progress-circle-DgMbqrzG.cjs → progress-circle-BMRjGc4y.cjs} +1 -1
  106. package/components/{progress-circle-D5J0ZwY0.js → progress-circle-unckklsi.js} +1 -1
  107. package/components/prompt-box/index.cjs +222 -0
  108. package/components/prompt-box/index.js +832 -0
  109. package/components/radio/index.cjs +1 -1
  110. package/components/radio/index.js +2 -2
  111. package/components/search/index.cjs +1 -1
  112. package/components/search/index.js +1 -1
  113. package/components/select/index.cjs +1 -1
  114. package/components/select/index.js +2 -2
  115. package/components/slider/index.cjs +1 -1
  116. package/components/slider/index.js +1 -1
  117. package/components/swatch/index.cjs +1 -1
  118. package/components/swatch/index.js +2 -2
  119. package/components/switch/index.cjs +1 -1
  120. package/components/switch/index.js +1 -1
  121. package/components/tabs/index.cjs +1 -1
  122. package/components/tabs/index.js +2 -2
  123. package/components/tags/index.cjs +4 -4
  124. package/components/tags/index.js +3 -3
  125. package/components/text-field/index.cjs +1 -1
  126. package/components/text-field/index.js +2 -2
  127. package/components/{text-field-DFP7p8Rv.cjs → text-field-CclDsK1X.cjs} +1 -1
  128. package/components/{text-field-BHaLKkf1.js → text-field-Ckbe58fH.js} +1 -1
  129. package/components/toast/index.cjs +1 -1
  130. package/components/toast/index.js +2 -2
  131. package/components/tooltip/index.cjs +1 -1
  132. package/components/tooltip/index.js +1 -1
  133. package/components/utils.cjs +1 -1
  134. package/components/utils.js +2 -2
  135. package/custom-elements.json +1 -1
  136. package/package.json +1 -1
@@ -15,7 +15,7 @@
15
15
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
16
16
  * SOFTWARE.
17
17
  * */
18
- "use strict";const s=require("lit"),n=require("lit/decorators.js"),h=require("./base-5nDSSNeT.cjs"),b=require("./condition-attribute-with-id-DrQYZzFS.cjs"),c=require("./random-id-CqvckpWe.cjs"),g=require("./element-resolution-BvRLGqIU.cjs"),m=require("./sized-mixin-DcvJLFeo.cjs"),u=":host{box-sizing:border-box;min-block-size:var(--luzmo-field-label-min-height, var(--field-label-min-height));padding-block:var(--luzmo-field-label-padding-block, var(--luzmo-field-label-top-to-text, var(--field-label-top-to-text)) var(--luzmo-field-label-bottom-to-text, var(--field-label-bottom-to-text)));padding-inline:0;padding-inline:var(--luzmo-field-label-padding-inline, 0);margin-block:0;margin-block:var(--luzmo-field-label-margin-block, var(--luzmo-field-label-margin-block-start, 0) var(--luzmo-field-label-margin-block-end, 0));margin-inline:0;margin-inline:var(--luzmo-field-label-margin-inline, var(--luzmo-field-label-margin-inline-start, 0) var(--luzmo-field-label-margin-inline-end, 0));font-size:var(--luzmo-field-label-font-size, var(--field-label-font-size));font-weight:var(--luzmo-field-label-font-weight, var(--field-label-font-weight));line-height:var(--luzmo-field-label-line-height, var(--field-label-line-height));-webkit-font-smoothing:subpixel-antialiased;-moz-osx-font-smoothing:auto;color:var(--luzmo-field-label-color, var(--field-label-color));display:block;font-family:var(--luzmo-field-label-font-family, var(--luzmo-font-family))}:host(:lang(ja)),:host(:lang(ko)),:host(:lang(zh)){--luzmo-field-label-line-height: var( --luzmo-field-label-line-height-cjk, var(--field-label-line-height-cjk) )}:host([disabled]),:host([disabled]) .required-icon{--luzmo-field-label-color: var( --highcontrast-field-label-disabled-content-color, var( --luzmo-disabled-content-color, var(--field-label-disabled-content-color) ) )}.required-icon{display:inline-block;margin-block:0;margin-inline:var(--luzmo-field-label-text-to-asterisk, var(--field-label-text-to-asterisk)) 0;vertical-align:initial;vertical-align:var(--luzmo-field-label-asterisk-vertical-align, baseline)}:host([side-aligned=start]),:host([side-aligned=end]){vertical-align:top;margin-block-start:0;margin-block-end:0;margin-inline-end:var(--luzmo-field-label-side-padding-right, var(--field-label-side-padding-right));display:inline-flex;align-items:center;font-size:var(--luzmo-field-label-side-aligned-font-size, var(--field-label-side-aligned-font-size));block-size:var(--luzmo-field-label-side-aligned-height, var(--field-label-side-aligned-height))}:host([side-aligned=end]){text-align:end}@media (forced-colors: active){:host{--highcontrast-field-label-disabled-content-color: GrayText}}:host{--field-label-color: var(--luzmo-font-color);--field-label-font-weight: var(--luzmo-font-weight);--field-label-line-height: var(--luzmo-line-height);--field-label-line-height-cjk: 1.5;--field-label-disabled-content-color: var(--luzmo-font-color-disabled)}:host{--field-label-min-height: var(--luzmo-component-height-xs);--field-label-side-aligned-height: var(--luzmo-component-height);--field-label-top-to-text: calc(var(--luzmo-spacing-2));--field-label-bottom-to-text: var(--luzmo-spacing-2);--field-label-side-aligned-font-size: var(--luzmo-font-size);--field-label-font-size: var(--luzmo-font-size-s);--field-label-side-padding-right: var(--luzmo-spacing-4);--field-label-text-to-asterisk: 0px}:host([size=s]){--field-label-min-height: var(--luzmo-component-height-xxs);--field-label-side-aligned-height: var(--luzmo-component-height-s);--field-label-top-to-text: calc(var(--luzmo-spacing-1));--field-label-bottom-to-text: var(--luzmo-spacing-1);--field-label-side-aligned-font-size: var(--luzmo-font-size-s);--field-label-font-size: var(--luzmo-font-size-xs);--field-label-side-padding-right: var(--luzmo-spacing-3);--field-label-text-to-asterisk: 0px}:host([size=l]){--field-label-min-height: var(--luzmo-component-height-xs);--field-label-side-aligned-height: var(--luzmo-component-height-l);--field-label-top-to-text: var(--luzmo-spacing-3);--field-label-bottom-to-text: calc( var(--luzmo-spacing-2) + var(--luzmo-spacing-1) );--field-label-side-aligned-font-size: var(--luzmo-font-size-l);--field-label-font-size: var(--luzmo-font-size);--field-label-side-padding-right: var(--luzmo-spacing-4);--field-label-text-to-asterisk: var(--luzmo-spacing-1)}:host([size=xl]){--field-label-min-height: var(--luzmo-component-height-s);--field-label-side-aligned-height: var(--luzmo-component-height-xl);--field-label-top-to-text: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--field-label-bottom-to-text: var(--luzmo-spacing-3);--field-label-side-aligned-font-size: var(--luzmo-font-size-xl);--field-label-font-size: var(--luzmo-font-size-l);--field-label-side-padding-right: var(--luzmo-spacing-4);--field-label-text-to-asterisk: var(--luzmo-spacing-1)}label{display:inline-block}";var p=Object.defineProperty,r=(d,e,i,l)=>{for(var t=void 0,a=d.length-1,f;a>=0;a--)(f=d[a])&&(t=f(e,i,t)||t);return t&&p(e,i,t),t};const z=()=>s.html`
18
+ "use strict";const s=require("lit"),n=require("lit/decorators.js"),h=require("./base-DxRGeCrb.cjs"),b=require("./condition-attribute-with-id-DrQYZzFS.cjs"),c=require("./random-id-CqvckpWe.cjs"),g=require("./element-resolution-BvRLGqIU.cjs"),m=require("./sized-mixin-DcvJLFeo.cjs"),u=":host{box-sizing:border-box;min-block-size:var(--luzmo-field-label-min-height, var(--field-label-min-height));padding-block:var(--luzmo-field-label-padding-block, var(--luzmo-field-label-top-to-text, var(--field-label-top-to-text)) var(--luzmo-field-label-bottom-to-text, var(--field-label-bottom-to-text)));padding-inline:0;padding-inline:var(--luzmo-field-label-padding-inline, 0);margin-block:0;margin-block:var(--luzmo-field-label-margin-block, var(--luzmo-field-label-margin-block-start, 0) var(--luzmo-field-label-margin-block-end, 0));margin-inline:0;margin-inline:var(--luzmo-field-label-margin-inline, var(--luzmo-field-label-margin-inline-start, 0) var(--luzmo-field-label-margin-inline-end, 0));font-size:var(--luzmo-field-label-font-size, var(--field-label-font-size));font-weight:var(--luzmo-field-label-font-weight, var(--field-label-font-weight));line-height:var(--luzmo-field-label-line-height, var(--field-label-line-height));-webkit-font-smoothing:subpixel-antialiased;-moz-osx-font-smoothing:auto;color:var(--luzmo-field-label-color, var(--field-label-color));display:block;font-family:var(--luzmo-field-label-font-family, var(--luzmo-font-family))}:host(:lang(ja)),:host(:lang(ko)),:host(:lang(zh)){--luzmo-field-label-line-height: var( --luzmo-field-label-line-height-cjk, var(--field-label-line-height-cjk) )}:host([disabled]),:host([disabled]) .required-icon{--luzmo-field-label-color: var( --highcontrast-field-label-disabled-content-color, var( --luzmo-disabled-content-color, var(--field-label-disabled-content-color) ) )}.required-icon{display:inline-block;margin-block:0;margin-inline:var(--luzmo-field-label-text-to-asterisk, var(--field-label-text-to-asterisk)) 0;vertical-align:initial;vertical-align:var(--luzmo-field-label-asterisk-vertical-align, baseline)}:host([side-aligned=start]),:host([side-aligned=end]){vertical-align:top;margin-block-start:0;margin-block-end:0;margin-inline-end:var(--luzmo-field-label-side-padding-right, var(--field-label-side-padding-right));display:inline-flex;align-items:center;font-size:var(--luzmo-field-label-side-aligned-font-size, var(--field-label-side-aligned-font-size));block-size:var(--luzmo-field-label-side-aligned-height, var(--field-label-side-aligned-height))}:host([side-aligned=end]){text-align:end}@media (forced-colors: active){:host{--highcontrast-field-label-disabled-content-color: GrayText}}:host{--field-label-color: var(--luzmo-font-color);--field-label-font-weight: var(--luzmo-font-weight);--field-label-line-height: var(--luzmo-line-height);--field-label-line-height-cjk: 1.5;--field-label-disabled-content-color: var(--luzmo-font-color-disabled)}:host{--field-label-min-height: var(--luzmo-component-height-xs);--field-label-side-aligned-height: var(--luzmo-component-height);--field-label-top-to-text: calc(var(--luzmo-spacing-2));--field-label-bottom-to-text: var(--luzmo-spacing-2);--field-label-side-aligned-font-size: var(--luzmo-font-size);--field-label-font-size: var(--luzmo-font-size-s);--field-label-side-padding-right: var(--luzmo-spacing-4);--field-label-text-to-asterisk: 0px}:host([size=s]){--field-label-min-height: var(--luzmo-component-height-xxs);--field-label-side-aligned-height: var(--luzmo-component-height-s);--field-label-top-to-text: calc(var(--luzmo-spacing-1));--field-label-bottom-to-text: var(--luzmo-spacing-1);--field-label-side-aligned-font-size: var(--luzmo-font-size-s);--field-label-font-size: var(--luzmo-font-size-xs);--field-label-side-padding-right: var(--luzmo-spacing-3);--field-label-text-to-asterisk: 0px}:host([size=l]){--field-label-min-height: var(--luzmo-component-height-xs);--field-label-side-aligned-height: var(--luzmo-component-height-l);--field-label-top-to-text: var(--luzmo-spacing-3);--field-label-bottom-to-text: calc( var(--luzmo-spacing-2) + var(--luzmo-spacing-1) );--field-label-side-aligned-font-size: var(--luzmo-font-size-l);--field-label-font-size: var(--luzmo-font-size);--field-label-side-padding-right: var(--luzmo-spacing-4);--field-label-text-to-asterisk: var(--luzmo-spacing-1)}:host([size=xl]){--field-label-min-height: var(--luzmo-component-height-s);--field-label-side-aligned-height: var(--luzmo-component-height-xl);--field-label-top-to-text: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--field-label-bottom-to-text: var(--luzmo-spacing-3);--field-label-side-aligned-font-size: var(--luzmo-font-size-xl);--field-label-font-size: var(--luzmo-font-size-l);--field-label-side-padding-right: var(--luzmo-spacing-4);--field-label-text-to-asterisk: var(--luzmo-spacing-1)}label{display:inline-block}";var p=Object.defineProperty,r=(d,e,i,l)=>{for(var t=void 0,a=d.length-1,f;a>=0;a--)(f=d[a])&&(t=f(e,i,t)||t);return t&&p(e,i,t),t};const z=()=>s.html`
19
19
  <div class="icon-container required-icon">*</div>
20
20
  `;class o extends m.SizedMixin(h.LuzmoElement,{noDefaultSize:!0}){constructor(){super(...arguments),this.disabled=!1,this.id="",this.for="",this.required=!1,this.resolvedElement=new g.ElementResolutionController(this)}static get styles(){return[s.unsafeCSS(u)]}handleClick(e){if(!this.target||this.disabled||e.defaultPrevented)return;this.target.focus();const i=this.getRootNode(),l=this.target,t=l.getRootNode(),a=t.host;t===i&&l.forceFocusVisible?l.forceFocusVisible():a&&a.forceFocusVisible&&a.forceFocusVisible()}applyTargetLabel(e){if(this.target=e||this.target,this.target){const i=this.target.applyFocusElementLabel,l=this.target.focusElement||this.target,t=l.getRootNode();i!==void 0?i(this.labelText,this):t===this.getRootNode()?(e?b.conditionAttributeWithId:b.conditionAttributeWithoutId)(l,"aria-labelledby",[this.id]):e?l.setAttribute("aria-label",this.labelText):l.removeAttribute("aria-label")}}async manageTarget(){this.applyTargetLabel();const e=this.resolvedElement.element;if(!e){this.target=e;return}e.localName.search("-")>0&&await customElements.whenDefined(e.localName),e.updateComplete!==void 0&&await e.updateComplete,this.applyTargetLabel(e)}get labelText(){const e=this.slotEl.assignedNodes({flatten:!0});return e.length===0?"":e.map(l=>(l.textContent||"").trim()).join(" ")}render(){return s.html`
21
21
  <label>
@@ -16,7 +16,7 @@
16
16
  * SOFTWARE.
17
17
  * */
18
18
  import { property as o } from "lit/decorators.js";
19
- import { a as d } from "./base-CdYjmV_8.js";
19
+ import { a as d } from "./base-BUViEg_7.js";
20
20
  import { F as b } from "./focus-visible-BvScGDCE.js";
21
21
  var f = Object.defineProperty, m = Object.getOwnPropertyDescriptor, l = (a, t, e, i) => {
22
22
  for (var s = i > 1 ? void 0 : i ? m(t, e) : t, n = a.length - 1, u; n >= 0; n--)
@@ -15,4 +15,4 @@
15
15
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
16
16
  * SOFTWARE.
17
17
  * */
18
- "use strict";const r=require("lit/decorators.js"),d=require("./base-5nDSSNeT.cjs"),b=require("./focus-visible-D4BXb5RB.cjs");var f=Object.defineProperty,c=Object.getOwnPropertyDescriptor,l=(a,t,e,i)=>{for(var s=i>1?void 0:i?c(t,e):t,u=a.length-1,o;u>=0;u--)(o=a[u])&&(s=(i?o(t,e,s):o(s))||s);return i&&s&&f(t,e,s),s};function h(){return new Promise(a=>requestAnimationFrame(()=>a()))}class n extends b.FocusVisiblePolyfillMixin(d.LuzmoElement){constructor(){super(...arguments),this.disabled=!1,this.autofocus=!1,this._tabIndex=0,this.manipulatingTabindex=!1,this.autofocusReady=Promise.resolve()}get tabIndex(){if(this.focusElement===this){const e=this.hasAttribute("tabindex")?Number(this.getAttribute("tabindex")):Number.NaN;return Number.isNaN(e)?-1:e}const t=Number.parseFloat(this.hasAttribute("tabindex")&&this.getAttribute("tabindex")||"0");return this.disabled||t<0?-1:this.focusElement?this._tabIndex:t}set tabIndex(t){var e;if(this.manipulatingTabindex){this.manipulatingTabindex=!1;return}if(this.focusElement===this){if(this.disabled)this._tabIndex=t;else if(t!==this._tabIndex){this._tabIndex=t;const i=""+t;this.manipulatingTabindex=!0,this.setAttribute("tabindex",i)}return}if(t===-1?this.addEventListener("pointerdown",this.onPointerdownManagementOfTabIndex):(this.manipulatingTabindex=!0,this.removeEventListener("pointerdown",this.onPointerdownManagementOfTabIndex)),t===-1||this.disabled){if(this.manipulatingTabindex=!0,this.setAttribute("tabindex","-1"),this.removeAttribute("focusable"),this.selfManageFocusElement)return;t===-1?(e=this.focusElement)==null||e.removeAttribute("tabindex"):(this._tabIndex=t,this.manageFocusElementTabindex(t));return}this.setAttribute("focusable",""),this.hasAttribute("tabindex")?this.removeAttribute("tabindex"):this.manipulatingTabindex=!1,this._tabIndex=t,this.manageFocusElementTabindex(t)}onPointerdownManagementOfTabIndex(){this.tabIndex===-1&&setTimeout(()=>{this.tabIndex=0,this.focus({preventScroll:!0}),this.tabIndex=-1})}async manageFocusElementTabindex(t){this.focusElement||await this.updateComplete,t===null?this.focusElement.removeAttribute("tabindex"):this.focusElement!==this&&(this.focusElement.tabIndex=t)}get focusElement(){throw new Error("Must implement focusElement getter!")}get selfManageFocusElement(){return!1}focus(t){this.disabled||!this.focusElement||(this.focusElement===this?Reflect.apply(HTMLElement.prototype.focus,this,[t]):this.focusElement.focus(t))}blur(){const t=this.focusElement||this;t===this?HTMLElement.prototype.blur.apply(this):t.blur()}click(){if(this.disabled)return;const t=this.focusElement||this;t===this?HTMLElement.prototype.click.apply(this):t.click()}manageAutoFocus(){this.autofocus&&(this.dispatchEvent(new KeyboardEvent("keydown",{code:"Tab"})),this.focusElement.focus())}firstUpdated(t){super.firstUpdated(t),(!this.hasAttribute("tabindex")||this.getAttribute("tabindex")!=="-1")&&this.setAttribute("focusable","")}update(t){t.has("disabled")&&this.handleDisabledChanged(this.disabled,t.get("disabled")),super.update(t)}updated(t){super.updated(t),t.has("disabled")&&this.disabled&&this.blur()}async handleDisabledChanged(t,e){const i=()=>this.focusElement!==this&&this.focusElement.disabled!==void 0;t?(this.manipulatingTabindex=!0,this.setAttribute("tabindex","-1"),await this.updateComplete,i()?this.focusElement.disabled=!0:this.setAttribute("aria-disabled","true")):e&&(this.manipulatingTabindex=!0,this.focusElement===this?this.setAttribute("tabindex",""+this._tabIndex):this.removeAttribute("tabindex"),await this.updateComplete,i()?this.focusElement.disabled=!1:this.removeAttribute("aria-disabled"))}async getUpdateComplete(){const t=await super.getUpdateComplete();return await this.autofocusReady,t}connectedCallback(){super.connectedCallback(),this.autofocus&&(this.autofocusReady=new Promise(async t=>{await h(),await h(),t()}),this.updateComplete.then(()=>{this.manageAutoFocus()}))}}l([r.property({type:Boolean,reflect:!0})],n.prototype,"disabled",2);l([r.property({type:Boolean})],n.prototype,"autofocus",2);l([r.property({type:Number})],n.prototype,"tabIndex",1);exports.Focusable=n;
18
+ "use strict";const r=require("lit/decorators.js"),d=require("./base-DxRGeCrb.cjs"),b=require("./focus-visible-D4BXb5RB.cjs");var f=Object.defineProperty,c=Object.getOwnPropertyDescriptor,l=(a,t,e,i)=>{for(var s=i>1?void 0:i?c(t,e):t,u=a.length-1,o;u>=0;u--)(o=a[u])&&(s=(i?o(t,e,s):o(s))||s);return i&&s&&f(t,e,s),s};function h(){return new Promise(a=>requestAnimationFrame(()=>a()))}class n extends b.FocusVisiblePolyfillMixin(d.LuzmoElement){constructor(){super(...arguments),this.disabled=!1,this.autofocus=!1,this._tabIndex=0,this.manipulatingTabindex=!1,this.autofocusReady=Promise.resolve()}get tabIndex(){if(this.focusElement===this){const e=this.hasAttribute("tabindex")?Number(this.getAttribute("tabindex")):Number.NaN;return Number.isNaN(e)?-1:e}const t=Number.parseFloat(this.hasAttribute("tabindex")&&this.getAttribute("tabindex")||"0");return this.disabled||t<0?-1:this.focusElement?this._tabIndex:t}set tabIndex(t){var e;if(this.manipulatingTabindex){this.manipulatingTabindex=!1;return}if(this.focusElement===this){if(this.disabled)this._tabIndex=t;else if(t!==this._tabIndex){this._tabIndex=t;const i=""+t;this.manipulatingTabindex=!0,this.setAttribute("tabindex",i)}return}if(t===-1?this.addEventListener("pointerdown",this.onPointerdownManagementOfTabIndex):(this.manipulatingTabindex=!0,this.removeEventListener("pointerdown",this.onPointerdownManagementOfTabIndex)),t===-1||this.disabled){if(this.manipulatingTabindex=!0,this.setAttribute("tabindex","-1"),this.removeAttribute("focusable"),this.selfManageFocusElement)return;t===-1?(e=this.focusElement)==null||e.removeAttribute("tabindex"):(this._tabIndex=t,this.manageFocusElementTabindex(t));return}this.setAttribute("focusable",""),this.hasAttribute("tabindex")?this.removeAttribute("tabindex"):this.manipulatingTabindex=!1,this._tabIndex=t,this.manageFocusElementTabindex(t)}onPointerdownManagementOfTabIndex(){this.tabIndex===-1&&setTimeout(()=>{this.tabIndex=0,this.focus({preventScroll:!0}),this.tabIndex=-1})}async manageFocusElementTabindex(t){this.focusElement||await this.updateComplete,t===null?this.focusElement.removeAttribute("tabindex"):this.focusElement!==this&&(this.focusElement.tabIndex=t)}get focusElement(){throw new Error("Must implement focusElement getter!")}get selfManageFocusElement(){return!1}focus(t){this.disabled||!this.focusElement||(this.focusElement===this?Reflect.apply(HTMLElement.prototype.focus,this,[t]):this.focusElement.focus(t))}blur(){const t=this.focusElement||this;t===this?HTMLElement.prototype.blur.apply(this):t.blur()}click(){if(this.disabled)return;const t=this.focusElement||this;t===this?HTMLElement.prototype.click.apply(this):t.click()}manageAutoFocus(){this.autofocus&&(this.dispatchEvent(new KeyboardEvent("keydown",{code:"Tab"})),this.focusElement.focus())}firstUpdated(t){super.firstUpdated(t),(!this.hasAttribute("tabindex")||this.getAttribute("tabindex")!=="-1")&&this.setAttribute("focusable","")}update(t){t.has("disabled")&&this.handleDisabledChanged(this.disabled,t.get("disabled")),super.update(t)}updated(t){super.updated(t),t.has("disabled")&&this.disabled&&this.blur()}async handleDisabledChanged(t,e){const i=()=>this.focusElement!==this&&this.focusElement.disabled!==void 0;t?(this.manipulatingTabindex=!0,this.setAttribute("tabindex","-1"),await this.updateComplete,i()?this.focusElement.disabled=!0:this.setAttribute("aria-disabled","true")):e&&(this.manipulatingTabindex=!0,this.focusElement===this?this.setAttribute("tabindex",""+this._tabIndex):this.removeAttribute("tabindex"),await this.updateComplete,i()?this.focusElement.disabled=!1:this.removeAttribute("aria-disabled"))}async getUpdateComplete(){const t=await super.getUpdateComplete();return await this.autofocusReady,t}connectedCallback(){super.connectedCallback(),this.autofocus&&(this.autofocusReady=new Promise(async t=>{await h(),await h(),t()}),this.updateComplete.then(()=>{this.manageAutoFocus()}))}}l([r.property({type:Boolean,reflect:!0})],n.prototype,"disabled",2);l([r.property({type:Boolean})],n.prototype,"autofocus",2);l([r.property({type:Number})],n.prototype,"tabIndex",1);exports.Focusable=n;
@@ -15,4 +15,4 @@
15
15
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
16
16
  * SOFTWARE.
17
17
  * */
18
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("@luzmo/icons"),a=require("lit"),s=require("lit/decorators.js"),v=require("lit/directives/if-defined.js"),d=require("../base-5nDSSNeT.cjs"),h=":host{pointer-events:none;transform:none;transform:var(--luzmo-icon-transform, none);block-size:var(--luzmo-icon-block-size, var(--luzmo-icon-size, var(--icon-size)));font-size:var(--luzmo-icon-block-size, var(--luzmo-icon-size, var(--icon-size)));color:inherit;color:var(--luzmo-icon-color, inherit);fill:currentColor;text-align:center;display:inline-block}::slotted(svg),:host(:not([block])) svg,:host(:not([block])) img{vertical-align:var(--luzmo-icon-vertical-align, -.125em)!important}:host([block]){display:flex;--icon-vertical-align: top;vertical-align:top}:host([block]) ::slotted(svg),:host([block]) svg,:host([block]) img{--icon-vertical-align: top;vertical-align:var(--luzmo-icon-vertical-align, top)}:host([size=xxs]){--icon-size: var(--luzmo-icon-size-xxs)}:host([size=xs]){--icon-size: var(--luzmo-icon-size-xs)}:host([size=s]){--icon-size: var(--luzmo-icon-size-s)}:host,:host([size=m]){--icon-size: var(--luzmo-icon-size-m)}:host([size=l]){--icon-size: var(--luzmo-icon-size-l)}:host([size=xl]){--icon-size: var(--luzmo-icon-size-xl)}:host([size=xxl]){--icon-size: var(--luzmo-icon-size-xxl)}:host(:not(:root)){overflow:visible}@media (forced-colors: active){:host{forced-color-adjust:auto}}img,svg,::slotted(*){height:100%;vertical-align:top;color:inherit}@media (forced-colors: active){img,svg,::slotted(*){forced-color-adjust:auto}}";var f=Object.defineProperty,z=(t,o,l,p)=>{for(var e=void 0,i=t.length-1,n;i>=0;i--)(n=t[i])&&(e=n(o,l,e)||e);return e&&f(o,l,e),e};class u extends d.LuzmoElement{constructor(){super(...arguments),this.label=""}static get styles(){return[a.unsafeCSS(h)]}connectedCallback(){super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback()}update(o){o.has("label")&&(this.label?this.removeAttribute("aria-hidden"):this.setAttribute("aria-hidden","true")),super.update(o)}render(){return a.html` <slot></slot> `}}z([s.property({reflect:!0})],u.prototype,"label");z([s.property({reflect:!0})],u.prototype,"size");var b=Object.defineProperty,c=(t,o,l,p)=>{for(var e=void 0,i=t.length-1,n;i>=0;i--)(n=t[i])&&(e=n(o,l,e)||e);return e&&b(o,l,e),e};class r extends u{constructor(){super(...arguments),this.block=!1}render(){return this.icon?m.luzmoIcon(this.icon,this.options):this.src?a.html` <img src=${this.src} alt=${v.ifDefined(this.label)} /> `:super.render()}}c([s.property()],r.prototype,"src");c([s.property()],r.prototype,"options");c([s.property()],r.prototype,"icon");c([s.property({type:Boolean})],r.prototype,"block");typeof customElements<"u"&&!customElements.get("luzmo-icon")&&customElements.define("luzmo-icon",r);exports.LuzmoIcon=r;
18
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("@luzmo/icons"),a=require("lit"),s=require("lit/decorators.js"),v=require("lit/directives/if-defined.js"),d=require("../base-DxRGeCrb.cjs"),h=":host{pointer-events:none;transform:none;transform:var(--luzmo-icon-transform, none);block-size:var(--luzmo-icon-block-size, var(--luzmo-icon-size, var(--icon-size)));font-size:var(--luzmo-icon-block-size, var(--luzmo-icon-size, var(--icon-size)));color:inherit;color:var(--luzmo-icon-color, inherit);fill:currentColor;text-align:center;display:inline-block}::slotted(svg),:host(:not([block])) svg,:host(:not([block])) img{vertical-align:var(--luzmo-icon-vertical-align, -.125em)!important}:host([block]){display:flex;--icon-vertical-align: top;vertical-align:top}:host([block]) ::slotted(svg),:host([block]) svg,:host([block]) img{--icon-vertical-align: top;vertical-align:var(--luzmo-icon-vertical-align, top)}:host([size=xxs]){--icon-size: var(--luzmo-icon-size-xxs)}:host([size=xs]){--icon-size: var(--luzmo-icon-size-xs)}:host([size=s]){--icon-size: var(--luzmo-icon-size-s)}:host,:host([size=m]){--icon-size: var(--luzmo-icon-size-m)}:host([size=l]){--icon-size: var(--luzmo-icon-size-l)}:host([size=xl]){--icon-size: var(--luzmo-icon-size-xl)}:host([size=xxl]){--icon-size: var(--luzmo-icon-size-xxl)}:host(:not(:root)){overflow:visible}@media (forced-colors: active){:host{forced-color-adjust:auto}}img,svg,::slotted(*){height:100%;vertical-align:top;color:inherit}@media (forced-colors: active){img,svg,::slotted(*){forced-color-adjust:auto}}";var f=Object.defineProperty,z=(t,o,l,p)=>{for(var e=void 0,i=t.length-1,n;i>=0;i--)(n=t[i])&&(e=n(o,l,e)||e);return e&&f(o,l,e),e};class u extends d.LuzmoElement{constructor(){super(...arguments),this.label=""}static get styles(){return[a.unsafeCSS(h)]}connectedCallback(){super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback()}update(o){o.has("label")&&(this.label?this.removeAttribute("aria-hidden"):this.setAttribute("aria-hidden","true")),super.update(o)}render(){return a.html` <slot></slot> `}}z([s.property({reflect:!0})],u.prototype,"label");z([s.property({reflect:!0})],u.prototype,"size");var b=Object.defineProperty,c=(t,o,l,p)=>{for(var e=void 0,i=t.length-1,n;i>=0;i--)(n=t[i])&&(e=n(o,l,e)||e);return e&&b(o,l,e),e};class r extends u{constructor(){super(...arguments),this.block=!1}render(){return this.icon?m.luzmoIcon(this.icon,this.options):this.src?a.html` <img src=${this.src} alt=${v.ifDefined(this.label)} /> `:super.render()}}c([s.property()],r.prototype,"src");c([s.property()],r.prototype,"options");c([s.property()],r.prototype,"icon");c([s.property({type:Boolean})],r.prototype,"block");typeof customElements<"u"&&!customElements.get("luzmo-icon")&&customElements.define("luzmo-icon",r);exports.LuzmoIcon=r;
@@ -19,7 +19,7 @@ import { luzmoIcon as f } from "@luzmo/icons";
19
19
  import { unsafeCSS as p, html as m } from "lit";
20
20
  import { property as i } from "lit/decorators.js";
21
21
  import { ifDefined as b } from "lit/directives/if-defined.js";
22
- import { a as g } from "../base-CdYjmV_8.js";
22
+ import { a as g } from "../base-BUViEg_7.js";
23
23
  const d = () => {
24
24
  if (typeof document < "u" && !document.querySelector("style[data-luzmo-vars]")) {
25
25
  const e = document.createElement("style");
@@ -15,208 +15,4 @@
15
15
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
16
16
  * SOFTWARE.
17
17
  * */
18
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const B=require("./accordion/index.cjs"),D=require("./action-bar/index.cjs"),N=require("./action-button/index.cjs");require("./action-group/index.cjs");const U=require("./action-menu/index.cjs"),G=require("./avatar/index.cjs"),F=require("./button/index.cjs"),V=require("./button-group/index.cjs"),H=require("./calendar/index.cjs"),j=require("./chat-message/index.cjs"),W=require("./chat-message-group/index.cjs"),K=require("./checkbox/index.cjs"),Z=require("./color-area/index.cjs"),J=require("./color-field/index.cjs"),Q=require("./color-handle/index.cjs");require("./color-loupe/index.cjs");const X=require("./color-menu/index.cjs"),Y=require("./color-palette/index.cjs"),tt=require("./color-palette-group/index.cjs"),et=require("./color-picker/index.cjs"),ot=require("./color-slider/index.cjs"),rt=require("./date-time-picker/index.cjs"),it=require("./divider/index.cjs");require("./field-group/index.cjs");require("./field-label/index.cjs");const at=require("./icon/index.cjs"),nt=require("./infield-button/index.cjs"),st=require("./label/index.cjs"),z=require("./menu/index.cjs"),lt=require("./multi-language-field/index.cjs"),ut=require("./number-field/index.cjs"),y=require("./options/index.cjs"),v=require("./overlay/index.cjs");require("./picker/index.cjs");const ct=require("./picker-button/index.cjs");require("./popover/index.cjs");require("./progress-circle/index.cjs");const f=require("@luzmo/icons"),i=require("lit"),s=require("lit/decorators.js"),I=require("lit/directives/repeat.js"),A=require("./base-5nDSSNeT.cjs"),S=require("./sized-mixin-DcvJLFeo.cjs"),_=require("./voice-recorder-CAm5iDre.cjs"),k=require("./tags/index.cjs"),mt=require("./text-field/index.cjs"),$=require("./radio/index.cjs"),pt=require("./search/index.cjs"),dt=require("./select/index.cjs"),ht=require("./slider/index.cjs"),M=require("./swatch/index.cjs"),bt=require("./switch/index.cjs"),w=require("./tabs/index.cjs"),gt=require("./toast/index.cjs"),vt=require("./tooltip/index.cjs"),zt=require("./focus-visible-D4BXb5RB.cjs"),xt=require("./focusable-CbVKgGfS.cjs"),p=require("./platform-BJnOJJag.cjs"),ft=require("./streaming-listener-D9Wc7skA.cjs"),_t=require("./action-group-D917z7XF.cjs"),Lt=require("./close-button-Decm0Qbb.cjs"),yt=require("./color-loupe-CIEFp7ln.cjs"),wt=require("./field-group-BYHNJmv0.cjs"),Ct=require("./field-label-DZoeqJJX.cjs"),c=require("./overlay-BhrVS5h7.cjs"),P=require("./slottable-request-event-BfUUt1Mh.cjs"),E=require("./picker-DxYgh4LR.cjs"),Rt=require("./popover-lcZnODPK.cjs"),At=require("./progress-circle-DgMbqrzG.cjs"),St=require("./text-field-DFP7p8Rv.cjs"),Et=":host{display:flex;flex-direction:column;font-family:var(--luzmo-prompt-box-font-family, var(--prompt-box-font-family));font-size:var(--luzmo-prompt-box-font-size, var(--prompt-box-font-size));line-height:var(--luzmo-prompt-box-line-height, var(--prompt-box-line-height));color:var(--highcontrast-prompt-box-text-color, var(--luzmo-prompt-box-text-color, var(--prompt-box-text-color)));width:100%}:host([disabled]){opacity:var(--luzmo-prompt-box-disabled-opacity, var(--prompt-box-disabled-opacity));pointer-events:none}.container{display:flex;flex-direction:column;gap:var(--luzmo-prompt-box-gap, var(--prompt-box-gap));padding:var(--luzmo-prompt-box-vertical-padding, var(--prompt-box-vertical-padding)) var(--luzmo-prompt-box-horizontal-padding, var(--prompt-box-horizontal-padding));background-color:var(--highcontrast-prompt-box-background-color, var(--luzmo-prompt-box-background-color, var(--prompt-box-background-color)));border-radius:var(--luzmo-prompt-box-border-radius, var(--prompt-box-border-radius));border-width:var(--luzmo-prompt-box-border-width, var(--prompt-box-border-width));border-style:solid;border-color:var(--highcontrast-prompt-box-border-color, var(--luzmo-prompt-box-border-color, var(--prompt-box-border-color)));box-shadow:var(--luzmo-prompt-box-shadow, var(--prompt-box-shadow));transition:border-color var(--luzmo-prompt-box-animation-duration, var(--prompt-box-animation-duration)) ease-in-out,box-shadow var(--luzmo-prompt-box-animation-duration, var(--prompt-box-animation-duration)) ease-in-out}:host(:focus-visible) .container{border-color:var(--luzmo-prompt-box-border-color-focus, var(--prompt-box-border-color-focus));box-shadow:var(--luzmo-prompt-box-shadow-focus, var(--prompt-box-shadow-focus))}:host(.focus-visible) .container{border-color:var(--luzmo-prompt-box-border-color-focus, var(--prompt-box-border-color-focus));box-shadow:var(--luzmo-prompt-box-shadow-focus, var(--prompt-box-shadow-focus))}:host(:focus){outline:none}.top-actions{display:flex;align-items:center;gap:var(--luzmo-prompt-box-top-actions-gap, var(--prompt-box-top-actions-gap));flex-wrap:wrap;opacity:var(--luzmo-prompt-box-actions-opacity, var(--prompt-box-actions-opacity, 1));transition:opacity var(--luzmo-prompt-box-animation-duration, var(--prompt-box-animation-duration)) ease-in-out}.top-actions.empty{display:none}.hidden-file-input{position:absolute;width:0;height:0;opacity:0;overflow:hidden;pointer-events:none}.attachments{display:flex;flex-direction:column;gap:var(--luzmo-prompt-box-attachments-gap, var(--prompt-box-attachments-gap, 8px))}.image-attachments{display:flex;flex-wrap:wrap;gap:var(--luzmo-prompt-box-image-attachments-gap, var(--prompt-box-image-attachments-gap, 8px))}.image-attachment{position:relative;display:inline-flex;width:var(--luzmo-prompt-box-image-preview-size, var(--prompt-box-image-preview-size, 80px));height:var(--luzmo-prompt-box-image-preview-size, var(--prompt-box-image-preview-size, 80px));border-radius:var(--luzmo-prompt-box-image-border-radius, var(--prompt-box-image-border-radius, 8px));overflow:hidden;background-color:var(--luzmo-prompt-box-image-background, var(--prompt-box-image-background, rgba(0, 0, 0, .05)))}.image-preview{width:100%;height:100%;object-fit:cover}.attachment-remove{position:absolute;top:4px;right:4px;width:var(--luzmo-prompt-box-remove-button-size, var(--prompt-box-remove-button-size, 24px));height:var(--luzmo-prompt-box-remove-button-size, var(--prompt-box-remove-button-size, 24px));background-color:var(--luzmo-prompt-box-remove-button-background, var(--prompt-box-remove-button-background, rgba(0, 0, 0, .5)));border-radius:50%;--luzmo-clear-button-icon-color: var( --luzmo-prompt-box-remove-button-icon-color, var(--prompt-box-remove-button-icon-color, #fff) )}.attachment-remove:hover{background-color:var(--luzmo-prompt-box-remove-button-background-hover, var(--prompt-box-remove-button-background-hover, rgba(0, 0, 0, .7)))}.file-attachments{--luzmo-tag-border-radius: 16px;display:flex;flex-wrap:wrap;gap:var(--luzmo-prompt-box-file-attachments-gap, var(--prompt-box-file-attachments-gap, 4px))}.file-attachment{max-width:200px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.input-wrapper{position:relative;display:flex;flex:1}.input-field{flex:1;width:100%;min-width:0;--luzmo-text-field-focus-indicator-width: 0;--luzmo-text-field-border-width: 0;--luzmo-text-field-width: 100%;--luzmo-text-field-min-width: 0;--luzmo-text-field-placeholder-text-color-default: var( --luzmo-prompt-box-placeholder-color, var(--prompt-box-placeholder-color) )}.actions-row{display:flex;align-items:center;justify-content:space-between;gap:var(--luzmo-prompt-box-actions-gap, var(--prompt-box-actions-gap))}.bottom-actions{display:flex;align-items:center;gap:var(--luzmo-prompt-box-bottom-actions-gap, var(--prompt-box-bottom-actions-gap));flex-wrap:wrap;flex:1;opacity:var(--luzmo-prompt-box-actions-opacity, var(--prompt-box-actions-opacity, 1));transition:opacity var(--luzmo-prompt-box-animation-duration, var(--prompt-box-animation-duration)) ease-in-out}.button-group{display:flex;align-items:center;gap:var(--luzmo-prompt-box-button-group-gap, var(--prompt-box-button-group-gap));margin-left:auto}.record-button,.cancel-recording-button{--luzmo-action-button-border-radius: var( --luzmo-prompt-box-record-button-border-radius, 50% );--luzmo-action-button-focus-indicator-border-radius: var( --luzmo-prompt-box-record-button-focus-indicator-border-radius, 50% )}.submit-button{margin-inline-start:var(--luzmo-prompt-box-submit-button-margin-inline-start, var(--prompt-box-submit-button-margin-inline-start))}.recording-ui{display:flex;align-items:center;gap:var(--luzmo-prompt-box-recording-gap, var(--prompt-box-recording-gap))}.waveform{display:flex;align-items:center;gap:var(--luzmo-prompt-box-waveform-gap, var(--prompt-box-waveform-gap, 3px));height:var(--luzmo-prompt-box-waveform-height, var(--prompt-box-waveform-height, 24px));padding:0 4px}.waveform-bar{width:var(--luzmo-prompt-box-waveform-bar-width, var(--prompt-box-waveform-bar-width, 3px));height:calc(var(--bar-height, .3) * var(--luzmo-prompt-box-waveform-height, var(--prompt-box-waveform-height, 24px)));min-height:4px;background-color:var(--luzmo-prompt-box-waveform-bar-color, var(--prompt-box-waveform-bar-color, currentColor));border-radius:var(--luzmo-prompt-box-waveform-bar-radius, var(--prompt-box-waveform-bar-radius, 2px));transition:height .05s ease-out;animation:waveform-pulse 1s ease-in-out infinite}.waveform-bar:nth-child(1){animation-delay:0s}.waveform-bar:nth-child(2){animation-delay:.1s}.waveform-bar:nth-child(3){animation-delay:.2s}.waveform-bar:nth-child(4){animation-delay:.1s}.waveform-bar:nth-child(5){animation-delay:0s}@keyframes waveform-pulse{0%,to{opacity:.6}50%{opacity:1}}.recording-duration{font-family:var(--luzmo-prompt-box-recording-duration-font-family, var(--prompt-box-recording-duration-font-family, monospace));font-size:var(--luzmo-prompt-box-recording-duration-font-size, var(--prompt-box-recording-duration-font-size, 14px));font-weight:var(--luzmo-prompt-box-recording-duration-font-weight, var(--prompt-box-recording-duration-font-weight, 500));color:var(--luzmo-prompt-box-recording-duration-color, var(--prompt-box-recording-duration-color, currentColor));text-align:center}::slotted([slot=top-actions]){display:inline-flex;align-items:center}::slotted([slot=bottom-actions]){display:inline-flex;align-items:center}::slotted([slot=record-button]){display:inline-flex}::slotted([slot=submit-button]){display:inline-flex;margin-inline-start:var(--luzmo-prompt-box-submit-button-margin-inline-start, var(--prompt-box-submit-button-margin-inline-start))}@media (forced-colors: active){:host{--highcontrast-prompt-box-background-color: Canvas;--highcontrast-prompt-box-border-color: CanvasText;--highcontrast-prompt-box-text-color: CanvasText}}:host{--prompt-box-font-family: var(--luzmo-font-family);--prompt-box-font-size: var(--luzmo-font-size);--prompt-box-line-height: 1.5;--prompt-box-text-color: var(--luzmo-font-color);--prompt-box-background-color: var(--luzmo-background-color);--prompt-box-border-radius: var(--luzmo-border-radius-xl);--prompt-box-border-width: var(--luzmo-border-width);--prompt-box-border-color: var(--luzmo-border-color);--prompt-box-border-color-focus: var(--luzmo-primary);--prompt-box-shadow: 0 2px 8px rgba(var(--luzmo-border-color-rgb), .08);--prompt-box-shadow-focus: 0 2px 12px rgba(var(--luzmo-primary-rgb), .15);--prompt-box-gap: var(--luzmo-spacing-5);--prompt-box-recording-gap: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--prompt-box-vertical-padding: var(--luzmo-spacing-4);--prompt-box-horizontal-padding: var(--luzmo-spacing-5);--prompt-box-actions-gap: var(--luzmo-spacing-3);--prompt-box-top-actions-gap: var(--luzmo-spacing-2);--prompt-box-bottom-actions-gap: var(--luzmo-spacing-2);--prompt-box-button-group-gap: var(--luzmo-spacing-2);--prompt-box-submit-button-margin-inline-start: var(--luzmo-spacing-3);--prompt-box-max-height: 200px;--prompt-box-placeholder-color: var(--luzmo-font-color-extra-dimmed);--prompt-box-placeholder-opacity: 1;--prompt-box-animation-duration: var(--luzmo-animation-duration, .15s);--prompt-box-disabled-opacity: .5;--prompt-box-attachments-gap: var(--luzmo-spacing-1);--prompt-box-image-attachments-gap: var(--luzmo-spacing-2);--prompt-box-file-attachments-gap: var(--luzmo-spacing-2);--prompt-box-image-preview-size: 64px;--prompt-box-image-border-radius: var(--luzmo-border-radius);--prompt-box-image-background: rgba(0, 0, 0, .05);--prompt-box-remove-button-size: 20px;--prompt-box-remove-button-background: rgba(0, 0, 0, .5);--prompt-box-remove-button-background-hover: rgba(0, 0, 0, .7);--prompt-box-remove-button-icon-color: #fff}:host([size=s]){--prompt-box-font-size: var(--luzmo-font-size-s);--prompt-box-border-radius: var(--luzmo-border-radius-l);--prompt-box-vertical-padding: var(--luzmo-spacing-3);--prompt-box-horizontal-padding: var(--luzmo-spacing-4);--prompt-box-gap: var(--luzmo-spacing-4);--prompt-box-attachments-gap: 0;--prompt-box-image-attachments-gap: var(--luzmo-spacing-1);--prompt-box-recording-gap: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--prompt-box-max-height: 150px;--prompt-box-image-preview-size: 48px;--prompt-box-remove-button-size: 18px}:host([size=l]){--prompt-box-font-size: var(--luzmo-font-size-l);--prompt-box-border-radius: var(--luzmo-border-radius-xl);--prompt-box-vertical-padding: var(--luzmo-spacing-5);--prompt-box-horizontal-padding: calc( var(--luzmo-spacing-5) + var(--luzmo-spacing-1) );--prompt-box-gap: var(--luzmo-spacing-4);--prompt-box-attachments-gap: var(--luzmo-spacing-1);--prompt-box-image-attachments-gap: calc( var(--luzmo-spacing-2) + var(--luzmo-spacing-1) );--prompt-box-recording-gap: calc( var(--luzmo-spacing-4) + var(--luzmo-spacing-1) );--prompt-box-max-height: 250px;--prompt-box-image-preview-size: 72px;--prompt-box-remove-button-size: 24px}:host([size=xl]){--prompt-box-font-size: var(--luzmo-font-size-xl);--prompt-box-border-radius: var(--luzmo-border-radius-xl);--prompt-box-vertical-padding: calc( var(--luzmo-spacing-5) + var(--luzmo-spacing-1) );--prompt-box-horizontal-padding: calc( var(--luzmo-spacing-5) + var(--luzmo-spacing-2) );--prompt-box-gap: var(--luzmo-spacing-5);--prompt-box-attachments-gap: var(--luzmo-spacing-2);--prompt-box-image-attachments-gap: var(--luzmo-spacing-3);--prompt-box-max-height: 300px;--prompt-box-image-preview-size: 96px;--prompt-box-remove-button-size: 28px}:host([pending]){--prompt-box-actions-opacity: .75}";var qt=Object.defineProperty,l=(q,t,e,o)=>{for(var n=void 0,r=q.length-1,u;r>=0;r--)(u=q[r])&&(n=u(t,e,n)||n);return n&&qt(t,e,n),n};let L=!1;typeof window<"u"&&(document.addEventListener("keydown",()=>{L=!0},!0),document.addEventListener("mousedown",()=>{L=!1},!0),document.addEventListener("pointerdown",()=>{L=!1},!0));var b;const a=(b=class extends S.SizedMixin(A.LuzmoElement,{validSizes:["xs","s","m","l","xl"],defaultSize:"m"}){constructor(){super(...arguments),this.rows=1,this.grows=!1,this.recording=!1,this.hideSubmit=!1,this.placeholder="",this.value="",this.disabled=!1,this.readonly=!1,this.maxlength=-1,this.pending=!1,this.allowImages=!1,this.allowFiles=!1,this.acceptedFileTypes=[],this._hasTopActions=!1,this._hasBottomActions=!1,this._hasRecordButton=!1,this._hasSubmitButton=!1,this._attachments=[],this._isRecording=!1,this._recordingDuration=0,this._audioLevel=0,this._voiceRecorder=null,this._shouldFocusFinishButton=!1,this._attachmentIdCounter=0,this._handleHostFocus=()=>{L&&this.classList.add("focus-visible")},this._handleHostBlur=()=>{this.classList.remove("focus-visible")},this._handlePaste=t=>{var n;if(!this.allowImages||this.disabled||this.readonly||this.pending)return;const e=(n=t.clipboardData)==null?void 0:n.items;if(!e)return;const o=[];for(const r of e)if(r.type.startsWith("image/")){const u=r.getAsFile();u&&o.push(u)}o.length>0&&this.addFiles(o)}}static get styles(){return[i.unsafeCSS(Et)]}get _tagSize(){switch(this.size){case"s":case"m":return"s";case"l":case"xl":return"m";default:return"s"}}connectedCallback(){super.connectedCallback(),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0"),this.addEventListener("focus",this._handleHostFocus),this.addEventListener("blur",this._handleHostBlur),this.addEventListener("paste",this._handlePaste)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("focus",this._handleHostFocus),this.removeEventListener("blur",this._handleHostBlur),this.removeEventListener("paste",this._handlePaste),this._revokeAllPreviewUrls(),this._destroyVoiceRecorder()}_revokeAllPreviewUrls(){for(const t of this._attachments)t.previewUrl&&URL.revokeObjectURL(t.previewUrl)}_handleTopActionsSlotChange(t){const e=t.target;this._hasTopActions=e.assignedNodes().length>0}_handleBottomActionsSlotChange(t){const e=t.target;this._hasBottomActions=e.assignedNodes().length>0}_handleRecordButtonSlotChange(t){const e=t.target;this._hasRecordButton=e.assignedNodes().length>0}_handleSubmitButtonSlotChange(t){const e=t.target;this._hasSubmitButton=e.assignedNodes().length>0}_handleInput(t){const e=t.target;this.value=e.value,this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0}))}_handleKeydown(t){t.key==="Enter"&&!t.shiftKey&&(t.preventDefault(),this._submit())}_handleFileInputChange(t){const e=t.target,o=e.files;o&&o.length>0&&this.addFiles([...o]),e.value=""}_isFileTypeAccepted(t){if(this.acceptedFileTypes.length===0)return!0;const e=t.name.toLowerCase(),o=t.type.toLowerCase();for(const n of this.acceptedFileTypes){const r=n.toLowerCase();if(r.endsWith("/*")){const u=r.slice(0,-2);if(o.startsWith(u+"/"))return!0}else{if(o===r)return!0;if(r.startsWith(".")&&e.endsWith(r))return!0}}return!1}_isImageFile(t){return t.type.startsWith("image/")}_generateAttachmentId(){return`attachment-${++this._attachmentIdCounter}-${Date.now()}`}addFiles(t){if(this.disabled||this.readonly||this.pending)return[];const e=[];for(const o of t){if(this._isImageFile(o)&&!this.allowImages||!this._isImageFile(o)&&!this.allowFiles||!this._isFileTypeAccepted(o))continue;const n=this._generateAttachmentId(),r={file:o,id:n};this._isImageFile(o)&&(r.previewUrl=URL.createObjectURL(o)),this._attachments=[...this._attachments,r],e.push(n)}return e.length>0&&this.dispatchEvent(new CustomEvent("luzmo-attachments-change",{bubbles:!0,composed:!0,detail:{attachments:this._attachments}})),e}removeAttachment(t){const e=this._attachments.find(o=>o.id===t);e&&(e.previewUrl&&URL.revokeObjectURL(e.previewUrl),this._attachments=this._attachments.filter(o=>o.id!==t),this.dispatchEvent(new CustomEvent("luzmo-attachments-change",{bubbles:!0,composed:!0,detail:{attachments:this._attachments}})))}clearAttachments(){this._revokeAllPreviewUrls(),this._attachments=[],this.dispatchEvent(new CustomEvent("luzmo-attachments-change",{bubbles:!0,composed:!0,detail:{attachments:this._attachments}}))}getAttachments(){return[...this._attachments]}openFilePicker(){var t;(t=this._fileInput)==null||t.click()}_handleRemoveAttachment(t){const o=t.currentTarget.dataset.attachmentId;o&&this.removeAttachment(o)}_handleTagDelete(t){const o=t.target.dataset.attachmentId;o&&(t.preventDefault(),this.removeAttachment(o))}_extractActionValues(t){const e=[];for(const o of t){const n=this._getInteractiveElements(o);for(const r of n){const u={element:r,name:r.getAttribute("name")||r.getAttribute("label")||void 0},d=["luzmo-switch","luzmo-checkbox","luzmo-radio"],h=r.tagName.toLowerCase();"value"in r&&(u.value=r.value),d.includes(h)&&"checked"in r&&(u.checked=r.checked),e.push(u)}}return e}_submit(){var d,h;if(this.disabled||this.readonly||this.pending)return;const t=(d=this.shadowRoot)==null?void 0:d.querySelector('slot[name="top-actions"]'),e=(h=this.shadowRoot)==null?void 0:h.querySelector('slot[name="bottom-actions"]'),o=(t==null?void 0:t.assignedElements())??[],n=(e==null?void 0:e.assignedElements())??[],r=this._extractActionValues([...o,...n]),u={value:this.value,topActions:[...o],bottomActions:[...n],actionValues:r,attachments:[...this._attachments]};this.dispatchEvent(new CustomEvent("luzmo-submit",{bubbles:!0,composed:!0,detail:u}))}async _handleRecordClick(t){if(!_.VoiceRecorder.isSupported()){this.dispatchEvent(new CustomEvent("luzmo-record-error",{bubbles:!0,composed:!0,detail:{error:"Voice recording is not supported in this browser"}}));return}if(this._isRecording)this._stopRecording();else{const e=t.currentTarget;this._shouldFocusFinishButton=e.matches(":focus-visible"),await this._startRecording()}this.dispatchEvent(new CustomEvent("luzmo-record",{bubbles:!0,composed:!0,detail:{isRecording:this._isRecording}}))}async _startRecording(){if(this._initVoiceRecorder(),!this._voiceRecorder)return;await this._voiceRecorder.startRecording()&&(this._isRecording=!0,this._recordingDuration=0,this._audioLevel=0)}_stopRecording(){this._voiceRecorder&&this._voiceRecorder.stopRecording()}_cancelRecording(){this._voiceRecorder&&this._voiceRecorder.cancelRecording(),this._isRecording=!1,this._recordingDuration=0,this._audioLevel=0}_handleCancelRecordClick(){this._cancelRecording(),this.dispatchEvent(new CustomEvent("luzmo-record-cancel",{bubbles:!0,composed:!0}))}_initVoiceRecorder(){this._voiceRecorder||(this._voiceRecorder=new _.VoiceRecorder({maxDuration:3e5}),this._voiceRecorder.onStart(()=>{this._isRecording=!0}).onStop(t=>{this._isRecording=!1,this._recordingDuration=0,this._audioLevel=0,this.dispatchEvent(new CustomEvent("luzmo-recording-complete",{bubbles:!0,composed:!0,detail:{audioBlob:t.audioBlob,duration:t.duration,mimeType:t.mimeType}}))}).onError(t=>{this._isRecording=!1,this._recordingDuration=0,this._audioLevel=0,this.dispatchEvent(new CustomEvent("luzmo-record-error",{bubbles:!0,composed:!0,detail:{error:t}}))}).onAudioLevel(t=>{this._audioLevel=t}).onDurationUpdate(t=>{this._recordingDuration=t}))}_destroyVoiceRecorder(){this._voiceRecorder&&(this._voiceRecorder.destroy(),this._voiceRecorder=null),this._isRecording=!1,this._recordingDuration=0,this._audioLevel=0}_formatRecordingDuration(){return _.VoiceRecorder.formatDuration(this._recordingDuration)}focus(){var t;(t=this._inputElement)==null||t.focus()}clear(){this.value="",this.clearAttachments()}getTopActions(){var e;const t=(e=this.shadowRoot)==null?void 0:e.querySelector('slot[name="top-actions"]');return(t==null?void 0:t.assignedElements())??[]}getBottomActions(){var e;const t=(e=this.shadowRoot)==null?void 0:e.querySelector('slot[name="bottom-actions"]');return(t==null?void 0:t.assignedElements())??[]}updated(t){super.updated(t),(t.has("pending")||t.has("disabled"))&&this._updateSlottedElementsState(),this._shouldFocusFinishButton&&this._isRecording&&(this._shouldFocusFinishButton=!1,requestAnimationFrame(()=>{var e;(e=this._finishRecordingButton)==null||e.focus()}))}_getInteractiveElements(t){const e=[];t.matches(b.INTERACTIVE_ELEMENTS_SELECTOR)&&e.push(t);const o=t.querySelectorAll(b.INTERACTIVE_ELEMENTS_SELECTOR);return e.push(...o),e}_updateSlottedElementsState(){var d,h,x,T;const t=(d=this.shadowRoot)==null?void 0:d.querySelector('slot[name="submit-button"]'),e=(t==null?void 0:t.assignedElements())??[];for(const C of e){const R=this._getInteractiveElements(C);for(const m of R)this.pending?(m.setAttribute("pending",""),m.removeAttribute("disabled"),m.removeAttribute("readonly")):this.disabled?(m.removeAttribute("pending"),m.setAttribute("disabled",""),m.removeAttribute("readonly")):(m.removeAttribute("pending"),m.removeAttribute("disabled"),m.removeAttribute("readonly"))}const o=C=>{for(const R of C){const m=this._getInteractiveElements(R);for(const g of m)this.disabled?(g.setAttribute("disabled",""),g.removeAttribute("readonly")):this.pending?(g.removeAttribute("disabled"),g.setAttribute("readonly","")):(g.removeAttribute("disabled"),g.removeAttribute("readonly"))}},n=(h=this.shadowRoot)==null?void 0:h.querySelector('slot[name="top-actions"]');o((n==null?void 0:n.assignedElements())??[]);const r=(x=this.shadowRoot)==null?void 0:x.querySelector('slot[name="bottom-actions"]');o((r==null?void 0:r.assignedElements())??[]);const u=(T=this.shadowRoot)==null?void 0:T.querySelector('slot[name="record-button"]');o((u==null?void 0:u.assignedElements())??[])}renderTopActions(){return i.html`
19
- <div
20
- class="top-actions ${this._hasTopActions?"":"empty"}"
21
- part="top-actions"
22
- >
23
- <slot
24
- name="top-actions"
25
- @slotchange=${this._handleTopActionsSlotChange}
26
- ></slot>
27
- </div>
28
- `}renderBottomActions(){return i.html`
29
- <div
30
- class="bottom-actions ${this._hasBottomActions?"":"empty"}"
31
- part="bottom-actions"
32
- >
33
- <slot
34
- name="bottom-actions"
35
- @slotchange=${this._handleBottomActionsSlotChange}
36
- ></slot>
37
- </div>
38
- `}renderRecordButton(){return!this.recording&&!this._hasRecordButton?i.html`<slot
39
- name="record-button"
40
- @slotchange=${this._handleRecordButtonSlotChange}
41
- ></slot>`:this._hasRecordButton?i.html`<slot
42
- name="record-button"
43
- @slotchange=${this._handleRecordButtonSlotChange}
44
- ></slot>`:this._isRecording?i.html`
45
- <slot
46
- name="record-button"
47
- @slotchange=${this._handleRecordButtonSlotChange}
48
- ></slot>
49
- <div class="recording-ui" part="recording-ui">
50
- <luzmo-action-button
51
- class="cancel-recording-button"
52
- part="cancel-recording-button"
53
- .size=${this.size}
54
- ?disabled=${this.disabled}
55
- @click=${this._handleCancelRecordClick}
56
- aria-label="Cancel recording"
57
- >
58
- <luzmo-icon
59
- slot="icon"
60
- .icon=${f.luzmoClear}
61
- .size=${this.size}
62
- ></luzmo-icon>
63
- </luzmo-action-button>
64
- ${this.renderWaveform()}
65
- <span class="recording-duration" part="recording-duration">
66
- ${this._formatRecordingDuration()}
67
- </span>
68
- <luzmo-button
69
- class="finish-recording-button"
70
- part="finish-recording-button"
71
- .size=${this.size}
72
- icon-only
73
- variant="primary"
74
- ?disabled=${this.disabled}
75
- @click=${this._handleRecordClick}
76
- aria-label="Finish recording"
77
- >
78
- <luzmo-icon slot="icon" .icon=${f.luzmoCheck}></luzmo-icon>
79
- </luzmo-button>
80
- </div>
81
- `:i.html`
82
- <slot
83
- name="record-button"
84
- @slotchange=${this._handleRecordButtonSlotChange}
85
- ></slot>
86
- <luzmo-action-button
87
- class="record-button"
88
- part="record-button"
89
- quiet
90
- .size=${this.size}
91
- ?disabled=${this.disabled}
92
- ?readonly=${this.pending}
93
- @click=${this._handleRecordClick}
94
- aria-label="Record"
95
- >
96
- <luzmo-icon
97
- slot="icon"
98
- .icon=${f.luzmoMicrophone}
99
- .size=${this.size}
100
- ></luzmo-icon>
101
- </luzmo-action-button>
102
- `}renderWaveform(){const e=[];for(let o=0;o<5;o++){const r=Math.floor(2.5),d=1-Math.abs(o-r)*.15,h=.3+this._audioLevel*.7*d,x=Math.max(.2,Math.min(1,h));e.push(i.html`
103
- <span
104
- class="waveform-bar"
105
- style="--bar-height: ${x}"
106
- ></span>
107
- `)}return i.html`
108
- <div class="waveform" part="waveform" aria-hidden="true">${e}</div>
109
- `}renderSubmitButton(){return this._isRecording?i.html`<slot
110
- name="submit-button"
111
- @slotchange=${this._handleSubmitButtonSlotChange}
112
- ></slot>`:this.hideSubmit&&!this._hasSubmitButton?i.html`<slot
113
- name="submit-button"
114
- @slotchange=${this._handleSubmitButtonSlotChange}
115
- ></slot>`:this._hasSubmitButton?i.html`<slot
116
- name="submit-button"
117
- @slotchange=${this._handleSubmitButtonSlotChange}
118
- ></slot>`:i.html`
119
- <slot
120
- name="submit-button"
121
- @slotchange=${this._handleSubmitButtonSlotChange}
122
- ></slot>
123
- <luzmo-button
124
- class="submit-button"
125
- part="submit-button"
126
- .size=${this.size}
127
- icon-only
128
- variant="primary"
129
- ?disabled=${this.disabled||!this.pending&&!this.value.trim()}
130
- ?pending=${this.pending}
131
- @click=${this._submit}
132
- aria-label="Submit"
133
- >
134
- <luzmo-icon slot="icon" .icon=${f.luzmoArrowUp}></luzmo-icon>
135
- </luzmo-button>
136
- `}renderTextarea(){return i.html`
137
- <luzmo-text-field
138
- class="input-field"
139
- part="input"
140
- placeholder=${this.placeholder}
141
- .value=${this.value}
142
- .size=${this.size}
143
- rows=${this.rows}
144
- ?grows=${this.grows}
145
- ?readonly=${this.readonly||this.pending||this.disabled}
146
- maxlength=${this.maxlength>0?this.maxlength:-1}
147
- multiline
148
- quiet
149
- label=${this.placeholder||"Enter your message"}
150
- @input=${this._handleInput}
151
- @keydown=${this._handleKeydown}
152
- ></luzmo-text-field>
153
- `}_getAcceptAttribute(){if(this.acceptedFileTypes.length>0)return this.acceptedFileTypes.join(",");const t=[];return this.allowImages&&t.push("image/*"),this.allowFiles&&t.push("*/*"),t.join(",")}renderHiddenFileInput(){return!this.allowImages&&!this.allowFiles?i.nothing:i.html`
154
- <input
155
- type="file"
156
- class="hidden-file-input"
157
- accept=${this._getAcceptAttribute()}
158
- multiple
159
- @change=${this._handleFileInputChange}
160
- aria-hidden="true"
161
- tabindex="-1"
162
- />
163
- `}renderImageAttachment(t){return i.html`
164
- <div class="image-attachment" part="image-attachment">
165
- <img
166
- src=${t.previewUrl||""}
167
- alt=${t.file.name}
168
- class="image-preview"
169
- />
170
- <luzmo-clear-button
171
- class="attachment-remove"
172
- .size=${this.size}
173
- ?disabled=${this.disabled||this.pending}
174
- label="Remove ${t.file.name}"
175
- data-attachment-id=${t.id}
176
- @click=${this._handleRemoveAttachment}
177
- ></luzmo-clear-button>
178
- </div>
179
- `}renderFileAttachment(t){return i.html`
180
- <luzmo-tag
181
- class="file-attachment"
182
- part="file-attachment"
183
- .size=${this._tagSize}
184
- deletable
185
- ?disabled=${this.disabled||this.pending}
186
- data-attachment-id=${t.id}
187
- @delete=${this._handleTagDelete}
188
- >
189
- ${t.file.name}
190
- </luzmo-tag>
191
- `}renderAttachments(){if(this._attachments.length===0)return i.nothing;const t=this._attachments.filter(o=>this._isImageFile(o.file)),e=this._attachments.filter(o=>!this._isImageFile(o.file));return i.html`
192
- <div class="attachments" part="attachments">
193
- ${t.length>0?i.html`
194
- <div class="image-attachments" part="image-attachments">
195
- ${I.repeat(t,o=>o.id,o=>this.renderImageAttachment(o))}
196
- </div>
197
- `:i.nothing}
198
- ${e.length>0?i.html`
199
- <luzmo-tags
200
- class="file-attachments"
201
- part="file-attachments"
202
- .size=${this._tagSize}
203
- >
204
- ${I.repeat(e,o=>o.id,o=>this.renderFileAttachment(o))}
205
- </luzmo-tags>
206
- `:i.nothing}
207
- </div>
208
- `}render(){return i.html`
209
- ${this.renderHiddenFileInput()}
210
- <div class="container" part="container">
211
- ${this.renderTopActions()} ${this.renderAttachments()}
212
- <div class="input-wrapper" part="input-wrapper">
213
- ${this.renderTextarea()}
214
- </div>
215
- <div class="actions-row" part="actions-row">
216
- ${this.renderBottomActions()}
217
- <div class="button-group" part="button-group">
218
- ${this.renderRecordButton()} ${this.renderSubmitButton()}
219
- </div>
220
- </div>
221
- </div>
222
- `}},b.INTERACTIVE_ELEMENTS_SELECTOR="luzmo-button, luzmo-action-button, luzmo-switch, luzmo-picker, luzmo-picker-button, luzmo-select, luzmo-text-field, luzmo-number-field",b);l([s.property({type:Number})],a.prototype,"rows");l([s.property({type:Boolean,reflect:!0})],a.prototype,"grows");l([s.property({type:Boolean,reflect:!0})],a.prototype,"recording");l([s.property({type:Boolean,reflect:!0,attribute:"hide-submit"})],a.prototype,"hideSubmit");l([s.property({type:String})],a.prototype,"placeholder");l([s.property({type:String})],a.prototype,"value");l([s.property({type:Boolean,reflect:!0})],a.prototype,"disabled");l([s.property({type:Boolean,reflect:!0})],a.prototype,"readonly");l([s.property({type:Number})],a.prototype,"maxlength");l([s.property({type:Boolean,reflect:!0})],a.prototype,"pending");l([s.property({type:Boolean,reflect:!0,attribute:"allow-images"})],a.prototype,"allowImages");l([s.property({type:Boolean,reflect:!0,attribute:"allow-files"})],a.prototype,"allowFiles");l([s.property({type:Array,attribute:"accepted-file-types"})],a.prototype,"acceptedFileTypes");l([s.state()],a.prototype,"_hasTopActions");l([s.state()],a.prototype,"_hasBottomActions");l([s.state()],a.prototype,"_hasRecordButton");l([s.state()],a.prototype,"_hasSubmitButton");l([s.state()],a.prototype,"_attachments");l([s.state()],a.prototype,"_isRecording");l([s.state()],a.prototype,"_recordingDuration");l([s.state()],a.prototype,"_audioLevel");l([s.query("luzmo-text-field")],a.prototype,"_inputElement");l([s.query('input[type="file"]')],a.prototype,"_fileInput");l([s.query(".finish-recording-button")],a.prototype,"_finishRecordingButton");let O=a;customElements.get("luzmo-prompt-box")||customElements.define("luzmo-prompt-box",O);exports.LuzmoAccordion=B.LuzmoAccordion;exports.LuzmoAccordionItem=B.LuzmoAccordionItem;exports.LuzmoActionBar=D.LuzmoActionBar;exports.LuzmoActionButton=N.LuzmoActionButton;exports.LuzmoActionMenu=U.LuzmoActionMenu;exports.LuzmoAvatar=G.LuzmoAvatar;exports.LuzmoButton=F.LuzmoButton;exports.LuzmoClearButton=F.LuzmoClearButton;exports.LuzmoButtonGroup=V.LuzmoButtonGroup;exports.LuzmoCalendar=H.LuzmoCalendar;exports.LuzmoChatMessage=j.LuzmoChatMessage;exports.LuzmoChatMessageGroup=W.LuzmoChatMessageGroup;exports.LuzmoCheckbox=K.LuzmoCheckbox;exports.LuzmoColorArea=Z.LuzmoColorArea;exports.LuzmoColorField=J.LuzmoColorField;exports.LuzmoColorHandle=Q.LuzmoColorHandle;exports.LuzmoColorMenu=X.LuzmoColorMenu;exports.LuzmoColorPalette=Y.LuzmoColorPalette;exports.LuzmoColorPaletteGroup=tt.LuzmoColorPaletteGroup;exports.LuzmoColorPicker=et.LuzmoColorPicker;exports.LuzmoColorSlider=ot.LuzmoColorSlider;exports.LuzmoDateTimePicker=rt.LuzmoDateTimePicker;exports.LuzmoDivider=it.LuzmoDivider;exports.LuzmoIcon=at.LuzmoIcon;exports.LuzmoInfieldButton=nt.LuzmoInfieldButton;exports.LuzmoLabel=st.LuzmoLabel;exports.LuzmoMenu=z.LuzmoMenu;exports.LuzmoMenuDivider=z.LuzmoMenuDivider;exports.LuzmoMenuGroup=z.LuzmoMenuGroup;exports.LuzmoMenuItem=z.LuzmoMenuItem;exports.MenuItemAddedOrUpdatedEvent=z.MenuItemAddedOrUpdatedEvent;exports.LuzmoMultiLangField=lt.LuzmoMultiLangField;exports.LuzmoNumberField=ut.LuzmoNumberField;exports.LuzmoOption=y.LuzmoOption;exports.LuzmoOptions=y.LuzmoOptions;exports.LuzmoOptionsDivider=y.LuzmoOptionsDivider;exports.VIRTUALIZE_AS_OF_NUM_ITEMS=y.VIRTUALIZE_AS_OF_NUM_ITEMS;exports.LuzmoOverlayTrigger=v.LuzmoOverlayTrigger;exports.OverlayTriggerDirective=v.OverlayTriggerDirective;exports.SlottableRequestDirective=v.SlottableRequestDirective;exports.openOverlay=v.openOverlay;exports.slottableRequest=v.slottableRequest;exports.trigger=v.trigger;exports.LuzmoPickerButton=ct.LuzmoPickerButton;exports.LuzmoElement=A.LuzmoElement;exports.LuzmoMixin=A.LuzmoMixin;exports.ElementSizes=S.ElementSizes;exports.SizedMixin=S.SizedMixin;exports.VoiceRecorder=_.VoiceRecorder;exports.LuzmoTag=k.LuzmoTag;exports.LuzmoTags=k.LuzmoTags;exports.LuzmoHelpText=mt.LuzmoHelpText;exports.LuzmoRadio=$.LuzmoRadio;exports.LuzmoRadioGroup=$.LuzmoRadioGroup;exports.LuzmoSearch=pt.LuzmoSearch;exports.LuzmoSelect=dt.LuzmoSelect;exports.LuzmoSlider=ht.LuzmoSlider;exports.LuzmoSwatch=M.LuzmoSwatch;exports.LuzmoSwatchGroup=M.LuzmoSwatchGroup;exports.LuzmoSwitch=bt.LuzmoSwitch;exports.LuzmoTab=w.LuzmoTab;exports.LuzmoTabPanel=w.LuzmoTabPanel;exports.LuzmoTabs=w.LuzmoTabs;exports.LuzmoTabsOverflow=w.LuzmoTabsOverflow;exports.LuzmoToast=gt.LuzmoToast;exports.LuzmoTooltip=vt.LuzmoTooltip;exports.FocusVisiblePolyfillMixin=zt.FocusVisiblePolyfillMixin;exports.Focusable=xt.Focusable;exports.isAndroid=p.isAndroid;exports.isAppleDevice=p.isAppleDevice;exports.isChrome=p.isChrome;exports.isFirefox=p.isFirefox;exports.isIOS=p.isIOS;exports.isIPad=p.isIPad;exports.isIPhone=p.isIPhone;exports.isMac=p.isMac;exports.isSeamonkey=p.isSeamonkey;exports.isWebKit=p.isWebKit;exports.streamingListener=ft.streamingListener;exports.LuzmoActionGroup=_t.LuzmoActionGroup;exports.LuzmoCloseButton=Lt.LuzmoCloseButton;exports.LuzmoColorLoupe=yt.LuzmoColorLoupe;exports.LuzmoFieldGroup=wt.LuzmoFieldGroup;exports.LuzmoFieldLabel=Ct.LuzmoFieldLabel;exports.ClickController=c.ClickController;exports.HoverController=c.HoverController;exports.InteractionController=c.InteractionController;exports.InteractionTypes=c.InteractionTypes;exports.LONGPRESS_INSTRUCTIONS=c.LONGPRESS_INSTRUCTIONS;exports.LongpressController=c.LongpressController;exports.LuzmoAbstractOverlay=c.LuzmoAbstractOverlay;exports.LuzmoOverlay=c.LuzmoOverlay;exports.PlacementController=c.PlacementController;exports.SAFARI_FOCUS_RING_CLASS=c.SAFARI_FOCUS_RING_CLASS;exports.VirtualTrigger=c.VirtualTrigger;exports.guaranteedAllTransitionend=c.guaranteedAllTransitionend;exports.lastInteractionType=c.lastInteractionType;exports.nextFrame=c.nextFrame;exports.noop=c.noop;exports.overlayTimer=c.overlayTimer;exports.placementUpdatedSymbol=c.placementUpdatedSymbol;exports.SlottableRequestEvent=P.SlottableRequestEvent;exports.removeSlottableRequest=P.removeSlottableRequest;exports.DESCRIPTION_ID=E.DESCRIPTION_ID;exports.LuzmoPicker=E.LuzmoPicker;exports.LuzmoPickerBase=E.LuzmoPickerBase;exports.LuzmoPopover=Rt.LuzmoPopover;exports.LuzmoProgressCircle=At.LuzmoProgressCircle;exports.LuzmoTextField=St.LuzmoTextField;exports.LuzmoPromptBox=O;
18
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./accordion/index.cjs"),q=require("./action-bar/index.cjs"),p=require("./action-button/index.cjs");require("./action-group/index.cjs");const x=require("./action-menu/index.cjs"),_=require("./avatar/index.cjs"),m=require("./button/index.cjs"),C=require("./button-group/index.cjs"),S=require("./calendar/index.cjs"),T=require("./chat-message/index.cjs"),b=require("./chat-message-group/index.cjs"),v=require("./checkbox/index.cjs"),g=require("./color-area/index.cjs"),I=require("./color-field/index.cjs"),P=require("./color-handle/index.cjs");require("./color-loupe/index.cjs");const M=require("./color-menu/index.cjs"),A=require("./color-palette/index.cjs"),O=require("./color-palette-group/index.cjs"),F=require("./color-picker/index.cjs"),R=require("./color-slider/index.cjs"),y=require("./date-time-picker/index.cjs"),B=require("./divider/index.cjs");require("./field-group/index.cjs");require("./field-label/index.cjs");const G=require("./icon/index.cjs"),h=require("./infield-button/index.cjs"),k=require("./label/index.cjs"),i=require("./menu/index.cjs"),D=require("./multi-language-field/index.cjs"),E=require("./number-field/index.cjs"),u=require("./options/index.cjs"),r=require("./overlay/index.cjs");require("./picker/index.cjs");const f=require("./picker-button/index.cjs");require("./popover/index.cjs");require("./progress-circle/index.cjs");const N=require("./prompt-box/index.cjs"),c=require("./radio/index.cjs"),U=require("./search/index.cjs"),w=require("./select/index.cjs"),V=require("./slider/index.cjs"),s=require("./swatch/index.cjs"),H=require("./switch/index.cjs"),t=require("./tabs/index.cjs"),a=require("./tags/index.cjs"),K=require("./text-field/index.cjs"),W=require("./toast/index.cjs"),Z=require("./tooltip/index.cjs"),L=require("./base-DxRGeCrb.cjs"),j=require("./focus-visible-D4BXb5RB.cjs"),J=require("./focusable-agUxU61W.cjs"),o=require("./platform-BJnOJJag.cjs"),z=require("./sized-mixin-DcvJLFeo.cjs"),Q=require("./streaming-listener-D9Wc7skA.cjs"),X=require("./voice-recorder-CAm5iDre.cjs"),Y=require("./action-group-_gt0SxJg.cjs"),$=require("./close-button-CSGamYgn.cjs"),ee=require("./color-loupe-Dta8u4pX.cjs"),oe=require("./field-group-aG9hVBjA.cjs"),re=require("./field-label-CYC-u_Cq.cjs"),e=require("./overlay-BTNKxbrJ.cjs"),d=require("./slottable-request-event-BfUUt1Mh.cjs"),n=require("./picker-B2_mjftE.cjs"),ie=require("./popover-CPZ51K_z.cjs"),ue=require("./progress-circle-BMRjGc4y.cjs"),te=require("./text-field-CclDsK1X.cjs");exports.LuzmoAccordion=l.LuzmoAccordion;exports.LuzmoAccordionItem=l.LuzmoAccordionItem;exports.LuzmoActionBar=q.LuzmoActionBar;exports.LuzmoActionButton=p.LuzmoActionButton;exports.LuzmoActionMenu=x.LuzmoActionMenu;exports.LuzmoAvatar=_.LuzmoAvatar;exports.LuzmoButton=m.LuzmoButton;exports.LuzmoClearButton=m.LuzmoClearButton;exports.LuzmoButtonGroup=C.LuzmoButtonGroup;exports.LuzmoCalendar=S.LuzmoCalendar;exports.LuzmoChatMessage=T.LuzmoChatMessage;exports.LuzmoChatMessageGroup=b.LuzmoChatMessageGroup;exports.LuzmoCheckbox=v.LuzmoCheckbox;exports.LuzmoColorArea=g.LuzmoColorArea;exports.LuzmoColorField=I.LuzmoColorField;exports.LuzmoColorHandle=P.LuzmoColorHandle;exports.LuzmoColorMenu=M.LuzmoColorMenu;exports.LuzmoColorPalette=A.LuzmoColorPalette;exports.LuzmoColorPaletteGroup=O.LuzmoColorPaletteGroup;exports.LuzmoColorPicker=F.LuzmoColorPicker;exports.LuzmoColorSlider=R.LuzmoColorSlider;exports.LuzmoDateTimePicker=y.LuzmoDateTimePicker;exports.LuzmoDivider=B.LuzmoDivider;exports.LuzmoIcon=G.LuzmoIcon;exports.LuzmoInfieldButton=h.LuzmoInfieldButton;exports.LuzmoLabel=k.LuzmoLabel;exports.LuzmoMenu=i.LuzmoMenu;exports.LuzmoMenuDivider=i.LuzmoMenuDivider;exports.LuzmoMenuGroup=i.LuzmoMenuGroup;exports.LuzmoMenuItem=i.LuzmoMenuItem;exports.MenuItemAddedOrUpdatedEvent=i.MenuItemAddedOrUpdatedEvent;exports.LuzmoMultiLangField=D.LuzmoMultiLangField;exports.LuzmoNumberField=E.LuzmoNumberField;exports.LuzmoOption=u.LuzmoOption;exports.LuzmoOptions=u.LuzmoOptions;exports.LuzmoOptionsDivider=u.LuzmoOptionsDivider;exports.VIRTUALIZE_AS_OF_NUM_ITEMS=u.VIRTUALIZE_AS_OF_NUM_ITEMS;exports.LuzmoOverlayTrigger=r.LuzmoOverlayTrigger;exports.OverlayTriggerDirective=r.OverlayTriggerDirective;exports.SlottableRequestDirective=r.SlottableRequestDirective;exports.openOverlay=r.openOverlay;exports.slottableRequest=r.slottableRequest;exports.trigger=r.trigger;exports.LuzmoPickerButton=f.LuzmoPickerButton;exports.LuzmoPromptBox=N.LuzmoPromptBox;exports.LuzmoRadio=c.LuzmoRadio;exports.LuzmoRadioGroup=c.LuzmoRadioGroup;exports.LuzmoSearch=U.LuzmoSearch;exports.LuzmoSelect=w.LuzmoSelect;exports.LuzmoSlider=V.LuzmoSlider;exports.LuzmoSwatch=s.LuzmoSwatch;exports.LuzmoSwatchGroup=s.LuzmoSwatchGroup;exports.LuzmoSwitch=H.LuzmoSwitch;exports.LuzmoTab=t.LuzmoTab;exports.LuzmoTabPanel=t.LuzmoTabPanel;exports.LuzmoTabs=t.LuzmoTabs;exports.LuzmoTabsOverflow=t.LuzmoTabsOverflow;exports.LuzmoTag=a.LuzmoTag;exports.LuzmoTags=a.LuzmoTags;exports.LuzmoHelpText=K.LuzmoHelpText;exports.LuzmoToast=W.LuzmoToast;exports.LuzmoTooltip=Z.LuzmoTooltip;exports.LuzmoElement=L.LuzmoElement;exports.LuzmoMixin=L.LuzmoMixin;exports.FocusVisiblePolyfillMixin=j.FocusVisiblePolyfillMixin;exports.Focusable=J.Focusable;exports.isAndroid=o.isAndroid;exports.isAppleDevice=o.isAppleDevice;exports.isChrome=o.isChrome;exports.isFirefox=o.isFirefox;exports.isIOS=o.isIOS;exports.isIPad=o.isIPad;exports.isIPhone=o.isIPhone;exports.isMac=o.isMac;exports.isSeamonkey=o.isSeamonkey;exports.isWebKit=o.isWebKit;exports.ElementSizes=z.ElementSizes;exports.SizedMixin=z.SizedMixin;exports.streamingListener=Q.streamingListener;exports.VoiceRecorder=X.VoiceRecorder;exports.LuzmoActionGroup=Y.LuzmoActionGroup;exports.LuzmoCloseButton=$.LuzmoCloseButton;exports.LuzmoColorLoupe=ee.LuzmoColorLoupe;exports.LuzmoFieldGroup=oe.LuzmoFieldGroup;exports.LuzmoFieldLabel=re.LuzmoFieldLabel;exports.ClickController=e.ClickController;exports.HoverController=e.HoverController;exports.InteractionController=e.InteractionController;exports.InteractionTypes=e.InteractionTypes;exports.LONGPRESS_INSTRUCTIONS=e.LONGPRESS_INSTRUCTIONS;exports.LongpressController=e.LongpressController;exports.LuzmoAbstractOverlay=e.LuzmoAbstractOverlay;exports.LuzmoOverlay=e.LuzmoOverlay;exports.PlacementController=e.PlacementController;exports.SAFARI_FOCUS_RING_CLASS=e.SAFARI_FOCUS_RING_CLASS;exports.VirtualTrigger=e.VirtualTrigger;exports.guaranteedAllTransitionend=e.guaranteedAllTransitionend;exports.lastInteractionType=e.lastInteractionType;exports.nextFrame=e.nextFrame;exports.noop=e.noop;exports.overlayTimer=e.overlayTimer;exports.placementUpdatedSymbol=e.placementUpdatedSymbol;exports.SlottableRequestEvent=d.SlottableRequestEvent;exports.removeSlottableRequest=d.removeSlottableRequest;exports.DESCRIPTION_ID=n.DESCRIPTION_ID;exports.LuzmoPicker=n.LuzmoPicker;exports.LuzmoPickerBase=n.LuzmoPickerBase;exports.LuzmoPopover=ie.LuzmoPopover;exports.LuzmoProgressCircle=ue.LuzmoProgressCircle;exports.LuzmoTextField=te.LuzmoTextField;