@carbon/react 1.51.0-rc.0 → 1.51.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 CHANGED
@@ -51,6 +51,25 @@ to include `node_modules` in its `includePaths` option. For more information,
51
51
  checkout the [configuration](../styles/docs/sass.md#configuration) section in
52
52
  our Sass docs.
53
53
 
54
+ ### TypeScript
55
+
56
+ There is an ongoing project to add `*.d.ts` files to `@carbon/react`. Though not
57
+ all components have yet been typed, you can still use the project successfully
58
+ in a TypeScript setting, provided you amend to your `tsconfig.json` or
59
+ equivalent configuration file. Include the `skipLibCheck: true` compiler option:
60
+
61
+ ```json
62
+ {
63
+ "compilerOptions": {
64
+ "skipLibCheck": true
65
+ }
66
+ }
67
+ ```
68
+
69
+ To track the progress of TypeScript adoption, check out:
70
+
71
+ - [TypeScript Adoption](https://github.com/orgs/carbon-design-system/projects/53)
72
+
54
73
  ## Usage
55
74
 
56
75
  The `@carbon/react` package provides components and icons for the Carbon Design
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Copyright IBM Corp. 2016, 2024
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 PropTypes from 'prop-types';
8
+ import React from 'react';
9
+ interface AiSkeletonIconProps {
10
+ /**
11
+ * Specify an optional className to add.
12
+ */
13
+ className?: string;
14
+ /**
15
+ * The CSS styles.
16
+ */
17
+ style?: React.CSSProperties;
18
+ }
19
+ declare const AiSkeletonIcon: {
20
+ ({ className, ...rest }: AiSkeletonIconProps): import("react/jsx-runtime").JSX.Element;
21
+ propTypes: {
22
+ /**
23
+ * Specify an optional className to add.
24
+ */
25
+ className: PropTypes.Requireable<string>;
26
+ /**
27
+ * The CSS styles.
28
+ */
29
+ style: PropTypes.Requireable<object>;
30
+ };
31
+ };
32
+ export default AiSkeletonIcon;
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Copyright IBM Corp. 2016, 2024
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 PropTypes from 'prop-types';
8
+ export interface AiSkeletonPlaceholderProps {
9
+ /**
10
+ * Add a custom class to the component to set the height and width
11
+ */
12
+ className?: string;
13
+ }
14
+ declare const AiSkeletonPlaceholder: {
15
+ ({ className, ...other }: AiSkeletonPlaceholderProps): import("react/jsx-runtime").JSX.Element;
16
+ propTypes: {
17
+ /**
18
+ * Add a custom class to the component
19
+ * to set the height and width
20
+ */
21
+ className: PropTypes.Requireable<string>;
22
+ };
23
+ };
24
+ export default AiSkeletonPlaceholder;
@@ -0,0 +1,55 @@
1
+ /**
2
+ * Copyright IBM Corp. 2016, 2024
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 PropTypes from 'prop-types';
8
+ interface AiSkeletonTextProps {
9
+ /**
10
+ * Specify an optional className to be applied to the container node.
11
+ */
12
+ className?: string;
13
+ /**
14
+ * Generates skeleton text at a larger size.
15
+ */
16
+ heading?: boolean;
17
+ /**
18
+ * The number of lines shown if paragraph is true.
19
+ */
20
+ lineCount?: number;
21
+ /**
22
+ * Set this to true to generate multiple lines of text.
23
+ */
24
+ paragraph?: boolean;
25
+ /**
26
+ * Width (in px or %) of single line of text or max-width of paragraph lines.
27
+ */
28
+ width?: string;
29
+ }
30
+ declare const AiSkeletonText: {
31
+ ({ className, ...rest }: AiSkeletonTextProps): import("react/jsx-runtime").JSX.Element;
32
+ propTypes: {
33
+ /**
34
+ * Specify an optional className to be applied to the container node
35
+ */
36
+ className: PropTypes.Requireable<string>;
37
+ /**
38
+ * generates skeleton text at a larger size
39
+ */
40
+ heading: PropTypes.Requireable<boolean>;
41
+ /**
42
+ * the number of lines shown if paragraph is true
43
+ */
44
+ lineCount: PropTypes.Requireable<number>;
45
+ /**
46
+ * will generate multiple lines of text
47
+ */
48
+ paragraph: PropTypes.Requireable<boolean>;
49
+ /**
50
+ * width (in px or %) of single line of text or max-width of paragraph lines
51
+ */
52
+ width: PropTypes.Requireable<string>;
53
+ };
54
+ };
55
+ export default AiSkeletonText;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Copyright IBM Corp. 2016, 2024
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 AiSkeletonPlaceholder from './AiSkeletonPlaceholder';
8
+ import AiSkeletonIcon from './AiSkeletonIcon';
9
+ import AiSkeletonText from './AiSkeletonText';
10
+ export { AiSkeletonText, AiSkeletonIcon, AiSkeletonPlaceholder };
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Copyright IBM Corp. 2016, 2024
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 PropTypes from 'prop-types';
8
+ import React from 'react';
9
+ interface AiSkeletonIconProps {
10
+ /**
11
+ * Specify an optional className to add.
12
+ */
13
+ className?: string;
14
+ /**
15
+ * The CSS styles.
16
+ */
17
+ style?: React.CSSProperties;
18
+ }
19
+ declare const AiSkeletonIcon: {
20
+ ({ className, ...rest }: AiSkeletonIconProps): import("react/jsx-runtime").JSX.Element;
21
+ propTypes: {
22
+ /**
23
+ * Specify an optional className to add.
24
+ */
25
+ className: PropTypes.Requireable<string>;
26
+ /**
27
+ * The CSS styles.
28
+ */
29
+ style: PropTypes.Requireable<object>;
30
+ };
31
+ };
32
+ export default AiSkeletonIcon;
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Copyright IBM Corp. 2016, 2024
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 PropTypes from 'prop-types';
8
+ export interface AiSkeletonPlaceholderProps {
9
+ /**
10
+ * Add a custom class to the component to set the height and width
11
+ */
12
+ className?: string;
13
+ }
14
+ declare const AiSkeletonPlaceholder: {
15
+ ({ className, ...other }: AiSkeletonPlaceholderProps): import("react/jsx-runtime").JSX.Element;
16
+ propTypes: {
17
+ /**
18
+ * Add a custom class to the component
19
+ * to set the height and width
20
+ */
21
+ className: PropTypes.Requireable<string>;
22
+ };
23
+ };
24
+ export default AiSkeletonPlaceholder;
@@ -0,0 +1,55 @@
1
+ /**
2
+ * Copyright IBM Corp. 2016, 2024
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 PropTypes from 'prop-types';
8
+ interface AiSkeletonTextProps {
9
+ /**
10
+ * Specify an optional className to be applied to the container node.
11
+ */
12
+ className?: string;
13
+ /**
14
+ * Generates skeleton text at a larger size.
15
+ */
16
+ heading?: boolean;
17
+ /**
18
+ * The number of lines shown if paragraph is true.
19
+ */
20
+ lineCount?: number;
21
+ /**
22
+ * Set this to true to generate multiple lines of text.
23
+ */
24
+ paragraph?: boolean;
25
+ /**
26
+ * Width (in px or %) of single line of text or max-width of paragraph lines.
27
+ */
28
+ width?: string;
29
+ }
30
+ declare const AiSkeletonText: {
31
+ ({ className, ...rest }: AiSkeletonTextProps): import("react/jsx-runtime").JSX.Element;
32
+ propTypes: {
33
+ /**
34
+ * Specify an optional className to be applied to the container node
35
+ */
36
+ className: PropTypes.Requireable<string>;
37
+ /**
38
+ * generates skeleton text at a larger size
39
+ */
40
+ heading: PropTypes.Requireable<boolean>;
41
+ /**
42
+ * the number of lines shown if paragraph is true
43
+ */
44
+ lineCount: PropTypes.Requireable<number>;
45
+ /**
46
+ * will generate multiple lines of text
47
+ */
48
+ paragraph: PropTypes.Requireable<boolean>;
49
+ /**
50
+ * width (in px or %) of single line of text or max-width of paragraph lines
51
+ */
52
+ width: PropTypes.Requireable<string>;
53
+ };
54
+ };
55
+ export default AiSkeletonText;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Copyright IBM Corp. 2016, 2024
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 AiSkeletonPlaceholder from './AiSkeletonPlaceholder';
8
+ import AiSkeletonIcon from './AiSkeletonIcon';
9
+ import AiSkeletonText from './AiSkeletonText';
10
+ export { AiSkeletonText, AiSkeletonIcon, AiSkeletonPlaceholder };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@carbon/react",
3
3
  "description": "React components for the Carbon Design System",
4
- "version": "1.51.0-rc.0",
4
+ "version": "1.51.0",
5
5
  "license": "Apache-2.0",
6
6
  "main": "lib/index.js",
7
7
  "module": "es/index.js",
@@ -51,7 +51,7 @@
51
51
  "@carbon/feature-flags": "^0.16.0",
52
52
  "@carbon/icons-react": "^11.36.0",
53
53
  "@carbon/layout": "^11.20.0",
54
- "@carbon/styles": "^1.51.0-rc.0",
54
+ "@carbon/styles": "^1.51.0",
55
55
  "@ibm/telemetry-js": "^1.2.0",
56
56
  "classnames": "2.5.1",
57
57
  "copy-to-clipboard": "^3.3.1",
@@ -79,7 +79,7 @@
79
79
  "@babel/preset-react": "^7.22.3",
80
80
  "@babel/preset-typescript": "^7.21.5",
81
81
  "@carbon/test-utils": "^10.30.0",
82
- "@carbon/themes": "^11.32.0-rc.0",
82
+ "@carbon/themes": "^11.32.0",
83
83
  "@rollup/plugin-babel": "^6.0.0",
84
84
  "@rollup/plugin-commonjs": "^25.0.0",
85
85
  "@rollup/plugin-node-resolve": "^15.0.0",
@@ -139,5 +139,5 @@
139
139
  "**/*.scss",
140
140
  "**/*.css"
141
141
  ],
142
- "gitHead": "c70f968d388bbf968269066402a741327b00ac1c"
142
+ "gitHead": "957667fa7f197b544f6cb336814daa7074daaaee"
143
143
  }
@@ -0,0 +1,9 @@
1
+ // Code generated by @carbon/react. DO NOT EDIT.
2
+ //
3
+ // Copyright IBM Corp. 2018, 2023
4
+ //
5
+ // This source code is licensed under the Apache-2.0 license found in the
6
+ // LICENSE file in the root directory of this source tree.
7
+ //
8
+
9
+ @forward '@carbon/styles/scss/components/skeleton-styles/ai-skeleton-styles';