@htmlbricks/hb-searchbar 0.66.7 → 0.66.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +43 -0
- package/manifest.json +1 -1
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
## `hb-searchbar` — searchbar
|
|
2
|
+
|
|
3
|
+
**Category:** utilities
|
|
4
|
+
**Tags:** utilities, search
|
|
5
|
+
|
|
6
|
+
### What it does
|
|
7
|
+
|
|
8
|
+
Search field with optional dropdown `searchlist` (id, text, icons, badges, tags, URLs). Configure `value`, `searchlabel`, `textarea`, `minlength`, `disable_preview`, and CSS parts for the input and menu. Dispatches `search` and `clear`.
|
|
9
|
+
|
|
10
|
+
### Custom element
|
|
11
|
+
|
|
12
|
+
`hb-searchbar`
|
|
13
|
+
|
|
14
|
+
### Attributes (snake_case; use string values in HTML)
|
|
15
|
+
|
|
16
|
+
- `id`, `style` (optional): strings.
|
|
17
|
+
- `value` (required): string — current query text.
|
|
18
|
+
- `searchlabel` (optional): string — button / field label.
|
|
19
|
+
- `minlength` (optional): number as string.
|
|
20
|
+
- `searchlist` (optional): JSON string — `TSearchListItem[]` (`id`, `text`, optional `url`, `icon`, `tags`, `badge`, `number_of_results`, `fixed`).
|
|
21
|
+
- `input_info` (optional): JSON string — single `TSearchListItem` for input adornment.
|
|
22
|
+
- `textarea` (optional): `"yes"` | `"true"` | `""` — multiline input mode.
|
|
23
|
+
- `disable_preview` (optional): `"yes"` | `"no"` | `"true"` | `"false"` | `"on"` | `"off"`.
|
|
24
|
+
|
|
25
|
+
### Events
|
|
26
|
+
|
|
27
|
+
- `search`: `{ input: string; by: "button" | "input" | "searchlist" }`.
|
|
28
|
+
- `clear`: `{ id: string }`.
|
|
29
|
+
|
|
30
|
+
### Usage notes
|
|
31
|
+
|
|
32
|
+
- **CSS parts:** `dropdown-menu`, `search-input`.
|
|
33
|
+
- Storybook may list `initial_value`; runtime props follow `webcomponent.type.d.ts` (`value` is required).
|
|
34
|
+
|
|
35
|
+
### Minimal HTML example
|
|
36
|
+
|
|
37
|
+
```html
|
|
38
|
+
<hb-searchbar
|
|
39
|
+
value=""
|
|
40
|
+
searchlabel="Search"
|
|
41
|
+
searchlist='[{"id":"1","text":"Suggestion"}]'
|
|
42
|
+
></hb-searchbar>
|
|
43
|
+
```
|
package/manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@htmlbricks/hb-searchbar",
|
|
3
|
-
"version": "0.66.
|
|
3
|
+
"version": "0.66.9",
|
|
4
4
|
"contributors": [],
|
|
5
5
|
"description": "Search field with optional dropdown `searchlist` (id, text, icons, badges, tags, URLs). Configure `value`, `initial_value`, `searchlabel`, `textarea`, `minlength`, `disable_preview`, and CSS parts for the input and menu. Dispatches `search` and `clear`.",
|
|
6
6
|
"licenses": [
|