@rcarls/rc-search-bar 0.1.0

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,672 @@
1
+ {
2
+ "schemaVersion": "1.0.0",
3
+ "readme": "",
4
+ "modules": [
5
+ {
6
+ "kind": "javascript-module",
7
+ "path": "src/define.ts",
8
+ "declarations": [],
9
+ "exports": [
10
+ {
11
+ "kind": "custom-element-definition",
12
+ "name": "rc-search-bar",
13
+ "declaration": {
14
+ "name": "RCSearchBar",
15
+ "module": "/src/index.js"
16
+ }
17
+ },
18
+ {
19
+ "kind": "js",
20
+ "name": "*",
21
+ "declaration": {
22
+ "name": "*",
23
+ "module": "src/index.js"
24
+ }
25
+ }
26
+ ]
27
+ },
28
+ {
29
+ "kind": "javascript-module",
30
+ "path": "src/index.ts",
31
+ "declarations": [],
32
+ "exports": [
33
+ {
34
+ "kind": "js",
35
+ "name": "*",
36
+ "declaration": {
37
+ "name": "*",
38
+ "module": "src/rc-search-bar"
39
+ }
40
+ }
41
+ ]
42
+ },
43
+ {
44
+ "kind": "javascript-module",
45
+ "path": "src/rc-search-bar.ts",
46
+ "declarations": [
47
+ {
48
+ "kind": "class",
49
+ "description": "Enhances a consumer-provided native `<input type=\"search\">` with leading\nicon chrome, an accessible clear button, and debounced search events.\n\nThe native input is required and stays in light DOM as the source of\ntruth, so form submission, `label[for]`/wrapping-label association, and\npre-upgrade behavior are preserved. Without a slotted search input the\ncomponent renders no chrome and stays inert.\n\nThe native WebKit cancel button is suppressed by default via an\nadopted document stylesheet. Set `allow-native-clear` to restore it.\nWhen 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`.",
50
+ "name": "RCSearchBar",
51
+ "cssProperties": [
52
+ {
53
+ "description": "Wrapper background",
54
+ "name": "--rc-search-bar-bg",
55
+ "default": "Field"
56
+ },
57
+ {
58
+ "description": "Wrapper text color",
59
+ "name": "--rc-search-bar-color",
60
+ "default": "FieldText"
61
+ },
62
+ {
63
+ "description": "Leading icon color",
64
+ "name": "--rc-search-bar-icon-color",
65
+ "default": "GrayText"
66
+ },
67
+ {
68
+ "description": "Clear button glyph color",
69
+ "name": "--rc-search-bar-clear-color",
70
+ "default": "GrayText"
71
+ },
72
+ {
73
+ "description": "Wrapper border radius",
74
+ "name": "--rc-search-bar-radius",
75
+ "default": "var(--rc-control-radius)"
76
+ },
77
+ {
78
+ "description": "Wrapper block size",
79
+ "name": "--rc-search-bar-height",
80
+ "default": "48px"
81
+ },
82
+ {
83
+ "description": "Wrapper horizontal padding",
84
+ "name": "--rc-search-bar-padding-inline",
85
+ "default": "0.5em"
86
+ },
87
+ {
88
+ "description": "Gap between icon, input, and clear button",
89
+ "name": "--rc-search-bar-gap",
90
+ "default": "0.25em"
91
+ },
92
+ {
93
+ "description": "Input font size (inherits when unset)",
94
+ "name": "--rc-search-bar-input-font-size"
95
+ },
96
+ {
97
+ "description": "Input font family (inherits when unset)",
98
+ "name": "--rc-search-bar-input-font-family"
99
+ },
100
+ {
101
+ "description": "Input text color (inherits when unset)",
102
+ "name": "--rc-search-bar-input-color"
103
+ }
104
+ ],
105
+ "cssParts": [
106
+ {
107
+ "description": "The wrapper element",
108
+ "name": "root"
109
+ },
110
+ {
111
+ "description": "Wrapper around the leading icon slot",
112
+ "name": "leading"
113
+ },
114
+ {
115
+ "description": "Wrapper around the trailing slot",
116
+ "name": "trailing"
117
+ },
118
+ {
119
+ "description": "The clear button",
120
+ "name": "clear"
121
+ }
122
+ ],
123
+ "slots": [
124
+ {
125
+ "description": "The required native `<input type=\"search\">`",
126
+ "name": ""
127
+ },
128
+ {
129
+ "description": "Decorative leading icon; mark it `aria-hidden=\"true\"`",
130
+ "name": "leading"
131
+ },
132
+ {
133
+ "description": "Optional trailing content after the clear button",
134
+ "name": "trailing"
135
+ },
136
+ {
137
+ "description": "Optional glyph replacing the default clear glyph",
138
+ "name": "clear-icon"
139
+ }
140
+ ],
141
+ "members": [
142
+ {
143
+ "kind": "field",
144
+ "name": "debounce",
145
+ "type": {
146
+ "text": "number"
147
+ },
148
+ "default": "200",
149
+ "description": "Debounce window in ms for `rc-search-bar-input`; `0` dispatches synchronously.",
150
+ "attribute": "debounce"
151
+ },
152
+ {
153
+ "kind": "field",
154
+ "name": "clearLabel",
155
+ "type": {
156
+ "text": "string"
157
+ },
158
+ "default": "'Clear search'",
159
+ "description": "Accessible label for the clear button.",
160
+ "attribute": "clear-label"
161
+ },
162
+ {
163
+ "kind": "field",
164
+ "name": "allowNativeClear",
165
+ "type": {
166
+ "text": "boolean"
167
+ },
168
+ "default": "false",
169
+ "description": "When set, leaves the browser's native WebKit cancel button visible.",
170
+ "attribute": "allow-native-clear",
171
+ "reflects": true
172
+ },
173
+ {
174
+ "kind": "field",
175
+ "name": "showClearOnFocus",
176
+ "type": {
177
+ "text": "boolean"
178
+ },
179
+ "default": "false",
180
+ "description": "When set, the clear button is visible whenever the input is focused,\neven with no value — matching the Apple HIG \"cancel\" pattern.\nConsider setting `clear-label=\"Cancel\"` in this mode.",
181
+ "attribute": "show-clear-on-focus"
182
+ },
183
+ {
184
+ "kind": "field",
185
+ "name": "disabled",
186
+ "type": {
187
+ "text": "boolean"
188
+ },
189
+ "description": "Disables the component and mirrors the state to the slotted input.",
190
+ "attribute": "disabled",
191
+ "reflects": true
192
+ },
193
+ {
194
+ "kind": "field",
195
+ "name": "placeholder",
196
+ "type": {
197
+ "text": "string | undefined"
198
+ },
199
+ "description": "Placeholder mirrored onto the native input. An author `placeholder`\nattribute already present on the input is never overwritten.",
200
+ "attribute": "placeholder"
201
+ },
202
+ {
203
+ "kind": "field",
204
+ "name": "_value",
205
+ "type": {
206
+ "text": "string | undefined"
207
+ },
208
+ "privacy": "private",
209
+ "default": "undefined"
210
+ },
211
+ {
212
+ "kind": "field",
213
+ "name": "_defaultValue",
214
+ "type": {
215
+ "text": "string | undefined"
216
+ },
217
+ "privacy": "private",
218
+ "default": "undefined"
219
+ },
220
+ {
221
+ "kind": "field",
222
+ "name": "_valueSetByHost",
223
+ "type": {
224
+ "text": "boolean"
225
+ },
226
+ "privacy": "private",
227
+ "default": "false"
228
+ },
229
+ {
230
+ "kind": "field",
231
+ "name": "_valueInitialized",
232
+ "type": {
233
+ "text": "boolean"
234
+ },
235
+ "privacy": "private",
236
+ "default": "false",
237
+ "description": "True once an author value, host write, or user input owns the value."
238
+ },
239
+ {
240
+ "kind": "field",
241
+ "name": "_authorPlaceholder",
242
+ "type": {
243
+ "text": "boolean"
244
+ },
245
+ "privacy": "private",
246
+ "default": "false"
247
+ },
248
+ {
249
+ "kind": "field",
250
+ "name": "_inputRef",
251
+ "type": {
252
+ "text": "WeakRef<HTMLInputElement> | null"
253
+ },
254
+ "privacy": "private",
255
+ "default": "null"
256
+ },
257
+ {
258
+ "kind": "field",
259
+ "name": "_debounceTimer",
260
+ "type": {
261
+ "text": "ReturnType<typeof setTimeout> | undefined"
262
+ },
263
+ "privacy": "private",
264
+ "default": "undefined"
265
+ },
266
+ {
267
+ "kind": "field",
268
+ "name": "_hasInput",
269
+ "type": {
270
+ "text": "boolean"
271
+ },
272
+ "privacy": "private",
273
+ "default": "false"
274
+ },
275
+ {
276
+ "kind": "field",
277
+ "name": "_hasValue",
278
+ "type": {
279
+ "text": "boolean"
280
+ },
281
+ "privacy": "private",
282
+ "default": "false"
283
+ },
284
+ {
285
+ "kind": "field",
286
+ "name": "_hasLeading",
287
+ "type": {
288
+ "text": "boolean"
289
+ },
290
+ "privacy": "private",
291
+ "default": "false"
292
+ },
293
+ {
294
+ "kind": "field",
295
+ "name": "_hasTrailing",
296
+ "type": {
297
+ "text": "boolean"
298
+ },
299
+ "privacy": "private",
300
+ "default": "false"
301
+ },
302
+ {
303
+ "kind": "field",
304
+ "name": "_inputDisabled",
305
+ "type": {
306
+ "text": "boolean"
307
+ },
308
+ "privacy": "private",
309
+ "default": "false"
310
+ },
311
+ {
312
+ "kind": "field",
313
+ "name": "_disabledHost",
314
+ "type": {
315
+ "text": "boolean | undefined"
316
+ },
317
+ "privacy": "private",
318
+ "default": "undefined"
319
+ },
320
+ {
321
+ "kind": "field",
322
+ "name": "_focused",
323
+ "type": {
324
+ "text": "boolean"
325
+ },
326
+ "privacy": "private",
327
+ "default": "false"
328
+ },
329
+ {
330
+ "kind": "field",
331
+ "name": "_lastInteractionWasPointer",
332
+ "type": {
333
+ "text": "boolean"
334
+ },
335
+ "privacy": "private",
336
+ "default": "false"
337
+ },
338
+ {
339
+ "kind": "field",
340
+ "name": "_onPointerDown",
341
+ "privacy": "private",
342
+ "readonly": true
343
+ },
344
+ {
345
+ "kind": "field",
346
+ "name": "_onFocusIn",
347
+ "privacy": "private",
348
+ "readonly": true
349
+ },
350
+ {
351
+ "kind": "field",
352
+ "name": "_onFocusOut",
353
+ "privacy": "private",
354
+ "readonly": true
355
+ },
356
+ {
357
+ "kind": "field",
358
+ "name": "_onInputFocus",
359
+ "privacy": "private",
360
+ "readonly": true
361
+ },
362
+ {
363
+ "kind": "field",
364
+ "name": "_onInputBlur",
365
+ "privacy": "private",
366
+ "readonly": true
367
+ },
368
+ {
369
+ "kind": "field",
370
+ "name": "_disabledObserver",
371
+ "privacy": "private",
372
+ "readonly": true,
373
+ "default": "new MutationObserver(() => { const input = this._input(); if (input) this._inputDisabled = input.disabled; })"
374
+ },
375
+ {
376
+ "kind": "field",
377
+ "name": "value",
378
+ "type": {
379
+ "text": "string"
380
+ },
381
+ "description": "The current search value. Reads from the native input when present.\nHost writes are silent (no events) and win over slotted author values."
382
+ },
383
+ {
384
+ "kind": "field",
385
+ "name": "defaultValue",
386
+ "type": {
387
+ "text": "string | undefined"
388
+ },
389
+ "description": "Initial uncontrolled value hint. Applied once, and only when neither an\nauthor `value`, a host `value` write, nor user input owns the value.",
390
+ "attribute": "default-value"
391
+ },
392
+ {
393
+ "kind": "method",
394
+ "name": "_input",
395
+ "privacy": "private",
396
+ "return": {
397
+ "type": {
398
+ "text": "HTMLInputElement | null"
399
+ }
400
+ }
401
+ },
402
+ {
403
+ "kind": "method",
404
+ "name": "_handleSlotChange",
405
+ "privacy": "private",
406
+ "return": {
407
+ "type": {
408
+ "text": "void"
409
+ }
410
+ },
411
+ "parameters": [
412
+ {
413
+ "name": "e",
414
+ "type": {
415
+ "text": "Event"
416
+ }
417
+ }
418
+ ]
419
+ },
420
+ {
421
+ "kind": "method",
422
+ "name": "_bindInput",
423
+ "privacy": "private",
424
+ "return": {
425
+ "type": {
426
+ "text": "void"
427
+ }
428
+ },
429
+ "parameters": [
430
+ {
431
+ "name": "input",
432
+ "type": {
433
+ "text": "HTMLInputElement"
434
+ }
435
+ }
436
+ ]
437
+ },
438
+ {
439
+ "kind": "method",
440
+ "name": "_applyPlaceholder",
441
+ "privacy": "private",
442
+ "return": {
443
+ "type": {
444
+ "text": "void"
445
+ }
446
+ },
447
+ "parameters": [
448
+ {
449
+ "name": "input",
450
+ "type": {
451
+ "text": "HTMLInputElement"
452
+ }
453
+ }
454
+ ]
455
+ },
456
+ {
457
+ "kind": "field",
458
+ "name": "_onNativeInput",
459
+ "privacy": "private",
460
+ "readonly": true
461
+ },
462
+ {
463
+ "kind": "method",
464
+ "name": "_scheduleInputEvent",
465
+ "privacy": "private",
466
+ "return": {
467
+ "type": {
468
+ "text": "void"
469
+ }
470
+ },
471
+ "parameters": [
472
+ {
473
+ "name": "value",
474
+ "type": {
475
+ "text": "string"
476
+ }
477
+ }
478
+ ]
479
+ },
480
+ {
481
+ "kind": "method",
482
+ "name": "_cancelPendingInput",
483
+ "privacy": "private",
484
+ "return": {
485
+ "type": {
486
+ "text": "void"
487
+ }
488
+ }
489
+ },
490
+ {
491
+ "kind": "method",
492
+ "name": "_dispatchInput",
493
+ "privacy": "private",
494
+ "return": {
495
+ "type": {
496
+ "text": "void"
497
+ }
498
+ },
499
+ "parameters": [
500
+ {
501
+ "name": "value",
502
+ "type": {
503
+ "text": "string"
504
+ }
505
+ }
506
+ ]
507
+ },
508
+ {
509
+ "kind": "method",
510
+ "name": "_handleClear",
511
+ "privacy": "private",
512
+ "return": {
513
+ "type": {
514
+ "text": "void"
515
+ }
516
+ }
517
+ },
518
+ {
519
+ "kind": "method",
520
+ "name": "clear",
521
+ "privacy": "public",
522
+ "return": {
523
+ "type": {
524
+ "text": "void"
525
+ }
526
+ },
527
+ "description": "Programmatically clears the value and fires rc-search-bar-clear + rc-search-bar-input."
528
+ },
529
+ {
530
+ "kind": "method",
531
+ "name": "_onLeadingSlotChange",
532
+ "privacy": "private",
533
+ "return": {
534
+ "type": {
535
+ "text": "void"
536
+ }
537
+ },
538
+ "parameters": [
539
+ {
540
+ "name": "e",
541
+ "type": {
542
+ "text": "Event"
543
+ }
544
+ }
545
+ ]
546
+ },
547
+ {
548
+ "kind": "method",
549
+ "name": "_onTrailingSlotChange",
550
+ "privacy": "private",
551
+ "return": {
552
+ "type": {
553
+ "text": "void"
554
+ }
555
+ },
556
+ "parameters": [
557
+ {
558
+ "name": "e",
559
+ "type": {
560
+ "text": "Event"
561
+ }
562
+ }
563
+ ]
564
+ }
565
+ ],
566
+ "events": [
567
+ {
568
+ "name": "rc-search-bar-input",
569
+ "type": {
570
+ "text": "CustomEvent"
571
+ },
572
+ "description": "Debounced after typing, immediate on clear; `detail: { value }`"
573
+ },
574
+ {
575
+ "name": "rc-search-bar-clear",
576
+ "type": {
577
+ "text": "CustomEvent"
578
+ },
579
+ "description": "When the clear button is activated"
580
+ }
581
+ ],
582
+ "attributes": [
583
+ {
584
+ "name": "debounce",
585
+ "type": {
586
+ "text": "number"
587
+ },
588
+ "default": "200",
589
+ "description": "Debounce window in ms for `rc-search-bar-input`; `0` dispatches synchronously.",
590
+ "fieldName": "debounce"
591
+ },
592
+ {
593
+ "name": "clear-label",
594
+ "type": {
595
+ "text": "string"
596
+ },
597
+ "default": "'Clear search'",
598
+ "description": "Accessible label for the clear button.",
599
+ "fieldName": "clearLabel"
600
+ },
601
+ {
602
+ "name": "allow-native-clear",
603
+ "type": {
604
+ "text": "boolean"
605
+ },
606
+ "default": "false",
607
+ "description": "When set, leaves the browser's native WebKit cancel button visible.",
608
+ "fieldName": "allowNativeClear"
609
+ },
610
+ {
611
+ "name": "show-clear-on-focus",
612
+ "type": {
613
+ "text": "boolean"
614
+ },
615
+ "default": "false",
616
+ "description": "When set, the clear button is visible whenever the input is focused,\neven with no value — matching the Apple HIG \"cancel\" pattern.\nConsider setting `clear-label=\"Cancel\"` in this mode.",
617
+ "fieldName": "showClearOnFocus"
618
+ },
619
+ {
620
+ "name": "disabled",
621
+ "type": {
622
+ "text": "boolean"
623
+ },
624
+ "description": "Disables the component and mirrors the state to the slotted input.",
625
+ "fieldName": "disabled"
626
+ },
627
+ {
628
+ "name": "placeholder",
629
+ "type": {
630
+ "text": "string | undefined"
631
+ },
632
+ "description": "Placeholder mirrored onto the native input. An author `placeholder`\nattribute already present on the input is never overwritten.",
633
+ "fieldName": "placeholder"
634
+ },
635
+ {
636
+ "name": "default-value",
637
+ "type": {
638
+ "text": "string | undefined"
639
+ },
640
+ "description": "Initial uncontrolled value hint. Applied once, and only when neither an\nauthor `value`, a host `value` write, nor user input owns the value.",
641
+ "fieldName": "defaultValue"
642
+ }
643
+ ],
644
+ "superclass": {
645
+ "name": "LitElement",
646
+ "package": "lit"
647
+ },
648
+ "tagName": "rc-search-bar",
649
+ "customElement": true
650
+ }
651
+ ],
652
+ "exports": [
653
+ {
654
+ "kind": "js",
655
+ "name": "RCSearchBar",
656
+ "declaration": {
657
+ "name": "RCSearchBar",
658
+ "module": "src/rc-search-bar.ts"
659
+ }
660
+ },
661
+ {
662
+ "kind": "js",
663
+ "name": "default",
664
+ "declaration": {
665
+ "name": "RCSearchBar",
666
+ "module": "src/rc-search-bar.ts"
667
+ }
668
+ }
669
+ ]
670
+ }
671
+ ]
672
+ }