@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
@@ -0,0 +1,326 @@
1
+ import { CSSResultArray, PropertyValues, TemplateResult } from 'lit';
2
+ import { LuzmoElement } from '../../utils/base';
3
+ import '../action-button';
4
+ import '../button';
5
+ import '../button/clear-button';
6
+ import '../icon';
7
+ import '../tags';
8
+ import '../text-field';
9
+ export interface ActionValue {
10
+ element: Element;
11
+ name?: string;
12
+ value?: unknown;
13
+ checked?: boolean;
14
+ }
15
+ export interface PromptBoxAttachment {
16
+ file: File;
17
+ id: string;
18
+ previewUrl?: string;
19
+ }
20
+ export interface PromptBoxSubmitDetail {
21
+ value: string;
22
+ topActions: Element[];
23
+ bottomActions: Element[];
24
+ actionValues: ActionValue[];
25
+ attachments: PromptBoxAttachment[];
26
+ }
27
+ declare const LuzmoPromptBox_base: typeof LuzmoElement & {
28
+ new (...args: any[]): import("../..").SizedElementInterface;
29
+ prototype: import("../..").SizedElementInterface;
30
+ };
31
+ /**
32
+ * A prompt box component for chat/AI interfaces with text input and action slots.
33
+ *
34
+ * @element luzmo-prompt-box
35
+ *
36
+ * @slot - Default slot for additional content
37
+ * @slot top-actions - Slot for action buttons displayed above the input
38
+ * @slot bottom-actions - Slot for action buttons displayed below the input
39
+ * @slot record-button - Slot for a custom record/voice button
40
+ * @slot submit-button - Slot for a custom submit button
41
+ *
42
+ * @fires luzmo-submit - Fired when the prompt is submitted. Detail contains value and slotted actions state.
43
+ */
44
+ export declare class LuzmoPromptBox extends LuzmoPromptBox_base {
45
+ static get styles(): CSSResultArray;
46
+ /**
47
+ * The number of visible text rows for the textarea.
48
+ * @attr rows
49
+ */
50
+ rows: number;
51
+ /**
52
+ * Whether the textarea should grow to accommodate content.
53
+ * @attr grows
54
+ */
55
+ grows: boolean;
56
+ /**
57
+ * Whether to show the record/voice button.
58
+ * @attr recording
59
+ */
60
+ recording: boolean;
61
+ /**
62
+ * Whether the submit button is hidden.
63
+ * @attr hide-submit
64
+ */
65
+ hideSubmit: boolean;
66
+ /**
67
+ * Placeholder text for the input.
68
+ * @attr placeholder
69
+ */
70
+ placeholder: string;
71
+ /**
72
+ * The current value of the input.
73
+ * @attr value
74
+ */
75
+ value: string;
76
+ /**
77
+ * Whether the prompt box is disabled.
78
+ * When true: textarea is readonly, all interactive children in slots are disabled.
79
+ * @attr disabled
80
+ */
81
+ disabled: boolean;
82
+ /**
83
+ * Whether the input is readonly.
84
+ * @attr readonly
85
+ */
86
+ readonly: boolean;
87
+ /**
88
+ * Maximum number of characters allowed.
89
+ * @attr maxlength
90
+ */
91
+ maxlength: number;
92
+ /**
93
+ * Whether the prompt box is in a pending/loading state.
94
+ * When true: submit button shows pending, other actions are readonly (not disabled), textarea is readonly.
95
+ * @attr pending
96
+ */
97
+ pending: boolean;
98
+ /**
99
+ * Whether to allow image attachments (via paste or programmatically).
100
+ * @attr allow-images
101
+ */
102
+ allowImages: boolean;
103
+ /**
104
+ * Whether to allow file attachments.
105
+ * @attr allow-files
106
+ */
107
+ allowFiles: boolean;
108
+ /**
109
+ * Accepted file types for attachments.
110
+ * Can be MIME types (e.g., 'image/*', 'application/pdf') or file extensions (e.g., '.pdf', '.docx').
111
+ * @attr accepted-file-types
112
+ */
113
+ acceptedFileTypes: string[];
114
+ /**
115
+ * Whether the prompt box has a top-actions slot.
116
+ * @private
117
+ */
118
+ private _hasTopActions;
119
+ /**
120
+ * Whether the prompt box has a bottom-actions slot.
121
+ * @private
122
+ */
123
+ private _hasBottomActions;
124
+ /**
125
+ * Whether the prompt box has a custom record-button slot.
126
+ * @private
127
+ */
128
+ private _hasRecordButton;
129
+ /**
130
+ * Whether the prompt box has a custom submit-button slot.
131
+ * @private
132
+ */
133
+ private _hasSubmitButton;
134
+ /**
135
+ * List of attachments (files and images).
136
+ * @private
137
+ */
138
+ private _attachments;
139
+ /**
140
+ * Whether the component is currently recording audio.
141
+ * @private
142
+ */
143
+ private _isRecording;
144
+ /**
145
+ * Current recording duration in milliseconds.
146
+ * @private
147
+ */
148
+ private _recordingDuration;
149
+ /**
150
+ * Current audio level for waveform visualization (0-1).
151
+ * @private
152
+ */
153
+ private _audioLevel;
154
+ /**
155
+ * Voice recorder instance.
156
+ * @private
157
+ */
158
+ private _voiceRecorder;
159
+ /**
160
+ * Whether to focus the finish button after render.
161
+ * @private
162
+ */
163
+ private _shouldFocusFinishButton;
164
+ private _inputElement;
165
+ private _fileInput;
166
+ private _finishRecordingButton;
167
+ private _attachmentIdCounter;
168
+ /**
169
+ * Get the appropriate tag size based on the prompt box size.
170
+ * Tags are one level smaller than the prompt box, with 's' being the minimum.
171
+ * @private
172
+ */
173
+ private get _tagSize();
174
+ connectedCallback(): void;
175
+ disconnectedCallback(): void;
176
+ private _revokeAllPreviewUrls;
177
+ private _handleHostFocus;
178
+ private _handleHostBlur;
179
+ private _handleTopActionsSlotChange;
180
+ private _handleBottomActionsSlotChange;
181
+ private _handleRecordButtonSlotChange;
182
+ private _handleSubmitButtonSlotChange;
183
+ private _handleInput;
184
+ private _handleKeydown;
185
+ private _handlePaste;
186
+ private _handleFileInputChange;
187
+ private _isFileTypeAccepted;
188
+ private _isImageFile;
189
+ private _generateAttachmentId;
190
+ /**
191
+ * Add files as attachments.
192
+ * @param files - Array of File objects to add
193
+ * @returns Array of added attachment IDs
194
+ */
195
+ addFiles(files: File[]): string[];
196
+ /**
197
+ * Remove an attachment by its ID.
198
+ * @param id - The attachment ID to remove
199
+ */
200
+ removeAttachment(id: string): void;
201
+ /**
202
+ * Clear all attachments.
203
+ */
204
+ clearAttachments(): void;
205
+ /**
206
+ * Get all current attachments.
207
+ */
208
+ getAttachments(): PromptBoxAttachment[];
209
+ /**
210
+ * Open the file picker dialog.
211
+ */
212
+ openFilePicker(): void;
213
+ private _handleRemoveAttachment;
214
+ private _handleTagDelete;
215
+ /**
216
+ * Extract values from interactive elements within a container.
217
+ * @private
218
+ */
219
+ private _extractActionValues;
220
+ private _submit;
221
+ private _handleRecordClick;
222
+ /**
223
+ * Start voice recording.
224
+ * @private
225
+ */
226
+ private _startRecording;
227
+ /**
228
+ * Stop voice recording.
229
+ * @private
230
+ */
231
+ private _stopRecording;
232
+ /**
233
+ * Cancel voice recording without emitting the result.
234
+ * @private
235
+ */
236
+ private _cancelRecording;
237
+ /**
238
+ * Handle cancel recording button click.
239
+ * @private
240
+ */
241
+ private _handleCancelRecordClick;
242
+ /**
243
+ * Initialize voice recorder with callbacks.
244
+ * @private
245
+ */
246
+ private _initVoiceRecorder;
247
+ /**
248
+ * Destroy voice recorder and clean up.
249
+ * @private
250
+ */
251
+ private _destroyVoiceRecorder;
252
+ /**
253
+ * Format recording duration for display.
254
+ * @private
255
+ */
256
+ private _formatRecordingDuration;
257
+ /**
258
+ * Focus the input element.
259
+ */
260
+ focus(): void;
261
+ /**
262
+ * Clear the input value and all attachments.
263
+ */
264
+ clear(): void;
265
+ /**
266
+ * Get the slotted top actions elements.
267
+ */
268
+ getTopActions(): Element[];
269
+ /**
270
+ * Get the slotted bottom actions elements.
271
+ */
272
+ getBottomActions(): Element[];
273
+ protected updated(changedProperties: PropertyValues): void;
274
+ /**
275
+ * Selector for interactive elements that should be disabled.
276
+ * @private
277
+ */
278
+ private static readonly INTERACTIVE_ELEMENTS_SELECTOR;
279
+ /**
280
+ * Find all interactive children within an element (including the element itself if it matches).
281
+ * @private
282
+ */
283
+ private _getInteractiveElements;
284
+ /**
285
+ * Update the state of slotted elements based on disabled and pending properties.
286
+ * When disabled: set disabled attribute
287
+ * When pending: set readonly attribute (not disabled)
288
+ * @private
289
+ */
290
+ private _updateSlottedElementsState;
291
+ private renderTopActions;
292
+ private renderBottomActions;
293
+ private renderRecordButton;
294
+ private renderWaveform;
295
+ private renderSubmitButton;
296
+ private renderTextarea;
297
+ private _getAcceptAttribute;
298
+ private renderHiddenFileInput;
299
+ private renderImageAttachment;
300
+ private renderFileAttachment;
301
+ private renderAttachments;
302
+ protected render(): TemplateResult;
303
+ }
304
+ export interface PromptBoxRecordingCompleteDetail {
305
+ audioBlob: Blob;
306
+ duration: number;
307
+ mimeType: string;
308
+ }
309
+ export interface PromptBoxRecordErrorDetail {
310
+ error: string;
311
+ }
312
+ declare global {
313
+ interface GlobalEventHandlersEventMap {
314
+ 'luzmo-submit': CustomEvent<PromptBoxSubmitDetail>;
315
+ 'luzmo-record': CustomEvent<{
316
+ isRecording: boolean;
317
+ }>;
318
+ 'luzmo-recording-complete': CustomEvent<PromptBoxRecordingCompleteDetail>;
319
+ 'luzmo-record-cancel': CustomEvent<void>;
320
+ 'luzmo-record-error': CustomEvent<PromptBoxRecordErrorDetail>;
321
+ 'luzmo-attachments-change': CustomEvent<{
322
+ attachments: PromptBoxAttachment[];
323
+ }>;
324
+ }
325
+ }
326
+ export {};
@@ -15,8 +15,8 @@
15
15
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
16
16
  * SOFTWARE.
17
17
  * */
18
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../base-CBCg3yyw.cjs"),h=require("../focus-visible-B0P9aY_G.cjs"),b=require("../sized-mixin-CPxE5C96.cjs"),v=require("../query-assigned-nodes-BcKWmGzy.cjs"),p=require("../roving-tabindex-By_fCy_e.cjs"),m=require("../field-group-DkGst3r5.cjs"),f='@media (forced-colors: active){:host{--highcontrast-radio-neutral-content-color: CanvasText;--highcontrast-radio-neutral-content-color-hover: CanvasText;--highcontrast-radio-neutral-content-color-down: CanvasText;--highcontrast-radio-neutral-content-color-focus: CanvasText;--highcontrast-radio-button-border-color-default: ButtonText;--highcontrast-radio-button-border-color-hover: Highlight;--highcontrast-radio-button-border-color-down: ButtonText;--highcontrast-radio-button-border-color-focus: Highlight;--highcontrast-radio-emphasized-accent-color: ButtonText;--highcontrast-radio-emphasized-accent-color-hover: Highlight;--highcontrast-radio-emphasized-accent-color-down: ButtonText;--highcontrast-radio-emphasized-accent-color-focus: Highlight;--highcontrast-radio-button-checked-border-color-default: Highlight;--highcontrast-radio-button-checked-border-color-hover: Highlight;--highcontrast-radio-button-checked-border-color-down: Highlight;--highcontrast-radio-button-checked-border-color-focus: Highlight;--highcontrast-radio-disabled-content-color: GrayText;--highcontrast-radio-disabled-border-color: GrayText;--highcontrast-radio-focus-indicator-color: CanvasText}#button:after{forced-color-adjust:none}}:host{vertical-align:top;min-block-size:var(--luzmo-radio-height, var(--radio-height));max-inline-size:100%;align-items:flex-start;display:inline-flex;position:relative;font-family:var(--luzmo-radio-font-family, var(--luzmo-font-family))}:host(:active) #button:before{border-color:var(--highcontrast-radio-button-border-color-down, var(--luzmo-radio-button-border-color-down, var(--radio-button-border-color-down)))}:host(:active[checked]) #input+#button:before{border-color:var(--highcontrast-radio-button-checked-border-color-down, var(--luzmo-radio-button-checked-border-color-down, var(--radio-button-checked-border-color-down)))}:host(:active) #label{color:var(--highcontrast-radio-neutral-content-color-down, var(--luzmo-radio-neutral-content-color-down, var(--radio-neutral-content-color-down)))}:host(:focus-visible) #button:before{border-color:var(--highcontrast-radio-button-border-color-focus, var(--luzmo-radio-button-border-color-focus, var(--radio-button-border-color-focus)))}:host(:focus-visible) #button:after{border-style:solid;border-color:var(--highcontrast-radio-focus-indicator-color, var(--luzmo-radio-focus-indicator-color, var(--radio-focus-indicator-color)));border-width:var(--luzmo-radio-focus-indicator-width, var(--radio-focus-indicator-width));inline-size:calc(var(--radio-button-control-size) + var(--radio-focus-indicator-gap) * 2);block-size:calc(var(--radio-button-control-size) + var(--radio-focus-indicator-gap) * 2)}:host(:focus-visible[checked]) #input+#button:before{border-color:var(--highcontrast-radio-button-checked-border-color-focus, var(--luzmo-radio-button-checked-border-color-focus, var(--radio-button-checked-border-color-focus)))}:host(:focus-visible) #label{color:var(--highcontrast-radio-neutral-content-color-focus, var(--luzmo-radio-neutral-content-color-focus, var(--radio-neutral-content-color-focus)))}:host([readonly]) #input:read-only{cursor:auto}:host([readonly]) #button{clip:rect(1px,1px,1px,1px);clip-path:inset(50%);position:fixed;inset-block-end:100%;inset-inline-end:100%}:host([readonly][checked][disabled]) #input~#label,:host([readonly][disabled]) #input~#label,:host([readonly]) #label{color:var(--highcontrast-radio-neutral-content-color, var(--luzmo-radio-neutral-content-color, var(--radio-neutral-content-color)));margin-inline-start:0}:host([emphasized][checked]) #input+#button:before{border-color:var(--highcontrast-radio-emphasized-accent-color, var(--luzmo-radio-emphasized-accent-color, var(--radio-emphasized-accent-color)))}@media (hover: hover){:host(:hover) #button:before{border-color:var(--highcontrast-radio-button-border-color-hover, var(--luzmo-radio-button-border-color-hover, var(--radio-button-border-color-hover)))}:host([checked]:hover) #input+#button:before{border-color:var(--highcontrast-radio-button-checked-border-color-hover, var(--luzmo-radio-button-checked-border-color-hover, var(--radio-button-checked-border-color-hover)))}:host(:hover) #label{color:var(--highcontrast-radio-neutral-content-color-hover, var(--luzmo-radio-neutral-content-color-hover, var(--radio-neutral-content-color-hover)))}:host([emphasized][checked]:hover) #input+#button:before{border-color:var(--highcontrast-radio-emphasized-accent-color-hover, var(--luzmo-radio-emphasized-accent-color-hover, var(--radio-emphasized-accent-color-hover)))}}:host([emphasized]:active[checked]) #input+#button:before{border-color:var(--highcontrast-radio-emphasized-accent-color-down, var(--luzmo-radio-emphasized-accent-color-down, var(--radio-emphasized-accent-color-down)))}:host([emphasized]:focus-visible[checked]) #input+#button:before{border-color:var(--highcontrast-radio-emphasized-accent-color-focus, var(--luzmo-radio-emphasized-accent-color-focus, var(--radio-emphasized-accent-color-focus)))}:host([checked][disabled]) #input+#button:before,:host([disabled]) #input+#button:before{border-color:var(--highcontrast-radio-disabled-border-color, var(--luzmo-radio-disabled-border-color, var(--radio-disabled-border-color)))}:host([checked][disabled]) #input~#label,:host([disabled]) #input~#label{color:var(--highcontrast-radio-disabled-content-color, var(--luzmo-radio-disabled-content-color, var(--radio-disabled-content-color)))}#input{font-family:inherit;font-size:100%;line-height:var(--luzmo-radio-line-height, var(--radio-line-height));box-sizing:border-box;inline-size:100%;block-size:100%;opacity:0;z-index:1;cursor:pointer;margin:0;padding:0;position:absolute;overflow:visible}:host([disabled]) #input{cursor:default}:host([checked]) #input+#button:before{border-width:calc(var(--radio-button-control-size) / 2 - var(--radio-button-selection-indicator) / 2);border-color:var(--highcontrast-radio-button-checked-border-color-default, var(--luzmo-radio-button-checked-border-color-default, var(--radio-button-checked-border-color-default)))}#input:focus-visible+#button:after{border-width:var(--luzmo-radio-focus-indicator-width, var(--radio-focus-indicator-width));border-color:var(--highcontrast-radio-focus-indicator-color, var(--luzmo-radio-focus-indicator-color, var(--radio-focus-indicator-color)));inline-size:calc(var(--radio-button-control-size) + var(--radio-focus-indicator-gap) * 2);block-size:calc(var(--radio-button-control-size) + var(--radio-focus-indicator-gap) * 2);border-style:solid}#label{text-align:start;font-size:var(--luzmo-radio-font-size, var(--radio-font-size));color:var(--highcontrast-radio-neutral-content-color, var(--luzmo-radio-neutral-content-color, var(--radio-neutral-content-color)));line-height:var(--luzmo-radio-line-height, var(--radio-line-height));transition:color var(--luzmo-radio-animation-duration, var(--radio-animation-duration)) ease-in-out;margin-block-start:var(--radio-label-top-to-text);margin-block-end:var(--radio-label-bottom-to-text);margin-inline-start:var(--luzmo-radio-text-to-control, var(--radio-text-to-control))}#label:lang(ja),#label:lang(ko),#label:lang(zh){line-height:var(--luzmo-radio-line-height-cjk, var(--radio-line-height-cjk))}#button{box-sizing:border-box;inline-size:var(--luzmo-radio-button-control-size, var(--radio-button-control-size));block-size:var(--luzmo-radio-button-control-size, var(--radio-button-control-size));flex-grow:0;flex-shrink:0;margin-block-start:var(--luzmo-radio-button-top-to-control, var(--radio-button-top-to-control));position:relative}#button:before{z-index:0;content:"";box-sizing:border-box;inline-size:var(--luzmo-radio-button-control-size, var(--radio-button-control-size));block-size:var(--luzmo-radio-button-control-size, var(--radio-button-control-size));background-color:var(--highcontrast-radio-button-background-color, var(--luzmo-radio-button-background-color, var(--radio-button-background-color)));border-width:var(--luzmo-radio-border-width, var(--radio-border-width));border-color:var(--highcontrast-radio-button-border-color-default, var(--luzmo-radio-button-border-color-default, var(--radio-button-border-color-default)));transition:border var(--luzmo-radio-animation-duration, var(--radio-animation-duration)) ease-in-out,box-shadow var(--luzmo-radio-animation-duration, var(--radio-animation-duration)) ease-in-out;border-style:solid;border-radius:50%;display:block;position:absolute}#button:after{content:"";transition:opacity var(--luzmo-radio-animation-duration, var(--radio-animation-duration)) ease-out,margin var(--luzmo-radio-animation-duration, var(--radio-animation-duration)) ease-out;border-radius:50%;display:block;position:absolute;inset-block-start:50%;inset-inline-start:50%;transform:translate(-50%) translateY(-50%)}:host:dir(rtl) #button:after,:host([dir=rtl]) #button:after{transform:translate(50%) translateY(-50%)}:host{--radio-button-border-color-default: var(--luzmo-border-color-full);--radio-button-border-color-hover: var(--luzmo-border-color-full-hover);--radio-button-border-color-down: var(--luzmo-border-color-full-hover);--radio-button-border-color-focus: var(--luzmo-border-color-full-hover);--radio-neutral-content-color: var(--luzmo-selected-color-hard);--radio-neutral-content-color-hover: var(--luzmo-selected-color-hard-hover);--radio-neutral-content-color-down: var(--luzmo-selected-color-hard-down);--radio-neutral-content-color-focus: var(--luzmo-selected-color-hard-focus);--radio-button-selection-indicator: var(--luzmo-spacing-2);--radio-focus-indicator-width: var(--luzmo-indicator-width);--radio-focus-indicator-gap: var(--luzmo-indicator-gap);--radio-focus-indicator-color: var(--luzmo-primary);--radio-disabled-content-color: var(--luzmo-disabled-color);--radio-disabled-border-color: var(--luzmo-border-color-disabled);--radio-emphasized-accent-color: var(--luzmo-primary);--radio-emphasized-accent-color-hover: var(--luzmo-primary-hover);--radio-emphasized-accent-color-down: var(--luzmo-primary-down);--radio-emphasized-accent-color-focus: var(--luzmo-primary-focus);--radio-border-width: calc(var(--luzmo-border-width) * 2);--radio-button-background-color: var(--luzmo-background-color);--radio-button-checked-border-color-default: var(--luzmo-selected-color-hard);--radio-button-checked-border-color-hover: var( --luzmo-selected-color-hard-hover );--radio-button-checked-border-color-down: var( --luzmo-selected-color-hard-down );--radio-button-checked-border-color-focus: var( --luzmo-selected-color-hard-focus );--radio-line-height: 1.3;--radio-animation-duration: var(--luzmo-animation-duration);--radio-height: 32px;--radio-button-control-size: 14px;--radio-text-to-control: 10px;--radio-label-top-to-text: 6px;--radio-label-bottom-to-text: 9px;--radio-button-top-to-control: 9px;--radio-font-size: 14px}:host(:lang(ja)),:host(:lang(zh)),:host(:lang(ko)){--radio-line-height-cjk: 1.5}:host{--radio-height: var(--luzmo-component-height);--radio-button-control-size: 14px;--radio-text-to-control: 10px;--radio-label-top-to-text: 7px;--radio-label-bottom-to-text: 9px;--radio-button-top-to-control: 9px;--radio-font-size: 14px}:host([size=s]){--radio-height: var(--luzmo-component-height-s);--radio-button-control-size: var(--luzmo-spacing-4);--radio-text-to-control: 9px;--radio-label-top-to-text: var(--luzmo-spacing-2);--radio-label-bottom-to-text: 5px;--radio-button-top-to-control: 6px;--radio-font-size: var(--luzmo-spacing-4)}:host([size=l]){--radio-height: var(--luzmo-component-height-l);--radio-button-control-size: 16px;--radio-text-to-control: 11px;--radio-label-top-to-text: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--radio-label-bottom-to-text: 11px;--radio-button-top-to-control: var(--luzmo-spacing-4);--radio-font-size: 16px}:host([size=xl]){--radio-height: var(--luzmo-component-height-xl);--radio-button-control-size: 18px;--radio-text-to-control: 13px;--radio-label-top-to-text: var(--luzmo-spacing-4);--radio-label-bottom-to-text: 14px;--radio-button-top-to-control: 15px;--radio-font-size: 18px}:host([emphasized]){--radio-button-checked-border-color-default: var(--luzmo-primary);--radio-button-checked-border-color-hover: var(--luzmo-primary-hover);--radio-button-checked-border-color-down: var(--luzmo-primary-down);--radio-button-checked-border-color-focus: var(--luzmo-primary-focus)}:host(:focus){outline:none}:host([disabled]){pointer-events:none}:host([dir=rtl]) #button:after{transform:translate(50%) translateY(-50%)}';var z=Object.defineProperty,n=(d,o,t,l)=>{for(var r=void 0,i=d.length-1,c;i>=0;i--)(c=d[i])&&(r=c(o,t,r)||r);return r&&z(o,t,r),r};class a extends b.SizedMixin(h.FocusVisiblePolyfillMixin(e.LuzmoElement),{noDefaultSize:!0}){constructor(){super(...arguments),this.autofocus=!1,this.value="",this.checked=!1,this.disabled=!1,this.emphasized=!1,this.invalid=!1,this.readonly=!1}static get styles(){return[e.r(f)]}click(){this.disabled||this.activate()}manageAutoFocus(){this.autofocus&&(this.dispatchEvent(new KeyboardEvent("keydown",{code:"Tab"})),this.focus())}activate(){this.checked||(this.checked=!0,this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})))}handleKeyup(o){o.code==="Space"&&this.activate()}render(){return e.x`
18
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("lit"),e=require("lit/decorators.js"),v=require("../base-5nDSSNeT.cjs"),b=require("../focus-visible-D4BXb5RB.cjs"),p=require("../sized-mixin-DcvJLFeo.cjs"),m=require("../roving-tabindex-By_fCy_e.cjs"),f=require("../field-group-BYHNJmv0.cjs"),z='@media (forced-colors: active){:host{--highcontrast-radio-neutral-content-color: CanvasText;--highcontrast-radio-neutral-content-color-hover: CanvasText;--highcontrast-radio-neutral-content-color-down: CanvasText;--highcontrast-radio-neutral-content-color-focus: CanvasText;--highcontrast-radio-button-border-color-default: ButtonText;--highcontrast-radio-button-border-color-hover: Highlight;--highcontrast-radio-button-border-color-down: ButtonText;--highcontrast-radio-button-border-color-focus: Highlight;--highcontrast-radio-emphasized-accent-color: ButtonText;--highcontrast-radio-emphasized-accent-color-hover: Highlight;--highcontrast-radio-emphasized-accent-color-down: ButtonText;--highcontrast-radio-emphasized-accent-color-focus: Highlight;--highcontrast-radio-button-checked-border-color-default: Highlight;--highcontrast-radio-button-checked-border-color-hover: Highlight;--highcontrast-radio-button-checked-border-color-down: Highlight;--highcontrast-radio-button-checked-border-color-focus: Highlight;--highcontrast-radio-disabled-content-color: GrayText;--highcontrast-radio-disabled-border-color: GrayText;--highcontrast-radio-focus-indicator-color: CanvasText}#button:after{forced-color-adjust:none}}:host{vertical-align:top;min-block-size:var(--luzmo-radio-height, var(--radio-height));max-inline-size:100%;align-items:flex-start;display:inline-flex;position:relative;font-family:var(--luzmo-radio-font-family, var(--luzmo-font-family))}:host(:active) #button:before{border-color:var(--highcontrast-radio-button-border-color-down, var(--luzmo-radio-button-border-color-down, var(--radio-button-border-color-down)))}:host(:active[checked]) #input+#button:before{border-color:var(--highcontrast-radio-button-checked-border-color-down, var(--luzmo-radio-button-checked-border-color-down, var(--radio-button-checked-border-color-down)))}:host(:active) #label{color:var(--highcontrast-radio-neutral-content-color-down, var(--luzmo-radio-neutral-content-color-down, var(--radio-neutral-content-color-down)))}:host(:focus-visible) #button:before{border-color:var(--highcontrast-radio-button-border-color-focus, var(--luzmo-radio-button-border-color-focus, var(--radio-button-border-color-focus)))}:host(:focus-visible) #button:after{border-style:solid;border-color:var(--highcontrast-radio-focus-indicator-color, var(--luzmo-radio-focus-indicator-color, var(--radio-focus-indicator-color)));border-width:var(--luzmo-radio-focus-indicator-width, var(--radio-focus-indicator-width));inline-size:calc(var(--radio-button-control-size) + var(--radio-focus-indicator-gap) * 2);block-size:calc(var(--radio-button-control-size) + var(--radio-focus-indicator-gap) * 2)}:host(:focus-visible[checked]) #input+#button:before{border-color:var(--highcontrast-radio-button-checked-border-color-focus, var(--luzmo-radio-button-checked-border-color-focus, var(--radio-button-checked-border-color-focus)))}:host(:focus-visible) #label{color:var(--highcontrast-radio-neutral-content-color-focus, var(--luzmo-radio-neutral-content-color-focus, var(--radio-neutral-content-color-focus)))}:host([readonly]) #input:read-only{cursor:auto}:host([readonly]) #button{clip:rect(1px,1px,1px,1px);clip-path:inset(50%);position:fixed;inset-block-end:100%;inset-inline-end:100%}:host([readonly][checked][disabled]) #input~#label,:host([readonly][disabled]) #input~#label,:host([readonly]) #label{color:var(--highcontrast-radio-neutral-content-color, var(--luzmo-radio-neutral-content-color, var(--radio-neutral-content-color)));margin-inline-start:0}:host([emphasized][checked]) #input+#button:before{border-color:var(--highcontrast-radio-emphasized-accent-color, var(--luzmo-radio-emphasized-accent-color, var(--radio-emphasized-accent-color)))}@media (hover: hover){:host(:hover) #button:before{border-color:var(--highcontrast-radio-button-border-color-hover, var(--luzmo-radio-button-border-color-hover, var(--radio-button-border-color-hover)))}:host([checked]:hover) #input+#button:before{border-color:var(--highcontrast-radio-button-checked-border-color-hover, var(--luzmo-radio-button-checked-border-color-hover, var(--radio-button-checked-border-color-hover)))}:host(:hover) #label{color:var(--highcontrast-radio-neutral-content-color-hover, var(--luzmo-radio-neutral-content-color-hover, var(--radio-neutral-content-color-hover)))}:host([emphasized][checked]:hover) #input+#button:before{border-color:var(--highcontrast-radio-emphasized-accent-color-hover, var(--luzmo-radio-emphasized-accent-color-hover, var(--radio-emphasized-accent-color-hover)))}}:host([emphasized]:active[checked]) #input+#button:before{border-color:var(--highcontrast-radio-emphasized-accent-color-down, var(--luzmo-radio-emphasized-accent-color-down, var(--radio-emphasized-accent-color-down)))}:host([emphasized]:focus-visible[checked]) #input+#button:before{border-color:var(--highcontrast-radio-emphasized-accent-color-focus, var(--luzmo-radio-emphasized-accent-color-focus, var(--radio-emphasized-accent-color-focus)))}:host([checked][disabled]) #input+#button:before,:host([disabled]) #input+#button:before{border-color:var(--highcontrast-radio-disabled-border-color, var(--luzmo-radio-disabled-border-color, var(--radio-disabled-border-color)))}:host([checked][disabled]) #input~#label,:host([disabled]) #input~#label{color:var(--highcontrast-radio-disabled-content-color, var(--luzmo-radio-disabled-content-color, var(--radio-disabled-content-color)))}#input{font-family:inherit;font-size:100%;line-height:var(--luzmo-radio-line-height, var(--radio-line-height));box-sizing:border-box;inline-size:100%;block-size:100%;opacity:0;z-index:1;cursor:pointer;margin:0;padding:0;position:absolute;overflow:visible}:host([disabled]) #input{cursor:default}:host([checked]) #input+#button:before{border-width:calc(var(--radio-button-control-size) / 2 - var(--radio-button-selection-indicator) / 2);border-color:var(--highcontrast-radio-button-checked-border-color-default, var(--luzmo-radio-button-checked-border-color-default, var(--radio-button-checked-border-color-default)))}#input:focus-visible+#button:after{border-width:var(--luzmo-radio-focus-indicator-width, var(--radio-focus-indicator-width));border-color:var(--highcontrast-radio-focus-indicator-color, var(--luzmo-radio-focus-indicator-color, var(--radio-focus-indicator-color)));inline-size:calc(var(--radio-button-control-size) + var(--radio-focus-indicator-gap) * 2);block-size:calc(var(--radio-button-control-size) + var(--radio-focus-indicator-gap) * 2);border-style:solid}#label{text-align:start;font-size:var(--luzmo-radio-font-size, var(--radio-font-size));color:var(--highcontrast-radio-neutral-content-color, var(--luzmo-radio-neutral-content-color, var(--radio-neutral-content-color)));line-height:var(--luzmo-radio-line-height, var(--radio-line-height));transition:color var(--luzmo-radio-animation-duration, var(--radio-animation-duration)) ease-in-out;margin-block-start:var(--radio-label-top-to-text);margin-block-end:var(--radio-label-bottom-to-text);margin-inline-start:var(--luzmo-radio-text-to-control, var(--radio-text-to-control))}#label:lang(ja),#label:lang(ko),#label:lang(zh){line-height:var(--luzmo-radio-line-height-cjk, var(--radio-line-height-cjk))}#button{box-sizing:border-box;inline-size:var(--luzmo-radio-button-control-size, var(--radio-button-control-size));block-size:var(--luzmo-radio-button-control-size, var(--radio-button-control-size));flex-grow:0;flex-shrink:0;margin-block-start:var(--luzmo-radio-button-top-to-control, var(--radio-button-top-to-control));position:relative}#button:before{z-index:0;content:"";box-sizing:border-box;inline-size:var(--luzmo-radio-button-control-size, var(--radio-button-control-size));block-size:var(--luzmo-radio-button-control-size, var(--radio-button-control-size));background-color:var(--highcontrast-radio-button-background-color, var(--luzmo-radio-button-background-color, var(--radio-button-background-color)));border-width:var(--luzmo-radio-border-width, var(--radio-border-width));border-color:var(--highcontrast-radio-button-border-color-default, var(--luzmo-radio-button-border-color-default, var(--radio-button-border-color-default)));transition:border var(--luzmo-radio-animation-duration, var(--radio-animation-duration)) ease-in-out,box-shadow var(--luzmo-radio-animation-duration, var(--radio-animation-duration)) ease-in-out;border-style:solid;border-radius:50%;display:block;position:absolute}#button:after{content:"";transition:opacity var(--luzmo-radio-animation-duration, var(--radio-animation-duration)) ease-out,margin var(--luzmo-radio-animation-duration, var(--radio-animation-duration)) ease-out;border-radius:50%;display:block;position:absolute;inset-block-start:50%;inset-inline-start:50%;transform:translate(-50%) translateY(-50%)}:host:dir(rtl) #button:after,:host([dir=rtl]) #button:after{transform:translate(50%) translateY(-50%)}:host{--radio-button-border-color-default: var(--luzmo-border-color-full);--radio-button-border-color-hover: var(--luzmo-border-color-full-hover);--radio-button-border-color-down: var(--luzmo-border-color-full-hover);--radio-button-border-color-focus: var(--luzmo-border-color-full-hover);--radio-neutral-content-color: var(--luzmo-selected-color-hard);--radio-neutral-content-color-hover: var(--luzmo-selected-color-hard-hover);--radio-neutral-content-color-down: var(--luzmo-selected-color-hard-down);--radio-neutral-content-color-focus: var(--luzmo-selected-color-hard-focus);--radio-button-selection-indicator: var(--luzmo-spacing-2);--radio-focus-indicator-width: var(--luzmo-indicator-width);--radio-focus-indicator-gap: var(--luzmo-indicator-gap);--radio-focus-indicator-color: var(--luzmo-primary);--radio-disabled-content-color: var(--luzmo-disabled-color);--radio-disabled-border-color: var(--luzmo-border-color-disabled);--radio-emphasized-accent-color: var(--luzmo-primary);--radio-emphasized-accent-color-hover: var(--luzmo-primary-hover);--radio-emphasized-accent-color-down: var(--luzmo-primary-down);--radio-emphasized-accent-color-focus: var(--luzmo-primary-focus);--radio-border-width: calc(var(--luzmo-border-width) * 2);--radio-button-background-color: var(--luzmo-background-color);--radio-button-checked-border-color-default: var(--luzmo-selected-color-hard);--radio-button-checked-border-color-hover: var( --luzmo-selected-color-hard-hover );--radio-button-checked-border-color-down: var( --luzmo-selected-color-hard-down );--radio-button-checked-border-color-focus: var( --luzmo-selected-color-hard-focus );--radio-line-height: 1.3;--radio-animation-duration: var(--luzmo-animation-duration);--radio-height: 32px;--radio-button-control-size: 14px;--radio-text-to-control: 10px;--radio-label-top-to-text: 6px;--radio-label-bottom-to-text: 9px;--radio-button-top-to-control: 9px;--radio-font-size: 14px}:host(:lang(ja)),:host(:lang(zh)),:host(:lang(ko)){--radio-line-height-cjk: 1.5}:host{--radio-height: var(--luzmo-component-height);--radio-button-control-size: 14px;--radio-text-to-control: 10px;--radio-label-top-to-text: 7px;--radio-label-bottom-to-text: 9px;--radio-button-top-to-control: 9px;--radio-font-size: 14px}:host([size=s]){--radio-height: var(--luzmo-component-height-s);--radio-button-control-size: var(--luzmo-spacing-4);--radio-text-to-control: 9px;--radio-label-top-to-text: var(--luzmo-spacing-2);--radio-label-bottom-to-text: 5px;--radio-button-top-to-control: 6px;--radio-font-size: var(--luzmo-spacing-4)}:host([size=l]){--radio-height: var(--luzmo-component-height-l);--radio-button-control-size: 16px;--radio-text-to-control: 11px;--radio-label-top-to-text: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--radio-label-bottom-to-text: 11px;--radio-button-top-to-control: var(--luzmo-spacing-4);--radio-font-size: 16px}:host([size=xl]){--radio-height: var(--luzmo-component-height-xl);--radio-button-control-size: 18px;--radio-text-to-control: 13px;--radio-label-top-to-text: var(--luzmo-spacing-4);--radio-label-bottom-to-text: 14px;--radio-button-top-to-control: 15px;--radio-font-size: 18px}:host([emphasized]){--radio-button-checked-border-color-default: var(--luzmo-primary);--radio-button-checked-border-color-hover: var(--luzmo-primary-hover);--radio-button-checked-border-color-down: var(--luzmo-primary-down);--radio-button-checked-border-color-focus: var(--luzmo-primary-focus)}:host(:focus){outline:none}:host([disabled]){pointer-events:none}:host([dir=rtl]) #button:after{transform:translate(50%) translateY(-50%)}';var g=Object.defineProperty,n=(d,o,t,l)=>{for(var r=void 0,i=d.length-1,c;i>=0;i--)(c=d[i])&&(r=c(o,t,r)||r);return r&&g(o,t,r),r};class a extends p.SizedMixin(b.FocusVisiblePolyfillMixin(v.LuzmoElement),{noDefaultSize:!0}){constructor(){super(...arguments),this.autofocus=!1,this.value="",this.checked=!1,this.disabled=!1,this.emphasized=!1,this.invalid=!1,this.readonly=!1}static get styles(){return[h.unsafeCSS(z)]}click(){this.disabled||this.activate()}manageAutoFocus(){this.autofocus&&(this.dispatchEvent(new KeyboardEvent("keydown",{code:"Tab"})),this.focus())}activate(){this.checked||(this.checked=!0,this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})))}handleKeyup(o){o.code==="Space"&&this.activate()}render(){return h.html`
19
19
  <div id="input"></div>
20
20
  <span id="button"></span>
21
21
  <span id="label" role="presentation"><slot></slot></span>
22
- `}firstUpdated(o){super.firstUpdated(o),this.setAttribute("role","radio"),this.hasAttribute("tabindex")||(this.tabIndex=0),this.manageAutoFocus(),this.addEventListener("click",this.activate),this.addEventListener("keyup",this.handleKeyup)}updated(o){super.updated(o),o.has("invalid")&&(this.invalid?this.setAttribute("aria-invalid","true"):this.removeAttribute("aria-invalid")),o.has("checked")&&(this.checked?this.setAttribute("aria-checked","true"):this.setAttribute("aria-checked","false")),o.has("disabled")&&(this.disabled?this.setAttribute("aria-disabled","true"):this.removeAttribute("aria-disabled"))}}n([e.n({type:Boolean})],a.prototype,"autofocus");n([e.n({type:String,reflect:!0})],a.prototype,"value");n([e.n({type:Boolean,reflect:!0})],a.prototype,"checked");n([e.n({type:Boolean,reflect:!0})],a.prototype,"disabled");n([e.n({type:Boolean,reflect:!0})],a.prototype,"emphasized");n([e.n({type:Boolean,reflect:!0})],a.prototype,"invalid");n([e.n({type:Boolean,reflect:!0})],a.prototype,"readonly");var g=Object.defineProperty,u=(d,o,t,l)=>{for(var r=void 0,i=d.length-1,c;i>=0;i--)(c=d[i])&&(r=c(o,t,r)||r);return r&&g(o,t,r),r};class s extends h.FocusVisiblePolyfillMixin(m.LuzmoFieldGroup){constructor(){super(...arguments),this.name="",this.rovingTabindexController=new p.RovingTabindexController(this,{focusInIndex:o=>o.findIndex(t=>this.selected?!t.disabled&&t.value===this.selected:!t.disabled),elementEnterAction:o=>{this._setSelected(o.value)},elements:()=>this.buttons,isFocusableElement:o=>!o.disabled}),this.selected=""}get buttons(){return this.defaultNodes.filter(o=>o instanceof a)}focus(){this.rovingTabindexController.focus()}_setSelected(o){if(o===this.selected)return;const t=this.selected,l=o?this.querySelector(`luzmo-radio[value="${o}"]`):void 0;if(this.selected=l?o:"",!this.dispatchEvent(new Event("change",{cancelable:!0,bubbles:!0,composed:!0}))){this.selected=t;return}this.validateRadios()}willUpdate(o){if(!this.hasUpdated){this.setAttribute("role","radiogroup");const t=this.querySelector("luzmo-radio[checked]"),l=t?t.value:"";if(this.selected=l||this.selected,this.selected&&this.selected!==l){const r=this.querySelector(`luzmo-radio[value="${this.selected}"]`);r&&(r.checked=!0)}this.shadowRoot.addEventListener("change",r=>{r.stopPropagation();const i=r.target;this._setSelected(i.value)})}o.has("selected")&&this.validateRadios()}async validateRadios(){let o=!1;this.hasUpdated||await this.updateComplete,this.buttons.map(t=>{t.checked=this.selected===t.value,o=o||t.checked}),o||(this.selected="")}handleSlotchange(){this.rovingTabindexController.clearElementCache()}}u([e.n({type:String})],s.prototype,"name");u([v.n()],s.prototype,"defaultNodes");u([e.n({reflect:!0})],s.prototype,"selected");customElements.get("luzmo-radio")||customElements.define("luzmo-radio",a);customElements.get("luzmo-radio-group")||customElements.define("luzmo-radio-group",s);exports.LuzmoRadio=a;exports.LuzmoRadioGroup=s;
22
+ `}firstUpdated(o){super.firstUpdated(o),this.setAttribute("role","radio"),this.hasAttribute("tabindex")||(this.tabIndex=0),this.manageAutoFocus(),this.addEventListener("click",this.activate),this.addEventListener("keyup",this.handleKeyup)}updated(o){super.updated(o),o.has("invalid")&&(this.invalid?this.setAttribute("aria-invalid","true"):this.removeAttribute("aria-invalid")),o.has("checked")&&(this.checked?this.setAttribute("aria-checked","true"):this.setAttribute("aria-checked","false")),o.has("disabled")&&(this.disabled?this.setAttribute("aria-disabled","true"):this.removeAttribute("aria-disabled"))}}n([e.property({type:Boolean})],a.prototype,"autofocus");n([e.property({type:String,reflect:!0})],a.prototype,"value");n([e.property({type:Boolean,reflect:!0})],a.prototype,"checked");n([e.property({type:Boolean,reflect:!0})],a.prototype,"disabled");n([e.property({type:Boolean,reflect:!0})],a.prototype,"emphasized");n([e.property({type:Boolean,reflect:!0})],a.prototype,"invalid");n([e.property({type:Boolean,reflect:!0})],a.prototype,"readonly");var x=Object.defineProperty,u=(d,o,t,l)=>{for(var r=void 0,i=d.length-1,c;i>=0;i--)(c=d[i])&&(r=c(o,t,r)||r);return r&&x(o,t,r),r};class s extends b.FocusVisiblePolyfillMixin(f.LuzmoFieldGroup){constructor(){super(...arguments),this.name="",this.rovingTabindexController=new m.RovingTabindexController(this,{focusInIndex:o=>o.findIndex(t=>this.selected?!t.disabled&&t.value===this.selected:!t.disabled),elementEnterAction:o=>{this._setSelected(o.value)},elements:()=>this.buttons,isFocusableElement:o=>!o.disabled}),this.selected=""}get buttons(){return this.defaultNodes.filter(o=>o instanceof a)}focus(){this.rovingTabindexController.focus()}_setSelected(o){if(o===this.selected)return;const t=this.selected,l=o?this.querySelector(`luzmo-radio[value="${o}"]`):void 0;if(this.selected=l?o:"",!this.dispatchEvent(new Event("change",{cancelable:!0,bubbles:!0,composed:!0}))){this.selected=t;return}this.validateRadios()}willUpdate(o){if(!this.hasUpdated){this.setAttribute("role","radiogroup");const t=this.querySelector("luzmo-radio[checked]"),l=t?t.value:"";if(this.selected=l||this.selected,this.selected&&this.selected!==l){const r=this.querySelector(`luzmo-radio[value="${this.selected}"]`);r&&(r.checked=!0)}this.shadowRoot.addEventListener("change",r=>{r.stopPropagation();const i=r.target;this._setSelected(i.value)})}o.has("selected")&&this.validateRadios()}async validateRadios(){let o=!1;this.hasUpdated||await this.updateComplete,this.buttons.map(t=>{t.checked=this.selected===t.value,o=o||t.checked}),o||(this.selected="")}handleSlotchange(){this.rovingTabindexController.clearElementCache()}}u([e.property({type:String})],s.prototype,"name");u([e.queryAssignedNodes()],s.prototype,"defaultNodes");u([e.property({reflect:!0})],s.prototype,"selected");customElements.get("luzmo-radio")||customElements.define("luzmo-radio",a);customElements.get("luzmo-radio-group")||customElements.define("luzmo-radio-group",s);exports.LuzmoRadio=a;exports.LuzmoRadioGroup=s;
@@ -15,16 +15,17 @@
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 { a as m, r as z, x as v, n as i } from "../base-WsynuqaS.js";
19
- import { F as h } from "../focus-visible-DBlJGoEW.js";
20
- import { S as p } from "../sized-mixin-D4ACoVUr.js";
21
- import { n as f } from "../query-assigned-nodes-C76XVPWY.js";
18
+ import { unsafeCSS as m, html as z } from "lit";
19
+ import { property as i, queryAssignedNodes as v } from "lit/decorators.js";
20
+ import { a as p } from "../base-CdYjmV_8.js";
21
+ import { F as h } from "../focus-visible-BvScGDCE.js";
22
+ import { S as f } from "../sized-mixin-cJbo3PKR.js";
22
23
  import { R as g } from "../roving-tabindex-DOg4z6ZU.js";
23
- import { L as x } from "../field-group-DXfBWrkO.js";
24
+ import { L as x } from "../field-group-CHmw159R.js";
24
25
  const b = () => {
25
26
  if (typeof document < "u" && !document.querySelector("style[data-luzmo-vars]")) {
26
27
  const e = document.createElement("style");
27
- e.setAttribute("data-luzmo-vars", ""), e.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(e);
28
+ e.setAttribute("data-luzmo-vars", ""), e.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(e);
28
29
  }
29
30
  };
30
31
  b();
@@ -34,15 +35,15 @@ var y = Object.defineProperty, d = (e, o, t, n) => {
34
35
  (c = e[a]) && (r = c(o, t, r) || r);
35
36
  return r && y(o, t, r), r;
36
37
  };
37
- class l extends p(
38
- h(m),
38
+ class l extends f(
39
+ h(p),
39
40
  { noDefaultSize: !0 }
40
41
  ) {
41
42
  constructor() {
42
43
  super(...arguments), this.autofocus = !1, this.value = "", this.checked = !1, this.disabled = !1, this.emphasized = !1, this.invalid = !1, this.readonly = !1;
43
44
  }
44
45
  static get styles() {
45
- return [z(k)];
46
+ return [m(k)];
46
47
  }
47
48
  click() {
48
49
  this.disabled || this.activate();
@@ -66,7 +67,7 @@ class l extends p(
66
67
  o.code === "Space" && this.activate();
67
68
  }
68
69
  render() {
69
- return v`
70
+ return z`
70
71
  <div id="input"></div>
71
72
  <span id="button"></span>
72
73
  <span id="label" role="presentation"><slot></slot></span>
@@ -178,7 +179,7 @@ u([
178
179
  i({ type: String })
179
180
  ], s.prototype, "name");
180
181
  u([
181
- f()
182
+ v()
182
183
  ], s.prototype, "defaultNodes");
183
184
  u([
184
185
  i({ reflect: !0 })
@@ -15,11 +15,11 @@
15
15
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
16
16
  * SOFTWARE.
17
17
  * */
18
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../base-CBCg3yyw.cjs"),h=require("../query-BL-TJj7K.cjs"),u=require("../if-defined-C9YGdo33.cjs"),i=require("../luzmo-icons-DletXGWU.cjs");require("../button/index.cjs");require("../icon/index.cjs");const d=require("../text-field-D5d_Gt0t.cjs"),v="@media (forced-colors: active){#text-field #text-field,#text-field #text-field .input{--highcontrast-search-color-default: CanvasText;--highcontrast-search-color-hover: CanvasText;--highcontrast-search-color-focus: CanvasText;--highcontrast-search-color-disabled: GrayText}#text-field #button .luzmo-ClearButton-fill{forced-color-adjust:none;background-color:initial}}#text-field{--search-button-inline-size: var(--search-block-size);--search-min-inline-size: calc( var(--search-min-inline-multiplier) * var(--search-block-size) );--luzmo-text-field-font-family: var( --luzmo-search-font-family, var(--search-font-family) );--luzmo-text-field-font-weight: var( --luzmo-search-font-weight, var(--search-font-weight) );--luzmo-text-field-corner-radius: var( --luzmo-search-border-radius, var(--search-border-radius) );--luzmo-text-field-border-width: var( --luzmo-search-border-width, var(--search-border-width) );--luzmo-text-field-focus-indicator-gap: var( --luzmo-search-focus-indicator-gap, var(--search-focus-indicator-gap) );--luzmo-text-field-focus-indicator-width: var( --luzmo-search-focus-indicator-width, var(--search-focus-indicator-width) );--luzmo-text-field-focus-indicator-color: var( --luzmo-search-focus-indicator-color, var(--search-focus-indicator-color) );--luzmo-text-field-text-color-default: var( --luzmo-search-color-default, var(--search-color-default) );--luzmo-text-field-text-color-hover: var( --luzmo-search-color-hover, var(--search-color-hover) );--luzmo-text-field-text-color-focus: var( --luzmo-search-color-focus, var(--search-color-focus) );--luzmo-text-field-text-color-focus-hover: var( --luzmo-search-color-focus-hover, var(--search-color-focus-hover) );--luzmo-text-field-text-color-keyboard-focus: var( --luzmo-search-color-key-focus, var(--search-color-key-focus) );--luzmo-text-field-text-color-disabled: var( --luzmo-search-color-disabled, var(--search-color-disabled) );--luzmo-text-field-border-color: var( --luzmo-search-border-color-default, var(--search-border-color-default) );--luzmo-text-field-border-color-hover: var( --luzmo-search-border-color-hover, var(--search-border-color-hover) );--luzmo-text-field-border-color-focus: var( --luzmo-search-border-color-focus, var(--search-border-color-focus) );--luzmo-text-field-border-color-focus-hover: var( --luzmo-search-border-color-focus-hover, var(--search-border-color-focus-hover) );--luzmo-text-field-border-color-keyboard-focus: var( --luzmo-search-border-color-key-focus, var(--search-border-color-key-focus) );--luzmo-text-field-border-color-disabled: var( --luzmo-search-border-color-disabled, var(--search-border-color-disabled) );--luzmo-text-field-background-color: var( --luzmo-search-background-color, var(--search-background-color) );--luzmo-text-field-background-color-disabled: var( --luzmo-search-background-color-disabled, var(--search-background-color-disabled) );inline-size:var(--luzmo-search-inline-size, var(--search-inline-size));min-inline-size:var(--luzmo-search-min-inline-size, var(--search-min-inline-size));display:inline-block;position:relative}#text-field .luzmo-HelpText{margin-block-start:var(--luzmo-search-to-help-text, var(--search-to-help-text))}#button{position:absolute;inset-block-start:0;inset-inline-end:0;height:var(--search-block-size);width:var(--search-block-size)}#button,#button .luzmo-ClearButton-fill{border-radius:var(--luzmo-search-border-radius, var(--search-border-radius))}#text-field.is-disabled #button{display:none}#text-field{inline-size:100%}.icon-search{--search-color: var( --highcontrast-search-color-default, var(--luzmo-search-color-default, var(--search-color-default)) );color:var(--search-color);margin-block:auto;display:block;position:absolute;inset-block:0}#text-field.is-focused .icon-search{--search-color: var( --highcontrast-search-color-focus, var(--luzmo-search-color-focus, var(--search-color-focus)) )}#text-field.is-disabled .icon-search{--search-color: var( --highcontrast-search-color-disabled, var(--luzmo-search-color-disabled, var(--search-color-disabled)) )}@media (hover: hover){#text-field:hover .icon-search{--search-color: var( --highcontrast-search-color-hover, var(--luzmo-search-color-hover, var(--search-color-hover)) )}#text-field.is-focused:hover .icon-search{--search-color: var( --highcontrast-search-color-focus, var(--luzmo-search-color-focus-hover, var(--search-color-focus-hover)) )}#text-field.is-disabled:hover .icon-search{--search-color: var( --highcontrast-search-color-disabled, var(--luzmo-search-color-disabled, var(--search-color-disabled)) )}}.input{-webkit-appearance:none;-moz-appearance:none;appearance:none;block-size:var(--luzmo-search-block-size, var(--search-block-size));font-style:var(--luzmo-search-font-style, var(--search-font-style));line-height:var(--luzmo-search-line-height, var(--search-line-height));padding-block-start:calc(var(--luzmo-search-top-to-text, var(--search-top-to-text)) - var(--luzmo-search-border-width, var(--search-border-width)));padding-block-end:calc(var(--luzmo-search-bottom-to-text, var(--search-bottom-to-text)) - var(--luzmo-search-border-width, var(--search-border-width)))}.input::-webkit-search-cancel-button,.input::-webkit-search-decoration{-webkit-appearance:none;-moz-appearance:none;appearance:none}:host(:not([quiet])) #text-field .icon-search{inset-inline-start:var(--luzmo-search-edge-to-visual, var(--search-edge-to-visual))}:host(:not([quiet])) #text-field .input{padding-inline-start:calc(var(--luzmo-search-edge-to-visual, var(--search-edge-to-visual)) - var(--luzmo-search-border-width, var(--search-border-width)) + var(--luzmo-search-icon-size, var(--search-icon-size)) + var(--luzmo-search-text-to-icon, var(--search-text-to-icon)));padding-inline-end:calc(var(--luzmo-search-button-inline-size, var(--search-button-inline-size)) - var(--luzmo-search-border-width, var(--search-border-width)))}:host([quiet]){--search-quiet-button-offset: var( --luzmo-search-quiet-button-offset, calc( var(--luzmo-search-block-size, var(--search-block-size)) / 2 - var(--luzmo-search-icon-size, var(--search-icon-size)) / 2 ) )}:host([quiet]) #button .luzmo-ClearButton-icon{transform:translate(var(--search-quiet-button-offset))}:host([quiet]) #text-field .input{border-radius:var(--luzmo-search-border-radius, var(--search-border-radius));padding-block-start:var(--luzmo-search-top-to-text, var(--search-top-to-text));padding-inline-start:calc(var(--luzmo-search-edge-to-visual, var(--search-edge-to-visual)) + var(--luzmo-search-icon-size, var(--search-icon-size)) + var(--luzmo-search-text-to-icon, var(--search-text-to-icon)));padding-inline-end:calc(var(--luzmo-search-button-inline-size, var(--search-button-inline-size)) - var(--search-quiet-button-offset))}:host{--search-border-color-default: var(--luzmo-border-color);--search-border-color-hover: rgba(var(--luzmo-primary-rgb), .3);--search-border-color-focus: var(--luzmo-primary);--search-border-color-focus-hover: var(--luzmo-primary);--search-border-color-key-focus: var(--luzmo-primary);--search-inline-size: 192px;--search-min-inline-multiplier: 3;--search-to-help-text: 0px;--search-top-to-text: var(--luzmo-spacing-2);--search-bottom-to-text: var(--luzmo-spacing-2);--search-focus-indicator-width: var(--luzmo-indicator-width);--search-focus-indicator-gap: -1px;--search-focus-indicator-color: var(--luzmo-primary);--search-font-family: var(--luzmo-font-family);--search-font-weight: var(--luzmo-font-weight);--search-font-style: var(--luzmo-font-style);--search-line-height: var(--luzmo-line-height);--search-color-default: var(--luzmo-font-color);--search-color-hover: var(--luzmo-font-color-hover);--search-color-focus: var(--luzmo-font-color-focus);--search-color-focus-hover: var(--luzmo-font-focus);--search-color-key-focus: var(--luzmo-font-color-focus);--search-border-width: var(--luzmo-border-width);--search-background-color: var(--luzmo-background-color);--search-color-disabled: var(--luzmo-disabled-color);--search-background-color-disabled: var(--luzmo-background-color-disabled);--search-border-color-disabled: var(--luzmo-border-color-disabled)}:host #text-field{--search-border-radius: var(--luzmo-border-radius);--search-edge-to-visual: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--search-block-size: var(--luzmo-component-height);--search-icon-size: var(--luzmo-font-size-l);--search-text-to-icon: calc(var(--luzmo-spacing-3) + var(--luzmo-spacing-1))}:host([size=s]) #text-field{--search-border-radius: var(--luzmo-border-radius);--search-edge-to-visual: var(--luzmo-spacing-3);--search-block-size: var(--luzmo-component-height-s);--search-icon-size: var(--luzmo-font-size);--search-text-to-icon: var(--luzmo-spacing-3)}:host([size=l]) #text-field{--search-border-radius: var(--luzmo-border-radius);--search-edge-to-visual: var(--luzmo-spacing-4);--search-block-size: var(--luzmo-component-height-l);--search-icon-size: var(--luzmo-font-size-xl);--search-text-to-icon: calc(var(--luzmo-spacing-3) + var(--luzmo-spacing-1))}:host([size=xl]) #text-field{--search-border-radius: var(--luzmo-border-radius);--search-edge-to-visual: calc( var(--luzmo-spacing-4) + var(--luzmo-spacing-1) );--search-block-size: var(--luzmo-component-height-xl);--search-icon-size: var(--luzmo-font-size-xxl);--search-text-to-icon: var(--luzmo-spacing-4)}:host([quiet]) #text-field{--search-background-color: transparent;--search-background-color-disabled: transparent;--search-border-color-disabled: var(--luzmo-border-color-disabled);--search-border-radius: 0;--search-edge-to-visual: 0px}:host{--luzmo-text-field-spacing-inline: var(--alias-infield-button-full-height-m)}input::-webkit-search-cancel-button{display:none}@media (forced-colors: active){luzmo-clear-button{--clear-button-fill-background-color: transparent;--clear-button-fill-background-color-disabled: transparent;--clear-button-fill-background-color-down: transparent;--clear-button-fill-background-color-hover: transparent;--clear-button-fill-background-color-key-focus: transparent}}";var m=Object.defineProperty,t=(a,e,c,f)=>{for(var s=void 0,l=a.length-1,n;l>=0;l--)(n=a[l])&&(s=n(e,c,s)||s);return s&&m(e,c,s),s};const b=a=>a.stopPropagation(),z=a=>a==="s"?i.l2:a==="l"?i.z2:i.n2;class o extends d.LuzmoTextField{constructor(){super(...arguments),this.action="",this.label="Search",this.placeholder="Search"}static get styles(){return[...super.styles,r.r(v)]}handleSubmit(e){this.dispatchEvent(new Event("submit",{cancelable:!0,bubbles:!0}))||e.preventDefault()}handleKeydown(e){const{code:c}=e;c==="Escape"&&this.holdValueOnEscape||!this.value||c!=="Escape"||this.reset()}async reset(){this.value="",await this.updateComplete,this.focusElement.dispatchEvent(new InputEvent("input",{bubbles:!0,composed:!0})),this.focusElement.dispatchEvent(new InputEvent("change",{bubbles:!0}))}renderField(){return r.x`
18
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("lit"),a=require("lit/decorators.js"),u=require("lit/directives/if-defined.js"),n=require("@luzmo/icons");require("../button/index.cjs");require("../icon/index.cjs");const d=require("../text-field-DFP7p8Rv.cjs"),v="@media (forced-colors: active){#text-field #text-field,#text-field #text-field .input{--highcontrast-search-color-default: CanvasText;--highcontrast-search-color-hover: CanvasText;--highcontrast-search-color-focus: CanvasText;--highcontrast-search-color-disabled: GrayText}#text-field #button .luzmo-ClearButton-fill{forced-color-adjust:none;background-color:initial}}#text-field{--search-button-inline-size: var(--search-block-size);--search-min-inline-size: calc( var(--search-min-inline-multiplier) * var(--search-block-size) );--luzmo-text-field-font-family: var( --luzmo-search-font-family, var(--search-font-family) );--luzmo-text-field-font-weight: var( --luzmo-search-font-weight, var(--search-font-weight) );--luzmo-text-field-corner-radius: var( --luzmo-search-border-radius, var(--search-border-radius) );--luzmo-text-field-border-width: var( --luzmo-search-border-width, var(--search-border-width) );--luzmo-text-field-focus-indicator-gap: var( --luzmo-search-focus-indicator-gap, var(--search-focus-indicator-gap) );--luzmo-text-field-focus-indicator-width: var( --luzmo-search-focus-indicator-width, var(--search-focus-indicator-width) );--luzmo-text-field-focus-indicator-color: var( --luzmo-search-focus-indicator-color, var(--search-focus-indicator-color) );--luzmo-text-field-text-color-default: var( --luzmo-search-color-default, var(--search-color-default) );--luzmo-text-field-text-color-hover: var( --luzmo-search-color-hover, var(--search-color-hover) );--luzmo-text-field-text-color-focus: var( --luzmo-search-color-focus, var(--search-color-focus) );--luzmo-text-field-text-color-focus-hover: var( --luzmo-search-color-focus-hover, var(--search-color-focus-hover) );--luzmo-text-field-text-color-keyboard-focus: var( --luzmo-search-color-key-focus, var(--search-color-key-focus) );--luzmo-text-field-text-color-disabled: var( --luzmo-search-color-disabled, var(--search-color-disabled) );--luzmo-text-field-border-color: var( --luzmo-search-border-color-default, var(--search-border-color-default) );--luzmo-text-field-border-color-hover: var( --luzmo-search-border-color-hover, var(--search-border-color-hover) );--luzmo-text-field-border-color-focus: var( --luzmo-search-border-color-focus, var(--search-border-color-focus) );--luzmo-text-field-border-color-focus-hover: var( --luzmo-search-border-color-focus-hover, var(--search-border-color-focus-hover) );--luzmo-text-field-border-color-keyboard-focus: var( --luzmo-search-border-color-key-focus, var(--search-border-color-key-focus) );--luzmo-text-field-border-color-disabled: var( --luzmo-search-border-color-disabled, var(--search-border-color-disabled) );--luzmo-text-field-background-color: var( --luzmo-search-background-color, var(--search-background-color) );--luzmo-text-field-background-color-disabled: var( --luzmo-search-background-color-disabled, var(--search-background-color-disabled) );inline-size:var(--luzmo-search-inline-size, var(--search-inline-size));min-inline-size:var(--luzmo-search-min-inline-size, var(--search-min-inline-size));display:inline-block;position:relative}#text-field .luzmo-HelpText{margin-block-start:var(--luzmo-search-to-help-text, var(--search-to-help-text))}#button{position:absolute;inset-block-start:0;inset-inline-end:0;height:var(--search-block-size);width:var(--search-block-size)}#button,#button .luzmo-ClearButton-fill{border-radius:var(--luzmo-search-border-radius, var(--search-border-radius))}#text-field.is-disabled #button{display:none}#text-field{inline-size:100%}.icon-search{--search-color: var( --highcontrast-search-color-default, var(--luzmo-search-color-default, var(--search-color-default)) );color:var(--search-color);margin-block:auto;display:block;position:absolute;inset-block:0}#text-field.is-focused .icon-search{--search-color: var( --highcontrast-search-color-focus, var(--luzmo-search-color-focus, var(--search-color-focus)) )}#text-field.is-disabled .icon-search{--search-color: var( --highcontrast-search-color-disabled, var(--luzmo-search-color-disabled, var(--search-color-disabled)) )}@media (hover: hover){#text-field:hover .icon-search{--search-color: var( --highcontrast-search-color-hover, var(--luzmo-search-color-hover, var(--search-color-hover)) )}#text-field.is-focused:hover .icon-search{--search-color: var( --highcontrast-search-color-focus, var(--luzmo-search-color-focus-hover, var(--search-color-focus-hover)) )}#text-field.is-disabled:hover .icon-search{--search-color: var( --highcontrast-search-color-disabled, var(--luzmo-search-color-disabled, var(--search-color-disabled)) )}}.input{-webkit-appearance:none;-moz-appearance:none;appearance:none;block-size:var(--luzmo-search-block-size, var(--search-block-size));font-style:var(--luzmo-search-font-style, var(--search-font-style));line-height:var(--luzmo-search-line-height, var(--search-line-height));padding-block-start:calc(var(--luzmo-search-top-to-text, var(--search-top-to-text)) - var(--luzmo-search-border-width, var(--search-border-width)));padding-block-end:calc(var(--luzmo-search-bottom-to-text, var(--search-bottom-to-text)) - var(--luzmo-search-border-width, var(--search-border-width)))}.input::-webkit-search-cancel-button,.input::-webkit-search-decoration{-webkit-appearance:none;-moz-appearance:none;appearance:none}:host(:not([quiet])) #text-field .icon-search{inset-inline-start:var(--luzmo-search-edge-to-visual, var(--search-edge-to-visual))}:host(:not([quiet])) #text-field .input{padding-inline-start:calc(var(--luzmo-search-edge-to-visual, var(--search-edge-to-visual)) - var(--luzmo-search-border-width, var(--search-border-width)) + var(--luzmo-search-icon-size, var(--search-icon-size)) + var(--luzmo-search-text-to-icon, var(--search-text-to-icon)));padding-inline-end:calc(var(--luzmo-search-button-inline-size, var(--search-button-inline-size)) - var(--luzmo-search-border-width, var(--search-border-width)))}:host([quiet]){--search-quiet-button-offset: var( --luzmo-search-quiet-button-offset, calc( var(--luzmo-search-block-size, var(--search-block-size)) / 2 - var(--luzmo-search-icon-size, var(--search-icon-size)) / 2 ) )}:host([quiet]) #button .luzmo-ClearButton-icon{transform:translate(var(--search-quiet-button-offset))}:host([quiet]) #text-field .input{border-radius:var(--luzmo-search-border-radius, var(--search-border-radius));padding-block-start:var(--luzmo-search-top-to-text, var(--search-top-to-text));padding-inline-start:calc(var(--luzmo-search-edge-to-visual, var(--search-edge-to-visual)) + var(--luzmo-search-icon-size, var(--search-icon-size)) + var(--luzmo-search-text-to-icon, var(--search-text-to-icon)));padding-inline-end:calc(var(--luzmo-search-button-inline-size, var(--search-button-inline-size)) - var(--search-quiet-button-offset))}:host{--search-border-color-default: var(--luzmo-border-color);--search-border-color-hover: rgba(var(--luzmo-primary-rgb), .3);--search-border-color-focus: var(--luzmo-primary);--search-border-color-focus-hover: var(--luzmo-primary);--search-border-color-key-focus: var(--luzmo-primary);--search-inline-size: 192px;--search-min-inline-multiplier: 3;--search-to-help-text: 0px;--search-top-to-text: var(--luzmo-spacing-2);--search-bottom-to-text: var(--luzmo-spacing-2);--search-focus-indicator-width: var(--luzmo-indicator-width);--search-focus-indicator-gap: -1px;--search-focus-indicator-color: var(--luzmo-primary);--search-font-family: var(--luzmo-font-family);--search-font-weight: var(--luzmo-font-weight);--search-font-style: var(--luzmo-font-style);--search-line-height: var(--luzmo-line-height);--search-color-default: var(--luzmo-font-color);--search-color-hover: var(--luzmo-font-color-hover);--search-color-focus: var(--luzmo-font-color-focus);--search-color-focus-hover: var(--luzmo-font-focus);--search-color-key-focus: var(--luzmo-font-color-focus);--search-border-width: var(--luzmo-border-width);--search-background-color: var(--luzmo-background-color);--search-color-disabled: var(--luzmo-disabled-color);--search-background-color-disabled: var(--luzmo-background-color-disabled);--search-border-color-disabled: var(--luzmo-border-color-disabled)}:host #text-field{--search-border-radius: var(--luzmo-border-radius);--search-edge-to-visual: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--search-block-size: var(--luzmo-component-height);--search-icon-size: var(--luzmo-font-size-l);--search-text-to-icon: calc(var(--luzmo-spacing-3) + var(--luzmo-spacing-1))}:host([size=s]) #text-field{--search-border-radius: var(--luzmo-border-radius);--search-edge-to-visual: var(--luzmo-spacing-3);--search-block-size: var(--luzmo-component-height-s);--search-icon-size: var(--luzmo-font-size);--search-text-to-icon: var(--luzmo-spacing-3)}:host([size=l]) #text-field{--search-border-radius: var(--luzmo-border-radius);--search-edge-to-visual: var(--luzmo-spacing-4);--search-block-size: var(--luzmo-component-height-l);--search-icon-size: var(--luzmo-font-size-xl);--search-text-to-icon: calc(var(--luzmo-spacing-3) + var(--luzmo-spacing-1))}:host([size=xl]) #text-field{--search-border-radius: var(--luzmo-border-radius);--search-edge-to-visual: calc( var(--luzmo-spacing-4) + var(--luzmo-spacing-1) );--search-block-size: var(--luzmo-component-height-xl);--search-icon-size: var(--luzmo-font-size-xxl);--search-text-to-icon: var(--luzmo-spacing-4)}:host([quiet]) #text-field{--search-background-color: transparent;--search-background-color-disabled: transparent;--search-border-color-disabled: var(--luzmo-border-color-disabled);--search-border-radius: 0;--search-edge-to-visual: 0px}:host{--luzmo-text-field-spacing-inline: var(--alias-infield-button-full-height-m)}input::-webkit-search-cancel-button{display:none}@media (forced-colors: active){luzmo-clear-button{--clear-button-fill-background-color: transparent;--clear-button-fill-background-color-disabled: transparent;--clear-button-fill-background-color-down: transparent;--clear-button-fill-background-color-hover: transparent;--clear-button-fill-background-color-key-focus: transparent}}";var m=Object.defineProperty,t=(o,r,c,f)=>{for(var s=void 0,i=o.length-1,h;i>=0;i--)(h=o[i])&&(s=h(r,c,s)||s);return s&&m(r,c,s),s};const b=o=>o.stopPropagation(),z=o=>o==="s"?n.luzmoSearch12:o==="l"?n.luzmoSearch:n.luzmoSearch14;class e extends d.LuzmoTextField{constructor(){super(...arguments),this.action="",this.label="Search",this.placeholder="Search"}static get styles(){return[...super.styles,l.unsafeCSS(v)]}handleSubmit(r){this.dispatchEvent(new Event("submit",{cancelable:!0,bubbles:!0}))||r.preventDefault()}handleKeydown(r){const{code:c}=r;c==="Escape"&&this.holdValueOnEscape||!this.value||c!=="Escape"||this.reset()}async reset(){this.value="",await this.updateComplete,this.focusElement.dispatchEvent(new InputEvent("input",{bubbles:!0,composed:!0})),this.focusElement.dispatchEvent(new InputEvent("change",{bubbles:!0}))}renderField(){return l.html`
19
19
  <form
20
20
  action=${this.action}
21
21
  id="form"
22
- method=${u.o(this.method)}
22
+ method=${u.ifDefined(this.method)}
23
23
  @submit=${this.handleSubmit}
24
24
  @reset=${this.reset}
25
25
  @keydown=${this.handleKeydown}
@@ -31,15 +31,15 @@
31
31
  class="icon magnifier icon-workflow icon-search"
32
32
  ></luzmo-icon>
33
33
  ${super.renderField()}
34
- ${this.value?r.x`
34
+ ${this.value?l.html`
35
35
  <luzmo-clear-button
36
36
  id="button"
37
37
  label="Reset"
38
38
  tabindex="-1"
39
39
  type="reset"
40
- size=${u.o(this.size)}
40
+ size=${u.ifDefined(this.size)}
41
41
  @keydown=${b}
42
42
  ></luzmo-clear-button>
43
- `:r.E}
43
+ `:l.nothing}
44
44
  </form>
45
- `}firstUpdated(e){super.firstUpdated(e),this.hasAttribute("holdValueOnEscape")||this.inputElement.setAttribute("type","search")}willUpdate(){this.multiline=!1}}t([r.n()],o.prototype,"action");t([r.n()],o.prototype,"label");t([r.n({type:String,reflect:!0})],o.prototype,"border");t([r.n()],o.prototype,"method");t([r.n()],o.prototype,"placeholder");t([r.n({type:Boolean})],o.prototype,"holdValueOnEscape");t([h.e("#form")],o.prototype,"form");customElements.get("luzmo-search")||customElements.define("luzmo-search",o);exports.LuzmoSearch=o;
45
+ `}firstUpdated(r){super.firstUpdated(r),this.hasAttribute("holdValueOnEscape")||this.inputElement.setAttribute("type","search")}willUpdate(){this.multiline=!1}}t([a.property()],e.prototype,"action");t([a.property()],e.prototype,"label");t([a.property({type:String,reflect:!0})],e.prototype,"border");t([a.property()],e.prototype,"method");t([a.property()],e.prototype,"placeholder");t([a.property({type:Boolean})],e.prototype,"holdValueOnEscape");t([a.query("#form")],e.prototype,"form");customElements.get("luzmo-search")||customElements.define("luzmo-search",e);exports.LuzmoSearch=e;
@@ -15,17 +15,17 @@
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 { r as h, E as m, x as u, n as t } from "../base-WsynuqaS.js";
19
- import { e as z } from "../query-D_KR_GUc.js";
20
- import { o as n } from "../if-defined-DOaE2coe.js";
21
- import { l as b, z as f, n as v } from "../luzmo-icons-DbwDQtuO.js";
18
+ import { unsafeCSS as h, nothing as m, html as u } from "lit";
19
+ import { property as t, query as z } from "lit/decorators.js";
20
+ import { ifDefined as n } from "lit/directives/if-defined.js";
21
+ import { luzmoSearch12 as b, luzmoSearch as f, luzmoSearch14 as v } from "@luzmo/icons";
22
22
  import "../button/index.js";
23
23
  import "../icon/index.js";
24
- import { L as p } from "../text-field-BIADXoLC.js";
24
+ import { L as p } from "../text-field-BHaLKkf1.js";
25
25
  const d = () => {
26
26
  if (typeof document < "u" && !document.querySelector("style[data-luzmo-vars]")) {
27
27
  const o = document.createElement("style");
28
- 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);
28
+ 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);
29
29
  }
30
30
  };
31
31
  d();