@carbon/ibm-products 2.0.0-rc.6 → 2.0.0-rc.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (65) hide show
  1. package/README.md +2 -2
  2. package/css/index-full-carbon.css +96 -12
  3. package/css/index-full-carbon.css.map +1 -1
  4. package/css/index-full-carbon.min.css +3 -3
  5. package/css/index-full-carbon.min.css.map +1 -1
  6. package/css/index-without-carbon-released-only.css +6 -9
  7. package/css/index-without-carbon-released-only.css.map +1 -1
  8. package/css/index-without-carbon-released-only.min.css +2 -2
  9. package/css/index-without-carbon-released-only.min.css.map +1 -1
  10. package/css/index-without-carbon.css +96 -12
  11. package/css/index-without-carbon.css.map +1 -1
  12. package/css/index-without-carbon.min.css +3 -3
  13. package/css/index-without-carbon.min.css.map +1 -1
  14. package/css/index.css +89 -9
  15. package/css/index.css.map +1 -1
  16. package/css/index.min.css +3 -3
  17. package/css/index.min.css.map +1 -1
  18. package/es/components/ActionSet/ActionSet.js +7 -3
  19. package/es/components/AddSelect/add-select-utils.js +2 -2
  20. package/es/components/DataSpreadsheet/DataSpreadsheet.js +2 -1
  21. package/es/components/DataSpreadsheet/utils/handleCellDeletion.js +10 -1
  22. package/es/components/Datagrid/useNestedRowExpander.js +7 -2
  23. package/es/components/InlineEdit/InlineEdit.js +27 -427
  24. package/es/components/InlineEditV1/InlineEditV1.js +447 -0
  25. package/es/components/InlineEditV1/index.js +7 -0
  26. package/es/components/InlineEditV2/InlineEditV2.js +289 -0
  27. package/es/components/InlineEditV2/index.js +7 -0
  28. package/es/components/OptionsTile/OptionsTile.js +28 -12
  29. package/es/components/PageHeader/PageHeaderTitle.js +2 -4
  30. package/es/global/js/hooks/index.js +2 -1
  31. package/es/global/js/hooks/useControllableState.js +83 -0
  32. package/es/global/js/package-settings.js +3 -1
  33. package/lib/components/ActionSet/ActionSet.js +7 -3
  34. package/lib/components/AddSelect/add-select-utils.js +2 -2
  35. package/lib/components/DataSpreadsheet/DataSpreadsheet.js +2 -1
  36. package/lib/components/DataSpreadsheet/utils/handleCellDeletion.js +10 -1
  37. package/lib/components/Datagrid/useNestedRowExpander.js +7 -1
  38. package/lib/components/InlineEdit/InlineEdit.js +27 -428
  39. package/lib/components/InlineEditV1/InlineEditV1.js +464 -0
  40. package/lib/components/InlineEditV1/index.js +13 -0
  41. package/lib/components/InlineEditV2/InlineEditV2.js +309 -0
  42. package/lib/components/InlineEditV2/index.js +13 -0
  43. package/lib/components/OptionsTile/OptionsTile.js +28 -11
  44. package/lib/components/PageHeader/PageHeaderTitle.js +2 -4
  45. package/lib/global/js/hooks/index.js +9 -1
  46. package/lib/global/js/hooks/useControllableState.js +94 -0
  47. package/lib/global/js/package-settings.js +3 -1
  48. package/package.json +2 -2
  49. package/scss/components/ActionSet/_action-set.scss +9 -4
  50. package/scss/components/Datagrid/styles/_useNestedRows.scss +17 -0
  51. package/scss/components/{InlineEdit → InlineEditV1}/_carbon-imports.scss +0 -0
  52. package/scss/components/{InlineEdit → InlineEditV1}/_index-with-carbon.scss +1 -1
  53. package/scss/components/{InlineEdit → InlineEditV1}/_index.scss +1 -1
  54. package/scss/components/{InlineEdit/_inline-edit.scss → InlineEditV1/_inline-edit-v1.scss} +0 -0
  55. package/scss/components/{InlineEdit → InlineEditV1}/_storybook-styles.scss +0 -0
  56. package/scss/components/InlineEditV2/_carbon-imports.scss +9 -0
  57. package/scss/components/InlineEditV2/_index-with-carbon.scss +9 -0
  58. package/scss/components/InlineEditV2/_index.scss +10 -0
  59. package/scss/components/InlineEditV2/_inline-edit-v2.scss +83 -0
  60. package/scss/components/InlineEditV2/_storybook-styles.scss +9 -0
  61. package/scss/components/PageHeader/_page-header.scss +0 -4
  62. package/scss/components/_index-released-only-with-carbon.scss +1 -1
  63. package/scss/components/_index-released-only.scss +1 -1
  64. package/scss/components/_index-with-carbon.scss +2 -1
  65. package/scss/components/_index.scss +2 -1
@@ -0,0 +1,83 @@
1
+ //
2
+ // Copyright IBM Corp. 2022, 2022
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
+ @use '@carbon/styles/scss/spacing' as *;
10
+ @use '@carbon/styles/scss/theme' as *;
11
+ @use '../../global/styles/project-settings' as *;
12
+ @use '@carbon/styles/scss/type';
13
+
14
+ $block-class: #{$pkg-prefix}--inline-edit-v2;
15
+ $carbon-input: #{$carbon-prefix}--text-input;
16
+
17
+ .#{$block-class} {
18
+ display: flex;
19
+ align-items: center;
20
+ background: transparent;
21
+ cursor: pointer;
22
+ }
23
+
24
+ .#{$block-class}-readonly {
25
+ cursor: not-allowed;
26
+ }
27
+
28
+ .#{$block-class}:hover {
29
+ background: $field-01;
30
+ }
31
+
32
+ .#{$block-class}:hover .#{$block-class}__btn-edit {
33
+ visibility: visible;
34
+ }
35
+
36
+ .#{$block-class}__btn-edit {
37
+ visibility: hidden;
38
+ }
39
+
40
+ .#{$block-class}-focused {
41
+ background: $field-01;
42
+ outline: 2px solid $focus;
43
+ }
44
+
45
+ .#{$block-class}__text-input {
46
+ flex: 1;
47
+ }
48
+
49
+ .#{$block-class}__text-input-label {
50
+ display: none;
51
+ }
52
+
53
+ .#{$block-class}__warning-icon {
54
+ /* stylelint-disable-next-line carbon/layout-token-use */
55
+ margin-right: 0.4375rem;
56
+ color: $support-error;
57
+ }
58
+
59
+ .#{$block-class}__warning-text {
60
+ @include type.type-style('label-01');
61
+
62
+ margin-top: $spacing-03;
63
+ color: $support-error;
64
+ }
65
+
66
+ // overrides
67
+ .#{$block-class}__text-input.#{$carbon-input} {
68
+ border: none;
69
+ background: transparent;
70
+ cursor: pointer;
71
+ outline: none;
72
+ }
73
+
74
+ .#{$block-class}-readonly .#{$block-class}__text-input.#{$carbon-input},
75
+ .#{$block-class}-readonly
76
+ .#{$carbon-prefix}--btn.#{$carbon-prefix}--btn--icon-only.#{$carbon-prefix}--tooltip__trigger {
77
+ cursor: not-allowed;
78
+ }
79
+
80
+ .#{$block-class}__text-input.#{$carbon-input}:focus,
81
+ .#{$block-class}__text-input.#{$carbon-input}:active {
82
+ outline: none;
83
+ }
@@ -0,0 +1,9 @@
1
+ //
2
+ // Copyright IBM Corp. 2022, 2022
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
+ .inline-edit-v2-example {
8
+ width: 15rem;
9
+ }
@@ -466,10 +466,6 @@ $right-section-alt-width: 100% - $left-section-alt-width;
466
466
  vertical-align: middle;
467
467
  }
468
468
 
469
- .#{$block-class}__title-wrapper {
470
- @include type.type-style('productive-heading-04');
471
- }
472
-
473
469
  .#{$block-class}__page-actions {
474
470
  flex: 0 0 100%;
475
471
  margin-top: $spacing-05;
@@ -21,7 +21,7 @@
21
21
  @use './ExportModal/index-with-carbon' as *;
22
22
  @use './ExpressiveCard/index-with-carbon' as *;
23
23
  @use './HTTPErrors/index-with-carbon' as *;
24
- @use './InlineEdit/index-with-carbon' as *;
24
+ @use './InlineEditV1/index-with-carbon' as *;
25
25
  @use './ImportModal/index-with-carbon' as *;
26
26
  @use './NotificationsPanel/index-with-carbon' as *;
27
27
  @use './PageHeader/index-with-carbon' as *;
@@ -21,7 +21,7 @@
21
21
  @use './ExportModal';
22
22
  @use './ExpressiveCard';
23
23
  @use './HTTPErrors';
24
- @use './InlineEdit';
24
+ @use './InlineEditV1';
25
25
  @use './ImportModal';
26
26
  @use './NotificationsPanel';
27
27
  @use './PageHeader';
@@ -42,7 +42,8 @@
42
42
  @use './UserProfileImage/index-with-carbon' as *;
43
43
  @use './EditSidePanel/index-with-carbon' as *;
44
44
  @use './OptionsTile/index-with-carbon' as *;
45
- @use './InlineEdit/index-with-carbon' as *;
45
+ @use './InlineEditV1/index-with-carbon' as *;
46
+ @use './InlineEditV2/index-with-carbon' as *;
46
47
  @use './DataSpreadsheet/index-with-carbon' as *;
47
48
  @use './Datagrid/index-with-carbon' as *;
48
49
  @use './EditUpdateCards/index-with-carbon' as *;
@@ -42,7 +42,8 @@
42
42
  @use './UserProfileImage';
43
43
  @use './EditSidePanel';
44
44
  @use './OptionsTile';
45
- @use './InlineEdit';
45
+ @use './InlineEditV1';
46
+ @use './InlineEditV2';
46
47
  @use './DataSpreadsheet';
47
48
  @use './Datagrid';
48
49
  @use './EditTearsheet';