@triptease/tt-icon 1.1.16 → 1.1.18

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.
@@ -1,4 +1,8 @@
1
+ import React from 'react';
1
2
  interface TTIconAttributes {
3
+ id?: string;
4
+ style?: React.CSSProperties;
5
+ [key: `data-${string}`]: string | undefined;
2
6
  name?: string;
3
7
  label?: string;
4
8
  color?: string;
@@ -7,15 +11,29 @@ interface TTIconAttributes {
7
11
  declare global {
8
12
  namespace JSX {
9
13
  interface IntrinsicElements {
10
- 'tt-icon': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement> & TTIconAttributes, HTMLElement>;
14
+ 'tt-icon': TTIconAttributes & {
15
+ class?: string;
16
+ };
11
17
  }
12
18
  }
13
19
  namespace React {
14
20
  namespace JSX {
15
21
  interface IntrinsicElements {
16
- 'tt-icon': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement> & TTIconAttributes, HTMLElement>;
22
+ 'tt-icon': TTIconAttributes & {
23
+ className?: string;
24
+ ref?: React.Ref<unknown>;
25
+ };
17
26
  }
18
27
  }
19
28
  }
20
29
  }
30
+ declare module '@triptease/html-jsx' {
31
+ namespace JSX {
32
+ interface IntrinsicElements {
33
+ 'tt-icon': TTIconAttributes & {
34
+ class?: string;
35
+ };
36
+ }
37
+ }
38
+ }
21
39
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"","sourcesContent":["import React from 'react'; // eslint-disable-line @typescript-eslint/no-unused-vars\n\ninterface TTIconAttributes {\n name?: string;\n label?: string;\n color?: string;\n size?: number;\n}\n\ndeclare global {\n namespace JSX {\n interface IntrinsicElements {\n 'tt-icon': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement> & TTIconAttributes, HTMLElement>;\n }\n }\n\n namespace React {\n namespace JSX {\n interface IntrinsicElements {\n 'tt-icon': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement> & TTIconAttributes, HTMLElement>;\n }\n }\n }\n}\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"","sourcesContent":["import React from 'react';\nimport type {} from '@triptease/html-jsx'; // Stops declare module from erroring\n\ninterface TTIconAttributes {\n id?: string;\n style?: React.CSSProperties;\n [key: `data-${string}`]: string | undefined;\n name?: string;\n label?: string;\n color?: string;\n size?: number;\n}\n\ndeclare global {\n namespace JSX {\n interface IntrinsicElements {\n 'tt-icon': TTIconAttributes & { class?: string };\n }\n }\n\n namespace React {\n namespace JSX {\n interface IntrinsicElements {\n 'tt-icon': TTIconAttributes & { className?: string; ref?: React.Ref<unknown> };\n }\n }\n }\n}\n\ndeclare module '@triptease/html-jsx' {\n namespace JSX {\n interface IntrinsicElements {\n 'tt-icon': TTIconAttributes & { class?: string };\n }\n }\n}\n"]}
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Webcomponent tt-icon following open-wc recommendations",
4
4
  "license": "MIT",
5
5
  "author": "@triptease",
6
- "version": "1.1.16",
6
+ "version": "1.1.18",
7
7
  "type": "module",
8
8
  "main": "dist/src/index.js",
9
9
  "module": "dist/src/index.js",
@@ -28,7 +28,8 @@
28
28
  "test:watch": "tsc && concurrently -k -r \"tsc --watch --preserveWatchOutput\" \"wtr --watch\""
29
29
  },
30
30
  "dependencies": {
31
- "@triptease/icons": "1.3.10",
31
+ "@triptease/html-jsx": "^0.2.6",
32
+ "@triptease/icons": "1.3.11",
32
33
  "lit": "^3.1.4"
33
34
  },
34
35
  "devDependencies": {