@popmenu/admin-ui 0.60.0 → 0.61.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/build/components/FullScreenStepper/FullScreenStepperProps.d.ts +4 -0
- package/build/components/FullScreenStepperActions/FullScreenStepperActionsProps.d.ts +9 -0
- package/build/components/FullScreenStepperActions/index.d.ts +1 -0
- package/build/components/index.d.ts +1 -0
- package/build/index.es.js +5 -4
- package/build/index.es.js.map +1 -1
- package/build/index.js +5 -3
- package/build/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -30,6 +30,8 @@ export declare namespace FullScreenStepperSubProps {
|
|
|
30
30
|
interface Step {
|
|
31
31
|
/** Group of props for modifying the ActionBar region of FullScreenStepper. */
|
|
32
32
|
actionBar?: ActionBar;
|
|
33
|
+
/** When false; disables the ActionBar of a step */
|
|
34
|
+
displayActionBar?: boolean;
|
|
33
35
|
/** The name of a given step. Used to match with a provided content component. */
|
|
34
36
|
name: string;
|
|
35
37
|
/** Text displayed as the title of a step. */
|
|
@@ -43,6 +45,8 @@ export interface FullScreenStepperProps extends DialogProps {
|
|
|
43
45
|
context?: Record<string, unknown>;
|
|
44
46
|
/** Specifies which step the dialog will initialize at. */
|
|
45
47
|
defaultStepCursor?: number;
|
|
48
|
+
/** When false; disables the ActionBar across all the FullScreenStepper */
|
|
49
|
+
displayActionBar?: boolean;
|
|
46
50
|
/** Controls whether or not the "Cancel" button is displayed. */
|
|
47
51
|
displayCancelButton?: boolean;
|
|
48
52
|
/** Controls whether or not the "Previous" button is displayed. */
|
|
@@ -1,13 +1,22 @@
|
|
|
1
1
|
import { FullScreenStepperSubProps } from '../FullScreenStepper/FullScreenStepperProps';
|
|
2
2
|
import { FullScreenStepperTypes } from '../FullScreenStepper/types';
|
|
3
3
|
export interface FullScreenStepperActionsProps extends Partial<FullScreenStepperSubProps.ActionBar> {
|
|
4
|
+
/** The callback args for custom actions */
|
|
4
5
|
callbackArgs: FullScreenStepperTypes.EventCallbackArgs;
|
|
6
|
+
/** When false; hides the "Cancel" button */
|
|
5
7
|
displayCancelButton: boolean;
|
|
8
|
+
/** When false; hides the "Previous" button */
|
|
6
9
|
displayPreviousButton: boolean;
|
|
10
|
+
/** The total number of steps */
|
|
7
11
|
stepCount: FullScreenStepperTypes.StepCount;
|
|
12
|
+
/** The current value of step cursor */
|
|
8
13
|
stepCursor: FullScreenStepperTypes.StepCursor;
|
|
14
|
+
/** The setter for value of step cursor */
|
|
9
15
|
setStepCursor: FullScreenStepperTypes.SetStepCursor;
|
|
16
|
+
/** Callback triggered when the "Cancel" button is clicked. */
|
|
10
17
|
handleCancelClick: () => Promise<void>;
|
|
18
|
+
/** Callback triggered when the "Next" button is clicked. */
|
|
11
19
|
handleNextClick: () => Promise<void>;
|
|
20
|
+
/** Callback triggered when the "Previous" button is clicked. */
|
|
12
21
|
handlePreviousClick: () => Promise<void>;
|
|
13
22
|
}
|
|
@@ -6,6 +6,7 @@ export { default as Button, ButtonProps } from './Button';
|
|
|
6
6
|
export { default as ButtonGroup, ButtonGroupProps } from './ButtonGroup';
|
|
7
7
|
export { default as FeatureIntro, FeatureIntroProps } from './FeatureIntro';
|
|
8
8
|
export { default as FullScreenStepper, FullScreenStepperProps, FullScreenStepperContext } from './FullScreenStepper';
|
|
9
|
+
export { default as FullScreenStepperActions, FullScreenStepperActionsProps } from './FullScreenStepperActions';
|
|
9
10
|
export { default as FullScreenStepperContent } from './FullScreenStepperContent';
|
|
10
11
|
export { default as SelectableCard, SelectableCardProps } from './SelectableCard';
|
|
11
12
|
export { default as Toast, ToastProps } from './Toast';
|
package/build/index.es.js
CHANGED
|
@@ -1542,11 +1542,12 @@ var FullScreenStepperContext = createContext({});
|
|
|
1542
1542
|
* - loading?
|
|
1543
1543
|
*/
|
|
1544
1544
|
var FullScreenStepper = function (props) {
|
|
1545
|
-
var children = props.children, _a = props.context, context = _a === void 0 ? {} : _a, _b = props.defaultStepCursor, defaultStepCursor = _b === void 0 ? 1 : _b, _c = props.
|
|
1546
|
-
var
|
|
1545
|
+
var children = props.children, _a = props.context, context = _a === void 0 ? {} : _a, _b = props.defaultStepCursor, defaultStepCursor = _b === void 0 ? 1 : _b, _c = props.displayActionBar, displayActionBar = _c === void 0 ? true : _c, _d = props.displayCancelButton, displayCancelButton = _d === void 0 ? true : _d, _e = props.displayPreviousButton, displayPreviousButton = _e === void 0 ? true : _e, _f = props.resetStepCursorOnCancel, resetStepCursorOnCancel = _f === void 0 ? true : _f, _g = props.resetStepCursorOnClose, resetStepCursorOnClose = _g === void 0 ? true : _g, steps = props.steps, onClose = props.onClose, onFinish = props.onFinish, onNext = props.onNext, onCancel = props.onCancel, onPrevious = props.onPrevious, DialogProps = __rest$1(props, ["children", "context", "defaultStepCursor", "displayActionBar", "displayCancelButton", "displayPreviousButton", "resetStepCursorOnCancel", "resetStepCursorOnClose", "steps", "onClose", "onFinish", "onNext", "onCancel", "onPrevious"]);
|
|
1546
|
+
var _h = useState(defaultStepCursor), stepCursor = _h[0], setStepCursor = _h[1];
|
|
1547
1547
|
var stepCount = steps.length;
|
|
1548
1548
|
var stepIndex = stepCursor - 1;
|
|
1549
1549
|
var step = steps[stepIndex];
|
|
1550
|
+
var _j = step.displayActionBar, displayStepActionBar = _j === void 0 ? true : _j;
|
|
1550
1551
|
var isFinalStep = stepCursor / stepCount === 1;
|
|
1551
1552
|
var callbackArgs = { setStepCursor: setStepCursor, step: step, stepCount: stepCount, stepIndex: stepIndex, steps: steps };
|
|
1552
1553
|
var mergedContext = __assign$1(__assign$1({}, context), callbackArgs);
|
|
@@ -1626,7 +1627,7 @@ var FullScreenStepper = function (props) {
|
|
|
1626
1627
|
React__default.createElement(Box$1, { display: "flex", flexDirection: "column", flexGrow: 1 },
|
|
1627
1628
|
React__default.createElement(FullScreenStepperHeader, { stepCount: stepCount, stepCursor: stepCursor, onClose: handleClose, step: step }),
|
|
1628
1629
|
React__default.createElement(Box$1, { display: "flex", mx: 6, flexGrow: 1, alignItems: "center", flexDirection: "column" }, content),
|
|
1629
|
-
React__default.createElement(FullScreenStepperActions, __assign$1({}, step.actionBar, { callbackArgs: callbackArgs, displayCancelButton: displayCancelButton, displayPreviousButton: displayPreviousButton, stepCount: stepCount, stepCursor: stepCursor, setStepCursor: setStepCursor, handleCancelClick: handleCancelClick, handleNextClick: handleNextClick, handlePreviousClick: handlePreviousClick }))))));
|
|
1630
|
+
displayActionBar && displayStepActionBar && (React__default.createElement(FullScreenStepperActions, __assign$1({}, step.actionBar, { callbackArgs: callbackArgs, displayCancelButton: displayCancelButton, displayPreviousButton: displayPreviousButton, stepCount: stepCount, stepCursor: stepCursor, setStepCursor: setStepCursor, handleCancelClick: handleCancelClick, handleNextClick: handleNextClick, handlePreviousClick: handlePreviousClick })))))));
|
|
1630
1631
|
};
|
|
1631
1632
|
FullScreenStepper.displayName = 'FullScreenStepper';
|
|
1632
1633
|
|
|
@@ -2227,5 +2228,5 @@ var adminLight = createTheme(adminLightOptions);
|
|
|
2227
2228
|
var adminDarkOptions = __assign$1(__assign$1(__assign$1(__assign$1({ themeName: 'Admin Dark', palette: __assign$1(__assign$1(__assign$1({}, basePalette), adminDarkPalette), dataVizPalette), breakpoints: adminThemeBreakpoints, typography: adminThemeTypography }, adminDarkPlaceholder), adminThemeZIndex), adminThemeStatus), adminThemeDefaultProps);
|
|
2228
2229
|
var adminDark = createTheme(adminDarkOptions);
|
|
2229
2230
|
|
|
2230
|
-
export { Alert, AlertDialog, AlertDialogHeader, AlertTitle, Button, ButtonGroup, DialogActions, FeatureIntro, FullScreenStepper, FullScreenStepperContent, FullScreenStepperContext, List, Page, PageBody, PageSection, PageSectionHead, PageSectionTitle, PageSections, SelectableCard, SettingsIndexCard, SettingsIndexCardGroup, StandardListItem, Toast, adminDark, adminDarkOptions, adminLight, adminLightOptions, useDialog, useFullScreenStepperContext, useSelectableCard };
|
|
2231
|
+
export { Alert, AlertDialog, AlertDialogHeader, AlertTitle, Button, ButtonGroup, DialogActions, FeatureIntro, FullScreenStepper, FullScreenStepperActions, FullScreenStepperContent, FullScreenStepperContext, List, Page, PageBody, PageSection, PageSectionHead, PageSectionTitle, PageSections, SelectableCard, SettingsIndexCard, SettingsIndexCardGroup, StandardListItem, Toast, adminDark, adminDarkOptions, adminLight, adminLightOptions, useDialog, useFullScreenStepperContext, useSelectableCard };
|
|
2231
2232
|
//# sourceMappingURL=index.es.js.map
|