@rcarls/rc-search-bar 0.3.2 → 0.4.1

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.
@@ -0,0 +1,525 @@
1
+ import { css as f, LitElement as g, html as d, nothing as _ } from "lit";
2
+ import { property as r, state as n } from "lit/decorators.js";
3
+ import { classMap as l } from "lit/directives/class-map.js";
4
+ import { NativeChildController as m, keyInteraction as y } from "@rcarls/rc-common";
5
+ const w = f`
6
+ :host {
7
+ display: inline-flex;
8
+ position: relative;
9
+ color-scheme: inherit;
10
+ }
11
+
12
+ [hidden] {
13
+ display: none !important;
14
+ }
15
+
16
+ #root {
17
+ display: flex;
18
+ flex: 1 1 auto;
19
+ align-items: center;
20
+ min-inline-size: 0;
21
+ gap: var(--rc-search-bar-gap, var(--rc-control-gap, 0.25em));
22
+ block-size: var(--rc-search-bar-height, var(--rc-control-block-size, 2.5rem));
23
+ padding-inline: var(--rc-search-bar-padding-inline, var(--rc-control-padding-inline, 0.75rem));
24
+ border: var(
25
+ --rc-search-bar-border,
26
+ var(--rc-border, 1px solid var(--rc-border-color, ButtonBorder))
27
+ );
28
+ border-radius: var(
29
+ --rc-search-bar-radius,
30
+ var(--rc-control-radius, var(--rc-radius-sm, 0.125em))
31
+ );
32
+ box-shadow: var(--rc-search-bar-shadow, none);
33
+ background: var(--rc-search-bar-bg, var(--rc-field, Field));
34
+ color: var(--rc-search-bar-color, var(--rc-field-text, FieldText));
35
+ font-family: var(--rc-font-family, inherit);
36
+ font-size: var(--rc-font-size, inherit);
37
+ line-height: var(--rc-line-height, normal);
38
+ transition:
39
+ background-color 120ms,
40
+ border-color 120ms,
41
+ box-shadow 120ms;
42
+ }
43
+
44
+ :host([data-interaction-mode='keyboard']) #root:focus-within {
45
+ outline: var(--rc-focus-ring, auto);
46
+ outline-offset: var(--rc-focus-ring-offset, 0);
47
+ }
48
+
49
+ /* No slotted search input: render no chrome at all. */
50
+ #root.empty {
51
+ block-size: auto;
52
+ padding: 0;
53
+ background: none;
54
+ border: none;
55
+ box-shadow: none;
56
+ border-radius: 0;
57
+ }
58
+
59
+ #leading {
60
+ display: flex;
61
+ flex: none;
62
+ align-items: center;
63
+ color: var(--rc-search-bar-icon-color, GrayText);
64
+ }
65
+
66
+ #leading.empty {
67
+ display: none;
68
+ }
69
+
70
+ ::slotted(input[type='search']) {
71
+ flex: 1 1 auto;
72
+ min-inline-size: 0;
73
+ padding: 0;
74
+ border: none;
75
+ background: transparent;
76
+ color: var(--rc-search-bar-input-color, inherit);
77
+ font-family: var(--rc-search-bar-input-font-family, inherit);
78
+ font-size: var(--rc-search-bar-input-font-size, inherit);
79
+ outline: none;
80
+ appearance: textfield;
81
+ }
82
+
83
+ #trailing {
84
+ display: flex;
85
+ flex: none;
86
+ align-items: center;
87
+ }
88
+
89
+ #trailing.empty {
90
+ display: none;
91
+ }
92
+
93
+ #clear {
94
+ display: inline-grid;
95
+ flex: none;
96
+ place-items: center;
97
+ min-inline-size: 24px;
98
+ min-block-size: 24px;
99
+ padding: 0;
100
+ border: none;
101
+ border-radius: 50%;
102
+ background: none;
103
+ color: var(--rc-search-bar-clear-color, GrayText);
104
+ font: inherit;
105
+ cursor: pointer;
106
+ }
107
+
108
+ #clear[inert] {
109
+ visibility: hidden;
110
+ }
111
+
112
+ #clear:focus-visible {
113
+ outline: var(--rc-focus-ring, auto);
114
+ outline-offset: var(--rc-focus-ring-offset, 0);
115
+ }
116
+
117
+ #view {
118
+ position: absolute;
119
+ z-index: 1;
120
+ inset-block-start: calc(100% + var(--rc-search-bar-view-offset, 0.25rem));
121
+ inset-inline: 0;
122
+ min-inline-size: 100%;
123
+ }
124
+
125
+ #view-surface {
126
+ box-sizing: border-box;
127
+ padding-block: var(--rc-search-bar-view-padding-block, 0.5rem);
128
+ border: var(
129
+ --rc-search-bar-view-border,
130
+ var(--rc-search-bar-border, var(--rc-border, 1px solid var(--rc-border-color, ButtonBorder)))
131
+ );
132
+ border-radius: var(
133
+ --rc-search-bar-view-radius,
134
+ var(--rc-search-bar-radius, var(--rc-control-radius, var(--rc-radius-sm, 0.125em)))
135
+ );
136
+ box-shadow: var(--rc-search-bar-view-shadow, var(--rc-search-bar-shadow, none));
137
+ background: var(--rc-search-bar-view-bg, var(--rc-search-bar-bg, var(--rc-field, Field)));
138
+ color: var(
139
+ --rc-search-bar-view-color,
140
+ var(--rc-search-bar-color, var(--rc-field-text, FieldText))
141
+ );
142
+ font-family: var(--rc-font-family, inherit);
143
+ font-size: var(--rc-font-size, inherit);
144
+ }
145
+
146
+ #view-surface.empty {
147
+ display: none;
148
+ }
149
+
150
+ #suggestions {
151
+ display: flex;
152
+ flex-direction: column;
153
+ }
154
+
155
+ #suggestions ::slotted(*) {
156
+ min-inline-size: 0;
157
+ }
158
+
159
+ [part='suggestion'] {
160
+ display: flex;
161
+ align-items: center;
162
+ min-block-size: var(--rc-search-bar-suggestion-min-block-size, 2.75rem);
163
+ padding-block: 0;
164
+ padding-inline: var(--rc-search-bar-suggestion-padding-inline, 1rem);
165
+ border: 0;
166
+ background: transparent;
167
+ color: inherit;
168
+ font: inherit;
169
+ text-align: start;
170
+ cursor: pointer;
171
+ }
172
+
173
+ [part='suggestion']:hover,
174
+ [part='suggestion']:focus-visible {
175
+ background: var(--rc-search-bar-suggestion-hover-bg, ButtonFace);
176
+ }
177
+
178
+ [part='suggestion']:focus-visible {
179
+ outline: var(--rc-focus-ring, auto);
180
+ outline-offset: var(--rc-focus-ring-offset, 0);
181
+ }
182
+ `;
183
+ var S = Object.defineProperty, L = Object.getOwnPropertyDescriptor, a = (p, e, t, i) => {
184
+ for (var o = i > 1 ? void 0 : i ? L(e, t) : e, h = p.length - 1, u; h >= 0; h--)
185
+ (u = p[h]) && (o = (i ? u(e, t, o) : u(o)) || o);
186
+ return i && o && S(e, t, o), o;
187
+ };
188
+ const v = new CSSStyleSheet();
189
+ v.replaceSync(
190
+ `rc-search-bar:not([allow-native-clear]) input[type="search"]::-webkit-search-cancel-button
191
+ { -webkit-appearance: none; display: none; }`
192
+ );
193
+ let b = !1;
194
+ function I() {
195
+ b || (document.adoptedStyleSheets = [...document.adoptedStyleSheets, v], b = !0);
196
+ }
197
+ const c = class c extends g {
198
+ constructor() {
199
+ super(...arguments), this.variant = "bar", this.debounce = 200, this.clearLabel = "Clear search", this.allowNativeClear = !1, this.showClearOnFocus = !1, this._open = !1, this._defaultOpen = !1, this._openInitialized = !1, this._value = void 0, this._defaultValue = void 0, this._valueSetByHost = !1, this._valueInitialized = !1, this._authorPlaceholder = !1, this._$inputRef = null, this._debounceTimer = void 0, this._$dataListRef = null, this._hasInput = !1, this._hasValue = !1, this._hasLeading = !1, this._hasTrailing = !1, this._inputDisabled = !1, this._hasSuggestionsSlot = !1, this._dataListSuggestions = [], this._disabledHost = void 0, this._focused = !1, this._onInputFocus = () => {
200
+ this._focused = !0, this.variant === "view" && this.showView();
201
+ }, this._onInputBlur = () => {
202
+ this._focused = !1;
203
+ }, this._disabledObserver = new MutationObserver(() => {
204
+ const e = this._$input();
205
+ e && (this._inputDisabled = e.disabled, this._syncDataListSuggestions(e));
206
+ }), this._dataListObserver = new MutationObserver(() => this._syncDataListSuggestions()), this._inputController = new m(this, {
207
+ selector: ':scope > input[type="search"]',
208
+ observe: { childList: !0, attributes: !0, attributeFilter: ["list"] },
209
+ onChange: (e, t) => this._setupInput(e, t),
210
+ onMissing: () => {
211
+ }
212
+ }), this._onNativeInput = (e) => {
213
+ const t = e.currentTarget;
214
+ this._valueInitialized = !0, this._hasValue = t.value.length > 0, this._scheduleInputEvent(t.value);
215
+ }, this._onNativeKeyDown = (e) => {
216
+ e.key === "Escape" && this.open && (e.preventDefault(), this.closeView());
217
+ };
218
+ }
219
+ get disabled() {
220
+ return this._disabledHost ?? this._inputDisabled;
221
+ }
222
+ set disabled(e) {
223
+ const t = this.disabled;
224
+ this._disabledHost = e;
225
+ const i = this._$input();
226
+ i && (i.disabled = e), this.requestUpdate("disabled", t);
227
+ }
228
+ get open() {
229
+ return this._open;
230
+ }
231
+ set open(e) {
232
+ const t = this._open;
233
+ this._open = e, this._openInitialized = !0, this.requestUpdate("open", t);
234
+ }
235
+ get defaultOpen() {
236
+ return this._defaultOpen;
237
+ }
238
+ set defaultOpen(e) {
239
+ const t = this._defaultOpen;
240
+ this._defaultOpen = e, this._openInitialized || (this._open = e), this.requestUpdate("defaultOpen", t);
241
+ }
242
+ get value() {
243
+ return this._$input()?.value ?? this._value ?? this._defaultValue ?? "";
244
+ }
245
+ set value(e) {
246
+ const t = this.value;
247
+ this._value = e, this._valueSetByHost = !0, this._valueInitialized = !0;
248
+ const i = this._$input();
249
+ i && (i.value = e), this._hasValue = e.length > 0, this.requestUpdate("value", t);
250
+ }
251
+ get defaultValue() {
252
+ return this._defaultValue;
253
+ }
254
+ set defaultValue(e) {
255
+ const t = this._defaultValue;
256
+ this._defaultValue = e;
257
+ const i = this._$input();
258
+ i && e !== void 0 && !this._valueInitialized && (i.value = e, this._hasValue = e.length > 0), this.requestUpdate("defaultValue", t);
259
+ }
260
+ connectedCallback() {
261
+ super.connectedCallback(), I();
262
+ }
263
+ disconnectedCallback() {
264
+ super.disconnectedCallback(), this._focused = !1, this._open = !1, this._cancelPendingInput();
265
+ const e = this._$input();
266
+ e?.removeEventListener("input", this._onNativeInput), e?.removeEventListener("focus", this._onInputFocus), e?.removeEventListener("blur", this._onInputBlur), e?.removeEventListener("keydown", this._onNativeKeyDown), this._disabledObserver.disconnect(), this._dataListObserver.disconnect();
267
+ }
268
+ updated(e) {
269
+ if (e.has("placeholder")) {
270
+ const t = this._$input();
271
+ t && this._applyPlaceholder(t);
272
+ }
273
+ if (e.has("variant") && this.variant !== "view" && this._open) {
274
+ const t = this._open;
275
+ this._open = !1, this.requestUpdate("open", t);
276
+ }
277
+ }
278
+ _$input() {
279
+ return this._$inputRef?.deref() ?? null;
280
+ }
281
+ _handleSlotChange() {
282
+ this._inputController.sync();
283
+ }
284
+ _setupInput(e, t) {
285
+ if (t && t !== e && (t.removeEventListener("input", this._onNativeInput), t.removeEventListener("focus", this._onInputFocus), t.removeEventListener("blur", this._onInputBlur), t.removeEventListener("keydown", this._onNativeKeyDown)), this._disabledObserver.disconnect(), this._dataListObserver.disconnect(), this._focused = !1, this._$inputRef = e ? new WeakRef(e) : null, this._hasInput = e !== null, this._authorPlaceholder = e?.hasAttribute("placeholder") ?? !1, !e) {
286
+ this._hasValue = !1, this._dataListSuggestions = [], this._$dataListRef = null;
287
+ return;
288
+ }
289
+ queueMicrotask(() => {
290
+ e.isConnected && (this._valueSetByHost ? e.value = this._value ?? "" : e.value ? this._valueInitialized = !0 : this._defaultValue !== void 0 && !this._valueInitialized && (e.value = this._defaultValue), this._applyPlaceholder(e), this._disabledHost !== void 0 && (e.disabled = this._disabledHost), this._inputDisabled = e.disabled, this._hasValue = e.value.length > 0, this._syncDataListSuggestions(e), this._bindInput(e));
291
+ });
292
+ }
293
+ _bindInput(e) {
294
+ e.addEventListener("input", this._onNativeInput), e.addEventListener("focus", this._onInputFocus), e.addEventListener("blur", this._onInputBlur), e.addEventListener("keydown", this._onNativeKeyDown), this._disabledObserver.observe(e, { attributeFilter: ["disabled", "list"] });
295
+ }
296
+ _applyPlaceholder(e) {
297
+ this.placeholder === void 0 || this._authorPlaceholder || (e.placeholder = this.placeholder);
298
+ }
299
+ _scheduleInputEvent(e) {
300
+ if (this._cancelPendingInput(), this.debounce <= 0) {
301
+ this._dispatchInput(e);
302
+ return;
303
+ }
304
+ this._debounceTimer = setTimeout(() => {
305
+ this._debounceTimer = void 0, this._dispatchInput(e);
306
+ }, this.debounce);
307
+ }
308
+ _cancelPendingInput() {
309
+ this._debounceTimer !== void 0 && (clearTimeout(this._debounceTimer), this._debounceTimer = void 0);
310
+ }
311
+ _dispatchInput(e) {
312
+ this.dispatchEvent(
313
+ new CustomEvent("rc-search-bar-input", {
314
+ bubbles: !0,
315
+ composed: !0,
316
+ detail: { value: e }
317
+ })
318
+ );
319
+ }
320
+ _setUserOpen(e) {
321
+ if (this._open === e)
322
+ return;
323
+ const t = this._open;
324
+ this._open = e, this._openInitialized = !0, this.requestUpdate("open", t), this.dispatchEvent(
325
+ new CustomEvent("rc-search-bar-toggle", {
326
+ bubbles: !0,
327
+ composed: !0,
328
+ detail: { open: e }
329
+ })
330
+ );
331
+ }
332
+ /** Opens the search view and fires `rc-search-bar-toggle` when it changes. */
333
+ showView() {
334
+ this.variant !== "view" || this.disabled || this._setUserOpen(!0);
335
+ }
336
+ /** Closes the search view and fires `rc-search-bar-toggle` when it changes. */
337
+ closeView() {
338
+ this._setUserOpen(!1);
339
+ }
340
+ /** Toggles the search view and fires `rc-search-bar-toggle` when it changes. */
341
+ toggleView() {
342
+ this.open ? this.closeView() : this.showView();
343
+ }
344
+ _syncDataListSuggestions(e = this._$input()) {
345
+ const t = e?.list ?? null;
346
+ this._$dataListRef?.deref() !== t && (this._dataListObserver.disconnect(), this._$dataListRef = t ? new WeakRef(t) : null, t && this._dataListObserver.observe(t, {
347
+ childList: !0,
348
+ subtree: !0,
349
+ attributes: !0,
350
+ attributeFilter: ["value", "label", "disabled"]
351
+ })), this._dataListSuggestions = t ? Array.from(t.options).filter((i) => !i.disabled && i.value).map((i) => ({
352
+ value: i.value,
353
+ label: i.label || i.textContent?.trim() || i.value
354
+ })) : [];
355
+ }
356
+ _selectDataListSuggestion(e) {
357
+ const t = this._$input();
358
+ t && (this._cancelPendingInput(), t.value = e.value, this._valueInitialized = !0, this._hasValue = e.value.length > 0, this.dispatchEvent(
359
+ new CustomEvent("rc-search-bar-suggestion-select", {
360
+ bubbles: !0,
361
+ composed: !0,
362
+ detail: e
363
+ })
364
+ ), this._dispatchInput(e.value), t.focus(), this.closeView());
365
+ }
366
+ _handleClear() {
367
+ const e = this._$input();
368
+ e && (this._cancelPendingInput(), e.value = "", this._valueInitialized = !0, this._hasValue = !1, this.dispatchEvent(
369
+ new CustomEvent("rc-search-bar-clear", {
370
+ bubbles: !0,
371
+ composed: !0,
372
+ detail: {}
373
+ })
374
+ ), this._dispatchInput(""), e.focus());
375
+ }
376
+ render() {
377
+ return d`
378
+ <div
379
+ id="root"
380
+ part="root"
381
+ class=${l({ empty: !this._hasInput })}
382
+ ${y({ attributeTarget: this })}
383
+ >
384
+ <span
385
+ id="leading"
386
+ part="leading"
387
+ class=${l({ empty: !this._hasLeading || !this._hasInput })}
388
+ >
389
+ <slot name="leading" @slotchange=${this._onLeadingSlotChange}></slot>
390
+ </span>
391
+
392
+ <slot @slotchange=${this._handleSlotChange}></slot>
393
+
394
+ <button
395
+ id="clear"
396
+ part="clear"
397
+ type="button"
398
+ aria-label=${this.clearLabel}
399
+ ?hidden=${!this._hasInput}
400
+ ?inert=${this._hasInput && !this._hasValue && !(this.showClearOnFocus && this._focused)}
401
+ ?disabled=${this._inputDisabled}
402
+ @click=${this._handleClear}
403
+ >
404
+ <slot name="clear-icon"><span aria-hidden="true">&#10005;</span></slot>
405
+ </button>
406
+
407
+ <span id="trailing" part="trailing" class=${l({ empty: !this._hasTrailing })}>
408
+ <slot name="trailing" @slotchange=${this._onTrailingSlotChange}></slot>
409
+ </span>
410
+ </div>
411
+ ${this._renderSearchView()}
412
+ `;
413
+ }
414
+ /** Programmatically clears the value and fires rc-search-bar-clear + rc-search-bar-input. */
415
+ clear() {
416
+ this._handleClear();
417
+ }
418
+ _renderSearchView() {
419
+ if (this.variant !== "view" || !this.open)
420
+ return _;
421
+ const e = !this._hasSuggestionsSlot && this._dataListSuggestions.length > 0, t = !this._hasSuggestionsSlot && !e;
422
+ return d`
423
+ <div id="view">
424
+ <div
425
+ id="view-surface"
426
+ part="view"
427
+ ?hidden=${t}
428
+ class=${l({
429
+ empty: t
430
+ })}
431
+ >
432
+ <div id="suggestions" part="suggestions">
433
+ <slot name="suggestions" @slotchange=${this._onSuggestionsSlotChange}></slot>
434
+ ${e ? this._dataListSuggestions.map(
435
+ (i) => d`
436
+ <button
437
+ part="suggestion"
438
+ type="button"
439
+ @click=${() => this._selectDataListSuggestion(i)}
440
+ >
441
+ <span>${i.label}</span>
442
+ </button>
443
+ `
444
+ ) : _}
445
+ </div>
446
+ </div>
447
+ </div>
448
+ `;
449
+ }
450
+ _onLeadingSlotChange(e) {
451
+ const t = e.target;
452
+ this._hasLeading = t.assignedElements().length > 0;
453
+ }
454
+ _onTrailingSlotChange(e) {
455
+ const t = e.target;
456
+ this._hasTrailing = t.assignedElements().length > 0;
457
+ }
458
+ _onSuggestionsSlotChange(e) {
459
+ const t = e.target;
460
+ this._hasSuggestionsSlot = t.assignedElements({ flatten: !0 }).length > 0;
461
+ }
462
+ };
463
+ c.styles = [w];
464
+ let s = c;
465
+ a([
466
+ r({ type: String, reflect: !0 })
467
+ ], s.prototype, "variant", 2);
468
+ a([
469
+ r({ type: Number })
470
+ ], s.prototype, "debounce", 2);
471
+ a([
472
+ r({ type: String, attribute: "clear-label" })
473
+ ], s.prototype, "clearLabel", 2);
474
+ a([
475
+ r({ type: Boolean, attribute: "allow-native-clear", reflect: !0 })
476
+ ], s.prototype, "allowNativeClear", 2);
477
+ a([
478
+ r({ type: Boolean, attribute: "show-clear-on-focus" })
479
+ ], s.prototype, "showClearOnFocus", 2);
480
+ a([
481
+ r({ type: Boolean, reflect: !0 })
482
+ ], s.prototype, "disabled", 1);
483
+ a([
484
+ r({ type: String })
485
+ ], s.prototype, "placeholder", 2);
486
+ a([
487
+ n()
488
+ ], s.prototype, "_hasInput", 2);
489
+ a([
490
+ n()
491
+ ], s.prototype, "_hasValue", 2);
492
+ a([
493
+ n()
494
+ ], s.prototype, "_hasLeading", 2);
495
+ a([
496
+ n()
497
+ ], s.prototype, "_hasTrailing", 2);
498
+ a([
499
+ n()
500
+ ], s.prototype, "_inputDisabled", 2);
501
+ a([
502
+ n()
503
+ ], s.prototype, "_hasSuggestionsSlot", 2);
504
+ a([
505
+ n()
506
+ ], s.prototype, "_dataListSuggestions", 2);
507
+ a([
508
+ n()
509
+ ], s.prototype, "_focused", 2);
510
+ a([
511
+ r({ type: Boolean, reflect: !0 })
512
+ ], s.prototype, "open", 1);
513
+ a([
514
+ r({ type: Boolean, attribute: "default-open" })
515
+ ], s.prototype, "defaultOpen", 1);
516
+ a([
517
+ r({ attribute: !1 })
518
+ ], s.prototype, "value", 1);
519
+ a([
520
+ r({ type: String, attribute: "default-value" })
521
+ ], s.prototype, "defaultValue", 1);
522
+ export {
523
+ s as R
524
+ };
525
+ //# sourceMappingURL=rc-search-bar-D0uhitIm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rc-search-bar-D0uhitIm.js","sources":["../src/rc-search-bar.styles.ts","../src/rc-search-bar.ts"],"sourcesContent":["import { css } from 'lit';\n\nexport const searchBarStyles = css`\n :host {\n display: inline-flex;\n position: relative;\n color-scheme: inherit;\n }\n\n [hidden] {\n display: none !important;\n }\n\n #root {\n display: flex;\n flex: 1 1 auto;\n align-items: center;\n min-inline-size: 0;\n gap: var(--rc-search-bar-gap, var(--rc-control-gap, 0.25em));\n block-size: var(--rc-search-bar-height, var(--rc-control-block-size, 2.5rem));\n padding-inline: var(--rc-search-bar-padding-inline, var(--rc-control-padding-inline, 0.75rem));\n border: var(\n --rc-search-bar-border,\n var(--rc-border, 1px solid var(--rc-border-color, ButtonBorder))\n );\n border-radius: var(\n --rc-search-bar-radius,\n var(--rc-control-radius, var(--rc-radius-sm, 0.125em))\n );\n box-shadow: var(--rc-search-bar-shadow, none);\n background: var(--rc-search-bar-bg, var(--rc-field, Field));\n color: var(--rc-search-bar-color, var(--rc-field-text, FieldText));\n font-family: var(--rc-font-family, inherit);\n font-size: var(--rc-font-size, inherit);\n line-height: var(--rc-line-height, normal);\n transition:\n background-color 120ms,\n border-color 120ms,\n box-shadow 120ms;\n }\n\n :host([data-interaction-mode='keyboard']) #root:focus-within {\n outline: var(--rc-focus-ring, auto);\n outline-offset: var(--rc-focus-ring-offset, 0);\n }\n\n /* No slotted search input: render no chrome at all. */\n #root.empty {\n block-size: auto;\n padding: 0;\n background: none;\n border: none;\n box-shadow: none;\n border-radius: 0;\n }\n\n #leading {\n display: flex;\n flex: none;\n align-items: center;\n color: var(--rc-search-bar-icon-color, GrayText);\n }\n\n #leading.empty {\n display: none;\n }\n\n ::slotted(input[type='search']) {\n flex: 1 1 auto;\n min-inline-size: 0;\n padding: 0;\n border: none;\n background: transparent;\n color: var(--rc-search-bar-input-color, inherit);\n font-family: var(--rc-search-bar-input-font-family, inherit);\n font-size: var(--rc-search-bar-input-font-size, inherit);\n outline: none;\n appearance: textfield;\n }\n\n #trailing {\n display: flex;\n flex: none;\n align-items: center;\n }\n\n #trailing.empty {\n display: none;\n }\n\n #clear {\n display: inline-grid;\n flex: none;\n place-items: center;\n min-inline-size: 24px;\n min-block-size: 24px;\n padding: 0;\n border: none;\n border-radius: 50%;\n background: none;\n color: var(--rc-search-bar-clear-color, GrayText);\n font: inherit;\n cursor: pointer;\n }\n\n #clear[inert] {\n visibility: hidden;\n }\n\n #clear:focus-visible {\n outline: var(--rc-focus-ring, auto);\n outline-offset: var(--rc-focus-ring-offset, 0);\n }\n\n #view {\n position: absolute;\n z-index: 1;\n inset-block-start: calc(100% + var(--rc-search-bar-view-offset, 0.25rem));\n inset-inline: 0;\n min-inline-size: 100%;\n }\n\n #view-surface {\n box-sizing: border-box;\n padding-block: var(--rc-search-bar-view-padding-block, 0.5rem);\n border: var(\n --rc-search-bar-view-border,\n var(--rc-search-bar-border, var(--rc-border, 1px solid var(--rc-border-color, ButtonBorder)))\n );\n border-radius: var(\n --rc-search-bar-view-radius,\n var(--rc-search-bar-radius, var(--rc-control-radius, var(--rc-radius-sm, 0.125em)))\n );\n box-shadow: var(--rc-search-bar-view-shadow, var(--rc-search-bar-shadow, none));\n background: var(--rc-search-bar-view-bg, var(--rc-search-bar-bg, var(--rc-field, Field)));\n color: var(\n --rc-search-bar-view-color,\n var(--rc-search-bar-color, var(--rc-field-text, FieldText))\n );\n font-family: var(--rc-font-family, inherit);\n font-size: var(--rc-font-size, inherit);\n }\n\n #view-surface.empty {\n display: none;\n }\n\n #suggestions {\n display: flex;\n flex-direction: column;\n }\n\n #suggestions ::slotted(*) {\n min-inline-size: 0;\n }\n\n [part='suggestion'] {\n display: flex;\n align-items: center;\n min-block-size: var(--rc-search-bar-suggestion-min-block-size, 2.75rem);\n padding-block: 0;\n padding-inline: var(--rc-search-bar-suggestion-padding-inline, 1rem);\n border: 0;\n background: transparent;\n color: inherit;\n font: inherit;\n text-align: start;\n cursor: pointer;\n }\n\n [part='suggestion']:hover,\n [part='suggestion']:focus-visible {\n background: var(--rc-search-bar-suggestion-hover-bg, ButtonFace);\n }\n\n [part='suggestion']:focus-visible {\n outline: var(--rc-focus-ring, auto);\n outline-offset: var(--rc-focus-ring-offset, 0);\n }\n`;\n\nexport default searchBarStyles;\n","import { LitElement, html, nothing, type PropertyValues } from 'lit';\nimport { property, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\n\nimport { NativeChildController, keyInteraction, warnMissingDirectChild } from '@rcarls/rc-common';\n\nimport searchBarStyles from './rc-search-bar.styles';\n\nconst _uaClearSheet = new CSSStyleSheet();\n\n_uaClearSheet.replaceSync(\n `rc-search-bar:not([allow-native-clear]) input[type=\"search\"]::-webkit-search-cancel-button\n { -webkit-appearance: none; display: none; }`,\n);\n\nlet _uaClearSuppressed = false;\n\nfunction _suppressUaClear(): void {\n if (_uaClearSuppressed) {\n return;\n }\n\n document.adoptedStyleSheets = [...document.adoptedStyleSheets, _uaClearSheet];\n\n _uaClearSuppressed = true;\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'rc-search-bar': RCSearchBar;\n }\n\n interface HTMLElementEventMap {\n 'rc-search-bar-input': CustomEvent<RCSearchBarInputDetail>;\n 'rc-search-bar-clear': CustomEvent<Record<string, never>>;\n 'rc-search-bar-toggle': CustomEvent<RCSearchBarToggleDetail>;\n 'rc-search-bar-suggestion-select': CustomEvent<RCSearchBarSuggestionSelectDetail>;\n }\n}\n\nexport interface RCSearchBarInputDetail {\n /** The native input's value at dispatch time. */\n value: string;\n}\n\nexport interface RCSearchBarToggleDetail {\n /** Whether the search view is open after the user action. */\n open: boolean;\n}\n\nexport interface RCSearchBarSuggestionSelectDetail {\n /** Value written to the native search input. */\n value: string;\n\n /** Human-readable option label, when different from value. */\n label: string;\n}\n\nexport type RCSearchBarVariant = 'bar' | 'view';\n\ninterface RCSearchBarSuggestion {\n value: string;\n label: string;\n}\n\n/**\n * Search field wrapper for a native <input type=\"search\"> with icon chrome, clear button,\n * and debounced events.\n *\n * The native input is required and stays in light DOM as the source of\n * truth, so form submission, `label[for]`/wrapping-label association, and\n * pre-upgrade behavior are preserved. Without a slotted search input the\n * component renders no chrome and stays inert.\n *\n * The native WebKit cancel button is suppressed by default via an\n * adopted document stylesheet. Set `allow-native-clear` to restore it.\n * When restored, the native button clears through the normal input path\n * (a debounced `rc-search-bar-input` with an empty value) and never fires\n * `rc-search-bar-clear`.\n *\n * @see {@link https://richardcarls.github.io/rc-webcomponents/components/rc-search-bar rc-search-bar docs}\n *\n * @slot - The required native `<input type=\"search\">`\n * @slot leading - Decorative leading icon; mark it `aria-hidden=\"true\"`\n * @slot trailing - Optional trailing content after the clear button\n * @slot clear-icon - Optional glyph replacing the default clear glyph\n * @slot suggestions - Rich search view suggestions; takes precedence over\n * datalist-derived suggestions.\n *\n * @fires rc-search-bar-input - Debounced after typing, immediate on clear;\n * `detail: { value }`\n * @fires rc-search-bar-clear - When the clear button is activated\n * @fires rc-search-bar-toggle - When user interaction opens or closes the\n * search view; `detail: { open }`\n * @fires rc-search-bar-suggestion-select - When a datalist-derived suggestion\n * is activated; `detail: { value, label }`\n *\n * @attr variant - Presentation mode: docked search bar or expandable search view.\n * @attr debounce - Debounce window in ms for `rc-search-bar-input`; `0` dispatches synchronously.\n * @attr clear-label - Accessible label for the clear button.\n * @attr allow-native-clear - When set, leaves the browser's native WebKit cancel button visible.\n * @attr show-clear-on-focus - When set, the clear button is visible whenever the input is focused.\n * @attr disabled - Disables the component and mirrors the state to the slotted input.\n * @attr placeholder - Placeholder mirrored onto the native input; a consumer `placeholder`\n * attribute on the input itself is always honored instead.\n * @attr open - Whether the search view panel is open. Host writes are silent.\n * @attr default-open - Initial uncontrolled search view open state.\n * @attr default-value - Initial uncontrolled value hint, applied once.\n *\n * @cssprop [--rc-search-bar-border=1px solid ButtonBorder] - Wrapper border; set to `none` in M3 theme (uses elevation instead)\n * @cssprop [--rc-search-bar-shadow=none] - Wrapper box-shadow for elevation; M3 theme sets Level 1 at rest\n * @cssprop [--rc-search-bar-bg=Field] - Wrapper background\n * @cssprop [--rc-search-bar-color=FieldText] - Wrapper text color\n * @cssprop [--rc-search-bar-icon-color=GrayText] - Leading icon color\n * @cssprop [--rc-search-bar-clear-color=GrayText] - Clear button glyph color\n * @cssprop [--rc-search-bar-radius=var(--rc-control-radius,0.125em)] - Wrapper border radius\n * @cssprop [--rc-search-bar-height=var(--rc-control-block-size,2.5rem)] - Wrapper block size\n * @cssprop [--rc-search-bar-padding-inline=var(--rc-control-padding-inline,0.75rem)] - Wrapper horizontal padding\n * @cssprop [--rc-search-bar-gap=var(--rc-control-gap,0.25em)] - Gap between icon, input, and clear button\n * @cssprop [--rc-search-bar-input-font-size] - Input font size (inherits when unset)\n * @cssprop [--rc-search-bar-input-font-family] - Input font family (inherits when unset)\n * @cssprop [--rc-search-bar-input-color] - Input text color (inherits when unset)\n * @cssprop [--rc-search-bar-view-bg=var(--rc-search-bar-bg)] - Search view panel background\n * @cssprop [--rc-search-bar-view-color=var(--rc-search-bar-color)] - Search view panel text color\n * @cssprop [--rc-search-bar-view-radius=var(--rc-search-bar-radius)] - Search view panel radius\n * @cssprop [--rc-search-bar-view-shadow=var(--rc-search-bar-shadow)] - Search view panel shadow\n * @cssprop [--rc-search-bar-view-border=var(--rc-search-bar-border)] - Search view panel border\n * @cssprop [--rc-search-bar-view-offset=0.25rem] - Gap between the search bar and the view panel below it\n * @cssprop [--rc-search-bar-view-padding-block=0.5rem] - Search view suggestion list block padding\n * @cssprop [--rc-search-bar-suggestion-min-block-size=2.75rem] - Datalist-derived suggestion row minimum block size\n * @cssprop [--rc-search-bar-suggestion-padding-inline=1rem] - Datalist-derived suggestion inline padding\n * @cssprop [--rc-search-bar-suggestion-hover-bg=ButtonFace] - Datalist-derived suggestion hover/focus background\n * @csspart root - The wrapper element\n * @csspart leading - Wrapper around the leading icon slot\n * @csspart trailing - Wrapper around the trailing slot\n * @csspart clear - The clear button\n * @csspart view - Search view panel\n * @csspart suggestions - Suggestions container\n * @csspart suggestion - Datalist-derived suggestion button\n */\nexport class RCSearchBar extends LitElement {\n static styles = [searchBarStyles];\n\n /** Presentation mode: docked search bar or expandable search view. */\n @property({ type: String, reflect: true })\n variant: RCSearchBarVariant = 'bar';\n\n /** Debounce window in ms for `rc-search-bar-input`; `0` dispatches synchronously. */\n @property({ type: Number })\n debounce = 200;\n\n /** Accessible label for the clear button. */\n @property({ type: String, attribute: 'clear-label' })\n clearLabel = 'Clear search';\n\n /** When set, leaves the browser's native WebKit cancel button visible. */\n @property({ type: Boolean, attribute: 'allow-native-clear', reflect: true })\n allowNativeClear = false;\n\n /**\n * When set, the clear button is visible whenever the input is focused.\n *\n * Matching the Apple HIG \"cancel\" pattern.\n * Consider setting `clear-label=\"Cancel\"` in this mode.\n */\n @property({ type: Boolean, attribute: 'show-clear-on-focus' })\n showClearOnFocus = false;\n\n /** Disables the component and mirrors the state to the slotted input. */\n @property({ type: Boolean, reflect: true })\n get disabled(): boolean {\n // _disabledHost holds what the host last set; fall back to what the input\n // actually reports (kept in sync by the MutationObserver).\n return this._disabledHost ?? this._inputDisabled;\n }\n\n set disabled(value: boolean) {\n const old = this.disabled;\n\n this._disabledHost = value;\n\n const $input = this._$input();\n\n if ($input) {\n $input.disabled = value;\n }\n\n this.requestUpdate('disabled', old);\n }\n\n /**\n * Placeholder mirrored onto the native input.\n *\n * Consumer `placeholder` attribute is always honored.\n */\n @property({ type: String })\n placeholder?: string;\n\n private _open = false;\n\n private _defaultOpen = false;\n\n private _openInitialized = false;\n\n private _value: string | undefined = undefined;\n\n private _defaultValue: string | undefined = undefined;\n\n private _valueSetByHost = false;\n\n /** True once an author value, host write, or user input owns the value. */\n private _valueInitialized = false;\n\n private _authorPlaceholder = false;\n\n private _$inputRef: WeakRef<HTMLInputElement> | null = null;\n\n private _debounceTimer: ReturnType<typeof setTimeout> | undefined = undefined;\n\n private _$dataListRef: WeakRef<HTMLDataListElement> | null = null;\n\n @state()\n private _hasInput = false;\n\n @state()\n private _hasValue = false;\n\n @state()\n private _hasLeading = false;\n\n @state()\n private _hasTrailing = false;\n\n @state()\n private _inputDisabled = false;\n\n @state()\n private _hasSuggestionsSlot = false;\n\n @state()\n private _dataListSuggestions: RCSearchBarSuggestion[] = [];\n\n // Tracks the last value written via the disabled setter so the getter and\n // Lit's reflect can return it before the input is slotted.\n private _disabledHost: boolean | undefined = undefined;\n\n @state()\n private _focused = false;\n\n private readonly _onInputFocus = (): void => {\n this._focused = true;\n\n if (this.variant === 'view') {\n this.showView();\n }\n };\n\n private readonly _onInputBlur = (): void => {\n this._focused = false;\n };\n\n private readonly _disabledObserver = new MutationObserver(() => {\n const $input = this._$input();\n\n if ($input) {\n this._inputDisabled = $input.disabled;\n this._syncDataListSuggestions($input);\n }\n });\n\n private readonly _dataListObserver = new MutationObserver(() => this._syncDataListSuggestions());\n\n private readonly _inputController = new NativeChildController<HTMLInputElement>(this, {\n selector: ':scope > input[type=\"search\"]',\n observe: { childList: true, attributes: true, attributeFilter: ['list'] },\n onChange: ($input, $previousInput) => this._setupInput($input, $previousInput),\n onMissing: () => {\n if (import.meta.env.DEV) {\n warnMissingDirectChild(this, {\n selector: ':scope > input[type=\"search\"]',\n message:\n '[rc-search-bar] No direct child <input type=\"search\"> found. ' +\n 'Place a native search input inside <rc-search-bar>.',\n });\n }\n },\n });\n\n /** Whether the search view panel is open. Host writes are silent. */\n @property({ type: Boolean, reflect: true })\n get open(): boolean {\n return this._open;\n }\n\n set open(value: boolean) {\n const oldValue = this._open;\n\n this._open = value;\n this._openInitialized = true;\n\n this.requestUpdate('open', oldValue);\n }\n\n /** Initial uncontrolled search view open state. */\n @property({ type: Boolean, attribute: 'default-open' })\n get defaultOpen(): boolean {\n return this._defaultOpen;\n }\n\n set defaultOpen(value: boolean) {\n const oldValue = this._defaultOpen;\n\n this._defaultOpen = value;\n\n if (!this._openInitialized) {\n this._open = value;\n }\n\n this.requestUpdate('defaultOpen', oldValue);\n }\n\n /**\n * The current search value. Reads from the native input when present.\n * Host writes are silent (no events) and win over slotted author values.\n */\n @property({ attribute: false })\n get value(): string {\n return this._$input()?.value ?? this._value ?? this._defaultValue ?? '';\n }\n\n set value(value: string) {\n const oldValue = this.value;\n\n this._value = value;\n this._valueSetByHost = true;\n this._valueInitialized = true;\n\n const $input = this._$input();\n\n if ($input) {\n $input.value = value;\n }\n\n this._hasValue = value.length > 0;\n\n this.requestUpdate('value', oldValue);\n }\n\n /**\n * Initial uncontrolled value hint. Applied once, and only when neither an\n * author `value`, a host `value` write, nor user input owns the value.\n */\n @property({ type: String, attribute: 'default-value' })\n get defaultValue(): string | undefined {\n return this._defaultValue;\n }\n\n set defaultValue(value: string | undefined) {\n const oldValue = this._defaultValue;\n\n this._defaultValue = value;\n\n const $input = this._$input();\n\n if ($input && value !== undefined && !this._valueInitialized) {\n $input.value = value;\n this._hasValue = value.length > 0;\n }\n\n this.requestUpdate('defaultValue', oldValue);\n }\n\n override connectedCallback(): void {\n super.connectedCallback();\n\n _suppressUaClear();\n }\n\n override disconnectedCallback(): void {\n super.disconnectedCallback();\n\n this._focused = false;\n this._open = false;\n this._cancelPendingInput();\n\n const $input = this._$input();\n\n $input?.removeEventListener('input', this._onNativeInput);\n $input?.removeEventListener('focus', this._onInputFocus);\n $input?.removeEventListener('blur', this._onInputBlur);\n $input?.removeEventListener('keydown', this._onNativeKeyDown);\n\n this._disabledObserver.disconnect();\n this._dataListObserver.disconnect();\n }\n\n protected override updated(changed: PropertyValues<this>): void {\n if (changed.has('placeholder')) {\n const $input = this._$input();\n\n if ($input) {\n this._applyPlaceholder($input);\n }\n }\n\n if (changed.has('variant') && this.variant !== 'view' && this._open) {\n const oldOpen = this._open;\n\n this._open = false;\n this.requestUpdate('open', oldOpen);\n }\n }\n\n private _$input(): HTMLInputElement | null {\n return this._$inputRef?.deref() ?? null;\n }\n\n private _handleSlotChange(): void {\n this._inputController.sync();\n }\n\n private _setupInput(\n $input: HTMLInputElement | null,\n $previousInput: HTMLInputElement | null,\n ): void {\n if ($previousInput && $previousInput !== $input) {\n $previousInput.removeEventListener('input', this._onNativeInput);\n $previousInput.removeEventListener('focus', this._onInputFocus);\n $previousInput.removeEventListener('blur', this._onInputBlur);\n $previousInput.removeEventListener('keydown', this._onNativeKeyDown);\n }\n\n this._disabledObserver.disconnect();\n this._dataListObserver.disconnect();\n this._focused = false;\n\n this._$inputRef = $input ? new WeakRef($input) : null;\n this._hasInput = $input !== null;\n this._authorPlaceholder = $input?.hasAttribute('placeholder') ?? false;\n\n if (!$input) {\n this._hasValue = false;\n this._dataListSuggestions = [];\n this._$dataListRef = null;\n\n return;\n }\n\n // Deferred reads keep framework render cycles (e.g. SolidJS) untouched.\n queueMicrotask(() => {\n if (!$input.isConnected) {\n return;\n }\n\n if (this._valueSetByHost) {\n $input.value = this._value ?? '';\n } else if ($input.value) {\n // An author-provided value wins over defaultValue.\n this._valueInitialized = true;\n } else if (this._defaultValue !== undefined && !this._valueInitialized) {\n $input.value = this._defaultValue;\n }\n\n this._applyPlaceholder($input);\n\n if (this._disabledHost !== undefined) {\n $input.disabled = this._disabledHost;\n }\n\n this._inputDisabled = $input.disabled;\n this._hasValue = $input.value.length > 0;\n this._syncDataListSuggestions($input);\n\n if (\n import.meta.env.DEV &&\n !$input.labels?.length &&\n !$input.getAttribute('aria-label') &&\n !$input.getAttribute('aria-labelledby')\n ) {\n console.warn(\n '[rc-search-bar] Slotted <input type=\"search\"> has no accessible name.',\n 'Add aria-label, wrap in <label>, or use <label for=\"...\">.',\n $input,\n );\n }\n\n this._bindInput($input);\n });\n }\n\n private _bindInput($input: HTMLInputElement): void {\n $input.addEventListener('input', this._onNativeInput);\n $input.addEventListener('focus', this._onInputFocus);\n $input.addEventListener('blur', this._onInputBlur);\n $input.addEventListener('keydown', this._onNativeKeyDown);\n\n this._disabledObserver.observe($input, { attributeFilter: ['disabled', 'list'] });\n }\n\n private _applyPlaceholder($input: HTMLInputElement): void {\n if (this.placeholder === undefined || this._authorPlaceholder) {\n return;\n }\n\n $input.placeholder = this.placeholder;\n }\n\n private readonly _onNativeInput = (e: Event): void => {\n const $input = e.currentTarget as HTMLInputElement;\n\n this._valueInitialized = true;\n this._hasValue = $input.value.length > 0;\n this._scheduleInputEvent($input.value);\n };\n\n private readonly _onNativeKeyDown = (e: KeyboardEvent): void => {\n if (e.key === 'Escape' && this.open) {\n e.preventDefault();\n this.closeView();\n }\n };\n\n private _scheduleInputEvent(value: string): void {\n this._cancelPendingInput();\n\n if (this.debounce <= 0) {\n this._dispatchInput(value);\n\n return;\n }\n\n this._debounceTimer = setTimeout(() => {\n this._debounceTimer = undefined;\n this._dispatchInput(value);\n }, this.debounce);\n }\n\n private _cancelPendingInput(): void {\n if (this._debounceTimer === undefined) {\n return;\n }\n\n clearTimeout(this._debounceTimer);\n this._debounceTimer = undefined;\n }\n\n private _dispatchInput(value: string): void {\n this.dispatchEvent(\n new CustomEvent<RCSearchBarInputDetail>('rc-search-bar-input', {\n bubbles: true,\n composed: true,\n detail: { value },\n }),\n );\n }\n\n private _setUserOpen(open: boolean): void {\n if (this._open === open) {\n return;\n }\n\n const oldOpen = this._open;\n\n this._open = open;\n this._openInitialized = true;\n this.requestUpdate('open', oldOpen);\n\n this.dispatchEvent(\n new CustomEvent<RCSearchBarToggleDetail>('rc-search-bar-toggle', {\n bubbles: true,\n composed: true,\n detail: { open },\n }),\n );\n }\n\n /** Opens the search view and fires `rc-search-bar-toggle` when it changes. */\n public showView(): void {\n if (this.variant !== 'view' || this.disabled) {\n return;\n }\n\n this._setUserOpen(true);\n }\n\n /** Closes the search view and fires `rc-search-bar-toggle` when it changes. */\n public closeView(): void {\n this._setUserOpen(false);\n }\n\n /** Toggles the search view and fires `rc-search-bar-toggle` when it changes. */\n public toggleView(): void {\n this.open ? this.closeView() : this.showView();\n }\n\n private _syncDataListSuggestions($input = this._$input()): void {\n const $dataList = $input?.list ?? null;\n\n if (this._$dataListRef?.deref() !== $dataList) {\n this._dataListObserver.disconnect();\n this._$dataListRef = $dataList ? new WeakRef($dataList) : null;\n\n if ($dataList) {\n this._dataListObserver.observe($dataList, {\n childList: true,\n subtree: true,\n attributes: true,\n attributeFilter: ['value', 'label', 'disabled'],\n });\n }\n }\n\n this._dataListSuggestions = $dataList\n ? Array.from($dataList.options)\n .filter(($option) => !$option.disabled && $option.value)\n .map(($option) => ({\n value: $option.value,\n label: $option.label || $option.textContent?.trim() || $option.value,\n }))\n : [];\n }\n\n private _selectDataListSuggestion(suggestion: RCSearchBarSuggestion): void {\n const $input = this._$input();\n\n if (!$input) {\n return;\n }\n\n this._cancelPendingInput();\n\n $input.value = suggestion.value;\n this._valueInitialized = true;\n this._hasValue = suggestion.value.length > 0;\n\n this.dispatchEvent(\n new CustomEvent<RCSearchBarSuggestionSelectDetail>('rc-search-bar-suggestion-select', {\n bubbles: true,\n composed: true,\n detail: suggestion,\n }),\n );\n\n this._dispatchInput(suggestion.value);\n $input.focus();\n this.closeView();\n }\n\n private _handleClear(): void {\n const $input = this._$input();\n\n if (!$input) {\n return;\n }\n\n this._cancelPendingInput();\n\n $input.value = '';\n\n this._valueInitialized = true;\n this._hasValue = false;\n\n this.dispatchEvent(\n new CustomEvent('rc-search-bar-clear', {\n bubbles: true,\n composed: true,\n detail: {},\n }),\n );\n\n this._dispatchInput('');\n\n // Refocus before the re-render hides the button, so focus never drops\n // to <body>.\n $input.focus();\n }\n\n protected override render() {\n return html`\n <div\n id=\"root\"\n part=\"root\"\n class=${classMap({ empty: !this._hasInput })}\n ${keyInteraction({ attributeTarget: this })}\n >\n <span\n id=\"leading\"\n part=\"leading\"\n class=${classMap({ empty: !this._hasLeading || !this._hasInput })}\n >\n <slot name=\"leading\" @slotchange=${this._onLeadingSlotChange}></slot>\n </span>\n\n <slot @slotchange=${this._handleSlotChange}></slot>\n\n <button\n id=\"clear\"\n part=\"clear\"\n type=\"button\"\n aria-label=${this.clearLabel}\n ?hidden=${!this._hasInput}\n ?inert=${this._hasInput && !this._hasValue && !(this.showClearOnFocus && this._focused)}\n ?disabled=${this._inputDisabled}\n @click=${this._handleClear}\n >\n <slot name=\"clear-icon\"><span aria-hidden=\"true\">&#10005;</span></slot>\n </button>\n\n <span id=\"trailing\" part=\"trailing\" class=${classMap({ empty: !this._hasTrailing })}>\n <slot name=\"trailing\" @slotchange=${this._onTrailingSlotChange}></slot>\n </span>\n </div>\n ${this._renderSearchView()}\n `;\n }\n\n /** Programmatically clears the value and fires rc-search-bar-clear + rc-search-bar-input. */\n public clear(): void {\n this._handleClear();\n }\n\n private _renderSearchView() {\n if (this.variant !== 'view' || !this.open) {\n return nothing;\n }\n\n const hasDataListSuggestions =\n !this._hasSuggestionsSlot && this._dataListSuggestions.length > 0;\n const empty = !this._hasSuggestionsSlot && !hasDataListSuggestions;\n\n return html`\n <div id=\"view\">\n <div\n id=\"view-surface\"\n part=\"view\"\n ?hidden=${empty}\n class=${classMap({\n empty,\n })}\n >\n <div id=\"suggestions\" part=\"suggestions\">\n <slot name=\"suggestions\" @slotchange=${this._onSuggestionsSlotChange}></slot>\n ${hasDataListSuggestions\n ? this._dataListSuggestions.map(\n (suggestion) => html`\n <button\n part=\"suggestion\"\n type=\"button\"\n @click=${() => this._selectDataListSuggestion(suggestion)}\n >\n <span>${suggestion.label}</span>\n </button>\n `,\n )\n : nothing}\n </div>\n </div>\n </div>\n `;\n }\n\n private _onLeadingSlotChange(e: Event): void {\n const $slot = e.target as HTMLSlotElement;\n\n this._hasLeading = $slot.assignedElements().length > 0;\n }\n\n private _onTrailingSlotChange(e: Event): void {\n const $slot = e.target as HTMLSlotElement;\n\n this._hasTrailing = $slot.assignedElements().length > 0;\n }\n\n private _onSuggestionsSlotChange(e: Event): void {\n const $slot = e.target as HTMLSlotElement;\n\n this._hasSuggestionsSlot = $slot.assignedElements({ flatten: true }).length > 0;\n }\n}\n\nexport default RCSearchBar;\n"],"names":["searchBarStyles","css","_uaClearSheet","_uaClearSuppressed","_suppressUaClear","_RCSearchBar","LitElement","$input","NativeChildController","$previousInput","value","old","oldValue","changed","oldOpen","open","$dataList","$option","suggestion","html","classMap","keyInteraction","nothing","hasDataListSuggestions","empty","$slot","RCSearchBar","__decorateClass","property","state"],"mappings":";;;;AAEO,MAAMA,IAAkBC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA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,SAAS,IAAM;AAAA,GArJ/BF,EAsJP,WAAA,QAAA,CAAA;AAeAC,EAAA;AAAA,EADHC,EAAS,EAAE,MAAM,SAAS,WAAW,gBAAgB;AAAA,GApK3CF,EAqKP,WAAA,eAAA,CAAA;AAqBAC,EAAA;AAAA,EADHC,EAAS,EAAE,WAAW,GAAA,CAAO;AAAA,GAzLnBF,EA0LP,WAAA,SAAA,CAAA;AA2BAC,EAAA;AAAA,EADHC,EAAS,EAAE,MAAM,QAAQ,WAAW,iBAAiB;AAAA,GApN3CF,EAqNP,WAAA,gBAAA,CAAA;"}
@@ -1,4 +1,4 @@
1
- import { R as e } from "./rc-search-bar-DVczVFvA.js";
1
+ import { R as e } from "./rc-search-bar-D0uhitIm.js";
2
2
  customElements.get("rc-search-bar") || customElements.define("rc-search-bar", e);
3
3
  export {
4
4
  e as RCSearchBar
@@ -1,4 +1,4 @@
1
- import { R as e } from "./rc-search-bar-DVczVFvA.js";
1
+ import { R as e } from "./rc-search-bar-D0uhitIm.js";
2
2
  export {
3
3
  e as RCSearchBar
4
4
  };