@digital-realty/ix-search-bar 2.0.6 → 2.1.3

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 (44) hide show
  1. package/LICENSE +20 -20
  2. package/README.md +67 -67
  3. package/dist/{src/IxSearchBar.d.ts → IxSearchBar.d.ts} +22 -22
  4. package/dist/{src/IxSearchBar.js → IxSearchBar.js} +85 -85
  5. package/dist/IxSearchBar.js.map +1 -0
  6. package/dist/{src/index.d.ts → index.d.ts} +1 -1
  7. package/{src/index.ts → dist/index.js} +2 -1
  8. package/dist/index.js.map +1 -0
  9. package/dist/{src/ix-search-bar-styles.d.ts → ix-search-bar-styles.d.ts} +1 -1
  10. package/dist/{src/ix-search-bar-styles.js → ix-search-bar-styles.js} +28 -28
  11. package/dist/ix-search-bar-styles.js.map +1 -0
  12. package/dist/{src/ix-search-bar.d.ts → ix-search-bar.d.ts} +1 -1
  13. package/{src/ix-search-bar.ts → dist/ix-search-bar.js} +3 -3
  14. package/dist/ix-search-bar.js.map +1 -0
  15. package/dist/{src/react → react}/IxSearchBar.d.ts +2 -2
  16. package/dist/{src/react → react}/IxSearchBar.js +9 -9
  17. package/dist/react/IxSearchBar.js.map +1 -0
  18. package/dist/{src/types → types}/index.d.ts +13 -13
  19. package/dist/types/index.js +2 -0
  20. package/dist/types/index.js.map +1 -0
  21. package/package.json +104 -100
  22. package/dist/d5054844.js +0 -70
  23. package/dist/index.html +0 -1
  24. package/dist/src/IxSearchBar.js.map +0 -1
  25. package/dist/src/index.js +0 -2
  26. package/dist/src/index.js.map +0 -1
  27. package/dist/src/ix-search-bar-styles.js.map +0 -1
  28. package/dist/src/ix-search-bar.js +0 -3
  29. package/dist/src/ix-search-bar.js.map +0 -1
  30. package/dist/src/react/IxSearchBar.js.map +0 -1
  31. package/dist/src/types/index.js +0 -2
  32. package/dist/src/types/index.js.map +0 -1
  33. package/dist/sw.js +0 -2
  34. package/dist/sw.js.map +0 -1
  35. package/dist/test/ix-search-bar.test.d.ts +0 -1
  36. package/dist/test/ix-search-bar.test.js +0 -3
  37. package/dist/test/ix-search-bar.test.js.map +0 -1
  38. package/dist/tsconfig.tsbuildinfo +0 -1
  39. package/dist/workbox-1fb78e9e.js +0 -2
  40. package/dist/workbox-1fb78e9e.js.map +0 -1
  41. package/src/IxSearchBar.ts +0 -94
  42. package/src/ix-search-bar-styles.ts +0 -29
  43. package/src/react/IxSearchBar.ts +0 -11
  44. package/src/types/index.ts +0 -12
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2023 ix-search-bar
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1
+ MIT License
2
+
3
+ Copyright (c) 2023 ix-search-bar
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
21
  SOFTWARE.
package/README.md CHANGED
@@ -1,67 +1,67 @@
1
- # \<ix-search-bar>
2
-
3
- This webcomponent follows the [open-wc](https://github.com/open-wc/open-wc) recommendation.
4
-
5
- ## Installation
6
-
7
- ```bash
8
- npm i @digital-realty/ix-search-bar
9
- ```
10
-
11
- ## Usage
12
-
13
- ```html
14
- <script type="module">
15
- import '@digital-realty/ix-search-bar';
16
- </script>
17
-
18
- <ix-search-bar></ix-search-bar>
19
- ```
20
- ### In React
21
- ```html
22
- <script type="module">
23
- import { IxSearchBar } from '@digital-realty/ix-search-bar/IxSearchBar'
24
- </script>
25
- ```
26
- ## Linting and formatting
27
-
28
- To scan the project for linting and formatting errors, run
29
-
30
- ```bash
31
- npm run lint
32
- ```
33
-
34
- To automatically fix linting and formatting errors, run
35
-
36
- ```bash
37
- npm run format
38
- ```
39
-
40
- ## Testing with Web Test Runner
41
-
42
- To execute a single test run:
43
-
44
- ```bash
45
- npm run test
46
- ```
47
-
48
- To run the tests in interactive watch mode run:
49
-
50
- ```bash
51
- npm run test:watch
52
- ```
53
-
54
-
55
- ## Tooling configs
56
-
57
- For most of the tools, the configuration is in the `package.json` to reduce the amount of files in your project.
58
-
59
- If you customize the configuration a lot, you can consider moving them to individual files.
60
-
61
- ## Local Demo with `web-dev-server`
62
-
63
- ```bash
64
- npm start
65
- ```
66
-
67
- To run a local development server that serves the basic demo located in `demo/index.html`
1
+ # \<ix-search-bar>
2
+
3
+ This webcomponent follows the [open-wc](https://github.com/open-wc/open-wc) recommendation.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm i @digital-realty/ix-search-bar
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```html
14
+ <script type="module">
15
+ import '@digital-realty/ix-search-bar';
16
+ </script>
17
+
18
+ <ix-search-bar></ix-search-bar>
19
+ ```
20
+ ### In React
21
+ ```html
22
+ <script type="module">
23
+ import { IxSearchBar } from '@digital-realty/ix-search-bar/IxSearchBar'
24
+ </script>
25
+ ```
26
+ ## Linting and formatting
27
+
28
+ To scan the project for linting and formatting errors, run
29
+
30
+ ```bash
31
+ npm run lint
32
+ ```
33
+
34
+ To automatically fix linting and formatting errors, run
35
+
36
+ ```bash
37
+ npm run format
38
+ ```
39
+
40
+ ## Testing with Web Test Runner
41
+
42
+ To execute a single test run:
43
+
44
+ ```bash
45
+ npm run test
46
+ ```
47
+
48
+ To run the tests in interactive watch mode run:
49
+
50
+ ```bash
51
+ npm run test:watch
52
+ ```
53
+
54
+
55
+ ## Tooling configs
56
+
57
+ For most of the tools, the configuration is in the `package.json` to reduce the amount of files in your project.
58
+
59
+ If you customize the configuration a lot, you can consider moving them to individual files.
60
+
61
+ ## Local Demo with `web-dev-server`
62
+
63
+ ```bash
64
+ npm start
65
+ ```
66
+
67
+ To run a local development server that serves the basic demo located in `demo/index.html`
@@ -1,22 +1,22 @@
1
- import { LitElement } from 'lit';
2
- import '@digital-realty/ix-textbox';
3
- import { Item } from './types/index.js';
4
- export declare class IxSearchBar extends LitElement {
5
- value: string;
6
- items: Item[];
7
- searchFields: string[];
8
- foundItems: Item[];
9
- static get styles(): import("lit").CSSResult[];
10
- connectedCallback(): void;
11
- resetResults(): void;
12
- get itemsCount(): number;
13
- get itemsLabel(): "item" | "items";
14
- _dispatchEvent(items: Item[]): void;
15
- filterItems(value: string): void;
16
- render(): import("lit-html").TemplateResult<1>;
17
- }
18
- declare global {
19
- interface HTMLElementTagNameMap {
20
- 'ix-search-bar': IxSearchBar;
21
- }
22
- }
1
+ import { LitElement } from 'lit';
2
+ import '@digital-realty/ix-textbox';
3
+ import { Item } from './types/index.js';
4
+ export declare class IxSearchBar extends LitElement {
5
+ value: string;
6
+ items: Item[];
7
+ searchFields: string[];
8
+ foundItems: Item[];
9
+ static get styles(): import("lit").CSSResult[];
10
+ connectedCallback(): void;
11
+ resetResults(): void;
12
+ get itemsCount(): number;
13
+ get itemsLabel(): "item" | "items";
14
+ _dispatchEvent(items: Item[]): void;
15
+ filterItems(value: string): void;
16
+ render(): import("lit-html").TemplateResult<1>;
17
+ }
18
+ declare global {
19
+ interface HTMLElementTagNameMap {
20
+ 'ix-search-bar': IxSearchBar;
21
+ }
22
+ }
@@ -1,86 +1,86 @@
1
- import { __decorate } from "tslib";
2
- import { html, LitElement } from 'lit';
3
- import { property } from 'lit/decorators.js';
4
- import '@digital-realty/ix-textbox';
5
- import { IxSearchBarStyle } from './ix-search-bar-styles.js';
6
- export class IxSearchBar extends LitElement {
7
- constructor() {
8
- super(...arguments);
9
- this.value = '';
10
- this.items = [];
11
- this.searchFields = [];
12
- this.foundItems = [];
13
- }
14
- static get styles() {
15
- return [IxSearchBarStyle];
16
- }
17
- connectedCallback() {
18
- super.connectedCallback();
19
- this.resetResults();
20
- }
21
- resetResults() {
22
- this.foundItems = this.items;
23
- }
24
- get itemsCount() {
25
- if (Array.isArray(this.foundItems) && this.foundItems.length) {
26
- return this.foundItems.length;
27
- }
28
- return 0;
29
- }
30
- get itemsLabel() {
31
- return this.itemsCount === 1 ? 'item' : 'items';
32
- }
33
- _dispatchEvent(items) {
34
- const resultsEvent = new CustomEvent('onResultsFound', {
35
- detail: { items },
36
- composed: true,
37
- });
38
- this.dispatchEvent(resultsEvent);
39
- }
40
- filterItems(value) {
41
- this.value = value;
42
- if (value === '') {
43
- this.resetResults();
44
- this._dispatchEvent(this.items);
45
- return;
46
- }
47
- const results = [];
48
- for (const item of this.items) {
49
- for (const field of this.searchFields) {
50
- if (field in item) {
51
- if (item[field]
52
- .toLocaleLowerCase()
53
- .includes(this.value.toLocaleLowerCase())) {
54
- results.push(item);
55
- break;
56
- }
57
- }
58
- }
59
- }
60
- this.foundItems = results;
61
- this._dispatchEvent(results);
62
- }
63
- render() {
64
- return html `
65
- <ix-textbox
66
- type="search"
67
- @textChange="${(e) => this.filterItems(e.detail.value)}"
68
- ></ix-textbox>
69
-
70
- <div class="items-count">${this.itemsCount} ${this.itemsLabel}</div>
71
- `;
72
- }
73
- }
74
- __decorate([
75
- property({ type: String })
76
- ], IxSearchBar.prototype, "value", void 0);
77
- __decorate([
78
- property({ type: Array })
79
- ], IxSearchBar.prototype, "items", void 0);
80
- __decorate([
81
- property({ type: Array })
82
- ], IxSearchBar.prototype, "searchFields", void 0);
83
- __decorate([
84
- property({ type: Array })
85
- ], IxSearchBar.prototype, "foundItems", void 0);
1
+ import { __decorate } from "tslib";
2
+ import { html, LitElement } from 'lit';
3
+ import { property } from 'lit/decorators.js';
4
+ import '@digital-realty/ix-textbox';
5
+ import { IxSearchBarStyle } from './ix-search-bar-styles.js';
6
+ export class IxSearchBar extends LitElement {
7
+ constructor() {
8
+ super(...arguments);
9
+ this.value = '';
10
+ this.items = [];
11
+ this.searchFields = [];
12
+ this.foundItems = [];
13
+ }
14
+ static get styles() {
15
+ return [IxSearchBarStyle];
16
+ }
17
+ connectedCallback() {
18
+ super.connectedCallback();
19
+ this.resetResults();
20
+ }
21
+ resetResults() {
22
+ this.foundItems = this.items;
23
+ }
24
+ get itemsCount() {
25
+ if (Array.isArray(this.foundItems) && this.foundItems.length) {
26
+ return this.foundItems.length;
27
+ }
28
+ return 0;
29
+ }
30
+ get itemsLabel() {
31
+ return this.itemsCount === 1 ? 'item' : 'items';
32
+ }
33
+ _dispatchEvent(items) {
34
+ const resultsEvent = new CustomEvent('onResultsFound', {
35
+ detail: { items },
36
+ composed: true,
37
+ });
38
+ this.dispatchEvent(resultsEvent);
39
+ }
40
+ filterItems(value) {
41
+ this.value = value;
42
+ if (value === '') {
43
+ this.resetResults();
44
+ this._dispatchEvent(this.items);
45
+ return;
46
+ }
47
+ const results = [];
48
+ for (const item of this.items) {
49
+ for (const field of this.searchFields) {
50
+ if (field in item) {
51
+ if (item[field]
52
+ .toLocaleLowerCase()
53
+ .includes(this.value.toLocaleLowerCase())) {
54
+ results.push(item);
55
+ break;
56
+ }
57
+ }
58
+ }
59
+ }
60
+ this.foundItems = results;
61
+ this._dispatchEvent(results);
62
+ }
63
+ render() {
64
+ return html `
65
+ <ix-textbox
66
+ type="search"
67
+ @textChange="${(e) => this.filterItems(e.detail.value)}"
68
+ ></ix-textbox>
69
+
70
+ <div class="items-count">${this.itemsCount} ${this.itemsLabel}</div>
71
+ `;
72
+ }
73
+ }
74
+ __decorate([
75
+ property({ type: String })
76
+ ], IxSearchBar.prototype, "value", void 0);
77
+ __decorate([
78
+ property({ type: Array })
79
+ ], IxSearchBar.prototype, "items", void 0);
80
+ __decorate([
81
+ property({ type: Array })
82
+ ], IxSearchBar.prototype, "searchFields", void 0);
83
+ __decorate([
84
+ property({ type: Array })
85
+ ], IxSearchBar.prototype, "foundItems", void 0);
86
86
  //# sourceMappingURL=IxSearchBar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IxSearchBar.js","sourceRoot":"","sources":["../src/IxSearchBar.ts"],"names":[],"mappings":"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","sourcesContent":["import { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport '@digital-realty/ix-textbox';\nimport { IxSearchBarStyle } from './ix-search-bar-styles.js';\nimport { Item, TextChangeEvent } from './types/index.js';\n\nexport class IxSearchBar extends LitElement {\n @property({ type: String }) value = '';\n\n @property({ type: Array }) items: Item[] = [];\n\n @property({ type: Array }) searchFields: string[] = [];\n\n @property({ type: Array }) foundItems: Item[] = [];\n\n static get styles() {\n return [IxSearchBarStyle];\n }\n\n connectedCallback() {\n super.connectedCallback();\n this.resetResults();\n }\n\n resetResults() {\n this.foundItems = this.items;\n }\n\n get itemsCount() {\n if (Array.isArray(this.foundItems) && this.foundItems.length) {\n return this.foundItems.length;\n }\n return 0;\n }\n\n get itemsLabel() {\n return this.itemsCount === 1 ? 'item' : 'items';\n }\n\n _dispatchEvent(items: Item[]): void {\n const resultsEvent = new CustomEvent('onResultsFound', {\n detail: { items },\n composed: true,\n });\n this.dispatchEvent(resultsEvent);\n }\n\n filterItems(value: string) {\n this.value = value;\n if (value === '') {\n this.resetResults();\n this._dispatchEvent(this.items);\n return;\n }\n\n const results: Item[] = [];\n\n for (const item of this.items) {\n for (const field of this.searchFields) {\n if (field in item) {\n if (\n item[field]\n .toLocaleLowerCase()\n .includes(this.value.toLocaleLowerCase())\n ) {\n results.push(item);\n break;\n }\n }\n }\n }\n\n this.foundItems = results;\n this._dispatchEvent(results);\n }\n\n render() {\n return html`\n <ix-textbox\n type=\"search\"\n @textChange=\"${(e: TextChangeEvent) =>\n this.filterItems(e.detail.value)}\"\n ></ix-textbox>\n\n <div class=\"items-count\">${this.itemsCount} ${this.itemsLabel}</div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'ix-search-bar': IxSearchBar;\n }\n}\n"]}
@@ -1 +1 @@
1
- export { IxSearchBar } from './IxSearchBar.js';
1
+ export { IxSearchBar } from './IxSearchBar.js';
@@ -1 +1,2 @@
1
- export { IxSearchBar } from './IxSearchBar.js';
1
+ export { IxSearchBar } from './IxSearchBar.js';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC","sourcesContent":["export { IxSearchBar } from './IxSearchBar.js';\n"]}
@@ -1 +1 @@
1
- export declare const IxSearchBarStyle: import("lit").CSSResult;
1
+ export declare const IxSearchBarStyle: import("lit").CSSResult;
@@ -1,29 +1,29 @@
1
- import { css } from 'lit';
2
- export const IxSearchBarStyle = css `
3
- :host {
4
- display: flex;
5
- justify-content: space-between;
6
- align-items: center;
7
- border: 1px solid lightgrey;
8
- border-width: 1px 0;
9
- padding: 1rem 0;
10
- flex-wrap: wrap;
11
- margin-bottom: 1.5rem;
12
- }
13
-
14
- html {
15
- color: #333;
16
- }
17
-
18
- ix-textbox {
19
- color: #333;
20
- flex: 1 0 min(280px, 100%);
21
- }
22
-
23
- .items-count {
24
- flex: 1000 0 7em;
25
- text-align: right;
26
- padding: 0.5em 0;
27
- }
28
- `;
1
+ import { css } from 'lit';
2
+ export const IxSearchBarStyle = css `
3
+ :host {
4
+ display: flex;
5
+ justify-content: space-between;
6
+ align-items: center;
7
+ border: 1px solid lightgrey;
8
+ border-width: 1px 0;
9
+ padding: 1rem 0;
10
+ flex-wrap: wrap;
11
+ margin-bottom: 1.5rem;
12
+ }
13
+
14
+ html {
15
+ color: #333;
16
+ }
17
+
18
+ ix-textbox {
19
+ color: #333;
20
+ flex: 1 0 min(280px, 100%);
21
+ }
22
+
23
+ .items-count {
24
+ flex: 1000 0 7em;
25
+ text-align: right;
26
+ padding: 0.5em 0;
27
+ }
28
+ `;
29
29
  //# sourceMappingURL=ix-search-bar-styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ix-search-bar-styles.js","sourceRoot":"","sources":["../src/ix-search-bar-styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;CA0BlC,CAAC","sourcesContent":["import { css } from 'lit';\n\nexport const IxSearchBarStyle = css`\n :host {\n display: flex;\n justify-content: space-between;\n align-items: center;\n border: 1px solid lightgrey;\n border-width: 1px 0;\n padding: 1rem 0;\n flex-wrap: wrap;\n margin-bottom: 1.5rem;\n }\n\n html {\n color: #333;\n }\n\n ix-textbox {\n color: #333;\n flex: 1 0 min(280px, 100%);\n }\n\n .items-count {\n flex: 1000 0 7em;\n text-align: right;\n padding: 0.5em 0;\n }\n`;\n"]}
@@ -1 +1 @@
1
- export {};
1
+ export {};
@@ -1,3 +1,3 @@
1
- import { IxSearchBar } from './IxSearchBar.js';
2
-
3
- window.customElements.define('ix-search-bar', IxSearchBar);
1
+ import { IxSearchBar } from './IxSearchBar.js';
2
+ window.customElements.define('ix-search-bar', IxSearchBar);
3
+ //# sourceMappingURL=ix-search-bar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ix-search-bar.js","sourceRoot":"","sources":["../src/ix-search-bar.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,eAAe,EAAE,WAAW,CAAC,CAAC","sourcesContent":["import { IxSearchBar } from './IxSearchBar.js';\n\nwindow.customElements.define('ix-search-bar', IxSearchBar);\n"]}
@@ -1,2 +1,2 @@
1
- import { IxSearchBar as LitComp } from '../IxSearchBar.js';
2
- export declare const IxSearchBar: import("@lit-labs/react").ReactWebComponent<LitComp, {}>;
1
+ import { IxSearchBar as LitComp } from '../IxSearchBar.js';
2
+ export declare const IxSearchBar: import("@lit-labs/react").ReactWebComponent<LitComp, {}>;
@@ -1,10 +1,10 @@
1
- import React from 'react';
2
- import { createComponent } from '@lit-labs/react';
3
- import { IxSearchBar as LitComp } from '../IxSearchBar.js';
4
- window.customElements.define('ix-search-bar', LitComp);
5
- export const IxSearchBar = createComponent({
6
- tagName: 'ix-search-bar',
7
- elementClass: LitComp,
8
- react: React,
9
- });
1
+ import React from 'react';
2
+ import { createComponent } from '@lit-labs/react';
3
+ import { IxSearchBar as LitComp } from '../IxSearchBar.js';
4
+ window.customElements.define('ix-search-bar', LitComp);
5
+ export const IxSearchBar = createComponent({
6
+ tagName: 'ix-search-bar',
7
+ elementClass: LitComp,
8
+ react: React,
9
+ });
10
10
  //# sourceMappingURL=IxSearchBar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IxSearchBar.js","sourceRoot":"","sources":["../../src/react/IxSearchBar.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,WAAW,IAAI,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE3D,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,eAAe,EAAE,OAAO,CAAC,CAAC;AAEvD,MAAM,CAAC,MAAM,WAAW,GAAG,eAAe,CAAC;IACzC,OAAO,EAAE,eAAe;IACxB,YAAY,EAAE,OAAO;IACrB,KAAK,EAAE,KAAK;CACb,CAAC,CAAC","sourcesContent":["import React from 'react';\nimport { createComponent } from '@lit-labs/react';\nimport { IxSearchBar as LitComp } from '../IxSearchBar.js';\n\nwindow.customElements.define('ix-search-bar', LitComp);\n\nexport const IxSearchBar = createComponent({\n tagName: 'ix-search-bar',\n elementClass: LitComp,\n react: React,\n});\n"]}
@@ -1,13 +1,13 @@
1
- /**
2
- * The item being searched for.
3
- */
4
- export type Item = {
5
- [key: string]: string;
6
- };
7
- /**
8
- * An event which is fired when the textfield's value changes.
9
- * It passes the value of the textfield.
10
- */
11
- export type TextChangeEvent = CustomEvent<{
12
- value: string;
13
- }>;
1
+ /**
2
+ * The item being searched for.
3
+ */
4
+ export type Item = {
5
+ [key: string]: string;
6
+ };
7
+ /**
8
+ * An event which is fired when the textfield's value changes.
9
+ * It passes the value of the textfield.
10
+ */
11
+ export type TextChangeEvent = CustomEvent<{
12
+ value: string;
13
+ }>;
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * The item being searched for.\n */\nexport type Item = {\n [key: string]: string;\n};\n\n/**\n * An event which is fired when the textfield's value changes.\n * It passes the value of the textfield.\n */\nexport type TextChangeEvent = CustomEvent<{ value: string }>;\n"]}