@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.
- package/components/accordion/index.cjs +1 -1
- package/components/accordion/index.js +2 -2
- package/components/action-bar/index.cjs +1 -1
- package/components/action-bar/index.js +5 -5
- package/components/action-button/index.cjs +1 -1
- package/components/action-button/index.js +1 -1
- package/components/action-group/index.cjs +1 -1
- package/components/action-group/index.js +1 -1
- package/components/{action-group-Bwt9w8Vh.js → action-group-CqAXlI_I.js} +1 -1
- package/components/{action-group-D917z7XF.cjs → action-group-_gt0SxJg.cjs} +1 -1
- package/components/action-menu/index.cjs +1 -1
- package/components/action-menu/index.js +1 -1
- package/components/avatar/index.cjs +1 -1
- package/components/avatar/index.js +1 -1
- package/components/{base-CdYjmV_8.js → base-BUViEg_7.js} +10 -10
- package/components/{base-5nDSSNeT.cjs → base-DxRGeCrb.cjs} +1 -1
- package/components/button/index.cjs +1 -1
- package/components/button/index.js +3 -3
- package/components/{button-base-BdzHcHRs.cjs → button-base-D-gp73uZ.cjs} +1 -1
- package/components/{button-base-B_SkfcFn.js → button-base-npzdrTiY.js} +1 -1
- package/components/button-group/index.cjs +1 -1
- package/components/button-group/index.js +1 -1
- package/components/calendar/index.cjs +1 -1
- package/components/calendar/index.js +1 -1
- package/components/chat-message/chat-message.d.ts +5 -0
- package/components/chat-message/index.cjs +12 -12
- package/components/chat-message/index.js +6 -3
- package/components/chat-message-group/index.cjs +1 -1
- package/components/chat-message-group/index.js +1 -1
- package/components/checkbox/checkbox.d.ts +5 -0
- package/components/checkbox/index.cjs +2 -2
- package/components/checkbox/index.js +10 -7
- package/components/{close-button-Decm0Qbb.cjs → close-button-CSGamYgn.cjs} +1 -1
- package/components/{close-button-CGZxCNlI.js → close-button-po7k74tH.js} +1 -1
- package/components/color-area/index.cjs +1 -1
- package/components/color-area/index.js +2 -2
- package/components/color-field/index.cjs +1 -1
- package/components/color-field/index.js +1 -1
- package/components/color-handle/index.cjs +1 -1
- package/components/color-handle/index.js +2 -2
- package/components/color-loupe/index.cjs +1 -1
- package/components/color-loupe/index.js +1 -1
- package/components/{color-loupe-CIEFp7ln.cjs → color-loupe-Dta8u4pX.cjs} +1 -1
- package/components/{color-loupe-CLPX6xVb.js → color-loupe-OvalnSmN.js} +1 -1
- package/components/color-menu/index.cjs +1 -1
- package/components/color-menu/index.js +1 -1
- package/components/color-palette/index.cjs +1 -1
- package/components/color-palette/index.js +1 -1
- package/components/color-palette-group/index.cjs +1 -1
- package/components/color-palette-group/index.js +1 -1
- package/components/color-picker/index.cjs +1 -1
- package/components/color-picker/index.js +1 -1
- package/components/color-slider/index.cjs +1 -1
- package/components/color-slider/index.js +2 -2
- package/components/date-time-picker/index.cjs +1 -1
- package/components/date-time-picker/index.js +1 -1
- package/components/divider/index.cjs +1 -1
- package/components/divider/index.js +1 -1
- package/components/field-group/index.cjs +1 -1
- package/components/field-group/index.js +1 -1
- package/components/{field-group-CHmw159R.js → field-group-GZLR5GAn.js} +1 -1
- package/components/{field-group-BYHNJmv0.cjs → field-group-aG9hVBjA.cjs} +1 -1
- package/components/field-label/index.cjs +1 -1
- package/components/field-label/index.js +1 -1
- package/components/{field-label-Cy3xMWZ-.js → field-label-BxW2RJMY.js} +1 -1
- package/components/{field-label-DZoeqJJX.cjs → field-label-CYC-u_Cq.cjs} +1 -1
- package/components/{focusable-BjvsvVam.js → focusable-BM1nd-dI.js} +1 -1
- package/components/{focusable-CbVKgGfS.cjs → focusable-agUxU61W.cjs} +1 -1
- package/components/icon/index.cjs +1 -1
- package/components/icon/index.js +1 -1
- package/components/index.cjs +1 -205
- package/components/index.js +174 -972
- package/components/infield-button/index.cjs +1 -1
- package/components/infield-button/index.js +1 -1
- package/components/label/index.cjs +1 -1
- package/components/label/index.js +1 -1
- package/components/{language-resolution-EUER43cg.cjs → language-resolution-DmX3Wy5I.cjs} +1 -1
- package/components/{language-resolution-B-wjV5bb.js → language-resolution-pYd-sAaw.js} +1 -1
- package/components/menu/index.cjs +2 -2
- package/components/menu/index.js +3 -3
- package/components/multi-language-field/index.cjs +1 -1
- package/components/multi-language-field/index.js +1 -1
- package/components/number-field/index.cjs +1 -1
- package/components/number-field/index.js +2 -2
- package/components/options/index.cjs +1 -1
- package/components/options/index.js +2 -2
- package/components/overlay/index.cjs +1 -1
- package/components/overlay/index.js +3 -3
- package/components/{overlay-BhrVS5h7.cjs → overlay-BTNKxbrJ.cjs} +1 -1
- package/components/{overlay-C-No3oJQ.js → overlay-CXkoVtnB.js} +1 -1
- package/components/{pending-state-DQctFHI8.cjs → pending-state-DBfiIiwY.cjs} +1 -1
- package/components/{pending-state-Dx1u3EXA.js → pending-state-DG9TpsGT.js} +1 -1
- package/components/picker/index.cjs +1 -1
- package/components/picker/index.js +2 -2
- package/components/{picker-DxYgh4LR.cjs → picker-B2_mjftE.cjs} +1 -1
- package/components/{picker-GyeSAxxY.js → picker-DbOS1rE7.js} +4 -4
- package/components/picker-button/index.cjs +1 -1
- package/components/picker-button/index.js +1 -1
- package/components/popover/index.cjs +1 -1
- package/components/popover/index.js +1 -1
- package/components/{popover-lcZnODPK.cjs → popover-CPZ51K_z.cjs} +1 -1
- package/components/{popover-ucIgjbQs.js → popover-UFgI7b75.js} +1 -1
- package/components/progress-circle/index.cjs +1 -1
- package/components/progress-circle/index.js +1 -1
- package/components/{progress-circle-DgMbqrzG.cjs → progress-circle-BMRjGc4y.cjs} +1 -1
- package/components/{progress-circle-D5J0ZwY0.js → progress-circle-unckklsi.js} +1 -1
- package/components/prompt-box/index.cjs +222 -0
- package/components/prompt-box/index.js +832 -0
- package/components/radio/index.cjs +1 -1
- package/components/radio/index.js +2 -2
- package/components/search/index.cjs +1 -1
- package/components/search/index.js +1 -1
- package/components/select/index.cjs +1 -1
- package/components/select/index.js +2 -2
- package/components/slider/index.cjs +1 -1
- package/components/slider/index.js +1 -1
- package/components/swatch/index.cjs +1 -1
- package/components/swatch/index.js +2 -2
- package/components/switch/index.cjs +1 -1
- package/components/switch/index.js +1 -1
- package/components/tabs/index.cjs +1 -1
- package/components/tabs/index.js +2 -2
- package/components/tags/index.cjs +4 -4
- package/components/tags/index.js +3 -3
- package/components/text-field/index.cjs +1 -1
- package/components/text-field/index.js +2 -2
- package/components/{text-field-DFP7p8Rv.cjs → text-field-CclDsK1X.cjs} +1 -1
- package/components/{text-field-BHaLKkf1.js → text-field-Ckbe58fH.js} +1 -1
- package/components/toast/index.cjs +1 -1
- package/components/toast/index.js +2 -2
- package/components/tooltip/index.cjs +1 -1
- package/components/tooltip/index.js +1 -1
- package/components/utils.cjs +1 -1
- package/components/utils.js +2 -2
- package/custom-elements.json +1 -1
- package/package.json +1 -1
package/components/index.js
CHANGED
|
@@ -15,987 +15,189 @@
|
|
|
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
|
|
19
|
-
import { LuzmoActionBar as
|
|
20
|
-
import { LuzmoActionButton as
|
|
18
|
+
import { LuzmoAccordion as n, 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";
|
|
21
21
|
import "./action-group/index.js";
|
|
22
|
-
import { LuzmoActionMenu as
|
|
23
|
-
import { LuzmoAvatar as
|
|
24
|
-
import { LuzmoButton as
|
|
25
|
-
import { LuzmoButtonGroup as
|
|
26
|
-
import { LuzmoCalendar as
|
|
27
|
-
import { LuzmoChatMessage as
|
|
28
|
-
import { LuzmoChatMessageGroup as
|
|
29
|
-
import { LuzmoCheckbox as
|
|
30
|
-
import { LuzmoColorArea as
|
|
31
|
-
import { LuzmoColorField as
|
|
32
|
-
import { LuzmoColorHandle as
|
|
22
|
+
import { LuzmoActionMenu as g } from "./action-menu/index.js";
|
|
23
|
+
import { LuzmoAvatar as h } from "./avatar/index.js";
|
|
24
|
+
import { LuzmoButton as S, LuzmoClearButton as y } from "./button/index.js";
|
|
25
|
+
import { LuzmoButtonGroup as I } from "./button-group/index.js";
|
|
26
|
+
import { LuzmoCalendar as k } from "./calendar/index.js";
|
|
27
|
+
import { LuzmoChatMessage as A } from "./chat-message/index.js";
|
|
28
|
+
import { LuzmoChatMessageGroup as M } from "./chat-message-group/index.js";
|
|
29
|
+
import { LuzmoCheckbox as F } from "./checkbox/index.js";
|
|
30
|
+
import { LuzmoColorArea as B } from "./color-area/index.js";
|
|
31
|
+
import { LuzmoColorField as G } from "./color-field/index.js";
|
|
32
|
+
import { LuzmoColorHandle as _ } from "./color-handle/index.js";
|
|
33
33
|
import "./color-loupe/index.js";
|
|
34
|
-
import { LuzmoColorMenu as
|
|
35
|
-
import { LuzmoColorPalette as
|
|
36
|
-
import { LuzmoColorPaletteGroup as
|
|
37
|
-
import { LuzmoColorPicker as
|
|
38
|
-
import { LuzmoColorSlider as
|
|
39
|
-
import { LuzmoDateTimePicker as
|
|
40
|
-
import { LuzmoDivider as
|
|
34
|
+
import { LuzmoColorMenu as U } from "./color-menu/index.js";
|
|
35
|
+
import { LuzmoColorPalette as H } from "./color-palette/index.js";
|
|
36
|
+
import { LuzmoColorPaletteGroup as j } from "./color-palette-group/index.js";
|
|
37
|
+
import { LuzmoColorPicker as W } from "./color-picker/index.js";
|
|
38
|
+
import { LuzmoColorSlider as J } from "./color-slider/index.js";
|
|
39
|
+
import { LuzmoDateTimePicker as X } from "./date-time-picker/index.js";
|
|
40
|
+
import { LuzmoDivider as $ } from "./divider/index.js";
|
|
41
41
|
import "./field-group/index.js";
|
|
42
42
|
import "./field-label/index.js";
|
|
43
|
-
import { LuzmoIcon as
|
|
44
|
-
import { LuzmoInfieldButton as
|
|
45
|
-
import { LuzmoLabel as
|
|
46
|
-
import { LuzmoMenu as
|
|
47
|
-
import { LuzmoMultiLangField as
|
|
48
|
-
import { LuzmoNumberField as
|
|
49
|
-
import { LuzmoOption as
|
|
50
|
-
import { LuzmoOverlayTrigger as
|
|
43
|
+
import { LuzmoIcon as ro } from "./icon/index.js";
|
|
44
|
+
import { LuzmoInfieldButton as lo } from "./infield-button/index.js";
|
|
45
|
+
import { LuzmoLabel as to } from "./label/index.js";
|
|
46
|
+
import { LuzmoMenu as ao, LuzmoMenuDivider as io, LuzmoMenuGroup as zo, LuzmoMenuItem as so, MenuItemAddedOrUpdatedEvent as no } from "./menu/index.js";
|
|
47
|
+
import { LuzmoMultiLangField as po } from "./multi-language-field/index.js";
|
|
48
|
+
import { LuzmoNumberField as xo } from "./number-field/index.js";
|
|
49
|
+
import { LuzmoOption as go, LuzmoOptions as Lo, LuzmoOptionsDivider as ho, VIRTUALIZE_AS_OF_NUM_ITEMS as vo } from "./options/index.js";
|
|
50
|
+
import { LuzmoOverlayTrigger as yo, OverlayTriggerDirective as Co, SlottableRequestDirective as Io, openOverlay as To, slottableRequest as ko, trigger as wo } from "./overlay/index.js";
|
|
51
51
|
import "./picker/index.js";
|
|
52
|
-
import { LuzmoPickerButton as
|
|
52
|
+
import { LuzmoPickerButton as Po } from "./picker-button/index.js";
|
|
53
53
|
import "./popover/index.js";
|
|
54
54
|
import "./progress-circle/index.js";
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
58
|
-
import {
|
|
59
|
-
import {
|
|
60
|
-
import {
|
|
61
|
-
import {
|
|
62
|
-
import {
|
|
63
|
-
import {
|
|
64
|
-
import {
|
|
65
|
-
import {
|
|
66
|
-
import {
|
|
67
|
-
import {
|
|
68
|
-
import {
|
|
69
|
-
import {
|
|
70
|
-
import {
|
|
71
|
-
import {
|
|
72
|
-
import {
|
|
73
|
-
import {
|
|
74
|
-
import {
|
|
75
|
-
import {
|
|
76
|
-
import {
|
|
77
|
-
import {
|
|
78
|
-
import {
|
|
79
|
-
import { L as
|
|
80
|
-
import {
|
|
81
|
-
import { L as
|
|
82
|
-
import {
|
|
83
|
-
import { L as
|
|
84
|
-
import {
|
|
85
|
-
|
|
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 = () => {
|
|
55
|
+
import { LuzmoPromptBox as Oo } from "./prompt-box/index.js";
|
|
56
|
+
import { LuzmoRadio as Ro, LuzmoRadioGroup as Bo } from "./radio/index.js";
|
|
57
|
+
import { LuzmoSearch as Go } from "./search/index.js";
|
|
58
|
+
import { LuzmoSelect as _o } from "./select/index.js";
|
|
59
|
+
import { LuzmoSlider as Uo } from "./slider/index.js";
|
|
60
|
+
import { LuzmoSwatch as Ho, LuzmoSwatchGroup as qo } from "./swatch/index.js";
|
|
61
|
+
import { LuzmoSwitch as Ko } from "./switch/index.js";
|
|
62
|
+
import { LuzmoTab as Zo, LuzmoTabPanel as Jo, LuzmoTabs as Qo, LuzmoTabsOverflow as Xo } from "./tabs/index.js";
|
|
63
|
+
import { LuzmoTag as $o, LuzmoTags as or } from "./tags/index.js";
|
|
64
|
+
import { LuzmoHelpText as er } from "./text-field/index.js";
|
|
65
|
+
import { LuzmoToast as mr } from "./toast/index.js";
|
|
66
|
+
import { LuzmoTooltip as ur } from "./tooltip/index.js";
|
|
67
|
+
import { a as ir, L as zr } from "./base-BUViEg_7.js";
|
|
68
|
+
import { F as nr } from "./focus-visible-BvScGDCE.js";
|
|
69
|
+
import { F as pr } from "./focusable-BM1nd-dI.js";
|
|
70
|
+
import { j as dr, d as xr, e as br, h as gr, c as Lr, b as hr, a as vr, i as Sr, g as yr, f as Cr } from "./platform-CqwNrovd.js";
|
|
71
|
+
import { E as Tr, S as kr } from "./sized-mixin-cJbo3PKR.js";
|
|
72
|
+
import { s as Ar } from "./streaming-listener-BlWm-XZU.js";
|
|
73
|
+
import { V as Mr } from "./voice-recorder-BRq_gEkz.js";
|
|
74
|
+
import { L as Fr } from "./action-group-CqAXlI_I.js";
|
|
75
|
+
import { L as Br } from "./close-button-po7k74tH.js";
|
|
76
|
+
import { L as Gr } from "./color-loupe-OvalnSmN.js";
|
|
77
|
+
import { L as _r } from "./field-group-GZLR5GAn.js";
|
|
78
|
+
import { L as Ur } from "./field-label-BxW2RJMY.js";
|
|
79
|
+
import { C as Hr, H as qr, b as jr, I as Kr, c as Wr, d as Zr, L as Jr, e as Qr, P as Xr, S as Yr, V as $r, g as oe, l as re, a as ee, n as le, o as me, p as te } from "./overlay-CXkoVtnB.js";
|
|
80
|
+
import { S as ae, r as ie } from "./slottable-request-event-DggLA4Rx.js";
|
|
81
|
+
import { D as se, a as ne, L as ce } from "./picker-DbOS1rE7.js";
|
|
82
|
+
import { LuzmoPopover as fe } from "./popover-UFgI7b75.js";
|
|
83
|
+
import { L as xe } from "./progress-circle-unckklsi.js";
|
|
84
|
+
import { L as ge } from "./text-field-Ckbe58fH.js";
|
|
85
|
+
const r = () => {
|
|
91
86
|
if (typeof document < "u" && !document.querySelector("style[data-luzmo-vars]")) {
|
|
92
|
-
const
|
|
93
|
-
|
|
87
|
+
const o = document.createElement("style");
|
|
88
|
+
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-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(o);
|
|
94
89
|
}
|
|
95
90
|
};
|
|
96
|
-
|
|
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);
|
|
91
|
+
r();
|
|
890
92
|
export {
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
93
|
+
Hr as ClickController,
|
|
94
|
+
se as DESCRIPTION_ID,
|
|
95
|
+
Tr as ElementSizes,
|
|
96
|
+
nr as FocusVisiblePolyfillMixin,
|
|
97
|
+
pr as Focusable,
|
|
98
|
+
qr as HoverController,
|
|
99
|
+
jr as InteractionController,
|
|
100
|
+
Kr as InteractionTypes,
|
|
101
|
+
Wr as LONGPRESS_INSTRUCTIONS,
|
|
102
|
+
Zr as LongpressController,
|
|
103
|
+
Jr as LuzmoAbstractOverlay,
|
|
104
|
+
n as LuzmoAccordion,
|
|
105
|
+
c as LuzmoAccordionItem,
|
|
106
|
+
f as LuzmoActionBar,
|
|
107
|
+
x as LuzmoActionButton,
|
|
108
|
+
Fr as LuzmoActionGroup,
|
|
109
|
+
g as LuzmoActionMenu,
|
|
110
|
+
h as LuzmoAvatar,
|
|
111
|
+
S as LuzmoButton,
|
|
112
|
+
I as LuzmoButtonGroup,
|
|
113
|
+
k as LuzmoCalendar,
|
|
114
|
+
A as LuzmoChatMessage,
|
|
115
|
+
M as LuzmoChatMessageGroup,
|
|
116
|
+
F as LuzmoCheckbox,
|
|
117
|
+
y as LuzmoClearButton,
|
|
118
|
+
Br as LuzmoCloseButton,
|
|
119
|
+
B as LuzmoColorArea,
|
|
120
|
+
G as LuzmoColorField,
|
|
121
|
+
_ as LuzmoColorHandle,
|
|
122
|
+
Gr as LuzmoColorLoupe,
|
|
123
|
+
U as LuzmoColorMenu,
|
|
124
|
+
H as LuzmoColorPalette,
|
|
125
|
+
j as LuzmoColorPaletteGroup,
|
|
126
|
+
W as LuzmoColorPicker,
|
|
127
|
+
J as LuzmoColorSlider,
|
|
128
|
+
X as LuzmoDateTimePicker,
|
|
129
|
+
$ as LuzmoDivider,
|
|
130
|
+
ir as LuzmoElement,
|
|
131
|
+
_r as LuzmoFieldGroup,
|
|
132
|
+
Ur as LuzmoFieldLabel,
|
|
133
|
+
er as LuzmoHelpText,
|
|
134
|
+
ro as LuzmoIcon,
|
|
135
|
+
lo as LuzmoInfieldButton,
|
|
136
|
+
to as LuzmoLabel,
|
|
137
|
+
ao as LuzmoMenu,
|
|
138
|
+
io as LuzmoMenuDivider,
|
|
139
|
+
zo as LuzmoMenuGroup,
|
|
140
|
+
so as LuzmoMenuItem,
|
|
141
|
+
zr as LuzmoMixin,
|
|
142
|
+
po as LuzmoMultiLangField,
|
|
143
|
+
xo as LuzmoNumberField,
|
|
144
|
+
go as LuzmoOption,
|
|
145
|
+
Lo as LuzmoOptions,
|
|
146
|
+
ho as LuzmoOptionsDivider,
|
|
147
|
+
Qr as LuzmoOverlay,
|
|
148
|
+
yo as LuzmoOverlayTrigger,
|
|
149
|
+
ne as LuzmoPicker,
|
|
150
|
+
ce as LuzmoPickerBase,
|
|
151
|
+
Po as LuzmoPickerButton,
|
|
152
|
+
fe as LuzmoPopover,
|
|
153
|
+
xe as LuzmoProgressCircle,
|
|
154
|
+
Oo as LuzmoPromptBox,
|
|
155
|
+
Ro as LuzmoRadio,
|
|
156
|
+
Bo as LuzmoRadioGroup,
|
|
157
|
+
Go as LuzmoSearch,
|
|
158
|
+
_o as LuzmoSelect,
|
|
159
|
+
Uo as LuzmoSlider,
|
|
160
|
+
Ho as LuzmoSwatch,
|
|
161
|
+
qo as LuzmoSwatchGroup,
|
|
162
|
+
Ko as LuzmoSwitch,
|
|
163
|
+
Zo as LuzmoTab,
|
|
164
|
+
Jo as LuzmoTabPanel,
|
|
165
|
+
Qo as LuzmoTabs,
|
|
166
|
+
Xo as LuzmoTabsOverflow,
|
|
167
|
+
$o as LuzmoTag,
|
|
168
|
+
or as LuzmoTags,
|
|
169
|
+
ge as LuzmoTextField,
|
|
170
|
+
mr as LuzmoToast,
|
|
171
|
+
ur as LuzmoTooltip,
|
|
172
|
+
no as MenuItemAddedOrUpdatedEvent,
|
|
173
|
+
Co as OverlayTriggerDirective,
|
|
174
|
+
Xr as PlacementController,
|
|
175
|
+
Yr as SAFARI_FOCUS_RING_CLASS,
|
|
176
|
+
kr as SizedMixin,
|
|
177
|
+
Io as SlottableRequestDirective,
|
|
178
|
+
ae as SlottableRequestEvent,
|
|
179
|
+
vo as VIRTUALIZE_AS_OF_NUM_ITEMS,
|
|
180
|
+
$r as VirtualTrigger,
|
|
181
|
+
Mr as VoiceRecorder,
|
|
182
|
+
oe as guaranteedAllTransitionend,
|
|
183
|
+
dr as isAndroid,
|
|
184
|
+
xr as isAppleDevice,
|
|
185
|
+
br as isChrome,
|
|
186
|
+
gr as isFirefox,
|
|
187
|
+
Lr as isIOS,
|
|
188
|
+
hr as isIPad,
|
|
189
|
+
vr as isIPhone,
|
|
190
|
+
Sr as isMac,
|
|
191
|
+
yr as isSeamonkey,
|
|
192
|
+
Cr as isWebKit,
|
|
193
|
+
re as lastInteractionType,
|
|
194
|
+
ee as nextFrame,
|
|
195
|
+
le as noop,
|
|
196
|
+
To as openOverlay,
|
|
197
|
+
me as overlayTimer,
|
|
198
|
+
te as placementUpdatedSymbol,
|
|
199
|
+
ie as removeSlottableRequest,
|
|
200
|
+
ko as slottableRequest,
|
|
201
|
+
Ar as streamingListener,
|
|
202
|
+
wo as trigger
|
|
1001
203
|
};
|