newspack-components 3.0.0 → 4.0.0
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/colors/colors.module.scss +277 -0
- package/copy-styles.js +8 -1
- package/dist/cjs/action-card/action-card.d.js +5 -0
- package/dist/cjs/action-card/index.js +282 -186
- package/dist/cjs/action-card/style.scss +142 -44
- package/dist/cjs/autocomplete-tokenfield/index.js +6 -2
- package/dist/cjs/box-contrast/index.js +49 -0
- package/dist/cjs/button/index.js +1 -1
- package/dist/cjs/button-props/button-props.js +41 -0
- package/dist/cjs/button-props/index.js +13 -0
- package/dist/cjs/color-picker/index.js +11 -0
- package/dist/cjs/custom-select-control/style.scss +7 -12
- package/dist/cjs/footer/index.js +17 -24
- package/dist/cjs/footer/style.scss +0 -36
- package/dist/cjs/handoff-message/index.js +0 -3
- package/dist/cjs/hooks/useObjectState.js +9 -0
- package/dist/cjs/hooks/useObjectState.test.js +6 -6
- package/dist/cjs/image-upload/index.test.js +2 -2
- package/dist/cjs/index.js +7 -21
- package/dist/cjs/modal/index.js +16 -18
- package/dist/cjs/modal/style.scss +18 -7
- package/dist/cjs/newspack-icon/index.js +2 -2
- package/dist/cjs/newspack-icon/style.scss +3 -5
- package/dist/cjs/notice/index.js +1 -2
- package/dist/cjs/notice/style.scss +11 -9
- package/dist/cjs/plugin-installer/index.js +3 -3
- package/dist/cjs/plugin-settings/SettingsSection.js +2 -0
- package/dist/cjs/plugin-settings/index.js +4 -1
- package/dist/cjs/plugin-toggle/index.js +2 -0
- package/dist/cjs/popover/style.scss +5 -6
- package/dist/cjs/progress-bar/index.test.js +8 -9
- package/dist/cjs/progress-bar/style.scss +1 -2
- package/dist/cjs/proxied-imports/router.js +1 -2
- package/dist/cjs/radio-control/style.scss +8 -11
- package/dist/cjs/section-header/index.js +21 -1
- package/dist/cjs/select-control/ButtonGroupControl.js +2 -0
- package/dist/cjs/settings/SettingsCard.js +2 -6
- package/dist/cjs/sortable-newsletter-list-control/index.js +7 -5
- package/dist/cjs/sortable-newsletter-list-control/style.scss +11 -1
- package/dist/cjs/steps-list/style.scss +0 -3
- package/dist/cjs/steps-list-item/style.scss +1 -2
- package/dist/cjs/style-card/index.js +1 -0
- package/dist/cjs/style-card/style.scss +4 -5
- package/dist/cjs/style.scss +15 -0
- package/dist/cjs/tabbed-navigation/index.js +17 -7
- package/dist/cjs/tabbed-navigation/style.scss +2 -6
- package/dist/cjs/utils/color.js +35 -0
- package/dist/cjs/web-preview/index.js +1 -1
- package/dist/cjs/web-preview/style.scss +11 -11
- package/dist/cjs/with-wizard/index.js +80 -3
- package/dist/cjs/with-wizard/style.scss +34 -13
- package/dist/cjs/with-wizard-screen/index.js +3 -3
- package/dist/cjs/with-wizard-screen/style.scss +9 -9
- package/dist/cjs/wizard/index.js +38 -13
- package/dist/cjs/wizard/store/index.js +13 -5
- package/dist/cjs/wizard/store/utils.js +3 -1
- package/dist/esm/action-card/action-card.d.js +1 -0
- package/dist/esm/action-card/index.js +286 -188
- package/dist/esm/action-card/style.scss +142 -44
- package/dist/esm/autocomplete-tokenfield/index.js +6 -2
- package/dist/esm/box-contrast/index.js +44 -0
- package/dist/esm/button/index.js +1 -1
- package/dist/esm/button-props/button-props.js +34 -0
- package/dist/esm/button-props/index.js +1 -0
- package/dist/esm/color-picker/index.js +11 -0
- package/dist/esm/custom-select-control/style.scss +7 -12
- package/dist/esm/footer/index.js +18 -25
- package/dist/esm/footer/style.scss +0 -36
- package/dist/esm/handoff-message/index.js +0 -3
- package/dist/esm/hooks/useObjectState.js +12 -2
- package/dist/esm/hooks/useObjectState.test.js +7 -7
- package/dist/esm/hooks/usePrompt.js +2 -2
- package/dist/esm/image-upload/index.test.js +2 -2
- package/dist/esm/index.js +1 -3
- package/dist/esm/modal/index.js +17 -19
- package/dist/esm/modal/style.scss +18 -7
- package/dist/esm/newspack-icon/index.js +2 -2
- package/dist/esm/newspack-icon/style.scss +3 -5
- package/dist/esm/notice/index.js +1 -2
- package/dist/esm/notice/style.scss +11 -9
- package/dist/esm/plugin-installer/index.js +3 -3
- package/dist/esm/plugin-settings/SettingsSection.js +2 -0
- package/dist/esm/plugin-settings/index.js +4 -1
- package/dist/esm/plugin-toggle/index.js +2 -0
- package/dist/esm/popover/style.scss +5 -6
- package/dist/esm/progress-bar/index.test.js +7 -7
- package/dist/esm/progress-bar/style.scss +1 -2
- package/dist/esm/radio-control/style.scss +8 -11
- package/dist/esm/section-header/index.js +22 -0
- package/dist/esm/select-control/ButtonGroupControl.js +2 -0
- package/dist/esm/settings/SettingsCard.js +2 -6
- package/dist/esm/sortable-newsletter-list-control/index.js +8 -6
- package/dist/esm/sortable-newsletter-list-control/style.scss +11 -1
- package/dist/esm/steps-list/style.scss +0 -3
- package/dist/esm/steps-list-item/style.scss +1 -2
- package/dist/esm/style-card/index.js +1 -0
- package/dist/esm/style-card/style.scss +4 -5
- package/dist/esm/style.scss +15 -0
- package/dist/esm/tabbed-navigation/index.js +17 -7
- package/dist/esm/tabbed-navigation/style.scss +2 -6
- package/dist/esm/utils/color.js +29 -0
- package/dist/esm/web-preview/index.js +1 -1
- package/dist/esm/web-preview/style.scss +11 -11
- package/dist/esm/with-wizard/index.js +81 -4
- package/dist/esm/with-wizard/style.scss +34 -13
- package/dist/esm/with-wizard-screen/index.js +1 -1
- package/dist/esm/with-wizard-screen/style.scss +9 -9
- package/dist/esm/wizard/index.js +39 -13
- package/dist/esm/wizard/store/index.js +14 -6
- package/dist/esm/wizard/store/utils.js +3 -1
- package/package.json +2 -2
- package/src/accordion/index.js +1 -3
- package/src/action-card/action-card.d.ts +40 -0
- package/src/action-card/index.js +284 -201
- package/src/action-card/style.scss +142 -44
- package/src/autocomplete-tokenfield/index.js +3 -2
- package/src/autocomplete-with-suggestions/index.js +52 -63
- package/src/box-contrast/index.tsx +44 -0
- package/src/button/index.tsx +1 -1
- package/src/button-card/index.js +1 -12
- package/src/card/index.js +1 -11
- package/src/category-autocomplete/index.js +4 -19
- package/src/color-picker/index.js +11 -7
- package/src/custom-select-control/style.scss +7 -12
- package/src/footer/index.js +6 -18
- package/src/footer/style.scss +0 -36
- package/src/form-token-field/index.js +1 -2
- package/src/grid/index.tsx +1 -8
- package/src/handoff/index.js +4 -11
- package/src/handoff-message/index.js +0 -3
- package/src/hooks/useObjectState.js +10 -2
- package/src/hooks/useObjectState.test.js +14 -14
- package/src/image-upload/index.js +3 -23
- package/src/index.js +1 -3
- package/src/modal/index.js +11 -17
- package/src/modal/style.scss +18 -7
- package/src/newspack-icon/index.js +3 -14
- package/src/newspack-icon/style.scss +3 -5
- package/src/notice/index.js +0 -2
- package/src/notice/style.scss +11 -9
- package/src/plugin-installer/index.js +8 -17
- package/src/plugin-settings/SettingsSection.js +3 -7
- package/src/plugin-settings/index.js +7 -14
- package/src/plugin-toggle/README.md +3 -3
- package/src/plugin-toggle/index.js +10 -13
- package/src/popover/index.js +1 -5
- package/src/popover/style.scss +5 -6
- package/src/position-control/index.js +65 -75
- package/src/progress-bar/index.js +2 -9
- package/src/progress-bar/index.test.js +4 -13
- package/src/progress-bar/style.scss +1 -2
- package/src/radio-control/style.scss +8 -11
- package/src/section-header/index.js +20 -0
- package/src/select-control/ButtonGroupControl.js +2 -9
- package/src/select-control/GroupedSelectControl.js +1 -9
- package/src/select-control/index.js +1 -5
- package/src/settings/MinMaxSetting.js +2 -14
- package/src/settings/SettingsCard.js +2 -11
- package/src/sortable-newsletter-list-control/index.js +10 -26
- package/src/sortable-newsletter-list-control/style.scss +11 -1
- package/src/steps-list/style.scss +0 -3
- package/src/steps-list-item/index.js +1 -4
- package/src/steps-list-item/style.scss +1 -2
- package/src/style-card/index.js +6 -21
- package/src/style-card/style.scss +4 -5
- package/src/style.scss +15 -0
- package/src/tabbed-navigation/index.js +19 -7
- package/src/tabbed-navigation/style.scss +2 -6
- package/src/text-control/index.tsx +2 -12
- package/src/utils/color.ts +32 -0
- package/src/web-preview/style.scss +11 -11
- package/src/with-wizard/index.js +67 -16
- package/src/with-wizard/style.scss +34 -13
- package/src/with-wizard-screen/index.js +1 -1
- package/src/with-wizard-screen/style.scss +9 -9
- package/src/wizard/components/WizardError.js +2 -7
- package/src/wizard/index.js +64 -62
- package/src/wizard/store/index.js +8 -10
- package/src/wizard/store/utils.js +3 -4
- package/dist/cjs/date-range-picker/index.js +0 -39
- package/dist/cjs/date-range-picker/style.scss +0 -148
- package/dist/cjs/newspack-logo/index.js +0 -54
- package/dist/cjs/newspack-logo/style.scss +0 -30
- package/dist/cjs/patrons-logo/index.js +0 -77
- package/dist/esm/date-range-picker/index.js +0 -31
- package/dist/esm/date-range-picker/style.scss +0 -148
- package/dist/esm/newspack-logo/index.js +0 -46
- package/dist/esm/newspack-logo/style.scss +0 -30
- package/dist/esm/patrons-logo/index.js +0 -70
- package/shared/scss/_colors.scss +0 -27
- package/src/date-range-picker/index.js +0 -31
- package/src/date-range-picker/style.scss +0 -148
- package/src/newspack-logo/index.js +0 -45
- package/src/newspack-logo/style.scss +0 -30
- package/src/patrons-logo/index.js +0 -76
- /package/{shared/js → src/button-props}/button-props.js +0 -0
- /package/{shared/js → src/button-props}/index.js +0 -0
package/dist/esm/wizard/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import classnames from 'classnames';
|
|
|
7
7
|
* WordPress dependencies.
|
|
8
8
|
*/
|
|
9
9
|
import { useSelect } from '@wordpress/data';
|
|
10
|
-
import { useState } from '@wordpress/element';
|
|
10
|
+
import { useState, forwardRef } from '@wordpress/element';
|
|
11
11
|
import { __ } from '@wordpress/i18n';
|
|
12
12
|
import { category } from '@wordpress/icons';
|
|
13
13
|
|
|
@@ -17,9 +17,8 @@ import { category } from '@wordpress/icons';
|
|
|
17
17
|
import { Footer, Notice, Button, NewspackIcon, TabbedNavigation, PluginInstaller, HandoffMessage } from '../';
|
|
18
18
|
import Router from '../proxied-imports/router';
|
|
19
19
|
import registerStore, { WIZARD_STORE_NAMESPACE } from './store';
|
|
20
|
-
import { useWizardData } from './store/utils';
|
|
21
20
|
import WizardError from './components/WizardError';
|
|
22
|
-
import { jsx as _jsx, jsxs as _jsxs
|
|
21
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
23
22
|
registerStore();
|
|
24
23
|
const {
|
|
25
24
|
HashRouter,
|
|
@@ -27,22 +26,45 @@ const {
|
|
|
27
26
|
Route,
|
|
28
27
|
Switch
|
|
29
28
|
} = Router;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* @typedef {Object} WizardProps
|
|
32
|
+
* @property {string} headerText The header text.
|
|
33
|
+
* @property {string} [subHeaderText] The sub-header text, optional.
|
|
34
|
+
* @property {string} [apiSlug] The API slug, optional.
|
|
35
|
+
* @property {string} [className] CSS classes, optional.
|
|
36
|
+
* @property {any[]} sections Array of sections.
|
|
37
|
+
* @property {boolean} [hasSimpleFooter] Indicates if a simple footer is used, optional.
|
|
38
|
+
* @property {() => void} [renderAboveSections] Function to render content above sections, optional.
|
|
39
|
+
* @property {string[]} [requiredPlugins] Array of required plugin strings, optional.
|
|
40
|
+
* @property {boolean} [isInitialFetchTriggered] Indicates if the initial fetch should be triggered, optional.
|
|
41
|
+
*/
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Wizard Component
|
|
45
|
+
*
|
|
46
|
+
* Provides a tabbed UI with history.
|
|
47
|
+
*
|
|
48
|
+
* @param {WizardProps} props
|
|
49
|
+
* @return {JSX.Element} Wizard component
|
|
50
|
+
*/
|
|
30
51
|
const Wizard = ({
|
|
31
52
|
sections = [],
|
|
32
|
-
apiSlug,
|
|
33
53
|
headerText,
|
|
54
|
+
apiSlug,
|
|
34
55
|
subHeaderText,
|
|
35
56
|
hasSimpleFooter,
|
|
36
57
|
className,
|
|
37
58
|
renderAboveSections,
|
|
38
|
-
requiredPlugins = []
|
|
39
|
-
|
|
59
|
+
requiredPlugins = [],
|
|
60
|
+
isInitialFetchTriggered = true
|
|
61
|
+
}, ref) => {
|
|
40
62
|
const isLoading = useSelect(select => select(WIZARD_STORE_NAMESPACE).isLoading());
|
|
41
63
|
const isQuietLoading = useSelect(select => select(WIZARD_STORE_NAMESPACE).isQuietLoading());
|
|
42
64
|
|
|
43
65
|
// Trigger initial data fetch. Some sections might not use the wizard data,
|
|
44
66
|
// but for consistency, fetching is triggered regardless of the section.
|
|
45
|
-
useSelect(select => select(WIZARD_STORE_NAMESPACE).getWizardAPIData(apiSlug));
|
|
67
|
+
useSelect(select => isInitialFetchTriggered && select(WIZARD_STORE_NAMESPACE).getWizardAPIData(apiSlug));
|
|
46
68
|
let displayedSections = sections.filter(section => !section.isHidden);
|
|
47
69
|
const [pluginRequirementsSatisfied, setPluginRequirementsSatisfied] = useState(requiredPlugins.length === 0);
|
|
48
70
|
if (!pluginRequirementsSatisfied) {
|
|
@@ -57,7 +79,9 @@ const Wizard = ({
|
|
|
57
79
|
})
|
|
58
80
|
}];
|
|
59
81
|
}
|
|
60
|
-
|
|
82
|
+
const urlWithoutHash = window.location.href.split('#')[0];
|
|
83
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
84
|
+
ref: ref,
|
|
61
85
|
children: [/*#__PURE__*/_jsx("div", {
|
|
62
86
|
className: classnames(isLoading ? 'newspack-wizard__is-loading' : 'newspack-wizard__is-loaded', {
|
|
63
87
|
'newspack-wizard__is-loading-quiet': isQuietLoading
|
|
@@ -72,7 +96,7 @@ const Wizard = ({
|
|
|
72
96
|
className: "newspack-wizard__header__inner",
|
|
73
97
|
children: /*#__PURE__*/_jsxs("div", {
|
|
74
98
|
className: "newspack-wizard__title",
|
|
75
|
-
children: [/*#__PURE__*/_jsx(Button, {
|
|
99
|
+
children: [newspack_urls.dashboard !== urlWithoutHash ? /*#__PURE__*/_jsx(Button, {
|
|
76
100
|
isLink: true,
|
|
77
101
|
href: newspack_urls.dashboard,
|
|
78
102
|
label: __('Return to Dashboard', 'newspack-plugin'),
|
|
@@ -82,6 +106,8 @@ const Wizard = ({
|
|
|
82
106
|
children: /*#__PURE__*/_jsx(NewspackIcon, {
|
|
83
107
|
size: 36
|
|
84
108
|
})
|
|
109
|
+
}) : /*#__PURE__*/_jsx(NewspackIcon, {
|
|
110
|
+
size: 36
|
|
85
111
|
}), /*#__PURE__*/_jsxs("div", {
|
|
86
112
|
children: [headerText && /*#__PURE__*/_jsx("h2", {
|
|
87
113
|
children: headerText
|
|
@@ -96,11 +122,13 @@ const Wizard = ({
|
|
|
96
122
|
children: /*#__PURE__*/_jsx(WizardError, {})
|
|
97
123
|
}), /*#__PURE__*/_jsx(HandoffMessage, {}), /*#__PURE__*/_jsxs(Switch, {
|
|
98
124
|
children: [displayedSections.map((section, index) => {
|
|
125
|
+
var _section$exact;
|
|
99
126
|
const SectionComponent = section.render;
|
|
100
127
|
return /*#__PURE__*/_jsx(Route, {
|
|
128
|
+
exact: (_section$exact = section.exact) !== null && _section$exact !== void 0 ? _section$exact : false,
|
|
101
129
|
path: section.path,
|
|
102
130
|
children: /*#__PURE__*/_jsxs("div", {
|
|
103
|
-
className: classnames('newspack-
|
|
131
|
+
className: classnames('newspack-wizard__content', className),
|
|
104
132
|
children: ['function' === typeof renderAboveSections ? renderAboveSections() : null, /*#__PURE__*/_jsx(SectionComponent, {})]
|
|
105
133
|
})
|
|
106
134
|
}, index);
|
|
@@ -114,6 +142,4 @@ const Wizard = ({
|
|
|
114
142
|
})]
|
|
115
143
|
});
|
|
116
144
|
};
|
|
117
|
-
|
|
118
|
-
Wizard.STORE_NAMESPACE = WIZARD_STORE_NAMESPACE;
|
|
119
|
-
export default Wizard;
|
|
145
|
+
export default forwardRef(Wizard);
|
|
@@ -13,7 +13,7 @@ import { createReduxStore, register, dispatch, select } from '@wordpress/data';
|
|
|
13
13
|
import { createAction } from './utils.js';
|
|
14
14
|
export const WIZARD_STORE_NAMESPACE = 'newspack/wizards';
|
|
15
15
|
const DEFAULT_STATE = {
|
|
16
|
-
isLoading:
|
|
16
|
+
isLoading: false,
|
|
17
17
|
isQuietLoading: false,
|
|
18
18
|
apiData: {},
|
|
19
19
|
error: null
|
|
@@ -112,6 +112,10 @@ const selectors = {
|
|
|
112
112
|
isLoading: state => state.isLoading,
|
|
113
113
|
isQuietLoading: state => state.isQuietLoading,
|
|
114
114
|
getWizardAPIData: (state, slug) => state.apiData[slug] || {},
|
|
115
|
+
getWizardData: (state, slug) => {
|
|
116
|
+
var _state$apiData$slug;
|
|
117
|
+
return (_state$apiData$slug = state.apiData[slug]) !== null && _state$apiData$slug !== void 0 ? _state$apiData$slug : {};
|
|
118
|
+
},
|
|
115
119
|
getError: state => state.error
|
|
116
120
|
};
|
|
117
121
|
const store = createReduxStore(WIZARD_STORE_NAMESPACE, {
|
|
@@ -120,17 +124,21 @@ const store = createReduxStore(WIZARD_STORE_NAMESPACE, {
|
|
|
120
124
|
selectors,
|
|
121
125
|
controls: {
|
|
122
126
|
FETCH_FROM_API: action => {
|
|
127
|
+
const {
|
|
128
|
+
isLocalError = false,
|
|
129
|
+
isQuietFetch = false
|
|
130
|
+
} = action.payload;
|
|
123
131
|
dispatch(WIZARD_STORE_NAMESPACE).startLoadingData({
|
|
124
|
-
isQuietLoading: Boolean(
|
|
132
|
+
isQuietLoading: Boolean(isQuietFetch)
|
|
125
133
|
});
|
|
126
134
|
return apiFetch(action.payload).then(data => {
|
|
127
135
|
dispatch(WIZARD_STORE_NAMESPACE).setError(null);
|
|
128
136
|
return data;
|
|
129
137
|
}).catch(error => {
|
|
138
|
+
if (isLocalError) {
|
|
139
|
+
throw error;
|
|
140
|
+
}
|
|
130
141
|
dispatch(WIZARD_STORE_NAMESPACE).setError(error);
|
|
131
|
-
return {
|
|
132
|
-
error
|
|
133
|
-
};
|
|
134
142
|
}).finally(result => {
|
|
135
143
|
dispatch(WIZARD_STORE_NAMESPACE).finishLoadingData();
|
|
136
144
|
return result;
|
|
@@ -152,4 +160,4 @@ const store = createReduxStore(WIZARD_STORE_NAMESPACE, {
|
|
|
152
160
|
}
|
|
153
161
|
}
|
|
154
162
|
});
|
|
155
|
-
export default (
|
|
163
|
+
export default () => register(store);
|
|
@@ -11,4 +11,6 @@ export const createAction = type => payload => ({
|
|
|
11
11
|
type,
|
|
12
12
|
payload
|
|
13
13
|
});
|
|
14
|
-
export const useWizardData = (wizardName, defaultValue = {}) =>
|
|
14
|
+
export const useWizardData = (wizardName, defaultValue = {}) => {
|
|
15
|
+
return useSelect(select => select(WIZARD_STORE_NAMESPACE).getWizardAPIData(wizardName)) || defaultValue;
|
|
16
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "newspack-components",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"description": "Newspack design system components",
|
|
5
5
|
"author": "Automattic",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -58,4 +58,4 @@
|
|
|
58
58
|
"prepublishOnly": "npm run clean && npm run compile && node copy-styles.js",
|
|
59
59
|
"postpublish": "npm run clean"
|
|
60
60
|
}
|
|
61
|
-
}
|
|
61
|
+
}
|
package/src/accordion/index.js
CHANGED
|
@@ -20,9 +20,7 @@ import './style.scss';
|
|
|
20
20
|
const Accordion = ( { children, title } ) => {
|
|
21
21
|
const [ isOpen, setIsOpen ] = useState( false );
|
|
22
22
|
return (
|
|
23
|
-
<details
|
|
24
|
-
className={ classNames( 'newspack-accordion', { 'newspack-accordion--is-open': isOpen } ) }
|
|
25
|
-
>
|
|
23
|
+
<details className={ classNames( 'newspack-accordion', { 'newspack-accordion--is-open': isOpen } ) }>
|
|
26
24
|
<summary onClick={ () => setIsOpen( ! isOpen ) }>
|
|
27
25
|
{ title }
|
|
28
26
|
<Icon className="newspack-accordion__icon" icon={ chevronRight } size={ 24 } />
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export interface ActionCardProps {
|
|
2
|
+
id?: string | number;
|
|
3
|
+
title?: string | React.ReactNode;
|
|
4
|
+
titleLink?: string;
|
|
5
|
+
href?: string;
|
|
6
|
+
description?: string | React.ReactNode;
|
|
7
|
+
actionText?: React.ReactNode | string | null;
|
|
8
|
+
badge?: string;
|
|
9
|
+
className?: string;
|
|
10
|
+
indent?: string;
|
|
11
|
+
notification?: string | Error | null;
|
|
12
|
+
notificationLevel?: 'error' | 'warning' | 'info';
|
|
13
|
+
isMedium?: boolean;
|
|
14
|
+
disabled?: boolean | string;
|
|
15
|
+
hasGreyHeader?: boolean;
|
|
16
|
+
toggleChecked?: boolean;
|
|
17
|
+
toggleOnChange?: ( a: boolean ) => void;
|
|
18
|
+
actionContent?: boolean | React.ReactNode | null;
|
|
19
|
+
error?: Error | string | null;
|
|
20
|
+
handoff?: string | null;
|
|
21
|
+
isErrorStatus?: boolean;
|
|
22
|
+
checkbox?: 'checked' | 'unchecked';
|
|
23
|
+
isChecked?: boolean;
|
|
24
|
+
children?: boolean | React.ReactNode;
|
|
25
|
+
isSmall?: boolean;
|
|
26
|
+
editLink?: string;
|
|
27
|
+
simple?: boolean;
|
|
28
|
+
secondaryActionText?: string;
|
|
29
|
+
onSecondaryActionClick?: () => void;
|
|
30
|
+
secondaryDestructive?: boolean;
|
|
31
|
+
hasWhiteHeader?: boolean;
|
|
32
|
+
noBorder?: boolean;
|
|
33
|
+
noMargin?: boolean;
|
|
34
|
+
collapse?: boolean;
|
|
35
|
+
expandable?: boolean;
|
|
36
|
+
draggable?: boolean;
|
|
37
|
+
dragIndex?: number;
|
|
38
|
+
onDragCallback?: ( index: number ) => void;
|
|
39
|
+
dragWrapperRef?: React.MutableRefObject< HTMLDivElement | null >;
|
|
40
|
+
}
|