@times-design-system/icons 0.1.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.
- package/README.md +11 -0
- package/dist/generation-report.json +17 -0
- package/dist/react/Chevron.jsx +48 -0
- package/dist/react/index.js +1 -0
- package/dist/types/Chevron.d.ts +32 -0
- package/dist/types/index.d.ts +1 -0
- package/package.json +46 -0
- package/src/chevron.svg +1 -0
package/README.md
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"generatedAt": "2026-01-19T15:34:23.029Z",
|
|
3
|
+
"totalComponents": 1,
|
|
4
|
+
"components": [
|
|
5
|
+
{
|
|
6
|
+
"original": "chevron.svg",
|
|
7
|
+
"component": "Chevron.jsx",
|
|
8
|
+
"types": "Chevron.d.ts",
|
|
9
|
+
"size": "0.17 KB"
|
|
10
|
+
}
|
|
11
|
+
],
|
|
12
|
+
"exportLocations": {
|
|
13
|
+
"components": "./dist/react",
|
|
14
|
+
"types": "./dist/types",
|
|
15
|
+
"barrel": "./dist/react/index.js"
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Chevron Icon Component
|
|
5
|
+
*
|
|
6
|
+
* @component
|
|
7
|
+
* @param {Object} props - Component props
|
|
8
|
+
* @param {number} [props.width=24] - Icon width
|
|
9
|
+
* @param {number} [props.height=24] - Icon height
|
|
10
|
+
* @param {string} [props.color='currentColor'] - Icon color
|
|
11
|
+
* @param {string} [props.className] - Additional CSS classes
|
|
12
|
+
* @param {Object} [props...] - Any other SVG attributes
|
|
13
|
+
* @returns {React.ReactElement} SVG element
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* <Chevron width={32} height={32} color="#000" />
|
|
17
|
+
*/
|
|
18
|
+
const Chevron = React.forwardRef(
|
|
19
|
+
(
|
|
20
|
+
{
|
|
21
|
+
width = 24,
|
|
22
|
+
height = 24,
|
|
23
|
+
color = 'currentColor',
|
|
24
|
+
className = '',
|
|
25
|
+
...props
|
|
26
|
+
},
|
|
27
|
+
ref
|
|
28
|
+
) => (
|
|
29
|
+
<svg
|
|
30
|
+
ref={ref}
|
|
31
|
+
width={width}
|
|
32
|
+
height={height}
|
|
33
|
+
color={color}
|
|
34
|
+
className={className}
|
|
35
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
36
|
+
viewBox="0 0 24 24"
|
|
37
|
+
fill="none"
|
|
38
|
+
{...props}
|
|
39
|
+
dangerouslySetInnerHTML={{
|
|
40
|
+
__html: `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" color="currentColor"><path fill="currentColor" d="m6.667 4-.94.94L8.78 8l-3.053 3.06.94.94 4-4-4-4Z"></path></svg>`,
|
|
41
|
+
}}
|
|
42
|
+
/>
|
|
43
|
+
)
|
|
44
|
+
);
|
|
45
|
+
|
|
46
|
+
Chevron.displayName = 'Chevron';
|
|
47
|
+
|
|
48
|
+
export default Chevron;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Chevron } from './Chevron';
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { SVGProps } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface ChevronProps extends SVGProps<SVGSVGElement> {
|
|
4
|
+
/**
|
|
5
|
+
* Icon width in pixels
|
|
6
|
+
* @default 24
|
|
7
|
+
*/
|
|
8
|
+
width?: number | string;
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Icon height in pixels
|
|
12
|
+
* @default 24
|
|
13
|
+
*/
|
|
14
|
+
height?: number | string;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Icon color
|
|
18
|
+
* @default 'currentColor'
|
|
19
|
+
*/
|
|
20
|
+
color?: string;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Additional CSS classes
|
|
24
|
+
*/
|
|
25
|
+
className?: string;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
declare const Chevron: React.ForwardRefExoticComponent<
|
|
29
|
+
ChevronProps & React.RefAttributes<SVGSVGElement>
|
|
30
|
+
>;
|
|
31
|
+
|
|
32
|
+
export default Chevron;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { ChevronProps } from './Chevron';
|
package/package.json
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@times-design-system/icons",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "Icon components for Times Design System",
|
|
6
|
+
"keywords": [],
|
|
7
|
+
"author": "douglasmik <michael@viaverso.co.uk>",
|
|
8
|
+
"license": "ISC",
|
|
9
|
+
"main": "dist/react/index.js",
|
|
10
|
+
"types": "dist/types/index.d.ts",
|
|
11
|
+
"files": [
|
|
12
|
+
"dist/",
|
|
13
|
+
"src/",
|
|
14
|
+
"README.md"
|
|
15
|
+
],
|
|
16
|
+
"directories": {
|
|
17
|
+
"lib": "src",
|
|
18
|
+
"test": "__tests__"
|
|
19
|
+
},
|
|
20
|
+
"repository": {
|
|
21
|
+
"type": "git",
|
|
22
|
+
"url": "git+https://github.com/newsuk/times-design-system.git"
|
|
23
|
+
},
|
|
24
|
+
"scripts": {
|
|
25
|
+
"build": "npm run clean && npm run generate:components",
|
|
26
|
+
"generate:components": "node scripts/generate-react-components.js",
|
|
27
|
+
"clean": "rimraf dist",
|
|
28
|
+
"dev": "npm run generate:components -- --watch",
|
|
29
|
+
"prepublishOnly": "npm run build"
|
|
30
|
+
},
|
|
31
|
+
"bugs": {
|
|
32
|
+
"url": "https://github.com/newsuk/times-design-system/issues"
|
|
33
|
+
},
|
|
34
|
+
"homepage": "https://github.com/newsuk/times-design-system#readme",
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"fs-extra": "^11.0.0",
|
|
37
|
+
"xml2js": "^0.6.0"
|
|
38
|
+
},
|
|
39
|
+
"publishConfig": {
|
|
40
|
+
"access": "public"
|
|
41
|
+
},
|
|
42
|
+
"peerDependencies": {
|
|
43
|
+
"react": "^18.0.0"
|
|
44
|
+
},
|
|
45
|
+
"gitHead": "f7917d08adf531af85f6a0b0df2d137052a62de0"
|
|
46
|
+
}
|
package/src/chevron.svg
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" color="#aaaaaa"><path fill="#aaaaaa" d="m6.667 4-.94.94L8.78 8l-3.053 3.06.94.94 4-4-4-4Z"></path></svg>
|