@carbon/ibm-products 1.33.0 → 1.34.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. package/css/index-full-carbon.css +78 -145
  2. package/css/index-full-carbon.css.map +1 -1
  3. package/css/index-full-carbon.min.css +4 -4
  4. package/css/index-full-carbon.min.css.map +1 -1
  5. package/css/index-without-carbon-released-only.css +6 -142
  6. package/css/index-without-carbon-released-only.css.map +1 -1
  7. package/css/index-without-carbon-released-only.min.css +3 -3
  8. package/css/index-without-carbon-released-only.min.css.map +1 -1
  9. package/css/index-without-carbon.css +61 -143
  10. package/css/index-without-carbon.css.map +1 -1
  11. package/css/index-without-carbon.min.css +4 -4
  12. package/css/index-without-carbon.min.css.map +1 -1
  13. package/css/index.css +76 -143
  14. package/css/index.css.map +1 -1
  15. package/css/index.min.css +4 -4
  16. package/css/index.min.css.map +1 -1
  17. package/es/components/Datagrid/Datagrid/DatagridContent.js +1 -1
  18. package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/Columns.js +0 -1
  19. package/es/components/Datagrid/utils/getArgTypes.js +4 -0
  20. package/es/components/InlineEditV2/InlineEditV2.js +249 -0
  21. package/es/components/InlineEditV2/index.js +1 -0
  22. package/es/components/PageHeader/PageHeaderTitle.js +3 -1
  23. package/es/components/SidePanel/SidePanel.js +44 -51
  24. package/es/components/SidePanel/motion/variants.js +39 -0
  25. package/es/components/index.js +2 -1
  26. package/es/global/js/package-settings.js +2 -1
  27. package/es/global/js/utils/getBezierValues.js +20 -0
  28. package/es/global/js/utils/motionConstants.js +45 -0
  29. package/lib/components/Datagrid/Datagrid/DatagridContent.js +1 -1
  30. package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/Columns.js +0 -1
  31. package/lib/components/Datagrid/utils/getArgTypes.js +4 -0
  32. package/lib/components/InlineEditV2/InlineEditV2.js +277 -0
  33. package/lib/components/InlineEditV2/index.js +13 -0
  34. package/lib/components/PageHeader/PageHeaderTitle.js +3 -1
  35. package/lib/components/SidePanel/SidePanel.js +45 -50
  36. package/lib/components/SidePanel/motion/variants.js +49 -0
  37. package/lib/components/index.js +9 -1
  38. package/lib/global/js/package-settings.js +2 -1
  39. package/lib/global/js/utils/getBezierValues.js +29 -0
  40. package/lib/global/js/utils/motionConstants.js +55 -0
  41. package/package.json +14 -13
  42. package/scss/components/Datagrid/_storybook-styles.scss +4 -0
  43. package/scss/components/InlineEditV2/_index.scss +10 -0
  44. package/scss/components/InlineEditV2/_inline-edit-v2.scss +81 -0
  45. package/scss/components/ModifiedTabs/_modified-tabs.scss +1 -1
  46. package/scss/components/PageHeader/_page-header.scss +4 -0
  47. package/scss/components/SidePanel/_side-panel.scss +0 -75
  48. package/scss/components/_index.scss +2 -0
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.EASINGS = exports.DURATIONS = void 0;
7
+
8
+ var _getBezierValues = require("./getBezierValues");
9
+
10
+ var _motion = require("@carbon/motion");
11
+
12
+ /**
13
+ * Copyright IBM Corp. 2022, 2022
14
+ *
15
+ * This source code is licensed under the Apache-2.0 license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */
18
+ var cleanMotionValue = function cleanMotionValue(val) {
19
+ return parseInt(val) / 1000;
20
+ };
21
+
22
+ var DURATIONS = {
23
+ // Micro-interactions such as button and toggle
24
+ fast01: cleanMotionValue(_motion.fast01),
25
+ // '70ms'
26
+ // Micro-interactions such as fade
27
+ fast02: cleanMotionValue(_motion.fast02),
28
+ // '110ms'
29
+ // Micro-interactions, small expansion, short distance movements
30
+ moderate01: cleanMotionValue(_motion.moderate01),
31
+ // '150ms'
32
+ // Expansion, system communication, toast
33
+ moderate02: cleanMotionValue(_motion.moderate02),
34
+ // '240ms'
35
+ // Large expansion, important system notifications
36
+ slow01: cleanMotionValue(_motion.slow01),
37
+ // '400ms'
38
+ // Background dimming
39
+ slow02: cleanMotionValue(_motion.slow02) // '700ms'
40
+
41
+ };
42
+ exports.DURATIONS = DURATIONS;
43
+ var EASINGS = {
44
+ productive: {
45
+ entrance: (0, _getBezierValues.getBezierValues)('entrance', 'productive'),
46
+ standard: (0, _getBezierValues.getBezierValues)('standard', 'productive'),
47
+ exit: (0, _getBezierValues.getBezierValues)('exit', 'productive')
48
+ },
49
+ expressive: {
50
+ entrance: (0, _getBezierValues.getBezierValues)('entrance', 'expressive'),
51
+ standard: (0, _getBezierValues.getBezierValues)('standard', 'expressive'),
52
+ exit: (0, _getBezierValues.getBezierValues)('exit', 'expressive')
53
+ }
54
+ };
55
+ exports.EASINGS = EASINGS;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@carbon/ibm-products",
3
3
  "description": "Carbon for IBM Products",
4
- "version": "1.33.0",
4
+ "version": "1.34.0",
5
5
  "license": "Apache-2.0",
6
6
  "main": "lib/index.js",
7
7
  "module": "es/index.js",
@@ -50,28 +50,29 @@
50
50
  "upgrade-dependencies": "npm-check-updates -u --dep dev,peer,prod --color --reject '/(carbon|^react$|^react-dom$|^chalk$|^react-dnd|^namor)/'"
51
51
  },
52
52
  "devDependencies": {
53
- "@babel/cli": "^7.18.10",
54
- "@babel/core": "^7.19.1",
55
- "babel-preset-ibm-cloud-cognitive": "^0.14.20",
53
+ "@babel/cli": "^7.19.3",
54
+ "@babel/core": "^7.19.3",
55
+ "babel-preset-ibm-cloud-cognitive": "^0.14.21",
56
56
  "chalk": "^4.1.2",
57
57
  "change-case": "^4.1.2",
58
58
  "copyfiles": "^2.4.1",
59
59
  "cross-env": "^7.0.3",
60
60
  "fs-extra": "^10.1.0",
61
61
  "glob": "^8.0.3",
62
- "jest": "^29.0.3",
63
- "jest-config-ibm-cloud-cognitive": "^0.24.6",
64
- "jest-environment-jsdom": "^29.0.3",
62
+ "jest": "^29.1.2",
63
+ "jest-config-ibm-cloud-cognitive": "^0.24.7",
64
+ "jest-environment-jsdom": "^29.1.2",
65
65
  "namor": "^1.1.2",
66
- "npm-check-updates": "^16.1.3",
66
+ "npm-check-updates": "^16.3.4",
67
67
  "npm-run-all": "^4.1.5",
68
68
  "rimraf": "^3.0.2",
69
- "sass": "^1.54.9",
70
- "yargs": "^17.5.1"
69
+ "sass": "^1.55.0",
70
+ "yargs": "^17.6.0"
71
71
  },
72
72
  "dependencies": {
73
73
  "@babel/runtime": "^7.19.0",
74
74
  "@carbon/telemetry": "^0.1.0",
75
+ "framer-motion": "^6.5.1",
75
76
  "immutability-helper": "^3.1.1",
76
77
  "react-dnd": "^15.1.2",
77
78
  "react-dnd-html5-backend": "^15.1.3",
@@ -87,11 +88,11 @@
87
88
  "@carbon/motion": "^10.29.0",
88
89
  "@carbon/themes": "^10.55.0",
89
90
  "@carbon/type": "^10.45.0",
90
- "carbon-components": "^10.58.1",
91
- "carbon-components-react": "^7.59.1",
91
+ "carbon-components": "^10.58.3",
92
+ "carbon-components-react": "^7.59.3",
92
93
  "carbon-icons": "^7.0.7",
93
94
  "react": "^16.8.6 || ^17.0.1",
94
95
  "react-dom": "^16.8.6 || ^17.0.1"
95
96
  },
96
- "gitHead": "1ac4bda25833dab9426808f9d397d0ea4c5534e4"
97
+ "gitHead": "4d7381ec5c70fafb0f37ab93673fe6f7ccd85fb0"
97
98
  }
@@ -93,3 +93,7 @@ $block-class: #{$pkg-prefix}--datagrid;
93
93
  text-overflow: ellipsis;
94
94
  white-space: nowrap;
95
95
  }
96
+
97
+ .#{$block-class}-story__hidden-column-id-snippet {
98
+ padding-top: $spacing-07;
99
+ }
@@ -0,0 +1,10 @@
1
+ //
2
+ // Copyright IBM Corp. 2020, 2021
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
+
8
+ // An index file is most useful when you have multiple components
9
+
10
+ @import './inline-edit-v2';
@@ -0,0 +1,81 @@
1
+ //
2
+ // Copyright IBM Corp. 2020, 2021
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
+
8
+ // Standard imports.
9
+ @import '../../global/styles/project-settings';
10
+ @import 'carbon-components/scss/components/button/button';
11
+ @import 'carbon-components/scss/components/text-input/text-input';
12
+
13
+ @mixin inline-edit-v2 {
14
+ $block-class: #{$pkg-prefix}--inline-edit-v2;
15
+ $carbon-text-input: #{$carbon-prefix}--text-input;
16
+
17
+ .#{$block-class} {
18
+ display: flex;
19
+ align-items: center;
20
+ background: transparent;
21
+ cursor: pointer;
22
+
23
+ &-readonly {
24
+ cursor: not-allowed;
25
+ }
26
+
27
+ &:hover {
28
+ background: $hover-ui;
29
+ }
30
+
31
+ &:hover .#{$block-class}__btn-edit {
32
+ visibility: visible;
33
+ }
34
+
35
+ &__btn-edit {
36
+ visibility: hidden;
37
+ }
38
+
39
+ &-focused {
40
+ background: $hover-ui;
41
+ outline: 2px solid $focus;
42
+ }
43
+
44
+ &__text-input {
45
+ flex: 1;
46
+ }
47
+
48
+ &__warning-icon {
49
+ color: $support-01;
50
+ }
51
+
52
+ &__warning-text {
53
+ @include carbon--type-style('caption-01');
54
+
55
+ margin-top: $spacing-03;
56
+ color: $support-01;
57
+ }
58
+ }
59
+
60
+ // overrides
61
+ .#{$block-class}__text-input.#{$carbon-text-input} {
62
+ border: none;
63
+ background: transparent;
64
+ cursor: pointer;
65
+ outline: none;
66
+ }
67
+
68
+ .#{$block-class}-readonly .#{$block-class}__text-input.#{$carbon-text-input} {
69
+ color: $disabled-02;
70
+ cursor: not-allowed;
71
+ }
72
+
73
+ .#{$block-class}__text-input.#{$carbon-text-input}:focus,
74
+ .#{$block-class}__text-input.#{$carbon-text-input}:active {
75
+ outline: none;
76
+ }
77
+ }
78
+
79
+ @include exports('inline-edit-v2') {
80
+ @include inline-edit-v2;
81
+ }
@@ -32,8 +32,8 @@
32
32
  height: 2.5rem;
33
33
  padding: $spacing-04;
34
34
  border: $spacing-01 solid transparent;
35
- background-color: transparent;
36
35
  border-radius: 0;
36
+ background-color: transparent;
37
37
  cursor: pointer;
38
38
  transition: background-color $duration--fast-02 motion(standard, productive);
39
39
  // stylelint-disable-next-line max-nesting-depth
@@ -471,6 +471,10 @@ $right-section-alt-width: 100% - $left-section-alt-width;
471
471
  vertical-align: middle;
472
472
  }
473
473
 
474
+ .#{$block-class}__title-wrapper {
475
+ @include carbon--type-style('productive-heading-04');
476
+ }
477
+
474
478
  .#{$block-class}__page-actions {
475
479
  flex: 0 0 100%;
476
480
  margin-top: $spacing-05;
@@ -24,49 +24,6 @@
24
24
  $block-class: #{$pkg-prefix}--side-panel;
25
25
  $action-set-block-class: #{$pkg-prefix}--action-set;
26
26
 
27
- @mixin sidePanelEntranceRight($size: map-get($side-panel-sizes, md)) {
28
- @keyframes side-panel-entrance-right {
29
- 0% {
30
- opacity: 0;
31
- // stylelint-disable-next-line carbon/layout-token-use
32
- transform: translateX(#{$size}); // the size width of the side panel
33
- }
34
-
35
- 100% {
36
- opacity: 1;
37
- transform: translateX(0);
38
- }
39
- }
40
- }
41
-
42
- @mixin sidePanelEntranceLeft($size: map-get($side-panel-sizes, md)) {
43
- @keyframes side-panel-entrance-left {
44
- 0% {
45
- opacity: 0;
46
- // stylelint-disable-next-line carbon/layout-token-use
47
- transform: translateX(-#{$size}); // the size width of the side panel
48
- }
49
-
50
- 100% {
51
- opacity: 1;
52
- transform: translateX(0);
53
- }
54
- }
55
- }
56
-
57
- @mixin sidePanelEntrance(
58
- $placement: 'right',
59
- $size: map-get($side-panel-sizes, md)
60
- ) {
61
- width: $size;
62
- max-width: 100%;
63
- @if $placement == right {
64
- @include sidePanelEntranceRight($size);
65
- } @else {
66
- @include sidePanelEntranceLeft($size);
67
- }
68
- }
69
-
70
27
  @mixin setPanelSize($size: map-get($side-panel-sizes, md)) {
71
28
  width: $size;
72
29
  max-width: 100%;
@@ -92,32 +49,6 @@ $action-set-block-class: #{$pkg-prefix}--action-set;
92
49
  }
93
50
 
94
51
  @mixin side-panel {
95
- @keyframes side-panel-exit-left {
96
- 0% {
97
- opacity: 1;
98
- transform: translateX(0);
99
- }
100
-
101
- 100% {
102
- opacity: 0;
103
- // stylelint-disable-next-line carbon/layout-token-use
104
- transform: translateX(calc(-1 * #{map-get($side-panel-sizes, md)}));
105
- }
106
- }
107
-
108
- @keyframes side-panel-exit-right {
109
- 0% {
110
- opacity: 1;
111
- transform: translateX(0);
112
- }
113
-
114
- 100% {
115
- opacity: 0;
116
- // stylelint-disable-next-line carbon/layout-token-use
117
- transform: translateX(map-get($side-panel-sizes, md));
118
- }
119
- }
120
-
121
52
  .#{$block-class}__container {
122
53
  --#{$block-class}--subtitle-opacity: 1;
123
54
  --#{$block-class}--title-container-height: 0;
@@ -137,7 +68,6 @@ $action-set-block-class: #{$pkg-prefix}--action-set;
137
68
  box-sizing: border-box;
138
69
  background-color: $ui-01;
139
70
  color: $text-01;
140
- transition: transform $duration--moderate-02 carbon--motion(standard);
141
71
  @each $size, $size_value in $side-panel-sizes {
142
72
  &.#{$block-class}__container--#{$size} {
143
73
  @include setPanelSize($size_value);
@@ -149,14 +79,10 @@ $action-set-block-class: #{$pkg-prefix}--action-set;
149
79
  }
150
80
  }
151
81
  &.#{$block-class}__container-right-placement.#{$block-class}__container--#{$size} {
152
- @include sidePanelEntrance(right, $size_value);
153
-
154
82
  right: 0;
155
83
  border-left: 1px solid $decorative-01;
156
84
  }
157
85
  &.#{$block-class}__container-left-placement.#{$block-class}__container--#{$size} {
158
- @include sidePanelEntrance(left, $size_value);
159
-
160
86
  left: 0;
161
87
  border-right: 1px solid $decorative-01;
162
88
  }
@@ -519,7 +445,6 @@ $action-set-block-class: #{$pkg-prefix}--action-set;
519
445
  width: 100%;
520
446
  height: 100%;
521
447
  background-color: $overlay-01;
522
- transition: background-color $duration--moderate-02 carbon--motion(standard);
523
448
  }
524
449
  }
525
450
 
@@ -48,3 +48,5 @@
48
48
  @import './EditTearsheet/index';
49
49
  @import './EditTearsheetNarrow/index';
50
50
  @import './EditFullPage/index';
51
+
52
+ @import './InlineEditV2/index';