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

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 (253) hide show
  1. package/components/accordion/index.cjs +6 -6
  2. package/components/accordion/index.js +14 -13
  3. package/components/action-bar/index.cjs +4 -4
  4. package/components/action-bar/index.js +20 -18
  5. package/components/action-button/index.cjs +3 -3
  6. package/components/action-button/index.js +7 -6
  7. package/components/action-group/index.cjs +1 -1
  8. package/components/action-group/index.js +2 -2
  9. package/components/{action-group-DBImibFn.js → action-group-Bwt9w8Vh.js} +10 -9
  10. package/components/action-group-D917z7XF.cjs +20 -0
  11. package/components/action-menu/index.cjs +9 -9
  12. package/components/action-menu/index.js +10 -10
  13. package/components/avatar/index.cjs +3 -3
  14. package/components/avatar/index.js +7 -7
  15. package/components/base-5nDSSNeT.cjs +18 -0
  16. package/components/base-CdYjmV_8.js +96 -0
  17. package/components/button/button-base.d.ts +16 -0
  18. package/components/button/button.d.ts +38 -2
  19. package/components/button/index.cjs +2 -2
  20. package/components/button/index.js +84 -50
  21. package/components/{button-base-DbkDzb71.js → button-base-B_SkfcFn.js} +54 -39
  22. package/components/button-base-BdzHcHRs.cjs +25 -0
  23. package/components/button-group/index.cjs +1 -1
  24. package/components/button-group/index.js +11 -9
  25. package/components/calendar/index.cjs +96 -1
  26. package/components/calendar/index.js +538 -6
  27. package/components/chat-message/chat-message.d.ts +127 -0
  28. package/components/chat-message/index.cjs +80 -0
  29. package/components/chat-message/index.d.ts +8 -0
  30. package/components/chat-message/index.js +254 -0
  31. package/components/chat-message-group/chat-message-group.d.ts +50 -0
  32. package/components/chat-message-group/index.cjs +24 -0
  33. package/components/chat-message-group/index.d.ts +7 -0
  34. package/components/chat-message-group/index.js +144 -0
  35. package/components/checkbox/index.cjs +4 -4
  36. package/components/checkbox/index.js +12 -10
  37. package/components/{checkbox-mixin-Do7EgtpQ.js → checkbox-mixin-DUbGDm7f.js} +9 -9
  38. package/components/{checkbox-mixin-BDN0dBtS.cjs → checkbox-mixin-DhN8CIXY.cjs} +3 -3
  39. package/components/close-button-CGZxCNlI.js +52 -0
  40. package/components/close-button-Decm0Qbb.cjs +18 -0
  41. package/components/color-area/index.cjs +5 -5
  42. package/components/color-area/index.js +12 -11
  43. package/components/color-controller-7sNUf7SP.js +386 -0
  44. package/components/color-controller-ChN-A9Ft.cjs +18 -0
  45. package/components/color-field/color-field.d.ts +8 -0
  46. package/components/color-field/index.cjs +4 -4
  47. package/components/color-field/index.js +38 -25
  48. package/components/color-handle/index.cjs +2 -2
  49. package/components/color-handle/index.js +8 -6
  50. package/components/color-loupe/index.cjs +1 -1
  51. package/components/color-loupe/index.js +2 -2
  52. package/components/color-loupe-CIEFp7ln.cjs +56 -0
  53. package/components/{color-loupe-CmMsXbjT.js → color-loupe-CLPX6xVb.js} +6 -4
  54. package/components/color-menu/index.cjs +8 -8
  55. package/components/color-menu/index.js +46 -46
  56. package/components/color-palette/color-palette.d.ts +6 -2
  57. package/components/color-palette/index.cjs +1 -1
  58. package/components/color-palette/index.js +35 -34
  59. package/components/color-palette-group/color-palette-group.d.ts +79 -0
  60. package/components/color-palette-group/index.cjs +28 -0
  61. package/components/color-palette-group/index.d.ts +7 -0
  62. package/components/color-palette-group/index.js +206 -0
  63. package/components/color-picker/color-picker.d.ts +31 -2
  64. package/components/color-picker/index.cjs +6 -5
  65. package/components/color-picker/index.js +16 -12
  66. package/components/color-slider/index.cjs +40 -1
  67. package/components/color-slider/index.js +452 -6
  68. package/components/date-time-picker/index.cjs +16 -16
  69. package/components/date-time-picker/index.js +105 -106
  70. package/components/{dependency-manger-CEXvGQUV.js → dependency-manger-CO-VPlqq.js} +4 -4
  71. package/components/{dependency-manger-C5HCkMMB.cjs → dependency-manger-uthev62E.cjs} +1 -1
  72. package/components/divider/index.cjs +1 -1
  73. package/components/divider/index.js +11 -9
  74. package/components/field-group/index.cjs +1 -1
  75. package/components/field-group/index.js +2 -2
  76. package/components/field-group-BYHNJmv0.cjs +23 -0
  77. package/components/{field-group-DXfBWrkO.js → field-group-CHmw159R.js} +7 -5
  78. package/components/field-label/index.cjs +1 -1
  79. package/components/field-label/index.js +2 -2
  80. package/components/{field-label-CZ2zzChK.js → field-label-Cy3xMWZ-.js} +9 -8
  81. package/components/field-label-DZoeqJJX.cjs +25 -0
  82. package/components/{focus-visible-DBlJGoEW.js → focus-visible-BvScGDCE.js} +20 -20
  83. package/components/focus-visible-D4BXb5RB.cjs +18 -0
  84. package/components/{focusable-BxtpnzWp.js → focusable-BjvsvVam.js} +3 -2
  85. package/components/focusable-CbVKgGfS.cjs +18 -0
  86. package/components/icon/index.cjs +1 -1
  87. package/components/icon/index.js +22 -20
  88. package/components/index.cjs +205 -1
  89. package/components/index.js +972 -167
  90. package/components/infield-button/index.cjs +2 -2
  91. package/components/infield-button/index.js +6 -5
  92. package/components/label/index.cjs +1 -1
  93. package/components/label/index.js +7 -5
  94. package/components/{language-resolution-8yZa5r_P.js → language-resolution-B-wjV5bb.js} +9 -8
  95. package/components/{directive-C7oCP5Bh.cjs → language-resolution-EUER43cg.cjs} +1 -5
  96. package/components/like-anchor-B2EqJPdw.cjs +32 -0
  97. package/components/{like-anchor-Bvn_vLQ8.js → like-anchor-CgqCU210.js} +23 -22
  98. package/components/{manage-help-text-DhgARkZX.cjs → manage-help-text-Bat9yGvF.cjs} +3 -3
  99. package/components/{manage-help-text-syYnjKGL.js → manage-help-text-C9sCHK3R.js} +8 -8
  100. package/components/menu/index.cjs +38 -13
  101. package/components/menu/index.js +138 -105
  102. package/components/menu/menu-item.d.ts +8 -1
  103. package/components/multi-language-field/index.cjs +2 -2
  104. package/components/multi-language-field/index.js +9 -7
  105. package/components/number-field/index.cjs +5 -5
  106. package/components/number-field/index.js +122 -85
  107. package/components/number-field/number-field.d.ts +145 -0
  108. package/components/observe-slot-presence-CNltc0C0.cjs +18 -0
  109. package/components/{observe-slot-presence-CmVi0zTc.js → observe-slot-presence-DFi6GE3H.js} +1 -1
  110. package/components/observe-slot-text-CBMHpuIK.cjs +18 -0
  111. package/components/{observe-slot-text-BPfIQQtz.js → observe-slot-text-DorVpCL4.js} +14 -15
  112. package/components/options/index.cjs +26 -58
  113. package/components/options/index.js +205 -849
  114. package/components/overlay/index.cjs +6 -6
  115. package/components/overlay/index.js +31 -32
  116. package/components/overlay-BhrVS5h7.cjs +47 -0
  117. package/components/overlay-C-No3oJQ.js +1736 -0
  118. package/components/{pending-state-CaH1si5b.cjs → pending-state-DQctFHI8.cjs} +2 -2
  119. package/components/{pending-state-DTX7ggyF.js → pending-state-Dx1u3EXA.js} +2 -2
  120. package/components/picker/index.cjs +1 -1
  121. package/components/picker/index.js +3 -3
  122. package/components/picker-DxYgh4LR.cjs +123 -0
  123. package/components/{picker-BmoXv1jt.js → picker-GyeSAxxY.js} +45 -45
  124. package/components/picker-button/index.cjs +4 -4
  125. package/components/picker-button/index.js +9 -8
  126. package/components/{platform-BiXhwqk3.cjs → platform-BJnOJJag.cjs} +1 -1
  127. package/components/{platform-BM-uMWpX.js → platform-CqwNrovd.js} +12 -12
  128. package/components/popover/index.cjs +1 -1
  129. package/components/popover/index.js +2 -2
  130. package/components/popover-lcZnODPK.cjs +30 -0
  131. package/components/{popover-DjX0aAnY.js → popover-ucIgjbQs.js} +8 -7
  132. package/components/progress-circle/index.cjs +1 -1
  133. package/components/progress-circle/index.js +2 -2
  134. package/components/{progress-circle-DXH9z8-6.js → progress-circle-D5J0ZwY0.js} +8 -7
  135. package/components/progress-circle-DgMbqrzG.cjs +33 -0
  136. package/components/prompt-box/index.d.ts +8 -0
  137. package/components/prompt-box/prompt-box.d.ts +326 -0
  138. package/components/radio/index.cjs +2 -2
  139. package/components/radio/index.js +12 -11
  140. package/components/search/index.cjs +6 -6
  141. package/components/search/index.js +6 -6
  142. package/components/select/index.cjs +43 -42
  143. package/components/select/index.js +142 -126
  144. package/components/select/select.d.ts +1 -1
  145. package/components/{base-BjTwmyRF.cjs → sized-mixin-DcvJLFeo.cjs} +1 -5
  146. package/components/{sized-mixin-D4ACoVUr.js → sized-mixin-cJbo3PKR.js} +5 -5
  147. package/components/slider/index.cjs +1 -1
  148. package/components/slider/index.js +48 -1101
  149. package/components/{strategies-9indNIEb.js → strategies-Bk97oVn1.js} +15 -50
  150. package/components/strategies-CNgBb6dM.cjs +18 -0
  151. package/components/{streaming-listener-CP-JE6Fa.js → streaming-listener-BlWm-XZU.js} +5 -6
  152. package/components/streaming-listener-D9Wc7skA.cjs +18 -0
  153. package/components/swatch/index.cjs +7 -7
  154. package/components/swatch/index.js +18 -17
  155. package/components/switch/index.cjs +2 -2
  156. package/components/switch/index.js +6 -5
  157. package/components/tabs/index.cjs +16 -24
  158. package/components/tabs/index.js +94 -162
  159. package/components/tags/index.cjs +5 -5
  160. package/components/tags/index.js +39 -25
  161. package/components/tags/tag.d.ts +2 -0
  162. package/components/tags/tags.d.ts +3 -1
  163. package/components/text-field/index.cjs +3 -3
  164. package/components/text-field/index.js +13 -11
  165. package/components/text-field/text-field.d.ts +1 -0
  166. package/components/{text-field-BIADXoLC.js → text-field-BHaLKkf1.js} +73 -99
  167. package/components/text-field-DFP7p8Rv.cjs +81 -0
  168. package/components/text-field.module-Bp4Mwuvj.js +21 -0
  169. package/components/text-field.module-eAEqjvZu.cjs +18 -0
  170. package/components/toast/index.cjs +11 -11
  171. package/components/toast/index.js +12 -10
  172. package/components/tooltip/index.cjs +4 -4
  173. package/components/tooltip/index.js +60 -36
  174. package/components/tooltip/tooltip.d.ts +12 -1
  175. package/components/utils.cjs +1 -1
  176. package/components/utils.js +14 -12
  177. package/components/voice-recorder-BRq_gEkz.js +210 -0
  178. package/components/voice-recorder-CAm5iDre.cjs +18 -0
  179. package/custom-elements.json +1 -1
  180. package/index.d.ts +4 -1
  181. package/package.json +84 -6
  182. package/utils/index.d.ts +1 -0
  183. package/utils/voice-recorder.d.ts +121 -0
  184. package/components/NumberFormatter-DewVDY5w.cjs +0 -18
  185. package/components/NumberFormatter-DgOUVrge.js +0 -136
  186. package/components/NumberParser-Dik4a0h-.cjs +0 -18
  187. package/components/NumberParser-ci9J5EKv.js +0 -173
  188. package/components/action-group-DJGMcRHb.cjs +0 -20
  189. package/components/async-directive-BX1T1e1_.cjs +0 -22
  190. package/components/async-directive-BfcqVjDp.js +0 -82
  191. package/components/base-CBCg3yyw.cjs +0 -40
  192. package/components/base-D76d76ww.js +0 -26
  193. package/components/base-WsynuqaS.js +0 -677
  194. package/components/button-base-XgPLmwP-.cjs +0 -25
  195. package/components/class-map-Di1D_rCm.cjs +0 -22
  196. package/components/class-map-NbVXqBU0.js +0 -51
  197. package/components/clear-button-DoeRUWQ3.js +0 -53
  198. package/components/clear-button-Qi1pMA5S.cjs +0 -18
  199. package/components/close-button-BFMBEw3q.cjs +0 -18
  200. package/components/close-button-BWXdHSx3.js +0 -51
  201. package/components/color-controller-DTp1juRz.js +0 -3198
  202. package/components/color-controller-_ZwyhvaU.cjs +0 -18
  203. package/components/color-loupe-CaA_Lfkk.cjs +0 -56
  204. package/components/directive-helpers-Cm6gitnu.js +0 -62
  205. package/components/directive-helpers-DyIRTWwA.cjs +0 -22
  206. package/components/directive-oAbCiebi.js +0 -44
  207. package/components/field-group-DkGst3r5.cjs +0 -23
  208. package/components/field-label-mO1AkUgR.cjs +0 -25
  209. package/components/flow-D-0MTYCm.js +0 -527
  210. package/components/flow-DM3dNAKs.cjs +0 -30
  211. package/components/focus-visible-B0P9aY_G.cjs +0 -18
  212. package/components/focusable-EbipgXRh.cjs +0 -18
  213. package/components/if-defined-C9YGdo33.cjs +0 -22
  214. package/components/if-defined-DOaE2coe.js +0 -27
  215. package/components/index-A-yOTB_d.js +0 -1490
  216. package/components/index-BLWuwZXx.cjs +0 -113
  217. package/components/index-BwxgAdzi.cjs +0 -57
  218. package/components/index-HjQa8tew.js +0 -1174
  219. package/components/language-resolution-DJzmyzZq.cjs +0 -18
  220. package/components/like-anchor-sod1C1fR.cjs +0 -32
  221. package/components/luzmo-icons-DbwDQtuO.js +0 -229
  222. package/components/luzmo-icons-DletXGWU.cjs +0 -29
  223. package/components/mutation-controller-DH7YOCyj.js +0 -52
  224. package/components/mutation-controller-DkOMCW-c.cjs +0 -22
  225. package/components/observe-slot-presence-bc9chhsi.cjs +0 -18
  226. package/components/observe-slot-text-Ceb7SvYT.cjs +0 -18
  227. package/components/overlay-Cig9r6uU.js +0 -2747
  228. package/components/overlay-KSKMzzkh.cjs +0 -47
  229. package/components/picker-DWsBWdPN.cjs +0 -123
  230. package/components/popover-KFfO0IYL.cjs +0 -30
  231. package/components/progress-circle-BvRJNuNo.cjs +0 -33
  232. package/components/query-BL-TJj7K.cjs +0 -22
  233. package/components/query-D_KR_GUc.js +0 -51
  234. package/components/query-assigned-elements-DjfhL1cl.js +0 -36
  235. package/components/query-assigned-elements-DsKsfk7G.cjs +0 -22
  236. package/components/query-assigned-nodes-BcKWmGzy.cjs +0 -22
  237. package/components/query-assigned-nodes-C76XVPWY.js +0 -36
  238. package/components/sized-mixin-CPxE5C96.cjs +0 -18
  239. package/components/state-D8JEtYqe.cjs +0 -22
  240. package/components/state-Deh-vKYE.js +0 -29
  241. package/components/strategies-BACP6MhR.cjs +0 -18
  242. package/components/streaming-listener-B00MvALi.cjs +0 -18
  243. package/components/style-map-CeilmSgs.cjs +0 -22
  244. package/components/style-map-IgqIKvlE.js +0 -53
  245. package/components/text-field-D5d_Gt0t.cjs +0 -85
  246. package/components/text-field.module-ColtFhf_.js +0 -21
  247. package/components/text-field.module-p_VF2tC_.cjs +0 -18
  248. package/components/unit-input/index.cjs +0 -43
  249. package/components/unit-input/index.d.ts +0 -7
  250. package/components/unit-input/index.js +0 -183
  251. package/components/unit-input/unit-input.d.ts +0 -33
  252. package/components/when-CDK1Tt5Y.js +0 -28
  253. package/components/when-CDZyJPvd.cjs +0 -22
@@ -15,182 +15,987 @@
15
15
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
16
16
  * SOFTWARE.
17
17
  * */
18
- import { LuzmoAccordion as s, LuzmoAccordionItem as c } from "./accordion/index.js";
19
- import { LuzmoActionBar as f } from "./action-bar/index.js";
20
- import { LuzmoActionButton as x } from "./action-button/index.js";
18
+ import { LuzmoAccordion as Y, LuzmoAccordionItem as oo } from "./accordion/index.js";
19
+ import { LuzmoActionBar as eo } from "./action-bar/index.js";
20
+ import { LuzmoActionButton as io } from "./action-button/index.js";
21
21
  import "./action-group/index.js";
22
- import { LuzmoActionMenu as g } from "./action-menu/index.js";
23
- import { LuzmoAvatar as h } from "./avatar/index.js";
24
- import { LuzmoButton as S } from "./button/index.js";
25
- import { LuzmoButtonGroup as C } from "./button-group/index.js";
26
- import { L as T } from "./index-A-yOTB_d.js";
27
- import { LuzmoCheckbox as w } from "./checkbox/index.js";
28
- import { LuzmoColorArea as O } from "./color-area/index.js";
29
- import { LuzmoColorField as P } from "./color-field/index.js";
30
- import { LuzmoColorHandle as R } from "./color-handle/index.js";
22
+ import { LuzmoActionMenu as so } from "./action-menu/index.js";
23
+ import { LuzmoAvatar as lo } from "./avatar/index.js";
24
+ import { LuzmoButton as po, LuzmoClearButton as co } from "./button/index.js";
25
+ import { LuzmoButtonGroup as ho } from "./button-group/index.js";
26
+ import { LuzmoCalendar as go } from "./calendar/index.js";
27
+ import { LuzmoChatMessage as vo } from "./chat-message/index.js";
28
+ import { LuzmoChatMessageGroup as xo } from "./chat-message-group/index.js";
29
+ import { LuzmoCheckbox as _o } from "./checkbox/index.js";
30
+ import { LuzmoColorArea as Lo } from "./color-area/index.js";
31
+ import { LuzmoColorField as Ao } from "./color-field/index.js";
32
+ import { LuzmoColorHandle as So } from "./color-handle/index.js";
31
33
  import "./color-loupe/index.js";
32
- import { LuzmoColorMenu as B } from "./color-menu/index.js";
33
- import { LuzmoColorPalette as G } from "./color-palette/index.js";
34
- import { LuzmoColorPicker as _ } from "./color-picker/index.js";
35
- import { L as H } from "./index-HjQa8tew.js";
36
- import { LuzmoDateTimePicker as V } from "./date-time-picker/index.js";
37
- import { LuzmoDivider as K } from "./divider/index.js";
34
+ import { LuzmoColorMenu as $o } from "./color-menu/index.js";
35
+ import { LuzmoColorPalette as Bo } from "./color-palette/index.js";
36
+ import { LuzmoColorPaletteGroup as Io } from "./color-palette-group/index.js";
37
+ import { LuzmoColorPicker as Do } from "./color-picker/index.js";
38
+ import { LuzmoColorSlider as Mo } from "./color-slider/index.js";
39
+ import { LuzmoDateTimePicker as Oo } from "./date-time-picker/index.js";
40
+ import { LuzmoDivider as Vo } from "./divider/index.js";
38
41
  import "./field-group/index.js";
39
42
  import "./field-label/index.js";
40
- import { LuzmoIcon as Z } from "./icon/index.js";
41
- import { LuzmoInfieldButton as Q } from "./infield-button/index.js";
42
- import { LuzmoLabel as Y } from "./label/index.js";
43
- import { LuzmoMenu as oo, LuzmoMenuDivider as ro, LuzmoMenuGroup as eo, LuzmoMenuItem as lo, MenuItemAddedOrUpdatedEvent as mo } from "./menu/index.js";
44
- import { LuzmoMultiLangField as to } from "./multi-language-field/index.js";
45
- import { LuzmoNumberField as io } from "./number-field/index.js";
46
- import { LuzmoOption as no, LuzmoOptions as so, LuzmoOptionsDivider as co, VIRTUALIZE_AS_OF_NUM_ITEMS as po } from "./options/index.js";
47
- import { LuzmoOverlayTrigger as xo, OverlayTriggerDirective as bo, SlottableRequestDirective as go, openOverlay as Lo, slottableRequest as ho, trigger as vo } from "./overlay/index.js";
43
+ import { LuzmoIcon as Ho } from "./icon/index.js";
44
+ import { LuzmoInfieldButton as jo } from "./infield-button/index.js";
45
+ import { LuzmoLabel as Ko } from "./label/index.js";
46
+ import { LuzmoMenu as Jo, LuzmoMenuDivider as Qo, LuzmoMenuGroup as Xo, LuzmoMenuItem as Yo, MenuItemAddedOrUpdatedEvent as ot } from "./menu/index.js";
47
+ import { LuzmoMultiLangField as et } from "./multi-language-field/index.js";
48
+ import { LuzmoNumberField as it } from "./number-field/index.js";
49
+ import { LuzmoOption as st, LuzmoOptions as nt, LuzmoOptionsDivider as lt, VIRTUALIZE_AS_OF_NUM_ITEMS as mt } from "./options/index.js";
50
+ import { LuzmoOverlayTrigger as ct, OverlayTriggerDirective as ut, SlottableRequestDirective as dt, openOverlay as ht, slottableRequest as bt, trigger as gt } from "./overlay/index.js";
48
51
  import "./picker/index.js";
49
- import { LuzmoPickerButton as yo } from "./picker-button/index.js";
52
+ import { LuzmoPickerButton as vt } from "./picker-button/index.js";
50
53
  import "./popover/index.js";
51
54
  import "./progress-circle/index.js";
52
- import { LuzmoRadio as Io, LuzmoRadioGroup as To } from "./radio/index.js";
53
- import { LuzmoSearch as wo } from "./search/index.js";
54
- import { LuzmoSelect as Oo } from "./select/index.js";
55
- import { LuzmoSlider as Po } from "./slider/index.js";
56
- import { LuzmoSwatch as Ro, LuzmoSwatchGroup as Eo } from "./swatch/index.js";
57
- import { LuzmoSwitch as Do } from "./switch/index.js";
58
- import { LuzmoTab as Uo, LuzmoTabPanel as _o, LuzmoTabs as No, LuzmoTabsOverflow as Ho } from "./tabs/index.js";
59
- import { LuzmoTag as Vo, LuzmoTags as jo } from "./tags/index.js";
60
- import { LuzmoHelpText as Wo } from "./text-field/index.js";
61
- import { LuzmoToast as Jo } from "./toast/index.js";
62
- import { LuzmoTooltip as Xo } from "./tooltip/index.js";
63
- import { LuzmoUnitInput as $o } from "./unit-input/index.js";
64
- import { a as rr, L as er } from "./base-WsynuqaS.js";
65
- import { F as mr } from "./focus-visible-DBlJGoEW.js";
66
- import { F as tr } from "./focusable-BxtpnzWp.js";
67
- import { j as ir, d as zr, e as nr, h as sr, c as cr, b as pr, a as fr, i as dr, g as xr, f as br } from "./platform-BM-uMWpX.js";
68
- import { E as Lr, S as hr } from "./sized-mixin-D4ACoVUr.js";
69
- import { s as Sr } from "./streaming-listener-CP-JE6Fa.js";
70
- import { L as Cr } from "./action-group-DBImibFn.js";
71
- import { L as Tr } from "./clear-button-DoeRUWQ3.js";
72
- import { L as wr } from "./close-button-BWXdHSx3.js";
73
- import { L as Or } from "./color-loupe-CmMsXbjT.js";
74
- import { L as Pr } from "./field-group-DXfBWrkO.js";
75
- import { L as Rr } from "./field-label-CZ2zzChK.js";
76
- import { C as Br, H as Dr, b as Gr, I as Ur, c as _r, d as Nr, L as Hr, e as qr, P as Vr, S as jr, V as Kr, g as Wr, l as Zr, a as Jr, n as Qr, o as Xr, p as Yr } from "./overlay-Cig9r6uU.js";
77
- import { S as oe, r as re } from "./slottable-request-event-DggLA4Rx.js";
78
- import { D as le, a as me, L as ue } from "./picker-BmoXv1jt.js";
79
- import { LuzmoPopover as ae } from "./popover-DjX0aAnY.js";
80
- import { L as ze } from "./progress-circle-DXH9z8-6.js";
81
- import { L as se } from "./text-field-BIADXoLC.js";
82
- const r = () => {
55
+ import { luzmoClear as C, luzmoCheck as S, luzmoMicrophone as E, luzmoArrowUp as $ } from "@luzmo/icons";
56
+ import { unsafeCSS as k, html as n, nothing as v } from "lit";
57
+ import { property as m, state as h, query as w } from "lit/decorators.js";
58
+ import { repeat as R } from "lit/directives/repeat.js";
59
+ import { a as B } from "./base-CdYjmV_8.js";
60
+ import { L as xt } from "./base-CdYjmV_8.js";
61
+ import { S as F } from "./sized-mixin-cJbo3PKR.js";
62
+ import { E as _t } from "./sized-mixin-cJbo3PKR.js";
63
+ import { V as _ } from "./voice-recorder-BRq_gEkz.js";
64
+ import { LuzmoTag as Lt, LuzmoTags as Rt } from "./tags/index.js";
65
+ import { LuzmoHelpText as Ct } from "./text-field/index.js";
66
+ import { LuzmoRadio as Et, LuzmoRadioGroup as $t } from "./radio/index.js";
67
+ import { LuzmoSearch as Bt } from "./search/index.js";
68
+ import { LuzmoSelect as It } from "./select/index.js";
69
+ import { LuzmoSlider as Dt } from "./slider/index.js";
70
+ import { LuzmoSwatch as Mt, LuzmoSwatchGroup as Ut } from "./swatch/index.js";
71
+ import { LuzmoSwitch as Nt } from "./switch/index.js";
72
+ import { LuzmoTab as qt, LuzmoTabPanel as Ht, LuzmoTabs as Gt, LuzmoTabsOverflow as jt } from "./tabs/index.js";
73
+ import { LuzmoToast as Kt } from "./toast/index.js";
74
+ import { LuzmoTooltip as Jt } from "./tooltip/index.js";
75
+ import { F as Xt } from "./focus-visible-BvScGDCE.js";
76
+ import { F as oe } from "./focusable-BjvsvVam.js";
77
+ import { j as ee, d as re, e as ie, h as ae, c as se, b as ne, a as le, i as me, g as pe, f as ce } from "./platform-CqwNrovd.js";
78
+ import { s as de } from "./streaming-listener-BlWm-XZU.js";
79
+ import { L as be } from "./action-group-Bwt9w8Vh.js";
80
+ import { L as fe } from "./close-button-CGZxCNlI.js";
81
+ import { L as ze } from "./color-loupe-CLPX6xVb.js";
82
+ import { L as ye } from "./field-group-CHmw159R.js";
83
+ import { L as we } from "./field-label-Cy3xMWZ-.js";
84
+ import { C as Re, H as Ae, b as Ce, I as Se, c as Ee, d as $e, L as ke, e as Be, P as Fe, S as Ie, V as Te, g as De, l as Pe, a as Me, n as Ue, o as Oe, p as Ne } from "./overlay-C-No3oJQ.js";
85
+ import { S as qe, r as He } from "./slottable-request-event-DggLA4Rx.js";
86
+ import { D as je, L as We, a as Ke } from "./picker-GyeSAxxY.js";
87
+ import { LuzmoPopover as Je } from "./popover-ucIgjbQs.js";
88
+ import { L as Xe } from "./progress-circle-D5J0ZwY0.js";
89
+ import { L as or } from "./text-field-BHaLKkf1.js";
90
+ const A = () => {
83
91
  if (typeof document < "u" && !document.querySelector("style[data-luzmo-vars]")) {
84
- const o = document.createElement("style");
85
- o.setAttribute("data-luzmo-vars", ""), o.textContent = 'html{--luzmo-animation-duration: 0.15s;--luzmo-border-color: rgba(var(--luzmo-border-color-rgb), 0.1);--luzmo-border-color-hover: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-down: rgba(var(--luzmo-border-color-rgb), 0.3);--luzmo-border-color-focus: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-rgb: 0, 0, 0;--luzmo-border-color-full: rgb(180, 180, 180);--luzmo-border-color-full-hover: rgb(140, 140, 140);--luzmo-border-color-full-down: rgb(110, 110, 110);--luzmo-border-color-full-focus: rgb(140, 140, 140);--luzmo-border-color-disabled: #dddddd;--luzmo-border-radius: 6px;--luzmo-border-radius-s: 4px;--luzmo-border-radius-l: 8px;--luzmo-border-radius-xl: 12px;--luzmo-border-radius-full: 999rem;--luzmo-background-color: #ffffff;--luzmo-background-color-rgb: 255, 255, 255;--luzmo-background-color-disabled: #eeeeee;--luzmo-background-color-hover: #f0f0fc;--luzmo-background-color-down: #f1f1ff;--luzmo-background-color-focus: #f0f0fc;--luzmo-background-color-highlight: rgb(240, 240, 240);--luzmo-background-color-highlight-disabled: rgb(245, 245, 245);--luzmo-background-color-highlight-hover: rgb(225, 225, 225);--luzmo-background-color-highlight-down: rgb(215, 215, 215);--luzmo-background-color-highlight-focus: rgb(225, 225, 225);--luzmo-border-width: 1px;--luzmo-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", Helvetica, Arial, sans-serif;--luzmo-font-size-xs: 10px;--luzmo-font-size-s: 12px;--luzmo-font-size-m: 14px;--luzmo-font-size: 14px;--luzmo-font-size-l: 16px;--luzmo-font-size-xl: 18px;--luzmo-font-size-xxl: 20px;--luzmo-font-style: normal;--luzmo-line-height: normal;--luzmo-font-weight: 400;--luzmo-font-weight-semibold: 500;--luzmo-font-weight-bold: 600;--luzmo-font-color: #333;--luzmo-font-color-hard: #000;--luzmo-font-color-disabled: var(--luzmo-disabled-color);--luzmo-font-color-extra-dimmed: #888;--luzmo-font-color-hover: #333;--luzmo-font-color-down: #111;--luzmo-font-color-focus: #333;--luzmo-primary: #4434ff;--luzmo-primary-hover: #4234e4;--luzmo-primary-down: #392cc7;--luzmo-primary-focus: #4234e4;--luzmo-primary-inverse-color: #ffffff;--luzmo-primary-rgb: 68, 52, 255;--luzmo-secondary: #ff00ff;--luzmo-secondary-hover: #e309e3;--luzmo-secondary-down: #c711c7;--luzmo-secondary-focus: #e309e3;--luzmo-secondary-inverse-color: #ffffff;--luzmo-secondary-rgb: 255, 0, 255;--luzmo-negative-color: #ca221c;--luzmo-negative-color-hover: #b3241f;--luzmo-negative-color-down: #9f231f;--luzmo-negative-color-focus: #b3241f;--luzmo-negative-color-rgb: 202, 34, 28;--luzmo-positive-color: rgb(20, 150, 101);--luzmo-positive-color-hover: rgb(17, 128, 86);--luzmo-positive-color-down: rgb(16, 105, 71);--luzmo-positive-color-focus: rgb(17, 128, 86);--luzmo-positive-color-rgb: 20, 150, 101;--luzmo-selected-color: rgb(110, 110, 110);--luzmo-selected-color-hover: rgb(70, 70, 70);--luzmo-selected-color-down: rgb(40, 40, 40);--luzmo-selected-color-focus: rgb(70, 70, 70);--luzmo-selected-color-hard: #1e1e1e;--luzmo-selected-color-hard-hover: rgb(0, 0, 0);--luzmo-selected-color-hard-down: rgb(0, 0, 0);--luzmo-selected-color-hard-focus: rgb(0, 0, 0);--luzmo-informative-color: #1a77e9;--luzmo-informative-color-rgb: 26, 119, 233;--luzmo-disabled-color: #aaaaaa;--luzmo-spacing-1: 2px;--luzmo-spacing-2: 4px;--luzmo-spacing-3: 8px;--luzmo-spacing-4: 12px;--luzmo-spacing-5: 16px;--luzmo-indicator-gap: 2px;--luzmo-indicator-width: 1px;--luzmo-indicator-color: var(--luzmo-primary);--luzmo-component-height-xxs: 20px;--luzmo-component-height-xs: 24px;--luzmo-component-height-s: 28px;--luzmo-component-height: 32px;--luzmo-component-height-l: 40px;--luzmo-component-height-xl: 48px;--luzmo-component-height-xxl: 64px;--luzmo-icon-size-xxs: 12px;--luzmo-icon-size-xs: 14px;--luzmo-icon-size-s: 16px;--luzmo-icon-size-m: 18px;--luzmo-icon-size-l: 20px;--luzmo-icon-size-xl: 22px;--luzmo-icon-size-xxl: 32px}', document.head.appendChild(o);
92
+ const b = document.createElement("style");
93
+ b.setAttribute("data-luzmo-vars", ""), b.textContent = 'html{--luzmo-animation-duration: 0.15s;--luzmo-border-color: rgba(var(--luzmo-border-color-rgb), 0.1);--luzmo-border-color-hover: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-down: rgba(var(--luzmo-border-color-rgb), 0.3);--luzmo-border-color-focus: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-rgb: 0, 0, 0;--luzmo-border-color-full: rgb(180, 180, 180);--luzmo-border-color-full-hover: rgb(140, 140, 140);--luzmo-border-color-full-down: rgb(110, 110, 110);--luzmo-border-color-full-focus: rgb(140, 140, 140);--luzmo-border-color-disabled: #dddddd;--luzmo-border-radius: 6px;--luzmo-border-radius-s: 4px;--luzmo-border-radius-l: 8px;--luzmo-border-radius-xl: 12px;--luzmo-border-radius-full: 999rem;--luzmo-background-color: #ffffff;--luzmo-background-color-rgb: 255, 255, 255;--luzmo-background-color-disabled: #eeeeee;--luzmo-background-color-hover: #f0f0fc;--luzmo-background-color-down: #f1f1ff;--luzmo-background-color-focus: #f0f0fc;--luzmo-background-color-highlight: rgb(240, 240, 240);--luzmo-background-color-highlight-disabled: rgb(245, 245, 245);--luzmo-background-color-highlight-hover: rgb(225, 225, 225);--luzmo-background-color-highlight-down: rgb(215, 215, 215);--luzmo-background-color-highlight-focus: rgb(225, 225, 225);--luzmo-border-width: 1px;--luzmo-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", Helvetica, Arial, sans-serif;--luzmo-font-size-xs: 10px;--luzmo-font-size-s: 12px;--luzmo-font-size-m: 14px;--luzmo-font-size: 14px;--luzmo-font-size-l: 16px;--luzmo-font-size-xl: 18px;--luzmo-font-size-xxl: 20px;--luzmo-font-style: normal;--luzmo-line-height: normal;--luzmo-font-weight: 400;--luzmo-font-weight-semibold: 500;--luzmo-font-weight-bold: 600;--luzmo-font-color: #333;--luzmo-font-color-disabled: var(--luzmo-disabled-color);--luzmo-font-color-extra-dimmed: #888;--luzmo-font-color-hover: #333;--luzmo-font-color-down: #111;--luzmo-font-color-focus: #333;--luzmo-primary: #4434ff;--luzmo-primary-hover: #4234e4;--luzmo-primary-down: #392cc7;--luzmo-primary-focus: #4234e4;--luzmo-primary-inverse-color: #ffffff;--luzmo-primary-rgb: 68, 52, 255;--luzmo-secondary: #ff00ff;--luzmo-secondary-hover: #e309e3;--luzmo-secondary-down: #c711c7;--luzmo-secondary-focus: #e309e3;--luzmo-secondary-inverse-color: #ffffff;--luzmo-secondary-rgb: 255, 0, 255;--luzmo-negative-color: #ca221c;--luzmo-negative-color-hover: #b3241f;--luzmo-negative-color-down: #9f231f;--luzmo-negative-color-focus: #b3241f;--luzmo-negative-color-rgb: 202, 34, 28;--luzmo-positive-color: rgb(20, 150, 101);--luzmo-positive-color-hover: rgb(17, 128, 86);--luzmo-positive-color-down: rgb(16, 105, 71);--luzmo-positive-color-focus: rgb(17, 128, 86);--luzmo-positive-color-rgb: 20, 150, 101;--luzmo-selected-color: rgb(110, 110, 110);--luzmo-selected-color-hover: rgb(70, 70, 70);--luzmo-selected-color-down: rgb(40, 40, 40);--luzmo-selected-color-focus: rgb(70, 70, 70);--luzmo-selected-color-hard: #1e1e1e;--luzmo-selected-color-hard-hover: rgb(0, 0, 0);--luzmo-selected-color-hard-down: rgb(0, 0, 0);--luzmo-selected-color-hard-focus: rgb(0, 0, 0);--luzmo-informative-color: #1a77e9;--luzmo-informative-color-rgb: 26, 119, 233;--luzmo-disabled-color: #aaaaaa;--luzmo-spacing-1: 2px;--luzmo-spacing-2: 4px;--luzmo-spacing-3: 8px;--luzmo-spacing-4: 12px;--luzmo-spacing-5: 16px;--luzmo-indicator-gap: 2px;--luzmo-indicator-width: 1px;--luzmo-indicator-color: var(--luzmo-primary);--luzmo-component-height-xxs: 20px;--luzmo-component-height-xs: 24px;--luzmo-component-height-s: 28px;--luzmo-component-height: 32px;--luzmo-component-height-l: 40px;--luzmo-component-height-xl: 48px;--luzmo-component-height-xxl: 64px;--luzmo-icon-size-xxs: 10px;--luzmo-icon-size-xs: 12px;--luzmo-icon-size-s: 14px;--luzmo-icon-size-m: 16px;--luzmo-icon-size-l: 18px;--luzmo-icon-size-xl: 20px;--luzmo-icon-size-xxl: 32px}', document.head.appendChild(b);
86
94
  }
87
95
  };
88
- r();
96
+ A();
97
+ const I = ":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}";
98
+ var T = Object.defineProperty, s = (b, o, t, e) => {
99
+ for (var a = void 0, r = b.length - 1, l; r >= 0; r--)
100
+ (l = b[r]) && (a = l(o, t, a) || a);
101
+ return a && T(o, t, a), a;
102
+ };
103
+ let z = !1;
104
+ typeof window < "u" && (document.addEventListener(
105
+ "keydown",
106
+ () => {
107
+ z = !0;
108
+ },
109
+ !0
110
+ ), document.addEventListener(
111
+ "mousedown",
112
+ () => {
113
+ z = !1;
114
+ },
115
+ !0
116
+ ), document.addEventListener(
117
+ "pointerdown",
118
+ () => {
119
+ z = !1;
120
+ },
121
+ !0
122
+ ));
123
+ var d;
124
+ const i = (d = class extends F(B, {
125
+ validSizes: ["xs", "s", "m", "l", "xl"],
126
+ defaultSize: "m"
127
+ }) {
128
+ constructor() {
129
+ 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 = () => {
130
+ z && this.classList.add("focus-visible");
131
+ }, this._handleHostBlur = () => {
132
+ this.classList.remove("focus-visible");
133
+ }, this._handlePaste = (o) => {
134
+ var a;
135
+ if (!this.allowImages || this.disabled || this.readonly || this.pending)
136
+ return;
137
+ const t = (a = o.clipboardData) == null ? void 0 : a.items;
138
+ if (!t) return;
139
+ const e = [];
140
+ for (const r of t)
141
+ if (r.type.startsWith("image/")) {
142
+ const l = r.getAsFile();
143
+ l && e.push(l);
144
+ }
145
+ e.length > 0 && this.addFiles(e);
146
+ };
147
+ }
148
+ static get styles() {
149
+ return [k(I)];
150
+ }
151
+ /**
152
+ * Get the appropriate tag size based on the prompt box size.
153
+ * Tags are one level smaller than the prompt box, with 's' being the minimum.
154
+ * @private
155
+ */
156
+ get _tagSize() {
157
+ switch (this.size) {
158
+ case "s":
159
+ case "m":
160
+ return "s";
161
+ case "l":
162
+ case "xl":
163
+ return "m";
164
+ default:
165
+ return "s";
166
+ }
167
+ }
168
+ connectedCallback() {
169
+ super.connectedCallback(), this.hasAttribute("tabindex") || this.setAttribute("tabindex", "0"), this.addEventListener("focus", this._handleHostFocus), this.addEventListener("blur", this._handleHostBlur), this.addEventListener("paste", this._handlePaste);
170
+ }
171
+ disconnectedCallback() {
172
+ super.disconnectedCallback(), this.removeEventListener("focus", this._handleHostFocus), this.removeEventListener("blur", this._handleHostBlur), this.removeEventListener("paste", this._handlePaste), this._revokeAllPreviewUrls(), this._destroyVoiceRecorder();
173
+ }
174
+ _revokeAllPreviewUrls() {
175
+ for (const o of this._attachments)
176
+ o.previewUrl && URL.revokeObjectURL(o.previewUrl);
177
+ }
178
+ _handleTopActionsSlotChange(o) {
179
+ const t = o.target;
180
+ this._hasTopActions = t.assignedNodes().length > 0;
181
+ }
182
+ _handleBottomActionsSlotChange(o) {
183
+ const t = o.target;
184
+ this._hasBottomActions = t.assignedNodes().length > 0;
185
+ }
186
+ _handleRecordButtonSlotChange(o) {
187
+ const t = o.target;
188
+ this._hasRecordButton = t.assignedNodes().length > 0;
189
+ }
190
+ _handleSubmitButtonSlotChange(o) {
191
+ const t = o.target;
192
+ this._hasSubmitButton = t.assignedNodes().length > 0;
193
+ }
194
+ _handleInput(o) {
195
+ const t = o.target;
196
+ this.value = t.value, this.dispatchEvent(
197
+ new Event("input", {
198
+ bubbles: !0,
199
+ composed: !0
200
+ })
201
+ );
202
+ }
203
+ _handleKeydown(o) {
204
+ o.key === "Enter" && !o.shiftKey && (o.preventDefault(), this._submit());
205
+ }
206
+ _handleFileInputChange(o) {
207
+ const t = o.target, e = t.files;
208
+ e && e.length > 0 && this.addFiles([...e]), t.value = "";
209
+ }
210
+ _isFileTypeAccepted(o) {
211
+ if (this.acceptedFileTypes.length === 0)
212
+ return !0;
213
+ const t = o.name.toLowerCase(), e = o.type.toLowerCase();
214
+ for (const a of this.acceptedFileTypes) {
215
+ const r = a.toLowerCase();
216
+ if (r.endsWith("/*")) {
217
+ const l = r.slice(0, -2);
218
+ if (e.startsWith(l + "/"))
219
+ return !0;
220
+ } else {
221
+ if (e === r)
222
+ return !0;
223
+ if (r.startsWith(".") && t.endsWith(r))
224
+ return !0;
225
+ }
226
+ }
227
+ return !1;
228
+ }
229
+ _isImageFile(o) {
230
+ return o.type.startsWith("image/");
231
+ }
232
+ _generateAttachmentId() {
233
+ return `attachment-${++this._attachmentIdCounter}-${Date.now()}`;
234
+ }
235
+ /**
236
+ * Add files as attachments.
237
+ * @param files - Array of File objects to add
238
+ * @returns Array of added attachment IDs
239
+ */
240
+ addFiles(o) {
241
+ if (this.disabled || this.readonly || this.pending)
242
+ return [];
243
+ const t = [];
244
+ for (const e of o) {
245
+ if (this._isImageFile(e) && !this.allowImages || !this._isImageFile(e) && !this.allowFiles || !this._isFileTypeAccepted(e))
246
+ continue;
247
+ const a = this._generateAttachmentId(), r = {
248
+ file: e,
249
+ id: a
250
+ };
251
+ this._isImageFile(e) && (r.previewUrl = URL.createObjectURL(e)), this._attachments = [...this._attachments, r], t.push(a);
252
+ }
253
+ return t.length > 0 && this.dispatchEvent(
254
+ new CustomEvent("luzmo-attachments-change", {
255
+ bubbles: !0,
256
+ composed: !0,
257
+ detail: { attachments: this._attachments }
258
+ })
259
+ ), t;
260
+ }
261
+ /**
262
+ * Remove an attachment by its ID.
263
+ * @param id - The attachment ID to remove
264
+ */
265
+ removeAttachment(o) {
266
+ const t = this._attachments.find((e) => e.id === o);
267
+ t && (t.previewUrl && URL.revokeObjectURL(t.previewUrl), this._attachments = this._attachments.filter((e) => e.id !== o), this.dispatchEvent(
268
+ new CustomEvent("luzmo-attachments-change", {
269
+ bubbles: !0,
270
+ composed: !0,
271
+ detail: { attachments: this._attachments }
272
+ })
273
+ ));
274
+ }
275
+ /**
276
+ * Clear all attachments.
277
+ */
278
+ clearAttachments() {
279
+ this._revokeAllPreviewUrls(), this._attachments = [], this.dispatchEvent(
280
+ new CustomEvent("luzmo-attachments-change", {
281
+ bubbles: !0,
282
+ composed: !0,
283
+ detail: { attachments: this._attachments }
284
+ })
285
+ );
286
+ }
287
+ /**
288
+ * Get all current attachments.
289
+ */
290
+ getAttachments() {
291
+ return [...this._attachments];
292
+ }
293
+ /**
294
+ * Open the file picker dialog.
295
+ */
296
+ openFilePicker() {
297
+ var o;
298
+ (o = this._fileInput) == null || o.click();
299
+ }
300
+ _handleRemoveAttachment(o) {
301
+ const e = o.currentTarget.dataset.attachmentId;
302
+ e && this.removeAttachment(e);
303
+ }
304
+ _handleTagDelete(o) {
305
+ const e = o.target.dataset.attachmentId;
306
+ e && (o.preventDefault(), this.removeAttachment(e));
307
+ }
308
+ /**
309
+ * Extract values from interactive elements within a container.
310
+ * @private
311
+ */
312
+ _extractActionValues(o) {
313
+ const t = [];
314
+ for (const e of o) {
315
+ const a = this._getInteractiveElements(e);
316
+ for (const r of a) {
317
+ const l = {
318
+ element: r,
319
+ name: r.getAttribute("name") || r.getAttribute("label") || void 0
320
+ }, c = [
321
+ "luzmo-switch",
322
+ "luzmo-checkbox",
323
+ "luzmo-radio"
324
+ ], u = r.tagName.toLowerCase();
325
+ "value" in r && (l.value = r.value), c.includes(u) && "checked" in r && (l.checked = r.checked), t.push(l);
326
+ }
327
+ }
328
+ return t;
329
+ }
330
+ _submit() {
331
+ var c, u;
332
+ if (this.disabled || this.readonly || this.pending)
333
+ return;
334
+ const o = (c = this.shadowRoot) == null ? void 0 : c.querySelector(
335
+ 'slot[name="top-actions"]'
336
+ ), t = (u = this.shadowRoot) == null ? void 0 : u.querySelector(
337
+ 'slot[name="bottom-actions"]'
338
+ ), e = (o == null ? void 0 : o.assignedElements()) ?? [], a = (t == null ? void 0 : t.assignedElements()) ?? [], r = this._extractActionValues([
339
+ ...e,
340
+ ...a
341
+ ]), l = {
342
+ value: this.value,
343
+ topActions: [...e],
344
+ bottomActions: [...a],
345
+ actionValues: r,
346
+ attachments: [...this._attachments]
347
+ };
348
+ this.dispatchEvent(
349
+ new CustomEvent("luzmo-submit", {
350
+ bubbles: !0,
351
+ composed: !0,
352
+ detail: l
353
+ })
354
+ );
355
+ }
356
+ async _handleRecordClick(o) {
357
+ if (!_.isSupported()) {
358
+ this.dispatchEvent(
359
+ new CustomEvent("luzmo-record-error", {
360
+ bubbles: !0,
361
+ composed: !0,
362
+ detail: { error: "Voice recording is not supported in this browser" }
363
+ })
364
+ );
365
+ return;
366
+ }
367
+ if (this._isRecording)
368
+ this._stopRecording();
369
+ else {
370
+ const t = o.currentTarget;
371
+ this._shouldFocusFinishButton = t.matches(":focus-visible"), await this._startRecording();
372
+ }
373
+ this.dispatchEvent(
374
+ new CustomEvent("luzmo-record", {
375
+ bubbles: !0,
376
+ composed: !0,
377
+ detail: { isRecording: this._isRecording }
378
+ })
379
+ );
380
+ }
381
+ /**
382
+ * Start voice recording.
383
+ * @private
384
+ */
385
+ async _startRecording() {
386
+ if (this._initVoiceRecorder(), !this._voiceRecorder)
387
+ return;
388
+ await this._voiceRecorder.startRecording() && (this._isRecording = !0, this._recordingDuration = 0, this._audioLevel = 0);
389
+ }
390
+ /**
391
+ * Stop voice recording.
392
+ * @private
393
+ */
394
+ _stopRecording() {
395
+ this._voiceRecorder && this._voiceRecorder.stopRecording();
396
+ }
397
+ /**
398
+ * Cancel voice recording without emitting the result.
399
+ * @private
400
+ */
401
+ _cancelRecording() {
402
+ this._voiceRecorder && this._voiceRecorder.cancelRecording(), this._isRecording = !1, this._recordingDuration = 0, this._audioLevel = 0;
403
+ }
404
+ /**
405
+ * Handle cancel recording button click.
406
+ * @private
407
+ */
408
+ _handleCancelRecordClick() {
409
+ this._cancelRecording(), this.dispatchEvent(
410
+ new CustomEvent("luzmo-record-cancel", {
411
+ bubbles: !0,
412
+ composed: !0
413
+ })
414
+ );
415
+ }
416
+ /**
417
+ * Initialize voice recorder with callbacks.
418
+ * @private
419
+ */
420
+ _initVoiceRecorder() {
421
+ this._voiceRecorder || (this._voiceRecorder = new _({
422
+ maxDuration: 3e5
423
+ // 5 minutes
424
+ }), this._voiceRecorder.onStart(() => {
425
+ this._isRecording = !0;
426
+ }).onStop((o) => {
427
+ this._isRecording = !1, this._recordingDuration = 0, this._audioLevel = 0, this.dispatchEvent(
428
+ new CustomEvent("luzmo-recording-complete", {
429
+ bubbles: !0,
430
+ composed: !0,
431
+ detail: {
432
+ audioBlob: o.audioBlob,
433
+ duration: o.duration,
434
+ mimeType: o.mimeType
435
+ }
436
+ })
437
+ );
438
+ }).onError((o) => {
439
+ this._isRecording = !1, this._recordingDuration = 0, this._audioLevel = 0, this.dispatchEvent(
440
+ new CustomEvent("luzmo-record-error", {
441
+ bubbles: !0,
442
+ composed: !0,
443
+ detail: { error: o }
444
+ })
445
+ );
446
+ }).onAudioLevel((o) => {
447
+ this._audioLevel = o;
448
+ }).onDurationUpdate((o) => {
449
+ this._recordingDuration = o;
450
+ }));
451
+ }
452
+ /**
453
+ * Destroy voice recorder and clean up.
454
+ * @private
455
+ */
456
+ _destroyVoiceRecorder() {
457
+ this._voiceRecorder && (this._voiceRecorder.destroy(), this._voiceRecorder = null), this._isRecording = !1, this._recordingDuration = 0, this._audioLevel = 0;
458
+ }
459
+ /**
460
+ * Format recording duration for display.
461
+ * @private
462
+ */
463
+ _formatRecordingDuration() {
464
+ return _.formatDuration(this._recordingDuration);
465
+ }
466
+ /**
467
+ * Focus the input element.
468
+ */
469
+ focus() {
470
+ var o;
471
+ (o = this._inputElement) == null || o.focus();
472
+ }
473
+ /**
474
+ * Clear the input value and all attachments.
475
+ */
476
+ clear() {
477
+ this.value = "", this.clearAttachments();
478
+ }
479
+ /**
480
+ * Get the slotted top actions elements.
481
+ */
482
+ getTopActions() {
483
+ var t;
484
+ const o = (t = this.shadowRoot) == null ? void 0 : t.querySelector(
485
+ 'slot[name="top-actions"]'
486
+ );
487
+ return (o == null ? void 0 : o.assignedElements()) ?? [];
488
+ }
489
+ /**
490
+ * Get the slotted bottom actions elements.
491
+ */
492
+ getBottomActions() {
493
+ var t;
494
+ const o = (t = this.shadowRoot) == null ? void 0 : t.querySelector(
495
+ 'slot[name="bottom-actions"]'
496
+ );
497
+ return (o == null ? void 0 : o.assignedElements()) ?? [];
498
+ }
499
+ updated(o) {
500
+ super.updated(o), (o.has("pending") || o.has("disabled")) && this._updateSlottedElementsState(), this._shouldFocusFinishButton && this._isRecording && (this._shouldFocusFinishButton = !1, requestAnimationFrame(() => {
501
+ var t;
502
+ (t = this._finishRecordingButton) == null || t.focus();
503
+ }));
504
+ }
505
+ /**
506
+ * Find all interactive children within an element (including the element itself if it matches).
507
+ * @private
508
+ */
509
+ _getInteractiveElements(o) {
510
+ const t = [];
511
+ o.matches(d.INTERACTIVE_ELEMENTS_SELECTOR) && t.push(o);
512
+ const e = o.querySelectorAll(
513
+ d.INTERACTIVE_ELEMENTS_SELECTOR
514
+ );
515
+ return t.push(...e), t;
516
+ }
517
+ /**
518
+ * Update the state of slotted elements based on disabled and pending properties.
519
+ * When disabled: set disabled attribute
520
+ * When pending: set readonly attribute (not disabled)
521
+ * @private
522
+ */
523
+ _updateSlottedElementsState() {
524
+ var c, u, f, L;
525
+ const o = (c = this.shadowRoot) == null ? void 0 : c.querySelector(
526
+ 'slot[name="submit-button"]'
527
+ ), t = (o == null ? void 0 : o.assignedElements()) ?? [];
528
+ for (const x of t) {
529
+ const y = this._getInteractiveElements(x);
530
+ for (const p of y)
531
+ this.pending ? (p.setAttribute("pending", ""), p.removeAttribute("disabled"), p.removeAttribute("readonly")) : this.disabled ? (p.removeAttribute("pending"), p.setAttribute("disabled", ""), p.removeAttribute("readonly")) : (p.removeAttribute("pending"), p.removeAttribute("disabled"), p.removeAttribute("readonly"));
532
+ }
533
+ const e = (x) => {
534
+ for (const y of x) {
535
+ const p = this._getInteractiveElements(y);
536
+ for (const g of p)
537
+ this.disabled ? (g.setAttribute("disabled", ""), g.removeAttribute("readonly")) : this.pending ? (g.removeAttribute("disabled"), g.setAttribute("readonly", "")) : (g.removeAttribute("disabled"), g.removeAttribute("readonly"));
538
+ }
539
+ }, a = (u = this.shadowRoot) == null ? void 0 : u.querySelector(
540
+ 'slot[name="top-actions"]'
541
+ );
542
+ e((a == null ? void 0 : a.assignedElements()) ?? []);
543
+ const r = (f = this.shadowRoot) == null ? void 0 : f.querySelector(
544
+ 'slot[name="bottom-actions"]'
545
+ );
546
+ e((r == null ? void 0 : r.assignedElements()) ?? []);
547
+ const l = (L = this.shadowRoot) == null ? void 0 : L.querySelector(
548
+ 'slot[name="record-button"]'
549
+ );
550
+ e((l == null ? void 0 : l.assignedElements()) ?? []);
551
+ }
552
+ renderTopActions() {
553
+ return n`
554
+ <div
555
+ class="top-actions ${this._hasTopActions ? "" : "empty"}"
556
+ part="top-actions"
557
+ >
558
+ <slot
559
+ name="top-actions"
560
+ @slotchange=${this._handleTopActionsSlotChange}
561
+ ></slot>
562
+ </div>
563
+ `;
564
+ }
565
+ renderBottomActions() {
566
+ return n`
567
+ <div
568
+ class="bottom-actions ${this._hasBottomActions ? "" : "empty"}"
569
+ part="bottom-actions"
570
+ >
571
+ <slot
572
+ name="bottom-actions"
573
+ @slotchange=${this._handleBottomActionsSlotChange}
574
+ ></slot>
575
+ </div>
576
+ `;
577
+ }
578
+ renderRecordButton() {
579
+ return !this.recording && !this._hasRecordButton ? n`<slot
580
+ name="record-button"
581
+ @slotchange=${this._handleRecordButtonSlotChange}
582
+ ></slot>` : this._hasRecordButton ? n`<slot
583
+ name="record-button"
584
+ @slotchange=${this._handleRecordButtonSlotChange}
585
+ ></slot>` : this._isRecording ? n`
586
+ <slot
587
+ name="record-button"
588
+ @slotchange=${this._handleRecordButtonSlotChange}
589
+ ></slot>
590
+ <div class="recording-ui" part="recording-ui">
591
+ <luzmo-action-button
592
+ class="cancel-recording-button"
593
+ part="cancel-recording-button"
594
+ .size=${this.size}
595
+ ?disabled=${this.disabled}
596
+ @click=${this._handleCancelRecordClick}
597
+ aria-label="Cancel recording"
598
+ >
599
+ <luzmo-icon
600
+ slot="icon"
601
+ .icon=${C}
602
+ .size=${this.size}
603
+ ></luzmo-icon>
604
+ </luzmo-action-button>
605
+ ${this.renderWaveform()}
606
+ <span class="recording-duration" part="recording-duration">
607
+ ${this._formatRecordingDuration()}
608
+ </span>
609
+ <luzmo-button
610
+ class="finish-recording-button"
611
+ part="finish-recording-button"
612
+ .size=${this.size}
613
+ icon-only
614
+ variant="primary"
615
+ ?disabled=${this.disabled}
616
+ @click=${this._handleRecordClick}
617
+ aria-label="Finish recording"
618
+ >
619
+ <luzmo-icon slot="icon" .icon=${S}></luzmo-icon>
620
+ </luzmo-button>
621
+ </div>
622
+ ` : n`
623
+ <slot
624
+ name="record-button"
625
+ @slotchange=${this._handleRecordButtonSlotChange}
626
+ ></slot>
627
+ <luzmo-action-button
628
+ class="record-button"
629
+ part="record-button"
630
+ quiet
631
+ .size=${this.size}
632
+ ?disabled=${this.disabled}
633
+ ?readonly=${this.pending}
634
+ @click=${this._handleRecordClick}
635
+ aria-label="Record"
636
+ >
637
+ <luzmo-icon
638
+ slot="icon"
639
+ .icon=${E}
640
+ .size=${this.size}
641
+ ></luzmo-icon>
642
+ </luzmo-action-button>
643
+ `;
644
+ }
645
+ renderWaveform() {
646
+ const t = [];
647
+ for (let e = 0; e < 5; e++) {
648
+ const r = Math.floor(2.5), c = 1 - Math.abs(e - r) * 0.15, u = 0.3 + this._audioLevel * 0.7 * c, f = Math.max(0.2, Math.min(1, u));
649
+ t.push(n`
650
+ <span
651
+ class="waveform-bar"
652
+ style="--bar-height: ${f}"
653
+ ></span>
654
+ `);
655
+ }
656
+ return n`
657
+ <div class="waveform" part="waveform" aria-hidden="true">${t}</div>
658
+ `;
659
+ }
660
+ renderSubmitButton() {
661
+ return this._isRecording ? n`<slot
662
+ name="submit-button"
663
+ @slotchange=${this._handleSubmitButtonSlotChange}
664
+ ></slot>` : this.hideSubmit && !this._hasSubmitButton ? n`<slot
665
+ name="submit-button"
666
+ @slotchange=${this._handleSubmitButtonSlotChange}
667
+ ></slot>` : this._hasSubmitButton ? n`<slot
668
+ name="submit-button"
669
+ @slotchange=${this._handleSubmitButtonSlotChange}
670
+ ></slot>` : n`
671
+ <slot
672
+ name="submit-button"
673
+ @slotchange=${this._handleSubmitButtonSlotChange}
674
+ ></slot>
675
+ <luzmo-button
676
+ class="submit-button"
677
+ part="submit-button"
678
+ .size=${this.size}
679
+ icon-only
680
+ variant="primary"
681
+ ?disabled=${this.disabled || !this.pending && !this.value.trim()}
682
+ ?pending=${this.pending}
683
+ @click=${this._submit}
684
+ aria-label="Submit"
685
+ >
686
+ <luzmo-icon slot="icon" .icon=${$}></luzmo-icon>
687
+ </luzmo-button>
688
+ `;
689
+ }
690
+ renderTextarea() {
691
+ return n`
692
+ <luzmo-text-field
693
+ class="input-field"
694
+ part="input"
695
+ placeholder=${this.placeholder}
696
+ .value=${this.value}
697
+ .size=${this.size}
698
+ rows=${this.rows}
699
+ ?grows=${this.grows}
700
+ ?readonly=${this.readonly || this.pending || this.disabled}
701
+ maxlength=${this.maxlength > 0 ? this.maxlength : -1}
702
+ multiline
703
+ quiet
704
+ label=${this.placeholder || "Enter your message"}
705
+ @input=${this._handleInput}
706
+ @keydown=${this._handleKeydown}
707
+ ></luzmo-text-field>
708
+ `;
709
+ }
710
+ _getAcceptAttribute() {
711
+ if (this.acceptedFileTypes.length > 0)
712
+ return this.acceptedFileTypes.join(",");
713
+ const o = [];
714
+ return this.allowImages && o.push("image/*"), this.allowFiles && o.push("*/*"), o.join(",");
715
+ }
716
+ renderHiddenFileInput() {
717
+ return !this.allowImages && !this.allowFiles ? v : n`
718
+ <input
719
+ type="file"
720
+ class="hidden-file-input"
721
+ accept=${this._getAcceptAttribute()}
722
+ multiple
723
+ @change=${this._handleFileInputChange}
724
+ aria-hidden="true"
725
+ tabindex="-1"
726
+ />
727
+ `;
728
+ }
729
+ renderImageAttachment(o) {
730
+ return n`
731
+ <div class="image-attachment" part="image-attachment">
732
+ <img
733
+ src=${o.previewUrl || ""}
734
+ alt=${o.file.name}
735
+ class="image-preview"
736
+ />
737
+ <luzmo-clear-button
738
+ class="attachment-remove"
739
+ .size=${this.size}
740
+ ?disabled=${this.disabled || this.pending}
741
+ label="Remove ${o.file.name}"
742
+ data-attachment-id=${o.id}
743
+ @click=${this._handleRemoveAttachment}
744
+ ></luzmo-clear-button>
745
+ </div>
746
+ `;
747
+ }
748
+ renderFileAttachment(o) {
749
+ return n`
750
+ <luzmo-tag
751
+ class="file-attachment"
752
+ part="file-attachment"
753
+ .size=${this._tagSize}
754
+ deletable
755
+ ?disabled=${this.disabled || this.pending}
756
+ data-attachment-id=${o.id}
757
+ @delete=${this._handleTagDelete}
758
+ >
759
+ ${o.file.name}
760
+ </luzmo-tag>
761
+ `;
762
+ }
763
+ renderAttachments() {
764
+ if (this._attachments.length === 0)
765
+ return v;
766
+ const o = this._attachments.filter(
767
+ (e) => this._isImageFile(e.file)
768
+ ), t = this._attachments.filter(
769
+ (e) => !this._isImageFile(e.file)
770
+ );
771
+ return n`
772
+ <div class="attachments" part="attachments">
773
+ ${o.length > 0 ? n`
774
+ <div class="image-attachments" part="image-attachments">
775
+ ${R(
776
+ o,
777
+ (e) => e.id,
778
+ (e) => this.renderImageAttachment(e)
779
+ )}
780
+ </div>
781
+ ` : v}
782
+ ${t.length > 0 ? n`
783
+ <luzmo-tags
784
+ class="file-attachments"
785
+ part="file-attachments"
786
+ .size=${this._tagSize}
787
+ >
788
+ ${R(
789
+ t,
790
+ (e) => e.id,
791
+ (e) => this.renderFileAttachment(e)
792
+ )}
793
+ </luzmo-tags>
794
+ ` : v}
795
+ </div>
796
+ `;
797
+ }
798
+ render() {
799
+ return n`
800
+ ${this.renderHiddenFileInput()}
801
+ <div class="container" part="container">
802
+ ${this.renderTopActions()} ${this.renderAttachments()}
803
+ <div class="input-wrapper" part="input-wrapper">
804
+ ${this.renderTextarea()}
805
+ </div>
806
+ <div class="actions-row" part="actions-row">
807
+ ${this.renderBottomActions()}
808
+ <div class="button-group" part="button-group">
809
+ ${this.renderRecordButton()} ${this.renderSubmitButton()}
810
+ </div>
811
+ </div>
812
+ </div>
813
+ `;
814
+ }
815
+ }, d.INTERACTIVE_ELEMENTS_SELECTOR = "luzmo-button, luzmo-action-button, luzmo-switch, luzmo-picker, luzmo-picker-button, luzmo-select, luzmo-text-field, luzmo-number-field", d);
816
+ s([
817
+ m({ type: Number })
818
+ ], i.prototype, "rows");
819
+ s([
820
+ m({ type: Boolean, reflect: !0 })
821
+ ], i.prototype, "grows");
822
+ s([
823
+ m({ type: Boolean, reflect: !0 })
824
+ ], i.prototype, "recording");
825
+ s([
826
+ m({ type: Boolean, reflect: !0, attribute: "hide-submit" })
827
+ ], i.prototype, "hideSubmit");
828
+ s([
829
+ m({ type: String })
830
+ ], i.prototype, "placeholder");
831
+ s([
832
+ m({ type: String })
833
+ ], i.prototype, "value");
834
+ s([
835
+ m({ type: Boolean, reflect: !0 })
836
+ ], i.prototype, "disabled");
837
+ s([
838
+ m({ type: Boolean, reflect: !0 })
839
+ ], i.prototype, "readonly");
840
+ s([
841
+ m({ type: Number })
842
+ ], i.prototype, "maxlength");
843
+ s([
844
+ m({ type: Boolean, reflect: !0 })
845
+ ], i.prototype, "pending");
846
+ s([
847
+ m({ type: Boolean, reflect: !0, attribute: "allow-images" })
848
+ ], i.prototype, "allowImages");
849
+ s([
850
+ m({ type: Boolean, reflect: !0, attribute: "allow-files" })
851
+ ], i.prototype, "allowFiles");
852
+ s([
853
+ m({ type: Array, attribute: "accepted-file-types" })
854
+ ], i.prototype, "acceptedFileTypes");
855
+ s([
856
+ h()
857
+ ], i.prototype, "_hasTopActions");
858
+ s([
859
+ h()
860
+ ], i.prototype, "_hasBottomActions");
861
+ s([
862
+ h()
863
+ ], i.prototype, "_hasRecordButton");
864
+ s([
865
+ h()
866
+ ], i.prototype, "_hasSubmitButton");
867
+ s([
868
+ h()
869
+ ], i.prototype, "_attachments");
870
+ s([
871
+ h()
872
+ ], i.prototype, "_isRecording");
873
+ s([
874
+ h()
875
+ ], i.prototype, "_recordingDuration");
876
+ s([
877
+ h()
878
+ ], i.prototype, "_audioLevel");
879
+ s([
880
+ w("luzmo-text-field")
881
+ ], i.prototype, "_inputElement");
882
+ s([
883
+ w('input[type="file"]')
884
+ ], i.prototype, "_fileInput");
885
+ s([
886
+ w(".finish-recording-button")
887
+ ], i.prototype, "_finishRecordingButton");
888
+ let D = i;
889
+ customElements.get("luzmo-prompt-box") || customElements.define("luzmo-prompt-box", D);
89
890
  export {
90
- Br as ClickController,
91
- le as DESCRIPTION_ID,
92
- Lr as ElementSizes,
93
- mr as FocusVisiblePolyfillMixin,
94
- tr as Focusable,
95
- Dr as HoverController,
96
- Gr as InteractionController,
97
- Ur as InteractionTypes,
98
- _r as LONGPRESS_INSTRUCTIONS,
99
- Nr as LongpressController,
100
- Hr as LuzmoAbstractOverlay,
101
- s as LuzmoAccordion,
102
- c as LuzmoAccordionItem,
103
- f as LuzmoActionBar,
104
- x as LuzmoActionButton,
105
- Cr as LuzmoActionGroup,
106
- g as LuzmoActionMenu,
107
- h as LuzmoAvatar,
108
- S as LuzmoButton,
109
- C as LuzmoButtonGroup,
110
- T as LuzmoCalendar,
111
- w as LuzmoCheckbox,
112
- Tr as LuzmoClearButton,
113
- wr as LuzmoCloseButton,
114
- O as LuzmoColorArea,
115
- P as LuzmoColorField,
116
- R as LuzmoColorHandle,
117
- Or as LuzmoColorLoupe,
118
- B as LuzmoColorMenu,
119
- G as LuzmoColorPalette,
120
- _ as LuzmoColorPicker,
121
- H as LuzmoColorSlider,
122
- V as LuzmoDateTimePicker,
123
- K as LuzmoDivider,
124
- rr as LuzmoElement,
125
- Pr as LuzmoFieldGroup,
126
- Rr as LuzmoFieldLabel,
127
- Wo as LuzmoHelpText,
128
- Z as LuzmoIcon,
129
- Q as LuzmoInfieldButton,
130
- Y as LuzmoLabel,
131
- oo as LuzmoMenu,
132
- ro as LuzmoMenuDivider,
133
- eo as LuzmoMenuGroup,
134
- lo as LuzmoMenuItem,
135
- er as LuzmoMixin,
136
- to as LuzmoMultiLangField,
137
- io as LuzmoNumberField,
138
- no as LuzmoOption,
139
- so as LuzmoOptions,
140
- co as LuzmoOptionsDivider,
141
- qr as LuzmoOverlay,
142
- xo as LuzmoOverlayTrigger,
143
- me as LuzmoPicker,
144
- ue as LuzmoPickerBase,
145
- yo as LuzmoPickerButton,
146
- ae as LuzmoPopover,
147
- ze as LuzmoProgressCircle,
148
- Io as LuzmoRadio,
149
- To as LuzmoRadioGroup,
150
- wo as LuzmoSearch,
151
- Oo as LuzmoSelect,
152
- Po as LuzmoSlider,
153
- Ro as LuzmoSwatch,
154
- Eo as LuzmoSwatchGroup,
155
- Do as LuzmoSwitch,
156
- Uo as LuzmoTab,
157
- _o as LuzmoTabPanel,
158
- No as LuzmoTabs,
159
- Ho as LuzmoTabsOverflow,
160
- Vo as LuzmoTag,
161
- jo as LuzmoTags,
162
- se as LuzmoTextField,
163
- Jo as LuzmoToast,
164
- Xo as LuzmoTooltip,
165
- $o as LuzmoUnitInput,
166
- mo as MenuItemAddedOrUpdatedEvent,
167
- bo as OverlayTriggerDirective,
168
- Vr as PlacementController,
169
- jr as SAFARI_FOCUS_RING_CLASS,
170
- hr as SizedMixin,
171
- go as SlottableRequestDirective,
172
- oe as SlottableRequestEvent,
173
- po as VIRTUALIZE_AS_OF_NUM_ITEMS,
174
- Kr as VirtualTrigger,
175
- Wr as guaranteedAllTransitionend,
176
- ir as isAndroid,
177
- zr as isAppleDevice,
178
- nr as isChrome,
179
- sr as isFirefox,
180
- cr as isIOS,
181
- pr as isIPad,
182
- fr as isIPhone,
183
- dr as isMac,
184
- xr as isSeamonkey,
185
- br as isWebKit,
186
- Zr as lastInteractionType,
187
- Jr as nextFrame,
188
- Qr as noop,
189
- Lo as openOverlay,
190
- Xr as overlayTimer,
191
- Yr as placementUpdatedSymbol,
192
- re as removeSlottableRequest,
193
- ho as slottableRequest,
194
- Sr as streamingListener,
195
- vo as trigger
891
+ Re as ClickController,
892
+ je as DESCRIPTION_ID,
893
+ _t as ElementSizes,
894
+ Xt as FocusVisiblePolyfillMixin,
895
+ oe as Focusable,
896
+ Ae as HoverController,
897
+ Ce as InteractionController,
898
+ Se as InteractionTypes,
899
+ Ee as LONGPRESS_INSTRUCTIONS,
900
+ $e as LongpressController,
901
+ ke as LuzmoAbstractOverlay,
902
+ Y as LuzmoAccordion,
903
+ oo as LuzmoAccordionItem,
904
+ eo as LuzmoActionBar,
905
+ io as LuzmoActionButton,
906
+ be as LuzmoActionGroup,
907
+ so as LuzmoActionMenu,
908
+ lo as LuzmoAvatar,
909
+ po as LuzmoButton,
910
+ ho as LuzmoButtonGroup,
911
+ go as LuzmoCalendar,
912
+ vo as LuzmoChatMessage,
913
+ xo as LuzmoChatMessageGroup,
914
+ _o as LuzmoCheckbox,
915
+ co as LuzmoClearButton,
916
+ fe as LuzmoCloseButton,
917
+ Lo as LuzmoColorArea,
918
+ Ao as LuzmoColorField,
919
+ So as LuzmoColorHandle,
920
+ ze as LuzmoColorLoupe,
921
+ $o as LuzmoColorMenu,
922
+ Bo as LuzmoColorPalette,
923
+ Io as LuzmoColorPaletteGroup,
924
+ Do as LuzmoColorPicker,
925
+ Mo as LuzmoColorSlider,
926
+ Oo as LuzmoDateTimePicker,
927
+ Vo as LuzmoDivider,
928
+ B as LuzmoElement,
929
+ ye as LuzmoFieldGroup,
930
+ we as LuzmoFieldLabel,
931
+ Ct as LuzmoHelpText,
932
+ Ho as LuzmoIcon,
933
+ jo as LuzmoInfieldButton,
934
+ Ko as LuzmoLabel,
935
+ Jo as LuzmoMenu,
936
+ Qo as LuzmoMenuDivider,
937
+ Xo as LuzmoMenuGroup,
938
+ Yo as LuzmoMenuItem,
939
+ xt as LuzmoMixin,
940
+ et as LuzmoMultiLangField,
941
+ it as LuzmoNumberField,
942
+ st as LuzmoOption,
943
+ nt as LuzmoOptions,
944
+ lt as LuzmoOptionsDivider,
945
+ Be as LuzmoOverlay,
946
+ ct as LuzmoOverlayTrigger,
947
+ We as LuzmoPicker,
948
+ Ke as LuzmoPickerBase,
949
+ vt as LuzmoPickerButton,
950
+ Je as LuzmoPopover,
951
+ Xe as LuzmoProgressCircle,
952
+ D as LuzmoPromptBox,
953
+ Et as LuzmoRadio,
954
+ $t as LuzmoRadioGroup,
955
+ Bt as LuzmoSearch,
956
+ It as LuzmoSelect,
957
+ Dt as LuzmoSlider,
958
+ Mt as LuzmoSwatch,
959
+ Ut as LuzmoSwatchGroup,
960
+ Nt as LuzmoSwitch,
961
+ qt as LuzmoTab,
962
+ Ht as LuzmoTabPanel,
963
+ Gt as LuzmoTabs,
964
+ jt as LuzmoTabsOverflow,
965
+ Lt as LuzmoTag,
966
+ Rt as LuzmoTags,
967
+ or as LuzmoTextField,
968
+ Kt as LuzmoToast,
969
+ Jt as LuzmoTooltip,
970
+ ot as MenuItemAddedOrUpdatedEvent,
971
+ ut as OverlayTriggerDirective,
972
+ Fe as PlacementController,
973
+ Ie as SAFARI_FOCUS_RING_CLASS,
974
+ F as SizedMixin,
975
+ dt as SlottableRequestDirective,
976
+ qe as SlottableRequestEvent,
977
+ mt as VIRTUALIZE_AS_OF_NUM_ITEMS,
978
+ Te as VirtualTrigger,
979
+ _ as VoiceRecorder,
980
+ De as guaranteedAllTransitionend,
981
+ ee as isAndroid,
982
+ re as isAppleDevice,
983
+ ie as isChrome,
984
+ ae as isFirefox,
985
+ se as isIOS,
986
+ ne as isIPad,
987
+ le as isIPhone,
988
+ me as isMac,
989
+ pe as isSeamonkey,
990
+ ce as isWebKit,
991
+ Pe as lastInteractionType,
992
+ Me as nextFrame,
993
+ Ue as noop,
994
+ ht as openOverlay,
995
+ Oe as overlayTimer,
996
+ Ne as placementUpdatedSymbol,
997
+ He as removeSlottableRequest,
998
+ bt as slottableRequest,
999
+ de as streamingListener,
1000
+ gt as trigger
196
1001
  };