@semcore/wizard 17.2.0 → 17.3.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.
@@ -10,6 +10,7 @@ import ArrowLeft from "@semcore/icon/ArrowLeft/m";
10
10
  import ArrowRight from "@semcore/icon/ArrowRight/m";
11
11
  import CheckM from "@semcore/icon/Check/m";
12
12
  import Modal from "@semcore/modal";
13
+ import { Text } from "@semcore/typography";
13
14
  import React from "react";
14
15
  import { localizedMessages } from "./translations/__intergalactic-dynamic-locales.mjs";
15
16
  /*!__reshadow-styles__:"./style/wizard.shadow.css"*/
@@ -17,23 +18,24 @@ const style = (
17
18
  /*__reshadow_css_start__*/
18
19
  (sstyled.insert(
19
20
  /*__inner_css_start__*/
20
- ".___SWizard_1dvrp_gg_{max-width:980px;max-height:700px;display:flex;padding:0;background:#0000}.___SSidebar_1dvrp_gg_{background:var(--intergalactic-control-primary-advertising,#a261fd);color:var(--intergalactic-text-primary-invert,#fefffff2);font-weight:var(--intergalactic-bold,700);font-size:var(--intergalactic-fs-300,16px);line-height:var(--intergalactic-lh-300,150%);padding:var(--intergalactic-spacing-10x,40px) var(--intergalactic-spacing-2x,8px);max-width:220px;flex-shrink:0;box-sizing:border-box;border-radius:var(--intergalactic-modal-rounded,14px) 0 0 var(--intergalactic-modal-rounded,14px)}@media (max-width:1060px){.___SSidebar_1dvrp_gg_{width:56px}}.___SSidebar_1dvrp_gg_ .___SStepper_1dvrp_gg_{display:flex;gap:var(--intergalactic-spacing-1x,4px);font-size:var(--intergalactic-fs-200,14px);border-radius:var(--intergalactic-control-rounded,6px);padding:var(--intergalactic-spacing-2x,8px) var(--intergalactic-spacing-3x,12px);cursor:pointer;position:relative;overflow:auto;line-height:var(--intergalactic-lh-200,142%)}.___SSidebar_1dvrp_gg_ .___SStepper_1dvrp_gg_:focus-visible{outline-color:var(--intergalactic-keyboard-focus-invert-outline,#ffffffb3)}@media (hover:hover){.___SSidebar_1dvrp_gg_ .___SStepper_1dvrp_gg_:hover{background:var(--intergalactic-control-primary-advertising-hover,#964cfb);z-index:2}}.___SSidebar_1dvrp_gg_ .___SStepper_1dvrp_gg_.__active_1dvrp_gg_{background:var(--intergalactic-control-primary-advertising-active,#9041fa)}.___SSidebar_1dvrp_gg_ .___SStepper_1dvrp_gg_.__disabled_1dvrp_gg_,.___SSidebar_1dvrp_gg_ .___SStepper_1dvrp_gg_:disabled{opacity:var(--intergalactic-disabled-opacity,.4);cursor:default;pointer-events:none}@media (max-width:1060px){.___SSidebar_1dvrp_gg_ .___SStepper_1dvrp_gg_{padding:var(--intergalactic-spacing-2x,8px)}@media (hover:hover){.___SSidebar_1dvrp_gg_ .___SStepper_1dvrp_gg_:hover{width:-moz-max-content;width:max-content;max-width:220px}.___SSidebar_1dvrp_gg_ .___SStepper_1dvrp_gg_:hover .___SStepDescription_1dvrp_gg_{display:block;border-radius:var(--intergalactic-control-rounded,6px);overflow:auto}.___SSidebar_1dvrp_gg_ .___SStepper_1dvrp_gg_.__active_1dvrp_gg_:hover .___SStepDescription_1dvrp_gg_{background:var(--intergalactic-control-primary-advertising-active,#9041fa)}}}.___SSidebarHeader_1dvrp_gg_{font-size:var(--intergalactic-fs-300,16px);margin:0 var(--intergalactic-spacing-5x,20px) var(--intergalactic-spacing-4x,16px)}@media (max-width:1060px){.___SSidebarHeader_1dvrp_gg_{display:none}}.___SStepNumber_1dvrp_gg_{display:inline-block;min-width:20px;text-align:center}.___SCompleted_1dvrp_gg_{margin-top:1px}.___SStepDescription_1dvrp_gg_{word-wrap:anywhere}@media (max-width:1060px){.___SStepDescription_1dvrp_gg_{display:none}}.___SContent_1dvrp_gg_{padding:var(--intergalactic-spacing-10x,40px);width:100%;border-radius:0 var(--intergalactic-modal-rounded,14px) var(--intergalactic-modal-rounded,14px) 0;background:var(--intergalactic-bg-primary-neutral,#fff)}.___SContent_1dvrp_gg_.__noSidebar_1dvrp_gg_{border-radius:var(--intergalactic-modal-rounded,14px)}.___SSidebarMenu_1dvrp_gg_{display:contents}",
21
+ ".___SWizard_ivk56_gg_{max-width:980px;max-height:700px;display:flex;padding:0;background:#0000}.___SSidebar_ivk56_gg_{background:var(--intergalactic-control-primary-advertising,oklch(.64 .223 299.3));color:var(--intergalactic-text-primary-invert,oklch(.999 .001 180/.949));font-weight:var(--intergalactic-bold,700);font-size:var(--intergalactic-fs-300,16px);line-height:var(--intergalactic-lh-300,150%);padding:var(--intergalactic-spacing-10x,40px) var(--intergalactic-spacing-2x,8px);max-width:220px;flex-shrink:0;box-sizing:border-box;border-radius:var(--intergalactic-modal-rounded,14px) 0 0 var(--intergalactic-modal-rounded,14px)}@media (max-width:1060px){.___SSidebar_ivk56_gg_{width:56px}}.___SSidebar_ivk56_gg_ .___SStepper_ivk56_gg_{display:flex;gap:var(--intergalactic-spacing-1x,4px);font-size:var(--intergalactic-fs-200,14px);border-radius:var(--intergalactic-control-rounded,6px);padding:var(--intergalactic-spacing-2x,8px) var(--intergalactic-spacing-3x,12px);cursor:pointer;position:relative;overflow:auto;line-height:var(--intergalactic-lh-200,142%)}.___SSidebar_ivk56_gg_ .___SStepper_ivk56_gg_:focus-visible{outline-color:var(--intergalactic-keyboard-focus-invert-outline,oklch(1 0 0/.7))}@media (hover:hover){.___SSidebar_ivk56_gg_ .___SStepper_ivk56_gg_:hover{background:var(--intergalactic-control-primary-advertising-hover,oklch(.6 .244 297.8));z-index:2}}.___SSidebar_ivk56_gg_ .___SStepper_ivk56_gg_.__active_ivk56_gg_{background:var(--intergalactic-control-primary-advertising-active,oklch(.58 .254 297.1))}.___SSidebar_ivk56_gg_ .___SStepper_ivk56_gg_.__disabled_ivk56_gg_,.___SSidebar_ivk56_gg_ .___SStepper_ivk56_gg_:disabled{opacity:var(--intergalactic-disabled-opacity,.4);cursor:default;pointer-events:none}@media (max-width:1060px){.___SSidebar_ivk56_gg_ .___SStepper_ivk56_gg_{padding:var(--intergalactic-spacing-2x,8px)}@media (hover:hover){.___SSidebar_ivk56_gg_ .___SStepper_ivk56_gg_:hover{width:-moz-max-content;width:max-content;max-width:220px}.___SSidebar_ivk56_gg_ .___SStepper_ivk56_gg_:hover .___SStepDescription_ivk56_gg_{display:block;border-radius:var(--intergalactic-control-rounded,6px);overflow:auto}.___SSidebar_ivk56_gg_ .___SStepper_ivk56_gg_.__active_ivk56_gg_:hover .___SStepDescription_ivk56_gg_{background:var(--intergalactic-control-primary-advertising-active,oklch(.58 .254 297.1))}}}.___SSidebarHeader_ivk56_gg_{font-size:var(--intergalactic-fs-300,16px);margin:0 var(--intergalactic-spacing-5x,20px) var(--intergalactic-spacing-4x,16px)}@media (max-width:1060px){.___SSidebarHeader_ivk56_gg_{display:none}}.___SStepNumber_ivk56_gg_{display:inline-block;min-width:20px;text-align:center}.___SCompleted_ivk56_gg_{margin-top:1px}.___SStepDescription_ivk56_gg_{word-wrap:anywhere}@media (max-width:1060px){.___SStepDescription_ivk56_gg_{display:none}}.___SContent_ivk56_gg_{padding:var(--intergalactic-spacing-10x,40px);overflow:hidden;flex:1;border-radius:0 var(--intergalactic-modal-rounded,14px) var(--intergalactic-modal-rounded,14px) 0;background:var(--intergalactic-bg-primary-neutral,oklch(1 0 0))}.___SContent_ivk56_gg_ .___SWizardStepTitle_ivk56_gg_{display:block;word-break:break-word;font-weight:var(--intergalactic-semi-bold,600);margin-bottom:var(--intergalactic-spacing-5x,20px)}.___SContent_ivk56_gg_.__noSidebar_ivk56_gg_{border-radius:var(--intergalactic-modal-rounded,14px)}.___SSidebarMenu_ivk56_gg_{display:contents}",
21
22
  /*__inner_css_end__*/
22
- "1dvrp_gg_"
23
+ "ivk56_gg_"
23
24
  ), /*__reshadow_css_end__*/
24
25
  {
25
- "__SWizard": "___SWizard_1dvrp_gg_",
26
- "__SStepNumber": "___SStepNumber_1dvrp_gg_",
27
- "__SCompleted": "___SCompleted_1dvrp_gg_",
28
- "__SContent": "___SContent_1dvrp_gg_",
29
- "_noSidebar": "__noSidebar_1dvrp_gg_",
30
- "__SSidebarMenu": "___SSidebarMenu_1dvrp_gg_",
31
- "__SSidebar": "___SSidebar_1dvrp_gg_",
32
- "__SStepper": "___SStepper_1dvrp_gg_",
33
- "_active": "__active_1dvrp_gg_",
34
- "_disabled": "__disabled_1dvrp_gg_",
35
- "__SStepDescription": "___SStepDescription_1dvrp_gg_",
36
- "__SSidebarHeader": "___SSidebarHeader_1dvrp_gg_"
26
+ "__SWizard": "___SWizard_ivk56_gg_",
27
+ "__SStepNumber": "___SStepNumber_ivk56_gg_",
28
+ "__SCompleted": "___SCompleted_ivk56_gg_",
29
+ "__SContent": "___SContent_ivk56_gg_",
30
+ "_noSidebar": "__noSidebar_ivk56_gg_",
31
+ "__SSidebarMenu": "___SSidebarMenu_ivk56_gg_",
32
+ "__SSidebar": "___SSidebar_ivk56_gg_",
33
+ "__SStepper": "___SStepper_ivk56_gg_",
34
+ "_active": "__active_ivk56_gg_",
35
+ "_disabled": "__disabled_ivk56_gg_",
36
+ "__SStepDescription": "___SStepDescription_ivk56_gg_",
37
+ "__SSidebarHeader": "___SSidebarHeader_ivk56_gg_",
38
+ "__SWizardStepTitle": "___SWizardStepTitle_ivk56_gg_"
37
39
  })
38
40
  );
39
41
  class WizardRoot extends Component {
@@ -173,19 +175,19 @@ class WizardRoot extends Component {
173
175
  }, 1);
174
176
  }
175
177
  render() {
176
- var _ref7;
178
+ var _ref8;
177
179
  const SWizard = this.Root;
178
180
  const {
179
181
  Children,
180
182
  styles
181
183
  } = this.asProps;
182
184
  this._steps.clear();
183
- return _ref7 = sstyled(styles), /* @__PURE__ */ React.createElement(SWizard, _ref7.cn("SWizard", {
185
+ return _ref8 = sstyled(styles), /* @__PURE__ */ React.createElement(SWizard, _ref8.cn("SWizard", {
184
186
  "render": Modal,
185
187
  "aria-label": void 0,
186
188
  "ref": this.modalRef,
187
189
  "aria-labelledby": this.getId()
188
- }), /* @__PURE__ */ React.createElement(Children, _ref7.cn("Children", {})));
190
+ }), /* @__PURE__ */ React.createElement(Children, _ref8.cn("Children", {})));
189
191
  }
190
192
  }
191
193
  _defineProperty(WizardRoot, "displayName", "Wizard");
@@ -197,7 +199,7 @@ _defineProperty(WizardRoot, "defaultProps", {
197
199
  locale: "en"
198
200
  });
199
201
  function Sidebar(props) {
200
- var _ref = arguments[0], _ref8;
202
+ var _ref = arguments[0], _ref9;
201
203
  const {
202
204
  Children,
203
205
  styles,
@@ -207,16 +209,16 @@ function Sidebar(props) {
207
209
  const SSidebar = Box;
208
210
  const SSidebarHeader = "h2";
209
211
  const SSidebarMenu = "div";
210
- return _ref8 = sstyled(styles), /* @__PURE__ */ React.createElement(SSidebar, _ref8.cn("SSidebar", {
212
+ return _ref9 = sstyled(styles), /* @__PURE__ */ React.createElement(SSidebar, _ref9.cn("SSidebar", {
211
213
  ...assignProps({
212
214
  "__excludeProps": ["title", "id"]
213
215
  }, _ref)
214
- }), title && /* @__PURE__ */ React.createElement(SSidebarHeader, _ref8.cn("SSidebarHeader", {
216
+ }), title && /* @__PURE__ */ React.createElement(SSidebarHeader, _ref9.cn("SSidebarHeader", {
215
217
  "id": id
216
- }), title), /* @__PURE__ */ React.createElement(SSidebarMenu, _ref8.cn("SSidebarMenu", {
218
+ }), title), /* @__PURE__ */ React.createElement(SSidebarMenu, _ref9.cn("SSidebarMenu", {
217
219
  "role": "tablist",
218
220
  "aria-orientation": "vertical"
219
- }), /* @__PURE__ */ React.createElement(Children, _ref8.cn("Children", {}))));
221
+ }), /* @__PURE__ */ React.createElement(Children, _ref9.cn("Children", {}))));
220
222
  }
221
223
  function Step(props) {
222
224
  var _ref2 = arguments[0];
@@ -227,15 +229,15 @@ function Step(props) {
227
229
  active
228
230
  } = props;
229
231
  if (active) {
230
- var _ref9;
231
- return _ref9 = sstyled(styles), /* @__PURE__ */ React.createElement(SStep, _ref9.cn("SStep", {
232
+ var _ref0;
233
+ return _ref0 = sstyled(styles), /* @__PURE__ */ React.createElement(SStep, _ref0.cn("SStep", {
232
234
  ...assignProps({}, _ref2)
233
- }), /* @__PURE__ */ React.createElement(Children, _ref9.cn("Children", {})));
235
+ }), /* @__PURE__ */ React.createElement(Children, _ref0.cn("Children", {})));
234
236
  }
235
237
  return null;
236
238
  }
237
239
  function Stepper(props) {
238
- var _ref3 = arguments[0], _ref0;
240
+ var _ref3 = arguments[0], _ref1;
239
241
  const {
240
242
  Children,
241
243
  styles,
@@ -269,34 +271,34 @@ function Stepper(props) {
269
271
  e.stopPropagation();
270
272
  }
271
273
  }, [step, onActive, focusPrev, focusNext]);
272
- return _ref0 = sstyled(styles), /* @__PURE__ */ React.createElement(SStepper, _ref0.cn("SStepper", {
274
+ return _ref1 = sstyled(styles), /* @__PURE__ */ React.createElement(SStepper, _ref1.cn("SStepper", {
273
275
  ...assignProps({
274
276
  "role": "tab",
275
277
  "tabIndex": disabled ? void 0 : 0,
276
278
  "onClick": handlerClick,
277
279
  "onKeyDown": handlerKeyDown
278
280
  }, _ref3)
279
- }), completed && /* @__PURE__ */ React.createElement(ScreenReaderOnly, _ref0.cn("ScreenReaderOnly", {}), getI18nText("completedStep")), /* @__PURE__ */ React.createElement(ScreenReaderOnly, _ref0.cn("ScreenReaderOnly", {}), /* @__PURE__ */ React.createElement(Children, _ref0.cn("Children", {}))), /* @__PURE__ */ React.createElement(SStepNumber, _ref0.cn("SStepNumber", {
281
+ }), completed && /* @__PURE__ */ React.createElement(ScreenReaderOnly, _ref1.cn("ScreenReaderOnly", {}), getI18nText("completedStep")), /* @__PURE__ */ React.createElement(ScreenReaderOnly, _ref1.cn("ScreenReaderOnly", {}), /* @__PURE__ */ React.createElement(Children, _ref1.cn("Children", {}))), /* @__PURE__ */ React.createElement(SStepNumber, _ref1.cn("SStepNumber", {
280
282
  "aria-hidden": "true"
281
- }), completed ? /* @__PURE__ */ React.createElement(SCompleted, _ref0.cn("SCompleted", {})) : number), /* @__PURE__ */ React.createElement(SStepDescription, _ref0.cn("SStepDescription", {
283
+ }), completed ? /* @__PURE__ */ React.createElement(SCompleted, _ref1.cn("SCompleted", {})) : number), /* @__PURE__ */ React.createElement(SStepDescription, _ref1.cn("SStepDescription", {
282
284
  "aria-hidden": "true"
283
- }), /* @__PURE__ */ React.createElement(Children, _ref0.cn("Children", {}))));
285
+ }), /* @__PURE__ */ React.createElement(Children, _ref1.cn("Children", {}))));
284
286
  }
285
287
  function Content(props) {
286
- var _ref4 = arguments[0], _ref1;
288
+ var _ref4 = arguments[0], _ref10;
287
289
  const {
288
290
  Children,
289
291
  styles
290
292
  } = props;
291
293
  const SContent = Box;
292
- return _ref1 = sstyled(styles), /* @__PURE__ */ React.createElement(SContent, _ref1.cn("SContent", {
294
+ return _ref10 = sstyled(styles), /* @__PURE__ */ React.createElement(SContent, _ref10.cn("SContent", {
293
295
  ...assignProps({
294
296
  "role": "tabpanel"
295
297
  }, _ref4)
296
- }), /* @__PURE__ */ React.createElement(Children, _ref1.cn("Children", {})));
298
+ }), /* @__PURE__ */ React.createElement(Children, _ref10.cn("Children", {})));
297
299
  }
298
300
  function StepBack(props) {
299
- var _ref5 = arguments[0], _ref10;
301
+ var _ref5 = arguments[0], _ref11;
300
302
  const SStepBack = Button;
301
303
  const {
302
304
  Children,
@@ -308,7 +310,7 @@ function StepBack(props) {
308
310
  const handleClick = React.useCallback(() => {
309
311
  props.onActive?.(props.step - 1);
310
312
  }, [props.step]);
311
- return _ref10 = sstyled(styles), /* @__PURE__ */ React.createElement(SStepBack, _ref10.cn("SStepBack", {
313
+ return _ref11 = sstyled(styles), /* @__PURE__ */ React.createElement(SStepBack, _ref11.cn("SStepBack", {
312
314
  ...assignProps({
313
315
  "use": "tertiary",
314
316
  "size": "l",
@@ -317,10 +319,10 @@ function StepBack(props) {
317
319
  buttonName: stepName
318
320
  })
319
321
  }, _ref5)
320
- }), /* @__PURE__ */ React.createElement(Button.Addon, null, /* @__PURE__ */ React.createElement(ArrowLeft, _ref10.cn("ArrowLeft", {}))), /* @__PURE__ */ React.createElement(Button.Text, null, hasChildren ? /* @__PURE__ */ React.createElement(Children, _ref10.cn("Children", {})) : stepName));
322
+ }), /* @__PURE__ */ React.createElement(Button.Addon, null, /* @__PURE__ */ React.createElement(ArrowLeft, _ref11.cn("ArrowLeft", {}))), /* @__PURE__ */ React.createElement(Button.Text, null, hasChildren ? /* @__PURE__ */ React.createElement(Children, _ref11.cn("Children", {})) : stepName));
321
323
  }
322
324
  function StepNext(props) {
323
- var _ref6 = arguments[0], _ref11;
325
+ var _ref6 = arguments[0], _ref12;
324
326
  const SStepNext = Button;
325
327
  const {
326
328
  Children,
@@ -332,7 +334,7 @@ function StepNext(props) {
332
334
  const handleClick = React.useCallback(() => {
333
335
  props.onActive?.(props.step + 1);
334
336
  }, [props.step]);
335
- return _ref11 = sstyled(styles), /* @__PURE__ */ React.createElement(SStepNext, _ref11.cn("SStepNext", {
337
+ return _ref12 = sstyled(styles), /* @__PURE__ */ React.createElement(SStepNext, _ref12.cn("SStepNext", {
336
338
  ...assignProps({
337
339
  "use": "tertiary",
338
340
  "size": "l",
@@ -341,12 +343,26 @@ function StepNext(props) {
341
343
  buttonName: stepName
342
344
  })
343
345
  }, _ref6)
344
- }), /* @__PURE__ */ React.createElement(Button.Text, null, hasChildren ? /* @__PURE__ */ React.createElement(Children, _ref11.cn("Children", {})) : stepName), /* @__PURE__ */ React.createElement(Button.Addon, null, /* @__PURE__ */ React.createElement(ArrowRight, _ref11.cn("ArrowRight", {}))));
346
+ }), /* @__PURE__ */ React.createElement(Button.Text, null, hasChildren ? /* @__PURE__ */ React.createElement(Children, _ref12.cn("Children", {})) : stepName), /* @__PURE__ */ React.createElement(Button.Addon, null, /* @__PURE__ */ React.createElement(ArrowRight, _ref12.cn("ArrowRight", {}))));
347
+ }
348
+ function StepTitle(props) {
349
+ var _ref7 = arguments[0], _ref13;
350
+ const SWizardStepTitle = Text;
351
+ const {
352
+ styles
353
+ } = props;
354
+ return _ref13 = sstyled(styles), /* @__PURE__ */ React.createElement(SWizardStepTitle, _ref13.cn("SWizardStepTitle", {
355
+ ...assignProps({
356
+ "tag": "h3",
357
+ "size": 500
358
+ }, _ref7)
359
+ }));
345
360
  }
346
361
  const Wizard = createComponent(WizardRoot, {
347
362
  Sidebar,
348
363
  Content,
349
364
  Step,
365
+ StepTitle,
350
366
  Stepper,
351
367
  StepBack,
352
368
  StepNext
@@ -97,10 +97,18 @@ SStepDescription {
97
97
 
98
98
  SContent {
99
99
  padding: var(--intergalactic-spacing-10x, 40px);
100
- width: 100%;
100
+ overflow: hidden;
101
+ flex: 1;
101
102
  border-radius: 0 var(--intergalactic-modal-rounded, 14px) var(--intergalactic-modal-rounded, 14px)
102
103
  0;
103
104
  background: var(--intergalactic-bg-primary-neutral, oklch(1 0 0));
105
+
106
+ SWizardStepTitle {
107
+ display: block;
108
+ word-break: break-word;
109
+ font-weight: var(--intergalactic-semi-bold, 600);
110
+ margin-bottom: var(--intergalactic-spacing-5x, 20px);
111
+ }
104
112
  }
105
113
  SContent[noSidebar] {
106
114
  border-radius: var(--intergalactic-modal-rounded, 14px);
@@ -3,6 +3,7 @@ import type { ButtonProps } from '@semcore/button';
3
3
  import type { Intergalactic } from '@semcore/core';
4
4
  import type { useI18n } from '@semcore/core/lib/utils/enhances/WithI18n';
5
5
  import type { ModalProps } from '@semcore/modal';
6
+ import type { Text, NSText } from '@semcore/typography';
6
7
  import type React from 'react';
7
8
  /** Ordered step position from 0 */
8
9
  export type WizardStep = number;
@@ -118,10 +119,12 @@ export type WizardDefaultProps = {
118
119
  i18n: Record<string, any>;
119
120
  locale: 'en';
120
121
  };
122
+ export type WizardStepTitleProps = NSText.Props;
121
123
  export type IntergalacticWizardStepperComponent<PropsExtending = {}> = (<Tag extends Intergalactic.Tag = 'div'>(props: Intergalactic.InternalTypings.ComponentProps<Tag, 'div', WizardStepperProps> & PropsExtending) => Intergalactic.InternalTypings.ComponentRenderingResults) & Intergalactic.InternalTypings.ComponentAdditive<'div', 'div', WizardStepperProps>;
122
124
  export type WizardType = Intergalactic.Component<'div', WizardProps> & {
123
125
  Sidebar: Intergalactic.Component<'div', WizardSidebarProps>;
124
126
  Step: Intergalactic.Component<'div', WizardStepProps>;
127
+ StepTitle: typeof Text;
125
128
  Stepper: IntergalacticWizardStepperComponent;
126
129
  Content: Intergalactic.Component<'div', WizardContentProps>;
127
130
  StepBack: Intergalactic.Component<'button', WizardStepBackProps>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@semcore/wizard",
3
3
  "description": "Semrush Wizard Component",
4
- "version": "17.2.0",
4
+ "version": "17.3.0",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/es6/index.js",
7
7
  "typings": "lib/types/index.d.ts",
@@ -14,11 +14,12 @@
14
14
  "require": "./lib/cjs/index.js"
15
15
  },
16
16
  "dependencies": {
17
- "@semcore/button": "^17.2.0",
18
- "@semcore/modal": "^17.2.0"
17
+ "@semcore/button": "^17.2.1",
18
+ "@semcore/modal": "^17.2.1",
19
+ "@semcore/typography": "^17.2.1"
19
20
  },
20
21
  "peerDependencies": {
21
- "@semcore/base-components": "^17.2.0",
22
+ "@semcore/base-components": "^17.2.1",
22
23
  "@semcore/icon": "^17.2.0"
23
24
  },
24
25
  "repository": {
@@ -27,8 +28,8 @@
27
28
  "directory": "semcore/wizard"
28
29
  },
29
30
  "devDependencies": {
30
- "@semcore/base-components": "17.2.0",
31
- "@semcore/core": "17.2.0",
31
+ "@semcore/core": "17.2.1",
32
+ "@semcore/base-components": "17.2.1",
32
33
  "@semcore/testing-utils": "1.0.0",
33
34
  "@semcore/icon": "17.2.0"
34
35
  },
package/src/Wizard.tsx CHANGED
@@ -11,6 +11,7 @@ import ArrowLeft from '@semcore/icon/ArrowLeft/m';
11
11
  import ArrowRight from '@semcore/icon/ArrowRight/m';
12
12
  import CheckM from '@semcore/icon/Check/m';
13
13
  import Modal from '@semcore/modal';
14
+ import { Text } from '@semcore/typography';
14
15
  import React from 'react';
15
16
 
16
17
  import style from './style/wizard.shadow.css';
@@ -354,6 +355,15 @@ function StepNext(props: Required<WizardStepNextProps> & IRootComponentProps) {
354
355
  );
355
356
  }
356
357
 
358
+ function StepTitle(props: Intergalactic.InternalTypings.InferChildComponentProps<WizardType, typeof WizardRoot, 'StepTitle'>) {
359
+ const SWizardStepTitle = Root;
360
+ const { styles } = props;
361
+
362
+ return sstyled(styles)(
363
+ <SWizardStepTitle render={Text} tag='h3' size={500} />,
364
+ );
365
+ }
366
+
357
367
  /**
358
368
  * Wizard
359
369
  *
@@ -366,6 +376,7 @@ const Wizard = createComponent<
366
376
  Sidebar,
367
377
  Content,
368
378
  Step,
379
+ StepTitle,
369
380
  Stepper,
370
381
  StepBack,
371
382
  StepNext,
@@ -3,6 +3,7 @@ import type { ButtonProps } from '@semcore/button';
3
3
  import type { Intergalactic } from '@semcore/core';
4
4
  import type { useI18n } from '@semcore/core/lib/utils/enhances/WithI18n';
5
5
  import type { ModalProps } from '@semcore/modal';
6
+ import type { Text, NSText } from '@semcore/typography';
6
7
  import type React from 'react';
7
8
 
8
9
  /** Ordered step position from 0 */
@@ -137,6 +138,9 @@ export type WizardDefaultProps = {
137
138
  locale: 'en';
138
139
  };
139
140
 
141
+ // Need this for API page in docs
142
+ export type WizardStepTitleProps = NSText.Props;
143
+
140
144
  export type IntergalacticWizardStepperComponent<PropsExtending = {}> = (<
141
145
  Tag extends Intergalactic.Tag = 'div',
142
146
  >(
@@ -148,6 +152,7 @@ Intergalactic.InternalTypings.ComponentAdditive<'div', 'div', WizardStepperProps
148
152
  export type WizardType = Intergalactic.Component<'div', WizardProps> & {
149
153
  Sidebar: Intergalactic.Component<'div', WizardSidebarProps>;
150
154
  Step: Intergalactic.Component<'div', WizardStepProps>;
155
+ StepTitle: typeof Text;
151
156
  Stepper: IntergalacticWizardStepperComponent;
152
157
  Content: Intergalactic.Component<'div', WizardContentProps>;
153
158
  StepBack: Intergalactic.Component<'button', WizardStepBackProps>;
@@ -97,10 +97,18 @@ SStepDescription {
97
97
 
98
98
  SContent {
99
99
  padding: var(--intergalactic-spacing-10x, 40px);
100
- width: 100%;
100
+ overflow: hidden;
101
+ flex: 1;
101
102
  border-radius: 0 var(--intergalactic-modal-rounded, 14px) var(--intergalactic-modal-rounded, 14px)
102
103
  0;
103
104
  background: var(--intergalactic-bg-primary-neutral, oklch(1 0 0));
105
+
106
+ SWizardStepTitle {
107
+ display: block;
108
+ word-break: break-word;
109
+ font-weight: var(--intergalactic-semi-bold, 600);
110
+ margin-bottom: var(--intergalactic-spacing-5x, 20px);
111
+ }
104
112
  }
105
113
  SContent[noSidebar] {
106
114
  border-radius: var(--intergalactic-modal-rounded, 14px);
@@ -0,0 +1,17 @@
1
+ import { resolve as resolvePath } from 'node:path';
2
+
3
+ import { defineConfig } from 'vitest/config';
4
+
5
+ import { vitestPlugins, vitestResolve } from '../../vitest.config.mts';
6
+
7
+ export default defineConfig({
8
+ plugins: vitestPlugins,
9
+ resolve: vitestResolve,
10
+ test: {
11
+ include: [
12
+ '__tests__/**/*.test.tsx',
13
+ ],
14
+ environment: 'jsdom',
15
+ setupFiles: [resolvePath(__dirname, '../../tools/testing-utils/setupTests')],
16
+ },
17
+ });