aefis-core-ui 2.3.0-rc57 → 2.3.0-rc59

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.
@@ -2152,6 +2152,16 @@ const ContentBox = props => {
2152
2152
  disabled: props.headerAction.disabled || false,
2153
2153
  startIcon: props.headerAction.icon || undefined,
2154
2154
  children: props.headerAction.name
2155
+ }), props.headerMenu && /*#__PURE__*/jsx(Box$2, {
2156
+ sx: {
2157
+ ml: 1
2158
+ },
2159
+ children: /*#__PURE__*/jsx(MenuButton, {
2160
+ name: props.title,
2161
+ menuConfiguration: props.headerMenu,
2162
+ data: props.data || undefined,
2163
+ displayType: "icon"
2164
+ })
2155
2165
  })]
2156
2166
  }), /*#__PURE__*/jsxs(Card, {
2157
2167
  style: cardStyle,
@@ -2221,7 +2231,12 @@ ContentBox.propTypes = {
2221
2231
  /** Content of the content box */
2222
2232
  children: PropTypes.any,
2223
2233
  /** Add a menu to the header of the content box. */
2224
- menu: PropTypes.any,
2234
+ menu: PropTypes.arrayOf(PropTypes.shape({
2235
+ name: PropTypes.string,
2236
+ icon: PropTypes.any,
2237
+ divider: PropTypes.any,
2238
+ onClick: PropTypes.func
2239
+ })),
2225
2240
  /** Data fto provide to the menu. */
2226
2241
  data: PropTypes.any,
2227
2242
  /** Adds padding and additional formatting to the content of the content box. */
@@ -2235,8 +2250,16 @@ ContentBox.propTypes = {
2235
2250
  name: PropTypes.any.isRequired,
2236
2251
  style: PropTypes.any,
2237
2252
  action: PropTypes.func.isRequired,
2253
+ onClick: PropTypes.func,
2238
2254
  disabled: PropTypes.any
2239
2255
  }),
2256
+ /** Adds a menu to the header */
2257
+ headerMenu: PropTypes.arrayOf(PropTypes.shape({
2258
+ name: PropTypes.string,
2259
+ icon: PropTypes.any,
2260
+ divider: PropTypes.any,
2261
+ onClick: PropTypes.func
2262
+ })),
2240
2263
  /** Sub-title of the content box. Can be a string or any component. */
2241
2264
  subtitle: PropTypes.any,
2242
2265
  /** Main title of the content box. Can be a string or any component. */
@@ -15104,6 +15127,41 @@ const bottomBarDefaultStyle = {
15104
15127
  left: 0,
15105
15128
  right: 0
15106
15129
  };
15130
+ const PanelTitleAndDescription = ({
15131
+ index,
15132
+ step,
15133
+ cardContent: _cardContent = false
15134
+ }) => {
15135
+ const titleStyle = {
15136
+ fontSize: "1.1rem",
15137
+ fontWeight: 500,
15138
+ mb: 2
15139
+ };
15140
+ return /*#__PURE__*/jsxs(Fragment, {
15141
+ children: [(step == null ? void 0 : step.panelTitle) && /*#__PURE__*/jsxs(Typography, {
15142
+ sx: titleStyle,
15143
+ variant: "h2",
15144
+ component: step.panelTitleComponent || "h3",
15145
+ children: ["Step ", index + 1, " : ", step.panelTitle]
15146
+ }), (step == null ? void 0 : step.panelDescription) && /*#__PURE__*/jsx(Typography, {
15147
+ sx: {
15148
+ mb: _cardContent ? 0 : 2
15149
+ },
15150
+ variant: "body1",
15151
+ component: "p",
15152
+ children: step.panelDescription
15153
+ })]
15154
+ });
15155
+ };
15156
+ PanelTitleAndDescription.propTypes = {
15157
+ index: PropTypes.number,
15158
+ step: PropTypes.shape({
15159
+ panelTitle: PropTypes.any,
15160
+ panelTitleComponent: PropTypes.string,
15161
+ panelDescription: PropTypes.string
15162
+ }),
15163
+ cardContent: PropTypes.bool
15164
+ };
15107
15165
 
15108
15166
  /** Component to display a "stepper" wizard panel for multiple step processes with swipeable tabs. Designed to be display within a Drawer component. */
15109
15167
 
@@ -15144,7 +15202,7 @@ const WizardPanel = props => {
15144
15202
  left: 0,
15145
15203
  right: 0,
15146
15204
  bottom: 64,
15147
- top: 178
15205
+ top: 162
15148
15206
  };
15149
15207
  const containerStyle = {
15150
15208
  backgroundColor: props.cardContent ? "rgb(239, 242, 246)" : "rgb(255,255,255)"
@@ -15177,11 +15235,6 @@ const WizardPanel = props => {
15177
15235
  setIsCompleting(false);
15178
15236
  }
15179
15237
  }, [props.completed]);
15180
- const titleStyle = {
15181
- fontSize: "1.1rem",
15182
- fontWeight: 500,
15183
- mb: 2
15184
- };
15185
15238
  return /*#__PURE__*/jsxs(Fragment, {
15186
15239
  children: [/*#__PURE__*/jsx(AppBar$1, {
15187
15240
  position: props.display === "drawer" ? "sticky" : "relative",
@@ -15211,18 +15264,16 @@ const WizardPanel = props => {
15211
15264
  sx: {
15212
15265
  visibility: activeStep === index ? "visible" : "hidden"
15213
15266
  },
15214
- children: [step.panelTitle && /*#__PURE__*/jsxs(Typography, {
15215
- sx: titleStyle,
15216
- variant: "h2",
15217
- component: step.panelTitleComponent || "h3",
15218
- children: ["Step ", index + 1, " : ", step.panelTitle]
15219
- }), step.panelDescription && /*#__PURE__*/jsx(Typography, {
15220
- sx: {
15221
- mb: 2
15222
- },
15223
- variant: "body1",
15224
- component: "p",
15225
- children: step.panelDescription
15267
+ children: [(step.panelTitle || step.panelDescription) && props.cardContent && /*#__PURE__*/jsx(ContentBox, {
15268
+ children: /*#__PURE__*/jsx(PanelTitleAndDescription, {
15269
+ step: step,
15270
+ index: index,
15271
+ cardContent: true
15272
+ })
15273
+ }), (step.panelTitle || step.panelDescription) && !props.cardContent && /*#__PURE__*/jsx(PanelTitleAndDescription, {
15274
+ step: step,
15275
+ index: index,
15276
+ cardContent: false
15226
15277
  }), ((_step$completedItems = step.completedItems) == null ? void 0 : _step$completedItems.length) && /*#__PURE__*/jsx(CompletedItemList, {
15227
15278
  data: step.completedItems
15228
15279
  }), step.content]