@carbon/ibm-products 2.33.0 → 2.34.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (127) hide show
  1. package/css/index-full-carbon.css +303 -11
  2. package/css/index-full-carbon.css.map +1 -1
  3. package/css/index-full-carbon.min.css +1 -1
  4. package/css/index-full-carbon.min.css.map +1 -1
  5. package/css/index-without-carbon.css +303 -11
  6. package/css/index-without-carbon.css.map +1 -1
  7. package/css/index-without-carbon.min.css +1 -1
  8. package/css/index-without-carbon.min.css.map +1 -1
  9. package/css/index.css +303 -11
  10. package/css/index.css.map +1 -1
  11. package/css/index.min.css +1 -1
  12. package/css/index.min.css.map +1 -1
  13. package/es/components/CreateSidePanel/CreateSidePanel.d.ts +81 -2
  14. package/es/components/CreateSidePanel/CreateSidePanel.js +5 -2
  15. package/es/components/DataSpreadsheet/DataSpreadsheet.js +5 -117
  16. package/es/components/DataSpreadsheet/DataSpreadsheetBody.js +12 -111
  17. package/es/components/DataSpreadsheet/utils/commonEventHandlers.d.ts +4 -0
  18. package/es/components/DataSpreadsheet/utils/commonEventHandlers.js +304 -0
  19. package/es/components/Datagrid/Datagrid/DatagridContent.js +2 -1
  20. package/es/components/Datagrid/Datagrid/DatagridEmptyBody.js +4 -1
  21. package/es/components/Datagrid/Datagrid/DatagridRefBody.js +3 -1
  22. package/es/components/Datagrid/Datagrid/DatagridSimpleBody.js +4 -1
  23. package/es/components/Datagrid/Datagrid/DatagridVirtualBody.js +6 -2
  24. package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/Columns.d.ts +1 -1
  25. package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.js +4 -0
  26. package/es/components/Datagrid/Datagrid/addons/InlineEdit/handleGridKeyPress.d.ts +2 -1
  27. package/es/components/Datagrid/Datagrid/addons/InlineEdit/handleGridKeyPress.js +4 -3
  28. package/es/components/EditSidePanel/EditSidePanel.d.ts +92 -2
  29. package/es/components/EditSidePanel/EditSidePanel.js +8 -10
  30. package/es/components/FilterPanel/FilterPanelAccordion/FilterPanelAccordion.d.ts +5 -0
  31. package/es/components/FilterPanel/FilterPanelAccordion/FilterPanelAccordion.js +83 -0
  32. package/es/components/FilterPanel/FilterPanelAccordionItem/FilterPanelAccordionItem.d.ts +5 -0
  33. package/es/components/FilterPanel/FilterPanelAccordionItem/FilterPanelAccordionItem.js +94 -0
  34. package/es/components/FilterPanel/FilterPanelCheckbox/FilterPanelCheckbox.js +3 -1
  35. package/es/components/FilterPanel/FilterPanelCheckbox/index.d.ts +1 -0
  36. package/es/components/FilterPanel/FilterPanelCheckboxWithOverflow/FilterPanelCheckboxWithOverflow.d.ts +10 -0
  37. package/es/components/FilterPanel/FilterPanelCheckboxWithOverflow/FilterPanelCheckboxWithOverflow.js +157 -0
  38. package/es/components/FilterPanel/FilterPanelGroup/FilterPanelGroup.d.ts +5 -0
  39. package/es/components/FilterPanel/FilterPanelGroup/FilterPanelGroup.js +72 -0
  40. package/es/components/FilterPanel/FilterPanelLabel/FilterPanelLabel.js +2 -2
  41. package/es/components/FilterPanel/index.d.ts +4 -0
  42. package/es/components/OptionsTile/OptionsTile.d.ts +77 -3
  43. package/es/components/OptionsTile/OptionsTile.js +9 -20
  44. package/es/components/RemoveModal/RemoveModal.d.ts +81 -7
  45. package/es/components/RemoveModal/RemoveModal.js +1 -0
  46. package/es/components/ScrollGradient/ScrollGradient.d.ts +5 -0
  47. package/es/components/ScrollGradient/ScrollGradient.js +156 -0
  48. package/es/components/ScrollGradient/constants.d.ts +15 -0
  49. package/es/components/ScrollGradient/constants.js +121 -0
  50. package/es/components/ScrollGradient/index.d.ts +1 -0
  51. package/es/components/SidePanel/SidePanel.d.ts +144 -2
  52. package/es/components/SidePanel/SidePanel.js +57 -48
  53. package/es/components/StatusIcon/StatusIcon.d.ts +34 -2
  54. package/es/components/StatusIcon/StatusIcon.js +97 -95
  55. package/es/components/TruncatedList/TruncatedList.js +5 -3
  56. package/es/components/UserAvatar/UserAvatar.js +3 -2
  57. package/es/components/index.d.ts +2 -1
  58. package/es/global/js/package-settings.d.ts +5 -0
  59. package/es/global/js/package-settings.js +5 -0
  60. package/es/index.js +5 -0
  61. package/es/settings.d.ts +5 -0
  62. package/lib/components/CreateSidePanel/CreateSidePanel.d.ts +81 -2
  63. package/lib/components/CreateSidePanel/CreateSidePanel.js +5 -2
  64. package/lib/components/DataSpreadsheet/DataSpreadsheet.js +5 -117
  65. package/lib/components/DataSpreadsheet/DataSpreadsheetBody.js +12 -111
  66. package/lib/components/DataSpreadsheet/utils/commonEventHandlers.d.ts +4 -0
  67. package/lib/components/DataSpreadsheet/utils/commonEventHandlers.js +311 -0
  68. package/lib/components/Datagrid/Datagrid/DatagridContent.js +2 -1
  69. package/lib/components/Datagrid/Datagrid/DatagridEmptyBody.js +4 -1
  70. package/lib/components/Datagrid/Datagrid/DatagridRefBody.js +3 -1
  71. package/lib/components/Datagrid/Datagrid/DatagridSimpleBody.js +4 -1
  72. package/lib/components/Datagrid/Datagrid/DatagridVirtualBody.js +5 -1
  73. package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/Columns.d.ts +1 -1
  74. package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.js +4 -0
  75. package/lib/components/Datagrid/Datagrid/addons/InlineEdit/handleGridKeyPress.d.ts +2 -1
  76. package/lib/components/Datagrid/Datagrid/addons/InlineEdit/handleGridKeyPress.js +4 -3
  77. package/lib/components/EditSidePanel/EditSidePanel.d.ts +92 -2
  78. package/lib/components/EditSidePanel/EditSidePanel.js +8 -10
  79. package/lib/components/FilterPanel/FilterPanelAccordion/FilterPanelAccordion.d.ts +5 -0
  80. package/lib/components/FilterPanel/FilterPanelAccordion/FilterPanelAccordion.js +90 -0
  81. package/lib/components/FilterPanel/FilterPanelAccordionItem/FilterPanelAccordionItem.d.ts +5 -0
  82. package/lib/components/FilterPanel/FilterPanelAccordionItem/FilterPanelAccordionItem.js +101 -0
  83. package/lib/components/FilterPanel/FilterPanelCheckbox/FilterPanelCheckbox.js +3 -1
  84. package/lib/components/FilterPanel/FilterPanelCheckbox/index.d.ts +1 -0
  85. package/lib/components/FilterPanel/FilterPanelCheckboxWithOverflow/FilterPanelCheckboxWithOverflow.d.ts +10 -0
  86. package/lib/components/FilterPanel/FilterPanelCheckboxWithOverflow/FilterPanelCheckboxWithOverflow.js +164 -0
  87. package/lib/components/FilterPanel/FilterPanelGroup/FilterPanelGroup.d.ts +5 -0
  88. package/lib/components/FilterPanel/FilterPanelGroup/FilterPanelGroup.js +79 -0
  89. package/lib/components/FilterPanel/FilterPanelLabel/FilterPanelLabel.js +2 -2
  90. package/lib/components/FilterPanel/index.d.ts +4 -0
  91. package/lib/components/OptionsTile/OptionsTile.d.ts +77 -3
  92. package/lib/components/OptionsTile/OptionsTile.js +9 -20
  93. package/lib/components/RemoveModal/RemoveModal.d.ts +81 -7
  94. package/lib/components/RemoveModal/RemoveModal.js +1 -0
  95. package/lib/components/ScrollGradient/ScrollGradient.d.ts +5 -0
  96. package/lib/components/ScrollGradient/ScrollGradient.js +163 -0
  97. package/lib/components/ScrollGradient/constants.d.ts +15 -0
  98. package/lib/components/ScrollGradient/constants.js +128 -0
  99. package/lib/components/ScrollGradient/index.d.ts +1 -0
  100. package/lib/components/SidePanel/SidePanel.d.ts +144 -2
  101. package/lib/components/SidePanel/SidePanel.js +57 -48
  102. package/lib/components/StatusIcon/StatusIcon.d.ts +34 -2
  103. package/lib/components/StatusIcon/StatusIcon.js +97 -95
  104. package/lib/components/TruncatedList/TruncatedList.js +5 -3
  105. package/lib/components/UserAvatar/UserAvatar.js +3 -2
  106. package/lib/components/index.d.ts +2 -1
  107. package/lib/global/js/package-settings.d.ts +5 -0
  108. package/lib/global/js/package-settings.js +5 -0
  109. package/lib/index.js +25 -0
  110. package/lib/settings.d.ts +5 -0
  111. package/package.json +3 -3
  112. package/scss/components/FilterPanel/_filter-panel-accordion-item.scss +56 -0
  113. package/scss/components/FilterPanel/_filter-panel-accordion.scss +6 -0
  114. package/scss/components/FilterPanel/_filter-panel-checkbox-with-overflow.scss +62 -0
  115. package/scss/components/FilterPanel/_filter-panel-checkbox.scss +25 -3
  116. package/scss/components/FilterPanel/_filter-panel-group.scss +39 -0
  117. package/scss/components/FilterPanel/_filter-panel-label.scss +0 -8
  118. package/scss/components/FilterPanel/_filter-panel.scss +2 -0
  119. package/scss/components/FilterPanel/_index-with-carbon.scss +4 -0
  120. package/scss/components/FilterPanel/_index.scss +4 -0
  121. package/scss/components/ScrollGradient/_carbon-imports.scss +9 -0
  122. package/scss/components/ScrollGradient/_index-with-carbon.scss +9 -0
  123. package/scss/components/ScrollGradient/_index.scss +8 -0
  124. package/scss/components/ScrollGradient/_scroll-gradient.scss +102 -0
  125. package/scss/components/UserAvatar/_user-avatar.scss +37 -4
  126. package/scss/components/_index-with-carbon.scss +1 -0
  127. package/scss/components/_index.scss +1 -0
@@ -0,0 +1,164 @@
1
+ /**
2
+ * Copyright IBM Corp. 2020, 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
+
8
+ 'use strict';
9
+
10
+ Object.defineProperty(exports, '__esModule', { value: true });
11
+
12
+ var _rollupPluginBabelHelpers = require('../../../_virtual/_rollupPluginBabelHelpers.js');
13
+ var React = require('react');
14
+ var index = require('../../../node_modules/prop-types/index.js');
15
+ var cx = require('classnames');
16
+ var react = require('@carbon/react');
17
+ var devtools = require('../../../global/js/utils/devtools.js');
18
+ var settings = require('../../../settings.js');
19
+ var FilterPanelCheckbox = require('../FilterPanelCheckbox/FilterPanelCheckbox.js');
20
+
21
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
22
+
23
+ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
24
+ var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
25
+
26
+ var _excluded = ["children", "className", "count", "id", "labelText", "overflowMenuProps", "title"];
27
+
28
+ // The block part of our conventional BEM class names (blockClass__E--M).
29
+ var blockClass = "".concat(settings.pkg.prefix, "--filter-panel-checkbox-with-overflow");
30
+ var componentName = 'FilterPanelCheckboxWithOverflow';
31
+ var defaults = {
32
+ overflowMenuProps: {}
33
+ };
34
+
35
+ /**
36
+ * Provides a filter panel checkbox with an overflow menu.
37
+ *
38
+ * This component's props refer to the Carbon Checkbox,
39
+ * just like FilterPanelCheckbox.
40
+ *
41
+ * Use `overflowMenuProps` for properties specific to the OverflowMenu.
42
+ */
43
+ exports.FilterPanelCheckboxWithOverflow = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref) {
44
+ var children = _ref.children,
45
+ className = _ref.className,
46
+ count = _ref.count,
47
+ id = _ref.id,
48
+ labelText = _ref.labelText,
49
+ _ref$overflowMenuProp = _ref.overflowMenuProps,
50
+ overflowMenuProps = _ref$overflowMenuProp === void 0 ? defaults.overflowMenuProps : _ref$overflowMenuProp,
51
+ title = _ref.title,
52
+ rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
53
+ var _useState = React.useState(false),
54
+ _useState2 = _rollupPluginBabelHelpers.slicedToArray(_useState, 2),
55
+ menuIsOpen = _useState2[0],
56
+ setMenuIsOpen = _useState2[1];
57
+ var _useState3 = React.useState(false),
58
+ _useState4 = _rollupPluginBabelHelpers.slicedToArray(_useState3, 2),
59
+ showMenuButton = _useState4[0],
60
+ setShowMenuButton = _useState4[1];
61
+ // Destructure overflow menu properties.
62
+ var other = _rollupPluginBabelHelpers["extends"]({}, (_rollupPluginBabelHelpers.objectDestructuringEmpty(overflowMenuProps), overflowMenuProps));
63
+ var backupRef = React.useRef();
64
+ var localRef = ref || backupRef;
65
+ var setHideButton = function setHideButton(activeElement) {
66
+ if (!menuIsOpen && !localRef.current.contains(activeElement)) {
67
+ setShowMenuButton(false);
68
+ }
69
+ };
70
+ React.useEffect(function () {
71
+ setShowMenuButton(menuIsOpen);
72
+ }, [menuIsOpen]);
73
+ return (
74
+ /*#__PURE__*/
75
+ // eslint-disable-next-line jsx-a11y/no-static-element-interactions
76
+ React__default["default"].createElement("div", _rollupPluginBabelHelpers["extends"]({
77
+ className: cx__default["default"](blockClass, className, _rollupPluginBabelHelpers.defineProperty({}, "".concat(blockClass, "--open"), menuIsOpen)),
78
+ onBlur: function onBlur(_ref2) {
79
+ var relatedTarget = _ref2.relatedTarget;
80
+ return setHideButton(relatedTarget);
81
+ },
82
+ onFocus: function onFocus() {
83
+ return setShowMenuButton(true);
84
+ }
85
+ /**
86
+ * Desired behavior: onMouseEnter shows the menu, even when the user mouse-presses and -releases the checkbox/label.
87
+ * Issue: onMouseDown > checkbox/label triggers an onBlur event and hides the menu button.
88
+ * Releasing the mouse button then shows the button again.
89
+ * This behavior "flickers" the menu button.
90
+ * Solution: onMouseDown > preventDefault prevents onBlur from being called.
91
+ * The menu button remains visible at all times.
92
+ * This applies only when using the mouse; it is not an issue using the keyboard.
93
+ */,
94
+ onMouseDown: function onMouseDown(event) {
95
+ return event.preventDefault();
96
+ },
97
+ onMouseEnter: function onMouseEnter() {
98
+ return setShowMenuButton(true);
99
+ },
100
+ onMouseLeave: function onMouseLeave() {
101
+ return setHideButton(document.activeElement);
102
+ },
103
+ ref: localRef
104
+ }, devtools.getDevtoolsProps(componentName)), /*#__PURE__*/React__default["default"].createElement(FilterPanelCheckbox.FilterPanelCheckbox, _rollupPluginBabelHelpers["extends"]({}, rest, {
105
+ className: cx__default["default"]("".concat(blockClass, "__checkbox")),
106
+ count: count,
107
+ id: id,
108
+ labelText: labelText,
109
+ title: title
110
+ })), showMenuButton && /*#__PURE__*/React__default["default"].createElement(react.OverflowMenu, _rollupPluginBabelHelpers["extends"]({
111
+ open: overflowMenuProps === null || overflowMenuProps === void 0 ? void 0 : overflowMenuProps.open,
112
+ className: cx__default["default"]("".concat(blockClass, "__overflow-button"), overflowMenuProps === null || overflowMenuProps === void 0 ? void 0 : overflowMenuProps.menuClass),
113
+ menuOptionsClass: cx__default["default"]("".concat(blockClass, "__overflow-options"), overflowMenuProps === null || overflowMenuProps === void 0 ? void 0 : overflowMenuProps.menuOptionsClass),
114
+ "aria-label": overflowMenuProps === null || overflowMenuProps === void 0 ? void 0 : overflowMenuProps['aria-label'],
115
+ iconDescription: overflowMenuProps === null || overflowMenuProps === void 0 ? void 0 : overflowMenuProps['aria-label'],
116
+ onOpen: function onOpen() {
117
+ return setMenuIsOpen(true);
118
+ },
119
+ onClose: function onClose() {
120
+ return setMenuIsOpen(false);
121
+ },
122
+ flipped: (overflowMenuProps === null || overflowMenuProps === void 0 ? void 0 : overflowMenuProps.flipped) || true,
123
+ selectorPrimaryFocus: overflowMenuProps === null || overflowMenuProps === void 0 ? void 0 : overflowMenuProps.selectorPrimaryFocus
124
+ }, other), children))
125
+ );
126
+ });
127
+
128
+ // Return a placeholder if not released and not enabled by feature flag
129
+ exports.FilterPanelCheckboxWithOverflow = settings.pkg.checkComponentEnabled(exports.FilterPanelCheckboxWithOverflow, componentName);
130
+ exports.FilterPanelCheckboxWithOverflow.displayName = componentName;
131
+ exports.FilterPanelCheckboxWithOverflow.propTypes = {
132
+ /**
133
+ * Children containing `OverflowMenuItems`.
134
+ */
135
+ children: index["default"].node.isRequired,
136
+ /**
137
+ * Optional class to be applied to the containing node.
138
+ */
139
+ className: index["default"].string,
140
+ /**
141
+ * Number to be displayed with the checkbox.
142
+ */
143
+ count: index["default"].oneOfType([index["default"].number, index["default"].string]),
144
+ /**
145
+ * Unique identifier.
146
+ */
147
+ id: index["default"].string.isRequired,
148
+ /**
149
+ * Label to be displayed with the checkbox.
150
+ */
151
+ labelText: index["default"].node.isRequired,
152
+ /**
153
+ * Checkbox event handler.
154
+ */
155
+ onChange: index["default"].func,
156
+ /**
157
+ * Props specific to the internal `OverflowMenu`.
158
+ */
159
+ overflowMenuProps: index["default"].shape(_rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.defineProperty({}, 'aria-label', index["default"].string), "flipped", index["default"].bool), "menuClass", index["default"].string), "menuOptionsClass", index["default"].string), "open", index["default"].bool), "selectorPrimaryFocus", index["default"].string)),
160
+ /**
161
+ * Optional title attribute for the label.
162
+ */
163
+ title: index["default"].string
164
+ };
@@ -0,0 +1,5 @@
1
+ /**
2
+ * A container with a label and optional count.
3
+ */
4
+ export let FilterPanelGroup: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
5
+ import React from 'react';
@@ -0,0 +1,79 @@
1
+ /**
2
+ * Copyright IBM Corp. 2020, 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
+
8
+ 'use strict';
9
+
10
+ Object.defineProperty(exports, '__esModule', { value: true });
11
+
12
+ var _rollupPluginBabelHelpers = require('../../../_virtual/_rollupPluginBabelHelpers.js');
13
+ var React = require('react');
14
+ var index = require('../../../node_modules/prop-types/index.js');
15
+ var cx = require('classnames');
16
+ var devtools = require('../../../global/js/utils/devtools.js');
17
+ var settings = require('../../../settings.js');
18
+ var FilterPanelLabel = require('../FilterPanelLabel/FilterPanelLabel.js');
19
+
20
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
21
+
22
+ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
23
+ var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
24
+
25
+ var _excluded = ["children", "className", "count", "labelText", "title"];
26
+
27
+ // The block part of our conventional BEM class names (blockClass__E--M).
28
+ var blockClass = "".concat(settings.pkg.prefix, "--filter-panel-group");
29
+ var componentName = 'FilterPanelGroup';
30
+
31
+ /**
32
+ * A container with a label and optional count.
33
+ */
34
+ exports.FilterPanelGroup = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref) {
35
+ var children = _ref.children,
36
+ className = _ref.className,
37
+ count = _ref.count,
38
+ labelText = _ref.labelText,
39
+ title = _ref.title,
40
+ rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
41
+ return /*#__PURE__*/React__default["default"].createElement("div", _rollupPluginBabelHelpers["extends"]({}, rest, {
42
+ className: cx__default["default"](blockClass, className),
43
+ ref: ref
44
+ }, devtools.getDevtoolsProps(componentName)), labelText && /*#__PURE__*/React__default["default"].createElement("h2", {
45
+ className: "".concat(blockClass, "__title")
46
+ }, /*#__PURE__*/React__default["default"].createElement(FilterPanelLabel.FilterPanelLabel, {
47
+ count: count,
48
+ labelText: labelText,
49
+ title: title
50
+ })), /*#__PURE__*/React__default["default"].createElement("div", {
51
+ className: "".concat(blockClass, "__content")
52
+ }, children));
53
+ });
54
+
55
+ // Return a placeholder if not released and not enabled by feature flag
56
+ exports.FilterPanelGroup = settings.pkg.checkComponentEnabled(exports.FilterPanelGroup, componentName);
57
+ exports.FilterPanelGroup.displayName = componentName;
58
+ exports.FilterPanelGroup.propTypes = {
59
+ /**
60
+ * Provide the contents of the FilterPanelGroup.
61
+ */
62
+ children: index["default"].node.isRequired,
63
+ /**
64
+ * Optional class to be applied to the containing node.
65
+ */
66
+ className: index["default"].string,
67
+ /**
68
+ * Number to be displayed with the label.
69
+ */
70
+ count: index["default"].oneOfType([index["default"].number, index["default"].string]),
71
+ /**
72
+ * The label for the component.
73
+ */
74
+ labelText: index["default"].node.isRequired,
75
+ /**
76
+ * Optional title attribute for the label.
77
+ */
78
+ title: index["default"].string
79
+ };
@@ -42,9 +42,9 @@ exports.FilterPanelLabel = /*#__PURE__*/React__default["default"].forwardRef(fun
42
42
  }, devtools.getDevtoolsProps(componentName)), /*#__PURE__*/React__default["default"].createElement("span", {
43
43
  className: "".concat(blockClass, "__text"),
44
44
  title: title
45
- }, labelText), /*#__PURE__*/React__default["default"].createElement("span", {
45
+ }, labelText), count && /*#__PURE__*/React__default["default"].createElement("span", {
46
46
  className: "".concat(blockClass, "__count")
47
- }, count));
47
+ }, count), ' ');
48
48
  });
49
49
 
50
50
  // Return a placeholder if not released and not enabled by feature flag
@@ -1,3 +1,7 @@
1
1
  export { FilterPanel } from "./FilterPanel";
2
+ export { FilterPanelAccordion } from "./FilterPanelAccordion/FilterPanelAccordion";
3
+ export { FilterPanelAccordionItem } from "./FilterPanelAccordionItem/FilterPanelAccordionItem";
2
4
  export { FilterPanelCheckbox } from "./FilterPanelCheckbox/FilterPanelCheckbox";
5
+ export { FilterPanelCheckboxWithOverflow } from "./FilterPanelCheckboxWithOverflow/FilterPanelCheckboxWithOverflow";
6
+ export { FilterPanelGroup } from "./FilterPanelGroup/FilterPanelGroup";
3
7
  export { FilterPanelLabel } from "./FilterPanelLabel/FilterPanelLabel";
@@ -1,5 +1,79 @@
1
1
  /**
2
- * TODO: A description of the component.
2
+ * Copyright IBM Corp. 2021, 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.
3
6
  */
4
- export let OptionsTile: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
5
- import React from 'react';
7
+ import React, { ReactNode } from 'react';
8
+ interface OptionsTileProps {
9
+ /**
10
+ * Provide content to render as expandable OptionsTile. If no children
11
+ * are present, the OptionsTile will render as its variant.
12
+ */
13
+ children?: ReactNode;
14
+ /**
15
+ * Provide an optional class to be applied to the containing node.
16
+ */
17
+ className?: string;
18
+ /**
19
+ * Whether the toggle is enabled or disabled. If nothing is passed,
20
+ * no toggle will be rendered.
21
+ */
22
+ enabled?: boolean;
23
+ /**
24
+ * Whether the OptionsTile is in invalid validation state.
25
+ */
26
+ invalid?: boolean;
27
+ /**
28
+ * Provide a text explaining why the OptionsTile is in invalid state.
29
+ */
30
+ invalidText?: string;
31
+ /**
32
+ * Whether the OptionsTile is in locked validation state.
33
+ */
34
+ locked?: boolean;
35
+ /**
36
+ * Provide a text explaining why the OptionsTile is in locked state.
37
+ */
38
+ lockedText?: string;
39
+ /**
40
+ * Provide a function which will be called each time the user
41
+ * toggles the open state of the OptionsTile.
42
+ */
43
+ onChange?: (value: boolean) => void;
44
+ /**
45
+ * Provide a function which will be called each time the user
46
+ * interacts with the toggle.
47
+ */
48
+ onToggle: (value: boolean) => void;
49
+ /**
50
+ * Whether the OptionsTile is in open state.
51
+ */
52
+ open?: boolean;
53
+ /**
54
+ * Define the size of the OptionsTile.
55
+ */
56
+ size: 'lg' | 'xl';
57
+ /**
58
+ * Optionally provide a text summarizing the current state of the content.
59
+ */
60
+ summary?: string;
61
+ /**
62
+ * Provide the title for this OptionsTile.
63
+ */
64
+ title: string;
65
+ /**
66
+ * Optionally provide an id which should be used for the title.
67
+ */
68
+ titleId?: string;
69
+ /**
70
+ * Whether the OptionsTile is in warning validation state.
71
+ */
72
+ warn?: boolean;
73
+ /**
74
+ * Provide a text explaining why the OptionsTile is in warning state.
75
+ */
76
+ warnText?: string;
77
+ }
78
+ export declare let OptionsTile: React.ForwardRefExoticComponent<OptionsTileProps & React.RefAttributes<HTMLDivElement>>;
79
+ export {};
@@ -47,22 +47,12 @@ var carbonMotion__namespace = /*#__PURE__*/_interopNamespace(carbonMotion);
47
47
 
48
48
  var _Locked;
49
49
  var _excluded = ["children", "className", "enabled", "invalid", "invalidText", "locked", "lockedText", "onChange", "onToggle", "open", "size", "summary", "title", "titleId", "warn", "warnText"];
50
-
51
- // The block part of our conventional BEM class names (blockClass__E--M).
52
50
  var blockClass = "".concat(settings.pkg.prefix, "--options-tile");
53
51
  var componentName = 'OptionsTile';
54
-
55
- // NOTE: the component SCSS is not imported here: it is rolled up separately.
56
-
57
52
  // Default values for props
58
53
  var defaults = {
59
- onChange: function onChange() {},
60
- size: 'xl'
54
+ size: 'lg'
61
55
  };
62
-
63
- /**
64
- * TODO: A description of the component.
65
- */
66
56
  exports.OptionsTile = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref) {
67
57
  var children = _ref.children,
68
58
  className = _ref.className,
@@ -71,8 +61,7 @@ exports.OptionsTile = /*#__PURE__*/React__default["default"].forwardRef(function
71
61
  invalidText = _ref.invalidText,
72
62
  locked = _ref.locked,
73
63
  lockedText = _ref.lockedText,
74
- _ref$onChange = _ref.onChange,
75
- _onChange = _ref$onChange === void 0 ? defaults.onChange : _ref$onChange,
64
+ _onChange = _ref.onChange,
76
65
  onToggle = _ref.onToggle,
77
66
  open = _ref.open,
78
67
  _ref$size = _ref.size,
@@ -92,11 +81,12 @@ exports.OptionsTile = /*#__PURE__*/React__default["default"].forwardRef(function
92
81
  closing = _useState4[0],
93
82
  setClosing = _useState4[1];
94
83
  var _useControllableState = useControllableState.useControllableState({
95
- value: open,
96
84
  defaultValue: open || null,
85
+ name: 'OptionsTile',
97
86
  onChange: function onChange(value) {
98
- return _onChange(value);
99
- }
87
+ return _onChange === null || _onChange === void 0 ? void 0 : _onChange(value);
88
+ },
89
+ value: open
100
90
  }),
101
91
  _useControllableState2 = _rollupPluginBabelHelpers.slicedToArray(_useControllableState, 2),
102
92
  isOpen = _useControllableState2[0],
@@ -228,10 +218,7 @@ exports.OptionsTile = /*#__PURE__*/React__default["default"].forwardRef(function
228
218
  }, text)));
229
219
  }
230
220
  return /*#__PURE__*/React__default["default"].createElement("div", _rollupPluginBabelHelpers["extends"]({}, rest, {
231
- className: cx__default["default"](blockClass,
232
- // Apply the block class to the main HTML element
233
- className, // Apply any supplied class names to the main HTML element.
234
- "".concat(blockClass, "--").concat(size), _rollupPluginBabelHelpers.defineProperty({}, "".concat(blockClass, "--closing"), closing)),
221
+ className: cx__default["default"](blockClass, className, "".concat(blockClass, "--").concat(size), _rollupPluginBabelHelpers.defineProperty({}, "".concat(blockClass, "--closing"), closing)),
235
222
  ref: ref
236
223
  }, devtools.getDevtoolsProps(componentName)), enabled !== undefined && /*#__PURE__*/React__default["default"].createElement("div", {
237
224
  className: "".concat(blockClass, "__toggle-container")
@@ -322,6 +309,7 @@ exports.OptionsTile.propTypes = {
322
309
  * Provide a function which will be called each time the user
323
310
  * interacts with the toggle.
324
311
  */
312
+ /**@ts-ignore*/
325
313
  onToggle: index["default"].func,
326
314
  /**
327
315
  * Whether the OptionsTile is in open state.
@@ -330,6 +318,7 @@ exports.OptionsTile.propTypes = {
330
318
  /**
331
319
  * Define the size of the OptionsTile.
332
320
  */
321
+ /**@ts-ignore*/
333
322
  size: index["default"].oneOf(['lg', 'xl']),
334
323
  /**
335
324
  * Optionally provide a text summarizing the current state of the content.
@@ -1,7 +1,81 @@
1
- /**
2
- The `RemoveModal` covers what is known as high impact and medium impact deleting.
3
- Enabling `textConfirmation` enables what would be considered the high impact state of the modal.
4
- For additional information on differentiating between delete / remove and low / medium / high impact please refer to the usage guidelines.
5
- */
6
- export let RemoveModal: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
7
- import React from 'react';
1
+ /// <reference path="../../../src/custom-typings/index.d.ts" />
2
+ import React, { ReactNode } from 'react';
3
+ import { ComposedModal } from '@carbon/react';
4
+ interface RemoveModalProps extends React.ComponentProps<typeof ComposedModal> {
5
+ /**
6
+ * The content to be displayed in the body of the modal
7
+ */
8
+ body: string;
9
+ /**
10
+ * Optional classname
11
+ */
12
+ className?: string;
13
+ /**
14
+ * Provide a description for "close" icon that can be read by screen readers
15
+ */
16
+ iconDescription: string;
17
+ /**
18
+ * Message showed when user input fails validation
19
+ */
20
+ inputInvalidText?: string;
21
+ /**
22
+ * Label for text box
23
+ */
24
+ inputLabelText?: ReactNode;
25
+ /**
26
+ * Placeholder for text box
27
+ */
28
+ inputPlaceholderText?: string;
29
+ /**
30
+ * Specify the modal label texts
31
+ */
32
+ label?: string;
33
+ /**
34
+ * Callback function that runs when user closes the modal
35
+ */
36
+ onClose?: () => void;
37
+ /**
38
+ * Callback function that runs when user submits the modal
39
+ */
40
+ onRequestSubmit?: () => void;
41
+ /**
42
+ * Specify whether the Modal is currently open
43
+ */
44
+ open: boolean;
45
+ /**
46
+ * The DOM node the tearsheet should be rendered within. Defaults to document.body.
47
+ */
48
+ portalTarget?: ReactNode;
49
+ /**
50
+ * Prevent closing on click outside of modal
51
+ */
52
+ preventCloseOnClickOutside?: boolean;
53
+ /**
54
+ * Specify whether the primary button should be disabled. This value will override textConfirmation
55
+ */
56
+ primaryButtonDisabled?: boolean;
57
+ /**
58
+ * Specify the text for the primary button
59
+ */
60
+ primaryButtonText?: string;
61
+ /**
62
+ * The name of the resource being acted upon
63
+ */
64
+ resourceName: string;
65
+ /**
66
+ * Specify the text for the secondary button
67
+ */
68
+ secondaryButtonText?: string;
69
+ /**
70
+ * Specify whether or not to show the text confirmation input
71
+ */
72
+ textConfirmation?: boolean;
73
+ /**
74
+ * The text displayed at the top of the modal
75
+ */
76
+ title: string;
77
+ }
78
+ export declare let RemoveModal: React.ForwardRefExoticComponent<RemoveModalProps & {
79
+ children?: React.ReactNode;
80
+ } & React.RefAttributes<unknown>>;
81
+ export {};
@@ -33,6 +33,7 @@ The `RemoveModal` covers what is known as high impact and medium impact deleting
33
33
  Enabling `textConfirmation` enables what would be considered the high impact state of the modal.
34
34
  For additional information on differentiating between delete / remove and low / medium / high impact please refer to the usage guidelines.
35
35
  */
36
+
36
37
  exports.RemoveModal = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
37
38
  var body = _ref.body,
38
39
  className = _ref.className,
@@ -0,0 +1,5 @@
1
+ /**
2
+ * TODO: A description of the component.
3
+ */
4
+ export let ScrollGradient: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
5
+ import React from 'react';