@carbon/ibm-products 1.17.0 → 1.18.0
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +30 -27
- package/css/index-full-carbon.css +144 -78
- package/css/index-full-carbon.css.map +1 -1
- package/css/index-full-carbon.min.css +4 -4
- package/css/index-full-carbon.min.css.map +1 -1
- package/css/index-without-carbon.css +27 -12
- package/css/index-without-carbon.css.map +1 -1
- package/css/index-without-carbon.min.css +2 -2
- package/css/index-without-carbon.min.css.map +1 -1
- package/css/index.css +53 -43
- package/css/index.css.map +1 -1
- package/css/index.min.css +4 -4
- package/css/index.min.css.map +1 -1
- package/es/components/AddSelect/AddSelect.js +30 -6
- package/es/components/AddSelect/AddSelectColumn.js +31 -73
- package/es/components/AddSelect/AddSelectFilter.js +2 -2
- package/es/components/AddSelect/AddSelectSort.js +61 -0
- package/es/components/AddSelect/add-select-utils.js +21 -0
- package/es/components/AddSelect/hooks/useItemSort.js +20 -0
- package/es/components/DataSpreadsheet/DataSpreadsheet.js +26 -13
- package/es/components/DataSpreadsheet/DataSpreadsheetBody.js +51 -40
- package/es/components/DataSpreadsheet/DataSpreadsheetHeader.js +60 -3
- package/es/components/DataSpreadsheet/hooks/index.js +3 -1
- package/es/components/DataSpreadsheet/hooks/useSpreadsheetEdit.js +15 -14
- package/es/components/DataSpreadsheet/hooks/useSpreadsheetMouseMove.js +60 -0
- package/es/components/DataSpreadsheet/hooks/useSpreadsheetMouseUp.js +153 -0
- package/es/components/DataSpreadsheet/utils/createCellSelectionArea.js +3 -3
- package/es/components/DataSpreadsheet/utils/moveColumnIndicatorLine.js +34 -0
- package/lib/components/AddSelect/AddSelect.js +31 -6
- package/lib/components/AddSelect/AddSelectColumn.js +32 -71
- package/lib/components/AddSelect/AddSelectFilter.js +2 -2
- package/lib/components/AddSelect/AddSelectSort.js +79 -0
- package/lib/components/AddSelect/add-select-utils.js +29 -2
- package/lib/components/AddSelect/hooks/useItemSort.js +33 -0
- package/lib/components/DataSpreadsheet/DataSpreadsheet.js +25 -12
- package/lib/components/DataSpreadsheet/DataSpreadsheetBody.js +52 -39
- package/lib/components/DataSpreadsheet/DataSpreadsheetHeader.js +62 -3
- package/lib/components/DataSpreadsheet/hooks/index.js +17 -1
- package/lib/components/DataSpreadsheet/hooks/useSpreadsheetEdit.js +14 -14
- package/lib/components/DataSpreadsheet/hooks/useSpreadsheetMouseMove.js +74 -0
- package/lib/components/DataSpreadsheet/hooks/useSpreadsheetMouseUp.js +161 -0
- package/lib/components/DataSpreadsheet/utils/createCellSelectionArea.js +3 -3
- package/lib/components/DataSpreadsheet/utils/moveColumnIndicatorLine.js +45 -0
- package/package.json +11 -10
- package/scss/components/AddSelect/_add-select.scss +6 -0
- package/scss/components/DataSpreadsheet/_data-spreadsheet.scss +21 -13
package/README.md
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
# @carbon/ibm-products
|
2
2
|
|
3
|
-
> Carbon for IBM Products is an open
|
3
|
+
> Carbon for IBM Products is an open source implementation of the closed source
|
4
4
|
> [Carbon for Cloud & Cognitive pattern asset library (PAL)](https://pages.github.ibm.com/cdai-design/pal/).
|
5
|
-
> These PAL designs build on the foundation of IBM
|
5
|
+
> These PAL designs build on the foundation of IBM’s open source Carbon Design
|
6
6
|
> System and React implementation to offer components and patterns beyond the
|
7
7
|
> typical component library. Carbon for IBM Products was previously known as
|
8
8
|
> Carbon for IBM Cloud and Cognitive (@carbon/ibm-cloud-cognitive), and this
|
@@ -19,10 +19,10 @@
|
|
19
19
|
|
20
20
|
## 🚀 Getting started
|
21
21
|
|
22
|
-
If you
|
23
|
-
a look at [our Storybook](https://ibm-
|
22
|
+
If you’re just getting started and looking to browse our React components, take
|
23
|
+
a look at [our Storybook](https://carbon-for-ibm-products.netlify.app).
|
24
24
|
|
25
|
-
|
25
|
+
### 📦 Installing Carbon for IBM Products
|
26
26
|
|
27
27
|
To use Carbon for IBM Products components, all you need to do is install the
|
28
28
|
`@carbon/ibm-products` package.
|
@@ -41,29 +41,32 @@ Then you can import the component styles in your `index.js`.
|
|
41
41
|
import '@carbon/ibm-products/css/index.min.css';
|
42
42
|
```
|
43
43
|
|
44
|
-
###
|
44
|
+
### Peer dependencies
|
45
45
|
|
46
|
-
|
47
|
-
dependencies which need to be installed.
|
46
|
+
`@carbon/ibm-products` is built on top of Carbon components and has a number of
|
47
|
+
dependencies which need to be installed.
|
48
48
|
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
49
|
+
- Install
|
50
|
+
[`carbon-components-react`](https://www.npmjs.com/package/carbon-components-react)
|
51
|
+
as per package instructions
|
52
|
+
- Install
|
53
|
+
[`@carbon/icons-react`](https://www.npmjs.com/package/@carbon/icons-react) as
|
54
|
+
per package instructions
|
55
|
+
- Install [`@carbon/elements`](https://www.npmjs.com/package/@carbon/elements)
|
56
|
+
as per package instructions
|
54
57
|
|
55
|
-
|
58
|
+
**Note:** `@carbon/elements` rolls up a number of Carbon packages that could be
|
56
59
|
installed independently. As this list of dependencies could change, we leave you
|
57
|
-
to view package.json in ibm-cloud-cognitive if you wish to install individual
|
60
|
+
to view `package.json` in ibm-cloud-cognitive if you wish to install individual
|
58
61
|
packages.
|
59
62
|
|
60
63
|
## Examples
|
61
64
|
|
62
|
-
###
|
65
|
+
### CodeSandbox
|
63
66
|
|
64
67
|
Examples for each released component, and some that are still not quite ready,
|
65
68
|
can be found here on
|
66
|
-
[
|
69
|
+
[CodeSandbox](https://codesandbox.io/examples/package/@carbon/ibm-cloud-cognitive).
|
67
70
|
|
68
71
|
### Packages
|
69
72
|
|
@@ -82,7 +85,7 @@ const App = () => {
|
|
82
85
|
};
|
83
86
|
```
|
84
87
|
|
85
|
-
|
88
|
+
### Enabling Canary components
|
86
89
|
|
87
90
|
Components that have not yet completed the release review process are considered
|
88
91
|
to be canary and require the consumer to enable via a feature flag in a
|
@@ -108,25 +111,25 @@ pkg.flags.noneJustYet = true;
|
|
108
111
|
pkg.setAllFeatures(true);
|
109
112
|
```
|
110
113
|
|
111
|
-
**Note:**
|
114
|
+
**Note:** The above settings must happen before a component first renders.
|
112
115
|
|
113
|
-
|
116
|
+
### Building and running locally
|
114
117
|
|
115
|
-
To get started run the following commands and
|
118
|
+
To get started, run the following commands and Storybook will be built and then
|
116
119
|
served on port `3000` on your local machine.
|
117
120
|
|
118
|
-
```
|
121
|
+
```shell
|
119
122
|
yarn install
|
120
123
|
yarn storybook
|
121
124
|
```
|
122
125
|
|
123
126
|
To build all the packages, run the following command.
|
124
127
|
|
125
|
-
```
|
128
|
+
```shell
|
126
129
|
yarn build
|
127
130
|
```
|
128
131
|
|
129
|
-
## Browser
|
132
|
+
## Browser support
|
130
133
|
|
131
134
|
This library supports the latest versions of:
|
132
135
|
|
@@ -137,17 +140,17 @@ This library supports the latest versions of:
|
|
137
140
|
|
138
141
|
## 🙌 Contributing
|
139
142
|
|
140
|
-
This project
|
143
|
+
This project is made possible by several community members who have invested
|
141
144
|
their precious time to give back to the Carbon community. It will continue to be
|
142
145
|
possible by having those that benefit from the package contribute back to it.
|
143
146
|
|
144
147
|
So, do not be shy. We both depend on and appreciate contributors, new and old,
|
145
148
|
who help us fix bugs, build new features, improve our documentation, etc.
|
146
149
|
|
147
|
-
If you
|
150
|
+
If you’re interested, definitely check out our
|
148
151
|
[Contributing Guide](https://github.com/carbon-design-system/ibm-cloud-cognitive/blob/master/.github/CONTRIBUTING.md)
|
149
152
|
and
|
150
|
-
[Carbon
|
153
|
+
[Carbon’s Developer Handbook](https://github.com/carbon-design-system/carbon/blob/master/docs/developer-handbook.md)!
|
151
154
|
👀
|
152
155
|
|
153
156
|
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
|