@digital-realty/ix-chip 1.0.4 → 1.0.6
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/dist/IxChip.d.ts +2 -1
- package/dist/IxChip.js +4 -0
- package/dist/IxChip.js.map +1 -1
- package/dist/IxChipSet.d.ts +1 -1
- package/dist/react/IxChip.d.ts +1 -1
- package/dist/react/IxChip.js +2 -2
- package/dist/react/IxChip.js.map +1 -1
- package/dist/react/IxChipSet.d.ts +1 -1
- package/dist/react/IxChipSet.js +2 -2
- package/dist/react/IxChipSet.js.map +1 -1
- package/package.json +3 -3
package/dist/IxChip.d.ts
CHANGED
package/dist/IxChip.js
CHANGED
|
@@ -27,6 +27,9 @@ export class IxChip extends LitElement {
|
|
|
27
27
|
* The label of the chip.
|
|
28
28
|
*/
|
|
29
29
|
this.label = '';
|
|
30
|
+
this.remove = () => {
|
|
31
|
+
this.dispatchEvent(new CustomEvent('remove', { bubbles: true }));
|
|
32
|
+
};
|
|
30
33
|
}
|
|
31
34
|
render() {
|
|
32
35
|
let comp;
|
|
@@ -51,6 +54,7 @@ export class IxChip extends LitElement {
|
|
|
51
54
|
?disabled=${this.disabled}
|
|
52
55
|
?always-focusable=${this.alwaysFocusable}
|
|
53
56
|
.label=${this.label}
|
|
57
|
+
@remove=${this.remove}
|
|
54
58
|
>${this.label}</md-input-chip
|
|
55
59
|
>`;
|
|
56
60
|
}
|
package/dist/IxChip.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IxChip.js","sourceRoot":"","sources":["../src/IxChip.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,oCAAoC,CAAC;AAC5C,OAAO,oCAAoC,CAAC;AAC5C,OAAO,mCAAmC,CAAC;AAC3C,OAAO,wCAAwC,CAA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ACG,IAAI,CAAC,QAAQ;4BACL,IAAI,CAAC,eAAe;iBAC/B,IAAI,CAAC,KAAK;WAChB,IAAI,CAAC,KAAK;QACb,CAAC;SACJ;aAAM,IAAI,IAAI,CAAC,UAAU,KAAK,OAAO,EAAE;YACtC,IAAI,GAAG,IAAI,CAAA;oBACG,IAAI,CAAC,QAAQ;4BACL,IAAI,CAAC,eAAe;iBAC/B,IAAI,CAAC,KAAK;kBACT,IAAI,CAAC,MAAM;WAClB,IAAI,CAAC,KAAK;QACb,CAAC;SACJ;aAAM,IAAI,IAAI,CAAC,UAAU,KAAK,YAAY,EAAE;YAC3C,IAAI,GAAG,IAAI,CAAA;oBACG,IAAI,CAAC,QAAQ;4BACL,IAAI,CAAC,eAAe;iBAC/B,IAAI,CAAC,KAAK;WAChB,IAAI,CAAC,KAAK;QACb,CAAC;SACJ;QAED,OAAO,IAAI,CAAA,IAAI,IAAI,GAAG,CAAC;IACzB,CAAC;CACF;AAnE6B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;0CAIC;AAOC;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;wCAAkB;AAU9C;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,kBAAkB,EAAE,CAAC;+CACnC;AAKZ;IAAX,QAAQ,EAAE;qCAAY","sourcesContent":["import { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport '@material/web/chips/assist-chip.js';\nimport '@material/web/chips/filter-chip.js';\nimport '@material/web/chips/input-chip.js';\nimport '@material/web/chips/suggestion-chip.js';\n\nexport class IxChip extends LitElement {\n @property({ type: String }) appearance:\n | 'assist'\n | 'filter'\n | 'input'\n | 'suggestion' = 'assist';\n\n /**\n * Whether or not the chip is disabled.\n *\n * Disabled chips are not focusable, unless `always-focusable` is set.\n */\n @property({ type: Boolean }) disabled = false;\n\n /**\n * When true, allow disabled chips to be focused with arrow keys.\n *\n * Add this when a chip needs increased visibility when disabled. See\n * https://www.w3.org/WAI/ARIA/apg/practices/keyboard-interface/#kbd_disabled_controls\n * for more guidance on when this is needed.\n */\n @property({ type: Boolean, attribute: 'always-focusable' })\n alwaysFocusable = false;\n\n /**\n * The label of the chip.\n */\n @property() label = '';\n\n remove = () => {\n this.dispatchEvent(new CustomEvent('remove', { bubbles: true }));\n };\n\n render() {\n let comp;\n if (this.appearance === 'assist') {\n comp = html`<md-assist-chip\n ?disabled=${this.disabled}\n ?always-focusable=${this.alwaysFocusable}\n .label=${this.label}\n >${this.label}</md-assist-chip\n >`;\n } else if (this.appearance === 'filter') {\n comp = html`<md-filter-chip\n ?disabled=${this.disabled}\n ?always-focusable=${this.alwaysFocusable}\n .label=${this.label}\n >${this.label}</md-filter-chip\n >`;\n } else if (this.appearance === 'input') {\n comp = html`<md-input-chip\n ?disabled=${this.disabled}\n ?always-focusable=${this.alwaysFocusable}\n .label=${this.label}\n @remove=${this.remove}\n >${this.label}</md-input-chip\n >`;\n } else if (this.appearance === 'suggestion') {\n comp = html`<md-suggestion-chip\n ?disabled=${this.disabled}\n ?always-focusable=${this.alwaysFocusable}\n .label=${this.label}\n >${this.label}</md-suggestion-chip\n >`;\n }\n\n return html` ${comp} `;\n }\n}\n"]}
|
package/dist/IxChipSet.d.ts
CHANGED
package/dist/react/IxChip.d.ts
CHANGED
package/dist/react/IxChip.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { createComponent } from '@lit
|
|
2
|
+
import { createComponent } from '@lit/react';
|
|
3
3
|
import { IxChip as LitComp } from '../IxChip.js';
|
|
4
|
-
|
|
4
|
+
customElements.define('ix-chip', LitComp);
|
|
5
5
|
export const IxChip = createComponent({
|
|
6
6
|
tagName: 'ix-chip',
|
|
7
7
|
elementClass: LitComp,
|
package/dist/react/IxChip.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IxChip.js","sourceRoot":"","sources":["../../src/react/IxChip.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"IxChip.js","sourceRoot":"","sources":["../../src/react/IxChip.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAE,MAAM,IAAI,OAAO,EAAE,MAAM,cAAc,CAAC;AAEjD,cAAc,CAAC,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;AAE1C,MAAM,CAAC,MAAM,MAAM,GAAG,eAAe,CAAC;IACpC,OAAO,EAAE,SAAS;IAClB,YAAY,EAAE,OAAO;IACrB,KAAK,EAAE,KAAK;IACZ,MAAM,EAAE;QACN,OAAO,EAAE,SAAS;KACnB;CACF,CAAC,CAAC","sourcesContent":["import React from 'react';\nimport { createComponent } from '@lit/react';\nimport { IxChip as LitComp } from '../IxChip.js';\n\ncustomElements.define('ix-chip', LitComp);\n\nexport const IxChip = createComponent({\n tagName: 'ix-chip',\n elementClass: LitComp,\n react: React,\n events: {\n onclick: 'onClick',\n },\n});\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { IxChipSet as LitComp } from '../IxChipSet.js';
|
|
2
|
-
export declare const IxChipSet: import("@lit
|
|
2
|
+
export declare const IxChipSet: import("@lit/react").ReactWebComponent<LitComp, {}>;
|
package/dist/react/IxChipSet.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { createComponent } from '@lit
|
|
2
|
+
import { createComponent } from '@lit/react';
|
|
3
3
|
import { IxChipSet as LitComp } from '../IxChipSet.js';
|
|
4
|
-
|
|
4
|
+
customElements.define('ix-chip-set', LitComp);
|
|
5
5
|
export const IxChipSet = createComponent({
|
|
6
6
|
tagName: 'ix-chip-set',
|
|
7
7
|
elementClass: LitComp,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IxChipSet.js","sourceRoot":"","sources":["../../src/react/IxChipSet.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"IxChipSet.js","sourceRoot":"","sources":["../../src/react/IxChipSet.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAE,SAAS,IAAI,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAEvD,cAAc,CAAC,MAAM,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC;AAE9C,MAAM,CAAC,MAAM,SAAS,GAAG,eAAe,CAAC;IACvC,OAAO,EAAE,aAAa;IACtB,YAAY,EAAE,OAAO;IACrB,KAAK,EAAE,KAAK;CACb,CAAC,CAAC","sourcesContent":["import React from 'react';\nimport { createComponent } from '@lit/react';\nimport { IxChipSet as LitComp } from '../IxChipSet.js';\n\ncustomElements.define('ix-chip-set', LitComp);\n\nexport const IxChipSet = createComponent({\n tagName: 'ix-chip-set',\n elementClass: LitComp,\n react: React,\n});\n"]}
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Webcomponent ix-chip following open-wc recommendations",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Digital Realty",
|
|
6
|
-
"version": "1.0.
|
|
6
|
+
"version": "1.0.6",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"main": "dist/index.js",
|
|
9
9
|
"module": "dist/index.js",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"test:watch": "tsc && concurrently -k -r \"tsc --watch --preserveWatchOutput\" \"wtr --watch\""
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@lit
|
|
31
|
+
"@lit/react": "^1.0.2",
|
|
32
32
|
"@material/web": "^1.0.0",
|
|
33
33
|
"lit": "^2.0.2",
|
|
34
34
|
"react": "^18.2.0"
|
|
@@ -97,5 +97,5 @@
|
|
|
97
97
|
"README.md",
|
|
98
98
|
"LICENSE"
|
|
99
99
|
],
|
|
100
|
-
"gitHead": "
|
|
100
|
+
"gitHead": "6cd64253a78e37e6ba8882a8c94e6cae73d82d51"
|
|
101
101
|
}
|