@patternfly/react-core 4.248.0 → 4.250.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.
Files changed (228) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/dist/esm/components/Icon/Icon.d.ts +25 -0
  3. package/dist/esm/components/Icon/Icon.d.ts.map +1 -0
  4. package/dist/esm/components/Icon/Icon.js +14 -0
  5. package/dist/esm/components/Icon/Icon.js.map +1 -0
  6. package/dist/esm/components/Icon/index.d.ts +2 -0
  7. package/dist/esm/components/Icon/index.d.ts.map +1 -0
  8. package/dist/esm/components/Icon/index.js +2 -0
  9. package/dist/esm/components/Icon/index.js.map +1 -0
  10. package/dist/esm/components/index.d.ts +1 -0
  11. package/dist/esm/components/index.d.ts.map +1 -1
  12. package/dist/esm/components/index.js +1 -0
  13. package/dist/esm/components/index.js.map +1 -1
  14. package/dist/esm/next/components/Select/Select.d.ts +28 -0
  15. package/dist/esm/next/components/Select/Select.d.ts.map +1 -0
  16. package/dist/esm/next/components/Select/Select.js +62 -0
  17. package/dist/esm/next/components/Select/Select.js.map +1 -0
  18. package/dist/esm/next/components/Select/SelectGroup.d.ts +12 -0
  19. package/dist/esm/next/components/Select/SelectGroup.d.ts.map +1 -0
  20. package/dist/esm/next/components/Select/SelectGroup.js +10 -0
  21. package/dist/esm/next/components/Select/SelectGroup.js.map +1 -0
  22. package/dist/esm/next/components/Select/SelectList.d.ts +10 -0
  23. package/dist/esm/next/components/Select/SelectList.d.ts.map +1 -0
  24. package/dist/esm/next/components/Select/SelectList.js +10 -0
  25. package/dist/esm/next/components/Select/SelectList.js.map +1 -0
  26. package/dist/esm/next/components/Select/SelectOption.d.ts +20 -0
  27. package/dist/esm/next/components/Select/SelectOption.d.ts.map +1 -0
  28. package/dist/esm/next/components/Select/SelectOption.js +10 -0
  29. package/dist/esm/next/components/Select/SelectOption.js.map +1 -0
  30. package/dist/esm/next/components/Select/index.d.ts +5 -0
  31. package/dist/esm/next/components/Select/index.d.ts.map +1 -0
  32. package/dist/esm/next/components/Select/index.js +5 -0
  33. package/dist/esm/next/components/Select/index.js.map +1 -0
  34. package/dist/esm/next/components/Wizard/Wizard.d.ts +9 -7
  35. package/dist/esm/next/components/Wizard/Wizard.d.ts.map +1 -1
  36. package/dist/esm/next/components/Wizard/Wizard.js +62 -48
  37. package/dist/esm/next/components/Wizard/Wizard.js.map +1 -1
  38. package/dist/esm/next/components/Wizard/WizardBody.d.ts +2 -2
  39. package/dist/esm/next/components/Wizard/WizardBody.d.ts.map +1 -1
  40. package/dist/esm/next/components/Wizard/WizardBody.js +1 -1
  41. package/dist/esm/next/components/Wizard/WizardBody.js.map +1 -1
  42. package/dist/esm/next/components/Wizard/WizardContext.d.ts +21 -20
  43. package/dist/esm/next/components/Wizard/WizardContext.d.ts.map +1 -1
  44. package/dist/esm/next/components/Wizard/WizardContext.js +63 -32
  45. package/dist/esm/next/components/Wizard/WizardContext.js.map +1 -1
  46. package/dist/esm/next/components/Wizard/WizardFooter.d.ts +20 -6
  47. package/dist/esm/next/components/Wizard/WizardFooter.d.ts.map +1 -1
  48. package/dist/esm/next/components/Wizard/WizardFooter.js +13 -4
  49. package/dist/esm/next/components/Wizard/WizardFooter.js.map +1 -1
  50. package/dist/esm/next/components/Wizard/WizardHeader.d.ts +1 -1
  51. package/dist/esm/next/components/Wizard/WizardHeader.d.ts.map +1 -1
  52. package/dist/esm/next/components/Wizard/WizardHeader.js +2 -2
  53. package/dist/esm/next/components/Wizard/WizardHeader.js.map +1 -1
  54. package/dist/esm/next/components/Wizard/WizardNav.d.ts +5 -5
  55. package/dist/esm/next/components/Wizard/WizardNav.d.ts.map +1 -1
  56. package/dist/esm/next/components/Wizard/WizardNav.js +3 -4
  57. package/dist/esm/next/components/Wizard/WizardNav.js.map +1 -1
  58. package/dist/esm/next/components/Wizard/WizardNavInternal.d.ts +14 -0
  59. package/dist/esm/next/components/Wizard/WizardNavInternal.d.ts.map +1 -0
  60. package/dist/esm/next/components/Wizard/WizardNavInternal.js +49 -0
  61. package/dist/esm/next/components/Wizard/WizardNavInternal.js.map +1 -0
  62. package/dist/esm/next/components/Wizard/WizardNavItem.d.ts +12 -8
  63. package/dist/esm/next/components/Wizard/WizardNavItem.d.ts.map +1 -1
  64. package/dist/esm/next/components/Wizard/WizardNavItem.js +23 -12
  65. package/dist/esm/next/components/Wizard/WizardNavItem.js.map +1 -1
  66. package/dist/esm/next/components/Wizard/WizardStep.d.ts +22 -6
  67. package/dist/esm/next/components/Wizard/WizardStep.d.ts.map +1 -1
  68. package/dist/esm/next/components/Wizard/WizardStep.js +20 -1
  69. package/dist/esm/next/components/Wizard/WizardStep.js.map +1 -1
  70. package/dist/esm/next/components/Wizard/WizardToggle.d.ts +9 -15
  71. package/dist/esm/next/components/Wizard/WizardToggle.d.ts.map +1 -1
  72. package/dist/esm/next/components/Wizard/WizardToggle.js +15 -50
  73. package/dist/esm/next/components/Wizard/WizardToggle.js.map +1 -1
  74. package/dist/esm/next/components/Wizard/hooks/useWizardFooter.d.ts +2 -2
  75. package/dist/esm/next/components/Wizard/hooks/useWizardFooter.d.ts.map +1 -1
  76. package/dist/esm/next/components/Wizard/hooks/useWizardFooter.js +3 -3
  77. package/dist/esm/next/components/Wizard/hooks/useWizardFooter.js.map +1 -1
  78. package/dist/esm/next/components/Wizard/types.d.ts +37 -46
  79. package/dist/esm/next/components/Wizard/types.d.ts.map +1 -1
  80. package/dist/esm/next/components/Wizard/types.js +10 -2
  81. package/dist/esm/next/components/Wizard/types.js.map +1 -1
  82. package/dist/esm/next/components/Wizard/utils.d.ts +4 -5
  83. package/dist/esm/next/components/Wizard/utils.d.ts.map +1 -1
  84. package/dist/esm/next/components/Wizard/utils.js +20 -13
  85. package/dist/esm/next/components/Wizard/utils.js.map +1 -1
  86. package/dist/esm/next/components/index.d.ts +2 -1
  87. package/dist/esm/next/components/index.d.ts.map +1 -1
  88. package/dist/esm/next/components/index.js +2 -1
  89. package/dist/esm/next/components/index.js.map +1 -1
  90. package/dist/js/components/Icon/Icon.d.ts +25 -0
  91. package/dist/js/components/Icon/Icon.d.ts.map +1 -0
  92. package/dist/js/components/Icon/Icon.js +18 -0
  93. package/dist/js/components/Icon/Icon.js.map +1 -0
  94. package/dist/js/components/Icon/index.d.ts +2 -0
  95. package/dist/js/components/Icon/index.d.ts.map +1 -0
  96. package/dist/js/components/Icon/index.js +5 -0
  97. package/dist/js/components/Icon/index.js.map +1 -0
  98. package/dist/js/components/index.d.ts +1 -0
  99. package/dist/js/components/index.d.ts.map +1 -1
  100. package/dist/js/components/index.js +1 -0
  101. package/dist/js/components/index.js.map +1 -1
  102. package/dist/js/next/components/Select/Select.d.ts +28 -0
  103. package/dist/js/next/components/Select/Select.d.ts.map +1 -0
  104. package/dist/js/next/components/Select/Select.js +65 -0
  105. package/dist/js/next/components/Select/Select.js.map +1 -0
  106. package/dist/js/next/components/Select/SelectGroup.d.ts +12 -0
  107. package/dist/js/next/components/Select/SelectGroup.d.ts.map +1 -0
  108. package/dist/js/next/components/Select/SelectGroup.js +14 -0
  109. package/dist/js/next/components/Select/SelectGroup.js.map +1 -0
  110. package/dist/js/next/components/Select/SelectList.d.ts +10 -0
  111. package/dist/js/next/components/Select/SelectList.d.ts.map +1 -0
  112. package/dist/js/next/components/Select/SelectList.js +14 -0
  113. package/dist/js/next/components/Select/SelectList.js.map +1 -0
  114. package/dist/js/next/components/Select/SelectOption.d.ts +20 -0
  115. package/dist/js/next/components/Select/SelectOption.d.ts.map +1 -0
  116. package/dist/js/next/components/Select/SelectOption.js +14 -0
  117. package/dist/js/next/components/Select/SelectOption.js.map +1 -0
  118. package/dist/js/next/components/Select/index.d.ts +5 -0
  119. package/dist/js/next/components/Select/index.d.ts.map +1 -0
  120. package/dist/js/next/components/Select/index.js +8 -0
  121. package/dist/js/next/components/Select/index.js.map +1 -0
  122. package/dist/js/next/components/Wizard/Wizard.d.ts +9 -7
  123. package/dist/js/next/components/Wizard/Wizard.d.ts.map +1 -1
  124. package/dist/js/next/components/Wizard/Wizard.js +59 -45
  125. package/dist/js/next/components/Wizard/Wizard.js.map +1 -1
  126. package/dist/js/next/components/Wizard/WizardBody.d.ts +2 -2
  127. package/dist/js/next/components/Wizard/WizardBody.d.ts.map +1 -1
  128. package/dist/js/next/components/Wizard/WizardBody.js +1 -1
  129. package/dist/js/next/components/Wizard/WizardBody.js.map +1 -1
  130. package/dist/js/next/components/Wizard/WizardContext.d.ts +21 -20
  131. package/dist/js/next/components/Wizard/WizardContext.d.ts.map +1 -1
  132. package/dist/js/next/components/Wizard/WizardContext.js +61 -30
  133. package/dist/js/next/components/Wizard/WizardContext.js.map +1 -1
  134. package/dist/js/next/components/Wizard/WizardFooter.d.ts +20 -6
  135. package/dist/js/next/components/Wizard/WizardFooter.d.ts.map +1 -1
  136. package/dist/js/next/components/Wizard/WizardFooter.js +15 -6
  137. package/dist/js/next/components/Wizard/WizardFooter.js.map +1 -1
  138. package/dist/js/next/components/Wizard/WizardHeader.d.ts +1 -1
  139. package/dist/js/next/components/Wizard/WizardHeader.d.ts.map +1 -1
  140. package/dist/js/next/components/Wizard/WizardHeader.js +2 -2
  141. package/dist/js/next/components/Wizard/WizardHeader.js.map +1 -1
  142. package/dist/js/next/components/Wizard/WizardNav.d.ts +5 -5
  143. package/dist/js/next/components/Wizard/WizardNav.d.ts.map +1 -1
  144. package/dist/js/next/components/Wizard/WizardNav.js +3 -4
  145. package/dist/js/next/components/Wizard/WizardNav.js.map +1 -1
  146. package/dist/js/next/components/Wizard/WizardNavInternal.d.ts +14 -0
  147. package/dist/js/next/components/Wizard/WizardNavInternal.d.ts.map +1 -0
  148. package/dist/js/next/components/Wizard/WizardNavInternal.js +54 -0
  149. package/dist/js/next/components/Wizard/WizardNavInternal.js.map +1 -0
  150. package/dist/js/next/components/Wizard/WizardNavItem.d.ts +12 -8
  151. package/dist/js/next/components/Wizard/WizardNavItem.d.ts.map +1 -1
  152. package/dist/js/next/components/Wizard/WizardNavItem.js +23 -12
  153. package/dist/js/next/components/Wizard/WizardNavItem.js.map +1 -1
  154. package/dist/js/next/components/Wizard/WizardStep.d.ts +22 -6
  155. package/dist/js/next/components/Wizard/WizardStep.d.ts.map +1 -1
  156. package/dist/js/next/components/Wizard/WizardStep.js +20 -1
  157. package/dist/js/next/components/Wizard/WizardStep.js.map +1 -1
  158. package/dist/js/next/components/Wizard/WizardToggle.d.ts +9 -15
  159. package/dist/js/next/components/Wizard/WizardToggle.d.ts.map +1 -1
  160. package/dist/js/next/components/Wizard/WizardToggle.js +15 -51
  161. package/dist/js/next/components/Wizard/WizardToggle.js.map +1 -1
  162. package/dist/js/next/components/Wizard/hooks/useWizardFooter.d.ts +2 -2
  163. package/dist/js/next/components/Wizard/hooks/useWizardFooter.d.ts.map +1 -1
  164. package/dist/js/next/components/Wizard/hooks/useWizardFooter.js +3 -3
  165. package/dist/js/next/components/Wizard/hooks/useWizardFooter.js.map +1 -1
  166. package/dist/js/next/components/Wizard/types.d.ts +37 -46
  167. package/dist/js/next/components/Wizard/types.d.ts.map +1 -1
  168. package/dist/js/next/components/Wizard/types.js +12 -3
  169. package/dist/js/next/components/Wizard/types.js.map +1 -1
  170. package/dist/js/next/components/Wizard/utils.d.ts +4 -5
  171. package/dist/js/next/components/Wizard/utils.d.ts.map +1 -1
  172. package/dist/js/next/components/Wizard/utils.js +24 -15
  173. package/dist/js/next/components/Wizard/utils.js.map +1 -1
  174. package/dist/js/next/components/index.d.ts +2 -1
  175. package/dist/js/next/components/index.d.ts.map +1 -1
  176. package/dist/js/next/components/index.js +2 -1
  177. package/dist/js/next/components/index.js.map +1 -1
  178. package/dist/umd/react-core.min.css +337 -200
  179. package/dist/umd/react-core.min.js +1 -1
  180. package/package.json +2 -2
  181. package/src/components/Icon/Icon.tsx +66 -0
  182. package/src/components/Icon/__tests__/Icon.test.tsx +196 -0
  183. package/src/components/Icon/__tests__/__snapshots__/Icon.test.tsx.snap +82 -0
  184. package/src/components/Icon/examples/Icon.md +61 -0
  185. package/src/components/Icon/examples/IconBasic.tsx +23 -0
  186. package/src/components/Icon/examples/IconContentSizes.tsx +20 -0
  187. package/src/components/Icon/examples/IconCustomProgress.tsx +24 -0
  188. package/src/components/Icon/examples/IconInline.tsx +62 -0
  189. package/src/components/Icon/examples/IconProgress.tsx +24 -0
  190. package/src/components/Icon/examples/IconSizes.tsx +20 -0
  191. package/src/components/Icon/examples/IconStatus.tsx +27 -0
  192. package/src/components/Icon/index.ts +1 -0
  193. package/src/components/index.ts +1 -0
  194. package/src/next/components/Select/Select.tsx +129 -0
  195. package/src/next/components/Select/SelectGroup.tsx +24 -0
  196. package/src/next/components/Select/SelectList.tsx +21 -0
  197. package/src/next/components/Select/SelectOption.tsx +31 -0
  198. package/src/next/components/Select/examples/Select.md +37 -0
  199. package/src/next/components/Select/examples/SelectBasic.tsx +54 -0
  200. package/src/next/components/Select/examples/SelectCheckbox.tsx +67 -0
  201. package/src/next/components/Select/examples/SelectGrouped.tsx +63 -0
  202. package/src/next/components/Select/examples/SelectMultiTypeahead.tsx +195 -0
  203. package/src/next/components/Select/examples/SelectTypeahead.tsx +191 -0
  204. package/src/next/components/Select/index.ts +4 -0
  205. package/src/next/components/Wizard/Wizard.tsx +107 -64
  206. package/src/next/components/Wizard/WizardBody.tsx +4 -4
  207. package/src/next/components/Wizard/WizardContext.tsx +117 -65
  208. package/src/next/components/Wizard/WizardFooter.tsx +39 -17
  209. package/src/next/components/Wizard/WizardHeader.tsx +6 -3
  210. package/src/next/components/Wizard/WizardNav.tsx +9 -10
  211. package/src/next/components/Wizard/WizardNavInternal.tsx +137 -0
  212. package/src/next/components/Wizard/WizardNavItem.tsx +47 -20
  213. package/src/next/components/Wizard/WizardStep.tsx +52 -7
  214. package/src/next/components/Wizard/WizardToggle.tsx +24 -142
  215. package/src/next/components/Wizard/__tests__/Wizard.test.tsx +10 -13
  216. package/src/next/components/Wizard/__tests__/WizardBody.test.tsx +3 -3
  217. package/src/next/components/Wizard/__tests__/WizardFooter.test.tsx +11 -14
  218. package/src/next/components/Wizard/__tests__/WizardStep.test.tsx +100 -0
  219. package/src/next/components/Wizard/__tests__/WizardToggle.test.tsx +4 -4
  220. package/src/next/components/Wizard/examples/Wizard.md +40 -15
  221. package/src/next/components/Wizard/examples/WizardBasic.tsx +2 -2
  222. package/src/next/components/Wizard/examples/WizardCustomNav.tsx +4 -4
  223. package/src/next/components/Wizard/examples/WizardKitchenSink.tsx +126 -60
  224. package/src/next/components/Wizard/hooks/__tests__/useWizardFooter.test.tsx +23 -34
  225. package/src/next/components/Wizard/hooks/useWizardFooter.tsx +5 -5
  226. package/src/next/components/Wizard/types.tsx +59 -53
  227. package/src/next/components/Wizard/utils.ts +25 -16
  228. package/src/next/components/index.ts +2 -1
@@ -1,74 +1,65 @@
1
1
  import React from 'react';
2
- import { WizardNavProps, WizardNavItemProps } from '../Wizard';
2
+ import { WizardNavProps, WizardNavItemProps, WizardFooterProps } from '../Wizard';
3
3
  /** Type used to define 'basic' steps, or in other words, steps that are neither parents or children of parents. */
4
4
  export interface WizardBasicStep {
5
- /** Name of the step's nav item */
5
+ /** Name of the step's navigation item */
6
6
  name: React.ReactNode;
7
7
  /** Unique identifier */
8
8
  id: string | number;
9
- /** Flag to disable the step's nav item */
9
+ /** Flag to disable the step's navigation item */
10
10
  isDisabled?: boolean;
11
11
  /** Flag to represent whether the step has been visited (navigated to) */
12
- visited?: boolean;
13
- /** Content shown when the step's nav item is selected. When treated as a parent step, only sub-step content will be shown. */
12
+ isVisited?: boolean;
13
+ /** Flag to determine whether the step is hidden */
14
+ isHidden?: boolean;
15
+ /** Content shown when the step's navigation item is selected. When treated as a parent step, only sub-step content will be shown. */
14
16
  component?: React.ReactElement;
15
- /** (Unused if nav is controlled) Custom WizardNavItem */
16
- navItem?: React.ReactElement<WizardNavItemProps>;
17
- /** (Unused if footer is controlled) Can change the Next button text. If nextButtonText is also set for the Wizard, this step specific one overrides it. */
18
- nextButtonText?: React.ReactNode;
19
- /** (Unused if footer is controlled) The condition needed to disable the Next button */
20
- disableNext?: boolean;
21
- /** (Unused if footer is controlled) True to hide the Cancel button */
22
- hideCancelButton?: boolean;
23
- /** (Unused if footer is controlled) True to hide the Back button */
24
- hideBackButton?: boolean;
17
+ /** Replaces the step's navigation item or its properties. */
18
+ navItem?: WizardNavItemType;
19
+ /** Replaces the step's footer. The step's footer takes precedance over the wizard's footer. */
20
+ footer?: React.ReactElement | Partial<WizardFooterProps>;
21
+ /** Used to determine icon next to the step's navItem */
22
+ status?: 'default' | 'error';
23
+ }
24
+ export declare enum WizardNavItemStatus {
25
+ Default = "default",
26
+ Error = "error"
25
27
  }
26
28
  /** Type used to define parent steps. */
27
29
  export interface WizardParentStep extends WizardBasicStep {
28
30
  /** Nested step IDs */
29
- subStepIds: string[];
31
+ subStepIds: (string | number)[];
30
32
  }
31
33
  /** Type used to define sub-steps. */
32
34
  export interface WizardSubStep extends WizardBasicStep {
33
35
  /** Unique identifier of the parent step */
34
36
  parentId: string | number;
35
37
  }
36
- /** Used to customize aspects of the Wizard's default navigation. */
37
- export interface DefaultWizardNavProps {
38
- /** Flag indicating nav items with sub steps are expandable */
39
- isExpandable?: boolean;
40
- /** Aria-label for the Nav */
41
- ariaLabel?: string;
42
- /** Sets aria-labelledby on nav element */
43
- ariaLabelledBy?: string;
44
- /** Disable step nav items until they are visited */
45
- forceStepVisit?: boolean;
46
- }
47
- /** Used to customize aspects of the Wizard's default footer. */
48
- export interface DefaultWizardFooterProps {
49
- /** The Next button text */
50
- nextButtonText?: React.ReactNode;
51
- /** The Back button text */
52
- backButtonText?: React.ReactNode;
53
- /** The Cancel button text */
54
- cancelButtonText?: React.ReactNode;
55
- /** Next button callback */
56
- onNext?: () => WizardNavStepFunction | void;
57
- /** Back button callback */
58
- onBack?: () => WizardNavStepFunction | void;
59
- /** Cancel link callback */
60
- onClose?: () => void;
61
- }
62
38
  /** Encompasses all step type variants that are internally controlled by the Wizard. */
63
39
  export declare type WizardControlStep = WizardBasicStep | WizardParentStep | WizardSubStep;
64
40
  /** Callback for the Wizard's 'onNext', 'onBack', and 'onNavByIndex' properties. */
65
41
  export declare type WizardNavStepFunction = (currentStep: WizardNavStepData, previousStep: WizardNavStepData) => void;
66
42
  /** Data returned for either parameter of WizardNavStepFunction. */
67
- export declare type WizardNavStepData = Pick<WizardControlStep, 'id' | 'name'>;
43
+ export interface WizardNavStepData {
44
+ /** Unique identifier */
45
+ id: string | number;
46
+ /** Name of the step */
47
+ name: string;
48
+ /** Index of the step (starts at 1) */
49
+ index: number;
50
+ }
51
+ export declare type WizardFooterType = Partial<WizardFooterProps> | CustomWizardFooterFunction | React.ReactElement;
52
+ export declare type WizardNavType = Partial<WizardNavProps> | CustomWizardNavFunction | React.ReactElement;
53
+ export declare type WizardNavItemType = Partial<WizardNavItemProps> | CustomWizardNavItemFunction | React.ReactElement;
68
54
  /** Callback for the Wizard's 'nav' property. Returns element which replaces the Wizard's default navigation. */
69
- export declare type CustomWizardNavFunction = (isExpanded: boolean, steps: WizardControlStep[], activeStep: WizardControlStep, goToStepByIndex: (index: number) => void) => React.ReactElement<WizardNavProps>;
70
- export declare function isCustomWizardNav(nav: DefaultWizardNavProps | CustomWizardNavFunction): nav is CustomWizardNavFunction;
71
- export declare function isCustomWizardFooter(footer: DefaultWizardFooterProps | React.ReactElement): footer is React.ReactElement;
55
+ export declare type CustomWizardNavFunction = (isExpanded: boolean, steps: WizardControlStep[], currentStep: WizardControlStep, goToStepByIndex: (index: number) => void) => React.ReactElement<WizardNavProps>;
56
+ /** Callback for the Wizard's 'navItem' property. Returns element which replaces the WizardStep's default navigation item. */
57
+ export declare type CustomWizardNavItemFunction = (step: WizardControlStep, currentStep: WizardControlStep, steps: WizardControlStep[], goToStepByIndex: (index: number) => void) => React.ReactElement<WizardNavItemProps>;
58
+ /** Callback for the Wizard's 'footer' property. Returns element which replaces the Wizard's default footer. */
59
+ export declare type CustomWizardFooterFunction = (currentStep: WizardControlStep, onNext: () => void, onBack: () => void, onClose: () => void) => React.ReactElement<WizardFooterProps>;
60
+ export declare function isCustomWizardNav(nav: WizardNavType): nav is CustomWizardNavFunction | React.ReactElement;
61
+ export declare function isCustomWizardNavItem(navItem: WizardNavItemType): navItem is CustomWizardNavItemFunction | React.ReactElement;
62
+ export declare function isCustomWizardFooter(footer: WizardFooterType): footer is CustomWizardFooterFunction | React.ReactElement;
72
63
  export declare function isWizardBasicStep(step: WizardControlStep): step is WizardBasicStep;
73
64
  export declare function isWizardSubStep(step: WizardControlStep): step is WizardSubStep;
74
65
  export declare function isWizardParentStep(step: WizardControlStep): step is WizardParentStep;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/next/components/Wizard/types.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAE/D,mHAAmH;AACnH,MAAM,WAAW,eAAe;IAC9B,kCAAkC;IAClC,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC;IACtB,wBAAwB;IACxB,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IACpB,0CAA0C;IAC1C,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,yEAAyE;IACzE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,8HAA8H;IAC9H,SAAS,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC;IAC/B,yDAAyD;IACzD,OAAO,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,kBAAkB,CAAC,CAAC;IACjD,2JAA2J;IAC3J,cAAc,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACjC,uFAAuF;IACvF,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,sEAAsE;IACtE,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,oEAAoE;IACpE,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,wCAAwC;AACxC,MAAM,WAAW,gBAAiB,SAAQ,eAAe;IACvD,sB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isWizardParentStep = exports.isWizardSubStep = exports.isWizardBasicStep = exports.isCustomWizardFooter = exports.isCustomWizardNav = void 0;
3
+ exports.isWizardParentStep = exports.isWizardSubStep = exports.isWizardBasicStep = exports.isCustomWizardFooter = exports.isCustomWizardNavItem = exports.isCustomWizardNav = exports.WizardNavItemStatus = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const react_1 = tslib_1.__importDefault(require("react"));
6
+ var WizardNavItemStatus;
7
+ (function (WizardNavItemStatus) {
8
+ WizardNavItemStatus["Default"] = "default";
9
+ WizardNavItemStatus["Error"] = "error";
10
+ })(WizardNavItemStatus = exports.WizardNavItemStatus || (exports.WizardNavItemStatus = {}));
6
11
  function isCustomWizardNav(nav) {
7
- return typeof nav === 'function';
12
+ return typeof nav === 'function' || react_1.default.isValidElement(nav);
8
13
  }
9
14
  exports.isCustomWizardNav = isCustomWizardNav;
15
+ function isCustomWizardNavItem(navItem) {
16
+ return typeof navItem === 'function' || react_1.default.isValidElement(navItem);
17
+ }
18
+ exports.isCustomWizardNavItem = isCustomWizardNavItem;
10
19
  function isCustomWizardFooter(footer) {
11
- return react_1.default.isValidElement(footer);
20
+ return typeof footer === 'function' || react_1.default.isValidElement(footer);
12
21
  }
13
22
  exports.isCustomWizardFooter = isCustomWizardFooter;
14
23
  function isWizardBasicStep(step) {
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../src/next/components/Wizard/types.tsx"],"names":[],"mappings":";;;;AAAA,0DAA0B;AAoF1B,SAAgB,iBAAiB,CAC/B,GAAoD;IAEpD,OAAO,OAAO,GAAG,KAAK,UAAU,CAAC;AACnC,CAAC;AAJD,8CAIC;AAED,SAAgB,oBAAoB,CAClC,MAAqD;IAErD,OAAO,eAAK,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;AACtC,CAAC;AAJD,oDAIC;AAED,SAAgB,iBAAiB,CAAC,IAAuB;;IACvD,OAAO,CAAA,MAAC,IAAyB,0CAAE,UAAU,M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,QAAQ,MAAK,SAAS,CAAC;AACzD,CAAC;AAFD,0CAEC;AAED,SAAgB,kBAAkB,CAAC,IAAuB;;IACxD,OAAO,CAAA,MAAC,IAAyB,0CAAE,UAAU,MAAK,SAAS,CAAC;AAC9D,CAAC;AAFD,gDAEC"}
@@ -7,9 +7,8 @@ import { WizardStepProps } from './WizardStep';
7
7
  * @returns WizardControlStep[]
8
8
  */
9
9
  export declare const buildSteps: (children: React.ReactElement<WizardStepProps> | React.ReactElement<WizardStepProps>[]) => WizardControlStep[];
10
- export declare const normalizeNavStep: ({ id, name }: WizardNavStepData) => {
11
- id: string | number;
12
- name: React.ReactNode;
13
- };
14
- export declare const getActiveStep: (steps: WizardControlStep[], currentStepIndex: number) => WizardControlStep;
10
+ export declare function isWizardStep(child: any | React.ReactElement<WizardStepProps>): child is React.ReactElement<WizardStepProps>;
11
+ export declare const normalizeStep: ({ children, steps, body, ...controlStep }: WizardStepProps) => WizardControlStep;
12
+ export declare const normalizeNavStep: (navStep: WizardControlStep, steps: WizardControlStep[]) => WizardNavStepData;
13
+ export declare const getCurrentStep: (steps: WizardControlStep[], currentStepIndex: number) => WizardControlStep;
15
14
  //# sourceMappingURL=utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../src/next/components/Wizard/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAC/D,OAAO,EAAc,eAAe,EAAE,MAAM,cAAc,CAAC;AAM3D;;;;GAIG;AACH,eAAO,MAAM,UAAU,aAAc,MAAM,YAAY,CAAC,eAAe,CAAC,GAAG,MAAM,YAAY,CAAC,eAAe,CAAC,EAAE,wBA8BxG,CAAC;AAET,eAAO,MAAM,gBAAgB,iBAAkB,iBAAiB;;;CAAmB,CAAC;AACpF,eAAO,MAAM,aAAa,UAAW,iBAAiB,EAAE,oBAAoB,MAAM,sBACxB,CAAC"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../src/next/components/Wizard/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAC/D,OAAO,EAAc,eAAe,EAAE,MAAM,cAAc,CAAC;AAE3D;;;;GAIG;AACH,eAAO,MAAM,UAAU,aAAc,MAAM,YAAY,CAAC,eAAe,CAAC,GAAG,MAAM,YAAY,CAAC,eAAe,CAAC,EAAE,wBAyBxG,CAAC;AAET,wBAAgB,YAAY,CAC1B,KAAK,EAAE,GAAG,GAAG,KAAK,CAAC,YAAY,CAAC,eAAe,CAAC,GAC/C,KAAK,IAAI,KAAK,CAAC,YAAY,CAAC,eAAe,CAAC,CAK9C;AAGD,eAAO,MAAM,aAAa,8CAA+C,eAAe,KAAG,iBAC9E,CAAC;AAEd,eAAO,MAAM,gBAAgB,YAAa,iBAAiB,SAAS,iBAAiB,EAAE,KAAG,iBAIxF,CAAC;AAEH,eAAO,MAAM,cAAc,UAAW,iBAAiB,EAAE,oBAAoB,MAAM,sBACzB,CAAC"}
@@ -1,27 +1,20 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getActiveStep = exports.normalizeNavStep = exports.buildSteps = void 0;
3
+ exports.getCurrentStep = exports.normalizeNavStep = exports.normalizeStep = exports.isWizardStep = exports.buildSteps = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const react_1 = tslib_1.__importDefault(require("react"));
6
6
  const WizardStep_1 = require("./WizardStep");
7
- function hasWizardStepProps(props) {
8
- return props.name !== undefined && props.id !== undefined;
9
- }
10
7
  /**
11
8
  * Accumulate list of step & sub-step props pulled from child components
12
9
  * @param children
13
10
  * @returns WizardControlStep[]
14
11
  */
15
12
  const buildSteps = (children) => react_1.default.Children.toArray(children).reduce((acc, child) => {
16
- if (react_1.default.isValidElement(child) && (child.type === WizardStep_1.WizardStep || hasWizardStepProps(child.props))) {
17
- // Omit "children" and use the whole "child" (WizardStep) for the component prop. Sub-steps will do the same.
18
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
19
- const _a = child.props, { steps: subSteps, id, children } = _a, stepProps = tslib_1.__rest(_a, ["steps", "id", "children"]);
20
- acc.push(Object.assign(Object.assign({ id, component: child }, stepProps), (subSteps && {
13
+ if (isWizardStep(child)) {
14
+ const { steps: subSteps, id } = child.props;
15
+ acc.push(Object.assign(Object.assign({ component: child }, exports.normalizeStep(child.props)), (subSteps && {
21
16
  subStepIds: subSteps === null || subSteps === void 0 ? void 0 : subSteps.map(subStep => {
22
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
23
- const _a = subStep.props, { children } = _a, subStepProps = tslib_1.__rest(_a, ["children"]);
24
- acc.push(Object.assign(Object.assign({}, subStepProps), { component: subStep, parentId: id }));
17
+ acc.push(Object.assign(Object.assign({}, exports.normalizeStep(subStep.props)), { component: subStep, parentId: id }));
25
18
  return subStep.props.id;
26
19
  })
27
20
  })));
@@ -32,8 +25,24 @@ const buildSteps = (children) => react_1.default.Children.toArray(children).redu
32
25
  return acc;
33
26
  }, []);
34
27
  exports.buildSteps = buildSteps;
35
- const normalizeNavStep = ({ id, name }) => ({ id, name });
28
+ function isWizardStep(child) {
29
+ var _a, _b;
30
+ return ((react_1.default.isValidElement(child) && child.type === WizardStep_1.WizardStep) ||
31
+ (((_a = child.props) === null || _a === void 0 ? void 0 : _a.name) !== undefined && ((_b = child.props) === null || _b === void 0 ? void 0 : _b.id) !== undefined));
32
+ }
33
+ exports.isWizardStep = isWizardStep;
34
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
35
+ const normalizeStep = (_a) => {
36
+ var { children, steps, body } = _a, controlStep = tslib_1.__rest(_a, ["children", "steps", "body"]);
37
+ return controlStep;
38
+ };
39
+ exports.normalizeStep = normalizeStep;
40
+ const normalizeNavStep = (navStep, steps) => ({
41
+ id: navStep.id,
42
+ name: navStep.name.toString(),
43
+ index: steps.indexOf(navStep) + 1
44
+ });
36
45
  exports.normalizeNavStep = normalizeNavStep;
37
- const getActiveStep = (steps, currentStepIndex) => steps.find((_, index) => index + 1 === currentStepIndex);
38
- exports.getActiveStep = getActiveStep;
46
+ const getCurrentStep = (steps, currentStepIndex) => steps.find((_, index) => index + 1 === currentStepIndex);
47
+ exports.getCurrentStep = getCurrentStep;
39
48
  //# sourceMappingURL=utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../../src/next/components/Wizard/utils.ts"],"names":[],"mappings":";;;;AAAA,0DAA0B;AAG1B,6CAA2D;AAE3D,SAAS,kBAAkB,CAAC,KAA4B;IACtD,OAAO,KAAK,CAAC,IAAI,KAAK,SAAS,IAAI,KAAK,CAAC,EAAE,KAAK,SAAS,CAAC;AAC5D,CAAC;AAED;;;;GAIG;AACI,MAAM,UAAU,GAAG,CAAC,QAAqF,EAAE,EAAE,CAClH,eAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC,GAAwB,EAAE,KAAK,EAAE,EAAE;IAC1E,IAAI,eAAK,CAAC,cAAc,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,KAAK,uBAAU,IAAI,kBAAkB,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE;QACjG,6GAA6G;QAC7G,6DAA6D;QAC7D,MAAM,KAAkD,KAAK,CAAC,KAAwB,EAAhF,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE,QAAQ,OAAiD,EAA5C,SAAS,sBAA7C,2BAA+C,CAAiC,CAAC;QAEvF,GAAG,CAAC,IAAI,+BACN,EAAE,EACF,SAAS,EAAE,KAAK,IACb,SAAS,GACT,CAAC,QAAQ,IAAI;YACd,UAAU,EAAE,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,GAAG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G,EAAE,EAAE,OAAO,CAAC,EAAE;IACd,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE;IAC7B,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC;CAClC,CAAC,CAAC;AAJU,QAAA,gBAAgB,oBAI1B;AAEI,MAAM,cAAc,GAAG,CAAC,KAA0B,EAAE,gBAAwB,EAAE,EAAE,CACrF,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,GAAG,CAAC,KAAK,gBAAgB,CAAC,CAAC;AAD9C,QAAA,cAAc,kBACgC"}
@@ -1,3 +1,4 @@
1
- export * from './Wizard';
2
1
  export * from './Dropdown';
2
+ export * from './Select';
3
+ export * from './Wizard';
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/next/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/next/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC"}
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
- tslib_1.__exportStar(require("./Wizard"), exports);
5
4
  tslib_1.__exportStar(require("./Dropdown"), exports);
5
+ tslib_1.__exportStar(require("./Select"), exports);
6
+ tslib_1.__exportStar(require("./Wizard"), exports);
6
7
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/next/components/index.ts"],"names":[],"mappings":";;;AAAA,mDAAyB;AACzB,qDAA2B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/next/components/index.ts"],"names":[],"mappings":";;;AAAA,qDAA2B;AAC3B,mDAAyB;AACzB,mDAAyB"}