@triptease/tt-icon 1.1.18 → 1.2.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.
@@ -1,39 +1,33 @@
1
- import React from 'react';
2
- interface TTIconAttributes {
1
+ import IconManifest from '@triptease/icons/manifest.json';
2
+ import { TtIcon } from './TtIcon.js';
3
+ type IconName = keyof typeof IconManifest;
4
+ interface TtIconExternalAttributes {
3
5
  id?: string;
4
- style?: React.CSSProperties;
5
- [key: `data-${string}`]: string | undefined;
6
- name?: string;
6
+ name: IconName;
7
7
  label?: string;
8
8
  color?: string;
9
9
  size?: number;
10
10
  }
11
11
  declare global {
12
+ interface HTMLElementTagNameMap {
13
+ 'tt-icon': TtIcon;
14
+ }
12
15
  namespace JSX {
13
16
  interface IntrinsicElements {
14
- 'tt-icon': TTIconAttributes & {
15
- class?: string;
17
+ 'tt-icon': TtIconExternalAttributes & {
18
+ style?: string;
16
19
  };
17
20
  }
18
21
  }
19
22
  namespace React {
20
23
  namespace JSX {
21
24
  interface IntrinsicElements {
22
- 'tt-icon': TTIconAttributes & {
23
- className?: string;
25
+ 'tt-icon': TtIconExternalAttributes & {
24
26
  ref?: React.Ref<unknown>;
27
+ style?: React.CSSProperties | string;
25
28
  };
26
29
  }
27
30
  }
28
31
  }
29
32
  }
30
- declare module '@triptease/html-jsx' {
31
- namespace JSX {
32
- interface IntrinsicElements {
33
- 'tt-icon': TTIconAttributes & {
34
- class?: string;
35
- };
36
- }
37
- }
38
- }
39
33
  export {};
@@ -1 +1 @@
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"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"","sourcesContent":["import IconManifest from '@triptease/icons/manifest.json' with { type: 'json' };\nimport { TtIcon } from './TtIcon.js';\n\ntype IconName = keyof typeof IconManifest;\n\ninterface TtIconExternalAttributes {\n id?: string;\n name: IconName;\n label?: string;\n color?: string;\n size?: number;\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'tt-icon': TtIcon;\n }\n\n namespace JSX {\n interface IntrinsicElements {\n 'tt-icon': TtIconExternalAttributes & { style?: string };\n }\n }\n\n namespace React {\n namespace JSX {\n interface IntrinsicElements {\n 'tt-icon': TtIconExternalAttributes & {\n ref?: React.Ref<unknown>;\n style?: React.CSSProperties | string;\n };\n }\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.18",
6
+ "version": "1.2.0",
7
7
  "type": "module",
8
8
  "main": "dist/src/index.js",
9
9
  "module": "dist/src/index.js",
@@ -28,8 +28,7 @@
28
28
  "test:watch": "tsc && concurrently -k -r \"tsc --watch --preserveWatchOutput\" \"wtr --watch\""
29
29
  },
30
30
  "dependencies": {
31
- "@triptease/html-jsx": "^0.2.6",
32
- "@triptease/icons": "1.3.11",
31
+ "@triptease/icons": "1.3.12",
33
32
  "lit": "^3.1.4"
34
33
  },
35
34
  "devDependencies": {