@carbon/icon-helpers 10.44.0-rc.0 → 10.45.0-rc.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.
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Copyright IBM Corp. 2018, 2023
3
+ *
4
+ * This source code is licensed under the Apache-2.0 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+ import React from 'react';
8
+ interface IconAttributes extends Omit<React.SVGProps<React.ReactSVGElement>, 'tabIndex'> {
9
+ tabindex?: string | number | undefined;
10
+ title?: string | undefined;
11
+ }
12
+ export declare const defaultAttributes: IconAttributes;
13
+ /**
14
+ * Get supplementary HTML attributes for a given <svg> element based on existing
15
+ * attributes.
16
+ */
17
+ export default function getAttributes({ width, height, viewBox, ...attributes }?: IconAttributes): IconAttributes;
18
+ export {};
package/es/index.d.ts ADDED
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Copyright IBM Corp. 2018, 2023
3
+ *
4
+ * This source code is licensed under the Apache-2.0 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+ import getAttributes, { defaultAttributes } from './getAttributes';
8
+ import toString, { formatAttributes } from './toString';
9
+ import toSVG from './toSVG';
10
+ export { defaultAttributes, getAttributes, formatAttributes, toString, toSVG };
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Copyright IBM Corp. 2018, 2023
3
+ *
4
+ * This source code is licensed under the Apache-2.0 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+ import React from 'react';
8
+ interface IconAttributes extends Omit<React.SVGProps<React.ReactSVGElement>, 'tabIndex'> {
9
+ tabindex?: string | number | undefined;
10
+ title?: string | undefined;
11
+ }
12
+ export declare const defaultAttributes: IconAttributes;
13
+ /**
14
+ * Get supplementary HTML attributes for a given <svg> element based on existing
15
+ * attributes.
16
+ */
17
+ export default function getAttributes({ width, height, viewBox, ...attributes }?: IconAttributes): IconAttributes;
18
+ export {};
package/lib/index.d.ts ADDED
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Copyright IBM Corp. 2018, 2023
3
+ *
4
+ * This source code is licensed under the Apache-2.0 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+ import getAttributes, { defaultAttributes } from './getAttributes';
8
+ import toString, { formatAttributes } from './toString';
9
+ import toSVG from './toSVG';
10
+ export { defaultAttributes, getAttributes, formatAttributes, toString, toSVG };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@carbon/icon-helpers",
3
3
  "description": "Helpers used alongside icons for digital and software products using the Carbon Design System",
4
- "version": "10.44.0-rc.0",
4
+ "version": "10.45.0-rc.0",
5
5
  "license": "Apache-2.0",
6
6
  "main": "lib/index.js",
7
7
  "module": "es/index.js",
@@ -30,13 +30,14 @@
30
30
  "provenance": true
31
31
  },
32
32
  "scripts": {
33
- "build": "yarn clean && carbon-cli bundle src/index.js --name CarbonIconHelpers",
33
+ "build": "yarn clean && carbon-cli bundle src/index.ts --name CarbonIconHelpers",
34
34
  "clean": "rimraf es lib umd"
35
35
  },
36
36
  "devDependencies": {
37
- "@carbon/cli": "^11.14.0-rc.0",
38
- "rimraf": "^5.0.0"
37
+ "@carbon/cli": "^11.15.0-rc.0",
38
+ "rimraf": "^5.0.0",
39
+ "typescript-config-carbon": "^0.2.0-rc.0"
39
40
  },
40
41
  "sideEffects": false,
41
- "gitHead": "39f36c63d5cb77a525e0a82f0e565b8d6ef658e9"
42
+ "gitHead": "da28d28a2d3a34503099e25255076efd3da4db9f"
42
43
  }
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Copyright IBM Corp. 2018, 2023
3
+ *
4
+ * This source code is licensed under the Apache-2.0 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+ import React from 'react';
8
+ interface IconAttributes extends Omit<React.SVGProps<React.ReactSVGElement>, 'tabIndex'> {
9
+ tabindex?: string | number | undefined;
10
+ title?: string | undefined;
11
+ }
12
+ export declare const defaultAttributes: IconAttributes;
13
+ /**
14
+ * Get supplementary HTML attributes for a given <svg> element based on existing
15
+ * attributes.
16
+ */
17
+ export default function getAttributes({ width, height, viewBox, ...attributes }?: IconAttributes): IconAttributes;
18
+ export {};
package/umd/index.d.ts ADDED
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Copyright IBM Corp. 2018, 2023
3
+ *
4
+ * This source code is licensed under the Apache-2.0 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+ import getAttributes, { defaultAttributes } from './getAttributes';
8
+ import toString, { formatAttributes } from './toString';
9
+ import toSVG from './toSVG';
10
+ export { defaultAttributes, getAttributes, formatAttributes, toString, toSVG };