@canonical/react-components 3.8.3 → 3.9.1
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 +2 -3
- package/dist/components/Accordion/Accordion.js +15 -11
- package/dist/components/ActionButton/ActionButton.js +13 -10
- package/dist/components/ApplicationLayout/AppAside/AppAside.js +12 -9
- package/dist/components/ApplicationLayout/AppMain/AppMain.js +7 -4
- package/dist/components/ApplicationLayout/AppNavigation/AppNavigation.js +9 -6
- package/dist/components/ApplicationLayout/AppNavigationBar/AppNavigationBar.js +7 -4
- package/dist/components/ApplicationLayout/AppStatus/AppStatus.js +7 -4
- package/dist/components/ApplicationLayout/Application/Application.js +7 -4
- package/dist/components/ApplicationLayout/ApplicationLayout.js +22 -19
- package/dist/components/ArticlePagination/ArticlePagination.js +10 -7
- package/dist/components/Badge/Badge.js +9 -6
- package/dist/components/Button/Button.js +15 -12
- package/dist/components/Card/Card.js +11 -8
- package/dist/components/Card/Card.stories.d.ts +5 -0
- package/dist/components/Card/Card.stories.js +13 -4
- package/dist/components/CheckboxInput/CheckableInput/CheckableInput.js +10 -7
- package/dist/components/CheckboxInput/CheckboxInput.js +7 -4
- package/dist/components/Chip/Chip.js +18 -15
- package/dist/components/Code/Code.js +10 -7
- package/dist/components/CodeSnippet/CodeSnippet.js +7 -4
- package/dist/components/CodeSnippet/CodeSnippetDropdown.js +12 -8
- package/dist/components/Col/Col.js +15 -12
- package/dist/components/ColumnSelector/columnSelectorHelper.js +7 -3
- package/dist/components/ConfirmationButton/ConfirmationButton.js +10 -7
- package/dist/components/ConfirmationModal/ConfirmationModal.js +15 -12
- package/dist/components/ContextualMenu/ContextualMenu.js +27 -24
- package/dist/components/ContextualMenu/ContextualMenuDropdown/ContextualMenuDropdown.js +47 -44
- package/dist/components/CustomSelect/CustomSelect.js +25 -22
- package/dist/components/CustomSelect/CustomSelect.stories.js +8 -5
- package/dist/components/EmptyState/EmptyState.js +9 -6
- package/dist/components/Field/Field.js +22 -19
- package/dist/components/Form/Form.js +9 -6
- package/dist/components/FormikField/FormikField.js +10 -7
- package/dist/components/Icon/Icon.js +8 -5
- package/dist/components/Input/Input.js +28 -21
- package/dist/components/Label/Label.js +9 -6
- package/dist/components/Link/Link.js +11 -8
- package/dist/components/List/List.js +28 -19
- package/dist/components/MainTable/MainTable.js +34 -28
- package/dist/components/Modal/Modal.js +13 -10
- package/dist/components/ModularTable/ModularTable.d.ts +5 -1
- package/dist/components/ModularTable/ModularTable.js +26 -21
- package/dist/components/ModularTable/ModularTable.stories.d.ts +1 -0
- package/dist/components/ModularTable/ModularTable.stories.js +96 -1
- package/dist/components/MultiSelect/MultiSelect.js +17 -14
- package/dist/components/MultiSelect/MultiSelect.stories.js +14 -14
- package/dist/components/Navigation/Navigation.js +31 -23
- package/dist/components/Navigation/NavigationLink/NavigationLink.js +26 -17
- package/dist/components/Navigation/NavigationMenu/NavigationMenu.js +16 -9
- package/dist/components/Notifications/Notification/Notification.js +19 -16
- package/dist/components/Notifications/ToastNotification/ToastNotificationProvider.js +15 -15
- package/dist/components/Pagination/Pagination.js +20 -17
- package/dist/components/Panel/Panel.js +29 -25
- package/dist/components/PasswordToggle/PasswordToggle.js +16 -13
- package/dist/components/RadioInput/RadioInput.js +6 -3
- package/dist/components/Row/Row.js +7 -4
- package/dist/components/ScrollableTable/ScrollableTable.stories.js +7 -3
- package/dist/components/SearchAndFilter/SearchAndFilter.js +10 -7
- package/dist/components/SearchBox/SearchBox.js +18 -15
- package/dist/components/Select/Select.js +25 -21
- package/dist/components/SideNavigation/SideNavigation.js +19 -13
- package/dist/components/SideNavigation/SideNavigationBase/SideNavigationBase.js +11 -8
- package/dist/components/SideNavigation/SideNavigationItem/SideNavigationItem.js +12 -6
- package/dist/components/SideNavigation/SideNavigationLink/SideNavigationLink.js +7 -4
- package/dist/components/SideNavigation/SideNavigationText/SideNavigationText.js +7 -4
- package/dist/components/Slider/Slider.js +17 -14
- package/dist/components/Spinner/Spinner.js +11 -8
- package/dist/components/StatusLabel/StatusLabel.js +8 -5
- package/dist/components/Stepper/Step/Step.js +15 -12
- package/dist/components/Strip/Strip.js +18 -15
- package/dist/components/Strip/Strip.stories.js +6 -1
- package/dist/components/Switch/Switch.js +9 -6
- package/dist/components/Table/Table.js +9 -6
- package/dist/components/TableCell/TableCell.js +11 -8
- package/dist/components/TableHeader/TableHeader.js +7 -4
- package/dist/components/TablePagination/TablePagination.js +14 -11
- package/dist/components/TablePagination/TablePaginationControls/TablePaginationControls.js +22 -19
- package/dist/components/TableRow/TableRow.js +6 -3
- package/dist/components/Tabs/Tabs.js +10 -7
- package/dist/components/Textarea/Textarea.js +29 -22
- package/dist/esm/components/Card/Card.stories.d.ts +5 -0
- package/dist/esm/components/Card/Card.stories.js +6 -1
- package/dist/esm/components/ModularTable/ModularTable.d.ts +5 -1
- package/dist/esm/components/ModularTable/ModularTable.js +4 -3
- package/dist/esm/components/ModularTable/ModularTable.stories.d.ts +1 -0
- package/dist/esm/components/ModularTable/ModularTable.stories.js +111 -0
- package/dist/esm/components/Strip/Strip.stories.js +6 -1
- package/dist/external/useSSR.js +6 -4
- package/package.json +50 -47
|
@@ -6,19 +6,22 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = exports.EmptyState = void 0;
|
|
7
7
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
const _excluded = ["children", "className", "image", "title"];
|
|
9
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
11
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
12
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
13
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
11
14
|
/**
|
|
12
15
|
* This is a [React](https://reactjs.org/) component to represent an empty state.
|
|
13
16
|
*/
|
|
14
17
|
const EmptyState = _ref => {
|
|
15
18
|
let {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
children,
|
|
20
|
+
className,
|
|
21
|
+
image,
|
|
22
|
+
title
|
|
23
|
+
} = _ref,
|
|
24
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
22
25
|
return /*#__PURE__*/_react.default.createElement("div", _extends({
|
|
23
26
|
className: (0, _classnames.default)(["row", className])
|
|
24
27
|
}, props), /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -8,8 +8,11 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _Label = _interopRequireDefault(require("../Label"));
|
|
10
10
|
var _Col = _interopRequireDefault(require("../Col"));
|
|
11
|
+
const _excluded = ["caution", "children", "className", "error", "forId", "help", "helpClassName", "helpId", "isSelect", "isTickElement", "label", "labelClassName", "labelFirst", "required", "stacked", "success", "validationId"];
|
|
11
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
13
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
14
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
15
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
13
16
|
/**
|
|
14
17
|
* The props for the Field component.
|
|
15
18
|
*/
|
|
@@ -81,25 +84,25 @@ const generateContent = _ref2 => {
|
|
|
81
84
|
};
|
|
82
85
|
const Field = _ref3 => {
|
|
83
86
|
let {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
87
|
+
caution,
|
|
88
|
+
children,
|
|
89
|
+
className,
|
|
90
|
+
error,
|
|
91
|
+
forId,
|
|
92
|
+
help,
|
|
93
|
+
helpClassName,
|
|
94
|
+
helpId,
|
|
95
|
+
isSelect,
|
|
96
|
+
isTickElement,
|
|
97
|
+
label,
|
|
98
|
+
labelClassName,
|
|
99
|
+
labelFirst = true,
|
|
100
|
+
required,
|
|
101
|
+
stacked,
|
|
102
|
+
success,
|
|
103
|
+
validationId
|
|
104
|
+
} = _ref3,
|
|
105
|
+
props = _objectWithoutProperties(_ref3, _excluded);
|
|
103
106
|
const labelNode = generateLabel(forId, required, label, labelClassName, stacked);
|
|
104
107
|
const content = generateContent({
|
|
105
108
|
isSelect,
|
|
@@ -6,8 +6,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
const _excluded = ["children", "className", "inline", "stacked"];
|
|
9
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
11
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
12
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
13
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
11
14
|
/**
|
|
12
15
|
* This is a [React](https://reactjs.org/) component for the Vanilla [Form](https://docs.vanillaframework.io/base/forms).
|
|
13
16
|
*
|
|
@@ -15,12 +18,12 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
|
15
18
|
*/
|
|
16
19
|
const Form = _ref => {
|
|
17
20
|
let {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
children,
|
|
22
|
+
className,
|
|
23
|
+
inline,
|
|
24
|
+
stacked
|
|
25
|
+
} = _ref,
|
|
26
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
24
27
|
return /*#__PURE__*/_react.default.createElement("form", _extends({
|
|
25
28
|
className: (0, _classnames.default)(className, {
|
|
26
29
|
"p-form": inline || stacked,
|
|
@@ -7,8 +7,11 @@ exports.default = void 0;
|
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _formik = require("formik");
|
|
9
9
|
var _Input = _interopRequireDefault(require("../Input"));
|
|
10
|
+
const _excluded = ["component", "displayError", "name", "value", "label"];
|
|
10
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
12
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
13
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
14
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
12
15
|
/**
|
|
13
16
|
* This component makes it easier to use Vanilla form inputs with Formik. It
|
|
14
17
|
* makes use of Formik's context to automatically map errors, values, states
|
|
@@ -16,13 +19,13 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
|
16
19
|
*/
|
|
17
20
|
const FormikField = _ref => {
|
|
18
21
|
let {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
component: Component = _Input.default,
|
|
23
|
+
displayError = true,
|
|
24
|
+
name,
|
|
25
|
+
value,
|
|
26
|
+
label
|
|
27
|
+
} = _ref,
|
|
28
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
26
29
|
const [field, meta] = (0, _formik.useField)({
|
|
27
30
|
name,
|
|
28
31
|
type: props.type,
|
|
@@ -6,8 +6,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = exports.ICONS = void 0;
|
|
7
7
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
const _excluded = ["className", "light", "name"];
|
|
9
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
11
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
12
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
13
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
11
14
|
const ICONS = exports.ICONS = {
|
|
12
15
|
anchor: "anchor",
|
|
13
16
|
chevronDown: "chevron-down",
|
|
@@ -51,11 +54,11 @@ const ICONS = exports.ICONS = {
|
|
|
51
54
|
*/
|
|
52
55
|
const Icon = _ref => {
|
|
53
56
|
let {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
className,
|
|
58
|
+
light,
|
|
59
|
+
name
|
|
60
|
+
} = _ref,
|
|
61
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
59
62
|
return /*#__PURE__*/_react.default.createElement("i", _extends({
|
|
60
63
|
className: (0, _classnames.default)(className, "p-icon--".concat(name), {
|
|
61
64
|
"is-light": light
|
|
@@ -9,10 +9,18 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
9
9
|
var _Field = _interopRequireDefault(require("../Field"));
|
|
10
10
|
var _CheckboxInput = _interopRequireDefault(require("../CheckboxInput"));
|
|
11
11
|
var _RadioInput = _interopRequireDefault(require("../RadioInput"));
|
|
12
|
+
const _excluded = ["caution", "className", "error", "help", "helpClassName", "id", "label", "labelClassName", "required", "stacked", "success", "takeFocus", "takeFocusDelay", "type", "wrapperClassName"];
|
|
12
13
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
13
14
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
14
15
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
16
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
17
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
18
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
19
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
20
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
|
21
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
22
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
23
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
16
24
|
/**
|
|
17
25
|
* The props for the Input component.
|
|
18
26
|
*/
|
|
@@ -24,23 +32,23 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
|
24
32
|
*/
|
|
25
33
|
const Input = _ref => {
|
|
26
34
|
let {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
35
|
+
caution,
|
|
36
|
+
className,
|
|
37
|
+
error,
|
|
38
|
+
help,
|
|
39
|
+
helpClassName,
|
|
40
|
+
id,
|
|
41
|
+
label,
|
|
42
|
+
labelClassName,
|
|
43
|
+
required,
|
|
44
|
+
stacked,
|
|
45
|
+
success,
|
|
46
|
+
takeFocus,
|
|
47
|
+
takeFocusDelay,
|
|
48
|
+
type,
|
|
49
|
+
wrapperClassName
|
|
50
|
+
} = _ref,
|
|
51
|
+
inputProps = _objectWithoutProperties(_ref, _excluded);
|
|
44
52
|
const inputRef = (0, _react.useRef)(null);
|
|
45
53
|
const fieldLabel = !["checkbox", "radio"].includes(type) ? label : "";
|
|
46
54
|
const defaultInputId = (0, _react.useId)();
|
|
@@ -49,14 +57,13 @@ const Input = _ref => {
|
|
|
49
57
|
const helpId = (0, _react.useId)();
|
|
50
58
|
const hasError = !!error;
|
|
51
59
|
const description = [help ? helpId : null, success ? validationId : null].filter(Boolean).join(" ");
|
|
52
|
-
const commonProps = {
|
|
60
|
+
const commonProps = _objectSpread({
|
|
53
61
|
"aria-describedby": !description ? undefined : description,
|
|
54
62
|
"aria-errormessage": hasError ? validationId : null,
|
|
55
63
|
"aria-invalid": hasError,
|
|
56
64
|
id: inputId,
|
|
57
|
-
required: required
|
|
58
|
-
|
|
59
|
-
};
|
|
65
|
+
required: required
|
|
66
|
+
}, inputProps);
|
|
60
67
|
(0, _react.useEffect)(() => {
|
|
61
68
|
if (takeFocus) {
|
|
62
69
|
if (takeFocusDelay) {
|
|
@@ -6,20 +6,23 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
const _excluded = ["children", "className", "forId", "required"];
|
|
9
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
11
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
12
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
13
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
11
14
|
/**
|
|
12
15
|
* The props for the Label component.
|
|
13
16
|
*/
|
|
14
17
|
|
|
15
18
|
const Label = _ref => {
|
|
16
19
|
let {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
children,
|
|
21
|
+
className,
|
|
22
|
+
forId,
|
|
23
|
+
required
|
|
24
|
+
} = _ref,
|
|
25
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
23
26
|
return /*#__PURE__*/_react.default.createElement("label", _extends({
|
|
24
27
|
className: (0, _classnames.default)(className, "p-form__label", {
|
|
25
28
|
"is-required": required
|
|
@@ -6,8 +6,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
const _excluded = ["children", "className", "href", "inverted", "soft", "top"];
|
|
9
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
11
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
12
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
13
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
11
14
|
/**
|
|
12
15
|
* This is a [React](https://reactjs.org/) component for the Vanilla [Link](https://docs.vanillaframework.io/patterns/links/).
|
|
13
16
|
*
|
|
@@ -15,14 +18,14 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
|
15
18
|
*/
|
|
16
19
|
const Link = _ref => {
|
|
17
20
|
let {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
21
|
+
children,
|
|
22
|
+
className,
|
|
23
|
+
href = "#",
|
|
24
|
+
inverted = false,
|
|
25
|
+
soft = false,
|
|
26
|
+
top = false
|
|
27
|
+
} = _ref,
|
|
28
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
26
29
|
const link = /*#__PURE__*/_react.default.createElement("a", _extends({
|
|
27
30
|
className: (0, _classnames.default)(className, {
|
|
28
31
|
"p-link--inverted": inverted,
|
|
@@ -6,8 +6,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
const _excluded = ["title", "className", "content", "titleElement"],
|
|
10
|
+
_excluded2 = ["title", "className", "content"],
|
|
11
|
+
_excluded3 = ["className", "detailed", "divided", "inline", "isDark", "items", "middot", "stretch", "split", "stepped", "ticked"];
|
|
9
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
13
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
14
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
15
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
11
16
|
const generateItems = _ref => {
|
|
12
17
|
let {
|
|
13
18
|
items,
|
|
@@ -27,20 +32,24 @@ const generateItems = _ref => {
|
|
|
27
32
|
content = item;
|
|
28
33
|
} else if (item && typeof item === "object" && "content" in item) {
|
|
29
34
|
if ("titleElement" in item) {
|
|
35
|
+
var _item = item;
|
|
30
36
|
({
|
|
31
37
|
title,
|
|
32
38
|
className,
|
|
33
39
|
content,
|
|
34
|
-
titleElement: TitleComponent = "h3"
|
|
35
|
-
|
|
36
|
-
|
|
40
|
+
titleElement: TitleComponent = "h3"
|
|
41
|
+
} = _item);
|
|
42
|
+
liProps = _objectWithoutProperties(_item, _excluded);
|
|
43
|
+
_item;
|
|
37
44
|
} else {
|
|
45
|
+
var _item2 = item;
|
|
38
46
|
({
|
|
39
47
|
title,
|
|
40
48
|
className,
|
|
41
|
-
content
|
|
42
|
-
|
|
43
|
-
|
|
49
|
+
content
|
|
50
|
+
} = _item2);
|
|
51
|
+
liProps = _objectWithoutProperties(_item2, _excluded2);
|
|
52
|
+
_item2;
|
|
44
53
|
}
|
|
45
54
|
}
|
|
46
55
|
if (stepped) {
|
|
@@ -71,19 +80,19 @@ const generateItems = _ref => {
|
|
|
71
80
|
*/
|
|
72
81
|
const List = _ref2 => {
|
|
73
82
|
let {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
83
|
+
className,
|
|
84
|
+
detailed,
|
|
85
|
+
divided,
|
|
86
|
+
inline,
|
|
87
|
+
isDark,
|
|
88
|
+
items,
|
|
89
|
+
middot,
|
|
90
|
+
stretch,
|
|
91
|
+
split,
|
|
92
|
+
stepped,
|
|
93
|
+
ticked
|
|
94
|
+
} = _ref2,
|
|
95
|
+
props = _objectWithoutProperties(_ref2, _excluded3);
|
|
87
96
|
const Component = stepped ? "ol" : "ul";
|
|
88
97
|
return /*#__PURE__*/_react.default.createElement(Component, _extends({
|
|
89
98
|
className: (0, _classnames.default)(className, {
|
|
@@ -11,10 +11,16 @@ var _TableRow = _interopRequireDefault(require("../TableRow"));
|
|
|
11
11
|
var _TableHeader = _interopRequireDefault(require("../TableHeader"));
|
|
12
12
|
var _TableCell = _interopRequireDefault(require("../TableCell"));
|
|
13
13
|
var _hooks = require("../../hooks");
|
|
14
|
+
const _excluded = ["content", "sortKey"],
|
|
15
|
+
_excluded2 = ["columns", "expanded", "expandedContent", "key", "sortData"],
|
|
16
|
+
_excluded3 = ["content"],
|
|
17
|
+
_excluded4 = ["defaultSort", "defaultSortDirection", "emptyStateMsg", "expanding", "headers", "onUpdateSort", "paginate", "rows", "responsive", "sortable", "sortFunction", "hiddenCaption"];
|
|
14
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
19
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
16
20
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
17
21
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
22
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
23
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
18
24
|
const updateSort = (setSortKey, setSortDirection, sortKey, sortDirection) => {
|
|
19
25
|
let newDirection = null;
|
|
20
26
|
if (sortDirection === "none") {
|
|
@@ -30,10 +36,10 @@ const updateSort = (setSortKey, setSortDirection, sortKey, sortDirection) => {
|
|
|
30
36
|
const generateHeaders = (currentSortKey, currentSortDirection, expanding, headers, sortable, setSortKey, setSortDirection) => {
|
|
31
37
|
const headerItems = headers.map((_ref, index) => {
|
|
32
38
|
let {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
39
|
+
content,
|
|
40
|
+
sortKey
|
|
41
|
+
} = _ref,
|
|
42
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
37
43
|
let sortDirection;
|
|
38
44
|
if (sortable && sortKey) {
|
|
39
45
|
if (currentSortKey === sortKey) {
|
|
@@ -65,18 +71,18 @@ const generateRows = _ref2 => {
|
|
|
65
71
|
} = _ref2;
|
|
66
72
|
return rows.map((_ref3, index) => {
|
|
67
73
|
let {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
74
|
+
columns,
|
|
75
|
+
expanded,
|
|
76
|
+
expandedContent,
|
|
77
|
+
key,
|
|
78
|
+
sortData: _
|
|
79
|
+
} = _ref3,
|
|
80
|
+
rowProps = _objectWithoutProperties(_ref3, _excluded2);
|
|
75
81
|
const cellItems = columns === null || columns === void 0 ? void 0 : columns.map((_ref4, index) => {
|
|
76
82
|
let {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
83
|
+
content
|
|
84
|
+
} = _ref4,
|
|
85
|
+
cellProps = _objectWithoutProperties(_ref4, _excluded3);
|
|
80
86
|
const headerContent = headers && headers[index]["content"];
|
|
81
87
|
const headerReplacement = headers && headers[index]["heading"];
|
|
82
88
|
if (responsive) {
|
|
@@ -138,20 +144,20 @@ const sortRows = _ref5 => {
|
|
|
138
144
|
*/
|
|
139
145
|
const MainTable = _ref6 => {
|
|
140
146
|
let {
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
147
|
+
defaultSort,
|
|
148
|
+
defaultSortDirection,
|
|
149
|
+
emptyStateMsg = "",
|
|
150
|
+
expanding,
|
|
151
|
+
headers,
|
|
152
|
+
onUpdateSort,
|
|
153
|
+
paginate,
|
|
154
|
+
rows,
|
|
155
|
+
responsive,
|
|
156
|
+
sortable,
|
|
157
|
+
sortFunction,
|
|
158
|
+
hiddenCaption
|
|
159
|
+
} = _ref6,
|
|
160
|
+
props = _objectWithoutProperties(_ref6, _excluded4);
|
|
155
161
|
const [currentSortKey, setSortKey] = (0, _react.useState)(defaultSort);
|
|
156
162
|
const [currentSortDirection, setSortDirection] = (0, _react.useState)(defaultSortDirection);
|
|
157
163
|
|
|
@@ -6,10 +6,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = exports.Modal = void 0;
|
|
7
7
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
const _excluded = ["buttonRow", "children", "className", "close", "focusRef", "title", "shouldPropagateClickEvent", "closeOnOutsideClick"];
|
|
9
10
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
10
11
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
11
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
13
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
14
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
15
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
13
16
|
/**
|
|
14
17
|
* This is a [React](https://reactjs.org/) component for the Vanilla [Modal](https://docs.vanillaframework.io/patterns/modal/).
|
|
15
18
|
*
|
|
@@ -17,16 +20,16 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
|
17
20
|
*/
|
|
18
21
|
const Modal = _ref => {
|
|
19
22
|
let {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
23
|
+
buttonRow,
|
|
24
|
+
children,
|
|
25
|
+
className,
|
|
26
|
+
close,
|
|
27
|
+
focusRef,
|
|
28
|
+
title,
|
|
29
|
+
shouldPropagateClickEvent = false,
|
|
30
|
+
closeOnOutsideClick = true
|
|
31
|
+
} = _ref,
|
|
32
|
+
wrapperProps = _objectWithoutProperties(_ref, _excluded);
|
|
30
33
|
// list of focusable selectors is based on this Stack Overflow answer:
|
|
31
34
|
// https://stackoverflow.com/a/30753870/3732840
|
|
32
35
|
const focusableElementSelectors = 'a[href]:not([tabindex="-1"]), button:not([disabled]), textarea:not([disabled]):not([tabindex="-1"]), input:not([disabled]):not([tabindex="-1"]), select:not([disabled]):not([tabindex="-1"]), area[href]:not([tabindex="-1"]), iframe:not([tabindex="-1"]), [tabindex]:not([tabindex="-1"]), [contentEditable=true]:not([tabindex="-1"])';
|
|
@@ -48,6 +48,10 @@ export type Props<D extends Record<string, unknown>> = PropsWithSpread<{
|
|
|
48
48
|
* Whether the sort by needs to be reset after each data change.
|
|
49
49
|
*/
|
|
50
50
|
autoResetSortBy?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* This will render between the header and the content.
|
|
53
|
+
*/
|
|
54
|
+
subhead?: ReactNode;
|
|
51
55
|
}, HTMLProps<HTMLTableElement>>;
|
|
52
56
|
/**
|
|
53
57
|
This is a [React](https://reactjs.org/) component to support many table use cases.
|
|
@@ -101,5 +105,5 @@ columns = {
|
|
|
101
105
|
};
|
|
102
106
|
```
|
|
103
107
|
*/
|
|
104
|
-
declare function ModularTable<D extends Record<string, unknown>>({ data, columns, emptyMsg, footer, sortable, getHeaderProps, getRowProps, getCellProps, getRowId, initialSortColumn, initialSortDirection, autoResetSortBy, ...props }: Props<D>): React.JSX.Element;
|
|
108
|
+
declare function ModularTable<D extends Record<string, unknown>>({ data, columns, emptyMsg, footer, sortable, getHeaderProps, getRowProps, getCellProps, getRowId, initialSortColumn, initialSortDirection, autoResetSortBy, subhead, ...props }: Props<D>): React.JSX.Element;
|
|
105
109
|
export default ModularTable;
|